diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 36097307d81..251cd765e1d 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs-mono-repo:latest - digest: sha256:85bf089b45ad70d1ec02d9d628a0051a06bb63fb79f6b740f787d1a34347f732 + digest: sha256:1eb185b0427bb3d87cb6b2ea968ed33c812b3669bbf3b763593a9f39ca59eb31 diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index d904d1e2bde..58aa717d397 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -6,4 +6,4 @@ # The yoshi-nodejs team is the default owner for nodejs repositories. -* @googleapis/yoshi-nodejs +* @googleapis/jsteam diff --git a/.github/auto-approve.yaml b/.github/auto-approve.yaml deleted file mode 100644 index 7cba0af636c..00000000000 --- a/.github/auto-approve.yaml +++ /dev/null @@ -1,2 +0,0 @@ -processes: - - "NodeDependency" \ No newline at end of file diff --git a/.github/auto-approve.yml b/.github/auto-approve.yml new file mode 100644 index 00000000000..84dee1771ed --- /dev/null +++ b/.github/auto-approve.yml @@ -0,0 +1,2 @@ +processes: + - "NodeDependency" diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 02dca9996d5..2d5bbb83c15 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -34,16 +34,13 @@ branchProtectionRules: - "samples-presubmit-node14-with-credentials (long-door-651)" - "samples-presubmit-node14 (long-door-651)" - "units (14)" - - "unit-presubmit-node16 (long-door-651)" - - "unit-presubmit-node18 (long-door-651)" - - "unit-presubmit-node12 (long-door-651)" + - "units (12)" + - "units (16)" + - "units (18)" # List of explicit permissions to add (additive only) permissionRules: # Team slug to add to repository permissions - - team: yoshi-admins - # Access level required, one of push|pull|admin + - team: jsteam-admins permission: admin - - team: yoshi-nodejs-admins - permission: admin - - team: yoshi-nodejs + - team: jsteam permission: push diff --git a/.github/workflows/continuous.yaml b/.github/workflows/continuous.yaml index 9c82ff93ba5..b07bb9cf7ef 100644 --- a/.github/workflows/continuous.yaml +++ b/.github/workflows/continuous.yaml @@ -11,9 +11,9 @@ jobs: node: [14] steps: - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: pnpm/action-setup@v2 with: - node-version: ${{ matrix.node }} + version: 7.32.2 - run: node --version - run: ci/run_conditional_tests.sh name: Check lint @@ -24,12 +24,12 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [14] + node: [12, 14, 16, 18] steps: - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: pnpm/action-setup@v2 with: - node-version: ${{ matrix.node }} + version: ^6.24.1 - run: node --version - run: ci/run_conditional_tests.sh name: Run unit tests diff --git a/.github/workflows/presubmit.yaml b/.github/workflows/presubmit.yaml index e03d7ea3ac4..1ff2d67d965 100644 --- a/.github/workflows/presubmit.yaml +++ b/.github/workflows/presubmit.yaml @@ -9,9 +9,9 @@ jobs: node: [14] steps: - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: pnpm/action-setup@v2 with: - node-version: ${{ matrix.node }} + version: 7.32.2 - run: node --version - run: ci/run_conditional_tests.sh name: Check lint @@ -22,12 +22,12 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [14] + node: [12, 14, 16, 18] steps: - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: pnpm/action-setup@v2 with: - node-version: ${{ matrix.node }} + version: ^6.24.1 - run: node --version - run: ci/run_conditional_tests.sh name: Run unit tests diff --git a/.gitignore b/.gitignore index e4c29439d1b..c33c727fdb1 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,5 @@ packages/*/CONTRIBUTORS packages/*/COPYING package-lock.json __pycache__ +packages/*/pnpm-lock.yaml +containers/*/pnpm-lock.yaml \ No newline at end of file diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b7064f5d6b2..dc95355b6e1 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,21 +1,21 @@ { "packages/gapic-node-templating": "0.0.0", - "packages/google-analytics-admin": "4.7.1", + "packages/google-analytics-admin": "4.9.0", "packages/google-analytics-data": "3.2.2", "packages/google-api-apikeys": "0.2.2", - "packages/google-api-servicecontrol": "2.1.2", + "packages/google-api-servicecontrol": "2.3.0", "packages/google-api-servicemanagement": "1.2.2", "packages/google-api-serviceusage": "2.2.2", "packages/google-appengine": "2.2.2", "packages/google-area120-tables": "2.2.2", "packages/google-cloud-accessapproval": "2.2.2", - "packages/google-cloud-aiplatform": "2.9.0", + "packages/google-cloud-aiplatform": "2.14.0", "packages/google-cloud-apigateway": "2.2.2", "packages/google-cloud-apigeeconnect": "2.2.2", "packages/google-cloud-asset": "4.6.3", "packages/google-cloud-assuredworkloads": "3.6.2", "packages/google-cloud-baremetalsolution": "0.3.2", - "packages/google-cloud-batch": "0.7.1", + "packages/google-cloud-batch": "0.8.0", "packages/google-cloud-beyondcorp-appconnections": "0.3.2", "packages/google-cloud-beyondcorp-appconnectors": "0.4.2", "packages/google-cloud-beyondcorp-appgateways": "0.3.2", @@ -31,24 +31,24 @@ "packages/google-cloud-billing-budgets": "4.2.2", "packages/google-cloud-binaryauthorization": "2.5.0", "packages/google-cloud-certificatemanager": "0.7.2", - "packages/google-cloud-channel": "2.5.1", - "packages/google-cloud-clouddms": "2.2.2", + "packages/google-cloud-channel": "2.7.0", + "packages/google-cloud-clouddms": "2.3.0", "packages/google-cloud-compute": "3.9.1", - "packages/google-cloud-contactcenterinsights": "2.6.0", + "packages/google-cloud-contactcenterinsights": "2.7.0", "packages/google-cloud-contentwarehouse": "0.5.1", "packages/google-cloud-datacatalog": "3.3.1", "packages/google-cloud-datacatalog-lineage": "0.1.2", "packages/google-cloud-dataform": "0.4.2", "packages/google-cloud-datafusion": "2.2.2", "packages/google-cloud-datalabeling": "3.2.2", - "packages/google-cloud-dataplex": "2.3.2", - "packages/google-cloud-dataproc": "4.4.1", + "packages/google-cloud-dataplex": "2.4.0", + "packages/google-cloud-dataproc": "4.5.0", "packages/google-cloud-dataqna": "2.1.2", - "packages/google-cloud-datastream": "2.2.2", - "packages/google-cloud-deploy": "2.4.1", - "packages/google-cloud-dialogflow": "5.7.1", - "packages/google-cloud-dialogflow-cx": "3.4.2", - "packages/google-cloud-discoveryengine": "0.4.1", + "packages/google-cloud-datastream": "2.3.0", + "packages/google-cloud-deploy": "2.5.0", + "packages/google-cloud-dialogflow": "5.8.0", + "packages/google-cloud-dialogflow-cx": "3.5.0", + "packages/google-cloud-discoveryengine": "0.6.0", "packages/google-cloud-documentai": "7.3.1", "packages/google-cloud-domains": "2.2.2", "packages/google-cloud-essentialcontacts": "2.1.2", @@ -59,26 +59,26 @@ "packages/google-cloud-gaming": "3.2.2", "packages/google-cloud-gkebackup": "0.3.2", "packages/google-cloud-gkeconnect-gateway": "2.1.2", - "packages/google-cloud-gkehub": "3.3.2", + "packages/google-cloud-gkehub": "3.4.0", "packages/google-cloud-gkemulticloud": "0.3.2", "packages/google-cloud-gsuiteaddons": "0.1.2", "packages/google-cloud-iap": "2.3.1", "packages/google-cloud-ids": "2.2.2", "packages/google-cloud-iot": "3.2.2", - "packages/google-cloud-kms": "3.5.1", + "packages/google-cloud-kms": "3.6.0", "packages/google-cloud-language": "5.2.2", "packages/google-cloud-lifesciences": "2.3.2", "packages/google-cloud-managedidentities": "2.2.2", "packages/google-cloud-mediatranslation": "3.1.2", "packages/google-cloud-memcache": "2.3.2", - "packages/google-cloud-metastore": "3.4.2", + "packages/google-cloud-metastore": "3.5.0", "packages/google-cloud-monitoring": "3.0.4", "packages/google-cloud-networkconnectivity": "2.3.3", "packages/google-cloud-networkmanagement": "2.4.2", "packages/google-cloud-networksecurity": "1.1.2", "packages/google-cloud-notebooks": "2.1.4", "packages/google-cloud-optimization": "2.2.2", - "packages/google-cloud-orchestration-airflow-service": "2.3.2", + "packages/google-cloud-orchestration-airflow-service": "2.4.0", "packages/google-cloud-orgpolicy": "2.1.2", "packages/google-cloud-osconfig": "2.2.2", "packages/google-cloud-oslogin": "4.1.2", @@ -87,23 +87,23 @@ "packages/google-cloud-privatecatalog": "2.1.2", "packages/google-cloud-recaptchaenterprise": "3.4.1", "packages/google-cloud-recommender": "5.0.6", - "packages/google-cloud-redis": "3.2.2", - "packages/google-cloud-resourcemanager": "4.2.2", + "packages/google-cloud-redis": "3.3.0", + "packages/google-cloud-resourcemanager": "4.3.0", "packages/google-cloud-resourcesettings": "2.0.5", - "packages/google-cloud-retail": "2.4.0", - "packages/google-cloud-run": "0.4.2", + "packages/google-cloud-retail": "2.4.1", + "packages/google-cloud-run": "0.5.0", "packages/google-cloud-scheduler": "3.3.1", "packages/google-cloud-secretmanager": "4.2.2", "packages/google-cloud-security-privateca": "4.4.0", "packages/google-cloud-security-publicca": "0.1.5", - "packages/google-cloud-securitycenter": "7.3.0", + "packages/google-cloud-securitycenter": "7.4.0", "packages/google-cloud-servicedirectory": "4.0.7", "packages/google-cloud-shell": "2.1.2", - "packages/google-cloud-speech": "5.4.1", - "packages/google-cloud-talent": "5.1.2", + "packages/google-cloud-speech": "5.5.0", + "packages/google-cloud-talent": "5.1.3", "packages/google-cloud-tasks": "3.1.2", "packages/google-cloud-texttospeech": "4.2.2", - "packages/google-cloud-tpu": "2.5.1", + "packages/google-cloud-tpu": "2.6.1", "packages/google-cloud-translate": "7.2.1", "packages/google-cloud-video-livestream": "0.5.1", "packages/google-cloud-video-stitcher": "0.3.2", @@ -113,14 +113,14 @@ "packages/google-cloud-vmmigration": "2.3.2", "packages/google-cloud-vmwareengine": "0.1.2", "packages/google-cloud-vpcaccess": "2.2.2", - "packages/google-cloud-webrisk": "3.2.2", + "packages/google-cloud-webrisk": "3.3.0", "packages/google-cloud-websecurityscanner": "2.1.5", "packages/google-cloud-workflows-executions": "2.3.2", - "packages/google-container": "4.8.0", + "packages/google-container": "4.11.0", "packages/google-dataflow": "2.1.2", "packages/google-devtools-artifactregistry": "2.2.2", - "packages/google-devtools-cloudbuild": "3.5.2", - "packages/google-devtools-containeranalysis": "4.6.1", + "packages/google-devtools-cloudbuild": "3.6.0", + "packages/google-devtools-containeranalysis": "4.7.0", "packages/google-iam": "0.3.2", "packages/google-iam-credentials": "2.0.4", "packages/google-identity-accesscontextmanager": "2.3.2", @@ -130,10 +130,14 @@ "packages/google-monitoring-dashboard": "2.9.2", "packages/google-privacy-dlp": "4.4.2", "packages/google-storagetransfer": "2.3.2", - "packages/grafeas": "4.4.1", - "packages/typeless-sample-bot": "1.3.1", + "packages/grafeas": "4.5.0", + "packages/typeless-sample-bot": "1.3.2", "packages/google-cloud-advisorynotifications": "0.2.1", "packages/google-cloud-kms-inventory": "0.1.1", "packages/google-cloud-alloydb": "0.1.1", - "packages/google-cloud-workstations": "0.1.1" + "packages/google-cloud-workstations": "0.2.0", + "packages/google-cloud-confidentialcomputing": "0.1.0", + "packages/google-ai-generativelanguage": "0.2.0", + "packages/google-cloud-storageinsights": "0.1.1", + "packages/google-maps-places": "0.1.0" } diff --git a/CODEOWNERS b/CODEOWNERS deleted file mode 100644 index 134daa4bed4..00000000000 --- a/CODEOWNERS +++ /dev/null @@ -1,31 +0,0 @@ -# Code owners file. -# This file controls who is tagged for review for any given pull request. - -# Luke Sneeringer is the default owner for anything not explicitly taken by -# someone else. -* @lukesneeringer - -# Dave Gramlich is the primary author of the scripts that generate the -# documentation and run test scripts. -docs/* @callmehiphop -scripts/* @callmehiphop - -# Dave Gramlich and Stephen Sawchuk are the primary authors and share -# responsibility for most libraries and tests. -packages/* @callmehiphop @stephenplusplus -system-test/* @callmehiphop @stephenplusplus -test/* @callmehiphop @stephenplusplus - -# @GoogleCloudPlatform/node-team is responsible for the Logging extension -# libraries. -packages/error-reporting/* @GoogleCloudPlatform/node-team -packages/logging-bunyan/* @GoogleCloudPlatform/node-team -packages/logging-winston/* @GoogleCloudPlatform/node-team - -# Luke Sneeringer is the primary author of the ML API clients. -packages/dlp/* @lukesneeringer -packages/language/* @lukesneeringer -packages/monitoring/* @lukesneeringer -packages/speech/* @lukesneeringer -packages/video-intelligence/* @lukesneeringer -packages/vision/* @lukesneeringer diff --git a/README.md b/README.md index 4344d151555..e8d98d13b6a 100644 --- a/README.md +++ b/README.md @@ -143,12 +143,14 @@ applications that interact with individual Google Cloud services: | [BeyondCorp API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-beyondcorp-clientconnectorservices) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/clientconnectorservices)](https://npm.im/@google-cloud/clientconnectorservices) | | [BeyondCorp API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-beyondcorp-clientgateways) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/clientgateways)](https://npm.im/@google-cloud/clientgateways) | | [BigQuery Migration API](https://github.com/googleapis/nodejs-bigquery-migration) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/bigquery-migration)](https://npm.im/@google-cloud/bigquery-migration) | +| [Confidential Computing API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-confidentialcomputing) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/confidentialcomputing)](https://npm.im/@google-cloud/confidentialcomputing) | | [Data Labeling](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-datalabeling) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/datalabeling)](https://npm.im/@google-cloud/datalabeling) | | [Data Lineage API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-datacatalog-lineage) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/lineage)](https://npm.im/@google-cloud/lineage) | | [Data QnA](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-dataqna) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/data-qna)](https://npm.im/@google-cloud/data-qna) | | [Dataflow](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-dataflow) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/dataflow)](https://npm.im/@google-cloud/dataflow) | | [Dataform API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-dataform) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/dataform)](https://npm.im/@google-cloud/dataform) | | [Discovery Engine API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-discoveryengine) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/discoveryengine)](https://npm.im/@google-cloud/discoveryengine) | +| [Generative Language API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-ai-generativelanguage) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-ai/generativelanguage)](https://npm.im/@google-ai/generativelanguage) | | [GKE Connect Gateway](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-gkeconnect-gateway) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/gke-connect-gateway)](https://npm.im/@google-cloud/gke-connect-gateway) | | [Google Analytics Admin](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-analytics-admin) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-analytics/admin)](https://npm.im/@google-analytics/admin) | | [Google Analytics Admin](https://github.com/googleapis/nodejs-analytics-admin) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-analytics/admin)](https://npm.im/@google-analytics/admin) | @@ -160,6 +162,7 @@ applications that interact with individual Google Cloud services: | [Phishing Protection](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-phishingprotection) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/phishing-protection)](https://npm.im/@google-cloud/phishing-protection) | | [Private Catalog](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-privatecatalog) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/private-catalog)](https://npm.im/@google-cloud/private-catalog) | | [Public Certificate Authority](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-security-publicca) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/publicca)](https://npm.im/@google-cloud/publicca) | +| [Storage Insights API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-storageinsights) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/storageinsights)](https://npm.im/@google-cloud/storageinsights) | | [Trace](https://github.com/googleapis/cloud-trace-nodejs) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/trace-agent)](https://npm.im/@google-cloud/trace-agent) | | [Workstations API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-workstations) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/workstations)](https://npm.im/@google-cloud/workstations) | diff --git a/changelog.json b/changelog.json index ee136b3726a..7c903088b77 100644 --- a/changelog.json +++ b/changelog.json @@ -1,6 +1,967 @@ { "repository": "googleapis/google-cloud-node", "entries": [ + { + "changes": [ + { + "type": "feat", + "sha": "ac249801878b0c7271722c0bf128eb2c0437bf44", + "message": "Add initial files for google.maps.places.v1", + "issues": [ + "4289" + ] + } + ], + "version": "0.1.0", + "language": "JAVASCRIPT", + "artifactName": "@googlemaps/places", + "id": "43db6c0a-dd86-476a-a6cb-6fb02d165696", + "createTime": "2023-05-20T02:26:24.513Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "ee6e6996c8d08786076482508470380e4b2b7465", + "message": "[workstations] add output field for the control plane IP address", + "issues": [ + "4263" + ] + } + ], + "version": "0.2.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/workstations", + "id": "5ac05870-a0b1-48f1-8de9-c061bfbef96a", + "createTime": "2023-05-20T02:26:24.510Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "40edfc52a9894cf57b389c2744563bfa490102cb", + "message": "[webrisk] add SubmitUri endpoint", + "issues": [ + "4286" + ] + } + ], + "version": "3.3.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/web-risk", + "id": "8ddc6b6b-9ce9-4d58-9f96-ebb89d88ebcd", + "createTime": "2023-05-20T02:26:24.507Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "bf5631932cd0f2f52c23caaba235b04222a1a609", + "message": "[kms] added VerifyConnectivity RPC", + "issues": [ + "4274" + ] + } + ], + "version": "3.6.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/kms", + "id": "3ffe8b2e-be7b-403c-b425-e294f876068d", + "createTime": "2023-05-20T02:26:24.504Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "88877b9509815d76f1915aa87e97597ec7e1520d", + "message": "[dialogflow] add baseline model configuration for conversation summarization", + "issues": [ + "4255" + ] + } + ], + "version": "5.8.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/dialogflow", + "id": "103b69e9-d4ea-4243-8626-aa749395f356", + "createTime": "2023-05-20T02:26:24.499Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "f2c4a78cb8929ea10713f5fa043cbe30df378287", + "message": "[datastream] Max concurrent backfill tasks", + "issues": [ + "4254" + ] + } + ], + "version": "2.3.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/datastream", + "id": "7bc86fc5-2bcc-4be6-9950-b8c2557ffc45", + "createTime": "2023-05-20T02:26:24.496Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "65fadd5fedea461b89cf7aeeb0f825a83dd81e02", + "message": "[clouddms] add Oracle to PostgreSQL migration APIs", + "issues": [ + "4285" + ] + } + ], + "version": "2.3.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/dms", + "id": "acb663f3-4ade-4f90-bc2c-14e566d21f03", + "createTime": "2023-05-20T02:26:24.493Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "3defaa1caaa70a9384eddc0281645a9bf6c860cb", + "message": "[channel] added partition_keys field to filter results from FetchReportResults", + "issues": [ + "4279" + ] + } + ], + "version": "2.7.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/channel", + "id": "b4a4fbab-ab31-4b99-802e-90e7958240da", + "createTime": "2023-05-20T02:26:24.489Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "9ece2b7d96f3b18b32acfd5e24ba38f52f39dab9", + "message": "[batch] add support for placement policies", + "issues": [ + "4182" + ] + } + ], + "version": "0.8.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/batch", + "id": "9e281631-aa27-4cd4-89de-e621966a868e", + "createTime": "2023-05-20T02:26:24.486Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "d1e67beadf1910378989cd1bd3c19cbe000973d7", + "message": "Add updateSchedule method to ScheduleService", + "issues": [ + "4280" + ] + } + ], + "version": "2.14.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/aiplatform", + "id": "dfabd532-1745-47d4-b9da-0e9f0c7b1694", + "createTime": "2023-05-20T02:26:24.480Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "2f0e6e1b85fa68c02a350fed5ffcc6db0bb64fdd", + "message": "[analytics-admin] add `GetAdSenseLink`, `CreateAdSenseLink`, `DeleteAdSenseLink`, `ListAdSenseLinks` methods to the Admin API v1alpha", + "issues": [ + "4276" + ] + } + ], + "version": "4.9.0", + "language": "JAVASCRIPT", + "artifactName": "@google-analytics/admin", + "id": "084303f1-a65c-4120-8b07-45105027b513", + "createTime": "2023-05-20T02:26:24.411Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "a5389596ba5b0c707582612a6b2aa84385fefc26", + "message": "Do not exit with 1 on empty folder", + "issues": [ + "4272" + ] + } + ], + "version": "1.3.2", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/typeless-sample-bot", + "id": "0b204f0b-d47b-4d59-b14c-bb66d75f445e", + "createTime": "2023-05-11T22:03:10.640Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "8b5caebc2569c715a4fee03e6bcc5e5cd2ca5150", + "message": "Add processing strategy to batch recognition requests", + "issues": [ + "4268" + ] + } + ], + "version": "5.5.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/speech", + "id": "1dfc19b9-45b0-41bd-8dab-c0fe1d078878", + "createTime": "2023-05-11T22:03:10.634Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "22d6aa5a2d9386ea5663672a4bfa8feff1f00eb7", + "message": "Added debug info to StreamingDetectIntent", + "issues": [] + }, + { + "type": "feat", + "sha": "22d6aa5a2d9386ea5663672a4bfa8feff1f00eb7", + "message": "Added dtmf digits to WebhookRequest", + "issues": [] + }, + { + "type": "feat", + "sha": "22d6aa5a2d9386ea5663672a4bfa8feff1f00eb7", + "message": "Added FLOW as a new DiffType in TestRunDifference", + "issues": [] + }, + { + "type": "feat", + "sha": "22d6aa5a2d9386ea5663672a4bfa8feff1f00eb7", + "message": "[dialogflow-cx] extended CreateAgent timeout to 180 seconds", + "issues": [ + "4253" + ] + }, + { + "type": "feat", + "sha": "22d6aa5a2d9386ea5663672a4bfa8feff1f00eb7", + "message": "Added debug info to StreamingDetectIntent", + "issues": [] + }, + { + "type": "feat", + "sha": "22d6aa5a2d9386ea5663672a4bfa8feff1f00eb7", + "message": "Added dtmf digits to WebhookRequest", + "issues": [] + }, + { + "type": "feat", + "sha": "22d6aa5a2d9386ea5663672a4bfa8feff1f00eb7", + "message": "Added FLOW as a new DiffType in TestRunDifference", + "issues": [] + }, + { + "type": "feat", + "sha": "22d6aa5a2d9386ea5663672a4bfa8feff1f00eb7", + "message": "[dialogflow-cx] extended CreateAgent timeout to 180 seconds", + "issues": [] + } + ], + "version": "3.5.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/dialogflow-cx", + "id": "48831956-cb59-40d8-95f0-6e17d324dccd", + "createTime": "2023-05-11T22:03:10.629Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "405cbe236171808ca3b49faa933c2078bebd09d6", + "message": "Address typo in package.json", + "issues": [], + "scope": "build" + } + ], + "version": "0.1.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/storageinsights", + "id": "9da03a8c-e1c1-40cf-a217-f9518a09ca2e", + "createTime": "2023-05-09T22:01:41.602Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "1427b2bf0cac31a3fbd10f607b2a5d9803f3a18f", + "message": "[redis] [Cloud Memorystore for Redis] Add CMEK key field", + "issues": [ + "4251" + ] + } + ], + "version": "3.3.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/redis", + "id": "80002c20-6d9e-454a-86a6-942c36563fac", + "createTime": "2023-05-09T22:01:41.592Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "07ebb81915abb57c6ce48614e8d39cc1fea84bdc", + "message": "[servicecontrol] Log Analytics features of the Cloud Logging API", + "issues": [ + "4252" + ] + } + ], + "version": "2.3.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/service-control", + "id": "b66cfec7-ca60-444f-a93b-5d43783e9a3c", + "createTime": "2023-05-09T22:01:41.507Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "871c86f8524d9afc6aec29dbc00f2cd3eaf0445b", + "message": "Add initial files for google.cloud.storageinsights.v1", + "issues": [ + "4243" + ] + } + ], + "version": "0.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/storageinsights", + "id": "4449d818-9444-4838-9772-36f99721fd7d", + "createTime": "2023-05-09T16:59:05.869Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "0d4c47eb5d884e3cb760941e616e03769a1e8733", + "message": "[channel] Add billing account to entitlement definitions for Cloud Channel API", + "issues": [ + "4250" + ] + } + ], + "version": "2.6.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/channel", + "id": "7b3985d6-5c3d-496c-98a2-de584dc873bf", + "createTime": "2023-05-09T16:59:05.866Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "4af8ae27af952194885939a3e8014089bf7fc01e", + "message": "Add example_gcs_source to Examples in aiplatform v1beta1 explanation.proto", + "issues": [ + "4249" + ] + } + ], + "version": "2.13.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/aiplatform", + "id": "db8c7ed5-0699-4bc7-9448-b9e2ea64f910", + "createTime": "2023-05-09T16:59:05.862Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "76b2df71b44de5f1764749f8393f2a2cee68221e", + "message": "[generativelanguage] Add safety settings", + "issues": [ + "4248" + ] + } + ], + "version": "0.2.0", + "language": "JAVASCRIPT", + "artifactName": "@google-ai/generativelanguage", + "id": "f09f4780-ec17-4142-9d3d-bfd70bec5b9a", + "createTime": "2023-05-06T06:13:26.255Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "b0fee2bb364c671cb70b62a81567cf3544587eed", + "message": "[container] add a new feature for fleet registration via cluster update in v1alpha1, v1beta1, v1", + "issues": [ + "4244" + ] + } + ], + "version": "4.11.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/container", + "id": "50149eea-efcb-4a21-bf23-31017f630fcf", + "createTime": "2023-05-06T06:13:26.251Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "869218ffb438d90c3d6cb5e4566d7ad2d201020e", + "message": "[container] support fleet registration via cluster update", + "issues": [ + "4235" + ] + } + ], + "version": "4.10.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/container", + "id": "cf2e1f61-c0e0-4cbf-a2be-bfc9bc26a072", + "createTime": "2023-05-04T19:02:19.519Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "2421e933f19af7edd6d250a5e30f75b832029cd2", + "message": "[tpu] restrict the visibility of an API", + "issues": [ + "4234" + ] + } + ], + "version": "2.6.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/tpu", + "id": "c92dcbc7-78be-4a55-a464-6dc166121a28", + "createTime": "2023-05-04T19:02:19.515Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "d8520421c0d4c306d8a0d2cf8bf94186d6a27a6b", + "message": "Fix sample links in README", + "issues": [ + "4236" + ], + "scope": "docs" + } + ], + "version": "0.1.1", + "language": "JAVASCRIPT", + "artifactName": "@google-ai/generativelanguage", + "id": "b92dca26-b078-416d-90f9-e2b524246061", + "createTime": "2023-05-04T18:01:19.725Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "cfaa0530fdb35bdbcd52a04b4b9fb30946572449", + "message": "[talent] change timeout settings for SearchJobsForAlert", + "issues": [ + "4227" + ] + } + ], + "version": "5.1.3", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/talent", + "id": "8c707900-dd74-492e-b6db-81ad442ef6e4", + "createTime": "2023-05-04T06:19:34.845Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "b1b4e29f09759a8161c4e26473333ec729fa5165", + "message": "[run] Adds support for Startup CPU Boost (GA)", + "issues": [ + "4220" + ] + } + ], + "version": "0.5.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/run", + "id": "10a34898-3bee-46d2-b1b0-764b4b469dba", + "createTime": "2023-05-04T06:19:34.842Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "454fa7943ddf664bc54a67e654d7e8a39ea55fed", + "message": "[discoveryengine] add document purge API", + "issues": [ + "4219" + ] + } + ], + "version": "0.6.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/discoveryengine", + "id": "2d5225d6-5b5f-489a-a9eb-7d40d6c1c904", + "createTime": "2023-05-04T06:19:34.838Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "840390b4fdad779617572db6ce54922cb894e667", + "message": "[deploy] added support for DeployArtifacts", + "issues": [ + "4222" + ] + } + ], + "version": "2.5.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/deploy", + "id": "d1ef1774-76ab-485b-995e-c4d8e9364926", + "createTime": "2023-05-04T06:19:34.834Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "5268d24478595c01fe04215f50ece5558cfcdc46", + "message": "[dataplex] added new Dataplex APIs and new features for existing APIs (e.g. DataScans)", + "issues": [ + "4230" + ] + } + ], + "version": "2.4.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/dataplex", + "id": "5791d5d5-e1ec-41e8-8f48-e50d47d56142", + "createTime": "2023-05-04T06:19:34.829Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "5367d25cdaa4e935e5c1e345622bf4cbd7131e1a", + "message": "Add model_garden_service.proto and publisher_model.proto to BUILD.bazel", + "issues": [ + "4225" + ] + } + ], + "version": "2.12.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/aiplatform", + "id": "745eabb6-4f17-4e93-b9e9-6d171ef21a52", + "createTime": "2023-05-04T06:19:34.822Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "8db807ae80a695bb1ad4fa290bc9a50ce29a8365", + "message": "Add initial files for google.ai.generativelanguage.v1beta2", + "issues": [ + "4224" + ] + } + ], + "version": "0.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-ai/generativelanguage", + "id": "c5999974-f512-4db6-a7f8-01b5606c6c66", + "createTime": "2023-05-02T17:44:53.222Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "dc2e138872f7fd7dab8c3e626452b15e20459bd4", + "message": "[orchestration] add airflow_byoid_uri field to Cloud Composer API", + "issues": [ + "4210" + ] + } + ], + "version": "2.4.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/orchestration-airflow", + "id": "c5609628-1d40-4e8b-a0af-aaed81554d47", + "createTime": "2023-05-02T17:44:53.219Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "f12c277d7f7566ead6128076c1c9ba81a856256a", + "message": "[contactcenterinsights] support for generating summaries during conversation analysis", + "issues": [ + "4215" + ] + } + ], + "version": "2.7.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/contact-center-insights", + "id": "6b2edf35-e6e6-4218-b2b2-18454547ccf3", + "createTime": "2023-05-02T17:44:53.216Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "20eafa1b79ca8f255400d4eb00fb6d398d3a3980", + "message": "Add NVIDIA_L4 to AcceleratorType", + "issues": [] + }, + { + "type": "feat", + "sha": "20eafa1b79ca8f255400d4eb00fb6d398d3a3980", + "message": "Add experiment and experiment_run to CustomJobSpec", + "issues": [] + }, + { + "type": "feat", + "sha": "20eafa1b79ca8f255400d4eb00fb6d398d3a3980", + "message": "Add MutateDeployedModel RPC to endpoint_service", + "issues": [] + }, + { + "type": "feat", + "sha": "20eafa1b79ca8f255400d4eb00fb6d398d3a3980", + "message": "Add offline_storage_ttl_days to EntityType", + "issues": [] + }, + { + "type": "feat", + "sha": "20eafa1b79ca8f255400d4eb00fb6d398d3a3980", + "message": "Add online_storage_ttl_days to FeatureStore", + "issues": [] + }, + { + "type": "feat", + "sha": "20eafa1b79ca8f255400d4eb00fb6d398d3a3980", + "message": "Add GENIE to ModelSourceType", + "issues": [] + }, + { + "type": "feat", + "sha": "20eafa1b79ca8f255400d4eb00fb6d398d3a3980", + "message": "Add NVIDIA_L4 to AcceleratorType", + "issues": [ + "4216" + ] + } + ], + "version": "2.11.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/aiplatform", + "id": "e27f05ff-d7ca-44ad-8305-915152e7b44b", + "createTime": "2023-05-02T17:44:53.213Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "14d2cc9ccf3b974bce2fc3ab9ff96ec8bdf166bd", + "message": "[servicecontrol] add a proto message used for batch mode resource info for ServiceController V2", + "issues": [ + "4213" + ] + } + ], + "version": "2.2.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/service-control", + "id": "82dd6f93-6e7c-4847-8b4a-c088a38cc699", + "createTime": "2023-05-02T17:44:53.210Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "5af79e1a4ed1742009bc48e2ee61933b28e45d9e", + "message": "[analytics-admin] add `FetchConnectedGa4Property` method to the Admin API v1alpha", + "issues": [ + "4207" + ] + } + ], + "version": "4.8.0", + "language": "JAVASCRIPT", + "artifactName": "@google-analytics/admin", + "id": "78487200-6041-4743-8dbf-9a47c9c48a88", + "createTime": "2023-05-02T17:44:53.207Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "a2e0b9ed07f58228386f8ebcf5c16fa7ac589cc3", + "message": "Add initial files for google.cloud.confidentialcomputing.v1alpha1", + "issues": [ + "4193" + ] + } + ], + "version": "0.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/confidentialcomputing", + "id": "ccdebfe5-a220-428a-838a-53530fdb2c88", + "createTime": "2023-04-24T18:38:43.643Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "d9cf3bd09e06f53bfe650619df5c039a2b918af9", + "message": "[grafeas] add enum for grafeas v1 cvss to support both cvss v2 and v3", + "issues": [ + "4167" + ] + } + ], + "version": "4.5.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/grafeas", + "id": "762340ef-29bc-4f99-8e9b-ae564255a44d", + "createTime": "2023-04-24T18:38:43.639Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "e1841e71f1be28ec607fa6f00c6f624909bd7981", + "message": "[containeranalysis] scope GeneratePackagesSummary method to v1beta1 http path", + "issues": [ + "4196" + ] + }, + { + "type": "feat", + "sha": "090493643ae86992c44e31963e1ba774d97b79d4", + "message": "[containeranalysis] add enum for grafeas v1 cvss to support both cvss v2 and v3", + "issues": [ + "4163" + ] + } + ], + "version": "4.7.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/containeranalysis", + "id": "470e70ad-0d83-411e-937e-4b6a39234bf6", + "createTime": "2023-04-24T18:38:43.635Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "01fa5eb8e96fd8c8c0dd689b5da1ab57c4b66c98", + "message": "[cloudbuild] Add PeeredNetworkIpRange to NetworkConfigs message", + "issues": [ + "4181" + ] + } + ], + "version": "3.6.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/cloudbuild", + "id": "a77b867d-3f45-42db-a3de-fc0d7c42c959", + "createTime": "2023-04-24T18:38:43.632Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "2beee255de109032828ffd5f9f8fb9d62574787b", + "message": "[container] Add support for updating additional pod IPv4 ranges for Standard and Autopilot clusters", + "issues": [ + "4177" + ] + } + ], + "version": "4.9.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/container", + "id": "1f994633-3f46-4447-be8d-14752d911f7f", + "createTime": "2023-04-24T18:38:43.630Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "595ab2845ac8a70fc2e94d7f69029396cb6414f0", + "message": "[tpu] make reservation_name parameter generally visible in QueuedResource message", + "issues": [ + "4178" + ] + } + ], + "version": "2.6.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/tpu", + "id": "97ecd9d0-7f92-4d85-89c4-8c6131f60465", + "createTime": "2023-04-24T18:38:43.627Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "3e1c4678dc20281eeaf30bf8cf64368e9110f307", + "message": "[securitycenter] add cloud_dlp_inspection and cloud_dlp_data_profile fields to finding's list of attributes", + "issues": [ + "4198" + ] + } + ], + "version": "7.4.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/security-center", + "id": "89d6684b-3475-4ea2-accc-6572e8d0b425", + "createTime": "2023-04-24T18:38:43.624Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "ad27ba7ef7f23e90fdd8870f9b6b24fa25970f5d", + "message": "[retail] fix the HTTP format for merchant center link service", + "issues": [ + "4183" + ] + } + ], + "version": "2.4.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/retail", + "id": "5ac971ce-a7e0-4294-916d-bd5c8cd97e18", + "createTime": "2023-04-24T18:38:43.621Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "a742949ff07268521d8901508b83413f6030fc33", + "message": "[resourcemanager] add TagHolds, GetNamespacedTagKey, and GetNamespacedTagValue APIs. Adds support for project parented tags", + "issues": [ + "4191" + ] + } + ], + "version": "4.3.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/resource-manager", + "id": "d584004b-8927-44f2-834a-f2fd8d15b917", + "createTime": "2023-04-24T18:38:43.615Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "ff093a9ab1b79c1863e25ffa71e1fdcbf32faa2d", + "message": "[metastore] added ScalingConfig (v1)", + "issues": [ + "4176" + ] + } + ], + "version": "3.5.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/dataproc-metastore", + "id": "a2fa125c-5302-428a-9bc5-b5c960c73375", + "createTime": "2023-04-24T18:38:43.612Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "32e9389cdd555738855cc226a7c88a6f883a8da9", + "message": "[gkehub] add `monitoring_config` field", + "issues": [ + "4197" + ] + }, + { + "type": "feat", + "sha": "86f1174537a80f807bdaf405e7af301a08ce40ce", + "message": "[gkehub] add `monitoring_config` field", + "issues": [ + "4194" + ] + } + ], + "version": "3.4.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/gke-hub", + "id": "9ab74b2d-4531-49ae-8ce4-384b1332c3a7", + "createTime": "2023-04-24T18:38:43.610Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "de00e1d88877dd674dfd20b78a3de4476d65eb29", + "message": "[discoveryengine] add search, autocomplete and schema services", + "issues": [ + "4201" + ] + } + ], + "version": "0.5.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/discoveryengine", + "id": "bdac8712-5230-4ebb-81c7-9fae350fc14c", + "createTime": "2023-04-24T18:38:43.606Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "c50526dc1b23a0318adc8fde9a4a88af0725b030", + "message": "[dataproc] update go_package to v2 in google.cloud.dataproc.v1", + "issues": [ + "4184" + ] + } + ], + "version": "4.5.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/dataproc", + "id": "3d1de55d-def1-49e4-87be-8caa1dd51d89", + "createTime": "2023-04-24T18:38:43.602Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "3c46888d8b5b7568eaeac913fed55829a63f58df", + "message": "Add is_default to Tensorboard in aiplatform v1 tensorboard.proto and v1beta1 tensorboard.proto", + "issues": [ + "4179" + ] + } + ], + "version": "2.10.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/aiplatform", + "id": "b48f31b3-426a-4ddf-b757-b39ad40bff9b", + "createTime": "2023-04-24T18:38:43.597Z" + }, { "changes": [ { @@ -8724,5 +9685,5 @@ "createTime": "2023-01-28T04:18:24.718Z" } ], - "updateTime": "2023-04-13T14:05:54.623Z" + "updateTime": "2023-05-20T02:26:24.513Z" } \ No newline at end of file diff --git a/ci/Dockerfile b/ci/Dockerfile index db8936fd9e5..42d47f3c198 100644 --- a/ci/Dockerfile +++ b/ci/Dockerfile @@ -31,16 +31,19 @@ RUN curl https://github.com/googleapis/repo-automation-bots/releases/download/fl -o /bin/flakybot -s -L \ && chmod +x /bin/flakybot -FROM node:${NODE_VERSION}-alpine +ENV PNPM_VERSION=7.32.2 +RUN curl https://get.pnpm.io/install.sh | ENV="$HOME/.shrc" SHELL="$(which sh)" sh - -COPY --from=build /bin/flakybot /bin/flakybot +FROM node:${NODE_VERSION}-alpine # Hack for not found error with flakybot RUN mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2 COPY --from=build /usr/local/gcloud /usr/local/gcloud COPY --from=build /bin/flakybot /bin/flakybot +COPY --from=build /root/.local/share/pnpm /root/.local/share/pnpm RUN apk add --no-cache git bash python3 -ENV PATH $PATH:/usr/local/gcloud/google-cloud-sdk/bin +ENV PNPM_HOME=/root/.local/share/pnpm +ENV PATH=$PNPM_HOME:$PATH diff --git a/ci/cloudbuild.yaml b/ci/cloudbuild.yaml index e1a17e880ad..e8e770e8fa0 100644 --- a/ci/cloudbuild.yaml +++ b/ci/cloudbuild.yaml @@ -24,7 +24,7 @@ logsBucket: 'gs://${_LOGS_BUCKET}/logs/google-cloud-node/${_BUILD_TYPE}/${COMMIT timeout: 32400s steps: - - name: 'gcr.io/kaniko-project/executor:v1.9.1' + - name: 'gcr.io/kaniko-project/executor:v1.9.2' args: [ '--log-format=text', '--context=dir:///workspace/testing', @@ -35,6 +35,11 @@ steps: '--push-retry=3', '--image-fs-extract-retry=3' ] + - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk' + entrypoint: "bash" + args: ["ci/deletecloudbuild.sh"] + env: + - 'REF_NAME=${REF_NAME}' - name: gcr.io/${PROJECT_ID}/google-cloud-node-${_NODE_VERSION} id: "run-tests" timeout: 32400s diff --git a/ci/deletecloudbuild.sh b/ci/deletecloudbuild.sh new file mode 100644 index 00000000000..506006bcfa1 --- /dev/null +++ b/ci/deletecloudbuild.sh @@ -0,0 +1,19 @@ +# Copyright 2023 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. + +now=$(date -u -d "-15 min" +"%Y-%m-%dT%H:%M:%SZ") +gcloud builds list --format="value(id)" --filter="substitutions.REF_NAME="$REF_NAME" AND status="WORKING" AND create_time<"$now"" | while IFS= read -r line ; do + echo "gcloud builds cancel "$line"" + gcloud builds cancel "$line" +done diff --git a/ci/export/unit-presubmit-node12.yaml b/ci/export/unit-presubmit-node12.yaml deleted file mode 100644 index 9dec09cda35..00000000000 --- a/ci/export/unit-presubmit-node12.yaml +++ /dev/null @@ -1,19 +0,0 @@ -createTime: '2023-03-22T22:44:59.896784337Z' -description: Presubmit unit with node 12 -filename: ci/cloudbuild.yaml -github: - name: google-cloud-node - owner: googleapis - pullRequest: - branch: ^main$ - commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 2a30298b-f453-459f-9f90-415527d051f2 -includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: unit-presubmit-node12 -resourceName: projects/long-door-651/locations/global/triggers/2a30298b-f453-459f-9f90-415527d051f2 -serviceAccount: projects/long-door-651/serviceAccounts/kokoro-system-test@long-door-651.iam.gserviceaccount.com -substitutions: - _BUILD_TYPE: presubmit - _LOGS_BUCKET: cloud-node-public-logs - _NODE_VERSION: '12' - _TEST_TYPE: units diff --git a/ci/export/unit-presubmit-node16.yaml b/ci/export/unit-presubmit-node16.yaml deleted file mode 100644 index c28d0e5abb2..00000000000 --- a/ci/export/unit-presubmit-node16.yaml +++ /dev/null @@ -1,19 +0,0 @@ -createTime: '2022-12-22T21:34:53.835122725Z' -description: Presubmit unit with node 16 -filename: ci/cloudbuild.yaml -github: - name: google-cloud-node - owner: googleapis - pullRequest: - branch: ^main$ - commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 182e003f-4636-4cc4-beda-811e6ad960f1 -includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: unit-presubmit-node16 -resourceName: projects/long-door-651/locations/global/triggers/182e003f-4636-4cc4-beda-811e6ad960f1 -serviceAccount: projects/-/serviceAccounts/kokoro-system-test@long-door-651.iam.gserviceaccount.com -substitutions: - _BUILD_TYPE: presubmit - _LOGS_BUCKET: cloud-node-public-logs - _NODE_VERSION: '16' - _TEST_TYPE: units diff --git a/ci/export/unit-presubmit-node18.yaml b/ci/export/unit-presubmit-node18.yaml deleted file mode 100644 index a142d67de52..00000000000 --- a/ci/export/unit-presubmit-node18.yaml +++ /dev/null @@ -1,19 +0,0 @@ -createTime: '2022-12-22T21:33:14.641417894Z' -description: Presubmit unit with node 18 -filename: ci/cloudbuild.yaml -github: - name: google-cloud-node - owner: googleapis - pullRequest: - branch: ^main$ - commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 492f377a-73d6-4b52-9269-1a3e3dbb6721 -includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: unit-presubmit-node18 -resourceName: projects/long-door-651/locations/global/triggers/492f377a-73d6-4b52-9269-1a3e3dbb6721 -serviceAccount: projects/long-door-651/serviceAccounts/kokoro-system-test@long-door-651.iam.gserviceaccount.com -substitutions: - _BUILD_TYPE: presubmit - _LOGS_BUCKET: cloud-node-public-logs - _NODE_VERSION: '18' - _TEST_TYPE: units diff --git a/ci/export_triggers.sh b/ci/export_triggers.sh index 44debcff8ef..8919c72b93e 100755 --- a/ci/export_triggers.sh +++ b/ci/export_triggers.sh @@ -46,12 +46,4 @@ for NODE_VERSION in ${NODE_VERSIONS[@]}; do gcloud beta builds triggers export "samples-nightly-node${NODE_VERSION}" --destination "ci/export/samples-nightly-node${NODE_VERSION}.yaml" echo "exporting presubmit build for node${NODE_VERSION} with credentials" gcloud beta builds triggers export "samples-presubmit-node${NODE_VERSION}-with-credentials" --destination "ci/export/samples-presubmit-node${NODE_VERSION}-with-credentials.yaml" -done - -# Since we don't want to run nightly, presubmit, and continuous for node 16 and node 18, adding these outside of the loop -echo "exporting presubmit unit build for node12 unit tests" -gcloud beta builds triggers export "unit-presubmit-node12" --destination "ci/export/unit-presubmit-node12.yaml" -echo "exporting presubmit unit build for node16 unit tests" -gcloud beta builds triggers export "unit-presubmit-node16" --destination "ci/export/unit-presubmit-node16.yaml" -echo "exporting presubmit unit build for node18 unit tests" -gcloud beta builds triggers export "unit-presubmit-node18" --destination "ci/export/unit-presubmit-node18.yaml" \ No newline at end of file +done \ No newline at end of file diff --git a/ci/import_triggers.sh b/ci/import_triggers.sh index 4021c57f1d0..a7c8c1e66fc 100755 --- a/ci/import_triggers.sh +++ b/ci/import_triggers.sh @@ -46,12 +46,4 @@ for NODE_VERSION in ${NODE_VERSIONS[@]}; do gcloud beta builds triggers import --source "ci/export/samples-nightly-node${NODE_VERSION}.yaml" echo "importing presubmit build for node${NODE_VERSION} with credentials" gcloud beta builds triggers import --source "ci/export/samples-presubmit-node${NODE_VERSION}-with-credentials.yaml" -done - -# Since we don't want to run nightly, and continuous for node 16 and node 18, adding these outside of the loop -echo "importing presubmit unit build for node12 unit tests" -gcloud beta builds triggers import --source "ci/export/unit-presubmit-node12.yaml" -echo "importing presubmit unit build for node16 unit tests" -gcloud beta builds triggers import --source "ci/export/unit-presubmit-node16.yaml" -echo "importing presubmit unit build for node18 unit tests" -gcloud beta builds triggers import --source "ci/export/unit-presubmit-node18.yaml" \ No newline at end of file +done \ No newline at end of file diff --git a/ci/run_conditional_tests.sh b/ci/run_conditional_tests.sh index 421a3c9033b..9c558651025 100755 --- a/ci/run_conditional_tests.sh +++ b/ci/run_conditional_tests.sh @@ -84,7 +84,7 @@ for subdir in ${subdirs[@]}; do if [[ "${changed}" -eq 0 ]]; then echo "no change detected in ${d}, skipping" else - if [[ "${TEST_TYPE}" == "system" ]]; then + if [[ "${TEST_TYPE}" == "system" ]] || [[ "${TEST_TYPE}" == "lint" ]] || [[ "${TEST_TYPE}" == "units" ]]; then echo "change detected in ${d} for system test" should_test=true elif [[ "${tests_with_credentials[*]}" =~ "${d}" ]] && [[ -n "${GOOGLE_APPLICATION_CREDENTIALS}" ]]; then @@ -97,7 +97,7 @@ for subdir in ${subdirs[@]}; do fi else # If GIT_DIFF_ARG is empty, run all the tests. - if [[ "${TEST_TYPE}" == "system" ]]; then + if [[ "${TEST_TYPE}" == "system" ]] || [[ "${TEST_TYPE}" == "lint" ]] || [[ "${TEST_TYPE}" == "units" ]]; then echo "run system test for ${d}" should_test=true elif [[ "${tests_with_credentials[*]}" =~ "${d}" ]] && [[ -n "${GOOGLE_APPLICATION_CREDENTIALS}" ]]; then @@ -118,6 +118,8 @@ for subdir in ${subdirs[@]}; do set -e if [ ${ret} -ne 0 ]; then RETVAL=${ret} + # Since there are so many APIs, we should exit early if there's an error + break fi popd fi diff --git a/ci/run_single_test.sh b/ci/run_single_test.sh index 2c7fee058d3..5e8821ef9da 100755 --- a/ci/run_single_test.sh +++ b/ci/run_single_test.sh @@ -22,7 +22,7 @@ export PROJECT_ROOT=$(realpath $(dirname "${BASH_SOURCE[0]}")/..) tests_without_node12="typeless-sample-bot gapic-node-templating node-bootstrap-container" if [ -z "${BUILD_TYPE}" ]; then - echo "missing $BUILD_TYPE env var" + echo "missing BUILD_TYPE env var" exit 1 fi @@ -41,14 +41,14 @@ if [ ${BUILD_TYPE} != "presubmit" ]; then fi # Install dependencies -if [[ "${tests_without_node12[*]}" =~ "${PROJECT}" ]] && [[ ${NODE_VERSION} == "12.22.12" ]]; then +if [[ "${tests_without_node12[*]}" =~ "${PROJECT}" ]] && [[ ${NODE_VERSION} == "12.22.12" ]] && [[ ${TEST_TYPE} != "lint" ]]; then echo "not running tests for Node 12" elif [[ ${NODE_VERSION} == "12.22.12" ]]; then echo "npm install --unsafe-perm --ignore-scripts --engine-strict --only=prod; npm install --unsafe-perm" npm install --unsafe-perm --ignore-scripts --engine-strict --only=prod; npm install --unsafe-perm else - echo "npm install --ignore-scripts --engine-strict --omit=dev; npm install" - npm install --ignore-scripts --engine-strict --omit=dev; npm install + echo "pnpm install --ignore-scripts --engine-strict --prod; pnpm install" + pnpm install --ignore-scripts --engine-strict --prod; pnpm install fi retval=0 @@ -56,21 +56,22 @@ retval=0 set +e case ${TEST_TYPE} in lint) - npm run lint + pnpm prelint + pnpm lint retval=$? ;; samples) - npm run samples-test + pnpm samples-test retval=$? ;; system) - npm run system-test + pnpm system-test retval=$? ;; units) # Skipping Node 12 tests for projects outside of gapic autogenerated libraries that don't need to run on Node 12 if ! [[ "${tests_without_node12[*]}" =~ "${PROJECT}" ]] || [[ ${NODE_VERSION} != "12.22.12" ]]; then - npm test + pnpm test retval=$? fi ;; diff --git a/containers/node-bootstrap-container/package.json b/containers/node-bootstrap-container/package.json index e33c4ee3740..6f38db41807 100644 --- a/containers/node-bootstrap-container/package.json +++ b/containers/node-bootstrap-container/package.json @@ -20,7 +20,7 @@ }, "homepage": "https://github.com/googleapis/google-cloud-node#readme", "dependencies": { - "@octokit/rest": "^19.0.0" + "@octokit/rest": "19.0.0" }, "devDependencies": { "mocha": "^9.0.0", diff --git a/libraries.json b/libraries.json index 1da0f963949..5e18d7b29d3 100644 --- a/libraries.json +++ b/libraries.json @@ -524,7 +524,7 @@ "repo": "googleapis/nodejs-datastore", "distribution_name": "@google-cloud/datastore", "api_id": "datastore.googleapis.com", - "codeowner_team": "@googleapis/cloud-native-db-dpes", + "codeowner_team": "@googleapis/cloud-native-db-dpes @googleapis/api-datastore-sdk", "api_shortname": "datastore", "library_type": "GAPIC_COMBO", "linkToRepoHomepage": "https://github.com/googleapis/nodejs-datastore", @@ -2432,6 +2432,24 @@ "linkToRepoHomepage": "https://github.com/googleapis/nodejs-bigquery-migration", "support_documentation": "https://cloud.google.com/bigquery/docs/getting-support" }, + { + "name": "confidentialcomputing", + "name_pretty": "Confidential Computing API", + "product_documentation": "https://cloud.google.com/confidential-computing", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/confidentialcomputing/latest", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", + "release_level": "preview", + "language": "nodejs", + "repo": "googleapis/google-cloud-node", + "distribution_name": "@google-cloud/confidentialcomputing", + "api_id": "confidentialcomputing.googleapis.com", + "default_version": "v1alpha1", + "requires_billing": true, + "library_type": "GAPIC_AUTO", + "api_shortname": "confidentialcomputing", + "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-confidentialcomputing", + "support_documentation": "https://cloud.google.com/confidential-computing/docs/getting-support" + }, { "default_version": "v1beta1", "release_level": "preview", @@ -2540,6 +2558,24 @@ "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-discoveryengine", "support_documentation": "https://cloud.google.com/discovery-engine/docs/getting-support" }, + { + "name": "generativelanguage", + "name_pretty": "Generative Language API", + "product_documentation": "https://developers.generativeai.google/", + "client_documentation": "https://developers.generativeai.google/guide/palm_api_overview#node.js", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", + "release_level": "preview", + "language": "nodejs", + "repo": "googleapis/google-cloud-node", + "distribution_name": "@google-ai/generativelanguage", + "api_id": "generativelanguage.googleapis.com", + "default_version": "v1beta2", + "requires_billing": true, + "library_type": "GAPIC_AUTO", + "api_shortname": "generativelanguage", + "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-ai-generativelanguage", + "support_documentation": "https://developers.generativeai.google/docs/getting-support" + }, { "name": "connectgateway", "name_pretty": "GKE Connect Gateway", @@ -2738,6 +2774,24 @@ "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-security-publicca", "support_documentation": "https://cloud.google.com/certificate-manager/docs/getting-support" }, + { + "name": "storageinsights", + "name_pretty": "Storage Insights API", + "product_documentation": "https://cloud.google.com/storage/docs/insights/storage-insights", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/storageinsights/latest", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", + "release_level": "preview", + "language": "nodejs", + "repo": "googleapis/google-cloud-node", + "distribution_name": "@google-cloud/storageinsights", + "api_id": "storageinsights.googleapis.com", + "default_version": "v1", + "requires_billing": true, + "library_type": "GAPIC_AUTO", + "api_shortname": "storageinsights", + "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-storageinsights", + "support_documentation": "https://cloud.google.com/storage/docs/getting-support" + }, { "name": "trace", "name_pretty": "Trace", diff --git a/packages/gapic-node-templating/package.json b/packages/gapic-node-templating/package.json index f6eb7f9504e..c53e4c26094 100644 --- a/packages/gapic-node-templating/package.json +++ b/packages/gapic-node-templating/package.json @@ -20,7 +20,6 @@ "author": "Google LLC", "license": "Apache-2.0", "devDependencies": { - "@octokit/rest": "^19.0.0", "@types/js-yaml": "^4.0.5", "@types/mocha": "^9.1.1", "@types/node": "^18.0.0", @@ -40,10 +39,9 @@ }, "dependencies": { "@google-cloud/storage": "^6.1.0", - "@octokit/rest": "^19.0.0", + "@octokit/rest": "19.0.0", "js-yaml": "^4.1.0", "nunjucks": "^3.2.3", "yargs": "^17.5.1" } } - diff --git a/packages/gapic-node-templating/templates/bootstrap-templates/package.json b/packages/gapic-node-templating/templates/bootstrap-templates/package.json index 66731f46535..8f6e2a6d97d 100644 --- a/packages/gapic-node-templating/templates/bootstrap-templates/package.json +++ b/packages/gapic-node-templating/templates/bootstrap-templates/package.json @@ -37,10 +37,11 @@ "docs-test": "linkinator docs", "fix": "gts fix", "lint": "gts check", + "postpack": "minifyProtoJson", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", + "system-test": "c8 mocha build/system-test", "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", "prelint": "cd samples; npm link ../; npm i" }, "dependencies": { @@ -55,6 +56,7 @@ "jsdoc": "^4.0.0", "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", + "long": "^5.2.3", "linkinator": "^4.0.0", "mocha": "^9.2.2", "null-loader": "^4.0.1", diff --git a/packages/google-ai-generativelanguage/.OwlBot.yaml b/packages/google-ai-generativelanguage/.OwlBot.yaml new file mode 100644 index 00000000000..b545c3339d9 --- /dev/null +++ b/packages/google-ai-generativelanguage/.OwlBot.yaml @@ -0,0 +1,19 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# 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. + +deep-copy-regex: + - source: /google/ai/generativelanguage/(.*)/.*-nodejs + dest: /owl-bot-staging/google-ai-generativelanguage/$1 + +api-name: generativelanguage \ No newline at end of file diff --git a/packages/google-ai-generativelanguage/.eslintignore b/packages/google-ai-generativelanguage/.eslintignore new file mode 100644 index 00000000000..ea5b04aebe6 --- /dev/null +++ b/packages/google-ai-generativelanguage/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ +samples/generated/ diff --git a/packages/google-ai-generativelanguage/.eslintrc.json b/packages/google-ai-generativelanguage/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/packages/google-ai-generativelanguage/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-ai-generativelanguage/.gitattributes b/packages/google-ai-generativelanguage/.gitattributes new file mode 100644 index 00000000000..33739cb74e4 --- /dev/null +++ b/packages/google-ai-generativelanguage/.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-ai-generativelanguage/.gitignore b/packages/google-ai-generativelanguage/.gitignore new file mode 100644 index 00000000000..d4f03a0df2e --- /dev/null +++ b/packages/google-ai-generativelanguage/.gitignore @@ -0,0 +1,14 @@ +**/*.log +**/node_modules +/.coverage +/coverage +/.nyc_output +/docs/ +/out/ +/build/ +system-test/secrets.js +system-test/*key.json +*.lock +.DS_Store +package-lock.json +__pycache__ diff --git a/packages/google-ai-generativelanguage/.jsdoc.js b/packages/google-ai-generativelanguage/.jsdoc.js new file mode 100644 index 00000000000..6f27011f578 --- /dev/null +++ b/packages/google-ai-generativelanguage/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2023 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'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/jsdoc-fresh', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown', + 'jsdoc-region-tag' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'build/src', + 'protos' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2023 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-ai/generativelanguage', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/google-ai-generativelanguage/.mocharc.js b/packages/google-ai-generativelanguage/.mocharc.js new file mode 100644 index 00000000000..49e7e228701 --- /dev/null +++ b/packages/google-ai-generativelanguage/.mocharc.js @@ -0,0 +1,29 @@ +// Copyright 2023 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. +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000, + "recursive": true +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/packages/google-ai-generativelanguage/.nycrc b/packages/google-ai-generativelanguage/.nycrc new file mode 100644 index 00000000000..b18d5472b62 --- /dev/null +++ b/packages/google-ai-generativelanguage/.nycrc @@ -0,0 +1,24 @@ +{ + "report-dir": "./.coverage", + "reporter": ["text", "lcov"], + "exclude": [ + "**/*-test", + "**/.coverage", + "**/apis", + "**/benchmark", + "**/conformance", + "**/docs", + "**/samples", + "**/scripts", + "**/protos", + "**/test", + "**/*.d.ts", + ".jsdoc.js", + "**/.jsdoc.js", + "karma.conf.js", + "webpack-tests.config.js", + "webpack.config.js" + ], + "exclude-after-remap": false, + "all": true +} diff --git a/packages/google-ai-generativelanguage/.prettierignore b/packages/google-ai-generativelanguage/.prettierignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/packages/google-ai-generativelanguage/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-ai-generativelanguage/.prettierrc.js b/packages/google-ai-generativelanguage/.prettierrc.js new file mode 100644 index 00000000000..1e6cec783e4 --- /dev/null +++ b/packages/google-ai-generativelanguage/.prettierrc.js @@ -0,0 +1,17 @@ +// Copyright 2023 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. + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/packages/google-ai-generativelanguage/.repo-metadata.json b/packages/google-ai-generativelanguage/.repo-metadata.json new file mode 100644 index 00000000000..11be2c16256 --- /dev/null +++ b/packages/google-ai-generativelanguage/.repo-metadata.json @@ -0,0 +1,16 @@ +{ + "name": "generativelanguage", + "name_pretty": "Generative Language API", + "product_documentation": "https://developers.generativeai.google/", + "client_documentation": "https://developers.generativeai.google/guide/palm_api_overview#node.js", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", + "release_level": "preview", + "language": "nodejs", + "repo": "googleapis/google-cloud-node", + "distribution_name": "@google-ai/generativelanguage", + "api_id": "generativelanguage.googleapis.com", + "default_version": "v1beta2", + "requires_billing": true, + "library_type": "GAPIC_AUTO", + "api_shortname": "generativelanguage" +} diff --git a/packages/google-ai-generativelanguage/CHANGELOG.md b/packages/google-ai-generativelanguage/CHANGELOG.md new file mode 100644 index 00000000000..e99d90027e4 --- /dev/null +++ b/packages/google-ai-generativelanguage/CHANGELOG.md @@ -0,0 +1,22 @@ +# Changelog + +## [0.2.0](https://github.com/googleapis/google-cloud-node/compare/generativelanguage-v0.1.1...generativelanguage-v0.2.0) (2023-05-06) + + +### Features + +* [generativelanguage] Add safety settings ([#4248](https://github.com/googleapis/google-cloud-node/issues/4248)) ([76b2df7](https://github.com/googleapis/google-cloud-node/commit/76b2df71b44de5f1764749f8393f2a2cee68221e)) + +## [0.1.1](https://github.com/googleapis/google-cloud-node/compare/generativelanguage-v0.1.0...generativelanguage-v0.1.1) (2023-05-04) + + +### Bug Fixes + +* **docs:** Fix sample links in README ([#4236](https://github.com/googleapis/google-cloud-node/issues/4236)) ([d852042](https://github.com/googleapis/google-cloud-node/commit/d8520421c0d4c306d8a0d2cf8bf94186d6a27a6b)) + +## 0.1.0 (2023-05-02) + + +### Features + +* Add initial files for google.ai.generativelanguage.v1beta2 ([#4224](https://github.com/googleapis/google-cloud-node/issues/4224)) ([8db807a](https://github.com/googleapis/google-cloud-node/commit/8db807ae80a695bb1ad4fa290bc9a50ce29a8365)) diff --git a/packages/google-ai-generativelanguage/CODE_OF_CONDUCT.md b/packages/google-ai-generativelanguage/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..2add2547a81 --- /dev/null +++ b/packages/google-ai-generativelanguage/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-ai-generativelanguage/CONTRIBUTING.md b/packages/google-ai-generativelanguage/CONTRIBUTING.md new file mode 100644 index 00000000000..27a0461faf9 --- /dev/null +++ b/packages/google-ai-generativelanguage/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 Generative Language API 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=generativelanguage.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-ai-generativelanguage/LICENSE b/packages/google-ai-generativelanguage/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/packages/google-ai-generativelanguage/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-ai-generativelanguage/README.md b/packages/google-ai-generativelanguage/README.md new file mode 100644 index 00000000000..9ac01960c1d --- /dev/null +++ b/packages/google-ai-generativelanguage/README.md @@ -0,0 +1,231 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [Generative Language API: Node.js Client](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-ai-generativelanguage) + +[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![npm version](https://img.shields.io/npm/v/@google-ai/generativelanguage.svg)](https://www.npmjs.org/package/@google-ai/generativelanguage) + + + + +Generative Language API client for Node.js + + +A comprehensive list of changes in each version may be found in +[the CHANGELOG](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-ai-generativelanguage/CHANGELOG.md). + +* [Generative Language API Node.js Client API Reference][client-docs] +* [Generative Language API Documentation][product-docs] +* [github.com/googleapis/google-cloud-node/packages/google-ai-generativelanguage](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-ai-generativelanguage) + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + + +* [Quickstart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + * [Using the client library](#using-the-client-library) +* [Samples](#samples) +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Generative Language API API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + +### Installing the client library + +```bash +npm install @google-ai/generativelanguage +``` + + +### Using the client library + +```javascript +/** + * 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 model name to use with the format name=models/{model}. + */ +// const model = 'abc123' +/** + * Required. The free-form input text given to the model as a prompt. + * Given a prompt, the model will generate a TextCompletion response it + * predicts as the completion of the input text. + */ +// const prompt = { +// text: 'abc123' +// } +/** + * Controls the randomness of the output. + * Note: The default value varies by model, see the `Model.temperature` + * attribute of the `Model` returned the `getModel` function. + * Values can range from 0.0,1.0, + * inclusive. A value closer to 1.0 will produce responses that are more + * varied and creative, while a value closer to 0.0 will typically result in + * more straightforward responses from the model. + */ +// const temperature = 1234 +/** + * Number of generated responses to return. + * This value must be between 1, 8, inclusive. If unset, this will default + * to 1. + */ +// const candidateCount = 1234 +/** + * The maximum number of tokens to include in a candidate. + * If unset, this will default to 64. + */ +// const maxOutputTokens = 1234 +/** + * The maximum cumulative probability of tokens to consider when sampling. + * The model uses combined Top-k and nucleus sampling. + * Tokens are sorted based on their assigned probabilities so that only the + * most liekly tokens are considered. Top-k sampling directly limits the + * maximum number of tokens to consider, while Nucleus sampling limits number + * of tokens based on the cumulative probability. + * Note: The default value varies by model, see the `Model.top_p` + * attribute of the `Model` returned the `getModel` function. + */ +// const topP = 1234 +/** + * The maximum number of tokens to consider when sampling. + * The model uses combined Top-k and nucleus sampling. + * Top-k sampling considers the set of `top_k` most probable tokens. + * Defaults to 40. + * Note: The default value varies by model, see the `Model.top_k` + * attribute of the `Model` returned the `getModel` function. + */ +// const topK = 1234 +/** + * The set of character sequences (up to 5) that will stop output generation. + * If specified, the API will stop at the first appearance of a stop + * sequence. The stop sequence will not be included as part of the response. + */ +// const stopSequences = 'abc123' + +// Imports the Generativelanguage library +const {TextServiceClient} = require('@google-ai/generativelanguage').v1beta2; + +// Instantiates a client +const generativelanguageClient = new TextServiceClient(); + +async function callGenerateText() { + // Construct request + const request = { + model, + prompt, + }; + + // Run request + const response = await generativelanguageClient.generateText(request); + console.log(response); +} + +callGenerateText(); + +``` + + + +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-ai-generativelanguage/samples) directory. Each sample's `README.md` has instructions for running its sample. + +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Discuss_service.count_message_tokens | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ai-generativelanguage/samples/generated/v1beta2/discuss_service.count_message_tokens.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-ai-generativelanguage/samples/generated/v1beta2/discuss_service.count_message_tokens.js,packages/google-ai-generativelanguage/samples/README.md) | +| Discuss_service.generate_message | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ai-generativelanguage/samples/generated/v1beta2/discuss_service.generate_message.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-ai-generativelanguage/samples/generated/v1beta2/discuss_service.generate_message.js,packages/google-ai-generativelanguage/samples/README.md) | +| Model_service.get_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ai-generativelanguage/samples/generated/v1beta2/model_service.get_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-ai-generativelanguage/samples/generated/v1beta2/model_service.get_model.js,packages/google-ai-generativelanguage/samples/README.md) | +| Model_service.list_models | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ai-generativelanguage/samples/generated/v1beta2/model_service.list_models.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-ai-generativelanguage/samples/generated/v1beta2/model_service.list_models.js,packages/google-ai-generativelanguage/samples/README.md) | +| Text_service.embed_text | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ai-generativelanguage/samples/generated/v1beta2/text_service.embed_text.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-ai-generativelanguage/samples/generated/v1beta2/text_service.embed_text.js,packages/google-ai-generativelanguage/samples/README.md) | +| Text_service.generate_text | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ai-generativelanguage/samples/generated/v1beta2/text_service.generate_text.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-ai-generativelanguage/samples/generated/v1beta2/text_service.generate_text.js,packages/google-ai-generativelanguage/samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ai-generativelanguage/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-ai-generativelanguage/samples/quickstart.js,packages/google-ai-generativelanguage/samples/README.md) | + + + +The [Generative Language API Node.js Client API Reference][client-docs] documentation +also contains samples. + +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. +If you are using an end-of-life version of Node.js, we recommend that you update +as soon as possible to an actively supported LTS version. + +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: + +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. + +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. +For example, `npm install @google-ai/generativelanguage@legacy-8` installs client libraries +for versions compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + + + + + + + +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. + + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md). + +Please note that this `README.md`, the `samples/README.md`, +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. To edit one of these files, make an edit +to its templates in +[directory](https://github.com/googleapis/synthtool). + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) + +[client-docs]: https://developers.generativeai.google/guide/palm_api_overview#node.js +[product-docs]: https://developers.generativeai.google/ +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[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=generativelanguage.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started diff --git a/packages/google-ai-generativelanguage/linkinator.config.json b/packages/google-ai-generativelanguage/linkinator.config.json new file mode 100644 index 00000000000..befd23c8633 --- /dev/null +++ b/packages/google-ai-generativelanguage/linkinator.config.json @@ -0,0 +1,16 @@ +{ + "recurse": true, + "skip": [ + "https://codecov.io/gh/googleapis/", + "www.googleapis.com", + "img.shields.io", + "https://console.cloud.google.com/cloudshell", + "https://support.google.com" + ], + "silent": true, + "concurrency": 5, + "retry": true, + "retryErrors": true, + "retryErrorsCount": 5, + "retryErrorsJitter": 3000 +} diff --git a/packages/google-ai-generativelanguage/package.json b/packages/google-ai-generativelanguage/package.json new file mode 100644 index 00000000000..6a50ab8bbe3 --- /dev/null +++ b/packages/google-ai-generativelanguage/package.json @@ -0,0 +1,72 @@ +{ + "name": "@google-ai/generativelanguage", + "version": "0.2.0", + "description": "Generative Language API client for Node.js", + "repository": { + "type": "git", + "url": "https://github.com/googleapis/google-cloud-node.git", + "directory": "packages/google-ai-generativelanguage" + }, + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-ai-generativelanguage", + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google generativelanguage", + "generativelanguage", + "Generative Language API" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "npm run compile && c8 mocha build/system-test", + "test": "c8 mocha build/test", + "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", + "prelint": "cd samples; npm link ../; npm i" + }, + "dependencies": { + "google-gax": "^3.5.8" + }, + "devDependencies": { + "@types/mocha": "^9.0.0", + "@types/node": "^18.0.0", + "@types/sinon": "^10.0.0", + "c8": "^7.3.5", + "gts": "^3.1.0", + "jsdoc": "^4.0.0", + "jsdoc-fresh": "^2.0.0", + "jsdoc-region-tag": "^2.0.0", + "long": "^5.2.3", + "linkinator": "^4.0.0", + "mocha": "^9.2.2", + "null-loader": "^4.0.1", + "pack-n-play": "^1.0.0-2", + "sinon": "^15.0.0", + "ts-loader": "^9.0.0", + "typescript": "^4.6.4", + "webpack": "^5.9.0", + "webpack-cli": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } +} diff --git a/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta2/citation.proto b/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta2/citation.proto new file mode 100644 index 00000000000..8dc9e2c6644 --- /dev/null +++ b/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta2/citation.proto @@ -0,0 +1,51 @@ +// Copyright 2023 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.ai.generativelanguage.v1beta2; + +import "google/api/field_behavior.proto"; + +option go_package = "google.golang.org/genproto/googleapis/ai/generativelanguage/v1beta2;generativelanguage"; +option java_multiple_files = true; +option java_outer_classname = "CitationProto"; +option java_package = "com.google.ai.generativelanguage.v1beta2"; + +// A collection of source attributions for a piece of content. +message CitationMetadata { + // Citations to sources for a specific response. + repeated CitationSource citation_sources = 1; +} + +// A citation to a source for a portion of a specific response. +message CitationSource { + // Optional. Start of segment of the response that is attributed to this + // source. + // + // Index indicates the start of the segment, measured in bytes. + optional int32 start_index = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. End of the attributed segment, exclusive. + optional int32 end_index = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. URI that is attributed as a source for a portion of the text. + optional string uri = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. License for the GitHub project that is attributed as a source for + // segment. + // + // License info is required for code citations. + optional string license = 4 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta2/discuss_service.proto b/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta2/discuss_service.proto new file mode 100644 index 00000000000..f4d0d6915e7 --- /dev/null +++ b/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta2/discuss_service.proto @@ -0,0 +1,251 @@ +// Copyright 2023 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.ai.generativelanguage.v1beta2; + +import "google/ai/generativelanguage/v1beta2/citation.proto"; +import "google/ai/generativelanguage/v1beta2/safety.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option go_package = "google.golang.org/genproto/googleapis/ai/generativelanguage/v1beta2;generativelanguage"; +option java_multiple_files = true; +option java_outer_classname = "DiscussServiceProto"; +option java_package = "com.google.ai.generativelanguage.v1beta2"; + +// An API for using Generative Language Models (GLMs) in dialog applications. +// +// Also known as large language models (LLMs), this API provides models that +// are trained for multi-turn dialog. +service DiscussService { + option (google.api.default_host) = "generativelanguage.googleapis.com"; + + // Generates a response from the model given an input `MessagePrompt`. + rpc GenerateMessage(GenerateMessageRequest) + returns (GenerateMessageResponse) { + option (google.api.http) = { + post: "/v1beta2/{model=models/*}:generateMessage" + body: "*" + }; + option (google.api.method_signature) = + "model,prompt,temperature,candidate_count,top_p,top_k"; + } + + // Runs a model's tokenizer on a string and returns the token count. + rpc CountMessageTokens(CountMessageTokensRequest) + returns (CountMessageTokensResponse) { + option (google.api.http) = { + post: "/v1beta2/{model=models/*}:countMessageTokens" + body: "*" + }; + option (google.api.method_signature) = "model,prompt"; + } +} + +// Request to generate a message response from the model. +message GenerateMessageRequest { + // Required. The name of the model to use. + // + // Format: `name=models/{model}`. + string model = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "generativelanguage.googleapis.com/Model" + } + ]; + + // Required. The structured textual input given to the model as a prompt. + // + // Given a + // prompt, the model will return what it predicts is the next message in the + // discussion. + MessagePrompt prompt = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Controls the randomness of the output. + // + // Values can range over `[0.0,1.0]`, + // inclusive. A value closer to `1.0` will produce responses that are more + // varied, while a value closer to `0.0` will typically result in + // less surprising responses from the model. + optional float temperature = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of generated response messages to return. + // + // This value must be between + // `[1, 8]`, inclusive. If unset, this will default to `1`. + optional int32 candidate_count = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum cumulative probability of tokens to consider when + // sampling. + // + // The model uses combined Top-k and nucleus sampling. + // + // Nucleus sampling considers the smallest set of tokens whose probability + // sum is at least `top_p`. + optional float top_p = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of tokens to consider when sampling. + // + // The model uses combined Top-k and nucleus sampling. + // + // Top-k sampling considers the set of `top_k` most probable tokens. + optional int32 top_k = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response from the model. +// +// This includes candidate messages and +// conversation history in the form of chronologically-ordered messages. +message GenerateMessageResponse { + // Candidate response messages from the model. + repeated Message candidates = 1; + + // The conversation history used by the model. + repeated Message messages = 2; + + // A set of content filtering metadata for the prompt and response + // text. + // + // This indicates which `SafetyCategory`(s) blocked a + // candidate from this response, the lowest `HarmProbability` + // that triggered a block, and the HarmThreshold setting for that category. + // This indicates the smallest change to the `SafetySettings` that would be + // necessary to unblock at least 1 response. + // + // The blocking is configured by the `SafetySettings` in the request (or the + // default `SafetySettings` of the API). + repeated ContentFilter filters = 3; +} + +// The base unit of structured text. +// +// A `Message` includes an `author` and the `content` of +// the `Message`. +// +// The `author` is used to tag messages when they are fed to the +// model as text. +message Message { + // Optional. The author of this Message. + // + // This serves as a key for tagging + // the content of this Message when it is fed to the model as text. + // + // The author can be any alphanumeric string. + string author = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The text content of the structured `Message`. + string content = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Citation information for model-generated `content` in this + // `Message`. + // + // If this `Message` was generated as output from the model, this field may be + // populated with attribution information for any text included in the + // `content`. This field is used only on output. + optional CitationMetadata citation_metadata = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// All of the structured input text passed to the model as a prompt. +// +// A `MessagePrompt` contains a structured set of fields that provide context +// for the conversation, examples of user input/model output message pairs that +// prime the model to respond in different ways, and the conversation history +// or list of messages representing the alternating turns of the conversation +// between the user and the model. +message MessagePrompt { + // Optional. Text that should be provided to the model first to ground the + // response. + // + // If not empty, this `context` will be given to the model first before the + // `examples` and `messages`. When using a `context` be sure to provide it + // with every request to maintain continuity. + // + // This field can be a description of your prompt to the model to help provide + // context and guide the responses. Examples: "Translate the phrase from + // English to French." or "Given a statement, classify the sentiment as happy, + // sad or neutral." + // + // Anything included in this field will take precedence over message history + // if the total input size exceeds the model's `input_token_limit` and the + // input request is truncated. + string context = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Examples of what the model should generate. + // + // This includes both user input and the response that the model should + // emulate. + // + // These `examples` are treated identically to conversation messages except + // that they take precedence over the history in `messages`: + // If the total input size exceeds the model's `input_token_limit` the input + // will be truncated. Items will be dropped from `messages` before `examples`. + repeated Example examples = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. A snapshot of the recent conversation history sorted + // chronologically. + // + // Turns alternate between two authors. + // + // If the total input size exceeds the model's `input_token_limit` the input + // will be truncated: The oldest items will be dropped from `messages`. + repeated Message messages = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// An input/output example used to instruct the Model. +// +// It demonstrates how the model should respond or format its response. +message Example { + // An example of an input `Message` from the user. + Message input = 1; + + // An example of what the model should output given the input. + Message output = 2; +} + +// Counts the number of tokens in the `prompt` sent to a model. +// +// Models may tokenize text differently, so each model may return a different +// `token_count`. +message CountMessageTokensRequest { + // Required. The model's resource name. This serves as an ID for the Model to + // use. + // + // This name should match a model name returned by the `ListModels` method. + // + // Format: `models/{model}` + string model = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "generativelanguage.googleapis.com/Model" + } + ]; + + // Required. The prompt, whose token count is to be returned. + MessagePrompt prompt = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// A response from `CountMessageTokens`. +// +// It returns the model's `token_count` for the `prompt`. +message CountMessageTokensResponse { + // The number of tokens that the `model` tokenizes the `prompt` into. + // + // Always non-negative. + int32 token_count = 1; +} diff --git a/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta2/model.proto b/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta2/model.proto new file mode 100644 index 00000000000..d266c6ee1d3 --- /dev/null +++ b/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta2/model.proto @@ -0,0 +1,101 @@ +// Copyright 2023 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.ai.generativelanguage.v1beta2; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option go_package = "google.golang.org/genproto/googleapis/ai/generativelanguage/v1beta2;generativelanguage"; +option java_multiple_files = true; +option java_outer_classname = "ModelProto"; +option java_package = "com.google.ai.generativelanguage.v1beta2"; + +// Information about a Generative Language Model. +message Model { + option (google.api.resource) = { + type: "generativelanguage.googleapis.com/Model" + pattern: "models/{model}" + }; + + // Required. The resource name of the `Model`. + // + // Format: `models/{model}` with a `{model}` naming convention of: + // + // * "{base_model_id}-{version}" + // + // Examples: + // + // * `models/chat-bison-001` + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The name of the base model, pass this to the generation request. + // + // Examples: + // + // * `chat-bison` + string base_model_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The version number of the model. + // + // This represents the major version + string version = 3 [(google.api.field_behavior) = REQUIRED]; + + // The human-readable name of the model. E.g. "Chat Bison". + // + // The name can be up to 128 characters long and can consist of any UTF-8 + // characters. + string display_name = 4; + + // A short description of the model. + string description = 5; + + // Maximum number of input tokens allowed for this model. + int32 input_token_limit = 6; + + // Maximum number of output tokens available for this model. + int32 output_token_limit = 7; + + // The model's supported generation methods. + // + // The method names are defined as Pascal case + // strings, such as `generateMessage` which correspond to API methods. + repeated string supported_generation_methods = 8; + + // Controls the randomness of the output. + // + // Values can range over `[0.0,1.0]`, inclusive. A value closer to `1.0` will + // produce responses that are more varied, while a value closer to `0.0` will + // typically result in less surprising responses from the model. + // This value specifies default to be used by the backend while making the + // call to the model. + optional float temperature = 9; + + // For Nucleus sampling. + // + // Nucleus sampling considers the smallest set of tokens whose probability + // sum is at least `top_p`. + // This value specifies default to be used by the backend while making the + // call to the model. + optional float top_p = 10; + + // For Top-k sampling. + // + // Top-k sampling considers the set of `top_k` most probable tokens. + // This value specifies default to be used by the backend while making the + // call to the model. + optional int32 top_k = 11; +} diff --git a/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta2/model_service.proto b/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta2/model_service.proto new file mode 100644 index 00000000000..8462e55ba1d --- /dev/null +++ b/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta2/model_service.proto @@ -0,0 +1,95 @@ +// Copyright 2023 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.ai.generativelanguage.v1beta2; + +import "google/ai/generativelanguage/v1beta2/model.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option go_package = "google.golang.org/genproto/googleapis/ai/generativelanguage/v1beta2;generativelanguage"; +option java_multiple_files = true; +option java_outer_classname = "ModelServiceProto"; +option java_package = "com.google.ai.generativelanguage.v1beta2"; + +// Provides methods for getting metadata information about Generative Models. +service ModelService { + option (google.api.default_host) = "generativelanguage.googleapis.com"; + + // Gets information about a specific Model. + rpc GetModel(GetModelRequest) returns (Model) { + option (google.api.http) = { + get: "/v1beta2/{name=models/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists models available through the API. + rpc ListModels(ListModelsRequest) returns (ListModelsResponse) { + option (google.api.http) = { + get: "/v1beta2/models" + }; + option (google.api.method_signature) = "page_size,page_token"; + } +} + +// Request for getting information about a specific Model. +message GetModelRequest { + // Required. The resource name of the model. + // + // This name should match a model name returned by the `ListModels` method. + // + // Format: `models/{model}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "generativelanguage.googleapis.com/Model" + } + ]; +} + +// Request for listing all Models. +message ListModelsRequest { + // The maximum number of `Models` to return (per page). + // + // The service may return fewer models. + // If unspecified, at most 50 models will be returned per page. + // This method returns at most 1000 models per page, even if you pass a larger + // page_size. + int32 page_size = 2; + + // A page token, received from a previous `ListModels` call. + // + // Provide the `page_token` returned by one request as an argument to the next + // request to retrieve the next page. + // + // When paginating, all other parameters provided to `ListModels` must match + // the call that provided the page token. + string page_token = 3; +} + +// Response from `ListModel` containing a paginated list of Models. +message ListModelsResponse { + // The returned Models. + repeated Model models = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // + // If this field is omitted, there are no more pages. + string next_page_token = 2; +} diff --git a/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta2/safety.proto b/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta2/safety.proto new file mode 100644 index 00000000000..70f420d7d43 --- /dev/null +++ b/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta2/safety.proto @@ -0,0 +1,157 @@ +// Copyright 2023 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.ai.generativelanguage.v1beta2; + +import "google/api/field_behavior.proto"; + +option go_package = "google.golang.org/genproto/googleapis/ai/generativelanguage/v1beta2;generativelanguage"; +option java_multiple_files = true; +option java_outer_classname = "SafetyProto"; +option java_package = "com.google.ai.generativelanguage.v1beta2"; + +// The category of a rating. +// +// These categories cover various kinds of harms that developers +// may wish to adjust. +enum HarmCategory { + // Category is unspecified. + HARM_CATEGORY_UNSPECIFIED = 0; + + // Negative or harmful comments targeting identity and/or protected attribute. + HARM_CATEGORY_DEROGATORY = 1; + + // Content that is rude, disrepspectful, or profane. + HARM_CATEGORY_TOXICITY = 2; + + // Describes scenarios depictng violence against an individual or group, or + // general descriptions of gore. + HARM_CATEGORY_VIOLENCE = 3; + + // Contains references to sexual acts or other lewd content. + HARM_CATEGORY_SEXUAL = 4; + + // Promotes unchecked medical advice. + HARM_CATEGORY_MEDICAL = 5; + + // Dangerous content that promotes, facilitates, or encourages harmful acts. + HARM_CATEGORY_DANGEROUS = 6; +} + +// Content filtering metadata associated with processing a single request. +// +// ContentFilter contains a reason and an optional supporting string. The reason +// may be unspecified. +message ContentFilter { + // A list of reasons why content may have been blocked. + enum BlockedReason { + // A blocked reason was not specified. + BLOCKED_REASON_UNSPECIFIED = 0; + + // Content was blocked by safety settings. + SAFETY = 1; + + // Content was blocked, but the reason is uncategorized. + OTHER = 2; + } + + // The reason content was blocked during request processing. + BlockedReason reason = 1; + + // A string that describes the filtering behavior in more detail. + optional string message = 2; +} + +// Safety feedback for an entire request. +// +// This field is populated if content in the input and/or response is blocked +// due to safety settings. SafetyFeedback may not exist for every HarmCategory. +// Each SafetyFeedback will return the safety settings used by the request as +// well as the lowest HarmProbability that should be allowed in order to return +// a result. +message SafetyFeedback { + // Safety rating evaluated from content. + SafetyRating rating = 1; + + // Safety settings applied to the request. + SafetySetting setting = 2; +} + +// Safety rating for a piece of content. +// +// The safety rating contains the category of harm and the +// harm probability level in that category for a piece of content. +// Content is classified for safety across a number of +// harm categories and the probability of the harm classification is included +// here. +message SafetyRating { + // The probability that a piece of content is harmful. + // + // The classification system gives the probability of the content being + // unsafe. This does not indicate the severity of harm for a piece of content. + enum HarmProbability { + // Probability is unspecified. + HARM_PROBABILITY_UNSPECIFIED = 0; + + // Content has a negligible chance of being unsafe. + NEGLIGIBLE = 1; + + // Content has a low chance of being unsafe. + LOW = 2; + + // Content has a medium chance of being unsafe. + MEDIUM = 3; + + // Content has a high chance of being unsafe. + HIGH = 4; + } + + // Required. The category for this rating. + HarmCategory category = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The probability of harm for this content. + HarmProbability probability = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// Safety setting, affecting the safety-blocking behavior. +// +// Passing a safety setting for a category changes the allowed proability that +// content is blocked. +message SafetySetting { + // Block at and beyond a specified harm probability. + enum HarmBlockThreshold { + // Threshold is unspecified. + HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0; + + // Content with NEGLIGIBLE will be allowed. + BLOCK_LOW_AND_ABOVE = 1; + + // Content with NEGLIGIBLE and LOW will be allowed. + BLOCK_MEDIUM_AND_ABOVE = 2; + + // Content with NEGLIGIBLE, LOW, and MEDIUM will be allowed. + BLOCK_ONLY_HIGH = 3; + + // All content will be allowed. + BLOCK_NONE = 4; + } + + // Required. The category for this setting. + HarmCategory category = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Controls the probability threshold at which harm is blocked. + HarmBlockThreshold threshold = 4 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta2/text_service.proto b/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta2/text_service.proto new file mode 100644 index 00000000000..e193d0b416e --- /dev/null +++ b/packages/google-ai-generativelanguage/protos/google/ai/generativelanguage/v1beta2/text_service.proto @@ -0,0 +1,211 @@ +// Copyright 2023 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.ai.generativelanguage.v1beta2; + +import "google/ai/generativelanguage/v1beta2/citation.proto"; +import "google/ai/generativelanguage/v1beta2/safety.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option go_package = "google.golang.org/genproto/googleapis/ai/generativelanguage/v1beta2;generativelanguage"; +option java_multiple_files = true; +option java_outer_classname = "TextServiceProto"; +option java_package = "com.google.ai.generativelanguage.v1beta2"; + +// API for using Generative Language Models (GLMs) trained to generate text. +// +// Also known as Large Language Models (LLM)s, these generate text given an +// input prompt from the user. +service TextService { + option (google.api.default_host) = "generativelanguage.googleapis.com"; + + // Generates a response from the model given an input message. + rpc GenerateText(GenerateTextRequest) returns (GenerateTextResponse) { + option (google.api.http) = { + post: "/v1beta2/{model=models/*}:generateText" + body: "*" + }; + option (google.api.method_signature) = + "model,prompt,temperature,candidate_count,max_output_tokens,top_p,top_k"; + } + + // Generates an embedding from the model given an input message. + rpc EmbedText(EmbedTextRequest) returns (EmbedTextResponse) { + option (google.api.http) = { + post: "/v1beta2/{model=models/*}:embedText" + body: "*" + }; + option (google.api.method_signature) = "model,text"; + } +} + +// Request to generate a text completion response from the model. +message GenerateTextRequest { + // Required. The model name to use with the format name=models/{model}. + string model = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "generativelanguage.googleapis.com/Model" + } + ]; + + // Required. The free-form input text given to the model as a prompt. + // + // Given a prompt, the model will generate a TextCompletion response it + // predicts as the completion of the input text. + TextPrompt prompt = 2 [(google.api.field_behavior) = REQUIRED]; + + // Controls the randomness of the output. + // Note: The default value varies by model, see the `Model.temperature` + // attribute of the `Model` returned the `getModel` function. + // + // Values can range from [0.0,1.0], + // inclusive. A value closer to 1.0 will produce responses that are more + // varied and creative, while a value closer to 0.0 will typically result in + // more straightforward responses from the model. + optional float temperature = 3; + + // Number of generated responses to return. + // + // This value must be between [1, 8], inclusive. If unset, this will default + // to 1. + optional int32 candidate_count = 4; + + // The maximum number of tokens to include in a candidate. + // + // If unset, this will default to 64. + optional int32 max_output_tokens = 5; + + // The maximum cumulative probability of tokens to consider when sampling. + // + // The model uses combined Top-k and nucleus sampling. + // + // Tokens are sorted based on their assigned probabilities so that only the + // most liekly tokens are considered. Top-k sampling directly limits the + // maximum number of tokens to consider, while Nucleus sampling limits number + // of tokens based on the cumulative probability. + // + // Note: The default value varies by model, see the `Model.top_p` + // attribute of the `Model` returned the `getModel` function. + optional float top_p = 6; + + // The maximum number of tokens to consider when sampling. + // + // The model uses combined Top-k and nucleus sampling. + // + // Top-k sampling considers the set of `top_k` most probable tokens. + // Defaults to 40. + // + // Note: The default value varies by model, see the `Model.top_k` + // attribute of the `Model` returned the `getModel` function. + optional int32 top_k = 7; + + // A list of unique `SafetySetting` instances for blocking unsafe content. + // + // that will be enforced on the `GenerateTextRequest.prompt` and + // `GenerateTextResponse.candidates`. There should not be more than one + // setting for each `SafetyCategory` type. The API will block any prompts and + // responses that fail to meet the thresholds set by these settings. This list + // overrides the default settings for each `SafetyCategory` specified in the + // safety_settings. If there is no `SafetySetting` for a given + // `SafetyCategory` provided in the list, the API will use the default safety + // setting for that category. + repeated SafetySetting safety_settings = 8; + + // The set of character sequences (up to 5) that will stop output generation. + // If specified, the API will stop at the first appearance of a stop + // sequence. The stop sequence will not be included as part of the response. + repeated string stop_sequences = 9; +} + +// The response from the model, including candidate completions. +message GenerateTextResponse { + // Candidate responses from the model. + repeated TextCompletion candidates = 1; + + // A set of content filtering metadata for the prompt and response + // text. + // + // This indicates which `SafetyCategory`(s) blocked a + // candidate from this response, the lowest `HarmProbability` + // that triggered a block, and the HarmThreshold setting for that category. + // This indicates the smallest change to the `SafetySettings` that would be + // necessary to unblock at least 1 response. + // + // The blocking is configured by the `SafetySettings` in the request (or the + // default `SafetySettings` of the API). + repeated ContentFilter filters = 3; + + // Returns any safety feedback related to content filtering. + repeated SafetyFeedback safety_feedback = 4; +} + +// Text given to the model as a prompt. +// +// The Model will use this TextPrompt to Generate a text completion. +message TextPrompt { + // Required. The prompt text. + string text = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Output text returned from a model. +message TextCompletion { + // Output only. The generated text returned from the model. + string output = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Ratings for the safety of a response. + // + // There is at most one rating per category. + repeated SafetyRating safety_ratings = 2; + + // Output only. Citation information for model-generated `output` in this + // `TextCompletion`. + // + // This field may be populated with attribution information for any text + // included in the `output`. + optional CitationMetadata citation_metadata = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request to get a text embedding from the model. +message EmbedTextRequest { + // Required. The model name to use with the format model=models/{model}. + string model = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "generativelanguage.googleapis.com/Model" + } + ]; + + // Required. The free-form input text that the model will turn into an + // embedding. + string text = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The response to a EmbedTextRequest. +message EmbedTextResponse { + // Output only. The embedding generated from the input text. + optional Embedding embedding = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A list of floats representing the embedding. +message Embedding { + // The embedding values. + repeated float value = 1; +} diff --git a/packages/google-ai-generativelanguage/protos/protos.d.ts b/packages/google-ai-generativelanguage/protos/protos.d.ts new file mode 100644 index 00000000000..3260a9a0d74 --- /dev/null +++ b/packages/google-ai-generativelanguage/protos/protos.d.ts @@ -0,0 +1,6907 @@ +// Copyright 2023 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. + +import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); +/** Namespace google. */ +export namespace google { + + /** Namespace ai. */ + namespace ai { + + /** Namespace generativelanguage. */ + namespace generativelanguage { + + /** Namespace v1beta2. */ + namespace v1beta2 { + + /** Properties of a CitationMetadata. */ + interface ICitationMetadata { + + /** CitationMetadata citationSources */ + citationSources?: (google.ai.generativelanguage.v1beta2.ICitationSource[]|null); + } + + /** Represents a CitationMetadata. */ + class CitationMetadata implements ICitationMetadata { + + /** + * Constructs a new CitationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.ai.generativelanguage.v1beta2.ICitationMetadata); + + /** CitationMetadata citationSources. */ + public citationSources: google.ai.generativelanguage.v1beta2.ICitationSource[]; + + /** + * Creates a new CitationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns CitationMetadata instance + */ + public static create(properties?: google.ai.generativelanguage.v1beta2.ICitationMetadata): google.ai.generativelanguage.v1beta2.CitationMetadata; + + /** + * Encodes the specified CitationMetadata message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.CitationMetadata.verify|verify} messages. + * @param message CitationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ai.generativelanguage.v1beta2.ICitationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CitationMetadata message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.CitationMetadata.verify|verify} messages. + * @param message CitationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ai.generativelanguage.v1beta2.ICitationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CitationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CitationMetadata + * @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.ai.generativelanguage.v1beta2.CitationMetadata; + + /** + * Decodes a CitationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CitationMetadata + * @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.ai.generativelanguage.v1beta2.CitationMetadata; + + /** + * Verifies a CitationMetadata 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 CitationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CitationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.ai.generativelanguage.v1beta2.CitationMetadata; + + /** + * Creates a plain object from a CitationMetadata message. Also converts values to other types if specified. + * @param message CitationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ai.generativelanguage.v1beta2.CitationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CitationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CitationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CitationSource. */ + interface ICitationSource { + + /** CitationSource startIndex */ + startIndex?: (number|null); + + /** CitationSource endIndex */ + endIndex?: (number|null); + + /** CitationSource uri */ + uri?: (string|null); + + /** CitationSource license */ + license?: (string|null); + } + + /** Represents a CitationSource. */ + class CitationSource implements ICitationSource { + + /** + * Constructs a new CitationSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.ai.generativelanguage.v1beta2.ICitationSource); + + /** CitationSource startIndex. */ + public startIndex?: (number|null); + + /** CitationSource endIndex. */ + public endIndex?: (number|null); + + /** CitationSource uri. */ + public uri?: (string|null); + + /** CitationSource license. */ + public license?: (string|null); + + /** CitationSource _startIndex. */ + public _startIndex?: "startIndex"; + + /** CitationSource _endIndex. */ + public _endIndex?: "endIndex"; + + /** CitationSource _uri. */ + public _uri?: "uri"; + + /** CitationSource _license. */ + public _license?: "license"; + + /** + * Creates a new CitationSource instance using the specified properties. + * @param [properties] Properties to set + * @returns CitationSource instance + */ + public static create(properties?: google.ai.generativelanguage.v1beta2.ICitationSource): google.ai.generativelanguage.v1beta2.CitationSource; + + /** + * Encodes the specified CitationSource message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.CitationSource.verify|verify} messages. + * @param message CitationSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ai.generativelanguage.v1beta2.ICitationSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CitationSource message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.CitationSource.verify|verify} messages. + * @param message CitationSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ai.generativelanguage.v1beta2.ICitationSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CitationSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CitationSource + * @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.ai.generativelanguage.v1beta2.CitationSource; + + /** + * Decodes a CitationSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CitationSource + * @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.ai.generativelanguage.v1beta2.CitationSource; + + /** + * Verifies a CitationSource 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 CitationSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CitationSource + */ + public static fromObject(object: { [k: string]: any }): google.ai.generativelanguage.v1beta2.CitationSource; + + /** + * Creates a plain object from a CitationSource message. Also converts values to other types if specified. + * @param message CitationSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ai.generativelanguage.v1beta2.CitationSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CitationSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CitationSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a DiscussService */ + class DiscussService extends $protobuf.rpc.Service { + + /** + * Constructs a new DiscussService 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 DiscussService 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): DiscussService; + + /** + * Calls GenerateMessage. + * @param request GenerateMessageRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GenerateMessageResponse + */ + public generateMessage(request: google.ai.generativelanguage.v1beta2.IGenerateMessageRequest, callback: google.ai.generativelanguage.v1beta2.DiscussService.GenerateMessageCallback): void; + + /** + * Calls GenerateMessage. + * @param request GenerateMessageRequest message or plain object + * @returns Promise + */ + public generateMessage(request: google.ai.generativelanguage.v1beta2.IGenerateMessageRequest): Promise; + + /** + * Calls CountMessageTokens. + * @param request CountMessageTokensRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CountMessageTokensResponse + */ + public countMessageTokens(request: google.ai.generativelanguage.v1beta2.ICountMessageTokensRequest, callback: google.ai.generativelanguage.v1beta2.DiscussService.CountMessageTokensCallback): void; + + /** + * Calls CountMessageTokens. + * @param request CountMessageTokensRequest message or plain object + * @returns Promise + */ + public countMessageTokens(request: google.ai.generativelanguage.v1beta2.ICountMessageTokensRequest): Promise; + } + + namespace DiscussService { + + /** + * Callback as used by {@link google.ai.generativelanguage.v1beta2.DiscussService|generateMessage}. + * @param error Error, if any + * @param [response] GenerateMessageResponse + */ + type GenerateMessageCallback = (error: (Error|null), response?: google.ai.generativelanguage.v1beta2.GenerateMessageResponse) => void; + + /** + * Callback as used by {@link google.ai.generativelanguage.v1beta2.DiscussService|countMessageTokens}. + * @param error Error, if any + * @param [response] CountMessageTokensResponse + */ + type CountMessageTokensCallback = (error: (Error|null), response?: google.ai.generativelanguage.v1beta2.CountMessageTokensResponse) => void; + } + + /** Properties of a GenerateMessageRequest. */ + interface IGenerateMessageRequest { + + /** GenerateMessageRequest model */ + model?: (string|null); + + /** GenerateMessageRequest prompt */ + prompt?: (google.ai.generativelanguage.v1beta2.IMessagePrompt|null); + + /** GenerateMessageRequest temperature */ + temperature?: (number|null); + + /** GenerateMessageRequest candidateCount */ + candidateCount?: (number|null); + + /** GenerateMessageRequest topP */ + topP?: (number|null); + + /** GenerateMessageRequest topK */ + topK?: (number|null); + } + + /** Represents a GenerateMessageRequest. */ + class GenerateMessageRequest implements IGenerateMessageRequest { + + /** + * Constructs a new GenerateMessageRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ai.generativelanguage.v1beta2.IGenerateMessageRequest); + + /** GenerateMessageRequest model. */ + public model: string; + + /** GenerateMessageRequest prompt. */ + public prompt?: (google.ai.generativelanguage.v1beta2.IMessagePrompt|null); + + /** GenerateMessageRequest temperature. */ + public temperature?: (number|null); + + /** GenerateMessageRequest candidateCount. */ + public candidateCount?: (number|null); + + /** GenerateMessageRequest topP. */ + public topP?: (number|null); + + /** GenerateMessageRequest topK. */ + public topK?: (number|null); + + /** GenerateMessageRequest _temperature. */ + public _temperature?: "temperature"; + + /** GenerateMessageRequest _candidateCount. */ + public _candidateCount?: "candidateCount"; + + /** GenerateMessageRequest _topP. */ + public _topP?: "topP"; + + /** GenerateMessageRequest _topK. */ + public _topK?: "topK"; + + /** + * Creates a new GenerateMessageRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GenerateMessageRequest instance + */ + public static create(properties?: google.ai.generativelanguage.v1beta2.IGenerateMessageRequest): google.ai.generativelanguage.v1beta2.GenerateMessageRequest; + + /** + * Encodes the specified GenerateMessageRequest message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.GenerateMessageRequest.verify|verify} messages. + * @param message GenerateMessageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ai.generativelanguage.v1beta2.IGenerateMessageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GenerateMessageRequest message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.GenerateMessageRequest.verify|verify} messages. + * @param message GenerateMessageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ai.generativelanguage.v1beta2.IGenerateMessageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GenerateMessageRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GenerateMessageRequest + * @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.ai.generativelanguage.v1beta2.GenerateMessageRequest; + + /** + * Decodes a GenerateMessageRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GenerateMessageRequest + * @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.ai.generativelanguage.v1beta2.GenerateMessageRequest; + + /** + * Verifies a GenerateMessageRequest 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 GenerateMessageRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GenerateMessageRequest + */ + public static fromObject(object: { [k: string]: any }): google.ai.generativelanguage.v1beta2.GenerateMessageRequest; + + /** + * Creates a plain object from a GenerateMessageRequest message. Also converts values to other types if specified. + * @param message GenerateMessageRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ai.generativelanguage.v1beta2.GenerateMessageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GenerateMessageRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GenerateMessageRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GenerateMessageResponse. */ + interface IGenerateMessageResponse { + + /** GenerateMessageResponse candidates */ + candidates?: (google.ai.generativelanguage.v1beta2.IMessage[]|null); + + /** GenerateMessageResponse messages */ + messages?: (google.ai.generativelanguage.v1beta2.IMessage[]|null); + + /** GenerateMessageResponse filters */ + filters?: (google.ai.generativelanguage.v1beta2.IContentFilter[]|null); + } + + /** Represents a GenerateMessageResponse. */ + class GenerateMessageResponse implements IGenerateMessageResponse { + + /** + * Constructs a new GenerateMessageResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ai.generativelanguage.v1beta2.IGenerateMessageResponse); + + /** GenerateMessageResponse candidates. */ + public candidates: google.ai.generativelanguage.v1beta2.IMessage[]; + + /** GenerateMessageResponse messages. */ + public messages: google.ai.generativelanguage.v1beta2.IMessage[]; + + /** GenerateMessageResponse filters. */ + public filters: google.ai.generativelanguage.v1beta2.IContentFilter[]; + + /** + * Creates a new GenerateMessageResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GenerateMessageResponse instance + */ + public static create(properties?: google.ai.generativelanguage.v1beta2.IGenerateMessageResponse): google.ai.generativelanguage.v1beta2.GenerateMessageResponse; + + /** + * Encodes the specified GenerateMessageResponse message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.GenerateMessageResponse.verify|verify} messages. + * @param message GenerateMessageResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ai.generativelanguage.v1beta2.IGenerateMessageResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GenerateMessageResponse message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.GenerateMessageResponse.verify|verify} messages. + * @param message GenerateMessageResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ai.generativelanguage.v1beta2.IGenerateMessageResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GenerateMessageResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GenerateMessageResponse + * @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.ai.generativelanguage.v1beta2.GenerateMessageResponse; + + /** + * Decodes a GenerateMessageResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GenerateMessageResponse + * @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.ai.generativelanguage.v1beta2.GenerateMessageResponse; + + /** + * Verifies a GenerateMessageResponse 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 GenerateMessageResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GenerateMessageResponse + */ + public static fromObject(object: { [k: string]: any }): google.ai.generativelanguage.v1beta2.GenerateMessageResponse; + + /** + * Creates a plain object from a GenerateMessageResponse message. Also converts values to other types if specified. + * @param message GenerateMessageResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ai.generativelanguage.v1beta2.GenerateMessageResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GenerateMessageResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GenerateMessageResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Message. */ + interface IMessage { + + /** Message author */ + author?: (string|null); + + /** Message content */ + content?: (string|null); + + /** Message citationMetadata */ + citationMetadata?: (google.ai.generativelanguage.v1beta2.ICitationMetadata|null); + } + + /** Represents a Message. */ + class Message implements IMessage { + + /** + * Constructs a new Message. + * @param [properties] Properties to set + */ + constructor(properties?: google.ai.generativelanguage.v1beta2.IMessage); + + /** Message author. */ + public author: string; + + /** Message content. */ + public content: string; + + /** Message citationMetadata. */ + public citationMetadata?: (google.ai.generativelanguage.v1beta2.ICitationMetadata|null); + + /** Message _citationMetadata. */ + public _citationMetadata?: "citationMetadata"; + + /** + * Creates a new Message instance using the specified properties. + * @param [properties] Properties to set + * @returns Message instance + */ + public static create(properties?: google.ai.generativelanguage.v1beta2.IMessage): google.ai.generativelanguage.v1beta2.Message; + + /** + * Encodes the specified Message message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.Message.verify|verify} messages. + * @param message Message message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ai.generativelanguage.v1beta2.IMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Message message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.Message.verify|verify} messages. + * @param message Message message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ai.generativelanguage.v1beta2.IMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Message message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Message + * @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.ai.generativelanguage.v1beta2.Message; + + /** + * Decodes a Message message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Message + * @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.ai.generativelanguage.v1beta2.Message; + + /** + * Verifies a Message 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 Message message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Message + */ + public static fromObject(object: { [k: string]: any }): google.ai.generativelanguage.v1beta2.Message; + + /** + * Creates a plain object from a Message message. Also converts values to other types if specified. + * @param message Message + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ai.generativelanguage.v1beta2.Message, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Message to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Message + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MessagePrompt. */ + interface IMessagePrompt { + + /** MessagePrompt context */ + context?: (string|null); + + /** MessagePrompt examples */ + examples?: (google.ai.generativelanguage.v1beta2.IExample[]|null); + + /** MessagePrompt messages */ + messages?: (google.ai.generativelanguage.v1beta2.IMessage[]|null); + } + + /** Represents a MessagePrompt. */ + class MessagePrompt implements IMessagePrompt { + + /** + * Constructs a new MessagePrompt. + * @param [properties] Properties to set + */ + constructor(properties?: google.ai.generativelanguage.v1beta2.IMessagePrompt); + + /** MessagePrompt context. */ + public context: string; + + /** MessagePrompt examples. */ + public examples: google.ai.generativelanguage.v1beta2.IExample[]; + + /** MessagePrompt messages. */ + public messages: google.ai.generativelanguage.v1beta2.IMessage[]; + + /** + * Creates a new MessagePrompt instance using the specified properties. + * @param [properties] Properties to set + * @returns MessagePrompt instance + */ + public static create(properties?: google.ai.generativelanguage.v1beta2.IMessagePrompt): google.ai.generativelanguage.v1beta2.MessagePrompt; + + /** + * Encodes the specified MessagePrompt message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.MessagePrompt.verify|verify} messages. + * @param message MessagePrompt message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ai.generativelanguage.v1beta2.IMessagePrompt, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessagePrompt message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.MessagePrompt.verify|verify} messages. + * @param message MessagePrompt message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ai.generativelanguage.v1beta2.IMessagePrompt, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessagePrompt message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessagePrompt + * @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.ai.generativelanguage.v1beta2.MessagePrompt; + + /** + * Decodes a MessagePrompt message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessagePrompt + * @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.ai.generativelanguage.v1beta2.MessagePrompt; + + /** + * Verifies a MessagePrompt 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 MessagePrompt message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessagePrompt + */ + public static fromObject(object: { [k: string]: any }): google.ai.generativelanguage.v1beta2.MessagePrompt; + + /** + * Creates a plain object from a MessagePrompt message. Also converts values to other types if specified. + * @param message MessagePrompt + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ai.generativelanguage.v1beta2.MessagePrompt, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessagePrompt to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessagePrompt + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Example. */ + interface IExample { + + /** Example input */ + input?: (google.ai.generativelanguage.v1beta2.IMessage|null); + + /** Example output */ + output?: (google.ai.generativelanguage.v1beta2.IMessage|null); + } + + /** Represents an Example. */ + class Example implements IExample { + + /** + * Constructs a new Example. + * @param [properties] Properties to set + */ + constructor(properties?: google.ai.generativelanguage.v1beta2.IExample); + + /** Example input. */ + public input?: (google.ai.generativelanguage.v1beta2.IMessage|null); + + /** Example output. */ + public output?: (google.ai.generativelanguage.v1beta2.IMessage|null); + + /** + * Creates a new Example instance using the specified properties. + * @param [properties] Properties to set + * @returns Example instance + */ + public static create(properties?: google.ai.generativelanguage.v1beta2.IExample): google.ai.generativelanguage.v1beta2.Example; + + /** + * Encodes the specified Example message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.Example.verify|verify} messages. + * @param message Example message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ai.generativelanguage.v1beta2.IExample, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Example message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.Example.verify|verify} messages. + * @param message Example message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ai.generativelanguage.v1beta2.IExample, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Example message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Example + * @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.ai.generativelanguage.v1beta2.Example; + + /** + * Decodes an Example message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Example + * @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.ai.generativelanguage.v1beta2.Example; + + /** + * Verifies an Example 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 Example message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Example + */ + public static fromObject(object: { [k: string]: any }): google.ai.generativelanguage.v1beta2.Example; + + /** + * Creates a plain object from an Example message. Also converts values to other types if specified. + * @param message Example + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ai.generativelanguage.v1beta2.Example, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Example to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Example + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CountMessageTokensRequest. */ + interface ICountMessageTokensRequest { + + /** CountMessageTokensRequest model */ + model?: (string|null); + + /** CountMessageTokensRequest prompt */ + prompt?: (google.ai.generativelanguage.v1beta2.IMessagePrompt|null); + } + + /** Represents a CountMessageTokensRequest. */ + class CountMessageTokensRequest implements ICountMessageTokensRequest { + + /** + * Constructs a new CountMessageTokensRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ai.generativelanguage.v1beta2.ICountMessageTokensRequest); + + /** CountMessageTokensRequest model. */ + public model: string; + + /** CountMessageTokensRequest prompt. */ + public prompt?: (google.ai.generativelanguage.v1beta2.IMessagePrompt|null); + + /** + * Creates a new CountMessageTokensRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CountMessageTokensRequest instance + */ + public static create(properties?: google.ai.generativelanguage.v1beta2.ICountMessageTokensRequest): google.ai.generativelanguage.v1beta2.CountMessageTokensRequest; + + /** + * Encodes the specified CountMessageTokensRequest message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.CountMessageTokensRequest.verify|verify} messages. + * @param message CountMessageTokensRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ai.generativelanguage.v1beta2.ICountMessageTokensRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CountMessageTokensRequest message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.CountMessageTokensRequest.verify|verify} messages. + * @param message CountMessageTokensRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ai.generativelanguage.v1beta2.ICountMessageTokensRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CountMessageTokensRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CountMessageTokensRequest + * @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.ai.generativelanguage.v1beta2.CountMessageTokensRequest; + + /** + * Decodes a CountMessageTokensRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CountMessageTokensRequest + * @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.ai.generativelanguage.v1beta2.CountMessageTokensRequest; + + /** + * Verifies a CountMessageTokensRequest 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 CountMessageTokensRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CountMessageTokensRequest + */ + public static fromObject(object: { [k: string]: any }): google.ai.generativelanguage.v1beta2.CountMessageTokensRequest; + + /** + * Creates a plain object from a CountMessageTokensRequest message. Also converts values to other types if specified. + * @param message CountMessageTokensRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ai.generativelanguage.v1beta2.CountMessageTokensRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CountMessageTokensRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CountMessageTokensRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CountMessageTokensResponse. */ + interface ICountMessageTokensResponse { + + /** CountMessageTokensResponse tokenCount */ + tokenCount?: (number|null); + } + + /** Represents a CountMessageTokensResponse. */ + class CountMessageTokensResponse implements ICountMessageTokensResponse { + + /** + * Constructs a new CountMessageTokensResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ai.generativelanguage.v1beta2.ICountMessageTokensResponse); + + /** CountMessageTokensResponse tokenCount. */ + public tokenCount: number; + + /** + * Creates a new CountMessageTokensResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CountMessageTokensResponse instance + */ + public static create(properties?: google.ai.generativelanguage.v1beta2.ICountMessageTokensResponse): google.ai.generativelanguage.v1beta2.CountMessageTokensResponse; + + /** + * Encodes the specified CountMessageTokensResponse message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.CountMessageTokensResponse.verify|verify} messages. + * @param message CountMessageTokensResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ai.generativelanguage.v1beta2.ICountMessageTokensResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CountMessageTokensResponse message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.CountMessageTokensResponse.verify|verify} messages. + * @param message CountMessageTokensResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ai.generativelanguage.v1beta2.ICountMessageTokensResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CountMessageTokensResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CountMessageTokensResponse + * @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.ai.generativelanguage.v1beta2.CountMessageTokensResponse; + + /** + * Decodes a CountMessageTokensResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CountMessageTokensResponse + * @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.ai.generativelanguage.v1beta2.CountMessageTokensResponse; + + /** + * Verifies a CountMessageTokensResponse 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 CountMessageTokensResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CountMessageTokensResponse + */ + public static fromObject(object: { [k: string]: any }): google.ai.generativelanguage.v1beta2.CountMessageTokensResponse; + + /** + * Creates a plain object from a CountMessageTokensResponse message. Also converts values to other types if specified. + * @param message CountMessageTokensResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ai.generativelanguage.v1beta2.CountMessageTokensResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CountMessageTokensResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CountMessageTokensResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** HarmCategory enum. */ + enum HarmCategory { + HARM_CATEGORY_UNSPECIFIED = 0, + HARM_CATEGORY_DEROGATORY = 1, + HARM_CATEGORY_TOXICITY = 2, + HARM_CATEGORY_VIOLENCE = 3, + HARM_CATEGORY_SEXUAL = 4, + HARM_CATEGORY_MEDICAL = 5, + HARM_CATEGORY_DANGEROUS = 6 + } + + /** Properties of a ContentFilter. */ + interface IContentFilter { + + /** ContentFilter reason */ + reason?: (google.ai.generativelanguage.v1beta2.ContentFilter.BlockedReason|keyof typeof google.ai.generativelanguage.v1beta2.ContentFilter.BlockedReason|null); + + /** ContentFilter message */ + message?: (string|null); + } + + /** Represents a ContentFilter. */ + class ContentFilter implements IContentFilter { + + /** + * Constructs a new ContentFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.ai.generativelanguage.v1beta2.IContentFilter); + + /** ContentFilter reason. */ + public reason: (google.ai.generativelanguage.v1beta2.ContentFilter.BlockedReason|keyof typeof google.ai.generativelanguage.v1beta2.ContentFilter.BlockedReason); + + /** ContentFilter message. */ + public message?: (string|null); + + /** ContentFilter _message. */ + public _message?: "message"; + + /** + * Creates a new ContentFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns ContentFilter instance + */ + public static create(properties?: google.ai.generativelanguage.v1beta2.IContentFilter): google.ai.generativelanguage.v1beta2.ContentFilter; + + /** + * Encodes the specified ContentFilter message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.ContentFilter.verify|verify} messages. + * @param message ContentFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ai.generativelanguage.v1beta2.IContentFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ContentFilter message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.ContentFilter.verify|verify} messages. + * @param message ContentFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ai.generativelanguage.v1beta2.IContentFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ContentFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ContentFilter + * @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.ai.generativelanguage.v1beta2.ContentFilter; + + /** + * Decodes a ContentFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ContentFilter + * @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.ai.generativelanguage.v1beta2.ContentFilter; + + /** + * Verifies a ContentFilter 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 ContentFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContentFilter + */ + public static fromObject(object: { [k: string]: any }): google.ai.generativelanguage.v1beta2.ContentFilter; + + /** + * Creates a plain object from a ContentFilter message. Also converts values to other types if specified. + * @param message ContentFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ai.generativelanguage.v1beta2.ContentFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ContentFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ContentFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ContentFilter { + + /** BlockedReason enum. */ + enum BlockedReason { + BLOCKED_REASON_UNSPECIFIED = 0, + SAFETY = 1, + OTHER = 2 + } + } + + /** Properties of a SafetyFeedback. */ + interface ISafetyFeedback { + + /** SafetyFeedback rating */ + rating?: (google.ai.generativelanguage.v1beta2.ISafetyRating|null); + + /** SafetyFeedback setting */ + setting?: (google.ai.generativelanguage.v1beta2.ISafetySetting|null); + } + + /** Represents a SafetyFeedback. */ + class SafetyFeedback implements ISafetyFeedback { + + /** + * Constructs a new SafetyFeedback. + * @param [properties] Properties to set + */ + constructor(properties?: google.ai.generativelanguage.v1beta2.ISafetyFeedback); + + /** SafetyFeedback rating. */ + public rating?: (google.ai.generativelanguage.v1beta2.ISafetyRating|null); + + /** SafetyFeedback setting. */ + public setting?: (google.ai.generativelanguage.v1beta2.ISafetySetting|null); + + /** + * Creates a new SafetyFeedback instance using the specified properties. + * @param [properties] Properties to set + * @returns SafetyFeedback instance + */ + public static create(properties?: google.ai.generativelanguage.v1beta2.ISafetyFeedback): google.ai.generativelanguage.v1beta2.SafetyFeedback; + + /** + * Encodes the specified SafetyFeedback message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.SafetyFeedback.verify|verify} messages. + * @param message SafetyFeedback message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ai.generativelanguage.v1beta2.ISafetyFeedback, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SafetyFeedback message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.SafetyFeedback.verify|verify} messages. + * @param message SafetyFeedback message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ai.generativelanguage.v1beta2.ISafetyFeedback, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SafetyFeedback message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SafetyFeedback + * @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.ai.generativelanguage.v1beta2.SafetyFeedback; + + /** + * Decodes a SafetyFeedback message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SafetyFeedback + * @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.ai.generativelanguage.v1beta2.SafetyFeedback; + + /** + * Verifies a SafetyFeedback 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 SafetyFeedback message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SafetyFeedback + */ + public static fromObject(object: { [k: string]: any }): google.ai.generativelanguage.v1beta2.SafetyFeedback; + + /** + * Creates a plain object from a SafetyFeedback message. Also converts values to other types if specified. + * @param message SafetyFeedback + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ai.generativelanguage.v1beta2.SafetyFeedback, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SafetyFeedback to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SafetyFeedback + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SafetyRating. */ + interface ISafetyRating { + + /** SafetyRating category */ + category?: (google.ai.generativelanguage.v1beta2.HarmCategory|keyof typeof google.ai.generativelanguage.v1beta2.HarmCategory|null); + + /** SafetyRating probability */ + probability?: (google.ai.generativelanguage.v1beta2.SafetyRating.HarmProbability|keyof typeof google.ai.generativelanguage.v1beta2.SafetyRating.HarmProbability|null); + } + + /** Represents a SafetyRating. */ + class SafetyRating implements ISafetyRating { + + /** + * Constructs a new SafetyRating. + * @param [properties] Properties to set + */ + constructor(properties?: google.ai.generativelanguage.v1beta2.ISafetyRating); + + /** SafetyRating category. */ + public category: (google.ai.generativelanguage.v1beta2.HarmCategory|keyof typeof google.ai.generativelanguage.v1beta2.HarmCategory); + + /** SafetyRating probability. */ + public probability: (google.ai.generativelanguage.v1beta2.SafetyRating.HarmProbability|keyof typeof google.ai.generativelanguage.v1beta2.SafetyRating.HarmProbability); + + /** + * Creates a new SafetyRating instance using the specified properties. + * @param [properties] Properties to set + * @returns SafetyRating instance + */ + public static create(properties?: google.ai.generativelanguage.v1beta2.ISafetyRating): google.ai.generativelanguage.v1beta2.SafetyRating; + + /** + * Encodes the specified SafetyRating message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.SafetyRating.verify|verify} messages. + * @param message SafetyRating message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ai.generativelanguage.v1beta2.ISafetyRating, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SafetyRating message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.SafetyRating.verify|verify} messages. + * @param message SafetyRating message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ai.generativelanguage.v1beta2.ISafetyRating, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SafetyRating message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SafetyRating + * @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.ai.generativelanguage.v1beta2.SafetyRating; + + /** + * Decodes a SafetyRating message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SafetyRating + * @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.ai.generativelanguage.v1beta2.SafetyRating; + + /** + * Verifies a SafetyRating 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 SafetyRating message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SafetyRating + */ + public static fromObject(object: { [k: string]: any }): google.ai.generativelanguage.v1beta2.SafetyRating; + + /** + * Creates a plain object from a SafetyRating message. Also converts values to other types if specified. + * @param message SafetyRating + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ai.generativelanguage.v1beta2.SafetyRating, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SafetyRating to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SafetyRating + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SafetyRating { + + /** HarmProbability enum. */ + enum HarmProbability { + HARM_PROBABILITY_UNSPECIFIED = 0, + NEGLIGIBLE = 1, + LOW = 2, + MEDIUM = 3, + HIGH = 4 + } + } + + /** Properties of a SafetySetting. */ + interface ISafetySetting { + + /** SafetySetting category */ + category?: (google.ai.generativelanguage.v1beta2.HarmCategory|keyof typeof google.ai.generativelanguage.v1beta2.HarmCategory|null); + + /** SafetySetting threshold */ + threshold?: (google.ai.generativelanguage.v1beta2.SafetySetting.HarmBlockThreshold|keyof typeof google.ai.generativelanguage.v1beta2.SafetySetting.HarmBlockThreshold|null); + } + + /** Represents a SafetySetting. */ + class SafetySetting implements ISafetySetting { + + /** + * Constructs a new SafetySetting. + * @param [properties] Properties to set + */ + constructor(properties?: google.ai.generativelanguage.v1beta2.ISafetySetting); + + /** SafetySetting category. */ + public category: (google.ai.generativelanguage.v1beta2.HarmCategory|keyof typeof google.ai.generativelanguage.v1beta2.HarmCategory); + + /** SafetySetting threshold. */ + public threshold: (google.ai.generativelanguage.v1beta2.SafetySetting.HarmBlockThreshold|keyof typeof google.ai.generativelanguage.v1beta2.SafetySetting.HarmBlockThreshold); + + /** + * Creates a new SafetySetting instance using the specified properties. + * @param [properties] Properties to set + * @returns SafetySetting instance + */ + public static create(properties?: google.ai.generativelanguage.v1beta2.ISafetySetting): google.ai.generativelanguage.v1beta2.SafetySetting; + + /** + * Encodes the specified SafetySetting message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.SafetySetting.verify|verify} messages. + * @param message SafetySetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ai.generativelanguage.v1beta2.ISafetySetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SafetySetting message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.SafetySetting.verify|verify} messages. + * @param message SafetySetting message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ai.generativelanguage.v1beta2.ISafetySetting, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SafetySetting message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SafetySetting + * @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.ai.generativelanguage.v1beta2.SafetySetting; + + /** + * Decodes a SafetySetting message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SafetySetting + * @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.ai.generativelanguage.v1beta2.SafetySetting; + + /** + * Verifies a SafetySetting 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 SafetySetting message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SafetySetting + */ + public static fromObject(object: { [k: string]: any }): google.ai.generativelanguage.v1beta2.SafetySetting; + + /** + * Creates a plain object from a SafetySetting message. Also converts values to other types if specified. + * @param message SafetySetting + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ai.generativelanguage.v1beta2.SafetySetting, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SafetySetting to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SafetySetting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SafetySetting { + + /** HarmBlockThreshold enum. */ + enum HarmBlockThreshold { + HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0, + BLOCK_LOW_AND_ABOVE = 1, + BLOCK_MEDIUM_AND_ABOVE = 2, + BLOCK_ONLY_HIGH = 3, + BLOCK_NONE = 4 + } + } + + /** Properties of a Model. */ + interface IModel { + + /** Model name */ + name?: (string|null); + + /** Model baseModelId */ + baseModelId?: (string|null); + + /** Model version */ + version?: (string|null); + + /** Model displayName */ + displayName?: (string|null); + + /** Model description */ + description?: (string|null); + + /** Model inputTokenLimit */ + inputTokenLimit?: (number|null); + + /** Model outputTokenLimit */ + outputTokenLimit?: (number|null); + + /** Model supportedGenerationMethods */ + supportedGenerationMethods?: (string[]|null); + + /** Model temperature */ + temperature?: (number|null); + + /** Model topP */ + topP?: (number|null); + + /** Model topK */ + topK?: (number|null); + } + + /** Represents a Model. */ + class Model implements IModel { + + /** + * Constructs a new Model. + * @param [properties] Properties to set + */ + constructor(properties?: google.ai.generativelanguage.v1beta2.IModel); + + /** Model name. */ + public name: string; + + /** Model baseModelId. */ + public baseModelId: string; + + /** Model version. */ + public version: string; + + /** Model displayName. */ + public displayName: string; + + /** Model description. */ + public description: string; + + /** Model inputTokenLimit. */ + public inputTokenLimit: number; + + /** Model outputTokenLimit. */ + public outputTokenLimit: number; + + /** Model supportedGenerationMethods. */ + public supportedGenerationMethods: string[]; + + /** Model temperature. */ + public temperature?: (number|null); + + /** Model topP. */ + public topP?: (number|null); + + /** Model topK. */ + public topK?: (number|null); + + /** Model _temperature. */ + public _temperature?: "temperature"; + + /** Model _topP. */ + public _topP?: "topP"; + + /** Model _topK. */ + public _topK?: "topK"; + + /** + * Creates a new Model instance using the specified properties. + * @param [properties] Properties to set + * @returns Model instance + */ + public static create(properties?: google.ai.generativelanguage.v1beta2.IModel): google.ai.generativelanguage.v1beta2.Model; + + /** + * Encodes the specified Model message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.Model.verify|verify} messages. + * @param message Model message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ai.generativelanguage.v1beta2.IModel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Model message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.Model.verify|verify} messages. + * @param message Model message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ai.generativelanguage.v1beta2.IModel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Model message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Model + * @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.ai.generativelanguage.v1beta2.Model; + + /** + * Decodes a Model message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Model + * @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.ai.generativelanguage.v1beta2.Model; + + /** + * Verifies a Model 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 Model message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Model + */ + public static fromObject(object: { [k: string]: any }): google.ai.generativelanguage.v1beta2.Model; + + /** + * Creates a plain object from a Model message. Also converts values to other types if specified. + * @param message Model + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ai.generativelanguage.v1beta2.Model, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Model to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Model + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a ModelService */ + class ModelService extends $protobuf.rpc.Service { + + /** + * Constructs a new ModelService 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 ModelService 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): ModelService; + + /** + * Calls GetModel. + * @param request GetModelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Model + */ + public getModel(request: google.ai.generativelanguage.v1beta2.IGetModelRequest, callback: google.ai.generativelanguage.v1beta2.ModelService.GetModelCallback): void; + + /** + * Calls GetModel. + * @param request GetModelRequest message or plain object + * @returns Promise + */ + public getModel(request: google.ai.generativelanguage.v1beta2.IGetModelRequest): Promise; + + /** + * Calls ListModels. + * @param request ListModelsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListModelsResponse + */ + public listModels(request: google.ai.generativelanguage.v1beta2.IListModelsRequest, callback: google.ai.generativelanguage.v1beta2.ModelService.ListModelsCallback): void; + + /** + * Calls ListModels. + * @param request ListModelsRequest message or plain object + * @returns Promise + */ + public listModels(request: google.ai.generativelanguage.v1beta2.IListModelsRequest): Promise; + } + + namespace ModelService { + + /** + * Callback as used by {@link google.ai.generativelanguage.v1beta2.ModelService|getModel}. + * @param error Error, if any + * @param [response] Model + */ + type GetModelCallback = (error: (Error|null), response?: google.ai.generativelanguage.v1beta2.Model) => void; + + /** + * Callback as used by {@link google.ai.generativelanguage.v1beta2.ModelService|listModels}. + * @param error Error, if any + * @param [response] ListModelsResponse + */ + type ListModelsCallback = (error: (Error|null), response?: google.ai.generativelanguage.v1beta2.ListModelsResponse) => void; + } + + /** Properties of a GetModelRequest. */ + interface IGetModelRequest { + + /** GetModelRequest name */ + name?: (string|null); + } + + /** Represents a GetModelRequest. */ + class GetModelRequest implements IGetModelRequest { + + /** + * Constructs a new GetModelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ai.generativelanguage.v1beta2.IGetModelRequest); + + /** GetModelRequest name. */ + public name: string; + + /** + * Creates a new GetModelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetModelRequest instance + */ + public static create(properties?: google.ai.generativelanguage.v1beta2.IGetModelRequest): google.ai.generativelanguage.v1beta2.GetModelRequest; + + /** + * Encodes the specified GetModelRequest message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.GetModelRequest.verify|verify} messages. + * @param message GetModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ai.generativelanguage.v1beta2.IGetModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetModelRequest message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.GetModelRequest.verify|verify} messages. + * @param message GetModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ai.generativelanguage.v1beta2.IGetModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetModelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetModelRequest + * @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.ai.generativelanguage.v1beta2.GetModelRequest; + + /** + * Decodes a GetModelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetModelRequest + * @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.ai.generativelanguage.v1beta2.GetModelRequest; + + /** + * Verifies a GetModelRequest 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 GetModelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetModelRequest + */ + public static fromObject(object: { [k: string]: any }): google.ai.generativelanguage.v1beta2.GetModelRequest; + + /** + * Creates a plain object from a GetModelRequest message. Also converts values to other types if specified. + * @param message GetModelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ai.generativelanguage.v1beta2.GetModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetModelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetModelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListModelsRequest. */ + interface IListModelsRequest { + + /** ListModelsRequest pageSize */ + pageSize?: (number|null); + + /** ListModelsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListModelsRequest. */ + class ListModelsRequest implements IListModelsRequest { + + /** + * Constructs a new ListModelsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ai.generativelanguage.v1beta2.IListModelsRequest); + + /** ListModelsRequest pageSize. */ + public pageSize: number; + + /** ListModelsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListModelsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListModelsRequest instance + */ + public static create(properties?: google.ai.generativelanguage.v1beta2.IListModelsRequest): google.ai.generativelanguage.v1beta2.ListModelsRequest; + + /** + * Encodes the specified ListModelsRequest message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.ListModelsRequest.verify|verify} messages. + * @param message ListModelsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ai.generativelanguage.v1beta2.IListModelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListModelsRequest message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.ListModelsRequest.verify|verify} messages. + * @param message ListModelsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ai.generativelanguage.v1beta2.IListModelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListModelsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListModelsRequest + * @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.ai.generativelanguage.v1beta2.ListModelsRequest; + + /** + * Decodes a ListModelsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListModelsRequest + * @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.ai.generativelanguage.v1beta2.ListModelsRequest; + + /** + * Verifies a ListModelsRequest 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 ListModelsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListModelsRequest + */ + public static fromObject(object: { [k: string]: any }): google.ai.generativelanguage.v1beta2.ListModelsRequest; + + /** + * Creates a plain object from a ListModelsRequest message. Also converts values to other types if specified. + * @param message ListModelsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ai.generativelanguage.v1beta2.ListModelsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListModelsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListModelsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListModelsResponse. */ + interface IListModelsResponse { + + /** ListModelsResponse models */ + models?: (google.ai.generativelanguage.v1beta2.IModel[]|null); + + /** ListModelsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListModelsResponse. */ + class ListModelsResponse implements IListModelsResponse { + + /** + * Constructs a new ListModelsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ai.generativelanguage.v1beta2.IListModelsResponse); + + /** ListModelsResponse models. */ + public models: google.ai.generativelanguage.v1beta2.IModel[]; + + /** ListModelsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListModelsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListModelsResponse instance + */ + public static create(properties?: google.ai.generativelanguage.v1beta2.IListModelsResponse): google.ai.generativelanguage.v1beta2.ListModelsResponse; + + /** + * Encodes the specified ListModelsResponse message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.ListModelsResponse.verify|verify} messages. + * @param message ListModelsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ai.generativelanguage.v1beta2.IListModelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListModelsResponse message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.ListModelsResponse.verify|verify} messages. + * @param message ListModelsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ai.generativelanguage.v1beta2.IListModelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListModelsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListModelsResponse + * @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.ai.generativelanguage.v1beta2.ListModelsResponse; + + /** + * Decodes a ListModelsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListModelsResponse + * @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.ai.generativelanguage.v1beta2.ListModelsResponse; + + /** + * Verifies a ListModelsResponse 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 ListModelsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListModelsResponse + */ + public static fromObject(object: { [k: string]: any }): google.ai.generativelanguage.v1beta2.ListModelsResponse; + + /** + * Creates a plain object from a ListModelsResponse message. Also converts values to other types if specified. + * @param message ListModelsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ai.generativelanguage.v1beta2.ListModelsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListModelsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListModelsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a TextService */ + class TextService extends $protobuf.rpc.Service { + + /** + * Constructs a new TextService 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 TextService 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): TextService; + + /** + * Calls GenerateText. + * @param request GenerateTextRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GenerateTextResponse + */ + public generateText(request: google.ai.generativelanguage.v1beta2.IGenerateTextRequest, callback: google.ai.generativelanguage.v1beta2.TextService.GenerateTextCallback): void; + + /** + * Calls GenerateText. + * @param request GenerateTextRequest message or plain object + * @returns Promise + */ + public generateText(request: google.ai.generativelanguage.v1beta2.IGenerateTextRequest): Promise; + + /** + * Calls EmbedText. + * @param request EmbedTextRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EmbedTextResponse + */ + public embedText(request: google.ai.generativelanguage.v1beta2.IEmbedTextRequest, callback: google.ai.generativelanguage.v1beta2.TextService.EmbedTextCallback): void; + + /** + * Calls EmbedText. + * @param request EmbedTextRequest message or plain object + * @returns Promise + */ + public embedText(request: google.ai.generativelanguage.v1beta2.IEmbedTextRequest): Promise; + } + + namespace TextService { + + /** + * Callback as used by {@link google.ai.generativelanguage.v1beta2.TextService|generateText}. + * @param error Error, if any + * @param [response] GenerateTextResponse + */ + type GenerateTextCallback = (error: (Error|null), response?: google.ai.generativelanguage.v1beta2.GenerateTextResponse) => void; + + /** + * Callback as used by {@link google.ai.generativelanguage.v1beta2.TextService|embedText}. + * @param error Error, if any + * @param [response] EmbedTextResponse + */ + type EmbedTextCallback = (error: (Error|null), response?: google.ai.generativelanguage.v1beta2.EmbedTextResponse) => void; + } + + /** Properties of a GenerateTextRequest. */ + interface IGenerateTextRequest { + + /** GenerateTextRequest model */ + model?: (string|null); + + /** GenerateTextRequest prompt */ + prompt?: (google.ai.generativelanguage.v1beta2.ITextPrompt|null); + + /** GenerateTextRequest temperature */ + temperature?: (number|null); + + /** GenerateTextRequest candidateCount */ + candidateCount?: (number|null); + + /** GenerateTextRequest maxOutputTokens */ + maxOutputTokens?: (number|null); + + /** GenerateTextRequest topP */ + topP?: (number|null); + + /** GenerateTextRequest topK */ + topK?: (number|null); + + /** GenerateTextRequest safetySettings */ + safetySettings?: (google.ai.generativelanguage.v1beta2.ISafetySetting[]|null); + + /** GenerateTextRequest stopSequences */ + stopSequences?: (string[]|null); + } + + /** Represents a GenerateTextRequest. */ + class GenerateTextRequest implements IGenerateTextRequest { + + /** + * Constructs a new GenerateTextRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ai.generativelanguage.v1beta2.IGenerateTextRequest); + + /** GenerateTextRequest model. */ + public model: string; + + /** GenerateTextRequest prompt. */ + public prompt?: (google.ai.generativelanguage.v1beta2.ITextPrompt|null); + + /** GenerateTextRequest temperature. */ + public temperature?: (number|null); + + /** GenerateTextRequest candidateCount. */ + public candidateCount?: (number|null); + + /** GenerateTextRequest maxOutputTokens. */ + public maxOutputTokens?: (number|null); + + /** GenerateTextRequest topP. */ + public topP?: (number|null); + + /** GenerateTextRequest topK. */ + public topK?: (number|null); + + /** GenerateTextRequest safetySettings. */ + public safetySettings: google.ai.generativelanguage.v1beta2.ISafetySetting[]; + + /** GenerateTextRequest stopSequences. */ + public stopSequences: string[]; + + /** GenerateTextRequest _temperature. */ + public _temperature?: "temperature"; + + /** GenerateTextRequest _candidateCount. */ + public _candidateCount?: "candidateCount"; + + /** GenerateTextRequest _maxOutputTokens. */ + public _maxOutputTokens?: "maxOutputTokens"; + + /** GenerateTextRequest _topP. */ + public _topP?: "topP"; + + /** GenerateTextRequest _topK. */ + public _topK?: "topK"; + + /** + * Creates a new GenerateTextRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GenerateTextRequest instance + */ + public static create(properties?: google.ai.generativelanguage.v1beta2.IGenerateTextRequest): google.ai.generativelanguage.v1beta2.GenerateTextRequest; + + /** + * Encodes the specified GenerateTextRequest message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.GenerateTextRequest.verify|verify} messages. + * @param message GenerateTextRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ai.generativelanguage.v1beta2.IGenerateTextRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GenerateTextRequest message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.GenerateTextRequest.verify|verify} messages. + * @param message GenerateTextRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ai.generativelanguage.v1beta2.IGenerateTextRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GenerateTextRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GenerateTextRequest + * @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.ai.generativelanguage.v1beta2.GenerateTextRequest; + + /** + * Decodes a GenerateTextRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GenerateTextRequest + * @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.ai.generativelanguage.v1beta2.GenerateTextRequest; + + /** + * Verifies a GenerateTextRequest 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 GenerateTextRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GenerateTextRequest + */ + public static fromObject(object: { [k: string]: any }): google.ai.generativelanguage.v1beta2.GenerateTextRequest; + + /** + * Creates a plain object from a GenerateTextRequest message. Also converts values to other types if specified. + * @param message GenerateTextRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ai.generativelanguage.v1beta2.GenerateTextRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GenerateTextRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GenerateTextRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GenerateTextResponse. */ + interface IGenerateTextResponse { + + /** GenerateTextResponse candidates */ + candidates?: (google.ai.generativelanguage.v1beta2.ITextCompletion[]|null); + + /** GenerateTextResponse filters */ + filters?: (google.ai.generativelanguage.v1beta2.IContentFilter[]|null); + + /** GenerateTextResponse safetyFeedback */ + safetyFeedback?: (google.ai.generativelanguage.v1beta2.ISafetyFeedback[]|null); + } + + /** Represents a GenerateTextResponse. */ + class GenerateTextResponse implements IGenerateTextResponse { + + /** + * Constructs a new GenerateTextResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ai.generativelanguage.v1beta2.IGenerateTextResponse); + + /** GenerateTextResponse candidates. */ + public candidates: google.ai.generativelanguage.v1beta2.ITextCompletion[]; + + /** GenerateTextResponse filters. */ + public filters: google.ai.generativelanguage.v1beta2.IContentFilter[]; + + /** GenerateTextResponse safetyFeedback. */ + public safetyFeedback: google.ai.generativelanguage.v1beta2.ISafetyFeedback[]; + + /** + * Creates a new GenerateTextResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GenerateTextResponse instance + */ + public static create(properties?: google.ai.generativelanguage.v1beta2.IGenerateTextResponse): google.ai.generativelanguage.v1beta2.GenerateTextResponse; + + /** + * Encodes the specified GenerateTextResponse message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.GenerateTextResponse.verify|verify} messages. + * @param message GenerateTextResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ai.generativelanguage.v1beta2.IGenerateTextResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GenerateTextResponse message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.GenerateTextResponse.verify|verify} messages. + * @param message GenerateTextResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ai.generativelanguage.v1beta2.IGenerateTextResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GenerateTextResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GenerateTextResponse + * @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.ai.generativelanguage.v1beta2.GenerateTextResponse; + + /** + * Decodes a GenerateTextResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GenerateTextResponse + * @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.ai.generativelanguage.v1beta2.GenerateTextResponse; + + /** + * Verifies a GenerateTextResponse 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 GenerateTextResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GenerateTextResponse + */ + public static fromObject(object: { [k: string]: any }): google.ai.generativelanguage.v1beta2.GenerateTextResponse; + + /** + * Creates a plain object from a GenerateTextResponse message. Also converts values to other types if specified. + * @param message GenerateTextResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ai.generativelanguage.v1beta2.GenerateTextResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GenerateTextResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GenerateTextResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TextPrompt. */ + interface ITextPrompt { + + /** TextPrompt text */ + text?: (string|null); + } + + /** Represents a TextPrompt. */ + class TextPrompt implements ITextPrompt { + + /** + * Constructs a new TextPrompt. + * @param [properties] Properties to set + */ + constructor(properties?: google.ai.generativelanguage.v1beta2.ITextPrompt); + + /** TextPrompt text. */ + public text: string; + + /** + * Creates a new TextPrompt instance using the specified properties. + * @param [properties] Properties to set + * @returns TextPrompt instance + */ + public static create(properties?: google.ai.generativelanguage.v1beta2.ITextPrompt): google.ai.generativelanguage.v1beta2.TextPrompt; + + /** + * Encodes the specified TextPrompt message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.TextPrompt.verify|verify} messages. + * @param message TextPrompt message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ai.generativelanguage.v1beta2.ITextPrompt, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TextPrompt message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.TextPrompt.verify|verify} messages. + * @param message TextPrompt message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ai.generativelanguage.v1beta2.ITextPrompt, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TextPrompt message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TextPrompt + * @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.ai.generativelanguage.v1beta2.TextPrompt; + + /** + * Decodes a TextPrompt message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TextPrompt + * @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.ai.generativelanguage.v1beta2.TextPrompt; + + /** + * Verifies a TextPrompt 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 TextPrompt message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TextPrompt + */ + public static fromObject(object: { [k: string]: any }): google.ai.generativelanguage.v1beta2.TextPrompt; + + /** + * Creates a plain object from a TextPrompt message. Also converts values to other types if specified. + * @param message TextPrompt + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ai.generativelanguage.v1beta2.TextPrompt, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TextPrompt to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TextPrompt + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TextCompletion. */ + interface ITextCompletion { + + /** TextCompletion output */ + output?: (string|null); + + /** TextCompletion safetyRatings */ + safetyRatings?: (google.ai.generativelanguage.v1beta2.ISafetyRating[]|null); + + /** TextCompletion citationMetadata */ + citationMetadata?: (google.ai.generativelanguage.v1beta2.ICitationMetadata|null); + } + + /** Represents a TextCompletion. */ + class TextCompletion implements ITextCompletion { + + /** + * Constructs a new TextCompletion. + * @param [properties] Properties to set + */ + constructor(properties?: google.ai.generativelanguage.v1beta2.ITextCompletion); + + /** TextCompletion output. */ + public output: string; + + /** TextCompletion safetyRatings. */ + public safetyRatings: google.ai.generativelanguage.v1beta2.ISafetyRating[]; + + /** TextCompletion citationMetadata. */ + public citationMetadata?: (google.ai.generativelanguage.v1beta2.ICitationMetadata|null); + + /** TextCompletion _citationMetadata. */ + public _citationMetadata?: "citationMetadata"; + + /** + * Creates a new TextCompletion instance using the specified properties. + * @param [properties] Properties to set + * @returns TextCompletion instance + */ + public static create(properties?: google.ai.generativelanguage.v1beta2.ITextCompletion): google.ai.generativelanguage.v1beta2.TextCompletion; + + /** + * Encodes the specified TextCompletion message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.TextCompletion.verify|verify} messages. + * @param message TextCompletion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ai.generativelanguage.v1beta2.ITextCompletion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TextCompletion message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.TextCompletion.verify|verify} messages. + * @param message TextCompletion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ai.generativelanguage.v1beta2.ITextCompletion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TextCompletion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TextCompletion + * @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.ai.generativelanguage.v1beta2.TextCompletion; + + /** + * Decodes a TextCompletion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TextCompletion + * @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.ai.generativelanguage.v1beta2.TextCompletion; + + /** + * Verifies a TextCompletion 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 TextCompletion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TextCompletion + */ + public static fromObject(object: { [k: string]: any }): google.ai.generativelanguage.v1beta2.TextCompletion; + + /** + * Creates a plain object from a TextCompletion message. Also converts values to other types if specified. + * @param message TextCompletion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ai.generativelanguage.v1beta2.TextCompletion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TextCompletion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TextCompletion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EmbedTextRequest. */ + interface IEmbedTextRequest { + + /** EmbedTextRequest model */ + model?: (string|null); + + /** EmbedTextRequest text */ + text?: (string|null); + } + + /** Represents an EmbedTextRequest. */ + class EmbedTextRequest implements IEmbedTextRequest { + + /** + * Constructs a new EmbedTextRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.ai.generativelanguage.v1beta2.IEmbedTextRequest); + + /** EmbedTextRequest model. */ + public model: string; + + /** EmbedTextRequest text. */ + public text: string; + + /** + * Creates a new EmbedTextRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns EmbedTextRequest instance + */ + public static create(properties?: google.ai.generativelanguage.v1beta2.IEmbedTextRequest): google.ai.generativelanguage.v1beta2.EmbedTextRequest; + + /** + * Encodes the specified EmbedTextRequest message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.EmbedTextRequest.verify|verify} messages. + * @param message EmbedTextRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ai.generativelanguage.v1beta2.IEmbedTextRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EmbedTextRequest message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.EmbedTextRequest.verify|verify} messages. + * @param message EmbedTextRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ai.generativelanguage.v1beta2.IEmbedTextRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EmbedTextRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EmbedTextRequest + * @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.ai.generativelanguage.v1beta2.EmbedTextRequest; + + /** + * Decodes an EmbedTextRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EmbedTextRequest + * @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.ai.generativelanguage.v1beta2.EmbedTextRequest; + + /** + * Verifies an EmbedTextRequest 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 EmbedTextRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EmbedTextRequest + */ + public static fromObject(object: { [k: string]: any }): google.ai.generativelanguage.v1beta2.EmbedTextRequest; + + /** + * Creates a plain object from an EmbedTextRequest message. Also converts values to other types if specified. + * @param message EmbedTextRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ai.generativelanguage.v1beta2.EmbedTextRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EmbedTextRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EmbedTextRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EmbedTextResponse. */ + interface IEmbedTextResponse { + + /** EmbedTextResponse embedding */ + embedding?: (google.ai.generativelanguage.v1beta2.IEmbedding|null); + } + + /** Represents an EmbedTextResponse. */ + class EmbedTextResponse implements IEmbedTextResponse { + + /** + * Constructs a new EmbedTextResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.ai.generativelanguage.v1beta2.IEmbedTextResponse); + + /** EmbedTextResponse embedding. */ + public embedding?: (google.ai.generativelanguage.v1beta2.IEmbedding|null); + + /** EmbedTextResponse _embedding. */ + public _embedding?: "embedding"; + + /** + * Creates a new EmbedTextResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns EmbedTextResponse instance + */ + public static create(properties?: google.ai.generativelanguage.v1beta2.IEmbedTextResponse): google.ai.generativelanguage.v1beta2.EmbedTextResponse; + + /** + * Encodes the specified EmbedTextResponse message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.EmbedTextResponse.verify|verify} messages. + * @param message EmbedTextResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ai.generativelanguage.v1beta2.IEmbedTextResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EmbedTextResponse message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.EmbedTextResponse.verify|verify} messages. + * @param message EmbedTextResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ai.generativelanguage.v1beta2.IEmbedTextResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EmbedTextResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EmbedTextResponse + * @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.ai.generativelanguage.v1beta2.EmbedTextResponse; + + /** + * Decodes an EmbedTextResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EmbedTextResponse + * @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.ai.generativelanguage.v1beta2.EmbedTextResponse; + + /** + * Verifies an EmbedTextResponse 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 EmbedTextResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EmbedTextResponse + */ + public static fromObject(object: { [k: string]: any }): google.ai.generativelanguage.v1beta2.EmbedTextResponse; + + /** + * Creates a plain object from an EmbedTextResponse message. Also converts values to other types if specified. + * @param message EmbedTextResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ai.generativelanguage.v1beta2.EmbedTextResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EmbedTextResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EmbedTextResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Embedding. */ + interface IEmbedding { + + /** Embedding value */ + value?: (number[]|null); + } + + /** Represents an Embedding. */ + class Embedding implements IEmbedding { + + /** + * Constructs a new Embedding. + * @param [properties] Properties to set + */ + constructor(properties?: google.ai.generativelanguage.v1beta2.IEmbedding); + + /** Embedding value. */ + public value: number[]; + + /** + * Creates a new Embedding instance using the specified properties. + * @param [properties] Properties to set + * @returns Embedding instance + */ + public static create(properties?: google.ai.generativelanguage.v1beta2.IEmbedding): google.ai.generativelanguage.v1beta2.Embedding; + + /** + * Encodes the specified Embedding message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.Embedding.verify|verify} messages. + * @param message Embedding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.ai.generativelanguage.v1beta2.IEmbedding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Embedding message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.Embedding.verify|verify} messages. + * @param message Embedding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.ai.generativelanguage.v1beta2.IEmbedding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Embedding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Embedding + * @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.ai.generativelanguage.v1beta2.Embedding; + + /** + * Decodes an Embedding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Embedding + * @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.ai.generativelanguage.v1beta2.Embedding; + + /** + * Verifies an Embedding 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 Embedding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Embedding + */ + public static fromObject(object: { [k: string]: any }): google.ai.generativelanguage.v1beta2.Embedding; + + /** + * Creates a plain object from an Embedding message. Also converts values to other types if specified. + * @param message Embedding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.ai.generativelanguage.v1beta2.Embedding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Embedding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Embedding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7 + } + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @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.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @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.api.Http; + + /** + * Verifies a Http 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 Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @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.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @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.api.HttpRule; + + /** + * Verifies a HttpRule 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 HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @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.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @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.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern 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 CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @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.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @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.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor 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 ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @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.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @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.api.ResourceReference; + + /** + * Verifies a ResourceReference 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 ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @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.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @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.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet 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 FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (string|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** FileDescriptorProto edition. */ + public edition: string; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @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.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @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.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto 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 FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @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.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @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.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto 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 DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @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.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @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.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange 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 ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @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.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @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.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange 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 ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @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.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @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.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions 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 ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @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.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @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.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto 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 FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @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.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @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.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto 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 OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @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.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @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.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto 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 EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @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.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @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.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange 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 EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @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.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @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.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto 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 EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @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.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @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.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto 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 ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @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.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @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.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto 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 MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @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.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @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.protobuf.FileOptions; + + /** + * Verifies a FileOptions 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 FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @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.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @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.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions 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 MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @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.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @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.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions 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 FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @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.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @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.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions 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 OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @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.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @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.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions 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 EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @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.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @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.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions 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 EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @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.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @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.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions 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 ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @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.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @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.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions 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 MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @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.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @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.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption 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 UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @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.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @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.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart 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 NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @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.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @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.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo 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 SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @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.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @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.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location 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 Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @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.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @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.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo 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 GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @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.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @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.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation 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 Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } + } + } + } +} diff --git a/packages/google-ai-generativelanguage/protos/protos.js b/packages/google-ai-generativelanguage/protos/protos.js new file mode 100644 index 00000000000..af3afab1ab4 --- /dev/null +++ b/packages/google-ai-generativelanguage/protos/protos.js @@ -0,0 +1,18332 @@ +// Copyright 2023 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. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._google_ai_generativelanguage_protos || ($protobuf.roots._google_ai_generativelanguage_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.ai = (function() { + + /** + * Namespace ai. + * @memberof google + * @namespace + */ + var ai = {}; + + ai.generativelanguage = (function() { + + /** + * Namespace generativelanguage. + * @memberof google.ai + * @namespace + */ + var generativelanguage = {}; + + generativelanguage.v1beta2 = (function() { + + /** + * Namespace v1beta2. + * @memberof google.ai.generativelanguage + * @namespace + */ + var v1beta2 = {}; + + v1beta2.CitationMetadata = (function() { + + /** + * Properties of a CitationMetadata. + * @memberof google.ai.generativelanguage.v1beta2 + * @interface ICitationMetadata + * @property {Array.|null} [citationSources] CitationMetadata citationSources + */ + + /** + * Constructs a new CitationMetadata. + * @memberof google.ai.generativelanguage.v1beta2 + * @classdesc Represents a CitationMetadata. + * @implements ICitationMetadata + * @constructor + * @param {google.ai.generativelanguage.v1beta2.ICitationMetadata=} [properties] Properties to set + */ + function CitationMetadata(properties) { + this.citationSources = []; + 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]]; + } + + /** + * CitationMetadata citationSources. + * @member {Array.} citationSources + * @memberof google.ai.generativelanguage.v1beta2.CitationMetadata + * @instance + */ + CitationMetadata.prototype.citationSources = $util.emptyArray; + + /** + * Creates a new CitationMetadata instance using the specified properties. + * @function create + * @memberof google.ai.generativelanguage.v1beta2.CitationMetadata + * @static + * @param {google.ai.generativelanguage.v1beta2.ICitationMetadata=} [properties] Properties to set + * @returns {google.ai.generativelanguage.v1beta2.CitationMetadata} CitationMetadata instance + */ + CitationMetadata.create = function create(properties) { + return new CitationMetadata(properties); + }; + + /** + * Encodes the specified CitationMetadata message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.CitationMetadata.verify|verify} messages. + * @function encode + * @memberof google.ai.generativelanguage.v1beta2.CitationMetadata + * @static + * @param {google.ai.generativelanguage.v1beta2.ICitationMetadata} message CitationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CitationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.citationSources != null && message.citationSources.length) + for (var i = 0; i < message.citationSources.length; ++i) + $root.google.ai.generativelanguage.v1beta2.CitationSource.encode(message.citationSources[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CitationMetadata message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.CitationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.CitationMetadata + * @static + * @param {google.ai.generativelanguage.v1beta2.ICitationMetadata} message CitationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CitationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CitationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.ai.generativelanguage.v1beta2.CitationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ai.generativelanguage.v1beta2.CitationMetadata} CitationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CitationMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ai.generativelanguage.v1beta2.CitationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.citationSources && message.citationSources.length)) + message.citationSources = []; + message.citationSources.push($root.google.ai.generativelanguage.v1beta2.CitationSource.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CitationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.CitationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ai.generativelanguage.v1beta2.CitationMetadata} CitationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CitationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CitationMetadata message. + * @function verify + * @memberof google.ai.generativelanguage.v1beta2.CitationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CitationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.citationSources != null && message.hasOwnProperty("citationSources")) { + if (!Array.isArray(message.citationSources)) + return "citationSources: array expected"; + for (var i = 0; i < message.citationSources.length; ++i) { + var error = $root.google.ai.generativelanguage.v1beta2.CitationSource.verify(message.citationSources[i]); + if (error) + return "citationSources." + error; + } + } + return null; + }; + + /** + * Creates a CitationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ai.generativelanguage.v1beta2.CitationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.ai.generativelanguage.v1beta2.CitationMetadata} CitationMetadata + */ + CitationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.ai.generativelanguage.v1beta2.CitationMetadata) + return object; + var message = new $root.google.ai.generativelanguage.v1beta2.CitationMetadata(); + if (object.citationSources) { + if (!Array.isArray(object.citationSources)) + throw TypeError(".google.ai.generativelanguage.v1beta2.CitationMetadata.citationSources: array expected"); + message.citationSources = []; + for (var i = 0; i < object.citationSources.length; ++i) { + if (typeof object.citationSources[i] !== "object") + throw TypeError(".google.ai.generativelanguage.v1beta2.CitationMetadata.citationSources: object expected"); + message.citationSources[i] = $root.google.ai.generativelanguage.v1beta2.CitationSource.fromObject(object.citationSources[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CitationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ai.generativelanguage.v1beta2.CitationMetadata + * @static + * @param {google.ai.generativelanguage.v1beta2.CitationMetadata} message CitationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CitationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.citationSources = []; + if (message.citationSources && message.citationSources.length) { + object.citationSources = []; + for (var j = 0; j < message.citationSources.length; ++j) + object.citationSources[j] = $root.google.ai.generativelanguage.v1beta2.CitationSource.toObject(message.citationSources[j], options); + } + return object; + }; + + /** + * Converts this CitationMetadata to JSON. + * @function toJSON + * @memberof google.ai.generativelanguage.v1beta2.CitationMetadata + * @instance + * @returns {Object.} JSON object + */ + CitationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CitationMetadata + * @function getTypeUrl + * @memberof google.ai.generativelanguage.v1beta2.CitationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CitationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ai.generativelanguage.v1beta2.CitationMetadata"; + }; + + return CitationMetadata; + })(); + + v1beta2.CitationSource = (function() { + + /** + * Properties of a CitationSource. + * @memberof google.ai.generativelanguage.v1beta2 + * @interface ICitationSource + * @property {number|null} [startIndex] CitationSource startIndex + * @property {number|null} [endIndex] CitationSource endIndex + * @property {string|null} [uri] CitationSource uri + * @property {string|null} [license] CitationSource license + */ + + /** + * Constructs a new CitationSource. + * @memberof google.ai.generativelanguage.v1beta2 + * @classdesc Represents a CitationSource. + * @implements ICitationSource + * @constructor + * @param {google.ai.generativelanguage.v1beta2.ICitationSource=} [properties] Properties to set + */ + function CitationSource(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]]; + } + + /** + * CitationSource startIndex. + * @member {number|null|undefined} startIndex + * @memberof google.ai.generativelanguage.v1beta2.CitationSource + * @instance + */ + CitationSource.prototype.startIndex = null; + + /** + * CitationSource endIndex. + * @member {number|null|undefined} endIndex + * @memberof google.ai.generativelanguage.v1beta2.CitationSource + * @instance + */ + CitationSource.prototype.endIndex = null; + + /** + * CitationSource uri. + * @member {string|null|undefined} uri + * @memberof google.ai.generativelanguage.v1beta2.CitationSource + * @instance + */ + CitationSource.prototype.uri = null; + + /** + * CitationSource license. + * @member {string|null|undefined} license + * @memberof google.ai.generativelanguage.v1beta2.CitationSource + * @instance + */ + CitationSource.prototype.license = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CitationSource _startIndex. + * @member {"startIndex"|undefined} _startIndex + * @memberof google.ai.generativelanguage.v1beta2.CitationSource + * @instance + */ + Object.defineProperty(CitationSource.prototype, "_startIndex", { + get: $util.oneOfGetter($oneOfFields = ["startIndex"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * CitationSource _endIndex. + * @member {"endIndex"|undefined} _endIndex + * @memberof google.ai.generativelanguage.v1beta2.CitationSource + * @instance + */ + Object.defineProperty(CitationSource.prototype, "_endIndex", { + get: $util.oneOfGetter($oneOfFields = ["endIndex"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * CitationSource _uri. + * @member {"uri"|undefined} _uri + * @memberof google.ai.generativelanguage.v1beta2.CitationSource + * @instance + */ + Object.defineProperty(CitationSource.prototype, "_uri", { + get: $util.oneOfGetter($oneOfFields = ["uri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * CitationSource _license. + * @member {"license"|undefined} _license + * @memberof google.ai.generativelanguage.v1beta2.CitationSource + * @instance + */ + Object.defineProperty(CitationSource.prototype, "_license", { + get: $util.oneOfGetter($oneOfFields = ["license"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CitationSource instance using the specified properties. + * @function create + * @memberof google.ai.generativelanguage.v1beta2.CitationSource + * @static + * @param {google.ai.generativelanguage.v1beta2.ICitationSource=} [properties] Properties to set + * @returns {google.ai.generativelanguage.v1beta2.CitationSource} CitationSource instance + */ + CitationSource.create = function create(properties) { + return new CitationSource(properties); + }; + + /** + * Encodes the specified CitationSource message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.CitationSource.verify|verify} messages. + * @function encode + * @memberof google.ai.generativelanguage.v1beta2.CitationSource + * @static + * @param {google.ai.generativelanguage.v1beta2.ICitationSource} message CitationSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CitationSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startIndex != null && Object.hasOwnProperty.call(message, "startIndex")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.startIndex); + if (message.endIndex != null && Object.hasOwnProperty.call(message, "endIndex")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.endIndex); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.uri); + if (message.license != null && Object.hasOwnProperty.call(message, "license")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.license); + return writer; + }; + + /** + * Encodes the specified CitationSource message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.CitationSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.CitationSource + * @static + * @param {google.ai.generativelanguage.v1beta2.ICitationSource} message CitationSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CitationSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CitationSource message from the specified reader or buffer. + * @function decode + * @memberof google.ai.generativelanguage.v1beta2.CitationSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ai.generativelanguage.v1beta2.CitationSource} CitationSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CitationSource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ai.generativelanguage.v1beta2.CitationSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.startIndex = reader.int32(); + break; + } + case 2: { + message.endIndex = reader.int32(); + break; + } + case 3: { + message.uri = reader.string(); + break; + } + case 4: { + message.license = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CitationSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.CitationSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ai.generativelanguage.v1beta2.CitationSource} CitationSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CitationSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CitationSource message. + * @function verify + * @memberof google.ai.generativelanguage.v1beta2.CitationSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CitationSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.startIndex != null && message.hasOwnProperty("startIndex")) { + properties._startIndex = 1; + if (!$util.isInteger(message.startIndex)) + return "startIndex: integer expected"; + } + if (message.endIndex != null && message.hasOwnProperty("endIndex")) { + properties._endIndex = 1; + if (!$util.isInteger(message.endIndex)) + return "endIndex: integer expected"; + } + if (message.uri != null && message.hasOwnProperty("uri")) { + properties._uri = 1; + if (!$util.isString(message.uri)) + return "uri: string expected"; + } + if (message.license != null && message.hasOwnProperty("license")) { + properties._license = 1; + if (!$util.isString(message.license)) + return "license: string expected"; + } + return null; + }; + + /** + * Creates a CitationSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ai.generativelanguage.v1beta2.CitationSource + * @static + * @param {Object.} object Plain object + * @returns {google.ai.generativelanguage.v1beta2.CitationSource} CitationSource + */ + CitationSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.ai.generativelanguage.v1beta2.CitationSource) + return object; + var message = new $root.google.ai.generativelanguage.v1beta2.CitationSource(); + if (object.startIndex != null) + message.startIndex = object.startIndex | 0; + if (object.endIndex != null) + message.endIndex = object.endIndex | 0; + if (object.uri != null) + message.uri = String(object.uri); + if (object.license != null) + message.license = String(object.license); + return message; + }; + + /** + * Creates a plain object from a CitationSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ai.generativelanguage.v1beta2.CitationSource + * @static + * @param {google.ai.generativelanguage.v1beta2.CitationSource} message CitationSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CitationSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.startIndex != null && message.hasOwnProperty("startIndex")) { + object.startIndex = message.startIndex; + if (options.oneofs) + object._startIndex = "startIndex"; + } + if (message.endIndex != null && message.hasOwnProperty("endIndex")) { + object.endIndex = message.endIndex; + if (options.oneofs) + object._endIndex = "endIndex"; + } + if (message.uri != null && message.hasOwnProperty("uri")) { + object.uri = message.uri; + if (options.oneofs) + object._uri = "uri"; + } + if (message.license != null && message.hasOwnProperty("license")) { + object.license = message.license; + if (options.oneofs) + object._license = "license"; + } + return object; + }; + + /** + * Converts this CitationSource to JSON. + * @function toJSON + * @memberof google.ai.generativelanguage.v1beta2.CitationSource + * @instance + * @returns {Object.} JSON object + */ + CitationSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CitationSource + * @function getTypeUrl + * @memberof google.ai.generativelanguage.v1beta2.CitationSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CitationSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ai.generativelanguage.v1beta2.CitationSource"; + }; + + return CitationSource; + })(); + + v1beta2.DiscussService = (function() { + + /** + * Constructs a new DiscussService service. + * @memberof google.ai.generativelanguage.v1beta2 + * @classdesc Represents a DiscussService + * @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 DiscussService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (DiscussService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DiscussService; + + /** + * Creates new DiscussService service using the specified rpc implementation. + * @function create + * @memberof google.ai.generativelanguage.v1beta2.DiscussService + * @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 {DiscussService} RPC service. Useful where requests and/or responses are streamed. + */ + DiscussService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ai.generativelanguage.v1beta2.DiscussService|generateMessage}. + * @memberof google.ai.generativelanguage.v1beta2.DiscussService + * @typedef GenerateMessageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ai.generativelanguage.v1beta2.GenerateMessageResponse} [response] GenerateMessageResponse + */ + + /** + * Calls GenerateMessage. + * @function generateMessage + * @memberof google.ai.generativelanguage.v1beta2.DiscussService + * @instance + * @param {google.ai.generativelanguage.v1beta2.IGenerateMessageRequest} request GenerateMessageRequest message or plain object + * @param {google.ai.generativelanguage.v1beta2.DiscussService.GenerateMessageCallback} callback Node-style callback called with the error, if any, and GenerateMessageResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DiscussService.prototype.generateMessage = function generateMessage(request, callback) { + return this.rpcCall(generateMessage, $root.google.ai.generativelanguage.v1beta2.GenerateMessageRequest, $root.google.ai.generativelanguage.v1beta2.GenerateMessageResponse, request, callback); + }, "name", { value: "GenerateMessage" }); + + /** + * Calls GenerateMessage. + * @function generateMessage + * @memberof google.ai.generativelanguage.v1beta2.DiscussService + * @instance + * @param {google.ai.generativelanguage.v1beta2.IGenerateMessageRequest} request GenerateMessageRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ai.generativelanguage.v1beta2.DiscussService|countMessageTokens}. + * @memberof google.ai.generativelanguage.v1beta2.DiscussService + * @typedef CountMessageTokensCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ai.generativelanguage.v1beta2.CountMessageTokensResponse} [response] CountMessageTokensResponse + */ + + /** + * Calls CountMessageTokens. + * @function countMessageTokens + * @memberof google.ai.generativelanguage.v1beta2.DiscussService + * @instance + * @param {google.ai.generativelanguage.v1beta2.ICountMessageTokensRequest} request CountMessageTokensRequest message or plain object + * @param {google.ai.generativelanguage.v1beta2.DiscussService.CountMessageTokensCallback} callback Node-style callback called with the error, if any, and CountMessageTokensResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DiscussService.prototype.countMessageTokens = function countMessageTokens(request, callback) { + return this.rpcCall(countMessageTokens, $root.google.ai.generativelanguage.v1beta2.CountMessageTokensRequest, $root.google.ai.generativelanguage.v1beta2.CountMessageTokensResponse, request, callback); + }, "name", { value: "CountMessageTokens" }); + + /** + * Calls CountMessageTokens. + * @function countMessageTokens + * @memberof google.ai.generativelanguage.v1beta2.DiscussService + * @instance + * @param {google.ai.generativelanguage.v1beta2.ICountMessageTokensRequest} request CountMessageTokensRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return DiscussService; + })(); + + v1beta2.GenerateMessageRequest = (function() { + + /** + * Properties of a GenerateMessageRequest. + * @memberof google.ai.generativelanguage.v1beta2 + * @interface IGenerateMessageRequest + * @property {string|null} [model] GenerateMessageRequest model + * @property {google.ai.generativelanguage.v1beta2.IMessagePrompt|null} [prompt] GenerateMessageRequest prompt + * @property {number|null} [temperature] GenerateMessageRequest temperature + * @property {number|null} [candidateCount] GenerateMessageRequest candidateCount + * @property {number|null} [topP] GenerateMessageRequest topP + * @property {number|null} [topK] GenerateMessageRequest topK + */ + + /** + * Constructs a new GenerateMessageRequest. + * @memberof google.ai.generativelanguage.v1beta2 + * @classdesc Represents a GenerateMessageRequest. + * @implements IGenerateMessageRequest + * @constructor + * @param {google.ai.generativelanguage.v1beta2.IGenerateMessageRequest=} [properties] Properties to set + */ + function GenerateMessageRequest(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]]; + } + + /** + * GenerateMessageRequest model. + * @member {string} model + * @memberof google.ai.generativelanguage.v1beta2.GenerateMessageRequest + * @instance + */ + GenerateMessageRequest.prototype.model = ""; + + /** + * GenerateMessageRequest prompt. + * @member {google.ai.generativelanguage.v1beta2.IMessagePrompt|null|undefined} prompt + * @memberof google.ai.generativelanguage.v1beta2.GenerateMessageRequest + * @instance + */ + GenerateMessageRequest.prototype.prompt = null; + + /** + * GenerateMessageRequest temperature. + * @member {number|null|undefined} temperature + * @memberof google.ai.generativelanguage.v1beta2.GenerateMessageRequest + * @instance + */ + GenerateMessageRequest.prototype.temperature = null; + + /** + * GenerateMessageRequest candidateCount. + * @member {number|null|undefined} candidateCount + * @memberof google.ai.generativelanguage.v1beta2.GenerateMessageRequest + * @instance + */ + GenerateMessageRequest.prototype.candidateCount = null; + + /** + * GenerateMessageRequest topP. + * @member {number|null|undefined} topP + * @memberof google.ai.generativelanguage.v1beta2.GenerateMessageRequest + * @instance + */ + GenerateMessageRequest.prototype.topP = null; + + /** + * GenerateMessageRequest topK. + * @member {number|null|undefined} topK + * @memberof google.ai.generativelanguage.v1beta2.GenerateMessageRequest + * @instance + */ + GenerateMessageRequest.prototype.topK = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GenerateMessageRequest _temperature. + * @member {"temperature"|undefined} _temperature + * @memberof google.ai.generativelanguage.v1beta2.GenerateMessageRequest + * @instance + */ + Object.defineProperty(GenerateMessageRequest.prototype, "_temperature", { + get: $util.oneOfGetter($oneOfFields = ["temperature"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * GenerateMessageRequest _candidateCount. + * @member {"candidateCount"|undefined} _candidateCount + * @memberof google.ai.generativelanguage.v1beta2.GenerateMessageRequest + * @instance + */ + Object.defineProperty(GenerateMessageRequest.prototype, "_candidateCount", { + get: $util.oneOfGetter($oneOfFields = ["candidateCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * GenerateMessageRequest _topP. + * @member {"topP"|undefined} _topP + * @memberof google.ai.generativelanguage.v1beta2.GenerateMessageRequest + * @instance + */ + Object.defineProperty(GenerateMessageRequest.prototype, "_topP", { + get: $util.oneOfGetter($oneOfFields = ["topP"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * GenerateMessageRequest _topK. + * @member {"topK"|undefined} _topK + * @memberof google.ai.generativelanguage.v1beta2.GenerateMessageRequest + * @instance + */ + Object.defineProperty(GenerateMessageRequest.prototype, "_topK", { + get: $util.oneOfGetter($oneOfFields = ["topK"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GenerateMessageRequest instance using the specified properties. + * @function create + * @memberof google.ai.generativelanguage.v1beta2.GenerateMessageRequest + * @static + * @param {google.ai.generativelanguage.v1beta2.IGenerateMessageRequest=} [properties] Properties to set + * @returns {google.ai.generativelanguage.v1beta2.GenerateMessageRequest} GenerateMessageRequest instance + */ + GenerateMessageRequest.create = function create(properties) { + return new GenerateMessageRequest(properties); + }; + + /** + * Encodes the specified GenerateMessageRequest message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.GenerateMessageRequest.verify|verify} messages. + * @function encode + * @memberof google.ai.generativelanguage.v1beta2.GenerateMessageRequest + * @static + * @param {google.ai.generativelanguage.v1beta2.IGenerateMessageRequest} message GenerateMessageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateMessageRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.model != null && Object.hasOwnProperty.call(message, "model")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.model); + if (message.prompt != null && Object.hasOwnProperty.call(message, "prompt")) + $root.google.ai.generativelanguage.v1beta2.MessagePrompt.encode(message.prompt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.temperature != null && Object.hasOwnProperty.call(message, "temperature")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.temperature); + if (message.candidateCount != null && Object.hasOwnProperty.call(message, "candidateCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.candidateCount); + if (message.topP != null && Object.hasOwnProperty.call(message, "topP")) + writer.uint32(/* id 5, wireType 5 =*/45).float(message.topP); + if (message.topK != null && Object.hasOwnProperty.call(message, "topK")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.topK); + return writer; + }; + + /** + * Encodes the specified GenerateMessageRequest message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.GenerateMessageRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.GenerateMessageRequest + * @static + * @param {google.ai.generativelanguage.v1beta2.IGenerateMessageRequest} message GenerateMessageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateMessageRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenerateMessageRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ai.generativelanguage.v1beta2.GenerateMessageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ai.generativelanguage.v1beta2.GenerateMessageRequest} GenerateMessageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateMessageRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ai.generativelanguage.v1beta2.GenerateMessageRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.model = reader.string(); + break; + } + case 2: { + message.prompt = $root.google.ai.generativelanguage.v1beta2.MessagePrompt.decode(reader, reader.uint32()); + break; + } + case 3: { + message.temperature = reader.float(); + break; + } + case 4: { + message.candidateCount = reader.int32(); + break; + } + case 5: { + message.topP = reader.float(); + break; + } + case 6: { + message.topK = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenerateMessageRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.GenerateMessageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ai.generativelanguage.v1beta2.GenerateMessageRequest} GenerateMessageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateMessageRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenerateMessageRequest message. + * @function verify + * @memberof google.ai.generativelanguage.v1beta2.GenerateMessageRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenerateMessageRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.model != null && message.hasOwnProperty("model")) + if (!$util.isString(message.model)) + return "model: string expected"; + if (message.prompt != null && message.hasOwnProperty("prompt")) { + var error = $root.google.ai.generativelanguage.v1beta2.MessagePrompt.verify(message.prompt); + if (error) + return "prompt." + error; + } + if (message.temperature != null && message.hasOwnProperty("temperature")) { + properties._temperature = 1; + if (typeof message.temperature !== "number") + return "temperature: number expected"; + } + if (message.candidateCount != null && message.hasOwnProperty("candidateCount")) { + properties._candidateCount = 1; + if (!$util.isInteger(message.candidateCount)) + return "candidateCount: integer expected"; + } + if (message.topP != null && message.hasOwnProperty("topP")) { + properties._topP = 1; + if (typeof message.topP !== "number") + return "topP: number expected"; + } + if (message.topK != null && message.hasOwnProperty("topK")) { + properties._topK = 1; + if (!$util.isInteger(message.topK)) + return "topK: integer expected"; + } + return null; + }; + + /** + * Creates a GenerateMessageRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ai.generativelanguage.v1beta2.GenerateMessageRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ai.generativelanguage.v1beta2.GenerateMessageRequest} GenerateMessageRequest + */ + GenerateMessageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ai.generativelanguage.v1beta2.GenerateMessageRequest) + return object; + var message = new $root.google.ai.generativelanguage.v1beta2.GenerateMessageRequest(); + if (object.model != null) + message.model = String(object.model); + if (object.prompt != null) { + if (typeof object.prompt !== "object") + throw TypeError(".google.ai.generativelanguage.v1beta2.GenerateMessageRequest.prompt: object expected"); + message.prompt = $root.google.ai.generativelanguage.v1beta2.MessagePrompt.fromObject(object.prompt); + } + if (object.temperature != null) + message.temperature = Number(object.temperature); + if (object.candidateCount != null) + message.candidateCount = object.candidateCount | 0; + if (object.topP != null) + message.topP = Number(object.topP); + if (object.topK != null) + message.topK = object.topK | 0; + return message; + }; + + /** + * Creates a plain object from a GenerateMessageRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ai.generativelanguage.v1beta2.GenerateMessageRequest + * @static + * @param {google.ai.generativelanguage.v1beta2.GenerateMessageRequest} message GenerateMessageRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenerateMessageRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.model = ""; + object.prompt = null; + } + if (message.model != null && message.hasOwnProperty("model")) + object.model = message.model; + if (message.prompt != null && message.hasOwnProperty("prompt")) + object.prompt = $root.google.ai.generativelanguage.v1beta2.MessagePrompt.toObject(message.prompt, options); + if (message.temperature != null && message.hasOwnProperty("temperature")) { + object.temperature = options.json && !isFinite(message.temperature) ? String(message.temperature) : message.temperature; + if (options.oneofs) + object._temperature = "temperature"; + } + if (message.candidateCount != null && message.hasOwnProperty("candidateCount")) { + object.candidateCount = message.candidateCount; + if (options.oneofs) + object._candidateCount = "candidateCount"; + } + if (message.topP != null && message.hasOwnProperty("topP")) { + object.topP = options.json && !isFinite(message.topP) ? String(message.topP) : message.topP; + if (options.oneofs) + object._topP = "topP"; + } + if (message.topK != null && message.hasOwnProperty("topK")) { + object.topK = message.topK; + if (options.oneofs) + object._topK = "topK"; + } + return object; + }; + + /** + * Converts this GenerateMessageRequest to JSON. + * @function toJSON + * @memberof google.ai.generativelanguage.v1beta2.GenerateMessageRequest + * @instance + * @returns {Object.} JSON object + */ + GenerateMessageRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GenerateMessageRequest + * @function getTypeUrl + * @memberof google.ai.generativelanguage.v1beta2.GenerateMessageRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GenerateMessageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ai.generativelanguage.v1beta2.GenerateMessageRequest"; + }; + + return GenerateMessageRequest; + })(); + + v1beta2.GenerateMessageResponse = (function() { + + /** + * Properties of a GenerateMessageResponse. + * @memberof google.ai.generativelanguage.v1beta2 + * @interface IGenerateMessageResponse + * @property {Array.|null} [candidates] GenerateMessageResponse candidates + * @property {Array.|null} [messages] GenerateMessageResponse messages + * @property {Array.|null} [filters] GenerateMessageResponse filters + */ + + /** + * Constructs a new GenerateMessageResponse. + * @memberof google.ai.generativelanguage.v1beta2 + * @classdesc Represents a GenerateMessageResponse. + * @implements IGenerateMessageResponse + * @constructor + * @param {google.ai.generativelanguage.v1beta2.IGenerateMessageResponse=} [properties] Properties to set + */ + function GenerateMessageResponse(properties) { + this.candidates = []; + this.messages = []; + this.filters = []; + 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]]; + } + + /** + * GenerateMessageResponse candidates. + * @member {Array.} candidates + * @memberof google.ai.generativelanguage.v1beta2.GenerateMessageResponse + * @instance + */ + GenerateMessageResponse.prototype.candidates = $util.emptyArray; + + /** + * GenerateMessageResponse messages. + * @member {Array.} messages + * @memberof google.ai.generativelanguage.v1beta2.GenerateMessageResponse + * @instance + */ + GenerateMessageResponse.prototype.messages = $util.emptyArray; + + /** + * GenerateMessageResponse filters. + * @member {Array.} filters + * @memberof google.ai.generativelanguage.v1beta2.GenerateMessageResponse + * @instance + */ + GenerateMessageResponse.prototype.filters = $util.emptyArray; + + /** + * Creates a new GenerateMessageResponse instance using the specified properties. + * @function create + * @memberof google.ai.generativelanguage.v1beta2.GenerateMessageResponse + * @static + * @param {google.ai.generativelanguage.v1beta2.IGenerateMessageResponse=} [properties] Properties to set + * @returns {google.ai.generativelanguage.v1beta2.GenerateMessageResponse} GenerateMessageResponse instance + */ + GenerateMessageResponse.create = function create(properties) { + return new GenerateMessageResponse(properties); + }; + + /** + * Encodes the specified GenerateMessageResponse message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.GenerateMessageResponse.verify|verify} messages. + * @function encode + * @memberof google.ai.generativelanguage.v1beta2.GenerateMessageResponse + * @static + * @param {google.ai.generativelanguage.v1beta2.IGenerateMessageResponse} message GenerateMessageResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateMessageResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.candidates != null && message.candidates.length) + for (var i = 0; i < message.candidates.length; ++i) + $root.google.ai.generativelanguage.v1beta2.Message.encode(message.candidates[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.messages != null && message.messages.length) + for (var i = 0; i < message.messages.length; ++i) + $root.google.ai.generativelanguage.v1beta2.Message.encode(message.messages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.filters != null && message.filters.length) + for (var i = 0; i < message.filters.length; ++i) + $root.google.ai.generativelanguage.v1beta2.ContentFilter.encode(message.filters[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GenerateMessageResponse message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.GenerateMessageResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.GenerateMessageResponse + * @static + * @param {google.ai.generativelanguage.v1beta2.IGenerateMessageResponse} message GenerateMessageResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateMessageResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenerateMessageResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ai.generativelanguage.v1beta2.GenerateMessageResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ai.generativelanguage.v1beta2.GenerateMessageResponse} GenerateMessageResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateMessageResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ai.generativelanguage.v1beta2.GenerateMessageResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.candidates && message.candidates.length)) + message.candidates = []; + message.candidates.push($root.google.ai.generativelanguage.v1beta2.Message.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.messages && message.messages.length)) + message.messages = []; + message.messages.push($root.google.ai.generativelanguage.v1beta2.Message.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.filters && message.filters.length)) + message.filters = []; + message.filters.push($root.google.ai.generativelanguage.v1beta2.ContentFilter.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenerateMessageResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.GenerateMessageResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ai.generativelanguage.v1beta2.GenerateMessageResponse} GenerateMessageResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateMessageResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenerateMessageResponse message. + * @function verify + * @memberof google.ai.generativelanguage.v1beta2.GenerateMessageResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenerateMessageResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.candidates != null && message.hasOwnProperty("candidates")) { + if (!Array.isArray(message.candidates)) + return "candidates: array expected"; + for (var i = 0; i < message.candidates.length; ++i) { + var error = $root.google.ai.generativelanguage.v1beta2.Message.verify(message.candidates[i]); + if (error) + return "candidates." + error; + } + } + if (message.messages != null && message.hasOwnProperty("messages")) { + if (!Array.isArray(message.messages)) + return "messages: array expected"; + for (var i = 0; i < message.messages.length; ++i) { + var error = $root.google.ai.generativelanguage.v1beta2.Message.verify(message.messages[i]); + if (error) + return "messages." + error; + } + } + if (message.filters != null && message.hasOwnProperty("filters")) { + if (!Array.isArray(message.filters)) + return "filters: array expected"; + for (var i = 0; i < message.filters.length; ++i) { + var error = $root.google.ai.generativelanguage.v1beta2.ContentFilter.verify(message.filters[i]); + if (error) + return "filters." + error; + } + } + return null; + }; + + /** + * Creates a GenerateMessageResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ai.generativelanguage.v1beta2.GenerateMessageResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ai.generativelanguage.v1beta2.GenerateMessageResponse} GenerateMessageResponse + */ + GenerateMessageResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ai.generativelanguage.v1beta2.GenerateMessageResponse) + return object; + var message = new $root.google.ai.generativelanguage.v1beta2.GenerateMessageResponse(); + if (object.candidates) { + if (!Array.isArray(object.candidates)) + throw TypeError(".google.ai.generativelanguage.v1beta2.GenerateMessageResponse.candidates: array expected"); + message.candidates = []; + for (var i = 0; i < object.candidates.length; ++i) { + if (typeof object.candidates[i] !== "object") + throw TypeError(".google.ai.generativelanguage.v1beta2.GenerateMessageResponse.candidates: object expected"); + message.candidates[i] = $root.google.ai.generativelanguage.v1beta2.Message.fromObject(object.candidates[i]); + } + } + if (object.messages) { + if (!Array.isArray(object.messages)) + throw TypeError(".google.ai.generativelanguage.v1beta2.GenerateMessageResponse.messages: array expected"); + message.messages = []; + for (var i = 0; i < object.messages.length; ++i) { + if (typeof object.messages[i] !== "object") + throw TypeError(".google.ai.generativelanguage.v1beta2.GenerateMessageResponse.messages: object expected"); + message.messages[i] = $root.google.ai.generativelanguage.v1beta2.Message.fromObject(object.messages[i]); + } + } + if (object.filters) { + if (!Array.isArray(object.filters)) + throw TypeError(".google.ai.generativelanguage.v1beta2.GenerateMessageResponse.filters: array expected"); + message.filters = []; + for (var i = 0; i < object.filters.length; ++i) { + if (typeof object.filters[i] !== "object") + throw TypeError(".google.ai.generativelanguage.v1beta2.GenerateMessageResponse.filters: object expected"); + message.filters[i] = $root.google.ai.generativelanguage.v1beta2.ContentFilter.fromObject(object.filters[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GenerateMessageResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ai.generativelanguage.v1beta2.GenerateMessageResponse + * @static + * @param {google.ai.generativelanguage.v1beta2.GenerateMessageResponse} message GenerateMessageResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenerateMessageResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.candidates = []; + object.messages = []; + object.filters = []; + } + if (message.candidates && message.candidates.length) { + object.candidates = []; + for (var j = 0; j < message.candidates.length; ++j) + object.candidates[j] = $root.google.ai.generativelanguage.v1beta2.Message.toObject(message.candidates[j], options); + } + if (message.messages && message.messages.length) { + object.messages = []; + for (var j = 0; j < message.messages.length; ++j) + object.messages[j] = $root.google.ai.generativelanguage.v1beta2.Message.toObject(message.messages[j], options); + } + if (message.filters && message.filters.length) { + object.filters = []; + for (var j = 0; j < message.filters.length; ++j) + object.filters[j] = $root.google.ai.generativelanguage.v1beta2.ContentFilter.toObject(message.filters[j], options); + } + return object; + }; + + /** + * Converts this GenerateMessageResponse to JSON. + * @function toJSON + * @memberof google.ai.generativelanguage.v1beta2.GenerateMessageResponse + * @instance + * @returns {Object.} JSON object + */ + GenerateMessageResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GenerateMessageResponse + * @function getTypeUrl + * @memberof google.ai.generativelanguage.v1beta2.GenerateMessageResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GenerateMessageResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ai.generativelanguage.v1beta2.GenerateMessageResponse"; + }; + + return GenerateMessageResponse; + })(); + + v1beta2.Message = (function() { + + /** + * Properties of a Message. + * @memberof google.ai.generativelanguage.v1beta2 + * @interface IMessage + * @property {string|null} [author] Message author + * @property {string|null} [content] Message content + * @property {google.ai.generativelanguage.v1beta2.ICitationMetadata|null} [citationMetadata] Message citationMetadata + */ + + /** + * Constructs a new Message. + * @memberof google.ai.generativelanguage.v1beta2 + * @classdesc Represents a Message. + * @implements IMessage + * @constructor + * @param {google.ai.generativelanguage.v1beta2.IMessage=} [properties] Properties to set + */ + function Message(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]]; + } + + /** + * Message author. + * @member {string} author + * @memberof google.ai.generativelanguage.v1beta2.Message + * @instance + */ + Message.prototype.author = ""; + + /** + * Message content. + * @member {string} content + * @memberof google.ai.generativelanguage.v1beta2.Message + * @instance + */ + Message.prototype.content = ""; + + /** + * Message citationMetadata. + * @member {google.ai.generativelanguage.v1beta2.ICitationMetadata|null|undefined} citationMetadata + * @memberof google.ai.generativelanguage.v1beta2.Message + * @instance + */ + Message.prototype.citationMetadata = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Message _citationMetadata. + * @member {"citationMetadata"|undefined} _citationMetadata + * @memberof google.ai.generativelanguage.v1beta2.Message + * @instance + */ + Object.defineProperty(Message.prototype, "_citationMetadata", { + get: $util.oneOfGetter($oneOfFields = ["citationMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Message instance using the specified properties. + * @function create + * @memberof google.ai.generativelanguage.v1beta2.Message + * @static + * @param {google.ai.generativelanguage.v1beta2.IMessage=} [properties] Properties to set + * @returns {google.ai.generativelanguage.v1beta2.Message} Message instance + */ + Message.create = function create(properties) { + return new Message(properties); + }; + + /** + * Encodes the specified Message message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.Message.verify|verify} messages. + * @function encode + * @memberof google.ai.generativelanguage.v1beta2.Message + * @static + * @param {google.ai.generativelanguage.v1beta2.IMessage} message Message message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Message.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.author != null && Object.hasOwnProperty.call(message, "author")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.author); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.content); + if (message.citationMetadata != null && Object.hasOwnProperty.call(message, "citationMetadata")) + $root.google.ai.generativelanguage.v1beta2.CitationMetadata.encode(message.citationMetadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Message message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.Message.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.Message + * @static + * @param {google.ai.generativelanguage.v1beta2.IMessage} message Message message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Message.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Message message from the specified reader or buffer. + * @function decode + * @memberof google.ai.generativelanguage.v1beta2.Message + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ai.generativelanguage.v1beta2.Message} Message + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Message.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ai.generativelanguage.v1beta2.Message(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.author = reader.string(); + break; + } + case 2: { + message.content = reader.string(); + break; + } + case 3: { + message.citationMetadata = $root.google.ai.generativelanguage.v1beta2.CitationMetadata.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Message message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.Message + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ai.generativelanguage.v1beta2.Message} Message + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Message.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Message message. + * @function verify + * @memberof google.ai.generativelanguage.v1beta2.Message + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Message.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.author != null && message.hasOwnProperty("author")) + if (!$util.isString(message.author)) + return "author: string expected"; + if (message.content != null && message.hasOwnProperty("content")) + if (!$util.isString(message.content)) + return "content: string expected"; + if (message.citationMetadata != null && message.hasOwnProperty("citationMetadata")) { + properties._citationMetadata = 1; + { + var error = $root.google.ai.generativelanguage.v1beta2.CitationMetadata.verify(message.citationMetadata); + if (error) + return "citationMetadata." + error; + } + } + return null; + }; + + /** + * Creates a Message message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ai.generativelanguage.v1beta2.Message + * @static + * @param {Object.} object Plain object + * @returns {google.ai.generativelanguage.v1beta2.Message} Message + */ + Message.fromObject = function fromObject(object) { + if (object instanceof $root.google.ai.generativelanguage.v1beta2.Message) + return object; + var message = new $root.google.ai.generativelanguage.v1beta2.Message(); + if (object.author != null) + message.author = String(object.author); + if (object.content != null) + message.content = String(object.content); + if (object.citationMetadata != null) { + if (typeof object.citationMetadata !== "object") + throw TypeError(".google.ai.generativelanguage.v1beta2.Message.citationMetadata: object expected"); + message.citationMetadata = $root.google.ai.generativelanguage.v1beta2.CitationMetadata.fromObject(object.citationMetadata); + } + return message; + }; + + /** + * Creates a plain object from a Message message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ai.generativelanguage.v1beta2.Message + * @static + * @param {google.ai.generativelanguage.v1beta2.Message} message Message + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Message.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.author = ""; + object.content = ""; + } + if (message.author != null && message.hasOwnProperty("author")) + object.author = message.author; + if (message.content != null && message.hasOwnProperty("content")) + object.content = message.content; + if (message.citationMetadata != null && message.hasOwnProperty("citationMetadata")) { + object.citationMetadata = $root.google.ai.generativelanguage.v1beta2.CitationMetadata.toObject(message.citationMetadata, options); + if (options.oneofs) + object._citationMetadata = "citationMetadata"; + } + return object; + }; + + /** + * Converts this Message to JSON. + * @function toJSON + * @memberof google.ai.generativelanguage.v1beta2.Message + * @instance + * @returns {Object.} JSON object + */ + Message.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Message + * @function getTypeUrl + * @memberof google.ai.generativelanguage.v1beta2.Message + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Message.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ai.generativelanguage.v1beta2.Message"; + }; + + return Message; + })(); + + v1beta2.MessagePrompt = (function() { + + /** + * Properties of a MessagePrompt. + * @memberof google.ai.generativelanguage.v1beta2 + * @interface IMessagePrompt + * @property {string|null} [context] MessagePrompt context + * @property {Array.|null} [examples] MessagePrompt examples + * @property {Array.|null} [messages] MessagePrompt messages + */ + + /** + * Constructs a new MessagePrompt. + * @memberof google.ai.generativelanguage.v1beta2 + * @classdesc Represents a MessagePrompt. + * @implements IMessagePrompt + * @constructor + * @param {google.ai.generativelanguage.v1beta2.IMessagePrompt=} [properties] Properties to set + */ + function MessagePrompt(properties) { + this.examples = []; + this.messages = []; + 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]]; + } + + /** + * MessagePrompt context. + * @member {string} context + * @memberof google.ai.generativelanguage.v1beta2.MessagePrompt + * @instance + */ + MessagePrompt.prototype.context = ""; + + /** + * MessagePrompt examples. + * @member {Array.} examples + * @memberof google.ai.generativelanguage.v1beta2.MessagePrompt + * @instance + */ + MessagePrompt.prototype.examples = $util.emptyArray; + + /** + * MessagePrompt messages. + * @member {Array.} messages + * @memberof google.ai.generativelanguage.v1beta2.MessagePrompt + * @instance + */ + MessagePrompt.prototype.messages = $util.emptyArray; + + /** + * Creates a new MessagePrompt instance using the specified properties. + * @function create + * @memberof google.ai.generativelanguage.v1beta2.MessagePrompt + * @static + * @param {google.ai.generativelanguage.v1beta2.IMessagePrompt=} [properties] Properties to set + * @returns {google.ai.generativelanguage.v1beta2.MessagePrompt} MessagePrompt instance + */ + MessagePrompt.create = function create(properties) { + return new MessagePrompt(properties); + }; + + /** + * Encodes the specified MessagePrompt message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.MessagePrompt.verify|verify} messages. + * @function encode + * @memberof google.ai.generativelanguage.v1beta2.MessagePrompt + * @static + * @param {google.ai.generativelanguage.v1beta2.IMessagePrompt} message MessagePrompt message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessagePrompt.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.context != null && Object.hasOwnProperty.call(message, "context")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.context); + if (message.examples != null && message.examples.length) + for (var i = 0; i < message.examples.length; ++i) + $root.google.ai.generativelanguage.v1beta2.Example.encode(message.examples[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.messages != null && message.messages.length) + for (var i = 0; i < message.messages.length; ++i) + $root.google.ai.generativelanguage.v1beta2.Message.encode(message.messages[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessagePrompt message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.MessagePrompt.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.MessagePrompt + * @static + * @param {google.ai.generativelanguage.v1beta2.IMessagePrompt} message MessagePrompt message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessagePrompt.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessagePrompt message from the specified reader or buffer. + * @function decode + * @memberof google.ai.generativelanguage.v1beta2.MessagePrompt + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ai.generativelanguage.v1beta2.MessagePrompt} MessagePrompt + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessagePrompt.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ai.generativelanguage.v1beta2.MessagePrompt(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.context = reader.string(); + break; + } + case 2: { + if (!(message.examples && message.examples.length)) + message.examples = []; + message.examples.push($root.google.ai.generativelanguage.v1beta2.Example.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.messages && message.messages.length)) + message.messages = []; + message.messages.push($root.google.ai.generativelanguage.v1beta2.Message.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessagePrompt message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.MessagePrompt + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ai.generativelanguage.v1beta2.MessagePrompt} MessagePrompt + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessagePrompt.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessagePrompt message. + * @function verify + * @memberof google.ai.generativelanguage.v1beta2.MessagePrompt + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessagePrompt.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.context != null && message.hasOwnProperty("context")) + if (!$util.isString(message.context)) + return "context: string expected"; + if (message.examples != null && message.hasOwnProperty("examples")) { + if (!Array.isArray(message.examples)) + return "examples: array expected"; + for (var i = 0; i < message.examples.length; ++i) { + var error = $root.google.ai.generativelanguage.v1beta2.Example.verify(message.examples[i]); + if (error) + return "examples." + error; + } + } + if (message.messages != null && message.hasOwnProperty("messages")) { + if (!Array.isArray(message.messages)) + return "messages: array expected"; + for (var i = 0; i < message.messages.length; ++i) { + var error = $root.google.ai.generativelanguage.v1beta2.Message.verify(message.messages[i]); + if (error) + return "messages." + error; + } + } + return null; + }; + + /** + * Creates a MessagePrompt message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ai.generativelanguage.v1beta2.MessagePrompt + * @static + * @param {Object.} object Plain object + * @returns {google.ai.generativelanguage.v1beta2.MessagePrompt} MessagePrompt + */ + MessagePrompt.fromObject = function fromObject(object) { + if (object instanceof $root.google.ai.generativelanguage.v1beta2.MessagePrompt) + return object; + var message = new $root.google.ai.generativelanguage.v1beta2.MessagePrompt(); + if (object.context != null) + message.context = String(object.context); + if (object.examples) { + if (!Array.isArray(object.examples)) + throw TypeError(".google.ai.generativelanguage.v1beta2.MessagePrompt.examples: array expected"); + message.examples = []; + for (var i = 0; i < object.examples.length; ++i) { + if (typeof object.examples[i] !== "object") + throw TypeError(".google.ai.generativelanguage.v1beta2.MessagePrompt.examples: object expected"); + message.examples[i] = $root.google.ai.generativelanguage.v1beta2.Example.fromObject(object.examples[i]); + } + } + if (object.messages) { + if (!Array.isArray(object.messages)) + throw TypeError(".google.ai.generativelanguage.v1beta2.MessagePrompt.messages: array expected"); + message.messages = []; + for (var i = 0; i < object.messages.length; ++i) { + if (typeof object.messages[i] !== "object") + throw TypeError(".google.ai.generativelanguage.v1beta2.MessagePrompt.messages: object expected"); + message.messages[i] = $root.google.ai.generativelanguage.v1beta2.Message.fromObject(object.messages[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MessagePrompt message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ai.generativelanguage.v1beta2.MessagePrompt + * @static + * @param {google.ai.generativelanguage.v1beta2.MessagePrompt} message MessagePrompt + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessagePrompt.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.examples = []; + object.messages = []; + } + if (options.defaults) + object.context = ""; + if (message.context != null && message.hasOwnProperty("context")) + object.context = message.context; + if (message.examples && message.examples.length) { + object.examples = []; + for (var j = 0; j < message.examples.length; ++j) + object.examples[j] = $root.google.ai.generativelanguage.v1beta2.Example.toObject(message.examples[j], options); + } + if (message.messages && message.messages.length) { + object.messages = []; + for (var j = 0; j < message.messages.length; ++j) + object.messages[j] = $root.google.ai.generativelanguage.v1beta2.Message.toObject(message.messages[j], options); + } + return object; + }; + + /** + * Converts this MessagePrompt to JSON. + * @function toJSON + * @memberof google.ai.generativelanguage.v1beta2.MessagePrompt + * @instance + * @returns {Object.} JSON object + */ + MessagePrompt.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MessagePrompt + * @function getTypeUrl + * @memberof google.ai.generativelanguage.v1beta2.MessagePrompt + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessagePrompt.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ai.generativelanguage.v1beta2.MessagePrompt"; + }; + + return MessagePrompt; + })(); + + v1beta2.Example = (function() { + + /** + * Properties of an Example. + * @memberof google.ai.generativelanguage.v1beta2 + * @interface IExample + * @property {google.ai.generativelanguage.v1beta2.IMessage|null} [input] Example input + * @property {google.ai.generativelanguage.v1beta2.IMessage|null} [output] Example output + */ + + /** + * Constructs a new Example. + * @memberof google.ai.generativelanguage.v1beta2 + * @classdesc Represents an Example. + * @implements IExample + * @constructor + * @param {google.ai.generativelanguage.v1beta2.IExample=} [properties] Properties to set + */ + function Example(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]]; + } + + /** + * Example input. + * @member {google.ai.generativelanguage.v1beta2.IMessage|null|undefined} input + * @memberof google.ai.generativelanguage.v1beta2.Example + * @instance + */ + Example.prototype.input = null; + + /** + * Example output. + * @member {google.ai.generativelanguage.v1beta2.IMessage|null|undefined} output + * @memberof google.ai.generativelanguage.v1beta2.Example + * @instance + */ + Example.prototype.output = null; + + /** + * Creates a new Example instance using the specified properties. + * @function create + * @memberof google.ai.generativelanguage.v1beta2.Example + * @static + * @param {google.ai.generativelanguage.v1beta2.IExample=} [properties] Properties to set + * @returns {google.ai.generativelanguage.v1beta2.Example} Example instance + */ + Example.create = function create(properties) { + return new Example(properties); + }; + + /** + * Encodes the specified Example message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.Example.verify|verify} messages. + * @function encode + * @memberof google.ai.generativelanguage.v1beta2.Example + * @static + * @param {google.ai.generativelanguage.v1beta2.IExample} message Example message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Example.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.input != null && Object.hasOwnProperty.call(message, "input")) + $root.google.ai.generativelanguage.v1beta2.Message.encode(message.input, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.output != null && Object.hasOwnProperty.call(message, "output")) + $root.google.ai.generativelanguage.v1beta2.Message.encode(message.output, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Example message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.Example.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.Example + * @static + * @param {google.ai.generativelanguage.v1beta2.IExample} message Example message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Example.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Example message from the specified reader or buffer. + * @function decode + * @memberof google.ai.generativelanguage.v1beta2.Example + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ai.generativelanguage.v1beta2.Example} Example + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Example.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ai.generativelanguage.v1beta2.Example(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.input = $root.google.ai.generativelanguage.v1beta2.Message.decode(reader, reader.uint32()); + break; + } + case 2: { + message.output = $root.google.ai.generativelanguage.v1beta2.Message.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Example message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.Example + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ai.generativelanguage.v1beta2.Example} Example + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Example.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Example message. + * @function verify + * @memberof google.ai.generativelanguage.v1beta2.Example + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Example.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.input != null && message.hasOwnProperty("input")) { + var error = $root.google.ai.generativelanguage.v1beta2.Message.verify(message.input); + if (error) + return "input." + error; + } + if (message.output != null && message.hasOwnProperty("output")) { + var error = $root.google.ai.generativelanguage.v1beta2.Message.verify(message.output); + if (error) + return "output." + error; + } + return null; + }; + + /** + * Creates an Example message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ai.generativelanguage.v1beta2.Example + * @static + * @param {Object.} object Plain object + * @returns {google.ai.generativelanguage.v1beta2.Example} Example + */ + Example.fromObject = function fromObject(object) { + if (object instanceof $root.google.ai.generativelanguage.v1beta2.Example) + return object; + var message = new $root.google.ai.generativelanguage.v1beta2.Example(); + if (object.input != null) { + if (typeof object.input !== "object") + throw TypeError(".google.ai.generativelanguage.v1beta2.Example.input: object expected"); + message.input = $root.google.ai.generativelanguage.v1beta2.Message.fromObject(object.input); + } + if (object.output != null) { + if (typeof object.output !== "object") + throw TypeError(".google.ai.generativelanguage.v1beta2.Example.output: object expected"); + message.output = $root.google.ai.generativelanguage.v1beta2.Message.fromObject(object.output); + } + return message; + }; + + /** + * Creates a plain object from an Example message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ai.generativelanguage.v1beta2.Example + * @static + * @param {google.ai.generativelanguage.v1beta2.Example} message Example + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Example.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.input = null; + object.output = null; + } + if (message.input != null && message.hasOwnProperty("input")) + object.input = $root.google.ai.generativelanguage.v1beta2.Message.toObject(message.input, options); + if (message.output != null && message.hasOwnProperty("output")) + object.output = $root.google.ai.generativelanguage.v1beta2.Message.toObject(message.output, options); + return object; + }; + + /** + * Converts this Example to JSON. + * @function toJSON + * @memberof google.ai.generativelanguage.v1beta2.Example + * @instance + * @returns {Object.} JSON object + */ + Example.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Example + * @function getTypeUrl + * @memberof google.ai.generativelanguage.v1beta2.Example + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Example.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ai.generativelanguage.v1beta2.Example"; + }; + + return Example; + })(); + + v1beta2.CountMessageTokensRequest = (function() { + + /** + * Properties of a CountMessageTokensRequest. + * @memberof google.ai.generativelanguage.v1beta2 + * @interface ICountMessageTokensRequest + * @property {string|null} [model] CountMessageTokensRequest model + * @property {google.ai.generativelanguage.v1beta2.IMessagePrompt|null} [prompt] CountMessageTokensRequest prompt + */ + + /** + * Constructs a new CountMessageTokensRequest. + * @memberof google.ai.generativelanguage.v1beta2 + * @classdesc Represents a CountMessageTokensRequest. + * @implements ICountMessageTokensRequest + * @constructor + * @param {google.ai.generativelanguage.v1beta2.ICountMessageTokensRequest=} [properties] Properties to set + */ + function CountMessageTokensRequest(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]]; + } + + /** + * CountMessageTokensRequest model. + * @member {string} model + * @memberof google.ai.generativelanguage.v1beta2.CountMessageTokensRequest + * @instance + */ + CountMessageTokensRequest.prototype.model = ""; + + /** + * CountMessageTokensRequest prompt. + * @member {google.ai.generativelanguage.v1beta2.IMessagePrompt|null|undefined} prompt + * @memberof google.ai.generativelanguage.v1beta2.CountMessageTokensRequest + * @instance + */ + CountMessageTokensRequest.prototype.prompt = null; + + /** + * Creates a new CountMessageTokensRequest instance using the specified properties. + * @function create + * @memberof google.ai.generativelanguage.v1beta2.CountMessageTokensRequest + * @static + * @param {google.ai.generativelanguage.v1beta2.ICountMessageTokensRequest=} [properties] Properties to set + * @returns {google.ai.generativelanguage.v1beta2.CountMessageTokensRequest} CountMessageTokensRequest instance + */ + CountMessageTokensRequest.create = function create(properties) { + return new CountMessageTokensRequest(properties); + }; + + /** + * Encodes the specified CountMessageTokensRequest message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.CountMessageTokensRequest.verify|verify} messages. + * @function encode + * @memberof google.ai.generativelanguage.v1beta2.CountMessageTokensRequest + * @static + * @param {google.ai.generativelanguage.v1beta2.ICountMessageTokensRequest} message CountMessageTokensRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CountMessageTokensRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.model != null && Object.hasOwnProperty.call(message, "model")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.model); + if (message.prompt != null && Object.hasOwnProperty.call(message, "prompt")) + $root.google.ai.generativelanguage.v1beta2.MessagePrompt.encode(message.prompt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CountMessageTokensRequest message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.CountMessageTokensRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.CountMessageTokensRequest + * @static + * @param {google.ai.generativelanguage.v1beta2.ICountMessageTokensRequest} message CountMessageTokensRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CountMessageTokensRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CountMessageTokensRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ai.generativelanguage.v1beta2.CountMessageTokensRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ai.generativelanguage.v1beta2.CountMessageTokensRequest} CountMessageTokensRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CountMessageTokensRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ai.generativelanguage.v1beta2.CountMessageTokensRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.model = reader.string(); + break; + } + case 2: { + message.prompt = $root.google.ai.generativelanguage.v1beta2.MessagePrompt.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CountMessageTokensRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.CountMessageTokensRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ai.generativelanguage.v1beta2.CountMessageTokensRequest} CountMessageTokensRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CountMessageTokensRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CountMessageTokensRequest message. + * @function verify + * @memberof google.ai.generativelanguage.v1beta2.CountMessageTokensRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CountMessageTokensRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.model != null && message.hasOwnProperty("model")) + if (!$util.isString(message.model)) + return "model: string expected"; + if (message.prompt != null && message.hasOwnProperty("prompt")) { + var error = $root.google.ai.generativelanguage.v1beta2.MessagePrompt.verify(message.prompt); + if (error) + return "prompt." + error; + } + return null; + }; + + /** + * Creates a CountMessageTokensRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ai.generativelanguage.v1beta2.CountMessageTokensRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ai.generativelanguage.v1beta2.CountMessageTokensRequest} CountMessageTokensRequest + */ + CountMessageTokensRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ai.generativelanguage.v1beta2.CountMessageTokensRequest) + return object; + var message = new $root.google.ai.generativelanguage.v1beta2.CountMessageTokensRequest(); + if (object.model != null) + message.model = String(object.model); + if (object.prompt != null) { + if (typeof object.prompt !== "object") + throw TypeError(".google.ai.generativelanguage.v1beta2.CountMessageTokensRequest.prompt: object expected"); + message.prompt = $root.google.ai.generativelanguage.v1beta2.MessagePrompt.fromObject(object.prompt); + } + return message; + }; + + /** + * Creates a plain object from a CountMessageTokensRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ai.generativelanguage.v1beta2.CountMessageTokensRequest + * @static + * @param {google.ai.generativelanguage.v1beta2.CountMessageTokensRequest} message CountMessageTokensRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CountMessageTokensRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.model = ""; + object.prompt = null; + } + if (message.model != null && message.hasOwnProperty("model")) + object.model = message.model; + if (message.prompt != null && message.hasOwnProperty("prompt")) + object.prompt = $root.google.ai.generativelanguage.v1beta2.MessagePrompt.toObject(message.prompt, options); + return object; + }; + + /** + * Converts this CountMessageTokensRequest to JSON. + * @function toJSON + * @memberof google.ai.generativelanguage.v1beta2.CountMessageTokensRequest + * @instance + * @returns {Object.} JSON object + */ + CountMessageTokensRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CountMessageTokensRequest + * @function getTypeUrl + * @memberof google.ai.generativelanguage.v1beta2.CountMessageTokensRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CountMessageTokensRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ai.generativelanguage.v1beta2.CountMessageTokensRequest"; + }; + + return CountMessageTokensRequest; + })(); + + v1beta2.CountMessageTokensResponse = (function() { + + /** + * Properties of a CountMessageTokensResponse. + * @memberof google.ai.generativelanguage.v1beta2 + * @interface ICountMessageTokensResponse + * @property {number|null} [tokenCount] CountMessageTokensResponse tokenCount + */ + + /** + * Constructs a new CountMessageTokensResponse. + * @memberof google.ai.generativelanguage.v1beta2 + * @classdesc Represents a CountMessageTokensResponse. + * @implements ICountMessageTokensResponse + * @constructor + * @param {google.ai.generativelanguage.v1beta2.ICountMessageTokensResponse=} [properties] Properties to set + */ + function CountMessageTokensResponse(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]]; + } + + /** + * CountMessageTokensResponse tokenCount. + * @member {number} tokenCount + * @memberof google.ai.generativelanguage.v1beta2.CountMessageTokensResponse + * @instance + */ + CountMessageTokensResponse.prototype.tokenCount = 0; + + /** + * Creates a new CountMessageTokensResponse instance using the specified properties. + * @function create + * @memberof google.ai.generativelanguage.v1beta2.CountMessageTokensResponse + * @static + * @param {google.ai.generativelanguage.v1beta2.ICountMessageTokensResponse=} [properties] Properties to set + * @returns {google.ai.generativelanguage.v1beta2.CountMessageTokensResponse} CountMessageTokensResponse instance + */ + CountMessageTokensResponse.create = function create(properties) { + return new CountMessageTokensResponse(properties); + }; + + /** + * Encodes the specified CountMessageTokensResponse message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.CountMessageTokensResponse.verify|verify} messages. + * @function encode + * @memberof google.ai.generativelanguage.v1beta2.CountMessageTokensResponse + * @static + * @param {google.ai.generativelanguage.v1beta2.ICountMessageTokensResponse} message CountMessageTokensResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CountMessageTokensResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tokenCount != null && Object.hasOwnProperty.call(message, "tokenCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.tokenCount); + return writer; + }; + + /** + * Encodes the specified CountMessageTokensResponse message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.CountMessageTokensResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.CountMessageTokensResponse + * @static + * @param {google.ai.generativelanguage.v1beta2.ICountMessageTokensResponse} message CountMessageTokensResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CountMessageTokensResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CountMessageTokensResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ai.generativelanguage.v1beta2.CountMessageTokensResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ai.generativelanguage.v1beta2.CountMessageTokensResponse} CountMessageTokensResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CountMessageTokensResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ai.generativelanguage.v1beta2.CountMessageTokensResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tokenCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CountMessageTokensResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.CountMessageTokensResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ai.generativelanguage.v1beta2.CountMessageTokensResponse} CountMessageTokensResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CountMessageTokensResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CountMessageTokensResponse message. + * @function verify + * @memberof google.ai.generativelanguage.v1beta2.CountMessageTokensResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CountMessageTokensResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tokenCount != null && message.hasOwnProperty("tokenCount")) + if (!$util.isInteger(message.tokenCount)) + return "tokenCount: integer expected"; + return null; + }; + + /** + * Creates a CountMessageTokensResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ai.generativelanguage.v1beta2.CountMessageTokensResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ai.generativelanguage.v1beta2.CountMessageTokensResponse} CountMessageTokensResponse + */ + CountMessageTokensResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ai.generativelanguage.v1beta2.CountMessageTokensResponse) + return object; + var message = new $root.google.ai.generativelanguage.v1beta2.CountMessageTokensResponse(); + if (object.tokenCount != null) + message.tokenCount = object.tokenCount | 0; + return message; + }; + + /** + * Creates a plain object from a CountMessageTokensResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ai.generativelanguage.v1beta2.CountMessageTokensResponse + * @static + * @param {google.ai.generativelanguage.v1beta2.CountMessageTokensResponse} message CountMessageTokensResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CountMessageTokensResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.tokenCount = 0; + if (message.tokenCount != null && message.hasOwnProperty("tokenCount")) + object.tokenCount = message.tokenCount; + return object; + }; + + /** + * Converts this CountMessageTokensResponse to JSON. + * @function toJSON + * @memberof google.ai.generativelanguage.v1beta2.CountMessageTokensResponse + * @instance + * @returns {Object.} JSON object + */ + CountMessageTokensResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CountMessageTokensResponse + * @function getTypeUrl + * @memberof google.ai.generativelanguage.v1beta2.CountMessageTokensResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CountMessageTokensResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ai.generativelanguage.v1beta2.CountMessageTokensResponse"; + }; + + return CountMessageTokensResponse; + })(); + + /** + * HarmCategory enum. + * @name google.ai.generativelanguage.v1beta2.HarmCategory + * @enum {number} + * @property {number} HARM_CATEGORY_UNSPECIFIED=0 HARM_CATEGORY_UNSPECIFIED value + * @property {number} HARM_CATEGORY_DEROGATORY=1 HARM_CATEGORY_DEROGATORY value + * @property {number} HARM_CATEGORY_TOXICITY=2 HARM_CATEGORY_TOXICITY value + * @property {number} HARM_CATEGORY_VIOLENCE=3 HARM_CATEGORY_VIOLENCE value + * @property {number} HARM_CATEGORY_SEXUAL=4 HARM_CATEGORY_SEXUAL value + * @property {number} HARM_CATEGORY_MEDICAL=5 HARM_CATEGORY_MEDICAL value + * @property {number} HARM_CATEGORY_DANGEROUS=6 HARM_CATEGORY_DANGEROUS value + */ + v1beta2.HarmCategory = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HARM_CATEGORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "HARM_CATEGORY_DEROGATORY"] = 1; + values[valuesById[2] = "HARM_CATEGORY_TOXICITY"] = 2; + values[valuesById[3] = "HARM_CATEGORY_VIOLENCE"] = 3; + values[valuesById[4] = "HARM_CATEGORY_SEXUAL"] = 4; + values[valuesById[5] = "HARM_CATEGORY_MEDICAL"] = 5; + values[valuesById[6] = "HARM_CATEGORY_DANGEROUS"] = 6; + return values; + })(); + + v1beta2.ContentFilter = (function() { + + /** + * Properties of a ContentFilter. + * @memberof google.ai.generativelanguage.v1beta2 + * @interface IContentFilter + * @property {google.ai.generativelanguage.v1beta2.ContentFilter.BlockedReason|null} [reason] ContentFilter reason + * @property {string|null} [message] ContentFilter message + */ + + /** + * Constructs a new ContentFilter. + * @memberof google.ai.generativelanguage.v1beta2 + * @classdesc Represents a ContentFilter. + * @implements IContentFilter + * @constructor + * @param {google.ai.generativelanguage.v1beta2.IContentFilter=} [properties] Properties to set + */ + function ContentFilter(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]]; + } + + /** + * ContentFilter reason. + * @member {google.ai.generativelanguage.v1beta2.ContentFilter.BlockedReason} reason + * @memberof google.ai.generativelanguage.v1beta2.ContentFilter + * @instance + */ + ContentFilter.prototype.reason = 0; + + /** + * ContentFilter message. + * @member {string|null|undefined} message + * @memberof google.ai.generativelanguage.v1beta2.ContentFilter + * @instance + */ + ContentFilter.prototype.message = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ContentFilter _message. + * @member {"message"|undefined} _message + * @memberof google.ai.generativelanguage.v1beta2.ContentFilter + * @instance + */ + Object.defineProperty(ContentFilter.prototype, "_message", { + get: $util.oneOfGetter($oneOfFields = ["message"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ContentFilter instance using the specified properties. + * @function create + * @memberof google.ai.generativelanguage.v1beta2.ContentFilter + * @static + * @param {google.ai.generativelanguage.v1beta2.IContentFilter=} [properties] Properties to set + * @returns {google.ai.generativelanguage.v1beta2.ContentFilter} ContentFilter instance + */ + ContentFilter.create = function create(properties) { + return new ContentFilter(properties); + }; + + /** + * Encodes the specified ContentFilter message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.ContentFilter.verify|verify} messages. + * @function encode + * @memberof google.ai.generativelanguage.v1beta2.ContentFilter + * @static + * @param {google.ai.generativelanguage.v1beta2.IContentFilter} message ContentFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContentFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.reason); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + return writer; + }; + + /** + * Encodes the specified ContentFilter message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.ContentFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.ContentFilter + * @static + * @param {google.ai.generativelanguage.v1beta2.IContentFilter} message ContentFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContentFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ContentFilter message from the specified reader or buffer. + * @function decode + * @memberof google.ai.generativelanguage.v1beta2.ContentFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ai.generativelanguage.v1beta2.ContentFilter} ContentFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContentFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ai.generativelanguage.v1beta2.ContentFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.reason = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ContentFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.ContentFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ai.generativelanguage.v1beta2.ContentFilter} ContentFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContentFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ContentFilter message. + * @function verify + * @memberof google.ai.generativelanguage.v1beta2.ContentFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContentFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.reason != null && message.hasOwnProperty("reason")) + switch (message.reason) { + default: + return "reason: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.message != null && message.hasOwnProperty("message")) { + properties._message = 1; + if (!$util.isString(message.message)) + return "message: string expected"; + } + return null; + }; + + /** + * Creates a ContentFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ai.generativelanguage.v1beta2.ContentFilter + * @static + * @param {Object.} object Plain object + * @returns {google.ai.generativelanguage.v1beta2.ContentFilter} ContentFilter + */ + ContentFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.ai.generativelanguage.v1beta2.ContentFilter) + return object; + var message = new $root.google.ai.generativelanguage.v1beta2.ContentFilter(); + switch (object.reason) { + default: + if (typeof object.reason === "number") { + message.reason = object.reason; + break; + } + break; + case "BLOCKED_REASON_UNSPECIFIED": + case 0: + message.reason = 0; + break; + case "SAFETY": + case 1: + message.reason = 1; + break; + case "OTHER": + case 2: + message.reason = 2; + break; + } + if (object.message != null) + message.message = String(object.message); + return message; + }; + + /** + * Creates a plain object from a ContentFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ai.generativelanguage.v1beta2.ContentFilter + * @static + * @param {google.ai.generativelanguage.v1beta2.ContentFilter} message ContentFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContentFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.reason = options.enums === String ? "BLOCKED_REASON_UNSPECIFIED" : 0; + if (message.reason != null && message.hasOwnProperty("reason")) + object.reason = options.enums === String ? $root.google.ai.generativelanguage.v1beta2.ContentFilter.BlockedReason[message.reason] === undefined ? message.reason : $root.google.ai.generativelanguage.v1beta2.ContentFilter.BlockedReason[message.reason] : message.reason; + if (message.message != null && message.hasOwnProperty("message")) { + object.message = message.message; + if (options.oneofs) + object._message = "message"; + } + return object; + }; + + /** + * Converts this ContentFilter to JSON. + * @function toJSON + * @memberof google.ai.generativelanguage.v1beta2.ContentFilter + * @instance + * @returns {Object.} JSON object + */ + ContentFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ContentFilter + * @function getTypeUrl + * @memberof google.ai.generativelanguage.v1beta2.ContentFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ContentFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ai.generativelanguage.v1beta2.ContentFilter"; + }; + + /** + * BlockedReason enum. + * @name google.ai.generativelanguage.v1beta2.ContentFilter.BlockedReason + * @enum {number} + * @property {number} BLOCKED_REASON_UNSPECIFIED=0 BLOCKED_REASON_UNSPECIFIED value + * @property {number} SAFETY=1 SAFETY value + * @property {number} OTHER=2 OTHER value + */ + ContentFilter.BlockedReason = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BLOCKED_REASON_UNSPECIFIED"] = 0; + values[valuesById[1] = "SAFETY"] = 1; + values[valuesById[2] = "OTHER"] = 2; + return values; + })(); + + return ContentFilter; + })(); + + v1beta2.SafetyFeedback = (function() { + + /** + * Properties of a SafetyFeedback. + * @memberof google.ai.generativelanguage.v1beta2 + * @interface ISafetyFeedback + * @property {google.ai.generativelanguage.v1beta2.ISafetyRating|null} [rating] SafetyFeedback rating + * @property {google.ai.generativelanguage.v1beta2.ISafetySetting|null} [setting] SafetyFeedback setting + */ + + /** + * Constructs a new SafetyFeedback. + * @memberof google.ai.generativelanguage.v1beta2 + * @classdesc Represents a SafetyFeedback. + * @implements ISafetyFeedback + * @constructor + * @param {google.ai.generativelanguage.v1beta2.ISafetyFeedback=} [properties] Properties to set + */ + function SafetyFeedback(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]]; + } + + /** + * SafetyFeedback rating. + * @member {google.ai.generativelanguage.v1beta2.ISafetyRating|null|undefined} rating + * @memberof google.ai.generativelanguage.v1beta2.SafetyFeedback + * @instance + */ + SafetyFeedback.prototype.rating = null; + + /** + * SafetyFeedback setting. + * @member {google.ai.generativelanguage.v1beta2.ISafetySetting|null|undefined} setting + * @memberof google.ai.generativelanguage.v1beta2.SafetyFeedback + * @instance + */ + SafetyFeedback.prototype.setting = null; + + /** + * Creates a new SafetyFeedback instance using the specified properties. + * @function create + * @memberof google.ai.generativelanguage.v1beta2.SafetyFeedback + * @static + * @param {google.ai.generativelanguage.v1beta2.ISafetyFeedback=} [properties] Properties to set + * @returns {google.ai.generativelanguage.v1beta2.SafetyFeedback} SafetyFeedback instance + */ + SafetyFeedback.create = function create(properties) { + return new SafetyFeedback(properties); + }; + + /** + * Encodes the specified SafetyFeedback message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.SafetyFeedback.verify|verify} messages. + * @function encode + * @memberof google.ai.generativelanguage.v1beta2.SafetyFeedback + * @static + * @param {google.ai.generativelanguage.v1beta2.ISafetyFeedback} message SafetyFeedback message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SafetyFeedback.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rating != null && Object.hasOwnProperty.call(message, "rating")) + $root.google.ai.generativelanguage.v1beta2.SafetyRating.encode(message.rating, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.setting != null && Object.hasOwnProperty.call(message, "setting")) + $root.google.ai.generativelanguage.v1beta2.SafetySetting.encode(message.setting, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SafetyFeedback message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.SafetyFeedback.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.SafetyFeedback + * @static + * @param {google.ai.generativelanguage.v1beta2.ISafetyFeedback} message SafetyFeedback message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SafetyFeedback.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SafetyFeedback message from the specified reader or buffer. + * @function decode + * @memberof google.ai.generativelanguage.v1beta2.SafetyFeedback + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ai.generativelanguage.v1beta2.SafetyFeedback} SafetyFeedback + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SafetyFeedback.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ai.generativelanguage.v1beta2.SafetyFeedback(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rating = $root.google.ai.generativelanguage.v1beta2.SafetyRating.decode(reader, reader.uint32()); + break; + } + case 2: { + message.setting = $root.google.ai.generativelanguage.v1beta2.SafetySetting.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SafetyFeedback message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.SafetyFeedback + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ai.generativelanguage.v1beta2.SafetyFeedback} SafetyFeedback + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SafetyFeedback.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SafetyFeedback message. + * @function verify + * @memberof google.ai.generativelanguage.v1beta2.SafetyFeedback + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SafetyFeedback.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rating != null && message.hasOwnProperty("rating")) { + var error = $root.google.ai.generativelanguage.v1beta2.SafetyRating.verify(message.rating); + if (error) + return "rating." + error; + } + if (message.setting != null && message.hasOwnProperty("setting")) { + var error = $root.google.ai.generativelanguage.v1beta2.SafetySetting.verify(message.setting); + if (error) + return "setting." + error; + } + return null; + }; + + /** + * Creates a SafetyFeedback message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ai.generativelanguage.v1beta2.SafetyFeedback + * @static + * @param {Object.} object Plain object + * @returns {google.ai.generativelanguage.v1beta2.SafetyFeedback} SafetyFeedback + */ + SafetyFeedback.fromObject = function fromObject(object) { + if (object instanceof $root.google.ai.generativelanguage.v1beta2.SafetyFeedback) + return object; + var message = new $root.google.ai.generativelanguage.v1beta2.SafetyFeedback(); + if (object.rating != null) { + if (typeof object.rating !== "object") + throw TypeError(".google.ai.generativelanguage.v1beta2.SafetyFeedback.rating: object expected"); + message.rating = $root.google.ai.generativelanguage.v1beta2.SafetyRating.fromObject(object.rating); + } + if (object.setting != null) { + if (typeof object.setting !== "object") + throw TypeError(".google.ai.generativelanguage.v1beta2.SafetyFeedback.setting: object expected"); + message.setting = $root.google.ai.generativelanguage.v1beta2.SafetySetting.fromObject(object.setting); + } + return message; + }; + + /** + * Creates a plain object from a SafetyFeedback message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ai.generativelanguage.v1beta2.SafetyFeedback + * @static + * @param {google.ai.generativelanguage.v1beta2.SafetyFeedback} message SafetyFeedback + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SafetyFeedback.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.rating = null; + object.setting = null; + } + if (message.rating != null && message.hasOwnProperty("rating")) + object.rating = $root.google.ai.generativelanguage.v1beta2.SafetyRating.toObject(message.rating, options); + if (message.setting != null && message.hasOwnProperty("setting")) + object.setting = $root.google.ai.generativelanguage.v1beta2.SafetySetting.toObject(message.setting, options); + return object; + }; + + /** + * Converts this SafetyFeedback to JSON. + * @function toJSON + * @memberof google.ai.generativelanguage.v1beta2.SafetyFeedback + * @instance + * @returns {Object.} JSON object + */ + SafetyFeedback.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SafetyFeedback + * @function getTypeUrl + * @memberof google.ai.generativelanguage.v1beta2.SafetyFeedback + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SafetyFeedback.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ai.generativelanguage.v1beta2.SafetyFeedback"; + }; + + return SafetyFeedback; + })(); + + v1beta2.SafetyRating = (function() { + + /** + * Properties of a SafetyRating. + * @memberof google.ai.generativelanguage.v1beta2 + * @interface ISafetyRating + * @property {google.ai.generativelanguage.v1beta2.HarmCategory|null} [category] SafetyRating category + * @property {google.ai.generativelanguage.v1beta2.SafetyRating.HarmProbability|null} [probability] SafetyRating probability + */ + + /** + * Constructs a new SafetyRating. + * @memberof google.ai.generativelanguage.v1beta2 + * @classdesc Represents a SafetyRating. + * @implements ISafetyRating + * @constructor + * @param {google.ai.generativelanguage.v1beta2.ISafetyRating=} [properties] Properties to set + */ + function SafetyRating(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]]; + } + + /** + * SafetyRating category. + * @member {google.ai.generativelanguage.v1beta2.HarmCategory} category + * @memberof google.ai.generativelanguage.v1beta2.SafetyRating + * @instance + */ + SafetyRating.prototype.category = 0; + + /** + * SafetyRating probability. + * @member {google.ai.generativelanguage.v1beta2.SafetyRating.HarmProbability} probability + * @memberof google.ai.generativelanguage.v1beta2.SafetyRating + * @instance + */ + SafetyRating.prototype.probability = 0; + + /** + * Creates a new SafetyRating instance using the specified properties. + * @function create + * @memberof google.ai.generativelanguage.v1beta2.SafetyRating + * @static + * @param {google.ai.generativelanguage.v1beta2.ISafetyRating=} [properties] Properties to set + * @returns {google.ai.generativelanguage.v1beta2.SafetyRating} SafetyRating instance + */ + SafetyRating.create = function create(properties) { + return new SafetyRating(properties); + }; + + /** + * Encodes the specified SafetyRating message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.SafetyRating.verify|verify} messages. + * @function encode + * @memberof google.ai.generativelanguage.v1beta2.SafetyRating + * @static + * @param {google.ai.generativelanguage.v1beta2.ISafetyRating} message SafetyRating message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SafetyRating.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.category != null && Object.hasOwnProperty.call(message, "category")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.category); + if (message.probability != null && Object.hasOwnProperty.call(message, "probability")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.probability); + return writer; + }; + + /** + * Encodes the specified SafetyRating message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.SafetyRating.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.SafetyRating + * @static + * @param {google.ai.generativelanguage.v1beta2.ISafetyRating} message SafetyRating message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SafetyRating.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SafetyRating message from the specified reader or buffer. + * @function decode + * @memberof google.ai.generativelanguage.v1beta2.SafetyRating + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ai.generativelanguage.v1beta2.SafetyRating} SafetyRating + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SafetyRating.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ai.generativelanguage.v1beta2.SafetyRating(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.category = reader.int32(); + break; + } + case 4: { + message.probability = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SafetyRating message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.SafetyRating + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ai.generativelanguage.v1beta2.SafetyRating} SafetyRating + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SafetyRating.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SafetyRating message. + * @function verify + * @memberof google.ai.generativelanguage.v1beta2.SafetyRating + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SafetyRating.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.category != null && message.hasOwnProperty("category")) + switch (message.category) { + default: + return "category: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.probability != null && message.hasOwnProperty("probability")) + switch (message.probability) { + default: + return "probability: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a SafetyRating message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ai.generativelanguage.v1beta2.SafetyRating + * @static + * @param {Object.} object Plain object + * @returns {google.ai.generativelanguage.v1beta2.SafetyRating} SafetyRating + */ + SafetyRating.fromObject = function fromObject(object) { + if (object instanceof $root.google.ai.generativelanguage.v1beta2.SafetyRating) + return object; + var message = new $root.google.ai.generativelanguage.v1beta2.SafetyRating(); + switch (object.category) { + default: + if (typeof object.category === "number") { + message.category = object.category; + break; + } + break; + case "HARM_CATEGORY_UNSPECIFIED": + case 0: + message.category = 0; + break; + case "HARM_CATEGORY_DEROGATORY": + case 1: + message.category = 1; + break; + case "HARM_CATEGORY_TOXICITY": + case 2: + message.category = 2; + break; + case "HARM_CATEGORY_VIOLENCE": + case 3: + message.category = 3; + break; + case "HARM_CATEGORY_SEXUAL": + case 4: + message.category = 4; + break; + case "HARM_CATEGORY_MEDICAL": + case 5: + message.category = 5; + break; + case "HARM_CATEGORY_DANGEROUS": + case 6: + message.category = 6; + break; + } + switch (object.probability) { + default: + if (typeof object.probability === "number") { + message.probability = object.probability; + break; + } + break; + case "HARM_PROBABILITY_UNSPECIFIED": + case 0: + message.probability = 0; + break; + case "NEGLIGIBLE": + case 1: + message.probability = 1; + break; + case "LOW": + case 2: + message.probability = 2; + break; + case "MEDIUM": + case 3: + message.probability = 3; + break; + case "HIGH": + case 4: + message.probability = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a SafetyRating message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ai.generativelanguage.v1beta2.SafetyRating + * @static + * @param {google.ai.generativelanguage.v1beta2.SafetyRating} message SafetyRating + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SafetyRating.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.category = options.enums === String ? "HARM_CATEGORY_UNSPECIFIED" : 0; + object.probability = options.enums === String ? "HARM_PROBABILITY_UNSPECIFIED" : 0; + } + if (message.category != null && message.hasOwnProperty("category")) + object.category = options.enums === String ? $root.google.ai.generativelanguage.v1beta2.HarmCategory[message.category] === undefined ? message.category : $root.google.ai.generativelanguage.v1beta2.HarmCategory[message.category] : message.category; + if (message.probability != null && message.hasOwnProperty("probability")) + object.probability = options.enums === String ? $root.google.ai.generativelanguage.v1beta2.SafetyRating.HarmProbability[message.probability] === undefined ? message.probability : $root.google.ai.generativelanguage.v1beta2.SafetyRating.HarmProbability[message.probability] : message.probability; + return object; + }; + + /** + * Converts this SafetyRating to JSON. + * @function toJSON + * @memberof google.ai.generativelanguage.v1beta2.SafetyRating + * @instance + * @returns {Object.} JSON object + */ + SafetyRating.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SafetyRating + * @function getTypeUrl + * @memberof google.ai.generativelanguage.v1beta2.SafetyRating + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SafetyRating.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ai.generativelanguage.v1beta2.SafetyRating"; + }; + + /** + * HarmProbability enum. + * @name google.ai.generativelanguage.v1beta2.SafetyRating.HarmProbability + * @enum {number} + * @property {number} HARM_PROBABILITY_UNSPECIFIED=0 HARM_PROBABILITY_UNSPECIFIED value + * @property {number} NEGLIGIBLE=1 NEGLIGIBLE value + * @property {number} LOW=2 LOW value + * @property {number} MEDIUM=3 MEDIUM value + * @property {number} HIGH=4 HIGH value + */ + SafetyRating.HarmProbability = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HARM_PROBABILITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "NEGLIGIBLE"] = 1; + values[valuesById[2] = "LOW"] = 2; + values[valuesById[3] = "MEDIUM"] = 3; + values[valuesById[4] = "HIGH"] = 4; + return values; + })(); + + return SafetyRating; + })(); + + v1beta2.SafetySetting = (function() { + + /** + * Properties of a SafetySetting. + * @memberof google.ai.generativelanguage.v1beta2 + * @interface ISafetySetting + * @property {google.ai.generativelanguage.v1beta2.HarmCategory|null} [category] SafetySetting category + * @property {google.ai.generativelanguage.v1beta2.SafetySetting.HarmBlockThreshold|null} [threshold] SafetySetting threshold + */ + + /** + * Constructs a new SafetySetting. + * @memberof google.ai.generativelanguage.v1beta2 + * @classdesc Represents a SafetySetting. + * @implements ISafetySetting + * @constructor + * @param {google.ai.generativelanguage.v1beta2.ISafetySetting=} [properties] Properties to set + */ + function SafetySetting(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]]; + } + + /** + * SafetySetting category. + * @member {google.ai.generativelanguage.v1beta2.HarmCategory} category + * @memberof google.ai.generativelanguage.v1beta2.SafetySetting + * @instance + */ + SafetySetting.prototype.category = 0; + + /** + * SafetySetting threshold. + * @member {google.ai.generativelanguage.v1beta2.SafetySetting.HarmBlockThreshold} threshold + * @memberof google.ai.generativelanguage.v1beta2.SafetySetting + * @instance + */ + SafetySetting.prototype.threshold = 0; + + /** + * Creates a new SafetySetting instance using the specified properties. + * @function create + * @memberof google.ai.generativelanguage.v1beta2.SafetySetting + * @static + * @param {google.ai.generativelanguage.v1beta2.ISafetySetting=} [properties] Properties to set + * @returns {google.ai.generativelanguage.v1beta2.SafetySetting} SafetySetting instance + */ + SafetySetting.create = function create(properties) { + return new SafetySetting(properties); + }; + + /** + * Encodes the specified SafetySetting message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.SafetySetting.verify|verify} messages. + * @function encode + * @memberof google.ai.generativelanguage.v1beta2.SafetySetting + * @static + * @param {google.ai.generativelanguage.v1beta2.ISafetySetting} message SafetySetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SafetySetting.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.category != null && Object.hasOwnProperty.call(message, "category")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.category); + if (message.threshold != null && Object.hasOwnProperty.call(message, "threshold")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.threshold); + return writer; + }; + + /** + * Encodes the specified SafetySetting message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.SafetySetting.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.SafetySetting + * @static + * @param {google.ai.generativelanguage.v1beta2.ISafetySetting} message SafetySetting message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SafetySetting.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SafetySetting message from the specified reader or buffer. + * @function decode + * @memberof google.ai.generativelanguage.v1beta2.SafetySetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ai.generativelanguage.v1beta2.SafetySetting} SafetySetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SafetySetting.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ai.generativelanguage.v1beta2.SafetySetting(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.category = reader.int32(); + break; + } + case 4: { + message.threshold = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SafetySetting message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.SafetySetting + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ai.generativelanguage.v1beta2.SafetySetting} SafetySetting + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SafetySetting.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SafetySetting message. + * @function verify + * @memberof google.ai.generativelanguage.v1beta2.SafetySetting + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SafetySetting.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.category != null && message.hasOwnProperty("category")) + switch (message.category) { + default: + return "category: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.threshold != null && message.hasOwnProperty("threshold")) + switch (message.threshold) { + default: + return "threshold: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a SafetySetting message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ai.generativelanguage.v1beta2.SafetySetting + * @static + * @param {Object.} object Plain object + * @returns {google.ai.generativelanguage.v1beta2.SafetySetting} SafetySetting + */ + SafetySetting.fromObject = function fromObject(object) { + if (object instanceof $root.google.ai.generativelanguage.v1beta2.SafetySetting) + return object; + var message = new $root.google.ai.generativelanguage.v1beta2.SafetySetting(); + switch (object.category) { + default: + if (typeof object.category === "number") { + message.category = object.category; + break; + } + break; + case "HARM_CATEGORY_UNSPECIFIED": + case 0: + message.category = 0; + break; + case "HARM_CATEGORY_DEROGATORY": + case 1: + message.category = 1; + break; + case "HARM_CATEGORY_TOXICITY": + case 2: + message.category = 2; + break; + case "HARM_CATEGORY_VIOLENCE": + case 3: + message.category = 3; + break; + case "HARM_CATEGORY_SEXUAL": + case 4: + message.category = 4; + break; + case "HARM_CATEGORY_MEDICAL": + case 5: + message.category = 5; + break; + case "HARM_CATEGORY_DANGEROUS": + case 6: + message.category = 6; + break; + } + switch (object.threshold) { + default: + if (typeof object.threshold === "number") { + message.threshold = object.threshold; + break; + } + break; + case "HARM_BLOCK_THRESHOLD_UNSPECIFIED": + case 0: + message.threshold = 0; + break; + case "BLOCK_LOW_AND_ABOVE": + case 1: + message.threshold = 1; + break; + case "BLOCK_MEDIUM_AND_ABOVE": + case 2: + message.threshold = 2; + break; + case "BLOCK_ONLY_HIGH": + case 3: + message.threshold = 3; + break; + case "BLOCK_NONE": + case 4: + message.threshold = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a SafetySetting message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ai.generativelanguage.v1beta2.SafetySetting + * @static + * @param {google.ai.generativelanguage.v1beta2.SafetySetting} message SafetySetting + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SafetySetting.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.category = options.enums === String ? "HARM_CATEGORY_UNSPECIFIED" : 0; + object.threshold = options.enums === String ? "HARM_BLOCK_THRESHOLD_UNSPECIFIED" : 0; + } + if (message.category != null && message.hasOwnProperty("category")) + object.category = options.enums === String ? $root.google.ai.generativelanguage.v1beta2.HarmCategory[message.category] === undefined ? message.category : $root.google.ai.generativelanguage.v1beta2.HarmCategory[message.category] : message.category; + if (message.threshold != null && message.hasOwnProperty("threshold")) + object.threshold = options.enums === String ? $root.google.ai.generativelanguage.v1beta2.SafetySetting.HarmBlockThreshold[message.threshold] === undefined ? message.threshold : $root.google.ai.generativelanguage.v1beta2.SafetySetting.HarmBlockThreshold[message.threshold] : message.threshold; + return object; + }; + + /** + * Converts this SafetySetting to JSON. + * @function toJSON + * @memberof google.ai.generativelanguage.v1beta2.SafetySetting + * @instance + * @returns {Object.} JSON object + */ + SafetySetting.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SafetySetting + * @function getTypeUrl + * @memberof google.ai.generativelanguage.v1beta2.SafetySetting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SafetySetting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ai.generativelanguage.v1beta2.SafetySetting"; + }; + + /** + * HarmBlockThreshold enum. + * @name google.ai.generativelanguage.v1beta2.SafetySetting.HarmBlockThreshold + * @enum {number} + * @property {number} HARM_BLOCK_THRESHOLD_UNSPECIFIED=0 HARM_BLOCK_THRESHOLD_UNSPECIFIED value + * @property {number} BLOCK_LOW_AND_ABOVE=1 BLOCK_LOW_AND_ABOVE value + * @property {number} BLOCK_MEDIUM_AND_ABOVE=2 BLOCK_MEDIUM_AND_ABOVE value + * @property {number} BLOCK_ONLY_HIGH=3 BLOCK_ONLY_HIGH value + * @property {number} BLOCK_NONE=4 BLOCK_NONE value + */ + SafetySetting.HarmBlockThreshold = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HARM_BLOCK_THRESHOLD_UNSPECIFIED"] = 0; + values[valuesById[1] = "BLOCK_LOW_AND_ABOVE"] = 1; + values[valuesById[2] = "BLOCK_MEDIUM_AND_ABOVE"] = 2; + values[valuesById[3] = "BLOCK_ONLY_HIGH"] = 3; + values[valuesById[4] = "BLOCK_NONE"] = 4; + return values; + })(); + + return SafetySetting; + })(); + + v1beta2.Model = (function() { + + /** + * Properties of a Model. + * @memberof google.ai.generativelanguage.v1beta2 + * @interface IModel + * @property {string|null} [name] Model name + * @property {string|null} [baseModelId] Model baseModelId + * @property {string|null} [version] Model version + * @property {string|null} [displayName] Model displayName + * @property {string|null} [description] Model description + * @property {number|null} [inputTokenLimit] Model inputTokenLimit + * @property {number|null} [outputTokenLimit] Model outputTokenLimit + * @property {Array.|null} [supportedGenerationMethods] Model supportedGenerationMethods + * @property {number|null} [temperature] Model temperature + * @property {number|null} [topP] Model topP + * @property {number|null} [topK] Model topK + */ + + /** + * Constructs a new Model. + * @memberof google.ai.generativelanguage.v1beta2 + * @classdesc Represents a Model. + * @implements IModel + * @constructor + * @param {google.ai.generativelanguage.v1beta2.IModel=} [properties] Properties to set + */ + function Model(properties) { + this.supportedGenerationMethods = []; + 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]]; + } + + /** + * Model name. + * @member {string} name + * @memberof google.ai.generativelanguage.v1beta2.Model + * @instance + */ + Model.prototype.name = ""; + + /** + * Model baseModelId. + * @member {string} baseModelId + * @memberof google.ai.generativelanguage.v1beta2.Model + * @instance + */ + Model.prototype.baseModelId = ""; + + /** + * Model version. + * @member {string} version + * @memberof google.ai.generativelanguage.v1beta2.Model + * @instance + */ + Model.prototype.version = ""; + + /** + * Model displayName. + * @member {string} displayName + * @memberof google.ai.generativelanguage.v1beta2.Model + * @instance + */ + Model.prototype.displayName = ""; + + /** + * Model description. + * @member {string} description + * @memberof google.ai.generativelanguage.v1beta2.Model + * @instance + */ + Model.prototype.description = ""; + + /** + * Model inputTokenLimit. + * @member {number} inputTokenLimit + * @memberof google.ai.generativelanguage.v1beta2.Model + * @instance + */ + Model.prototype.inputTokenLimit = 0; + + /** + * Model outputTokenLimit. + * @member {number} outputTokenLimit + * @memberof google.ai.generativelanguage.v1beta2.Model + * @instance + */ + Model.prototype.outputTokenLimit = 0; + + /** + * Model supportedGenerationMethods. + * @member {Array.} supportedGenerationMethods + * @memberof google.ai.generativelanguage.v1beta2.Model + * @instance + */ + Model.prototype.supportedGenerationMethods = $util.emptyArray; + + /** + * Model temperature. + * @member {number|null|undefined} temperature + * @memberof google.ai.generativelanguage.v1beta2.Model + * @instance + */ + Model.prototype.temperature = null; + + /** + * Model topP. + * @member {number|null|undefined} topP + * @memberof google.ai.generativelanguage.v1beta2.Model + * @instance + */ + Model.prototype.topP = null; + + /** + * Model topK. + * @member {number|null|undefined} topK + * @memberof google.ai.generativelanguage.v1beta2.Model + * @instance + */ + Model.prototype.topK = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Model _temperature. + * @member {"temperature"|undefined} _temperature + * @memberof google.ai.generativelanguage.v1beta2.Model + * @instance + */ + Object.defineProperty(Model.prototype, "_temperature", { + get: $util.oneOfGetter($oneOfFields = ["temperature"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Model _topP. + * @member {"topP"|undefined} _topP + * @memberof google.ai.generativelanguage.v1beta2.Model + * @instance + */ + Object.defineProperty(Model.prototype, "_topP", { + get: $util.oneOfGetter($oneOfFields = ["topP"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Model _topK. + * @member {"topK"|undefined} _topK + * @memberof google.ai.generativelanguage.v1beta2.Model + * @instance + */ + Object.defineProperty(Model.prototype, "_topK", { + get: $util.oneOfGetter($oneOfFields = ["topK"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Model instance using the specified properties. + * @function create + * @memberof google.ai.generativelanguage.v1beta2.Model + * @static + * @param {google.ai.generativelanguage.v1beta2.IModel=} [properties] Properties to set + * @returns {google.ai.generativelanguage.v1beta2.Model} Model instance + */ + Model.create = function create(properties) { + return new Model(properties); + }; + + /** + * Encodes the specified Model message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.Model.verify|verify} messages. + * @function encode + * @memberof google.ai.generativelanguage.v1beta2.Model + * @static + * @param {google.ai.generativelanguage.v1beta2.IModel} message Model message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Model.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.baseModelId != null && Object.hasOwnProperty.call(message, "baseModelId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.baseModelId); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.version); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); + if (message.inputTokenLimit != null && Object.hasOwnProperty.call(message, "inputTokenLimit")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.inputTokenLimit); + if (message.outputTokenLimit != null && Object.hasOwnProperty.call(message, "outputTokenLimit")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.outputTokenLimit); + if (message.supportedGenerationMethods != null && message.supportedGenerationMethods.length) + for (var i = 0; i < message.supportedGenerationMethods.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.supportedGenerationMethods[i]); + if (message.temperature != null && Object.hasOwnProperty.call(message, "temperature")) + writer.uint32(/* id 9, wireType 5 =*/77).float(message.temperature); + if (message.topP != null && Object.hasOwnProperty.call(message, "topP")) + writer.uint32(/* id 10, wireType 5 =*/85).float(message.topP); + if (message.topK != null && Object.hasOwnProperty.call(message, "topK")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.topK); + return writer; + }; + + /** + * Encodes the specified Model message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.Model.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.Model + * @static + * @param {google.ai.generativelanguage.v1beta2.IModel} message Model message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Model.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Model message from the specified reader or buffer. + * @function decode + * @memberof google.ai.generativelanguage.v1beta2.Model + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ai.generativelanguage.v1beta2.Model} Model + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Model.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ai.generativelanguage.v1beta2.Model(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.baseModelId = reader.string(); + break; + } + case 3: { + message.version = reader.string(); + break; + } + case 4: { + message.displayName = reader.string(); + break; + } + case 5: { + message.description = reader.string(); + break; + } + case 6: { + message.inputTokenLimit = reader.int32(); + break; + } + case 7: { + message.outputTokenLimit = reader.int32(); + break; + } + case 8: { + if (!(message.supportedGenerationMethods && message.supportedGenerationMethods.length)) + message.supportedGenerationMethods = []; + message.supportedGenerationMethods.push(reader.string()); + break; + } + case 9: { + message.temperature = reader.float(); + break; + } + case 10: { + message.topP = reader.float(); + break; + } + case 11: { + message.topK = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Model message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.Model + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ai.generativelanguage.v1beta2.Model} Model + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Model.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Model message. + * @function verify + * @memberof google.ai.generativelanguage.v1beta2.Model + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Model.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.baseModelId != null && message.hasOwnProperty("baseModelId")) + if (!$util.isString(message.baseModelId)) + return "baseModelId: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: 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.inputTokenLimit != null && message.hasOwnProperty("inputTokenLimit")) + if (!$util.isInteger(message.inputTokenLimit)) + return "inputTokenLimit: integer expected"; + if (message.outputTokenLimit != null && message.hasOwnProperty("outputTokenLimit")) + if (!$util.isInteger(message.outputTokenLimit)) + return "outputTokenLimit: integer expected"; + if (message.supportedGenerationMethods != null && message.hasOwnProperty("supportedGenerationMethods")) { + if (!Array.isArray(message.supportedGenerationMethods)) + return "supportedGenerationMethods: array expected"; + for (var i = 0; i < message.supportedGenerationMethods.length; ++i) + if (!$util.isString(message.supportedGenerationMethods[i])) + return "supportedGenerationMethods: string[] expected"; + } + if (message.temperature != null && message.hasOwnProperty("temperature")) { + properties._temperature = 1; + if (typeof message.temperature !== "number") + return "temperature: number expected"; + } + if (message.topP != null && message.hasOwnProperty("topP")) { + properties._topP = 1; + if (typeof message.topP !== "number") + return "topP: number expected"; + } + if (message.topK != null && message.hasOwnProperty("topK")) { + properties._topK = 1; + if (!$util.isInteger(message.topK)) + return "topK: integer expected"; + } + return null; + }; + + /** + * Creates a Model message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ai.generativelanguage.v1beta2.Model + * @static + * @param {Object.} object Plain object + * @returns {google.ai.generativelanguage.v1beta2.Model} Model + */ + Model.fromObject = function fromObject(object) { + if (object instanceof $root.google.ai.generativelanguage.v1beta2.Model) + return object; + var message = new $root.google.ai.generativelanguage.v1beta2.Model(); + if (object.name != null) + message.name = String(object.name); + if (object.baseModelId != null) + message.baseModelId = String(object.baseModelId); + if (object.version != null) + message.version = String(object.version); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.inputTokenLimit != null) + message.inputTokenLimit = object.inputTokenLimit | 0; + if (object.outputTokenLimit != null) + message.outputTokenLimit = object.outputTokenLimit | 0; + if (object.supportedGenerationMethods) { + if (!Array.isArray(object.supportedGenerationMethods)) + throw TypeError(".google.ai.generativelanguage.v1beta2.Model.supportedGenerationMethods: array expected"); + message.supportedGenerationMethods = []; + for (var i = 0; i < object.supportedGenerationMethods.length; ++i) + message.supportedGenerationMethods[i] = String(object.supportedGenerationMethods[i]); + } + if (object.temperature != null) + message.temperature = Number(object.temperature); + if (object.topP != null) + message.topP = Number(object.topP); + if (object.topK != null) + message.topK = object.topK | 0; + return message; + }; + + /** + * Creates a plain object from a Model message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ai.generativelanguage.v1beta2.Model + * @static + * @param {google.ai.generativelanguage.v1beta2.Model} message Model + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Model.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.supportedGenerationMethods = []; + if (options.defaults) { + object.name = ""; + object.baseModelId = ""; + object.version = ""; + object.displayName = ""; + object.description = ""; + object.inputTokenLimit = 0; + object.outputTokenLimit = 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.baseModelId != null && message.hasOwnProperty("baseModelId")) + object.baseModelId = message.baseModelId; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.inputTokenLimit != null && message.hasOwnProperty("inputTokenLimit")) + object.inputTokenLimit = message.inputTokenLimit; + if (message.outputTokenLimit != null && message.hasOwnProperty("outputTokenLimit")) + object.outputTokenLimit = message.outputTokenLimit; + if (message.supportedGenerationMethods && message.supportedGenerationMethods.length) { + object.supportedGenerationMethods = []; + for (var j = 0; j < message.supportedGenerationMethods.length; ++j) + object.supportedGenerationMethods[j] = message.supportedGenerationMethods[j]; + } + if (message.temperature != null && message.hasOwnProperty("temperature")) { + object.temperature = options.json && !isFinite(message.temperature) ? String(message.temperature) : message.temperature; + if (options.oneofs) + object._temperature = "temperature"; + } + if (message.topP != null && message.hasOwnProperty("topP")) { + object.topP = options.json && !isFinite(message.topP) ? String(message.topP) : message.topP; + if (options.oneofs) + object._topP = "topP"; + } + if (message.topK != null && message.hasOwnProperty("topK")) { + object.topK = message.topK; + if (options.oneofs) + object._topK = "topK"; + } + return object; + }; + + /** + * Converts this Model to JSON. + * @function toJSON + * @memberof google.ai.generativelanguage.v1beta2.Model + * @instance + * @returns {Object.} JSON object + */ + Model.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Model + * @function getTypeUrl + * @memberof google.ai.generativelanguage.v1beta2.Model + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Model.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ai.generativelanguage.v1beta2.Model"; + }; + + return Model; + })(); + + v1beta2.ModelService = (function() { + + /** + * Constructs a new ModelService service. + * @memberof google.ai.generativelanguage.v1beta2 + * @classdesc Represents a ModelService + * @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 ModelService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ModelService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ModelService; + + /** + * Creates new ModelService service using the specified rpc implementation. + * @function create + * @memberof google.ai.generativelanguage.v1beta2.ModelService + * @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 {ModelService} RPC service. Useful where requests and/or responses are streamed. + */ + ModelService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ai.generativelanguage.v1beta2.ModelService|getModel}. + * @memberof google.ai.generativelanguage.v1beta2.ModelService + * @typedef GetModelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ai.generativelanguage.v1beta2.Model} [response] Model + */ + + /** + * Calls GetModel. + * @function getModel + * @memberof google.ai.generativelanguage.v1beta2.ModelService + * @instance + * @param {google.ai.generativelanguage.v1beta2.IGetModelRequest} request GetModelRequest message or plain object + * @param {google.ai.generativelanguage.v1beta2.ModelService.GetModelCallback} callback Node-style callback called with the error, if any, and Model + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ModelService.prototype.getModel = function getModel(request, callback) { + return this.rpcCall(getModel, $root.google.ai.generativelanguage.v1beta2.GetModelRequest, $root.google.ai.generativelanguage.v1beta2.Model, request, callback); + }, "name", { value: "GetModel" }); + + /** + * Calls GetModel. + * @function getModel + * @memberof google.ai.generativelanguage.v1beta2.ModelService + * @instance + * @param {google.ai.generativelanguage.v1beta2.IGetModelRequest} request GetModelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ai.generativelanguage.v1beta2.ModelService|listModels}. + * @memberof google.ai.generativelanguage.v1beta2.ModelService + * @typedef ListModelsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ai.generativelanguage.v1beta2.ListModelsResponse} [response] ListModelsResponse + */ + + /** + * Calls ListModels. + * @function listModels + * @memberof google.ai.generativelanguage.v1beta2.ModelService + * @instance + * @param {google.ai.generativelanguage.v1beta2.IListModelsRequest} request ListModelsRequest message or plain object + * @param {google.ai.generativelanguage.v1beta2.ModelService.ListModelsCallback} callback Node-style callback called with the error, if any, and ListModelsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ModelService.prototype.listModels = function listModels(request, callback) { + return this.rpcCall(listModels, $root.google.ai.generativelanguage.v1beta2.ListModelsRequest, $root.google.ai.generativelanguage.v1beta2.ListModelsResponse, request, callback); + }, "name", { value: "ListModels" }); + + /** + * Calls ListModels. + * @function listModels + * @memberof google.ai.generativelanguage.v1beta2.ModelService + * @instance + * @param {google.ai.generativelanguage.v1beta2.IListModelsRequest} request ListModelsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ModelService; + })(); + + v1beta2.GetModelRequest = (function() { + + /** + * Properties of a GetModelRequest. + * @memberof google.ai.generativelanguage.v1beta2 + * @interface IGetModelRequest + * @property {string|null} [name] GetModelRequest name + */ + + /** + * Constructs a new GetModelRequest. + * @memberof google.ai.generativelanguage.v1beta2 + * @classdesc Represents a GetModelRequest. + * @implements IGetModelRequest + * @constructor + * @param {google.ai.generativelanguage.v1beta2.IGetModelRequest=} [properties] Properties to set + */ + function GetModelRequest(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]]; + } + + /** + * GetModelRequest name. + * @member {string} name + * @memberof google.ai.generativelanguage.v1beta2.GetModelRequest + * @instance + */ + GetModelRequest.prototype.name = ""; + + /** + * Creates a new GetModelRequest instance using the specified properties. + * @function create + * @memberof google.ai.generativelanguage.v1beta2.GetModelRequest + * @static + * @param {google.ai.generativelanguage.v1beta2.IGetModelRequest=} [properties] Properties to set + * @returns {google.ai.generativelanguage.v1beta2.GetModelRequest} GetModelRequest instance + */ + GetModelRequest.create = function create(properties) { + return new GetModelRequest(properties); + }; + + /** + * Encodes the specified GetModelRequest message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.GetModelRequest.verify|verify} messages. + * @function encode + * @memberof google.ai.generativelanguage.v1beta2.GetModelRequest + * @static + * @param {google.ai.generativelanguage.v1beta2.IGetModelRequest} message GetModelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetModelRequest.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 GetModelRequest message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.GetModelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.GetModelRequest + * @static + * @param {google.ai.generativelanguage.v1beta2.IGetModelRequest} message GetModelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetModelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetModelRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ai.generativelanguage.v1beta2.GetModelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ai.generativelanguage.v1beta2.GetModelRequest} GetModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetModelRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ai.generativelanguage.v1beta2.GetModelRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetModelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.GetModelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ai.generativelanguage.v1beta2.GetModelRequest} GetModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetModelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetModelRequest message. + * @function verify + * @memberof google.ai.generativelanguage.v1beta2.GetModelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetModelRequest.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 GetModelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ai.generativelanguage.v1beta2.GetModelRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ai.generativelanguage.v1beta2.GetModelRequest} GetModelRequest + */ + GetModelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ai.generativelanguage.v1beta2.GetModelRequest) + return object; + var message = new $root.google.ai.generativelanguage.v1beta2.GetModelRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetModelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ai.generativelanguage.v1beta2.GetModelRequest + * @static + * @param {google.ai.generativelanguage.v1beta2.GetModelRequest} message GetModelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetModelRequest.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 GetModelRequest to JSON. + * @function toJSON + * @memberof google.ai.generativelanguage.v1beta2.GetModelRequest + * @instance + * @returns {Object.} JSON object + */ + GetModelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetModelRequest + * @function getTypeUrl + * @memberof google.ai.generativelanguage.v1beta2.GetModelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetModelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ai.generativelanguage.v1beta2.GetModelRequest"; + }; + + return GetModelRequest; + })(); + + v1beta2.ListModelsRequest = (function() { + + /** + * Properties of a ListModelsRequest. + * @memberof google.ai.generativelanguage.v1beta2 + * @interface IListModelsRequest + * @property {number|null} [pageSize] ListModelsRequest pageSize + * @property {string|null} [pageToken] ListModelsRequest pageToken + */ + + /** + * Constructs a new ListModelsRequest. + * @memberof google.ai.generativelanguage.v1beta2 + * @classdesc Represents a ListModelsRequest. + * @implements IListModelsRequest + * @constructor + * @param {google.ai.generativelanguage.v1beta2.IListModelsRequest=} [properties] Properties to set + */ + function ListModelsRequest(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]]; + } + + /** + * ListModelsRequest pageSize. + * @member {number} pageSize + * @memberof google.ai.generativelanguage.v1beta2.ListModelsRequest + * @instance + */ + ListModelsRequest.prototype.pageSize = 0; + + /** + * ListModelsRequest pageToken. + * @member {string} pageToken + * @memberof google.ai.generativelanguage.v1beta2.ListModelsRequest + * @instance + */ + ListModelsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListModelsRequest instance using the specified properties. + * @function create + * @memberof google.ai.generativelanguage.v1beta2.ListModelsRequest + * @static + * @param {google.ai.generativelanguage.v1beta2.IListModelsRequest=} [properties] Properties to set + * @returns {google.ai.generativelanguage.v1beta2.ListModelsRequest} ListModelsRequest instance + */ + ListModelsRequest.create = function create(properties) { + return new ListModelsRequest(properties); + }; + + /** + * Encodes the specified ListModelsRequest message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.ListModelsRequest.verify|verify} messages. + * @function encode + * @memberof google.ai.generativelanguage.v1beta2.ListModelsRequest + * @static + * @param {google.ai.generativelanguage.v1beta2.IListModelsRequest} message ListModelsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListModelsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + 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); + return writer; + }; + + /** + * Encodes the specified ListModelsRequest message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.ListModelsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.ListModelsRequest + * @static + * @param {google.ai.generativelanguage.v1beta2.IListModelsRequest} message ListModelsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListModelsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListModelsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ai.generativelanguage.v1beta2.ListModelsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ai.generativelanguage.v1beta2.ListModelsRequest} ListModelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListModelsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ai.generativelanguage.v1beta2.ListModelsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListModelsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.ListModelsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ai.generativelanguage.v1beta2.ListModelsRequest} ListModelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListModelsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListModelsRequest message. + * @function verify + * @memberof google.ai.generativelanguage.v1beta2.ListModelsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListModelsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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"; + return null; + }; + + /** + * Creates a ListModelsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ai.generativelanguage.v1beta2.ListModelsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ai.generativelanguage.v1beta2.ListModelsRequest} ListModelsRequest + */ + ListModelsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ai.generativelanguage.v1beta2.ListModelsRequest) + return object; + var message = new $root.google.ai.generativelanguage.v1beta2.ListModelsRequest(); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListModelsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ai.generativelanguage.v1beta2.ListModelsRequest + * @static + * @param {google.ai.generativelanguage.v1beta2.ListModelsRequest} message ListModelsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListModelsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.pageSize = 0; + object.pageToken = ""; + } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListModelsRequest to JSON. + * @function toJSON + * @memberof google.ai.generativelanguage.v1beta2.ListModelsRequest + * @instance + * @returns {Object.} JSON object + */ + ListModelsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListModelsRequest + * @function getTypeUrl + * @memberof google.ai.generativelanguage.v1beta2.ListModelsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListModelsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ai.generativelanguage.v1beta2.ListModelsRequest"; + }; + + return ListModelsRequest; + })(); + + v1beta2.ListModelsResponse = (function() { + + /** + * Properties of a ListModelsResponse. + * @memberof google.ai.generativelanguage.v1beta2 + * @interface IListModelsResponse + * @property {Array.|null} [models] ListModelsResponse models + * @property {string|null} [nextPageToken] ListModelsResponse nextPageToken + */ + + /** + * Constructs a new ListModelsResponse. + * @memberof google.ai.generativelanguage.v1beta2 + * @classdesc Represents a ListModelsResponse. + * @implements IListModelsResponse + * @constructor + * @param {google.ai.generativelanguage.v1beta2.IListModelsResponse=} [properties] Properties to set + */ + function ListModelsResponse(properties) { + this.models = []; + 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]]; + } + + /** + * ListModelsResponse models. + * @member {Array.} models + * @memberof google.ai.generativelanguage.v1beta2.ListModelsResponse + * @instance + */ + ListModelsResponse.prototype.models = $util.emptyArray; + + /** + * ListModelsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.ai.generativelanguage.v1beta2.ListModelsResponse + * @instance + */ + ListModelsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListModelsResponse instance using the specified properties. + * @function create + * @memberof google.ai.generativelanguage.v1beta2.ListModelsResponse + * @static + * @param {google.ai.generativelanguage.v1beta2.IListModelsResponse=} [properties] Properties to set + * @returns {google.ai.generativelanguage.v1beta2.ListModelsResponse} ListModelsResponse instance + */ + ListModelsResponse.create = function create(properties) { + return new ListModelsResponse(properties); + }; + + /** + * Encodes the specified ListModelsResponse message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.ListModelsResponse.verify|verify} messages. + * @function encode + * @memberof google.ai.generativelanguage.v1beta2.ListModelsResponse + * @static + * @param {google.ai.generativelanguage.v1beta2.IListModelsResponse} message ListModelsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListModelsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.models != null && message.models.length) + for (var i = 0; i < message.models.length; ++i) + $root.google.ai.generativelanguage.v1beta2.Model.encode(message.models[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 ListModelsResponse message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.ListModelsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.ListModelsResponse + * @static + * @param {google.ai.generativelanguage.v1beta2.IListModelsResponse} message ListModelsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListModelsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListModelsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ai.generativelanguage.v1beta2.ListModelsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ai.generativelanguage.v1beta2.ListModelsResponse} ListModelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListModelsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ai.generativelanguage.v1beta2.ListModelsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.models && message.models.length)) + message.models = []; + message.models.push($root.google.ai.generativelanguage.v1beta2.Model.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListModelsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.ListModelsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ai.generativelanguage.v1beta2.ListModelsResponse} ListModelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListModelsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListModelsResponse message. + * @function verify + * @memberof google.ai.generativelanguage.v1beta2.ListModelsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListModelsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.models != null && message.hasOwnProperty("models")) { + if (!Array.isArray(message.models)) + return "models: array expected"; + for (var i = 0; i < message.models.length; ++i) { + var error = $root.google.ai.generativelanguage.v1beta2.Model.verify(message.models[i]); + if (error) + return "models." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListModelsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ai.generativelanguage.v1beta2.ListModelsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ai.generativelanguage.v1beta2.ListModelsResponse} ListModelsResponse + */ + ListModelsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ai.generativelanguage.v1beta2.ListModelsResponse) + return object; + var message = new $root.google.ai.generativelanguage.v1beta2.ListModelsResponse(); + if (object.models) { + if (!Array.isArray(object.models)) + throw TypeError(".google.ai.generativelanguage.v1beta2.ListModelsResponse.models: array expected"); + message.models = []; + for (var i = 0; i < object.models.length; ++i) { + if (typeof object.models[i] !== "object") + throw TypeError(".google.ai.generativelanguage.v1beta2.ListModelsResponse.models: object expected"); + message.models[i] = $root.google.ai.generativelanguage.v1beta2.Model.fromObject(object.models[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListModelsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ai.generativelanguage.v1beta2.ListModelsResponse + * @static + * @param {google.ai.generativelanguage.v1beta2.ListModelsResponse} message ListModelsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListModelsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.models = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.models && message.models.length) { + object.models = []; + for (var j = 0; j < message.models.length; ++j) + object.models[j] = $root.google.ai.generativelanguage.v1beta2.Model.toObject(message.models[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListModelsResponse to JSON. + * @function toJSON + * @memberof google.ai.generativelanguage.v1beta2.ListModelsResponse + * @instance + * @returns {Object.} JSON object + */ + ListModelsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListModelsResponse + * @function getTypeUrl + * @memberof google.ai.generativelanguage.v1beta2.ListModelsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListModelsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ai.generativelanguage.v1beta2.ListModelsResponse"; + }; + + return ListModelsResponse; + })(); + + v1beta2.TextService = (function() { + + /** + * Constructs a new TextService service. + * @memberof google.ai.generativelanguage.v1beta2 + * @classdesc Represents a TextService + * @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 TextService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (TextService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = TextService; + + /** + * Creates new TextService service using the specified rpc implementation. + * @function create + * @memberof google.ai.generativelanguage.v1beta2.TextService + * @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 {TextService} RPC service. Useful where requests and/or responses are streamed. + */ + TextService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.ai.generativelanguage.v1beta2.TextService|generateText}. + * @memberof google.ai.generativelanguage.v1beta2.TextService + * @typedef GenerateTextCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ai.generativelanguage.v1beta2.GenerateTextResponse} [response] GenerateTextResponse + */ + + /** + * Calls GenerateText. + * @function generateText + * @memberof google.ai.generativelanguage.v1beta2.TextService + * @instance + * @param {google.ai.generativelanguage.v1beta2.IGenerateTextRequest} request GenerateTextRequest message or plain object + * @param {google.ai.generativelanguage.v1beta2.TextService.GenerateTextCallback} callback Node-style callback called with the error, if any, and GenerateTextResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TextService.prototype.generateText = function generateText(request, callback) { + return this.rpcCall(generateText, $root.google.ai.generativelanguage.v1beta2.GenerateTextRequest, $root.google.ai.generativelanguage.v1beta2.GenerateTextResponse, request, callback); + }, "name", { value: "GenerateText" }); + + /** + * Calls GenerateText. + * @function generateText + * @memberof google.ai.generativelanguage.v1beta2.TextService + * @instance + * @param {google.ai.generativelanguage.v1beta2.IGenerateTextRequest} request GenerateTextRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.ai.generativelanguage.v1beta2.TextService|embedText}. + * @memberof google.ai.generativelanguage.v1beta2.TextService + * @typedef EmbedTextCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.ai.generativelanguage.v1beta2.EmbedTextResponse} [response] EmbedTextResponse + */ + + /** + * Calls EmbedText. + * @function embedText + * @memberof google.ai.generativelanguage.v1beta2.TextService + * @instance + * @param {google.ai.generativelanguage.v1beta2.IEmbedTextRequest} request EmbedTextRequest message or plain object + * @param {google.ai.generativelanguage.v1beta2.TextService.EmbedTextCallback} callback Node-style callback called with the error, if any, and EmbedTextResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TextService.prototype.embedText = function embedText(request, callback) { + return this.rpcCall(embedText, $root.google.ai.generativelanguage.v1beta2.EmbedTextRequest, $root.google.ai.generativelanguage.v1beta2.EmbedTextResponse, request, callback); + }, "name", { value: "EmbedText" }); + + /** + * Calls EmbedText. + * @function embedText + * @memberof google.ai.generativelanguage.v1beta2.TextService + * @instance + * @param {google.ai.generativelanguage.v1beta2.IEmbedTextRequest} request EmbedTextRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return TextService; + })(); + + v1beta2.GenerateTextRequest = (function() { + + /** + * Properties of a GenerateTextRequest. + * @memberof google.ai.generativelanguage.v1beta2 + * @interface IGenerateTextRequest + * @property {string|null} [model] GenerateTextRequest model + * @property {google.ai.generativelanguage.v1beta2.ITextPrompt|null} [prompt] GenerateTextRequest prompt + * @property {number|null} [temperature] GenerateTextRequest temperature + * @property {number|null} [candidateCount] GenerateTextRequest candidateCount + * @property {number|null} [maxOutputTokens] GenerateTextRequest maxOutputTokens + * @property {number|null} [topP] GenerateTextRequest topP + * @property {number|null} [topK] GenerateTextRequest topK + * @property {Array.|null} [safetySettings] GenerateTextRequest safetySettings + * @property {Array.|null} [stopSequences] GenerateTextRequest stopSequences + */ + + /** + * Constructs a new GenerateTextRequest. + * @memberof google.ai.generativelanguage.v1beta2 + * @classdesc Represents a GenerateTextRequest. + * @implements IGenerateTextRequest + * @constructor + * @param {google.ai.generativelanguage.v1beta2.IGenerateTextRequest=} [properties] Properties to set + */ + function GenerateTextRequest(properties) { + this.safetySettings = []; + this.stopSequences = []; + 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]]; + } + + /** + * GenerateTextRequest model. + * @member {string} model + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextRequest + * @instance + */ + GenerateTextRequest.prototype.model = ""; + + /** + * GenerateTextRequest prompt. + * @member {google.ai.generativelanguage.v1beta2.ITextPrompt|null|undefined} prompt + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextRequest + * @instance + */ + GenerateTextRequest.prototype.prompt = null; + + /** + * GenerateTextRequest temperature. + * @member {number|null|undefined} temperature + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextRequest + * @instance + */ + GenerateTextRequest.prototype.temperature = null; + + /** + * GenerateTextRequest candidateCount. + * @member {number|null|undefined} candidateCount + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextRequest + * @instance + */ + GenerateTextRequest.prototype.candidateCount = null; + + /** + * GenerateTextRequest maxOutputTokens. + * @member {number|null|undefined} maxOutputTokens + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextRequest + * @instance + */ + GenerateTextRequest.prototype.maxOutputTokens = null; + + /** + * GenerateTextRequest topP. + * @member {number|null|undefined} topP + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextRequest + * @instance + */ + GenerateTextRequest.prototype.topP = null; + + /** + * GenerateTextRequest topK. + * @member {number|null|undefined} topK + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextRequest + * @instance + */ + GenerateTextRequest.prototype.topK = null; + + /** + * GenerateTextRequest safetySettings. + * @member {Array.} safetySettings + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextRequest + * @instance + */ + GenerateTextRequest.prototype.safetySettings = $util.emptyArray; + + /** + * GenerateTextRequest stopSequences. + * @member {Array.} stopSequences + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextRequest + * @instance + */ + GenerateTextRequest.prototype.stopSequences = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GenerateTextRequest _temperature. + * @member {"temperature"|undefined} _temperature + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextRequest + * @instance + */ + Object.defineProperty(GenerateTextRequest.prototype, "_temperature", { + get: $util.oneOfGetter($oneOfFields = ["temperature"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * GenerateTextRequest _candidateCount. + * @member {"candidateCount"|undefined} _candidateCount + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextRequest + * @instance + */ + Object.defineProperty(GenerateTextRequest.prototype, "_candidateCount", { + get: $util.oneOfGetter($oneOfFields = ["candidateCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * GenerateTextRequest _maxOutputTokens. + * @member {"maxOutputTokens"|undefined} _maxOutputTokens + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextRequest + * @instance + */ + Object.defineProperty(GenerateTextRequest.prototype, "_maxOutputTokens", { + get: $util.oneOfGetter($oneOfFields = ["maxOutputTokens"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * GenerateTextRequest _topP. + * @member {"topP"|undefined} _topP + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextRequest + * @instance + */ + Object.defineProperty(GenerateTextRequest.prototype, "_topP", { + get: $util.oneOfGetter($oneOfFields = ["topP"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * GenerateTextRequest _topK. + * @member {"topK"|undefined} _topK + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextRequest + * @instance + */ + Object.defineProperty(GenerateTextRequest.prototype, "_topK", { + get: $util.oneOfGetter($oneOfFields = ["topK"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GenerateTextRequest instance using the specified properties. + * @function create + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextRequest + * @static + * @param {google.ai.generativelanguage.v1beta2.IGenerateTextRequest=} [properties] Properties to set + * @returns {google.ai.generativelanguage.v1beta2.GenerateTextRequest} GenerateTextRequest instance + */ + GenerateTextRequest.create = function create(properties) { + return new GenerateTextRequest(properties); + }; + + /** + * Encodes the specified GenerateTextRequest message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.GenerateTextRequest.verify|verify} messages. + * @function encode + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextRequest + * @static + * @param {google.ai.generativelanguage.v1beta2.IGenerateTextRequest} message GenerateTextRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateTextRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.model != null && Object.hasOwnProperty.call(message, "model")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.model); + if (message.prompt != null && Object.hasOwnProperty.call(message, "prompt")) + $root.google.ai.generativelanguage.v1beta2.TextPrompt.encode(message.prompt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.temperature != null && Object.hasOwnProperty.call(message, "temperature")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.temperature); + if (message.candidateCount != null && Object.hasOwnProperty.call(message, "candidateCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.candidateCount); + if (message.maxOutputTokens != null && Object.hasOwnProperty.call(message, "maxOutputTokens")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maxOutputTokens); + if (message.topP != null && Object.hasOwnProperty.call(message, "topP")) + writer.uint32(/* id 6, wireType 5 =*/53).float(message.topP); + if (message.topK != null && Object.hasOwnProperty.call(message, "topK")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.topK); + if (message.safetySettings != null && message.safetySettings.length) + for (var i = 0; i < message.safetySettings.length; ++i) + $root.google.ai.generativelanguage.v1beta2.SafetySetting.encode(message.safetySettings[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.stopSequences != null && message.stopSequences.length) + for (var i = 0; i < message.stopSequences.length; ++i) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.stopSequences[i]); + return writer; + }; + + /** + * Encodes the specified GenerateTextRequest message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.GenerateTextRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextRequest + * @static + * @param {google.ai.generativelanguage.v1beta2.IGenerateTextRequest} message GenerateTextRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateTextRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenerateTextRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ai.generativelanguage.v1beta2.GenerateTextRequest} GenerateTextRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateTextRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ai.generativelanguage.v1beta2.GenerateTextRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.model = reader.string(); + break; + } + case 2: { + message.prompt = $root.google.ai.generativelanguage.v1beta2.TextPrompt.decode(reader, reader.uint32()); + break; + } + case 3: { + message.temperature = reader.float(); + break; + } + case 4: { + message.candidateCount = reader.int32(); + break; + } + case 5: { + message.maxOutputTokens = reader.int32(); + break; + } + case 6: { + message.topP = reader.float(); + break; + } + case 7: { + message.topK = reader.int32(); + break; + } + case 8: { + if (!(message.safetySettings && message.safetySettings.length)) + message.safetySettings = []; + message.safetySettings.push($root.google.ai.generativelanguage.v1beta2.SafetySetting.decode(reader, reader.uint32())); + break; + } + case 9: { + if (!(message.stopSequences && message.stopSequences.length)) + message.stopSequences = []; + message.stopSequences.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenerateTextRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ai.generativelanguage.v1beta2.GenerateTextRequest} GenerateTextRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateTextRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenerateTextRequest message. + * @function verify + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenerateTextRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.model != null && message.hasOwnProperty("model")) + if (!$util.isString(message.model)) + return "model: string expected"; + if (message.prompt != null && message.hasOwnProperty("prompt")) { + var error = $root.google.ai.generativelanguage.v1beta2.TextPrompt.verify(message.prompt); + if (error) + return "prompt." + error; + } + if (message.temperature != null && message.hasOwnProperty("temperature")) { + properties._temperature = 1; + if (typeof message.temperature !== "number") + return "temperature: number expected"; + } + if (message.candidateCount != null && message.hasOwnProperty("candidateCount")) { + properties._candidateCount = 1; + if (!$util.isInteger(message.candidateCount)) + return "candidateCount: integer expected"; + } + if (message.maxOutputTokens != null && message.hasOwnProperty("maxOutputTokens")) { + properties._maxOutputTokens = 1; + if (!$util.isInteger(message.maxOutputTokens)) + return "maxOutputTokens: integer expected"; + } + if (message.topP != null && message.hasOwnProperty("topP")) { + properties._topP = 1; + if (typeof message.topP !== "number") + return "topP: number expected"; + } + if (message.topK != null && message.hasOwnProperty("topK")) { + properties._topK = 1; + if (!$util.isInteger(message.topK)) + return "topK: integer expected"; + } + if (message.safetySettings != null && message.hasOwnProperty("safetySettings")) { + if (!Array.isArray(message.safetySettings)) + return "safetySettings: array expected"; + for (var i = 0; i < message.safetySettings.length; ++i) { + var error = $root.google.ai.generativelanguage.v1beta2.SafetySetting.verify(message.safetySettings[i]); + if (error) + return "safetySettings." + error; + } + } + if (message.stopSequences != null && message.hasOwnProperty("stopSequences")) { + if (!Array.isArray(message.stopSequences)) + return "stopSequences: array expected"; + for (var i = 0; i < message.stopSequences.length; ++i) + if (!$util.isString(message.stopSequences[i])) + return "stopSequences: string[] expected"; + } + return null; + }; + + /** + * Creates a GenerateTextRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ai.generativelanguage.v1beta2.GenerateTextRequest} GenerateTextRequest + */ + GenerateTextRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ai.generativelanguage.v1beta2.GenerateTextRequest) + return object; + var message = new $root.google.ai.generativelanguage.v1beta2.GenerateTextRequest(); + if (object.model != null) + message.model = String(object.model); + if (object.prompt != null) { + if (typeof object.prompt !== "object") + throw TypeError(".google.ai.generativelanguage.v1beta2.GenerateTextRequest.prompt: object expected"); + message.prompt = $root.google.ai.generativelanguage.v1beta2.TextPrompt.fromObject(object.prompt); + } + if (object.temperature != null) + message.temperature = Number(object.temperature); + if (object.candidateCount != null) + message.candidateCount = object.candidateCount | 0; + if (object.maxOutputTokens != null) + message.maxOutputTokens = object.maxOutputTokens | 0; + if (object.topP != null) + message.topP = Number(object.topP); + if (object.topK != null) + message.topK = object.topK | 0; + if (object.safetySettings) { + if (!Array.isArray(object.safetySettings)) + throw TypeError(".google.ai.generativelanguage.v1beta2.GenerateTextRequest.safetySettings: array expected"); + message.safetySettings = []; + for (var i = 0; i < object.safetySettings.length; ++i) { + if (typeof object.safetySettings[i] !== "object") + throw TypeError(".google.ai.generativelanguage.v1beta2.GenerateTextRequest.safetySettings: object expected"); + message.safetySettings[i] = $root.google.ai.generativelanguage.v1beta2.SafetySetting.fromObject(object.safetySettings[i]); + } + } + if (object.stopSequences) { + if (!Array.isArray(object.stopSequences)) + throw TypeError(".google.ai.generativelanguage.v1beta2.GenerateTextRequest.stopSequences: array expected"); + message.stopSequences = []; + for (var i = 0; i < object.stopSequences.length; ++i) + message.stopSequences[i] = String(object.stopSequences[i]); + } + return message; + }; + + /** + * Creates a plain object from a GenerateTextRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextRequest + * @static + * @param {google.ai.generativelanguage.v1beta2.GenerateTextRequest} message GenerateTextRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenerateTextRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.safetySettings = []; + object.stopSequences = []; + } + if (options.defaults) { + object.model = ""; + object.prompt = null; + } + if (message.model != null && message.hasOwnProperty("model")) + object.model = message.model; + if (message.prompt != null && message.hasOwnProperty("prompt")) + object.prompt = $root.google.ai.generativelanguage.v1beta2.TextPrompt.toObject(message.prompt, options); + if (message.temperature != null && message.hasOwnProperty("temperature")) { + object.temperature = options.json && !isFinite(message.temperature) ? String(message.temperature) : message.temperature; + if (options.oneofs) + object._temperature = "temperature"; + } + if (message.candidateCount != null && message.hasOwnProperty("candidateCount")) { + object.candidateCount = message.candidateCount; + if (options.oneofs) + object._candidateCount = "candidateCount"; + } + if (message.maxOutputTokens != null && message.hasOwnProperty("maxOutputTokens")) { + object.maxOutputTokens = message.maxOutputTokens; + if (options.oneofs) + object._maxOutputTokens = "maxOutputTokens"; + } + if (message.topP != null && message.hasOwnProperty("topP")) { + object.topP = options.json && !isFinite(message.topP) ? String(message.topP) : message.topP; + if (options.oneofs) + object._topP = "topP"; + } + if (message.topK != null && message.hasOwnProperty("topK")) { + object.topK = message.topK; + if (options.oneofs) + object._topK = "topK"; + } + if (message.safetySettings && message.safetySettings.length) { + object.safetySettings = []; + for (var j = 0; j < message.safetySettings.length; ++j) + object.safetySettings[j] = $root.google.ai.generativelanguage.v1beta2.SafetySetting.toObject(message.safetySettings[j], options); + } + if (message.stopSequences && message.stopSequences.length) { + object.stopSequences = []; + for (var j = 0; j < message.stopSequences.length; ++j) + object.stopSequences[j] = message.stopSequences[j]; + } + return object; + }; + + /** + * Converts this GenerateTextRequest to JSON. + * @function toJSON + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextRequest + * @instance + * @returns {Object.} JSON object + */ + GenerateTextRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GenerateTextRequest + * @function getTypeUrl + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GenerateTextRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ai.generativelanguage.v1beta2.GenerateTextRequest"; + }; + + return GenerateTextRequest; + })(); + + v1beta2.GenerateTextResponse = (function() { + + /** + * Properties of a GenerateTextResponse. + * @memberof google.ai.generativelanguage.v1beta2 + * @interface IGenerateTextResponse + * @property {Array.|null} [candidates] GenerateTextResponse candidates + * @property {Array.|null} [filters] GenerateTextResponse filters + * @property {Array.|null} [safetyFeedback] GenerateTextResponse safetyFeedback + */ + + /** + * Constructs a new GenerateTextResponse. + * @memberof google.ai.generativelanguage.v1beta2 + * @classdesc Represents a GenerateTextResponse. + * @implements IGenerateTextResponse + * @constructor + * @param {google.ai.generativelanguage.v1beta2.IGenerateTextResponse=} [properties] Properties to set + */ + function GenerateTextResponse(properties) { + this.candidates = []; + this.filters = []; + this.safetyFeedback = []; + 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]]; + } + + /** + * GenerateTextResponse candidates. + * @member {Array.} candidates + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextResponse + * @instance + */ + GenerateTextResponse.prototype.candidates = $util.emptyArray; + + /** + * GenerateTextResponse filters. + * @member {Array.} filters + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextResponse + * @instance + */ + GenerateTextResponse.prototype.filters = $util.emptyArray; + + /** + * GenerateTextResponse safetyFeedback. + * @member {Array.} safetyFeedback + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextResponse + * @instance + */ + GenerateTextResponse.prototype.safetyFeedback = $util.emptyArray; + + /** + * Creates a new GenerateTextResponse instance using the specified properties. + * @function create + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextResponse + * @static + * @param {google.ai.generativelanguage.v1beta2.IGenerateTextResponse=} [properties] Properties to set + * @returns {google.ai.generativelanguage.v1beta2.GenerateTextResponse} GenerateTextResponse instance + */ + GenerateTextResponse.create = function create(properties) { + return new GenerateTextResponse(properties); + }; + + /** + * Encodes the specified GenerateTextResponse message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.GenerateTextResponse.verify|verify} messages. + * @function encode + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextResponse + * @static + * @param {google.ai.generativelanguage.v1beta2.IGenerateTextResponse} message GenerateTextResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateTextResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.candidates != null && message.candidates.length) + for (var i = 0; i < message.candidates.length; ++i) + $root.google.ai.generativelanguage.v1beta2.TextCompletion.encode(message.candidates[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.filters != null && message.filters.length) + for (var i = 0; i < message.filters.length; ++i) + $root.google.ai.generativelanguage.v1beta2.ContentFilter.encode(message.filters[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.safetyFeedback != null && message.safetyFeedback.length) + for (var i = 0; i < message.safetyFeedback.length; ++i) + $root.google.ai.generativelanguage.v1beta2.SafetyFeedback.encode(message.safetyFeedback[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GenerateTextResponse message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.GenerateTextResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextResponse + * @static + * @param {google.ai.generativelanguage.v1beta2.IGenerateTextResponse} message GenerateTextResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateTextResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenerateTextResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ai.generativelanguage.v1beta2.GenerateTextResponse} GenerateTextResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateTextResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ai.generativelanguage.v1beta2.GenerateTextResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.candidates && message.candidates.length)) + message.candidates = []; + message.candidates.push($root.google.ai.generativelanguage.v1beta2.TextCompletion.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.filters && message.filters.length)) + message.filters = []; + message.filters.push($root.google.ai.generativelanguage.v1beta2.ContentFilter.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.safetyFeedback && message.safetyFeedback.length)) + message.safetyFeedback = []; + message.safetyFeedback.push($root.google.ai.generativelanguage.v1beta2.SafetyFeedback.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenerateTextResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ai.generativelanguage.v1beta2.GenerateTextResponse} GenerateTextResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateTextResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenerateTextResponse message. + * @function verify + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenerateTextResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.candidates != null && message.hasOwnProperty("candidates")) { + if (!Array.isArray(message.candidates)) + return "candidates: array expected"; + for (var i = 0; i < message.candidates.length; ++i) { + var error = $root.google.ai.generativelanguage.v1beta2.TextCompletion.verify(message.candidates[i]); + if (error) + return "candidates." + error; + } + } + if (message.filters != null && message.hasOwnProperty("filters")) { + if (!Array.isArray(message.filters)) + return "filters: array expected"; + for (var i = 0; i < message.filters.length; ++i) { + var error = $root.google.ai.generativelanguage.v1beta2.ContentFilter.verify(message.filters[i]); + if (error) + return "filters." + error; + } + } + if (message.safetyFeedback != null && message.hasOwnProperty("safetyFeedback")) { + if (!Array.isArray(message.safetyFeedback)) + return "safetyFeedback: array expected"; + for (var i = 0; i < message.safetyFeedback.length; ++i) { + var error = $root.google.ai.generativelanguage.v1beta2.SafetyFeedback.verify(message.safetyFeedback[i]); + if (error) + return "safetyFeedback." + error; + } + } + return null; + }; + + /** + * Creates a GenerateTextResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ai.generativelanguage.v1beta2.GenerateTextResponse} GenerateTextResponse + */ + GenerateTextResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ai.generativelanguage.v1beta2.GenerateTextResponse) + return object; + var message = new $root.google.ai.generativelanguage.v1beta2.GenerateTextResponse(); + if (object.candidates) { + if (!Array.isArray(object.candidates)) + throw TypeError(".google.ai.generativelanguage.v1beta2.GenerateTextResponse.candidates: array expected"); + message.candidates = []; + for (var i = 0; i < object.candidates.length; ++i) { + if (typeof object.candidates[i] !== "object") + throw TypeError(".google.ai.generativelanguage.v1beta2.GenerateTextResponse.candidates: object expected"); + message.candidates[i] = $root.google.ai.generativelanguage.v1beta2.TextCompletion.fromObject(object.candidates[i]); + } + } + if (object.filters) { + if (!Array.isArray(object.filters)) + throw TypeError(".google.ai.generativelanguage.v1beta2.GenerateTextResponse.filters: array expected"); + message.filters = []; + for (var i = 0; i < object.filters.length; ++i) { + if (typeof object.filters[i] !== "object") + throw TypeError(".google.ai.generativelanguage.v1beta2.GenerateTextResponse.filters: object expected"); + message.filters[i] = $root.google.ai.generativelanguage.v1beta2.ContentFilter.fromObject(object.filters[i]); + } + } + if (object.safetyFeedback) { + if (!Array.isArray(object.safetyFeedback)) + throw TypeError(".google.ai.generativelanguage.v1beta2.GenerateTextResponse.safetyFeedback: array expected"); + message.safetyFeedback = []; + for (var i = 0; i < object.safetyFeedback.length; ++i) { + if (typeof object.safetyFeedback[i] !== "object") + throw TypeError(".google.ai.generativelanguage.v1beta2.GenerateTextResponse.safetyFeedback: object expected"); + message.safetyFeedback[i] = $root.google.ai.generativelanguage.v1beta2.SafetyFeedback.fromObject(object.safetyFeedback[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GenerateTextResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextResponse + * @static + * @param {google.ai.generativelanguage.v1beta2.GenerateTextResponse} message GenerateTextResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenerateTextResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.candidates = []; + object.filters = []; + object.safetyFeedback = []; + } + if (message.candidates && message.candidates.length) { + object.candidates = []; + for (var j = 0; j < message.candidates.length; ++j) + object.candidates[j] = $root.google.ai.generativelanguage.v1beta2.TextCompletion.toObject(message.candidates[j], options); + } + if (message.filters && message.filters.length) { + object.filters = []; + for (var j = 0; j < message.filters.length; ++j) + object.filters[j] = $root.google.ai.generativelanguage.v1beta2.ContentFilter.toObject(message.filters[j], options); + } + if (message.safetyFeedback && message.safetyFeedback.length) { + object.safetyFeedback = []; + for (var j = 0; j < message.safetyFeedback.length; ++j) + object.safetyFeedback[j] = $root.google.ai.generativelanguage.v1beta2.SafetyFeedback.toObject(message.safetyFeedback[j], options); + } + return object; + }; + + /** + * Converts this GenerateTextResponse to JSON. + * @function toJSON + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextResponse + * @instance + * @returns {Object.} JSON object + */ + GenerateTextResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GenerateTextResponse + * @function getTypeUrl + * @memberof google.ai.generativelanguage.v1beta2.GenerateTextResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GenerateTextResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ai.generativelanguage.v1beta2.GenerateTextResponse"; + }; + + return GenerateTextResponse; + })(); + + v1beta2.TextPrompt = (function() { + + /** + * Properties of a TextPrompt. + * @memberof google.ai.generativelanguage.v1beta2 + * @interface ITextPrompt + * @property {string|null} [text] TextPrompt text + */ + + /** + * Constructs a new TextPrompt. + * @memberof google.ai.generativelanguage.v1beta2 + * @classdesc Represents a TextPrompt. + * @implements ITextPrompt + * @constructor + * @param {google.ai.generativelanguage.v1beta2.ITextPrompt=} [properties] Properties to set + */ + function TextPrompt(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]]; + } + + /** + * TextPrompt text. + * @member {string} text + * @memberof google.ai.generativelanguage.v1beta2.TextPrompt + * @instance + */ + TextPrompt.prototype.text = ""; + + /** + * Creates a new TextPrompt instance using the specified properties. + * @function create + * @memberof google.ai.generativelanguage.v1beta2.TextPrompt + * @static + * @param {google.ai.generativelanguage.v1beta2.ITextPrompt=} [properties] Properties to set + * @returns {google.ai.generativelanguage.v1beta2.TextPrompt} TextPrompt instance + */ + TextPrompt.create = function create(properties) { + return new TextPrompt(properties); + }; + + /** + * Encodes the specified TextPrompt message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.TextPrompt.verify|verify} messages. + * @function encode + * @memberof google.ai.generativelanguage.v1beta2.TextPrompt + * @static + * @param {google.ai.generativelanguage.v1beta2.ITextPrompt} message TextPrompt message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextPrompt.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + return writer; + }; + + /** + * Encodes the specified TextPrompt message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.TextPrompt.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.TextPrompt + * @static + * @param {google.ai.generativelanguage.v1beta2.ITextPrompt} message TextPrompt message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextPrompt.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TextPrompt message from the specified reader or buffer. + * @function decode + * @memberof google.ai.generativelanguage.v1beta2.TextPrompt + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ai.generativelanguage.v1beta2.TextPrompt} TextPrompt + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextPrompt.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ai.generativelanguage.v1beta2.TextPrompt(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.text = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TextPrompt message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.TextPrompt + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ai.generativelanguage.v1beta2.TextPrompt} TextPrompt + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextPrompt.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TextPrompt message. + * @function verify + * @memberof google.ai.generativelanguage.v1beta2.TextPrompt + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TextPrompt.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + return null; + }; + + /** + * Creates a TextPrompt message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ai.generativelanguage.v1beta2.TextPrompt + * @static + * @param {Object.} object Plain object + * @returns {google.ai.generativelanguage.v1beta2.TextPrompt} TextPrompt + */ + TextPrompt.fromObject = function fromObject(object) { + if (object instanceof $root.google.ai.generativelanguage.v1beta2.TextPrompt) + return object; + var message = new $root.google.ai.generativelanguage.v1beta2.TextPrompt(); + if (object.text != null) + message.text = String(object.text); + return message; + }; + + /** + * Creates a plain object from a TextPrompt message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ai.generativelanguage.v1beta2.TextPrompt + * @static + * @param {google.ai.generativelanguage.v1beta2.TextPrompt} message TextPrompt + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TextPrompt.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.text = ""; + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + return object; + }; + + /** + * Converts this TextPrompt to JSON. + * @function toJSON + * @memberof google.ai.generativelanguage.v1beta2.TextPrompt + * @instance + * @returns {Object.} JSON object + */ + TextPrompt.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TextPrompt + * @function getTypeUrl + * @memberof google.ai.generativelanguage.v1beta2.TextPrompt + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TextPrompt.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ai.generativelanguage.v1beta2.TextPrompt"; + }; + + return TextPrompt; + })(); + + v1beta2.TextCompletion = (function() { + + /** + * Properties of a TextCompletion. + * @memberof google.ai.generativelanguage.v1beta2 + * @interface ITextCompletion + * @property {string|null} [output] TextCompletion output + * @property {Array.|null} [safetyRatings] TextCompletion safetyRatings + * @property {google.ai.generativelanguage.v1beta2.ICitationMetadata|null} [citationMetadata] TextCompletion citationMetadata + */ + + /** + * Constructs a new TextCompletion. + * @memberof google.ai.generativelanguage.v1beta2 + * @classdesc Represents a TextCompletion. + * @implements ITextCompletion + * @constructor + * @param {google.ai.generativelanguage.v1beta2.ITextCompletion=} [properties] Properties to set + */ + function TextCompletion(properties) { + this.safetyRatings = []; + 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]]; + } + + /** + * TextCompletion output. + * @member {string} output + * @memberof google.ai.generativelanguage.v1beta2.TextCompletion + * @instance + */ + TextCompletion.prototype.output = ""; + + /** + * TextCompletion safetyRatings. + * @member {Array.} safetyRatings + * @memberof google.ai.generativelanguage.v1beta2.TextCompletion + * @instance + */ + TextCompletion.prototype.safetyRatings = $util.emptyArray; + + /** + * TextCompletion citationMetadata. + * @member {google.ai.generativelanguage.v1beta2.ICitationMetadata|null|undefined} citationMetadata + * @memberof google.ai.generativelanguage.v1beta2.TextCompletion + * @instance + */ + TextCompletion.prototype.citationMetadata = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TextCompletion _citationMetadata. + * @member {"citationMetadata"|undefined} _citationMetadata + * @memberof google.ai.generativelanguage.v1beta2.TextCompletion + * @instance + */ + Object.defineProperty(TextCompletion.prototype, "_citationMetadata", { + get: $util.oneOfGetter($oneOfFields = ["citationMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TextCompletion instance using the specified properties. + * @function create + * @memberof google.ai.generativelanguage.v1beta2.TextCompletion + * @static + * @param {google.ai.generativelanguage.v1beta2.ITextCompletion=} [properties] Properties to set + * @returns {google.ai.generativelanguage.v1beta2.TextCompletion} TextCompletion instance + */ + TextCompletion.create = function create(properties) { + return new TextCompletion(properties); + }; + + /** + * Encodes the specified TextCompletion message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.TextCompletion.verify|verify} messages. + * @function encode + * @memberof google.ai.generativelanguage.v1beta2.TextCompletion + * @static + * @param {google.ai.generativelanguage.v1beta2.ITextCompletion} message TextCompletion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextCompletion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.output != null && Object.hasOwnProperty.call(message, "output")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.output); + if (message.safetyRatings != null && message.safetyRatings.length) + for (var i = 0; i < message.safetyRatings.length; ++i) + $root.google.ai.generativelanguage.v1beta2.SafetyRating.encode(message.safetyRatings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.citationMetadata != null && Object.hasOwnProperty.call(message, "citationMetadata")) + $root.google.ai.generativelanguage.v1beta2.CitationMetadata.encode(message.citationMetadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TextCompletion message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.TextCompletion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.TextCompletion + * @static + * @param {google.ai.generativelanguage.v1beta2.ITextCompletion} message TextCompletion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextCompletion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TextCompletion message from the specified reader or buffer. + * @function decode + * @memberof google.ai.generativelanguage.v1beta2.TextCompletion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ai.generativelanguage.v1beta2.TextCompletion} TextCompletion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextCompletion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ai.generativelanguage.v1beta2.TextCompletion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.output = reader.string(); + break; + } + case 2: { + if (!(message.safetyRatings && message.safetyRatings.length)) + message.safetyRatings = []; + message.safetyRatings.push($root.google.ai.generativelanguage.v1beta2.SafetyRating.decode(reader, reader.uint32())); + break; + } + case 3: { + message.citationMetadata = $root.google.ai.generativelanguage.v1beta2.CitationMetadata.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TextCompletion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.TextCompletion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ai.generativelanguage.v1beta2.TextCompletion} TextCompletion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextCompletion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TextCompletion message. + * @function verify + * @memberof google.ai.generativelanguage.v1beta2.TextCompletion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TextCompletion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.output != null && message.hasOwnProperty("output")) + if (!$util.isString(message.output)) + return "output: string expected"; + if (message.safetyRatings != null && message.hasOwnProperty("safetyRatings")) { + if (!Array.isArray(message.safetyRatings)) + return "safetyRatings: array expected"; + for (var i = 0; i < message.safetyRatings.length; ++i) { + var error = $root.google.ai.generativelanguage.v1beta2.SafetyRating.verify(message.safetyRatings[i]); + if (error) + return "safetyRatings." + error; + } + } + if (message.citationMetadata != null && message.hasOwnProperty("citationMetadata")) { + properties._citationMetadata = 1; + { + var error = $root.google.ai.generativelanguage.v1beta2.CitationMetadata.verify(message.citationMetadata); + if (error) + return "citationMetadata." + error; + } + } + return null; + }; + + /** + * Creates a TextCompletion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ai.generativelanguage.v1beta2.TextCompletion + * @static + * @param {Object.} object Plain object + * @returns {google.ai.generativelanguage.v1beta2.TextCompletion} TextCompletion + */ + TextCompletion.fromObject = function fromObject(object) { + if (object instanceof $root.google.ai.generativelanguage.v1beta2.TextCompletion) + return object; + var message = new $root.google.ai.generativelanguage.v1beta2.TextCompletion(); + if (object.output != null) + message.output = String(object.output); + if (object.safetyRatings) { + if (!Array.isArray(object.safetyRatings)) + throw TypeError(".google.ai.generativelanguage.v1beta2.TextCompletion.safetyRatings: array expected"); + message.safetyRatings = []; + for (var i = 0; i < object.safetyRatings.length; ++i) { + if (typeof object.safetyRatings[i] !== "object") + throw TypeError(".google.ai.generativelanguage.v1beta2.TextCompletion.safetyRatings: object expected"); + message.safetyRatings[i] = $root.google.ai.generativelanguage.v1beta2.SafetyRating.fromObject(object.safetyRatings[i]); + } + } + if (object.citationMetadata != null) { + if (typeof object.citationMetadata !== "object") + throw TypeError(".google.ai.generativelanguage.v1beta2.TextCompletion.citationMetadata: object expected"); + message.citationMetadata = $root.google.ai.generativelanguage.v1beta2.CitationMetadata.fromObject(object.citationMetadata); + } + return message; + }; + + /** + * Creates a plain object from a TextCompletion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ai.generativelanguage.v1beta2.TextCompletion + * @static + * @param {google.ai.generativelanguage.v1beta2.TextCompletion} message TextCompletion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TextCompletion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.safetyRatings = []; + if (options.defaults) + object.output = ""; + if (message.output != null && message.hasOwnProperty("output")) + object.output = message.output; + if (message.safetyRatings && message.safetyRatings.length) { + object.safetyRatings = []; + for (var j = 0; j < message.safetyRatings.length; ++j) + object.safetyRatings[j] = $root.google.ai.generativelanguage.v1beta2.SafetyRating.toObject(message.safetyRatings[j], options); + } + if (message.citationMetadata != null && message.hasOwnProperty("citationMetadata")) { + object.citationMetadata = $root.google.ai.generativelanguage.v1beta2.CitationMetadata.toObject(message.citationMetadata, options); + if (options.oneofs) + object._citationMetadata = "citationMetadata"; + } + return object; + }; + + /** + * Converts this TextCompletion to JSON. + * @function toJSON + * @memberof google.ai.generativelanguage.v1beta2.TextCompletion + * @instance + * @returns {Object.} JSON object + */ + TextCompletion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TextCompletion + * @function getTypeUrl + * @memberof google.ai.generativelanguage.v1beta2.TextCompletion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TextCompletion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ai.generativelanguage.v1beta2.TextCompletion"; + }; + + return TextCompletion; + })(); + + v1beta2.EmbedTextRequest = (function() { + + /** + * Properties of an EmbedTextRequest. + * @memberof google.ai.generativelanguage.v1beta2 + * @interface IEmbedTextRequest + * @property {string|null} [model] EmbedTextRequest model + * @property {string|null} [text] EmbedTextRequest text + */ + + /** + * Constructs a new EmbedTextRequest. + * @memberof google.ai.generativelanguage.v1beta2 + * @classdesc Represents an EmbedTextRequest. + * @implements IEmbedTextRequest + * @constructor + * @param {google.ai.generativelanguage.v1beta2.IEmbedTextRequest=} [properties] Properties to set + */ + function EmbedTextRequest(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]]; + } + + /** + * EmbedTextRequest model. + * @member {string} model + * @memberof google.ai.generativelanguage.v1beta2.EmbedTextRequest + * @instance + */ + EmbedTextRequest.prototype.model = ""; + + /** + * EmbedTextRequest text. + * @member {string} text + * @memberof google.ai.generativelanguage.v1beta2.EmbedTextRequest + * @instance + */ + EmbedTextRequest.prototype.text = ""; + + /** + * Creates a new EmbedTextRequest instance using the specified properties. + * @function create + * @memberof google.ai.generativelanguage.v1beta2.EmbedTextRequest + * @static + * @param {google.ai.generativelanguage.v1beta2.IEmbedTextRequest=} [properties] Properties to set + * @returns {google.ai.generativelanguage.v1beta2.EmbedTextRequest} EmbedTextRequest instance + */ + EmbedTextRequest.create = function create(properties) { + return new EmbedTextRequest(properties); + }; + + /** + * Encodes the specified EmbedTextRequest message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.EmbedTextRequest.verify|verify} messages. + * @function encode + * @memberof google.ai.generativelanguage.v1beta2.EmbedTextRequest + * @static + * @param {google.ai.generativelanguage.v1beta2.IEmbedTextRequest} message EmbedTextRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmbedTextRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.model != null && Object.hasOwnProperty.call(message, "model")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.model); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.text); + return writer; + }; + + /** + * Encodes the specified EmbedTextRequest message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.EmbedTextRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.EmbedTextRequest + * @static + * @param {google.ai.generativelanguage.v1beta2.IEmbedTextRequest} message EmbedTextRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmbedTextRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EmbedTextRequest message from the specified reader or buffer. + * @function decode + * @memberof google.ai.generativelanguage.v1beta2.EmbedTextRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ai.generativelanguage.v1beta2.EmbedTextRequest} EmbedTextRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmbedTextRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ai.generativelanguage.v1beta2.EmbedTextRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.model = reader.string(); + break; + } + case 2: { + message.text = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EmbedTextRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.EmbedTextRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ai.generativelanguage.v1beta2.EmbedTextRequest} EmbedTextRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmbedTextRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EmbedTextRequest message. + * @function verify + * @memberof google.ai.generativelanguage.v1beta2.EmbedTextRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EmbedTextRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.model != null && message.hasOwnProperty("model")) + if (!$util.isString(message.model)) + return "model: string expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + return null; + }; + + /** + * Creates an EmbedTextRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ai.generativelanguage.v1beta2.EmbedTextRequest + * @static + * @param {Object.} object Plain object + * @returns {google.ai.generativelanguage.v1beta2.EmbedTextRequest} EmbedTextRequest + */ + EmbedTextRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.ai.generativelanguage.v1beta2.EmbedTextRequest) + return object; + var message = new $root.google.ai.generativelanguage.v1beta2.EmbedTextRequest(); + if (object.model != null) + message.model = String(object.model); + if (object.text != null) + message.text = String(object.text); + return message; + }; + + /** + * Creates a plain object from an EmbedTextRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ai.generativelanguage.v1beta2.EmbedTextRequest + * @static + * @param {google.ai.generativelanguage.v1beta2.EmbedTextRequest} message EmbedTextRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EmbedTextRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.model = ""; + object.text = ""; + } + if (message.model != null && message.hasOwnProperty("model")) + object.model = message.model; + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + return object; + }; + + /** + * Converts this EmbedTextRequest to JSON. + * @function toJSON + * @memberof google.ai.generativelanguage.v1beta2.EmbedTextRequest + * @instance + * @returns {Object.} JSON object + */ + EmbedTextRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EmbedTextRequest + * @function getTypeUrl + * @memberof google.ai.generativelanguage.v1beta2.EmbedTextRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EmbedTextRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ai.generativelanguage.v1beta2.EmbedTextRequest"; + }; + + return EmbedTextRequest; + })(); + + v1beta2.EmbedTextResponse = (function() { + + /** + * Properties of an EmbedTextResponse. + * @memberof google.ai.generativelanguage.v1beta2 + * @interface IEmbedTextResponse + * @property {google.ai.generativelanguage.v1beta2.IEmbedding|null} [embedding] EmbedTextResponse embedding + */ + + /** + * Constructs a new EmbedTextResponse. + * @memberof google.ai.generativelanguage.v1beta2 + * @classdesc Represents an EmbedTextResponse. + * @implements IEmbedTextResponse + * @constructor + * @param {google.ai.generativelanguage.v1beta2.IEmbedTextResponse=} [properties] Properties to set + */ + function EmbedTextResponse(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]]; + } + + /** + * EmbedTextResponse embedding. + * @member {google.ai.generativelanguage.v1beta2.IEmbedding|null|undefined} embedding + * @memberof google.ai.generativelanguage.v1beta2.EmbedTextResponse + * @instance + */ + EmbedTextResponse.prototype.embedding = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * EmbedTextResponse _embedding. + * @member {"embedding"|undefined} _embedding + * @memberof google.ai.generativelanguage.v1beta2.EmbedTextResponse + * @instance + */ + Object.defineProperty(EmbedTextResponse.prototype, "_embedding", { + get: $util.oneOfGetter($oneOfFields = ["embedding"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new EmbedTextResponse instance using the specified properties. + * @function create + * @memberof google.ai.generativelanguage.v1beta2.EmbedTextResponse + * @static + * @param {google.ai.generativelanguage.v1beta2.IEmbedTextResponse=} [properties] Properties to set + * @returns {google.ai.generativelanguage.v1beta2.EmbedTextResponse} EmbedTextResponse instance + */ + EmbedTextResponse.create = function create(properties) { + return new EmbedTextResponse(properties); + }; + + /** + * Encodes the specified EmbedTextResponse message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.EmbedTextResponse.verify|verify} messages. + * @function encode + * @memberof google.ai.generativelanguage.v1beta2.EmbedTextResponse + * @static + * @param {google.ai.generativelanguage.v1beta2.IEmbedTextResponse} message EmbedTextResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmbedTextResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.embedding != null && Object.hasOwnProperty.call(message, "embedding")) + $root.google.ai.generativelanguage.v1beta2.Embedding.encode(message.embedding, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EmbedTextResponse message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.EmbedTextResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.EmbedTextResponse + * @static + * @param {google.ai.generativelanguage.v1beta2.IEmbedTextResponse} message EmbedTextResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmbedTextResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EmbedTextResponse message from the specified reader or buffer. + * @function decode + * @memberof google.ai.generativelanguage.v1beta2.EmbedTextResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ai.generativelanguage.v1beta2.EmbedTextResponse} EmbedTextResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmbedTextResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ai.generativelanguage.v1beta2.EmbedTextResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.embedding = $root.google.ai.generativelanguage.v1beta2.Embedding.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EmbedTextResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.EmbedTextResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ai.generativelanguage.v1beta2.EmbedTextResponse} EmbedTextResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmbedTextResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EmbedTextResponse message. + * @function verify + * @memberof google.ai.generativelanguage.v1beta2.EmbedTextResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EmbedTextResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.embedding != null && message.hasOwnProperty("embedding")) { + properties._embedding = 1; + { + var error = $root.google.ai.generativelanguage.v1beta2.Embedding.verify(message.embedding); + if (error) + return "embedding." + error; + } + } + return null; + }; + + /** + * Creates an EmbedTextResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ai.generativelanguage.v1beta2.EmbedTextResponse + * @static + * @param {Object.} object Plain object + * @returns {google.ai.generativelanguage.v1beta2.EmbedTextResponse} EmbedTextResponse + */ + EmbedTextResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.ai.generativelanguage.v1beta2.EmbedTextResponse) + return object; + var message = new $root.google.ai.generativelanguage.v1beta2.EmbedTextResponse(); + if (object.embedding != null) { + if (typeof object.embedding !== "object") + throw TypeError(".google.ai.generativelanguage.v1beta2.EmbedTextResponse.embedding: object expected"); + message.embedding = $root.google.ai.generativelanguage.v1beta2.Embedding.fromObject(object.embedding); + } + return message; + }; + + /** + * Creates a plain object from an EmbedTextResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ai.generativelanguage.v1beta2.EmbedTextResponse + * @static + * @param {google.ai.generativelanguage.v1beta2.EmbedTextResponse} message EmbedTextResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EmbedTextResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.embedding != null && message.hasOwnProperty("embedding")) { + object.embedding = $root.google.ai.generativelanguage.v1beta2.Embedding.toObject(message.embedding, options); + if (options.oneofs) + object._embedding = "embedding"; + } + return object; + }; + + /** + * Converts this EmbedTextResponse to JSON. + * @function toJSON + * @memberof google.ai.generativelanguage.v1beta2.EmbedTextResponse + * @instance + * @returns {Object.} JSON object + */ + EmbedTextResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EmbedTextResponse + * @function getTypeUrl + * @memberof google.ai.generativelanguage.v1beta2.EmbedTextResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EmbedTextResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ai.generativelanguage.v1beta2.EmbedTextResponse"; + }; + + return EmbedTextResponse; + })(); + + v1beta2.Embedding = (function() { + + /** + * Properties of an Embedding. + * @memberof google.ai.generativelanguage.v1beta2 + * @interface IEmbedding + * @property {Array.|null} [value] Embedding value + */ + + /** + * Constructs a new Embedding. + * @memberof google.ai.generativelanguage.v1beta2 + * @classdesc Represents an Embedding. + * @implements IEmbedding + * @constructor + * @param {google.ai.generativelanguage.v1beta2.IEmbedding=} [properties] Properties to set + */ + function Embedding(properties) { + this.value = []; + 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]]; + } + + /** + * Embedding value. + * @member {Array.} value + * @memberof google.ai.generativelanguage.v1beta2.Embedding + * @instance + */ + Embedding.prototype.value = $util.emptyArray; + + /** + * Creates a new Embedding instance using the specified properties. + * @function create + * @memberof google.ai.generativelanguage.v1beta2.Embedding + * @static + * @param {google.ai.generativelanguage.v1beta2.IEmbedding=} [properties] Properties to set + * @returns {google.ai.generativelanguage.v1beta2.Embedding} Embedding instance + */ + Embedding.create = function create(properties) { + return new Embedding(properties); + }; + + /** + * Encodes the specified Embedding message. Does not implicitly {@link google.ai.generativelanguage.v1beta2.Embedding.verify|verify} messages. + * @function encode + * @memberof google.ai.generativelanguage.v1beta2.Embedding + * @static + * @param {google.ai.generativelanguage.v1beta2.IEmbedding} message Embedding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Embedding.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && message.value.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.value.length; ++i) + writer.float(message.value[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified Embedding message, length delimited. Does not implicitly {@link google.ai.generativelanguage.v1beta2.Embedding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.Embedding + * @static + * @param {google.ai.generativelanguage.v1beta2.IEmbedding} message Embedding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Embedding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Embedding message from the specified reader or buffer. + * @function decode + * @memberof google.ai.generativelanguage.v1beta2.Embedding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.ai.generativelanguage.v1beta2.Embedding} Embedding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Embedding.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.ai.generativelanguage.v1beta2.Embedding(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.value && message.value.length)) + message.value = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.value.push(reader.float()); + } else + message.value.push(reader.float()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Embedding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.ai.generativelanguage.v1beta2.Embedding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.ai.generativelanguage.v1beta2.Embedding} Embedding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Embedding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Embedding message. + * @function verify + * @memberof google.ai.generativelanguage.v1beta2.Embedding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Embedding.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) + if (typeof message.value[i] !== "number") + return "value: number[] expected"; + } + return null; + }; + + /** + * Creates an Embedding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.ai.generativelanguage.v1beta2.Embedding + * @static + * @param {Object.} object Plain object + * @returns {google.ai.generativelanguage.v1beta2.Embedding} Embedding + */ + Embedding.fromObject = function fromObject(object) { + if (object instanceof $root.google.ai.generativelanguage.v1beta2.Embedding) + return object; + var message = new $root.google.ai.generativelanguage.v1beta2.Embedding(); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.ai.generativelanguage.v1beta2.Embedding.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) + message.value[i] = Number(object.value[i]); + } + return message; + }; + + /** + * Creates a plain object from an Embedding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.ai.generativelanguage.v1beta2.Embedding + * @static + * @param {google.ai.generativelanguage.v1beta2.Embedding} message Embedding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Embedding.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.value = []; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = options.json && !isFinite(message.value[j]) ? String(message.value[j]) : message.value[j]; + } + return object; + }; + + /** + * Converts this Embedding to JSON. + * @function toJSON + * @memberof google.ai.generativelanguage.v1beta2.Embedding + * @instance + * @returns {Object.} JSON object + */ + Embedding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Embedding + * @function getTypeUrl + * @memberof google.ai.generativelanguage.v1beta2.Embedding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Embedding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.ai.generativelanguage.v1beta2.Embedding"; + }; + + return Embedding; + })(); + + return v1beta2; + })(); + + return generativelanguage; + })(); + + return ai; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + return values; + })(); + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + 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]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + 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]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(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]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + + return CustomHttpPattern; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + 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]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(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]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + + return ResourceReference; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + 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]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {string|null} [edition] FileDescriptorProto edition + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + 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]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * FileDescriptorProto edition. + * @member {string} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = ""; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.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["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.edition); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 13: { + message.edition = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.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["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + if (!$util.isString(message.edition)) + return "edition: string expected"; + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + if (object.edition != null) + message.edition = String(object.edition); + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = message.edition; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + 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]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.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.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.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.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(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]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(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]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(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]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.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.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.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.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(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]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.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.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.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.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + 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]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.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.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.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.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(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]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(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]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.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.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.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.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + 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]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.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.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.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.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(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]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.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.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.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.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + 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]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions phpGenericServices. + * @member {boolean} phpGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) + writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 42: { + message.phpGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (typeof message.phpGenericServices !== "boolean") + return "phpGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.phpGenericServices != null) + message.phpGenericServices = Boolean(object.phpGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpGenericServices = false; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + object.phpGenericServices = message.phpGenericServices; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + 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]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { + writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.int32(message[".google.api.fieldBehavior"][i]); + writer.ldelim(); + } + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object.unverifiedLazy = false; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.deprecated = false; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + 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]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + 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]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length >= 0) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(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]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + 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]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + 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]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + 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]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + 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]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + return protobuf; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/google-ai-generativelanguage/protos/protos.json b/packages/google-ai-generativelanguage/protos/protos.json new file mode 100644 index 00000000000..095935ef9cf --- /dev/null +++ b/packages/google-ai-generativelanguage/protos/protos.json @@ -0,0 +1,2000 @@ +{ + "nested": { + "google": { + "nested": { + "ai": { + "nested": { + "generativelanguage": { + "nested": { + "v1beta2": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/ai/generativelanguage/v1beta2;generativelanguage", + "java_multiple_files": true, + "java_outer_classname": "TextServiceProto", + "java_package": "com.google.ai.generativelanguage.v1beta2" + }, + "nested": { + "CitationMetadata": { + "fields": { + "citationSources": { + "rule": "repeated", + "type": "CitationSource", + "id": 1 + } + } + }, + "CitationSource": { + "oneofs": { + "_startIndex": { + "oneof": [ + "startIndex" + ] + }, + "_endIndex": { + "oneof": [ + "endIndex" + ] + }, + "_uri": { + "oneof": [ + "uri" + ] + }, + "_license": { + "oneof": [ + "license" + ] + } + }, + "fields": { + "startIndex": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "endIndex": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "uri": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "license": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "DiscussService": { + "options": { + "(google.api.default_host)": "generativelanguage.googleapis.com" + }, + "methods": { + "GenerateMessage": { + "requestType": "GenerateMessageRequest", + "responseType": "GenerateMessageResponse", + "options": { + "(google.api.http).post": "/v1beta2/{model=models/*}:generateMessage", + "(google.api.http).body": "*", + "(google.api.method_signature)": "model,prompt,temperature,candidate_count,top_p,top_k" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta2/{model=models/*}:generateMessage", + "body": "*" + } + }, + { + "(google.api.method_signature)": "model,prompt,temperature,candidate_count,top_p,top_k" + } + ] + }, + "CountMessageTokens": { + "requestType": "CountMessageTokensRequest", + "responseType": "CountMessageTokensResponse", + "options": { + "(google.api.http).post": "/v1beta2/{model=models/*}:countMessageTokens", + "(google.api.http).body": "*", + "(google.api.method_signature)": "model,prompt" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta2/{model=models/*}:countMessageTokens", + "body": "*" + } + }, + { + "(google.api.method_signature)": "model,prompt" + } + ] + } + } + }, + "GenerateMessageRequest": { + "oneofs": { + "_temperature": { + "oneof": [ + "temperature" + ] + }, + "_candidateCount": { + "oneof": [ + "candidateCount" + ] + }, + "_topP": { + "oneof": [ + "topP" + ] + }, + "_topK": { + "oneof": [ + "topK" + ] + } + }, + "fields": { + "model": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "generativelanguage.googleapis.com/Model" + } + }, + "prompt": { + "type": "MessagePrompt", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "temperature": { + "type": "float", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "candidateCount": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "topP": { + "type": "float", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "topK": { + "type": "int32", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "GenerateMessageResponse": { + "fields": { + "candidates": { + "rule": "repeated", + "type": "Message", + "id": 1 + }, + "messages": { + "rule": "repeated", + "type": "Message", + "id": 2 + }, + "filters": { + "rule": "repeated", + "type": "ContentFilter", + "id": 3 + } + } + }, + "Message": { + "oneofs": { + "_citationMetadata": { + "oneof": [ + "citationMetadata" + ] + } + }, + "fields": { + "author": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "content": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "citationMetadata": { + "type": "CitationMetadata", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "MessagePrompt": { + "fields": { + "context": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "examples": { + "rule": "repeated", + "type": "Example", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "messages": { + "rule": "repeated", + "type": "Message", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Example": { + "fields": { + "input": { + "type": "Message", + "id": 1 + }, + "output": { + "type": "Message", + "id": 2 + } + } + }, + "CountMessageTokensRequest": { + "fields": { + "model": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "generativelanguage.googleapis.com/Model" + } + }, + "prompt": { + "type": "MessagePrompt", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CountMessageTokensResponse": { + "fields": { + "tokenCount": { + "type": "int32", + "id": 1 + } + } + }, + "HarmCategory": { + "values": { + "HARM_CATEGORY_UNSPECIFIED": 0, + "HARM_CATEGORY_DEROGATORY": 1, + "HARM_CATEGORY_TOXICITY": 2, + "HARM_CATEGORY_VIOLENCE": 3, + "HARM_CATEGORY_SEXUAL": 4, + "HARM_CATEGORY_MEDICAL": 5, + "HARM_CATEGORY_DANGEROUS": 6 + } + }, + "ContentFilter": { + "oneofs": { + "_message": { + "oneof": [ + "message" + ] + } + }, + "fields": { + "reason": { + "type": "BlockedReason", + "id": 1 + }, + "message": { + "type": "string", + "id": 2, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "BlockedReason": { + "values": { + "BLOCKED_REASON_UNSPECIFIED": 0, + "SAFETY": 1, + "OTHER": 2 + } + } + } + }, + "SafetyFeedback": { + "fields": { + "rating": { + "type": "SafetyRating", + "id": 1 + }, + "setting": { + "type": "SafetySetting", + "id": 2 + } + } + }, + "SafetyRating": { + "fields": { + "category": { + "type": "HarmCategory", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "probability": { + "type": "HarmProbability", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "HarmProbability": { + "values": { + "HARM_PROBABILITY_UNSPECIFIED": 0, + "NEGLIGIBLE": 1, + "LOW": 2, + "MEDIUM": 3, + "HIGH": 4 + } + } + } + }, + "SafetySetting": { + "fields": { + "category": { + "type": "HarmCategory", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "threshold": { + "type": "HarmBlockThreshold", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "HarmBlockThreshold": { + "values": { + "HARM_BLOCK_THRESHOLD_UNSPECIFIED": 0, + "BLOCK_LOW_AND_ABOVE": 1, + "BLOCK_MEDIUM_AND_ABOVE": 2, + "BLOCK_ONLY_HIGH": 3, + "BLOCK_NONE": 4 + } + } + } + }, + "Model": { + "options": { + "(google.api.resource).type": "generativelanguage.googleapis.com/Model", + "(google.api.resource).pattern": "models/{model}" + }, + "oneofs": { + "_temperature": { + "oneof": [ + "temperature" + ] + }, + "_topP": { + "oneof": [ + "topP" + ] + }, + "_topK": { + "oneof": [ + "topK" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "baseModelId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "version": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "displayName": { + "type": "string", + "id": 4 + }, + "description": { + "type": "string", + "id": 5 + }, + "inputTokenLimit": { + "type": "int32", + "id": 6 + }, + "outputTokenLimit": { + "type": "int32", + "id": 7 + }, + "supportedGenerationMethods": { + "rule": "repeated", + "type": "string", + "id": 8 + }, + "temperature": { + "type": "float", + "id": 9, + "options": { + "proto3_optional": true + } + }, + "topP": { + "type": "float", + "id": 10, + "options": { + "proto3_optional": true + } + }, + "topK": { + "type": "int32", + "id": 11, + "options": { + "proto3_optional": true + } + } + } + }, + "ModelService": { + "options": { + "(google.api.default_host)": "generativelanguage.googleapis.com" + }, + "methods": { + "GetModel": { + "requestType": "GetModelRequest", + "responseType": "Model", + "options": { + "(google.api.http).get": "/v1beta2/{name=models/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta2/{name=models/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListModels": { + "requestType": "ListModelsRequest", + "responseType": "ListModelsResponse", + "options": { + "(google.api.http).get": "/v1beta2/models", + "(google.api.method_signature)": "page_size,page_token" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta2/models" + } + }, + { + "(google.api.method_signature)": "page_size,page_token" + } + ] + } + } + }, + "GetModelRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "generativelanguage.googleapis.com/Model" + } + } + } + }, + "ListModelsRequest": { + "fields": { + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListModelsResponse": { + "fields": { + "models": { + "rule": "repeated", + "type": "Model", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "TextService": { + "options": { + "(google.api.default_host)": "generativelanguage.googleapis.com" + }, + "methods": { + "GenerateText": { + "requestType": "GenerateTextRequest", + "responseType": "GenerateTextResponse", + "options": { + "(google.api.http).post": "/v1beta2/{model=models/*}:generateText", + "(google.api.http).body": "*", + "(google.api.method_signature)": "model,prompt,temperature,candidate_count,max_output_tokens,top_p,top_k" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta2/{model=models/*}:generateText", + "body": "*" + } + }, + { + "(google.api.method_signature)": "model,prompt,temperature,candidate_count,max_output_tokens,top_p,top_k" + } + ] + }, + "EmbedText": { + "requestType": "EmbedTextRequest", + "responseType": "EmbedTextResponse", + "options": { + "(google.api.http).post": "/v1beta2/{model=models/*}:embedText", + "(google.api.http).body": "*", + "(google.api.method_signature)": "model,text" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta2/{model=models/*}:embedText", + "body": "*" + } + }, + { + "(google.api.method_signature)": "model,text" + } + ] + } + } + }, + "GenerateTextRequest": { + "oneofs": { + "_temperature": { + "oneof": [ + "temperature" + ] + }, + "_candidateCount": { + "oneof": [ + "candidateCount" + ] + }, + "_maxOutputTokens": { + "oneof": [ + "maxOutputTokens" + ] + }, + "_topP": { + "oneof": [ + "topP" + ] + }, + "_topK": { + "oneof": [ + "topK" + ] + } + }, + "fields": { + "model": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "generativelanguage.googleapis.com/Model" + } + }, + "prompt": { + "type": "TextPrompt", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "temperature": { + "type": "float", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "candidateCount": { + "type": "int32", + "id": 4, + "options": { + "proto3_optional": true + } + }, + "maxOutputTokens": { + "type": "int32", + "id": 5, + "options": { + "proto3_optional": true + } + }, + "topP": { + "type": "float", + "id": 6, + "options": { + "proto3_optional": true + } + }, + "topK": { + "type": "int32", + "id": 7, + "options": { + "proto3_optional": true + } + }, + "safetySettings": { + "rule": "repeated", + "type": "SafetySetting", + "id": 8 + }, + "stopSequences": { + "rule": "repeated", + "type": "string", + "id": 9 + } + } + }, + "GenerateTextResponse": { + "fields": { + "candidates": { + "rule": "repeated", + "type": "TextCompletion", + "id": 1 + }, + "filters": { + "rule": "repeated", + "type": "ContentFilter", + "id": 3 + }, + "safetyFeedback": { + "rule": "repeated", + "type": "SafetyFeedback", + "id": 4 + } + } + }, + "TextPrompt": { + "fields": { + "text": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "TextCompletion": { + "oneofs": { + "_citationMetadata": { + "oneof": [ + "citationMetadata" + ] + } + }, + "fields": { + "output": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "safetyRatings": { + "rule": "repeated", + "type": "SafetyRating", + "id": 2 + }, + "citationMetadata": { + "type": "CitationMetadata", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "EmbedTextRequest": { + "fields": { + "model": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "generativelanguage.googleapis.com/Model" + } + }, + "text": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "EmbedTextResponse": { + "oneofs": { + "_embedding": { + "oneof": [ + "embedding" + ] + } + }, + "fields": { + "embedding": { + "type": "Embedding", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "Embedding": { + "fields": { + "value": { + "rule": "repeated", + "type": "float", + "id": 1 + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ResourceProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7 + } + }, + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + }, + "edition": { + "type": "string", + "id": 13 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REQUIRED": 2, + "LABEL_REPEATED": 3 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "phpGenericServices": { + "type": "bool", + "id": 42, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + } + } + }, + "OneofOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/google-ai-generativelanguage/samples/README.md b/packages/google-ai-generativelanguage/samples/README.md new file mode 100644 index 00000000000..143d911e9f0 --- /dev/null +++ b/packages/google-ai-generativelanguage/samples/README.md @@ -0,0 +1,158 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [Generative Language API: Node.js Samples](https://github.com/googleapis/google-cloud-node) + +[![Open in Cloud Shell][shell_img]][shell_link] + + + +## Table of Contents + +* [Before you begin](#before-you-begin) +* [Samples](#samples) + * [Discuss_service.count_message_tokens](#discuss_service.count_message_tokens) + * [Discuss_service.generate_message](#discuss_service.generate_message) + * [Model_service.get_model](#model_service.get_model) + * [Model_service.list_models](#model_service.list_models) + * [Text_service.embed_text](#text_service.embed_text) + * [Text_service.generate_text](#text_service.generate_text) + * [Quickstart](#quickstart) + +## Before you begin + +Before running the samples, make sure you've followed the steps outlined in +[Using the client library](https://github.com/googleapis/google-cloud-node#using-the-client-library). + +`cd samples` + +`npm install` + +`cd ..` + +## Samples + + + +### Discuss_service.count_message_tokens + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ai-generativelanguage/samples/generated/v1beta2/discuss_service.count_message_tokens.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-ai-generativelanguage/samples/generated/v1beta2/discuss_service.count_message_tokens.js,samples/README.md) + +__Usage:__ + + +`node packages/google-ai-generativelanguage/samples/generated/v1beta2/discuss_service.count_message_tokens.js` + + +----- + + + + +### Discuss_service.generate_message + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ai-generativelanguage/samples/generated/v1beta2/discuss_service.generate_message.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-ai-generativelanguage/samples/generated/v1beta2/discuss_service.generate_message.js,samples/README.md) + +__Usage:__ + + +`node packages/google-ai-generativelanguage/samples/generated/v1beta2/discuss_service.generate_message.js` + + +----- + + + + +### Model_service.get_model + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ai-generativelanguage/samples/generated/v1beta2/model_service.get_model.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-ai-generativelanguage/samples/generated/v1beta2/model_service.get_model.js,samples/README.md) + +__Usage:__ + + +`node packages/google-ai-generativelanguage/samples/generated/v1beta2/model_service.get_model.js` + + +----- + + + + +### Model_service.list_models + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ai-generativelanguage/samples/generated/v1beta2/model_service.list_models.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-ai-generativelanguage/samples/generated/v1beta2/model_service.list_models.js,samples/README.md) + +__Usage:__ + + +`node packages/google-ai-generativelanguage/samples/generated/v1beta2/model_service.list_models.js` + + +----- + + + + +### Text_service.embed_text + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ai-generativelanguage/samples/generated/v1beta2/text_service.embed_text.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-ai-generativelanguage/samples/generated/v1beta2/text_service.embed_text.js,samples/README.md) + +__Usage:__ + + +`node packages/google-ai-generativelanguage/samples/generated/v1beta2/text_service.embed_text.js` + + +----- + + + + +### Text_service.generate_text + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ai-generativelanguage/samples/generated/v1beta2/text_service.generate_text.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-ai-generativelanguage/samples/generated/v1beta2/text_service.generate_text.js,samples/README.md) + +__Usage:__ + + +`node packages/google-ai-generativelanguage/samples/generated/v1beta2/text_service.generate_text.js` + + +----- + + + + +### Quickstart + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-ai-generativelanguage/samples/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-ai-generativelanguage/samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node packages/google-ai-generativelanguage/samples/quickstart.js` + + + + + + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=samples/README.md +[product-docs]: https://developers.generativeai.google/ diff --git a/packages/google-ai-generativelanguage/samples/generated/v1beta2/discuss_service.count_message_tokens.js b/packages/google-ai-generativelanguage/samples/generated/v1beta2/discuss_service.count_message_tokens.js new file mode 100644 index 00000000000..8a5ee67192d --- /dev/null +++ b/packages/google-ai-generativelanguage/samples/generated/v1beta2/discuss_service.count_message_tokens.js @@ -0,0 +1,69 @@ +// Copyright 2023 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(model, prompt) { + // [START generativelanguage_v1beta2_generated_DiscussService_CountMessageTokens_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 model's resource name. This serves as an ID for the Model to + * use. + * This name should match a model name returned by the `ListModels` method. + * Format: `models/{model}` + */ + // const model = 'abc123' + /** + * Required. The prompt, whose token count is to be returned. + */ + // const prompt = {} + + // Imports the Generativelanguage library + const {DiscussServiceClient} = require('@google-ai/generativelanguage').v1beta2; + + // Instantiates a client + const generativelanguageClient = new DiscussServiceClient(); + + async function callCountMessageTokens() { + // Construct request + const request = { + model, + prompt, + }; + + // Run request + const response = await generativelanguageClient.countMessageTokens(request); + console.log(response); + } + + callCountMessageTokens(); + // [END generativelanguage_v1beta2_generated_DiscussService_CountMessageTokens_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ai-generativelanguage/samples/generated/v1beta2/discuss_service.generate_message.js b/packages/google-ai-generativelanguage/samples/generated/v1beta2/discuss_service.generate_message.js new file mode 100644 index 00000000000..9b82ee5fd6a --- /dev/null +++ b/packages/google-ai-generativelanguage/samples/generated/v1beta2/discuss_service.generate_message.js @@ -0,0 +1,98 @@ +// Copyright 2023 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(model, prompt) { + // [START generativelanguage_v1beta2_generated_DiscussService_GenerateMessage_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 model to use. + * Format: `name=models/{model}`. + */ + // const model = 'abc123' + /** + * Required. The structured textual input given to the model as a prompt. + * Given a + * prompt, the model will return what it predicts is the next message in the + * discussion. + */ + // const prompt = {} + /** + * Optional. Controls the randomness of the output. + * Values can range over `[0.0,1.0]`, + * inclusive. A value closer to `1.0` will produce responses that are more + * varied, while a value closer to `0.0` will typically result in + * less surprising responses from the model. + */ + // const temperature = 1234 + /** + * Optional. The number of generated response messages to return. + * This value must be between + * `[1, 8]`, inclusive. If unset, this will default to `1`. + */ + // const candidateCount = 1234 + /** + * Optional. The maximum cumulative probability of tokens to consider when + * sampling. + * The model uses combined Top-k and nucleus sampling. + * Nucleus sampling considers the smallest set of tokens whose probability + * sum is at least `top_p`. + */ + // const topP = 1234 + /** + * Optional. The maximum number of tokens to consider when sampling. + * The model uses combined Top-k and nucleus sampling. + * Top-k sampling considers the set of `top_k` most probable tokens. + */ + // const topK = 1234 + + // Imports the Generativelanguage library + const {DiscussServiceClient} = require('@google-ai/generativelanguage').v1beta2; + + // Instantiates a client + const generativelanguageClient = new DiscussServiceClient(); + + async function callGenerateMessage() { + // Construct request + const request = { + model, + prompt, + }; + + // Run request + const response = await generativelanguageClient.generateMessage(request); + console.log(response); + } + + callGenerateMessage(); + // [END generativelanguage_v1beta2_generated_DiscussService_GenerateMessage_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ai-generativelanguage/samples/generated/v1beta2/model_service.get_model.js b/packages/google-ai-generativelanguage/samples/generated/v1beta2/model_service.get_model.js new file mode 100644 index 00000000000..9ffda28fcca --- /dev/null +++ b/packages/google-ai-generativelanguage/samples/generated/v1beta2/model_service.get_model.js @@ -0,0 +1,63 @@ +// Copyright 2023 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 generativelanguage_v1beta2_generated_ModelService_GetModel_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 model. + * This name should match a model name returned by the `ListModels` method. + * Format: `models/{model}` + */ + // const name = 'abc123' + + // Imports the Generativelanguage library + const {ModelServiceClient} = require('@google-ai/generativelanguage').v1beta2; + + // Instantiates a client + const generativelanguageClient = new ModelServiceClient(); + + async function callGetModel() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await generativelanguageClient.getModel(request); + console.log(response); + } + + callGetModel(); + // [END generativelanguage_v1beta2_generated_ModelService_GetModel_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ai-generativelanguage/samples/generated/v1beta2/model_service.list_models.js b/packages/google-ai-generativelanguage/samples/generated/v1beta2/model_service.list_models.js new file mode 100644 index 00000000000..09503baa21e --- /dev/null +++ b/packages/google-ai-generativelanguage/samples/generated/v1beta2/model_service.list_models.js @@ -0,0 +1,74 @@ +// Copyright 2023 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() { + // [START generativelanguage_v1beta2_generated_ModelService_ListModels_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The maximum number of `Models` to return (per page). + * The service may return fewer models. + * If unspecified, at most 50 models will be returned per page. + * This method returns at most 1000 models per page, even if you pass a larger + * page_size. + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListModels` call. + * Provide the `page_token` returned by one request as an argument to the next + * request to retrieve the next page. + * When paginating, all other parameters provided to `ListModels` must match + * the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Generativelanguage library + const {ModelServiceClient} = require('@google-ai/generativelanguage').v1beta2; + + // Instantiates a client + const generativelanguageClient = new ModelServiceClient(); + + async function callListModels() { + // Construct request + const request = { + }; + + // Run request + const iterable = await generativelanguageClient.listModelsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListModels(); + // [END generativelanguage_v1beta2_generated_ModelService_ListModels_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ai-generativelanguage/samples/generated/v1beta2/snippet_metadata.google.ai.generativelanguage.v1beta2.json b/packages/google-ai-generativelanguage/samples/generated/v1beta2/snippet_metadata.google.ai.generativelanguage.v1beta2.json new file mode 100644 index 00000000000..a8da09ae8dc --- /dev/null +++ b/packages/google-ai-generativelanguage/samples/generated/v1beta2/snippet_metadata.google.ai.generativelanguage.v1beta2.json @@ -0,0 +1,319 @@ +{ + "clientLibrary": { + "name": "nodejs-generativelanguage", + "version": "0.2.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.ai.generativelanguage.v1beta2", + "version": "v1beta2" + } + ] + }, + "snippets": [ + { + "regionTag": "generativelanguage_v1beta2_generated_DiscussService_GenerateMessage_async", + "title": "DiscussService generateMessage Sample", + "origin": "API_DEFINITION", + "description": " Generates a response from the model given an input `MessagePrompt`.", + "canonical": true, + "file": "discuss_service.generate_message.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 90, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GenerateMessage", + "fullName": "google.ai.generativelanguage.v1beta2.DiscussService.GenerateMessage", + "async": true, + "parameters": [ + { + "name": "model", + "type": "TYPE_STRING" + }, + { + "name": "prompt", + "type": ".google.ai.generativelanguage.v1beta2.MessagePrompt" + }, + { + "name": "temperature", + "type": "TYPE_FLOAT" + }, + { + "name": "candidate_count", + "type": "TYPE_INT32" + }, + { + "name": "top_p", + "type": "TYPE_FLOAT" + }, + { + "name": "top_k", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.ai.generativelanguage.v1beta2.GenerateMessageResponse", + "client": { + "shortName": "DiscussServiceClient", + "fullName": "google.ai.generativelanguage.v1beta2.DiscussServiceClient" + }, + "method": { + "shortName": "GenerateMessage", + "fullName": "google.ai.generativelanguage.v1beta2.DiscussService.GenerateMessage", + "service": { + "shortName": "DiscussService", + "fullName": "google.ai.generativelanguage.v1beta2.DiscussService" + } + } + } + }, + { + "regionTag": "generativelanguage_v1beta2_generated_DiscussService_CountMessageTokens_async", + "title": "DiscussService countMessageTokens Sample", + "origin": "API_DEFINITION", + "description": " Runs a model's tokenizer on a string and returns the token count.", + "canonical": true, + "file": "discuss_service.count_message_tokens.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CountMessageTokens", + "fullName": "google.ai.generativelanguage.v1beta2.DiscussService.CountMessageTokens", + "async": true, + "parameters": [ + { + "name": "model", + "type": "TYPE_STRING" + }, + { + "name": "prompt", + "type": ".google.ai.generativelanguage.v1beta2.MessagePrompt" + } + ], + "resultType": ".google.ai.generativelanguage.v1beta2.CountMessageTokensResponse", + "client": { + "shortName": "DiscussServiceClient", + "fullName": "google.ai.generativelanguage.v1beta2.DiscussServiceClient" + }, + "method": { + "shortName": "CountMessageTokens", + "fullName": "google.ai.generativelanguage.v1beta2.DiscussService.CountMessageTokens", + "service": { + "shortName": "DiscussService", + "fullName": "google.ai.generativelanguage.v1beta2.DiscussService" + } + } + } + }, + { + "regionTag": "generativelanguage_v1beta2_generated_ModelService_GetModel_async", + "title": "DiscussService getModel Sample", + "origin": "API_DEFINITION", + "description": " Gets information about a specific Model.", + "canonical": true, + "file": "model_service.get_model.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetModel", + "fullName": "google.ai.generativelanguage.v1beta2.ModelService.GetModel", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ai.generativelanguage.v1beta2.Model", + "client": { + "shortName": "ModelServiceClient", + "fullName": "google.ai.generativelanguage.v1beta2.ModelServiceClient" + }, + "method": { + "shortName": "GetModel", + "fullName": "google.ai.generativelanguage.v1beta2.ModelService.GetModel", + "service": { + "shortName": "ModelService", + "fullName": "google.ai.generativelanguage.v1beta2.ModelService" + } + } + } + }, + { + "regionTag": "generativelanguage_v1beta2_generated_ModelService_ListModels_async", + "title": "DiscussService listModels Sample", + "origin": "API_DEFINITION", + "description": " Lists models available through the API.", + "canonical": true, + "file": "model_service.list_models.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListModels", + "fullName": "google.ai.generativelanguage.v1beta2.ModelService.ListModels", + "async": true, + "parameters": [ + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ai.generativelanguage.v1beta2.ListModelsResponse", + "client": { + "shortName": "ModelServiceClient", + "fullName": "google.ai.generativelanguage.v1beta2.ModelServiceClient" + }, + "method": { + "shortName": "ListModels", + "fullName": "google.ai.generativelanguage.v1beta2.ModelService.ListModels", + "service": { + "shortName": "ModelService", + "fullName": "google.ai.generativelanguage.v1beta2.ModelService" + } + } + } + }, + { + "regionTag": "generativelanguage_v1beta2_generated_TextService_GenerateText_async", + "title": "DiscussService generateText Sample", + "origin": "API_DEFINITION", + "description": " Generates a response from the model given an input message.", + "canonical": true, + "file": "text_service.generate_text.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 119, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GenerateText", + "fullName": "google.ai.generativelanguage.v1beta2.TextService.GenerateText", + "async": true, + "parameters": [ + { + "name": "model", + "type": "TYPE_STRING" + }, + { + "name": "prompt", + "type": ".google.ai.generativelanguage.v1beta2.TextPrompt" + }, + { + "name": "temperature", + "type": "TYPE_FLOAT" + }, + { + "name": "candidate_count", + "type": "TYPE_INT32" + }, + { + "name": "max_output_tokens", + "type": "TYPE_INT32" + }, + { + "name": "top_p", + "type": "TYPE_FLOAT" + }, + { + "name": "top_k", + "type": "TYPE_INT32" + }, + { + "name": "safety_settings", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "stop_sequences", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.ai.generativelanguage.v1beta2.GenerateTextResponse", + "client": { + "shortName": "TextServiceClient", + "fullName": "google.ai.generativelanguage.v1beta2.TextServiceClient" + }, + "method": { + "shortName": "GenerateText", + "fullName": "google.ai.generativelanguage.v1beta2.TextService.GenerateText", + "service": { + "shortName": "TextService", + "fullName": "google.ai.generativelanguage.v1beta2.TextService" + } + } + } + }, + { + "regionTag": "generativelanguage_v1beta2_generated_TextService_EmbedText_async", + "title": "DiscussService embedText Sample", + "origin": "API_DEFINITION", + "description": " Generates an embedding from the model given an input message.", + "canonical": true, + "file": "text_service.embed_text.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "EmbedText", + "fullName": "google.ai.generativelanguage.v1beta2.TextService.EmbedText", + "async": true, + "parameters": [ + { + "name": "model", + "type": "TYPE_STRING" + }, + { + "name": "text", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.ai.generativelanguage.v1beta2.EmbedTextResponse", + "client": { + "shortName": "TextServiceClient", + "fullName": "google.ai.generativelanguage.v1beta2.TextServiceClient" + }, + "method": { + "shortName": "EmbedText", + "fullName": "google.ai.generativelanguage.v1beta2.TextService.EmbedText", + "service": { + "shortName": "TextService", + "fullName": "google.ai.generativelanguage.v1beta2.TextService" + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/google-ai-generativelanguage/samples/generated/v1beta2/text_service.embed_text.js b/packages/google-ai-generativelanguage/samples/generated/v1beta2/text_service.embed_text.js new file mode 100644 index 00000000000..1ccd931bd83 --- /dev/null +++ b/packages/google-ai-generativelanguage/samples/generated/v1beta2/text_service.embed_text.js @@ -0,0 +1,67 @@ +// Copyright 2023 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(model, text) { + // [START generativelanguage_v1beta2_generated_TextService_EmbedText_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 model name to use with the format model=models/{model}. + */ + // const model = 'abc123' + /** + * Required. The free-form input text that the model will turn into an + * embedding. + */ + // const text = 'abc123' + + // Imports the Generativelanguage library + const {TextServiceClient} = require('@google-ai/generativelanguage').v1beta2; + + // Instantiates a client + const generativelanguageClient = new TextServiceClient(); + + async function callEmbedText() { + // Construct request + const request = { + model, + text, + }; + + // Run request + const response = await generativelanguageClient.embedText(request); + console.log(response); + } + + callEmbedText(); + // [END generativelanguage_v1beta2_generated_TextService_EmbedText_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ai-generativelanguage/samples/generated/v1beta2/text_service.generate_text.js b/packages/google-ai-generativelanguage/samples/generated/v1beta2/text_service.generate_text.js new file mode 100644 index 00000000000..ab12633573c --- /dev/null +++ b/packages/google-ai-generativelanguage/samples/generated/v1beta2/text_service.generate_text.js @@ -0,0 +1,127 @@ +// Copyright 2023 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(model, prompt) { + // [START generativelanguage_v1beta2_generated_TextService_GenerateText_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 model name to use with the format name=models/{model}. + */ + // const model = 'abc123' + /** + * Required. The free-form input text given to the model as a prompt. + * Given a prompt, the model will generate a TextCompletion response it + * predicts as the completion of the input text. + */ + // const prompt = {} + /** + * Controls the randomness of the output. + * Note: The default value varies by model, see the `Model.temperature` + * attribute of the `Model` returned the `getModel` function. + * Values can range from 0.0,1.0, + * inclusive. A value closer to 1.0 will produce responses that are more + * varied and creative, while a value closer to 0.0 will typically result in + * more straightforward responses from the model. + */ + // const temperature = 1234 + /** + * Number of generated responses to return. + * This value must be between 1, 8, inclusive. If unset, this will default + * to 1. + */ + // const candidateCount = 1234 + /** + * The maximum number of tokens to include in a candidate. + * If unset, this will default to 64. + */ + // const maxOutputTokens = 1234 + /** + * The maximum cumulative probability of tokens to consider when sampling. + * The model uses combined Top-k and nucleus sampling. + * Tokens are sorted based on their assigned probabilities so that only the + * most liekly tokens are considered. Top-k sampling directly limits the + * maximum number of tokens to consider, while Nucleus sampling limits number + * of tokens based on the cumulative probability. + * Note: The default value varies by model, see the `Model.top_p` + * attribute of the `Model` returned the `getModel` function. + */ + // const topP = 1234 + /** + * The maximum number of tokens to consider when sampling. + * The model uses combined Top-k and nucleus sampling. + * Top-k sampling considers the set of `top_k` most probable tokens. + * Defaults to 40. + * Note: The default value varies by model, see the `Model.top_k` + * attribute of the `Model` returned the `getModel` function. + */ + // const topK = 1234 + /** + * A list of unique `SafetySetting` instances for blocking unsafe content. + * that will be enforced on the `GenerateTextRequest.prompt` and + * `GenerateTextResponse.candidates`. There should not be more than one + * setting for each `SafetyCategory` type. The API will block any prompts and + * responses that fail to meet the thresholds set by these settings. This list + * overrides the default settings for each `SafetyCategory` specified in the + * safety_settings. If there is no `SafetySetting` for a given + * `SafetyCategory` provided in the list, the API will use the default safety + * setting for that category. + */ + // const safetySettings = 1234 + /** + * The set of character sequences (up to 5) that will stop output generation. + * If specified, the API will stop at the first appearance of a stop + * sequence. The stop sequence will not be included as part of the response. + */ + // const stopSequences = 'abc123' + + // Imports the Generativelanguage library + const {TextServiceClient} = require('@google-ai/generativelanguage').v1beta2; + + // Instantiates a client + const generativelanguageClient = new TextServiceClient(); + + async function callGenerateText() { + // Construct request + const request = { + model, + prompt, + }; + + // Run request + const response = await generativelanguageClient.generateText(request); + console.log(response); + } + + callGenerateText(); + // [END generativelanguage_v1beta2_generated_TextService_GenerateText_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ai-generativelanguage/samples/package.json b/packages/google-ai-generativelanguage/samples/package.json new file mode 100644 index 00000000000..917440df604 --- /dev/null +++ b/packages/google-ai-generativelanguage/samples/package.json @@ -0,0 +1,24 @@ +{ + "name": "generativelanguage-samples", + "private": true, + "license": "Apache-2.0", + "author": "Google LLC", + "engines": { + "node": ">=12.0.0" + }, + "files": [ + "*.js" + ], + "scripts": { + "test": "c8 mocha --timeout 600000 test/*.js", + "publish": "echo 'sample test; do not publish'" + }, + "dependencies": { + "@google-ai/generativelanguage": "^0.2.0" + }, + "devDependencies": { + "c8": "^7.1.0", + "chai": "^4.2.0", + "mocha": "^8.0.0" + } +} diff --git a/packages/google-ai-generativelanguage/samples/quickstart.js b/packages/google-ai-generativelanguage/samples/quickstart.js new file mode 100644 index 00000000000..be1d3f2fe4d --- /dev/null +++ b/packages/google-ai-generativelanguage/samples/quickstart.js @@ -0,0 +1,115 @@ +// Copyright 2023 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(model, prompt) { + // [START generativelanguage_quickstart] + /** + * 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 model name to use with the format name=models/{model}. + */ + // const model = 'abc123' + /** + * Required. The free-form input text given to the model as a prompt. + * Given a prompt, the model will generate a TextCompletion response it + * predicts as the completion of the input text. + */ + // const prompt = { + // text: 'abc123' + // } + /** + * Controls the randomness of the output. + * Note: The default value varies by model, see the `Model.temperature` + * attribute of the `Model` returned the `getModel` function. + * Values can range from 0.0,1.0, + * inclusive. A value closer to 1.0 will produce responses that are more + * varied and creative, while a value closer to 0.0 will typically result in + * more straightforward responses from the model. + */ + // const temperature = 1234 + /** + * Number of generated responses to return. + * This value must be between 1, 8, inclusive. If unset, this will default + * to 1. + */ + // const candidateCount = 1234 + /** + * The maximum number of tokens to include in a candidate. + * If unset, this will default to 64. + */ + // const maxOutputTokens = 1234 + /** + * The maximum cumulative probability of tokens to consider when sampling. + * The model uses combined Top-k and nucleus sampling. + * Tokens are sorted based on their assigned probabilities so that only the + * most liekly tokens are considered. Top-k sampling directly limits the + * maximum number of tokens to consider, while Nucleus sampling limits number + * of tokens based on the cumulative probability. + * Note: The default value varies by model, see the `Model.top_p` + * attribute of the `Model` returned the `getModel` function. + */ + // const topP = 1234 + /** + * The maximum number of tokens to consider when sampling. + * The model uses combined Top-k and nucleus sampling. + * Top-k sampling considers the set of `top_k` most probable tokens. + * Defaults to 40. + * Note: The default value varies by model, see the `Model.top_k` + * attribute of the `Model` returned the `getModel` function. + */ + // const topK = 1234 + /** + * The set of character sequences (up to 5) that will stop output generation. + * If specified, the API will stop at the first appearance of a stop + * sequence. The stop sequence will not be included as part of the response. + */ + // const stopSequences = 'abc123' + + // Imports the Generativelanguage library + const {TextServiceClient} = require('@google-ai/generativelanguage').v1beta2; + + // Instantiates a client + const generativelanguageClient = new TextServiceClient(); + + async function callGenerateText() { + // Construct request + const request = { + model, + prompt, + }; + + // Run request + const response = await generativelanguageClient.generateText(request); + console.log(response); + } + + callGenerateText(); + // [END generativelanguage_quickstart] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-ai-generativelanguage/samples/test/quickstart.js b/packages/google-ai-generativelanguage/samples/test/quickstart.js new file mode 100644 index 00000000000..0a643b1c74c --- /dev/null +++ b/packages/google-ai-generativelanguage/samples/test/quickstart.js @@ -0,0 +1,38 @@ +// Copyright 2023 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. + +'use strict'; + +const assert = require('assert'); +// const path = require('path'); +// const cp = require('child_process'); +const {describe, it, before} = require('mocha'); +const {TextServiceClient} = require('@google-ai/generativelanguage').v1beta2; +const generativelanguageClient = new TextServiceClient(); + +// const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); + +// const cwd = path.join(__dirname, '..'); + +describe('Quickstart', () => { + let projectId; + + before(async () => { + projectId = await generativelanguageClient.getProjectId(); + }); + + it('should run quickstart', async () => { + assert(projectId); // Fake assertion until we can get a testing project up. + }); +}); diff --git a/packages/google-ai-generativelanguage/src/index.ts b/packages/google-ai-generativelanguage/src/index.ts new file mode 100644 index 00000000000..7390786245f --- /dev/null +++ b/packages/google-ai-generativelanguage/src/index.ts @@ -0,0 +1,36 @@ +// Copyright 2023 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 synthtool. ** +// ** https://github.com/googleapis/synthtool ** +// ** All changes to this file may be overwritten. ** + +import * as v1beta2 from './v1beta2'; + +const DiscussServiceClient = v1beta2.DiscussServiceClient; +type DiscussServiceClient = v1beta2.DiscussServiceClient; +const ModelServiceClient = v1beta2.ModelServiceClient; +type ModelServiceClient = v1beta2.ModelServiceClient; +const TextServiceClient = v1beta2.TextServiceClient; +type TextServiceClient = v1beta2.TextServiceClient; + +export {v1beta2, DiscussServiceClient, ModelServiceClient, TextServiceClient}; +export default { + v1beta2, + DiscussServiceClient, + ModelServiceClient, + TextServiceClient, +}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/packages/google-ai-generativelanguage/src/v1beta2/discuss_service_client.ts b/packages/google-ai-generativelanguage/src/v1beta2/discuss_service_client.ts new file mode 100644 index 00000000000..8640108a1e9 --- /dev/null +++ b/packages/google-ai-generativelanguage/src/v1beta2/discuss_service_client.ts @@ -0,0 +1,596 @@ +// Copyright 2023 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, +} from 'google-gax'; + +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1beta2/discuss_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './discuss_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * An API for using Generative Language Models (GLMs) in dialog applications. + * + * Also known as large language models (LLMs), this API provides models that + * are trained for multi-turn dialog. + * @class + * @memberof v1beta2 + */ +export class DiscussServiceClient { + 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}; + 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}; + discussServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of DiscussServiceClient. + * + * @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://developers.google.com/identity/protocols/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 | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * 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 DiscussServiceClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof DiscussServiceClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.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 !== staticMembers.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 = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && '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 if (opts.fallback === 'rest') { + 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 = { + modelPathTemplate: new this._gaxModule.PathTemplate('models/{model}'), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.ai.generativelanguage.v1beta2.DiscussService', + 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.discussServiceStub) { + return this.discussServiceStub; + } + + // Put together the "service stub" for + // google.ai.generativelanguage.v1beta2.DiscussService. + this.discussServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.ai.generativelanguage.v1beta2.DiscussService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.ai.generativelanguage.v1beta2 + .DiscussService, + 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 discussServiceStubMethods = ['generateMessage', 'countMessageTokens']; + for (const methodName of discussServiceStubMethods) { + const callPromise = this.discussServiceStub.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 = undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.discussServiceStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'generativelanguage.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'generativelanguage.googleapis.com'; + } + + /** + * 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 []; + } + + 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 -- + // ------------------- + /** + * Generates a response from the model given an input `MessagePrompt`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.model + * Required. The name of the model to use. + * + * Format: `name=models/{model}`. + * @param {google.ai.generativelanguage.v1beta2.MessagePrompt} request.prompt + * Required. The structured textual input given to the model as a prompt. + * + * Given a + * prompt, the model will return what it predicts is the next message in the + * discussion. + * @param {number} [request.temperature] + * Optional. Controls the randomness of the output. + * + * Values can range over `[0.0,1.0]`, + * inclusive. A value closer to `1.0` will produce responses that are more + * varied, while a value closer to `0.0` will typically result in + * less surprising responses from the model. + * @param {number} [request.candidateCount] + * Optional. The number of generated response messages to return. + * + * This value must be between + * `[1, 8]`, inclusive. If unset, this will default to `1`. + * @param {number} [request.topP] + * Optional. The maximum cumulative probability of tokens to consider when + * sampling. + * + * The model uses combined Top-k and nucleus sampling. + * + * Nucleus sampling considers the smallest set of tokens whose probability + * sum is at least `top_p`. + * @param {number} [request.topK] + * Optional. The maximum number of tokens to consider when sampling. + * + * The model uses combined Top-k and nucleus sampling. + * + * Top-k sampling considers the set of `top_k` most probable tokens. + * @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 google.ai.generativelanguage.v1beta2.GenerateMessageResponse | GenerateMessageResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta2/discuss_service.generate_message.js + * region_tag:generativelanguage_v1beta2_generated_DiscussService_GenerateMessage_async + */ + generateMessage( + request?: protos.google.ai.generativelanguage.v1beta2.IGenerateMessageRequest, + options?: CallOptions + ): Promise< + [ + protos.google.ai.generativelanguage.v1beta2.IGenerateMessageResponse, + ( + | protos.google.ai.generativelanguage.v1beta2.IGenerateMessageRequest + | undefined + ), + {} | undefined + ] + >; + generateMessage( + request: protos.google.ai.generativelanguage.v1beta2.IGenerateMessageRequest, + options: CallOptions, + callback: Callback< + protos.google.ai.generativelanguage.v1beta2.IGenerateMessageResponse, + | protos.google.ai.generativelanguage.v1beta2.IGenerateMessageRequest + | null + | undefined, + {} | null | undefined + > + ): void; + generateMessage( + request: protos.google.ai.generativelanguage.v1beta2.IGenerateMessageRequest, + callback: Callback< + protos.google.ai.generativelanguage.v1beta2.IGenerateMessageResponse, + | protos.google.ai.generativelanguage.v1beta2.IGenerateMessageRequest + | null + | undefined, + {} | null | undefined + > + ): void; + generateMessage( + request?: protos.google.ai.generativelanguage.v1beta2.IGenerateMessageRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.ai.generativelanguage.v1beta2.IGenerateMessageResponse, + | protos.google.ai.generativelanguage.v1beta2.IGenerateMessageRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.ai.generativelanguage.v1beta2.IGenerateMessageResponse, + | protos.google.ai.generativelanguage.v1beta2.IGenerateMessageRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.ai.generativelanguage.v1beta2.IGenerateMessageResponse, + ( + | protos.google.ai.generativelanguage.v1beta2.IGenerateMessageRequest + | 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({ + model: request.model ?? '', + }); + this.initialize(); + return this.innerApiCalls.generateMessage(request, options, callback); + } + /** + * Runs a model's tokenizer on a string and returns the token count. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.model + * Required. The model's resource name. This serves as an ID for the Model to + * use. + * + * This name should match a model name returned by the `ListModels` method. + * + * Format: `models/{model}` + * @param {google.ai.generativelanguage.v1beta2.MessagePrompt} request.prompt + * Required. The prompt, whose token count is to be returned. + * @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 google.ai.generativelanguage.v1beta2.CountMessageTokensResponse | CountMessageTokensResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta2/discuss_service.count_message_tokens.js + * region_tag:generativelanguage_v1beta2_generated_DiscussService_CountMessageTokens_async + */ + countMessageTokens( + request?: protos.google.ai.generativelanguage.v1beta2.ICountMessageTokensRequest, + options?: CallOptions + ): Promise< + [ + protos.google.ai.generativelanguage.v1beta2.ICountMessageTokensResponse, + ( + | protos.google.ai.generativelanguage.v1beta2.ICountMessageTokensRequest + | undefined + ), + {} | undefined + ] + >; + countMessageTokens( + request: protos.google.ai.generativelanguage.v1beta2.ICountMessageTokensRequest, + options: CallOptions, + callback: Callback< + protos.google.ai.generativelanguage.v1beta2.ICountMessageTokensResponse, + | protos.google.ai.generativelanguage.v1beta2.ICountMessageTokensRequest + | null + | undefined, + {} | null | undefined + > + ): void; + countMessageTokens( + request: protos.google.ai.generativelanguage.v1beta2.ICountMessageTokensRequest, + callback: Callback< + protos.google.ai.generativelanguage.v1beta2.ICountMessageTokensResponse, + | protos.google.ai.generativelanguage.v1beta2.ICountMessageTokensRequest + | null + | undefined, + {} | null | undefined + > + ): void; + countMessageTokens( + request?: protos.google.ai.generativelanguage.v1beta2.ICountMessageTokensRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.ai.generativelanguage.v1beta2.ICountMessageTokensResponse, + | protos.google.ai.generativelanguage.v1beta2.ICountMessageTokensRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.ai.generativelanguage.v1beta2.ICountMessageTokensResponse, + | protos.google.ai.generativelanguage.v1beta2.ICountMessageTokensRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.ai.generativelanguage.v1beta2.ICountMessageTokensResponse, + ( + | protos.google.ai.generativelanguage.v1beta2.ICountMessageTokensRequest + | 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({ + model: request.model ?? '', + }); + this.initialize(); + return this.innerApiCalls.countMessageTokens(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified model resource name string. + * + * @param {string} model + * @returns {string} Resource name string. + */ + modelPath(model: string) { + return this.pathTemplates.modelPathTemplate.render({ + model: model, + }); + } + + /** + * Parse the model from Model resource. + * + * @param {string} modelName + * A fully-qualified path representing Model resource. + * @returns {string} A string representing the model. + */ + matchModelFromModelName(modelName: string) { + return this.pathTemplates.modelPathTemplate.match(modelName).model; + } + + /** + * 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.discussServiceStub && !this._terminated) { + return this.discussServiceStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-ai-generativelanguage/src/v1beta2/discuss_service_client_config.json b/packages/google-ai-generativelanguage/src/v1beta2/discuss_service_client_config.json new file mode 100644 index 00000000000..4242c96257a --- /dev/null +++ b/packages/google-ai-generativelanguage/src/v1beta2/discuss_service_client_config.json @@ -0,0 +1,34 @@ +{ + "interfaces": { + "google.ai.generativelanguage.v1beta2.DiscussService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "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 + } + }, + "methods": { + "GenerateMessage": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CountMessageTokens": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-ai-generativelanguage/src/v1beta2/discuss_service_proto_list.json b/packages/google-ai-generativelanguage/src/v1beta2/discuss_service_proto_list.json new file mode 100644 index 00000000000..59a27acb5a3 --- /dev/null +++ b/packages/google-ai-generativelanguage/src/v1beta2/discuss_service_proto_list.json @@ -0,0 +1,8 @@ +[ + "../../protos/google/ai/generativelanguage/v1beta2/citation.proto", + "../../protos/google/ai/generativelanguage/v1beta2/discuss_service.proto", + "../../protos/google/ai/generativelanguage/v1beta2/model.proto", + "../../protos/google/ai/generativelanguage/v1beta2/model_service.proto", + "../../protos/google/ai/generativelanguage/v1beta2/safety.proto", + "../../protos/google/ai/generativelanguage/v1beta2/text_service.proto" +] diff --git a/packages/google-ai-generativelanguage/src/v1beta2/gapic_metadata.json b/packages/google-ai-generativelanguage/src/v1beta2/gapic_metadata.json new file mode 100644 index 00000000000..9841276c145 --- /dev/null +++ b/packages/google-ai-generativelanguage/src/v1beta2/gapic_metadata.json @@ -0,0 +1,115 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.ai.generativelanguage.v1beta2", + "libraryPackage": "@google-ai/generativelanguage", + "services": { + "DiscussService": { + "clients": { + "grpc": { + "libraryClient": "DiscussServiceClient", + "rpcs": { + "GenerateMessage": { + "methods": [ + "generateMessage" + ] + }, + "CountMessageTokens": { + "methods": [ + "countMessageTokens" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "DiscussServiceClient", + "rpcs": { + "GenerateMessage": { + "methods": [ + "generateMessage" + ] + }, + "CountMessageTokens": { + "methods": [ + "countMessageTokens" + ] + } + } + } + } + }, + "ModelService": { + "clients": { + "grpc": { + "libraryClient": "ModelServiceClient", + "rpcs": { + "GetModel": { + "methods": [ + "getModel" + ] + }, + "ListModels": { + "methods": [ + "listModels", + "listModelsStream", + "listModelsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ModelServiceClient", + "rpcs": { + "GetModel": { + "methods": [ + "getModel" + ] + }, + "ListModels": { + "methods": [ + "listModels", + "listModelsStream", + "listModelsAsync" + ] + } + } + } + } + }, + "TextService": { + "clients": { + "grpc": { + "libraryClient": "TextServiceClient", + "rpcs": { + "GenerateText": { + "methods": [ + "generateText" + ] + }, + "EmbedText": { + "methods": [ + "embedText" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "TextServiceClient", + "rpcs": { + "GenerateText": { + "methods": [ + "generateText" + ] + }, + "EmbedText": { + "methods": [ + "embedText" + ] + } + } + } + } + } + } +} diff --git a/packages/google-ai-generativelanguage/src/v1beta2/index.ts b/packages/google-ai-generativelanguage/src/v1beta2/index.ts new file mode 100644 index 00000000000..f1b07e545e8 --- /dev/null +++ b/packages/google-ai-generativelanguage/src/v1beta2/index.ts @@ -0,0 +1,21 @@ +// Copyright 2023 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. ** + +export {DiscussServiceClient} from './discuss_service_client'; +export {ModelServiceClient} from './model_service_client'; +export {TextServiceClient} from './text_service_client'; diff --git a/packages/google-ai-generativelanguage/src/v1beta2/model_service_client.ts b/packages/google-ai-generativelanguage/src/v1beta2/model_service_client.ts new file mode 100644 index 00000000000..90915238234 --- /dev/null +++ b/packages/google-ai-generativelanguage/src/v1beta2/model_service_client.ts @@ -0,0 +1,670 @@ +// Copyright 2023 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'); +/** + * Client JSON configuration object, loaded from + * `src/v1beta2/model_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './model_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Provides methods for getting metadata information about Generative Models. + * @class + * @memberof v1beta2 + */ +export class ModelServiceClient { + 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}; + 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}; + modelServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ModelServiceClient. + * + * @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://developers.google.com/identity/protocols/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 | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * 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 ModelServiceClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof ModelServiceClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.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 !== staticMembers.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 = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && '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 if (opts.fallback === 'rest') { + 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 = { + modelPathTemplate: new this._gaxModule.PathTemplate('models/{model}'), + }; + + // 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 = { + listModels: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'models' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.ai.generativelanguage.v1beta2.ModelService', + 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.modelServiceStub) { + return this.modelServiceStub; + } + + // Put together the "service stub" for + // google.ai.generativelanguage.v1beta2.ModelService. + this.modelServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.ai.generativelanguage.v1beta2.ModelService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.ai.generativelanguage.v1beta2 + .ModelService, + 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 modelServiceStubMethods = ['getModel', 'listModels']; + for (const methodName of modelServiceStubMethods) { + const callPromise = this.modelServiceStub.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.modelServiceStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'generativelanguage.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'generativelanguage.googleapis.com'; + } + + /** + * 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 []; + } + + 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 -- + // ------------------- + /** + * Gets information about a specific Model. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the model. + * + * This name should match a model name returned by the `ListModels` method. + * + * Format: `models/{model}` + * @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 google.ai.generativelanguage.v1beta2.Model | Model}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta2/model_service.get_model.js + * region_tag:generativelanguage_v1beta2_generated_ModelService_GetModel_async + */ + getModel( + request?: protos.google.ai.generativelanguage.v1beta2.IGetModelRequest, + options?: CallOptions + ): Promise< + [ + protos.google.ai.generativelanguage.v1beta2.IModel, + protos.google.ai.generativelanguage.v1beta2.IGetModelRequest | undefined, + {} | undefined + ] + >; + getModel( + request: protos.google.ai.generativelanguage.v1beta2.IGetModelRequest, + options: CallOptions, + callback: Callback< + protos.google.ai.generativelanguage.v1beta2.IModel, + | protos.google.ai.generativelanguage.v1beta2.IGetModelRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getModel( + request: protos.google.ai.generativelanguage.v1beta2.IGetModelRequest, + callback: Callback< + protos.google.ai.generativelanguage.v1beta2.IModel, + | protos.google.ai.generativelanguage.v1beta2.IGetModelRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getModel( + request?: protos.google.ai.generativelanguage.v1beta2.IGetModelRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.ai.generativelanguage.v1beta2.IModel, + | protos.google.ai.generativelanguage.v1beta2.IGetModelRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.ai.generativelanguage.v1beta2.IModel, + | protos.google.ai.generativelanguage.v1beta2.IGetModelRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.ai.generativelanguage.v1beta2.IModel, + protos.google.ai.generativelanguage.v1beta2.IGetModelRequest | 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(); + return this.innerApiCalls.getModel(request, options, callback); + } + + /** + * Lists models available through the API. + * + * @param {Object} request + * The request object that will be sent. + * @param {number} request.pageSize + * The maximum number of `Models` to return (per page). + * + * The service may return fewer models. + * If unspecified, at most 50 models will be returned per page. + * This method returns at most 1000 models per page, even if you pass a larger + * page_size. + * @param {string} request.pageToken + * A page token, received from a previous `ListModels` call. + * + * Provide the `page_token` returned by one request as an argument to the next + * request to retrieve the next page. + * + * When paginating, all other parameters provided to `ListModels` 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. + * The first element of the array is Array of {@link google.ai.generativelanguage.v1beta2.Model | Model}. + * 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 `listModelsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listModels( + request?: protos.google.ai.generativelanguage.v1beta2.IListModelsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.ai.generativelanguage.v1beta2.IModel[], + protos.google.ai.generativelanguage.v1beta2.IListModelsRequest | null, + protos.google.ai.generativelanguage.v1beta2.IListModelsResponse + ] + >; + listModels( + request: protos.google.ai.generativelanguage.v1beta2.IListModelsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.ai.generativelanguage.v1beta2.IListModelsRequest, + | protos.google.ai.generativelanguage.v1beta2.IListModelsResponse + | null + | undefined, + protos.google.ai.generativelanguage.v1beta2.IModel + > + ): void; + listModels( + request: protos.google.ai.generativelanguage.v1beta2.IListModelsRequest, + callback: PaginationCallback< + protos.google.ai.generativelanguage.v1beta2.IListModelsRequest, + | protos.google.ai.generativelanguage.v1beta2.IListModelsResponse + | null + | undefined, + protos.google.ai.generativelanguage.v1beta2.IModel + > + ): void; + listModels( + request?: protos.google.ai.generativelanguage.v1beta2.IListModelsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.ai.generativelanguage.v1beta2.IListModelsRequest, + | protos.google.ai.generativelanguage.v1beta2.IListModelsResponse + | null + | undefined, + protos.google.ai.generativelanguage.v1beta2.IModel + >, + callback?: PaginationCallback< + protos.google.ai.generativelanguage.v1beta2.IListModelsRequest, + | protos.google.ai.generativelanguage.v1beta2.IListModelsResponse + | null + | undefined, + protos.google.ai.generativelanguage.v1beta2.IModel + > + ): Promise< + [ + protos.google.ai.generativelanguage.v1beta2.IModel[], + protos.google.ai.generativelanguage.v1beta2.IListModelsRequest | null, + protos.google.ai.generativelanguage.v1beta2.IListModelsResponse + ] + > | 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 || {}; + this.initialize(); + return this.innerApiCalls.listModels(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {number} request.pageSize + * The maximum number of `Models` to return (per page). + * + * The service may return fewer models. + * If unspecified, at most 50 models will be returned per page. + * This method returns at most 1000 models per page, even if you pass a larger + * page_size. + * @param {string} request.pageToken + * A page token, received from a previous `ListModels` call. + * + * Provide the `page_token` returned by one request as an argument to the next + * request to retrieve the next page. + * + * When paginating, all other parameters provided to `ListModels` 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} + * An object stream which emits an object representing {@link google.ai.generativelanguage.v1beta2.Model | Model} 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 `listModelsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listModelsStream( + request?: protos.google.ai.generativelanguage.v1beta2.IListModelsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + const defaultCallSettings = this._defaults['listModels']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listModels.createStream( + this.innerApiCalls.listModels as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listModels`, 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 {number} request.pageSize + * The maximum number of `Models` to return (per page). + * + * The service may return fewer models. + * If unspecified, at most 50 models will be returned per page. + * This method returns at most 1000 models per page, even if you pass a larger + * page_size. + * @param {string} request.pageToken + * A page token, received from a previous `ListModels` call. + * + * Provide the `page_token` returned by one request as an argument to the next + * request to retrieve the next page. + * + * When paginating, all other parameters provided to `ListModels` 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} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.ai.generativelanguage.v1beta2.Model | Model}. 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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta2/model_service.list_models.js + * region_tag:generativelanguage_v1beta2_generated_ModelService_ListModels_async + */ + listModelsAsync( + request?: protos.google.ai.generativelanguage.v1beta2.IListModelsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + const defaultCallSettings = this._defaults['listModels']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listModels.asyncIterate( + this.innerApiCalls['listModels'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified model resource name string. + * + * @param {string} model + * @returns {string} Resource name string. + */ + modelPath(model: string) { + return this.pathTemplates.modelPathTemplate.render({ + model: model, + }); + } + + /** + * Parse the model from Model resource. + * + * @param {string} modelName + * A fully-qualified path representing Model resource. + * @returns {string} A string representing the model. + */ + matchModelFromModelName(modelName: string) { + return this.pathTemplates.modelPathTemplate.match(modelName).model; + } + + /** + * 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.modelServiceStub && !this._terminated) { + return this.modelServiceStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-ai-generativelanguage/src/v1beta2/model_service_client_config.json b/packages/google-ai-generativelanguage/src/v1beta2/model_service_client_config.json new file mode 100644 index 00000000000..24ef0df9aff --- /dev/null +++ b/packages/google-ai-generativelanguage/src/v1beta2/model_service_client_config.json @@ -0,0 +1,34 @@ +{ + "interfaces": { + "google.ai.generativelanguage.v1beta2.ModelService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "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 + } + }, + "methods": { + "GetModel": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListModels": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-ai-generativelanguage/src/v1beta2/model_service_proto_list.json b/packages/google-ai-generativelanguage/src/v1beta2/model_service_proto_list.json new file mode 100644 index 00000000000..59a27acb5a3 --- /dev/null +++ b/packages/google-ai-generativelanguage/src/v1beta2/model_service_proto_list.json @@ -0,0 +1,8 @@ +[ + "../../protos/google/ai/generativelanguage/v1beta2/citation.proto", + "../../protos/google/ai/generativelanguage/v1beta2/discuss_service.proto", + "../../protos/google/ai/generativelanguage/v1beta2/model.proto", + "../../protos/google/ai/generativelanguage/v1beta2/model_service.proto", + "../../protos/google/ai/generativelanguage/v1beta2/safety.proto", + "../../protos/google/ai/generativelanguage/v1beta2/text_service.proto" +] diff --git a/packages/google-ai-generativelanguage/src/v1beta2/text_service_client.ts b/packages/google-ai-generativelanguage/src/v1beta2/text_service_client.ts new file mode 100644 index 00000000000..c34462470ff --- /dev/null +++ b/packages/google-ai-generativelanguage/src/v1beta2/text_service_client.ts @@ -0,0 +1,612 @@ +// Copyright 2023 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, +} from 'google-gax'; + +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1beta2/text_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './text_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * API for using Generative Language Models (GLMs) trained to generate text. + * + * Also known as Large Language Models (LLM)s, these generate text given an + * input prompt from the user. + * @class + * @memberof v1beta2 + */ +export class TextServiceClient { + 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}; + 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}; + textServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of TextServiceClient. + * + * @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://developers.google.com/identity/protocols/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 | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * 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 TextServiceClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof TextServiceClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.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 !== staticMembers.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 = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && '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 if (opts.fallback === 'rest') { + 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 = { + modelPathTemplate: new this._gaxModule.PathTemplate('models/{model}'), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.ai.generativelanguage.v1beta2.TextService', + 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.textServiceStub) { + return this.textServiceStub; + } + + // Put together the "service stub" for + // google.ai.generativelanguage.v1beta2.TextService. + this.textServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.ai.generativelanguage.v1beta2.TextService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.ai.generativelanguage.v1beta2 + .TextService, + 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 textServiceStubMethods = ['generateText', 'embedText']; + for (const methodName of textServiceStubMethods) { + const callPromise = this.textServiceStub.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 = undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.textServiceStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'generativelanguage.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'generativelanguage.googleapis.com'; + } + + /** + * 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 []; + } + + 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 -- + // ------------------- + /** + * Generates a response from the model given an input message. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.model + * Required. The model name to use with the format name=models/{model}. + * @param {google.ai.generativelanguage.v1beta2.TextPrompt} request.prompt + * Required. The free-form input text given to the model as a prompt. + * + * Given a prompt, the model will generate a TextCompletion response it + * predicts as the completion of the input text. + * @param {number} request.temperature + * Controls the randomness of the output. + * Note: The default value varies by model, see the `Model.temperature` + * attribute of the `Model` returned the `getModel` function. + * + * Values can range from [0.0,1.0], + * inclusive. A value closer to 1.0 will produce responses that are more + * varied and creative, while a value closer to 0.0 will typically result in + * more straightforward responses from the model. + * @param {number} request.candidateCount + * Number of generated responses to return. + * + * This value must be between [1, 8], inclusive. If unset, this will default + * to 1. + * @param {number} request.maxOutputTokens + * The maximum number of tokens to include in a candidate. + * + * If unset, this will default to 64. + * @param {number} request.topP + * The maximum cumulative probability of tokens to consider when sampling. + * + * The model uses combined Top-k and nucleus sampling. + * + * Tokens are sorted based on their assigned probabilities so that only the + * most liekly tokens are considered. Top-k sampling directly limits the + * maximum number of tokens to consider, while Nucleus sampling limits number + * of tokens based on the cumulative probability. + * + * Note: The default value varies by model, see the `Model.top_p` + * attribute of the `Model` returned the `getModel` function. + * @param {number} request.topK + * The maximum number of tokens to consider when sampling. + * + * The model uses combined Top-k and nucleus sampling. + * + * Top-k sampling considers the set of `top_k` most probable tokens. + * Defaults to 40. + * + * Note: The default value varies by model, see the `Model.top_k` + * attribute of the `Model` returned the `getModel` function. + * @param {number[]} request.safetySettings + * A list of unique `SafetySetting` instances for blocking unsafe content. + * + * that will be enforced on the `GenerateTextRequest.prompt` and + * `GenerateTextResponse.candidates`. There should not be more than one + * setting for each `SafetyCategory` type. The API will block any prompts and + * responses that fail to meet the thresholds set by these settings. This list + * overrides the default settings for each `SafetyCategory` specified in the + * safety_settings. If there is no `SafetySetting` for a given + * `SafetyCategory` provided in the list, the API will use the default safety + * setting for that category. + * @param {string[]} request.stopSequences + * The set of character sequences (up to 5) that will stop output generation. + * If specified, the API will stop at the first appearance of a stop + * sequence. The stop sequence will not be included as part of the response. + * @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 google.ai.generativelanguage.v1beta2.GenerateTextResponse | GenerateTextResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta2/text_service.generate_text.js + * region_tag:generativelanguage_v1beta2_generated_TextService_GenerateText_async + */ + generateText( + request?: protos.google.ai.generativelanguage.v1beta2.IGenerateTextRequest, + options?: CallOptions + ): Promise< + [ + protos.google.ai.generativelanguage.v1beta2.IGenerateTextResponse, + ( + | protos.google.ai.generativelanguage.v1beta2.IGenerateTextRequest + | undefined + ), + {} | undefined + ] + >; + generateText( + request: protos.google.ai.generativelanguage.v1beta2.IGenerateTextRequest, + options: CallOptions, + callback: Callback< + protos.google.ai.generativelanguage.v1beta2.IGenerateTextResponse, + | protos.google.ai.generativelanguage.v1beta2.IGenerateTextRequest + | null + | undefined, + {} | null | undefined + > + ): void; + generateText( + request: protos.google.ai.generativelanguage.v1beta2.IGenerateTextRequest, + callback: Callback< + protos.google.ai.generativelanguage.v1beta2.IGenerateTextResponse, + | protos.google.ai.generativelanguage.v1beta2.IGenerateTextRequest + | null + | undefined, + {} | null | undefined + > + ): void; + generateText( + request?: protos.google.ai.generativelanguage.v1beta2.IGenerateTextRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.ai.generativelanguage.v1beta2.IGenerateTextResponse, + | protos.google.ai.generativelanguage.v1beta2.IGenerateTextRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.ai.generativelanguage.v1beta2.IGenerateTextResponse, + | protos.google.ai.generativelanguage.v1beta2.IGenerateTextRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.ai.generativelanguage.v1beta2.IGenerateTextResponse, + ( + | protos.google.ai.generativelanguage.v1beta2.IGenerateTextRequest + | 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({ + model: request.model ?? '', + }); + this.initialize(); + return this.innerApiCalls.generateText(request, options, callback); + } + /** + * Generates an embedding from the model given an input message. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.model + * Required. The model name to use with the format model=models/{model}. + * @param {string} request.text + * Required. The free-form input text that the model will turn into an + * embedding. + * @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 google.ai.generativelanguage.v1beta2.EmbedTextResponse | EmbedTextResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta2/text_service.embed_text.js + * region_tag:generativelanguage_v1beta2_generated_TextService_EmbedText_async + */ + embedText( + request?: protos.google.ai.generativelanguage.v1beta2.IEmbedTextRequest, + options?: CallOptions + ): Promise< + [ + protos.google.ai.generativelanguage.v1beta2.IEmbedTextResponse, + protos.google.ai.generativelanguage.v1beta2.IEmbedTextRequest | undefined, + {} | undefined + ] + >; + embedText( + request: protos.google.ai.generativelanguage.v1beta2.IEmbedTextRequest, + options: CallOptions, + callback: Callback< + protos.google.ai.generativelanguage.v1beta2.IEmbedTextResponse, + | protos.google.ai.generativelanguage.v1beta2.IEmbedTextRequest + | null + | undefined, + {} | null | undefined + > + ): void; + embedText( + request: protos.google.ai.generativelanguage.v1beta2.IEmbedTextRequest, + callback: Callback< + protos.google.ai.generativelanguage.v1beta2.IEmbedTextResponse, + | protos.google.ai.generativelanguage.v1beta2.IEmbedTextRequest + | null + | undefined, + {} | null | undefined + > + ): void; + embedText( + request?: protos.google.ai.generativelanguage.v1beta2.IEmbedTextRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.ai.generativelanguage.v1beta2.IEmbedTextResponse, + | protos.google.ai.generativelanguage.v1beta2.IEmbedTextRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.ai.generativelanguage.v1beta2.IEmbedTextResponse, + | protos.google.ai.generativelanguage.v1beta2.IEmbedTextRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.ai.generativelanguage.v1beta2.IEmbedTextResponse, + protos.google.ai.generativelanguage.v1beta2.IEmbedTextRequest | 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({ + model: request.model ?? '', + }); + this.initialize(); + return this.innerApiCalls.embedText(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified model resource name string. + * + * @param {string} model + * @returns {string} Resource name string. + */ + modelPath(model: string) { + return this.pathTemplates.modelPathTemplate.render({ + model: model, + }); + } + + /** + * Parse the model from Model resource. + * + * @param {string} modelName + * A fully-qualified path representing Model resource. + * @returns {string} A string representing the model. + */ + matchModelFromModelName(modelName: string) { + return this.pathTemplates.modelPathTemplate.match(modelName).model; + } + + /** + * 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.textServiceStub && !this._terminated) { + return this.textServiceStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-ai-generativelanguage/src/v1beta2/text_service_client_config.json b/packages/google-ai-generativelanguage/src/v1beta2/text_service_client_config.json new file mode 100644 index 00000000000..1e9aa992b89 --- /dev/null +++ b/packages/google-ai-generativelanguage/src/v1beta2/text_service_client_config.json @@ -0,0 +1,34 @@ +{ + "interfaces": { + "google.ai.generativelanguage.v1beta2.TextService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "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 + } + }, + "methods": { + "GenerateText": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "EmbedText": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-ai-generativelanguage/src/v1beta2/text_service_proto_list.json b/packages/google-ai-generativelanguage/src/v1beta2/text_service_proto_list.json new file mode 100644 index 00000000000..59a27acb5a3 --- /dev/null +++ b/packages/google-ai-generativelanguage/src/v1beta2/text_service_proto_list.json @@ -0,0 +1,8 @@ +[ + "../../protos/google/ai/generativelanguage/v1beta2/citation.proto", + "../../protos/google/ai/generativelanguage/v1beta2/discuss_service.proto", + "../../protos/google/ai/generativelanguage/v1beta2/model.proto", + "../../protos/google/ai/generativelanguage/v1beta2/model_service.proto", + "../../protos/google/ai/generativelanguage/v1beta2/safety.proto", + "../../protos/google/ai/generativelanguage/v1beta2/text_service.proto" +] diff --git a/packages/google-ai-generativelanguage/system-test/fixtures/sample/src/index.js b/packages/google-ai-generativelanguage/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..d5eb8ccbb6f --- /dev/null +++ b/packages/google-ai-generativelanguage/system-test/fixtures/sample/src/index.js @@ -0,0 +1,28 @@ +// Copyright 2023 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. ** + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const generativelanguage = require('@google-ai/generativelanguage'); + +function main() { + const discussServiceClient = new generativelanguage.DiscussServiceClient(); + const modelServiceClient = new generativelanguage.ModelServiceClient(); + const textServiceClient = new generativelanguage.TextServiceClient(); +} + +main(); diff --git a/packages/google-ai-generativelanguage/system-test/fixtures/sample/src/index.ts b/packages/google-ai-generativelanguage/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..7fc3479f606 --- /dev/null +++ b/packages/google-ai-generativelanguage/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,48 @@ +// Copyright 2023 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 { + DiscussServiceClient, + ModelServiceClient, + TextServiceClient, +} from '@google-ai/generativelanguage'; + +// check that the client class type name can be used +function doStuffWithDiscussServiceClient(client: DiscussServiceClient) { + client.close(); +} +function doStuffWithModelServiceClient(client: ModelServiceClient) { + client.close(); +} +function doStuffWithTextServiceClient(client: TextServiceClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const discussServiceClient = new DiscussServiceClient(); + doStuffWithDiscussServiceClient(discussServiceClient); + // check that the client instance can be created + const modelServiceClient = new ModelServiceClient(); + doStuffWithModelServiceClient(modelServiceClient); + // check that the client instance can be created + const textServiceClient = new TextServiceClient(); + doStuffWithTextServiceClient(textServiceClient); +} + +main(); diff --git a/packages/google-ai-generativelanguage/system-test/install.ts b/packages/google-ai-generativelanguage/system-test/install.ts new file mode 100644 index 00000000000..f61fe236476 --- /dev/null +++ b/packages/google-ai-generativelanguage/system-test/install.ts @@ -0,0 +1,51 @@ +// Copyright 2023 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 {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + it('TypeScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync( + './system-test/fixtures/sample/src/index.ts' + ).toString(), + }, + }; + await packNTest(options); + }); + + it('JavaScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync( + './system-test/fixtures/sample/src/index.js' + ).toString(), + }, + }; + await packNTest(options); + }); +}); diff --git a/packages/google-ai-generativelanguage/test/gapic_discuss_service_v1beta2.ts b/packages/google-ai-generativelanguage/test/gapic_discuss_service_v1beta2.ts new file mode 100644 index 00000000000..7d46f4431f9 --- /dev/null +++ b/packages/google-ai-generativelanguage/test/gapic_discuss_service_v1beta2.ts @@ -0,0 +1,467 @@ +// Copyright 2023 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 discussserviceModule from '../src'; + +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); +} + +describe('v1beta2.DiscussServiceClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + discussserviceModule.v1beta2.DiscussServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + discussserviceModule.v1beta2.DiscussServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = discussserviceModule.v1beta2.DiscussServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new discussserviceModule.v1beta2.DiscussServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new discussserviceModule.v1beta2.DiscussServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new discussserviceModule.v1beta2.DiscussServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.discussServiceStub, undefined); + await client.initialize(); + assert(client.discussServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new discussserviceModule.v1beta2.DiscussServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.discussServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new discussserviceModule.v1beta2.DiscussServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.discussServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new discussserviceModule.v1beta2.DiscussServiceClient({ + 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 discussserviceModule.v1beta2.DiscussServiceClient({ + 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('generateMessage', () => { + it('invokes generateMessage without error', async () => { + const client = new discussserviceModule.v1beta2.DiscussServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.GenerateMessageRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.ai.generativelanguage.v1beta2.GenerateMessageRequest', + ['model'] + ); + request.model = defaultValue1; + const expectedHeaderRequestParams = `model=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.GenerateMessageResponse() + ); + client.innerApiCalls.generateMessage = stubSimpleCall(expectedResponse); + const [response] = await client.generateMessage(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.generateMessage as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.generateMessage as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateMessage without error using callback', async () => { + const client = new discussserviceModule.v1beta2.DiscussServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.GenerateMessageRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.ai.generativelanguage.v1beta2.GenerateMessageRequest', + ['model'] + ); + request.model = defaultValue1; + const expectedHeaderRequestParams = `model=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.GenerateMessageResponse() + ); + client.innerApiCalls.generateMessage = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.generateMessage( + request, + ( + err?: Error | null, + result?: protos.google.ai.generativelanguage.v1beta2.IGenerateMessageResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.generateMessage as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.generateMessage as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateMessage with error', async () => { + const client = new discussserviceModule.v1beta2.DiscussServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.GenerateMessageRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.ai.generativelanguage.v1beta2.GenerateMessageRequest', + ['model'] + ); + request.model = defaultValue1; + const expectedHeaderRequestParams = `model=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.generateMessage = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.generateMessage(request), expectedError); + const actualRequest = ( + client.innerApiCalls.generateMessage as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.generateMessage as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateMessage with closed client', async () => { + const client = new discussserviceModule.v1beta2.DiscussServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.GenerateMessageRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.ai.generativelanguage.v1beta2.GenerateMessageRequest', + ['model'] + ); + request.model = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.generateMessage(request), expectedError); + }); + }); + + describe('countMessageTokens', () => { + it('invokes countMessageTokens without error', async () => { + const client = new discussserviceModule.v1beta2.DiscussServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.CountMessageTokensRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.ai.generativelanguage.v1beta2.CountMessageTokensRequest', + ['model'] + ); + request.model = defaultValue1; + const expectedHeaderRequestParams = `model=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.CountMessageTokensResponse() + ); + client.innerApiCalls.countMessageTokens = + stubSimpleCall(expectedResponse); + const [response] = await client.countMessageTokens(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.countMessageTokens as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.countMessageTokens as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes countMessageTokens without error using callback', async () => { + const client = new discussserviceModule.v1beta2.DiscussServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.CountMessageTokensRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.ai.generativelanguage.v1beta2.CountMessageTokensRequest', + ['model'] + ); + request.model = defaultValue1; + const expectedHeaderRequestParams = `model=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.CountMessageTokensResponse() + ); + client.innerApiCalls.countMessageTokens = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.countMessageTokens( + request, + ( + err?: Error | null, + result?: protos.google.ai.generativelanguage.v1beta2.ICountMessageTokensResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.countMessageTokens as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.countMessageTokens as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes countMessageTokens with error', async () => { + const client = new discussserviceModule.v1beta2.DiscussServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.CountMessageTokensRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.ai.generativelanguage.v1beta2.CountMessageTokensRequest', + ['model'] + ); + request.model = defaultValue1; + const expectedHeaderRequestParams = `model=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.countMessageTokens = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.countMessageTokens(request), expectedError); + const actualRequest = ( + client.innerApiCalls.countMessageTokens as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.countMessageTokens as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes countMessageTokens with closed client', async () => { + const client = new discussserviceModule.v1beta2.DiscussServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.CountMessageTokensRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.ai.generativelanguage.v1beta2.CountMessageTokensRequest', + ['model'] + ); + request.model = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.countMessageTokens(request), expectedError); + }); + }); + + describe('Path templates', () => { + describe('model', () => { + const fakePath = '/rendered/path/model'; + const expectedParameters = { + model: 'modelValue', + }; + const client = new discussserviceModule.v1beta2.DiscussServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.modelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.modelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('modelPath', () => { + const result = client.modelPath('modelValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.modelPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchModelFromModelName', () => { + const result = client.matchModelFromModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + (client.pathTemplates.modelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-ai-generativelanguage/test/gapic_model_service_v1beta2.ts b/packages/google-ai-generativelanguage/test/gapic_model_service_v1beta2.ts new file mode 100644 index 00000000000..0b48b5ad85b --- /dev/null +++ b/packages/google-ai-generativelanguage/test/gapic_model_service_v1beta2.ts @@ -0,0 +1,635 @@ +// Copyright 2023 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 modelserviceModule 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('v1beta2.ModelServiceClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + modelserviceModule.v1beta2.ModelServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + modelserviceModule.v1beta2.ModelServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = modelserviceModule.v1beta2.ModelServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new modelserviceModule.v1beta2.ModelServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new modelserviceModule.v1beta2.ModelServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new modelserviceModule.v1beta2.ModelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.modelServiceStub, undefined); + await client.initialize(); + assert(client.modelServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new modelserviceModule.v1beta2.ModelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.modelServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new modelserviceModule.v1beta2.ModelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.modelServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new modelserviceModule.v1beta2.ModelServiceClient({ + 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 modelserviceModule.v1beta2.ModelServiceClient({ + 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('getModel', () => { + it('invokes getModel without error', async () => { + const client = new modelserviceModule.v1beta2.ModelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.GetModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.ai.generativelanguage.v1beta2.GetModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.Model() + ); + client.innerApiCalls.getModel = stubSimpleCall(expectedResponse); + const [response] = await client.getModel(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getModel without error using callback', async () => { + const client = new modelserviceModule.v1beta2.ModelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.GetModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.ai.generativelanguage.v1beta2.GetModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.Model() + ); + client.innerApiCalls.getModel = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getModel( + request, + ( + err?: Error | null, + result?: protos.google.ai.generativelanguage.v1beta2.IModel | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getModel with error', async () => { + const client = new modelserviceModule.v1beta2.ModelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.GetModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.ai.generativelanguage.v1beta2.GetModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getModel = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getModel(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getModel with closed client', async () => { + const client = new modelserviceModule.v1beta2.ModelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.GetModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.ai.generativelanguage.v1beta2.GetModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getModel(request), expectedError); + }); + }); + + describe('listModels', () => { + it('invokes listModels without error', async () => { + const client = new modelserviceModule.v1beta2.ModelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.ListModelsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.Model() + ), + generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.Model() + ), + generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.Model() + ), + ]; + client.innerApiCalls.listModels = stubSimpleCall(expectedResponse); + const [response] = await client.listModels(request); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes listModels without error using callback', async () => { + const client = new modelserviceModule.v1beta2.ModelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.ListModelsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.Model() + ), + generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.Model() + ), + generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.Model() + ), + ]; + client.innerApiCalls.listModels = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listModels( + request, + ( + err?: Error | null, + result?: protos.google.ai.generativelanguage.v1beta2.IModel[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes listModels with error', async () => { + const client = new modelserviceModule.v1beta2.ModelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.ListModelsRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.listModels = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listModels(request), expectedError); + }); + + it('invokes listModelsStream without error', async () => { + const client = new modelserviceModule.v1beta2.ModelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.ListModelsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.Model() + ), + generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.Model() + ), + generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.Model() + ), + ]; + client.descriptors.page.listModels.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listModelsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ai.generativelanguage.v1beta2.Model[] = + []; + stream.on( + 'data', + (response: protos.google.ai.generativelanguage.v1beta2.Model) => { + 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.listModels.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listModels, request) + ); + }); + + it('invokes listModelsStream with error', async () => { + const client = new modelserviceModule.v1beta2.ModelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.ListModelsRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listModels.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listModelsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.ai.generativelanguage.v1beta2.Model[] = + []; + stream.on( + 'data', + (response: protos.google.ai.generativelanguage.v1beta2.Model) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listModels.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listModels, request) + ); + }); + + it('uses async iteration with listModels without error', async () => { + const client = new modelserviceModule.v1beta2.ModelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.ListModelsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.Model() + ), + generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.Model() + ), + generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.Model() + ), + ]; + client.descriptors.page.listModels.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.ai.generativelanguage.v1beta2.IModel[] = + []; + const iterable = client.listModelsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listModels.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + }); + + it('uses async iteration with listModels with error', async () => { + const client = new modelserviceModule.v1beta2.ModelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.ListModelsRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listModels.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listModelsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.ai.generativelanguage.v1beta2.IModel[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listModels.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + }); + }); + + describe('Path templates', () => { + describe('model', () => { + const fakePath = '/rendered/path/model'; + const expectedParameters = { + model: 'modelValue', + }; + const client = new modelserviceModule.v1beta2.ModelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.modelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.modelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('modelPath', () => { + const result = client.modelPath('modelValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.modelPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchModelFromModelName', () => { + const result = client.matchModelFromModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + (client.pathTemplates.modelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-ai-generativelanguage/test/gapic_text_service_v1beta2.ts b/packages/google-ai-generativelanguage/test/gapic_text_service_v1beta2.ts new file mode 100644 index 00000000000..df0c5079633 --- /dev/null +++ b/packages/google-ai-generativelanguage/test/gapic_text_service_v1beta2.ts @@ -0,0 +1,463 @@ +// Copyright 2023 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 textserviceModule from '../src'; + +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); +} + +describe('v1beta2.TextServiceClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + textserviceModule.v1beta2.TextServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + textserviceModule.v1beta2.TextServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = textserviceModule.v1beta2.TextServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new textserviceModule.v1beta2.TextServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new textserviceModule.v1beta2.TextServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new textserviceModule.v1beta2.TextServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.textServiceStub, undefined); + await client.initialize(); + assert(client.textServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new textserviceModule.v1beta2.TextServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.textServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new textserviceModule.v1beta2.TextServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.textServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new textserviceModule.v1beta2.TextServiceClient({ + 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 textserviceModule.v1beta2.TextServiceClient({ + 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('generateText', () => { + it('invokes generateText without error', async () => { + const client = new textserviceModule.v1beta2.TextServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.GenerateTextRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.ai.generativelanguage.v1beta2.GenerateTextRequest', + ['model'] + ); + request.model = defaultValue1; + const expectedHeaderRequestParams = `model=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.GenerateTextResponse() + ); + client.innerApiCalls.generateText = stubSimpleCall(expectedResponse); + const [response] = await client.generateText(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.generateText as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.generateText as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateText without error using callback', async () => { + const client = new textserviceModule.v1beta2.TextServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.GenerateTextRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.ai.generativelanguage.v1beta2.GenerateTextRequest', + ['model'] + ); + request.model = defaultValue1; + const expectedHeaderRequestParams = `model=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.GenerateTextResponse() + ); + client.innerApiCalls.generateText = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.generateText( + request, + ( + err?: Error | null, + result?: protos.google.ai.generativelanguage.v1beta2.IGenerateTextResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.generateText as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.generateText as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateText with error', async () => { + const client = new textserviceModule.v1beta2.TextServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.GenerateTextRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.ai.generativelanguage.v1beta2.GenerateTextRequest', + ['model'] + ); + request.model = defaultValue1; + const expectedHeaderRequestParams = `model=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.generateText = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.generateText(request), expectedError); + const actualRequest = ( + client.innerApiCalls.generateText as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.generateText as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateText with closed client', async () => { + const client = new textserviceModule.v1beta2.TextServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.GenerateTextRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.ai.generativelanguage.v1beta2.GenerateTextRequest', + ['model'] + ); + request.model = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.generateText(request), expectedError); + }); + }); + + describe('embedText', () => { + it('invokes embedText without error', async () => { + const client = new textserviceModule.v1beta2.TextServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.EmbedTextRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.ai.generativelanguage.v1beta2.EmbedTextRequest', + ['model'] + ); + request.model = defaultValue1; + const expectedHeaderRequestParams = `model=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.EmbedTextResponse() + ); + client.innerApiCalls.embedText = stubSimpleCall(expectedResponse); + const [response] = await client.embedText(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.embedText as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.embedText as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes embedText without error using callback', async () => { + const client = new textserviceModule.v1beta2.TextServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.EmbedTextRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.ai.generativelanguage.v1beta2.EmbedTextRequest', + ['model'] + ); + request.model = defaultValue1; + const expectedHeaderRequestParams = `model=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.EmbedTextResponse() + ); + client.innerApiCalls.embedText = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.embedText( + request, + ( + err?: Error | null, + result?: protos.google.ai.generativelanguage.v1beta2.IEmbedTextResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.embedText as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.embedText as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes embedText with error', async () => { + const client = new textserviceModule.v1beta2.TextServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.EmbedTextRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.ai.generativelanguage.v1beta2.EmbedTextRequest', + ['model'] + ); + request.model = defaultValue1; + const expectedHeaderRequestParams = `model=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.embedText = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.embedText(request), expectedError); + const actualRequest = ( + client.innerApiCalls.embedText as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.embedText as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes embedText with closed client', async () => { + const client = new textserviceModule.v1beta2.TextServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.ai.generativelanguage.v1beta2.EmbedTextRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.ai.generativelanguage.v1beta2.EmbedTextRequest', + ['model'] + ); + request.model = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.embedText(request), expectedError); + }); + }); + + describe('Path templates', () => { + describe('model', () => { + const fakePath = '/rendered/path/model'; + const expectedParameters = { + model: 'modelValue', + }; + const client = new textserviceModule.v1beta2.TextServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.modelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.modelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('modelPath', () => { + const result = client.modelPath('modelValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.modelPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchModelFromModelName', () => { + const result = client.matchModelFromModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + (client.pathTemplates.modelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-ai-generativelanguage/tsconfig.json b/packages/google-ai-generativelanguage/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/packages/google-ai-generativelanguage/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2018", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts" + ] +} diff --git a/packages/google-ai-generativelanguage/webpack.config.js b/packages/google-ai-generativelanguage/webpack.config.js new file mode 100644 index 00000000000..4b32bfa74e3 --- /dev/null +++ b/packages/google-ai-generativelanguage/webpack.config.js @@ -0,0 +1,64 @@ +// Copyright 2021 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. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: 'DiscussService', + filename: './discuss-service.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/, + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader', + }, + ], + }, + mode: 'production', +}; diff --git a/packages/google-analytics-admin/CHANGELOG.md b/packages/google-analytics-admin/CHANGELOG.md index 71a2de45b06..fbf6af3e252 100644 --- a/packages/google-analytics-admin/CHANGELOG.md +++ b/packages/google-analytics-admin/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [4.9.0](https://github.com/googleapis/google-cloud-node/compare/admin-v4.8.0...admin-v4.9.0) (2023-05-20) + + +### Features + +* [analytics-admin] add `GetAdSenseLink`, `CreateAdSenseLink`, `DeleteAdSenseLink`, `ListAdSenseLinks` methods to the Admin API v1alpha ([#4276](https://github.com/googleapis/google-cloud-node/issues/4276)) ([2f0e6e1](https://github.com/googleapis/google-cloud-node/commit/2f0e6e1b85fa68c02a350fed5ffcc6db0bb64fdd)) + +## [4.8.0](https://github.com/googleapis/google-cloud-node/compare/admin-v4.7.1...admin-v4.8.0) (2023-05-02) + + +### Features + +* [analytics-admin] add `FetchConnectedGa4Property` method to the Admin API v1alpha ([#4207](https://github.com/googleapis/google-cloud-node/issues/4207)) ([5af79e1](https://github.com/googleapis/google-cloud-node/commit/5af79e1a4ed1742009bc48e2ee61933b28e45d9e)) + ## [4.7.1](https://github.com/googleapis/google-cloud-node/compare/admin-v4.7.0...admin-v4.7.1) (2023-04-13) diff --git a/packages/google-analytics-admin/README.md b/packages/google-analytics-admin/README.md index 8e95f71134f..3ea53bf794a 100644 --- a/packages/google-analytics-admin/README.md +++ b/packages/google-analytics-admin/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Google Analytics Admin: Node.js Client](https://github.com/googleapis/google-cloud-node) +# [Google Analytics Admin: Node.js Client](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-analytics-admin) [![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-analytics/admin.svg)](https://www.npmjs.org/package/@google-analytics/admin) @@ -95,180 +95,194 @@ process.on('unhandledRejection', err => { ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-analytics-admin/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Analytics_admin_service.acknowledge_user_data_collection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.acknowledge_user_data_collection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.acknowledge_user_data_collection.js,samples/README.md) | -| Analytics_admin_service.approve_display_video360_advertiser_link_proposal | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.approve_display_video360_advertiser_link_proposal.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.approve_display_video360_advertiser_link_proposal.js,samples/README.md) | -| Analytics_admin_service.archive_audience | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_audience.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_audience.js,samples/README.md) | -| Analytics_admin_service.archive_custom_dimension | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_custom_dimension.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_custom_dimension.js,samples/README.md) | -| Analytics_admin_service.archive_custom_metric | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_custom_metric.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_custom_metric.js,samples/README.md) | -| Analytics_admin_service.audit_user_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.audit_user_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.audit_user_links.js,samples/README.md) | -| Analytics_admin_service.batch_create_access_bindings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_create_access_bindings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_create_access_bindings.js,samples/README.md) | -| Analytics_admin_service.batch_create_user_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_create_user_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_create_user_links.js,samples/README.md) | -| Analytics_admin_service.batch_delete_access_bindings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_delete_access_bindings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_delete_access_bindings.js,samples/README.md) | -| Analytics_admin_service.batch_delete_user_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_delete_user_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_delete_user_links.js,samples/README.md) | -| Analytics_admin_service.batch_get_access_bindings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_get_access_bindings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_get_access_bindings.js,samples/README.md) | -| Analytics_admin_service.batch_get_user_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_get_user_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_get_user_links.js,samples/README.md) | -| Analytics_admin_service.batch_update_access_bindings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_update_access_bindings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_update_access_bindings.js,samples/README.md) | -| Analytics_admin_service.batch_update_user_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_update_user_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_update_user_links.js,samples/README.md) | -| Analytics_admin_service.cancel_display_video360_advertiser_link_proposal | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.cancel_display_video360_advertiser_link_proposal.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.cancel_display_video360_advertiser_link_proposal.js,samples/README.md) | -| Analytics_admin_service.create_access_binding | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_access_binding.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_access_binding.js,samples/README.md) | -| Analytics_admin_service.create_audience | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_audience.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_audience.js,samples/README.md) | -| Analytics_admin_service.create_connected_site_tag | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_connected_site_tag.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_connected_site_tag.js,samples/README.md) | -| Analytics_admin_service.create_conversion_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_conversion_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_conversion_event.js,samples/README.md) | -| Analytics_admin_service.create_custom_dimension | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_custom_dimension.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_custom_dimension.js,samples/README.md) | -| Analytics_admin_service.create_custom_metric | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_custom_metric.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_custom_metric.js,samples/README.md) | -| Analytics_admin_service.create_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_data_stream.js,samples/README.md) | -| Analytics_admin_service.create_display_video360_advertiser_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_display_video360_advertiser_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_display_video360_advertiser_link.js,samples/README.md) | -| Analytics_admin_service.create_display_video360_advertiser_link_proposal | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_display_video360_advertiser_link_proposal.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_display_video360_advertiser_link_proposal.js,samples/README.md) | -| Analytics_admin_service.create_expanded_data_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_expanded_data_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_expanded_data_set.js,samples/README.md) | -| Analytics_admin_service.create_firebase_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_firebase_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_firebase_link.js,samples/README.md) | -| Analytics_admin_service.create_google_ads_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_google_ads_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_google_ads_link.js,samples/README.md) | -| Analytics_admin_service.create_measurement_protocol_secret | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_measurement_protocol_secret.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_measurement_protocol_secret.js,samples/README.md) | -| Analytics_admin_service.create_property | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_property.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_property.js,samples/README.md) | -| Analytics_admin_service.create_search_ads360_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_search_ads360_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_search_ads360_link.js,samples/README.md) | -| Analytics_admin_service.create_user_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_user_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_user_link.js,samples/README.md) | -| Analytics_admin_service.create_web_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_web_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_web_data_stream.js,samples/README.md) | -| Analytics_admin_service.delete_access_binding | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_access_binding.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_access_binding.js,samples/README.md) | -| Analytics_admin_service.delete_account | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_account.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_account.js,samples/README.md) | -| Analytics_admin_service.delete_android_app_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_android_app_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_android_app_data_stream.js,samples/README.md) | -| Analytics_admin_service.delete_connected_site_tag | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_connected_site_tag.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_connected_site_tag.js,samples/README.md) | -| Analytics_admin_service.delete_conversion_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_conversion_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_conversion_event.js,samples/README.md) | -| Analytics_admin_service.delete_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_data_stream.js,samples/README.md) | -| Analytics_admin_service.delete_display_video360_advertiser_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_display_video360_advertiser_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_display_video360_advertiser_link.js,samples/README.md) | -| Analytics_admin_service.delete_display_video360_advertiser_link_proposal | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_display_video360_advertiser_link_proposal.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_display_video360_advertiser_link_proposal.js,samples/README.md) | -| Analytics_admin_service.delete_expanded_data_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_expanded_data_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_expanded_data_set.js,samples/README.md) | -| Analytics_admin_service.delete_firebase_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_firebase_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_firebase_link.js,samples/README.md) | -| Analytics_admin_service.delete_google_ads_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_google_ads_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_google_ads_link.js,samples/README.md) | -| Analytics_admin_service.delete_ios_app_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_ios_app_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_ios_app_data_stream.js,samples/README.md) | -| Analytics_admin_service.delete_measurement_protocol_secret | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_measurement_protocol_secret.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_measurement_protocol_secret.js,samples/README.md) | -| Analytics_admin_service.delete_property | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_property.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_property.js,samples/README.md) | -| Analytics_admin_service.delete_search_ads360_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_search_ads360_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_search_ads360_link.js,samples/README.md) | -| Analytics_admin_service.delete_user_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_user_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_user_link.js,samples/README.md) | -| Analytics_admin_service.delete_web_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_web_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_web_data_stream.js,samples/README.md) | -| Analytics_admin_service.fetch_automated_ga4_configuration_opt_out | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.fetch_automated_ga4_configuration_opt_out.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.fetch_automated_ga4_configuration_opt_out.js,samples/README.md) | -| Analytics_admin_service.get_access_binding | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_access_binding.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_access_binding.js,samples/README.md) | -| Analytics_admin_service.get_account | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_account.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_account.js,samples/README.md) | -| Analytics_admin_service.get_android_app_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_android_app_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_android_app_data_stream.js,samples/README.md) | -| Analytics_admin_service.get_attribution_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_attribution_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_attribution_settings.js,samples/README.md) | -| Analytics_admin_service.get_audience | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_audience.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_audience.js,samples/README.md) | -| Analytics_admin_service.get_big_query_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_big_query_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_big_query_link.js,samples/README.md) | -| Analytics_admin_service.get_conversion_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_conversion_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_conversion_event.js,samples/README.md) | -| Analytics_admin_service.get_custom_dimension | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_custom_dimension.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_custom_dimension.js,samples/README.md) | -| Analytics_admin_service.get_custom_metric | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_custom_metric.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_custom_metric.js,samples/README.md) | -| Analytics_admin_service.get_data_retention_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_retention_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_retention_settings.js,samples/README.md) | -| Analytics_admin_service.get_data_sharing_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_sharing_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_sharing_settings.js,samples/README.md) | -| Analytics_admin_service.get_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_stream.js,samples/README.md) | -| Analytics_admin_service.get_display_video360_advertiser_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_display_video360_advertiser_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_display_video360_advertiser_link.js,samples/README.md) | -| Analytics_admin_service.get_display_video360_advertiser_link_proposal | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_display_video360_advertiser_link_proposal.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_display_video360_advertiser_link_proposal.js,samples/README.md) | -| Analytics_admin_service.get_enhanced_measurement_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_enhanced_measurement_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_enhanced_measurement_settings.js,samples/README.md) | -| Analytics_admin_service.get_expanded_data_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_expanded_data_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_expanded_data_set.js,samples/README.md) | -| Analytics_admin_service.get_global_site_tag | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_global_site_tag.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_global_site_tag.js,samples/README.md) | -| Analytics_admin_service.get_google_signals_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_google_signals_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_google_signals_settings.js,samples/README.md) | -| Analytics_admin_service.get_ios_app_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_ios_app_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_ios_app_data_stream.js,samples/README.md) | -| Analytics_admin_service.get_measurement_protocol_secret | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_measurement_protocol_secret.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_measurement_protocol_secret.js,samples/README.md) | -| Analytics_admin_service.get_property | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_property.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_property.js,samples/README.md) | -| Analytics_admin_service.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) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_search_ads360_link.js,samples/README.md) | -| Analytics_admin_service.get_user_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_user_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_user_link.js,samples/README.md) | -| Analytics_admin_service.get_web_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_web_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_web_data_stream.js,samples/README.md) | -| Analytics_admin_service.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) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_access_bindings.js,samples/README.md) | -| Analytics_admin_service.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) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_account_summaries.js,samples/README.md) | -| Analytics_admin_service.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) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_accounts.js,samples/README.md) | -| Analytics_admin_service.list_android_app_data_streams | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_android_app_data_streams.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_android_app_data_streams.js,samples/README.md) | -| Analytics_admin_service.list_audiences | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_audiences.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_audiences.js,samples/README.md) | -| Analytics_admin_service.list_big_query_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_big_query_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_big_query_links.js,samples/README.md) | -| Analytics_admin_service.list_connected_site_tags | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_connected_site_tags.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_connected_site_tags.js,samples/README.md) | -| Analytics_admin_service.list_conversion_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_conversion_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_conversion_events.js,samples/README.md) | -| Analytics_admin_service.list_custom_dimensions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_custom_dimensions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_custom_dimensions.js,samples/README.md) | -| Analytics_admin_service.list_custom_metrics | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_custom_metrics.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_custom_metrics.js,samples/README.md) | -| Analytics_admin_service.list_data_streams | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_data_streams.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_data_streams.js,samples/README.md) | -| Analytics_admin_service.list_display_video360_advertiser_link_proposals | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_link_proposals.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_link_proposals.js,samples/README.md) | -| Analytics_admin_service.list_display_video360_advertiser_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_links.js,samples/README.md) | -| Analytics_admin_service.list_expanded_data_sets | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_expanded_data_sets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_expanded_data_sets.js,samples/README.md) | -| Analytics_admin_service.list_firebase_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_firebase_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_firebase_links.js,samples/README.md) | -| Analytics_admin_service.list_google_ads_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_google_ads_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_google_ads_links.js,samples/README.md) | -| Analytics_admin_service.list_ios_app_data_streams | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_ios_app_data_streams.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_ios_app_data_streams.js,samples/README.md) | -| Analytics_admin_service.list_measurement_protocol_secrets | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_measurement_protocol_secrets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_measurement_protocol_secrets.js,samples/README.md) | -| Analytics_admin_service.list_properties | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_properties.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_properties.js,samples/README.md) | -| Analytics_admin_service.list_search_ads360_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_search_ads360_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_search_ads360_links.js,samples/README.md) | -| Analytics_admin_service.list_user_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_user_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_user_links.js,samples/README.md) | -| Analytics_admin_service.list_web_data_streams | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_web_data_streams.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_web_data_streams.js,samples/README.md) | -| Analytics_admin_service.provision_account_ticket | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.provision_account_ticket.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.provision_account_ticket.js,samples/README.md) | -| Analytics_admin_service.run_access_report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.run_access_report.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.run_access_report.js,samples/README.md) | -| Analytics_admin_service.search_change_history_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.search_change_history_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.search_change_history_events.js,samples/README.md) | -| Analytics_admin_service.set_automated_ga4_configuration_opt_out | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.set_automated_ga4_configuration_opt_out.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.set_automated_ga4_configuration_opt_out.js,samples/README.md) | -| Analytics_admin_service.update_access_binding | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_access_binding.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_access_binding.js,samples/README.md) | -| Analytics_admin_service.update_account | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_account.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_account.js,samples/README.md) | -| Analytics_admin_service.update_android_app_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_android_app_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_android_app_data_stream.js,samples/README.md) | -| Analytics_admin_service.update_attribution_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_attribution_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_attribution_settings.js,samples/README.md) | -| Analytics_admin_service.update_audience | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_audience.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_audience.js,samples/README.md) | -| Analytics_admin_service.update_custom_dimension | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_custom_dimension.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_custom_dimension.js,samples/README.md) | -| Analytics_admin_service.update_custom_metric | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_custom_metric.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_custom_metric.js,samples/README.md) | -| Analytics_admin_service.update_data_retention_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_data_retention_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_data_retention_settings.js,samples/README.md) | -| Analytics_admin_service.update_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_data_stream.js,samples/README.md) | -| Analytics_admin_service.update_display_video360_advertiser_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_display_video360_advertiser_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_display_video360_advertiser_link.js,samples/README.md) | -| Analytics_admin_service.update_enhanced_measurement_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_enhanced_measurement_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_enhanced_measurement_settings.js,samples/README.md) | -| Analytics_admin_service.update_expanded_data_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_expanded_data_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_expanded_data_set.js,samples/README.md) | -| Analytics_admin_service.update_google_ads_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_google_ads_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_google_ads_link.js,samples/README.md) | -| Analytics_admin_service.update_google_signals_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_google_signals_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_google_signals_settings.js,samples/README.md) | -| Analytics_admin_service.update_ios_app_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_ios_app_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_ios_app_data_stream.js,samples/README.md) | -| Analytics_admin_service.update_measurement_protocol_secret | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_measurement_protocol_secret.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_measurement_protocol_secret.js,samples/README.md) | -| Analytics_admin_service.update_property | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_property.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_property.js,samples/README.md) | -| Analytics_admin_service.update_search_ads360_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_search_ads360_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_search_ads360_link.js,samples/README.md) | -| Analytics_admin_service.update_user_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_user_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_user_link.js,samples/README.md) | -| Analytics_admin_service.update_web_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_web_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_web_data_stream.js,samples/README.md) | -| Analytics_admin_service.acknowledge_user_data_collection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.acknowledge_user_data_collection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.acknowledge_user_data_collection.js,samples/README.md) | -| Analytics_admin_service.archive_custom_dimension | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.archive_custom_dimension.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.archive_custom_dimension.js,samples/README.md) | -| Analytics_admin_service.archive_custom_metric | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.archive_custom_metric.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.archive_custom_metric.js,samples/README.md) | -| Analytics_admin_service.create_conversion_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_conversion_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_conversion_event.js,samples/README.md) | -| Analytics_admin_service.create_custom_dimension | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_custom_dimension.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_custom_dimension.js,samples/README.md) | -| Analytics_admin_service.create_custom_metric | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_custom_metric.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_custom_metric.js,samples/README.md) | -| Analytics_admin_service.create_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_data_stream.js,samples/README.md) | -| Analytics_admin_service.create_firebase_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_firebase_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_firebase_link.js,samples/README.md) | -| Analytics_admin_service.create_google_ads_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_google_ads_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_google_ads_link.js,samples/README.md) | -| Analytics_admin_service.create_measurement_protocol_secret | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_measurement_protocol_secret.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_measurement_protocol_secret.js,samples/README.md) | -| Analytics_admin_service.create_property | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_property.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_property.js,samples/README.md) | -| Analytics_admin_service.delete_account | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_account.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_account.js,samples/README.md) | -| Analytics_admin_service.delete_conversion_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_conversion_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_conversion_event.js,samples/README.md) | -| Analytics_admin_service.delete_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_data_stream.js,samples/README.md) | -| Analytics_admin_service.delete_firebase_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_firebase_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_firebase_link.js,samples/README.md) | -| Analytics_admin_service.delete_google_ads_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_google_ads_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_google_ads_link.js,samples/README.md) | -| Analytics_admin_service.delete_measurement_protocol_secret | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_measurement_protocol_secret.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_measurement_protocol_secret.js,samples/README.md) | -| Analytics_admin_service.delete_property | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_property.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_property.js,samples/README.md) | -| Analytics_admin_service.get_account | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_account.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_account.js,samples/README.md) | -| Analytics_admin_service.get_conversion_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_conversion_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_conversion_event.js,samples/README.md) | -| Analytics_admin_service.get_custom_dimension | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_custom_dimension.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_custom_dimension.js,samples/README.md) | -| Analytics_admin_service.get_custom_metric | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_custom_metric.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_custom_metric.js,samples/README.md) | -| Analytics_admin_service.get_data_retention_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_retention_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_retention_settings.js,samples/README.md) | -| Analytics_admin_service.get_data_sharing_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_sharing_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_sharing_settings.js,samples/README.md) | -| Analytics_admin_service.get_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_stream.js,samples/README.md) | -| Analytics_admin_service.get_measurement_protocol_secret | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_measurement_protocol_secret.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_measurement_protocol_secret.js,samples/README.md) | -| Analytics_admin_service.get_property | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_property.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_property.js,samples/README.md) | -| Analytics_admin_service.list_account_summaries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_account_summaries.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_account_summaries.js,samples/README.md) | -| Analytics_admin_service.list_accounts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_accounts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_accounts.js,samples/README.md) | -| Analytics_admin_service.list_conversion_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_conversion_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_conversion_events.js,samples/README.md) | -| Analytics_admin_service.list_custom_dimensions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_custom_dimensions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_custom_dimensions.js,samples/README.md) | -| Analytics_admin_service.list_custom_metrics | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_custom_metrics.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_custom_metrics.js,samples/README.md) | -| Analytics_admin_service.list_data_streams | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_data_streams.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_data_streams.js,samples/README.md) | -| Analytics_admin_service.list_firebase_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_firebase_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_firebase_links.js,samples/README.md) | -| Analytics_admin_service.list_google_ads_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_google_ads_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_google_ads_links.js,samples/README.md) | -| Analytics_admin_service.list_measurement_protocol_secrets | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_measurement_protocol_secrets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_measurement_protocol_secrets.js,samples/README.md) | -| Analytics_admin_service.list_properties | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_properties.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_properties.js,samples/README.md) | -| Analytics_admin_service.provision_account_ticket | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.provision_account_ticket.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.provision_account_ticket.js,samples/README.md) | -| Analytics_admin_service.run_access_report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.run_access_report.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.run_access_report.js,samples/README.md) | -| Analytics_admin_service.search_change_history_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.search_change_history_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.search_change_history_events.js,samples/README.md) | -| Analytics_admin_service.update_account | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_account.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_account.js,samples/README.md) | -| Analytics_admin_service.update_custom_dimension | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_custom_dimension.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_custom_dimension.js,samples/README.md) | -| Analytics_admin_service.update_custom_metric | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_custom_metric.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_custom_metric.js,samples/README.md) | -| Analytics_admin_service.update_data_retention_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_data_retention_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_data_retention_settings.js,samples/README.md) | -| Analytics_admin_service.update_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_data_stream.js,samples/README.md) | -| Analytics_admin_service.update_google_ads_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_google_ads_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_google_ads_link.js,samples/README.md) | -| Analytics_admin_service.update_measurement_protocol_secret | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_measurement_protocol_secret.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_measurement_protocol_secret.js,samples/README.md) | -| Analytics_admin_service.update_property | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_property.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_property.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/quickstart.js,samples/README.md) | -| Quickstart.test | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/test/quickstart.test.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/test/quickstart.test.js,samples/README.md) | +| Analytics_admin_service.acknowledge_user_data_collection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.acknowledge_user_data_collection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.acknowledge_user_data_collection.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.approve_display_video360_advertiser_link_proposal | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.approve_display_video360_advertiser_link_proposal.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.approve_display_video360_advertiser_link_proposal.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.archive_audience | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_audience.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_audience.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.archive_custom_dimension | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_custom_dimension.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_custom_dimension.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.archive_custom_metric | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_custom_metric.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_custom_metric.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.audit_user_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.audit_user_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.audit_user_links.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.batch_create_access_bindings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_create_access_bindings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_create_access_bindings.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.batch_create_user_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_create_user_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_create_user_links.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.batch_delete_access_bindings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_delete_access_bindings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_delete_access_bindings.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.batch_delete_user_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_delete_user_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_delete_user_links.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.batch_get_access_bindings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_get_access_bindings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_get_access_bindings.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.batch_get_user_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_get_user_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_get_user_links.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.batch_update_access_bindings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_update_access_bindings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_update_access_bindings.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.batch_update_user_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_update_user_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_update_user_links.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.cancel_display_video360_advertiser_link_proposal | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.cancel_display_video360_advertiser_link_proposal.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.cancel_display_video360_advertiser_link_proposal.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.create_access_binding | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_access_binding.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_access_binding.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.create_ad_sense_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_ad_sense_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_ad_sense_link.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.create_audience | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_audience.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_audience.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.create_channel_group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_channel_group.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_channel_group.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.create_connected_site_tag | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_connected_site_tag.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_connected_site_tag.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.create_conversion_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_conversion_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_conversion_event.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.create_custom_dimension | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_custom_dimension.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_custom_dimension.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.create_custom_metric | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_custom_metric.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_custom_metric.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.create_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_data_stream.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.create_display_video360_advertiser_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_display_video360_advertiser_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_display_video360_advertiser_link.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.create_display_video360_advertiser_link_proposal | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_display_video360_advertiser_link_proposal.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_display_video360_advertiser_link_proposal.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.create_event_create_rule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_event_create_rule.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_event_create_rule.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.create_expanded_data_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_expanded_data_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_expanded_data_set.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.create_firebase_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_firebase_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_firebase_link.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.create_google_ads_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_google_ads_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_google_ads_link.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.create_measurement_protocol_secret | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_measurement_protocol_secret.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_measurement_protocol_secret.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.create_property | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_property.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_property.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.create_search_ads360_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_search_ads360_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_search_ads360_link.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.create_user_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_user_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_user_link.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.create_web_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_web_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_web_data_stream.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.delete_access_binding | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_access_binding.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_access_binding.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.delete_account | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_account.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_account.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.delete_ad_sense_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_ad_sense_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_ad_sense_link.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.delete_android_app_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_android_app_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_android_app_data_stream.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.delete_channel_group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_channel_group.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_channel_group.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.delete_connected_site_tag | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_connected_site_tag.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_connected_site_tag.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.delete_conversion_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_conversion_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_conversion_event.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.delete_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_data_stream.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.delete_display_video360_advertiser_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_display_video360_advertiser_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_display_video360_advertiser_link.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.delete_display_video360_advertiser_link_proposal | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_display_video360_advertiser_link_proposal.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_display_video360_advertiser_link_proposal.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.delete_event_create_rule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_event_create_rule.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_event_create_rule.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.delete_expanded_data_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_expanded_data_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_expanded_data_set.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.delete_firebase_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_firebase_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_firebase_link.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.delete_google_ads_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_google_ads_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_google_ads_link.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.delete_ios_app_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_ios_app_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_ios_app_data_stream.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.delete_measurement_protocol_secret | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_measurement_protocol_secret.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_measurement_protocol_secret.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.delete_property | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_property.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_property.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.delete_search_ads360_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_search_ads360_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_search_ads360_link.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.delete_user_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_user_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_user_link.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.delete_web_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_web_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_web_data_stream.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.fetch_automated_ga4_configuration_opt_out | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.fetch_automated_ga4_configuration_opt_out.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.fetch_automated_ga4_configuration_opt_out.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.fetch_connected_ga4_property | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.fetch_connected_ga4_property.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.fetch_connected_ga4_property.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_access_binding | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_access_binding.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_access_binding.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_account | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_account.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_account.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_ad_sense_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_ad_sense_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_ad_sense_link.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_android_app_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_android_app_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_android_app_data_stream.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_attribution_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_attribution_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_attribution_settings.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_audience | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_audience.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_audience.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_big_query_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_big_query_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_big_query_link.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_channel_group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_channel_group.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_channel_group.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_conversion_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_conversion_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_conversion_event.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_custom_dimension | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_custom_dimension.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_custom_dimension.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_custom_metric | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_custom_metric.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_custom_metric.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_data_retention_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_retention_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_retention_settings.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_data_sharing_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_sharing_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_sharing_settings.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_stream.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_display_video360_advertiser_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_display_video360_advertiser_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_display_video360_advertiser_link.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_display_video360_advertiser_link_proposal | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_display_video360_advertiser_link_proposal.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_display_video360_advertiser_link_proposal.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_enhanced_measurement_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_enhanced_measurement_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_enhanced_measurement_settings.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_event_create_rule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_event_create_rule.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_event_create_rule.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_expanded_data_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_expanded_data_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_expanded_data_set.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_global_site_tag | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_global_site_tag.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_global_site_tag.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_google_signals_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_google_signals_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_google_signals_settings.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_ios_app_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_ios_app_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_ios_app_data_stream.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_measurement_protocol_secret | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_measurement_protocol_secret.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_measurement_protocol_secret.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_property | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_property.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_property.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.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) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_search_ads360_link.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_user_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_user_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_user_link.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_web_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_web_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_web_data_stream.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.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) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_access_bindings.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.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) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_account_summaries.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.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) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_accounts.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.list_ad_sense_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_ad_sense_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_ad_sense_links.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.list_android_app_data_streams | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_android_app_data_streams.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_android_app_data_streams.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.list_audiences | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_audiences.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_audiences.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.list_big_query_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_big_query_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_big_query_links.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.list_channel_groups | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_channel_groups.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_channel_groups.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.list_connected_site_tags | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_connected_site_tags.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_connected_site_tags.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.list_conversion_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_conversion_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_conversion_events.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.list_custom_dimensions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_custom_dimensions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_custom_dimensions.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.list_custom_metrics | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_custom_metrics.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_custom_metrics.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.list_data_streams | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_data_streams.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_data_streams.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.list_display_video360_advertiser_link_proposals | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_link_proposals.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_link_proposals.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.list_display_video360_advertiser_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_links.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.list_event_create_rules | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_event_create_rules.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_event_create_rules.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.list_expanded_data_sets | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_expanded_data_sets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_expanded_data_sets.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.list_firebase_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_firebase_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_firebase_links.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.list_google_ads_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_google_ads_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_google_ads_links.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.list_ios_app_data_streams | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_ios_app_data_streams.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_ios_app_data_streams.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.list_measurement_protocol_secrets | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_measurement_protocol_secrets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_measurement_protocol_secrets.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.list_properties | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_properties.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_properties.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.list_search_ads360_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_search_ads360_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_search_ads360_links.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.list_user_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_user_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_user_links.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.list_web_data_streams | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_web_data_streams.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_web_data_streams.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.provision_account_ticket | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.provision_account_ticket.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.provision_account_ticket.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.run_access_report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.run_access_report.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.run_access_report.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.search_change_history_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.search_change_history_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.search_change_history_events.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.set_automated_ga4_configuration_opt_out | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.set_automated_ga4_configuration_opt_out.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.set_automated_ga4_configuration_opt_out.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.update_access_binding | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_access_binding.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_access_binding.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.update_account | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_account.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_account.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.update_android_app_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_android_app_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_android_app_data_stream.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.update_attribution_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_attribution_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_attribution_settings.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.update_audience | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_audience.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_audience.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.update_channel_group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_channel_group.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_channel_group.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.update_custom_dimension | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_custom_dimension.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_custom_dimension.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.update_custom_metric | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_custom_metric.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_custom_metric.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.update_data_retention_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_data_retention_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_data_retention_settings.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.update_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_data_stream.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.update_display_video360_advertiser_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_display_video360_advertiser_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_display_video360_advertiser_link.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.update_enhanced_measurement_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_enhanced_measurement_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_enhanced_measurement_settings.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.update_event_create_rule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_event_create_rule.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_event_create_rule.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.update_expanded_data_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_expanded_data_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_expanded_data_set.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.update_google_ads_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_google_ads_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_google_ads_link.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.update_google_signals_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_google_signals_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_google_signals_settings.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.update_ios_app_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_ios_app_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_ios_app_data_stream.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.update_measurement_protocol_secret | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_measurement_protocol_secret.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_measurement_protocol_secret.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.update_property | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_property.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_property.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.update_search_ads360_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_search_ads360_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_search_ads360_link.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.update_user_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_user_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_user_link.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.update_web_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_web_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_web_data_stream.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.acknowledge_user_data_collection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.acknowledge_user_data_collection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.acknowledge_user_data_collection.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.archive_custom_dimension | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.archive_custom_dimension.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.archive_custom_dimension.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.archive_custom_metric | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.archive_custom_metric.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.archive_custom_metric.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.create_conversion_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_conversion_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_conversion_event.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.create_custom_dimension | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_custom_dimension.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_custom_dimension.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.create_custom_metric | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_custom_metric.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_custom_metric.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.create_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_data_stream.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.create_firebase_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_firebase_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_firebase_link.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.create_google_ads_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_google_ads_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_google_ads_link.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.create_measurement_protocol_secret | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_measurement_protocol_secret.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_measurement_protocol_secret.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.create_property | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_property.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_property.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.delete_account | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_account.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_account.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.delete_conversion_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_conversion_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_conversion_event.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.delete_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_data_stream.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.delete_firebase_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_firebase_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_firebase_link.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.delete_google_ads_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_google_ads_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_google_ads_link.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.delete_measurement_protocol_secret | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_measurement_protocol_secret.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_measurement_protocol_secret.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.delete_property | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_property.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_property.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_account | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_account.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_account.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_conversion_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_conversion_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_conversion_event.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_custom_dimension | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_custom_dimension.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_custom_dimension.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_custom_metric | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_custom_metric.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_custom_metric.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_data_retention_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_retention_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_retention_settings.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_data_sharing_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_sharing_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_sharing_settings.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_stream.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_measurement_protocol_secret | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_measurement_protocol_secret.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_measurement_protocol_secret.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.get_property | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_property.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_property.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.list_account_summaries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_account_summaries.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_account_summaries.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.list_accounts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_accounts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_accounts.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.list_conversion_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_conversion_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_conversion_events.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.list_custom_dimensions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_custom_dimensions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_custom_dimensions.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.list_custom_metrics | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_custom_metrics.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_custom_metrics.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.list_data_streams | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_data_streams.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_data_streams.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.list_firebase_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_firebase_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_firebase_links.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.list_google_ads_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_google_ads_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_google_ads_links.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.list_measurement_protocol_secrets | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_measurement_protocol_secrets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_measurement_protocol_secrets.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.list_properties | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_properties.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_properties.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.provision_account_ticket | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.provision_account_ticket.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.provision_account_ticket.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.run_access_report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.run_access_report.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.run_access_report.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.search_change_history_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.search_change_history_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.search_change_history_events.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.update_account | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_account.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_account.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.update_custom_dimension | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_custom_dimension.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_custom_dimension.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.update_custom_metric | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_custom_metric.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_custom_metric.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.update_data_retention_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_data_retention_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_data_retention_settings.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.update_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_data_stream.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.update_google_ads_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_google_ads_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_google_ads_link.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.update_measurement_protocol_secret | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_measurement_protocol_secret.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_measurement_protocol_secret.js,packages/google-analytics-admin/samples/README.md) | +| Analytics_admin_service.update_property | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_property.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_property.js,packages/google-analytics-admin/samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/quickstart.js,packages/google-analytics-admin/samples/README.md) | diff --git a/packages/google-analytics-admin/package.json b/packages/google-analytics-admin/package.json index 4928a96a440..18d5f03253c 100644 --- a/packages/google-analytics-admin/package.json +++ b/packages/google-analytics-admin/package.json @@ -1,6 +1,6 @@ { "name": "@google-analytics/admin", - "version": "4.7.1", + "version": "4.9.0", "description": "Admin client for Node.js", "repository": { "type": "git", @@ -30,17 +30,18 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", "docs-test": "linkinator docs", "fix": "gts fix", "lint": "gts check", - "prelint": "cd samples; npm link ../; npm i", "prepare": "npm run compile-protos && npm run compile", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "system-test": "npm run compile && c8 mocha build/system-test", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", "test": "c8 mocha build/test" }, "dependencies": { @@ -58,6 +59,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-analytics-admin" -} - +} \ No newline at end of file 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 9127b859e15..fe9492274e2 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 @@ -18,6 +18,8 @@ package google.analytics.admin.v1alpha; import "google/analytics/admin/v1alpha/access_report.proto"; import "google/analytics/admin/v1alpha/audience.proto"; +import "google/analytics/admin/v1alpha/channel_group.proto"; +import "google/analytics/admin/v1alpha/event_create_and_edit.proto"; import "google/analytics/admin/v1alpha/expanded_data_set.proto"; import "google/analytics/admin/v1alpha/resources.proto"; import "google/api/annotations.proto"; @@ -1087,6 +1089,50 @@ service AnalyticsAdminService { option (google.api.method_signature) = "name"; } + // Lookup for a single ChannelGroup. + rpc GetChannelGroup(GetChannelGroupRequest) returns (ChannelGroup) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/channelGroups/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists ChannelGroups on a property. + rpc ListChannelGroups(ListChannelGroupsRequest) + returns (ListChannelGroupsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=properties/*}/channelGroups" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a ChannelGroup. + rpc CreateChannelGroup(CreateChannelGroupRequest) returns (ChannelGroup) { + option (google.api.http) = { + post: "/v1alpha/{parent=properties/*}/channelGroups" + body: "channel_group" + }; + option (google.api.method_signature) = "parent,channel_group"; + } + + // Updates a ChannelGroup. + rpc UpdateChannelGroup(UpdateChannelGroupRequest) returns (ChannelGroup) { + option (google.api.http) = { + patch: "/v1alpha/{channel_group.name=properties/*/channelGroups/*}" + body: "channel_group" + }; + option (google.api.method_signature) = "channel_group,update_mask"; + } + + // Deletes a ChannelGroup on a property. + rpc DeleteChannelGroup(DeleteChannelGroupRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha/{name=properties/*/channelGroups/*}" + }; + option (google.api.method_signature) = "name"; + } + // Sets the opt out status for the automated GA4 setup process for a UA // property. // Note: this has no effect on GA4 property. @@ -1184,6 +1230,96 @@ service AnalyticsAdminService { body: "*" }; } + + // Given a specified UA property, looks up the GA4 property connected to it. + // Note: this cannot be used with GA4 properties. + rpc FetchConnectedGa4Property(FetchConnectedGa4PropertyRequest) + returns (FetchConnectedGa4PropertyResponse) { + option (google.api.http) = { + get: "/v1alpha/properties:fetchConnectedGa4Property" + }; + } + + // Looks up a single AdSenseLink. + rpc GetAdSenseLink(GetAdSenseLinkRequest) returns (AdSenseLink) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/adSenseLinks/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates an AdSenseLink. + rpc CreateAdSenseLink(CreateAdSenseLinkRequest) returns (AdSenseLink) { + option (google.api.http) = { + post: "/v1alpha/{parent=properties/*}/adSenseLinks" + body: "adsense_link" + }; + option (google.api.method_signature) = "parent,adsense_link"; + } + + // Deletes an AdSenseLink. + rpc DeleteAdSenseLink(DeleteAdSenseLinkRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha/{name=properties/*/adSenseLinks/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists AdSenseLinks on a property. + rpc ListAdSenseLinks(ListAdSenseLinksRequest) + returns (ListAdSenseLinksResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=properties/*}/adSenseLinks" + }; + option (google.api.method_signature) = "parent"; + } + + // Lookup for a single EventCreateRule. + rpc GetEventCreateRule(GetEventCreateRuleRequest) returns (EventCreateRule) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/dataStreams/*/eventCreateRules/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists EventCreateRules on a web data stream. + rpc ListEventCreateRules(ListEventCreateRulesRequest) + returns (ListEventCreateRulesResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=properties/*/dataStreams/*}/eventCreateRules" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates an EventCreateRule. + rpc CreateEventCreateRule(CreateEventCreateRuleRequest) + returns (EventCreateRule) { + option (google.api.http) = { + post: "/v1alpha/{parent=properties/*/dataStreams/*}/eventCreateRules" + body: "event_create_rule" + }; + option (google.api.method_signature) = "parent,event_create_rule"; + } + + // Updates an EventCreateRule. + rpc UpdateEventCreateRule(UpdateEventCreateRuleRequest) + returns (EventCreateRule) { + option (google.api.http) = { + patch: "/v1alpha/{event_create_rule.name=properties/*/dataStreams/*/eventCreateRules/*}" + body: "event_create_rule" + }; + option (google.api.method_signature) = "event_create_rule,update_mask"; + } + + // Deletes an EventCreateRule. + rpc DeleteEventCreateRule(DeleteEventCreateRuleRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha/{name=properties/*/dataStreams/*/eventCreateRules/*}" + }; + option (google.api.method_signature) = "name"; + } } // The request for a Data Access Record Report. @@ -3065,7 +3201,7 @@ message DeleteExpandedDataSetRequest { // Request message for GetExpandedDataSet RPC. message GetExpandedDataSetRequest { - // Required. The name of the Audience to get. + // Required. The name of the ExpandedDataSet to get. // Example format: properties/1234/expandedDataSets/5678 string name = 1 [ (google.api.field_behavior) = REQUIRED, @@ -3109,6 +3245,95 @@ message ListExpandedDataSetsResponse { string next_page_token = 2; } +// Request message for CreateChannelGroup RPC. +message CreateChannelGroupRequest { + // Required. The property for which to create a ChannelGroup. + // Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/ChannelGroup" + } + ]; + + // Required. The ChannelGroup to create. + ChannelGroup channel_group = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for UpdateChannelGroup RPC. +message UpdateChannelGroupRequest { + // Required. The ChannelGroup to update. + // The resource's `name` field is used to identify the ChannelGroup to be + // updated. + ChannelGroup channel_group = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to be updated. Field names must be in snake + // case (e.g., "field_to_update"). Omitted fields will not be updated. To + // replace the entire entity, use one path with the string "*" to match all + // fields. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteChannelGroup RPC. +message DeleteChannelGroupRequest { + // Required. The ChannelGroup to delete. + // Example format: properties/1234/channelGroups/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/ChannelGroup" + } + ]; +} + +// Request message for GetChannelGroup RPC. +message GetChannelGroupRequest { + // Required. The ChannelGroup to get. + // Example format: properties/1234/channelGroups/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/ChannelGroup" + } + ]; +} + +// Request message for ListChannelGroups RPC. +message ListChannelGroupsRequest { + // Required. The property for which to list ChannelGroups. + // Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/ChannelGroup" + } + ]; + + // 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; + + // A page token, received from a previous `ListChannelGroups` call. Provide + // this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListChannelGroups` + // must match the call that provided the page token. + string page_token = 3; +} + +// Response message for ListChannelGroups RPC. +message ListChannelGroupsResponse { + // List of ChannelGroup. These will be ordered stably, but in an arbitrary + // order. + repeated ChannelGroup channel_groups = 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 for setting the opt out status for the automated GA4 setup process. message SetAutomatedGa4ConfigurationOptOutRequest { // Required. The UA property to set the opt out status. Note this request uses @@ -3262,3 +3487,195 @@ message ListConnectedSiteTagsResponse { // connected site tags will be returned. repeated ConnectedSiteTag connected_site_tags = 1; } + +// Request message to be passed to CreateAdSenseLink method. +message CreateAdSenseLinkRequest { + // Required. The property for which to create an AdSense Link. + // Format: properties/{propertyId} + // Example: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/AdSenseLink" + } + ]; + + // Required. The AdSense Link to create + AdSenseLink adsense_link = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message to be passed to GetAdSenseLink method. +message GetAdSenseLinkRequest { + // Required. Unique identifier for the AdSense Link requested. + // Format: properties/{propertyId}/adSenseLinks/{linkId} + // Example: properties/1234/adSenseLinks/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/AdSenseLink" + } + ]; +} + +// Request message to be passed to DeleteAdSenseLink method. +message DeleteAdSenseLinkRequest { + // Required. Unique identifier for the AdSense Link to be deleted. + // Format: properties/{propertyId}/adSenseLinks/{linkId} + // Example: properties/1234/adSenseLinks/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/AdSenseLink" + } + ]; +} + +// Request message to be passed to ListAdSenseLinks method. +message ListAdSenseLinksRequest { + // Required. Resource name of the parent property. + // Format: properties/{propertyId} + // Example: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/AdSenseLink" + } + ]; + + // 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; + + // A page token received from a previous `ListAdSenseLinks` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListAdSenseLinks` must + // match the call that provided the page token. + string page_token = 3; +} + +// Response message for ListAdSenseLinks method. +message ListAdSenseLinksResponse { + // List of AdSenseLinks. + repeated AdSenseLink adsense_links = 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 for looking up GA4 property connected to a UA property. +message FetchConnectedGa4PropertyRequest { + // Required. The UA property for which to look up the connected GA4 property. + // Note this request uses the + // internal property ID, not the tracking ID of the form UA-XXXXXX-YY. + // Format: properties/{internal_web_property_id} + // Example: properties/1234 + string property = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Property" + } + ]; +} + +// Response for looking up GA4 property connected to a UA property. +message FetchConnectedGa4PropertyResponse { + // The GA4 property connected to the UA property. An empty string is returned + // when there is no connected GA4 property. + // Format: properties/{property_id} + // Example: properties/1234 + string property = 1 [(google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Property" + }]; +} + +// Request message for CreateEventCreateRule RPC. +message CreateEventCreateRuleRequest { + // Required. Example format: properties/123/dataStreams/456 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/EventCreateRule" + } + ]; + + // Required. The EventCreateRule to create. + EventCreateRule event_create_rule = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for UpdateEventCreateRule RPC. +message UpdateEventCreateRuleRequest { + // Required. The EventCreateRule to update. + // The resource's `name` field is used to identify the EventCreateRule to be + // updated. + EventCreateRule event_create_rule = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to be updated. Field names must be in snake + // case (e.g., "field_to_update"). Omitted fields will not be updated. To + // replace the entire entity, use one path with the string "*" to match all + // fields. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteEventCreateRule RPC. +message DeleteEventCreateRuleRequest { + // Required. Example format: + // properties/123/dataStreams/456/eventCreateRules/789 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/EventCreateRule" + } + ]; +} + +// Request message for GetEventCreateRule RPC. +message GetEventCreateRuleRequest { + // Required. The name of the EventCreateRule to get. + // Example format: properties/123/dataStreams/456/eventCreateRules/789 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/EventCreateRule" + } + ]; +} + +// Request message for ListEventCreateRules RPC. +message ListEventCreateRulesRequest { + // Required. Example format: properties/123/dataStreams/456 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/EventCreateRule" + } + ]; + + // 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; + + // A page token, received from a previous `ListEventCreateRules` call. Provide + // this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListEventCreateRules` + // must match the call that provided the page token. + string page_token = 3; +} + +// Response message for ListEventCreateRules RPC. +message ListEventCreateRulesResponse { + // List of EventCreateRules. These will be ordered stably, but in an arbitrary + // order. + repeated EventCreateRule event_create_rules = 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; +} 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 775ecaa98ab..3478ce9dc8d 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 @@ -153,7 +153,12 @@ message AudienceDimensionOrMetricFilter { BetweenFilter between_filter = 5; } - // Required. Immutable. The dimension name or metric name to filter. + // Required. Immutable. The dimension name or metric name to filter. If the + // field name refers to a custom dimension or metric, a scope prefix will be + // added to the front of the custom dimensions or metric name. For more on + // scope prefixes or custom dimensions/metrics, reference the [Google + // Analytics Data API documentation] + // (https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#custom_dimensions). string field_name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = IMMUTABLE @@ -170,7 +175,7 @@ message AudienceDimensionOrMetricFilter { // Optional. If set, specifies the time window for which to evaluate data in // number of days. If not set, then audience data is evaluated against - // lifetime data (i.e., infinite time window). + // lifetime data (For example, infinite time window). // // For example, if set to 1 day, only the current day's data is evaluated. The // reference point is the current day when at_any_point_in_time is unset or @@ -193,7 +198,7 @@ message AudienceEventFilter { // Optional. If specified, this filter matches events that match both the // single event name and the parameter filter expressions. AudienceEventFilter - // inside the parameter filter expression cannot be set (i.e., nested + // inside the parameter filter expression cannot be set (For example, nested // event filters are not supported). This should be a single and_group of // dimension_or_metric_filter or not_expression; ANDs of ORs are not // supported. Also, if it includes a filter for "eventCount", only that one @@ -215,9 +220,9 @@ message AudienceFilterExpression { // AudienceFilterExpressions with and_group or or_group. AudienceFilterExpressionList or_group = 2; - // A filter expression to be NOT'ed (i.e., inverted, complemented). It - // can only include a dimension_or_metric_filter. This cannot be set on the - // top level AudienceFilterExpression. + // A filter expression to be NOT'ed (For example, inverted, complemented). + // It can only include a dimension_or_metric_filter. This cannot be set on + // the top level AudienceFilterExpression. AudienceFilterExpression not_expression = 3; // A filter on a single dimension or metric. This cannot be set on the top @@ -273,7 +278,7 @@ message AudienceSequenceFilter { bool immediately_follows = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. When set, this step must be satisfied within the - // constraint_duration of the previous step (i.e., t[i] - t[i-1] <= + // constraint_duration of the previous step (For example, t[i] - t[i-1] <= // constraint_duration). If not set, there is no duration requirement (the // duration is effectively unlimited). It is ignored for the first step. google.protobuf.Duration constraint_duration = 3 @@ -304,9 +309,9 @@ message AudienceSequenceFilter { } // A clause for defining either a simple or sequence filter. A filter can be -// inclusive (i.e., users satisfying the filter clause are included in the -// Audience) or exclusive (i.e., users satisfying the filter clause are -// excluded from the Audience). +// inclusive (For example, users satisfying the filter clause are included in +// the Audience) or exclusive (For example, users satisfying the filter clause +// are excluded from the Audience). message AudienceFilterClause { // Specifies whether this is an include or exclude filter clause. enum AudienceClauseType { 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 new file mode 100644 index 00000000000..bc8688e732f --- /dev/null +++ b/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/channel_group.proto @@ -0,0 +1,152 @@ +// Copyright 2023 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.analytics.admin.v1alpha; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option go_package = "cloud.google.com/go/analytics/admin/apiv1alpha/adminpb;adminpb"; +option java_multiple_files = true; +option java_outer_classname = "ChannelGroupProto"; +option java_package = "com.google.analytics.admin.v1alpha"; + +// A specific filter for a single dimension. +message ChannelGroupFilter { + // Filter where the field value is a String. The match is case insensitive. + message StringFilter { + // How the filter will be used to determine a match. + enum MatchType { + // Default match type. + MATCH_TYPE_UNSPECIFIED = 0; + + // Exact match of the string value. + EXACT = 1; + + // Begins with the string value. + BEGINS_WITH = 2; + + // Ends with the string value. + ENDS_WITH = 3; + + // Contains the string value. + CONTAINS = 4; + + // Full regular expression match with the string value. + FULL_REGEXP = 5; + + // Partial regular expression match with the string value. + PARTIAL_REGEXP = 6; + } + + // Required. The match type for the string filter. + MatchType match_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The string value to be matched against. + string value = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // A filter for a string dimension that matches a particular list of options. + // The match is case insensitive. + message InListFilter { + // Required. The list of possible string values to match against. Must be + // non-empty. + repeated string values = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // A StringFilter or InListFilter that defines this filters behavior. + oneof value_filter { + // A filter for a string-type dimension that matches a particular pattern. + StringFilter string_filter = 2; + + // A filter for a string dimension that matches a particular list of + // options. + InListFilter in_list_filter = 3; + } + + // Required. Immutable. The dimension name to filter. + string field_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; +} + +// A logical expression of Channel Group dimension filters. +message ChannelGroupFilterExpression { + // The expression applied to a filter. + oneof expr { + // A list of expressions to be AND’ed together. It can only contain + // ChannelGroupFilterExpressions with or_group. This must be set for the + // top level ChannelGroupFilterExpression. + ChannelGroupFilterExpressionList and_group = 1; + + // A list of expressions to OR’ed together. It cannot contain + // ChannelGroupFilterExpressions with and_group or or_group. + ChannelGroupFilterExpressionList or_group = 2; + + // A filter expression to be NOT'ed (that is inverted, complemented). It + // can only include a dimension_or_metric_filter. This cannot be set on the + // top level ChannelGroupFilterExpression. + ChannelGroupFilterExpression not_expression = 3; + + // A filter on a single dimension. This cannot be set on the top + // level ChannelGroupFilterExpression. + ChannelGroupFilter filter = 4; + } +} + +// A list of Channel Group filter expressions. +message ChannelGroupFilterExpressionList { + // A list of Channel Group filter expressions. + repeated ChannelGroupFilterExpression filter_expressions = 1; +} + +// The rules that govern how traffic is grouped into one channel. +message GroupingRule { + // Required. Customer defined display name for the channel. + string display_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Filter Expression that defines the Grouping Rule. + ChannelGroupFilterExpression expression = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// A resource message representing a Channel Group. +message ChannelGroup { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/ChannelGroup" + pattern: "properties/{property}/channelGroups/{channel_group}" + }; + + // Output only. The resource name for this Channel Group resource. + // Format: properties/{property}/channelGroups/{channel_group} + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The display name of the Channel Group. Max length of 80 + // characters. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // The description of the Channel Group. Max length of 256 characters. + string description = 3; + + // Required. The grouping rules of channels. Maximum number of rules is 25. + repeated GroupingRule grouping_rule = 4 + [(google.api.field_behavior) = REQUIRED]; + + // Output only. Default Channel Group defined by Google, which cannot be + // updated. + bool system_defined = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} 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 new file mode 100644 index 00000000000..9ff020f9899 --- /dev/null +++ b/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/event_create_and_edit.proto @@ -0,0 +1,162 @@ +// Copyright 2023 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.analytics.admin.v1alpha; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option go_package = "cloud.google.com/go/analytics/admin/apiv1alpha/adminpb;adminpb"; +option java_multiple_files = true; +option java_package = "com.google.analytics.admin.v1alpha"; + +// Defines an event parameter to mutate. +message ParameterMutation { + // Required. The name of the parameter to mutate. + // This value must: + // * be less than 40 characters. + // * be unique across across all mutations within the rule + // * consist only of letters, digits or _ (underscores) + // For event edit rules, the name may also be set to 'event_name' to modify + // the event_name in place. + string parameter = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The value mutation to perform. + // * Must be less than 100 characters. + // * To specify a constant value for the param, use the value's string. + // * To copy value from another parameter, use syntax like + // "[[other_parameter]]" For more details, see this [help center + // article](https://support.google.com/analytics/answer/10085872#modify-an-event&zippy=%2Cin-this-article%2Cmodify-parameters). + string parameter_value = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// An Event Create Rule defines conditions that will trigger the creation +// of an entirely new event based upon matched criteria of a source event. +// Additional mutations of the parameters from the source event can be defined. +// +// Unlike Event Edit rules, Event Creation Rules have no defined order. They +// will all be run independently. +// +// Event Edit and Event Create rules can't be used to modify an event created +// from an Event Create rule. +message EventCreateRule { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/EventCreateRule" + pattern: "properties/{property}/dataStreams/{data_stream}/eventCreateRules/{event_create_rule}" + }; + + // Output only. Resource name for this EventCreateRule resource. + // Format: + // properties/{property}/dataStreams/{data_stream}/eventCreateRules/{event_create_rule} + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The name of the new event to be created. + // + // This value must: + // * be less than 40 characters + // * consist only of letters, digits or _ (underscores) + // * start with a letter + string destination_event = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Must have at least one condition, and can have up to 10 max. + // Conditions on the source event must match for this rule to be applied. + repeated MatchingCondition event_conditions = 3 + [(google.api.field_behavior) = REQUIRED]; + + // If true, the source parameters are copied to the new event. + // If false, or unset, all non-internal parameters are not copied from the + // source event. Parameter mutations are applied after the parameters have + // been copied. + bool source_copy_parameters = 4; + + // Parameter mutations define parameter behavior on the new event, and + // are applied in order. + // A maximum of 20 mutations can be applied. + repeated ParameterMutation parameter_mutations = 5; +} + +// Defines a condition for when an Event Edit or Event Creation rule applies to +// an event. +message MatchingCondition { + // Comparison type for matching condition + enum ComparisonType { + // Unknown + COMPARISON_TYPE_UNSPECIFIED = 0; + + // Equals, case sensitive + EQUALS = 1; + + // Equals, case insensitive + EQUALS_CASE_INSENSITIVE = 2; + + // Contains, case sensitive + CONTAINS = 3; + + // Contains, case insensitive + CONTAINS_CASE_INSENSITIVE = 4; + + // Starts with, case sensitive + STARTS_WITH = 5; + + // Starts with, case insensitive + STARTS_WITH_CASE_INSENSITIVE = 6; + + // Ends with, case sensitive + ENDS_WITH = 7; + + // Ends with, case insensitive + ENDS_WITH_CASE_INSENSITIVE = 8; + + // Greater than + GREATER_THAN = 9; + + // Greater than or equal + GREATER_THAN_OR_EQUAL = 10; + + // Less than + LESS_THAN = 11; + + // Less than or equal + LESS_THAN_OR_EQUAL = 12; + + // regular expression. Only supported for web streams. + REGULAR_EXPRESSION = 13; + + // regular expression, case insensitive. Only supported for web streams. + REGULAR_EXPRESSION_CASE_INSENSITIVE = 14; + } + + // Required. The name of the field that is compared against for the condition. + // If 'event_name' is specified this condition will apply to the name of the + // event. Otherwise the condition will apply to a parameter with the + // specified name. + // + // This value cannot contain spaces. + string field = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The type of comparison to be applied to the value. + ComparisonType comparison_type = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The value being compared against for this condition. The runtime + // implementation may perform type coercion of this value to evaluate this + // condition based on the type of the parameter value. + string value = 3 [(google.api.field_behavior) = REQUIRED]; + + // Whether or not the result of the comparison should be negated. For example, + // if `negated` is true, then 'equals' comparisons would function as 'not + // equals'. + bool negated = 4; +} 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 baaefb1a2b7..be98ac8a469 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 @@ -90,7 +90,7 @@ message ExpandedDataSetFilterExpression { // ExpandedDataSetFilterExpression. ExpandedDataSetFilterExpressionList and_group = 1; - // A filter expression to be NOT'ed (i.e., inverted, complemented). It + // A filter expression to be NOT'ed (that is, inverted, complemented). It // must include a dimension_filter. This cannot be set on the // top level ExpandedDataSetFilterExpression. ExpandedDataSetFilterExpression not_expression = 2; @@ -140,7 +140,7 @@ message ExpandedDataSet { // Immutable. A logical expression of ExpandedDataSet filters applied to // dimension included in the ExpandedDataSet. This filter is used to reduce - // the number of rows and thus the change of encountering `other row`. + // the number of rows and thus the chance of encountering `other` row. ExpandedDataSetFilterExpression dimension_filter_expression = 6 [(google.api.field_behavior) = IMMUTABLE]; 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 741dba41dc7..d4f9101cae6 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 @@ -16,6 +16,9 @@ syntax = "proto3"; package google.analytics.admin.v1alpha; +import "google/analytics/admin/v1alpha/audience.proto"; +import "google/analytics/admin/v1alpha/channel_group.proto"; +import "google/analytics/admin/v1alpha/event_create_and_edit.proto"; import "google/analytics/admin/v1alpha/expanded_data_set.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; @@ -212,6 +215,15 @@ enum ChangeHistoryResourceType { // EnhancedMeasurementSettings resource ENHANCED_MEASUREMENT_SETTINGS = 24; + + // AdSenseLink resource + ADSENSE_LINK = 27; + + // Audience resource + AUDIENCE = 28; + + // EventCreateRule resource + EVENT_CREATE_RULE = 29; } // Status of the Google Signals settings. @@ -848,11 +860,23 @@ message ChangeHistoryChange { // A snapshot of an ExpandedDataSet resource in change history. ExpandedDataSet expanded_data_set = 21; + // A snapshot of a ChannelGroup resource in change history. + ChannelGroup channel_group = 22; + // A snapshot of a BigQuery link resource in change history. BigQueryLink bigquery_link = 23; // A snapshot of EnhancedMeasurementSettings resource in change history. EnhancedMeasurementSettings enhanced_measurement_settings = 24; + + // A snapshot of an AdSenseLink resource in change history. + AdSenseLink adsense_link = 27; + + // A snapshot of an Audience resource in change history. + Audience audience = 28; + + // A snapshot of an EventCreateRule resource in change history. + EventCreateRule event_create_rule = 29; } } @@ -1096,6 +1120,9 @@ message CustomDimension { // Dimension scoped to a user. USER = 2; + + // Dimension scoped to eCommerce items + ITEM = 3; } // Output only. Resource name for this CustomDimension resource. @@ -1108,6 +1135,9 @@ message CustomDimension { // If this is an event-scoped dimension, then this is the event parameter // name. // + // If this is an item-scoped dimension, then this is the parameter + // name found in the eCommerce items array. + // // May only contain alphanumeric and underscore characters, starting with a // letter. Max length of 24 characters for user-scoped dimensions, 40 // characters for event-scoped dimensions. @@ -1553,3 +1583,20 @@ message ConnectedSiteTag { // or the "G-ID" (For example: G-12345). string tag_id = 2 [(google.api.field_behavior) = REQUIRED]; } + +// A link between a GA4 Property and an AdSense for Content ad client. +message AdSenseLink { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/AdSenseLink" + pattern: "properties/{property}/adSenseLinks/{adsense_link}" + }; + + // Output only. The resource name for this AdSense Link resource. + // Format: properties/{propertyId}/adSenseLinks/{linkId} + // Example: properties/1234/adSenseLinks/6789 + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The AdSense ad client code that the GA4 property is linked to. + // Example format: "ca-pub-1234567890" + string ad_client_code = 2 [(google.api.field_behavior) = IMMUTABLE]; +} diff --git a/packages/google-analytics-admin/protos/protos.d.ts b/packages/google-analytics-admin/protos/protos.d.ts index 1e67a25ac9b..cd7f6b230e2 100644 --- a/packages/google-analytics-admin/protos/protos.d.ts +++ b/packages/google-analytics-admin/protos/protos.d.ts @@ -3646,6 +3646,76 @@ export namespace google { */ public deleteExpandedDataSet(request: google.analytics.admin.v1alpha.IDeleteExpandedDataSetRequest): Promise; + /** + * Calls GetChannelGroup. + * @param request GetChannelGroupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ChannelGroup + */ + public getChannelGroup(request: google.analytics.admin.v1alpha.IGetChannelGroupRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.GetChannelGroupCallback): void; + + /** + * Calls GetChannelGroup. + * @param request GetChannelGroupRequest message or plain object + * @returns Promise + */ + public getChannelGroup(request: google.analytics.admin.v1alpha.IGetChannelGroupRequest): Promise; + + /** + * Calls ListChannelGroups. + * @param request ListChannelGroupsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListChannelGroupsResponse + */ + public listChannelGroups(request: google.analytics.admin.v1alpha.IListChannelGroupsRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.ListChannelGroupsCallback): void; + + /** + * Calls ListChannelGroups. + * @param request ListChannelGroupsRequest message or plain object + * @returns Promise + */ + public listChannelGroups(request: google.analytics.admin.v1alpha.IListChannelGroupsRequest): Promise; + + /** + * Calls CreateChannelGroup. + * @param request CreateChannelGroupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ChannelGroup + */ + public createChannelGroup(request: google.analytics.admin.v1alpha.ICreateChannelGroupRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateChannelGroupCallback): void; + + /** + * Calls CreateChannelGroup. + * @param request CreateChannelGroupRequest message or plain object + * @returns Promise + */ + public createChannelGroup(request: google.analytics.admin.v1alpha.ICreateChannelGroupRequest): Promise; + + /** + * Calls UpdateChannelGroup. + * @param request UpdateChannelGroupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ChannelGroup + */ + public updateChannelGroup(request: google.analytics.admin.v1alpha.IUpdateChannelGroupRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateChannelGroupCallback): void; + + /** + * Calls UpdateChannelGroup. + * @param request UpdateChannelGroupRequest message or plain object + * @returns Promise + */ + public updateChannelGroup(request: google.analytics.admin.v1alpha.IUpdateChannelGroupRequest): Promise; + + /** + * Calls DeleteChannelGroup. + * @param request DeleteChannelGroupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteChannelGroup(request: google.analytics.admin.v1alpha.IDeleteChannelGroupRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteChannelGroupCallback): void; + + /** + * Calls DeleteChannelGroup. + * @param request DeleteChannelGroupRequest message or plain object + * @returns Promise + */ + public deleteChannelGroup(request: google.analytics.admin.v1alpha.IDeleteChannelGroupRequest): Promise; + /** * Calls SetAutomatedGa4ConfigurationOptOut. * @param request SetAutomatedGa4ConfigurationOptOutRequest message or plain object @@ -3771,6 +3841,146 @@ export namespace google { * @returns Promise */ public listConnectedSiteTags(request: google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest): Promise; + + /** + * Calls FetchConnectedGa4Property. + * @param request FetchConnectedGa4PropertyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchConnectedGa4PropertyResponse + */ + public fetchConnectedGa4Property(request: google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.FetchConnectedGa4PropertyCallback): void; + + /** + * Calls FetchConnectedGa4Property. + * @param request FetchConnectedGa4PropertyRequest message or plain object + * @returns Promise + */ + public fetchConnectedGa4Property(request: google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyRequest): Promise; + + /** + * Calls GetAdSenseLink. + * @param request GetAdSenseLinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AdSenseLink + */ + public getAdSenseLink(request: google.analytics.admin.v1alpha.IGetAdSenseLinkRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.GetAdSenseLinkCallback): void; + + /** + * Calls GetAdSenseLink. + * @param request GetAdSenseLinkRequest message or plain object + * @returns Promise + */ + public getAdSenseLink(request: google.analytics.admin.v1alpha.IGetAdSenseLinkRequest): Promise; + + /** + * Calls CreateAdSenseLink. + * @param request CreateAdSenseLinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AdSenseLink + */ + public createAdSenseLink(request: google.analytics.admin.v1alpha.ICreateAdSenseLinkRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateAdSenseLinkCallback): void; + + /** + * Calls CreateAdSenseLink. + * @param request CreateAdSenseLinkRequest message or plain object + * @returns Promise + */ + public createAdSenseLink(request: google.analytics.admin.v1alpha.ICreateAdSenseLinkRequest): Promise; + + /** + * Calls DeleteAdSenseLink. + * @param request DeleteAdSenseLinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteAdSenseLink(request: google.analytics.admin.v1alpha.IDeleteAdSenseLinkRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteAdSenseLinkCallback): void; + + /** + * Calls DeleteAdSenseLink. + * @param request DeleteAdSenseLinkRequest message or plain object + * @returns Promise + */ + public deleteAdSenseLink(request: google.analytics.admin.v1alpha.IDeleteAdSenseLinkRequest): Promise; + + /** + * Calls ListAdSenseLinks. + * @param request ListAdSenseLinksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAdSenseLinksResponse + */ + public listAdSenseLinks(request: google.analytics.admin.v1alpha.IListAdSenseLinksRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.ListAdSenseLinksCallback): void; + + /** + * Calls ListAdSenseLinks. + * @param request ListAdSenseLinksRequest message or plain object + * @returns Promise + */ + public listAdSenseLinks(request: google.analytics.admin.v1alpha.IListAdSenseLinksRequest): Promise; + + /** + * Calls GetEventCreateRule. + * @param request GetEventCreateRuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EventCreateRule + */ + public getEventCreateRule(request: google.analytics.admin.v1alpha.IGetEventCreateRuleRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.GetEventCreateRuleCallback): void; + + /** + * Calls GetEventCreateRule. + * @param request GetEventCreateRuleRequest message or plain object + * @returns Promise + */ + public getEventCreateRule(request: google.analytics.admin.v1alpha.IGetEventCreateRuleRequest): Promise; + + /** + * Calls ListEventCreateRules. + * @param request ListEventCreateRulesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListEventCreateRulesResponse + */ + public listEventCreateRules(request: google.analytics.admin.v1alpha.IListEventCreateRulesRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.ListEventCreateRulesCallback): void; + + /** + * Calls ListEventCreateRules. + * @param request ListEventCreateRulesRequest message or plain object + * @returns Promise + */ + public listEventCreateRules(request: google.analytics.admin.v1alpha.IListEventCreateRulesRequest): Promise; + + /** + * Calls CreateEventCreateRule. + * @param request CreateEventCreateRuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EventCreateRule + */ + public createEventCreateRule(request: google.analytics.admin.v1alpha.ICreateEventCreateRuleRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateEventCreateRuleCallback): void; + + /** + * Calls CreateEventCreateRule. + * @param request CreateEventCreateRuleRequest message or plain object + * @returns Promise + */ + public createEventCreateRule(request: google.analytics.admin.v1alpha.ICreateEventCreateRuleRequest): Promise; + + /** + * Calls UpdateEventCreateRule. + * @param request UpdateEventCreateRuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EventCreateRule + */ + public updateEventCreateRule(request: google.analytics.admin.v1alpha.IUpdateEventCreateRuleRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateEventCreateRuleCallback): void; + + /** + * Calls UpdateEventCreateRule. + * @param request UpdateEventCreateRuleRequest message or plain object + * @returns Promise + */ + public updateEventCreateRule(request: google.analytics.admin.v1alpha.IUpdateEventCreateRuleRequest): Promise; + + /** + * Calls DeleteEventCreateRule. + * @param request DeleteEventCreateRuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteEventCreateRule(request: google.analytics.admin.v1alpha.IDeleteEventCreateRuleRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteEventCreateRuleCallback): void; + + /** + * Calls DeleteEventCreateRule. + * @param request DeleteEventCreateRuleRequest message or plain object + * @returns Promise + */ + public deleteEventCreateRule(request: google.analytics.admin.v1alpha.IDeleteEventCreateRuleRequest): Promise; } namespace AnalyticsAdminService { @@ -4461,6 +4671,41 @@ export namespace google { */ type DeleteExpandedDataSetCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getChannelGroup}. + * @param error Error, if any + * @param [response] ChannelGroup + */ + type GetChannelGroupCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.ChannelGroup) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listChannelGroups}. + * @param error Error, if any + * @param [response] ListChannelGroupsResponse + */ + type ListChannelGroupsCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.ListChannelGroupsResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|createChannelGroup}. + * @param error Error, if any + * @param [response] ChannelGroup + */ + type CreateChannelGroupCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.ChannelGroup) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|updateChannelGroup}. + * @param error Error, if any + * @param [response] ChannelGroup + */ + type UpdateChannelGroupCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.ChannelGroup) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|deleteChannelGroup}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteChannelGroupCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + /** * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|setAutomatedGa4ConfigurationOptOut}. * @param error Error, if any @@ -4523,6 +4768,76 @@ export namespace google { * @param [response] ListConnectedSiteTagsResponse */ type ListConnectedSiteTagsCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|fetchConnectedGa4Property}. + * @param error Error, if any + * @param [response] FetchConnectedGa4PropertyResponse + */ + type FetchConnectedGa4PropertyCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getAdSenseLink}. + * @param error Error, if any + * @param [response] AdSenseLink + */ + type GetAdSenseLinkCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.AdSenseLink) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|createAdSenseLink}. + * @param error Error, if any + * @param [response] AdSenseLink + */ + type CreateAdSenseLinkCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.AdSenseLink) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|deleteAdSenseLink}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteAdSenseLinkCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listAdSenseLinks}. + * @param error Error, if any + * @param [response] ListAdSenseLinksResponse + */ + type ListAdSenseLinksCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.ListAdSenseLinksResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getEventCreateRule}. + * @param error Error, if any + * @param [response] EventCreateRule + */ + type GetEventCreateRuleCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.EventCreateRule) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listEventCreateRules}. + * @param error Error, if any + * @param [response] ListEventCreateRulesResponse + */ + type ListEventCreateRulesCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.ListEventCreateRulesResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|createEventCreateRule}. + * @param error Error, if any + * @param [response] EventCreateRule + */ + type CreateEventCreateRuleCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.EventCreateRule) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|updateEventCreateRule}. + * @param error Error, if any + * @param [response] EventCreateRule + */ + type UpdateEventCreateRuleCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.EventCreateRule) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|deleteEventCreateRule}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteEventCreateRuleCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; } /** Properties of a RunAccessReportRequest. */ @@ -17540,2082 +17855,5376 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SetAutomatedGa4ConfigurationOptOutRequest. */ - interface ISetAutomatedGa4ConfigurationOptOutRequest { + /** Properties of a CreateChannelGroupRequest. */ + interface ICreateChannelGroupRequest { - /** SetAutomatedGa4ConfigurationOptOutRequest property */ - property?: (string|null); + /** CreateChannelGroupRequest parent */ + parent?: (string|null); - /** SetAutomatedGa4ConfigurationOptOutRequest optOut */ - optOut?: (boolean|null); + /** CreateChannelGroupRequest channelGroup */ + channelGroup?: (google.analytics.admin.v1alpha.IChannelGroup|null); } - /** Represents a SetAutomatedGa4ConfigurationOptOutRequest. */ - class SetAutomatedGa4ConfigurationOptOutRequest implements ISetAutomatedGa4ConfigurationOptOutRequest { + /** Represents a CreateChannelGroupRequest. */ + class CreateChannelGroupRequest implements ICreateChannelGroupRequest { /** - * Constructs a new SetAutomatedGa4ConfigurationOptOutRequest. + * Constructs a new CreateChannelGroupRequest. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest); + constructor(properties?: google.analytics.admin.v1alpha.ICreateChannelGroupRequest); - /** SetAutomatedGa4ConfigurationOptOutRequest property. */ - public property: string; + /** CreateChannelGroupRequest parent. */ + public parent: string; - /** SetAutomatedGa4ConfigurationOptOutRequest optOut. */ - public optOut: boolean; + /** CreateChannelGroupRequest channelGroup. */ + public channelGroup?: (google.analytics.admin.v1alpha.IChannelGroup|null); /** - * Creates a new SetAutomatedGa4ConfigurationOptOutRequest instance using the specified properties. + * Creates a new CreateChannelGroupRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SetAutomatedGa4ConfigurationOptOutRequest instance + * @returns CreateChannelGroupRequest instance */ - public static create(properties?: google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest): google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest; + public static create(properties?: google.analytics.admin.v1alpha.ICreateChannelGroupRequest): google.analytics.admin.v1alpha.CreateChannelGroupRequest; /** - * Encodes the specified SetAutomatedGa4ConfigurationOptOutRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest.verify|verify} messages. - * @param message SetAutomatedGa4ConfigurationOptOutRequest message or plain object to encode + * Encodes the specified CreateChannelGroupRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateChannelGroupRequest.verify|verify} messages. + * @param message CreateChannelGroupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.ICreateChannelGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SetAutomatedGa4ConfigurationOptOutRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest.verify|verify} messages. - * @param message SetAutomatedGa4ConfigurationOptOutRequest message or plain object to encode + * Encodes the specified CreateChannelGroupRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateChannelGroupRequest.verify|verify} messages. + * @param message CreateChannelGroupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.ICreateChannelGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SetAutomatedGa4ConfigurationOptOutRequest message from the specified reader or buffer. + * Decodes a CreateChannelGroupRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SetAutomatedGa4ConfigurationOptOutRequest + * @returns CreateChannelGroupRequest * @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.SetAutomatedGa4ConfigurationOptOutRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.CreateChannelGroupRequest; /** - * Decodes a SetAutomatedGa4ConfigurationOptOutRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateChannelGroupRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SetAutomatedGa4ConfigurationOptOutRequest + * @returns CreateChannelGroupRequest * @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.SetAutomatedGa4ConfigurationOptOutRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.CreateChannelGroupRequest; /** - * Verifies a SetAutomatedGa4ConfigurationOptOutRequest message. + * Verifies a CreateChannelGroupRequest 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 SetAutomatedGa4ConfigurationOptOutRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateChannelGroupRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SetAutomatedGa4ConfigurationOptOutRequest + * @returns CreateChannelGroupRequest */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.CreateChannelGroupRequest; /** - * Creates a plain object from a SetAutomatedGa4ConfigurationOptOutRequest message. Also converts values to other types if specified. - * @param message SetAutomatedGa4ConfigurationOptOutRequest + * Creates a plain object from a CreateChannelGroupRequest message. Also converts values to other types if specified. + * @param message CreateChannelGroupRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.CreateChannelGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SetAutomatedGa4ConfigurationOptOutRequest to JSON. + * Converts this CreateChannelGroupRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SetAutomatedGa4ConfigurationOptOutRequest + * Gets the default type url for CreateChannelGroupRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SetAutomatedGa4ConfigurationOptOutResponse. */ - interface ISetAutomatedGa4ConfigurationOptOutResponse { + /** Properties of an UpdateChannelGroupRequest. */ + interface IUpdateChannelGroupRequest { + + /** UpdateChannelGroupRequest channelGroup */ + channelGroup?: (google.analytics.admin.v1alpha.IChannelGroup|null); + + /** UpdateChannelGroupRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a SetAutomatedGa4ConfigurationOptOutResponse. */ - class SetAutomatedGa4ConfigurationOptOutResponse implements ISetAutomatedGa4ConfigurationOptOutResponse { + /** Represents an UpdateChannelGroupRequest. */ + class UpdateChannelGroupRequest implements IUpdateChannelGroupRequest { /** - * Constructs a new SetAutomatedGa4ConfigurationOptOutResponse. + * Constructs a new UpdateChannelGroupRequest. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse); + constructor(properties?: google.analytics.admin.v1alpha.IUpdateChannelGroupRequest); + + /** UpdateChannelGroupRequest channelGroup. */ + public channelGroup?: (google.analytics.admin.v1alpha.IChannelGroup|null); + + /** UpdateChannelGroupRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new SetAutomatedGa4ConfigurationOptOutResponse instance using the specified properties. + * Creates a new UpdateChannelGroupRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SetAutomatedGa4ConfigurationOptOutResponse instance + * @returns UpdateChannelGroupRequest instance */ - public static create(properties?: google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse): google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse; + public static create(properties?: google.analytics.admin.v1alpha.IUpdateChannelGroupRequest): google.analytics.admin.v1alpha.UpdateChannelGroupRequest; /** - * Encodes the specified SetAutomatedGa4ConfigurationOptOutResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse.verify|verify} messages. - * @param message SetAutomatedGa4ConfigurationOptOutResponse message or plain object to encode + * Encodes the specified UpdateChannelGroupRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateChannelGroupRequest.verify|verify} messages. + * @param message UpdateChannelGroupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IUpdateChannelGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SetAutomatedGa4ConfigurationOptOutResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse.verify|verify} messages. - * @param message SetAutomatedGa4ConfigurationOptOutResponse message or plain object to encode + * Encodes the specified UpdateChannelGroupRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateChannelGroupRequest.verify|verify} messages. + * @param message UpdateChannelGroupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IUpdateChannelGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SetAutomatedGa4ConfigurationOptOutResponse message from the specified reader or buffer. + * Decodes an UpdateChannelGroupRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SetAutomatedGa4ConfigurationOptOutResponse + * @returns UpdateChannelGroupRequest * @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.SetAutomatedGa4ConfigurationOptOutResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.UpdateChannelGroupRequest; /** - * Decodes a SetAutomatedGa4ConfigurationOptOutResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateChannelGroupRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SetAutomatedGa4ConfigurationOptOutResponse + * @returns UpdateChannelGroupRequest * @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.SetAutomatedGa4ConfigurationOptOutResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.UpdateChannelGroupRequest; /** - * Verifies a SetAutomatedGa4ConfigurationOptOutResponse message. + * Verifies an UpdateChannelGroupRequest 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 SetAutomatedGa4ConfigurationOptOutResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateChannelGroupRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SetAutomatedGa4ConfigurationOptOutResponse + * @returns UpdateChannelGroupRequest */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.UpdateChannelGroupRequest; /** - * Creates a plain object from a SetAutomatedGa4ConfigurationOptOutResponse message. Also converts values to other types if specified. - * @param message SetAutomatedGa4ConfigurationOptOutResponse + * Creates a plain object from an UpdateChannelGroupRequest message. Also converts values to other types if specified. + * @param message UpdateChannelGroupRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.UpdateChannelGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SetAutomatedGa4ConfigurationOptOutResponse to JSON. + * Converts this UpdateChannelGroupRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SetAutomatedGa4ConfigurationOptOutResponse + * Gets the default type url for UpdateChannelGroupRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FetchAutomatedGa4ConfigurationOptOutRequest. */ - interface IFetchAutomatedGa4ConfigurationOptOutRequest { + /** Properties of a DeleteChannelGroupRequest. */ + interface IDeleteChannelGroupRequest { - /** FetchAutomatedGa4ConfigurationOptOutRequest property */ - property?: (string|null); + /** DeleteChannelGroupRequest name */ + name?: (string|null); } - /** Represents a FetchAutomatedGa4ConfigurationOptOutRequest. */ - class FetchAutomatedGa4ConfigurationOptOutRequest implements IFetchAutomatedGa4ConfigurationOptOutRequest { + /** Represents a DeleteChannelGroupRequest. */ + class DeleteChannelGroupRequest implements IDeleteChannelGroupRequest { /** - * Constructs a new FetchAutomatedGa4ConfigurationOptOutRequest. + * Constructs a new DeleteChannelGroupRequest. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest); + constructor(properties?: google.analytics.admin.v1alpha.IDeleteChannelGroupRequest); - /** FetchAutomatedGa4ConfigurationOptOutRequest property. */ - public property: string; + /** DeleteChannelGroupRequest name. */ + public name: string; /** - * Creates a new FetchAutomatedGa4ConfigurationOptOutRequest instance using the specified properties. + * Creates a new DeleteChannelGroupRequest instance using the specified properties. * @param [properties] Properties to set - * @returns FetchAutomatedGa4ConfigurationOptOutRequest instance + * @returns DeleteChannelGroupRequest instance */ - public static create(properties?: google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest): google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest; + public static create(properties?: google.analytics.admin.v1alpha.IDeleteChannelGroupRequest): google.analytics.admin.v1alpha.DeleteChannelGroupRequest; /** - * Encodes the specified FetchAutomatedGa4ConfigurationOptOutRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest.verify|verify} messages. - * @param message FetchAutomatedGa4ConfigurationOptOutRequest message or plain object to encode + * Encodes the specified DeleteChannelGroupRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteChannelGroupRequest.verify|verify} messages. + * @param message DeleteChannelGroupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IDeleteChannelGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FetchAutomatedGa4ConfigurationOptOutRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest.verify|verify} messages. - * @param message FetchAutomatedGa4ConfigurationOptOutRequest message or plain object to encode + * Encodes the specified DeleteChannelGroupRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteChannelGroupRequest.verify|verify} messages. + * @param message DeleteChannelGroupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IDeleteChannelGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FetchAutomatedGa4ConfigurationOptOutRequest message from the specified reader or buffer. + * Decodes a DeleteChannelGroupRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FetchAutomatedGa4ConfigurationOptOutRequest + * @returns DeleteChannelGroupRequest * @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.FetchAutomatedGa4ConfigurationOptOutRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DeleteChannelGroupRequest; /** - * Decodes a FetchAutomatedGa4ConfigurationOptOutRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteChannelGroupRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FetchAutomatedGa4ConfigurationOptOutRequest + * @returns DeleteChannelGroupRequest * @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.FetchAutomatedGa4ConfigurationOptOutRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DeleteChannelGroupRequest; /** - * Verifies a FetchAutomatedGa4ConfigurationOptOutRequest message. + * Verifies a DeleteChannelGroupRequest 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 FetchAutomatedGa4ConfigurationOptOutRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteChannelGroupRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FetchAutomatedGa4ConfigurationOptOutRequest + * @returns DeleteChannelGroupRequest */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DeleteChannelGroupRequest; /** - * Creates a plain object from a FetchAutomatedGa4ConfigurationOptOutRequest message. Also converts values to other types if specified. - * @param message FetchAutomatedGa4ConfigurationOptOutRequest + * Creates a plain object from a DeleteChannelGroupRequest message. Also converts values to other types if specified. + * @param message DeleteChannelGroupRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.DeleteChannelGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FetchAutomatedGa4ConfigurationOptOutRequest to JSON. + * Converts this DeleteChannelGroupRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FetchAutomatedGa4ConfigurationOptOutRequest + * Gets the default type url for DeleteChannelGroupRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FetchAutomatedGa4ConfigurationOptOutResponse. */ - interface IFetchAutomatedGa4ConfigurationOptOutResponse { + /** Properties of a GetChannelGroupRequest. */ + interface IGetChannelGroupRequest { - /** FetchAutomatedGa4ConfigurationOptOutResponse optOut */ - optOut?: (boolean|null); + /** GetChannelGroupRequest name */ + name?: (string|null); } - /** Represents a FetchAutomatedGa4ConfigurationOptOutResponse. */ - class FetchAutomatedGa4ConfigurationOptOutResponse implements IFetchAutomatedGa4ConfigurationOptOutResponse { + /** Represents a GetChannelGroupRequest. */ + class GetChannelGroupRequest implements IGetChannelGroupRequest { /** - * Constructs a new FetchAutomatedGa4ConfigurationOptOutResponse. + * Constructs a new GetChannelGroupRequest. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse); + constructor(properties?: google.analytics.admin.v1alpha.IGetChannelGroupRequest); - /** FetchAutomatedGa4ConfigurationOptOutResponse optOut. */ - public optOut: boolean; + /** GetChannelGroupRequest name. */ + public name: string; /** - * Creates a new FetchAutomatedGa4ConfigurationOptOutResponse instance using the specified properties. + * Creates a new GetChannelGroupRequest instance using the specified properties. * @param [properties] Properties to set - * @returns FetchAutomatedGa4ConfigurationOptOutResponse instance + * @returns GetChannelGroupRequest instance */ - public static create(properties?: google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse): google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse; + public static create(properties?: google.analytics.admin.v1alpha.IGetChannelGroupRequest): google.analytics.admin.v1alpha.GetChannelGroupRequest; /** - * Encodes the specified FetchAutomatedGa4ConfigurationOptOutResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse.verify|verify} messages. - * @param message FetchAutomatedGa4ConfigurationOptOutResponse message or plain object to encode + * Encodes the specified GetChannelGroupRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetChannelGroupRequest.verify|verify} messages. + * @param message GetChannelGroupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IGetChannelGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FetchAutomatedGa4ConfigurationOptOutResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse.verify|verify} messages. - * @param message FetchAutomatedGa4ConfigurationOptOutResponse message or plain object to encode + * Encodes the specified GetChannelGroupRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetChannelGroupRequest.verify|verify} messages. + * @param message GetChannelGroupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IGetChannelGroupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FetchAutomatedGa4ConfigurationOptOutResponse message from the specified reader or buffer. + * Decodes a GetChannelGroupRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FetchAutomatedGa4ConfigurationOptOutResponse + * @returns GetChannelGroupRequest * @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.FetchAutomatedGa4ConfigurationOptOutResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.GetChannelGroupRequest; /** - * Decodes a FetchAutomatedGa4ConfigurationOptOutResponse message from the specified reader or buffer, length delimited. + * Decodes a GetChannelGroupRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FetchAutomatedGa4ConfigurationOptOutResponse + * @returns GetChannelGroupRequest * @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.FetchAutomatedGa4ConfigurationOptOutResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.GetChannelGroupRequest; /** - * Verifies a FetchAutomatedGa4ConfigurationOptOutResponse message. + * Verifies a GetChannelGroupRequest 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 FetchAutomatedGa4ConfigurationOptOutResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetChannelGroupRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FetchAutomatedGa4ConfigurationOptOutResponse + * @returns GetChannelGroupRequest */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GetChannelGroupRequest; /** - * Creates a plain object from a FetchAutomatedGa4ConfigurationOptOutResponse message. Also converts values to other types if specified. - * @param message FetchAutomatedGa4ConfigurationOptOutResponse + * Creates a plain object from a GetChannelGroupRequest message. Also converts values to other types if specified. + * @param message GetChannelGroupRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.GetChannelGroupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FetchAutomatedGa4ConfigurationOptOutResponse to JSON. + * Converts this GetChannelGroupRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FetchAutomatedGa4ConfigurationOptOutResponse + * Gets the default type url for GetChannelGroupRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetBigQueryLinkRequest. */ - interface IGetBigQueryLinkRequest { + /** Properties of a ListChannelGroupsRequest. */ + interface IListChannelGroupsRequest { - /** GetBigQueryLinkRequest name */ - name?: (string|null); + /** ListChannelGroupsRequest parent */ + parent?: (string|null); + + /** ListChannelGroupsRequest pageSize */ + pageSize?: (number|null); + + /** ListChannelGroupsRequest pageToken */ + pageToken?: (string|null); } - /** Represents a GetBigQueryLinkRequest. */ - class GetBigQueryLinkRequest implements IGetBigQueryLinkRequest { + /** Represents a ListChannelGroupsRequest. */ + class ListChannelGroupsRequest implements IListChannelGroupsRequest { /** - * Constructs a new GetBigQueryLinkRequest. + * Constructs a new ListChannelGroupsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IGetBigQueryLinkRequest); + constructor(properties?: google.analytics.admin.v1alpha.IListChannelGroupsRequest); - /** GetBigQueryLinkRequest name. */ - public name: string; + /** ListChannelGroupsRequest parent. */ + public parent: string; + + /** ListChannelGroupsRequest pageSize. */ + public pageSize: number; + + /** ListChannelGroupsRequest pageToken. */ + public pageToken: string; /** - * Creates a new GetBigQueryLinkRequest instance using the specified properties. + * Creates a new ListChannelGroupsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetBigQueryLinkRequest instance + * @returns ListChannelGroupsRequest instance */ - public static create(properties?: google.analytics.admin.v1alpha.IGetBigQueryLinkRequest): google.analytics.admin.v1alpha.GetBigQueryLinkRequest; + public static create(properties?: google.analytics.admin.v1alpha.IListChannelGroupsRequest): google.analytics.admin.v1alpha.ListChannelGroupsRequest; /** - * Encodes the specified GetBigQueryLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetBigQueryLinkRequest.verify|verify} messages. - * @param message GetBigQueryLinkRequest message or plain object to encode + * Encodes the specified ListChannelGroupsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListChannelGroupsRequest.verify|verify} messages. + * @param message ListChannelGroupsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IGetBigQueryLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IListChannelGroupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetBigQueryLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetBigQueryLinkRequest.verify|verify} messages. - * @param message GetBigQueryLinkRequest message or plain object to encode + * Encodes the specified ListChannelGroupsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListChannelGroupsRequest.verify|verify} messages. + * @param message ListChannelGroupsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IGetBigQueryLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListChannelGroupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetBigQueryLinkRequest message from the specified reader or buffer. + * Decodes a ListChannelGroupsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetBigQueryLinkRequest + * @returns ListChannelGroupsRequest * @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.GetBigQueryLinkRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListChannelGroupsRequest; /** - * Decodes a GetBigQueryLinkRequest message from the specified reader or buffer, length delimited. + * Decodes a ListChannelGroupsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetBigQueryLinkRequest + * @returns ListChannelGroupsRequest * @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.GetBigQueryLinkRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListChannelGroupsRequest; /** - * Verifies a GetBigQueryLinkRequest message. + * Verifies a ListChannelGroupsRequest 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 GetBigQueryLinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListChannelGroupsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetBigQueryLinkRequest + * @returns ListChannelGroupsRequest */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GetBigQueryLinkRequest; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListChannelGroupsRequest; /** - * Creates a plain object from a GetBigQueryLinkRequest message. Also converts values to other types if specified. - * @param message GetBigQueryLinkRequest + * Creates a plain object from a ListChannelGroupsRequest message. Also converts values to other types if specified. + * @param message ListChannelGroupsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.GetBigQueryLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.ListChannelGroupsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetBigQueryLinkRequest to JSON. + * Converts this ListChannelGroupsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetBigQueryLinkRequest + * Gets the default type url for ListChannelGroupsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListBigQueryLinksRequest. */ - interface IListBigQueryLinksRequest { - - /** ListBigQueryLinksRequest parent */ - parent?: (string|null); + /** Properties of a ListChannelGroupsResponse. */ + interface IListChannelGroupsResponse { - /** ListBigQueryLinksRequest pageSize */ - pageSize?: (number|null); + /** ListChannelGroupsResponse channelGroups */ + channelGroups?: (google.analytics.admin.v1alpha.IChannelGroup[]|null); - /** ListBigQueryLinksRequest pageToken */ - pageToken?: (string|null); + /** ListChannelGroupsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a ListBigQueryLinksRequest. */ - class ListBigQueryLinksRequest implements IListBigQueryLinksRequest { + /** Represents a ListChannelGroupsResponse. */ + class ListChannelGroupsResponse implements IListChannelGroupsResponse { /** - * Constructs a new ListBigQueryLinksRequest. + * Constructs a new ListChannelGroupsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IListBigQueryLinksRequest); - - /** ListBigQueryLinksRequest parent. */ - public parent: string; + constructor(properties?: google.analytics.admin.v1alpha.IListChannelGroupsResponse); - /** ListBigQueryLinksRequest pageSize. */ - public pageSize: number; + /** ListChannelGroupsResponse channelGroups. */ + public channelGroups: google.analytics.admin.v1alpha.IChannelGroup[]; - /** ListBigQueryLinksRequest pageToken. */ - public pageToken: string; + /** ListChannelGroupsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new ListBigQueryLinksRequest instance using the specified properties. + * Creates a new ListChannelGroupsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListBigQueryLinksRequest instance + * @returns ListChannelGroupsResponse instance */ - public static create(properties?: google.analytics.admin.v1alpha.IListBigQueryLinksRequest): google.analytics.admin.v1alpha.ListBigQueryLinksRequest; + public static create(properties?: google.analytics.admin.v1alpha.IListChannelGroupsResponse): google.analytics.admin.v1alpha.ListChannelGroupsResponse; /** - * Encodes the specified ListBigQueryLinksRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListBigQueryLinksRequest.verify|verify} messages. - * @param message ListBigQueryLinksRequest message or plain object to encode + * Encodes the specified ListChannelGroupsResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListChannelGroupsResponse.verify|verify} messages. + * @param message ListChannelGroupsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IListBigQueryLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IListChannelGroupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListBigQueryLinksRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListBigQueryLinksRequest.verify|verify} messages. - * @param message ListBigQueryLinksRequest message or plain object to encode + * Encodes the specified ListChannelGroupsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListChannelGroupsResponse.verify|verify} messages. + * @param message ListChannelGroupsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IListBigQueryLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListChannelGroupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListBigQueryLinksRequest message from the specified reader or buffer. + * Decodes a ListChannelGroupsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListBigQueryLinksRequest + * @returns ListChannelGroupsResponse * @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.ListBigQueryLinksRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListChannelGroupsResponse; /** - * Decodes a ListBigQueryLinksRequest message from the specified reader or buffer, length delimited. + * Decodes a ListChannelGroupsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListBigQueryLinksRequest + * @returns ListChannelGroupsResponse * @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.ListBigQueryLinksRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListChannelGroupsResponse; /** - * Verifies a ListBigQueryLinksRequest message. + * Verifies a ListChannelGroupsResponse 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 ListBigQueryLinksRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListChannelGroupsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListBigQueryLinksRequest + * @returns ListChannelGroupsResponse */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListBigQueryLinksRequest; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListChannelGroupsResponse; /** - * Creates a plain object from a ListBigQueryLinksRequest message. Also converts values to other types if specified. - * @param message ListBigQueryLinksRequest + * Creates a plain object from a ListChannelGroupsResponse message. Also converts values to other types if specified. + * @param message ListChannelGroupsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.ListBigQueryLinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.ListChannelGroupsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListBigQueryLinksRequest to JSON. + * Converts this ListChannelGroupsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListBigQueryLinksRequest + * Gets the default type url for ListChannelGroupsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListBigQueryLinksResponse. */ - interface IListBigQueryLinksResponse { + /** Properties of a SetAutomatedGa4ConfigurationOptOutRequest. */ + interface ISetAutomatedGa4ConfigurationOptOutRequest { - /** ListBigQueryLinksResponse bigqueryLinks */ - bigqueryLinks?: (google.analytics.admin.v1alpha.IBigQueryLink[]|null); + /** SetAutomatedGa4ConfigurationOptOutRequest property */ + property?: (string|null); - /** ListBigQueryLinksResponse nextPageToken */ - nextPageToken?: (string|null); + /** SetAutomatedGa4ConfigurationOptOutRequest optOut */ + optOut?: (boolean|null); } - /** Represents a ListBigQueryLinksResponse. */ - class ListBigQueryLinksResponse implements IListBigQueryLinksResponse { + /** Represents a SetAutomatedGa4ConfigurationOptOutRequest. */ + class SetAutomatedGa4ConfigurationOptOutRequest implements ISetAutomatedGa4ConfigurationOptOutRequest { /** - * Constructs a new ListBigQueryLinksResponse. + * Constructs a new SetAutomatedGa4ConfigurationOptOutRequest. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IListBigQueryLinksResponse); + constructor(properties?: google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest); - /** ListBigQueryLinksResponse bigqueryLinks. */ - public bigqueryLinks: google.analytics.admin.v1alpha.IBigQueryLink[]; + /** SetAutomatedGa4ConfigurationOptOutRequest property. */ + public property: string; - /** ListBigQueryLinksResponse nextPageToken. */ - public nextPageToken: string; + /** SetAutomatedGa4ConfigurationOptOutRequest optOut. */ + public optOut: boolean; /** - * Creates a new ListBigQueryLinksResponse instance using the specified properties. + * Creates a new SetAutomatedGa4ConfigurationOptOutRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListBigQueryLinksResponse instance + * @returns SetAutomatedGa4ConfigurationOptOutRequest instance */ - public static create(properties?: google.analytics.admin.v1alpha.IListBigQueryLinksResponse): google.analytics.admin.v1alpha.ListBigQueryLinksResponse; + public static create(properties?: google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest): google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest; /** - * Encodes the specified ListBigQueryLinksResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListBigQueryLinksResponse.verify|verify} messages. - * @param message ListBigQueryLinksResponse message or plain object to encode + * Encodes the specified SetAutomatedGa4ConfigurationOptOutRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest.verify|verify} messages. + * @param message SetAutomatedGa4ConfigurationOptOutRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IListBigQueryLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListBigQueryLinksResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListBigQueryLinksResponse.verify|verify} messages. - * @param message ListBigQueryLinksResponse message or plain object to encode + * Encodes the specified SetAutomatedGa4ConfigurationOptOutRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest.verify|verify} messages. + * @param message SetAutomatedGa4ConfigurationOptOutRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IListBigQueryLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListBigQueryLinksResponse message from the specified reader or buffer. + * Decodes a SetAutomatedGa4ConfigurationOptOutRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListBigQueryLinksResponse + * @returns SetAutomatedGa4ConfigurationOptOutRequest * @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.ListBigQueryLinksResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest; /** - * Decodes a ListBigQueryLinksResponse message from the specified reader or buffer, length delimited. + * Decodes a SetAutomatedGa4ConfigurationOptOutRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListBigQueryLinksResponse + * @returns SetAutomatedGa4ConfigurationOptOutRequest * @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.ListBigQueryLinksResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest; /** - * Verifies a ListBigQueryLinksResponse message. + * Verifies a SetAutomatedGa4ConfigurationOptOutRequest 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 ListBigQueryLinksResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SetAutomatedGa4ConfigurationOptOutRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListBigQueryLinksResponse + * @returns SetAutomatedGa4ConfigurationOptOutRequest */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListBigQueryLinksResponse; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest; /** - * Creates a plain object from a ListBigQueryLinksResponse message. Also converts values to other types if specified. - * @param message ListBigQueryLinksResponse + * Creates a plain object from a SetAutomatedGa4ConfigurationOptOutRequest message. Also converts values to other types if specified. + * @param message SetAutomatedGa4ConfigurationOptOutRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.ListBigQueryLinksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListBigQueryLinksResponse to JSON. + * Converts this SetAutomatedGa4ConfigurationOptOutRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListBigQueryLinksResponse + * Gets the default type url for SetAutomatedGa4ConfigurationOptOutRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetEnhancedMeasurementSettingsRequest. */ - interface IGetEnhancedMeasurementSettingsRequest { - - /** GetEnhancedMeasurementSettingsRequest name */ - name?: (string|null); + /** Properties of a SetAutomatedGa4ConfigurationOptOutResponse. */ + interface ISetAutomatedGa4ConfigurationOptOutResponse { } - /** Represents a GetEnhancedMeasurementSettingsRequest. */ - class GetEnhancedMeasurementSettingsRequest implements IGetEnhancedMeasurementSettingsRequest { + /** Represents a SetAutomatedGa4ConfigurationOptOutResponse. */ + class SetAutomatedGa4ConfigurationOptOutResponse implements ISetAutomatedGa4ConfigurationOptOutResponse { /** - * Constructs a new GetEnhancedMeasurementSettingsRequest. + * Constructs a new SetAutomatedGa4ConfigurationOptOutResponse. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest); - - /** GetEnhancedMeasurementSettingsRequest name. */ - public name: string; + constructor(properties?: google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse); /** - * Creates a new GetEnhancedMeasurementSettingsRequest instance using the specified properties. + * Creates a new SetAutomatedGa4ConfigurationOptOutResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetEnhancedMeasurementSettingsRequest instance + * @returns SetAutomatedGa4ConfigurationOptOutResponse instance */ - public static create(properties?: google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest): google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest; + public static create(properties?: google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse): google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse; /** - * Encodes the specified GetEnhancedMeasurementSettingsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest.verify|verify} messages. - * @param message GetEnhancedMeasurementSettingsRequest message or plain object to encode - * @param [writer] Writer to encode to + * Encodes the specified SetAutomatedGa4ConfigurationOptOutResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse.verify|verify} messages. + * @param message SetAutomatedGa4ConfigurationOptOutResponse message or plain object to encode + * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetEnhancedMeasurementSettingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest.verify|verify} messages. - * @param message GetEnhancedMeasurementSettingsRequest message or plain object to encode + * Encodes the specified SetAutomatedGa4ConfigurationOptOutResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse.verify|verify} messages. + * @param message SetAutomatedGa4ConfigurationOptOutResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetEnhancedMeasurementSettingsRequest message from the specified reader or buffer. + * Decodes a SetAutomatedGa4ConfigurationOptOutResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetEnhancedMeasurementSettingsRequest + * @returns SetAutomatedGa4ConfigurationOptOutResponse * @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.GetEnhancedMeasurementSettingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse; /** - * Decodes a GetEnhancedMeasurementSettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a SetAutomatedGa4ConfigurationOptOutResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetEnhancedMeasurementSettingsRequest + * @returns SetAutomatedGa4ConfigurationOptOutResponse * @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.GetEnhancedMeasurementSettingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse; /** - * Verifies a GetEnhancedMeasurementSettingsRequest message. + * Verifies a SetAutomatedGa4ConfigurationOptOutResponse 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 GetEnhancedMeasurementSettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SetAutomatedGa4ConfigurationOptOutResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetEnhancedMeasurementSettingsRequest + * @returns SetAutomatedGa4ConfigurationOptOutResponse */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse; /** - * Creates a plain object from a GetEnhancedMeasurementSettingsRequest message. Also converts values to other types if specified. - * @param message GetEnhancedMeasurementSettingsRequest + * Creates a plain object from a SetAutomatedGa4ConfigurationOptOutResponse message. Also converts values to other types if specified. + * @param message SetAutomatedGa4ConfigurationOptOutResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetEnhancedMeasurementSettingsRequest to JSON. + * Converts this SetAutomatedGa4ConfigurationOptOutResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetEnhancedMeasurementSettingsRequest + * Gets the default type url for SetAutomatedGa4ConfigurationOptOutResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateEnhancedMeasurementSettingsRequest. */ - interface IUpdateEnhancedMeasurementSettingsRequest { - - /** UpdateEnhancedMeasurementSettingsRequest enhancedMeasurementSettings */ - enhancedMeasurementSettings?: (google.analytics.admin.v1alpha.IEnhancedMeasurementSettings|null); + /** Properties of a FetchAutomatedGa4ConfigurationOptOutRequest. */ + interface IFetchAutomatedGa4ConfigurationOptOutRequest { - /** UpdateEnhancedMeasurementSettingsRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** FetchAutomatedGa4ConfigurationOptOutRequest property */ + property?: (string|null); } - /** Represents an UpdateEnhancedMeasurementSettingsRequest. */ - class UpdateEnhancedMeasurementSettingsRequest implements IUpdateEnhancedMeasurementSettingsRequest { + /** Represents a FetchAutomatedGa4ConfigurationOptOutRequest. */ + class FetchAutomatedGa4ConfigurationOptOutRequest implements IFetchAutomatedGa4ConfigurationOptOutRequest { /** - * Constructs a new UpdateEnhancedMeasurementSettingsRequest. + * Constructs a new FetchAutomatedGa4ConfigurationOptOutRequest. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest); - - /** UpdateEnhancedMeasurementSettingsRequest enhancedMeasurementSettings. */ - public enhancedMeasurementSettings?: (google.analytics.admin.v1alpha.IEnhancedMeasurementSettings|null); + constructor(properties?: google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest); - /** UpdateEnhancedMeasurementSettingsRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** FetchAutomatedGa4ConfigurationOptOutRequest property. */ + public property: string; /** - * Creates a new UpdateEnhancedMeasurementSettingsRequest instance using the specified properties. + * Creates a new FetchAutomatedGa4ConfigurationOptOutRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateEnhancedMeasurementSettingsRequest instance + * @returns FetchAutomatedGa4ConfigurationOptOutRequest instance */ - public static create(properties?: google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest): google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest; + public static create(properties?: google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest): google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest; /** - * Encodes the specified UpdateEnhancedMeasurementSettingsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest.verify|verify} messages. - * @param message UpdateEnhancedMeasurementSettingsRequest message or plain object to encode + * Encodes the specified FetchAutomatedGa4ConfigurationOptOutRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest.verify|verify} messages. + * @param message FetchAutomatedGa4ConfigurationOptOutRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateEnhancedMeasurementSettingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest.verify|verify} messages. - * @param message UpdateEnhancedMeasurementSettingsRequest message or plain object to encode + * Encodes the specified FetchAutomatedGa4ConfigurationOptOutRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest.verify|verify} messages. + * @param message FetchAutomatedGa4ConfigurationOptOutRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateEnhancedMeasurementSettingsRequest message from the specified reader or buffer. + * Decodes a FetchAutomatedGa4ConfigurationOptOutRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateEnhancedMeasurementSettingsRequest + * @returns FetchAutomatedGa4ConfigurationOptOutRequest * @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.UpdateEnhancedMeasurementSettingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest; /** - * Decodes an UpdateEnhancedMeasurementSettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a FetchAutomatedGa4ConfigurationOptOutRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateEnhancedMeasurementSettingsRequest + * @returns FetchAutomatedGa4ConfigurationOptOutRequest * @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.UpdateEnhancedMeasurementSettingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest; /** - * Verifies an UpdateEnhancedMeasurementSettingsRequest message. + * Verifies a FetchAutomatedGa4ConfigurationOptOutRequest 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 UpdateEnhancedMeasurementSettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a FetchAutomatedGa4ConfigurationOptOutRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateEnhancedMeasurementSettingsRequest + * @returns FetchAutomatedGa4ConfigurationOptOutRequest */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest; /** - * Creates a plain object from an UpdateEnhancedMeasurementSettingsRequest message. Also converts values to other types if specified. - * @param message UpdateEnhancedMeasurementSettingsRequest + * Creates a plain object from a FetchAutomatedGa4ConfigurationOptOutRequest message. Also converts values to other types if specified. + * @param message FetchAutomatedGa4ConfigurationOptOutRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateEnhancedMeasurementSettingsRequest to JSON. + * Converts this FetchAutomatedGa4ConfigurationOptOutRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateEnhancedMeasurementSettingsRequest + * Gets the default type url for FetchAutomatedGa4ConfigurationOptOutRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateConnectedSiteTagRequest. */ - interface ICreateConnectedSiteTagRequest { - - /** CreateConnectedSiteTagRequest property */ - property?: (string|null); + /** Properties of a FetchAutomatedGa4ConfigurationOptOutResponse. */ + interface IFetchAutomatedGa4ConfigurationOptOutResponse { - /** CreateConnectedSiteTagRequest connectedSiteTag */ - connectedSiteTag?: (google.analytics.admin.v1alpha.IConnectedSiteTag|null); + /** FetchAutomatedGa4ConfigurationOptOutResponse optOut */ + optOut?: (boolean|null); } - /** Represents a CreateConnectedSiteTagRequest. */ - class CreateConnectedSiteTagRequest implements ICreateConnectedSiteTagRequest { + /** Represents a FetchAutomatedGa4ConfigurationOptOutResponse. */ + class FetchAutomatedGa4ConfigurationOptOutResponse implements IFetchAutomatedGa4ConfigurationOptOutResponse { /** - * Constructs a new CreateConnectedSiteTagRequest. + * Constructs a new FetchAutomatedGa4ConfigurationOptOutResponse. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest); - - /** CreateConnectedSiteTagRequest property. */ - public property: string; + constructor(properties?: google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse); - /** CreateConnectedSiteTagRequest connectedSiteTag. */ - public connectedSiteTag?: (google.analytics.admin.v1alpha.IConnectedSiteTag|null); + /** FetchAutomatedGa4ConfigurationOptOutResponse optOut. */ + public optOut: boolean; /** - * Creates a new CreateConnectedSiteTagRequest instance using the specified properties. + * Creates a new FetchAutomatedGa4ConfigurationOptOutResponse instance using the specified properties. * @param [properties] Properties to set - * @returns CreateConnectedSiteTagRequest instance + * @returns FetchAutomatedGa4ConfigurationOptOutResponse instance */ - public static create(properties?: google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest): google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest; + public static create(properties?: google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse): google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse; /** - * Encodes the specified CreateConnectedSiteTagRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest.verify|verify} messages. - * @param message CreateConnectedSiteTagRequest message or plain object to encode + * Encodes the specified FetchAutomatedGa4ConfigurationOptOutResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse.verify|verify} messages. + * @param message FetchAutomatedGa4ConfigurationOptOutResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateConnectedSiteTagRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest.verify|verify} messages. - * @param message CreateConnectedSiteTagRequest message or plain object to encode + * Encodes the specified FetchAutomatedGa4ConfigurationOptOutResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse.verify|verify} messages. + * @param message FetchAutomatedGa4ConfigurationOptOutResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateConnectedSiteTagRequest message from the specified reader or buffer. + * Decodes a FetchAutomatedGa4ConfigurationOptOutResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateConnectedSiteTagRequest + * @returns FetchAutomatedGa4ConfigurationOptOutResponse * @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.CreateConnectedSiteTagRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse; /** - * Decodes a CreateConnectedSiteTagRequest message from the specified reader or buffer, length delimited. + * Decodes a FetchAutomatedGa4ConfigurationOptOutResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateConnectedSiteTagRequest + * @returns FetchAutomatedGa4ConfigurationOptOutResponse * @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.CreateConnectedSiteTagRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse; /** - * Verifies a CreateConnectedSiteTagRequest message. + * Verifies a FetchAutomatedGa4ConfigurationOptOutResponse 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 CreateConnectedSiteTagRequest message from a plain object. Also converts values to their respective internal types. + * Creates a FetchAutomatedGa4ConfigurationOptOutResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateConnectedSiteTagRequest + * @returns FetchAutomatedGa4ConfigurationOptOutResponse */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse; /** - * Creates a plain object from a CreateConnectedSiteTagRequest message. Also converts values to other types if specified. - * @param message CreateConnectedSiteTagRequest + * Creates a plain object from a FetchAutomatedGa4ConfigurationOptOutResponse message. Also converts values to other types if specified. + * @param message FetchAutomatedGa4ConfigurationOptOutResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateConnectedSiteTagRequest to JSON. + * Converts this FetchAutomatedGa4ConfigurationOptOutResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateConnectedSiteTagRequest + * Gets the default type url for FetchAutomatedGa4ConfigurationOptOutResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateConnectedSiteTagResponse. */ - interface ICreateConnectedSiteTagResponse { + /** Properties of a GetBigQueryLinkRequest. */ + interface IGetBigQueryLinkRequest { + + /** GetBigQueryLinkRequest name */ + name?: (string|null); } - /** Represents a CreateConnectedSiteTagResponse. */ - class CreateConnectedSiteTagResponse implements ICreateConnectedSiteTagResponse { + /** Represents a GetBigQueryLinkRequest. */ + class GetBigQueryLinkRequest implements IGetBigQueryLinkRequest { /** - * Constructs a new CreateConnectedSiteTagResponse. + * Constructs a new GetBigQueryLinkRequest. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.ICreateConnectedSiteTagResponse); + constructor(properties?: google.analytics.admin.v1alpha.IGetBigQueryLinkRequest); + + /** GetBigQueryLinkRequest name. */ + public name: string; /** - * Creates a new CreateConnectedSiteTagResponse instance using the specified properties. + * Creates a new GetBigQueryLinkRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateConnectedSiteTagResponse instance + * @returns GetBigQueryLinkRequest instance */ - public static create(properties?: google.analytics.admin.v1alpha.ICreateConnectedSiteTagResponse): google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse; + public static create(properties?: google.analytics.admin.v1alpha.IGetBigQueryLinkRequest): google.analytics.admin.v1alpha.GetBigQueryLinkRequest; /** - * Encodes the specified CreateConnectedSiteTagResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse.verify|verify} messages. - * @param message CreateConnectedSiteTagResponse message or plain object to encode + * Encodes the specified GetBigQueryLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetBigQueryLinkRequest.verify|verify} messages. + * @param message GetBigQueryLinkRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.ICreateConnectedSiteTagResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IGetBigQueryLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateConnectedSiteTagResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse.verify|verify} messages. - * @param message CreateConnectedSiteTagResponse message or plain object to encode + * Encodes the specified GetBigQueryLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetBigQueryLinkRequest.verify|verify} messages. + * @param message GetBigQueryLinkRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.ICreateConnectedSiteTagResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IGetBigQueryLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateConnectedSiteTagResponse message from the specified reader or buffer. + * Decodes a GetBigQueryLinkRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateConnectedSiteTagResponse + * @returns GetBigQueryLinkRequest * @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.CreateConnectedSiteTagResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.GetBigQueryLinkRequest; /** - * Decodes a CreateConnectedSiteTagResponse message from the specified reader or buffer, length delimited. + * Decodes a GetBigQueryLinkRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateConnectedSiteTagResponse + * @returns GetBigQueryLinkRequest * @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.CreateConnectedSiteTagResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.GetBigQueryLinkRequest; /** - * Verifies a CreateConnectedSiteTagResponse message. + * Verifies a GetBigQueryLinkRequest 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 CreateConnectedSiteTagResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetBigQueryLinkRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateConnectedSiteTagResponse + * @returns GetBigQueryLinkRequest */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GetBigQueryLinkRequest; /** - * Creates a plain object from a CreateConnectedSiteTagResponse message. Also converts values to other types if specified. - * @param message CreateConnectedSiteTagResponse + * Creates a plain object from a GetBigQueryLinkRequest message. Also converts values to other types if specified. + * @param message GetBigQueryLinkRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.GetBigQueryLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateConnectedSiteTagResponse to JSON. + * Converts this GetBigQueryLinkRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateConnectedSiteTagResponse + * Gets the default type url for GetBigQueryLinkRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteConnectedSiteTagRequest. */ - interface IDeleteConnectedSiteTagRequest { + /** Properties of a ListBigQueryLinksRequest. */ + interface IListBigQueryLinksRequest { - /** DeleteConnectedSiteTagRequest property */ - property?: (string|null); + /** ListBigQueryLinksRequest parent */ + parent?: (string|null); - /** DeleteConnectedSiteTagRequest tagId */ - tagId?: (string|null); + /** ListBigQueryLinksRequest pageSize */ + pageSize?: (number|null); + + /** ListBigQueryLinksRequest pageToken */ + pageToken?: (string|null); } - /** Represents a DeleteConnectedSiteTagRequest. */ - class DeleteConnectedSiteTagRequest implements IDeleteConnectedSiteTagRequest { + /** Represents a ListBigQueryLinksRequest. */ + class ListBigQueryLinksRequest implements IListBigQueryLinksRequest { /** - * Constructs a new DeleteConnectedSiteTagRequest. + * Constructs a new ListBigQueryLinksRequest. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest); + constructor(properties?: google.analytics.admin.v1alpha.IListBigQueryLinksRequest); - /** DeleteConnectedSiteTagRequest property. */ - public property: string; + /** ListBigQueryLinksRequest parent. */ + public parent: string; - /** DeleteConnectedSiteTagRequest tagId. */ - public tagId: string; + /** ListBigQueryLinksRequest pageSize. */ + public pageSize: number; + + /** ListBigQueryLinksRequest pageToken. */ + public pageToken: string; /** - * Creates a new DeleteConnectedSiteTagRequest instance using the specified properties. + * Creates a new ListBigQueryLinksRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteConnectedSiteTagRequest instance + * @returns ListBigQueryLinksRequest instance */ - public static create(properties?: google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest): google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest; + public static create(properties?: google.analytics.admin.v1alpha.IListBigQueryLinksRequest): google.analytics.admin.v1alpha.ListBigQueryLinksRequest; /** - * Encodes the specified DeleteConnectedSiteTagRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest.verify|verify} messages. - * @param message DeleteConnectedSiteTagRequest message or plain object to encode + * Encodes the specified ListBigQueryLinksRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListBigQueryLinksRequest.verify|verify} messages. + * @param message ListBigQueryLinksRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IListBigQueryLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteConnectedSiteTagRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest.verify|verify} messages. - * @param message DeleteConnectedSiteTagRequest message or plain object to encode + * Encodes the specified ListBigQueryLinksRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListBigQueryLinksRequest.verify|verify} messages. + * @param message ListBigQueryLinksRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListBigQueryLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteConnectedSiteTagRequest message from the specified reader or buffer. + * Decodes a ListBigQueryLinksRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteConnectedSiteTagRequest + * @returns ListBigQueryLinksRequest * @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.DeleteConnectedSiteTagRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListBigQueryLinksRequest; /** - * Decodes a DeleteConnectedSiteTagRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBigQueryLinksRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteConnectedSiteTagRequest + * @returns ListBigQueryLinksRequest * @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.DeleteConnectedSiteTagRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListBigQueryLinksRequest; /** - * Verifies a DeleteConnectedSiteTagRequest message. + * Verifies a ListBigQueryLinksRequest 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 DeleteConnectedSiteTagRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBigQueryLinksRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteConnectedSiteTagRequest + * @returns ListBigQueryLinksRequest */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListBigQueryLinksRequest; /** - * Creates a plain object from a DeleteConnectedSiteTagRequest message. Also converts values to other types if specified. - * @param message DeleteConnectedSiteTagRequest + * Creates a plain object from a ListBigQueryLinksRequest message. Also converts values to other types if specified. + * @param message ListBigQueryLinksRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.ListBigQueryLinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteConnectedSiteTagRequest to JSON. + * Converts this ListBigQueryLinksRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteConnectedSiteTagRequest + * Gets the default type url for ListBigQueryLinksRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListConnectedSiteTagsRequest. */ - interface IListConnectedSiteTagsRequest { + /** Properties of a ListBigQueryLinksResponse. */ + interface IListBigQueryLinksResponse { - /** ListConnectedSiteTagsRequest property */ - property?: (string|null); + /** ListBigQueryLinksResponse bigqueryLinks */ + bigqueryLinks?: (google.analytics.admin.v1alpha.IBigQueryLink[]|null); + + /** ListBigQueryLinksResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a ListConnectedSiteTagsRequest. */ - class ListConnectedSiteTagsRequest implements IListConnectedSiteTagsRequest { + /** Represents a ListBigQueryLinksResponse. */ + class ListBigQueryLinksResponse implements IListBigQueryLinksResponse { /** - * Constructs a new ListConnectedSiteTagsRequest. + * Constructs a new ListBigQueryLinksResponse. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest); + constructor(properties?: google.analytics.admin.v1alpha.IListBigQueryLinksResponse); - /** ListConnectedSiteTagsRequest property. */ - public property: string; + /** ListBigQueryLinksResponse bigqueryLinks. */ + public bigqueryLinks: google.analytics.admin.v1alpha.IBigQueryLink[]; + + /** ListBigQueryLinksResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new ListConnectedSiteTagsRequest instance using the specified properties. + * Creates a new ListBigQueryLinksResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListConnectedSiteTagsRequest instance + * @returns ListBigQueryLinksResponse instance */ - public static create(properties?: google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest): google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest; + public static create(properties?: google.analytics.admin.v1alpha.IListBigQueryLinksResponse): google.analytics.admin.v1alpha.ListBigQueryLinksResponse; /** - * Encodes the specified ListConnectedSiteTagsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest.verify|verify} messages. - * @param message ListConnectedSiteTagsRequest message or plain object to encode + * Encodes the specified ListBigQueryLinksResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListBigQueryLinksResponse.verify|verify} messages. + * @param message ListBigQueryLinksResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IListBigQueryLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListConnectedSiteTagsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest.verify|verify} messages. - * @param message ListConnectedSiteTagsRequest message or plain object to encode + * Encodes the specified ListBigQueryLinksResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListBigQueryLinksResponse.verify|verify} messages. + * @param message ListBigQueryLinksResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListBigQueryLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListConnectedSiteTagsRequest message from the specified reader or buffer. + * Decodes a ListBigQueryLinksResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListConnectedSiteTagsRequest + * @returns ListBigQueryLinksResponse * @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.ListConnectedSiteTagsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListBigQueryLinksResponse; /** - * Decodes a ListConnectedSiteTagsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBigQueryLinksResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListConnectedSiteTagsRequest + * @returns ListBigQueryLinksResponse * @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.ListConnectedSiteTagsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListBigQueryLinksResponse; /** - * Verifies a ListConnectedSiteTagsRequest message. + * Verifies a ListBigQueryLinksResponse 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 ListConnectedSiteTagsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBigQueryLinksResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListConnectedSiteTagsRequest + * @returns ListBigQueryLinksResponse */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListBigQueryLinksResponse; /** - * Creates a plain object from a ListConnectedSiteTagsRequest message. Also converts values to other types if specified. - * @param message ListConnectedSiteTagsRequest + * Creates a plain object from a ListBigQueryLinksResponse message. Also converts values to other types if specified. + * @param message ListBigQueryLinksResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.ListBigQueryLinksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListConnectedSiteTagsRequest to JSON. + * Converts this ListBigQueryLinksResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListConnectedSiteTagsRequest + * Gets the default type url for ListBigQueryLinksResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListConnectedSiteTagsResponse. */ - interface IListConnectedSiteTagsResponse { + /** Properties of a GetEnhancedMeasurementSettingsRequest. */ + interface IGetEnhancedMeasurementSettingsRequest { - /** ListConnectedSiteTagsResponse connectedSiteTags */ - connectedSiteTags?: (google.analytics.admin.v1alpha.IConnectedSiteTag[]|null); + /** GetEnhancedMeasurementSettingsRequest name */ + name?: (string|null); } - /** Represents a ListConnectedSiteTagsResponse. */ - class ListConnectedSiteTagsResponse implements IListConnectedSiteTagsResponse { + /** Represents a GetEnhancedMeasurementSettingsRequest. */ + class GetEnhancedMeasurementSettingsRequest implements IGetEnhancedMeasurementSettingsRequest { /** - * Constructs a new ListConnectedSiteTagsResponse. + * Constructs a new GetEnhancedMeasurementSettingsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IListConnectedSiteTagsResponse); + constructor(properties?: google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest); - /** ListConnectedSiteTagsResponse connectedSiteTags. */ - public connectedSiteTags: google.analytics.admin.v1alpha.IConnectedSiteTag[]; + /** GetEnhancedMeasurementSettingsRequest name. */ + public name: string; /** - * Creates a new ListConnectedSiteTagsResponse instance using the specified properties. + * Creates a new GetEnhancedMeasurementSettingsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListConnectedSiteTagsResponse instance + * @returns GetEnhancedMeasurementSettingsRequest instance */ - public static create(properties?: google.analytics.admin.v1alpha.IListConnectedSiteTagsResponse): google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse; + public static create(properties?: google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest): google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest; /** - * Encodes the specified ListConnectedSiteTagsResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse.verify|verify} messages. - * @param message ListConnectedSiteTagsResponse message or plain object to encode + * Encodes the specified GetEnhancedMeasurementSettingsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest.verify|verify} messages. + * @param message GetEnhancedMeasurementSettingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IListConnectedSiteTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListConnectedSiteTagsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse.verify|verify} messages. - * @param message ListConnectedSiteTagsResponse message or plain object to encode + * Encodes the specified GetEnhancedMeasurementSettingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest.verify|verify} messages. + * @param message GetEnhancedMeasurementSettingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IListConnectedSiteTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListConnectedSiteTagsResponse message from the specified reader or buffer. + * Decodes a GetEnhancedMeasurementSettingsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListConnectedSiteTagsResponse + * @returns GetEnhancedMeasurementSettingsRequest * @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.ListConnectedSiteTagsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest; /** - * Decodes a ListConnectedSiteTagsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetEnhancedMeasurementSettingsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListConnectedSiteTagsResponse + * @returns GetEnhancedMeasurementSettingsRequest * @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.ListConnectedSiteTagsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest; /** - * Verifies a ListConnectedSiteTagsResponse message. + * Verifies a GetEnhancedMeasurementSettingsRequest 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 ListConnectedSiteTagsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetEnhancedMeasurementSettingsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListConnectedSiteTagsResponse + * @returns GetEnhancedMeasurementSettingsRequest */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest; /** - * Creates a plain object from a ListConnectedSiteTagsResponse message. Also converts values to other types if specified. - * @param message ListConnectedSiteTagsResponse + * Creates a plain object from a GetEnhancedMeasurementSettingsRequest message. Also converts values to other types if specified. + * @param message GetEnhancedMeasurementSettingsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListConnectedSiteTagsResponse to JSON. + * Converts this GetEnhancedMeasurementSettingsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListConnectedSiteTagsResponse + * Gets the default type url for GetEnhancedMeasurementSettingsRequest * @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, - AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT = 1, - AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION = 2, - AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS = 3 - } + /** Properties of an UpdateEnhancedMeasurementSettingsRequest. */ + interface IUpdateEnhancedMeasurementSettingsRequest { - /** Properties of an AudienceDimensionOrMetricFilter. */ - interface IAudienceDimensionOrMetricFilter { + /** UpdateEnhancedMeasurementSettingsRequest enhancedMeasurementSettings */ + enhancedMeasurementSettings?: (google.analytics.admin.v1alpha.IEnhancedMeasurementSettings|null); - /** AudienceDimensionOrMetricFilter stringFilter */ - stringFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter|null); + /** UpdateEnhancedMeasurementSettingsRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } - /** AudienceDimensionOrMetricFilter inListFilter */ - inListFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter|null); + /** Represents an UpdateEnhancedMeasurementSettingsRequest. */ + class UpdateEnhancedMeasurementSettingsRequest implements IUpdateEnhancedMeasurementSettingsRequest { - /** AudienceDimensionOrMetricFilter numericFilter */ - numericFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter|null); + /** + * Constructs a new UpdateEnhancedMeasurementSettingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest); - /** AudienceDimensionOrMetricFilter betweenFilter */ - betweenFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter|null); + /** UpdateEnhancedMeasurementSettingsRequest enhancedMeasurementSettings. */ + public enhancedMeasurementSettings?: (google.analytics.admin.v1alpha.IEnhancedMeasurementSettings|null); - /** AudienceDimensionOrMetricFilter fieldName */ - fieldName?: (string|null); + /** UpdateEnhancedMeasurementSettingsRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** AudienceDimensionOrMetricFilter atAnyPointInTime */ - atAnyPointInTime?: (boolean|null); + /** + * Creates a new UpdateEnhancedMeasurementSettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateEnhancedMeasurementSettingsRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest): google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest; - /** AudienceDimensionOrMetricFilter inAnyNDayPeriod */ - inAnyNDayPeriod?: (number|null); - } + /** + * Encodes the specified UpdateEnhancedMeasurementSettingsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest.verify|verify} messages. + * @param message UpdateEnhancedMeasurementSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents an AudienceDimensionOrMetricFilter. */ - class AudienceDimensionOrMetricFilter implements IAudienceDimensionOrMetricFilter { + /** + * Encodes the specified UpdateEnhancedMeasurementSettingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest.verify|verify} messages. + * @param message UpdateEnhancedMeasurementSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Constructs a new AudienceDimensionOrMetricFilter. - * @param [properties] Properties to set + * Decodes an UpdateEnhancedMeasurementSettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateEnhancedMeasurementSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - constructor(properties?: google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter); + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest; - /** AudienceDimensionOrMetricFilter stringFilter. */ - public stringFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter|null); + /** + * Decodes an UpdateEnhancedMeasurementSettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateEnhancedMeasurementSettingsRequest + * @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.UpdateEnhancedMeasurementSettingsRequest; - /** AudienceDimensionOrMetricFilter inListFilter. */ - public inListFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter|null); + /** + * Verifies an UpdateEnhancedMeasurementSettingsRequest 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); - /** AudienceDimensionOrMetricFilter numericFilter. */ - public numericFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter|null); + /** + * Creates an UpdateEnhancedMeasurementSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateEnhancedMeasurementSettingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest; - /** AudienceDimensionOrMetricFilter betweenFilter. */ - public betweenFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter|null); + /** + * Creates a plain object from an UpdateEnhancedMeasurementSettingsRequest message. Also converts values to other types if specified. + * @param message UpdateEnhancedMeasurementSettingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** AudienceDimensionOrMetricFilter fieldName. */ - public fieldName: string; + /** + * Converts this UpdateEnhancedMeasurementSettingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** AudienceDimensionOrMetricFilter atAnyPointInTime. */ - public atAnyPointInTime: boolean; + /** + * Gets the default type url for UpdateEnhancedMeasurementSettingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** AudienceDimensionOrMetricFilter inAnyNDayPeriod. */ - public inAnyNDayPeriod: number; + /** Properties of a CreateConnectedSiteTagRequest. */ + interface ICreateConnectedSiteTagRequest { - /** AudienceDimensionOrMetricFilter oneFilter. */ - public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"); + /** CreateConnectedSiteTagRequest property */ + property?: (string|null); + + /** CreateConnectedSiteTagRequest connectedSiteTag */ + connectedSiteTag?: (google.analytics.admin.v1alpha.IConnectedSiteTag|null); + } + + /** Represents a CreateConnectedSiteTagRequest. */ + class CreateConnectedSiteTagRequest implements ICreateConnectedSiteTagRequest { /** - * Creates a new AudienceDimensionOrMetricFilter instance using the specified properties. + * Constructs a new CreateConnectedSiteTagRequest. * @param [properties] Properties to set - * @returns AudienceDimensionOrMetricFilter instance */ - public static create(properties?: google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter; + constructor(properties?: google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest); + + /** CreateConnectedSiteTagRequest property. */ + public property: string; + + /** CreateConnectedSiteTagRequest connectedSiteTag. */ + public connectedSiteTag?: (google.analytics.admin.v1alpha.IConnectedSiteTag|null); /** - * Encodes the specified AudienceDimensionOrMetricFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.verify|verify} messages. - * @param message AudienceDimensionOrMetricFilter message or plain object to encode + * Creates a new CreateConnectedSiteTagRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateConnectedSiteTagRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest): google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest; + + /** + * Encodes the specified CreateConnectedSiteTagRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest.verify|verify} messages. + * @param message CreateConnectedSiteTagRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AudienceDimensionOrMetricFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.verify|verify} messages. - * @param message AudienceDimensionOrMetricFilter message or plain object to encode + * Encodes the specified CreateConnectedSiteTagRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest.verify|verify} messages. + * @param message CreateConnectedSiteTagRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AudienceDimensionOrMetricFilter message from the specified reader or buffer. + * Decodes a CreateConnectedSiteTagRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AudienceDimensionOrMetricFilter + * @returns CreateConnectedSiteTagRequest * @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.AudienceDimensionOrMetricFilter; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest; /** - * Decodes an AudienceDimensionOrMetricFilter message from the specified reader or buffer, length delimited. + * Decodes a CreateConnectedSiteTagRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AudienceDimensionOrMetricFilter + * @returns CreateConnectedSiteTagRequest * @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.AudienceDimensionOrMetricFilter; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest; /** - * Verifies an AudienceDimensionOrMetricFilter message. + * Verifies a CreateConnectedSiteTagRequest 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 AudienceDimensionOrMetricFilter message from a plain object. Also converts values to their respective internal types. + * Creates a CreateConnectedSiteTagRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AudienceDimensionOrMetricFilter + * @returns CreateConnectedSiteTagRequest */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest; /** - * Creates a plain object from an AudienceDimensionOrMetricFilter message. Also converts values to other types if specified. - * @param message AudienceDimensionOrMetricFilter + * Creates a plain object from a CreateConnectedSiteTagRequest message. Also converts values to other types if specified. + * @param message CreateConnectedSiteTagRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AudienceDimensionOrMetricFilter to JSON. + * Converts this CreateConnectedSiteTagRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AudienceDimensionOrMetricFilter + * Gets the default type url for CreateConnectedSiteTagRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace AudienceDimensionOrMetricFilter { - - /** Properties of a StringFilter. */ - interface IStringFilter { + /** Properties of a CreateConnectedSiteTagResponse. */ + interface ICreateConnectedSiteTagResponse { + } - /** StringFilter matchType */ - matchType?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType|keyof typeof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType|null); + /** Represents a CreateConnectedSiteTagResponse. */ + class CreateConnectedSiteTagResponse implements ICreateConnectedSiteTagResponse { - /** StringFilter value */ - value?: (string|null); + /** + * Constructs a new CreateConnectedSiteTagResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.ICreateConnectedSiteTagResponse); - /** StringFilter caseSensitive */ - caseSensitive?: (boolean|null); - } + /** + * Creates a new CreateConnectedSiteTagResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateConnectedSiteTagResponse instance + */ + public static create(properties?: google.analytics.admin.v1alpha.ICreateConnectedSiteTagResponse): google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse; - /** Represents a StringFilter. */ - class StringFilter implements IStringFilter { + /** + * Encodes the specified CreateConnectedSiteTagResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse.verify|verify} messages. + * @param message CreateConnectedSiteTagResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.ICreateConnectedSiteTagResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new StringFilter. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter); + /** + * Encodes the specified CreateConnectedSiteTagResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse.verify|verify} messages. + * @param message CreateConnectedSiteTagResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.ICreateConnectedSiteTagResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** StringFilter matchType. */ - public matchType: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType|keyof typeof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType); + /** + * Decodes a CreateConnectedSiteTagResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateConnectedSiteTagResponse + * @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.CreateConnectedSiteTagResponse; - /** StringFilter value. */ - public value: string; + /** + * Decodes a CreateConnectedSiteTagResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateConnectedSiteTagResponse + * @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.CreateConnectedSiteTagResponse; - /** StringFilter caseSensitive. */ - public caseSensitive: boolean; + /** + * Verifies a CreateConnectedSiteTagResponse 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 new StringFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns StringFilter instance - */ - public static create(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter; + /** + * Creates a CreateConnectedSiteTagResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateConnectedSiteTagResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse; + + /** + * Creates a plain object from a CreateConnectedSiteTagResponse message. Also converts values to other types if specified. + * @param message CreateConnectedSiteTagResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateConnectedSiteTagResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateConnectedSiteTagResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteConnectedSiteTagRequest. */ + interface IDeleteConnectedSiteTagRequest { + + /** DeleteConnectedSiteTagRequest property */ + property?: (string|null); + + /** DeleteConnectedSiteTagRequest tagId */ + tagId?: (string|null); + } + + /** Represents a DeleteConnectedSiteTagRequest. */ + class DeleteConnectedSiteTagRequest implements IDeleteConnectedSiteTagRequest { + + /** + * Constructs a new DeleteConnectedSiteTagRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest); + + /** DeleteConnectedSiteTagRequest property. */ + public property: string; + + /** DeleteConnectedSiteTagRequest tagId. */ + public tagId: string; + + /** + * Creates a new DeleteConnectedSiteTagRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteConnectedSiteTagRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest): google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest; + + /** + * Encodes the specified DeleteConnectedSiteTagRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest.verify|verify} messages. + * @param message DeleteConnectedSiteTagRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteConnectedSiteTagRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest.verify|verify} messages. + * @param message DeleteConnectedSiteTagRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteConnectedSiteTagRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteConnectedSiteTagRequest + * @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.DeleteConnectedSiteTagRequest; + + /** + * Decodes a DeleteConnectedSiteTagRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteConnectedSiteTagRequest + * @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.DeleteConnectedSiteTagRequest; + + /** + * Verifies a DeleteConnectedSiteTagRequest 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 DeleteConnectedSiteTagRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteConnectedSiteTagRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest; + + /** + * Creates a plain object from a DeleteConnectedSiteTagRequest message. Also converts values to other types if specified. + * @param message DeleteConnectedSiteTagRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteConnectedSiteTagRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteConnectedSiteTagRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListConnectedSiteTagsRequest. */ + interface IListConnectedSiteTagsRequest { + + /** ListConnectedSiteTagsRequest property */ + property?: (string|null); + } + + /** Represents a ListConnectedSiteTagsRequest. */ + class ListConnectedSiteTagsRequest implements IListConnectedSiteTagsRequest { + + /** + * Constructs a new ListConnectedSiteTagsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest); + + /** ListConnectedSiteTagsRequest property. */ + public property: string; + + /** + * Creates a new ListConnectedSiteTagsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListConnectedSiteTagsRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest): google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest; + + /** + * Encodes the specified ListConnectedSiteTagsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest.verify|verify} messages. + * @param message ListConnectedSiteTagsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListConnectedSiteTagsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest.verify|verify} messages. + * @param message ListConnectedSiteTagsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListConnectedSiteTagsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListConnectedSiteTagsRequest + * @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.ListConnectedSiteTagsRequest; + + /** + * Decodes a ListConnectedSiteTagsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListConnectedSiteTagsRequest + * @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.ListConnectedSiteTagsRequest; + + /** + * Verifies a ListConnectedSiteTagsRequest 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 ListConnectedSiteTagsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListConnectedSiteTagsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest; + + /** + * Creates a plain object from a ListConnectedSiteTagsRequest message. Also converts values to other types if specified. + * @param message ListConnectedSiteTagsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListConnectedSiteTagsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListConnectedSiteTagsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListConnectedSiteTagsResponse. */ + interface IListConnectedSiteTagsResponse { + + /** ListConnectedSiteTagsResponse connectedSiteTags */ + connectedSiteTags?: (google.analytics.admin.v1alpha.IConnectedSiteTag[]|null); + } + + /** Represents a ListConnectedSiteTagsResponse. */ + class ListConnectedSiteTagsResponse implements IListConnectedSiteTagsResponse { + + /** + * Constructs a new ListConnectedSiteTagsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListConnectedSiteTagsResponse); + + /** ListConnectedSiteTagsResponse connectedSiteTags. */ + public connectedSiteTags: google.analytics.admin.v1alpha.IConnectedSiteTag[]; + + /** + * Creates a new ListConnectedSiteTagsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListConnectedSiteTagsResponse instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListConnectedSiteTagsResponse): google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse; + + /** + * Encodes the specified ListConnectedSiteTagsResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse.verify|verify} messages. + * @param message ListConnectedSiteTagsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListConnectedSiteTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListConnectedSiteTagsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse.verify|verify} messages. + * @param message ListConnectedSiteTagsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListConnectedSiteTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListConnectedSiteTagsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListConnectedSiteTagsResponse + * @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.ListConnectedSiteTagsResponse; + + /** + * Decodes a ListConnectedSiteTagsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListConnectedSiteTagsResponse + * @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.ListConnectedSiteTagsResponse; + + /** + * Verifies a ListConnectedSiteTagsResponse 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 ListConnectedSiteTagsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListConnectedSiteTagsResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse; + + /** + * Creates a plain object from a ListConnectedSiteTagsResponse message. Also converts values to other types if specified. + * @param message ListConnectedSiteTagsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListConnectedSiteTagsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListConnectedSiteTagsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateAdSenseLinkRequest. */ + interface ICreateAdSenseLinkRequest { + + /** CreateAdSenseLinkRequest parent */ + parent?: (string|null); + + /** CreateAdSenseLinkRequest adsenseLink */ + adsenseLink?: (google.analytics.admin.v1alpha.IAdSenseLink|null); + } + + /** Represents a CreateAdSenseLinkRequest. */ + class CreateAdSenseLinkRequest implements ICreateAdSenseLinkRequest { + + /** + * Constructs a new CreateAdSenseLinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.ICreateAdSenseLinkRequest); + + /** CreateAdSenseLinkRequest parent. */ + public parent: string; + + /** CreateAdSenseLinkRequest adsenseLink. */ + public adsenseLink?: (google.analytics.admin.v1alpha.IAdSenseLink|null); + + /** + * Creates a new CreateAdSenseLinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateAdSenseLinkRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.ICreateAdSenseLinkRequest): google.analytics.admin.v1alpha.CreateAdSenseLinkRequest; + + /** + * Encodes the specified CreateAdSenseLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateAdSenseLinkRequest.verify|verify} messages. + * @param message CreateAdSenseLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.ICreateAdSenseLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateAdSenseLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateAdSenseLinkRequest.verify|verify} messages. + * @param message CreateAdSenseLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.ICreateAdSenseLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateAdSenseLinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateAdSenseLinkRequest + * @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.CreateAdSenseLinkRequest; + + /** + * Decodes a CreateAdSenseLinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateAdSenseLinkRequest + * @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.CreateAdSenseLinkRequest; + + /** + * Verifies a CreateAdSenseLinkRequest 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 CreateAdSenseLinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateAdSenseLinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.CreateAdSenseLinkRequest; + + /** + * Creates a plain object from a CreateAdSenseLinkRequest message. Also converts values to other types if specified. + * @param message CreateAdSenseLinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.CreateAdSenseLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateAdSenseLinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateAdSenseLinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetAdSenseLinkRequest. */ + interface IGetAdSenseLinkRequest { + + /** GetAdSenseLinkRequest name */ + name?: (string|null); + } + + /** Represents a GetAdSenseLinkRequest. */ + class GetAdSenseLinkRequest implements IGetAdSenseLinkRequest { + + /** + * Constructs a new GetAdSenseLinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IGetAdSenseLinkRequest); + + /** GetAdSenseLinkRequest name. */ + public name: string; + + /** + * Creates a new GetAdSenseLinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetAdSenseLinkRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IGetAdSenseLinkRequest): google.analytics.admin.v1alpha.GetAdSenseLinkRequest; + + /** + * Encodes the specified GetAdSenseLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetAdSenseLinkRequest.verify|verify} messages. + * @param message GetAdSenseLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IGetAdSenseLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetAdSenseLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetAdSenseLinkRequest.verify|verify} messages. + * @param message GetAdSenseLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IGetAdSenseLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetAdSenseLinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetAdSenseLinkRequest + * @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.GetAdSenseLinkRequest; + + /** + * Decodes a GetAdSenseLinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetAdSenseLinkRequest + * @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.GetAdSenseLinkRequest; + + /** + * Verifies a GetAdSenseLinkRequest 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 GetAdSenseLinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetAdSenseLinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GetAdSenseLinkRequest; + + /** + * Creates a plain object from a GetAdSenseLinkRequest message. Also converts values to other types if specified. + * @param message GetAdSenseLinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.GetAdSenseLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetAdSenseLinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetAdSenseLinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteAdSenseLinkRequest. */ + interface IDeleteAdSenseLinkRequest { + + /** DeleteAdSenseLinkRequest name */ + name?: (string|null); + } + + /** Represents a DeleteAdSenseLinkRequest. */ + class DeleteAdSenseLinkRequest implements IDeleteAdSenseLinkRequest { + + /** + * Constructs a new DeleteAdSenseLinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IDeleteAdSenseLinkRequest); + + /** DeleteAdSenseLinkRequest name. */ + public name: string; + + /** + * Creates a new DeleteAdSenseLinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteAdSenseLinkRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IDeleteAdSenseLinkRequest): google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest; + + /** + * Encodes the specified DeleteAdSenseLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest.verify|verify} messages. + * @param message DeleteAdSenseLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IDeleteAdSenseLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteAdSenseLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest.verify|verify} messages. + * @param message DeleteAdSenseLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IDeleteAdSenseLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteAdSenseLinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteAdSenseLinkRequest + * @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.DeleteAdSenseLinkRequest; + + /** + * Decodes a DeleteAdSenseLinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteAdSenseLinkRequest + * @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.DeleteAdSenseLinkRequest; + + /** + * Verifies a DeleteAdSenseLinkRequest 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 DeleteAdSenseLinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteAdSenseLinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest; + + /** + * Creates a plain object from a DeleteAdSenseLinkRequest message. Also converts values to other types if specified. + * @param message DeleteAdSenseLinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteAdSenseLinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteAdSenseLinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAdSenseLinksRequest. */ + interface IListAdSenseLinksRequest { + + /** ListAdSenseLinksRequest parent */ + parent?: (string|null); + + /** ListAdSenseLinksRequest pageSize */ + pageSize?: (number|null); + + /** ListAdSenseLinksRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListAdSenseLinksRequest. */ + class ListAdSenseLinksRequest implements IListAdSenseLinksRequest { + + /** + * Constructs a new ListAdSenseLinksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListAdSenseLinksRequest); + + /** ListAdSenseLinksRequest parent. */ + public parent: string; + + /** ListAdSenseLinksRequest pageSize. */ + public pageSize: number; + + /** ListAdSenseLinksRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListAdSenseLinksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAdSenseLinksRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListAdSenseLinksRequest): google.analytics.admin.v1alpha.ListAdSenseLinksRequest; + + /** + * Encodes the specified ListAdSenseLinksRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListAdSenseLinksRequest.verify|verify} messages. + * @param message ListAdSenseLinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListAdSenseLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAdSenseLinksRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListAdSenseLinksRequest.verify|verify} messages. + * @param message ListAdSenseLinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListAdSenseLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAdSenseLinksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAdSenseLinksRequest + * @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.ListAdSenseLinksRequest; + + /** + * Decodes a ListAdSenseLinksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAdSenseLinksRequest + * @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.ListAdSenseLinksRequest; + + /** + * Verifies a ListAdSenseLinksRequest 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 ListAdSenseLinksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAdSenseLinksRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListAdSenseLinksRequest; + + /** + * Creates a plain object from a ListAdSenseLinksRequest message. Also converts values to other types if specified. + * @param message ListAdSenseLinksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListAdSenseLinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAdSenseLinksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAdSenseLinksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAdSenseLinksResponse. */ + interface IListAdSenseLinksResponse { + + /** ListAdSenseLinksResponse adsenseLinks */ + adsenseLinks?: (google.analytics.admin.v1alpha.IAdSenseLink[]|null); + + /** ListAdSenseLinksResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListAdSenseLinksResponse. */ + class ListAdSenseLinksResponse implements IListAdSenseLinksResponse { + + /** + * Constructs a new ListAdSenseLinksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListAdSenseLinksResponse); + + /** ListAdSenseLinksResponse adsenseLinks. */ + public adsenseLinks: google.analytics.admin.v1alpha.IAdSenseLink[]; + + /** ListAdSenseLinksResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListAdSenseLinksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAdSenseLinksResponse instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListAdSenseLinksResponse): google.analytics.admin.v1alpha.ListAdSenseLinksResponse; + + /** + * Encodes the specified ListAdSenseLinksResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListAdSenseLinksResponse.verify|verify} messages. + * @param message ListAdSenseLinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListAdSenseLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAdSenseLinksResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListAdSenseLinksResponse.verify|verify} messages. + * @param message ListAdSenseLinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListAdSenseLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAdSenseLinksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAdSenseLinksResponse + * @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.ListAdSenseLinksResponse; + + /** + * Decodes a ListAdSenseLinksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAdSenseLinksResponse + * @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.ListAdSenseLinksResponse; + + /** + * Verifies a ListAdSenseLinksResponse 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 ListAdSenseLinksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAdSenseLinksResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListAdSenseLinksResponse; + + /** + * Creates a plain object from a ListAdSenseLinksResponse message. Also converts values to other types if specified. + * @param message ListAdSenseLinksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListAdSenseLinksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAdSenseLinksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAdSenseLinksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchConnectedGa4PropertyRequest. */ + interface IFetchConnectedGa4PropertyRequest { + + /** FetchConnectedGa4PropertyRequest property */ + property?: (string|null); + } + + /** Represents a FetchConnectedGa4PropertyRequest. */ + class FetchConnectedGa4PropertyRequest implements IFetchConnectedGa4PropertyRequest { + + /** + * Constructs a new FetchConnectedGa4PropertyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyRequest); + + /** FetchConnectedGa4PropertyRequest property. */ + public property: string; + + /** + * Creates a new FetchConnectedGa4PropertyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchConnectedGa4PropertyRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyRequest): google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest; + + /** + * Encodes the specified FetchConnectedGa4PropertyRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest.verify|verify} messages. + * @param message FetchConnectedGa4PropertyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchConnectedGa4PropertyRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest.verify|verify} messages. + * @param message FetchConnectedGa4PropertyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchConnectedGa4PropertyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchConnectedGa4PropertyRequest + * @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.FetchConnectedGa4PropertyRequest; + + /** + * Decodes a FetchConnectedGa4PropertyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchConnectedGa4PropertyRequest + * @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.FetchConnectedGa4PropertyRequest; + + /** + * Verifies a FetchConnectedGa4PropertyRequest 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 FetchConnectedGa4PropertyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchConnectedGa4PropertyRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest; + + /** + * Creates a plain object from a FetchConnectedGa4PropertyRequest message. Also converts values to other types if specified. + * @param message FetchConnectedGa4PropertyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchConnectedGa4PropertyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchConnectedGa4PropertyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchConnectedGa4PropertyResponse. */ + interface IFetchConnectedGa4PropertyResponse { + + /** FetchConnectedGa4PropertyResponse property */ + property?: (string|null); + } + + /** Represents a FetchConnectedGa4PropertyResponse. */ + class FetchConnectedGa4PropertyResponse implements IFetchConnectedGa4PropertyResponse { + + /** + * Constructs a new FetchConnectedGa4PropertyResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyResponse); + + /** FetchConnectedGa4PropertyResponse property. */ + public property: string; + + /** + * Creates a new FetchConnectedGa4PropertyResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchConnectedGa4PropertyResponse instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyResponse): google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse; + + /** + * Encodes the specified FetchConnectedGa4PropertyResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse.verify|verify} messages. + * @param message FetchConnectedGa4PropertyResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchConnectedGa4PropertyResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse.verify|verify} messages. + * @param message FetchConnectedGa4PropertyResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchConnectedGa4PropertyResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchConnectedGa4PropertyResponse + * @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.FetchConnectedGa4PropertyResponse; + + /** + * Decodes a FetchConnectedGa4PropertyResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchConnectedGa4PropertyResponse + * @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.FetchConnectedGa4PropertyResponse; + + /** + * Verifies a FetchConnectedGa4PropertyResponse 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 FetchConnectedGa4PropertyResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchConnectedGa4PropertyResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse; + + /** + * Creates a plain object from a FetchConnectedGa4PropertyResponse message. Also converts values to other types if specified. + * @param message FetchConnectedGa4PropertyResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchConnectedGa4PropertyResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchConnectedGa4PropertyResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateEventCreateRuleRequest. */ + interface ICreateEventCreateRuleRequest { + + /** CreateEventCreateRuleRequest parent */ + parent?: (string|null); + + /** CreateEventCreateRuleRequest eventCreateRule */ + eventCreateRule?: (google.analytics.admin.v1alpha.IEventCreateRule|null); + } + + /** Represents a CreateEventCreateRuleRequest. */ + class CreateEventCreateRuleRequest implements ICreateEventCreateRuleRequest { + + /** + * Constructs a new CreateEventCreateRuleRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.ICreateEventCreateRuleRequest); + + /** CreateEventCreateRuleRequest parent. */ + public parent: string; + + /** CreateEventCreateRuleRequest eventCreateRule. */ + public eventCreateRule?: (google.analytics.admin.v1alpha.IEventCreateRule|null); + + /** + * Creates a new CreateEventCreateRuleRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateEventCreateRuleRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.ICreateEventCreateRuleRequest): google.analytics.admin.v1alpha.CreateEventCreateRuleRequest; + + /** + * Encodes the specified CreateEventCreateRuleRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateEventCreateRuleRequest.verify|verify} messages. + * @param message CreateEventCreateRuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.ICreateEventCreateRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateEventCreateRuleRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateEventCreateRuleRequest.verify|verify} messages. + * @param message CreateEventCreateRuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.ICreateEventCreateRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateEventCreateRuleRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateEventCreateRuleRequest + * @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.CreateEventCreateRuleRequest; + + /** + * Decodes a CreateEventCreateRuleRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateEventCreateRuleRequest + * @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.CreateEventCreateRuleRequest; + + /** + * Verifies a CreateEventCreateRuleRequest 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 CreateEventCreateRuleRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateEventCreateRuleRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.CreateEventCreateRuleRequest; + + /** + * Creates a plain object from a CreateEventCreateRuleRequest message. Also converts values to other types if specified. + * @param message CreateEventCreateRuleRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.CreateEventCreateRuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateEventCreateRuleRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateEventCreateRuleRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateEventCreateRuleRequest. */ + interface IUpdateEventCreateRuleRequest { + + /** UpdateEventCreateRuleRequest eventCreateRule */ + eventCreateRule?: (google.analytics.admin.v1alpha.IEventCreateRule|null); + + /** UpdateEventCreateRuleRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateEventCreateRuleRequest. */ + class UpdateEventCreateRuleRequest implements IUpdateEventCreateRuleRequest { + + /** + * Constructs a new UpdateEventCreateRuleRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IUpdateEventCreateRuleRequest); + + /** UpdateEventCreateRuleRequest eventCreateRule. */ + public eventCreateRule?: (google.analytics.admin.v1alpha.IEventCreateRule|null); + + /** UpdateEventCreateRuleRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateEventCreateRuleRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateEventCreateRuleRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IUpdateEventCreateRuleRequest): google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest; + + /** + * Encodes the specified UpdateEventCreateRuleRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest.verify|verify} messages. + * @param message UpdateEventCreateRuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IUpdateEventCreateRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateEventCreateRuleRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest.verify|verify} messages. + * @param message UpdateEventCreateRuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IUpdateEventCreateRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateEventCreateRuleRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateEventCreateRuleRequest + * @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.UpdateEventCreateRuleRequest; + + /** + * Decodes an UpdateEventCreateRuleRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateEventCreateRuleRequest + * @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.UpdateEventCreateRuleRequest; + + /** + * Verifies an UpdateEventCreateRuleRequest 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 UpdateEventCreateRuleRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateEventCreateRuleRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest; + + /** + * Creates a plain object from an UpdateEventCreateRuleRequest message. Also converts values to other types if specified. + * @param message UpdateEventCreateRuleRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateEventCreateRuleRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateEventCreateRuleRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteEventCreateRuleRequest. */ + interface IDeleteEventCreateRuleRequest { + + /** DeleteEventCreateRuleRequest name */ + name?: (string|null); + } + + /** Represents a DeleteEventCreateRuleRequest. */ + class DeleteEventCreateRuleRequest implements IDeleteEventCreateRuleRequest { + + /** + * Constructs a new DeleteEventCreateRuleRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IDeleteEventCreateRuleRequest); + + /** DeleteEventCreateRuleRequest name. */ + public name: string; + + /** + * Creates a new DeleteEventCreateRuleRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteEventCreateRuleRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IDeleteEventCreateRuleRequest): google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest; + + /** + * Encodes the specified DeleteEventCreateRuleRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest.verify|verify} messages. + * @param message DeleteEventCreateRuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IDeleteEventCreateRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteEventCreateRuleRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest.verify|verify} messages. + * @param message DeleteEventCreateRuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IDeleteEventCreateRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteEventCreateRuleRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteEventCreateRuleRequest + * @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.DeleteEventCreateRuleRequest; + + /** + * Decodes a DeleteEventCreateRuleRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteEventCreateRuleRequest + * @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.DeleteEventCreateRuleRequest; + + /** + * Verifies a DeleteEventCreateRuleRequest 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 DeleteEventCreateRuleRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteEventCreateRuleRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest; + + /** + * Creates a plain object from a DeleteEventCreateRuleRequest message. Also converts values to other types if specified. + * @param message DeleteEventCreateRuleRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteEventCreateRuleRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteEventCreateRuleRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetEventCreateRuleRequest. */ + interface IGetEventCreateRuleRequest { + + /** GetEventCreateRuleRequest name */ + name?: (string|null); + } + + /** Represents a GetEventCreateRuleRequest. */ + class GetEventCreateRuleRequest implements IGetEventCreateRuleRequest { + + /** + * Constructs a new GetEventCreateRuleRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IGetEventCreateRuleRequest); + + /** GetEventCreateRuleRequest name. */ + public name: string; + + /** + * Creates a new GetEventCreateRuleRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetEventCreateRuleRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IGetEventCreateRuleRequest): google.analytics.admin.v1alpha.GetEventCreateRuleRequest; + + /** + * Encodes the specified GetEventCreateRuleRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetEventCreateRuleRequest.verify|verify} messages. + * @param message GetEventCreateRuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IGetEventCreateRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetEventCreateRuleRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetEventCreateRuleRequest.verify|verify} messages. + * @param message GetEventCreateRuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IGetEventCreateRuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetEventCreateRuleRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetEventCreateRuleRequest + * @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.GetEventCreateRuleRequest; + + /** + * Decodes a GetEventCreateRuleRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetEventCreateRuleRequest + * @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.GetEventCreateRuleRequest; + + /** + * Verifies a GetEventCreateRuleRequest 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 GetEventCreateRuleRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetEventCreateRuleRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GetEventCreateRuleRequest; + + /** + * Creates a plain object from a GetEventCreateRuleRequest message. Also converts values to other types if specified. + * @param message GetEventCreateRuleRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.GetEventCreateRuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetEventCreateRuleRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetEventCreateRuleRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListEventCreateRulesRequest. */ + interface IListEventCreateRulesRequest { + + /** ListEventCreateRulesRequest parent */ + parent?: (string|null); + + /** ListEventCreateRulesRequest pageSize */ + pageSize?: (number|null); + + /** ListEventCreateRulesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListEventCreateRulesRequest. */ + class ListEventCreateRulesRequest implements IListEventCreateRulesRequest { + + /** + * Constructs a new ListEventCreateRulesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListEventCreateRulesRequest); + + /** ListEventCreateRulesRequest parent. */ + public parent: string; + + /** ListEventCreateRulesRequest pageSize. */ + public pageSize: number; + + /** ListEventCreateRulesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListEventCreateRulesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEventCreateRulesRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListEventCreateRulesRequest): google.analytics.admin.v1alpha.ListEventCreateRulesRequest; + + /** + * Encodes the specified ListEventCreateRulesRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListEventCreateRulesRequest.verify|verify} messages. + * @param message ListEventCreateRulesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListEventCreateRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEventCreateRulesRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListEventCreateRulesRequest.verify|verify} messages. + * @param message ListEventCreateRulesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListEventCreateRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEventCreateRulesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEventCreateRulesRequest + * @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.ListEventCreateRulesRequest; + + /** + * Decodes a ListEventCreateRulesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEventCreateRulesRequest + * @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.ListEventCreateRulesRequest; + + /** + * Verifies a ListEventCreateRulesRequest 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 ListEventCreateRulesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEventCreateRulesRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListEventCreateRulesRequest; + + /** + * Creates a plain object from a ListEventCreateRulesRequest message. Also converts values to other types if specified. + * @param message ListEventCreateRulesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListEventCreateRulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEventCreateRulesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListEventCreateRulesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListEventCreateRulesResponse. */ + interface IListEventCreateRulesResponse { + + /** ListEventCreateRulesResponse eventCreateRules */ + eventCreateRules?: (google.analytics.admin.v1alpha.IEventCreateRule[]|null); + + /** ListEventCreateRulesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListEventCreateRulesResponse. */ + class ListEventCreateRulesResponse implements IListEventCreateRulesResponse { + + /** + * Constructs a new ListEventCreateRulesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListEventCreateRulesResponse); + + /** ListEventCreateRulesResponse eventCreateRules. */ + public eventCreateRules: google.analytics.admin.v1alpha.IEventCreateRule[]; + + /** ListEventCreateRulesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListEventCreateRulesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEventCreateRulesResponse instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListEventCreateRulesResponse): google.analytics.admin.v1alpha.ListEventCreateRulesResponse; + + /** + * Encodes the specified ListEventCreateRulesResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListEventCreateRulesResponse.verify|verify} messages. + * @param message ListEventCreateRulesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListEventCreateRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEventCreateRulesResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListEventCreateRulesResponse.verify|verify} messages. + * @param message ListEventCreateRulesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListEventCreateRulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEventCreateRulesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEventCreateRulesResponse + * @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.ListEventCreateRulesResponse; + + /** + * Decodes a ListEventCreateRulesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEventCreateRulesResponse + * @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.ListEventCreateRulesResponse; + + /** + * Verifies a ListEventCreateRulesResponse 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 ListEventCreateRulesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEventCreateRulesResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListEventCreateRulesResponse; + + /** + * Creates a plain object from a ListEventCreateRulesResponse message. Also converts values to other types if specified. + * @param message ListEventCreateRulesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListEventCreateRulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEventCreateRulesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListEventCreateRulesResponse + * @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, + AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT = 1, + AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION = 2, + AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS = 3 + } + + /** Properties of an AudienceDimensionOrMetricFilter. */ + interface IAudienceDimensionOrMetricFilter { + + /** AudienceDimensionOrMetricFilter stringFilter */ + stringFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter|null); + + /** AudienceDimensionOrMetricFilter inListFilter */ + inListFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter|null); + + /** AudienceDimensionOrMetricFilter numericFilter */ + numericFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter|null); + + /** AudienceDimensionOrMetricFilter betweenFilter */ + betweenFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter|null); + + /** AudienceDimensionOrMetricFilter fieldName */ + fieldName?: (string|null); + + /** AudienceDimensionOrMetricFilter atAnyPointInTime */ + atAnyPointInTime?: (boolean|null); + + /** AudienceDimensionOrMetricFilter inAnyNDayPeriod */ + inAnyNDayPeriod?: (number|null); + } + + /** Represents an AudienceDimensionOrMetricFilter. */ + class AudienceDimensionOrMetricFilter implements IAudienceDimensionOrMetricFilter { + + /** + * Constructs a new AudienceDimensionOrMetricFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter); + + /** AudienceDimensionOrMetricFilter stringFilter. */ + public stringFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter|null); + + /** AudienceDimensionOrMetricFilter inListFilter. */ + public inListFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter|null); + + /** AudienceDimensionOrMetricFilter numericFilter. */ + public numericFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter|null); + + /** AudienceDimensionOrMetricFilter betweenFilter. */ + public betweenFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter|null); + + /** AudienceDimensionOrMetricFilter fieldName. */ + public fieldName: string; + + /** AudienceDimensionOrMetricFilter atAnyPointInTime. */ + public atAnyPointInTime: boolean; + + /** AudienceDimensionOrMetricFilter inAnyNDayPeriod. */ + public inAnyNDayPeriod: number; + + /** AudienceDimensionOrMetricFilter oneFilter. */ + public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"); + + /** + * Creates a new AudienceDimensionOrMetricFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceDimensionOrMetricFilter instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter; + + /** + * Encodes the specified AudienceDimensionOrMetricFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.verify|verify} messages. + * @param message AudienceDimensionOrMetricFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceDimensionOrMetricFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.verify|verify} messages. + * @param message AudienceDimensionOrMetricFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceDimensionOrMetricFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceDimensionOrMetricFilter + * @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.AudienceDimensionOrMetricFilter; + + /** + * Decodes an AudienceDimensionOrMetricFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceDimensionOrMetricFilter + * @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.AudienceDimensionOrMetricFilter; + + /** + * Verifies an AudienceDimensionOrMetricFilter 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 AudienceDimensionOrMetricFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceDimensionOrMetricFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter; + + /** + * Creates a plain object from an AudienceDimensionOrMetricFilter message. Also converts values to other types if specified. + * @param message AudienceDimensionOrMetricFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceDimensionOrMetricFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceDimensionOrMetricFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AudienceDimensionOrMetricFilter { + + /** Properties of a StringFilter. */ + interface IStringFilter { + + /** StringFilter matchType */ + matchType?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType|keyof typeof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType|null); + + /** StringFilter value */ + value?: (string|null); + + /** StringFilter caseSensitive */ + caseSensitive?: (boolean|null); + } + + /** Represents a StringFilter. */ + class StringFilter implements IStringFilter { + + /** + * Constructs a new StringFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter); + + /** StringFilter matchType. */ + public matchType: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType|keyof typeof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType); + + /** StringFilter value. */ + public value: string; + + /** StringFilter caseSensitive. */ + public caseSensitive: boolean; + + /** + * Creates a new StringFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns StringFilter instance + */ + public static create(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter; + + /** + * Encodes the specified StringFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.verify|verify} messages. + * @param message StringFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StringFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.verify|verify} messages. + * @param message StringFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StringFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StringFilter + * @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.AudienceDimensionOrMetricFilter.StringFilter; + + /** + * Decodes a StringFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StringFilter + * @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.AudienceDimensionOrMetricFilter.StringFilter; + + /** + * Verifies a StringFilter 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 StringFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StringFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter; + + /** + * Creates a plain object from a StringFilter message. Also converts values to other types if specified. + * @param message StringFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StringFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StringFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace StringFilter { + + /** MatchType enum. */ + enum MatchType { + MATCH_TYPE_UNSPECIFIED = 0, + EXACT = 1, + BEGINS_WITH = 2, + ENDS_WITH = 3, + CONTAINS = 4, + FULL_REGEXP = 5 + } + } + + /** Properties of an InListFilter. */ + interface IInListFilter { + + /** InListFilter values */ + values?: (string[]|null); + + /** InListFilter caseSensitive */ + caseSensitive?: (boolean|null); + } + + /** Represents an InListFilter. */ + class InListFilter implements IInListFilter { + + /** + * Constructs a new InListFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter); + + /** InListFilter values. */ + public values: string[]; + + /** InListFilter caseSensitive. */ + public caseSensitive: boolean; + + /** + * Creates a new InListFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns InListFilter instance + */ + public static create(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter; + + /** + * Encodes the specified InListFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.verify|verify} messages. + * @param message InListFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InListFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.verify|verify} messages. + * @param message InListFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InListFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InListFilter + * @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.AudienceDimensionOrMetricFilter.InListFilter; + + /** + * Decodes an InListFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InListFilter + * @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.AudienceDimensionOrMetricFilter.InListFilter; + + /** + * Verifies an InListFilter 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 InListFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InListFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter; + + /** + * Creates a plain object from an InListFilter message. Also converts values to other types if specified. + * @param message InListFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InListFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InListFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NumericValue. */ + interface INumericValue { + + /** NumericValue int64Value */ + int64Value?: (number|Long|string|null); + + /** NumericValue doubleValue */ + doubleValue?: (number|null); + } + + /** Represents a NumericValue. */ + class NumericValue implements INumericValue { + + /** + * Constructs a new NumericValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue); + + /** NumericValue int64Value. */ + public int64Value?: (number|Long|string|null); + + /** NumericValue doubleValue. */ + public doubleValue?: (number|null); + + /** NumericValue oneValue. */ + public oneValue?: ("int64Value"|"doubleValue"); + + /** + * Creates a new NumericValue instance using the specified properties. + * @param [properties] Properties to set + * @returns NumericValue instance + */ + public static create(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue; + + /** + * Encodes the specified NumericValue message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify|verify} messages. + * @param message NumericValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NumericValue message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify|verify} messages. + * @param message NumericValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NumericValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NumericValue + * @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.AudienceDimensionOrMetricFilter.NumericValue; + + /** + * Decodes a NumericValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NumericValue + * @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.AudienceDimensionOrMetricFilter.NumericValue; + + /** + * Verifies a NumericValue 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 NumericValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NumericValue + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue; + + /** + * Creates a plain object from a NumericValue message. Also converts values to other types if specified. + * @param message NumericValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NumericValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NumericValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NumericFilter. */ + interface INumericFilter { + + /** NumericFilter operation */ + operation?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation|keyof typeof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation|null); + + /** NumericFilter value */ + value?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null); + } + + /** Represents a NumericFilter. */ + class NumericFilter implements INumericFilter { + + /** + * Constructs a new NumericFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter); + + /** NumericFilter operation. */ + public operation: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation|keyof typeof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation); + + /** NumericFilter value. */ + public value?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null); + + /** + * Creates a new NumericFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns NumericFilter instance + */ + public static create(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter; + + /** + * Encodes the specified NumericFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.verify|verify} messages. + * @param message NumericFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NumericFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.verify|verify} messages. + * @param message NumericFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NumericFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NumericFilter + * @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.AudienceDimensionOrMetricFilter.NumericFilter; + + /** + * Decodes a NumericFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NumericFilter + * @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.AudienceDimensionOrMetricFilter.NumericFilter; + + /** + * Verifies a NumericFilter 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 NumericFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NumericFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter; + + /** + * Creates a plain object from a NumericFilter message. Also converts values to other types if specified. + * @param message NumericFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NumericFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NumericFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NumericFilter { + + /** Operation enum. */ + enum Operation { + OPERATION_UNSPECIFIED = 0, + EQUAL = 1, + LESS_THAN = 2, + GREATER_THAN = 4 + } + } + + /** Properties of a BetweenFilter. */ + interface IBetweenFilter { + + /** BetweenFilter fromValue */ + fromValue?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null); + + /** BetweenFilter toValue */ + toValue?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null); + } + + /** Represents a BetweenFilter. */ + class BetweenFilter implements IBetweenFilter { + + /** + * Constructs a new BetweenFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter); + + /** BetweenFilter fromValue. */ + public fromValue?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null); + + /** BetweenFilter toValue. */ + public toValue?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null); + + /** + * Creates a new BetweenFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns BetweenFilter instance + */ + public static create(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter; + + /** + * Encodes the specified BetweenFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.verify|verify} messages. + * @param message BetweenFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BetweenFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.verify|verify} messages. + * @param message BetweenFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BetweenFilter + * @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.AudienceDimensionOrMetricFilter.BetweenFilter; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BetweenFilter + * @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.AudienceDimensionOrMetricFilter.BetweenFilter; + + /** + * Verifies a BetweenFilter 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 BetweenFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BetweenFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter; + + /** + * Creates a plain object from a BetweenFilter message. Also converts values to other types if specified. + * @param message BetweenFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BetweenFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BetweenFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an AudienceEventFilter. */ + interface IAudienceEventFilter { + + /** AudienceEventFilter eventName */ + eventName?: (string|null); + + /** AudienceEventFilter eventParameterFilterExpression */ + eventParameterFilterExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); + } + + /** Represents an AudienceEventFilter. */ + class AudienceEventFilter implements IAudienceEventFilter { + + /** + * Constructs a new AudienceEventFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAudienceEventFilter); + + /** AudienceEventFilter eventName. */ + public eventName: string; + + /** AudienceEventFilter eventParameterFilterExpression. */ + public eventParameterFilterExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); + + /** + * Creates a new AudienceEventFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceEventFilter instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAudienceEventFilter): google.analytics.admin.v1alpha.AudienceEventFilter; + + /** + * Encodes the specified AudienceEventFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventFilter.verify|verify} messages. + * @param message AudienceEventFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAudienceEventFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceEventFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventFilter.verify|verify} messages. + * @param message AudienceEventFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceEventFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceEventFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceEventFilter + * @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.AudienceEventFilter; + + /** + * Decodes an AudienceEventFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceEventFilter + * @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.AudienceEventFilter; + + /** + * Verifies an AudienceEventFilter 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 AudienceEventFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceEventFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceEventFilter; + + /** + * Creates a plain object from an AudienceEventFilter message. Also converts values to other types if specified. + * @param message AudienceEventFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceEventFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceEventFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceEventFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AudienceFilterExpression. */ + interface IAudienceFilterExpression { + + /** AudienceFilterExpression andGroup */ + andGroup?: (google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null); + + /** AudienceFilterExpression orGroup */ + orGroup?: (google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null); + + /** AudienceFilterExpression notExpression */ + notExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); + + /** AudienceFilterExpression dimensionOrMetricFilter */ + dimensionOrMetricFilter?: (google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter|null); + + /** AudienceFilterExpression eventFilter */ + eventFilter?: (google.analytics.admin.v1alpha.IAudienceEventFilter|null); + } + + /** Represents an AudienceFilterExpression. */ + class AudienceFilterExpression implements IAudienceFilterExpression { + + /** + * Constructs a new AudienceFilterExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAudienceFilterExpression); + + /** AudienceFilterExpression andGroup. */ + public andGroup?: (google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null); + + /** AudienceFilterExpression orGroup. */ + public orGroup?: (google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null); + + /** AudienceFilterExpression notExpression. */ + public notExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); + + /** AudienceFilterExpression dimensionOrMetricFilter. */ + public dimensionOrMetricFilter?: (google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter|null); + + /** AudienceFilterExpression eventFilter. */ + public eventFilter?: (google.analytics.admin.v1alpha.IAudienceEventFilter|null); + + /** AudienceFilterExpression expr. */ + public expr?: ("andGroup"|"orGroup"|"notExpression"|"dimensionOrMetricFilter"|"eventFilter"); + + /** + * Creates a new AudienceFilterExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceFilterExpression instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAudienceFilterExpression): google.analytics.admin.v1alpha.AudienceFilterExpression; + + /** + * Encodes the specified AudienceFilterExpression message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpression.verify|verify} messages. + * @param message AudienceFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAudienceFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceFilterExpression message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpression.verify|verify} messages. + * @param message AudienceFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceFilterExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceFilterExpression + * @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.AudienceFilterExpression; + + /** + * Decodes an AudienceFilterExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceFilterExpression + * @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.AudienceFilterExpression; + + /** + * Verifies an AudienceFilterExpression 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 AudienceFilterExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceFilterExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceFilterExpression; + + /** + * Creates a plain object from an AudienceFilterExpression message. Also converts values to other types if specified. + * @param message AudienceFilterExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceFilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceFilterExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceFilterExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AudienceFilterExpressionList. */ + interface IAudienceFilterExpressionList { + + /** AudienceFilterExpressionList filterExpressions */ + filterExpressions?: (google.analytics.admin.v1alpha.IAudienceFilterExpression[]|null); + } + + /** Represents an AudienceFilterExpressionList. */ + class AudienceFilterExpressionList implements IAudienceFilterExpressionList { + + /** + * Constructs a new AudienceFilterExpressionList. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAudienceFilterExpressionList); + + /** AudienceFilterExpressionList filterExpressions. */ + public filterExpressions: google.analytics.admin.v1alpha.IAudienceFilterExpression[]; + + /** + * Creates a new AudienceFilterExpressionList instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceFilterExpressionList instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAudienceFilterExpressionList): google.analytics.admin.v1alpha.AudienceFilterExpressionList; + + /** + * Encodes the specified AudienceFilterExpressionList message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpressionList.verify|verify} messages. + * @param message AudienceFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAudienceFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpressionList.verify|verify} messages. + * @param message AudienceFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceFilterExpressionList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceFilterExpressionList + * @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.AudienceFilterExpressionList; + + /** + * Decodes an AudienceFilterExpressionList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceFilterExpressionList + * @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.AudienceFilterExpressionList; + + /** + * Verifies an AudienceFilterExpressionList 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 AudienceFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceFilterExpressionList + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceFilterExpressionList; + + /** + * Creates a plain object from an AudienceFilterExpressionList message. Also converts values to other types if specified. + * @param message AudienceFilterExpressionList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceFilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceFilterExpressionList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceFilterExpressionList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AudienceSimpleFilter. */ + interface IAudienceSimpleFilter { + + /** AudienceSimpleFilter scope */ + scope?: (google.analytics.admin.v1alpha.AudienceFilterScope|keyof typeof google.analytics.admin.v1alpha.AudienceFilterScope|null); + + /** AudienceSimpleFilter filterExpression */ + filterExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); + } + + /** Represents an AudienceSimpleFilter. */ + class AudienceSimpleFilter implements IAudienceSimpleFilter { + + /** + * Constructs a new AudienceSimpleFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAudienceSimpleFilter); + + /** AudienceSimpleFilter scope. */ + public scope: (google.analytics.admin.v1alpha.AudienceFilterScope|keyof typeof google.analytics.admin.v1alpha.AudienceFilterScope); + + /** AudienceSimpleFilter filterExpression. */ + public filterExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); + + /** + * Creates a new AudienceSimpleFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceSimpleFilter instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAudienceSimpleFilter): google.analytics.admin.v1alpha.AudienceSimpleFilter; + + /** + * Encodes the specified AudienceSimpleFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSimpleFilter.verify|verify} messages. + * @param message AudienceSimpleFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAudienceSimpleFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceSimpleFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSimpleFilter.verify|verify} messages. + * @param message AudienceSimpleFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceSimpleFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceSimpleFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceSimpleFilter + * @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.AudienceSimpleFilter; + + /** + * Decodes an AudienceSimpleFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceSimpleFilter + * @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.AudienceSimpleFilter; + + /** + * Verifies an AudienceSimpleFilter 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 AudienceSimpleFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceSimpleFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceSimpleFilter; + + /** + * Creates a plain object from an AudienceSimpleFilter message. Also converts values to other types if specified. + * @param message AudienceSimpleFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceSimpleFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceSimpleFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceSimpleFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AudienceSequenceFilter. */ + interface IAudienceSequenceFilter { + + /** AudienceSequenceFilter scope */ + scope?: (google.analytics.admin.v1alpha.AudienceFilterScope|keyof typeof google.analytics.admin.v1alpha.AudienceFilterScope|null); + + /** AudienceSequenceFilter sequenceMaximumDuration */ + sequenceMaximumDuration?: (google.protobuf.IDuration|null); + + /** AudienceSequenceFilter sequenceSteps */ + sequenceSteps?: (google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep[]|null); + } + + /** Represents an AudienceSequenceFilter. */ + class AudienceSequenceFilter implements IAudienceSequenceFilter { + + /** + * Constructs a new AudienceSequenceFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAudienceSequenceFilter); + + /** AudienceSequenceFilter scope. */ + public scope: (google.analytics.admin.v1alpha.AudienceFilterScope|keyof typeof google.analytics.admin.v1alpha.AudienceFilterScope); + + /** AudienceSequenceFilter sequenceMaximumDuration. */ + public sequenceMaximumDuration?: (google.protobuf.IDuration|null); + + /** AudienceSequenceFilter sequenceSteps. */ + public sequenceSteps: google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep[]; + + /** + * Creates a new AudienceSequenceFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceSequenceFilter instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAudienceSequenceFilter): google.analytics.admin.v1alpha.AudienceSequenceFilter; + + /** + * Encodes the specified AudienceSequenceFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.verify|verify} messages. + * @param message AudienceSequenceFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAudienceSequenceFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceSequenceFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.verify|verify} messages. + * @param message AudienceSequenceFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceSequenceFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceSequenceFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceSequenceFilter + * @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.AudienceSequenceFilter; + + /** + * Decodes an AudienceSequenceFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceSequenceFilter + * @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.AudienceSequenceFilter; + + /** + * Verifies an AudienceSequenceFilter 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 AudienceSequenceFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceSequenceFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceSequenceFilter; + + /** + * Creates a plain object from an AudienceSequenceFilter message. Also converts values to other types if specified. + * @param message AudienceSequenceFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceSequenceFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceSequenceFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceSequenceFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AudienceSequenceFilter { + + /** Properties of an AudienceSequenceStep. */ + interface IAudienceSequenceStep { + + /** AudienceSequenceStep scope */ + scope?: (google.analytics.admin.v1alpha.AudienceFilterScope|keyof typeof google.analytics.admin.v1alpha.AudienceFilterScope|null); + + /** AudienceSequenceStep immediatelyFollows */ + immediatelyFollows?: (boolean|null); + + /** AudienceSequenceStep constraintDuration */ + constraintDuration?: (google.protobuf.IDuration|null); + + /** AudienceSequenceStep filterExpression */ + filterExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); + } + + /** Represents an AudienceSequenceStep. */ + class AudienceSequenceStep implements IAudienceSequenceStep { + + /** + * Constructs a new AudienceSequenceStep. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep); + + /** AudienceSequenceStep scope. */ + public scope: (google.analytics.admin.v1alpha.AudienceFilterScope|keyof typeof google.analytics.admin.v1alpha.AudienceFilterScope); + + /** AudienceSequenceStep immediatelyFollows. */ + public immediatelyFollows: boolean; + + /** AudienceSequenceStep constraintDuration. */ + public constraintDuration?: (google.protobuf.IDuration|null); + + /** AudienceSequenceStep filterExpression. */ + public filterExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); /** - * Encodes the specified StringFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.verify|verify} messages. - * @param message StringFilter message or plain object to encode + * Creates a new AudienceSequenceStep instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceSequenceStep instance + */ + public static create(properties?: google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep): google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep; + + /** + * Encodes the specified AudienceSequenceStep message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.verify|verify} messages. + * @param message AudienceSequenceStep message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceSequenceStep message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.verify|verify} messages. + * @param message AudienceSequenceStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceSequenceStep message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceSequenceStep + * @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.AudienceSequenceFilter.AudienceSequenceStep; + + /** + * Decodes an AudienceSequenceStep message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceSequenceStep + * @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.AudienceSequenceFilter.AudienceSequenceStep; + + /** + * Verifies an AudienceSequenceStep 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 AudienceSequenceStep message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceSequenceStep + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep; + + /** + * Creates a plain object from an AudienceSequenceStep message. Also converts values to other types if specified. + * @param message AudienceSequenceStep + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceSequenceStep to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceSequenceStep + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an AudienceFilterClause. */ + interface IAudienceFilterClause { + + /** AudienceFilterClause simpleFilter */ + simpleFilter?: (google.analytics.admin.v1alpha.IAudienceSimpleFilter|null); + + /** AudienceFilterClause sequenceFilter */ + sequenceFilter?: (google.analytics.admin.v1alpha.IAudienceSequenceFilter|null); + + /** AudienceFilterClause clauseType */ + clauseType?: (google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType|keyof typeof google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType|null); + } + + /** Represents an AudienceFilterClause. */ + class AudienceFilterClause implements IAudienceFilterClause { + + /** + * Constructs a new AudienceFilterClause. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAudienceFilterClause); + + /** AudienceFilterClause simpleFilter. */ + public simpleFilter?: (google.analytics.admin.v1alpha.IAudienceSimpleFilter|null); + + /** AudienceFilterClause sequenceFilter. */ + public sequenceFilter?: (google.analytics.admin.v1alpha.IAudienceSequenceFilter|null); + + /** AudienceFilterClause clauseType. */ + public clauseType: (google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType|keyof typeof google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType); + + /** AudienceFilterClause filter. */ + public filter?: ("simpleFilter"|"sequenceFilter"); + + /** + * Creates a new AudienceFilterClause instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceFilterClause instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAudienceFilterClause): google.analytics.admin.v1alpha.AudienceFilterClause; + + /** + * Encodes the specified AudienceFilterClause message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterClause.verify|verify} messages. + * @param message AudienceFilterClause message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAudienceFilterClause, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceFilterClause message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterClause.verify|verify} messages. + * @param message AudienceFilterClause message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceFilterClause, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceFilterClause message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceFilterClause + * @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.AudienceFilterClause; + + /** + * Decodes an AudienceFilterClause message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceFilterClause + * @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.AudienceFilterClause; + + /** + * Verifies an AudienceFilterClause 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 AudienceFilterClause message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceFilterClause + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceFilterClause; + + /** + * Creates a plain object from an AudienceFilterClause message. Also converts values to other types if specified. + * @param message AudienceFilterClause + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceFilterClause, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceFilterClause to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceFilterClause + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AudienceFilterClause { + + /** AudienceClauseType enum. */ + enum AudienceClauseType { + AUDIENCE_CLAUSE_TYPE_UNSPECIFIED = 0, + INCLUDE = 1, + EXCLUDE = 2 + } + } + + /** Properties of an AudienceEventTrigger. */ + interface IAudienceEventTrigger { + + /** AudienceEventTrigger eventName */ + eventName?: (string|null); + + /** AudienceEventTrigger logCondition */ + logCondition?: (google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition|keyof typeof google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition|null); + } + + /** Represents an AudienceEventTrigger. */ + class AudienceEventTrigger implements IAudienceEventTrigger { + + /** + * Constructs a new AudienceEventTrigger. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAudienceEventTrigger); + + /** AudienceEventTrigger eventName. */ + public eventName: string; + + /** AudienceEventTrigger logCondition. */ + public logCondition: (google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition|keyof typeof google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition); + + /** + * Creates a new AudienceEventTrigger instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceEventTrigger instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAudienceEventTrigger): google.analytics.admin.v1alpha.AudienceEventTrigger; + + /** + * Encodes the specified AudienceEventTrigger message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventTrigger.verify|verify} messages. + * @param message AudienceEventTrigger message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAudienceEventTrigger, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceEventTrigger message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventTrigger.verify|verify} messages. + * @param message AudienceEventTrigger message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceEventTrigger, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceEventTrigger message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceEventTrigger + * @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.AudienceEventTrigger; - /** - * Encodes the specified StringFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.verify|verify} messages. - * @param message StringFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes an AudienceEventTrigger message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceEventTrigger + * @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.AudienceEventTrigger; - /** - * Decodes a StringFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StringFilter - * @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.AudienceDimensionOrMetricFilter.StringFilter; + /** + * Verifies an AudienceEventTrigger 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); - /** - * Decodes a StringFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StringFilter - * @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.AudienceDimensionOrMetricFilter.StringFilter; + /** + * Creates an AudienceEventTrigger message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceEventTrigger + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceEventTrigger; - /** - * Verifies a StringFilter 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 plain object from an AudienceEventTrigger message. Also converts values to other types if specified. + * @param message AudienceEventTrigger + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceEventTrigger, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a StringFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StringFilter - */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter; + /** + * Converts this AudienceEventTrigger to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a plain object from a StringFilter message. Also converts values to other types if specified. - * @param message StringFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Gets the default type url for AudienceEventTrigger + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Converts this StringFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + namespace AudienceEventTrigger { - /** - * Gets the default type url for StringFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** LogCondition enum. */ + enum LogCondition { + LOG_CONDITION_UNSPECIFIED = 0, + AUDIENCE_JOINED = 1, + AUDIENCE_MEMBERSHIP_RENEWED = 2 } + } - namespace StringFilter { + /** Properties of an Audience. */ + interface IAudience { - /** MatchType enum. */ - enum MatchType { - MATCH_TYPE_UNSPECIFIED = 0, - EXACT = 1, - BEGINS_WITH = 2, - ENDS_WITH = 3, - CONTAINS = 4, - FULL_REGEXP = 5 - } - } + /** Audience name */ + name?: (string|null); - /** Properties of an InListFilter. */ - interface IInListFilter { + /** Audience displayName */ + displayName?: (string|null); - /** InListFilter values */ - values?: (string[]|null); + /** Audience description */ + description?: (string|null); - /** InListFilter caseSensitive */ - caseSensitive?: (boolean|null); - } + /** Audience membershipDurationDays */ + membershipDurationDays?: (number|null); - /** Represents an InListFilter. */ - class InListFilter implements IInListFilter { + /** Audience adsPersonalizationEnabled */ + adsPersonalizationEnabled?: (boolean|null); - /** - * Constructs a new InListFilter. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter); + /** Audience eventTrigger */ + eventTrigger?: (google.analytics.admin.v1alpha.IAudienceEventTrigger|null); - /** InListFilter values. */ - public values: string[]; + /** Audience exclusionDurationMode */ + exclusionDurationMode?: (google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode|keyof typeof google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode|null); - /** InListFilter caseSensitive. */ - public caseSensitive: boolean; + /** Audience filterClauses */ + filterClauses?: (google.analytics.admin.v1alpha.IAudienceFilterClause[]|null); + } - /** - * Creates a new InListFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns InListFilter instance - */ - public static create(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter; + /** Represents an Audience. */ + class Audience implements IAudience { - /** - * Encodes the specified InListFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.verify|verify} messages. - * @param message InListFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new Audience. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAudience); - /** - * Encodes the specified InListFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.verify|verify} messages. - * @param message InListFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; + /** Audience name. */ + public name: string; - /** - * Decodes an InListFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InListFilter - * @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.AudienceDimensionOrMetricFilter.InListFilter; + /** Audience displayName. */ + public displayName: string; + + /** Audience description. */ + public description: string; + + /** Audience membershipDurationDays. */ + public membershipDurationDays: number; + + /** Audience adsPersonalizationEnabled. */ + public adsPersonalizationEnabled: boolean; + + /** Audience eventTrigger. */ + public eventTrigger?: (google.analytics.admin.v1alpha.IAudienceEventTrigger|null); + + /** Audience exclusionDurationMode. */ + public exclusionDurationMode: (google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode|keyof typeof google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode); + + /** Audience filterClauses. */ + public filterClauses: google.analytics.admin.v1alpha.IAudienceFilterClause[]; + + /** + * Creates a new Audience instance using the specified properties. + * @param [properties] Properties to set + * @returns Audience instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAudience): google.analytics.admin.v1alpha.Audience; + + /** + * Encodes the specified Audience message. Does not implicitly {@link google.analytics.admin.v1alpha.Audience.verify|verify} messages. + * @param message Audience message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAudience, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Audience message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.Audience.verify|verify} messages. + * @param message Audience message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudience, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Audience message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Audience + * @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.Audience; + + /** + * Decodes an Audience message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Audience + * @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.Audience; + + /** + * Verifies an Audience 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); - /** - * Decodes an InListFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InListFilter - * @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.AudienceDimensionOrMetricFilter.InListFilter; + /** + * Creates an Audience message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Audience + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.Audience; - /** - * Verifies an InListFilter 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 plain object from an Audience message. Also converts values to other types if specified. + * @param message Audience + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.Audience, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates an InListFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InListFilter - */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter; + /** + * Converts this Audience to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a plain object from an InListFilter message. Also converts values to other types if specified. - * @param message InListFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Gets the default type url for Audience + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Converts this InListFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + namespace Audience { - /** - * Gets the default type url for InListFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** AudienceExclusionDurationMode enum. */ + enum AudienceExclusionDurationMode { + AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED = 0, + EXCLUDE_TEMPORARILY = 1, + EXCLUDE_PERMANENTLY = 2 } + } - /** Properties of a NumericValue. */ - interface INumericValue { + /** Properties of a ChannelGroupFilter. */ + interface IChannelGroupFilter { - /** NumericValue int64Value */ - int64Value?: (number|Long|string|null); + /** ChannelGroupFilter stringFilter */ + stringFilter?: (google.analytics.admin.v1alpha.ChannelGroupFilter.IStringFilter|null); - /** NumericValue doubleValue */ - doubleValue?: (number|null); - } + /** ChannelGroupFilter inListFilter */ + inListFilter?: (google.analytics.admin.v1alpha.ChannelGroupFilter.IInListFilter|null); - /** Represents a NumericValue. */ - class NumericValue implements INumericValue { + /** ChannelGroupFilter fieldName */ + fieldName?: (string|null); + } - /** - * Constructs a new NumericValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue); + /** Represents a ChannelGroupFilter. */ + class ChannelGroupFilter implements IChannelGroupFilter { - /** NumericValue int64Value. */ - public int64Value?: (number|Long|string|null); + /** + * Constructs a new ChannelGroupFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IChannelGroupFilter); - /** NumericValue doubleValue. */ - public doubleValue?: (number|null); + /** ChannelGroupFilter stringFilter. */ + public stringFilter?: (google.analytics.admin.v1alpha.ChannelGroupFilter.IStringFilter|null); - /** NumericValue oneValue. */ - public oneValue?: ("int64Value"|"doubleValue"); + /** ChannelGroupFilter inListFilter. */ + public inListFilter?: (google.analytics.admin.v1alpha.ChannelGroupFilter.IInListFilter|null); - /** - * Creates a new NumericValue instance using the specified properties. - * @param [properties] Properties to set - * @returns NumericValue instance - */ - public static create(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue; + /** ChannelGroupFilter fieldName. */ + public fieldName: string; - /** - * Encodes the specified NumericValue message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify|verify} messages. - * @param message NumericValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** ChannelGroupFilter valueFilter. */ + public valueFilter?: ("stringFilter"|"inListFilter"); - /** - * Encodes the specified NumericValue message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify|verify} messages. - * @param message NumericValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new ChannelGroupFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns ChannelGroupFilter instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IChannelGroupFilter): google.analytics.admin.v1alpha.ChannelGroupFilter; - /** - * Decodes a NumericValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NumericValue - * @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.AudienceDimensionOrMetricFilter.NumericValue; + /** + * Encodes the specified ChannelGroupFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.ChannelGroupFilter.verify|verify} messages. + * @param message ChannelGroupFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IChannelGroupFilter, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a NumericValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NumericValue - * @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.AudienceDimensionOrMetricFilter.NumericValue; + /** + * Encodes the specified ChannelGroupFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ChannelGroupFilter.verify|verify} messages. + * @param message ChannelGroupFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IChannelGroupFilter, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a NumericValue 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); + /** + * Decodes a ChannelGroupFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChannelGroupFilter + * @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.ChannelGroupFilter; - /** - * Creates a NumericValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NumericValue - */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue; + /** + * Decodes a ChannelGroupFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChannelGroupFilter + * @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.ChannelGroupFilter; - /** - * Creates a plain object from a NumericValue message. Also converts values to other types if specified. - * @param message NumericValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a ChannelGroupFilter 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); - /** - * Converts this NumericValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a ChannelGroupFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChannelGroupFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ChannelGroupFilter; - /** - * Gets the default type url for NumericValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a plain object from a ChannelGroupFilter message. Also converts values to other types if specified. + * @param message ChannelGroupFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ChannelGroupFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of a NumericFilter. */ - interface INumericFilter { + /** + * Converts this ChannelGroupFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** NumericFilter operation */ - operation?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation|keyof typeof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation|null); + /** + * Gets the default type url for ChannelGroupFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** NumericFilter value */ - value?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null); + namespace ChannelGroupFilter { + + /** Properties of a StringFilter. */ + interface IStringFilter { + + /** StringFilter matchType */ + matchType?: (google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter.MatchType|keyof typeof google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter.MatchType|null); + + /** StringFilter value */ + value?: (string|null); } - /** Represents a NumericFilter. */ - class NumericFilter implements INumericFilter { + /** Represents a StringFilter. */ + class StringFilter implements IStringFilter { /** - * Constructs a new NumericFilter. + * Constructs a new StringFilter. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter); + constructor(properties?: google.analytics.admin.v1alpha.ChannelGroupFilter.IStringFilter); - /** NumericFilter operation. */ - public operation: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation|keyof typeof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation); + /** StringFilter matchType. */ + public matchType: (google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter.MatchType|keyof typeof google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter.MatchType); - /** NumericFilter value. */ - public value?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null); + /** StringFilter value. */ + public value: string; /** - * Creates a new NumericFilter instance using the specified properties. + * Creates a new StringFilter instance using the specified properties. * @param [properties] Properties to set - * @returns NumericFilter instance + * @returns StringFilter instance */ - public static create(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter; + public static create(properties?: google.analytics.admin.v1alpha.ChannelGroupFilter.IStringFilter): google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter; /** - * Encodes the specified NumericFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.verify|verify} messages. - * @param message NumericFilter message or plain object to encode + * Encodes the specified StringFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter.verify|verify} messages. + * @param message StringFilter message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.ChannelGroupFilter.IStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified NumericFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.verify|verify} messages. - * @param message NumericFilter message or plain object to encode + * Encodes the specified StringFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter.verify|verify} messages. + * @param message StringFilter message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.ChannelGroupFilter.IStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NumericFilter message from the specified reader or buffer. + * Decodes a StringFilter message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NumericFilter + * @returns StringFilter * @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.AudienceDimensionOrMetricFilter.NumericFilter; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter; /** - * Decodes a NumericFilter message from the specified reader or buffer, length delimited. + * Decodes a StringFilter message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NumericFilter + * @returns StringFilter * @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.AudienceDimensionOrMetricFilter.NumericFilter; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter; /** - * Verifies a NumericFilter message. + * Verifies a StringFilter 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 NumericFilter message from a plain object. Also converts values to their respective internal types. + * Creates a StringFilter message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NumericFilter + * @returns StringFilter */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter; /** - * Creates a plain object from a NumericFilter message. Also converts values to other types if specified. - * @param message NumericFilter + * Creates a plain object from a StringFilter message. Also converts values to other types if specified. + * @param message StringFilter * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NumericFilter to JSON. + * Converts this StringFilter to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for NumericFilter + * Gets the default type url for StringFilter * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace NumericFilter { + namespace StringFilter { - /** Operation enum. */ - enum Operation { - OPERATION_UNSPECIFIED = 0, - EQUAL = 1, - LESS_THAN = 2, - GREATER_THAN = 4 + /** MatchType enum. */ + enum MatchType { + MATCH_TYPE_UNSPECIFIED = 0, + EXACT = 1, + BEGINS_WITH = 2, + ENDS_WITH = 3, + CONTAINS = 4, + FULL_REGEXP = 5, + PARTIAL_REGEXP = 6 } } - /** Properties of a BetweenFilter. */ - interface IBetweenFilter { - - /** BetweenFilter fromValue */ - fromValue?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null); + /** Properties of an InListFilter. */ + interface IInListFilter { - /** BetweenFilter toValue */ - toValue?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null); + /** InListFilter values */ + values?: (string[]|null); } - /** Represents a BetweenFilter. */ - class BetweenFilter implements IBetweenFilter { + /** Represents an InListFilter. */ + class InListFilter implements IInListFilter { /** - * Constructs a new BetweenFilter. + * Constructs a new InListFilter. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter); - - /** BetweenFilter fromValue. */ - public fromValue?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null); + constructor(properties?: google.analytics.admin.v1alpha.ChannelGroupFilter.IInListFilter); - /** BetweenFilter toValue. */ - public toValue?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null); + /** InListFilter values. */ + public values: string[]; /** - * Creates a new BetweenFilter instance using the specified properties. + * Creates a new InListFilter instance using the specified properties. * @param [properties] Properties to set - * @returns BetweenFilter instance + * @returns InListFilter instance */ - public static create(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter; + public static create(properties?: google.analytics.admin.v1alpha.ChannelGroupFilter.IInListFilter): google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter; /** - * Encodes the specified BetweenFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.verify|verify} messages. - * @param message BetweenFilter message or plain object to encode + * Encodes the specified InListFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter.verify|verify} messages. + * @param message InListFilter message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.ChannelGroupFilter.IInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BetweenFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.verify|verify} messages. - * @param message BetweenFilter message or plain object to encode + * Encodes the specified InListFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter.verify|verify} messages. + * @param message InListFilter message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.ChannelGroupFilter.IInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BetweenFilter message from the specified reader or buffer. + * Decodes an InListFilter message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BetweenFilter + * @returns InListFilter * @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.AudienceDimensionOrMetricFilter.BetweenFilter; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter; /** - * Decodes a BetweenFilter message from the specified reader or buffer, length delimited. + * Decodes an InListFilter message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BetweenFilter + * @returns InListFilter * @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.AudienceDimensionOrMetricFilter.BetweenFilter; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter; /** - * Verifies a BetweenFilter message. + * Verifies an InListFilter 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 BetweenFilter message from a plain object. Also converts values to their respective internal types. + * Creates an InListFilter message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BetweenFilter + * @returns InListFilter */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter; /** - * Creates a plain object from a BetweenFilter message. Also converts values to other types if specified. - * @param message BetweenFilter + * Creates a plain object from an InListFilter message. Also converts values to other types if specified. + * @param message InListFilter * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BetweenFilter to JSON. + * Converts this InListFilter to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for BetweenFilter + * Gets the default type url for InListFilter * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -19623,1041 +23232,803 @@ export namespace google { } } - /** Properties of an AudienceEventFilter. */ - interface IAudienceEventFilter { - - /** AudienceEventFilter eventName */ - eventName?: (string|null); - - /** AudienceEventFilter eventParameterFilterExpression */ - eventParameterFilterExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); - } - - /** Represents an AudienceEventFilter. */ - class AudienceEventFilter implements IAudienceEventFilter { - - /** - * Constructs a new AudienceEventFilter. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.admin.v1alpha.IAudienceEventFilter); - - /** AudienceEventFilter eventName. */ - public eventName: string; - - /** AudienceEventFilter eventParameterFilterExpression. */ - public eventParameterFilterExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); - - /** - * Creates a new AudienceEventFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns AudienceEventFilter instance - */ - public static create(properties?: google.analytics.admin.v1alpha.IAudienceEventFilter): google.analytics.admin.v1alpha.AudienceEventFilter; - - /** - * Encodes the specified AudienceEventFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventFilter.verify|verify} messages. - * @param message AudienceEventFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.admin.v1alpha.IAudienceEventFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AudienceEventFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventFilter.verify|verify} messages. - * @param message AudienceEventFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceEventFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AudienceEventFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AudienceEventFilter - * @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.AudienceEventFilter; - - /** - * Decodes an AudienceEventFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AudienceEventFilter - * @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.AudienceEventFilter; - - /** - * Verifies an AudienceEventFilter 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 AudienceEventFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AudienceEventFilter - */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceEventFilter; - - /** - * Creates a plain object from an AudienceEventFilter message. Also converts values to other types if specified. - * @param message AudienceEventFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.admin.v1alpha.AudienceEventFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AudienceEventFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AudienceEventFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AudienceFilterExpression. */ - interface IAudienceFilterExpression { - - /** AudienceFilterExpression andGroup */ - andGroup?: (google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null); + /** Properties of a ChannelGroupFilterExpression. */ + interface IChannelGroupFilterExpression { - /** AudienceFilterExpression orGroup */ - orGroup?: (google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null); + /** ChannelGroupFilterExpression andGroup */ + andGroup?: (google.analytics.admin.v1alpha.IChannelGroupFilterExpressionList|null); - /** AudienceFilterExpression notExpression */ - notExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); + /** ChannelGroupFilterExpression orGroup */ + orGroup?: (google.analytics.admin.v1alpha.IChannelGroupFilterExpressionList|null); - /** AudienceFilterExpression dimensionOrMetricFilter */ - dimensionOrMetricFilter?: (google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter|null); + /** ChannelGroupFilterExpression notExpression */ + notExpression?: (google.analytics.admin.v1alpha.IChannelGroupFilterExpression|null); - /** AudienceFilterExpression eventFilter */ - eventFilter?: (google.analytics.admin.v1alpha.IAudienceEventFilter|null); + /** ChannelGroupFilterExpression filter */ + filter?: (google.analytics.admin.v1alpha.IChannelGroupFilter|null); } - /** Represents an AudienceFilterExpression. */ - class AudienceFilterExpression implements IAudienceFilterExpression { + /** Represents a ChannelGroupFilterExpression. */ + class ChannelGroupFilterExpression implements IChannelGroupFilterExpression { /** - * Constructs a new AudienceFilterExpression. + * Constructs a new ChannelGroupFilterExpression. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IAudienceFilterExpression); + constructor(properties?: google.analytics.admin.v1alpha.IChannelGroupFilterExpression); - /** AudienceFilterExpression andGroup. */ - public andGroup?: (google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null); - - /** AudienceFilterExpression orGroup. */ - public orGroup?: (google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null); + /** ChannelGroupFilterExpression andGroup. */ + public andGroup?: (google.analytics.admin.v1alpha.IChannelGroupFilterExpressionList|null); - /** AudienceFilterExpression notExpression. */ - public notExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); + /** ChannelGroupFilterExpression orGroup. */ + public orGroup?: (google.analytics.admin.v1alpha.IChannelGroupFilterExpressionList|null); - /** AudienceFilterExpression dimensionOrMetricFilter. */ - public dimensionOrMetricFilter?: (google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter|null); + /** ChannelGroupFilterExpression notExpression. */ + public notExpression?: (google.analytics.admin.v1alpha.IChannelGroupFilterExpression|null); - /** AudienceFilterExpression eventFilter. */ - public eventFilter?: (google.analytics.admin.v1alpha.IAudienceEventFilter|null); + /** ChannelGroupFilterExpression filter. */ + public filter?: (google.analytics.admin.v1alpha.IChannelGroupFilter|null); - /** AudienceFilterExpression expr. */ - public expr?: ("andGroup"|"orGroup"|"notExpression"|"dimensionOrMetricFilter"|"eventFilter"); + /** ChannelGroupFilterExpression expr. */ + public expr?: ("andGroup"|"orGroup"|"notExpression"|"filter"); /** - * Creates a new AudienceFilterExpression instance using the specified properties. + * Creates a new ChannelGroupFilterExpression instance using the specified properties. * @param [properties] Properties to set - * @returns AudienceFilterExpression instance + * @returns ChannelGroupFilterExpression instance */ - public static create(properties?: google.analytics.admin.v1alpha.IAudienceFilterExpression): google.analytics.admin.v1alpha.AudienceFilterExpression; + public static create(properties?: google.analytics.admin.v1alpha.IChannelGroupFilterExpression): google.analytics.admin.v1alpha.ChannelGroupFilterExpression; /** - * Encodes the specified AudienceFilterExpression message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpression.verify|verify} messages. - * @param message AudienceFilterExpression message or plain object to encode + * Encodes the specified ChannelGroupFilterExpression message. Does not implicitly {@link google.analytics.admin.v1alpha.ChannelGroupFilterExpression.verify|verify} messages. + * @param message ChannelGroupFilterExpression message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IAudienceFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IChannelGroupFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AudienceFilterExpression message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpression.verify|verify} messages. - * @param message AudienceFilterExpression message or plain object to encode + * Encodes the specified ChannelGroupFilterExpression message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ChannelGroupFilterExpression.verify|verify} messages. + * @param message ChannelGroupFilterExpression message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IChannelGroupFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AudienceFilterExpression message from the specified reader or buffer. + * Decodes a ChannelGroupFilterExpression message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AudienceFilterExpression + * @returns ChannelGroupFilterExpression * @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.AudienceFilterExpression; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ChannelGroupFilterExpression; /** - * Decodes an AudienceFilterExpression message from the specified reader or buffer, length delimited. + * Decodes a ChannelGroupFilterExpression message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AudienceFilterExpression + * @returns ChannelGroupFilterExpression * @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.AudienceFilterExpression; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ChannelGroupFilterExpression; /** - * Verifies an AudienceFilterExpression message. + * Verifies a ChannelGroupFilterExpression 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 AudienceFilterExpression message from a plain object. Also converts values to their respective internal types. + * Creates a ChannelGroupFilterExpression message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AudienceFilterExpression + * @returns ChannelGroupFilterExpression */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceFilterExpression; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ChannelGroupFilterExpression; /** - * Creates a plain object from an AudienceFilterExpression message. Also converts values to other types if specified. - * @param message AudienceFilterExpression + * Creates a plain object from a ChannelGroupFilterExpression message. Also converts values to other types if specified. + * @param message ChannelGroupFilterExpression * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.AudienceFilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.ChannelGroupFilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AudienceFilterExpression to JSON. + * Converts this ChannelGroupFilterExpression to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AudienceFilterExpression + * Gets the default type url for ChannelGroupFilterExpression * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AudienceFilterExpressionList. */ - interface IAudienceFilterExpressionList { + /** Properties of a ChannelGroupFilterExpressionList. */ + interface IChannelGroupFilterExpressionList { - /** AudienceFilterExpressionList filterExpressions */ - filterExpressions?: (google.analytics.admin.v1alpha.IAudienceFilterExpression[]|null); + /** ChannelGroupFilterExpressionList filterExpressions */ + filterExpressions?: (google.analytics.admin.v1alpha.IChannelGroupFilterExpression[]|null); } - /** Represents an AudienceFilterExpressionList. */ - class AudienceFilterExpressionList implements IAudienceFilterExpressionList { + /** Represents a ChannelGroupFilterExpressionList. */ + class ChannelGroupFilterExpressionList implements IChannelGroupFilterExpressionList { /** - * Constructs a new AudienceFilterExpressionList. + * Constructs a new ChannelGroupFilterExpressionList. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IAudienceFilterExpressionList); + constructor(properties?: google.analytics.admin.v1alpha.IChannelGroupFilterExpressionList); - /** AudienceFilterExpressionList filterExpressions. */ - public filterExpressions: google.analytics.admin.v1alpha.IAudienceFilterExpression[]; + /** ChannelGroupFilterExpressionList filterExpressions. */ + public filterExpressions: google.analytics.admin.v1alpha.IChannelGroupFilterExpression[]; /** - * Creates a new AudienceFilterExpressionList instance using the specified properties. + * Creates a new ChannelGroupFilterExpressionList instance using the specified properties. * @param [properties] Properties to set - * @returns AudienceFilterExpressionList instance + * @returns ChannelGroupFilterExpressionList instance */ - public static create(properties?: google.analytics.admin.v1alpha.IAudienceFilterExpressionList): google.analytics.admin.v1alpha.AudienceFilterExpressionList; + public static create(properties?: google.analytics.admin.v1alpha.IChannelGroupFilterExpressionList): google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList; /** - * Encodes the specified AudienceFilterExpressionList message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpressionList.verify|verify} messages. - * @param message AudienceFilterExpressionList message or plain object to encode + * Encodes the specified ChannelGroupFilterExpressionList message. Does not implicitly {@link google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList.verify|verify} messages. + * @param message ChannelGroupFilterExpressionList message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IAudienceFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IChannelGroupFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AudienceFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpressionList.verify|verify} messages. - * @param message AudienceFilterExpressionList message or plain object to encode + * Encodes the specified ChannelGroupFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList.verify|verify} messages. + * @param message ChannelGroupFilterExpressionList message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IChannelGroupFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AudienceFilterExpressionList message from the specified reader or buffer. + * Decodes a ChannelGroupFilterExpressionList message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AudienceFilterExpressionList + * @returns ChannelGroupFilterExpressionList * @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.AudienceFilterExpressionList; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList; /** - * Decodes an AudienceFilterExpressionList message from the specified reader or buffer, length delimited. + * Decodes a ChannelGroupFilterExpressionList message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AudienceFilterExpressionList + * @returns ChannelGroupFilterExpressionList * @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.AudienceFilterExpressionList; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList; /** - * Verifies an AudienceFilterExpressionList message. + * Verifies a ChannelGroupFilterExpressionList 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 AudienceFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * Creates a ChannelGroupFilterExpressionList message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AudienceFilterExpressionList + * @returns ChannelGroupFilterExpressionList */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceFilterExpressionList; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList; /** - * Creates a plain object from an AudienceFilterExpressionList message. Also converts values to other types if specified. - * @param message AudienceFilterExpressionList + * Creates a plain object from a ChannelGroupFilterExpressionList message. Also converts values to other types if specified. + * @param message ChannelGroupFilterExpressionList * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.AudienceFilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AudienceFilterExpressionList to JSON. + * Converts this ChannelGroupFilterExpressionList to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AudienceFilterExpressionList + * Gets the default type url for ChannelGroupFilterExpressionList * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AudienceSimpleFilter. */ - interface IAudienceSimpleFilter { + /** Properties of a GroupingRule. */ + interface IGroupingRule { - /** AudienceSimpleFilter scope */ - scope?: (google.analytics.admin.v1alpha.AudienceFilterScope|keyof typeof google.analytics.admin.v1alpha.AudienceFilterScope|null); + /** GroupingRule displayName */ + displayName?: (string|null); - /** AudienceSimpleFilter filterExpression */ - filterExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); + /** GroupingRule expression */ + expression?: (google.analytics.admin.v1alpha.IChannelGroupFilterExpression|null); } - /** Represents an AudienceSimpleFilter. */ - class AudienceSimpleFilter implements IAudienceSimpleFilter { + /** Represents a GroupingRule. */ + class GroupingRule implements IGroupingRule { /** - * Constructs a new AudienceSimpleFilter. + * Constructs a new GroupingRule. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IAudienceSimpleFilter); + constructor(properties?: google.analytics.admin.v1alpha.IGroupingRule); - /** AudienceSimpleFilter scope. */ - public scope: (google.analytics.admin.v1alpha.AudienceFilterScope|keyof typeof google.analytics.admin.v1alpha.AudienceFilterScope); + /** GroupingRule displayName. */ + public displayName: string; - /** AudienceSimpleFilter filterExpression. */ - public filterExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); + /** GroupingRule expression. */ + public expression?: (google.analytics.admin.v1alpha.IChannelGroupFilterExpression|null); /** - * Creates a new AudienceSimpleFilter instance using the specified properties. + * Creates a new GroupingRule instance using the specified properties. * @param [properties] Properties to set - * @returns AudienceSimpleFilter instance + * @returns GroupingRule instance */ - public static create(properties?: google.analytics.admin.v1alpha.IAudienceSimpleFilter): google.analytics.admin.v1alpha.AudienceSimpleFilter; + public static create(properties?: google.analytics.admin.v1alpha.IGroupingRule): google.analytics.admin.v1alpha.GroupingRule; /** - * Encodes the specified AudienceSimpleFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSimpleFilter.verify|verify} messages. - * @param message AudienceSimpleFilter message or plain object to encode + * Encodes the specified GroupingRule message. Does not implicitly {@link google.analytics.admin.v1alpha.GroupingRule.verify|verify} messages. + * @param message GroupingRule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IAudienceSimpleFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IGroupingRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AudienceSimpleFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSimpleFilter.verify|verify} messages. - * @param message AudienceSimpleFilter message or plain object to encode + * Encodes the specified GroupingRule message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GroupingRule.verify|verify} messages. + * @param message GroupingRule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceSimpleFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IGroupingRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AudienceSimpleFilter message from the specified reader or buffer. + * Decodes a GroupingRule message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AudienceSimpleFilter + * @returns GroupingRule * @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.AudienceSimpleFilter; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.GroupingRule; /** - * Decodes an AudienceSimpleFilter message from the specified reader or buffer, length delimited. + * Decodes a GroupingRule message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AudienceSimpleFilter + * @returns GroupingRule * @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.AudienceSimpleFilter; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.GroupingRule; /** - * Verifies an AudienceSimpleFilter message. + * Verifies a GroupingRule 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 AudienceSimpleFilter message from a plain object. Also converts values to their respective internal types. + * Creates a GroupingRule message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AudienceSimpleFilter + * @returns GroupingRule */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceSimpleFilter; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GroupingRule; /** - * Creates a plain object from an AudienceSimpleFilter message. Also converts values to other types if specified. - * @param message AudienceSimpleFilter + * Creates a plain object from a GroupingRule message. Also converts values to other types if specified. + * @param message GroupingRule * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.AudienceSimpleFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.GroupingRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AudienceSimpleFilter to JSON. + * Converts this GroupingRule to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AudienceSimpleFilter + * Gets the default type url for GroupingRule * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AudienceSequenceFilter. */ - interface IAudienceSequenceFilter { + /** Properties of a ChannelGroup. */ + interface IChannelGroup { - /** AudienceSequenceFilter scope */ - scope?: (google.analytics.admin.v1alpha.AudienceFilterScope|keyof typeof google.analytics.admin.v1alpha.AudienceFilterScope|null); + /** ChannelGroup name */ + name?: (string|null); - /** AudienceSequenceFilter sequenceMaximumDuration */ - sequenceMaximumDuration?: (google.protobuf.IDuration|null); + /** ChannelGroup displayName */ + displayName?: (string|null); - /** AudienceSequenceFilter sequenceSteps */ - sequenceSteps?: (google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep[]|null); + /** ChannelGroup description */ + description?: (string|null); + + /** ChannelGroup groupingRule */ + groupingRule?: (google.analytics.admin.v1alpha.IGroupingRule[]|null); + + /** ChannelGroup systemDefined */ + systemDefined?: (boolean|null); } - /** Represents an AudienceSequenceFilter. */ - class AudienceSequenceFilter implements IAudienceSequenceFilter { + /** Represents a ChannelGroup. */ + class ChannelGroup implements IChannelGroup { /** - * Constructs a new AudienceSequenceFilter. + * Constructs a new ChannelGroup. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IAudienceSequenceFilter); + constructor(properties?: google.analytics.admin.v1alpha.IChannelGroup); - /** AudienceSequenceFilter scope. */ - public scope: (google.analytics.admin.v1alpha.AudienceFilterScope|keyof typeof google.analytics.admin.v1alpha.AudienceFilterScope); + /** ChannelGroup name. */ + public name: string; - /** AudienceSequenceFilter sequenceMaximumDuration. */ - public sequenceMaximumDuration?: (google.protobuf.IDuration|null); + /** ChannelGroup displayName. */ + public displayName: string; - /** AudienceSequenceFilter sequenceSteps. */ - public sequenceSteps: google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep[]; + /** ChannelGroup description. */ + public description: string; + + /** ChannelGroup groupingRule. */ + public groupingRule: google.analytics.admin.v1alpha.IGroupingRule[]; + + /** ChannelGroup systemDefined. */ + public systemDefined: boolean; /** - * Creates a new AudienceSequenceFilter instance using the specified properties. + * Creates a new ChannelGroup instance using the specified properties. * @param [properties] Properties to set - * @returns AudienceSequenceFilter instance + * @returns ChannelGroup instance */ - public static create(properties?: google.analytics.admin.v1alpha.IAudienceSequenceFilter): google.analytics.admin.v1alpha.AudienceSequenceFilter; + public static create(properties?: google.analytics.admin.v1alpha.IChannelGroup): google.analytics.admin.v1alpha.ChannelGroup; /** - * Encodes the specified AudienceSequenceFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.verify|verify} messages. - * @param message AudienceSequenceFilter message or plain object to encode + * Encodes the specified ChannelGroup message. Does not implicitly {@link google.analytics.admin.v1alpha.ChannelGroup.verify|verify} messages. + * @param message ChannelGroup message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IAudienceSequenceFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IChannelGroup, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AudienceSequenceFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.verify|verify} messages. - * @param message AudienceSequenceFilter message or plain object to encode + * Encodes the specified ChannelGroup message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ChannelGroup.verify|verify} messages. + * @param message ChannelGroup message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceSequenceFilter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IChannelGroup, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AudienceSequenceFilter message from the specified reader or buffer. + * Decodes a ChannelGroup message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AudienceSequenceFilter + * @returns ChannelGroup * @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.AudienceSequenceFilter; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ChannelGroup; /** - * Decodes an AudienceSequenceFilter message from the specified reader or buffer, length delimited. + * Decodes a ChannelGroup message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AudienceSequenceFilter + * @returns ChannelGroup * @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.AudienceSequenceFilter; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ChannelGroup; /** - * Verifies an AudienceSequenceFilter message. + * Verifies a ChannelGroup 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 AudienceSequenceFilter message from a plain object. Also converts values to their respective internal types. + * Creates a ChannelGroup message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AudienceSequenceFilter + * @returns ChannelGroup */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceSequenceFilter; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ChannelGroup; /** - * Creates a plain object from an AudienceSequenceFilter message. Also converts values to other types if specified. - * @param message AudienceSequenceFilter + * Creates a plain object from a ChannelGroup message. Also converts values to other types if specified. + * @param message ChannelGroup * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.AudienceSequenceFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.ChannelGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AudienceSequenceFilter to JSON. + * Converts this ChannelGroup to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AudienceSequenceFilter + * Gets the default type url for ChannelGroup * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace AudienceSequenceFilter { - - /** Properties of an AudienceSequenceStep. */ - interface IAudienceSequenceStep { - - /** AudienceSequenceStep scope */ - scope?: (google.analytics.admin.v1alpha.AudienceFilterScope|keyof typeof google.analytics.admin.v1alpha.AudienceFilterScope|null); - - /** AudienceSequenceStep immediatelyFollows */ - immediatelyFollows?: (boolean|null); - - /** AudienceSequenceStep constraintDuration */ - constraintDuration?: (google.protobuf.IDuration|null); - - /** AudienceSequenceStep filterExpression */ - filterExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); - } - - /** Represents an AudienceSequenceStep. */ - class AudienceSequenceStep implements IAudienceSequenceStep { - - /** - * Constructs a new AudienceSequenceStep. - * @param [properties] Properties to set - */ - constructor(properties?: google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep); - - /** AudienceSequenceStep scope. */ - public scope: (google.analytics.admin.v1alpha.AudienceFilterScope|keyof typeof google.analytics.admin.v1alpha.AudienceFilterScope); - - /** AudienceSequenceStep immediatelyFollows. */ - public immediatelyFollows: boolean; - - /** AudienceSequenceStep constraintDuration. */ - public constraintDuration?: (google.protobuf.IDuration|null); - - /** AudienceSequenceStep filterExpression. */ - public filterExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); - - /** - * Creates a new AudienceSequenceStep instance using the specified properties. - * @param [properties] Properties to set - * @returns AudienceSequenceStep instance - */ - public static create(properties?: google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep): google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep; - - /** - * Encodes the specified AudienceSequenceStep message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.verify|verify} messages. - * @param message AudienceSequenceStep message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AudienceSequenceStep message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.verify|verify} messages. - * @param message AudienceSequenceStep message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AudienceSequenceStep message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AudienceSequenceStep - * @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.AudienceSequenceFilter.AudienceSequenceStep; - - /** - * Decodes an AudienceSequenceStep message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AudienceSequenceStep - * @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.AudienceSequenceFilter.AudienceSequenceStep; - - /** - * Verifies an AudienceSequenceStep 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 AudienceSequenceStep message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AudienceSequenceStep - */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep; - - /** - * Creates a plain object from an AudienceSequenceStep message. Also converts values to other types if specified. - * @param message AudienceSequenceStep - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AudienceSequenceStep to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AudienceSequenceStep - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an AudienceFilterClause. */ - interface IAudienceFilterClause { - - /** AudienceFilterClause simpleFilter */ - simpleFilter?: (google.analytics.admin.v1alpha.IAudienceSimpleFilter|null); + /** Properties of a ParameterMutation. */ + interface IParameterMutation { - /** AudienceFilterClause sequenceFilter */ - sequenceFilter?: (google.analytics.admin.v1alpha.IAudienceSequenceFilter|null); + /** ParameterMutation parameter */ + parameter?: (string|null); - /** AudienceFilterClause clauseType */ - clauseType?: (google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType|keyof typeof google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType|null); + /** ParameterMutation parameterValue */ + parameterValue?: (string|null); } - /** Represents an AudienceFilterClause. */ - class AudienceFilterClause implements IAudienceFilterClause { + /** Represents a ParameterMutation. */ + class ParameterMutation implements IParameterMutation { /** - * Constructs a new AudienceFilterClause. + * Constructs a new ParameterMutation. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IAudienceFilterClause); - - /** AudienceFilterClause simpleFilter. */ - public simpleFilter?: (google.analytics.admin.v1alpha.IAudienceSimpleFilter|null); - - /** AudienceFilterClause sequenceFilter. */ - public sequenceFilter?: (google.analytics.admin.v1alpha.IAudienceSequenceFilter|null); + constructor(properties?: google.analytics.admin.v1alpha.IParameterMutation); - /** AudienceFilterClause clauseType. */ - public clauseType: (google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType|keyof typeof google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType); + /** ParameterMutation parameter. */ + public parameter: string; - /** AudienceFilterClause filter. */ - public filter?: ("simpleFilter"|"sequenceFilter"); + /** ParameterMutation parameterValue. */ + public parameterValue: string; /** - * Creates a new AudienceFilterClause instance using the specified properties. + * Creates a new ParameterMutation instance using the specified properties. * @param [properties] Properties to set - * @returns AudienceFilterClause instance + * @returns ParameterMutation instance */ - public static create(properties?: google.analytics.admin.v1alpha.IAudienceFilterClause): google.analytics.admin.v1alpha.AudienceFilterClause; + public static create(properties?: google.analytics.admin.v1alpha.IParameterMutation): google.analytics.admin.v1alpha.ParameterMutation; /** - * Encodes the specified AudienceFilterClause message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterClause.verify|verify} messages. - * @param message AudienceFilterClause message or plain object to encode + * Encodes the specified ParameterMutation message. Does not implicitly {@link google.analytics.admin.v1alpha.ParameterMutation.verify|verify} messages. + * @param message ParameterMutation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IAudienceFilterClause, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IParameterMutation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AudienceFilterClause message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterClause.verify|verify} messages. - * @param message AudienceFilterClause message or plain object to encode + * Encodes the specified ParameterMutation message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ParameterMutation.verify|verify} messages. + * @param message ParameterMutation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceFilterClause, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IParameterMutation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AudienceFilterClause message from the specified reader or buffer. + * Decodes a ParameterMutation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AudienceFilterClause + * @returns ParameterMutation * @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.AudienceFilterClause; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ParameterMutation; /** - * Decodes an AudienceFilterClause message from the specified reader or buffer, length delimited. + * Decodes a ParameterMutation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AudienceFilterClause + * @returns ParameterMutation * @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.AudienceFilterClause; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ParameterMutation; /** - * Verifies an AudienceFilterClause message. + * Verifies a ParameterMutation 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 AudienceFilterClause message from a plain object. Also converts values to their respective internal types. + * Creates a ParameterMutation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AudienceFilterClause + * @returns ParameterMutation */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceFilterClause; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ParameterMutation; /** - * Creates a plain object from an AudienceFilterClause message. Also converts values to other types if specified. - * @param message AudienceFilterClause + * Creates a plain object from a ParameterMutation message. Also converts values to other types if specified. + * @param message ParameterMutation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.AudienceFilterClause, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.ParameterMutation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AudienceFilterClause to JSON. + * Converts this ParameterMutation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AudienceFilterClause + * Gets the default type url for ParameterMutation * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace AudienceFilterClause { + /** Properties of an EventCreateRule. */ + interface IEventCreateRule { - /** AudienceClauseType enum. */ - enum AudienceClauseType { - AUDIENCE_CLAUSE_TYPE_UNSPECIFIED = 0, - INCLUDE = 1, - EXCLUDE = 2 - } - } + /** EventCreateRule name */ + name?: (string|null); - /** Properties of an AudienceEventTrigger. */ - interface IAudienceEventTrigger { + /** EventCreateRule destinationEvent */ + destinationEvent?: (string|null); - /** AudienceEventTrigger eventName */ - eventName?: (string|null); + /** EventCreateRule eventConditions */ + eventConditions?: (google.analytics.admin.v1alpha.IMatchingCondition[]|null); - /** AudienceEventTrigger logCondition */ - logCondition?: (google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition|keyof typeof google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition|null); + /** EventCreateRule sourceCopyParameters */ + sourceCopyParameters?: (boolean|null); + + /** EventCreateRule parameterMutations */ + parameterMutations?: (google.analytics.admin.v1alpha.IParameterMutation[]|null); } - /** Represents an AudienceEventTrigger. */ - class AudienceEventTrigger implements IAudienceEventTrigger { + /** Represents an EventCreateRule. */ + class EventCreateRule implements IEventCreateRule { /** - * Constructs a new AudienceEventTrigger. + * Constructs a new EventCreateRule. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IAudienceEventTrigger); + constructor(properties?: google.analytics.admin.v1alpha.IEventCreateRule); - /** AudienceEventTrigger eventName. */ - public eventName: string; + /** EventCreateRule name. */ + public name: string; - /** AudienceEventTrigger logCondition. */ - public logCondition: (google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition|keyof typeof google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition); + /** EventCreateRule destinationEvent. */ + public destinationEvent: string; + + /** EventCreateRule eventConditions. */ + public eventConditions: google.analytics.admin.v1alpha.IMatchingCondition[]; + + /** EventCreateRule sourceCopyParameters. */ + public sourceCopyParameters: boolean; + + /** EventCreateRule parameterMutations. */ + public parameterMutations: google.analytics.admin.v1alpha.IParameterMutation[]; /** - * Creates a new AudienceEventTrigger instance using the specified properties. + * Creates a new EventCreateRule instance using the specified properties. * @param [properties] Properties to set - * @returns AudienceEventTrigger instance + * @returns EventCreateRule instance */ - public static create(properties?: google.analytics.admin.v1alpha.IAudienceEventTrigger): google.analytics.admin.v1alpha.AudienceEventTrigger; + public static create(properties?: google.analytics.admin.v1alpha.IEventCreateRule): google.analytics.admin.v1alpha.EventCreateRule; /** - * Encodes the specified AudienceEventTrigger message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventTrigger.verify|verify} messages. - * @param message AudienceEventTrigger message or plain object to encode + * Encodes the specified EventCreateRule message. Does not implicitly {@link google.analytics.admin.v1alpha.EventCreateRule.verify|verify} messages. + * @param message EventCreateRule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IAudienceEventTrigger, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IEventCreateRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AudienceEventTrigger message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventTrigger.verify|verify} messages. - * @param message AudienceEventTrigger message or plain object to encode + * Encodes the specified EventCreateRule message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.EventCreateRule.verify|verify} messages. + * @param message EventCreateRule message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceEventTrigger, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IEventCreateRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AudienceEventTrigger message from the specified reader or buffer. + * Decodes an EventCreateRule message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AudienceEventTrigger + * @returns EventCreateRule * @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.AudienceEventTrigger; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.EventCreateRule; /** - * Decodes an AudienceEventTrigger message from the specified reader or buffer, length delimited. + * Decodes an EventCreateRule message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AudienceEventTrigger + * @returns EventCreateRule * @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.AudienceEventTrigger; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.EventCreateRule; /** - * Verifies an AudienceEventTrigger message. + * Verifies an EventCreateRule 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 AudienceEventTrigger message from a plain object. Also converts values to their respective internal types. + * Creates an EventCreateRule message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AudienceEventTrigger + * @returns EventCreateRule */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceEventTrigger; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.EventCreateRule; /** - * Creates a plain object from an AudienceEventTrigger message. Also converts values to other types if specified. - * @param message AudienceEventTrigger + * Creates a plain object from an EventCreateRule message. Also converts values to other types if specified. + * @param message EventCreateRule * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.AudienceEventTrigger, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.EventCreateRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AudienceEventTrigger to JSON. + * Converts this EventCreateRule to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AudienceEventTrigger + * Gets the default type url for EventCreateRule * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace AudienceEventTrigger { - - /** LogCondition enum. */ - enum LogCondition { - LOG_CONDITION_UNSPECIFIED = 0, - AUDIENCE_JOINED = 1, - AUDIENCE_MEMBERSHIP_RENEWED = 2 - } - } - - /** Properties of an Audience. */ - interface IAudience { - - /** Audience name */ - name?: (string|null); - - /** Audience displayName */ - displayName?: (string|null); - - /** Audience description */ - description?: (string|null); - - /** Audience membershipDurationDays */ - membershipDurationDays?: (number|null); + /** Properties of a MatchingCondition. */ + interface IMatchingCondition { - /** Audience adsPersonalizationEnabled */ - adsPersonalizationEnabled?: (boolean|null); + /** MatchingCondition field */ + field?: (string|null); - /** Audience eventTrigger */ - eventTrigger?: (google.analytics.admin.v1alpha.IAudienceEventTrigger|null); + /** MatchingCondition comparisonType */ + comparisonType?: (google.analytics.admin.v1alpha.MatchingCondition.ComparisonType|keyof typeof google.analytics.admin.v1alpha.MatchingCondition.ComparisonType|null); - /** Audience exclusionDurationMode */ - exclusionDurationMode?: (google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode|keyof typeof google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode|null); + /** MatchingCondition value */ + value?: (string|null); - /** Audience filterClauses */ - filterClauses?: (google.analytics.admin.v1alpha.IAudienceFilterClause[]|null); + /** MatchingCondition negated */ + negated?: (boolean|null); } - /** Represents an Audience. */ - class Audience implements IAudience { + /** Represents a MatchingCondition. */ + class MatchingCondition implements IMatchingCondition { /** - * Constructs a new Audience. + * Constructs a new MatchingCondition. * @param [properties] Properties to set */ - constructor(properties?: google.analytics.admin.v1alpha.IAudience); - - /** Audience name. */ - public name: string; - - /** Audience displayName. */ - public displayName: string; - - /** Audience description. */ - public description: string; - - /** Audience membershipDurationDays. */ - public membershipDurationDays: number; + constructor(properties?: google.analytics.admin.v1alpha.IMatchingCondition); - /** Audience adsPersonalizationEnabled. */ - public adsPersonalizationEnabled: boolean; + /** MatchingCondition field. */ + public field: string; - /** Audience eventTrigger. */ - public eventTrigger?: (google.analytics.admin.v1alpha.IAudienceEventTrigger|null); + /** MatchingCondition comparisonType. */ + public comparisonType: (google.analytics.admin.v1alpha.MatchingCondition.ComparisonType|keyof typeof google.analytics.admin.v1alpha.MatchingCondition.ComparisonType); - /** Audience exclusionDurationMode. */ - public exclusionDurationMode: (google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode|keyof typeof google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode); + /** MatchingCondition value. */ + public value: string; - /** Audience filterClauses. */ - public filterClauses: google.analytics.admin.v1alpha.IAudienceFilterClause[]; + /** MatchingCondition negated. */ + public negated: boolean; /** - * Creates a new Audience instance using the specified properties. + * Creates a new MatchingCondition instance using the specified properties. * @param [properties] Properties to set - * @returns Audience instance + * @returns MatchingCondition instance */ - public static create(properties?: google.analytics.admin.v1alpha.IAudience): google.analytics.admin.v1alpha.Audience; + public static create(properties?: google.analytics.admin.v1alpha.IMatchingCondition): google.analytics.admin.v1alpha.MatchingCondition; /** - * Encodes the specified Audience message. Does not implicitly {@link google.analytics.admin.v1alpha.Audience.verify|verify} messages. - * @param message Audience message or plain object to encode + * Encodes the specified MatchingCondition message. Does not implicitly {@link google.analytics.admin.v1alpha.MatchingCondition.verify|verify} messages. + * @param message MatchingCondition message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.analytics.admin.v1alpha.IAudience, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.analytics.admin.v1alpha.IMatchingCondition, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Audience message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.Audience.verify|verify} messages. - * @param message Audience message or plain object to encode + * Encodes the specified MatchingCondition message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.MatchingCondition.verify|verify} messages. + * @param message MatchingCondition message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudience, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.analytics.admin.v1alpha.IMatchingCondition, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Audience message from the specified reader or buffer. + * Decodes a MatchingCondition message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Audience + * @returns MatchingCondition * @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.Audience; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.MatchingCondition; /** - * Decodes an Audience message from the specified reader or buffer, length delimited. + * Decodes a MatchingCondition message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Audience + * @returns MatchingCondition * @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.Audience; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.MatchingCondition; /** - * Verifies an Audience message. + * Verifies a MatchingCondition 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 Audience message from a plain object. Also converts values to their respective internal types. + * Creates a MatchingCondition message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Audience + * @returns MatchingCondition */ - public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.Audience; + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.MatchingCondition; /** - * Creates a plain object from an Audience message. Also converts values to other types if specified. - * @param message Audience + * Creates a plain object from a MatchingCondition message. Also converts values to other types if specified. + * @param message MatchingCondition * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.analytics.admin.v1alpha.Audience, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.analytics.admin.v1alpha.MatchingCondition, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Audience to JSON. + * Converts this MatchingCondition to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Audience + * Gets the default type url for MatchingCondition * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Audience { + namespace MatchingCondition { - /** AudienceExclusionDurationMode enum. */ - enum AudienceExclusionDurationMode { - AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED = 0, - EXCLUDE_TEMPORARILY = 1, - EXCLUDE_PERMANENTLY = 2 + /** ComparisonType enum. */ + enum ComparisonType { + COMPARISON_TYPE_UNSPECIFIED = 0, + EQUALS = 1, + EQUALS_CASE_INSENSITIVE = 2, + CONTAINS = 3, + CONTAINS_CASE_INSENSITIVE = 4, + STARTS_WITH = 5, + STARTS_WITH_CASE_INSENSITIVE = 6, + ENDS_WITH = 7, + ENDS_WITH_CASE_INSENSITIVE = 8, + GREATER_THAN = 9, + GREATER_THAN_OR_EQUAL = 10, + LESS_THAN = 11, + LESS_THAN_OR_EQUAL = 12, + REGULAR_EXPRESSION = 13, + REGULAR_EXPRESSION_CASE_INSENSITIVE = 14 } } @@ -21414,7 +24785,10 @@ export namespace google { ATTRIBUTION_SETTINGS = 20, EXPANDED_DATA_SET = 21, CHANNEL_GROUP = 22, - ENHANCED_MEASUREMENT_SETTINGS = 24 + ENHANCED_MEASUREMENT_SETTINGS = 24, + ADSENSE_LINK = 27, + AUDIENCE = 28, + EVENT_CREATE_RULE = 29 } /** GoogleSignalsState enum. */ @@ -23551,11 +26925,23 @@ export namespace google { /** ChangeHistoryResource expandedDataSet */ expandedDataSet?: (google.analytics.admin.v1alpha.IExpandedDataSet|null); + /** ChangeHistoryResource channelGroup */ + channelGroup?: (google.analytics.admin.v1alpha.IChannelGroup|null); + /** ChangeHistoryResource bigqueryLink */ bigqueryLink?: (google.analytics.admin.v1alpha.IBigQueryLink|null); /** ChangeHistoryResource enhancedMeasurementSettings */ enhancedMeasurementSettings?: (google.analytics.admin.v1alpha.IEnhancedMeasurementSettings|null); + + /** ChangeHistoryResource adsenseLink */ + adsenseLink?: (google.analytics.admin.v1alpha.IAdSenseLink|null); + + /** ChangeHistoryResource audience */ + audience?: (google.analytics.admin.v1alpha.IAudience|null); + + /** ChangeHistoryResource eventCreateRule */ + eventCreateRule?: (google.analytics.admin.v1alpha.IEventCreateRule|null); } /** Represents a ChangeHistoryResource. */ @@ -23615,14 +27001,26 @@ export namespace google { /** ChangeHistoryResource expandedDataSet. */ public expandedDataSet?: (google.analytics.admin.v1alpha.IExpandedDataSet|null); + /** ChangeHistoryResource channelGroup. */ + public channelGroup?: (google.analytics.admin.v1alpha.IChannelGroup|null); + /** ChangeHistoryResource bigqueryLink. */ public bigqueryLink?: (google.analytics.admin.v1alpha.IBigQueryLink|null); /** ChangeHistoryResource enhancedMeasurementSettings. */ public enhancedMeasurementSettings?: (google.analytics.admin.v1alpha.IEnhancedMeasurementSettings|null); + /** ChangeHistoryResource adsenseLink. */ + public adsenseLink?: (google.analytics.admin.v1alpha.IAdSenseLink|null); + + /** ChangeHistoryResource audience. */ + public audience?: (google.analytics.admin.v1alpha.IAudience|null); + + /** ChangeHistoryResource eventCreateRule. */ + public eventCreateRule?: (google.analytics.admin.v1alpha.IEventCreateRule|null); + /** ChangeHistoryResource resource. */ - public resource?: ("account"|"property"|"firebaseLink"|"googleAdsLink"|"googleSignalsSettings"|"displayVideo_360AdvertiserLink"|"displayVideo_360AdvertiserLinkProposal"|"conversionEvent"|"measurementProtocolSecret"|"customDimension"|"customMetric"|"dataRetentionSettings"|"searchAds_360Link"|"dataStream"|"attributionSettings"|"expandedDataSet"|"bigqueryLink"|"enhancedMeasurementSettings"); + public resource?: ("account"|"property"|"firebaseLink"|"googleAdsLink"|"googleSignalsSettings"|"displayVideo_360AdvertiserLink"|"displayVideo_360AdvertiserLinkProposal"|"conversionEvent"|"measurementProtocolSecret"|"customDimension"|"customMetric"|"dataRetentionSettings"|"searchAds_360Link"|"dataStream"|"attributionSettings"|"expandedDataSet"|"channelGroup"|"bigqueryLink"|"enhancedMeasurementSettings"|"adsenseLink"|"audience"|"eventCreateRule"); /** * Creates a new ChangeHistoryResource instance using the specified properties. @@ -24574,7 +27972,8 @@ export namespace google { enum DimensionScope { DIMENSION_SCOPE_UNSPECIFIED = 0, EVENT = 1, - USER = 2 + USER = 2, + ITEM = 3 } } @@ -25525,6 +28924,109 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of an AdSenseLink. */ + interface IAdSenseLink { + + /** AdSenseLink name */ + name?: (string|null); + + /** AdSenseLink adClientCode */ + adClientCode?: (string|null); + } + + /** Represents an AdSenseLink. */ + class AdSenseLink implements IAdSenseLink { + + /** + * Constructs a new AdSenseLink. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAdSenseLink); + + /** AdSenseLink name. */ + public name: string; + + /** AdSenseLink adClientCode. */ + public adClientCode: string; + + /** + * Creates a new AdSenseLink instance using the specified properties. + * @param [properties] Properties to set + * @returns AdSenseLink instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAdSenseLink): google.analytics.admin.v1alpha.AdSenseLink; + + /** + * Encodes the specified AdSenseLink message. Does not implicitly {@link google.analytics.admin.v1alpha.AdSenseLink.verify|verify} messages. + * @param message AdSenseLink message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAdSenseLink, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AdSenseLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AdSenseLink.verify|verify} messages. + * @param message AdSenseLink message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAdSenseLink, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AdSenseLink message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AdSenseLink + * @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.AdSenseLink; + + /** + * Decodes an AdSenseLink message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AdSenseLink + * @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.AdSenseLink; + + /** + * Verifies an AdSenseLink 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 AdSenseLink message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AdSenseLink + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AdSenseLink; + + /** + * Creates a plain object from an AdSenseLink message. Also converts values to other types if specified. + * @param message AdSenseLink + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AdSenseLink, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AdSenseLink to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AdSenseLink + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Namespace v1beta. */ diff --git a/packages/google-analytics-admin/protos/protos.js b/packages/google-analytics-admin/protos/protos.js index 7ccb0fa0b97..7c3a29f4aa8 100644 --- a/packages/google-analytics-admin/protos/protos.js +++ b/packages/google-analytics-admin/protos/protos.js @@ -8620,6 +8620,171 @@ * @variation 2 */ + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getChannelGroup}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef GetChannelGroupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.ChannelGroup} [response] ChannelGroup + */ + + /** + * Calls GetChannelGroup. + * @function getChannelGroup + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetChannelGroupRequest} request GetChannelGroupRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.GetChannelGroupCallback} callback Node-style callback called with the error, if any, and ChannelGroup + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getChannelGroup = function getChannelGroup(request, callback) { + return this.rpcCall(getChannelGroup, $root.google.analytics.admin.v1alpha.GetChannelGroupRequest, $root.google.analytics.admin.v1alpha.ChannelGroup, request, callback); + }, "name", { value: "GetChannelGroup" }); + + /** + * Calls GetChannelGroup. + * @function getChannelGroup + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetChannelGroupRequest} request GetChannelGroupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listChannelGroups}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef ListChannelGroupsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.ListChannelGroupsResponse} [response] ListChannelGroupsResponse + */ + + /** + * Calls ListChannelGroups. + * @function listChannelGroups + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListChannelGroupsRequest} request ListChannelGroupsRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.ListChannelGroupsCallback} callback Node-style callback called with the error, if any, and ListChannelGroupsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listChannelGroups = function listChannelGroups(request, callback) { + return this.rpcCall(listChannelGroups, $root.google.analytics.admin.v1alpha.ListChannelGroupsRequest, $root.google.analytics.admin.v1alpha.ListChannelGroupsResponse, request, callback); + }, "name", { value: "ListChannelGroups" }); + + /** + * Calls ListChannelGroups. + * @function listChannelGroups + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListChannelGroupsRequest} request ListChannelGroupsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|createChannelGroup}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef CreateChannelGroupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.ChannelGroup} [response] ChannelGroup + */ + + /** + * Calls CreateChannelGroup. + * @function createChannelGroup + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICreateChannelGroupRequest} request CreateChannelGroupRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.CreateChannelGroupCallback} callback Node-style callback called with the error, if any, and ChannelGroup + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.createChannelGroup = function createChannelGroup(request, callback) { + return this.rpcCall(createChannelGroup, $root.google.analytics.admin.v1alpha.CreateChannelGroupRequest, $root.google.analytics.admin.v1alpha.ChannelGroup, request, callback); + }, "name", { value: "CreateChannelGroup" }); + + /** + * Calls CreateChannelGroup. + * @function createChannelGroup + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICreateChannelGroupRequest} request CreateChannelGroupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|updateChannelGroup}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef UpdateChannelGroupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.ChannelGroup} [response] ChannelGroup + */ + + /** + * Calls UpdateChannelGroup. + * @function updateChannelGroup + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IUpdateChannelGroupRequest} request UpdateChannelGroupRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateChannelGroupCallback} callback Node-style callback called with the error, if any, and ChannelGroup + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.updateChannelGroup = function updateChannelGroup(request, callback) { + return this.rpcCall(updateChannelGroup, $root.google.analytics.admin.v1alpha.UpdateChannelGroupRequest, $root.google.analytics.admin.v1alpha.ChannelGroup, request, callback); + }, "name", { value: "UpdateChannelGroup" }); + + /** + * Calls UpdateChannelGroup. + * @function updateChannelGroup + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IUpdateChannelGroupRequest} request UpdateChannelGroupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|deleteChannelGroup}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef DeleteChannelGroupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteChannelGroup. + * @function deleteChannelGroup + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IDeleteChannelGroupRequest} request DeleteChannelGroupRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteChannelGroupCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.deleteChannelGroup = function deleteChannelGroup(request, callback) { + return this.rpcCall(deleteChannelGroup, $root.google.analytics.admin.v1alpha.DeleteChannelGroupRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteChannelGroup" }); + + /** + * Calls DeleteChannelGroup. + * @function deleteChannelGroup + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IDeleteChannelGroupRequest} request DeleteChannelGroupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|setAutomatedGa4ConfigurationOptOut}. * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService @@ -8917,6 +9082,336 @@ * @variation 2 */ + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|fetchConnectedGa4Property}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef FetchConnectedGa4PropertyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse} [response] FetchConnectedGa4PropertyResponse + */ + + /** + * Calls FetchConnectedGa4Property. + * @function fetchConnectedGa4Property + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyRequest} request FetchConnectedGa4PropertyRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.FetchConnectedGa4PropertyCallback} callback Node-style callback called with the error, if any, and FetchConnectedGa4PropertyResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.fetchConnectedGa4Property = function fetchConnectedGa4Property(request, callback) { + return this.rpcCall(fetchConnectedGa4Property, $root.google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest, $root.google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse, request, callback); + }, "name", { value: "FetchConnectedGa4Property" }); + + /** + * Calls FetchConnectedGa4Property. + * @function fetchConnectedGa4Property + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyRequest} request FetchConnectedGa4PropertyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getAdSenseLink}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef GetAdSenseLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.AdSenseLink} [response] AdSenseLink + */ + + /** + * Calls GetAdSenseLink. + * @function getAdSenseLink + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetAdSenseLinkRequest} request GetAdSenseLinkRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.GetAdSenseLinkCallback} callback Node-style callback called with the error, if any, and AdSenseLink + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getAdSenseLink = function getAdSenseLink(request, callback) { + return this.rpcCall(getAdSenseLink, $root.google.analytics.admin.v1alpha.GetAdSenseLinkRequest, $root.google.analytics.admin.v1alpha.AdSenseLink, request, callback); + }, "name", { value: "GetAdSenseLink" }); + + /** + * Calls GetAdSenseLink. + * @function getAdSenseLink + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetAdSenseLinkRequest} request GetAdSenseLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|createAdSenseLink}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef CreateAdSenseLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.AdSenseLink} [response] AdSenseLink + */ + + /** + * Calls CreateAdSenseLink. + * @function createAdSenseLink + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICreateAdSenseLinkRequest} request CreateAdSenseLinkRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.CreateAdSenseLinkCallback} callback Node-style callback called with the error, if any, and AdSenseLink + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.createAdSenseLink = function createAdSenseLink(request, callback) { + return this.rpcCall(createAdSenseLink, $root.google.analytics.admin.v1alpha.CreateAdSenseLinkRequest, $root.google.analytics.admin.v1alpha.AdSenseLink, request, callback); + }, "name", { value: "CreateAdSenseLink" }); + + /** + * Calls CreateAdSenseLink. + * @function createAdSenseLink + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICreateAdSenseLinkRequest} request CreateAdSenseLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|deleteAdSenseLink}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef DeleteAdSenseLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteAdSenseLink. + * @function deleteAdSenseLink + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IDeleteAdSenseLinkRequest} request DeleteAdSenseLinkRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteAdSenseLinkCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.deleteAdSenseLink = function deleteAdSenseLink(request, callback) { + return this.rpcCall(deleteAdSenseLink, $root.google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteAdSenseLink" }); + + /** + * Calls DeleteAdSenseLink. + * @function deleteAdSenseLink + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IDeleteAdSenseLinkRequest} request DeleteAdSenseLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listAdSenseLinks}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef ListAdSenseLinksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.ListAdSenseLinksResponse} [response] ListAdSenseLinksResponse + */ + + /** + * Calls ListAdSenseLinks. + * @function listAdSenseLinks + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListAdSenseLinksRequest} request ListAdSenseLinksRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.ListAdSenseLinksCallback} callback Node-style callback called with the error, if any, and ListAdSenseLinksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listAdSenseLinks = function listAdSenseLinks(request, callback) { + return this.rpcCall(listAdSenseLinks, $root.google.analytics.admin.v1alpha.ListAdSenseLinksRequest, $root.google.analytics.admin.v1alpha.ListAdSenseLinksResponse, request, callback); + }, "name", { value: "ListAdSenseLinks" }); + + /** + * Calls ListAdSenseLinks. + * @function listAdSenseLinks + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListAdSenseLinksRequest} request ListAdSenseLinksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getEventCreateRule}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef GetEventCreateRuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.EventCreateRule} [response] EventCreateRule + */ + + /** + * Calls GetEventCreateRule. + * @function getEventCreateRule + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetEventCreateRuleRequest} request GetEventCreateRuleRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.GetEventCreateRuleCallback} callback Node-style callback called with the error, if any, and EventCreateRule + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getEventCreateRule = function getEventCreateRule(request, callback) { + return this.rpcCall(getEventCreateRule, $root.google.analytics.admin.v1alpha.GetEventCreateRuleRequest, $root.google.analytics.admin.v1alpha.EventCreateRule, request, callback); + }, "name", { value: "GetEventCreateRule" }); + + /** + * Calls GetEventCreateRule. + * @function getEventCreateRule + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetEventCreateRuleRequest} request GetEventCreateRuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listEventCreateRules}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef ListEventCreateRulesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.ListEventCreateRulesResponse} [response] ListEventCreateRulesResponse + */ + + /** + * Calls ListEventCreateRules. + * @function listEventCreateRules + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListEventCreateRulesRequest} request ListEventCreateRulesRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.ListEventCreateRulesCallback} callback Node-style callback called with the error, if any, and ListEventCreateRulesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listEventCreateRules = function listEventCreateRules(request, callback) { + return this.rpcCall(listEventCreateRules, $root.google.analytics.admin.v1alpha.ListEventCreateRulesRequest, $root.google.analytics.admin.v1alpha.ListEventCreateRulesResponse, request, callback); + }, "name", { value: "ListEventCreateRules" }); + + /** + * Calls ListEventCreateRules. + * @function listEventCreateRules + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListEventCreateRulesRequest} request ListEventCreateRulesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|createEventCreateRule}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef CreateEventCreateRuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.EventCreateRule} [response] EventCreateRule + */ + + /** + * Calls CreateEventCreateRule. + * @function createEventCreateRule + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICreateEventCreateRuleRequest} request CreateEventCreateRuleRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.CreateEventCreateRuleCallback} callback Node-style callback called with the error, if any, and EventCreateRule + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.createEventCreateRule = function createEventCreateRule(request, callback) { + return this.rpcCall(createEventCreateRule, $root.google.analytics.admin.v1alpha.CreateEventCreateRuleRequest, $root.google.analytics.admin.v1alpha.EventCreateRule, request, callback); + }, "name", { value: "CreateEventCreateRule" }); + + /** + * Calls CreateEventCreateRule. + * @function createEventCreateRule + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICreateEventCreateRuleRequest} request CreateEventCreateRuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|updateEventCreateRule}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef UpdateEventCreateRuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.EventCreateRule} [response] EventCreateRule + */ + + /** + * Calls UpdateEventCreateRule. + * @function updateEventCreateRule + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IUpdateEventCreateRuleRequest} request UpdateEventCreateRuleRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateEventCreateRuleCallback} callback Node-style callback called with the error, if any, and EventCreateRule + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.updateEventCreateRule = function updateEventCreateRule(request, callback) { + return this.rpcCall(updateEventCreateRule, $root.google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest, $root.google.analytics.admin.v1alpha.EventCreateRule, request, callback); + }, "name", { value: "UpdateEventCreateRule" }); + + /** + * Calls UpdateEventCreateRule. + * @function updateEventCreateRule + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IUpdateEventCreateRuleRequest} request UpdateEventCreateRuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|deleteEventCreateRule}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef DeleteEventCreateRuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteEventCreateRule. + * @function deleteEventCreateRule + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IDeleteEventCreateRuleRequest} request DeleteEventCreateRuleRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteEventCreateRuleCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.deleteEventCreateRule = function deleteEventCreateRule(request, callback) { + return this.rpcCall(deleteEventCreateRule, $root.google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteEventCreateRule" }); + + /** + * Calls DeleteEventCreateRule. + * @function deleteEventCreateRule + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IDeleteEventCreateRuleRequest} request DeleteEventCreateRuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return AnalyticsAdminService; })(); @@ -20037,6 +20532,9 @@ case 21: case 22: case 24: + case 27: + case 28: + case 29: break; } } @@ -20183,6 +20681,18 @@ case 24: message.resourceType[i] = 24; break; + case "ADSENSE_LINK": + case 27: + message.resourceType[i] = 27; + break; + case "AUDIENCE": + case 28: + message.resourceType[i] = 28; + break; + case "EVENT_CREATE_RULE": + case 29: + message.resourceType[i] = 29; + break; } } if (object.action) { @@ -38764,25 +39274,25 @@ return ListExpandedDataSetsResponse; })(); - v1alpha.SetAutomatedGa4ConfigurationOptOutRequest = (function() { + v1alpha.CreateChannelGroupRequest = (function() { /** - * Properties of a SetAutomatedGa4ConfigurationOptOutRequest. + * Properties of a CreateChannelGroupRequest. * @memberof google.analytics.admin.v1alpha - * @interface ISetAutomatedGa4ConfigurationOptOutRequest - * @property {string|null} [property] SetAutomatedGa4ConfigurationOptOutRequest property - * @property {boolean|null} [optOut] SetAutomatedGa4ConfigurationOptOutRequest optOut + * @interface ICreateChannelGroupRequest + * @property {string|null} [parent] CreateChannelGroupRequest parent + * @property {google.analytics.admin.v1alpha.IChannelGroup|null} [channelGroup] CreateChannelGroupRequest channelGroup */ /** - * Constructs a new SetAutomatedGa4ConfigurationOptOutRequest. + * Constructs a new CreateChannelGroupRequest. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a SetAutomatedGa4ConfigurationOptOutRequest. - * @implements ISetAutomatedGa4ConfigurationOptOutRequest + * @classdesc Represents a CreateChannelGroupRequest. + * @implements ICreateChannelGroupRequest * @constructor - * @param {google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.ICreateChannelGroupRequest=} [properties] Properties to set */ - function SetAutomatedGa4ConfigurationOptOutRequest(properties) { + function CreateChannelGroupRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38790,89 +39300,89 @@ } /** - * SetAutomatedGa4ConfigurationOptOutRequest property. - * @member {string} property - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest + * CreateChannelGroupRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.CreateChannelGroupRequest * @instance */ - SetAutomatedGa4ConfigurationOptOutRequest.prototype.property = ""; + CreateChannelGroupRequest.prototype.parent = ""; /** - * SetAutomatedGa4ConfigurationOptOutRequest optOut. - * @member {boolean} optOut - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest + * CreateChannelGroupRequest channelGroup. + * @member {google.analytics.admin.v1alpha.IChannelGroup|null|undefined} channelGroup + * @memberof google.analytics.admin.v1alpha.CreateChannelGroupRequest * @instance */ - SetAutomatedGa4ConfigurationOptOutRequest.prototype.optOut = false; + CreateChannelGroupRequest.prototype.channelGroup = null; /** - * Creates a new SetAutomatedGa4ConfigurationOptOutRequest instance using the specified properties. + * Creates a new CreateChannelGroupRequest instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.CreateChannelGroupRequest * @static - * @param {google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest} SetAutomatedGa4ConfigurationOptOutRequest instance + * @param {google.analytics.admin.v1alpha.ICreateChannelGroupRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.CreateChannelGroupRequest} CreateChannelGroupRequest instance */ - SetAutomatedGa4ConfigurationOptOutRequest.create = function create(properties) { - return new SetAutomatedGa4ConfigurationOptOutRequest(properties); + CreateChannelGroupRequest.create = function create(properties) { + return new CreateChannelGroupRequest(properties); }; /** - * Encodes the specified SetAutomatedGa4ConfigurationOptOutRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest.verify|verify} messages. + * Encodes the specified CreateChannelGroupRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateChannelGroupRequest.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.CreateChannelGroupRequest * @static - * @param {google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest} message SetAutomatedGa4ConfigurationOptOutRequest message or plain object to encode + * @param {google.analytics.admin.v1alpha.ICreateChannelGroupRequest} message CreateChannelGroupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetAutomatedGa4ConfigurationOptOutRequest.encode = function encode(message, writer) { + CreateChannelGroupRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.property != null && Object.hasOwnProperty.call(message, "property")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); - if (message.optOut != null && Object.hasOwnProperty.call(message, "optOut")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.optOut); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.channelGroup != null && Object.hasOwnProperty.call(message, "channelGroup")) + $root.google.analytics.admin.v1alpha.ChannelGroup.encode(message.channelGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified SetAutomatedGa4ConfigurationOptOutRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest.verify|verify} messages. + * Encodes the specified CreateChannelGroupRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateChannelGroupRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.CreateChannelGroupRequest * @static - * @param {google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest} message SetAutomatedGa4ConfigurationOptOutRequest message or plain object to encode + * @param {google.analytics.admin.v1alpha.ICreateChannelGroupRequest} message CreateChannelGroupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetAutomatedGa4ConfigurationOptOutRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateChannelGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SetAutomatedGa4ConfigurationOptOutRequest message from the specified reader or buffer. + * Decodes a CreateChannelGroupRequest message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.CreateChannelGroupRequest * @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.SetAutomatedGa4ConfigurationOptOutRequest} SetAutomatedGa4ConfigurationOptOutRequest + * @returns {google.analytics.admin.v1alpha.CreateChannelGroupRequest} CreateChannelGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetAutomatedGa4ConfigurationOptOutRequest.decode = function decode(reader, length) { + CreateChannelGroupRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.CreateChannelGroupRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.property = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.optOut = reader.bool(); + message.channelGroup = $root.google.analytics.admin.v1alpha.ChannelGroup.decode(reader, reader.uint32()); break; } default: @@ -38884,130 +39394,137 @@ }; /** - * Decodes a SetAutomatedGa4ConfigurationOptOutRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateChannelGroupRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.CreateChannelGroupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest} SetAutomatedGa4ConfigurationOptOutRequest + * @returns {google.analytics.admin.v1alpha.CreateChannelGroupRequest} CreateChannelGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetAutomatedGa4ConfigurationOptOutRequest.decodeDelimited = function decodeDelimited(reader) { + CreateChannelGroupRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SetAutomatedGa4ConfigurationOptOutRequest message. + * Verifies a CreateChannelGroupRequest message. * @function verify - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.CreateChannelGroupRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SetAutomatedGa4ConfigurationOptOutRequest.verify = function verify(message) { + CreateChannelGroupRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.property != null && message.hasOwnProperty("property")) - if (!$util.isString(message.property)) - return "property: string expected"; - if (message.optOut != null && message.hasOwnProperty("optOut")) - if (typeof message.optOut !== "boolean") - return "optOut: boolean expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.channelGroup != null && message.hasOwnProperty("channelGroup")) { + var error = $root.google.analytics.admin.v1alpha.ChannelGroup.verify(message.channelGroup); + if (error) + return "channelGroup." + error; + } return null; }; /** - * Creates a SetAutomatedGa4ConfigurationOptOutRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateChannelGroupRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.CreateChannelGroupRequest * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest} SetAutomatedGa4ConfigurationOptOutRequest + * @returns {google.analytics.admin.v1alpha.CreateChannelGroupRequest} CreateChannelGroupRequest */ - SetAutomatedGa4ConfigurationOptOutRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest) + CreateChannelGroupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.CreateChannelGroupRequest) return object; - var message = new $root.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest(); - if (object.property != null) - message.property = String(object.property); - if (object.optOut != null) - message.optOut = Boolean(object.optOut); + var message = new $root.google.analytics.admin.v1alpha.CreateChannelGroupRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.channelGroup != null) { + if (typeof object.channelGroup !== "object") + throw TypeError(".google.analytics.admin.v1alpha.CreateChannelGroupRequest.channelGroup: object expected"); + message.channelGroup = $root.google.analytics.admin.v1alpha.ChannelGroup.fromObject(object.channelGroup); + } return message; }; /** - * Creates a plain object from a SetAutomatedGa4ConfigurationOptOutRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateChannelGroupRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.CreateChannelGroupRequest * @static - * @param {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest} message SetAutomatedGa4ConfigurationOptOutRequest + * @param {google.analytics.admin.v1alpha.CreateChannelGroupRequest} message CreateChannelGroupRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SetAutomatedGa4ConfigurationOptOutRequest.toObject = function toObject(message, options) { + CreateChannelGroupRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.property = ""; - object.optOut = false; + object.parent = ""; + object.channelGroup = null; } - if (message.property != null && message.hasOwnProperty("property")) - object.property = message.property; - if (message.optOut != null && message.hasOwnProperty("optOut")) - object.optOut = message.optOut; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.channelGroup != null && message.hasOwnProperty("channelGroup")) + object.channelGroup = $root.google.analytics.admin.v1alpha.ChannelGroup.toObject(message.channelGroup, options); return object; }; /** - * Converts this SetAutomatedGa4ConfigurationOptOutRequest to JSON. + * Converts this CreateChannelGroupRequest to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.CreateChannelGroupRequest * @instance * @returns {Object.} JSON object */ - SetAutomatedGa4ConfigurationOptOutRequest.prototype.toJSON = function toJSON() { + CreateChannelGroupRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SetAutomatedGa4ConfigurationOptOutRequest + * Gets the default type url for CreateChannelGroupRequest * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.CreateChannelGroupRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SetAutomatedGa4ConfigurationOptOutRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateChannelGroupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.CreateChannelGroupRequest"; }; - return SetAutomatedGa4ConfigurationOptOutRequest; + return CreateChannelGroupRequest; })(); - v1alpha.SetAutomatedGa4ConfigurationOptOutResponse = (function() { + v1alpha.UpdateChannelGroupRequest = (function() { /** - * Properties of a SetAutomatedGa4ConfigurationOptOutResponse. + * Properties of an UpdateChannelGroupRequest. * @memberof google.analytics.admin.v1alpha - * @interface ISetAutomatedGa4ConfigurationOptOutResponse + * @interface IUpdateChannelGroupRequest + * @property {google.analytics.admin.v1alpha.IChannelGroup|null} [channelGroup] UpdateChannelGroupRequest channelGroup + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateChannelGroupRequest updateMask */ /** - * Constructs a new SetAutomatedGa4ConfigurationOptOutResponse. + * Constructs a new UpdateChannelGroupRequest. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a SetAutomatedGa4ConfigurationOptOutResponse. - * @implements ISetAutomatedGa4ConfigurationOptOutResponse + * @classdesc Represents an UpdateChannelGroupRequest. + * @implements IUpdateChannelGroupRequest * @constructor - * @param {google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IUpdateChannelGroupRequest=} [properties] Properties to set */ - function SetAutomatedGa4ConfigurationOptOutResponse(properties) { + function UpdateChannelGroupRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39015,63 +39532,91 @@ } /** - * Creates a new SetAutomatedGa4ConfigurationOptOutResponse instance using the specified properties. + * UpdateChannelGroupRequest channelGroup. + * @member {google.analytics.admin.v1alpha.IChannelGroup|null|undefined} channelGroup + * @memberof google.analytics.admin.v1alpha.UpdateChannelGroupRequest + * @instance + */ + UpdateChannelGroupRequest.prototype.channelGroup = null; + + /** + * UpdateChannelGroupRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.analytics.admin.v1alpha.UpdateChannelGroupRequest + * @instance + */ + UpdateChannelGroupRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateChannelGroupRequest instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.UpdateChannelGroupRequest * @static - * @param {google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse} SetAutomatedGa4ConfigurationOptOutResponse instance + * @param {google.analytics.admin.v1alpha.IUpdateChannelGroupRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.UpdateChannelGroupRequest} UpdateChannelGroupRequest instance */ - SetAutomatedGa4ConfigurationOptOutResponse.create = function create(properties) { - return new SetAutomatedGa4ConfigurationOptOutResponse(properties); + UpdateChannelGroupRequest.create = function create(properties) { + return new UpdateChannelGroupRequest(properties); }; /** - * Encodes the specified SetAutomatedGa4ConfigurationOptOutResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse.verify|verify} messages. + * Encodes the specified UpdateChannelGroupRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateChannelGroupRequest.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.UpdateChannelGroupRequest * @static - * @param {google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse} message SetAutomatedGa4ConfigurationOptOutResponse message or plain object to encode + * @param {google.analytics.admin.v1alpha.IUpdateChannelGroupRequest} message UpdateChannelGroupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetAutomatedGa4ConfigurationOptOutResponse.encode = function encode(message, writer) { + UpdateChannelGroupRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.channelGroup != null && Object.hasOwnProperty.call(message, "channelGroup")) + $root.google.analytics.admin.v1alpha.ChannelGroup.encode(message.channelGroup, 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 SetAutomatedGa4ConfigurationOptOutResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse.verify|verify} messages. + * Encodes the specified UpdateChannelGroupRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateChannelGroupRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.UpdateChannelGroupRequest * @static - * @param {google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse} message SetAutomatedGa4ConfigurationOptOutResponse message or plain object to encode + * @param {google.analytics.admin.v1alpha.IUpdateChannelGroupRequest} message UpdateChannelGroupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetAutomatedGa4ConfigurationOptOutResponse.encodeDelimited = function encodeDelimited(message, writer) { + UpdateChannelGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SetAutomatedGa4ConfigurationOptOutResponse message from the specified reader or buffer. + * Decodes an UpdateChannelGroupRequest message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.UpdateChannelGroupRequest * @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.SetAutomatedGa4ConfigurationOptOutResponse} SetAutomatedGa4ConfigurationOptOutResponse + * @returns {google.analytics.admin.v1alpha.UpdateChannelGroupRequest} UpdateChannelGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetAutomatedGa4ConfigurationOptOutResponse.decode = function decode(reader, length) { + UpdateChannelGroupRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.UpdateChannelGroupRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.channelGroup = $root.google.analytics.admin.v1alpha.ChannelGroup.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -39081,109 +39626,141 @@ }; /** - * Decodes a SetAutomatedGa4ConfigurationOptOutResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateChannelGroupRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.UpdateChannelGroupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse} SetAutomatedGa4ConfigurationOptOutResponse + * @returns {google.analytics.admin.v1alpha.UpdateChannelGroupRequest} UpdateChannelGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetAutomatedGa4ConfigurationOptOutResponse.decodeDelimited = function decodeDelimited(reader) { + UpdateChannelGroupRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SetAutomatedGa4ConfigurationOptOutResponse message. + * Verifies an UpdateChannelGroupRequest message. * @function verify - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.UpdateChannelGroupRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SetAutomatedGa4ConfigurationOptOutResponse.verify = function verify(message) { + UpdateChannelGroupRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.channelGroup != null && message.hasOwnProperty("channelGroup")) { + var error = $root.google.analytics.admin.v1alpha.ChannelGroup.verify(message.channelGroup); + if (error) + return "channelGroup." + 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 a SetAutomatedGa4ConfigurationOptOutResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateChannelGroupRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.UpdateChannelGroupRequest * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse} SetAutomatedGa4ConfigurationOptOutResponse + * @returns {google.analytics.admin.v1alpha.UpdateChannelGroupRequest} UpdateChannelGroupRequest */ - SetAutomatedGa4ConfigurationOptOutResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse) + UpdateChannelGroupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.UpdateChannelGroupRequest) return object; - return new $root.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse(); + var message = new $root.google.analytics.admin.v1alpha.UpdateChannelGroupRequest(); + if (object.channelGroup != null) { + if (typeof object.channelGroup !== "object") + throw TypeError(".google.analytics.admin.v1alpha.UpdateChannelGroupRequest.channelGroup: object expected"); + message.channelGroup = $root.google.analytics.admin.v1alpha.ChannelGroup.fromObject(object.channelGroup); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.analytics.admin.v1alpha.UpdateChannelGroupRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; }; /** - * Creates a plain object from a SetAutomatedGa4ConfigurationOptOutResponse message. Also converts values to other types if specified. + * Creates a plain object from an UpdateChannelGroupRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.UpdateChannelGroupRequest * @static - * @param {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse} message SetAutomatedGa4ConfigurationOptOutResponse + * @param {google.analytics.admin.v1alpha.UpdateChannelGroupRequest} message UpdateChannelGroupRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SetAutomatedGa4ConfigurationOptOutResponse.toObject = function toObject() { - return {}; + UpdateChannelGroupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.channelGroup = null; + object.updateMask = null; + } + if (message.channelGroup != null && message.hasOwnProperty("channelGroup")) + object.channelGroup = $root.google.analytics.admin.v1alpha.ChannelGroup.toObject(message.channelGroup, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; }; /** - * Converts this SetAutomatedGa4ConfigurationOptOutResponse to JSON. + * Converts this UpdateChannelGroupRequest to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.UpdateChannelGroupRequest * @instance * @returns {Object.} JSON object */ - SetAutomatedGa4ConfigurationOptOutResponse.prototype.toJSON = function toJSON() { + UpdateChannelGroupRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SetAutomatedGa4ConfigurationOptOutResponse + * Gets the default type url for UpdateChannelGroupRequest * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.UpdateChannelGroupRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SetAutomatedGa4ConfigurationOptOutResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateChannelGroupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.UpdateChannelGroupRequest"; }; - return SetAutomatedGa4ConfigurationOptOutResponse; + return UpdateChannelGroupRequest; })(); - v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest = (function() { + v1alpha.DeleteChannelGroupRequest = (function() { /** - * Properties of a FetchAutomatedGa4ConfigurationOptOutRequest. + * Properties of a DeleteChannelGroupRequest. * @memberof google.analytics.admin.v1alpha - * @interface IFetchAutomatedGa4ConfigurationOptOutRequest - * @property {string|null} [property] FetchAutomatedGa4ConfigurationOptOutRequest property + * @interface IDeleteChannelGroupRequest + * @property {string|null} [name] DeleteChannelGroupRequest name */ /** - * Constructs a new FetchAutomatedGa4ConfigurationOptOutRequest. + * Constructs a new DeleteChannelGroupRequest. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a FetchAutomatedGa4ConfigurationOptOutRequest. - * @implements IFetchAutomatedGa4ConfigurationOptOutRequest + * @classdesc Represents a DeleteChannelGroupRequest. + * @implements IDeleteChannelGroupRequest * @constructor - * @param {google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IDeleteChannelGroupRequest=} [properties] Properties to set */ - function FetchAutomatedGa4ConfigurationOptOutRequest(properties) { + function DeleteChannelGroupRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39191,75 +39768,75 @@ } /** - * FetchAutomatedGa4ConfigurationOptOutRequest property. - * @member {string} property - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest + * DeleteChannelGroupRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.DeleteChannelGroupRequest * @instance */ - FetchAutomatedGa4ConfigurationOptOutRequest.prototype.property = ""; + DeleteChannelGroupRequest.prototype.name = ""; /** - * Creates a new FetchAutomatedGa4ConfigurationOptOutRequest instance using the specified properties. + * Creates a new DeleteChannelGroupRequest instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.DeleteChannelGroupRequest * @static - * @param {google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest} FetchAutomatedGa4ConfigurationOptOutRequest instance + * @param {google.analytics.admin.v1alpha.IDeleteChannelGroupRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.DeleteChannelGroupRequest} DeleteChannelGroupRequest instance */ - FetchAutomatedGa4ConfigurationOptOutRequest.create = function create(properties) { - return new FetchAutomatedGa4ConfigurationOptOutRequest(properties); + DeleteChannelGroupRequest.create = function create(properties) { + return new DeleteChannelGroupRequest(properties); }; /** - * Encodes the specified FetchAutomatedGa4ConfigurationOptOutRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest.verify|verify} messages. + * Encodes the specified DeleteChannelGroupRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteChannelGroupRequest.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.DeleteChannelGroupRequest * @static - * @param {google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest} message FetchAutomatedGa4ConfigurationOptOutRequest message or plain object to encode + * @param {google.analytics.admin.v1alpha.IDeleteChannelGroupRequest} message DeleteChannelGroupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FetchAutomatedGa4ConfigurationOptOutRequest.encode = function encode(message, writer) { + DeleteChannelGroupRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.property != null && Object.hasOwnProperty.call(message, "property")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified FetchAutomatedGa4ConfigurationOptOutRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest.verify|verify} messages. + * Encodes the specified DeleteChannelGroupRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteChannelGroupRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.DeleteChannelGroupRequest * @static - * @param {google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest} message FetchAutomatedGa4ConfigurationOptOutRequest message or plain object to encode + * @param {google.analytics.admin.v1alpha.IDeleteChannelGroupRequest} message DeleteChannelGroupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FetchAutomatedGa4ConfigurationOptOutRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteChannelGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FetchAutomatedGa4ConfigurationOptOutRequest message from the specified reader or buffer. + * Decodes a DeleteChannelGroupRequest message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.DeleteChannelGroupRequest * @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.FetchAutomatedGa4ConfigurationOptOutRequest} FetchAutomatedGa4ConfigurationOptOutRequest + * @returns {google.analytics.admin.v1alpha.DeleteChannelGroupRequest} DeleteChannelGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FetchAutomatedGa4ConfigurationOptOutRequest.decode = function decode(reader, length) { + DeleteChannelGroupRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DeleteChannelGroupRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.property = reader.string(); + message.name = reader.string(); break; } default: @@ -39271,122 +39848,122 @@ }; /** - * Decodes a FetchAutomatedGa4ConfigurationOptOutRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteChannelGroupRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.DeleteChannelGroupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest} FetchAutomatedGa4ConfigurationOptOutRequest + * @returns {google.analytics.admin.v1alpha.DeleteChannelGroupRequest} DeleteChannelGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FetchAutomatedGa4ConfigurationOptOutRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteChannelGroupRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FetchAutomatedGa4ConfigurationOptOutRequest message. + * Verifies a DeleteChannelGroupRequest message. * @function verify - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.DeleteChannelGroupRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FetchAutomatedGa4ConfigurationOptOutRequest.verify = function verify(message) { + DeleteChannelGroupRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.property != null && message.hasOwnProperty("property")) - if (!$util.isString(message.property)) - return "property: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a FetchAutomatedGa4ConfigurationOptOutRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteChannelGroupRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.DeleteChannelGroupRequest * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest} FetchAutomatedGa4ConfigurationOptOutRequest + * @returns {google.analytics.admin.v1alpha.DeleteChannelGroupRequest} DeleteChannelGroupRequest */ - FetchAutomatedGa4ConfigurationOptOutRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest) + DeleteChannelGroupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.DeleteChannelGroupRequest) return object; - var message = new $root.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest(); - if (object.property != null) - message.property = String(object.property); + var message = new $root.google.analytics.admin.v1alpha.DeleteChannelGroupRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a FetchAutomatedGa4ConfigurationOptOutRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteChannelGroupRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.DeleteChannelGroupRequest * @static - * @param {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest} message FetchAutomatedGa4ConfigurationOptOutRequest + * @param {google.analytics.admin.v1alpha.DeleteChannelGroupRequest} message DeleteChannelGroupRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FetchAutomatedGa4ConfigurationOptOutRequest.toObject = function toObject(message, options) { + DeleteChannelGroupRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.property = ""; - if (message.property != null && message.hasOwnProperty("property")) - object.property = message.property; + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this FetchAutomatedGa4ConfigurationOptOutRequest to JSON. + * Converts this DeleteChannelGroupRequest to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.DeleteChannelGroupRequest * @instance * @returns {Object.} JSON object */ - FetchAutomatedGa4ConfigurationOptOutRequest.prototype.toJSON = function toJSON() { + DeleteChannelGroupRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FetchAutomatedGa4ConfigurationOptOutRequest + * Gets the default type url for DeleteChannelGroupRequest * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest + * @memberof google.analytics.admin.v1alpha.DeleteChannelGroupRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FetchAutomatedGa4ConfigurationOptOutRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteChannelGroupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.DeleteChannelGroupRequest"; }; - return FetchAutomatedGa4ConfigurationOptOutRequest; + return DeleteChannelGroupRequest; })(); - v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse = (function() { + v1alpha.GetChannelGroupRequest = (function() { /** - * Properties of a FetchAutomatedGa4ConfigurationOptOutResponse. + * Properties of a GetChannelGroupRequest. * @memberof google.analytics.admin.v1alpha - * @interface IFetchAutomatedGa4ConfigurationOptOutResponse - * @property {boolean|null} [optOut] FetchAutomatedGa4ConfigurationOptOutResponse optOut + * @interface IGetChannelGroupRequest + * @property {string|null} [name] GetChannelGroupRequest name */ /** - * Constructs a new FetchAutomatedGa4ConfigurationOptOutResponse. + * Constructs a new GetChannelGroupRequest. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a FetchAutomatedGa4ConfigurationOptOutResponse. - * @implements IFetchAutomatedGa4ConfigurationOptOutResponse + * @classdesc Represents a GetChannelGroupRequest. + * @implements IGetChannelGroupRequest * @constructor - * @param {google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IGetChannelGroupRequest=} [properties] Properties to set */ - function FetchAutomatedGa4ConfigurationOptOutResponse(properties) { + function GetChannelGroupRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39394,75 +39971,75 @@ } /** - * FetchAutomatedGa4ConfigurationOptOutResponse optOut. - * @member {boolean} optOut - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse + * GetChannelGroupRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.GetChannelGroupRequest * @instance */ - FetchAutomatedGa4ConfigurationOptOutResponse.prototype.optOut = false; + GetChannelGroupRequest.prototype.name = ""; /** - * Creates a new FetchAutomatedGa4ConfigurationOptOutResponse instance using the specified properties. + * Creates a new GetChannelGroupRequest instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.GetChannelGroupRequest * @static - * @param {google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse} FetchAutomatedGa4ConfigurationOptOutResponse instance + * @param {google.analytics.admin.v1alpha.IGetChannelGroupRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.GetChannelGroupRequest} GetChannelGroupRequest instance */ - FetchAutomatedGa4ConfigurationOptOutResponse.create = function create(properties) { - return new FetchAutomatedGa4ConfigurationOptOutResponse(properties); + GetChannelGroupRequest.create = function create(properties) { + return new GetChannelGroupRequest(properties); }; /** - * Encodes the specified FetchAutomatedGa4ConfigurationOptOutResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse.verify|verify} messages. + * Encodes the specified GetChannelGroupRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetChannelGroupRequest.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.GetChannelGroupRequest * @static - * @param {google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse} message FetchAutomatedGa4ConfigurationOptOutResponse message or plain object to encode + * @param {google.analytics.admin.v1alpha.IGetChannelGroupRequest} message GetChannelGroupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FetchAutomatedGa4ConfigurationOptOutResponse.encode = function encode(message, writer) { + GetChannelGroupRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.optOut != null && Object.hasOwnProperty.call(message, "optOut")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.optOut); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified FetchAutomatedGa4ConfigurationOptOutResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse.verify|verify} messages. + * Encodes the specified GetChannelGroupRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetChannelGroupRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.GetChannelGroupRequest * @static - * @param {google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse} message FetchAutomatedGa4ConfigurationOptOutResponse message or plain object to encode + * @param {google.analytics.admin.v1alpha.IGetChannelGroupRequest} message GetChannelGroupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FetchAutomatedGa4ConfigurationOptOutResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetChannelGroupRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FetchAutomatedGa4ConfigurationOptOutResponse message from the specified reader or buffer. + * Decodes a GetChannelGroupRequest message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.GetChannelGroupRequest * @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.FetchAutomatedGa4ConfigurationOptOutResponse} FetchAutomatedGa4ConfigurationOptOutResponse + * @returns {google.analytics.admin.v1alpha.GetChannelGroupRequest} GetChannelGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FetchAutomatedGa4ConfigurationOptOutResponse.decode = function decode(reader, length) { + GetChannelGroupRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GetChannelGroupRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.optOut = reader.bool(); + message.name = reader.string(); break; } default: @@ -39474,122 +40051,124 @@ }; /** - * Decodes a FetchAutomatedGa4ConfigurationOptOutResponse message from the specified reader or buffer, length delimited. + * Decodes a GetChannelGroupRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.GetChannelGroupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse} FetchAutomatedGa4ConfigurationOptOutResponse + * @returns {google.analytics.admin.v1alpha.GetChannelGroupRequest} GetChannelGroupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FetchAutomatedGa4ConfigurationOptOutResponse.decodeDelimited = function decodeDelimited(reader) { + GetChannelGroupRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FetchAutomatedGa4ConfigurationOptOutResponse message. + * Verifies a GetChannelGroupRequest message. * @function verify - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.GetChannelGroupRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FetchAutomatedGa4ConfigurationOptOutResponse.verify = function verify(message) { + GetChannelGroupRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.optOut != null && message.hasOwnProperty("optOut")) - if (typeof message.optOut !== "boolean") - return "optOut: boolean expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a FetchAutomatedGa4ConfigurationOptOutResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetChannelGroupRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.GetChannelGroupRequest * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse} FetchAutomatedGa4ConfigurationOptOutResponse + * @returns {google.analytics.admin.v1alpha.GetChannelGroupRequest} GetChannelGroupRequest */ - FetchAutomatedGa4ConfigurationOptOutResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse) + GetChannelGroupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.GetChannelGroupRequest) return object; - var message = new $root.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse(); - if (object.optOut != null) - message.optOut = Boolean(object.optOut); + var message = new $root.google.analytics.admin.v1alpha.GetChannelGroupRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a FetchAutomatedGa4ConfigurationOptOutResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetChannelGroupRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.GetChannelGroupRequest * @static - * @param {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse} message FetchAutomatedGa4ConfigurationOptOutResponse + * @param {google.analytics.admin.v1alpha.GetChannelGroupRequest} message GetChannelGroupRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FetchAutomatedGa4ConfigurationOptOutResponse.toObject = function toObject(message, options) { + GetChannelGroupRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.optOut = false; - if (message.optOut != null && message.hasOwnProperty("optOut")) - object.optOut = message.optOut; + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this FetchAutomatedGa4ConfigurationOptOutResponse to JSON. + * Converts this GetChannelGroupRequest to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.GetChannelGroupRequest * @instance * @returns {Object.} JSON object */ - FetchAutomatedGa4ConfigurationOptOutResponse.prototype.toJSON = function toJSON() { + GetChannelGroupRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FetchAutomatedGa4ConfigurationOptOutResponse + * Gets the default type url for GetChannelGroupRequest * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse + * @memberof google.analytics.admin.v1alpha.GetChannelGroupRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FetchAutomatedGa4ConfigurationOptOutResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetChannelGroupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.GetChannelGroupRequest"; }; - return FetchAutomatedGa4ConfigurationOptOutResponse; + return GetChannelGroupRequest; })(); - v1alpha.GetBigQueryLinkRequest = (function() { + v1alpha.ListChannelGroupsRequest = (function() { /** - * Properties of a GetBigQueryLinkRequest. + * Properties of a ListChannelGroupsRequest. * @memberof google.analytics.admin.v1alpha - * @interface IGetBigQueryLinkRequest - * @property {string|null} [name] GetBigQueryLinkRequest name + * @interface IListChannelGroupsRequest + * @property {string|null} [parent] ListChannelGroupsRequest parent + * @property {number|null} [pageSize] ListChannelGroupsRequest pageSize + * @property {string|null} [pageToken] ListChannelGroupsRequest pageToken */ /** - * Constructs a new GetBigQueryLinkRequest. + * Constructs a new ListChannelGroupsRequest. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a GetBigQueryLinkRequest. - * @implements IGetBigQueryLinkRequest + * @classdesc Represents a ListChannelGroupsRequest. + * @implements IListChannelGroupsRequest * @constructor - * @param {google.analytics.admin.v1alpha.IGetBigQueryLinkRequest=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IListChannelGroupsRequest=} [properties] Properties to set */ - function GetBigQueryLinkRequest(properties) { + function ListChannelGroupsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39597,75 +40176,103 @@ } /** - * GetBigQueryLinkRequest name. - * @member {string} name - * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest + * ListChannelGroupsRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.ListChannelGroupsRequest * @instance */ - GetBigQueryLinkRequest.prototype.name = ""; + ListChannelGroupsRequest.prototype.parent = ""; /** - * Creates a new GetBigQueryLinkRequest instance using the specified properties. + * ListChannelGroupsRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.admin.v1alpha.ListChannelGroupsRequest + * @instance + */ + ListChannelGroupsRequest.prototype.pageSize = 0; + + /** + * ListChannelGroupsRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.admin.v1alpha.ListChannelGroupsRequest + * @instance + */ + ListChannelGroupsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListChannelGroupsRequest instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest + * @memberof google.analytics.admin.v1alpha.ListChannelGroupsRequest * @static - * @param {google.analytics.admin.v1alpha.IGetBigQueryLinkRequest=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.GetBigQueryLinkRequest} GetBigQueryLinkRequest instance + * @param {google.analytics.admin.v1alpha.IListChannelGroupsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListChannelGroupsRequest} ListChannelGroupsRequest instance */ - GetBigQueryLinkRequest.create = function create(properties) { - return new GetBigQueryLinkRequest(properties); + ListChannelGroupsRequest.create = function create(properties) { + return new ListChannelGroupsRequest(properties); }; /** - * Encodes the specified GetBigQueryLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetBigQueryLinkRequest.verify|verify} messages. + * Encodes the specified ListChannelGroupsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListChannelGroupsRequest.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest + * @memberof google.analytics.admin.v1alpha.ListChannelGroupsRequest * @static - * @param {google.analytics.admin.v1alpha.IGetBigQueryLinkRequest} message GetBigQueryLinkRequest message or plain object to encode + * @param {google.analytics.admin.v1alpha.IListChannelGroupsRequest} message ListChannelGroupsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBigQueryLinkRequest.encode = function encode(message, writer) { + ListChannelGroupsRequest.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.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); return writer; }; /** - * Encodes the specified GetBigQueryLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetBigQueryLinkRequest.verify|verify} messages. + * Encodes the specified ListChannelGroupsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListChannelGroupsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest + * @memberof google.analytics.admin.v1alpha.ListChannelGroupsRequest * @static - * @param {google.analytics.admin.v1alpha.IGetBigQueryLinkRequest} message GetBigQueryLinkRequest message or plain object to encode + * @param {google.analytics.admin.v1alpha.IListChannelGroupsRequest} message ListChannelGroupsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBigQueryLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListChannelGroupsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetBigQueryLinkRequest message from the specified reader or buffer. + * Decodes a ListChannelGroupsRequest message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest + * @memberof google.analytics.admin.v1alpha.ListChannelGroupsRequest * @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.GetBigQueryLinkRequest} GetBigQueryLinkRequest + * @returns {google.analytics.admin.v1alpha.ListChannelGroupsRequest} ListChannelGroupsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBigQueryLinkRequest.decode = function decode(reader, length) { + ListChannelGroupsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GetBigQueryLinkRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListChannelGroupsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); break; } default: @@ -39677,124 +40284,141 @@ }; /** - * Decodes a GetBigQueryLinkRequest message from the specified reader or buffer, length delimited. + * Decodes a ListChannelGroupsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest + * @memberof google.analytics.admin.v1alpha.ListChannelGroupsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.GetBigQueryLinkRequest} GetBigQueryLinkRequest + * @returns {google.analytics.admin.v1alpha.ListChannelGroupsRequest} ListChannelGroupsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBigQueryLinkRequest.decodeDelimited = function decodeDelimited(reader) { + ListChannelGroupsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetBigQueryLinkRequest message. + * Verifies a ListChannelGroupsRequest message. * @function verify - * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest + * @memberof google.analytics.admin.v1alpha.ListChannelGroupsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetBigQueryLinkRequest.verify = function verify(message) { + ListChannelGroupsRequest.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.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"; return null; }; /** - * Creates a GetBigQueryLinkRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListChannelGroupsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest + * @memberof google.analytics.admin.v1alpha.ListChannelGroupsRequest * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.GetBigQueryLinkRequest} GetBigQueryLinkRequest + * @returns {google.analytics.admin.v1alpha.ListChannelGroupsRequest} ListChannelGroupsRequest */ - GetBigQueryLinkRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.GetBigQueryLinkRequest) + ListChannelGroupsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListChannelGroupsRequest) return object; - var message = new $root.google.analytics.admin.v1alpha.GetBigQueryLinkRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.analytics.admin.v1alpha.ListChannelGroupsRequest(); + 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); return message; }; /** - * Creates a plain object from a GetBigQueryLinkRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListChannelGroupsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest + * @memberof google.analytics.admin.v1alpha.ListChannelGroupsRequest * @static - * @param {google.analytics.admin.v1alpha.GetBigQueryLinkRequest} message GetBigQueryLinkRequest + * @param {google.analytics.admin.v1alpha.ListChannelGroupsRequest} message ListChannelGroupsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetBigQueryLinkRequest.toObject = function toObject(message, options) { + ListChannelGroupsRequest.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; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + 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; return object; }; /** - * Converts this GetBigQueryLinkRequest to JSON. + * Converts this ListChannelGroupsRequest to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest + * @memberof google.analytics.admin.v1alpha.ListChannelGroupsRequest * @instance * @returns {Object.} JSON object */ - GetBigQueryLinkRequest.prototype.toJSON = function toJSON() { + ListChannelGroupsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetBigQueryLinkRequest + * Gets the default type url for ListChannelGroupsRequest * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest + * @memberof google.analytics.admin.v1alpha.ListChannelGroupsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetBigQueryLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListChannelGroupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.GetBigQueryLinkRequest"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListChannelGroupsRequest"; }; - return GetBigQueryLinkRequest; + return ListChannelGroupsRequest; })(); - v1alpha.ListBigQueryLinksRequest = (function() { + v1alpha.ListChannelGroupsResponse = (function() { /** - * Properties of a ListBigQueryLinksRequest. + * Properties of a ListChannelGroupsResponse. * @memberof google.analytics.admin.v1alpha - * @interface IListBigQueryLinksRequest - * @property {string|null} [parent] ListBigQueryLinksRequest parent - * @property {number|null} [pageSize] ListBigQueryLinksRequest pageSize - * @property {string|null} [pageToken] ListBigQueryLinksRequest pageToken + * @interface IListChannelGroupsResponse + * @property {Array.|null} [channelGroups] ListChannelGroupsResponse channelGroups + * @property {string|null} [nextPageToken] ListChannelGroupsResponse nextPageToken */ /** - * Constructs a new ListBigQueryLinksRequest. + * Constructs a new ListChannelGroupsResponse. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a ListBigQueryLinksRequest. - * @implements IListBigQueryLinksRequest + * @classdesc Represents a ListChannelGroupsResponse. + * @implements IListChannelGroupsResponse * @constructor - * @param {google.analytics.admin.v1alpha.IListBigQueryLinksRequest=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IListChannelGroupsResponse=} [properties] Properties to set */ - function ListBigQueryLinksRequest(properties) { + function ListChannelGroupsResponse(properties) { + this.channelGroups = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39802,103 +40426,92 @@ } /** - * ListBigQueryLinksRequest parent. - * @member {string} parent - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest - * @instance - */ - ListBigQueryLinksRequest.prototype.parent = ""; - - /** - * ListBigQueryLinksRequest pageSize. - * @member {number} pageSize - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * ListChannelGroupsResponse channelGroups. + * @member {Array.} channelGroups + * @memberof google.analytics.admin.v1alpha.ListChannelGroupsResponse * @instance */ - ListBigQueryLinksRequest.prototype.pageSize = 0; + ListChannelGroupsResponse.prototype.channelGroups = $util.emptyArray; /** - * ListBigQueryLinksRequest pageToken. - * @member {string} pageToken - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * ListChannelGroupsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.analytics.admin.v1alpha.ListChannelGroupsResponse * @instance */ - ListBigQueryLinksRequest.prototype.pageToken = ""; + ListChannelGroupsResponse.prototype.nextPageToken = ""; /** - * Creates a new ListBigQueryLinksRequest instance using the specified properties. + * Creates a new ListChannelGroupsResponse instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @memberof google.analytics.admin.v1alpha.ListChannelGroupsResponse * @static - * @param {google.analytics.admin.v1alpha.IListBigQueryLinksRequest=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.ListBigQueryLinksRequest} ListBigQueryLinksRequest instance + * @param {google.analytics.admin.v1alpha.IListChannelGroupsResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListChannelGroupsResponse} ListChannelGroupsResponse instance */ - ListBigQueryLinksRequest.create = function create(properties) { - return new ListBigQueryLinksRequest(properties); + ListChannelGroupsResponse.create = function create(properties) { + return new ListChannelGroupsResponse(properties); }; /** - * Encodes the specified ListBigQueryLinksRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListBigQueryLinksRequest.verify|verify} messages. + * Encodes the specified ListChannelGroupsResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListChannelGroupsResponse.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @memberof google.analytics.admin.v1alpha.ListChannelGroupsResponse * @static - * @param {google.analytics.admin.v1alpha.IListBigQueryLinksRequest} message ListBigQueryLinksRequest message or plain object to encode + * @param {google.analytics.admin.v1alpha.IListChannelGroupsResponse} message ListChannelGroupsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBigQueryLinksRequest.encode = function encode(message, writer) { + ListChannelGroupsResponse.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.channelGroups != null && message.channelGroups.length) + for (var i = 0; i < message.channelGroups.length; ++i) + $root.google.analytics.admin.v1alpha.ChannelGroup.encode(message.channelGroups[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 ListBigQueryLinksRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListBigQueryLinksRequest.verify|verify} messages. + * Encodes the specified ListChannelGroupsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListChannelGroupsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @memberof google.analytics.admin.v1alpha.ListChannelGroupsResponse * @static - * @param {google.analytics.admin.v1alpha.IListBigQueryLinksRequest} message ListBigQueryLinksRequest message or plain object to encode + * @param {google.analytics.admin.v1alpha.IListChannelGroupsResponse} message ListChannelGroupsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBigQueryLinksRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListChannelGroupsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListBigQueryLinksRequest message from the specified reader or buffer. + * Decodes a ListChannelGroupsResponse message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @memberof google.analytics.admin.v1alpha.ListChannelGroupsResponse * @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.ListBigQueryLinksRequest} ListBigQueryLinksRequest + * @returns {google.analytics.admin.v1alpha.ListChannelGroupsResponse} ListChannelGroupsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBigQueryLinksRequest.decode = function decode(reader, length) { + ListChannelGroupsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListBigQueryLinksRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListChannelGroupsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + if (!(message.channelGroups && message.channelGroups.length)) + message.channelGroups = []; + message.channelGroups.push($root.google.analytics.admin.v1alpha.ChannelGroup.decode(reader, reader.uint32())); break; } case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); + message.nextPageToken = reader.string(); break; } default: @@ -39910,141 +40523,149 @@ }; /** - * Decodes a ListBigQueryLinksRequest message from the specified reader or buffer, length delimited. + * Decodes a ListChannelGroupsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @memberof google.analytics.admin.v1alpha.ListChannelGroupsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.ListBigQueryLinksRequest} ListBigQueryLinksRequest + * @returns {google.analytics.admin.v1alpha.ListChannelGroupsResponse} ListChannelGroupsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBigQueryLinksRequest.decodeDelimited = function decodeDelimited(reader) { + ListChannelGroupsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListBigQueryLinksRequest message. + * Verifies a ListChannelGroupsResponse message. * @function verify - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @memberof google.analytics.admin.v1alpha.ListChannelGroupsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListBigQueryLinksRequest.verify = function verify(message) { + ListChannelGroupsResponse.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.channelGroups != null && message.hasOwnProperty("channelGroups")) { + if (!Array.isArray(message.channelGroups)) + return "channelGroups: array expected"; + for (var i = 0; i < message.channelGroups.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.ChannelGroup.verify(message.channelGroups[i]); + if (error) + return "channelGroups." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a ListBigQueryLinksRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListChannelGroupsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @memberof google.analytics.admin.v1alpha.ListChannelGroupsResponse * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.ListBigQueryLinksRequest} ListBigQueryLinksRequest + * @returns {google.analytics.admin.v1alpha.ListChannelGroupsResponse} ListChannelGroupsResponse */ - ListBigQueryLinksRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.ListBigQueryLinksRequest) + ListChannelGroupsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListChannelGroupsResponse) return object; - var message = new $root.google.analytics.admin.v1alpha.ListBigQueryLinksRequest(); - 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); + var message = new $root.google.analytics.admin.v1alpha.ListChannelGroupsResponse(); + if (object.channelGroups) { + if (!Array.isArray(object.channelGroups)) + throw TypeError(".google.analytics.admin.v1alpha.ListChannelGroupsResponse.channelGroups: array expected"); + message.channelGroups = []; + for (var i = 0; i < object.channelGroups.length; ++i) { + if (typeof object.channelGroups[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ListChannelGroupsResponse.channelGroups: object expected"); + message.channelGroups[i] = $root.google.analytics.admin.v1alpha.ChannelGroup.fromObject(object.channelGroups[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListBigQueryLinksRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListChannelGroupsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @memberof google.analytics.admin.v1alpha.ListChannelGroupsResponse * @static - * @param {google.analytics.admin.v1alpha.ListBigQueryLinksRequest} message ListBigQueryLinksRequest + * @param {google.analytics.admin.v1alpha.ListChannelGroupsResponse} message ListChannelGroupsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListBigQueryLinksRequest.toObject = function toObject(message, options) { + ListChannelGroupsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; + if (options.arrays || options.defaults) + object.channelGroups = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.channelGroups && message.channelGroups.length) { + object.channelGroups = []; + for (var j = 0; j < message.channelGroups.length; ++j) + object.channelGroups[j] = $root.google.analytics.admin.v1alpha.ChannelGroup.toObject(message.channelGroups[j], options); } - 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.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ListBigQueryLinksRequest to JSON. + * Converts this ListChannelGroupsResponse to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @memberof google.analytics.admin.v1alpha.ListChannelGroupsResponse * @instance * @returns {Object.} JSON object */ - ListBigQueryLinksRequest.prototype.toJSON = function toJSON() { + ListChannelGroupsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListBigQueryLinksRequest + * Gets the default type url for ListChannelGroupsResponse * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @memberof google.analytics.admin.v1alpha.ListChannelGroupsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListBigQueryLinksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListChannelGroupsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListBigQueryLinksRequest"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListChannelGroupsResponse"; }; - return ListBigQueryLinksRequest; + return ListChannelGroupsResponse; })(); - v1alpha.ListBigQueryLinksResponse = (function() { + v1alpha.SetAutomatedGa4ConfigurationOptOutRequest = (function() { /** - * Properties of a ListBigQueryLinksResponse. + * Properties of a SetAutomatedGa4ConfigurationOptOutRequest. * @memberof google.analytics.admin.v1alpha - * @interface IListBigQueryLinksResponse - * @property {Array.|null} [bigqueryLinks] ListBigQueryLinksResponse bigqueryLinks - * @property {string|null} [nextPageToken] ListBigQueryLinksResponse nextPageToken + * @interface ISetAutomatedGa4ConfigurationOptOutRequest + * @property {string|null} [property] SetAutomatedGa4ConfigurationOptOutRequest property + * @property {boolean|null} [optOut] SetAutomatedGa4ConfigurationOptOutRequest optOut */ /** - * Constructs a new ListBigQueryLinksResponse. + * Constructs a new SetAutomatedGa4ConfigurationOptOutRequest. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a ListBigQueryLinksResponse. - * @implements IListBigQueryLinksResponse + * @classdesc Represents a SetAutomatedGa4ConfigurationOptOutRequest. + * @implements ISetAutomatedGa4ConfigurationOptOutRequest * @constructor - * @param {google.analytics.admin.v1alpha.IListBigQueryLinksResponse=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest=} [properties] Properties to set */ - function ListBigQueryLinksResponse(properties) { - this.bigqueryLinks = []; + function SetAutomatedGa4ConfigurationOptOutRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -40052,92 +40673,89 @@ } /** - * ListBigQueryLinksResponse bigqueryLinks. - * @member {Array.} bigqueryLinks - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * SetAutomatedGa4ConfigurationOptOutRequest property. + * @member {string} property + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest * @instance */ - ListBigQueryLinksResponse.prototype.bigqueryLinks = $util.emptyArray; + SetAutomatedGa4ConfigurationOptOutRequest.prototype.property = ""; /** - * ListBigQueryLinksResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * SetAutomatedGa4ConfigurationOptOutRequest optOut. + * @member {boolean} optOut + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest * @instance */ - ListBigQueryLinksResponse.prototype.nextPageToken = ""; + SetAutomatedGa4ConfigurationOptOutRequest.prototype.optOut = false; /** - * Creates a new ListBigQueryLinksResponse instance using the specified properties. + * Creates a new SetAutomatedGa4ConfigurationOptOutRequest instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest * @static - * @param {google.analytics.admin.v1alpha.IListBigQueryLinksResponse=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.ListBigQueryLinksResponse} ListBigQueryLinksResponse instance + * @param {google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest} SetAutomatedGa4ConfigurationOptOutRequest instance */ - ListBigQueryLinksResponse.create = function create(properties) { - return new ListBigQueryLinksResponse(properties); + SetAutomatedGa4ConfigurationOptOutRequest.create = function create(properties) { + return new SetAutomatedGa4ConfigurationOptOutRequest(properties); }; /** - * Encodes the specified ListBigQueryLinksResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListBigQueryLinksResponse.verify|verify} messages. + * Encodes the specified SetAutomatedGa4ConfigurationOptOutRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest * @static - * @param {google.analytics.admin.v1alpha.IListBigQueryLinksResponse} message ListBigQueryLinksResponse message or plain object to encode + * @param {google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest} message SetAutomatedGa4ConfigurationOptOutRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBigQueryLinksResponse.encode = function encode(message, writer) { + SetAutomatedGa4ConfigurationOptOutRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.bigqueryLinks != null && message.bigqueryLinks.length) - for (var i = 0; i < message.bigqueryLinks.length; ++i) - $root.google.analytics.admin.v1alpha.BigQueryLink.encode(message.bigqueryLinks[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); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); + if (message.optOut != null && Object.hasOwnProperty.call(message, "optOut")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.optOut); return writer; }; /** - * Encodes the specified ListBigQueryLinksResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListBigQueryLinksResponse.verify|verify} messages. + * Encodes the specified SetAutomatedGa4ConfigurationOptOutRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest * @static - * @param {google.analytics.admin.v1alpha.IListBigQueryLinksResponse} message ListBigQueryLinksResponse message or plain object to encode + * @param {google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest} message SetAutomatedGa4ConfigurationOptOutRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBigQueryLinksResponse.encodeDelimited = function encodeDelimited(message, writer) { + SetAutomatedGa4ConfigurationOptOutRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListBigQueryLinksResponse message from the specified reader or buffer. + * Decodes a SetAutomatedGa4ConfigurationOptOutRequest message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest * @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.ListBigQueryLinksResponse} ListBigQueryLinksResponse + * @returns {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest} SetAutomatedGa4ConfigurationOptOutRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBigQueryLinksResponse.decode = function decode(reader, length) { + SetAutomatedGa4ConfigurationOptOutRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListBigQueryLinksResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.bigqueryLinks && message.bigqueryLinks.length)) - message.bigqueryLinks = []; - message.bigqueryLinks.push($root.google.analytics.admin.v1alpha.BigQueryLink.decode(reader, reader.uint32())); + message.property = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); + message.optOut = reader.bool(); break; } default: @@ -40149,148 +40767,130 @@ }; /** - * Decodes a ListBigQueryLinksResponse message from the specified reader or buffer, length delimited. + * Decodes a SetAutomatedGa4ConfigurationOptOutRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.ListBigQueryLinksResponse} ListBigQueryLinksResponse + * @returns {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest} SetAutomatedGa4ConfigurationOptOutRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBigQueryLinksResponse.decodeDelimited = function decodeDelimited(reader) { + SetAutomatedGa4ConfigurationOptOutRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListBigQueryLinksResponse message. + * Verifies a SetAutomatedGa4ConfigurationOptOutRequest message. * @function verify - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListBigQueryLinksResponse.verify = function verify(message) { + SetAutomatedGa4ConfigurationOptOutRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.bigqueryLinks != null && message.hasOwnProperty("bigqueryLinks")) { - if (!Array.isArray(message.bigqueryLinks)) - return "bigqueryLinks: array expected"; - for (var i = 0; i < message.bigqueryLinks.length; ++i) { - var error = $root.google.analytics.admin.v1alpha.BigQueryLink.verify(message.bigqueryLinks[i]); - if (error) - return "bigqueryLinks." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.property != null && message.hasOwnProperty("property")) + if (!$util.isString(message.property)) + return "property: string expected"; + if (message.optOut != null && message.hasOwnProperty("optOut")) + if (typeof message.optOut !== "boolean") + return "optOut: boolean expected"; return null; }; /** - * Creates a ListBigQueryLinksResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SetAutomatedGa4ConfigurationOptOutRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.ListBigQueryLinksResponse} ListBigQueryLinksResponse + * @returns {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest} SetAutomatedGa4ConfigurationOptOutRequest */ - ListBigQueryLinksResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.ListBigQueryLinksResponse) + SetAutomatedGa4ConfigurationOptOutRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest) return object; - var message = new $root.google.analytics.admin.v1alpha.ListBigQueryLinksResponse(); - if (object.bigqueryLinks) { - if (!Array.isArray(object.bigqueryLinks)) - throw TypeError(".google.analytics.admin.v1alpha.ListBigQueryLinksResponse.bigqueryLinks: array expected"); - message.bigqueryLinks = []; - for (var i = 0; i < object.bigqueryLinks.length; ++i) { - if (typeof object.bigqueryLinks[i] !== "object") - throw TypeError(".google.analytics.admin.v1alpha.ListBigQueryLinksResponse.bigqueryLinks: object expected"); - message.bigqueryLinks[i] = $root.google.analytics.admin.v1alpha.BigQueryLink.fromObject(object.bigqueryLinks[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest(); + if (object.property != null) + message.property = String(object.property); + if (object.optOut != null) + message.optOut = Boolean(object.optOut); return message; }; /** - * Creates a plain object from a ListBigQueryLinksResponse message. Also converts values to other types if specified. + * Creates a plain object from a SetAutomatedGa4ConfigurationOptOutRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest * @static - * @param {google.analytics.admin.v1alpha.ListBigQueryLinksResponse} message ListBigQueryLinksResponse + * @param {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest} message SetAutomatedGa4ConfigurationOptOutRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListBigQueryLinksResponse.toObject = function toObject(message, options) { + SetAutomatedGa4ConfigurationOptOutRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.bigqueryLinks = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.bigqueryLinks && message.bigqueryLinks.length) { - object.bigqueryLinks = []; - for (var j = 0; j < message.bigqueryLinks.length; ++j) - object.bigqueryLinks[j] = $root.google.analytics.admin.v1alpha.BigQueryLink.toObject(message.bigqueryLinks[j], options); + if (options.defaults) { + object.property = ""; + object.optOut = false; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.property != null && message.hasOwnProperty("property")) + object.property = message.property; + if (message.optOut != null && message.hasOwnProperty("optOut")) + object.optOut = message.optOut; return object; }; /** - * Converts this ListBigQueryLinksResponse to JSON. + * Converts this SetAutomatedGa4ConfigurationOptOutRequest to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest * @instance * @returns {Object.} JSON object */ - ListBigQueryLinksResponse.prototype.toJSON = function toJSON() { + SetAutomatedGa4ConfigurationOptOutRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListBigQueryLinksResponse + * Gets the default type url for SetAutomatedGa4ConfigurationOptOutRequest * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListBigQueryLinksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SetAutomatedGa4ConfigurationOptOutRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListBigQueryLinksResponse"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest"; }; - return ListBigQueryLinksResponse; + return SetAutomatedGa4ConfigurationOptOutRequest; })(); - v1alpha.GetEnhancedMeasurementSettingsRequest = (function() { + v1alpha.SetAutomatedGa4ConfigurationOptOutResponse = (function() { /** - * Properties of a GetEnhancedMeasurementSettingsRequest. + * Properties of a SetAutomatedGa4ConfigurationOptOutResponse. * @memberof google.analytics.admin.v1alpha - * @interface IGetEnhancedMeasurementSettingsRequest - * @property {string|null} [name] GetEnhancedMeasurementSettingsRequest name + * @interface ISetAutomatedGa4ConfigurationOptOutResponse */ /** - * Constructs a new GetEnhancedMeasurementSettingsRequest. + * Constructs a new SetAutomatedGa4ConfigurationOptOutResponse. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a GetEnhancedMeasurementSettingsRequest. - * @implements IGetEnhancedMeasurementSettingsRequest + * @classdesc Represents a SetAutomatedGa4ConfigurationOptOutResponse. + * @implements ISetAutomatedGa4ConfigurationOptOutResponse * @constructor - * @param {google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse=} [properties] Properties to set */ - function GetEnhancedMeasurementSettingsRequest(properties) { + function SetAutomatedGa4ConfigurationOptOutResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -40298,77 +40898,63 @@ } /** - * GetEnhancedMeasurementSettingsRequest name. - * @member {string} name - * @memberof google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest - * @instance - */ - GetEnhancedMeasurementSettingsRequest.prototype.name = ""; - - /** - * Creates a new GetEnhancedMeasurementSettingsRequest instance using the specified properties. + * Creates a new SetAutomatedGa4ConfigurationOptOutResponse instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse * @static - * @param {google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest} GetEnhancedMeasurementSettingsRequest instance + * @param {google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse} SetAutomatedGa4ConfigurationOptOutResponse instance */ - GetEnhancedMeasurementSettingsRequest.create = function create(properties) { - return new GetEnhancedMeasurementSettingsRequest(properties); + SetAutomatedGa4ConfigurationOptOutResponse.create = function create(properties) { + return new SetAutomatedGa4ConfigurationOptOutResponse(properties); }; /** - * Encodes the specified GetEnhancedMeasurementSettingsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest.verify|verify} messages. + * Encodes the specified SetAutomatedGa4ConfigurationOptOutResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse * @static - * @param {google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest} message GetEnhancedMeasurementSettingsRequest message or plain object to encode + * @param {google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse} message SetAutomatedGa4ConfigurationOptOutResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEnhancedMeasurementSettingsRequest.encode = function encode(message, writer) { + SetAutomatedGa4ConfigurationOptOutResponse.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 GetEnhancedMeasurementSettingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest.verify|verify} messages. + * Encodes the specified SetAutomatedGa4ConfigurationOptOutResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse * @static - * @param {google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest} message GetEnhancedMeasurementSettingsRequest message or plain object to encode + * @param {google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse} message SetAutomatedGa4ConfigurationOptOutResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEnhancedMeasurementSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + SetAutomatedGa4ConfigurationOptOutResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetEnhancedMeasurementSettingsRequest message from the specified reader or buffer. + * Decodes a SetAutomatedGa4ConfigurationOptOutResponse message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse * @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.GetEnhancedMeasurementSettingsRequest} GetEnhancedMeasurementSettingsRequest + * @returns {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse} SetAutomatedGa4ConfigurationOptOutResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetEnhancedMeasurementSettingsRequest.decode = function decode(reader, length) { + SetAutomatedGa4ConfigurationOptOutResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -40378,123 +40964,109 @@ }; /** - * Decodes a GetEnhancedMeasurementSettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a SetAutomatedGa4ConfigurationOptOutResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest} GetEnhancedMeasurementSettingsRequest + * @returns {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse} SetAutomatedGa4ConfigurationOptOutResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetEnhancedMeasurementSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + SetAutomatedGa4ConfigurationOptOutResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetEnhancedMeasurementSettingsRequest message. + * Verifies a SetAutomatedGa4ConfigurationOptOutResponse message. * @function verify - * @memberof google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetEnhancedMeasurementSettingsRequest.verify = function verify(message) { + SetAutomatedGa4ConfigurationOptOutResponse.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 GetEnhancedMeasurementSettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SetAutomatedGa4ConfigurationOptOutResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest} GetEnhancedMeasurementSettingsRequest + * @returns {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse} SetAutomatedGa4ConfigurationOptOutResponse */ - GetEnhancedMeasurementSettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest) + SetAutomatedGa4ConfigurationOptOutResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse) return object; - var message = new $root.google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest(); - if (object.name != null) - message.name = String(object.name); - return message; + return new $root.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse(); }; /** - * Creates a plain object from a GetEnhancedMeasurementSettingsRequest message. Also converts values to other types if specified. + * Creates a plain object from a SetAutomatedGa4ConfigurationOptOutResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse * @static - * @param {google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest} message GetEnhancedMeasurementSettingsRequest + * @param {google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse} message SetAutomatedGa4ConfigurationOptOutResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetEnhancedMeasurementSettingsRequest.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; + SetAutomatedGa4ConfigurationOptOutResponse.toObject = function toObject() { + return {}; }; /** - * Converts this GetEnhancedMeasurementSettingsRequest to JSON. + * Converts this SetAutomatedGa4ConfigurationOptOutResponse to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse * @instance * @returns {Object.} JSON object */ - GetEnhancedMeasurementSettingsRequest.prototype.toJSON = function toJSON() { + SetAutomatedGa4ConfigurationOptOutResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetEnhancedMeasurementSettingsRequest + * Gets the default type url for SetAutomatedGa4ConfigurationOptOutResponse * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest + * @memberof google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetEnhancedMeasurementSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SetAutomatedGa4ConfigurationOptOutResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse"; }; - return GetEnhancedMeasurementSettingsRequest; + return SetAutomatedGa4ConfigurationOptOutResponse; })(); - v1alpha.UpdateEnhancedMeasurementSettingsRequest = (function() { + v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest = (function() { /** - * Properties of an UpdateEnhancedMeasurementSettingsRequest. + * Properties of a FetchAutomatedGa4ConfigurationOptOutRequest. * @memberof google.analytics.admin.v1alpha - * @interface IUpdateEnhancedMeasurementSettingsRequest - * @property {google.analytics.admin.v1alpha.IEnhancedMeasurementSettings|null} [enhancedMeasurementSettings] UpdateEnhancedMeasurementSettingsRequest enhancedMeasurementSettings - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEnhancedMeasurementSettingsRequest updateMask + * @interface IFetchAutomatedGa4ConfigurationOptOutRequest + * @property {string|null} [property] FetchAutomatedGa4ConfigurationOptOutRequest property */ /** - * Constructs a new UpdateEnhancedMeasurementSettingsRequest. + * Constructs a new FetchAutomatedGa4ConfigurationOptOutRequest. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents an UpdateEnhancedMeasurementSettingsRequest. - * @implements IUpdateEnhancedMeasurementSettingsRequest + * @classdesc Represents a FetchAutomatedGa4ConfigurationOptOutRequest. + * @implements IFetchAutomatedGa4ConfigurationOptOutRequest * @constructor - * @param {google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest=} [properties] Properties to set */ - function UpdateEnhancedMeasurementSettingsRequest(properties) { + function FetchAutomatedGa4ConfigurationOptOutRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -40502,89 +41074,75 @@ } /** - * UpdateEnhancedMeasurementSettingsRequest enhancedMeasurementSettings. - * @member {google.analytics.admin.v1alpha.IEnhancedMeasurementSettings|null|undefined} enhancedMeasurementSettings - * @memberof google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest - * @instance - */ - UpdateEnhancedMeasurementSettingsRequest.prototype.enhancedMeasurementSettings = null; - - /** - * UpdateEnhancedMeasurementSettingsRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest + * FetchAutomatedGa4ConfigurationOptOutRequest property. + * @member {string} property + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest * @instance */ - UpdateEnhancedMeasurementSettingsRequest.prototype.updateMask = null; + FetchAutomatedGa4ConfigurationOptOutRequest.prototype.property = ""; /** - * Creates a new UpdateEnhancedMeasurementSettingsRequest instance using the specified properties. + * Creates a new FetchAutomatedGa4ConfigurationOptOutRequest instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest * @static - * @param {google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest} UpdateEnhancedMeasurementSettingsRequest instance + * @param {google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest} FetchAutomatedGa4ConfigurationOptOutRequest instance */ - UpdateEnhancedMeasurementSettingsRequest.create = function create(properties) { - return new UpdateEnhancedMeasurementSettingsRequest(properties); + FetchAutomatedGa4ConfigurationOptOutRequest.create = function create(properties) { + return new FetchAutomatedGa4ConfigurationOptOutRequest(properties); }; /** - * Encodes the specified UpdateEnhancedMeasurementSettingsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest.verify|verify} messages. + * Encodes the specified FetchAutomatedGa4ConfigurationOptOutRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest * @static - * @param {google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest} message UpdateEnhancedMeasurementSettingsRequest message or plain object to encode + * @param {google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest} message FetchAutomatedGa4ConfigurationOptOutRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateEnhancedMeasurementSettingsRequest.encode = function encode(message, writer) { + FetchAutomatedGa4ConfigurationOptOutRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.enhancedMeasurementSettings != null && Object.hasOwnProperty.call(message, "enhancedMeasurementSettings")) - $root.google.analytics.admin.v1alpha.EnhancedMeasurementSettings.encode(message.enhancedMeasurementSettings, 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(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); return writer; }; /** - * Encodes the specified UpdateEnhancedMeasurementSettingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest.verify|verify} messages. + * Encodes the specified FetchAutomatedGa4ConfigurationOptOutRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest * @static - * @param {google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest} message UpdateEnhancedMeasurementSettingsRequest message or plain object to encode + * @param {google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest} message FetchAutomatedGa4ConfigurationOptOutRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateEnhancedMeasurementSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + FetchAutomatedGa4ConfigurationOptOutRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateEnhancedMeasurementSettingsRequest message from the specified reader or buffer. + * Decodes a FetchAutomatedGa4ConfigurationOptOutRequest message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest * @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.UpdateEnhancedMeasurementSettingsRequest} UpdateEnhancedMeasurementSettingsRequest + * @returns {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest} FetchAutomatedGa4ConfigurationOptOutRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateEnhancedMeasurementSettingsRequest.decode = function decode(reader, length) { + FetchAutomatedGa4ConfigurationOptOutRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.enhancedMeasurementSettings = $root.google.analytics.admin.v1alpha.EnhancedMeasurementSettings.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.property = reader.string(); break; } default: @@ -40596,142 +41154,122 @@ }; /** - * Decodes an UpdateEnhancedMeasurementSettingsRequest message from the specified reader or buffer, length delimited. + * Decodes a FetchAutomatedGa4ConfigurationOptOutRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest} UpdateEnhancedMeasurementSettingsRequest + * @returns {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest} FetchAutomatedGa4ConfigurationOptOutRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateEnhancedMeasurementSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + FetchAutomatedGa4ConfigurationOptOutRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateEnhancedMeasurementSettingsRequest message. + * Verifies a FetchAutomatedGa4ConfigurationOptOutRequest message. * @function verify - * @memberof google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateEnhancedMeasurementSettingsRequest.verify = function verify(message) { + FetchAutomatedGa4ConfigurationOptOutRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.enhancedMeasurementSettings != null && message.hasOwnProperty("enhancedMeasurementSettings")) { - var error = $root.google.analytics.admin.v1alpha.EnhancedMeasurementSettings.verify(message.enhancedMeasurementSettings); - if (error) - return "enhancedMeasurementSettings." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } + if (message.property != null && message.hasOwnProperty("property")) + if (!$util.isString(message.property)) + return "property: string expected"; return null; }; /** - * Creates an UpdateEnhancedMeasurementSettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a FetchAutomatedGa4ConfigurationOptOutRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest} UpdateEnhancedMeasurementSettingsRequest + * @returns {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest} FetchAutomatedGa4ConfigurationOptOutRequest */ - UpdateEnhancedMeasurementSettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest) + FetchAutomatedGa4ConfigurationOptOutRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest) return object; - var message = new $root.google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest(); - if (object.enhancedMeasurementSettings != null) { - if (typeof object.enhancedMeasurementSettings !== "object") - throw TypeError(".google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest.enhancedMeasurementSettings: object expected"); - message.enhancedMeasurementSettings = $root.google.analytics.admin.v1alpha.EnhancedMeasurementSettings.fromObject(object.enhancedMeasurementSettings); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } + var message = new $root.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest(); + if (object.property != null) + message.property = String(object.property); return message; }; /** - * Creates a plain object from an UpdateEnhancedMeasurementSettingsRequest message. Also converts values to other types if specified. + * Creates a plain object from a FetchAutomatedGa4ConfigurationOptOutRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest * @static - * @param {google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest} message UpdateEnhancedMeasurementSettingsRequest + * @param {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest} message FetchAutomatedGa4ConfigurationOptOutRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateEnhancedMeasurementSettingsRequest.toObject = function toObject(message, options) { + FetchAutomatedGa4ConfigurationOptOutRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.enhancedMeasurementSettings = null; - object.updateMask = null; - } - if (message.enhancedMeasurementSettings != null && message.hasOwnProperty("enhancedMeasurementSettings")) - object.enhancedMeasurementSettings = $root.google.analytics.admin.v1alpha.EnhancedMeasurementSettings.toObject(message.enhancedMeasurementSettings, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (options.defaults) + object.property = ""; + if (message.property != null && message.hasOwnProperty("property")) + object.property = message.property; return object; }; /** - * Converts this UpdateEnhancedMeasurementSettingsRequest to JSON. + * Converts this FetchAutomatedGa4ConfigurationOptOutRequest to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest * @instance * @returns {Object.} JSON object */ - UpdateEnhancedMeasurementSettingsRequest.prototype.toJSON = function toJSON() { + FetchAutomatedGa4ConfigurationOptOutRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateEnhancedMeasurementSettingsRequest + * Gets the default type url for FetchAutomatedGa4ConfigurationOptOutRequest * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateEnhancedMeasurementSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FetchAutomatedGa4ConfigurationOptOutRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest"; }; - return UpdateEnhancedMeasurementSettingsRequest; + return FetchAutomatedGa4ConfigurationOptOutRequest; })(); - v1alpha.CreateConnectedSiteTagRequest = (function() { + v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse = (function() { /** - * Properties of a CreateConnectedSiteTagRequest. + * Properties of a FetchAutomatedGa4ConfigurationOptOutResponse. * @memberof google.analytics.admin.v1alpha - * @interface ICreateConnectedSiteTagRequest - * @property {string|null} [property] CreateConnectedSiteTagRequest property - * @property {google.analytics.admin.v1alpha.IConnectedSiteTag|null} [connectedSiteTag] CreateConnectedSiteTagRequest connectedSiteTag + * @interface IFetchAutomatedGa4ConfigurationOptOutResponse + * @property {boolean|null} [optOut] FetchAutomatedGa4ConfigurationOptOutResponse optOut */ /** - * Constructs a new CreateConnectedSiteTagRequest. + * Constructs a new FetchAutomatedGa4ConfigurationOptOutResponse. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a CreateConnectedSiteTagRequest. - * @implements ICreateConnectedSiteTagRequest + * @classdesc Represents a FetchAutomatedGa4ConfigurationOptOutResponse. + * @implements IFetchAutomatedGa4ConfigurationOptOutResponse * @constructor - * @param {google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse=} [properties] Properties to set */ - function CreateConnectedSiteTagRequest(properties) { + function FetchAutomatedGa4ConfigurationOptOutResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -40739,89 +41277,75 @@ } /** - * CreateConnectedSiteTagRequest property. - * @member {string} property - * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest - * @instance - */ - CreateConnectedSiteTagRequest.prototype.property = ""; - - /** - * CreateConnectedSiteTagRequest connectedSiteTag. - * @member {google.analytics.admin.v1alpha.IConnectedSiteTag|null|undefined} connectedSiteTag - * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest + * FetchAutomatedGa4ConfigurationOptOutResponse optOut. + * @member {boolean} optOut + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse * @instance */ - CreateConnectedSiteTagRequest.prototype.connectedSiteTag = null; + FetchAutomatedGa4ConfigurationOptOutResponse.prototype.optOut = false; /** - * Creates a new CreateConnectedSiteTagRequest instance using the specified properties. + * Creates a new FetchAutomatedGa4ConfigurationOptOutResponse instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse * @static - * @param {google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest} CreateConnectedSiteTagRequest instance + * @param {google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse} FetchAutomatedGa4ConfigurationOptOutResponse instance */ - CreateConnectedSiteTagRequest.create = function create(properties) { - return new CreateConnectedSiteTagRequest(properties); + FetchAutomatedGa4ConfigurationOptOutResponse.create = function create(properties) { + return new FetchAutomatedGa4ConfigurationOptOutResponse(properties); }; /** - * Encodes the specified CreateConnectedSiteTagRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest.verify|verify} messages. + * Encodes the specified FetchAutomatedGa4ConfigurationOptOutResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse * @static - * @param {google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest} message CreateConnectedSiteTagRequest message or plain object to encode + * @param {google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse} message FetchAutomatedGa4ConfigurationOptOutResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateConnectedSiteTagRequest.encode = function encode(message, writer) { + FetchAutomatedGa4ConfigurationOptOutResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.property != null && Object.hasOwnProperty.call(message, "property")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); - if (message.connectedSiteTag != null && Object.hasOwnProperty.call(message, "connectedSiteTag")) - $root.google.analytics.admin.v1alpha.ConnectedSiteTag.encode(message.connectedSiteTag, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.optOut != null && Object.hasOwnProperty.call(message, "optOut")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.optOut); return writer; }; /** - * Encodes the specified CreateConnectedSiteTagRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest.verify|verify} messages. + * Encodes the specified FetchAutomatedGa4ConfigurationOptOutResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse * @static - * @param {google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest} message CreateConnectedSiteTagRequest message or plain object to encode + * @param {google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse} message FetchAutomatedGa4ConfigurationOptOutResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateConnectedSiteTagRequest.encodeDelimited = function encodeDelimited(message, writer) { + FetchAutomatedGa4ConfigurationOptOutResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateConnectedSiteTagRequest message from the specified reader or buffer. + * Decodes a FetchAutomatedGa4ConfigurationOptOutResponse message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse * @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.CreateConnectedSiteTagRequest} CreateConnectedSiteTagRequest + * @returns {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse} FetchAutomatedGa4ConfigurationOptOutResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateConnectedSiteTagRequest.decode = function decode(reader, length) { + FetchAutomatedGa4ConfigurationOptOutResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.property = reader.string(); - break; - } - case 2: { - message.connectedSiteTag = $root.google.analytics.admin.v1alpha.ConnectedSiteTag.decode(reader, reader.uint32()); + message.optOut = reader.bool(); break; } default: @@ -40833,135 +41357,122 @@ }; /** - * Decodes a CreateConnectedSiteTagRequest message from the specified reader or buffer, length delimited. + * Decodes a FetchAutomatedGa4ConfigurationOptOutResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest} CreateConnectedSiteTagRequest + * @returns {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse} FetchAutomatedGa4ConfigurationOptOutResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateConnectedSiteTagRequest.decodeDelimited = function decodeDelimited(reader) { + FetchAutomatedGa4ConfigurationOptOutResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateConnectedSiteTagRequest message. + * Verifies a FetchAutomatedGa4ConfigurationOptOutResponse message. * @function verify - * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateConnectedSiteTagRequest.verify = function verify(message) { + FetchAutomatedGa4ConfigurationOptOutResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.property != null && message.hasOwnProperty("property")) - if (!$util.isString(message.property)) - return "property: string expected"; - if (message.connectedSiteTag != null && message.hasOwnProperty("connectedSiteTag")) { - var error = $root.google.analytics.admin.v1alpha.ConnectedSiteTag.verify(message.connectedSiteTag); - if (error) - return "connectedSiteTag." + error; - } + if (message.optOut != null && message.hasOwnProperty("optOut")) + if (typeof message.optOut !== "boolean") + return "optOut: boolean expected"; return null; }; /** - * Creates a CreateConnectedSiteTagRequest message from a plain object. Also converts values to their respective internal types. + * Creates a FetchAutomatedGa4ConfigurationOptOutResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest} CreateConnectedSiteTagRequest + * @returns {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse} FetchAutomatedGa4ConfigurationOptOutResponse */ - CreateConnectedSiteTagRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest) + FetchAutomatedGa4ConfigurationOptOutResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse) return object; - var message = new $root.google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest(); - if (object.property != null) - message.property = String(object.property); - if (object.connectedSiteTag != null) { - if (typeof object.connectedSiteTag !== "object") - throw TypeError(".google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest.connectedSiteTag: object expected"); - message.connectedSiteTag = $root.google.analytics.admin.v1alpha.ConnectedSiteTag.fromObject(object.connectedSiteTag); - } + var message = new $root.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse(); + if (object.optOut != null) + message.optOut = Boolean(object.optOut); return message; }; /** - * Creates a plain object from a CreateConnectedSiteTagRequest message. Also converts values to other types if specified. + * Creates a plain object from a FetchAutomatedGa4ConfigurationOptOutResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse * @static - * @param {google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest} message CreateConnectedSiteTagRequest + * @param {google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse} message FetchAutomatedGa4ConfigurationOptOutResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateConnectedSiteTagRequest.toObject = function toObject(message, options) { + FetchAutomatedGa4ConfigurationOptOutResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.property = ""; - object.connectedSiteTag = null; - } - if (message.property != null && message.hasOwnProperty("property")) - object.property = message.property; - if (message.connectedSiteTag != null && message.hasOwnProperty("connectedSiteTag")) - object.connectedSiteTag = $root.google.analytics.admin.v1alpha.ConnectedSiteTag.toObject(message.connectedSiteTag, options); + if (options.defaults) + object.optOut = false; + if (message.optOut != null && message.hasOwnProperty("optOut")) + object.optOut = message.optOut; return object; }; /** - * Converts this CreateConnectedSiteTagRequest to JSON. + * Converts this FetchAutomatedGa4ConfigurationOptOutResponse to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse * @instance * @returns {Object.} JSON object */ - CreateConnectedSiteTagRequest.prototype.toJSON = function toJSON() { + FetchAutomatedGa4ConfigurationOptOutResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateConnectedSiteTagRequest + * Gets the default type url for FetchAutomatedGa4ConfigurationOptOutResponse * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest + * @memberof google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateConnectedSiteTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FetchAutomatedGa4ConfigurationOptOutResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse"; }; - return CreateConnectedSiteTagRequest; + return FetchAutomatedGa4ConfigurationOptOutResponse; })(); - v1alpha.CreateConnectedSiteTagResponse = (function() { + v1alpha.GetBigQueryLinkRequest = (function() { /** - * Properties of a CreateConnectedSiteTagResponse. + * Properties of a GetBigQueryLinkRequest. * @memberof google.analytics.admin.v1alpha - * @interface ICreateConnectedSiteTagResponse + * @interface IGetBigQueryLinkRequest + * @property {string|null} [name] GetBigQueryLinkRequest name */ /** - * Constructs a new CreateConnectedSiteTagResponse. + * Constructs a new GetBigQueryLinkRequest. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a CreateConnectedSiteTagResponse. - * @implements ICreateConnectedSiteTagResponse + * @classdesc Represents a GetBigQueryLinkRequest. + * @implements IGetBigQueryLinkRequest * @constructor - * @param {google.analytics.admin.v1alpha.ICreateConnectedSiteTagResponse=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IGetBigQueryLinkRequest=} [properties] Properties to set */ - function CreateConnectedSiteTagResponse(properties) { + function GetBigQueryLinkRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -40969,63 +41480,77 @@ } /** - * Creates a new CreateConnectedSiteTagResponse instance using the specified properties. + * GetBigQueryLinkRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest + * @instance + */ + GetBigQueryLinkRequest.prototype.name = ""; + + /** + * Creates a new GetBigQueryLinkRequest instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse + * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest * @static - * @param {google.analytics.admin.v1alpha.ICreateConnectedSiteTagResponse=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse} CreateConnectedSiteTagResponse instance + * @param {google.analytics.admin.v1alpha.IGetBigQueryLinkRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.GetBigQueryLinkRequest} GetBigQueryLinkRequest instance */ - CreateConnectedSiteTagResponse.create = function create(properties) { - return new CreateConnectedSiteTagResponse(properties); + GetBigQueryLinkRequest.create = function create(properties) { + return new GetBigQueryLinkRequest(properties); }; /** - * Encodes the specified CreateConnectedSiteTagResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse.verify|verify} messages. + * Encodes the specified GetBigQueryLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetBigQueryLinkRequest.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse + * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest * @static - * @param {google.analytics.admin.v1alpha.ICreateConnectedSiteTagResponse} message CreateConnectedSiteTagResponse message or plain object to encode + * @param {google.analytics.admin.v1alpha.IGetBigQueryLinkRequest} message GetBigQueryLinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateConnectedSiteTagResponse.encode = function encode(message, writer) { + GetBigQueryLinkRequest.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 CreateConnectedSiteTagResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse.verify|verify} messages. + * Encodes the specified GetBigQueryLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetBigQueryLinkRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse + * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest * @static - * @param {google.analytics.admin.v1alpha.ICreateConnectedSiteTagResponse} message CreateConnectedSiteTagResponse message or plain object to encode + * @param {google.analytics.admin.v1alpha.IGetBigQueryLinkRequest} message GetBigQueryLinkRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateConnectedSiteTagResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetBigQueryLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateConnectedSiteTagResponse message from the specified reader or buffer. + * Decodes a GetBigQueryLinkRequest message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse + * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest * @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.CreateConnectedSiteTagResponse} CreateConnectedSiteTagResponse + * @returns {google.analytics.admin.v1alpha.GetBigQueryLinkRequest} GetBigQueryLinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateConnectedSiteTagResponse.decode = function decode(reader, length) { + GetBigQueryLinkRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GetBigQueryLinkRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -41035,110 +41560,124 @@ }; /** - * Decodes a CreateConnectedSiteTagResponse message from the specified reader or buffer, length delimited. + * Decodes a GetBigQueryLinkRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse + * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse} CreateConnectedSiteTagResponse + * @returns {google.analytics.admin.v1alpha.GetBigQueryLinkRequest} GetBigQueryLinkRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateConnectedSiteTagResponse.decodeDelimited = function decodeDelimited(reader) { + GetBigQueryLinkRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateConnectedSiteTagResponse message. + * Verifies a GetBigQueryLinkRequest message. * @function verify - * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse + * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateConnectedSiteTagResponse.verify = function verify(message) { + GetBigQueryLinkRequest.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 CreateConnectedSiteTagResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetBigQueryLinkRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse + * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse} CreateConnectedSiteTagResponse + * @returns {google.analytics.admin.v1alpha.GetBigQueryLinkRequest} GetBigQueryLinkRequest */ - CreateConnectedSiteTagResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse) + GetBigQueryLinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.GetBigQueryLinkRequest) return object; - return new $root.google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse(); + var message = new $root.google.analytics.admin.v1alpha.GetBigQueryLinkRequest(); + if (object.name != null) + message.name = String(object.name); + return message; }; /** - * Creates a plain object from a CreateConnectedSiteTagResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetBigQueryLinkRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse + * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest * @static - * @param {google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse} message CreateConnectedSiteTagResponse + * @param {google.analytics.admin.v1alpha.GetBigQueryLinkRequest} message GetBigQueryLinkRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateConnectedSiteTagResponse.toObject = function toObject() { - return {}; + GetBigQueryLinkRequest.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 CreateConnectedSiteTagResponse to JSON. + * Converts this GetBigQueryLinkRequest to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse + * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest * @instance * @returns {Object.} JSON object */ - CreateConnectedSiteTagResponse.prototype.toJSON = function toJSON() { + GetBigQueryLinkRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateConnectedSiteTagResponse + * Gets the default type url for GetBigQueryLinkRequest * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse + * @memberof google.analytics.admin.v1alpha.GetBigQueryLinkRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateConnectedSiteTagResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetBigQueryLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.GetBigQueryLinkRequest"; }; - return CreateConnectedSiteTagResponse; + return GetBigQueryLinkRequest; })(); - v1alpha.DeleteConnectedSiteTagRequest = (function() { + v1alpha.ListBigQueryLinksRequest = (function() { /** - * Properties of a DeleteConnectedSiteTagRequest. + * Properties of a ListBigQueryLinksRequest. * @memberof google.analytics.admin.v1alpha - * @interface IDeleteConnectedSiteTagRequest - * @property {string|null} [property] DeleteConnectedSiteTagRequest property - * @property {string|null} [tagId] DeleteConnectedSiteTagRequest tagId + * @interface IListBigQueryLinksRequest + * @property {string|null} [parent] ListBigQueryLinksRequest parent + * @property {number|null} [pageSize] ListBigQueryLinksRequest pageSize + * @property {string|null} [pageToken] ListBigQueryLinksRequest pageToken */ /** - * Constructs a new DeleteConnectedSiteTagRequest. + * Constructs a new ListBigQueryLinksRequest. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a DeleteConnectedSiteTagRequest. - * @implements IDeleteConnectedSiteTagRequest + * @classdesc Represents a ListBigQueryLinksRequest. + * @implements IListBigQueryLinksRequest * @constructor - * @param {google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IListBigQueryLinksRequest=} [properties] Properties to set */ - function DeleteConnectedSiteTagRequest(properties) { + function ListBigQueryLinksRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41146,89 +41685,103 @@ } /** - * DeleteConnectedSiteTagRequest property. - * @member {string} property - * @memberof google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest + * ListBigQueryLinksRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest * @instance */ - DeleteConnectedSiteTagRequest.prototype.property = ""; + ListBigQueryLinksRequest.prototype.parent = ""; /** - * DeleteConnectedSiteTagRequest tagId. - * @member {string} tagId - * @memberof google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest + * ListBigQueryLinksRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest * @instance */ - DeleteConnectedSiteTagRequest.prototype.tagId = ""; + ListBigQueryLinksRequest.prototype.pageSize = 0; /** - * Creates a new DeleteConnectedSiteTagRequest instance using the specified properties. + * ListBigQueryLinksRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest + * @instance + */ + ListBigQueryLinksRequest.prototype.pageToken = ""; + + /** + * Creates a new ListBigQueryLinksRequest instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest * @static - * @param {google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest} DeleteConnectedSiteTagRequest instance + * @param {google.analytics.admin.v1alpha.IListBigQueryLinksRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListBigQueryLinksRequest} ListBigQueryLinksRequest instance */ - DeleteConnectedSiteTagRequest.create = function create(properties) { - return new DeleteConnectedSiteTagRequest(properties); + ListBigQueryLinksRequest.create = function create(properties) { + return new ListBigQueryLinksRequest(properties); }; /** - * Encodes the specified DeleteConnectedSiteTagRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest.verify|verify} messages. + * Encodes the specified ListBigQueryLinksRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListBigQueryLinksRequest.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest * @static - * @param {google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest} message DeleteConnectedSiteTagRequest message or plain object to encode + * @param {google.analytics.admin.v1alpha.IListBigQueryLinksRequest} message ListBigQueryLinksRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteConnectedSiteTagRequest.encode = function encode(message, writer) { + ListBigQueryLinksRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.property != null && Object.hasOwnProperty.call(message, "property")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); - if (message.tagId != null && Object.hasOwnProperty.call(message, "tagId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.tagId); + 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); return writer; }; /** - * Encodes the specified DeleteConnectedSiteTagRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest.verify|verify} messages. + * Encodes the specified ListBigQueryLinksRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListBigQueryLinksRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest * @static - * @param {google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest} message DeleteConnectedSiteTagRequest message or plain object to encode + * @param {google.analytics.admin.v1alpha.IListBigQueryLinksRequest} message ListBigQueryLinksRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteConnectedSiteTagRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListBigQueryLinksRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteConnectedSiteTagRequest message from the specified reader or buffer. + * Decodes a ListBigQueryLinksRequest message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest * @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.DeleteConnectedSiteTagRequest} DeleteConnectedSiteTagRequest + * @returns {google.analytics.admin.v1alpha.ListBigQueryLinksRequest} ListBigQueryLinksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteConnectedSiteTagRequest.decode = function decode(reader, length) { + ListBigQueryLinksRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListBigQueryLinksRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.property = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.tagId = reader.string(); + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); break; } default: @@ -41240,131 +41793,141 @@ }; /** - * Decodes a DeleteConnectedSiteTagRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBigQueryLinksRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest} DeleteConnectedSiteTagRequest + * @returns {google.analytics.admin.v1alpha.ListBigQueryLinksRequest} ListBigQueryLinksRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteConnectedSiteTagRequest.decodeDelimited = function decodeDelimited(reader) { + ListBigQueryLinksRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteConnectedSiteTagRequest message. + * Verifies a ListBigQueryLinksRequest message. * @function verify - * @memberof google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteConnectedSiteTagRequest.verify = function verify(message) { + ListBigQueryLinksRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.property != null && message.hasOwnProperty("property")) - if (!$util.isString(message.property)) - return "property: string expected"; - if (message.tagId != null && message.hasOwnProperty("tagId")) - if (!$util.isString(message.tagId)) - return "tagId: string 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"; return null; }; /** - * Creates a DeleteConnectedSiteTagRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBigQueryLinksRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest} DeleteConnectedSiteTagRequest + * @returns {google.analytics.admin.v1alpha.ListBigQueryLinksRequest} ListBigQueryLinksRequest */ - DeleteConnectedSiteTagRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest) + ListBigQueryLinksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListBigQueryLinksRequest) return object; - var message = new $root.google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest(); - if (object.property != null) - message.property = String(object.property); - if (object.tagId != null) - message.tagId = String(object.tagId); + var message = new $root.google.analytics.admin.v1alpha.ListBigQueryLinksRequest(); + 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); return message; }; /** - * Creates a plain object from a DeleteConnectedSiteTagRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListBigQueryLinksRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest * @static - * @param {google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest} message DeleteConnectedSiteTagRequest + * @param {google.analytics.admin.v1alpha.ListBigQueryLinksRequest} message ListBigQueryLinksRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteConnectedSiteTagRequest.toObject = function toObject(message, options) { + ListBigQueryLinksRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.property = ""; - object.tagId = ""; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; } - if (message.property != null && message.hasOwnProperty("property")) - object.property = message.property; - if (message.tagId != null && message.hasOwnProperty("tagId")) - object.tagId = message.tagId; + 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; return object; }; /** - * Converts this DeleteConnectedSiteTagRequest to JSON. + * Converts this ListBigQueryLinksRequest to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest * @instance * @returns {Object.} JSON object */ - DeleteConnectedSiteTagRequest.prototype.toJSON = function toJSON() { + ListBigQueryLinksRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteConnectedSiteTagRequest + * Gets the default type url for ListBigQueryLinksRequest * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteConnectedSiteTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListBigQueryLinksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListBigQueryLinksRequest"; }; - return DeleteConnectedSiteTagRequest; + return ListBigQueryLinksRequest; })(); - v1alpha.ListConnectedSiteTagsRequest = (function() { + v1alpha.ListBigQueryLinksResponse = (function() { /** - * Properties of a ListConnectedSiteTagsRequest. + * Properties of a ListBigQueryLinksResponse. * @memberof google.analytics.admin.v1alpha - * @interface IListConnectedSiteTagsRequest - * @property {string|null} [property] ListConnectedSiteTagsRequest property + * @interface IListBigQueryLinksResponse + * @property {Array.|null} [bigqueryLinks] ListBigQueryLinksResponse bigqueryLinks + * @property {string|null} [nextPageToken] ListBigQueryLinksResponse nextPageToken */ /** - * Constructs a new ListConnectedSiteTagsRequest. + * Constructs a new ListBigQueryLinksResponse. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a ListConnectedSiteTagsRequest. - * @implements IListConnectedSiteTagsRequest + * @classdesc Represents a ListBigQueryLinksResponse. + * @implements IListBigQueryLinksResponse * @constructor - * @param {google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IListBigQueryLinksResponse=} [properties] Properties to set */ - function ListConnectedSiteTagsRequest(properties) { + function ListBigQueryLinksResponse(properties) { + this.bigqueryLinks = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41372,75 +41935,92 @@ } /** - * ListConnectedSiteTagsRequest property. - * @member {string} property - * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest + * ListBigQueryLinksResponse bigqueryLinks. + * @member {Array.} bigqueryLinks + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse * @instance */ - ListConnectedSiteTagsRequest.prototype.property = ""; + ListBigQueryLinksResponse.prototype.bigqueryLinks = $util.emptyArray; /** - * Creates a new ListConnectedSiteTagsRequest instance using the specified properties. + * ListBigQueryLinksResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse + * @instance + */ + ListBigQueryLinksResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListBigQueryLinksResponse instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse * @static - * @param {google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest} ListConnectedSiteTagsRequest instance + * @param {google.analytics.admin.v1alpha.IListBigQueryLinksResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListBigQueryLinksResponse} ListBigQueryLinksResponse instance */ - ListConnectedSiteTagsRequest.create = function create(properties) { - return new ListConnectedSiteTagsRequest(properties); + ListBigQueryLinksResponse.create = function create(properties) { + return new ListBigQueryLinksResponse(properties); }; /** - * Encodes the specified ListConnectedSiteTagsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest.verify|verify} messages. + * Encodes the specified ListBigQueryLinksResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListBigQueryLinksResponse.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse * @static - * @param {google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest} message ListConnectedSiteTagsRequest message or plain object to encode + * @param {google.analytics.admin.v1alpha.IListBigQueryLinksResponse} message ListBigQueryLinksResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListConnectedSiteTagsRequest.encode = function encode(message, writer) { + ListBigQueryLinksResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.property != null && Object.hasOwnProperty.call(message, "property")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); + if (message.bigqueryLinks != null && message.bigqueryLinks.length) + for (var i = 0; i < message.bigqueryLinks.length; ++i) + $root.google.analytics.admin.v1alpha.BigQueryLink.encode(message.bigqueryLinks[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 ListConnectedSiteTagsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest.verify|verify} messages. + * Encodes the specified ListBigQueryLinksResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListBigQueryLinksResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse * @static - * @param {google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest} message ListConnectedSiteTagsRequest message or plain object to encode + * @param {google.analytics.admin.v1alpha.IListBigQueryLinksResponse} message ListBigQueryLinksResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListConnectedSiteTagsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListBigQueryLinksResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListConnectedSiteTagsRequest message from the specified reader or buffer. + * Decodes a ListBigQueryLinksResponse message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse * @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.ListConnectedSiteTagsRequest} ListConnectedSiteTagsRequest + * @returns {google.analytics.admin.v1alpha.ListBigQueryLinksResponse} ListBigQueryLinksResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListConnectedSiteTagsRequest.decode = function decode(reader, length) { + ListBigQueryLinksResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListBigQueryLinksResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.property = reader.string(); + if (!(message.bigqueryLinks && message.bigqueryLinks.length)) + message.bigqueryLinks = []; + message.bigqueryLinks.push($root.google.analytics.admin.v1alpha.BigQueryLink.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); break; } default: @@ -41452,123 +42032,148 @@ }; /** - * Decodes a ListConnectedSiteTagsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBigQueryLinksResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest} ListConnectedSiteTagsRequest + * @returns {google.analytics.admin.v1alpha.ListBigQueryLinksResponse} ListBigQueryLinksResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListConnectedSiteTagsRequest.decodeDelimited = function decodeDelimited(reader) { + ListBigQueryLinksResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListConnectedSiteTagsRequest message. + * Verifies a ListBigQueryLinksResponse message. * @function verify - * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListConnectedSiteTagsRequest.verify = function verify(message) { + ListBigQueryLinksResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.property != null && message.hasOwnProperty("property")) - if (!$util.isString(message.property)) - return "property: string expected"; + if (message.bigqueryLinks != null && message.hasOwnProperty("bigqueryLinks")) { + if (!Array.isArray(message.bigqueryLinks)) + return "bigqueryLinks: array expected"; + for (var i = 0; i < message.bigqueryLinks.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.BigQueryLink.verify(message.bigqueryLinks[i]); + if (error) + return "bigqueryLinks." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a ListConnectedSiteTagsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBigQueryLinksResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest} ListConnectedSiteTagsRequest + * @returns {google.analytics.admin.v1alpha.ListBigQueryLinksResponse} ListBigQueryLinksResponse */ - ListConnectedSiteTagsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest) + ListBigQueryLinksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListBigQueryLinksResponse) return object; - var message = new $root.google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest(); - if (object.property != null) - message.property = String(object.property); + var message = new $root.google.analytics.admin.v1alpha.ListBigQueryLinksResponse(); + if (object.bigqueryLinks) { + if (!Array.isArray(object.bigqueryLinks)) + throw TypeError(".google.analytics.admin.v1alpha.ListBigQueryLinksResponse.bigqueryLinks: array expected"); + message.bigqueryLinks = []; + for (var i = 0; i < object.bigqueryLinks.length; ++i) { + if (typeof object.bigqueryLinks[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ListBigQueryLinksResponse.bigqueryLinks: object expected"); + message.bigqueryLinks[i] = $root.google.analytics.admin.v1alpha.BigQueryLink.fromObject(object.bigqueryLinks[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListConnectedSiteTagsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListBigQueryLinksResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse * @static - * @param {google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest} message ListConnectedSiteTagsRequest + * @param {google.analytics.admin.v1alpha.ListBigQueryLinksResponse} message ListBigQueryLinksResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListConnectedSiteTagsRequest.toObject = function toObject(message, options) { + ListBigQueryLinksResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.bigqueryLinks = []; if (options.defaults) - object.property = ""; - if (message.property != null && message.hasOwnProperty("property")) - object.property = message.property; + object.nextPageToken = ""; + if (message.bigqueryLinks && message.bigqueryLinks.length) { + object.bigqueryLinks = []; + for (var j = 0; j < message.bigqueryLinks.length; ++j) + object.bigqueryLinks[j] = $root.google.analytics.admin.v1alpha.BigQueryLink.toObject(message.bigqueryLinks[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ListConnectedSiteTagsRequest to JSON. + * Converts this ListBigQueryLinksResponse to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse * @instance * @returns {Object.} JSON object */ - ListConnectedSiteTagsRequest.prototype.toJSON = function toJSON() { + ListBigQueryLinksResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListConnectedSiteTagsRequest + * Gets the default type url for ListBigQueryLinksResponse * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest + * @memberof google.analytics.admin.v1alpha.ListBigQueryLinksResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListConnectedSiteTagsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListBigQueryLinksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListBigQueryLinksResponse"; }; - return ListConnectedSiteTagsRequest; + return ListBigQueryLinksResponse; })(); - v1alpha.ListConnectedSiteTagsResponse = (function() { + v1alpha.GetEnhancedMeasurementSettingsRequest = (function() { /** - * Properties of a ListConnectedSiteTagsResponse. + * Properties of a GetEnhancedMeasurementSettingsRequest. * @memberof google.analytics.admin.v1alpha - * @interface IListConnectedSiteTagsResponse - * @property {Array.|null} [connectedSiteTags] ListConnectedSiteTagsResponse connectedSiteTags + * @interface IGetEnhancedMeasurementSettingsRequest + * @property {string|null} [name] GetEnhancedMeasurementSettingsRequest name */ /** - * Constructs a new ListConnectedSiteTagsResponse. + * Constructs a new GetEnhancedMeasurementSettingsRequest. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents a ListConnectedSiteTagsResponse. - * @implements IListConnectedSiteTagsResponse + * @classdesc Represents a GetEnhancedMeasurementSettingsRequest. + * @implements IGetEnhancedMeasurementSettingsRequest * @constructor - * @param {google.analytics.admin.v1alpha.IListConnectedSiteTagsResponse=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest=} [properties] Properties to set */ - function ListConnectedSiteTagsResponse(properties) { - this.connectedSiteTags = []; + function GetEnhancedMeasurementSettingsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41576,78 +42181,75 @@ } /** - * ListConnectedSiteTagsResponse connectedSiteTags. - * @member {Array.} connectedSiteTags - * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse + * GetEnhancedMeasurementSettingsRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest * @instance */ - ListConnectedSiteTagsResponse.prototype.connectedSiteTags = $util.emptyArray; + GetEnhancedMeasurementSettingsRequest.prototype.name = ""; /** - * Creates a new ListConnectedSiteTagsResponse instance using the specified properties. + * Creates a new GetEnhancedMeasurementSettingsRequest instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse + * @memberof google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest * @static - * @param {google.analytics.admin.v1alpha.IListConnectedSiteTagsResponse=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse} ListConnectedSiteTagsResponse instance + * @param {google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest} GetEnhancedMeasurementSettingsRequest instance */ - ListConnectedSiteTagsResponse.create = function create(properties) { - return new ListConnectedSiteTagsResponse(properties); + GetEnhancedMeasurementSettingsRequest.create = function create(properties) { + return new GetEnhancedMeasurementSettingsRequest(properties); }; /** - * Encodes the specified ListConnectedSiteTagsResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse.verify|verify} messages. + * Encodes the specified GetEnhancedMeasurementSettingsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse + * @memberof google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest * @static - * @param {google.analytics.admin.v1alpha.IListConnectedSiteTagsResponse} message ListConnectedSiteTagsResponse message or plain object to encode + * @param {google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest} message GetEnhancedMeasurementSettingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListConnectedSiteTagsResponse.encode = function encode(message, writer) { + GetEnhancedMeasurementSettingsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.connectedSiteTags != null && message.connectedSiteTags.length) - for (var i = 0; i < message.connectedSiteTags.length; ++i) - $root.google.analytics.admin.v1alpha.ConnectedSiteTag.encode(message.connectedSiteTags[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListConnectedSiteTagsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse.verify|verify} messages. + * Encodes the specified GetEnhancedMeasurementSettingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse + * @memberof google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest * @static - * @param {google.analytics.admin.v1alpha.IListConnectedSiteTagsResponse} message ListConnectedSiteTagsResponse message or plain object to encode + * @param {google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest} message GetEnhancedMeasurementSettingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListConnectedSiteTagsResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetEnhancedMeasurementSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListConnectedSiteTagsResponse message from the specified reader or buffer. + * Decodes a GetEnhancedMeasurementSettingsRequest message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse + * @memberof google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest * @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.ListConnectedSiteTagsResponse} ListConnectedSiteTagsResponse + * @returns {google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest} GetEnhancedMeasurementSettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListConnectedSiteTagsResponse.decode = function decode(reader, length) { + GetEnhancedMeasurementSettingsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.connectedSiteTags && message.connectedSiteTags.length)) - message.connectedSiteTags = []; - message.connectedSiteTags.push($root.google.analytics.admin.v1alpha.ConnectedSiteTag.decode(reader, reader.uint32())); + message.name = reader.string(); break; } default: @@ -41659,163 +42261,123 @@ }; /** - * Decodes a ListConnectedSiteTagsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetEnhancedMeasurementSettingsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse + * @memberof google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse} ListConnectedSiteTagsResponse + * @returns {google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest} GetEnhancedMeasurementSettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListConnectedSiteTagsResponse.decodeDelimited = function decodeDelimited(reader) { + GetEnhancedMeasurementSettingsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListConnectedSiteTagsResponse message. + * Verifies a GetEnhancedMeasurementSettingsRequest message. * @function verify - * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse + * @memberof google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListConnectedSiteTagsResponse.verify = function verify(message) { + GetEnhancedMeasurementSettingsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.connectedSiteTags != null && message.hasOwnProperty("connectedSiteTags")) { - if (!Array.isArray(message.connectedSiteTags)) - return "connectedSiteTags: array expected"; - for (var i = 0; i < message.connectedSiteTags.length; ++i) { - var error = $root.google.analytics.admin.v1alpha.ConnectedSiteTag.verify(message.connectedSiteTags[i]); - if (error) - return "connectedSiteTags." + error; - } - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListConnectedSiteTagsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetEnhancedMeasurementSettingsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse + * @memberof google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse} ListConnectedSiteTagsResponse + * @returns {google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest} GetEnhancedMeasurementSettingsRequest */ - ListConnectedSiteTagsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse) + GetEnhancedMeasurementSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest) return object; - var message = new $root.google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse(); - if (object.connectedSiteTags) { - if (!Array.isArray(object.connectedSiteTags)) - throw TypeError(".google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse.connectedSiteTags: array expected"); - message.connectedSiteTags = []; - for (var i = 0; i < object.connectedSiteTags.length; ++i) { - if (typeof object.connectedSiteTags[i] !== "object") - throw TypeError(".google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse.connectedSiteTags: object expected"); - message.connectedSiteTags[i] = $root.google.analytics.admin.v1alpha.ConnectedSiteTag.fromObject(object.connectedSiteTags[i]); - } - } + var message = new $root.google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListConnectedSiteTagsResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetEnhancedMeasurementSettingsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse + * @memberof google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest * @static - * @param {google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse} message ListConnectedSiteTagsResponse + * @param {google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest} message GetEnhancedMeasurementSettingsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListConnectedSiteTagsResponse.toObject = function toObject(message, options) { + GetEnhancedMeasurementSettingsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.connectedSiteTags = []; - if (message.connectedSiteTags && message.connectedSiteTags.length) { - object.connectedSiteTags = []; - for (var j = 0; j < message.connectedSiteTags.length; ++j) - object.connectedSiteTags[j] = $root.google.analytics.admin.v1alpha.ConnectedSiteTag.toObject(message.connectedSiteTags[j], options); - } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListConnectedSiteTagsResponse to JSON. + * Converts this GetEnhancedMeasurementSettingsRequest to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse + * @memberof google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest * @instance * @returns {Object.} JSON object */ - ListConnectedSiteTagsResponse.prototype.toJSON = function toJSON() { + GetEnhancedMeasurementSettingsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListConnectedSiteTagsResponse + * Gets the default type url for GetEnhancedMeasurementSettingsRequest * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse + * @memberof google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListConnectedSiteTagsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetEnhancedMeasurementSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest"; }; - return ListConnectedSiteTagsResponse; - })(); - - /** - * AudienceFilterScope enum. - * @name google.analytics.admin.v1alpha.AudienceFilterScope - * @enum {number} - * @property {number} AUDIENCE_FILTER_SCOPE_UNSPECIFIED=0 AUDIENCE_FILTER_SCOPE_UNSPECIFIED value - * @property {number} AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT=1 AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT value - * @property {number} AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION=2 AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION value - * @property {number} AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS=3 AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS value - */ - v1alpha.AudienceFilterScope = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "AUDIENCE_FILTER_SCOPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT"] = 1; - values[valuesById[2] = "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION"] = 2; - values[valuesById[3] = "AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS"] = 3; - return values; + return GetEnhancedMeasurementSettingsRequest; })(); - v1alpha.AudienceDimensionOrMetricFilter = (function() { + v1alpha.UpdateEnhancedMeasurementSettingsRequest = (function() { /** - * Properties of an AudienceDimensionOrMetricFilter. + * Properties of an UpdateEnhancedMeasurementSettingsRequest. * @memberof google.analytics.admin.v1alpha - * @interface IAudienceDimensionOrMetricFilter - * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter|null} [stringFilter] AudienceDimensionOrMetricFilter stringFilter - * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter|null} [inListFilter] AudienceDimensionOrMetricFilter inListFilter - * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter|null} [numericFilter] AudienceDimensionOrMetricFilter numericFilter - * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter|null} [betweenFilter] AudienceDimensionOrMetricFilter betweenFilter - * @property {string|null} [fieldName] AudienceDimensionOrMetricFilter fieldName - * @property {boolean|null} [atAnyPointInTime] AudienceDimensionOrMetricFilter atAnyPointInTime - * @property {number|null} [inAnyNDayPeriod] AudienceDimensionOrMetricFilter inAnyNDayPeriod + * @interface IUpdateEnhancedMeasurementSettingsRequest + * @property {google.analytics.admin.v1alpha.IEnhancedMeasurementSettings|null} [enhancedMeasurementSettings] UpdateEnhancedMeasurementSettingsRequest enhancedMeasurementSettings + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEnhancedMeasurementSettingsRequest updateMask */ /** - * Constructs a new AudienceDimensionOrMetricFilter. + * Constructs a new UpdateEnhancedMeasurementSettingsRequest. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents an AudienceDimensionOrMetricFilter. - * @implements IAudienceDimensionOrMetricFilter + * @classdesc Represents an UpdateEnhancedMeasurementSettingsRequest. + * @implements IUpdateEnhancedMeasurementSettingsRequest * @constructor - * @param {google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest=} [properties] Properties to set */ - function AudienceDimensionOrMetricFilter(properties) { + function UpdateEnhancedMeasurementSettingsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41823,173 +42385,326 @@ } /** - * AudienceDimensionOrMetricFilter stringFilter. - * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter|null|undefined} stringFilter - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * UpdateEnhancedMeasurementSettingsRequest enhancedMeasurementSettings. + * @member {google.analytics.admin.v1alpha.IEnhancedMeasurementSettings|null|undefined} enhancedMeasurementSettings + * @memberof google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest * @instance */ - AudienceDimensionOrMetricFilter.prototype.stringFilter = null; + UpdateEnhancedMeasurementSettingsRequest.prototype.enhancedMeasurementSettings = null; /** - * AudienceDimensionOrMetricFilter inListFilter. - * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter|null|undefined} inListFilter - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * UpdateEnhancedMeasurementSettingsRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest * @instance */ - AudienceDimensionOrMetricFilter.prototype.inListFilter = null; + UpdateEnhancedMeasurementSettingsRequest.prototype.updateMask = null; /** - * AudienceDimensionOrMetricFilter numericFilter. - * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter|null|undefined} numericFilter - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter - * @instance + * Creates a new UpdateEnhancedMeasurementSettingsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest} UpdateEnhancedMeasurementSettingsRequest instance */ - AudienceDimensionOrMetricFilter.prototype.numericFilter = null; + UpdateEnhancedMeasurementSettingsRequest.create = function create(properties) { + return new UpdateEnhancedMeasurementSettingsRequest(properties); + }; /** - * AudienceDimensionOrMetricFilter betweenFilter. - * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter|null|undefined} betweenFilter - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter - * @instance + * Encodes the specified UpdateEnhancedMeasurementSettingsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest} message UpdateEnhancedMeasurementSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - AudienceDimensionOrMetricFilter.prototype.betweenFilter = null; + UpdateEnhancedMeasurementSettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enhancedMeasurementSettings != null && Object.hasOwnProperty.call(message, "enhancedMeasurementSettings")) + $root.google.analytics.admin.v1alpha.EnhancedMeasurementSettings.encode(message.enhancedMeasurementSettings, 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; + }; /** - * AudienceDimensionOrMetricFilter fieldName. - * @member {string} fieldName - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter - * @instance + * Encodes the specified UpdateEnhancedMeasurementSettingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest} message UpdateEnhancedMeasurementSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - AudienceDimensionOrMetricFilter.prototype.fieldName = ""; + UpdateEnhancedMeasurementSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * AudienceDimensionOrMetricFilter atAnyPointInTime. - * @member {boolean} atAnyPointInTime - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter - * @instance - */ - AudienceDimensionOrMetricFilter.prototype.atAnyPointInTime = false; - + * Decodes an UpdateEnhancedMeasurementSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest + * @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.UpdateEnhancedMeasurementSettingsRequest} UpdateEnhancedMeasurementSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEnhancedMeasurementSettingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enhancedMeasurementSettings = $root.google.analytics.admin.v1alpha.EnhancedMeasurementSettings.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; + }; + /** - * AudienceDimensionOrMetricFilter inAnyNDayPeriod. - * @member {number} inAnyNDayPeriod - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * Decodes an UpdateEnhancedMeasurementSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest} UpdateEnhancedMeasurementSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEnhancedMeasurementSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateEnhancedMeasurementSettingsRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateEnhancedMeasurementSettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enhancedMeasurementSettings != null && message.hasOwnProperty("enhancedMeasurementSettings")) { + var error = $root.google.analytics.admin.v1alpha.EnhancedMeasurementSettings.verify(message.enhancedMeasurementSettings); + if (error) + return "enhancedMeasurementSettings." + 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 UpdateEnhancedMeasurementSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest} UpdateEnhancedMeasurementSettingsRequest + */ + UpdateEnhancedMeasurementSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest(); + if (object.enhancedMeasurementSettings != null) { + if (typeof object.enhancedMeasurementSettings !== "object") + throw TypeError(".google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest.enhancedMeasurementSettings: object expected"); + message.enhancedMeasurementSettings = $root.google.analytics.admin.v1alpha.EnhancedMeasurementSettings.fromObject(object.enhancedMeasurementSettings); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateEnhancedMeasurementSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest} message UpdateEnhancedMeasurementSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateEnhancedMeasurementSettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enhancedMeasurementSettings = null; + object.updateMask = null; + } + if (message.enhancedMeasurementSettings != null && message.hasOwnProperty("enhancedMeasurementSettings")) + object.enhancedMeasurementSettings = $root.google.analytics.admin.v1alpha.EnhancedMeasurementSettings.toObject(message.enhancedMeasurementSettings, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateEnhancedMeasurementSettingsRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest * @instance + * @returns {Object.} JSON object */ - AudienceDimensionOrMetricFilter.prototype.inAnyNDayPeriod = 0; + UpdateEnhancedMeasurementSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Gets the default type url for UpdateEnhancedMeasurementSettingsRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateEnhancedMeasurementSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest"; + }; + + return UpdateEnhancedMeasurementSettingsRequest; + })(); + + v1alpha.CreateConnectedSiteTagRequest = (function() { /** - * AudienceDimensionOrMetricFilter oneFilter. - * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|undefined} oneFilter - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * Properties of a CreateConnectedSiteTagRequest. + * @memberof google.analytics.admin.v1alpha + * @interface ICreateConnectedSiteTagRequest + * @property {string|null} [property] CreateConnectedSiteTagRequest property + * @property {google.analytics.admin.v1alpha.IConnectedSiteTag|null} [connectedSiteTag] CreateConnectedSiteTagRequest connectedSiteTag + */ + + /** + * Constructs a new CreateConnectedSiteTagRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a CreateConnectedSiteTagRequest. + * @implements ICreateConnectedSiteTagRequest + * @constructor + * @param {google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest=} [properties] Properties to set + */ + function CreateConnectedSiteTagRequest(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]]; + } + + /** + * CreateConnectedSiteTagRequest property. + * @member {string} property + * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest * @instance */ - Object.defineProperty(AudienceDimensionOrMetricFilter.prototype, "oneFilter", { - get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter"]), - set: $util.oneOfSetter($oneOfFields) - }); + CreateConnectedSiteTagRequest.prototype.property = ""; /** - * Creates a new AudienceDimensionOrMetricFilter instance using the specified properties. + * CreateConnectedSiteTagRequest connectedSiteTag. + * @member {google.analytics.admin.v1alpha.IConnectedSiteTag|null|undefined} connectedSiteTag + * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest + * @instance + */ + CreateConnectedSiteTagRequest.prototype.connectedSiteTag = null; + + /** + * Creates a new CreateConnectedSiteTagRequest instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest * @static - * @param {google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter} AudienceDimensionOrMetricFilter instance + * @param {google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest} CreateConnectedSiteTagRequest instance */ - AudienceDimensionOrMetricFilter.create = function create(properties) { - return new AudienceDimensionOrMetricFilter(properties); + CreateConnectedSiteTagRequest.create = function create(properties) { + return new CreateConnectedSiteTagRequest(properties); }; /** - * Encodes the specified AudienceDimensionOrMetricFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.verify|verify} messages. + * Encodes the specified CreateConnectedSiteTagRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest * @static - * @param {google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter} message AudienceDimensionOrMetricFilter message or plain object to encode + * @param {google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest} message CreateConnectedSiteTagRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudienceDimensionOrMetricFilter.encode = function encode(message, writer) { + CreateConnectedSiteTagRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); - if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) - $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.encode(message.stringFilter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) - $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.encode(message.inListFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) - $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) - $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.atAnyPointInTime != null && Object.hasOwnProperty.call(message, "atAnyPointInTime")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.atAnyPointInTime); - if (message.inAnyNDayPeriod != null && Object.hasOwnProperty.call(message, "inAnyNDayPeriod")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.inAnyNDayPeriod); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); + if (message.connectedSiteTag != null && Object.hasOwnProperty.call(message, "connectedSiteTag")) + $root.google.analytics.admin.v1alpha.ConnectedSiteTag.encode(message.connectedSiteTag, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified AudienceDimensionOrMetricFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.verify|verify} messages. + * Encodes the specified CreateConnectedSiteTagRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest * @static - * @param {google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter} message AudienceDimensionOrMetricFilter message or plain object to encode + * @param {google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest} message CreateConnectedSiteTagRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudienceDimensionOrMetricFilter.encodeDelimited = function encodeDelimited(message, writer) { + CreateConnectedSiteTagRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AudienceDimensionOrMetricFilter message from the specified reader or buffer. + * Decodes a CreateConnectedSiteTagRequest message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest * @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.AudienceDimensionOrMetricFilter} AudienceDimensionOrMetricFilter + * @returns {google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest} CreateConnectedSiteTagRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudienceDimensionOrMetricFilter.decode = function decode(reader, length) { + CreateConnectedSiteTagRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: { - message.stringFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.decode(reader, reader.uint32()); - break; - } - case 3: { - message.inListFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.decode(reader, reader.uint32()); - break; - } - case 4: { - message.numericFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.decode(reader, reader.uint32()); - break; - } - case 5: { - message.betweenFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.decode(reader, reader.uint32()); - break; - } case 1: { - message.fieldName = reader.string(); - break; - } - case 6: { - message.atAnyPointInTime = reader.bool(); + message.property = reader.string(); break; } - case 7: { - message.inAnyNDayPeriod = reader.int32(); + case 2: { + message.connectedSiteTag = $root.google.analytics.admin.v1alpha.ConnectedSiteTag.decode(reader, reader.uint32()); break; } default: @@ -42001,621 +42716,7139 @@ }; /** - * Decodes an AudienceDimensionOrMetricFilter message from the specified reader or buffer, length delimited. + * Decodes a CreateConnectedSiteTagRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter} AudienceDimensionOrMetricFilter + * @returns {google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest} CreateConnectedSiteTagRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudienceDimensionOrMetricFilter.decodeDelimited = function decodeDelimited(reader) { + CreateConnectedSiteTagRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AudienceDimensionOrMetricFilter message. + * Verifies a CreateConnectedSiteTagRequest message. * @function verify - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AudienceDimensionOrMetricFilter.verify = function verify(message) { + CreateConnectedSiteTagRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { - properties.oneFilter = 1; - { - var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.verify(message.stringFilter); - if (error) - return "stringFilter." + error; - } - } - if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.verify(message.inListFilter); - if (error) - return "inListFilter." + error; - } - } - if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.verify(message.numericFilter); - if (error) - return "numericFilter." + error; - } - } - if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { - if (properties.oneFilter === 1) - return "oneFilter: multiple values"; - properties.oneFilter = 1; - { - var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.verify(message.betweenFilter); - if (error) - return "betweenFilter." + error; - } + if (message.property != null && message.hasOwnProperty("property")) + if (!$util.isString(message.property)) + return "property: string expected"; + if (message.connectedSiteTag != null && message.hasOwnProperty("connectedSiteTag")) { + var error = $root.google.analytics.admin.v1alpha.ConnectedSiteTag.verify(message.connectedSiteTag); + if (error) + return "connectedSiteTag." + error; } - if (message.fieldName != null && message.hasOwnProperty("fieldName")) - if (!$util.isString(message.fieldName)) - return "fieldName: string expected"; - if (message.atAnyPointInTime != null && message.hasOwnProperty("atAnyPointInTime")) - if (typeof message.atAnyPointInTime !== "boolean") - return "atAnyPointInTime: boolean expected"; - if (message.inAnyNDayPeriod != null && message.hasOwnProperty("inAnyNDayPeriod")) - if (!$util.isInteger(message.inAnyNDayPeriod)) - return "inAnyNDayPeriod: integer expected"; return null; }; /** - * Creates an AudienceDimensionOrMetricFilter message from a plain object. Also converts values to their respective internal types. + * Creates a CreateConnectedSiteTagRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter} AudienceDimensionOrMetricFilter + * @returns {google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest} CreateConnectedSiteTagRequest */ - AudienceDimensionOrMetricFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter) + CreateConnectedSiteTagRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest) return object; - var message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter(); - if (object.stringFilter != null) { - if (typeof object.stringFilter !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.stringFilter: object expected"); - message.stringFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.fromObject(object.stringFilter); - } - if (object.inListFilter != null) { - if (typeof object.inListFilter !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.inListFilter: object expected"); - message.inListFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.fromObject(object.inListFilter); - } - if (object.numericFilter != null) { - if (typeof object.numericFilter !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.numericFilter: object expected"); - message.numericFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.fromObject(object.numericFilter); - } - if (object.betweenFilter != null) { - if (typeof object.betweenFilter !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.betweenFilter: object expected"); - message.betweenFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.fromObject(object.betweenFilter); + var message = new $root.google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest(); + if (object.property != null) + message.property = String(object.property); + if (object.connectedSiteTag != null) { + if (typeof object.connectedSiteTag !== "object") + throw TypeError(".google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest.connectedSiteTag: object expected"); + message.connectedSiteTag = $root.google.analytics.admin.v1alpha.ConnectedSiteTag.fromObject(object.connectedSiteTag); } - if (object.fieldName != null) - message.fieldName = String(object.fieldName); - if (object.atAnyPointInTime != null) - message.atAnyPointInTime = Boolean(object.atAnyPointInTime); - if (object.inAnyNDayPeriod != null) - message.inAnyNDayPeriod = object.inAnyNDayPeriod | 0; return message; }; /** - * Creates a plain object from an AudienceDimensionOrMetricFilter message. Also converts values to other types if specified. + * Creates a plain object from a CreateConnectedSiteTagRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter} message AudienceDimensionOrMetricFilter + * @param {google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest} message CreateConnectedSiteTagRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AudienceDimensionOrMetricFilter.toObject = function toObject(message, options) { + CreateConnectedSiteTagRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.fieldName = ""; - object.atAnyPointInTime = false; - object.inAnyNDayPeriod = 0; - } - if (message.fieldName != null && message.hasOwnProperty("fieldName")) - object.fieldName = message.fieldName; - if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { - object.stringFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.toObject(message.stringFilter, options); - if (options.oneofs) - object.oneFilter = "stringFilter"; - } - if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { - object.inListFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.toObject(message.inListFilter, options); - if (options.oneofs) - object.oneFilter = "inListFilter"; - } - if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { - object.numericFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.toObject(message.numericFilter, options); - if (options.oneofs) - object.oneFilter = "numericFilter"; - } - if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { - object.betweenFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.toObject(message.betweenFilter, options); - if (options.oneofs) - object.oneFilter = "betweenFilter"; + object.property = ""; + object.connectedSiteTag = null; } - if (message.atAnyPointInTime != null && message.hasOwnProperty("atAnyPointInTime")) - object.atAnyPointInTime = message.atAnyPointInTime; - if (message.inAnyNDayPeriod != null && message.hasOwnProperty("inAnyNDayPeriod")) - object.inAnyNDayPeriod = message.inAnyNDayPeriod; + if (message.property != null && message.hasOwnProperty("property")) + object.property = message.property; + if (message.connectedSiteTag != null && message.hasOwnProperty("connectedSiteTag")) + object.connectedSiteTag = $root.google.analytics.admin.v1alpha.ConnectedSiteTag.toObject(message.connectedSiteTag, options); return object; }; /** - * Converts this AudienceDimensionOrMetricFilter to JSON. + * Converts this CreateConnectedSiteTagRequest to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest * @instance * @returns {Object.} JSON object */ - AudienceDimensionOrMetricFilter.prototype.toJSON = function toJSON() { + CreateConnectedSiteTagRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AudienceDimensionOrMetricFilter + * Gets the default type url for CreateConnectedSiteTagRequest * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AudienceDimensionOrMetricFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateConnectedSiteTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest"; }; - AudienceDimensionOrMetricFilter.StringFilter = (function() { - - /** - * Properties of a StringFilter. - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter - * @interface IStringFilter - * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType|null} [matchType] StringFilter matchType - * @property {string|null} [value] StringFilter value - * @property {boolean|null} [caseSensitive] StringFilter caseSensitive - */ + return CreateConnectedSiteTagRequest; + })(); - /** - * Constructs a new StringFilter. - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter - * @classdesc Represents a StringFilter. - * @implements IStringFilter - * @constructor - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter=} [properties] Properties to set - */ - function StringFilter(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]]; - } + v1alpha.CreateConnectedSiteTagResponse = (function() { - /** - * StringFilter matchType. - * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType} matchType - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter - * @instance - */ - StringFilter.prototype.matchType = 0; + /** + * Properties of a CreateConnectedSiteTagResponse. + * @memberof google.analytics.admin.v1alpha + * @interface ICreateConnectedSiteTagResponse + */ - /** - * StringFilter value. - * @member {string} value - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter - * @instance - */ - StringFilter.prototype.value = ""; + /** + * Constructs a new CreateConnectedSiteTagResponse. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a CreateConnectedSiteTagResponse. + * @implements ICreateConnectedSiteTagResponse + * @constructor + * @param {google.analytics.admin.v1alpha.ICreateConnectedSiteTagResponse=} [properties] Properties to set + */ + function CreateConnectedSiteTagResponse(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]]; + } - /** - * StringFilter caseSensitive. - * @member {boolean} caseSensitive - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter - * @instance - */ - StringFilter.prototype.caseSensitive = false; - - /** - * Creates a new StringFilter instance using the specified properties. - * @function create - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter - * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter} StringFilter instance - */ - StringFilter.create = function create(properties) { - return new StringFilter(properties); - }; - - /** - * Encodes the specified StringFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.verify|verify} messages. - * @function encode - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter - * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter} message StringFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.matchType != null && Object.hasOwnProperty.call(message, "matchType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.matchType); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.caseSensitive); - return writer; - }; - - /** - * Encodes the specified StringFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter - * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter} message StringFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StringFilter message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter - * @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.AudienceDimensionOrMetricFilter.StringFilter} StringFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringFilter.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.matchType = reader.int32(); - break; - } - case 2: { - message.value = reader.string(); - break; - } - case 3: { - message.caseSensitive = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a new CreateConnectedSiteTagResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse + * @static + * @param {google.analytics.admin.v1alpha.ICreateConnectedSiteTagResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse} CreateConnectedSiteTagResponse instance + */ + CreateConnectedSiteTagResponse.create = function create(properties) { + return new CreateConnectedSiteTagResponse(properties); + }; - /** - * Decodes a StringFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter} StringFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified CreateConnectedSiteTagResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse + * @static + * @param {google.analytics.admin.v1alpha.ICreateConnectedSiteTagResponse} message CreateConnectedSiteTagResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateConnectedSiteTagResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * Verifies a StringFilter message. - * @function verify - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StringFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.matchType != null && message.hasOwnProperty("matchType")) - switch (message.matchType) { - default: - return "matchType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) - if (typeof message.caseSensitive !== "boolean") - return "caseSensitive: boolean expected"; - return null; - }; + /** + * Encodes the specified CreateConnectedSiteTagResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse + * @static + * @param {google.analytics.admin.v1alpha.ICreateConnectedSiteTagResponse} message CreateConnectedSiteTagResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateConnectedSiteTagResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a StringFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter} StringFilter - */ - StringFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter) - return object; - var message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter(); - switch (object.matchType) { + /** + * Decodes a CreateConnectedSiteTagResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse + * @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.CreateConnectedSiteTagResponse} CreateConnectedSiteTagResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateConnectedSiteTagResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { default: - if (typeof object.matchType === "number") { - message.matchType = object.matchType; - break; - } - break; - case "MATCH_TYPE_UNSPECIFIED": - case 0: - message.matchType = 0; - break; - case "EXACT": - case 1: - message.matchType = 1; - break; - case "BEGINS_WITH": - case 2: - message.matchType = 2; - break; - case "ENDS_WITH": - case 3: - message.matchType = 3; - break; - case "CONTAINS": - case 4: - message.matchType = 4; - break; - case "FULL_REGEXP": - case 5: - message.matchType = 5; + reader.skipType(tag & 7); break; } - if (object.value != null) - message.value = String(object.value); - if (object.caseSensitive != null) - message.caseSensitive = Boolean(object.caseSensitive); - return message; - }; - - /** - * Creates a plain object from a StringFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter - * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter} message StringFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StringFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.matchType = options.enums === String ? "MATCH_TYPE_UNSPECIFIED" : 0; - object.value = ""; - object.caseSensitive = false; - } - if (message.matchType != null && message.hasOwnProperty("matchType")) - object.matchType = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType[message.matchType] === undefined ? message.matchType : $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType[message.matchType] : message.matchType; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) - object.caseSensitive = message.caseSensitive; - return object; - }; - - /** - * Converts this StringFilter to JSON. - * @function toJSON - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter - * @instance - * @returns {Object.} JSON object - */ - StringFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + } + return message; + }; - /** - * Gets the default type url for StringFilter - * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StringFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter"; - }; + /** + * Decodes a CreateConnectedSiteTagResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse} CreateConnectedSiteTagResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateConnectedSiteTagResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * MatchType enum. - * @name google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType - * @enum {number} - * @property {number} MATCH_TYPE_UNSPECIFIED=0 MATCH_TYPE_UNSPECIFIED value - * @property {number} EXACT=1 EXACT value - * @property {number} BEGINS_WITH=2 BEGINS_WITH value - * @property {number} ENDS_WITH=3 ENDS_WITH value - * @property {number} CONTAINS=4 CONTAINS value - * @property {number} FULL_REGEXP=5 FULL_REGEXP value - */ - StringFilter.MatchType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MATCH_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "EXACT"] = 1; - values[valuesById[2] = "BEGINS_WITH"] = 2; - values[valuesById[3] = "ENDS_WITH"] = 3; - values[valuesById[4] = "CONTAINS"] = 4; - values[valuesById[5] = "FULL_REGEXP"] = 5; - return values; - })(); + /** + * Verifies a CreateConnectedSiteTagResponse message. + * @function verify + * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateConnectedSiteTagResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; - return StringFilter; - })(); + /** + * Creates a CreateConnectedSiteTagResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse} CreateConnectedSiteTagResponse + */ + CreateConnectedSiteTagResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse) + return object; + return new $root.google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse(); + }; - AudienceDimensionOrMetricFilter.InListFilter = (function() { + /** + * Creates a plain object from a CreateConnectedSiteTagResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse + * @static + * @param {google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse} message CreateConnectedSiteTagResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateConnectedSiteTagResponse.toObject = function toObject() { + return {}; + }; - /** - * Properties of an InListFilter. - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter - * @interface IInListFilter - * @property {Array.|null} [values] InListFilter values - * @property {boolean|null} [caseSensitive] InListFilter caseSensitive - */ + /** + * Converts this CreateConnectedSiteTagResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse + * @instance + * @returns {Object.} JSON object + */ + CreateConnectedSiteTagResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new InListFilter. - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter - * @classdesc Represents an InListFilter. - * @implements IInListFilter - * @constructor - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter=} [properties] Properties to set - */ - function InListFilter(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]]; + /** + * Gets the default type url for CreateConnectedSiteTagResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateConnectedSiteTagResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse"; + }; - /** - * InListFilter values. - * @member {Array.} values - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter - * @instance - */ - InListFilter.prototype.values = $util.emptyArray; + return CreateConnectedSiteTagResponse; + })(); - /** - * InListFilter caseSensitive. - * @member {boolean} caseSensitive - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter - * @instance - */ - InListFilter.prototype.caseSensitive = false; + v1alpha.DeleteConnectedSiteTagRequest = (function() { - /** - * Creates a new InListFilter instance using the specified properties. - * @function create - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter - * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter} InListFilter instance - */ - InListFilter.create = function create(properties) { - return new InListFilter(properties); - }; + /** + * Properties of a DeleteConnectedSiteTagRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IDeleteConnectedSiteTagRequest + * @property {string|null} [property] DeleteConnectedSiteTagRequest property + * @property {string|null} [tagId] DeleteConnectedSiteTagRequest tagId + */ - /** - * Encodes the specified InListFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.verify|verify} messages. - * @function encode - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter - * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter} message InListFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InListFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.values[i]); - if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.caseSensitive); - return writer; - }; + /** + * Constructs a new DeleteConnectedSiteTagRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a DeleteConnectedSiteTagRequest. + * @implements IDeleteConnectedSiteTagRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest=} [properties] Properties to set + */ + function DeleteConnectedSiteTagRequest(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]]; + } - /** - * Encodes the specified InListFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter - * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter} message InListFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InListFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * DeleteConnectedSiteTagRequest property. + * @member {string} property + * @memberof google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest + * @instance + */ + DeleteConnectedSiteTagRequest.prototype.property = ""; - /** - * Decodes an InListFilter message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter - * @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.AudienceDimensionOrMetricFilter.InListFilter} InListFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InListFilter.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter(); + /** + * DeleteConnectedSiteTagRequest tagId. + * @member {string} tagId + * @memberof google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest + * @instance + */ + DeleteConnectedSiteTagRequest.prototype.tagId = ""; + + /** + * Creates a new DeleteConnectedSiteTagRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest} DeleteConnectedSiteTagRequest instance + */ + DeleteConnectedSiteTagRequest.create = function create(properties) { + return new DeleteConnectedSiteTagRequest(properties); + }; + + /** + * Encodes the specified DeleteConnectedSiteTagRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest} message DeleteConnectedSiteTagRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteConnectedSiteTagRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); + if (message.tagId != null && Object.hasOwnProperty.call(message, "tagId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.tagId); + return writer; + }; + + /** + * Encodes the specified DeleteConnectedSiteTagRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest} message DeleteConnectedSiteTagRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteConnectedSiteTagRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteConnectedSiteTagRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest + * @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.DeleteConnectedSiteTagRequest} DeleteConnectedSiteTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteConnectedSiteTagRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.property = reader.string(); + break; + } + case 2: { + message.tagId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteConnectedSiteTagRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest} DeleteConnectedSiteTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteConnectedSiteTagRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteConnectedSiteTagRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteConnectedSiteTagRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.property != null && message.hasOwnProperty("property")) + if (!$util.isString(message.property)) + return "property: string expected"; + if (message.tagId != null && message.hasOwnProperty("tagId")) + if (!$util.isString(message.tagId)) + return "tagId: string expected"; + return null; + }; + + /** + * Creates a DeleteConnectedSiteTagRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest} DeleteConnectedSiteTagRequest + */ + DeleteConnectedSiteTagRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest(); + if (object.property != null) + message.property = String(object.property); + if (object.tagId != null) + message.tagId = String(object.tagId); + return message; + }; + + /** + * Creates a plain object from a DeleteConnectedSiteTagRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest + * @static + * @param {google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest} message DeleteConnectedSiteTagRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteConnectedSiteTagRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.property = ""; + object.tagId = ""; + } + if (message.property != null && message.hasOwnProperty("property")) + object.property = message.property; + if (message.tagId != null && message.hasOwnProperty("tagId")) + object.tagId = message.tagId; + return object; + }; + + /** + * Converts this DeleteConnectedSiteTagRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteConnectedSiteTagRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteConnectedSiteTagRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteConnectedSiteTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest"; + }; + + return DeleteConnectedSiteTagRequest; + })(); + + v1alpha.ListConnectedSiteTagsRequest = (function() { + + /** + * Properties of a ListConnectedSiteTagsRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IListConnectedSiteTagsRequest + * @property {string|null} [property] ListConnectedSiteTagsRequest property + */ + + /** + * Constructs a new ListConnectedSiteTagsRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListConnectedSiteTagsRequest. + * @implements IListConnectedSiteTagsRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest=} [properties] Properties to set + */ + function ListConnectedSiteTagsRequest(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]]; + } + + /** + * ListConnectedSiteTagsRequest property. + * @member {string} property + * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest + * @instance + */ + ListConnectedSiteTagsRequest.prototype.property = ""; + + /** + * Creates a new ListConnectedSiteTagsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest + * @static + * @param {google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest} ListConnectedSiteTagsRequest instance + */ + ListConnectedSiteTagsRequest.create = function create(properties) { + return new ListConnectedSiteTagsRequest(properties); + }; + + /** + * Encodes the specified ListConnectedSiteTagsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest + * @static + * @param {google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest} message ListConnectedSiteTagsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectedSiteTagsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); + return writer; + }; + + /** + * Encodes the specified ListConnectedSiteTagsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest + * @static + * @param {google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest} message ListConnectedSiteTagsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectedSiteTagsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListConnectedSiteTagsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest + * @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.ListConnectedSiteTagsRequest} ListConnectedSiteTagsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectedSiteTagsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.property = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListConnectedSiteTagsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest} ListConnectedSiteTagsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectedSiteTagsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListConnectedSiteTagsRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListConnectedSiteTagsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.property != null && message.hasOwnProperty("property")) + if (!$util.isString(message.property)) + return "property: string expected"; + return null; + }; + + /** + * Creates a ListConnectedSiteTagsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest} ListConnectedSiteTagsRequest + */ + ListConnectedSiteTagsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest(); + if (object.property != null) + message.property = String(object.property); + return message; + }; + + /** + * Creates a plain object from a ListConnectedSiteTagsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest + * @static + * @param {google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest} message ListConnectedSiteTagsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListConnectedSiteTagsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.property = ""; + if (message.property != null && message.hasOwnProperty("property")) + object.property = message.property; + return object; + }; + + /** + * Converts this ListConnectedSiteTagsRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest + * @instance + * @returns {Object.} JSON object + */ + ListConnectedSiteTagsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListConnectedSiteTagsRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListConnectedSiteTagsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest"; + }; + + return ListConnectedSiteTagsRequest; + })(); + + v1alpha.ListConnectedSiteTagsResponse = (function() { + + /** + * Properties of a ListConnectedSiteTagsResponse. + * @memberof google.analytics.admin.v1alpha + * @interface IListConnectedSiteTagsResponse + * @property {Array.|null} [connectedSiteTags] ListConnectedSiteTagsResponse connectedSiteTags + */ + + /** + * Constructs a new ListConnectedSiteTagsResponse. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListConnectedSiteTagsResponse. + * @implements IListConnectedSiteTagsResponse + * @constructor + * @param {google.analytics.admin.v1alpha.IListConnectedSiteTagsResponse=} [properties] Properties to set + */ + function ListConnectedSiteTagsResponse(properties) { + this.connectedSiteTags = []; + 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]]; + } + + /** + * ListConnectedSiteTagsResponse connectedSiteTags. + * @member {Array.} connectedSiteTags + * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse + * @instance + */ + ListConnectedSiteTagsResponse.prototype.connectedSiteTags = $util.emptyArray; + + /** + * Creates a new ListConnectedSiteTagsResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse + * @static + * @param {google.analytics.admin.v1alpha.IListConnectedSiteTagsResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse} ListConnectedSiteTagsResponse instance + */ + ListConnectedSiteTagsResponse.create = function create(properties) { + return new ListConnectedSiteTagsResponse(properties); + }; + + /** + * Encodes the specified ListConnectedSiteTagsResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse + * @static + * @param {google.analytics.admin.v1alpha.IListConnectedSiteTagsResponse} message ListConnectedSiteTagsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectedSiteTagsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.connectedSiteTags != null && message.connectedSiteTags.length) + for (var i = 0; i < message.connectedSiteTags.length; ++i) + $root.google.analytics.admin.v1alpha.ConnectedSiteTag.encode(message.connectedSiteTags[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ListConnectedSiteTagsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse + * @static + * @param {google.analytics.admin.v1alpha.IListConnectedSiteTagsResponse} message ListConnectedSiteTagsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectedSiteTagsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListConnectedSiteTagsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse + * @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.ListConnectedSiteTagsResponse} ListConnectedSiteTagsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectedSiteTagsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.connectedSiteTags && message.connectedSiteTags.length)) + message.connectedSiteTags = []; + message.connectedSiteTags.push($root.google.analytics.admin.v1alpha.ConnectedSiteTag.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListConnectedSiteTagsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse} ListConnectedSiteTagsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectedSiteTagsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListConnectedSiteTagsResponse message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListConnectedSiteTagsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.connectedSiteTags != null && message.hasOwnProperty("connectedSiteTags")) { + if (!Array.isArray(message.connectedSiteTags)) + return "connectedSiteTags: array expected"; + for (var i = 0; i < message.connectedSiteTags.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.ConnectedSiteTag.verify(message.connectedSiteTags[i]); + if (error) + return "connectedSiteTags." + error; + } + } + return null; + }; + + /** + * Creates a ListConnectedSiteTagsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse} ListConnectedSiteTagsResponse + */ + ListConnectedSiteTagsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse(); + if (object.connectedSiteTags) { + if (!Array.isArray(object.connectedSiteTags)) + throw TypeError(".google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse.connectedSiteTags: array expected"); + message.connectedSiteTags = []; + for (var i = 0; i < object.connectedSiteTags.length; ++i) { + if (typeof object.connectedSiteTags[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse.connectedSiteTags: object expected"); + message.connectedSiteTags[i] = $root.google.analytics.admin.v1alpha.ConnectedSiteTag.fromObject(object.connectedSiteTags[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ListConnectedSiteTagsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse + * @static + * @param {google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse} message ListConnectedSiteTagsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListConnectedSiteTagsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.connectedSiteTags = []; + if (message.connectedSiteTags && message.connectedSiteTags.length) { + object.connectedSiteTags = []; + for (var j = 0; j < message.connectedSiteTags.length; ++j) + object.connectedSiteTags[j] = $root.google.analytics.admin.v1alpha.ConnectedSiteTag.toObject(message.connectedSiteTags[j], options); + } + return object; + }; + + /** + * Converts this ListConnectedSiteTagsResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse + * @instance + * @returns {Object.} JSON object + */ + ListConnectedSiteTagsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListConnectedSiteTagsResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListConnectedSiteTagsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse"; + }; + + return ListConnectedSiteTagsResponse; + })(); + + v1alpha.CreateAdSenseLinkRequest = (function() { + + /** + * Properties of a CreateAdSenseLinkRequest. + * @memberof google.analytics.admin.v1alpha + * @interface ICreateAdSenseLinkRequest + * @property {string|null} [parent] CreateAdSenseLinkRequest parent + * @property {google.analytics.admin.v1alpha.IAdSenseLink|null} [adsenseLink] CreateAdSenseLinkRequest adsenseLink + */ + + /** + * Constructs a new CreateAdSenseLinkRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a CreateAdSenseLinkRequest. + * @implements ICreateAdSenseLinkRequest + * @constructor + * @param {google.analytics.admin.v1alpha.ICreateAdSenseLinkRequest=} [properties] Properties to set + */ + function CreateAdSenseLinkRequest(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]]; + } + + /** + * CreateAdSenseLinkRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.CreateAdSenseLinkRequest + * @instance + */ + CreateAdSenseLinkRequest.prototype.parent = ""; + + /** + * CreateAdSenseLinkRequest adsenseLink. + * @member {google.analytics.admin.v1alpha.IAdSenseLink|null|undefined} adsenseLink + * @memberof google.analytics.admin.v1alpha.CreateAdSenseLinkRequest + * @instance + */ + CreateAdSenseLinkRequest.prototype.adsenseLink = null; + + /** + * Creates a new CreateAdSenseLinkRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.CreateAdSenseLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateAdSenseLinkRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.CreateAdSenseLinkRequest} CreateAdSenseLinkRequest instance + */ + CreateAdSenseLinkRequest.create = function create(properties) { + return new CreateAdSenseLinkRequest(properties); + }; + + /** + * Encodes the specified CreateAdSenseLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateAdSenseLinkRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.CreateAdSenseLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateAdSenseLinkRequest} message CreateAdSenseLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAdSenseLinkRequest.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.adsenseLink != null && Object.hasOwnProperty.call(message, "adsenseLink")) + $root.google.analytics.admin.v1alpha.AdSenseLink.encode(message.adsenseLink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateAdSenseLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateAdSenseLinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.CreateAdSenseLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateAdSenseLinkRequest} message CreateAdSenseLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAdSenseLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateAdSenseLinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.CreateAdSenseLinkRequest + * @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.CreateAdSenseLinkRequest} CreateAdSenseLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAdSenseLinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.CreateAdSenseLinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.adsenseLink = $root.google.analytics.admin.v1alpha.AdSenseLink.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateAdSenseLinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.CreateAdSenseLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.CreateAdSenseLinkRequest} CreateAdSenseLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAdSenseLinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateAdSenseLinkRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.CreateAdSenseLinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateAdSenseLinkRequest.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.adsenseLink != null && message.hasOwnProperty("adsenseLink")) { + var error = $root.google.analytics.admin.v1alpha.AdSenseLink.verify(message.adsenseLink); + if (error) + return "adsenseLink." + error; + } + return null; + }; + + /** + * Creates a CreateAdSenseLinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.CreateAdSenseLinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.CreateAdSenseLinkRequest} CreateAdSenseLinkRequest + */ + CreateAdSenseLinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.CreateAdSenseLinkRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.CreateAdSenseLinkRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.adsenseLink != null) { + if (typeof object.adsenseLink !== "object") + throw TypeError(".google.analytics.admin.v1alpha.CreateAdSenseLinkRequest.adsenseLink: object expected"); + message.adsenseLink = $root.google.analytics.admin.v1alpha.AdSenseLink.fromObject(object.adsenseLink); + } + return message; + }; + + /** + * Creates a plain object from a CreateAdSenseLinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.CreateAdSenseLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.CreateAdSenseLinkRequest} message CreateAdSenseLinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateAdSenseLinkRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.adsenseLink = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.adsenseLink != null && message.hasOwnProperty("adsenseLink")) + object.adsenseLink = $root.google.analytics.admin.v1alpha.AdSenseLink.toObject(message.adsenseLink, options); + return object; + }; + + /** + * Converts this CreateAdSenseLinkRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.CreateAdSenseLinkRequest + * @instance + * @returns {Object.} JSON object + */ + CreateAdSenseLinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateAdSenseLinkRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.CreateAdSenseLinkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateAdSenseLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.CreateAdSenseLinkRequest"; + }; + + return CreateAdSenseLinkRequest; + })(); + + v1alpha.GetAdSenseLinkRequest = (function() { + + /** + * Properties of a GetAdSenseLinkRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IGetAdSenseLinkRequest + * @property {string|null} [name] GetAdSenseLinkRequest name + */ + + /** + * Constructs a new GetAdSenseLinkRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a GetAdSenseLinkRequest. + * @implements IGetAdSenseLinkRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IGetAdSenseLinkRequest=} [properties] Properties to set + */ + function GetAdSenseLinkRequest(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]]; + } + + /** + * GetAdSenseLinkRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.GetAdSenseLinkRequest + * @instance + */ + GetAdSenseLinkRequest.prototype.name = ""; + + /** + * Creates a new GetAdSenseLinkRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.GetAdSenseLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetAdSenseLinkRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.GetAdSenseLinkRequest} GetAdSenseLinkRequest instance + */ + GetAdSenseLinkRequest.create = function create(properties) { + return new GetAdSenseLinkRequest(properties); + }; + + /** + * Encodes the specified GetAdSenseLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetAdSenseLinkRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.GetAdSenseLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetAdSenseLinkRequest} message GetAdSenseLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAdSenseLinkRequest.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 GetAdSenseLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetAdSenseLinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.GetAdSenseLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetAdSenseLinkRequest} message GetAdSenseLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAdSenseLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetAdSenseLinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.GetAdSenseLinkRequest + * @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.GetAdSenseLinkRequest} GetAdSenseLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAdSenseLinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GetAdSenseLinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetAdSenseLinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.GetAdSenseLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.GetAdSenseLinkRequest} GetAdSenseLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAdSenseLinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetAdSenseLinkRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.GetAdSenseLinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetAdSenseLinkRequest.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 GetAdSenseLinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.GetAdSenseLinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.GetAdSenseLinkRequest} GetAdSenseLinkRequest + */ + GetAdSenseLinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.GetAdSenseLinkRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.GetAdSenseLinkRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetAdSenseLinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.GetAdSenseLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.GetAdSenseLinkRequest} message GetAdSenseLinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetAdSenseLinkRequest.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 GetAdSenseLinkRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.GetAdSenseLinkRequest + * @instance + * @returns {Object.} JSON object + */ + GetAdSenseLinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetAdSenseLinkRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.GetAdSenseLinkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetAdSenseLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.GetAdSenseLinkRequest"; + }; + + return GetAdSenseLinkRequest; + })(); + + v1alpha.DeleteAdSenseLinkRequest = (function() { + + /** + * Properties of a DeleteAdSenseLinkRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IDeleteAdSenseLinkRequest + * @property {string|null} [name] DeleteAdSenseLinkRequest name + */ + + /** + * Constructs a new DeleteAdSenseLinkRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a DeleteAdSenseLinkRequest. + * @implements IDeleteAdSenseLinkRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IDeleteAdSenseLinkRequest=} [properties] Properties to set + */ + function DeleteAdSenseLinkRequest(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]]; + } + + /** + * DeleteAdSenseLinkRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest + * @instance + */ + DeleteAdSenseLinkRequest.prototype.name = ""; + + /** + * Creates a new DeleteAdSenseLinkRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteAdSenseLinkRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest} DeleteAdSenseLinkRequest instance + */ + DeleteAdSenseLinkRequest.create = function create(properties) { + return new DeleteAdSenseLinkRequest(properties); + }; + + /** + * Encodes the specified DeleteAdSenseLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteAdSenseLinkRequest} message DeleteAdSenseLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAdSenseLinkRequest.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 DeleteAdSenseLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteAdSenseLinkRequest} message DeleteAdSenseLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAdSenseLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteAdSenseLinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest + * @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.DeleteAdSenseLinkRequest} DeleteAdSenseLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAdSenseLinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteAdSenseLinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest} DeleteAdSenseLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAdSenseLinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteAdSenseLinkRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteAdSenseLinkRequest.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 DeleteAdSenseLinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest} DeleteAdSenseLinkRequest + */ + DeleteAdSenseLinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteAdSenseLinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest} message DeleteAdSenseLinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteAdSenseLinkRequest.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 DeleteAdSenseLinkRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteAdSenseLinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteAdSenseLinkRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteAdSenseLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest"; + }; + + return DeleteAdSenseLinkRequest; + })(); + + v1alpha.ListAdSenseLinksRequest = (function() { + + /** + * Properties of a ListAdSenseLinksRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IListAdSenseLinksRequest + * @property {string|null} [parent] ListAdSenseLinksRequest parent + * @property {number|null} [pageSize] ListAdSenseLinksRequest pageSize + * @property {string|null} [pageToken] ListAdSenseLinksRequest pageToken + */ + + /** + * Constructs a new ListAdSenseLinksRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListAdSenseLinksRequest. + * @implements IListAdSenseLinksRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IListAdSenseLinksRequest=} [properties] Properties to set + */ + function ListAdSenseLinksRequest(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]]; + } + + /** + * ListAdSenseLinksRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.ListAdSenseLinksRequest + * @instance + */ + ListAdSenseLinksRequest.prototype.parent = ""; + + /** + * ListAdSenseLinksRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.admin.v1alpha.ListAdSenseLinksRequest + * @instance + */ + ListAdSenseLinksRequest.prototype.pageSize = 0; + + /** + * ListAdSenseLinksRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.admin.v1alpha.ListAdSenseLinksRequest + * @instance + */ + ListAdSenseLinksRequest.prototype.pageToken = ""; + + /** + * Creates a new ListAdSenseLinksRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListAdSenseLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.IListAdSenseLinksRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListAdSenseLinksRequest} ListAdSenseLinksRequest instance + */ + ListAdSenseLinksRequest.create = function create(properties) { + return new ListAdSenseLinksRequest(properties); + }; + + /** + * Encodes the specified ListAdSenseLinksRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListAdSenseLinksRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListAdSenseLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.IListAdSenseLinksRequest} message ListAdSenseLinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAdSenseLinksRequest.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); + return writer; + }; + + /** + * Encodes the specified ListAdSenseLinksRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListAdSenseLinksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListAdSenseLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.IListAdSenseLinksRequest} message ListAdSenseLinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAdSenseLinksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAdSenseLinksRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListAdSenseLinksRequest + * @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.ListAdSenseLinksRequest} ListAdSenseLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAdSenseLinksRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListAdSenseLinksRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAdSenseLinksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListAdSenseLinksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListAdSenseLinksRequest} ListAdSenseLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAdSenseLinksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAdSenseLinksRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListAdSenseLinksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAdSenseLinksRequest.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"; + return null; + }; + + /** + * Creates a ListAdSenseLinksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListAdSenseLinksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListAdSenseLinksRequest} ListAdSenseLinksRequest + */ + ListAdSenseLinksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListAdSenseLinksRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListAdSenseLinksRequest(); + 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); + return message; + }; + + /** + * Creates a plain object from a ListAdSenseLinksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListAdSenseLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.ListAdSenseLinksRequest} message ListAdSenseLinksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAdSenseLinksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + 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; + return object; + }; + + /** + * Converts this ListAdSenseLinksRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListAdSenseLinksRequest + * @instance + * @returns {Object.} JSON object + */ + ListAdSenseLinksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAdSenseLinksRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListAdSenseLinksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAdSenseLinksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListAdSenseLinksRequest"; + }; + + return ListAdSenseLinksRequest; + })(); + + v1alpha.ListAdSenseLinksResponse = (function() { + + /** + * Properties of a ListAdSenseLinksResponse. + * @memberof google.analytics.admin.v1alpha + * @interface IListAdSenseLinksResponse + * @property {Array.|null} [adsenseLinks] ListAdSenseLinksResponse adsenseLinks + * @property {string|null} [nextPageToken] ListAdSenseLinksResponse nextPageToken + */ + + /** + * Constructs a new ListAdSenseLinksResponse. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListAdSenseLinksResponse. + * @implements IListAdSenseLinksResponse + * @constructor + * @param {google.analytics.admin.v1alpha.IListAdSenseLinksResponse=} [properties] Properties to set + */ + function ListAdSenseLinksResponse(properties) { + this.adsenseLinks = []; + 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]]; + } + + /** + * ListAdSenseLinksResponse adsenseLinks. + * @member {Array.} adsenseLinks + * @memberof google.analytics.admin.v1alpha.ListAdSenseLinksResponse + * @instance + */ + ListAdSenseLinksResponse.prototype.adsenseLinks = $util.emptyArray; + + /** + * ListAdSenseLinksResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.analytics.admin.v1alpha.ListAdSenseLinksResponse + * @instance + */ + ListAdSenseLinksResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListAdSenseLinksResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListAdSenseLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.IListAdSenseLinksResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListAdSenseLinksResponse} ListAdSenseLinksResponse instance + */ + ListAdSenseLinksResponse.create = function create(properties) { + return new ListAdSenseLinksResponse(properties); + }; + + /** + * Encodes the specified ListAdSenseLinksResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListAdSenseLinksResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListAdSenseLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.IListAdSenseLinksResponse} message ListAdSenseLinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAdSenseLinksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.adsenseLinks != null && message.adsenseLinks.length) + for (var i = 0; i < message.adsenseLinks.length; ++i) + $root.google.analytics.admin.v1alpha.AdSenseLink.encode(message.adsenseLinks[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 ListAdSenseLinksResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListAdSenseLinksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListAdSenseLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.IListAdSenseLinksResponse} message ListAdSenseLinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAdSenseLinksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAdSenseLinksResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListAdSenseLinksResponse + * @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.ListAdSenseLinksResponse} ListAdSenseLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAdSenseLinksResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListAdSenseLinksResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.adsenseLinks && message.adsenseLinks.length)) + message.adsenseLinks = []; + message.adsenseLinks.push($root.google.analytics.admin.v1alpha.AdSenseLink.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAdSenseLinksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListAdSenseLinksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListAdSenseLinksResponse} ListAdSenseLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAdSenseLinksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAdSenseLinksResponse message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListAdSenseLinksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAdSenseLinksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.adsenseLinks != null && message.hasOwnProperty("adsenseLinks")) { + if (!Array.isArray(message.adsenseLinks)) + return "adsenseLinks: array expected"; + for (var i = 0; i < message.adsenseLinks.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.AdSenseLink.verify(message.adsenseLinks[i]); + if (error) + return "adsenseLinks." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListAdSenseLinksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListAdSenseLinksResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListAdSenseLinksResponse} ListAdSenseLinksResponse + */ + ListAdSenseLinksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListAdSenseLinksResponse) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListAdSenseLinksResponse(); + if (object.adsenseLinks) { + if (!Array.isArray(object.adsenseLinks)) + throw TypeError(".google.analytics.admin.v1alpha.ListAdSenseLinksResponse.adsenseLinks: array expected"); + message.adsenseLinks = []; + for (var i = 0; i < object.adsenseLinks.length; ++i) { + if (typeof object.adsenseLinks[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ListAdSenseLinksResponse.adsenseLinks: object expected"); + message.adsenseLinks[i] = $root.google.analytics.admin.v1alpha.AdSenseLink.fromObject(object.adsenseLinks[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListAdSenseLinksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListAdSenseLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.ListAdSenseLinksResponse} message ListAdSenseLinksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAdSenseLinksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.adsenseLinks = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.adsenseLinks && message.adsenseLinks.length) { + object.adsenseLinks = []; + for (var j = 0; j < message.adsenseLinks.length; ++j) + object.adsenseLinks[j] = $root.google.analytics.admin.v1alpha.AdSenseLink.toObject(message.adsenseLinks[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListAdSenseLinksResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListAdSenseLinksResponse + * @instance + * @returns {Object.} JSON object + */ + ListAdSenseLinksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAdSenseLinksResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListAdSenseLinksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAdSenseLinksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListAdSenseLinksResponse"; + }; + + return ListAdSenseLinksResponse; + })(); + + v1alpha.FetchConnectedGa4PropertyRequest = (function() { + + /** + * Properties of a FetchConnectedGa4PropertyRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IFetchConnectedGa4PropertyRequest + * @property {string|null} [property] FetchConnectedGa4PropertyRequest property + */ + + /** + * Constructs a new FetchConnectedGa4PropertyRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a FetchConnectedGa4PropertyRequest. + * @implements IFetchConnectedGa4PropertyRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyRequest=} [properties] Properties to set + */ + function FetchConnectedGa4PropertyRequest(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]]; + } + + /** + * FetchConnectedGa4PropertyRequest property. + * @member {string} property + * @memberof google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest + * @instance + */ + FetchConnectedGa4PropertyRequest.prototype.property = ""; + + /** + * Creates a new FetchConnectedGa4PropertyRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest + * @static + * @param {google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest} FetchConnectedGa4PropertyRequest instance + */ + FetchConnectedGa4PropertyRequest.create = function create(properties) { + return new FetchConnectedGa4PropertyRequest(properties); + }; + + /** + * Encodes the specified FetchConnectedGa4PropertyRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest + * @static + * @param {google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyRequest} message FetchConnectedGa4PropertyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchConnectedGa4PropertyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); + return writer; + }; + + /** + * Encodes the specified FetchConnectedGa4PropertyRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest + * @static + * @param {google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyRequest} message FetchConnectedGa4PropertyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchConnectedGa4PropertyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchConnectedGa4PropertyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest + * @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.FetchConnectedGa4PropertyRequest} FetchConnectedGa4PropertyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchConnectedGa4PropertyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.property = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchConnectedGa4PropertyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest} FetchConnectedGa4PropertyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchConnectedGa4PropertyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchConnectedGa4PropertyRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchConnectedGa4PropertyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.property != null && message.hasOwnProperty("property")) + if (!$util.isString(message.property)) + return "property: string expected"; + return null; + }; + + /** + * Creates a FetchConnectedGa4PropertyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest} FetchConnectedGa4PropertyRequest + */ + FetchConnectedGa4PropertyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest(); + if (object.property != null) + message.property = String(object.property); + return message; + }; + + /** + * Creates a plain object from a FetchConnectedGa4PropertyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest + * @static + * @param {google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest} message FetchConnectedGa4PropertyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchConnectedGa4PropertyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.property = ""; + if (message.property != null && message.hasOwnProperty("property")) + object.property = message.property; + return object; + }; + + /** + * Converts this FetchConnectedGa4PropertyRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest + * @instance + * @returns {Object.} JSON object + */ + FetchConnectedGa4PropertyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchConnectedGa4PropertyRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchConnectedGa4PropertyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest"; + }; + + return FetchConnectedGa4PropertyRequest; + })(); + + v1alpha.FetchConnectedGa4PropertyResponse = (function() { + + /** + * Properties of a FetchConnectedGa4PropertyResponse. + * @memberof google.analytics.admin.v1alpha + * @interface IFetchConnectedGa4PropertyResponse + * @property {string|null} [property] FetchConnectedGa4PropertyResponse property + */ + + /** + * Constructs a new FetchConnectedGa4PropertyResponse. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a FetchConnectedGa4PropertyResponse. + * @implements IFetchConnectedGa4PropertyResponse + * @constructor + * @param {google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyResponse=} [properties] Properties to set + */ + function FetchConnectedGa4PropertyResponse(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]]; + } + + /** + * FetchConnectedGa4PropertyResponse property. + * @member {string} property + * @memberof google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse + * @instance + */ + FetchConnectedGa4PropertyResponse.prototype.property = ""; + + /** + * Creates a new FetchConnectedGa4PropertyResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse + * @static + * @param {google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse} FetchConnectedGa4PropertyResponse instance + */ + FetchConnectedGa4PropertyResponse.create = function create(properties) { + return new FetchConnectedGa4PropertyResponse(properties); + }; + + /** + * Encodes the specified FetchConnectedGa4PropertyResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse + * @static + * @param {google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyResponse} message FetchConnectedGa4PropertyResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchConnectedGa4PropertyResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); + return writer; + }; + + /** + * Encodes the specified FetchConnectedGa4PropertyResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse + * @static + * @param {google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyResponse} message FetchConnectedGa4PropertyResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchConnectedGa4PropertyResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchConnectedGa4PropertyResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse + * @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.FetchConnectedGa4PropertyResponse} FetchConnectedGa4PropertyResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchConnectedGa4PropertyResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.property = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchConnectedGa4PropertyResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse} FetchConnectedGa4PropertyResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchConnectedGa4PropertyResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchConnectedGa4PropertyResponse message. + * @function verify + * @memberof google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchConnectedGa4PropertyResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.property != null && message.hasOwnProperty("property")) + if (!$util.isString(message.property)) + return "property: string expected"; + return null; + }; + + /** + * Creates a FetchConnectedGa4PropertyResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse} FetchConnectedGa4PropertyResponse + */ + FetchConnectedGa4PropertyResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse) + return object; + var message = new $root.google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse(); + if (object.property != null) + message.property = String(object.property); + return message; + }; + + /** + * Creates a plain object from a FetchConnectedGa4PropertyResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse + * @static + * @param {google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse} message FetchConnectedGa4PropertyResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchConnectedGa4PropertyResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.property = ""; + if (message.property != null && message.hasOwnProperty("property")) + object.property = message.property; + return object; + }; + + /** + * Converts this FetchConnectedGa4PropertyResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse + * @instance + * @returns {Object.} JSON object + */ + FetchConnectedGa4PropertyResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchConnectedGa4PropertyResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchConnectedGa4PropertyResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse"; + }; + + return FetchConnectedGa4PropertyResponse; + })(); + + v1alpha.CreateEventCreateRuleRequest = (function() { + + /** + * Properties of a CreateEventCreateRuleRequest. + * @memberof google.analytics.admin.v1alpha + * @interface ICreateEventCreateRuleRequest + * @property {string|null} [parent] CreateEventCreateRuleRequest parent + * @property {google.analytics.admin.v1alpha.IEventCreateRule|null} [eventCreateRule] CreateEventCreateRuleRequest eventCreateRule + */ + + /** + * Constructs a new CreateEventCreateRuleRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a CreateEventCreateRuleRequest. + * @implements ICreateEventCreateRuleRequest + * @constructor + * @param {google.analytics.admin.v1alpha.ICreateEventCreateRuleRequest=} [properties] Properties to set + */ + function CreateEventCreateRuleRequest(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]]; + } + + /** + * CreateEventCreateRuleRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.CreateEventCreateRuleRequest + * @instance + */ + CreateEventCreateRuleRequest.prototype.parent = ""; + + /** + * CreateEventCreateRuleRequest eventCreateRule. + * @member {google.analytics.admin.v1alpha.IEventCreateRule|null|undefined} eventCreateRule + * @memberof google.analytics.admin.v1alpha.CreateEventCreateRuleRequest + * @instance + */ + CreateEventCreateRuleRequest.prototype.eventCreateRule = null; + + /** + * Creates a new CreateEventCreateRuleRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.CreateEventCreateRuleRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateEventCreateRuleRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.CreateEventCreateRuleRequest} CreateEventCreateRuleRequest instance + */ + CreateEventCreateRuleRequest.create = function create(properties) { + return new CreateEventCreateRuleRequest(properties); + }; + + /** + * Encodes the specified CreateEventCreateRuleRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateEventCreateRuleRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.CreateEventCreateRuleRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateEventCreateRuleRequest} message CreateEventCreateRuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateEventCreateRuleRequest.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.eventCreateRule != null && Object.hasOwnProperty.call(message, "eventCreateRule")) + $root.google.analytics.admin.v1alpha.EventCreateRule.encode(message.eventCreateRule, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateEventCreateRuleRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateEventCreateRuleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.CreateEventCreateRuleRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateEventCreateRuleRequest} message CreateEventCreateRuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateEventCreateRuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateEventCreateRuleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.CreateEventCreateRuleRequest + * @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.CreateEventCreateRuleRequest} CreateEventCreateRuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateEventCreateRuleRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.CreateEventCreateRuleRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.eventCreateRule = $root.google.analytics.admin.v1alpha.EventCreateRule.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateEventCreateRuleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.CreateEventCreateRuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.CreateEventCreateRuleRequest} CreateEventCreateRuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateEventCreateRuleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateEventCreateRuleRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.CreateEventCreateRuleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateEventCreateRuleRequest.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.eventCreateRule != null && message.hasOwnProperty("eventCreateRule")) { + var error = $root.google.analytics.admin.v1alpha.EventCreateRule.verify(message.eventCreateRule); + if (error) + return "eventCreateRule." + error; + } + return null; + }; + + /** + * Creates a CreateEventCreateRuleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.CreateEventCreateRuleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.CreateEventCreateRuleRequest} CreateEventCreateRuleRequest + */ + CreateEventCreateRuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.CreateEventCreateRuleRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.CreateEventCreateRuleRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.eventCreateRule != null) { + if (typeof object.eventCreateRule !== "object") + throw TypeError(".google.analytics.admin.v1alpha.CreateEventCreateRuleRequest.eventCreateRule: object expected"); + message.eventCreateRule = $root.google.analytics.admin.v1alpha.EventCreateRule.fromObject(object.eventCreateRule); + } + return message; + }; + + /** + * Creates a plain object from a CreateEventCreateRuleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.CreateEventCreateRuleRequest + * @static + * @param {google.analytics.admin.v1alpha.CreateEventCreateRuleRequest} message CreateEventCreateRuleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateEventCreateRuleRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.eventCreateRule = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.eventCreateRule != null && message.hasOwnProperty("eventCreateRule")) + object.eventCreateRule = $root.google.analytics.admin.v1alpha.EventCreateRule.toObject(message.eventCreateRule, options); + return object; + }; + + /** + * Converts this CreateEventCreateRuleRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.CreateEventCreateRuleRequest + * @instance + * @returns {Object.} JSON object + */ + CreateEventCreateRuleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateEventCreateRuleRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.CreateEventCreateRuleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateEventCreateRuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.CreateEventCreateRuleRequest"; + }; + + return CreateEventCreateRuleRequest; + })(); + + v1alpha.UpdateEventCreateRuleRequest = (function() { + + /** + * Properties of an UpdateEventCreateRuleRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IUpdateEventCreateRuleRequest + * @property {google.analytics.admin.v1alpha.IEventCreateRule|null} [eventCreateRule] UpdateEventCreateRuleRequest eventCreateRule + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEventCreateRuleRequest updateMask + */ + + /** + * Constructs a new UpdateEventCreateRuleRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an UpdateEventCreateRuleRequest. + * @implements IUpdateEventCreateRuleRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IUpdateEventCreateRuleRequest=} [properties] Properties to set + */ + function UpdateEventCreateRuleRequest(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]]; + } + + /** + * UpdateEventCreateRuleRequest eventCreateRule. + * @member {google.analytics.admin.v1alpha.IEventCreateRule|null|undefined} eventCreateRule + * @memberof google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest + * @instance + */ + UpdateEventCreateRuleRequest.prototype.eventCreateRule = null; + + /** + * UpdateEventCreateRuleRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest + * @instance + */ + UpdateEventCreateRuleRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateEventCreateRuleRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateEventCreateRuleRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest} UpdateEventCreateRuleRequest instance + */ + UpdateEventCreateRuleRequest.create = function create(properties) { + return new UpdateEventCreateRuleRequest(properties); + }; + + /** + * Encodes the specified UpdateEventCreateRuleRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateEventCreateRuleRequest} message UpdateEventCreateRuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEventCreateRuleRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eventCreateRule != null && Object.hasOwnProperty.call(message, "eventCreateRule")) + $root.google.analytics.admin.v1alpha.EventCreateRule.encode(message.eventCreateRule, 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 UpdateEventCreateRuleRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateEventCreateRuleRequest} message UpdateEventCreateRuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEventCreateRuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateEventCreateRuleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest + * @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.UpdateEventCreateRuleRequest} UpdateEventCreateRuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEventCreateRuleRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.eventCreateRule = $root.google.analytics.admin.v1alpha.EventCreateRule.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 UpdateEventCreateRuleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest} UpdateEventCreateRuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEventCreateRuleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateEventCreateRuleRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateEventCreateRuleRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.eventCreateRule != null && message.hasOwnProperty("eventCreateRule")) { + var error = $root.google.analytics.admin.v1alpha.EventCreateRule.verify(message.eventCreateRule); + if (error) + return "eventCreateRule." + 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 UpdateEventCreateRuleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest} UpdateEventCreateRuleRequest + */ + UpdateEventCreateRuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest(); + if (object.eventCreateRule != null) { + if (typeof object.eventCreateRule !== "object") + throw TypeError(".google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest.eventCreateRule: object expected"); + message.eventCreateRule = $root.google.analytics.admin.v1alpha.EventCreateRule.fromObject(object.eventCreateRule); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateEventCreateRuleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest + * @static + * @param {google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest} message UpdateEventCreateRuleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateEventCreateRuleRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.eventCreateRule = null; + object.updateMask = null; + } + if (message.eventCreateRule != null && message.hasOwnProperty("eventCreateRule")) + object.eventCreateRule = $root.google.analytics.admin.v1alpha.EventCreateRule.toObject(message.eventCreateRule, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateEventCreateRuleRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateEventCreateRuleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateEventCreateRuleRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateEventCreateRuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest"; + }; + + return UpdateEventCreateRuleRequest; + })(); + + v1alpha.DeleteEventCreateRuleRequest = (function() { + + /** + * Properties of a DeleteEventCreateRuleRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IDeleteEventCreateRuleRequest + * @property {string|null} [name] DeleteEventCreateRuleRequest name + */ + + /** + * Constructs a new DeleteEventCreateRuleRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a DeleteEventCreateRuleRequest. + * @implements IDeleteEventCreateRuleRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IDeleteEventCreateRuleRequest=} [properties] Properties to set + */ + function DeleteEventCreateRuleRequest(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]]; + } + + /** + * DeleteEventCreateRuleRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest + * @instance + */ + DeleteEventCreateRuleRequest.prototype.name = ""; + + /** + * Creates a new DeleteEventCreateRuleRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteEventCreateRuleRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest} DeleteEventCreateRuleRequest instance + */ + DeleteEventCreateRuleRequest.create = function create(properties) { + return new DeleteEventCreateRuleRequest(properties); + }; + + /** + * Encodes the specified DeleteEventCreateRuleRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteEventCreateRuleRequest} message DeleteEventCreateRuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteEventCreateRuleRequest.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 DeleteEventCreateRuleRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteEventCreateRuleRequest} message DeleteEventCreateRuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteEventCreateRuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteEventCreateRuleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest + * @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.DeleteEventCreateRuleRequest} DeleteEventCreateRuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteEventCreateRuleRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteEventCreateRuleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest} DeleteEventCreateRuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteEventCreateRuleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteEventCreateRuleRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteEventCreateRuleRequest.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 DeleteEventCreateRuleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest} DeleteEventCreateRuleRequest + */ + DeleteEventCreateRuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteEventCreateRuleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest + * @static + * @param {google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest} message DeleteEventCreateRuleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteEventCreateRuleRequest.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 DeleteEventCreateRuleRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteEventCreateRuleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteEventCreateRuleRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteEventCreateRuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest"; + }; + + return DeleteEventCreateRuleRequest; + })(); + + v1alpha.GetEventCreateRuleRequest = (function() { + + /** + * Properties of a GetEventCreateRuleRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IGetEventCreateRuleRequest + * @property {string|null} [name] GetEventCreateRuleRequest name + */ + + /** + * Constructs a new GetEventCreateRuleRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a GetEventCreateRuleRequest. + * @implements IGetEventCreateRuleRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IGetEventCreateRuleRequest=} [properties] Properties to set + */ + function GetEventCreateRuleRequest(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]]; + } + + /** + * GetEventCreateRuleRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.GetEventCreateRuleRequest + * @instance + */ + GetEventCreateRuleRequest.prototype.name = ""; + + /** + * Creates a new GetEventCreateRuleRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.GetEventCreateRuleRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetEventCreateRuleRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.GetEventCreateRuleRequest} GetEventCreateRuleRequest instance + */ + GetEventCreateRuleRequest.create = function create(properties) { + return new GetEventCreateRuleRequest(properties); + }; + + /** + * Encodes the specified GetEventCreateRuleRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetEventCreateRuleRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.GetEventCreateRuleRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetEventCreateRuleRequest} message GetEventCreateRuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEventCreateRuleRequest.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 GetEventCreateRuleRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetEventCreateRuleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.GetEventCreateRuleRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetEventCreateRuleRequest} message GetEventCreateRuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEventCreateRuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetEventCreateRuleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.GetEventCreateRuleRequest + * @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.GetEventCreateRuleRequest} GetEventCreateRuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEventCreateRuleRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GetEventCreateRuleRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetEventCreateRuleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.GetEventCreateRuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.GetEventCreateRuleRequest} GetEventCreateRuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEventCreateRuleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetEventCreateRuleRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.GetEventCreateRuleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetEventCreateRuleRequest.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 GetEventCreateRuleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.GetEventCreateRuleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.GetEventCreateRuleRequest} GetEventCreateRuleRequest + */ + GetEventCreateRuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.GetEventCreateRuleRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.GetEventCreateRuleRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetEventCreateRuleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.GetEventCreateRuleRequest + * @static + * @param {google.analytics.admin.v1alpha.GetEventCreateRuleRequest} message GetEventCreateRuleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetEventCreateRuleRequest.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 GetEventCreateRuleRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.GetEventCreateRuleRequest + * @instance + * @returns {Object.} JSON object + */ + GetEventCreateRuleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetEventCreateRuleRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.GetEventCreateRuleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetEventCreateRuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.GetEventCreateRuleRequest"; + }; + + return GetEventCreateRuleRequest; + })(); + + v1alpha.ListEventCreateRulesRequest = (function() { + + /** + * Properties of a ListEventCreateRulesRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IListEventCreateRulesRequest + * @property {string|null} [parent] ListEventCreateRulesRequest parent + * @property {number|null} [pageSize] ListEventCreateRulesRequest pageSize + * @property {string|null} [pageToken] ListEventCreateRulesRequest pageToken + */ + + /** + * Constructs a new ListEventCreateRulesRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListEventCreateRulesRequest. + * @implements IListEventCreateRulesRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IListEventCreateRulesRequest=} [properties] Properties to set + */ + function ListEventCreateRulesRequest(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]]; + } + + /** + * ListEventCreateRulesRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.ListEventCreateRulesRequest + * @instance + */ + ListEventCreateRulesRequest.prototype.parent = ""; + + /** + * ListEventCreateRulesRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.admin.v1alpha.ListEventCreateRulesRequest + * @instance + */ + ListEventCreateRulesRequest.prototype.pageSize = 0; + + /** + * ListEventCreateRulesRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.admin.v1alpha.ListEventCreateRulesRequest + * @instance + */ + ListEventCreateRulesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListEventCreateRulesRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListEventCreateRulesRequest + * @static + * @param {google.analytics.admin.v1alpha.IListEventCreateRulesRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListEventCreateRulesRequest} ListEventCreateRulesRequest instance + */ + ListEventCreateRulesRequest.create = function create(properties) { + return new ListEventCreateRulesRequest(properties); + }; + + /** + * Encodes the specified ListEventCreateRulesRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListEventCreateRulesRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListEventCreateRulesRequest + * @static + * @param {google.analytics.admin.v1alpha.IListEventCreateRulesRequest} message ListEventCreateRulesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEventCreateRulesRequest.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); + return writer; + }; + + /** + * Encodes the specified ListEventCreateRulesRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListEventCreateRulesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListEventCreateRulesRequest + * @static + * @param {google.analytics.admin.v1alpha.IListEventCreateRulesRequest} message ListEventCreateRulesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEventCreateRulesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEventCreateRulesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListEventCreateRulesRequest + * @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.ListEventCreateRulesRequest} ListEventCreateRulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEventCreateRulesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListEventCreateRulesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListEventCreateRulesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListEventCreateRulesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListEventCreateRulesRequest} ListEventCreateRulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEventCreateRulesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListEventCreateRulesRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListEventCreateRulesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEventCreateRulesRequest.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"; + return null; + }; + + /** + * Creates a ListEventCreateRulesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListEventCreateRulesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListEventCreateRulesRequest} ListEventCreateRulesRequest + */ + ListEventCreateRulesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListEventCreateRulesRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListEventCreateRulesRequest(); + 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); + return message; + }; + + /** + * Creates a plain object from a ListEventCreateRulesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListEventCreateRulesRequest + * @static + * @param {google.analytics.admin.v1alpha.ListEventCreateRulesRequest} message ListEventCreateRulesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEventCreateRulesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + 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; + return object; + }; + + /** + * Converts this ListEventCreateRulesRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListEventCreateRulesRequest + * @instance + * @returns {Object.} JSON object + */ + ListEventCreateRulesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListEventCreateRulesRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListEventCreateRulesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListEventCreateRulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListEventCreateRulesRequest"; + }; + + return ListEventCreateRulesRequest; + })(); + + v1alpha.ListEventCreateRulesResponse = (function() { + + /** + * Properties of a ListEventCreateRulesResponse. + * @memberof google.analytics.admin.v1alpha + * @interface IListEventCreateRulesResponse + * @property {Array.|null} [eventCreateRules] ListEventCreateRulesResponse eventCreateRules + * @property {string|null} [nextPageToken] ListEventCreateRulesResponse nextPageToken + */ + + /** + * Constructs a new ListEventCreateRulesResponse. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListEventCreateRulesResponse. + * @implements IListEventCreateRulesResponse + * @constructor + * @param {google.analytics.admin.v1alpha.IListEventCreateRulesResponse=} [properties] Properties to set + */ + function ListEventCreateRulesResponse(properties) { + this.eventCreateRules = []; + 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]]; + } + + /** + * ListEventCreateRulesResponse eventCreateRules. + * @member {Array.} eventCreateRules + * @memberof google.analytics.admin.v1alpha.ListEventCreateRulesResponse + * @instance + */ + ListEventCreateRulesResponse.prototype.eventCreateRules = $util.emptyArray; + + /** + * ListEventCreateRulesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.analytics.admin.v1alpha.ListEventCreateRulesResponse + * @instance + */ + ListEventCreateRulesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListEventCreateRulesResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListEventCreateRulesResponse + * @static + * @param {google.analytics.admin.v1alpha.IListEventCreateRulesResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListEventCreateRulesResponse} ListEventCreateRulesResponse instance + */ + ListEventCreateRulesResponse.create = function create(properties) { + return new ListEventCreateRulesResponse(properties); + }; + + /** + * Encodes the specified ListEventCreateRulesResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListEventCreateRulesResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListEventCreateRulesResponse + * @static + * @param {google.analytics.admin.v1alpha.IListEventCreateRulesResponse} message ListEventCreateRulesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEventCreateRulesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eventCreateRules != null && message.eventCreateRules.length) + for (var i = 0; i < message.eventCreateRules.length; ++i) + $root.google.analytics.admin.v1alpha.EventCreateRule.encode(message.eventCreateRules[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 ListEventCreateRulesResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListEventCreateRulesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListEventCreateRulesResponse + * @static + * @param {google.analytics.admin.v1alpha.IListEventCreateRulesResponse} message ListEventCreateRulesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEventCreateRulesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEventCreateRulesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListEventCreateRulesResponse + * @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.ListEventCreateRulesResponse} ListEventCreateRulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEventCreateRulesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListEventCreateRulesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.eventCreateRules && message.eventCreateRules.length)) + message.eventCreateRules = []; + message.eventCreateRules.push($root.google.analytics.admin.v1alpha.EventCreateRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListEventCreateRulesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListEventCreateRulesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListEventCreateRulesResponse} ListEventCreateRulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEventCreateRulesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListEventCreateRulesResponse message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListEventCreateRulesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEventCreateRulesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.eventCreateRules != null && message.hasOwnProperty("eventCreateRules")) { + if (!Array.isArray(message.eventCreateRules)) + return "eventCreateRules: array expected"; + for (var i = 0; i < message.eventCreateRules.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.EventCreateRule.verify(message.eventCreateRules[i]); + if (error) + return "eventCreateRules." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListEventCreateRulesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListEventCreateRulesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListEventCreateRulesResponse} ListEventCreateRulesResponse + */ + ListEventCreateRulesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListEventCreateRulesResponse) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListEventCreateRulesResponse(); + if (object.eventCreateRules) { + if (!Array.isArray(object.eventCreateRules)) + throw TypeError(".google.analytics.admin.v1alpha.ListEventCreateRulesResponse.eventCreateRules: array expected"); + message.eventCreateRules = []; + for (var i = 0; i < object.eventCreateRules.length; ++i) { + if (typeof object.eventCreateRules[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ListEventCreateRulesResponse.eventCreateRules: object expected"); + message.eventCreateRules[i] = $root.google.analytics.admin.v1alpha.EventCreateRule.fromObject(object.eventCreateRules[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListEventCreateRulesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListEventCreateRulesResponse + * @static + * @param {google.analytics.admin.v1alpha.ListEventCreateRulesResponse} message ListEventCreateRulesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEventCreateRulesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.eventCreateRules = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.eventCreateRules && message.eventCreateRules.length) { + object.eventCreateRules = []; + for (var j = 0; j < message.eventCreateRules.length; ++j) + object.eventCreateRules[j] = $root.google.analytics.admin.v1alpha.EventCreateRule.toObject(message.eventCreateRules[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListEventCreateRulesResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListEventCreateRulesResponse + * @instance + * @returns {Object.} JSON object + */ + ListEventCreateRulesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListEventCreateRulesResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListEventCreateRulesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListEventCreateRulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListEventCreateRulesResponse"; + }; + + return ListEventCreateRulesResponse; + })(); + + /** + * AudienceFilterScope enum. + * @name google.analytics.admin.v1alpha.AudienceFilterScope + * @enum {number} + * @property {number} AUDIENCE_FILTER_SCOPE_UNSPECIFIED=0 AUDIENCE_FILTER_SCOPE_UNSPECIFIED value + * @property {number} AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT=1 AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT value + * @property {number} AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION=2 AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION value + * @property {number} AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS=3 AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS value + */ + v1alpha.AudienceFilterScope = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AUDIENCE_FILTER_SCOPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT"] = 1; + values[valuesById[2] = "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION"] = 2; + values[valuesById[3] = "AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS"] = 3; + return values; + })(); + + v1alpha.AudienceDimensionOrMetricFilter = (function() { + + /** + * Properties of an AudienceDimensionOrMetricFilter. + * @memberof google.analytics.admin.v1alpha + * @interface IAudienceDimensionOrMetricFilter + * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter|null} [stringFilter] AudienceDimensionOrMetricFilter stringFilter + * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter|null} [inListFilter] AudienceDimensionOrMetricFilter inListFilter + * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter|null} [numericFilter] AudienceDimensionOrMetricFilter numericFilter + * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter|null} [betweenFilter] AudienceDimensionOrMetricFilter betweenFilter + * @property {string|null} [fieldName] AudienceDimensionOrMetricFilter fieldName + * @property {boolean|null} [atAnyPointInTime] AudienceDimensionOrMetricFilter atAnyPointInTime + * @property {number|null} [inAnyNDayPeriod] AudienceDimensionOrMetricFilter inAnyNDayPeriod + */ + + /** + * Constructs a new AudienceDimensionOrMetricFilter. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AudienceDimensionOrMetricFilter. + * @implements IAudienceDimensionOrMetricFilter + * @constructor + * @param {google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter=} [properties] Properties to set + */ + function AudienceDimensionOrMetricFilter(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]]; + } + + /** + * AudienceDimensionOrMetricFilter stringFilter. + * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter|null|undefined} stringFilter + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @instance + */ + AudienceDimensionOrMetricFilter.prototype.stringFilter = null; + + /** + * AudienceDimensionOrMetricFilter inListFilter. + * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter|null|undefined} inListFilter + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @instance + */ + AudienceDimensionOrMetricFilter.prototype.inListFilter = null; + + /** + * AudienceDimensionOrMetricFilter numericFilter. + * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter|null|undefined} numericFilter + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @instance + */ + AudienceDimensionOrMetricFilter.prototype.numericFilter = null; + + /** + * AudienceDimensionOrMetricFilter betweenFilter. + * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter|null|undefined} betweenFilter + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @instance + */ + AudienceDimensionOrMetricFilter.prototype.betweenFilter = null; + + /** + * AudienceDimensionOrMetricFilter fieldName. + * @member {string} fieldName + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @instance + */ + AudienceDimensionOrMetricFilter.prototype.fieldName = ""; + + /** + * AudienceDimensionOrMetricFilter atAnyPointInTime. + * @member {boolean} atAnyPointInTime + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @instance + */ + AudienceDimensionOrMetricFilter.prototype.atAnyPointInTime = false; + + /** + * AudienceDimensionOrMetricFilter inAnyNDayPeriod. + * @member {number} inAnyNDayPeriod + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @instance + */ + AudienceDimensionOrMetricFilter.prototype.inAnyNDayPeriod = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AudienceDimensionOrMetricFilter oneFilter. + * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|undefined} oneFilter + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @instance + */ + Object.defineProperty(AudienceDimensionOrMetricFilter.prototype, "oneFilter", { + get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AudienceDimensionOrMetricFilter instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @static + * @param {google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter} AudienceDimensionOrMetricFilter instance + */ + AudienceDimensionOrMetricFilter.create = function create(properties) { + return new AudienceDimensionOrMetricFilter(properties); + }; + + /** + * Encodes the specified AudienceDimensionOrMetricFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @static + * @param {google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter} message AudienceDimensionOrMetricFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceDimensionOrMetricFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); + if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) + $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.encode(message.stringFilter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) + $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.encode(message.inListFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) + $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) + $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.atAnyPointInTime != null && Object.hasOwnProperty.call(message, "atAnyPointInTime")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.atAnyPointInTime); + if (message.inAnyNDayPeriod != null && Object.hasOwnProperty.call(message, "inAnyNDayPeriod")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.inAnyNDayPeriod); + return writer; + }; + + /** + * Encodes the specified AudienceDimensionOrMetricFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @static + * @param {google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter} message AudienceDimensionOrMetricFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceDimensionOrMetricFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceDimensionOrMetricFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @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.AudienceDimensionOrMetricFilter} AudienceDimensionOrMetricFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceDimensionOrMetricFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.stringFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.decode(reader, reader.uint32()); + break; + } + case 3: { + message.inListFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.decode(reader, reader.uint32()); + break; + } + case 4: { + message.numericFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.betweenFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.decode(reader, reader.uint32()); + break; + } + case 1: { + message.fieldName = reader.string(); + break; + } + case 6: { + message.atAnyPointInTime = reader.bool(); + break; + } + case 7: { + message.inAnyNDayPeriod = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceDimensionOrMetricFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter} AudienceDimensionOrMetricFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceDimensionOrMetricFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceDimensionOrMetricFilter message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceDimensionOrMetricFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + properties.oneFilter = 1; + { + var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.verify(message.stringFilter); + if (error) + return "stringFilter." + error; + } + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.verify(message.inListFilter); + if (error) + return "inListFilter." + error; + } + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.verify(message.numericFilter); + if (error) + return "numericFilter." + error; + } + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.verify(message.betweenFilter); + if (error) + return "betweenFilter." + error; + } + } + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + if (!$util.isString(message.fieldName)) + return "fieldName: string expected"; + if (message.atAnyPointInTime != null && message.hasOwnProperty("atAnyPointInTime")) + if (typeof message.atAnyPointInTime !== "boolean") + return "atAnyPointInTime: boolean expected"; + if (message.inAnyNDayPeriod != null && message.hasOwnProperty("inAnyNDayPeriod")) + if (!$util.isInteger(message.inAnyNDayPeriod)) + return "inAnyNDayPeriod: integer expected"; + return null; + }; + + /** + * Creates an AudienceDimensionOrMetricFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter} AudienceDimensionOrMetricFilter + */ + AudienceDimensionOrMetricFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter) + return object; + var message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter(); + if (object.stringFilter != null) { + if (typeof object.stringFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.stringFilter: object expected"); + message.stringFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.fromObject(object.stringFilter); + } + if (object.inListFilter != null) { + if (typeof object.inListFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.inListFilter: object expected"); + message.inListFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.fromObject(object.inListFilter); + } + if (object.numericFilter != null) { + if (typeof object.numericFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.numericFilter: object expected"); + message.numericFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.fromObject(object.numericFilter); + } + if (object.betweenFilter != null) { + if (typeof object.betweenFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.betweenFilter: object expected"); + message.betweenFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.fromObject(object.betweenFilter); + } + if (object.fieldName != null) + message.fieldName = String(object.fieldName); + if (object.atAnyPointInTime != null) + message.atAnyPointInTime = Boolean(object.atAnyPointInTime); + if (object.inAnyNDayPeriod != null) + message.inAnyNDayPeriod = object.inAnyNDayPeriod | 0; + return message; + }; + + /** + * Creates a plain object from an AudienceDimensionOrMetricFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter} message AudienceDimensionOrMetricFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceDimensionOrMetricFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fieldName = ""; + object.atAnyPointInTime = false; + object.inAnyNDayPeriod = 0; + } + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + object.fieldName = message.fieldName; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + object.stringFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.toObject(message.stringFilter, options); + if (options.oneofs) + object.oneFilter = "stringFilter"; + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + object.inListFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.toObject(message.inListFilter, options); + if (options.oneofs) + object.oneFilter = "inListFilter"; + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + object.numericFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.toObject(message.numericFilter, options); + if (options.oneofs) + object.oneFilter = "numericFilter"; + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + object.betweenFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.toObject(message.betweenFilter, options); + if (options.oneofs) + object.oneFilter = "betweenFilter"; + } + if (message.atAnyPointInTime != null && message.hasOwnProperty("atAnyPointInTime")) + object.atAnyPointInTime = message.atAnyPointInTime; + if (message.inAnyNDayPeriod != null && message.hasOwnProperty("inAnyNDayPeriod")) + object.inAnyNDayPeriod = message.inAnyNDayPeriod; + return object; + }; + + /** + * Converts this AudienceDimensionOrMetricFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @instance + * @returns {Object.} JSON object + */ + AudienceDimensionOrMetricFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceDimensionOrMetricFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceDimensionOrMetricFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter"; + }; + + AudienceDimensionOrMetricFilter.StringFilter = (function() { + + /** + * Properties of a StringFilter. + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @interface IStringFilter + * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType|null} [matchType] StringFilter matchType + * @property {string|null} [value] StringFilter value + * @property {boolean|null} [caseSensitive] StringFilter caseSensitive + */ + + /** + * Constructs a new StringFilter. + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @classdesc Represents a StringFilter. + * @implements IStringFilter + * @constructor + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter=} [properties] Properties to set + */ + function StringFilter(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]]; + } + + /** + * StringFilter matchType. + * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType} matchType + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @instance + */ + StringFilter.prototype.matchType = 0; + + /** + * StringFilter value. + * @member {string} value + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @instance + */ + StringFilter.prototype.value = ""; + + /** + * StringFilter caseSensitive. + * @member {boolean} caseSensitive + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @instance + */ + StringFilter.prototype.caseSensitive = false; + + /** + * Creates a new StringFilter instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter} StringFilter instance + */ + StringFilter.create = function create(properties) { + return new StringFilter(properties); + }; + + /** + * Encodes the specified StringFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter} message StringFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.matchType != null && Object.hasOwnProperty.call(message, "matchType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.matchType); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.caseSensitive); + return writer; + }; + + /** + * Encodes the specified StringFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter} message StringFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StringFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @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.AudienceDimensionOrMetricFilter.StringFilter} StringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.matchType = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + case 3: { + message.caseSensitive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StringFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter} StringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StringFilter message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StringFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.matchType != null && message.hasOwnProperty("matchType")) + switch (message.matchType) { + default: + return "matchType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + if (typeof message.caseSensitive !== "boolean") + return "caseSensitive: boolean expected"; + return null; + }; + + /** + * Creates a StringFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter} StringFilter + */ + StringFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter) + return object; + var message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter(); + switch (object.matchType) { + default: + if (typeof object.matchType === "number") { + message.matchType = object.matchType; + break; + } + break; + case "MATCH_TYPE_UNSPECIFIED": + case 0: + message.matchType = 0; + break; + case "EXACT": + case 1: + message.matchType = 1; + break; + case "BEGINS_WITH": + case 2: + message.matchType = 2; + break; + case "ENDS_WITH": + case 3: + message.matchType = 3; + break; + case "CONTAINS": + case 4: + message.matchType = 4; + break; + case "FULL_REGEXP": + case 5: + message.matchType = 5; + break; + } + if (object.value != null) + message.value = String(object.value); + if (object.caseSensitive != null) + message.caseSensitive = Boolean(object.caseSensitive); + return message; + }; + + /** + * Creates a plain object from a StringFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter} message StringFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StringFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.matchType = options.enums === String ? "MATCH_TYPE_UNSPECIFIED" : 0; + object.value = ""; + object.caseSensitive = false; + } + if (message.matchType != null && message.hasOwnProperty("matchType")) + object.matchType = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType[message.matchType] === undefined ? message.matchType : $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType[message.matchType] : message.matchType; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + object.caseSensitive = message.caseSensitive; + return object; + }; + + /** + * Converts this StringFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @instance + * @returns {Object.} JSON object + */ + StringFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StringFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StringFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter"; + }; + + /** + * MatchType enum. + * @name google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType + * @enum {number} + * @property {number} MATCH_TYPE_UNSPECIFIED=0 MATCH_TYPE_UNSPECIFIED value + * @property {number} EXACT=1 EXACT value + * @property {number} BEGINS_WITH=2 BEGINS_WITH value + * @property {number} ENDS_WITH=3 ENDS_WITH value + * @property {number} CONTAINS=4 CONTAINS value + * @property {number} FULL_REGEXP=5 FULL_REGEXP value + */ + StringFilter.MatchType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MATCH_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EXACT"] = 1; + values[valuesById[2] = "BEGINS_WITH"] = 2; + values[valuesById[3] = "ENDS_WITH"] = 3; + values[valuesById[4] = "CONTAINS"] = 4; + values[valuesById[5] = "FULL_REGEXP"] = 5; + return values; + })(); + + return StringFilter; + })(); + + AudienceDimensionOrMetricFilter.InListFilter = (function() { + + /** + * Properties of an InListFilter. + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @interface IInListFilter + * @property {Array.|null} [values] InListFilter values + * @property {boolean|null} [caseSensitive] InListFilter caseSensitive + */ + + /** + * Constructs a new InListFilter. + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @classdesc Represents an InListFilter. + * @implements IInListFilter + * @constructor + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter=} [properties] Properties to set + */ + function InListFilter(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]]; + } + + /** + * InListFilter values. + * @member {Array.} values + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @instance + */ + InListFilter.prototype.values = $util.emptyArray; + + /** + * InListFilter caseSensitive. + * @member {boolean} caseSensitive + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @instance + */ + InListFilter.prototype.caseSensitive = false; + + /** + * Creates a new InListFilter instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter} InListFilter instance + */ + InListFilter.create = function create(properties) { + return new InListFilter(properties); + }; + + /** + * Encodes the specified InListFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter} message InListFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InListFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.values[i]); + if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.caseSensitive); + return writer; + }; + + /** + * Encodes the specified InListFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter} message InListFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InListFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InListFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @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.AudienceDimensionOrMetricFilter.InListFilter} InListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InListFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + } + case 2: { + message.caseSensitive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InListFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter} InListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InListFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InListFilter message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InListFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + if (typeof message.caseSensitive !== "boolean") + return "caseSensitive: boolean expected"; + return null; + }; + + /** + * Creates an InListFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter} InListFilter + */ + InListFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter) + return object; + var message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + if (object.caseSensitive != null) + message.caseSensitive = Boolean(object.caseSensitive); + return message; + }; + + /** + * Creates a plain object from an InListFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter} message InListFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InListFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (options.defaults) + object.caseSensitive = false; + 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.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + object.caseSensitive = message.caseSensitive; + return object; + }; + + /** + * Converts this InListFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @instance + * @returns {Object.} JSON object + */ + InListFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InListFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InListFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter"; + }; + + return InListFilter; + })(); + + AudienceDimensionOrMetricFilter.NumericValue = (function() { + + /** + * Properties of a NumericValue. + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @interface INumericValue + * @property {number|Long|null} [int64Value] NumericValue int64Value + * @property {number|null} [doubleValue] NumericValue doubleValue + */ + + /** + * Constructs a new NumericValue. + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @classdesc Represents a NumericValue. + * @implements INumericValue + * @constructor + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue=} [properties] Properties to set + */ + function NumericValue(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]]; + } + + /** + * NumericValue int64Value. + * @member {number|Long|null|undefined} int64Value + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @instance + */ + NumericValue.prototype.int64Value = null; + + /** + * NumericValue doubleValue. + * @member {number|null|undefined} doubleValue + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @instance + */ + NumericValue.prototype.doubleValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NumericValue oneValue. + * @member {"int64Value"|"doubleValue"|undefined} oneValue + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @instance + */ + Object.defineProperty(NumericValue.prototype, "oneValue", { + get: $util.oneOfGetter($oneOfFields = ["int64Value", "doubleValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NumericValue instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue} NumericValue instance + */ + NumericValue.create = function create(properties) { + return new NumericValue(properties); + }; + + /** + * Encodes the specified NumericValue message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue} message NumericValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.int64Value != null && Object.hasOwnProperty.call(message, "int64Value")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.int64Value); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.doubleValue); + return writer; + }; + + /** + * Encodes the specified NumericValue message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue} message NumericValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NumericValue message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @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.AudienceDimensionOrMetricFilter.NumericValue} NumericValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.int64Value = reader.int64(); + break; + } + case 2: { + message.doubleValue = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NumericValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue} NumericValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NumericValue message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NumericValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + properties.oneValue = 1; + if (!$util.isInteger(message.int64Value) && !(message.int64Value && $util.isInteger(message.int64Value.low) && $util.isInteger(message.int64Value.high))) + return "int64Value: integer|Long expected"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + if (properties.oneValue === 1) + return "oneValue: multiple values"; + properties.oneValue = 1; + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + } + return null; + }; + + /** + * Creates a NumericValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue} NumericValue + */ + NumericValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue) + return object; + var message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue(); + if (object.int64Value != null) + if ($util.Long) + (message.int64Value = $util.Long.fromValue(object.int64Value)).unsigned = false; + else if (typeof object.int64Value === "string") + message.int64Value = parseInt(object.int64Value, 10); + else if (typeof object.int64Value === "number") + message.int64Value = object.int64Value; + else if (typeof object.int64Value === "object") + message.int64Value = new $util.LongBits(object.int64Value.low >>> 0, object.int64Value.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + return message; + }; + + /** + * Creates a plain object from a NumericValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue} message NumericValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NumericValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + if (typeof message.int64Value === "number") + object.int64Value = options.longs === String ? String(message.int64Value) : message.int64Value; + else + object.int64Value = options.longs === String ? $util.Long.prototype.toString.call(message.int64Value) : options.longs === Number ? new $util.LongBits(message.int64Value.low >>> 0, message.int64Value.high >>> 0).toNumber() : message.int64Value; + if (options.oneofs) + object.oneValue = "int64Value"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (options.oneofs) + object.oneValue = "doubleValue"; + } + return object; + }; + + /** + * Converts this NumericValue to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @instance + * @returns {Object.} JSON object + */ + NumericValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NumericValue + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NumericValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue"; + }; + + return NumericValue; + })(); + + AudienceDimensionOrMetricFilter.NumericFilter = (function() { + + /** + * Properties of a NumericFilter. + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @interface INumericFilter + * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation|null} [operation] NumericFilter operation + * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null} [value] NumericFilter value + */ + + /** + * Constructs a new NumericFilter. + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @classdesc Represents a NumericFilter. + * @implements INumericFilter + * @constructor + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter=} [properties] Properties to set + */ + function NumericFilter(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]]; + } + + /** + * NumericFilter operation. + * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation} operation + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @instance + */ + NumericFilter.prototype.operation = 0; + + /** + * NumericFilter value. + * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null|undefined} value + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @instance + */ + NumericFilter.prototype.value = null; + + /** + * Creates a new NumericFilter instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter} NumericFilter instance + */ + NumericFilter.create = function create(properties) { + return new NumericFilter(properties); + }; + + /** + * Encodes the specified NumericFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter} message NumericFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.operation); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NumericFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter} message NumericFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NumericFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @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.AudienceDimensionOrMetricFilter.NumericFilter} NumericFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.operation = reader.int32(); + break; + } + case 2: { + message.value = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NumericFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter} NumericFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NumericFilter message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NumericFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operation != null && message.hasOwnProperty("operation")) + switch (message.operation) { + default: + return "operation: enum value expected"; + case 0: + case 1: + case 2: + case 4: + break; + } + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify(message.value); + if (error) + return "value." + error; + } + return null; + }; + + /** + * Creates a NumericFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter} NumericFilter + */ + NumericFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter) + return object; + var message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter(); + switch (object.operation) { + default: + if (typeof object.operation === "number") { + message.operation = object.operation; + break; + } + break; + case "OPERATION_UNSPECIFIED": + case 0: + message.operation = 0; + break; + case "EQUAL": + case 1: + message.operation = 1; + break; + case "LESS_THAN": + case 2: + message.operation = 2; + break; + case "GREATER_THAN": + case 4: + message.operation = 4; + break; + } + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.value: object expected"); + message.value = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.fromObject(object.value); + } + return message; + }; + + /** + * Creates a plain object from a NumericFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter} message NumericFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NumericFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.operation = options.enums === String ? "OPERATION_UNSPECIFIED" : 0; + object.value = null; + } + if (message.operation != null && message.hasOwnProperty("operation")) + object.operation = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation[message.operation] === undefined ? message.operation : $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation[message.operation] : message.operation; + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.toObject(message.value, options); + return object; + }; + + /** + * Converts this NumericFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @instance + * @returns {Object.} JSON object + */ + NumericFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NumericFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NumericFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter"; + }; + + /** + * Operation enum. + * @name google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation + * @enum {number} + * @property {number} OPERATION_UNSPECIFIED=0 OPERATION_UNSPECIFIED value + * @property {number} EQUAL=1 EQUAL value + * @property {number} LESS_THAN=2 LESS_THAN value + * @property {number} GREATER_THAN=4 GREATER_THAN value + */ + NumericFilter.Operation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OPERATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "EQUAL"] = 1; + values[valuesById[2] = "LESS_THAN"] = 2; + values[valuesById[4] = "GREATER_THAN"] = 4; + return values; + })(); + + return NumericFilter; + })(); + + AudienceDimensionOrMetricFilter.BetweenFilter = (function() { + + /** + * Properties of a BetweenFilter. + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @interface IBetweenFilter + * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null} [fromValue] BetweenFilter fromValue + * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null} [toValue] BetweenFilter toValue + */ + + /** + * Constructs a new BetweenFilter. + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @classdesc Represents a BetweenFilter. + * @implements IBetweenFilter + * @constructor + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter=} [properties] Properties to set + */ + function BetweenFilter(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]]; + } + + /** + * BetweenFilter fromValue. + * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null|undefined} fromValue + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @instance + */ + BetweenFilter.prototype.fromValue = null; + + /** + * BetweenFilter toValue. + * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null|undefined} toValue + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @instance + */ + BetweenFilter.prototype.toValue = null; + + /** + * Creates a new BetweenFilter instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter} BetweenFilter instance + */ + BetweenFilter.create = function create(properties) { + return new BetweenFilter(properties); + }; + + /** + * Encodes the specified BetweenFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter} message BetweenFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BetweenFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fromValue != null && Object.hasOwnProperty.call(message, "fromValue")) + $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.encode(message.fromValue, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.toValue != null && Object.hasOwnProperty.call(message, "toValue")) + $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.encode(message.toValue, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BetweenFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter} message BetweenFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BetweenFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @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.AudienceDimensionOrMetricFilter.BetweenFilter} BetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BetweenFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.fromValue = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.decode(reader, reader.uint32()); + break; + } + case 2: { + message.toValue = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter} BetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BetweenFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BetweenFilter message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BetweenFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fromValue != null && message.hasOwnProperty("fromValue")) { + var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify(message.fromValue); + if (error) + return "fromValue." + error; + } + if (message.toValue != null && message.hasOwnProperty("toValue")) { + var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify(message.toValue); + if (error) + return "toValue." + error; + } + return null; + }; + + /** + * Creates a BetweenFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter} BetweenFilter + */ + BetweenFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter) + return object; + var message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter(); + if (object.fromValue != null) { + if (typeof object.fromValue !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.fromValue: object expected"); + message.fromValue = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.fromObject(object.fromValue); + } + if (object.toValue != null) { + if (typeof object.toValue !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.toValue: object expected"); + message.toValue = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.fromObject(object.toValue); + } + return message; + }; + + /** + * Creates a plain object from a BetweenFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter} message BetweenFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BetweenFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fromValue = null; + object.toValue = null; + } + if (message.fromValue != null && message.hasOwnProperty("fromValue")) + object.fromValue = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.toObject(message.fromValue, options); + if (message.toValue != null && message.hasOwnProperty("toValue")) + object.toValue = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.toObject(message.toValue, options); + return object; + }; + + /** + * Converts this BetweenFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @instance + * @returns {Object.} JSON object + */ + BetweenFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BetweenFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BetweenFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter"; + }; + + return BetweenFilter; + })(); + + return AudienceDimensionOrMetricFilter; + })(); + + v1alpha.AudienceEventFilter = (function() { + + /** + * Properties of an AudienceEventFilter. + * @memberof google.analytics.admin.v1alpha + * @interface IAudienceEventFilter + * @property {string|null} [eventName] AudienceEventFilter eventName + * @property {google.analytics.admin.v1alpha.IAudienceFilterExpression|null} [eventParameterFilterExpression] AudienceEventFilter eventParameterFilterExpression + */ + + /** + * Constructs a new AudienceEventFilter. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AudienceEventFilter. + * @implements IAudienceEventFilter + * @constructor + * @param {google.analytics.admin.v1alpha.IAudienceEventFilter=} [properties] Properties to set + */ + function AudienceEventFilter(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]]; + } + + /** + * AudienceEventFilter eventName. + * @member {string} eventName + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * @instance + */ + AudienceEventFilter.prototype.eventName = ""; + + /** + * AudienceEventFilter eventParameterFilterExpression. + * @member {google.analytics.admin.v1alpha.IAudienceFilterExpression|null|undefined} eventParameterFilterExpression + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * @instance + */ + AudienceEventFilter.prototype.eventParameterFilterExpression = null; + + /** + * Creates a new AudienceEventFilter instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * @static + * @param {google.analytics.admin.v1alpha.IAudienceEventFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceEventFilter} AudienceEventFilter instance + */ + AudienceEventFilter.create = function create(properties) { + return new AudienceEventFilter(properties); + }; + + /** + * Encodes the specified AudienceEventFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * @static + * @param {google.analytics.admin.v1alpha.IAudienceEventFilter} message AudienceEventFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceEventFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eventName != null && Object.hasOwnProperty.call(message, "eventName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventName); + if (message.eventParameterFilterExpression != null && Object.hasOwnProperty.call(message, "eventParameterFilterExpression")) + $root.google.analytics.admin.v1alpha.AudienceFilterExpression.encode(message.eventParameterFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AudienceEventFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * @static + * @param {google.analytics.admin.v1alpha.IAudienceEventFilter} message AudienceEventFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceEventFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceEventFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * @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.AudienceEventFilter} AudienceEventFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceEventFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceEventFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.eventName = reader.string(); + break; + } + case 2: { + message.eventParameterFilterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceEventFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AudienceEventFilter} AudienceEventFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceEventFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceEventFilter message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceEventFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.eventName != null && message.hasOwnProperty("eventName")) + if (!$util.isString(message.eventName)) + return "eventName: string expected"; + if (message.eventParameterFilterExpression != null && message.hasOwnProperty("eventParameterFilterExpression")) { + var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.verify(message.eventParameterFilterExpression); + if (error) + return "eventParameterFilterExpression." + error; + } + return null; + }; + + /** + * Creates an AudienceEventFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AudienceEventFilter} AudienceEventFilter + */ + AudienceEventFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceEventFilter) + return object; + var message = new $root.google.analytics.admin.v1alpha.AudienceEventFilter(); + if (object.eventName != null) + message.eventName = String(object.eventName); + if (object.eventParameterFilterExpression != null) { + if (typeof object.eventParameterFilterExpression !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceEventFilter.eventParameterFilterExpression: object expected"); + message.eventParameterFilterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.fromObject(object.eventParameterFilterExpression); + } + return message; + }; + + /** + * Creates a plain object from an AudienceEventFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceEventFilter} message AudienceEventFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceEventFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.eventName = ""; + object.eventParameterFilterExpression = null; + } + if (message.eventName != null && message.hasOwnProperty("eventName")) + object.eventName = message.eventName; + if (message.eventParameterFilterExpression != null && message.hasOwnProperty("eventParameterFilterExpression")) + object.eventParameterFilterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.toObject(message.eventParameterFilterExpression, options); + return object; + }; + + /** + * Converts this AudienceEventFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * @instance + * @returns {Object.} JSON object + */ + AudienceEventFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceEventFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceEventFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceEventFilter"; + }; + + return AudienceEventFilter; + })(); + + v1alpha.AudienceFilterExpression = (function() { + + /** + * Properties of an AudienceFilterExpression. + * @memberof google.analytics.admin.v1alpha + * @interface IAudienceFilterExpression + * @property {google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null} [andGroup] AudienceFilterExpression andGroup + * @property {google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null} [orGroup] AudienceFilterExpression orGroup + * @property {google.analytics.admin.v1alpha.IAudienceFilterExpression|null} [notExpression] AudienceFilterExpression notExpression + * @property {google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter|null} [dimensionOrMetricFilter] AudienceFilterExpression dimensionOrMetricFilter + * @property {google.analytics.admin.v1alpha.IAudienceEventFilter|null} [eventFilter] AudienceFilterExpression eventFilter + */ + + /** + * Constructs a new AudienceFilterExpression. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AudienceFilterExpression. + * @implements IAudienceFilterExpression + * @constructor + * @param {google.analytics.admin.v1alpha.IAudienceFilterExpression=} [properties] Properties to set + */ + function AudienceFilterExpression(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]]; + } + + /** + * AudienceFilterExpression andGroup. + * @member {google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null|undefined} andGroup + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @instance + */ + AudienceFilterExpression.prototype.andGroup = null; + + /** + * AudienceFilterExpression orGroup. + * @member {google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null|undefined} orGroup + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @instance + */ + AudienceFilterExpression.prototype.orGroup = null; + + /** + * AudienceFilterExpression notExpression. + * @member {google.analytics.admin.v1alpha.IAudienceFilterExpression|null|undefined} notExpression + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @instance + */ + AudienceFilterExpression.prototype.notExpression = null; + + /** + * AudienceFilterExpression dimensionOrMetricFilter. + * @member {google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter|null|undefined} dimensionOrMetricFilter + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @instance + */ + AudienceFilterExpression.prototype.dimensionOrMetricFilter = null; + + /** + * AudienceFilterExpression eventFilter. + * @member {google.analytics.admin.v1alpha.IAudienceEventFilter|null|undefined} eventFilter + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @instance + */ + AudienceFilterExpression.prototype.eventFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AudienceFilterExpression expr. + * @member {"andGroup"|"orGroup"|"notExpression"|"dimensionOrMetricFilter"|"eventFilter"|undefined} expr + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @instance + */ + Object.defineProperty(AudienceFilterExpression.prototype, "expr", { + get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "dimensionOrMetricFilter", "eventFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AudienceFilterExpression instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @static + * @param {google.analytics.admin.v1alpha.IAudienceFilterExpression=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceFilterExpression} AudienceFilterExpression instance + */ + AudienceFilterExpression.create = function create(properties) { + return new AudienceFilterExpression(properties); + }; + + /** + * Encodes the specified AudienceFilterExpression message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @static + * @param {google.analytics.admin.v1alpha.IAudienceFilterExpression} message AudienceFilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceFilterExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) + $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) + $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) + $root.google.analytics.admin.v1alpha.AudienceFilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.dimensionOrMetricFilter != null && Object.hasOwnProperty.call(message, "dimensionOrMetricFilter")) + $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.encode(message.dimensionOrMetricFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.eventFilter != null && Object.hasOwnProperty.call(message, "eventFilter")) + $root.google.analytics.admin.v1alpha.AudienceEventFilter.encode(message.eventFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AudienceFilterExpression message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @static + * @param {google.analytics.admin.v1alpha.IAudienceFilterExpression} message AudienceFilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceFilterExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceFilterExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @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.AudienceFilterExpression} AudienceFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceFilterExpression.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceFilterExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.andGroup = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 2: { + message.orGroup = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 3: { + message.notExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.decode(reader, reader.uint32()); + break; + } + case 4: { + message.dimensionOrMetricFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.eventFilter = $root.google.analytics.admin.v1alpha.AudienceEventFilter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceFilterExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AudienceFilterExpression} AudienceFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceFilterExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceFilterExpression message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceFilterExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + properties.expr = 1; + { + var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.verify(message.andGroup); + if (error) + return "andGroup." + error; + } + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.verify(message.orGroup); + if (error) + return "orGroup." + error; + } + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.verify(message.notExpression); + if (error) + return "notExpression." + error; + } + } + if (message.dimensionOrMetricFilter != null && message.hasOwnProperty("dimensionOrMetricFilter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.verify(message.dimensionOrMetricFilter); + if (error) + return "dimensionOrMetricFilter." + error; + } + } + if (message.eventFilter != null && message.hasOwnProperty("eventFilter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.admin.v1alpha.AudienceEventFilter.verify(message.eventFilter); + if (error) + return "eventFilter." + error; + } + } + return null; + }; + + /** + * Creates an AudienceFilterExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AudienceFilterExpression} AudienceFilterExpression + */ + AudienceFilterExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceFilterExpression) + return object; + var message = new $root.google.analytics.admin.v1alpha.AudienceFilterExpression(); + if (object.andGroup != null) { + if (typeof object.andGroup !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpression.andGroup: object expected"); + message.andGroup = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.fromObject(object.andGroup); + } + if (object.orGroup != null) { + if (typeof object.orGroup !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpression.orGroup: object expected"); + message.orGroup = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.fromObject(object.orGroup); + } + if (object.notExpression != null) { + if (typeof object.notExpression !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpression.notExpression: object expected"); + message.notExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.fromObject(object.notExpression); + } + if (object.dimensionOrMetricFilter != null) { + if (typeof object.dimensionOrMetricFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpression.dimensionOrMetricFilter: object expected"); + message.dimensionOrMetricFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.fromObject(object.dimensionOrMetricFilter); + } + if (object.eventFilter != null) { + if (typeof object.eventFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpression.eventFilter: object expected"); + message.eventFilter = $root.google.analytics.admin.v1alpha.AudienceEventFilter.fromObject(object.eventFilter); + } + return message; + }; + + /** + * Creates a plain object from an AudienceFilterExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @static + * @param {google.analytics.admin.v1alpha.AudienceFilterExpression} message AudienceFilterExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceFilterExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + object.andGroup = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.toObject(message.andGroup, options); + if (options.oneofs) + object.expr = "andGroup"; + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + object.orGroup = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.toObject(message.orGroup, options); + if (options.oneofs) + object.expr = "orGroup"; + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + object.notExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.toObject(message.notExpression, options); + if (options.oneofs) + object.expr = "notExpression"; + } + if (message.dimensionOrMetricFilter != null && message.hasOwnProperty("dimensionOrMetricFilter")) { + object.dimensionOrMetricFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.toObject(message.dimensionOrMetricFilter, options); + if (options.oneofs) + object.expr = "dimensionOrMetricFilter"; + } + if (message.eventFilter != null && message.hasOwnProperty("eventFilter")) { + object.eventFilter = $root.google.analytics.admin.v1alpha.AudienceEventFilter.toObject(message.eventFilter, options); + if (options.oneofs) + object.expr = "eventFilter"; + } + return object; + }; + + /** + * Converts this AudienceFilterExpression to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @instance + * @returns {Object.} JSON object + */ + AudienceFilterExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceFilterExpression + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceFilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceFilterExpression"; + }; + + return AudienceFilterExpression; + })(); + + v1alpha.AudienceFilterExpressionList = (function() { + + /** + * Properties of an AudienceFilterExpressionList. + * @memberof google.analytics.admin.v1alpha + * @interface IAudienceFilterExpressionList + * @property {Array.|null} [filterExpressions] AudienceFilterExpressionList filterExpressions + */ + + /** + * Constructs a new AudienceFilterExpressionList. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AudienceFilterExpressionList. + * @implements IAudienceFilterExpressionList + * @constructor + * @param {google.analytics.admin.v1alpha.IAudienceFilterExpressionList=} [properties] Properties to set + */ + function AudienceFilterExpressionList(properties) { + this.filterExpressions = []; + 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]]; + } + + /** + * AudienceFilterExpressionList filterExpressions. + * @member {Array.} filterExpressions + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @instance + */ + AudienceFilterExpressionList.prototype.filterExpressions = $util.emptyArray; + + /** + * Creates a new AudienceFilterExpressionList instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @static + * @param {google.analytics.admin.v1alpha.IAudienceFilterExpressionList=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceFilterExpressionList} AudienceFilterExpressionList instance + */ + AudienceFilterExpressionList.create = function create(properties) { + return new AudienceFilterExpressionList(properties); + }; + + /** + * Encodes the specified AudienceFilterExpressionList message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpressionList.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @static + * @param {google.analytics.admin.v1alpha.IAudienceFilterExpressionList} message AudienceFilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceFilterExpressionList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filterExpressions != null && message.filterExpressions.length) + for (var i = 0; i < message.filterExpressions.length; ++i) + $root.google.analytics.admin.v1alpha.AudienceFilterExpression.encode(message.filterExpressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AudienceFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpressionList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @static + * @param {google.analytics.admin.v1alpha.IAudienceFilterExpressionList} message AudienceFilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceFilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceFilterExpressionList message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @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.AudienceFilterExpressionList} AudienceFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceFilterExpressionList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.filterExpressions && message.filterExpressions.length)) + message.filterExpressions = []; + message.filterExpressions.push($root.google.analytics.admin.v1alpha.AudienceFilterExpression.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceFilterExpressionList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AudienceFilterExpressionList} AudienceFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceFilterExpressionList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceFilterExpressionList message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceFilterExpressionList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.filterExpressions != null && message.hasOwnProperty("filterExpressions")) { + if (!Array.isArray(message.filterExpressions)) + return "filterExpressions: array expected"; + for (var i = 0; i < message.filterExpressions.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.verify(message.filterExpressions[i]); + if (error) + return "filterExpressions." + error; + } + } + return null; + }; + + /** + * Creates an AudienceFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AudienceFilterExpressionList} AudienceFilterExpressionList + */ + AudienceFilterExpressionList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList) + return object; + var message = new $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList(); + if (object.filterExpressions) { + if (!Array.isArray(object.filterExpressions)) + throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpressionList.filterExpressions: array expected"); + message.filterExpressions = []; + for (var i = 0; i < object.filterExpressions.length; ++i) { + if (typeof object.filterExpressions[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpressionList.filterExpressions: object expected"); + message.filterExpressions[i] = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.fromObject(object.filterExpressions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AudienceFilterExpressionList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @static + * @param {google.analytics.admin.v1alpha.AudienceFilterExpressionList} message AudienceFilterExpressionList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceFilterExpressionList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.filterExpressions = []; + if (message.filterExpressions && message.filterExpressions.length) { + object.filterExpressions = []; + for (var j = 0; j < message.filterExpressions.length; ++j) + object.filterExpressions[j] = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.toObject(message.filterExpressions[j], options); + } + return object; + }; + + /** + * Converts this AudienceFilterExpressionList to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @instance + * @returns {Object.} JSON object + */ + AudienceFilterExpressionList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceFilterExpressionList + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceFilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceFilterExpressionList"; + }; + + return AudienceFilterExpressionList; + })(); + + v1alpha.AudienceSimpleFilter = (function() { + + /** + * Properties of an AudienceSimpleFilter. + * @memberof google.analytics.admin.v1alpha + * @interface IAudienceSimpleFilter + * @property {google.analytics.admin.v1alpha.AudienceFilterScope|null} [scope] AudienceSimpleFilter scope + * @property {google.analytics.admin.v1alpha.IAudienceFilterExpression|null} [filterExpression] AudienceSimpleFilter filterExpression + */ + + /** + * Constructs a new AudienceSimpleFilter. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AudienceSimpleFilter. + * @implements IAudienceSimpleFilter + * @constructor + * @param {google.analytics.admin.v1alpha.IAudienceSimpleFilter=} [properties] Properties to set + */ + function AudienceSimpleFilter(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]]; + } + + /** + * AudienceSimpleFilter scope. + * @member {google.analytics.admin.v1alpha.AudienceFilterScope} scope + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @instance + */ + AudienceSimpleFilter.prototype.scope = 0; + + /** + * AudienceSimpleFilter filterExpression. + * @member {google.analytics.admin.v1alpha.IAudienceFilterExpression|null|undefined} filterExpression + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @instance + */ + AudienceSimpleFilter.prototype.filterExpression = null; + + /** + * Creates a new AudienceSimpleFilter instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @static + * @param {google.analytics.admin.v1alpha.IAudienceSimpleFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceSimpleFilter} AudienceSimpleFilter instance + */ + AudienceSimpleFilter.create = function create(properties) { + return new AudienceSimpleFilter(properties); + }; + + /** + * Encodes the specified AudienceSimpleFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSimpleFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @static + * @param {google.analytics.admin.v1alpha.IAudienceSimpleFilter} message AudienceSimpleFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceSimpleFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.scope); + if (message.filterExpression != null && Object.hasOwnProperty.call(message, "filterExpression")) + $root.google.analytics.admin.v1alpha.AudienceFilterExpression.encode(message.filterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AudienceSimpleFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSimpleFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @static + * @param {google.analytics.admin.v1alpha.IAudienceSimpleFilter} message AudienceSimpleFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceSimpleFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceSimpleFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @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.AudienceSimpleFilter} AudienceSimpleFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceSimpleFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceSimpleFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.scope = reader.int32(); + break; + } + case 2: { + message.filterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceSimpleFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AudienceSimpleFilter} AudienceSimpleFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceSimpleFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceSimpleFilter message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceSimpleFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.scope != null && message.hasOwnProperty("scope")) + switch (message.scope) { + default: + return "scope: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.filterExpression != null && message.hasOwnProperty("filterExpression")) { + var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.verify(message.filterExpression); + if (error) + return "filterExpression." + error; + } + return null; + }; + + /** + * Creates an AudienceSimpleFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AudienceSimpleFilter} AudienceSimpleFilter + */ + AudienceSimpleFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceSimpleFilter) + return object; + var message = new $root.google.analytics.admin.v1alpha.AudienceSimpleFilter(); + switch (object.scope) { + default: + if (typeof object.scope === "number") { + message.scope = object.scope; + break; + } + break; + case "AUDIENCE_FILTER_SCOPE_UNSPECIFIED": + case 0: + message.scope = 0; + break; + case "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT": + case 1: + message.scope = 1; + break; + case "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION": + case 2: + message.scope = 2; + break; + case "AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS": + case 3: + message.scope = 3; + break; + } + if (object.filterExpression != null) { + if (typeof object.filterExpression !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceSimpleFilter.filterExpression: object expected"); + message.filterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.fromObject(object.filterExpression); + } + return message; + }; + + /** + * Creates a plain object from an AudienceSimpleFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceSimpleFilter} message AudienceSimpleFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceSimpleFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.scope = options.enums === String ? "AUDIENCE_FILTER_SCOPE_UNSPECIFIED" : 0; + object.filterExpression = null; + } + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] === undefined ? message.scope : $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] : message.scope; + if (message.filterExpression != null && message.hasOwnProperty("filterExpression")) + object.filterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.toObject(message.filterExpression, options); + return object; + }; + + /** + * Converts this AudienceSimpleFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @instance + * @returns {Object.} JSON object + */ + AudienceSimpleFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceSimpleFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceSimpleFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceSimpleFilter"; + }; + + return AudienceSimpleFilter; + })(); + + v1alpha.AudienceSequenceFilter = (function() { + + /** + * Properties of an AudienceSequenceFilter. + * @memberof google.analytics.admin.v1alpha + * @interface IAudienceSequenceFilter + * @property {google.analytics.admin.v1alpha.AudienceFilterScope|null} [scope] AudienceSequenceFilter scope + * @property {google.protobuf.IDuration|null} [sequenceMaximumDuration] AudienceSequenceFilter sequenceMaximumDuration + * @property {Array.|null} [sequenceSteps] AudienceSequenceFilter sequenceSteps + */ + + /** + * Constructs a new AudienceSequenceFilter. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AudienceSequenceFilter. + * @implements IAudienceSequenceFilter + * @constructor + * @param {google.analytics.admin.v1alpha.IAudienceSequenceFilter=} [properties] Properties to set + */ + function AudienceSequenceFilter(properties) { + this.sequenceSteps = []; + 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]]; + } + + /** + * AudienceSequenceFilter scope. + * @member {google.analytics.admin.v1alpha.AudienceFilterScope} scope + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @instance + */ + AudienceSequenceFilter.prototype.scope = 0; + + /** + * AudienceSequenceFilter sequenceMaximumDuration. + * @member {google.protobuf.IDuration|null|undefined} sequenceMaximumDuration + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @instance + */ + AudienceSequenceFilter.prototype.sequenceMaximumDuration = null; + + /** + * AudienceSequenceFilter sequenceSteps. + * @member {Array.} sequenceSteps + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @instance + */ + AudienceSequenceFilter.prototype.sequenceSteps = $util.emptyArray; + + /** + * Creates a new AudienceSequenceFilter instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @static + * @param {google.analytics.admin.v1alpha.IAudienceSequenceFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter} AudienceSequenceFilter instance + */ + AudienceSequenceFilter.create = function create(properties) { + return new AudienceSequenceFilter(properties); + }; + + /** + * Encodes the specified AudienceSequenceFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @static + * @param {google.analytics.admin.v1alpha.IAudienceSequenceFilter} message AudienceSequenceFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceSequenceFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.scope); + if (message.sequenceMaximumDuration != null && Object.hasOwnProperty.call(message, "sequenceMaximumDuration")) + $root.google.protobuf.Duration.encode(message.sequenceMaximumDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sequenceSteps != null && message.sequenceSteps.length) + for (var i = 0; i < message.sequenceSteps.length; ++i) + $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.encode(message.sequenceSteps[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AudienceSequenceFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @static + * @param {google.analytics.admin.v1alpha.IAudienceSequenceFilter} message AudienceSequenceFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceSequenceFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceSequenceFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @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.AudienceSequenceFilter} AudienceSequenceFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceSequenceFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceSequenceFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.scope = reader.int32(); + break; + } + case 2: { + message.sequenceMaximumDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.sequenceSteps && message.sequenceSteps.length)) + message.sequenceSteps = []; + message.sequenceSteps.push($root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceSequenceFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter} AudienceSequenceFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceSequenceFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceSequenceFilter message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceSequenceFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.scope != null && message.hasOwnProperty("scope")) + switch (message.scope) { + default: + return "scope: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.sequenceMaximumDuration != null && message.hasOwnProperty("sequenceMaximumDuration")) { + var error = $root.google.protobuf.Duration.verify(message.sequenceMaximumDuration); + if (error) + return "sequenceMaximumDuration." + error; + } + if (message.sequenceSteps != null && message.hasOwnProperty("sequenceSteps")) { + if (!Array.isArray(message.sequenceSteps)) + return "sequenceSteps: array expected"; + for (var i = 0; i < message.sequenceSteps.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.verify(message.sequenceSteps[i]); + if (error) + return "sequenceSteps." + error; + } + } + return null; + }; + + /** + * Creates an AudienceSequenceFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter} AudienceSequenceFilter + */ + AudienceSequenceFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceSequenceFilter) + return object; + var message = new $root.google.analytics.admin.v1alpha.AudienceSequenceFilter(); + switch (object.scope) { + default: + if (typeof object.scope === "number") { + message.scope = object.scope; + break; + } + break; + case "AUDIENCE_FILTER_SCOPE_UNSPECIFIED": + case 0: + message.scope = 0; + break; + case "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT": + case 1: + message.scope = 1; + break; + case "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION": + case 2: + message.scope = 2; + break; + case "AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS": + case 3: + message.scope = 3; + break; + } + if (object.sequenceMaximumDuration != null) { + if (typeof object.sequenceMaximumDuration !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceSequenceFilter.sequenceMaximumDuration: object expected"); + message.sequenceMaximumDuration = $root.google.protobuf.Duration.fromObject(object.sequenceMaximumDuration); + } + if (object.sequenceSteps) { + if (!Array.isArray(object.sequenceSteps)) + throw TypeError(".google.analytics.admin.v1alpha.AudienceSequenceFilter.sequenceSteps: array expected"); + message.sequenceSteps = []; + for (var i = 0; i < object.sequenceSteps.length; ++i) { + if (typeof object.sequenceSteps[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceSequenceFilter.sequenceSteps: object expected"); + message.sequenceSteps[i] = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.fromObject(object.sequenceSteps[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AudienceSequenceFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceSequenceFilter} message AudienceSequenceFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceSequenceFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.sequenceSteps = []; + if (options.defaults) { + object.scope = options.enums === String ? "AUDIENCE_FILTER_SCOPE_UNSPECIFIED" : 0; + object.sequenceMaximumDuration = null; + } + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] === undefined ? message.scope : $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] : message.scope; + if (message.sequenceMaximumDuration != null && message.hasOwnProperty("sequenceMaximumDuration")) + object.sequenceMaximumDuration = $root.google.protobuf.Duration.toObject(message.sequenceMaximumDuration, options); + if (message.sequenceSteps && message.sequenceSteps.length) { + object.sequenceSteps = []; + for (var j = 0; j < message.sequenceSteps.length; ++j) + object.sequenceSteps[j] = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.toObject(message.sequenceSteps[j], options); + } + return object; + }; + + /** + * Converts this AudienceSequenceFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @instance + * @returns {Object.} JSON object + */ + AudienceSequenceFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceSequenceFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceSequenceFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceSequenceFilter"; + }; + + AudienceSequenceFilter.AudienceSequenceStep = (function() { + + /** + * Properties of an AudienceSequenceStep. + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @interface IAudienceSequenceStep + * @property {google.analytics.admin.v1alpha.AudienceFilterScope|null} [scope] AudienceSequenceStep scope + * @property {boolean|null} [immediatelyFollows] AudienceSequenceStep immediatelyFollows + * @property {google.protobuf.IDuration|null} [constraintDuration] AudienceSequenceStep constraintDuration + * @property {google.analytics.admin.v1alpha.IAudienceFilterExpression|null} [filterExpression] AudienceSequenceStep filterExpression + */ + + /** + * Constructs a new AudienceSequenceStep. + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @classdesc Represents an AudienceSequenceStep. + * @implements IAudienceSequenceStep + * @constructor + * @param {google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep=} [properties] Properties to set + */ + function AudienceSequenceStep(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]]; + } + + /** + * AudienceSequenceStep scope. + * @member {google.analytics.admin.v1alpha.AudienceFilterScope} scope + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep + * @instance + */ + AudienceSequenceStep.prototype.scope = 0; + + /** + * AudienceSequenceStep immediatelyFollows. + * @member {boolean} immediatelyFollows + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep + * @instance + */ + AudienceSequenceStep.prototype.immediatelyFollows = false; + + /** + * AudienceSequenceStep constraintDuration. + * @member {google.protobuf.IDuration|null|undefined} constraintDuration + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep + * @instance + */ + AudienceSequenceStep.prototype.constraintDuration = null; + + /** + * AudienceSequenceStep filterExpression. + * @member {google.analytics.admin.v1alpha.IAudienceFilterExpression|null|undefined} filterExpression + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep + * @instance + */ + AudienceSequenceStep.prototype.filterExpression = null; + + /** + * Creates a new AudienceSequenceStep instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep + * @static + * @param {google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep} AudienceSequenceStep instance + */ + AudienceSequenceStep.create = function create(properties) { + return new AudienceSequenceStep(properties); + }; + + /** + * Encodes the specified AudienceSequenceStep message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep + * @static + * @param {google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep} message AudienceSequenceStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceSequenceStep.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.scope); + if (message.immediatelyFollows != null && Object.hasOwnProperty.call(message, "immediatelyFollows")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.immediatelyFollows); + if (message.constraintDuration != null && Object.hasOwnProperty.call(message, "constraintDuration")) + $root.google.protobuf.Duration.encode(message.constraintDuration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.filterExpression != null && Object.hasOwnProperty.call(message, "filterExpression")) + $root.google.analytics.admin.v1alpha.AudienceFilterExpression.encode(message.filterExpression, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AudienceSequenceStep message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep + * @static + * @param {google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep} message AudienceSequenceStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceSequenceStep.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceSequenceStep message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep + * @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.AudienceSequenceFilter.AudienceSequenceStep} AudienceSequenceStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceSequenceStep.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push(reader.string()); + message.scope = reader.int32(); break; } case 2: { - message.caseSensitive = reader.bool(); + message.immediatelyFollows = reader.bool(); + break; + } + case 3: { + message.constraintDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.filterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.decode(reader, reader.uint32()); break; } default: @@ -42623,408 +49856,1502 @@ break; } } - return message; - }; + return message; + }; + + /** + * Decodes an AudienceSequenceStep message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep} AudienceSequenceStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceSequenceStep.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceSequenceStep message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceSequenceStep.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.scope != null && message.hasOwnProperty("scope")) + switch (message.scope) { + default: + return "scope: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.immediatelyFollows != null && message.hasOwnProperty("immediatelyFollows")) + if (typeof message.immediatelyFollows !== "boolean") + return "immediatelyFollows: boolean expected"; + if (message.constraintDuration != null && message.hasOwnProperty("constraintDuration")) { + var error = $root.google.protobuf.Duration.verify(message.constraintDuration); + if (error) + return "constraintDuration." + error; + } + if (message.filterExpression != null && message.hasOwnProperty("filterExpression")) { + var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.verify(message.filterExpression); + if (error) + return "filterExpression." + error; + } + return null; + }; + + /** + * Creates an AudienceSequenceStep message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep} AudienceSequenceStep + */ + AudienceSequenceStep.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep) + return object; + var message = new $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep(); + switch (object.scope) { + default: + if (typeof object.scope === "number") { + message.scope = object.scope; + break; + } + break; + case "AUDIENCE_FILTER_SCOPE_UNSPECIFIED": + case 0: + message.scope = 0; + break; + case "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT": + case 1: + message.scope = 1; + break; + case "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION": + case 2: + message.scope = 2; + break; + case "AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS": + case 3: + message.scope = 3; + break; + } + if (object.immediatelyFollows != null) + message.immediatelyFollows = Boolean(object.immediatelyFollows); + if (object.constraintDuration != null) { + if (typeof object.constraintDuration !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.constraintDuration: object expected"); + message.constraintDuration = $root.google.protobuf.Duration.fromObject(object.constraintDuration); + } + if (object.filterExpression != null) { + if (typeof object.filterExpression !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.filterExpression: object expected"); + message.filterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.fromObject(object.filterExpression); + } + return message; + }; + + /** + * Creates a plain object from an AudienceSequenceStep message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep + * @static + * @param {google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep} message AudienceSequenceStep + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceSequenceStep.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.scope = options.enums === String ? "AUDIENCE_FILTER_SCOPE_UNSPECIFIED" : 0; + object.immediatelyFollows = false; + object.constraintDuration = null; + object.filterExpression = null; + } + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] === undefined ? message.scope : $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] : message.scope; + if (message.immediatelyFollows != null && message.hasOwnProperty("immediatelyFollows")) + object.immediatelyFollows = message.immediatelyFollows; + if (message.constraintDuration != null && message.hasOwnProperty("constraintDuration")) + object.constraintDuration = $root.google.protobuf.Duration.toObject(message.constraintDuration, options); + if (message.filterExpression != null && message.hasOwnProperty("filterExpression")) + object.filterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.toObject(message.filterExpression, options); + return object; + }; + + /** + * Converts this AudienceSequenceStep to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep + * @instance + * @returns {Object.} JSON object + */ + AudienceSequenceStep.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceSequenceStep + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceSequenceStep.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep"; + }; + + return AudienceSequenceStep; + })(); + + return AudienceSequenceFilter; + })(); + + v1alpha.AudienceFilterClause = (function() { + + /** + * Properties of an AudienceFilterClause. + * @memberof google.analytics.admin.v1alpha + * @interface IAudienceFilterClause + * @property {google.analytics.admin.v1alpha.IAudienceSimpleFilter|null} [simpleFilter] AudienceFilterClause simpleFilter + * @property {google.analytics.admin.v1alpha.IAudienceSequenceFilter|null} [sequenceFilter] AudienceFilterClause sequenceFilter + * @property {google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType|null} [clauseType] AudienceFilterClause clauseType + */ + + /** + * Constructs a new AudienceFilterClause. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AudienceFilterClause. + * @implements IAudienceFilterClause + * @constructor + * @param {google.analytics.admin.v1alpha.IAudienceFilterClause=} [properties] Properties to set + */ + function AudienceFilterClause(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]]; + } + + /** + * AudienceFilterClause simpleFilter. + * @member {google.analytics.admin.v1alpha.IAudienceSimpleFilter|null|undefined} simpleFilter + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @instance + */ + AudienceFilterClause.prototype.simpleFilter = null; + + /** + * AudienceFilterClause sequenceFilter. + * @member {google.analytics.admin.v1alpha.IAudienceSequenceFilter|null|undefined} sequenceFilter + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @instance + */ + AudienceFilterClause.prototype.sequenceFilter = null; + + /** + * AudienceFilterClause clauseType. + * @member {google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType} clauseType + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @instance + */ + AudienceFilterClause.prototype.clauseType = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AudienceFilterClause filter. + * @member {"simpleFilter"|"sequenceFilter"|undefined} filter + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @instance + */ + Object.defineProperty(AudienceFilterClause.prototype, "filter", { + get: $util.oneOfGetter($oneOfFields = ["simpleFilter", "sequenceFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AudienceFilterClause instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @static + * @param {google.analytics.admin.v1alpha.IAudienceFilterClause=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceFilterClause} AudienceFilterClause instance + */ + AudienceFilterClause.create = function create(properties) { + return new AudienceFilterClause(properties); + }; + + /** + * Encodes the specified AudienceFilterClause message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterClause.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @static + * @param {google.analytics.admin.v1alpha.IAudienceFilterClause} message AudienceFilterClause message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceFilterClause.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clauseType != null && Object.hasOwnProperty.call(message, "clauseType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.clauseType); + if (message.simpleFilter != null && Object.hasOwnProperty.call(message, "simpleFilter")) + $root.google.analytics.admin.v1alpha.AudienceSimpleFilter.encode(message.simpleFilter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sequenceFilter != null && Object.hasOwnProperty.call(message, "sequenceFilter")) + $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.encode(message.sequenceFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AudienceFilterClause message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterClause.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @static + * @param {google.analytics.admin.v1alpha.IAudienceFilterClause} message AudienceFilterClause message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceFilterClause.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceFilterClause message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @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.AudienceFilterClause} AudienceFilterClause + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceFilterClause.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceFilterClause(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.simpleFilter = $root.google.analytics.admin.v1alpha.AudienceSimpleFilter.decode(reader, reader.uint32()); + break; + } + case 3: { + message.sequenceFilter = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.decode(reader, reader.uint32()); + break; + } + case 1: { + message.clauseType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceFilterClause message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AudienceFilterClause} AudienceFilterClause + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceFilterClause.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceFilterClause message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceFilterClause.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.simpleFilter != null && message.hasOwnProperty("simpleFilter")) { + properties.filter = 1; + { + var error = $root.google.analytics.admin.v1alpha.AudienceSimpleFilter.verify(message.simpleFilter); + if (error) + return "simpleFilter." + error; + } + } + if (message.sequenceFilter != null && message.hasOwnProperty("sequenceFilter")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.verify(message.sequenceFilter); + if (error) + return "sequenceFilter." + error; + } + } + if (message.clauseType != null && message.hasOwnProperty("clauseType")) + switch (message.clauseType) { + default: + return "clauseType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an AudienceFilterClause message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AudienceFilterClause} AudienceFilterClause + */ + AudienceFilterClause.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceFilterClause) + return object; + var message = new $root.google.analytics.admin.v1alpha.AudienceFilterClause(); + if (object.simpleFilter != null) { + if (typeof object.simpleFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterClause.simpleFilter: object expected"); + message.simpleFilter = $root.google.analytics.admin.v1alpha.AudienceSimpleFilter.fromObject(object.simpleFilter); + } + if (object.sequenceFilter != null) { + if (typeof object.sequenceFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterClause.sequenceFilter: object expected"); + message.sequenceFilter = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.fromObject(object.sequenceFilter); + } + switch (object.clauseType) { + default: + if (typeof object.clauseType === "number") { + message.clauseType = object.clauseType; + break; + } + break; + case "AUDIENCE_CLAUSE_TYPE_UNSPECIFIED": + case 0: + message.clauseType = 0; + break; + case "INCLUDE": + case 1: + message.clauseType = 1; + break; + case "EXCLUDE": + case 2: + message.clauseType = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an AudienceFilterClause message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @static + * @param {google.analytics.admin.v1alpha.AudienceFilterClause} message AudienceFilterClause + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceFilterClause.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.clauseType = options.enums === String ? "AUDIENCE_CLAUSE_TYPE_UNSPECIFIED" : 0; + if (message.clauseType != null && message.hasOwnProperty("clauseType")) + object.clauseType = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType[message.clauseType] === undefined ? message.clauseType : $root.google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType[message.clauseType] : message.clauseType; + if (message.simpleFilter != null && message.hasOwnProperty("simpleFilter")) { + object.simpleFilter = $root.google.analytics.admin.v1alpha.AudienceSimpleFilter.toObject(message.simpleFilter, options); + if (options.oneofs) + object.filter = "simpleFilter"; + } + if (message.sequenceFilter != null && message.hasOwnProperty("sequenceFilter")) { + object.sequenceFilter = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.toObject(message.sequenceFilter, options); + if (options.oneofs) + object.filter = "sequenceFilter"; + } + return object; + }; + + /** + * Converts this AudienceFilterClause to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @instance + * @returns {Object.} JSON object + */ + AudienceFilterClause.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceFilterClause + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceFilterClause.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceFilterClause"; + }; + + /** + * AudienceClauseType enum. + * @name google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType + * @enum {number} + * @property {number} AUDIENCE_CLAUSE_TYPE_UNSPECIFIED=0 AUDIENCE_CLAUSE_TYPE_UNSPECIFIED value + * @property {number} INCLUDE=1 INCLUDE value + * @property {number} EXCLUDE=2 EXCLUDE value + */ + AudienceFilterClause.AudienceClauseType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AUDIENCE_CLAUSE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INCLUDE"] = 1; + values[valuesById[2] = "EXCLUDE"] = 2; + return values; + })(); + + return AudienceFilterClause; + })(); + + v1alpha.AudienceEventTrigger = (function() { + + /** + * Properties of an AudienceEventTrigger. + * @memberof google.analytics.admin.v1alpha + * @interface IAudienceEventTrigger + * @property {string|null} [eventName] AudienceEventTrigger eventName + * @property {google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition|null} [logCondition] AudienceEventTrigger logCondition + */ + + /** + * Constructs a new AudienceEventTrigger. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AudienceEventTrigger. + * @implements IAudienceEventTrigger + * @constructor + * @param {google.analytics.admin.v1alpha.IAudienceEventTrigger=} [properties] Properties to set + */ + function AudienceEventTrigger(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]]; + } + + /** + * AudienceEventTrigger eventName. + * @member {string} eventName + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @instance + */ + AudienceEventTrigger.prototype.eventName = ""; + + /** + * AudienceEventTrigger logCondition. + * @member {google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition} logCondition + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @instance + */ + AudienceEventTrigger.prototype.logCondition = 0; + + /** + * Creates a new AudienceEventTrigger instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @static + * @param {google.analytics.admin.v1alpha.IAudienceEventTrigger=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceEventTrigger} AudienceEventTrigger instance + */ + AudienceEventTrigger.create = function create(properties) { + return new AudienceEventTrigger(properties); + }; + + /** + * Encodes the specified AudienceEventTrigger message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventTrigger.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @static + * @param {google.analytics.admin.v1alpha.IAudienceEventTrigger} message AudienceEventTrigger message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceEventTrigger.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eventName != null && Object.hasOwnProperty.call(message, "eventName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventName); + if (message.logCondition != null && Object.hasOwnProperty.call(message, "logCondition")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.logCondition); + return writer; + }; + + /** + * Encodes the specified AudienceEventTrigger message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventTrigger.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @static + * @param {google.analytics.admin.v1alpha.IAudienceEventTrigger} message AudienceEventTrigger message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceEventTrigger.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceEventTrigger message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @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.AudienceEventTrigger} AudienceEventTrigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceEventTrigger.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceEventTrigger(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.eventName = reader.string(); + break; + } + case 2: { + message.logCondition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceEventTrigger message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AudienceEventTrigger} AudienceEventTrigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceEventTrigger.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceEventTrigger message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceEventTrigger.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.eventName != null && message.hasOwnProperty("eventName")) + if (!$util.isString(message.eventName)) + return "eventName: string expected"; + if (message.logCondition != null && message.hasOwnProperty("logCondition")) + switch (message.logCondition) { + default: + return "logCondition: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an AudienceEventTrigger message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AudienceEventTrigger} AudienceEventTrigger + */ + AudienceEventTrigger.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceEventTrigger) + return object; + var message = new $root.google.analytics.admin.v1alpha.AudienceEventTrigger(); + if (object.eventName != null) + message.eventName = String(object.eventName); + switch (object.logCondition) { + default: + if (typeof object.logCondition === "number") { + message.logCondition = object.logCondition; + break; + } + break; + case "LOG_CONDITION_UNSPECIFIED": + case 0: + message.logCondition = 0; + break; + case "AUDIENCE_JOINED": + case 1: + message.logCondition = 1; + break; + case "AUDIENCE_MEMBERSHIP_RENEWED": + case 2: + message.logCondition = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an AudienceEventTrigger message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @static + * @param {google.analytics.admin.v1alpha.AudienceEventTrigger} message AudienceEventTrigger + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceEventTrigger.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.eventName = ""; + object.logCondition = options.enums === String ? "LOG_CONDITION_UNSPECIFIED" : 0; + } + if (message.eventName != null && message.hasOwnProperty("eventName")) + object.eventName = message.eventName; + if (message.logCondition != null && message.hasOwnProperty("logCondition")) + object.logCondition = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition[message.logCondition] === undefined ? message.logCondition : $root.google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition[message.logCondition] : message.logCondition; + return object; + }; + + /** + * Converts this AudienceEventTrigger to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @instance + * @returns {Object.} JSON object + */ + AudienceEventTrigger.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceEventTrigger + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceEventTrigger.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceEventTrigger"; + }; + + /** + * LogCondition enum. + * @name google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition + * @enum {number} + * @property {number} LOG_CONDITION_UNSPECIFIED=0 LOG_CONDITION_UNSPECIFIED value + * @property {number} AUDIENCE_JOINED=1 AUDIENCE_JOINED value + * @property {number} AUDIENCE_MEMBERSHIP_RENEWED=2 AUDIENCE_MEMBERSHIP_RENEWED value + */ + AudienceEventTrigger.LogCondition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOG_CONDITION_UNSPECIFIED"] = 0; + values[valuesById[1] = "AUDIENCE_JOINED"] = 1; + values[valuesById[2] = "AUDIENCE_MEMBERSHIP_RENEWED"] = 2; + return values; + })(); + + return AudienceEventTrigger; + })(); + + v1alpha.Audience = (function() { + + /** + * Properties of an Audience. + * @memberof google.analytics.admin.v1alpha + * @interface IAudience + * @property {string|null} [name] Audience name + * @property {string|null} [displayName] Audience displayName + * @property {string|null} [description] Audience description + * @property {number|null} [membershipDurationDays] Audience membershipDurationDays + * @property {boolean|null} [adsPersonalizationEnabled] Audience adsPersonalizationEnabled + * @property {google.analytics.admin.v1alpha.IAudienceEventTrigger|null} [eventTrigger] Audience eventTrigger + * @property {google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode|null} [exclusionDurationMode] Audience exclusionDurationMode + * @property {Array.|null} [filterClauses] Audience filterClauses + */ + + /** + * Constructs a new Audience. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an Audience. + * @implements IAudience + * @constructor + * @param {google.analytics.admin.v1alpha.IAudience=} [properties] Properties to set + */ + function Audience(properties) { + this.filterClauses = []; + 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]]; + } + + /** + * Audience name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.Audience + * @instance + */ + Audience.prototype.name = ""; + + /** + * Audience displayName. + * @member {string} displayName + * @memberof google.analytics.admin.v1alpha.Audience + * @instance + */ + Audience.prototype.displayName = ""; + + /** + * Audience description. + * @member {string} description + * @memberof google.analytics.admin.v1alpha.Audience + * @instance + */ + Audience.prototype.description = ""; + + /** + * Audience membershipDurationDays. + * @member {number} membershipDurationDays + * @memberof google.analytics.admin.v1alpha.Audience + * @instance + */ + Audience.prototype.membershipDurationDays = 0; + + /** + * Audience adsPersonalizationEnabled. + * @member {boolean} adsPersonalizationEnabled + * @memberof google.analytics.admin.v1alpha.Audience + * @instance + */ + Audience.prototype.adsPersonalizationEnabled = false; + + /** + * Audience eventTrigger. + * @member {google.analytics.admin.v1alpha.IAudienceEventTrigger|null|undefined} eventTrigger + * @memberof google.analytics.admin.v1alpha.Audience + * @instance + */ + Audience.prototype.eventTrigger = null; + + /** + * Audience exclusionDurationMode. + * @member {google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode} exclusionDurationMode + * @memberof google.analytics.admin.v1alpha.Audience + * @instance + */ + Audience.prototype.exclusionDurationMode = 0; + + /** + * Audience filterClauses. + * @member {Array.} filterClauses + * @memberof google.analytics.admin.v1alpha.Audience + * @instance + */ + Audience.prototype.filterClauses = $util.emptyArray; + + /** + * Creates a new Audience instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.Audience + * @static + * @param {google.analytics.admin.v1alpha.IAudience=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.Audience} Audience instance + */ + Audience.create = function create(properties) { + return new Audience(properties); + }; + + /** + * Encodes the specified Audience message. Does not implicitly {@link google.analytics.admin.v1alpha.Audience.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.Audience + * @static + * @param {google.analytics.admin.v1alpha.IAudience} message Audience message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Audience.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.membershipDurationDays != null && Object.hasOwnProperty.call(message, "membershipDurationDays")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.membershipDurationDays); + if (message.adsPersonalizationEnabled != null && Object.hasOwnProperty.call(message, "adsPersonalizationEnabled")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.adsPersonalizationEnabled); + if (message.eventTrigger != null && Object.hasOwnProperty.call(message, "eventTrigger")) + $root.google.analytics.admin.v1alpha.AudienceEventTrigger.encode(message.eventTrigger, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.exclusionDurationMode != null && Object.hasOwnProperty.call(message, "exclusionDurationMode")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.exclusionDurationMode); + if (message.filterClauses != null && message.filterClauses.length) + for (var i = 0; i < message.filterClauses.length; ++i) + $root.google.analytics.admin.v1alpha.AudienceFilterClause.encode(message.filterClauses[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Audience message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.Audience.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.Audience + * @static + * @param {google.analytics.admin.v1alpha.IAudience} message Audience message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Audience.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Audience message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.Audience + * @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.Audience} Audience + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Audience.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.Audience(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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.membershipDurationDays = reader.int32(); + break; + } + case 5: { + message.adsPersonalizationEnabled = reader.bool(); + break; + } + case 6: { + message.eventTrigger = $root.google.analytics.admin.v1alpha.AudienceEventTrigger.decode(reader, reader.uint32()); + break; + } + case 7: { + message.exclusionDurationMode = reader.int32(); + break; + } + case 8: { + if (!(message.filterClauses && message.filterClauses.length)) + message.filterClauses = []; + message.filterClauses.push($root.google.analytics.admin.v1alpha.AudienceFilterClause.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Decodes an InListFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter} InListFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InListFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an Audience message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.Audience + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.Audience} Audience + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Audience.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an InListFilter message. - * @function verify - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InListFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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"; + /** + * Verifies an Audience message. + * @function verify + * @memberof google.analytics.admin.v1alpha.Audience + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Audience.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.membershipDurationDays != null && message.hasOwnProperty("membershipDurationDays")) + if (!$util.isInteger(message.membershipDurationDays)) + return "membershipDurationDays: integer expected"; + if (message.adsPersonalizationEnabled != null && message.hasOwnProperty("adsPersonalizationEnabled")) + if (typeof message.adsPersonalizationEnabled !== "boolean") + return "adsPersonalizationEnabled: boolean expected"; + if (message.eventTrigger != null && message.hasOwnProperty("eventTrigger")) { + var error = $root.google.analytics.admin.v1alpha.AudienceEventTrigger.verify(message.eventTrigger); + if (error) + return "eventTrigger." + error; + } + if (message.exclusionDurationMode != null && message.hasOwnProperty("exclusionDurationMode")) + switch (message.exclusionDurationMode) { + default: + return "exclusionDurationMode: enum value expected"; + case 0: + case 1: + case 2: + break; } - if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) - if (typeof message.caseSensitive !== "boolean") - return "caseSensitive: boolean expected"; - return null; - }; - - /** - * Creates an InListFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter} InListFilter - */ - InListFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter) - return object; - var message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter(); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) - message.values[i] = String(object.values[i]); + if (message.filterClauses != null && message.hasOwnProperty("filterClauses")) { + if (!Array.isArray(message.filterClauses)) + return "filterClauses: array expected"; + for (var i = 0; i < message.filterClauses.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.AudienceFilterClause.verify(message.filterClauses[i]); + if (error) + return "filterClauses." + error; } - if (object.caseSensitive != null) - message.caseSensitive = Boolean(object.caseSensitive); - return message; - }; + } + return null; + }; - /** - * Creates a plain object from an InListFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter - * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter} message InListFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InListFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (options.defaults) - object.caseSensitive = false; - 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.caseSensitive != null && message.hasOwnProperty("caseSensitive")) - object.caseSensitive = message.caseSensitive; + /** + * Creates an Audience message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.Audience + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.Audience} Audience + */ + Audience.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.Audience) return object; - }; + var message = new $root.google.analytics.admin.v1alpha.Audience(); + 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.membershipDurationDays != null) + message.membershipDurationDays = object.membershipDurationDays | 0; + if (object.adsPersonalizationEnabled != null) + message.adsPersonalizationEnabled = Boolean(object.adsPersonalizationEnabled); + if (object.eventTrigger != null) { + if (typeof object.eventTrigger !== "object") + throw TypeError(".google.analytics.admin.v1alpha.Audience.eventTrigger: object expected"); + message.eventTrigger = $root.google.analytics.admin.v1alpha.AudienceEventTrigger.fromObject(object.eventTrigger); + } + switch (object.exclusionDurationMode) { + default: + if (typeof object.exclusionDurationMode === "number") { + message.exclusionDurationMode = object.exclusionDurationMode; + break; + } + break; + case "AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED": + case 0: + message.exclusionDurationMode = 0; + break; + case "EXCLUDE_TEMPORARILY": + case 1: + message.exclusionDurationMode = 1; + break; + case "EXCLUDE_PERMANENTLY": + case 2: + message.exclusionDurationMode = 2; + break; + } + if (object.filterClauses) { + if (!Array.isArray(object.filterClauses)) + throw TypeError(".google.analytics.admin.v1alpha.Audience.filterClauses: array expected"); + message.filterClauses = []; + for (var i = 0; i < object.filterClauses.length; ++i) { + if (typeof object.filterClauses[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.Audience.filterClauses: object expected"); + message.filterClauses[i] = $root.google.analytics.admin.v1alpha.AudienceFilterClause.fromObject(object.filterClauses[i]); + } + } + return message; + }; - /** - * Converts this InListFilter to JSON. - * @function toJSON - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter - * @instance - * @returns {Object.} JSON object - */ - InListFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an Audience message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.Audience + * @static + * @param {google.analytics.admin.v1alpha.Audience} message Audience + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Audience.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.filterClauses = []; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.description = ""; + object.membershipDurationDays = 0; + object.adsPersonalizationEnabled = false; + object.eventTrigger = null; + object.exclusionDurationMode = options.enums === String ? "AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED" : 0; + } + 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.membershipDurationDays != null && message.hasOwnProperty("membershipDurationDays")) + object.membershipDurationDays = message.membershipDurationDays; + if (message.adsPersonalizationEnabled != null && message.hasOwnProperty("adsPersonalizationEnabled")) + object.adsPersonalizationEnabled = message.adsPersonalizationEnabled; + if (message.eventTrigger != null && message.hasOwnProperty("eventTrigger")) + object.eventTrigger = $root.google.analytics.admin.v1alpha.AudienceEventTrigger.toObject(message.eventTrigger, options); + if (message.exclusionDurationMode != null && message.hasOwnProperty("exclusionDurationMode")) + object.exclusionDurationMode = options.enums === String ? $root.google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode[message.exclusionDurationMode] === undefined ? message.exclusionDurationMode : $root.google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode[message.exclusionDurationMode] : message.exclusionDurationMode; + if (message.filterClauses && message.filterClauses.length) { + object.filterClauses = []; + for (var j = 0; j < message.filterClauses.length; ++j) + object.filterClauses[j] = $root.google.analytics.admin.v1alpha.AudienceFilterClause.toObject(message.filterClauses[j], options); + } + return object; + }; - /** - * Gets the default type url for InListFilter - * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InListFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter"; - }; + /** + * Converts this Audience to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.Audience + * @instance + * @returns {Object.} JSON object + */ + Audience.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return InListFilter; + /** + * Gets the default type url for Audience + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.Audience + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Audience.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.Audience"; + }; + + /** + * AudienceExclusionDurationMode enum. + * @name google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode + * @enum {number} + * @property {number} AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED=0 AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED value + * @property {number} EXCLUDE_TEMPORARILY=1 EXCLUDE_TEMPORARILY value + * @property {number} EXCLUDE_PERMANENTLY=2 EXCLUDE_PERMANENTLY value + */ + Audience.AudienceExclusionDurationMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EXCLUDE_TEMPORARILY"] = 1; + values[valuesById[2] = "EXCLUDE_PERMANENTLY"] = 2; + return values; })(); - AudienceDimensionOrMetricFilter.NumericValue = (function() { + return Audience; + })(); - /** - * Properties of a NumericValue. - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter - * @interface INumericValue - * @property {number|Long|null} [int64Value] NumericValue int64Value - * @property {number|null} [doubleValue] NumericValue doubleValue - */ + v1alpha.ChannelGroupFilter = (function() { - /** - * Constructs a new NumericValue. - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter - * @classdesc Represents a NumericValue. - * @implements INumericValue - * @constructor - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue=} [properties] Properties to set - */ - function NumericValue(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]]; - } + /** + * Properties of a ChannelGroupFilter. + * @memberof google.analytics.admin.v1alpha + * @interface IChannelGroupFilter + * @property {google.analytics.admin.v1alpha.ChannelGroupFilter.IStringFilter|null} [stringFilter] ChannelGroupFilter stringFilter + * @property {google.analytics.admin.v1alpha.ChannelGroupFilter.IInListFilter|null} [inListFilter] ChannelGroupFilter inListFilter + * @property {string|null} [fieldName] ChannelGroupFilter fieldName + */ - /** - * NumericValue int64Value. - * @member {number|Long|null|undefined} int64Value - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue - * @instance - */ - NumericValue.prototype.int64Value = null; + /** + * Constructs a new ChannelGroupFilter. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ChannelGroupFilter. + * @implements IChannelGroupFilter + * @constructor + * @param {google.analytics.admin.v1alpha.IChannelGroupFilter=} [properties] Properties to set + */ + function ChannelGroupFilter(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]]; + } - /** - * NumericValue doubleValue. - * @member {number|null|undefined} doubleValue - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue - * @instance - */ - NumericValue.prototype.doubleValue = null; + /** + * ChannelGroupFilter stringFilter. + * @member {google.analytics.admin.v1alpha.ChannelGroupFilter.IStringFilter|null|undefined} stringFilter + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter + * @instance + */ + ChannelGroupFilter.prototype.stringFilter = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * ChannelGroupFilter inListFilter. + * @member {google.analytics.admin.v1alpha.ChannelGroupFilter.IInListFilter|null|undefined} inListFilter + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter + * @instance + */ + ChannelGroupFilter.prototype.inListFilter = null; - /** - * NumericValue oneValue. - * @member {"int64Value"|"doubleValue"|undefined} oneValue - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue - * @instance - */ - Object.defineProperty(NumericValue.prototype, "oneValue", { - get: $util.oneOfGetter($oneOfFields = ["int64Value", "doubleValue"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * ChannelGroupFilter fieldName. + * @member {string} fieldName + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter + * @instance + */ + ChannelGroupFilter.prototype.fieldName = ""; - /** - * Creates a new NumericValue instance using the specified properties. - * @function create - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue - * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue} NumericValue instance - */ - NumericValue.create = function create(properties) { - return new NumericValue(properties); - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Encodes the specified NumericValue message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify|verify} messages. - * @function encode - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue - * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue} message NumericValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NumericValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.int64Value != null && Object.hasOwnProperty.call(message, "int64Value")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.int64Value); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.doubleValue); - return writer; - }; + /** + * ChannelGroupFilter valueFilter. + * @member {"stringFilter"|"inListFilter"|undefined} valueFilter + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter + * @instance + */ + Object.defineProperty(ChannelGroupFilter.prototype, "valueFilter", { + get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Encodes the specified NumericValue message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue - * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue} message NumericValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NumericValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new ChannelGroupFilter instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter + * @static + * @param {google.analytics.admin.v1alpha.IChannelGroupFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ChannelGroupFilter} ChannelGroupFilter instance + */ + ChannelGroupFilter.create = function create(properties) { + return new ChannelGroupFilter(properties); + }; - /** - * Decodes a NumericValue message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue - * @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.AudienceDimensionOrMetricFilter.NumericValue} NumericValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NumericValue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.int64Value = reader.int64(); - break; - } - case 2: { - message.doubleValue = reader.double(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Encodes the specified ChannelGroupFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.ChannelGroupFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter + * @static + * @param {google.analytics.admin.v1alpha.IChannelGroupFilter} message ChannelGroupFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChannelGroupFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); + if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) + $root.google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter.encode(message.stringFilter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) + $root.google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter.encode(message.inListFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ChannelGroupFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ChannelGroupFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter + * @static + * @param {google.analytics.admin.v1alpha.IChannelGroupFilter} message ChannelGroupFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChannelGroupFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChannelGroupFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter + * @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.ChannelGroupFilter} ChannelGroupFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChannelGroupFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ChannelGroupFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.stringFilter = $root.google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter.decode(reader, reader.uint32()); + break; + } + case 3: { + message.inListFilter = $root.google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter.decode(reader, reader.uint32()); break; } + case 1: { + message.fieldName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Decodes a NumericValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue} NumericValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NumericValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a ChannelGroupFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ChannelGroupFilter} ChannelGroupFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChannelGroupFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a NumericValue message. - * @function verify - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NumericValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.int64Value != null && message.hasOwnProperty("int64Value")) { - properties.oneValue = 1; - if (!$util.isInteger(message.int64Value) && !(message.int64Value && $util.isInteger(message.int64Value.low) && $util.isInteger(message.int64Value.high))) - return "int64Value: integer|Long expected"; + /** + * Verifies a ChannelGroupFilter message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChannelGroupFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + properties.valueFilter = 1; + { + var error = $root.google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter.verify(message.stringFilter); + if (error) + return "stringFilter." + error; } - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { - if (properties.oneValue === 1) - return "oneValue: multiple values"; - properties.oneValue = 1; - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + if (properties.valueFilter === 1) + return "valueFilter: multiple values"; + properties.valueFilter = 1; + { + var error = $root.google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter.verify(message.inListFilter); + if (error) + return "inListFilter." + error; } - return null; - }; - - /** - * Creates a NumericValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue} NumericValue - */ - NumericValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue) - return object; - var message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue(); - if (object.int64Value != null) - if ($util.Long) - (message.int64Value = $util.Long.fromValue(object.int64Value)).unsigned = false; - else if (typeof object.int64Value === "string") - message.int64Value = parseInt(object.int64Value, 10); - else if (typeof object.int64Value === "number") - message.int64Value = object.int64Value; - else if (typeof object.int64Value === "object") - message.int64Value = new $util.LongBits(object.int64Value.low >>> 0, object.int64Value.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - return message; - }; + } + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + if (!$util.isString(message.fieldName)) + return "fieldName: string expected"; + return null; + }; - /** - * Creates a plain object from a NumericValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue - * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue} message NumericValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NumericValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.int64Value != null && message.hasOwnProperty("int64Value")) { - if (typeof message.int64Value === "number") - object.int64Value = options.longs === String ? String(message.int64Value) : message.int64Value; - else - object.int64Value = options.longs === String ? $util.Long.prototype.toString.call(message.int64Value) : options.longs === Number ? new $util.LongBits(message.int64Value.low >>> 0, message.int64Value.high >>> 0).toNumber() : message.int64Value; - if (options.oneofs) - object.oneValue = "int64Value"; - } - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (options.oneofs) - object.oneValue = "doubleValue"; - } + /** + * Creates a ChannelGroupFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ChannelGroupFilter} ChannelGroupFilter + */ + ChannelGroupFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ChannelGroupFilter) return object; - }; + var message = new $root.google.analytics.admin.v1alpha.ChannelGroupFilter(); + if (object.stringFilter != null) { + if (typeof object.stringFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChannelGroupFilter.stringFilter: object expected"); + message.stringFilter = $root.google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter.fromObject(object.stringFilter); + } + if (object.inListFilter != null) { + if (typeof object.inListFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChannelGroupFilter.inListFilter: object expected"); + message.inListFilter = $root.google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter.fromObject(object.inListFilter); + } + if (object.fieldName != null) + message.fieldName = String(object.fieldName); + return message; + }; - /** - * Converts this NumericValue to JSON. - * @function toJSON - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue - * @instance - * @returns {Object.} JSON object - */ - NumericValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a ChannelGroupFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter + * @static + * @param {google.analytics.admin.v1alpha.ChannelGroupFilter} message ChannelGroupFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChannelGroupFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.fieldName = ""; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + object.fieldName = message.fieldName; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + object.stringFilter = $root.google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter.toObject(message.stringFilter, options); + if (options.oneofs) + object.valueFilter = "stringFilter"; + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + object.inListFilter = $root.google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter.toObject(message.inListFilter, options); + if (options.oneofs) + object.valueFilter = "inListFilter"; + } + return object; + }; - /** - * Gets the default type url for NumericValue - * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NumericValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue"; - }; + /** + * Converts this ChannelGroupFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter + * @instance + * @returns {Object.} JSON object + */ + ChannelGroupFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return NumericValue; - })(); + /** + * Gets the default type url for ChannelGroupFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChannelGroupFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ChannelGroupFilter"; + }; - AudienceDimensionOrMetricFilter.NumericFilter = (function() { + ChannelGroupFilter.StringFilter = (function() { /** - * Properties of a NumericFilter. - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter - * @interface INumericFilter - * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation|null} [operation] NumericFilter operation - * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null} [value] NumericFilter value + * Properties of a StringFilter. + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter + * @interface IStringFilter + * @property {google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter.MatchType|null} [matchType] StringFilter matchType + * @property {string|null} [value] StringFilter value */ /** - * Constructs a new NumericFilter. - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter - * @classdesc Represents a NumericFilter. - * @implements INumericFilter + * Constructs a new StringFilter. + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter + * @classdesc Represents a StringFilter. + * @implements IStringFilter * @constructor - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.ChannelGroupFilter.IStringFilter=} [properties] Properties to set */ - function NumericFilter(properties) { + function StringFilter(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43032,89 +51359,89 @@ } /** - * NumericFilter operation. - * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation} operation - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * StringFilter matchType. + * @member {google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter.MatchType} matchType + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter * @instance */ - NumericFilter.prototype.operation = 0; + StringFilter.prototype.matchType = 0; /** - * NumericFilter value. - * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null|undefined} value - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * StringFilter value. + * @member {string} value + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter * @instance */ - NumericFilter.prototype.value = null; + StringFilter.prototype.value = ""; /** - * Creates a new NumericFilter instance using the specified properties. + * Creates a new StringFilter instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter} NumericFilter instance + * @param {google.analytics.admin.v1alpha.ChannelGroupFilter.IStringFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter} StringFilter instance */ - NumericFilter.create = function create(properties) { - return new NumericFilter(properties); + StringFilter.create = function create(properties) { + return new StringFilter(properties); }; /** - * Encodes the specified NumericFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.verify|verify} messages. + * Encodes the specified StringFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter} message NumericFilter message or plain object to encode + * @param {google.analytics.admin.v1alpha.ChannelGroupFilter.IStringFilter} message StringFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NumericFilter.encode = function encode(message, writer) { + StringFilter.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.operation); + if (message.matchType != null && Object.hasOwnProperty.call(message, "matchType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.matchType); if (message.value != null && Object.hasOwnProperty.call(message, "value")) - $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); return writer; }; /** - * Encodes the specified NumericFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.verify|verify} messages. + * Encodes the specified StringFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter} message NumericFilter message or plain object to encode + * @param {google.analytics.admin.v1alpha.ChannelGroupFilter.IStringFilter} message StringFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NumericFilter.encodeDelimited = function encodeDelimited(message, writer) { + StringFilter.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NumericFilter message from the specified reader or buffer. + * Decodes a StringFilter message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter * @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.AudienceDimensionOrMetricFilter.NumericFilter} NumericFilter + * @returns {google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter} StringFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NumericFilter.decode = function decode(reader, length) { + StringFilter.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.operation = reader.int32(); + message.matchType = reader.int32(); break; } case 2: { - message.value = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.decode(reader, reader.uint32()); + message.value = reader.string(); break; } default: @@ -43126,184 +51453,200 @@ }; /** - * Decodes a NumericFilter message from the specified reader or buffer, length delimited. + * Decodes a StringFilter message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter} NumericFilter + * @returns {google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter} StringFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NumericFilter.decodeDelimited = function decodeDelimited(reader) { + StringFilter.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NumericFilter message. + * Verifies a StringFilter message. * @function verify - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NumericFilter.verify = function verify(message) { + StringFilter.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.operation != null && message.hasOwnProperty("operation")) - switch (message.operation) { + if (message.matchType != null && message.hasOwnProperty("matchType")) + switch (message.matchType) { default: - return "operation: enum value expected"; + return "matchType: enum value expected"; case 0: case 1: case 2: + case 3: case 4: + case 5: + case 6: break; } - if (message.value != null && message.hasOwnProperty("value")) { - var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify(message.value); - if (error) - return "value." + error; - } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; return null; }; /** - * Creates a NumericFilter message from a plain object. Also converts values to their respective internal types. + * Creates a StringFilter message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter} NumericFilter + * @returns {google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter} StringFilter */ - NumericFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter) + StringFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter) return object; - var message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter(); - switch (object.operation) { + var message = new $root.google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter(); + switch (object.matchType) { default: - if (typeof object.operation === "number") { - message.operation = object.operation; + if (typeof object.matchType === "number") { + message.matchType = object.matchType; break; } break; - case "OPERATION_UNSPECIFIED": + case "MATCH_TYPE_UNSPECIFIED": case 0: - message.operation = 0; + message.matchType = 0; break; - case "EQUAL": + case "EXACT": case 1: - message.operation = 1; + message.matchType = 1; break; - case "LESS_THAN": + case "BEGINS_WITH": case 2: - message.operation = 2; + message.matchType = 2; break; - case "GREATER_THAN": + case "ENDS_WITH": + case 3: + message.matchType = 3; + break; + case "CONTAINS": case 4: - message.operation = 4; + message.matchType = 4; + break; + case "FULL_REGEXP": + case 5: + message.matchType = 5; + break; + case "PARTIAL_REGEXP": + case 6: + message.matchType = 6; break; } - if (object.value != null) { - if (typeof object.value !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.value: object expected"); - message.value = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.fromObject(object.value); - } + if (object.value != null) + message.value = String(object.value); return message; }; /** - * Creates a plain object from a NumericFilter message. Also converts values to other types if specified. + * Creates a plain object from a StringFilter message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter} message NumericFilter + * @param {google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter} message StringFilter * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NumericFilter.toObject = function toObject(message, options) { + StringFilter.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.operation = options.enums === String ? "OPERATION_UNSPECIFIED" : 0; - object.value = null; + object.matchType = options.enums === String ? "MATCH_TYPE_UNSPECIFIED" : 0; + object.value = ""; } - if (message.operation != null && message.hasOwnProperty("operation")) - object.operation = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation[message.operation] === undefined ? message.operation : $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation[message.operation] : message.operation; + if (message.matchType != null && message.hasOwnProperty("matchType")) + object.matchType = options.enums === String ? $root.google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter.MatchType[message.matchType] === undefined ? message.matchType : $root.google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter.MatchType[message.matchType] : message.matchType; if (message.value != null && message.hasOwnProperty("value")) - object.value = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.toObject(message.value, options); + object.value = message.value; return object; }; /** - * Converts this NumericFilter to JSON. + * Converts this StringFilter to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter * @instance * @returns {Object.} JSON object */ - NumericFilter.prototype.toJSON = function toJSON() { + StringFilter.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for NumericFilter + * Gets the default type url for StringFilter * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - NumericFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + StringFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter"; }; /** - * Operation enum. - * @name google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation + * MatchType enum. + * @name google.analytics.admin.v1alpha.ChannelGroupFilter.StringFilter.MatchType * @enum {number} - * @property {number} OPERATION_UNSPECIFIED=0 OPERATION_UNSPECIFIED value - * @property {number} EQUAL=1 EQUAL value - * @property {number} LESS_THAN=2 LESS_THAN value - * @property {number} GREATER_THAN=4 GREATER_THAN value + * @property {number} MATCH_TYPE_UNSPECIFIED=0 MATCH_TYPE_UNSPECIFIED value + * @property {number} EXACT=1 EXACT value + * @property {number} BEGINS_WITH=2 BEGINS_WITH value + * @property {number} ENDS_WITH=3 ENDS_WITH value + * @property {number} CONTAINS=4 CONTAINS value + * @property {number} FULL_REGEXP=5 FULL_REGEXP value + * @property {number} PARTIAL_REGEXP=6 PARTIAL_REGEXP value */ - NumericFilter.Operation = (function() { + StringFilter.MatchType = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "OPERATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "EQUAL"] = 1; - values[valuesById[2] = "LESS_THAN"] = 2; - values[valuesById[4] = "GREATER_THAN"] = 4; + values[valuesById[0] = "MATCH_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EXACT"] = 1; + values[valuesById[2] = "BEGINS_WITH"] = 2; + values[valuesById[3] = "ENDS_WITH"] = 3; + values[valuesById[4] = "CONTAINS"] = 4; + values[valuesById[5] = "FULL_REGEXP"] = 5; + values[valuesById[6] = "PARTIAL_REGEXP"] = 6; return values; })(); - return NumericFilter; + return StringFilter; })(); - AudienceDimensionOrMetricFilter.BetweenFilter = (function() { + ChannelGroupFilter.InListFilter = (function() { /** - * Properties of a BetweenFilter. - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter - * @interface IBetweenFilter - * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null} [fromValue] BetweenFilter fromValue - * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null} [toValue] BetweenFilter toValue + * Properties of an InListFilter. + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter + * @interface IInListFilter + * @property {Array.|null} [values] InListFilter values */ /** - * Constructs a new BetweenFilter. - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter - * @classdesc Represents a BetweenFilter. - * @implements IBetweenFilter + * Constructs a new InListFilter. + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter + * @classdesc Represents an InListFilter. + * @implements IInListFilter * @constructor - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.ChannelGroupFilter.IInListFilter=} [properties] Properties to set */ - function BetweenFilter(properties) { + function InListFilter(properties) { + this.values = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43311,89 +51654,78 @@ } /** - * BetweenFilter fromValue. - * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null|undefined} fromValue - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter - * @instance - */ - BetweenFilter.prototype.fromValue = null; - - /** - * BetweenFilter toValue. - * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null|undefined} toValue - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * InListFilter values. + * @member {Array.} values + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter * @instance */ - BetweenFilter.prototype.toValue = null; + InListFilter.prototype.values = $util.emptyArray; /** - * Creates a new BetweenFilter instance using the specified properties. + * Creates a new InListFilter instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter} BetweenFilter instance + * @param {google.analytics.admin.v1alpha.ChannelGroupFilter.IInListFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter} InListFilter instance */ - BetweenFilter.create = function create(properties) { - return new BetweenFilter(properties); + InListFilter.create = function create(properties) { + return new InListFilter(properties); }; /** - * Encodes the specified BetweenFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.verify|verify} messages. + * Encodes the specified InListFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter} message BetweenFilter message or plain object to encode + * @param {google.analytics.admin.v1alpha.ChannelGroupFilter.IInListFilter} message InListFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BetweenFilter.encode = function encode(message, writer) { + InListFilter.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.fromValue != null && Object.hasOwnProperty.call(message, "fromValue")) - $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.encode(message.fromValue, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.toValue != null && Object.hasOwnProperty.call(message, "toValue")) - $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.encode(message.toValue, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.values[i]); return writer; }; /** - * Encodes the specified BetweenFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.verify|verify} messages. + * Encodes the specified InListFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter} message BetweenFilter message or plain object to encode + * @param {google.analytics.admin.v1alpha.ChannelGroupFilter.IInListFilter} message InListFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BetweenFilter.encodeDelimited = function encodeDelimited(message, writer) { + InListFilter.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BetweenFilter message from the specified reader or buffer. + * Decodes an InListFilter message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter * @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.AudienceDimensionOrMetricFilter.BetweenFilter} BetweenFilter + * @returns {google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter} InListFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BetweenFilter.decode = function decode(reader, length) { + InListFilter.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.fromValue = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.decode(reader, reader.uint32()); - break; - } - case 2: { - message.toValue = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.decode(reader, reader.uint32()); + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); break; } default: @@ -43405,380 +51737,140 @@ }; /** - * Decodes a BetweenFilter message from the specified reader or buffer, length delimited. + * Decodes an InListFilter message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter} BetweenFilter + * @returns {google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter} InListFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BetweenFilter.decodeDelimited = function decodeDelimited(reader) { + InListFilter.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BetweenFilter message. + * Verifies an InListFilter message. * @function verify - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BetweenFilter.verify = function verify(message) { + InListFilter.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.fromValue != null && message.hasOwnProperty("fromValue")) { - var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify(message.fromValue); - if (error) - return "fromValue." + error; - } - if (message.toValue != null && message.hasOwnProperty("toValue")) { - var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify(message.toValue); - if (error) - return "toValue." + error; + 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"; } return null; }; /** - * Creates a BetweenFilter message from a plain object. Also converts values to their respective internal types. + * Creates an InListFilter message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter} BetweenFilter + * @returns {google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter} InListFilter */ - BetweenFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter) + InListFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter) return object; - var message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter(); - if (object.fromValue != null) { - if (typeof object.fromValue !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.fromValue: object expected"); - message.fromValue = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.fromObject(object.fromValue); - } - if (object.toValue != null) { - if (typeof object.toValue !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.toValue: object expected"); - message.toValue = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.fromObject(object.toValue); + var message = new $root.google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); } return message; }; /** - * Creates a plain object from a BetweenFilter message. Also converts values to other types if specified. + * Creates a plain object from an InListFilter message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter * @static - * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter} message BetweenFilter + * @param {google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter} message InListFilter * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BetweenFilter.toObject = function toObject(message, options) { + InListFilter.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.fromValue = null; - object.toValue = null; + if (options.arrays || options.defaults) + object.values = []; + 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.fromValue != null && message.hasOwnProperty("fromValue")) - object.fromValue = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.toObject(message.fromValue, options); - if (message.toValue != null && message.hasOwnProperty("toValue")) - object.toValue = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.toObject(message.toValue, options); return object; }; - /** - * Converts this BetweenFilter to JSON. - * @function toJSON - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter - * @instance - * @returns {Object.} JSON object - */ - BetweenFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BetweenFilter - * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BetweenFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter"; - }; - - return BetweenFilter; - })(); - - return AudienceDimensionOrMetricFilter; - })(); - - v1alpha.AudienceEventFilter = (function() { - - /** - * Properties of an AudienceEventFilter. - * @memberof google.analytics.admin.v1alpha - * @interface IAudienceEventFilter - * @property {string|null} [eventName] AudienceEventFilter eventName - * @property {google.analytics.admin.v1alpha.IAudienceFilterExpression|null} [eventParameterFilterExpression] AudienceEventFilter eventParameterFilterExpression - */ - - /** - * Constructs a new AudienceEventFilter. - * @memberof google.analytics.admin.v1alpha - * @classdesc Represents an AudienceEventFilter. - * @implements IAudienceEventFilter - * @constructor - * @param {google.analytics.admin.v1alpha.IAudienceEventFilter=} [properties] Properties to set - */ - function AudienceEventFilter(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]]; - } - - /** - * AudienceEventFilter eventName. - * @member {string} eventName - * @memberof google.analytics.admin.v1alpha.AudienceEventFilter - * @instance - */ - AudienceEventFilter.prototype.eventName = ""; - - /** - * AudienceEventFilter eventParameterFilterExpression. - * @member {google.analytics.admin.v1alpha.IAudienceFilterExpression|null|undefined} eventParameterFilterExpression - * @memberof google.analytics.admin.v1alpha.AudienceEventFilter - * @instance - */ - AudienceEventFilter.prototype.eventParameterFilterExpression = null; - - /** - * Creates a new AudienceEventFilter instance using the specified properties. - * @function create - * @memberof google.analytics.admin.v1alpha.AudienceEventFilter - * @static - * @param {google.analytics.admin.v1alpha.IAudienceEventFilter=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.AudienceEventFilter} AudienceEventFilter instance - */ - AudienceEventFilter.create = function create(properties) { - return new AudienceEventFilter(properties); - }; - - /** - * Encodes the specified AudienceEventFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventFilter.verify|verify} messages. - * @function encode - * @memberof google.analytics.admin.v1alpha.AudienceEventFilter - * @static - * @param {google.analytics.admin.v1alpha.IAudienceEventFilter} message AudienceEventFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudienceEventFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.eventName != null && Object.hasOwnProperty.call(message, "eventName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventName); - if (message.eventParameterFilterExpression != null && Object.hasOwnProperty.call(message, "eventParameterFilterExpression")) - $root.google.analytics.admin.v1alpha.AudienceFilterExpression.encode(message.eventParameterFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AudienceEventFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceEventFilter - * @static - * @param {google.analytics.admin.v1alpha.IAudienceEventFilter} message AudienceEventFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudienceEventFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AudienceEventFilter message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.admin.v1alpha.AudienceEventFilter - * @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.AudienceEventFilter} AudienceEventFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudienceEventFilter.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceEventFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.eventName = reader.string(); - break; - } - case 2: { - message.eventParameterFilterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AudienceEventFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceEventFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.AudienceEventFilter} AudienceEventFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudienceEventFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AudienceEventFilter message. - * @function verify - * @memberof google.analytics.admin.v1alpha.AudienceEventFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AudienceEventFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.eventName != null && message.hasOwnProperty("eventName")) - if (!$util.isString(message.eventName)) - return "eventName: string expected"; - if (message.eventParameterFilterExpression != null && message.hasOwnProperty("eventParameterFilterExpression")) { - var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.verify(message.eventParameterFilterExpression); - if (error) - return "eventParameterFilterExpression." + error; - } - return null; - }; - - /** - * Creates an AudienceEventFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.admin.v1alpha.AudienceEventFilter - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.AudienceEventFilter} AudienceEventFilter - */ - AudienceEventFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.AudienceEventFilter) - return object; - var message = new $root.google.analytics.admin.v1alpha.AudienceEventFilter(); - if (object.eventName != null) - message.eventName = String(object.eventName); - if (object.eventParameterFilterExpression != null) { - if (typeof object.eventParameterFilterExpression !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceEventFilter.eventParameterFilterExpression: object expected"); - message.eventParameterFilterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.fromObject(object.eventParameterFilterExpression); - } - return message; - }; - - /** - * Creates a plain object from an AudienceEventFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.admin.v1alpha.AudienceEventFilter - * @static - * @param {google.analytics.admin.v1alpha.AudienceEventFilter} message AudienceEventFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AudienceEventFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.eventName = ""; - object.eventParameterFilterExpression = null; - } - if (message.eventName != null && message.hasOwnProperty("eventName")) - object.eventName = message.eventName; - if (message.eventParameterFilterExpression != null && message.hasOwnProperty("eventParameterFilterExpression")) - object.eventParameterFilterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.toObject(message.eventParameterFilterExpression, options); - return object; - }; - - /** - * Converts this AudienceEventFilter to JSON. - * @function toJSON - * @memberof google.analytics.admin.v1alpha.AudienceEventFilter - * @instance - * @returns {Object.} JSON object - */ - AudienceEventFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this InListFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter + * @instance + * @returns {Object.} JSON object + */ + InListFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for AudienceEventFilter - * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.AudienceEventFilter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AudienceEventFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceEventFilter"; - }; + /** + * Gets the default type url for InListFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InListFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ChannelGroupFilter.InListFilter"; + }; - return AudienceEventFilter; + return InListFilter; + })(); + + return ChannelGroupFilter; })(); - v1alpha.AudienceFilterExpression = (function() { + v1alpha.ChannelGroupFilterExpression = (function() { /** - * Properties of an AudienceFilterExpression. + * Properties of a ChannelGroupFilterExpression. * @memberof google.analytics.admin.v1alpha - * @interface IAudienceFilterExpression - * @property {google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null} [andGroup] AudienceFilterExpression andGroup - * @property {google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null} [orGroup] AudienceFilterExpression orGroup - * @property {google.analytics.admin.v1alpha.IAudienceFilterExpression|null} [notExpression] AudienceFilterExpression notExpression - * @property {google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter|null} [dimensionOrMetricFilter] AudienceFilterExpression dimensionOrMetricFilter - * @property {google.analytics.admin.v1alpha.IAudienceEventFilter|null} [eventFilter] AudienceFilterExpression eventFilter + * @interface IChannelGroupFilterExpression + * @property {google.analytics.admin.v1alpha.IChannelGroupFilterExpressionList|null} [andGroup] ChannelGroupFilterExpression andGroup + * @property {google.analytics.admin.v1alpha.IChannelGroupFilterExpressionList|null} [orGroup] ChannelGroupFilterExpression orGroup + * @property {google.analytics.admin.v1alpha.IChannelGroupFilterExpression|null} [notExpression] ChannelGroupFilterExpression notExpression + * @property {google.analytics.admin.v1alpha.IChannelGroupFilter|null} [filter] ChannelGroupFilterExpression filter */ /** - * Constructs a new AudienceFilterExpression. + * Constructs a new ChannelGroupFilterExpression. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents an AudienceFilterExpression. - * @implements IAudienceFilterExpression + * @classdesc Represents a ChannelGroupFilterExpression. + * @implements IChannelGroupFilterExpression * @constructor - * @param {google.analytics.admin.v1alpha.IAudienceFilterExpression=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IChannelGroupFilterExpression=} [properties] Properties to set */ - function AudienceFilterExpression(properties) { + function ChannelGroupFilterExpression(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43786,145 +51878,131 @@ } /** - * AudienceFilterExpression andGroup. - * @member {google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null|undefined} andGroup - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression - * @instance - */ - AudienceFilterExpression.prototype.andGroup = null; - - /** - * AudienceFilterExpression orGroup. - * @member {google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null|undefined} orGroup - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * ChannelGroupFilterExpression andGroup. + * @member {google.analytics.admin.v1alpha.IChannelGroupFilterExpressionList|null|undefined} andGroup + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilterExpression * @instance */ - AudienceFilterExpression.prototype.orGroup = null; + ChannelGroupFilterExpression.prototype.andGroup = null; /** - * AudienceFilterExpression notExpression. - * @member {google.analytics.admin.v1alpha.IAudienceFilterExpression|null|undefined} notExpression - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * ChannelGroupFilterExpression orGroup. + * @member {google.analytics.admin.v1alpha.IChannelGroupFilterExpressionList|null|undefined} orGroup + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilterExpression * @instance */ - AudienceFilterExpression.prototype.notExpression = null; + ChannelGroupFilterExpression.prototype.orGroup = null; /** - * AudienceFilterExpression dimensionOrMetricFilter. - * @member {google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter|null|undefined} dimensionOrMetricFilter - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * ChannelGroupFilterExpression notExpression. + * @member {google.analytics.admin.v1alpha.IChannelGroupFilterExpression|null|undefined} notExpression + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilterExpression * @instance */ - AudienceFilterExpression.prototype.dimensionOrMetricFilter = null; + ChannelGroupFilterExpression.prototype.notExpression = null; /** - * AudienceFilterExpression eventFilter. - * @member {google.analytics.admin.v1alpha.IAudienceEventFilter|null|undefined} eventFilter - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * ChannelGroupFilterExpression filter. + * @member {google.analytics.admin.v1alpha.IChannelGroupFilter|null|undefined} filter + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilterExpression * @instance */ - AudienceFilterExpression.prototype.eventFilter = null; + ChannelGroupFilterExpression.prototype.filter = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * AudienceFilterExpression expr. - * @member {"andGroup"|"orGroup"|"notExpression"|"dimensionOrMetricFilter"|"eventFilter"|undefined} expr - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * ChannelGroupFilterExpression expr. + * @member {"andGroup"|"orGroup"|"notExpression"|"filter"|undefined} expr + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilterExpression * @instance */ - Object.defineProperty(AudienceFilterExpression.prototype, "expr", { - get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "dimensionOrMetricFilter", "eventFilter"]), + Object.defineProperty(ChannelGroupFilterExpression.prototype, "expr", { + get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "filter"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new AudienceFilterExpression instance using the specified properties. + * Creates a new ChannelGroupFilterExpression instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilterExpression * @static - * @param {google.analytics.admin.v1alpha.IAudienceFilterExpression=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.AudienceFilterExpression} AudienceFilterExpression instance + * @param {google.analytics.admin.v1alpha.IChannelGroupFilterExpression=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ChannelGroupFilterExpression} ChannelGroupFilterExpression instance */ - AudienceFilterExpression.create = function create(properties) { - return new AudienceFilterExpression(properties); + ChannelGroupFilterExpression.create = function create(properties) { + return new ChannelGroupFilterExpression(properties); }; /** - * Encodes the specified AudienceFilterExpression message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpression.verify|verify} messages. + * Encodes the specified ChannelGroupFilterExpression message. Does not implicitly {@link google.analytics.admin.v1alpha.ChannelGroupFilterExpression.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilterExpression * @static - * @param {google.analytics.admin.v1alpha.IAudienceFilterExpression} message AudienceFilterExpression message or plain object to encode + * @param {google.analytics.admin.v1alpha.IChannelGroupFilterExpression} message ChannelGroupFilterExpression message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudienceFilterExpression.encode = function encode(message, writer) { + ChannelGroupFilterExpression.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) - $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) - $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) - $root.google.analytics.admin.v1alpha.AudienceFilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.dimensionOrMetricFilter != null && Object.hasOwnProperty.call(message, "dimensionOrMetricFilter")) - $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.encode(message.dimensionOrMetricFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.eventFilter != null && Object.hasOwnProperty.call(message, "eventFilter")) - $root.google.analytics.admin.v1alpha.AudienceEventFilter.encode(message.eventFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.analytics.admin.v1alpha.ChannelGroupFilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + $root.google.analytics.admin.v1alpha.ChannelGroupFilter.encode(message.filter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified AudienceFilterExpression message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpression.verify|verify} messages. + * Encodes the specified ChannelGroupFilterExpression message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ChannelGroupFilterExpression.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilterExpression * @static - * @param {google.analytics.admin.v1alpha.IAudienceFilterExpression} message AudienceFilterExpression message or plain object to encode + * @param {google.analytics.admin.v1alpha.IChannelGroupFilterExpression} message ChannelGroupFilterExpression message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudienceFilterExpression.encodeDelimited = function encodeDelimited(message, writer) { + ChannelGroupFilterExpression.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AudienceFilterExpression message from the specified reader or buffer. + * Decodes a ChannelGroupFilterExpression message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilterExpression * @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.AudienceFilterExpression} AudienceFilterExpression + * @returns {google.analytics.admin.v1alpha.ChannelGroupFilterExpression} ChannelGroupFilterExpression * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudienceFilterExpression.decode = function decode(reader, length) { + ChannelGroupFilterExpression.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceFilterExpression(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ChannelGroupFilterExpression(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.andGroup = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.decode(reader, reader.uint32()); + message.andGroup = $root.google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList.decode(reader, reader.uint32()); break; } case 2: { - message.orGroup = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.decode(reader, reader.uint32()); + message.orGroup = $root.google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList.decode(reader, reader.uint32()); break; } case 3: { - message.notExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.decode(reader, reader.uint32()); + message.notExpression = $root.google.analytics.admin.v1alpha.ChannelGroupFilterExpression.decode(reader, reader.uint32()); break; } case 4: { - message.dimensionOrMetricFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.decode(reader, reader.uint32()); - break; - } - case 5: { - message.eventFilter = $root.google.analytics.admin.v1alpha.AudienceEventFilter.decode(reader, reader.uint32()); + message.filter = $root.google.analytics.admin.v1alpha.ChannelGroupFilter.decode(reader, reader.uint32()); break; } default: @@ -43936,37 +52014,37 @@ }; /** - * Decodes an AudienceFilterExpression message from the specified reader or buffer, length delimited. + * Decodes a ChannelGroupFilterExpression message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilterExpression * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.AudienceFilterExpression} AudienceFilterExpression + * @returns {google.analytics.admin.v1alpha.ChannelGroupFilterExpression} ChannelGroupFilterExpression * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudienceFilterExpression.decodeDelimited = function decodeDelimited(reader) { + ChannelGroupFilterExpression.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AudienceFilterExpression message. + * Verifies a ChannelGroupFilterExpression message. * @function verify - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilterExpression * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AudienceFilterExpression.verify = function verify(message) { + ChannelGroupFilterExpression.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; if (message.andGroup != null && message.hasOwnProperty("andGroup")) { properties.expr = 1; { - var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.verify(message.andGroup); + var error = $root.google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList.verify(message.andGroup); if (error) return "andGroup." + error; } @@ -43976,7 +52054,7 @@ return "expr: multiple values"; properties.expr = 1; { - var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.verify(message.orGroup); + var error = $root.google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList.verify(message.orGroup); if (error) return "orGroup." + error; } @@ -43986,162 +52064,142 @@ return "expr: multiple values"; properties.expr = 1; { - var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.verify(message.notExpression); + var error = $root.google.analytics.admin.v1alpha.ChannelGroupFilterExpression.verify(message.notExpression); if (error) return "notExpression." + error; } } - if (message.dimensionOrMetricFilter != null && message.hasOwnProperty("dimensionOrMetricFilter")) { - if (properties.expr === 1) - return "expr: multiple values"; - properties.expr = 1; - { - var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.verify(message.dimensionOrMetricFilter); - if (error) - return "dimensionOrMetricFilter." + error; - } - } - if (message.eventFilter != null && message.hasOwnProperty("eventFilter")) { + if (message.filter != null && message.hasOwnProperty("filter")) { if (properties.expr === 1) return "expr: multiple values"; properties.expr = 1; { - var error = $root.google.analytics.admin.v1alpha.AudienceEventFilter.verify(message.eventFilter); + var error = $root.google.analytics.admin.v1alpha.ChannelGroupFilter.verify(message.filter); if (error) - return "eventFilter." + error; + return "filter." + error; } } return null; }; /** - * Creates an AudienceFilterExpression message from a plain object. Also converts values to their respective internal types. + * Creates a ChannelGroupFilterExpression message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilterExpression * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.AudienceFilterExpression} AudienceFilterExpression + * @returns {google.analytics.admin.v1alpha.ChannelGroupFilterExpression} ChannelGroupFilterExpression */ - AudienceFilterExpression.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.AudienceFilterExpression) + ChannelGroupFilterExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ChannelGroupFilterExpression) return object; - var message = new $root.google.analytics.admin.v1alpha.AudienceFilterExpression(); + var message = new $root.google.analytics.admin.v1alpha.ChannelGroupFilterExpression(); if (object.andGroup != null) { if (typeof object.andGroup !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpression.andGroup: object expected"); - message.andGroup = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.fromObject(object.andGroup); + throw TypeError(".google.analytics.admin.v1alpha.ChannelGroupFilterExpression.andGroup: object expected"); + message.andGroup = $root.google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList.fromObject(object.andGroup); } if (object.orGroup != null) { if (typeof object.orGroup !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpression.orGroup: object expected"); - message.orGroup = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.fromObject(object.orGroup); + throw TypeError(".google.analytics.admin.v1alpha.ChannelGroupFilterExpression.orGroup: object expected"); + message.orGroup = $root.google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList.fromObject(object.orGroup); } if (object.notExpression != null) { if (typeof object.notExpression !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpression.notExpression: object expected"); - message.notExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.fromObject(object.notExpression); - } - if (object.dimensionOrMetricFilter != null) { - if (typeof object.dimensionOrMetricFilter !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpression.dimensionOrMetricFilter: object expected"); - message.dimensionOrMetricFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.fromObject(object.dimensionOrMetricFilter); + throw TypeError(".google.analytics.admin.v1alpha.ChannelGroupFilterExpression.notExpression: object expected"); + message.notExpression = $root.google.analytics.admin.v1alpha.ChannelGroupFilterExpression.fromObject(object.notExpression); } - if (object.eventFilter != null) { - if (typeof object.eventFilter !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpression.eventFilter: object expected"); - message.eventFilter = $root.google.analytics.admin.v1alpha.AudienceEventFilter.fromObject(object.eventFilter); + if (object.filter != null) { + if (typeof object.filter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChannelGroupFilterExpression.filter: object expected"); + message.filter = $root.google.analytics.admin.v1alpha.ChannelGroupFilter.fromObject(object.filter); } return message; }; /** - * Creates a plain object from an AudienceFilterExpression message. Also converts values to other types if specified. + * Creates a plain object from a ChannelGroupFilterExpression message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilterExpression * @static - * @param {google.analytics.admin.v1alpha.AudienceFilterExpression} message AudienceFilterExpression + * @param {google.analytics.admin.v1alpha.ChannelGroupFilterExpression} message ChannelGroupFilterExpression * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AudienceFilterExpression.toObject = function toObject(message, options) { + ChannelGroupFilterExpression.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (message.andGroup != null && message.hasOwnProperty("andGroup")) { - object.andGroup = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.toObject(message.andGroup, options); + object.andGroup = $root.google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList.toObject(message.andGroup, options); if (options.oneofs) object.expr = "andGroup"; } if (message.orGroup != null && message.hasOwnProperty("orGroup")) { - object.orGroup = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.toObject(message.orGroup, options); + object.orGroup = $root.google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList.toObject(message.orGroup, options); if (options.oneofs) object.expr = "orGroup"; } if (message.notExpression != null && message.hasOwnProperty("notExpression")) { - object.notExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.toObject(message.notExpression, options); + object.notExpression = $root.google.analytics.admin.v1alpha.ChannelGroupFilterExpression.toObject(message.notExpression, options); if (options.oneofs) object.expr = "notExpression"; } - if (message.dimensionOrMetricFilter != null && message.hasOwnProperty("dimensionOrMetricFilter")) { - object.dimensionOrMetricFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.toObject(message.dimensionOrMetricFilter, options); - if (options.oneofs) - object.expr = "dimensionOrMetricFilter"; - } - if (message.eventFilter != null && message.hasOwnProperty("eventFilter")) { - object.eventFilter = $root.google.analytics.admin.v1alpha.AudienceEventFilter.toObject(message.eventFilter, options); + if (message.filter != null && message.hasOwnProperty("filter")) { + object.filter = $root.google.analytics.admin.v1alpha.ChannelGroupFilter.toObject(message.filter, options); if (options.oneofs) - object.expr = "eventFilter"; + object.expr = "filter"; } return object; }; /** - * Converts this AudienceFilterExpression to JSON. + * Converts this ChannelGroupFilterExpression to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilterExpression * @instance * @returns {Object.} JSON object */ - AudienceFilterExpression.prototype.toJSON = function toJSON() { + ChannelGroupFilterExpression.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AudienceFilterExpression + * Gets the default type url for ChannelGroupFilterExpression * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilterExpression * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AudienceFilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ChannelGroupFilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceFilterExpression"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ChannelGroupFilterExpression"; }; - return AudienceFilterExpression; + return ChannelGroupFilterExpression; })(); - v1alpha.AudienceFilterExpressionList = (function() { + v1alpha.ChannelGroupFilterExpressionList = (function() { /** - * Properties of an AudienceFilterExpressionList. + * Properties of a ChannelGroupFilterExpressionList. * @memberof google.analytics.admin.v1alpha - * @interface IAudienceFilterExpressionList - * @property {Array.|null} [filterExpressions] AudienceFilterExpressionList filterExpressions + * @interface IChannelGroupFilterExpressionList + * @property {Array.|null} [filterExpressions] ChannelGroupFilterExpressionList filterExpressions */ /** - * Constructs a new AudienceFilterExpressionList. + * Constructs a new ChannelGroupFilterExpressionList. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents an AudienceFilterExpressionList. - * @implements IAudienceFilterExpressionList + * @classdesc Represents a ChannelGroupFilterExpressionList. + * @implements IChannelGroupFilterExpressionList * @constructor - * @param {google.analytics.admin.v1alpha.IAudienceFilterExpressionList=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IChannelGroupFilterExpressionList=} [properties] Properties to set */ - function AudienceFilterExpressionList(properties) { + function ChannelGroupFilterExpressionList(properties) { this.filterExpressions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -44150,78 +52208,78 @@ } /** - * AudienceFilterExpressionList filterExpressions. - * @member {Array.} filterExpressions - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * ChannelGroupFilterExpressionList filterExpressions. + * @member {Array.} filterExpressions + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList * @instance */ - AudienceFilterExpressionList.prototype.filterExpressions = $util.emptyArray; + ChannelGroupFilterExpressionList.prototype.filterExpressions = $util.emptyArray; /** - * Creates a new AudienceFilterExpressionList instance using the specified properties. + * Creates a new ChannelGroupFilterExpressionList instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList * @static - * @param {google.analytics.admin.v1alpha.IAudienceFilterExpressionList=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.AudienceFilterExpressionList} AudienceFilterExpressionList instance + * @param {google.analytics.admin.v1alpha.IChannelGroupFilterExpressionList=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList} ChannelGroupFilterExpressionList instance */ - AudienceFilterExpressionList.create = function create(properties) { - return new AudienceFilterExpressionList(properties); + ChannelGroupFilterExpressionList.create = function create(properties) { + return new ChannelGroupFilterExpressionList(properties); }; /** - * Encodes the specified AudienceFilterExpressionList message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpressionList.verify|verify} messages. + * Encodes the specified ChannelGroupFilterExpressionList message. Does not implicitly {@link google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList * @static - * @param {google.analytics.admin.v1alpha.IAudienceFilterExpressionList} message AudienceFilterExpressionList message or plain object to encode + * @param {google.analytics.admin.v1alpha.IChannelGroupFilterExpressionList} message ChannelGroupFilterExpressionList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudienceFilterExpressionList.encode = function encode(message, writer) { + ChannelGroupFilterExpressionList.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.filterExpressions != null && message.filterExpressions.length) for (var i = 0; i < message.filterExpressions.length; ++i) - $root.google.analytics.admin.v1alpha.AudienceFilterExpression.encode(message.filterExpressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.analytics.admin.v1alpha.ChannelGroupFilterExpression.encode(message.filterExpressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified AudienceFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpressionList.verify|verify} messages. + * Encodes the specified ChannelGroupFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList * @static - * @param {google.analytics.admin.v1alpha.IAudienceFilterExpressionList} message AudienceFilterExpressionList message or plain object to encode + * @param {google.analytics.admin.v1alpha.IChannelGroupFilterExpressionList} message ChannelGroupFilterExpressionList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudienceFilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { + ChannelGroupFilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AudienceFilterExpressionList message from the specified reader or buffer. + * Decodes a ChannelGroupFilterExpressionList message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList * @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.AudienceFilterExpressionList} AudienceFilterExpressionList + * @returns {google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList} ChannelGroupFilterExpressionList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudienceFilterExpressionList.decode = function decode(reader, length) { + ChannelGroupFilterExpressionList.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (!(message.filterExpressions && message.filterExpressions.length)) message.filterExpressions = []; - message.filterExpressions.push($root.google.analytics.admin.v1alpha.AudienceFilterExpression.decode(reader, reader.uint32())); + message.filterExpressions.push($root.google.analytics.admin.v1alpha.ChannelGroupFilterExpression.decode(reader, reader.uint32())); break; } default: @@ -44233,37 +52291,37 @@ }; /** - * Decodes an AudienceFilterExpressionList message from the specified reader or buffer, length delimited. + * Decodes a ChannelGroupFilterExpressionList message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.AudienceFilterExpressionList} AudienceFilterExpressionList + * @returns {google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList} ChannelGroupFilterExpressionList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudienceFilterExpressionList.decodeDelimited = function decodeDelimited(reader) { + ChannelGroupFilterExpressionList.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AudienceFilterExpressionList message. + * Verifies a ChannelGroupFilterExpressionList message. * @function verify - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AudienceFilterExpressionList.verify = function verify(message) { + ChannelGroupFilterExpressionList.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.filterExpressions != null && message.hasOwnProperty("filterExpressions")) { if (!Array.isArray(message.filterExpressions)) return "filterExpressions: array expected"; for (var i = 0; i < message.filterExpressions.length; ++i) { - var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.verify(message.filterExpressions[i]); + var error = $root.google.analytics.admin.v1alpha.ChannelGroupFilterExpression.verify(message.filterExpressions[i]); if (error) return "filterExpressions." + error; } @@ -44272,364 +52330,101 @@ }; /** - * Creates an AudienceFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * Creates a ChannelGroupFilterExpressionList message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.AudienceFilterExpressionList} AudienceFilterExpressionList + * @returns {google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList} ChannelGroupFilterExpressionList */ - AudienceFilterExpressionList.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList) + ChannelGroupFilterExpressionList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList) return object; - var message = new $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList(); + var message = new $root.google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList(); if (object.filterExpressions) { if (!Array.isArray(object.filterExpressions)) - throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpressionList.filterExpressions: array expected"); + throw TypeError(".google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList.filterExpressions: array expected"); message.filterExpressions = []; for (var i = 0; i < object.filterExpressions.length; ++i) { if (typeof object.filterExpressions[i] !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpressionList.filterExpressions: object expected"); - message.filterExpressions[i] = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.fromObject(object.filterExpressions[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an AudienceFilterExpressionList message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList - * @static - * @param {google.analytics.admin.v1alpha.AudienceFilterExpressionList} message AudienceFilterExpressionList - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AudienceFilterExpressionList.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.filterExpressions = []; - if (message.filterExpressions && message.filterExpressions.length) { - object.filterExpressions = []; - for (var j = 0; j < message.filterExpressions.length; ++j) - object.filterExpressions[j] = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.toObject(message.filterExpressions[j], options); - } - return object; - }; - - /** - * Converts this AudienceFilterExpressionList to JSON. - * @function toJSON - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList - * @instance - * @returns {Object.} JSON object - */ - AudienceFilterExpressionList.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AudienceFilterExpressionList - * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AudienceFilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceFilterExpressionList"; - }; - - return AudienceFilterExpressionList; - })(); - - v1alpha.AudienceSimpleFilter = (function() { - - /** - * Properties of an AudienceSimpleFilter. - * @memberof google.analytics.admin.v1alpha - * @interface IAudienceSimpleFilter - * @property {google.analytics.admin.v1alpha.AudienceFilterScope|null} [scope] AudienceSimpleFilter scope - * @property {google.analytics.admin.v1alpha.IAudienceFilterExpression|null} [filterExpression] AudienceSimpleFilter filterExpression - */ - - /** - * Constructs a new AudienceSimpleFilter. - * @memberof google.analytics.admin.v1alpha - * @classdesc Represents an AudienceSimpleFilter. - * @implements IAudienceSimpleFilter - * @constructor - * @param {google.analytics.admin.v1alpha.IAudienceSimpleFilter=} [properties] Properties to set - */ - function AudienceSimpleFilter(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]]; - } - - /** - * AudienceSimpleFilter scope. - * @member {google.analytics.admin.v1alpha.AudienceFilterScope} scope - * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter - * @instance - */ - AudienceSimpleFilter.prototype.scope = 0; - - /** - * AudienceSimpleFilter filterExpression. - * @member {google.analytics.admin.v1alpha.IAudienceFilterExpression|null|undefined} filterExpression - * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter - * @instance - */ - AudienceSimpleFilter.prototype.filterExpression = null; - - /** - * Creates a new AudienceSimpleFilter instance using the specified properties. - * @function create - * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter - * @static - * @param {google.analytics.admin.v1alpha.IAudienceSimpleFilter=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.AudienceSimpleFilter} AudienceSimpleFilter instance - */ - AudienceSimpleFilter.create = function create(properties) { - return new AudienceSimpleFilter(properties); - }; - - /** - * Encodes the specified AudienceSimpleFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSimpleFilter.verify|verify} messages. - * @function encode - * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter - * @static - * @param {google.analytics.admin.v1alpha.IAudienceSimpleFilter} message AudienceSimpleFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudienceSimpleFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.scope); - if (message.filterExpression != null && Object.hasOwnProperty.call(message, "filterExpression")) - $root.google.analytics.admin.v1alpha.AudienceFilterExpression.encode(message.filterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AudienceSimpleFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSimpleFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter - * @static - * @param {google.analytics.admin.v1alpha.IAudienceSimpleFilter} message AudienceSimpleFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudienceSimpleFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AudienceSimpleFilter message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter - * @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.AudienceSimpleFilter} AudienceSimpleFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudienceSimpleFilter.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceSimpleFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.scope = reader.int32(); - break; - } - case 2: { - message.filterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AudienceSimpleFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.AudienceSimpleFilter} AudienceSimpleFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudienceSimpleFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AudienceSimpleFilter message. - * @function verify - * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AudienceSimpleFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.scope != null && message.hasOwnProperty("scope")) - switch (message.scope) { - default: - return "scope: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.filterExpression != null && message.hasOwnProperty("filterExpression")) { - var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.verify(message.filterExpression); - if (error) - return "filterExpression." + error; - } - return null; - }; - - /** - * Creates an AudienceSimpleFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.AudienceSimpleFilter} AudienceSimpleFilter - */ - AudienceSimpleFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.AudienceSimpleFilter) - return object; - var message = new $root.google.analytics.admin.v1alpha.AudienceSimpleFilter(); - switch (object.scope) { - default: - if (typeof object.scope === "number") { - message.scope = object.scope; - break; + throw TypeError(".google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList.filterExpressions: object expected"); + message.filterExpressions[i] = $root.google.analytics.admin.v1alpha.ChannelGroupFilterExpression.fromObject(object.filterExpressions[i]); } - break; - case "AUDIENCE_FILTER_SCOPE_UNSPECIFIED": - case 0: - message.scope = 0; - break; - case "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT": - case 1: - message.scope = 1; - break; - case "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION": - case 2: - message.scope = 2; - break; - case "AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS": - case 3: - message.scope = 3; - break; - } - if (object.filterExpression != null) { - if (typeof object.filterExpression !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceSimpleFilter.filterExpression: object expected"); - message.filterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.fromObject(object.filterExpression); } return message; }; /** - * Creates a plain object from an AudienceSimpleFilter message. Also converts values to other types if specified. + * Creates a plain object from a ChannelGroupFilterExpressionList message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList * @static - * @param {google.analytics.admin.v1alpha.AudienceSimpleFilter} message AudienceSimpleFilter + * @param {google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList} message ChannelGroupFilterExpressionList * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AudienceSimpleFilter.toObject = function toObject(message, options) { + ChannelGroupFilterExpressionList.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.scope = options.enums === String ? "AUDIENCE_FILTER_SCOPE_UNSPECIFIED" : 0; - object.filterExpression = null; + if (options.arrays || options.defaults) + object.filterExpressions = []; + if (message.filterExpressions && message.filterExpressions.length) { + object.filterExpressions = []; + for (var j = 0; j < message.filterExpressions.length; ++j) + object.filterExpressions[j] = $root.google.analytics.admin.v1alpha.ChannelGroupFilterExpression.toObject(message.filterExpressions[j], options); } - if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] === undefined ? message.scope : $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] : message.scope; - if (message.filterExpression != null && message.hasOwnProperty("filterExpression")) - object.filterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.toObject(message.filterExpression, options); return object; }; /** - * Converts this AudienceSimpleFilter to JSON. + * Converts this ChannelGroupFilterExpressionList to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList * @instance * @returns {Object.} JSON object */ - AudienceSimpleFilter.prototype.toJSON = function toJSON() { + ChannelGroupFilterExpressionList.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AudienceSimpleFilter + * Gets the default type url for ChannelGroupFilterExpressionList * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @memberof google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AudienceSimpleFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ChannelGroupFilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceSimpleFilter"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ChannelGroupFilterExpressionList"; }; - return AudienceSimpleFilter; + return ChannelGroupFilterExpressionList; })(); - v1alpha.AudienceSequenceFilter = (function() { + v1alpha.GroupingRule = (function() { /** - * Properties of an AudienceSequenceFilter. + * Properties of a GroupingRule. * @memberof google.analytics.admin.v1alpha - * @interface IAudienceSequenceFilter - * @property {google.analytics.admin.v1alpha.AudienceFilterScope|null} [scope] AudienceSequenceFilter scope - * @property {google.protobuf.IDuration|null} [sequenceMaximumDuration] AudienceSequenceFilter sequenceMaximumDuration - * @property {Array.|null} [sequenceSteps] AudienceSequenceFilter sequenceSteps + * @interface IGroupingRule + * @property {string|null} [displayName] GroupingRule displayName + * @property {google.analytics.admin.v1alpha.IChannelGroupFilterExpression|null} [expression] GroupingRule expression */ /** - * Constructs a new AudienceSequenceFilter. + * Constructs a new GroupingRule. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents an AudienceSequenceFilter. - * @implements IAudienceSequenceFilter + * @classdesc Represents a GroupingRule. + * @implements IGroupingRule * @constructor - * @param {google.analytics.admin.v1alpha.IAudienceSequenceFilter=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IGroupingRule=} [properties] Properties to set */ - function AudienceSequenceFilter(properties) { - this.sequenceSteps = []; + function GroupingRule(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -44637,106 +52432,89 @@ } /** - * AudienceSequenceFilter scope. - * @member {google.analytics.admin.v1alpha.AudienceFilterScope} scope - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter - * @instance - */ - AudienceSequenceFilter.prototype.scope = 0; - - /** - * AudienceSequenceFilter sequenceMaximumDuration. - * @member {google.protobuf.IDuration|null|undefined} sequenceMaximumDuration - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * GroupingRule displayName. + * @member {string} displayName + * @memberof google.analytics.admin.v1alpha.GroupingRule * @instance */ - AudienceSequenceFilter.prototype.sequenceMaximumDuration = null; + GroupingRule.prototype.displayName = ""; /** - * AudienceSequenceFilter sequenceSteps. - * @member {Array.} sequenceSteps - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * GroupingRule expression. + * @member {google.analytics.admin.v1alpha.IChannelGroupFilterExpression|null|undefined} expression + * @memberof google.analytics.admin.v1alpha.GroupingRule * @instance */ - AudienceSequenceFilter.prototype.sequenceSteps = $util.emptyArray; + GroupingRule.prototype.expression = null; /** - * Creates a new AudienceSequenceFilter instance using the specified properties. + * Creates a new GroupingRule instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @memberof google.analytics.admin.v1alpha.GroupingRule * @static - * @param {google.analytics.admin.v1alpha.IAudienceSequenceFilter=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter} AudienceSequenceFilter instance + * @param {google.analytics.admin.v1alpha.IGroupingRule=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.GroupingRule} GroupingRule instance */ - AudienceSequenceFilter.create = function create(properties) { - return new AudienceSequenceFilter(properties); + GroupingRule.create = function create(properties) { + return new GroupingRule(properties); }; /** - * Encodes the specified AudienceSequenceFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.verify|verify} messages. + * Encodes the specified GroupingRule message. Does not implicitly {@link google.analytics.admin.v1alpha.GroupingRule.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @memberof google.analytics.admin.v1alpha.GroupingRule * @static - * @param {google.analytics.admin.v1alpha.IAudienceSequenceFilter} message AudienceSequenceFilter message or plain object to encode + * @param {google.analytics.admin.v1alpha.IGroupingRule} message GroupingRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudienceSequenceFilter.encode = function encode(message, writer) { + GroupingRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.scope); - if (message.sequenceMaximumDuration != null && Object.hasOwnProperty.call(message, "sequenceMaximumDuration")) - $root.google.protobuf.Duration.encode(message.sequenceMaximumDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.sequenceSteps != null && message.sequenceSteps.length) - for (var i = 0; i < message.sequenceSteps.length; ++i) - $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.encode(message.sequenceSteps[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) + $root.google.analytics.admin.v1alpha.ChannelGroupFilterExpression.encode(message.expression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified AudienceSequenceFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.verify|verify} messages. + * Encodes the specified GroupingRule message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GroupingRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @memberof google.analytics.admin.v1alpha.GroupingRule * @static - * @param {google.analytics.admin.v1alpha.IAudienceSequenceFilter} message AudienceSequenceFilter message or plain object to encode + * @param {google.analytics.admin.v1alpha.IGroupingRule} message GroupingRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudienceSequenceFilter.encodeDelimited = function encodeDelimited(message, writer) { + GroupingRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AudienceSequenceFilter message from the specified reader or buffer. + * Decodes a GroupingRule message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @memberof google.analytics.admin.v1alpha.GroupingRule * @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.AudienceSequenceFilter} AudienceSequenceFilter + * @returns {google.analytics.admin.v1alpha.GroupingRule} GroupingRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudienceSequenceFilter.decode = function decode(reader, length) { + GroupingRule.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceSequenceFilter(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GroupingRule(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.scope = reader.int32(); + message.displayName = reader.string(); break; } case 2: { - message.sequenceMaximumDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 3: { - if (!(message.sequenceSteps && message.sequenceSteps.length)) - message.sequenceSteps = []; - message.sequenceSteps.push($root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.decode(reader, reader.uint32())); + message.expression = $root.google.analytics.admin.v1alpha.ChannelGroupFilterExpression.decode(reader, reader.uint32()); break; } default: @@ -44748,505 +52526,141 @@ }; /** - * Decodes an AudienceSequenceFilter message from the specified reader or buffer, length delimited. + * Decodes a GroupingRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @memberof google.analytics.admin.v1alpha.GroupingRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter} AudienceSequenceFilter + * @returns {google.analytics.admin.v1alpha.GroupingRule} GroupingRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudienceSequenceFilter.decodeDelimited = function decodeDelimited(reader) { + GroupingRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AudienceSequenceFilter message. + * Verifies a GroupingRule message. * @function verify - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @memberof google.analytics.admin.v1alpha.GroupingRule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AudienceSequenceFilter.verify = function verify(message) { + GroupingRule.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.scope != null && message.hasOwnProperty("scope")) - switch (message.scope) { - default: - return "scope: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.sequenceMaximumDuration != null && message.hasOwnProperty("sequenceMaximumDuration")) { - var error = $root.google.protobuf.Duration.verify(message.sequenceMaximumDuration); + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.expression != null && message.hasOwnProperty("expression")) { + var error = $root.google.analytics.admin.v1alpha.ChannelGroupFilterExpression.verify(message.expression); if (error) - return "sequenceMaximumDuration." + error; - } - if (message.sequenceSteps != null && message.hasOwnProperty("sequenceSteps")) { - if (!Array.isArray(message.sequenceSteps)) - return "sequenceSteps: array expected"; - for (var i = 0; i < message.sequenceSteps.length; ++i) { - var error = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.verify(message.sequenceSteps[i]); - if (error) - return "sequenceSteps." + error; - } + return "expression." + error; } return null; }; /** - * Creates an AudienceSequenceFilter message from a plain object. Also converts values to their respective internal types. + * Creates a GroupingRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @memberof google.analytics.admin.v1alpha.GroupingRule * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter} AudienceSequenceFilter + * @returns {google.analytics.admin.v1alpha.GroupingRule} GroupingRule */ - AudienceSequenceFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.AudienceSequenceFilter) + GroupingRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.GroupingRule) return object; - var message = new $root.google.analytics.admin.v1alpha.AudienceSequenceFilter(); - switch (object.scope) { - default: - if (typeof object.scope === "number") { - message.scope = object.scope; - break; - } - break; - case "AUDIENCE_FILTER_SCOPE_UNSPECIFIED": - case 0: - message.scope = 0; - break; - case "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT": - case 1: - message.scope = 1; - break; - case "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION": - case 2: - message.scope = 2; - break; - case "AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS": - case 3: - message.scope = 3; - break; - } - if (object.sequenceMaximumDuration != null) { - if (typeof object.sequenceMaximumDuration !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceSequenceFilter.sequenceMaximumDuration: object expected"); - message.sequenceMaximumDuration = $root.google.protobuf.Duration.fromObject(object.sequenceMaximumDuration); - } - if (object.sequenceSteps) { - if (!Array.isArray(object.sequenceSteps)) - throw TypeError(".google.analytics.admin.v1alpha.AudienceSequenceFilter.sequenceSteps: array expected"); - message.sequenceSteps = []; - for (var i = 0; i < object.sequenceSteps.length; ++i) { - if (typeof object.sequenceSteps[i] !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceSequenceFilter.sequenceSteps: object expected"); - message.sequenceSteps[i] = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.fromObject(object.sequenceSteps[i]); - } + var message = new $root.google.analytics.admin.v1alpha.GroupingRule(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.expression != null) { + if (typeof object.expression !== "object") + throw TypeError(".google.analytics.admin.v1alpha.GroupingRule.expression: object expected"); + message.expression = $root.google.analytics.admin.v1alpha.ChannelGroupFilterExpression.fromObject(object.expression); } return message; }; /** - * Creates a plain object from an AudienceSequenceFilter message. Also converts values to other types if specified. + * Creates a plain object from a GroupingRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @memberof google.analytics.admin.v1alpha.GroupingRule * @static - * @param {google.analytics.admin.v1alpha.AudienceSequenceFilter} message AudienceSequenceFilter + * @param {google.analytics.admin.v1alpha.GroupingRule} message GroupingRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AudienceSequenceFilter.toObject = function toObject(message, options) { + GroupingRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.sequenceSteps = []; if (options.defaults) { - object.scope = options.enums === String ? "AUDIENCE_FILTER_SCOPE_UNSPECIFIED" : 0; - object.sequenceMaximumDuration = null; - } - if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] === undefined ? message.scope : $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] : message.scope; - if (message.sequenceMaximumDuration != null && message.hasOwnProperty("sequenceMaximumDuration")) - object.sequenceMaximumDuration = $root.google.protobuf.Duration.toObject(message.sequenceMaximumDuration, options); - if (message.sequenceSteps && message.sequenceSteps.length) { - object.sequenceSteps = []; - for (var j = 0; j < message.sequenceSteps.length; ++j) - object.sequenceSteps[j] = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.toObject(message.sequenceSteps[j], options); + object.displayName = ""; + object.expression = null; } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.expression != null && message.hasOwnProperty("expression")) + object.expression = $root.google.analytics.admin.v1alpha.ChannelGroupFilterExpression.toObject(message.expression, options); return object; }; /** - * Converts this AudienceSequenceFilter to JSON. + * Converts this GroupingRule to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @memberof google.analytics.admin.v1alpha.GroupingRule * @instance * @returns {Object.} JSON object */ - AudienceSequenceFilter.prototype.toJSON = function toJSON() { + GroupingRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AudienceSequenceFilter + * Gets the default type url for GroupingRule * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @memberof google.analytics.admin.v1alpha.GroupingRule * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AudienceSequenceFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GroupingRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceSequenceFilter"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.GroupingRule"; }; - AudienceSequenceFilter.AudienceSequenceStep = (function() { - - /** - * Properties of an AudienceSequenceStep. - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter - * @interface IAudienceSequenceStep - * @property {google.analytics.admin.v1alpha.AudienceFilterScope|null} [scope] AudienceSequenceStep scope - * @property {boolean|null} [immediatelyFollows] AudienceSequenceStep immediatelyFollows - * @property {google.protobuf.IDuration|null} [constraintDuration] AudienceSequenceStep constraintDuration - * @property {google.analytics.admin.v1alpha.IAudienceFilterExpression|null} [filterExpression] AudienceSequenceStep filterExpression - */ - - /** - * Constructs a new AudienceSequenceStep. - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter - * @classdesc Represents an AudienceSequenceStep. - * @implements IAudienceSequenceStep - * @constructor - * @param {google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep=} [properties] Properties to set - */ - function AudienceSequenceStep(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]]; - } - - /** - * AudienceSequenceStep scope. - * @member {google.analytics.admin.v1alpha.AudienceFilterScope} scope - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep - * @instance - */ - AudienceSequenceStep.prototype.scope = 0; - - /** - * AudienceSequenceStep immediatelyFollows. - * @member {boolean} immediatelyFollows - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep - * @instance - */ - AudienceSequenceStep.prototype.immediatelyFollows = false; - - /** - * AudienceSequenceStep constraintDuration. - * @member {google.protobuf.IDuration|null|undefined} constraintDuration - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep - * @instance - */ - AudienceSequenceStep.prototype.constraintDuration = null; - - /** - * AudienceSequenceStep filterExpression. - * @member {google.analytics.admin.v1alpha.IAudienceFilterExpression|null|undefined} filterExpression - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep - * @instance - */ - AudienceSequenceStep.prototype.filterExpression = null; - - /** - * Creates a new AudienceSequenceStep instance using the specified properties. - * @function create - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep - * @static - * @param {google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep} AudienceSequenceStep instance - */ - AudienceSequenceStep.create = function create(properties) { - return new AudienceSequenceStep(properties); - }; - - /** - * Encodes the specified AudienceSequenceStep message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.verify|verify} messages. - * @function encode - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep - * @static - * @param {google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep} message AudienceSequenceStep message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudienceSequenceStep.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.scope); - if (message.immediatelyFollows != null && Object.hasOwnProperty.call(message, "immediatelyFollows")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.immediatelyFollows); - if (message.constraintDuration != null && Object.hasOwnProperty.call(message, "constraintDuration")) - $root.google.protobuf.Duration.encode(message.constraintDuration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.filterExpression != null && Object.hasOwnProperty.call(message, "filterExpression")) - $root.google.analytics.admin.v1alpha.AudienceFilterExpression.encode(message.filterExpression, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AudienceSequenceStep message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.verify|verify} messages. - * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep - * @static - * @param {google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep} message AudienceSequenceStep message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AudienceSequenceStep.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AudienceSequenceStep message from the specified reader or buffer. - * @function decode - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep - * @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.AudienceSequenceFilter.AudienceSequenceStep} AudienceSequenceStep - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudienceSequenceStep.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.scope = reader.int32(); - break; - } - case 2: { - message.immediatelyFollows = reader.bool(); - break; - } - case 3: { - message.constraintDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 4: { - message.filterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AudienceSequenceStep message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep} AudienceSequenceStep - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AudienceSequenceStep.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AudienceSequenceStep message. - * @function verify - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AudienceSequenceStep.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.scope != null && message.hasOwnProperty("scope")) - switch (message.scope) { - default: - return "scope: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.immediatelyFollows != null && message.hasOwnProperty("immediatelyFollows")) - if (typeof message.immediatelyFollows !== "boolean") - return "immediatelyFollows: boolean expected"; - if (message.constraintDuration != null && message.hasOwnProperty("constraintDuration")) { - var error = $root.google.protobuf.Duration.verify(message.constraintDuration); - if (error) - return "constraintDuration." + error; - } - if (message.filterExpression != null && message.hasOwnProperty("filterExpression")) { - var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.verify(message.filterExpression); - if (error) - return "filterExpression." + error; - } - return null; - }; - - /** - * Creates an AudienceSequenceStep message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep - * @static - * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep} AudienceSequenceStep - */ - AudienceSequenceStep.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep) - return object; - var message = new $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep(); - switch (object.scope) { - default: - if (typeof object.scope === "number") { - message.scope = object.scope; - break; - } - break; - case "AUDIENCE_FILTER_SCOPE_UNSPECIFIED": - case 0: - message.scope = 0; - break; - case "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT": - case 1: - message.scope = 1; - break; - case "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION": - case 2: - message.scope = 2; - break; - case "AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS": - case 3: - message.scope = 3; - break; - } - if (object.immediatelyFollows != null) - message.immediatelyFollows = Boolean(object.immediatelyFollows); - if (object.constraintDuration != null) { - if (typeof object.constraintDuration !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.constraintDuration: object expected"); - message.constraintDuration = $root.google.protobuf.Duration.fromObject(object.constraintDuration); - } - if (object.filterExpression != null) { - if (typeof object.filterExpression !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.filterExpression: object expected"); - message.filterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.fromObject(object.filterExpression); - } - return message; - }; - - /** - * Creates a plain object from an AudienceSequenceStep message. Also converts values to other types if specified. - * @function toObject - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep - * @static - * @param {google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep} message AudienceSequenceStep - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AudienceSequenceStep.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.scope = options.enums === String ? "AUDIENCE_FILTER_SCOPE_UNSPECIFIED" : 0; - object.immediatelyFollows = false; - object.constraintDuration = null; - object.filterExpression = null; - } - if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] === undefined ? message.scope : $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] : message.scope; - if (message.immediatelyFollows != null && message.hasOwnProperty("immediatelyFollows")) - object.immediatelyFollows = message.immediatelyFollows; - if (message.constraintDuration != null && message.hasOwnProperty("constraintDuration")) - object.constraintDuration = $root.google.protobuf.Duration.toObject(message.constraintDuration, options); - if (message.filterExpression != null && message.hasOwnProperty("filterExpression")) - object.filterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.toObject(message.filterExpression, options); - return object; - }; - - /** - * Converts this AudienceSequenceStep to JSON. - * @function toJSON - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep - * @instance - * @returns {Object.} JSON object - */ - AudienceSequenceStep.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AudienceSequenceStep - * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AudienceSequenceStep.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep"; - }; - - return AudienceSequenceStep; - })(); - - return AudienceSequenceFilter; + return GroupingRule; })(); - v1alpha.AudienceFilterClause = (function() { + v1alpha.ChannelGroup = (function() { /** - * Properties of an AudienceFilterClause. + * Properties of a ChannelGroup. * @memberof google.analytics.admin.v1alpha - * @interface IAudienceFilterClause - * @property {google.analytics.admin.v1alpha.IAudienceSimpleFilter|null} [simpleFilter] AudienceFilterClause simpleFilter - * @property {google.analytics.admin.v1alpha.IAudienceSequenceFilter|null} [sequenceFilter] AudienceFilterClause sequenceFilter - * @property {google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType|null} [clauseType] AudienceFilterClause clauseType + * @interface IChannelGroup + * @property {string|null} [name] ChannelGroup name + * @property {string|null} [displayName] ChannelGroup displayName + * @property {string|null} [description] ChannelGroup description + * @property {Array.|null} [groupingRule] ChannelGroup groupingRule + * @property {boolean|null} [systemDefined] ChannelGroup systemDefined */ /** - * Constructs a new AudienceFilterClause. + * Constructs a new ChannelGroup. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents an AudienceFilterClause. - * @implements IAudienceFilterClause + * @classdesc Represents a ChannelGroup. + * @implements IChannelGroup * @constructor - * @param {google.analytics.admin.v1alpha.IAudienceFilterClause=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IChannelGroup=} [properties] Properties to set */ - function AudienceFilterClause(properties) { + function ChannelGroup(properties) { + this.groupingRule = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -45254,117 +52668,134 @@ } /** - * AudienceFilterClause simpleFilter. - * @member {google.analytics.admin.v1alpha.IAudienceSimpleFilter|null|undefined} simpleFilter - * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * ChannelGroup name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.ChannelGroup * @instance */ - AudienceFilterClause.prototype.simpleFilter = null; + ChannelGroup.prototype.name = ""; /** - * AudienceFilterClause sequenceFilter. - * @member {google.analytics.admin.v1alpha.IAudienceSequenceFilter|null|undefined} sequenceFilter - * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * ChannelGroup displayName. + * @member {string} displayName + * @memberof google.analytics.admin.v1alpha.ChannelGroup * @instance */ - AudienceFilterClause.prototype.sequenceFilter = null; + ChannelGroup.prototype.displayName = ""; /** - * AudienceFilterClause clauseType. - * @member {google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType} clauseType - * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * ChannelGroup description. + * @member {string} description + * @memberof google.analytics.admin.v1alpha.ChannelGroup * @instance */ - AudienceFilterClause.prototype.clauseType = 0; + ChannelGroup.prototype.description = ""; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * ChannelGroup groupingRule. + * @member {Array.} groupingRule + * @memberof google.analytics.admin.v1alpha.ChannelGroup + * @instance + */ + ChannelGroup.prototype.groupingRule = $util.emptyArray; /** - * AudienceFilterClause filter. - * @member {"simpleFilter"|"sequenceFilter"|undefined} filter - * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * ChannelGroup systemDefined. + * @member {boolean} systemDefined + * @memberof google.analytics.admin.v1alpha.ChannelGroup * @instance */ - Object.defineProperty(AudienceFilterClause.prototype, "filter", { - get: $util.oneOfGetter($oneOfFields = ["simpleFilter", "sequenceFilter"]), - set: $util.oneOfSetter($oneOfFields) - }); + ChannelGroup.prototype.systemDefined = false; /** - * Creates a new AudienceFilterClause instance using the specified properties. + * Creates a new ChannelGroup instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @memberof google.analytics.admin.v1alpha.ChannelGroup * @static - * @param {google.analytics.admin.v1alpha.IAudienceFilterClause=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.AudienceFilterClause} AudienceFilterClause instance + * @param {google.analytics.admin.v1alpha.IChannelGroup=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ChannelGroup} ChannelGroup instance */ - AudienceFilterClause.create = function create(properties) { - return new AudienceFilterClause(properties); + ChannelGroup.create = function create(properties) { + return new ChannelGroup(properties); }; /** - * Encodes the specified AudienceFilterClause message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterClause.verify|verify} messages. + * Encodes the specified ChannelGroup message. Does not implicitly {@link google.analytics.admin.v1alpha.ChannelGroup.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @memberof google.analytics.admin.v1alpha.ChannelGroup * @static - * @param {google.analytics.admin.v1alpha.IAudienceFilterClause} message AudienceFilterClause message or plain object to encode + * @param {google.analytics.admin.v1alpha.IChannelGroup} message ChannelGroup message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudienceFilterClause.encode = function encode(message, writer) { + ChannelGroup.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.clauseType != null && Object.hasOwnProperty.call(message, "clauseType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.clauseType); - if (message.simpleFilter != null && Object.hasOwnProperty.call(message, "simpleFilter")) - $root.google.analytics.admin.v1alpha.AudienceSimpleFilter.encode(message.simpleFilter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.sequenceFilter != null && Object.hasOwnProperty.call(message, "sequenceFilter")) - $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.encode(message.sequenceFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + 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.groupingRule != null && message.groupingRule.length) + for (var i = 0; i < message.groupingRule.length; ++i) + $root.google.analytics.admin.v1alpha.GroupingRule.encode(message.groupingRule[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.systemDefined != null && Object.hasOwnProperty.call(message, "systemDefined")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.systemDefined); return writer; }; /** - * Encodes the specified AudienceFilterClause message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterClause.verify|verify} messages. + * Encodes the specified ChannelGroup message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ChannelGroup.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @memberof google.analytics.admin.v1alpha.ChannelGroup * @static - * @param {google.analytics.admin.v1alpha.IAudienceFilterClause} message AudienceFilterClause message or plain object to encode + * @param {google.analytics.admin.v1alpha.IChannelGroup} message ChannelGroup message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudienceFilterClause.encodeDelimited = function encodeDelimited(message, writer) { + ChannelGroup.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AudienceFilterClause message from the specified reader or buffer. + * Decodes a ChannelGroup message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @memberof google.analytics.admin.v1alpha.ChannelGroup * @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.AudienceFilterClause} AudienceFilterClause + * @returns {google.analytics.admin.v1alpha.ChannelGroup} ChannelGroup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudienceFilterClause.decode = function decode(reader, length) { + ChannelGroup.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceFilterClause(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ChannelGroup(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } case 2: { - message.simpleFilter = $root.google.analytics.admin.v1alpha.AudienceSimpleFilter.decode(reader, reader.uint32()); + message.displayName = reader.string(); break; } case 3: { - message.sequenceFilter = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.decode(reader, reader.uint32()); + message.description = reader.string(); break; } - case 1: { - message.clauseType = reader.int32(); + case 4: { + if (!(message.groupingRule && message.groupingRule.length)) + message.groupingRule = []; + message.groupingRule.push($root.google.analytics.admin.v1alpha.GroupingRule.decode(reader, reader.uint32())); + break; + } + case 5: { + message.systemDefined = reader.bool(); break; } default: @@ -45376,202 +52807,174 @@ }; /** - * Decodes an AudienceFilterClause message from the specified reader or buffer, length delimited. + * Decodes a ChannelGroup message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @memberof google.analytics.admin.v1alpha.ChannelGroup * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.AudienceFilterClause} AudienceFilterClause + * @returns {google.analytics.admin.v1alpha.ChannelGroup} ChannelGroup * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudienceFilterClause.decodeDelimited = function decodeDelimited(reader) { + ChannelGroup.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AudienceFilterClause message. + * Verifies a ChannelGroup message. * @function verify - * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @memberof google.analytics.admin.v1alpha.ChannelGroup * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AudienceFilterClause.verify = function verify(message) { + ChannelGroup.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.simpleFilter != null && message.hasOwnProperty("simpleFilter")) { - properties.filter = 1; - { - var error = $root.google.analytics.admin.v1alpha.AudienceSimpleFilter.verify(message.simpleFilter); - if (error) - return "simpleFilter." + error; - } - } - if (message.sequenceFilter != null && message.hasOwnProperty("sequenceFilter")) { - if (properties.filter === 1) - return "filter: multiple values"; - properties.filter = 1; - { - var error = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.verify(message.sequenceFilter); + 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.groupingRule != null && message.hasOwnProperty("groupingRule")) { + if (!Array.isArray(message.groupingRule)) + return "groupingRule: array expected"; + for (var i = 0; i < message.groupingRule.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.GroupingRule.verify(message.groupingRule[i]); if (error) - return "sequenceFilter." + error; + return "groupingRule." + error; } } - if (message.clauseType != null && message.hasOwnProperty("clauseType")) - switch (message.clauseType) { - default: - return "clauseType: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.systemDefined != null && message.hasOwnProperty("systemDefined")) + if (typeof message.systemDefined !== "boolean") + return "systemDefined: boolean expected"; return null; }; /** - * Creates an AudienceFilterClause message from a plain object. Also converts values to their respective internal types. + * Creates a ChannelGroup message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @memberof google.analytics.admin.v1alpha.ChannelGroup * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.AudienceFilterClause} AudienceFilterClause + * @returns {google.analytics.admin.v1alpha.ChannelGroup} ChannelGroup */ - AudienceFilterClause.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.AudienceFilterClause) + ChannelGroup.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ChannelGroup) return object; - var message = new $root.google.analytics.admin.v1alpha.AudienceFilterClause(); - if (object.simpleFilter != null) { - if (typeof object.simpleFilter !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterClause.simpleFilter: object expected"); - message.simpleFilter = $root.google.analytics.admin.v1alpha.AudienceSimpleFilter.fromObject(object.simpleFilter); - } - if (object.sequenceFilter != null) { - if (typeof object.sequenceFilter !== "object") - throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterClause.sequenceFilter: object expected"); - message.sequenceFilter = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.fromObject(object.sequenceFilter); - } - switch (object.clauseType) { - default: - if (typeof object.clauseType === "number") { - message.clauseType = object.clauseType; - break; + var message = new $root.google.analytics.admin.v1alpha.ChannelGroup(); + 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.groupingRule) { + if (!Array.isArray(object.groupingRule)) + throw TypeError(".google.analytics.admin.v1alpha.ChannelGroup.groupingRule: array expected"); + message.groupingRule = []; + for (var i = 0; i < object.groupingRule.length; ++i) { + if (typeof object.groupingRule[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChannelGroup.groupingRule: object expected"); + message.groupingRule[i] = $root.google.analytics.admin.v1alpha.GroupingRule.fromObject(object.groupingRule[i]); } - break; - case "AUDIENCE_CLAUSE_TYPE_UNSPECIFIED": - case 0: - message.clauseType = 0; - break; - case "INCLUDE": - case 1: - message.clauseType = 1; - break; - case "EXCLUDE": - case 2: - message.clauseType = 2; - break; } + if (object.systemDefined != null) + message.systemDefined = Boolean(object.systemDefined); return message; }; /** - * Creates a plain object from an AudienceFilterClause message. Also converts values to other types if specified. + * Creates a plain object from a ChannelGroup message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @memberof google.analytics.admin.v1alpha.ChannelGroup * @static - * @param {google.analytics.admin.v1alpha.AudienceFilterClause} message AudienceFilterClause + * @param {google.analytics.admin.v1alpha.ChannelGroup} message ChannelGroup * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AudienceFilterClause.toObject = function toObject(message, options) { + ChannelGroup.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.clauseType = options.enums === String ? "AUDIENCE_CLAUSE_TYPE_UNSPECIFIED" : 0; - if (message.clauseType != null && message.hasOwnProperty("clauseType")) - object.clauseType = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType[message.clauseType] === undefined ? message.clauseType : $root.google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType[message.clauseType] : message.clauseType; - if (message.simpleFilter != null && message.hasOwnProperty("simpleFilter")) { - object.simpleFilter = $root.google.analytics.admin.v1alpha.AudienceSimpleFilter.toObject(message.simpleFilter, options); - if (options.oneofs) - object.filter = "simpleFilter"; + if (options.arrays || options.defaults) + object.groupingRule = []; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.description = ""; + object.systemDefined = false; } - if (message.sequenceFilter != null && message.hasOwnProperty("sequenceFilter")) { - object.sequenceFilter = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.toObject(message.sequenceFilter, options); - if (options.oneofs) - object.filter = "sequenceFilter"; + 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.groupingRule && message.groupingRule.length) { + object.groupingRule = []; + for (var j = 0; j < message.groupingRule.length; ++j) + object.groupingRule[j] = $root.google.analytics.admin.v1alpha.GroupingRule.toObject(message.groupingRule[j], options); } + if (message.systemDefined != null && message.hasOwnProperty("systemDefined")) + object.systemDefined = message.systemDefined; return object; }; /** - * Converts this AudienceFilterClause to JSON. + * Converts this ChannelGroup to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @memberof google.analytics.admin.v1alpha.ChannelGroup * @instance * @returns {Object.} JSON object */ - AudienceFilterClause.prototype.toJSON = function toJSON() { + ChannelGroup.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AudienceFilterClause + * Gets the default type url for ChannelGroup * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @memberof google.analytics.admin.v1alpha.ChannelGroup * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AudienceFilterClause.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ChannelGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceFilterClause"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ChannelGroup"; }; - /** - * AudienceClauseType enum. - * @name google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType - * @enum {number} - * @property {number} AUDIENCE_CLAUSE_TYPE_UNSPECIFIED=0 AUDIENCE_CLAUSE_TYPE_UNSPECIFIED value - * @property {number} INCLUDE=1 INCLUDE value - * @property {number} EXCLUDE=2 EXCLUDE value - */ - AudienceFilterClause.AudienceClauseType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "AUDIENCE_CLAUSE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INCLUDE"] = 1; - values[valuesById[2] = "EXCLUDE"] = 2; - return values; - })(); - - return AudienceFilterClause; + return ChannelGroup; })(); - v1alpha.AudienceEventTrigger = (function() { + v1alpha.ParameterMutation = (function() { /** - * Properties of an AudienceEventTrigger. + * Properties of a ParameterMutation. * @memberof google.analytics.admin.v1alpha - * @interface IAudienceEventTrigger - * @property {string|null} [eventName] AudienceEventTrigger eventName - * @property {google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition|null} [logCondition] AudienceEventTrigger logCondition + * @interface IParameterMutation + * @property {string|null} [parameter] ParameterMutation parameter + * @property {string|null} [parameterValue] ParameterMutation parameterValue */ /** - * Constructs a new AudienceEventTrigger. + * Constructs a new ParameterMutation. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents an AudienceEventTrigger. - * @implements IAudienceEventTrigger + * @classdesc Represents a ParameterMutation. + * @implements IParameterMutation * @constructor - * @param {google.analytics.admin.v1alpha.IAudienceEventTrigger=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IParameterMutation=} [properties] Properties to set */ - function AudienceEventTrigger(properties) { + function ParameterMutation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -45579,89 +52982,89 @@ } /** - * AudienceEventTrigger eventName. - * @member {string} eventName - * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * ParameterMutation parameter. + * @member {string} parameter + * @memberof google.analytics.admin.v1alpha.ParameterMutation * @instance */ - AudienceEventTrigger.prototype.eventName = ""; + ParameterMutation.prototype.parameter = ""; /** - * AudienceEventTrigger logCondition. - * @member {google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition} logCondition - * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * ParameterMutation parameterValue. + * @member {string} parameterValue + * @memberof google.analytics.admin.v1alpha.ParameterMutation * @instance */ - AudienceEventTrigger.prototype.logCondition = 0; + ParameterMutation.prototype.parameterValue = ""; /** - * Creates a new AudienceEventTrigger instance using the specified properties. + * Creates a new ParameterMutation instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @memberof google.analytics.admin.v1alpha.ParameterMutation * @static - * @param {google.analytics.admin.v1alpha.IAudienceEventTrigger=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.AudienceEventTrigger} AudienceEventTrigger instance + * @param {google.analytics.admin.v1alpha.IParameterMutation=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ParameterMutation} ParameterMutation instance */ - AudienceEventTrigger.create = function create(properties) { - return new AudienceEventTrigger(properties); + ParameterMutation.create = function create(properties) { + return new ParameterMutation(properties); }; /** - * Encodes the specified AudienceEventTrigger message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventTrigger.verify|verify} messages. + * Encodes the specified ParameterMutation message. Does not implicitly {@link google.analytics.admin.v1alpha.ParameterMutation.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @memberof google.analytics.admin.v1alpha.ParameterMutation * @static - * @param {google.analytics.admin.v1alpha.IAudienceEventTrigger} message AudienceEventTrigger message or plain object to encode + * @param {google.analytics.admin.v1alpha.IParameterMutation} message ParameterMutation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudienceEventTrigger.encode = function encode(message, writer) { + ParameterMutation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.eventName != null && Object.hasOwnProperty.call(message, "eventName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventName); - if (message.logCondition != null && Object.hasOwnProperty.call(message, "logCondition")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.logCondition); + if (message.parameter != null && Object.hasOwnProperty.call(message, "parameter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parameter); + if (message.parameterValue != null && Object.hasOwnProperty.call(message, "parameterValue")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.parameterValue); return writer; }; /** - * Encodes the specified AudienceEventTrigger message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventTrigger.verify|verify} messages. + * Encodes the specified ParameterMutation message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ParameterMutation.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @memberof google.analytics.admin.v1alpha.ParameterMutation * @static - * @param {google.analytics.admin.v1alpha.IAudienceEventTrigger} message AudienceEventTrigger message or plain object to encode + * @param {google.analytics.admin.v1alpha.IParameterMutation} message ParameterMutation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AudienceEventTrigger.encodeDelimited = function encodeDelimited(message, writer) { + ParameterMutation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AudienceEventTrigger message from the specified reader or buffer. + * Decodes a ParameterMutation message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @memberof google.analytics.admin.v1alpha.ParameterMutation * @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.AudienceEventTrigger} AudienceEventTrigger + * @returns {google.analytics.admin.v1alpha.ParameterMutation} ParameterMutation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudienceEventTrigger.decode = function decode(reader, length) { + ParameterMutation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceEventTrigger(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ParameterMutation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.eventName = reader.string(); + message.parameter = reader.string(); break; } case 2: { - message.logCondition = reader.int32(); + message.parameterValue = reader.string(); break; } default: @@ -45673,179 +53076,137 @@ }; /** - * Decodes an AudienceEventTrigger message from the specified reader or buffer, length delimited. + * Decodes a ParameterMutation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @memberof google.analytics.admin.v1alpha.ParameterMutation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.AudienceEventTrigger} AudienceEventTrigger + * @returns {google.analytics.admin.v1alpha.ParameterMutation} ParameterMutation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AudienceEventTrigger.decodeDelimited = function decodeDelimited(reader) { + ParameterMutation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AudienceEventTrigger message. + * Verifies a ParameterMutation message. * @function verify - * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @memberof google.analytics.admin.v1alpha.ParameterMutation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AudienceEventTrigger.verify = function verify(message) { + ParameterMutation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eventName != null && message.hasOwnProperty("eventName")) - if (!$util.isString(message.eventName)) - return "eventName: string expected"; - if (message.logCondition != null && message.hasOwnProperty("logCondition")) - switch (message.logCondition) { - default: - return "logCondition: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.parameter != null && message.hasOwnProperty("parameter")) + if (!$util.isString(message.parameter)) + return "parameter: string expected"; + if (message.parameterValue != null && message.hasOwnProperty("parameterValue")) + if (!$util.isString(message.parameterValue)) + return "parameterValue: string expected"; return null; }; /** - * Creates an AudienceEventTrigger message from a plain object. Also converts values to their respective internal types. + * Creates a ParameterMutation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @memberof google.analytics.admin.v1alpha.ParameterMutation * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.AudienceEventTrigger} AudienceEventTrigger + * @returns {google.analytics.admin.v1alpha.ParameterMutation} ParameterMutation */ - AudienceEventTrigger.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.AudienceEventTrigger) + ParameterMutation.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ParameterMutation) return object; - var message = new $root.google.analytics.admin.v1alpha.AudienceEventTrigger(); - if (object.eventName != null) - message.eventName = String(object.eventName); - switch (object.logCondition) { - default: - if (typeof object.logCondition === "number") { - message.logCondition = object.logCondition; - break; - } - break; - case "LOG_CONDITION_UNSPECIFIED": - case 0: - message.logCondition = 0; - break; - case "AUDIENCE_JOINED": - case 1: - message.logCondition = 1; - break; - case "AUDIENCE_MEMBERSHIP_RENEWED": - case 2: - message.logCondition = 2; - break; - } + var message = new $root.google.analytics.admin.v1alpha.ParameterMutation(); + if (object.parameter != null) + message.parameter = String(object.parameter); + if (object.parameterValue != null) + message.parameterValue = String(object.parameterValue); return message; }; /** - * Creates a plain object from an AudienceEventTrigger message. Also converts values to other types if specified. + * Creates a plain object from a ParameterMutation message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @memberof google.analytics.admin.v1alpha.ParameterMutation * @static - * @param {google.analytics.admin.v1alpha.AudienceEventTrigger} message AudienceEventTrigger + * @param {google.analytics.admin.v1alpha.ParameterMutation} message ParameterMutation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AudienceEventTrigger.toObject = function toObject(message, options) { + ParameterMutation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.eventName = ""; - object.logCondition = options.enums === String ? "LOG_CONDITION_UNSPECIFIED" : 0; + object.parameter = ""; + object.parameterValue = ""; } - if (message.eventName != null && message.hasOwnProperty("eventName")) - object.eventName = message.eventName; - if (message.logCondition != null && message.hasOwnProperty("logCondition")) - object.logCondition = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition[message.logCondition] === undefined ? message.logCondition : $root.google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition[message.logCondition] : message.logCondition; + if (message.parameter != null && message.hasOwnProperty("parameter")) + object.parameter = message.parameter; + if (message.parameterValue != null && message.hasOwnProperty("parameterValue")) + object.parameterValue = message.parameterValue; return object; }; /** - * Converts this AudienceEventTrigger to JSON. + * Converts this ParameterMutation to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @memberof google.analytics.admin.v1alpha.ParameterMutation * @instance * @returns {Object.} JSON object */ - AudienceEventTrigger.prototype.toJSON = function toJSON() { + ParameterMutation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AudienceEventTrigger + * Gets the default type url for ParameterMutation * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @memberof google.analytics.admin.v1alpha.ParameterMutation * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AudienceEventTrigger.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ParameterMutation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceEventTrigger"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ParameterMutation"; }; - /** - * LogCondition enum. - * @name google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition - * @enum {number} - * @property {number} LOG_CONDITION_UNSPECIFIED=0 LOG_CONDITION_UNSPECIFIED value - * @property {number} AUDIENCE_JOINED=1 AUDIENCE_JOINED value - * @property {number} AUDIENCE_MEMBERSHIP_RENEWED=2 AUDIENCE_MEMBERSHIP_RENEWED value - */ - AudienceEventTrigger.LogCondition = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LOG_CONDITION_UNSPECIFIED"] = 0; - values[valuesById[1] = "AUDIENCE_JOINED"] = 1; - values[valuesById[2] = "AUDIENCE_MEMBERSHIP_RENEWED"] = 2; - return values; - })(); - - return AudienceEventTrigger; + return ParameterMutation; })(); - v1alpha.Audience = (function() { + v1alpha.EventCreateRule = (function() { /** - * Properties of an Audience. + * Properties of an EventCreateRule. * @memberof google.analytics.admin.v1alpha - * @interface IAudience - * @property {string|null} [name] Audience name - * @property {string|null} [displayName] Audience displayName - * @property {string|null} [description] Audience description - * @property {number|null} [membershipDurationDays] Audience membershipDurationDays - * @property {boolean|null} [adsPersonalizationEnabled] Audience adsPersonalizationEnabled - * @property {google.analytics.admin.v1alpha.IAudienceEventTrigger|null} [eventTrigger] Audience eventTrigger - * @property {google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode|null} [exclusionDurationMode] Audience exclusionDurationMode - * @property {Array.|null} [filterClauses] Audience filterClauses + * @interface IEventCreateRule + * @property {string|null} [name] EventCreateRule name + * @property {string|null} [destinationEvent] EventCreateRule destinationEvent + * @property {Array.|null} [eventConditions] EventCreateRule eventConditions + * @property {boolean|null} [sourceCopyParameters] EventCreateRule sourceCopyParameters + * @property {Array.|null} [parameterMutations] EventCreateRule parameterMutations */ /** - * Constructs a new Audience. + * Constructs a new EventCreateRule. * @memberof google.analytics.admin.v1alpha - * @classdesc Represents an Audience. - * @implements IAudience + * @classdesc Represents an EventCreateRule. + * @implements IEventCreateRule * @constructor - * @param {google.analytics.admin.v1alpha.IAudience=} [properties] Properties to set + * @param {google.analytics.admin.v1alpha.IEventCreateRule=} [properties] Properties to set */ - function Audience(properties) { - this.filterClauses = []; + function EventCreateRule(properties) { + this.eventConditions = []; + this.parameterMutations = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -45853,176 +53214,454 @@ } /** - * Audience name. + * EventCreateRule name. * @member {string} name - * @memberof google.analytics.admin.v1alpha.Audience + * @memberof google.analytics.admin.v1alpha.EventCreateRule * @instance */ - Audience.prototype.name = ""; + EventCreateRule.prototype.name = ""; /** - * Audience displayName. - * @member {string} displayName - * @memberof google.analytics.admin.v1alpha.Audience + * EventCreateRule destinationEvent. + * @member {string} destinationEvent + * @memberof google.analytics.admin.v1alpha.EventCreateRule + * @instance + */ + EventCreateRule.prototype.destinationEvent = ""; + + /** + * EventCreateRule eventConditions. + * @member {Array.} eventConditions + * @memberof google.analytics.admin.v1alpha.EventCreateRule + * @instance + */ + EventCreateRule.prototype.eventConditions = $util.emptyArray; + + /** + * EventCreateRule sourceCopyParameters. + * @member {boolean} sourceCopyParameters + * @memberof google.analytics.admin.v1alpha.EventCreateRule + * @instance + */ + EventCreateRule.prototype.sourceCopyParameters = false; + + /** + * EventCreateRule parameterMutations. + * @member {Array.} parameterMutations + * @memberof google.analytics.admin.v1alpha.EventCreateRule + * @instance + */ + EventCreateRule.prototype.parameterMutations = $util.emptyArray; + + /** + * Creates a new EventCreateRule instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.EventCreateRule + * @static + * @param {google.analytics.admin.v1alpha.IEventCreateRule=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.EventCreateRule} EventCreateRule instance + */ + EventCreateRule.create = function create(properties) { + return new EventCreateRule(properties); + }; + + /** + * Encodes the specified EventCreateRule message. Does not implicitly {@link google.analytics.admin.v1alpha.EventCreateRule.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.EventCreateRule + * @static + * @param {google.analytics.admin.v1alpha.IEventCreateRule} message EventCreateRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventCreateRule.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.destinationEvent != null && Object.hasOwnProperty.call(message, "destinationEvent")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.destinationEvent); + if (message.eventConditions != null && message.eventConditions.length) + for (var i = 0; i < message.eventConditions.length; ++i) + $root.google.analytics.admin.v1alpha.MatchingCondition.encode(message.eventConditions[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.sourceCopyParameters != null && Object.hasOwnProperty.call(message, "sourceCopyParameters")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.sourceCopyParameters); + if (message.parameterMutations != null && message.parameterMutations.length) + for (var i = 0; i < message.parameterMutations.length; ++i) + $root.google.analytics.admin.v1alpha.ParameterMutation.encode(message.parameterMutations[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EventCreateRule message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.EventCreateRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.EventCreateRule + * @static + * @param {google.analytics.admin.v1alpha.IEventCreateRule} message EventCreateRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventCreateRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EventCreateRule message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.EventCreateRule + * @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.EventCreateRule} EventCreateRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventCreateRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.EventCreateRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.destinationEvent = reader.string(); + break; + } + case 3: { + if (!(message.eventConditions && message.eventConditions.length)) + message.eventConditions = []; + message.eventConditions.push($root.google.analytics.admin.v1alpha.MatchingCondition.decode(reader, reader.uint32())); + break; + } + case 4: { + message.sourceCopyParameters = reader.bool(); + break; + } + case 5: { + if (!(message.parameterMutations && message.parameterMutations.length)) + message.parameterMutations = []; + message.parameterMutations.push($root.google.analytics.admin.v1alpha.ParameterMutation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EventCreateRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.EventCreateRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.EventCreateRule} EventCreateRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventCreateRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EventCreateRule message. + * @function verify + * @memberof google.analytics.admin.v1alpha.EventCreateRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EventCreateRule.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.destinationEvent != null && message.hasOwnProperty("destinationEvent")) + if (!$util.isString(message.destinationEvent)) + return "destinationEvent: string expected"; + if (message.eventConditions != null && message.hasOwnProperty("eventConditions")) { + if (!Array.isArray(message.eventConditions)) + return "eventConditions: array expected"; + for (var i = 0; i < message.eventConditions.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.MatchingCondition.verify(message.eventConditions[i]); + if (error) + return "eventConditions." + error; + } + } + if (message.sourceCopyParameters != null && message.hasOwnProperty("sourceCopyParameters")) + if (typeof message.sourceCopyParameters !== "boolean") + return "sourceCopyParameters: boolean expected"; + if (message.parameterMutations != null && message.hasOwnProperty("parameterMutations")) { + if (!Array.isArray(message.parameterMutations)) + return "parameterMutations: array expected"; + for (var i = 0; i < message.parameterMutations.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.ParameterMutation.verify(message.parameterMutations[i]); + if (error) + return "parameterMutations." + error; + } + } + return null; + }; + + /** + * Creates an EventCreateRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.EventCreateRule + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.EventCreateRule} EventCreateRule + */ + EventCreateRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.EventCreateRule) + return object; + var message = new $root.google.analytics.admin.v1alpha.EventCreateRule(); + if (object.name != null) + message.name = String(object.name); + if (object.destinationEvent != null) + message.destinationEvent = String(object.destinationEvent); + if (object.eventConditions) { + if (!Array.isArray(object.eventConditions)) + throw TypeError(".google.analytics.admin.v1alpha.EventCreateRule.eventConditions: array expected"); + message.eventConditions = []; + for (var i = 0; i < object.eventConditions.length; ++i) { + if (typeof object.eventConditions[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.EventCreateRule.eventConditions: object expected"); + message.eventConditions[i] = $root.google.analytics.admin.v1alpha.MatchingCondition.fromObject(object.eventConditions[i]); + } + } + if (object.sourceCopyParameters != null) + message.sourceCopyParameters = Boolean(object.sourceCopyParameters); + if (object.parameterMutations) { + if (!Array.isArray(object.parameterMutations)) + throw TypeError(".google.analytics.admin.v1alpha.EventCreateRule.parameterMutations: array expected"); + message.parameterMutations = []; + for (var i = 0; i < object.parameterMutations.length; ++i) { + if (typeof object.parameterMutations[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.EventCreateRule.parameterMutations: object expected"); + message.parameterMutations[i] = $root.google.analytics.admin.v1alpha.ParameterMutation.fromObject(object.parameterMutations[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EventCreateRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.EventCreateRule + * @static + * @param {google.analytics.admin.v1alpha.EventCreateRule} message EventCreateRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EventCreateRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.eventConditions = []; + object.parameterMutations = []; + } + if (options.defaults) { + object.name = ""; + object.destinationEvent = ""; + object.sourceCopyParameters = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.destinationEvent != null && message.hasOwnProperty("destinationEvent")) + object.destinationEvent = message.destinationEvent; + if (message.eventConditions && message.eventConditions.length) { + object.eventConditions = []; + for (var j = 0; j < message.eventConditions.length; ++j) + object.eventConditions[j] = $root.google.analytics.admin.v1alpha.MatchingCondition.toObject(message.eventConditions[j], options); + } + if (message.sourceCopyParameters != null && message.hasOwnProperty("sourceCopyParameters")) + object.sourceCopyParameters = message.sourceCopyParameters; + if (message.parameterMutations && message.parameterMutations.length) { + object.parameterMutations = []; + for (var j = 0; j < message.parameterMutations.length; ++j) + object.parameterMutations[j] = $root.google.analytics.admin.v1alpha.ParameterMutation.toObject(message.parameterMutations[j], options); + } + return object; + }; + + /** + * Converts this EventCreateRule to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.EventCreateRule * @instance + * @returns {Object.} JSON object + */ + EventCreateRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EventCreateRule + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.EventCreateRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - Audience.prototype.displayName = ""; + EventCreateRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.EventCreateRule"; + }; + + return EventCreateRule; + })(); + + v1alpha.MatchingCondition = (function() { /** - * Audience description. - * @member {string} description - * @memberof google.analytics.admin.v1alpha.Audience - * @instance + * Properties of a MatchingCondition. + * @memberof google.analytics.admin.v1alpha + * @interface IMatchingCondition + * @property {string|null} [field] MatchingCondition field + * @property {google.analytics.admin.v1alpha.MatchingCondition.ComparisonType|null} [comparisonType] MatchingCondition comparisonType + * @property {string|null} [value] MatchingCondition value + * @property {boolean|null} [negated] MatchingCondition negated */ - Audience.prototype.description = ""; /** - * Audience membershipDurationDays. - * @member {number} membershipDurationDays - * @memberof google.analytics.admin.v1alpha.Audience - * @instance + * Constructs a new MatchingCondition. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a MatchingCondition. + * @implements IMatchingCondition + * @constructor + * @param {google.analytics.admin.v1alpha.IMatchingCondition=} [properties] Properties to set */ - Audience.prototype.membershipDurationDays = 0; + function MatchingCondition(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]]; + } /** - * Audience adsPersonalizationEnabled. - * @member {boolean} adsPersonalizationEnabled - * @memberof google.analytics.admin.v1alpha.Audience + * MatchingCondition field. + * @member {string} field + * @memberof google.analytics.admin.v1alpha.MatchingCondition * @instance */ - Audience.prototype.adsPersonalizationEnabled = false; + MatchingCondition.prototype.field = ""; /** - * Audience eventTrigger. - * @member {google.analytics.admin.v1alpha.IAudienceEventTrigger|null|undefined} eventTrigger - * @memberof google.analytics.admin.v1alpha.Audience + * MatchingCondition comparisonType. + * @member {google.analytics.admin.v1alpha.MatchingCondition.ComparisonType} comparisonType + * @memberof google.analytics.admin.v1alpha.MatchingCondition * @instance */ - Audience.prototype.eventTrigger = null; + MatchingCondition.prototype.comparisonType = 0; /** - * Audience exclusionDurationMode. - * @member {google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode} exclusionDurationMode - * @memberof google.analytics.admin.v1alpha.Audience + * MatchingCondition value. + * @member {string} value + * @memberof google.analytics.admin.v1alpha.MatchingCondition * @instance */ - Audience.prototype.exclusionDurationMode = 0; + MatchingCondition.prototype.value = ""; /** - * Audience filterClauses. - * @member {Array.} filterClauses - * @memberof google.analytics.admin.v1alpha.Audience + * MatchingCondition negated. + * @member {boolean} negated + * @memberof google.analytics.admin.v1alpha.MatchingCondition * @instance */ - Audience.prototype.filterClauses = $util.emptyArray; + MatchingCondition.prototype.negated = false; /** - * Creates a new Audience instance using the specified properties. + * Creates a new MatchingCondition instance using the specified properties. * @function create - * @memberof google.analytics.admin.v1alpha.Audience + * @memberof google.analytics.admin.v1alpha.MatchingCondition * @static - * @param {google.analytics.admin.v1alpha.IAudience=} [properties] Properties to set - * @returns {google.analytics.admin.v1alpha.Audience} Audience instance + * @param {google.analytics.admin.v1alpha.IMatchingCondition=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.MatchingCondition} MatchingCondition instance */ - Audience.create = function create(properties) { - return new Audience(properties); + MatchingCondition.create = function create(properties) { + return new MatchingCondition(properties); }; /** - * Encodes the specified Audience message. Does not implicitly {@link google.analytics.admin.v1alpha.Audience.verify|verify} messages. + * Encodes the specified MatchingCondition message. Does not implicitly {@link google.analytics.admin.v1alpha.MatchingCondition.verify|verify} messages. * @function encode - * @memberof google.analytics.admin.v1alpha.Audience + * @memberof google.analytics.admin.v1alpha.MatchingCondition * @static - * @param {google.analytics.admin.v1alpha.IAudience} message Audience message or plain object to encode + * @param {google.analytics.admin.v1alpha.IMatchingCondition} message MatchingCondition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Audience.encode = function encode(message, writer) { + MatchingCondition.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.membershipDurationDays != null && Object.hasOwnProperty.call(message, "membershipDurationDays")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.membershipDurationDays); - if (message.adsPersonalizationEnabled != null && Object.hasOwnProperty.call(message, "adsPersonalizationEnabled")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.adsPersonalizationEnabled); - if (message.eventTrigger != null && Object.hasOwnProperty.call(message, "eventTrigger")) - $root.google.analytics.admin.v1alpha.AudienceEventTrigger.encode(message.eventTrigger, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.exclusionDurationMode != null && Object.hasOwnProperty.call(message, "exclusionDurationMode")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.exclusionDurationMode); - if (message.filterClauses != null && message.filterClauses.length) - for (var i = 0; i < message.filterClauses.length; ++i) - $root.google.analytics.admin.v1alpha.AudienceFilterClause.encode(message.filterClauses[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.field); + if (message.comparisonType != null && Object.hasOwnProperty.call(message, "comparisonType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.comparisonType); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.value); + if (message.negated != null && Object.hasOwnProperty.call(message, "negated")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.negated); return writer; }; /** - * Encodes the specified Audience message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.Audience.verify|verify} messages. + * Encodes the specified MatchingCondition message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.MatchingCondition.verify|verify} messages. * @function encodeDelimited - * @memberof google.analytics.admin.v1alpha.Audience + * @memberof google.analytics.admin.v1alpha.MatchingCondition * @static - * @param {google.analytics.admin.v1alpha.IAudience} message Audience message or plain object to encode + * @param {google.analytics.admin.v1alpha.IMatchingCondition} message MatchingCondition message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Audience.encodeDelimited = function encodeDelimited(message, writer) { + MatchingCondition.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Audience message from the specified reader or buffer. + * Decodes a MatchingCondition message from the specified reader or buffer. * @function decode - * @memberof google.analytics.admin.v1alpha.Audience + * @memberof google.analytics.admin.v1alpha.MatchingCondition * @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.Audience} Audience + * @returns {google.analytics.admin.v1alpha.MatchingCondition} MatchingCondition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Audience.decode = function decode(reader, length) { + MatchingCondition.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.Audience(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.MatchingCondition(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.field = reader.string(); break; } case 2: { - message.displayName = reader.string(); + message.comparisonType = reader.int32(); break; } case 3: { - message.description = reader.string(); + message.value = reader.string(); break; } case 4: { - message.membershipDurationDays = reader.int32(); - break; - } - case 5: { - message.adsPersonalizationEnabled = reader.bool(); - break; - } - case 6: { - message.eventTrigger = $root.google.analytics.admin.v1alpha.AudienceEventTrigger.decode(reader, reader.uint32()); - break; - } - case 7: { - message.exclusionDurationMode = reader.int32(); - break; - } - case 8: { - if (!(message.filterClauses && message.filterClauses.length)) - message.filterClauses = []; - message.filterClauses.push($root.google.analytics.admin.v1alpha.AudienceFilterClause.decode(reader, reader.uint32())); + message.negated = reader.bool(); break; } default: @@ -46034,222 +53673,251 @@ }; /** - * Decodes an Audience message from the specified reader or buffer, length delimited. + * Decodes a MatchingCondition message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.analytics.admin.v1alpha.Audience + * @memberof google.analytics.admin.v1alpha.MatchingCondition * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.analytics.admin.v1alpha.Audience} Audience + * @returns {google.analytics.admin.v1alpha.MatchingCondition} MatchingCondition * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Audience.decodeDelimited = function decodeDelimited(reader) { + MatchingCondition.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Audience message. + * Verifies a MatchingCondition message. * @function verify - * @memberof google.analytics.admin.v1alpha.Audience + * @memberof google.analytics.admin.v1alpha.MatchingCondition * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Audience.verify = function verify(message) { + MatchingCondition.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.membershipDurationDays != null && message.hasOwnProperty("membershipDurationDays")) - if (!$util.isInteger(message.membershipDurationDays)) - return "membershipDurationDays: integer expected"; - if (message.adsPersonalizationEnabled != null && message.hasOwnProperty("adsPersonalizationEnabled")) - if (typeof message.adsPersonalizationEnabled !== "boolean") - return "adsPersonalizationEnabled: boolean expected"; - if (message.eventTrigger != null && message.hasOwnProperty("eventTrigger")) { - var error = $root.google.analytics.admin.v1alpha.AudienceEventTrigger.verify(message.eventTrigger); - if (error) - return "eventTrigger." + error; - } - if (message.exclusionDurationMode != null && message.hasOwnProperty("exclusionDurationMode")) - switch (message.exclusionDurationMode) { + if (message.field != null && message.hasOwnProperty("field")) + if (!$util.isString(message.field)) + return "field: string expected"; + if (message.comparisonType != null && message.hasOwnProperty("comparisonType")) + switch (message.comparisonType) { default: - return "exclusionDurationMode: enum value expected"; + return "comparisonType: enum value expected"; case 0: case 1: case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: break; } - if (message.filterClauses != null && message.hasOwnProperty("filterClauses")) { - if (!Array.isArray(message.filterClauses)) - return "filterClauses: array expected"; - for (var i = 0; i < message.filterClauses.length; ++i) { - var error = $root.google.analytics.admin.v1alpha.AudienceFilterClause.verify(message.filterClauses[i]); - if (error) - return "filterClauses." + error; - } - } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + if (message.negated != null && message.hasOwnProperty("negated")) + if (typeof message.negated !== "boolean") + return "negated: boolean expected"; return null; }; /** - * Creates an Audience message from a plain object. Also converts values to their respective internal types. + * Creates a MatchingCondition message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.analytics.admin.v1alpha.Audience + * @memberof google.analytics.admin.v1alpha.MatchingCondition * @static * @param {Object.} object Plain object - * @returns {google.analytics.admin.v1alpha.Audience} Audience + * @returns {google.analytics.admin.v1alpha.MatchingCondition} MatchingCondition */ - Audience.fromObject = function fromObject(object) { - if (object instanceof $root.google.analytics.admin.v1alpha.Audience) + MatchingCondition.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.MatchingCondition) return object; - var message = new $root.google.analytics.admin.v1alpha.Audience(); - 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.membershipDurationDays != null) - message.membershipDurationDays = object.membershipDurationDays | 0; - if (object.adsPersonalizationEnabled != null) - message.adsPersonalizationEnabled = Boolean(object.adsPersonalizationEnabled); - if (object.eventTrigger != null) { - if (typeof object.eventTrigger !== "object") - throw TypeError(".google.analytics.admin.v1alpha.Audience.eventTrigger: object expected"); - message.eventTrigger = $root.google.analytics.admin.v1alpha.AudienceEventTrigger.fromObject(object.eventTrigger); - } - switch (object.exclusionDurationMode) { + var message = new $root.google.analytics.admin.v1alpha.MatchingCondition(); + if (object.field != null) + message.field = String(object.field); + switch (object.comparisonType) { default: - if (typeof object.exclusionDurationMode === "number") { - message.exclusionDurationMode = object.exclusionDurationMode; + if (typeof object.comparisonType === "number") { + message.comparisonType = object.comparisonType; break; } break; - case "AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED": + case "COMPARISON_TYPE_UNSPECIFIED": case 0: - message.exclusionDurationMode = 0; + message.comparisonType = 0; break; - case "EXCLUDE_TEMPORARILY": + case "EQUALS": case 1: - message.exclusionDurationMode = 1; + message.comparisonType = 1; break; - case "EXCLUDE_PERMANENTLY": + case "EQUALS_CASE_INSENSITIVE": case 2: - message.exclusionDurationMode = 2; + message.comparisonType = 2; + break; + case "CONTAINS": + case 3: + message.comparisonType = 3; + break; + case "CONTAINS_CASE_INSENSITIVE": + case 4: + message.comparisonType = 4; + break; + case "STARTS_WITH": + case 5: + message.comparisonType = 5; + break; + case "STARTS_WITH_CASE_INSENSITIVE": + case 6: + message.comparisonType = 6; + break; + case "ENDS_WITH": + case 7: + message.comparisonType = 7; + break; + case "ENDS_WITH_CASE_INSENSITIVE": + case 8: + message.comparisonType = 8; + break; + case "GREATER_THAN": + case 9: + message.comparisonType = 9; + break; + case "GREATER_THAN_OR_EQUAL": + case 10: + message.comparisonType = 10; + break; + case "LESS_THAN": + case 11: + message.comparisonType = 11; + break; + case "LESS_THAN_OR_EQUAL": + case 12: + message.comparisonType = 12; + break; + case "REGULAR_EXPRESSION": + case 13: + message.comparisonType = 13; + break; + case "REGULAR_EXPRESSION_CASE_INSENSITIVE": + case 14: + message.comparisonType = 14; break; } - if (object.filterClauses) { - if (!Array.isArray(object.filterClauses)) - throw TypeError(".google.analytics.admin.v1alpha.Audience.filterClauses: array expected"); - message.filterClauses = []; - for (var i = 0; i < object.filterClauses.length; ++i) { - if (typeof object.filterClauses[i] !== "object") - throw TypeError(".google.analytics.admin.v1alpha.Audience.filterClauses: object expected"); - message.filterClauses[i] = $root.google.analytics.admin.v1alpha.AudienceFilterClause.fromObject(object.filterClauses[i]); - } - } + if (object.value != null) + message.value = String(object.value); + if (object.negated != null) + message.negated = Boolean(object.negated); return message; }; /** - * Creates a plain object from an Audience message. Also converts values to other types if specified. + * Creates a plain object from a MatchingCondition message. Also converts values to other types if specified. * @function toObject - * @memberof google.analytics.admin.v1alpha.Audience + * @memberof google.analytics.admin.v1alpha.MatchingCondition * @static - * @param {google.analytics.admin.v1alpha.Audience} message Audience + * @param {google.analytics.admin.v1alpha.MatchingCondition} message MatchingCondition * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Audience.toObject = function toObject(message, options) { + MatchingCondition.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.filterClauses = []; if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.description = ""; - object.membershipDurationDays = 0; - object.adsPersonalizationEnabled = false; - object.eventTrigger = null; - object.exclusionDurationMode = options.enums === String ? "AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED" : 0; - } - 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.membershipDurationDays != null && message.hasOwnProperty("membershipDurationDays")) - object.membershipDurationDays = message.membershipDurationDays; - if (message.adsPersonalizationEnabled != null && message.hasOwnProperty("adsPersonalizationEnabled")) - object.adsPersonalizationEnabled = message.adsPersonalizationEnabled; - if (message.eventTrigger != null && message.hasOwnProperty("eventTrigger")) - object.eventTrigger = $root.google.analytics.admin.v1alpha.AudienceEventTrigger.toObject(message.eventTrigger, options); - if (message.exclusionDurationMode != null && message.hasOwnProperty("exclusionDurationMode")) - object.exclusionDurationMode = options.enums === String ? $root.google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode[message.exclusionDurationMode] === undefined ? message.exclusionDurationMode : $root.google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode[message.exclusionDurationMode] : message.exclusionDurationMode; - if (message.filterClauses && message.filterClauses.length) { - object.filterClauses = []; - for (var j = 0; j < message.filterClauses.length; ++j) - object.filterClauses[j] = $root.google.analytics.admin.v1alpha.AudienceFilterClause.toObject(message.filterClauses[j], options); + object.field = ""; + object.comparisonType = options.enums === String ? "COMPARISON_TYPE_UNSPECIFIED" : 0; + object.value = ""; + object.negated = false; } + if (message.field != null && message.hasOwnProperty("field")) + object.field = message.field; + if (message.comparisonType != null && message.hasOwnProperty("comparisonType")) + object.comparisonType = options.enums === String ? $root.google.analytics.admin.v1alpha.MatchingCondition.ComparisonType[message.comparisonType] === undefined ? message.comparisonType : $root.google.analytics.admin.v1alpha.MatchingCondition.ComparisonType[message.comparisonType] : message.comparisonType; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.negated != null && message.hasOwnProperty("negated")) + object.negated = message.negated; return object; }; /** - * Converts this Audience to JSON. + * Converts this MatchingCondition to JSON. * @function toJSON - * @memberof google.analytics.admin.v1alpha.Audience + * @memberof google.analytics.admin.v1alpha.MatchingCondition * @instance * @returns {Object.} JSON object */ - Audience.prototype.toJSON = function toJSON() { + MatchingCondition.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Audience + * Gets the default type url for MatchingCondition * @function getTypeUrl - * @memberof google.analytics.admin.v1alpha.Audience + * @memberof google.analytics.admin.v1alpha.MatchingCondition * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Audience.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MatchingCondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.analytics.admin.v1alpha.Audience"; + return typeUrlPrefix + "/google.analytics.admin.v1alpha.MatchingCondition"; }; /** - * AudienceExclusionDurationMode enum. - * @name google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode + * ComparisonType enum. + * @name google.analytics.admin.v1alpha.MatchingCondition.ComparisonType * @enum {number} - * @property {number} AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED=0 AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED value - * @property {number} EXCLUDE_TEMPORARILY=1 EXCLUDE_TEMPORARILY value - * @property {number} EXCLUDE_PERMANENTLY=2 EXCLUDE_PERMANENTLY value - */ - Audience.AudienceExclusionDurationMode = (function() { + * @property {number} COMPARISON_TYPE_UNSPECIFIED=0 COMPARISON_TYPE_UNSPECIFIED value + * @property {number} EQUALS=1 EQUALS value + * @property {number} EQUALS_CASE_INSENSITIVE=2 EQUALS_CASE_INSENSITIVE value + * @property {number} CONTAINS=3 CONTAINS value + * @property {number} CONTAINS_CASE_INSENSITIVE=4 CONTAINS_CASE_INSENSITIVE value + * @property {number} STARTS_WITH=5 STARTS_WITH value + * @property {number} STARTS_WITH_CASE_INSENSITIVE=6 STARTS_WITH_CASE_INSENSITIVE value + * @property {number} ENDS_WITH=7 ENDS_WITH value + * @property {number} ENDS_WITH_CASE_INSENSITIVE=8 ENDS_WITH_CASE_INSENSITIVE value + * @property {number} GREATER_THAN=9 GREATER_THAN value + * @property {number} GREATER_THAN_OR_EQUAL=10 GREATER_THAN_OR_EQUAL value + * @property {number} LESS_THAN=11 LESS_THAN value + * @property {number} LESS_THAN_OR_EQUAL=12 LESS_THAN_OR_EQUAL value + * @property {number} REGULAR_EXPRESSION=13 REGULAR_EXPRESSION value + * @property {number} REGULAR_EXPRESSION_CASE_INSENSITIVE=14 REGULAR_EXPRESSION_CASE_INSENSITIVE value + */ + MatchingCondition.ComparisonType = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "EXCLUDE_TEMPORARILY"] = 1; - values[valuesById[2] = "EXCLUDE_PERMANENTLY"] = 2; + values[valuesById[0] = "COMPARISON_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EQUALS"] = 1; + values[valuesById[2] = "EQUALS_CASE_INSENSITIVE"] = 2; + values[valuesById[3] = "CONTAINS"] = 3; + values[valuesById[4] = "CONTAINS_CASE_INSENSITIVE"] = 4; + values[valuesById[5] = "STARTS_WITH"] = 5; + values[valuesById[6] = "STARTS_WITH_CASE_INSENSITIVE"] = 6; + values[valuesById[7] = "ENDS_WITH"] = 7; + values[valuesById[8] = "ENDS_WITH_CASE_INSENSITIVE"] = 8; + values[valuesById[9] = "GREATER_THAN"] = 9; + values[valuesById[10] = "GREATER_THAN_OR_EQUAL"] = 10; + values[valuesById[11] = "LESS_THAN"] = 11; + values[valuesById[12] = "LESS_THAN_OR_EQUAL"] = 12; + values[valuesById[13] = "REGULAR_EXPRESSION"] = 13; + values[valuesById[14] = "REGULAR_EXPRESSION_CASE_INSENSITIVE"] = 14; return values; })(); - return Audience; + return MatchingCondition; })(); v1alpha.ExpandedDataSetFilter = (function() { @@ -48117,6 +55785,9 @@ * @property {number} EXPANDED_DATA_SET=21 EXPANDED_DATA_SET value * @property {number} CHANNEL_GROUP=22 CHANNEL_GROUP value * @property {number} ENHANCED_MEASUREMENT_SETTINGS=24 ENHANCED_MEASUREMENT_SETTINGS value + * @property {number} ADSENSE_LINK=27 ADSENSE_LINK value + * @property {number} AUDIENCE=28 AUDIENCE value + * @property {number} EVENT_CREATE_RULE=29 EVENT_CREATE_RULE value */ v1alpha.ChangeHistoryResourceType = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -48139,6 +55810,9 @@ values[valuesById[21] = "EXPANDED_DATA_SET"] = 21; values[valuesById[22] = "CHANNEL_GROUP"] = 22; values[valuesById[24] = "ENHANCED_MEASUREMENT_SETTINGS"] = 24; + values[valuesById[27] = "ADSENSE_LINK"] = 27; + values[valuesById[28] = "AUDIENCE"] = 28; + values[valuesById[29] = "EVENT_CREATE_RULE"] = 29; return values; })(); @@ -53718,8 +61392,12 @@ * @property {google.analytics.admin.v1alpha.IDataStream|null} [dataStream] ChangeHistoryResource dataStream * @property {google.analytics.admin.v1alpha.IAttributionSettings|null} [attributionSettings] ChangeHistoryResource attributionSettings * @property {google.analytics.admin.v1alpha.IExpandedDataSet|null} [expandedDataSet] ChangeHistoryResource expandedDataSet + * @property {google.analytics.admin.v1alpha.IChannelGroup|null} [channelGroup] ChangeHistoryResource channelGroup * @property {google.analytics.admin.v1alpha.IBigQueryLink|null} [bigqueryLink] ChangeHistoryResource bigqueryLink * @property {google.analytics.admin.v1alpha.IEnhancedMeasurementSettings|null} [enhancedMeasurementSettings] ChangeHistoryResource enhancedMeasurementSettings + * @property {google.analytics.admin.v1alpha.IAdSenseLink|null} [adsenseLink] ChangeHistoryResource adsenseLink + * @property {google.analytics.admin.v1alpha.IAudience|null} [audience] ChangeHistoryResource audience + * @property {google.analytics.admin.v1alpha.IEventCreateRule|null} [eventCreateRule] ChangeHistoryResource eventCreateRule */ /** @@ -53865,6 +61543,14 @@ */ ChangeHistoryResource.prototype.expandedDataSet = null; + /** + * ChangeHistoryResource channelGroup. + * @member {google.analytics.admin.v1alpha.IChannelGroup|null|undefined} channelGroup + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.channelGroup = null; + /** * ChangeHistoryResource bigqueryLink. * @member {google.analytics.admin.v1alpha.IBigQueryLink|null|undefined} bigqueryLink @@ -53881,17 +61567,41 @@ */ ChangeHistoryResource.prototype.enhancedMeasurementSettings = null; + /** + * ChangeHistoryResource adsenseLink. + * @member {google.analytics.admin.v1alpha.IAdSenseLink|null|undefined} adsenseLink + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.adsenseLink = null; + + /** + * ChangeHistoryResource audience. + * @member {google.analytics.admin.v1alpha.IAudience|null|undefined} audience + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.audience = null; + + /** + * ChangeHistoryResource eventCreateRule. + * @member {google.analytics.admin.v1alpha.IEventCreateRule|null|undefined} eventCreateRule + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.eventCreateRule = 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"|"bigqueryLink"|"enhancedMeasurementSettings"|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"|"adsenseLink"|"audience"|"eventCreateRule"|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", "bigqueryLink", "enhancedMeasurementSettings"]), + 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", "adsenseLink", "audience", "eventCreateRule"]), set: $util.oneOfSetter($oneOfFields) }); @@ -53951,10 +61661,18 @@ $root.google.analytics.admin.v1alpha.AttributionSettings.encode(message.attributionSettings, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); if (message.expandedDataSet != null && Object.hasOwnProperty.call(message, "expandedDataSet")) $root.google.analytics.admin.v1alpha.ExpandedDataSet.encode(message.expandedDataSet, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.channelGroup != null && Object.hasOwnProperty.call(message, "channelGroup")) + $root.google.analytics.admin.v1alpha.ChannelGroup.encode(message.channelGroup, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); if (message.bigqueryLink != null && Object.hasOwnProperty.call(message, "bigqueryLink")) $root.google.analytics.admin.v1alpha.BigQueryLink.encode(message.bigqueryLink, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); if (message.enhancedMeasurementSettings != null && Object.hasOwnProperty.call(message, "enhancedMeasurementSettings")) $root.google.analytics.admin.v1alpha.EnhancedMeasurementSettings.encode(message.enhancedMeasurementSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.adsenseLink != null && Object.hasOwnProperty.call(message, "adsenseLink")) + $root.google.analytics.admin.v1alpha.AdSenseLink.encode(message.adsenseLink, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.audience != null && Object.hasOwnProperty.call(message, "audience")) + $root.google.analytics.admin.v1alpha.Audience.encode(message.audience, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + if (message.eventCreateRule != null && Object.hasOwnProperty.call(message, "eventCreateRule")) + $root.google.analytics.admin.v1alpha.EventCreateRule.encode(message.eventCreateRule, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); return writer; }; @@ -54053,6 +61771,10 @@ message.expandedDataSet = $root.google.analytics.admin.v1alpha.ExpandedDataSet.decode(reader, reader.uint32()); break; } + case 22: { + message.channelGroup = $root.google.analytics.admin.v1alpha.ChannelGroup.decode(reader, reader.uint32()); + break; + } case 23: { message.bigqueryLink = $root.google.analytics.admin.v1alpha.BigQueryLink.decode(reader, reader.uint32()); break; @@ -54061,6 +61783,18 @@ message.enhancedMeasurementSettings = $root.google.analytics.admin.v1alpha.EnhancedMeasurementSettings.decode(reader, reader.uint32()); break; } + case 27: { + message.adsenseLink = $root.google.analytics.admin.v1alpha.AdSenseLink.decode(reader, reader.uint32()); + break; + } + case 28: { + message.audience = $root.google.analytics.admin.v1alpha.Audience.decode(reader, reader.uint32()); + break; + } + case 29: { + message.eventCreateRule = $root.google.analytics.admin.v1alpha.EventCreateRule.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -54255,6 +61989,16 @@ return "expandedDataSet." + error; } } + if (message.channelGroup != null && message.hasOwnProperty("channelGroup")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.ChannelGroup.verify(message.channelGroup); + if (error) + return "channelGroup." + error; + } + } if (message.bigqueryLink != null && message.hasOwnProperty("bigqueryLink")) { if (properties.resource === 1) return "resource: multiple values"; @@ -54275,6 +62019,36 @@ return "enhancedMeasurementSettings." + error; } } + if (message.adsenseLink != null && message.hasOwnProperty("adsenseLink")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.AdSenseLink.verify(message.adsenseLink); + if (error) + return "adsenseLink." + error; + } + } + if (message.audience != null && message.hasOwnProperty("audience")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.Audience.verify(message.audience); + if (error) + return "audience." + error; + } + } + if (message.eventCreateRule != null && message.hasOwnProperty("eventCreateRule")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.EventCreateRule.verify(message.eventCreateRule); + if (error) + return "eventCreateRule." + error; + } + } return null; }; @@ -54370,6 +62144,11 @@ throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.expandedDataSet: object expected"); message.expandedDataSet = $root.google.analytics.admin.v1alpha.ExpandedDataSet.fromObject(object.expandedDataSet); } + if (object.channelGroup != null) { + if (typeof object.channelGroup !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.channelGroup: object expected"); + message.channelGroup = $root.google.analytics.admin.v1alpha.ChannelGroup.fromObject(object.channelGroup); + } if (object.bigqueryLink != null) { if (typeof object.bigqueryLink !== "object") throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.bigqueryLink: object expected"); @@ -54380,6 +62159,21 @@ throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.enhancedMeasurementSettings: object expected"); message.enhancedMeasurementSettings = $root.google.analytics.admin.v1alpha.EnhancedMeasurementSettings.fromObject(object.enhancedMeasurementSettings); } + if (object.adsenseLink != null) { + if (typeof object.adsenseLink !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.adsenseLink: object expected"); + message.adsenseLink = $root.google.analytics.admin.v1alpha.AdSenseLink.fromObject(object.adsenseLink); + } + if (object.audience != null) { + if (typeof object.audience !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.audience: object expected"); + message.audience = $root.google.analytics.admin.v1alpha.Audience.fromObject(object.audience); + } + if (object.eventCreateRule != null) { + if (typeof object.eventCreateRule !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.eventCreateRule: object expected"); + message.eventCreateRule = $root.google.analytics.admin.v1alpha.EventCreateRule.fromObject(object.eventCreateRule); + } return message; }; @@ -54476,6 +62270,11 @@ if (options.oneofs) object.resource = "expandedDataSet"; } + if (message.channelGroup != null && message.hasOwnProperty("channelGroup")) { + object.channelGroup = $root.google.analytics.admin.v1alpha.ChannelGroup.toObject(message.channelGroup, options); + if (options.oneofs) + object.resource = "channelGroup"; + } if (message.bigqueryLink != null && message.hasOwnProperty("bigqueryLink")) { object.bigqueryLink = $root.google.analytics.admin.v1alpha.BigQueryLink.toObject(message.bigqueryLink, options); if (options.oneofs) @@ -54486,6 +62285,21 @@ if (options.oneofs) object.resource = "enhancedMeasurementSettings"; } + if (message.adsenseLink != null && message.hasOwnProperty("adsenseLink")) { + object.adsenseLink = $root.google.analytics.admin.v1alpha.AdSenseLink.toObject(message.adsenseLink, options); + if (options.oneofs) + object.resource = "adsenseLink"; + } + if (message.audience != null && message.hasOwnProperty("audience")) { + object.audience = $root.google.analytics.admin.v1alpha.Audience.toObject(message.audience, options); + if (options.oneofs) + object.resource = "audience"; + } + if (message.eventCreateRule != null && message.hasOwnProperty("eventCreateRule")) { + object.eventCreateRule = $root.google.analytics.admin.v1alpha.EventCreateRule.toObject(message.eventCreateRule, options); + if (options.oneofs) + object.resource = "eventCreateRule"; + } return object; }; @@ -56744,6 +64558,7 @@ case 0: case 1: case 2: + case 3: break; } if (message.disallowAdsPersonalization != null && message.hasOwnProperty("disallowAdsPersonalization")) @@ -56791,6 +64606,10 @@ case 2: message.scope = 2; break; + case "ITEM": + case 3: + message.scope = 3; + break; } if (object.disallowAdsPersonalization != null) message.disallowAdsPersonalization = Boolean(object.disallowAdsPersonalization); @@ -56866,12 +64685,14 @@ * @property {number} DIMENSION_SCOPE_UNSPECIFIED=0 DIMENSION_SCOPE_UNSPECIFIED value * @property {number} EVENT=1 EVENT value * @property {number} USER=2 USER value + * @property {number} ITEM=3 ITEM value */ CustomDimension.DimensionScope = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "DIMENSION_SCOPE_UNSPECIFIED"] = 0; values[valuesById[1] = "EVENT"] = 1; values[valuesById[2] = "USER"] = 2; + values[valuesById[3] = "ITEM"] = 3; return values; })(); @@ -59533,6 +67354,233 @@ return ConnectedSiteTag; })(); + v1alpha.AdSenseLink = (function() { + + /** + * Properties of an AdSenseLink. + * @memberof google.analytics.admin.v1alpha + * @interface IAdSenseLink + * @property {string|null} [name] AdSenseLink name + * @property {string|null} [adClientCode] AdSenseLink adClientCode + */ + + /** + * Constructs a new AdSenseLink. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AdSenseLink. + * @implements IAdSenseLink + * @constructor + * @param {google.analytics.admin.v1alpha.IAdSenseLink=} [properties] Properties to set + */ + function AdSenseLink(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]]; + } + + /** + * AdSenseLink name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.AdSenseLink + * @instance + */ + AdSenseLink.prototype.name = ""; + + /** + * AdSenseLink adClientCode. + * @member {string} adClientCode + * @memberof google.analytics.admin.v1alpha.AdSenseLink + * @instance + */ + AdSenseLink.prototype.adClientCode = ""; + + /** + * Creates a new AdSenseLink instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AdSenseLink + * @static + * @param {google.analytics.admin.v1alpha.IAdSenseLink=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AdSenseLink} AdSenseLink instance + */ + AdSenseLink.create = function create(properties) { + return new AdSenseLink(properties); + }; + + /** + * Encodes the specified AdSenseLink message. Does not implicitly {@link google.analytics.admin.v1alpha.AdSenseLink.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AdSenseLink + * @static + * @param {google.analytics.admin.v1alpha.IAdSenseLink} message AdSenseLink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdSenseLink.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.adClientCode != null && Object.hasOwnProperty.call(message, "adClientCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.adClientCode); + return writer; + }; + + /** + * Encodes the specified AdSenseLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AdSenseLink.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AdSenseLink + * @static + * @param {google.analytics.admin.v1alpha.IAdSenseLink} message AdSenseLink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdSenseLink.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AdSenseLink message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AdSenseLink + * @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.AdSenseLink} AdSenseLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdSenseLink.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AdSenseLink(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.adClientCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AdSenseLink message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AdSenseLink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AdSenseLink} AdSenseLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdSenseLink.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AdSenseLink message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AdSenseLink + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AdSenseLink.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.adClientCode != null && message.hasOwnProperty("adClientCode")) + if (!$util.isString(message.adClientCode)) + return "adClientCode: string expected"; + return null; + }; + + /** + * Creates an AdSenseLink message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AdSenseLink + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AdSenseLink} AdSenseLink + */ + AdSenseLink.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AdSenseLink) + return object; + var message = new $root.google.analytics.admin.v1alpha.AdSenseLink(); + if (object.name != null) + message.name = String(object.name); + if (object.adClientCode != null) + message.adClientCode = String(object.adClientCode); + return message; + }; + + /** + * Creates a plain object from an AdSenseLink message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AdSenseLink + * @static + * @param {google.analytics.admin.v1alpha.AdSenseLink} message AdSenseLink + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AdSenseLink.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.adClientCode = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.adClientCode != null && message.hasOwnProperty("adClientCode")) + object.adClientCode = message.adClientCode; + return object; + }; + + /** + * Converts this AdSenseLink to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AdSenseLink + * @instance + * @returns {Object.} JSON object + */ + AdSenseLink.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AdSenseLink + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AdSenseLink + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AdSenseLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AdSenseLink"; + }; + + return AdSenseLink; + })(); + return v1alpha; })(); diff --git a/packages/google-analytics-admin/protos/protos.json b/packages/google-analytics-admin/protos/protos.json index aafa87ddace..36aea395127 100644 --- a/packages/google-analytics-admin/protos/protos.json +++ b/packages/google-analytics-admin/protos/protos.json @@ -2243,6 +2243,100 @@ } ] }, + "GetChannelGroup": { + "requestType": "GetChannelGroupRequest", + "responseType": "ChannelGroup", + "options": { + "(google.api.http).get": "/v1alpha/{name=properties/*/channelGroups/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=properties/*/channelGroups/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListChannelGroups": { + "requestType": "ListChannelGroupsRequest", + "responseType": "ListChannelGroupsResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=properties/*}/channelGroups", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=properties/*}/channelGroups" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateChannelGroup": { + "requestType": "CreateChannelGroupRequest", + "responseType": "ChannelGroup", + "options": { + "(google.api.http).post": "/v1alpha/{parent=properties/*}/channelGroups", + "(google.api.http).body": "channel_group", + "(google.api.method_signature)": "parent,channel_group" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=properties/*}/channelGroups", + "body": "channel_group" + } + }, + { + "(google.api.method_signature)": "parent,channel_group" + } + ] + }, + "UpdateChannelGroup": { + "requestType": "UpdateChannelGroupRequest", + "responseType": "ChannelGroup", + "options": { + "(google.api.http).patch": "/v1alpha/{channel_group.name=properties/*/channelGroups/*}", + "(google.api.http).body": "channel_group", + "(google.api.method_signature)": "channel_group,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1alpha/{channel_group.name=properties/*/channelGroups/*}", + "body": "channel_group" + } + }, + { + "(google.api.method_signature)": "channel_group,update_mask" + } + ] + }, + "DeleteChannelGroup": { + "requestType": "DeleteChannelGroupRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1alpha/{name=properties/*/channelGroups/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1alpha/{name=properties/*/channelGroups/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, "SetAutomatedGa4ConfigurationOptOut": { "requestType": "SetAutomatedGa4ConfigurationOptOutRequest", "responseType": "SetAutomatedGa4ConfigurationOptOutResponse", @@ -2396,6 +2490,188 @@ } } ] + }, + "FetchConnectedGa4Property": { + "requestType": "FetchConnectedGa4PropertyRequest", + "responseType": "FetchConnectedGa4PropertyResponse", + "options": { + "(google.api.http).get": "/v1alpha/properties:fetchConnectedGa4Property" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/properties:fetchConnectedGa4Property" + } + } + ] + }, + "GetAdSenseLink": { + "requestType": "GetAdSenseLinkRequest", + "responseType": "AdSenseLink", + "options": { + "(google.api.http).get": "/v1alpha/{name=properties/*/adSenseLinks/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=properties/*/adSenseLinks/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateAdSenseLink": { + "requestType": "CreateAdSenseLinkRequest", + "responseType": "AdSenseLink", + "options": { + "(google.api.http).post": "/v1alpha/{parent=properties/*}/adSenseLinks", + "(google.api.http).body": "adsense_link", + "(google.api.method_signature)": "parent,adsense_link" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=properties/*}/adSenseLinks", + "body": "adsense_link" + } + }, + { + "(google.api.method_signature)": "parent,adsense_link" + } + ] + }, + "DeleteAdSenseLink": { + "requestType": "DeleteAdSenseLinkRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1alpha/{name=properties/*/adSenseLinks/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1alpha/{name=properties/*/adSenseLinks/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListAdSenseLinks": { + "requestType": "ListAdSenseLinksRequest", + "responseType": "ListAdSenseLinksResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=properties/*}/adSenseLinks", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=properties/*}/adSenseLinks" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetEventCreateRule": { + "requestType": "GetEventCreateRuleRequest", + "responseType": "EventCreateRule", + "options": { + "(google.api.http).get": "/v1alpha/{name=properties/*/dataStreams/*/eventCreateRules/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=properties/*/dataStreams/*/eventCreateRules/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListEventCreateRules": { + "requestType": "ListEventCreateRulesRequest", + "responseType": "ListEventCreateRulesResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=properties/*/dataStreams/*}/eventCreateRules", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=properties/*/dataStreams/*}/eventCreateRules" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateEventCreateRule": { + "requestType": "CreateEventCreateRuleRequest", + "responseType": "EventCreateRule", + "options": { + "(google.api.http).post": "/v1alpha/{parent=properties/*/dataStreams/*}/eventCreateRules", + "(google.api.http).body": "event_create_rule", + "(google.api.method_signature)": "parent,event_create_rule" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=properties/*/dataStreams/*}/eventCreateRules", + "body": "event_create_rule" + } + }, + { + "(google.api.method_signature)": "parent,event_create_rule" + } + ] + }, + "UpdateEventCreateRule": { + "requestType": "UpdateEventCreateRuleRequest", + "responseType": "EventCreateRule", + "options": { + "(google.api.http).patch": "/v1alpha/{event_create_rule.name=properties/*/dataStreams/*/eventCreateRules/*}", + "(google.api.http).body": "event_create_rule", + "(google.api.method_signature)": "event_create_rule,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1alpha/{event_create_rule.name=properties/*/dataStreams/*/eventCreateRules/*}", + "body": "event_create_rule" + } + }, + { + "(google.api.method_signature)": "event_create_rule,update_mask" + } + ] + }, + "DeleteEventCreateRule": { + "requestType": "DeleteEventCreateRuleRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1alpha/{name=properties/*/dataStreams/*/eventCreateRules/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1alpha/{name=properties/*/dataStreams/*/eventCreateRules/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] } } }, @@ -4402,63 +4678,75 @@ } } }, - "SetAutomatedGa4ConfigurationOptOutRequest": { + "CreateChannelGroupRequest": { "fields": { - "property": { + "parent": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/ChannelGroup" } }, - "optOut": { - "type": "bool", - "id": 2 + "channelGroup": { + "type": "ChannelGroup", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, - "SetAutomatedGa4ConfigurationOptOutResponse": { - "fields": {} - }, - "FetchAutomatedGa4ConfigurationOptOutRequest": { + "UpdateChannelGroupRequest": { "fields": { - "property": { - "type": "string", + "channelGroup": { + "type": "ChannelGroup", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED" } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, - "FetchAutomatedGa4ConfigurationOptOutResponse": { + "DeleteChannelGroupRequest": { "fields": { - "optOut": { - "type": "bool", - "id": 1 + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/ChannelGroup" + } } } }, - "GetBigQueryLinkRequest": { + "GetChannelGroupRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/BigQueryLink" + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/ChannelGroup" } } } }, - "ListBigQueryLinksRequest": { + "ListChannelGroupsRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/BigQueryLink" + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/ChannelGroup" } }, "pageSize": { @@ -4471,11 +4759,11 @@ } } }, - "ListBigQueryLinksResponse": { + "ListChannelGroupsResponse": { "fields": { - "bigqueryLinks": { + "channelGroups": { "rule": "repeated", - "type": "BigQueryLink", + "type": "ChannelGroup", "id": 1 }, "nextPageToken": { @@ -4484,39 +4772,121 @@ } } }, - "GetEnhancedMeasurementSettingsRequest": { + "SetAutomatedGa4ConfigurationOptOutRequest": { "fields": { - "name": { + "property": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/EnhancedMeasurementSettings" + "(google.api.field_behavior)": "REQUIRED" } + }, + "optOut": { + "type": "bool", + "id": 2 } } }, - "UpdateEnhancedMeasurementSettingsRequest": { + "SetAutomatedGa4ConfigurationOptOutResponse": { + "fields": {} + }, + "FetchAutomatedGa4ConfigurationOptOutRequest": { "fields": { - "enhancedMeasurementSettings": { - "type": "EnhancedMeasurementSettings", + "property": { + "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED" } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } } } }, - "CreateConnectedSiteTagRequest": { + "FetchAutomatedGa4ConfigurationOptOutResponse": { "fields": { - "property": { + "optOut": { + "type": "bool", + "id": 1 + } + } + }, + "GetBigQueryLinkRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/BigQueryLink" + } + } + } + }, + "ListBigQueryLinksRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/BigQueryLink" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListBigQueryLinksResponse": { + "fields": { + "bigqueryLinks": { + "rule": "repeated", + "type": "BigQueryLink", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetEnhancedMeasurementSettingsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/EnhancedMeasurementSettings" + } + } + } + }, + "UpdateEnhancedMeasurementSettingsRequest": { + "fields": { + "enhancedMeasurementSettings": { + "type": "EnhancedMeasurementSettings", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CreateConnectedSiteTagRequest": { + "fields": { + "property": { "type": "string", "id": 1 }, @@ -4561,6 +4931,199 @@ } } }, + "CreateAdSenseLinkRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/AdSenseLink" + } + }, + "adsenseLink": { + "type": "AdSenseLink", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetAdSenseLinkRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/AdSenseLink" + } + } + } + }, + "DeleteAdSenseLinkRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/AdSenseLink" + } + } + } + }, + "ListAdSenseLinksRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/AdSenseLink" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListAdSenseLinksResponse": { + "fields": { + "adsenseLinks": { + "rule": "repeated", + "type": "AdSenseLink", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "FetchConnectedGa4PropertyRequest": { + "fields": { + "property": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/Property" + } + } + } + }, + "FetchConnectedGa4PropertyResponse": { + "fields": { + "property": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/Property" + } + } + } + }, + "CreateEventCreateRuleRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/EventCreateRule" + } + }, + "eventCreateRule": { + "type": "EventCreateRule", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateEventCreateRuleRequest": { + "fields": { + "eventCreateRule": { + "type": "EventCreateRule", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteEventCreateRuleRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/EventCreateRule" + } + } + } + }, + "GetEventCreateRuleRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/EventCreateRule" + } + } + } + }, + "ListEventCreateRulesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/EventCreateRule" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListEventCreateRulesResponse": { + "fields": { + "eventCreateRules": { + "rule": "repeated", + "type": "EventCreateRule", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, "AudienceFilterScope": { "values": { "AUDIENCE_FILTER_SCOPE_UNSPECIFIED": 0, @@ -5021,6 +5584,283 @@ } } }, + "ChannelGroupFilter": { + "oneofs": { + "valueFilter": { + "oneof": [ + "stringFilter", + "inListFilter" + ] + } + }, + "fields": { + "stringFilter": { + "type": "StringFilter", + "id": 2 + }, + "inListFilter": { + "type": "InListFilter", + "id": 3 + }, + "fieldName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + }, + "nested": { + "StringFilter": { + "fields": { + "matchType": { + "type": "MatchType", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "value": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "MatchType": { + "values": { + "MATCH_TYPE_UNSPECIFIED": 0, + "EXACT": 1, + "BEGINS_WITH": 2, + "ENDS_WITH": 3, + "CONTAINS": 4, + "FULL_REGEXP": 5, + "PARTIAL_REGEXP": 6 + } + } + } + }, + "InListFilter": { + "fields": { + "values": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "ChannelGroupFilterExpression": { + "oneofs": { + "expr": { + "oneof": [ + "andGroup", + "orGroup", + "notExpression", + "filter" + ] + } + }, + "fields": { + "andGroup": { + "type": "ChannelGroupFilterExpressionList", + "id": 1 + }, + "orGroup": { + "type": "ChannelGroupFilterExpressionList", + "id": 2 + }, + "notExpression": { + "type": "ChannelGroupFilterExpression", + "id": 3 + }, + "filter": { + "type": "ChannelGroupFilter", + "id": 4 + } + } + }, + "ChannelGroupFilterExpressionList": { + "fields": { + "filterExpressions": { + "rule": "repeated", + "type": "ChannelGroupFilterExpression", + "id": 1 + } + } + }, + "GroupingRule": { + "fields": { + "displayName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "expression": { + "type": "ChannelGroupFilterExpression", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ChannelGroup": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/ChannelGroup", + "(google.api.resource).pattern": "properties/{property}/channelGroups/{channel_group}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "description": { + "type": "string", + "id": 3 + }, + "groupingRule": { + "rule": "repeated", + "type": "GroupingRule", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "systemDefined": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ParameterMutation": { + "fields": { + "parameter": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "parameterValue": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "EventCreateRule": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/EventCreateRule", + "(google.api.resource).pattern": "properties/{property}/dataStreams/{data_stream}/eventCreateRules/{event_create_rule}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "destinationEvent": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "eventConditions": { + "rule": "repeated", + "type": "MatchingCondition", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "sourceCopyParameters": { + "type": "bool", + "id": 4 + }, + "parameterMutations": { + "rule": "repeated", + "type": "ParameterMutation", + "id": 5 + } + } + }, + "MatchingCondition": { + "fields": { + "field": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "comparisonType": { + "type": "ComparisonType", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "value": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "negated": { + "type": "bool", + "id": 4 + } + }, + "nested": { + "ComparisonType": { + "values": { + "COMPARISON_TYPE_UNSPECIFIED": 0, + "EQUALS": 1, + "EQUALS_CASE_INSENSITIVE": 2, + "CONTAINS": 3, + "CONTAINS_CASE_INSENSITIVE": 4, + "STARTS_WITH": 5, + "STARTS_WITH_CASE_INSENSITIVE": 6, + "ENDS_WITH": 7, + "ENDS_WITH_CASE_INSENSITIVE": 8, + "GREATER_THAN": 9, + "GREATER_THAN_OR_EQUAL": 10, + "LESS_THAN": 11, + "LESS_THAN_OR_EQUAL": 12, + "REGULAR_EXPRESSION": 13, + "REGULAR_EXPRESSION_CASE_INSENSITIVE": 14 + } + } + } + }, "ExpandedDataSetFilter": { "oneofs": { "oneFilter": { @@ -5270,7 +6110,10 @@ "ATTRIBUTION_SETTINGS": 20, "EXPANDED_DATA_SET": 21, "CHANNEL_GROUP": 22, - "ENHANCED_MEASUREMENT_SETTINGS": 24 + "ENHANCED_MEASUREMENT_SETTINGS": 24, + "ADSENSE_LINK": 27, + "AUDIENCE": 28, + "EVENT_CREATE_RULE": 29 } }, "GoogleSignalsState": { @@ -5924,8 +6767,12 @@ "dataStream", "attributionSettings", "expandedDataSet", + "channelGroup", "bigqueryLink", - "enhancedMeasurementSettings" + "enhancedMeasurementSettings", + "adsenseLink", + "audience", + "eventCreateRule" ] } }, @@ -5994,6 +6841,10 @@ "type": "ExpandedDataSet", "id": 21 }, + "channelGroup": { + "type": "ChannelGroup", + "id": 22 + }, "bigqueryLink": { "type": "BigQueryLink", "id": 23 @@ -6001,6 +6852,18 @@ "enhancedMeasurementSettings": { "type": "EnhancedMeasurementSettings", "id": 24 + }, + "adsenseLink": { + "type": "AdSenseLink", + "id": 27 + }, + "audience": { + "type": "Audience", + "id": 28 + }, + "eventCreateRule": { + "type": "EventCreateRule", + "id": 29 } } } @@ -6316,7 +7179,8 @@ "values": { "DIMENSION_SCOPE_UNSPECIFIED": 0, "EVENT": 1, - "USER": 2 + "USER": 2, + "ITEM": 3 } } } @@ -6670,6 +7534,28 @@ } } } + }, + "AdSenseLink": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/AdSenseLink", + "(google.api.resource).pattern": "properties/{property}/adSenseLinks/{adsense_link}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "adClientCode": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + } } } }, diff --git a/packages/google-analytics-admin/samples/README.md b/packages/google-analytics-admin/samples/README.md index 5193b2426c9..448d8cb4ba0 100644 --- a/packages/google-analytics-admin/samples/README.md +++ b/packages/google-analytics-admin/samples/README.md @@ -28,7 +28,9 @@ * [Analytics_admin_service.batch_update_user_links](#analytics_admin_service.batch_update_user_links) * [Analytics_admin_service.cancel_display_video360_advertiser_link_proposal](#analytics_admin_service.cancel_display_video360_advertiser_link_proposal) * [Analytics_admin_service.create_access_binding](#analytics_admin_service.create_access_binding) + * [Analytics_admin_service.create_ad_sense_link](#analytics_admin_service.create_ad_sense_link) * [Analytics_admin_service.create_audience](#analytics_admin_service.create_audience) + * [Analytics_admin_service.create_channel_group](#analytics_admin_service.create_channel_group) * [Analytics_admin_service.create_connected_site_tag](#analytics_admin_service.create_connected_site_tag) * [Analytics_admin_service.create_conversion_event](#analytics_admin_service.create_conversion_event) * [Analytics_admin_service.create_custom_dimension](#analytics_admin_service.create_custom_dimension) @@ -36,6 +38,7 @@ * [Analytics_admin_service.create_data_stream](#analytics_admin_service.create_data_stream) * [Analytics_admin_service.create_display_video360_advertiser_link](#analytics_admin_service.create_display_video360_advertiser_link) * [Analytics_admin_service.create_display_video360_advertiser_link_proposal](#analytics_admin_service.create_display_video360_advertiser_link_proposal) + * [Analytics_admin_service.create_event_create_rule](#analytics_admin_service.create_event_create_rule) * [Analytics_admin_service.create_expanded_data_set](#analytics_admin_service.create_expanded_data_set) * [Analytics_admin_service.create_firebase_link](#analytics_admin_service.create_firebase_link) * [Analytics_admin_service.create_google_ads_link](#analytics_admin_service.create_google_ads_link) @@ -46,12 +49,15 @@ * [Analytics_admin_service.create_web_data_stream](#analytics_admin_service.create_web_data_stream) * [Analytics_admin_service.delete_access_binding](#analytics_admin_service.delete_access_binding) * [Analytics_admin_service.delete_account](#analytics_admin_service.delete_account) + * [Analytics_admin_service.delete_ad_sense_link](#analytics_admin_service.delete_ad_sense_link) * [Analytics_admin_service.delete_android_app_data_stream](#analytics_admin_service.delete_android_app_data_stream) + * [Analytics_admin_service.delete_channel_group](#analytics_admin_service.delete_channel_group) * [Analytics_admin_service.delete_connected_site_tag](#analytics_admin_service.delete_connected_site_tag) * [Analytics_admin_service.delete_conversion_event](#analytics_admin_service.delete_conversion_event) * [Analytics_admin_service.delete_data_stream](#analytics_admin_service.delete_data_stream) * [Analytics_admin_service.delete_display_video360_advertiser_link](#analytics_admin_service.delete_display_video360_advertiser_link) * [Analytics_admin_service.delete_display_video360_advertiser_link_proposal](#analytics_admin_service.delete_display_video360_advertiser_link_proposal) + * [Analytics_admin_service.delete_event_create_rule](#analytics_admin_service.delete_event_create_rule) * [Analytics_admin_service.delete_expanded_data_set](#analytics_admin_service.delete_expanded_data_set) * [Analytics_admin_service.delete_firebase_link](#analytics_admin_service.delete_firebase_link) * [Analytics_admin_service.delete_google_ads_link](#analytics_admin_service.delete_google_ads_link) @@ -62,12 +68,15 @@ * [Analytics_admin_service.delete_user_link](#analytics_admin_service.delete_user_link) * [Analytics_admin_service.delete_web_data_stream](#analytics_admin_service.delete_web_data_stream) * [Analytics_admin_service.fetch_automated_ga4_configuration_opt_out](#analytics_admin_service.fetch_automated_ga4_configuration_opt_out) + * [Analytics_admin_service.fetch_connected_ga4_property](#analytics_admin_service.fetch_connected_ga4_property) * [Analytics_admin_service.get_access_binding](#analytics_admin_service.get_access_binding) * [Analytics_admin_service.get_account](#analytics_admin_service.get_account) + * [Analytics_admin_service.get_ad_sense_link](#analytics_admin_service.get_ad_sense_link) * [Analytics_admin_service.get_android_app_data_stream](#analytics_admin_service.get_android_app_data_stream) * [Analytics_admin_service.get_attribution_settings](#analytics_admin_service.get_attribution_settings) * [Analytics_admin_service.get_audience](#analytics_admin_service.get_audience) * [Analytics_admin_service.get_big_query_link](#analytics_admin_service.get_big_query_link) + * [Analytics_admin_service.get_channel_group](#analytics_admin_service.get_channel_group) * [Analytics_admin_service.get_conversion_event](#analytics_admin_service.get_conversion_event) * [Analytics_admin_service.get_custom_dimension](#analytics_admin_service.get_custom_dimension) * [Analytics_admin_service.get_custom_metric](#analytics_admin_service.get_custom_metric) @@ -77,6 +86,7 @@ * [Analytics_admin_service.get_display_video360_advertiser_link](#analytics_admin_service.get_display_video360_advertiser_link) * [Analytics_admin_service.get_display_video360_advertiser_link_proposal](#analytics_admin_service.get_display_video360_advertiser_link_proposal) * [Analytics_admin_service.get_enhanced_measurement_settings](#analytics_admin_service.get_enhanced_measurement_settings) + * [Analytics_admin_service.get_event_create_rule](#analytics_admin_service.get_event_create_rule) * [Analytics_admin_service.get_expanded_data_set](#analytics_admin_service.get_expanded_data_set) * [Analytics_admin_service.get_global_site_tag](#analytics_admin_service.get_global_site_tag) * [Analytics_admin_service.get_google_signals_settings](#analytics_admin_service.get_google_signals_settings) @@ -89,9 +99,11 @@ * [Analytics_admin_service.list_access_bindings](#analytics_admin_service.list_access_bindings) * [Analytics_admin_service.list_account_summaries](#analytics_admin_service.list_account_summaries) * [Analytics_admin_service.list_accounts](#analytics_admin_service.list_accounts) + * [Analytics_admin_service.list_ad_sense_links](#analytics_admin_service.list_ad_sense_links) * [Analytics_admin_service.list_android_app_data_streams](#analytics_admin_service.list_android_app_data_streams) * [Analytics_admin_service.list_audiences](#analytics_admin_service.list_audiences) * [Analytics_admin_service.list_big_query_links](#analytics_admin_service.list_big_query_links) + * [Analytics_admin_service.list_channel_groups](#analytics_admin_service.list_channel_groups) * [Analytics_admin_service.list_connected_site_tags](#analytics_admin_service.list_connected_site_tags) * [Analytics_admin_service.list_conversion_events](#analytics_admin_service.list_conversion_events) * [Analytics_admin_service.list_custom_dimensions](#analytics_admin_service.list_custom_dimensions) @@ -99,6 +111,7 @@ * [Analytics_admin_service.list_data_streams](#analytics_admin_service.list_data_streams) * [Analytics_admin_service.list_display_video360_advertiser_link_proposals](#analytics_admin_service.list_display_video360_advertiser_link_proposals) * [Analytics_admin_service.list_display_video360_advertiser_links](#analytics_admin_service.list_display_video360_advertiser_links) + * [Analytics_admin_service.list_event_create_rules](#analytics_admin_service.list_event_create_rules) * [Analytics_admin_service.list_expanded_data_sets](#analytics_admin_service.list_expanded_data_sets) * [Analytics_admin_service.list_firebase_links](#analytics_admin_service.list_firebase_links) * [Analytics_admin_service.list_google_ads_links](#analytics_admin_service.list_google_ads_links) @@ -117,12 +130,14 @@ * [Analytics_admin_service.update_android_app_data_stream](#analytics_admin_service.update_android_app_data_stream) * [Analytics_admin_service.update_attribution_settings](#analytics_admin_service.update_attribution_settings) * [Analytics_admin_service.update_audience](#analytics_admin_service.update_audience) + * [Analytics_admin_service.update_channel_group](#analytics_admin_service.update_channel_group) * [Analytics_admin_service.update_custom_dimension](#analytics_admin_service.update_custom_dimension) * [Analytics_admin_service.update_custom_metric](#analytics_admin_service.update_custom_metric) * [Analytics_admin_service.update_data_retention_settings](#analytics_admin_service.update_data_retention_settings) * [Analytics_admin_service.update_data_stream](#analytics_admin_service.update_data_stream) * [Analytics_admin_service.update_display_video360_advertiser_link](#analytics_admin_service.update_display_video360_advertiser_link) * [Analytics_admin_service.update_enhanced_measurement_settings](#analytics_admin_service.update_enhanced_measurement_settings) + * [Analytics_admin_service.update_event_create_rule](#analytics_admin_service.update_event_create_rule) * [Analytics_admin_service.update_expanded_data_set](#analytics_admin_service.update_expanded_data_set) * [Analytics_admin_service.update_google_ads_link](#analytics_admin_service.update_google_ads_link) * [Analytics_admin_service.update_google_signals_settings](#analytics_admin_service.update_google_signals_settings) @@ -181,7 +196,6 @@ * [Analytics_admin_service.update_measurement_protocol_secret](#analytics_admin_service.update_measurement_protocol_secret) * [Analytics_admin_service.update_property](#analytics_admin_service.update_property) * [Quickstart](#quickstart) - * [Quickstart.test](#quickstart.test) ## Before you begin @@ -470,6 +484,23 @@ __Usage:__ +### Analytics_admin_service.create_ad_sense_link + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_ad_sense_link.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_ad_sense_link.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_ad_sense_link.js` + + +----- + + + + ### Analytics_admin_service.create_audience View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_audience.js). @@ -487,6 +518,23 @@ __Usage:__ +### Analytics_admin_service.create_channel_group + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_channel_group.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_channel_group.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_channel_group.js` + + +----- + + + + ### Analytics_admin_service.create_connected_site_tag View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_connected_site_tag.js). @@ -606,6 +654,23 @@ __Usage:__ +### Analytics_admin_service.create_event_create_rule + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_event_create_rule.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_event_create_rule.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_event_create_rule.js` + + +----- + + + + ### Analytics_admin_service.create_expanded_data_set View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_expanded_data_set.js). @@ -776,6 +841,23 @@ __Usage:__ +### Analytics_admin_service.delete_ad_sense_link + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_ad_sense_link.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_ad_sense_link.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_ad_sense_link.js` + + +----- + + + + ### Analytics_admin_service.delete_android_app_data_stream View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_android_app_data_stream.js). @@ -793,6 +875,23 @@ __Usage:__ +### Analytics_admin_service.delete_channel_group + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_channel_group.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_channel_group.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_channel_group.js` + + +----- + + + + ### Analytics_admin_service.delete_connected_site_tag View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_connected_site_tag.js). @@ -878,6 +977,23 @@ __Usage:__ +### Analytics_admin_service.delete_event_create_rule + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_event_create_rule.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_event_create_rule.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_event_create_rule.js` + + +----- + + + + ### Analytics_admin_service.delete_expanded_data_set View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_expanded_data_set.js). @@ -1048,6 +1164,23 @@ __Usage:__ +### Analytics_admin_service.fetch_connected_ga4_property + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.fetch_connected_ga4_property.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.fetch_connected_ga4_property.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.fetch_connected_ga4_property.js` + + +----- + + + + ### Analytics_admin_service.get_access_binding View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_access_binding.js). @@ -1082,6 +1215,23 @@ __Usage:__ +### Analytics_admin_service.get_ad_sense_link + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_ad_sense_link.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_ad_sense_link.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_ad_sense_link.js` + + +----- + + + + ### Analytics_admin_service.get_android_app_data_stream View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_android_app_data_stream.js). @@ -1150,6 +1300,23 @@ __Usage:__ +### Analytics_admin_service.get_channel_group + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_channel_group.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_channel_group.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_channel_group.js` + + +----- + + + + ### Analytics_admin_service.get_conversion_event View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_conversion_event.js). @@ -1303,6 +1470,23 @@ __Usage:__ +### Analytics_admin_service.get_event_create_rule + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_event_create_rule.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_event_create_rule.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_event_create_rule.js` + + +----- + + + + ### Analytics_admin_service.get_expanded_data_set View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_expanded_data_set.js). @@ -1507,6 +1691,23 @@ __Usage:__ +### Analytics_admin_service.list_ad_sense_links + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_ad_sense_links.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_ad_sense_links.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_ad_sense_links.js` + + +----- + + + + ### Analytics_admin_service.list_android_app_data_streams View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_android_app_data_streams.js). @@ -1558,6 +1759,23 @@ __Usage:__ +### Analytics_admin_service.list_channel_groups + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_channel_groups.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_channel_groups.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_channel_groups.js` + + +----- + + + + ### Analytics_admin_service.list_connected_site_tags View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_connected_site_tags.js). @@ -1677,6 +1895,23 @@ __Usage:__ +### Analytics_admin_service.list_event_create_rules + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_event_create_rules.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_event_create_rules.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_event_create_rules.js` + + +----- + + + + ### Analytics_admin_service.list_expanded_data_sets View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_expanded_data_sets.js). @@ -1983,6 +2218,23 @@ __Usage:__ +### Analytics_admin_service.update_channel_group + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_channel_group.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_channel_group.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_channel_group.js` + + +----- + + + + ### Analytics_admin_service.update_custom_dimension View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_custom_dimension.js). @@ -2085,6 +2337,23 @@ __Usage:__ +### Analytics_admin_service.update_event_create_rule + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_event_create_rule.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_event_create_rule.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_event_create_rule.js` + + +----- + + + + ### Analytics_admin_service.update_expanded_data_set View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_expanded_data_set.js). @@ -3066,23 +3335,6 @@ __Usage:__ `node packages/google-analytics-admin/samples/quickstart.js` ------ - - - - -### Quickstart.test - -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/test/quickstart.test.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/test/quickstart.test.js,samples/README.md) - -__Usage:__ - - -`node packages/google-analytics-admin/samples/test/quickstart.test.js` - - diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_ad_sense_link.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_ad_sense_link.js new file mode 100644 index 00000000000..01bf8526bec --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_ad_sense_link.js @@ -0,0 +1,68 @@ +// Copyright 2023 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, adsenseLink) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateAdSenseLink_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 property for which to create an AdSense Link. + * Format: properties/{propertyId} + * Example: properties/1234 + */ + // const parent = 'abc123' + /** + * Required. The AdSense Link to create + */ + // const adsenseLink = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callCreateAdSenseLink() { + // Construct request + const request = { + parent, + adsenseLink, + }; + + // Run request + const response = await adminClient.createAdSenseLink(request); + console.log(response); + } + + callCreateAdSenseLink(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateAdSenseLink_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.create_channel_group.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_channel_group.js new file mode 100644 index 00000000000..f4eb68133be --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_channel_group.js @@ -0,0 +1,67 @@ +// Copyright 2023 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, channelGroup) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateChannelGroup_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 property for which to create a ChannelGroup. + * Example format: properties/1234 + */ + // const parent = 'abc123' + /** + * Required. The ChannelGroup to create. + */ + // const channelGroup = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callCreateChannelGroup() { + // Construct request + const request = { + parent, + channelGroup, + }; + + // Run request + const response = await adminClient.createChannelGroup(request); + console.log(response); + } + + callCreateChannelGroup(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateChannelGroup_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.create_event_create_rule.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_event_create_rule.js new file mode 100644 index 00000000000..ba124061974 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_event_create_rule.js @@ -0,0 +1,66 @@ +// Copyright 2023 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, eventCreateRule) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateEventCreateRule_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. Example format: properties/123/dataStreams/456 + */ + // const parent = 'abc123' + /** + * Required. The EventCreateRule to create. + */ + // const eventCreateRule = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callCreateEventCreateRule() { + // Construct request + const request = { + parent, + eventCreateRule, + }; + + // Run request + const response = await adminClient.createEventCreateRule(request); + console.log(response); + } + + callCreateEventCreateRule(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateEventCreateRule_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.delete_ad_sense_link.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_ad_sense_link.js new file mode 100644 index 00000000000..cfe7bd0a7bc --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_ad_sense_link.js @@ -0,0 +1,63 @@ +// Copyright 2023 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_DeleteAdSenseLink_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. Unique identifier for the AdSense Link to be deleted. + * Format: properties/{propertyId}/adSenseLinks/{linkId} + * Example: properties/1234/adSenseLinks/5678 + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callDeleteAdSenseLink() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteAdSenseLink(request); + console.log(response); + } + + callDeleteAdSenseLink(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteAdSenseLink_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.delete_channel_group.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_channel_group.js new file mode 100644 index 00000000000..e119a5321c9 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_channel_group.js @@ -0,0 +1,62 @@ +// Copyright 2023 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_DeleteChannelGroup_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 ChannelGroup to delete. + * Example format: properties/1234/channelGroups/5678 + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callDeleteChannelGroup() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteChannelGroup(request); + console.log(response); + } + + callDeleteChannelGroup(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteChannelGroup_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.delete_event_create_rule.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_event_create_rule.js new file mode 100644 index 00000000000..252d89c28e2 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_event_create_rule.js @@ -0,0 +1,62 @@ +// Copyright 2023 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_DeleteEventCreateRule_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. Example format: + * properties/123/dataStreams/456/eventCreateRules/789 + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callDeleteEventCreateRule() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteEventCreateRule(request); + console.log(response); + } + + callDeleteEventCreateRule(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteEventCreateRule_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.fetch_connected_ga4_property.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.fetch_connected_ga4_property.js new file mode 100644 index 00000000000..a4cc6959192 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.fetch_connected_ga4_property.js @@ -0,0 +1,65 @@ +// Copyright 2023 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(property) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_FetchConnectedGa4Property_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 UA property for which to look up the connected GA4 property. + * Note this request uses the + * internal property ID, not the tracking ID of the form UA-XXXXXX-YY. + * Format: properties/{internal_web_property_id} + * Example: properties/1234 + */ + // const property = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callFetchConnectedGa4Property() { + // Construct request + const request = { + property, + }; + + // Run request + const response = await adminClient.fetchConnectedGa4Property(request); + console.log(response); + } + + callFetchConnectedGa4Property(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_FetchConnectedGa4Property_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.get_ad_sense_link.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_ad_sense_link.js new file mode 100644 index 00000000000..29cb24550eb --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_ad_sense_link.js @@ -0,0 +1,63 @@ +// Copyright 2023 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_GetAdSenseLink_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. Unique identifier for the AdSense Link requested. + * Format: properties/{propertyId}/adSenseLinks/{linkId} + * Example: properties/1234/adSenseLinks/5678 + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetAdSenseLink() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getAdSenseLink(request); + console.log(response); + } + + callGetAdSenseLink(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetAdSenseLink_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.get_channel_group.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_channel_group.js new file mode 100644 index 00000000000..4a47e70057e --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_channel_group.js @@ -0,0 +1,62 @@ +// Copyright 2023 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_GetChannelGroup_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 ChannelGroup to get. + * Example format: properties/1234/channelGroups/5678 + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetChannelGroup() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getChannelGroup(request); + console.log(response); + } + + callGetChannelGroup(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetChannelGroup_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.get_event_create_rule.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_event_create_rule.js new file mode 100644 index 00000000000..1142386797b --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_event_create_rule.js @@ -0,0 +1,62 @@ +// Copyright 2023 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_GetEventCreateRule_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 EventCreateRule to get. + * Example format: properties/123/dataStreams/456/eventCreateRules/789 + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetEventCreateRule() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getEventCreateRule(request); + console.log(response); + } + + callGetEventCreateRule(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetEventCreateRule_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.get_expanded_data_set.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_expanded_data_set.js index 96f278f0ea4..c02a61f4b16 100644 --- a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_expanded_data_set.js +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_expanded_data_set.js @@ -29,7 +29,7 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the Audience to get. + * Required. The name of the ExpandedDataSet to get. * Example format: properties/1234/expandedDataSets/5678 */ // const name = 'abc123' diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_ad_sense_links.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_ad_sense_links.js new file mode 100644 index 00000000000..b18a2f145d4 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_ad_sense_links.js @@ -0,0 +1,78 @@ +// Copyright 2023 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAdSenseLinks_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 of the parent property. + * Format: properties/{propertyId} + * Example: properties/1234 + */ + // const parent = 'abc123' + /** + * 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 `ListAdSenseLinks` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAdSenseLinks` must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callListAdSenseLinks() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await adminClient.listAdSenseLinksAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAdSenseLinks(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAdSenseLinks_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_channel_groups.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_channel_groups.js new file mode 100644 index 00000000000..f1ffa9e687f --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_channel_groups.js @@ -0,0 +1,77 @@ +// Copyright 2023 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListChannelGroups_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 property for which to list ChannelGroups. + * Example format: properties/1234 + */ + // const parent = 'abc123' + /** + * 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 `ListChannelGroups` call. Provide + * this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListChannelGroups` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callListChannelGroups() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await adminClient.listChannelGroupsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListChannelGroups(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListChannelGroups_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_event_create_rules.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_event_create_rules.js new file mode 100644 index 00000000000..df7f8c7147d --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_event_create_rules.js @@ -0,0 +1,76 @@ +// Copyright 2023 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListEventCreateRules_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. Example format: properties/123/dataStreams/456 + */ + // const parent = 'abc123' + /** + * 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 `ListEventCreateRules` call. Provide + * this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListEventCreateRules` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callListEventCreateRules() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await adminClient.listEventCreateRulesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListEventCreateRules(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListEventCreateRules_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.update_channel_group.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_channel_group.js new file mode 100644 index 00000000000..559ecb2da53 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_channel_group.js @@ -0,0 +1,71 @@ +// Copyright 2023 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(channelGroup, updateMask) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateChannelGroup_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 ChannelGroup to update. + * The resource's `name` field is used to identify the ChannelGroup to be + * updated. + */ + // const channelGroup = {} + /** + * Required. The list of fields to be updated. Field names must be in snake + * case (e.g., "field_to_update"). Omitted fields will not be updated. To + * replace the entire entity, use one path with the string "*" to match all + * fields. + */ + // const updateMask = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callUpdateChannelGroup() { + // Construct request + const request = { + channelGroup, + updateMask, + }; + + // Run request + const response = await adminClient.updateChannelGroup(request); + console.log(response); + } + + callUpdateChannelGroup(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateChannelGroup_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.update_event_create_rule.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_event_create_rule.js new file mode 100644 index 00000000000..e42af282caa --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_event_create_rule.js @@ -0,0 +1,71 @@ +// Copyright 2023 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(eventCreateRule, updateMask) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateEventCreateRule_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 EventCreateRule to update. + * The resource's `name` field is used to identify the EventCreateRule to be + * updated. + */ + // const eventCreateRule = {} + /** + * Required. The list of fields to be updated. Field names must be in snake + * case (e.g., "field_to_update"). Omitted fields will not be updated. To + * replace the entire entity, use one path with the string "*" to match all + * fields. + */ + // const updateMask = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callUpdateEventCreateRule() { + // Construct request + const request = { + eventCreateRule, + updateMask, + }; + + // Run request + const response = await adminClient.updateEventCreateRule(request); + console.log(response); + } + + callUpdateEventCreateRule(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateEventCreateRule_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/snippet_metadata.google.analytics.admin.v1alpha.json b/packages/google-analytics-admin/samples/generated/v1alpha/snippet_metadata.google.analytics.admin.v1alpha.json index 0548aeefd75..23fab4dbf53 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 @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-admin", - "version": "4.7.0", + "version": "4.9.0", "language": "TYPESCRIPT", "apis": [ { @@ -4307,6 +4307,222 @@ } } }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetChannelGroup_async", + "title": "AnalyticsAdminService getChannelGroup Sample", + "origin": "API_DEFINITION", + "description": " Lookup for a single ChannelGroup.", + "canonical": true, + "file": "analytics_admin_service.get_channel_group.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetChannelGroup", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetChannelGroup", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.ChannelGroup", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "GetChannelGroup", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetChannelGroup", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListChannelGroups_async", + "title": "AnalyticsAdminService listChannelGroups Sample", + "origin": "API_DEFINITION", + "description": " Lists ChannelGroups on a property.", + "canonical": true, + "file": "analytics_admin_service.list_channel_groups.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListChannelGroups", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListChannelGroups", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.ListChannelGroupsResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ListChannelGroups", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListChannelGroups", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateChannelGroup_async", + "title": "AnalyticsAdminService createChannelGroup Sample", + "origin": "API_DEFINITION", + "description": " Creates a ChannelGroup.", + "canonical": true, + "file": "analytics_admin_service.create_channel_group.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateChannelGroup", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CreateChannelGroup", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "channel_group", + "type": ".google.analytics.admin.v1alpha.ChannelGroup" + } + ], + "resultType": ".google.analytics.admin.v1alpha.ChannelGroup", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "CreateChannelGroup", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CreateChannelGroup", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateChannelGroup_async", + "title": "AnalyticsAdminService updateChannelGroup Sample", + "origin": "API_DEFINITION", + "description": " Updates a ChannelGroup.", + "canonical": true, + "file": "analytics_admin_service.update_channel_group.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateChannelGroup", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateChannelGroup", + "async": true, + "parameters": [ + { + "name": "channel_group", + "type": ".google.analytics.admin.v1alpha.ChannelGroup" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.analytics.admin.v1alpha.ChannelGroup", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "UpdateChannelGroup", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateChannelGroup", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteChannelGroup_async", + "title": "AnalyticsAdminService deleteChannelGroup Sample", + "origin": "API_DEFINITION", + "description": " Deletes a ChannelGroup on a property.", + "canonical": true, + "file": "analytics_admin_service.delete_channel_group.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteChannelGroup", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteChannelGroup", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "DeleteChannelGroup", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteChannelGroup", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, { "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_SetAutomatedGa4ConfigurationOptOut_async", "title": "AnalyticsAdminService setAutomatedGa4ConfigurationOptOut Sample", @@ -4690,6 +4906,434 @@ } } } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_FetchConnectedGa4Property_async", + "title": "AnalyticsAdminService fetchConnectedGa4Property Sample", + "origin": "API_DEFINITION", + "description": " Given a specified UA property, looks up the GA4 property connected to it. Note: this cannot be used with GA4 properties.", + "canonical": true, + "file": "analytics_admin_service.fetch_connected_ga4_property.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchConnectedGa4Property", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.FetchConnectedGa4Property", + "async": true, + "parameters": [ + { + "name": "property", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "FetchConnectedGa4Property", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.FetchConnectedGa4Property", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetAdSenseLink_async", + "title": "AnalyticsAdminService getAdSenseLink Sample", + "origin": "API_DEFINITION", + "description": " Looks up a single AdSenseLink.", + "canonical": true, + "file": "analytics_admin_service.get_ad_sense_link.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAdSenseLink", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetAdSenseLink", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.AdSenseLink", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "GetAdSenseLink", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetAdSenseLink", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateAdSenseLink_async", + "title": "AnalyticsAdminService createAdSenseLink Sample", + "origin": "API_DEFINITION", + "description": " Creates an AdSenseLink.", + "canonical": true, + "file": "analytics_admin_service.create_ad_sense_link.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateAdSenseLink", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CreateAdSenseLink", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "adsense_link", + "type": ".google.analytics.admin.v1alpha.AdSenseLink" + } + ], + "resultType": ".google.analytics.admin.v1alpha.AdSenseLink", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "CreateAdSenseLink", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CreateAdSenseLink", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteAdSenseLink_async", + "title": "AnalyticsAdminService deleteAdSenseLink Sample", + "origin": "API_DEFINITION", + "description": " Deletes an AdSenseLink.", + "canonical": true, + "file": "analytics_admin_service.delete_ad_sense_link.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteAdSenseLink", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteAdSenseLink", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "DeleteAdSenseLink", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteAdSenseLink", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAdSenseLinks_async", + "title": "AnalyticsAdminService listAdSenseLinks Sample", + "origin": "API_DEFINITION", + "description": " Lists AdSenseLinks on a property.", + "canonical": true, + "file": "analytics_admin_service.list_ad_sense_links.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAdSenseLinks", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListAdSenseLinks", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.ListAdSenseLinksResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ListAdSenseLinks", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListAdSenseLinks", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetEventCreateRule_async", + "title": "AnalyticsAdminService getEventCreateRule Sample", + "origin": "API_DEFINITION", + "description": " Lookup for a single EventCreateRule.", + "canonical": true, + "file": "analytics_admin_service.get_event_create_rule.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetEventCreateRule", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetEventCreateRule", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.EventCreateRule", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "GetEventCreateRule", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetEventCreateRule", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListEventCreateRules_async", + "title": "AnalyticsAdminService listEventCreateRules Sample", + "origin": "API_DEFINITION", + "description": " Lists EventCreateRules on a web data stream.", + "canonical": true, + "file": "analytics_admin_service.list_event_create_rules.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListEventCreateRules", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListEventCreateRules", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.ListEventCreateRulesResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ListEventCreateRules", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListEventCreateRules", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateEventCreateRule_async", + "title": "AnalyticsAdminService createEventCreateRule Sample", + "origin": "API_DEFINITION", + "description": " Creates an EventCreateRule.", + "canonical": true, + "file": "analytics_admin_service.create_event_create_rule.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateEventCreateRule", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CreateEventCreateRule", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "event_create_rule", + "type": ".google.analytics.admin.v1alpha.EventCreateRule" + } + ], + "resultType": ".google.analytics.admin.v1alpha.EventCreateRule", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "CreateEventCreateRule", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CreateEventCreateRule", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateEventCreateRule_async", + "title": "AnalyticsAdminService updateEventCreateRule Sample", + "origin": "API_DEFINITION", + "description": " Updates an EventCreateRule.", + "canonical": true, + "file": "analytics_admin_service.update_event_create_rule.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateEventCreateRule", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateEventCreateRule", + "async": true, + "parameters": [ + { + "name": "event_create_rule", + "type": ".google.analytics.admin.v1alpha.EventCreateRule" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.analytics.admin.v1alpha.EventCreateRule", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "UpdateEventCreateRule", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateEventCreateRule", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteEventCreateRule_async", + "title": "AnalyticsAdminService deleteEventCreateRule Sample", + "origin": "API_DEFINITION", + "description": " Deletes an EventCreateRule.", + "canonical": true, + "file": "analytics_admin_service.delete_event_create_rule.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteEventCreateRule", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteEventCreateRule", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "DeleteEventCreateRule", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteEventCreateRule", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } } ] } \ No newline at end of file diff --git a/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata.google.analytics.admin.v1beta.json b/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata.google.analytics.admin.v1beta.json index 11cb7003545..9e7550d062c 100644 --- a/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata.google.analytics.admin.v1beta.json +++ b/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata.google.analytics.admin.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-admin", - "version": "4.7.0", + "version": "4.9.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-analytics-admin/samples/package.json b/packages/google-analytics-admin/samples/package.json index 128bcfb229c..f0d492f940d 100644 --- a/packages/google-analytics-admin/samples/package.json +++ b/packages/google-analytics-admin/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-analytics/admin": "^4.7.1", + "@google-analytics/admin": "^4.9.0", "google-auth-library": "^8.0.0", "google-gax": "^3.0.0", "http": "0.0.1-security", diff --git a/packages/google-analytics-admin/samples/test/quickstart.test.js b/packages/google-analytics-admin/samples/test/quickstart.test.js index 2fd67139a40..ebcee308b59 100644 --- a/packages/google-analytics-admin/samples/test/quickstart.test.js +++ b/packages/google-analytics-admin/samples/test/quickstart.test.js @@ -1,3 +1,4 @@ +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -29,6 +30,6 @@ const cwd = path.join(__dirname, '..'); describe('Quickstart', async () => { it('should run quickstart', async () => { const output = execSync('node quickstart.js', {cwd}); - assert(output != null); + assert(output !== null); }); }); 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 e412d567fc2..920df2ba2d4 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 @@ -191,6 +191,9 @@ export class AnalyticsAdminServiceClient { accountUserLinkPathTemplate: new this._gaxModule.PathTemplate( 'accounts/{account}/userLinks/{user_link}' ), + adSenseLinkPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/adSenseLinks/{adsense_link}' + ), attributionSettingsPathTemplate: new this._gaxModule.PathTemplate( 'properties/{property}/attributionSettings' ), @@ -200,6 +203,9 @@ export class AnalyticsAdminServiceClient { bigQueryLinkPathTemplate: new this._gaxModule.PathTemplate( 'properties/{property}/bigQueryLinks/{bigquery_link}' ), + channelGroupPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/channelGroups/{channel_group}' + ), conversionEventPathTemplate: new this._gaxModule.PathTemplate( 'properties/{property}/conversionEvents/{conversion_event}' ), @@ -229,6 +235,9 @@ export class AnalyticsAdminServiceClient { enhancedMeasurementSettingsPathTemplate: new this._gaxModule.PathTemplate( 'properties/{property}/dataStreams/{data_stream}/enhancedMeasurementSettings' ), + eventCreateRulePathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/dataStreams/{data_stream}/eventCreateRules/{event_create_rule}' + ), expandedDataSetPathTemplate: new this._gaxModule.PathTemplate( 'properties/{property}/expandedDataSets/{expanded_data_set}' ), @@ -361,11 +370,26 @@ export class AnalyticsAdminServiceClient { 'nextPageToken', 'expandedDataSets' ), + listChannelGroups: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'channelGroups' + ), listBigQueryLinks: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'bigqueryLinks' ), + listAdSenseLinks: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'adsenseLinks' + ), + listEventCreateRules: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'eventCreateRules' + ), }; // Put together the default options sent with requests. @@ -517,6 +541,11 @@ export class AnalyticsAdminServiceClient { 'createExpandedDataSet', 'updateExpandedDataSet', 'deleteExpandedDataSet', + 'getChannelGroup', + 'listChannelGroups', + 'createChannelGroup', + 'updateChannelGroup', + 'deleteChannelGroup', 'setAutomatedGa4ConfigurationOptOut', 'fetchAutomatedGa4ConfigurationOptOut', 'getBigQueryLink', @@ -526,6 +555,16 @@ export class AnalyticsAdminServiceClient { 'createConnectedSiteTag', 'deleteConnectedSiteTag', 'listConnectedSiteTags', + 'fetchConnectedGa4Property', + 'getAdSenseLink', + 'createAdSenseLink', + 'deleteAdSenseLink', + 'listAdSenseLinks', + 'getEventCreateRule', + 'listEventCreateRules', + 'createEventCreateRule', + 'updateEventCreateRule', + 'deleteEventCreateRule', ]; for (const methodName of analyticsAdminServiceStubMethods) { const callPromise = this.analyticsAdminServiceStub.then( @@ -8251,7 +8290,7 @@ export class AnalyticsAdminServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The name of the Audience to get. + * Required. The name of the ExpandedDataSet to get. * Example format: properties/1234/expandedDataSets/5678 * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -8644,88 +8683,76 @@ export class AnalyticsAdminServiceClient { return this.innerApiCalls.deleteExpandedDataSet(request, options, callback); } /** - * Sets the opt out status for the automated GA4 setup process for a UA - * property. - * Note: this has no effect on GA4 property. + * Lookup for a single ChannelGroup. * * @param {Object} request * The request object that will be sent. - * @param {string} request.property - * Required. The UA property to set the opt out status. Note this request uses - * the internal property ID, not the tracking ID of the form UA-XXXXXX-YY. - * Format: properties/{internalWebPropertyId} - * Example: properties/1234 - * @param {boolean} request.optOut - * The status to set. + * @param {string} request.name + * Required. The ChannelGroup to get. + * Example format: properties/1234/channelGroups/5678 * @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 google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse | SetAutomatedGa4ConfigurationOptOutResponse}. + * The first element of the array is an object representing {@link google.analytics.admin.v1alpha.ChannelGroup | ChannelGroup}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.set_automated_ga4_configuration_opt_out.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_SetAutomatedGa4ConfigurationOptOut_async + * @example include:samples/generated/v1alpha/analytics_admin_service.get_channel_group.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetChannelGroup_async */ - setAutomatedGa4ConfigurationOptOut( - request?: protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest, + getChannelGroup( + request?: protos.google.analytics.admin.v1alpha.IGetChannelGroupRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse, - ( - | protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest - | undefined - ), + protos.google.analytics.admin.v1alpha.IChannelGroup, + protos.google.analytics.admin.v1alpha.IGetChannelGroupRequest | undefined, {} | undefined ] >; - setAutomatedGa4ConfigurationOptOut( - request: protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest, + getChannelGroup( + request: protos.google.analytics.admin.v1alpha.IGetChannelGroupRequest, options: CallOptions, callback: Callback< - protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse, - | protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest + protos.google.analytics.admin.v1alpha.IChannelGroup, + | protos.google.analytics.admin.v1alpha.IGetChannelGroupRequest | null | undefined, {} | null | undefined > ): void; - setAutomatedGa4ConfigurationOptOut( - request: protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest, + getChannelGroup( + request: protos.google.analytics.admin.v1alpha.IGetChannelGroupRequest, callback: Callback< - protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse, - | protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest + protos.google.analytics.admin.v1alpha.IChannelGroup, + | protos.google.analytics.admin.v1alpha.IGetChannelGroupRequest | null | undefined, {} | null | undefined > ): void; - setAutomatedGa4ConfigurationOptOut( - request?: protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest, + getChannelGroup( + request?: protos.google.analytics.admin.v1alpha.IGetChannelGroupRequest, optionsOrCallback?: | CallOptions | Callback< - protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse, - | protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest + protos.google.analytics.admin.v1alpha.IChannelGroup, + | protos.google.analytics.admin.v1alpha.IGetChannelGroupRequest | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse, - | protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest + protos.google.analytics.admin.v1alpha.IChannelGroup, + | protos.google.analytics.admin.v1alpha.IGetChannelGroupRequest | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse, - ( - | protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest - | undefined - ), + protos.google.analytics.admin.v1alpha.IChannelGroup, + protos.google.analytics.admin.v1alpha.IGetChannelGroupRequest | undefined, {} | undefined ] > | void { @@ -8740,92 +8767,90 @@ export class AnalyticsAdminServiceClient { 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(); - return this.innerApiCalls.setAutomatedGa4ConfigurationOptOut( - request, - options, - callback - ); + return this.innerApiCalls.getChannelGroup(request, options, callback); } /** - * Fetches the opt out status for the automated GA4 setup process for a UA - * property. - * Note: this has no effect on GA4 property. + * Creates a ChannelGroup. * * @param {Object} request * The request object that will be sent. - * @param {string} request.property - * Required. The UA property to get the opt out status. Note this request uses - * the internal property ID, not the tracking ID of the form UA-XXXXXX-YY. - * Format: properties/{internalWebPropertyId} - * Example: properties/1234 + * @param {string} request.parent + * Required. The property for which to create a ChannelGroup. + * Example format: properties/1234 + * @param {google.analytics.admin.v1alpha.ChannelGroup} request.channelGroup + * Required. The ChannelGroup 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 google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse | FetchAutomatedGa4ConfigurationOptOutResponse}. + * The first element of the array is an object representing {@link google.analytics.admin.v1alpha.ChannelGroup | ChannelGroup}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.fetch_automated_ga4_configuration_opt_out.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_FetchAutomatedGa4ConfigurationOptOut_async + * @example include:samples/generated/v1alpha/analytics_admin_service.create_channel_group.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateChannelGroup_async */ - fetchAutomatedGa4ConfigurationOptOut( - request?: protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest, + createChannelGroup( + request?: protos.google.analytics.admin.v1alpha.ICreateChannelGroupRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse, + protos.google.analytics.admin.v1alpha.IChannelGroup, ( - | protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest + | protos.google.analytics.admin.v1alpha.ICreateChannelGroupRequest | undefined ), {} | undefined ] >; - fetchAutomatedGa4ConfigurationOptOut( - request: protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest, + createChannelGroup( + request: protos.google.analytics.admin.v1alpha.ICreateChannelGroupRequest, options: CallOptions, callback: Callback< - protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse, - | protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest + protos.google.analytics.admin.v1alpha.IChannelGroup, + | protos.google.analytics.admin.v1alpha.ICreateChannelGroupRequest | null | undefined, {} | null | undefined > ): void; - fetchAutomatedGa4ConfigurationOptOut( - request: protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest, + createChannelGroup( + request: protos.google.analytics.admin.v1alpha.ICreateChannelGroupRequest, callback: Callback< - protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse, - | protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest + protos.google.analytics.admin.v1alpha.IChannelGroup, + | protos.google.analytics.admin.v1alpha.ICreateChannelGroupRequest | null | undefined, {} | null | undefined > ): void; - fetchAutomatedGa4ConfigurationOptOut( - request?: protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest, + createChannelGroup( + request?: protos.google.analytics.admin.v1alpha.ICreateChannelGroupRequest, optionsOrCallback?: | CallOptions | Callback< - protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse, - | protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest + protos.google.analytics.admin.v1alpha.IChannelGroup, + | protos.google.analytics.admin.v1alpha.ICreateChannelGroupRequest | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse, - | protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest + protos.google.analytics.admin.v1alpha.IChannelGroup, + | protos.google.analytics.admin.v1alpha.ICreateChannelGroupRequest | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse, + protos.google.analytics.admin.v1alpha.IChannelGroup, ( - | protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest + | protos.google.analytics.admin.v1alpha.ICreateChannelGroupRequest | undefined ), {} | undefined @@ -8842,85 +8867,96 @@ export class AnalyticsAdminServiceClient { 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(); - return this.innerApiCalls.fetchAutomatedGa4ConfigurationOptOut( - request, - options, - callback - ); + return this.innerApiCalls.createChannelGroup(request, options, callback); } /** - * Lookup for a single BigQuery Link. + * Updates a ChannelGroup. * * @param {Object} request * The request object that will be sent. - * @param {string} request.name - * Required. The name of the BigQuery link to lookup. - * Format: properties/{property_id}/bigQueryLinks/{bigquery_link_id} - * Example: properties/123/bigQueryLinks/456 + * @param {google.analytics.admin.v1alpha.ChannelGroup} request.channelGroup + * Required. The ChannelGroup to update. + * The resource's `name` field is used to identify the ChannelGroup to be + * updated. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to be updated. Field names must be in snake + * case (e.g., "field_to_update"). Omitted fields will not be updated. To + * replace the entire entity, use one path with the string "*" to match all + * fields. * @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 google.analytics.admin.v1alpha.BigQueryLink | BigQueryLink}. + * The first element of the array is an object representing {@link google.analytics.admin.v1alpha.ChannelGroup | ChannelGroup}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.get_big_query_link.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetBigQueryLink_async + * @example include:samples/generated/v1alpha/analytics_admin_service.update_channel_group.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateChannelGroup_async */ - getBigQueryLink( - request?: protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest, + updateChannelGroup( + request?: protos.google.analytics.admin.v1alpha.IUpdateChannelGroupRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IBigQueryLink, - protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest | undefined, + protos.google.analytics.admin.v1alpha.IChannelGroup, + ( + | protos.google.analytics.admin.v1alpha.IUpdateChannelGroupRequest + | undefined + ), {} | undefined ] >; - getBigQueryLink( - request: protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest, + updateChannelGroup( + request: protos.google.analytics.admin.v1alpha.IUpdateChannelGroupRequest, options: CallOptions, callback: Callback< - protos.google.analytics.admin.v1alpha.IBigQueryLink, - | protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest + protos.google.analytics.admin.v1alpha.IChannelGroup, + | protos.google.analytics.admin.v1alpha.IUpdateChannelGroupRequest | null | undefined, {} | null | undefined > ): void; - getBigQueryLink( - request: protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest, + updateChannelGroup( + request: protos.google.analytics.admin.v1alpha.IUpdateChannelGroupRequest, callback: Callback< - protos.google.analytics.admin.v1alpha.IBigQueryLink, - | protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest + protos.google.analytics.admin.v1alpha.IChannelGroup, + | protos.google.analytics.admin.v1alpha.IUpdateChannelGroupRequest | null | undefined, {} | null | undefined > ): void; - getBigQueryLink( - request?: protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest, + updateChannelGroup( + request?: protos.google.analytics.admin.v1alpha.IUpdateChannelGroupRequest, optionsOrCallback?: | CallOptions | Callback< - protos.google.analytics.admin.v1alpha.IBigQueryLink, - | protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest + protos.google.analytics.admin.v1alpha.IChannelGroup, + | protos.google.analytics.admin.v1alpha.IUpdateChannelGroupRequest | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.analytics.admin.v1alpha.IBigQueryLink, - | protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest + protos.google.analytics.admin.v1alpha.IChannelGroup, + | protos.google.analytics.admin.v1alpha.IUpdateChannelGroupRequest | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.analytics.admin.v1alpha.IBigQueryLink, - protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest | undefined, + protos.google.analytics.admin.v1alpha.IChannelGroup, + ( + | protos.google.analytics.admin.v1alpha.IUpdateChannelGroupRequest + | undefined + ), {} | undefined ] > | void { @@ -8937,90 +8973,86 @@ export class AnalyticsAdminServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', + 'channel_group.name': request.channelGroup!.name ?? '', }); this.initialize(); - return this.innerApiCalls.getBigQueryLink(request, options, callback); + return this.innerApiCalls.updateChannelGroup(request, options, callback); } /** - * Returns the enhanced measurement settings for this data stream. - * Note that the stream must enable enhanced measurement for these settings to - * take effect. + * Deletes a ChannelGroup on a property. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The name of the settings to lookup. - * Format: - * properties/{property}/dataStreams/{data_stream}/enhancedMeasurementSettings - * Example: "properties/1000/dataStreams/2000/enhancedMeasurementSettings" + * Required. The ChannelGroup to delete. + * Example format: properties/1234/channelGroups/5678 * @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 google.analytics.admin.v1alpha.EnhancedMeasurementSettings | EnhancedMeasurementSettings}. + * The first element of the array is an object representing {@link google.protobuf.Empty | Empty}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.get_enhanced_measurement_settings.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetEnhancedMeasurementSettings_async + * @example include:samples/generated/v1alpha/analytics_admin_service.delete_channel_group.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteChannelGroup_async */ - getEnhancedMeasurementSettings( - request?: protos.google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest, + deleteChannelGroup( + request?: protos.google.analytics.admin.v1alpha.IDeleteChannelGroupRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IEnhancedMeasurementSettings, + protos.google.protobuf.IEmpty, ( - | protos.google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest + | protos.google.analytics.admin.v1alpha.IDeleteChannelGroupRequest | undefined ), {} | undefined ] >; - getEnhancedMeasurementSettings( - request: protos.google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest, + deleteChannelGroup( + request: protos.google.analytics.admin.v1alpha.IDeleteChannelGroupRequest, options: CallOptions, callback: Callback< - protos.google.analytics.admin.v1alpha.IEnhancedMeasurementSettings, - | protos.google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteChannelGroupRequest | null | undefined, {} | null | undefined > ): void; - getEnhancedMeasurementSettings( - request: protos.google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest, + deleteChannelGroup( + request: protos.google.analytics.admin.v1alpha.IDeleteChannelGroupRequest, callback: Callback< - protos.google.analytics.admin.v1alpha.IEnhancedMeasurementSettings, - | protos.google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteChannelGroupRequest | null | undefined, {} | null | undefined > ): void; - getEnhancedMeasurementSettings( - request?: protos.google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest, + deleteChannelGroup( + request?: protos.google.analytics.admin.v1alpha.IDeleteChannelGroupRequest, optionsOrCallback?: | CallOptions | Callback< - protos.google.analytics.admin.v1alpha.IEnhancedMeasurementSettings, - | protos.google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteChannelGroupRequest | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.analytics.admin.v1alpha.IEnhancedMeasurementSettings, - | protos.google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteChannelGroupRequest | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.analytics.admin.v1alpha.IEnhancedMeasurementSettings, + protos.google.protobuf.IEmpty, ( - | protos.google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest + | protos.google.analytics.admin.v1alpha.IDeleteChannelGroupRequest | undefined ), {} | undefined @@ -9042,94 +9074,89 @@ export class AnalyticsAdminServiceClient { name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.getEnhancedMeasurementSettings( - request, - options, - callback - ); + return this.innerApiCalls.deleteChannelGroup(request, options, callback); } /** - * Updates the enhanced measurement settings for this data stream. - * Note that the stream must enable enhanced measurement for these settings to - * take effect. + * Sets the opt out status for the automated GA4 setup process for a UA + * property. + * Note: this has no effect on GA4 property. * * @param {Object} request * The request object that will be sent. - * @param {google.analytics.admin.v1alpha.EnhancedMeasurementSettings} request.enhancedMeasurementSettings - * Required. The settings to update. - * The `name` field is used to identify the settings to be updated. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. The list of fields to be updated. Field names must be in snake - * case (e.g., "field_to_update"). Omitted fields will not be updated. To - * replace the entire entity, use one path with the string "*" to match all - * fields. + * @param {string} request.property + * Required. The UA property to set the opt out status. Note this request uses + * the internal property ID, not the tracking ID of the form UA-XXXXXX-YY. + * Format: properties/{internalWebPropertyId} + * Example: properties/1234 + * @param {boolean} request.optOut + * The status to 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 {@link google.analytics.admin.v1alpha.EnhancedMeasurementSettings | EnhancedMeasurementSettings}. + * The first element of the array is an object representing {@link google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse | SetAutomatedGa4ConfigurationOptOutResponse}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.update_enhanced_measurement_settings.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateEnhancedMeasurementSettings_async + * @example include:samples/generated/v1alpha/analytics_admin_service.set_automated_ga4_configuration_opt_out.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_SetAutomatedGa4ConfigurationOptOut_async */ - updateEnhancedMeasurementSettings( - request?: protos.google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest, + setAutomatedGa4ConfigurationOptOut( + request?: protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IEnhancedMeasurementSettings, + protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse, ( - | protos.google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest + | protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest | undefined ), {} | undefined ] >; - updateEnhancedMeasurementSettings( - request: protos.google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest, + setAutomatedGa4ConfigurationOptOut( + request: protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest, options: CallOptions, callback: Callback< - protos.google.analytics.admin.v1alpha.IEnhancedMeasurementSettings, - | protos.google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest + protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse, + | protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest | null | undefined, {} | null | undefined > ): void; - updateEnhancedMeasurementSettings( - request: protos.google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest, + setAutomatedGa4ConfigurationOptOut( + request: protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest, callback: Callback< - protos.google.analytics.admin.v1alpha.IEnhancedMeasurementSettings, - | protos.google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest + protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse, + | protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest | null | undefined, {} | null | undefined > ): void; - updateEnhancedMeasurementSettings( - request?: protos.google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest, + setAutomatedGa4ConfigurationOptOut( + request?: protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest, optionsOrCallback?: | CallOptions | Callback< - protos.google.analytics.admin.v1alpha.IEnhancedMeasurementSettings, - | protos.google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest + protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse, + | protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.analytics.admin.v1alpha.IEnhancedMeasurementSettings, - | protos.google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest + protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse, + | protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.analytics.admin.v1alpha.IEnhancedMeasurementSettings, + protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse, ( - | protos.google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest + | protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutRequest | undefined ), {} | undefined @@ -9146,99 +9173,92 @@ export class AnalyticsAdminServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - 'enhanced_measurement_settings.name': - request.enhancedMeasurementSettings!.name ?? '', - }); this.initialize(); - return this.innerApiCalls.updateEnhancedMeasurementSettings( + return this.innerApiCalls.setAutomatedGa4ConfigurationOptOut( request, options, callback ); } /** - * Creates a connected site tag for a Universal Analytics property. You can - * create a maximum of 20 connected site tags per property. - * Note: This API cannot be used on GA4 properties. + * Fetches the opt out status for the automated GA4 setup process for a UA + * property. + * Note: this has no effect on GA4 property. * * @param {Object} request * The request object that will be sent. * @param {string} request.property - * The Universal Analytics property to create connected site tags for. - * This API does not support GA4 properties. - * Format: properties/{universalAnalyticsPropertyId} + * Required. The UA property to get the opt out status. Note this request uses + * the internal property ID, not the tracking ID of the form UA-XXXXXX-YY. + * Format: properties/{internalWebPropertyId} * Example: properties/1234 - * @param {google.analytics.admin.v1alpha.ConnectedSiteTag} request.connectedSiteTag - * Required. The tag to add to the Universal Analytics property * @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 google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse | CreateConnectedSiteTagResponse}. + * The first element of the array is an object representing {@link google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse | FetchAutomatedGa4ConfigurationOptOutResponse}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.create_connected_site_tag.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateConnectedSiteTag_async + * @example include:samples/generated/v1alpha/analytics_admin_service.fetch_automated_ga4_configuration_opt_out.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_FetchAutomatedGa4ConfigurationOptOut_async */ - createConnectedSiteTag( - request?: protos.google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest, + fetchAutomatedGa4ConfigurationOptOut( + request?: protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.ICreateConnectedSiteTagResponse, + protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse, ( - | protos.google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest + | protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest | undefined ), {} | undefined ] >; - createConnectedSiteTag( - request: protos.google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest, + fetchAutomatedGa4ConfigurationOptOut( + request: protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest, options: CallOptions, callback: Callback< - protos.google.analytics.admin.v1alpha.ICreateConnectedSiteTagResponse, - | protos.google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest + protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse, + | protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest | null | undefined, {} | null | undefined > ): void; - createConnectedSiteTag( - request: protos.google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest, + fetchAutomatedGa4ConfigurationOptOut( + request: protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest, callback: Callback< - protos.google.analytics.admin.v1alpha.ICreateConnectedSiteTagResponse, - | protos.google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest + protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse, + | protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest | null | undefined, {} | null | undefined > ): void; - createConnectedSiteTag( - request?: protos.google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest, + fetchAutomatedGa4ConfigurationOptOut( + request?: protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest, optionsOrCallback?: | CallOptions | Callback< - protos.google.analytics.admin.v1alpha.ICreateConnectedSiteTagResponse, - | protos.google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest + protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse, + | protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.analytics.admin.v1alpha.ICreateConnectedSiteTagResponse, - | protos.google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest + protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse, + | protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.analytics.admin.v1alpha.ICreateConnectedSiteTagResponse, + protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse, ( - | protos.google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest + | protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutRequest | undefined ), {} | undefined @@ -9256,95 +9276,84 @@ export class AnalyticsAdminServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; this.initialize(); - return this.innerApiCalls.createConnectedSiteTag( + return this.innerApiCalls.fetchAutomatedGa4ConfigurationOptOut( request, options, callback ); } /** - * Deletes a connected site tag for a Universal Analytics property. - * Note: this has no effect on GA4 properties. + * Lookup for a single BigQuery Link. * * @param {Object} request * The request object that will be sent. - * @param {string} request.property - * The Universal Analytics property to delete connected site tags for. - * This API does not support GA4 properties. - * Format: properties/{universalAnalyticsPropertyId} - * Example: properties/1234 - * @param {string} request.tagId - * Tag ID to forward events to. Also known as the Measurement ID, or the - * "G-ID" (For example: G-12345). + * @param {string} request.name + * Required. The name of the BigQuery link to lookup. + * Format: properties/{property_id}/bigQueryLinks/{bigquery_link_id} + * Example: properties/123/bigQueryLinks/456 * @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 google.protobuf.Empty | Empty}. + * The first element of the array is an object representing {@link google.analytics.admin.v1alpha.BigQueryLink | BigQueryLink}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.delete_connected_site_tag.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteConnectedSiteTag_async + * @example include:samples/generated/v1alpha/analytics_admin_service.get_big_query_link.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetBigQueryLink_async */ - deleteConnectedSiteTag( - request?: protos.google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest, + getBigQueryLink( + request?: protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest, options?: CallOptions ): Promise< [ - protos.google.protobuf.IEmpty, - ( - | protos.google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest - | undefined - ), + protos.google.analytics.admin.v1alpha.IBigQueryLink, + protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest | undefined, {} | undefined ] >; - deleteConnectedSiteTag( - request: protos.google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest, + getBigQueryLink( + request: protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest, options: CallOptions, callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest + protos.google.analytics.admin.v1alpha.IBigQueryLink, + | protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest | null | undefined, {} | null | undefined > ): void; - deleteConnectedSiteTag( - request: protos.google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest, + getBigQueryLink( + request: protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest, callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest + protos.google.analytics.admin.v1alpha.IBigQueryLink, + | protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest | null | undefined, {} | null | undefined > ): void; - deleteConnectedSiteTag( - request?: protos.google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest, + getBigQueryLink( + request?: protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest, optionsOrCallback?: | CallOptions | Callback< - protos.google.protobuf.IEmpty, - | protos.google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest + protos.google.analytics.admin.v1alpha.IBigQueryLink, + | protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.protobuf.IEmpty, - | protos.google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest + protos.google.analytics.admin.v1alpha.IBigQueryLink, + | protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.protobuf.IEmpty, - ( - | protos.google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest - | undefined - ), + protos.google.analytics.admin.v1alpha.IBigQueryLink, + protos.google.analytics.admin.v1alpha.IGetBigQueryLinkRequest | undefined, {} | undefined ] > | void { @@ -9359,92 +9368,92 @@ export class AnalyticsAdminServiceClient { 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(); - return this.innerApiCalls.deleteConnectedSiteTag( - request, - options, - callback - ); + return this.innerApiCalls.getBigQueryLink(request, options, callback); } /** - * Lists the connected site tags for a Universal Analytics property. A maximum - * of 20 connected site tags will be returned. Note: this has no effect on GA4 - * property. + * Returns the enhanced measurement settings for this data stream. + * Note that the stream must enable enhanced measurement for these settings to + * take effect. * * @param {Object} request * The request object that will be sent. - * @param {string} request.property - * The Universal Analytics property to fetch connected site tags for. - * This does not work on GA4 properties. A maximum of 20 connected site tags - * will be returned. - * Example Format: `properties/1234` + * @param {string} request.name + * Required. The name of the settings to lookup. + * Format: + * properties/{property}/dataStreams/{data_stream}/enhancedMeasurementSettings + * Example: "properties/1000/dataStreams/2000/enhancedMeasurementSettings" * @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 google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse | ListConnectedSiteTagsResponse}. + * The first element of the array is an object representing {@link google.analytics.admin.v1alpha.EnhancedMeasurementSettings | EnhancedMeasurementSettings}. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.list_connected_site_tags.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListConnectedSiteTags_async + * @example include:samples/generated/v1alpha/analytics_admin_service.get_enhanced_measurement_settings.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetEnhancedMeasurementSettings_async */ - listConnectedSiteTags( - request?: protos.google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest, + getEnhancedMeasurementSettings( + request?: protos.google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IListConnectedSiteTagsResponse, + protos.google.analytics.admin.v1alpha.IEnhancedMeasurementSettings, ( - | protos.google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest + | protos.google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest | undefined ), {} | undefined ] >; - listConnectedSiteTags( - request: protos.google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest, + getEnhancedMeasurementSettings( + request: protos.google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest, options: CallOptions, callback: Callback< - protos.google.analytics.admin.v1alpha.IListConnectedSiteTagsResponse, - | protos.google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest + protos.google.analytics.admin.v1alpha.IEnhancedMeasurementSettings, + | protos.google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest | null | undefined, {} | null | undefined > ): void; - listConnectedSiteTags( - request: protos.google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest, + getEnhancedMeasurementSettings( + request: protos.google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest, callback: Callback< - protos.google.analytics.admin.v1alpha.IListConnectedSiteTagsResponse, - | protos.google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest + protos.google.analytics.admin.v1alpha.IEnhancedMeasurementSettings, + | protos.google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest | null | undefined, {} | null | undefined > ): void; - listConnectedSiteTags( - request?: protos.google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest, + getEnhancedMeasurementSettings( + request?: protos.google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest, optionsOrCallback?: | CallOptions | Callback< - protos.google.analytics.admin.v1alpha.IListConnectedSiteTagsResponse, - | protos.google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest + protos.google.analytics.admin.v1alpha.IEnhancedMeasurementSettings, + | protos.google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.analytics.admin.v1alpha.IListConnectedSiteTagsResponse, - | protos.google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest + protos.google.analytics.admin.v1alpha.IEnhancedMeasurementSettings, + | protos.google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.analytics.admin.v1alpha.IListConnectedSiteTagsResponse, + protos.google.analytics.admin.v1alpha.IEnhancedMeasurementSettings, ( - | protos.google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest + | protos.google.analytics.admin.v1alpha.IGetEnhancedMeasurementSettingsRequest | undefined ), {} | undefined @@ -9461,100 +9470,1963 @@ export class AnalyticsAdminServiceClient { 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(); - return this.innerApiCalls.listConnectedSiteTags(request, options, callback); + return this.innerApiCalls.getEnhancedMeasurementSettings( + request, + options, + callback + ); } - /** - * Returns all accounts accessible by the caller. - * - * Note that these accounts might not currently have GA4 properties. - * Soft-deleted (ie: "trashed") accounts are excluded by default. - * Returns an empty list if no relevant accounts are found. + * Updates the enhanced measurement settings for this data stream. + * Note that the stream must enable enhanced measurement for these settings to + * take effect. * * @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 - * 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. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListAccounts` must - * match the call that provided the page token. - * @param {boolean} request.showDeleted - * Whether to include soft-deleted (ie: "trashed") Accounts in the - * results. Accounts can be inspected to determine whether they are deleted or - * not. + * @param {google.analytics.admin.v1alpha.EnhancedMeasurementSettings} request.enhancedMeasurementSettings + * Required. The settings to update. + * The `name` field is used to identify the settings to be updated. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to be updated. Field names must be in snake + * case (e.g., "field_to_update"). Omitted fields will not be updated. To + * replace the entire entity, use one path with the string "*" to match all + * fields. * @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 google.analytics.admin.v1alpha.Account | Account}. - * 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 `listAccountsAsync()` - * method described below for async iteration which you can stop as needed. + * The first element of the array is an object representing {@link google.analytics.admin.v1alpha.EnhancedMeasurementSettings | EnhancedMeasurementSettings}. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.update_enhanced_measurement_settings.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateEnhancedMeasurementSettings_async + */ + updateEnhancedMeasurementSettings( + request?: protos.google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IEnhancedMeasurementSettings, + ( + | protos.google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest + | undefined + ), + {} | undefined + ] + >; + updateEnhancedMeasurementSettings( + request: protos.google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IEnhancedMeasurementSettings, + | protos.google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateEnhancedMeasurementSettings( + request: protos.google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IEnhancedMeasurementSettings, + | protos.google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateEnhancedMeasurementSettings( + request?: protos.google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IEnhancedMeasurementSettings, + | protos.google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IEnhancedMeasurementSettings, + | protos.google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IEnhancedMeasurementSettings, + ( + | protos.google.analytics.admin.v1alpha.IUpdateEnhancedMeasurementSettingsRequest + | 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({ + 'enhanced_measurement_settings.name': + request.enhancedMeasurementSettings!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateEnhancedMeasurementSettings( + request, + options, + callback + ); + } + /** + * Creates a connected site tag for a Universal Analytics property. You can + * create a maximum of 20 connected site tags per property. + * Note: This API cannot be used on GA4 properties. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.property + * The Universal Analytics property to create connected site tags for. + * This API does not support GA4 properties. + * Format: properties/{universalAnalyticsPropertyId} + * Example: properties/1234 + * @param {google.analytics.admin.v1alpha.ConnectedSiteTag} request.connectedSiteTag + * Required. The tag to add to the Universal Analytics property + * @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 google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse | CreateConnectedSiteTagResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.create_connected_site_tag.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateConnectedSiteTag_async + */ + createConnectedSiteTag( + request?: protos.google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.ICreateConnectedSiteTagResponse, + ( + | protos.google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest + | undefined + ), + {} | undefined + ] + >; + createConnectedSiteTag( + request: protos.google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.ICreateConnectedSiteTagResponse, + | protos.google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createConnectedSiteTag( + request: protos.google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.ICreateConnectedSiteTagResponse, + | protos.google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createConnectedSiteTag( + request?: protos.google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.ICreateConnectedSiteTagResponse, + | protos.google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.ICreateConnectedSiteTagResponse, + | protos.google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.ICreateConnectedSiteTagResponse, + ( + | protos.google.analytics.admin.v1alpha.ICreateConnectedSiteTagRequest + | 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 || {}; + this.initialize(); + return this.innerApiCalls.createConnectedSiteTag( + request, + options, + callback + ); + } + /** + * Deletes a connected site tag for a Universal Analytics property. + * Note: this has no effect on GA4 properties. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.property + * The Universal Analytics property to delete connected site tags for. + * This API does not support GA4 properties. + * Format: properties/{universalAnalyticsPropertyId} + * Example: properties/1234 + * @param {string} request.tagId + * Tag ID to forward events to. Also known as the Measurement ID, or the + * "G-ID" (For example: G-12345). + * @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 google.protobuf.Empty | Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.delete_connected_site_tag.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteConnectedSiteTag_async + */ + deleteConnectedSiteTag( + request?: protos.google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest + | undefined + ), + {} | undefined + ] + >; + deleteConnectedSiteTag( + request: protos.google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteConnectedSiteTag( + request: protos.google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteConnectedSiteTag( + request?: protos.google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1alpha.IDeleteConnectedSiteTagRequest + | 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 || {}; + this.initialize(); + return this.innerApiCalls.deleteConnectedSiteTag( + request, + options, + callback + ); + } + /** + * Lists the connected site tags for a Universal Analytics property. A maximum + * of 20 connected site tags will be returned. Note: this has no effect on GA4 + * property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.property + * The Universal Analytics property to fetch connected site tags for. + * This does not work on GA4 properties. A maximum of 20 connected site tags + * will be returned. + * Example Format: `properties/1234` + * @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 google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse | ListConnectedSiteTagsResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.list_connected_site_tags.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListConnectedSiteTags_async + */ + listConnectedSiteTags( + request?: protos.google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IListConnectedSiteTagsResponse, + ( + | protos.google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest + | undefined + ), + {} | undefined + ] + >; + listConnectedSiteTags( + request: protos.google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IListConnectedSiteTagsResponse, + | protos.google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + listConnectedSiteTags( + request: protos.google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IListConnectedSiteTagsResponse, + | protos.google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + listConnectedSiteTags( + request?: protos.google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IListConnectedSiteTagsResponse, + | protos.google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IListConnectedSiteTagsResponse, + | protos.google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IListConnectedSiteTagsResponse, + ( + | protos.google.analytics.admin.v1alpha.IListConnectedSiteTagsRequest + | 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 || {}; + this.initialize(); + return this.innerApiCalls.listConnectedSiteTags(request, options, callback); + } + /** + * Given a specified UA property, looks up the GA4 property connected to it. + * Note: this cannot be used with GA4 properties. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.property + * Required. The UA property for which to look up the connected GA4 property. + * Note this request uses the + * internal property ID, not the tracking ID of the form UA-XXXXXX-YY. + * Format: properties/{internal_web_property_id} + * Example: properties/1234 + * @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 google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse | FetchConnectedGa4PropertyResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.fetch_connected_ga4_property.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_FetchConnectedGa4Property_async + */ + fetchConnectedGa4Property( + request?: protos.google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyResponse, + ( + | protos.google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyRequest + | undefined + ), + {} | undefined + ] + >; + fetchConnectedGa4Property( + request: protos.google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyResponse, + | protos.google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchConnectedGa4Property( + request: protos.google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyResponse, + | protos.google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchConnectedGa4Property( + request?: protos.google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyResponse, + | protos.google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyResponse, + | protos.google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyResponse, + ( + | protos.google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyRequest + | 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 || {}; + this.initialize(); + return this.innerApiCalls.fetchConnectedGa4Property( + request, + options, + callback + ); + } + /** + * Looks up a single AdSenseLink. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Unique identifier for the AdSense Link requested. + * Format: properties/{propertyId}/adSenseLinks/{linkId} + * Example: properties/1234/adSenseLinks/5678 + * @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 google.analytics.admin.v1alpha.AdSenseLink | AdSenseLink}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.get_ad_sense_link.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetAdSenseLink_async + */ + getAdSenseLink( + request?: protos.google.analytics.admin.v1alpha.IGetAdSenseLinkRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAdSenseLink, + protos.google.analytics.admin.v1alpha.IGetAdSenseLinkRequest | undefined, + {} | undefined + ] + >; + getAdSenseLink( + request: protos.google.analytics.admin.v1alpha.IGetAdSenseLinkRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IAdSenseLink, + | protos.google.analytics.admin.v1alpha.IGetAdSenseLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getAdSenseLink( + request: protos.google.analytics.admin.v1alpha.IGetAdSenseLinkRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IAdSenseLink, + | protos.google.analytics.admin.v1alpha.IGetAdSenseLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getAdSenseLink( + request?: protos.google.analytics.admin.v1alpha.IGetAdSenseLinkRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IAdSenseLink, + | protos.google.analytics.admin.v1alpha.IGetAdSenseLinkRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IAdSenseLink, + | protos.google.analytics.admin.v1alpha.IGetAdSenseLinkRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAdSenseLink, + protos.google.analytics.admin.v1alpha.IGetAdSenseLinkRequest | 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(); + return this.innerApiCalls.getAdSenseLink(request, options, callback); + } + /** + * Creates an AdSenseLink. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The property for which to create an AdSense Link. + * Format: properties/{propertyId} + * Example: properties/1234 + * @param {google.analytics.admin.v1alpha.AdSenseLink} request.adsenseLink + * Required. The AdSense Link 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 google.analytics.admin.v1alpha.AdSenseLink | AdSenseLink}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.create_ad_sense_link.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateAdSenseLink_async + */ + createAdSenseLink( + request?: protos.google.analytics.admin.v1alpha.ICreateAdSenseLinkRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAdSenseLink, + ( + | protos.google.analytics.admin.v1alpha.ICreateAdSenseLinkRequest + | undefined + ), + {} | undefined + ] + >; + createAdSenseLink( + request: protos.google.analytics.admin.v1alpha.ICreateAdSenseLinkRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IAdSenseLink, + | protos.google.analytics.admin.v1alpha.ICreateAdSenseLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createAdSenseLink( + request: protos.google.analytics.admin.v1alpha.ICreateAdSenseLinkRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IAdSenseLink, + | protos.google.analytics.admin.v1alpha.ICreateAdSenseLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createAdSenseLink( + request?: protos.google.analytics.admin.v1alpha.ICreateAdSenseLinkRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IAdSenseLink, + | protos.google.analytics.admin.v1alpha.ICreateAdSenseLinkRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IAdSenseLink, + | protos.google.analytics.admin.v1alpha.ICreateAdSenseLinkRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAdSenseLink, + ( + | protos.google.analytics.admin.v1alpha.ICreateAdSenseLinkRequest + | 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(); + return this.innerApiCalls.createAdSenseLink(request, options, callback); + } + /** + * Deletes an AdSenseLink. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Unique identifier for the AdSense Link to be deleted. + * Format: properties/{propertyId}/adSenseLinks/{linkId} + * Example: properties/1234/adSenseLinks/5678 + * @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 google.protobuf.Empty | Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.delete_ad_sense_link.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteAdSenseLink_async + */ + deleteAdSenseLink( + request?: protos.google.analytics.admin.v1alpha.IDeleteAdSenseLinkRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1alpha.IDeleteAdSenseLinkRequest + | undefined + ), + {} | undefined + ] + >; + deleteAdSenseLink( + request: protos.google.analytics.admin.v1alpha.IDeleteAdSenseLinkRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteAdSenseLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteAdSenseLink( + request: protos.google.analytics.admin.v1alpha.IDeleteAdSenseLinkRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteAdSenseLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteAdSenseLink( + request?: protos.google.analytics.admin.v1alpha.IDeleteAdSenseLinkRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteAdSenseLinkRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteAdSenseLinkRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1alpha.IDeleteAdSenseLinkRequest + | 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(); + return this.innerApiCalls.deleteAdSenseLink(request, options, callback); + } + /** + * Lookup for a single EventCreateRule. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the EventCreateRule to get. + * Example format: properties/123/dataStreams/456/eventCreateRules/789 + * @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 google.analytics.admin.v1alpha.EventCreateRule | EventCreateRule}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.get_event_create_rule.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetEventCreateRule_async + */ + getEventCreateRule( + request?: protos.google.analytics.admin.v1alpha.IGetEventCreateRuleRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IEventCreateRule, + ( + | protos.google.analytics.admin.v1alpha.IGetEventCreateRuleRequest + | undefined + ), + {} | undefined + ] + >; + getEventCreateRule( + request: protos.google.analytics.admin.v1alpha.IGetEventCreateRuleRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IEventCreateRule, + | protos.google.analytics.admin.v1alpha.IGetEventCreateRuleRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getEventCreateRule( + request: protos.google.analytics.admin.v1alpha.IGetEventCreateRuleRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IEventCreateRule, + | protos.google.analytics.admin.v1alpha.IGetEventCreateRuleRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getEventCreateRule( + request?: protos.google.analytics.admin.v1alpha.IGetEventCreateRuleRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IEventCreateRule, + | protos.google.analytics.admin.v1alpha.IGetEventCreateRuleRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IEventCreateRule, + | protos.google.analytics.admin.v1alpha.IGetEventCreateRuleRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IEventCreateRule, + ( + | protos.google.analytics.admin.v1alpha.IGetEventCreateRuleRequest + | 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(); + return this.innerApiCalls.getEventCreateRule(request, options, callback); + } + /** + * Creates an EventCreateRule. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/123/dataStreams/456 + * @param {google.analytics.admin.v1alpha.EventCreateRule} request.eventCreateRule + * Required. The EventCreateRule 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 google.analytics.admin.v1alpha.EventCreateRule | EventCreateRule}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.create_event_create_rule.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateEventCreateRule_async + */ + createEventCreateRule( + request?: protos.google.analytics.admin.v1alpha.ICreateEventCreateRuleRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IEventCreateRule, + ( + | protos.google.analytics.admin.v1alpha.ICreateEventCreateRuleRequest + | undefined + ), + {} | undefined + ] + >; + createEventCreateRule( + request: protos.google.analytics.admin.v1alpha.ICreateEventCreateRuleRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IEventCreateRule, + | protos.google.analytics.admin.v1alpha.ICreateEventCreateRuleRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createEventCreateRule( + request: protos.google.analytics.admin.v1alpha.ICreateEventCreateRuleRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IEventCreateRule, + | protos.google.analytics.admin.v1alpha.ICreateEventCreateRuleRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createEventCreateRule( + request?: protos.google.analytics.admin.v1alpha.ICreateEventCreateRuleRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IEventCreateRule, + | protos.google.analytics.admin.v1alpha.ICreateEventCreateRuleRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IEventCreateRule, + | protos.google.analytics.admin.v1alpha.ICreateEventCreateRuleRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IEventCreateRule, + ( + | protos.google.analytics.admin.v1alpha.ICreateEventCreateRuleRequest + | 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(); + return this.innerApiCalls.createEventCreateRule(request, options, callback); + } + /** + * Updates an EventCreateRule. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.analytics.admin.v1alpha.EventCreateRule} request.eventCreateRule + * Required. The EventCreateRule to update. + * The resource's `name` field is used to identify the EventCreateRule to be + * updated. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to be updated. Field names must be in snake + * case (e.g., "field_to_update"). Omitted fields will not be updated. To + * replace the entire entity, use one path with the string "*" to match all + * fields. + * @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 google.analytics.admin.v1alpha.EventCreateRule | EventCreateRule}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.update_event_create_rule.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateEventCreateRule_async + */ + updateEventCreateRule( + request?: protos.google.analytics.admin.v1alpha.IUpdateEventCreateRuleRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IEventCreateRule, + ( + | protos.google.analytics.admin.v1alpha.IUpdateEventCreateRuleRequest + | undefined + ), + {} | undefined + ] + >; + updateEventCreateRule( + request: protos.google.analytics.admin.v1alpha.IUpdateEventCreateRuleRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IEventCreateRule, + | protos.google.analytics.admin.v1alpha.IUpdateEventCreateRuleRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateEventCreateRule( + request: protos.google.analytics.admin.v1alpha.IUpdateEventCreateRuleRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IEventCreateRule, + | protos.google.analytics.admin.v1alpha.IUpdateEventCreateRuleRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateEventCreateRule( + request?: protos.google.analytics.admin.v1alpha.IUpdateEventCreateRuleRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IEventCreateRule, + | protos.google.analytics.admin.v1alpha.IUpdateEventCreateRuleRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IEventCreateRule, + | protos.google.analytics.admin.v1alpha.IUpdateEventCreateRuleRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IEventCreateRule, + ( + | protos.google.analytics.admin.v1alpha.IUpdateEventCreateRuleRequest + | 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({ + 'event_create_rule.name': request.eventCreateRule!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateEventCreateRule(request, options, callback); + } + /** + * Deletes an EventCreateRule. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Example format: + * properties/123/dataStreams/456/eventCreateRules/789 + * @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 google.protobuf.Empty | Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.delete_event_create_rule.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteEventCreateRule_async + */ + deleteEventCreateRule( + request?: protos.google.analytics.admin.v1alpha.IDeleteEventCreateRuleRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1alpha.IDeleteEventCreateRuleRequest + | undefined + ), + {} | undefined + ] + >; + deleteEventCreateRule( + request: protos.google.analytics.admin.v1alpha.IDeleteEventCreateRuleRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteEventCreateRuleRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteEventCreateRule( + request: protos.google.analytics.admin.v1alpha.IDeleteEventCreateRuleRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteEventCreateRuleRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteEventCreateRule( + request?: protos.google.analytics.admin.v1alpha.IDeleteEventCreateRuleRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteEventCreateRuleRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteEventCreateRuleRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1alpha.IDeleteEventCreateRuleRequest + | 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(); + return this.innerApiCalls.deleteEventCreateRule(request, options, callback); + } + + /** + * Returns all accounts accessible by the caller. + * + * Note that these accounts might not currently have GA4 properties. + * Soft-deleted (ie: "trashed") accounts are excluded by default. + * Returns an empty list if no relevant accounts are found. + * + * @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 + * 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. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAccounts` must + * match the call that provided the page token. + * @param {boolean} request.showDeleted + * Whether to include soft-deleted (ie: "trashed") Accounts in the + * results. Accounts can be inspected to determine whether they are deleted 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 Array of {@link google.analytics.admin.v1alpha.Account | Account}. + * 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 `listAccountsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAccounts( + request?: protos.google.analytics.admin.v1alpha.IListAccountsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAccount[], + protos.google.analytics.admin.v1alpha.IListAccountsRequest | null, + protos.google.analytics.admin.v1alpha.IListAccountsResponse + ] + >; + listAccounts( + request: protos.google.analytics.admin.v1alpha.IListAccountsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListAccountsRequest, + | protos.google.analytics.admin.v1alpha.IListAccountsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IAccount + > + ): void; + listAccounts( + request: protos.google.analytics.admin.v1alpha.IListAccountsRequest, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListAccountsRequest, + | protos.google.analytics.admin.v1alpha.IListAccountsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IAccount + > + ): void; + listAccounts( + request?: protos.google.analytics.admin.v1alpha.IListAccountsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.analytics.admin.v1alpha.IListAccountsRequest, + | protos.google.analytics.admin.v1alpha.IListAccountsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IAccount + >, + callback?: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListAccountsRequest, + | protos.google.analytics.admin.v1alpha.IListAccountsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IAccount + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAccount[], + protos.google.analytics.admin.v1alpha.IListAccountsRequest | null, + protos.google.analytics.admin.v1alpha.IListAccountsResponse + ] + > | 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 || {}; + this.initialize(); + return this.innerApiCalls.listAccounts(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, 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 + * 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. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAccounts` must + * match the call that provided the page token. + * @param {boolean} request.showDeleted + * Whether to include soft-deleted (ie: "trashed") Accounts in the + * results. Accounts can be inspected to determine whether they are deleted or + * not. + * @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 google.analytics.admin.v1alpha.Account | Account} 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 `listAccountsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAccountsStream( + request?: protos.google.analytics.admin.v1alpha.IListAccountsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + const defaultCallSettings = this._defaults['listAccounts']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAccounts.createStream( + this.innerApiCalls.listAccounts as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listAccounts`, 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 {number} request.pageSize + * 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. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAccounts` must + * match the call that provided the page token. + * @param {boolean} request.showDeleted + * Whether to include soft-deleted (ie: "trashed") Accounts in the + * results. Accounts can be inspected to determine whether they are deleted or + * not. + * @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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.analytics.admin.v1alpha.Account | Account}. 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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.list_accounts.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAccounts_async + */ + listAccountsAsync( + request?: protos.google.analytics.admin.v1alpha.IListAccountsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + const defaultCallSettings = this._defaults['listAccounts']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAccounts.asyncIterate( + this.innerApiCalls['listAccounts'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Returns summaries of all accounts accessible by the caller. + * + * @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 {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 google.analytics.admin.v1alpha.AccountSummary | AccountSummary}. + * 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 `listAccountSummariesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAccountSummaries( + request?: protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAccountSummary[], + protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest | null, + protos.google.analytics.admin.v1alpha.IListAccountSummariesResponse + ] + >; + listAccountSummaries( + request: protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + | protos.google.analytics.admin.v1alpha.IListAccountSummariesResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IAccountSummary + > + ): void; + listAccountSummaries( + request: protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + | protos.google.analytics.admin.v1alpha.IListAccountSummariesResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IAccountSummary + > + ): void; + listAccountSummaries( + request?: protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + | protos.google.analytics.admin.v1alpha.IListAccountSummariesResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IAccountSummary + >, + callback?: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + | protos.google.analytics.admin.v1alpha.IListAccountSummariesResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IAccountSummary + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAccountSummary[], + protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest | null, + protos.google.analytics.admin.v1alpha.IListAccountSummariesResponse + ] + > | 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 || {}; + this.initialize(); + return this.innerApiCalls.listAccountSummaries(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, 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 {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 google.analytics.admin.v1alpha.AccountSummary | AccountSummary} 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 `listAccountSummariesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAccountSummariesStream( + request?: protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + const defaultCallSettings = this._defaults['listAccountSummaries']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAccountSummaries.createStream( + this.innerApiCalls.listAccountSummaries as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listAccountSummaries`, 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 {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 {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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.analytics.admin.v1alpha.AccountSummary | AccountSummary}. 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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.list_account_summaries.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAccountSummaries_async + */ + listAccountSummariesAsync( + request?: protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + const defaultCallSettings = this._defaults['listAccountSummaries']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAccountSummaries.asyncIterate( + this.innerApiCalls['listAccountSummaries'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Returns child Properties under the specified parent Account. + * + * Only "GA4" properties will be returned. + * Properties will be excluded if the caller does not have access. + * Soft-deleted (ie: "trashed") properties are excluded by default. + * Returns an empty list if no relevant properties are found. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.filter + * Required. An expression for filtering the results of the request. + * Fields eligible for filtering are: + * `parent:`(The resource name of the parent account/property) or + * `ancestor:`(The resource name of the parent account) or + * `firebase_project:`(The id or number of the linked firebase project). + * Some examples of filters: + * + * ``` + * | Filter | Description | + * |-----------------------------|-------------------------------------------| + * | parent:accounts/123 | The account with account id: 123. | + * | parent:properties/123 | The property with property id: 123. | + * | ancestor:accounts/123 | The account with account id: 123. | + * | 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 + * 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. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListProperties` must + * match the call that provided the page token. + * @param {boolean} request.showDeleted + * Whether to include soft-deleted (ie: "trashed") Properties in the + * results. Properties can be inspected to determine whether they are deleted + * 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 Array of {@link google.analytics.admin.v1alpha.Property | Property}. + * 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 `listPropertiesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listProperties( + request?: protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IProperty[], + protos.google.analytics.admin.v1alpha.IListPropertiesRequest | null, + protos.google.analytics.admin.v1alpha.IListPropertiesResponse + ] + >; + listProperties( + request: protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + | protos.google.analytics.admin.v1alpha.IListPropertiesResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IProperty + > + ): void; + listProperties( + request: protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + | protos.google.analytics.admin.v1alpha.IListPropertiesResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IProperty + > + ): void; + listProperties( + request?: protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + | protos.google.analytics.admin.v1alpha.IListPropertiesResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IProperty + >, + callback?: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + | protos.google.analytics.admin.v1alpha.IListPropertiesResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IProperty + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IProperty[], + protos.google.analytics.admin.v1alpha.IListPropertiesRequest | null, + protos.google.analytics.admin.v1alpha.IListPropertiesResponse + ] + > | 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 || {}; + this.initialize(); + return this.innerApiCalls.listProperties(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.filter + * Required. An expression for filtering the results of the request. + * Fields eligible for filtering are: + * `parent:`(The resource name of the parent account/property) or + * `ancestor:`(The resource name of the parent account) or + * `firebase_project:`(The id or number of the linked firebase project). + * Some examples of filters: + * + * ``` + * | Filter | Description | + * |-----------------------------|-------------------------------------------| + * | parent:accounts/123 | The account with account id: 123. | + * | parent:properties/123 | The property with property id: 123. | + * | ancestor:accounts/123 | The account with account id: 123. | + * | 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 + * 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. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListProperties` must + * match the call that provided the page token. + * @param {boolean} request.showDeleted + * Whether to include soft-deleted (ie: "trashed") Properties in the + * results. Properties can be inspected to determine whether they are deleted + * or not. + * @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 google.analytics.admin.v1alpha.Property | Property} 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 `listPropertiesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listAccounts( - request?: protos.google.analytics.admin.v1alpha.IListAccountsRequest, + listPropertiesStream( + request?: protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + const defaultCallSettings = this._defaults['listProperties']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listProperties.createStream( + this.innerApiCalls.listProperties as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listProperties`, 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.filter + * Required. An expression for filtering the results of the request. + * Fields eligible for filtering are: + * `parent:`(The resource name of the parent account/property) or + * `ancestor:`(The resource name of the parent account) or + * `firebase_project:`(The id or number of the linked firebase project). + * Some examples of filters: + * + * ``` + * | Filter | Description | + * |-----------------------------|-------------------------------------------| + * | parent:accounts/123 | The account with account id: 123. | + * | parent:properties/123 | The property with property id: 123. | + * | ancestor:accounts/123 | The account with account id: 123. | + * | 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 + * 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. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListProperties` must + * match the call that provided the page token. + * @param {boolean} request.showDeleted + * Whether to include soft-deleted (ie: "trashed") Properties in the + * results. Properties can be inspected to determine whether they are deleted + * or not. + * @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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.analytics.admin.v1alpha.Property | Property}. 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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.list_properties.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListProperties_async + */ + listPropertiesAsync( + request?: protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + const defaultCallSettings = this._defaults['listProperties']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listProperties.asyncIterate( + this.innerApiCalls['listProperties'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists all user links on an account or property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: accounts/1234 + * @param {number} request.pageSize + * The maximum number of user links to return. + * The service may return fewer than this value. + * If unspecified, at most 200 user links will be returned. + * The maximum value is 500; values above 500 will be coerced to 500. + * @param {string} request.pageToken + * A page token, received from a previous `ListUserLinks` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListUserLinks` 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. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.UserLink | UserLink}. + * 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 `listUserLinksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listUserLinks( + request?: protos.google.analytics.admin.v1alpha.IListUserLinksRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IAccount[], - protos.google.analytics.admin.v1alpha.IListAccountsRequest | null, - protos.google.analytics.admin.v1alpha.IListAccountsResponse + protos.google.analytics.admin.v1alpha.IUserLink[], + protos.google.analytics.admin.v1alpha.IListUserLinksRequest | null, + protos.google.analytics.admin.v1alpha.IListUserLinksResponse ] >; - listAccounts( - request: protos.google.analytics.admin.v1alpha.IListAccountsRequest, + listUserLinks( + request: protos.google.analytics.admin.v1alpha.IListUserLinksRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListAccountsRequest, - | protos.google.analytics.admin.v1alpha.IListAccountsResponse + protos.google.analytics.admin.v1alpha.IListUserLinksRequest, + | protos.google.analytics.admin.v1alpha.IListUserLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IAccount + protos.google.analytics.admin.v1alpha.IUserLink > ): void; - listAccounts( - request: protos.google.analytics.admin.v1alpha.IListAccountsRequest, + listUserLinks( + request: protos.google.analytics.admin.v1alpha.IListUserLinksRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListAccountsRequest, - | protos.google.analytics.admin.v1alpha.IListAccountsResponse + protos.google.analytics.admin.v1alpha.IListUserLinksRequest, + | protos.google.analytics.admin.v1alpha.IListUserLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IAccount + protos.google.analytics.admin.v1alpha.IUserLink > ): void; - listAccounts( - request?: protos.google.analytics.admin.v1alpha.IListAccountsRequest, + listUserLinks( + request?: protos.google.analytics.admin.v1alpha.IListUserLinksRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.IListAccountsRequest, - | protos.google.analytics.admin.v1alpha.IListAccountsResponse + protos.google.analytics.admin.v1alpha.IListUserLinksRequest, + | protos.google.analytics.admin.v1alpha.IListUserLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IAccount + protos.google.analytics.admin.v1alpha.IUserLink >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListAccountsRequest, - | protos.google.analytics.admin.v1alpha.IListAccountsResponse + protos.google.analytics.admin.v1alpha.IListUserLinksRequest, + | protos.google.analytics.admin.v1alpha.IListUserLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IAccount + protos.google.analytics.admin.v1alpha.IUserLink > ): Promise< [ - protos.google.analytics.admin.v1alpha.IAccount[], - protos.google.analytics.admin.v1alpha.IListAccountsRequest | null, - protos.google.analytics.admin.v1alpha.IListAccountsResponse + protos.google.analytics.admin.v1alpha.IUserLink[], + protos.google.analytics.admin.v1alpha.IListUserLinksRequest | null, + protos.google.analytics.admin.v1alpha.IListUserLinksResponse ] > | void { request = request || {}; @@ -9568,190 +11440,208 @@ export class AnalyticsAdminServiceClient { 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(); - return this.innerApiCalls.listAccounts(request, options, callback); + return this.innerApiCalls.listUserLinks(request, options, callback); } /** * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: accounts/1234 * @param {number} request.pageSize - * 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) + * The maximum number of user links to return. + * The service may return fewer than this value. + * If unspecified, at most 200 user links will be returned. + * The maximum value is 500; values above 500 will be coerced to 500. * @param {string} request.pageToken - * A page token, received from a previous `ListAccounts` call. + * A page token, received from a previous `ListUserLinks` call. * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListAccounts` must + * When paginating, all other parameters provided to `ListUserLinks` must * match the call that provided the page token. - * @param {boolean} request.showDeleted - * Whether to include soft-deleted (ie: "trashed") Accounts in the - * results. Accounts can be inspected to determine whether they are deleted or - * not. * @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 google.analytics.admin.v1alpha.Account | Account} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.UserLink | UserLink} 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 `listAccountsAsync()` + * We recommend using `listUserLinksAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listAccountsStream( - request?: protos.google.analytics.admin.v1alpha.IListAccountsRequest, + listUserLinksStream( + request?: protos.google.analytics.admin.v1alpha.IListUserLinksRequest, options?: CallOptions ): Transform { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - const defaultCallSettings = this._defaults['listAccounts']; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listUserLinks']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listAccounts.createStream( - this.innerApiCalls.listAccounts as GaxCall, + return this.descriptors.page.listUserLinks.createStream( + this.innerApiCalls.listUserLinks as GaxCall, request, callSettings ); } /** - * Equivalent to `listAccounts`, but returns an iterable object. + * Equivalent to `listUserLinks`, 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. Example format: accounts/1234 * @param {number} request.pageSize - * 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) + * The maximum number of user links to return. + * The service may return fewer than this value. + * If unspecified, at most 200 user links will be returned. + * The maximum value is 500; values above 500 will be coerced to 500. * @param {string} request.pageToken - * A page token, received from a previous `ListAccounts` call. + * A page token, received from a previous `ListUserLinks` 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. - * @param {boolean} request.showDeleted - * Whether to include soft-deleted (ie: "trashed") Accounts in the - * results. Accounts can be inspected to determine whether they are deleted or - * not. + * When paginating, all other parameters provided to `ListUserLinks` 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} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.Account | Account}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.UserLink | UserLink}. 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 * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.list_accounts.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAccounts_async + * @example include:samples/generated/v1alpha/analytics_admin_service.list_user_links.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListUserLinks_async */ - listAccountsAsync( - request?: protos.google.analytics.admin.v1alpha.IListAccountsRequest, + listUserLinksAsync( + request?: protos.google.analytics.admin.v1alpha.IListUserLinksRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - const defaultCallSettings = this._defaults['listAccounts']; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listUserLinks']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listAccounts.asyncIterate( - this.innerApiCalls['listAccounts'] as GaxCall, + return this.descriptors.page.listUserLinks.asyncIterate( + this.innerApiCalls['listUserLinks'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Returns summaries of all accounts accessible by the caller. + * Lists all user links on an account or property, including implicit ones + * that come from effective permissions granted by groups or organization + * admin roles. + * + * If a returned user link does not have direct permissions, they cannot + * be removed from the account or property directly with the DeleteUserLink + * command. They have to be removed from the group/etc that gives them + * permissions, which is currently only usable/discoverable in the GA or GMP + * UIs. * * @param {Object} request * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: accounts/1234 * @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) + * The maximum number of user links to return. + * The service may return fewer than this value. + * If unspecified, at most 1000 user links will be returned. + * The maximum value is 5000; values above 5000 will be coerced to 5000. * @param {string} request.pageToken - * A page token, received from a previous `ListAccountSummaries` call. + * A page token, received from a previous `AuditUserLinks` 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. + * When paginating, all other parameters provided to `AuditUserLinks` 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. - * The first element of the array is Array of {@link google.analytics.admin.v1alpha.AccountSummary | AccountSummary}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.AuditUserLink | AuditUserLink}. * 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 `listAccountSummariesAsync()` + * We recommend using `auditUserLinksAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listAccountSummaries( - request?: protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + auditUserLinks( + request?: protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IAccountSummary[], - protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest | null, - protos.google.analytics.admin.v1alpha.IListAccountSummariesResponse + protos.google.analytics.admin.v1alpha.IAuditUserLink[], + protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest | null, + protos.google.analytics.admin.v1alpha.IAuditUserLinksResponse ] >; - listAccountSummaries( - request: protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + auditUserLinks( + request: protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, - | protos.google.analytics.admin.v1alpha.IListAccountSummariesResponse + protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, + | protos.google.analytics.admin.v1alpha.IAuditUserLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IAccountSummary + protos.google.analytics.admin.v1alpha.IAuditUserLink > ): void; - listAccountSummaries( - request: protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + auditUserLinks( + request: protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, - | protos.google.analytics.admin.v1alpha.IListAccountSummariesResponse + protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, + | protos.google.analytics.admin.v1alpha.IAuditUserLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IAccountSummary + protos.google.analytics.admin.v1alpha.IAuditUserLink > ): void; - listAccountSummaries( - request?: protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + auditUserLinks( + request?: protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, - | protos.google.analytics.admin.v1alpha.IListAccountSummariesResponse + protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, + | protos.google.analytics.admin.v1alpha.IAuditUserLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IAccountSummary + protos.google.analytics.admin.v1alpha.IAuditUserLink >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, - | protos.google.analytics.admin.v1alpha.IListAccountSummariesResponse + protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, + | protos.google.analytics.admin.v1alpha.IAuditUserLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IAccountSummary + protos.google.analytics.admin.v1alpha.IAuditUserLink > ): Promise< [ - protos.google.analytics.admin.v1alpha.IAccountSummary[], - protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest | null, - protos.google.analytics.admin.v1alpha.IListAccountSummariesResponse + protos.google.analytics.admin.v1alpha.IAuditUserLink[], + protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest | null, + protos.google.analytics.admin.v1alpha.IAuditUserLinksResponse ] > | void { request = request || {}; @@ -9765,208 +11655,202 @@ export class AnalyticsAdminServiceClient { 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(); - return this.innerApiCalls.listAccountSummaries(request, options, callback); + return this.innerApiCalls.auditUserLinks(request, options, callback); } /** * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: accounts/1234 * @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) + * The maximum number of user links to return. + * The service may return fewer than this value. + * If unspecified, at most 1000 user links will be returned. + * The maximum value is 5000; values above 5000 will be coerced to 5000. * @param {string} request.pageToken - * A page token, received from a previous `ListAccountSummaries` call. + * A page token, received from a previous `AuditUserLinks` 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. + * When paginating, all other parameters provided to `AuditUserLinks` 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} - * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.AccountSummary | AccountSummary} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.AuditUserLink | AuditUserLink} 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 `listAccountSummariesAsync()` + * We recommend using `auditUserLinksAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listAccountSummariesStream( - request?: protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + auditUserLinksStream( + request?: protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, options?: CallOptions ): Transform { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - const defaultCallSettings = this._defaults['listAccountSummaries']; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['auditUserLinks']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listAccountSummaries.createStream( - this.innerApiCalls.listAccountSummaries as GaxCall, + return this.descriptors.page.auditUserLinks.createStream( + this.innerApiCalls.auditUserLinks as GaxCall, request, callSettings ); } /** - * Equivalent to `listAccountSummaries`, but returns an iterable object. + * Equivalent to `auditUserLinks`, 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. Example format: accounts/1234 * @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) + * The maximum number of user links to return. + * The service may return fewer than this value. + * If unspecified, at most 1000 user links will be returned. + * The maximum value is 5000; values above 5000 will be coerced to 5000. * @param {string} request.pageToken - * A page token, received from a previous `ListAccountSummaries` call. + * A page token, received from a previous `AuditUserLinks` 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. + * When paginating, all other parameters provided to `AuditUserLinks` 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} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.AccountSummary | AccountSummary}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.AuditUserLink | AuditUserLink}. 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 * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.list_account_summaries.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAccountSummaries_async + * @example include:samples/generated/v1alpha/analytics_admin_service.audit_user_links.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_AuditUserLinks_async */ - listAccountSummariesAsync( - request?: protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + auditUserLinksAsync( + request?: protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - const defaultCallSettings = this._defaults['listAccountSummaries']; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['auditUserLinks']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listAccountSummaries.asyncIterate( - this.innerApiCalls['listAccountSummaries'] as GaxCall, + return this.descriptors.page.auditUserLinks.asyncIterate( + this.innerApiCalls['auditUserLinks'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Returns child Properties under the specified parent Account. - * - * Only "GA4" properties will be returned. - * Properties will be excluded if the caller does not have access. - * Soft-deleted (ie: "trashed") properties are excluded by default. - * Returns an empty list if no relevant properties are found. + * Lists FirebaseLinks on a property. + * Properties can have at most one FirebaseLink. * * @param {Object} request * The request object that will be sent. - * @param {string} request.filter - * Required. An expression for filtering the results of the request. - * Fields eligible for filtering are: - * `parent:`(The resource name of the parent account/property) or - * `ancestor:`(The resource name of the parent account) or - * `firebase_project:`(The id or number of the linked firebase project). - * Some examples of filters: - * - * ``` - * | Filter | Description | - * |-----------------------------|-------------------------------------------| - * | parent:accounts/123 | The account with account id: 123. | - * | parent:properties/123 | The property with property id: 123. | - * | ancestor:accounts/123 | The account with account id: 123. | - * | firebase_project:project-id | The firebase project with id: project-id. | - * | firebase_project:123 | The firebase project with number: 123. | - * ``` + * @param {string} request.parent + * Required. Format: properties/{property_id} + * Example: properties/1234 * @param {number} request.pageSize * 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. + * A page token, received from a previous `ListFirebaseLinks` call. * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListProperties` must + * When paginating, all other parameters provided to `ListFirebaseLinks` must * match the call that provided the page token. - * @param {boolean} request.showDeleted - * Whether to include soft-deleted (ie: "trashed") Properties in the - * results. Properties can be inspected to determine whether they are deleted - * 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 Array of {@link google.analytics.admin.v1alpha.Property | Property}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.FirebaseLink | FirebaseLink}. * 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 `listPropertiesAsync()` + * We recommend using `listFirebaseLinksAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listProperties( - request?: protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + listFirebaseLinks( + request?: protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IProperty[], - protos.google.analytics.admin.v1alpha.IListPropertiesRequest | null, - protos.google.analytics.admin.v1alpha.IListPropertiesResponse + protos.google.analytics.admin.v1alpha.IFirebaseLink[], + protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest | null, + protos.google.analytics.admin.v1alpha.IListFirebaseLinksResponse ] >; - listProperties( - request: protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + listFirebaseLinks( + request: protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListPropertiesRequest, - | protos.google.analytics.admin.v1alpha.IListPropertiesResponse + protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, + | protos.google.analytics.admin.v1alpha.IListFirebaseLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IProperty + protos.google.analytics.admin.v1alpha.IFirebaseLink > ): void; - listProperties( - request: protos.google.analytics.admin.v1alpha.IListPropertiesRequest, - callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListPropertiesRequest, - | protos.google.analytics.admin.v1alpha.IListPropertiesResponse + listFirebaseLinks( + request: protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, + | protos.google.analytics.admin.v1alpha.IListFirebaseLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IProperty + protos.google.analytics.admin.v1alpha.IFirebaseLink > ): void; - listProperties( - request?: protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + listFirebaseLinks( + request?: protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.IListPropertiesRequest, - | protos.google.analytics.admin.v1alpha.IListPropertiesResponse + protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, + | protos.google.analytics.admin.v1alpha.IListFirebaseLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IProperty + protos.google.analytics.admin.v1alpha.IFirebaseLink >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListPropertiesRequest, - | protos.google.analytics.admin.v1alpha.IListPropertiesResponse + protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, + | protos.google.analytics.admin.v1alpha.IListFirebaseLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IProperty + protos.google.analytics.admin.v1alpha.IFirebaseLink > ): Promise< [ - protos.google.analytics.admin.v1alpha.IProperty[], - protos.google.analytics.admin.v1alpha.IListPropertiesRequest | null, - protos.google.analytics.admin.v1alpha.IListPropertiesResponse + protos.google.analytics.admin.v1alpha.IFirebaseLink[], + protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest | null, + protos.google.analytics.admin.v1alpha.IListFirebaseLinksResponse ] > | void { request = request || {}; @@ -9980,226 +11864,202 @@ export class AnalyticsAdminServiceClient { 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(); - return this.innerApiCalls.listProperties(request, options, callback); + return this.innerApiCalls.listFirebaseLinks(request, options, callback); } /** * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. - * @param {string} request.filter - * Required. An expression for filtering the results of the request. - * Fields eligible for filtering are: - * `parent:`(The resource name of the parent account/property) or - * `ancestor:`(The resource name of the parent account) or - * `firebase_project:`(The id or number of the linked firebase project). - * Some examples of filters: - * - * ``` - * | Filter | Description | - * |-----------------------------|-------------------------------------------| - * | parent:accounts/123 | The account with account id: 123. | - * | parent:properties/123 | The property with property id: 123. | - * | ancestor:accounts/123 | The account with account id: 123. | - * | firebase_project:project-id | The firebase project with id: project-id. | - * | firebase_project:123 | The firebase project with number: 123. | - * ``` + * @param {string} request.parent + * Required. Format: properties/{property_id} + * Example: properties/1234 * @param {number} request.pageSize * 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. + * A page token, received from a previous `ListFirebaseLinks` call. * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListProperties` must + * When paginating, all other parameters provided to `ListFirebaseLinks` must * match the call that provided the page token. - * @param {boolean} request.showDeleted - * Whether to include soft-deleted (ie: "trashed") Properties in the - * results. Properties can be inspected to determine whether they are deleted - * or not. * @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 google.analytics.admin.v1alpha.Property | Property} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.FirebaseLink | FirebaseLink} 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 `listPropertiesAsync()` + * We recommend using `listFirebaseLinksAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listPropertiesStream( - request?: protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + listFirebaseLinksStream( + request?: protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, options?: CallOptions ): Transform { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - const defaultCallSettings = this._defaults['listProperties']; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listFirebaseLinks']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listProperties.createStream( - this.innerApiCalls.listProperties as GaxCall, + return this.descriptors.page.listFirebaseLinks.createStream( + this.innerApiCalls.listFirebaseLinks as GaxCall, request, callSettings ); } /** - * Equivalent to `listProperties`, but returns an iterable object. + * Equivalent to `listFirebaseLinks`, 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.filter - * Required. An expression for filtering the results of the request. - * Fields eligible for filtering are: - * `parent:`(The resource name of the parent account/property) or - * `ancestor:`(The resource name of the parent account) or - * `firebase_project:`(The id or number of the linked firebase project). - * Some examples of filters: - * - * ``` - * | Filter | Description | - * |-----------------------------|-------------------------------------------| - * | parent:accounts/123 | The account with account id: 123. | - * | parent:properties/123 | The property with property id: 123. | - * | ancestor:accounts/123 | The account with account id: 123. | - * | firebase_project:project-id | The firebase project with id: project-id. | - * | firebase_project:123 | The firebase project with number: 123. | - * ``` + * @param {string} request.parent + * Required. Format: properties/{property_id} + * Example: properties/1234 * @param {number} request.pageSize * 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. + * A page token, received from a previous `ListFirebaseLinks` call. * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListProperties` must + * When paginating, all other parameters provided to `ListFirebaseLinks` must * match the call that provided the page token. - * @param {boolean} request.showDeleted - * Whether to include soft-deleted (ie: "trashed") Properties in the - * results. Properties can be inspected to determine whether they are deleted - * or not. * @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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.Property | Property}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.FirebaseLink | FirebaseLink}. 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 * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.list_properties.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListProperties_async + * @example include:samples/generated/v1alpha/analytics_admin_service.list_firebase_links.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListFirebaseLinks_async */ - listPropertiesAsync( - request?: protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + listFirebaseLinksAsync( + request?: protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - const defaultCallSettings = this._defaults['listProperties']; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listFirebaseLinks']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listProperties.asyncIterate( - this.innerApiCalls['listProperties'] as GaxCall, + return this.descriptors.page.listFirebaseLinks.asyncIterate( + this.innerApiCalls['listFirebaseLinks'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists all user links on an account or property. + * Lists GoogleAdsLinks on a property. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Example format: accounts/1234 + * Required. Example format: properties/1234 * @param {number} request.pageSize - * The maximum number of user links to return. - * The service may return fewer than this value. - * If unspecified, at most 200 user links will be returned. - * The maximum value is 500; values above 500 will be coerced to 500. + * 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 `ListUserLinks` call. + * A page token, received from a previous `ListGoogleAdsLinks` call. * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListUserLinks` must + * + * When paginating, all other parameters provided to `ListGoogleAdsLinks` 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. - * The first element of the array is Array of {@link google.analytics.admin.v1alpha.UserLink | UserLink}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.GoogleAdsLink | GoogleAdsLink}. * 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 `listUserLinksAsync()` + * We recommend using `listGoogleAdsLinksAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listUserLinks( - request?: protos.google.analytics.admin.v1alpha.IListUserLinksRequest, + listGoogleAdsLinks( + request?: protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IUserLink[], - protos.google.analytics.admin.v1alpha.IListUserLinksRequest | null, - protos.google.analytics.admin.v1alpha.IListUserLinksResponse + protos.google.analytics.admin.v1alpha.IGoogleAdsLink[], + protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest | null, + protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse ] >; - listUserLinks( - request: protos.google.analytics.admin.v1alpha.IListUserLinksRequest, + listGoogleAdsLinks( + request: protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListUserLinksRequest, - | protos.google.analytics.admin.v1alpha.IListUserLinksResponse + protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, + | protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IUserLink + protos.google.analytics.admin.v1alpha.IGoogleAdsLink > ): void; - listUserLinks( - request: protos.google.analytics.admin.v1alpha.IListUserLinksRequest, + listGoogleAdsLinks( + request: protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListUserLinksRequest, - | protos.google.analytics.admin.v1alpha.IListUserLinksResponse + protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, + | protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IUserLink + protos.google.analytics.admin.v1alpha.IGoogleAdsLink > ): void; - listUserLinks( - request?: protos.google.analytics.admin.v1alpha.IListUserLinksRequest, + listGoogleAdsLinks( + request?: protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.IListUserLinksRequest, - | protos.google.analytics.admin.v1alpha.IListUserLinksResponse + protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, + | protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IUserLink + protos.google.analytics.admin.v1alpha.IGoogleAdsLink >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListUserLinksRequest, - | protos.google.analytics.admin.v1alpha.IListUserLinksResponse + protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, + | protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IUserLink + protos.google.analytics.admin.v1alpha.IGoogleAdsLink > ): Promise< [ - protos.google.analytics.admin.v1alpha.IUserLink[], - protos.google.analytics.admin.v1alpha.IListUserLinksRequest | null, - protos.google.analytics.admin.v1alpha.IListUserLinksResponse + protos.google.analytics.admin.v1alpha.IGoogleAdsLink[], + protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest | null, + protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse ] > | void { request = request || {}; @@ -10218,7 +12078,7 @@ export class AnalyticsAdminServiceClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listUserLinks(request, options, callback); + return this.innerApiCalls.listGoogleAdsLinks(request, options, callback); } /** @@ -10226,31 +12086,31 @@ export class AnalyticsAdminServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Example format: accounts/1234 + * Required. Example format: properties/1234 * @param {number} request.pageSize - * The maximum number of user links to return. - * The service may return fewer than this value. - * If unspecified, at most 200 user links will be returned. - * The maximum value is 500; values above 500 will be coerced to 500. + * 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 `ListUserLinks` call. + * A page token, received from a previous `ListGoogleAdsLinks` call. * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListUserLinks` must + * + * When paginating, all other parameters provided to `ListGoogleAdsLinks` 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} - * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.UserLink | UserLink} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.GoogleAdsLink | GoogleAdsLink} 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 `listUserLinksAsync()` + * We recommend using `listGoogleAdsLinksAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listUserLinksStream( - request?: protos.google.analytics.admin.v1alpha.IListUserLinksRequest, + listGoogleAdsLinksStream( + request?: protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, options?: CallOptions ): Transform { request = request || {}; @@ -10261,51 +12121,51 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listUserLinks']; + const defaultCallSettings = this._defaults['listGoogleAdsLinks']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listUserLinks.createStream( - this.innerApiCalls.listUserLinks as GaxCall, + return this.descriptors.page.listGoogleAdsLinks.createStream( + this.innerApiCalls.listGoogleAdsLinks as GaxCall, request, callSettings ); } /** - * Equivalent to `listUserLinks`, but returns an iterable object. + * Equivalent to `listGoogleAdsLinks`, 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. Example format: accounts/1234 + * Required. Example format: properties/1234 * @param {number} request.pageSize - * The maximum number of user links to return. - * The service may return fewer than this value. - * If unspecified, at most 200 user links will be returned. - * The maximum value is 500; values above 500 will be coerced to 500. + * 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 `ListUserLinks` call. + * A page token, received from a previous `ListGoogleAdsLinks` call. * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListUserLinks` must + * + * When paginating, all other parameters provided to `ListGoogleAdsLinks` 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} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.UserLink | UserLink}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.GoogleAdsLink | GoogleAdsLink}. 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 * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.list_user_links.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListUserLinks_async + * @example include:samples/generated/v1alpha/analytics_admin_service.list_google_ads_links.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListGoogleAdsLinks_async */ - listUserLinksAsync( - request?: protos.google.analytics.admin.v1alpha.IListUserLinksRequest, + listGoogleAdsLinksAsync( + request?: protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -10314,107 +12174,101 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listUserLinks']; + const defaultCallSettings = this._defaults['listGoogleAdsLinks']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listUserLinks.asyncIterate( - this.innerApiCalls['listUserLinks'] as GaxCall, + return this.descriptors.page.listGoogleAdsLinks.asyncIterate( + this.innerApiCalls['listGoogleAdsLinks'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists all user links on an account or property, including implicit ones - * that come from effective permissions granted by groups or organization - * admin roles. - * - * If a returned user link does not have direct permissions, they cannot - * be removed from the account or property directly with the DeleteUserLink - * command. They have to be removed from the group/etc that gives them - * permissions, which is currently only usable/discoverable in the GA or GMP - * UIs. + * Returns child MeasurementProtocolSecrets under the specified parent + * Property. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Example format: accounts/1234 + * Required. The resource name of the parent stream. + * Format: + * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets * @param {number} request.pageSize - * The maximum number of user links to return. - * The service may return fewer than this value. - * If unspecified, at most 1000 user links will be returned. - * The maximum value is 5000; values above 5000 will be coerced to 5000. + * 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 `AuditUserLinks` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `AuditUserLinks` must - * match the call that provided the page token. + * 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. - * The first element of the array is Array of {@link google.analytics.admin.v1alpha.AuditUserLink | AuditUserLink}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.MeasurementProtocolSecret | MeasurementProtocolSecret}. * 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 `auditUserLinksAsync()` + * We recommend using `listMeasurementProtocolSecretsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - auditUserLinks( - request?: protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, + listMeasurementProtocolSecrets( + request?: protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IAuditUserLink[], - protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest | null, - protos.google.analytics.admin.v1alpha.IAuditUserLinksResponse + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret[], + protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest | null, + protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse ] >; - auditUserLinks( - request: protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, + listMeasurementProtocolSecrets( + request: protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, - | protos.google.analytics.admin.v1alpha.IAuditUserLinksResponse + protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, + | protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IAuditUserLink + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret > ): void; - auditUserLinks( - request: protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, + listMeasurementProtocolSecrets( + request: protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, - | protos.google.analytics.admin.v1alpha.IAuditUserLinksResponse + protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, + | protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IAuditUserLink + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret > ): void; - auditUserLinks( - request?: protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, + listMeasurementProtocolSecrets( + request?: protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, - | protos.google.analytics.admin.v1alpha.IAuditUserLinksResponse + protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, + | protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IAuditUserLink + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, - | protos.google.analytics.admin.v1alpha.IAuditUserLinksResponse + protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, + | protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IAuditUserLink + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret > ): Promise< [ - protos.google.analytics.admin.v1alpha.IAuditUserLink[], - protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest | null, - protos.google.analytics.admin.v1alpha.IAuditUserLinksResponse + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret[], + protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest | null, + protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse ] > | void { request = request || {}; @@ -10433,7 +12287,11 @@ export class AnalyticsAdminServiceClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.auditUserLinks(request, options, callback); + return this.innerApiCalls.listMeasurementProtocolSecrets( + request, + options, + callback + ); } /** @@ -10441,31 +12299,32 @@ export class AnalyticsAdminServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Example format: accounts/1234 + * Required. The resource name of the parent stream. + * Format: + * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets * @param {number} request.pageSize - * The maximum number of user links to return. - * The service may return fewer than this value. - * If unspecified, at most 1000 user links will be returned. - * The maximum value is 5000; values above 5000 will be coerced to 5000. + * 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 `AuditUserLinks` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `AuditUserLinks` must - * match the call that provided the page token. + * 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} - * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.AuditUserLink | AuditUserLink} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.MeasurementProtocolSecret | MeasurementProtocolSecret} 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 `auditUserLinksAsync()` + * We recommend using `listMeasurementProtocolSecretsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - auditUserLinksStream( - request?: protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, + listMeasurementProtocolSecretsStream( + request?: protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -10476,51 +12335,53 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['auditUserLinks']; + const defaultCallSettings = + this._defaults['listMeasurementProtocolSecrets']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.auditUserLinks.createStream( - this.innerApiCalls.auditUserLinks as GaxCall, + return this.descriptors.page.listMeasurementProtocolSecrets.createStream( + this.innerApiCalls.listMeasurementProtocolSecrets as GaxCall, request, callSettings ); } /** - * Equivalent to `auditUserLinks`, but returns an iterable object. + * Equivalent to `listMeasurementProtocolSecrets`, 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. Example format: accounts/1234 + * Required. The resource name of the parent stream. + * Format: + * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets * @param {number} request.pageSize - * The maximum number of user links to return. - * The service may return fewer than this value. - * If unspecified, at most 1000 user links will be returned. - * The maximum value is 5000; values above 5000 will be coerced to 5000. + * 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 `AuditUserLinks` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `AuditUserLinks` must - * match the call that provided the page token. + * 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} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.AuditUserLink | AuditUserLink}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.MeasurementProtocolSecret | MeasurementProtocolSecret}. 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 * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.audit_user_links.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_AuditUserLinks_async + * @example include:samples/generated/v1alpha/analytics_admin_service.list_measurement_protocol_secrets.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListMeasurementProtocolSecrets_async */ - auditUserLinksAsync( - request?: protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, + listMeasurementProtocolSecretsAsync( + request?: protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -10529,101 +12390,119 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['auditUserLinks']; + const defaultCallSettings = + this._defaults['listMeasurementProtocolSecrets']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.auditUserLinks.asyncIterate( - this.innerApiCalls['auditUserLinks'] as GaxCall, + return this.descriptors.page.listMeasurementProtocolSecrets.asyncIterate( + this.innerApiCalls['listMeasurementProtocolSecrets'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists FirebaseLinks on a property. - * Properties can have at most one FirebaseLink. + * Searches through all changes to an account or its children given the + * specified set of filters. * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. Format: properties/{property_id} - * Example: properties/1234 - * @param {number} request.pageSize - * 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. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListFirebaseLinks` must - * match the call that provided the page token. + * @param {string} request.account + * Required. The account resource for which to return change history + * resources. + * @param {string} [request.property] + * Optional. Resource name for a child property. If set, only return changes + * made to this property or its child resources. + * @param {number[]} [request.resourceType] + * Optional. If set, only return changes if they are for a resource that + * matches at least one of these types. + * @param {number[]} [request.action] + * Optional. If set, only return changes that match one or more of these types + * of actions. + * @param {string[]} [request.actorEmail] + * Optional. If set, only return changes if they are made by a user in this + * list. + * @param {google.protobuf.Timestamp} [request.earliestChangeTime] + * Optional. If set, only return changes made after this time (inclusive). + * @param {google.protobuf.Timestamp} [request.latestChangeTime] + * Optional. If set, only return changes made before this time (inclusive). + * @param {number} [request.pageSize] + * Optional. The maximum number of ChangeHistoryEvent items to return. + * The service may return fewer than this value, even if there are additional + * pages. If unspecified, at most 50 items 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 + * `SearchChangeHistoryEvents` call. Provide this to retrieve the subsequent + * page. When paginating, all other parameters provided to + * `SearchChangeHistoryEvents` 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. - * The first element of the array is Array of {@link google.analytics.admin.v1alpha.FirebaseLink | FirebaseLink}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.ChangeHistoryEvent | ChangeHistoryEvent}. * 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 `listFirebaseLinksAsync()` + * We recommend using `searchChangeHistoryEventsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listFirebaseLinks( - request?: protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, + searchChangeHistoryEvents( + request?: protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IFirebaseLink[], - protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest | null, - protos.google.analytics.admin.v1alpha.IListFirebaseLinksResponse + protos.google.analytics.admin.v1alpha.IChangeHistoryEvent[], + protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest | null, + protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse ] >; - listFirebaseLinks( - request: protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, + searchChangeHistoryEvents( + request: protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, - | protos.google.analytics.admin.v1alpha.IListFirebaseLinksResponse + protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, + | protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IFirebaseLink + protos.google.analytics.admin.v1alpha.IChangeHistoryEvent > ): void; - listFirebaseLinks( - request: protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, + searchChangeHistoryEvents( + request: protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, - | protos.google.analytics.admin.v1alpha.IListFirebaseLinksResponse + protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, + | protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IFirebaseLink + protos.google.analytics.admin.v1alpha.IChangeHistoryEvent > ): void; - listFirebaseLinks( - request?: protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, + searchChangeHistoryEvents( + request?: protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, - | protos.google.analytics.admin.v1alpha.IListFirebaseLinksResponse + protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, + | protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IFirebaseLink + protos.google.analytics.admin.v1alpha.IChangeHistoryEvent >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, - | protos.google.analytics.admin.v1alpha.IListFirebaseLinksResponse + protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, + | protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IFirebaseLink + protos.google.analytics.admin.v1alpha.IChangeHistoryEvent > ): Promise< [ - protos.google.analytics.admin.v1alpha.IFirebaseLink[], - protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest | null, - protos.google.analytics.admin.v1alpha.IListFirebaseLinksResponse + protos.google.analytics.admin.v1alpha.IChangeHistoryEvent[], + protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest | null, + protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse ] > | void { request = request || {}; @@ -10639,43 +12518,64 @@ export class AnalyticsAdminServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', + account: request.account ?? '', }); this.initialize(); - return this.innerApiCalls.listFirebaseLinks(request, options, callback); + return this.innerApiCalls.searchChangeHistoryEvents( + request, + options, + callback + ); } /** * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. Format: properties/{property_id} - * Example: properties/1234 - * @param {number} request.pageSize - * 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. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListFirebaseLinks` must - * match the call that provided the page token. + * @param {string} request.account + * Required. The account resource for which to return change history + * resources. + * @param {string} [request.property] + * Optional. Resource name for a child property. If set, only return changes + * made to this property or its child resources. + * @param {number[]} [request.resourceType] + * Optional. If set, only return changes if they are for a resource that + * matches at least one of these types. + * @param {number[]} [request.action] + * Optional. If set, only return changes that match one or more of these types + * of actions. + * @param {string[]} [request.actorEmail] + * Optional. If set, only return changes if they are made by a user in this + * list. + * @param {google.protobuf.Timestamp} [request.earliestChangeTime] + * Optional. If set, only return changes made after this time (inclusive). + * @param {google.protobuf.Timestamp} [request.latestChangeTime] + * Optional. If set, only return changes made before this time (inclusive). + * @param {number} [request.pageSize] + * Optional. The maximum number of ChangeHistoryEvent items to return. + * The service may return fewer than this value, even if there are additional + * pages. If unspecified, at most 50 items 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 + * `SearchChangeHistoryEvents` call. Provide this to retrieve the subsequent + * page. When paginating, all other parameters provided to + * `SearchChangeHistoryEvents` 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} - * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.FirebaseLink | FirebaseLink} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.ChangeHistoryEvent | ChangeHistoryEvent} 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 `listFirebaseLinksAsync()` + * We recommend using `searchChangeHistoryEventsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listFirebaseLinksStream( - request?: protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, + searchChangeHistoryEventsStream( + request?: protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -10684,155 +12584,174 @@ export class AnalyticsAdminServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', + account: request.account ?? '', }); - const defaultCallSettings = this._defaults['listFirebaseLinks']; + const defaultCallSettings = this._defaults['searchChangeHistoryEvents']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listFirebaseLinks.createStream( - this.innerApiCalls.listFirebaseLinks as GaxCall, + return this.descriptors.page.searchChangeHistoryEvents.createStream( + this.innerApiCalls.searchChangeHistoryEvents as GaxCall, request, callSettings ); } /** - * Equivalent to `listFirebaseLinks`, but returns an iterable object. + * Equivalent to `searchChangeHistoryEvents`, 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. Format: properties/{property_id} - * Example: properties/1234 - * @param {number} request.pageSize - * 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. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListFirebaseLinks` must - * match the call that provided the page token. + * @param {string} request.account + * Required. The account resource for which to return change history + * resources. + * @param {string} [request.property] + * Optional. Resource name for a child property. If set, only return changes + * made to this property or its child resources. + * @param {number[]} [request.resourceType] + * Optional. If set, only return changes if they are for a resource that + * matches at least one of these types. + * @param {number[]} [request.action] + * Optional. If set, only return changes that match one or more of these types + * of actions. + * @param {string[]} [request.actorEmail] + * Optional. If set, only return changes if they are made by a user in this + * list. + * @param {google.protobuf.Timestamp} [request.earliestChangeTime] + * Optional. If set, only return changes made after this time (inclusive). + * @param {google.protobuf.Timestamp} [request.latestChangeTime] + * Optional. If set, only return changes made before this time (inclusive). + * @param {number} [request.pageSize] + * Optional. The maximum number of ChangeHistoryEvent items to return. + * The service may return fewer than this value, even if there are additional + * pages. If unspecified, at most 50 items 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 + * `SearchChangeHistoryEvents` call. Provide this to retrieve the subsequent + * page. When paginating, all other parameters provided to + * `SearchChangeHistoryEvents` 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} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.FirebaseLink | FirebaseLink}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.ChangeHistoryEvent | ChangeHistoryEvent}. 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 * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.list_firebase_links.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListFirebaseLinks_async + * @example include:samples/generated/v1alpha/analytics_admin_service.search_change_history_events.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_SearchChangeHistoryEvents_async */ - listFirebaseLinksAsync( - request?: protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, + searchChangeHistoryEventsAsync( + request?: protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, options?: CallOptions - ): AsyncIterable { + ): 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 ?? '', + account: request.account ?? '', }); - const defaultCallSettings = this._defaults['listFirebaseLinks']; + const defaultCallSettings = this._defaults['searchChangeHistoryEvents']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listFirebaseLinks.asyncIterate( - this.innerApiCalls['listFirebaseLinks'] as GaxCall, + return this.descriptors.page.searchChangeHistoryEvents.asyncIterate( + this.innerApiCalls['searchChangeHistoryEvents'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists GoogleAdsLinks on a property. + * Returns a list of conversion events in the specified parent property. + * + * Returns an empty list if no conversion events are found. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Example format: properties/1234 + * Required. The resource name of the parent property. + * Example: 'properties/123' * @param {number} request.pageSize * 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). + * 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. + * A page token, received from a previous `ListConversionEvents` 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. + * 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. - * The first element of the array is Array of {@link google.analytics.admin.v1alpha.GoogleAdsLink | GoogleAdsLink}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.ConversionEvent | ConversionEvent}. * 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 `listGoogleAdsLinksAsync()` + * We recommend using `listConversionEventsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listGoogleAdsLinks( - request?: protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, + listConversionEvents( + request?: protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IGoogleAdsLink[], - protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest | null, - protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse + protos.google.analytics.admin.v1alpha.IConversionEvent[], + protos.google.analytics.admin.v1alpha.IListConversionEventsRequest | null, + protos.google.analytics.admin.v1alpha.IListConversionEventsResponse ] >; - listGoogleAdsLinks( - request: protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, + listConversionEvents( + request: protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, - | protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse + protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, + | protos.google.analytics.admin.v1alpha.IListConversionEventsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IGoogleAdsLink + protos.google.analytics.admin.v1alpha.IConversionEvent > ): void; - listGoogleAdsLinks( - request: protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, + listConversionEvents( + request: protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, - | protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse + protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, + | protos.google.analytics.admin.v1alpha.IListConversionEventsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IGoogleAdsLink + protos.google.analytics.admin.v1alpha.IConversionEvent > ): void; - listGoogleAdsLinks( - request?: protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, + listConversionEvents( + request?: protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, - | protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse + protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, + | protos.google.analytics.admin.v1alpha.IListConversionEventsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IGoogleAdsLink + protos.google.analytics.admin.v1alpha.IConversionEvent >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, - | protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse + protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, + | protos.google.analytics.admin.v1alpha.IListConversionEventsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IGoogleAdsLink + protos.google.analytics.admin.v1alpha.IConversionEvent > ): Promise< [ - protos.google.analytics.admin.v1alpha.IGoogleAdsLink[], - protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest | null, - protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse + protos.google.analytics.admin.v1alpha.IConversionEvent[], + protos.google.analytics.admin.v1alpha.IListConversionEventsRequest | null, + protos.google.analytics.admin.v1alpha.IListConversionEventsResponse ] > | void { request = request || {}; @@ -10851,7 +12770,7 @@ export class AnalyticsAdminServiceClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listGoogleAdsLinks(request, options, callback); + return this.innerApiCalls.listConversionEvents(request, options, callback); } /** @@ -10859,31 +12778,31 @@ export class AnalyticsAdminServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Example format: properties/1234 + * Required. The resource name of the parent property. + * Example: 'properties/123' * @param {number} request.pageSize * 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). + * 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. + * A page token, received from a previous `ListConversionEvents` 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. + * 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} - * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.GoogleAdsLink | GoogleAdsLink} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.ConversionEvent | ConversionEvent} 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 `listGoogleAdsLinksAsync()` + * We recommend using `listConversionEventsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listGoogleAdsLinksStream( - request?: protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, + listConversionEventsStream( + request?: protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -10894,51 +12813,51 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listGoogleAdsLinks']; + const defaultCallSettings = this._defaults['listConversionEvents']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listGoogleAdsLinks.createStream( - this.innerApiCalls.listGoogleAdsLinks as GaxCall, + return this.descriptors.page.listConversionEvents.createStream( + this.innerApiCalls.listConversionEvents as GaxCall, request, callSettings ); } /** - * Equivalent to `listGoogleAdsLinks`, but returns an iterable object. + * Equivalent to `listConversionEvents`, 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. Example format: properties/1234 + * Required. The resource name of the parent property. + * Example: 'properties/123' * @param {number} request.pageSize * 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). + * 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. + * A page token, received from a previous `ListConversionEvents` 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. + * 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} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.GoogleAdsLink | GoogleAdsLink}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.ConversionEvent | ConversionEvent}. 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 * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.list_google_ads_links.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListGoogleAdsLinks_async + * @example include:samples/generated/v1alpha/analytics_admin_service.list_conversion_events.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListConversionEvents_async */ - listGoogleAdsLinksAsync( - request?: protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, + listConversionEventsAsync( + request?: protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -10947,101 +12866,100 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listGoogleAdsLinks']; + const defaultCallSettings = this._defaults['listConversionEvents']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listGoogleAdsLinks.asyncIterate( - this.innerApiCalls['listGoogleAdsLinks'] as GaxCall, + return this.descriptors.page.listConversionEvents.asyncIterate( + this.innerApiCalls['listConversionEvents'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Returns child MeasurementProtocolSecrets under the specified parent - * Property. + * Lists all DisplayVideo360AdvertiserLinks on a property. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the parent stream. - * Format: - * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets + * Required. Example format: properties/1234 * @param {number} request.pageSize * 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. + * 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 `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. + * A page token, received from a previous `ListDisplayVideo360AdvertiserLinks` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListDisplayVideo360AdvertiserLinks` 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. - * The first element of the array is Array of {@link google.analytics.admin.v1alpha.MeasurementProtocolSecret | MeasurementProtocolSecret}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink | DisplayVideo360AdvertiserLink}. * 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 `listMeasurementProtocolSecretsAsync()` + * We recommend using `listDisplayVideo360AdvertiserLinksAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listMeasurementProtocolSecrets( - request?: protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, + listDisplayVideo360AdvertiserLinks( + request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret[], - protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest | null, - protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink[], + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest | null, + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse ] >; - listMeasurementProtocolSecrets( - request: protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, + listDisplayVideo360AdvertiserLinks( + request: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, - | protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, + | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink > ): void; - listMeasurementProtocolSecrets( - request: protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, + listDisplayVideo360AdvertiserLinks( + request: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, - | protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, + | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink > ): void; - listMeasurementProtocolSecrets( - request?: protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, + listDisplayVideo360AdvertiserLinks( + request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, - | protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, + | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, - | protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, + | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink > ): Promise< [ - protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret[], - protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest | null, - protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink[], + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest | null, + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse ] > | void { request = request || {}; @@ -11060,7 +12978,7 @@ export class AnalyticsAdminServiceClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listMeasurementProtocolSecrets( + return this.innerApiCalls.listDisplayVideo360AdvertiserLinks( request, options, callback @@ -11072,32 +12990,32 @@ export class AnalyticsAdminServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the parent stream. - * Format: - * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets + * Required. Example format: properties/1234 * @param {number} request.pageSize * 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. + * 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 `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. + * A page token, received from a previous `ListDisplayVideo360AdvertiserLinks` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListDisplayVideo360AdvertiserLinks` 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} - * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.MeasurementProtocolSecret | MeasurementProtocolSecret} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink | DisplayVideo360AdvertiserLink} 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 `listMeasurementProtocolSecretsAsync()` + * We recommend using `listDisplayVideo360AdvertiserLinksAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listMeasurementProtocolSecretsStream( - request?: protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, + listDisplayVideo360AdvertiserLinksStream( + request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, options?: CallOptions ): Transform { request = request || {}; @@ -11109,52 +13027,52 @@ export class AnalyticsAdminServiceClient { parent: request.parent ?? '', }); const defaultCallSettings = - this._defaults['listMeasurementProtocolSecrets']; + this._defaults['listDisplayVideo360AdvertiserLinks']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listMeasurementProtocolSecrets.createStream( - this.innerApiCalls.listMeasurementProtocolSecrets as GaxCall, + return this.descriptors.page.listDisplayVideo360AdvertiserLinks.createStream( + this.innerApiCalls.listDisplayVideo360AdvertiserLinks as GaxCall, request, callSettings ); } /** - * Equivalent to `listMeasurementProtocolSecrets`, but returns an iterable object. + * Equivalent to `listDisplayVideo360AdvertiserLinks`, 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 name of the parent stream. - * Format: - * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets + * Required. Example format: properties/1234 * @param {number} request.pageSize * 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. + * 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 `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. + * A page token, received from a previous `ListDisplayVideo360AdvertiserLinks` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListDisplayVideo360AdvertiserLinks` 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} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.MeasurementProtocolSecret | MeasurementProtocolSecret}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink | DisplayVideo360AdvertiserLink}. 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 * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.list_measurement_protocol_secrets.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListMeasurementProtocolSecrets_async + * @example include:samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_links.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListDisplayVideo360AdvertiserLinks_async */ - listMeasurementProtocolSecretsAsync( - request?: protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, + listDisplayVideo360AdvertiserLinksAsync( + request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -11164,118 +13082,101 @@ export class AnalyticsAdminServiceClient { parent: request.parent ?? '', }); const defaultCallSettings = - this._defaults['listMeasurementProtocolSecrets']; + this._defaults['listDisplayVideo360AdvertiserLinks']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listMeasurementProtocolSecrets.asyncIterate( - this.innerApiCalls['listMeasurementProtocolSecrets'] as GaxCall, + return this.descriptors.page.listDisplayVideo360AdvertiserLinks.asyncIterate( + this.innerApiCalls['listDisplayVideo360AdvertiserLinks'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Searches through all changes to an account or its children given the - * specified set of filters. + * Lists DisplayVideo360AdvertiserLinkProposals on a property. * * @param {Object} request * The request object that will be sent. - * @param {string} request.account - * Required. The account resource for which to return change history - * resources. - * @param {string} [request.property] - * Optional. Resource name for a child property. If set, only return changes - * made to this property or its child resources. - * @param {number[]} [request.resourceType] - * Optional. If set, only return changes if they are for a resource that - * matches at least one of these types. - * @param {number[]} [request.action] - * Optional. If set, only return changes that match one or more of these types - * of actions. - * @param {string[]} [request.actorEmail] - * Optional. If set, only return changes if they are made by a user in this - * list. - * @param {google.protobuf.Timestamp} [request.earliestChangeTime] - * Optional. If set, only return changes made after this time (inclusive). - * @param {google.protobuf.Timestamp} [request.latestChangeTime] - * Optional. If set, only return changes made before this time (inclusive). - * @param {number} [request.pageSize] - * Optional. The maximum number of ChangeHistoryEvent items to return. - * The service may return fewer than this value, even if there are additional - * pages. If unspecified, at most 50 items will be returned. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {number} request.pageSize + * 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] - * Optional. A page token, received from a previous - * `SearchChangeHistoryEvents` call. Provide this to retrieve the subsequent - * page. When paginating, all other parameters provided to - * `SearchChangeHistoryEvents` must match the call that provided the page - * token. + * @param {string} request.pageToken + * A page token, received from a previous + * `ListDisplayVideo360AdvertiserLinkProposals` call. Provide this to retrieve + * the subsequent page. + * + * When paginating, all other parameters provided to + * `ListDisplayVideo360AdvertiserLinkProposals` 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. - * The first element of the array is Array of {@link google.analytics.admin.v1alpha.ChangeHistoryEvent | ChangeHistoryEvent}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal | DisplayVideo360AdvertiserLinkProposal}. * 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 `searchChangeHistoryEventsAsync()` + * We recommend using `listDisplayVideo360AdvertiserLinkProposalsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - searchChangeHistoryEvents( - request?: protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, + listDisplayVideo360AdvertiserLinkProposals( + request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IChangeHistoryEvent[], - protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest | null, - protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal[], + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest | null, + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse ] >; - searchChangeHistoryEvents( - request: protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, + listDisplayVideo360AdvertiserLinkProposals( + request: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, - | protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, + | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IChangeHistoryEvent + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal > ): void; - searchChangeHistoryEvents( - request: protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, + listDisplayVideo360AdvertiserLinkProposals( + request: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, - | protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, + | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IChangeHistoryEvent + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal > ): void; - searchChangeHistoryEvents( - request?: protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, + listDisplayVideo360AdvertiserLinkProposals( + request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, - | protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, + | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IChangeHistoryEvent + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, - | protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, + | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IChangeHistoryEvent + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal > ): Promise< [ - protos.google.analytics.admin.v1alpha.IChangeHistoryEvent[], - protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest | null, - protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal[], + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest | null, + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse ] > | void { request = request || {}; @@ -11291,10 +13192,10 @@ export class AnalyticsAdminServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - account: request.account ?? '', + parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.searchChangeHistoryEvents( + return this.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals( request, options, callback @@ -11305,50 +13206,34 @@ export class AnalyticsAdminServiceClient { * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. - * @param {string} request.account - * Required. The account resource for which to return change history - * resources. - * @param {string} [request.property] - * Optional. Resource name for a child property. If set, only return changes - * made to this property or its child resources. - * @param {number[]} [request.resourceType] - * Optional. If set, only return changes if they are for a resource that - * matches at least one of these types. - * @param {number[]} [request.action] - * Optional. If set, only return changes that match one or more of these types - * of actions. - * @param {string[]} [request.actorEmail] - * Optional. If set, only return changes if they are made by a user in this - * list. - * @param {google.protobuf.Timestamp} [request.earliestChangeTime] - * Optional. If set, only return changes made after this time (inclusive). - * @param {google.protobuf.Timestamp} [request.latestChangeTime] - * Optional. If set, only return changes made before this time (inclusive). - * @param {number} [request.pageSize] - * Optional. The maximum number of ChangeHistoryEvent items to return. - * The service may return fewer than this value, even if there are additional - * pages. If unspecified, at most 50 items will be returned. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {number} request.pageSize + * 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] - * Optional. A page token, received from a previous - * `SearchChangeHistoryEvents` call. Provide this to retrieve the subsequent - * page. When paginating, all other parameters provided to - * `SearchChangeHistoryEvents` must match the call that provided the page - * token. + * @param {string} request.pageToken + * A page token, received from a previous + * `ListDisplayVideo360AdvertiserLinkProposals` call. Provide this to retrieve + * the subsequent page. + * + * When paginating, all other parameters provided to + * `ListDisplayVideo360AdvertiserLinkProposals` 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} - * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.ChangeHistoryEvent | ChangeHistoryEvent} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal | DisplayVideo360AdvertiserLinkProposal} 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 `searchChangeHistoryEventsAsync()` + * We recommend using `listDisplayVideo360AdvertiserLinkProposalsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - searchChangeHistoryEventsStream( - request?: protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, + listDisplayVideo360AdvertiserLinkProposalsStream( + request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -11357,174 +13242,160 @@ export class AnalyticsAdminServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - account: request.account ?? '', + parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['searchChangeHistoryEvents']; + const defaultCallSettings = + this._defaults['listDisplayVideo360AdvertiserLinkProposals']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.searchChangeHistoryEvents.createStream( - this.innerApiCalls.searchChangeHistoryEvents as GaxCall, + return this.descriptors.page.listDisplayVideo360AdvertiserLinkProposals.createStream( + this.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals as GaxCall, request, callSettings ); } /** - * Equivalent to `searchChangeHistoryEvents`, but returns an iterable object. + * Equivalent to `listDisplayVideo360AdvertiserLinkProposals`, 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.account - * Required. The account resource for which to return change history - * resources. - * @param {string} [request.property] - * Optional. Resource name for a child property. If set, only return changes - * made to this property or its child resources. - * @param {number[]} [request.resourceType] - * Optional. If set, only return changes if they are for a resource that - * matches at least one of these types. - * @param {number[]} [request.action] - * Optional. If set, only return changes that match one or more of these types - * of actions. - * @param {string[]} [request.actorEmail] - * Optional. If set, only return changes if they are made by a user in this - * list. - * @param {google.protobuf.Timestamp} [request.earliestChangeTime] - * Optional. If set, only return changes made after this time (inclusive). - * @param {google.protobuf.Timestamp} [request.latestChangeTime] - * Optional. If set, only return changes made before this time (inclusive). - * @param {number} [request.pageSize] - * Optional. The maximum number of ChangeHistoryEvent items to return. - * The service may return fewer than this value, even if there are additional - * pages. If unspecified, at most 50 items will be returned. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {number} request.pageSize + * 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] - * Optional. A page token, received from a previous - * `SearchChangeHistoryEvents` call. Provide this to retrieve the subsequent - * page. When paginating, all other parameters provided to - * `SearchChangeHistoryEvents` must match the call that provided the page - * token. + * @param {string} request.pageToken + * A page token, received from a previous + * `ListDisplayVideo360AdvertiserLinkProposals` call. Provide this to retrieve + * the subsequent page. + * + * When paginating, all other parameters provided to + * `ListDisplayVideo360AdvertiserLinkProposals` 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} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.ChangeHistoryEvent | ChangeHistoryEvent}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal | DisplayVideo360AdvertiserLinkProposal}. 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 * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.search_change_history_events.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_SearchChangeHistoryEvents_async + * @example include:samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_link_proposals.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListDisplayVideo360AdvertiserLinkProposals_async */ - searchChangeHistoryEventsAsync( - request?: protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, + listDisplayVideo360AdvertiserLinkProposalsAsync( + request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, options?: CallOptions - ): AsyncIterable { + ): 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({ - account: request.account ?? '', + parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['searchChangeHistoryEvents']; + const defaultCallSettings = + this._defaults['listDisplayVideo360AdvertiserLinkProposals']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.searchChangeHistoryEvents.asyncIterate( - this.innerApiCalls['searchChangeHistoryEvents'] as GaxCall, + return this.descriptors.page.listDisplayVideo360AdvertiserLinkProposals.asyncIterate( + this.innerApiCalls[ + 'listDisplayVideo360AdvertiserLinkProposals' + ] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Returns a list of conversion events in the specified parent property. - * - * Returns an empty list if no conversion events are found. + * Lists CustomDimensions on a property. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the parent property. - * Example: 'properties/123' + * Required. Example format: properties/1234 * @param {number} request.pageSize * 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) + * 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. + * A page token, received from a previous `ListCustomDimensions` call. * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListConversionEvents` + * + * When paginating, all other parameters provided to `ListCustomDimensions` * 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. - * The first element of the array is Array of {@link google.analytics.admin.v1alpha.ConversionEvent | ConversionEvent}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.CustomDimension | CustomDimension}. * 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 `listConversionEventsAsync()` + * We recommend using `listCustomDimensionsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listConversionEvents( - request?: protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, + listCustomDimensions( + request?: protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IConversionEvent[], - protos.google.analytics.admin.v1alpha.IListConversionEventsRequest | null, - protos.google.analytics.admin.v1alpha.IListConversionEventsResponse + protos.google.analytics.admin.v1alpha.ICustomDimension[], + protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest | null, + protos.google.analytics.admin.v1alpha.IListCustomDimensionsResponse ] >; - listConversionEvents( - request: protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, + listCustomDimensions( + request: protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, - | protos.google.analytics.admin.v1alpha.IListConversionEventsResponse + protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, + | protos.google.analytics.admin.v1alpha.IListCustomDimensionsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IConversionEvent + protos.google.analytics.admin.v1alpha.ICustomDimension > ): void; - listConversionEvents( - request: protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, + listCustomDimensions( + request: protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, - | protos.google.analytics.admin.v1alpha.IListConversionEventsResponse + protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, + | protos.google.analytics.admin.v1alpha.IListCustomDimensionsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IConversionEvent + protos.google.analytics.admin.v1alpha.ICustomDimension > ): void; - listConversionEvents( - request?: protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, + listCustomDimensions( + request?: protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, - | protos.google.analytics.admin.v1alpha.IListConversionEventsResponse + protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, + | protos.google.analytics.admin.v1alpha.IListCustomDimensionsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IConversionEvent + protos.google.analytics.admin.v1alpha.ICustomDimension >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, - | protos.google.analytics.admin.v1alpha.IListConversionEventsResponse + protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, + | protos.google.analytics.admin.v1alpha.IListCustomDimensionsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IConversionEvent + protos.google.analytics.admin.v1alpha.ICustomDimension > ): Promise< [ - protos.google.analytics.admin.v1alpha.IConversionEvent[], - protos.google.analytics.admin.v1alpha.IListConversionEventsRequest | null, - protos.google.analytics.admin.v1alpha.IListConversionEventsResponse + protos.google.analytics.admin.v1alpha.ICustomDimension[], + protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest | null, + protos.google.analytics.admin.v1alpha.IListCustomDimensionsResponse ] > | void { request = request || {}; @@ -11543,7 +13414,7 @@ export class AnalyticsAdminServiceClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listConversionEvents(request, options, callback); + return this.innerApiCalls.listCustomDimensions(request, options, callback); } /** @@ -11551,31 +13422,31 @@ export class AnalyticsAdminServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the parent property. - * Example: 'properties/123' + * Required. Example format: properties/1234 * @param {number} request.pageSize * 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) + * 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. + * A page token, received from a previous `ListCustomDimensions` call. * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListConversionEvents` + * + * When paginating, all other parameters provided to `ListCustomDimensions` * 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} - * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.ConversionEvent | ConversionEvent} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.CustomDimension | CustomDimension} 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 `listConversionEventsAsync()` + * We recommend using `listCustomDimensionsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listConversionEventsStream( - request?: protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, + listCustomDimensionsStream( + request?: protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -11586,51 +13457,51 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listConversionEvents']; + const defaultCallSettings = this._defaults['listCustomDimensions']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listConversionEvents.createStream( - this.innerApiCalls.listConversionEvents as GaxCall, + return this.descriptors.page.listCustomDimensions.createStream( + this.innerApiCalls.listCustomDimensions as GaxCall, request, callSettings ); } /** - * Equivalent to `listConversionEvents`, but returns an iterable object. + * Equivalent to `listCustomDimensions`, 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 name of the parent property. - * Example: 'properties/123' + * Required. Example format: properties/1234 * @param {number} request.pageSize * 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) + * 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. + * A page token, received from a previous `ListCustomDimensions` call. * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListConversionEvents` + * + * When paginating, all other parameters provided to `ListCustomDimensions` * 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} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.ConversionEvent | ConversionEvent}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.CustomDimension | CustomDimension}. 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 * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.list_conversion_events.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListConversionEvents_async + * @example include:samples/generated/v1alpha/analytics_admin_service.list_custom_dimensions.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListCustomDimensions_async */ - listConversionEventsAsync( - request?: protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, + listCustomDimensionsAsync( + request?: protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -11639,17 +13510,17 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listConversionEvents']; + const defaultCallSettings = this._defaults['listCustomDimensions']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listConversionEvents.asyncIterate( - this.innerApiCalls['listConversionEvents'] as GaxCall, + return this.descriptors.page.listCustomDimensions.asyncIterate( + this.innerApiCalls['listCustomDimensions'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists all DisplayVideo360AdvertiserLinks on a property. + * Lists CustomMetrics on a property. * * @param {Object} request * The request object that will be sent. @@ -11660,79 +13531,78 @@ export class AnalyticsAdminServiceClient { * 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 `ListDisplayVideo360AdvertiserLinks` - * call. Provide this to retrieve the subsequent page. + * A page token, received from a previous `ListCustomMetrics` call. + * Provide this to retrieve the subsequent page. * - * When paginating, all other parameters provided to - * `ListDisplayVideo360AdvertiserLinks` must match the call that provided the - * page token. + * When paginating, all other parameters provided to `ListCustomMetrics` 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. - * The first element of the array is Array of {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink | DisplayVideo360AdvertiserLink}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.CustomMetric | CustomMetric}. * 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 `listDisplayVideo360AdvertiserLinksAsync()` + * We recommend using `listCustomMetricsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listDisplayVideo360AdvertiserLinks( - request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, + listCustomMetrics( + request?: protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink[], - protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest | null, - protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse + protos.google.analytics.admin.v1alpha.ICustomMetric[], + protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest | null, + protos.google.analytics.admin.v1alpha.IListCustomMetricsResponse ] >; - listDisplayVideo360AdvertiserLinks( - request: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, + listCustomMetrics( + request: protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, - | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse + protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, + | protos.google.analytics.admin.v1alpha.IListCustomMetricsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink + protos.google.analytics.admin.v1alpha.ICustomMetric > ): void; - listDisplayVideo360AdvertiserLinks( - request: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, + listCustomMetrics( + request: protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, - | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse + protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, + | protos.google.analytics.admin.v1alpha.IListCustomMetricsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink + protos.google.analytics.admin.v1alpha.ICustomMetric > ): void; - listDisplayVideo360AdvertiserLinks( - request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, + listCustomMetrics( + request?: protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, - | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse + protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, + | protos.google.analytics.admin.v1alpha.IListCustomMetricsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink + protos.google.analytics.admin.v1alpha.ICustomMetric >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, - | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse + protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, + | protos.google.analytics.admin.v1alpha.IListCustomMetricsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink + protos.google.analytics.admin.v1alpha.ICustomMetric > ): Promise< [ - protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink[], - protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest | null, - protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse + protos.google.analytics.admin.v1alpha.ICustomMetric[], + protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest | null, + protos.google.analytics.admin.v1alpha.IListCustomMetricsResponse ] > | void { request = request || {}; @@ -11751,11 +13621,7 @@ export class AnalyticsAdminServiceClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listDisplayVideo360AdvertiserLinks( - request, - options, - callback - ); + return this.innerApiCalls.listCustomMetrics(request, options, callback); } /** @@ -11769,26 +13635,25 @@ export class AnalyticsAdminServiceClient { * 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 `ListDisplayVideo360AdvertiserLinks` - * call. Provide this to retrieve the subsequent page. + * A page token, received from a previous `ListCustomMetrics` call. + * Provide this to retrieve the subsequent page. * - * When paginating, all other parameters provided to - * `ListDisplayVideo360AdvertiserLinks` must match the call that provided the - * page token. + * When paginating, all other parameters provided to `ListCustomMetrics` 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} - * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink | DisplayVideo360AdvertiserLink} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.CustomMetric | CustomMetric} 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 `listDisplayVideo360AdvertiserLinksAsync()` + * We recommend using `listCustomMetricsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listDisplayVideo360AdvertiserLinksStream( - request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, + listCustomMetricsStream( + request?: protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -11799,19 +13664,18 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = - this._defaults['listDisplayVideo360AdvertiserLinks']; + const defaultCallSettings = this._defaults['listCustomMetrics']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listDisplayVideo360AdvertiserLinks.createStream( - this.innerApiCalls.listDisplayVideo360AdvertiserLinks as GaxCall, + return this.descriptors.page.listCustomMetrics.createStream( + this.innerApiCalls.listCustomMetrics as GaxCall, request, callSettings ); } /** - * Equivalent to `listDisplayVideo360AdvertiserLinks`, but returns an iterable object. + * Equivalent to `listCustomMetrics`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request @@ -11823,29 +13687,28 @@ export class AnalyticsAdminServiceClient { * 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 `ListDisplayVideo360AdvertiserLinks` - * call. Provide this to retrieve the subsequent page. + * A page token, received from a previous `ListCustomMetrics` call. + * Provide this to retrieve the subsequent page. * - * When paginating, all other parameters provided to - * `ListDisplayVideo360AdvertiserLinks` must match the call that provided the - * page token. + * When paginating, all other parameters provided to `ListCustomMetrics` 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} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink | DisplayVideo360AdvertiserLink}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.CustomMetric | CustomMetric}. 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 * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_links.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListDisplayVideo360AdvertiserLinks_async + * @example include:samples/generated/v1alpha/analytics_admin_service.list_custom_metrics.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListCustomMetrics_async */ - listDisplayVideo360AdvertiserLinksAsync( - request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, + listCustomMetricsAsync( + request?: protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -11854,18 +13717,17 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = - this._defaults['listDisplayVideo360AdvertiserLinks']; + const defaultCallSettings = this._defaults['listCustomMetrics']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listDisplayVideo360AdvertiserLinks.asyncIterate( - this.innerApiCalls['listDisplayVideo360AdvertiserLinks'] as GaxCall, + return this.descriptors.page.listCustomMetrics.asyncIterate( + this.innerApiCalls['listCustomMetrics'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists DisplayVideo360AdvertiserLinkProposals on a property. + * Lists DataStreams on a property. * * @param {Object} request * The request object that will be sent. @@ -11876,80 +13738,78 @@ export class AnalyticsAdminServiceClient { * 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 - * `ListDisplayVideo360AdvertiserLinkProposals` call. Provide this to retrieve - * the subsequent page. + * A page token, received from a previous `ListDataStreams` call. + * Provide this to retrieve the subsequent page. * - * When paginating, all other parameters provided to - * `ListDisplayVideo360AdvertiserLinkProposals` must match the call that - * provided the page token. + * When paginating, all other parameters provided to `ListDataStreams` 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. - * The first element of the array is Array of {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal | DisplayVideo360AdvertiserLinkProposal}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.DataStream | DataStream}. * 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 `listDisplayVideo360AdvertiserLinkProposalsAsync()` + * We recommend using `listDataStreamsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listDisplayVideo360AdvertiserLinkProposals( - request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, + listDataStreams( + request?: protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal[], - protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest | null, - protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse + protos.google.analytics.admin.v1alpha.IDataStream[], + protos.google.analytics.admin.v1alpha.IListDataStreamsRequest | null, + protos.google.analytics.admin.v1alpha.IListDataStreamsResponse ] >; - listDisplayVideo360AdvertiserLinkProposals( - request: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, + listDataStreams( + request: protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, - | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse + protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, + | protos.google.analytics.admin.v1alpha.IListDataStreamsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal + protos.google.analytics.admin.v1alpha.IDataStream > ): void; - listDisplayVideo360AdvertiserLinkProposals( - request: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, + listDataStreams( + request: protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, - | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse + protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, + | protos.google.analytics.admin.v1alpha.IListDataStreamsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal + protos.google.analytics.admin.v1alpha.IDataStream > ): void; - listDisplayVideo360AdvertiserLinkProposals( - request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, + listDataStreams( + request?: protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, - | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse + protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, + | protos.google.analytics.admin.v1alpha.IListDataStreamsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal + protos.google.analytics.admin.v1alpha.IDataStream >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, - | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse + protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, + | protos.google.analytics.admin.v1alpha.IListDataStreamsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal + protos.google.analytics.admin.v1alpha.IDataStream > ): Promise< [ - protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal[], - protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest | null, - protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse + protos.google.analytics.admin.v1alpha.IDataStream[], + protos.google.analytics.admin.v1alpha.IListDataStreamsRequest | null, + protos.google.analytics.admin.v1alpha.IListDataStreamsResponse ] > | void { request = request || {}; @@ -11968,11 +13828,7 @@ export class AnalyticsAdminServiceClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals( - request, - options, - callback - ); + return this.innerApiCalls.listDataStreams(request, options, callback); } /** @@ -11986,27 +13842,25 @@ export class AnalyticsAdminServiceClient { * 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 - * `ListDisplayVideo360AdvertiserLinkProposals` call. Provide this to retrieve - * the subsequent page. + * A page token, received from a previous `ListDataStreams` call. + * Provide this to retrieve the subsequent page. * - * When paginating, all other parameters provided to - * `ListDisplayVideo360AdvertiserLinkProposals` must match the call that - * provided the page token. + * When paginating, all other parameters provided to `ListDataStreams` 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} - * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal | DisplayVideo360AdvertiserLinkProposal} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.DataStream | DataStream} 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 `listDisplayVideo360AdvertiserLinkProposalsAsync()` + * We recommend using `listDataStreamsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listDisplayVideo360AdvertiserLinkProposalsStream( - request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, + listDataStreamsStream( + request?: protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -12017,19 +13871,18 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = - this._defaults['listDisplayVideo360AdvertiserLinkProposals']; + const defaultCallSettings = this._defaults['listDataStreams']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listDisplayVideo360AdvertiserLinkProposals.createStream( - this.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals as GaxCall, + return this.descriptors.page.listDataStreams.createStream( + this.innerApiCalls.listDataStreams as GaxCall, request, callSettings ); } /** - * Equivalent to `listDisplayVideo360AdvertiserLinkProposals`, but returns an iterable object. + * Equivalent to `listDataStreams`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request @@ -12041,30 +13894,28 @@ export class AnalyticsAdminServiceClient { * 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 - * `ListDisplayVideo360AdvertiserLinkProposals` call. Provide this to retrieve - * the subsequent page. + * A page token, received from a previous `ListDataStreams` call. + * Provide this to retrieve the subsequent page. * - * When paginating, all other parameters provided to - * `ListDisplayVideo360AdvertiserLinkProposals` must match the call that - * provided the page token. + * When paginating, all other parameters provided to `ListDataStreams` 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} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal | DisplayVideo360AdvertiserLinkProposal}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.DataStream | DataStream}. 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 * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_link_proposals.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListDisplayVideo360AdvertiserLinkProposals_async + * @example include:samples/generated/v1alpha/analytics_admin_service.list_data_streams.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListDataStreams_async */ - listDisplayVideo360AdvertiserLinkProposalsAsync( - request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, + listDataStreamsAsync( + request?: protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -12073,20 +13924,19 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = - this._defaults['listDisplayVideo360AdvertiserLinkProposals']; + const defaultCallSettings = this._defaults['listDataStreams']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listDisplayVideo360AdvertiserLinkProposals.asyncIterate( - this.innerApiCalls[ - 'listDisplayVideo360AdvertiserLinkProposals' - ] as GaxCall, + return this.descriptors.page.listDataStreams.asyncIterate( + this.innerApiCalls['listDataStreams'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists CustomDimensions on a property. + * Lists Audiences on a property. + * Audiences created before 2020 may not be supported. + * Default audiences will not show filter definitions. * * @param {Object} request * The request object that will be sent. @@ -12097,78 +13947,78 @@ export class AnalyticsAdminServiceClient { * 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. + * A page token, received from a previous `ListAudiences` 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. + * When paginating, all other parameters provided to `ListAudiences` 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. - * The first element of the array is Array of {@link google.analytics.admin.v1alpha.CustomDimension | CustomDimension}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.Audience | Audience}. * 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 `listCustomDimensionsAsync()` + * We recommend using `listAudiencesAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listCustomDimensions( - request?: protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, + listAudiences( + request?: protos.google.analytics.admin.v1alpha.IListAudiencesRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.ICustomDimension[], - protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest | null, - protos.google.analytics.admin.v1alpha.IListCustomDimensionsResponse + protos.google.analytics.admin.v1alpha.IAudience[], + protos.google.analytics.admin.v1alpha.IListAudiencesRequest | null, + protos.google.analytics.admin.v1alpha.IListAudiencesResponse ] >; - listCustomDimensions( - request: protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, + listAudiences( + request: protos.google.analytics.admin.v1alpha.IListAudiencesRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, - | protos.google.analytics.admin.v1alpha.IListCustomDimensionsResponse + protos.google.analytics.admin.v1alpha.IListAudiencesRequest, + | protos.google.analytics.admin.v1alpha.IListAudiencesResponse | null | undefined, - protos.google.analytics.admin.v1alpha.ICustomDimension + protos.google.analytics.admin.v1alpha.IAudience > ): void; - listCustomDimensions( - request: protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, + listAudiences( + request: protos.google.analytics.admin.v1alpha.IListAudiencesRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, - | protos.google.analytics.admin.v1alpha.IListCustomDimensionsResponse + protos.google.analytics.admin.v1alpha.IListAudiencesRequest, + | protos.google.analytics.admin.v1alpha.IListAudiencesResponse | null | undefined, - protos.google.analytics.admin.v1alpha.ICustomDimension + protos.google.analytics.admin.v1alpha.IAudience > ): void; - listCustomDimensions( - request?: protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, + listAudiences( + request?: protos.google.analytics.admin.v1alpha.IListAudiencesRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, - | protos.google.analytics.admin.v1alpha.IListCustomDimensionsResponse + protos.google.analytics.admin.v1alpha.IListAudiencesRequest, + | protos.google.analytics.admin.v1alpha.IListAudiencesResponse | null | undefined, - protos.google.analytics.admin.v1alpha.ICustomDimension + protos.google.analytics.admin.v1alpha.IAudience >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, - | protos.google.analytics.admin.v1alpha.IListCustomDimensionsResponse + protos.google.analytics.admin.v1alpha.IListAudiencesRequest, + | protos.google.analytics.admin.v1alpha.IListAudiencesResponse | null | undefined, - protos.google.analytics.admin.v1alpha.ICustomDimension + protos.google.analytics.admin.v1alpha.IAudience > ): Promise< [ - protos.google.analytics.admin.v1alpha.ICustomDimension[], - protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest | null, - protos.google.analytics.admin.v1alpha.IListCustomDimensionsResponse + protos.google.analytics.admin.v1alpha.IAudience[], + protos.google.analytics.admin.v1alpha.IListAudiencesRequest | null, + protos.google.analytics.admin.v1alpha.IListAudiencesResponse ] > | void { request = request || {}; @@ -12187,7 +14037,7 @@ export class AnalyticsAdminServiceClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listCustomDimensions(request, options, callback); + return this.innerApiCalls.listAudiences(request, options, callback); } /** @@ -12201,25 +14051,25 @@ export class AnalyticsAdminServiceClient { * 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. + * A page token, received from a previous `ListAudiences` 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. + * When paginating, all other parameters provided to `ListAudiences` 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} - * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.CustomDimension | CustomDimension} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.Audience | Audience} 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 `listCustomDimensionsAsync()` + * We recommend using `listAudiencesAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listCustomDimensionsStream( - request?: protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, + listAudiencesStream( + request?: protos.google.analytics.admin.v1alpha.IListAudiencesRequest, options?: CallOptions ): Transform { request = request || {}; @@ -12230,18 +14080,18 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listCustomDimensions']; + const defaultCallSettings = this._defaults['listAudiences']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listCustomDimensions.createStream( - this.innerApiCalls.listCustomDimensions as GaxCall, + return this.descriptors.page.listAudiences.createStream( + this.innerApiCalls.listAudiences as GaxCall, request, callSettings ); } /** - * Equivalent to `listCustomDimensions`, but returns an iterable object. + * Equivalent to `listAudiences`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request @@ -12253,28 +14103,28 @@ export class AnalyticsAdminServiceClient { * 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. + * A page token, received from a previous `ListAudiences` 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. + * When paginating, all other parameters provided to `ListAudiences` 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} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.CustomDimension | CustomDimension}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.Audience | Audience}. 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 * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.list_custom_dimensions.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListCustomDimensions_async + * @example include:samples/generated/v1alpha/analytics_admin_service.list_audiences.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAudiences_async */ - listCustomDimensionsAsync( - request?: protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, + listAudiencesAsync( + request?: protos.google.analytics.admin.v1alpha.IListAudiencesRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -12283,17 +14133,17 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listCustomDimensions']; + const defaultCallSettings = this._defaults['listAudiences']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listCustomDimensions.asyncIterate( - this.innerApiCalls['listCustomDimensions'] as GaxCall, + return this.descriptors.page.listAudiences.asyncIterate( + this.innerApiCalls['listAudiences'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists CustomMetrics on a property. + * Lists all SearchAds360Links on a property. * * @param {Object} request * The request object that will be sent. @@ -12304,78 +14154,79 @@ export class AnalyticsAdminServiceClient { * 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 `ListCustomMetrics` call. - * Provide this to retrieve the subsequent page. + * A page token, received from a previous `ListSearchAds360Links` + * call. Provide this to retrieve the subsequent page. * - * When paginating, all other parameters provided to `ListCustomMetrics` must - * match the call that provided the page token. + * When paginating, all other parameters provided to + * `ListSearchAds360Links` 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. - * The first element of the array is Array of {@link google.analytics.admin.v1alpha.CustomMetric | CustomMetric}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.SearchAds360Link | SearchAds360Link}. * 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 `listCustomMetricsAsync()` + * We recommend using `listSearchAds360LinksAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listCustomMetrics( - request?: protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, + listSearchAds360Links( + request?: protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.ICustomMetric[], - protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest | null, - protos.google.analytics.admin.v1alpha.IListCustomMetricsResponse + protos.google.analytics.admin.v1alpha.ISearchAds360Link[], + protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest | null, + protos.google.analytics.admin.v1alpha.IListSearchAds360LinksResponse ] >; - listCustomMetrics( - request: protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, + listSearchAds360Links( + request: protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, - | protos.google.analytics.admin.v1alpha.IListCustomMetricsResponse + protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, + | protos.google.analytics.admin.v1alpha.IListSearchAds360LinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.ICustomMetric + protos.google.analytics.admin.v1alpha.ISearchAds360Link > ): void; - listCustomMetrics( - request: protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, + listSearchAds360Links( + request: protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, - | protos.google.analytics.admin.v1alpha.IListCustomMetricsResponse + protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, + | protos.google.analytics.admin.v1alpha.IListSearchAds360LinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.ICustomMetric + protos.google.analytics.admin.v1alpha.ISearchAds360Link > ): void; - listCustomMetrics( - request?: protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, + listSearchAds360Links( + request?: protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, - | protos.google.analytics.admin.v1alpha.IListCustomMetricsResponse + protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, + | protos.google.analytics.admin.v1alpha.IListSearchAds360LinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.ICustomMetric + protos.google.analytics.admin.v1alpha.ISearchAds360Link >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, - | protos.google.analytics.admin.v1alpha.IListCustomMetricsResponse + protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, + | protos.google.analytics.admin.v1alpha.IListSearchAds360LinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.ICustomMetric + protos.google.analytics.admin.v1alpha.ISearchAds360Link > ): Promise< [ - protos.google.analytics.admin.v1alpha.ICustomMetric[], - protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest | null, - protos.google.analytics.admin.v1alpha.IListCustomMetricsResponse + protos.google.analytics.admin.v1alpha.ISearchAds360Link[], + protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest | null, + protos.google.analytics.admin.v1alpha.IListSearchAds360LinksResponse ] > | void { request = request || {}; @@ -12394,7 +14245,7 @@ export class AnalyticsAdminServiceClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listCustomMetrics(request, options, callback); + return this.innerApiCalls.listSearchAds360Links(request, options, callback); } /** @@ -12408,25 +14259,26 @@ export class AnalyticsAdminServiceClient { * 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 `ListCustomMetrics` call. - * Provide this to retrieve the subsequent page. + * A page token, received from a previous `ListSearchAds360Links` + * call. Provide this to retrieve the subsequent page. * - * When paginating, all other parameters provided to `ListCustomMetrics` must - * match the call that provided the page token. + * When paginating, all other parameters provided to + * `ListSearchAds360Links` 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} - * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.CustomMetric | CustomMetric} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.SearchAds360Link | SearchAds360Link} 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 `listCustomMetricsAsync()` + * We recommend using `listSearchAds360LinksAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - */ - listCustomMetricsStream( - request?: protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, + */ + listSearchAds360LinksStream( + request?: protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, options?: CallOptions ): Transform { request = request || {}; @@ -12437,18 +14289,18 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listCustomMetrics']; + const defaultCallSettings = this._defaults['listSearchAds360Links']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listCustomMetrics.createStream( - this.innerApiCalls.listCustomMetrics as GaxCall, + return this.descriptors.page.listSearchAds360Links.createStream( + this.innerApiCalls.listSearchAds360Links as GaxCall, request, callSettings ); } /** - * Equivalent to `listCustomMetrics`, but returns an iterable object. + * Equivalent to `listSearchAds360Links`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request @@ -12460,28 +14312,29 @@ export class AnalyticsAdminServiceClient { * 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 `ListCustomMetrics` call. - * Provide this to retrieve the subsequent page. + * A page token, received from a previous `ListSearchAds360Links` + * call. Provide this to retrieve the subsequent page. * - * When paginating, all other parameters provided to `ListCustomMetrics` must - * match the call that provided the page token. + * When paginating, all other parameters provided to + * `ListSearchAds360Links` 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} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.CustomMetric | CustomMetric}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.SearchAds360Link | SearchAds360Link}. 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 * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.list_custom_metrics.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListCustomMetrics_async + * @example include:samples/generated/v1alpha/analytics_admin_service.list_search_ads360_links.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListSearchAds360Links_async */ - listCustomMetricsAsync( - request?: protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, + listSearchAds360LinksAsync( + request?: protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -12490,99 +14343,101 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listCustomMetrics']; + const defaultCallSettings = this._defaults['listSearchAds360Links']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listCustomMetrics.asyncIterate( - this.innerApiCalls['listCustomMetrics'] as GaxCall, + return this.descriptors.page.listSearchAds360Links.asyncIterate( + this.innerApiCalls['listSearchAds360Links'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists DataStreams on a property. + * Lists all access bindings on an account or property. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Example format: properties/1234 + * Required. Formats: + * - accounts/{account} + * - properties/{property} * @param {number} request.pageSize - * 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). + * The maximum number of access bindings to return. + * The service may return fewer than this value. + * If unspecified, at most 200 access bindings will be returned. + * The maximum value is 500; values above 500 will be coerced to 500. * @param {string} request.pageToken - * A page token, received from a previous `ListDataStreams` call. + * A page token, received from a previous `ListAccessBindings` call. * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListDataStreams` must + * When paginating, all other parameters provided to `ListAccessBindings` 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. - * The first element of the array is Array of {@link google.analytics.admin.v1alpha.DataStream | DataStream}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.AccessBinding | AccessBinding}. * 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 `listDataStreamsAsync()` + * We recommend using `listAccessBindingsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listDataStreams( - request?: protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, + listAccessBindings( + request?: protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IDataStream[], - protos.google.analytics.admin.v1alpha.IListDataStreamsRequest | null, - protos.google.analytics.admin.v1alpha.IListDataStreamsResponse + protos.google.analytics.admin.v1alpha.IAccessBinding[], + protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest | null, + protos.google.analytics.admin.v1alpha.IListAccessBindingsResponse ] >; - listDataStreams( - request: protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, + listAccessBindings( + request: protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, - | protos.google.analytics.admin.v1alpha.IListDataStreamsResponse + protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest, + | protos.google.analytics.admin.v1alpha.IListAccessBindingsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IDataStream + protos.google.analytics.admin.v1alpha.IAccessBinding > ): void; - listDataStreams( - request: protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, + listAccessBindings( + request: protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, - | protos.google.analytics.admin.v1alpha.IListDataStreamsResponse + protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest, + | protos.google.analytics.admin.v1alpha.IListAccessBindingsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IDataStream + protos.google.analytics.admin.v1alpha.IAccessBinding > ): void; - listDataStreams( - request?: protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, + listAccessBindings( + request?: protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, - | protos.google.analytics.admin.v1alpha.IListDataStreamsResponse + protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest, + | protos.google.analytics.admin.v1alpha.IListAccessBindingsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IDataStream + protos.google.analytics.admin.v1alpha.IAccessBinding >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, - | protos.google.analytics.admin.v1alpha.IListDataStreamsResponse + protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest, + | protos.google.analytics.admin.v1alpha.IListAccessBindingsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IDataStream + protos.google.analytics.admin.v1alpha.IAccessBinding > ): Promise< [ - protos.google.analytics.admin.v1alpha.IDataStream[], - protos.google.analytics.admin.v1alpha.IListDataStreamsRequest | null, - protos.google.analytics.admin.v1alpha.IListDataStreamsResponse + protos.google.analytics.admin.v1alpha.IAccessBinding[], + protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest | null, + protos.google.analytics.admin.v1alpha.IListAccessBindingsResponse ] > | void { request = request || {}; @@ -12601,7 +14456,7 @@ export class AnalyticsAdminServiceClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listDataStreams(request, options, callback); + return this.innerApiCalls.listAccessBindings(request, options, callback); } /** @@ -12609,31 +14464,33 @@ export class AnalyticsAdminServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Example format: properties/1234 + * Required. Formats: + * - accounts/{account} + * - properties/{property} * @param {number} request.pageSize - * 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). + * The maximum number of access bindings to return. + * The service may return fewer than this value. + * If unspecified, at most 200 access bindings will be returned. + * The maximum value is 500; values above 500 will be coerced to 500. * @param {string} request.pageToken - * A page token, received from a previous `ListDataStreams` call. + * A page token, received from a previous `ListAccessBindings` call. * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListDataStreams` must + * When paginating, all other parameters provided to `ListAccessBindings` 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} - * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.DataStream | DataStream} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.AccessBinding | AccessBinding} 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 `listDataStreamsAsync()` + * We recommend using `listAccessBindingsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listDataStreamsStream( - request?: protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, + listAccessBindingsStream( + request?: protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -12644,51 +14501,53 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listDataStreams']; + const defaultCallSettings = this._defaults['listAccessBindings']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listDataStreams.createStream( - this.innerApiCalls.listDataStreams as GaxCall, + return this.descriptors.page.listAccessBindings.createStream( + this.innerApiCalls.listAccessBindings as GaxCall, request, callSettings ); } /** - * Equivalent to `listDataStreams`, but returns an iterable object. + * Equivalent to `listAccessBindings`, 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. Example format: properties/1234 + * Required. Formats: + * - accounts/{account} + * - properties/{property} * @param {number} request.pageSize - * 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). + * The maximum number of access bindings to return. + * The service may return fewer than this value. + * If unspecified, at most 200 access bindings will be returned. + * The maximum value is 500; values above 500 will be coerced to 500. * @param {string} request.pageToken - * A page token, received from a previous `ListDataStreams` call. + * A page token, received from a previous `ListAccessBindings` call. * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListDataStreams` must + * When paginating, all other parameters provided to `ListAccessBindings` 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} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.DataStream | DataStream}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.AccessBinding | AccessBinding}. 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 * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.list_data_streams.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListDataStreams_async + * @example include:samples/generated/v1alpha/analytics_admin_service.list_access_bindings.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAccessBindings_async */ - listDataStreamsAsync( - request?: protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, + listAccessBindingsAsync( + request?: protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -12697,19 +14556,17 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listDataStreams']; + const defaultCallSettings = this._defaults['listAccessBindings']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listDataStreams.asyncIterate( - this.innerApiCalls['listDataStreams'] as GaxCall, + return this.descriptors.page.listAccessBindings.asyncIterate( + this.innerApiCalls['listAccessBindings'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists Audiences on a property. - * Audiences created before 2020 may not be supported. - * Default audiences will not show filter definitions. + * Lists ExpandedDataSets on a property. * * @param {Object} request * The request object that will be sent. @@ -12720,78 +14577,78 @@ export class AnalyticsAdminServiceClient { * 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 `ListAudiences` call. Provide this - * to retrieve the subsequent page. + * A page token, received from a previous `ListExpandedDataSets` call. Provide + * this to retrieve the subsequent page. * - * When paginating, all other parameters provided to `ListAudiences` must - * match the call that provided the page token. + * When paginating, all other parameters provided to `ListExpandedDataSet` + * 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. - * The first element of the array is Array of {@link google.analytics.admin.v1alpha.Audience | Audience}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.ExpandedDataSet | ExpandedDataSet}. * 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 `listAudiencesAsync()` + * We recommend using `listExpandedDataSetsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listAudiences( - request?: protos.google.analytics.admin.v1alpha.IListAudiencesRequest, + listExpandedDataSets( + request?: protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IAudience[], - protos.google.analytics.admin.v1alpha.IListAudiencesRequest | null, - protos.google.analytics.admin.v1alpha.IListAudiencesResponse + protos.google.analytics.admin.v1alpha.IExpandedDataSet[], + protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest | null, + protos.google.analytics.admin.v1alpha.IListExpandedDataSetsResponse ] >; - listAudiences( - request: protos.google.analytics.admin.v1alpha.IListAudiencesRequest, + listExpandedDataSets( + request: protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListAudiencesRequest, - | protos.google.analytics.admin.v1alpha.IListAudiencesResponse + protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest, + | protos.google.analytics.admin.v1alpha.IListExpandedDataSetsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IAudience + protos.google.analytics.admin.v1alpha.IExpandedDataSet > ): void; - listAudiences( - request: protos.google.analytics.admin.v1alpha.IListAudiencesRequest, + listExpandedDataSets( + request: protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListAudiencesRequest, - | protos.google.analytics.admin.v1alpha.IListAudiencesResponse + protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest, + | protos.google.analytics.admin.v1alpha.IListExpandedDataSetsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IAudience + protos.google.analytics.admin.v1alpha.IExpandedDataSet > ): void; - listAudiences( - request?: protos.google.analytics.admin.v1alpha.IListAudiencesRequest, + listExpandedDataSets( + request?: protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.IListAudiencesRequest, - | protos.google.analytics.admin.v1alpha.IListAudiencesResponse + protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest, + | protos.google.analytics.admin.v1alpha.IListExpandedDataSetsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IAudience + protos.google.analytics.admin.v1alpha.IExpandedDataSet >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListAudiencesRequest, - | protos.google.analytics.admin.v1alpha.IListAudiencesResponse + protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest, + | protos.google.analytics.admin.v1alpha.IListExpandedDataSetsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IAudience + protos.google.analytics.admin.v1alpha.IExpandedDataSet > ): Promise< [ - protos.google.analytics.admin.v1alpha.IAudience[], - protos.google.analytics.admin.v1alpha.IListAudiencesRequest | null, - protos.google.analytics.admin.v1alpha.IListAudiencesResponse + protos.google.analytics.admin.v1alpha.IExpandedDataSet[], + protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest | null, + protos.google.analytics.admin.v1alpha.IListExpandedDataSetsResponse ] > | void { request = request || {}; @@ -12810,7 +14667,7 @@ export class AnalyticsAdminServiceClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listAudiences(request, options, callback); + return this.innerApiCalls.listExpandedDataSets(request, options, callback); } /** @@ -12824,25 +14681,25 @@ export class AnalyticsAdminServiceClient { * 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 `ListAudiences` call. Provide this - * to retrieve the subsequent page. + * A page token, received from a previous `ListExpandedDataSets` call. Provide + * this to retrieve the subsequent page. * - * When paginating, all other parameters provided to `ListAudiences` must - * match the call that provided the page token. + * When paginating, all other parameters provided to `ListExpandedDataSet` + * 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} - * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.Audience | Audience} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.ExpandedDataSet | ExpandedDataSet} 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 `listAudiencesAsync()` + * We recommend using `listExpandedDataSetsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listAudiencesStream( - request?: protos.google.analytics.admin.v1alpha.IListAudiencesRequest, + listExpandedDataSetsStream( + request?: protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -12853,18 +14710,18 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listAudiences']; + const defaultCallSettings = this._defaults['listExpandedDataSets']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listAudiences.createStream( - this.innerApiCalls.listAudiences as GaxCall, + return this.descriptors.page.listExpandedDataSets.createStream( + this.innerApiCalls.listExpandedDataSets as GaxCall, request, callSettings ); } /** - * Equivalent to `listAudiences`, but returns an iterable object. + * Equivalent to `listExpandedDataSets`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request @@ -12876,28 +14733,28 @@ export class AnalyticsAdminServiceClient { * 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 `ListAudiences` call. Provide this - * to retrieve the subsequent page. + * A page token, received from a previous `ListExpandedDataSets` call. Provide + * this to retrieve the subsequent page. * - * When paginating, all other parameters provided to `ListAudiences` must - * match the call that provided the page token. + * When paginating, all other parameters provided to `ListExpandedDataSet` + * 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} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.Audience | Audience}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.ExpandedDataSet | ExpandedDataSet}. 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 * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.list_audiences.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAudiences_async + * @example include:samples/generated/v1alpha/analytics_admin_service.list_expanded_data_sets.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListExpandedDataSets_async */ - listAudiencesAsync( - request?: protos.google.analytics.admin.v1alpha.IListAudiencesRequest, + listExpandedDataSetsAsync( + request?: protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -12906,100 +14763,100 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listAudiences']; + const defaultCallSettings = this._defaults['listExpandedDataSets']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listAudiences.asyncIterate( - this.innerApiCalls['listAudiences'] as GaxCall, + return this.descriptors.page.listExpandedDataSets.asyncIterate( + this.innerApiCalls['listExpandedDataSets'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists all SearchAds360Links on a property. + * Lists ChannelGroups on a property. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Example format: properties/1234 + * Required. The property for which to list ChannelGroups. + * Example format: properties/1234 * @param {number} request.pageSize * 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 `ListSearchAds360Links` - * call. Provide this to retrieve the subsequent page. + * A page token, received from a previous `ListChannelGroups` call. Provide + * this to retrieve the subsequent page. * - * When paginating, all other parameters provided to - * `ListSearchAds360Links` must match the call that provided the - * page token. + * When paginating, all other parameters provided to `ListChannelGroups` + * 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. - * The first element of the array is Array of {@link google.analytics.admin.v1alpha.SearchAds360Link | SearchAds360Link}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.ChannelGroup | ChannelGroup}. * 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 `listSearchAds360LinksAsync()` + * We recommend using `listChannelGroupsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listSearchAds360Links( - request?: protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, + listChannelGroups( + request?: protos.google.analytics.admin.v1alpha.IListChannelGroupsRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.ISearchAds360Link[], - protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest | null, - protos.google.analytics.admin.v1alpha.IListSearchAds360LinksResponse + protos.google.analytics.admin.v1alpha.IChannelGroup[], + protos.google.analytics.admin.v1alpha.IListChannelGroupsRequest | null, + protos.google.analytics.admin.v1alpha.IListChannelGroupsResponse ] >; - listSearchAds360Links( - request: protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, + listChannelGroups( + request: protos.google.analytics.admin.v1alpha.IListChannelGroupsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, - | protos.google.analytics.admin.v1alpha.IListSearchAds360LinksResponse + protos.google.analytics.admin.v1alpha.IListChannelGroupsRequest, + | protos.google.analytics.admin.v1alpha.IListChannelGroupsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.ISearchAds360Link + protos.google.analytics.admin.v1alpha.IChannelGroup > ): void; - listSearchAds360Links( - request: protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, + listChannelGroups( + request: protos.google.analytics.admin.v1alpha.IListChannelGroupsRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, - | protos.google.analytics.admin.v1alpha.IListSearchAds360LinksResponse + protos.google.analytics.admin.v1alpha.IListChannelGroupsRequest, + | protos.google.analytics.admin.v1alpha.IListChannelGroupsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.ISearchAds360Link + protos.google.analytics.admin.v1alpha.IChannelGroup > ): void; - listSearchAds360Links( - request?: protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, + listChannelGroups( + request?: protos.google.analytics.admin.v1alpha.IListChannelGroupsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, - | protos.google.analytics.admin.v1alpha.IListSearchAds360LinksResponse + protos.google.analytics.admin.v1alpha.IListChannelGroupsRequest, + | protos.google.analytics.admin.v1alpha.IListChannelGroupsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.ISearchAds360Link + protos.google.analytics.admin.v1alpha.IChannelGroup >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, - | protos.google.analytics.admin.v1alpha.IListSearchAds360LinksResponse + protos.google.analytics.admin.v1alpha.IListChannelGroupsRequest, + | protos.google.analytics.admin.v1alpha.IListChannelGroupsResponse | null | undefined, - protos.google.analytics.admin.v1alpha.ISearchAds360Link + protos.google.analytics.admin.v1alpha.IChannelGroup > ): Promise< [ - protos.google.analytics.admin.v1alpha.ISearchAds360Link[], - protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest | null, - protos.google.analytics.admin.v1alpha.IListSearchAds360LinksResponse + protos.google.analytics.admin.v1alpha.IChannelGroup[], + protos.google.analytics.admin.v1alpha.IListChannelGroupsRequest | null, + protos.google.analytics.admin.v1alpha.IListChannelGroupsResponse ] > | void { request = request || {}; @@ -13018,7 +14875,7 @@ export class AnalyticsAdminServiceClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listSearchAds360Links(request, options, callback); + return this.innerApiCalls.listChannelGroups(request, options, callback); } /** @@ -13026,32 +14883,32 @@ export class AnalyticsAdminServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Example format: properties/1234 + * Required. The property for which to list ChannelGroups. + * Example format: properties/1234 * @param {number} request.pageSize * 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 `ListSearchAds360Links` - * call. Provide this to retrieve the subsequent page. + * A page token, received from a previous `ListChannelGroups` call. Provide + * this to retrieve the subsequent page. * - * When paginating, all other parameters provided to - * `ListSearchAds360Links` must match the call that provided the - * page token. + * When paginating, all other parameters provided to `ListChannelGroups` + * 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} - * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.SearchAds360Link | SearchAds360Link} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.ChannelGroup | ChannelGroup} 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 `listSearchAds360LinksAsync()` + * We recommend using `listChannelGroupsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listSearchAds360LinksStream( - request?: protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, + listChannelGroupsStream( + request?: protos.google.analytics.admin.v1alpha.IListChannelGroupsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -13062,52 +14919,52 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listSearchAds360Links']; + const defaultCallSettings = this._defaults['listChannelGroups']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listSearchAds360Links.createStream( - this.innerApiCalls.listSearchAds360Links as GaxCall, + return this.descriptors.page.listChannelGroups.createStream( + this.innerApiCalls.listChannelGroups as GaxCall, request, callSettings ); } /** - * Equivalent to `listSearchAds360Links`, but returns an iterable object. + * Equivalent to `listChannelGroups`, 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. Example format: properties/1234 + * Required. The property for which to list ChannelGroups. + * Example format: properties/1234 * @param {number} request.pageSize * 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 `ListSearchAds360Links` - * call. Provide this to retrieve the subsequent page. + * A page token, received from a previous `ListChannelGroups` call. Provide + * this to retrieve the subsequent page. * - * When paginating, all other parameters provided to - * `ListSearchAds360Links` must match the call that provided the - * page token. + * When paginating, all other parameters provided to `ListChannelGroups` + * 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} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.SearchAds360Link | SearchAds360Link}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.ChannelGroup | ChannelGroup}. 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 * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.list_search_ads360_links.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListSearchAds360Links_async + * @example include:samples/generated/v1alpha/analytics_admin_service.list_channel_groups.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListChannelGroups_async */ - listSearchAds360LinksAsync( - request?: protos.google.analytics.admin.v1alpha.IListSearchAds360LinksRequest, + listChannelGroupsAsync( + request?: protos.google.analytics.admin.v1alpha.IListChannelGroupsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -13116,101 +14973,101 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listSearchAds360Links']; + const defaultCallSettings = this._defaults['listChannelGroups']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listSearchAds360Links.asyncIterate( - this.innerApiCalls['listSearchAds360Links'] as GaxCall, + return this.descriptors.page.listChannelGroups.asyncIterate( + this.innerApiCalls['listChannelGroups'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists all access bindings on an account or property. + * Lists BigQuery Links on a property. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Formats: - * - accounts/{account} - * - properties/{property} + * Required. The name of the property to list BigQuery links under. + * Format: properties/{property_id} + * Example: properties/1234 * @param {number} request.pageSize - * The maximum number of access bindings to return. - * The service may return fewer than this value. - * If unspecified, at most 200 access bindings will be returned. - * The maximum value is 500; values above 500 will be coerced to 500. + * 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 `ListAccessBindings` call. + * A page token, received from a previous `ListBigQueryLinks` call. * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListAccessBindings` must + * When paginating, all other parameters provided to `ListBigQueryLinks` 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. - * The first element of the array is Array of {@link google.analytics.admin.v1alpha.AccessBinding | AccessBinding}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.BigQueryLink | BigQueryLink}. * 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 `listAccessBindingsAsync()` + * We recommend using `listBigQueryLinksAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listAccessBindings( - request?: protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest, + listBigQueryLinks( + request?: protos.google.analytics.admin.v1alpha.IListBigQueryLinksRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IAccessBinding[], - protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest | null, - protos.google.analytics.admin.v1alpha.IListAccessBindingsResponse + protos.google.analytics.admin.v1alpha.IBigQueryLink[], + protos.google.analytics.admin.v1alpha.IListBigQueryLinksRequest | null, + protos.google.analytics.admin.v1alpha.IListBigQueryLinksResponse ] >; - listAccessBindings( - request: protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest, + listBigQueryLinks( + request: protos.google.analytics.admin.v1alpha.IListBigQueryLinksRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest, - | protos.google.analytics.admin.v1alpha.IListAccessBindingsResponse + protos.google.analytics.admin.v1alpha.IListBigQueryLinksRequest, + | protos.google.analytics.admin.v1alpha.IListBigQueryLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IAccessBinding + protos.google.analytics.admin.v1alpha.IBigQueryLink > ): void; - listAccessBindings( - request: protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest, + listBigQueryLinks( + request: protos.google.analytics.admin.v1alpha.IListBigQueryLinksRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest, - | protos.google.analytics.admin.v1alpha.IListAccessBindingsResponse + protos.google.analytics.admin.v1alpha.IListBigQueryLinksRequest, + | protos.google.analytics.admin.v1alpha.IListBigQueryLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IAccessBinding + protos.google.analytics.admin.v1alpha.IBigQueryLink > ): void; - listAccessBindings( - request?: protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest, + listBigQueryLinks( + request?: protos.google.analytics.admin.v1alpha.IListBigQueryLinksRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest, - | protos.google.analytics.admin.v1alpha.IListAccessBindingsResponse + protos.google.analytics.admin.v1alpha.IListBigQueryLinksRequest, + | protos.google.analytics.admin.v1alpha.IListBigQueryLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IAccessBinding + protos.google.analytics.admin.v1alpha.IBigQueryLink >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest, - | protos.google.analytics.admin.v1alpha.IListAccessBindingsResponse + protos.google.analytics.admin.v1alpha.IListBigQueryLinksRequest, + | protos.google.analytics.admin.v1alpha.IListBigQueryLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IAccessBinding + protos.google.analytics.admin.v1alpha.IBigQueryLink > ): Promise< [ - protos.google.analytics.admin.v1alpha.IAccessBinding[], - protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest | null, - protos.google.analytics.admin.v1alpha.IListAccessBindingsResponse + protos.google.analytics.admin.v1alpha.IBigQueryLink[], + protos.google.analytics.admin.v1alpha.IListBigQueryLinksRequest | null, + protos.google.analytics.admin.v1alpha.IListBigQueryLinksResponse ] > | void { request = request || {}; @@ -13229,7 +15086,7 @@ export class AnalyticsAdminServiceClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listAccessBindings(request, options, callback); + return this.innerApiCalls.listBigQueryLinks(request, options, callback); } /** @@ -13237,33 +15094,33 @@ export class AnalyticsAdminServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Formats: - * - accounts/{account} - * - properties/{property} + * Required. The name of the property to list BigQuery links under. + * Format: properties/{property_id} + * Example: properties/1234 * @param {number} request.pageSize - * The maximum number of access bindings to return. - * The service may return fewer than this value. - * If unspecified, at most 200 access bindings will be returned. - * The maximum value is 500; values above 500 will be coerced to 500. + * 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 `ListAccessBindings` call. + * A page token, received from a previous `ListBigQueryLinks` call. * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListAccessBindings` must + * When paginating, all other parameters provided to `ListBigQueryLinks` 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} - * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.AccessBinding | AccessBinding} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.BigQueryLink | BigQueryLink} 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 `listAccessBindingsAsync()` + * We recommend using `listBigQueryLinksAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listAccessBindingsStream( - request?: protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest, + listBigQueryLinksStream( + request?: protos.google.analytics.admin.v1alpha.IListBigQueryLinksRequest, options?: CallOptions ): Transform { request = request || {}; @@ -13274,53 +15131,53 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listAccessBindings']; + const defaultCallSettings = this._defaults['listBigQueryLinks']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listAccessBindings.createStream( - this.innerApiCalls.listAccessBindings as GaxCall, + return this.descriptors.page.listBigQueryLinks.createStream( + this.innerApiCalls.listBigQueryLinks as GaxCall, request, callSettings ); } /** - * Equivalent to `listAccessBindings`, but returns an iterable object. + * Equivalent to `listBigQueryLinks`, 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. Formats: - * - accounts/{account} - * - properties/{property} + * Required. The name of the property to list BigQuery links under. + * Format: properties/{property_id} + * Example: properties/1234 * @param {number} request.pageSize - * The maximum number of access bindings to return. - * The service may return fewer than this value. - * If unspecified, at most 200 access bindings will be returned. - * The maximum value is 500; values above 500 will be coerced to 500. + * 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 `ListAccessBindings` call. + * A page token, received from a previous `ListBigQueryLinks` call. * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListAccessBindings` must + * When paginating, all other parameters provided to `ListBigQueryLinks` 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} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.AccessBinding | AccessBinding}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.BigQueryLink | BigQueryLink}. 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 * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.list_access_bindings.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAccessBindings_async + * @example include:samples/generated/v1alpha/analytics_admin_service.list_big_query_links.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListBigQueryLinks_async */ - listAccessBindingsAsync( - request?: protos.google.analytics.admin.v1alpha.IListAccessBindingsRequest, + listBigQueryLinksAsync( + request?: protos.google.analytics.admin.v1alpha.IListBigQueryLinksRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -13329,99 +15186,101 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listAccessBindings']; + const defaultCallSettings = this._defaults['listBigQueryLinks']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listAccessBindings.asyncIterate( - this.innerApiCalls['listAccessBindings'] as GaxCall, + return this.descriptors.page.listBigQueryLinks.asyncIterate( + this.innerApiCalls['listBigQueryLinks'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists ExpandedDataSets on a property. + * Lists AdSenseLinks on a property. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Example format: properties/1234 + * Required. Resource name of the parent property. + * Format: properties/{propertyId} + * Example: properties/1234 * @param {number} request.pageSize * 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 `ListExpandedDataSets` call. Provide - * this to retrieve the subsequent page. + * A page token received from a previous `ListAdSenseLinks` call. + * Provide this to retrieve the subsequent page. * - * When paginating, all other parameters provided to `ListExpandedDataSet` - * must match the call that provided the page token. + * When paginating, all other parameters provided to `ListAdSenseLinks` 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. - * The first element of the array is Array of {@link google.analytics.admin.v1alpha.ExpandedDataSet | ExpandedDataSet}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.AdSenseLink | AdSenseLink}. * 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 `listExpandedDataSetsAsync()` + * We recommend using `listAdSenseLinksAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listExpandedDataSets( - request?: protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest, + listAdSenseLinks( + request?: protos.google.analytics.admin.v1alpha.IListAdSenseLinksRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IExpandedDataSet[], - protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest | null, - protos.google.analytics.admin.v1alpha.IListExpandedDataSetsResponse + protos.google.analytics.admin.v1alpha.IAdSenseLink[], + protos.google.analytics.admin.v1alpha.IListAdSenseLinksRequest | null, + protos.google.analytics.admin.v1alpha.IListAdSenseLinksResponse ] >; - listExpandedDataSets( - request: protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest, + listAdSenseLinks( + request: protos.google.analytics.admin.v1alpha.IListAdSenseLinksRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest, - | protos.google.analytics.admin.v1alpha.IListExpandedDataSetsResponse + protos.google.analytics.admin.v1alpha.IListAdSenseLinksRequest, + | protos.google.analytics.admin.v1alpha.IListAdSenseLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IExpandedDataSet + protos.google.analytics.admin.v1alpha.IAdSenseLink > ): void; - listExpandedDataSets( - request: protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest, + listAdSenseLinks( + request: protos.google.analytics.admin.v1alpha.IListAdSenseLinksRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest, - | protos.google.analytics.admin.v1alpha.IListExpandedDataSetsResponse + protos.google.analytics.admin.v1alpha.IListAdSenseLinksRequest, + | protos.google.analytics.admin.v1alpha.IListAdSenseLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IExpandedDataSet + protos.google.analytics.admin.v1alpha.IAdSenseLink > ): void; - listExpandedDataSets( - request?: protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest, + listAdSenseLinks( + request?: protos.google.analytics.admin.v1alpha.IListAdSenseLinksRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest, - | protos.google.analytics.admin.v1alpha.IListExpandedDataSetsResponse + protos.google.analytics.admin.v1alpha.IListAdSenseLinksRequest, + | protos.google.analytics.admin.v1alpha.IListAdSenseLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IExpandedDataSet + protos.google.analytics.admin.v1alpha.IAdSenseLink >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest, - | protos.google.analytics.admin.v1alpha.IListExpandedDataSetsResponse + protos.google.analytics.admin.v1alpha.IListAdSenseLinksRequest, + | protos.google.analytics.admin.v1alpha.IListAdSenseLinksResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IExpandedDataSet + protos.google.analytics.admin.v1alpha.IAdSenseLink > ): Promise< [ - protos.google.analytics.admin.v1alpha.IExpandedDataSet[], - protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest | null, - protos.google.analytics.admin.v1alpha.IListExpandedDataSetsResponse + protos.google.analytics.admin.v1alpha.IAdSenseLink[], + protos.google.analytics.admin.v1alpha.IListAdSenseLinksRequest | null, + protos.google.analytics.admin.v1alpha.IListAdSenseLinksResponse ] > | void { request = request || {}; @@ -13440,7 +15299,7 @@ export class AnalyticsAdminServiceClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listExpandedDataSets(request, options, callback); + return this.innerApiCalls.listAdSenseLinks(request, options, callback); } /** @@ -13448,31 +15307,33 @@ export class AnalyticsAdminServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Example format: properties/1234 + * Required. Resource name of the parent property. + * Format: properties/{propertyId} + * Example: properties/1234 * @param {number} request.pageSize * 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 `ListExpandedDataSets` call. Provide - * this to retrieve the subsequent page. + * A page token received from a previous `ListAdSenseLinks` call. + * Provide this to retrieve the subsequent page. * - * When paginating, all other parameters provided to `ListExpandedDataSet` - * must match the call that provided the page token. + * When paginating, all other parameters provided to `ListAdSenseLinks` 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} - * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.ExpandedDataSet | ExpandedDataSet} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.AdSenseLink | AdSenseLink} 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 `listExpandedDataSetsAsync()` + * We recommend using `listAdSenseLinksAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listExpandedDataSetsStream( - request?: protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest, + listAdSenseLinksStream( + request?: protos.google.analytics.admin.v1alpha.IListAdSenseLinksRequest, options?: CallOptions ): Transform { request = request || {}; @@ -13483,51 +15344,53 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listExpandedDataSets']; + const defaultCallSettings = this._defaults['listAdSenseLinks']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listExpandedDataSets.createStream( - this.innerApiCalls.listExpandedDataSets as GaxCall, + return this.descriptors.page.listAdSenseLinks.createStream( + this.innerApiCalls.listAdSenseLinks as GaxCall, request, callSettings ); } /** - * Equivalent to `listExpandedDataSets`, but returns an iterable object. + * Equivalent to `listAdSenseLinks`, 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. Example format: properties/1234 + * Required. Resource name of the parent property. + * Format: properties/{propertyId} + * Example: properties/1234 * @param {number} request.pageSize * 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 `ListExpandedDataSets` call. Provide - * this to retrieve the subsequent page. + * A page token received from a previous `ListAdSenseLinks` call. + * Provide this to retrieve the subsequent page. * - * When paginating, all other parameters provided to `ListExpandedDataSet` - * must match the call that provided the page token. + * When paginating, all other parameters provided to `ListAdSenseLinks` 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} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.ExpandedDataSet | ExpandedDataSet}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.AdSenseLink | AdSenseLink}. 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 * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.list_expanded_data_sets.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListExpandedDataSets_async + * @example include:samples/generated/v1alpha/analytics_admin_service.list_ad_sense_links.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAdSenseLinks_async */ - listExpandedDataSetsAsync( - request?: protos.google.analytics.admin.v1alpha.IListExpandedDataSetsRequest, + listAdSenseLinksAsync( + request?: protos.google.analytics.admin.v1alpha.IListAdSenseLinksRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -13536,101 +15399,99 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listExpandedDataSets']; + const defaultCallSettings = this._defaults['listAdSenseLinks']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listExpandedDataSets.asyncIterate( - this.innerApiCalls['listExpandedDataSets'] as GaxCall, + return this.descriptors.page.listAdSenseLinks.asyncIterate( + this.innerApiCalls['listAdSenseLinks'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists BigQuery Links on a property. + * Lists EventCreateRules on a web data stream. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The name of the property to list BigQuery links under. - * Format: properties/{property_id} - * Example: properties/1234 + * Required. Example format: properties/123/dataStreams/456 * @param {number} request.pageSize - * The maximum number of resources to return. The service may return - * fewer than this value, even if there are additional pages. + * 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) + * The maximum value is 200 (higher values will be coerced to the maximum). * @param {string} request.pageToken - * A page token, received from a previous `ListBigQueryLinks` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListBigQueryLinks` must - * match the call that provided the page token. + * A page token, received from a previous `ListEventCreateRules` call. Provide + * this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListEventCreateRules` + * 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. - * The first element of the array is Array of {@link google.analytics.admin.v1alpha.BigQueryLink | BigQueryLink}. + * The first element of the array is Array of {@link google.analytics.admin.v1alpha.EventCreateRule | EventCreateRule}. * 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 `listBigQueryLinksAsync()` + * We recommend using `listEventCreateRulesAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listBigQueryLinks( - request?: protos.google.analytics.admin.v1alpha.IListBigQueryLinksRequest, + listEventCreateRules( + request?: protos.google.analytics.admin.v1alpha.IListEventCreateRulesRequest, options?: CallOptions ): Promise< [ - protos.google.analytics.admin.v1alpha.IBigQueryLink[], - protos.google.analytics.admin.v1alpha.IListBigQueryLinksRequest | null, - protos.google.analytics.admin.v1alpha.IListBigQueryLinksResponse + protos.google.analytics.admin.v1alpha.IEventCreateRule[], + protos.google.analytics.admin.v1alpha.IListEventCreateRulesRequest | null, + protos.google.analytics.admin.v1alpha.IListEventCreateRulesResponse ] >; - listBigQueryLinks( - request: protos.google.analytics.admin.v1alpha.IListBigQueryLinksRequest, + listEventCreateRules( + request: protos.google.analytics.admin.v1alpha.IListEventCreateRulesRequest, options: CallOptions, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListBigQueryLinksRequest, - | protos.google.analytics.admin.v1alpha.IListBigQueryLinksResponse + protos.google.analytics.admin.v1alpha.IListEventCreateRulesRequest, + | protos.google.analytics.admin.v1alpha.IListEventCreateRulesResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IBigQueryLink + protos.google.analytics.admin.v1alpha.IEventCreateRule > ): void; - listBigQueryLinks( - request: protos.google.analytics.admin.v1alpha.IListBigQueryLinksRequest, + listEventCreateRules( + request: protos.google.analytics.admin.v1alpha.IListEventCreateRulesRequest, callback: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListBigQueryLinksRequest, - | protos.google.analytics.admin.v1alpha.IListBigQueryLinksResponse + protos.google.analytics.admin.v1alpha.IListEventCreateRulesRequest, + | protos.google.analytics.admin.v1alpha.IListEventCreateRulesResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IBigQueryLink + protos.google.analytics.admin.v1alpha.IEventCreateRule > ): void; - listBigQueryLinks( - request?: protos.google.analytics.admin.v1alpha.IListBigQueryLinksRequest, + listEventCreateRules( + request?: protos.google.analytics.admin.v1alpha.IListEventCreateRulesRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.analytics.admin.v1alpha.IListBigQueryLinksRequest, - | protos.google.analytics.admin.v1alpha.IListBigQueryLinksResponse + protos.google.analytics.admin.v1alpha.IListEventCreateRulesRequest, + | protos.google.analytics.admin.v1alpha.IListEventCreateRulesResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IBigQueryLink + protos.google.analytics.admin.v1alpha.IEventCreateRule >, callback?: PaginationCallback< - protos.google.analytics.admin.v1alpha.IListBigQueryLinksRequest, - | protos.google.analytics.admin.v1alpha.IListBigQueryLinksResponse + protos.google.analytics.admin.v1alpha.IListEventCreateRulesRequest, + | protos.google.analytics.admin.v1alpha.IListEventCreateRulesResponse | null | undefined, - protos.google.analytics.admin.v1alpha.IBigQueryLink + protos.google.analytics.admin.v1alpha.IEventCreateRule > ): Promise< [ - protos.google.analytics.admin.v1alpha.IBigQueryLink[], - protos.google.analytics.admin.v1alpha.IListBigQueryLinksRequest | null, - protos.google.analytics.admin.v1alpha.IListBigQueryLinksResponse + protos.google.analytics.admin.v1alpha.IEventCreateRule[], + protos.google.analytics.admin.v1alpha.IListEventCreateRulesRequest | null, + protos.google.analytics.admin.v1alpha.IListEventCreateRulesResponse ] > | void { request = request || {}; @@ -13649,7 +15510,7 @@ export class AnalyticsAdminServiceClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listBigQueryLinks(request, options, callback); + return this.innerApiCalls.listEventCreateRules(request, options, callback); } /** @@ -13657,33 +15518,31 @@ export class AnalyticsAdminServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The name of the property to list BigQuery links under. - * Format: properties/{property_id} - * Example: properties/1234 + * Required. Example format: properties/123/dataStreams/456 * @param {number} request.pageSize - * The maximum number of resources to return. The service may return - * fewer than this value, even if there are additional pages. + * 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) + * The maximum value is 200 (higher values will be coerced to the maximum). * @param {string} request.pageToken - * A page token, received from a previous `ListBigQueryLinks` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListBigQueryLinks` must - * match the call that provided the page token. + * A page token, received from a previous `ListEventCreateRules` call. Provide + * this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListEventCreateRules` + * 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} - * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.BigQueryLink | BigQueryLink} on 'data' event. + * An object stream which emits an object representing {@link google.analytics.admin.v1alpha.EventCreateRule | EventCreateRule} 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 `listBigQueryLinksAsync()` + * We recommend using `listEventCreateRulesAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listBigQueryLinksStream( - request?: protos.google.analytics.admin.v1alpha.IListBigQueryLinksRequest, + listEventCreateRulesStream( + request?: protos.google.analytics.admin.v1alpha.IListEventCreateRulesRequest, options?: CallOptions ): Transform { request = request || {}; @@ -13694,53 +15553,51 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listBigQueryLinks']; + const defaultCallSettings = this._defaults['listEventCreateRules']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listBigQueryLinks.createStream( - this.innerApiCalls.listBigQueryLinks as GaxCall, + return this.descriptors.page.listEventCreateRules.createStream( + this.innerApiCalls.listEventCreateRules as GaxCall, request, callSettings ); } /** - * Equivalent to `listBigQueryLinks`, but returns an iterable object. + * Equivalent to `listEventCreateRules`, 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 name of the property to list BigQuery links under. - * Format: properties/{property_id} - * Example: properties/1234 + * Required. Example format: properties/123/dataStreams/456 * @param {number} request.pageSize - * The maximum number of resources to return. The service may return - * fewer than this value, even if there are additional pages. + * 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) + * The maximum value is 200 (higher values will be coerced to the maximum). * @param {string} request.pageToken - * A page token, received from a previous `ListBigQueryLinks` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListBigQueryLinks` must - * match the call that provided the page token. + * A page token, received from a previous `ListEventCreateRules` call. Provide + * this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListEventCreateRules` + * 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} * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.analytics.admin.v1alpha.BigQueryLink | BigQueryLink}. The API will be called under the hood as needed, once per the page, + * {@link google.analytics.admin.v1alpha.EventCreateRule | EventCreateRule}. 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 * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1alpha/analytics_admin_service.list_big_query_links.js - * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListBigQueryLinks_async + * @example include:samples/generated/v1alpha/analytics_admin_service.list_event_create_rules.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListEventCreateRules_async */ - listBigQueryLinksAsync( - request?: protos.google.analytics.admin.v1alpha.IListBigQueryLinksRequest, + listEventCreateRulesAsync( + request?: protos.google.analytics.admin.v1alpha.IListEventCreateRulesRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -13749,14 +15606,14 @@ export class AnalyticsAdminServiceClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listBigQueryLinks']; + const defaultCallSettings = this._defaults['listEventCreateRules']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listBigQueryLinks.asyncIterate( - this.innerApiCalls['listBigQueryLinks'] as GaxCall, + return this.descriptors.page.listEventCreateRules.asyncIterate( + this.innerApiCalls['listEventCreateRules'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } // -------------------- // -- Path templates -- @@ -13892,6 +15749,44 @@ export class AnalyticsAdminServiceClient { ).user_link; } + /** + * Return a fully-qualified adSenseLink resource name string. + * + * @param {string} property + * @param {string} adsense_link + * @returns {string} Resource name string. + */ + adSenseLinkPath(property: string, adsenseLink: string) { + return this.pathTemplates.adSenseLinkPathTemplate.render({ + property: property, + adsense_link: adsenseLink, + }); + } + + /** + * Parse the property from AdSenseLink resource. + * + * @param {string} adSenseLinkName + * A fully-qualified path representing AdSenseLink resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromAdSenseLinkName(adSenseLinkName: string) { + return this.pathTemplates.adSenseLinkPathTemplate.match(adSenseLinkName) + .property; + } + + /** + * Parse the adsense_link from AdSenseLink resource. + * + * @param {string} adSenseLinkName + * A fully-qualified path representing AdSenseLink resource. + * @returns {string} A string representing the adsense_link. + */ + matchAdsenseLinkFromAdSenseLinkName(adSenseLinkName: string) { + return this.pathTemplates.adSenseLinkPathTemplate.match(adSenseLinkName) + .adsense_link; + } + /** * Return a fully-qualified attributionSettings resource name string. * @@ -13991,6 +15886,44 @@ export class AnalyticsAdminServiceClient { .bigquery_link; } + /** + * Return a fully-qualified channelGroup resource name string. + * + * @param {string} property + * @param {string} channel_group + * @returns {string} Resource name string. + */ + channelGroupPath(property: string, channelGroup: string) { + return this.pathTemplates.channelGroupPathTemplate.render({ + property: property, + channel_group: channelGroup, + }); + } + + /** + * Parse the property from ChannelGroup resource. + * + * @param {string} channelGroupName + * A fully-qualified path representing ChannelGroup resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromChannelGroupName(channelGroupName: string) { + return this.pathTemplates.channelGroupPathTemplate.match(channelGroupName) + .property; + } + + /** + * Parse the channel_group from ChannelGroup resource. + * + * @param {string} channelGroupName + * A fully-qualified path representing ChannelGroup resource. + * @returns {string} A string representing the channel_group. + */ + matchChannelGroupFromChannelGroupName(channelGroupName: string) { + return this.pathTemplates.channelGroupPathTemplate.match(channelGroupName) + .channel_group; + } + /** * Return a fully-qualified conversionEvent resource name string. * @@ -14299,6 +16232,65 @@ export class AnalyticsAdminServiceClient { ).data_stream; } + /** + * Return a fully-qualified eventCreateRule resource name string. + * + * @param {string} property + * @param {string} data_stream + * @param {string} event_create_rule + * @returns {string} Resource name string. + */ + eventCreateRulePath( + property: string, + dataStream: string, + eventCreateRule: string + ) { + return this.pathTemplates.eventCreateRulePathTemplate.render({ + property: property, + data_stream: dataStream, + event_create_rule: eventCreateRule, + }); + } + + /** + * Parse the property from EventCreateRule resource. + * + * @param {string} eventCreateRuleName + * A fully-qualified path representing EventCreateRule resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromEventCreateRuleName(eventCreateRuleName: string) { + return this.pathTemplates.eventCreateRulePathTemplate.match( + eventCreateRuleName + ).property; + } + + /** + * Parse the data_stream from EventCreateRule resource. + * + * @param {string} eventCreateRuleName + * A fully-qualified path representing EventCreateRule resource. + * @returns {string} A string representing the data_stream. + */ + matchDataStreamFromEventCreateRuleName(eventCreateRuleName: string) { + return this.pathTemplates.eventCreateRulePathTemplate.match( + eventCreateRuleName + ).data_stream; + } + + /** + * Parse the event_create_rule from EventCreateRule resource. + * + * @param {string} eventCreateRuleName + * A fully-qualified path representing EventCreateRule resource. + * @returns {string} A string representing the event_create_rule. + */ + matchEventCreateRuleFromEventCreateRuleName(eventCreateRuleName: string) { + return this.pathTemplates.eventCreateRulePathTemplate.match( + eventCreateRuleName + ).event_create_rule; + } + /** * Return a fully-qualified expandedDataSet resource name string. * 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 ae7a81cd69a..b819fccd08a 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 @@ -523,6 +523,31 @@ "retry_codes_name": "unknown_unavailable", "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" }, + "GetChannelGroup": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListChannelGroups": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateChannelGroup": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "UpdateChannelGroup": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "DeleteChannelGroup": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, "SetAutomatedGa4ConfigurationOptOut": { "timeout_millis": 60000, "retry_codes_name": "unknown_unavailable", @@ -567,6 +592,56 @@ "timeout_millis": 60000, "retry_codes_name": "unknown_unavailable", "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "FetchConnectedGa4Property": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetAdSenseLink": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateAdSenseLink": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "DeleteAdSenseLink": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListAdSenseLinks": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetEventCreateRule": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListEventCreateRules": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateEventCreateRule": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "UpdateEventCreateRule": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "DeleteEventCreateRule": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" } } } diff --git a/packages/google-analytics-admin/src/v1alpha/analytics_admin_service_proto_list.json b/packages/google-analytics-admin/src/v1alpha/analytics_admin_service_proto_list.json index 084ed5872e1..4b61e1071de 100644 --- a/packages/google-analytics-admin/src/v1alpha/analytics_admin_service_proto_list.json +++ b/packages/google-analytics-admin/src/v1alpha/analytics_admin_service_proto_list.json @@ -2,6 +2,8 @@ "../../protos/google/analytics/admin/v1alpha/access_report.proto", "../../protos/google/analytics/admin/v1alpha/analytics_admin.proto", "../../protos/google/analytics/admin/v1alpha/audience.proto", + "../../protos/google/analytics/admin/v1alpha/channel_group.proto", + "../../protos/google/analytics/admin/v1alpha/event_create_and_edit.proto", "../../protos/google/analytics/admin/v1alpha/expanded_data_set.proto", "../../protos/google/analytics/admin/v1alpha/resources.proto" ] diff --git a/packages/google-analytics-admin/src/v1alpha/gapic_metadata.json b/packages/google-analytics-admin/src/v1alpha/gapic_metadata.json index 866a4731b05..c91f5c3bac6 100644 --- a/packages/google-analytics-admin/src/v1alpha/gapic_metadata.json +++ b/packages/google-analytics-admin/src/v1alpha/gapic_metadata.json @@ -405,6 +405,26 @@ "deleteExpandedDataSet" ] }, + "GetChannelGroup": { + "methods": [ + "getChannelGroup" + ] + }, + "CreateChannelGroup": { + "methods": [ + "createChannelGroup" + ] + }, + "UpdateChannelGroup": { + "methods": [ + "updateChannelGroup" + ] + }, + "DeleteChannelGroup": { + "methods": [ + "deleteChannelGroup" + ] + }, "SetAutomatedGa4ConfigurationOptOut": { "methods": [ "setAutomatedGa4ConfigurationOptOut" @@ -445,6 +465,46 @@ "listConnectedSiteTags" ] }, + "FetchConnectedGa4Property": { + "methods": [ + "fetchConnectedGa4Property" + ] + }, + "GetAdSenseLink": { + "methods": [ + "getAdSenseLink" + ] + }, + "CreateAdSenseLink": { + "methods": [ + "createAdSenseLink" + ] + }, + "DeleteAdSenseLink": { + "methods": [ + "deleteAdSenseLink" + ] + }, + "GetEventCreateRule": { + "methods": [ + "getEventCreateRule" + ] + }, + "CreateEventCreateRule": { + "methods": [ + "createEventCreateRule" + ] + }, + "UpdateEventCreateRule": { + "methods": [ + "updateEventCreateRule" + ] + }, + "DeleteEventCreateRule": { + "methods": [ + "deleteEventCreateRule" + ] + }, "ListAccounts": { "methods": [ "listAccounts", @@ -578,12 +638,33 @@ "listExpandedDataSetsAsync" ] }, + "ListChannelGroups": { + "methods": [ + "listChannelGroups", + "listChannelGroupsStream", + "listChannelGroupsAsync" + ] + }, "ListBigQueryLinks": { "methods": [ "listBigQueryLinks", "listBigQueryLinksStream", "listBigQueryLinksAsync" ] + }, + "ListAdSenseLinks": { + "methods": [ + "listAdSenseLinks", + "listAdSenseLinksStream", + "listAdSenseLinksAsync" + ] + }, + "ListEventCreateRules": { + "methods": [ + "listEventCreateRules", + "listEventCreateRulesStream", + "listEventCreateRulesAsync" + ] } } }, @@ -985,6 +1066,26 @@ "deleteExpandedDataSet" ] }, + "GetChannelGroup": { + "methods": [ + "getChannelGroup" + ] + }, + "CreateChannelGroup": { + "methods": [ + "createChannelGroup" + ] + }, + "UpdateChannelGroup": { + "methods": [ + "updateChannelGroup" + ] + }, + "DeleteChannelGroup": { + "methods": [ + "deleteChannelGroup" + ] + }, "SetAutomatedGa4ConfigurationOptOut": { "methods": [ "setAutomatedGa4ConfigurationOptOut" @@ -1025,6 +1126,46 @@ "listConnectedSiteTags" ] }, + "FetchConnectedGa4Property": { + "methods": [ + "fetchConnectedGa4Property" + ] + }, + "GetAdSenseLink": { + "methods": [ + "getAdSenseLink" + ] + }, + "CreateAdSenseLink": { + "methods": [ + "createAdSenseLink" + ] + }, + "DeleteAdSenseLink": { + "methods": [ + "deleteAdSenseLink" + ] + }, + "GetEventCreateRule": { + "methods": [ + "getEventCreateRule" + ] + }, + "CreateEventCreateRule": { + "methods": [ + "createEventCreateRule" + ] + }, + "UpdateEventCreateRule": { + "methods": [ + "updateEventCreateRule" + ] + }, + "DeleteEventCreateRule": { + "methods": [ + "deleteEventCreateRule" + ] + }, "ListAccounts": { "methods": [ "listAccounts", @@ -1158,12 +1299,33 @@ "listExpandedDataSetsAsync" ] }, + "ListChannelGroups": { + "methods": [ + "listChannelGroups", + "listChannelGroupsStream", + "listChannelGroupsAsync" + ] + }, "ListBigQueryLinks": { "methods": [ "listBigQueryLinks", "listBigQueryLinksStream", "listBigQueryLinksAsync" ] + }, + "ListAdSenseLinks": { + "methods": [ + "listAdSenseLinks", + "listAdSenseLinksStream", + "listAdSenseLinksAsync" + ] + }, + "ListEventCreateRules": { + "methods": [ + "listEventCreateRules", + "listEventCreateRulesStream", + "listEventCreateRulesAsync" + ] } } } 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 7a239ece3b8..92f255d2825 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 @@ -11102,8 +11102,8 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('setAutomatedGa4ConfigurationOptOut', () => { - it('invokes setAutomatedGa4ConfigurationOptOut without error', async () => { + describe('getChannelGroup', () => { + it('invokes getChannelGroup without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11111,20 +11111,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest() + new protos.google.analytics.admin.v1alpha.GetChannelGroupRequest() ); - const expectedResponse = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse() + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetChannelGroupRequest', + ['name'] ); - client.innerApiCalls.setAutomatedGa4ConfigurationOptOut = - stubSimpleCall(expectedResponse); - const [response] = await client.setAutomatedGa4ConfigurationOptOut( - request + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ChannelGroup() ); + client.innerApiCalls.getChannelGroup = stubSimpleCall(expectedResponse); + const [response] = await client.getChannelGroup(request); assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getChannelGroup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getChannelGroup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes setAutomatedGa4ConfigurationOptOut without error using callback', async () => { + it('invokes getChannelGroup without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11132,19 +11143,25 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest() + new protos.google.analytics.admin.v1alpha.GetChannelGroupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetChannelGroupRequest', + ['name'] ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse() + new protos.google.analytics.admin.v1alpha.ChannelGroup() ); - client.innerApiCalls.setAutomatedGa4ConfigurationOptOut = + client.innerApiCalls.getChannelGroup = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.setAutomatedGa4ConfigurationOptOut( + client.getChannelGroup( request, ( err?: Error | null, - result?: protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse | null + result?: protos.google.analytics.admin.v1alpha.IChannelGroup | null ) => { if (err) { reject(err); @@ -11156,9 +11173,17 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getChannelGroup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getChannelGroup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes setAutomatedGa4ConfigurationOptOut with error', async () => { + it('invokes getChannelGroup with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11166,20 +11191,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest() + new protos.google.analytics.admin.v1alpha.GetChannelGroupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetChannelGroupRequest', + ['name'] ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.setAutomatedGa4ConfigurationOptOut = stubSimpleCall( + client.innerApiCalls.getChannelGroup = stubSimpleCall( undefined, expectedError ); - await assert.rejects( - client.setAutomatedGa4ConfigurationOptOut(request), - expectedError - ); + await assert.rejects(client.getChannelGroup(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getChannelGroup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getChannelGroup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes setAutomatedGa4ConfigurationOptOut with closed client', async () => { + it('invokes getChannelGroup with closed client', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11187,19 +11223,21 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest() + new protos.google.analytics.admin.v1alpha.GetChannelGroupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetChannelGroupRequest', + ['name'] ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); - await assert.rejects( - client.setAutomatedGa4ConfigurationOptOut(request), - expectedError - ); + await assert.rejects(client.getChannelGroup(request), expectedError); }); }); - describe('fetchAutomatedGa4ConfigurationOptOut', () => { - it('invokes fetchAutomatedGa4ConfigurationOptOut without error', async () => { + describe('createChannelGroup', () => { + it('invokes createChannelGroup without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11207,20 +11245,32 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest() + new protos.google.analytics.admin.v1alpha.CreateChannelGroupRequest() ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateChannelGroupRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse() + new protos.google.analytics.admin.v1alpha.ChannelGroup() ); - client.innerApiCalls.fetchAutomatedGa4ConfigurationOptOut = + client.innerApiCalls.createChannelGroup = stubSimpleCall(expectedResponse); - const [response] = await client.fetchAutomatedGa4ConfigurationOptOut( - request - ); + const [response] = await client.createChannelGroup(request); assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createChannelGroup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createChannelGroup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes fetchAutomatedGa4ConfigurationOptOut without error using callback', async () => { + it('invokes createChannelGroup without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11228,19 +11278,25 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest() + new protos.google.analytics.admin.v1alpha.CreateChannelGroupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateChannelGroupRequest', + ['parent'] ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse() + new protos.google.analytics.admin.v1alpha.ChannelGroup() ); - client.innerApiCalls.fetchAutomatedGa4ConfigurationOptOut = + client.innerApiCalls.createChannelGroup = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.fetchAutomatedGa4ConfigurationOptOut( + client.createChannelGroup( request, ( err?: Error | null, - result?: protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse | null + result?: protos.google.analytics.admin.v1alpha.IChannelGroup | null ) => { if (err) { reject(err); @@ -11252,9 +11308,17 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createChannelGroup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createChannelGroup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes fetchAutomatedGa4ConfigurationOptOut with error', async () => { + it('invokes createChannelGroup with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11262,18 +11326,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest() + new protos.google.analytics.admin.v1alpha.CreateChannelGroupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateChannelGroupRequest', + ['parent'] ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.fetchAutomatedGa4ConfigurationOptOut = - stubSimpleCall(undefined, expectedError); - await assert.rejects( - client.fetchAutomatedGa4ConfigurationOptOut(request), + client.innerApiCalls.createChannelGroup = stubSimpleCall( + undefined, expectedError ); + await assert.rejects(client.createChannelGroup(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createChannelGroup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createChannelGroup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes fetchAutomatedGa4ConfigurationOptOut with closed client', async () => { + it('invokes createChannelGroup with closed client', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11281,19 +11358,21 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest() + new protos.google.analytics.admin.v1alpha.CreateChannelGroupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateChannelGroupRequest', + ['parent'] ); + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); - await assert.rejects( - client.fetchAutomatedGa4ConfigurationOptOut(request), - expectedError - ); + await assert.rejects(client.createChannelGroup(request), expectedError); }); }); - describe('getBigQueryLink', () => { - it('invokes getBigQueryLink without error', async () => { + describe('updateChannelGroup', () => { + it('invokes updateChannelGroup without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11301,31 +11380,33 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GetBigQueryLinkRequest() + new protos.google.analytics.admin.v1alpha.UpdateChannelGroupRequest() ); + request.channelGroup ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.GetBigQueryLinkRequest', - ['name'] + '.google.analytics.admin.v1alpha.UpdateChannelGroupRequest', + ['channelGroup', 'name'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.channelGroup.name = defaultValue1; + const expectedHeaderRequestParams = `channel_group.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.BigQueryLink() + new protos.google.analytics.admin.v1alpha.ChannelGroup() ); - client.innerApiCalls.getBigQueryLink = stubSimpleCall(expectedResponse); - const [response] = await client.getBigQueryLink(request); + client.innerApiCalls.updateChannelGroup = + stubSimpleCall(expectedResponse); + const [response] = await client.updateChannelGroup(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.getBigQueryLink as SinonStub + client.innerApiCalls.updateChannelGroup as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getBigQueryLink as SinonStub + client.innerApiCalls.updateChannelGroup as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getBigQueryLink without error using callback', async () => { + it('invokes updateChannelGroup without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11333,25 +11414,26 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GetBigQueryLinkRequest() + new protos.google.analytics.admin.v1alpha.UpdateChannelGroupRequest() ); + request.channelGroup ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.GetBigQueryLinkRequest', - ['name'] + '.google.analytics.admin.v1alpha.UpdateChannelGroupRequest', + ['channelGroup', 'name'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.channelGroup.name = defaultValue1; + const expectedHeaderRequestParams = `channel_group.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.BigQueryLink() + new protos.google.analytics.admin.v1alpha.ChannelGroup() ); - client.innerApiCalls.getBigQueryLink = + client.innerApiCalls.updateChannelGroup = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.getBigQueryLink( + client.updateChannelGroup( request, ( err?: Error | null, - result?: protos.google.analytics.admin.v1alpha.IBigQueryLink | null + result?: protos.google.analytics.admin.v1alpha.IChannelGroup | null ) => { if (err) { reject(err); @@ -11364,16 +11446,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.getBigQueryLink as SinonStub + client.innerApiCalls.updateChannelGroup as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getBigQueryLink as SinonStub + client.innerApiCalls.updateChannelGroup as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getBigQueryLink with error', async () => { + it('invokes updateChannelGroup with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11381,31 +11463,32 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GetBigQueryLinkRequest() + new protos.google.analytics.admin.v1alpha.UpdateChannelGroupRequest() ); + request.channelGroup ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.GetBigQueryLinkRequest', - ['name'] + '.google.analytics.admin.v1alpha.UpdateChannelGroupRequest', + ['channelGroup', 'name'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.channelGroup.name = defaultValue1; + const expectedHeaderRequestParams = `channel_group.name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.getBigQueryLink = stubSimpleCall( + client.innerApiCalls.updateChannelGroup = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.getBigQueryLink(request), expectedError); + await assert.rejects(client.updateChannelGroup(request), expectedError); const actualRequest = ( - client.innerApiCalls.getBigQueryLink as SinonStub + client.innerApiCalls.updateChannelGroup as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getBigQueryLink as SinonStub + client.innerApiCalls.updateChannelGroup as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getBigQueryLink with closed client', async () => { + it('invokes updateChannelGroup with closed client', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11413,21 +11496,22 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GetBigQueryLinkRequest() + new protos.google.analytics.admin.v1alpha.UpdateChannelGroupRequest() ); + request.channelGroup ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.GetBigQueryLinkRequest', - ['name'] + '.google.analytics.admin.v1alpha.UpdateChannelGroupRequest', + ['channelGroup', 'name'] ); - request.name = defaultValue1; + request.channelGroup.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); - await assert.rejects(client.getBigQueryLink(request), expectedError); + await assert.rejects(client.updateChannelGroup(request), expectedError); }); }); - describe('getEnhancedMeasurementSettings', () => { - it('invokes getEnhancedMeasurementSettings without error', async () => { + describe('deleteChannelGroup', () => { + it('invokes deleteChannelGroup without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11435,32 +11519,32 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest() + new protos.google.analytics.admin.v1alpha.DeleteChannelGroupRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest', + '.google.analytics.admin.v1alpha.DeleteChannelGroupRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.EnhancedMeasurementSettings() + new protos.google.protobuf.Empty() ); - client.innerApiCalls.getEnhancedMeasurementSettings = + client.innerApiCalls.deleteChannelGroup = stubSimpleCall(expectedResponse); - const [response] = await client.getEnhancedMeasurementSettings(request); + const [response] = await client.deleteChannelGroup(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.getEnhancedMeasurementSettings as SinonStub + client.innerApiCalls.deleteChannelGroup as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getEnhancedMeasurementSettings as SinonStub + client.innerApiCalls.deleteChannelGroup as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getEnhancedMeasurementSettings without error using callback', async () => { + it('invokes deleteChannelGroup without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11468,25 +11552,25 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest() + new protos.google.analytics.admin.v1alpha.DeleteChannelGroupRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest', + '.google.analytics.admin.v1alpha.DeleteChannelGroupRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.EnhancedMeasurementSettings() + new protos.google.protobuf.Empty() ); - client.innerApiCalls.getEnhancedMeasurementSettings = + client.innerApiCalls.deleteChannelGroup = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.getEnhancedMeasurementSettings( + client.deleteChannelGroup( request, ( err?: Error | null, - result?: protos.google.analytics.admin.v1alpha.IEnhancedMeasurementSettings | null + result?: protos.google.protobuf.IEmpty | null ) => { if (err) { reject(err); @@ -11499,16 +11583,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.getEnhancedMeasurementSettings as SinonStub + client.innerApiCalls.deleteChannelGroup as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getEnhancedMeasurementSettings as SinonStub + client.innerApiCalls.deleteChannelGroup as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getEnhancedMeasurementSettings with error', async () => { + it('invokes deleteChannelGroup with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11516,34 +11600,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest() + new protos.google.analytics.admin.v1alpha.DeleteChannelGroupRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest', + '.google.analytics.admin.v1alpha.DeleteChannelGroupRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.getEnhancedMeasurementSettings = stubSimpleCall( + client.innerApiCalls.deleteChannelGroup = stubSimpleCall( undefined, expectedError ); - await assert.rejects( - client.getEnhancedMeasurementSettings(request), - expectedError - ); + await assert.rejects(client.deleteChannelGroup(request), expectedError); const actualRequest = ( - client.innerApiCalls.getEnhancedMeasurementSettings as SinonStub + client.innerApiCalls.deleteChannelGroup as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getEnhancedMeasurementSettings as SinonStub + client.innerApiCalls.deleteChannelGroup as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getEnhancedMeasurementSettings with closed client', async () => { + it('invokes deleteChannelGroup with closed client', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11551,24 +11632,21 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest() + new protos.google.analytics.admin.v1alpha.DeleteChannelGroupRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest', + '.google.analytics.admin.v1alpha.DeleteChannelGroupRequest', ['name'] ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); - await assert.rejects( - client.getEnhancedMeasurementSettings(request), - expectedError - ); + await assert.rejects(client.deleteChannelGroup(request), expectedError); }); }); - describe('updateEnhancedMeasurementSettings', () => { - it('invokes updateEnhancedMeasurementSettings without error', async () => { + describe('setAutomatedGa4ConfigurationOptOut', () => { + it('invokes setAutomatedGa4ConfigurationOptOut without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11576,35 +11654,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest() - ); - request.enhancedMeasurementSettings ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest', - ['enhancedMeasurementSettings', 'name'] + new protos.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest() ); - request.enhancedMeasurementSettings.name = defaultValue1; - const expectedHeaderRequestParams = `enhanced_measurement_settings.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.EnhancedMeasurementSettings() + new protos.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse() ); - client.innerApiCalls.updateEnhancedMeasurementSettings = + client.innerApiCalls.setAutomatedGa4ConfigurationOptOut = stubSimpleCall(expectedResponse); - const [response] = await client.updateEnhancedMeasurementSettings( + const [response] = await client.setAutomatedGa4ConfigurationOptOut( request ); assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateEnhancedMeasurementSettings as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateEnhancedMeasurementSettings as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateEnhancedMeasurementSettings without error using callback', async () => { + it('invokes setAutomatedGa4ConfigurationOptOut without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11612,26 +11675,19 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest() - ); - request.enhancedMeasurementSettings ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest', - ['enhancedMeasurementSettings', 'name'] + new protos.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest() ); - request.enhancedMeasurementSettings.name = defaultValue1; - const expectedHeaderRequestParams = `enhanced_measurement_settings.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.EnhancedMeasurementSettings() + new protos.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutResponse() ); - client.innerApiCalls.updateEnhancedMeasurementSettings = + client.innerApiCalls.setAutomatedGa4ConfigurationOptOut = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.updateEnhancedMeasurementSettings( + client.setAutomatedGa4ConfigurationOptOut( request, ( err?: Error | null, - result?: protos.google.analytics.admin.v1alpha.IEnhancedMeasurementSettings | null + result?: protos.google.analytics.admin.v1alpha.ISetAutomatedGa4ConfigurationOptOutResponse | null ) => { if (err) { reject(err); @@ -11643,17 +11699,9 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateEnhancedMeasurementSettings as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateEnhancedMeasurementSettings as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateEnhancedMeasurementSettings with error', async () => { + it('invokes setAutomatedGa4ConfigurationOptOut with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11661,35 +11709,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest() - ); - request.enhancedMeasurementSettings ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest', - ['enhancedMeasurementSettings', 'name'] + new protos.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest() ); - request.enhancedMeasurementSettings.name = defaultValue1; - const expectedHeaderRequestParams = `enhanced_measurement_settings.name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.updateEnhancedMeasurementSettings = stubSimpleCall( + client.innerApiCalls.setAutomatedGa4ConfigurationOptOut = stubSimpleCall( undefined, expectedError ); await assert.rejects( - client.updateEnhancedMeasurementSettings(request), + client.setAutomatedGa4ConfigurationOptOut(request), expectedError ); - const actualRequest = ( - client.innerApiCalls.updateEnhancedMeasurementSettings as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateEnhancedMeasurementSettings as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateEnhancedMeasurementSettings with closed client', async () => { + it('invokes setAutomatedGa4ConfigurationOptOut with closed client', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11697,25 +11730,19 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest() - ); - request.enhancedMeasurementSettings ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest', - ['enhancedMeasurementSettings', 'name'] + new protos.google.analytics.admin.v1alpha.SetAutomatedGa4ConfigurationOptOutRequest() ); - request.enhancedMeasurementSettings.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( - client.updateEnhancedMeasurementSettings(request), + client.setAutomatedGa4ConfigurationOptOut(request), expectedError ); }); }); - describe('createConnectedSiteTag', () => { - it('invokes createConnectedSiteTag without error', async () => { + describe('fetchAutomatedGa4ConfigurationOptOut', () => { + it('invokes fetchAutomatedGa4ConfigurationOptOut without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11723,18 +11750,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest() + new protos.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest() ); const expectedResponse = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse() + new protos.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse() ); - client.innerApiCalls.createConnectedSiteTag = + client.innerApiCalls.fetchAutomatedGa4ConfigurationOptOut = stubSimpleCall(expectedResponse); - const [response] = await client.createConnectedSiteTag(request); + const [response] = await client.fetchAutomatedGa4ConfigurationOptOut( + request + ); assert.deepStrictEqual(response, expectedResponse); }); - it('invokes createConnectedSiteTag without error using callback', async () => { + it('invokes fetchAutomatedGa4ConfigurationOptOut without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11742,19 +11771,19 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest() + new protos.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest() ); const expectedResponse = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse() + new protos.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutResponse() ); - client.innerApiCalls.createConnectedSiteTag = + client.innerApiCalls.fetchAutomatedGa4ConfigurationOptOut = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.createConnectedSiteTag( + client.fetchAutomatedGa4ConfigurationOptOut( request, ( err?: Error | null, - result?: protos.google.analytics.admin.v1alpha.ICreateConnectedSiteTagResponse | null + result?: protos.google.analytics.admin.v1alpha.IFetchAutomatedGa4ConfigurationOptOutResponse | null ) => { if (err) { reject(err); @@ -11768,7 +11797,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { assert.deepStrictEqual(response, expectedResponse); }); - it('invokes createConnectedSiteTag with error', async () => { + it('invokes fetchAutomatedGa4ConfigurationOptOut with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11776,20 +11805,18 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest() + new protos.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest() ); const expectedError = new Error('expected'); - client.innerApiCalls.createConnectedSiteTag = stubSimpleCall( - undefined, - expectedError - ); + client.innerApiCalls.fetchAutomatedGa4ConfigurationOptOut = + stubSimpleCall(undefined, expectedError); await assert.rejects( - client.createConnectedSiteTag(request), + client.fetchAutomatedGa4ConfigurationOptOut(request), expectedError ); }); - it('invokes createConnectedSiteTag with closed client', async () => { + it('invokes fetchAutomatedGa4ConfigurationOptOut with closed client', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11797,19 +11824,19 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest() + new protos.google.analytics.admin.v1alpha.FetchAutomatedGa4ConfigurationOptOutRequest() ); const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( - client.createConnectedSiteTag(request), + client.fetchAutomatedGa4ConfigurationOptOut(request), expectedError ); }); }); - describe('deleteConnectedSiteTag', () => { - it('invokes deleteConnectedSiteTag without error', async () => { + describe('getBigQueryLink', () => { + it('invokes getBigQueryLink without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11817,18 +11844,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest() + new protos.google.analytics.admin.v1alpha.GetBigQueryLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetBigQueryLinkRequest', + ['name'] ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() + new protos.google.analytics.admin.v1alpha.BigQueryLink() ); - client.innerApiCalls.deleteConnectedSiteTag = - stubSimpleCall(expectedResponse); - const [response] = await client.deleteConnectedSiteTag(request); + client.innerApiCalls.getBigQueryLink = stubSimpleCall(expectedResponse); + const [response] = await client.getBigQueryLink(request); assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getBigQueryLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBigQueryLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteConnectedSiteTag without error using callback', async () => { + it('invokes getBigQueryLink without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11836,19 +11876,25 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest() + new protos.google.analytics.admin.v1alpha.GetBigQueryLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetBigQueryLinkRequest', + ['name'] ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() + new protos.google.analytics.admin.v1alpha.BigQueryLink() ); - client.innerApiCalls.deleteConnectedSiteTag = + client.innerApiCalls.getBigQueryLink = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.deleteConnectedSiteTag( + client.getBigQueryLink( request, ( err?: Error | null, - result?: protos.google.protobuf.IEmpty | null + result?: protos.google.analytics.admin.v1alpha.IBigQueryLink | null ) => { if (err) { reject(err); @@ -11860,9 +11906,17 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getBigQueryLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBigQueryLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteConnectedSiteTag with error', async () => { + it('invokes getBigQueryLink with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11870,20 +11924,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest() + new protos.google.analytics.admin.v1alpha.GetBigQueryLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetBigQueryLinkRequest', + ['name'] ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.deleteConnectedSiteTag = stubSimpleCall( + client.innerApiCalls.getBigQueryLink = stubSimpleCall( undefined, expectedError ); - await assert.rejects( - client.deleteConnectedSiteTag(request), - expectedError - ); + await assert.rejects(client.getBigQueryLink(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getBigQueryLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBigQueryLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteConnectedSiteTag with closed client', async () => { + it('invokes getBigQueryLink with closed client', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11891,19 +11956,21 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest() + new protos.google.analytics.admin.v1alpha.GetBigQueryLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetBigQueryLinkRequest', + ['name'] ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); - await assert.rejects( - client.deleteConnectedSiteTag(request), - expectedError - ); + await assert.rejects(client.getBigQueryLink(request), expectedError); }); }); - describe('listConnectedSiteTags', () => { - it('invokes listConnectedSiteTags without error', async () => { + describe('getEnhancedMeasurementSettings', () => { + it('invokes getEnhancedMeasurementSettings without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11911,18 +11978,32 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest() + new protos.google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest', + ['name'] ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse() + new protos.google.analytics.admin.v1alpha.EnhancedMeasurementSettings() ); - client.innerApiCalls.listConnectedSiteTags = + client.innerApiCalls.getEnhancedMeasurementSettings = stubSimpleCall(expectedResponse); - const [response] = await client.listConnectedSiteTags(request); + const [response] = await client.getEnhancedMeasurementSettings(request); assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getEnhancedMeasurementSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getEnhancedMeasurementSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listConnectedSiteTags without error using callback', async () => { + it('invokes getEnhancedMeasurementSettings without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11930,19 +12011,25 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest() + new protos.google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest', + ['name'] ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse() + new protos.google.analytics.admin.v1alpha.EnhancedMeasurementSettings() ); - client.innerApiCalls.listConnectedSiteTags = + client.innerApiCalls.getEnhancedMeasurementSettings = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listConnectedSiteTags( + client.getEnhancedMeasurementSettings( request, ( err?: Error | null, - result?: protos.google.analytics.admin.v1alpha.IListConnectedSiteTagsResponse | null + result?: protos.google.analytics.admin.v1alpha.IEnhancedMeasurementSettings | null ) => { if (err) { reject(err); @@ -11954,9 +12041,17 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getEnhancedMeasurementSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getEnhancedMeasurementSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listConnectedSiteTags with error', async () => { + it('invokes getEnhancedMeasurementSettings with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11964,20 +12059,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest() + new protos.google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest', + ['name'] ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listConnectedSiteTags = stubSimpleCall( + client.innerApiCalls.getEnhancedMeasurementSettings = stubSimpleCall( undefined, expectedError ); await assert.rejects( - client.listConnectedSiteTags(request), + client.getEnhancedMeasurementSettings(request), expectedError ); + const actualRequest = ( + client.innerApiCalls.getEnhancedMeasurementSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getEnhancedMeasurementSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listConnectedSiteTags with closed client', async () => { + it('invokes getEnhancedMeasurementSettings with closed client', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -11985,19 +12094,2234 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest() + new protos.google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest() ); - const expectedError = new Error('The client has already been closed.'); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( - client.listConnectedSiteTags(request), + client.getEnhancedMeasurementSettings(request), + expectedError + ); + }); + }); + + describe('updateEnhancedMeasurementSettings', () => { + it('invokes updateEnhancedMeasurementSettings without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest() + ); + request.enhancedMeasurementSettings ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest', + ['enhancedMeasurementSettings', 'name'] + ); + request.enhancedMeasurementSettings.name = defaultValue1; + const expectedHeaderRequestParams = `enhanced_measurement_settings.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.EnhancedMeasurementSettings() + ); + client.innerApiCalls.updateEnhancedMeasurementSettings = + stubSimpleCall(expectedResponse); + const [response] = await client.updateEnhancedMeasurementSettings( + request + ); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateEnhancedMeasurementSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateEnhancedMeasurementSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateEnhancedMeasurementSettings without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest() + ); + request.enhancedMeasurementSettings ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest', + ['enhancedMeasurementSettings', 'name'] + ); + request.enhancedMeasurementSettings.name = defaultValue1; + const expectedHeaderRequestParams = `enhanced_measurement_settings.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.EnhancedMeasurementSettings() + ); + client.innerApiCalls.updateEnhancedMeasurementSettings = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateEnhancedMeasurementSettings( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IEnhancedMeasurementSettings | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateEnhancedMeasurementSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateEnhancedMeasurementSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateEnhancedMeasurementSettings with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest() + ); + request.enhancedMeasurementSettings ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest', + ['enhancedMeasurementSettings', 'name'] + ); + request.enhancedMeasurementSettings.name = defaultValue1; + const expectedHeaderRequestParams = `enhanced_measurement_settings.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateEnhancedMeasurementSettings = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.updateEnhancedMeasurementSettings(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.updateEnhancedMeasurementSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateEnhancedMeasurementSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateEnhancedMeasurementSettings with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest() + ); + request.enhancedMeasurementSettings ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest', + ['enhancedMeasurementSettings', 'name'] + ); + request.enhancedMeasurementSettings.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.updateEnhancedMeasurementSettings(request), + expectedError + ); + }); + }); + + describe('createConnectedSiteTag', () => { + it('invokes createConnectedSiteTag without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse() + ); + client.innerApiCalls.createConnectedSiteTag = + stubSimpleCall(expectedResponse); + const [response] = await client.createConnectedSiteTag(request); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes createConnectedSiteTag without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse() + ); + client.innerApiCalls.createConnectedSiteTag = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createConnectedSiteTag( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.ICreateConnectedSiteTagResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes createConnectedSiteTag with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.createConnectedSiteTag = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.createConnectedSiteTag(request), + expectedError + ); + }); + + it('invokes createConnectedSiteTag with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.createConnectedSiteTag(request), expectedError ); }); }); - describe('listAccounts', () => { - it('invokes listAccounts without error', async () => { + describe('deleteConnectedSiteTag', () => { + it('invokes deleteConnectedSiteTag without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteConnectedSiteTag = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteConnectedSiteTag(request); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes deleteConnectedSiteTag without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteConnectedSiteTag = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteConnectedSiteTag( + 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); + }); + + it('invokes deleteConnectedSiteTag with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.deleteConnectedSiteTag = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.deleteConnectedSiteTag(request), + expectedError + ); + }); + + it('invokes deleteConnectedSiteTag with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.deleteConnectedSiteTag(request), + expectedError + ); + }); + }); + + describe('listConnectedSiteTags', () => { + it('invokes listConnectedSiteTags without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse() + ); + client.innerApiCalls.listConnectedSiteTags = + stubSimpleCall(expectedResponse); + const [response] = await client.listConnectedSiteTags(request); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes listConnectedSiteTags without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse() + ); + client.innerApiCalls.listConnectedSiteTags = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listConnectedSiteTags( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IListConnectedSiteTagsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes listConnectedSiteTags with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.listConnectedSiteTags = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listConnectedSiteTags(request), + expectedError + ); + }); + + it('invokes listConnectedSiteTags with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.listConnectedSiteTags(request), + expectedError + ); + }); + }); + + describe('fetchConnectedGa4Property', () => { + it('invokes fetchConnectedGa4Property without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse() + ); + client.innerApiCalls.fetchConnectedGa4Property = + stubSimpleCall(expectedResponse); + const [response] = await client.fetchConnectedGa4Property(request); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes fetchConnectedGa4Property without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.FetchConnectedGa4PropertyResponse() + ); + client.innerApiCalls.fetchConnectedGa4Property = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchConnectedGa4Property( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IFetchConnectedGa4PropertyResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes fetchConnectedGa4Property with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.fetchConnectedGa4Property = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.fetchConnectedGa4Property(request), + expectedError + ); + }); + + it('invokes fetchConnectedGa4Property with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.FetchConnectedGa4PropertyRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.fetchConnectedGa4Property(request), + expectedError + ); + }); + }); + + describe('getAdSenseLink', () => { + it('invokes getAdSenseLink without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetAdSenseLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetAdSenseLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AdSenseLink() + ); + client.innerApiCalls.getAdSenseLink = stubSimpleCall(expectedResponse); + const [response] = await client.getAdSenseLink(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getAdSenseLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAdSenseLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAdSenseLink without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetAdSenseLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetAdSenseLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AdSenseLink() + ); + client.innerApiCalls.getAdSenseLink = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAdSenseLink( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IAdSenseLink | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getAdSenseLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAdSenseLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAdSenseLink with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetAdSenseLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetAdSenseLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAdSenseLink = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getAdSenseLink(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getAdSenseLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAdSenseLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAdSenseLink with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetAdSenseLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetAdSenseLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getAdSenseLink(request), expectedError); + }); + }); + + describe('createAdSenseLink', () => { + it('invokes createAdSenseLink without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateAdSenseLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateAdSenseLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AdSenseLink() + ); + client.innerApiCalls.createAdSenseLink = stubSimpleCall(expectedResponse); + const [response] = await client.createAdSenseLink(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createAdSenseLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAdSenseLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAdSenseLink without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateAdSenseLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateAdSenseLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AdSenseLink() + ); + client.innerApiCalls.createAdSenseLink = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createAdSenseLink( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IAdSenseLink | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createAdSenseLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAdSenseLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAdSenseLink with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateAdSenseLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateAdSenseLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAdSenseLink = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createAdSenseLink(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createAdSenseLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAdSenseLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAdSenseLink with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateAdSenseLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateAdSenseLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createAdSenseLink(request), expectedError); + }); + }); + + describe('deleteAdSenseLink', () => { + it('invokes deleteAdSenseLink without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteAdSenseLink = stubSimpleCall(expectedResponse); + const [response] = await client.deleteAdSenseLink(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteAdSenseLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAdSenseLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAdSenseLink without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteAdSenseLink = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteAdSenseLink( + 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.deleteAdSenseLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAdSenseLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAdSenseLink with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAdSenseLink = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteAdSenseLink(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteAdSenseLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAdSenseLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAdSenseLink with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteAdSenseLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteAdSenseLink(request), expectedError); + }); + }); + + describe('getEventCreateRule', () => { + it('invokes getEventCreateRule without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetEventCreateRuleRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetEventCreateRuleRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.EventCreateRule() + ); + client.innerApiCalls.getEventCreateRule = + stubSimpleCall(expectedResponse); + const [response] = await client.getEventCreateRule(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getEventCreateRule as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getEventCreateRule as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEventCreateRule without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetEventCreateRuleRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetEventCreateRuleRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.EventCreateRule() + ); + client.innerApiCalls.getEventCreateRule = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getEventCreateRule( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IEventCreateRule | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getEventCreateRule as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getEventCreateRule as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEventCreateRule with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetEventCreateRuleRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetEventCreateRuleRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getEventCreateRule = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getEventCreateRule(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getEventCreateRule as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getEventCreateRule as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEventCreateRule with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetEventCreateRuleRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetEventCreateRuleRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getEventCreateRule(request), expectedError); + }); + }); + + describe('createEventCreateRule', () => { + it('invokes createEventCreateRule without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateEventCreateRuleRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateEventCreateRuleRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.EventCreateRule() + ); + client.innerApiCalls.createEventCreateRule = + stubSimpleCall(expectedResponse); + const [response] = await client.createEventCreateRule(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createEventCreateRule as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createEventCreateRule as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createEventCreateRule without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateEventCreateRuleRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateEventCreateRuleRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.EventCreateRule() + ); + client.innerApiCalls.createEventCreateRule = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createEventCreateRule( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IEventCreateRule | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createEventCreateRule as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createEventCreateRule as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createEventCreateRule with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateEventCreateRuleRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateEventCreateRuleRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createEventCreateRule = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.createEventCreateRule(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.createEventCreateRule as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createEventCreateRule as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createEventCreateRule with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateEventCreateRuleRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateEventCreateRuleRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.createEventCreateRule(request), + expectedError + ); + }); + }); + + describe('updateEventCreateRule', () => { + it('invokes updateEventCreateRule without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest() + ); + request.eventCreateRule ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest', + ['eventCreateRule', 'name'] + ); + request.eventCreateRule.name = defaultValue1; + const expectedHeaderRequestParams = `event_create_rule.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.EventCreateRule() + ); + client.innerApiCalls.updateEventCreateRule = + stubSimpleCall(expectedResponse); + const [response] = await client.updateEventCreateRule(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateEventCreateRule as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateEventCreateRule as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateEventCreateRule without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest() + ); + request.eventCreateRule ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest', + ['eventCreateRule', 'name'] + ); + request.eventCreateRule.name = defaultValue1; + const expectedHeaderRequestParams = `event_create_rule.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.EventCreateRule() + ); + client.innerApiCalls.updateEventCreateRule = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateEventCreateRule( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IEventCreateRule | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateEventCreateRule as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateEventCreateRule as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateEventCreateRule with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest() + ); + request.eventCreateRule ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest', + ['eventCreateRule', 'name'] + ); + request.eventCreateRule.name = defaultValue1; + const expectedHeaderRequestParams = `event_create_rule.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateEventCreateRule = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.updateEventCreateRule(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.updateEventCreateRule as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateEventCreateRule as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateEventCreateRule with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest() + ); + request.eventCreateRule ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateEventCreateRuleRequest', + ['eventCreateRule', 'name'] + ); + request.eventCreateRule.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.updateEventCreateRule(request), + expectedError + ); + }); + }); + + describe('deleteEventCreateRule', () => { + it('invokes deleteEventCreateRule without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteEventCreateRule = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteEventCreateRule(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteEventCreateRule as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteEventCreateRule as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteEventCreateRule without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteEventCreateRule = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteEventCreateRule( + 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.deleteEventCreateRule as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteEventCreateRule as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteEventCreateRule with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteEventCreateRule = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.deleteEventCreateRule(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.deleteEventCreateRule as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteEventCreateRule as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteEventCreateRule with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteEventCreateRuleRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.deleteEventCreateRule(request), + expectedError + ); + }); + }); + + describe('listAccounts', () => { + it('invokes listAccounts without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + ]; + client.innerApiCalls.listAccounts = stubSimpleCall(expectedResponse); + const [response] = await client.listAccounts(request); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes listAccounts without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + ]; + client.innerApiCalls.listAccounts = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAccounts( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IAccount[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes listAccounts with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.listAccounts = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listAccounts(request), expectedError); + }); + + it('invokes listAccountsStream without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + ]; + client.descriptors.page.listAccounts.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listAccountsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.Account[] = []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1alpha.Account) => { + 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.listAccounts.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAccounts, request) + ); + }); + + it('invokes listAccountsStream with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listAccounts.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listAccountsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.Account[] = []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1alpha.Account) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listAccounts.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAccounts, request) + ); + }); + + it('uses async iteration with listAccounts without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + ]; + client.descriptors.page.listAccounts.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.admin.v1alpha.IAccount[] = []; + const iterable = client.listAccountsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listAccounts.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + + it('uses async iteration with listAccounts with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listAccounts.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAccountsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.admin.v1alpha.IAccount[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listAccounts.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); + + describe('listAccountSummaries', () => { + it('invokes listAccountSummaries without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + ]; + client.innerApiCalls.listAccountSummaries = + stubSimpleCall(expectedResponse); + const [response] = await client.listAccountSummaries(request); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes listAccountSummaries without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + ]; + client.innerApiCalls.listAccountSummaries = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAccountSummaries( + request, + ( + err?: Error | null, + result?: + | protos.google.analytics.admin.v1alpha.IAccountSummary[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes listAccountSummaries with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.listAccountSummaries = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listAccountSummaries(request), expectedError); + }); + + it('invokes listAccountSummariesStream without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + ]; + client.descriptors.page.listAccountSummaries.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listAccountSummariesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.AccountSummary[] = + []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1alpha.AccountSummary) => { + 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.listAccountSummaries.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAccountSummaries, request) + ); + }); + + it('invokes listAccountSummariesStream with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listAccountSummaries.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listAccountSummariesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.AccountSummary[] = + []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1alpha.AccountSummary) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listAccountSummaries.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAccountSummaries, request) + ); + }); + + it('uses async iteration with listAccountSummaries without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + ]; + client.descriptors.page.listAccountSummaries.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.admin.v1alpha.IAccountSummary[] = + []; + const iterable = client.listAccountSummariesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listAccountSummaries.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + + it('uses async iteration with listAccountSummaries with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listAccountSummaries.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAccountSummariesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.admin.v1alpha.IAccountSummary[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listAccountSummaries.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); + + describe('listProperties', () => { + it('invokes listProperties without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ), + ]; + client.innerApiCalls.listProperties = stubSimpleCall(expectedResponse); + const [response] = await client.listProperties(request); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes listProperties without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ), + ]; + client.innerApiCalls.listProperties = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listProperties( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IProperty[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes listProperties with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.listProperties = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listProperties(request), expectedError); + }); + + it('invokes listPropertiesStream without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ), + ]; + client.descriptors.page.listProperties.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listPropertiesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.Property[] = []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1alpha.Property) => { + 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.listProperties.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listProperties, request) + ); + }); + + it('invokes listPropertiesStream with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listProperties.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listPropertiesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.Property[] = []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1alpha.Property) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listProperties.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listProperties, request) + ); + }); + + it('uses async iteration with listProperties without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ), + ]; + client.descriptors.page.listProperties.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.admin.v1alpha.IProperty[] = []; + const iterable = client.listPropertiesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listProperties.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + + it('uses async iteration with listProperties with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listProperties.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listPropertiesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.admin.v1alpha.IProperty[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listProperties.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); + + describe('listUserLinks', () => { + it('invokes listUserLinks without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12005,25 +14329,39 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListUserLinksRequest', + ['parent'] ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Account() + new protos.google.analytics.admin.v1alpha.UserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Account() + new protos.google.analytics.admin.v1alpha.UserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Account() + new protos.google.analytics.admin.v1alpha.UserLink() ), ]; - client.innerApiCalls.listAccounts = stubSimpleCall(expectedResponse); - const [response] = await client.listAccounts(request); + client.innerApiCalls.listUserLinks = stubSimpleCall(expectedResponse); + const [response] = await client.listUserLinks(request); assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listUserLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listUserLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listAccounts without error using callback', async () => { + it('invokes listUserLinks without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12031,27 +14369,33 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Account() + new protos.google.analytics.admin.v1alpha.UserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Account() + new protos.google.analytics.admin.v1alpha.UserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Account() + new protos.google.analytics.admin.v1alpha.UserLink() ), ]; - client.innerApiCalls.listAccounts = + client.innerApiCalls.listUserLinks = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listAccounts( + client.listUserLinks( request, ( err?: Error | null, - result?: protos.google.analytics.admin.v1alpha.IAccount[] | null + result?: protos.google.analytics.admin.v1alpha.IUserLink[] | null ) => { if (err) { reject(err); @@ -12063,9 +14407,17 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listUserLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listUserLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listAccounts with error', async () => { + it('invokes listUserLinks with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12073,17 +14425,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListUserLinksRequest', + ['parent'] ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listAccounts = stubSimpleCall( + client.innerApiCalls.listUserLinks = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listAccounts(request), expectedError); + await assert.rejects(client.listUserLinks(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listUserLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listUserLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listAccountsStream without error', async () => { + it('invokes listUserLinksStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12091,27 +14457,33 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListUserLinksRequest', + ['parent'] ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Account() + new protos.google.analytics.admin.v1alpha.UserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Account() + new protos.google.analytics.admin.v1alpha.UserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Account() + new protos.google.analytics.admin.v1alpha.UserLink() ), ]; - client.descriptors.page.listAccounts.createStream = + client.descriptors.page.listUserLinks.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listAccountsStream(request); + const stream = client.listUserLinksStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.Account[] = []; + const responses: protos.google.analytics.admin.v1alpha.UserLink[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.Account) => { + (response: protos.google.analytics.admin.v1alpha.UserLink) => { responses.push(response); } ); @@ -12125,13 +14497,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listAccounts.createStream as SinonStub) + (client.descriptors.page.listUserLinks.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listAccounts, request) + .calledWith(client.innerApiCalls.listUserLinks, request) + ); + assert( + (client.descriptors.page.listUserLinks.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); - it('invokes listAccountsStream with error', async () => { + it('invokes listUserLinksStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12139,19 +14518,23 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() ); - const expectedError = new Error('expected'); - client.descriptors.page.listAccounts.createStream = stubPageStreamingCall( - undefined, - expectedError + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListUserLinksRequest', + ['parent'] ); - const stream = client.listAccountsStream(request); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listUserLinks.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listUserLinksStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.Account[] = []; + const responses: protos.google.analytics.admin.v1alpha.UserLink[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.Account) => { + (response: protos.google.analytics.admin.v1alpha.UserLink) => { responses.push(response); } ); @@ -12164,13 +14547,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listAccounts.createStream as SinonStub) + (client.descriptors.page.listUserLinks.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listAccounts, request) + .calledWith(client.innerApiCalls.listUserLinks, request) + ); + assert( + (client.descriptors.page.listUserLinks.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); - it('uses async iteration with listAccounts without error', async () => { + it('uses async iteration with listUserLinks without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12178,36 +14568,49 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Account() + new protos.google.analytics.admin.v1alpha.UserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Account() + new protos.google.analytics.admin.v1alpha.UserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Account() + new protos.google.analytics.admin.v1alpha.UserLink() ), ]; - client.descriptors.page.listAccounts.asyncIterate = + client.descriptors.page.listUserLinks.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.IAccount[] = []; - const iterable = client.listAccountsAsync(request); + const responses: protos.google.analytics.admin.v1alpha.IUserLink[] = []; + const iterable = client.listUserLinksAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listAccounts.asyncIterate as SinonStub + client.descriptors.page.listUserLinks.asyncIterate as SinonStub ).getCall(0).args[1], request ); + assert( + (client.descriptors.page.listUserLinks.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); }); - it('uses async iteration with listAccounts with error', async () => { + it('uses async iteration with listUserLinks with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12215,29 +14618,42 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListUserLinksRequest', + ['parent'] ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listAccounts.asyncIterate = + client.descriptors.page.listUserLinks.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listAccountsAsync(request); + const iterable = client.listUserLinksAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.IAccount[] = []; + const responses: protos.google.analytics.admin.v1alpha.IUserLink[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( ( - client.descriptors.page.listAccounts.asyncIterate as SinonStub + client.descriptors.page.listUserLinks.asyncIterate as SinonStub ).getCall(0).args[1], request ); + assert( + (client.descriptors.page.listUserLinks.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); }); }); - describe('listAccountSummaries', () => { - it('invokes listAccountSummaries without error', async () => { + describe('auditUserLinks', () => { + it('invokes auditUserLinks without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12245,26 +14661,39 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + ['parent'] ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccountSummary() + new protos.google.analytics.admin.v1alpha.AuditUserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccountSummary() + new protos.google.analytics.admin.v1alpha.AuditUserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccountSummary() + new protos.google.analytics.admin.v1alpha.AuditUserLink() ), ]; - client.innerApiCalls.listAccountSummaries = - stubSimpleCall(expectedResponse); - const [response] = await client.listAccountSummaries(request); + client.innerApiCalls.auditUserLinks = stubSimpleCall(expectedResponse); + const [response] = await client.auditUserLinks(request); assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.auditUserLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.auditUserLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listAccountSummaries without error using callback', async () => { + it('invokes auditUserLinks without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12272,28 +14701,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + ['parent'] ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccountSummary() + new protos.google.analytics.admin.v1alpha.AuditUserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccountSummary() + new protos.google.analytics.admin.v1alpha.AuditUserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccountSummary() + new protos.google.analytics.admin.v1alpha.AuditUserLink() ), ]; - client.innerApiCalls.listAccountSummaries = + client.innerApiCalls.auditUserLinks = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listAccountSummaries( + client.auditUserLinks( request, ( err?: Error | null, result?: - | protos.google.analytics.admin.v1alpha.IAccountSummary[] + | protos.google.analytics.admin.v1alpha.IAuditUserLink[] | null ) => { if (err) { @@ -12306,9 +14741,17 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.auditUserLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.auditUserLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listAccountSummaries with error', async () => { + it('invokes auditUserLinks with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12316,17 +14759,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + ['parent'] ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listAccountSummaries = stubSimpleCall( + client.innerApiCalls.auditUserLinks = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listAccountSummaries(request), expectedError); + await assert.rejects(client.auditUserLinks(request), expectedError); + const actualRequest = ( + client.innerApiCalls.auditUserLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.auditUserLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listAccountSummariesStream without error', async () => { + it('invokes auditUserLinksStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12334,28 +14791,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + ['parent'] ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccountSummary() + new protos.google.analytics.admin.v1alpha.AuditUserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccountSummary() + new protos.google.analytics.admin.v1alpha.AuditUserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccountSummary() + new protos.google.analytics.admin.v1alpha.AuditUserLink() ), ]; - client.descriptors.page.listAccountSummaries.createStream = + client.descriptors.page.auditUserLinks.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listAccountSummariesStream(request); + const stream = client.auditUserLinksStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.AccountSummary[] = + const responses: protos.google.analytics.admin.v1alpha.AuditUserLink[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.AccountSummary) => { + (response: protos.google.analytics.admin.v1alpha.AuditUserLink) => { responses.push(response); } ); @@ -12369,13 +14832,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listAccountSummaries.createStream as SinonStub) + (client.descriptors.page.auditUserLinks.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listAccountSummaries, request) + .calledWith(client.innerApiCalls.auditUserLinks, request) + ); + assert( + (client.descriptors.page.auditUserLinks.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); - it('invokes listAccountSummariesStream with error', async () => { + it('invokes auditUserLinksStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12383,18 +14853,24 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + ['parent'] ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listAccountSummaries.createStream = + client.descriptors.page.auditUserLinks.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listAccountSummariesStream(request); + const stream = client.auditUserLinksStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.AccountSummary[] = + const responses: protos.google.analytics.admin.v1alpha.AuditUserLink[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.AccountSummary) => { + (response: protos.google.analytics.admin.v1alpha.AuditUserLink) => { responses.push(response); } ); @@ -12407,13 +14883,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listAccountSummaries.createStream as SinonStub) + (client.descriptors.page.auditUserLinks.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listAccountSummaries, request) + .calledWith(client.innerApiCalls.auditUserLinks, request) + ); + assert( + (client.descriptors.page.auditUserLinks.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); - it('uses async iteration with listAccountSummaries without error', async () => { + it('uses async iteration with auditUserLinks without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12421,37 +14904,50 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + ['parent'] ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccountSummary() + new protos.google.analytics.admin.v1alpha.AuditUserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccountSummary() + new protos.google.analytics.admin.v1alpha.AuditUserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccountSummary() + new protos.google.analytics.admin.v1alpha.AuditUserLink() ), ]; - client.descriptors.page.listAccountSummaries.asyncIterate = + client.descriptors.page.auditUserLinks.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.IAccountSummary[] = + const responses: protos.google.analytics.admin.v1alpha.IAuditUserLink[] = []; - const iterable = client.listAccountSummariesAsync(request); + const iterable = client.auditUserLinksAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listAccountSummaries.asyncIterate as SinonStub + client.descriptors.page.auditUserLinks.asyncIterate as SinonStub ).getCall(0).args[1], request ); + assert( + (client.descriptors.page.auditUserLinks.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); }); - it('uses async iteration with listAccountSummaries with error', async () => { + it('uses async iteration with auditUserLinks with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12459,14 +14955,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + ['parent'] ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listAccountSummaries.asyncIterate = + client.descriptors.page.auditUserLinks.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listAccountSummariesAsync(request); + const iterable = client.auditUserLinksAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.IAccountSummary[] = + const responses: protos.google.analytics.admin.v1alpha.IAuditUserLink[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -12474,15 +14976,22 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listAccountSummaries.asyncIterate as SinonStub + client.descriptors.page.auditUserLinks.asyncIterate as SinonStub ).getCall(0).args[1], request ); + assert( + (client.descriptors.page.auditUserLinks.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); }); }); - describe('listProperties', () => { - it('invokes listProperties without error', async () => { + describe('listFirebaseLinks', () => { + it('invokes listFirebaseLinks without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12490,25 +14999,39 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() + new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', + ['parent'] ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Property() + new protos.google.analytics.admin.v1alpha.FirebaseLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Property() + new protos.google.analytics.admin.v1alpha.FirebaseLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Property() + new protos.google.analytics.admin.v1alpha.FirebaseLink() ), ]; - client.innerApiCalls.listProperties = stubSimpleCall(expectedResponse); - const [response] = await client.listProperties(request); + client.innerApiCalls.listFirebaseLinks = stubSimpleCall(expectedResponse); + const [response] = await client.listFirebaseLinks(request); assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listFirebaseLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listFirebaseLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listProperties without error using callback', async () => { + it('invokes listFirebaseLinks without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12516,27 +15039,35 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() + new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', + ['parent'] ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Property() + new protos.google.analytics.admin.v1alpha.FirebaseLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Property() + new protos.google.analytics.admin.v1alpha.FirebaseLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Property() + new protos.google.analytics.admin.v1alpha.FirebaseLink() ), ]; - client.innerApiCalls.listProperties = + client.innerApiCalls.listFirebaseLinks = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listProperties( + client.listFirebaseLinks( request, ( err?: Error | null, - result?: protos.google.analytics.admin.v1alpha.IProperty[] | null + result?: + | protos.google.analytics.admin.v1alpha.IFirebaseLink[] + | null ) => { if (err) { reject(err); @@ -12548,9 +15079,17 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listFirebaseLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listFirebaseLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listProperties with error', async () => { + it('invokes listFirebaseLinks with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12558,17 +15097,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() + new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', + ['parent'] ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listProperties = stubSimpleCall( + client.innerApiCalls.listFirebaseLinks = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listProperties(request), expectedError); + await assert.rejects(client.listFirebaseLinks(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listFirebaseLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listFirebaseLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listPropertiesStream without error', async () => { + it('invokes listFirebaseLinksStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12576,27 +15129,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() + new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', + ['parent'] ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Property() + new protos.google.analytics.admin.v1alpha.FirebaseLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Property() + new protos.google.analytics.admin.v1alpha.FirebaseLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Property() + new protos.google.analytics.admin.v1alpha.FirebaseLink() ), ]; - client.descriptors.page.listProperties.createStream = + client.descriptors.page.listFirebaseLinks.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listPropertiesStream(request); + const stream = client.listFirebaseLinksStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.Property[] = []; + const responses: protos.google.analytics.admin.v1alpha.FirebaseLink[] = + []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.Property) => { + (response: protos.google.analytics.admin.v1alpha.FirebaseLink) => { responses.push(response); } ); @@ -12610,13 +15170,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listProperties.createStream as SinonStub) + (client.descriptors.page.listFirebaseLinks.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listProperties, request) + .calledWith(client.innerApiCalls.listFirebaseLinks, request) + ); + assert( + (client.descriptors.page.listFirebaseLinks.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); - it('invokes listPropertiesStream with error', async () => { + it('invokes listFirebaseLinksStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12624,17 +15191,24 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() + new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', + ['parent'] ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listProperties.createStream = + client.descriptors.page.listFirebaseLinks.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listPropertiesStream(request); + const stream = client.listFirebaseLinksStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.Property[] = []; + const responses: protos.google.analytics.admin.v1alpha.FirebaseLink[] = + []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.Property) => { + (response: protos.google.analytics.admin.v1alpha.FirebaseLink) => { responses.push(response); } ); @@ -12647,13 +15221,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listProperties.createStream as SinonStub) + (client.descriptors.page.listFirebaseLinks.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listProperties, request) + .calledWith(client.innerApiCalls.listFirebaseLinks, request) + ); + assert( + (client.descriptors.page.listFirebaseLinks.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); - it('uses async iteration with listProperties without error', async () => { + it('uses async iteration with listFirebaseLinks without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12661,36 +15242,50 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() + new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', + ['parent'] ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Property() + new protos.google.analytics.admin.v1alpha.FirebaseLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Property() + new protos.google.analytics.admin.v1alpha.FirebaseLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Property() + new protos.google.analytics.admin.v1alpha.FirebaseLink() ), ]; - client.descriptors.page.listProperties.asyncIterate = + client.descriptors.page.listFirebaseLinks.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.IProperty[] = []; - const iterable = client.listPropertiesAsync(request); + const responses: protos.google.analytics.admin.v1alpha.IFirebaseLink[] = + []; + const iterable = client.listFirebaseLinksAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listProperties.asyncIterate as SinonStub + client.descriptors.page.listFirebaseLinks.asyncIterate as SinonStub ).getCall(0).args[1], request ); + assert( + (client.descriptors.page.listFirebaseLinks.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); }); - it('uses async iteration with listProperties with error', async () => { + it('uses async iteration with listFirebaseLinks with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12698,29 +15293,43 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() + new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', + ['parent'] ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listProperties.asyncIterate = + client.descriptors.page.listFirebaseLinks.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listPropertiesAsync(request); + const iterable = client.listFirebaseLinksAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.IProperty[] = []; + const responses: protos.google.analytics.admin.v1alpha.IFirebaseLink[] = + []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( ( - client.descriptors.page.listProperties.asyncIterate as SinonStub + client.descriptors.page.listFirebaseLinks.asyncIterate as SinonStub ).getCall(0).args[1], request ); + assert( + (client.descriptors.page.listFirebaseLinks.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); }); }); - describe('listUserLinks', () => { - it('invokes listUserLinks without error', async () => { + describe('listGoogleAdsLinks', () => { + it('invokes listGoogleAdsLinks without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12728,39 +15337,40 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListUserLinksRequest', + '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.UserLink() + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.UserLink() + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.UserLink() + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() ), ]; - client.innerApiCalls.listUserLinks = stubSimpleCall(expectedResponse); - const [response] = await client.listUserLinks(request); + client.innerApiCalls.listGoogleAdsLinks = + stubSimpleCall(expectedResponse); + const [response] = await client.listGoogleAdsLinks(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listUserLinks as SinonStub + client.innerApiCalls.listGoogleAdsLinks as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listUserLinks as SinonStub + client.innerApiCalls.listGoogleAdsLinks as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listUserLinks without error using callback', async () => { + it('invokes listGoogleAdsLinks without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12768,33 +15378,35 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListUserLinksRequest', + '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.UserLink() + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.UserLink() + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.UserLink() + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() ), ]; - client.innerApiCalls.listUserLinks = + client.innerApiCalls.listGoogleAdsLinks = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listUserLinks( + client.listGoogleAdsLinks( request, ( err?: Error | null, - result?: protos.google.analytics.admin.v1alpha.IUserLink[] | null + result?: + | protos.google.analytics.admin.v1alpha.IGoogleAdsLink[] + | null ) => { if (err) { reject(err); @@ -12807,16 +15419,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listUserLinks as SinonStub + client.innerApiCalls.listGoogleAdsLinks as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listUserLinks as SinonStub + client.innerApiCalls.listGoogleAdsLinks as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listUserLinks with error', async () => { + it('invokes listGoogleAdsLinks with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12824,31 +15436,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListUserLinksRequest', + '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listUserLinks = stubSimpleCall( + client.innerApiCalls.listGoogleAdsLinks = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listUserLinks(request), expectedError); + await assert.rejects(client.listGoogleAdsLinks(request), expectedError); const actualRequest = ( - client.innerApiCalls.listUserLinks as SinonStub + client.innerApiCalls.listGoogleAdsLinks as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listUserLinks as SinonStub + client.innerApiCalls.listGoogleAdsLinks as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listUserLinksStream without error', async () => { + it('invokes listGoogleAdsLinksStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12856,33 +15468,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListUserLinksRequest', + '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.UserLink() + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.UserLink() + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.UserLink() + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() ), ]; - client.descriptors.page.listUserLinks.createStream = + client.descriptors.page.listGoogleAdsLinks.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listUserLinksStream(request); + const stream = client.listGoogleAdsLinksStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.UserLink[] = []; + const responses: protos.google.analytics.admin.v1alpha.GoogleAdsLink[] = + []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.UserLink) => { + (response: protos.google.analytics.admin.v1alpha.GoogleAdsLink) => { responses.push(response); } ); @@ -12896,12 +15509,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listUserLinks.createStream as SinonStub) + (client.descriptors.page.listGoogleAdsLinks.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listUserLinks, request) + .calledWith(client.innerApiCalls.listGoogleAdsLinks, request) ); assert( - (client.descriptors.page.listUserLinks.createStream as SinonStub) + (client.descriptors.page.listGoogleAdsLinks.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -12909,7 +15522,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('invokes listUserLinksStream with error', async () => { + it('invokes listGoogleAdsLinksStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12917,23 +15530,24 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListUserLinksRequest', + '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listUserLinks.createStream = + client.descriptors.page.listGoogleAdsLinks.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listUserLinksStream(request); + const stream = client.listGoogleAdsLinksStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.UserLink[] = []; + const responses: protos.google.analytics.admin.v1alpha.GoogleAdsLink[] = + []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.UserLink) => { + (response: protos.google.analytics.admin.v1alpha.GoogleAdsLink) => { responses.push(response); } ); @@ -12946,12 +15560,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listUserLinks.createStream as SinonStub) + (client.descriptors.page.listGoogleAdsLinks.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listUserLinks, request) + .calledWith(client.innerApiCalls.listGoogleAdsLinks, request) ); assert( - (client.descriptors.page.listUserLinks.createStream as SinonStub) + (client.descriptors.page.listGoogleAdsLinks.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -12959,7 +15573,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listUserLinks without error', async () => { + it('uses async iteration with listGoogleAdsLinks without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -12967,41 +15581,42 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListUserLinksRequest', + '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.UserLink() + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.UserLink() + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.UserLink() + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() ), ]; - client.descriptors.page.listUserLinks.asyncIterate = + client.descriptors.page.listGoogleAdsLinks.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.IUserLink[] = []; - const iterable = client.listUserLinksAsync(request); + const responses: protos.google.analytics.admin.v1alpha.IGoogleAdsLink[] = + []; + const iterable = client.listGoogleAdsLinksAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listUserLinks.asyncIterate as SinonStub + client.descriptors.page.listGoogleAdsLinks.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listUserLinks.asyncIterate as SinonStub) + (client.descriptors.page.listGoogleAdsLinks.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -13009,7 +15624,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listUserLinks with error', async () => { + it('uses async iteration with listGoogleAdsLinks with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13017,32 +15632,33 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListUserLinksRequest', + '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listUserLinks.asyncIterate = + client.descriptors.page.listGoogleAdsLinks.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listUserLinksAsync(request); + const iterable = client.listGoogleAdsLinksAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.IUserLink[] = []; + const responses: protos.google.analytics.admin.v1alpha.IGoogleAdsLink[] = + []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( ( - client.descriptors.page.listUserLinks.asyncIterate as SinonStub + client.descriptors.page.listGoogleAdsLinks.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listUserLinks.asyncIterate as SinonStub) + (client.descriptors.page.listGoogleAdsLinks.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -13051,8 +15667,8 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('auditUserLinks', () => { - it('invokes auditUserLinks without error', async () => { + describe('listMeasurementProtocolSecrets', () => { + it('invokes listMeasurementProtocolSecrets without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13060,39 +15676,40 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLink() + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLink() + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLink() + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() ), ]; - client.innerApiCalls.auditUserLinks = stubSimpleCall(expectedResponse); - const [response] = await client.auditUserLinks(request); + client.innerApiCalls.listMeasurementProtocolSecrets = + stubSimpleCall(expectedResponse); + const [response] = await client.listMeasurementProtocolSecrets(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.auditUserLinks as SinonStub + client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.auditUserLinks as SinonStub + client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes auditUserLinks without error using callback', async () => { + it('invokes listMeasurementProtocolSecrets without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13100,34 +15717,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLink() + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLink() + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLink() + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() ), ]; - client.innerApiCalls.auditUserLinks = + client.innerApiCalls.listMeasurementProtocolSecrets = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.auditUserLinks( + client.listMeasurementProtocolSecrets( request, ( err?: Error | null, result?: - | protos.google.analytics.admin.v1alpha.IAuditUserLink[] + | protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret[] | null ) => { if (err) { @@ -13141,16 +15758,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.auditUserLinks as SinonStub + client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.auditUserLinks as SinonStub + client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes auditUserLinks with error', async () => { + it('invokes listMeasurementProtocolSecrets with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13158,31 +15775,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.auditUserLinks = stubSimpleCall( + client.innerApiCalls.listMeasurementProtocolSecrets = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.auditUserLinks(request), expectedError); + await assert.rejects( + client.listMeasurementProtocolSecrets(request), + expectedError + ); const actualRequest = ( - client.innerApiCalls.auditUserLinks as SinonStub + client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.auditUserLinks as SinonStub + client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes auditUserLinksStream without error', async () => { + it('invokes listMeasurementProtocolSecretsStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13190,34 +15810,36 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLink() + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLink() + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLink() + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() ), ]; - client.descriptors.page.auditUserLinks.createStream = + client.descriptors.page.listMeasurementProtocolSecrets.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.auditUserLinksStream(request); + const stream = client.listMeasurementProtocolSecretsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.AuditUserLink[] = + const responses: protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.AuditUserLink) => { + ( + response: protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret + ) => { responses.push(response); } ); @@ -13231,12 +15853,21 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.auditUserLinks.createStream as SinonStub) + ( + client.descriptors.page.listMeasurementProtocolSecrets + .createStream as SinonStub + ) .getCall(0) - .calledWith(client.innerApiCalls.auditUserLinks, request) + .calledWith( + client.innerApiCalls.listMeasurementProtocolSecrets, + request + ) ); assert( - (client.descriptors.page.auditUserLinks.createStream as SinonStub) + ( + client.descriptors.page.listMeasurementProtocolSecrets + .createStream as SinonStub + ) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -13244,7 +15875,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('invokes auditUserLinksStream with error', async () => { + it('invokes listMeasurementProtocolSecretsStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13252,24 +15883,26 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.auditUserLinks.createStream = + client.descriptors.page.listMeasurementProtocolSecrets.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.auditUserLinksStream(request); + const stream = client.listMeasurementProtocolSecretsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.AuditUserLink[] = + const responses: protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.AuditUserLink) => { + ( + response: protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret + ) => { responses.push(response); } ); @@ -13282,12 +15915,21 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.auditUserLinks.createStream as SinonStub) + ( + client.descriptors.page.listMeasurementProtocolSecrets + .createStream as SinonStub + ) .getCall(0) - .calledWith(client.innerApiCalls.auditUserLinks, request) + .calledWith( + client.innerApiCalls.listMeasurementProtocolSecrets, + request + ) ); assert( - (client.descriptors.page.auditUserLinks.createStream as SinonStub) + ( + client.descriptors.page.listMeasurementProtocolSecrets + .createStream as SinonStub + ) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -13295,7 +15937,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with auditUserLinks without error', async () => { + it('uses async iteration with listMeasurementProtocolSecrets without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13303,42 +15945,46 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLink() + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLink() + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLink() + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() ), ]; - client.descriptors.page.auditUserLinks.asyncIterate = + client.descriptors.page.listMeasurementProtocolSecrets.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.IAuditUserLink[] = + const responses: protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret[] = []; - const iterable = client.auditUserLinksAsync(request); + const iterable = client.listMeasurementProtocolSecretsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.auditUserLinks.asyncIterate as SinonStub + client.descriptors.page.listMeasurementProtocolSecrets + .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.auditUserLinks.asyncIterate as SinonStub) + ( + client.descriptors.page.listMeasurementProtocolSecrets + .asyncIterate as SinonStub + ) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -13346,7 +15992,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with auditUserLinks with error', async () => { + it('uses async iteration with listMeasurementProtocolSecrets with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13354,20 +16000,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.auditUserLinks.asyncIterate = + client.descriptors.page.listMeasurementProtocolSecrets.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.auditUserLinksAsync(request); + const iterable = client.listMeasurementProtocolSecretsAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.IAuditUserLink[] = + const responses: protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -13375,12 +16021,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.auditUserLinks.asyncIterate as SinonStub + client.descriptors.page.listMeasurementProtocolSecrets + .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.auditUserLinks.asyncIterate as SinonStub) + ( + client.descriptors.page.listMeasurementProtocolSecrets + .asyncIterate as SinonStub + ) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -13389,8 +16039,8 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('listFirebaseLinks', () => { - it('invokes listFirebaseLinks without error', async () => { + describe('searchChangeHistoryEvents', () => { + it('invokes searchChangeHistoryEvents without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13398,39 +16048,40 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() + new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', - ['parent'] + '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', + ['account'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.account = defaultValue1; + const expectedHeaderRequestParams = `account=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FirebaseLink() + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FirebaseLink() + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FirebaseLink() + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() ), ]; - client.innerApiCalls.listFirebaseLinks = stubSimpleCall(expectedResponse); - const [response] = await client.listFirebaseLinks(request); + client.innerApiCalls.searchChangeHistoryEvents = + stubSimpleCall(expectedResponse); + const [response] = await client.searchChangeHistoryEvents(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listFirebaseLinks as SinonStub + client.innerApiCalls.searchChangeHistoryEvents as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listFirebaseLinks as SinonStub + client.innerApiCalls.searchChangeHistoryEvents as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listFirebaseLinks without error using callback', async () => { + it('invokes searchChangeHistoryEvents without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13438,34 +16089,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() + new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() ); - const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', - ['parent'] + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', + ['account'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.account = defaultValue1; + const expectedHeaderRequestParams = `account=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FirebaseLink() + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FirebaseLink() + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FirebaseLink() + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() ), ]; - client.innerApiCalls.listFirebaseLinks = + client.innerApiCalls.searchChangeHistoryEvents = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listFirebaseLinks( + client.searchChangeHistoryEvents( request, ( err?: Error | null, result?: - | protos.google.analytics.admin.v1alpha.IFirebaseLink[] + | protos.google.analytics.admin.v1alpha.IChangeHistoryEvent[] | null ) => { if (err) { @@ -13479,16 +16130,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listFirebaseLinks as SinonStub + client.innerApiCalls.searchChangeHistoryEvents as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listFirebaseLinks as SinonStub + client.innerApiCalls.searchChangeHistoryEvents as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listFirebaseLinks with error', async () => { + it('invokes searchChangeHistoryEvents with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13496,31 +16147,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() + new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', - ['parent'] + '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', + ['account'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.account = defaultValue1; + const expectedHeaderRequestParams = `account=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listFirebaseLinks = stubSimpleCall( + client.innerApiCalls.searchChangeHistoryEvents = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listFirebaseLinks(request), expectedError); + await assert.rejects( + client.searchChangeHistoryEvents(request), + expectedError + ); const actualRequest = ( - client.innerApiCalls.listFirebaseLinks as SinonStub + client.innerApiCalls.searchChangeHistoryEvents as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listFirebaseLinks as SinonStub + client.innerApiCalls.searchChangeHistoryEvents as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listFirebaseLinksStream without error', async () => { + it('invokes searchChangeHistoryEventsStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13528,34 +16182,36 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() + new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', - ['parent'] + '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', + ['account'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.account = defaultValue1; + const expectedHeaderRequestParams = `account=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FirebaseLink() + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FirebaseLink() + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FirebaseLink() + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() ), ]; - client.descriptors.page.listFirebaseLinks.createStream = + client.descriptors.page.searchChangeHistoryEvents.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listFirebaseLinksStream(request); + const stream = client.searchChangeHistoryEventsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.FirebaseLink[] = + const responses: protos.google.analytics.admin.v1alpha.ChangeHistoryEvent[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.FirebaseLink) => { + ( + response: protos.google.analytics.admin.v1alpha.ChangeHistoryEvent + ) => { responses.push(response); } ); @@ -13569,12 +16225,18 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listFirebaseLinks.createStream as SinonStub) + ( + client.descriptors.page.searchChangeHistoryEvents + .createStream as SinonStub + ) .getCall(0) - .calledWith(client.innerApiCalls.listFirebaseLinks, request) + .calledWith(client.innerApiCalls.searchChangeHistoryEvents, request) ); assert( - (client.descriptors.page.listFirebaseLinks.createStream as SinonStub) + ( + client.descriptors.page.searchChangeHistoryEvents + .createStream as SinonStub + ) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -13582,7 +16244,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('invokes listFirebaseLinksStream with error', async () => { + it('invokes searchChangeHistoryEventsStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13590,24 +16252,26 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() + new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', - ['parent'] + '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', + ['account'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.account = defaultValue1; + const expectedHeaderRequestParams = `account=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listFirebaseLinks.createStream = + client.descriptors.page.searchChangeHistoryEvents.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listFirebaseLinksStream(request); + const stream = client.searchChangeHistoryEventsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.FirebaseLink[] = + const responses: protos.google.analytics.admin.v1alpha.ChangeHistoryEvent[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.FirebaseLink) => { + ( + response: protos.google.analytics.admin.v1alpha.ChangeHistoryEvent + ) => { responses.push(response); } ); @@ -13620,12 +16284,18 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listFirebaseLinks.createStream as SinonStub) + ( + client.descriptors.page.searchChangeHistoryEvents + .createStream as SinonStub + ) .getCall(0) - .calledWith(client.innerApiCalls.listFirebaseLinks, request) + .calledWith(client.innerApiCalls.searchChangeHistoryEvents, request) ); assert( - (client.descriptors.page.listFirebaseLinks.createStream as SinonStub) + ( + client.descriptors.page.searchChangeHistoryEvents + .createStream as SinonStub + ) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -13633,7 +16303,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listFirebaseLinks without error', async () => { + it('uses async iteration with searchChangeHistoryEvents without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13641,42 +16311,46 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() + new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', - ['parent'] + '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', + ['account'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.account = defaultValue1; + const expectedHeaderRequestParams = `account=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FirebaseLink() + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FirebaseLink() + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.FirebaseLink() + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() ), ]; - client.descriptors.page.listFirebaseLinks.asyncIterate = + client.descriptors.page.searchChangeHistoryEvents.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.IFirebaseLink[] = + const responses: protos.google.analytics.admin.v1alpha.IChangeHistoryEvent[] = []; - const iterable = client.listFirebaseLinksAsync(request); + const iterable = client.searchChangeHistoryEventsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listFirebaseLinks.asyncIterate as SinonStub + client.descriptors.page.searchChangeHistoryEvents + .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listFirebaseLinks.asyncIterate as SinonStub) + ( + client.descriptors.page.searchChangeHistoryEvents + .asyncIterate as SinonStub + ) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -13684,7 +16358,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listFirebaseLinks with error', async () => { + it('uses async iteration with searchChangeHistoryEvents with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13692,20 +16366,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() + new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', - ['parent'] + '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', + ['account'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.account = defaultValue1; + const expectedHeaderRequestParams = `account=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listFirebaseLinks.asyncIterate = + client.descriptors.page.searchChangeHistoryEvents.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listFirebaseLinksAsync(request); + const iterable = client.searchChangeHistoryEventsAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.IFirebaseLink[] = + const responses: protos.google.analytics.admin.v1alpha.IChangeHistoryEvent[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -13713,12 +16387,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listFirebaseLinks.asyncIterate as SinonStub + client.descriptors.page.searchChangeHistoryEvents + .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listFirebaseLinks.asyncIterate as SinonStub) + ( + client.descriptors.page.searchChangeHistoryEvents + .asyncIterate as SinonStub + ) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -13727,8 +16405,8 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('listGoogleAdsLinks', () => { - it('invokes listGoogleAdsLinks without error', async () => { + describe('listConversionEvents', () => { + it('invokes listConversionEvents without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13736,40 +16414,40 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() + new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', + '.google.analytics.admin.v1alpha.ListConversionEventsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + new protos.google.analytics.admin.v1alpha.ConversionEvent() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + new protos.google.analytics.admin.v1alpha.ConversionEvent() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + new protos.google.analytics.admin.v1alpha.ConversionEvent() ), ]; - client.innerApiCalls.listGoogleAdsLinks = + client.innerApiCalls.listConversionEvents = stubSimpleCall(expectedResponse); - const [response] = await client.listGoogleAdsLinks(request); + const [response] = await client.listConversionEvents(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listGoogleAdsLinks as SinonStub + client.innerApiCalls.listConversionEvents as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listGoogleAdsLinks as SinonStub + client.innerApiCalls.listConversionEvents as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listGoogleAdsLinks without error using callback', async () => { + it('invokes listConversionEvents without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13777,34 +16455,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() + new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', + '.google.analytics.admin.v1alpha.ListConversionEventsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + new protos.google.analytics.admin.v1alpha.ConversionEvent() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + new protos.google.analytics.admin.v1alpha.ConversionEvent() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + new protos.google.analytics.admin.v1alpha.ConversionEvent() ), ]; - client.innerApiCalls.listGoogleAdsLinks = + client.innerApiCalls.listConversionEvents = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listGoogleAdsLinks( + client.listConversionEvents( request, ( err?: Error | null, result?: - | protos.google.analytics.admin.v1alpha.IGoogleAdsLink[] + | protos.google.analytics.admin.v1alpha.IConversionEvent[] | null ) => { if (err) { @@ -13818,16 +16496,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listGoogleAdsLinks as SinonStub + client.innerApiCalls.listConversionEvents as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listGoogleAdsLinks as SinonStub + client.innerApiCalls.listConversionEvents as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listGoogleAdsLinks with error', async () => { + it('invokes listConversionEvents with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13835,31 +16513,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() + new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', + '.google.analytics.admin.v1alpha.ListConversionEventsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listGoogleAdsLinks = stubSimpleCall( + client.innerApiCalls.listConversionEvents = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listGoogleAdsLinks(request), expectedError); + await assert.rejects(client.listConversionEvents(request), expectedError); const actualRequest = ( - client.innerApiCalls.listGoogleAdsLinks as SinonStub + client.innerApiCalls.listConversionEvents as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listGoogleAdsLinks as SinonStub + client.innerApiCalls.listConversionEvents as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listGoogleAdsLinksStream without error', async () => { + it('invokes listConversionEventsStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13867,34 +16545,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() + new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', + '.google.analytics.admin.v1alpha.ListConversionEventsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + new protos.google.analytics.admin.v1alpha.ConversionEvent() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + new protos.google.analytics.admin.v1alpha.ConversionEvent() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + new protos.google.analytics.admin.v1alpha.ConversionEvent() ), ]; - client.descriptors.page.listGoogleAdsLinks.createStream = + client.descriptors.page.listConversionEvents.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listGoogleAdsLinksStream(request); + const stream = client.listConversionEventsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.GoogleAdsLink[] = + const responses: protos.google.analytics.admin.v1alpha.ConversionEvent[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.GoogleAdsLink) => { + (response: protos.google.analytics.admin.v1alpha.ConversionEvent) => { responses.push(response); } ); @@ -13908,12 +16586,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listGoogleAdsLinks.createStream as SinonStub) + (client.descriptors.page.listConversionEvents.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listGoogleAdsLinks, request) + .calledWith(client.innerApiCalls.listConversionEvents, request) ); assert( - (client.descriptors.page.listGoogleAdsLinks.createStream as SinonStub) + (client.descriptors.page.listConversionEvents.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -13921,7 +16599,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('invokes listGoogleAdsLinksStream with error', async () => { + it('invokes listConversionEventsStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13929,24 +16607,24 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() + new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', + '.google.analytics.admin.v1alpha.ListConversionEventsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listGoogleAdsLinks.createStream = + client.descriptors.page.listConversionEvents.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listGoogleAdsLinksStream(request); + const stream = client.listConversionEventsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.GoogleAdsLink[] = + const responses: protos.google.analytics.admin.v1alpha.ConversionEvent[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.GoogleAdsLink) => { + (response: protos.google.analytics.admin.v1alpha.ConversionEvent) => { responses.push(response); } ); @@ -13959,12 +16637,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listGoogleAdsLinks.createStream as SinonStub) + (client.descriptors.page.listConversionEvents.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listGoogleAdsLinks, request) + .calledWith(client.innerApiCalls.listConversionEvents, request) ); assert( - (client.descriptors.page.listGoogleAdsLinks.createStream as SinonStub) + (client.descriptors.page.listConversionEvents.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -13972,7 +16650,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listGoogleAdsLinks without error', async () => { + it('uses async iteration with listConversionEvents without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -13980,42 +16658,42 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() + new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', + '.google.analytics.admin.v1alpha.ListConversionEventsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + new protos.google.analytics.admin.v1alpha.ConversionEvent() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + new protos.google.analytics.admin.v1alpha.ConversionEvent() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + new protos.google.analytics.admin.v1alpha.ConversionEvent() ), ]; - client.descriptors.page.listGoogleAdsLinks.asyncIterate = + client.descriptors.page.listConversionEvents.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.IGoogleAdsLink[] = + const responses: protos.google.analytics.admin.v1alpha.IConversionEvent[] = []; - const iterable = client.listGoogleAdsLinksAsync(request); + const iterable = client.listConversionEventsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listGoogleAdsLinks.asyncIterate as SinonStub + client.descriptors.page.listConversionEvents.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listGoogleAdsLinks.asyncIterate as SinonStub) + (client.descriptors.page.listConversionEvents.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -14023,7 +16701,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listGoogleAdsLinks with error', async () => { + it('uses async iteration with listConversionEvents with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14031,20 +16709,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() + new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', + '.google.analytics.admin.v1alpha.ListConversionEventsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listGoogleAdsLinks.asyncIterate = + client.descriptors.page.listConversionEvents.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listGoogleAdsLinksAsync(request); + const iterable = client.listConversionEventsAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.IGoogleAdsLink[] = + const responses: protos.google.analytics.admin.v1alpha.IConversionEvent[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -14052,12 +16730,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listGoogleAdsLinks.asyncIterate as SinonStub + client.descriptors.page.listConversionEvents.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listGoogleAdsLinks.asyncIterate as SinonStub) + (client.descriptors.page.listConversionEvents.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -14066,8 +16744,8 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('listMeasurementProtocolSecrets', () => { - it('invokes listMeasurementProtocolSecrets without error', async () => { + describe('listDisplayVideo360AdvertiserLinks', () => { + it('invokes listDisplayVideo360AdvertiserLinks without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14075,40 +16753,42 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() ), ]; - client.innerApiCalls.listMeasurementProtocolSecrets = + client.innerApiCalls.listDisplayVideo360AdvertiserLinks = stubSimpleCall(expectedResponse); - const [response] = await client.listMeasurementProtocolSecrets(request); + const [response] = await client.listDisplayVideo360AdvertiserLinks( + request + ); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub + client.innerApiCalls.listDisplayVideo360AdvertiserLinks as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub + client.innerApiCalls.listDisplayVideo360AdvertiserLinks as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listMeasurementProtocolSecrets without error using callback', async () => { + it('invokes listDisplayVideo360AdvertiserLinks without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14116,34 +16796,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() ), ]; - client.innerApiCalls.listMeasurementProtocolSecrets = + client.innerApiCalls.listDisplayVideo360AdvertiserLinks = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listMeasurementProtocolSecrets( + client.listDisplayVideo360AdvertiserLinks( request, ( err?: Error | null, result?: - | protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret[] + | protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink[] | null ) => { if (err) { @@ -14157,16 +16837,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub + client.innerApiCalls.listDisplayVideo360AdvertiserLinks as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub + client.innerApiCalls.listDisplayVideo360AdvertiserLinks as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listMeasurementProtocolSecrets with error', async () => { + it('invokes listDisplayVideo360AdvertiserLinks with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14174,34 +16854,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listMeasurementProtocolSecrets = stubSimpleCall( + client.innerApiCalls.listDisplayVideo360AdvertiserLinks = stubSimpleCall( undefined, expectedError ); await assert.rejects( - client.listMeasurementProtocolSecrets(request), + client.listDisplayVideo360AdvertiserLinks(request), expectedError ); const actualRequest = ( - client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub + client.innerApiCalls.listDisplayVideo360AdvertiserLinks as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub + client.innerApiCalls.listDisplayVideo360AdvertiserLinks as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listMeasurementProtocolSecretsStream without error', async () => { + it('invokes listDisplayVideo360AdvertiserLinksStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14209,35 +16889,35 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() ), ]; - client.descriptors.page.listMeasurementProtocolSecrets.createStream = + client.descriptors.page.listDisplayVideo360AdvertiserLinks.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listMeasurementProtocolSecretsStream(request); + const stream = client.listDisplayVideo360AdvertiserLinksStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret[] = + const responses: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink[] = []; stream.on( 'data', ( - response: protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret + response: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink ) => { responses.push(response); } @@ -14253,18 +16933,18 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { assert.deepStrictEqual(responses, expectedResponse); assert( ( - client.descriptors.page.listMeasurementProtocolSecrets + client.descriptors.page.listDisplayVideo360AdvertiserLinks .createStream as SinonStub ) .getCall(0) .calledWith( - client.innerApiCalls.listMeasurementProtocolSecrets, + client.innerApiCalls.listDisplayVideo360AdvertiserLinks, request ) ); assert( ( - client.descriptors.page.listMeasurementProtocolSecrets + client.descriptors.page.listDisplayVideo360AdvertiserLinks .createStream as SinonStub ) .getCall(0) @@ -14274,7 +16954,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('invokes listMeasurementProtocolSecretsStream with error', async () => { + it('invokes listDisplayVideo360AdvertiserLinksStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14282,25 +16962,25 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listMeasurementProtocolSecrets.createStream = + client.descriptors.page.listDisplayVideo360AdvertiserLinks.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listMeasurementProtocolSecretsStream(request); + const stream = client.listDisplayVideo360AdvertiserLinksStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret[] = + const responses: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink[] = []; stream.on( 'data', ( - response: protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret + response: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink ) => { responses.push(response); } @@ -14315,18 +16995,18 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { await assert.rejects(promise, expectedError); assert( ( - client.descriptors.page.listMeasurementProtocolSecrets + client.descriptors.page.listDisplayVideo360AdvertiserLinks .createStream as SinonStub ) .getCall(0) .calledWith( - client.innerApiCalls.listMeasurementProtocolSecrets, + client.innerApiCalls.listDisplayVideo360AdvertiserLinks, request ) ); assert( ( - client.descriptors.page.listMeasurementProtocolSecrets + client.descriptors.page.listDisplayVideo360AdvertiserLinks .createStream as SinonStub ) .getCall(0) @@ -14336,7 +17016,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listMeasurementProtocolSecrets without error', async () => { + it('uses async iteration with listDisplayVideo360AdvertiserLinks without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14344,44 +17024,44 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() ), ]; - client.descriptors.page.listMeasurementProtocolSecrets.asyncIterate = + client.descriptors.page.listDisplayVideo360AdvertiserLinks.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret[] = + const responses: protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink[] = []; - const iterable = client.listMeasurementProtocolSecretsAsync(request); + const iterable = client.listDisplayVideo360AdvertiserLinksAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listMeasurementProtocolSecrets + client.descriptors.page.listDisplayVideo360AdvertiserLinks .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( ( - client.descriptors.page.listMeasurementProtocolSecrets + client.descriptors.page.listDisplayVideo360AdvertiserLinks .asyncIterate as SinonStub ) .getCall(0) @@ -14391,7 +17071,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listMeasurementProtocolSecrets with error', async () => { + it('uses async iteration with listDisplayVideo360AdvertiserLinks with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14399,20 +17079,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listMeasurementProtocolSecrets.asyncIterate = + client.descriptors.page.listDisplayVideo360AdvertiserLinks.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listMeasurementProtocolSecretsAsync(request); + const iterable = client.listDisplayVideo360AdvertiserLinksAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret[] = + const responses: protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -14420,14 +17100,14 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listMeasurementProtocolSecrets + client.descriptors.page.listDisplayVideo360AdvertiserLinks .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( ( - client.descriptors.page.listMeasurementProtocolSecrets + client.descriptors.page.listDisplayVideo360AdvertiserLinks .asyncIterate as SinonStub ) .getCall(0) @@ -14438,8 +17118,8 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('searchChangeHistoryEvents', () => { - it('invokes searchChangeHistoryEvents without error', async () => { + describe('listDisplayVideo360AdvertiserLinkProposals', () => { + it('invokes listDisplayVideo360AdvertiserLinkProposals without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14447,40 +17127,43 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', - ['account'] + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', + ['parent'] ); - request.account = defaultValue1; - const expectedHeaderRequestParams = `account=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() ), ]; - client.innerApiCalls.searchChangeHistoryEvents = + client.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals = stubSimpleCall(expectedResponse); - const [response] = await client.searchChangeHistoryEvents(request); + const [response] = + await client.listDisplayVideo360AdvertiserLinkProposals(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.searchChangeHistoryEvents as SinonStub + client.innerApiCalls + .listDisplayVideo360AdvertiserLinkProposals as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.searchChangeHistoryEvents as SinonStub + client.innerApiCalls + .listDisplayVideo360AdvertiserLinkProposals as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes searchChangeHistoryEvents without error using callback', async () => { + it('invokes listDisplayVideo360AdvertiserLinkProposals without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14488,34 +17171,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', - ['account'] + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', + ['parent'] ); - request.account = defaultValue1; - const expectedHeaderRequestParams = `account=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() ), ]; - client.innerApiCalls.searchChangeHistoryEvents = + client.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.searchChangeHistoryEvents( + client.listDisplayVideo360AdvertiserLinkProposals( request, ( err?: Error | null, result?: - | protos.google.analytics.admin.v1alpha.IChangeHistoryEvent[] + | protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal[] | null ) => { if (err) { @@ -14529,16 +17212,18 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.searchChangeHistoryEvents as SinonStub + client.innerApiCalls + .listDisplayVideo360AdvertiserLinkProposals as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.searchChangeHistoryEvents as SinonStub + client.innerApiCalls + .listDisplayVideo360AdvertiserLinkProposals as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes searchChangeHistoryEvents with error', async () => { + it('invokes listDisplayVideo360AdvertiserLinkProposals with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14546,34 +17231,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', - ['account'] + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', + ['parent'] ); - request.account = defaultValue1; - const expectedHeaderRequestParams = `account=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.searchChangeHistoryEvents = stubSimpleCall( - undefined, - expectedError - ); + client.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals = + stubSimpleCall(undefined, expectedError); await assert.rejects( - client.searchChangeHistoryEvents(request), + client.listDisplayVideo360AdvertiserLinkProposals(request), expectedError ); const actualRequest = ( - client.innerApiCalls.searchChangeHistoryEvents as SinonStub + client.innerApiCalls + .listDisplayVideo360AdvertiserLinkProposals as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.searchChangeHistoryEvents as SinonStub + client.innerApiCalls + .listDisplayVideo360AdvertiserLinkProposals as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes searchChangeHistoryEventsStream without error', async () => { + it('invokes listDisplayVideo360AdvertiserLinkProposalsStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14581,35 +17266,36 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', - ['account'] + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', + ['parent'] ); - request.account = defaultValue1; - const expectedHeaderRequestParams = `account=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() ), ]; - client.descriptors.page.searchChangeHistoryEvents.createStream = + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.searchChangeHistoryEventsStream(request); + const stream = + client.listDisplayVideo360AdvertiserLinkProposalsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.ChangeHistoryEvent[] = + const responses: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal[] = []; stream.on( 'data', ( - response: protos.google.analytics.admin.v1alpha.ChangeHistoryEvent + response: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal ) => { responses.push(response); } @@ -14625,15 +17311,18 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { assert.deepStrictEqual(responses, expectedResponse); assert( ( - client.descriptors.page.searchChangeHistoryEvents + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals .createStream as SinonStub ) .getCall(0) - .calledWith(client.innerApiCalls.searchChangeHistoryEvents, request) + .calledWith( + client.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals, + request + ) ); assert( ( - client.descriptors.page.searchChangeHistoryEvents + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals .createStream as SinonStub ) .getCall(0) @@ -14643,7 +17332,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('invokes searchChangeHistoryEventsStream with error', async () => { + it('invokes listDisplayVideo360AdvertiserLinkProposalsStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14651,25 +17340,26 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', - ['account'] + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', + ['parent'] ); - request.account = defaultValue1; - const expectedHeaderRequestParams = `account=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.searchChangeHistoryEvents.createStream = + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.searchChangeHistoryEventsStream(request); + const stream = + client.listDisplayVideo360AdvertiserLinkProposalsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.ChangeHistoryEvent[] = + const responses: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal[] = []; stream.on( 'data', ( - response: protos.google.analytics.admin.v1alpha.ChangeHistoryEvent + response: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal ) => { responses.push(response); } @@ -14684,15 +17374,18 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { await assert.rejects(promise, expectedError); assert( ( - client.descriptors.page.searchChangeHistoryEvents + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals .createStream as SinonStub ) .getCall(0) - .calledWith(client.innerApiCalls.searchChangeHistoryEvents, request) + .calledWith( + client.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals, + request + ) ); assert( ( - client.descriptors.page.searchChangeHistoryEvents + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals .createStream as SinonStub ) .getCall(0) @@ -14702,7 +17395,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with searchChangeHistoryEvents without error', async () => { + it('uses async iteration with listDisplayVideo360AdvertiserLinkProposals without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14710,44 +17403,45 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', - ['account'] + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', + ['parent'] ); - request.account = defaultValue1; - const expectedHeaderRequestParams = `account=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() ), ]; - client.descriptors.page.searchChangeHistoryEvents.asyncIterate = + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.IChangeHistoryEvent[] = + const responses: protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal[] = []; - const iterable = client.searchChangeHistoryEventsAsync(request); + const iterable = + client.listDisplayVideo360AdvertiserLinkProposalsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.searchChangeHistoryEvents + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( ( - client.descriptors.page.searchChangeHistoryEvents + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals .asyncIterate as SinonStub ) .getCall(0) @@ -14757,7 +17451,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with searchChangeHistoryEvents with error', async () => { + it('uses async iteration with listDisplayVideo360AdvertiserLinkProposals with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14765,20 +17459,21 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', - ['account'] + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', + ['parent'] ); - request.account = defaultValue1; - const expectedHeaderRequestParams = `account=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.searchChangeHistoryEvents.asyncIterate = + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.searchChangeHistoryEventsAsync(request); + const iterable = + client.listDisplayVideo360AdvertiserLinkProposalsAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.IChangeHistoryEvent[] = + const responses: protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -14786,14 +17481,14 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.searchChangeHistoryEvents + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( ( - client.descriptors.page.searchChangeHistoryEvents + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals .asyncIterate as SinonStub ) .getCall(0) @@ -14804,8 +17499,8 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('listConversionEvents', () => { - it('invokes listConversionEvents without error', async () => { + describe('listCustomDimensions', () => { + it('invokes listCustomDimensions without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14813,40 +17508,40 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() + new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListConversionEventsRequest', + '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ConversionEvent() + new protos.google.analytics.admin.v1alpha.CustomDimension() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ConversionEvent() + new protos.google.analytics.admin.v1alpha.CustomDimension() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ConversionEvent() + new protos.google.analytics.admin.v1alpha.CustomDimension() ), ]; - client.innerApiCalls.listConversionEvents = + client.innerApiCalls.listCustomDimensions = stubSimpleCall(expectedResponse); - const [response] = await client.listConversionEvents(request); + const [response] = await client.listCustomDimensions(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listConversionEvents as SinonStub + client.innerApiCalls.listCustomDimensions as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listConversionEvents as SinonStub + client.innerApiCalls.listCustomDimensions as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listConversionEvents without error using callback', async () => { + it('invokes listCustomDimensions without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14854,34 +17549,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() + new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListConversionEventsRequest', + '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ConversionEvent() + new protos.google.analytics.admin.v1alpha.CustomDimension() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ConversionEvent() + new protos.google.analytics.admin.v1alpha.CustomDimension() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ConversionEvent() + new protos.google.analytics.admin.v1alpha.CustomDimension() ), ]; - client.innerApiCalls.listConversionEvents = + client.innerApiCalls.listCustomDimensions = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listConversionEvents( + client.listCustomDimensions( request, ( err?: Error | null, result?: - | protos.google.analytics.admin.v1alpha.IConversionEvent[] + | protos.google.analytics.admin.v1alpha.ICustomDimension[] | null ) => { if (err) { @@ -14895,16 +17590,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listConversionEvents as SinonStub + client.innerApiCalls.listCustomDimensions as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listConversionEvents as SinonStub + client.innerApiCalls.listCustomDimensions as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listConversionEvents with error', async () => { + it('invokes listCustomDimensions with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14912,31 +17607,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() + new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListConversionEventsRequest', + '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listConversionEvents = stubSimpleCall( + client.innerApiCalls.listCustomDimensions = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listConversionEvents(request), expectedError); + await assert.rejects(client.listCustomDimensions(request), expectedError); const actualRequest = ( - client.innerApiCalls.listConversionEvents as SinonStub + client.innerApiCalls.listCustomDimensions as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listConversionEvents as SinonStub + client.innerApiCalls.listCustomDimensions as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listConversionEventsStream without error', async () => { + it('invokes listCustomDimensionsStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -14944,34 +17639,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() + new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListConversionEventsRequest', + '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ConversionEvent() + new protos.google.analytics.admin.v1alpha.CustomDimension() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ConversionEvent() + new protos.google.analytics.admin.v1alpha.CustomDimension() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ConversionEvent() + new protos.google.analytics.admin.v1alpha.CustomDimension() ), ]; - client.descriptors.page.listConversionEvents.createStream = + client.descriptors.page.listCustomDimensions.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listConversionEventsStream(request); + const stream = client.listCustomDimensionsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.ConversionEvent[] = + const responses: protos.google.analytics.admin.v1alpha.CustomDimension[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.ConversionEvent) => { + (response: protos.google.analytics.admin.v1alpha.CustomDimension) => { responses.push(response); } ); @@ -14985,12 +17680,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listConversionEvents.createStream as SinonStub) + (client.descriptors.page.listCustomDimensions.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listConversionEvents, request) + .calledWith(client.innerApiCalls.listCustomDimensions, request) ); assert( - (client.descriptors.page.listConversionEvents.createStream as SinonStub) + (client.descriptors.page.listCustomDimensions.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -14998,7 +17693,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('invokes listConversionEventsStream with error', async () => { + it('invokes listCustomDimensionsStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -15006,24 +17701,24 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() + new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListConversionEventsRequest', + '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listConversionEvents.createStream = + client.descriptors.page.listCustomDimensions.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listConversionEventsStream(request); + const stream = client.listCustomDimensionsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.ConversionEvent[] = + const responses: protos.google.analytics.admin.v1alpha.CustomDimension[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.ConversionEvent) => { + (response: protos.google.analytics.admin.v1alpha.CustomDimension) => { responses.push(response); } ); @@ -15036,12 +17731,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listConversionEvents.createStream as SinonStub) + (client.descriptors.page.listCustomDimensions.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listConversionEvents, request) + .calledWith(client.innerApiCalls.listCustomDimensions, request) ); assert( - (client.descriptors.page.listConversionEvents.createStream as SinonStub) + (client.descriptors.page.listCustomDimensions.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -15049,7 +17744,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listConversionEvents without error', async () => { + it('uses async iteration with listCustomDimensions without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -15057,42 +17752,42 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() + new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListConversionEventsRequest', + '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ConversionEvent() + new protos.google.analytics.admin.v1alpha.CustomDimension() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ConversionEvent() + new protos.google.analytics.admin.v1alpha.CustomDimension() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ConversionEvent() + new protos.google.analytics.admin.v1alpha.CustomDimension() ), ]; - client.descriptors.page.listConversionEvents.asyncIterate = + client.descriptors.page.listCustomDimensions.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.IConversionEvent[] = + const responses: protos.google.analytics.admin.v1alpha.ICustomDimension[] = []; - const iterable = client.listConversionEventsAsync(request); + const iterable = client.listCustomDimensionsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listConversionEvents.asyncIterate as SinonStub + client.descriptors.page.listCustomDimensions.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listConversionEvents.asyncIterate as SinonStub) + (client.descriptors.page.listCustomDimensions.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -15100,7 +17795,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listConversionEvents with error', async () => { + it('uses async iteration with listCustomDimensions with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -15108,20 +17803,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() + new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListConversionEventsRequest', + '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listConversionEvents.asyncIterate = + client.descriptors.page.listCustomDimensions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listConversionEventsAsync(request); + const iterable = client.listCustomDimensionsAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.IConversionEvent[] = + const responses: protos.google.analytics.admin.v1alpha.ICustomDimension[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -15129,12 +17824,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listConversionEvents.asyncIterate as SinonStub + client.descriptors.page.listCustomDimensions.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listConversionEvents.asyncIterate as SinonStub) + (client.descriptors.page.listCustomDimensions.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -15143,8 +17838,8 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('listDisplayVideo360AdvertiserLinks', () => { - it('invokes listDisplayVideo360AdvertiserLinks without error', async () => { + describe('listCustomMetrics', () => { + it('invokes listCustomMetrics without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -15152,42 +17847,39 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', + '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + new protos.google.analytics.admin.v1alpha.CustomMetric() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + new protos.google.analytics.admin.v1alpha.CustomMetric() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + new protos.google.analytics.admin.v1alpha.CustomMetric() ), ]; - client.innerApiCalls.listDisplayVideo360AdvertiserLinks = - stubSimpleCall(expectedResponse); - const [response] = await client.listDisplayVideo360AdvertiserLinks( - request - ); + client.innerApiCalls.listCustomMetrics = stubSimpleCall(expectedResponse); + const [response] = await client.listCustomMetrics(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listDisplayVideo360AdvertiserLinks as SinonStub + client.innerApiCalls.listCustomMetrics as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listDisplayVideo360AdvertiserLinks as SinonStub + client.innerApiCalls.listCustomMetrics as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listDisplayVideo360AdvertiserLinks without error using callback', async () => { + it('invokes listCustomMetrics without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -15195,34 +17887,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', + '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + new protos.google.analytics.admin.v1alpha.CustomMetric() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + new protos.google.analytics.admin.v1alpha.CustomMetric() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + new protos.google.analytics.admin.v1alpha.CustomMetric() ), ]; - client.innerApiCalls.listDisplayVideo360AdvertiserLinks = + client.innerApiCalls.listCustomMetrics = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listDisplayVideo360AdvertiserLinks( + client.listCustomMetrics( request, ( err?: Error | null, result?: - | protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink[] + | protos.google.analytics.admin.v1alpha.ICustomMetric[] | null ) => { if (err) { @@ -15236,16 +17928,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listDisplayVideo360AdvertiserLinks as SinonStub + client.innerApiCalls.listCustomMetrics as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listDisplayVideo360AdvertiserLinks as SinonStub + client.innerApiCalls.listCustomMetrics as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listDisplayVideo360AdvertiserLinks with error', async () => { + it('invokes listCustomMetrics with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -15253,34 +17945,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', + '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listDisplayVideo360AdvertiserLinks = stubSimpleCall( + client.innerApiCalls.listCustomMetrics = stubSimpleCall( undefined, expectedError ); - await assert.rejects( - client.listDisplayVideo360AdvertiserLinks(request), - expectedError - ); + await assert.rejects(client.listCustomMetrics(request), expectedError); const actualRequest = ( - client.innerApiCalls.listDisplayVideo360AdvertiserLinks as SinonStub + client.innerApiCalls.listCustomMetrics as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listDisplayVideo360AdvertiserLinks as SinonStub + client.innerApiCalls.listCustomMetrics as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listDisplayVideo360AdvertiserLinksStream without error', async () => { + it('invokes listCustomMetricsStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -15288,36 +17977,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', + '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + new protos.google.analytics.admin.v1alpha.CustomMetric() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + new protos.google.analytics.admin.v1alpha.CustomMetric() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + new protos.google.analytics.admin.v1alpha.CustomMetric() ), ]; - client.descriptors.page.listDisplayVideo360AdvertiserLinks.createStream = + client.descriptors.page.listCustomMetrics.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listDisplayVideo360AdvertiserLinksStream(request); + const stream = client.listCustomMetricsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink[] = + const responses: protos.google.analytics.admin.v1alpha.CustomMetric[] = []; stream.on( 'data', - ( - response: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink - ) => { + (response: protos.google.analytics.admin.v1alpha.CustomMetric) => { responses.push(response); } ); @@ -15331,21 +18018,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - ( - client.descriptors.page.listDisplayVideo360AdvertiserLinks - .createStream as SinonStub - ) + (client.descriptors.page.listCustomMetrics.createStream as SinonStub) .getCall(0) - .calledWith( - client.innerApiCalls.listDisplayVideo360AdvertiserLinks, - request - ) + .calledWith(client.innerApiCalls.listCustomMetrics, request) ); assert( - ( - client.descriptors.page.listDisplayVideo360AdvertiserLinks - .createStream as SinonStub - ) + (client.descriptors.page.listCustomMetrics.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -15353,7 +18031,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('invokes listDisplayVideo360AdvertiserLinksStream with error', async () => { + it('invokes listCustomMetricsStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -15361,26 +18039,24 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', + '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listDisplayVideo360AdvertiserLinks.createStream = + client.descriptors.page.listCustomMetrics.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listDisplayVideo360AdvertiserLinksStream(request); + const stream = client.listCustomMetricsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink[] = + const responses: protos.google.analytics.admin.v1alpha.CustomMetric[] = []; stream.on( 'data', - ( - response: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink - ) => { + (response: protos.google.analytics.admin.v1alpha.CustomMetric) => { responses.push(response); } ); @@ -15393,21 +18069,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - ( - client.descriptors.page.listDisplayVideo360AdvertiserLinks - .createStream as SinonStub - ) + (client.descriptors.page.listCustomMetrics.createStream as SinonStub) .getCall(0) - .calledWith( - client.innerApiCalls.listDisplayVideo360AdvertiserLinks, - request - ) + .calledWith(client.innerApiCalls.listCustomMetrics, request) ); assert( - ( - client.descriptors.page.listDisplayVideo360AdvertiserLinks - .createStream as SinonStub - ) + (client.descriptors.page.listCustomMetrics.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -15415,7 +18082,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listDisplayVideo360AdvertiserLinks without error', async () => { + it('uses async iteration with listCustomMetrics without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -15423,46 +18090,42 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', + '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + new protos.google.analytics.admin.v1alpha.CustomMetric() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + new protos.google.analytics.admin.v1alpha.CustomMetric() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + new protos.google.analytics.admin.v1alpha.CustomMetric() ), ]; - client.descriptors.page.listDisplayVideo360AdvertiserLinks.asyncIterate = + client.descriptors.page.listCustomMetrics.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink[] = + const responses: protos.google.analytics.admin.v1alpha.ICustomMetric[] = []; - const iterable = client.listDisplayVideo360AdvertiserLinksAsync(request); + const iterable = client.listCustomMetricsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listDisplayVideo360AdvertiserLinks - .asyncIterate as SinonStub + client.descriptors.page.listCustomMetrics.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - ( - client.descriptors.page.listDisplayVideo360AdvertiserLinks - .asyncIterate as SinonStub - ) + (client.descriptors.page.listCustomMetrics.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -15470,7 +18133,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listDisplayVideo360AdvertiserLinks with error', async () => { + it('uses async iteration with listCustomMetrics with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -15478,20 +18141,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() + new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', + '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listDisplayVideo360AdvertiserLinks.asyncIterate = + client.descriptors.page.listCustomMetrics.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listDisplayVideo360AdvertiserLinksAsync(request); + const iterable = client.listCustomMetricsAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink[] = + const responses: protos.google.analytics.admin.v1alpha.ICustomMetric[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -15499,16 +18162,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listDisplayVideo360AdvertiserLinks - .asyncIterate as SinonStub + client.descriptors.page.listCustomMetrics.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - ( - client.descriptors.page.listDisplayVideo360AdvertiserLinks - .asyncIterate as SinonStub - ) + (client.descriptors.page.listCustomMetrics.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -15517,8 +18176,8 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('listDisplayVideo360AdvertiserLinkProposals', () => { - it('invokes listDisplayVideo360AdvertiserLinkProposals without error', async () => { + describe('listDataStreams', () => { + it('invokes listDataStreams without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -15526,43 +18185,39 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() + new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', + '.google.analytics.admin.v1alpha.ListDataStreamsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + new protos.google.analytics.admin.v1alpha.DataStream() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + new protos.google.analytics.admin.v1alpha.DataStream() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + new protos.google.analytics.admin.v1alpha.DataStream() ), ]; - client.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals = - stubSimpleCall(expectedResponse); - const [response] = - await client.listDisplayVideo360AdvertiserLinkProposals(request); + client.innerApiCalls.listDataStreams = stubSimpleCall(expectedResponse); + const [response] = await client.listDataStreams(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls - .listDisplayVideo360AdvertiserLinkProposals as SinonStub + client.innerApiCalls.listDataStreams as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls - .listDisplayVideo360AdvertiserLinkProposals as SinonStub + client.innerApiCalls.listDataStreams as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listDisplayVideo360AdvertiserLinkProposals without error using callback', async () => { + it('invokes listDataStreams without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -15570,35 +18225,33 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() + new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', + '.google.analytics.admin.v1alpha.ListDataStreamsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + new protos.google.analytics.admin.v1alpha.DataStream() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + new protos.google.analytics.admin.v1alpha.DataStream() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + new protos.google.analytics.admin.v1alpha.DataStream() ), ]; - client.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals = + client.innerApiCalls.listDataStreams = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listDisplayVideo360AdvertiserLinkProposals( + client.listDataStreams( request, ( err?: Error | null, - result?: - | protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal[] - | null + result?: protos.google.analytics.admin.v1alpha.IDataStream[] | null ) => { if (err) { reject(err); @@ -15611,18 +18264,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls - .listDisplayVideo360AdvertiserLinkProposals as SinonStub + client.innerApiCalls.listDataStreams as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls - .listDisplayVideo360AdvertiserLinkProposals as SinonStub + client.innerApiCalls.listDataStreams as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listDisplayVideo360AdvertiserLinkProposals with error', async () => { + it('invokes listDataStreams with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -15630,34 +18281,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() + new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', + '.google.analytics.admin.v1alpha.ListDataStreamsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals = - stubSimpleCall(undefined, expectedError); - await assert.rejects( - client.listDisplayVideo360AdvertiserLinkProposals(request), + client.innerApiCalls.listDataStreams = stubSimpleCall( + undefined, expectedError ); + await assert.rejects(client.listDataStreams(request), expectedError); const actualRequest = ( - client.innerApiCalls - .listDisplayVideo360AdvertiserLinkProposals as SinonStub + client.innerApiCalls.listDataStreams as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls - .listDisplayVideo360AdvertiserLinkProposals as SinonStub + client.innerApiCalls.listDataStreams as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listDisplayVideo360AdvertiserLinkProposalsStream without error', async () => { + it('invokes listDataStreamsStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -15665,37 +18313,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() + new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', + '.google.analytics.admin.v1alpha.ListDataStreamsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + new protos.google.analytics.admin.v1alpha.DataStream() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + new protos.google.analytics.admin.v1alpha.DataStream() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + new protos.google.analytics.admin.v1alpha.DataStream() ), ]; - client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals.createStream = + client.descriptors.page.listDataStreams.createStream = stubPageStreamingCall(expectedResponse); - const stream = - client.listDisplayVideo360AdvertiserLinkProposalsStream(request); + const stream = client.listDataStreamsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal[] = + const responses: protos.google.analytics.admin.v1alpha.DataStream[] = []; stream.on( 'data', - ( - response: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal - ) => { + (response: protos.google.analytics.admin.v1alpha.DataStream) => { responses.push(response); } ); @@ -15709,21 +18354,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - ( - client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals - .createStream as SinonStub - ) + (client.descriptors.page.listDataStreams.createStream as SinonStub) .getCall(0) - .calledWith( - client.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals, - request - ) + .calledWith(client.innerApiCalls.listDataStreams, request) ); assert( - ( - client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals - .createStream as SinonStub - ) + (client.descriptors.page.listDataStreams.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -15731,7 +18367,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('invokes listDisplayVideo360AdvertiserLinkProposalsStream with error', async () => { + it('invokes listDataStreamsStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -15739,27 +18375,24 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() + new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', + '.google.analytics.admin.v1alpha.ListDataStreamsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals.createStream = + client.descriptors.page.listDataStreams.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = - client.listDisplayVideo360AdvertiserLinkProposalsStream(request); + const stream = client.listDataStreamsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal[] = + const responses: protos.google.analytics.admin.v1alpha.DataStream[] = []; stream.on( 'data', - ( - response: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal - ) => { + (response: protos.google.analytics.admin.v1alpha.DataStream) => { responses.push(response); } ); @@ -15772,21 +18405,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - ( - client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals - .createStream as SinonStub - ) + (client.descriptors.page.listDataStreams.createStream as SinonStub) .getCall(0) - .calledWith( - client.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals, - request - ) + .calledWith(client.innerApiCalls.listDataStreams, request) ); assert( - ( - client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals - .createStream as SinonStub - ) + (client.descriptors.page.listDataStreams.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -15794,7 +18418,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listDisplayVideo360AdvertiserLinkProposals without error', async () => { + it('uses async iteration with listDataStreams without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -15802,47 +18426,41 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() + new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', + '.google.analytics.admin.v1alpha.ListDataStreamsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + new protos.google.analytics.admin.v1alpha.DataStream() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + new protos.google.analytics.admin.v1alpha.DataStream() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + new protos.google.analytics.admin.v1alpha.DataStream() ), ]; - client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals.asyncIterate = + client.descriptors.page.listDataStreams.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal[] = - []; - const iterable = - client.listDisplayVideo360AdvertiserLinkProposalsAsync(request); + const responses: protos.google.analytics.admin.v1alpha.IDataStream[] = []; + const iterable = client.listDataStreamsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals - .asyncIterate as SinonStub + client.descriptors.page.listDataStreams.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - ( - client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals - .asyncIterate as SinonStub - ) + (client.descriptors.page.listDataStreams.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -15850,7 +18468,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listDisplayVideo360AdvertiserLinkProposals with error', async () => { + it('uses async iteration with listDataStreams with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -15858,21 +18476,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() + new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', + '.google.analytics.admin.v1alpha.ListDataStreamsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals.asyncIterate = + client.descriptors.page.listDataStreams.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = - client.listDisplayVideo360AdvertiserLinkProposalsAsync(request); + const iterable = client.listDataStreamsAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal[] = + const responses: protos.google.analytics.admin.v1alpha.IDataStream[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -15880,16 +18497,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals - .asyncIterate as SinonStub + client.descriptors.page.listDataStreams.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - ( - client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals - .asyncIterate as SinonStub - ) + (client.descriptors.page.listDataStreams.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -15898,8 +18511,8 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('listCustomDimensions', () => { - it('invokes listCustomDimensions without error', async () => { + describe('listAudiences', () => { + it('invokes listAudiences without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -15907,40 +18520,39 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() + new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', + '.google.analytics.admin.v1alpha.ListAudiencesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomDimension() + new protos.google.analytics.admin.v1alpha.Audience() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomDimension() + new protos.google.analytics.admin.v1alpha.Audience() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomDimension() + new protos.google.analytics.admin.v1alpha.Audience() ), ]; - client.innerApiCalls.listCustomDimensions = - stubSimpleCall(expectedResponse); - const [response] = await client.listCustomDimensions(request); + client.innerApiCalls.listAudiences = stubSimpleCall(expectedResponse); + const [response] = await client.listAudiences(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listCustomDimensions as SinonStub + client.innerApiCalls.listAudiences as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listCustomDimensions as SinonStub + client.innerApiCalls.listAudiences as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listCustomDimensions without error using callback', async () => { + it('invokes listAudiences without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -15948,35 +18560,33 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() + new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', + '.google.analytics.admin.v1alpha.ListAudiencesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomDimension() + new protos.google.analytics.admin.v1alpha.Audience() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomDimension() + new protos.google.analytics.admin.v1alpha.Audience() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomDimension() + new protos.google.analytics.admin.v1alpha.Audience() ), ]; - client.innerApiCalls.listCustomDimensions = + client.innerApiCalls.listAudiences = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listCustomDimensions( + client.listAudiences( request, ( err?: Error | null, - result?: - | protos.google.analytics.admin.v1alpha.ICustomDimension[] - | null + result?: protos.google.analytics.admin.v1alpha.IAudience[] | null ) => { if (err) { reject(err); @@ -15989,16 +18599,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listCustomDimensions as SinonStub + client.innerApiCalls.listAudiences as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listCustomDimensions as SinonStub + client.innerApiCalls.listAudiences as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listCustomDimensions with error', async () => { + it('invokes listAudiences with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -16006,31 +18616,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() + new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', + '.google.analytics.admin.v1alpha.ListAudiencesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listCustomDimensions = stubSimpleCall( + client.innerApiCalls.listAudiences = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listCustomDimensions(request), expectedError); + await assert.rejects(client.listAudiences(request), expectedError); const actualRequest = ( - client.innerApiCalls.listCustomDimensions as SinonStub + client.innerApiCalls.listAudiences as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listCustomDimensions as SinonStub + client.innerApiCalls.listAudiences as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listCustomDimensionsStream without error', async () => { + it('invokes listAudiencesStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -16038,34 +18648,33 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() + new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', + '.google.analytics.admin.v1alpha.ListAudiencesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomDimension() + new protos.google.analytics.admin.v1alpha.Audience() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomDimension() + new protos.google.analytics.admin.v1alpha.Audience() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomDimension() + new protos.google.analytics.admin.v1alpha.Audience() ), ]; - client.descriptors.page.listCustomDimensions.createStream = + client.descriptors.page.listAudiences.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listCustomDimensionsStream(request); + const stream = client.listAudiencesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.CustomDimension[] = - []; + const responses: protos.google.analytics.admin.v1alpha.Audience[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.CustomDimension) => { + (response: protos.google.analytics.admin.v1alpha.Audience) => { responses.push(response); } ); @@ -16079,12 +18688,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listCustomDimensions.createStream as SinonStub) + (client.descriptors.page.listAudiences.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listCustomDimensions, request) + .calledWith(client.innerApiCalls.listAudiences, request) ); assert( - (client.descriptors.page.listCustomDimensions.createStream as SinonStub) + (client.descriptors.page.listAudiences.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -16092,7 +18701,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('invokes listCustomDimensionsStream with error', async () => { + it('invokes listAudiencesStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -16100,24 +18709,23 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() + new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', + '.google.analytics.admin.v1alpha.ListAudiencesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listCustomDimensions.createStream = + client.descriptors.page.listAudiences.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listCustomDimensionsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.CustomDimension[] = - []; + const stream = client.listAudiencesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.Audience[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.CustomDimension) => { + (response: protos.google.analytics.admin.v1alpha.Audience) => { responses.push(response); } ); @@ -16130,12 +18738,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listCustomDimensions.createStream as SinonStub) + (client.descriptors.page.listAudiences.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listCustomDimensions, request) + .calledWith(client.innerApiCalls.listAudiences, request) ); assert( - (client.descriptors.page.listCustomDimensions.createStream as SinonStub) + (client.descriptors.page.listAudiences.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -16143,7 +18751,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listCustomDimensions without error', async () => { + it('uses async iteration with listAudiences without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -16151,42 +18759,41 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() + new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', + '.google.analytics.admin.v1alpha.ListAudiencesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomDimension() + new protos.google.analytics.admin.v1alpha.Audience() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomDimension() + new protos.google.analytics.admin.v1alpha.Audience() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomDimension() + new protos.google.analytics.admin.v1alpha.Audience() ), ]; - client.descriptors.page.listCustomDimensions.asyncIterate = + client.descriptors.page.listAudiences.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.ICustomDimension[] = - []; - const iterable = client.listCustomDimensionsAsync(request); + const responses: protos.google.analytics.admin.v1alpha.IAudience[] = []; + const iterable = client.listAudiencesAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listCustomDimensions.asyncIterate as SinonStub + client.descriptors.page.listAudiences.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listCustomDimensions.asyncIterate as SinonStub) + (client.descriptors.page.listAudiences.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -16194,7 +18801,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listCustomDimensions with error', async () => { + it('uses async iteration with listAudiences with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -16202,33 +18809,32 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() + new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', + '.google.analytics.admin.v1alpha.ListAudiencesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listCustomDimensions.asyncIterate = + client.descriptors.page.listAudiences.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listCustomDimensionsAsync(request); + const iterable = client.listAudiencesAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.ICustomDimension[] = - []; + const responses: protos.google.analytics.admin.v1alpha.IAudience[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( ( - client.descriptors.page.listCustomDimensions.asyncIterate as SinonStub + client.descriptors.page.listAudiences.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listCustomDimensions.asyncIterate as SinonStub) + (client.descriptors.page.listAudiences.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -16237,8 +18843,8 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('listCustomMetrics', () => { - it('invokes listCustomMetrics without error', async () => { + describe('listSearchAds360Links', () => { + it('invokes listSearchAds360Links without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -16246,39 +18852,40 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() + new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', + '.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomMetric() + new protos.google.analytics.admin.v1alpha.SearchAds360Link() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomMetric() + new protos.google.analytics.admin.v1alpha.SearchAds360Link() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomMetric() + new protos.google.analytics.admin.v1alpha.SearchAds360Link() ), ]; - client.innerApiCalls.listCustomMetrics = stubSimpleCall(expectedResponse); - const [response] = await client.listCustomMetrics(request); + client.innerApiCalls.listSearchAds360Links = + stubSimpleCall(expectedResponse); + const [response] = await client.listSearchAds360Links(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listCustomMetrics as SinonStub + client.innerApiCalls.listSearchAds360Links as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listCustomMetrics as SinonStub + client.innerApiCalls.listSearchAds360Links as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listCustomMetrics without error using callback', async () => { + it('invokes listSearchAds360Links without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -16286,34 +18893,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() + new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', + '.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomMetric() + new protos.google.analytics.admin.v1alpha.SearchAds360Link() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomMetric() + new protos.google.analytics.admin.v1alpha.SearchAds360Link() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomMetric() + new protos.google.analytics.admin.v1alpha.SearchAds360Link() ), ]; - client.innerApiCalls.listCustomMetrics = + client.innerApiCalls.listSearchAds360Links = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listCustomMetrics( + client.listSearchAds360Links( request, ( err?: Error | null, result?: - | protos.google.analytics.admin.v1alpha.ICustomMetric[] + | protos.google.analytics.admin.v1alpha.ISearchAds360Link[] | null ) => { if (err) { @@ -16327,16 +18934,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listCustomMetrics as SinonStub + client.innerApiCalls.listSearchAds360Links as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listCustomMetrics as SinonStub + client.innerApiCalls.listSearchAds360Links as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listCustomMetrics with error', async () => { + it('invokes listSearchAds360Links with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -16344,31 +18951,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() + new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', + '.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listCustomMetrics = stubSimpleCall( + client.innerApiCalls.listSearchAds360Links = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listCustomMetrics(request), expectedError); + await assert.rejects( + client.listSearchAds360Links(request), + expectedError + ); const actualRequest = ( - client.innerApiCalls.listCustomMetrics as SinonStub + client.innerApiCalls.listSearchAds360Links as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listCustomMetrics as SinonStub + client.innerApiCalls.listSearchAds360Links as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listCustomMetricsStream without error', async () => { + it('invokes listSearchAds360LinksStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -16376,34 +18986,36 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() + new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', + '.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomMetric() + new protos.google.analytics.admin.v1alpha.SearchAds360Link() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomMetric() + new protos.google.analytics.admin.v1alpha.SearchAds360Link() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomMetric() + new protos.google.analytics.admin.v1alpha.SearchAds360Link() ), ]; - client.descriptors.page.listCustomMetrics.createStream = + client.descriptors.page.listSearchAds360Links.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listCustomMetricsStream(request); + const stream = client.listSearchAds360LinksStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.CustomMetric[] = + const responses: protos.google.analytics.admin.v1alpha.SearchAds360Link[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.CustomMetric) => { + ( + response: protos.google.analytics.admin.v1alpha.SearchAds360Link + ) => { responses.push(response); } ); @@ -16417,12 +19029,18 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listCustomMetrics.createStream as SinonStub) + ( + client.descriptors.page.listSearchAds360Links + .createStream as SinonStub + ) .getCall(0) - .calledWith(client.innerApiCalls.listCustomMetrics, request) + .calledWith(client.innerApiCalls.listSearchAds360Links, request) ); assert( - (client.descriptors.page.listCustomMetrics.createStream as SinonStub) + ( + client.descriptors.page.listSearchAds360Links + .createStream as SinonStub + ) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -16430,7 +19048,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('invokes listCustomMetricsStream with error', async () => { + it('invokes listSearchAds360LinksStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -16438,24 +19056,26 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() + new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', + '.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listCustomMetrics.createStream = + client.descriptors.page.listSearchAds360Links.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listCustomMetricsStream(request); + const stream = client.listSearchAds360LinksStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.CustomMetric[] = + const responses: protos.google.analytics.admin.v1alpha.SearchAds360Link[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.CustomMetric) => { + ( + response: protos.google.analytics.admin.v1alpha.SearchAds360Link + ) => { responses.push(response); } ); @@ -16468,12 +19088,18 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listCustomMetrics.createStream as SinonStub) + ( + client.descriptors.page.listSearchAds360Links + .createStream as SinonStub + ) .getCall(0) - .calledWith(client.innerApiCalls.listCustomMetrics, request) + .calledWith(client.innerApiCalls.listSearchAds360Links, request) ); assert( - (client.descriptors.page.listCustomMetrics.createStream as SinonStub) + ( + client.descriptors.page.listSearchAds360Links + .createStream as SinonStub + ) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -16481,7 +19107,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listCustomMetrics without error', async () => { + it('uses async iteration with listSearchAds360Links without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -16489,42 +19115,46 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() + new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', + '.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomMetric() + new protos.google.analytics.admin.v1alpha.SearchAds360Link() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomMetric() + new protos.google.analytics.admin.v1alpha.SearchAds360Link() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.CustomMetric() + new protos.google.analytics.admin.v1alpha.SearchAds360Link() ), ]; - client.descriptors.page.listCustomMetrics.asyncIterate = + client.descriptors.page.listSearchAds360Links.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.ICustomMetric[] = + const responses: protos.google.analytics.admin.v1alpha.ISearchAds360Link[] = []; - const iterable = client.listCustomMetricsAsync(request); + const iterable = client.listSearchAds360LinksAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listCustomMetrics.asyncIterate as SinonStub + client.descriptors.page.listSearchAds360Links + .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listCustomMetrics.asyncIterate as SinonStub) + ( + client.descriptors.page.listSearchAds360Links + .asyncIterate as SinonStub + ) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -16532,7 +19162,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listCustomMetrics with error', async () => { + it('uses async iteration with listSearchAds360Links with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -16540,20 +19170,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() + new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', + '.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listCustomMetrics.asyncIterate = + client.descriptors.page.listSearchAds360Links.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listCustomMetricsAsync(request); + const iterable = client.listSearchAds360LinksAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.ICustomMetric[] = + const responses: protos.google.analytics.admin.v1alpha.ISearchAds360Link[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -16561,12 +19191,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listCustomMetrics.asyncIterate as SinonStub + client.descriptors.page.listSearchAds360Links + .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listCustomMetrics.asyncIterate as SinonStub) + ( + client.descriptors.page.listSearchAds360Links + .asyncIterate as SinonStub + ) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -16575,8 +19209,8 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('listDataStreams', () => { - it('invokes listDataStreams without error', async () => { + describe('listAccessBindings', () => { + it('invokes listAccessBindings without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -16584,39 +19218,40 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() + new protos.google.analytics.admin.v1alpha.ListAccessBindingsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDataStreamsRequest', + '.google.analytics.admin.v1alpha.ListAccessBindingsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DataStream() + new protos.google.analytics.admin.v1alpha.AccessBinding() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DataStream() + new protos.google.analytics.admin.v1alpha.AccessBinding() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DataStream() + new protos.google.analytics.admin.v1alpha.AccessBinding() ), ]; - client.innerApiCalls.listDataStreams = stubSimpleCall(expectedResponse); - const [response] = await client.listDataStreams(request); + client.innerApiCalls.listAccessBindings = + stubSimpleCall(expectedResponse); + const [response] = await client.listAccessBindings(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listDataStreams as SinonStub + client.innerApiCalls.listAccessBindings as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listDataStreams as SinonStub + client.innerApiCalls.listAccessBindings as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listDataStreams without error using callback', async () => { + it('invokes listAccessBindings without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -16624,33 +19259,35 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() + new protos.google.analytics.admin.v1alpha.ListAccessBindingsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDataStreamsRequest', + '.google.analytics.admin.v1alpha.ListAccessBindingsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DataStream() + new protos.google.analytics.admin.v1alpha.AccessBinding() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DataStream() + new protos.google.analytics.admin.v1alpha.AccessBinding() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DataStream() + new protos.google.analytics.admin.v1alpha.AccessBinding() ), ]; - client.innerApiCalls.listDataStreams = + client.innerApiCalls.listAccessBindings = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listDataStreams( + client.listAccessBindings( request, ( err?: Error | null, - result?: protos.google.analytics.admin.v1alpha.IDataStream[] | null + result?: + | protos.google.analytics.admin.v1alpha.IAccessBinding[] + | null ) => { if (err) { reject(err); @@ -16663,16 +19300,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listDataStreams as SinonStub + client.innerApiCalls.listAccessBindings as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listDataStreams as SinonStub + client.innerApiCalls.listAccessBindings as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listDataStreams with error', async () => { + it('invokes listAccessBindings with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -16680,31 +19317,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() + new protos.google.analytics.admin.v1alpha.ListAccessBindingsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDataStreamsRequest', + '.google.analytics.admin.v1alpha.ListAccessBindingsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listDataStreams = stubSimpleCall( + client.innerApiCalls.listAccessBindings = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listDataStreams(request), expectedError); + await assert.rejects(client.listAccessBindings(request), expectedError); const actualRequest = ( - client.innerApiCalls.listDataStreams as SinonStub + client.innerApiCalls.listAccessBindings as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listDataStreams as SinonStub + client.innerApiCalls.listAccessBindings as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listDataStreamsStream without error', async () => { + it('invokes listAccessBindingsStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -16712,34 +19349,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() + new protos.google.analytics.admin.v1alpha.ListAccessBindingsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDataStreamsRequest', + '.google.analytics.admin.v1alpha.ListAccessBindingsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DataStream() + new protos.google.analytics.admin.v1alpha.AccessBinding() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DataStream() + new protos.google.analytics.admin.v1alpha.AccessBinding() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DataStream() + new protos.google.analytics.admin.v1alpha.AccessBinding() ), ]; - client.descriptors.page.listDataStreams.createStream = + client.descriptors.page.listAccessBindings.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listDataStreamsStream(request); + const stream = client.listAccessBindingsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.DataStream[] = + const responses: protos.google.analytics.admin.v1alpha.AccessBinding[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.DataStream) => { + (response: protos.google.analytics.admin.v1alpha.AccessBinding) => { responses.push(response); } ); @@ -16753,12 +19390,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listDataStreams.createStream as SinonStub) + (client.descriptors.page.listAccessBindings.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listDataStreams, request) + .calledWith(client.innerApiCalls.listAccessBindings, request) ); assert( - (client.descriptors.page.listDataStreams.createStream as SinonStub) + (client.descriptors.page.listAccessBindings.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -16766,7 +19403,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('invokes listDataStreamsStream with error', async () => { + it('invokes listAccessBindingsStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -16774,24 +19411,24 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() + new protos.google.analytics.admin.v1alpha.ListAccessBindingsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDataStreamsRequest', + '.google.analytics.admin.v1alpha.ListAccessBindingsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listDataStreams.createStream = + client.descriptors.page.listAccessBindings.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listDataStreamsStream(request); + const stream = client.listAccessBindingsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.DataStream[] = + const responses: protos.google.analytics.admin.v1alpha.AccessBinding[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.DataStream) => { + (response: protos.google.analytics.admin.v1alpha.AccessBinding) => { responses.push(response); } ); @@ -16804,12 +19441,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listDataStreams.createStream as SinonStub) + (client.descriptors.page.listAccessBindings.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listDataStreams, request) + .calledWith(client.innerApiCalls.listAccessBindings, request) ); assert( - (client.descriptors.page.listDataStreams.createStream as SinonStub) + (client.descriptors.page.listAccessBindings.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -16817,7 +19454,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listDataStreams without error', async () => { + it('uses async iteration with listAccessBindings without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -16825,41 +19462,42 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() + new protos.google.analytics.admin.v1alpha.ListAccessBindingsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDataStreamsRequest', + '.google.analytics.admin.v1alpha.ListAccessBindingsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DataStream() + new protos.google.analytics.admin.v1alpha.AccessBinding() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DataStream() + new protos.google.analytics.admin.v1alpha.AccessBinding() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.DataStream() + new protos.google.analytics.admin.v1alpha.AccessBinding() ), ]; - client.descriptors.page.listDataStreams.asyncIterate = + client.descriptors.page.listAccessBindings.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.IDataStream[] = []; - const iterable = client.listDataStreamsAsync(request); + const responses: protos.google.analytics.admin.v1alpha.IAccessBinding[] = + []; + const iterable = client.listAccessBindingsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listDataStreams.asyncIterate as SinonStub + client.descriptors.page.listAccessBindings.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listDataStreams.asyncIterate as SinonStub) + (client.descriptors.page.listAccessBindings.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -16867,7 +19505,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listDataStreams with error', async () => { + it('uses async iteration with listAccessBindings with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -16875,20 +19513,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() + new protos.google.analytics.admin.v1alpha.ListAccessBindingsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListDataStreamsRequest', + '.google.analytics.admin.v1alpha.ListAccessBindingsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listDataStreams.asyncIterate = + client.descriptors.page.listAccessBindings.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listDataStreamsAsync(request); + const iterable = client.listAccessBindingsAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.IDataStream[] = + const responses: protos.google.analytics.admin.v1alpha.IAccessBinding[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -16896,12 +19534,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listDataStreams.asyncIterate as SinonStub + client.descriptors.page.listAccessBindings.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listDataStreams.asyncIterate as SinonStub) + (client.descriptors.page.listAccessBindings.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -16910,8 +19548,8 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('listAudiences', () => { - it('invokes listAudiences without error', async () => { + describe('listExpandedDataSets', () => { + it('invokes listExpandedDataSets without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -16919,39 +19557,40 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() + new protos.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListAudiencesRequest', + '.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Audience() + new protos.google.analytics.admin.v1alpha.ExpandedDataSet() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Audience() + new protos.google.analytics.admin.v1alpha.ExpandedDataSet() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Audience() + new protos.google.analytics.admin.v1alpha.ExpandedDataSet() ), ]; - client.innerApiCalls.listAudiences = stubSimpleCall(expectedResponse); - const [response] = await client.listAudiences(request); + client.innerApiCalls.listExpandedDataSets = + stubSimpleCall(expectedResponse); + const [response] = await client.listExpandedDataSets(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listAudiences as SinonStub + client.innerApiCalls.listExpandedDataSets as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listAudiences as SinonStub + client.innerApiCalls.listExpandedDataSets as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listAudiences without error using callback', async () => { + it('invokes listExpandedDataSets without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -16959,33 +19598,35 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() + new protos.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListAudiencesRequest', + '.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Audience() + new protos.google.analytics.admin.v1alpha.ExpandedDataSet() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Audience() + new protos.google.analytics.admin.v1alpha.ExpandedDataSet() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Audience() + new protos.google.analytics.admin.v1alpha.ExpandedDataSet() ), ]; - client.innerApiCalls.listAudiences = + client.innerApiCalls.listExpandedDataSets = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listAudiences( + client.listExpandedDataSets( request, ( err?: Error | null, - result?: protos.google.analytics.admin.v1alpha.IAudience[] | null + result?: + | protos.google.analytics.admin.v1alpha.IExpandedDataSet[] + | null ) => { if (err) { reject(err); @@ -16998,16 +19639,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listAudiences as SinonStub + client.innerApiCalls.listExpandedDataSets as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listAudiences as SinonStub + client.innerApiCalls.listExpandedDataSets as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listAudiences with error', async () => { + it('invokes listExpandedDataSets with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -17015,31 +19656,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() + new protos.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListAudiencesRequest', + '.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listAudiences = stubSimpleCall( + client.innerApiCalls.listExpandedDataSets = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listAudiences(request), expectedError); + await assert.rejects(client.listExpandedDataSets(request), expectedError); const actualRequest = ( - client.innerApiCalls.listAudiences as SinonStub + client.innerApiCalls.listExpandedDataSets as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listAudiences as SinonStub + client.innerApiCalls.listExpandedDataSets as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listAudiencesStream without error', async () => { + it('invokes listExpandedDataSetsStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -17047,33 +19688,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() + new protos.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListAudiencesRequest', + '.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Audience() + new protos.google.analytics.admin.v1alpha.ExpandedDataSet() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Audience() + new protos.google.analytics.admin.v1alpha.ExpandedDataSet() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Audience() + new protos.google.analytics.admin.v1alpha.ExpandedDataSet() ), ]; - client.descriptors.page.listAudiences.createStream = + client.descriptors.page.listExpandedDataSets.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listAudiencesStream(request); + const stream = client.listExpandedDataSetsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.Audience[] = []; + const responses: protos.google.analytics.admin.v1alpha.ExpandedDataSet[] = + []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.Audience) => { + (response: protos.google.analytics.admin.v1alpha.ExpandedDataSet) => { responses.push(response); } ); @@ -17087,12 +19729,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listAudiences.createStream as SinonStub) + (client.descriptors.page.listExpandedDataSets.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listAudiences, request) + .calledWith(client.innerApiCalls.listExpandedDataSets, request) ); assert( - (client.descriptors.page.listAudiences.createStream as SinonStub) + (client.descriptors.page.listExpandedDataSets.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -17100,7 +19742,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('invokes listAudiencesStream with error', async () => { + it('invokes listExpandedDataSetsStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -17108,23 +19750,24 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() + new protos.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListAudiencesRequest', + '.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listAudiences.createStream = + client.descriptors.page.listExpandedDataSets.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listAudiencesStream(request); + const stream = client.listExpandedDataSetsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.Audience[] = []; + const responses: protos.google.analytics.admin.v1alpha.ExpandedDataSet[] = + []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.Audience) => { + (response: protos.google.analytics.admin.v1alpha.ExpandedDataSet) => { responses.push(response); } ); @@ -17137,12 +19780,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listAudiences.createStream as SinonStub) + (client.descriptors.page.listExpandedDataSets.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listAudiences, request) + .calledWith(client.innerApiCalls.listExpandedDataSets, request) ); assert( - (client.descriptors.page.listAudiences.createStream as SinonStub) + (client.descriptors.page.listExpandedDataSets.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -17150,7 +19793,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listAudiences without error', async () => { + it('uses async iteration with listExpandedDataSets without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -17158,41 +19801,42 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() + new protos.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListAudiencesRequest', + '.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Audience() + new protos.google.analytics.admin.v1alpha.ExpandedDataSet() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Audience() + new protos.google.analytics.admin.v1alpha.ExpandedDataSet() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.Audience() + new protos.google.analytics.admin.v1alpha.ExpandedDataSet() ), ]; - client.descriptors.page.listAudiences.asyncIterate = + client.descriptors.page.listExpandedDataSets.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.IAudience[] = []; - const iterable = client.listAudiencesAsync(request); + const responses: protos.google.analytics.admin.v1alpha.IExpandedDataSet[] = + []; + const iterable = client.listExpandedDataSetsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listAudiences.asyncIterate as SinonStub + client.descriptors.page.listExpandedDataSets.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listAudiences.asyncIterate as SinonStub) + (client.descriptors.page.listExpandedDataSets.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -17200,7 +19844,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listAudiences with error', async () => { + it('uses async iteration with listExpandedDataSets with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -17208,32 +19852,33 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() + new protos.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListAudiencesRequest', + '.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listAudiences.asyncIterate = + client.descriptors.page.listExpandedDataSets.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listAudiencesAsync(request); + const iterable = client.listExpandedDataSetsAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.IAudience[] = []; + const responses: protos.google.analytics.admin.v1alpha.IExpandedDataSet[] = + []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( ( - client.descriptors.page.listAudiences.asyncIterate as SinonStub + client.descriptors.page.listExpandedDataSets.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listAudiences.asyncIterate as SinonStub) + (client.descriptors.page.listExpandedDataSets.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -17242,8 +19887,8 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('listSearchAds360Links', () => { - it('invokes listSearchAds360Links without error', async () => { + describe('listChannelGroups', () => { + it('invokes listChannelGroups without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -17251,40 +19896,39 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() + new protos.google.analytics.admin.v1alpha.ListChannelGroupsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest', + '.google.analytics.admin.v1alpha.ListChannelGroupsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchAds360Link() + new protos.google.analytics.admin.v1alpha.ChannelGroup() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchAds360Link() + new protos.google.analytics.admin.v1alpha.ChannelGroup() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchAds360Link() + new protos.google.analytics.admin.v1alpha.ChannelGroup() ), ]; - client.innerApiCalls.listSearchAds360Links = - stubSimpleCall(expectedResponse); - const [response] = await client.listSearchAds360Links(request); + client.innerApiCalls.listChannelGroups = stubSimpleCall(expectedResponse); + const [response] = await client.listChannelGroups(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listSearchAds360Links as SinonStub + client.innerApiCalls.listChannelGroups as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listSearchAds360Links as SinonStub + client.innerApiCalls.listChannelGroups as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listSearchAds360Links without error using callback', async () => { + it('invokes listChannelGroups without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -17292,34 +19936,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() + new protos.google.analytics.admin.v1alpha.ListChannelGroupsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest', + '.google.analytics.admin.v1alpha.ListChannelGroupsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchAds360Link() + new protos.google.analytics.admin.v1alpha.ChannelGroup() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchAds360Link() + new protos.google.analytics.admin.v1alpha.ChannelGroup() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchAds360Link() + new protos.google.analytics.admin.v1alpha.ChannelGroup() ), ]; - client.innerApiCalls.listSearchAds360Links = + client.innerApiCalls.listChannelGroups = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listSearchAds360Links( + client.listChannelGroups( request, ( err?: Error | null, result?: - | protos.google.analytics.admin.v1alpha.ISearchAds360Link[] + | protos.google.analytics.admin.v1alpha.IChannelGroup[] | null ) => { if (err) { @@ -17333,16 +19977,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listSearchAds360Links as SinonStub + client.innerApiCalls.listChannelGroups as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listSearchAds360Links as SinonStub + client.innerApiCalls.listChannelGroups as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listSearchAds360Links with error', async () => { + it('invokes listChannelGroups with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -17350,34 +19994,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() + new protos.google.analytics.admin.v1alpha.ListChannelGroupsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest', + '.google.analytics.admin.v1alpha.ListChannelGroupsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listSearchAds360Links = stubSimpleCall( + client.innerApiCalls.listChannelGroups = stubSimpleCall( undefined, expectedError ); - await assert.rejects( - client.listSearchAds360Links(request), - expectedError - ); + await assert.rejects(client.listChannelGroups(request), expectedError); const actualRequest = ( - client.innerApiCalls.listSearchAds360Links as SinonStub + client.innerApiCalls.listChannelGroups as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listSearchAds360Links as SinonStub + client.innerApiCalls.listChannelGroups as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listSearchAds360LinksStream without error', async () => { + it('invokes listChannelGroupsStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -17385,36 +20026,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() + new protos.google.analytics.admin.v1alpha.ListChannelGroupsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest', + '.google.analytics.admin.v1alpha.ListChannelGroupsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchAds360Link() + new protos.google.analytics.admin.v1alpha.ChannelGroup() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchAds360Link() + new protos.google.analytics.admin.v1alpha.ChannelGroup() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchAds360Link() + new protos.google.analytics.admin.v1alpha.ChannelGroup() ), ]; - client.descriptors.page.listSearchAds360Links.createStream = + client.descriptors.page.listChannelGroups.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listSearchAds360LinksStream(request); + const stream = client.listChannelGroupsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.SearchAds360Link[] = + const responses: protos.google.analytics.admin.v1alpha.ChannelGroup[] = []; stream.on( 'data', - ( - response: protos.google.analytics.admin.v1alpha.SearchAds360Link - ) => { + (response: protos.google.analytics.admin.v1alpha.ChannelGroup) => { responses.push(response); } ); @@ -17428,18 +20067,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - ( - client.descriptors.page.listSearchAds360Links - .createStream as SinonStub - ) + (client.descriptors.page.listChannelGroups.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listSearchAds360Links, request) + .calledWith(client.innerApiCalls.listChannelGroups, request) ); assert( - ( - client.descriptors.page.listSearchAds360Links - .createStream as SinonStub - ) + (client.descriptors.page.listChannelGroups.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -17447,7 +20080,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('invokes listSearchAds360LinksStream with error', async () => { + it('invokes listChannelGroupsStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -17455,26 +20088,24 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() + new protos.google.analytics.admin.v1alpha.ListChannelGroupsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest', + '.google.analytics.admin.v1alpha.ListChannelGroupsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listSearchAds360Links.createStream = + client.descriptors.page.listChannelGroups.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listSearchAds360LinksStream(request); + const stream = client.listChannelGroupsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.SearchAds360Link[] = + const responses: protos.google.analytics.admin.v1alpha.ChannelGroup[] = []; stream.on( 'data', - ( - response: protos.google.analytics.admin.v1alpha.SearchAds360Link - ) => { + (response: protos.google.analytics.admin.v1alpha.ChannelGroup) => { responses.push(response); } ); @@ -17487,18 +20118,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - ( - client.descriptors.page.listSearchAds360Links - .createStream as SinonStub - ) + (client.descriptors.page.listChannelGroups.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listSearchAds360Links, request) + .calledWith(client.innerApiCalls.listChannelGroups, request) ); assert( - ( - client.descriptors.page.listSearchAds360Links - .createStream as SinonStub - ) + (client.descriptors.page.listChannelGroups.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -17506,7 +20131,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listSearchAds360Links without error', async () => { + it('uses async iteration with listChannelGroups without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -17514,46 +20139,42 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() + new protos.google.analytics.admin.v1alpha.ListChannelGroupsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest', + '.google.analytics.admin.v1alpha.ListChannelGroupsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchAds360Link() + new protos.google.analytics.admin.v1alpha.ChannelGroup() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchAds360Link() + new protos.google.analytics.admin.v1alpha.ChannelGroup() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.SearchAds360Link() + new protos.google.analytics.admin.v1alpha.ChannelGroup() ), ]; - client.descriptors.page.listSearchAds360Links.asyncIterate = + client.descriptors.page.listChannelGroups.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.ISearchAds360Link[] = + const responses: protos.google.analytics.admin.v1alpha.IChannelGroup[] = []; - const iterable = client.listSearchAds360LinksAsync(request); + const iterable = client.listChannelGroupsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listSearchAds360Links - .asyncIterate as SinonStub + client.descriptors.page.listChannelGroups.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - ( - client.descriptors.page.listSearchAds360Links - .asyncIterate as SinonStub - ) + (client.descriptors.page.listChannelGroups.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -17561,7 +20182,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listSearchAds360Links with error', async () => { + it('uses async iteration with listChannelGroups with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -17569,20 +20190,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest() + new protos.google.analytics.admin.v1alpha.ListChannelGroupsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListSearchAds360LinksRequest', + '.google.analytics.admin.v1alpha.ListChannelGroupsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listSearchAds360Links.asyncIterate = + client.descriptors.page.listChannelGroups.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listSearchAds360LinksAsync(request); + const iterable = client.listChannelGroupsAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.ISearchAds360Link[] = + const responses: protos.google.analytics.admin.v1alpha.IChannelGroup[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -17590,16 +20211,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listSearchAds360Links - .asyncIterate as SinonStub + client.descriptors.page.listChannelGroups.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - ( - client.descriptors.page.listSearchAds360Links - .asyncIterate as SinonStub - ) + (client.descriptors.page.listChannelGroups.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -17608,8 +20225,8 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('listAccessBindings', () => { - it('invokes listAccessBindings without error', async () => { + describe('listBigQueryLinks', () => { + it('invokes listBigQueryLinks without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -17617,40 +20234,39 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccessBindingsRequest() + new protos.google.analytics.admin.v1alpha.ListBigQueryLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListAccessBindingsRequest', + '.google.analytics.admin.v1alpha.ListBigQueryLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccessBinding() + new protos.google.analytics.admin.v1alpha.BigQueryLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccessBinding() + new protos.google.analytics.admin.v1alpha.BigQueryLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccessBinding() + new protos.google.analytics.admin.v1alpha.BigQueryLink() ), ]; - client.innerApiCalls.listAccessBindings = - stubSimpleCall(expectedResponse); - const [response] = await client.listAccessBindings(request); + client.innerApiCalls.listBigQueryLinks = stubSimpleCall(expectedResponse); + const [response] = await client.listBigQueryLinks(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listAccessBindings as SinonStub + client.innerApiCalls.listBigQueryLinks as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listAccessBindings as SinonStub + client.innerApiCalls.listBigQueryLinks as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listAccessBindings without error using callback', async () => { + it('invokes listBigQueryLinks without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -17658,34 +20274,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccessBindingsRequest() + new protos.google.analytics.admin.v1alpha.ListBigQueryLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListAccessBindingsRequest', + '.google.analytics.admin.v1alpha.ListBigQueryLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccessBinding() + new protos.google.analytics.admin.v1alpha.BigQueryLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccessBinding() + new protos.google.analytics.admin.v1alpha.BigQueryLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccessBinding() + new protos.google.analytics.admin.v1alpha.BigQueryLink() ), ]; - client.innerApiCalls.listAccessBindings = + client.innerApiCalls.listBigQueryLinks = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listAccessBindings( + client.listBigQueryLinks( request, ( err?: Error | null, result?: - | protos.google.analytics.admin.v1alpha.IAccessBinding[] + | protos.google.analytics.admin.v1alpha.IBigQueryLink[] | null ) => { if (err) { @@ -17699,16 +20315,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listAccessBindings as SinonStub + client.innerApiCalls.listBigQueryLinks as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listAccessBindings as SinonStub + client.innerApiCalls.listBigQueryLinks as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listAccessBindings with error', async () => { + it('invokes listBigQueryLinks with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -17716,31 +20332,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccessBindingsRequest() + new protos.google.analytics.admin.v1alpha.ListBigQueryLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListAccessBindingsRequest', + '.google.analytics.admin.v1alpha.ListBigQueryLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listAccessBindings = stubSimpleCall( + client.innerApiCalls.listBigQueryLinks = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listAccessBindings(request), expectedError); + await assert.rejects(client.listBigQueryLinks(request), expectedError); const actualRequest = ( - client.innerApiCalls.listAccessBindings as SinonStub + client.innerApiCalls.listBigQueryLinks as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listAccessBindings as SinonStub + client.innerApiCalls.listBigQueryLinks as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listAccessBindingsStream without error', async () => { + it('invokes listBigQueryLinksStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -17748,34 +20364,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccessBindingsRequest() + new protos.google.analytics.admin.v1alpha.ListBigQueryLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListAccessBindingsRequest', + '.google.analytics.admin.v1alpha.ListBigQueryLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccessBinding() + new protos.google.analytics.admin.v1alpha.BigQueryLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccessBinding() + new protos.google.analytics.admin.v1alpha.BigQueryLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccessBinding() + new protos.google.analytics.admin.v1alpha.BigQueryLink() ), ]; - client.descriptors.page.listAccessBindings.createStream = + client.descriptors.page.listBigQueryLinks.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listAccessBindingsStream(request); + const stream = client.listBigQueryLinksStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.AccessBinding[] = + const responses: protos.google.analytics.admin.v1alpha.BigQueryLink[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.AccessBinding) => { + (response: protos.google.analytics.admin.v1alpha.BigQueryLink) => { responses.push(response); } ); @@ -17789,12 +20405,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listAccessBindings.createStream as SinonStub) + (client.descriptors.page.listBigQueryLinks.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listAccessBindings, request) + .calledWith(client.innerApiCalls.listBigQueryLinks, request) ); assert( - (client.descriptors.page.listAccessBindings.createStream as SinonStub) + (client.descriptors.page.listBigQueryLinks.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -17802,7 +20418,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('invokes listAccessBindingsStream with error', async () => { + it('invokes listBigQueryLinksStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -17810,24 +20426,24 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccessBindingsRequest() + new protos.google.analytics.admin.v1alpha.ListBigQueryLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListAccessBindingsRequest', + '.google.analytics.admin.v1alpha.ListBigQueryLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listAccessBindings.createStream = + client.descriptors.page.listBigQueryLinks.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listAccessBindingsStream(request); + const stream = client.listBigQueryLinksStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.AccessBinding[] = + const responses: protos.google.analytics.admin.v1alpha.BigQueryLink[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.AccessBinding) => { + (response: protos.google.analytics.admin.v1alpha.BigQueryLink) => { responses.push(response); } ); @@ -17840,12 +20456,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listAccessBindings.createStream as SinonStub) + (client.descriptors.page.listBigQueryLinks.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listAccessBindings, request) + .calledWith(client.innerApiCalls.listBigQueryLinks, request) ); assert( - (client.descriptors.page.listAccessBindings.createStream as SinonStub) + (client.descriptors.page.listBigQueryLinks.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -17853,7 +20469,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listAccessBindings without error', async () => { + it('uses async iteration with listBigQueryLinks without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -17861,42 +20477,42 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccessBindingsRequest() + new protos.google.analytics.admin.v1alpha.ListBigQueryLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListAccessBindingsRequest', + '.google.analytics.admin.v1alpha.ListBigQueryLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccessBinding() + new protos.google.analytics.admin.v1alpha.BigQueryLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccessBinding() + new protos.google.analytics.admin.v1alpha.BigQueryLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.AccessBinding() + new protos.google.analytics.admin.v1alpha.BigQueryLink() ), ]; - client.descriptors.page.listAccessBindings.asyncIterate = + client.descriptors.page.listBigQueryLinks.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.IAccessBinding[] = + const responses: protos.google.analytics.admin.v1alpha.IBigQueryLink[] = []; - const iterable = client.listAccessBindingsAsync(request); + const iterable = client.listBigQueryLinksAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listAccessBindings.asyncIterate as SinonStub + client.descriptors.page.listBigQueryLinks.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listAccessBindings.asyncIterate as SinonStub) + (client.descriptors.page.listBigQueryLinks.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -17904,7 +20520,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listAccessBindings with error', async () => { + it('uses async iteration with listBigQueryLinks with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -17912,20 +20528,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListAccessBindingsRequest() + new protos.google.analytics.admin.v1alpha.ListBigQueryLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListAccessBindingsRequest', + '.google.analytics.admin.v1alpha.ListBigQueryLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listAccessBindings.asyncIterate = + client.descriptors.page.listBigQueryLinks.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listAccessBindingsAsync(request); + const iterable = client.listBigQueryLinksAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.IAccessBinding[] = + const responses: protos.google.analytics.admin.v1alpha.IBigQueryLink[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -17933,12 +20549,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listAccessBindings.asyncIterate as SinonStub + client.descriptors.page.listBigQueryLinks.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listAccessBindings.asyncIterate as SinonStub) + (client.descriptors.page.listBigQueryLinks.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -17947,8 +20563,8 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('listExpandedDataSets', () => { - it('invokes listExpandedDataSets without error', async () => { + describe('listAdSenseLinks', () => { + it('invokes listAdSenseLinks without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -17956,40 +20572,39 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest() + new protos.google.analytics.admin.v1alpha.ListAdSenseLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest', + '.google.analytics.admin.v1alpha.ListAdSenseLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ExpandedDataSet() + new protos.google.analytics.admin.v1alpha.AdSenseLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ExpandedDataSet() + new protos.google.analytics.admin.v1alpha.AdSenseLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ExpandedDataSet() + new protos.google.analytics.admin.v1alpha.AdSenseLink() ), ]; - client.innerApiCalls.listExpandedDataSets = - stubSimpleCall(expectedResponse); - const [response] = await client.listExpandedDataSets(request); + client.innerApiCalls.listAdSenseLinks = stubSimpleCall(expectedResponse); + const [response] = await client.listAdSenseLinks(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listExpandedDataSets as SinonStub + client.innerApiCalls.listAdSenseLinks as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listExpandedDataSets as SinonStub + client.innerApiCalls.listAdSenseLinks as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listExpandedDataSets without error using callback', async () => { + it('invokes listAdSenseLinks without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -17997,35 +20612,33 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest() + new protos.google.analytics.admin.v1alpha.ListAdSenseLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest', + '.google.analytics.admin.v1alpha.ListAdSenseLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ExpandedDataSet() + new protos.google.analytics.admin.v1alpha.AdSenseLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ExpandedDataSet() + new protos.google.analytics.admin.v1alpha.AdSenseLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ExpandedDataSet() + new protos.google.analytics.admin.v1alpha.AdSenseLink() ), ]; - client.innerApiCalls.listExpandedDataSets = + client.innerApiCalls.listAdSenseLinks = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listExpandedDataSets( + client.listAdSenseLinks( request, ( err?: Error | null, - result?: - | protos.google.analytics.admin.v1alpha.IExpandedDataSet[] - | null + result?: protos.google.analytics.admin.v1alpha.IAdSenseLink[] | null ) => { if (err) { reject(err); @@ -18038,16 +20651,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listExpandedDataSets as SinonStub + client.innerApiCalls.listAdSenseLinks as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listExpandedDataSets as SinonStub + client.innerApiCalls.listAdSenseLinks as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listExpandedDataSets with error', async () => { + it('invokes listAdSenseLinks with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -18055,31 +20668,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest() + new protos.google.analytics.admin.v1alpha.ListAdSenseLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest', + '.google.analytics.admin.v1alpha.ListAdSenseLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listExpandedDataSets = stubSimpleCall( + client.innerApiCalls.listAdSenseLinks = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listExpandedDataSets(request), expectedError); + await assert.rejects(client.listAdSenseLinks(request), expectedError); const actualRequest = ( - client.innerApiCalls.listExpandedDataSets as SinonStub + client.innerApiCalls.listAdSenseLinks as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listExpandedDataSets as SinonStub + client.innerApiCalls.listAdSenseLinks as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listExpandedDataSetsStream without error', async () => { + it('invokes listAdSenseLinksStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -18087,34 +20700,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest() + new protos.google.analytics.admin.v1alpha.ListAdSenseLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest', + '.google.analytics.admin.v1alpha.ListAdSenseLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ExpandedDataSet() + new protos.google.analytics.admin.v1alpha.AdSenseLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ExpandedDataSet() + new protos.google.analytics.admin.v1alpha.AdSenseLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ExpandedDataSet() + new protos.google.analytics.admin.v1alpha.AdSenseLink() ), ]; - client.descriptors.page.listExpandedDataSets.createStream = + client.descriptors.page.listAdSenseLinks.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listExpandedDataSetsStream(request); + const stream = client.listAdSenseLinksStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.ExpandedDataSet[] = + const responses: protos.google.analytics.admin.v1alpha.AdSenseLink[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.ExpandedDataSet) => { + (response: protos.google.analytics.admin.v1alpha.AdSenseLink) => { responses.push(response); } ); @@ -18128,12 +20741,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listExpandedDataSets.createStream as SinonStub) + (client.descriptors.page.listAdSenseLinks.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listExpandedDataSets, request) + .calledWith(client.innerApiCalls.listAdSenseLinks, request) ); assert( - (client.descriptors.page.listExpandedDataSets.createStream as SinonStub) + (client.descriptors.page.listAdSenseLinks.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -18141,7 +20754,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('invokes listExpandedDataSetsStream with error', async () => { + it('invokes listAdSenseLinksStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -18149,24 +20762,24 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest() + new protos.google.analytics.admin.v1alpha.ListAdSenseLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest', + '.google.analytics.admin.v1alpha.ListAdSenseLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listExpandedDataSets.createStream = + client.descriptors.page.listAdSenseLinks.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listExpandedDataSetsStream(request); + const stream = client.listAdSenseLinksStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.ExpandedDataSet[] = + const responses: protos.google.analytics.admin.v1alpha.AdSenseLink[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.ExpandedDataSet) => { + (response: protos.google.analytics.admin.v1alpha.AdSenseLink) => { responses.push(response); } ); @@ -18179,12 +20792,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listExpandedDataSets.createStream as SinonStub) + (client.descriptors.page.listAdSenseLinks.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listExpandedDataSets, request) + .calledWith(client.innerApiCalls.listAdSenseLinks, request) ); assert( - (client.descriptors.page.listExpandedDataSets.createStream as SinonStub) + (client.descriptors.page.listAdSenseLinks.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -18192,7 +20805,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listExpandedDataSets without error', async () => { + it('uses async iteration with listAdSenseLinks without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -18200,42 +20813,42 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest() + new protos.google.analytics.admin.v1alpha.ListAdSenseLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest', + '.google.analytics.admin.v1alpha.ListAdSenseLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ExpandedDataSet() + new protos.google.analytics.admin.v1alpha.AdSenseLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ExpandedDataSet() + new protos.google.analytics.admin.v1alpha.AdSenseLink() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ExpandedDataSet() + new protos.google.analytics.admin.v1alpha.AdSenseLink() ), ]; - client.descriptors.page.listExpandedDataSets.asyncIterate = + client.descriptors.page.listAdSenseLinks.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.IExpandedDataSet[] = + const responses: protos.google.analytics.admin.v1alpha.IAdSenseLink[] = []; - const iterable = client.listExpandedDataSetsAsync(request); + const iterable = client.listAdSenseLinksAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listExpandedDataSets.asyncIterate as SinonStub + client.descriptors.page.listAdSenseLinks.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listExpandedDataSets.asyncIterate as SinonStub) + (client.descriptors.page.listAdSenseLinks.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -18243,7 +20856,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listExpandedDataSets with error', async () => { + it('uses async iteration with listAdSenseLinks with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -18251,20 +20864,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest() + new protos.google.analytics.admin.v1alpha.ListAdSenseLinksRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListExpandedDataSetsRequest', + '.google.analytics.admin.v1alpha.ListAdSenseLinksRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listExpandedDataSets.asyncIterate = + client.descriptors.page.listAdSenseLinks.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listExpandedDataSetsAsync(request); + const iterable = client.listAdSenseLinksAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.IExpandedDataSet[] = + const responses: protos.google.analytics.admin.v1alpha.IAdSenseLink[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -18272,12 +20885,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listExpandedDataSets.asyncIterate as SinonStub + client.descriptors.page.listAdSenseLinks.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listExpandedDataSets.asyncIterate as SinonStub) + (client.descriptors.page.listAdSenseLinks.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -18286,8 +20899,8 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); - describe('listBigQueryLinks', () => { - it('invokes listBigQueryLinks without error', async () => { + describe('listEventCreateRules', () => { + it('invokes listEventCreateRules without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -18295,39 +20908,40 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListBigQueryLinksRequest() + new protos.google.analytics.admin.v1alpha.ListEventCreateRulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListBigQueryLinksRequest', + '.google.analytics.admin.v1alpha.ListEventCreateRulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.BigQueryLink() + new protos.google.analytics.admin.v1alpha.EventCreateRule() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.BigQueryLink() + new protos.google.analytics.admin.v1alpha.EventCreateRule() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.BigQueryLink() + new protos.google.analytics.admin.v1alpha.EventCreateRule() ), ]; - client.innerApiCalls.listBigQueryLinks = stubSimpleCall(expectedResponse); - const [response] = await client.listBigQueryLinks(request); + client.innerApiCalls.listEventCreateRules = + stubSimpleCall(expectedResponse); + const [response] = await client.listEventCreateRules(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listBigQueryLinks as SinonStub + client.innerApiCalls.listEventCreateRules as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listBigQueryLinks as SinonStub + client.innerApiCalls.listEventCreateRules as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listBigQueryLinks without error using callback', async () => { + it('invokes listEventCreateRules without error using callback', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -18335,34 +20949,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListBigQueryLinksRequest() + new protos.google.analytics.admin.v1alpha.ListEventCreateRulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListBigQueryLinksRequest', + '.google.analytics.admin.v1alpha.ListEventCreateRulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.BigQueryLink() + new protos.google.analytics.admin.v1alpha.EventCreateRule() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.BigQueryLink() + new protos.google.analytics.admin.v1alpha.EventCreateRule() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.BigQueryLink() + new protos.google.analytics.admin.v1alpha.EventCreateRule() ), ]; - client.innerApiCalls.listBigQueryLinks = + client.innerApiCalls.listEventCreateRules = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listBigQueryLinks( + client.listEventCreateRules( request, ( err?: Error | null, result?: - | protos.google.analytics.admin.v1alpha.IBigQueryLink[] + | protos.google.analytics.admin.v1alpha.IEventCreateRule[] | null ) => { if (err) { @@ -18376,16 +20990,16 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listBigQueryLinks as SinonStub + client.innerApiCalls.listEventCreateRules as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listBigQueryLinks as SinonStub + client.innerApiCalls.listEventCreateRules as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listBigQueryLinks with error', async () => { + it('invokes listEventCreateRules with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -18393,31 +21007,31 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListBigQueryLinksRequest() + new protos.google.analytics.admin.v1alpha.ListEventCreateRulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListBigQueryLinksRequest', + '.google.analytics.admin.v1alpha.ListEventCreateRulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listBigQueryLinks = stubSimpleCall( + client.innerApiCalls.listEventCreateRules = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listBigQueryLinks(request), expectedError); + await assert.rejects(client.listEventCreateRules(request), expectedError); const actualRequest = ( - client.innerApiCalls.listBigQueryLinks as SinonStub + client.innerApiCalls.listEventCreateRules as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listBigQueryLinks as SinonStub + client.innerApiCalls.listEventCreateRules as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listBigQueryLinksStream without error', async () => { + it('invokes listEventCreateRulesStream without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -18425,34 +21039,34 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListBigQueryLinksRequest() + new protos.google.analytics.admin.v1alpha.ListEventCreateRulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListBigQueryLinksRequest', + '.google.analytics.admin.v1alpha.ListEventCreateRulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.BigQueryLink() + new protos.google.analytics.admin.v1alpha.EventCreateRule() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.BigQueryLink() + new protos.google.analytics.admin.v1alpha.EventCreateRule() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.BigQueryLink() + new protos.google.analytics.admin.v1alpha.EventCreateRule() ), ]; - client.descriptors.page.listBigQueryLinks.createStream = + client.descriptors.page.listEventCreateRules.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listBigQueryLinksStream(request); + const stream = client.listEventCreateRulesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.BigQueryLink[] = + const responses: protos.google.analytics.admin.v1alpha.EventCreateRule[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.BigQueryLink) => { + (response: protos.google.analytics.admin.v1alpha.EventCreateRule) => { responses.push(response); } ); @@ -18466,12 +21080,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listBigQueryLinks.createStream as SinonStub) + (client.descriptors.page.listEventCreateRules.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listBigQueryLinks, request) + .calledWith(client.innerApiCalls.listEventCreateRules, request) ); assert( - (client.descriptors.page.listBigQueryLinks.createStream as SinonStub) + (client.descriptors.page.listEventCreateRules.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -18479,7 +21093,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('invokes listBigQueryLinksStream with error', async () => { + it('invokes listEventCreateRulesStream with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -18487,24 +21101,24 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListBigQueryLinksRequest() + new protos.google.analytics.admin.v1alpha.ListEventCreateRulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListBigQueryLinksRequest', + '.google.analytics.admin.v1alpha.ListEventCreateRulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listBigQueryLinks.createStream = + client.descriptors.page.listEventCreateRules.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listBigQueryLinksStream(request); + const stream = client.listEventCreateRulesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.analytics.admin.v1alpha.BigQueryLink[] = + const responses: protos.google.analytics.admin.v1alpha.EventCreateRule[] = []; stream.on( 'data', - (response: protos.google.analytics.admin.v1alpha.BigQueryLink) => { + (response: protos.google.analytics.admin.v1alpha.EventCreateRule) => { responses.push(response); } ); @@ -18517,12 +21131,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listBigQueryLinks.createStream as SinonStub) + (client.descriptors.page.listEventCreateRules.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listBigQueryLinks, request) + .calledWith(client.innerApiCalls.listEventCreateRules, request) ); assert( - (client.descriptors.page.listBigQueryLinks.createStream as SinonStub) + (client.descriptors.page.listEventCreateRules.createStream as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -18530,7 +21144,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listBigQueryLinks without error', async () => { + it('uses async iteration with listEventCreateRules without error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -18538,42 +21152,42 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListBigQueryLinksRequest() + new protos.google.analytics.admin.v1alpha.ListEventCreateRulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListBigQueryLinksRequest', + '.google.analytics.admin.v1alpha.ListEventCreateRulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.analytics.admin.v1alpha.BigQueryLink() + new protos.google.analytics.admin.v1alpha.EventCreateRule() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.BigQueryLink() + new protos.google.analytics.admin.v1alpha.EventCreateRule() ), generateSampleMessage( - new protos.google.analytics.admin.v1alpha.BigQueryLink() + new protos.google.analytics.admin.v1alpha.EventCreateRule() ), ]; - client.descriptors.page.listBigQueryLinks.asyncIterate = + client.descriptors.page.listEventCreateRules.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.analytics.admin.v1alpha.IBigQueryLink[] = + const responses: protos.google.analytics.admin.v1alpha.IEventCreateRule[] = []; - const iterable = client.listBigQueryLinksAsync(request); + const iterable = client.listEventCreateRulesAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listBigQueryLinks.asyncIterate as SinonStub + client.descriptors.page.listEventCreateRules.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listBigQueryLinks.asyncIterate as SinonStub) + (client.descriptors.page.listEventCreateRules.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -18581,7 +21195,7 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { ); }); - it('uses async iteration with listBigQueryLinks with error', async () => { + it('uses async iteration with listEventCreateRules with error', async () => { const client = new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -18589,20 +21203,20 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.analytics.admin.v1alpha.ListBigQueryLinksRequest() + new protos.google.analytics.admin.v1alpha.ListEventCreateRulesRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.analytics.admin.v1alpha.ListBigQueryLinksRequest', + '.google.analytics.admin.v1alpha.ListEventCreateRulesRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listBigQueryLinks.asyncIterate = + client.descriptors.page.listEventCreateRules.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listBigQueryLinksAsync(request); + const iterable = client.listEventCreateRulesAsync(request); await assert.rejects(async () => { - const responses: protos.google.analytics.admin.v1alpha.IBigQueryLink[] = + const responses: protos.google.analytics.admin.v1alpha.IEventCreateRule[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -18610,12 +21224,12 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listBigQueryLinks.asyncIterate as SinonStub + client.descriptors.page.listEventCreateRules.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listBigQueryLinks.asyncIterate as SinonStub) + (client.descriptors.page.listEventCreateRules.asyncIterate as SinonStub) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -18821,6 +21435,59 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); + describe('adSenseLink', () => { + const fakePath = '/rendered/path/adSenseLink'; + const expectedParameters = { + property: 'propertyValue', + adsense_link: 'adsenseLinkValue', + }; + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.adSenseLinkPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.adSenseLinkPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('adSenseLinkPath', () => { + const result = client.adSenseLinkPath( + 'propertyValue', + 'adsenseLinkValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.adSenseLinkPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPropertyFromAdSenseLinkName', () => { + const result = client.matchPropertyFromAdSenseLinkName(fakePath); + assert.strictEqual(result, 'propertyValue'); + assert( + (client.pathTemplates.adSenseLinkPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAdsenseLinkFromAdSenseLinkName', () => { + const result = client.matchAdsenseLinkFromAdSenseLinkName(fakePath); + assert.strictEqual(result, 'adsenseLinkValue'); + assert( + (client.pathTemplates.adSenseLinkPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('attributionSettings', () => { const fakePath = '/rendered/path/attributionSettings'; const expectedParameters = { @@ -18970,6 +21637,59 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); + describe('channelGroup', () => { + const fakePath = '/rendered/path/channelGroup'; + const expectedParameters = { + property: 'propertyValue', + channel_group: 'channelGroupValue', + }; + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.channelGroupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.channelGroupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('channelGroupPath', () => { + const result = client.channelGroupPath( + 'propertyValue', + 'channelGroupValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.channelGroupPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPropertyFromChannelGroupName', () => { + const result = client.matchPropertyFromChannelGroupName(fakePath); + assert.strictEqual(result, 'propertyValue'); + assert( + (client.pathTemplates.channelGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchChannelGroupFromChannelGroupName', () => { + const result = client.matchChannelGroupFromChannelGroupName(fakePath); + assert.strictEqual(result, 'channelGroupValue'); + assert( + (client.pathTemplates.channelGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('conversionEvent', () => { const fakePath = '/rendered/path/conversionEvent'; const expectedParameters = { @@ -19432,6 +22152,72 @@ describe('v1alpha.AnalyticsAdminServiceClient', () => { }); }); + describe('eventCreateRule', () => { + const fakePath = '/rendered/path/eventCreateRule'; + const expectedParameters = { + property: 'propertyValue', + data_stream: 'dataStreamValue', + event_create_rule: 'eventCreateRuleValue', + }; + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.eventCreateRulePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.eventCreateRulePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('eventCreateRulePath', () => { + const result = client.eventCreateRulePath( + 'propertyValue', + 'dataStreamValue', + 'eventCreateRuleValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.eventCreateRulePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPropertyFromEventCreateRuleName', () => { + const result = client.matchPropertyFromEventCreateRuleName(fakePath); + assert.strictEqual(result, 'propertyValue'); + assert( + (client.pathTemplates.eventCreateRulePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStreamFromEventCreateRuleName', () => { + const result = client.matchDataStreamFromEventCreateRuleName(fakePath); + assert.strictEqual(result, 'dataStreamValue'); + assert( + (client.pathTemplates.eventCreateRulePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEventCreateRuleFromEventCreateRuleName', () => { + const result = + client.matchEventCreateRuleFromEventCreateRuleName(fakePath); + assert.strictEqual(result, 'eventCreateRuleValue'); + assert( + (client.pathTemplates.eventCreateRulePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('expandedDataSet', () => { const fakePath = '/rendered/path/expandedDataSet'; const expectedParameters = { diff --git a/packages/google-analytics-admin/webpack.config.js b/packages/google-analytics-admin/webpack.config.js index bdf5c2112db..27157b29125 100644 --- a/packages/google-analytics-admin/webpack.config.js +++ b/packages/google-analytics-admin/webpack.config.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2021 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-data/package.json b/packages/google-analytics-data/package.json index dcbde903a76..bd276226b97 100644 --- a/packages/google-analytics-data/package.json +++ b/packages/google-analytics-data/package.json @@ -30,17 +30,18 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", "docs-test": "linkinator docs", "fix": "gts fix", "lint": "gts check", - "prelint": "cd samples; npm link ../; npm i", "prepare": "npm run compile-protos && npm run compile", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "system-test": "npm run compile && c8 mocha build/system-test", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", "test": "c8 mocha build/test" }, "dependencies": { @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-analytics-data" -} - +} \ No newline at end of file diff --git a/packages/google-api-apikeys/package.json b/packages/google-api-apikeys/package.json index e0ccfac4550..f40a4a3d322 100644 --- a/packages/google-api-apikeys/package.json +++ b/packages/google-api-apikeys/package.json @@ -31,7 +31,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -39,10 +39,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -57,6 +58,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-api-servicecontrol/CHANGELOG.md b/packages/google-api-servicecontrol/CHANGELOG.md index 5238cb63034..dd18190c480 100644 --- a/packages/google-api-servicecontrol/CHANGELOG.md +++ b/packages/google-api-servicecontrol/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [2.3.0](https://github.com/googleapis/google-cloud-node/compare/service-control-v2.2.0...service-control-v2.3.0) (2023-05-09) + + +### Features + +* [servicecontrol] Log Analytics features of the Cloud Logging API ([#4252](https://github.com/googleapis/google-cloud-node/issues/4252)) ([07ebb81](https://github.com/googleapis/google-cloud-node/commit/07ebb81915abb57c6ce48614e8d39cc1fea84bdc)) + +## [2.2.0](https://github.com/googleapis/google-cloud-node/compare/service-control-v2.1.2...service-control-v2.2.0) (2023-05-02) + + +### Features + +* [servicecontrol] add a proto message used for batch mode resource info for ServiceController V2 ([#4213](https://github.com/googleapis/google-cloud-node/issues/4213)) ([14d2cc9](https://github.com/googleapis/google-cloud-node/commit/14d2cc9ccf3b974bce2fc3ab9ff96ec8bdf166bd)) + ## [2.1.2](https://github.com/googleapis/google-cloud-node/compare/service-control-v2.1.1...service-control-v2.1.2) (2023-04-13) diff --git a/packages/google-api-servicecontrol/README.md b/packages/google-api-servicecontrol/README.md index 00329df0e05..fcf1614a896 100644 --- a/packages/google-api-servicecontrol/README.md +++ b/packages/google-api-servicecontrol/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Service Control API: Node.js Client](https://github.com/googleapis/google-cloud-node) +# [Service Control API: Node.js Client](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-api-servicecontrol) [![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/service-control.svg)](https://www.npmjs.org/package/@google-cloud/service-control) @@ -81,17 +81,16 @@ reportOperationResults(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-api-servicecontrol/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Quota_controller.allocate_quota | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicecontrol/samples/generated/v1/quota_controller.allocate_quota.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicecontrol/samples/generated/v1/quota_controller.allocate_quota.js,samples/README.md) | -| Service_controller.check | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicecontrol/samples/generated/v1/service_controller.check.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicecontrol/samples/generated/v1/service_controller.check.js,samples/README.md) | -| Service_controller.report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicecontrol/samples/generated/v1/service_controller.report.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicecontrol/samples/generated/v1/service_controller.report.js,samples/README.md) | -| Service_controller.check | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicecontrol/samples/generated/v2/service_controller.check.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicecontrol/samples/generated/v2/service_controller.check.js,samples/README.md) | -| Service_controller.report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicecontrol/samples/generated/v2/service_controller.report.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicecontrol/samples/generated/v2/service_controller.report.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicecontrol/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicecontrol/samples/quickstart.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicecontrol/samples/test/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicecontrol/samples/test/quickstart.js,samples/README.md) | +| Quota_controller.allocate_quota | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicecontrol/samples/generated/v1/quota_controller.allocate_quota.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicecontrol/samples/generated/v1/quota_controller.allocate_quota.js,packages/google-api-servicecontrol/samples/README.md) | +| Service_controller.check | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicecontrol/samples/generated/v1/service_controller.check.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicecontrol/samples/generated/v1/service_controller.check.js,packages/google-api-servicecontrol/samples/README.md) | +| Service_controller.report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicecontrol/samples/generated/v1/service_controller.report.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicecontrol/samples/generated/v1/service_controller.report.js,packages/google-api-servicecontrol/samples/README.md) | +| Service_controller.check | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicecontrol/samples/generated/v2/service_controller.check.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicecontrol/samples/generated/v2/service_controller.check.js,packages/google-api-servicecontrol/samples/README.md) | +| Service_controller.report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicecontrol/samples/generated/v2/service_controller.report.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicecontrol/samples/generated/v2/service_controller.report.js,packages/google-api-servicecontrol/samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicecontrol/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicecontrol/samples/quickstart.js,packages/google-api-servicecontrol/samples/README.md) | diff --git a/packages/google-api-servicecontrol/package.json b/packages/google-api-servicecontrol/package.json index 279dd3e67cc..5f8ab0f30fd 100644 --- a/packages/google-api-servicecontrol/package.json +++ b/packages/google-api-servicecontrol/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/service-control", - "version": "2.1.2", + "version": "2.3.0", "description": "Service control client for Node.js", "repository": { "type": "git", @@ -31,7 +31,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -39,10 +39,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -57,6 +58,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -70,5 +72,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-api-servicecontrol" -} - +} \ No newline at end of file diff --git a/packages/google-api-servicecontrol/protos/google/api/servicecontrol/v2/service_controller.proto b/packages/google-api-servicecontrol/protos/google/api/servicecontrol/v2/service_controller.proto index 2e2112ef374..ff226a02102 100644 --- a/packages/google-api-servicecontrol/protos/google/api/servicecontrol/v2/service_controller.proto +++ b/packages/google-api-servicecontrol/protos/google/api/servicecontrol/v2/service_controller.proto @@ -188,3 +188,9 @@ message ReportRequest { // Response message for the Report method. // If the request contains any invalid data, the server returns an RPC error. message ReportResponse {} + +// Message containing resource details in a batch mode. +message ResourceInfoList { + // The resource details. + repeated ResourceInfo resources = 1; +} diff --git a/packages/google-api-servicecontrol/protos/google/logging/type/http_request.proto b/packages/google-api-servicecontrol/protos/google/logging/type/http_request.proto index b878d60dce4..425a09d6e9c 100644 --- a/packages/google-api-servicecontrol/protos/google/logging/type/http_request.proto +++ b/packages/google-api-servicecontrol/protos/google/logging/type/http_request.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -67,7 +67,7 @@ message HttpRequest { // The referer URL of the request, as defined in // [HTTP/1.1 Header Field - // Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). + // Definitions](https://datatracker.ietf.org/doc/html/rfc2616#section-14.36). string referer = 8; // The request processing latency on the server, from the time the request was diff --git a/packages/google-api-servicecontrol/protos/google/logging/type/log_severity.proto b/packages/google-api-servicecontrol/protos/google/logging/type/log_severity.proto index bed71935f94..6740125811b 100644 --- a/packages/google-api-servicecontrol/protos/google/logging/type/log_severity.proto +++ b/packages/google-api-servicecontrol/protos/google/logging/type/log_severity.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-api-servicecontrol/protos/protos.d.ts b/packages/google-api-servicecontrol/protos/protos.d.ts index 2abccfac524..94f64bbf37d 100644 --- a/packages/google-api-servicecontrol/protos/protos.d.ts +++ b/packages/google-api-servicecontrol/protos/protos.d.ts @@ -7588,6 +7588,103 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of a ResourceInfoList. */ + interface IResourceInfoList { + + /** ResourceInfoList resources */ + resources?: (google.api.servicecontrol.v2.IResourceInfo[]|null); + } + + /** Represents a ResourceInfoList. */ + class ResourceInfoList implements IResourceInfoList { + + /** + * Constructs a new ResourceInfoList. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.servicecontrol.v2.IResourceInfoList); + + /** ResourceInfoList resources. */ + public resources: google.api.servicecontrol.v2.IResourceInfo[]; + + /** + * Creates a new ResourceInfoList instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceInfoList instance + */ + public static create(properties?: google.api.servicecontrol.v2.IResourceInfoList): google.api.servicecontrol.v2.ResourceInfoList; + + /** + * Encodes the specified ResourceInfoList message. Does not implicitly {@link google.api.servicecontrol.v2.ResourceInfoList.verify|verify} messages. + * @param message ResourceInfoList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.servicecontrol.v2.IResourceInfoList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceInfoList message, length delimited. Does not implicitly {@link google.api.servicecontrol.v2.ResourceInfoList.verify|verify} messages. + * @param message ResourceInfoList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.servicecontrol.v2.IResourceInfoList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceInfoList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceInfoList + * @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.api.servicecontrol.v2.ResourceInfoList; + + /** + * Decodes a ResourceInfoList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceInfoList + * @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.api.servicecontrol.v2.ResourceInfoList; + + /** + * Verifies a ResourceInfoList 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 ResourceInfoList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceInfoList + */ + public static fromObject(object: { [k: string]: any }): google.api.servicecontrol.v2.ResourceInfoList; + + /** + * Creates a plain object from a ResourceInfoList message. Also converts values to other types if specified. + * @param message ResourceInfoList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.servicecontrol.v2.ResourceInfoList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceInfoList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceInfoList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } } diff --git a/packages/google-api-servicecontrol/protos/protos.js b/packages/google-api-servicecontrol/protos/protos.js index c1b476b5527..d317d8c5759 100644 --- a/packages/google-api-servicecontrol/protos/protos.js +++ b/packages/google-api-servicecontrol/protos/protos.js @@ -20436,6 +20436,230 @@ return ReportResponse; })(); + v2.ResourceInfoList = (function() { + + /** + * Properties of a ResourceInfoList. + * @memberof google.api.servicecontrol.v2 + * @interface IResourceInfoList + * @property {Array.|null} [resources] ResourceInfoList resources + */ + + /** + * Constructs a new ResourceInfoList. + * @memberof google.api.servicecontrol.v2 + * @classdesc Represents a ResourceInfoList. + * @implements IResourceInfoList + * @constructor + * @param {google.api.servicecontrol.v2.IResourceInfoList=} [properties] Properties to set + */ + function ResourceInfoList(properties) { + this.resources = []; + 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]]; + } + + /** + * ResourceInfoList resources. + * @member {Array.} resources + * @memberof google.api.servicecontrol.v2.ResourceInfoList + * @instance + */ + ResourceInfoList.prototype.resources = $util.emptyArray; + + /** + * Creates a new ResourceInfoList instance using the specified properties. + * @function create + * @memberof google.api.servicecontrol.v2.ResourceInfoList + * @static + * @param {google.api.servicecontrol.v2.IResourceInfoList=} [properties] Properties to set + * @returns {google.api.servicecontrol.v2.ResourceInfoList} ResourceInfoList instance + */ + ResourceInfoList.create = function create(properties) { + return new ResourceInfoList(properties); + }; + + /** + * Encodes the specified ResourceInfoList message. Does not implicitly {@link google.api.servicecontrol.v2.ResourceInfoList.verify|verify} messages. + * @function encode + * @memberof google.api.servicecontrol.v2.ResourceInfoList + * @static + * @param {google.api.servicecontrol.v2.IResourceInfoList} message ResourceInfoList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceInfoList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resources != null && message.resources.length) + for (var i = 0; i < message.resources.length; ++i) + $root.google.api.servicecontrol.v2.ResourceInfo.encode(message.resources[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResourceInfoList message, length delimited. Does not implicitly {@link google.api.servicecontrol.v2.ResourceInfoList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.servicecontrol.v2.ResourceInfoList + * @static + * @param {google.api.servicecontrol.v2.IResourceInfoList} message ResourceInfoList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceInfoList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceInfoList message from the specified reader or buffer. + * @function decode + * @memberof google.api.servicecontrol.v2.ResourceInfoList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.servicecontrol.v2.ResourceInfoList} ResourceInfoList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceInfoList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.servicecontrol.v2.ResourceInfoList(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.resources && message.resources.length)) + message.resources = []; + message.resources.push($root.google.api.servicecontrol.v2.ResourceInfo.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceInfoList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.servicecontrol.v2.ResourceInfoList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.servicecontrol.v2.ResourceInfoList} ResourceInfoList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceInfoList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceInfoList message. + * @function verify + * @memberof google.api.servicecontrol.v2.ResourceInfoList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceInfoList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resources != null && message.hasOwnProperty("resources")) { + if (!Array.isArray(message.resources)) + return "resources: array expected"; + for (var i = 0; i < message.resources.length; ++i) { + var error = $root.google.api.servicecontrol.v2.ResourceInfo.verify(message.resources[i]); + if (error) + return "resources." + error; + } + } + return null; + }; + + /** + * Creates a ResourceInfoList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.servicecontrol.v2.ResourceInfoList + * @static + * @param {Object.} object Plain object + * @returns {google.api.servicecontrol.v2.ResourceInfoList} ResourceInfoList + */ + ResourceInfoList.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.servicecontrol.v2.ResourceInfoList) + return object; + var message = new $root.google.api.servicecontrol.v2.ResourceInfoList(); + if (object.resources) { + if (!Array.isArray(object.resources)) + throw TypeError(".google.api.servicecontrol.v2.ResourceInfoList.resources: array expected"); + message.resources = []; + for (var i = 0; i < object.resources.length; ++i) { + if (typeof object.resources[i] !== "object") + throw TypeError(".google.api.servicecontrol.v2.ResourceInfoList.resources: object expected"); + message.resources[i] = $root.google.api.servicecontrol.v2.ResourceInfo.fromObject(object.resources[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceInfoList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.servicecontrol.v2.ResourceInfoList + * @static + * @param {google.api.servicecontrol.v2.ResourceInfoList} message ResourceInfoList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceInfoList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.resources = []; + if (message.resources && message.resources.length) { + object.resources = []; + for (var j = 0; j < message.resources.length; ++j) + object.resources[j] = $root.google.api.servicecontrol.v2.ResourceInfo.toObject(message.resources[j], options); + } + return object; + }; + + /** + * Converts this ResourceInfoList to JSON. + * @function toJSON + * @memberof google.api.servicecontrol.v2.ResourceInfoList + * @instance + * @returns {Object.} JSON object + */ + ResourceInfoList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceInfoList + * @function getTypeUrl + * @memberof google.api.servicecontrol.v2.ResourceInfoList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceInfoList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.servicecontrol.v2.ResourceInfoList"; + }; + + return ResourceInfoList; + })(); + return v2; })(); diff --git a/packages/google-api-servicecontrol/protos/protos.json b/packages/google-api-servicecontrol/protos/protos.json index 26aa11dbb19..231e2089142 100644 --- a/packages/google-api-servicecontrol/protos/protos.json +++ b/packages/google-api-servicecontrol/protos/protos.json @@ -1926,6 +1926,15 @@ }, "ReportResponse": { "fields": {} + }, + "ResourceInfoList": { + "fields": { + "resources": { + "rule": "repeated", + "type": "ResourceInfo", + "id": 1 + } + } } } } diff --git a/packages/google-api-servicecontrol/samples/README.md b/packages/google-api-servicecontrol/samples/README.md index 862d26771f3..e07fea71c0a 100644 --- a/packages/google-api-servicecontrol/samples/README.md +++ b/packages/google-api-servicecontrol/samples/README.md @@ -18,7 +18,6 @@ * [Service_controller.check](#service_controller.check) * [Service_controller.report](#service_controller.report) * [Quickstart](#quickstart) - * [Quickstart](#quickstart) ## Before you begin @@ -132,23 +131,6 @@ __Usage:__ `node packages/google-api-servicecontrol/samples/quickstart.js` ------ - - - - -### Quickstart - -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-servicecontrol/samples/test/quickstart.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-servicecontrol/samples/test/quickstart.js,samples/README.md) - -__Usage:__ - - -`node packages/google-api-servicecontrol/samples/test/quickstart.js` - - diff --git a/packages/google-api-servicecontrol/samples/generated/v1/snippet_metadata.google.api.servicecontrol.v1.json b/packages/google-api-servicecontrol/samples/generated/v1/snippet_metadata.google.api.servicecontrol.v1.json index 3d168155ea4..172d5179f72 100644 --- a/packages/google-api-servicecontrol/samples/generated/v1/snippet_metadata.google.api.servicecontrol.v1.json +++ b/packages/google-api-servicecontrol/samples/generated/v1/snippet_metadata.google.api.servicecontrol.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-servicecontrol", - "version": "2.1.1", + "version": "2.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-api-servicecontrol/samples/generated/v2/snippet_metadata.google.api.servicecontrol.v2.json b/packages/google-api-servicecontrol/samples/generated/v2/snippet_metadata.google.api.servicecontrol.v2.json index 6a348f982ca..cc685e80fbf 100644 --- a/packages/google-api-servicecontrol/samples/generated/v2/snippet_metadata.google.api.servicecontrol.v2.json +++ b/packages/google-api-servicecontrol/samples/generated/v2/snippet_metadata.google.api.servicecontrol.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-servicecontrol", - "version": "2.1.1", + "version": "2.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-api-servicecontrol/samples/package.json b/packages/google-api-servicecontrol/samples/package.json index e24b8d53e5d..4827b04d7ec 100644 --- a/packages/google-api-servicecontrol/samples/package.json +++ b/packages/google-api-servicecontrol/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/service-control": "^2.1.2" + "@google-cloud/service-control": "^2.3.0" }, "devDependencies": { "c8": "^7.1.0", diff --git a/packages/google-api-servicecontrol/webpack.config.js b/packages/google-api-servicecontrol/webpack.config.js index 6c90a00b671..d5bcaeceb7c 100644 --- a/packages/google-api-servicecontrol/webpack.config.js +++ b/packages/google-api-servicecontrol/webpack.config.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2021 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-api-servicemanagement/package.json b/packages/google-api-servicemanagement/package.json index e6a352fc6cc..bd7cdda80fd 100644 --- a/packages/google-api-servicemanagement/package.json +++ b/packages/google-api-servicemanagement/package.json @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.3.0" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-api-servicemanagement" -} - +} \ No newline at end of file diff --git a/packages/google-api-serviceusage/package.json b/packages/google-api-serviceusage/package.json index 02efcd4f767..53e5c6a9795 100644 --- a/packages/google-api-serviceusage/package.json +++ b/packages/google-api-serviceusage/package.json @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-api-serviceusage" -} - +} \ No newline at end of file diff --git a/packages/google-appengine/package.json b/packages/google-appengine/package.json index 891eac835aa..d36ffe24b80 100644 --- a/packages/google-appengine/package.json +++ b/packages/google-appengine/package.json @@ -37,7 +37,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -45,10 +45,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -63,6 +64,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -76,5 +78,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-appengine" -} - +} \ No newline at end of file diff --git a/packages/google-area120-tables/package.json b/packages/google-area120-tables/package.json index 6233d1d0c1d..db35a836f0f 100644 --- a/packages/google-area120-tables/package.json +++ b/packages/google-area120-tables/package.json @@ -30,17 +30,18 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", - "prelint": "cd samples; npm link ../; npm i", "predocs-test": "npm run docs", "docs-test": "linkinator docs", "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "system-test": "npm run compile && c8 mocha build/system-test", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", "test": "c8 mocha build/test" }, "dependencies": { @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-area120-tables" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-accessapproval/package.json b/packages/google-cloud-accessapproval/package.json index a6b62bfa75b..5d33d8c10a6 100644 --- a/packages/google-cloud-accessapproval/package.json +++ b/packages/google-cloud-accessapproval/package.json @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-accessapproval" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-advisorynotifications/package.json b/packages/google-cloud-advisorynotifications/package.json index 778c7ca3c30..d91c1c51780 100644 --- a/packages/google-cloud-advisorynotifications/package.json +++ b/packages/google-cloud-advisorynotifications/package.json @@ -31,7 +31,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -39,10 +39,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -57,6 +58,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-aiplatform/CHANGELOG.md b/packages/google-cloud-aiplatform/CHANGELOG.md index 548899436f7..1729f103050 100644 --- a/packages/google-cloud-aiplatform/CHANGELOG.md +++ b/packages/google-cloud-aiplatform/CHANGELOG.md @@ -1,5 +1,46 @@ # Changelog +## [2.14.0](https://github.com/googleapis/google-cloud-node/compare/aiplatform-v2.13.0...aiplatform-v2.14.0) (2023-05-20) + + +### Features + +* Add updateSchedule method to ScheduleService ([#4280](https://github.com/googleapis/google-cloud-node/issues/4280)) ([d1e67be](https://github.com/googleapis/google-cloud-node/commit/d1e67beadf1910378989cd1bd3c19cbe000973d7)) + +## [2.13.0](https://github.com/googleapis/google-cloud-node/compare/aiplatform-v2.12.0...aiplatform-v2.13.0) (2023-05-09) + + +### Features + +* Add example_gcs_source to Examples in aiplatform v1beta1 explanation.proto ([#4249](https://github.com/googleapis/google-cloud-node/issues/4249)) ([4af8ae2](https://github.com/googleapis/google-cloud-node/commit/4af8ae27af952194885939a3e8014089bf7fc01e)) + +## [2.12.0](https://github.com/googleapis/google-cloud-node/compare/aiplatform-v2.11.0...aiplatform-v2.12.0) (2023-05-04) + + +### Features + +* Add model_garden_service.proto and publisher_model.proto to BUILD.bazel ([#4225](https://github.com/googleapis/google-cloud-node/issues/4225)) ([5367d25](https://github.com/googleapis/google-cloud-node/commit/5367d25cdaa4e935e5c1e345622bf4cbd7131e1a)) + +## [2.11.0](https://github.com/googleapis/google-cloud-node/compare/aiplatform-v2.10.0...aiplatform-v2.11.0) (2023-05-02) + + +### Features + +* Add experiment and experiment_run to CustomJobSpec ([20eafa1](https://github.com/googleapis/google-cloud-node/commit/20eafa1b79ca8f255400d4eb00fb6d398d3a3980)) +* Add GENIE to ModelSourceType ([20eafa1](https://github.com/googleapis/google-cloud-node/commit/20eafa1b79ca8f255400d4eb00fb6d398d3a3980)) +* Add MutateDeployedModel RPC to endpoint_service ([20eafa1](https://github.com/googleapis/google-cloud-node/commit/20eafa1b79ca8f255400d4eb00fb6d398d3a3980)) +* Add NVIDIA_L4 to AcceleratorType ([20eafa1](https://github.com/googleapis/google-cloud-node/commit/20eafa1b79ca8f255400d4eb00fb6d398d3a3980)) +* Add NVIDIA_L4 to AcceleratorType ([#4216](https://github.com/googleapis/google-cloud-node/issues/4216)) ([20eafa1](https://github.com/googleapis/google-cloud-node/commit/20eafa1b79ca8f255400d4eb00fb6d398d3a3980)) +* Add offline_storage_ttl_days to EntityType ([20eafa1](https://github.com/googleapis/google-cloud-node/commit/20eafa1b79ca8f255400d4eb00fb6d398d3a3980)) +* Add online_storage_ttl_days to FeatureStore ([20eafa1](https://github.com/googleapis/google-cloud-node/commit/20eafa1b79ca8f255400d4eb00fb6d398d3a3980)) + +## [2.10.0](https://github.com/googleapis/google-cloud-node/compare/aiplatform-v2.9.0...aiplatform-v2.10.0) (2023-04-24) + + +### Features + +* Add is_default to Tensorboard in aiplatform v1 tensorboard.proto and v1beta1 tensorboard.proto ([#4179](https://github.com/googleapis/google-cloud-node/issues/4179)) ([3c46888](https://github.com/googleapis/google-cloud-node/commit/3c46888d8b5b7568eaeac913fed55829a63f58df)) + ## [2.9.0](https://github.com/googleapis/google-cloud-node/compare/aiplatform-v2.8.1...aiplatform-v2.9.0) (2023-04-13) diff --git a/packages/google-cloud-aiplatform/README.md b/packages/google-cloud-aiplatform/README.md index fc3bb0ae2af..dcea0873e74 100644 --- a/packages/google-cloud-aiplatform/README.md +++ b/packages/google-cloud-aiplatform/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Vertex AI: Node.js Client](https://github.com/googleapis/google-cloud-node) +# [Vertex AI: Node.js Client](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-aiplatform) [![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/aiplatform.svg)](https://www.npmjs.org/package/@google-cloud/aiplatform) @@ -98,438 +98,441 @@ listEndpoints(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-aiplatform/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Dataset_service.create_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.create_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.create_dataset.js,samples/README.md) | -| Dataset_service.delete_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.delete_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.delete_dataset.js,samples/README.md) | -| Dataset_service.export_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.export_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.export_data.js,samples/README.md) | -| Dataset_service.get_annotation_spec | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.get_annotation_spec.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.get_annotation_spec.js,samples/README.md) | -| Dataset_service.get_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.get_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.get_dataset.js,samples/README.md) | -| Dataset_service.import_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.import_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.import_data.js,samples/README.md) | -| Dataset_service.list_annotations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.list_annotations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.list_annotations.js,samples/README.md) | -| Dataset_service.list_data_items | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.list_data_items.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.list_data_items.js,samples/README.md) | -| Dataset_service.list_datasets | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.list_datasets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.list_datasets.js,samples/README.md) | -| Dataset_service.list_saved_queries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.list_saved_queries.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.list_saved_queries.js,samples/README.md) | -| Dataset_service.search_data_items | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.search_data_items.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.search_data_items.js,samples/README.md) | -| Dataset_service.update_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.update_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.update_dataset.js,samples/README.md) | -| Endpoint_service.create_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.create_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.create_endpoint.js,samples/README.md) | -| Endpoint_service.delete_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.delete_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.delete_endpoint.js,samples/README.md) | -| Endpoint_service.deploy_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.deploy_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.deploy_model.js,samples/README.md) | -| Endpoint_service.get_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.get_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.get_endpoint.js,samples/README.md) | -| Endpoint_service.list_endpoints | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.list_endpoints.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.list_endpoints.js,samples/README.md) | -| Endpoint_service.undeploy_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.undeploy_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.undeploy_model.js,samples/README.md) | -| Endpoint_service.update_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.update_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.update_endpoint.js,samples/README.md) | -| Featurestore_online_serving_service.read_feature_values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_online_serving_service.read_feature_values.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_online_serving_service.read_feature_values.js,samples/README.md) | -| Featurestore_online_serving_service.streaming_read_feature_values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_online_serving_service.streaming_read_feature_values.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_online_serving_service.streaming_read_feature_values.js,samples/README.md) | -| Featurestore_online_serving_service.write_feature_values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_online_serving_service.write_feature_values.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_online_serving_service.write_feature_values.js,samples/README.md) | -| Featurestore_service.batch_create_features | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.batch_create_features.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.batch_create_features.js,samples/README.md) | -| Featurestore_service.batch_read_feature_values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.batch_read_feature_values.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.batch_read_feature_values.js,samples/README.md) | -| Featurestore_service.create_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.create_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.create_entity_type.js,samples/README.md) | -| Featurestore_service.create_feature | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.create_feature.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.create_feature.js,samples/README.md) | -| Featurestore_service.create_featurestore | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.create_featurestore.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.create_featurestore.js,samples/README.md) | -| Featurestore_service.delete_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.delete_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.delete_entity_type.js,samples/README.md) | -| Featurestore_service.delete_feature | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.delete_feature.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.delete_feature.js,samples/README.md) | -| Featurestore_service.delete_feature_values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.delete_feature_values.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.delete_feature_values.js,samples/README.md) | -| Featurestore_service.delete_featurestore | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.delete_featurestore.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.delete_featurestore.js,samples/README.md) | -| Featurestore_service.export_feature_values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.export_feature_values.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.export_feature_values.js,samples/README.md) | -| Featurestore_service.get_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.get_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.get_entity_type.js,samples/README.md) | -| Featurestore_service.get_feature | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.get_feature.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.get_feature.js,samples/README.md) | -| Featurestore_service.get_featurestore | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.get_featurestore.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.get_featurestore.js,samples/README.md) | -| Featurestore_service.import_feature_values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.import_feature_values.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.import_feature_values.js,samples/README.md) | -| Featurestore_service.list_entity_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.list_entity_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.list_entity_types.js,samples/README.md) | -| Featurestore_service.list_features | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.list_features.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.list_features.js,samples/README.md) | -| Featurestore_service.list_featurestores | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.list_featurestores.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.list_featurestores.js,samples/README.md) | -| Featurestore_service.search_features | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.search_features.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.search_features.js,samples/README.md) | -| Featurestore_service.update_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.update_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.update_entity_type.js,samples/README.md) | -| Featurestore_service.update_feature | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.update_feature.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.update_feature.js,samples/README.md) | -| Featurestore_service.update_featurestore | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.update_featurestore.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.update_featurestore.js,samples/README.md) | -| Index_endpoint_service.create_index_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/index_endpoint_service.create_index_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/index_endpoint_service.create_index_endpoint.js,samples/README.md) | -| Index_endpoint_service.delete_index_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/index_endpoint_service.delete_index_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/index_endpoint_service.delete_index_endpoint.js,samples/README.md) | -| Index_endpoint_service.deploy_index | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/index_endpoint_service.deploy_index.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/index_endpoint_service.deploy_index.js,samples/README.md) | -| Index_endpoint_service.get_index_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/index_endpoint_service.get_index_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/index_endpoint_service.get_index_endpoint.js,samples/README.md) | -| Index_endpoint_service.list_index_endpoints | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/index_endpoint_service.list_index_endpoints.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/index_endpoint_service.list_index_endpoints.js,samples/README.md) | -| Index_endpoint_service.mutate_deployed_index | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/index_endpoint_service.mutate_deployed_index.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/index_endpoint_service.mutate_deployed_index.js,samples/README.md) | -| Index_endpoint_service.undeploy_index | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/index_endpoint_service.undeploy_index.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/index_endpoint_service.undeploy_index.js,samples/README.md) | -| Index_endpoint_service.update_index_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/index_endpoint_service.update_index_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/index_endpoint_service.update_index_endpoint.js,samples/README.md) | -| Index_service.create_index | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/index_service.create_index.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/index_service.create_index.js,samples/README.md) | -| Index_service.delete_index | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/index_service.delete_index.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/index_service.delete_index.js,samples/README.md) | -| Index_service.get_index | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/index_service.get_index.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/index_service.get_index.js,samples/README.md) | -| Index_service.list_indexes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/index_service.list_indexes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/index_service.list_indexes.js,samples/README.md) | -| Index_service.remove_datapoints | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/index_service.remove_datapoints.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/index_service.remove_datapoints.js,samples/README.md) | -| Index_service.update_index | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/index_service.update_index.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/index_service.update_index.js,samples/README.md) | -| Index_service.upsert_datapoints | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/index_service.upsert_datapoints.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/index_service.upsert_datapoints.js,samples/README.md) | -| Job_service.cancel_batch_prediction_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.cancel_batch_prediction_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.cancel_batch_prediction_job.js,samples/README.md) | -| Job_service.cancel_custom_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.cancel_custom_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.cancel_custom_job.js,samples/README.md) | -| Job_service.cancel_data_labeling_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.cancel_data_labeling_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.cancel_data_labeling_job.js,samples/README.md) | -| Job_service.cancel_hyperparameter_tuning_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.cancel_hyperparameter_tuning_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.cancel_hyperparameter_tuning_job.js,samples/README.md) | -| Job_service.cancel_nas_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.cancel_nas_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.cancel_nas_job.js,samples/README.md) | -| Job_service.create_batch_prediction_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.create_batch_prediction_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.create_batch_prediction_job.js,samples/README.md) | -| Job_service.create_custom_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.create_custom_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.create_custom_job.js,samples/README.md) | -| Job_service.create_data_labeling_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.create_data_labeling_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.create_data_labeling_job.js,samples/README.md) | -| Job_service.create_hyperparameter_tuning_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.create_hyperparameter_tuning_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.create_hyperparameter_tuning_job.js,samples/README.md) | -| Job_service.create_model_deployment_monitoring_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.create_model_deployment_monitoring_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.create_model_deployment_monitoring_job.js,samples/README.md) | -| Job_service.create_nas_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.create_nas_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.create_nas_job.js,samples/README.md) | -| Job_service.delete_batch_prediction_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.delete_batch_prediction_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.delete_batch_prediction_job.js,samples/README.md) | -| Job_service.delete_custom_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.delete_custom_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.delete_custom_job.js,samples/README.md) | -| Job_service.delete_data_labeling_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.delete_data_labeling_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.delete_data_labeling_job.js,samples/README.md) | -| Job_service.delete_hyperparameter_tuning_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.delete_hyperparameter_tuning_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.delete_hyperparameter_tuning_job.js,samples/README.md) | -| Job_service.delete_model_deployment_monitoring_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.delete_model_deployment_monitoring_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.delete_model_deployment_monitoring_job.js,samples/README.md) | -| Job_service.delete_nas_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.delete_nas_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.delete_nas_job.js,samples/README.md) | -| Job_service.get_batch_prediction_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.get_batch_prediction_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.get_batch_prediction_job.js,samples/README.md) | -| Job_service.get_custom_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.get_custom_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.get_custom_job.js,samples/README.md) | -| Job_service.get_data_labeling_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.get_data_labeling_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.get_data_labeling_job.js,samples/README.md) | -| Job_service.get_hyperparameter_tuning_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.get_hyperparameter_tuning_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.get_hyperparameter_tuning_job.js,samples/README.md) | -| Job_service.get_model_deployment_monitoring_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.get_model_deployment_monitoring_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.get_model_deployment_monitoring_job.js,samples/README.md) | -| Job_service.get_nas_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.get_nas_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.get_nas_job.js,samples/README.md) | -| Job_service.get_nas_trial_detail | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.get_nas_trial_detail.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.get_nas_trial_detail.js,samples/README.md) | -| Job_service.list_batch_prediction_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.list_batch_prediction_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.list_batch_prediction_jobs.js,samples/README.md) | -| Job_service.list_custom_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.list_custom_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.list_custom_jobs.js,samples/README.md) | -| Job_service.list_data_labeling_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.list_data_labeling_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.list_data_labeling_jobs.js,samples/README.md) | -| Job_service.list_hyperparameter_tuning_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.list_hyperparameter_tuning_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.list_hyperparameter_tuning_jobs.js,samples/README.md) | -| Job_service.list_model_deployment_monitoring_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.list_model_deployment_monitoring_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.list_model_deployment_monitoring_jobs.js,samples/README.md) | -| Job_service.list_nas_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.list_nas_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.list_nas_jobs.js,samples/README.md) | -| Job_service.list_nas_trial_details | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.list_nas_trial_details.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.list_nas_trial_details.js,samples/README.md) | -| Job_service.pause_model_deployment_monitoring_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.pause_model_deployment_monitoring_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.pause_model_deployment_monitoring_job.js,samples/README.md) | -| Job_service.resume_model_deployment_monitoring_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.resume_model_deployment_monitoring_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.resume_model_deployment_monitoring_job.js,samples/README.md) | -| Job_service.search_model_deployment_monitoring_stats_anomalies | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.search_model_deployment_monitoring_stats_anomalies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.search_model_deployment_monitoring_stats_anomalies.js,samples/README.md) | -| Job_service.update_model_deployment_monitoring_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.update_model_deployment_monitoring_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.update_model_deployment_monitoring_job.js,samples/README.md) | -| Metadata_service.add_context_artifacts_and_executions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.add_context_artifacts_and_executions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.add_context_artifacts_and_executions.js,samples/README.md) | -| Metadata_service.add_context_children | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.add_context_children.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.add_context_children.js,samples/README.md) | -| Metadata_service.add_execution_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.add_execution_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.add_execution_events.js,samples/README.md) | -| Metadata_service.create_artifact | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.create_artifact.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.create_artifact.js,samples/README.md) | -| Metadata_service.create_context | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.create_context.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.create_context.js,samples/README.md) | -| Metadata_service.create_execution | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.create_execution.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.create_execution.js,samples/README.md) | -| Metadata_service.create_metadata_schema | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.create_metadata_schema.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.create_metadata_schema.js,samples/README.md) | -| Metadata_service.create_metadata_store | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.create_metadata_store.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.create_metadata_store.js,samples/README.md) | -| Metadata_service.delete_artifact | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.delete_artifact.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.delete_artifact.js,samples/README.md) | -| Metadata_service.delete_context | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.delete_context.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.delete_context.js,samples/README.md) | -| Metadata_service.delete_execution | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.delete_execution.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.delete_execution.js,samples/README.md) | -| Metadata_service.delete_metadata_store | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.delete_metadata_store.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.delete_metadata_store.js,samples/README.md) | -| Metadata_service.get_artifact | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.get_artifact.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.get_artifact.js,samples/README.md) | -| Metadata_service.get_context | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.get_context.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.get_context.js,samples/README.md) | -| Metadata_service.get_execution | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.get_execution.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.get_execution.js,samples/README.md) | -| Metadata_service.get_metadata_schema | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.get_metadata_schema.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.get_metadata_schema.js,samples/README.md) | -| Metadata_service.get_metadata_store | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.get_metadata_store.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.get_metadata_store.js,samples/README.md) | -| Metadata_service.list_artifacts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.list_artifacts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.list_artifacts.js,samples/README.md) | -| Metadata_service.list_contexts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.list_contexts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.list_contexts.js,samples/README.md) | -| Metadata_service.list_executions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.list_executions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.list_executions.js,samples/README.md) | -| Metadata_service.list_metadata_schemas | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.list_metadata_schemas.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.list_metadata_schemas.js,samples/README.md) | -| Metadata_service.list_metadata_stores | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.list_metadata_stores.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.list_metadata_stores.js,samples/README.md) | -| Metadata_service.purge_artifacts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.purge_artifacts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.purge_artifacts.js,samples/README.md) | -| Metadata_service.purge_contexts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.purge_contexts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.purge_contexts.js,samples/README.md) | -| Metadata_service.purge_executions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.purge_executions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.purge_executions.js,samples/README.md) | -| Metadata_service.query_artifact_lineage_subgraph | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.query_artifact_lineage_subgraph.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.query_artifact_lineage_subgraph.js,samples/README.md) | -| Metadata_service.query_context_lineage_subgraph | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.query_context_lineage_subgraph.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.query_context_lineage_subgraph.js,samples/README.md) | -| Metadata_service.query_execution_inputs_and_outputs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.query_execution_inputs_and_outputs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.query_execution_inputs_and_outputs.js,samples/README.md) | -| Metadata_service.remove_context_children | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.remove_context_children.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.remove_context_children.js,samples/README.md) | -| Metadata_service.update_artifact | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.update_artifact.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.update_artifact.js,samples/README.md) | -| Metadata_service.update_context | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.update_context.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.update_context.js,samples/README.md) | -| Metadata_service.update_execution | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.update_execution.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.update_execution.js,samples/README.md) | -| Migration_service.batch_migrate_resources | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/migration_service.batch_migrate_resources.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/migration_service.batch_migrate_resources.js,samples/README.md) | -| Migration_service.search_migratable_resources | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/migration_service.search_migratable_resources.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/migration_service.search_migratable_resources.js,samples/README.md) | -| Model_service.batch_import_evaluated_annotations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.batch_import_evaluated_annotations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.batch_import_evaluated_annotations.js,samples/README.md) | -| Model_service.batch_import_model_evaluation_slices | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.batch_import_model_evaluation_slices.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.batch_import_model_evaluation_slices.js,samples/README.md) | -| Model_service.copy_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.copy_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.copy_model.js,samples/README.md) | -| Model_service.delete_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.delete_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.delete_model.js,samples/README.md) | -| Model_service.delete_model_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.delete_model_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.delete_model_version.js,samples/README.md) | -| Model_service.export_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.export_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.export_model.js,samples/README.md) | -| Model_service.get_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.get_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.get_model.js,samples/README.md) | -| Model_service.get_model_evaluation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.get_model_evaluation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.get_model_evaluation.js,samples/README.md) | -| Model_service.get_model_evaluation_slice | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.get_model_evaluation_slice.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.get_model_evaluation_slice.js,samples/README.md) | -| Model_service.import_model_evaluation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.import_model_evaluation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.import_model_evaluation.js,samples/README.md) | -| Model_service.list_model_evaluation_slices | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.list_model_evaluation_slices.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.list_model_evaluation_slices.js,samples/README.md) | -| Model_service.list_model_evaluations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.list_model_evaluations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.list_model_evaluations.js,samples/README.md) | -| Model_service.list_model_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.list_model_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.list_model_versions.js,samples/README.md) | -| Model_service.list_models | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.list_models.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.list_models.js,samples/README.md) | -| Model_service.merge_version_aliases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.merge_version_aliases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.merge_version_aliases.js,samples/README.md) | -| Model_service.update_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.update_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.update_model.js,samples/README.md) | -| Model_service.upload_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.upload_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.upload_model.js,samples/README.md) | -| Pipeline_service.cancel_pipeline_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.cancel_pipeline_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.cancel_pipeline_job.js,samples/README.md) | -| Pipeline_service.cancel_training_pipeline | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.cancel_training_pipeline.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.cancel_training_pipeline.js,samples/README.md) | -| Pipeline_service.create_pipeline_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.create_pipeline_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.create_pipeline_job.js,samples/README.md) | -| Pipeline_service.create_training_pipeline | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.create_training_pipeline.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.create_training_pipeline.js,samples/README.md) | -| Pipeline_service.delete_pipeline_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.delete_pipeline_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.delete_pipeline_job.js,samples/README.md) | -| Pipeline_service.delete_training_pipeline | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.delete_training_pipeline.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.delete_training_pipeline.js,samples/README.md) | -| Pipeline_service.get_pipeline_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.get_pipeline_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.get_pipeline_job.js,samples/README.md) | -| Pipeline_service.get_training_pipeline | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.get_training_pipeline.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.get_training_pipeline.js,samples/README.md) | -| Pipeline_service.list_pipeline_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.list_pipeline_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.list_pipeline_jobs.js,samples/README.md) | -| Pipeline_service.list_training_pipelines | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.list_training_pipelines.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.list_training_pipelines.js,samples/README.md) | -| Prediction_service.explain | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/prediction_service.explain.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/prediction_service.explain.js,samples/README.md) | -| Prediction_service.predict | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/prediction_service.predict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/prediction_service.predict.js,samples/README.md) | -| Prediction_service.raw_predict | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/prediction_service.raw_predict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/prediction_service.raw_predict.js,samples/README.md) | -| Specialist_pool_service.create_specialist_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/specialist_pool_service.create_specialist_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/specialist_pool_service.create_specialist_pool.js,samples/README.md) | -| Specialist_pool_service.delete_specialist_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/specialist_pool_service.delete_specialist_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/specialist_pool_service.delete_specialist_pool.js,samples/README.md) | -| Specialist_pool_service.get_specialist_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/specialist_pool_service.get_specialist_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/specialist_pool_service.get_specialist_pool.js,samples/README.md) | -| Specialist_pool_service.list_specialist_pools | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/specialist_pool_service.list_specialist_pools.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/specialist_pool_service.list_specialist_pools.js,samples/README.md) | -| Specialist_pool_service.update_specialist_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/specialist_pool_service.update_specialist_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/specialist_pool_service.update_specialist_pool.js,samples/README.md) | -| Tensorboard_service.batch_create_tensorboard_runs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.batch_create_tensorboard_runs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.batch_create_tensorboard_runs.js,samples/README.md) | -| Tensorboard_service.batch_create_tensorboard_time_series | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.batch_create_tensorboard_time_series.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.batch_create_tensorboard_time_series.js,samples/README.md) | -| Tensorboard_service.batch_read_tensorboard_time_series_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.batch_read_tensorboard_time_series_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.batch_read_tensorboard_time_series_data.js,samples/README.md) | -| Tensorboard_service.create_tensorboard | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.create_tensorboard.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.create_tensorboard.js,samples/README.md) | -| Tensorboard_service.create_tensorboard_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.create_tensorboard_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.create_tensorboard_experiment.js,samples/README.md) | -| Tensorboard_service.create_tensorboard_run | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.create_tensorboard_run.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.create_tensorboard_run.js,samples/README.md) | -| Tensorboard_service.create_tensorboard_time_series | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.create_tensorboard_time_series.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.create_tensorboard_time_series.js,samples/README.md) | -| Tensorboard_service.delete_tensorboard | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.delete_tensorboard.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.delete_tensorboard.js,samples/README.md) | -| Tensorboard_service.delete_tensorboard_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.delete_tensorboard_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.delete_tensorboard_experiment.js,samples/README.md) | -| Tensorboard_service.delete_tensorboard_run | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.delete_tensorboard_run.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.delete_tensorboard_run.js,samples/README.md) | -| Tensorboard_service.delete_tensorboard_time_series | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.delete_tensorboard_time_series.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.delete_tensorboard_time_series.js,samples/README.md) | -| Tensorboard_service.export_tensorboard_time_series_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.export_tensorboard_time_series_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.export_tensorboard_time_series_data.js,samples/README.md) | -| Tensorboard_service.get_tensorboard | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.get_tensorboard.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.get_tensorboard.js,samples/README.md) | -| Tensorboard_service.get_tensorboard_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.get_tensorboard_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.get_tensorboard_experiment.js,samples/README.md) | -| Tensorboard_service.get_tensorboard_run | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.get_tensorboard_run.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.get_tensorboard_run.js,samples/README.md) | -| Tensorboard_service.get_tensorboard_time_series | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.get_tensorboard_time_series.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.get_tensorboard_time_series.js,samples/README.md) | -| Tensorboard_service.list_tensorboard_experiments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.list_tensorboard_experiments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.list_tensorboard_experiments.js,samples/README.md) | -| Tensorboard_service.list_tensorboard_runs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.list_tensorboard_runs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.list_tensorboard_runs.js,samples/README.md) | -| Tensorboard_service.list_tensorboard_time_series | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.list_tensorboard_time_series.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.list_tensorboard_time_series.js,samples/README.md) | -| Tensorboard_service.list_tensorboards | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.list_tensorboards.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.list_tensorboards.js,samples/README.md) | -| Tensorboard_service.read_tensorboard_blob_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.read_tensorboard_blob_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.read_tensorboard_blob_data.js,samples/README.md) | -| Tensorboard_service.read_tensorboard_time_series_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.read_tensorboard_time_series_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.read_tensorboard_time_series_data.js,samples/README.md) | -| Tensorboard_service.read_tensorboard_usage | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.read_tensorboard_usage.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.read_tensorboard_usage.js,samples/README.md) | -| Tensorboard_service.update_tensorboard | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.update_tensorboard.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.update_tensorboard.js,samples/README.md) | -| Tensorboard_service.update_tensorboard_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.update_tensorboard_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.update_tensorboard_experiment.js,samples/README.md) | -| Tensorboard_service.update_tensorboard_run | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.update_tensorboard_run.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.update_tensorboard_run.js,samples/README.md) | -| Tensorboard_service.update_tensorboard_time_series | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.update_tensorboard_time_series.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.update_tensorboard_time_series.js,samples/README.md) | -| Tensorboard_service.write_tensorboard_experiment_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.write_tensorboard_experiment_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.write_tensorboard_experiment_data.js,samples/README.md) | -| Tensorboard_service.write_tensorboard_run_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.write_tensorboard_run_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.write_tensorboard_run_data.js,samples/README.md) | -| Vizier_service.add_trial_measurement | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.add_trial_measurement.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.add_trial_measurement.js,samples/README.md) | -| Vizier_service.check_trial_early_stopping_state | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.check_trial_early_stopping_state.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.check_trial_early_stopping_state.js,samples/README.md) | -| Vizier_service.complete_trial | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.complete_trial.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.complete_trial.js,samples/README.md) | -| Vizier_service.create_study | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.create_study.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.create_study.js,samples/README.md) | -| Vizier_service.create_trial | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.create_trial.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.create_trial.js,samples/README.md) | -| Vizier_service.delete_study | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.delete_study.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.delete_study.js,samples/README.md) | -| Vizier_service.delete_trial | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.delete_trial.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.delete_trial.js,samples/README.md) | -| Vizier_service.get_study | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.get_study.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.get_study.js,samples/README.md) | -| Vizier_service.get_trial | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.get_trial.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.get_trial.js,samples/README.md) | -| Vizier_service.list_optimal_trials | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.list_optimal_trials.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.list_optimal_trials.js,samples/README.md) | -| Vizier_service.list_studies | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.list_studies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.list_studies.js,samples/README.md) | -| Vizier_service.list_trials | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.list_trials.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.list_trials.js,samples/README.md) | -| Vizier_service.lookup_study | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.lookup_study.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.lookup_study.js,samples/README.md) | -| Vizier_service.stop_trial | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.stop_trial.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.stop_trial.js,samples/README.md) | -| Vizier_service.suggest_trials | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.suggest_trials.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.suggest_trials.js,samples/README.md) | -| Dataset_service.create_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.create_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.create_dataset.js,samples/README.md) | -| Dataset_service.delete_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.delete_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.delete_dataset.js,samples/README.md) | -| Dataset_service.export_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.export_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.export_data.js,samples/README.md) | -| Dataset_service.get_annotation_spec | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.get_annotation_spec.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.get_annotation_spec.js,samples/README.md) | -| Dataset_service.get_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.get_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.get_dataset.js,samples/README.md) | -| Dataset_service.import_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.import_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.import_data.js,samples/README.md) | -| Dataset_service.list_annotations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.list_annotations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.list_annotations.js,samples/README.md) | -| Dataset_service.list_data_items | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.list_data_items.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.list_data_items.js,samples/README.md) | -| Dataset_service.list_datasets | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.list_datasets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.list_datasets.js,samples/README.md) | -| Dataset_service.list_saved_queries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.list_saved_queries.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.list_saved_queries.js,samples/README.md) | -| Dataset_service.search_data_items | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.search_data_items.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.search_data_items.js,samples/README.md) | -| Dataset_service.update_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.update_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.update_dataset.js,samples/README.md) | -| Deployment_resource_pool_service.create_deployment_resource_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.create_deployment_resource_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.create_deployment_resource_pool.js,samples/README.md) | -| Deployment_resource_pool_service.delete_deployment_resource_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.delete_deployment_resource_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.delete_deployment_resource_pool.js,samples/README.md) | -| Deployment_resource_pool_service.get_deployment_resource_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.get_deployment_resource_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.get_deployment_resource_pool.js,samples/README.md) | -| Deployment_resource_pool_service.list_deployment_resource_pools | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.list_deployment_resource_pools.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.list_deployment_resource_pools.js,samples/README.md) | -| Deployment_resource_pool_service.query_deployed_models | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.query_deployed_models.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.query_deployed_models.js,samples/README.md) | -| Endpoint_service.create_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.create_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.create_endpoint.js,samples/README.md) | -| Endpoint_service.delete_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.delete_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.delete_endpoint.js,samples/README.md) | -| Endpoint_service.deploy_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.deploy_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.deploy_model.js,samples/README.md) | -| Endpoint_service.get_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.get_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.get_endpoint.js,samples/README.md) | -| Endpoint_service.list_endpoints | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.list_endpoints.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.list_endpoints.js,samples/README.md) | -| Endpoint_service.undeploy_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.undeploy_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.undeploy_model.js,samples/README.md) | -| Endpoint_service.update_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.update_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.update_endpoint.js,samples/README.md) | -| Featurestore_online_serving_service.read_feature_values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_online_serving_service.read_feature_values.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_online_serving_service.read_feature_values.js,samples/README.md) | -| Featurestore_online_serving_service.streaming_read_feature_values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_online_serving_service.streaming_read_feature_values.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_online_serving_service.streaming_read_feature_values.js,samples/README.md) | -| Featurestore_online_serving_service.write_feature_values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_online_serving_service.write_feature_values.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_online_serving_service.write_feature_values.js,samples/README.md) | -| Featurestore_service.batch_create_features | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.batch_create_features.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.batch_create_features.js,samples/README.md) | -| Featurestore_service.batch_read_feature_values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.batch_read_feature_values.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.batch_read_feature_values.js,samples/README.md) | -| Featurestore_service.create_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.create_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.create_entity_type.js,samples/README.md) | -| Featurestore_service.create_feature | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.create_feature.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.create_feature.js,samples/README.md) | -| Featurestore_service.create_featurestore | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.create_featurestore.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.create_featurestore.js,samples/README.md) | -| Featurestore_service.delete_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.delete_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.delete_entity_type.js,samples/README.md) | -| Featurestore_service.delete_feature | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.delete_feature.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.delete_feature.js,samples/README.md) | -| Featurestore_service.delete_feature_values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.delete_feature_values.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.delete_feature_values.js,samples/README.md) | -| Featurestore_service.delete_featurestore | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.delete_featurestore.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.delete_featurestore.js,samples/README.md) | -| Featurestore_service.export_feature_values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.export_feature_values.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.export_feature_values.js,samples/README.md) | -| Featurestore_service.get_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.get_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.get_entity_type.js,samples/README.md) | -| Featurestore_service.get_feature | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.get_feature.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.get_feature.js,samples/README.md) | -| Featurestore_service.get_featurestore | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.get_featurestore.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.get_featurestore.js,samples/README.md) | -| Featurestore_service.import_feature_values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.import_feature_values.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.import_feature_values.js,samples/README.md) | -| Featurestore_service.list_entity_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.list_entity_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.list_entity_types.js,samples/README.md) | -| Featurestore_service.list_features | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.list_features.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.list_features.js,samples/README.md) | -| Featurestore_service.list_featurestores | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.list_featurestores.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.list_featurestores.js,samples/README.md) | -| Featurestore_service.search_features | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.search_features.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.search_features.js,samples/README.md) | -| Featurestore_service.update_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.update_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.update_entity_type.js,samples/README.md) | -| Featurestore_service.update_feature | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.update_feature.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.update_feature.js,samples/README.md) | -| Featurestore_service.update_featurestore | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.update_featurestore.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.update_featurestore.js,samples/README.md) | -| Index_endpoint_service.create_index_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/index_endpoint_service.create_index_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/index_endpoint_service.create_index_endpoint.js,samples/README.md) | -| Index_endpoint_service.delete_index_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/index_endpoint_service.delete_index_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/index_endpoint_service.delete_index_endpoint.js,samples/README.md) | -| Index_endpoint_service.deploy_index | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/index_endpoint_service.deploy_index.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/index_endpoint_service.deploy_index.js,samples/README.md) | -| Index_endpoint_service.get_index_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/index_endpoint_service.get_index_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/index_endpoint_service.get_index_endpoint.js,samples/README.md) | -| Index_endpoint_service.list_index_endpoints | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/index_endpoint_service.list_index_endpoints.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/index_endpoint_service.list_index_endpoints.js,samples/README.md) | -| Index_endpoint_service.mutate_deployed_index | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/index_endpoint_service.mutate_deployed_index.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/index_endpoint_service.mutate_deployed_index.js,samples/README.md) | -| Index_endpoint_service.undeploy_index | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/index_endpoint_service.undeploy_index.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/index_endpoint_service.undeploy_index.js,samples/README.md) | -| Index_endpoint_service.update_index_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/index_endpoint_service.update_index_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/index_endpoint_service.update_index_endpoint.js,samples/README.md) | -| Index_service.create_index | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/index_service.create_index.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/index_service.create_index.js,samples/README.md) | -| Index_service.delete_index | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/index_service.delete_index.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/index_service.delete_index.js,samples/README.md) | -| Index_service.get_index | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/index_service.get_index.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/index_service.get_index.js,samples/README.md) | -| Index_service.list_indexes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/index_service.list_indexes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/index_service.list_indexes.js,samples/README.md) | -| Index_service.remove_datapoints | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/index_service.remove_datapoints.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/index_service.remove_datapoints.js,samples/README.md) | -| Index_service.update_index | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/index_service.update_index.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/index_service.update_index.js,samples/README.md) | -| Index_service.upsert_datapoints | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/index_service.upsert_datapoints.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/index_service.upsert_datapoints.js,samples/README.md) | -| Job_service.cancel_batch_prediction_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.cancel_batch_prediction_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.cancel_batch_prediction_job.js,samples/README.md) | -| Job_service.cancel_custom_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.cancel_custom_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.cancel_custom_job.js,samples/README.md) | -| Job_service.cancel_data_labeling_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.cancel_data_labeling_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.cancel_data_labeling_job.js,samples/README.md) | -| Job_service.cancel_hyperparameter_tuning_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.cancel_hyperparameter_tuning_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.cancel_hyperparameter_tuning_job.js,samples/README.md) | -| Job_service.cancel_nas_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.cancel_nas_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.cancel_nas_job.js,samples/README.md) | -| Job_service.create_batch_prediction_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.create_batch_prediction_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.create_batch_prediction_job.js,samples/README.md) | -| Job_service.create_custom_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.create_custom_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.create_custom_job.js,samples/README.md) | -| Job_service.create_data_labeling_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.create_data_labeling_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.create_data_labeling_job.js,samples/README.md) | -| Job_service.create_hyperparameter_tuning_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.create_hyperparameter_tuning_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.create_hyperparameter_tuning_job.js,samples/README.md) | -| Job_service.create_model_deployment_monitoring_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.create_model_deployment_monitoring_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.create_model_deployment_monitoring_job.js,samples/README.md) | -| Job_service.create_nas_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.create_nas_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.create_nas_job.js,samples/README.md) | -| Job_service.delete_batch_prediction_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.delete_batch_prediction_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.delete_batch_prediction_job.js,samples/README.md) | -| Job_service.delete_custom_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.delete_custom_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.delete_custom_job.js,samples/README.md) | -| Job_service.delete_data_labeling_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.delete_data_labeling_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.delete_data_labeling_job.js,samples/README.md) | -| Job_service.delete_hyperparameter_tuning_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.delete_hyperparameter_tuning_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.delete_hyperparameter_tuning_job.js,samples/README.md) | -| Job_service.delete_model_deployment_monitoring_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.delete_model_deployment_monitoring_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.delete_model_deployment_monitoring_job.js,samples/README.md) | -| Job_service.delete_nas_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.delete_nas_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.delete_nas_job.js,samples/README.md) | -| Job_service.get_batch_prediction_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.get_batch_prediction_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.get_batch_prediction_job.js,samples/README.md) | -| Job_service.get_custom_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.get_custom_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.get_custom_job.js,samples/README.md) | -| Job_service.get_data_labeling_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.get_data_labeling_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.get_data_labeling_job.js,samples/README.md) | -| Job_service.get_hyperparameter_tuning_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.get_hyperparameter_tuning_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.get_hyperparameter_tuning_job.js,samples/README.md) | -| Job_service.get_model_deployment_monitoring_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.get_model_deployment_monitoring_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.get_model_deployment_monitoring_job.js,samples/README.md) | -| Job_service.get_nas_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.get_nas_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.get_nas_job.js,samples/README.md) | -| Job_service.get_nas_trial_detail | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.get_nas_trial_detail.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.get_nas_trial_detail.js,samples/README.md) | -| Job_service.list_batch_prediction_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.list_batch_prediction_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.list_batch_prediction_jobs.js,samples/README.md) | -| Job_service.list_custom_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.list_custom_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.list_custom_jobs.js,samples/README.md) | -| Job_service.list_data_labeling_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.list_data_labeling_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.list_data_labeling_jobs.js,samples/README.md) | -| Job_service.list_hyperparameter_tuning_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.list_hyperparameter_tuning_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.list_hyperparameter_tuning_jobs.js,samples/README.md) | -| Job_service.list_model_deployment_monitoring_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.list_model_deployment_monitoring_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.list_model_deployment_monitoring_jobs.js,samples/README.md) | -| Job_service.list_nas_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.list_nas_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.list_nas_jobs.js,samples/README.md) | -| Job_service.list_nas_trial_details | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.list_nas_trial_details.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.list_nas_trial_details.js,samples/README.md) | -| Job_service.pause_model_deployment_monitoring_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.pause_model_deployment_monitoring_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.pause_model_deployment_monitoring_job.js,samples/README.md) | -| Job_service.resume_model_deployment_monitoring_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.resume_model_deployment_monitoring_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.resume_model_deployment_monitoring_job.js,samples/README.md) | -| Job_service.search_model_deployment_monitoring_stats_anomalies | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.search_model_deployment_monitoring_stats_anomalies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.search_model_deployment_monitoring_stats_anomalies.js,samples/README.md) | -| Job_service.update_model_deployment_monitoring_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.update_model_deployment_monitoring_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.update_model_deployment_monitoring_job.js,samples/README.md) | -| Match_service.find_neighbors | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.find_neighbors.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.find_neighbors.js,samples/README.md) | -| Match_service.read_index_datapoints | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.read_index_datapoints.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.read_index_datapoints.js,samples/README.md) | -| Metadata_service.add_context_artifacts_and_executions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.add_context_artifacts_and_executions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.add_context_artifacts_and_executions.js,samples/README.md) | -| Metadata_service.add_context_children | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.add_context_children.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.add_context_children.js,samples/README.md) | -| Metadata_service.add_execution_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.add_execution_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.add_execution_events.js,samples/README.md) | -| Metadata_service.create_artifact | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.create_artifact.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.create_artifact.js,samples/README.md) | -| Metadata_service.create_context | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.create_context.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.create_context.js,samples/README.md) | -| Metadata_service.create_execution | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.create_execution.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.create_execution.js,samples/README.md) | -| Metadata_service.create_metadata_schema | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.create_metadata_schema.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.create_metadata_schema.js,samples/README.md) | -| Metadata_service.create_metadata_store | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.create_metadata_store.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.create_metadata_store.js,samples/README.md) | -| Metadata_service.delete_artifact | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.delete_artifact.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.delete_artifact.js,samples/README.md) | -| Metadata_service.delete_context | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.delete_context.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.delete_context.js,samples/README.md) | -| Metadata_service.delete_execution | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.delete_execution.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.delete_execution.js,samples/README.md) | -| Metadata_service.delete_metadata_store | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.delete_metadata_store.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.delete_metadata_store.js,samples/README.md) | -| Metadata_service.get_artifact | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.get_artifact.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.get_artifact.js,samples/README.md) | -| Metadata_service.get_context | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.get_context.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.get_context.js,samples/README.md) | -| Metadata_service.get_execution | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.get_execution.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.get_execution.js,samples/README.md) | -| Metadata_service.get_metadata_schema | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.get_metadata_schema.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.get_metadata_schema.js,samples/README.md) | -| Metadata_service.get_metadata_store | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.get_metadata_store.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.get_metadata_store.js,samples/README.md) | -| Metadata_service.list_artifacts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.list_artifacts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.list_artifacts.js,samples/README.md) | -| Metadata_service.list_contexts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.list_contexts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.list_contexts.js,samples/README.md) | -| Metadata_service.list_executions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.list_executions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.list_executions.js,samples/README.md) | -| Metadata_service.list_metadata_schemas | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.list_metadata_schemas.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.list_metadata_schemas.js,samples/README.md) | -| Metadata_service.list_metadata_stores | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.list_metadata_stores.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.list_metadata_stores.js,samples/README.md) | -| Metadata_service.purge_artifacts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.purge_artifacts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.purge_artifacts.js,samples/README.md) | -| Metadata_service.purge_contexts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.purge_contexts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.purge_contexts.js,samples/README.md) | -| Metadata_service.purge_executions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.purge_executions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.purge_executions.js,samples/README.md) | -| Metadata_service.query_artifact_lineage_subgraph | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.query_artifact_lineage_subgraph.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.query_artifact_lineage_subgraph.js,samples/README.md) | -| Metadata_service.query_context_lineage_subgraph | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.query_context_lineage_subgraph.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.query_context_lineage_subgraph.js,samples/README.md) | -| Metadata_service.query_execution_inputs_and_outputs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.query_execution_inputs_and_outputs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.query_execution_inputs_and_outputs.js,samples/README.md) | -| Metadata_service.remove_context_children | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.remove_context_children.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.remove_context_children.js,samples/README.md) | -| Metadata_service.update_artifact | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.update_artifact.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.update_artifact.js,samples/README.md) | -| Metadata_service.update_context | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.update_context.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.update_context.js,samples/README.md) | -| Metadata_service.update_execution | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.update_execution.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.update_execution.js,samples/README.md) | -| Migration_service.batch_migrate_resources | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/migration_service.batch_migrate_resources.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/migration_service.batch_migrate_resources.js,samples/README.md) | -| Migration_service.search_migratable_resources | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/migration_service.search_migratable_resources.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/migration_service.search_migratable_resources.js,samples/README.md) | -| Model_service.batch_import_evaluated_annotations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.batch_import_evaluated_annotations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.batch_import_evaluated_annotations.js,samples/README.md) | -| Model_service.batch_import_model_evaluation_slices | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.batch_import_model_evaluation_slices.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.batch_import_model_evaluation_slices.js,samples/README.md) | -| Model_service.copy_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.copy_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.copy_model.js,samples/README.md) | -| Model_service.delete_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.delete_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.delete_model.js,samples/README.md) | -| Model_service.delete_model_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.delete_model_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.delete_model_version.js,samples/README.md) | -| Model_service.export_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.export_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.export_model.js,samples/README.md) | -| Model_service.get_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.get_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.get_model.js,samples/README.md) | -| Model_service.get_model_evaluation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.get_model_evaluation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.get_model_evaluation.js,samples/README.md) | -| Model_service.get_model_evaluation_slice | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.get_model_evaluation_slice.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.get_model_evaluation_slice.js,samples/README.md) | -| Model_service.import_model_evaluation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.import_model_evaluation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.import_model_evaluation.js,samples/README.md) | -| Model_service.list_model_evaluation_slices | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.list_model_evaluation_slices.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.list_model_evaluation_slices.js,samples/README.md) | -| Model_service.list_model_evaluations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.list_model_evaluations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.list_model_evaluations.js,samples/README.md) | -| Model_service.list_model_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.list_model_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.list_model_versions.js,samples/README.md) | -| Model_service.list_models | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.list_models.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.list_models.js,samples/README.md) | -| Model_service.merge_version_aliases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.merge_version_aliases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.merge_version_aliases.js,samples/README.md) | -| Model_service.update_explanation_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.update_explanation_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.update_explanation_dataset.js,samples/README.md) | -| Model_service.update_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.update_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.update_model.js,samples/README.md) | -| Model_service.upload_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.upload_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.upload_model.js,samples/README.md) | -| Pipeline_service.cancel_pipeline_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.cancel_pipeline_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.cancel_pipeline_job.js,samples/README.md) | -| Pipeline_service.cancel_training_pipeline | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.cancel_training_pipeline.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.cancel_training_pipeline.js,samples/README.md) | -| Pipeline_service.create_pipeline_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.create_pipeline_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.create_pipeline_job.js,samples/README.md) | -| Pipeline_service.create_training_pipeline | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.create_training_pipeline.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.create_training_pipeline.js,samples/README.md) | -| Pipeline_service.delete_pipeline_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.delete_pipeline_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.delete_pipeline_job.js,samples/README.md) | -| Pipeline_service.delete_training_pipeline | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.delete_training_pipeline.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.delete_training_pipeline.js,samples/README.md) | -| Pipeline_service.get_pipeline_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.get_pipeline_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.get_pipeline_job.js,samples/README.md) | -| Pipeline_service.get_training_pipeline | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.get_training_pipeline.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.get_training_pipeline.js,samples/README.md) | -| Pipeline_service.list_pipeline_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.list_pipeline_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.list_pipeline_jobs.js,samples/README.md) | -| Pipeline_service.list_training_pipelines | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.list_training_pipelines.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.list_training_pipelines.js,samples/README.md) | -| Prediction_service.explain | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.explain.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.explain.js,samples/README.md) | -| Prediction_service.predict | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.predict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.predict.js,samples/README.md) | -| Prediction_service.raw_predict | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.raw_predict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.raw_predict.js,samples/README.md) | -| Schedule_service.create_schedule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.create_schedule.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.create_schedule.js,samples/README.md) | -| Schedule_service.delete_schedule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.delete_schedule.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.delete_schedule.js,samples/README.md) | -| Schedule_service.get_schedule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.get_schedule.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.get_schedule.js,samples/README.md) | -| Schedule_service.list_schedules | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.list_schedules.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.list_schedules.js,samples/README.md) | -| Schedule_service.pause_schedule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.pause_schedule.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.pause_schedule.js,samples/README.md) | -| Schedule_service.resume_schedule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.resume_schedule.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.resume_schedule.js,samples/README.md) | -| Specialist_pool_service.create_specialist_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/specialist_pool_service.create_specialist_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/specialist_pool_service.create_specialist_pool.js,samples/README.md) | -| Specialist_pool_service.delete_specialist_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/specialist_pool_service.delete_specialist_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/specialist_pool_service.delete_specialist_pool.js,samples/README.md) | -| Specialist_pool_service.get_specialist_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/specialist_pool_service.get_specialist_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/specialist_pool_service.get_specialist_pool.js,samples/README.md) | -| Specialist_pool_service.list_specialist_pools | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/specialist_pool_service.list_specialist_pools.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/specialist_pool_service.list_specialist_pools.js,samples/README.md) | -| Specialist_pool_service.update_specialist_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/specialist_pool_service.update_specialist_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/specialist_pool_service.update_specialist_pool.js,samples/README.md) | -| Tensorboard_service.batch_create_tensorboard_runs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.batch_create_tensorboard_runs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.batch_create_tensorboard_runs.js,samples/README.md) | -| Tensorboard_service.batch_create_tensorboard_time_series | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.batch_create_tensorboard_time_series.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.batch_create_tensorboard_time_series.js,samples/README.md) | -| Tensorboard_service.batch_read_tensorboard_time_series_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.batch_read_tensorboard_time_series_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.batch_read_tensorboard_time_series_data.js,samples/README.md) | -| Tensorboard_service.create_tensorboard | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.create_tensorboard.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.create_tensorboard.js,samples/README.md) | -| Tensorboard_service.create_tensorboard_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.create_tensorboard_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.create_tensorboard_experiment.js,samples/README.md) | -| Tensorboard_service.create_tensorboard_run | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.create_tensorboard_run.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.create_tensorboard_run.js,samples/README.md) | -| Tensorboard_service.create_tensorboard_time_series | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.create_tensorboard_time_series.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.create_tensorboard_time_series.js,samples/README.md) | -| Tensorboard_service.delete_tensorboard | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.delete_tensorboard.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.delete_tensorboard.js,samples/README.md) | -| Tensorboard_service.delete_tensorboard_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.delete_tensorboard_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.delete_tensorboard_experiment.js,samples/README.md) | -| Tensorboard_service.delete_tensorboard_run | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.delete_tensorboard_run.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.delete_tensorboard_run.js,samples/README.md) | -| Tensorboard_service.delete_tensorboard_time_series | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.delete_tensorboard_time_series.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.delete_tensorboard_time_series.js,samples/README.md) | -| Tensorboard_service.export_tensorboard_time_series_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.export_tensorboard_time_series_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.export_tensorboard_time_series_data.js,samples/README.md) | -| Tensorboard_service.get_tensorboard | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.get_tensorboard.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.get_tensorboard.js,samples/README.md) | -| Tensorboard_service.get_tensorboard_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.get_tensorboard_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.get_tensorboard_experiment.js,samples/README.md) | -| Tensorboard_service.get_tensorboard_run | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.get_tensorboard_run.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.get_tensorboard_run.js,samples/README.md) | -| Tensorboard_service.get_tensorboard_time_series | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.get_tensorboard_time_series.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.get_tensorboard_time_series.js,samples/README.md) | -| Tensorboard_service.list_tensorboard_experiments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.list_tensorboard_experiments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.list_tensorboard_experiments.js,samples/README.md) | -| Tensorboard_service.list_tensorboard_runs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.list_tensorboard_runs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.list_tensorboard_runs.js,samples/README.md) | -| Tensorboard_service.list_tensorboard_time_series | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.list_tensorboard_time_series.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.list_tensorboard_time_series.js,samples/README.md) | -| Tensorboard_service.list_tensorboards | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.list_tensorboards.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.list_tensorboards.js,samples/README.md) | -| Tensorboard_service.read_tensorboard_blob_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.read_tensorboard_blob_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.read_tensorboard_blob_data.js,samples/README.md) | -| Tensorboard_service.read_tensorboard_time_series_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.read_tensorboard_time_series_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.read_tensorboard_time_series_data.js,samples/README.md) | -| Tensorboard_service.read_tensorboard_usage | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.read_tensorboard_usage.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.read_tensorboard_usage.js,samples/README.md) | -| Tensorboard_service.update_tensorboard | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.update_tensorboard.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.update_tensorboard.js,samples/README.md) | -| Tensorboard_service.update_tensorboard_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.update_tensorboard_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.update_tensorboard_experiment.js,samples/README.md) | -| Tensorboard_service.update_tensorboard_run | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.update_tensorboard_run.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.update_tensorboard_run.js,samples/README.md) | -| Tensorboard_service.update_tensorboard_time_series | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.update_tensorboard_time_series.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.update_tensorboard_time_series.js,samples/README.md) | -| Tensorboard_service.write_tensorboard_experiment_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.write_tensorboard_experiment_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.write_tensorboard_experiment_data.js,samples/README.md) | -| Tensorboard_service.write_tensorboard_run_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.write_tensorboard_run_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.write_tensorboard_run_data.js,samples/README.md) | -| Vizier_service.add_trial_measurement | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.add_trial_measurement.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.add_trial_measurement.js,samples/README.md) | -| Vizier_service.check_trial_early_stopping_state | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.check_trial_early_stopping_state.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.check_trial_early_stopping_state.js,samples/README.md) | -| Vizier_service.complete_trial | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.complete_trial.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.complete_trial.js,samples/README.md) | -| Vizier_service.create_study | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.create_study.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.create_study.js,samples/README.md) | -| Vizier_service.create_trial | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.create_trial.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.create_trial.js,samples/README.md) | -| Vizier_service.delete_study | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.delete_study.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.delete_study.js,samples/README.md) | -| Vizier_service.delete_trial | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.delete_trial.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.delete_trial.js,samples/README.md) | -| Vizier_service.get_study | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.get_study.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.get_study.js,samples/README.md) | -| Vizier_service.get_trial | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.get_trial.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.get_trial.js,samples/README.md) | -| Vizier_service.list_optimal_trials | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.list_optimal_trials.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.list_optimal_trials.js,samples/README.md) | -| Vizier_service.list_studies | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.list_studies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.list_studies.js,samples/README.md) | -| Vizier_service.list_trials | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.list_trials.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.list_trials.js,samples/README.md) | -| Vizier_service.lookup_study | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.lookup_study.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.lookup_study.js,samples/README.md) | -| Vizier_service.stop_trial | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.stop_trial.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.stop_trial.js,samples/README.md) | -| Vizier_service.suggest_trials | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.suggest_trials.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.suggest_trials.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/quickstart.js,samples/README.md) | -| Quickstart.test | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/test/quickstart.test.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/test/quickstart.test.js,samples/README.md) | +| Dataset_service.create_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.create_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.create_dataset.js,packages/google-cloud-aiplatform/samples/README.md) | +| Dataset_service.delete_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.delete_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.delete_dataset.js,packages/google-cloud-aiplatform/samples/README.md) | +| Dataset_service.export_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.export_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.export_data.js,packages/google-cloud-aiplatform/samples/README.md) | +| Dataset_service.get_annotation_spec | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.get_annotation_spec.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.get_annotation_spec.js,packages/google-cloud-aiplatform/samples/README.md) | +| Dataset_service.get_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.get_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.get_dataset.js,packages/google-cloud-aiplatform/samples/README.md) | +| Dataset_service.import_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.import_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.import_data.js,packages/google-cloud-aiplatform/samples/README.md) | +| Dataset_service.list_annotations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.list_annotations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.list_annotations.js,packages/google-cloud-aiplatform/samples/README.md) | +| Dataset_service.list_data_items | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.list_data_items.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.list_data_items.js,packages/google-cloud-aiplatform/samples/README.md) | +| Dataset_service.list_datasets | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.list_datasets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.list_datasets.js,packages/google-cloud-aiplatform/samples/README.md) | +| Dataset_service.list_saved_queries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.list_saved_queries.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.list_saved_queries.js,packages/google-cloud-aiplatform/samples/README.md) | +| Dataset_service.search_data_items | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.search_data_items.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.search_data_items.js,packages/google-cloud-aiplatform/samples/README.md) | +| Dataset_service.update_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.update_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/dataset_service.update_dataset.js,packages/google-cloud-aiplatform/samples/README.md) | +| Endpoint_service.create_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.create_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.create_endpoint.js,packages/google-cloud-aiplatform/samples/README.md) | +| Endpoint_service.delete_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.delete_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.delete_endpoint.js,packages/google-cloud-aiplatform/samples/README.md) | +| Endpoint_service.deploy_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.deploy_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.deploy_model.js,packages/google-cloud-aiplatform/samples/README.md) | +| Endpoint_service.get_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.get_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.get_endpoint.js,packages/google-cloud-aiplatform/samples/README.md) | +| Endpoint_service.list_endpoints | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.list_endpoints.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.list_endpoints.js,packages/google-cloud-aiplatform/samples/README.md) | +| Endpoint_service.mutate_deployed_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.mutate_deployed_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.mutate_deployed_model.js,packages/google-cloud-aiplatform/samples/README.md) | +| Endpoint_service.undeploy_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.undeploy_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.undeploy_model.js,packages/google-cloud-aiplatform/samples/README.md) | +| Endpoint_service.update_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.update_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.update_endpoint.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_online_serving_service.read_feature_values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_online_serving_service.read_feature_values.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_online_serving_service.read_feature_values.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_online_serving_service.streaming_read_feature_values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_online_serving_service.streaming_read_feature_values.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_online_serving_service.streaming_read_feature_values.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_online_serving_service.write_feature_values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_online_serving_service.write_feature_values.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_online_serving_service.write_feature_values.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.batch_create_features | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.batch_create_features.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.batch_create_features.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.batch_read_feature_values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.batch_read_feature_values.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.batch_read_feature_values.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.create_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.create_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.create_entity_type.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.create_feature | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.create_feature.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.create_feature.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.create_featurestore | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.create_featurestore.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.create_featurestore.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.delete_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.delete_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.delete_entity_type.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.delete_feature | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.delete_feature.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.delete_feature.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.delete_feature_values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.delete_feature_values.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.delete_feature_values.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.delete_featurestore | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.delete_featurestore.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.delete_featurestore.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.export_feature_values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.export_feature_values.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.export_feature_values.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.get_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.get_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.get_entity_type.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.get_feature | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.get_feature.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.get_feature.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.get_featurestore | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.get_featurestore.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.get_featurestore.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.import_feature_values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.import_feature_values.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.import_feature_values.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.list_entity_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.list_entity_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.list_entity_types.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.list_features | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.list_features.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.list_features.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.list_featurestores | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.list_featurestores.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.list_featurestores.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.search_features | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.search_features.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.search_features.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.update_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.update_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.update_entity_type.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.update_feature | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.update_feature.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.update_feature.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.update_featurestore | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.update_featurestore.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.update_featurestore.js,packages/google-cloud-aiplatform/samples/README.md) | +| Index_endpoint_service.create_index_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/index_endpoint_service.create_index_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/index_endpoint_service.create_index_endpoint.js,packages/google-cloud-aiplatform/samples/README.md) | +| Index_endpoint_service.delete_index_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/index_endpoint_service.delete_index_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/index_endpoint_service.delete_index_endpoint.js,packages/google-cloud-aiplatform/samples/README.md) | +| Index_endpoint_service.deploy_index | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/index_endpoint_service.deploy_index.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/index_endpoint_service.deploy_index.js,packages/google-cloud-aiplatform/samples/README.md) | +| Index_endpoint_service.get_index_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/index_endpoint_service.get_index_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/index_endpoint_service.get_index_endpoint.js,packages/google-cloud-aiplatform/samples/README.md) | +| Index_endpoint_service.list_index_endpoints | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/index_endpoint_service.list_index_endpoints.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/index_endpoint_service.list_index_endpoints.js,packages/google-cloud-aiplatform/samples/README.md) | +| Index_endpoint_service.mutate_deployed_index | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/index_endpoint_service.mutate_deployed_index.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/index_endpoint_service.mutate_deployed_index.js,packages/google-cloud-aiplatform/samples/README.md) | +| Index_endpoint_service.undeploy_index | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/index_endpoint_service.undeploy_index.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/index_endpoint_service.undeploy_index.js,packages/google-cloud-aiplatform/samples/README.md) | +| Index_endpoint_service.update_index_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/index_endpoint_service.update_index_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/index_endpoint_service.update_index_endpoint.js,packages/google-cloud-aiplatform/samples/README.md) | +| Index_service.create_index | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/index_service.create_index.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/index_service.create_index.js,packages/google-cloud-aiplatform/samples/README.md) | +| Index_service.delete_index | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/index_service.delete_index.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/index_service.delete_index.js,packages/google-cloud-aiplatform/samples/README.md) | +| Index_service.get_index | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/index_service.get_index.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/index_service.get_index.js,packages/google-cloud-aiplatform/samples/README.md) | +| Index_service.list_indexes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/index_service.list_indexes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/index_service.list_indexes.js,packages/google-cloud-aiplatform/samples/README.md) | +| Index_service.remove_datapoints | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/index_service.remove_datapoints.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/index_service.remove_datapoints.js,packages/google-cloud-aiplatform/samples/README.md) | +| Index_service.update_index | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/index_service.update_index.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/index_service.update_index.js,packages/google-cloud-aiplatform/samples/README.md) | +| Index_service.upsert_datapoints | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/index_service.upsert_datapoints.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/index_service.upsert_datapoints.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.cancel_batch_prediction_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.cancel_batch_prediction_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.cancel_batch_prediction_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.cancel_custom_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.cancel_custom_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.cancel_custom_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.cancel_data_labeling_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.cancel_data_labeling_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.cancel_data_labeling_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.cancel_hyperparameter_tuning_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.cancel_hyperparameter_tuning_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.cancel_hyperparameter_tuning_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.cancel_nas_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.cancel_nas_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.cancel_nas_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.create_batch_prediction_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.create_batch_prediction_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.create_batch_prediction_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.create_custom_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.create_custom_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.create_custom_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.create_data_labeling_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.create_data_labeling_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.create_data_labeling_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.create_hyperparameter_tuning_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.create_hyperparameter_tuning_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.create_hyperparameter_tuning_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.create_model_deployment_monitoring_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.create_model_deployment_monitoring_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.create_model_deployment_monitoring_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.create_nas_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.create_nas_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.create_nas_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.delete_batch_prediction_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.delete_batch_prediction_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.delete_batch_prediction_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.delete_custom_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.delete_custom_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.delete_custom_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.delete_data_labeling_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.delete_data_labeling_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.delete_data_labeling_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.delete_hyperparameter_tuning_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.delete_hyperparameter_tuning_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.delete_hyperparameter_tuning_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.delete_model_deployment_monitoring_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.delete_model_deployment_monitoring_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.delete_model_deployment_monitoring_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.delete_nas_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.delete_nas_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.delete_nas_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.get_batch_prediction_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.get_batch_prediction_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.get_batch_prediction_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.get_custom_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.get_custom_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.get_custom_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.get_data_labeling_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.get_data_labeling_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.get_data_labeling_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.get_hyperparameter_tuning_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.get_hyperparameter_tuning_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.get_hyperparameter_tuning_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.get_model_deployment_monitoring_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.get_model_deployment_monitoring_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.get_model_deployment_monitoring_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.get_nas_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.get_nas_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.get_nas_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.get_nas_trial_detail | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.get_nas_trial_detail.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.get_nas_trial_detail.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.list_batch_prediction_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.list_batch_prediction_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.list_batch_prediction_jobs.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.list_custom_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.list_custom_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.list_custom_jobs.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.list_data_labeling_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.list_data_labeling_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.list_data_labeling_jobs.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.list_hyperparameter_tuning_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.list_hyperparameter_tuning_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.list_hyperparameter_tuning_jobs.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.list_model_deployment_monitoring_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.list_model_deployment_monitoring_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.list_model_deployment_monitoring_jobs.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.list_nas_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.list_nas_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.list_nas_jobs.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.list_nas_trial_details | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.list_nas_trial_details.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.list_nas_trial_details.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.pause_model_deployment_monitoring_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.pause_model_deployment_monitoring_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.pause_model_deployment_monitoring_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.resume_model_deployment_monitoring_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.resume_model_deployment_monitoring_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.resume_model_deployment_monitoring_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.search_model_deployment_monitoring_stats_anomalies | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.search_model_deployment_monitoring_stats_anomalies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.search_model_deployment_monitoring_stats_anomalies.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.update_model_deployment_monitoring_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/job_service.update_model_deployment_monitoring_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/job_service.update_model_deployment_monitoring_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.add_context_artifacts_and_executions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.add_context_artifacts_and_executions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.add_context_artifacts_and_executions.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.add_context_children | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.add_context_children.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.add_context_children.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.add_execution_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.add_execution_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.add_execution_events.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.create_artifact | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.create_artifact.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.create_artifact.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.create_context | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.create_context.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.create_context.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.create_execution | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.create_execution.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.create_execution.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.create_metadata_schema | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.create_metadata_schema.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.create_metadata_schema.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.create_metadata_store | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.create_metadata_store.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.create_metadata_store.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.delete_artifact | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.delete_artifact.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.delete_artifact.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.delete_context | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.delete_context.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.delete_context.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.delete_execution | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.delete_execution.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.delete_execution.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.delete_metadata_store | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.delete_metadata_store.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.delete_metadata_store.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.get_artifact | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.get_artifact.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.get_artifact.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.get_context | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.get_context.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.get_context.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.get_execution | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.get_execution.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.get_execution.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.get_metadata_schema | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.get_metadata_schema.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.get_metadata_schema.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.get_metadata_store | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.get_metadata_store.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.get_metadata_store.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.list_artifacts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.list_artifacts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.list_artifacts.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.list_contexts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.list_contexts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.list_contexts.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.list_executions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.list_executions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.list_executions.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.list_metadata_schemas | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.list_metadata_schemas.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.list_metadata_schemas.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.list_metadata_stores | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.list_metadata_stores.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.list_metadata_stores.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.purge_artifacts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.purge_artifacts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.purge_artifacts.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.purge_contexts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.purge_contexts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.purge_contexts.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.purge_executions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.purge_executions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.purge_executions.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.query_artifact_lineage_subgraph | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.query_artifact_lineage_subgraph.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.query_artifact_lineage_subgraph.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.query_context_lineage_subgraph | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.query_context_lineage_subgraph.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.query_context_lineage_subgraph.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.query_execution_inputs_and_outputs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.query_execution_inputs_and_outputs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.query_execution_inputs_and_outputs.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.remove_context_children | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.remove_context_children.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.remove_context_children.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.update_artifact | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.update_artifact.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.update_artifact.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.update_context | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.update_context.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.update_context.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.update_execution | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.update_execution.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/metadata_service.update_execution.js,packages/google-cloud-aiplatform/samples/README.md) | +| Migration_service.batch_migrate_resources | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/migration_service.batch_migrate_resources.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/migration_service.batch_migrate_resources.js,packages/google-cloud-aiplatform/samples/README.md) | +| Migration_service.search_migratable_resources | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/migration_service.search_migratable_resources.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/migration_service.search_migratable_resources.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.batch_import_evaluated_annotations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.batch_import_evaluated_annotations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.batch_import_evaluated_annotations.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.batch_import_model_evaluation_slices | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.batch_import_model_evaluation_slices.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.batch_import_model_evaluation_slices.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.copy_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.copy_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.copy_model.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.delete_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.delete_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.delete_model.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.delete_model_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.delete_model_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.delete_model_version.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.export_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.export_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.export_model.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.get_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.get_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.get_model.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.get_model_evaluation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.get_model_evaluation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.get_model_evaluation.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.get_model_evaluation_slice | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.get_model_evaluation_slice.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.get_model_evaluation_slice.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.import_model_evaluation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.import_model_evaluation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.import_model_evaluation.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.list_model_evaluation_slices | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.list_model_evaluation_slices.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.list_model_evaluation_slices.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.list_model_evaluations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.list_model_evaluations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.list_model_evaluations.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.list_model_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.list_model_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.list_model_versions.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.list_models | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.list_models.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.list_models.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.merge_version_aliases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.merge_version_aliases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.merge_version_aliases.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.update_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.update_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.update_model.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.upload_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/model_service.upload_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/model_service.upload_model.js,packages/google-cloud-aiplatform/samples/README.md) | +| Pipeline_service.cancel_pipeline_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.cancel_pipeline_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.cancel_pipeline_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Pipeline_service.cancel_training_pipeline | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.cancel_training_pipeline.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.cancel_training_pipeline.js,packages/google-cloud-aiplatform/samples/README.md) | +| Pipeline_service.create_pipeline_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.create_pipeline_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.create_pipeline_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Pipeline_service.create_training_pipeline | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.create_training_pipeline.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.create_training_pipeline.js,packages/google-cloud-aiplatform/samples/README.md) | +| Pipeline_service.delete_pipeline_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.delete_pipeline_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.delete_pipeline_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Pipeline_service.delete_training_pipeline | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.delete_training_pipeline.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.delete_training_pipeline.js,packages/google-cloud-aiplatform/samples/README.md) | +| Pipeline_service.get_pipeline_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.get_pipeline_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.get_pipeline_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Pipeline_service.get_training_pipeline | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.get_training_pipeline.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.get_training_pipeline.js,packages/google-cloud-aiplatform/samples/README.md) | +| Pipeline_service.list_pipeline_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.list_pipeline_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.list_pipeline_jobs.js,packages/google-cloud-aiplatform/samples/README.md) | +| Pipeline_service.list_training_pipelines | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.list_training_pipelines.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/pipeline_service.list_training_pipelines.js,packages/google-cloud-aiplatform/samples/README.md) | +| Prediction_service.explain | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/prediction_service.explain.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/prediction_service.explain.js,packages/google-cloud-aiplatform/samples/README.md) | +| Prediction_service.predict | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/prediction_service.predict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/prediction_service.predict.js,packages/google-cloud-aiplatform/samples/README.md) | +| Prediction_service.raw_predict | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/prediction_service.raw_predict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/prediction_service.raw_predict.js,packages/google-cloud-aiplatform/samples/README.md) | +| Specialist_pool_service.create_specialist_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/specialist_pool_service.create_specialist_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/specialist_pool_service.create_specialist_pool.js,packages/google-cloud-aiplatform/samples/README.md) | +| Specialist_pool_service.delete_specialist_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/specialist_pool_service.delete_specialist_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/specialist_pool_service.delete_specialist_pool.js,packages/google-cloud-aiplatform/samples/README.md) | +| Specialist_pool_service.get_specialist_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/specialist_pool_service.get_specialist_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/specialist_pool_service.get_specialist_pool.js,packages/google-cloud-aiplatform/samples/README.md) | +| Specialist_pool_service.list_specialist_pools | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/specialist_pool_service.list_specialist_pools.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/specialist_pool_service.list_specialist_pools.js,packages/google-cloud-aiplatform/samples/README.md) | +| Specialist_pool_service.update_specialist_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/specialist_pool_service.update_specialist_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/specialist_pool_service.update_specialist_pool.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.batch_create_tensorboard_runs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.batch_create_tensorboard_runs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.batch_create_tensorboard_runs.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.batch_create_tensorboard_time_series | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.batch_create_tensorboard_time_series.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.batch_create_tensorboard_time_series.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.batch_read_tensorboard_time_series_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.batch_read_tensorboard_time_series_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.batch_read_tensorboard_time_series_data.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.create_tensorboard | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.create_tensorboard.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.create_tensorboard.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.create_tensorboard_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.create_tensorboard_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.create_tensorboard_experiment.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.create_tensorboard_run | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.create_tensorboard_run.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.create_tensorboard_run.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.create_tensorboard_time_series | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.create_tensorboard_time_series.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.create_tensorboard_time_series.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.delete_tensorboard | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.delete_tensorboard.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.delete_tensorboard.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.delete_tensorboard_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.delete_tensorboard_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.delete_tensorboard_experiment.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.delete_tensorboard_run | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.delete_tensorboard_run.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.delete_tensorboard_run.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.delete_tensorboard_time_series | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.delete_tensorboard_time_series.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.delete_tensorboard_time_series.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.export_tensorboard_time_series_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.export_tensorboard_time_series_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.export_tensorboard_time_series_data.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.get_tensorboard | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.get_tensorboard.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.get_tensorboard.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.get_tensorboard_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.get_tensorboard_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.get_tensorboard_experiment.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.get_tensorboard_run | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.get_tensorboard_run.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.get_tensorboard_run.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.get_tensorboard_time_series | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.get_tensorboard_time_series.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.get_tensorboard_time_series.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.list_tensorboard_experiments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.list_tensorboard_experiments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.list_tensorboard_experiments.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.list_tensorboard_runs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.list_tensorboard_runs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.list_tensorboard_runs.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.list_tensorboard_time_series | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.list_tensorboard_time_series.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.list_tensorboard_time_series.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.list_tensorboards | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.list_tensorboards.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.list_tensorboards.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.read_tensorboard_blob_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.read_tensorboard_blob_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.read_tensorboard_blob_data.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.read_tensorboard_time_series_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.read_tensorboard_time_series_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.read_tensorboard_time_series_data.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.read_tensorboard_usage | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.read_tensorboard_usage.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.read_tensorboard_usage.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.update_tensorboard | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.update_tensorboard.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.update_tensorboard.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.update_tensorboard_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.update_tensorboard_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.update_tensorboard_experiment.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.update_tensorboard_run | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.update_tensorboard_run.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.update_tensorboard_run.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.update_tensorboard_time_series | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.update_tensorboard_time_series.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.update_tensorboard_time_series.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.write_tensorboard_experiment_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.write_tensorboard_experiment_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.write_tensorboard_experiment_data.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.write_tensorboard_run_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.write_tensorboard_run_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.write_tensorboard_run_data.js,packages/google-cloud-aiplatform/samples/README.md) | +| Vizier_service.add_trial_measurement | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.add_trial_measurement.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.add_trial_measurement.js,packages/google-cloud-aiplatform/samples/README.md) | +| Vizier_service.check_trial_early_stopping_state | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.check_trial_early_stopping_state.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.check_trial_early_stopping_state.js,packages/google-cloud-aiplatform/samples/README.md) | +| Vizier_service.complete_trial | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.complete_trial.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.complete_trial.js,packages/google-cloud-aiplatform/samples/README.md) | +| Vizier_service.create_study | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.create_study.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.create_study.js,packages/google-cloud-aiplatform/samples/README.md) | +| Vizier_service.create_trial | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.create_trial.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.create_trial.js,packages/google-cloud-aiplatform/samples/README.md) | +| Vizier_service.delete_study | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.delete_study.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.delete_study.js,packages/google-cloud-aiplatform/samples/README.md) | +| Vizier_service.delete_trial | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.delete_trial.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.delete_trial.js,packages/google-cloud-aiplatform/samples/README.md) | +| Vizier_service.get_study | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.get_study.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.get_study.js,packages/google-cloud-aiplatform/samples/README.md) | +| Vizier_service.get_trial | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.get_trial.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.get_trial.js,packages/google-cloud-aiplatform/samples/README.md) | +| Vizier_service.list_optimal_trials | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.list_optimal_trials.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.list_optimal_trials.js,packages/google-cloud-aiplatform/samples/README.md) | +| Vizier_service.list_studies | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.list_studies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.list_studies.js,packages/google-cloud-aiplatform/samples/README.md) | +| Vizier_service.list_trials | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.list_trials.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.list_trials.js,packages/google-cloud-aiplatform/samples/README.md) | +| Vizier_service.lookup_study | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.lookup_study.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.lookup_study.js,packages/google-cloud-aiplatform/samples/README.md) | +| Vizier_service.stop_trial | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.stop_trial.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.stop_trial.js,packages/google-cloud-aiplatform/samples/README.md) | +| Vizier_service.suggest_trials | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.suggest_trials.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/vizier_service.suggest_trials.js,packages/google-cloud-aiplatform/samples/README.md) | +| Dataset_service.create_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.create_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.create_dataset.js,packages/google-cloud-aiplatform/samples/README.md) | +| Dataset_service.delete_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.delete_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.delete_dataset.js,packages/google-cloud-aiplatform/samples/README.md) | +| Dataset_service.export_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.export_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.export_data.js,packages/google-cloud-aiplatform/samples/README.md) | +| Dataset_service.get_annotation_spec | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.get_annotation_spec.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.get_annotation_spec.js,packages/google-cloud-aiplatform/samples/README.md) | +| Dataset_service.get_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.get_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.get_dataset.js,packages/google-cloud-aiplatform/samples/README.md) | +| Dataset_service.import_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.import_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.import_data.js,packages/google-cloud-aiplatform/samples/README.md) | +| Dataset_service.list_annotations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.list_annotations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.list_annotations.js,packages/google-cloud-aiplatform/samples/README.md) | +| Dataset_service.list_data_items | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.list_data_items.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.list_data_items.js,packages/google-cloud-aiplatform/samples/README.md) | +| Dataset_service.list_datasets | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.list_datasets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.list_datasets.js,packages/google-cloud-aiplatform/samples/README.md) | +| Dataset_service.list_saved_queries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.list_saved_queries.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.list_saved_queries.js,packages/google-cloud-aiplatform/samples/README.md) | +| Dataset_service.search_data_items | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.search_data_items.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.search_data_items.js,packages/google-cloud-aiplatform/samples/README.md) | +| Dataset_service.update_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.update_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/dataset_service.update_dataset.js,packages/google-cloud-aiplatform/samples/README.md) | +| Deployment_resource_pool_service.create_deployment_resource_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.create_deployment_resource_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.create_deployment_resource_pool.js,packages/google-cloud-aiplatform/samples/README.md) | +| Deployment_resource_pool_service.delete_deployment_resource_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.delete_deployment_resource_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.delete_deployment_resource_pool.js,packages/google-cloud-aiplatform/samples/README.md) | +| Deployment_resource_pool_service.get_deployment_resource_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.get_deployment_resource_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.get_deployment_resource_pool.js,packages/google-cloud-aiplatform/samples/README.md) | +| Deployment_resource_pool_service.list_deployment_resource_pools | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.list_deployment_resource_pools.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.list_deployment_resource_pools.js,packages/google-cloud-aiplatform/samples/README.md) | +| Deployment_resource_pool_service.query_deployed_models | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.query_deployed_models.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/deployment_resource_pool_service.query_deployed_models.js,packages/google-cloud-aiplatform/samples/README.md) | +| Endpoint_service.create_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.create_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.create_endpoint.js,packages/google-cloud-aiplatform/samples/README.md) | +| Endpoint_service.delete_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.delete_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.delete_endpoint.js,packages/google-cloud-aiplatform/samples/README.md) | +| Endpoint_service.deploy_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.deploy_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.deploy_model.js,packages/google-cloud-aiplatform/samples/README.md) | +| Endpoint_service.get_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.get_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.get_endpoint.js,packages/google-cloud-aiplatform/samples/README.md) | +| Endpoint_service.list_endpoints | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.list_endpoints.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.list_endpoints.js,packages/google-cloud-aiplatform/samples/README.md) | +| Endpoint_service.mutate_deployed_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.mutate_deployed_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.mutate_deployed_model.js,packages/google-cloud-aiplatform/samples/README.md) | +| Endpoint_service.undeploy_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.undeploy_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.undeploy_model.js,packages/google-cloud-aiplatform/samples/README.md) | +| Endpoint_service.update_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.update_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.update_endpoint.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_online_serving_service.read_feature_values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_online_serving_service.read_feature_values.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_online_serving_service.read_feature_values.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_online_serving_service.streaming_read_feature_values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_online_serving_service.streaming_read_feature_values.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_online_serving_service.streaming_read_feature_values.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_online_serving_service.write_feature_values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_online_serving_service.write_feature_values.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_online_serving_service.write_feature_values.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.batch_create_features | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.batch_create_features.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.batch_create_features.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.batch_read_feature_values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.batch_read_feature_values.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.batch_read_feature_values.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.create_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.create_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.create_entity_type.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.create_feature | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.create_feature.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.create_feature.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.create_featurestore | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.create_featurestore.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.create_featurestore.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.delete_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.delete_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.delete_entity_type.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.delete_feature | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.delete_feature.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.delete_feature.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.delete_feature_values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.delete_feature_values.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.delete_feature_values.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.delete_featurestore | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.delete_featurestore.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.delete_featurestore.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.export_feature_values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.export_feature_values.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.export_feature_values.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.get_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.get_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.get_entity_type.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.get_feature | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.get_feature.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.get_feature.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.get_featurestore | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.get_featurestore.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.get_featurestore.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.import_feature_values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.import_feature_values.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.import_feature_values.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.list_entity_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.list_entity_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.list_entity_types.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.list_features | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.list_features.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.list_features.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.list_featurestores | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.list_featurestores.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.list_featurestores.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.search_features | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.search_features.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.search_features.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.update_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.update_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.update_entity_type.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.update_feature | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.update_feature.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.update_feature.js,packages/google-cloud-aiplatform/samples/README.md) | +| Featurestore_service.update_featurestore | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.update_featurestore.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.update_featurestore.js,packages/google-cloud-aiplatform/samples/README.md) | +| Index_endpoint_service.create_index_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/index_endpoint_service.create_index_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/index_endpoint_service.create_index_endpoint.js,packages/google-cloud-aiplatform/samples/README.md) | +| Index_endpoint_service.delete_index_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/index_endpoint_service.delete_index_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/index_endpoint_service.delete_index_endpoint.js,packages/google-cloud-aiplatform/samples/README.md) | +| Index_endpoint_service.deploy_index | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/index_endpoint_service.deploy_index.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/index_endpoint_service.deploy_index.js,packages/google-cloud-aiplatform/samples/README.md) | +| Index_endpoint_service.get_index_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/index_endpoint_service.get_index_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/index_endpoint_service.get_index_endpoint.js,packages/google-cloud-aiplatform/samples/README.md) | +| Index_endpoint_service.list_index_endpoints | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/index_endpoint_service.list_index_endpoints.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/index_endpoint_service.list_index_endpoints.js,packages/google-cloud-aiplatform/samples/README.md) | +| Index_endpoint_service.mutate_deployed_index | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/index_endpoint_service.mutate_deployed_index.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/index_endpoint_service.mutate_deployed_index.js,packages/google-cloud-aiplatform/samples/README.md) | +| Index_endpoint_service.undeploy_index | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/index_endpoint_service.undeploy_index.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/index_endpoint_service.undeploy_index.js,packages/google-cloud-aiplatform/samples/README.md) | +| Index_endpoint_service.update_index_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/index_endpoint_service.update_index_endpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/index_endpoint_service.update_index_endpoint.js,packages/google-cloud-aiplatform/samples/README.md) | +| Index_service.create_index | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/index_service.create_index.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/index_service.create_index.js,packages/google-cloud-aiplatform/samples/README.md) | +| Index_service.delete_index | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/index_service.delete_index.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/index_service.delete_index.js,packages/google-cloud-aiplatform/samples/README.md) | +| Index_service.get_index | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/index_service.get_index.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/index_service.get_index.js,packages/google-cloud-aiplatform/samples/README.md) | +| Index_service.list_indexes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/index_service.list_indexes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/index_service.list_indexes.js,packages/google-cloud-aiplatform/samples/README.md) | +| Index_service.remove_datapoints | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/index_service.remove_datapoints.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/index_service.remove_datapoints.js,packages/google-cloud-aiplatform/samples/README.md) | +| Index_service.update_index | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/index_service.update_index.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/index_service.update_index.js,packages/google-cloud-aiplatform/samples/README.md) | +| Index_service.upsert_datapoints | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/index_service.upsert_datapoints.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/index_service.upsert_datapoints.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.cancel_batch_prediction_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.cancel_batch_prediction_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.cancel_batch_prediction_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.cancel_custom_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.cancel_custom_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.cancel_custom_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.cancel_data_labeling_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.cancel_data_labeling_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.cancel_data_labeling_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.cancel_hyperparameter_tuning_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.cancel_hyperparameter_tuning_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.cancel_hyperparameter_tuning_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.cancel_nas_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.cancel_nas_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.cancel_nas_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.create_batch_prediction_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.create_batch_prediction_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.create_batch_prediction_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.create_custom_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.create_custom_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.create_custom_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.create_data_labeling_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.create_data_labeling_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.create_data_labeling_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.create_hyperparameter_tuning_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.create_hyperparameter_tuning_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.create_hyperparameter_tuning_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.create_model_deployment_monitoring_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.create_model_deployment_monitoring_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.create_model_deployment_monitoring_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.create_nas_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.create_nas_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.create_nas_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.delete_batch_prediction_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.delete_batch_prediction_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.delete_batch_prediction_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.delete_custom_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.delete_custom_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.delete_custom_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.delete_data_labeling_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.delete_data_labeling_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.delete_data_labeling_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.delete_hyperparameter_tuning_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.delete_hyperparameter_tuning_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.delete_hyperparameter_tuning_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.delete_model_deployment_monitoring_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.delete_model_deployment_monitoring_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.delete_model_deployment_monitoring_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.delete_nas_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.delete_nas_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.delete_nas_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.get_batch_prediction_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.get_batch_prediction_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.get_batch_prediction_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.get_custom_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.get_custom_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.get_custom_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.get_data_labeling_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.get_data_labeling_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.get_data_labeling_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.get_hyperparameter_tuning_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.get_hyperparameter_tuning_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.get_hyperparameter_tuning_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.get_model_deployment_monitoring_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.get_model_deployment_monitoring_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.get_model_deployment_monitoring_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.get_nas_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.get_nas_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.get_nas_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.get_nas_trial_detail | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.get_nas_trial_detail.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.get_nas_trial_detail.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.list_batch_prediction_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.list_batch_prediction_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.list_batch_prediction_jobs.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.list_custom_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.list_custom_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.list_custom_jobs.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.list_data_labeling_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.list_data_labeling_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.list_data_labeling_jobs.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.list_hyperparameter_tuning_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.list_hyperparameter_tuning_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.list_hyperparameter_tuning_jobs.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.list_model_deployment_monitoring_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.list_model_deployment_monitoring_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.list_model_deployment_monitoring_jobs.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.list_nas_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.list_nas_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.list_nas_jobs.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.list_nas_trial_details | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.list_nas_trial_details.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.list_nas_trial_details.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.pause_model_deployment_monitoring_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.pause_model_deployment_monitoring_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.pause_model_deployment_monitoring_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.resume_model_deployment_monitoring_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.resume_model_deployment_monitoring_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.resume_model_deployment_monitoring_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.search_model_deployment_monitoring_stats_anomalies | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.search_model_deployment_monitoring_stats_anomalies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.search_model_deployment_monitoring_stats_anomalies.js,packages/google-cloud-aiplatform/samples/README.md) | +| Job_service.update_model_deployment_monitoring_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.update_model_deployment_monitoring_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.update_model_deployment_monitoring_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Match_service.find_neighbors | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.find_neighbors.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.find_neighbors.js,packages/google-cloud-aiplatform/samples/README.md) | +| Match_service.read_index_datapoints | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.read_index_datapoints.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.read_index_datapoints.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.add_context_artifacts_and_executions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.add_context_artifacts_and_executions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.add_context_artifacts_and_executions.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.add_context_children | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.add_context_children.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.add_context_children.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.add_execution_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.add_execution_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.add_execution_events.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.create_artifact | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.create_artifact.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.create_artifact.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.create_context | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.create_context.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.create_context.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.create_execution | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.create_execution.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.create_execution.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.create_metadata_schema | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.create_metadata_schema.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.create_metadata_schema.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.create_metadata_store | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.create_metadata_store.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.create_metadata_store.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.delete_artifact | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.delete_artifact.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.delete_artifact.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.delete_context | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.delete_context.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.delete_context.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.delete_execution | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.delete_execution.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.delete_execution.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.delete_metadata_store | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.delete_metadata_store.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.delete_metadata_store.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.get_artifact | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.get_artifact.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.get_artifact.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.get_context | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.get_context.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.get_context.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.get_execution | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.get_execution.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.get_execution.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.get_metadata_schema | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.get_metadata_schema.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.get_metadata_schema.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.get_metadata_store | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.get_metadata_store.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.get_metadata_store.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.list_artifacts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.list_artifacts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.list_artifacts.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.list_contexts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.list_contexts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.list_contexts.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.list_executions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.list_executions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.list_executions.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.list_metadata_schemas | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.list_metadata_schemas.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.list_metadata_schemas.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.list_metadata_stores | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.list_metadata_stores.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.list_metadata_stores.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.purge_artifacts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.purge_artifacts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.purge_artifacts.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.purge_contexts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.purge_contexts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.purge_contexts.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.purge_executions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.purge_executions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.purge_executions.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.query_artifact_lineage_subgraph | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.query_artifact_lineage_subgraph.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.query_artifact_lineage_subgraph.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.query_context_lineage_subgraph | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.query_context_lineage_subgraph.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.query_context_lineage_subgraph.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.query_execution_inputs_and_outputs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.query_execution_inputs_and_outputs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.query_execution_inputs_and_outputs.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.remove_context_children | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.remove_context_children.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.remove_context_children.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.update_artifact | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.update_artifact.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.update_artifact.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.update_context | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.update_context.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.update_context.js,packages/google-cloud-aiplatform/samples/README.md) | +| Metadata_service.update_execution | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.update_execution.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.update_execution.js,packages/google-cloud-aiplatform/samples/README.md) | +| Migration_service.batch_migrate_resources | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/migration_service.batch_migrate_resources.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/migration_service.batch_migrate_resources.js,packages/google-cloud-aiplatform/samples/README.md) | +| Migration_service.search_migratable_resources | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/migration_service.search_migratable_resources.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/migration_service.search_migratable_resources.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_garden_service.get_publisher_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_garden_service.get_publisher_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_garden_service.get_publisher_model.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.batch_import_evaluated_annotations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.batch_import_evaluated_annotations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.batch_import_evaluated_annotations.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.batch_import_model_evaluation_slices | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.batch_import_model_evaluation_slices.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.batch_import_model_evaluation_slices.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.copy_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.copy_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.copy_model.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.delete_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.delete_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.delete_model.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.delete_model_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.delete_model_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.delete_model_version.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.export_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.export_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.export_model.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.get_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.get_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.get_model.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.get_model_evaluation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.get_model_evaluation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.get_model_evaluation.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.get_model_evaluation_slice | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.get_model_evaluation_slice.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.get_model_evaluation_slice.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.import_model_evaluation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.import_model_evaluation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.import_model_evaluation.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.list_model_evaluation_slices | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.list_model_evaluation_slices.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.list_model_evaluation_slices.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.list_model_evaluations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.list_model_evaluations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.list_model_evaluations.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.list_model_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.list_model_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.list_model_versions.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.list_models | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.list_models.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.list_models.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.merge_version_aliases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.merge_version_aliases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.merge_version_aliases.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.update_explanation_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.update_explanation_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.update_explanation_dataset.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.update_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.update_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.update_model.js,packages/google-cloud-aiplatform/samples/README.md) | +| Model_service.upload_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.upload_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.upload_model.js,packages/google-cloud-aiplatform/samples/README.md) | +| Pipeline_service.cancel_pipeline_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.cancel_pipeline_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.cancel_pipeline_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Pipeline_service.cancel_training_pipeline | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.cancel_training_pipeline.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.cancel_training_pipeline.js,packages/google-cloud-aiplatform/samples/README.md) | +| Pipeline_service.create_pipeline_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.create_pipeline_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.create_pipeline_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Pipeline_service.create_training_pipeline | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.create_training_pipeline.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.create_training_pipeline.js,packages/google-cloud-aiplatform/samples/README.md) | +| Pipeline_service.delete_pipeline_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.delete_pipeline_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.delete_pipeline_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Pipeline_service.delete_training_pipeline | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.delete_training_pipeline.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.delete_training_pipeline.js,packages/google-cloud-aiplatform/samples/README.md) | +| Pipeline_service.get_pipeline_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.get_pipeline_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.get_pipeline_job.js,packages/google-cloud-aiplatform/samples/README.md) | +| Pipeline_service.get_training_pipeline | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.get_training_pipeline.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.get_training_pipeline.js,packages/google-cloud-aiplatform/samples/README.md) | +| Pipeline_service.list_pipeline_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.list_pipeline_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.list_pipeline_jobs.js,packages/google-cloud-aiplatform/samples/README.md) | +| Pipeline_service.list_training_pipelines | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.list_training_pipelines.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/pipeline_service.list_training_pipelines.js,packages/google-cloud-aiplatform/samples/README.md) | +| Prediction_service.explain | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.explain.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.explain.js,packages/google-cloud-aiplatform/samples/README.md) | +| Prediction_service.predict | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.predict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.predict.js,packages/google-cloud-aiplatform/samples/README.md) | +| Prediction_service.raw_predict | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.raw_predict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.raw_predict.js,packages/google-cloud-aiplatform/samples/README.md) | +| Schedule_service.create_schedule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.create_schedule.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.create_schedule.js,packages/google-cloud-aiplatform/samples/README.md) | +| Schedule_service.delete_schedule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.delete_schedule.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.delete_schedule.js,packages/google-cloud-aiplatform/samples/README.md) | +| Schedule_service.get_schedule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.get_schedule.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.get_schedule.js,packages/google-cloud-aiplatform/samples/README.md) | +| Schedule_service.list_schedules | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.list_schedules.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.list_schedules.js,packages/google-cloud-aiplatform/samples/README.md) | +| Schedule_service.pause_schedule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.pause_schedule.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.pause_schedule.js,packages/google-cloud-aiplatform/samples/README.md) | +| Schedule_service.resume_schedule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.resume_schedule.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.resume_schedule.js,packages/google-cloud-aiplatform/samples/README.md) | +| Schedule_service.update_schedule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.update_schedule.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.update_schedule.js,packages/google-cloud-aiplatform/samples/README.md) | +| Specialist_pool_service.create_specialist_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/specialist_pool_service.create_specialist_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/specialist_pool_service.create_specialist_pool.js,packages/google-cloud-aiplatform/samples/README.md) | +| Specialist_pool_service.delete_specialist_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/specialist_pool_service.delete_specialist_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/specialist_pool_service.delete_specialist_pool.js,packages/google-cloud-aiplatform/samples/README.md) | +| Specialist_pool_service.get_specialist_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/specialist_pool_service.get_specialist_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/specialist_pool_service.get_specialist_pool.js,packages/google-cloud-aiplatform/samples/README.md) | +| Specialist_pool_service.list_specialist_pools | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/specialist_pool_service.list_specialist_pools.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/specialist_pool_service.list_specialist_pools.js,packages/google-cloud-aiplatform/samples/README.md) | +| Specialist_pool_service.update_specialist_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/specialist_pool_service.update_specialist_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/specialist_pool_service.update_specialist_pool.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.batch_create_tensorboard_runs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.batch_create_tensorboard_runs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.batch_create_tensorboard_runs.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.batch_create_tensorboard_time_series | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.batch_create_tensorboard_time_series.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.batch_create_tensorboard_time_series.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.batch_read_tensorboard_time_series_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.batch_read_tensorboard_time_series_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.batch_read_tensorboard_time_series_data.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.create_tensorboard | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.create_tensorboard.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.create_tensorboard.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.create_tensorboard_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.create_tensorboard_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.create_tensorboard_experiment.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.create_tensorboard_run | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.create_tensorboard_run.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.create_tensorboard_run.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.create_tensorboard_time_series | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.create_tensorboard_time_series.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.create_tensorboard_time_series.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.delete_tensorboard | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.delete_tensorboard.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.delete_tensorboard.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.delete_tensorboard_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.delete_tensorboard_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.delete_tensorboard_experiment.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.delete_tensorboard_run | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.delete_tensorboard_run.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.delete_tensorboard_run.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.delete_tensorboard_time_series | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.delete_tensorboard_time_series.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.delete_tensorboard_time_series.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.export_tensorboard_time_series_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.export_tensorboard_time_series_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.export_tensorboard_time_series_data.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.get_tensorboard | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.get_tensorboard.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.get_tensorboard.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.get_tensorboard_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.get_tensorboard_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.get_tensorboard_experiment.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.get_tensorboard_run | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.get_tensorboard_run.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.get_tensorboard_run.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.get_tensorboard_time_series | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.get_tensorboard_time_series.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.get_tensorboard_time_series.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.list_tensorboard_experiments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.list_tensorboard_experiments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.list_tensorboard_experiments.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.list_tensorboard_runs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.list_tensorboard_runs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.list_tensorboard_runs.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.list_tensorboard_time_series | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.list_tensorboard_time_series.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.list_tensorboard_time_series.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.list_tensorboards | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.list_tensorboards.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.list_tensorboards.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.read_tensorboard_blob_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.read_tensorboard_blob_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.read_tensorboard_blob_data.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.read_tensorboard_time_series_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.read_tensorboard_time_series_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.read_tensorboard_time_series_data.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.read_tensorboard_usage | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.read_tensorboard_usage.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.read_tensorboard_usage.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.update_tensorboard | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.update_tensorboard.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.update_tensorboard.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.update_tensorboard_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.update_tensorboard_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.update_tensorboard_experiment.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.update_tensorboard_run | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.update_tensorboard_run.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.update_tensorboard_run.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.update_tensorboard_time_series | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.update_tensorboard_time_series.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.update_tensorboard_time_series.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.write_tensorboard_experiment_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.write_tensorboard_experiment_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.write_tensorboard_experiment_data.js,packages/google-cloud-aiplatform/samples/README.md) | +| Tensorboard_service.write_tensorboard_run_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.write_tensorboard_run_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.write_tensorboard_run_data.js,packages/google-cloud-aiplatform/samples/README.md) | +| Vizier_service.add_trial_measurement | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.add_trial_measurement.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.add_trial_measurement.js,packages/google-cloud-aiplatform/samples/README.md) | +| Vizier_service.check_trial_early_stopping_state | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.check_trial_early_stopping_state.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.check_trial_early_stopping_state.js,packages/google-cloud-aiplatform/samples/README.md) | +| Vizier_service.complete_trial | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.complete_trial.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.complete_trial.js,packages/google-cloud-aiplatform/samples/README.md) | +| Vizier_service.create_study | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.create_study.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.create_study.js,packages/google-cloud-aiplatform/samples/README.md) | +| Vizier_service.create_trial | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.create_trial.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.create_trial.js,packages/google-cloud-aiplatform/samples/README.md) | +| Vizier_service.delete_study | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.delete_study.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.delete_study.js,packages/google-cloud-aiplatform/samples/README.md) | +| Vizier_service.delete_trial | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.delete_trial.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.delete_trial.js,packages/google-cloud-aiplatform/samples/README.md) | +| Vizier_service.get_study | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.get_study.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.get_study.js,packages/google-cloud-aiplatform/samples/README.md) | +| Vizier_service.get_trial | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.get_trial.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.get_trial.js,packages/google-cloud-aiplatform/samples/README.md) | +| Vizier_service.list_optimal_trials | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.list_optimal_trials.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.list_optimal_trials.js,packages/google-cloud-aiplatform/samples/README.md) | +| Vizier_service.list_studies | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.list_studies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.list_studies.js,packages/google-cloud-aiplatform/samples/README.md) | +| Vizier_service.list_trials | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.list_trials.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.list_trials.js,packages/google-cloud-aiplatform/samples/README.md) | +| Vizier_service.lookup_study | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.lookup_study.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.lookup_study.js,packages/google-cloud-aiplatform/samples/README.md) | +| Vizier_service.stop_trial | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.stop_trial.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.stop_trial.js,packages/google-cloud-aiplatform/samples/README.md) | +| Vizier_service.suggest_trials | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.suggest_trials.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/vizier_service.suggest_trials.js,packages/google-cloud-aiplatform/samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/quickstart.js,packages/google-cloud-aiplatform/samples/README.md) | diff --git a/packages/google-cloud-aiplatform/package.json b/packages/google-cloud-aiplatform/package.json index 8e54cb7c1b9..82832a6e761 100644 --- a/packages/google-cloud-aiplatform/package.json +++ b/packages/google-cloud-aiplatform/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/aiplatform", - "version": "2.9.0", + "version": "2.14.0", "description": "Vertex AI client for Node.js", "repository": { "type": "git", @@ -38,17 +38,18 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "NODE_OPTIONS=--max-old-space-size=8192 jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", "docs-test": "linkinator docs", "fix": "gts fix", "lint": "gts check", - "prelint": "cd samples; npm link ../; npm i", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", "test": "c8 node build/test/run.js" }, "dependencies": { @@ -65,6 +66,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -78,5 +80,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-aiplatform" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/accelerator_type.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/accelerator_type.proto index 7e5f31075ad..f06cfb9df9e 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/accelerator_type.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/accelerator_type.proto @@ -47,6 +47,9 @@ enum AcceleratorType { // Nvidia Tesla A100 GPU. NVIDIA_TESLA_A100 = 8; + // Nvidia L4 GPU. + NVIDIA_L4 = 11; + // TPU v2. TPU_V2 = 6; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/batch_prediction_job.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/batch_prediction_job.proto index 8791eedb38d..5388cd02886 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/batch_prediction_job.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/batch_prediction_job.proto @@ -446,9 +446,9 @@ message BatchPredictionJob { // For custom-trained Models and AutoML Tabular Models, the container of the // DeployedModel instances will send `stderr` and `stdout` streams to - // Stackdriver Logging by default. Please note that the logs incur cost, + // Cloud Logging by default. Please note that the logs incur cost, // which are subject to [Cloud Logging - // pricing](https://cloud.google.com/stackdriver/pricing). + // pricing](https://cloud.google.com/logging/pricing). // // User can disable container logging by setting this flag to true. bool disable_container_logging = 34; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/custom_job.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/custom_job.proto index 3f8aba92a5f..10be55ef321 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/custom_job.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/custom_job.proto @@ -216,6 +216,26 @@ message CustomJobSpec { // (within // [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials]). bool enable_dashboard_access = 16 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Experiment associated with this job. + // Format: + // `projects/{project}/locations/{location}/metadataStores/{metadataStores}/contexts/{experiment-name}` + string experiment = 17 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Context" + } + ]; + + // Optional. The Experiment Run associated with this job. + // Format: + // `projects/{project}/locations/{location}/metadataStores/{metadataStores}/contexts/{experiment-name}-{experiment-run-name}` + string experiment_run = 18 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Context" + } + ]; } // Represents the spec of a worker pool in a job. diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/dataset.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/dataset.proto index c0daef00bb5..bca97b5b9d0 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/dataset.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/dataset.proto @@ -90,7 +90,7 @@ message Dataset { map labels = 7; // All SavedQueries belong to the Dataset will be returned in List/Get - // Dataset response. The [annotation_specs][SavedQuery.annotation_specs] field + // Dataset response. The annotation_specs field // will not be populated except for UI cases which will only use // [annotation_spec_count][google.cloud.aiplatform.v1.SavedQuery.annotation_spec_count]. // In CreateDataset request, a SavedQuery is created together if @@ -176,9 +176,9 @@ message ExportDataConfig { ExportFractionSplit fraction_split = 5; } - // A filter on Annotations of the Dataset. Only Annotations on to-be-exported - // DataItems(specified by [data_items_filter][]) that match this filter will - // be exported. The filter syntax is the same as in + // An expression for filtering what part of the Dataset is to be exported. + // Only Annotations that match this filter will be exported. The filter syntax + // is the same as in // [ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations]. string annotations_filter = 2; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/endpoint.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/endpoint.proto index 8c918c3733d..e014e10611f 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/endpoint.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/endpoint.proto @@ -38,6 +38,7 @@ message Endpoint { option (google.api.resource) = { type: "aiplatform.googleapis.com/Endpoint" pattern: "projects/{project}/locations/{location}/endpoints/{endpoint}" + pattern: "projects/{project}/locations/{location}/publishers/{publisher}/models/{model}" }; // Output only. The resource name of the Endpoint. @@ -127,7 +128,8 @@ message Endpoint { // Output only. Resource name of the Model Monitoring job associated with this // Endpoint if monitoring is enabled by - // [CreateModelDeploymentMonitoringJob][]. Format: + // [JobService.CreateModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.CreateModelDeploymentMonitoringJob]. + // Format: // `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}` string model_deployment_monitoring_job = 14 [ (google.api.field_behavior) = OUTPUT_ONLY, @@ -223,19 +225,19 @@ message DeployedModel { // For custom-trained Models and AutoML Tabular Models, the container of the // DeployedModel instances will send `stderr` and `stdout` streams to - // Stackdriver Logging by default. Please note that the logs incur cost, + // Cloud Logging by default. Please note that the logs incur cost, // which are subject to [Cloud Logging - // pricing](https://cloud.google.com/stackdriver/pricing). + // pricing](https://cloud.google.com/logging/pricing). // // User can disable container logging by setting this flag to true. bool disable_container_logging = 15; - // If true, online prediction access logs are sent to StackDriver + // If true, online prediction access logs are sent to Cloud // Logging. // These logs are like standard server access logs, containing // information like timestamp and latency for each prediction request. // - // Note that Stackdriver logs may incur a cost, especially if your project + // Note that logs may incur a cost, especially if your project // receives prediction requests at a high queries per second rate (QPS). // Estimate your costs before enabling this option. bool enable_access_logging = 13; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/endpoint_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/endpoint_service.proto index 2bdf828d37f..6ac193dabf8 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/endpoint_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/endpoint_service.proto @@ -122,6 +122,24 @@ service EndpointService { metadata_type: "UndeployModelOperationMetadata" }; } + + // Updates an existing deployed model. Updatable fields include + // `min_replica_count`, `max_replica_count`, `autoscaling_metric_specs`, + // `disable_container_logging` (v1 only), and `enable_container_logging` + // (v1beta1 only). + rpc MutateDeployedModel(MutateDeployedModelRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{endpoint=projects/*/locations/*/endpoints/*}:mutateDeployedModel" + body: "*" + }; + option (google.api.method_signature) = + "endpoint,deployed_model,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "MutateDeployedModelResponse" + metadata_type: "MutateDeployedModelOperationMetadata" + }; + } } // Request message for @@ -358,3 +376,50 @@ message UndeployModelOperationMetadata { // The operation generic information. GenericOperationMetadata generic_metadata = 1; } + +// Request message for +// [EndpointService.MutateDeployedModel][google.cloud.aiplatform.v1.EndpointService.MutateDeployedModel]. +message MutateDeployedModelRequest { + // Required. The name of the Endpoint resource into which to mutate a + // DeployedModel. Format: + // `projects/{project}/locations/{location}/endpoints/{endpoint}` + string endpoint = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Endpoint" + } + ]; + + // Required. The DeployedModel to be mutated within the Endpoint. Only the + // following fields can be mutated: + // + // * `min_replica_count` in either + // [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or + // [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources] + // * `max_replica_count` in either + // [DedicatedResources][google.cloud.aiplatform.v1.DedicatedResources] or + // [AutomaticResources][google.cloud.aiplatform.v1.AutomaticResources] + // * [autoscaling_metric_specs][google.cloud.aiplatform.v1.DedicatedResources.autoscaling_metric_specs] + // * `disable_container_logging` (v1 only) + // * `enable_container_logging` (v1beta1 only) + DeployedModel deployed_model = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The update mask applies to the resource. See + // [google.protobuf.FieldMask][google.protobuf.FieldMask]. + google.protobuf.FieldMask update_mask = 4 + [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for +// [EndpointService.MutateDeployedModel][google.cloud.aiplatform.v1.EndpointService.MutateDeployedModel]. +message MutateDeployedModelResponse { + // The DeployedModel that's being mutated. + DeployedModel deployed_model = 1; +} + +// Runtime operation information for +// [EndpointService.MutateDeployedModel][google.cloud.aiplatform.v1.EndpointService.MutateDeployedModel]. +message MutateDeployedModelOperationMetadata { + // The operation generic information. + GenericOperationMetadata generic_metadata = 1; +} diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/entity_type.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/entity_type.proto index 72e3e3784e2..8e70ea2a37f 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/entity_type.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/entity_type.proto @@ -88,4 +88,11 @@ message EntityType { // disabled. FeaturestoreMonitoringConfig monitoring_config = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Config for data retention policy in offline storage. + // TTL in days for feature values that will be stored in offline storage. + // The Feature Store offline storage periodically removes obsolete feature + // values older than `offline_storage_ttl_days` since the feature generation + // time. If unset (or explicitly set to 0), default to 4000 days TTL. + int32 offline_storage_ttl_days = 10 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/evaluated_annotation.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/evaluated_annotation.proto index d4430e56011..2d74effd981 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/evaluated_annotation.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/evaluated_annotation.proto @@ -103,10 +103,6 @@ message EvaluatedAnnotation { // ModelEvaluation. The EvaluatedDataItemView consists of all ground truths // and predictions on // [data_item_payload][google.cloud.aiplatform.v1.EvaluatedAnnotation.data_item_payload]. - // - // Can be passed in - // [GetEvaluatedDataItemView's][ModelService.GetEvaluatedDataItemView][] - // [id][GetEvaluatedDataItemViewRequest.id]. string evaluated_data_item_view_id = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/explanation.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/explanation.proto index 6efe5a9ebf3..4b7b5c72725 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/explanation.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/explanation.proto @@ -18,6 +18,7 @@ package google.cloud.aiplatform.v1; import "google/api/field_behavior.proto"; import "google/cloud/aiplatform/v1/explanation_metadata.proto"; +import "google/cloud/aiplatform/v1/io.proto"; import "google/protobuf/struct.proto"; option csharp_namespace = "Google.Cloud.AIPlatform.V1"; @@ -241,6 +242,10 @@ message ExplanationParameters { // like a lab or manufacturing line, or from diagnostic equipment, like // x-rays or quality-control cameras, use Integrated Gradients instead. XraiAttribution xrai_attribution = 3; + + // Example-based explanations that returns the nearest neighbors from the + // provided dataset. + Examples examples = 7; } // If populated, returns attributions for top K indices of outputs @@ -415,13 +420,93 @@ message BlurBaselineConfig { float max_blur_sigma = 1; } +// Example-based explainability that returns the nearest neighbors from the +// provided dataset. +message Examples { + // The Cloud Storage input instances. + message ExampleGcsSource { + // The format of the input example instances. + enum DataFormat { + // Format unspecified, used when unset. + DATA_FORMAT_UNSPECIFIED = 0; + + // Examples are stored in JSONL files. + JSONL = 1; + } + + // The format in which instances are given, if not specified, assume it's + // JSONL format. Currently only JSONL format is supported. + DataFormat data_format = 1; + + // The Cloud Storage location for the input instances. + GcsSource gcs_source = 2; + } + + oneof source { + // The Cloud Storage input instances. + ExampleGcsSource example_gcs_source = 5; + } + + oneof config { + // The full configuration for the generated index, the semantics are the + // same as [metadata][google.cloud.aiplatform.v1.Index.metadata] and should + // match + // [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config). + google.protobuf.Value nearest_neighbor_search_config = 2; + + // Simplified preset configuration, which automatically sets configuration + // values based on the desired query speed-precision trade-off and modality. + Presets presets = 4; + } + + // The number of neighbors to return when querying for examples. + int32 neighbor_count = 3; +} + +// Preset configuration for example-based explanations +message Presets { + // Preset option controlling parameters for query speed-precision trade-off + enum Query { + // More precise neighbors as a trade-off against slower response. + PRECISE = 0; + + // Faster response as a trade-off against less precise neighbors. + FAST = 1; + } + + // Preset option controlling parameters for different modalities + enum Modality { + // Should not be set. Added as a recommended best practice for enums + MODALITY_UNSPECIFIED = 0; + + // IMAGE modality + IMAGE = 1; + + // TEXT modality + TEXT = 2; + + // TABULAR modality + TABULAR = 3; + } + + // Preset option controlling parameters for speed-precision trade-off when + // querying for examples. If omitted, defaults to `PRECISE`. + optional Query query = 1; + + // The modality of the uploaded model, which automatically configures the + // distance measurement and feature normalization for the underlying example + // index and queries. If your model does not precisely fit one of these types, + // it is okay to choose the closest type. + Modality modality = 2; +} + // The [ExplanationSpec][google.cloud.aiplatform.v1.ExplanationSpec] entries // that can be overridden at [online // explanation][google.cloud.aiplatform.v1.PredictionService.Explain] time. message ExplanationSpecOverride { // The parameters to be overridden. Note that the - // [method][google.cloud.aiplatform.v1.ExplanationParameters.method] cannot be - // changed. If not specified, no parameter is overridden. + // attribution method cannot be changed. If not specified, + // no parameter is overridden. ExplanationParameters parameters = 1; // The metadata to be overridden. If not specified, no metadata is overridden. diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/feature.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/feature.proto index 544b9ebe883..327ec57d301 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/feature.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/feature.proto @@ -38,10 +38,11 @@ message Feature { pattern: "projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}" }; - // A list of historical [Snapshot - // Analysis][FeaturestoreMonitoringConfig.SnapshotAnalysis] or [Import Feature - // Analysis] [FeaturestoreMonitoringConfig.ImportFeatureAnalysis] stats - // requested by user, sorted by + // A list of historical + // [SnapshotAnalysis][google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.SnapshotAnalysis] + // or + // [ImportFeaturesAnalysis][google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.ImportFeaturesAnalysis] + // stats requested by user, sorted by // [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1.FeatureStatsAnomaly.start_time] // descending. message MonitoringStatsAnomaly { diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/featurestore.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/featurestore.proto index 2df135ab1e8..bcaf8ac3e91 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/featurestore.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/featurestore.proto @@ -138,6 +138,14 @@ message Featurestore { // Output only. State of the featurestore. State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Optional. TTL in days for feature values that will be stored in online + // serving storage. The Feature Store online storage periodically removes + // obsolete feature values older than `online_storage_ttl_days` since the + // feature generation time. Note that `online_storage_ttl_days` should be less + // than or equal to `offline_storage_ttl_days` for each EntityType under a + // featurestore. If not set, default to 4000 days + int32 online_storage_ttl_days = 13 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Customer-managed encryption key spec for data storage. If set, // both of the online and offline data storage will be secured by this key. EncryptionSpec encryption_spec = 10 [(google.api.field_behavior) = OPTIONAL]; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/featurestore_online_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/featurestore_online_service.proto index 613fc7b7320..6cc4e677546 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/featurestore_online_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/featurestore_online_service.proto @@ -162,7 +162,7 @@ message ReadFeatureValuesResponse { }]; // List of Feature metadata corresponding to each piece of - // [ReadFeatureValuesResponse.data][]. + // [ReadFeatureValuesResponse.EntityView.data][google.cloud.aiplatform.v1.ReadFeatureValuesResponse.EntityView.data]. repeated FeatureDescriptor feature_descriptors = 2; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/featurestore_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/featurestore_service.proto index 8394b21a6c0..9249e3874ac 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/featurestore_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/featurestore_service.proto @@ -464,7 +464,7 @@ message UpdateFeaturestoreRequest { // * `labels` // * `online_serving_config.fixed_node_count` // * `online_serving_config.scaling` - // * `online_storage_ttl_days` (available in Preview) + // * `online_storage_ttl_days` google.protobuf.FieldMask update_mask = 2; } @@ -927,7 +927,7 @@ message UpdateEntityTypeRequest { // * `monitoring_config.import_features_analysis.anomaly_detection_baseline` // * `monitoring_config.numerical_threshold_config.value` // * `monitoring_config.categorical_threshold_config.value` - // * `offline_storage_ttl_days` (available in Preview) + // * `offline_storage_ttl_days` google.protobuf.FieldMask update_mask = 2; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/index_endpoint.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/index_endpoint.proto index f49cd495d24..9b4dd453297 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/index_endpoint.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/index_endpoint.proto @@ -204,13 +204,13 @@ message DeployedIndex { DedicatedResources dedicated_resources = 16 [(google.api.field_behavior) = OPTIONAL]; - // Optional. If true, private endpoint's access logs are sent to StackDriver + // Optional. If true, private endpoint's access logs are sent to Cloud // Logging. // // These logs are like standard server access logs, containing // information like timestamp and latency for each MatchRequest. // - // Note that Stackdriver logs may incur a cost, especially if the deployed + // Note that logs may incur a cost, especially if the deployed // index receives a high queries per second rate (QPS). // Estimate your costs before enabling this option. bool enable_access_logging = 8 [(google.api.field_behavior) = OPTIONAL]; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model.proto index 7b8c5ccf924..4872249c54a 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model.proto @@ -700,6 +700,9 @@ message ModelSourceInfo { // The Model is saved or tuned from Model Garden. MODEL_GARDEN = 4; + + // The Model is saved or tuned from Genie. + GENIE = 5; } // Type of the model source. diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model_monitoring.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model_monitoring.proto index 2749cfe884c..1978accfb37 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model_monitoring.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model_monitoring.proto @@ -26,6 +26,10 @@ option java_outer_classname = "ModelMonitoringProto"; option java_package = "com.google.cloud.aiplatform.v1"; option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; option ruby_package = "Google::Cloud::AIPlatform::V1"; +option (google.api.resource_definition) = { + type: "monitoring.googleapis.com/NotificationChannel" + pattern: "projects/{project}/notificationChannels/{notification_channel}" +}; // The objective configuration for model monitoring, including the information // needed to detect anomalies for one particular model. diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model_service.proto index b878e065bc7..3ab66e345c0 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/model_service.proto @@ -406,8 +406,10 @@ message ListModelVersionsRequest { // The standard list page token. // Typically obtained via - // [ListModelVersionsResponse.next_page_token][google.cloud.aiplatform.v1.ListModelVersionsResponse.next_page_token] - // of the previous [ModelService.ListModelversions][] call. + // [next_page_token][google.cloud.aiplatform.v1.ListModelVersionsResponse.next_page_token] + // of the previous + // [ListModelVersions][google.cloud.aiplatform.v1.ModelService.ListModelVersions] + // call. string page_token = 3; // An expression for filtering the results of the request. For field names diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/pipeline_job.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/pipeline_job.proto index 9cae7212105..fbad9ec38c5 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/pipeline_job.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/pipeline_job.proto @@ -293,7 +293,7 @@ message PipelineTaskDetail { int64 parent_task_id = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The user specified name of the task that is defined in - // [PipelineJob.spec][]. + // [pipeline_spec][google.cloud.aiplatform.v1.PipelineJob.pipeline_spec]. string task_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Task create time. diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/prediction_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/prediction_service.proto index a976ad8d586..16463dd48c5 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/prediction_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/prediction_service.proto @@ -43,6 +43,10 @@ service PredictionService { option (google.api.http) = { post: "/v1/{endpoint=projects/*/locations/*/endpoints/*}:predict" body: "*" + additional_bindings { + post: "/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:predict" + body: "*" + } }; option (google.api.method_signature) = "endpoint,instances,parameters"; } @@ -62,6 +66,10 @@ service PredictionService { option (google.api.http) = { post: "/v1/{endpoint=projects/*/locations/*/endpoints/*}:rawPredict" body: "*" + additional_bindings { + post: "/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:rawPredict" + body: "*" + } }; option (google.api.method_signature) = "endpoint,http_body"; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tensorboard.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tensorboard.proto index dba330e612b..d22b961d795 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tensorboard.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tensorboard.proto @@ -86,4 +86,11 @@ message Tensorboard { // Used to perform a consistent read-modify-write updates. If not set, a blind // "overwrite" update happens. string etag = 9; + + // Used to indicate if the TensorBoard instance is the default one. + // Each project & region can have at most one default TensorBoard instance. + // Creation of a default TensorBoard instance and updating an existing + // TensorBoard instance to be default will mark all other TensorBoard + // instances (if any) as non default. + bool is_default = 12; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tensorboard_experiment.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tensorboard_experiment.proto index 51aa1fb528a..6ae26d3efad 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tensorboard_experiment.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tensorboard_experiment.proto @@ -57,18 +57,20 @@ message TensorboardExperiment { // The labels with user-defined metadata to organize your Datasets. // - // Label keys and values can be no longer than 64 characters + // Label keys and values cannot be longer than 64 characters // (Unicode codepoints), can only contain lowercase letters, numeric // characters, underscores and dashes. International characters are allowed. // No more than 64 user labels can be associated with one Dataset (System // labels are excluded). // // See https://goo.gl/xmQnxf for more information and examples of labels. - // System reserved label keys are prefixed with "aiplatform.googleapis.com/" - // and are immutable. Following system labels exist for each Dataset: - // * "aiplatform.googleapis.com/dataset_metadata_schema": - // - output only, its value is the - // [metadata_schema's][metadata_schema_uri] title. + // System reserved label keys are prefixed with `aiplatform.googleapis.com/` + // and are immutable. The following system labels exist for each Dataset: + // + // * `aiplatform.googleapis.com/dataset_metadata_schema`: output only. Its + // value is the + // [metadata_schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] + // title. map labels = 6; // Used to perform consistent read-modify-write updates. If not set, a blind diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tensorboard_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tensorboard_service.proto index 1eaed5063c7..979f5aae94f 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tensorboard_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/tensorboard_service.proto @@ -1093,12 +1093,12 @@ message ExportTensorboardTimeSeriesDataRequest { int32 page_size = 3; // A page token, received from a previous - // [TensorboardService.ExportTensorboardTimeSeries][] call. - // Provide this to retrieve the subsequent page. + // [ExportTensorboardTimeSeriesData][google.cloud.aiplatform.v1.TensorboardService.ExportTensorboardTimeSeriesData] + // call. Provide this to retrieve the subsequent page. // // When paginating, all other parameters provided to - // [TensorboardService.ExportTensorboardTimeSeries][] must - // match the call that provided the page token. + // [ExportTensorboardTimeSeriesData][google.cloud.aiplatform.v1.TensorboardService.ExportTensorboardTimeSeriesData] + // must match the call that provided the page token. string page_token = 4; // Field to use to sort the TensorboardTimeSeries' data. @@ -1114,8 +1114,9 @@ message ExportTensorboardTimeSeriesDataResponse { repeated TimeSeriesDataPoint time_series_data_points = 1; // A token, which can be sent as - // [ExportTensorboardTimeSeriesRequest.page_token][] to retrieve the next - // page. If this field is omitted, there are no subsequent pages. + // [page_token][google.cloud.aiplatform.v1.ExportTensorboardTimeSeriesDataRequest.page_token] + // to retrieve the next page. If this field is omitted, there are no + // subsequent pages. string next_page_token = 2; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/accelerator_type.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/accelerator_type.proto index 92c9b50f345..4e7bf4657eb 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/accelerator_type.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/accelerator_type.proto @@ -47,9 +47,12 @@ enum AcceleratorType { // Nvidia Tesla A100 GPU. NVIDIA_TESLA_A100 = 8; - // Nvidia A2 Ultra GPU. + // Nvidia A100 80GB GPU. NVIDIA_A100_80GB = 9; + // Nvidia L4 GPU. + NVIDIA_L4 = 11; + // TPU v2. TPU_V2 = 6; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/batch_prediction_job.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/batch_prediction_job.proto index 5a98131589b..30e149e6a23 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/batch_prediction_job.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/batch_prediction_job.proto @@ -463,9 +463,9 @@ message BatchPredictionJob { // For custom-trained Models and AutoML Tabular Models, the container of the // DeployedModel instances will send `stderr` and `stdout` streams to - // Stackdriver Logging by default. Please note that the logs incur cost, + // Cloud Logging by default. Please note that the logs incur cost, // which are subject to [Cloud Logging - // pricing](https://cloud.google.com/stackdriver/pricing). + // pricing](https://cloud.google.com/logging/pricing). // // User can disable container logging by setting this flag to true. bool disable_container_logging = 34; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/custom_job.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/custom_job.proto index dc41de428b9..ea44a6b0c5b 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/custom_job.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/custom_job.proto @@ -216,6 +216,26 @@ message CustomJobSpec { // (within // [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1beta1.HyperparameterTuningJob.trials]). bool enable_dashboard_access = 16 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Experiment associated with this job. + // Format: + // `projects/{project}/locations/{location}/metadataStores/{metadataStores}/contexts/{experiment-name}` + string experiment = 17 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Context" + } + ]; + + // Optional. The Experiment Run associated with this job. + // Format: + // `projects/{project}/locations/{location}/metadataStores/{metadataStores}/contexts/{experiment-name}-{experiment-run-name}` + string experiment_run = 18 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Context" + } + ]; } // Represents the spec of a worker pool in a job. diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/dataset.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/dataset.proto index 1ae48018638..3e293382e06 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/dataset.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/dataset.proto @@ -90,7 +90,7 @@ message Dataset { map labels = 7; // All SavedQueries belong to the Dataset will be returned in List/Get - // Dataset response. The [annotation_specs][SavedQuery.annotation_specs] field + // Dataset response. The annotation_specs field // will not be populated except for UI cases which will only use // [annotation_spec_count][google.cloud.aiplatform.v1beta1.SavedQuery.annotation_spec_count]. // In CreateDataset request, a SavedQuery is created together if @@ -177,9 +177,9 @@ message ExportDataConfig { ExportFractionSplit fraction_split = 5; } - // A filter on Annotations of the Dataset. Only Annotations on to-be-exported - // DataItems(specified by [data_items_filter][]) that match this filter will - // be exported. The filter syntax is the same as in + // An expression for filtering what part of the Dataset is to be exported. + // Only Annotations that match this filter will be exported. The filter syntax + // is the same as in // [ListAnnotations][google.cloud.aiplatform.v1beta1.DatasetService.ListAnnotations]. string annotations_filter = 2; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/endpoint.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/endpoint.proto index 6d1c9aef19d..7b787eb9efb 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/endpoint.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/endpoint.proto @@ -38,6 +38,7 @@ message Endpoint { option (google.api.resource) = { type: "aiplatform.googleapis.com/Endpoint" pattern: "projects/{project}/locations/{location}/endpoints/{endpoint}" + pattern: "projects/{project}/locations/{location}/publishers/{publisher}/models/{model}" }; // Output only. The resource name of the Endpoint. @@ -127,7 +128,8 @@ message Endpoint { // Output only. Resource name of the Model Monitoring job associated with this // Endpoint if monitoring is enabled by - // [CreateModelDeploymentMonitoringJob][]. Format: + // [JobService.CreateModelDeploymentMonitoringJob][google.cloud.aiplatform.v1beta1.JobService.CreateModelDeploymentMonitoringJob]. + // Format: // `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}` string model_deployment_monitoring_job = 14 [ (google.api.field_behavior) = OUTPUT_ONLY, @@ -236,17 +238,17 @@ message DeployedModel { string service_account = 11; // If true, the container of the DeployedModel instances will send `stderr` - // and `stdout` streams to Stackdriver Logging. + // and `stdout` streams to Cloud Logging. // // Only supported for custom-trained Models and AutoML Tabular Models. bool enable_container_logging = 12; - // If true, online prediction access logs are sent to StackDriver + // If true, online prediction access logs are sent to Cloud // Logging. // These logs are like standard server access logs, containing // information like timestamp and latency for each prediction request. // - // Note that Stackdriver logs may incur a cost, especially if your project + // Note that logs may incur a cost, especially if your project // receives prediction requests at a high queries per second rate (QPS). // Estimate your costs before enabling this option. bool enable_access_logging = 13; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/endpoint_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/endpoint_service.proto index fdf008eb827..f0ed6f97940 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/endpoint_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/endpoint_service.proto @@ -122,6 +122,24 @@ service EndpointService { metadata_type: "UndeployModelOperationMetadata" }; } + + // Updates an existing deployed model. Updatable fields include + // `min_replica_count`, `max_replica_count`, `autoscaling_metric_specs`, + // `disable_container_logging` (v1 only), and `enable_container_logging` + // (v1beta1 only). + rpc MutateDeployedModel(MutateDeployedModelRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{endpoint=projects/*/locations/*/endpoints/*}:mutateDeployedModel" + body: "*" + }; + option (google.api.method_signature) = + "endpoint,deployed_model,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "MutateDeployedModelResponse" + metadata_type: "MutateDeployedModelOperationMetadata" + }; + } } // Request message for @@ -348,3 +366,50 @@ message UndeployModelOperationMetadata { // The operation generic information. GenericOperationMetadata generic_metadata = 1; } + +// Request message for +// [EndpointService.MutateDeployedModel][google.cloud.aiplatform.v1beta1.EndpointService.MutateDeployedModel]. +message MutateDeployedModelRequest { + // Required. The name of the Endpoint resource into which to mutate a + // DeployedModel. Format: + // `projects/{project}/locations/{location}/endpoints/{endpoint}` + string endpoint = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Endpoint" + } + ]; + + // Required. The DeployedModel to be mutated within the Endpoint. Only the + // following fields can be mutated: + // + // * `min_replica_count` in either + // [DedicatedResources][google.cloud.aiplatform.v1beta1.DedicatedResources] or + // [AutomaticResources][google.cloud.aiplatform.v1beta1.AutomaticResources] + // * `max_replica_count` in either + // [DedicatedResources][google.cloud.aiplatform.v1beta1.DedicatedResources] or + // [AutomaticResources][google.cloud.aiplatform.v1beta1.AutomaticResources] + // * [autoscaling_metric_specs][google.cloud.aiplatform.v1beta1.DedicatedResources.autoscaling_metric_specs] + // * `disable_container_logging` (v1 only) + // * `enable_container_logging` (v1beta1 only) + DeployedModel deployed_model = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The update mask applies to the resource. See + // [google.protobuf.FieldMask][google.protobuf.FieldMask]. + google.protobuf.FieldMask update_mask = 4 + [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for +// [EndpointService.MutateDeployedModel][google.cloud.aiplatform.v1beta1.EndpointService.MutateDeployedModel]. +message MutateDeployedModelResponse { + // The DeployedModel that's being mutated. + DeployedModel deployed_model = 1; +} + +// Runtime operation information for +// [EndpointService.MutateDeployedModel][google.cloud.aiplatform.v1beta1.EndpointService.MutateDeployedModel]. +message MutateDeployedModelOperationMetadata { + // The operation generic information. + GenericOperationMetadata generic_metadata = 1; +} diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/evaluated_annotation.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/evaluated_annotation.proto index 6e68912c0f4..239b55cdb6b 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/evaluated_annotation.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/evaluated_annotation.proto @@ -103,10 +103,6 @@ message EvaluatedAnnotation { // ModelEvaluation. The EvaluatedDataItemView consists of all ground truths // and predictions on // [data_item_payload][google.cloud.aiplatform.v1beta1.EvaluatedAnnotation.data_item_payload]. - // - // Can be passed in - // [GetEvaluatedDataItemView's][ModelService.GetEvaluatedDataItemView][] - // [id][GetEvaluatedDataItemViewRequest.id]. string evaluated_data_item_view_id = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/explanation.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/explanation.proto index 29ee96a7b94..1801a502142 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/explanation.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/explanation.proto @@ -425,21 +425,47 @@ message BlurBaselineConfig { // Example-based explainability that returns the nearest neighbors from the // provided dataset. message Examples { + // The Cloud Storage input instances. + message ExampleGcsSource { + // The format of the input example instances. + enum DataFormat { + // Format unspecified, used when unset. + DATA_FORMAT_UNSPECIFIED = 0; + + // Examples are stored in JSONL files. + JSONL = 1; + } + + // The format in which instances are given, if not specified, assume it's + // JSONL format. Currently only JSONL format is supported. + DataFormat data_format = 1; + + // The Cloud Storage location for the input instances. + GcsSource gcs_source = 2; + } + + oneof source { + // The Cloud Storage input instances. + ExampleGcsSource example_gcs_source = 5; + } + oneof config { - // The configuration for the generated index, the semantics are the same as - // [metadata][google.cloud.aiplatform.v1beta1.Index.metadata] and should - // match NearestNeighborSearchConfig. + // The full configuration for the generated index, the semantics are the + // same as [metadata][google.cloud.aiplatform.v1beta1.Index.metadata] and + // should match + // [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config). google.protobuf.Value nearest_neighbor_search_config = 2; - // Preset config based on the desired query speed-precision trade-off - // and modality + // Simplified preset configuration, which automatically sets configuration + // values based on the desired query speed-precision trade-off and modality. Presets presets = 4; } - // The Cloud Storage location for the input instances. + // The Cloud Storage locations that contain the instances to be + // indexed for approximate nearest neighbor search. GcsSource gcs_source = 1; - // The number of neighbors to return. + // The number of neighbors to return when querying for examples. int32 neighbor_count = 3; } @@ -448,7 +474,6 @@ message Presets { // Preset option controlling parameters for query speed-precision trade-off enum Query { // More precise neighbors as a trade-off against slower response. - // This is also the default value (field-number 0). PRECISE = 0; // Faster response as a trade-off against less precise neighbors. @@ -470,10 +495,14 @@ message Presets { TABULAR = 3; } - // Preset option controlling parameters for query speed-precision trade-off + // Preset option controlling parameters for speed-precision trade-off when + // querying for examples. If omitted, defaults to `PRECISE`. optional Query query = 1; - // Preset option controlling parameters for different modalities + // The modality of the uploaded model, which automatically configures the + // distance measurement and feature normalization for the underlying example + // index and queries. If your model does not precisely fit one of these types, + // it is okay to choose the closest type. Modality modality = 2; } @@ -482,8 +511,8 @@ message Presets { // explanation][google.cloud.aiplatform.v1beta1.PredictionService.Explain] time. message ExplanationSpecOverride { // The parameters to be overridden. Note that the - // [method][google.cloud.aiplatform.v1beta1.ExplanationParameters.method] - // cannot be changed. If not specified, no parameter is overridden. + // attribution method cannot be changed. If not specified, + // no parameter is overridden. ExplanationParameters parameters = 1; // The metadata to be overridden. If not specified, no metadata is overridden. diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/feature.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/feature.proto index 4ac111e5f72..c37b23c9ed8 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/feature.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/feature.proto @@ -39,10 +39,11 @@ message Feature { pattern: "projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}" }; - // A list of historical [Snapshot - // Analysis][FeaturestoreMonitoringConfig.SnapshotAnalysis] or [Import Feature - // Analysis] [FeaturestoreMonitoringConfig.ImportFeatureAnalysis] stats - // requested by user, sorted by + // A list of historical + // [SnapshotAnalysis][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis] + // or + // [ImportFeaturesAnalysis][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.ImportFeaturesAnalysis] + // stats requested by user, sorted by // [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time] // descending. message MonitoringStatsAnomaly { @@ -170,8 +171,8 @@ message Feature { // config on EntityType. bool disable_monitoring = 12 [(google.api.field_behavior) = OPTIONAL]; - // Output only. A list of historical [Snapshot - // Analysis][FeaturestoreMonitoringConfig.SnapshotAnalysis] + // Output only. A list of historical + // [SnapshotAnalysis][google.cloud.aiplatform.v1beta1.FeaturestoreMonitoringConfig.SnapshotAnalysis] // stats requested by user, sorted by // [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time] // descending. diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/featurestore_online_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/featurestore_online_service.proto index af6182b2d56..5c26efb6f16 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/featurestore_online_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/featurestore_online_service.proto @@ -162,7 +162,7 @@ message ReadFeatureValuesResponse { }]; // List of Feature metadata corresponding to each piece of - // [ReadFeatureValuesResponse.data][]. + // [ReadFeatureValuesResponse.EntityView.data][google.cloud.aiplatform.v1beta1.ReadFeatureValuesResponse.EntityView.data]. repeated FeatureDescriptor feature_descriptors = 2; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/featurestore_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/featurestore_service.proto index 5efd213643f..f4ec90768c2 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/featurestore_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/featurestore_service.proto @@ -464,7 +464,7 @@ message UpdateFeaturestoreRequest { // * `labels` // * `online_serving_config.fixed_node_count` // * `online_serving_config.scaling` - // * `online_storage_ttl_days` (available in Preview) + // * `online_storage_ttl_days` google.protobuf.FieldMask update_mask = 2; } @@ -927,7 +927,7 @@ message UpdateEntityTypeRequest { // * `monitoring_config.import_features_analysis.anomaly_detection_baseline` // * `monitoring_config.numerical_threshold_config.value` // * `monitoring_config.categorical_threshold_config.value` - // * `offline_storage_ttl_days` (available in Preview) + // * `offline_storage_ttl_days` google.protobuf.FieldMask update_mask = 2; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/index_endpoint.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/index_endpoint.proto index 9d1c55ec7be..ef2efb41c65 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/index_endpoint.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/index_endpoint.proto @@ -205,13 +205,13 @@ message DeployedIndex { DedicatedResources dedicated_resources = 16 [(google.api.field_behavior) = OPTIONAL]; - // Optional. If true, private endpoint's access logs are sent to StackDriver + // Optional. If true, private endpoint's access logs are sent to Cloud // Logging. // // These logs are like standard server access logs, containing // information like timestamp and latency for each MatchRequest. // - // Note that Stackdriver logs may incur a cost, especially if the deployed + // Note that logs may incur a cost, especially if the deployed // index receives a high queries per second rate (QPS). // Estimate your costs before enabling this option. bool enable_access_logging = 8 [(google.api.field_behavior) = OPTIONAL]; diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/match_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/match_service.proto index 07acb17b08f..88f1ba11b45 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/match_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/match_service.proto @@ -102,7 +102,7 @@ message FindNeighborsRequest { } ]; - // The ID of the DeploydIndex that will serve the request. This request is + // The ID of the DeployedIndex that will serve the request. This request is // sent to a specific IndexEndpoint, as per the IndexEndpoint.network. That // IndexEndpoint also has IndexEndpoint.deployed_indexes, and each such index // has a DeployedIndex.id field. @@ -161,7 +161,7 @@ message ReadIndexDatapointsRequest { } ]; - // The ID of the DeploydIndex that will serve the request. + // The ID of the DeployedIndex that will serve the request. string deployed_index_id = 2; // IDs of the datapoints to be searched for. diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model.proto index 3dd24837ff2..4751153abcf 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model.proto @@ -411,6 +411,14 @@ message Model { string metadata_artifact = 44 [(google.api.field_behavior) = OUTPUT_ONLY]; } +// Contains information about the Large Model. +message LargeModelReference { + // Required. The unique name of the large Foundation or pre-built model. Like + // "chat-panda", "text-panda". Or model name with version ID, like + // "chat-panda-001", "text-panda-005", etc. + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + // Contains the schemata used in Model's predictions and explanations via // [PredictionService.Predict][google.cloud.aiplatform.v1beta1.PredictionService.Predict], // [PredictionService.Explain][google.cloud.aiplatform.v1beta1.PredictionService.Explain] @@ -712,6 +720,9 @@ message ModelSourceInfo { // The Model is saved or tuned from Model Garden. MODEL_GARDEN = 4; + + // The Model is saved or tuned from Genie. + GENIE = 5; } // Type of the model source. diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model_garden_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model_garden_service.proto new file mode 100644 index 00000000000..37a4eb33fe7 --- /dev/null +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model_garden_service.proto @@ -0,0 +1,83 @@ +// Copyright 2023 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.aiplatform.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1beta1/publisher_model.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "ModelGardenServiceProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; +option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; + +// The interface of Model Garden Service. +service ModelGardenService { + option (google.api.default_host) = "aiplatform.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Gets a Model Garden publisher model. + rpc GetPublisherModel(GetPublisherModelRequest) returns (PublisherModel) { + option (google.api.http) = { + get: "/v1beta1/{name=publishers/*/models/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// View enumeration of PublisherModel. +enum PublisherModelView { + // The default / unset value. The API will default to the BASIC view. + PUBLISHER_MODEL_VIEW_UNSPECIFIED = 0; + + // Include basic metadata about the publisher model, but not the full + // contents. + PUBLISHER_MODEL_VIEW_BASIC = 1; + + // Include everything. + PUBLISHER_MODEL_VIEW_FULL = 2; + + // Include: VersionId, ModelVersionExternalName, and SupportedActions. + PUBLISHER_MODEL_VERSION_VIEW_BASIC = 3; +} + +// Request message for +// [ModelGardenService.GetPublisherModel][google.cloud.aiplatform.v1beta1.ModelGardenService.GetPublisherModel] +message GetPublisherModelRequest { + // Required. The name of the PublisherModel resource. + // Format: + // `publishers/{publisher}/models/{publisher_model}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/PublisherModel" + } + ]; + + // Optional. The IETF BCP-47 language code representing the language in which + // the publisher model's text information should be written in (see go/bcp47). + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. PublisherModel view specifying which fields to read. + PublisherModelView view = 3 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model_service.proto index 5a766d0e834..49eaee8e2cb 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model_service.proto @@ -410,8 +410,10 @@ message ListModelVersionsRequest { // The standard list page token. // Typically obtained via - // [ListModelVersionsResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListModelVersionsResponse.next_page_token] - // of the previous [ModelService.ListModelversions][] call. + // [next_page_token][google.cloud.aiplatform.v1beta1.ListModelVersionsResponse.next_page_token] + // of the previous + // [ListModelVersions][google.cloud.aiplatform.v1beta1.ModelService.ListModelVersions] + // call. string page_token = 3; // An expression for filtering the results of the request. For field names diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/pipeline_job.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/pipeline_job.proto index 8878c8bdfbf..75171c649f2 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/pipeline_job.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/pipeline_job.proto @@ -293,7 +293,7 @@ message PipelineTaskDetail { int64 parent_task_id = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The user specified name of the task that is defined in - // [PipelineJob.spec][]. + // [pipeline_spec][google.cloud.aiplatform.v1beta1.PipelineJob.pipeline_spec]. string task_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Task create time. diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/prediction_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/prediction_service.proto index 2a07c70d22b..b6d2c16ffb8 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/prediction_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/prediction_service.proto @@ -43,6 +43,10 @@ service PredictionService { option (google.api.http) = { post: "/v1beta1/{endpoint=projects/*/locations/*/endpoints/*}:predict" body: "*" + additional_bindings { + post: "/v1beta1/{endpoint=projects/*/locations/*/publishers/*/models/*}:predict" + body: "*" + } }; option (google.api.method_signature) = "endpoint,instances,parameters"; } @@ -62,6 +66,10 @@ service PredictionService { option (google.api.http) = { post: "/v1beta1/{endpoint=projects/*/locations/*/endpoints/*}:rawPredict" body: "*" + additional_bindings { + post: "/v1beta1/{endpoint=projects/*/locations/*/publishers/*/models/*}:rawPredict" + body: "*" + } }; option (google.api.method_signature) = "endpoint,http_body"; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/publisher_model.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/publisher_model.proto new file mode 100644 index 00000000000..55e11ea1b51 --- /dev/null +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/publisher_model.proto @@ -0,0 +1,214 @@ +// Copyright 2023 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.aiplatform.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1beta1/machine_resources.proto"; +import "google/cloud/aiplatform/v1beta1/model.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "PublisherModelProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; +option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; + +// A Model Garden Publisher Model. +message PublisherModel { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/PublisherModel" + pattern: "publishers/{publisher}/models/{model}" + }; + + // Reference to a resource. + message ResourceReference { + oneof reference { + // The URI of the resource. + string uri = 1; + + // The resource name of the GCP resource. + string resource_name = 2; + } + } + + // A named piece of documentation. + message Documentation { + // Required. E.g., OVERVIEW, USE CASES, DOCUMENTATION, SDK & SAMPLES, JAVA, + // NODE.JS, etc.. + string title = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Content of this piece of document (in Markdown format). + string content = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Actions could take on this Publisher Model. + message CallToAction { + // The regional resource name or the URI. Key is region, e.g., + // us-central1, europe-west2, global, etc.. + message RegionalResourceReferences { + // Required. + map references = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The title of the regional resource reference. + string title = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Rest API docs. + message ViewRestApi { + // Required. + repeated Documentation documentations = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The title of the view rest API. + string title = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Model metadata that is needed for UploadModel or + // DeployModel/CreateEndpoint requests. + message Deploy { + // The prediction (for example, the machine) resources that the + // DeployedModel uses. + oneof prediction_resources { + // A description of resources that are dedicated to the DeployedModel, + // and that need a higher degree of manual configuration. + DedicatedResources dedicated_resources = 5; + + // A description of resources that to large degree are decided by Vertex + // AI, and require only a modest additional configuration. + AutomaticResources automatic_resources = 6; + + // The resource name of the shared DeploymentResourcePool to deploy on. + // Format: + // `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}` + string shared_resources = 7; + } + + // Optional. Default model display name. + string model_display_name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Large model reference. When this is set, model_artifact_spec + // is not needed. + LargeModelReference large_model_reference = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The specification of the container that is to be used when + // deploying this Model in Vertex AI. Not present for Large Models. + ModelContainerSpec container_spec = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The path to the directory containing the Model artifact and + // any of its supporting files. + string artifact_uri = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The title of the regional resource reference. + string title = 8 [(google.api.field_behavior) = REQUIRED]; + } + + // Optional. To view Rest API docs. + ViewRestApi view_rest_api = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Open notebook of the PublisherModel. + RegionalResourceReferences open_notebook = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Create application using the PublisherModel. + RegionalResourceReferences create_application = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Open fine-tuning pipeline of the PublisherModel. + RegionalResourceReferences open_fine_tuning_pipeline = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Open prompt-tuning pipeline of the PublisherModel. + RegionalResourceReferences open_prompt_tuning_pipeline = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Open Genie / Playground. + RegionalResourceReferences open_genie = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Deploy the PublisherModel to Vertex Endpoint. + Deploy deploy = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Open in Generation AI Studio. + RegionalResourceReferences open_generation_ai_studio = 8 + [(google.api.field_behavior) = OPTIONAL]; + } + + // An enum representing the open source category of a PublisherModel. + enum OpenSourceCategory { + // The open source category is unspecified, which should not be used. + OPEN_SOURCE_CATEGORY_UNSPECIFIED = 0; + + // Used to indicate the PublisherModel is not open sourced. + PROPRIETARY = 1; + + // Used to indicate the PublisherModel is a Google-owned open source model + // w/ Google checkpoint. + GOOGLE_OWNED_OSS_WITH_GOOGLE_CHECKPOINT = 2; + + // Used to indicate the PublisherModel is a 3p-owned open source model w/ + // Google checkpoint. + THIRD_PARTY_OWNED_OSS_WITH_GOOGLE_CHECKPOINT = 3; + + // Used to indicate the PublisherModel is a Google-owned pure open source + // model. + GOOGLE_OWNED_OSS = 4; + + // Used to indicate the PublisherModel is a 3p-owned pure open source model. + THIRD_PARTY_OWNED_OSS = 5; + } + + // Output only. The resource name of the PublisherModel. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Immutable. The version ID of the PublisherModel. + // A new version is committed when a new model version is uploaded under an + // existing model id. It is an auto-incrementing decimal number in string + // representation. + string version_id = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Required. Indicates the open source category of the publisher model. + OpenSourceCategory open_source_category = 7 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Supported call-to-action options. + CallToAction supported_actions = 19 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Additional information about the model's Frameworks. + repeated string frameworks = 23 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Output only. Immutable. Used to indicate this model has a + // publisher model and provide the template of the publisher model resource + // name. + string publisher_model_template = 30 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Optional. The schemata that describes formats of the PublisherModel's + // predictions and explanations as given and returned via + // [PredictionService.Predict][google.cloud.aiplatform.v1beta1.PredictionService.Predict]. + PredictSchemata predict_schemata = 31 + [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/schedule.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/schedule.proto index 14113392316..ad02ad01d2b 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/schedule.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/schedule.proto @@ -37,6 +37,15 @@ message Schedule { pattern: "projects/{project}/locations/{location}/schedules/{schedule}" }; + // Status of a scheduled run. + message RunResponse { + // The scheduled run time based on the user-specified schedule. + google.protobuf.Timestamp scheduled_run_time = 1; + + // The response of the scheduled run. + string run_response = 2; + } + // Possible state of the schedule. enum State { // Unspecified. @@ -119,6 +128,10 @@ message Schedule { google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Timestamp when this Schedule was updated. + google.protobuf.Timestamp update_time = 19 + [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Timestamp when this Schedule should schedule the next run. // Having a next_run_time in the past means the runs are being started // behind schedule. @@ -135,8 +148,9 @@ message Schedule { google.protobuf.Timestamp last_resume_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Required. Maximum number of runs that can be executed concurrently for this - // Schedule. + // Required. Maximum number of runs that can be started concurrently for this + // Schedule. This is the limit for starting the scheduled requests and not the + // execution of the operations/jobs created by the requests (if applicable). int64 max_concurrent_run_count = 11 [(google.api.field_behavior) = REQUIRED]; // Optional. Whether new scheduled runs can be queued when max_concurrent_runs @@ -148,4 +162,11 @@ message Schedule { // from PAUSED state. If set to true, all missed runs will be scheduled. New // runs will be scheduled after the backfill is complete. Default to false. bool catch_up = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Response of the last scheduled run. + // This is the response for starting the scheduled requests and not the + // execution of the operations/jobs created by the requests (if applicable). + // Unset if no run has been scheduled yet. + RunResponse last_scheduled_run_response = 18 + [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/schedule_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/schedule_service.proto index 74bebf386ca..f71ea0f85e0 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/schedule_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/schedule_service.proto @@ -24,6 +24,7 @@ import "google/cloud/aiplatform/v1beta1/operation.proto"; import "google/cloud/aiplatform/v1beta1/schedule.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; @@ -104,6 +105,22 @@ service ScheduleService { body: "*" }; option (google.api.method_signature) = "name"; + option (google.api.method_signature) = "name,catch_up"; + } + + // Updates an active or paused Schedule. + // + // When the Schedule is updated, new runs will be scheduled starting from the + // updated next execution time after the update time based on the + // time_specification in the updated Schedule. All unstarted runs before the + // update time will be skipped while already created runs will NOT be paused + // or canceled. + rpc UpdateSchedule(UpdateScheduleRequest) returns (Schedule) { + option (google.api.http) = { + patch: "/v1beta1/{schedule.name=projects/*/locations/*/schedules/*}" + body: "schedule" + }; + option (google.api.method_signature) = "schedule,update_mask"; } } @@ -273,3 +290,18 @@ message ResumeScheduleRequest { // field. Default to false. bool catch_up = 2 [(google.api.field_behavior) = OPTIONAL]; } + +// Request message for +// [ScheduleService.UpdateSchedule][google.cloud.aiplatform.v1beta1.ScheduleService.UpdateSchedule]. +message UpdateScheduleRequest { + // Required. The Schedule which replaces the resource on the server. + // The following restrictions will be applied: + // * The scheduled request type cannot be changed. + // * The output_only fields will be ignored if specified. + Schedule schedule = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The update mask applies to the resource. See + // [google.protobuf.FieldMask][google.protobuf.FieldMask]. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tensorboard.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tensorboard.proto index 676776c0260..83738c6fa3b 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tensorboard.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tensorboard.proto @@ -86,4 +86,11 @@ message Tensorboard { // Used to perform a consistent read-modify-write updates. If not set, a blind // "overwrite" update happens. string etag = 9; + + // Used to indicate if the TensorBoard instance is the default one. + // Each project & region can have at most one default TensorBoard instance. + // Creation of a default TensorBoard instance and updating an existing + // TensorBoard instance to be default will mark all other TensorBoard + // instances (if any) as non default. + bool is_default = 12; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tensorboard_experiment.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tensorboard_experiment.proto index b9801bf6452..c29f2f17b6a 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tensorboard_experiment.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tensorboard_experiment.proto @@ -57,18 +57,20 @@ message TensorboardExperiment { // The labels with user-defined metadata to organize your Datasets. // - // Label keys and values can be no longer than 64 characters + // Label keys and values cannot be longer than 64 characters // (Unicode codepoints), can only contain lowercase letters, numeric // characters, underscores and dashes. International characters are allowed. // No more than 64 user labels can be associated with one Dataset (System // labels are excluded). // // See https://goo.gl/xmQnxf for more information and examples of labels. - // System reserved label keys are prefixed with "aiplatform.googleapis.com/" - // and are immutable. Following system labels exist for each Dataset: - // * "aiplatform.googleapis.com/dataset_metadata_schema": - // - output only, its value is the - // [metadata_schema's][metadata_schema_uri] title. + // System reserved label keys are prefixed with `aiplatform.googleapis.com/` + // and are immutable. The following system labels exist for each Dataset: + // + // * `aiplatform.googleapis.com/dataset_metadata_schema`: output only. Its + // value is the + // [metadata_schema's][google.cloud.aiplatform.v1beta1.Dataset.metadata_schema_uri] + // title. map labels = 6; // Used to perform consistent read-modify-write updates. If not set, a blind diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tensorboard_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tensorboard_service.proto index 0332db5dd4a..df9799cc9c5 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tensorboard_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tensorboard_service.proto @@ -1092,12 +1092,12 @@ message ExportTensorboardTimeSeriesDataRequest { int32 page_size = 3; // A page token, received from a previous - // [TensorboardService.ExportTensorboardTimeSeries][] call. - // Provide this to retrieve the subsequent page. + // [ExportTensorboardTimeSeriesData][google.cloud.aiplatform.v1beta1.TensorboardService.ExportTensorboardTimeSeriesData] + // call. Provide this to retrieve the subsequent page. // // When paginating, all other parameters provided to - // [TensorboardService.ExportTensorboardTimeSeries][] must - // match the call that provided the page token. + // [ExportTensorboardTimeSeriesData][google.cloud.aiplatform.v1beta1.TensorboardService.ExportTensorboardTimeSeriesData] + // must match the call that provided the page token. string page_token = 4; // Field to use to sort the TensorboardTimeSeries' data. @@ -1113,8 +1113,9 @@ message ExportTensorboardTimeSeriesDataResponse { repeated TimeSeriesDataPoint time_series_data_points = 1; // A token, which can be sent as - // [ExportTensorboardTimeSeriesRequest.page_token][] to retrieve the next - // page. If this field is omitted, there are no subsequent pages. + // [page_token][google.cloud.aiplatform.v1beta1.ExportTensorboardTimeSeriesDataRequest.page_token] + // to retrieve the next page. If this field is omitted, there are no + // subsequent pages. string next_page_token = 2; } diff --git a/packages/google-cloud-aiplatform/protos/protos.d.ts b/packages/google-cloud-aiplatform/protos/protos.d.ts index 40a7a123457..9bb7bc4736d 100644 --- a/packages/google-cloud-aiplatform/protos/protos.d.ts +++ b/packages/google-cloud-aiplatform/protos/protos.d.ts @@ -35,6 +35,7 @@ export namespace google { NVIDIA_TESLA_P4 = 4, NVIDIA_TESLA_T4 = 5, NVIDIA_TESLA_A100 = 8, + NVIDIA_L4 = 11, TPU_V2 = 6, TPU_V3 = 7, TPU_V4_POD = 10 @@ -2055,6 +2056,9 @@ export namespace google { /** ExplanationParameters xraiAttribution */ xraiAttribution?: (google.cloud.aiplatform.v1.IXraiAttribution|null); + /** ExplanationParameters examples */ + examples?: (google.cloud.aiplatform.v1.IExamples|null); + /** ExplanationParameters topK */ topK?: (number|null); @@ -2080,6 +2084,9 @@ export namespace google { /** ExplanationParameters xraiAttribution. */ public xraiAttribution?: (google.cloud.aiplatform.v1.IXraiAttribution|null); + /** ExplanationParameters examples. */ + public examples?: (google.cloud.aiplatform.v1.IExamples|null); + /** ExplanationParameters topK. */ public topK: number; @@ -2087,7 +2094,7 @@ export namespace google { public outputIndices?: (google.protobuf.IListValue|null); /** ExplanationParameters method. */ - public method?: ("sampledShapleyAttribution"|"integratedGradientsAttribution"|"xraiAttribution"); + public method?: ("sampledShapleyAttribution"|"integratedGradientsAttribution"|"xraiAttribution"|"examples"); /** * Creates a new ExplanationParameters instance using the specified properties. @@ -2894,6 +2901,365 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an Examples. */ + interface IExamples { + + /** Examples exampleGcsSource */ + exampleGcsSource?: (google.cloud.aiplatform.v1.Examples.IExampleGcsSource|null); + + /** Examples nearestNeighborSearchConfig */ + nearestNeighborSearchConfig?: (google.protobuf.IValue|null); + + /** Examples presets */ + presets?: (google.cloud.aiplatform.v1.IPresets|null); + + /** Examples neighborCount */ + neighborCount?: (number|null); + } + + /** Represents an Examples. */ + class Examples implements IExamples { + + /** + * Constructs a new Examples. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IExamples); + + /** Examples exampleGcsSource. */ + public exampleGcsSource?: (google.cloud.aiplatform.v1.Examples.IExampleGcsSource|null); + + /** Examples nearestNeighborSearchConfig. */ + public nearestNeighborSearchConfig?: (google.protobuf.IValue|null); + + /** Examples presets. */ + public presets?: (google.cloud.aiplatform.v1.IPresets|null); + + /** Examples neighborCount. */ + public neighborCount: number; + + /** Examples source. */ + public source?: "exampleGcsSource"; + + /** Examples config. */ + public config?: ("nearestNeighborSearchConfig"|"presets"); + + /** + * Creates a new Examples instance using the specified properties. + * @param [properties] Properties to set + * @returns Examples instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IExamples): google.cloud.aiplatform.v1.Examples; + + /** + * Encodes the specified Examples message. Does not implicitly {@link google.cloud.aiplatform.v1.Examples.verify|verify} messages. + * @param message Examples message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IExamples, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Examples message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.Examples.verify|verify} messages. + * @param message Examples message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IExamples, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Examples message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Examples + * @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.aiplatform.v1.Examples; + + /** + * Decodes an Examples message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Examples + * @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.aiplatform.v1.Examples; + + /** + * Verifies an Examples 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 Examples message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Examples + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.Examples; + + /** + * Creates a plain object from an Examples message. Also converts values to other types if specified. + * @param message Examples + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.Examples, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Examples to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Examples + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Examples { + + /** Properties of an ExampleGcsSource. */ + interface IExampleGcsSource { + + /** ExampleGcsSource dataFormat */ + dataFormat?: (google.cloud.aiplatform.v1.Examples.ExampleGcsSource.DataFormat|keyof typeof google.cloud.aiplatform.v1.Examples.ExampleGcsSource.DataFormat|null); + + /** ExampleGcsSource gcsSource */ + gcsSource?: (google.cloud.aiplatform.v1.IGcsSource|null); + } + + /** Represents an ExampleGcsSource. */ + class ExampleGcsSource implements IExampleGcsSource { + + /** + * Constructs a new ExampleGcsSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.Examples.IExampleGcsSource); + + /** ExampleGcsSource dataFormat. */ + public dataFormat: (google.cloud.aiplatform.v1.Examples.ExampleGcsSource.DataFormat|keyof typeof google.cloud.aiplatform.v1.Examples.ExampleGcsSource.DataFormat); + + /** ExampleGcsSource gcsSource. */ + public gcsSource?: (google.cloud.aiplatform.v1.IGcsSource|null); + + /** + * Creates a new ExampleGcsSource instance using the specified properties. + * @param [properties] Properties to set + * @returns ExampleGcsSource instance + */ + public static create(properties?: google.cloud.aiplatform.v1.Examples.IExampleGcsSource): google.cloud.aiplatform.v1.Examples.ExampleGcsSource; + + /** + * Encodes the specified ExampleGcsSource message. Does not implicitly {@link google.cloud.aiplatform.v1.Examples.ExampleGcsSource.verify|verify} messages. + * @param message ExampleGcsSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.Examples.IExampleGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExampleGcsSource message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.Examples.ExampleGcsSource.verify|verify} messages. + * @param message ExampleGcsSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.Examples.IExampleGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExampleGcsSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExampleGcsSource + * @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.aiplatform.v1.Examples.ExampleGcsSource; + + /** + * Decodes an ExampleGcsSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExampleGcsSource + * @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.aiplatform.v1.Examples.ExampleGcsSource; + + /** + * Verifies an ExampleGcsSource 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 ExampleGcsSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExampleGcsSource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.Examples.ExampleGcsSource; + + /** + * Creates a plain object from an ExampleGcsSource message. Also converts values to other types if specified. + * @param message ExampleGcsSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.Examples.ExampleGcsSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExampleGcsSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExampleGcsSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ExampleGcsSource { + + /** DataFormat enum. */ + enum DataFormat { + DATA_FORMAT_UNSPECIFIED = 0, + JSONL = 1 + } + } + } + + /** Properties of a Presets. */ + interface IPresets { + + /** Presets query */ + query?: (google.cloud.aiplatform.v1.Presets.Query|keyof typeof google.cloud.aiplatform.v1.Presets.Query|null); + + /** Presets modality */ + modality?: (google.cloud.aiplatform.v1.Presets.Modality|keyof typeof google.cloud.aiplatform.v1.Presets.Modality|null); + } + + /** Represents a Presets. */ + class Presets implements IPresets { + + /** + * Constructs a new Presets. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IPresets); + + /** Presets query. */ + public query?: (google.cloud.aiplatform.v1.Presets.Query|keyof typeof google.cloud.aiplatform.v1.Presets.Query|null); + + /** Presets modality. */ + public modality: (google.cloud.aiplatform.v1.Presets.Modality|keyof typeof google.cloud.aiplatform.v1.Presets.Modality); + + /** Presets _query. */ + public _query?: "query"; + + /** + * Creates a new Presets instance using the specified properties. + * @param [properties] Properties to set + * @returns Presets instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IPresets): google.cloud.aiplatform.v1.Presets; + + /** + * Encodes the specified Presets message. Does not implicitly {@link google.cloud.aiplatform.v1.Presets.verify|verify} messages. + * @param message Presets message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IPresets, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Presets message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.Presets.verify|verify} messages. + * @param message Presets message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IPresets, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Presets message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Presets + * @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.aiplatform.v1.Presets; + + /** + * Decodes a Presets message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Presets + * @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.aiplatform.v1.Presets; + + /** + * Verifies a Presets 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 Presets message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Presets + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.Presets; + + /** + * Creates a plain object from a Presets message. Also converts values to other types if specified. + * @param message Presets + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.Presets, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Presets to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Presets + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Presets { + + /** Query enum. */ + enum Query { + PRECISE = 0, + FAST = 1 + } + + /** Modality enum. */ + enum Modality { + MODALITY_UNSPECIFIED = 0, + IMAGE = 1, + TEXT = 2, + TABULAR = 3 + } + } + /** Properties of an ExplanationSpecOverride. */ interface IExplanationSpecOverride { @@ -6999,7 +7365,8 @@ export namespace google { AUTOML = 1, CUSTOM = 2, BQML = 3, - MODEL_GARDEN = 4 + MODEL_GARDEN = 4, + GENIE = 5 } } @@ -7558,6 +7925,12 @@ export namespace google { /** CustomJobSpec enableDashboardAccess */ enableDashboardAccess?: (boolean|null); + + /** CustomJobSpec experiment */ + experiment?: (string|null); + + /** CustomJobSpec experimentRun */ + experimentRun?: (string|null); } /** Represents a CustomJobSpec. */ @@ -7596,6 +7969,12 @@ export namespace google { /** CustomJobSpec enableDashboardAccess. */ public enableDashboardAccess: boolean; + /** CustomJobSpec experiment. */ + public experiment: string; + + /** CustomJobSpec experimentRun. */ + public experimentRun: string; + /** * Creates a new CustomJobSpec instance using the specified properties. * @param [properties] Properties to set @@ -13341,6 +13720,20 @@ export namespace google { * @returns Promise */ public undeployModel(request: google.cloud.aiplatform.v1.IUndeployModelRequest): Promise; + + /** + * Calls MutateDeployedModel. + * @param request MutateDeployedModelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public mutateDeployedModel(request: google.cloud.aiplatform.v1.IMutateDeployedModelRequest, callback: google.cloud.aiplatform.v1.EndpointService.MutateDeployedModelCallback): void; + + /** + * Calls MutateDeployedModel. + * @param request MutateDeployedModelRequest message or plain object + * @returns Promise + */ + public mutateDeployedModel(request: google.cloud.aiplatform.v1.IMutateDeployedModelRequest): Promise; } namespace EndpointService { @@ -13393,6 +13786,13 @@ export namespace google { * @param [response] Operation */ type UndeployModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.aiplatform.v1.EndpointService|mutateDeployedModel}. + * @param error Error, if any + * @param [response] Operation + */ + type MutateDeployedModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; } /** Properties of a CreateEndpointRequest. */ @@ -14728,6 +15128,309 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a MutateDeployedModelRequest. */ + interface IMutateDeployedModelRequest { + + /** MutateDeployedModelRequest endpoint */ + endpoint?: (string|null); + + /** MutateDeployedModelRequest deployedModel */ + deployedModel?: (google.cloud.aiplatform.v1.IDeployedModel|null); + + /** MutateDeployedModelRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents a MutateDeployedModelRequest. */ + class MutateDeployedModelRequest implements IMutateDeployedModelRequest { + + /** + * Constructs a new MutateDeployedModelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IMutateDeployedModelRequest); + + /** MutateDeployedModelRequest endpoint. */ + public endpoint: string; + + /** MutateDeployedModelRequest deployedModel. */ + public deployedModel?: (google.cloud.aiplatform.v1.IDeployedModel|null); + + /** MutateDeployedModelRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new MutateDeployedModelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns MutateDeployedModelRequest instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IMutateDeployedModelRequest): google.cloud.aiplatform.v1.MutateDeployedModelRequest; + + /** + * Encodes the specified MutateDeployedModelRequest message. Does not implicitly {@link google.cloud.aiplatform.v1.MutateDeployedModelRequest.verify|verify} messages. + * @param message MutateDeployedModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IMutateDeployedModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MutateDeployedModelRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MutateDeployedModelRequest.verify|verify} messages. + * @param message MutateDeployedModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IMutateDeployedModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MutateDeployedModelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MutateDeployedModelRequest + * @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.aiplatform.v1.MutateDeployedModelRequest; + + /** + * Decodes a MutateDeployedModelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MutateDeployedModelRequest + * @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.aiplatform.v1.MutateDeployedModelRequest; + + /** + * Verifies a MutateDeployedModelRequest 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 MutateDeployedModelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MutateDeployedModelRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.MutateDeployedModelRequest; + + /** + * Creates a plain object from a MutateDeployedModelRequest message. Also converts values to other types if specified. + * @param message MutateDeployedModelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.MutateDeployedModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MutateDeployedModelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MutateDeployedModelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MutateDeployedModelResponse. */ + interface IMutateDeployedModelResponse { + + /** MutateDeployedModelResponse deployedModel */ + deployedModel?: (google.cloud.aiplatform.v1.IDeployedModel|null); + } + + /** Represents a MutateDeployedModelResponse. */ + class MutateDeployedModelResponse implements IMutateDeployedModelResponse { + + /** + * Constructs a new MutateDeployedModelResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IMutateDeployedModelResponse); + + /** MutateDeployedModelResponse deployedModel. */ + public deployedModel?: (google.cloud.aiplatform.v1.IDeployedModel|null); + + /** + * Creates a new MutateDeployedModelResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns MutateDeployedModelResponse instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IMutateDeployedModelResponse): google.cloud.aiplatform.v1.MutateDeployedModelResponse; + + /** + * Encodes the specified MutateDeployedModelResponse message. Does not implicitly {@link google.cloud.aiplatform.v1.MutateDeployedModelResponse.verify|verify} messages. + * @param message MutateDeployedModelResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IMutateDeployedModelResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MutateDeployedModelResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MutateDeployedModelResponse.verify|verify} messages. + * @param message MutateDeployedModelResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IMutateDeployedModelResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MutateDeployedModelResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MutateDeployedModelResponse + * @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.aiplatform.v1.MutateDeployedModelResponse; + + /** + * Decodes a MutateDeployedModelResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MutateDeployedModelResponse + * @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.aiplatform.v1.MutateDeployedModelResponse; + + /** + * Verifies a MutateDeployedModelResponse 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 MutateDeployedModelResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MutateDeployedModelResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.MutateDeployedModelResponse; + + /** + * Creates a plain object from a MutateDeployedModelResponse message. Also converts values to other types if specified. + * @param message MutateDeployedModelResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.MutateDeployedModelResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MutateDeployedModelResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MutateDeployedModelResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MutateDeployedModelOperationMetadata. */ + interface IMutateDeployedModelOperationMetadata { + + /** MutateDeployedModelOperationMetadata genericMetadata */ + genericMetadata?: (google.cloud.aiplatform.v1.IGenericOperationMetadata|null); + } + + /** Represents a MutateDeployedModelOperationMetadata. */ + class MutateDeployedModelOperationMetadata implements IMutateDeployedModelOperationMetadata { + + /** + * Constructs a new MutateDeployedModelOperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.IMutateDeployedModelOperationMetadata); + + /** MutateDeployedModelOperationMetadata genericMetadata. */ + public genericMetadata?: (google.cloud.aiplatform.v1.IGenericOperationMetadata|null); + + /** + * Creates a new MutateDeployedModelOperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns MutateDeployedModelOperationMetadata instance + */ + public static create(properties?: google.cloud.aiplatform.v1.IMutateDeployedModelOperationMetadata): google.cloud.aiplatform.v1.MutateDeployedModelOperationMetadata; + + /** + * Encodes the specified MutateDeployedModelOperationMetadata message. Does not implicitly {@link google.cloud.aiplatform.v1.MutateDeployedModelOperationMetadata.verify|verify} messages. + * @param message MutateDeployedModelOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.IMutateDeployedModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MutateDeployedModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MutateDeployedModelOperationMetadata.verify|verify} messages. + * @param message MutateDeployedModelOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.IMutateDeployedModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MutateDeployedModelOperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MutateDeployedModelOperationMetadata + * @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.aiplatform.v1.MutateDeployedModelOperationMetadata; + + /** + * Decodes a MutateDeployedModelOperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MutateDeployedModelOperationMetadata + * @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.aiplatform.v1.MutateDeployedModelOperationMetadata; + + /** + * Verifies a MutateDeployedModelOperationMetadata 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 MutateDeployedModelOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MutateDeployedModelOperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.MutateDeployedModelOperationMetadata; + + /** + * Creates a plain object from a MutateDeployedModelOperationMetadata message. Also converts values to other types if specified. + * @param message MutateDeployedModelOperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.MutateDeployedModelOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MutateDeployedModelOperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MutateDeployedModelOperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of an EntityType. */ interface IEntityType { @@ -14751,6 +15454,9 @@ export namespace google { /** EntityType monitoringConfig */ monitoringConfig?: (google.cloud.aiplatform.v1.IFeaturestoreMonitoringConfig|null); + + /** EntityType offlineStorageTtlDays */ + offlineStorageTtlDays?: (number|null); } /** Represents an EntityType. */ @@ -14783,6 +15489,9 @@ export namespace google { /** EntityType monitoringConfig. */ public monitoringConfig?: (google.cloud.aiplatform.v1.IFeaturestoreMonitoringConfig|null); + /** EntityType offlineStorageTtlDays. */ + public offlineStorageTtlDays: number; + /** * Creates a new EntityType instance using the specified properties. * @param [properties] Properties to set @@ -16714,6 +17423,9 @@ export namespace google { /** Featurestore state */ state?: (google.cloud.aiplatform.v1.Featurestore.State|keyof typeof google.cloud.aiplatform.v1.Featurestore.State|null); + /** Featurestore onlineStorageTtlDays */ + onlineStorageTtlDays?: (number|null); + /** Featurestore encryptionSpec */ encryptionSpec?: (google.cloud.aiplatform.v1.IEncryptionSpec|null); } @@ -16748,6 +17460,9 @@ export namespace google { /** Featurestore state. */ public state: (google.cloud.aiplatform.v1.Featurestore.State|keyof typeof google.cloud.aiplatform.v1.Featurestore.State); + /** Featurestore onlineStorageTtlDays. */ + public onlineStorageTtlDays: number; + /** Featurestore encryptionSpec. */ public encryptionSpec?: (google.cloud.aiplatform.v1.IEncryptionSpec|null); @@ -66099,6 +66814,9 @@ export namespace google { /** Tensorboard etag */ etag?: (string|null); + + /** Tensorboard isDefault */ + isDefault?: (boolean|null); } /** Represents a Tensorboard. */ @@ -66140,6 +66858,9 @@ export namespace google { /** Tensorboard etag. */ public etag: string; + /** Tensorboard isDefault. */ + public isDefault: boolean; + /** * Creates a new Tensorboard instance using the specified properties. * @param [properties] Properties to set @@ -75387,6 +76108,7 @@ export namespace google { NVIDIA_TESLA_T4 = 5, NVIDIA_TESLA_A100 = 8, NVIDIA_A100_80GB = 9, + NVIDIA_L4 = 11, TPU_V2 = 6, TPU_V3 = 7, TPU_V4_POD = 10 @@ -78273,6 +78995,9 @@ export namespace google { /** Properties of an Examples. */ interface IExamples { + /** Examples exampleGcsSource */ + exampleGcsSource?: (google.cloud.aiplatform.v1beta1.Examples.IExampleGcsSource|null); + /** Examples nearestNeighborSearchConfig */ nearestNeighborSearchConfig?: (google.protobuf.IValue|null); @@ -78295,6 +79020,9 @@ export namespace google { */ constructor(properties?: google.cloud.aiplatform.v1beta1.IExamples); + /** Examples exampleGcsSource. */ + public exampleGcsSource?: (google.cloud.aiplatform.v1beta1.Examples.IExampleGcsSource|null); + /** Examples nearestNeighborSearchConfig. */ public nearestNeighborSearchConfig?: (google.protobuf.IValue|null); @@ -78307,6 +79035,9 @@ export namespace google { /** Examples neighborCount. */ public neighborCount: number; + /** Examples source. */ + public source?: "exampleGcsSource"; + /** Examples config. */ public config?: ("nearestNeighborSearchConfig"|"presets"); @@ -78388,6 +79119,121 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace Examples { + + /** Properties of an ExampleGcsSource. */ + interface IExampleGcsSource { + + /** ExampleGcsSource dataFormat */ + dataFormat?: (google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.DataFormat|keyof typeof google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.DataFormat|null); + + /** ExampleGcsSource gcsSource */ + gcsSource?: (google.cloud.aiplatform.v1beta1.IGcsSource|null); + } + + /** Represents an ExampleGcsSource. */ + class ExampleGcsSource implements IExampleGcsSource { + + /** + * Constructs a new ExampleGcsSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.Examples.IExampleGcsSource); + + /** ExampleGcsSource dataFormat. */ + public dataFormat: (google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.DataFormat|keyof typeof google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.DataFormat); + + /** ExampleGcsSource gcsSource. */ + public gcsSource?: (google.cloud.aiplatform.v1beta1.IGcsSource|null); + + /** + * Creates a new ExampleGcsSource instance using the specified properties. + * @param [properties] Properties to set + * @returns ExampleGcsSource instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.Examples.IExampleGcsSource): google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource; + + /** + * Encodes the specified ExampleGcsSource message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.verify|verify} messages. + * @param message ExampleGcsSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.Examples.IExampleGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExampleGcsSource message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.verify|verify} messages. + * @param message ExampleGcsSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.Examples.IExampleGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExampleGcsSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExampleGcsSource + * @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.aiplatform.v1beta1.Examples.ExampleGcsSource; + + /** + * Decodes an ExampleGcsSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExampleGcsSource + * @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.aiplatform.v1beta1.Examples.ExampleGcsSource; + + /** + * Verifies an ExampleGcsSource 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 ExampleGcsSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExampleGcsSource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource; + + /** + * Creates a plain object from an ExampleGcsSource message. Also converts values to other types if specified. + * @param message ExampleGcsSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExampleGcsSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExampleGcsSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ExampleGcsSource { + + /** DataFormat enum. */ + enum DataFormat { + DATA_FORMAT_UNSPECIFIED = 0, + JSONL = 1 + } + } + } + /** Properties of a Presets. */ interface IPresets { @@ -84534,6 +85380,103 @@ export namespace google { } } + /** Properties of a LargeModelReference. */ + interface ILargeModelReference { + + /** LargeModelReference name */ + name?: (string|null); + } + + /** Represents a LargeModelReference. */ + class LargeModelReference implements ILargeModelReference { + + /** + * Constructs a new LargeModelReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ILargeModelReference); + + /** LargeModelReference name. */ + public name: string; + + /** + * Creates a new LargeModelReference instance using the specified properties. + * @param [properties] Properties to set + * @returns LargeModelReference instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ILargeModelReference): google.cloud.aiplatform.v1beta1.LargeModelReference; + + /** + * Encodes the specified LargeModelReference message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.LargeModelReference.verify|verify} messages. + * @param message LargeModelReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ILargeModelReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LargeModelReference message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.LargeModelReference.verify|verify} messages. + * @param message LargeModelReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ILargeModelReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LargeModelReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LargeModelReference + * @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.aiplatform.v1beta1.LargeModelReference; + + /** + * Decodes a LargeModelReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LargeModelReference + * @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.aiplatform.v1beta1.LargeModelReference; + + /** + * Verifies a LargeModelReference 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 LargeModelReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LargeModelReference + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.LargeModelReference; + + /** + * Creates a plain object from a LargeModelReference message. Also converts values to other types if specified. + * @param message LargeModelReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.LargeModelReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LargeModelReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LargeModelReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a PredictSchemata. */ interface IPredictSchemata { @@ -84984,7 +85927,8 @@ export namespace google { AUTOML = 1, CUSTOM = 2, BQML = 3, - MODEL_GARDEN = 4 + MODEL_GARDEN = 4, + GENIE = 5 } } @@ -85543,6 +86487,12 @@ export namespace google { /** CustomJobSpec enableDashboardAccess */ enableDashboardAccess?: (boolean|null); + + /** CustomJobSpec experiment */ + experiment?: (string|null); + + /** CustomJobSpec experimentRun */ + experimentRun?: (string|null); } /** Represents a CustomJobSpec. */ @@ -85581,6 +86531,12 @@ export namespace google { /** CustomJobSpec enableDashboardAccess. */ public enableDashboardAccess: boolean; + /** CustomJobSpec experiment. */ + public experiment: string; + + /** CustomJobSpec experimentRun. */ + public experimentRun: string; + /** * Creates a new CustomJobSpec instance using the specified properties. * @param [properties] Properties to set @@ -92515,6 +93471,20 @@ export namespace google { * @returns Promise */ public undeployModel(request: google.cloud.aiplatform.v1beta1.IUndeployModelRequest): Promise; + + /** + * Calls MutateDeployedModel. + * @param request MutateDeployedModelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public mutateDeployedModel(request: google.cloud.aiplatform.v1beta1.IMutateDeployedModelRequest, callback: google.cloud.aiplatform.v1beta1.EndpointService.MutateDeployedModelCallback): void; + + /** + * Calls MutateDeployedModel. + * @param request MutateDeployedModelRequest message or plain object + * @returns Promise + */ + public mutateDeployedModel(request: google.cloud.aiplatform.v1beta1.IMutateDeployedModelRequest): Promise; } namespace EndpointService { @@ -92567,6 +93537,13 @@ export namespace google { * @param [response] Operation */ type UndeployModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.EndpointService|mutateDeployedModel}. + * @param error Error, if any + * @param [response] Operation + */ + type MutateDeployedModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; } /** Properties of a CreateEndpointRequest. */ @@ -93896,6 +94873,309 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a MutateDeployedModelRequest. */ + interface IMutateDeployedModelRequest { + + /** MutateDeployedModelRequest endpoint */ + endpoint?: (string|null); + + /** MutateDeployedModelRequest deployedModel */ + deployedModel?: (google.cloud.aiplatform.v1beta1.IDeployedModel|null); + + /** MutateDeployedModelRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents a MutateDeployedModelRequest. */ + class MutateDeployedModelRequest implements IMutateDeployedModelRequest { + + /** + * Constructs a new MutateDeployedModelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IMutateDeployedModelRequest); + + /** MutateDeployedModelRequest endpoint. */ + public endpoint: string; + + /** MutateDeployedModelRequest deployedModel. */ + public deployedModel?: (google.cloud.aiplatform.v1beta1.IDeployedModel|null); + + /** MutateDeployedModelRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new MutateDeployedModelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns MutateDeployedModelRequest instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IMutateDeployedModelRequest): google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest; + + /** + * Encodes the specified MutateDeployedModelRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest.verify|verify} messages. + * @param message MutateDeployedModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IMutateDeployedModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MutateDeployedModelRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest.verify|verify} messages. + * @param message MutateDeployedModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IMutateDeployedModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MutateDeployedModelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MutateDeployedModelRequest + * @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.aiplatform.v1beta1.MutateDeployedModelRequest; + + /** + * Decodes a MutateDeployedModelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MutateDeployedModelRequest + * @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.aiplatform.v1beta1.MutateDeployedModelRequest; + + /** + * Verifies a MutateDeployedModelRequest 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 MutateDeployedModelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MutateDeployedModelRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest; + + /** + * Creates a plain object from a MutateDeployedModelRequest message. Also converts values to other types if specified. + * @param message MutateDeployedModelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MutateDeployedModelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MutateDeployedModelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MutateDeployedModelResponse. */ + interface IMutateDeployedModelResponse { + + /** MutateDeployedModelResponse deployedModel */ + deployedModel?: (google.cloud.aiplatform.v1beta1.IDeployedModel|null); + } + + /** Represents a MutateDeployedModelResponse. */ + class MutateDeployedModelResponse implements IMutateDeployedModelResponse { + + /** + * Constructs a new MutateDeployedModelResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IMutateDeployedModelResponse); + + /** MutateDeployedModelResponse deployedModel. */ + public deployedModel?: (google.cloud.aiplatform.v1beta1.IDeployedModel|null); + + /** + * Creates a new MutateDeployedModelResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns MutateDeployedModelResponse instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IMutateDeployedModelResponse): google.cloud.aiplatform.v1beta1.MutateDeployedModelResponse; + + /** + * Encodes the specified MutateDeployedModelResponse message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.MutateDeployedModelResponse.verify|verify} messages. + * @param message MutateDeployedModelResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IMutateDeployedModelResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MutateDeployedModelResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.MutateDeployedModelResponse.verify|verify} messages. + * @param message MutateDeployedModelResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IMutateDeployedModelResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MutateDeployedModelResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MutateDeployedModelResponse + * @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.aiplatform.v1beta1.MutateDeployedModelResponse; + + /** + * Decodes a MutateDeployedModelResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MutateDeployedModelResponse + * @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.aiplatform.v1beta1.MutateDeployedModelResponse; + + /** + * Verifies a MutateDeployedModelResponse 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 MutateDeployedModelResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MutateDeployedModelResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.MutateDeployedModelResponse; + + /** + * Creates a plain object from a MutateDeployedModelResponse message. Also converts values to other types if specified. + * @param message MutateDeployedModelResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.MutateDeployedModelResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MutateDeployedModelResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MutateDeployedModelResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MutateDeployedModelOperationMetadata. */ + interface IMutateDeployedModelOperationMetadata { + + /** MutateDeployedModelOperationMetadata genericMetadata */ + genericMetadata?: (google.cloud.aiplatform.v1beta1.IGenericOperationMetadata|null); + } + + /** Represents a MutateDeployedModelOperationMetadata. */ + class MutateDeployedModelOperationMetadata implements IMutateDeployedModelOperationMetadata { + + /** + * Constructs a new MutateDeployedModelOperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IMutateDeployedModelOperationMetadata); + + /** MutateDeployedModelOperationMetadata genericMetadata. */ + public genericMetadata?: (google.cloud.aiplatform.v1beta1.IGenericOperationMetadata|null); + + /** + * Creates a new MutateDeployedModelOperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns MutateDeployedModelOperationMetadata instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IMutateDeployedModelOperationMetadata): google.cloud.aiplatform.v1beta1.MutateDeployedModelOperationMetadata; + + /** + * Encodes the specified MutateDeployedModelOperationMetadata message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.MutateDeployedModelOperationMetadata.verify|verify} messages. + * @param message MutateDeployedModelOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IMutateDeployedModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MutateDeployedModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.MutateDeployedModelOperationMetadata.verify|verify} messages. + * @param message MutateDeployedModelOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IMutateDeployedModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MutateDeployedModelOperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MutateDeployedModelOperationMetadata + * @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.aiplatform.v1beta1.MutateDeployedModelOperationMetadata; + + /** + * Decodes a MutateDeployedModelOperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MutateDeployedModelOperationMetadata + * @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.aiplatform.v1beta1.MutateDeployedModelOperationMetadata; + + /** + * Verifies a MutateDeployedModelOperationMetadata 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 MutateDeployedModelOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MutateDeployedModelOperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.MutateDeployedModelOperationMetadata; + + /** + * Creates a plain object from a MutateDeployedModelOperationMetadata message. Also converts values to other types if specified. + * @param message MutateDeployedModelOperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.MutateDeployedModelOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MutateDeployedModelOperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MutateDeployedModelOperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of an EntityType. */ interface IEntityType { @@ -128302,6 +129582,1013 @@ export namespace google { } } + /** Represents a ModelGardenService */ + class ModelGardenService extends $protobuf.rpc.Service { + + /** + * Constructs a new ModelGardenService 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 ModelGardenService 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): ModelGardenService; + + /** + * Calls GetPublisherModel. + * @param request GetPublisherModelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PublisherModel + */ + public getPublisherModel(request: google.cloud.aiplatform.v1beta1.IGetPublisherModelRequest, callback: google.cloud.aiplatform.v1beta1.ModelGardenService.GetPublisherModelCallback): void; + + /** + * Calls GetPublisherModel. + * @param request GetPublisherModelRequest message or plain object + * @returns Promise + */ + public getPublisherModel(request: google.cloud.aiplatform.v1beta1.IGetPublisherModelRequest): Promise; + } + + namespace ModelGardenService { + + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.ModelGardenService|getPublisherModel}. + * @param error Error, if any + * @param [response] PublisherModel + */ + type GetPublisherModelCallback = (error: (Error|null), response?: google.cloud.aiplatform.v1beta1.PublisherModel) => void; + } + + /** PublisherModelView enum. */ + enum PublisherModelView { + PUBLISHER_MODEL_VIEW_UNSPECIFIED = 0, + PUBLISHER_MODEL_VIEW_BASIC = 1, + PUBLISHER_MODEL_VIEW_FULL = 2, + PUBLISHER_MODEL_VERSION_VIEW_BASIC = 3 + } + + /** Properties of a GetPublisherModelRequest. */ + interface IGetPublisherModelRequest { + + /** GetPublisherModelRequest name */ + name?: (string|null); + + /** GetPublisherModelRequest languageCode */ + languageCode?: (string|null); + + /** GetPublisherModelRequest view */ + view?: (google.cloud.aiplatform.v1beta1.PublisherModelView|keyof typeof google.cloud.aiplatform.v1beta1.PublisherModelView|null); + } + + /** Represents a GetPublisherModelRequest. */ + class GetPublisherModelRequest implements IGetPublisherModelRequest { + + /** + * Constructs a new GetPublisherModelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IGetPublisherModelRequest); + + /** GetPublisherModelRequest name. */ + public name: string; + + /** GetPublisherModelRequest languageCode. */ + public languageCode: string; + + /** GetPublisherModelRequest view. */ + public view: (google.cloud.aiplatform.v1beta1.PublisherModelView|keyof typeof google.cloud.aiplatform.v1beta1.PublisherModelView); + + /** + * Creates a new GetPublisherModelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPublisherModelRequest instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IGetPublisherModelRequest): google.cloud.aiplatform.v1beta1.GetPublisherModelRequest; + + /** + * Encodes the specified GetPublisherModelRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.GetPublisherModelRequest.verify|verify} messages. + * @param message GetPublisherModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IGetPublisherModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPublisherModelRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.GetPublisherModelRequest.verify|verify} messages. + * @param message GetPublisherModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IGetPublisherModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPublisherModelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPublisherModelRequest + * @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.aiplatform.v1beta1.GetPublisherModelRequest; + + /** + * Decodes a GetPublisherModelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPublisherModelRequest + * @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.aiplatform.v1beta1.GetPublisherModelRequest; + + /** + * Verifies a GetPublisherModelRequest 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 GetPublisherModelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPublisherModelRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.GetPublisherModelRequest; + + /** + * Creates a plain object from a GetPublisherModelRequest message. Also converts values to other types if specified. + * @param message GetPublisherModelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.GetPublisherModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPublisherModelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPublisherModelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PublisherModel. */ + interface IPublisherModel { + + /** PublisherModel name */ + name?: (string|null); + + /** PublisherModel versionId */ + versionId?: (string|null); + + /** PublisherModel openSourceCategory */ + openSourceCategory?: (google.cloud.aiplatform.v1beta1.PublisherModel.OpenSourceCategory|keyof typeof google.cloud.aiplatform.v1beta1.PublisherModel.OpenSourceCategory|null); + + /** PublisherModel supportedActions */ + supportedActions?: (google.cloud.aiplatform.v1beta1.PublisherModel.ICallToAction|null); + + /** PublisherModel frameworks */ + frameworks?: (string[]|null); + + /** PublisherModel publisherModelTemplate */ + publisherModelTemplate?: (string|null); + + /** PublisherModel predictSchemata */ + predictSchemata?: (google.cloud.aiplatform.v1beta1.IPredictSchemata|null); + } + + /** Represents a PublisherModel. */ + class PublisherModel implements IPublisherModel { + + /** + * Constructs a new PublisherModel. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IPublisherModel); + + /** PublisherModel name. */ + public name: string; + + /** PublisherModel versionId. */ + public versionId: string; + + /** PublisherModel openSourceCategory. */ + public openSourceCategory: (google.cloud.aiplatform.v1beta1.PublisherModel.OpenSourceCategory|keyof typeof google.cloud.aiplatform.v1beta1.PublisherModel.OpenSourceCategory); + + /** PublisherModel supportedActions. */ + public supportedActions?: (google.cloud.aiplatform.v1beta1.PublisherModel.ICallToAction|null); + + /** PublisherModel frameworks. */ + public frameworks: string[]; + + /** PublisherModel publisherModelTemplate. */ + public publisherModelTemplate: string; + + /** PublisherModel predictSchemata. */ + public predictSchemata?: (google.cloud.aiplatform.v1beta1.IPredictSchemata|null); + + /** + * Creates a new PublisherModel instance using the specified properties. + * @param [properties] Properties to set + * @returns PublisherModel instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IPublisherModel): google.cloud.aiplatform.v1beta1.PublisherModel; + + /** + * Encodes the specified PublisherModel message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PublisherModel.verify|verify} messages. + * @param message PublisherModel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IPublisherModel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PublisherModel message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PublisherModel.verify|verify} messages. + * @param message PublisherModel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IPublisherModel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PublisherModel message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PublisherModel + * @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.aiplatform.v1beta1.PublisherModel; + + /** + * Decodes a PublisherModel message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PublisherModel + * @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.aiplatform.v1beta1.PublisherModel; + + /** + * Verifies a PublisherModel 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 PublisherModel message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PublisherModel + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.PublisherModel; + + /** + * Creates a plain object from a PublisherModel message. Also converts values to other types if specified. + * @param message PublisherModel + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.PublisherModel, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PublisherModel to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PublisherModel + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PublisherModel { + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference uri */ + uri?: (string|null); + + /** ResourceReference resourceName */ + resourceName?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.PublisherModel.IResourceReference); + + /** ResourceReference uri. */ + public uri?: (string|null); + + /** ResourceReference resourceName. */ + public resourceName?: (string|null); + + /** ResourceReference reference. */ + public reference?: ("uri"|"resourceName"); + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.PublisherModel.IResourceReference): google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.PublisherModel.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.PublisherModel.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @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.aiplatform.v1beta1.PublisherModel.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @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.aiplatform.v1beta1.PublisherModel.ResourceReference; + + /** + * Verifies a ResourceReference 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 ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Documentation. */ + interface IDocumentation { + + /** Documentation title */ + title?: (string|null); + + /** Documentation content */ + content?: (string|null); + } + + /** Represents a Documentation. */ + class Documentation implements IDocumentation { + + /** + * Constructs a new Documentation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.PublisherModel.IDocumentation); + + /** Documentation title. */ + public title: string; + + /** Documentation content. */ + public content: string; + + /** + * Creates a new Documentation instance using the specified properties. + * @param [properties] Properties to set + * @returns Documentation instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.PublisherModel.IDocumentation): google.cloud.aiplatform.v1beta1.PublisherModel.Documentation; + + /** + * Encodes the specified Documentation message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PublisherModel.Documentation.verify|verify} messages. + * @param message Documentation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.PublisherModel.IDocumentation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Documentation message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PublisherModel.Documentation.verify|verify} messages. + * @param message Documentation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.PublisherModel.IDocumentation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Documentation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Documentation + * @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.aiplatform.v1beta1.PublisherModel.Documentation; + + /** + * Decodes a Documentation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Documentation + * @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.aiplatform.v1beta1.PublisherModel.Documentation; + + /** + * Verifies a Documentation 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 Documentation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Documentation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.PublisherModel.Documentation; + + /** + * Creates a plain object from a Documentation message. Also converts values to other types if specified. + * @param message Documentation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.PublisherModel.Documentation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Documentation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Documentation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CallToAction. */ + interface ICallToAction { + + /** CallToAction viewRestApi */ + viewRestApi?: (google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IViewRestApi|null); + + /** CallToAction openNotebook */ + openNotebook?: (google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences|null); + + /** CallToAction createApplication */ + createApplication?: (google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences|null); + + /** CallToAction openFineTuningPipeline */ + openFineTuningPipeline?: (google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences|null); + + /** CallToAction openPromptTuningPipeline */ + openPromptTuningPipeline?: (google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences|null); + + /** CallToAction openGenie */ + openGenie?: (google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences|null); + + /** CallToAction deploy */ + deploy?: (google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IDeploy|null); + + /** CallToAction openGenerationAiStudio */ + openGenerationAiStudio?: (google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences|null); + } + + /** Represents a CallToAction. */ + class CallToAction implements ICallToAction { + + /** + * Constructs a new CallToAction. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.PublisherModel.ICallToAction); + + /** CallToAction viewRestApi. */ + public viewRestApi?: (google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IViewRestApi|null); + + /** CallToAction openNotebook. */ + public openNotebook?: (google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences|null); + + /** CallToAction createApplication. */ + public createApplication?: (google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences|null); + + /** CallToAction openFineTuningPipeline. */ + public openFineTuningPipeline?: (google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences|null); + + /** CallToAction openPromptTuningPipeline. */ + public openPromptTuningPipeline?: (google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences|null); + + /** CallToAction openGenie. */ + public openGenie?: (google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences|null); + + /** CallToAction deploy. */ + public deploy?: (google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IDeploy|null); + + /** CallToAction openGenerationAiStudio. */ + public openGenerationAiStudio?: (google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences|null); + + /** + * Creates a new CallToAction instance using the specified properties. + * @param [properties] Properties to set + * @returns CallToAction instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.PublisherModel.ICallToAction): google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction; + + /** + * Encodes the specified CallToAction message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.verify|verify} messages. + * @param message CallToAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.PublisherModel.ICallToAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CallToAction message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.verify|verify} messages. + * @param message CallToAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.PublisherModel.ICallToAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CallToAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CallToAction + * @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.aiplatform.v1beta1.PublisherModel.CallToAction; + + /** + * Decodes a CallToAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CallToAction + * @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.aiplatform.v1beta1.PublisherModel.CallToAction; + + /** + * Verifies a CallToAction 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 CallToAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CallToAction + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction; + + /** + * Creates a plain object from a CallToAction message. Also converts values to other types if specified. + * @param message CallToAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CallToAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CallToAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CallToAction { + + /** Properties of a RegionalResourceReferences. */ + interface IRegionalResourceReferences { + + /** RegionalResourceReferences references */ + references?: ({ [k: string]: google.cloud.aiplatform.v1beta1.PublisherModel.IResourceReference }|null); + + /** RegionalResourceReferences title */ + title?: (string|null); + } + + /** Represents a RegionalResourceReferences. */ + class RegionalResourceReferences implements IRegionalResourceReferences { + + /** + * Constructs a new RegionalResourceReferences. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences); + + /** RegionalResourceReferences references. */ + public references: { [k: string]: google.cloud.aiplatform.v1beta1.PublisherModel.IResourceReference }; + + /** RegionalResourceReferences title. */ + public title: string; + + /** + * Creates a new RegionalResourceReferences instance using the specified properties. + * @param [properties] Properties to set + * @returns RegionalResourceReferences instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences): google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences; + + /** + * Encodes the specified RegionalResourceReferences message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.verify|verify} messages. + * @param message RegionalResourceReferences message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RegionalResourceReferences message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.verify|verify} messages. + * @param message RegionalResourceReferences message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RegionalResourceReferences message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RegionalResourceReferences + * @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.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences; + + /** + * Decodes a RegionalResourceReferences message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RegionalResourceReferences + * @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.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences; + + /** + * Verifies a RegionalResourceReferences 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 RegionalResourceReferences message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RegionalResourceReferences + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences; + + /** + * Creates a plain object from a RegionalResourceReferences message. Also converts values to other types if specified. + * @param message RegionalResourceReferences + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RegionalResourceReferences to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RegionalResourceReferences + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ViewRestApi. */ + interface IViewRestApi { + + /** ViewRestApi documentations */ + documentations?: (google.cloud.aiplatform.v1beta1.PublisherModel.IDocumentation[]|null); + + /** ViewRestApi title */ + title?: (string|null); + } + + /** Represents a ViewRestApi. */ + class ViewRestApi implements IViewRestApi { + + /** + * Constructs a new ViewRestApi. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IViewRestApi); + + /** ViewRestApi documentations. */ + public documentations: google.cloud.aiplatform.v1beta1.PublisherModel.IDocumentation[]; + + /** ViewRestApi title. */ + public title: string; + + /** + * Creates a new ViewRestApi instance using the specified properties. + * @param [properties] Properties to set + * @returns ViewRestApi instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IViewRestApi): google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi; + + /** + * Encodes the specified ViewRestApi message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi.verify|verify} messages. + * @param message ViewRestApi message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IViewRestApi, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ViewRestApi message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi.verify|verify} messages. + * @param message ViewRestApi message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IViewRestApi, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ViewRestApi message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ViewRestApi + * @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.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi; + + /** + * Decodes a ViewRestApi message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ViewRestApi + * @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.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi; + + /** + * Verifies a ViewRestApi 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 ViewRestApi message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ViewRestApi + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi; + + /** + * Creates a plain object from a ViewRestApi message. Also converts values to other types if specified. + * @param message ViewRestApi + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ViewRestApi to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ViewRestApi + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Deploy. */ + interface IDeploy { + + /** Deploy dedicatedResources */ + dedicatedResources?: (google.cloud.aiplatform.v1beta1.IDedicatedResources|null); + + /** Deploy automaticResources */ + automaticResources?: (google.cloud.aiplatform.v1beta1.IAutomaticResources|null); + + /** Deploy sharedResources */ + sharedResources?: (string|null); + + /** Deploy modelDisplayName */ + modelDisplayName?: (string|null); + + /** Deploy largeModelReference */ + largeModelReference?: (google.cloud.aiplatform.v1beta1.ILargeModelReference|null); + + /** Deploy containerSpec */ + containerSpec?: (google.cloud.aiplatform.v1beta1.IModelContainerSpec|null); + + /** Deploy artifactUri */ + artifactUri?: (string|null); + + /** Deploy title */ + title?: (string|null); + } + + /** Represents a Deploy. */ + class Deploy implements IDeploy { + + /** + * Constructs a new Deploy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IDeploy); + + /** Deploy dedicatedResources. */ + public dedicatedResources?: (google.cloud.aiplatform.v1beta1.IDedicatedResources|null); + + /** Deploy automaticResources. */ + public automaticResources?: (google.cloud.aiplatform.v1beta1.IAutomaticResources|null); + + /** Deploy sharedResources. */ + public sharedResources?: (string|null); + + /** Deploy modelDisplayName. */ + public modelDisplayName: string; + + /** Deploy largeModelReference. */ + public largeModelReference?: (google.cloud.aiplatform.v1beta1.ILargeModelReference|null); + + /** Deploy containerSpec. */ + public containerSpec?: (google.cloud.aiplatform.v1beta1.IModelContainerSpec|null); + + /** Deploy artifactUri. */ + public artifactUri: string; + + /** Deploy title. */ + public title: string; + + /** Deploy predictionResources. */ + public predictionResources?: ("dedicatedResources"|"automaticResources"|"sharedResources"); + + /** + * Creates a new Deploy instance using the specified properties. + * @param [properties] Properties to set + * @returns Deploy instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IDeploy): google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy; + + /** + * Encodes the specified Deploy message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.verify|verify} messages. + * @param message Deploy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IDeploy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Deploy message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.verify|verify} messages. + * @param message Deploy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IDeploy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Deploy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Deploy + * @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.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy; + + /** + * Decodes a Deploy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Deploy + * @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.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy; + + /** + * Verifies a Deploy 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 Deploy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Deploy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy; + + /** + * Creates a plain object from a Deploy message. Also converts values to other types if specified. + * @param message Deploy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Deploy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Deploy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** OpenSourceCategory enum. */ + enum OpenSourceCategory { + OPEN_SOURCE_CATEGORY_UNSPECIFIED = 0, + PROPRIETARY = 1, + GOOGLE_OWNED_OSS_WITH_GOOGLE_CHECKPOINT = 2, + THIRD_PARTY_OWNED_OSS_WITH_GOOGLE_CHECKPOINT = 3, + GOOGLE_OWNED_OSS = 4, + THIRD_PARTY_OWNED_OSS = 5 + } + } + /** Represents a ModelService */ class ModelService extends $protobuf.rpc.Service { @@ -136800,6 +139087,9 @@ export namespace google { /** Schedule createTime */ createTime?: (google.protobuf.ITimestamp|null); + /** Schedule updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + /** Schedule nextRunTime */ nextRunTime?: (google.protobuf.ITimestamp|null); @@ -136817,6 +139107,9 @@ export namespace google { /** Schedule catchUp */ catchUp?: (boolean|null); + + /** Schedule lastScheduledRunResponse */ + lastScheduledRunResponse?: (google.cloud.aiplatform.v1beta1.Schedule.IRunResponse|null); } /** Represents a Schedule. */ @@ -136858,6 +139151,9 @@ export namespace google { /** Schedule createTime. */ public createTime?: (google.protobuf.ITimestamp|null); + /** Schedule updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + /** Schedule nextRunTime. */ public nextRunTime?: (google.protobuf.ITimestamp|null); @@ -136876,6 +139172,9 @@ export namespace google { /** Schedule catchUp. */ public catchUp: boolean; + /** Schedule lastScheduledRunResponse. */ + public lastScheduledRunResponse?: (google.cloud.aiplatform.v1beta1.Schedule.IRunResponse|null); + /** Schedule timeSpecification. */ public timeSpecification?: "cron"; @@ -136962,6 +139261,109 @@ export namespace google { namespace Schedule { + /** Properties of a RunResponse. */ + interface IRunResponse { + + /** RunResponse scheduledRunTime */ + scheduledRunTime?: (google.protobuf.ITimestamp|null); + + /** RunResponse runResponse */ + runResponse?: (string|null); + } + + /** Represents a RunResponse. */ + class RunResponse implements IRunResponse { + + /** + * Constructs a new RunResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.Schedule.IRunResponse); + + /** RunResponse scheduledRunTime. */ + public scheduledRunTime?: (google.protobuf.ITimestamp|null); + + /** RunResponse runResponse. */ + public runResponse: string; + + /** + * Creates a new RunResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RunResponse instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.Schedule.IRunResponse): google.cloud.aiplatform.v1beta1.Schedule.RunResponse; + + /** + * Encodes the specified RunResponse message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.Schedule.RunResponse.verify|verify} messages. + * @param message RunResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.Schedule.IRunResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.Schedule.RunResponse.verify|verify} messages. + * @param message RunResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.Schedule.IRunResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunResponse + * @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.aiplatform.v1beta1.Schedule.RunResponse; + + /** + * Decodes a RunResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunResponse + * @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.aiplatform.v1beta1.Schedule.RunResponse; + + /** + * Verifies a RunResponse 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 RunResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.Schedule.RunResponse; + + /** + * Creates a plain object from a RunResponse message. Also converts values to other types if specified. + * @param message RunResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.Schedule.RunResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** State enum. */ enum State { STATE_UNSPECIFIED = 0, @@ -137074,6 +139476,20 @@ export namespace google { * @returns Promise */ public resumeSchedule(request: google.cloud.aiplatform.v1beta1.IResumeScheduleRequest): Promise; + + /** + * Calls UpdateSchedule. + * @param request UpdateScheduleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Schedule + */ + public updateSchedule(request: google.cloud.aiplatform.v1beta1.IUpdateScheduleRequest, callback: google.cloud.aiplatform.v1beta1.ScheduleService.UpdateScheduleCallback): void; + + /** + * Calls UpdateSchedule. + * @param request UpdateScheduleRequest message or plain object + * @returns Promise + */ + public updateSchedule(request: google.cloud.aiplatform.v1beta1.IUpdateScheduleRequest): Promise; } namespace ScheduleService { @@ -137119,6 +139535,13 @@ export namespace google { * @param [response] Empty */ type ResumeScheduleCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.ScheduleService|updateSchedule}. + * @param error Error, if any + * @param [response] Schedule + */ + type UpdateScheduleCallback = (error: (Error|null), response?: google.cloud.aiplatform.v1beta1.Schedule) => void; } /** Properties of a CreateScheduleRequest. */ @@ -137842,6 +140265,109 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an UpdateScheduleRequest. */ + interface IUpdateScheduleRequest { + + /** UpdateScheduleRequest schedule */ + schedule?: (google.cloud.aiplatform.v1beta1.ISchedule|null); + + /** UpdateScheduleRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateScheduleRequest. */ + class UpdateScheduleRequest implements IUpdateScheduleRequest { + + /** + * Constructs a new UpdateScheduleRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IUpdateScheduleRequest); + + /** UpdateScheduleRequest schedule. */ + public schedule?: (google.cloud.aiplatform.v1beta1.ISchedule|null); + + /** UpdateScheduleRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateScheduleRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateScheduleRequest instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IUpdateScheduleRequest): google.cloud.aiplatform.v1beta1.UpdateScheduleRequest; + + /** + * Encodes the specified UpdateScheduleRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.UpdateScheduleRequest.verify|verify} messages. + * @param message UpdateScheduleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IUpdateScheduleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateScheduleRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.UpdateScheduleRequest.verify|verify} messages. + * @param message UpdateScheduleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IUpdateScheduleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateScheduleRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateScheduleRequest + * @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.aiplatform.v1beta1.UpdateScheduleRequest; + + /** + * Decodes an UpdateScheduleRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateScheduleRequest + * @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.aiplatform.v1beta1.UpdateScheduleRequest; + + /** + * Verifies an UpdateScheduleRequest 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 UpdateScheduleRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateScheduleRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.UpdateScheduleRequest; + + /** + * Creates a plain object from an UpdateScheduleRequest message. Also converts values to other types if specified. + * @param message UpdateScheduleRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.UpdateScheduleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateScheduleRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateScheduleRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Namespace schema. */ namespace schema { @@ -149884,6 +152410,9 @@ export namespace google { /** Tensorboard etag */ etag?: (string|null); + + /** Tensorboard isDefault */ + isDefault?: (boolean|null); } /** Represents a Tensorboard. */ @@ -149925,6 +152454,9 @@ export namespace google { /** Tensorboard etag. */ public etag: string; + /** Tensorboard isDefault. */ + public isDefault: boolean; + /** * Creates a new Tensorboard instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-aiplatform/protos/protos.js b/packages/google-cloud-aiplatform/protos/protos.js index 2e86686a7a6..513ea3afc0d 100644 --- a/packages/google-cloud-aiplatform/protos/protos.js +++ b/packages/google-cloud-aiplatform/protos/protos.js @@ -77,6 +77,7 @@ * @property {number} NVIDIA_TESLA_P4=4 NVIDIA_TESLA_P4 value * @property {number} NVIDIA_TESLA_T4=5 NVIDIA_TESLA_T4 value * @property {number} NVIDIA_TESLA_A100=8 NVIDIA_TESLA_A100 value + * @property {number} NVIDIA_L4=11 NVIDIA_L4 value * @property {number} TPU_V2=6 TPU_V2 value * @property {number} TPU_V3=7 TPU_V3 value * @property {number} TPU_V4_POD=10 TPU_V4_POD value @@ -90,6 +91,7 @@ values[valuesById[4] = "NVIDIA_TESLA_P4"] = 4; values[valuesById[5] = "NVIDIA_TESLA_T4"] = 5; values[valuesById[8] = "NVIDIA_TESLA_A100"] = 8; + values[valuesById[11] = "NVIDIA_L4"] = 11; values[valuesById[6] = "TPU_V2"] = 6; values[valuesById[7] = "TPU_V3"] = 7; values[valuesById[10] = "TPU_V4_POD"] = 10; @@ -5677,6 +5679,7 @@ * @property {google.cloud.aiplatform.v1.ISampledShapleyAttribution|null} [sampledShapleyAttribution] ExplanationParameters sampledShapleyAttribution * @property {google.cloud.aiplatform.v1.IIntegratedGradientsAttribution|null} [integratedGradientsAttribution] ExplanationParameters integratedGradientsAttribution * @property {google.cloud.aiplatform.v1.IXraiAttribution|null} [xraiAttribution] ExplanationParameters xraiAttribution + * @property {google.cloud.aiplatform.v1.IExamples|null} [examples] ExplanationParameters examples * @property {number|null} [topK] ExplanationParameters topK * @property {google.protobuf.IListValue|null} [outputIndices] ExplanationParameters outputIndices */ @@ -5720,6 +5723,14 @@ */ ExplanationParameters.prototype.xraiAttribution = null; + /** + * ExplanationParameters examples. + * @member {google.cloud.aiplatform.v1.IExamples|null|undefined} examples + * @memberof google.cloud.aiplatform.v1.ExplanationParameters + * @instance + */ + ExplanationParameters.prototype.examples = null; + /** * ExplanationParameters topK. * @member {number} topK @@ -5741,12 +5752,12 @@ /** * ExplanationParameters method. - * @member {"sampledShapleyAttribution"|"integratedGradientsAttribution"|"xraiAttribution"|undefined} method + * @member {"sampledShapleyAttribution"|"integratedGradientsAttribution"|"xraiAttribution"|"examples"|undefined} method * @memberof google.cloud.aiplatform.v1.ExplanationParameters * @instance */ Object.defineProperty(ExplanationParameters.prototype, "method", { - get: $util.oneOfGetter($oneOfFields = ["sampledShapleyAttribution", "integratedGradientsAttribution", "xraiAttribution"]), + get: $util.oneOfGetter($oneOfFields = ["sampledShapleyAttribution", "integratedGradientsAttribution", "xraiAttribution", "examples"]), set: $util.oneOfSetter($oneOfFields) }); @@ -5784,6 +5795,8 @@ writer.uint32(/* id 4, wireType 0 =*/32).int32(message.topK); if (message.outputIndices != null && Object.hasOwnProperty.call(message, "outputIndices")) $root.google.protobuf.ListValue.encode(message.outputIndices, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.examples != null && Object.hasOwnProperty.call(message, "examples")) + $root.google.cloud.aiplatform.v1.Examples.encode(message.examples, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; @@ -5830,6 +5843,10 @@ message.xraiAttribution = $root.google.cloud.aiplatform.v1.XraiAttribution.decode(reader, reader.uint32()); break; } + case 7: { + message.examples = $root.google.cloud.aiplatform.v1.Examples.decode(reader, reader.uint32()); + break; + } case 4: { message.topK = reader.int32(); break; @@ -5902,6 +5919,16 @@ return "xraiAttribution." + error; } } + if (message.examples != null && message.hasOwnProperty("examples")) { + if (properties.method === 1) + return "method: multiple values"; + properties.method = 1; + { + var error = $root.google.cloud.aiplatform.v1.Examples.verify(message.examples); + if (error) + return "examples." + error; + } + } if (message.topK != null && message.hasOwnProperty("topK")) if (!$util.isInteger(message.topK)) return "topK: integer expected"; @@ -5940,6 +5967,11 @@ throw TypeError(".google.cloud.aiplatform.v1.ExplanationParameters.xraiAttribution: object expected"); message.xraiAttribution = $root.google.cloud.aiplatform.v1.XraiAttribution.fromObject(object.xraiAttribution); } + if (object.examples != null) { + if (typeof object.examples !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ExplanationParameters.examples: object expected"); + message.examples = $root.google.cloud.aiplatform.v1.Examples.fromObject(object.examples); + } if (object.topK != null) message.topK = object.topK | 0; if (object.outputIndices != null) { @@ -5986,6 +6018,11 @@ object.topK = message.topK; if (message.outputIndices != null && message.hasOwnProperty("outputIndices")) object.outputIndices = $root.google.protobuf.ListValue.toObject(message.outputIndices, options); + if (message.examples != null && message.hasOwnProperty("examples")) { + object.examples = $root.google.cloud.aiplatform.v1.Examples.toObject(message.examples, options); + if (options.oneofs) + object.method = "examples"; + } return object; }; @@ -7675,6 +7712,926 @@ return BlurBaselineConfig; })(); + v1.Examples = (function() { + + /** + * Properties of an Examples. + * @memberof google.cloud.aiplatform.v1 + * @interface IExamples + * @property {google.cloud.aiplatform.v1.Examples.IExampleGcsSource|null} [exampleGcsSource] Examples exampleGcsSource + * @property {google.protobuf.IValue|null} [nearestNeighborSearchConfig] Examples nearestNeighborSearchConfig + * @property {google.cloud.aiplatform.v1.IPresets|null} [presets] Examples presets + * @property {number|null} [neighborCount] Examples neighborCount + */ + + /** + * Constructs a new Examples. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents an Examples. + * @implements IExamples + * @constructor + * @param {google.cloud.aiplatform.v1.IExamples=} [properties] Properties to set + */ + function Examples(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]]; + } + + /** + * Examples exampleGcsSource. + * @member {google.cloud.aiplatform.v1.Examples.IExampleGcsSource|null|undefined} exampleGcsSource + * @memberof google.cloud.aiplatform.v1.Examples + * @instance + */ + Examples.prototype.exampleGcsSource = null; + + /** + * Examples nearestNeighborSearchConfig. + * @member {google.protobuf.IValue|null|undefined} nearestNeighborSearchConfig + * @memberof google.cloud.aiplatform.v1.Examples + * @instance + */ + Examples.prototype.nearestNeighborSearchConfig = null; + + /** + * Examples presets. + * @member {google.cloud.aiplatform.v1.IPresets|null|undefined} presets + * @memberof google.cloud.aiplatform.v1.Examples + * @instance + */ + Examples.prototype.presets = null; + + /** + * Examples neighborCount. + * @member {number} neighborCount + * @memberof google.cloud.aiplatform.v1.Examples + * @instance + */ + Examples.prototype.neighborCount = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Examples source. + * @member {"exampleGcsSource"|undefined} source + * @memberof google.cloud.aiplatform.v1.Examples + * @instance + */ + Object.defineProperty(Examples.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["exampleGcsSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Examples config. + * @member {"nearestNeighborSearchConfig"|"presets"|undefined} config + * @memberof google.cloud.aiplatform.v1.Examples + * @instance + */ + Object.defineProperty(Examples.prototype, "config", { + get: $util.oneOfGetter($oneOfFields = ["nearestNeighborSearchConfig", "presets"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Examples instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.Examples + * @static + * @param {google.cloud.aiplatform.v1.IExamples=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.Examples} Examples instance + */ + Examples.create = function create(properties) { + return new Examples(properties); + }; + + /** + * Encodes the specified Examples message. Does not implicitly {@link google.cloud.aiplatform.v1.Examples.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.Examples + * @static + * @param {google.cloud.aiplatform.v1.IExamples} message Examples message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Examples.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nearestNeighborSearchConfig != null && Object.hasOwnProperty.call(message, "nearestNeighborSearchConfig")) + $root.google.protobuf.Value.encode(message.nearestNeighborSearchConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.neighborCount != null && Object.hasOwnProperty.call(message, "neighborCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.neighborCount); + if (message.presets != null && Object.hasOwnProperty.call(message, "presets")) + $root.google.cloud.aiplatform.v1.Presets.encode(message.presets, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.exampleGcsSource != null && Object.hasOwnProperty.call(message, "exampleGcsSource")) + $root.google.cloud.aiplatform.v1.Examples.ExampleGcsSource.encode(message.exampleGcsSource, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Examples message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.Examples.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.Examples + * @static + * @param {google.cloud.aiplatform.v1.IExamples} message Examples message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Examples.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Examples message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.Examples + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.Examples} Examples + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Examples.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.Examples(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 5: { + message.exampleGcsSource = $root.google.cloud.aiplatform.v1.Examples.ExampleGcsSource.decode(reader, reader.uint32()); + break; + } + case 2: { + message.nearestNeighborSearchConfig = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + } + case 4: { + message.presets = $root.google.cloud.aiplatform.v1.Presets.decode(reader, reader.uint32()); + break; + } + case 3: { + message.neighborCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Examples message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.Examples + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.Examples} Examples + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Examples.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Examples message. + * @function verify + * @memberof google.cloud.aiplatform.v1.Examples + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Examples.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.exampleGcsSource != null && message.hasOwnProperty("exampleGcsSource")) { + properties.source = 1; + { + var error = $root.google.cloud.aiplatform.v1.Examples.ExampleGcsSource.verify(message.exampleGcsSource); + if (error) + return "exampleGcsSource." + error; + } + } + if (message.nearestNeighborSearchConfig != null && message.hasOwnProperty("nearestNeighborSearchConfig")) { + properties.config = 1; + { + var error = $root.google.protobuf.Value.verify(message.nearestNeighborSearchConfig); + if (error) + return "nearestNeighborSearchConfig." + error; + } + } + if (message.presets != null && message.hasOwnProperty("presets")) { + if (properties.config === 1) + return "config: multiple values"; + properties.config = 1; + { + var error = $root.google.cloud.aiplatform.v1.Presets.verify(message.presets); + if (error) + return "presets." + error; + } + } + if (message.neighborCount != null && message.hasOwnProperty("neighborCount")) + if (!$util.isInteger(message.neighborCount)) + return "neighborCount: integer expected"; + return null; + }; + + /** + * Creates an Examples message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.Examples + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.Examples} Examples + */ + Examples.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.Examples) + return object; + var message = new $root.google.cloud.aiplatform.v1.Examples(); + if (object.exampleGcsSource != null) { + if (typeof object.exampleGcsSource !== "object") + throw TypeError(".google.cloud.aiplatform.v1.Examples.exampleGcsSource: object expected"); + message.exampleGcsSource = $root.google.cloud.aiplatform.v1.Examples.ExampleGcsSource.fromObject(object.exampleGcsSource); + } + if (object.nearestNeighborSearchConfig != null) { + if (typeof object.nearestNeighborSearchConfig !== "object") + throw TypeError(".google.cloud.aiplatform.v1.Examples.nearestNeighborSearchConfig: object expected"); + message.nearestNeighborSearchConfig = $root.google.protobuf.Value.fromObject(object.nearestNeighborSearchConfig); + } + if (object.presets != null) { + if (typeof object.presets !== "object") + throw TypeError(".google.cloud.aiplatform.v1.Examples.presets: object expected"); + message.presets = $root.google.cloud.aiplatform.v1.Presets.fromObject(object.presets); + } + if (object.neighborCount != null) + message.neighborCount = object.neighborCount | 0; + return message; + }; + + /** + * Creates a plain object from an Examples message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.Examples + * @static + * @param {google.cloud.aiplatform.v1.Examples} message Examples + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Examples.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.neighborCount = 0; + if (message.nearestNeighborSearchConfig != null && message.hasOwnProperty("nearestNeighborSearchConfig")) { + object.nearestNeighborSearchConfig = $root.google.protobuf.Value.toObject(message.nearestNeighborSearchConfig, options); + if (options.oneofs) + object.config = "nearestNeighborSearchConfig"; + } + if (message.neighborCount != null && message.hasOwnProperty("neighborCount")) + object.neighborCount = message.neighborCount; + if (message.presets != null && message.hasOwnProperty("presets")) { + object.presets = $root.google.cloud.aiplatform.v1.Presets.toObject(message.presets, options); + if (options.oneofs) + object.config = "presets"; + } + if (message.exampleGcsSource != null && message.hasOwnProperty("exampleGcsSource")) { + object.exampleGcsSource = $root.google.cloud.aiplatform.v1.Examples.ExampleGcsSource.toObject(message.exampleGcsSource, options); + if (options.oneofs) + object.source = "exampleGcsSource"; + } + return object; + }; + + /** + * Converts this Examples to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.Examples + * @instance + * @returns {Object.} JSON object + */ + Examples.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Examples + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.Examples + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Examples.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.Examples"; + }; + + Examples.ExampleGcsSource = (function() { + + /** + * Properties of an ExampleGcsSource. + * @memberof google.cloud.aiplatform.v1.Examples + * @interface IExampleGcsSource + * @property {google.cloud.aiplatform.v1.Examples.ExampleGcsSource.DataFormat|null} [dataFormat] ExampleGcsSource dataFormat + * @property {google.cloud.aiplatform.v1.IGcsSource|null} [gcsSource] ExampleGcsSource gcsSource + */ + + /** + * Constructs a new ExampleGcsSource. + * @memberof google.cloud.aiplatform.v1.Examples + * @classdesc Represents an ExampleGcsSource. + * @implements IExampleGcsSource + * @constructor + * @param {google.cloud.aiplatform.v1.Examples.IExampleGcsSource=} [properties] Properties to set + */ + function ExampleGcsSource(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]]; + } + + /** + * ExampleGcsSource dataFormat. + * @member {google.cloud.aiplatform.v1.Examples.ExampleGcsSource.DataFormat} dataFormat + * @memberof google.cloud.aiplatform.v1.Examples.ExampleGcsSource + * @instance + */ + ExampleGcsSource.prototype.dataFormat = 0; + + /** + * ExampleGcsSource gcsSource. + * @member {google.cloud.aiplatform.v1.IGcsSource|null|undefined} gcsSource + * @memberof google.cloud.aiplatform.v1.Examples.ExampleGcsSource + * @instance + */ + ExampleGcsSource.prototype.gcsSource = null; + + /** + * Creates a new ExampleGcsSource instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.Examples.ExampleGcsSource + * @static + * @param {google.cloud.aiplatform.v1.Examples.IExampleGcsSource=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.Examples.ExampleGcsSource} ExampleGcsSource instance + */ + ExampleGcsSource.create = function create(properties) { + return new ExampleGcsSource(properties); + }; + + /** + * Encodes the specified ExampleGcsSource message. Does not implicitly {@link google.cloud.aiplatform.v1.Examples.ExampleGcsSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.Examples.ExampleGcsSource + * @static + * @param {google.cloud.aiplatform.v1.Examples.IExampleGcsSource} message ExampleGcsSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExampleGcsSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataFormat != null && Object.hasOwnProperty.call(message, "dataFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.dataFormat); + if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) + $root.google.cloud.aiplatform.v1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExampleGcsSource message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.Examples.ExampleGcsSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.Examples.ExampleGcsSource + * @static + * @param {google.cloud.aiplatform.v1.Examples.IExampleGcsSource} message ExampleGcsSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExampleGcsSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExampleGcsSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.Examples.ExampleGcsSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.Examples.ExampleGcsSource} ExampleGcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExampleGcsSource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.Examples.ExampleGcsSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dataFormat = reader.int32(); + break; + } + case 2: { + message.gcsSource = $root.google.cloud.aiplatform.v1.GcsSource.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExampleGcsSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.Examples.ExampleGcsSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.Examples.ExampleGcsSource} ExampleGcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExampleGcsSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExampleGcsSource message. + * @function verify + * @memberof google.cloud.aiplatform.v1.Examples.ExampleGcsSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExampleGcsSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataFormat != null && message.hasOwnProperty("dataFormat")) + switch (message.dataFormat) { + default: + return "dataFormat: enum value expected"; + case 0: + case 1: + break; + } + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + var error = $root.google.cloud.aiplatform.v1.GcsSource.verify(message.gcsSource); + if (error) + return "gcsSource." + error; + } + return null; + }; + + /** + * Creates an ExampleGcsSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.Examples.ExampleGcsSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.Examples.ExampleGcsSource} ExampleGcsSource + */ + ExampleGcsSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.Examples.ExampleGcsSource) + return object; + var message = new $root.google.cloud.aiplatform.v1.Examples.ExampleGcsSource(); + switch (object.dataFormat) { + default: + if (typeof object.dataFormat === "number") { + message.dataFormat = object.dataFormat; + break; + } + break; + case "DATA_FORMAT_UNSPECIFIED": + case 0: + message.dataFormat = 0; + break; + case "JSONL": + case 1: + message.dataFormat = 1; + break; + } + if (object.gcsSource != null) { + if (typeof object.gcsSource !== "object") + throw TypeError(".google.cloud.aiplatform.v1.Examples.ExampleGcsSource.gcsSource: object expected"); + message.gcsSource = $root.google.cloud.aiplatform.v1.GcsSource.fromObject(object.gcsSource); + } + return message; + }; + + /** + * Creates a plain object from an ExampleGcsSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.Examples.ExampleGcsSource + * @static + * @param {google.cloud.aiplatform.v1.Examples.ExampleGcsSource} message ExampleGcsSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExampleGcsSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dataFormat = options.enums === String ? "DATA_FORMAT_UNSPECIFIED" : 0; + object.gcsSource = null; + } + if (message.dataFormat != null && message.hasOwnProperty("dataFormat")) + object.dataFormat = options.enums === String ? $root.google.cloud.aiplatform.v1.Examples.ExampleGcsSource.DataFormat[message.dataFormat] === undefined ? message.dataFormat : $root.google.cloud.aiplatform.v1.Examples.ExampleGcsSource.DataFormat[message.dataFormat] : message.dataFormat; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) + object.gcsSource = $root.google.cloud.aiplatform.v1.GcsSource.toObject(message.gcsSource, options); + return object; + }; + + /** + * Converts this ExampleGcsSource to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.Examples.ExampleGcsSource + * @instance + * @returns {Object.} JSON object + */ + ExampleGcsSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExampleGcsSource + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.Examples.ExampleGcsSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExampleGcsSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.Examples.ExampleGcsSource"; + }; + + /** + * DataFormat enum. + * @name google.cloud.aiplatform.v1.Examples.ExampleGcsSource.DataFormat + * @enum {number} + * @property {number} DATA_FORMAT_UNSPECIFIED=0 DATA_FORMAT_UNSPECIFIED value + * @property {number} JSONL=1 JSONL value + */ + ExampleGcsSource.DataFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATA_FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "JSONL"] = 1; + return values; + })(); + + return ExampleGcsSource; + })(); + + return Examples; + })(); + + v1.Presets = (function() { + + /** + * Properties of a Presets. + * @memberof google.cloud.aiplatform.v1 + * @interface IPresets + * @property {google.cloud.aiplatform.v1.Presets.Query|null} [query] Presets query + * @property {google.cloud.aiplatform.v1.Presets.Modality|null} [modality] Presets modality + */ + + /** + * Constructs a new Presets. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a Presets. + * @implements IPresets + * @constructor + * @param {google.cloud.aiplatform.v1.IPresets=} [properties] Properties to set + */ + function Presets(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]]; + } + + /** + * Presets query. + * @member {google.cloud.aiplatform.v1.Presets.Query|null|undefined} query + * @memberof google.cloud.aiplatform.v1.Presets + * @instance + */ + Presets.prototype.query = null; + + /** + * Presets modality. + * @member {google.cloud.aiplatform.v1.Presets.Modality} modality + * @memberof google.cloud.aiplatform.v1.Presets + * @instance + */ + Presets.prototype.modality = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Presets _query. + * @member {"query"|undefined} _query + * @memberof google.cloud.aiplatform.v1.Presets + * @instance + */ + Object.defineProperty(Presets.prototype, "_query", { + get: $util.oneOfGetter($oneOfFields = ["query"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Presets instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.Presets + * @static + * @param {google.cloud.aiplatform.v1.IPresets=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.Presets} Presets instance + */ + Presets.create = function create(properties) { + return new Presets(properties); + }; + + /** + * Encodes the specified Presets message. Does not implicitly {@link google.cloud.aiplatform.v1.Presets.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.Presets + * @static + * @param {google.cloud.aiplatform.v1.IPresets} message Presets message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Presets.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.query); + if (message.modality != null && Object.hasOwnProperty.call(message, "modality")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.modality); + return writer; + }; + + /** + * Encodes the specified Presets message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.Presets.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.Presets + * @static + * @param {google.cloud.aiplatform.v1.IPresets} message Presets message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Presets.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Presets message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.Presets + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.Presets} Presets + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Presets.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.Presets(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.query = reader.int32(); + break; + } + case 2: { + message.modality = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Presets message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.Presets + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.Presets} Presets + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Presets.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Presets message. + * @function verify + * @memberof google.cloud.aiplatform.v1.Presets + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Presets.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.query != null && message.hasOwnProperty("query")) { + properties._query = 1; + switch (message.query) { + default: + return "query: enum value expected"; + case 0: + case 1: + break; + } + } + if (message.modality != null && message.hasOwnProperty("modality")) + switch (message.modality) { + default: + return "modality: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a Presets message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.Presets + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.Presets} Presets + */ + Presets.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.Presets) + return object; + var message = new $root.google.cloud.aiplatform.v1.Presets(); + switch (object.query) { + default: + if (typeof object.query === "number") { + message.query = object.query; + break; + } + break; + case "PRECISE": + case 0: + message.query = 0; + break; + case "FAST": + case 1: + message.query = 1; + break; + } + switch (object.modality) { + default: + if (typeof object.modality === "number") { + message.modality = object.modality; + break; + } + break; + case "MODALITY_UNSPECIFIED": + case 0: + message.modality = 0; + break; + case "IMAGE": + case 1: + message.modality = 1; + break; + case "TEXT": + case 2: + message.modality = 2; + break; + case "TABULAR": + case 3: + message.modality = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a Presets message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.Presets + * @static + * @param {google.cloud.aiplatform.v1.Presets} message Presets + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Presets.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.modality = options.enums === String ? "MODALITY_UNSPECIFIED" : 0; + if (message.query != null && message.hasOwnProperty("query")) { + object.query = options.enums === String ? $root.google.cloud.aiplatform.v1.Presets.Query[message.query] === undefined ? message.query : $root.google.cloud.aiplatform.v1.Presets.Query[message.query] : message.query; + if (options.oneofs) + object._query = "query"; + } + if (message.modality != null && message.hasOwnProperty("modality")) + object.modality = options.enums === String ? $root.google.cloud.aiplatform.v1.Presets.Modality[message.modality] === undefined ? message.modality : $root.google.cloud.aiplatform.v1.Presets.Modality[message.modality] : message.modality; + return object; + }; + + /** + * Converts this Presets to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.Presets + * @instance + * @returns {Object.} JSON object + */ + Presets.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Presets + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.Presets + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Presets.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.Presets"; + }; + + /** + * Query enum. + * @name google.cloud.aiplatform.v1.Presets.Query + * @enum {number} + * @property {number} PRECISE=0 PRECISE value + * @property {number} FAST=1 FAST value + */ + Presets.Query = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PRECISE"] = 0; + values[valuesById[1] = "FAST"] = 1; + return values; + })(); + + /** + * Modality enum. + * @name google.cloud.aiplatform.v1.Presets.Modality + * @enum {number} + * @property {number} MODALITY_UNSPECIFIED=0 MODALITY_UNSPECIFIED value + * @property {number} IMAGE=1 IMAGE value + * @property {number} TEXT=2 TEXT value + * @property {number} TABULAR=3 TABULAR value + */ + Presets.Modality = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODALITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "IMAGE"] = 1; + values[valuesById[2] = "TEXT"] = 2; + values[valuesById[3] = "TABULAR"] = 3; + return values; + })(); + + return Presets; + })(); + v1.ExplanationSpecOverride = (function() { /** @@ -13154,6 +14111,7 @@ case 4: case 5: case 8: + case 11: case 6: case 7: case 10: @@ -13214,6 +14172,10 @@ case 8: message.acceleratorType = 8; break; + case "NVIDIA_L4": + case 11: + message.acceleratorType = 11; + break; case "TPU_V2": case 6: message.acceleratorType = 6; @@ -18039,6 +19001,7 @@ case 2: case 3: case 4: + case 5: break; } if (message.copy != null && message.hasOwnProperty("copy")) @@ -18086,6 +19049,10 @@ case 4: message.sourceType = 4; break; + case "GENIE": + case 5: + message.sourceType = 5; + break; } if (object.copy != null) message.copy = Boolean(object.copy); @@ -18151,6 +19118,7 @@ * @property {number} CUSTOM=2 CUSTOM value * @property {number} BQML=3 BQML value * @property {number} MODEL_GARDEN=4 MODEL_GARDEN value + * @property {number} GENIE=5 GENIE value */ ModelSourceInfo.ModelSourceType = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -18159,6 +19127,7 @@ values[valuesById[2] = "CUSTOM"] = 2; values[valuesById[3] = "BQML"] = 3; values[valuesById[4] = "MODEL_GARDEN"] = 4; + values[valuesById[5] = "GENIE"] = 5; return values; })(); @@ -19763,6 +20732,8 @@ * @property {string|null} [tensorboard] CustomJobSpec tensorboard * @property {boolean|null} [enableWebAccess] CustomJobSpec enableWebAccess * @property {boolean|null} [enableDashboardAccess] CustomJobSpec enableDashboardAccess + * @property {string|null} [experiment] CustomJobSpec experiment + * @property {string|null} [experimentRun] CustomJobSpec experimentRun */ /** @@ -19854,6 +20825,22 @@ */ CustomJobSpec.prototype.enableDashboardAccess = false; + /** + * CustomJobSpec experiment. + * @member {string} experiment + * @memberof google.cloud.aiplatform.v1.CustomJobSpec + * @instance + */ + CustomJobSpec.prototype.experiment = ""; + + /** + * CustomJobSpec experimentRun. + * @member {string} experimentRun + * @memberof google.cloud.aiplatform.v1.CustomJobSpec + * @instance + */ + CustomJobSpec.prototype.experimentRun = ""; + /** * Creates a new CustomJobSpec instance using the specified properties. * @function create @@ -19898,6 +20885,10 @@ writer.uint32(/* id 13, wireType 2 =*/106).string(message.reservedIpRanges[i]); if (message.enableDashboardAccess != null && Object.hasOwnProperty.call(message, "enableDashboardAccess")) writer.uint32(/* id 16, wireType 0 =*/128).bool(message.enableDashboardAccess); + if (message.experiment != null && Object.hasOwnProperty.call(message, "experiment")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.experiment); + if (message.experimentRun != null && Object.hasOwnProperty.call(message, "experimentRun")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.experimentRun); return writer; }; @@ -19972,6 +20963,14 @@ message.enableDashboardAccess = reader.bool(); break; } + case 17: { + message.experiment = reader.string(); + break; + } + case 18: { + message.experimentRun = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -20048,6 +21047,12 @@ if (message.enableDashboardAccess != null && message.hasOwnProperty("enableDashboardAccess")) if (typeof message.enableDashboardAccess !== "boolean") return "enableDashboardAccess: boolean expected"; + if (message.experiment != null && message.hasOwnProperty("experiment")) + if (!$util.isString(message.experiment)) + return "experiment: string expected"; + if (message.experimentRun != null && message.hasOwnProperty("experimentRun")) + if (!$util.isString(message.experimentRun)) + return "experimentRun: string expected"; return null; }; @@ -20100,6 +21105,10 @@ message.enableWebAccess = Boolean(object.enableWebAccess); if (object.enableDashboardAccess != null) message.enableDashboardAccess = Boolean(object.enableDashboardAccess); + if (object.experiment != null) + message.experiment = String(object.experiment); + if (object.experimentRun != null) + message.experimentRun = String(object.experimentRun); return message; }; @@ -20128,6 +21137,8 @@ object.tensorboard = ""; object.enableWebAccess = false; object.enableDashboardAccess = false; + object.experiment = ""; + object.experimentRun = ""; } if (message.workerPoolSpecs && message.workerPoolSpecs.length) { object.workerPoolSpecs = []; @@ -20153,6 +21164,10 @@ } if (message.enableDashboardAccess != null && message.hasOwnProperty("enableDashboardAccess")) object.enableDashboardAccess = message.enableDashboardAccess; + if (message.experiment != null && message.hasOwnProperty("experiment")) + object.experiment = message.experiment; + if (message.experimentRun != null && message.hasOwnProperty("experimentRun")) + object.experimentRun = message.experimentRun; return object; }; @@ -34686,6 +35701,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.aiplatform.v1.EndpointService|mutateDeployedModel}. + * @memberof google.cloud.aiplatform.v1.EndpointService + * @typedef MutateDeployedModelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls MutateDeployedModel. + * @function mutateDeployedModel + * @memberof google.cloud.aiplatform.v1.EndpointService + * @instance + * @param {google.cloud.aiplatform.v1.IMutateDeployedModelRequest} request MutateDeployedModelRequest message or plain object + * @param {google.cloud.aiplatform.v1.EndpointService.MutateDeployedModelCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(EndpointService.prototype.mutateDeployedModel = function mutateDeployedModel(request, callback) { + return this.rpcCall(mutateDeployedModel, $root.google.cloud.aiplatform.v1.MutateDeployedModelRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "MutateDeployedModel" }); + + /** + * Calls MutateDeployedModel. + * @function mutateDeployedModel + * @memberof google.cloud.aiplatform.v1.EndpointService + * @instance + * @param {google.cloud.aiplatform.v1.IMutateDeployedModelRequest} request MutateDeployedModelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return EndpointService; })(); @@ -37743,6 +38791,682 @@ return UndeployModelOperationMetadata; })(); + v1.MutateDeployedModelRequest = (function() { + + /** + * Properties of a MutateDeployedModelRequest. + * @memberof google.cloud.aiplatform.v1 + * @interface IMutateDeployedModelRequest + * @property {string|null} [endpoint] MutateDeployedModelRequest endpoint + * @property {google.cloud.aiplatform.v1.IDeployedModel|null} [deployedModel] MutateDeployedModelRequest deployedModel + * @property {google.protobuf.IFieldMask|null} [updateMask] MutateDeployedModelRequest updateMask + */ + + /** + * Constructs a new MutateDeployedModelRequest. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a MutateDeployedModelRequest. + * @implements IMutateDeployedModelRequest + * @constructor + * @param {google.cloud.aiplatform.v1.IMutateDeployedModelRequest=} [properties] Properties to set + */ + function MutateDeployedModelRequest(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]]; + } + + /** + * MutateDeployedModelRequest endpoint. + * @member {string} endpoint + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelRequest + * @instance + */ + MutateDeployedModelRequest.prototype.endpoint = ""; + + /** + * MutateDeployedModelRequest deployedModel. + * @member {google.cloud.aiplatform.v1.IDeployedModel|null|undefined} deployedModel + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelRequest + * @instance + */ + MutateDeployedModelRequest.prototype.deployedModel = null; + + /** + * MutateDeployedModelRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelRequest + * @instance + */ + MutateDeployedModelRequest.prototype.updateMask = null; + + /** + * Creates a new MutateDeployedModelRequest instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelRequest + * @static + * @param {google.cloud.aiplatform.v1.IMutateDeployedModelRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.MutateDeployedModelRequest} MutateDeployedModelRequest instance + */ + MutateDeployedModelRequest.create = function create(properties) { + return new MutateDeployedModelRequest(properties); + }; + + /** + * Encodes the specified MutateDeployedModelRequest message. Does not implicitly {@link google.cloud.aiplatform.v1.MutateDeployedModelRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelRequest + * @static + * @param {google.cloud.aiplatform.v1.IMutateDeployedModelRequest} message MutateDeployedModelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MutateDeployedModelRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.endpoint); + if (message.deployedModel != null && Object.hasOwnProperty.call(message, "deployedModel")) + $root.google.cloud.aiplatform.v1.DeployedModel.encode(message.deployedModel, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MutateDeployedModelRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MutateDeployedModelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelRequest + * @static + * @param {google.cloud.aiplatform.v1.IMutateDeployedModelRequest} message MutateDeployedModelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MutateDeployedModelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MutateDeployedModelRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.MutateDeployedModelRequest} MutateDeployedModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MutateDeployedModelRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.MutateDeployedModelRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.endpoint = reader.string(); + break; + } + case 2: { + message.deployedModel = $root.google.cloud.aiplatform.v1.DeployedModel.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MutateDeployedModelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.MutateDeployedModelRequest} MutateDeployedModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MutateDeployedModelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MutateDeployedModelRequest message. + * @function verify + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MutateDeployedModelRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.endpoint != null && message.hasOwnProperty("endpoint")) + if (!$util.isString(message.endpoint)) + return "endpoint: string expected"; + if (message.deployedModel != null && message.hasOwnProperty("deployedModel")) { + var error = $root.google.cloud.aiplatform.v1.DeployedModel.verify(message.deployedModel); + if (error) + return "deployedModel." + 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 a MutateDeployedModelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.MutateDeployedModelRequest} MutateDeployedModelRequest + */ + MutateDeployedModelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.MutateDeployedModelRequest) + return object; + var message = new $root.google.cloud.aiplatform.v1.MutateDeployedModelRequest(); + if (object.endpoint != null) + message.endpoint = String(object.endpoint); + if (object.deployedModel != null) { + if (typeof object.deployedModel !== "object") + throw TypeError(".google.cloud.aiplatform.v1.MutateDeployedModelRequest.deployedModel: object expected"); + message.deployedModel = $root.google.cloud.aiplatform.v1.DeployedModel.fromObject(object.deployedModel); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.aiplatform.v1.MutateDeployedModelRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from a MutateDeployedModelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelRequest + * @static + * @param {google.cloud.aiplatform.v1.MutateDeployedModelRequest} message MutateDeployedModelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MutateDeployedModelRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.endpoint = ""; + object.deployedModel = null; + object.updateMask = null; + } + if (message.endpoint != null && message.hasOwnProperty("endpoint")) + object.endpoint = message.endpoint; + if (message.deployedModel != null && message.hasOwnProperty("deployedModel")) + object.deployedModel = $root.google.cloud.aiplatform.v1.DeployedModel.toObject(message.deployedModel, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this MutateDeployedModelRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelRequest + * @instance + * @returns {Object.} JSON object + */ + MutateDeployedModelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MutateDeployedModelRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MutateDeployedModelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.MutateDeployedModelRequest"; + }; + + return MutateDeployedModelRequest; + })(); + + v1.MutateDeployedModelResponse = (function() { + + /** + * Properties of a MutateDeployedModelResponse. + * @memberof google.cloud.aiplatform.v1 + * @interface IMutateDeployedModelResponse + * @property {google.cloud.aiplatform.v1.IDeployedModel|null} [deployedModel] MutateDeployedModelResponse deployedModel + */ + + /** + * Constructs a new MutateDeployedModelResponse. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a MutateDeployedModelResponse. + * @implements IMutateDeployedModelResponse + * @constructor + * @param {google.cloud.aiplatform.v1.IMutateDeployedModelResponse=} [properties] Properties to set + */ + function MutateDeployedModelResponse(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]]; + } + + /** + * MutateDeployedModelResponse deployedModel. + * @member {google.cloud.aiplatform.v1.IDeployedModel|null|undefined} deployedModel + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelResponse + * @instance + */ + MutateDeployedModelResponse.prototype.deployedModel = null; + + /** + * Creates a new MutateDeployedModelResponse instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelResponse + * @static + * @param {google.cloud.aiplatform.v1.IMutateDeployedModelResponse=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.MutateDeployedModelResponse} MutateDeployedModelResponse instance + */ + MutateDeployedModelResponse.create = function create(properties) { + return new MutateDeployedModelResponse(properties); + }; + + /** + * Encodes the specified MutateDeployedModelResponse message. Does not implicitly {@link google.cloud.aiplatform.v1.MutateDeployedModelResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelResponse + * @static + * @param {google.cloud.aiplatform.v1.IMutateDeployedModelResponse} message MutateDeployedModelResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MutateDeployedModelResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deployedModel != null && Object.hasOwnProperty.call(message, "deployedModel")) + $root.google.cloud.aiplatform.v1.DeployedModel.encode(message.deployedModel, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MutateDeployedModelResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MutateDeployedModelResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelResponse + * @static + * @param {google.cloud.aiplatform.v1.IMutateDeployedModelResponse} message MutateDeployedModelResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MutateDeployedModelResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MutateDeployedModelResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.MutateDeployedModelResponse} MutateDeployedModelResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MutateDeployedModelResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.MutateDeployedModelResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.deployedModel = $root.google.cloud.aiplatform.v1.DeployedModel.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MutateDeployedModelResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.MutateDeployedModelResponse} MutateDeployedModelResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MutateDeployedModelResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MutateDeployedModelResponse message. + * @function verify + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MutateDeployedModelResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deployedModel != null && message.hasOwnProperty("deployedModel")) { + var error = $root.google.cloud.aiplatform.v1.DeployedModel.verify(message.deployedModel); + if (error) + return "deployedModel." + error; + } + return null; + }; + + /** + * Creates a MutateDeployedModelResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.MutateDeployedModelResponse} MutateDeployedModelResponse + */ + MutateDeployedModelResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.MutateDeployedModelResponse) + return object; + var message = new $root.google.cloud.aiplatform.v1.MutateDeployedModelResponse(); + if (object.deployedModel != null) { + if (typeof object.deployedModel !== "object") + throw TypeError(".google.cloud.aiplatform.v1.MutateDeployedModelResponse.deployedModel: object expected"); + message.deployedModel = $root.google.cloud.aiplatform.v1.DeployedModel.fromObject(object.deployedModel); + } + return message; + }; + + /** + * Creates a plain object from a MutateDeployedModelResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelResponse + * @static + * @param {google.cloud.aiplatform.v1.MutateDeployedModelResponse} message MutateDeployedModelResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MutateDeployedModelResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.deployedModel = null; + if (message.deployedModel != null && message.hasOwnProperty("deployedModel")) + object.deployedModel = $root.google.cloud.aiplatform.v1.DeployedModel.toObject(message.deployedModel, options); + return object; + }; + + /** + * Converts this MutateDeployedModelResponse to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelResponse + * @instance + * @returns {Object.} JSON object + */ + MutateDeployedModelResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MutateDeployedModelResponse + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MutateDeployedModelResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.MutateDeployedModelResponse"; + }; + + return MutateDeployedModelResponse; + })(); + + v1.MutateDeployedModelOperationMetadata = (function() { + + /** + * Properties of a MutateDeployedModelOperationMetadata. + * @memberof google.cloud.aiplatform.v1 + * @interface IMutateDeployedModelOperationMetadata + * @property {google.cloud.aiplatform.v1.IGenericOperationMetadata|null} [genericMetadata] MutateDeployedModelOperationMetadata genericMetadata + */ + + /** + * Constructs a new MutateDeployedModelOperationMetadata. + * @memberof google.cloud.aiplatform.v1 + * @classdesc Represents a MutateDeployedModelOperationMetadata. + * @implements IMutateDeployedModelOperationMetadata + * @constructor + * @param {google.cloud.aiplatform.v1.IMutateDeployedModelOperationMetadata=} [properties] Properties to set + */ + function MutateDeployedModelOperationMetadata(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]]; + } + + /** + * MutateDeployedModelOperationMetadata genericMetadata. + * @member {google.cloud.aiplatform.v1.IGenericOperationMetadata|null|undefined} genericMetadata + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelOperationMetadata + * @instance + */ + MutateDeployedModelOperationMetadata.prototype.genericMetadata = null; + + /** + * Creates a new MutateDeployedModelOperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelOperationMetadata + * @static + * @param {google.cloud.aiplatform.v1.IMutateDeployedModelOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.MutateDeployedModelOperationMetadata} MutateDeployedModelOperationMetadata instance + */ + MutateDeployedModelOperationMetadata.create = function create(properties) { + return new MutateDeployedModelOperationMetadata(properties); + }; + + /** + * Encodes the specified MutateDeployedModelOperationMetadata message. Does not implicitly {@link google.cloud.aiplatform.v1.MutateDeployedModelOperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelOperationMetadata + * @static + * @param {google.cloud.aiplatform.v1.IMutateDeployedModelOperationMetadata} message MutateDeployedModelOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MutateDeployedModelOperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.genericMetadata != null && Object.hasOwnProperty.call(message, "genericMetadata")) + $root.google.cloud.aiplatform.v1.GenericOperationMetadata.encode(message.genericMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MutateDeployedModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.MutateDeployedModelOperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelOperationMetadata + * @static + * @param {google.cloud.aiplatform.v1.IMutateDeployedModelOperationMetadata} message MutateDeployedModelOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MutateDeployedModelOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MutateDeployedModelOperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.MutateDeployedModelOperationMetadata} MutateDeployedModelOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MutateDeployedModelOperationMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1.MutateDeployedModelOperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.genericMetadata = $root.google.cloud.aiplatform.v1.GenericOperationMetadata.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MutateDeployedModelOperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.MutateDeployedModelOperationMetadata} MutateDeployedModelOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MutateDeployedModelOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MutateDeployedModelOperationMetadata message. + * @function verify + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelOperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MutateDeployedModelOperationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.genericMetadata != null && message.hasOwnProperty("genericMetadata")) { + var error = $root.google.cloud.aiplatform.v1.GenericOperationMetadata.verify(message.genericMetadata); + if (error) + return "genericMetadata." + error; + } + return null; + }; + + /** + * Creates a MutateDeployedModelOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelOperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.MutateDeployedModelOperationMetadata} MutateDeployedModelOperationMetadata + */ + MutateDeployedModelOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.MutateDeployedModelOperationMetadata) + return object; + var message = new $root.google.cloud.aiplatform.v1.MutateDeployedModelOperationMetadata(); + if (object.genericMetadata != null) { + if (typeof object.genericMetadata !== "object") + throw TypeError(".google.cloud.aiplatform.v1.MutateDeployedModelOperationMetadata.genericMetadata: object expected"); + message.genericMetadata = $root.google.cloud.aiplatform.v1.GenericOperationMetadata.fromObject(object.genericMetadata); + } + return message; + }; + + /** + * Creates a plain object from a MutateDeployedModelOperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelOperationMetadata + * @static + * @param {google.cloud.aiplatform.v1.MutateDeployedModelOperationMetadata} message MutateDeployedModelOperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MutateDeployedModelOperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.genericMetadata = null; + if (message.genericMetadata != null && message.hasOwnProperty("genericMetadata")) + object.genericMetadata = $root.google.cloud.aiplatform.v1.GenericOperationMetadata.toObject(message.genericMetadata, options); + return object; + }; + + /** + * Converts this MutateDeployedModelOperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelOperationMetadata + * @instance + * @returns {Object.} JSON object + */ + MutateDeployedModelOperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MutateDeployedModelOperationMetadata + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.MutateDeployedModelOperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MutateDeployedModelOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.MutateDeployedModelOperationMetadata"; + }; + + return MutateDeployedModelOperationMetadata; + })(); + v1.EntityType = (function() { /** @@ -37756,6 +39480,7 @@ * @property {Object.|null} [labels] EntityType labels * @property {string|null} [etag] EntityType etag * @property {google.cloud.aiplatform.v1.IFeaturestoreMonitoringConfig|null} [monitoringConfig] EntityType monitoringConfig + * @property {number|null} [offlineStorageTtlDays] EntityType offlineStorageTtlDays */ /** @@ -37830,6 +39555,14 @@ */ EntityType.prototype.monitoringConfig = null; + /** + * EntityType offlineStorageTtlDays. + * @member {number} offlineStorageTtlDays + * @memberof google.cloud.aiplatform.v1.EntityType + * @instance + */ + EntityType.prototype.offlineStorageTtlDays = 0; + /** * Creates a new EntityType instance using the specified properties. * @function create @@ -37869,6 +39602,8 @@ writer.uint32(/* id 7, wireType 2 =*/58).string(message.etag); if (message.monitoringConfig != null && Object.hasOwnProperty.call(message, "monitoringConfig")) $root.google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.encode(message.monitoringConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.offlineStorageTtlDays != null && Object.hasOwnProperty.call(message, "offlineStorageTtlDays")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.offlineStorageTtlDays); return writer; }; @@ -37950,6 +39685,10 @@ message.monitoringConfig = $root.google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.decode(reader, reader.uint32()); break; } + case 10: { + message.offlineStorageTtlDays = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -38017,6 +39756,9 @@ if (error) return "monitoringConfig." + error; } + if (message.offlineStorageTtlDays != null && message.hasOwnProperty("offlineStorageTtlDays")) + if (!$util.isInteger(message.offlineStorageTtlDays)) + return "offlineStorageTtlDays: integer expected"; return null; }; @@ -38060,6 +39802,8 @@ throw TypeError(".google.cloud.aiplatform.v1.EntityType.monitoringConfig: object expected"); message.monitoringConfig = $root.google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.fromObject(object.monitoringConfig); } + if (object.offlineStorageTtlDays != null) + message.offlineStorageTtlDays = object.offlineStorageTtlDays | 0; return message; }; @@ -38085,6 +39829,7 @@ object.updateTime = null; object.etag = ""; object.monitoringConfig = null; + object.offlineStorageTtlDays = 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -38104,6 +39849,8 @@ object.etag = message.etag; if (message.monitoringConfig != null && message.hasOwnProperty("monitoringConfig")) object.monitoringConfig = $root.google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.toObject(message.monitoringConfig, options); + if (message.offlineStorageTtlDays != null && message.hasOwnProperty("offlineStorageTtlDays")) + object.offlineStorageTtlDays = message.offlineStorageTtlDays; return object; }; @@ -43041,6 +44788,7 @@ * @property {Object.|null} [labels] Featurestore labels * @property {google.cloud.aiplatform.v1.Featurestore.IOnlineServingConfig|null} [onlineServingConfig] Featurestore onlineServingConfig * @property {google.cloud.aiplatform.v1.Featurestore.State|null} [state] Featurestore state + * @property {number|null} [onlineStorageTtlDays] Featurestore onlineStorageTtlDays * @property {google.cloud.aiplatform.v1.IEncryptionSpec|null} [encryptionSpec] Featurestore encryptionSpec */ @@ -43116,6 +44864,14 @@ */ Featurestore.prototype.state = 0; + /** + * Featurestore onlineStorageTtlDays. + * @member {number} onlineStorageTtlDays + * @memberof google.cloud.aiplatform.v1.Featurestore + * @instance + */ + Featurestore.prototype.onlineStorageTtlDays = 0; + /** * Featurestore encryptionSpec. * @member {google.cloud.aiplatform.v1.IEncryptionSpec|null|undefined} encryptionSpec @@ -43165,6 +44921,8 @@ writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); if (message.encryptionSpec != null && Object.hasOwnProperty.call(message, "encryptionSpec")) $root.google.cloud.aiplatform.v1.EncryptionSpec.encode(message.encryptionSpec, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.onlineStorageTtlDays != null && Object.hasOwnProperty.call(message, "onlineStorageTtlDays")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.onlineStorageTtlDays); return writer; }; @@ -43246,6 +45004,10 @@ message.state = reader.int32(); break; } + case 13: { + message.onlineStorageTtlDays = reader.int32(); + break; + } case 10: { message.encryptionSpec = $root.google.cloud.aiplatform.v1.EncryptionSpec.decode(reader, reader.uint32()); break; @@ -43323,6 +45085,9 @@ case 2: break; } + if (message.onlineStorageTtlDays != null && message.hasOwnProperty("onlineStorageTtlDays")) + if (!$util.isInteger(message.onlineStorageTtlDays)) + return "onlineStorageTtlDays: integer expected"; if (message.encryptionSpec != null && message.hasOwnProperty("encryptionSpec")) { var error = $root.google.cloud.aiplatform.v1.EncryptionSpec.verify(message.encryptionSpec); if (error) @@ -43389,6 +45154,8 @@ message.state = 2; break; } + if (object.onlineStorageTtlDays != null) + message.onlineStorageTtlDays = object.onlineStorageTtlDays | 0; if (object.encryptionSpec != null) { if (typeof object.encryptionSpec !== "object") throw TypeError(".google.cloud.aiplatform.v1.Featurestore.encryptionSpec: object expected"); @@ -43420,6 +45187,7 @@ object.onlineServingConfig = null; object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; object.encryptionSpec = null; + object.onlineStorageTtlDays = 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -43441,6 +45209,8 @@ object.state = options.enums === String ? $root.google.cloud.aiplatform.v1.Featurestore.State[message.state] === undefined ? message.state : $root.google.cloud.aiplatform.v1.Featurestore.State[message.state] : message.state; if (message.encryptionSpec != null && message.hasOwnProperty("encryptionSpec")) object.encryptionSpec = $root.google.cloud.aiplatform.v1.EncryptionSpec.toObject(message.encryptionSpec, options); + if (message.onlineStorageTtlDays != null && message.hasOwnProperty("onlineStorageTtlDays")) + object.onlineStorageTtlDays = message.onlineStorageTtlDays; return object; }; @@ -160343,6 +162113,7 @@ * @property {google.protobuf.ITimestamp|null} [updateTime] Tensorboard updateTime * @property {Object.|null} [labels] Tensorboard labels * @property {string|null} [etag] Tensorboard etag + * @property {boolean|null} [isDefault] Tensorboard isDefault */ /** @@ -160441,6 +162212,14 @@ */ Tensorboard.prototype.etag = ""; + /** + * Tensorboard isDefault. + * @member {boolean} isDefault + * @memberof google.cloud.aiplatform.v1.Tensorboard + * @instance + */ + Tensorboard.prototype.isDefault = false; + /** * Creates a new Tensorboard instance using the specified properties. * @function create @@ -160486,6 +162265,8 @@ writer.uint32(/* id 10, wireType 2 =*/82).string(message.blobStoragePathPrefix); if (message.encryptionSpec != null && Object.hasOwnProperty.call(message, "encryptionSpec")) $root.google.cloud.aiplatform.v1.EncryptionSpec.encode(message.encryptionSpec, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.isDefault != null && Object.hasOwnProperty.call(message, "isDefault")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.isDefault); return writer; }; @@ -160579,6 +162360,10 @@ message.etag = reader.string(); break; } + case 12: { + message.isDefault = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -160655,6 +162440,9 @@ if (message.etag != null && message.hasOwnProperty("etag")) if (!$util.isString(message.etag)) return "etag: string expected"; + if (message.isDefault != null && message.hasOwnProperty("isDefault")) + if (typeof message.isDefault !== "boolean") + return "isDefault: boolean expected"; return null; }; @@ -160704,6 +162492,8 @@ } if (object.etag != null) message.etag = String(object.etag); + if (object.isDefault != null) + message.isDefault = Boolean(object.isDefault); return message; }; @@ -160732,6 +162522,7 @@ object.etag = ""; object.blobStoragePathPrefix = ""; object.encryptionSpec = null; + object.isDefault = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -160757,6 +162548,8 @@ object.blobStoragePathPrefix = message.blobStoragePathPrefix; if (message.encryptionSpec != null && message.hasOwnProperty("encryptionSpec")) object.encryptionSpec = $root.google.cloud.aiplatform.v1.EncryptionSpec.toObject(message.encryptionSpec, options); + if (message.isDefault != null && message.hasOwnProperty("isDefault")) + object.isDefault = message.isDefault; return object; }; @@ -181491,6 +183284,7 @@ * @property {number} NVIDIA_TESLA_T4=5 NVIDIA_TESLA_T4 value * @property {number} NVIDIA_TESLA_A100=8 NVIDIA_TESLA_A100 value * @property {number} NVIDIA_A100_80GB=9 NVIDIA_A100_80GB value + * @property {number} NVIDIA_L4=11 NVIDIA_L4 value * @property {number} TPU_V2=6 TPU_V2 value * @property {number} TPU_V3=7 TPU_V3 value * @property {number} TPU_V4_POD=10 TPU_V4_POD value @@ -181505,6 +183299,7 @@ values[valuesById[5] = "NVIDIA_TESLA_T4"] = 5; values[valuesById[8] = "NVIDIA_TESLA_A100"] = 8; values[valuesById[9] = "NVIDIA_A100_80GB"] = 9; + values[valuesById[11] = "NVIDIA_L4"] = 11; values[valuesById[6] = "TPU_V2"] = 6; values[valuesById[7] = "TPU_V3"] = 7; values[valuesById[10] = "TPU_V4_POD"] = 10; @@ -189232,6 +191027,7 @@ * Properties of an Examples. * @memberof google.cloud.aiplatform.v1beta1 * @interface IExamples + * @property {google.cloud.aiplatform.v1beta1.Examples.IExampleGcsSource|null} [exampleGcsSource] Examples exampleGcsSource * @property {google.protobuf.IValue|null} [nearestNeighborSearchConfig] Examples nearestNeighborSearchConfig * @property {google.cloud.aiplatform.v1beta1.IPresets|null} [presets] Examples presets * @property {google.cloud.aiplatform.v1beta1.IGcsSource|null} [gcsSource] Examples gcsSource @@ -189253,6 +191049,14 @@ this[keys[i]] = properties[keys[i]]; } + /** + * Examples exampleGcsSource. + * @member {google.cloud.aiplatform.v1beta1.Examples.IExampleGcsSource|null|undefined} exampleGcsSource + * @memberof google.cloud.aiplatform.v1beta1.Examples + * @instance + */ + Examples.prototype.exampleGcsSource = null; + /** * Examples nearestNeighborSearchConfig. * @member {google.protobuf.IValue|null|undefined} nearestNeighborSearchConfig @@ -189288,6 +191092,17 @@ // OneOf field names bound to virtual getters and setters var $oneOfFields; + /** + * Examples source. + * @member {"exampleGcsSource"|undefined} source + * @memberof google.cloud.aiplatform.v1beta1.Examples + * @instance + */ + Object.defineProperty(Examples.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["exampleGcsSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Examples config. * @member {"nearestNeighborSearchConfig"|"presets"|undefined} config @@ -189331,6 +191146,8 @@ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.neighborCount); if (message.presets != null && Object.hasOwnProperty.call(message, "presets")) $root.google.cloud.aiplatform.v1beta1.Presets.encode(message.presets, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.exampleGcsSource != null && Object.hasOwnProperty.call(message, "exampleGcsSource")) + $root.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.encode(message.exampleGcsSource, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -189365,6 +191182,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 5: { + message.exampleGcsSource = $root.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.decode(reader, reader.uint32()); + break; + } case 2: { message.nearestNeighborSearchConfig = $root.google.protobuf.Value.decode(reader, reader.uint32()); break; @@ -189417,6 +191238,14 @@ if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; + if (message.exampleGcsSource != null && message.hasOwnProperty("exampleGcsSource")) { + properties.source = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.verify(message.exampleGcsSource); + if (error) + return "exampleGcsSource." + error; + } + } if (message.nearestNeighborSearchConfig != null && message.hasOwnProperty("nearestNeighborSearchConfig")) { properties.config = 1; { @@ -189458,6 +191287,11 @@ if (object instanceof $root.google.cloud.aiplatform.v1beta1.Examples) return object; var message = new $root.google.cloud.aiplatform.v1beta1.Examples(); + if (object.exampleGcsSource != null) { + if (typeof object.exampleGcsSource !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.Examples.exampleGcsSource: object expected"); + message.exampleGcsSource = $root.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.fromObject(object.exampleGcsSource); + } if (object.nearestNeighborSearchConfig != null) { if (typeof object.nearestNeighborSearchConfig !== "object") throw TypeError(".google.cloud.aiplatform.v1beta1.Examples.nearestNeighborSearchConfig: object expected"); @@ -189509,6 +191343,11 @@ if (options.oneofs) object.config = "presets"; } + if (message.exampleGcsSource != null && message.hasOwnProperty("exampleGcsSource")) { + object.exampleGcsSource = $root.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.toObject(message.exampleGcsSource, options); + if (options.oneofs) + object.source = "exampleGcsSource"; + } return object; }; @@ -189538,6 +191377,271 @@ return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.Examples"; }; + Examples.ExampleGcsSource = (function() { + + /** + * Properties of an ExampleGcsSource. + * @memberof google.cloud.aiplatform.v1beta1.Examples + * @interface IExampleGcsSource + * @property {google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.DataFormat|null} [dataFormat] ExampleGcsSource dataFormat + * @property {google.cloud.aiplatform.v1beta1.IGcsSource|null} [gcsSource] ExampleGcsSource gcsSource + */ + + /** + * Constructs a new ExampleGcsSource. + * @memberof google.cloud.aiplatform.v1beta1.Examples + * @classdesc Represents an ExampleGcsSource. + * @implements IExampleGcsSource + * @constructor + * @param {google.cloud.aiplatform.v1beta1.Examples.IExampleGcsSource=} [properties] Properties to set + */ + function ExampleGcsSource(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]]; + } + + /** + * ExampleGcsSource dataFormat. + * @member {google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.DataFormat} dataFormat + * @memberof google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource + * @instance + */ + ExampleGcsSource.prototype.dataFormat = 0; + + /** + * ExampleGcsSource gcsSource. + * @member {google.cloud.aiplatform.v1beta1.IGcsSource|null|undefined} gcsSource + * @memberof google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource + * @instance + */ + ExampleGcsSource.prototype.gcsSource = null; + + /** + * Creates a new ExampleGcsSource instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource + * @static + * @param {google.cloud.aiplatform.v1beta1.Examples.IExampleGcsSource=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource} ExampleGcsSource instance + */ + ExampleGcsSource.create = function create(properties) { + return new ExampleGcsSource(properties); + }; + + /** + * Encodes the specified ExampleGcsSource message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource + * @static + * @param {google.cloud.aiplatform.v1beta1.Examples.IExampleGcsSource} message ExampleGcsSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExampleGcsSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataFormat != null && Object.hasOwnProperty.call(message, "dataFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.dataFormat); + if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) + $root.google.cloud.aiplatform.v1beta1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExampleGcsSource message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource + * @static + * @param {google.cloud.aiplatform.v1beta1.Examples.IExampleGcsSource} message ExampleGcsSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExampleGcsSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExampleGcsSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource} ExampleGcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExampleGcsSource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dataFormat = reader.int32(); + break; + } + case 2: { + message.gcsSource = $root.google.cloud.aiplatform.v1beta1.GcsSource.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExampleGcsSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource} ExampleGcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExampleGcsSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExampleGcsSource message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExampleGcsSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataFormat != null && message.hasOwnProperty("dataFormat")) + switch (message.dataFormat) { + default: + return "dataFormat: enum value expected"; + case 0: + case 1: + break; + } + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + var error = $root.google.cloud.aiplatform.v1beta1.GcsSource.verify(message.gcsSource); + if (error) + return "gcsSource." + error; + } + return null; + }; + + /** + * Creates an ExampleGcsSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource} ExampleGcsSource + */ + ExampleGcsSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource(); + switch (object.dataFormat) { + default: + if (typeof object.dataFormat === "number") { + message.dataFormat = object.dataFormat; + break; + } + break; + case "DATA_FORMAT_UNSPECIFIED": + case 0: + message.dataFormat = 0; + break; + case "JSONL": + case 1: + message.dataFormat = 1; + break; + } + if (object.gcsSource != null) { + if (typeof object.gcsSource !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.gcsSource: object expected"); + message.gcsSource = $root.google.cloud.aiplatform.v1beta1.GcsSource.fromObject(object.gcsSource); + } + return message; + }; + + /** + * Creates a plain object from an ExampleGcsSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource + * @static + * @param {google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource} message ExampleGcsSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExampleGcsSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dataFormat = options.enums === String ? "DATA_FORMAT_UNSPECIFIED" : 0; + object.gcsSource = null; + } + if (message.dataFormat != null && message.hasOwnProperty("dataFormat")) + object.dataFormat = options.enums === String ? $root.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.DataFormat[message.dataFormat] === undefined ? message.dataFormat : $root.google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.DataFormat[message.dataFormat] : message.dataFormat; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) + object.gcsSource = $root.google.cloud.aiplatform.v1beta1.GcsSource.toObject(message.gcsSource, options); + return object; + }; + + /** + * Converts this ExampleGcsSource to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource + * @instance + * @returns {Object.} JSON object + */ + ExampleGcsSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExampleGcsSource + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExampleGcsSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource"; + }; + + /** + * DataFormat enum. + * @name google.cloud.aiplatform.v1beta1.Examples.ExampleGcsSource.DataFormat + * @enum {number} + * @property {number} DATA_FORMAT_UNSPECIFIED=0 DATA_FORMAT_UNSPECIFIED value + * @property {number} JSONL=1 JSONL value + */ + ExampleGcsSource.DataFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATA_FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "JSONL"] = 1; + return values; + })(); + + return ExampleGcsSource; + })(); + return Examples; })(); @@ -195346,6 +197450,7 @@ case 5: case 8: case 9: + case 11: case 6: case 7: case 10: @@ -195410,6 +197515,10 @@ case 9: message.acceleratorType = 9; break; + case "NVIDIA_L4": + case 11: + message.acceleratorType = 11; + break; case "TPU_V2": case 6: message.acceleratorType = 6; @@ -205555,6 +207664,209 @@ return Model; })(); + v1beta1.LargeModelReference = (function() { + + /** + * Properties of a LargeModelReference. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface ILargeModelReference + * @property {string|null} [name] LargeModelReference name + */ + + /** + * Constructs a new LargeModelReference. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a LargeModelReference. + * @implements ILargeModelReference + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ILargeModelReference=} [properties] Properties to set + */ + function LargeModelReference(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]]; + } + + /** + * LargeModelReference name. + * @member {string} name + * @memberof google.cloud.aiplatform.v1beta1.LargeModelReference + * @instance + */ + LargeModelReference.prototype.name = ""; + + /** + * Creates a new LargeModelReference instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.LargeModelReference + * @static + * @param {google.cloud.aiplatform.v1beta1.ILargeModelReference=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.LargeModelReference} LargeModelReference instance + */ + LargeModelReference.create = function create(properties) { + return new LargeModelReference(properties); + }; + + /** + * Encodes the specified LargeModelReference message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.LargeModelReference.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.LargeModelReference + * @static + * @param {google.cloud.aiplatform.v1beta1.ILargeModelReference} message LargeModelReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LargeModelReference.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 LargeModelReference message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.LargeModelReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.LargeModelReference + * @static + * @param {google.cloud.aiplatform.v1beta1.ILargeModelReference} message LargeModelReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LargeModelReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LargeModelReference message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.LargeModelReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.LargeModelReference} LargeModelReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LargeModelReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.LargeModelReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LargeModelReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.LargeModelReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.LargeModelReference} LargeModelReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LargeModelReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LargeModelReference message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.LargeModelReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LargeModelReference.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 LargeModelReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.LargeModelReference + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.LargeModelReference} LargeModelReference + */ + LargeModelReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.LargeModelReference) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.LargeModelReference(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a LargeModelReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.LargeModelReference + * @static + * @param {google.cloud.aiplatform.v1beta1.LargeModelReference} message LargeModelReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LargeModelReference.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 LargeModelReference to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.LargeModelReference + * @instance + * @returns {Object.} JSON object + */ + LargeModelReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LargeModelReference + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.LargeModelReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LargeModelReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.LargeModelReference"; + }; + + return LargeModelReference; + })(); + v1beta1.PredictSchemata = (function() { /** @@ -206581,6 +208893,7 @@ case 2: case 3: case 4: + case 5: break; } if (message.copy != null && message.hasOwnProperty("copy")) @@ -206628,6 +208941,10 @@ case 4: message.sourceType = 4; break; + case "GENIE": + case 5: + message.sourceType = 5; + break; } if (object.copy != null) message.copy = Boolean(object.copy); @@ -206693,6 +209010,7 @@ * @property {number} CUSTOM=2 CUSTOM value * @property {number} BQML=3 BQML value * @property {number} MODEL_GARDEN=4 MODEL_GARDEN value + * @property {number} GENIE=5 GENIE value */ ModelSourceInfo.ModelSourceType = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -206701,6 +209019,7 @@ values[valuesById[2] = "CUSTOM"] = 2; values[valuesById[3] = "BQML"] = 3; values[valuesById[4] = "MODEL_GARDEN"] = 4; + values[valuesById[5] = "GENIE"] = 5; return values; })(); @@ -208305,6 +210624,8 @@ * @property {string|null} [tensorboard] CustomJobSpec tensorboard * @property {boolean|null} [enableWebAccess] CustomJobSpec enableWebAccess * @property {boolean|null} [enableDashboardAccess] CustomJobSpec enableDashboardAccess + * @property {string|null} [experiment] CustomJobSpec experiment + * @property {string|null} [experimentRun] CustomJobSpec experimentRun */ /** @@ -208396,6 +210717,22 @@ */ CustomJobSpec.prototype.enableDashboardAccess = false; + /** + * CustomJobSpec experiment. + * @member {string} experiment + * @memberof google.cloud.aiplatform.v1beta1.CustomJobSpec + * @instance + */ + CustomJobSpec.prototype.experiment = ""; + + /** + * CustomJobSpec experimentRun. + * @member {string} experimentRun + * @memberof google.cloud.aiplatform.v1beta1.CustomJobSpec + * @instance + */ + CustomJobSpec.prototype.experimentRun = ""; + /** * Creates a new CustomJobSpec instance using the specified properties. * @function create @@ -208440,6 +210777,10 @@ writer.uint32(/* id 13, wireType 2 =*/106).string(message.reservedIpRanges[i]); if (message.enableDashboardAccess != null && Object.hasOwnProperty.call(message, "enableDashboardAccess")) writer.uint32(/* id 16, wireType 0 =*/128).bool(message.enableDashboardAccess); + if (message.experiment != null && Object.hasOwnProperty.call(message, "experiment")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.experiment); + if (message.experimentRun != null && Object.hasOwnProperty.call(message, "experimentRun")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.experimentRun); return writer; }; @@ -208514,6 +210855,14 @@ message.enableDashboardAccess = reader.bool(); break; } + case 17: { + message.experiment = reader.string(); + break; + } + case 18: { + message.experimentRun = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -208590,6 +210939,12 @@ if (message.enableDashboardAccess != null && message.hasOwnProperty("enableDashboardAccess")) if (typeof message.enableDashboardAccess !== "boolean") return "enableDashboardAccess: boolean expected"; + if (message.experiment != null && message.hasOwnProperty("experiment")) + if (!$util.isString(message.experiment)) + return "experiment: string expected"; + if (message.experimentRun != null && message.hasOwnProperty("experimentRun")) + if (!$util.isString(message.experimentRun)) + return "experimentRun: string expected"; return null; }; @@ -208642,6 +210997,10 @@ message.enableWebAccess = Boolean(object.enableWebAccess); if (object.enableDashboardAccess != null) message.enableDashboardAccess = Boolean(object.enableDashboardAccess); + if (object.experiment != null) + message.experiment = String(object.experiment); + if (object.experimentRun != null) + message.experimentRun = String(object.experimentRun); return message; }; @@ -208670,6 +211029,8 @@ object.tensorboard = ""; object.enableWebAccess = false; object.enableDashboardAccess = false; + object.experiment = ""; + object.experimentRun = ""; } if (message.workerPoolSpecs && message.workerPoolSpecs.length) { object.workerPoolSpecs = []; @@ -208695,6 +211056,10 @@ } if (message.enableDashboardAccess != null && message.hasOwnProperty("enableDashboardAccess")) object.enableDashboardAccess = message.enableDashboardAccess; + if (message.experiment != null && message.hasOwnProperty("experiment")) + object.experiment = message.experiment; + if (message.experimentRun != null && message.hasOwnProperty("experimentRun")) + object.experimentRun = message.experimentRun; return object; }; @@ -225905,6 +228270,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.EndpointService|mutateDeployedModel}. + * @memberof google.cloud.aiplatform.v1beta1.EndpointService + * @typedef MutateDeployedModelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls MutateDeployedModel. + * @function mutateDeployedModel + * @memberof google.cloud.aiplatform.v1beta1.EndpointService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IMutateDeployedModelRequest} request MutateDeployedModelRequest message or plain object + * @param {google.cloud.aiplatform.v1beta1.EndpointService.MutateDeployedModelCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(EndpointService.prototype.mutateDeployedModel = function mutateDeployedModel(request, callback) { + return this.rpcCall(mutateDeployedModel, $root.google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "MutateDeployedModel" }); + + /** + * Calls MutateDeployedModel. + * @function mutateDeployedModel + * @memberof google.cloud.aiplatform.v1beta1.EndpointService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IMutateDeployedModelRequest} request MutateDeployedModelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return EndpointService; })(); @@ -228939,6 +231337,682 @@ return UndeployModelOperationMetadata; })(); + v1beta1.MutateDeployedModelRequest = (function() { + + /** + * Properties of a MutateDeployedModelRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IMutateDeployedModelRequest + * @property {string|null} [endpoint] MutateDeployedModelRequest endpoint + * @property {google.cloud.aiplatform.v1beta1.IDeployedModel|null} [deployedModel] MutateDeployedModelRequest deployedModel + * @property {google.protobuf.IFieldMask|null} [updateMask] MutateDeployedModelRequest updateMask + */ + + /** + * Constructs a new MutateDeployedModelRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a MutateDeployedModelRequest. + * @implements IMutateDeployedModelRequest + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IMutateDeployedModelRequest=} [properties] Properties to set + */ + function MutateDeployedModelRequest(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]]; + } + + /** + * MutateDeployedModelRequest endpoint. + * @member {string} endpoint + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest + * @instance + */ + MutateDeployedModelRequest.prototype.endpoint = ""; + + /** + * MutateDeployedModelRequest deployedModel. + * @member {google.cloud.aiplatform.v1beta1.IDeployedModel|null|undefined} deployedModel + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest + * @instance + */ + MutateDeployedModelRequest.prototype.deployedModel = null; + + /** + * MutateDeployedModelRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest + * @instance + */ + MutateDeployedModelRequest.prototype.updateMask = null; + + /** + * Creates a new MutateDeployedModelRequest instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IMutateDeployedModelRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest} MutateDeployedModelRequest instance + */ + MutateDeployedModelRequest.create = function create(properties) { + return new MutateDeployedModelRequest(properties); + }; + + /** + * Encodes the specified MutateDeployedModelRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IMutateDeployedModelRequest} message MutateDeployedModelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MutateDeployedModelRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.endpoint); + if (message.deployedModel != null && Object.hasOwnProperty.call(message, "deployedModel")) + $root.google.cloud.aiplatform.v1beta1.DeployedModel.encode(message.deployedModel, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MutateDeployedModelRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IMutateDeployedModelRequest} message MutateDeployedModelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MutateDeployedModelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MutateDeployedModelRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest} MutateDeployedModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MutateDeployedModelRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.endpoint = reader.string(); + break; + } + case 2: { + message.deployedModel = $root.google.cloud.aiplatform.v1beta1.DeployedModel.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MutateDeployedModelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest} MutateDeployedModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MutateDeployedModelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MutateDeployedModelRequest message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MutateDeployedModelRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.endpoint != null && message.hasOwnProperty("endpoint")) + if (!$util.isString(message.endpoint)) + return "endpoint: string expected"; + if (message.deployedModel != null && message.hasOwnProperty("deployedModel")) { + var error = $root.google.cloud.aiplatform.v1beta1.DeployedModel.verify(message.deployedModel); + if (error) + return "deployedModel." + 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 a MutateDeployedModelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest} MutateDeployedModelRequest + */ + MutateDeployedModelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest(); + if (object.endpoint != null) + message.endpoint = String(object.endpoint); + if (object.deployedModel != null) { + if (typeof object.deployedModel !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest.deployedModel: object expected"); + message.deployedModel = $root.google.cloud.aiplatform.v1beta1.DeployedModel.fromObject(object.deployedModel); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from a MutateDeployedModelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest} message MutateDeployedModelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MutateDeployedModelRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.endpoint = ""; + object.deployedModel = null; + object.updateMask = null; + } + if (message.endpoint != null && message.hasOwnProperty("endpoint")) + object.endpoint = message.endpoint; + if (message.deployedModel != null && message.hasOwnProperty("deployedModel")) + object.deployedModel = $root.google.cloud.aiplatform.v1beta1.DeployedModel.toObject(message.deployedModel, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this MutateDeployedModelRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest + * @instance + * @returns {Object.} JSON object + */ + MutateDeployedModelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MutateDeployedModelRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MutateDeployedModelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest"; + }; + + return MutateDeployedModelRequest; + })(); + + v1beta1.MutateDeployedModelResponse = (function() { + + /** + * Properties of a MutateDeployedModelResponse. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IMutateDeployedModelResponse + * @property {google.cloud.aiplatform.v1beta1.IDeployedModel|null} [deployedModel] MutateDeployedModelResponse deployedModel + */ + + /** + * Constructs a new MutateDeployedModelResponse. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a MutateDeployedModelResponse. + * @implements IMutateDeployedModelResponse + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IMutateDeployedModelResponse=} [properties] Properties to set + */ + function MutateDeployedModelResponse(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]]; + } + + /** + * MutateDeployedModelResponse deployedModel. + * @member {google.cloud.aiplatform.v1beta1.IDeployedModel|null|undefined} deployedModel + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelResponse + * @instance + */ + MutateDeployedModelResponse.prototype.deployedModel = null; + + /** + * Creates a new MutateDeployedModelResponse instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.IMutateDeployedModelResponse=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.MutateDeployedModelResponse} MutateDeployedModelResponse instance + */ + MutateDeployedModelResponse.create = function create(properties) { + return new MutateDeployedModelResponse(properties); + }; + + /** + * Encodes the specified MutateDeployedModelResponse message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.MutateDeployedModelResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.IMutateDeployedModelResponse} message MutateDeployedModelResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MutateDeployedModelResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deployedModel != null && Object.hasOwnProperty.call(message, "deployedModel")) + $root.google.cloud.aiplatform.v1beta1.DeployedModel.encode(message.deployedModel, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MutateDeployedModelResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.MutateDeployedModelResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.IMutateDeployedModelResponse} message MutateDeployedModelResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MutateDeployedModelResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MutateDeployedModelResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.MutateDeployedModelResponse} MutateDeployedModelResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MutateDeployedModelResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.MutateDeployedModelResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.deployedModel = $root.google.cloud.aiplatform.v1beta1.DeployedModel.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MutateDeployedModelResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.MutateDeployedModelResponse} MutateDeployedModelResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MutateDeployedModelResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MutateDeployedModelResponse message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MutateDeployedModelResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deployedModel != null && message.hasOwnProperty("deployedModel")) { + var error = $root.google.cloud.aiplatform.v1beta1.DeployedModel.verify(message.deployedModel); + if (error) + return "deployedModel." + error; + } + return null; + }; + + /** + * Creates a MutateDeployedModelResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.MutateDeployedModelResponse} MutateDeployedModelResponse + */ + MutateDeployedModelResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.MutateDeployedModelResponse) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.MutateDeployedModelResponse(); + if (object.deployedModel != null) { + if (typeof object.deployedModel !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.MutateDeployedModelResponse.deployedModel: object expected"); + message.deployedModel = $root.google.cloud.aiplatform.v1beta1.DeployedModel.fromObject(object.deployedModel); + } + return message; + }; + + /** + * Creates a plain object from a MutateDeployedModelResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.MutateDeployedModelResponse} message MutateDeployedModelResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MutateDeployedModelResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.deployedModel = null; + if (message.deployedModel != null && message.hasOwnProperty("deployedModel")) + object.deployedModel = $root.google.cloud.aiplatform.v1beta1.DeployedModel.toObject(message.deployedModel, options); + return object; + }; + + /** + * Converts this MutateDeployedModelResponse to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelResponse + * @instance + * @returns {Object.} JSON object + */ + MutateDeployedModelResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MutateDeployedModelResponse + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MutateDeployedModelResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.MutateDeployedModelResponse"; + }; + + return MutateDeployedModelResponse; + })(); + + v1beta1.MutateDeployedModelOperationMetadata = (function() { + + /** + * Properties of a MutateDeployedModelOperationMetadata. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IMutateDeployedModelOperationMetadata + * @property {google.cloud.aiplatform.v1beta1.IGenericOperationMetadata|null} [genericMetadata] MutateDeployedModelOperationMetadata genericMetadata + */ + + /** + * Constructs a new MutateDeployedModelOperationMetadata. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a MutateDeployedModelOperationMetadata. + * @implements IMutateDeployedModelOperationMetadata + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IMutateDeployedModelOperationMetadata=} [properties] Properties to set + */ + function MutateDeployedModelOperationMetadata(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]]; + } + + /** + * MutateDeployedModelOperationMetadata genericMetadata. + * @member {google.cloud.aiplatform.v1beta1.IGenericOperationMetadata|null|undefined} genericMetadata + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelOperationMetadata + * @instance + */ + MutateDeployedModelOperationMetadata.prototype.genericMetadata = null; + + /** + * Creates a new MutateDeployedModelOperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelOperationMetadata + * @static + * @param {google.cloud.aiplatform.v1beta1.IMutateDeployedModelOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.MutateDeployedModelOperationMetadata} MutateDeployedModelOperationMetadata instance + */ + MutateDeployedModelOperationMetadata.create = function create(properties) { + return new MutateDeployedModelOperationMetadata(properties); + }; + + /** + * Encodes the specified MutateDeployedModelOperationMetadata message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.MutateDeployedModelOperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelOperationMetadata + * @static + * @param {google.cloud.aiplatform.v1beta1.IMutateDeployedModelOperationMetadata} message MutateDeployedModelOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MutateDeployedModelOperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.genericMetadata != null && Object.hasOwnProperty.call(message, "genericMetadata")) + $root.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.encode(message.genericMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MutateDeployedModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.MutateDeployedModelOperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelOperationMetadata + * @static + * @param {google.cloud.aiplatform.v1beta1.IMutateDeployedModelOperationMetadata} message MutateDeployedModelOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MutateDeployedModelOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MutateDeployedModelOperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.MutateDeployedModelOperationMetadata} MutateDeployedModelOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MutateDeployedModelOperationMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.MutateDeployedModelOperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.genericMetadata = $root.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MutateDeployedModelOperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.MutateDeployedModelOperationMetadata} MutateDeployedModelOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MutateDeployedModelOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MutateDeployedModelOperationMetadata message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelOperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MutateDeployedModelOperationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.genericMetadata != null && message.hasOwnProperty("genericMetadata")) { + var error = $root.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.verify(message.genericMetadata); + if (error) + return "genericMetadata." + error; + } + return null; + }; + + /** + * Creates a MutateDeployedModelOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelOperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.MutateDeployedModelOperationMetadata} MutateDeployedModelOperationMetadata + */ + MutateDeployedModelOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.MutateDeployedModelOperationMetadata) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.MutateDeployedModelOperationMetadata(); + if (object.genericMetadata != null) { + if (typeof object.genericMetadata !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.MutateDeployedModelOperationMetadata.genericMetadata: object expected"); + message.genericMetadata = $root.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.fromObject(object.genericMetadata); + } + return message; + }; + + /** + * Creates a plain object from a MutateDeployedModelOperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelOperationMetadata + * @static + * @param {google.cloud.aiplatform.v1beta1.MutateDeployedModelOperationMetadata} message MutateDeployedModelOperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MutateDeployedModelOperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.genericMetadata = null; + if (message.genericMetadata != null && message.hasOwnProperty("genericMetadata")) + object.genericMetadata = $root.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.toObject(message.genericMetadata, options); + return object; + }; + + /** + * Converts this MutateDeployedModelOperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelOperationMetadata + * @instance + * @returns {Object.} JSON object + */ + MutateDeployedModelOperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MutateDeployedModelOperationMetadata + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.MutateDeployedModelOperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MutateDeployedModelOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.MutateDeployedModelOperationMetadata"; + }; + + return MutateDeployedModelOperationMetadata; + })(); + v1beta1.EntityType = (function() { /** @@ -310364,6 +313438,2618 @@ return ModelEvaluationSlice; })(); + v1beta1.ModelGardenService = (function() { + + /** + * Constructs a new ModelGardenService service. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ModelGardenService + * @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 ModelGardenService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ModelGardenService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ModelGardenService; + + /** + * Creates new ModelGardenService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ModelGardenService + * @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 {ModelGardenService} RPC service. Useful where requests and/or responses are streamed. + */ + ModelGardenService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.ModelGardenService|getPublisherModel}. + * @memberof google.cloud.aiplatform.v1beta1.ModelGardenService + * @typedef GetPublisherModelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.aiplatform.v1beta1.PublisherModel} [response] PublisherModel + */ + + /** + * Calls GetPublisherModel. + * @function getPublisherModel + * @memberof google.cloud.aiplatform.v1beta1.ModelGardenService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IGetPublisherModelRequest} request GetPublisherModelRequest message or plain object + * @param {google.cloud.aiplatform.v1beta1.ModelGardenService.GetPublisherModelCallback} callback Node-style callback called with the error, if any, and PublisherModel + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ModelGardenService.prototype.getPublisherModel = function getPublisherModel(request, callback) { + return this.rpcCall(getPublisherModel, $root.google.cloud.aiplatform.v1beta1.GetPublisherModelRequest, $root.google.cloud.aiplatform.v1beta1.PublisherModel, request, callback); + }, "name", { value: "GetPublisherModel" }); + + /** + * Calls GetPublisherModel. + * @function getPublisherModel + * @memberof google.cloud.aiplatform.v1beta1.ModelGardenService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IGetPublisherModelRequest} request GetPublisherModelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ModelGardenService; + })(); + + /** + * PublisherModelView enum. + * @name google.cloud.aiplatform.v1beta1.PublisherModelView + * @enum {number} + * @property {number} PUBLISHER_MODEL_VIEW_UNSPECIFIED=0 PUBLISHER_MODEL_VIEW_UNSPECIFIED value + * @property {number} PUBLISHER_MODEL_VIEW_BASIC=1 PUBLISHER_MODEL_VIEW_BASIC value + * @property {number} PUBLISHER_MODEL_VIEW_FULL=2 PUBLISHER_MODEL_VIEW_FULL value + * @property {number} PUBLISHER_MODEL_VERSION_VIEW_BASIC=3 PUBLISHER_MODEL_VERSION_VIEW_BASIC value + */ + v1beta1.PublisherModelView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PUBLISHER_MODEL_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "PUBLISHER_MODEL_VIEW_BASIC"] = 1; + values[valuesById[2] = "PUBLISHER_MODEL_VIEW_FULL"] = 2; + values[valuesById[3] = "PUBLISHER_MODEL_VERSION_VIEW_BASIC"] = 3; + return values; + })(); + + v1beta1.GetPublisherModelRequest = (function() { + + /** + * Properties of a GetPublisherModelRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IGetPublisherModelRequest + * @property {string|null} [name] GetPublisherModelRequest name + * @property {string|null} [languageCode] GetPublisherModelRequest languageCode + * @property {google.cloud.aiplatform.v1beta1.PublisherModelView|null} [view] GetPublisherModelRequest view + */ + + /** + * Constructs a new GetPublisherModelRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a GetPublisherModelRequest. + * @implements IGetPublisherModelRequest + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IGetPublisherModelRequest=} [properties] Properties to set + */ + function GetPublisherModelRequest(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]]; + } + + /** + * GetPublisherModelRequest name. + * @member {string} name + * @memberof google.cloud.aiplatform.v1beta1.GetPublisherModelRequest + * @instance + */ + GetPublisherModelRequest.prototype.name = ""; + + /** + * GetPublisherModelRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.aiplatform.v1beta1.GetPublisherModelRequest + * @instance + */ + GetPublisherModelRequest.prototype.languageCode = ""; + + /** + * GetPublisherModelRequest view. + * @member {google.cloud.aiplatform.v1beta1.PublisherModelView} view + * @memberof google.cloud.aiplatform.v1beta1.GetPublisherModelRequest + * @instance + */ + GetPublisherModelRequest.prototype.view = 0; + + /** + * Creates a new GetPublisherModelRequest instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.GetPublisherModelRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IGetPublisherModelRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.GetPublisherModelRequest} GetPublisherModelRequest instance + */ + GetPublisherModelRequest.create = function create(properties) { + return new GetPublisherModelRequest(properties); + }; + + /** + * Encodes the specified GetPublisherModelRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.GetPublisherModelRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.GetPublisherModelRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IGetPublisherModelRequest} message GetPublisherModelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPublisherModelRequest.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.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.view); + return writer; + }; + + /** + * Encodes the specified GetPublisherModelRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.GetPublisherModelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.GetPublisherModelRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IGetPublisherModelRequest} message GetPublisherModelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPublisherModelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPublisherModelRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.GetPublisherModelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.GetPublisherModelRequest} GetPublisherModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPublisherModelRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.GetPublisherModelRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.languageCode = reader.string(); + break; + } + case 3: { + message.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetPublisherModelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.GetPublisherModelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.GetPublisherModelRequest} GetPublisherModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPublisherModelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetPublisherModelRequest message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.GetPublisherModelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPublisherModelRequest.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.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a GetPublisherModelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.GetPublisherModelRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.GetPublisherModelRequest} GetPublisherModelRequest + */ + GetPublisherModelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.GetPublisherModelRequest) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.GetPublisherModelRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "PUBLISHER_MODEL_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "PUBLISHER_MODEL_VIEW_BASIC": + case 1: + message.view = 1; + break; + case "PUBLISHER_MODEL_VIEW_FULL": + case 2: + message.view = 2; + break; + case "PUBLISHER_MODEL_VERSION_VIEW_BASIC": + case 3: + message.view = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a GetPublisherModelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.GetPublisherModelRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.GetPublisherModelRequest} message GetPublisherModelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPublisherModelRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.languageCode = ""; + object.view = options.enums === String ? "PUBLISHER_MODEL_VIEW_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.aiplatform.v1beta1.PublisherModelView[message.view] === undefined ? message.view : $root.google.cloud.aiplatform.v1beta1.PublisherModelView[message.view] : message.view; + return object; + }; + + /** + * Converts this GetPublisherModelRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.GetPublisherModelRequest + * @instance + * @returns {Object.} JSON object + */ + GetPublisherModelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetPublisherModelRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.GetPublisherModelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetPublisherModelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.GetPublisherModelRequest"; + }; + + return GetPublisherModelRequest; + })(); + + v1beta1.PublisherModel = (function() { + + /** + * Properties of a PublisherModel. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IPublisherModel + * @property {string|null} [name] PublisherModel name + * @property {string|null} [versionId] PublisherModel versionId + * @property {google.cloud.aiplatform.v1beta1.PublisherModel.OpenSourceCategory|null} [openSourceCategory] PublisherModel openSourceCategory + * @property {google.cloud.aiplatform.v1beta1.PublisherModel.ICallToAction|null} [supportedActions] PublisherModel supportedActions + * @property {Array.|null} [frameworks] PublisherModel frameworks + * @property {string|null} [publisherModelTemplate] PublisherModel publisherModelTemplate + * @property {google.cloud.aiplatform.v1beta1.IPredictSchemata|null} [predictSchemata] PublisherModel predictSchemata + */ + + /** + * Constructs a new PublisherModel. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a PublisherModel. + * @implements IPublisherModel + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IPublisherModel=} [properties] Properties to set + */ + function PublisherModel(properties) { + this.frameworks = []; + 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]]; + } + + /** + * PublisherModel name. + * @member {string} name + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel + * @instance + */ + PublisherModel.prototype.name = ""; + + /** + * PublisherModel versionId. + * @member {string} versionId + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel + * @instance + */ + PublisherModel.prototype.versionId = ""; + + /** + * PublisherModel openSourceCategory. + * @member {google.cloud.aiplatform.v1beta1.PublisherModel.OpenSourceCategory} openSourceCategory + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel + * @instance + */ + PublisherModel.prototype.openSourceCategory = 0; + + /** + * PublisherModel supportedActions. + * @member {google.cloud.aiplatform.v1beta1.PublisherModel.ICallToAction|null|undefined} supportedActions + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel + * @instance + */ + PublisherModel.prototype.supportedActions = null; + + /** + * PublisherModel frameworks. + * @member {Array.} frameworks + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel + * @instance + */ + PublisherModel.prototype.frameworks = $util.emptyArray; + + /** + * PublisherModel publisherModelTemplate. + * @member {string} publisherModelTemplate + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel + * @instance + */ + PublisherModel.prototype.publisherModelTemplate = ""; + + /** + * PublisherModel predictSchemata. + * @member {google.cloud.aiplatform.v1beta1.IPredictSchemata|null|undefined} predictSchemata + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel + * @instance + */ + PublisherModel.prototype.predictSchemata = null; + + /** + * Creates a new PublisherModel instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel + * @static + * @param {google.cloud.aiplatform.v1beta1.IPublisherModel=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.PublisherModel} PublisherModel instance + */ + PublisherModel.create = function create(properties) { + return new PublisherModel(properties); + }; + + /** + * Encodes the specified PublisherModel message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PublisherModel.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel + * @static + * @param {google.cloud.aiplatform.v1beta1.IPublisherModel} message PublisherModel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublisherModel.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.versionId != null && Object.hasOwnProperty.call(message, "versionId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.versionId); + if (message.openSourceCategory != null && Object.hasOwnProperty.call(message, "openSourceCategory")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.openSourceCategory); + if (message.supportedActions != null && Object.hasOwnProperty.call(message, "supportedActions")) + $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.encode(message.supportedActions, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.frameworks != null && message.frameworks.length) + for (var i = 0; i < message.frameworks.length; ++i) + writer.uint32(/* id 23, wireType 2 =*/186).string(message.frameworks[i]); + if (message.publisherModelTemplate != null && Object.hasOwnProperty.call(message, "publisherModelTemplate")) + writer.uint32(/* id 30, wireType 2 =*/242).string(message.publisherModelTemplate); + if (message.predictSchemata != null && Object.hasOwnProperty.call(message, "predictSchemata")) + $root.google.cloud.aiplatform.v1beta1.PredictSchemata.encode(message.predictSchemata, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PublisherModel message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PublisherModel.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel + * @static + * @param {google.cloud.aiplatform.v1beta1.IPublisherModel} message PublisherModel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublisherModel.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PublisherModel message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.PublisherModel} PublisherModel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublisherModel.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.PublisherModel(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.versionId = reader.string(); + break; + } + case 7: { + message.openSourceCategory = reader.int32(); + break; + } + case 19: { + message.supportedActions = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.decode(reader, reader.uint32()); + break; + } + case 23: { + if (!(message.frameworks && message.frameworks.length)) + message.frameworks = []; + message.frameworks.push(reader.string()); + break; + } + case 30: { + message.publisherModelTemplate = reader.string(); + break; + } + case 31: { + message.predictSchemata = $root.google.cloud.aiplatform.v1beta1.PredictSchemata.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PublisherModel message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.PublisherModel} PublisherModel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublisherModel.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PublisherModel message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PublisherModel.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.versionId != null && message.hasOwnProperty("versionId")) + if (!$util.isString(message.versionId)) + return "versionId: string expected"; + if (message.openSourceCategory != null && message.hasOwnProperty("openSourceCategory")) + switch (message.openSourceCategory) { + default: + return "openSourceCategory: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.supportedActions != null && message.hasOwnProperty("supportedActions")) { + var error = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.verify(message.supportedActions); + if (error) + return "supportedActions." + error; + } + if (message.frameworks != null && message.hasOwnProperty("frameworks")) { + if (!Array.isArray(message.frameworks)) + return "frameworks: array expected"; + for (var i = 0; i < message.frameworks.length; ++i) + if (!$util.isString(message.frameworks[i])) + return "frameworks: string[] expected"; + } + if (message.publisherModelTemplate != null && message.hasOwnProperty("publisherModelTemplate")) + if (!$util.isString(message.publisherModelTemplate)) + return "publisherModelTemplate: string expected"; + if (message.predictSchemata != null && message.hasOwnProperty("predictSchemata")) { + var error = $root.google.cloud.aiplatform.v1beta1.PredictSchemata.verify(message.predictSchemata); + if (error) + return "predictSchemata." + error; + } + return null; + }; + + /** + * Creates a PublisherModel message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.PublisherModel} PublisherModel + */ + PublisherModel.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.PublisherModel) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.PublisherModel(); + if (object.name != null) + message.name = String(object.name); + if (object.versionId != null) + message.versionId = String(object.versionId); + switch (object.openSourceCategory) { + default: + if (typeof object.openSourceCategory === "number") { + message.openSourceCategory = object.openSourceCategory; + break; + } + break; + case "OPEN_SOURCE_CATEGORY_UNSPECIFIED": + case 0: + message.openSourceCategory = 0; + break; + case "PROPRIETARY": + case 1: + message.openSourceCategory = 1; + break; + case "GOOGLE_OWNED_OSS_WITH_GOOGLE_CHECKPOINT": + case 2: + message.openSourceCategory = 2; + break; + case "THIRD_PARTY_OWNED_OSS_WITH_GOOGLE_CHECKPOINT": + case 3: + message.openSourceCategory = 3; + break; + case "GOOGLE_OWNED_OSS": + case 4: + message.openSourceCategory = 4; + break; + case "THIRD_PARTY_OWNED_OSS": + case 5: + message.openSourceCategory = 5; + break; + } + if (object.supportedActions != null) { + if (typeof object.supportedActions !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.PublisherModel.supportedActions: object expected"); + message.supportedActions = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.fromObject(object.supportedActions); + } + if (object.frameworks) { + if (!Array.isArray(object.frameworks)) + throw TypeError(".google.cloud.aiplatform.v1beta1.PublisherModel.frameworks: array expected"); + message.frameworks = []; + for (var i = 0; i < object.frameworks.length; ++i) + message.frameworks[i] = String(object.frameworks[i]); + } + if (object.publisherModelTemplate != null) + message.publisherModelTemplate = String(object.publisherModelTemplate); + if (object.predictSchemata != null) { + if (typeof object.predictSchemata !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.PublisherModel.predictSchemata: object expected"); + message.predictSchemata = $root.google.cloud.aiplatform.v1beta1.PredictSchemata.fromObject(object.predictSchemata); + } + return message; + }; + + /** + * Creates a plain object from a PublisherModel message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel + * @static + * @param {google.cloud.aiplatform.v1beta1.PublisherModel} message PublisherModel + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PublisherModel.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.frameworks = []; + if (options.defaults) { + object.name = ""; + object.versionId = ""; + object.openSourceCategory = options.enums === String ? "OPEN_SOURCE_CATEGORY_UNSPECIFIED" : 0; + object.supportedActions = null; + object.publisherModelTemplate = ""; + object.predictSchemata = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.versionId != null && message.hasOwnProperty("versionId")) + object.versionId = message.versionId; + if (message.openSourceCategory != null && message.hasOwnProperty("openSourceCategory")) + object.openSourceCategory = options.enums === String ? $root.google.cloud.aiplatform.v1beta1.PublisherModel.OpenSourceCategory[message.openSourceCategory] === undefined ? message.openSourceCategory : $root.google.cloud.aiplatform.v1beta1.PublisherModel.OpenSourceCategory[message.openSourceCategory] : message.openSourceCategory; + if (message.supportedActions != null && message.hasOwnProperty("supportedActions")) + object.supportedActions = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.toObject(message.supportedActions, options); + if (message.frameworks && message.frameworks.length) { + object.frameworks = []; + for (var j = 0; j < message.frameworks.length; ++j) + object.frameworks[j] = message.frameworks[j]; + } + if (message.publisherModelTemplate != null && message.hasOwnProperty("publisherModelTemplate")) + object.publisherModelTemplate = message.publisherModelTemplate; + if (message.predictSchemata != null && message.hasOwnProperty("predictSchemata")) + object.predictSchemata = $root.google.cloud.aiplatform.v1beta1.PredictSchemata.toObject(message.predictSchemata, options); + return object; + }; + + /** + * Converts this PublisherModel to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel + * @instance + * @returns {Object.} JSON object + */ + PublisherModel.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PublisherModel + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PublisherModel.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.PublisherModel"; + }; + + PublisherModel.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel + * @interface IResourceReference + * @property {string|null} [uri] ResourceReference uri + * @property {string|null} [resourceName] ResourceReference resourceName + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(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]]; + } + + /** + * ResourceReference uri. + * @member {string|null|undefined} uri + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference + * @instance + */ + ResourceReference.prototype.uri = null; + + /** + * ResourceReference resourceName. + * @member {string|null|undefined} resourceName + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference + * @instance + */ + ResourceReference.prototype.resourceName = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ResourceReference reference. + * @member {"uri"|"resourceName"|undefined} reference + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference + * @instance + */ + Object.defineProperty(ResourceReference.prototype, "reference", { + get: $util.oneOfGetter($oneOfFields = ["uri", "resourceName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference + * @static + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.IResourceReference=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference + * @static + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + if (message.resourceName != null && Object.hasOwnProperty.call(message, "resourceName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceName); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference + * @static + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + case 2: { + message.resourceName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.uri != null && message.hasOwnProperty("uri")) { + properties.reference = 1; + if (!$util.isString(message.uri)) + return "uri: string expected"; + } + if (message.resourceName != null && message.hasOwnProperty("resourceName")) { + if (properties.reference === 1) + return "reference: multiple values"; + properties.reference = 1; + if (!$util.isString(message.resourceName)) + return "resourceName: string expected"; + } + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference(); + if (object.uri != null) + message.uri = String(object.uri); + if (object.resourceName != null) + message.resourceName = String(object.resourceName); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference + * @static + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.uri != null && message.hasOwnProperty("uri")) { + object.uri = message.uri; + if (options.oneofs) + object.reference = "uri"; + } + if (message.resourceName != null && message.hasOwnProperty("resourceName")) { + object.resourceName = message.resourceName; + if (options.oneofs) + object.reference = "resourceName"; + } + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference"; + }; + + return ResourceReference; + })(); + + PublisherModel.Documentation = (function() { + + /** + * Properties of a Documentation. + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel + * @interface IDocumentation + * @property {string|null} [title] Documentation title + * @property {string|null} [content] Documentation content + */ + + /** + * Constructs a new Documentation. + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel + * @classdesc Represents a Documentation. + * @implements IDocumentation + * @constructor + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.IDocumentation=} [properties] Properties to set + */ + function Documentation(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]]; + } + + /** + * Documentation title. + * @member {string} title + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.Documentation + * @instance + */ + Documentation.prototype.title = ""; + + /** + * Documentation content. + * @member {string} content + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.Documentation + * @instance + */ + Documentation.prototype.content = ""; + + /** + * Creates a new Documentation instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.Documentation + * @static + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.IDocumentation=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.PublisherModel.Documentation} Documentation instance + */ + Documentation.create = function create(properties) { + return new Documentation(properties); + }; + + /** + * Encodes the specified Documentation message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PublisherModel.Documentation.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.Documentation + * @static + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.IDocumentation} message Documentation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Documentation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.content); + return writer; + }; + + /** + * Encodes the specified Documentation message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PublisherModel.Documentation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.Documentation + * @static + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.IDocumentation} message Documentation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Documentation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Documentation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.Documentation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.PublisherModel.Documentation} Documentation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Documentation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.PublisherModel.Documentation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.title = reader.string(); + break; + } + case 2: { + message.content = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Documentation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.Documentation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.PublisherModel.Documentation} Documentation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Documentation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Documentation message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.Documentation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Documentation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.content != null && message.hasOwnProperty("content")) + if (!$util.isString(message.content)) + return "content: string expected"; + return null; + }; + + /** + * Creates a Documentation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.Documentation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.PublisherModel.Documentation} Documentation + */ + Documentation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.PublisherModel.Documentation) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.PublisherModel.Documentation(); + if (object.title != null) + message.title = String(object.title); + if (object.content != null) + message.content = String(object.content); + return message; + }; + + /** + * Creates a plain object from a Documentation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.Documentation + * @static + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.Documentation} message Documentation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Documentation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.title = ""; + object.content = ""; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.content != null && message.hasOwnProperty("content")) + object.content = message.content; + return object; + }; + + /** + * Converts this Documentation to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.Documentation + * @instance + * @returns {Object.} JSON object + */ + Documentation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Documentation + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.Documentation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Documentation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.PublisherModel.Documentation"; + }; + + return Documentation; + })(); + + PublisherModel.CallToAction = (function() { + + /** + * Properties of a CallToAction. + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel + * @interface ICallToAction + * @property {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IViewRestApi|null} [viewRestApi] CallToAction viewRestApi + * @property {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences|null} [openNotebook] CallToAction openNotebook + * @property {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences|null} [createApplication] CallToAction createApplication + * @property {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences|null} [openFineTuningPipeline] CallToAction openFineTuningPipeline + * @property {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences|null} [openPromptTuningPipeline] CallToAction openPromptTuningPipeline + * @property {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences|null} [openGenie] CallToAction openGenie + * @property {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IDeploy|null} [deploy] CallToAction deploy + * @property {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences|null} [openGenerationAiStudio] CallToAction openGenerationAiStudio + */ + + /** + * Constructs a new CallToAction. + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel + * @classdesc Represents a CallToAction. + * @implements ICallToAction + * @constructor + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.ICallToAction=} [properties] Properties to set + */ + function CallToAction(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]]; + } + + /** + * CallToAction viewRestApi. + * @member {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IViewRestApi|null|undefined} viewRestApi + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction + * @instance + */ + CallToAction.prototype.viewRestApi = null; + + /** + * CallToAction openNotebook. + * @member {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences|null|undefined} openNotebook + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction + * @instance + */ + CallToAction.prototype.openNotebook = null; + + /** + * CallToAction createApplication. + * @member {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences|null|undefined} createApplication + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction + * @instance + */ + CallToAction.prototype.createApplication = null; + + /** + * CallToAction openFineTuningPipeline. + * @member {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences|null|undefined} openFineTuningPipeline + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction + * @instance + */ + CallToAction.prototype.openFineTuningPipeline = null; + + /** + * CallToAction openPromptTuningPipeline. + * @member {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences|null|undefined} openPromptTuningPipeline + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction + * @instance + */ + CallToAction.prototype.openPromptTuningPipeline = null; + + /** + * CallToAction openGenie. + * @member {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences|null|undefined} openGenie + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction + * @instance + */ + CallToAction.prototype.openGenie = null; + + /** + * CallToAction deploy. + * @member {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IDeploy|null|undefined} deploy + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction + * @instance + */ + CallToAction.prototype.deploy = null; + + /** + * CallToAction openGenerationAiStudio. + * @member {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences|null|undefined} openGenerationAiStudio + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction + * @instance + */ + CallToAction.prototype.openGenerationAiStudio = null; + + /** + * Creates a new CallToAction instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction + * @static + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.ICallToAction=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction} CallToAction instance + */ + CallToAction.create = function create(properties) { + return new CallToAction(properties); + }; + + /** + * Encodes the specified CallToAction message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction + * @static + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.ICallToAction} message CallToAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CallToAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.viewRestApi != null && Object.hasOwnProperty.call(message, "viewRestApi")) + $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi.encode(message.viewRestApi, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.openNotebook != null && Object.hasOwnProperty.call(message, "openNotebook")) + $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.encode(message.openNotebook, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.createApplication != null && Object.hasOwnProperty.call(message, "createApplication")) + $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.encode(message.createApplication, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.openFineTuningPipeline != null && Object.hasOwnProperty.call(message, "openFineTuningPipeline")) + $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.encode(message.openFineTuningPipeline, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.openPromptTuningPipeline != null && Object.hasOwnProperty.call(message, "openPromptTuningPipeline")) + $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.encode(message.openPromptTuningPipeline, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.openGenie != null && Object.hasOwnProperty.call(message, "openGenie")) + $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.encode(message.openGenie, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.deploy != null && Object.hasOwnProperty.call(message, "deploy")) + $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.encode(message.deploy, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.openGenerationAiStudio != null && Object.hasOwnProperty.call(message, "openGenerationAiStudio")) + $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.encode(message.openGenerationAiStudio, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CallToAction message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction + * @static + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.ICallToAction} message CallToAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CallToAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CallToAction message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction} CallToAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CallToAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.viewRestApi = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi.decode(reader, reader.uint32()); + break; + } + case 2: { + message.openNotebook = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.decode(reader, reader.uint32()); + break; + } + case 3: { + message.createApplication = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.decode(reader, reader.uint32()); + break; + } + case 4: { + message.openFineTuningPipeline = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.decode(reader, reader.uint32()); + break; + } + case 5: { + message.openPromptTuningPipeline = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.decode(reader, reader.uint32()); + break; + } + case 6: { + message.openGenie = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.decode(reader, reader.uint32()); + break; + } + case 7: { + message.deploy = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.decode(reader, reader.uint32()); + break; + } + case 8: { + message.openGenerationAiStudio = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CallToAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction} CallToAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CallToAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CallToAction message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CallToAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.viewRestApi != null && message.hasOwnProperty("viewRestApi")) { + var error = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi.verify(message.viewRestApi); + if (error) + return "viewRestApi." + error; + } + if (message.openNotebook != null && message.hasOwnProperty("openNotebook")) { + var error = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.verify(message.openNotebook); + if (error) + return "openNotebook." + error; + } + if (message.createApplication != null && message.hasOwnProperty("createApplication")) { + var error = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.verify(message.createApplication); + if (error) + return "createApplication." + error; + } + if (message.openFineTuningPipeline != null && message.hasOwnProperty("openFineTuningPipeline")) { + var error = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.verify(message.openFineTuningPipeline); + if (error) + return "openFineTuningPipeline." + error; + } + if (message.openPromptTuningPipeline != null && message.hasOwnProperty("openPromptTuningPipeline")) { + var error = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.verify(message.openPromptTuningPipeline); + if (error) + return "openPromptTuningPipeline." + error; + } + if (message.openGenie != null && message.hasOwnProperty("openGenie")) { + var error = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.verify(message.openGenie); + if (error) + return "openGenie." + error; + } + if (message.deploy != null && message.hasOwnProperty("deploy")) { + var error = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.verify(message.deploy); + if (error) + return "deploy." + error; + } + if (message.openGenerationAiStudio != null && message.hasOwnProperty("openGenerationAiStudio")) { + var error = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.verify(message.openGenerationAiStudio); + if (error) + return "openGenerationAiStudio." + error; + } + return null; + }; + + /** + * Creates a CallToAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction} CallToAction + */ + CallToAction.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction(); + if (object.viewRestApi != null) { + if (typeof object.viewRestApi !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.viewRestApi: object expected"); + message.viewRestApi = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi.fromObject(object.viewRestApi); + } + if (object.openNotebook != null) { + if (typeof object.openNotebook !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.openNotebook: object expected"); + message.openNotebook = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.fromObject(object.openNotebook); + } + if (object.createApplication != null) { + if (typeof object.createApplication !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.createApplication: object expected"); + message.createApplication = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.fromObject(object.createApplication); + } + if (object.openFineTuningPipeline != null) { + if (typeof object.openFineTuningPipeline !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.openFineTuningPipeline: object expected"); + message.openFineTuningPipeline = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.fromObject(object.openFineTuningPipeline); + } + if (object.openPromptTuningPipeline != null) { + if (typeof object.openPromptTuningPipeline !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.openPromptTuningPipeline: object expected"); + message.openPromptTuningPipeline = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.fromObject(object.openPromptTuningPipeline); + } + if (object.openGenie != null) { + if (typeof object.openGenie !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.openGenie: object expected"); + message.openGenie = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.fromObject(object.openGenie); + } + if (object.deploy != null) { + if (typeof object.deploy !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.deploy: object expected"); + message.deploy = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.fromObject(object.deploy); + } + if (object.openGenerationAiStudio != null) { + if (typeof object.openGenerationAiStudio !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.openGenerationAiStudio: object expected"); + message.openGenerationAiStudio = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.fromObject(object.openGenerationAiStudio); + } + return message; + }; + + /** + * Creates a plain object from a CallToAction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction + * @static + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction} message CallToAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CallToAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.viewRestApi = null; + object.openNotebook = null; + object.createApplication = null; + object.openFineTuningPipeline = null; + object.openPromptTuningPipeline = null; + object.openGenie = null; + object.deploy = null; + object.openGenerationAiStudio = null; + } + if (message.viewRestApi != null && message.hasOwnProperty("viewRestApi")) + object.viewRestApi = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi.toObject(message.viewRestApi, options); + if (message.openNotebook != null && message.hasOwnProperty("openNotebook")) + object.openNotebook = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.toObject(message.openNotebook, options); + if (message.createApplication != null && message.hasOwnProperty("createApplication")) + object.createApplication = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.toObject(message.createApplication, options); + if (message.openFineTuningPipeline != null && message.hasOwnProperty("openFineTuningPipeline")) + object.openFineTuningPipeline = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.toObject(message.openFineTuningPipeline, options); + if (message.openPromptTuningPipeline != null && message.hasOwnProperty("openPromptTuningPipeline")) + object.openPromptTuningPipeline = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.toObject(message.openPromptTuningPipeline, options); + if (message.openGenie != null && message.hasOwnProperty("openGenie")) + object.openGenie = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.toObject(message.openGenie, options); + if (message.deploy != null && message.hasOwnProperty("deploy")) + object.deploy = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.toObject(message.deploy, options); + if (message.openGenerationAiStudio != null && message.hasOwnProperty("openGenerationAiStudio")) + object.openGenerationAiStudio = $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.toObject(message.openGenerationAiStudio, options); + return object; + }; + + /** + * Converts this CallToAction to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction + * @instance + * @returns {Object.} JSON object + */ + CallToAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CallToAction + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CallToAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction"; + }; + + CallToAction.RegionalResourceReferences = (function() { + + /** + * Properties of a RegionalResourceReferences. + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction + * @interface IRegionalResourceReferences + * @property {Object.|null} [references] RegionalResourceReferences references + * @property {string|null} [title] RegionalResourceReferences title + */ + + /** + * Constructs a new RegionalResourceReferences. + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction + * @classdesc Represents a RegionalResourceReferences. + * @implements IRegionalResourceReferences + * @constructor + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences=} [properties] Properties to set + */ + function RegionalResourceReferences(properties) { + this.references = {}; + 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]]; + } + + /** + * RegionalResourceReferences references. + * @member {Object.} references + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences + * @instance + */ + RegionalResourceReferences.prototype.references = $util.emptyObject; + + /** + * RegionalResourceReferences title. + * @member {string} title + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences + * @instance + */ + RegionalResourceReferences.prototype.title = ""; + + /** + * Creates a new RegionalResourceReferences instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences + * @static + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences} RegionalResourceReferences instance + */ + RegionalResourceReferences.create = function create(properties) { + return new RegionalResourceReferences(properties); + }; + + /** + * Encodes the specified RegionalResourceReferences message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences + * @static + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences} message RegionalResourceReferences message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegionalResourceReferences.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.references != null && Object.hasOwnProperty.call(message, "references")) + for (var keys = Object.keys(message.references), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference.encode(message.references[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); + return writer; + }; + + /** + * Encodes the specified RegionalResourceReferences message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences + * @static + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IRegionalResourceReferences} message RegionalResourceReferences message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RegionalResourceReferences.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RegionalResourceReferences message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences} RegionalResourceReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegionalResourceReferences.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (message.references === $util.emptyObject) + message.references = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.references[key] = value; + break; + } + case 2: { + message.title = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RegionalResourceReferences message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences} RegionalResourceReferences + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RegionalResourceReferences.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RegionalResourceReferences message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RegionalResourceReferences.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.references != null && message.hasOwnProperty("references")) { + if (!$util.isObject(message.references)) + return "references: object expected"; + var key = Object.keys(message.references); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference.verify(message.references[key[i]]); + if (error) + return "references." + error; + } + } + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + return null; + }; + + /** + * Creates a RegionalResourceReferences message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences} RegionalResourceReferences + */ + RegionalResourceReferences.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences(); + if (object.references) { + if (typeof object.references !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.references: object expected"); + message.references = {}; + for (var keys = Object.keys(object.references), i = 0; i < keys.length; ++i) { + if (typeof object.references[keys[i]] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.references: object expected"); + message.references[keys[i]] = $root.google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference.fromObject(object.references[keys[i]]); + } + } + if (object.title != null) + message.title = String(object.title); + return message; + }; + + /** + * Creates a plain object from a RegionalResourceReferences message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences + * @static + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences} message RegionalResourceReferences + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RegionalResourceReferences.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.references = {}; + if (options.defaults) + object.title = ""; + var keys2; + if (message.references && (keys2 = Object.keys(message.references)).length) { + object.references = {}; + for (var j = 0; j < keys2.length; ++j) + object.references[keys2[j]] = $root.google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference.toObject(message.references[keys2[j]], options); + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + return object; + }; + + /** + * Converts this RegionalResourceReferences to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences + * @instance + * @returns {Object.} JSON object + */ + RegionalResourceReferences.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RegionalResourceReferences + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RegionalResourceReferences.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences"; + }; + + return RegionalResourceReferences; + })(); + + CallToAction.ViewRestApi = (function() { + + /** + * Properties of a ViewRestApi. + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction + * @interface IViewRestApi + * @property {Array.|null} [documentations] ViewRestApi documentations + * @property {string|null} [title] ViewRestApi title + */ + + /** + * Constructs a new ViewRestApi. + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction + * @classdesc Represents a ViewRestApi. + * @implements IViewRestApi + * @constructor + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IViewRestApi=} [properties] Properties to set + */ + function ViewRestApi(properties) { + this.documentations = []; + 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]]; + } + + /** + * ViewRestApi documentations. + * @member {Array.} documentations + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi + * @instance + */ + ViewRestApi.prototype.documentations = $util.emptyArray; + + /** + * ViewRestApi title. + * @member {string} title + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi + * @instance + */ + ViewRestApi.prototype.title = ""; + + /** + * Creates a new ViewRestApi instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi + * @static + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IViewRestApi=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi} ViewRestApi instance + */ + ViewRestApi.create = function create(properties) { + return new ViewRestApi(properties); + }; + + /** + * Encodes the specified ViewRestApi message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi + * @static + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IViewRestApi} message ViewRestApi message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ViewRestApi.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.documentations != null && message.documentations.length) + for (var i = 0; i < message.documentations.length; ++i) + $root.google.cloud.aiplatform.v1beta1.PublisherModel.Documentation.encode(message.documentations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); + return writer; + }; + + /** + * Encodes the specified ViewRestApi message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi + * @static + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IViewRestApi} message ViewRestApi message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ViewRestApi.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ViewRestApi message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi} ViewRestApi + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ViewRestApi.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.documentations && message.documentations.length)) + message.documentations = []; + message.documentations.push($root.google.cloud.aiplatform.v1beta1.PublisherModel.Documentation.decode(reader, reader.uint32())); + break; + } + case 2: { + message.title = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ViewRestApi message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi} ViewRestApi + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ViewRestApi.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ViewRestApi message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ViewRestApi.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.documentations != null && message.hasOwnProperty("documentations")) { + if (!Array.isArray(message.documentations)) + return "documentations: array expected"; + for (var i = 0; i < message.documentations.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.PublisherModel.Documentation.verify(message.documentations[i]); + if (error) + return "documentations." + error; + } + } + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + return null; + }; + + /** + * Creates a ViewRestApi message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi} ViewRestApi + */ + ViewRestApi.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi(); + if (object.documentations) { + if (!Array.isArray(object.documentations)) + throw TypeError(".google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi.documentations: array expected"); + message.documentations = []; + for (var i = 0; i < object.documentations.length; ++i) { + if (typeof object.documentations[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi.documentations: object expected"); + message.documentations[i] = $root.google.cloud.aiplatform.v1beta1.PublisherModel.Documentation.fromObject(object.documentations[i]); + } + } + if (object.title != null) + message.title = String(object.title); + return message; + }; + + /** + * Creates a plain object from a ViewRestApi message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi + * @static + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi} message ViewRestApi + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ViewRestApi.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.documentations = []; + if (options.defaults) + object.title = ""; + if (message.documentations && message.documentations.length) { + object.documentations = []; + for (var j = 0; j < message.documentations.length; ++j) + object.documentations[j] = $root.google.cloud.aiplatform.v1beta1.PublisherModel.Documentation.toObject(message.documentations[j], options); + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + return object; + }; + + /** + * Converts this ViewRestApi to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi + * @instance + * @returns {Object.} JSON object + */ + ViewRestApi.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ViewRestApi + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ViewRestApi.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi"; + }; + + return ViewRestApi; + })(); + + CallToAction.Deploy = (function() { + + /** + * Properties of a Deploy. + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction + * @interface IDeploy + * @property {google.cloud.aiplatform.v1beta1.IDedicatedResources|null} [dedicatedResources] Deploy dedicatedResources + * @property {google.cloud.aiplatform.v1beta1.IAutomaticResources|null} [automaticResources] Deploy automaticResources + * @property {string|null} [sharedResources] Deploy sharedResources + * @property {string|null} [modelDisplayName] Deploy modelDisplayName + * @property {google.cloud.aiplatform.v1beta1.ILargeModelReference|null} [largeModelReference] Deploy largeModelReference + * @property {google.cloud.aiplatform.v1beta1.IModelContainerSpec|null} [containerSpec] Deploy containerSpec + * @property {string|null} [artifactUri] Deploy artifactUri + * @property {string|null} [title] Deploy title + */ + + /** + * Constructs a new Deploy. + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction + * @classdesc Represents a Deploy. + * @implements IDeploy + * @constructor + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IDeploy=} [properties] Properties to set + */ + function Deploy(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]]; + } + + /** + * Deploy dedicatedResources. + * @member {google.cloud.aiplatform.v1beta1.IDedicatedResources|null|undefined} dedicatedResources + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy + * @instance + */ + Deploy.prototype.dedicatedResources = null; + + /** + * Deploy automaticResources. + * @member {google.cloud.aiplatform.v1beta1.IAutomaticResources|null|undefined} automaticResources + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy + * @instance + */ + Deploy.prototype.automaticResources = null; + + /** + * Deploy sharedResources. + * @member {string|null|undefined} sharedResources + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy + * @instance + */ + Deploy.prototype.sharedResources = null; + + /** + * Deploy modelDisplayName. + * @member {string} modelDisplayName + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy + * @instance + */ + Deploy.prototype.modelDisplayName = ""; + + /** + * Deploy largeModelReference. + * @member {google.cloud.aiplatform.v1beta1.ILargeModelReference|null|undefined} largeModelReference + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy + * @instance + */ + Deploy.prototype.largeModelReference = null; + + /** + * Deploy containerSpec. + * @member {google.cloud.aiplatform.v1beta1.IModelContainerSpec|null|undefined} containerSpec + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy + * @instance + */ + Deploy.prototype.containerSpec = null; + + /** + * Deploy artifactUri. + * @member {string} artifactUri + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy + * @instance + */ + Deploy.prototype.artifactUri = ""; + + /** + * Deploy title. + * @member {string} title + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy + * @instance + */ + Deploy.prototype.title = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Deploy predictionResources. + * @member {"dedicatedResources"|"automaticResources"|"sharedResources"|undefined} predictionResources + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy + * @instance + */ + Object.defineProperty(Deploy.prototype, "predictionResources", { + get: $util.oneOfGetter($oneOfFields = ["dedicatedResources", "automaticResources", "sharedResources"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Deploy instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy + * @static + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IDeploy=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy} Deploy instance + */ + Deploy.create = function create(properties) { + return new Deploy(properties); + }; + + /** + * Encodes the specified Deploy message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy + * @static + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IDeploy} message Deploy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Deploy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.modelDisplayName != null && Object.hasOwnProperty.call(message, "modelDisplayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.modelDisplayName); + if (message.largeModelReference != null && Object.hasOwnProperty.call(message, "largeModelReference")) + $root.google.cloud.aiplatform.v1beta1.LargeModelReference.encode(message.largeModelReference, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.containerSpec != null && Object.hasOwnProperty.call(message, "containerSpec")) + $root.google.cloud.aiplatform.v1beta1.ModelContainerSpec.encode(message.containerSpec, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.artifactUri != null && Object.hasOwnProperty.call(message, "artifactUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.artifactUri); + if (message.dedicatedResources != null && Object.hasOwnProperty.call(message, "dedicatedResources")) + $root.google.cloud.aiplatform.v1beta1.DedicatedResources.encode(message.dedicatedResources, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.automaticResources != null && Object.hasOwnProperty.call(message, "automaticResources")) + $root.google.cloud.aiplatform.v1beta1.AutomaticResources.encode(message.automaticResources, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.sharedResources != null && Object.hasOwnProperty.call(message, "sharedResources")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.sharedResources); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.title); + return writer; + }; + + /** + * Encodes the specified Deploy message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy + * @static + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.IDeploy} message Deploy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Deploy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Deploy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy} Deploy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Deploy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 5: { + message.dedicatedResources = $root.google.cloud.aiplatform.v1beta1.DedicatedResources.decode(reader, reader.uint32()); + break; + } + case 6: { + message.automaticResources = $root.google.cloud.aiplatform.v1beta1.AutomaticResources.decode(reader, reader.uint32()); + break; + } + case 7: { + message.sharedResources = reader.string(); + break; + } + case 1: { + message.modelDisplayName = reader.string(); + break; + } + case 2: { + message.largeModelReference = $root.google.cloud.aiplatform.v1beta1.LargeModelReference.decode(reader, reader.uint32()); + break; + } + case 3: { + message.containerSpec = $root.google.cloud.aiplatform.v1beta1.ModelContainerSpec.decode(reader, reader.uint32()); + break; + } + case 4: { + message.artifactUri = reader.string(); + break; + } + case 8: { + message.title = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Deploy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy} Deploy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Deploy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Deploy message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Deploy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dedicatedResources != null && message.hasOwnProperty("dedicatedResources")) { + properties.predictionResources = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.DedicatedResources.verify(message.dedicatedResources); + if (error) + return "dedicatedResources." + error; + } + } + if (message.automaticResources != null && message.hasOwnProperty("automaticResources")) { + if (properties.predictionResources === 1) + return "predictionResources: multiple values"; + properties.predictionResources = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.AutomaticResources.verify(message.automaticResources); + if (error) + return "automaticResources." + error; + } + } + if (message.sharedResources != null && message.hasOwnProperty("sharedResources")) { + if (properties.predictionResources === 1) + return "predictionResources: multiple values"; + properties.predictionResources = 1; + if (!$util.isString(message.sharedResources)) + return "sharedResources: string expected"; + } + if (message.modelDisplayName != null && message.hasOwnProperty("modelDisplayName")) + if (!$util.isString(message.modelDisplayName)) + return "modelDisplayName: string expected"; + if (message.largeModelReference != null && message.hasOwnProperty("largeModelReference")) { + var error = $root.google.cloud.aiplatform.v1beta1.LargeModelReference.verify(message.largeModelReference); + if (error) + return "largeModelReference." + error; + } + if (message.containerSpec != null && message.hasOwnProperty("containerSpec")) { + var error = $root.google.cloud.aiplatform.v1beta1.ModelContainerSpec.verify(message.containerSpec); + if (error) + return "containerSpec." + error; + } + if (message.artifactUri != null && message.hasOwnProperty("artifactUri")) + if (!$util.isString(message.artifactUri)) + return "artifactUri: string expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + return null; + }; + + /** + * Creates a Deploy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy} Deploy + */ + Deploy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy(); + if (object.dedicatedResources != null) { + if (typeof object.dedicatedResources !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.dedicatedResources: object expected"); + message.dedicatedResources = $root.google.cloud.aiplatform.v1beta1.DedicatedResources.fromObject(object.dedicatedResources); + } + if (object.automaticResources != null) { + if (typeof object.automaticResources !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.automaticResources: object expected"); + message.automaticResources = $root.google.cloud.aiplatform.v1beta1.AutomaticResources.fromObject(object.automaticResources); + } + if (object.sharedResources != null) + message.sharedResources = String(object.sharedResources); + if (object.modelDisplayName != null) + message.modelDisplayName = String(object.modelDisplayName); + if (object.largeModelReference != null) { + if (typeof object.largeModelReference !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.largeModelReference: object expected"); + message.largeModelReference = $root.google.cloud.aiplatform.v1beta1.LargeModelReference.fromObject(object.largeModelReference); + } + if (object.containerSpec != null) { + if (typeof object.containerSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.containerSpec: object expected"); + message.containerSpec = $root.google.cloud.aiplatform.v1beta1.ModelContainerSpec.fromObject(object.containerSpec); + } + if (object.artifactUri != null) + message.artifactUri = String(object.artifactUri); + if (object.title != null) + message.title = String(object.title); + return message; + }; + + /** + * Creates a plain object from a Deploy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy + * @static + * @param {google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy} message Deploy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Deploy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.modelDisplayName = ""; + object.largeModelReference = null; + object.containerSpec = null; + object.artifactUri = ""; + object.title = ""; + } + if (message.modelDisplayName != null && message.hasOwnProperty("modelDisplayName")) + object.modelDisplayName = message.modelDisplayName; + if (message.largeModelReference != null && message.hasOwnProperty("largeModelReference")) + object.largeModelReference = $root.google.cloud.aiplatform.v1beta1.LargeModelReference.toObject(message.largeModelReference, options); + if (message.containerSpec != null && message.hasOwnProperty("containerSpec")) + object.containerSpec = $root.google.cloud.aiplatform.v1beta1.ModelContainerSpec.toObject(message.containerSpec, options); + if (message.artifactUri != null && message.hasOwnProperty("artifactUri")) + object.artifactUri = message.artifactUri; + if (message.dedicatedResources != null && message.hasOwnProperty("dedicatedResources")) { + object.dedicatedResources = $root.google.cloud.aiplatform.v1beta1.DedicatedResources.toObject(message.dedicatedResources, options); + if (options.oneofs) + object.predictionResources = "dedicatedResources"; + } + if (message.automaticResources != null && message.hasOwnProperty("automaticResources")) { + object.automaticResources = $root.google.cloud.aiplatform.v1beta1.AutomaticResources.toObject(message.automaticResources, options); + if (options.oneofs) + object.predictionResources = "automaticResources"; + } + if (message.sharedResources != null && message.hasOwnProperty("sharedResources")) { + object.sharedResources = message.sharedResources; + if (options.oneofs) + object.predictionResources = "sharedResources"; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + return object; + }; + + /** + * Converts this Deploy to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy + * @instance + * @returns {Object.} JSON object + */ + Deploy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Deploy + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Deploy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy"; + }; + + return Deploy; + })(); + + return CallToAction; + })(); + + /** + * OpenSourceCategory enum. + * @name google.cloud.aiplatform.v1beta1.PublisherModel.OpenSourceCategory + * @enum {number} + * @property {number} OPEN_SOURCE_CATEGORY_UNSPECIFIED=0 OPEN_SOURCE_CATEGORY_UNSPECIFIED value + * @property {number} PROPRIETARY=1 PROPRIETARY value + * @property {number} GOOGLE_OWNED_OSS_WITH_GOOGLE_CHECKPOINT=2 GOOGLE_OWNED_OSS_WITH_GOOGLE_CHECKPOINT value + * @property {number} THIRD_PARTY_OWNED_OSS_WITH_GOOGLE_CHECKPOINT=3 THIRD_PARTY_OWNED_OSS_WITH_GOOGLE_CHECKPOINT value + * @property {number} GOOGLE_OWNED_OSS=4 GOOGLE_OWNED_OSS value + * @property {number} THIRD_PARTY_OWNED_OSS=5 THIRD_PARTY_OWNED_OSS value + */ + PublisherModel.OpenSourceCategory = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OPEN_SOURCE_CATEGORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "PROPRIETARY"] = 1; + values[valuesById[2] = "GOOGLE_OWNED_OSS_WITH_GOOGLE_CHECKPOINT"] = 2; + values[valuesById[3] = "THIRD_PARTY_OWNED_OSS_WITH_GOOGLE_CHECKPOINT"] = 3; + values[valuesById[4] = "GOOGLE_OWNED_OSS"] = 4; + values[valuesById[5] = "THIRD_PARTY_OWNED_OSS"] = 5; + return values; + })(); + + return PublisherModel; + })(); + v1beta1.ModelService = (function() { /** @@ -330699,12 +336385,14 @@ * @property {number|Long|null} [startedRunCount] Schedule startedRunCount * @property {google.cloud.aiplatform.v1beta1.Schedule.State|null} [state] Schedule state * @property {google.protobuf.ITimestamp|null} [createTime] Schedule createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Schedule updateTime * @property {google.protobuf.ITimestamp|null} [nextRunTime] Schedule nextRunTime * @property {google.protobuf.ITimestamp|null} [lastPauseTime] Schedule lastPauseTime * @property {google.protobuf.ITimestamp|null} [lastResumeTime] Schedule lastResumeTime * @property {number|Long|null} [maxConcurrentRunCount] Schedule maxConcurrentRunCount * @property {boolean|null} [allowQueueing] Schedule allowQueueing * @property {boolean|null} [catchUp] Schedule catchUp + * @property {google.cloud.aiplatform.v1beta1.Schedule.IRunResponse|null} [lastScheduledRunResponse] Schedule lastScheduledRunResponse */ /** @@ -330802,6 +336490,14 @@ */ Schedule.prototype.createTime = null; + /** + * Schedule updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.aiplatform.v1beta1.Schedule + * @instance + */ + Schedule.prototype.updateTime = null; + /** * Schedule nextRunTime. * @member {google.protobuf.ITimestamp|null|undefined} nextRunTime @@ -330850,6 +336546,14 @@ */ Schedule.prototype.catchUp = false; + /** + * Schedule lastScheduledRunResponse. + * @member {google.cloud.aiplatform.v1beta1.Schedule.IRunResponse|null|undefined} lastScheduledRunResponse + * @memberof google.cloud.aiplatform.v1beta1.Schedule + * @instance + */ + Schedule.prototype.lastScheduledRunResponse = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -330931,6 +336635,10 @@ writer.uint32(/* id 16, wireType 0 =*/128).int64(message.maxRunCount); if (message.startedRunCount != null && Object.hasOwnProperty.call(message, "startedRunCount")) writer.uint32(/* id 17, wireType 0 =*/136).int64(message.startedRunCount); + if (message.lastScheduledRunResponse != null && Object.hasOwnProperty.call(message, "lastScheduledRunResponse")) + $root.google.cloud.aiplatform.v1beta1.Schedule.RunResponse.encode(message.lastScheduledRunResponse, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); return writer; }; @@ -331005,6 +336713,10 @@ message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } + case 19: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } case 7: { message.nextRunTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; @@ -331029,6 +336741,10 @@ message.catchUp = reader.bool(); break; } + case 18: { + message.lastScheduledRunResponse = $root.google.cloud.aiplatform.v1beta1.Schedule.RunResponse.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -331115,6 +336831,11 @@ 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.nextRunTime != null && message.hasOwnProperty("nextRunTime")) { var error = $root.google.protobuf.Timestamp.verify(message.nextRunTime); if (error) @@ -331139,6 +336860,11 @@ if (message.catchUp != null && message.hasOwnProperty("catchUp")) if (typeof message.catchUp !== "boolean") return "catchUp: boolean expected"; + if (message.lastScheduledRunResponse != null && message.hasOwnProperty("lastScheduledRunResponse")) { + var error = $root.google.cloud.aiplatform.v1beta1.Schedule.RunResponse.verify(message.lastScheduledRunResponse); + if (error) + return "lastScheduledRunResponse." + error; + } return null; }; @@ -331222,6 +336948,11 @@ throw TypeError(".google.cloud.aiplatform.v1beta1.Schedule.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.aiplatform.v1beta1.Schedule.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } if (object.nextRunTime != null) { if (typeof object.nextRunTime !== "object") throw TypeError(".google.cloud.aiplatform.v1beta1.Schedule.nextRunTime: object expected"); @@ -331250,6 +336981,11 @@ message.allowQueueing = Boolean(object.allowQueueing); if (object.catchUp != null) message.catchUp = Boolean(object.catchUp); + if (object.lastScheduledRunResponse != null) { + if (typeof object.lastScheduledRunResponse !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.Schedule.lastScheduledRunResponse: object expected"); + message.lastScheduledRunResponse = $root.google.cloud.aiplatform.v1beta1.Schedule.RunResponse.fromObject(object.lastScheduledRunResponse); + } return message; }; @@ -331293,6 +337029,8 @@ object.startedRunCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.startedRunCount = options.longs === String ? "0" : 0; + object.lastScheduledRunResponse = null; + object.updateTime = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -331341,6 +337079,10 @@ object.startedRunCount = options.longs === String ? String(message.startedRunCount) : message.startedRunCount; else object.startedRunCount = options.longs === String ? $util.Long.prototype.toString.call(message.startedRunCount) : options.longs === Number ? new $util.LongBits(message.startedRunCount.low >>> 0, message.startedRunCount.high >>> 0).toNumber() : message.startedRunCount; + if (message.lastScheduledRunResponse != null && message.hasOwnProperty("lastScheduledRunResponse")) + object.lastScheduledRunResponse = $root.google.cloud.aiplatform.v1beta1.Schedule.RunResponse.toObject(message.lastScheduledRunResponse, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); return object; }; @@ -331370,6 +337112,238 @@ return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.Schedule"; }; + Schedule.RunResponse = (function() { + + /** + * Properties of a RunResponse. + * @memberof google.cloud.aiplatform.v1beta1.Schedule + * @interface IRunResponse + * @property {google.protobuf.ITimestamp|null} [scheduledRunTime] RunResponse scheduledRunTime + * @property {string|null} [runResponse] RunResponse runResponse + */ + + /** + * Constructs a new RunResponse. + * @memberof google.cloud.aiplatform.v1beta1.Schedule + * @classdesc Represents a RunResponse. + * @implements IRunResponse + * @constructor + * @param {google.cloud.aiplatform.v1beta1.Schedule.IRunResponse=} [properties] Properties to set + */ + function RunResponse(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]]; + } + + /** + * RunResponse scheduledRunTime. + * @member {google.protobuf.ITimestamp|null|undefined} scheduledRunTime + * @memberof google.cloud.aiplatform.v1beta1.Schedule.RunResponse + * @instance + */ + RunResponse.prototype.scheduledRunTime = null; + + /** + * RunResponse runResponse. + * @member {string} runResponse + * @memberof google.cloud.aiplatform.v1beta1.Schedule.RunResponse + * @instance + */ + RunResponse.prototype.runResponse = ""; + + /** + * Creates a new RunResponse instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.Schedule.RunResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.Schedule.IRunResponse=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.Schedule.RunResponse} RunResponse instance + */ + RunResponse.create = function create(properties) { + return new RunResponse(properties); + }; + + /** + * Encodes the specified RunResponse message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.Schedule.RunResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.Schedule.RunResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.Schedule.IRunResponse} message RunResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.scheduledRunTime != null && Object.hasOwnProperty.call(message, "scheduledRunTime")) + $root.google.protobuf.Timestamp.encode(message.scheduledRunTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.runResponse != null && Object.hasOwnProperty.call(message, "runResponse")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.runResponse); + return writer; + }; + + /** + * Encodes the specified RunResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.Schedule.RunResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.Schedule.RunResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.Schedule.IRunResponse} message RunResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.Schedule.RunResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.Schedule.RunResponse} RunResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.Schedule.RunResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.scheduledRunTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.runResponse = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.Schedule.RunResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.Schedule.RunResponse} RunResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunResponse message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.Schedule.RunResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.scheduledRunTime != null && message.hasOwnProperty("scheduledRunTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.scheduledRunTime); + if (error) + return "scheduledRunTime." + error; + } + if (message.runResponse != null && message.hasOwnProperty("runResponse")) + if (!$util.isString(message.runResponse)) + return "runResponse: string expected"; + return null; + }; + + /** + * Creates a RunResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.Schedule.RunResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.Schedule.RunResponse} RunResponse + */ + RunResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.Schedule.RunResponse) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.Schedule.RunResponse(); + if (object.scheduledRunTime != null) { + if (typeof object.scheduledRunTime !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.Schedule.RunResponse.scheduledRunTime: object expected"); + message.scheduledRunTime = $root.google.protobuf.Timestamp.fromObject(object.scheduledRunTime); + } + if (object.runResponse != null) + message.runResponse = String(object.runResponse); + return message; + }; + + /** + * Creates a plain object from a RunResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.Schedule.RunResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.Schedule.RunResponse} message RunResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.scheduledRunTime = null; + object.runResponse = ""; + } + if (message.scheduledRunTime != null && message.hasOwnProperty("scheduledRunTime")) + object.scheduledRunTime = $root.google.protobuf.Timestamp.toObject(message.scheduledRunTime, options); + if (message.runResponse != null && message.hasOwnProperty("runResponse")) + object.runResponse = message.runResponse; + return object; + }; + + /** + * Converts this RunResponse to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.Schedule.RunResponse + * @instance + * @returns {Object.} JSON object + */ + RunResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunResponse + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.Schedule.RunResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.Schedule.RunResponse"; + }; + + return RunResponse; + })(); + /** * State enum. * @name google.cloud.aiplatform.v1beta1.Schedule.State @@ -331621,6 +337595,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.ScheduleService|updateSchedule}. + * @memberof google.cloud.aiplatform.v1beta1.ScheduleService + * @typedef UpdateScheduleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.aiplatform.v1beta1.Schedule} [response] Schedule + */ + + /** + * Calls UpdateSchedule. + * @function updateSchedule + * @memberof google.cloud.aiplatform.v1beta1.ScheduleService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IUpdateScheduleRequest} request UpdateScheduleRequest message or plain object + * @param {google.cloud.aiplatform.v1beta1.ScheduleService.UpdateScheduleCallback} callback Node-style callback called with the error, if any, and Schedule + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ScheduleService.prototype.updateSchedule = function updateSchedule(request, callback) { + return this.rpcCall(updateSchedule, $root.google.cloud.aiplatform.v1beta1.UpdateScheduleRequest, $root.google.cloud.aiplatform.v1beta1.Schedule, request, callback); + }, "name", { value: "UpdateSchedule" }); + + /** + * Calls UpdateSchedule. + * @function updateSchedule + * @memberof google.cloud.aiplatform.v1beta1.ScheduleService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IUpdateScheduleRequest} request UpdateScheduleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return ScheduleService; })(); @@ -333236,6 +339243,243 @@ return ResumeScheduleRequest; })(); + v1beta1.UpdateScheduleRequest = (function() { + + /** + * Properties of an UpdateScheduleRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IUpdateScheduleRequest + * @property {google.cloud.aiplatform.v1beta1.ISchedule|null} [schedule] UpdateScheduleRequest schedule + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateScheduleRequest updateMask + */ + + /** + * Constructs a new UpdateScheduleRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents an UpdateScheduleRequest. + * @implements IUpdateScheduleRequest + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IUpdateScheduleRequest=} [properties] Properties to set + */ + function UpdateScheduleRequest(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]]; + } + + /** + * UpdateScheduleRequest schedule. + * @member {google.cloud.aiplatform.v1beta1.ISchedule|null|undefined} schedule + * @memberof google.cloud.aiplatform.v1beta1.UpdateScheduleRequest + * @instance + */ + UpdateScheduleRequest.prototype.schedule = null; + + /** + * UpdateScheduleRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.aiplatform.v1beta1.UpdateScheduleRequest + * @instance + */ + UpdateScheduleRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateScheduleRequest instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.UpdateScheduleRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IUpdateScheduleRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.UpdateScheduleRequest} UpdateScheduleRequest instance + */ + UpdateScheduleRequest.create = function create(properties) { + return new UpdateScheduleRequest(properties); + }; + + /** + * Encodes the specified UpdateScheduleRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.UpdateScheduleRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.UpdateScheduleRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IUpdateScheduleRequest} message UpdateScheduleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateScheduleRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) + $root.google.cloud.aiplatform.v1beta1.Schedule.encode(message.schedule, 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 UpdateScheduleRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.UpdateScheduleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.UpdateScheduleRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IUpdateScheduleRequest} message UpdateScheduleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateScheduleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateScheduleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.UpdateScheduleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.UpdateScheduleRequest} UpdateScheduleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateScheduleRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.UpdateScheduleRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.schedule = $root.google.cloud.aiplatform.v1beta1.Schedule.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 UpdateScheduleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.UpdateScheduleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.UpdateScheduleRequest} UpdateScheduleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateScheduleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateScheduleRequest message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.UpdateScheduleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateScheduleRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.schedule != null && message.hasOwnProperty("schedule")) { + var error = $root.google.cloud.aiplatform.v1beta1.Schedule.verify(message.schedule); + if (error) + return "schedule." + 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 UpdateScheduleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.UpdateScheduleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.UpdateScheduleRequest} UpdateScheduleRequest + */ + UpdateScheduleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.UpdateScheduleRequest) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.UpdateScheduleRequest(); + if (object.schedule != null) { + if (typeof object.schedule !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.UpdateScheduleRequest.schedule: object expected"); + message.schedule = $root.google.cloud.aiplatform.v1beta1.Schedule.fromObject(object.schedule); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.UpdateScheduleRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateScheduleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.UpdateScheduleRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.UpdateScheduleRequest} message UpdateScheduleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateScheduleRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.schedule = null; + object.updateMask = null; + } + if (message.schedule != null && message.hasOwnProperty("schedule")) + object.schedule = $root.google.cloud.aiplatform.v1beta1.Schedule.toObject(message.schedule, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateScheduleRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.UpdateScheduleRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateScheduleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateScheduleRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.UpdateScheduleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateScheduleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.UpdateScheduleRequest"; + }; + + return UpdateScheduleRequest; + })(); + v1beta1.schema = (function() { /** @@ -361842,6 +368086,7 @@ * @property {google.protobuf.ITimestamp|null} [updateTime] Tensorboard updateTime * @property {Object.|null} [labels] Tensorboard labels * @property {string|null} [etag] Tensorboard etag + * @property {boolean|null} [isDefault] Tensorboard isDefault */ /** @@ -361940,6 +368185,14 @@ */ Tensorboard.prototype.etag = ""; + /** + * Tensorboard isDefault. + * @member {boolean} isDefault + * @memberof google.cloud.aiplatform.v1beta1.Tensorboard + * @instance + */ + Tensorboard.prototype.isDefault = false; + /** * Creates a new Tensorboard instance using the specified properties. * @function create @@ -361985,6 +368238,8 @@ writer.uint32(/* id 10, wireType 2 =*/82).string(message.blobStoragePathPrefix); if (message.encryptionSpec != null && Object.hasOwnProperty.call(message, "encryptionSpec")) $root.google.cloud.aiplatform.v1beta1.EncryptionSpec.encode(message.encryptionSpec, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.isDefault != null && Object.hasOwnProperty.call(message, "isDefault")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.isDefault); return writer; }; @@ -362078,6 +368333,10 @@ message.etag = reader.string(); break; } + case 12: { + message.isDefault = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -362154,6 +368413,9 @@ if (message.etag != null && message.hasOwnProperty("etag")) if (!$util.isString(message.etag)) return "etag: string expected"; + if (message.isDefault != null && message.hasOwnProperty("isDefault")) + if (typeof message.isDefault !== "boolean") + return "isDefault: boolean expected"; return null; }; @@ -362203,6 +368465,8 @@ } if (object.etag != null) message.etag = String(object.etag); + if (object.isDefault != null) + message.isDefault = Boolean(object.isDefault); return message; }; @@ -362231,6 +368495,7 @@ object.etag = ""; object.blobStoragePathPrefix = ""; object.encryptionSpec = null; + object.isDefault = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -362256,6 +368521,8 @@ object.blobStoragePathPrefix = message.blobStoragePathPrefix; if (message.encryptionSpec != null && message.hasOwnProperty("encryptionSpec")) object.encryptionSpec = $root.google.cloud.aiplatform.v1beta1.EncryptionSpec.toObject(message.encryptionSpec, options); + if (message.isDefault != null && message.hasOwnProperty("isDefault")) + object.isDefault = message.isDefault; return object; }; diff --git a/packages/google-cloud-aiplatform/protos/protos.json b/packages/google-cloud-aiplatform/protos/protos.json index 8ac3d1d8c9e..779d1624196 100644 --- a/packages/google-cloud-aiplatform/protos/protos.json +++ b/packages/google-cloud-aiplatform/protos/protos.json @@ -28,6 +28,7 @@ "NVIDIA_TESLA_P4": 4, "NVIDIA_TESLA_T4": 5, "NVIDIA_TESLA_A100": 8, + "NVIDIA_L4": 11, "TPU_V2": 6, "TPU_V3": 7, "TPU_V4_POD": 10 @@ -691,7 +692,8 @@ "oneof": [ "sampledShapleyAttribution", "integratedGradientsAttribution", - "xraiAttribution" + "xraiAttribution", + "examples" ] } }, @@ -708,6 +710,10 @@ "type": "XraiAttribution", "id": 3 }, + "examples": { + "type": "Examples", + "id": 7 + }, "topK": { "type": "int32", "id": 4 @@ -822,6 +828,99 @@ } } }, + "Examples": { + "oneofs": { + "source": { + "oneof": [ + "exampleGcsSource" + ] + }, + "config": { + "oneof": [ + "nearestNeighborSearchConfig", + "presets" + ] + } + }, + "fields": { + "exampleGcsSource": { + "type": "ExampleGcsSource", + "id": 5 + }, + "nearestNeighborSearchConfig": { + "type": "google.protobuf.Value", + "id": 2 + }, + "presets": { + "type": "Presets", + "id": 4 + }, + "neighborCount": { + "type": "int32", + "id": 3 + } + }, + "nested": { + "ExampleGcsSource": { + "fields": { + "dataFormat": { + "type": "DataFormat", + "id": 1 + }, + "gcsSource": { + "type": "GcsSource", + "id": 2 + } + }, + "nested": { + "DataFormat": { + "values": { + "DATA_FORMAT_UNSPECIFIED": 0, + "JSONL": 1 + } + } + } + } + } + }, + "Presets": { + "oneofs": { + "_query": { + "oneof": [ + "query" + ] + } + }, + "fields": { + "query": { + "type": "Query", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "modality": { + "type": "Modality", + "id": 2 + } + }, + "nested": { + "Query": { + "values": { + "PRECISE": 0, + "FAST": 1 + } + }, + "Modality": { + "values": { + "MODALITY_UNSPECIFIED": 0, + "IMAGE": 1, + "TEXT": 2, + "TABULAR": 3 + } + } + } + }, "ExplanationSpecOverride": { "fields": { "parameters": { @@ -1769,7 +1868,8 @@ "AUTOML": 1, "CUSTOM": 2, "BQML": 3, - "MODEL_GARDEN": 4 + "MODEL_GARDEN": 4, + "GENIE": 5 } } } @@ -2025,6 +2125,22 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "experiment": { + "type": "string", + "id": 17, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "aiplatform.googleapis.com/Context" + } + }, + "experimentRun": { + "type": "string", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "aiplatform.googleapis.com/Context" + } } } }, @@ -3404,7 +3520,7 @@ "Endpoint": { "options": { "(google.api.resource).type": "aiplatform.googleapis.com/Endpoint", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/endpoints/{endpoint}" + "(google.api.resource).pattern": "projects/{project}/locations/{location}/publishers/{publisher}/models/{model}" }, "fields": { "name": { @@ -3792,6 +3908,34 @@ } } ] + }, + "MutateDeployedModel": { + "requestType": "MutateDeployedModelRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{endpoint=projects/*/locations/*/endpoints/*}:mutateDeployedModel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "endpoint,deployed_model,update_mask", + "(google.longrunning.operation_info).response_type": "MutateDeployedModelResponse", + "(google.longrunning.operation_info).metadata_type": "MutateDeployedModelOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{endpoint=projects/*/locations/*/endpoints/*}:mutateDeployedModel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "endpoint,deployed_model,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "MutateDeployedModelResponse", + "metadata_type": "MutateDeployedModelOperationMetadata" + } + } + ] } } }, @@ -4003,6 +4147,48 @@ } } }, + "MutateDeployedModelRequest": { + "fields": { + "endpoint": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "aiplatform.googleapis.com/Endpoint" + } + }, + "deployedModel": { + "type": "DeployedModel", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MutateDeployedModelResponse": { + "fields": { + "deployedModel": { + "type": "DeployedModel", + "id": 1 + } + } + }, + "MutateDeployedModelOperationMetadata": { + "fields": { + "genericMetadata": { + "type": "GenericOperationMetadata", + "id": 1 + } + } + }, "EntityType": { "options": { "(google.api.resource).type": "aiplatform.googleapis.com/EntityType", @@ -4058,6 +4244,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "offlineStorageTtlDays": { + "type": "int32", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -4604,6 +4797,13 @@ "(google.api.field_behavior)": "OUTPUT_ONLY" } }, + "onlineStorageTtlDays": { + "type": "int32", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "encryptionSpec": { "type": "EncryptionSpec", "id": 10, @@ -15237,13 +15437,19 @@ "options": { "(google.api.http).post": "/v1/{endpoint=projects/*/locations/*/endpoints/*}:predict", "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:predict", + "(google.api.http).additional_bindings.body": "*", "(google.api.method_signature)": "endpoint,instances,parameters" }, "parsedOptions": [ { "(google.api.http)": { "post": "/v1/{endpoint=projects/*/locations/*/endpoints/*}:predict", - "body": "*" + "body": "*", + "additional_bindings": { + "post": "/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:predict", + "body": "*" + } } }, { @@ -15257,13 +15463,19 @@ "options": { "(google.api.http).post": "/v1/{endpoint=projects/*/locations/*/endpoints/*}:rawPredict", "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:rawPredict", + "(google.api.http).additional_bindings.body": "*", "(google.api.method_signature)": "endpoint,http_body" }, "parsedOptions": [ { "(google.api.http)": { "post": "/v1/{endpoint=projects/*/locations/*/endpoints/*}:rawPredict", - "body": "*" + "body": "*", + "additional_bindings": { + "post": "/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:rawPredict", + "body": "*" + } } }, { @@ -16831,6 +17043,10 @@ "etag": { "type": "string", "id": 9 + }, + "isDefault": { + "type": "bool", + "id": 12 } } }, @@ -19168,6 +19384,7 @@ "NVIDIA_TESLA_T4": 5, "NVIDIA_TESLA_A100": 8, "NVIDIA_A100_80GB": 9, + "NVIDIA_L4": 11, "TPU_V2": 6, "TPU_V3": 7, "TPU_V4_POD": 10 @@ -19985,6 +20202,11 @@ }, "Examples": { "oneofs": { + "source": { + "oneof": [ + "exampleGcsSource" + ] + }, "config": { "oneof": [ "nearestNeighborSearchConfig", @@ -19993,6 +20215,10 @@ } }, "fields": { + "exampleGcsSource": { + "type": "ExampleGcsSource", + "id": 5 + }, "nearestNeighborSearchConfig": { "type": "google.protobuf.Value", "id": 2 @@ -20009,6 +20235,28 @@ "type": "int32", "id": 3 } + }, + "nested": { + "ExampleGcsSource": { + "fields": { + "dataFormat": { + "type": "DataFormat", + "id": 1 + }, + "gcsSource": { + "type": "GcsSource", + "id": 2 + } + }, + "nested": { + "DataFormat": { + "values": { + "DATA_FORMAT_UNSPECIFIED": 0, + "JSONL": 1 + } + } + } + } } }, "Presets": { @@ -21437,6 +21685,17 @@ } } }, + "LargeModelReference": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, "PredictSchemata": { "fields": { "instanceSchemaUri": { @@ -21545,7 +21804,8 @@ "AUTOML": 1, "CUSTOM": 2, "BQML": 3, - "MODEL_GARDEN": 4 + "MODEL_GARDEN": 4, + "GENIE": 5 } } } @@ -21801,6 +22061,22 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "experiment": { + "type": "string", + "id": 17, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "aiplatform.googleapis.com/Context" + } + }, + "experimentRun": { + "type": "string", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "aiplatform.googleapis.com/Context" + } } } }, @@ -23472,7 +23748,7 @@ "Endpoint": { "options": { "(google.api.resource).type": "aiplatform.googleapis.com/Endpoint", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/endpoints/{endpoint}" + "(google.api.resource).pattern": "projects/{project}/locations/{location}/publishers/{publisher}/models/{model}" }, "fields": { "name": { @@ -23872,6 +24148,34 @@ } } ] + }, + "MutateDeployedModel": { + "requestType": "MutateDeployedModelRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{endpoint=projects/*/locations/*/endpoints/*}:mutateDeployedModel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "endpoint,deployed_model,update_mask", + "(google.longrunning.operation_info).response_type": "MutateDeployedModelResponse", + "(google.longrunning.operation_info).metadata_type": "MutateDeployedModelOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{endpoint=projects/*/locations/*/endpoints/*}:mutateDeployedModel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "endpoint,deployed_model,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "MutateDeployedModelResponse", + "metadata_type": "MutateDeployedModelOperationMetadata" + } + } + ] } } }, @@ -24079,6 +24383,48 @@ } } }, + "MutateDeployedModelRequest": { + "fields": { + "endpoint": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "aiplatform.googleapis.com/Endpoint" + } + }, + "deployedModel": { + "type": "DeployedModel", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "MutateDeployedModelResponse": { + "fields": { + "deployedModel": { + "type": "DeployedModel", + "id": 1 + } + } + }, + "MutateDeployedModelOperationMetadata": { + "fields": { + "genericMetadata": { + "type": "GenericOperationMetadata", + "id": 1 + } + } + }, "EntityType": { "options": { "(google.api.resource).type": "aiplatform.googleapis.com/EntityType", @@ -32918,6 +33264,334 @@ } } }, + "ModelGardenService": { + "options": { + "(google.api.default_host)": "aiplatform.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "GetPublisherModel": { + "requestType": "GetPublisherModelRequest", + "responseType": "PublisherModel", + "options": { + "(google.api.http).get": "/v1beta1/{name=publishers/*/models/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=publishers/*/models/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "PublisherModelView": { + "values": { + "PUBLISHER_MODEL_VIEW_UNSPECIFIED": 0, + "PUBLISHER_MODEL_VIEW_BASIC": 1, + "PUBLISHER_MODEL_VIEW_FULL": 2, + "PUBLISHER_MODEL_VERSION_VIEW_BASIC": 3 + } + }, + "GetPublisherModelRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "aiplatform.googleapis.com/PublisherModel" + } + }, + "languageCode": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "view": { + "type": "PublisherModelView", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "PublisherModel": { + "options": { + "(google.api.resource).type": "aiplatform.googleapis.com/PublisherModel", + "(google.api.resource).pattern": "publishers/{publisher}/models/{model}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "versionId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "openSourceCategory": { + "type": "OpenSourceCategory", + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "supportedActions": { + "type": "CallToAction", + "id": 19, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "frameworks": { + "rule": "repeated", + "type": "string", + "id": 23, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "publisherModelTemplate": { + "type": "string", + "id": 30, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "predictSchemata": { + "type": "PredictSchemata", + "id": 31, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "ResourceReference": { + "oneofs": { + "reference": { + "oneof": [ + "uri", + "resourceName" + ] + } + }, + "fields": { + "uri": { + "type": "string", + "id": 1 + }, + "resourceName": { + "type": "string", + "id": 2 + } + } + }, + "Documentation": { + "fields": { + "title": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "content": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CallToAction": { + "fields": { + "viewRestApi": { + "type": "ViewRestApi", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "openNotebook": { + "type": "RegionalResourceReferences", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createApplication": { + "type": "RegionalResourceReferences", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "openFineTuningPipeline": { + "type": "RegionalResourceReferences", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "openPromptTuningPipeline": { + "type": "RegionalResourceReferences", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "openGenie": { + "type": "RegionalResourceReferences", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "deploy": { + "type": "Deploy", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "openGenerationAiStudio": { + "type": "RegionalResourceReferences", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "RegionalResourceReferences": { + "fields": { + "references": { + "keyType": "string", + "type": "ResourceReference", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "title": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ViewRestApi": { + "fields": { + "documentations": { + "rule": "repeated", + "type": "Documentation", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "title": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Deploy": { + "oneofs": { + "predictionResources": { + "oneof": [ + "dedicatedResources", + "automaticResources", + "sharedResources" + ] + } + }, + "fields": { + "dedicatedResources": { + "type": "DedicatedResources", + "id": 5 + }, + "automaticResources": { + "type": "AutomaticResources", + "id": 6 + }, + "sharedResources": { + "type": "string", + "id": 7 + }, + "modelDisplayName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "largeModelReference": { + "type": "LargeModelReference", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "containerSpec": { + "type": "ModelContainerSpec", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "artifactUri": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "title": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "OpenSourceCategory": { + "values": { + "OPEN_SOURCE_CATEGORY_UNSPECIFIED": 0, + "PROPRIETARY": 1, + "GOOGLE_OWNED_OSS_WITH_GOOGLE_CHECKPOINT": 2, + "THIRD_PARTY_OWNED_OSS_WITH_GOOGLE_CHECKPOINT": 3, + "GOOGLE_OWNED_OSS": 4, + "THIRD_PARTY_OWNED_OSS": 5 + } + } + } + }, "ModelService": { "options": { "(google.api.default_host)": "aiplatform.googleapis.com", @@ -35088,13 +35762,19 @@ "options": { "(google.api.http).post": "/v1beta1/{endpoint=projects/*/locations/*/endpoints/*}:predict", "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1beta1/{endpoint=projects/*/locations/*/publishers/*/models/*}:predict", + "(google.api.http).additional_bindings.body": "*", "(google.api.method_signature)": "endpoint,instances,parameters" }, "parsedOptions": [ { "(google.api.http)": { "post": "/v1beta1/{endpoint=projects/*/locations/*/endpoints/*}:predict", - "body": "*" + "body": "*", + "additional_bindings": { + "post": "/v1beta1/{endpoint=projects/*/locations/*/publishers/*/models/*}:predict", + "body": "*" + } } }, { @@ -35108,13 +35788,19 @@ "options": { "(google.api.http).post": "/v1beta1/{endpoint=projects/*/locations/*/endpoints/*}:rawPredict", "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1beta1/{endpoint=projects/*/locations/*/publishers/*/models/*}:rawPredict", + "(google.api.http).additional_bindings.body": "*", "(google.api.method_signature)": "endpoint,http_body" }, "parsedOptions": [ { "(google.api.http)": { "post": "/v1beta1/{endpoint=projects/*/locations/*/endpoints/*}:rawPredict", - "body": "*" + "body": "*", + "additional_bindings": { + "post": "/v1beta1/{endpoint=projects/*/locations/*/publishers/*/models/*}:rawPredict", + "body": "*" + } } }, { @@ -35351,6 +36037,13 @@ "(google.api.field_behavior)": "OUTPUT_ONLY" } }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 19, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "nextRunTime": { "type": "google.protobuf.Timestamp", "id": 7, @@ -35392,9 +36085,28 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "lastScheduledRunResponse": { + "type": "RunResponse", + "id": 18, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { + "RunResponse": { + "fields": { + "scheduledRunTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "runResponse": { + "type": "string", + "id": 2 + } + } + }, "State": { "values": { "STATE_UNSPECIFIED": 0, @@ -35519,7 +36231,7 @@ "options": { "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/schedules/*}:resume", "(google.api.http).body": "*", - "(google.api.method_signature)": "name" + "(google.api.method_signature)": "name,catch_up" }, "parsedOptions": [ { @@ -35530,6 +36242,29 @@ }, { "(google.api.method_signature)": "name" + }, + { + "(google.api.method_signature)": "name,catch_up" + } + ] + }, + "UpdateSchedule": { + "requestType": "UpdateScheduleRequest", + "responseType": "Schedule", + "options": { + "(google.api.http).patch": "/v1beta1/{schedule.name=projects/*/locations/*/schedules/*}", + "(google.api.http).body": "schedule", + "(google.api.method_signature)": "schedule,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta1/{schedule.name=projects/*/locations/*/schedules/*}", + "body": "schedule" + } + }, + { + "(google.api.method_signature)": "schedule,update_mask" } ] } @@ -35650,6 +36385,24 @@ } } }, + "UpdateScheduleRequest": { + "fields": { + "schedule": { + "type": "Schedule", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, "schema": { "options": { "csharp_namespace": "Google.Cloud.AIPlatform.V1Beta1.Schema", @@ -37744,6 +38497,10 @@ "etag": { "type": "string", "id": 9 + }, + "isDefault": { + "type": "bool", + "id": 12 } } }, diff --git a/packages/google-cloud-aiplatform/samples/README.md b/packages/google-cloud-aiplatform/samples/README.md index 278bc8c20cf..170299a4197 100644 --- a/packages/google-cloud-aiplatform/samples/README.md +++ b/packages/google-cloud-aiplatform/samples/README.md @@ -29,6 +29,7 @@ * [Endpoint_service.deploy_model](#endpoint_service.deploy_model) * [Endpoint_service.get_endpoint](#endpoint_service.get_endpoint) * [Endpoint_service.list_endpoints](#endpoint_service.list_endpoints) + * [Endpoint_service.mutate_deployed_model](#endpoint_service.mutate_deployed_model) * [Endpoint_service.undeploy_model](#endpoint_service.undeploy_model) * [Endpoint_service.update_endpoint](#endpoint_service.update_endpoint) * [Featurestore_online_serving_service.read_feature_values](#featurestore_online_serving_service.read_feature_values) @@ -240,6 +241,7 @@ * [Endpoint_service.deploy_model](#endpoint_service.deploy_model) * [Endpoint_service.get_endpoint](#endpoint_service.get_endpoint) * [Endpoint_service.list_endpoints](#endpoint_service.list_endpoints) + * [Endpoint_service.mutate_deployed_model](#endpoint_service.mutate_deployed_model) * [Endpoint_service.undeploy_model](#endpoint_service.undeploy_model) * [Endpoint_service.update_endpoint](#endpoint_service.update_endpoint) * [Featurestore_online_serving_service.read_feature_values](#featurestore_online_serving_service.read_feature_values) @@ -352,6 +354,7 @@ * [Metadata_service.update_execution](#metadata_service.update_execution) * [Migration_service.batch_migrate_resources](#migration_service.batch_migrate_resources) * [Migration_service.search_migratable_resources](#migration_service.search_migratable_resources) + * [Model_garden_service.get_publisher_model](#model_garden_service.get_publisher_model) * [Model_service.batch_import_evaluated_annotations](#model_service.batch_import_evaluated_annotations) * [Model_service.batch_import_model_evaluation_slices](#model_service.batch_import_model_evaluation_slices) * [Model_service.copy_model](#model_service.copy_model) @@ -389,6 +392,7 @@ * [Schedule_service.list_schedules](#schedule_service.list_schedules) * [Schedule_service.pause_schedule](#schedule_service.pause_schedule) * [Schedule_service.resume_schedule](#schedule_service.resume_schedule) + * [Schedule_service.update_schedule](#schedule_service.update_schedule) * [Specialist_pool_service.create_specialist_pool](#specialist_pool_service.create_specialist_pool) * [Specialist_pool_service.delete_specialist_pool](#specialist_pool_service.delete_specialist_pool) * [Specialist_pool_service.get_specialist_pool](#specialist_pool_service.get_specialist_pool) @@ -439,7 +443,6 @@ * [Vizier_service.stop_trial](#vizier_service.stop_trial) * [Vizier_service.suggest_trials](#vizier_service.suggest_trials) * [Quickstart](#quickstart) - * [Quickstart.test](#quickstart.test) ## Before you begin @@ -745,6 +748,23 @@ __Usage:__ +### Endpoint_service.mutate_deployed_model + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.mutate_deployed_model.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.mutate_deployed_model.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.mutate_deployed_model.js` + + +----- + + + + ### Endpoint_service.undeploy_model View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.undeploy_model.js). @@ -4332,6 +4352,23 @@ __Usage:__ +### Endpoint_service.mutate_deployed_model + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.mutate_deployed_model.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.mutate_deployed_model.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.mutate_deployed_model.js` + + +----- + + + + ### Endpoint_service.undeploy_model View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.undeploy_model.js). @@ -6236,6 +6273,23 @@ __Usage:__ +### Model_garden_service.get_publisher_model + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_garden_service.get_publisher_model.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/model_garden_service.get_publisher_model.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-aiplatform/samples/generated/v1beta1/model_garden_service.get_publisher_model.js` + + +----- + + + + ### Model_service.batch_import_evaluated_annotations View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.batch_import_evaluated_annotations.js). @@ -6865,6 +6919,23 @@ __Usage:__ +### Schedule_service.update_schedule + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.update_schedule.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.update_schedule.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.update_schedule.js` + + +----- + + + + ### Specialist_pool_service.create_specialist_pool View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/specialist_pool_service.create_specialist_pool.js). @@ -7710,23 +7781,6 @@ __Usage:__ `node packages/google-cloud-aiplatform/samples/quickstart.js` ------ - - - - -### Quickstart.test - -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/test/quickstart.test.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/test/quickstart.test.js,samples/README.md) - -__Usage:__ - - -`node packages/google-cloud-aiplatform/samples/test/quickstart.test.js` - - diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.mutate_deployed_model.js b/packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.mutate_deployed_model.js new file mode 100644 index 00000000000..324e99ff3c4 --- /dev/null +++ b/packages/google-cloud-aiplatform/samples/generated/v1/endpoint_service.mutate_deployed_model.js @@ -0,0 +1,85 @@ +// Copyright 2023 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(endpoint, deployedModel, updateMask) { + // [START aiplatform_v1_generated_EndpointService_MutateDeployedModel_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 Endpoint resource into which to mutate a + * DeployedModel. Format: + * `projects/{project}/locations/{location}/endpoints/{endpoint}` + */ + // const endpoint = 'abc123' + /** + * Required. The DeployedModel to be mutated within the Endpoint. Only the + * following fields can be mutated: + * * `min_replica_count` in either + * DedicatedResources google.cloud.aiplatform.v1.DedicatedResources or + * AutomaticResources google.cloud.aiplatform.v1.AutomaticResources + * * `max_replica_count` in either + * DedicatedResources google.cloud.aiplatform.v1.DedicatedResources or + * AutomaticResources google.cloud.aiplatform.v1.AutomaticResources + * * autoscaling_metric_specs google.cloud.aiplatform.v1.DedicatedResources.autoscaling_metric_specs + * * `disable_container_logging` (v1 only) + * * `enable_container_logging` (v1beta1 only) + */ + // const deployedModel = {} + /** + * Required. The update mask applies to the resource. See + * google.protobuf.FieldMask google.protobuf.FieldMask. + */ + // const updateMask = {} + + // Imports the Aiplatform library + const {EndpointServiceClient} = require('@google-cloud/aiplatform').v1; + + // Instantiates a client + const aiplatformClient = new EndpointServiceClient(); + + async function callMutateDeployedModel() { + // Construct request + const request = { + endpoint, + deployedModel, + updateMask, + }; + + // Run request + const [operation] = await aiplatformClient.mutateDeployedModel(request); + const [response] = await operation.promise(); + console.log(response); + } + + callMutateDeployedModel(); + // [END aiplatform_v1_generated_EndpointService_MutateDeployedModel_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.update_entity_type.js b/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.update_entity_type.js index 9178e15569b..6ecbd8a7a60 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.update_entity_type.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.update_entity_type.js @@ -52,7 +52,7 @@ function main(entityType) { * * `monitoring_config.import_features_analysis.anomaly_detection_baseline` * * `monitoring_config.numerical_threshold_config.value` * * `monitoring_config.categorical_threshold_config.value` - * * `offline_storage_ttl_days` (available in Preview) + * * `offline_storage_ttl_days` */ // const updateMask = {} diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.update_featurestore.js b/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.update_featurestore.js index 4b299d8bd77..9640bf48384 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.update_featurestore.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1/featurestore_service.update_featurestore.js @@ -46,7 +46,7 @@ function main(featurestore) { * * `labels` * * `online_serving_config.fixed_node_count` * * `online_serving_config.scaling` - * * `online_storage_ttl_days` (available in Preview) + * * `online_storage_ttl_days` */ // const updateMask = {} diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/model_service.list_model_versions.js b/packages/google-cloud-aiplatform/samples/generated/v1/model_service.list_model_versions.js index 545e16c88bc..fdd0680bc50 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1/model_service.list_model_versions.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1/model_service.list_model_versions.js @@ -39,8 +39,10 @@ function main(name) { /** * The standard list page token. * Typically obtained via - * ListModelVersionsResponse.next_page_token google.cloud.aiplatform.v1.ListModelVersionsResponse.next_page_token - * of the previous ModelService.ListModelversions call. + * next_page_token google.cloud.aiplatform.v1.ListModelVersionsResponse.next_page_token + * of the previous + * ListModelVersions google.cloud.aiplatform.v1.ModelService.ListModelVersions + * call. */ // const pageToken = 'abc123' /** diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json b/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json index c7922cf4792..5cca960f083 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json +++ b/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-aiplatform", - "version": "2.8.1", + "version": "2.14.0", "language": "TYPESCRIPT", "apis": [ { @@ -971,6 +971,54 @@ } } }, + { + "regionTag": "aiplatform_v1_generated_EndpointService_MutateDeployedModel_async", + "title": "DatasetService mutateDeployedModel Sample", + "origin": "API_DEFINITION", + "description": " Updates an existing deployed model. Updatable fields include `min_replica_count`, `max_replica_count`, `autoscaling_metric_specs`, `disable_container_logging` (v1 only), and `enable_container_logging` (v1beta1 only).", + "canonical": true, + "file": "endpoint_service.mutate_deployed_model.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "MutateDeployedModel", + "fullName": "google.cloud.aiplatform.v1.EndpointService.MutateDeployedModel", + "async": true, + "parameters": [ + { + "name": "endpoint", + "type": "TYPE_STRING" + }, + { + "name": "deployed_model", + "type": ".google.cloud.aiplatform.v1.DeployedModel" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EndpointServiceClient", + "fullName": "google.cloud.aiplatform.v1.EndpointServiceClient" + }, + "method": { + "shortName": "MutateDeployedModel", + "fullName": "google.cloud.aiplatform.v1.EndpointService.MutateDeployedModel", + "service": { + "shortName": "EndpointService", + "fullName": "google.cloud.aiplatform.v1.EndpointService" + } + } + } + }, { "regionTag": "aiplatform_v1_generated_FeaturestoreOnlineServingService_ReadFeatureValues_async", "title": "DatasetService readFeatureValues Sample", @@ -6146,7 +6194,7 @@ "segments": [ { "start": 25, - "end": 90, + "end": 92, "type": "FULL" } ], diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.export_tensorboard_time_series_data.js b/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.export_tensorboard_time_series_data.js index aecf725f5b4..3e1a343242b 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.export_tensorboard_time_series_data.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1/tensorboard_service.export_tensorboard_time_series_data.js @@ -46,11 +46,11 @@ function main(tensorboardTimeSeries) { // const pageSize = 1234 /** * A page token, received from a previous - * TensorboardService.ExportTensorboardTimeSeries call. - * Provide this to retrieve the subsequent page. + * ExportTensorboardTimeSeriesData google.cloud.aiplatform.v1.TensorboardService.ExportTensorboardTimeSeriesData + * call. Provide this to retrieve the subsequent page. * When paginating, all other parameters provided to - * TensorboardService.ExportTensorboardTimeSeries must - * match the call that provided the page token. + * ExportTensorboardTimeSeriesData google.cloud.aiplatform.v1.TensorboardService.ExportTensorboardTimeSeriesData + * must match the call that provided the page token. */ // const pageToken = 'abc123' /** diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.mutate_deployed_model.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.mutate_deployed_model.js new file mode 100644 index 00000000000..d14f0f1fea9 --- /dev/null +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.mutate_deployed_model.js @@ -0,0 +1,85 @@ +// Copyright 2023 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(endpoint, deployedModel, updateMask) { + // [START aiplatform_v1beta1_generated_EndpointService_MutateDeployedModel_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 Endpoint resource into which to mutate a + * DeployedModel. Format: + * `projects/{project}/locations/{location}/endpoints/{endpoint}` + */ + // const endpoint = 'abc123' + /** + * Required. The DeployedModel to be mutated within the Endpoint. Only the + * following fields can be mutated: + * * `min_replica_count` in either + * DedicatedResources google.cloud.aiplatform.v1beta1.DedicatedResources or + * AutomaticResources google.cloud.aiplatform.v1beta1.AutomaticResources + * * `max_replica_count` in either + * DedicatedResources google.cloud.aiplatform.v1beta1.DedicatedResources or + * AutomaticResources google.cloud.aiplatform.v1beta1.AutomaticResources + * * autoscaling_metric_specs google.cloud.aiplatform.v1beta1.DedicatedResources.autoscaling_metric_specs + * * `disable_container_logging` (v1 only) + * * `enable_container_logging` (v1beta1 only) + */ + // const deployedModel = {} + /** + * Required. The update mask applies to the resource. See + * google.protobuf.FieldMask google.protobuf.FieldMask. + */ + // const updateMask = {} + + // Imports the Aiplatform library + const {EndpointServiceClient} = require('@google-cloud/aiplatform').v1beta1; + + // Instantiates a client + const aiplatformClient = new EndpointServiceClient(); + + async function callMutateDeployedModel() { + // Construct request + const request = { + endpoint, + deployedModel, + updateMask, + }; + + // Run request + const [operation] = await aiplatformClient.mutateDeployedModel(request); + const [response] = await operation.promise(); + console.log(response); + } + + callMutateDeployedModel(); + // [END aiplatform_v1beta1_generated_EndpointService_MutateDeployedModel_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.update_entity_type.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.update_entity_type.js index c44781a7d36..a5503fa556f 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.update_entity_type.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.update_entity_type.js @@ -52,7 +52,7 @@ function main(entityType) { * * `monitoring_config.import_features_analysis.anomaly_detection_baseline` * * `monitoring_config.numerical_threshold_config.value` * * `monitoring_config.categorical_threshold_config.value` - * * `offline_storage_ttl_days` (available in Preview) + * * `offline_storage_ttl_days` */ // const updateMask = {} diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.update_featurestore.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.update_featurestore.js index 00871b21570..ba70ae7a4b9 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.update_featurestore.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/featurestore_service.update_featurestore.js @@ -46,7 +46,7 @@ function main(featurestore) { * * `labels` * * `online_serving_config.fixed_node_count` * * `online_serving_config.scaling` - * * `online_storage_ttl_days` (available in Preview) + * * `online_storage_ttl_days` */ // const updateMask = {} diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.find_neighbors.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.find_neighbors.js index a59431e2e8d..4de8b881880 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.find_neighbors.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.find_neighbors.js @@ -35,7 +35,7 @@ function main(indexEndpoint) { */ // const indexEndpoint = 'abc123' /** - * The ID of the DeploydIndex that will serve the request. This request is + * The ID of the DeployedIndex that will serve the request. This request is * sent to a specific IndexEndpoint, as per the IndexEndpoint.network. That * IndexEndpoint also has IndexEndpoint.deployed_indexes, and each such index * has a DeployedIndex.id field. diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.read_index_datapoints.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.read_index_datapoints.js index 0b8bd4d4fc6..2ca65a32959 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.read_index_datapoints.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.read_index_datapoints.js @@ -35,7 +35,7 @@ function main(indexEndpoint) { */ // const indexEndpoint = 'abc123' /** - * The ID of the DeploydIndex that will serve the request. + * The ID of the DeployedIndex that will serve the request. */ // const deployedIndexId = 'abc123' /** diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_garden_service.get_publisher_model.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_garden_service.get_publisher_model.js new file mode 100644 index 00000000000..6b2392776f6 --- /dev/null +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_garden_service.get_publisher_model.js @@ -0,0 +1,72 @@ +// Copyright 2023 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 aiplatform_v1beta1_generated_ModelGardenService_GetPublisherModel_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 PublisherModel resource. + * Format: + * `publishers/{publisher}/models/{publisher_model}` + */ + // const name = 'abc123' + /** + * Optional. The IETF BCP-47 language code representing the language in which + * the publisher model's text information should be written in (see go/bcp47). + */ + // const languageCode = 'abc123' + /** + * Optional. PublisherModel view specifying which fields to read. + */ + // const view = {} + + // Imports the Aiplatform library + const {ModelGardenServiceClient} = require('@google-cloud/aiplatform').v1beta1; + + // Instantiates a client + const aiplatformClient = new ModelGardenServiceClient(); + + async function callGetPublisherModel() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await aiplatformClient.getPublisherModel(request); + console.log(response); + } + + callGetPublisherModel(); + // [END aiplatform_v1beta1_generated_ModelGardenService_GetPublisherModel_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.list_model_versions.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.list_model_versions.js index c39d7342c70..10f0e2d46c7 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.list_model_versions.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_service.list_model_versions.js @@ -39,8 +39,10 @@ function main(name) { /** * The standard list page token. * Typically obtained via - * ListModelVersionsResponse.next_page_token google.cloud.aiplatform.v1beta1.ListModelVersionsResponse.next_page_token - * of the previous ModelService.ListModelversions call. + * next_page_token google.cloud.aiplatform.v1beta1.ListModelVersionsResponse.next_page_token + * of the previous + * ListModelVersions google.cloud.aiplatform.v1beta1.ModelService.ListModelVersions + * call. */ // const pageToken = 'abc123' /** diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.update_schedule.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.update_schedule.js new file mode 100644 index 00000000000..9b41b0a8f82 --- /dev/null +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.update_schedule.js @@ -0,0 +1,70 @@ +// Copyright 2023 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(schedule, updateMask) { + // [START aiplatform_v1beta1_generated_ScheduleService_UpdateSchedule_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 Schedule which replaces the resource on the server. + * The following restrictions will be applied: + * * The scheduled request type cannot be changed. + * * The output_only fields will be ignored if specified. + */ + // const schedule = {} + /** + * Required. The update mask applies to the resource. See + * google.protobuf.FieldMask google.protobuf.FieldMask. + */ + // const updateMask = {} + + // Imports the Aiplatform library + const {ScheduleServiceClient} = require('@google-cloud/aiplatform').v1beta1; + + // Instantiates a client + const aiplatformClient = new ScheduleServiceClient(); + + async function callUpdateSchedule() { + // Construct request + const request = { + schedule, + updateMask, + }; + + // Run request + const response = await aiplatformClient.updateSchedule(request); + console.log(response); + } + + callUpdateSchedule(); + // [END aiplatform_v1beta1_generated_ScheduleService_UpdateSchedule_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json b/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json index 3c5ffca24aa..a8e6dbb67d4 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-aiplatform", - "version": "2.8.1", + "version": "2.14.0", "language": "TYPESCRIPT", "apis": [ { @@ -1191,6 +1191,54 @@ } } }, + { + "regionTag": "aiplatform_v1beta1_generated_EndpointService_MutateDeployedModel_async", + "title": "DatasetService mutateDeployedModel Sample", + "origin": "API_DEFINITION", + "description": " Updates an existing deployed model. Updatable fields include `min_replica_count`, `max_replica_count`, `autoscaling_metric_specs`, `disable_container_logging` (v1 only), and `enable_container_logging` (v1beta1 only).", + "canonical": true, + "file": "endpoint_service.mutate_deployed_model.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "MutateDeployedModel", + "fullName": "google.cloud.aiplatform.v1beta1.EndpointService.MutateDeployedModel", + "async": true, + "parameters": [ + { + "name": "endpoint", + "type": "TYPE_STRING" + }, + { + "name": "deployed_model", + "type": ".google.cloud.aiplatform.v1beta1.DeployedModel" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EndpointServiceClient", + "fullName": "google.cloud.aiplatform.v1beta1.EndpointServiceClient" + }, + "method": { + "shortName": "MutateDeployedModel", + "fullName": "google.cloud.aiplatform.v1beta1.EndpointService.MutateDeployedModel", + "service": { + "shortName": "EndpointService", + "fullName": "google.cloud.aiplatform.v1beta1.EndpointService" + } + } + } + }, { "regionTag": "aiplatform_v1beta1_generated_FeaturestoreOnlineServingService_ReadFeatureValues_async", "title": "DatasetService readFeatureValues Sample", @@ -6299,6 +6347,54 @@ } } }, + { + "regionTag": "aiplatform_v1beta1_generated_ModelGardenService_GetPublisherModel_async", + "title": "DatasetService getPublisherModel Sample", + "origin": "API_DEFINITION", + "description": " Gets a Model Garden publisher model.", + "canonical": true, + "file": "model_garden_service.get_publisher_model.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetPublisherModel", + "fullName": "google.cloud.aiplatform.v1beta1.ModelGardenService.GetPublisherModel", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "language_code", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.aiplatform.v1beta1.PublisherModelView" + } + ], + "resultType": ".google.cloud.aiplatform.v1beta1.PublisherModel", + "client": { + "shortName": "ModelGardenServiceClient", + "fullName": "google.cloud.aiplatform.v1beta1.ModelGardenServiceClient" + }, + "method": { + "shortName": "GetPublisherModel", + "fullName": "google.cloud.aiplatform.v1beta1.ModelGardenService.GetPublisherModel", + "service": { + "shortName": "ModelGardenService", + "fullName": "google.cloud.aiplatform.v1beta1.ModelGardenService" + } + } + } + }, { "regionTag": "aiplatform_v1beta1_generated_ModelService_UploadModel_async", "title": "DatasetService uploadModel Sample", @@ -6462,7 +6558,7 @@ "segments": [ { "start": 25, - "end": 90, + "end": 92, "type": "FULL" } ], @@ -8007,6 +8103,50 @@ } } }, + { + "regionTag": "aiplatform_v1beta1_generated_ScheduleService_UpdateSchedule_async", + "title": "DatasetService updateSchedule Sample", + "origin": "API_DEFINITION", + "description": " Updates an active or paused Schedule. When the Schedule is updated, new runs will be scheduled starting from the updated next execution time after the update time based on the time_specification in the updated Schedule. All unstarted runs before the update time will be skipped while already created runs will NOT be paused or canceled.", + "canonical": true, + "file": "schedule_service.update_schedule.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateSchedule", + "fullName": "google.cloud.aiplatform.v1beta1.ScheduleService.UpdateSchedule", + "async": true, + "parameters": [ + { + "name": "schedule", + "type": ".google.cloud.aiplatform.v1beta1.Schedule" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.aiplatform.v1beta1.Schedule", + "client": { + "shortName": "ScheduleServiceClient", + "fullName": "google.cloud.aiplatform.v1beta1.ScheduleServiceClient" + }, + "method": { + "shortName": "UpdateSchedule", + "fullName": "google.cloud.aiplatform.v1beta1.ScheduleService.UpdateSchedule", + "service": { + "shortName": "ScheduleService", + "fullName": "google.cloud.aiplatform.v1beta1.ScheduleService" + } + } + } + }, { "regionTag": "aiplatform_v1beta1_generated_SpecialistPoolService_CreateSpecialistPool_async", "title": "DatasetService createSpecialistPool Sample", diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.export_tensorboard_time_series_data.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.export_tensorboard_time_series_data.js index 2b0d787398c..7aa7c25d623 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.export_tensorboard_time_series_data.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/tensorboard_service.export_tensorboard_time_series_data.js @@ -46,11 +46,11 @@ function main(tensorboardTimeSeries) { // const pageSize = 1234 /** * A page token, received from a previous - * TensorboardService.ExportTensorboardTimeSeries call. - * Provide this to retrieve the subsequent page. + * ExportTensorboardTimeSeriesData google.cloud.aiplatform.v1beta1.TensorboardService.ExportTensorboardTimeSeriesData + * call. Provide this to retrieve the subsequent page. * When paginating, all other parameters provided to - * TensorboardService.ExportTensorboardTimeSeries must - * match the call that provided the page token. + * ExportTensorboardTimeSeriesData google.cloud.aiplatform.v1beta1.TensorboardService.ExportTensorboardTimeSeriesData + * must match the call that provided the page token. */ // const pageToken = 'abc123' /** diff --git a/packages/google-cloud-aiplatform/samples/package.json b/packages/google-cloud-aiplatform/samples/package.json index 93c3e92c63a..b2bdcf25c7a 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": "^2.9.0" + "@google-cloud/aiplatform": "^2.14.0" }, "devDependencies": { "chai": "^4.2.0", diff --git a/packages/google-cloud-aiplatform/src/v1/dataset_service_client.ts b/packages/google-cloud-aiplatform/src/v1/dataset_service_client.ts index 448b46251b4..84d7977eaf1 100644 --- a/packages/google-cloud-aiplatform/src/v1/dataset_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/dataset_service_client.ts @@ -218,9 +218,6 @@ export class DatasetServiceClient { datasetPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}' ), - endpointPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/endpoints/{endpoint}' - ), entityTypePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' ), @@ -273,6 +270,13 @@ export class DatasetServiceClient { pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -370,6 +374,12 @@ export class DatasetServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, ], }, { @@ -393,6 +403,14 @@ export class DatasetServiceClient { post: '/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -411,6 +429,12 @@ export class DatasetServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, ], }, { @@ -4648,55 +4672,6 @@ export class DatasetServiceClient { return this.pathTemplates.datasetPathTemplate.match(datasetName).dataset; } - /** - * Return a fully-qualified endpoint resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} endpoint - * @returns {string} Resource name string. - */ - endpointPath(project: string, location: string, endpoint: string) { - return this.pathTemplates.endpointPathTemplate.render({ - project: project, - location: location, - endpoint: endpoint, - }); - } - - /** - * Parse the project from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).project; - } - - /** - * Parse the location from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).location; - } - - /** - * Parse the endpoint from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the endpoint. - */ - matchEndpointFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).endpoint; - } - /** * Return a fully-qualified entityType resource name string. * @@ -5761,6 +5736,154 @@ export class DatasetServiceClient { .pipeline_job; } + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1/endpoint_service_client.ts b/packages/google-cloud-aiplatform/src/v1/endpoint_service_client.ts index b4d25631d04..3df5eb15641 100644 --- a/packages/google-cloud-aiplatform/src/v1/endpoint_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/endpoint_service_client.ts @@ -217,9 +217,6 @@ export class EndpointServiceClient { datasetPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}' ), - endpointPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/endpoints/{endpoint}' - ), entityTypePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' ), @@ -272,6 +269,13 @@ export class EndpointServiceClient { pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -349,6 +353,12 @@ export class EndpointServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, ], }, { @@ -372,6 +382,14 @@ export class EndpointServiceClient { post: '/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -390,6 +408,12 @@ export class EndpointServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, ], }, { @@ -1347,6 +1371,12 @@ export class EndpointServiceClient { const undeployModelMetadata = protoFilesRoot.lookup( '.google.cloud.aiplatform.v1.UndeployModelOperationMetadata' ) as gax.protobuf.Type; + const mutateDeployedModelResponse = protoFilesRoot.lookup( + '.google.cloud.aiplatform.v1.MutateDeployedModelResponse' + ) as gax.protobuf.Type; + const mutateDeployedModelMetadata = protoFilesRoot.lookup( + '.google.cloud.aiplatform.v1.MutateDeployedModelOperationMetadata' + ) as gax.protobuf.Type; this.descriptors.longrunning = { createEndpoint: new this._gaxModule.LongrunningDescriptor( @@ -1369,6 +1399,11 @@ export class EndpointServiceClient { undeployModelResponse.decode.bind(undeployModelResponse), undeployModelMetadata.decode.bind(undeployModelMetadata) ), + mutateDeployedModel: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + mutateDeployedModelResponse.decode.bind(mutateDeployedModelResponse), + mutateDeployedModelMetadata.decode.bind(mutateDeployedModelMetadata) + ), }; // Put together the default options sent with requests. @@ -1428,6 +1463,7 @@ export class EndpointServiceClient { 'deleteEndpoint', 'deployModel', 'undeployModel', + 'mutateDeployedModel', ]; for (const methodName of endpointServiceStubMethods) { const callPromise = this.endpointServiceStub.then( @@ -2303,6 +2339,165 @@ export class EndpointServiceClient { protos.google.cloud.aiplatform.v1.UndeployModelOperationMetadata >; } + /** + * Updates an existing deployed model. Updatable fields include + * `min_replica_count`, `max_replica_count`, `autoscaling_metric_specs`, + * `disable_container_logging` (v1 only), and `enable_container_logging` + * (v1beta1 only). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.endpoint + * Required. The name of the Endpoint resource into which to mutate a + * DeployedModel. Format: + * `projects/{project}/locations/{location}/endpoints/{endpoint}` + * @param {google.cloud.aiplatform.v1.DeployedModel} request.deployedModel + * Required. The DeployedModel to be mutated within the Endpoint. Only the + * following fields can be mutated: + * + * * `min_replica_count` in either + * {@link google.cloud.aiplatform.v1.DedicatedResources|DedicatedResources} or + * {@link google.cloud.aiplatform.v1.AutomaticResources|AutomaticResources} + * * `max_replica_count` in either + * {@link google.cloud.aiplatform.v1.DedicatedResources|DedicatedResources} or + * {@link google.cloud.aiplatform.v1.AutomaticResources|AutomaticResources} + * * {@link google.cloud.aiplatform.v1.DedicatedResources.autoscaling_metric_specs|autoscaling_metric_specs} + * * `disable_container_logging` (v1 only) + * * `enable_container_logging` (v1beta1 only) + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The update mask applies to the resource. See + * {@link google.protobuf.FieldMask|google.protobuf.FieldMask}. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/endpoint_service.mutate_deployed_model.js + * region_tag:aiplatform_v1_generated_EndpointService_MutateDeployedModel_async + */ + mutateDeployedModel( + request?: protos.google.cloud.aiplatform.v1.IMutateDeployedModelRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.aiplatform.v1.IMutateDeployedModelResponse, + protos.google.cloud.aiplatform.v1.IMutateDeployedModelOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + mutateDeployedModel( + request: protos.google.cloud.aiplatform.v1.IMutateDeployedModelRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.aiplatform.v1.IMutateDeployedModelResponse, + protos.google.cloud.aiplatform.v1.IMutateDeployedModelOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + mutateDeployedModel( + request: protos.google.cloud.aiplatform.v1.IMutateDeployedModelRequest, + callback: Callback< + LROperation< + protos.google.cloud.aiplatform.v1.IMutateDeployedModelResponse, + protos.google.cloud.aiplatform.v1.IMutateDeployedModelOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + mutateDeployedModel( + request?: protos.google.cloud.aiplatform.v1.IMutateDeployedModelRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.aiplatform.v1.IMutateDeployedModelResponse, + protos.google.cloud.aiplatform.v1.IMutateDeployedModelOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.aiplatform.v1.IMutateDeployedModelResponse, + protos.google.cloud.aiplatform.v1.IMutateDeployedModelOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.aiplatform.v1.IMutateDeployedModelResponse, + protos.google.cloud.aiplatform.v1.IMutateDeployedModelOperationMetadata + >, + 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({ + endpoint: request.endpoint ?? '', + }); + this.initialize(); + return this.innerApiCalls.mutateDeployedModel(request, options, callback); + } + /** + * Check the status of the long running operation returned by `mutateDeployedModel()`. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/endpoint_service.mutate_deployed_model.js + * region_tag:aiplatform_v1_generated_EndpointService_MutateDeployedModel_async + */ + async checkMutateDeployedModelProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.aiplatform.v1.MutateDeployedModelResponse, + protos.google.cloud.aiplatform.v1.MutateDeployedModelOperationMetadata + > + > { + 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.mutateDeployedModel, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.aiplatform.v1.MutateDeployedModelResponse, + protos.google.cloud.aiplatform.v1.MutateDeployedModelOperationMetadata + >; + } /** * Lists Endpoints in a Location. * @@ -3579,55 +3774,6 @@ export class EndpointServiceClient { return this.pathTemplates.datasetPathTemplate.match(datasetName).dataset; } - /** - * Return a fully-qualified endpoint resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} endpoint - * @returns {string} Resource name string. - */ - endpointPath(project: string, location: string, endpoint: string) { - return this.pathTemplates.endpointPathTemplate.render({ - project: project, - location: location, - endpoint: endpoint, - }); - } - - /** - * Parse the project from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).project; - } - - /** - * Parse the location from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).location; - } - - /** - * Parse the endpoint from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the endpoint. - */ - matchEndpointFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).endpoint; - } - /** * Return a fully-qualified entityType resource name string. * @@ -4692,6 +4838,154 @@ export class EndpointServiceClient { .pipeline_job; } + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1/endpoint_service_client_config.json b/packages/google-cloud-aiplatform/src/v1/endpoint_service_client_config.json index 0c101562215..24f529b92ba 100644 --- a/packages/google-cloud-aiplatform/src/v1/endpoint_service_client_config.json +++ b/packages/google-cloud-aiplatform/src/v1/endpoint_service_client_config.json @@ -47,6 +47,10 @@ "UndeployModel": { "retry_codes_name": "non_idempotent", "retry_params_name": "default" + }, + "MutateDeployedModel": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" } } } diff --git a/packages/google-cloud-aiplatform/src/v1/featurestore_online_serving_service_client.ts b/packages/google-cloud-aiplatform/src/v1/featurestore_online_serving_service_client.ts index 9fe9ebebc16..3e82ff84d76 100644 --- a/packages/google-cloud-aiplatform/src/v1/featurestore_online_serving_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/featurestore_online_serving_service_client.ts @@ -213,9 +213,6 @@ export class FeaturestoreOnlineServingServiceClient { datasetPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}' ), - endpointPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/endpoints/{endpoint}' - ), entityTypePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' ), @@ -265,6 +262,13 @@ export class FeaturestoreOnlineServingServiceClient { pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -1516,55 +1520,6 @@ export class FeaturestoreOnlineServingServiceClient { return this.pathTemplates.datasetPathTemplate.match(datasetName).dataset; } - /** - * Return a fully-qualified endpoint resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} endpoint - * @returns {string} Resource name string. - */ - endpointPath(project: string, location: string, endpoint: string) { - return this.pathTemplates.endpointPathTemplate.render({ - project: project, - location: location, - endpoint: endpoint, - }); - } - - /** - * Parse the project from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).project; - } - - /** - * Parse the location from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).location; - } - - /** - * Parse the endpoint from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the endpoint. - */ - matchEndpointFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).endpoint; - } - /** * Return a fully-qualified entityType resource name string. * @@ -2593,6 +2548,154 @@ export class FeaturestoreOnlineServingServiceClient { .pipeline_job; } + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1/featurestore_service_client.ts b/packages/google-cloud-aiplatform/src/v1/featurestore_service_client.ts index 576ad29fd71..84b8f60a560 100644 --- a/packages/google-cloud-aiplatform/src/v1/featurestore_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/featurestore_service_client.ts @@ -217,9 +217,6 @@ export class FeaturestoreServiceClient { datasetPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}' ), - endpointPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/endpoints/{endpoint}' - ), entityTypePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' ), @@ -275,6 +272,13 @@ export class FeaturestoreServiceClient { projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -367,6 +371,12 @@ export class FeaturestoreServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, ], }, { @@ -390,6 +400,14 @@ export class FeaturestoreServiceClient { post: '/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -408,6 +426,12 @@ export class FeaturestoreServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, ], }, { @@ -1851,7 +1875,7 @@ export class FeaturestoreServiceClient { * * `monitoring_config.import_features_analysis.anomaly_detection_baseline` * * `monitoring_config.numerical_threshold_config.value` * * `monitoring_config.categorical_threshold_config.value` - * * `offline_storage_ttl_days` (available in Preview) + * * `offline_storage_ttl_days` * @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. @@ -2305,7 +2329,7 @@ export class FeaturestoreServiceClient { * * `labels` * * `online_serving_config.fixed_node_count` * * `online_serving_config.scaling` - * * `online_storage_ttl_days` (available in Preview) + * * `online_storage_ttl_days` * @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. @@ -6349,55 +6373,6 @@ export class FeaturestoreServiceClient { return this.pathTemplates.datasetPathTemplate.match(datasetName).dataset; } - /** - * Return a fully-qualified endpoint resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} endpoint - * @returns {string} Resource name string. - */ - endpointPath(project: string, location: string, endpoint: string) { - return this.pathTemplates.endpointPathTemplate.render({ - project: project, - location: location, - endpoint: endpoint, - }); - } - - /** - * Parse the project from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).project; - } - - /** - * Parse the location from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).location; - } - - /** - * Parse the endpoint from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the endpoint. - */ - matchEndpointFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).endpoint; - } - /** * Return a fully-qualified entityType resource name string. * @@ -7485,6 +7460,154 @@ export class FeaturestoreServiceClient { return this.pathTemplates.projectPathTemplate.match(projectName).project; } + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1/gapic_metadata.json b/packages/google-cloud-aiplatform/src/v1/gapic_metadata.json index 6c2ef2e22bf..ead7be93841 100644 --- a/packages/google-cloud-aiplatform/src/v1/gapic_metadata.json +++ b/packages/google-cloud-aiplatform/src/v1/gapic_metadata.json @@ -194,6 +194,11 @@ "undeployModel" ] }, + "MutateDeployedModel": { + "methods": [ + "mutateDeployedModel" + ] + }, "ListEndpoints": { "methods": [ "listEndpoints", @@ -236,6 +241,11 @@ "undeployModel" ] }, + "MutateDeployedModel": { + "methods": [ + "mutateDeployedModel" + ] + }, "ListEndpoints": { "methods": [ "listEndpoints", diff --git a/packages/google-cloud-aiplatform/src/v1/index_endpoint_service_client.ts b/packages/google-cloud-aiplatform/src/v1/index_endpoint_service_client.ts index 5b183db9294..6465c6ef1d6 100644 --- a/packages/google-cloud-aiplatform/src/v1/index_endpoint_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/index_endpoint_service_client.ts @@ -217,9 +217,6 @@ export class IndexEndpointServiceClient { datasetPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}' ), - endpointPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/endpoints/{endpoint}' - ), entityTypePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' ), @@ -272,6 +269,13 @@ export class IndexEndpointServiceClient { pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -349,6 +353,12 @@ export class IndexEndpointServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, ], }, { @@ -372,6 +382,14 @@ export class IndexEndpointServiceClient { post: '/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -390,6 +408,12 @@ export class IndexEndpointServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, ], }, { @@ -3682,55 +3706,6 @@ export class IndexEndpointServiceClient { return this.pathTemplates.datasetPathTemplate.match(datasetName).dataset; } - /** - * Return a fully-qualified endpoint resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} endpoint - * @returns {string} Resource name string. - */ - endpointPath(project: string, location: string, endpoint: string) { - return this.pathTemplates.endpointPathTemplate.render({ - project: project, - location: location, - endpoint: endpoint, - }); - } - - /** - * Parse the project from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).project; - } - - /** - * Parse the location from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).location; - } - - /** - * Parse the endpoint from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the endpoint. - */ - matchEndpointFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).endpoint; - } - /** * Return a fully-qualified entityType resource name string. * @@ -4795,6 +4770,154 @@ export class IndexEndpointServiceClient { .pipeline_job; } + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1/index_service_client.ts b/packages/google-cloud-aiplatform/src/v1/index_service_client.ts index 042979407c9..b198cbb12f0 100644 --- a/packages/google-cloud-aiplatform/src/v1/index_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/index_service_client.ts @@ -217,9 +217,6 @@ export class IndexServiceClient { datasetPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}' ), - endpointPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/endpoints/{endpoint}' - ), entityTypePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' ), @@ -272,6 +269,13 @@ export class IndexServiceClient { pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -349,6 +353,12 @@ export class IndexServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, ], }, { @@ -372,6 +382,14 @@ export class IndexServiceClient { post: '/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -390,6 +408,12 @@ export class IndexServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, ], }, { @@ -3403,55 +3427,6 @@ export class IndexServiceClient { return this.pathTemplates.datasetPathTemplate.match(datasetName).dataset; } - /** - * Return a fully-qualified endpoint resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} endpoint - * @returns {string} Resource name string. - */ - endpointPath(project: string, location: string, endpoint: string) { - return this.pathTemplates.endpointPathTemplate.render({ - project: project, - location: location, - endpoint: endpoint, - }); - } - - /** - * Parse the project from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).project; - } - - /** - * Parse the location from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).location; - } - - /** - * Parse the endpoint from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the endpoint. - */ - matchEndpointFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).endpoint; - } - /** * Return a fully-qualified entityType resource name string. * @@ -4516,6 +4491,154 @@ export class IndexServiceClient { .pipeline_job; } + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1/job_service_client.ts b/packages/google-cloud-aiplatform/src/v1/job_service_client.ts index 768030cb6cc..a2d11f61a18 100644 --- a/packages/google-cloud-aiplatform/src/v1/job_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/job_service_client.ts @@ -217,9 +217,6 @@ export class JobServiceClient { datasetPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}' ), - endpointPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/endpoints/{endpoint}' - ), entityTypePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' ), @@ -272,6 +269,13 @@ export class JobServiceClient { pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -385,6 +389,12 @@ export class JobServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, ], }, { @@ -408,6 +418,14 @@ export class JobServiceClient { post: '/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -426,6 +444,12 @@ export class JobServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, ], }, { @@ -7783,55 +7807,6 @@ export class JobServiceClient { return this.pathTemplates.datasetPathTemplate.match(datasetName).dataset; } - /** - * Return a fully-qualified endpoint resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} endpoint - * @returns {string} Resource name string. - */ - endpointPath(project: string, location: string, endpoint: string) { - return this.pathTemplates.endpointPathTemplate.render({ - project: project, - location: location, - endpoint: endpoint, - }); - } - - /** - * Parse the project from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).project; - } - - /** - * Parse the location from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).location; - } - - /** - * Parse the endpoint from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the endpoint. - */ - matchEndpointFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).endpoint; - } - /** * Return a fully-qualified entityType resource name string. * @@ -8896,6 +8871,154 @@ export class JobServiceClient { .pipeline_job; } + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1/metadata_service_client.ts b/packages/google-cloud-aiplatform/src/v1/metadata_service_client.ts index 4ae2a70c2b6..292ead32f7c 100644 --- a/packages/google-cloud-aiplatform/src/v1/metadata_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/metadata_service_client.ts @@ -217,9 +217,6 @@ export class MetadataServiceClient { datasetPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}' ), - endpointPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/endpoints/{endpoint}' - ), entityTypePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' ), @@ -275,6 +272,13 @@ export class MetadataServiceClient { projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -372,6 +376,12 @@ export class MetadataServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, ], }, { @@ -395,6 +405,14 @@ export class MetadataServiceClient { post: '/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -413,6 +431,12 @@ export class MetadataServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, ], }, { @@ -7131,55 +7155,6 @@ export class MetadataServiceClient { return this.pathTemplates.datasetPathTemplate.match(datasetName).dataset; } - /** - * Return a fully-qualified endpoint resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} endpoint - * @returns {string} Resource name string. - */ - endpointPath(project: string, location: string, endpoint: string) { - return this.pathTemplates.endpointPathTemplate.render({ - project: project, - location: location, - endpoint: endpoint, - }); - } - - /** - * Parse the project from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).project; - } - - /** - * Parse the location from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).location; - } - - /** - * Parse the endpoint from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the endpoint. - */ - matchEndpointFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).endpoint; - } - /** * Return a fully-qualified entityType resource name string. * @@ -8267,6 +8242,154 @@ export class MetadataServiceClient { return this.pathTemplates.projectPathTemplate.match(projectName).project; } + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1/migration_service_client.ts b/packages/google-cloud-aiplatform/src/v1/migration_service_client.ts index 4830a3a51c7..04751f12c38 100644 --- a/packages/google-cloud-aiplatform/src/v1/migration_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/migration_service_client.ts @@ -218,9 +218,6 @@ export class MigrationServiceClient { datasetPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}' ), - endpointPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/endpoints/{endpoint}' - ), entityTypePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' ), @@ -273,6 +270,13 @@ export class MigrationServiceClient { pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -350,6 +354,12 @@ export class MigrationServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, ], }, { @@ -373,6 +383,14 @@ export class MigrationServiceClient { post: '/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -391,6 +409,12 @@ export class MigrationServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, ], }, { @@ -2855,55 +2879,6 @@ export class MigrationServiceClient { return this.pathTemplates.datasetPathTemplate.match(datasetName).dataset; } - /** - * Return a fully-qualified endpoint resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} endpoint - * @returns {string} Resource name string. - */ - endpointPath(project: string, location: string, endpoint: string) { - return this.pathTemplates.endpointPathTemplate.render({ - project: project, - location: location, - endpoint: endpoint, - }); - } - - /** - * Parse the project from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).project; - } - - /** - * Parse the location from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).location; - } - - /** - * Parse the endpoint from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the endpoint. - */ - matchEndpointFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).endpoint; - } - /** * Return a fully-qualified entityType resource name string. * @@ -3968,6 +3943,154 @@ export class MigrationServiceClient { .pipeline_job; } + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1/model_service_client.ts b/packages/google-cloud-aiplatform/src/v1/model_service_client.ts index 34b80bd913b..ac76d3921a2 100644 --- a/packages/google-cloud-aiplatform/src/v1/model_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/model_service_client.ts @@ -217,9 +217,6 @@ export class ModelServiceClient { datasetPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}' ), - endpointPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/endpoints/{endpoint}' - ), entityTypePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' ), @@ -272,6 +269,13 @@ export class ModelServiceClient { pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -364,6 +368,12 @@ export class ModelServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, ], }, { @@ -387,6 +397,14 @@ export class ModelServiceClient { post: '/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -405,6 +423,12 @@ export class ModelServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, ], }, { @@ -3424,8 +3448,10 @@ export class ModelServiceClient { * @param {string} request.pageToken * The standard list page token. * Typically obtained via - * {@link google.cloud.aiplatform.v1.ListModelVersionsResponse.next_page_token|ListModelVersionsResponse.next_page_token} - * of the previous {@link |ModelService.ListModelversions} call. + * {@link google.cloud.aiplatform.v1.ListModelVersionsResponse.next_page_token|next_page_token} + * of the previous + * {@link google.cloud.aiplatform.v1.ModelService.ListModelVersions|ListModelVersions} + * call. * @param {string} request.filter * An expression for filtering the results of the request. For field names * both snake_case and camelCase are supported. @@ -3548,8 +3574,10 @@ export class ModelServiceClient { * @param {string} request.pageToken * The standard list page token. * Typically obtained via - * {@link google.cloud.aiplatform.v1.ListModelVersionsResponse.next_page_token|ListModelVersionsResponse.next_page_token} - * of the previous {@link |ModelService.ListModelversions} call. + * {@link google.cloud.aiplatform.v1.ListModelVersionsResponse.next_page_token|next_page_token} + * of the previous + * {@link google.cloud.aiplatform.v1.ModelService.ListModelVersions|ListModelVersions} + * call. * @param {string} request.filter * An expression for filtering the results of the request. For field names * both snake_case and camelCase are supported. @@ -3620,8 +3648,10 @@ export class ModelServiceClient { * @param {string} request.pageToken * The standard list page token. * Typically obtained via - * {@link google.cloud.aiplatform.v1.ListModelVersionsResponse.next_page_token|ListModelVersionsResponse.next_page_token} - * of the previous {@link |ModelService.ListModelversions} call. + * {@link google.cloud.aiplatform.v1.ListModelVersionsResponse.next_page_token|next_page_token} + * of the previous + * {@link google.cloud.aiplatform.v1.ModelService.ListModelVersions|ListModelVersions} + * call. * @param {string} request.filter * An expression for filtering the results of the request. For field names * both snake_case and camelCase are supported. @@ -5115,55 +5145,6 @@ export class ModelServiceClient { return this.pathTemplates.datasetPathTemplate.match(datasetName).dataset; } - /** - * Return a fully-qualified endpoint resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} endpoint - * @returns {string} Resource name string. - */ - endpointPath(project: string, location: string, endpoint: string) { - return this.pathTemplates.endpointPathTemplate.render({ - project: project, - location: location, - endpoint: endpoint, - }); - } - - /** - * Parse the project from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).project; - } - - /** - * Parse the location from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).location; - } - - /** - * Parse the endpoint from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the endpoint. - */ - matchEndpointFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).endpoint; - } - /** * Return a fully-qualified entityType resource name string. * @@ -6228,6 +6209,154 @@ export class ModelServiceClient { .pipeline_job; } + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1/pipeline_service_client.ts b/packages/google-cloud-aiplatform/src/v1/pipeline_service_client.ts index eb362f3b242..dc2e8201118 100644 --- a/packages/google-cloud-aiplatform/src/v1/pipeline_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/pipeline_service_client.ts @@ -219,9 +219,6 @@ export class PipelineServiceClient { datasetPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}' ), - endpointPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/endpoints/{endpoint}' - ), entityTypePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' ), @@ -274,6 +271,13 @@ export class PipelineServiceClient { pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -356,6 +360,12 @@ export class PipelineServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, ], }, { @@ -379,6 +389,14 @@ export class PipelineServiceClient { post: '/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -397,6 +415,12 @@ export class PipelineServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, ], }, { @@ -4025,55 +4049,6 @@ export class PipelineServiceClient { return this.pathTemplates.datasetPathTemplate.match(datasetName).dataset; } - /** - * Return a fully-qualified endpoint resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} endpoint - * @returns {string} Resource name string. - */ - endpointPath(project: string, location: string, endpoint: string) { - return this.pathTemplates.endpointPathTemplate.render({ - project: project, - location: location, - endpoint: endpoint, - }); - } - - /** - * Parse the project from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).project; - } - - /** - * Parse the location from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).location; - } - - /** - * Parse the endpoint from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the endpoint. - */ - matchEndpointFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).endpoint; - } - /** * Return a fully-qualified entityType resource name string. * @@ -5138,6 +5113,154 @@ export class PipelineServiceClient { .pipeline_job; } + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1/prediction_service_client.ts b/packages/google-cloud-aiplatform/src/v1/prediction_service_client.ts index b5318a426e4..3acab4bb4a1 100644 --- a/packages/google-cloud-aiplatform/src/v1/prediction_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/prediction_service_client.ts @@ -212,9 +212,6 @@ export class PredictionServiceClient { datasetPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}' ), - endpointPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/endpoints/{endpoint}' - ), entityTypePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' ), @@ -264,6 +261,13 @@ export class PredictionServiceClient { pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -1575,55 +1579,6 @@ export class PredictionServiceClient { return this.pathTemplates.datasetPathTemplate.match(datasetName).dataset; } - /** - * Return a fully-qualified endpoint resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} endpoint - * @returns {string} Resource name string. - */ - endpointPath(project: string, location: string, endpoint: string) { - return this.pathTemplates.endpointPathTemplate.render({ - project: project, - location: location, - endpoint: endpoint, - }); - } - - /** - * Parse the project from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).project; - } - - /** - * Parse the location from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).location; - } - - /** - * Parse the endpoint from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the endpoint. - */ - matchEndpointFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).endpoint; - } - /** * Return a fully-qualified entityType resource name string. * @@ -2652,6 +2607,154 @@ export class PredictionServiceClient { .pipeline_job; } + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1/specialist_pool_service_client.ts b/packages/google-cloud-aiplatform/src/v1/specialist_pool_service_client.ts index 2ee979789a1..64919e2a7ed 100644 --- a/packages/google-cloud-aiplatform/src/v1/specialist_pool_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/specialist_pool_service_client.ts @@ -223,9 +223,6 @@ export class SpecialistPoolServiceClient { datasetPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}' ), - endpointPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/endpoints/{endpoint}' - ), entityTypePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' ), @@ -278,6 +275,13 @@ export class SpecialistPoolServiceClient { pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -355,6 +359,12 @@ export class SpecialistPoolServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, ], }, { @@ -378,6 +388,14 @@ export class SpecialistPoolServiceClient { post: '/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -396,6 +414,12 @@ export class SpecialistPoolServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, ], }, { @@ -3224,55 +3248,6 @@ export class SpecialistPoolServiceClient { return this.pathTemplates.datasetPathTemplate.match(datasetName).dataset; } - /** - * Return a fully-qualified endpoint resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} endpoint - * @returns {string} Resource name string. - */ - endpointPath(project: string, location: string, endpoint: string) { - return this.pathTemplates.endpointPathTemplate.render({ - project: project, - location: location, - endpoint: endpoint, - }); - } - - /** - * Parse the project from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).project; - } - - /** - * Parse the location from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).location; - } - - /** - * Parse the endpoint from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the endpoint. - */ - matchEndpointFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).endpoint; - } - /** * Return a fully-qualified entityType resource name string. * @@ -4337,6 +4312,154 @@ export class SpecialistPoolServiceClient { .pipeline_job; } + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1/tensorboard_service_client.ts b/packages/google-cloud-aiplatform/src/v1/tensorboard_service_client.ts index 7ac9057ecd7..979a93ac6ca 100644 --- a/packages/google-cloud-aiplatform/src/v1/tensorboard_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/tensorboard_service_client.ts @@ -217,9 +217,6 @@ export class TensorboardServiceClient { datasetPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}' ), - endpointPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/endpoints/{endpoint}' - ), entityTypePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' ), @@ -275,6 +272,13 @@ export class TensorboardServiceClient { projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -381,6 +385,12 @@ export class TensorboardServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, ], }, { @@ -404,6 +414,14 @@ export class TensorboardServiceClient { post: '/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -422,6 +440,12 @@ export class TensorboardServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, ], }, { @@ -5308,12 +5332,12 @@ export class TensorboardServiceClient { * Values above 10000 are coerced to 10000. * @param {string} request.pageToken * A page token, received from a previous - * {@link |TensorboardService.ExportTensorboardTimeSeries} call. - * Provide this to retrieve the subsequent page. + * {@link google.cloud.aiplatform.v1.TensorboardService.ExportTensorboardTimeSeriesData|ExportTensorboardTimeSeriesData} + * call. Provide this to retrieve the subsequent page. * * When paginating, all other parameters provided to - * {@link |TensorboardService.ExportTensorboardTimeSeries} must - * match the call that provided the page token. + * {@link google.cloud.aiplatform.v1.TensorboardService.ExportTensorboardTimeSeriesData|ExportTensorboardTimeSeriesData} + * must match the call that provided the page token. * @param {string} request.orderBy * Field to use to sort the TensorboardTimeSeries' data. * By default, TensorboardTimeSeries' data is returned in a pseudo random @@ -5426,12 +5450,12 @@ export class TensorboardServiceClient { * Values above 10000 are coerced to 10000. * @param {string} request.pageToken * A page token, received from a previous - * {@link |TensorboardService.ExportTensorboardTimeSeries} call. - * Provide this to retrieve the subsequent page. + * {@link google.cloud.aiplatform.v1.TensorboardService.ExportTensorboardTimeSeriesData|ExportTensorboardTimeSeriesData} + * call. Provide this to retrieve the subsequent page. * * When paginating, all other parameters provided to - * {@link |TensorboardService.ExportTensorboardTimeSeries} must - * match the call that provided the page token. + * {@link google.cloud.aiplatform.v1.TensorboardService.ExportTensorboardTimeSeriesData|ExportTensorboardTimeSeriesData} + * must match the call that provided the page token. * @param {string} request.orderBy * Field to use to sort the TensorboardTimeSeries' data. * By default, TensorboardTimeSeries' data is returned in a pseudo random @@ -5489,12 +5513,12 @@ export class TensorboardServiceClient { * Values above 10000 are coerced to 10000. * @param {string} request.pageToken * A page token, received from a previous - * {@link |TensorboardService.ExportTensorboardTimeSeries} call. - * Provide this to retrieve the subsequent page. + * {@link google.cloud.aiplatform.v1.TensorboardService.ExportTensorboardTimeSeriesData|ExportTensorboardTimeSeriesData} + * call. Provide this to retrieve the subsequent page. * * When paginating, all other parameters provided to - * {@link |TensorboardService.ExportTensorboardTimeSeries} must - * match the call that provided the page token. + * {@link google.cloud.aiplatform.v1.TensorboardService.ExportTensorboardTimeSeriesData|ExportTensorboardTimeSeriesData} + * must match the call that provided the page token. * @param {string} request.orderBy * Field to use to sort the TensorboardTimeSeries' data. * By default, TensorboardTimeSeries' data is returned in a pseudo random @@ -6519,55 +6543,6 @@ export class TensorboardServiceClient { return this.pathTemplates.datasetPathTemplate.match(datasetName).dataset; } - /** - * Return a fully-qualified endpoint resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} endpoint - * @returns {string} Resource name string. - */ - endpointPath(project: string, location: string, endpoint: string) { - return this.pathTemplates.endpointPathTemplate.render({ - project: project, - location: location, - endpoint: endpoint, - }); - } - - /** - * Parse the project from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).project; - } - - /** - * Parse the location from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).location; - } - - /** - * Parse the endpoint from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the endpoint. - */ - matchEndpointFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).endpoint; - } - /** * Return a fully-qualified entityType resource name string. * @@ -7655,6 +7630,154 @@ export class TensorboardServiceClient { return this.pathTemplates.projectPathTemplate.match(projectName).project; } + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1/vizier_service_client.ts b/packages/google-cloud-aiplatform/src/v1/vizier_service_client.ts index 1349db1c941..1794a94a3c3 100644 --- a/packages/google-cloud-aiplatform/src/v1/vizier_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1/vizier_service_client.ts @@ -221,9 +221,6 @@ export class VizierServiceClient { datasetPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}' ), - endpointPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/endpoints/{endpoint}' - ), entityTypePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' ), @@ -276,6 +273,13 @@ export class VizierServiceClient { pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -358,6 +362,12 @@ export class VizierServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, ], }, { @@ -381,6 +391,14 @@ export class VizierServiceClient { post: '/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -399,6 +417,12 @@ export class VizierServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, ], }, { @@ -4169,55 +4193,6 @@ export class VizierServiceClient { return this.pathTemplates.datasetPathTemplate.match(datasetName).dataset; } - /** - * Return a fully-qualified endpoint resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} endpoint - * @returns {string} Resource name string. - */ - endpointPath(project: string, location: string, endpoint: string) { - return this.pathTemplates.endpointPathTemplate.render({ - project: project, - location: location, - endpoint: endpoint, - }); - } - - /** - * Parse the project from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).project; - } - - /** - * Parse the location from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).location; - } - - /** - * Parse the endpoint from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the endpoint. - */ - matchEndpointFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).endpoint; - } - /** * Return a fully-qualified entityType resource name string. * @@ -5282,6 +5257,154 @@ export class VizierServiceClient { .pipeline_job; } + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_client.ts index d58c1fe46f1..17096fe7d1f 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_client.ts @@ -221,9 +221,6 @@ export class DatasetServiceClient { deploymentResourcePoolPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}' ), - endpointPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/endpoints/{endpoint}' - ), entityTypePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' ), @@ -276,6 +273,16 @@ export class DatasetServiceClient { pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), + publisherModelPathTemplate: new this._gaxModule.PathTemplate( + 'publishers/{publisher}/models/{model}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -373,6 +380,12 @@ export class DatasetServiceClient { { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy', }, @@ -382,6 +395,12 @@ export class DatasetServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, ], }, { @@ -397,6 +416,14 @@ export class DatasetServiceClient { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy', body: '*', @@ -409,6 +436,14 @@ export class DatasetServiceClient { post: '/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -422,6 +457,12 @@ export class DatasetServiceClient { { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions', }, @@ -431,6 +472,12 @@ export class DatasetServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, ], }, { @@ -885,6 +932,14 @@ export class DatasetServiceClient { delete: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, ], }, { @@ -1072,6 +1127,12 @@ export class DatasetServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, ], }, { @@ -1250,6 +1311,12 @@ export class DatasetServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*}/operations', }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*}/operations', + }, ], }, { @@ -1446,6 +1513,12 @@ export class DatasetServiceClient { { post: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:wait', }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + }, ], }, ]; @@ -4834,55 +4907,6 @@ export class DatasetServiceClient { ).deployment_resource_pool; } - /** - * Return a fully-qualified endpoint resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} endpoint - * @returns {string} Resource name string. - */ - endpointPath(project: string, location: string, endpoint: string) { - return this.pathTemplates.endpointPathTemplate.render({ - project: project, - location: location, - endpoint: endpoint, - }); - } - - /** - * Parse the project from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).project; - } - - /** - * Parse the location from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).location; - } - - /** - * Parse the endpoint from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the endpoint. - */ - matchEndpointFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).endpoint; - } - /** * Return a fully-qualified entityType resource name string. * @@ -5947,6 +5971,194 @@ export class DatasetServiceClient { .pipeline_job; } + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + + /** + * Return a fully-qualified publisherModel resource name string. + * + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + publisherModelPath(publisher: string, model: string) { + return this.pathTemplates.publisherModelPathTemplate.render({ + publisher: publisher, + model: model, + }); + } + + /** + * Parse the publisher from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).publisher; + } + + /** + * Parse the model from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the model. + */ + matchModelFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).model; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_proto_list.json index 9638e888ca9..403e0932291 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_proto_list.json @@ -53,6 +53,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_deployment_monitoring_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_garden_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_monitoring.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", @@ -62,6 +63,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_client.ts index 7ca3e00ceac..42813a73106 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_client.ts @@ -221,9 +221,6 @@ export class DeploymentResourcePoolServiceClient { deploymentResourcePoolPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}' ), - endpointPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/endpoints/{endpoint}' - ), entityTypePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' ), @@ -279,6 +276,16 @@ export class DeploymentResourcePoolServiceClient { projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), + publisherModelPathTemplate: new this._gaxModule.PathTemplate( + 'publishers/{publisher}/models/{model}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -361,6 +368,12 @@ export class DeploymentResourcePoolServiceClient { { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy', }, @@ -370,6 +383,12 @@ export class DeploymentResourcePoolServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, ], }, { @@ -385,6 +404,14 @@ export class DeploymentResourcePoolServiceClient { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy', body: '*', @@ -397,6 +424,14 @@ export class DeploymentResourcePoolServiceClient { post: '/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -410,6 +445,12 @@ export class DeploymentResourcePoolServiceClient { { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions', }, @@ -419,6 +460,12 @@ export class DeploymentResourcePoolServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, ], }, { @@ -873,6 +920,14 @@ export class DeploymentResourcePoolServiceClient { delete: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, ], }, { @@ -1060,6 +1115,12 @@ export class DeploymentResourcePoolServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, ], }, { @@ -1238,6 +1299,12 @@ export class DeploymentResourcePoolServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*}/operations', }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*}/operations', + }, ], }, { @@ -1434,6 +1501,12 @@ export class DeploymentResourcePoolServiceClient { { post: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:wait', }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + }, ], }, ]; @@ -3494,55 +3567,6 @@ export class DeploymentResourcePoolServiceClient { ).deployment_resource_pool; } - /** - * Return a fully-qualified endpoint resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} endpoint - * @returns {string} Resource name string. - */ - endpointPath(project: string, location: string, endpoint: string) { - return this.pathTemplates.endpointPathTemplate.render({ - project: project, - location: location, - endpoint: endpoint, - }); - } - - /** - * Parse the project from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).project; - } - - /** - * Parse the location from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).location; - } - - /** - * Parse the endpoint from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the endpoint. - */ - matchEndpointFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).endpoint; - } - /** * Return a fully-qualified entityType resource name string. * @@ -4630,6 +4654,194 @@ export class DeploymentResourcePoolServiceClient { return this.pathTemplates.projectPathTemplate.match(projectName).project; } + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + + /** + * Return a fully-qualified publisherModel resource name string. + * + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + publisherModelPath(publisher: string, model: string) { + return this.pathTemplates.publisherModelPathTemplate.render({ + publisher: publisher, + model: model, + }); + } + + /** + * Parse the publisher from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).publisher; + } + + /** + * Parse the model from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the model. + */ + matchModelFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).model; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_proto_list.json index 9638e888ca9..403e0932291 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_proto_list.json @@ -53,6 +53,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_deployment_monitoring_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_garden_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_monitoring.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", @@ -62,6 +63,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_client.ts index 5b0e3458453..e1c2e0ee200 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_client.ts @@ -220,9 +220,6 @@ export class EndpointServiceClient { deploymentResourcePoolPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}' ), - endpointPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/endpoints/{endpoint}' - ), entityTypePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' ), @@ -275,6 +272,16 @@ export class EndpointServiceClient { pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), + publisherModelPathTemplate: new this._gaxModule.PathTemplate( + 'publishers/{publisher}/models/{model}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -352,6 +359,12 @@ export class EndpointServiceClient { { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy', }, @@ -361,6 +374,12 @@ export class EndpointServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, ], }, { @@ -376,6 +395,14 @@ export class EndpointServiceClient { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy', body: '*', @@ -388,6 +415,14 @@ export class EndpointServiceClient { post: '/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -401,6 +436,12 @@ export class EndpointServiceClient { { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions', }, @@ -410,6 +451,12 @@ export class EndpointServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, ], }, { @@ -864,6 +911,14 @@ export class EndpointServiceClient { delete: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, ], }, { @@ -1051,6 +1106,12 @@ export class EndpointServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, ], }, { @@ -1229,6 +1290,12 @@ export class EndpointServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*}/operations', }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*}/operations', + }, ], }, { @@ -1425,6 +1492,12 @@ export class EndpointServiceClient { { post: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:wait', }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + }, ], }, ]; @@ -1456,6 +1529,12 @@ export class EndpointServiceClient { const undeployModelMetadata = protoFilesRoot.lookup( '.google.cloud.aiplatform.v1beta1.UndeployModelOperationMetadata' ) as gax.protobuf.Type; + const mutateDeployedModelResponse = protoFilesRoot.lookup( + '.google.cloud.aiplatform.v1beta1.MutateDeployedModelResponse' + ) as gax.protobuf.Type; + const mutateDeployedModelMetadata = protoFilesRoot.lookup( + '.google.cloud.aiplatform.v1beta1.MutateDeployedModelOperationMetadata' + ) as gax.protobuf.Type; this.descriptors.longrunning = { createEndpoint: new this._gaxModule.LongrunningDescriptor( @@ -1478,6 +1557,11 @@ export class EndpointServiceClient { undeployModelResponse.decode.bind(undeployModelResponse), undeployModelMetadata.decode.bind(undeployModelMetadata) ), + mutateDeployedModel: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + mutateDeployedModelResponse.decode.bind(mutateDeployedModelResponse), + mutateDeployedModelMetadata.decode.bind(mutateDeployedModelMetadata) + ), }; // Put together the default options sent with requests. @@ -1537,6 +1621,7 @@ export class EndpointServiceClient { 'deleteEndpoint', 'deployModel', 'undeployModel', + 'mutateDeployedModel', ]; for (const methodName of endpointServiceStubMethods) { const callPromise = this.endpointServiceStub.then( @@ -2418,6 +2503,165 @@ export class EndpointServiceClient { protos.google.cloud.aiplatform.v1beta1.UndeployModelOperationMetadata >; } + /** + * Updates an existing deployed model. Updatable fields include + * `min_replica_count`, `max_replica_count`, `autoscaling_metric_specs`, + * `disable_container_logging` (v1 only), and `enable_container_logging` + * (v1beta1 only). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.endpoint + * Required. The name of the Endpoint resource into which to mutate a + * DeployedModel. Format: + * `projects/{project}/locations/{location}/endpoints/{endpoint}` + * @param {google.cloud.aiplatform.v1beta1.DeployedModel} request.deployedModel + * Required. The DeployedModel to be mutated within the Endpoint. Only the + * following fields can be mutated: + * + * * `min_replica_count` in either + * {@link google.cloud.aiplatform.v1beta1.DedicatedResources|DedicatedResources} or + * {@link google.cloud.aiplatform.v1beta1.AutomaticResources|AutomaticResources} + * * `max_replica_count` in either + * {@link google.cloud.aiplatform.v1beta1.DedicatedResources|DedicatedResources} or + * {@link google.cloud.aiplatform.v1beta1.AutomaticResources|AutomaticResources} + * * {@link google.cloud.aiplatform.v1beta1.DedicatedResources.autoscaling_metric_specs|autoscaling_metric_specs} + * * `disable_container_logging` (v1 only) + * * `enable_container_logging` (v1beta1 only) + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The update mask applies to the resource. See + * {@link google.protobuf.FieldMask|google.protobuf.FieldMask}. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta1/endpoint_service.mutate_deployed_model.js + * region_tag:aiplatform_v1beta1_generated_EndpointService_MutateDeployedModel_async + */ + mutateDeployedModel( + request?: protos.google.cloud.aiplatform.v1beta1.IMutateDeployedModelRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.aiplatform.v1beta1.IMutateDeployedModelResponse, + protos.google.cloud.aiplatform.v1beta1.IMutateDeployedModelOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + mutateDeployedModel( + request: protos.google.cloud.aiplatform.v1beta1.IMutateDeployedModelRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.aiplatform.v1beta1.IMutateDeployedModelResponse, + protos.google.cloud.aiplatform.v1beta1.IMutateDeployedModelOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + mutateDeployedModel( + request: protos.google.cloud.aiplatform.v1beta1.IMutateDeployedModelRequest, + callback: Callback< + LROperation< + protos.google.cloud.aiplatform.v1beta1.IMutateDeployedModelResponse, + protos.google.cloud.aiplatform.v1beta1.IMutateDeployedModelOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + mutateDeployedModel( + request?: protos.google.cloud.aiplatform.v1beta1.IMutateDeployedModelRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.aiplatform.v1beta1.IMutateDeployedModelResponse, + protos.google.cloud.aiplatform.v1beta1.IMutateDeployedModelOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.aiplatform.v1beta1.IMutateDeployedModelResponse, + protos.google.cloud.aiplatform.v1beta1.IMutateDeployedModelOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.aiplatform.v1beta1.IMutateDeployedModelResponse, + protos.google.cloud.aiplatform.v1beta1.IMutateDeployedModelOperationMetadata + >, + 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({ + endpoint: request.endpoint ?? '', + }); + this.initialize(); + return this.innerApiCalls.mutateDeployedModel(request, options, callback); + } + /** + * Check the status of the long running operation returned by `mutateDeployedModel()`. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta1/endpoint_service.mutate_deployed_model.js + * region_tag:aiplatform_v1beta1_generated_EndpointService_MutateDeployedModel_async + */ + async checkMutateDeployedModelProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.aiplatform.v1beta1.MutateDeployedModelResponse, + protos.google.cloud.aiplatform.v1beta1.MutateDeployedModelOperationMetadata + > + > { + 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.mutateDeployedModel, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.aiplatform.v1beta1.MutateDeployedModelResponse, + protos.google.cloud.aiplatform.v1beta1.MutateDeployedModelOperationMetadata + >; + } /** * Lists Endpoints in a Location. * @@ -3732,55 +3976,6 @@ export class EndpointServiceClient { ).deployment_resource_pool; } - /** - * Return a fully-qualified endpoint resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} endpoint - * @returns {string} Resource name string. - */ - endpointPath(project: string, location: string, endpoint: string) { - return this.pathTemplates.endpointPathTemplate.render({ - project: project, - location: location, - endpoint: endpoint, - }); - } - - /** - * Parse the project from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).project; - } - - /** - * Parse the location from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).location; - } - - /** - * Parse the endpoint from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the endpoint. - */ - matchEndpointFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).endpoint; - } - /** * Return a fully-qualified entityType resource name string. * @@ -4845,6 +5040,194 @@ export class EndpointServiceClient { .pipeline_job; } + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + + /** + * Return a fully-qualified publisherModel resource name string. + * + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + publisherModelPath(publisher: string, model: string) { + return this.pathTemplates.publisherModelPathTemplate.render({ + publisher: publisher, + model: model, + }); + } + + /** + * Parse the publisher from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).publisher; + } + + /** + * Parse the model from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the model. + */ + matchModelFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).model; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_client_config.json b/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_client_config.json index 4775abb5f33..25b4f7170d1 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_client_config.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_client_config.json @@ -54,6 +54,10 @@ "timeout_millis": 5000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" + }, + "MutateDeployedModel": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" } } } diff --git a/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_proto_list.json index 9638e888ca9..403e0932291 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_proto_list.json @@ -53,6 +53,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_deployment_monitoring_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_garden_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_monitoring.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", @@ -62,6 +63,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_client.ts index ebdf48c61d5..f87759652a6 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_client.ts @@ -216,9 +216,6 @@ export class FeaturestoreOnlineServingServiceClient { deploymentResourcePoolPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}' ), - endpointPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/endpoints/{endpoint}' - ), entityTypePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' ), @@ -268,6 +265,16 @@ export class FeaturestoreOnlineServingServiceClient { pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), + publisherModelPathTemplate: new this._gaxModule.PathTemplate( + 'publishers/{publisher}/models/{model}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -1599,55 +1606,6 @@ export class FeaturestoreOnlineServingServiceClient { ).deployment_resource_pool; } - /** - * Return a fully-qualified endpoint resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} endpoint - * @returns {string} Resource name string. - */ - endpointPath(project: string, location: string, endpoint: string) { - return this.pathTemplates.endpointPathTemplate.render({ - project: project, - location: location, - endpoint: endpoint, - }); - } - - /** - * Parse the project from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).project; - } - - /** - * Parse the location from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).location; - } - - /** - * Parse the endpoint from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the endpoint. - */ - matchEndpointFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).endpoint; - } - /** * Return a fully-qualified entityType resource name string. * @@ -2676,6 +2634,194 @@ export class FeaturestoreOnlineServingServiceClient { .pipeline_job; } + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + + /** + * Return a fully-qualified publisherModel resource name string. + * + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + publisherModelPath(publisher: string, model: string) { + return this.pathTemplates.publisherModelPathTemplate.render({ + publisher: publisher, + model: model, + }); + } + + /** + * Parse the publisher from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).publisher; + } + + /** + * Parse the model from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the model. + */ + matchModelFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).model; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_proto_list.json index 9638e888ca9..403e0932291 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_proto_list.json @@ -53,6 +53,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_deployment_monitoring_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_garden_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_monitoring.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", @@ -62,6 +63,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_client.ts index 10aeb01175e..088db64f348 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_client.ts @@ -220,9 +220,6 @@ export class FeaturestoreServiceClient { deploymentResourcePoolPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}' ), - endpointPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/endpoints/{endpoint}' - ), entityTypePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' ), @@ -278,6 +275,16 @@ export class FeaturestoreServiceClient { projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), + publisherModelPathTemplate: new this._gaxModule.PathTemplate( + 'publishers/{publisher}/models/{model}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -370,6 +377,12 @@ export class FeaturestoreServiceClient { { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy', }, @@ -379,6 +392,12 @@ export class FeaturestoreServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, ], }, { @@ -394,6 +413,14 @@ export class FeaturestoreServiceClient { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy', body: '*', @@ -406,6 +433,14 @@ export class FeaturestoreServiceClient { post: '/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -419,6 +454,12 @@ export class FeaturestoreServiceClient { { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions', }, @@ -428,6 +469,12 @@ export class FeaturestoreServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, ], }, { @@ -882,6 +929,14 @@ export class FeaturestoreServiceClient { delete: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, ], }, { @@ -1069,6 +1124,12 @@ export class FeaturestoreServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, ], }, { @@ -1247,6 +1308,12 @@ export class FeaturestoreServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*}/operations', }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*}/operations', + }, ], }, { @@ -1443,6 +1510,12 @@ export class FeaturestoreServiceClient { { post: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:wait', }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + }, ], }, ]; @@ -1967,7 +2040,7 @@ export class FeaturestoreServiceClient { * * `monitoring_config.import_features_analysis.anomaly_detection_baseline` * * `monitoring_config.numerical_threshold_config.value` * * `monitoring_config.categorical_threshold_config.value` - * * `offline_storage_ttl_days` (available in Preview) + * * `offline_storage_ttl_days` * @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. @@ -2433,7 +2506,7 @@ export class FeaturestoreServiceClient { * * `labels` * * `online_serving_config.fixed_node_count` * * `online_serving_config.scaling` - * * `online_storage_ttl_days` (available in Preview) + * * `online_storage_ttl_days` * @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. @@ -6542,55 +6615,6 @@ export class FeaturestoreServiceClient { ).deployment_resource_pool; } - /** - * Return a fully-qualified endpoint resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} endpoint - * @returns {string} Resource name string. - */ - endpointPath(project: string, location: string, endpoint: string) { - return this.pathTemplates.endpointPathTemplate.render({ - project: project, - location: location, - endpoint: endpoint, - }); - } - - /** - * Parse the project from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).project; - } - - /** - * Parse the location from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).location; - } - - /** - * Parse the endpoint from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the endpoint. - */ - matchEndpointFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).endpoint; - } - /** * Return a fully-qualified entityType resource name string. * @@ -7678,6 +7702,194 @@ export class FeaturestoreServiceClient { return this.pathTemplates.projectPathTemplate.match(projectName).project; } + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + + /** + * Return a fully-qualified publisherModel resource name string. + * + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + publisherModelPath(publisher: string, model: string) { + return this.pathTemplates.publisherModelPathTemplate.render({ + publisher: publisher, + model: model, + }); + } + + /** + * Parse the publisher from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).publisher; + } + + /** + * Parse the model from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the model. + */ + matchModelFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).model; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_proto_list.json index 9638e888ca9..403e0932291 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_proto_list.json @@ -53,6 +53,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_deployment_monitoring_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_garden_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_monitoring.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", @@ -62,6 +63,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/gapic_metadata.json b/packages/google-cloud-aiplatform/src/v1beta1/gapic_metadata.json index 283ed5b2e87..30394c79970 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/gapic_metadata.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/gapic_metadata.json @@ -266,6 +266,11 @@ "undeployModel" ] }, + "MutateDeployedModel": { + "methods": [ + "mutateDeployedModel" + ] + }, "ListEndpoints": { "methods": [ "listEndpoints", @@ -308,6 +313,11 @@ "undeployModel" ] }, + "MutateDeployedModel": { + "methods": [ + "mutateDeployedModel" + ] + }, "ListEndpoints": { "methods": [ "listEndpoints", @@ -1606,6 +1616,30 @@ } } }, + "ModelGardenService": { + "clients": { + "grpc": { + "libraryClient": "ModelGardenServiceClient", + "rpcs": { + "GetPublisherModel": { + "methods": [ + "getPublisherModel" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ModelGardenServiceClient", + "rpcs": { + "GetPublisherModel": { + "methods": [ + "getPublisherModel" + ] + } + } + } + } + }, "ModelService": { "clients": { "grpc": { @@ -2007,6 +2041,11 @@ "resumeSchedule" ] }, + "UpdateSchedule": { + "methods": [ + "updateSchedule" + ] + }, "DeleteSchedule": { "methods": [ "deleteSchedule" @@ -2044,6 +2083,11 @@ "resumeSchedule" ] }, + "UpdateSchedule": { + "methods": [ + "updateSchedule" + ] + }, "DeleteSchedule": { "methods": [ "deleteSchedule" diff --git a/packages/google-cloud-aiplatform/src/v1beta1/index.ts b/packages/google-cloud-aiplatform/src/v1beta1/index.ts index b85f2840923..2fc9ffeff23 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/index.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/index.ts @@ -27,6 +27,7 @@ export {JobServiceClient} from './job_service_client'; export {MatchServiceClient} from './match_service_client'; export {MetadataServiceClient} from './metadata_service_client'; export {MigrationServiceClient} from './migration_service_client'; +export {ModelGardenServiceClient} from './model_garden_service_client'; export {ModelServiceClient} from './model_service_client'; export {PipelineServiceClient} from './pipeline_service_client'; export {PredictionServiceClient} from './prediction_service_client'; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_client.ts index 07e8b4a16f0..a45a40e4fa0 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_client.ts @@ -220,9 +220,6 @@ export class IndexEndpointServiceClient { deploymentResourcePoolPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}' ), - endpointPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/endpoints/{endpoint}' - ), entityTypePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' ), @@ -275,6 +272,16 @@ export class IndexEndpointServiceClient { pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), + publisherModelPathTemplate: new this._gaxModule.PathTemplate( + 'publishers/{publisher}/models/{model}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -352,6 +359,12 @@ export class IndexEndpointServiceClient { { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy', }, @@ -361,6 +374,12 @@ export class IndexEndpointServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, ], }, { @@ -376,6 +395,14 @@ export class IndexEndpointServiceClient { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy', body: '*', @@ -388,6 +415,14 @@ export class IndexEndpointServiceClient { post: '/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -401,6 +436,12 @@ export class IndexEndpointServiceClient { { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions', }, @@ -410,6 +451,12 @@ export class IndexEndpointServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, ], }, { @@ -864,6 +911,14 @@ export class IndexEndpointServiceClient { delete: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, ], }, { @@ -1051,6 +1106,12 @@ export class IndexEndpointServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, ], }, { @@ -1229,6 +1290,12 @@ export class IndexEndpointServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*}/operations', }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*}/operations', + }, ], }, { @@ -1425,6 +1492,12 @@ export class IndexEndpointServiceClient { { post: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:wait', }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + }, ], }, ]; @@ -3869,55 +3942,6 @@ export class IndexEndpointServiceClient { ).deployment_resource_pool; } - /** - * Return a fully-qualified endpoint resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} endpoint - * @returns {string} Resource name string. - */ - endpointPath(project: string, location: string, endpoint: string) { - return this.pathTemplates.endpointPathTemplate.render({ - project: project, - location: location, - endpoint: endpoint, - }); - } - - /** - * Parse the project from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).project; - } - - /** - * Parse the location from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).location; - } - - /** - * Parse the endpoint from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the endpoint. - */ - matchEndpointFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).endpoint; - } - /** * Return a fully-qualified entityType resource name string. * @@ -4982,6 +5006,194 @@ export class IndexEndpointServiceClient { .pipeline_job; } + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + + /** + * Return a fully-qualified publisherModel resource name string. + * + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + publisherModelPath(publisher: string, model: string) { + return this.pathTemplates.publisherModelPathTemplate.render({ + publisher: publisher, + model: model, + }); + } + + /** + * Parse the publisher from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).publisher; + } + + /** + * Parse the model from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the model. + */ + matchModelFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).model; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_proto_list.json index 9638e888ca9..403e0932291 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_proto_list.json @@ -53,6 +53,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_deployment_monitoring_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_garden_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_monitoring.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", @@ -62,6 +63,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/index_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/index_service_client.ts index c8d200ac96e..7167a438f99 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/index_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/index_service_client.ts @@ -220,9 +220,6 @@ export class IndexServiceClient { deploymentResourcePoolPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}' ), - endpointPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/endpoints/{endpoint}' - ), entityTypePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' ), @@ -275,6 +272,16 @@ export class IndexServiceClient { pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), + publisherModelPathTemplate: new this._gaxModule.PathTemplate( + 'publishers/{publisher}/models/{model}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -352,6 +359,12 @@ export class IndexServiceClient { { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy', }, @@ -361,6 +374,12 @@ export class IndexServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, ], }, { @@ -376,6 +395,14 @@ export class IndexServiceClient { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy', body: '*', @@ -388,6 +415,14 @@ export class IndexServiceClient { post: '/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -401,6 +436,12 @@ export class IndexServiceClient { { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions', }, @@ -410,6 +451,12 @@ export class IndexServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, ], }, { @@ -864,6 +911,14 @@ export class IndexServiceClient { delete: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, ], }, { @@ -1051,6 +1106,12 @@ export class IndexServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, ], }, { @@ -1229,6 +1290,12 @@ export class IndexServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*}/operations', }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*}/operations', + }, ], }, { @@ -1425,6 +1492,12 @@ export class IndexServiceClient { { post: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:wait', }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + }, ], }, ]; @@ -3603,55 +3676,6 @@ export class IndexServiceClient { ).deployment_resource_pool; } - /** - * Return a fully-qualified endpoint resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} endpoint - * @returns {string} Resource name string. - */ - endpointPath(project: string, location: string, endpoint: string) { - return this.pathTemplates.endpointPathTemplate.render({ - project: project, - location: location, - endpoint: endpoint, - }); - } - - /** - * Parse the project from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).project; - } - - /** - * Parse the location from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).location; - } - - /** - * Parse the endpoint from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the endpoint. - */ - matchEndpointFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).endpoint; - } - /** * Return a fully-qualified entityType resource name string. * @@ -4716,6 +4740,194 @@ export class IndexServiceClient { .pipeline_job; } + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + + /** + * Return a fully-qualified publisherModel resource name string. + * + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + publisherModelPath(publisher: string, model: string) { + return this.pathTemplates.publisherModelPathTemplate.render({ + publisher: publisher, + model: model, + }); + } + + /** + * Parse the publisher from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).publisher; + } + + /** + * Parse the model from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the model. + */ + matchModelFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).model; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/index_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/index_service_proto_list.json index 9638e888ca9..403e0932291 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/index_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/index_service_proto_list.json @@ -53,6 +53,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_deployment_monitoring_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_garden_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_monitoring.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", @@ -62,6 +63,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/job_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/job_service_client.ts index 7596bed4708..4fe870534fc 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/job_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/job_service_client.ts @@ -220,9 +220,6 @@ export class JobServiceClient { deploymentResourcePoolPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}' ), - endpointPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/endpoints/{endpoint}' - ), entityTypePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' ), @@ -275,6 +272,16 @@ export class JobServiceClient { pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), + publisherModelPathTemplate: new this._gaxModule.PathTemplate( + 'publishers/{publisher}/models/{model}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -388,6 +395,12 @@ export class JobServiceClient { { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy', }, @@ -397,6 +410,12 @@ export class JobServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, ], }, { @@ -412,6 +431,14 @@ export class JobServiceClient { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy', body: '*', @@ -424,6 +451,14 @@ export class JobServiceClient { post: '/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -437,6 +472,12 @@ export class JobServiceClient { { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions', }, @@ -446,6 +487,12 @@ export class JobServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, ], }, { @@ -900,6 +947,14 @@ export class JobServiceClient { delete: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, ], }, { @@ -1087,6 +1142,12 @@ export class JobServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, ], }, { @@ -1265,6 +1326,12 @@ export class JobServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*}/operations', }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*}/operations', + }, ], }, { @@ -1461,6 +1528,12 @@ export class JobServiceClient { { post: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:wait', }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + }, ], }, ]; @@ -8011,55 +8084,6 @@ export class JobServiceClient { ).deployment_resource_pool; } - /** - * Return a fully-qualified endpoint resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} endpoint - * @returns {string} Resource name string. - */ - endpointPath(project: string, location: string, endpoint: string) { - return this.pathTemplates.endpointPathTemplate.render({ - project: project, - location: location, - endpoint: endpoint, - }); - } - - /** - * Parse the project from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).project; - } - - /** - * Parse the location from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).location; - } - - /** - * Parse the endpoint from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the endpoint. - */ - matchEndpointFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).endpoint; - } - /** * Return a fully-qualified entityType resource name string. * @@ -9124,6 +9148,194 @@ export class JobServiceClient { .pipeline_job; } + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + + /** + * Return a fully-qualified publisherModel resource name string. + * + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + publisherModelPath(publisher: string, model: string) { + return this.pathTemplates.publisherModelPathTemplate.render({ + publisher: publisher, + model: model, + }); + } + + /** + * Parse the publisher from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).publisher; + } + + /** + * Parse the model from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the model. + */ + matchModelFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).model; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/job_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/job_service_proto_list.json index 9638e888ca9..403e0932291 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/job_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/job_service_proto_list.json @@ -53,6 +53,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_deployment_monitoring_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_garden_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_monitoring.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", @@ -62,6 +63,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/match_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/match_service_client.ts index 269d62d7255..380db2fb6ac 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/match_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/match_service_client.ts @@ -216,9 +216,6 @@ export class MatchServiceClient { deploymentResourcePoolPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}' ), - endpointPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/endpoints/{endpoint}' - ), entityTypePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' ), @@ -268,6 +265,16 @@ export class MatchServiceClient { pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), + publisherModelPathTemplate: new this._gaxModule.PathTemplate( + 'publishers/{publisher}/models/{model}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -442,7 +449,7 @@ export class MatchServiceClient { * Format: * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` * @param {string} request.deployedIndexId - * The ID of the DeploydIndex that will serve the request. This request is + * The ID of the DeployedIndex that will serve the request. This request is * sent to a specific IndexEndpoint, as per the IndexEndpoint.network. That * IndexEndpoint also has IndexEndpoint.deployed_indexes, and each such index * has a DeployedIndex.id field. @@ -550,7 +557,7 @@ export class MatchServiceClient { * Format: * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` * @param {string} request.deployedIndexId - * The ID of the DeploydIndex that will serve the request. + * The ID of the DeployedIndex that will serve the request. * @param {string[]} request.ids * IDs of the datapoints to be searched for. * @param {object} [options] @@ -1519,55 +1526,6 @@ export class MatchServiceClient { ).deployment_resource_pool; } - /** - * Return a fully-qualified endpoint resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} endpoint - * @returns {string} Resource name string. - */ - endpointPath(project: string, location: string, endpoint: string) { - return this.pathTemplates.endpointPathTemplate.render({ - project: project, - location: location, - endpoint: endpoint, - }); - } - - /** - * Parse the project from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).project; - } - - /** - * Parse the location from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).location; - } - - /** - * Parse the endpoint from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the endpoint. - */ - matchEndpointFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).endpoint; - } - /** * Return a fully-qualified entityType resource name string. * @@ -2596,6 +2554,194 @@ export class MatchServiceClient { .pipeline_job; } + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + + /** + * Return a fully-qualified publisherModel resource name string. + * + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + publisherModelPath(publisher: string, model: string) { + return this.pathTemplates.publisherModelPathTemplate.render({ + publisher: publisher, + model: model, + }); + } + + /** + * Parse the publisher from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).publisher; + } + + /** + * Parse the model from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the model. + */ + matchModelFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).model; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/match_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/match_service_proto_list.json index 9638e888ca9..403e0932291 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/match_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/match_service_proto_list.json @@ -53,6 +53,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_deployment_monitoring_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_garden_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_monitoring.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", @@ -62,6 +63,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_client.ts index 129f03143ed..05576fc0016 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_client.ts @@ -220,9 +220,6 @@ export class MetadataServiceClient { deploymentResourcePoolPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}' ), - endpointPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/endpoints/{endpoint}' - ), entityTypePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' ), @@ -278,6 +275,16 @@ export class MetadataServiceClient { projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), + publisherModelPathTemplate: new this._gaxModule.PathTemplate( + 'publishers/{publisher}/models/{model}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -375,6 +382,12 @@ export class MetadataServiceClient { { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy', }, @@ -384,6 +397,12 @@ export class MetadataServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, ], }, { @@ -399,6 +418,14 @@ export class MetadataServiceClient { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy', body: '*', @@ -411,6 +438,14 @@ export class MetadataServiceClient { post: '/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -424,6 +459,12 @@ export class MetadataServiceClient { { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions', }, @@ -433,6 +474,12 @@ export class MetadataServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, ], }, { @@ -887,6 +934,14 @@ export class MetadataServiceClient { delete: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, ], }, { @@ -1074,6 +1129,12 @@ export class MetadataServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, ], }, { @@ -1252,6 +1313,12 @@ export class MetadataServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*}/operations', }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*}/operations', + }, ], }, { @@ -1448,6 +1515,12 @@ export class MetadataServiceClient { { post: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:wait', }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + }, ], }, ]; @@ -7362,55 +7435,6 @@ export class MetadataServiceClient { ).deployment_resource_pool; } - /** - * Return a fully-qualified endpoint resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} endpoint - * @returns {string} Resource name string. - */ - endpointPath(project: string, location: string, endpoint: string) { - return this.pathTemplates.endpointPathTemplate.render({ - project: project, - location: location, - endpoint: endpoint, - }); - } - - /** - * Parse the project from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).project; - } - - /** - * Parse the location from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).location; - } - - /** - * Parse the endpoint from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the endpoint. - */ - matchEndpointFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).endpoint; - } - /** * Return a fully-qualified entityType resource name string. * @@ -8498,6 +8522,194 @@ export class MetadataServiceClient { return this.pathTemplates.projectPathTemplate.match(projectName).project; } + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + + /** + * Return a fully-qualified publisherModel resource name string. + * + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + publisherModelPath(publisher: string, model: string) { + return this.pathTemplates.publisherModelPathTemplate.render({ + publisher: publisher, + model: model, + }); + } + + /** + * Parse the publisher from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).publisher; + } + + /** + * Parse the model from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the model. + */ + matchModelFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).model; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_proto_list.json index 9638e888ca9..403e0932291 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_proto_list.json @@ -53,6 +53,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_deployment_monitoring_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_garden_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_monitoring.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", @@ -62,6 +63,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/migration_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/migration_service_client.ts index 8013d46fba5..337ac1c796a 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/migration_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/migration_service_client.ts @@ -221,9 +221,6 @@ export class MigrationServiceClient { deploymentResourcePoolPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}' ), - endpointPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/endpoints/{endpoint}' - ), entityTypePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' ), @@ -276,6 +273,16 @@ export class MigrationServiceClient { pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), + publisherModelPathTemplate: new this._gaxModule.PathTemplate( + 'publishers/{publisher}/models/{model}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -353,6 +360,12 @@ export class MigrationServiceClient { { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy', }, @@ -362,6 +375,12 @@ export class MigrationServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, ], }, { @@ -377,6 +396,14 @@ export class MigrationServiceClient { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy', body: '*', @@ -389,6 +416,14 @@ export class MigrationServiceClient { post: '/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -402,6 +437,12 @@ export class MigrationServiceClient { { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions', }, @@ -411,6 +452,12 @@ export class MigrationServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, ], }, { @@ -865,6 +912,14 @@ export class MigrationServiceClient { delete: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, ], }, { @@ -1052,6 +1107,12 @@ export class MigrationServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, ], }, { @@ -1230,6 +1291,12 @@ export class MigrationServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*}/operations', }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*}/operations', + }, ], }, { @@ -1426,6 +1493,12 @@ export class MigrationServiceClient { { post: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:wait', }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + }, ], }, ]; @@ -3033,55 +3106,6 @@ export class MigrationServiceClient { ).deployment_resource_pool; } - /** - * Return a fully-qualified endpoint resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} endpoint - * @returns {string} Resource name string. - */ - endpointPath(project: string, location: string, endpoint: string) { - return this.pathTemplates.endpointPathTemplate.render({ - project: project, - location: location, - endpoint: endpoint, - }); - } - - /** - * Parse the project from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).project; - } - - /** - * Parse the location from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).location; - } - - /** - * Parse the endpoint from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the endpoint. - */ - matchEndpointFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).endpoint; - } - /** * Return a fully-qualified entityType resource name string. * @@ -4146,6 +4170,194 @@ export class MigrationServiceClient { .pipeline_job; } + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + + /** + * Return a fully-qualified publisherModel resource name string. + * + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + publisherModelPath(publisher: string, model: string) { + return this.pathTemplates.publisherModelPathTemplate.render({ + publisher: publisher, + model: model, + }); + } + + /** + * Parse the publisher from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).publisher; + } + + /** + * Parse the model from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the model. + */ + matchModelFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).model; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/migration_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/migration_service_proto_list.json index 9638e888ca9..403e0932291 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/migration_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/migration_service_proto_list.json @@ -53,6 +53,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_deployment_monitoring_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_garden_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_monitoring.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", @@ -62,6 +63,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_client.ts new file mode 100644 index 00000000000..5e047f3516d --- /dev/null +++ b/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_client.ts @@ -0,0 +1,3343 @@ +// Copyright 2023 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, + IamClient, + IamProtos, + LocationsClient, + LocationProtos, +} from 'google-gax'; + +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1beta1/model_garden_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './model_garden_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * The interface of Model Garden Service. + * @class + * @memberof v1beta1 + */ +export class ModelGardenServiceClient { + 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}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + iamClient: IamClient; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + modelGardenServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ModelGardenServiceClient. + * + * @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://developers.google.com/identity/protocols/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 | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * 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 ModelGardenServiceClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof ModelGardenServiceClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.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); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.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 = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); + + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && '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 if (opts.fallback === 'rest') { + 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 = { + annotationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}/annotations/{annotation}' + ), + annotationSpecPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}' + ), + artifactPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/metadataStores/{metadata_store}/artifacts/{artifact}' + ), + batchPredictionJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}' + ), + contextPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/metadataStores/{metadata_store}/contexts/{context}' + ), + customJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/customJobs/{custom_job}' + ), + dataItemPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}' + ), + dataLabelingJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}' + ), + datasetPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/datasets/{dataset}' + ), + deploymentResourcePoolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}' + ), + entityTypePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' + ), + executionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/metadataStores/{metadata_store}/executions/{execution}' + ), + featurePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}' + ), + featurestorePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/featurestores/{featurestore}' + ), + hyperparameterTuningJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}' + ), + indexPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/indexes/{index}' + ), + indexEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}' + ), + metadataSchemaPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/metadataStores/{metadata_store}/metadataSchemas/{metadata_schema}' + ), + metadataStorePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/metadataStores/{metadata_store}' + ), + modelPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/models/{model}' + ), + modelDeploymentMonitoringJobPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}' + ), + modelEvaluationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}' + ), + modelEvaluationSlicePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}' + ), + nasJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/nasJobs/{nas_job}' + ), + nasTrialDetailPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}' + ), + pipelineJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' + ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), + publisherModelPathTemplate: new this._gaxModule.PathTemplate( + 'publishers/{publisher}/models/{model}' + ), + savedQueryPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' + ), + schedulePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/schedules/{schedule}' + ), + specialistPoolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/specialistPools/{specialist_pool}' + ), + studyPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/studies/{study}' + ), + tensorboardPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/tensorboards/{tensorboard}' + ), + tensorboardExperimentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}' + ), + tensorboardRunPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}' + ), + tensorboardTimeSeriesPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}' + ), + trainingPipelinePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}' + ), + trialPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/studies/{study}/trials/{trial}' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.aiplatform.v1beta1.ModelGardenService', + 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.modelGardenServiceStub) { + return this.modelGardenServiceStub; + } + + // Put together the "service stub" for + // google.cloud.aiplatform.v1beta1.ModelGardenService. + this.modelGardenServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.aiplatform.v1beta1.ModelGardenService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.aiplatform.v1beta1 + .ModelGardenService, + 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 modelGardenServiceStubMethods = ['getPublisherModel']; + for (const methodName of modelGardenServiceStubMethods) { + const callPromise = this.modelGardenServiceStub.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 = undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.modelGardenServiceStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'aiplatform.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'aiplatform.googleapis.com'; + } + + /** + * 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/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 -- + // ------------------- + /** + * Gets a Model Garden publisher model. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the PublisherModel resource. + * Format: + * `publishers/{publisher}/models/{publisher_model}` + * @param {string} [request.languageCode] + * Optional. The IETF BCP-47 language code representing the language in which + * the publisher model's text information should be written in (see go/bcp47). + * @param {google.cloud.aiplatform.v1beta1.PublisherModelView} [request.view] + * Optional. PublisherModel view specifying which fields to read. + * @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 google.cloud.aiplatform.v1beta1.PublisherModel | PublisherModel}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/model_garden_service.get_publisher_model.js + * region_tag:aiplatform_v1beta1_generated_ModelGardenService_GetPublisherModel_async + */ + getPublisherModel( + request?: protos.google.cloud.aiplatform.v1beta1.IGetPublisherModelRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.aiplatform.v1beta1.IPublisherModel, + ( + | protos.google.cloud.aiplatform.v1beta1.IGetPublisherModelRequest + | undefined + ), + {} | undefined + ] + >; + getPublisherModel( + request: protos.google.cloud.aiplatform.v1beta1.IGetPublisherModelRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.aiplatform.v1beta1.IPublisherModel, + | protos.google.cloud.aiplatform.v1beta1.IGetPublisherModelRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getPublisherModel( + request: protos.google.cloud.aiplatform.v1beta1.IGetPublisherModelRequest, + callback: Callback< + protos.google.cloud.aiplatform.v1beta1.IPublisherModel, + | protos.google.cloud.aiplatform.v1beta1.IGetPublisherModelRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getPublisherModel( + request?: protos.google.cloud.aiplatform.v1beta1.IGetPublisherModelRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.aiplatform.v1beta1.IPublisherModel, + | protos.google.cloud.aiplatform.v1beta1.IGetPublisherModelRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.aiplatform.v1beta1.IPublisherModel, + | protos.google.cloud.aiplatform.v1beta1.IGetPublisherModelRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.aiplatform.v1beta1.IPublisherModel, + ( + | protos.google.cloud.aiplatform.v1beta1.IGetPublisherModelRequest + | 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(); + return this.innerApiCalls.getPublisherModel(request, options, callback); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {Object} [request.options] + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * + * This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | GetPolicyOptions}. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.Policy | Policy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.Policy | Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: IamProtos.google.iam.v1.GetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.getIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + setIamPolicy( + request: IamProtos.google.iam.v1.SetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.setIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + */ + testIamPermissions( + request: IamProtos.google.iam.v1.TestIamPermissionsRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.testIamPermissions(request, options, callback); + } + + /** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @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 google.cloud.location.Location | Location}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + + /** + * Lists information about the supported locations for this service. 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.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list 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} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.Location | Location}. 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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified annotation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @param {string} data_item + * @param {string} annotation + * @returns {string} Resource name string. + */ + annotationPath( + project: string, + location: string, + dataset: string, + dataItem: string, + annotation: string + ) { + return this.pathTemplates.annotationPathTemplate.render({ + project: project, + location: location, + dataset: dataset, + data_item: dataItem, + annotation: annotation, + }); + } + + /** + * Parse the project from Annotation resource. + * + * @param {string} annotationName + * A fully-qualified path representing Annotation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAnnotationName(annotationName: string) { + return this.pathTemplates.annotationPathTemplate.match(annotationName) + .project; + } + + /** + * Parse the location from Annotation resource. + * + * @param {string} annotationName + * A fully-qualified path representing Annotation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAnnotationName(annotationName: string) { + return this.pathTemplates.annotationPathTemplate.match(annotationName) + .location; + } + + /** + * Parse the dataset from Annotation resource. + * + * @param {string} annotationName + * A fully-qualified path representing Annotation resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromAnnotationName(annotationName: string) { + return this.pathTemplates.annotationPathTemplate.match(annotationName) + .dataset; + } + + /** + * Parse the data_item from Annotation resource. + * + * @param {string} annotationName + * A fully-qualified path representing Annotation resource. + * @returns {string} A string representing the data_item. + */ + matchDataItemFromAnnotationName(annotationName: string) { + return this.pathTemplates.annotationPathTemplate.match(annotationName) + .data_item; + } + + /** + * Parse the annotation from Annotation resource. + * + * @param {string} annotationName + * A fully-qualified path representing Annotation resource. + * @returns {string} A string representing the annotation. + */ + matchAnnotationFromAnnotationName(annotationName: string) { + return this.pathTemplates.annotationPathTemplate.match(annotationName) + .annotation; + } + + /** + * Return a fully-qualified annotationSpec resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @param {string} annotation_spec + * @returns {string} Resource name string. + */ + annotationSpecPath( + project: string, + location: string, + dataset: string, + annotationSpec: string + ) { + return this.pathTemplates.annotationSpecPathTemplate.render({ + project: project, + location: location, + dataset: dataset, + annotation_spec: annotationSpec, + }); + } + + /** + * Parse the project from AnnotationSpec resource. + * + * @param {string} annotationSpecName + * A fully-qualified path representing AnnotationSpec resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAnnotationSpecName(annotationSpecName: string) { + return this.pathTemplates.annotationSpecPathTemplate.match( + annotationSpecName + ).project; + } + + /** + * Parse the location from AnnotationSpec resource. + * + * @param {string} annotationSpecName + * A fully-qualified path representing AnnotationSpec resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAnnotationSpecName(annotationSpecName: string) { + return this.pathTemplates.annotationSpecPathTemplate.match( + annotationSpecName + ).location; + } + + /** + * Parse the dataset from AnnotationSpec resource. + * + * @param {string} annotationSpecName + * A fully-qualified path representing AnnotationSpec resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromAnnotationSpecName(annotationSpecName: string) { + return this.pathTemplates.annotationSpecPathTemplate.match( + annotationSpecName + ).dataset; + } + + /** + * Parse the annotation_spec from AnnotationSpec resource. + * + * @param {string} annotationSpecName + * A fully-qualified path representing AnnotationSpec resource. + * @returns {string} A string representing the annotation_spec. + */ + matchAnnotationSpecFromAnnotationSpecName(annotationSpecName: string) { + return this.pathTemplates.annotationSpecPathTemplate.match( + annotationSpecName + ).annotation_spec; + } + + /** + * Return a fully-qualified artifact resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} metadata_store + * @param {string} artifact + * @returns {string} Resource name string. + */ + artifactPath( + project: string, + location: string, + metadataStore: string, + artifact: string + ) { + return this.pathTemplates.artifactPathTemplate.render({ + project: project, + location: location, + metadata_store: metadataStore, + artifact: artifact, + }); + } + + /** + * Parse the project from Artifact resource. + * + * @param {string} artifactName + * A fully-qualified path representing Artifact resource. + * @returns {string} A string representing the project. + */ + matchProjectFromArtifactName(artifactName: string) { + return this.pathTemplates.artifactPathTemplate.match(artifactName).project; + } + + /** + * Parse the location from Artifact resource. + * + * @param {string} artifactName + * A fully-qualified path representing Artifact resource. + * @returns {string} A string representing the location. + */ + matchLocationFromArtifactName(artifactName: string) { + return this.pathTemplates.artifactPathTemplate.match(artifactName).location; + } + + /** + * Parse the metadata_store from Artifact resource. + * + * @param {string} artifactName + * A fully-qualified path representing Artifact resource. + * @returns {string} A string representing the metadata_store. + */ + matchMetadataStoreFromArtifactName(artifactName: string) { + return this.pathTemplates.artifactPathTemplate.match(artifactName) + .metadata_store; + } + + /** + * Parse the artifact from Artifact resource. + * + * @param {string} artifactName + * A fully-qualified path representing Artifact resource. + * @returns {string} A string representing the artifact. + */ + matchArtifactFromArtifactName(artifactName: string) { + return this.pathTemplates.artifactPathTemplate.match(artifactName).artifact; + } + + /** + * Return a fully-qualified batchPredictionJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} batch_prediction_job + * @returns {string} Resource name string. + */ + batchPredictionJobPath( + project: string, + location: string, + batchPredictionJob: string + ) { + return this.pathTemplates.batchPredictionJobPathTemplate.render({ + project: project, + location: location, + batch_prediction_job: batchPredictionJob, + }); + } + + /** + * Parse the project from BatchPredictionJob resource. + * + * @param {string} batchPredictionJobName + * A fully-qualified path representing BatchPredictionJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBatchPredictionJobName(batchPredictionJobName: string) { + return this.pathTemplates.batchPredictionJobPathTemplate.match( + batchPredictionJobName + ).project; + } + + /** + * Parse the location from BatchPredictionJob resource. + * + * @param {string} batchPredictionJobName + * A fully-qualified path representing BatchPredictionJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBatchPredictionJobName(batchPredictionJobName: string) { + return this.pathTemplates.batchPredictionJobPathTemplate.match( + batchPredictionJobName + ).location; + } + + /** + * Parse the batch_prediction_job from BatchPredictionJob resource. + * + * @param {string} batchPredictionJobName + * A fully-qualified path representing BatchPredictionJob resource. + * @returns {string} A string representing the batch_prediction_job. + */ + matchBatchPredictionJobFromBatchPredictionJobName( + batchPredictionJobName: string + ) { + return this.pathTemplates.batchPredictionJobPathTemplate.match( + batchPredictionJobName + ).batch_prediction_job; + } + + /** + * Return a fully-qualified context resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} metadata_store + * @param {string} context + * @returns {string} Resource name string. + */ + contextPath( + project: string, + location: string, + metadataStore: string, + context: string + ) { + return this.pathTemplates.contextPathTemplate.render({ + project: project, + location: location, + metadata_store: metadataStore, + context: context, + }); + } + + /** + * Parse the project from Context resource. + * + * @param {string} contextName + * A fully-qualified path representing Context resource. + * @returns {string} A string representing the project. + */ + matchProjectFromContextName(contextName: string) { + return this.pathTemplates.contextPathTemplate.match(contextName).project; + } + + /** + * Parse the location from Context resource. + * + * @param {string} contextName + * A fully-qualified path representing Context resource. + * @returns {string} A string representing the location. + */ + matchLocationFromContextName(contextName: string) { + return this.pathTemplates.contextPathTemplate.match(contextName).location; + } + + /** + * Parse the metadata_store from Context resource. + * + * @param {string} contextName + * A fully-qualified path representing Context resource. + * @returns {string} A string representing the metadata_store. + */ + matchMetadataStoreFromContextName(contextName: string) { + return this.pathTemplates.contextPathTemplate.match(contextName) + .metadata_store; + } + + /** + * Parse the context from Context resource. + * + * @param {string} contextName + * A fully-qualified path representing Context resource. + * @returns {string} A string representing the context. + */ + matchContextFromContextName(contextName: string) { + return this.pathTemplates.contextPathTemplate.match(contextName).context; + } + + /** + * Return a fully-qualified customJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} custom_job + * @returns {string} Resource name string. + */ + customJobPath(project: string, location: string, customJob: string) { + return this.pathTemplates.customJobPathTemplate.render({ + project: project, + location: location, + custom_job: customJob, + }); + } + + /** + * Parse the project from CustomJob resource. + * + * @param {string} customJobName + * A fully-qualified path representing CustomJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromCustomJobName(customJobName: string) { + return this.pathTemplates.customJobPathTemplate.match(customJobName) + .project; + } + + /** + * Parse the location from CustomJob resource. + * + * @param {string} customJobName + * A fully-qualified path representing CustomJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromCustomJobName(customJobName: string) { + return this.pathTemplates.customJobPathTemplate.match(customJobName) + .location; + } + + /** + * Parse the custom_job from CustomJob resource. + * + * @param {string} customJobName + * A fully-qualified path representing CustomJob resource. + * @returns {string} A string representing the custom_job. + */ + matchCustomJobFromCustomJobName(customJobName: string) { + return this.pathTemplates.customJobPathTemplate.match(customJobName) + .custom_job; + } + + /** + * Return a fully-qualified dataItem resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @param {string} data_item + * @returns {string} Resource name string. + */ + dataItemPath( + project: string, + location: string, + dataset: string, + dataItem: string + ) { + return this.pathTemplates.dataItemPathTemplate.render({ + project: project, + location: location, + dataset: dataset, + data_item: dataItem, + }); + } + + /** + * Parse the project from DataItem resource. + * + * @param {string} dataItemName + * A fully-qualified path representing DataItem resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataItemName(dataItemName: string) { + return this.pathTemplates.dataItemPathTemplate.match(dataItemName).project; + } + + /** + * Parse the location from DataItem resource. + * + * @param {string} dataItemName + * A fully-qualified path representing DataItem resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataItemName(dataItemName: string) { + return this.pathTemplates.dataItemPathTemplate.match(dataItemName).location; + } + + /** + * Parse the dataset from DataItem resource. + * + * @param {string} dataItemName + * A fully-qualified path representing DataItem resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromDataItemName(dataItemName: string) { + return this.pathTemplates.dataItemPathTemplate.match(dataItemName).dataset; + } + + /** + * Parse the data_item from DataItem resource. + * + * @param {string} dataItemName + * A fully-qualified path representing DataItem resource. + * @returns {string} A string representing the data_item. + */ + matchDataItemFromDataItemName(dataItemName: string) { + return this.pathTemplates.dataItemPathTemplate.match(dataItemName) + .data_item; + } + + /** + * Return a fully-qualified dataLabelingJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_labeling_job + * @returns {string} Resource name string. + */ + dataLabelingJobPath( + project: string, + location: string, + dataLabelingJob: string + ) { + return this.pathTemplates.dataLabelingJobPathTemplate.render({ + project: project, + location: location, + data_labeling_job: dataLabelingJob, + }); + } + + /** + * Parse the project from DataLabelingJob resource. + * + * @param {string} dataLabelingJobName + * A fully-qualified path representing DataLabelingJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataLabelingJobName(dataLabelingJobName: string) { + return this.pathTemplates.dataLabelingJobPathTemplate.match( + dataLabelingJobName + ).project; + } + + /** + * Parse the location from DataLabelingJob resource. + * + * @param {string} dataLabelingJobName + * A fully-qualified path representing DataLabelingJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataLabelingJobName(dataLabelingJobName: string) { + return this.pathTemplates.dataLabelingJobPathTemplate.match( + dataLabelingJobName + ).location; + } + + /** + * Parse the data_labeling_job from DataLabelingJob resource. + * + * @param {string} dataLabelingJobName + * A fully-qualified path representing DataLabelingJob resource. + * @returns {string} A string representing the data_labeling_job. + */ + matchDataLabelingJobFromDataLabelingJobName(dataLabelingJobName: string) { + return this.pathTemplates.dataLabelingJobPathTemplate.match( + dataLabelingJobName + ).data_labeling_job; + } + + /** + * Return a fully-qualified dataset resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @returns {string} Resource name string. + */ + datasetPath(project: string, location: string, dataset: string) { + return this.pathTemplates.datasetPathTemplate.render({ + project: project, + location: location, + dataset: dataset, + }); + } + + /** + * Parse the project from Dataset resource. + * + * @param {string} datasetName + * A fully-qualified path representing Dataset resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDatasetName(datasetName: string) { + return this.pathTemplates.datasetPathTemplate.match(datasetName).project; + } + + /** + * Parse the location from Dataset resource. + * + * @param {string} datasetName + * A fully-qualified path representing Dataset resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDatasetName(datasetName: string) { + return this.pathTemplates.datasetPathTemplate.match(datasetName).location; + } + + /** + * Parse the dataset from Dataset resource. + * + * @param {string} datasetName + * A fully-qualified path representing Dataset resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromDatasetName(datasetName: string) { + return this.pathTemplates.datasetPathTemplate.match(datasetName).dataset; + } + + /** + * Return a fully-qualified deploymentResourcePool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} deployment_resource_pool + * @returns {string} Resource name string. + */ + deploymentResourcePoolPath( + project: string, + location: string, + deploymentResourcePool: string + ) { + return this.pathTemplates.deploymentResourcePoolPathTemplate.render({ + project: project, + location: location, + deployment_resource_pool: deploymentResourcePool, + }); + } + + /** + * Parse the project from DeploymentResourcePool resource. + * + * @param {string} deploymentResourcePoolName + * A fully-qualified path representing DeploymentResourcePool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDeploymentResourcePoolName( + deploymentResourcePoolName: string + ) { + return this.pathTemplates.deploymentResourcePoolPathTemplate.match( + deploymentResourcePoolName + ).project; + } + + /** + * Parse the location from DeploymentResourcePool resource. + * + * @param {string} deploymentResourcePoolName + * A fully-qualified path representing DeploymentResourcePool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDeploymentResourcePoolName( + deploymentResourcePoolName: string + ) { + return this.pathTemplates.deploymentResourcePoolPathTemplate.match( + deploymentResourcePoolName + ).location; + } + + /** + * Parse the deployment_resource_pool from DeploymentResourcePool resource. + * + * @param {string} deploymentResourcePoolName + * A fully-qualified path representing DeploymentResourcePool resource. + * @returns {string} A string representing the deployment_resource_pool. + */ + matchDeploymentResourcePoolFromDeploymentResourcePoolName( + deploymentResourcePoolName: string + ) { + return this.pathTemplates.deploymentResourcePoolPathTemplate.match( + deploymentResourcePoolName + ).deployment_resource_pool; + } + + /** + * Return a fully-qualified entityType resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} featurestore + * @param {string} entity_type + * @returns {string} Resource name string. + */ + entityTypePath( + project: string, + location: string, + featurestore: string, + entityType: string + ) { + return this.pathTemplates.entityTypePathTemplate.render({ + project: project, + location: location, + featurestore: featurestore, + entity_type: entityType, + }); + } + + /** + * Parse the project from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName) + .project; + } + + /** + * Parse the location from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName) + .location; + } + + /** + * Parse the featurestore from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the featurestore. + */ + matchFeaturestoreFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName) + .featurestore; + } + + /** + * Parse the entity_type from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the entity_type. + */ + matchEntityTypeFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName) + .entity_type; + } + + /** + * Return a fully-qualified execution resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} metadata_store + * @param {string} execution + * @returns {string} Resource name string. + */ + executionPath( + project: string, + location: string, + metadataStore: string, + execution: string + ) { + return this.pathTemplates.executionPathTemplate.render({ + project: project, + location: location, + metadata_store: metadataStore, + execution: execution, + }); + } + + /** + * Parse the project from Execution resource. + * + * @param {string} executionName + * A fully-qualified path representing Execution resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExecutionName(executionName: string) { + return this.pathTemplates.executionPathTemplate.match(executionName) + .project; + } + + /** + * Parse the location from Execution resource. + * + * @param {string} executionName + * A fully-qualified path representing Execution resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExecutionName(executionName: string) { + return this.pathTemplates.executionPathTemplate.match(executionName) + .location; + } + + /** + * Parse the metadata_store from Execution resource. + * + * @param {string} executionName + * A fully-qualified path representing Execution resource. + * @returns {string} A string representing the metadata_store. + */ + matchMetadataStoreFromExecutionName(executionName: string) { + return this.pathTemplates.executionPathTemplate.match(executionName) + .metadata_store; + } + + /** + * Parse the execution from Execution resource. + * + * @param {string} executionName + * A fully-qualified path representing Execution resource. + * @returns {string} A string representing the execution. + */ + matchExecutionFromExecutionName(executionName: string) { + return this.pathTemplates.executionPathTemplate.match(executionName) + .execution; + } + + /** + * Return a fully-qualified feature resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} featurestore + * @param {string} entity_type + * @param {string} feature + * @returns {string} Resource name string. + */ + featurePath( + project: string, + location: string, + featurestore: string, + entityType: string, + feature: string + ) { + return this.pathTemplates.featurePathTemplate.render({ + project: project, + location: location, + featurestore: featurestore, + entity_type: entityType, + feature: feature, + }); + } + + /** + * Parse the project from Feature resource. + * + * @param {string} featureName + * A fully-qualified path representing Feature resource. + * @returns {string} A string representing the project. + */ + matchProjectFromFeatureName(featureName: string) { + return this.pathTemplates.featurePathTemplate.match(featureName).project; + } + + /** + * Parse the location from Feature resource. + * + * @param {string} featureName + * A fully-qualified path representing Feature resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFeatureName(featureName: string) { + return this.pathTemplates.featurePathTemplate.match(featureName).location; + } + + /** + * Parse the featurestore from Feature resource. + * + * @param {string} featureName + * A fully-qualified path representing Feature resource. + * @returns {string} A string representing the featurestore. + */ + matchFeaturestoreFromFeatureName(featureName: string) { + return this.pathTemplates.featurePathTemplate.match(featureName) + .featurestore; + } + + /** + * Parse the entity_type from Feature resource. + * + * @param {string} featureName + * A fully-qualified path representing Feature resource. + * @returns {string} A string representing the entity_type. + */ + matchEntityTypeFromFeatureName(featureName: string) { + return this.pathTemplates.featurePathTemplate.match(featureName) + .entity_type; + } + + /** + * Parse the feature from Feature resource. + * + * @param {string} featureName + * A fully-qualified path representing Feature resource. + * @returns {string} A string representing the feature. + */ + matchFeatureFromFeatureName(featureName: string) { + return this.pathTemplates.featurePathTemplate.match(featureName).feature; + } + + /** + * Return a fully-qualified featurestore resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} featurestore + * @returns {string} Resource name string. + */ + featurestorePath(project: string, location: string, featurestore: string) { + return this.pathTemplates.featurestorePathTemplate.render({ + project: project, + location: location, + featurestore: featurestore, + }); + } + + /** + * Parse the project from Featurestore resource. + * + * @param {string} featurestoreName + * A fully-qualified path representing Featurestore resource. + * @returns {string} A string representing the project. + */ + matchProjectFromFeaturestoreName(featurestoreName: string) { + return this.pathTemplates.featurestorePathTemplate.match(featurestoreName) + .project; + } + + /** + * Parse the location from Featurestore resource. + * + * @param {string} featurestoreName + * A fully-qualified path representing Featurestore resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFeaturestoreName(featurestoreName: string) { + return this.pathTemplates.featurestorePathTemplate.match(featurestoreName) + .location; + } + + /** + * Parse the featurestore from Featurestore resource. + * + * @param {string} featurestoreName + * A fully-qualified path representing Featurestore resource. + * @returns {string} A string representing the featurestore. + */ + matchFeaturestoreFromFeaturestoreName(featurestoreName: string) { + return this.pathTemplates.featurestorePathTemplate.match(featurestoreName) + .featurestore; + } + + /** + * Return a fully-qualified hyperparameterTuningJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} hyperparameter_tuning_job + * @returns {string} Resource name string. + */ + hyperparameterTuningJobPath( + project: string, + location: string, + hyperparameterTuningJob: string + ) { + return this.pathTemplates.hyperparameterTuningJobPathTemplate.render({ + project: project, + location: location, + hyperparameter_tuning_job: hyperparameterTuningJob, + }); + } + + /** + * Parse the project from HyperparameterTuningJob resource. + * + * @param {string} hyperparameterTuningJobName + * A fully-qualified path representing HyperparameterTuningJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromHyperparameterTuningJobName( + hyperparameterTuningJobName: string + ) { + return this.pathTemplates.hyperparameterTuningJobPathTemplate.match( + hyperparameterTuningJobName + ).project; + } + + /** + * Parse the location from HyperparameterTuningJob resource. + * + * @param {string} hyperparameterTuningJobName + * A fully-qualified path representing HyperparameterTuningJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromHyperparameterTuningJobName( + hyperparameterTuningJobName: string + ) { + return this.pathTemplates.hyperparameterTuningJobPathTemplate.match( + hyperparameterTuningJobName + ).location; + } + + /** + * Parse the hyperparameter_tuning_job from HyperparameterTuningJob resource. + * + * @param {string} hyperparameterTuningJobName + * A fully-qualified path representing HyperparameterTuningJob resource. + * @returns {string} A string representing the hyperparameter_tuning_job. + */ + matchHyperparameterTuningJobFromHyperparameterTuningJobName( + hyperparameterTuningJobName: string + ) { + return this.pathTemplates.hyperparameterTuningJobPathTemplate.match( + hyperparameterTuningJobName + ).hyperparameter_tuning_job; + } + + /** + * Return a fully-qualified index resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} index + * @returns {string} Resource name string. + */ + indexPath(project: string, location: string, index: string) { + return this.pathTemplates.indexPathTemplate.render({ + project: project, + location: location, + index: index, + }); + } + + /** + * Parse the project from Index resource. + * + * @param {string} indexName + * A fully-qualified path representing Index resource. + * @returns {string} A string representing the project. + */ + matchProjectFromIndexName(indexName: string) { + return this.pathTemplates.indexPathTemplate.match(indexName).project; + } + + /** + * Parse the location from Index resource. + * + * @param {string} indexName + * A fully-qualified path representing Index resource. + * @returns {string} A string representing the location. + */ + matchLocationFromIndexName(indexName: string) { + return this.pathTemplates.indexPathTemplate.match(indexName).location; + } + + /** + * Parse the index from Index resource. + * + * @param {string} indexName + * A fully-qualified path representing Index resource. + * @returns {string} A string representing the index. + */ + matchIndexFromIndexName(indexName: string) { + return this.pathTemplates.indexPathTemplate.match(indexName).index; + } + + /** + * Return a fully-qualified indexEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} index_endpoint + * @returns {string} Resource name string. + */ + indexEndpointPath(project: string, location: string, indexEndpoint: string) { + return this.pathTemplates.indexEndpointPathTemplate.render({ + project: project, + location: location, + index_endpoint: indexEndpoint, + }); + } + + /** + * Parse the project from IndexEndpoint resource. + * + * @param {string} indexEndpointName + * A fully-qualified path representing IndexEndpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromIndexEndpointName(indexEndpointName: string) { + return this.pathTemplates.indexEndpointPathTemplate.match(indexEndpointName) + .project; + } + + /** + * Parse the location from IndexEndpoint resource. + * + * @param {string} indexEndpointName + * A fully-qualified path representing IndexEndpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromIndexEndpointName(indexEndpointName: string) { + return this.pathTemplates.indexEndpointPathTemplate.match(indexEndpointName) + .location; + } + + /** + * Parse the index_endpoint from IndexEndpoint resource. + * + * @param {string} indexEndpointName + * A fully-qualified path representing IndexEndpoint resource. + * @returns {string} A string representing the index_endpoint. + */ + matchIndexEndpointFromIndexEndpointName(indexEndpointName: string) { + return this.pathTemplates.indexEndpointPathTemplate.match(indexEndpointName) + .index_endpoint; + } + + /** + * Return a fully-qualified metadataSchema resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} metadata_store + * @param {string} metadata_schema + * @returns {string} Resource name string. + */ + metadataSchemaPath( + project: string, + location: string, + metadataStore: string, + metadataSchema: string + ) { + return this.pathTemplates.metadataSchemaPathTemplate.render({ + project: project, + location: location, + metadata_store: metadataStore, + metadata_schema: metadataSchema, + }); + } + + /** + * Parse the project from MetadataSchema resource. + * + * @param {string} metadataSchemaName + * A fully-qualified path representing MetadataSchema resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMetadataSchemaName(metadataSchemaName: string) { + return this.pathTemplates.metadataSchemaPathTemplate.match( + metadataSchemaName + ).project; + } + + /** + * Parse the location from MetadataSchema resource. + * + * @param {string} metadataSchemaName + * A fully-qualified path representing MetadataSchema resource. + * @returns {string} A string representing the location. + */ + matchLocationFromMetadataSchemaName(metadataSchemaName: string) { + return this.pathTemplates.metadataSchemaPathTemplate.match( + metadataSchemaName + ).location; + } + + /** + * Parse the metadata_store from MetadataSchema resource. + * + * @param {string} metadataSchemaName + * A fully-qualified path representing MetadataSchema resource. + * @returns {string} A string representing the metadata_store. + */ + matchMetadataStoreFromMetadataSchemaName(metadataSchemaName: string) { + return this.pathTemplates.metadataSchemaPathTemplate.match( + metadataSchemaName + ).metadata_store; + } + + /** + * Parse the metadata_schema from MetadataSchema resource. + * + * @param {string} metadataSchemaName + * A fully-qualified path representing MetadataSchema resource. + * @returns {string} A string representing the metadata_schema. + */ + matchMetadataSchemaFromMetadataSchemaName(metadataSchemaName: string) { + return this.pathTemplates.metadataSchemaPathTemplate.match( + metadataSchemaName + ).metadata_schema; + } + + /** + * Return a fully-qualified metadataStore resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} metadata_store + * @returns {string} Resource name string. + */ + metadataStorePath(project: string, location: string, metadataStore: string) { + return this.pathTemplates.metadataStorePathTemplate.render({ + project: project, + location: location, + metadata_store: metadataStore, + }); + } + + /** + * Parse the project from MetadataStore resource. + * + * @param {string} metadataStoreName + * A fully-qualified path representing MetadataStore resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMetadataStoreName(metadataStoreName: string) { + return this.pathTemplates.metadataStorePathTemplate.match(metadataStoreName) + .project; + } + + /** + * Parse the location from MetadataStore resource. + * + * @param {string} metadataStoreName + * A fully-qualified path representing MetadataStore resource. + * @returns {string} A string representing the location. + */ + matchLocationFromMetadataStoreName(metadataStoreName: string) { + return this.pathTemplates.metadataStorePathTemplate.match(metadataStoreName) + .location; + } + + /** + * Parse the metadata_store from MetadataStore resource. + * + * @param {string} metadataStoreName + * A fully-qualified path representing MetadataStore resource. + * @returns {string} A string representing the metadata_store. + */ + matchMetadataStoreFromMetadataStoreName(metadataStoreName: string) { + return this.pathTemplates.metadataStorePathTemplate.match(metadataStoreName) + .metadata_store; + } + + /** + * Return a fully-qualified model resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} model + * @returns {string} Resource name string. + */ + modelPath(project: string, location: string, model: string) { + return this.pathTemplates.modelPathTemplate.render({ + project: project, + location: location, + model: model, + }); + } + + /** + * Parse the project from Model resource. + * + * @param {string} modelName + * A fully-qualified path representing Model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromModelName(modelName: string) { + return this.pathTemplates.modelPathTemplate.match(modelName).project; + } + + /** + * Parse the location from Model resource. + * + * @param {string} modelName + * A fully-qualified path representing Model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromModelName(modelName: string) { + return this.pathTemplates.modelPathTemplate.match(modelName).location; + } + + /** + * Parse the model from Model resource. + * + * @param {string} modelName + * A fully-qualified path representing Model resource. + * @returns {string} A string representing the model. + */ + matchModelFromModelName(modelName: string) { + return this.pathTemplates.modelPathTemplate.match(modelName).model; + } + + /** + * Return a fully-qualified modelDeploymentMonitoringJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} model_deployment_monitoring_job + * @returns {string} Resource name string. + */ + modelDeploymentMonitoringJobPath( + project: string, + location: string, + modelDeploymentMonitoringJob: string + ) { + return this.pathTemplates.modelDeploymentMonitoringJobPathTemplate.render({ + project: project, + location: location, + model_deployment_monitoring_job: modelDeploymentMonitoringJob, + }); + } + + /** + * Parse the project from ModelDeploymentMonitoringJob resource. + * + * @param {string} modelDeploymentMonitoringJobName + * A fully-qualified path representing ModelDeploymentMonitoringJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromModelDeploymentMonitoringJobName( + modelDeploymentMonitoringJobName: string + ) { + return this.pathTemplates.modelDeploymentMonitoringJobPathTemplate.match( + modelDeploymentMonitoringJobName + ).project; + } + + /** + * Parse the location from ModelDeploymentMonitoringJob resource. + * + * @param {string} modelDeploymentMonitoringJobName + * A fully-qualified path representing ModelDeploymentMonitoringJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromModelDeploymentMonitoringJobName( + modelDeploymentMonitoringJobName: string + ) { + return this.pathTemplates.modelDeploymentMonitoringJobPathTemplate.match( + modelDeploymentMonitoringJobName + ).location; + } + + /** + * Parse the model_deployment_monitoring_job from ModelDeploymentMonitoringJob resource. + * + * @param {string} modelDeploymentMonitoringJobName + * A fully-qualified path representing ModelDeploymentMonitoringJob resource. + * @returns {string} A string representing the model_deployment_monitoring_job. + */ + matchModelDeploymentMonitoringJobFromModelDeploymentMonitoringJobName( + modelDeploymentMonitoringJobName: string + ) { + return this.pathTemplates.modelDeploymentMonitoringJobPathTemplate.match( + modelDeploymentMonitoringJobName + ).model_deployment_monitoring_job; + } + + /** + * Return a fully-qualified modelEvaluation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} model + * @param {string} evaluation + * @returns {string} Resource name string. + */ + modelEvaluationPath( + project: string, + location: string, + model: string, + evaluation: string + ) { + return this.pathTemplates.modelEvaluationPathTemplate.render({ + project: project, + location: location, + model: model, + evaluation: evaluation, + }); + } + + /** + * Parse the project from ModelEvaluation resource. + * + * @param {string} modelEvaluationName + * A fully-qualified path representing ModelEvaluation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromModelEvaluationName(modelEvaluationName: string) { + return this.pathTemplates.modelEvaluationPathTemplate.match( + modelEvaluationName + ).project; + } + + /** + * Parse the location from ModelEvaluation resource. + * + * @param {string} modelEvaluationName + * A fully-qualified path representing ModelEvaluation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromModelEvaluationName(modelEvaluationName: string) { + return this.pathTemplates.modelEvaluationPathTemplate.match( + modelEvaluationName + ).location; + } + + /** + * Parse the model from ModelEvaluation resource. + * + * @param {string} modelEvaluationName + * A fully-qualified path representing ModelEvaluation resource. + * @returns {string} A string representing the model. + */ + matchModelFromModelEvaluationName(modelEvaluationName: string) { + return this.pathTemplates.modelEvaluationPathTemplate.match( + modelEvaluationName + ).model; + } + + /** + * Parse the evaluation from ModelEvaluation resource. + * + * @param {string} modelEvaluationName + * A fully-qualified path representing ModelEvaluation resource. + * @returns {string} A string representing the evaluation. + */ + matchEvaluationFromModelEvaluationName(modelEvaluationName: string) { + return this.pathTemplates.modelEvaluationPathTemplate.match( + modelEvaluationName + ).evaluation; + } + + /** + * Return a fully-qualified modelEvaluationSlice resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} model + * @param {string} evaluation + * @param {string} slice + * @returns {string} Resource name string. + */ + modelEvaluationSlicePath( + project: string, + location: string, + model: string, + evaluation: string, + slice: string + ) { + return this.pathTemplates.modelEvaluationSlicePathTemplate.render({ + project: project, + location: location, + model: model, + evaluation: evaluation, + slice: slice, + }); + } + + /** + * Parse the project from ModelEvaluationSlice resource. + * + * @param {string} modelEvaluationSliceName + * A fully-qualified path representing ModelEvaluationSlice resource. + * @returns {string} A string representing the project. + */ + matchProjectFromModelEvaluationSliceName(modelEvaluationSliceName: string) { + return this.pathTemplates.modelEvaluationSlicePathTemplate.match( + modelEvaluationSliceName + ).project; + } + + /** + * Parse the location from ModelEvaluationSlice resource. + * + * @param {string} modelEvaluationSliceName + * A fully-qualified path representing ModelEvaluationSlice resource. + * @returns {string} A string representing the location. + */ + matchLocationFromModelEvaluationSliceName(modelEvaluationSliceName: string) { + return this.pathTemplates.modelEvaluationSlicePathTemplate.match( + modelEvaluationSliceName + ).location; + } + + /** + * Parse the model from ModelEvaluationSlice resource. + * + * @param {string} modelEvaluationSliceName + * A fully-qualified path representing ModelEvaluationSlice resource. + * @returns {string} A string representing the model. + */ + matchModelFromModelEvaluationSliceName(modelEvaluationSliceName: string) { + return this.pathTemplates.modelEvaluationSlicePathTemplate.match( + modelEvaluationSliceName + ).model; + } + + /** + * Parse the evaluation from ModelEvaluationSlice resource. + * + * @param {string} modelEvaluationSliceName + * A fully-qualified path representing ModelEvaluationSlice resource. + * @returns {string} A string representing the evaluation. + */ + matchEvaluationFromModelEvaluationSliceName( + modelEvaluationSliceName: string + ) { + return this.pathTemplates.modelEvaluationSlicePathTemplate.match( + modelEvaluationSliceName + ).evaluation; + } + + /** + * Parse the slice from ModelEvaluationSlice resource. + * + * @param {string} modelEvaluationSliceName + * A fully-qualified path representing ModelEvaluationSlice resource. + * @returns {string} A string representing the slice. + */ + matchSliceFromModelEvaluationSliceName(modelEvaluationSliceName: string) { + return this.pathTemplates.modelEvaluationSlicePathTemplate.match( + modelEvaluationSliceName + ).slice; + } + + /** + * Return a fully-qualified nasJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} nas_job + * @returns {string} Resource name string. + */ + nasJobPath(project: string, location: string, nasJob: string) { + return this.pathTemplates.nasJobPathTemplate.render({ + project: project, + location: location, + nas_job: nasJob, + }); + } + + /** + * Parse the project from NasJob resource. + * + * @param {string} nasJobName + * A fully-qualified path representing NasJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromNasJobName(nasJobName: string) { + return this.pathTemplates.nasJobPathTemplate.match(nasJobName).project; + } + + /** + * Parse the location from NasJob resource. + * + * @param {string} nasJobName + * A fully-qualified path representing NasJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromNasJobName(nasJobName: string) { + return this.pathTemplates.nasJobPathTemplate.match(nasJobName).location; + } + + /** + * Parse the nas_job from NasJob resource. + * + * @param {string} nasJobName + * A fully-qualified path representing NasJob resource. + * @returns {string} A string representing the nas_job. + */ + matchNasJobFromNasJobName(nasJobName: string) { + return this.pathTemplates.nasJobPathTemplate.match(nasJobName).nas_job; + } + + /** + * Return a fully-qualified nasTrialDetail resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} nas_job + * @param {string} nas_trial_detail + * @returns {string} Resource name string. + */ + nasTrialDetailPath( + project: string, + location: string, + nasJob: string, + nasTrialDetail: string + ) { + return this.pathTemplates.nasTrialDetailPathTemplate.render({ + project: project, + location: location, + nas_job: nasJob, + nas_trial_detail: nasTrialDetail, + }); + } + + /** + * Parse the project from NasTrialDetail resource. + * + * @param {string} nasTrialDetailName + * A fully-qualified path representing NasTrialDetail resource. + * @returns {string} A string representing the project. + */ + matchProjectFromNasTrialDetailName(nasTrialDetailName: string) { + return this.pathTemplates.nasTrialDetailPathTemplate.match( + nasTrialDetailName + ).project; + } + + /** + * Parse the location from NasTrialDetail resource. + * + * @param {string} nasTrialDetailName + * A fully-qualified path representing NasTrialDetail resource. + * @returns {string} A string representing the location. + */ + matchLocationFromNasTrialDetailName(nasTrialDetailName: string) { + return this.pathTemplates.nasTrialDetailPathTemplate.match( + nasTrialDetailName + ).location; + } + + /** + * Parse the nas_job from NasTrialDetail resource. + * + * @param {string} nasTrialDetailName + * A fully-qualified path representing NasTrialDetail resource. + * @returns {string} A string representing the nas_job. + */ + matchNasJobFromNasTrialDetailName(nasTrialDetailName: string) { + return this.pathTemplates.nasTrialDetailPathTemplate.match( + nasTrialDetailName + ).nas_job; + } + + /** + * Parse the nas_trial_detail from NasTrialDetail resource. + * + * @param {string} nasTrialDetailName + * A fully-qualified path representing NasTrialDetail resource. + * @returns {string} A string representing the nas_trial_detail. + */ + matchNasTrialDetailFromNasTrialDetailName(nasTrialDetailName: string) { + return this.pathTemplates.nasTrialDetailPathTemplate.match( + nasTrialDetailName + ).nas_trial_detail; + } + + /** + * Return a fully-qualified pipelineJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} pipeline_job + * @returns {string} Resource name string. + */ + pipelineJobPath(project: string, location: string, pipelineJob: string) { + return this.pathTemplates.pipelineJobPathTemplate.render({ + project: project, + location: location, + pipeline_job: pipelineJob, + }); + } + + /** + * Parse the project from PipelineJob resource. + * + * @param {string} pipelineJobName + * A fully-qualified path representing PipelineJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPipelineJobName(pipelineJobName: string) { + return this.pathTemplates.pipelineJobPathTemplate.match(pipelineJobName) + .project; + } + + /** + * Parse the location from PipelineJob resource. + * + * @param {string} pipelineJobName + * A fully-qualified path representing PipelineJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPipelineJobName(pipelineJobName: string) { + return this.pathTemplates.pipelineJobPathTemplate.match(pipelineJobName) + .location; + } + + /** + * Parse the pipeline_job from PipelineJob resource. + * + * @param {string} pipelineJobName + * A fully-qualified path representing PipelineJob resource. + * @returns {string} A string representing the pipeline_job. + */ + matchPipelineJobFromPipelineJobName(pipelineJobName: string) { + return this.pathTemplates.pipelineJobPathTemplate.match(pipelineJobName) + .pipeline_job; + } + + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + + /** + * Return a fully-qualified publisherModel resource name string. + * + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + publisherModelPath(publisher: string, model: string) { + return this.pathTemplates.publisherModelPathTemplate.render({ + publisher: publisher, + model: model, + }); + } + + /** + * Parse the publisher from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).publisher; + } + + /** + * Parse the model from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the model. + */ + matchModelFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).model; + } + + /** + * Return a fully-qualified savedQuery resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @param {string} saved_query + * @returns {string} Resource name string. + */ + savedQueryPath( + project: string, + location: string, + dataset: string, + savedQuery: string + ) { + return this.pathTemplates.savedQueryPathTemplate.render({ + project: project, + location: location, + dataset: dataset, + saved_query: savedQuery, + }); + } + + /** + * Parse the project from SavedQuery resource. + * + * @param {string} savedQueryName + * A fully-qualified path representing SavedQuery resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSavedQueryName(savedQueryName: string) { + return this.pathTemplates.savedQueryPathTemplate.match(savedQueryName) + .project; + } + + /** + * Parse the location from SavedQuery resource. + * + * @param {string} savedQueryName + * A fully-qualified path representing SavedQuery resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSavedQueryName(savedQueryName: string) { + return this.pathTemplates.savedQueryPathTemplate.match(savedQueryName) + .location; + } + + /** + * Parse the dataset from SavedQuery resource. + * + * @param {string} savedQueryName + * A fully-qualified path representing SavedQuery resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromSavedQueryName(savedQueryName: string) { + return this.pathTemplates.savedQueryPathTemplate.match(savedQueryName) + .dataset; + } + + /** + * Parse the saved_query from SavedQuery resource. + * + * @param {string} savedQueryName + * A fully-qualified path representing SavedQuery resource. + * @returns {string} A string representing the saved_query. + */ + matchSavedQueryFromSavedQueryName(savedQueryName: string) { + return this.pathTemplates.savedQueryPathTemplate.match(savedQueryName) + .saved_query; + } + + /** + * Return a fully-qualified schedule resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} schedule + * @returns {string} Resource name string. + */ + schedulePath(project: string, location: string, schedule: string) { + return this.pathTemplates.schedulePathTemplate.render({ + project: project, + location: location, + schedule: schedule, + }); + } + + /** + * Parse the project from Schedule resource. + * + * @param {string} scheduleName + * A fully-qualified path representing Schedule resource. + * @returns {string} A string representing the project. + */ + matchProjectFromScheduleName(scheduleName: string) { + return this.pathTemplates.schedulePathTemplate.match(scheduleName).project; + } + + /** + * Parse the location from Schedule resource. + * + * @param {string} scheduleName + * A fully-qualified path representing Schedule resource. + * @returns {string} A string representing the location. + */ + matchLocationFromScheduleName(scheduleName: string) { + return this.pathTemplates.schedulePathTemplate.match(scheduleName).location; + } + + /** + * Parse the schedule from Schedule resource. + * + * @param {string} scheduleName + * A fully-qualified path representing Schedule resource. + * @returns {string} A string representing the schedule. + */ + matchScheduleFromScheduleName(scheduleName: string) { + return this.pathTemplates.schedulePathTemplate.match(scheduleName).schedule; + } + + /** + * Return a fully-qualified specialistPool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} specialist_pool + * @returns {string} Resource name string. + */ + specialistPoolPath( + project: string, + location: string, + specialistPool: string + ) { + return this.pathTemplates.specialistPoolPathTemplate.render({ + project: project, + location: location, + specialist_pool: specialistPool, + }); + } + + /** + * Parse the project from SpecialistPool resource. + * + * @param {string} specialistPoolName + * A fully-qualified path representing SpecialistPool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSpecialistPoolName(specialistPoolName: string) { + return this.pathTemplates.specialistPoolPathTemplate.match( + specialistPoolName + ).project; + } + + /** + * Parse the location from SpecialistPool resource. + * + * @param {string} specialistPoolName + * A fully-qualified path representing SpecialistPool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSpecialistPoolName(specialistPoolName: string) { + return this.pathTemplates.specialistPoolPathTemplate.match( + specialistPoolName + ).location; + } + + /** + * Parse the specialist_pool from SpecialistPool resource. + * + * @param {string} specialistPoolName + * A fully-qualified path representing SpecialistPool resource. + * @returns {string} A string representing the specialist_pool. + */ + matchSpecialistPoolFromSpecialistPoolName(specialistPoolName: string) { + return this.pathTemplates.specialistPoolPathTemplate.match( + specialistPoolName + ).specialist_pool; + } + + /** + * Return a fully-qualified study resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} study + * @returns {string} Resource name string. + */ + studyPath(project: string, location: string, study: string) { + return this.pathTemplates.studyPathTemplate.render({ + project: project, + location: location, + study: study, + }); + } + + /** + * Parse the project from Study resource. + * + * @param {string} studyName + * A fully-qualified path representing Study resource. + * @returns {string} A string representing the project. + */ + matchProjectFromStudyName(studyName: string) { + return this.pathTemplates.studyPathTemplate.match(studyName).project; + } + + /** + * Parse the location from Study resource. + * + * @param {string} studyName + * A fully-qualified path representing Study resource. + * @returns {string} A string representing the location. + */ + matchLocationFromStudyName(studyName: string) { + return this.pathTemplates.studyPathTemplate.match(studyName).location; + } + + /** + * Parse the study from Study resource. + * + * @param {string} studyName + * A fully-qualified path representing Study resource. + * @returns {string} A string representing the study. + */ + matchStudyFromStudyName(studyName: string) { + return this.pathTemplates.studyPathTemplate.match(studyName).study; + } + + /** + * Return a fully-qualified tensorboard resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} tensorboard + * @returns {string} Resource name string. + */ + tensorboardPath(project: string, location: string, tensorboard: string) { + return this.pathTemplates.tensorboardPathTemplate.render({ + project: project, + location: location, + tensorboard: tensorboard, + }); + } + + /** + * Parse the project from Tensorboard resource. + * + * @param {string} tensorboardName + * A fully-qualified path representing Tensorboard resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTensorboardName(tensorboardName: string) { + return this.pathTemplates.tensorboardPathTemplate.match(tensorboardName) + .project; + } + + /** + * Parse the location from Tensorboard resource. + * + * @param {string} tensorboardName + * A fully-qualified path representing Tensorboard resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTensorboardName(tensorboardName: string) { + return this.pathTemplates.tensorboardPathTemplate.match(tensorboardName) + .location; + } + + /** + * Parse the tensorboard from Tensorboard resource. + * + * @param {string} tensorboardName + * A fully-qualified path representing Tensorboard resource. + * @returns {string} A string representing the tensorboard. + */ + matchTensorboardFromTensorboardName(tensorboardName: string) { + return this.pathTemplates.tensorboardPathTemplate.match(tensorboardName) + .tensorboard; + } + + /** + * Return a fully-qualified tensorboardExperiment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} tensorboard + * @param {string} experiment + * @returns {string} Resource name string. + */ + tensorboardExperimentPath( + project: string, + location: string, + tensorboard: string, + experiment: string + ) { + return this.pathTemplates.tensorboardExperimentPathTemplate.render({ + project: project, + location: location, + tensorboard: tensorboard, + experiment: experiment, + }); + } + + /** + * Parse the project from TensorboardExperiment resource. + * + * @param {string} tensorboardExperimentName + * A fully-qualified path representing TensorboardExperiment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTensorboardExperimentName(tensorboardExperimentName: string) { + return this.pathTemplates.tensorboardExperimentPathTemplate.match( + tensorboardExperimentName + ).project; + } + + /** + * Parse the location from TensorboardExperiment resource. + * + * @param {string} tensorboardExperimentName + * A fully-qualified path representing TensorboardExperiment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTensorboardExperimentName( + tensorboardExperimentName: string + ) { + return this.pathTemplates.tensorboardExperimentPathTemplate.match( + tensorboardExperimentName + ).location; + } + + /** + * Parse the tensorboard from TensorboardExperiment resource. + * + * @param {string} tensorboardExperimentName + * A fully-qualified path representing TensorboardExperiment resource. + * @returns {string} A string representing the tensorboard. + */ + matchTensorboardFromTensorboardExperimentName( + tensorboardExperimentName: string + ) { + return this.pathTemplates.tensorboardExperimentPathTemplate.match( + tensorboardExperimentName + ).tensorboard; + } + + /** + * Parse the experiment from TensorboardExperiment resource. + * + * @param {string} tensorboardExperimentName + * A fully-qualified path representing TensorboardExperiment resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromTensorboardExperimentName( + tensorboardExperimentName: string + ) { + return this.pathTemplates.tensorboardExperimentPathTemplate.match( + tensorboardExperimentName + ).experiment; + } + + /** + * Return a fully-qualified tensorboardRun resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} tensorboard + * @param {string} experiment + * @param {string} run + * @returns {string} Resource name string. + */ + tensorboardRunPath( + project: string, + location: string, + tensorboard: string, + experiment: string, + run: string + ) { + return this.pathTemplates.tensorboardRunPathTemplate.render({ + project: project, + location: location, + tensorboard: tensorboard, + experiment: experiment, + run: run, + }); + } + + /** + * Parse the project from TensorboardRun resource. + * + * @param {string} tensorboardRunName + * A fully-qualified path representing TensorboardRun resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTensorboardRunName(tensorboardRunName: string) { + return this.pathTemplates.tensorboardRunPathTemplate.match( + tensorboardRunName + ).project; + } + + /** + * Parse the location from TensorboardRun resource. + * + * @param {string} tensorboardRunName + * A fully-qualified path representing TensorboardRun resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTensorboardRunName(tensorboardRunName: string) { + return this.pathTemplates.tensorboardRunPathTemplate.match( + tensorboardRunName + ).location; + } + + /** + * Parse the tensorboard from TensorboardRun resource. + * + * @param {string} tensorboardRunName + * A fully-qualified path representing TensorboardRun resource. + * @returns {string} A string representing the tensorboard. + */ + matchTensorboardFromTensorboardRunName(tensorboardRunName: string) { + return this.pathTemplates.tensorboardRunPathTemplate.match( + tensorboardRunName + ).tensorboard; + } + + /** + * Parse the experiment from TensorboardRun resource. + * + * @param {string} tensorboardRunName + * A fully-qualified path representing TensorboardRun resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromTensorboardRunName(tensorboardRunName: string) { + return this.pathTemplates.tensorboardRunPathTemplate.match( + tensorboardRunName + ).experiment; + } + + /** + * Parse the run from TensorboardRun resource. + * + * @param {string} tensorboardRunName + * A fully-qualified path representing TensorboardRun resource. + * @returns {string} A string representing the run. + */ + matchRunFromTensorboardRunName(tensorboardRunName: string) { + return this.pathTemplates.tensorboardRunPathTemplate.match( + tensorboardRunName + ).run; + } + + /** + * Return a fully-qualified tensorboardTimeSeries resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} tensorboard + * @param {string} experiment + * @param {string} run + * @param {string} time_series + * @returns {string} Resource name string. + */ + tensorboardTimeSeriesPath( + project: string, + location: string, + tensorboard: string, + experiment: string, + run: string, + timeSeries: string + ) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.render({ + project: project, + location: location, + tensorboard: tensorboard, + experiment: experiment, + run: run, + time_series: timeSeries, + }); + } + + /** + * Parse the project from TensorboardTimeSeries resource. + * + * @param {string} tensorboardTimeSeriesName + * A fully-qualified path representing TensorboardTimeSeries resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTensorboardTimeSeriesName(tensorboardTimeSeriesName: string) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.match( + tensorboardTimeSeriesName + ).project; + } + + /** + * Parse the location from TensorboardTimeSeries resource. + * + * @param {string} tensorboardTimeSeriesName + * A fully-qualified path representing TensorboardTimeSeries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTensorboardTimeSeriesName( + tensorboardTimeSeriesName: string + ) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.match( + tensorboardTimeSeriesName + ).location; + } + + /** + * Parse the tensorboard from TensorboardTimeSeries resource. + * + * @param {string} tensorboardTimeSeriesName + * A fully-qualified path representing TensorboardTimeSeries resource. + * @returns {string} A string representing the tensorboard. + */ + matchTensorboardFromTensorboardTimeSeriesName( + tensorboardTimeSeriesName: string + ) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.match( + tensorboardTimeSeriesName + ).tensorboard; + } + + /** + * Parse the experiment from TensorboardTimeSeries resource. + * + * @param {string} tensorboardTimeSeriesName + * A fully-qualified path representing TensorboardTimeSeries resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromTensorboardTimeSeriesName( + tensorboardTimeSeriesName: string + ) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.match( + tensorboardTimeSeriesName + ).experiment; + } + + /** + * Parse the run from TensorboardTimeSeries resource. + * + * @param {string} tensorboardTimeSeriesName + * A fully-qualified path representing TensorboardTimeSeries resource. + * @returns {string} A string representing the run. + */ + matchRunFromTensorboardTimeSeriesName(tensorboardTimeSeriesName: string) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.match( + tensorboardTimeSeriesName + ).run; + } + + /** + * Parse the time_series from TensorboardTimeSeries resource. + * + * @param {string} tensorboardTimeSeriesName + * A fully-qualified path representing TensorboardTimeSeries resource. + * @returns {string} A string representing the time_series. + */ + matchTimeSeriesFromTensorboardTimeSeriesName( + tensorboardTimeSeriesName: string + ) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.match( + tensorboardTimeSeriesName + ).time_series; + } + + /** + * Return a fully-qualified trainingPipeline resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} training_pipeline + * @returns {string} Resource name string. + */ + trainingPipelinePath( + project: string, + location: string, + trainingPipeline: string + ) { + return this.pathTemplates.trainingPipelinePathTemplate.render({ + project: project, + location: location, + training_pipeline: trainingPipeline, + }); + } + + /** + * Parse the project from TrainingPipeline resource. + * + * @param {string} trainingPipelineName + * A fully-qualified path representing TrainingPipeline resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTrainingPipelineName(trainingPipelineName: string) { + return this.pathTemplates.trainingPipelinePathTemplate.match( + trainingPipelineName + ).project; + } + + /** + * Parse the location from TrainingPipeline resource. + * + * @param {string} trainingPipelineName + * A fully-qualified path representing TrainingPipeline resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTrainingPipelineName(trainingPipelineName: string) { + return this.pathTemplates.trainingPipelinePathTemplate.match( + trainingPipelineName + ).location; + } + + /** + * Parse the training_pipeline from TrainingPipeline resource. + * + * @param {string} trainingPipelineName + * A fully-qualified path representing TrainingPipeline resource. + * @returns {string} A string representing the training_pipeline. + */ + matchTrainingPipelineFromTrainingPipelineName(trainingPipelineName: string) { + return this.pathTemplates.trainingPipelinePathTemplate.match( + trainingPipelineName + ).training_pipeline; + } + + /** + * Return a fully-qualified trial resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} study + * @param {string} trial + * @returns {string} Resource name string. + */ + trialPath(project: string, location: string, study: string, trial: string) { + return this.pathTemplates.trialPathTemplate.render({ + project: project, + location: location, + study: study, + trial: trial, + }); + } + + /** + * Parse the project from Trial resource. + * + * @param {string} trialName + * A fully-qualified path representing Trial resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTrialName(trialName: string) { + return this.pathTemplates.trialPathTemplate.match(trialName).project; + } + + /** + * Parse the location from Trial resource. + * + * @param {string} trialName + * A fully-qualified path representing Trial resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTrialName(trialName: string) { + return this.pathTemplates.trialPathTemplate.match(trialName).location; + } + + /** + * Parse the study from Trial resource. + * + * @param {string} trialName + * A fully-qualified path representing Trial resource. + * @returns {string} A string representing the study. + */ + matchStudyFromTrialName(trialName: string) { + return this.pathTemplates.trialPathTemplate.match(trialName).study; + } + + /** + * Parse the trial from Trial resource. + * + * @param {string} trialName + * A fully-qualified path representing Trial resource. + * @returns {string} A string representing the trial. + */ + matchTrialFromTrialName(trialName: string) { + return this.pathTemplates.trialPathTemplate.match(trialName).trial; + } + + /** + * 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.modelGardenServiceStub && !this._terminated) { + return this.modelGardenServiceStub.then(stub => { + this._terminated = true; + stub.close(); + this.iamClient.close(); + this.locationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_client_config.json b/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_client_config.json new file mode 100644 index 00000000000..73ed57defee --- /dev/null +++ b/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_client_config.json @@ -0,0 +1,30 @@ +{ + "interfaces": { + "google.cloud.aiplatform.v1beta1.ModelGardenService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "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 + } + }, + "methods": { + "GetPublisherModel": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_proto_list.json new file mode 100644 index 00000000000..403e0932291 --- /dev/null +++ b/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_proto_list.json @@ -0,0 +1,129 @@ +[ + "../../protos/google/cloud/aiplatform/v1beta1/accelerator_type.proto", + "../../protos/google/cloud/aiplatform/v1beta1/annotation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/annotation_spec.proto", + "../../protos/google/cloud/aiplatform/v1beta1/artifact.proto", + "../../protos/google/cloud/aiplatform/v1beta1/batch_prediction_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/completion_stats.proto", + "../../protos/google/cloud/aiplatform/v1beta1/context.proto", + "../../protos/google/cloud/aiplatform/v1beta1/custom_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/data_item.proto", + "../../protos/google/cloud/aiplatform/v1beta1/data_labeling_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/dataset.proto", + "../../protos/google/cloud/aiplatform/v1beta1/dataset_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/deployed_index_ref.proto", + "../../protos/google/cloud/aiplatform/v1beta1/deployed_model_ref.proto", + "../../protos/google/cloud/aiplatform/v1beta1/deployment_resource_pool.proto", + "../../protos/google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/encryption_spec.proto", + "../../protos/google/cloud/aiplatform/v1beta1/endpoint.proto", + "../../protos/google/cloud/aiplatform/v1beta1/endpoint_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/entity_type.proto", + "../../protos/google/cloud/aiplatform/v1beta1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1beta1/evaluated_annotation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/event.proto", + "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", + "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/explanation_metadata.proto", + "../../protos/google/cloud/aiplatform/v1beta1/feature.proto", + "../../protos/google/cloud/aiplatform/v1beta1/feature_monitoring_stats.proto", + "../../protos/google/cloud/aiplatform/v1beta1/feature_selector.proto", + "../../protos/google/cloud/aiplatform/v1beta1/featurestore.proto", + "../../protos/google/cloud/aiplatform/v1beta1/featurestore_monitoring.proto", + "../../protos/google/cloud/aiplatform/v1beta1/featurestore_online_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/featurestore_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/hyperparameter_tuning_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/index.proto", + "../../protos/google/cloud/aiplatform/v1beta1/index_endpoint.proto", + "../../protos/google/cloud/aiplatform/v1beta1/index_endpoint_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/index_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/io.proto", + "../../protos/google/cloud/aiplatform/v1beta1/job_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/job_state.proto", + "../../protos/google/cloud/aiplatform/v1beta1/lineage_subgraph.proto", + "../../protos/google/cloud/aiplatform/v1beta1/machine_resources.proto", + "../../protos/google/cloud/aiplatform/v1beta1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1beta1/match_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/metadata_schema.proto", + "../../protos/google/cloud/aiplatform/v1beta1/metadata_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/metadata_store.proto", + "../../protos/google/cloud/aiplatform/v1beta1/migratable_resource.proto", + "../../protos/google/cloud/aiplatform/v1beta1/migration_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_deployment_monitoring_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_garden_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_monitoring.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/operation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/pipeline_failure_policy.proto", + "../../protos/google/cloud/aiplatform/v1beta1/pipeline_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", + "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/annotation_payload.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/annotation_spec_color.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/data_item_payload.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/dataset_metadata.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/geometry.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/image_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/image_object_detection.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/image_segmentation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/text_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/text_extraction.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/text_sentiment.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/video_action_recognition.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/video_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/video_object_tracking.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/params/image_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/params/image_object_detection.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/params/image_segmentation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/params/video_action_recognition.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/params/video_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/params/video_object_tracking.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/image_object_detection.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/image_segmentation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/tabular_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/tabular_regression.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/text_extraction.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/text_sentiment.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/time_series_forecasting.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_action_recognition.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_object_tracking.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_object_detection.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_segmentation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_tables.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_extraction.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_sentiment.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_time_series_forecasting.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_action_recognition.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_object_tracking.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/export_evaluated_data_items_config.proto", + "../../protos/google/cloud/aiplatform/v1beta1/service_networking.proto", + "../../protos/google/cloud/aiplatform/v1beta1/specialist_pool.proto", + "../../protos/google/cloud/aiplatform/v1beta1/specialist_pool_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/study.proto", + "../../protos/google/cloud/aiplatform/v1beta1/tensorboard.proto", + "../../protos/google/cloud/aiplatform/v1beta1/tensorboard_data.proto", + "../../protos/google/cloud/aiplatform/v1beta1/tensorboard_experiment.proto", + "../../protos/google/cloud/aiplatform/v1beta1/tensorboard_run.proto", + "../../protos/google/cloud/aiplatform/v1beta1/tensorboard_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/tensorboard_time_series.proto", + "../../protos/google/cloud/aiplatform/v1beta1/training_pipeline.proto", + "../../protos/google/cloud/aiplatform/v1beta1/types.proto", + "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", + "../../protos/google/cloud/aiplatform/v1beta1/value.proto", + "../../protos/google/cloud/aiplatform/v1beta1/vizier_service.proto" +] diff --git a/packages/google-cloud-aiplatform/src/v1beta1/model_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/model_service_client.ts index 2f6259b9e03..110829a675c 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/model_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/model_service_client.ts @@ -220,9 +220,6 @@ export class ModelServiceClient { deploymentResourcePoolPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}' ), - endpointPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/endpoints/{endpoint}' - ), entityTypePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' ), @@ -275,6 +272,16 @@ export class ModelServiceClient { pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), + publisherModelPathTemplate: new this._gaxModule.PathTemplate( + 'publishers/{publisher}/models/{model}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -367,6 +374,12 @@ export class ModelServiceClient { { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy', }, @@ -376,6 +389,12 @@ export class ModelServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, ], }, { @@ -391,6 +410,14 @@ export class ModelServiceClient { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy', body: '*', @@ -403,6 +430,14 @@ export class ModelServiceClient { post: '/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -416,6 +451,12 @@ export class ModelServiceClient { { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions', }, @@ -425,6 +466,12 @@ export class ModelServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, ], }, { @@ -879,6 +926,14 @@ export class ModelServiceClient { delete: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, ], }, { @@ -1066,6 +1121,12 @@ export class ModelServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, ], }, { @@ -1244,6 +1305,12 @@ export class ModelServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*}/operations', }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*}/operations', + }, ], }, { @@ -1440,6 +1507,12 @@ export class ModelServiceClient { { post: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:wait', }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + }, ], }, ]; @@ -3696,8 +3769,10 @@ export class ModelServiceClient { * @param {string} request.pageToken * The standard list page token. * Typically obtained via - * {@link google.cloud.aiplatform.v1beta1.ListModelVersionsResponse.next_page_token|ListModelVersionsResponse.next_page_token} - * of the previous {@link |ModelService.ListModelversions} call. + * {@link google.cloud.aiplatform.v1beta1.ListModelVersionsResponse.next_page_token|next_page_token} + * of the previous + * {@link google.cloud.aiplatform.v1beta1.ModelService.ListModelVersions|ListModelVersions} + * call. * @param {string} request.filter * An expression for filtering the results of the request. For field names * both snake_case and camelCase are supported. @@ -3820,8 +3895,10 @@ export class ModelServiceClient { * @param {string} request.pageToken * The standard list page token. * Typically obtained via - * {@link google.cloud.aiplatform.v1beta1.ListModelVersionsResponse.next_page_token|ListModelVersionsResponse.next_page_token} - * of the previous {@link |ModelService.ListModelversions} call. + * {@link google.cloud.aiplatform.v1beta1.ListModelVersionsResponse.next_page_token|next_page_token} + * of the previous + * {@link google.cloud.aiplatform.v1beta1.ModelService.ListModelVersions|ListModelVersions} + * call. * @param {string} request.filter * An expression for filtering the results of the request. For field names * both snake_case and camelCase are supported. @@ -3892,8 +3969,10 @@ export class ModelServiceClient { * @param {string} request.pageToken * The standard list page token. * Typically obtained via - * {@link google.cloud.aiplatform.v1beta1.ListModelVersionsResponse.next_page_token|ListModelVersionsResponse.next_page_token} - * of the previous {@link |ModelService.ListModelversions} call. + * {@link google.cloud.aiplatform.v1beta1.ListModelVersionsResponse.next_page_token|next_page_token} + * of the previous + * {@link google.cloud.aiplatform.v1beta1.ModelService.ListModelVersions|ListModelVersions} + * call. * @param {string} request.filter * An expression for filtering the results of the request. For field names * both snake_case and camelCase are supported. @@ -5452,55 +5531,6 @@ export class ModelServiceClient { ).deployment_resource_pool; } - /** - * Return a fully-qualified endpoint resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} endpoint - * @returns {string} Resource name string. - */ - endpointPath(project: string, location: string, endpoint: string) { - return this.pathTemplates.endpointPathTemplate.render({ - project: project, - location: location, - endpoint: endpoint, - }); - } - - /** - * Parse the project from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).project; - } - - /** - * Parse the location from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).location; - } - - /** - * Parse the endpoint from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the endpoint. - */ - matchEndpointFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).endpoint; - } - /** * Return a fully-qualified entityType resource name string. * @@ -6565,6 +6595,194 @@ export class ModelServiceClient { .pipeline_job; } + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + + /** + * Return a fully-qualified publisherModel resource name string. + * + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + publisherModelPath(publisher: string, model: string) { + return this.pathTemplates.publisherModelPathTemplate.render({ + publisher: publisher, + model: model, + }); + } + + /** + * Parse the publisher from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).publisher; + } + + /** + * Parse the model from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the model. + */ + matchModelFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).model; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/model_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/model_service_proto_list.json index 9638e888ca9..403e0932291 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/model_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/model_service_proto_list.json @@ -53,6 +53,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_deployment_monitoring_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_garden_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_monitoring.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", @@ -62,6 +63,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_client.ts index 4da4aeb027e..fd0069d4516 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_client.ts @@ -222,9 +222,6 @@ export class PipelineServiceClient { deploymentResourcePoolPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}' ), - endpointPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/endpoints/{endpoint}' - ), entityTypePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' ), @@ -277,6 +274,16 @@ export class PipelineServiceClient { pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), + publisherModelPathTemplate: new this._gaxModule.PathTemplate( + 'publishers/{publisher}/models/{model}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -359,6 +366,12 @@ export class PipelineServiceClient { { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy', }, @@ -368,6 +381,12 @@ export class PipelineServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, ], }, { @@ -383,6 +402,14 @@ export class PipelineServiceClient { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy', body: '*', @@ -395,6 +422,14 @@ export class PipelineServiceClient { post: '/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -408,6 +443,12 @@ export class PipelineServiceClient { { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions', }, @@ -417,6 +458,12 @@ export class PipelineServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, ], }, { @@ -871,6 +918,14 @@ export class PipelineServiceClient { delete: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, ], }, { @@ -1058,6 +1113,12 @@ export class PipelineServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, ], }, { @@ -1236,6 +1297,12 @@ export class PipelineServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*}/operations', }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*}/operations', + }, ], }, { @@ -1432,6 +1499,12 @@ export class PipelineServiceClient { { post: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:wait', }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + }, ], }, ]; @@ -4217,55 +4290,6 @@ export class PipelineServiceClient { ).deployment_resource_pool; } - /** - * Return a fully-qualified endpoint resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} endpoint - * @returns {string} Resource name string. - */ - endpointPath(project: string, location: string, endpoint: string) { - return this.pathTemplates.endpointPathTemplate.render({ - project: project, - location: location, - endpoint: endpoint, - }); - } - - /** - * Parse the project from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).project; - } - - /** - * Parse the location from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).location; - } - - /** - * Parse the endpoint from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the endpoint. - */ - matchEndpointFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).endpoint; - } - /** * Return a fully-qualified entityType resource name string. * @@ -5330,6 +5354,194 @@ export class PipelineServiceClient { .pipeline_job; } + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + + /** + * Return a fully-qualified publisherModel resource name string. + * + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + publisherModelPath(publisher: string, model: string) { + return this.pathTemplates.publisherModelPathTemplate.render({ + publisher: publisher, + model: model, + }); + } + + /** + * Parse the publisher from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).publisher; + } + + /** + * Parse the model from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the model. + */ + matchModelFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).model; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_proto_list.json index 9638e888ca9..403e0932291 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_proto_list.json @@ -53,6 +53,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_deployment_monitoring_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_garden_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_monitoring.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", @@ -62,6 +63,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_client.ts index b52eb14e2b6..dce336071af 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_client.ts @@ -215,9 +215,6 @@ export class PredictionServiceClient { deploymentResourcePoolPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}' ), - endpointPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/endpoints/{endpoint}' - ), entityTypePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' ), @@ -267,6 +264,16 @@ export class PredictionServiceClient { pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), + publisherModelPathTemplate: new this._gaxModule.PathTemplate( + 'publishers/{publisher}/models/{model}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -1659,55 +1666,6 @@ export class PredictionServiceClient { ).deployment_resource_pool; } - /** - * Return a fully-qualified endpoint resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} endpoint - * @returns {string} Resource name string. - */ - endpointPath(project: string, location: string, endpoint: string) { - return this.pathTemplates.endpointPathTemplate.render({ - project: project, - location: location, - endpoint: endpoint, - }); - } - - /** - * Parse the project from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).project; - } - - /** - * Parse the location from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).location; - } - - /** - * Parse the endpoint from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the endpoint. - */ - matchEndpointFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).endpoint; - } - /** * Return a fully-qualified entityType resource name string. * @@ -2736,6 +2694,194 @@ export class PredictionServiceClient { .pipeline_job; } + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + + /** + * Return a fully-qualified publisherModel resource name string. + * + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + publisherModelPath(publisher: string, model: string) { + return this.pathTemplates.publisherModelPathTemplate.render({ + publisher: publisher, + model: model, + }); + } + + /** + * Parse the publisher from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).publisher; + } + + /** + * Parse the model from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the model. + */ + matchModelFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).model; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_proto_list.json index 9638e888ca9..403e0932291 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_proto_list.json @@ -53,6 +53,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_deployment_monitoring_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_garden_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_monitoring.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", @@ -62,6 +63,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_client.ts index 0ee46758123..02a04fe264c 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_client.ts @@ -221,9 +221,6 @@ export class ScheduleServiceClient { deploymentResourcePoolPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}' ), - endpointPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/endpoints/{endpoint}' - ), entityTypePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' ), @@ -276,6 +273,16 @@ export class ScheduleServiceClient { pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), + publisherModelPathTemplate: new this._gaxModule.PathTemplate( + 'publishers/{publisher}/models/{model}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -353,6 +360,12 @@ export class ScheduleServiceClient { { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy', }, @@ -362,6 +375,12 @@ export class ScheduleServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, ], }, { @@ -377,6 +396,14 @@ export class ScheduleServiceClient { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy', body: '*', @@ -389,6 +416,14 @@ export class ScheduleServiceClient { post: '/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -402,6 +437,12 @@ export class ScheduleServiceClient { { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions', }, @@ -411,6 +452,12 @@ export class ScheduleServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, ], }, { @@ -865,6 +912,14 @@ export class ScheduleServiceClient { delete: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, ], }, { @@ -1052,6 +1107,12 @@ export class ScheduleServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, ], }, { @@ -1230,6 +1291,12 @@ export class ScheduleServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*}/operations', }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*}/operations', + }, ], }, { @@ -1426,6 +1493,12 @@ export class ScheduleServiceClient { { post: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:wait', }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + }, ], }, ]; @@ -1504,6 +1577,7 @@ export class ScheduleServiceClient { 'listSchedules', 'pauseSchedule', 'resumeSchedule', + 'updateSchedule', ]; for (const methodName of scheduleServiceStubMethods) { const callPromise = this.scheduleServiceStub.then( @@ -1979,6 +2053,109 @@ export class ScheduleServiceClient { this.initialize(); return this.innerApiCalls.resumeSchedule(request, options, callback); } + /** + * Updates an active or paused Schedule. + * + * When the Schedule is updated, new runs will be scheduled starting from the + * updated next execution time after the update time based on the + * time_specification in the updated Schedule. All unstarted runs before the + * update time will be skipped while already created runs will NOT be paused + * or canceled. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.aiplatform.v1beta1.Schedule} request.schedule + * Required. The Schedule which replaces the resource on the server. + * The following restrictions will be applied: + * * The scheduled request type cannot be changed. + * * The output_only fields will be ignored if specified. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The update mask applies to the resource. See + * {@link google.protobuf.FieldMask|google.protobuf.FieldMask}. + * @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 google.cloud.aiplatform.v1beta1.Schedule | Schedule}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/schedule_service.update_schedule.js + * region_tag:aiplatform_v1beta1_generated_ScheduleService_UpdateSchedule_async + */ + updateSchedule( + request?: protos.google.cloud.aiplatform.v1beta1.IUpdateScheduleRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.aiplatform.v1beta1.ISchedule, + protos.google.cloud.aiplatform.v1beta1.IUpdateScheduleRequest | undefined, + {} | undefined + ] + >; + updateSchedule( + request: protos.google.cloud.aiplatform.v1beta1.IUpdateScheduleRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.aiplatform.v1beta1.ISchedule, + | protos.google.cloud.aiplatform.v1beta1.IUpdateScheduleRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateSchedule( + request: protos.google.cloud.aiplatform.v1beta1.IUpdateScheduleRequest, + callback: Callback< + protos.google.cloud.aiplatform.v1beta1.ISchedule, + | protos.google.cloud.aiplatform.v1beta1.IUpdateScheduleRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateSchedule( + request?: protos.google.cloud.aiplatform.v1beta1.IUpdateScheduleRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.aiplatform.v1beta1.ISchedule, + | protos.google.cloud.aiplatform.v1beta1.IUpdateScheduleRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.aiplatform.v1beta1.ISchedule, + | protos.google.cloud.aiplatform.v1beta1.IUpdateScheduleRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.aiplatform.v1beta1.ISchedule, + protos.google.cloud.aiplatform.v1beta1.IUpdateScheduleRequest | 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({ + 'schedule.name': request.schedule!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateSchedule(request, options, callback); + } /** * Deletes a Schedule. @@ -3524,55 +3701,6 @@ export class ScheduleServiceClient { ).deployment_resource_pool; } - /** - * Return a fully-qualified endpoint resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} endpoint - * @returns {string} Resource name string. - */ - endpointPath(project: string, location: string, endpoint: string) { - return this.pathTemplates.endpointPathTemplate.render({ - project: project, - location: location, - endpoint: endpoint, - }); - } - - /** - * Parse the project from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).project; - } - - /** - * Parse the location from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).location; - } - - /** - * Parse the endpoint from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the endpoint. - */ - matchEndpointFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).endpoint; - } - /** * Return a fully-qualified entityType resource name string. * @@ -4637,6 +4765,194 @@ export class ScheduleServiceClient { .pipeline_job; } + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + + /** + * Return a fully-qualified publisherModel resource name string. + * + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + publisherModelPath(publisher: string, model: string) { + return this.pathTemplates.publisherModelPathTemplate.render({ + publisher: publisher, + model: model, + }); + } + + /** + * Parse the publisher from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).publisher; + } + + /** + * Parse the model from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the model. + */ + matchModelFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).model; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_client_config.json b/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_client_config.json index 10258b57ae6..2424ebec7d9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_client_config.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_client_config.json @@ -43,6 +43,10 @@ "ResumeSchedule": { "retry_codes_name": "non_idempotent", "retry_params_name": "default" + }, + "UpdateSchedule": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" } } } diff --git a/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_proto_list.json index 9638e888ca9..403e0932291 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_proto_list.json @@ -53,6 +53,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_deployment_monitoring_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_garden_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_monitoring.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", @@ -62,6 +63,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_client.ts index a86de16c48c..fce96fb397c 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_client.ts @@ -226,9 +226,6 @@ export class SpecialistPoolServiceClient { deploymentResourcePoolPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}' ), - endpointPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/endpoints/{endpoint}' - ), entityTypePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' ), @@ -281,6 +278,16 @@ export class SpecialistPoolServiceClient { pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), + publisherModelPathTemplate: new this._gaxModule.PathTemplate( + 'publishers/{publisher}/models/{model}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -358,6 +365,12 @@ export class SpecialistPoolServiceClient { { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy', }, @@ -367,6 +380,12 @@ export class SpecialistPoolServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, ], }, { @@ -382,6 +401,14 @@ export class SpecialistPoolServiceClient { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy', body: '*', @@ -394,6 +421,14 @@ export class SpecialistPoolServiceClient { post: '/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -407,6 +442,12 @@ export class SpecialistPoolServiceClient { { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions', }, @@ -416,6 +457,12 @@ export class SpecialistPoolServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, ], }, { @@ -870,6 +917,14 @@ export class SpecialistPoolServiceClient { delete: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, ], }, { @@ -1057,6 +1112,12 @@ export class SpecialistPoolServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, ], }, { @@ -1235,6 +1296,12 @@ export class SpecialistPoolServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*}/operations', }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*}/operations', + }, ], }, { @@ -1431,6 +1498,12 @@ export class SpecialistPoolServiceClient { { post: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:wait', }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + }, ], }, ]; @@ -3404,55 +3477,6 @@ export class SpecialistPoolServiceClient { ).deployment_resource_pool; } - /** - * Return a fully-qualified endpoint resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} endpoint - * @returns {string} Resource name string. - */ - endpointPath(project: string, location: string, endpoint: string) { - return this.pathTemplates.endpointPathTemplate.render({ - project: project, - location: location, - endpoint: endpoint, - }); - } - - /** - * Parse the project from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).project; - } - - /** - * Parse the location from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).location; - } - - /** - * Parse the endpoint from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the endpoint. - */ - matchEndpointFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).endpoint; - } - /** * Return a fully-qualified entityType resource name string. * @@ -4517,6 +4541,194 @@ export class SpecialistPoolServiceClient { .pipeline_job; } + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + + /** + * Return a fully-qualified publisherModel resource name string. + * + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + publisherModelPath(publisher: string, model: string) { + return this.pathTemplates.publisherModelPathTemplate.render({ + publisher: publisher, + model: model, + }); + } + + /** + * Parse the publisher from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).publisher; + } + + /** + * Parse the model from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the model. + */ + matchModelFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).model; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_proto_list.json index 9638e888ca9..403e0932291 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_proto_list.json @@ -53,6 +53,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_deployment_monitoring_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_garden_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_monitoring.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", @@ -62,6 +63,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_client.ts index 85179dbb407..9c2c11ed13f 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_client.ts @@ -220,9 +220,6 @@ export class TensorboardServiceClient { deploymentResourcePoolPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}' ), - endpointPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/endpoints/{endpoint}' - ), entityTypePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' ), @@ -278,6 +275,16 @@ export class TensorboardServiceClient { projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), + publisherModelPathTemplate: new this._gaxModule.PathTemplate( + 'publishers/{publisher}/models/{model}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -384,6 +391,12 @@ export class TensorboardServiceClient { { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy', }, @@ -393,6 +406,12 @@ export class TensorboardServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, ], }, { @@ -408,6 +427,14 @@ export class TensorboardServiceClient { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy', body: '*', @@ -420,6 +447,14 @@ export class TensorboardServiceClient { post: '/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -433,6 +468,12 @@ export class TensorboardServiceClient { { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions', }, @@ -442,6 +483,12 @@ export class TensorboardServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, ], }, { @@ -896,6 +943,14 @@ export class TensorboardServiceClient { delete: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, ], }, { @@ -1083,6 +1138,12 @@ export class TensorboardServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, ], }, { @@ -1261,6 +1322,12 @@ export class TensorboardServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*}/operations', }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*}/operations', + }, ], }, { @@ -1457,6 +1524,12 @@ export class TensorboardServiceClient { { post: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:wait', }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + }, ], }, ]; @@ -5421,12 +5494,12 @@ export class TensorboardServiceClient { * Values above 10000 are coerced to 10000. * @param {string} request.pageToken * A page token, received from a previous - * {@link |TensorboardService.ExportTensorboardTimeSeries} call. - * Provide this to retrieve the subsequent page. + * {@link google.cloud.aiplatform.v1beta1.TensorboardService.ExportTensorboardTimeSeriesData|ExportTensorboardTimeSeriesData} + * call. Provide this to retrieve the subsequent page. * * When paginating, all other parameters provided to - * {@link |TensorboardService.ExportTensorboardTimeSeries} must - * match the call that provided the page token. + * {@link google.cloud.aiplatform.v1beta1.TensorboardService.ExportTensorboardTimeSeriesData|ExportTensorboardTimeSeriesData} + * must match the call that provided the page token. * @param {string} request.orderBy * Field to use to sort the TensorboardTimeSeries' data. * By default, TensorboardTimeSeries' data is returned in a pseudo random @@ -5539,12 +5612,12 @@ export class TensorboardServiceClient { * Values above 10000 are coerced to 10000. * @param {string} request.pageToken * A page token, received from a previous - * {@link |TensorboardService.ExportTensorboardTimeSeries} call. - * Provide this to retrieve the subsequent page. + * {@link google.cloud.aiplatform.v1beta1.TensorboardService.ExportTensorboardTimeSeriesData|ExportTensorboardTimeSeriesData} + * call. Provide this to retrieve the subsequent page. * * When paginating, all other parameters provided to - * {@link |TensorboardService.ExportTensorboardTimeSeries} must - * match the call that provided the page token. + * {@link google.cloud.aiplatform.v1beta1.TensorboardService.ExportTensorboardTimeSeriesData|ExportTensorboardTimeSeriesData} + * must match the call that provided the page token. * @param {string} request.orderBy * Field to use to sort the TensorboardTimeSeries' data. * By default, TensorboardTimeSeries' data is returned in a pseudo random @@ -5602,12 +5675,12 @@ export class TensorboardServiceClient { * Values above 10000 are coerced to 10000. * @param {string} request.pageToken * A page token, received from a previous - * {@link |TensorboardService.ExportTensorboardTimeSeries} call. - * Provide this to retrieve the subsequent page. + * {@link google.cloud.aiplatform.v1beta1.TensorboardService.ExportTensorboardTimeSeriesData|ExportTensorboardTimeSeriesData} + * call. Provide this to retrieve the subsequent page. * * When paginating, all other parameters provided to - * {@link |TensorboardService.ExportTensorboardTimeSeries} must - * match the call that provided the page token. + * {@link google.cloud.aiplatform.v1beta1.TensorboardService.ExportTensorboardTimeSeriesData|ExportTensorboardTimeSeriesData} + * must match the call that provided the page token. * @param {string} request.orderBy * Field to use to sort the TensorboardTimeSeries' data. * By default, TensorboardTimeSeries' data is returned in a pseudo random @@ -6697,55 +6770,6 @@ export class TensorboardServiceClient { ).deployment_resource_pool; } - /** - * Return a fully-qualified endpoint resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} endpoint - * @returns {string} Resource name string. - */ - endpointPath(project: string, location: string, endpoint: string) { - return this.pathTemplates.endpointPathTemplate.render({ - project: project, - location: location, - endpoint: endpoint, - }); - } - - /** - * Parse the project from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).project; - } - - /** - * Parse the location from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).location; - } - - /** - * Parse the endpoint from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the endpoint. - */ - matchEndpointFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).endpoint; - } - /** * Return a fully-qualified entityType resource name string. * @@ -7833,6 +7857,194 @@ export class TensorboardServiceClient { return this.pathTemplates.projectPathTemplate.match(projectName).project; } + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + + /** + * Return a fully-qualified publisherModel resource name string. + * + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + publisherModelPath(publisher: string, model: string) { + return this.pathTemplates.publisherModelPathTemplate.render({ + publisher: publisher, + model: model, + }); + } + + /** + * Parse the publisher from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).publisher; + } + + /** + * Parse the model from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the model. + */ + matchModelFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).model; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_proto_list.json index 9638e888ca9..403e0932291 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_proto_list.json @@ -53,6 +53,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_deployment_monitoring_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_garden_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_monitoring.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", @@ -62,6 +63,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_client.ts index d76572ef70a..1b1da09025e 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_client.ts @@ -224,9 +224,6 @@ export class VizierServiceClient { deploymentResourcePoolPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}' ), - endpointPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/endpoints/{endpoint}' - ), entityTypePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' ), @@ -279,6 +276,16 @@ export class VizierServiceClient { pipelineJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), + publisherModelPathTemplate: new this._gaxModule.PathTemplate( + 'publishers/{publisher}/models/{model}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -361,6 +368,12 @@ export class VizierServiceClient { { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy', }, @@ -370,6 +383,12 @@ export class VizierServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, ], }, { @@ -385,6 +404,14 @@ export class VizierServiceClient { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy', body: '*', @@ -397,6 +424,14 @@ export class VizierServiceClient { post: '/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy', body: '*', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -410,6 +445,12 @@ export class VizierServiceClient { { post: '/v1beta1/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, { post: '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions', }, @@ -419,6 +460,12 @@ export class VizierServiceClient { { post: '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions', }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, ], }, { @@ -873,6 +920,14 @@ export class VizierServiceClient { delete: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, ], }, { @@ -1060,6 +1115,12 @@ export class VizierServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, ], }, { @@ -1238,6 +1299,12 @@ export class VizierServiceClient { { get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*}/operations', }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*}/operations', + }, ], }, { @@ -1434,6 +1501,12 @@ export class VizierServiceClient { { post: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:wait', }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + }, ], }, ]; @@ -4419,55 +4492,6 @@ export class VizierServiceClient { ).deployment_resource_pool; } - /** - * Return a fully-qualified endpoint resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} endpoint - * @returns {string} Resource name string. - */ - endpointPath(project: string, location: string, endpoint: string) { - return this.pathTemplates.endpointPathTemplate.render({ - project: project, - location: location, - endpoint: endpoint, - }); - } - - /** - * Parse the project from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).project; - } - - /** - * Parse the location from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).location; - } - - /** - * Parse the endpoint from Endpoint resource. - * - * @param {string} endpointName - * A fully-qualified path representing Endpoint resource. - * @returns {string} A string representing the endpoint. - */ - matchEndpointFromEndpointName(endpointName: string) { - return this.pathTemplates.endpointPathTemplate.match(endpointName).endpoint; - } - /** * Return a fully-qualified entityType resource name string. * @@ -5532,6 +5556,194 @@ export class VizierServiceClient { .pipeline_job; } + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationPublisherModel resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + projectLocationPublisherModelPath( + project: string, + location: string, + publisher: string, + model: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.render({ + project: project, + location: location, + publisher: publisher, + model: model, + }); + } + + /** + * Parse the project from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).project; + } + + /** + * Parse the location from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).location; + } + + /** + * Parse the publisher from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).publisher; + } + + /** + * Parse the model from ProjectLocationPublisherModel resource. + * + * @param {string} projectLocationPublisherModelName + * A fully-qualified path representing project_location_publisher_model resource. + * @returns {string} A string representing the model. + */ + matchModelFromProjectLocationPublisherModelName( + projectLocationPublisherModelName: string + ) { + return this.pathTemplates.projectLocationPublisherModelPathTemplate.match( + projectLocationPublisherModelName + ).model; + } + + /** + * Return a fully-qualified publisherModel resource name string. + * + * @param {string} publisher + * @param {string} model + * @returns {string} Resource name string. + */ + publisherModelPath(publisher: string, model: string) { + return this.pathTemplates.publisherModelPathTemplate.render({ + publisher: publisher, + model: model, + }); + } + + /** + * Parse the publisher from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the publisher. + */ + matchPublisherFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).publisher; + } + + /** + * Parse the model from PublisherModel resource. + * + * @param {string} publisherModelName + * A fully-qualified path representing PublisherModel resource. + * @returns {string} A string representing the model. + */ + matchModelFromPublisherModelName(publisherModelName: string) { + return this.pathTemplates.publisherModelPathTemplate.match( + publisherModelName + ).model; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_proto_list.json index 9638e888ca9..403e0932291 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_proto_list.json @@ -53,6 +53,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/model_deployment_monitoring_job.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_garden_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_monitoring.proto", "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", @@ -62,6 +63,7 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/test/gapic_dataset_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_dataset_service_v1.ts index 2240aceedc3..935abc36ee1 100644 --- a/packages/google-cloud-aiplatform/test/gapic_dataset_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_dataset_service_v1.ts @@ -4497,70 +4497,6 @@ describe('v1.DatasetServiceClient', () => { }); }); - describe('endpoint', () => { - const fakePath = '/rendered/path/endpoint'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - endpoint: 'endpointValue', - }; - const client = new datasetserviceModule.v1.DatasetServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.endpointPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.endpointPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('endpointPath', () => { - const result = client.endpointPath( - 'projectValue', - 'locationValue', - 'endpointValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.endpointPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEndpointName', () => { - const result = client.matchProjectFromEndpointName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEndpointName', () => { - const result = client.matchLocationFromEndpointName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEndpointFromEndpointName', () => { - const result = client.matchEndpointFromEndpointName(fakePath); - assert.strictEqual(result, 'endpointValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('entityType', () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { @@ -5798,6 +5734,178 @@ describe('v1.DatasetServiceClient', () => { }); }); + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = new datasetserviceModule.v1.DatasetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new datasetserviceModule.v1.DatasetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('savedQuery', () => { const fakePath = '/rendered/path/savedQuery'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_dataset_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_dataset_service_v1beta1.ts index 6b2bbe7dbc8..cce0c4ffb5a 100644 --- a/packages/google-cloud-aiplatform/test/gapic_dataset_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_dataset_service_v1beta1.ts @@ -4641,70 +4641,6 @@ describe('v1beta1.DatasetServiceClient', () => { }); }); - describe('endpoint', () => { - const fakePath = '/rendered/path/endpoint'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - endpoint: 'endpointValue', - }; - const client = new datasetserviceModule.v1beta1.DatasetServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.endpointPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.endpointPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('endpointPath', () => { - const result = client.endpointPath( - 'projectValue', - 'locationValue', - 'endpointValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.endpointPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEndpointName', () => { - const result = client.matchProjectFromEndpointName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEndpointName', () => { - const result = client.matchLocationFromEndpointName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEndpointFromEndpointName', () => { - const result = client.matchEndpointFromEndpointName(fakePath); - assert.strictEqual(result, 'endpointValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('entityType', () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { @@ -5942,6 +5878,230 @@ describe('v1beta1.DatasetServiceClient', () => { }); }); + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = new datasetserviceModule.v1beta1.DatasetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new datasetserviceModule.v1beta1.DatasetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new datasetserviceModule.v1beta1.DatasetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.publisherModelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.publisherModelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('publisherModelPath', () => { + const result = client.publisherModelPath( + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.publisherModelPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPublisherFromPublisherModelName', () => { + const result = client.matchPublisherFromPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromPublisherModelName', () => { + const result = client.matchModelFromPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('savedQuery', () => { const fakePath = '/rendered/path/savedQuery'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_deployment_resource_pool_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_deployment_resource_pool_service_v1beta1.ts index 6c982b519f4..4cb4031b302 100644 --- a/packages/google-cloud-aiplatform/test/gapic_deployment_resource_pool_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_deployment_resource_pool_service_v1beta1.ts @@ -3279,73 +3279,6 @@ describe('v1beta1.DeploymentResourcePoolServiceClient', () => { }); }); - describe('endpoint', () => { - const fakePath = '/rendered/path/endpoint'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - endpoint: 'endpointValue', - }; - const client = - new deploymentresourcepoolserviceModule.v1beta1.DeploymentResourcePoolServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - client.pathTemplates.endpointPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.endpointPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('endpointPath', () => { - const result = client.endpointPath( - 'projectValue', - 'locationValue', - 'endpointValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.endpointPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEndpointName', () => { - const result = client.matchProjectFromEndpointName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEndpointName', () => { - const result = client.matchLocationFromEndpointName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEndpointFromEndpointName', () => { - const result = client.matchEndpointFromEndpointName(fakePath); - assert.strictEqual(result, 'endpointValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('entityType', () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { @@ -4675,6 +4608,239 @@ describe('v1beta1.DeploymentResourcePoolServiceClient', () => { }); }); + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = + new deploymentresourcepoolserviceModule.v1beta1.DeploymentResourcePoolServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = + new deploymentresourcepoolserviceModule.v1beta1.DeploymentResourcePoolServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = + new deploymentresourcepoolserviceModule.v1beta1.DeploymentResourcePoolServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.publisherModelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.publisherModelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('publisherModelPath', () => { + const result = client.publisherModelPath( + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.publisherModelPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPublisherFromPublisherModelName', () => { + const result = client.matchPublisherFromPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromPublisherModelName', () => { + const result = client.matchModelFromPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('savedQuery', () => { const fakePath = '/rendered/path/savedQuery'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_endpoint_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_endpoint_service_v1.ts index 48cb5ff11e3..b81e66a21ec 100644 --- a/packages/google-cloud-aiplatform/test/gapic_endpoint_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_endpoint_service_v1.ts @@ -1301,6 +1301,200 @@ describe('v1.EndpointServiceClient', () => { }); }); + describe('mutateDeployedModel', () => { + it('invokes mutateDeployedModel without error', async () => { + const client = new endpointserviceModule.v1.EndpointServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.MutateDeployedModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1.MutateDeployedModelRequest', + ['endpoint'] + ); + request.endpoint = defaultValue1; + const expectedHeaderRequestParams = `endpoint=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.mutateDeployedModel = + stubLongRunningCall(expectedResponse); + const [operation] = await client.mutateDeployedModel(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.mutateDeployedModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.mutateDeployedModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes mutateDeployedModel without error using callback', async () => { + const client = new endpointserviceModule.v1.EndpointServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.MutateDeployedModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1.MutateDeployedModelRequest', + ['endpoint'] + ); + request.endpoint = defaultValue1; + const expectedHeaderRequestParams = `endpoint=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.mutateDeployedModel = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.mutateDeployedModel( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.aiplatform.v1.IMutateDeployedModelResponse, + protos.google.cloud.aiplatform.v1.IMutateDeployedModelOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.aiplatform.v1.IMutateDeployedModelResponse, + protos.google.cloud.aiplatform.v1.IMutateDeployedModelOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.mutateDeployedModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.mutateDeployedModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes mutateDeployedModel with call error', async () => { + const client = new endpointserviceModule.v1.EndpointServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.MutateDeployedModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1.MutateDeployedModelRequest', + ['endpoint'] + ); + request.endpoint = defaultValue1; + const expectedHeaderRequestParams = `endpoint=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.mutateDeployedModel = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.mutateDeployedModel(request), expectedError); + const actualRequest = ( + client.innerApiCalls.mutateDeployedModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.mutateDeployedModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes mutateDeployedModel with LRO error', async () => { + const client = new endpointserviceModule.v1.EndpointServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1.MutateDeployedModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1.MutateDeployedModelRequest', + ['endpoint'] + ); + request.endpoint = defaultValue1; + const expectedHeaderRequestParams = `endpoint=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.mutateDeployedModel = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.mutateDeployedModel(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.mutateDeployedModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.mutateDeployedModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkMutateDeployedModelProgress without error', async () => { + const client = new endpointserviceModule.v1.EndpointServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkMutateDeployedModelProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkMutateDeployedModelProgress with error', async () => { + const client = new endpointserviceModule.v1.EndpointServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkMutateDeployedModelProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + describe('listEndpoints', () => { it('invokes listEndpoints without error', async () => { const client = new endpointserviceModule.v1.EndpointServiceClient({ @@ -3093,70 +3287,6 @@ describe('v1.EndpointServiceClient', () => { }); }); - describe('endpoint', () => { - const fakePath = '/rendered/path/endpoint'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - endpoint: 'endpointValue', - }; - const client = new endpointserviceModule.v1.EndpointServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.endpointPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.endpointPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('endpointPath', () => { - const result = client.endpointPath( - 'projectValue', - 'locationValue', - 'endpointValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.endpointPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEndpointName', () => { - const result = client.matchProjectFromEndpointName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEndpointName', () => { - const result = client.matchLocationFromEndpointName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEndpointFromEndpointName', () => { - const result = client.matchEndpointFromEndpointName(fakePath); - assert.strictEqual(result, 'endpointValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('entityType', () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { @@ -4394,6 +4524,178 @@ describe('v1.EndpointServiceClient', () => { }); }); + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = new endpointserviceModule.v1.EndpointServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new endpointserviceModule.v1.EndpointServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('savedQuery', () => { const fakePath = '/rendered/path/savedQuery'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_endpoint_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_endpoint_service_v1beta1.ts index 169d8055d2b..e856c95d21b 100644 --- a/packages/google-cloud-aiplatform/test/gapic_endpoint_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_endpoint_service_v1beta1.ts @@ -1301,6 +1301,200 @@ describe('v1beta1.EndpointServiceClient', () => { }); }); + describe('mutateDeployedModel', () => { + it('invokes mutateDeployedModel without error', async () => { + const client = new endpointserviceModule.v1beta1.EndpointServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest', + ['endpoint'] + ); + request.endpoint = defaultValue1; + const expectedHeaderRequestParams = `endpoint=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.mutateDeployedModel = + stubLongRunningCall(expectedResponse); + const [operation] = await client.mutateDeployedModel(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.mutateDeployedModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.mutateDeployedModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes mutateDeployedModel without error using callback', async () => { + const client = new endpointserviceModule.v1beta1.EndpointServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest', + ['endpoint'] + ); + request.endpoint = defaultValue1; + const expectedHeaderRequestParams = `endpoint=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.mutateDeployedModel = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.mutateDeployedModel( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.aiplatform.v1beta1.IMutateDeployedModelResponse, + protos.google.cloud.aiplatform.v1beta1.IMutateDeployedModelOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.aiplatform.v1beta1.IMutateDeployedModelResponse, + protos.google.cloud.aiplatform.v1beta1.IMutateDeployedModelOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.mutateDeployedModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.mutateDeployedModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes mutateDeployedModel with call error', async () => { + const client = new endpointserviceModule.v1beta1.EndpointServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest', + ['endpoint'] + ); + request.endpoint = defaultValue1; + const expectedHeaderRequestParams = `endpoint=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.mutateDeployedModel = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.mutateDeployedModel(request), expectedError); + const actualRequest = ( + client.innerApiCalls.mutateDeployedModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.mutateDeployedModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes mutateDeployedModel with LRO error', async () => { + const client = new endpointserviceModule.v1beta1.EndpointServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.MutateDeployedModelRequest', + ['endpoint'] + ); + request.endpoint = defaultValue1; + const expectedHeaderRequestParams = `endpoint=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.mutateDeployedModel = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.mutateDeployedModel(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.mutateDeployedModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.mutateDeployedModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkMutateDeployedModelProgress without error', async () => { + const client = new endpointserviceModule.v1beta1.EndpointServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkMutateDeployedModelProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkMutateDeployedModelProgress with error', async () => { + const client = new endpointserviceModule.v1beta1.EndpointServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkMutateDeployedModelProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + describe('listEndpoints', () => { it('invokes listEndpoints without error', async () => { const client = new endpointserviceModule.v1beta1.EndpointServiceClient({ @@ -3199,70 +3393,6 @@ describe('v1beta1.EndpointServiceClient', () => { }); }); - describe('endpoint', () => { - const fakePath = '/rendered/path/endpoint'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - endpoint: 'endpointValue', - }; - const client = new endpointserviceModule.v1beta1.EndpointServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.endpointPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.endpointPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('endpointPath', () => { - const result = client.endpointPath( - 'projectValue', - 'locationValue', - 'endpointValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.endpointPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEndpointName', () => { - const result = client.matchProjectFromEndpointName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEndpointName', () => { - const result = client.matchLocationFromEndpointName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEndpointFromEndpointName', () => { - const result = client.matchEndpointFromEndpointName(fakePath); - assert.strictEqual(result, 'endpointValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('entityType', () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { @@ -4500,6 +4630,230 @@ describe('v1beta1.EndpointServiceClient', () => { }); }); + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = new endpointserviceModule.v1beta1.EndpointServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new endpointserviceModule.v1beta1.EndpointServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new endpointserviceModule.v1beta1.EndpointServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.publisherModelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.publisherModelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('publisherModelPath', () => { + const result = client.publisherModelPath( + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.publisherModelPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPublisherFromPublisherModelName', () => { + const result = client.matchPublisherFromPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromPublisherModelName', () => { + const result = client.matchModelFromPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('savedQuery', () => { const fakePath = '/rendered/path/savedQuery'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_featurestore_online_serving_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_featurestore_online_serving_service_v1.ts index a36817e1005..053335f5e70 100644 --- a/packages/google-cloud-aiplatform/test/gapic_featurestore_online_serving_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_featurestore_online_serving_service_v1.ts @@ -1914,73 +1914,6 @@ describe('v1.FeaturestoreOnlineServingServiceClient', () => { }); }); - describe('endpoint', () => { - const fakePath = '/rendered/path/endpoint'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - endpoint: 'endpointValue', - }; - const client = - new featurestoreonlineservingserviceModule.v1.FeaturestoreOnlineServingServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - client.pathTemplates.endpointPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.endpointPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('endpointPath', () => { - const result = client.endpointPath( - 'projectValue', - 'locationValue', - 'endpointValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.endpointPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEndpointName', () => { - const result = client.matchProjectFromEndpointName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEndpointName', () => { - const result = client.matchLocationFromEndpointName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEndpointFromEndpointName', () => { - const result = client.matchEndpointFromEndpointName(fakePath); - assert.strictEqual(result, 'endpointValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('entityType', () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { @@ -3217,6 +3150,184 @@ describe('v1.FeaturestoreOnlineServingServiceClient', () => { }); }); + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = + new featurestoreonlineservingserviceModule.v1.FeaturestoreOnlineServingServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = + new featurestoreonlineservingserviceModule.v1.FeaturestoreOnlineServingServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('savedQuery', () => { const fakePath = '/rendered/path/savedQuery'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_featurestore_online_serving_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_featurestore_online_serving_service_v1beta1.ts index 17b15ac38f4..45b3d5d2842 100644 --- a/packages/google-cloud-aiplatform/test/gapic_featurestore_online_serving_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_featurestore_online_serving_service_v1beta1.ts @@ -1998,73 +1998,6 @@ describe('v1beta1.FeaturestoreOnlineServingServiceClient', () => { }); }); - describe('endpoint', () => { - const fakePath = '/rendered/path/endpoint'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - endpoint: 'endpointValue', - }; - const client = - new featurestoreonlineservingserviceModule.v1beta1.FeaturestoreOnlineServingServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - client.pathTemplates.endpointPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.endpointPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('endpointPath', () => { - const result = client.endpointPath( - 'projectValue', - 'locationValue', - 'endpointValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.endpointPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEndpointName', () => { - const result = client.matchProjectFromEndpointName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEndpointName', () => { - const result = client.matchLocationFromEndpointName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEndpointFromEndpointName', () => { - const result = client.matchEndpointFromEndpointName(fakePath); - assert.strictEqual(result, 'endpointValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('entityType', () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { @@ -3301,6 +3234,239 @@ describe('v1beta1.FeaturestoreOnlineServingServiceClient', () => { }); }); + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = + new featurestoreonlineservingserviceModule.v1beta1.FeaturestoreOnlineServingServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = + new featurestoreonlineservingserviceModule.v1beta1.FeaturestoreOnlineServingServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = + new featurestoreonlineservingserviceModule.v1beta1.FeaturestoreOnlineServingServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.publisherModelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.publisherModelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('publisherModelPath', () => { + const result = client.publisherModelPath( + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.publisherModelPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPublisherFromPublisherModelName', () => { + const result = client.matchPublisherFromPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromPublisherModelName', () => { + const result = client.matchModelFromPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('savedQuery', () => { const fakePath = '/rendered/path/savedQuery'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_featurestore_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_featurestore_service_v1.ts index 7be3da17c6e..c6b4b994014 100644 --- a/packages/google-cloud-aiplatform/test/gapic_featurestore_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_featurestore_service_v1.ts @@ -6324,72 +6324,6 @@ describe('v1.FeaturestoreServiceClient', () => { }); }); - describe('endpoint', () => { - const fakePath = '/rendered/path/endpoint'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - endpoint: 'endpointValue', - }; - const client = new featurestoreserviceModule.v1.FeaturestoreServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - client.pathTemplates.endpointPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.endpointPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('endpointPath', () => { - const result = client.endpointPath( - 'projectValue', - 'locationValue', - 'endpointValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.endpointPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEndpointName', () => { - const result = client.matchProjectFromEndpointName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEndpointName', () => { - const result = client.matchLocationFromEndpointName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEndpointFromEndpointName', () => { - const result = client.matchEndpointFromEndpointName(fakePath); - assert.strictEqual(result, 'endpointValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('entityType', () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { @@ -7701,6 +7635,182 @@ describe('v1.FeaturestoreServiceClient', () => { }); }); + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = new featurestoreserviceModule.v1.FeaturestoreServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new featurestoreserviceModule.v1.FeaturestoreServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('savedQuery', () => { const fakePath = '/rendered/path/savedQuery'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_featurestore_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_featurestore_service_v1beta1.ts index 23a5823b6c0..28e1b97b491 100644 --- a/packages/google-cloud-aiplatform/test/gapic_featurestore_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_featurestore_service_v1beta1.ts @@ -6305,71 +6305,6 @@ describe('v1beta1.FeaturestoreServiceClient', () => { }); }); - describe('endpoint', () => { - const fakePath = '/rendered/path/endpoint'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - endpoint: 'endpointValue', - }; - const client = - new featurestoreserviceModule.v1beta1.FeaturestoreServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.endpointPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.endpointPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('endpointPath', () => { - const result = client.endpointPath( - 'projectValue', - 'locationValue', - 'endpointValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.endpointPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEndpointName', () => { - const result = client.matchProjectFromEndpointName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEndpointName', () => { - const result = client.matchLocationFromEndpointName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEndpointFromEndpointName', () => { - const result = client.matchEndpointFromEndpointName(fakePath); - assert.strictEqual(result, 'endpointValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('entityType', () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { @@ -7663,6 +7598,233 @@ describe('v1beta1.FeaturestoreServiceClient', () => { }); }); + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = + new featurestoreserviceModule.v1beta1.FeaturestoreServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = + new featurestoreserviceModule.v1beta1.FeaturestoreServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = + new featurestoreserviceModule.v1beta1.FeaturestoreServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.publisherModelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.publisherModelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('publisherModelPath', () => { + const result = client.publisherModelPath( + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.publisherModelPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPublisherFromPublisherModelName', () => { + const result = client.matchPublisherFromPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromPublisherModelName', () => { + const result = client.matchModelFromPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('savedQuery', () => { const fakePath = '/rendered/path/savedQuery'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_index_endpoint_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_index_endpoint_service_v1.ts index dda6d47bd05..20f777b1f5f 100644 --- a/packages/google-cloud-aiplatform/test/gapic_index_endpoint_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_index_endpoint_service_v1.ts @@ -3401,71 +3401,6 @@ describe('v1.IndexEndpointServiceClient', () => { }); }); - describe('endpoint', () => { - const fakePath = '/rendered/path/endpoint'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - endpoint: 'endpointValue', - }; - const client = - new indexendpointserviceModule.v1.IndexEndpointServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.endpointPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.endpointPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('endpointPath', () => { - const result = client.endpointPath( - 'projectValue', - 'locationValue', - 'endpointValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.endpointPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEndpointName', () => { - const result = client.matchProjectFromEndpointName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEndpointName', () => { - const result = client.matchLocationFromEndpointName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEndpointFromEndpointName', () => { - const result = client.matchEndpointFromEndpointName(fakePath); - assert.strictEqual(result, 'endpointValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('entityType', () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { @@ -4720,6 +4655,180 @@ describe('v1.IndexEndpointServiceClient', () => { }); }); + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = + new indexendpointserviceModule.v1.IndexEndpointServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = + new indexendpointserviceModule.v1.IndexEndpointServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('savedQuery', () => { const fakePath = '/rendered/path/savedQuery'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_index_endpoint_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_index_endpoint_service_v1beta1.ts index 404fb400cfe..b2909586cce 100644 --- a/packages/google-cloud-aiplatform/test/gapic_index_endpoint_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_index_endpoint_service_v1beta1.ts @@ -3490,71 +3490,6 @@ describe('v1beta1.IndexEndpointServiceClient', () => { }); }); - describe('endpoint', () => { - const fakePath = '/rendered/path/endpoint'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - endpoint: 'endpointValue', - }; - const client = - new indexendpointserviceModule.v1beta1.IndexEndpointServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.endpointPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.endpointPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('endpointPath', () => { - const result = client.endpointPath( - 'projectValue', - 'locationValue', - 'endpointValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.endpointPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEndpointName', () => { - const result = client.matchProjectFromEndpointName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEndpointName', () => { - const result = client.matchLocationFromEndpointName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEndpointFromEndpointName', () => { - const result = client.matchEndpointFromEndpointName(fakePath); - assert.strictEqual(result, 'endpointValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('entityType', () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { @@ -4809,6 +4744,233 @@ describe('v1beta1.IndexEndpointServiceClient', () => { }); }); + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = + new indexendpointserviceModule.v1beta1.IndexEndpointServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = + new indexendpointserviceModule.v1beta1.IndexEndpointServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = + new indexendpointserviceModule.v1beta1.IndexEndpointServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.publisherModelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.publisherModelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('publisherModelPath', () => { + const result = client.publisherModelPath( + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.publisherModelPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPublisherFromPublisherModelName', () => { + const result = client.matchPublisherFromPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromPublisherModelName', () => { + const result = client.matchModelFromPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('savedQuery', () => { const fakePath = '/rendered/path/savedQuery'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_index_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_index_service_v1.ts index 4a8b430c650..85cb1ccb91f 100644 --- a/packages/google-cloud-aiplatform/test/gapic_index_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_index_service_v1.ts @@ -3020,70 +3020,6 @@ describe('v1.IndexServiceClient', () => { }); }); - describe('endpoint', () => { - const fakePath = '/rendered/path/endpoint'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - endpoint: 'endpointValue', - }; - const client = new indexserviceModule.v1.IndexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.endpointPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.endpointPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('endpointPath', () => { - const result = client.endpointPath( - 'projectValue', - 'locationValue', - 'endpointValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.endpointPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEndpointName', () => { - const result = client.matchProjectFromEndpointName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEndpointName', () => { - const result = client.matchLocationFromEndpointName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEndpointFromEndpointName', () => { - const result = client.matchEndpointFromEndpointName(fakePath); - assert.strictEqual(result, 'endpointValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('entityType', () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { @@ -4321,6 +4257,178 @@ describe('v1.IndexServiceClient', () => { }); }); + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = new indexserviceModule.v1.IndexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new indexserviceModule.v1.IndexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('savedQuery', () => { const fakePath = '/rendered/path/savedQuery'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_index_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_index_service_v1beta1.ts index 209072e6213..54fd6ec9e72 100644 --- a/packages/google-cloud-aiplatform/test/gapic_index_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_index_service_v1beta1.ts @@ -3127,70 +3127,6 @@ describe('v1beta1.IndexServiceClient', () => { }); }); - describe('endpoint', () => { - const fakePath = '/rendered/path/endpoint'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - endpoint: 'endpointValue', - }; - const client = new indexserviceModule.v1beta1.IndexServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.endpointPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.endpointPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('endpointPath', () => { - const result = client.endpointPath( - 'projectValue', - 'locationValue', - 'endpointValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.endpointPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEndpointName', () => { - const result = client.matchProjectFromEndpointName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEndpointName', () => { - const result = client.matchLocationFromEndpointName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEndpointFromEndpointName', () => { - const result = client.matchEndpointFromEndpointName(fakePath); - assert.strictEqual(result, 'endpointValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('entityType', () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { @@ -4428,6 +4364,230 @@ describe('v1beta1.IndexServiceClient', () => { }); }); + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = new indexserviceModule.v1beta1.IndexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new indexserviceModule.v1beta1.IndexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new indexserviceModule.v1beta1.IndexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.publisherModelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.publisherModelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('publisherModelPath', () => { + const result = client.publisherModelPath( + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.publisherModelPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPublisherFromPublisherModelName', () => { + const result = client.matchPublisherFromPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromPublisherModelName', () => { + const result = client.matchModelFromPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('savedQuery', () => { const fakePath = '/rendered/path/savedQuery'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_job_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_job_service_v1.ts index 79e1d5d14b5..973c1aaea86 100644 --- a/packages/google-cloud-aiplatform/test/gapic_job_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_job_service_v1.ts @@ -8567,70 +8567,6 @@ describe('v1.JobServiceClient', () => { }); }); - describe('endpoint', () => { - const fakePath = '/rendered/path/endpoint'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - endpoint: 'endpointValue', - }; - const client = new jobserviceModule.v1.JobServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.endpointPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.endpointPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('endpointPath', () => { - const result = client.endpointPath( - 'projectValue', - 'locationValue', - 'endpointValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.endpointPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEndpointName', () => { - const result = client.matchProjectFromEndpointName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEndpointName', () => { - const result = client.matchLocationFromEndpointName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEndpointFromEndpointName', () => { - const result = client.matchEndpointFromEndpointName(fakePath); - assert.strictEqual(result, 'endpointValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('entityType', () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { @@ -9868,6 +9804,178 @@ describe('v1.JobServiceClient', () => { }); }); + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = new jobserviceModule.v1.JobServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new jobserviceModule.v1.JobServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('savedQuery', () => { const fakePath = '/rendered/path/savedQuery'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_job_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_job_service_v1beta1.ts index 9712b5c66e6..8d1fe37ada8 100644 --- a/packages/google-cloud-aiplatform/test/gapic_job_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_job_service_v1beta1.ts @@ -8688,70 +8688,6 @@ describe('v1beta1.JobServiceClient', () => { }); }); - describe('endpoint', () => { - const fakePath = '/rendered/path/endpoint'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - endpoint: 'endpointValue', - }; - const client = new jobserviceModule.v1beta1.JobServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.endpointPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.endpointPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('endpointPath', () => { - const result = client.endpointPath( - 'projectValue', - 'locationValue', - 'endpointValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.endpointPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEndpointName', () => { - const result = client.matchProjectFromEndpointName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEndpointName', () => { - const result = client.matchLocationFromEndpointName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEndpointFromEndpointName', () => { - const result = client.matchEndpointFromEndpointName(fakePath); - assert.strictEqual(result, 'endpointValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('entityType', () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { @@ -9989,6 +9925,230 @@ describe('v1beta1.JobServiceClient', () => { }); }); + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = new jobserviceModule.v1beta1.JobServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new jobserviceModule.v1beta1.JobServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new jobserviceModule.v1beta1.JobServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.publisherModelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.publisherModelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('publisherModelPath', () => { + const result = client.publisherModelPath( + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.publisherModelPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPublisherFromPublisherModelName', () => { + const result = client.matchPublisherFromPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromPublisherModelName', () => { + const result = client.matchModelFromPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('savedQuery', () => { const fakePath = '/rendered/path/savedQuery'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_match_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_match_service_v1beta1.ts index 23ff63fd3de..3bdce74e802 100644 --- a/packages/google-cloud-aiplatform/test/gapic_match_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_match_service_v1beta1.ts @@ -1715,70 +1715,6 @@ describe('v1beta1.MatchServiceClient', () => { }); }); - describe('endpoint', () => { - const fakePath = '/rendered/path/endpoint'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - endpoint: 'endpointValue', - }; - const client = new matchserviceModule.v1beta1.MatchServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.endpointPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.endpointPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('endpointPath', () => { - const result = client.endpointPath( - 'projectValue', - 'locationValue', - 'endpointValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.endpointPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEndpointName', () => { - const result = client.matchProjectFromEndpointName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEndpointName', () => { - const result = client.matchLocationFromEndpointName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEndpointFromEndpointName', () => { - const result = client.matchEndpointFromEndpointName(fakePath); - assert.strictEqual(result, 'endpointValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('entityType', () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { @@ -2967,6 +2903,230 @@ describe('v1beta1.MatchServiceClient', () => { }); }); + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.publisherModelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.publisherModelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('publisherModelPath', () => { + const result = client.publisherModelPath( + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.publisherModelPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPublisherFromPublisherModelName', () => { + const result = client.matchPublisherFromPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromPublisherModelName', () => { + const result = client.matchModelFromPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('savedQuery', () => { const fakePath = '/rendered/path/savedQuery'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_metadata_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_metadata_service_v1.ts index 9a3c5d32f9f..44c43d7fa63 100644 --- a/packages/google-cloud-aiplatform/test/gapic_metadata_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_metadata_service_v1.ts @@ -7413,70 +7413,6 @@ describe('v1.MetadataServiceClient', () => { }); }); - describe('endpoint', () => { - const fakePath = '/rendered/path/endpoint'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - endpoint: 'endpointValue', - }; - const client = new metadataserviceModule.v1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.endpointPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.endpointPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('endpointPath', () => { - const result = client.endpointPath( - 'projectValue', - 'locationValue', - 'endpointValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.endpointPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEndpointName', () => { - const result = client.matchProjectFromEndpointName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEndpointName', () => { - const result = client.matchLocationFromEndpointName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEndpointFromEndpointName', () => { - const result = client.matchEndpointFromEndpointName(fakePath); - assert.strictEqual(result, 'endpointValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('entityType', () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { @@ -8752,6 +8688,178 @@ describe('v1.MetadataServiceClient', () => { }); }); + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new metadataserviceModule.v1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('savedQuery', () => { const fakePath = '/rendered/path/savedQuery'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_metadata_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_metadata_service_v1beta1.ts index 97d2d25518a..91638c5de25 100644 --- a/packages/google-cloud-aiplatform/test/gapic_metadata_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_metadata_service_v1beta1.ts @@ -7554,70 +7554,6 @@ describe('v1beta1.MetadataServiceClient', () => { }); }); - describe('endpoint', () => { - const fakePath = '/rendered/path/endpoint'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - endpoint: 'endpointValue', - }; - const client = new metadataserviceModule.v1beta1.MetadataServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.endpointPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.endpointPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('endpointPath', () => { - const result = client.endpointPath( - 'projectValue', - 'locationValue', - 'endpointValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.endpointPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEndpointName', () => { - const result = client.matchProjectFromEndpointName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEndpointName', () => { - const result = client.matchLocationFromEndpointName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEndpointFromEndpointName', () => { - const result = client.matchEndpointFromEndpointName(fakePath); - assert.strictEqual(result, 'endpointValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('entityType', () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { @@ -8893,6 +8829,230 @@ describe('v1beta1.MetadataServiceClient', () => { }); }); + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = new metadataserviceModule.v1beta1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new metadataserviceModule.v1beta1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new metadataserviceModule.v1beta1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.publisherModelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.publisherModelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('publisherModelPath', () => { + const result = client.publisherModelPath( + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.publisherModelPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPublisherFromPublisherModelName', () => { + const result = client.matchPublisherFromPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromPublisherModelName', () => { + const result = client.matchModelFromPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('savedQuery', () => { const fakePath = '/rendered/path/savedQuery'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_migration_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_migration_service_v1.ts index 0a903f9889a..78484292155 100644 --- a/packages/google-cloud-aiplatform/test/gapic_migration_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_migration_service_v1.ts @@ -2308,70 +2308,6 @@ describe('v1.MigrationServiceClient', () => { }); }); - describe('endpoint', () => { - const fakePath = '/rendered/path/endpoint'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - endpoint: 'endpointValue', - }; - const client = new migrationserviceModule.v1.MigrationServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.endpointPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.endpointPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('endpointPath', () => { - const result = client.endpointPath( - 'projectValue', - 'locationValue', - 'endpointValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.endpointPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEndpointName', () => { - const result = client.matchProjectFromEndpointName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEndpointName', () => { - const result = client.matchLocationFromEndpointName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEndpointFromEndpointName', () => { - const result = client.matchEndpointFromEndpointName(fakePath); - assert.strictEqual(result, 'endpointValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('entityType', () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { @@ -3609,6 +3545,178 @@ describe('v1.MigrationServiceClient', () => { }); }); + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = new migrationserviceModule.v1.MigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new migrationserviceModule.v1.MigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('savedQuery', () => { const fakePath = '/rendered/path/savedQuery'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_migration_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_migration_service_v1beta1.ts index 41a37a049c8..de1598e16f9 100644 --- a/packages/google-cloud-aiplatform/test/gapic_migration_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_migration_service_v1beta1.ts @@ -2394,70 +2394,6 @@ describe('v1beta1.MigrationServiceClient', () => { }); }); - describe('endpoint', () => { - const fakePath = '/rendered/path/endpoint'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - endpoint: 'endpointValue', - }; - const client = new migrationserviceModule.v1beta1.MigrationServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.endpointPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.endpointPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('endpointPath', () => { - const result = client.endpointPath( - 'projectValue', - 'locationValue', - 'endpointValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.endpointPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEndpointName', () => { - const result = client.matchProjectFromEndpointName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEndpointName', () => { - const result = client.matchLocationFromEndpointName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEndpointFromEndpointName', () => { - const result = client.matchEndpointFromEndpointName(fakePath); - assert.strictEqual(result, 'endpointValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('entityType', () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { @@ -3695,6 +3631,230 @@ describe('v1beta1.MigrationServiceClient', () => { }); }); + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = new migrationserviceModule.v1beta1.MigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new migrationserviceModule.v1beta1.MigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new migrationserviceModule.v1beta1.MigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.publisherModelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.publisherModelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('publisherModelPath', () => { + const result = client.publisherModelPath( + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.publisherModelPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPublisherFromPublisherModelName', () => { + const result = client.matchPublisherFromPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromPublisherModelName', () => { + const result = client.matchModelFromPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('savedQuery', () => { const fakePath = '/rendered/path/savedQuery'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_model_garden_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_model_garden_service_v1beta1.ts new file mode 100644 index 00000000000..c18ae0c08b3 --- /dev/null +++ b/packages/google-cloud-aiplatform/test/gapic_model_garden_service_v1beta1.ts @@ -0,0 +1,3850 @@ +// Copyright 2023 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 modelgardenserviceModule from '../src'; + +import {protobuf, IamProtos, LocationProtos} 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 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('v1beta1.ModelGardenServiceClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + modelgardenserviceModule.v1beta1.ModelGardenServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + modelgardenserviceModule.v1beta1.ModelGardenServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = + modelgardenserviceModule.v1beta1.ModelGardenServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.modelGardenServiceStub, undefined); + await client.initialize(); + assert(client.modelGardenServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.modelGardenServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.modelGardenServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + 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 modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + 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('getPublisherModel', () => { + it('invokes getPublisherModel without error', async () => { + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.GetPublisherModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.GetPublisherModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.PublisherModel() + ); + client.innerApiCalls.getPublisherModel = stubSimpleCall(expectedResponse); + const [response] = await client.getPublisherModel(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getPublisherModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getPublisherModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPublisherModel without error using callback', async () => { + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.GetPublisherModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.GetPublisherModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.PublisherModel() + ); + client.innerApiCalls.getPublisherModel = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getPublisherModel( + request, + ( + err?: Error | null, + result?: protos.google.cloud.aiplatform.v1beta1.IPublisherModel | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getPublisherModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getPublisherModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPublisherModel with error', async () => { + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.GetPublisherModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.GetPublisherModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getPublisherModel = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getPublisherModel(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getPublisherModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getPublisherModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getPublisherModel with closed client', async () => { + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.GetPublisherModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.GetPublisherModelRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getPublisherModel(request), expectedError); + }); + }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.getIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getIamPolicy without error using callback', async () => { + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.getIamPolicy as SinonStub).getCall(0)); + }); + it('invokes getIamPolicy with error', async () => { + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.getIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.setIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes setIamPolicy without error using callback', async () => { + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.setIamPolicy as SinonStub).getCall(0)); + }); + it('invokes setIamPolicy with error', async () => { + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.setIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); + const response = await client.testIamPermissions( + request, + expectedOptions + ); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes testIamPermissions without error using callback', async () => { + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.TestIamPermissionsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.testIamPermissions as SinonStub).getCall(0)); + }); + it('invokes testIamPermissions with error', async () => { + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.testIamPermissions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.testIamPermissions(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getLocation without error using callback', async () => { + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub).getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getLocation(request, expectedOptions), + expectedError + ); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + describe('annotation', () => { + const fakePath = '/rendered/path/annotation'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + dataset: 'datasetValue', + data_item: 'dataItemValue', + annotation: 'annotationValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.annotationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.annotationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('annotationPath', () => { + const result = client.annotationPath( + 'projectValue', + 'locationValue', + 'datasetValue', + 'dataItemValue', + 'annotationValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.annotationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAnnotationName', () => { + const result = client.matchProjectFromAnnotationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.annotationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromAnnotationName', () => { + const result = client.matchLocationFromAnnotationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.annotationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDatasetFromAnnotationName', () => { + const result = client.matchDatasetFromAnnotationName(fakePath); + assert.strictEqual(result, 'datasetValue'); + assert( + (client.pathTemplates.annotationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataItemFromAnnotationName', () => { + const result = client.matchDataItemFromAnnotationName(fakePath); + assert.strictEqual(result, 'dataItemValue'); + assert( + (client.pathTemplates.annotationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAnnotationFromAnnotationName', () => { + const result = client.matchAnnotationFromAnnotationName(fakePath); + assert.strictEqual(result, 'annotationValue'); + assert( + (client.pathTemplates.annotationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('annotationSpec', () => { + const fakePath = '/rendered/path/annotationSpec'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + dataset: 'datasetValue', + annotation_spec: 'annotationSpecValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.annotationSpecPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.annotationSpecPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('annotationSpecPath', () => { + const result = client.annotationSpecPath( + 'projectValue', + 'locationValue', + 'datasetValue', + 'annotationSpecValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.annotationSpecPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromAnnotationSpecName', () => { + const result = client.matchProjectFromAnnotationSpecName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.annotationSpecPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromAnnotationSpecName', () => { + const result = client.matchLocationFromAnnotationSpecName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.annotationSpecPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDatasetFromAnnotationSpecName', () => { + const result = client.matchDatasetFromAnnotationSpecName(fakePath); + assert.strictEqual(result, 'datasetValue'); + assert( + (client.pathTemplates.annotationSpecPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAnnotationSpecFromAnnotationSpecName', () => { + const result = + client.matchAnnotationSpecFromAnnotationSpecName(fakePath); + assert.strictEqual(result, 'annotationSpecValue'); + assert( + (client.pathTemplates.annotationSpecPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('artifact', () => { + const fakePath = '/rendered/path/artifact'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + metadata_store: 'metadataStoreValue', + artifact: 'artifactValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.artifactPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.artifactPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('artifactPath', () => { + const result = client.artifactPath( + 'projectValue', + 'locationValue', + 'metadataStoreValue', + 'artifactValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.artifactPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromArtifactName', () => { + const result = client.matchProjectFromArtifactName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.artifactPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromArtifactName', () => { + const result = client.matchLocationFromArtifactName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.artifactPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMetadataStoreFromArtifactName', () => { + const result = client.matchMetadataStoreFromArtifactName(fakePath); + assert.strictEqual(result, 'metadataStoreValue'); + assert( + (client.pathTemplates.artifactPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchArtifactFromArtifactName', () => { + const result = client.matchArtifactFromArtifactName(fakePath); + assert.strictEqual(result, 'artifactValue'); + assert( + (client.pathTemplates.artifactPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('batchPredictionJob', () => { + const fakePath = '/rendered/path/batchPredictionJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + batch_prediction_job: 'batchPredictionJobValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.batchPredictionJobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.batchPredictionJobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('batchPredictionJobPath', () => { + const result = client.batchPredictionJobPath( + 'projectValue', + 'locationValue', + 'batchPredictionJobValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.batchPredictionJobPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromBatchPredictionJobName', () => { + const result = client.matchProjectFromBatchPredictionJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.batchPredictionJobPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromBatchPredictionJobName', () => { + const result = client.matchLocationFromBatchPredictionJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.batchPredictionJobPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBatchPredictionJobFromBatchPredictionJobName', () => { + const result = + client.matchBatchPredictionJobFromBatchPredictionJobName(fakePath); + assert.strictEqual(result, 'batchPredictionJobValue'); + assert( + ( + client.pathTemplates.batchPredictionJobPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('context', () => { + const fakePath = '/rendered/path/context'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + metadata_store: 'metadataStoreValue', + context: 'contextValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.contextPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.contextPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('contextPath', () => { + const result = client.contextPath( + 'projectValue', + 'locationValue', + 'metadataStoreValue', + 'contextValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.contextPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromContextName', () => { + const result = client.matchProjectFromContextName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.contextPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromContextName', () => { + const result = client.matchLocationFromContextName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.contextPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMetadataStoreFromContextName', () => { + const result = client.matchMetadataStoreFromContextName(fakePath); + assert.strictEqual(result, 'metadataStoreValue'); + assert( + (client.pathTemplates.contextPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchContextFromContextName', () => { + const result = client.matchContextFromContextName(fakePath); + assert.strictEqual(result, 'contextValue'); + assert( + (client.pathTemplates.contextPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('customJob', () => { + const fakePath = '/rendered/path/customJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + custom_job: 'customJobValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.customJobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.customJobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('customJobPath', () => { + const result = client.customJobPath( + 'projectValue', + 'locationValue', + 'customJobValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.customJobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromCustomJobName', () => { + const result = client.matchProjectFromCustomJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.customJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromCustomJobName', () => { + const result = client.matchLocationFromCustomJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.customJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCustomJobFromCustomJobName', () => { + const result = client.matchCustomJobFromCustomJobName(fakePath); + assert.strictEqual(result, 'customJobValue'); + assert( + (client.pathTemplates.customJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('dataItem', () => { + const fakePath = '/rendered/path/dataItem'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + dataset: 'datasetValue', + data_item: 'dataItemValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataItemPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.dataItemPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('dataItemPath', () => { + const result = client.dataItemPath( + 'projectValue', + 'locationValue', + 'datasetValue', + 'dataItemValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.dataItemPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromDataItemName', () => { + const result = client.matchProjectFromDataItemName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.dataItemPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromDataItemName', () => { + const result = client.matchLocationFromDataItemName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.dataItemPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDatasetFromDataItemName', () => { + const result = client.matchDatasetFromDataItemName(fakePath); + assert.strictEqual(result, 'datasetValue'); + assert( + (client.pathTemplates.dataItemPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataItemFromDataItemName', () => { + const result = client.matchDataItemFromDataItemName(fakePath); + assert.strictEqual(result, 'dataItemValue'); + assert( + (client.pathTemplates.dataItemPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('dataLabelingJob', () => { + const fakePath = '/rendered/path/dataLabelingJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_labeling_job: 'dataLabelingJobValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataLabelingJobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.dataLabelingJobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('dataLabelingJobPath', () => { + const result = client.dataLabelingJobPath( + 'projectValue', + 'locationValue', + 'dataLabelingJobValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.dataLabelingJobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromDataLabelingJobName', () => { + const result = client.matchProjectFromDataLabelingJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.dataLabelingJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromDataLabelingJobName', () => { + const result = client.matchLocationFromDataLabelingJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.dataLabelingJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataLabelingJobFromDataLabelingJobName', () => { + const result = + client.matchDataLabelingJobFromDataLabelingJobName(fakePath); + assert.strictEqual(result, 'dataLabelingJobValue'); + assert( + (client.pathTemplates.dataLabelingJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('dataset', () => { + const fakePath = '/rendered/path/dataset'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + dataset: 'datasetValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.datasetPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.datasetPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('datasetPath', () => { + const result = client.datasetPath( + 'projectValue', + 'locationValue', + 'datasetValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.datasetPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromDatasetName', () => { + const result = client.matchProjectFromDatasetName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.datasetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromDatasetName', () => { + const result = client.matchLocationFromDatasetName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.datasetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDatasetFromDatasetName', () => { + const result = client.matchDatasetFromDatasetName(fakePath); + assert.strictEqual(result, 'datasetValue'); + assert( + (client.pathTemplates.datasetPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('deploymentResourcePool', () => { + const fakePath = '/rendered/path/deploymentResourcePool'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + deployment_resource_pool: 'deploymentResourcePoolValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.deploymentResourcePoolPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.deploymentResourcePoolPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('deploymentResourcePoolPath', () => { + const result = client.deploymentResourcePoolPath( + 'projectValue', + 'locationValue', + 'deploymentResourcePoolValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.deploymentResourcePoolPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromDeploymentResourcePoolName', () => { + const result = + client.matchProjectFromDeploymentResourcePoolName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.deploymentResourcePoolPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromDeploymentResourcePoolName', () => { + const result = + client.matchLocationFromDeploymentResourcePoolName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.deploymentResourcePoolPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDeploymentResourcePoolFromDeploymentResourcePoolName', () => { + const result = + client.matchDeploymentResourcePoolFromDeploymentResourcePoolName( + fakePath + ); + assert.strictEqual(result, 'deploymentResourcePoolValue'); + assert( + ( + client.pathTemplates.deploymentResourcePoolPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('entityType', () => { + const fakePath = '/rendered/path/entityType'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + featurestore: 'featurestoreValue', + entity_type: 'entityTypeValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.entityTypePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.entityTypePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('entityTypePath', () => { + const result = client.entityTypePath( + 'projectValue', + 'locationValue', + 'featurestoreValue', + 'entityTypeValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.entityTypePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromEntityTypeName', () => { + const result = client.matchProjectFromEntityTypeName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.entityTypePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromEntityTypeName', () => { + const result = client.matchLocationFromEntityTypeName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.entityTypePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFeaturestoreFromEntityTypeName', () => { + const result = client.matchFeaturestoreFromEntityTypeName(fakePath); + assert.strictEqual(result, 'featurestoreValue'); + assert( + (client.pathTemplates.entityTypePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEntityTypeFromEntityTypeName', () => { + const result = client.matchEntityTypeFromEntityTypeName(fakePath); + assert.strictEqual(result, 'entityTypeValue'); + assert( + (client.pathTemplates.entityTypePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('execution', () => { + const fakePath = '/rendered/path/execution'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + metadata_store: 'metadataStoreValue', + execution: 'executionValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.executionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.executionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('executionPath', () => { + const result = client.executionPath( + 'projectValue', + 'locationValue', + 'metadataStoreValue', + 'executionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.executionPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromExecutionName', () => { + const result = client.matchProjectFromExecutionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.executionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromExecutionName', () => { + const result = client.matchLocationFromExecutionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.executionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMetadataStoreFromExecutionName', () => { + const result = client.matchMetadataStoreFromExecutionName(fakePath); + assert.strictEqual(result, 'metadataStoreValue'); + assert( + (client.pathTemplates.executionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExecutionFromExecutionName', () => { + const result = client.matchExecutionFromExecutionName(fakePath); + assert.strictEqual(result, 'executionValue'); + assert( + (client.pathTemplates.executionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('feature', () => { + const fakePath = '/rendered/path/feature'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + featurestore: 'featurestoreValue', + entity_type: 'entityTypeValue', + feature: 'featureValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.featurePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.featurePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('featurePath', () => { + const result = client.featurePath( + 'projectValue', + 'locationValue', + 'featurestoreValue', + 'entityTypeValue', + 'featureValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.featurePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromFeatureName', () => { + const result = client.matchProjectFromFeatureName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.featurePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromFeatureName', () => { + const result = client.matchLocationFromFeatureName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.featurePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFeaturestoreFromFeatureName', () => { + const result = client.matchFeaturestoreFromFeatureName(fakePath); + assert.strictEqual(result, 'featurestoreValue'); + assert( + (client.pathTemplates.featurePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEntityTypeFromFeatureName', () => { + const result = client.matchEntityTypeFromFeatureName(fakePath); + assert.strictEqual(result, 'entityTypeValue'); + assert( + (client.pathTemplates.featurePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFeatureFromFeatureName', () => { + const result = client.matchFeatureFromFeatureName(fakePath); + assert.strictEqual(result, 'featureValue'); + assert( + (client.pathTemplates.featurePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('featurestore', () => { + const fakePath = '/rendered/path/featurestore'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + featurestore: 'featurestoreValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.featurestorePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.featurestorePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('featurestorePath', () => { + const result = client.featurestorePath( + 'projectValue', + 'locationValue', + 'featurestoreValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.featurestorePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromFeaturestoreName', () => { + const result = client.matchProjectFromFeaturestoreName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.featurestorePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromFeaturestoreName', () => { + const result = client.matchLocationFromFeaturestoreName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.featurestorePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFeaturestoreFromFeaturestoreName', () => { + const result = client.matchFeaturestoreFromFeaturestoreName(fakePath); + assert.strictEqual(result, 'featurestoreValue'); + assert( + (client.pathTemplates.featurestorePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('hyperparameterTuningJob', () => { + const fakePath = '/rendered/path/hyperparameterTuningJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + hyperparameter_tuning_job: 'hyperparameterTuningJobValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.hyperparameterTuningJobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.hyperparameterTuningJobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('hyperparameterTuningJobPath', () => { + const result = client.hyperparameterTuningJobPath( + 'projectValue', + 'locationValue', + 'hyperparameterTuningJobValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.hyperparameterTuningJobPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromHyperparameterTuningJobName', () => { + const result = + client.matchProjectFromHyperparameterTuningJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.hyperparameterTuningJobPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromHyperparameterTuningJobName', () => { + const result = + client.matchLocationFromHyperparameterTuningJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.hyperparameterTuningJobPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchHyperparameterTuningJobFromHyperparameterTuningJobName', () => { + const result = + client.matchHyperparameterTuningJobFromHyperparameterTuningJobName( + fakePath + ); + assert.strictEqual(result, 'hyperparameterTuningJobValue'); + assert( + ( + client.pathTemplates.hyperparameterTuningJobPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('index', () => { + const fakePath = '/rendered/path/index'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + index: 'indexValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.indexPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.indexPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('indexPath', () => { + const result = client.indexPath( + 'projectValue', + 'locationValue', + 'indexValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.indexPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromIndexName', () => { + const result = client.matchProjectFromIndexName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.indexPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromIndexName', () => { + const result = client.matchLocationFromIndexName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.indexPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchIndexFromIndexName', () => { + const result = client.matchIndexFromIndexName(fakePath); + assert.strictEqual(result, 'indexValue'); + assert( + (client.pathTemplates.indexPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('indexEndpoint', () => { + const fakePath = '/rendered/path/indexEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + index_endpoint: 'indexEndpointValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.indexEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.indexEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('indexEndpointPath', () => { + const result = client.indexEndpointPath( + 'projectValue', + 'locationValue', + 'indexEndpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.indexEndpointPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromIndexEndpointName', () => { + const result = client.matchProjectFromIndexEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.indexEndpointPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromIndexEndpointName', () => { + const result = client.matchLocationFromIndexEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.indexEndpointPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchIndexEndpointFromIndexEndpointName', () => { + const result = client.matchIndexEndpointFromIndexEndpointName(fakePath); + assert.strictEqual(result, 'indexEndpointValue'); + assert( + (client.pathTemplates.indexEndpointPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('metadataSchema', () => { + const fakePath = '/rendered/path/metadataSchema'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + metadata_store: 'metadataStoreValue', + metadata_schema: 'metadataSchemaValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.metadataSchemaPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.metadataSchemaPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('metadataSchemaPath', () => { + const result = client.metadataSchemaPath( + 'projectValue', + 'locationValue', + 'metadataStoreValue', + 'metadataSchemaValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.metadataSchemaPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromMetadataSchemaName', () => { + const result = client.matchProjectFromMetadataSchemaName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.metadataSchemaPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromMetadataSchemaName', () => { + const result = client.matchLocationFromMetadataSchemaName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.metadataSchemaPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMetadataStoreFromMetadataSchemaName', () => { + const result = + client.matchMetadataStoreFromMetadataSchemaName(fakePath); + assert.strictEqual(result, 'metadataStoreValue'); + assert( + (client.pathTemplates.metadataSchemaPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMetadataSchemaFromMetadataSchemaName', () => { + const result = + client.matchMetadataSchemaFromMetadataSchemaName(fakePath); + assert.strictEqual(result, 'metadataSchemaValue'); + assert( + (client.pathTemplates.metadataSchemaPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('metadataStore', () => { + const fakePath = '/rendered/path/metadataStore'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + metadata_store: 'metadataStoreValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.metadataStorePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.metadataStorePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('metadataStorePath', () => { + const result = client.metadataStorePath( + 'projectValue', + 'locationValue', + 'metadataStoreValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.metadataStorePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromMetadataStoreName', () => { + const result = client.matchProjectFromMetadataStoreName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.metadataStorePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromMetadataStoreName', () => { + const result = client.matchLocationFromMetadataStoreName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.metadataStorePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMetadataStoreFromMetadataStoreName', () => { + const result = client.matchMetadataStoreFromMetadataStoreName(fakePath); + assert.strictEqual(result, 'metadataStoreValue'); + assert( + (client.pathTemplates.metadataStorePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('model', () => { + const fakePath = '/rendered/path/model'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + model: 'modelValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.modelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.modelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('modelPath', () => { + const result = client.modelPath( + 'projectValue', + 'locationValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.modelPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromModelName', () => { + const result = client.matchProjectFromModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.modelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromModelName', () => { + const result = client.matchLocationFromModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.modelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromModelName', () => { + const result = client.matchModelFromModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + (client.pathTemplates.modelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('modelDeploymentMonitoringJob', () => { + const fakePath = '/rendered/path/modelDeploymentMonitoringJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + model_deployment_monitoring_job: 'modelDeploymentMonitoringJobValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.modelDeploymentMonitoringJobPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.modelDeploymentMonitoringJobPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('modelDeploymentMonitoringJobPath', () => { + const result = client.modelDeploymentMonitoringJobPath( + 'projectValue', + 'locationValue', + 'modelDeploymentMonitoringJobValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.modelDeploymentMonitoringJobPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromModelDeploymentMonitoringJobName', () => { + const result = + client.matchProjectFromModelDeploymentMonitoringJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.modelDeploymentMonitoringJobPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromModelDeploymentMonitoringJobName', () => { + const result = + client.matchLocationFromModelDeploymentMonitoringJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.modelDeploymentMonitoringJobPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelDeploymentMonitoringJobFromModelDeploymentMonitoringJobName', () => { + const result = + client.matchModelDeploymentMonitoringJobFromModelDeploymentMonitoringJobName( + fakePath + ); + assert.strictEqual(result, 'modelDeploymentMonitoringJobValue'); + assert( + ( + client.pathTemplates.modelDeploymentMonitoringJobPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('modelEvaluation', () => { + const fakePath = '/rendered/path/modelEvaluation'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + model: 'modelValue', + evaluation: 'evaluationValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.modelEvaluationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.modelEvaluationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('modelEvaluationPath', () => { + const result = client.modelEvaluationPath( + 'projectValue', + 'locationValue', + 'modelValue', + 'evaluationValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.modelEvaluationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromModelEvaluationName', () => { + const result = client.matchProjectFromModelEvaluationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.modelEvaluationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromModelEvaluationName', () => { + const result = client.matchLocationFromModelEvaluationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.modelEvaluationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromModelEvaluationName', () => { + const result = client.matchModelFromModelEvaluationName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + (client.pathTemplates.modelEvaluationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEvaluationFromModelEvaluationName', () => { + const result = client.matchEvaluationFromModelEvaluationName(fakePath); + assert.strictEqual(result, 'evaluationValue'); + assert( + (client.pathTemplates.modelEvaluationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('modelEvaluationSlice', () => { + const fakePath = '/rendered/path/modelEvaluationSlice'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + model: 'modelValue', + evaluation: 'evaluationValue', + slice: 'sliceValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.modelEvaluationSlicePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.modelEvaluationSlicePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('modelEvaluationSlicePath', () => { + const result = client.modelEvaluationSlicePath( + 'projectValue', + 'locationValue', + 'modelValue', + 'evaluationValue', + 'sliceValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.modelEvaluationSlicePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromModelEvaluationSliceName', () => { + const result = + client.matchProjectFromModelEvaluationSliceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.modelEvaluationSlicePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromModelEvaluationSliceName', () => { + const result = + client.matchLocationFromModelEvaluationSliceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.modelEvaluationSlicePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromModelEvaluationSliceName', () => { + const result = client.matchModelFromModelEvaluationSliceName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.modelEvaluationSlicePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEvaluationFromModelEvaluationSliceName', () => { + const result = + client.matchEvaluationFromModelEvaluationSliceName(fakePath); + assert.strictEqual(result, 'evaluationValue'); + assert( + ( + client.pathTemplates.modelEvaluationSlicePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSliceFromModelEvaluationSliceName', () => { + const result = client.matchSliceFromModelEvaluationSliceName(fakePath); + assert.strictEqual(result, 'sliceValue'); + assert( + ( + client.pathTemplates.modelEvaluationSlicePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('nasJob', () => { + const fakePath = '/rendered/path/nasJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + nas_job: 'nasJobValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.nasJobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.nasJobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('nasJobPath', () => { + const result = client.nasJobPath( + 'projectValue', + 'locationValue', + 'nasJobValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.nasJobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromNasJobName', () => { + const result = client.matchProjectFromNasJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.nasJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromNasJobName', () => { + const result = client.matchLocationFromNasJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.nasJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNasJobFromNasJobName', () => { + const result = client.matchNasJobFromNasJobName(fakePath); + assert.strictEqual(result, 'nasJobValue'); + assert( + (client.pathTemplates.nasJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('nasTrialDetail', () => { + const fakePath = '/rendered/path/nasTrialDetail'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + nas_job: 'nasJobValue', + nas_trial_detail: 'nasTrialDetailValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.nasTrialDetailPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.nasTrialDetailPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('nasTrialDetailPath', () => { + const result = client.nasTrialDetailPath( + 'projectValue', + 'locationValue', + 'nasJobValue', + 'nasTrialDetailValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.nasTrialDetailPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromNasTrialDetailName', () => { + const result = client.matchProjectFromNasTrialDetailName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.nasTrialDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromNasTrialDetailName', () => { + const result = client.matchLocationFromNasTrialDetailName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.nasTrialDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNasJobFromNasTrialDetailName', () => { + const result = client.matchNasJobFromNasTrialDetailName(fakePath); + assert.strictEqual(result, 'nasJobValue'); + assert( + (client.pathTemplates.nasTrialDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNasTrialDetailFromNasTrialDetailName', () => { + const result = + client.matchNasTrialDetailFromNasTrialDetailName(fakePath); + assert.strictEqual(result, 'nasTrialDetailValue'); + assert( + (client.pathTemplates.nasTrialDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('pipelineJob', () => { + const fakePath = '/rendered/path/pipelineJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + pipeline_job: 'pipelineJobValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.pipelineJobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.pipelineJobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('pipelineJobPath', () => { + const result = client.pipelineJobPath( + 'projectValue', + 'locationValue', + 'pipelineJobValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.pipelineJobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPipelineJobName', () => { + const result = client.matchProjectFromPipelineJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.pipelineJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPipelineJobName', () => { + const result = client.matchLocationFromPipelineJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.pipelineJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPipelineJobFromPipelineJobName', () => { + const result = client.matchPipelineJobFromPipelineJobName(fakePath); + assert.strictEqual(result, 'pipelineJobValue'); + assert( + (client.pathTemplates.pipelineJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.publisherModelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.publisherModelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('publisherModelPath', () => { + const result = client.publisherModelPath( + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.publisherModelPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPublisherFromPublisherModelName', () => { + const result = client.matchPublisherFromPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromPublisherModelName', () => { + const result = client.matchModelFromPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('savedQuery', () => { + const fakePath = '/rendered/path/savedQuery'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + dataset: 'datasetValue', + saved_query: 'savedQueryValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.savedQueryPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.savedQueryPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('savedQueryPath', () => { + const result = client.savedQueryPath( + 'projectValue', + 'locationValue', + 'datasetValue', + 'savedQueryValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.savedQueryPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromSavedQueryName', () => { + const result = client.matchProjectFromSavedQueryName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.savedQueryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromSavedQueryName', () => { + const result = client.matchLocationFromSavedQueryName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.savedQueryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDatasetFromSavedQueryName', () => { + const result = client.matchDatasetFromSavedQueryName(fakePath); + assert.strictEqual(result, 'datasetValue'); + assert( + (client.pathTemplates.savedQueryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSavedQueryFromSavedQueryName', () => { + const result = client.matchSavedQueryFromSavedQueryName(fakePath); + assert.strictEqual(result, 'savedQueryValue'); + assert( + (client.pathTemplates.savedQueryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('schedule', () => { + const fakePath = '/rendered/path/schedule'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + schedule: 'scheduleValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.schedulePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.schedulePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('schedulePath', () => { + const result = client.schedulePath( + 'projectValue', + 'locationValue', + 'scheduleValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.schedulePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromScheduleName', () => { + const result = client.matchProjectFromScheduleName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.schedulePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromScheduleName', () => { + const result = client.matchLocationFromScheduleName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.schedulePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchScheduleFromScheduleName', () => { + const result = client.matchScheduleFromScheduleName(fakePath); + assert.strictEqual(result, 'scheduleValue'); + assert( + (client.pathTemplates.schedulePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('specialistPool', () => { + const fakePath = '/rendered/path/specialistPool'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + specialist_pool: 'specialistPoolValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.specialistPoolPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.specialistPoolPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('specialistPoolPath', () => { + const result = client.specialistPoolPath( + 'projectValue', + 'locationValue', + 'specialistPoolValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.specialistPoolPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromSpecialistPoolName', () => { + const result = client.matchProjectFromSpecialistPoolName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.specialistPoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromSpecialistPoolName', () => { + const result = client.matchLocationFromSpecialistPoolName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.specialistPoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSpecialistPoolFromSpecialistPoolName', () => { + const result = + client.matchSpecialistPoolFromSpecialistPoolName(fakePath); + assert.strictEqual(result, 'specialistPoolValue'); + assert( + (client.pathTemplates.specialistPoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('study', () => { + const fakePath = '/rendered/path/study'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + study: 'studyValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.studyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.studyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('studyPath', () => { + const result = client.studyPath( + 'projectValue', + 'locationValue', + 'studyValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.studyPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromStudyName', () => { + const result = client.matchProjectFromStudyName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.studyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromStudyName', () => { + const result = client.matchLocationFromStudyName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.studyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchStudyFromStudyName', () => { + const result = client.matchStudyFromStudyName(fakePath); + assert.strictEqual(result, 'studyValue'); + assert( + (client.pathTemplates.studyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('tensorboard', () => { + const fakePath = '/rendered/path/tensorboard'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + tensorboard: 'tensorboardValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.tensorboardPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.tensorboardPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('tensorboardPath', () => { + const result = client.tensorboardPath( + 'projectValue', + 'locationValue', + 'tensorboardValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.tensorboardPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromTensorboardName', () => { + const result = client.matchProjectFromTensorboardName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.tensorboardPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromTensorboardName', () => { + const result = client.matchLocationFromTensorboardName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.tensorboardPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTensorboardFromTensorboardName', () => { + const result = client.matchTensorboardFromTensorboardName(fakePath); + assert.strictEqual(result, 'tensorboardValue'); + assert( + (client.pathTemplates.tensorboardPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('tensorboardExperiment', () => { + const fakePath = '/rendered/path/tensorboardExperiment'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + tensorboard: 'tensorboardValue', + experiment: 'experimentValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.tensorboardExperimentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.tensorboardExperimentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('tensorboardExperimentPath', () => { + const result = client.tensorboardExperimentPath( + 'projectValue', + 'locationValue', + 'tensorboardValue', + 'experimentValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.tensorboardExperimentPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromTensorboardExperimentName', () => { + const result = + client.matchProjectFromTensorboardExperimentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.tensorboardExperimentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromTensorboardExperimentName', () => { + const result = + client.matchLocationFromTensorboardExperimentName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.tensorboardExperimentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTensorboardFromTensorboardExperimentName', () => { + const result = + client.matchTensorboardFromTensorboardExperimentName(fakePath); + assert.strictEqual(result, 'tensorboardValue'); + assert( + ( + client.pathTemplates.tensorboardExperimentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromTensorboardExperimentName', () => { + const result = + client.matchExperimentFromTensorboardExperimentName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + ( + client.pathTemplates.tensorboardExperimentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('tensorboardRun', () => { + const fakePath = '/rendered/path/tensorboardRun'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + tensorboard: 'tensorboardValue', + experiment: 'experimentValue', + run: 'runValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.tensorboardRunPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.tensorboardRunPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('tensorboardRunPath', () => { + const result = client.tensorboardRunPath( + 'projectValue', + 'locationValue', + 'tensorboardValue', + 'experimentValue', + 'runValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.tensorboardRunPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromTensorboardRunName', () => { + const result = client.matchProjectFromTensorboardRunName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.tensorboardRunPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromTensorboardRunName', () => { + const result = client.matchLocationFromTensorboardRunName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.tensorboardRunPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTensorboardFromTensorboardRunName', () => { + const result = client.matchTensorboardFromTensorboardRunName(fakePath); + assert.strictEqual(result, 'tensorboardValue'); + assert( + (client.pathTemplates.tensorboardRunPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromTensorboardRunName', () => { + const result = client.matchExperimentFromTensorboardRunName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + (client.pathTemplates.tensorboardRunPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRunFromTensorboardRunName', () => { + const result = client.matchRunFromTensorboardRunName(fakePath); + assert.strictEqual(result, 'runValue'); + assert( + (client.pathTemplates.tensorboardRunPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('tensorboardTimeSeries', () => { + const fakePath = '/rendered/path/tensorboardTimeSeries'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + tensorboard: 'tensorboardValue', + experiment: 'experimentValue', + run: 'runValue', + time_series: 'timeSeriesValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.tensorboardTimeSeriesPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.tensorboardTimeSeriesPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('tensorboardTimeSeriesPath', () => { + const result = client.tensorboardTimeSeriesPath( + 'projectValue', + 'locationValue', + 'tensorboardValue', + 'experimentValue', + 'runValue', + 'timeSeriesValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.tensorboardTimeSeriesPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromTensorboardTimeSeriesName', () => { + const result = + client.matchProjectFromTensorboardTimeSeriesName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.tensorboardTimeSeriesPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromTensorboardTimeSeriesName', () => { + const result = + client.matchLocationFromTensorboardTimeSeriesName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.tensorboardTimeSeriesPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTensorboardFromTensorboardTimeSeriesName', () => { + const result = + client.matchTensorboardFromTensorboardTimeSeriesName(fakePath); + assert.strictEqual(result, 'tensorboardValue'); + assert( + ( + client.pathTemplates.tensorboardTimeSeriesPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchExperimentFromTensorboardTimeSeriesName', () => { + const result = + client.matchExperimentFromTensorboardTimeSeriesName(fakePath); + assert.strictEqual(result, 'experimentValue'); + assert( + ( + client.pathTemplates.tensorboardTimeSeriesPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchRunFromTensorboardTimeSeriesName', () => { + const result = client.matchRunFromTensorboardTimeSeriesName(fakePath); + assert.strictEqual(result, 'runValue'); + assert( + ( + client.pathTemplates.tensorboardTimeSeriesPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTimeSeriesFromTensorboardTimeSeriesName', () => { + const result = + client.matchTimeSeriesFromTensorboardTimeSeriesName(fakePath); + assert.strictEqual(result, 'timeSeriesValue'); + assert( + ( + client.pathTemplates.tensorboardTimeSeriesPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('trainingPipeline', () => { + const fakePath = '/rendered/path/trainingPipeline'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + training_pipeline: 'trainingPipelineValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.trainingPipelinePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.trainingPipelinePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('trainingPipelinePath', () => { + const result = client.trainingPipelinePath( + 'projectValue', + 'locationValue', + 'trainingPipelineValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.trainingPipelinePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromTrainingPipelineName', () => { + const result = client.matchProjectFromTrainingPipelineName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.trainingPipelinePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromTrainingPipelineName', () => { + const result = client.matchLocationFromTrainingPipelineName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.trainingPipelinePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTrainingPipelineFromTrainingPipelineName', () => { + const result = + client.matchTrainingPipelineFromTrainingPipelineName(fakePath); + assert.strictEqual(result, 'trainingPipelineValue'); + assert( + (client.pathTemplates.trainingPipelinePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('trial', () => { + const fakePath = '/rendered/path/trial'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + study: 'studyValue', + trial: 'trialValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.trialPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.trialPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('trialPath', () => { + const result = client.trialPath( + 'projectValue', + 'locationValue', + 'studyValue', + 'trialValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.trialPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromTrialName', () => { + const result = client.matchProjectFromTrialName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.trialPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromTrialName', () => { + const result = client.matchLocationFromTrialName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.trialPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchStudyFromTrialName', () => { + const result = client.matchStudyFromTrialName(fakePath); + assert.strictEqual(result, 'studyValue'); + assert( + (client.pathTemplates.trialPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTrialFromTrialName', () => { + const result = client.matchTrialFromTrialName(fakePath); + assert.strictEqual(result, 'trialValue'); + assert( + (client.pathTemplates.trialPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-aiplatform/test/gapic_model_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_model_service_v1.ts index 6df10fdd68a..9e5175b481f 100644 --- a/packages/google-cloud-aiplatform/test/gapic_model_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_model_service_v1.ts @@ -5074,70 +5074,6 @@ describe('v1.ModelServiceClient', () => { }); }); - describe('endpoint', () => { - const fakePath = '/rendered/path/endpoint'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - endpoint: 'endpointValue', - }; - const client = new modelserviceModule.v1.ModelServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.endpointPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.endpointPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('endpointPath', () => { - const result = client.endpointPath( - 'projectValue', - 'locationValue', - 'endpointValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.endpointPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEndpointName', () => { - const result = client.matchProjectFromEndpointName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEndpointName', () => { - const result = client.matchLocationFromEndpointName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEndpointFromEndpointName', () => { - const result = client.matchEndpointFromEndpointName(fakePath); - assert.strictEqual(result, 'endpointValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('entityType', () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { @@ -6375,6 +6311,178 @@ describe('v1.ModelServiceClient', () => { }); }); + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = new modelserviceModule.v1.ModelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new modelserviceModule.v1.ModelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('savedQuery', () => { const fakePath = '/rendered/path/savedQuery'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_model_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_model_service_v1beta1.ts index 71c74b22c5f..08a8ba85bec 100644 --- a/packages/google-cloud-aiplatform/test/gapic_model_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_model_service_v1beta1.ts @@ -5409,70 +5409,6 @@ describe('v1beta1.ModelServiceClient', () => { }); }); - describe('endpoint', () => { - const fakePath = '/rendered/path/endpoint'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - endpoint: 'endpointValue', - }; - const client = new modelserviceModule.v1beta1.ModelServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.endpointPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.endpointPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('endpointPath', () => { - const result = client.endpointPath( - 'projectValue', - 'locationValue', - 'endpointValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.endpointPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEndpointName', () => { - const result = client.matchProjectFromEndpointName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEndpointName', () => { - const result = client.matchLocationFromEndpointName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEndpointFromEndpointName', () => { - const result = client.matchEndpointFromEndpointName(fakePath); - assert.strictEqual(result, 'endpointValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('entityType', () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { @@ -6710,6 +6646,230 @@ describe('v1beta1.ModelServiceClient', () => { }); }); + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = new modelserviceModule.v1beta1.ModelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new modelserviceModule.v1beta1.ModelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new modelserviceModule.v1beta1.ModelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.publisherModelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.publisherModelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('publisherModelPath', () => { + const result = client.publisherModelPath( + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.publisherModelPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPublisherFromPublisherModelName', () => { + const result = client.matchPublisherFromPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromPublisherModelName', () => { + const result = client.matchModelFromPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('savedQuery', () => { const fakePath = '/rendered/path/savedQuery'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_pipeline_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_pipeline_service_v1.ts index a8f1cd8812b..520fea06206 100644 --- a/packages/google-cloud-aiplatform/test/gapic_pipeline_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_pipeline_service_v1.ts @@ -3622,70 +3622,6 @@ describe('v1.PipelineServiceClient', () => { }); }); - describe('endpoint', () => { - const fakePath = '/rendered/path/endpoint'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - endpoint: 'endpointValue', - }; - const client = new pipelineserviceModule.v1.PipelineServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.endpointPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.endpointPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('endpointPath', () => { - const result = client.endpointPath( - 'projectValue', - 'locationValue', - 'endpointValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.endpointPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEndpointName', () => { - const result = client.matchProjectFromEndpointName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEndpointName', () => { - const result = client.matchLocationFromEndpointName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEndpointFromEndpointName', () => { - const result = client.matchEndpointFromEndpointName(fakePath); - assert.strictEqual(result, 'endpointValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('entityType', () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { @@ -4923,6 +4859,178 @@ describe('v1.PipelineServiceClient', () => { }); }); + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = new pipelineserviceModule.v1.PipelineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new pipelineserviceModule.v1.PipelineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('savedQuery', () => { const fakePath = '/rendered/path/savedQuery'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_pipeline_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_pipeline_service_v1beta1.ts index 5f8f3f7ef05..16c300a3a74 100644 --- a/packages/google-cloud-aiplatform/test/gapic_pipeline_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_pipeline_service_v1beta1.ts @@ -3713,70 +3713,6 @@ describe('v1beta1.PipelineServiceClient', () => { }); }); - describe('endpoint', () => { - const fakePath = '/rendered/path/endpoint'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - endpoint: 'endpointValue', - }; - const client = new pipelineserviceModule.v1beta1.PipelineServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.endpointPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.endpointPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('endpointPath', () => { - const result = client.endpointPath( - 'projectValue', - 'locationValue', - 'endpointValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.endpointPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEndpointName', () => { - const result = client.matchProjectFromEndpointName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEndpointName', () => { - const result = client.matchLocationFromEndpointName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEndpointFromEndpointName', () => { - const result = client.matchEndpointFromEndpointName(fakePath); - assert.strictEqual(result, 'endpointValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('entityType', () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { @@ -5014,6 +4950,230 @@ describe('v1beta1.PipelineServiceClient', () => { }); }); + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = new pipelineserviceModule.v1beta1.PipelineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new pipelineserviceModule.v1beta1.PipelineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new pipelineserviceModule.v1beta1.PipelineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.publisherModelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.publisherModelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('publisherModelPath', () => { + const result = client.publisherModelPath( + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.publisherModelPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPublisherFromPublisherModelName', () => { + const result = client.matchPublisherFromPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromPublisherModelName', () => { + const result = client.matchModelFromPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('savedQuery', () => { const fakePath = '/rendered/path/savedQuery'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_prediction_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_prediction_service_v1.ts index 104a4ca0c44..af8a1d803cf 100644 --- a/packages/google-cloud-aiplatform/test/gapic_prediction_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_prediction_service_v1.ts @@ -1754,70 +1754,6 @@ describe('v1.PredictionServiceClient', () => { }); }); - describe('endpoint', () => { - const fakePath = '/rendered/path/endpoint'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - endpoint: 'endpointValue', - }; - const client = new predictionserviceModule.v1.PredictionServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.endpointPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.endpointPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('endpointPath', () => { - const result = client.endpointPath( - 'projectValue', - 'locationValue', - 'endpointValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.endpointPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEndpointName', () => { - const result = client.matchProjectFromEndpointName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEndpointName', () => { - const result = client.matchLocationFromEndpointName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEndpointFromEndpointName', () => { - const result = client.matchEndpointFromEndpointName(fakePath); - assert.strictEqual(result, 'endpointValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('entityType', () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { @@ -3006,6 +2942,178 @@ describe('v1.PredictionServiceClient', () => { }); }); + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = new predictionserviceModule.v1.PredictionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new predictionserviceModule.v1.PredictionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('savedQuery', () => { const fakePath = '/rendered/path/savedQuery'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_prediction_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_prediction_service_v1beta1.ts index da5d93ae941..b3629cc22d9 100644 --- a/packages/google-cloud-aiplatform/test/gapic_prediction_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_prediction_service_v1beta1.ts @@ -1878,71 +1878,6 @@ describe('v1beta1.PredictionServiceClient', () => { }); }); - describe('endpoint', () => { - const fakePath = '/rendered/path/endpoint'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - endpoint: 'endpointValue', - }; - const client = - new predictionserviceModule.v1beta1.PredictionServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.endpointPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.endpointPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('endpointPath', () => { - const result = client.endpointPath( - 'projectValue', - 'locationValue', - 'endpointValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.endpointPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEndpointName', () => { - const result = client.matchProjectFromEndpointName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEndpointName', () => { - const result = client.matchLocationFromEndpointName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEndpointFromEndpointName', () => { - const result = client.matchEndpointFromEndpointName(fakePath); - assert.strictEqual(result, 'endpointValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('entityType', () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { @@ -3147,6 +3082,233 @@ describe('v1beta1.PredictionServiceClient', () => { }); }); + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = + new predictionserviceModule.v1beta1.PredictionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = + new predictionserviceModule.v1beta1.PredictionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = + new predictionserviceModule.v1beta1.PredictionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.publisherModelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.publisherModelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('publisherModelPath', () => { + const result = client.publisherModelPath( + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.publisherModelPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPublisherFromPublisherModelName', () => { + const result = client.matchPublisherFromPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromPublisherModelName', () => { + const result = client.matchModelFromPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('savedQuery', () => { const fakePath = '/rendered/path/savedQuery'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_schedule_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_schedule_service_v1beta1.ts index f31d0b25f75..53fac452c31 100644 --- a/packages/google-cloud-aiplatform/test/gapic_schedule_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_schedule_service_v1beta1.ts @@ -785,6 +785,140 @@ describe('v1beta1.ScheduleServiceClient', () => { }); }); + describe('updateSchedule', () => { + it('invokes updateSchedule without error', async () => { + const client = new scheduleserviceModule.v1beta1.ScheduleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.UpdateScheduleRequest() + ); + request.schedule ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.UpdateScheduleRequest', + ['schedule', 'name'] + ); + request.schedule.name = defaultValue1; + const expectedHeaderRequestParams = `schedule.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.Schedule() + ); + client.innerApiCalls.updateSchedule = stubSimpleCall(expectedResponse); + const [response] = await client.updateSchedule(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateSchedule as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateSchedule as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSchedule without error using callback', async () => { + const client = new scheduleserviceModule.v1beta1.ScheduleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.UpdateScheduleRequest() + ); + request.schedule ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.UpdateScheduleRequest', + ['schedule', 'name'] + ); + request.schedule.name = defaultValue1; + const expectedHeaderRequestParams = `schedule.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.Schedule() + ); + client.innerApiCalls.updateSchedule = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateSchedule( + request, + ( + err?: Error | null, + result?: protos.google.cloud.aiplatform.v1beta1.ISchedule | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateSchedule as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateSchedule as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSchedule with error', async () => { + const client = new scheduleserviceModule.v1beta1.ScheduleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.UpdateScheduleRequest() + ); + request.schedule ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.UpdateScheduleRequest', + ['schedule', 'name'] + ); + request.schedule.name = defaultValue1; + const expectedHeaderRequestParams = `schedule.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateSchedule = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateSchedule(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateSchedule as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateSchedule as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSchedule with closed client', async () => { + const client = new scheduleserviceModule.v1beta1.ScheduleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.UpdateScheduleRequest() + ); + request.schedule ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.UpdateScheduleRequest', + ['schedule', 'name'] + ); + request.schedule.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateSchedule(request), expectedError); + }); + }); + describe('deleteSchedule', () => { it('invokes deleteSchedule without error', async () => { const client = new scheduleserviceModule.v1beta1.ScheduleServiceClient({ @@ -2877,70 +3011,6 @@ describe('v1beta1.ScheduleServiceClient', () => { }); }); - describe('endpoint', () => { - const fakePath = '/rendered/path/endpoint'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - endpoint: 'endpointValue', - }; - const client = new scheduleserviceModule.v1beta1.ScheduleServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.endpointPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.endpointPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('endpointPath', () => { - const result = client.endpointPath( - 'projectValue', - 'locationValue', - 'endpointValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.endpointPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEndpointName', () => { - const result = client.matchProjectFromEndpointName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEndpointName', () => { - const result = client.matchLocationFromEndpointName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEndpointFromEndpointName', () => { - const result = client.matchEndpointFromEndpointName(fakePath); - assert.strictEqual(result, 'endpointValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('entityType', () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { @@ -4178,6 +4248,230 @@ describe('v1beta1.ScheduleServiceClient', () => { }); }); + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = new scheduleserviceModule.v1beta1.ScheduleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new scheduleserviceModule.v1beta1.ScheduleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new scheduleserviceModule.v1beta1.ScheduleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.publisherModelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.publisherModelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('publisherModelPath', () => { + const result = client.publisherModelPath( + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.publisherModelPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPublisherFromPublisherModelName', () => { + const result = client.matchPublisherFromPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromPublisherModelName', () => { + const result = client.matchModelFromPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('savedQuery', () => { const fakePath = '/rendered/path/savedQuery'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_specialist_pool_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_specialist_pool_service_v1.ts index 0c61b51e9f9..27904dca575 100644 --- a/packages/google-cloud-aiplatform/test/gapic_specialist_pool_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_specialist_pool_service_v1.ts @@ -2872,71 +2872,6 @@ describe('v1.SpecialistPoolServiceClient', () => { }); }); - describe('endpoint', () => { - const fakePath = '/rendered/path/endpoint'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - endpoint: 'endpointValue', - }; - const client = - new specialistpoolserviceModule.v1.SpecialistPoolServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.endpointPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.endpointPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('endpointPath', () => { - const result = client.endpointPath( - 'projectValue', - 'locationValue', - 'endpointValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.endpointPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEndpointName', () => { - const result = client.matchProjectFromEndpointName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEndpointName', () => { - const result = client.matchLocationFromEndpointName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEndpointFromEndpointName', () => { - const result = client.matchEndpointFromEndpointName(fakePath); - assert.strictEqual(result, 'endpointValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('entityType', () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { @@ -4191,6 +4126,180 @@ describe('v1.SpecialistPoolServiceClient', () => { }); }); + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = + new specialistpoolserviceModule.v1.SpecialistPoolServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = + new specialistpoolserviceModule.v1.SpecialistPoolServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('savedQuery', () => { const fakePath = '/rendered/path/savedQuery'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_specialist_pool_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_specialist_pool_service_v1beta1.ts index f38b16dbcdd..87199280e76 100644 --- a/packages/google-cloud-aiplatform/test/gapic_specialist_pool_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_specialist_pool_service_v1beta1.ts @@ -2959,71 +2959,6 @@ describe('v1beta1.SpecialistPoolServiceClient', () => { }); }); - describe('endpoint', () => { - const fakePath = '/rendered/path/endpoint'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - endpoint: 'endpointValue', - }; - const client = - new specialistpoolserviceModule.v1beta1.SpecialistPoolServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.endpointPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.endpointPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('endpointPath', () => { - const result = client.endpointPath( - 'projectValue', - 'locationValue', - 'endpointValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.endpointPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEndpointName', () => { - const result = client.matchProjectFromEndpointName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEndpointName', () => { - const result = client.matchLocationFromEndpointName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEndpointFromEndpointName', () => { - const result = client.matchEndpointFromEndpointName(fakePath); - assert.strictEqual(result, 'endpointValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('entityType', () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { @@ -4278,6 +4213,233 @@ describe('v1beta1.SpecialistPoolServiceClient', () => { }); }); + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = + new specialistpoolserviceModule.v1beta1.SpecialistPoolServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = + new specialistpoolserviceModule.v1beta1.SpecialistPoolServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = + new specialistpoolserviceModule.v1beta1.SpecialistPoolServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.publisherModelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.publisherModelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('publisherModelPath', () => { + const result = client.publisherModelPath( + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.publisherModelPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPublisherFromPublisherModelName', () => { + const result = client.matchPublisherFromPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromPublisherModelName', () => { + const result = client.matchModelFromPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('savedQuery', () => { const fakePath = '/rendered/path/savedQuery'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_tensorboard_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_tensorboard_service_v1.ts index 7071e9acb93..919a5710c6e 100644 --- a/packages/google-cloud-aiplatform/test/gapic_tensorboard_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_tensorboard_service_v1.ts @@ -7123,70 +7123,6 @@ describe('v1.TensorboardServiceClient', () => { }); }); - describe('endpoint', () => { - const fakePath = '/rendered/path/endpoint'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - endpoint: 'endpointValue', - }; - const client = new tensorboardserviceModule.v1.TensorboardServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.endpointPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.endpointPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('endpointPath', () => { - const result = client.endpointPath( - 'projectValue', - 'locationValue', - 'endpointValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.endpointPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEndpointName', () => { - const result = client.matchProjectFromEndpointName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEndpointName', () => { - const result = client.matchLocationFromEndpointName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEndpointFromEndpointName', () => { - const result = client.matchEndpointFromEndpointName(fakePath); - assert.strictEqual(result, 'endpointValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('entityType', () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { @@ -8462,6 +8398,178 @@ describe('v1.TensorboardServiceClient', () => { }); }); + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = new tensorboardserviceModule.v1.TensorboardServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new tensorboardserviceModule.v1.TensorboardServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('savedQuery', () => { const fakePath = '/rendered/path/savedQuery'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_tensorboard_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_tensorboard_service_v1beta1.ts index 091fe8f0071..1960e94eaa6 100644 --- a/packages/google-cloud-aiplatform/test/gapic_tensorboard_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_tensorboard_service_v1beta1.ts @@ -7402,71 +7402,6 @@ describe('v1beta1.TensorboardServiceClient', () => { }); }); - describe('endpoint', () => { - const fakePath = '/rendered/path/endpoint'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - endpoint: 'endpointValue', - }; - const client = - new tensorboardserviceModule.v1beta1.TensorboardServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.endpointPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.endpointPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('endpointPath', () => { - const result = client.endpointPath( - 'projectValue', - 'locationValue', - 'endpointValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.endpointPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEndpointName', () => { - const result = client.matchProjectFromEndpointName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEndpointName', () => { - const result = client.matchLocationFromEndpointName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEndpointFromEndpointName', () => { - const result = client.matchEndpointFromEndpointName(fakePath); - assert.strictEqual(result, 'endpointValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('entityType', () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { @@ -8760,6 +8695,233 @@ describe('v1beta1.TensorboardServiceClient', () => { }); }); + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = + new tensorboardserviceModule.v1beta1.TensorboardServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = + new tensorboardserviceModule.v1beta1.TensorboardServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = + new tensorboardserviceModule.v1beta1.TensorboardServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.publisherModelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.publisherModelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('publisherModelPath', () => { + const result = client.publisherModelPath( + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.publisherModelPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPublisherFromPublisherModelName', () => { + const result = client.matchPublisherFromPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromPublisherModelName', () => { + const result = client.matchModelFromPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('savedQuery', () => { const fakePath = '/rendered/path/savedQuery'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_vizier_service_v1.ts b/packages/google-cloud-aiplatform/test/gapic_vizier_service_v1.ts index 0fe87b2a791..c88ccccb384 100644 --- a/packages/google-cloud-aiplatform/test/gapic_vizier_service_v1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_vizier_service_v1.ts @@ -4180,70 +4180,6 @@ describe('v1.VizierServiceClient', () => { }); }); - describe('endpoint', () => { - const fakePath = '/rendered/path/endpoint'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - endpoint: 'endpointValue', - }; - const client = new vizierserviceModule.v1.VizierServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.endpointPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.endpointPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('endpointPath', () => { - const result = client.endpointPath( - 'projectValue', - 'locationValue', - 'endpointValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.endpointPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEndpointName', () => { - const result = client.matchProjectFromEndpointName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEndpointName', () => { - const result = client.matchLocationFromEndpointName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEndpointFromEndpointName', () => { - const result = client.matchEndpointFromEndpointName(fakePath); - assert.strictEqual(result, 'endpointValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('entityType', () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { @@ -5481,6 +5417,178 @@ describe('v1.VizierServiceClient', () => { }); }); + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = new vizierserviceModule.v1.VizierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new vizierserviceModule.v1.VizierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('savedQuery', () => { const fakePath = '/rendered/path/savedQuery'; const expectedParameters = { diff --git a/packages/google-cloud-aiplatform/test/gapic_vizier_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_vizier_service_v1beta1.ts index 43c83820e7d..bcbdcbf55d7 100644 --- a/packages/google-cloud-aiplatform/test/gapic_vizier_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_vizier_service_v1beta1.ts @@ -4309,70 +4309,6 @@ describe('v1beta1.VizierServiceClient', () => { }); }); - describe('endpoint', () => { - const fakePath = '/rendered/path/endpoint'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - endpoint: 'endpointValue', - }; - const client = new vizierserviceModule.v1beta1.VizierServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.endpointPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.endpointPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('endpointPath', () => { - const result = client.endpointPath( - 'projectValue', - 'locationValue', - 'endpointValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.endpointPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromEndpointName', () => { - const result = client.matchProjectFromEndpointName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromEndpointName', () => { - const result = client.matchLocationFromEndpointName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchEndpointFromEndpointName', () => { - const result = client.matchEndpointFromEndpointName(fakePath); - assert.strictEqual(result, 'endpointValue'); - assert( - (client.pathTemplates.endpointPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('entityType', () => { const fakePath = '/rendered/path/entityType'; const expectedParameters = { @@ -5610,6 +5546,230 @@ describe('v1beta1.VizierServiceClient', () => { }); }); + describe('projectLocationEndpoint', () => { + const fakePath = '/rendered/path/projectLocationEndpoint'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + endpoint: 'endpointValue', + }; + const client = new vizierserviceModule.v1beta1.VizierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationEndpointPath', () => { + const result = client.projectLocationEndpointPath( + 'projectValue', + 'locationValue', + 'endpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationEndpointName', () => { + const result = + client.matchProjectFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationEndpointName', () => { + const result = + client.matchLocationFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEndpointFromProjectLocationEndpointName', () => { + const result = + client.matchEndpointFromProjectLocationEndpointName(fakePath); + assert.strictEqual(result, 'endpointValue'); + assert( + ( + client.pathTemplates.projectLocationEndpointPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationPublisherModel', () => { + const fakePath = '/rendered/path/projectLocationPublisherModel'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new vizierserviceModule.v1beta1.VizierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationPublisherModelPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationPublisherModelPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationPublisherModelPath', () => { + const result = client.projectLocationPublisherModelPath( + 'projectValue', + 'locationValue', + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationPublisherModelName', () => { + const result = + client.matchProjectFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationPublisherModelName', () => { + const result = + client.matchLocationFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPublisherFromProjectLocationPublisherModelName', () => { + const result = + client.matchPublisherFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromProjectLocationPublisherModelName', () => { + const result = + client.matchModelFromProjectLocationPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + ( + client.pathTemplates.projectLocationPublisherModelPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('publisherModel', () => { + const fakePath = '/rendered/path/publisherModel'; + const expectedParameters = { + publisher: 'publisherValue', + model: 'modelValue', + }; + const client = new vizierserviceModule.v1beta1.VizierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.publisherModelPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.publisherModelPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('publisherModelPath', () => { + const result = client.publisherModelPath( + 'publisherValue', + 'modelValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.publisherModelPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPublisherFromPublisherModelName', () => { + const result = client.matchPublisherFromPublisherModelName(fakePath); + assert.strictEqual(result, 'publisherValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchModelFromPublisherModelName', () => { + const result = client.matchModelFromPublisherModelName(fakePath); + assert.strictEqual(result, 'modelValue'); + assert( + (client.pathTemplates.publisherModelPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('savedQuery', () => { const fakePath = '/rendered/path/savedQuery'; const expectedParameters = { diff --git a/packages/google-cloud-alloydb/package.json b/packages/google-cloud-alloydb/package.json index 99408f7b165..75db988a5c8 100644 --- a/packages/google-cloud-alloydb/package.json +++ b/packages/google-cloud-alloydb/package.json @@ -31,7 +31,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -39,10 +39,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -57,6 +58,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-apigateway/package.json b/packages/google-cloud-apigateway/package.json index e736266b510..d3444d18733 100644 --- a/packages/google-cloud-apigateway/package.json +++ b/packages/google-cloud-apigateway/package.json @@ -30,17 +30,18 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", "docs-test": "linkinator docs", "fix": "gts fix", - "prelint": "cd samples; npm link ../; npm i", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "system-test": "npm run compile && c8 mocha build/system-test", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", "test": "c8 mocha build/test" }, "dependencies": { @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-apigateway" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-apigeeconnect/package.json b/packages/google-cloud-apigeeconnect/package.json index c368906ab9d..97589048a62 100644 --- a/packages/google-cloud-apigeeconnect/package.json +++ b/packages/google-cloud-apigeeconnect/package.json @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-apigeeconnect" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-asset/package.json b/packages/google-cloud-asset/package.json index 6cbd9a15138..404ee75f5fc 100644 --- a/packages/google-cloud-asset/package.json +++ b/packages/google-cloud-asset/package.json @@ -32,21 +32,20 @@ "Cloud Asset API" ], "scripts": { - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "samples-test-suite": "cd samples/ && npm link ../ && npm test && cd ../", "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", "docs-test": "linkinator docs", "fix": "gts fix", "lint": "gts check", - "predocs-test": "npm run docs", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -62,6 +61,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -72,5 +72,4 @@ "webpack-cli": "^5.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-asset" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-assuredworkloads/package.json b/packages/google-cloud-assuredworkloads/package.json index 3d65c11cef3..872774d42e2 100644 --- a/packages/google-cloud-assuredworkloads/package.json +++ b/packages/google-cloud-assuredworkloads/package.json @@ -30,17 +30,18 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", "docs-test": "linkinator docs", "fix": "gts fix", "lint": "gts check", - "prelint": "cd samples; npm link ../; npm i", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", "test": "c8 mocha build/test" }, "dependencies": { @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-assuredworkloads" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-baremetalsolution/package.json b/packages/google-cloud-baremetalsolution/package.json index 82e03a83d0d..900aad505ad 100644 --- a/packages/google-cloud-baremetalsolution/package.json +++ b/packages/google-cloud-baremetalsolution/package.json @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^8.4.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=v12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-baremetalsolution" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-batch/CHANGELOG.md b/packages/google-cloud-batch/CHANGELOG.md index 7a00ce6fd5d..0c8cadc43d5 100644 --- a/packages/google-cloud-batch/CHANGELOG.md +++ b/packages/google-cloud-batch/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.8.0](https://github.com/googleapis/google-cloud-node/compare/batch-v0.7.1...batch-v0.8.0) (2023-05-20) + + +### Features + +* [batch] add support for placement policies ([#4182](https://github.com/googleapis/google-cloud-node/issues/4182)) ([9ece2b7](https://github.com/googleapis/google-cloud-node/commit/9ece2b7d96f3b18b32acfd5e24ba38f52f39dab9)) + ## [0.7.1](https://github.com/googleapis/google-cloud-node/compare/batch-v0.7.0...batch-v0.7.1) (2023-04-13) diff --git a/packages/google-cloud-batch/README.md b/packages/google-cloud-batch/README.md index adf39f01935..a0606bdf86c 100644 --- a/packages/google-cloud-batch/README.md +++ b/packages/google-cloud-batch/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Batch: Node.js Client](https://github.com/googleapis/google-cloud-node) +# [Batch: Node.js Client](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-batch) [![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/batch.svg)](https://www.npmjs.org/package/@google-cloud/batch) @@ -107,24 +107,23 @@ callListJobs(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-batch/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Batch_service.create_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-batch/samples/generated/v1/batch_service.create_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-batch/samples/generated/v1/batch_service.create_job.js,samples/README.md) | -| Batch_service.delete_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-batch/samples/generated/v1/batch_service.delete_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-batch/samples/generated/v1/batch_service.delete_job.js,samples/README.md) | -| Batch_service.get_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-batch/samples/generated/v1/batch_service.get_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-batch/samples/generated/v1/batch_service.get_job.js,samples/README.md) | -| Batch_service.get_task | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-batch/samples/generated/v1/batch_service.get_task.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-batch/samples/generated/v1/batch_service.get_task.js,samples/README.md) | -| Batch_service.list_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-batch/samples/generated/v1/batch_service.list_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-batch/samples/generated/v1/batch_service.list_jobs.js,samples/README.md) | -| Batch_service.list_tasks | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-batch/samples/generated/v1/batch_service.list_tasks.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-batch/samples/generated/v1/batch_service.list_tasks.js,samples/README.md) | -| Batch_service.create_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-batch/samples/generated/v1alpha/batch_service.create_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-batch/samples/generated/v1alpha/batch_service.create_job.js,samples/README.md) | -| Batch_service.delete_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-batch/samples/generated/v1alpha/batch_service.delete_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-batch/samples/generated/v1alpha/batch_service.delete_job.js,samples/README.md) | -| Batch_service.get_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-batch/samples/generated/v1alpha/batch_service.get_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-batch/samples/generated/v1alpha/batch_service.get_job.js,samples/README.md) | -| Batch_service.get_task | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-batch/samples/generated/v1alpha/batch_service.get_task.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-batch/samples/generated/v1alpha/batch_service.get_task.js,samples/README.md) | -| Batch_service.list_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-batch/samples/generated/v1alpha/batch_service.list_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-batch/samples/generated/v1alpha/batch_service.list_jobs.js,samples/README.md) | -| Batch_service.list_tasks | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-batch/samples/generated/v1alpha/batch_service.list_tasks.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-batch/samples/generated/v1alpha/batch_service.list_tasks.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-batch/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-batch/samples/quickstart.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-batch/samples/test/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-batch/samples/test/quickstart.js,samples/README.md) | +| Batch_service.create_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-batch/samples/generated/v1/batch_service.create_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-batch/samples/generated/v1/batch_service.create_job.js,packages/google-cloud-batch/samples/README.md) | +| Batch_service.delete_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-batch/samples/generated/v1/batch_service.delete_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-batch/samples/generated/v1/batch_service.delete_job.js,packages/google-cloud-batch/samples/README.md) | +| Batch_service.get_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-batch/samples/generated/v1/batch_service.get_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-batch/samples/generated/v1/batch_service.get_job.js,packages/google-cloud-batch/samples/README.md) | +| Batch_service.get_task | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-batch/samples/generated/v1/batch_service.get_task.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-batch/samples/generated/v1/batch_service.get_task.js,packages/google-cloud-batch/samples/README.md) | +| Batch_service.list_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-batch/samples/generated/v1/batch_service.list_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-batch/samples/generated/v1/batch_service.list_jobs.js,packages/google-cloud-batch/samples/README.md) | +| Batch_service.list_tasks | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-batch/samples/generated/v1/batch_service.list_tasks.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-batch/samples/generated/v1/batch_service.list_tasks.js,packages/google-cloud-batch/samples/README.md) | +| Batch_service.create_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-batch/samples/generated/v1alpha/batch_service.create_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-batch/samples/generated/v1alpha/batch_service.create_job.js,packages/google-cloud-batch/samples/README.md) | +| Batch_service.delete_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-batch/samples/generated/v1alpha/batch_service.delete_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-batch/samples/generated/v1alpha/batch_service.delete_job.js,packages/google-cloud-batch/samples/README.md) | +| Batch_service.get_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-batch/samples/generated/v1alpha/batch_service.get_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-batch/samples/generated/v1alpha/batch_service.get_job.js,packages/google-cloud-batch/samples/README.md) | +| Batch_service.get_task | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-batch/samples/generated/v1alpha/batch_service.get_task.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-batch/samples/generated/v1alpha/batch_service.get_task.js,packages/google-cloud-batch/samples/README.md) | +| Batch_service.list_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-batch/samples/generated/v1alpha/batch_service.list_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-batch/samples/generated/v1alpha/batch_service.list_jobs.js,packages/google-cloud-batch/samples/README.md) | +| Batch_service.list_tasks | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-batch/samples/generated/v1alpha/batch_service.list_tasks.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-batch/samples/generated/v1alpha/batch_service.list_tasks.js,packages/google-cloud-batch/samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-batch/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-batch/samples/quickstart.js,packages/google-cloud-batch/samples/README.md) | diff --git a/packages/google-cloud-batch/package.json b/packages/google-cloud-batch/package.json index f7c46346a05..8b1ecd16a00 100644 --- a/packages/google-cloud-batch/package.json +++ b/packages/google-cloud-batch/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/batch", - "version": "0.7.1", + "version": "0.8.0", "description": "Batch client for Node.js", "repository": { "type": "git", @@ -31,7 +31,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -39,10 +39,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -57,6 +58,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-batch/protos/google/cloud/batch/v1/job.proto b/packages/google-cloud-batch/protos/google/cloud/batch/v1/job.proto index 4bed626c1ac..32e1fc416d2 100644 --- a/packages/google-cloud-batch/protos/google/cloud/batch/v1/job.proto +++ b/packages/google-cloud-batch/protos/google/cloud/batch/v1/job.proto @@ -225,12 +225,14 @@ message JobNotification { message AllocationPolicy { message LocationPolicy { // A list of allowed location names represented by internal URLs. + // // Each location can be a region or a zone. // Only one region or multiple zones in one region is supported now. // For example, // ["regions/us-central1"] allow VMs in any zones in region us-central1. // ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs // in zones us-central1-a and us-central1-c. + // // All locations end up in different regions would cause errors. // For example, // ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", @@ -241,25 +243,29 @@ message AllocationPolicy { // A new persistent disk or a local ssd. // A VM can only have one local SSD setting but multiple local SSD partitions. - // https://cloud.google.com/compute/docs/disks#pdspecs. + // See https://cloud.google.com/compute/docs/disks#pdspecs and // https://cloud.google.com/compute/docs/disks#localssds. message Disk { // A data source from which a PD will be created. oneof data_source { // Name of a public or custom image used as the data source. // For example, the following are all valid URLs: - // (1) Specify the image by its family name: + // + // * Specify the image by its family name: // projects/{project}/global/images/family/{image_family} - // (2) Specify the image version: + // * Specify the image version: // projects/{project}/global/images/{image_version} + // // You can also use Batch customized image in short names. // The following image values are supported for a boot disk: - // "batch-debian": use Batch Debian images. - // "batch-centos": use Batch CentOS images. - // "batch-cos": use Batch Container-Optimized images. + // + // * "batch-debian": use Batch Debian images. + // * "batch-centos": use Batch CentOS images. + // * "batch-cos": use Batch Container-Optimized images. string image = 4; // Name of a snapshot used as the data source. + // Snapshot is not supported as boot disk now. string snapshot = 5; } @@ -270,6 +276,7 @@ message AllocationPolicy { string type = 1; // Disk size in GB. + // // For persistent disk, this field is ignored if `data_source` is `image` or // `snapshot`. // For local SSD, size_gb should be a multiple of 375GB, @@ -324,7 +331,7 @@ message AllocationPolicy { // The minimum CPU platform. // See - // `https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform`. + // https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. // Not yet implemented. string min_cpu_platform = 3; @@ -334,8 +341,9 @@ message AllocationPolicy { // The accelerators attached to each VM instance. repeated Accelerator accelerators = 5; - // Book disk to be created and attached to each VM by this InstancePolicy. + // Boot disk to be created and attached to each VM by this InstancePolicy. // Boot disk will be deleted when the VM is deleted. + // Batch API now only supports booting from image. Disk boot_disk = 8; // Non-boot disks to be attached for each VM created by this InstancePolicy. @@ -366,18 +374,22 @@ message AllocationPolicy { message NetworkInterface { // The URL of an existing network resource. // You can specify the network as a full or partial URL. + // // For example, the following are all valid URLs: - // https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} - // projects/{project}/global/networks/{network} - // global/networks/{network} + // + // * https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} + // * projects/{project}/global/networks/{network} + // * global/networks/{network} string network = 1; // The URL of an existing subnetwork resource in the network. // You can specify the subnetwork as a full or partial URL. + // // For example, the following are all valid URLs: - // https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork} - // projects/{project}/regions/{region}/subnetworks/{subnetwork} - // regions/{region}/subnetworks/{subnetwork} + // + // * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork} + // * projects/{project}/regions/{region}/subnetworks/{subnetwork} + // * regions/{region}/subnetworks/{subnetwork} string subnetwork = 2; // Default is false (with an external IP address). Required if @@ -396,6 +408,23 @@ message AllocationPolicy { repeated NetworkInterface network_interfaces = 1; } + // PlacementPolicy describes a group placement policy for the VMs controlled + // by this AllocationPolicy. + message PlacementPolicy { + // UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you + // want VMs to be located close to each other for low network latency + // between the VMs. No placement policy will be generated when collocation + // is UNSPECIFIED. + string collocation = 1; + + // When specified, causes the job to fail if more than max_distance logical + // switches are required between VMs. Batch uses the most compact possible + // placement of VMs even when max_distance is not specified. An explicit + // max_distance makes that level of compactness a strict requirement. + // Not yet implemented + int64 max_distance = 2; + } + // Compute Engine VM instance provisioning model. enum ProvisioningModel { // Unspecified. @@ -437,6 +466,9 @@ message AllocationPolicy { // The network policy. NetworkPolicy network = 7; + + // The placement policy. + PlacementPolicy placement = 10; } // A TaskGroup contains one or multiple Tasks that share the same @@ -457,11 +489,12 @@ message TaskGroup { TaskSpec task_spec = 3 [(google.api.field_behavior) = REQUIRED]; // Number of Tasks in the TaskGroup. - // default is 1 + // Default is 1. int64 task_count = 4; // Max number of tasks that can run in parallel. // Default to min(task_count, 1000). + // Field parallelism must be 1 if the scheduling_policy is IN_ORDER. int64 parallelism = 5; // An array of environment variable mappings, which are passed to Tasks with diff --git a/packages/google-cloud-batch/protos/google/cloud/batch/v1/task.proto b/packages/google-cloud-batch/protos/google/cloud/batch/v1/task.proto index 62e982976c5..b89ba09d0a1 100644 --- a/packages/google-cloud-batch/protos/google/cloud/batch/v1/task.proto +++ b/packages/google-cloud-batch/protos/google/cloud/batch/v1/task.proto @@ -72,7 +72,7 @@ message TaskExecution { message TaskStatus { // Task states. enum State { - // unknown state + // Unknown state. STATE_UNSPECIFIED = 0; // The Task is created and waiting for resources. @@ -89,6 +89,9 @@ message TaskStatus { // The Task has succeeded. SUCCEEDED = 5; + + // The Task has not been executed when the Job finishes. + UNEXECUTED = 6; } // Task state @@ -124,8 +127,9 @@ message Runnable { string options = 8; // If set to true, external network access to and from container will be - // blocked. The container will use the default internal network - // 'goog-internal'. + // blocked, containers that are with block_external_network as true can + // still communicate with each other, network cannot be specified in the + // `container.options` field. bool block_external_network = 9; // Optional username for logging in to a docker registry. If username @@ -208,6 +212,9 @@ message Runnable { // Timeout for this Runnable. google.protobuf.Duration timeout = 8; + + // Labels for this Runnable. + map labels = 9; } // Spec of a task diff --git a/packages/google-cloud-batch/protos/google/cloud/batch/v1alpha/batch.proto b/packages/google-cloud-batch/protos/google/cloud/batch/v1alpha/batch.proto index 33cccba15f2..c654d9c2596 100644 --- a/packages/google-cloud-batch/protos/google/cloud/batch/v1alpha/batch.proto +++ b/packages/google-cloud-batch/protos/google/cloud/batch/v1alpha/batch.proto @@ -177,6 +177,10 @@ message ListJobsRequest { // List filter. string filter = 4; + // Sort results. Supported are "name", "name desc", "create_time", + // "create_time desc", and "". + string order_by = 5; + // Page size. int32 page_size = 2; @@ -211,6 +215,10 @@ message ListTasksRequest { // State=RUNNING string filter = 2; + // Sort results. Supported are "name", "name desc", "create_time", + // "create_time desc", and "". + string order_by = 5; + // Page size. int32 page_size = 3; diff --git a/packages/google-cloud-batch/protos/google/cloud/batch/v1alpha/job.proto b/packages/google-cloud-batch/protos/google/cloud/batch/v1alpha/job.proto index 9dc6dc85fbe..c4a2201cfbc 100644 --- a/packages/google-cloud-batch/protos/google/cloud/batch/v1alpha/job.proto +++ b/packages/google-cloud-batch/protos/google/cloud/batch/v1alpha/job.proto @@ -284,12 +284,14 @@ message JobNotification { message AllocationPolicy { message LocationPolicy { // A list of allowed location names represented by internal URLs. + // // Each location can be a region or a zone. // Only one region or multiple zones in one region is supported now. // For example, // ["regions/us-central1"] allow VMs in any zones in region us-central1. // ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs // in zones us-central1-a and us-central1-c. + // // All locations end up in different regions would cause errors. // For example, // ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", @@ -305,25 +307,29 @@ message AllocationPolicy { // A new persistent disk or a local ssd. // A VM can only have one local SSD setting but multiple local SSD partitions. - // https://cloud.google.com/compute/docs/disks#pdspecs. + // See https://cloud.google.com/compute/docs/disks#pdspecs and // https://cloud.google.com/compute/docs/disks#localssds. message Disk { // A data source from which a PD will be created. oneof data_source { // Name of a public or custom image used as the data source. // For example, the following are all valid URLs: - // (1) Specify the image by its family name: + // + // * Specify the image by its family name: // projects/{project}/global/images/family/{image_family} - // (2) Specify the image version: + // * Specify the image version: // projects/{project}/global/images/{image_version} + // // You can also use Batch customized image in short names. // The following image values are supported for a boot disk: - // "batch-debian": use Batch Debian images. - // "batch-centos": use Batch CentOS images. - // "batch-cos": use Batch Container-Optimized images. + // + // * "batch-debian": use Batch Debian images. + // * "batch-centos": use Batch CentOS images. + // * "batch-cos": use Batch Container-Optimized images. string image = 4; // Name of a snapshot used as the data source. + // Snapshot is not supported as boot disk now. string snapshot = 5; } @@ -334,6 +340,7 @@ message AllocationPolicy { string type = 1; // Disk size in GB. + // // For persistent disk, this field is ignored if `data_source` is `image` or // `snapshot`. // For local SSD, size_gb should be a multiple of 375GB, @@ -391,7 +398,7 @@ message AllocationPolicy { // The minimum CPU platform. // See - // `https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform`. + // https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. // Not yet implemented. string min_cpu_platform = 3; @@ -401,15 +408,17 @@ message AllocationPolicy { // The accelerators attached to each VM instance. repeated Accelerator accelerators = 5; - // Book disk to be created and attached to each VM by this InstancePolicy. + // Boot disk to be created and attached to each VM by this InstancePolicy. // Boot disk will be deleted when the VM is deleted. + // Batch API now only supports booting from image. Disk boot_disk = 8; // Non-boot disks to be attached for each VM created by this InstancePolicy. // New disks will be deleted when the VM is deleted. repeated AttachedDisk disks = 6; - // If specified, VMs will be allocated only inside the matching reservation. + // If specified, VMs will consume only the specified reservation. + // If not specified (default), VMs will consume any applicable reservation. string reservation = 7; } @@ -436,18 +445,22 @@ message AllocationPolicy { message NetworkInterface { // The URL of an existing network resource. // You can specify the network as a full or partial URL. + // // For example, the following are all valid URLs: - // https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} - // projects/{project}/global/networks/{network} - // global/networks/{network} + // + // * https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} + // * projects/{project}/global/networks/{network} + // * global/networks/{network} string network = 1; // The URL of an existing subnetwork resource in the network. // You can specify the subnetwork as a full or partial URL. + // // For example, the following are all valid URLs: - // https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork} - // projects/{project}/regions/{region}/subnetworks/{subnetwork} - // regions/{region}/subnetworks/{subnetwork} + // + // * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork} + // * projects/{project}/regions/{region}/subnetworks/{subnetwork} + // * regions/{region}/subnetworks/{subnetwork} string subnetwork = 2; // Default is false (with an external IP address). Required if @@ -466,6 +479,23 @@ message AllocationPolicy { repeated NetworkInterface network_interfaces = 1; } + // PlacementPolicy describes a group placement policy for the VMs controlled + // by this AllocationPolicy. + message PlacementPolicy { + // UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you + // want VMs to be located close to each other for low network latency + // between the VMs. No placement policy will be generated when collocation + // is UNSPECIFIED. + string collocation = 1; + + // When specified, causes the job to fail if more than max_distance logical + // switches are required between VMs. Batch uses the most compact possible + // placement of VMs even when max_distance is not specified. An explicit + // max_distance makes that level of compactness a strict requirement. + // Not yet implemented + int64 max_distance = 2; + } + // Compute Engine VM instance provisioning model. enum ProvisioningModel { // Unspecified. @@ -519,6 +549,9 @@ message AllocationPolicy { // The network policy. NetworkPolicy network = 7; + + // The placement policy. + PlacementPolicy placement = 10; } // A TaskGroup contains one or multiple Tasks that share the same @@ -535,7 +568,15 @@ message TaskGroup { SCHEDULING_POLICY_UNSPECIFIED = 0; // Run Tasks as soon as resources are available. + // + // Tasks might be executed in parallel depending on parallelism and + // task_count values. AS_SOON_AS_POSSIBLE = 1; + + // Run Tasks sequentially with increased task index. + // + // Not yet implemented. + IN_ORDER = 2; } // Output only. TaskGroup name. @@ -548,14 +589,16 @@ message TaskGroup { TaskSpec task_spec = 3 [(google.api.field_behavior) = REQUIRED]; // Number of Tasks in the TaskGroup. - // default is 1 + // Default is 1. int64 task_count = 4; // Max number of tasks that can run in parallel. // Default to min(task_count, 1000). + // Field parallelism must be 1 if the scheduling_policy is IN_ORDER. int64 parallelism = 5; // Scheduling policy for Tasks in the TaskGroup. + // The default value is AS_SOON_AS_POSSIBLE. SchedulingPolicy scheduling_policy = 6; // Compute resource allocation for the TaskGroup. diff --git a/packages/google-cloud-batch/protos/google/cloud/batch/v1alpha/task.proto b/packages/google-cloud-batch/protos/google/cloud/batch/v1alpha/task.proto index b31bd9eda59..c7db752b26a 100644 --- a/packages/google-cloud-batch/protos/google/cloud/batch/v1alpha/task.proto +++ b/packages/google-cloud-batch/protos/google/cloud/batch/v1alpha/task.proto @@ -77,7 +77,7 @@ message TaskExecution { message TaskStatus { // Task states. enum State { - // unknown state + // Unknown state. STATE_UNSPECIFIED = 0; // The Task is created and waiting for resources. @@ -94,6 +94,9 @@ message TaskStatus { // The Task has succeeded. SUCCEEDED = 5; + + // The Task has not been executed when the Job finishes. + UNEXECUTED = 6; } // Task state @@ -139,8 +142,9 @@ message Runnable { string options = 8; // If set to true, external network access to and from container will be - // blocked. The container will use the default internal network - // 'goog-internal'. + // blocked, containers that are with block_external_network as true can + // still communicate with each other, network cannot be specified in the + // `container.options` field. bool block_external_network = 9; // Optional username for logging in to a docker registry. If username diff --git a/packages/google-cloud-batch/protos/protos.d.ts b/packages/google-cloud-batch/protos/protos.d.ts index d71a32d652a..4c91ccc8898 100644 --- a/packages/google-cloud-batch/protos/protos.d.ts +++ b/packages/google-cloud-batch/protos/protos.d.ts @@ -2031,6 +2031,9 @@ export namespace google { /** AllocationPolicy network */ network?: (google.cloud.batch.v1.AllocationPolicy.INetworkPolicy|null); + + /** AllocationPolicy placement */ + placement?: (google.cloud.batch.v1.AllocationPolicy.IPlacementPolicy|null); } /** Represents an AllocationPolicy. */ @@ -2057,6 +2060,9 @@ export namespace google { /** AllocationPolicy network. */ public network?: (google.cloud.batch.v1.AllocationPolicy.INetworkPolicy|null); + /** AllocationPolicy placement. */ + public placement?: (google.cloud.batch.v1.AllocationPolicy.IPlacementPolicy|null); + /** * Creates a new AllocationPolicy instance using the specified properties. * @param [properties] Properties to set @@ -3024,6 +3030,109 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a PlacementPolicy. */ + interface IPlacementPolicy { + + /** PlacementPolicy collocation */ + collocation?: (string|null); + + /** PlacementPolicy maxDistance */ + maxDistance?: (number|Long|string|null); + } + + /** Represents a PlacementPolicy. */ + class PlacementPolicy implements IPlacementPolicy { + + /** + * Constructs a new PlacementPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.batch.v1.AllocationPolicy.IPlacementPolicy); + + /** PlacementPolicy collocation. */ + public collocation: string; + + /** PlacementPolicy maxDistance. */ + public maxDistance: (number|Long|string); + + /** + * Creates a new PlacementPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns PlacementPolicy instance + */ + public static create(properties?: google.cloud.batch.v1.AllocationPolicy.IPlacementPolicy): google.cloud.batch.v1.AllocationPolicy.PlacementPolicy; + + /** + * Encodes the specified PlacementPolicy message. Does not implicitly {@link google.cloud.batch.v1.AllocationPolicy.PlacementPolicy.verify|verify} messages. + * @param message PlacementPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.batch.v1.AllocationPolicy.IPlacementPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PlacementPolicy message, length delimited. Does not implicitly {@link google.cloud.batch.v1.AllocationPolicy.PlacementPolicy.verify|verify} messages. + * @param message PlacementPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.batch.v1.AllocationPolicy.IPlacementPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PlacementPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PlacementPolicy + * @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.batch.v1.AllocationPolicy.PlacementPolicy; + + /** + * Decodes a PlacementPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PlacementPolicy + * @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.batch.v1.AllocationPolicy.PlacementPolicy; + + /** + * Verifies a PlacementPolicy 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 PlacementPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PlacementPolicy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.batch.v1.AllocationPolicy.PlacementPolicy; + + /** + * Creates a plain object from a PlacementPolicy message. Also converts values to other types if specified. + * @param message PlacementPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.batch.v1.AllocationPolicy.PlacementPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PlacementPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PlacementPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** ProvisioningModel enum. */ enum ProvisioningModel { PROVISIONING_MODEL_UNSPECIFIED = 0, @@ -3714,7 +3823,8 @@ export namespace google { ASSIGNED = 2, RUNNING = 3, FAILED = 4, - SUCCEEDED = 5 + SUCCEEDED = 5, + UNEXECUTED = 6 } } @@ -3744,6 +3854,9 @@ export namespace google { /** Runnable timeout */ timeout?: (google.protobuf.IDuration|null); + + /** Runnable labels */ + labels?: ({ [k: string]: string }|null); } /** Represents a Runnable. */ @@ -3779,6 +3892,9 @@ export namespace google { /** Runnable timeout. */ public timeout?: (google.protobuf.IDuration|null); + /** Runnable labels. */ + public labels: { [k: string]: string }; + /** Runnable executable. */ public executable?: ("container"|"script"|"barrier"); @@ -5680,6 +5796,9 @@ export namespace google { /** ListJobsRequest filter */ filter?: (string|null); + /** ListJobsRequest orderBy */ + orderBy?: (string|null); + /** ListJobsRequest pageSize */ pageSize?: (number|null); @@ -5702,6 +5821,9 @@ export namespace google { /** ListJobsRequest filter. */ public filter: string; + /** ListJobsRequest orderBy. */ + public orderBy: string; + /** ListJobsRequest pageSize. */ public pageSize: number; @@ -5904,6 +6026,9 @@ export namespace google { /** ListTasksRequest filter */ filter?: (string|null); + /** ListTasksRequest orderBy */ + orderBy?: (string|null); + /** ListTasksRequest pageSize */ pageSize?: (number|null); @@ -5926,6 +6051,9 @@ export namespace google { /** ListTasksRequest filter. */ public filter: string; + /** ListTasksRequest orderBy. */ + public orderBy: string; + /** ListTasksRequest pageSize. */ public pageSize: number; @@ -7455,6 +7583,9 @@ export namespace google { /** AllocationPolicy network */ network?: (google.cloud.batch.v1alpha.AllocationPolicy.INetworkPolicy|null); + + /** AllocationPolicy placement */ + placement?: (google.cloud.batch.v1alpha.AllocationPolicy.IPlacementPolicy|null); } /** Represents an AllocationPolicy. */ @@ -7493,6 +7624,9 @@ export namespace google { /** AllocationPolicy network. */ public network?: (google.cloud.batch.v1alpha.AllocationPolicy.INetworkPolicy|null); + /** AllocationPolicy placement. */ + public placement?: (google.cloud.batch.v1alpha.AllocationPolicy.IPlacementPolicy|null); + /** * Creates a new AllocationPolicy instance using the specified properties. * @param [properties] Properties to set @@ -8478,6 +8612,109 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a PlacementPolicy. */ + interface IPlacementPolicy { + + /** PlacementPolicy collocation */ + collocation?: (string|null); + + /** PlacementPolicy maxDistance */ + maxDistance?: (number|Long|string|null); + } + + /** Represents a PlacementPolicy. */ + class PlacementPolicy implements IPlacementPolicy { + + /** + * Constructs a new PlacementPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.batch.v1alpha.AllocationPolicy.IPlacementPolicy); + + /** PlacementPolicy collocation. */ + public collocation: string; + + /** PlacementPolicy maxDistance. */ + public maxDistance: (number|Long|string); + + /** + * Creates a new PlacementPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns PlacementPolicy instance + */ + public static create(properties?: google.cloud.batch.v1alpha.AllocationPolicy.IPlacementPolicy): google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy; + + /** + * Encodes the specified PlacementPolicy message. Does not implicitly {@link google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy.verify|verify} messages. + * @param message PlacementPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.batch.v1alpha.AllocationPolicy.IPlacementPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PlacementPolicy message, length delimited. Does not implicitly {@link google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy.verify|verify} messages. + * @param message PlacementPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.batch.v1alpha.AllocationPolicy.IPlacementPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PlacementPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PlacementPolicy + * @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.batch.v1alpha.AllocationPolicy.PlacementPolicy; + + /** + * Decodes a PlacementPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PlacementPolicy + * @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.batch.v1alpha.AllocationPolicy.PlacementPolicy; + + /** + * Verifies a PlacementPolicy 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 PlacementPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PlacementPolicy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy; + + /** + * Creates a plain object from a PlacementPolicy message. Also converts values to other types if specified. + * @param message PlacementPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PlacementPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PlacementPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** ProvisioningModel enum. */ enum ProvisioningModel { PROVISIONING_MODEL_UNSPECIFIED = 0, @@ -8649,7 +8886,8 @@ export namespace google { /** SchedulingPolicy enum. */ enum SchedulingPolicy { SCHEDULING_POLICY_UNSPECIFIED = 0, - AS_SOON_AS_POSSIBLE = 1 + AS_SOON_AS_POSSIBLE = 1, + IN_ORDER = 2 } } @@ -9207,7 +9445,8 @@ export namespace google { ASSIGNED = 2, RUNNING = 3, FAILED = 4, - SUCCEEDED = 5 + SUCCEEDED = 5, + UNEXECUTED = 6 } } diff --git a/packages/google-cloud-batch/protos/protos.js b/packages/google-cloud-batch/protos/protos.js index b47b7031c1c..057cb5df633 100644 --- a/packages/google-cloud-batch/protos/protos.js +++ b/packages/google-cloud-batch/protos/protos.js @@ -4974,6 +4974,7 @@ case 3: case 4: case 5: + case 6: break; } return null; @@ -5078,6 +5079,10 @@ case 5: message.newTaskState = 5; break; + case "UNEXECUTED": + case 6: + message.newTaskState = 6; + break; } return message; }; @@ -5168,6 +5173,7 @@ * @property {google.cloud.batch.v1.IServiceAccount|null} [serviceAccount] AllocationPolicy serviceAccount * @property {Object.|null} [labels] AllocationPolicy labels * @property {google.cloud.batch.v1.AllocationPolicy.INetworkPolicy|null} [network] AllocationPolicy network + * @property {google.cloud.batch.v1.AllocationPolicy.IPlacementPolicy|null} [placement] AllocationPolicy placement */ /** @@ -5227,6 +5233,14 @@ */ AllocationPolicy.prototype.network = null; + /** + * AllocationPolicy placement. + * @member {google.cloud.batch.v1.AllocationPolicy.IPlacementPolicy|null|undefined} placement + * @memberof google.cloud.batch.v1.AllocationPolicy + * @instance + */ + AllocationPolicy.prototype.placement = null; + /** * Creates a new AllocationPolicy instance using the specified properties. * @function create @@ -5263,6 +5277,8 @@ $root.google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate.encode(message.instances[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) $root.google.cloud.batch.v1.ServiceAccount.encode(message.serviceAccount, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.placement != null && Object.hasOwnProperty.call(message, "placement")) + $root.google.cloud.batch.v1.AllocationPolicy.PlacementPolicy.encode(message.placement, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; @@ -5338,6 +5354,10 @@ message.network = $root.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy.decode(reader, reader.uint32()); break; } + case 10: { + message.placement = $root.google.cloud.batch.v1.AllocationPolicy.PlacementPolicy.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -5405,6 +5425,11 @@ if (error) return "network." + error; } + if (message.placement != null && message.hasOwnProperty("placement")) { + var error = $root.google.cloud.batch.v1.AllocationPolicy.PlacementPolicy.verify(message.placement); + if (error) + return "placement." + error; + } return null; }; @@ -5452,6 +5477,11 @@ throw TypeError(".google.cloud.batch.v1.AllocationPolicy.network: object expected"); message.network = $root.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy.fromObject(object.network); } + if (object.placement != null) { + if (typeof object.placement !== "object") + throw TypeError(".google.cloud.batch.v1.AllocationPolicy.placement: object expected"); + message.placement = $root.google.cloud.batch.v1.AllocationPolicy.PlacementPolicy.fromObject(object.placement); + } return message; }; @@ -5476,6 +5506,7 @@ object.location = null; object.network = null; object.serviceAccount = null; + object.placement = null; } if (message.location != null && message.hasOwnProperty("location")) object.location = $root.google.cloud.batch.v1.AllocationPolicy.LocationPolicy.toObject(message.location, options); @@ -5494,6 +5525,8 @@ } if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) object.serviceAccount = $root.google.cloud.batch.v1.ServiceAccount.toObject(message.serviceAccount, options); + if (message.placement != null && message.hasOwnProperty("placement")) + object.placement = $root.google.cloud.batch.v1.AllocationPolicy.PlacementPolicy.toObject(message.placement, options); return object; }; @@ -7772,6 +7805,247 @@ return NetworkPolicy; })(); + AllocationPolicy.PlacementPolicy = (function() { + + /** + * Properties of a PlacementPolicy. + * @memberof google.cloud.batch.v1.AllocationPolicy + * @interface IPlacementPolicy + * @property {string|null} [collocation] PlacementPolicy collocation + * @property {number|Long|null} [maxDistance] PlacementPolicy maxDistance + */ + + /** + * Constructs a new PlacementPolicy. + * @memberof google.cloud.batch.v1.AllocationPolicy + * @classdesc Represents a PlacementPolicy. + * @implements IPlacementPolicy + * @constructor + * @param {google.cloud.batch.v1.AllocationPolicy.IPlacementPolicy=} [properties] Properties to set + */ + function PlacementPolicy(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]]; + } + + /** + * PlacementPolicy collocation. + * @member {string} collocation + * @memberof google.cloud.batch.v1.AllocationPolicy.PlacementPolicy + * @instance + */ + PlacementPolicy.prototype.collocation = ""; + + /** + * PlacementPolicy maxDistance. + * @member {number|Long} maxDistance + * @memberof google.cloud.batch.v1.AllocationPolicy.PlacementPolicy + * @instance + */ + PlacementPolicy.prototype.maxDistance = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new PlacementPolicy instance using the specified properties. + * @function create + * @memberof google.cloud.batch.v1.AllocationPolicy.PlacementPolicy + * @static + * @param {google.cloud.batch.v1.AllocationPolicy.IPlacementPolicy=} [properties] Properties to set + * @returns {google.cloud.batch.v1.AllocationPolicy.PlacementPolicy} PlacementPolicy instance + */ + PlacementPolicy.create = function create(properties) { + return new PlacementPolicy(properties); + }; + + /** + * Encodes the specified PlacementPolicy message. Does not implicitly {@link google.cloud.batch.v1.AllocationPolicy.PlacementPolicy.verify|verify} messages. + * @function encode + * @memberof google.cloud.batch.v1.AllocationPolicy.PlacementPolicy + * @static + * @param {google.cloud.batch.v1.AllocationPolicy.IPlacementPolicy} message PlacementPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlacementPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.collocation != null && Object.hasOwnProperty.call(message, "collocation")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.collocation); + if (message.maxDistance != null && Object.hasOwnProperty.call(message, "maxDistance")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.maxDistance); + return writer; + }; + + /** + * Encodes the specified PlacementPolicy message, length delimited. Does not implicitly {@link google.cloud.batch.v1.AllocationPolicy.PlacementPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.batch.v1.AllocationPolicy.PlacementPolicy + * @static + * @param {google.cloud.batch.v1.AllocationPolicy.IPlacementPolicy} message PlacementPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlacementPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PlacementPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.batch.v1.AllocationPolicy.PlacementPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.batch.v1.AllocationPolicy.PlacementPolicy} PlacementPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlacementPolicy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.batch.v1.AllocationPolicy.PlacementPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.collocation = reader.string(); + break; + } + case 2: { + message.maxDistance = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PlacementPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.batch.v1.AllocationPolicy.PlacementPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.batch.v1.AllocationPolicy.PlacementPolicy} PlacementPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlacementPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PlacementPolicy message. + * @function verify + * @memberof google.cloud.batch.v1.AllocationPolicy.PlacementPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PlacementPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.collocation != null && message.hasOwnProperty("collocation")) + if (!$util.isString(message.collocation)) + return "collocation: string expected"; + if (message.maxDistance != null && message.hasOwnProperty("maxDistance")) + if (!$util.isInteger(message.maxDistance) && !(message.maxDistance && $util.isInteger(message.maxDistance.low) && $util.isInteger(message.maxDistance.high))) + return "maxDistance: integer|Long expected"; + return null; + }; + + /** + * Creates a PlacementPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.batch.v1.AllocationPolicy.PlacementPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.batch.v1.AllocationPolicy.PlacementPolicy} PlacementPolicy + */ + PlacementPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.batch.v1.AllocationPolicy.PlacementPolicy) + return object; + var message = new $root.google.cloud.batch.v1.AllocationPolicy.PlacementPolicy(); + if (object.collocation != null) + message.collocation = String(object.collocation); + if (object.maxDistance != null) + if ($util.Long) + (message.maxDistance = $util.Long.fromValue(object.maxDistance)).unsigned = false; + else if (typeof object.maxDistance === "string") + message.maxDistance = parseInt(object.maxDistance, 10); + else if (typeof object.maxDistance === "number") + message.maxDistance = object.maxDistance; + else if (typeof object.maxDistance === "object") + message.maxDistance = new $util.LongBits(object.maxDistance.low >>> 0, object.maxDistance.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a PlacementPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.batch.v1.AllocationPolicy.PlacementPolicy + * @static + * @param {google.cloud.batch.v1.AllocationPolicy.PlacementPolicy} message PlacementPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PlacementPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.collocation = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.maxDistance = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxDistance = options.longs === String ? "0" : 0; + } + if (message.collocation != null && message.hasOwnProperty("collocation")) + object.collocation = message.collocation; + if (message.maxDistance != null && message.hasOwnProperty("maxDistance")) + if (typeof message.maxDistance === "number") + object.maxDistance = options.longs === String ? String(message.maxDistance) : message.maxDistance; + else + object.maxDistance = options.longs === String ? $util.Long.prototype.toString.call(message.maxDistance) : options.longs === Number ? new $util.LongBits(message.maxDistance.low >>> 0, message.maxDistance.high >>> 0).toNumber() : message.maxDistance; + return object; + }; + + /** + * Converts this PlacementPolicy to JSON. + * @function toJSON + * @memberof google.cloud.batch.v1.AllocationPolicy.PlacementPolicy + * @instance + * @returns {Object.} JSON object + */ + PlacementPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PlacementPolicy + * @function getTypeUrl + * @memberof google.cloud.batch.v1.AllocationPolicy.PlacementPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PlacementPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.batch.v1.AllocationPolicy.PlacementPolicy"; + }; + + return PlacementPolicy; + })(); + /** * ProvisioningModel enum. * @name google.cloud.batch.v1.AllocationPolicy.ProvisioningModel @@ -8979,6 +9253,7 @@ case 3: case 4: case 5: + case 6: break; } return null; @@ -9041,6 +9316,10 @@ case 5: message.taskState = 5; break; + case "UNEXECUTED": + case 6: + message.taskState = 6; + break; } return message; }; @@ -9470,6 +9749,7 @@ case 3: case 4: case 5: + case 6: break; } if (message.statusEvents != null && message.hasOwnProperty("statusEvents")) { @@ -9527,6 +9807,10 @@ case 5: message.state = 5; break; + case "UNEXECUTED": + case 6: + message.state = 6; + break; } if (object.statusEvents) { if (!Array.isArray(object.statusEvents)) @@ -9604,6 +9888,7 @@ * @property {number} RUNNING=3 RUNNING value * @property {number} FAILED=4 FAILED value * @property {number} SUCCEEDED=5 SUCCEEDED value + * @property {number} UNEXECUTED=6 UNEXECUTED value */ TaskStatus.State = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -9613,6 +9898,7 @@ values[valuesById[3] = "RUNNING"] = 3; values[valuesById[4] = "FAILED"] = 4; values[valuesById[5] = "SUCCEEDED"] = 5; + values[valuesById[6] = "UNEXECUTED"] = 6; return values; })(); @@ -9633,6 +9919,7 @@ * @property {boolean|null} [alwaysRun] Runnable alwaysRun * @property {google.cloud.batch.v1.IEnvironment|null} [environment] Runnable environment * @property {google.protobuf.IDuration|null} [timeout] Runnable timeout + * @property {Object.|null} [labels] Runnable labels */ /** @@ -9644,6 +9931,7 @@ * @param {google.cloud.batch.v1.IRunnable=} [properties] Properties to set */ function Runnable(properties) { + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9714,6 +10002,14 @@ */ Runnable.prototype.timeout = null; + /** + * Runnable labels. + * @member {Object.} labels + * @memberof google.cloud.batch.v1.Runnable + * @instance + */ + Runnable.prototype.labels = $util.emptyObject; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -9768,6 +10064,9 @@ $root.google.cloud.batch.v1.Environment.encode(message.environment, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 9, wireType 2 =*/74).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); return writer; }; @@ -9798,7 +10097,7 @@ Runnable.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.batch.v1.Runnable(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.batch.v1.Runnable(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -9834,6 +10133,29 @@ message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } + case 9: { + if (message.labels === $util.emptyObject) + message.labels = {}; + 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.labels[key] = value; + break; + } default: reader.skipType(tag & 7); break; @@ -9917,6 +10239,14 @@ if (error) return "timeout." + error; } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } return null; }; @@ -9963,6 +10293,13 @@ throw TypeError(".google.cloud.batch.v1.Runnable.timeout: object expected"); message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.batch.v1.Runnable.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } return message; }; @@ -9979,6 +10316,8 @@ if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.labels = {}; if (options.defaults) { object.ignoreExitStatus = false; object.background = false; @@ -10011,6 +10350,12 @@ object.environment = $root.google.cloud.batch.v1.Environment.toObject(message.environment, options); if (message.timeout != null && message.hasOwnProperty("timeout")) object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } return object; }; @@ -14428,6 +14773,7 @@ * @interface IListJobsRequest * @property {string|null} [parent] ListJobsRequest parent * @property {string|null} [filter] ListJobsRequest filter + * @property {string|null} [orderBy] ListJobsRequest orderBy * @property {number|null} [pageSize] ListJobsRequest pageSize * @property {string|null} [pageToken] ListJobsRequest pageToken */ @@ -14463,6 +14809,14 @@ */ ListJobsRequest.prototype.filter = ""; + /** + * ListJobsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.batch.v1alpha.ListJobsRequest + * @instance + */ + ListJobsRequest.prototype.orderBy = ""; + /** * ListJobsRequest pageSize. * @member {number} pageSize @@ -14511,6 +14865,8 @@ writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; @@ -14553,6 +14909,10 @@ message.filter = reader.string(); break; } + case 5: { + message.orderBy = reader.string(); + break; + } case 2: { message.pageSize = reader.int32(); break; @@ -14602,6 +14962,9 @@ if (message.filter != null && message.hasOwnProperty("filter")) if (!$util.isString(message.filter)) return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; if (message.pageSize != null && message.hasOwnProperty("pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; @@ -14627,6 +14990,8 @@ message.parent = String(object.parent); if (object.filter != null) message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); if (object.pageSize != null) message.pageSize = object.pageSize | 0; if (object.pageToken != null) @@ -14652,6 +15017,7 @@ object.pageSize = 0; object.pageToken = ""; object.filter = ""; + object.orderBy = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; @@ -14661,6 +15027,8 @@ object.pageToken = message.pageToken; if (message.filter != null && message.hasOwnProperty("filter")) object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; return object; }; @@ -14989,6 +15357,7 @@ * @interface IListTasksRequest * @property {string|null} [parent] ListTasksRequest parent * @property {string|null} [filter] ListTasksRequest filter + * @property {string|null} [orderBy] ListTasksRequest orderBy * @property {number|null} [pageSize] ListTasksRequest pageSize * @property {string|null} [pageToken] ListTasksRequest pageToken */ @@ -15024,6 +15393,14 @@ */ ListTasksRequest.prototype.filter = ""; + /** + * ListTasksRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.batch.v1alpha.ListTasksRequest + * @instance + */ + ListTasksRequest.prototype.orderBy = ""; + /** * ListTasksRequest pageSize. * @member {number} pageSize @@ -15072,6 +15449,8 @@ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; @@ -15114,6 +15493,10 @@ message.filter = reader.string(); break; } + case 5: { + message.orderBy = reader.string(); + break; + } case 3: { message.pageSize = reader.int32(); break; @@ -15163,6 +15546,9 @@ if (message.filter != null && message.hasOwnProperty("filter")) if (!$util.isString(message.filter)) return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; if (message.pageSize != null && message.hasOwnProperty("pageSize")) if (!$util.isInteger(message.pageSize)) return "pageSize: integer expected"; @@ -15188,6 +15574,8 @@ message.parent = String(object.parent); if (object.filter != null) message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); if (object.pageSize != null) message.pageSize = object.pageSize | 0; if (object.pageToken != null) @@ -15213,6 +15601,7 @@ object.filter = ""; object.pageSize = 0; object.pageToken = ""; + object.orderBy = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; @@ -15222,6 +15611,8 @@ 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; }; @@ -19009,6 +19400,7 @@ case 3: case 4: case 5: + case 6: break; } return null; @@ -19113,6 +19505,10 @@ case 5: message.newTaskState = 5; break; + case "UNEXECUTED": + case 6: + message.newTaskState = 6; + break; } return message; }; @@ -19207,6 +19603,7 @@ * @property {google.cloud.batch.v1alpha.IServiceAccount|null} [serviceAccount] AllocationPolicy serviceAccount * @property {Object.|null} [labels] AllocationPolicy labels * @property {google.cloud.batch.v1alpha.AllocationPolicy.INetworkPolicy|null} [network] AllocationPolicy network + * @property {google.cloud.batch.v1alpha.AllocationPolicy.IPlacementPolicy|null} [placement] AllocationPolicy placement */ /** @@ -19300,6 +19697,14 @@ */ AllocationPolicy.prototype.network = null; + /** + * AllocationPolicy placement. + * @member {google.cloud.batch.v1alpha.AllocationPolicy.IPlacementPolicy|null|undefined} placement + * @memberof google.cloud.batch.v1alpha.AllocationPolicy + * @instance + */ + AllocationPolicy.prototype.placement = null; + /** * Creates a new AllocationPolicy instance using the specified properties. * @function create @@ -19349,6 +19754,8 @@ $root.google.cloud.batch.v1alpha.AllocationPolicy.InstancePolicyOrTemplate.encode(message.instances[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) $root.google.cloud.batch.v1alpha.ServiceAccount.encode(message.serviceAccount, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.placement != null && Object.hasOwnProperty.call(message, "placement")) + $root.google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy.encode(message.placement, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; @@ -19449,6 +19856,10 @@ message.network = $root.google.cloud.batch.v1alpha.AllocationPolicy.NetworkPolicy.decode(reader, reader.uint32()); break; } + case 10: { + message.placement = $root.google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -19545,6 +19956,11 @@ if (error) return "network." + error; } + if (message.placement != null && message.hasOwnProperty("placement")) { + var error = $root.google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy.verify(message.placement); + if (error) + return "placement." + error; + } return null; }; @@ -19635,6 +20051,11 @@ throw TypeError(".google.cloud.batch.v1alpha.AllocationPolicy.network: object expected"); message.network = $root.google.cloud.batch.v1alpha.AllocationPolicy.NetworkPolicy.fromObject(object.network); } + if (object.placement != null) { + if (typeof object.placement !== "object") + throw TypeError(".google.cloud.batch.v1alpha.AllocationPolicy.placement: object expected"); + message.placement = $root.google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy.fromObject(object.placement); + } return message; }; @@ -19664,6 +20085,7 @@ object.serviceAccountEmail = ""; object.network = null; object.serviceAccount = null; + object.placement = null; } if (message.location != null && message.hasOwnProperty("location")) object.location = $root.google.cloud.batch.v1alpha.AllocationPolicy.LocationPolicy.toObject(message.location, options); @@ -19696,6 +20118,8 @@ } if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) object.serviceAccount = $root.google.cloud.batch.v1alpha.ServiceAccount.toObject(message.serviceAccount, options); + if (message.placement != null && message.hasOwnProperty("placement")) + object.placement = $root.google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy.toObject(message.placement, options); return object; }; @@ -22076,6 +22500,247 @@ return NetworkPolicy; })(); + AllocationPolicy.PlacementPolicy = (function() { + + /** + * Properties of a PlacementPolicy. + * @memberof google.cloud.batch.v1alpha.AllocationPolicy + * @interface IPlacementPolicy + * @property {string|null} [collocation] PlacementPolicy collocation + * @property {number|Long|null} [maxDistance] PlacementPolicy maxDistance + */ + + /** + * Constructs a new PlacementPolicy. + * @memberof google.cloud.batch.v1alpha.AllocationPolicy + * @classdesc Represents a PlacementPolicy. + * @implements IPlacementPolicy + * @constructor + * @param {google.cloud.batch.v1alpha.AllocationPolicy.IPlacementPolicy=} [properties] Properties to set + */ + function PlacementPolicy(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]]; + } + + /** + * PlacementPolicy collocation. + * @member {string} collocation + * @memberof google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy + * @instance + */ + PlacementPolicy.prototype.collocation = ""; + + /** + * PlacementPolicy maxDistance. + * @member {number|Long} maxDistance + * @memberof google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy + * @instance + */ + PlacementPolicy.prototype.maxDistance = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new PlacementPolicy instance using the specified properties. + * @function create + * @memberof google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy + * @static + * @param {google.cloud.batch.v1alpha.AllocationPolicy.IPlacementPolicy=} [properties] Properties to set + * @returns {google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy} PlacementPolicy instance + */ + PlacementPolicy.create = function create(properties) { + return new PlacementPolicy(properties); + }; + + /** + * Encodes the specified PlacementPolicy message. Does not implicitly {@link google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy.verify|verify} messages. + * @function encode + * @memberof google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy + * @static + * @param {google.cloud.batch.v1alpha.AllocationPolicy.IPlacementPolicy} message PlacementPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlacementPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.collocation != null && Object.hasOwnProperty.call(message, "collocation")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.collocation); + if (message.maxDistance != null && Object.hasOwnProperty.call(message, "maxDistance")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.maxDistance); + return writer; + }; + + /** + * Encodes the specified PlacementPolicy message, length delimited. Does not implicitly {@link google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy + * @static + * @param {google.cloud.batch.v1alpha.AllocationPolicy.IPlacementPolicy} message PlacementPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlacementPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PlacementPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy} PlacementPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlacementPolicy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.collocation = reader.string(); + break; + } + case 2: { + message.maxDistance = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PlacementPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy} PlacementPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlacementPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PlacementPolicy message. + * @function verify + * @memberof google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PlacementPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.collocation != null && message.hasOwnProperty("collocation")) + if (!$util.isString(message.collocation)) + return "collocation: string expected"; + if (message.maxDistance != null && message.hasOwnProperty("maxDistance")) + if (!$util.isInteger(message.maxDistance) && !(message.maxDistance && $util.isInteger(message.maxDistance.low) && $util.isInteger(message.maxDistance.high))) + return "maxDistance: integer|Long expected"; + return null; + }; + + /** + * Creates a PlacementPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy} PlacementPolicy + */ + PlacementPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy) + return object; + var message = new $root.google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy(); + if (object.collocation != null) + message.collocation = String(object.collocation); + if (object.maxDistance != null) + if ($util.Long) + (message.maxDistance = $util.Long.fromValue(object.maxDistance)).unsigned = false; + else if (typeof object.maxDistance === "string") + message.maxDistance = parseInt(object.maxDistance, 10); + else if (typeof object.maxDistance === "number") + message.maxDistance = object.maxDistance; + else if (typeof object.maxDistance === "object") + message.maxDistance = new $util.LongBits(object.maxDistance.low >>> 0, object.maxDistance.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a PlacementPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy + * @static + * @param {google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy} message PlacementPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PlacementPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.collocation = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.maxDistance = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxDistance = options.longs === String ? "0" : 0; + } + if (message.collocation != null && message.hasOwnProperty("collocation")) + object.collocation = message.collocation; + if (message.maxDistance != null && message.hasOwnProperty("maxDistance")) + if (typeof message.maxDistance === "number") + object.maxDistance = options.longs === String ? String(message.maxDistance) : message.maxDistance; + else + object.maxDistance = options.longs === String ? $util.Long.prototype.toString.call(message.maxDistance) : options.longs === Number ? new $util.LongBits(message.maxDistance.low >>> 0, message.maxDistance.high >>> 0).toNumber() : message.maxDistance; + return object; + }; + + /** + * Converts this PlacementPolicy to JSON. + * @function toJSON + * @memberof google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy + * @instance + * @returns {Object.} JSON object + */ + PlacementPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PlacementPolicy + * @function getTypeUrl + * @memberof google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PlacementPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.batch.v1alpha.AllocationPolicy.PlacementPolicy"; + }; + + return PlacementPolicy; + })(); + /** * ProvisioningModel enum. * @name google.cloud.batch.v1alpha.AllocationPolicy.ProvisioningModel @@ -22423,6 +23088,7 @@ return "schedulingPolicy: enum value expected"; case 0: case 1: + case 2: break; } if (message.allocationPolicy != null && message.hasOwnProperty("allocationPolicy")) { @@ -22511,6 +23177,10 @@ case 1: message.schedulingPolicy = 1; break; + case "IN_ORDER": + case 2: + message.schedulingPolicy = 2; + break; } if (object.allocationPolicy != null) { if (typeof object.allocationPolicy !== "object") @@ -22663,11 +23333,13 @@ * @enum {number} * @property {number} SCHEDULING_POLICY_UNSPECIFIED=0 SCHEDULING_POLICY_UNSPECIFIED value * @property {number} AS_SOON_AS_POSSIBLE=1 AS_SOON_AS_POSSIBLE value + * @property {number} IN_ORDER=2 IN_ORDER value */ TaskGroup.SchedulingPolicy = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "SCHEDULING_POLICY_UNSPECIFIED"] = 0; values[valuesById[1] = "AS_SOON_AS_POSSIBLE"] = 1; + values[valuesById[2] = "IN_ORDER"] = 2; return values; })(); @@ -23463,6 +24135,7 @@ case 3: case 4: case 5: + case 6: break; } return null; @@ -23525,6 +24198,10 @@ case 5: message.taskState = 5; break; + case "UNEXECUTED": + case 6: + message.taskState = 6; + break; } return message; }; @@ -23969,6 +24646,7 @@ case 3: case 4: case 5: + case 6: break; } if (message.statusEvents != null && message.hasOwnProperty("statusEvents")) { @@ -24031,6 +24709,10 @@ case 5: message.state = 5; break; + case "UNEXECUTED": + case 6: + message.state = 6; + break; } if (object.statusEvents) { if (!Array.isArray(object.statusEvents)) @@ -24117,6 +24799,7 @@ * @property {number} RUNNING=3 RUNNING value * @property {number} FAILED=4 FAILED value * @property {number} SUCCEEDED=5 SUCCEEDED value + * @property {number} UNEXECUTED=6 UNEXECUTED value */ TaskStatus.State = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -24126,6 +24809,7 @@ values[valuesById[3] = "RUNNING"] = 3; values[valuesById[4] = "FAILED"] = 4; values[valuesById[5] = "SUCCEEDED"] = 5; + values[valuesById[6] = "UNEXECUTED"] = 6; return values; })(); diff --git a/packages/google-cloud-batch/protos/protos.json b/packages/google-cloud-batch/protos/protos.json index 14e79ce555f..986b1da644a 100644 --- a/packages/google-cloud-batch/protos/protos.json +++ b/packages/google-cloud-batch/protos/protos.json @@ -576,6 +576,10 @@ "network": { "type": "NetworkPolicy", "id": 7 + }, + "placement": { + "type": "PlacementPolicy", + "id": 10 } }, "nested": { @@ -742,6 +746,18 @@ } } }, + "PlacementPolicy": { + "fields": { + "collocation": { + "type": "string", + "id": 1 + }, + "maxDistance": { + "type": "int64", + "id": 2 + } + } + }, "ProvisioningModel": { "values": { "PROVISIONING_MODEL_UNSPECIFIED": 0, @@ -880,7 +896,8 @@ "ASSIGNED": 2, "RUNNING": 3, "FAILED": 4, - "SUCCEEDED": 5 + "SUCCEEDED": 5, + "UNEXECUTED": 6 } } } @@ -927,6 +944,11 @@ "timeout": { "type": "google.protobuf.Duration", "id": 8 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 9 } }, "nested": { @@ -1387,6 +1409,10 @@ "type": "string", "id": 4 }, + "orderBy": { + "type": "string", + "id": 5 + }, "pageSize": { "type": "int32", "id": 2 @@ -1429,6 +1455,10 @@ "type": "string", "id": 2 }, + "orderBy": { + "type": "string", + "id": 5 + }, "pageSize": { "type": "int32", "id": 3 @@ -1830,6 +1860,10 @@ "network": { "type": "NetworkPolicy", "id": 7 + }, + "placement": { + "type": "PlacementPolicy", + "id": 10 } }, "nested": { @@ -2013,6 +2047,18 @@ } } }, + "PlacementPolicy": { + "fields": { + "collocation": { + "type": "string", + "id": 1 + }, + "maxDistance": { + "type": "int64", + "id": 2 + } + } + }, "ProvisioningModel": { "values": { "PROVISIONING_MODEL_UNSPECIFIED": 0, @@ -2086,7 +2132,8 @@ "SchedulingPolicy": { "values": { "SCHEDULING_POLICY_UNSPECIFIED": 0, - "AS_SOON_AS_POSSIBLE": 1 + "AS_SOON_AS_POSSIBLE": 1, + "IN_ORDER": 2 } } } @@ -2180,7 +2227,8 @@ "ASSIGNED": 2, "RUNNING": 3, "FAILED": 4, - "SUCCEEDED": 5 + "SUCCEEDED": 5, + "UNEXECUTED": 6 } } } diff --git a/packages/google-cloud-batch/samples/README.md b/packages/google-cloud-batch/samples/README.md index 716d48a2d69..38d48ec3190 100644 --- a/packages/google-cloud-batch/samples/README.md +++ b/packages/google-cloud-batch/samples/README.md @@ -25,7 +25,6 @@ * [Batch_service.list_jobs](#batch_service.list_jobs) * [Batch_service.list_tasks](#batch_service.list_tasks) * [Quickstart](#quickstart) - * [Quickstart](#quickstart) ## Before you begin @@ -258,23 +257,6 @@ __Usage:__ `node packages/google-cloud-batch/samples/quickstart.js` ------ - - - - -### Quickstart - -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-batch/samples/test/quickstart.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-batch/samples/test/quickstart.js,samples/README.md) - -__Usage:__ - - -`node packages/google-cloud-batch/samples/test/quickstart.js` - - diff --git a/packages/google-cloud-batch/samples/generated/v1/snippet_metadata.google.cloud.batch.v1.json b/packages/google-cloud-batch/samples/generated/v1/snippet_metadata.google.cloud.batch.v1.json index f954cff303d..e54e6b7f46b 100644 --- a/packages/google-cloud-batch/samples/generated/v1/snippet_metadata.google.cloud.batch.v1.json +++ b/packages/google-cloud-batch/samples/generated/v1/snippet_metadata.google.cloud.batch.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-batch", - "version": "0.7.0", + "version": "0.8.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-batch/samples/generated/v1alpha/batch_service.list_jobs.js b/packages/google-cloud-batch/samples/generated/v1alpha/batch_service.list_jobs.js index b94896ae5ee..16709131898 100644 --- a/packages/google-cloud-batch/samples/generated/v1alpha/batch_service.list_jobs.js +++ b/packages/google-cloud-batch/samples/generated/v1alpha/batch_service.list_jobs.js @@ -36,6 +36,11 @@ function main() { * List filter. */ // const filter = 'abc123' + /** + * Sort results. Supported are "name", "name desc", "create_time", + * "create_time desc", and "". + */ + // const orderBy = 'abc123' /** * Page size. */ diff --git a/packages/google-cloud-batch/samples/generated/v1alpha/batch_service.list_tasks.js b/packages/google-cloud-batch/samples/generated/v1alpha/batch_service.list_tasks.js index efaa5a22b2d..c3268d24c57 100644 --- a/packages/google-cloud-batch/samples/generated/v1alpha/batch_service.list_tasks.js +++ b/packages/google-cloud-batch/samples/generated/v1alpha/batch_service.list_tasks.js @@ -40,6 +40,11 @@ function main(parent) { * State=RUNNING */ // const filter = 'abc123' + /** + * Sort results. Supported are "name", "name desc", "create_time", + * "create_time desc", and "". + */ + // const orderBy = 'abc123' /** * Page size. */ diff --git a/packages/google-cloud-batch/samples/generated/v1alpha/snippet_metadata.google.cloud.batch.v1alpha.json b/packages/google-cloud-batch/samples/generated/v1alpha/snippet_metadata.google.cloud.batch.v1alpha.json index 0d928f0bee9..a0b315e4095 100644 --- a/packages/google-cloud-batch/samples/generated/v1alpha/snippet_metadata.google.cloud.batch.v1alpha.json +++ b/packages/google-cloud-batch/samples/generated/v1alpha/snippet_metadata.google.cloud.batch.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-batch", - "version": "0.7.0", + "version": "0.8.0", "language": "TYPESCRIPT", "apis": [ { @@ -162,7 +162,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 71, "type": "FULL" } ], @@ -179,6 +179,10 @@ "name": "filter", "type": "TYPE_STRING" }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, { "name": "page_size", "type": "TYPE_INT32" @@ -254,7 +258,7 @@ "segments": [ { "start": 25, - "end": 71, + "end": 76, "type": "FULL" } ], @@ -271,6 +275,10 @@ "name": "filter", "type": "TYPE_STRING" }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, { "name": "page_size", "type": "TYPE_INT32" diff --git a/packages/google-cloud-batch/samples/package.json b/packages/google-cloud-batch/samples/package.json index 748c61c98af..d04631569fa 100644 --- a/packages/google-cloud-batch/samples/package.json +++ b/packages/google-cloud-batch/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/batch": "^0.7.1" + "@google-cloud/batch": "^0.8.0" }, "devDependencies": { "c8": "^7.1.0", diff --git a/packages/google-cloud-batch/src/v1alpha/batch_service_client.ts b/packages/google-cloud-batch/src/v1alpha/batch_service_client.ts index 98c9f553c5a..61203cb0b27 100644 --- a/packages/google-cloud-batch/src/v1alpha/batch_service_client.ts +++ b/packages/google-cloud-batch/src/v1alpha/batch_service_client.ts @@ -863,6 +863,9 @@ export class BatchServiceClient { * Parent path. * @param {string} request.filter * List filter. + * @param {string} request.orderBy + * Sort results. Supported are "name", "name desc", "create_time", + * "create_time desc", and "". * @param {number} request.pageSize * Page size. * @param {string} request.pageToken @@ -957,6 +960,9 @@ export class BatchServiceClient { * Parent path. * @param {string} request.filter * List filter. + * @param {string} request.orderBy + * Sort results. Supported are "name", "name desc", "create_time", + * "create_time desc", and "". * @param {number} request.pageSize * Page size. * @param {string} request.pageToken @@ -1005,6 +1011,9 @@ export class BatchServiceClient { * Parent path. * @param {string} request.filter * List filter. + * @param {string} request.orderBy + * Sort results. Supported are "name", "name desc", "create_time", + * "create_time desc", and "". * @param {number} request.pageSize * Page size. * @param {string} request.pageToken @@ -1056,6 +1065,9 @@ export class BatchServiceClient { * Task filter, null filter matches all Tasks. * Filter string should be of the format State=TaskStatus.State e.g. * State=RUNNING + * @param {string} request.orderBy + * Sort results. Supported are "name", "name desc", "create_time", + * "create_time desc", and "". * @param {number} request.pageSize * Page size. * @param {string} request.pageToken @@ -1154,6 +1166,9 @@ export class BatchServiceClient { * Task filter, null filter matches all Tasks. * Filter string should be of the format State=TaskStatus.State e.g. * State=RUNNING + * @param {string} request.orderBy + * Sort results. Supported are "name", "name desc", "create_time", + * "create_time desc", and "". * @param {number} request.pageSize * Page size. * @param {string} request.pageToken @@ -1206,6 +1221,9 @@ export class BatchServiceClient { * Task filter, null filter matches all Tasks. * Filter string should be of the format State=TaskStatus.State e.g. * State=RUNNING + * @param {string} request.orderBy + * Sort results. Supported are "name", "name desc", "create_time", + * "create_time desc", and "". * @param {number} request.pageSize * Page size. * @param {string} request.pageToken diff --git a/packages/google-cloud-beyondcorp-appconnections/package.json b/packages/google-cloud-beyondcorp-appconnections/package.json index 4b38b500f30..c68204d7eed 100644 --- a/packages/google-cloud-beyondcorp-appconnections/package.json +++ b/packages/google-cloud-beyondcorp-appconnections/package.json @@ -31,7 +31,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -39,10 +39,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -57,6 +58,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-beyondcorp-appconnectors/package.json b/packages/google-cloud-beyondcorp-appconnectors/package.json index 2f0c05a9cde..d60c6fdd6b0 100644 --- a/packages/google-cloud-beyondcorp-appconnectors/package.json +++ b/packages/google-cloud-beyondcorp-appconnectors/package.json @@ -31,7 +31,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -39,10 +39,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -57,6 +58,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-beyondcorp-appgateways/package.json b/packages/google-cloud-beyondcorp-appgateways/package.json index c592ac2e426..99b52b35931 100644 --- a/packages/google-cloud-beyondcorp-appgateways/package.json +++ b/packages/google-cloud-beyondcorp-appgateways/package.json @@ -31,7 +31,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -39,10 +39,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -57,6 +58,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/package.json b/packages/google-cloud-beyondcorp-clientconnectorservices/package.json index c02c8839073..23556681753 100644 --- a/packages/google-cloud-beyondcorp-clientconnectorservices/package.json +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/package.json @@ -1,13 +1,13 @@ { - "name": "@google-cloud/clientconnectorservices", + "name": "@google-cloud/clientgateways", "version": "0.3.2", "description": "BeyondCorp API client for Node.js", "repository": { "type": "git", "url": "https://github.com/googleapis/google-cloud-node.git", - "directory": "packages/google-cloud-beyondcorp-clientconnectorservices" + "directory": "packages/google-cloud-beyondcorp-clientgateways" }, - "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-beyondcorp-clientconnectorservices", + "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-beyondcorp-clientgateways", "license": "Apache-2.0", "author": "Google LLC", "main": "build/src/index.js", @@ -25,13 +25,13 @@ "google cloud platform", "google cloud", "cloud", - "google clientconnectorservices", - "clientconnectorservices", + "google clientgateways", + "clientgateways", "" ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -39,10 +39,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -57,6 +58,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/samples/test/quickstart.js b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/test/quickstart.js index 2fbf8528a01..c8c5ccf81fd 100644 --- a/packages/google-cloud-beyondcorp-clientconnectorservices/samples/test/quickstart.js +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/samples/test/quickstart.js @@ -1,3 +1,4 @@ +// Not running tests per b/278007126 // Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,33 +13,33 @@ // See the License for the specific language governing permissions and // limitations under the License. -'use strict'; +// 'use strict'; -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {ClientConnectorServicesServiceClient} = - require('@google-cloud/clientconnectorservices').v1; -const clientconnectorservicesClient = - new ClientConnectorServicesServiceClient(); +// const assert = require('assert'); +// const path = require('path'); +// const cp = require('child_process'); +// const {describe, it, before} = require('mocha'); +// const {ClientConnectorServicesServiceClient} = +// require('@google-cloud/clientconnectorservices').v1; +// const clientconnectorservicesClient = +// new ClientConnectorServicesServiceClient(); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); +// const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); +// const cwd = path.join(__dirname, '..'); -describe('Quickstart', () => { - let projectId; +// describe('Quickstart', () => { +// let projectId; - before(async () => { - projectId = await clientconnectorservicesClient.getProjectId(); - }); +// before(async () => { +// projectId = await clientconnectorservicesClient.getProjectId(); +// }); - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(output !== null); - }); -}); +// it('should run quickstart', async () => { +// const output = execSync( +// `node ./quickstart.js projects/${projectId}/locations/us-central1`, +// {cwd} +// ); +// assert(output !== null); +// }); +// }); diff --git a/packages/google-cloud-beyondcorp-clientconnectorservices/system-test/install.ts b/packages/google-cloud-beyondcorp-clientconnectorservices/system-test/install.ts index f61fe236476..5685847f956 100644 --- a/packages/google-cloud-beyondcorp-clientconnectorservices/system-test/install.ts +++ b/packages/google-cloud-beyondcorp-clientconnectorservices/system-test/install.ts @@ -1,51 +1,51 @@ -// Copyright 2023 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. ** +// // Copyright 2023 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 {packNTest} from 'pack-n-play'; -import {readFileSync} from 'fs'; -import {describe, it} from 'mocha'; +// import {packNTest} from 'pack-n-play'; +// import {readFileSync} from 'fs'; +// import {describe, it} from 'mocha'; -describe('📦 pack-n-play test', () => { - it('TypeScript code', async function () { - this.timeout(300000); - const options = { - packageDir: process.cwd(), - sample: { - description: 'TypeScript user can use the type definitions', - ts: readFileSync( - './system-test/fixtures/sample/src/index.ts' - ).toString(), - }, - }; - await packNTest(options); - }); +// describe('📦 pack-n-play test', () => { +// it('TypeScript code', async function () { +// this.timeout(300000); +// const options = { +// packageDir: process.cwd(), +// sample: { +// description: 'TypeScript user can use the type definitions', +// ts: readFileSync( +// './system-test/fixtures/sample/src/index.ts' +// ).toString(), +// }, +// }; +// await packNTest(options); +// }); - it('JavaScript code', async function () { - this.timeout(300000); - const options = { - packageDir: process.cwd(), - sample: { - description: 'JavaScript user can use the library', - ts: readFileSync( - './system-test/fixtures/sample/src/index.js' - ).toString(), - }, - }; - await packNTest(options); - }); -}); +// it('JavaScript code', async function () { +// this.timeout(300000); +// const options = { +// packageDir: process.cwd(), +// sample: { +// description: 'JavaScript user can use the library', +// ts: readFileSync( +// './system-test/fixtures/sample/src/index.js' +// ).toString(), +// }, +// }; +// await packNTest(options); +// }); +// }); diff --git a/packages/google-cloud-beyondcorp-clientgateways/package.json b/packages/google-cloud-beyondcorp-clientgateways/package.json index da82b2d763d..23556681753 100644 --- a/packages/google-cloud-beyondcorp-clientgateways/package.json +++ b/packages/google-cloud-beyondcorp-clientgateways/package.json @@ -31,7 +31,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -39,10 +39,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -57,6 +58,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-beyondcorp-clientgateways/samples/test/quickstart.js b/packages/google-cloud-beyondcorp-clientgateways/samples/test/quickstart.js index 31314f7a90f..0f679a45fe1 100644 --- a/packages/google-cloud-beyondcorp-clientgateways/samples/test/quickstart.js +++ b/packages/google-cloud-beyondcorp-clientgateways/samples/test/quickstart.js @@ -1,43 +1,44 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Not running tests per b/278007126 +// // Copyright 2022 Google LLC +// // +// // Licensed under the Apache License, Version 2.0 (the "License"); +// // you may not use this file except in compliance with the License. +// // You may obtain a copy of the License at +// // +// // https://www.apache.org/licenses/LICENSE-2.0 +// // +// // Unless required by applicable law or agreed to in writing, software +// // distributed under the License is distributed on an "AS IS" BASIS, +// // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// // See the License for the specific language governing permissions and +// // limitations under the License. -'use strict'; +// 'use strict'; -const assert = require('assert'); -const path = require('path'); -const cp = require('child_process'); -const {describe, it, before} = require('mocha'); -const {ClientGatewaysServiceClient} = - require('@google-cloud/clientgateways').v1; -const clientgatewaysClient = new ClientGatewaysServiceClient(); +// const assert = require('assert'); +// const path = require('path'); +// const cp = require('child_process'); +// const {describe, it, before} = require('mocha'); +// const {ClientGatewaysServiceClient} = +// require('@google-cloud/clientgateways').v1; +// const clientgatewaysClient = new ClientGatewaysServiceClient(); -const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); +// const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); +// const cwd = path.join(__dirname, '..'); -describe('Quickstart', () => { - let projectId; +// describe('Quickstart', () => { +// let projectId; - before(async () => { - projectId = await clientgatewaysClient.getProjectId(); - }); +// before(async () => { +// projectId = await clientgatewaysClient.getProjectId(); +// }); - it('should run quickstart', async () => { - const output = execSync( - `node ./quickstart.js projects/${projectId}/locations/us-central1`, - {cwd} - ); - assert(output !== null); - }); -}); +// it('should run quickstart', async () => { +// const output = execSync( +// `node ./quickstart.js projects/${projectId}/locations/us-central1`, +// {cwd} +// ); +// assert(output !== null); +// }); +// }); diff --git a/packages/google-cloud-beyondcorp-clientgateways/system-test/install.ts b/packages/google-cloud-beyondcorp-clientgateways/system-test/install.ts index f61fe236476..9c06e9f0bf7 100644 --- a/packages/google-cloud-beyondcorp-clientgateways/system-test/install.ts +++ b/packages/google-cloud-beyondcorp-clientgateways/system-test/install.ts @@ -1,51 +1,52 @@ -// Copyright 2023 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. ** +// Not running tests per b/278007126 +// // Copyright 2023 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 {packNTest} from 'pack-n-play'; -import {readFileSync} from 'fs'; -import {describe, it} from 'mocha'; +// import {packNTest} from 'pack-n-play'; +// import {readFileSync} from 'fs'; +// import {describe, it} from 'mocha'; -describe('📦 pack-n-play test', () => { - it('TypeScript code', async function () { - this.timeout(300000); - const options = { - packageDir: process.cwd(), - sample: { - description: 'TypeScript user can use the type definitions', - ts: readFileSync( - './system-test/fixtures/sample/src/index.ts' - ).toString(), - }, - }; - await packNTest(options); - }); +// describe('📦 pack-n-play test', () => { +// it('TypeScript code', async function () { +// this.timeout(300000); +// const options = { +// packageDir: process.cwd(), +// sample: { +// description: 'TypeScript user can use the type definitions', +// ts: readFileSync( +// './system-test/fixtures/sample/src/index.ts' +// ).toString(), +// }, +// }; +// await packNTest(options); +// }); - it('JavaScript code', async function () { - this.timeout(300000); - const options = { - packageDir: process.cwd(), - sample: { - description: 'JavaScript user can use the library', - ts: readFileSync( - './system-test/fixtures/sample/src/index.js' - ).toString(), - }, - }; - await packNTest(options); - }); -}); +// it('JavaScript code', async function () { +// this.timeout(300000); +// const options = { +// packageDir: process.cwd(), +// sample: { +// description: 'JavaScript user can use the library', +// ts: readFileSync( +// './system-test/fixtures/sample/src/index.js' +// ).toString(), +// }, +// }; +// await packNTest(options); +// }); +// }); diff --git a/packages/google-cloud-bigquery-analyticshub/package.json b/packages/google-cloud-bigquery-analyticshub/package.json index 6ae54828372..1dae78566b9 100644 --- a/packages/google-cloud-bigquery-analyticshub/package.json +++ b/packages/google-cloud-bigquery-analyticshub/package.json @@ -31,7 +31,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -39,10 +39,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -57,6 +58,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-bigquery-connection/package.json b/packages/google-cloud-bigquery-connection/package.json index 1e3698fe6dc..1ede36b0358 100644 --- a/packages/google-cloud-bigquery-connection/package.json +++ b/packages/google-cloud-bigquery-connection/package.json @@ -30,17 +30,18 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", "docs-test": "linkinator docs", "fix": "gts fix", - "prelint": "cd samples/; npm link ../; npm i", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", "test": "c8 mocha build/test" }, "dependencies": { @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-bigquery-connection" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-bigquery-dataexchange/package.json b/packages/google-cloud-bigquery-dataexchange/package.json index 655f392add4..2a57abdb87b 100644 --- a/packages/google-cloud-bigquery-dataexchange/package.json +++ b/packages/google-cloud-bigquery-dataexchange/package.json @@ -31,18 +31,19 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", "docs-test": "linkinator docs", "fix": "gts fix", "lint": "gts check", - "prelint": "cd samples; npm link ../; npm install", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -57,6 +58,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^10.0.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "engines": { "node": ">=v12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-bigquery-datapolicies/package.json b/packages/google-cloud-bigquery-datapolicies/package.json index 5cc694ff109..c0614f8f266 100644 --- a/packages/google-cloud-bigquery-datapolicies/package.json +++ b/packages/google-cloud-bigquery-datapolicies/package.json @@ -31,7 +31,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -39,10 +39,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -57,6 +58,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-bigquery-datatransfer/package.json b/packages/google-cloud-bigquery-datatransfer/package.json index 7c47786d45d..8681b0fba3b 100644 --- a/packages/google-cloud-bigquery-datatransfer/package.json +++ b/packages/google-cloud-bigquery-datatransfer/package.json @@ -33,20 +33,20 @@ "BigQuery Data Transfer API" ], "scripts": { - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "system-test": "npm run compile && c8 mocha build/system-test", - "docs": "jsdoc -c .jsdoc.js", - "lint": "gts check", - "fix": "gts fix", - "docs-test": "linkinator docs", - "predocs-test": "npm run docs", "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -61,6 +61,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -70,5 +71,4 @@ "webpack": "^5.0.0", "webpack-cli": "^5.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-bigquery-reservation/package.json b/packages/google-cloud-bigquery-reservation/package.json index 39eb1f1e6c8..e68f4a5e22e 100644 --- a/packages/google-cloud-bigquery-reservation/package.json +++ b/packages/google-cloud-bigquery-reservation/package.json @@ -31,17 +31,18 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", "docs-test": "linkinator docs", "fix": "gts fix", - "prelint": "cd samples; npm link ../; npm i", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "system-test": "npm run compile && c8 mocha build/system-test", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", "test": "c8 mocha build/test" }, "dependencies": { @@ -57,6 +58,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-billing-budgets/package.json b/packages/google-cloud-billing-budgets/package.json index 05a7d85860c..27a566760e8 100644 --- a/packages/google-cloud-billing-budgets/package.json +++ b/packages/google-cloud-billing-budgets/package.json @@ -24,28 +24,27 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "pack-n-play": "^1.0.0-2", "sinon": "^15.0.0", "typescript": "^4.6.4" }, "scripts": { - "predocs": "npm run compile", - "docs": "jsdoc -c .jsdoc.js", - "lint": "gts check", "clean": "gts clean", - "fix": "gts fix", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", - "prepare": "npm run compile-protos && npm run compile", - "pretest": "npm run compile", - "test": "c8 mocha build/test", - "system-test": "npm run compile && c8 mocha build/system-test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", + "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", "docs-test": "linkinator docs", - "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean" + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "license": "Apache-2.0", "engines": { @@ -55,5 +54,4 @@ "google-gax": "^3.5.8" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-billing-budgets" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-billing/package.json b/packages/google-cloud-billing/package.json index fb9553662de..e63e1cb20b7 100644 --- a/packages/google-cloud-billing/package.json +++ b/packages/google-cloud-billing/package.json @@ -17,19 +17,19 @@ "main": "build/src/index.js", "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", "docs-test": "linkinator docs", "fix": "gts fix", "lint": "gts check", - "prelint": "cd samples; npm link ../; npm install", - "predocs-test": "npm run docs", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "precompile": "gts clean" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -44,6 +44,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -57,5 +58,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-billing" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-binaryauthorization/package.json b/packages/google-cloud-binaryauthorization/package.json index b68a594bdc1..7401e0dfdb0 100644 --- a/packages/google-cloud-binaryauthorization/package.json +++ b/packages/google-cloud-binaryauthorization/package.json @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-binaryauthorization" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-certificatemanager/package.json b/packages/google-cloud-certificatemanager/package.json index 338e2ab5a1d..2b7db4bb14d 100644 --- a/packages/google-cloud-certificatemanager/package.json +++ b/packages/google-cloud-certificatemanager/package.json @@ -31,7 +31,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -39,11 +39,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -58,6 +58,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -70,5 +71,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-channel/CHANGELOG.md b/packages/google-cloud-channel/CHANGELOG.md index b4ca12fba69..cc436c2641f 100644 --- a/packages/google-cloud-channel/CHANGELOG.md +++ b/packages/google-cloud-channel/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [2.7.0](https://github.com/googleapis/google-cloud-node/compare/channel-v2.6.0...channel-v2.7.0) (2023-05-20) + + +### Features + +* [channel] added partition_keys field to filter results from FetchReportResults ([#4279](https://github.com/googleapis/google-cloud-node/issues/4279)) ([3defaa1](https://github.com/googleapis/google-cloud-node/commit/3defaa1caaa70a9384eddc0281645a9bf6c860cb)) + +## [2.6.0](https://github.com/googleapis/google-cloud-node/compare/channel-v2.5.1...channel-v2.6.0) (2023-05-09) + + +### Features + +* [channel] Add billing account to entitlement definitions for Cloud Channel API ([#4250](https://github.com/googleapis/google-cloud-node/issues/4250)) ([0d4c47e](https://github.com/googleapis/google-cloud-node/commit/0d4c47eb5d884e3cb760941e616e03769a1e8733)) + ## [2.5.1](https://github.com/googleapis/google-cloud-node/compare/channel-v2.5.0...channel-v2.5.1) (2023-04-13) diff --git a/packages/google-cloud-channel/README.md b/packages/google-cloud-channel/README.md index fb5e84c41aa..0cfc51added 100644 --- a/packages/google-cloud-channel/README.md +++ b/packages/google-cloud-channel/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Cloud Channel API: Node.js Client](https://github.com/googleapis/google-cloud-node) +# [Cloud Channel API: Node.js Client](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-channel) [![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/channel.svg)](https://www.npmjs.org/package/@google-cloud/channel) @@ -170,61 +170,60 @@ async function main(accountNumber, keys) { ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-channel/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Cloud_channel_reports_service.fetch_report_results | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_reports_service.fetch_report_results.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_reports_service.fetch_report_results.js,samples/README.md) | -| Cloud_channel_reports_service.list_reports | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_reports_service.list_reports.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_reports_service.list_reports.js,samples/README.md) | -| Cloud_channel_reports_service.run_report_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_reports_service.run_report_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_reports_service.run_report_job.js,samples/README.md) | -| Cloud_channel_service.activate_entitlement | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.activate_entitlement.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.activate_entitlement.js,samples/README.md) | -| Cloud_channel_service.cancel_entitlement | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.cancel_entitlement.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.cancel_entitlement.js,samples/README.md) | -| Cloud_channel_service.change_offer | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.change_offer.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.change_offer.js,samples/README.md) | -| Cloud_channel_service.change_parameters | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.change_parameters.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.change_parameters.js,samples/README.md) | -| Cloud_channel_service.change_renewal_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.change_renewal_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.change_renewal_settings.js,samples/README.md) | -| Cloud_channel_service.check_cloud_identity_accounts_exist | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.check_cloud_identity_accounts_exist.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.check_cloud_identity_accounts_exist.js,samples/README.md) | -| Cloud_channel_service.create_channel_partner_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.create_channel_partner_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.create_channel_partner_link.js,samples/README.md) | -| Cloud_channel_service.create_channel_partner_repricing_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.create_channel_partner_repricing_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.create_channel_partner_repricing_config.js,samples/README.md) | -| Cloud_channel_service.create_customer | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.create_customer.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.create_customer.js,samples/README.md) | -| Cloud_channel_service.create_customer_repricing_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.create_customer_repricing_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.create_customer_repricing_config.js,samples/README.md) | -| Cloud_channel_service.create_entitlement | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.create_entitlement.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.create_entitlement.js,samples/README.md) | -| Cloud_channel_service.delete_channel_partner_repricing_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.delete_channel_partner_repricing_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.delete_channel_partner_repricing_config.js,samples/README.md) | -| Cloud_channel_service.delete_customer | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.delete_customer.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.delete_customer.js,samples/README.md) | -| Cloud_channel_service.delete_customer_repricing_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.delete_customer_repricing_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.delete_customer_repricing_config.js,samples/README.md) | -| Cloud_channel_service.get_channel_partner_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.get_channel_partner_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.get_channel_partner_link.js,samples/README.md) | -| Cloud_channel_service.get_channel_partner_repricing_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.get_channel_partner_repricing_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.get_channel_partner_repricing_config.js,samples/README.md) | -| Cloud_channel_service.get_customer | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.get_customer.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.get_customer.js,samples/README.md) | -| Cloud_channel_service.get_customer_repricing_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.get_customer_repricing_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.get_customer_repricing_config.js,samples/README.md) | -| Cloud_channel_service.get_entitlement | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.get_entitlement.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.get_entitlement.js,samples/README.md) | -| Cloud_channel_service.import_customer | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.import_customer.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.import_customer.js,samples/README.md) | -| Cloud_channel_service.list_channel_partner_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_channel_partner_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_channel_partner_links.js,samples/README.md) | -| Cloud_channel_service.list_channel_partner_repricing_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_channel_partner_repricing_configs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_channel_partner_repricing_configs.js,samples/README.md) | -| Cloud_channel_service.list_customer_repricing_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_customer_repricing_configs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_customer_repricing_configs.js,samples/README.md) | -| Cloud_channel_service.list_customers | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_customers.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_customers.js,samples/README.md) | -| Cloud_channel_service.list_entitlement_changes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_entitlement_changes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_entitlement_changes.js,samples/README.md) | -| Cloud_channel_service.list_entitlements | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_entitlements.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_entitlements.js,samples/README.md) | -| Cloud_channel_service.list_offers | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_offers.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_offers.js,samples/README.md) | -| Cloud_channel_service.list_products | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_products.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_products.js,samples/README.md) | -| Cloud_channel_service.list_purchasable_offers | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_purchasable_offers.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_purchasable_offers.js,samples/README.md) | -| Cloud_channel_service.list_purchasable_skus | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_purchasable_skus.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_purchasable_skus.js,samples/README.md) | -| Cloud_channel_service.list_skus | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_skus.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_skus.js,samples/README.md) | -| Cloud_channel_service.list_subscribers | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_subscribers.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_subscribers.js,samples/README.md) | -| Cloud_channel_service.list_transferable_offers | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_transferable_offers.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_transferable_offers.js,samples/README.md) | -| Cloud_channel_service.list_transferable_skus | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_transferable_skus.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_transferable_skus.js,samples/README.md) | -| Cloud_channel_service.lookup_offer | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.lookup_offer.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.lookup_offer.js,samples/README.md) | -| Cloud_channel_service.provision_cloud_identity | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.provision_cloud_identity.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.provision_cloud_identity.js,samples/README.md) | -| Cloud_channel_service.register_subscriber | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.register_subscriber.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.register_subscriber.js,samples/README.md) | -| Cloud_channel_service.start_paid_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.start_paid_service.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.start_paid_service.js,samples/README.md) | -| Cloud_channel_service.suspend_entitlement | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.suspend_entitlement.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.suspend_entitlement.js,samples/README.md) | -| Cloud_channel_service.transfer_entitlements | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.transfer_entitlements.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.transfer_entitlements.js,samples/README.md) | -| Cloud_channel_service.transfer_entitlements_to_google | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.transfer_entitlements_to_google.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.transfer_entitlements_to_google.js,samples/README.md) | -| Cloud_channel_service.unregister_subscriber | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.unregister_subscriber.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.unregister_subscriber.js,samples/README.md) | -| Cloud_channel_service.update_channel_partner_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.update_channel_partner_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.update_channel_partner_link.js,samples/README.md) | -| Cloud_channel_service.update_channel_partner_repricing_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.update_channel_partner_repricing_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.update_channel_partner_repricing_config.js,samples/README.md) | -| Cloud_channel_service.update_customer | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.update_customer.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.update_customer.js,samples/README.md) | -| Cloud_channel_service.update_customer_repricing_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.update_customer_repricing_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.update_customer_repricing_config.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/quickstart.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/test/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/test/quickstart.js,samples/README.md) | +| Cloud_channel_reports_service.fetch_report_results | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_reports_service.fetch_report_results.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_reports_service.fetch_report_results.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_reports_service.list_reports | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_reports_service.list_reports.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_reports_service.list_reports.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_reports_service.run_report_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_reports_service.run_report_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_reports_service.run_report_job.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.activate_entitlement | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.activate_entitlement.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.activate_entitlement.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.cancel_entitlement | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.cancel_entitlement.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.cancel_entitlement.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.change_offer | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.change_offer.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.change_offer.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.change_parameters | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.change_parameters.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.change_parameters.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.change_renewal_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.change_renewal_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.change_renewal_settings.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.check_cloud_identity_accounts_exist | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.check_cloud_identity_accounts_exist.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.check_cloud_identity_accounts_exist.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.create_channel_partner_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.create_channel_partner_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.create_channel_partner_link.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.create_channel_partner_repricing_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.create_channel_partner_repricing_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.create_channel_partner_repricing_config.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.create_customer | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.create_customer.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.create_customer.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.create_customer_repricing_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.create_customer_repricing_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.create_customer_repricing_config.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.create_entitlement | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.create_entitlement.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.create_entitlement.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.delete_channel_partner_repricing_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.delete_channel_partner_repricing_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.delete_channel_partner_repricing_config.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.delete_customer | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.delete_customer.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.delete_customer.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.delete_customer_repricing_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.delete_customer_repricing_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.delete_customer_repricing_config.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.get_channel_partner_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.get_channel_partner_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.get_channel_partner_link.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.get_channel_partner_repricing_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.get_channel_partner_repricing_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.get_channel_partner_repricing_config.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.get_customer | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.get_customer.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.get_customer.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.get_customer_repricing_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.get_customer_repricing_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.get_customer_repricing_config.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.get_entitlement | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.get_entitlement.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.get_entitlement.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.import_customer | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.import_customer.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.import_customer.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.list_channel_partner_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_channel_partner_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_channel_partner_links.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.list_channel_partner_repricing_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_channel_partner_repricing_configs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_channel_partner_repricing_configs.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.list_customer_repricing_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_customer_repricing_configs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_customer_repricing_configs.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.list_customers | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_customers.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_customers.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.list_entitlement_changes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_entitlement_changes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_entitlement_changes.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.list_entitlements | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_entitlements.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_entitlements.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.list_offers | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_offers.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_offers.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.list_products | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_products.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_products.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.list_purchasable_offers | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_purchasable_offers.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_purchasable_offers.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.list_purchasable_skus | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_purchasable_skus.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_purchasable_skus.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.list_skus | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_skus.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_skus.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.list_subscribers | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_subscribers.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_subscribers.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.list_transferable_offers | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_transferable_offers.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_transferable_offers.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.list_transferable_skus | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_transferable_skus.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_transferable_skus.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.lookup_offer | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.lookup_offer.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.lookup_offer.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.provision_cloud_identity | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.provision_cloud_identity.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.provision_cloud_identity.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.register_subscriber | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.register_subscriber.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.register_subscriber.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.start_paid_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.start_paid_service.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.start_paid_service.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.suspend_entitlement | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.suspend_entitlement.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.suspend_entitlement.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.transfer_entitlements | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.transfer_entitlements.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.transfer_entitlements.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.transfer_entitlements_to_google | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.transfer_entitlements_to_google.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.transfer_entitlements_to_google.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.unregister_subscriber | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.unregister_subscriber.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.unregister_subscriber.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.update_channel_partner_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.update_channel_partner_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.update_channel_partner_link.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.update_channel_partner_repricing_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.update_channel_partner_repricing_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.update_channel_partner_repricing_config.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.update_customer | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.update_customer.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.update_customer.js,packages/google-cloud-channel/samples/README.md) | +| Cloud_channel_service.update_customer_repricing_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.update_customer_repricing_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.update_customer_repricing_config.js,packages/google-cloud-channel/samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/quickstart.js,packages/google-cloud-channel/samples/README.md) | diff --git a/packages/google-cloud-channel/package.json b/packages/google-cloud-channel/package.json index 13c98c057b4..a6fa2d30606 100644 --- a/packages/google-cloud-channel/package.json +++ b/packages/google-cloud-channel/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/channel", - "version": "2.5.1", + "version": "2.7.0", "description": "Channel client for Node.js", "repository": { "type": "git", @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-channel" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-channel/protos/google/cloud/channel/v1/channel_partner_links.proto b/packages/google-cloud-channel/protos/google/cloud/channel/v1/channel_partner_links.proto index 4791f03ae31..edc3ca05216 100644 --- a/packages/google-cloud-channel/protos/google/cloud/channel/v1/channel_partner_links.proto +++ b/packages/google-cloud-channel/protos/google/cloud/channel/v1/channel_partner_links.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-channel/protos/google/cloud/channel/v1/common.proto b/packages/google-cloud-channel/protos/google/cloud/channel/v1/common.proto index db6a983ed97..0f7a21e4c4b 100644 --- a/packages/google-cloud-channel/protos/google/cloud/channel/v1/common.proto +++ b/packages/google-cloud-channel/protos/google/cloud/channel/v1/common.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-channel/protos/google/cloud/channel/v1/customers.proto b/packages/google-cloud-channel/protos/google/cloud/channel/v1/customers.proto index 31f662a5216..02ad3f55e9b 100644 --- a/packages/google-cloud-channel/protos/google/cloud/channel/v1/customers.proto +++ b/packages/google-cloud-channel/protos/google/cloud/channel/v1/customers.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-channel/protos/google/cloud/channel/v1/entitlement_changes.proto b/packages/google-cloud-channel/protos/google/cloud/channel/v1/entitlement_changes.proto index 6710d549bf6..ef4f4da6036 100644 --- a/packages/google-cloud-channel/protos/google/cloud/channel/v1/entitlement_changes.proto +++ b/packages/google-cloud-channel/protos/google/cloud/channel/v1/entitlement_changes.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-channel/protos/google/cloud/channel/v1/entitlements.proto b/packages/google-cloud-channel/protos/google/cloud/channel/v1/entitlements.proto index 7bb1c11550b..82834312cee 100644 --- a/packages/google-cloud-channel/protos/google/cloud/channel/v1/entitlements.proto +++ b/packages/google-cloud-channel/protos/google/cloud/channel/v1/entitlements.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -138,11 +138,15 @@ message Entitlement { // // - assigned_units: The number of licenses assigned to users. // - // For GCP billing subaccounts, the following Parameter may be accepted as - // input: + // For Google Cloud billing subaccounts, the following Parameter may be + // accepted as input: // // - display_name: The display name of the billing subaccount. repeated Parameter parameters = 26; + + // Optional. The billing account resource name that is used to pay for this + // entitlement. + string billing_account = 28 [(google.api.field_behavior) = OPTIONAL]; } // Definition for extended entitlement parameters. @@ -170,8 +174,8 @@ message AssociationInfo { // Service provisioned for an entitlement. message ProvisionedService { // Output only. Provisioning ID of the entitlement. For Google Workspace, this - // is the underlying Subscription ID. For Google Cloud Platform, this is the - // Billing Account ID of the billing subaccount." + // is the underlying Subscription ID. For Google Cloud, this is the Billing + // Account ID of the billing subaccount." string provisioning_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The product pertaining to the provisioning resource as diff --git a/packages/google-cloud-channel/protos/google/cloud/channel/v1/offers.proto b/packages/google-cloud-channel/protos/google/cloud/channel/v1/offers.proto index 344c238e629..930925a5df9 100644 --- a/packages/google-cloud-channel/protos/google/cloud/channel/v1/offers.proto +++ b/packages/google-cloud-channel/protos/google/cloud/channel/v1/offers.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -98,14 +98,13 @@ enum ResourceType { // Voice usage. MINUTES = 5; - // For IaaS SKUs like Google Cloud Platform, monetization is based on usage - // accrued on your billing account irrespective of the type of monetizable - // resource. This enum represents an aggregated resource/container for all - // usage SKUs on a billing account. Currently, only applicable to Google Cloud - // Platform. + // For IaaS SKUs like Google Cloud, monetization is based on usage accrued on + // your billing account irrespective of the type of monetizable resource. This + // enum represents an aggregated resource/container for all usage SKUs on a + // billing account. Currently, only applicable to Google Cloud. IAAS_USAGE = 6; - // For Google Cloud Platform subscriptions like Anthos or SAP. + // For Google Cloud subscriptions like Anthos or SAP. SUBSCRIPTION = 7; } @@ -249,7 +248,7 @@ message Plan { Period trial_period = 4; // Reseller Billing account to charge after an offer transaction. - // Only present for Google Cloud Platform offers. + // Only present for Google Cloud offers. string billing_account = 5; } diff --git a/packages/google-cloud-channel/protos/google/cloud/channel/v1/operations.proto b/packages/google-cloud-channel/protos/google/cloud/channel/v1/operations.proto index 175333699f3..112a85319ae 100644 --- a/packages/google-cloud-channel/protos/google/cloud/channel/v1/operations.proto +++ b/packages/google-cloud-channel/protos/google/cloud/channel/v1/operations.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-channel/protos/google/cloud/channel/v1/products.proto b/packages/google-cloud-channel/protos/google/cloud/channel/v1/products.proto index 032aa9eebef..02b2199bf8e 100644 --- a/packages/google-cloud-channel/protos/google/cloud/channel/v1/products.proto +++ b/packages/google-cloud-channel/protos/google/cloud/channel/v1/products.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-channel/protos/google/cloud/channel/v1/reports_service.proto b/packages/google-cloud-channel/protos/google/cloud/channel/v1/reports_service.proto index cd373db219b..a5ee9a21d31 100644 --- a/packages/google-cloud-channel/protos/google/cloud/channel/v1/reports_service.proto +++ b/packages/google-cloud-channel/protos/google/cloud/channel/v1/reports_service.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -35,8 +35,7 @@ option java_package = "com.google.cloud.channel.v1"; // CloudChannelReportsService lets Google Cloud resellers and // distributors retrieve and combine a variety of data in Cloud Channel for -// multiple products (Google Cloud Platform (GCP), Google Voice, and -// Google Workspace.) +// multiple products (Google Cloud, Google Voice, and Google Workspace.) service CloudChannelReportsService { option (google.api.default_host) = "cloudchannel.googleapis.com"; option (google.api.oauth_scopes) = @@ -179,6 +178,10 @@ message FetchReportResultsRequest { // [CloudChannelReportsService.FetchReportResults][google.cloud.channel.v1.CloudChannelReportsService.FetchReportResults] // call. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. List of keys specifying which report partitions to return. + // If empty, returns all partitions. + repeated string partition_keys = 4 [(google.api.field_behavior) = OPTIONAL]; } // Response message for @@ -341,15 +344,14 @@ message DateRange { // The earliest invoice date (inclusive). // - // If your product uses monthly invoices, and this value is not the beginning - // of a month, this will adjust the date to the first day of the given month. + // If this value is not the first day of a month, this will move it back to + // the first day of the given month. google.type.Date invoice_start_date = 3; - // The latest invoice date (exclusive). + // The latest invoice date (inclusive). // - // If your product uses monthly invoices, and this value is not the beginning - // of a month, this will adjust the date to the first day of the following - // month. + // If this value is not the last day of a month, this will move it forward to + // the last day of the given month. google.type.Date invoice_end_date = 4; } @@ -357,6 +359,10 @@ message DateRange { message Row { // The list of values in the row. repeated ReportValue values = 1; + + // The key for the partition this row belongs to. This field is empty + // if the report is not partitioned. + string partition_key = 2; } // A single report value. @@ -417,7 +423,8 @@ message ReportStatus { } // The ID and description of a report that was used to generate report data. -// For example, "GCP Daily Spend", "Google Workspace License Activity", etc. +// For example, "Google Cloud Daily Spend", "Google Workspace License Activity", +// etc. message Report { option (google.api.resource) = { type: "cloudchannel.googleapis.com/Report" diff --git a/packages/google-cloud-channel/protos/google/cloud/channel/v1/repricing.proto b/packages/google-cloud-channel/protos/google/cloud/channel/v1/repricing.proto index d4a0bb33d9a..a88b1bc6619 100644 --- a/packages/google-cloud-channel/protos/google/cloud/channel/v1/repricing.proto +++ b/packages/google-cloud-channel/protos/google/cloud/channel/v1/repricing.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-channel/protos/google/cloud/channel/v1/service.proto b/packages/google-cloud-channel/protos/google/cloud/channel/v1/service.proto index 5036245334f..ec62a437832 100644 --- a/packages/google-cloud-channel/protos/google/cloud/channel/v1/service.proto +++ b/packages/google-cloud-channel/protos/google/cloud/channel/v1/service.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -875,7 +875,8 @@ service CloudChannelService { // [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] // resources. The data for each resource is displayed in the ascending order // of: - // * customer ID + // + // * Customer ID // * [RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement] // * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] // * [CustomerRepricingConfig.update_time][google.cloud.channel.v1.CustomerRepricingConfig.update_time] @@ -1049,7 +1050,8 @@ service CloudChannelService { // [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] // resources. The data for each resource is displayed in the ascending order // of: - // * channel partner ID + // + // * Channel Partner ID // * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] // * [ChannelPartnerRepricingConfig.update_time][google.cloud.channel.v1.ChannelPartnerRepricingConfig.update_time] // diff --git a/packages/google-cloud-channel/protos/google/cloud/channel/v1/subscriber_event.proto b/packages/google-cloud-channel/protos/google/cloud/channel/v1/subscriber_event.proto index cee8161b5f0..51e13c1f1a5 100644 --- a/packages/google-cloud-channel/protos/google/cloud/channel/v1/subscriber_event.proto +++ b/packages/google-cloud-channel/protos/google/cloud/channel/v1/subscriber_event.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-channel/protos/protos.d.ts b/packages/google-cloud-channel/protos/protos.d.ts index db0c3406610..65d67f415aa 100644 --- a/packages/google-cloud-channel/protos/protos.d.ts +++ b/packages/google-cloud-channel/protos/protos.d.ts @@ -1242,6 +1242,9 @@ export namespace google { /** Entitlement parameters */ parameters?: (google.cloud.channel.v1.IParameter[]|null); + + /** Entitlement billingAccount */ + billingAccount?: (string|null); } /** Represents an Entitlement. */ @@ -1289,6 +1292,9 @@ export namespace google { /** Entitlement parameters. */ public parameters: google.cloud.channel.v1.IParameter[]; + /** Entitlement billingAccount. */ + public billingAccount: string; + /** * Creates a new Entitlement instance using the specified properties. * @param [properties] Properties to set @@ -4344,6 +4350,9 @@ export namespace google { /** FetchReportResultsRequest pageToken */ pageToken?: (string|null); + + /** FetchReportResultsRequest partitionKeys */ + partitionKeys?: (string[]|null); } /** Represents a FetchReportResultsRequest. */ @@ -4364,6 +4373,9 @@ export namespace google { /** FetchReportResultsRequest pageToken. */ public pageToken: string; + /** FetchReportResultsRequest partitionKeys. */ + public partitionKeys: string[]; + /** * Creates a new FetchReportResultsRequest instance using the specified properties. * @param [properties] Properties to set @@ -5230,6 +5242,9 @@ export namespace google { /** Row values */ values?: (google.cloud.channel.v1.IReportValue[]|null); + + /** Row partitionKey */ + partitionKey?: (string|null); } /** Represents a Row. */ @@ -5244,6 +5259,9 @@ export namespace google { /** Row values. */ public values: google.cloud.channel.v1.IReportValue[]; + /** Row partitionKey. */ + public partitionKey: string; + /** * Creates a new Row instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-channel/protos/protos.js b/packages/google-cloud-channel/protos/protos.js index 1591ba3c186..1720f0346d8 100644 --- a/packages/google-cloud-channel/protos/protos.js +++ b/packages/google-cloud-channel/protos/protos.js @@ -3580,6 +3580,7 @@ * @property {google.cloud.channel.v1.ITrialSettings|null} [trialSettings] Entitlement trialSettings * @property {google.cloud.channel.v1.IAssociationInfo|null} [associationInfo] Entitlement associationInfo * @property {Array.|null} [parameters] Entitlement parameters + * @property {string|null} [billingAccount] Entitlement billingAccount */ /** @@ -3695,6 +3696,14 @@ */ Entitlement.prototype.parameters = $util.emptyArray; + /** + * Entitlement billingAccount. + * @member {string} billingAccount + * @memberof google.cloud.channel.v1.Entitlement + * @instance + */ + Entitlement.prototype.billingAccount = ""; + /** * Creates a new Entitlement instance using the specified properties. * @function create @@ -3748,6 +3757,8 @@ if (message.parameters != null && message.parameters.length) for (var i = 0; i < message.parameters.length; ++i) $root.google.cloud.channel.v1.Parameter.encode(message.parameters[i], writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.billingAccount != null && Object.hasOwnProperty.call(message, "billingAccount")) + writer.uint32(/* id 28, wireType 2 =*/226).string(message.billingAccount); return writer; }; @@ -3839,6 +3850,10 @@ message.parameters.push($root.google.cloud.channel.v1.Parameter.decode(reader, reader.uint32())); break; } + case 28: { + message.billingAccount = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -3947,6 +3962,9 @@ return "parameters." + error; } } + if (message.billingAccount != null && message.hasOwnProperty("billingAccount")) + if (!$util.isString(message.billingAccount)) + return "billingAccount: string expected"; return null; }; @@ -4065,6 +4083,8 @@ message.parameters[i] = $root.google.cloud.channel.v1.Parameter.fromObject(object.parameters[i]); } } + if (object.billingAccount != null) + message.billingAccount = String(object.billingAccount); return message; }; @@ -4096,6 +4116,7 @@ object.purchaseOrderId = ""; object.trialSettings = null; object.associationInfo = null; + object.billingAccount = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -4127,6 +4148,8 @@ for (var j = 0; j < message.parameters.length; ++j) object.parameters[j] = $root.google.cloud.channel.v1.Parameter.toObject(message.parameters[j], options); } + if (message.billingAccount != null && message.hasOwnProperty("billingAccount")) + object.billingAccount = message.billingAccount; return object; }; @@ -11674,6 +11697,7 @@ * @property {string|null} [reportJob] FetchReportResultsRequest reportJob * @property {number|null} [pageSize] FetchReportResultsRequest pageSize * @property {string|null} [pageToken] FetchReportResultsRequest pageToken + * @property {Array.|null} [partitionKeys] FetchReportResultsRequest partitionKeys */ /** @@ -11685,6 +11709,7 @@ * @param {google.cloud.channel.v1.IFetchReportResultsRequest=} [properties] Properties to set */ function FetchReportResultsRequest(properties) { + this.partitionKeys = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11715,6 +11740,14 @@ */ FetchReportResultsRequest.prototype.pageToken = ""; + /** + * FetchReportResultsRequest partitionKeys. + * @member {Array.} partitionKeys + * @memberof google.cloud.channel.v1.FetchReportResultsRequest + * @instance + */ + FetchReportResultsRequest.prototype.partitionKeys = $util.emptyArray; + /** * Creates a new FetchReportResultsRequest instance using the specified properties. * @function create @@ -11745,6 +11778,9 @@ 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.partitionKeys != null && message.partitionKeys.length) + for (var i = 0; i < message.partitionKeys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.partitionKeys[i]); return writer; }; @@ -11791,6 +11827,12 @@ message.pageToken = reader.string(); break; } + case 4: { + if (!(message.partitionKeys && message.partitionKeys.length)) + message.partitionKeys = []; + message.partitionKeys.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -11835,6 +11877,13 @@ if (message.pageToken != null && message.hasOwnProperty("pageToken")) if (!$util.isString(message.pageToken)) return "pageToken: string expected"; + if (message.partitionKeys != null && message.hasOwnProperty("partitionKeys")) { + if (!Array.isArray(message.partitionKeys)) + return "partitionKeys: array expected"; + for (var i = 0; i < message.partitionKeys.length; ++i) + if (!$util.isString(message.partitionKeys[i])) + return "partitionKeys: string[] expected"; + } return null; }; @@ -11856,6 +11905,13 @@ message.pageSize = object.pageSize | 0; if (object.pageToken != null) message.pageToken = String(object.pageToken); + if (object.partitionKeys) { + if (!Array.isArray(object.partitionKeys)) + throw TypeError(".google.cloud.channel.v1.FetchReportResultsRequest.partitionKeys: array expected"); + message.partitionKeys = []; + for (var i = 0; i < object.partitionKeys.length; ++i) + message.partitionKeys[i] = String(object.partitionKeys[i]); + } return message; }; @@ -11872,6 +11928,8 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.partitionKeys = []; if (options.defaults) { object.reportJob = ""; object.pageSize = 0; @@ -11883,6 +11941,11 @@ object.pageSize = message.pageSize; if (message.pageToken != null && message.hasOwnProperty("pageToken")) object.pageToken = message.pageToken; + if (message.partitionKeys && message.partitionKeys.length) { + object.partitionKeys = []; + for (var j = 0; j < message.partitionKeys.length; ++j) + object.partitionKeys[j] = message.partitionKeys[j]; + } return object; }; @@ -13865,6 +13928,7 @@ * @memberof google.cloud.channel.v1 * @interface IRow * @property {Array.|null} [values] Row values + * @property {string|null} [partitionKey] Row partitionKey */ /** @@ -13891,6 +13955,14 @@ */ Row.prototype.values = $util.emptyArray; + /** + * Row partitionKey. + * @member {string} partitionKey + * @memberof google.cloud.channel.v1.Row + * @instance + */ + Row.prototype.partitionKey = ""; + /** * Creates a new Row instance using the specified properties. * @function create @@ -13918,6 +13990,8 @@ if (message.values != null && message.values.length) for (var i = 0; i < message.values.length; ++i) $root.google.cloud.channel.v1.ReportValue.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.partitionKey != null && Object.hasOwnProperty.call(message, "partitionKey")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.partitionKey); return writer; }; @@ -13958,6 +14032,10 @@ message.values.push($root.google.cloud.channel.v1.ReportValue.decode(reader, reader.uint32())); break; } + case 2: { + message.partitionKey = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -14002,6 +14080,9 @@ return "values." + error; } } + if (message.partitionKey != null && message.hasOwnProperty("partitionKey")) + if (!$util.isString(message.partitionKey)) + return "partitionKey: string expected"; return null; }; @@ -14027,6 +14108,8 @@ message.values[i] = $root.google.cloud.channel.v1.ReportValue.fromObject(object.values[i]); } } + if (object.partitionKey != null) + message.partitionKey = String(object.partitionKey); return message; }; @@ -14045,11 +14128,15 @@ var object = {}; if (options.arrays || options.defaults) object.values = []; + if (options.defaults) + object.partitionKey = ""; if (message.values && message.values.length) { object.values = []; for (var j = 0; j < message.values.length; ++j) object.values[j] = $root.google.cloud.channel.v1.ReportValue.toObject(message.values[j], options); } + if (message.partitionKey != null && message.hasOwnProperty("partitionKey")) + object.partitionKey = message.partitionKey; return object; }; diff --git a/packages/google-cloud-channel/protos/protos.json b/packages/google-cloud-channel/protos/protos.json index 43a161ffd2e..aa58a34c4ad 100644 --- a/packages/google-cloud-channel/protos/protos.json +++ b/packages/google-cloud-channel/protos/protos.json @@ -561,6 +561,13 @@ "rule": "repeated", "type": "Parameter", "id": 26 + }, + "billingAccount": { + "type": "string", + "id": 28, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -1256,6 +1263,14 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "partitionKeys": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -1415,6 +1430,10 @@ "rule": "repeated", "type": "ReportValue", "id": 1 + }, + "partitionKey": { + "type": "string", + "id": 2 } } }, diff --git a/packages/google-cloud-channel/samples/README.md b/packages/google-cloud-channel/samples/README.md index c6733580ff9..3154027c436 100644 --- a/packages/google-cloud-channel/samples/README.md +++ b/packages/google-cloud-channel/samples/README.md @@ -62,7 +62,6 @@ * [Cloud_channel_service.update_customer](#cloud_channel_service.update_customer) * [Cloud_channel_service.update_customer_repricing_config](#cloud_channel_service.update_customer_repricing_config) * [Quickstart](#quickstart) - * [Quickstart](#quickstart) ## Before you begin @@ -924,23 +923,6 @@ __Usage:__ `node packages/google-cloud-channel/samples/quickstart.js` ------ - - - - -### Quickstart - -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/test/quickstart.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/test/quickstart.js,samples/README.md) - -__Usage:__ - - -`node packages/google-cloud-channel/samples/test/quickstart.js` - - diff --git a/packages/google-cloud-channel/samples/generated/v1/cloud_channel_reports_service.fetch_report_results.js b/packages/google-cloud-channel/samples/generated/v1/cloud_channel_reports_service.fetch_report_results.js index fbe9265417c..b952e2d7390 100644 --- a/packages/google-cloud-channel/samples/generated/v1/cloud_channel_reports_service.fetch_report_results.js +++ b/packages/google-cloud-channel/samples/generated/v1/cloud_channel_reports_service.fetch_report_results.js @@ -52,6 +52,11 @@ function main(reportJob) { * call. */ // const pageToken = 'abc123' + /** + * Optional. List of keys specifying which report partitions to return. + * If empty, returns all partitions. + */ + // const partitionKeys = 'abc123' // Imports the Channel library const {CloudChannelReportsServiceClient} = require('@google-cloud/channel').v1; diff --git a/packages/google-cloud-channel/samples/generated/v1/snippet_metadata.google.cloud.channel.v1.json b/packages/google-cloud-channel/samples/generated/v1/snippet_metadata.google.cloud.channel.v1.json index fa70647127c..bcd0e05d258 100644 --- a/packages/google-cloud-channel/samples/generated/v1/snippet_metadata.google.cloud.channel.v1.json +++ b/packages/google-cloud-channel/samples/generated/v1/snippet_metadata.google.cloud.channel.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-channel", - "version": "2.5.0", + "version": "2.7.0", "language": "TYPESCRIPT", "apis": [ { @@ -74,7 +74,7 @@ "segments": [ { "start": 25, - "end": 75, + "end": 80, "type": "FULL" } ], @@ -94,6 +94,10 @@ { "name": "page_token", "type": "TYPE_STRING" + }, + { + "name": "partition_keys", + "type": "TYPE_STRING[]" } ], "resultType": ".google.cloud.channel.v1.FetchReportResultsResponse", @@ -1471,7 +1475,7 @@ "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListCustomerRepricingConfigs_async", "title": "CloudChannelReportsService listCustomerRepricingConfigs Sample", "origin": "API_DEFINITION", - "description": " Lists information about how a Reseller modifies their bill before sending it to a Customer. Possible Error Codes: * PERMISSION_DENIED: If the account making the request and the account being queried are different. * NOT_FOUND: The [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] specified does not exist or is not associated with the given account. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support. Return Value: If successful, the [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] resources. The data for each resource is displayed in the ascending order of: * customer ID * [RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement] * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] * [CustomerRepricingConfig.update_time][google.cloud.channel.v1.CustomerRepricingConfig.update_time] If unsuccessful, returns an error.", + "description": " Lists information about how a Reseller modifies their bill before sending it to a Customer. Possible Error Codes: * PERMISSION_DENIED: If the account making the request and the account being queried are different. * NOT_FOUND: The [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] specified does not exist or is not associated with the given account. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support. Return Value: If successful, the [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] resources. The data for each resource is displayed in the ascending order of: * Customer ID * [RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement] * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] * [CustomerRepricingConfig.update_time][google.cloud.channel.v1.CustomerRepricingConfig.update_time] If unsuccessful, returns an error.", "canonical": true, "file": "cloud_channel_service.list_customer_repricing_configs.js", "language": "JAVASCRIPT", @@ -1687,7 +1691,7 @@ "regionTag": "cloudchannel_v1_generated_CloudChannelService_ListChannelPartnerRepricingConfigs_async", "title": "CloudChannelReportsService listChannelPartnerRepricingConfigs Sample", "origin": "API_DEFINITION", - "description": " Lists information about how a Reseller modifies their bill before sending it to a ChannelPartner. Possible Error Codes: * PERMISSION_DENIED: If the account making the request and the account being queried are different. * NOT_FOUND: The [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] specified does not exist or is not associated with the given account. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support. Return Value: If successful, the [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] resources. The data for each resource is displayed in the ascending order of: * channel partner ID * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] * [ChannelPartnerRepricingConfig.update_time][google.cloud.channel.v1.ChannelPartnerRepricingConfig.update_time] If unsuccessful, returns an error.", + "description": " Lists information about how a Reseller modifies their bill before sending it to a ChannelPartner. Possible Error Codes: * PERMISSION_DENIED: If the account making the request and the account being queried are different. * NOT_FOUND: The [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] specified does not exist or is not associated with the given account. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support. Return Value: If successful, the [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] resources. The data for each resource is displayed in the ascending order of: * Channel Partner ID * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month] * [ChannelPartnerRepricingConfig.update_time][google.cloud.channel.v1.ChannelPartnerRepricingConfig.update_time] If unsuccessful, returns an error.", "canonical": true, "file": "cloud_channel_service.list_channel_partner_repricing_configs.js", "language": "JAVASCRIPT", diff --git a/packages/google-cloud-channel/samples/package.json b/packages/google-cloud-channel/samples/package.json index 9d6510665f0..af2de9151f3 100644 --- a/packages/google-cloud-channel/samples/package.json +++ b/packages/google-cloud-channel/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/channel": "^2.5.1", + "@google-cloud/channel": "^2.7.0", "@google-cloud/local-auth": "^2.0.0", "google-auth-library": "^8.0.0", "google-gax": "^3.0.0", diff --git a/packages/google-cloud-channel/src/v1/cloud_channel_reports_service_client.ts b/packages/google-cloud-channel/src/v1/cloud_channel_reports_service_client.ts index 4bd1d17b44f..6a6443a406a 100644 --- a/packages/google-cloud-channel/src/v1/cloud_channel_reports_service_client.ts +++ b/packages/google-cloud-channel/src/v1/cloud_channel_reports_service_client.ts @@ -42,8 +42,7 @@ const version = require('../../../package.json').version; /** * CloudChannelReportsService lets Google Cloud resellers and * distributors retrieve and combine a variety of data in Cloud Channel for - * multiple products (Google Cloud Platform (GCP), Google Voice, and - * Google Workspace.) + * multiple products (Google Cloud, Google Voice, and Google Workspace.) * @class * @memberof v1 */ @@ -632,6 +631,9 @@ export class CloudChannelReportsServiceClient { * of the previous * {@link google.cloud.channel.v1.CloudChannelReportsService.FetchReportResults|CloudChannelReportsService.FetchReportResults} * call. + * @param {string[]} [request.partitionKeys] + * Optional. List of keys specifying which report partitions to return. + * If empty, returns all partitions. * @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. @@ -743,6 +745,9 @@ export class CloudChannelReportsServiceClient { * of the previous * {@link google.cloud.channel.v1.CloudChannelReportsService.FetchReportResults|CloudChannelReportsService.FetchReportResults} * call. + * @param {string[]} [request.partitionKeys] + * Optional. List of keys specifying which report partitions to return. + * If empty, returns all partitions. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -802,6 +807,9 @@ export class CloudChannelReportsServiceClient { * of the previous * {@link google.cloud.channel.v1.CloudChannelReportsService.FetchReportResults|CloudChannelReportsService.FetchReportResults} * call. + * @param {string[]} [request.partitionKeys] + * Optional. List of keys specifying which report partitions to return. + * If empty, returns all partitions. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} diff --git a/packages/google-cloud-channel/src/v1/cloud_channel_service_client.ts b/packages/google-cloud-channel/src/v1/cloud_channel_service_client.ts index 20c296cd004..98b0e4ba757 100644 --- a/packages/google-cloud-channel/src/v1/cloud_channel_service_client.ts +++ b/packages/google-cloud-channel/src/v1/cloud_channel_service_client.ts @@ -6360,7 +6360,8 @@ export class CloudChannelServiceClient { * {@link google.cloud.channel.v1.CustomerRepricingConfig|CustomerRepricingConfig} * resources. The data for each resource is displayed in the ascending order * of: - * * customer ID + * + * * Customer ID * * {@link google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement|RepricingConfig.EntitlementGranularity.entitlement} * * {@link google.cloud.channel.v1.RepricingConfig.effective_invoice_month|RepricingConfig.effective_invoice_month} * * {@link google.cloud.channel.v1.CustomerRepricingConfig.update_time|CustomerRepricingConfig.update_time} @@ -6630,7 +6631,8 @@ export class CloudChannelServiceClient { * {@link google.cloud.channel.v1.ChannelPartnerRepricingConfig|ChannelPartnerRepricingConfig} * resources. The data for each resource is displayed in the ascending order * of: - * * channel partner ID + * + * * Channel Partner ID * * {@link google.cloud.channel.v1.RepricingConfig.effective_invoice_month|RepricingConfig.effective_invoice_month} * * {@link google.cloud.channel.v1.ChannelPartnerRepricingConfig.update_time|ChannelPartnerRepricingConfig.update_time} * diff --git a/packages/google-cloud-clouddms/CHANGELOG.md b/packages/google-cloud-clouddms/CHANGELOG.md index 6b510cf01f5..1daa57b6646 100644 --- a/packages/google-cloud-clouddms/CHANGELOG.md +++ b/packages/google-cloud-clouddms/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.3.0](https://github.com/googleapis/google-cloud-node/compare/dms-v2.2.2...dms-v2.3.0) (2023-05-20) + + +### Features + +* [clouddms] add Oracle to PostgreSQL migration APIs ([#4285](https://github.com/googleapis/google-cloud-node/issues/4285)) ([65fadd5](https://github.com/googleapis/google-cloud-node/commit/65fadd5fedea461b89cf7aeeb0f825a83dd81e02)) + ## [2.2.2](https://github.com/googleapis/google-cloud-node/compare/dms-v2.2.1...dms-v2.2.2) (2023-04-13) diff --git a/packages/google-cloud-clouddms/README.md b/packages/google-cloud-clouddms/README.md index 5fbdf8d3661..d9e84b33370 100644 --- a/packages/google-cloud-clouddms/README.md +++ b/packages/google-cloud-clouddms/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Cloud Database Migration Service: Node.js Client](https://github.com/googleapis/google-cloud-node) +# [Cloud Database Migration Service: Node.js Client](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-clouddms) [![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/dms.svg)](https://www.npmjs.org/package/@google-cloud/dms) @@ -79,29 +79,47 @@ listMigrationJobs(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-clouddms/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Data_migration_service.create_connection_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.create_connection_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.create_connection_profile.js,samples/README.md) | -| Data_migration_service.create_migration_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.create_migration_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.create_migration_job.js,samples/README.md) | -| Data_migration_service.delete_connection_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.delete_connection_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.delete_connection_profile.js,samples/README.md) | -| Data_migration_service.delete_migration_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.delete_migration_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.delete_migration_job.js,samples/README.md) | -| Data_migration_service.generate_ssh_script | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.generate_ssh_script.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.generate_ssh_script.js,samples/README.md) | -| Data_migration_service.get_connection_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.get_connection_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.get_connection_profile.js,samples/README.md) | -| Data_migration_service.get_migration_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.get_migration_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.get_migration_job.js,samples/README.md) | -| Data_migration_service.list_connection_profiles | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.list_connection_profiles.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.list_connection_profiles.js,samples/README.md) | -| Data_migration_service.list_migration_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.list_migration_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.list_migration_jobs.js,samples/README.md) | -| Data_migration_service.promote_migration_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.promote_migration_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.promote_migration_job.js,samples/README.md) | -| Data_migration_service.restart_migration_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.restart_migration_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.restart_migration_job.js,samples/README.md) | -| Data_migration_service.resume_migration_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.resume_migration_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.resume_migration_job.js,samples/README.md) | -| Data_migration_service.start_migration_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.start_migration_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.start_migration_job.js,samples/README.md) | -| Data_migration_service.stop_migration_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.stop_migration_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.stop_migration_job.js,samples/README.md) | -| Data_migration_service.update_connection_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.update_connection_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.update_connection_profile.js,samples/README.md) | -| Data_migration_service.update_migration_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.update_migration_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.update_migration_job.js,samples/README.md) | -| Data_migration_service.verify_migration_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.verify_migration_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.verify_migration_job.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/quickstart.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/test/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/test/quickstart.js,samples/README.md) | +| Data_migration_service.apply_conversion_workspace | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.apply_conversion_workspace.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.apply_conversion_workspace.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.commit_conversion_workspace | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.commit_conversion_workspace.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.commit_conversion_workspace.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.convert_conversion_workspace | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.convert_conversion_workspace.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.convert_conversion_workspace.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.create_connection_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.create_connection_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.create_connection_profile.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.create_conversion_workspace | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.create_conversion_workspace.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.create_conversion_workspace.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.create_migration_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.create_migration_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.create_migration_job.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.create_private_connection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.create_private_connection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.create_private_connection.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.delete_connection_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.delete_connection_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.delete_connection_profile.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.delete_conversion_workspace | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.delete_conversion_workspace.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.delete_conversion_workspace.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.delete_migration_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.delete_migration_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.delete_migration_job.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.delete_private_connection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.delete_private_connection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.delete_private_connection.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.describe_conversion_workspace_revisions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.describe_conversion_workspace_revisions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.describe_conversion_workspace_revisions.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.describe_database_entities | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.describe_database_entities.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.describe_database_entities.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.fetch_static_ips | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.fetch_static_ips.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.fetch_static_ips.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.generate_ssh_script | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.generate_ssh_script.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.generate_ssh_script.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.get_connection_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.get_connection_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.get_connection_profile.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.get_conversion_workspace | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.get_conversion_workspace.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.get_conversion_workspace.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.get_migration_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.get_migration_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.get_migration_job.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.get_private_connection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.get_private_connection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.get_private_connection.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.import_mapping_rules | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.import_mapping_rules.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.import_mapping_rules.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.list_connection_profiles | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.list_connection_profiles.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.list_connection_profiles.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.list_conversion_workspaces | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.list_conversion_workspaces.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.list_conversion_workspaces.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.list_migration_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.list_migration_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.list_migration_jobs.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.list_private_connections | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.list_private_connections.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.list_private_connections.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.promote_migration_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.promote_migration_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.promote_migration_job.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.restart_migration_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.restart_migration_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.restart_migration_job.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.resume_migration_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.resume_migration_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.resume_migration_job.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.rollback_conversion_workspace | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.rollback_conversion_workspace.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.rollback_conversion_workspace.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.search_background_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.search_background_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.search_background_jobs.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.seed_conversion_workspace | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.seed_conversion_workspace.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.seed_conversion_workspace.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.start_migration_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.start_migration_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.start_migration_job.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.stop_migration_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.stop_migration_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.stop_migration_job.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.update_connection_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.update_connection_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.update_connection_profile.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.update_conversion_workspace | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.update_conversion_workspace.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.update_conversion_workspace.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.update_migration_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.update_migration_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.update_migration_job.js,packages/google-cloud-clouddms/samples/README.md) | +| Data_migration_service.verify_migration_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.verify_migration_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.verify_migration_job.js,packages/google-cloud-clouddms/samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/quickstart.js,packages/google-cloud-clouddms/samples/README.md) | diff --git a/packages/google-cloud-clouddms/package.json b/packages/google-cloud-clouddms/package.json index e51a1f9afbb..4ae4d73fec2 100644 --- a/packages/google-cloud-clouddms/package.json +++ b/packages/google-cloud-clouddms/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/dms", "description": "Cloud Database Migration API client for Node.js", - "version": "2.2.2", + "version": "2.3.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { @@ -30,21 +30,20 @@ "Cloud Database Migration API" ], "scripts": { - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "samples-test-suite": "cd samples/ && npm link ../ && npm test && cd ../", "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", "docs-test": "linkinator docs", "fix": "gts fix", "lint": "gts check", - "predocs-test": "npm run docs", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -60,6 +59,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -70,5 +70,4 @@ "webpack-cli": "^5.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-clouddms" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-clouddms/protos/google/cloud/clouddms/v1/clouddms.proto b/packages/google-cloud-clouddms/protos/google/cloud/clouddms/v1/clouddms.proto index 0126c9c3a20..69d7d93d016 100644 --- a/packages/google-cloud-clouddms/protos/google/cloud/clouddms/v1/clouddms.proto +++ b/packages/google-cloud-clouddms/protos/google/cloud/clouddms/v1/clouddms.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/clouddms/v1/clouddms_resources.proto"; +import "google/cloud/clouddms/v1/conversionworkspace_resources.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; @@ -36,10 +37,12 @@ option ruby_package = "Google::Cloud::CloudDMS::V1"; // Database Migration service service DataMigrationService { option (google.api.default_host) = "datamigration.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Lists migration jobs in a given project and location. - rpc ListMigrationJobs(ListMigrationJobsRequest) returns (ListMigrationJobsResponse) { + rpc ListMigrationJobs(ListMigrationJobsRequest) + returns (ListMigrationJobsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/migrationJobs" }; @@ -55,12 +58,14 @@ service DataMigrationService { } // Creates a new migration job in a given project and location. - rpc CreateMigrationJob(CreateMigrationJobRequest) returns (google.longrunning.Operation) { + rpc CreateMigrationJob(CreateMigrationJobRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/migrationJobs" body: "migration_job" }; - option (google.api.method_signature) = "parent,migration_job,migration_job_id"; + option (google.api.method_signature) = + "parent,migration_job,migration_job_id"; option (google.longrunning.operation_info) = { response_type: "MigrationJob" metadata_type: "OperationMetadata" @@ -68,7 +73,8 @@ service DataMigrationService { } // Updates the parameters of a single migration job. - rpc UpdateMigrationJob(UpdateMigrationJobRequest) returns (google.longrunning.Operation) { + rpc UpdateMigrationJob(UpdateMigrationJobRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1/{migration_job.name=projects/*/locations/*/migrationJobs/*}" body: "migration_job" @@ -81,7 +87,8 @@ service DataMigrationService { } // Deletes a single migration job. - rpc DeleteMigrationJob(DeleteMigrationJobRequest) returns (google.longrunning.Operation) { + rpc DeleteMigrationJob(DeleteMigrationJobRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/migrationJobs/*}" }; @@ -93,7 +100,8 @@ service DataMigrationService { } // Start an already created migration job. - rpc StartMigrationJob(StartMigrationJobRequest) returns (google.longrunning.Operation) { + rpc StartMigrationJob(StartMigrationJobRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/migrationJobs/*}:start" body: "*" @@ -105,7 +113,8 @@ service DataMigrationService { } // Stops a running migration job. - rpc StopMigrationJob(StopMigrationJobRequest) returns (google.longrunning.Operation) { + rpc StopMigrationJob(StopMigrationJobRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/migrationJobs/*}:stop" body: "*" @@ -118,7 +127,8 @@ service DataMigrationService { // Resume a migration job that is currently stopped and is resumable (was // stopped during CDC phase). - rpc ResumeMigrationJob(ResumeMigrationJobRequest) returns (google.longrunning.Operation) { + rpc ResumeMigrationJob(ResumeMigrationJobRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/migrationJobs/*}:resume" body: "*" @@ -131,7 +141,8 @@ service DataMigrationService { // Promote a migration job, stopping replication to the destination and // promoting the destination to be a standalone database. - rpc PromoteMigrationJob(PromoteMigrationJobRequest) returns (google.longrunning.Operation) { + rpc PromoteMigrationJob(PromoteMigrationJobRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/migrationJobs/*}:promote" body: "*" @@ -144,7 +155,8 @@ service DataMigrationService { // Verify a migration job, making sure the destination can reach the source // and that all configuration and prerequisites are met. - rpc VerifyMigrationJob(VerifyMigrationJobRequest) returns (google.longrunning.Operation) { + rpc VerifyMigrationJob(VerifyMigrationJobRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/migrationJobs/*}:verify" body: "*" @@ -158,7 +170,8 @@ service DataMigrationService { // Restart a stopped or failed migration job, resetting the destination // instance to its original state and starting the migration process from // scratch. - rpc RestartMigrationJob(RestartMigrationJobRequest) returns (google.longrunning.Operation) { + rpc RestartMigrationJob(RestartMigrationJobRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/migrationJobs/*}:restart" body: "*" @@ -178,8 +191,10 @@ service DataMigrationService { }; } - // Retrieve a list of all connection profiles in a given project and location. - rpc ListConnectionProfiles(ListConnectionProfilesRequest) returns (ListConnectionProfilesResponse) { + // Retrieves a list of all connection profiles in a given project and + // location. + rpc ListConnectionProfiles(ListConnectionProfilesRequest) + returns (ListConnectionProfilesResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/connectionProfiles" }; @@ -187,7 +202,8 @@ service DataMigrationService { } // Gets details of a single connection profile. - rpc GetConnectionProfile(GetConnectionProfileRequest) returns (ConnectionProfile) { + rpc GetConnectionProfile(GetConnectionProfileRequest) + returns (ConnectionProfile) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/connectionProfiles/*}" }; @@ -195,12 +211,14 @@ service DataMigrationService { } // Creates a new connection profile in a given project and location. - rpc CreateConnectionProfile(CreateConnectionProfileRequest) returns (google.longrunning.Operation) { + rpc CreateConnectionProfile(CreateConnectionProfileRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/connectionProfiles" body: "connection_profile" }; - option (google.api.method_signature) = "parent,connection_profile,connection_profile_id"; + option (google.api.method_signature) = + "parent,connection_profile,connection_profile_id"; option (google.longrunning.operation_info) = { response_type: "ConnectionProfile" metadata_type: "OperationMetadata" @@ -208,7 +226,8 @@ service DataMigrationService { } // Update the configuration of a single connection profile. - rpc UpdateConnectionProfile(UpdateConnectionProfileRequest) returns (google.longrunning.Operation) { + rpc UpdateConnectionProfile(UpdateConnectionProfileRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1/{connection_profile.name=projects/*/locations/*/connectionProfiles/*}" body: "connection_profile" @@ -223,7 +242,8 @@ service DataMigrationService { // Deletes a single Database Migration Service connection profile. // A connection profile can only be deleted if it is not in use by any // active migration jobs. - rpc DeleteConnectionProfile(DeleteConnectionProfileRequest) returns (google.longrunning.Operation) { + rpc DeleteConnectionProfile(DeleteConnectionProfileRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/connectionProfiles/*}" }; @@ -233,11 +253,242 @@ service DataMigrationService { metadata_type: "OperationMetadata" }; } + + // Creates a new private connection in a given project and location. + rpc CreatePrivateConnection(CreatePrivateConnectionRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/privateConnections" + body: "private_connection" + }; + option (google.api.method_signature) = + "parent,private_connection,private_connection_id"; + option (google.longrunning.operation_info) = { + response_type: "PrivateConnection" + metadata_type: "OperationMetadata" + }; + } + + // Gets details of a single private connection. + rpc GetPrivateConnection(GetPrivateConnectionRequest) + returns (PrivateConnection) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/privateConnections/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Retrieves a list of private connections in a given project and location. + rpc ListPrivateConnections(ListPrivateConnectionsRequest) + returns (ListPrivateConnectionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/privateConnections" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a single Database Migration Service private connection. + rpc DeletePrivateConnection(DeletePrivateConnectionRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/privateConnections/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Gets details of a single conversion workspace. + rpc GetConversionWorkspace(GetConversionWorkspaceRequest) + returns (ConversionWorkspace) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/conversionWorkspaces/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists conversion workspaces in a given project and location. + rpc ListConversionWorkspaces(ListConversionWorkspacesRequest) + returns (ListConversionWorkspacesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/conversionWorkspaces" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a new conversion workspace in a given project and location. + rpc CreateConversionWorkspace(CreateConversionWorkspaceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/conversionWorkspaces" + body: "conversion_workspace" + }; + option (google.api.method_signature) = + "parent,conversion_workspace,conversion_workspace_id"; + option (google.longrunning.operation_info) = { + response_type: "ConversionWorkspace" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a single conversion workspace. + rpc UpdateConversionWorkspace(UpdateConversionWorkspaceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{conversion_workspace.name=projects/*/locations/*/conversionWorkspaces/*}" + body: "conversion_workspace" + }; + option (google.api.method_signature) = "conversion_workspace,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "ConversionWorkspace" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single conversion workspace. + rpc DeleteConversionWorkspace(DeleteConversionWorkspaceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/conversionWorkspaces/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Imports a snapshot of the source database into the + // conversion workspace. + rpc SeedConversionWorkspace(SeedConversionWorkspaceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/conversionWorkspaces/*}:seed" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "ConversionWorkspace" + metadata_type: "OperationMetadata" + }; + } + + // Imports the mapping rules for a given conversion workspace. + // Supports various formats of external rules files. + rpc ImportMappingRules(ImportMappingRulesRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/conversionWorkspaces/*}/mappingRules:import" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "ConversionWorkspace" + metadata_type: "OperationMetadata" + }; + } + + // Creates a draft tree schema for the destination database. + rpc ConvertConversionWorkspace(ConvertConversionWorkspaceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/conversionWorkspaces/*}:convert" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "ConversionWorkspace" + metadata_type: "OperationMetadata" + }; + } + + // Marks all the data in the conversion workspace as committed. + rpc CommitConversionWorkspace(CommitConversionWorkspaceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/conversionWorkspaces/*}:commit" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "ConversionWorkspace" + metadata_type: "OperationMetadata" + }; + } + + // Rolls back a conversion workspace to the last committed snapshot. + rpc RollbackConversionWorkspace(RollbackConversionWorkspaceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/conversionWorkspaces/*}:rollback" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "ConversionWorkspace" + metadata_type: "OperationMetadata" + }; + } + + // Applies draft tree onto a specific destination database. + rpc ApplyConversionWorkspace(ApplyConversionWorkspaceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/conversionWorkspaces/*}:apply" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "ConversionWorkspace" + metadata_type: "OperationMetadata" + }; + } + + // Describes the database entities tree for a specific conversion workspace + // and a specific tree type. + // + // Database entities are not resources like conversion workspaces or mapping + // rules, and they can't be created, updated or deleted. Instead, they are + // simple data objects describing the structure of the client database. + rpc DescribeDatabaseEntities(DescribeDatabaseEntitiesRequest) + returns (DescribeDatabaseEntitiesResponse) { + option (google.api.http) = { + get: "/v1/{conversion_workspace=projects/*/locations/*/conversionWorkspaces/*}:describeDatabaseEntities" + }; + } + + // Searches/lists the background jobs for a specific + // conversion workspace. + // + // The background jobs are not resources like conversion workspaces or + // mapping rules, and they can't be created, updated or deleted. + // Instead, they are a way to expose the data plane jobs log. + rpc SearchBackgroundJobs(SearchBackgroundJobsRequest) + returns (SearchBackgroundJobsResponse) { + option (google.api.http) = { + get: "/v1/{conversion_workspace=projects/*/locations/*/conversionWorkspaces/*}:searchBackgroundJobs" + }; + } + + // Retrieves a list of committed revisions of a specific conversion + // workspace. + rpc DescribeConversionWorkspaceRevisions( + DescribeConversionWorkspaceRevisionsRequest) + returns (DescribeConversionWorkspaceRevisionsResponse) { + option (google.api.http) = { + get: "/v1/{conversion_workspace=projects/*/locations/*/conversionWorkspaces/*}:describeConversionWorkspaceRevisions" + }; + } + + // Fetches a set of static IP addresses that need to be allowlisted by the + // customer when using the static-IP connectivity method. + rpc FetchStaticIps(FetchStaticIpsRequest) returns (FetchStaticIpsResponse) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*}:fetchStaticIps" + }; + option (google.api.method_signature) = "name"; + } } -// Retrieve a list of all migration jobs in a given project and location. +// Retrieves a list of all migration jobs in a given project and location. message ListMigrationJobsRequest { - // Required. The parent, which owns this collection of migrationJobs. + // Required. The parent which owns this collection of migrationJobs. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -247,7 +498,7 @@ message ListMigrationJobsRequest { // The maximum number of migration jobs to return. The service may return // fewer than this value. If unspecified, at most 50 migration jobs will be - // returned. The maximum value is 1000; values above 1000 will be coerced to + // returned. The maximum value is 1000; values above 1000 are coerced to // 1000. int32 page_size = 2; @@ -279,7 +530,7 @@ message ListMigrationJobsResponse { // The list of migration jobs objects. repeated MigrationJob migration_jobs = 1; - // A token, which can be sent as `page_token` to retrieve the next page. + // 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; @@ -301,7 +552,7 @@ message GetMigrationJobRequest { // Request message to create a new Database Migration Service migration job // in the specified project and region. message CreateMigrationJobRequest { - // Required. The parent, which owns this collection of migration jobs. + // Required. The parent which owns this collection of migration jobs. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -317,31 +568,32 @@ message CreateMigrationJobRequest { // object. MigrationJob migration_job = 3 [(google.api.field_behavior) = REQUIRED]; - // A unique id used to identify the request. If the server receives two - // requests with the same id, then the second request will be ignored. + // A unique ID used to identify the request. If the server receives two + // requests with the same ID, then the second request is ignored. // // It is recommended to always set this value to a UUID. // - // The id must contain only letters (a-z, A-Z), numbers (0-9), underscores + // The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores // (_), and hyphens (-). The maximum length is 40 characters. string request_id = 4; } // Request message for 'UpdateMigrationJob' request. message UpdateMigrationJobRequest { - // Required. Field mask is used to specify the fields to be overwritten in the - // migration job resource by the update. - google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + // Required. Field mask is used to specify the fields to be overwritten by the + // update in the conversion workspace resource. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; // Required. The migration job parameters to update. MigrationJob migration_job = 2 [(google.api.field_behavior) = REQUIRED]; - // A unique id used to identify the request. If the server receives two - // requests with the same id, then the second request will be ignored. + // A unique ID used to identify the request. If the server receives two + // requests with the same ID, then the second request is ignored. // // It is recommended to always set this value to a UUID. // - // The id must contain only letters (a-z, A-Z), numbers (0-9), underscores + // The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores // (_), and hyphens (-). The maximum length is 40 characters. string request_id = 3; } @@ -356,12 +608,12 @@ message DeleteMigrationJobRequest { } ]; - // A unique id used to identify the request. If the server receives two - // requests with the same id, then the second request will be ignored. + // A unique ID used to identify the request. If the server receives two + // requests with the same ID, then the second request is ignored. // // It is recommended to always set this value to a UUID. // - // The id must contain only letters (a-z, A-Z), numbers (0-9), underscores + // The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores // (_), and hyphens (-). The maximum length is 40 characters. string request_id = 2; @@ -375,56 +627,56 @@ message DeleteMigrationJobRequest { message StartMigrationJobRequest { // Name of the migration job resource to start. string name = 1 [(google.api.resource_reference) = { - type: "datamigration.googleapis.com/MigrationJob" - }]; + type: "datamigration.googleapis.com/MigrationJob" + }]; } // Request message for 'StopMigrationJob' request. message StopMigrationJobRequest { // Name of the migration job resource to stop. string name = 1 [(google.api.resource_reference) = { - type: "datamigration.googleapis.com/MigrationJob" - }]; + type: "datamigration.googleapis.com/MigrationJob" + }]; } // Request message for 'ResumeMigrationJob' request. message ResumeMigrationJobRequest { // Name of the migration job resource to resume. string name = 1 [(google.api.resource_reference) = { - type: "datamigration.googleapis.com/MigrationJob" - }]; + type: "datamigration.googleapis.com/MigrationJob" + }]; } // Request message for 'PromoteMigrationJob' request. message PromoteMigrationJobRequest { // Name of the migration job resource to promote. string name = 1 [(google.api.resource_reference) = { - type: "datamigration.googleapis.com/MigrationJob" - }]; + type: "datamigration.googleapis.com/MigrationJob" + }]; } // Request message for 'VerifyMigrationJob' request. message VerifyMigrationJobRequest { // Name of the migration job resource to verify. string name = 1 [(google.api.resource_reference) = { - type: "datamigration.googleapis.com/MigrationJob" - }]; + type: "datamigration.googleapis.com/MigrationJob" + }]; } // Request message for 'RestartMigrationJob' request. message RestartMigrationJobRequest { // Name of the migration job resource to restart. string name = 1 [(google.api.resource_reference) = { - type: "datamigration.googleapis.com/MigrationJob" - }]; + type: "datamigration.googleapis.com/MigrationJob" + }]; } // Request message for 'GenerateSshScript' request. message GenerateSshScriptRequest { // Name of the migration job resource to generate the SSH script. string migration_job = 1 [(google.api.resource_reference) = { - type: "datamigration.googleapis.com/MigrationJob" - }]; + type: "datamigration.googleapis.com/MigrationJob" + }]; // Required. Bastion VM Instance name to use or to create. string vm = 2 [(google.api.field_behavior) = REQUIRED]; @@ -438,7 +690,7 @@ message GenerateSshScriptRequest { VmSelectionConfig vm_selection_config = 101; } - // The port that will be open on the bastion host + // The port that will be open on the bastion host. int32 vm_port = 3; } @@ -468,7 +720,7 @@ message SshScript { // Request message for 'ListConnectionProfiles' request. message ListConnectionProfilesRequest { - // Required. The parent, which owns this collection of connection profiles. + // Required. The parent which owns this collection of connection profiles. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -478,7 +730,7 @@ message ListConnectionProfilesRequest { // The maximum number of connection profiles to return. The service may return // fewer than this value. If unspecified, at most 50 connection profiles will - // be returned. The maximum value is 1000; values above 1000 will be coerced + // be returned. The maximum value is 1000; values above 1000 are coerced // to 1000. int32 page_size = 2; @@ -500,7 +752,7 @@ message ListConnectionProfilesRequest { // connect with a specific username. string filter = 4; - // the order by fields for the result. + // A comma-separated list of fields to order results according to. string order_by = 5; } @@ -509,7 +761,7 @@ message ListConnectionProfilesResponse { // The response list of connection profiles. repeated ConnectionProfile connection_profiles = 1; - // A token, which can be sent as `page_token` to retrieve the next page. + // 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; @@ -530,7 +782,7 @@ message GetConnectionProfileRequest { // Request message for 'CreateConnectionProfile' request. message CreateConnectionProfileRequest { - // Required. The parent, which owns this collection of connection profiles. + // Required. The parent which owns this collection of connection profiles. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -542,35 +794,58 @@ message CreateConnectionProfileRequest { string connection_profile_id = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The create request body including the connection profile data - ConnectionProfile connection_profile = 3 [(google.api.field_behavior) = REQUIRED]; + ConnectionProfile connection_profile = 3 + [(google.api.field_behavior) = REQUIRED]; - // A unique id used to identify the request. If the server receives two - // requests with the same id, then the second request will be ignored. + // Optional. A unique ID used to identify the request. If the server receives + // two requests with the same ID, then the second request is ignored. // // It is recommended to always set this value to a UUID. // - // The id must contain only letters (a-z, A-Z), numbers (0-9), underscores + // The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores // (_), and hyphens (-). The maximum length is 40 characters. - string request_id = 4; + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Only validate the connection profile, but don't create any + // resources. The default is false. Only supported for Oracle connection + // profiles. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Create the connection profile without validating it. + // The default is false. + // Only supported for Oracle connection profiles. + bool skip_validation = 6 [(google.api.field_behavior) = OPTIONAL]; } // Request message for 'UpdateConnectionProfile' request. message UpdateConnectionProfileRequest { - // Required. Field mask is used to specify the fields to be overwritten in the - // connection profile resource by the update. - google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + // Required. Field mask is used to specify the fields to be overwritten by the + // update in the conversion workspace resource. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; // Required. The connection profile parameters to update. - ConnectionProfile connection_profile = 2 [(google.api.field_behavior) = REQUIRED]; + ConnectionProfile connection_profile = 2 + [(google.api.field_behavior) = REQUIRED]; - // A unique id used to identify the request. If the server receives two - // requests with the same id, then the second request will be ignored. + // Optional. A unique ID used to identify the request. If the server receives + // two requests with the same ID, then the second request is ignored. // // It is recommended to always set this value to a UUID. // - // The id must contain only letters (a-z, A-Z), numbers (0-9), underscores + // The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores // (_), and hyphens (-). The maximum length is 40 characters. - string request_id = 3; + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Only validate the connection profile, but don't update any + // resources. The default is false. Only supported for Oracle connection + // profiles. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Update the connection profile without validating it. + // The default is false. + // Only supported for Oracle connection profiles. + bool skip_validation = 5 [(google.api.field_behavior) = OPTIONAL]; } // Request message for 'DeleteConnectionProfile' request. @@ -583,12 +858,12 @@ message DeleteConnectionProfileRequest { } ]; - // A unique id used to identify the request. If the server receives two - // requests with the same id, then the second request will be ignored. + // A unique ID used to identify the request. If the server receives two + // requests with the same ID, then the second request is ignored. // // It is recommended to always set this value to a UUID. // - // The id must contain only letters (a-z, A-Z), numbers (0-9), underscores + // The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores // (_), and hyphens (-). The maximum length is 40 characters. string request_id = 2; @@ -597,13 +872,126 @@ message DeleteConnectionProfileRequest { bool force = 3; } +// Request message to create a new private connection in the specified project +// and region. +message CreatePrivateConnectionRequest { + // Required. The parent that owns the collection of PrivateConnections. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datamigration.googleapis.com/PrivateConnection" + } + ]; + + // Required. The private connection identifier. + string private_connection_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The private connection resource to create. + PrivateConnection private_connection = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. A unique ID used to identify the request. If the server receives + // two requests with the same ID, then the second request is ignored. + // + // It is recommended to always set this value to a UUID. + // + // The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores + // (_), and hyphens (-). The maximum length is 40 characters. + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, will skip validations. + bool skip_validation = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message to retrieve a list of private connections in a given project +// and location. +message ListPrivateConnectionsRequest { + // Required. The parent that owns the collection of private connections. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datamigration.googleapis.com/PrivateConnection" + } + ]; + + // Maximum number of private connections to return. + // If unspecified, at most 50 private connections that are returned. + // The maximum value is 1000; values above 1000 are coerced to 1000. + int32 page_size = 2; + + // Page token received from a previous `ListPrivateConnections` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `ListPrivateConnections` must match the call that provided the page + // token. + string page_token = 3; + + // A filter expression that filters private connections listed in the + // response. The expression must specify the field name, a comparison + // operator, and the value that you want to use for filtering. The value must + // be a string, a number, or a boolean. The comparison operator must be either + // =, !=, >, or <. For example, list private connections created this year by + // specifying **createTime %gt; 2021-01-01T00:00:00.000000000Z**. + string filter = 4; + + // Order by fields for the result. + string order_by = 5; +} + +// Response message for 'ListPrivateConnections' request. +message ListPrivateConnectionsResponse { + // List of private connections. + repeated PrivateConnection private_connections = 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; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message to delete a private connection. +message DeletePrivateConnectionRequest { + // Required. The name of the private connection to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datamigration.googleapis.com/PrivateConnection" + } + ]; + + // Optional. A unique ID used to identify the request. If the server receives + // two requests with the same ID, then the second request is ignored. + // + // It is recommended to always set this value to a UUID. + // + // The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores + // (_), and hyphens (-). The maximum length is 40 characters. + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message to get a private connection resource. +message GetPrivateConnectionRequest { + // Required. The name of the private connection to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datamigration.googleapis.com/PrivateConnection" + } + ]; +} + // Represents the metadata of the long-running operation. message OperationMetadata { // Output only. The time the operation was created. - google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time the operation finished running. - google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Server-defined resource path for the target of the operation. string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -616,10 +1004,409 @@ message OperationMetadata { // Output only. Identifies whether the user has requested cancellation // of the operation. Operations that have successfully been cancelled - // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - // corresponding to `Code.CANCELLED`. + // have [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. API version used to start the operation. string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; } + +// Retrieve a list of all conversion workspaces in a given project and location. +message ListConversionWorkspacesRequest { + // Required. The parent which owns this collection of conversion workspaces. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datamigration.googleapis.com/ConversionWorkspace" + } + ]; + + // The maximum number of conversion workspaces to return. The service may + // return fewer than this value. If unspecified, at most 50 sets are returned. + int32 page_size = 2; + + // The nextPageToken value received in the previous call to + // conversionWorkspaces.list, used in the subsequent request to retrieve the + // next page of results. On first call this should be left blank. When + // paginating, all other parameters provided to conversionWorkspaces.list must + // match the call that provided the page token. + string page_token = 3; + + // A filter expression that filters conversion workspaces listed in the + // response. The expression must specify the field name, a comparison + // operator, and the value that you want to use for filtering. The value must + // be a string, a number, or a boolean. The comparison operator must be either + // =, !=, >, or <. For example, list conversion workspaces created this year + // by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.** You can + // also filter nested fields. For example, you could specify + // **source.version = "12.c.1"** to select all conversion workspaces with + // source database version equal to 12.c.1. + string filter = 4; +} + +// Response message for 'ListConversionWorkspaces' request. +message ListConversionWorkspacesResponse { + // The list of conversion workspace objects. + repeated ConversionWorkspace conversion_workspaces = 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; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for 'GetConversionWorkspace' request. +message GetConversionWorkspaceRequest { + // Required. Name of the conversion workspace resource to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datamigration.googleapis.com/ConversionWorkspace" + } + ]; +} + +// Request message to create a new Conversion Workspace +// in the specified project and region. +message CreateConversionWorkspaceRequest { + // Required. The parent which owns this collection of conversion workspaces. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "datamigration.googleapis.com/ConversionWorkspace" + } + ]; + + // Required. The ID of the conversion workspace to create. + string conversion_workspace_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Represents a conversion workspace object. + ConversionWorkspace conversion_workspace = 3 + [(google.api.field_behavior) = REQUIRED]; + + // A unique ID used to identify the request. If the server receives two + // requests with the same ID, then the second request is ignored. + // + // It is recommended to always set this value to a UUID. + // + // The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores + // (_), and hyphens (-). The maximum length is 40 characters. + string request_id = 4; +} + +// Request message for 'UpdateConversionWorkspace' request. +message UpdateConversionWorkspaceRequest { + // Required. Field mask is used to specify the fields to be overwritten by the + // update in the conversion workspace resource. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The conversion workspace parameters to update. + ConversionWorkspace conversion_workspace = 2 + [(google.api.field_behavior) = REQUIRED]; + + // A unique ID used to identify the request. If the server receives two + // requests with the same ID, then the second request is ignored. + // + // It is recommended to always set this value to a UUID. + // + // The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores + // (_), and hyphens (-). The maximum length is 40 characters. + string request_id = 3; +} + +// Request message for 'DeleteConversionWorkspace' request. +message DeleteConversionWorkspaceRequest { + // Required. Name of the conversion workspace resource to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datamigration.googleapis.com/ConversionWorkspace" + } + ]; + + // A unique ID used to identify the request. If the server receives two + // requests with the same ID, then the second request is ignored. + // + // It is recommended to always set this value to a UUID. + // + // The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores + // (_), and hyphens (-). The maximum length is 40 characters. + string request_id = 2; +} + +// Request message for 'CommitConversionWorkspace' request. +message CommitConversionWorkspaceRequest { + // Required. Name of the conversion workspace resource to commit. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datamigration.googleapis.com/ConversionWorkspace" + } + ]; + + // Optional. Optional name of the commit. + string commit_name = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for 'RollbackConversionWorkspace' request. +message RollbackConversionWorkspaceRequest { + // Required. Name of the conversion workspace resource to roll back to. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datamigration.googleapis.com/ConversionWorkspace" + } + ]; +} + +// Request message for 'ApplyConversionWorkspace' request. +message ApplyConversionWorkspaceRequest { + // Required. The name of the conversion workspace resource for which to apply + // the draft tree. Must be in the form of: + // projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datamigration.googleapis.com/ConversionWorkspace" + } + ]; + + // Filter which entities to apply. Leaving this field empty will apply all of + // the entities. Supports Google AIP 160 based filtering. + string filter = 2; + + // Which destination to use when applying the conversion workspace. + oneof destination { + // Fully qualified (Uri) name of the destination connection profile. + string connection_profile = 100; + } +} + +// Request message for 'SeedConversionWorkspace' request. +message SeedConversionWorkspaceRequest { + // Name of the conversion workspace resource to seed with new database + // structure, in the form of: + // projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}. + string name = 1 [(google.api.resource_reference) = { + type: "datamigration.googleapis.com/ConversionWorkspace" + }]; + + // Should the conversion workspace be committed automatically after the + // seed operation. + bool auto_commit = 2; + + // The input to be used for seeding the conversion workspace. The input can + // either be from the source or destination databases and it can be provided + // through a connection profile or a DDL file. + oneof seed_from { + // Fully qualified (Uri) name of the source connection profile. + string source_connection_profile = 100; + + // Fully qualified (Uri) name of the destination connection profile. + string destination_connection_profile = 101; + } +} + +// Request message for 'ConvertConversionWorkspace' request. +message ConvertConversionWorkspaceRequest { + // Name of the conversion workspace resource to convert in the form of: + // projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}. + string name = 1 [(google.api.resource_reference) = { + type: "datamigration.googleapis.com/ConversionWorkspace" + }]; + + // Specifies whether the conversion workspace is to be committed automatically + // after the conversion. + bool auto_commit = 4; + + // Filter the entities to convert. Leaving this field empty will convert all + // of the entities. Supports Google AIP-160 style filtering. + string filter = 5; +} + +// Request message for 'ImportMappingRules' request. +message ImportMappingRulesRequest { + // Details of a single rules file. + message RulesFile { + // The filename of the rules that needs to be converted. The filename is + // used mainly so that future logs of the import rules job contain it, and + // can therefore be searched by it. + string rules_source_filename = 1; + + // The text content of the rules that needs to be converted. + string rules_content = 2; + } + + // Required. Name of the conversion workspace resource to import the rules to + // in the form of: + // projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datamigration.googleapis.com/ConversionWorkspace" + } + ]; + + // The format of the rules content file. + ImportRulesFileFormat rules_format = 2; + + // One or more rules files. + repeated RulesFile rules_files = 3; + + // Should the conversion workspace be committed automatically after the + // import operation. + bool auto_commit = 6; +} + +// Request message for 'DescribeDatabaseEntities' request. +message DescribeDatabaseEntitiesRequest { + // The type of a tree to return + enum DBTreeType { + // Unspecified tree type. + DB_TREE_TYPE_UNSPECIFIED = 0; + + // The source database tree. + SOURCE_TREE = 1; + + // The draft database tree. + DRAFT_TREE = 2; + + // The destination database tree. + DESTINATION_TREE = 3; + } + + // Required. Name of the conversion workspace resource whose database entities + // are described. Must be in the form of: + // projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}. + string conversion_workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datamigration.googleapis.com/ConversionWorkspace" + } + ]; + + // The maximum number of entities to return. The service may return + // fewer entities than the value specifies. + int32 page_size = 3; + + // The nextPageToken value received in the previous call to + // conversionWorkspace.describeDatabaseEntities, used in the subsequent + // request to retrieve the next page of results. On first call this should be + // left blank. When paginating, all other parameters provided to + // conversionWorkspace.describeDatabaseEntities must match the call that + // provided the page token. + string page_token = 4; + + // The tree to fetch. + DBTreeType tree = 6; + + // Whether to retrieve the latest committed version of the entities or the + // latest version. This field is ignored if a specific commit_id is specified. + bool uncommitted = 11; + + // Request a specific commit ID. If not specified, the entities from the + // latest commit are returned. + string commit_id = 12; + + // Filter the returned entities based on AIP-160 standard. + string filter = 13; +} + +// Response message for 'DescribeDatabaseEntities' request. +message DescribeDatabaseEntitiesResponse { + // The list of database entities for the conversion workspace. + repeated DatabaseEntity database_entities = 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 message for 'SearchBackgroundJobs' request. +message SearchBackgroundJobsRequest { + // Required. Name of the conversion workspace resource whose jobs are listed, + // in the form of: + // projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}. + string conversion_workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datamigration.googleapis.com/ConversionWorkspace" + } + ]; + + // Optional. Whether or not to return just the most recent job per job type, + bool return_most_recent_per_job_type = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of jobs to return. The service may return + // fewer than this value. If unspecified, at most 100 jobs are + // returned. The maximum value is 100; values above 100 are coerced to + // 100. + int32 max_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If provided, only returns jobs that completed until (not + // including) the given timestamp. + google.protobuf.Timestamp completed_until_time = 4 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for 'SearchBackgroundJobs' request. +message SearchBackgroundJobsResponse { + // The list of conversion workspace mapping rules. + repeated BackgroundJobLogEntry jobs = 1; +} + +// Request message for 'DescribeConversionWorkspaceRevisions' request. +message DescribeConversionWorkspaceRevisionsRequest { + // Required. Name of the conversion workspace resource whose revisions are + // listed. Must be in the form of: + // projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}. + string conversion_workspace = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "datamigration.googleapis.com/ConversionWorkspace" + } + ]; + + // Optional. Optional filter to request a specific commit ID. + string commit_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for 'DescribeConversionWorkspaceRevisions' request. +message DescribeConversionWorkspaceRevisionsResponse { + // The list of conversion workspace revisions. + repeated ConversionWorkspace revisions = 1; +} + +// Request message for 'FetchStaticIps' request. +message FetchStaticIpsRequest { + // Required. The resource name for the location for which static IPs should be + // returned. Must be in the format `projects/*/locations/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Maximum number of IPs to return. + int32 page_size = 2; + + // A page token, received from a previous `FetchStaticIps` call. + string page_token = 3; +} + +// Response message for a 'FetchStaticIps' request. +message FetchStaticIpsResponse { + // List of static IPs. + repeated string static_ips = 1; + + // A token that 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; +} diff --git a/packages/google-cloud-clouddms/protos/google/cloud/clouddms/v1/clouddms_resources.proto b/packages/google-cloud-clouddms/protos/google/cloud/clouddms/v1/clouddms_resources.proto index 67a6356d210..0b66a82de58 100644 --- a/packages/google-cloud-clouddms/protos/google/cloud/clouddms/v1/clouddms_resources.proto +++ b/packages/google-cloud-clouddms/protos/google/cloud/clouddms/v1/clouddms_resources.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -30,6 +30,10 @@ option java_outer_classname = "ClouddmsResourcesProto"; option java_package = "com.google.cloud.clouddms.v1"; option php_namespace = "Google\\Cloud\\CloudDms\\V1"; option ruby_package = "Google::Cloud::CloudDMS::V1"; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/Networks" + pattern: "projects/{project}/global/networks/{network}" +}; // SSL configuration information. message SslConfig { @@ -46,23 +50,23 @@ message SslConfig { SERVER_CLIENT = 2; } - // Output only. The ssl config type according to 'client_key', 'client_certificate' and - // 'ca_certificate'. + // Output only. The ssl config type according to 'client_key', + // 'client_certificate' and 'ca_certificate'. SslType type = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Input only. The unencrypted PKCS#1 or PKCS#8 PEM-encoded private key associated with - // the Client Certificate. If this field is used then the 'client_certificate' - // field is mandatory. + // Input only. The unencrypted PKCS#1 or PKCS#8 PEM-encoded private key + // associated with the Client Certificate. If this field is used then the + // 'client_certificate' field is mandatory. string client_key = 2 [(google.api.field_behavior) = INPUT_ONLY]; - // Input only. The x509 PEM-encoded certificate that will be used by the replica to - // authenticate against the source database server.If this field is used then - // the 'client_key' field is mandatory. + // Input only. The x509 PEM-encoded certificate that will be used by the + // replica to authenticate against the source database server.If this field is + // used then the 'client_key' field is mandatory. string client_certificate = 3 [(google.api.field_behavior) = INPUT_ONLY]; - // Required. Input only. The x509 PEM-encoded certificate of the CA that signed the source database - // server's certificate. The replica will use this certificate to verify - // it's connecting to the right host. + // Required. Input only. The x509 PEM-encoded certificate of the CA that + // signed the source database server's certificate. The replica will use this + // certificate to verify it's connecting to the right host. string ca_certificate = 4 [ (google.api.field_behavior) = INPUT_ONLY, (google.api.field_behavior) = REQUIRED @@ -77,13 +81,15 @@ message MySqlConnectionProfile { // Required. The network port of the source MySQL database. int32 port = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. The username that Database Migration Service will use to connect to the - // database. The value is encrypted when stored in Database Migration Service. + // Required. The username that Database Migration Service will use to connect + // to the database. The value is encrypted when stored in Database Migration + // Service. string username = 3 [(google.api.field_behavior) = REQUIRED]; - // Required. Input only. The password for the user that Database Migration Service will be using to - // connect to the database. This field is not returned on request, and the - // value is encrypted when stored in Database Migration Service. + // Required. Input only. The password for the user that Database Migration + // Service will be using to connect to the database. This field is not + // returned on request, and the value is encrypted when stored in Database + // Migration Service. string password = 4 [ (google.api.field_behavior) = INPUT_ONLY, (google.api.field_behavior) = REQUIRED @@ -100,6 +106,16 @@ message MySqlConnectionProfile { string cloud_sql_id = 7; } +enum NetworkArchitecture { + NETWORK_ARCHITECTURE_UNSPECIFIED = 0; + + // Instance is in Cloud SQL's old producer network architecture. + NETWORK_ARCHITECTURE_OLD_CSQL_PRODUCER = 1; + + // Instance is in Cloud SQL's new producer network architecture. + NETWORK_ARCHITECTURE_NEW_CSQL_PRODUCER = 2; +} + // Specifies connection parameters required specifically for PostgreSQL // databases. message PostgreSqlConnectionProfile { @@ -109,13 +125,15 @@ message PostgreSqlConnectionProfile { // Required. The network port of the source PostgreSQL database. int32 port = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. The username that Database Migration Service will use to connect to the - // database. The value is encrypted when stored in Database Migration Service. + // Required. The username that Database Migration Service will use to connect + // to the database. The value is encrypted when stored in Database Migration + // Service. string username = 3 [(google.api.field_behavior) = REQUIRED]; - // Required. Input only. The password for the user that Database Migration Service will be using to - // connect to the database. This field is not returned on request, and the - // value is encrypted when stored in Database Migration Service. + // Required. Input only. The password for the user that Database Migration + // Service will be using to connect to the database. This field is not + // returned on request, and the value is encrypted when stored in Database + // Migration Service. string password = 4 [ (google.api.field_behavior) = INPUT_ONLY, (google.api.field_behavior) = REQUIRED @@ -130,12 +148,70 @@ message PostgreSqlConnectionProfile { // If the source is a Cloud SQL database, use this field to // provide the Cloud SQL instance ID of the source. string cloud_sql_id = 7; + + // Output only. If the source is a Cloud SQL database, this field indicates + // the network architecture it's associated with. + NetworkArchitecture network_architecture = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Connectivity options used to establish a connection to the database server. + oneof connectivity { + // Static ip connectivity data (default, no additional details needed). + StaticIpConnectivity static_ip_connectivity = 100; + + // Private service connect connectivity. + PrivateServiceConnectConnectivity private_service_connect_connectivity = + 101; + } +} + +// Specifies connection parameters required specifically for Oracle +// databases. +message OracleConnectionProfile { + // Required. The IP or hostname of the source Oracle database. + string host = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The network port of the source Oracle database. + int32 port = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The username that Database Migration Service will use to connect + // to the database. The value is encrypted when stored in Database Migration + // Service. + string username = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Input only. The password for the user that Database Migration + // Service will be using to connect to the database. This field is not + // returned on request, and the value is encrypted when stored in Database + // Migration Service. + string password = 4 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = REQUIRED + ]; + + // Output only. Indicates whether a new password is included in the request. + bool password_set = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Database service for the Oracle connection. + string database_service = 6 [(google.api.field_behavior) = REQUIRED]; + + // Connectivity options used to establish a connection to the database server. + oneof connectivity { + // Static Service IP connectivity. + StaticServiceIpConnectivity static_service_ip_connectivity = 100; + + // Forward SSH tunnel connectivity. + ForwardSshTunnelConnectivity forward_ssh_connectivity = 101; + + // Private connectivity. + PrivateConnectivity private_connectivity = 102; + } } // Specifies required connection parameters, and, optionally, the parameters // required to create a Cloud SQL destination database instance. message CloudSqlConnectionProfile { - // Output only. The Cloud SQL instance ID that this connection profile is associated with. + // Output only. The Cloud SQL instance ID that this connection profile is + // associated with. string cloud_sql_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Immutable. Metadata used to create the destination Cloud SQL database. @@ -146,6 +222,22 @@ message CloudSqlConnectionProfile { // Output only. The Cloud SQL database instance's public IP. string public_ip = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Cloud SQL database instance's additional (outgoing) public + // IP. Used when the Cloud SQL database availability type is REGIONAL (i.e. + // multiple zones / highly available). + string additional_public_ip = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Specifies required connection parameters, and the parameters +// required to create an AlloyDB destination cluster. +message AlloyDbConnectionProfile { + // Required. The AlloyDB cluster ID that this connection profile is associated + // with. + string cluster_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Immutable. Metadata used to create the destination AlloyDB cluster. + AlloyDbSettings settings = 2 [(google.api.field_behavior) = IMMUTABLE]; } // An entry for an Access Control list. @@ -161,7 +253,8 @@ message SqlAclEntry { google.protobuf.Timestamp expire_time = 10; // Input only. The time-to-leave of this access control entry. - google.protobuf.Duration ttl = 11 [(google.api.field_behavior) = INPUT_ONLY]; + google.protobuf.Duration ttl = 11 + [(google.api.field_behavior) = INPUT_ONLY]; } // A label to identify this entry. @@ -179,6 +272,14 @@ message SqlIpConfig { // be updated, but it cannot be removed after it is set. string private_network = 2; + // Optional. The name of the allocated IP address range for the private IP + // Cloud SQL instance. This name refers to an already allocated IP range + // address. If set, the instance IP address will be created in the allocated + // range. Note that this IP address range can't be modified after the instance + // is created. If you change the VPC when configuring connectivity settings + // for the migration job, this field is not relevant. + string allocated_ip_range = 5 [(google.api.field_behavior) = OPTIONAL]; + // Whether SSL connections over IP should be enforced or not. google.protobuf.BoolValue require_ssl = 3; @@ -243,6 +344,21 @@ message CloudSqlSettings { // PostgreSQL 13. POSTGRES_13 = 8; + + // PostgreSQL 14. + POSTGRES_14 = 17; + } + + // The availability type of the given Cloud SQL instance. + enum SqlAvailabilityType { + // This is an unknown Availability type. + SQL_AVAILABILITY_TYPE_UNSPECIFIED = 0; + + // Zonal availablility instance. + ZONAL = 1; + + // Regional availability instance. + REGIONAL = 2; } // The database engine type and version. @@ -301,10 +417,15 @@ message CloudSqlSettings { // The minimum (and default) size is 10GB. google.protobuf.Int64Value data_disk_size_gb = 10; - // The Google Cloud Platform zone where your Cloud SQL datdabse instance is + // The Google Cloud Platform zone where your Cloud SQL database instance is // located. string zone = 11; + // Optional. The Google Cloud Platform zone where the failover Cloud SQL + // database instance is located. Used when the Cloud SQL database availability + // type is REGIONAL (i.e. multiple zones / highly available). + string secondary_zone = 18 [(google.api.field_behavior) = OPTIONAL]; + // The Database Migration Service source connection profile ID, // in the format: // `projects/my_project_name/locations/us-central1/connectionProfiles/connection_profile_ID` @@ -318,14 +439,115 @@ message CloudSqlSettings { // The Cloud SQL default instance level collation. string collation = 15; + + // The KMS key name used for the csql instance. + string cmek_key_name = 16; + + // Optional. Availability type. Potential values: + // * `ZONAL`: The instance serves data from only one zone. Outages in that + // zone affect data availability. + // * `REGIONAL`: The instance can serve data from more than one zone in a + // region (it is highly available). + SqlAvailabilityType availability_type = 17 + [(google.api.field_behavior) = OPTIONAL]; } -// The source database will allow incoming connections from the destination -// database's public IP. You can retrieve the Cloud SQL instance's public IP -// from the Cloud SQL console or using Cloud SQL APIs. No additional -// configuration is required. -message StaticIpConnectivity { +// Settings for creating an AlloyDB cluster. +message AlloyDbSettings { + // The username/password for a database user. Used for specifying initial + // users at cluster creation time. + message UserPassword { + // The database username. + string user = 1; + + // The initial password for the user. + string password = 2; + + // Output only. Indicates if the initial_user.password field has been set. + bool password_set = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Settings for the cluster's primary instance + message PrimaryInstanceSettings { + // MachineConfig describes the configuration of a machine. + message MachineConfig { + // The number of CPU's in the VM instance. + int32 cpu_count = 1; + } + + // Required. The ID of the AlloyDB primary instance. The ID must satisfy the + // regex expression "[a-z0-9-]+". + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Configuration for the machines that host the underlying + // database engine. + MachineConfig machine_config = 2; + + // Database flags to pass to AlloyDB when DMS is creating the AlloyDB + // cluster and instances. See the AlloyDB documentation for how these can be + // used. + map database_flags = 6; + + // Labels for the AlloyDB primary instance created by DMS. An object + // containing a list of 'key', 'value' pairs. + map labels = 7; + + // Output only. The private IP address for the Instance. + // This is the connection endpoint for an end-user application. + string private_ip = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // EncryptionConfig describes the encryption config of a cluster that is + // encrypted with a CMEK (customer-managed encryption key). + message EncryptionConfig { + // The fully-qualified resource name of the KMS key. + // Each Cloud KMS key is regionalized and has the following format: + // projects/[PROJECT]/locations/[REGION]/keyRings/[RING]/cryptoKeys/[KEY_NAME] + string kms_key_name = 1; + } + + // Required. Input only. Initial user to setup during cluster creation. + // Required. + UserPassword initial_user = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = INPUT_ONLY + ]; + + // Required. The resource link for the VPC network in which cluster resources + // are created and from which they are accessible via Private IP. The network + // must belong to the same project as the cluster. It is specified in the + // form: "projects/{project_number}/global/networks/{network_id}". This is + // required to create a cluster. + string vpc_network = 2 [(google.api.field_behavior) = REQUIRED]; + + // Labels for the AlloyDB cluster created by DMS. An object containing a list + // of 'key', 'value' pairs. + map labels = 3; + + PrimaryInstanceSettings primary_instance_settings = 4; + + // Optional. The encryption config can be specified to encrypt the data disks + // and other persistent data resources of a cluster with a + // customer-managed encryption key (CMEK). When this field is not + // specified, the cluster will then use default encryption scheme to + // protect the user data. + EncryptionConfig encryption_config = 5 + [(google.api.field_behavior) = OPTIONAL]; +} +// The source database will allow incoming connections from the public IP of the +// destination database. You can retrieve the public IP of the Cloud SQL +// instance from the Cloud SQL console or using Cloud SQL APIs. No additional +// configuration is required. +message StaticIpConnectivity {} + +// Private Service Connect connectivity +// (https://cloud.google.com/vpc/docs/private-service-connect#service-attachments) +message PrivateServiceConnectConnectivity { + // Required. A service attachment that exposes a database, and has the + // following format: + // projects/{project}/regions/{region}/serviceAttachments/{service_attachment_name} + string service_attachment = 1 [(google.api.field_behavior) = REQUIRED]; } // The details needed to configure a reverse SSH tunnel between the source and @@ -335,12 +557,12 @@ message StaticIpConnectivity { // to produce the script that will help set up the reverse SSH tunnel, and to // set up the VPC peering between the Cloud SQL private network and the VPC. message ReverseSshConnectivity { - // Required. The IP of the virtual machine (Compute Engine) used as the bastion server - // for the SSH tunnel. + // Required. The IP of the virtual machine (Compute Engine) used as the + // bastion server for the SSH tunnel. string vm_ip = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The forwarding port of the virtual machine (Compute Engine) used as the - // bastion server for the SSH tunnel. + // Required. The forwarding port of the virtual machine (Compute Engine) used + // as the bastion server for the SSH tunnel. int32 vm_port = 2 [(google.api.field_behavior) = REQUIRED]; // The name of the virtual machine (Compute Engine) used as the bastion server @@ -359,6 +581,35 @@ message VpcPeeringConnectivity { string vpc = 1; } +// Forward SSH Tunnel connectivity. +message ForwardSshTunnelConnectivity { + // Required. Hostname for the SSH tunnel. + string hostname = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Username for the SSH tunnel. + string username = 2 [(google.api.field_behavior) = REQUIRED]; + + // Port for the SSH tunnel, default value is 22. + int32 port = 3; + + oneof authentication_method { + // Input only. SSH password. + string password = 100 [(google.api.field_behavior) = INPUT_ONLY]; + + // Input only. SSH private key. + string private_key = 101 [(google.api.field_behavior) = INPUT_ONLY]; + } +} + +// Static IP address connectivity configured on service project. +message StaticServiceIpConnectivity {} + +// Private Connectivity. +message PrivateConnectivity { + // Required. The resource name (URI) of the private connection. + string private_connection = 1 [(google.api.field_behavior) = REQUIRED]; +} + // A message defining the database engine and provider. message DatabaseType { // The database provider. @@ -459,19 +710,36 @@ message MigrationJob { CONTINUOUS = 2; } + // Dump flag definition. + message DumpFlag { + // The name of the flag + string name = 1; + + // The value of the flag. + string value = 2; + } + + // Dump flags definition. + message DumpFlags { + // The flags for the initial dump. + repeated DumpFlag dump_flags = 1; + } + // The name (URI) of this migration job resource, in the form of: - // projects/{project}/locations/{location}/instances/{instance}. + // projects/{project}/locations/{location}/migrationJobs/{migrationJob}. string name = 1; // Output only. The timestamp when the migration job resource was created. // A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. // Example: "2014-10-02T15:01:23.045123456Z". - google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The timestamp when the migration job resource was last updated. - // A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. + // Output only. The timestamp when the migration job resource was last + // updated. A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. // Example: "2014-10-02T15:01:23.045123456Z". - google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // The resource labels for migration job to use to annotate any related // underlying resources such as Compute Engine VMs. An object containing a @@ -494,8 +762,13 @@ message MigrationJob { // The path to the dump file in Google Cloud Storage, // in the format: (gs://[BUCKET_NAME]/[OBJECT_NAME]). + // This field and the "dump_flags" field are mutually exclusive. string dump_path = 9; + // The initial dump flags. + // This field and the "dump_path" field are mutually exclusive. + DumpFlags dump_flags = 17; + // Required. The resource name (URI) of the source connection profile. string source = 10 [(google.api.field_behavior) = REQUIRED]; @@ -515,9 +788,11 @@ message MigrationJob { StaticIpConnectivity static_ip_connectivity = 103; } - // Output only. The duration of the migration job (in seconds). A duration in seconds - // with up to nine fractional digits, terminated by 's'. Example: "3.5s". - google.protobuf.Duration duration = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The duration of the migration job (in seconds). A duration in + // seconds with up to nine fractional digits, terminated by 's'. Example: + // "3.5s". + google.protobuf.Duration duration = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The error details in case of state FAILED. google.rpc.Status error = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -528,8 +803,42 @@ message MigrationJob { // The database engine type and provider of the destination. DatabaseType destination_database = 15; - // Output only. If the migration job is completed, the time when it was completed. - google.protobuf.Timestamp end_time = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. If the migration job is completed, the time when it was + // completed. + google.protobuf.Timestamp end_time = 16 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The conversion workspace used by the migration. + ConversionWorkspaceInfo conversion_workspace = 18; + + // This field can be used to select the entities to migrate as part of + // the migration job. It uses AIP-160 notation to select a subset of the + // entities configured on the associated conversion-workspace. This field + // should not be set on migration-jobs that are not associated with a + // conversion workspace. + string filter = 20; + + // The CMEK (customer-managed encryption key) fully qualified key name used + // for the migration job. + // This field supports all migration jobs types except for: + // * Mysql to Mysql (use the cmek field in the cloudsql connection profile + // instead). + // * PostrgeSQL to PostgreSQL (use the cmek field in the cloudsql + // connection profile instead). + // * PostgreSQL to AlloyDB (use the kms_key_name field in the alloydb + // connection profile instead). + // Each Cloud CMEK key has the following format: + // projects/[PROJECT]/locations/[REGION]/keyRings/[RING]/cryptoKeys/[KEY_NAME] + string cmek_key_name = 21; +} + +// A conversion workspace's version. +message ConversionWorkspaceInfo { + // The resource name (URI) of the conversion workspace. + string name = 1; + + // The commit ID of the conversion workspace. + string commit_id = 2; } // A connection profile definition. @@ -567,18 +876,20 @@ message ConnectionProfile { } // The name of this connection profile resource in the form of - // projects/{project}/locations/{location}/instances/{instance}. + // projects/{project}/locations/{location}/connectionProfiles/{connectionProfile}. string name = 1; // Output only. The timestamp when the resource was created. // A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. // Example: "2014-10-02T15:01:23.045123456Z". - google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The timestamp when the resource was last updated. // A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. // Example: "2014-10-02T15:01:23.045123456Z". - google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // The resource labels for connection profile to use to annotate any related // underlying resources such as Compute Engine VMs. An object containing a @@ -601,8 +912,14 @@ message ConnectionProfile { // A PostgreSQL database connection profile. PostgreSqlConnectionProfile postgresql = 101; + // An Oracle database connection profile. + OracleConnectionProfile oracle = 104; + // A CloudSQL database connection profile. CloudSqlConnectionProfile cloudsql = 102; + + // An AlloyDB cluster connection profile. + AlloyDbConnectionProfile alloydb = 105; } // Output only. The error details in case of state FAILED. @@ -678,12 +995,30 @@ message MigrationJobVerificationError { // Migration is already running at the time of restart request. CANT_RESTART_RUNNING_MIGRATION = 21; + + // The source has tables with limited support. + // E.g. PostgreSQL tables without primary keys. + TABLES_WITH_LIMITED_SUPPORT = 24; + + // The source uses an unsupported locale. + UNSUPPORTED_DATABASE_LOCALE = 25; + + // The source uses an unsupported Foreign Data Wrapper configuration. + UNSUPPORTED_DATABASE_FDW_CONFIG = 26; + + // There was an underlying RDBMS error. + ERROR_RDBMS = 27; + + // The source DB size in Bytes exceeds a certain threshold. The migration + // might require an increase of quota, or might not be supported. + SOURCE_SIZE_EXCEEDS_THRESHOLD = 28; } // Output only. An instance of ErrorCode specifying the error that occurred. ErrorCode error_code = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. A formatted message with further details about the error and a CTA. + // Output only. A formatted message with further details about the error and a + // CTA. string error_message = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. A specific detailed error message, if supplied by the engine. @@ -700,6 +1035,9 @@ enum DatabaseEngine { // The source engine is PostgreSQL. POSTGRESQL = 2; + + // The source engine is Oracle. + ORACLE = 4; } // The database providers. @@ -712,4 +1050,90 @@ enum DatabaseProvider { // RDS runs the database. RDS = 2; + + // Amazon Aurora. + AURORA = 3; + + // AlloyDB. + ALLOYDB = 4; +} + +// The PrivateConnection resource is used to establish private connectivity +// with the customer's network. +message PrivateConnection { + option (google.api.resource) = { + type: "datamigration.googleapis.com/PrivateConnection" + pattern: "projects/{project}/locations/{location}/privateConnections/{private_connection}" + }; + + // Private Connection state. + enum State { + STATE_UNSPECIFIED = 0; + + // The private connection is in creation state - creating resources. + CREATING = 1; + + // The private connection has been created with all of its resources. + CREATED = 2; + + // The private connection creation has failed. + FAILED = 3; + + // The private connection is being deleted. + DELETING = 4; + + // Delete request has failed, resource is in invalid state. + FAILED_TO_DELETE = 5; + + // The private connection has been deleted. + DELETED = 6; + } + + // The name of the resource. + string name = 1; + + // Output only. The create time of the resource. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update time of the resource. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The resource labels for private connections to use to annotate any related + // underlying resources such as Compute Engine VMs. An object containing a + // list of "key": "value" pairs. + // + // Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. + map labels = 4; + + // The private connection display name. + string display_name = 5; + + // Output only. The state of the private connection. + State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The error details in case of state FAILED. + google.rpc.Status error = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + oneof connectivity { + // VPC peering configuration. + VpcPeeringConfig vpc_peering_config = 100; + } +} + +// The VPC peering configuration is used to create VPC peering with the +// consumer's VPC. +message VpcPeeringConfig { + // Required. Fully qualified name of the VPC that Database Migration Service + // will peer to. + string vpc_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "compute.googleapis.com/Networks" + } + ]; + + // Required. A free subnet for peering. (CIDR of /29) + string subnet = 2 [(google.api.field_behavior) = REQUIRED]; } diff --git a/packages/google-cloud-clouddms/protos/google/cloud/clouddms/v1/conversionworkspace_resources.proto b/packages/google-cloud-clouddms/protos/google/cloud/clouddms/v1/conversionworkspace_resources.proto new file mode 100644 index 00000000000..332fd2c6d31 --- /dev/null +++ b/packages/google-cloud-clouddms/protos/google/cloud/clouddms/v1/conversionworkspace_resources.proto @@ -0,0 +1,606 @@ +// Copyright 2023 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.clouddms.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/clouddms/v1/clouddms_resources.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.CloudDms.V1"; +option go_package = "cloud.google.com/go/clouddms/apiv1/clouddmspb;clouddmspb"; +option java_multiple_files = true; +option java_outer_classname = "ConversionWorkspaceResourcesProto"; +option java_package = "com.google.cloud.clouddms.v1"; +option php_namespace = "Google\\Cloud\\CloudDms\\V1"; +option ruby_package = "Google::Cloud::CloudDMS::V1"; + +// The type and version of a source or destination database. +message DatabaseEngineInfo { + // Required. Engine type. + DatabaseEngine engine = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Engine named version, for example 12.c.1. + string version = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The main conversion workspace resource entity. +message ConversionWorkspace { + option (google.api.resource) = { + type: "datamigration.googleapis.com/ConversionWorkspace" + pattern: "projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}" + }; + + // Full name of the workspace resource, in the form of: + // projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}. + string name = 1; + + // Required. The source engine details. + DatabaseEngineInfo source = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The destination engine details. + DatabaseEngineInfo destination = 3 [(google.api.field_behavior) = REQUIRED]; + + // A generic list of settings for the workspace. + // The settings are database pair dependant and can indicate default behavior + // for the mapping rules engine or turn on or off specific features. + // Such examples can be: convert_foreign_key_to_interleave=true, + // skip_triggers=false, ignore_non_table_synonyms=true + map global_settings = 4; + + // Output only. Whether the workspace has uncommitted changes (changes which + // were made after the workspace was committed). + bool has_uncommitted_changes = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The latest commit ID. + string latest_commit_id = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when the workspace was committed. + google.protobuf.Timestamp latest_commit_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when the workspace resource was created. + google.protobuf.Timestamp create_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when the workspace resource was last updated. + google.protobuf.Timestamp update_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The display name for the workspace. + string display_name = 11; +} + +// Execution log of a background job. +message BackgroundJobLogEntry { + // Final state after a job completes. + enum JobCompletionState { + // The status is not specified. This state is used when job is not yet + // finished. + JOB_COMPLETION_STATE_UNSPECIFIED = 0; + + // Success. + SUCCEEDED = 1; + + // Error. + FAILED = 2; + } + + // Details regarding a Seed background job. + message SeedJobDetails { + // The connection profile which was used for the seed job. + string connection_profile = 1; + } + + // Details regarding an Import Rules background job. + message ImportRulesJobDetails { + // File names used for the import rules job. + repeated string files = 1; + + // The requested file format. + ImportRulesFileFormat file_format = 2; + } + + // Details regarding a Convert background job. + message ConvertJobDetails { + // AIP-160 based filter used to specify the entities to convert + string filter = 1; + } + + // Details regarding an Apply background job. + message ApplyJobDetails { + // The connection profile which was used for the apply job. + string connection_profile = 1; + + // AIP-160 based filter used to specify the entities to apply + string filter = 2; + } + + // The background job log entry ID. + string id = 1; + + // The type of job that was executed. + BackgroundJobType job_type = 2; + + // The timestamp when the background job was started. + google.protobuf.Timestamp start_time = 3; + + // The timestamp when the background job was finished. + google.protobuf.Timestamp finish_time = 4; + + // Job completion state, i.e. the final state after the job completed. + JobCompletionState completion_state = 5; + + // Job completion comment, such as how many entities were seeded, + // how many warnings were found during conversion, and similar information. + string completion_comment = 6; + + // Whether the client requested the conversion workspace to be committed after + // a successful completion of the job. + bool request_autocommit = 7; + + oneof job_details { + // Seed job details. + SeedJobDetails seed_job_details = 100; + + // Import rules job details. + ImportRulesJobDetails import_rules_job_details = 101; + + // Convert job details. + ConvertJobDetails convert_job_details = 102; + + // Apply job details. + ApplyJobDetails apply_job_details = 103; + } +} + +// The base entity type for all the database related entities. +// The message contains the entity name, the name of its parent, the entity +// type, and the specific details per entity type. +message DatabaseEntity { + // The type of database entities tree. + enum TreeType { + // Tree type unspecified. + TREE_TYPE_UNSPECIFIED = 0; + + // Tree of entities loaded from a source database. + SOURCE = 1; + + // Tree of entities converted from the source tree using the mapping rules. + DRAFT = 2; + + // Tree of entities observed on the destination database. + DESTINATION = 3; + } + + // The short name (e.g. table name) of the entity. + string short_name = 1; + + // The full name of the parent entity (e.g. schema name). + string parent_entity = 2; + + // The type of tree the entity belongs to. + TreeType tree = 3; + + // The type of the database entity (table, view, index, ...). + DatabaseEntityType entity_type = 4; + + // Details about entity mappings. + // For source tree entities, this holds the draft entities which were + // generated by the mapping rules. + // For draft tree entities, this holds the source entities which were + // converted to form the draft entity. + // Destination entities will have no mapping details. + repeated EntityMapping mappings = 5; + + // The specific body for each entity type. + oneof entity_body { + // Schema. + SchemaEntity schema = 102; + + // Table. + TableEntity table = 103; + + // View. + ViewEntity view = 104; + + // Sequence. + SequenceEntity sequence = 105; + + // Stored procedure. + StoredProcedureEntity stored_procedure = 106; + + // Function. + FunctionEntity database_function = 107; + + // Synonym. + SynonymEntity synonym = 108; + + // Package. + PackageEntity database_package = 109; + } +} + +// Schema typically has no parent entity, but can have a parent entity +// DatabaseInstance (for database engines which support it). For some database +// engines, the terms schema and user can be used interchangeably when they +// refer to a namespace or a collection of other database entities. Can store +// additional information which is schema specific. +message SchemaEntity { + // Custom engine specific features. + google.protobuf.Struct custom_features = 1; +} + +// Table's parent is a schema. +message TableEntity { + // Table columns. + repeated ColumnEntity columns = 1; + + // Table constraints. + repeated ConstraintEntity constraints = 2; + + // Table indices. + repeated IndexEntity indices = 3; + + // Table triggers. + repeated TriggerEntity triggers = 4; + + // Custom engine specific features. + google.protobuf.Struct custom_features = 5; + + // Comment associated with the table. + string comment = 6; +} + +// Column is not used as an independent entity, it is retrieved as part of a +// Table entity. +message ColumnEntity { + // Column name. + string name = 1; + + // Column data type. + string data_type = 2; + + // Charset override - instead of table level charset. + string charset = 3; + + // Collation override - instead of table level collation. + string collation = 4; + + // Column length - e.g. varchar (50). + int64 length = 5; + + // Column precision - when relevant. + int32 precision = 6; + + // Column scale - when relevant. + int32 scale = 7; + + // Column fractional second precision - used for timestamp based datatypes. + int32 fractional_seconds_precision = 8; + + // Is the column of array type. + bool array = 9; + + // If the column is array, of which length. + int32 array_length = 10; + + // Is the column nullable. + bool nullable = 11; + + // Is the column auto-generated/identity. + bool auto_generated = 12; + + // Is the column a UDT. + bool udt = 13; + + // Custom engine specific features. + google.protobuf.Struct custom_features = 14; + + // Specifies the list of values allowed in the column. + // Only used for set data type. + repeated string set_values = 15; + + // Comment associated with the column. + string comment = 16; + + // Column order in the table. + int32 ordinal_position = 17; + + // Default value of the column. + string default_value = 18; +} + +// Constraint is not used as an independent entity, it is retrieved +// as part of another entity such as Table or View. +message ConstraintEntity { + // The name of the table constraint. + string name = 1; + + // Type of constraint, for example unique, primary key, foreign key (currently + // only primary key is supported). + string type = 2; + + // Table columns used as part of the Constraint, for example primary key + // constraint should list the columns which constitutes the key. + repeated string table_columns = 3; + + // Custom engine specific features. + google.protobuf.Struct custom_features = 4; + + // Reference columns which may be associated with the constraint. For example, + // if the constraint is a FOREIGN_KEY, this represents the list of full names + // of referenced columns by the foreign key. + repeated string reference_columns = 5; + + // Reference table which may be associated with the constraint. For example, + // if the constraint is a FOREIGN_KEY, this represents the list of full name + // of the referenced table by the foreign key. + string reference_table = 6; + + // Table which is associated with the constraint. In case the constraint + // is defined on a table, this field is left empty as this information is + // stored in parent_name. However, if constraint is defined on a view, this + // field stores the table name on which the view is defined. + string table_name = 7; +} + +// Index is not used as an independent entity, it is retrieved as part of a +// Table entity. +message IndexEntity { + // The name of the index. + string name = 1; + + // Type of index, for example B-TREE. + string type = 2; + + // Table columns used as part of the Index, for example B-TREE index should + // list the columns which constitutes the index. + repeated string table_columns = 3; + + // Boolean value indicating whether the index is unique. + bool unique = 4; + + // Custom engine specific features. + google.protobuf.Struct custom_features = 5; +} + +// Trigger is not used as an independent entity, it is retrieved as part of a +// Table entity. +message TriggerEntity { + // The name of the trigger. + string name = 1; + + // The DML, DDL, or database events that fire the trigger, for example + // INSERT, UPDATE. + repeated string triggering_events = 2; + + // Indicates when the trigger fires, for example BEFORE STATEMENT, AFTER EACH + // ROW. + string trigger_type = 3; + + // The SQL code which creates the trigger. + string sql_code = 4; + + // Custom engine specific features. + google.protobuf.Struct custom_features = 5; +} + +// View's parent is a schema. +message ViewEntity { + // The SQL code which creates the view. + string sql_code = 1; + + // Custom engine specific features. + google.protobuf.Struct custom_features = 2; + + // View constraints. + repeated ConstraintEntity constraints = 3; +} + +// Sequence's parent is a schema. +message SequenceEntity { + // Increment value for the sequence. + int64 increment = 1; + + // Start number for the sequence represented as bytes to accommodate large. + // numbers + bytes start_value = 2; + + // Maximum number for the sequence represented as bytes to accommodate large. + // numbers + bytes max_value = 3; + + // Minimum number for the sequence represented as bytes to accommodate large. + // numbers + bytes min_value = 4; + + // Indicates whether the sequence value should cycle through. + bool cycle = 5; + + // Indicates number of entries to cache / precreate. + int64 cache = 6; + + // Custom engine specific features. + google.protobuf.Struct custom_features = 7; +} + +// Stored procedure's parent is a schema. +message StoredProcedureEntity { + // The SQL code which creates the stored procedure. + string sql_code = 1; + + // Custom engine specific features. + google.protobuf.Struct custom_features = 2; +} + +// Function's parent is a schema. +message FunctionEntity { + // The SQL code which creates the function. + string sql_code = 1; + + // Custom engine specific features. + google.protobuf.Struct custom_features = 2; +} + +// Synonym's parent is a schema. +message SynonymEntity { + // The name of the entity for which the synonym is being created (the source). + string source_entity = 1; + + // The type of the entity for which the synonym is being created + // (usually a table or a sequence). + DatabaseEntityType source_type = 2; + + // Custom engine specific features. + google.protobuf.Struct custom_features = 3; +} + +// Package's parent is a schema. +message PackageEntity { + // The SQL code which creates the package. + string package_sql_code = 1; + + // The SQL code which creates the package body. If the package specification + // has cursors or subprograms, then the package body is mandatory. + string package_body = 2; + + // Custom engine specific features. + google.protobuf.Struct custom_features = 3; +} + +// Details of the mappings of a database entity. +message EntityMapping { + // Source entity full name. + // The source entity can also be a column, index or constraint using the + // same naming notation schema.table.column. + string source_entity = 1; + + // Target entity full name. + // The draft entity can also include a column, index or constraint using the + // same naming notation schema.table.column. + string draft_entity = 2; + + // Type of source entity. + DatabaseEntityType source_type = 4; + + // Type of draft entity. + DatabaseEntityType draft_type = 5; + + // Entity mapping log entries. + // Multiple rules can be effective and contribute changes to a converted + // entity, such as a rule can handle the entity name, another rule can handle + // an entity type. In addition, rules which did not change the entity are also + // logged along with the reason preventing them to do so. + repeated EntityMappingLogEntry mapping_log = 3; +} + +// A single record of a rule which was used for a mapping. +message EntityMappingLogEntry { + // Which rule caused this log entry. + string rule_id = 1; + + // Rule revision ID. + string rule_revision_id = 2; + + // Comment. + string mapping_comment = 3; +} + +// The type of database entities supported, +enum DatabaseEntityType { + // Unspecified database entity type. + DATABASE_ENTITY_TYPE_UNSPECIFIED = 0; + + // Schema. + DATABASE_ENTITY_TYPE_SCHEMA = 1; + + // Table. + DATABASE_ENTITY_TYPE_TABLE = 2; + + // Column. + DATABASE_ENTITY_TYPE_COLUMN = 3; + + // Constraint. + DATABASE_ENTITY_TYPE_CONSTRAINT = 4; + + // Index. + DATABASE_ENTITY_TYPE_INDEX = 5; + + // Trigger. + DATABASE_ENTITY_TYPE_TRIGGER = 6; + + // View. + DATABASE_ENTITY_TYPE_VIEW = 7; + + // Sequence. + DATABASE_ENTITY_TYPE_SEQUENCE = 8; + + // Stored Procedure. + DATABASE_ENTITY_TYPE_STORED_PROCEDURE = 9; + + // Function. + DATABASE_ENTITY_TYPE_FUNCTION = 10; + + // Synonym. + DATABASE_ENTITY_TYPE_SYNONYM = 11; + + // Package. + DATABASE_ENTITY_TYPE_DATABASE_PACKAGE = 12; + + // UDT. + DATABASE_ENTITY_TYPE_UDT = 13; + + // Materialized View. + DATABASE_ENTITY_TYPE_MATERIALIZED_VIEW = 14; + + // Database. + DATABASE_ENTITY_TYPE_DATABASE = 15; +} + +// The types of jobs that can be executed in the background. +enum BackgroundJobType { + // Unspecified background job type. + BACKGROUND_JOB_TYPE_UNSPECIFIED = 0; + + // Job to seed from the source database. + BACKGROUND_JOB_TYPE_SOURCE_SEED = 1; + + // Job to convert the source database into a draft of the destination + // database. + BACKGROUND_JOB_TYPE_CONVERT = 2; + + // Job to apply the draft tree onto the destination. + BACKGROUND_JOB_TYPE_APPLY_DESTINATION = 3; + + // Job to import and convert mapping rules from an external source such as an + // ora2pg config file. + BACKGROUND_JOB_TYPE_IMPORT_RULES_FILE = 5; +} + +// The format for the import rules file. +enum ImportRulesFileFormat { + // Unspecified rules format. + IMPORT_RULES_FILE_FORMAT_UNSPECIFIED = 0; + + // HarbourBridge session file. + IMPORT_RULES_FILE_FORMAT_HARBOUR_BRIDGE_SESSION_FILE = 1; + + // Ora2Pg configuration file. + IMPORT_RULES_FILE_FORMAT_ORATOPG_CONFIG_FILE = 2; +} diff --git a/packages/google-cloud-clouddms/protos/protos.d.ts b/packages/google-cloud-clouddms/protos/protos.d.ts index df0b6176962..3ad2c1ea8f2 100644 --- a/packages/google-cloud-clouddms/protos/protos.d.ts +++ b/packages/google-cloud-clouddms/protos/protos.d.ts @@ -283,6 +283,272 @@ export namespace google { * @returns Promise */ public deleteConnectionProfile(request: google.cloud.clouddms.v1.IDeleteConnectionProfileRequest): Promise; + + /** + * Calls CreatePrivateConnection. + * @param request CreatePrivateConnectionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createPrivateConnection(request: google.cloud.clouddms.v1.ICreatePrivateConnectionRequest, callback: google.cloud.clouddms.v1.DataMigrationService.CreatePrivateConnectionCallback): void; + + /** + * Calls CreatePrivateConnection. + * @param request CreatePrivateConnectionRequest message or plain object + * @returns Promise + */ + public createPrivateConnection(request: google.cloud.clouddms.v1.ICreatePrivateConnectionRequest): Promise; + + /** + * Calls GetPrivateConnection. + * @param request GetPrivateConnectionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PrivateConnection + */ + public getPrivateConnection(request: google.cloud.clouddms.v1.IGetPrivateConnectionRequest, callback: google.cloud.clouddms.v1.DataMigrationService.GetPrivateConnectionCallback): void; + + /** + * Calls GetPrivateConnection. + * @param request GetPrivateConnectionRequest message or plain object + * @returns Promise + */ + public getPrivateConnection(request: google.cloud.clouddms.v1.IGetPrivateConnectionRequest): Promise; + + /** + * Calls ListPrivateConnections. + * @param request ListPrivateConnectionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPrivateConnectionsResponse + */ + public listPrivateConnections(request: google.cloud.clouddms.v1.IListPrivateConnectionsRequest, callback: google.cloud.clouddms.v1.DataMigrationService.ListPrivateConnectionsCallback): void; + + /** + * Calls ListPrivateConnections. + * @param request ListPrivateConnectionsRequest message or plain object + * @returns Promise + */ + public listPrivateConnections(request: google.cloud.clouddms.v1.IListPrivateConnectionsRequest): Promise; + + /** + * Calls DeletePrivateConnection. + * @param request DeletePrivateConnectionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deletePrivateConnection(request: google.cloud.clouddms.v1.IDeletePrivateConnectionRequest, callback: google.cloud.clouddms.v1.DataMigrationService.DeletePrivateConnectionCallback): void; + + /** + * Calls DeletePrivateConnection. + * @param request DeletePrivateConnectionRequest message or plain object + * @returns Promise + */ + public deletePrivateConnection(request: google.cloud.clouddms.v1.IDeletePrivateConnectionRequest): Promise; + + /** + * Calls GetConversionWorkspace. + * @param request GetConversionWorkspaceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ConversionWorkspace + */ + public getConversionWorkspace(request: google.cloud.clouddms.v1.IGetConversionWorkspaceRequest, callback: google.cloud.clouddms.v1.DataMigrationService.GetConversionWorkspaceCallback): void; + + /** + * Calls GetConversionWorkspace. + * @param request GetConversionWorkspaceRequest message or plain object + * @returns Promise + */ + public getConversionWorkspace(request: google.cloud.clouddms.v1.IGetConversionWorkspaceRequest): Promise; + + /** + * Calls ListConversionWorkspaces. + * @param request ListConversionWorkspacesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListConversionWorkspacesResponse + */ + public listConversionWorkspaces(request: google.cloud.clouddms.v1.IListConversionWorkspacesRequest, callback: google.cloud.clouddms.v1.DataMigrationService.ListConversionWorkspacesCallback): void; + + /** + * Calls ListConversionWorkspaces. + * @param request ListConversionWorkspacesRequest message or plain object + * @returns Promise + */ + public listConversionWorkspaces(request: google.cloud.clouddms.v1.IListConversionWorkspacesRequest): Promise; + + /** + * Calls CreateConversionWorkspace. + * @param request CreateConversionWorkspaceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createConversionWorkspace(request: google.cloud.clouddms.v1.ICreateConversionWorkspaceRequest, callback: google.cloud.clouddms.v1.DataMigrationService.CreateConversionWorkspaceCallback): void; + + /** + * Calls CreateConversionWorkspace. + * @param request CreateConversionWorkspaceRequest message or plain object + * @returns Promise + */ + public createConversionWorkspace(request: google.cloud.clouddms.v1.ICreateConversionWorkspaceRequest): Promise; + + /** + * Calls UpdateConversionWorkspace. + * @param request UpdateConversionWorkspaceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateConversionWorkspace(request: google.cloud.clouddms.v1.IUpdateConversionWorkspaceRequest, callback: google.cloud.clouddms.v1.DataMigrationService.UpdateConversionWorkspaceCallback): void; + + /** + * Calls UpdateConversionWorkspace. + * @param request UpdateConversionWorkspaceRequest message or plain object + * @returns Promise + */ + public updateConversionWorkspace(request: google.cloud.clouddms.v1.IUpdateConversionWorkspaceRequest): Promise; + + /** + * Calls DeleteConversionWorkspace. + * @param request DeleteConversionWorkspaceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteConversionWorkspace(request: google.cloud.clouddms.v1.IDeleteConversionWorkspaceRequest, callback: google.cloud.clouddms.v1.DataMigrationService.DeleteConversionWorkspaceCallback): void; + + /** + * Calls DeleteConversionWorkspace. + * @param request DeleteConversionWorkspaceRequest message or plain object + * @returns Promise + */ + public deleteConversionWorkspace(request: google.cloud.clouddms.v1.IDeleteConversionWorkspaceRequest): Promise; + + /** + * Calls SeedConversionWorkspace. + * @param request SeedConversionWorkspaceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public seedConversionWorkspace(request: google.cloud.clouddms.v1.ISeedConversionWorkspaceRequest, callback: google.cloud.clouddms.v1.DataMigrationService.SeedConversionWorkspaceCallback): void; + + /** + * Calls SeedConversionWorkspace. + * @param request SeedConversionWorkspaceRequest message or plain object + * @returns Promise + */ + public seedConversionWorkspace(request: google.cloud.clouddms.v1.ISeedConversionWorkspaceRequest): Promise; + + /** + * Calls ImportMappingRules. + * @param request ImportMappingRulesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public importMappingRules(request: google.cloud.clouddms.v1.IImportMappingRulesRequest, callback: google.cloud.clouddms.v1.DataMigrationService.ImportMappingRulesCallback): void; + + /** + * Calls ImportMappingRules. + * @param request ImportMappingRulesRequest message or plain object + * @returns Promise + */ + public importMappingRules(request: google.cloud.clouddms.v1.IImportMappingRulesRequest): Promise; + + /** + * Calls ConvertConversionWorkspace. + * @param request ConvertConversionWorkspaceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public convertConversionWorkspace(request: google.cloud.clouddms.v1.IConvertConversionWorkspaceRequest, callback: google.cloud.clouddms.v1.DataMigrationService.ConvertConversionWorkspaceCallback): void; + + /** + * Calls ConvertConversionWorkspace. + * @param request ConvertConversionWorkspaceRequest message or plain object + * @returns Promise + */ + public convertConversionWorkspace(request: google.cloud.clouddms.v1.IConvertConversionWorkspaceRequest): Promise; + + /** + * Calls CommitConversionWorkspace. + * @param request CommitConversionWorkspaceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public commitConversionWorkspace(request: google.cloud.clouddms.v1.ICommitConversionWorkspaceRequest, callback: google.cloud.clouddms.v1.DataMigrationService.CommitConversionWorkspaceCallback): void; + + /** + * Calls CommitConversionWorkspace. + * @param request CommitConversionWorkspaceRequest message or plain object + * @returns Promise + */ + public commitConversionWorkspace(request: google.cloud.clouddms.v1.ICommitConversionWorkspaceRequest): Promise; + + /** + * Calls RollbackConversionWorkspace. + * @param request RollbackConversionWorkspaceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public rollbackConversionWorkspace(request: google.cloud.clouddms.v1.IRollbackConversionWorkspaceRequest, callback: google.cloud.clouddms.v1.DataMigrationService.RollbackConversionWorkspaceCallback): void; + + /** + * Calls RollbackConversionWorkspace. + * @param request RollbackConversionWorkspaceRequest message or plain object + * @returns Promise + */ + public rollbackConversionWorkspace(request: google.cloud.clouddms.v1.IRollbackConversionWorkspaceRequest): Promise; + + /** + * Calls ApplyConversionWorkspace. + * @param request ApplyConversionWorkspaceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public applyConversionWorkspace(request: google.cloud.clouddms.v1.IApplyConversionWorkspaceRequest, callback: google.cloud.clouddms.v1.DataMigrationService.ApplyConversionWorkspaceCallback): void; + + /** + * Calls ApplyConversionWorkspace. + * @param request ApplyConversionWorkspaceRequest message or plain object + * @returns Promise + */ + public applyConversionWorkspace(request: google.cloud.clouddms.v1.IApplyConversionWorkspaceRequest): Promise; + + /** + * Calls DescribeDatabaseEntities. + * @param request DescribeDatabaseEntitiesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DescribeDatabaseEntitiesResponse + */ + public describeDatabaseEntities(request: google.cloud.clouddms.v1.IDescribeDatabaseEntitiesRequest, callback: google.cloud.clouddms.v1.DataMigrationService.DescribeDatabaseEntitiesCallback): void; + + /** + * Calls DescribeDatabaseEntities. + * @param request DescribeDatabaseEntitiesRequest message or plain object + * @returns Promise + */ + public describeDatabaseEntities(request: google.cloud.clouddms.v1.IDescribeDatabaseEntitiesRequest): Promise; + + /** + * Calls SearchBackgroundJobs. + * @param request SearchBackgroundJobsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SearchBackgroundJobsResponse + */ + public searchBackgroundJobs(request: google.cloud.clouddms.v1.ISearchBackgroundJobsRequest, callback: google.cloud.clouddms.v1.DataMigrationService.SearchBackgroundJobsCallback): void; + + /** + * Calls SearchBackgroundJobs. + * @param request SearchBackgroundJobsRequest message or plain object + * @returns Promise + */ + public searchBackgroundJobs(request: google.cloud.clouddms.v1.ISearchBackgroundJobsRequest): Promise; + + /** + * Calls DescribeConversionWorkspaceRevisions. + * @param request DescribeConversionWorkspaceRevisionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DescribeConversionWorkspaceRevisionsResponse + */ + public describeConversionWorkspaceRevisions(request: google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsRequest, callback: google.cloud.clouddms.v1.DataMigrationService.DescribeConversionWorkspaceRevisionsCallback): void; + + /** + * Calls DescribeConversionWorkspaceRevisions. + * @param request DescribeConversionWorkspaceRevisionsRequest message or plain object + * @returns Promise + */ + public describeConversionWorkspaceRevisions(request: google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsRequest): Promise; + + /** + * Calls FetchStaticIps. + * @param request FetchStaticIpsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchStaticIpsResponse + */ + public fetchStaticIps(request: google.cloud.clouddms.v1.IFetchStaticIpsRequest, callback: google.cloud.clouddms.v1.DataMigrationService.FetchStaticIpsCallback): void; + + /** + * Calls FetchStaticIps. + * @param request FetchStaticIpsRequest message or plain object + * @returns Promise + */ + public fetchStaticIps(request: google.cloud.clouddms.v1.IFetchStaticIpsRequest): Promise; } namespace DataMigrationService { @@ -405,6 +671,139 @@ export namespace google { * @param [response] Operation */ type DeleteConnectionProfileCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|createPrivateConnection}. + * @param error Error, if any + * @param [response] Operation + */ + type CreatePrivateConnectionCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|getPrivateConnection}. + * @param error Error, if any + * @param [response] PrivateConnection + */ + type GetPrivateConnectionCallback = (error: (Error|null), response?: google.cloud.clouddms.v1.PrivateConnection) => void; + + /** + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|listPrivateConnections}. + * @param error Error, if any + * @param [response] ListPrivateConnectionsResponse + */ + type ListPrivateConnectionsCallback = (error: (Error|null), response?: google.cloud.clouddms.v1.ListPrivateConnectionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|deletePrivateConnection}. + * @param error Error, if any + * @param [response] Operation + */ + type DeletePrivateConnectionCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|getConversionWorkspace}. + * @param error Error, if any + * @param [response] ConversionWorkspace + */ + type GetConversionWorkspaceCallback = (error: (Error|null), response?: google.cloud.clouddms.v1.ConversionWorkspace) => void; + + /** + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|listConversionWorkspaces}. + * @param error Error, if any + * @param [response] ListConversionWorkspacesResponse + */ + type ListConversionWorkspacesCallback = (error: (Error|null), response?: google.cloud.clouddms.v1.ListConversionWorkspacesResponse) => void; + + /** + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|createConversionWorkspace}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateConversionWorkspaceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|updateConversionWorkspace}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateConversionWorkspaceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|deleteConversionWorkspace}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteConversionWorkspaceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|seedConversionWorkspace}. + * @param error Error, if any + * @param [response] Operation + */ + type SeedConversionWorkspaceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|importMappingRules}. + * @param error Error, if any + * @param [response] Operation + */ + type ImportMappingRulesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|convertConversionWorkspace}. + * @param error Error, if any + * @param [response] Operation + */ + type ConvertConversionWorkspaceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|commitConversionWorkspace}. + * @param error Error, if any + * @param [response] Operation + */ + type CommitConversionWorkspaceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|rollbackConversionWorkspace}. + * @param error Error, if any + * @param [response] Operation + */ + type RollbackConversionWorkspaceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|applyConversionWorkspace}. + * @param error Error, if any + * @param [response] Operation + */ + type ApplyConversionWorkspaceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|describeDatabaseEntities}. + * @param error Error, if any + * @param [response] DescribeDatabaseEntitiesResponse + */ + type DescribeDatabaseEntitiesCallback = (error: (Error|null), response?: google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse) => void; + + /** + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|searchBackgroundJobs}. + * @param error Error, if any + * @param [response] SearchBackgroundJobsResponse + */ + type SearchBackgroundJobsCallback = (error: (Error|null), response?: google.cloud.clouddms.v1.SearchBackgroundJobsResponse) => void; + + /** + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|describeConversionWorkspaceRevisions}. + * @param error Error, if any + * @param [response] DescribeConversionWorkspaceRevisionsResponse + */ + type DescribeConversionWorkspaceRevisionsCallback = (error: (Error|null), response?: google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|fetchStaticIps}. + * @param error Error, if any + * @param [response] FetchStaticIpsResponse + */ + type FetchStaticIpsCallback = (error: (Error|null), response?: google.cloud.clouddms.v1.FetchStaticIpsResponse) => void; } /** Properties of a ListMigrationJobsRequest. */ @@ -2417,6 +2816,12 @@ export namespace google { /** CreateConnectionProfileRequest requestId */ requestId?: (string|null); + + /** CreateConnectionProfileRequest validateOnly */ + validateOnly?: (boolean|null); + + /** CreateConnectionProfileRequest skipValidation */ + skipValidation?: (boolean|null); } /** Represents a CreateConnectionProfileRequest. */ @@ -2440,6 +2845,12 @@ export namespace google { /** CreateConnectionProfileRequest requestId. */ public requestId: string; + /** CreateConnectionProfileRequest validateOnly. */ + public validateOnly: boolean; + + /** CreateConnectionProfileRequest skipValidation. */ + public skipValidation: boolean; + /** * Creates a new CreateConnectionProfileRequest instance using the specified properties. * @param [properties] Properties to set @@ -2529,6 +2940,12 @@ export namespace google { /** UpdateConnectionProfileRequest requestId */ requestId?: (string|null); + + /** UpdateConnectionProfileRequest validateOnly */ + validateOnly?: (boolean|null); + + /** UpdateConnectionProfileRequest skipValidation */ + skipValidation?: (boolean|null); } /** Represents an UpdateConnectionProfileRequest. */ @@ -2549,6 +2966,12 @@ export namespace google { /** UpdateConnectionProfileRequest requestId. */ public requestId: string; + /** UpdateConnectionProfileRequest validateOnly. */ + public validateOnly: boolean; + + /** UpdateConnectionProfileRequest skipValidation. */ + public skipValidation: boolean; + /** * Creates a new UpdateConnectionProfileRequest instance using the specified properties. * @param [properties] Properties to set @@ -2736,2066 +3159,9516 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an OperationMetadata. */ - interface IOperationMetadata { + /** Properties of a CreatePrivateConnectionRequest. */ + interface ICreatePrivateConnectionRequest { - /** OperationMetadata createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** CreatePrivateConnectionRequest parent */ + parent?: (string|null); - /** OperationMetadata endTime */ - endTime?: (google.protobuf.ITimestamp|null); + /** CreatePrivateConnectionRequest privateConnectionId */ + privateConnectionId?: (string|null); - /** OperationMetadata target */ - target?: (string|null); + /** CreatePrivateConnectionRequest privateConnection */ + privateConnection?: (google.cloud.clouddms.v1.IPrivateConnection|null); - /** OperationMetadata verb */ - verb?: (string|null); + /** CreatePrivateConnectionRequest requestId */ + requestId?: (string|null); - /** OperationMetadata statusMessage */ - statusMessage?: (string|null); + /** CreatePrivateConnectionRequest skipValidation */ + skipValidation?: (boolean|null); + } - /** OperationMetadata requestedCancellation */ - requestedCancellation?: (boolean|null); - - /** OperationMetadata apiVersion */ - apiVersion?: (string|null); - } - - /** Represents an OperationMetadata. */ - class OperationMetadata implements IOperationMetadata { + /** Represents a CreatePrivateConnectionRequest. */ + class CreatePrivateConnectionRequest implements ICreatePrivateConnectionRequest { /** - * Constructs a new OperationMetadata. + * Constructs a new CreatePrivateConnectionRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.clouddms.v1.IOperationMetadata); - - /** OperationMetadata createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + constructor(properties?: google.cloud.clouddms.v1.ICreatePrivateConnectionRequest); - /** OperationMetadata endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata target. */ - public target: string; + /** CreatePrivateConnectionRequest parent. */ + public parent: string; - /** OperationMetadata verb. */ - public verb: string; + /** CreatePrivateConnectionRequest privateConnectionId. */ + public privateConnectionId: string; - /** OperationMetadata statusMessage. */ - public statusMessage: string; + /** CreatePrivateConnectionRequest privateConnection. */ + public privateConnection?: (google.cloud.clouddms.v1.IPrivateConnection|null); - /** OperationMetadata requestedCancellation. */ - public requestedCancellation: boolean; + /** CreatePrivateConnectionRequest requestId. */ + public requestId: string; - /** OperationMetadata apiVersion. */ - public apiVersion: string; + /** CreatePrivateConnectionRequest skipValidation. */ + public skipValidation: boolean; /** - * Creates a new OperationMetadata instance using the specified properties. + * Creates a new CreatePrivateConnectionRequest instance using the specified properties. * @param [properties] Properties to set - * @returns OperationMetadata instance + * @returns CreatePrivateConnectionRequest instance */ - public static create(properties?: google.cloud.clouddms.v1.IOperationMetadata): google.cloud.clouddms.v1.OperationMetadata; + public static create(properties?: google.cloud.clouddms.v1.ICreatePrivateConnectionRequest): google.cloud.clouddms.v1.CreatePrivateConnectionRequest; /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.clouddms.v1.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode + * Encodes the specified CreatePrivateConnectionRequest message. Does not implicitly {@link google.cloud.clouddms.v1.CreatePrivateConnectionRequest.verify|verify} messages. + * @param message CreatePrivateConnectionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.clouddms.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.clouddms.v1.ICreatePrivateConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode + * Encodes the specified CreatePrivateConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.CreatePrivateConnectionRequest.verify|verify} messages. + * @param message CreatePrivateConnectionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.clouddms.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.clouddms.v1.ICreatePrivateConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OperationMetadata message from the specified reader or buffer. + * Decodes a CreatePrivateConnectionRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OperationMetadata + * @returns CreatePrivateConnectionRequest * @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.clouddms.v1.OperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.clouddms.v1.CreatePrivateConnectionRequest; /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a CreatePrivateConnectionRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OperationMetadata + * @returns CreatePrivateConnectionRequest * @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.clouddms.v1.OperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.clouddms.v1.CreatePrivateConnectionRequest; /** - * Verifies an OperationMetadata message. + * Verifies a CreatePrivateConnectionRequest 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 OperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a CreatePrivateConnectionRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OperationMetadata + * @returns CreatePrivateConnectionRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.OperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.CreatePrivateConnectionRequest; /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @param message OperationMetadata + * Creates a plain object from a CreatePrivateConnectionRequest message. Also converts values to other types if specified. + * @param message CreatePrivateConnectionRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.clouddms.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.clouddms.v1.CreatePrivateConnectionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OperationMetadata to JSON. + * Converts this CreatePrivateConnectionRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for OperationMetadata + * Gets the default type url for CreatePrivateConnectionRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SslConfig. */ - interface ISslConfig { + /** Properties of a ListPrivateConnectionsRequest. */ + interface IListPrivateConnectionsRequest { - /** SslConfig type */ - type?: (google.cloud.clouddms.v1.SslConfig.SslType|keyof typeof google.cloud.clouddms.v1.SslConfig.SslType|null); + /** ListPrivateConnectionsRequest parent */ + parent?: (string|null); - /** SslConfig clientKey */ - clientKey?: (string|null); + /** ListPrivateConnectionsRequest pageSize */ + pageSize?: (number|null); - /** SslConfig clientCertificate */ - clientCertificate?: (string|null); + /** ListPrivateConnectionsRequest pageToken */ + pageToken?: (string|null); - /** SslConfig caCertificate */ - caCertificate?: (string|null); + /** ListPrivateConnectionsRequest filter */ + filter?: (string|null); + + /** ListPrivateConnectionsRequest orderBy */ + orderBy?: (string|null); } - /** Represents a SslConfig. */ - class SslConfig implements ISslConfig { + /** Represents a ListPrivateConnectionsRequest. */ + class ListPrivateConnectionsRequest implements IListPrivateConnectionsRequest { /** - * Constructs a new SslConfig. + * Constructs a new ListPrivateConnectionsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.clouddms.v1.ISslConfig); + constructor(properties?: google.cloud.clouddms.v1.IListPrivateConnectionsRequest); - /** SslConfig type. */ - public type: (google.cloud.clouddms.v1.SslConfig.SslType|keyof typeof google.cloud.clouddms.v1.SslConfig.SslType); + /** ListPrivateConnectionsRequest parent. */ + public parent: string; - /** SslConfig clientKey. */ - public clientKey: string; + /** ListPrivateConnectionsRequest pageSize. */ + public pageSize: number; - /** SslConfig clientCertificate. */ - public clientCertificate: string; + /** ListPrivateConnectionsRequest pageToken. */ + public pageToken: string; - /** SslConfig caCertificate. */ - public caCertificate: string; + /** ListPrivateConnectionsRequest filter. */ + public filter: string; + + /** ListPrivateConnectionsRequest orderBy. */ + public orderBy: string; /** - * Creates a new SslConfig instance using the specified properties. + * Creates a new ListPrivateConnectionsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SslConfig instance + * @returns ListPrivateConnectionsRequest instance */ - public static create(properties?: google.cloud.clouddms.v1.ISslConfig): google.cloud.clouddms.v1.SslConfig; + public static create(properties?: google.cloud.clouddms.v1.IListPrivateConnectionsRequest): google.cloud.clouddms.v1.ListPrivateConnectionsRequest; /** - * Encodes the specified SslConfig message. Does not implicitly {@link google.cloud.clouddms.v1.SslConfig.verify|verify} messages. - * @param message SslConfig message or plain object to encode + * Encodes the specified ListPrivateConnectionsRequest message. Does not implicitly {@link google.cloud.clouddms.v1.ListPrivateConnectionsRequest.verify|verify} messages. + * @param message ListPrivateConnectionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.clouddms.v1.ISslConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.clouddms.v1.IListPrivateConnectionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SslConfig message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.SslConfig.verify|verify} messages. - * @param message SslConfig message or plain object to encode + * Encodes the specified ListPrivateConnectionsRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ListPrivateConnectionsRequest.verify|verify} messages. + * @param message ListPrivateConnectionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.clouddms.v1.ISslConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.clouddms.v1.IListPrivateConnectionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SslConfig message from the specified reader or buffer. + * Decodes a ListPrivateConnectionsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SslConfig + * @returns ListPrivateConnectionsRequest * @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.clouddms.v1.SslConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.clouddms.v1.ListPrivateConnectionsRequest; /** - * Decodes a SslConfig message from the specified reader or buffer, length delimited. + * Decodes a ListPrivateConnectionsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SslConfig + * @returns ListPrivateConnectionsRequest * @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.clouddms.v1.SslConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.clouddms.v1.ListPrivateConnectionsRequest; /** - * Verifies a SslConfig message. + * Verifies a ListPrivateConnectionsRequest 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 SslConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ListPrivateConnectionsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SslConfig + * @returns ListPrivateConnectionsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.SslConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.ListPrivateConnectionsRequest; /** - * Creates a plain object from a SslConfig message. Also converts values to other types if specified. - * @param message SslConfig + * Creates a plain object from a ListPrivateConnectionsRequest message. Also converts values to other types if specified. + * @param message ListPrivateConnectionsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.clouddms.v1.SslConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.clouddms.v1.ListPrivateConnectionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SslConfig to JSON. + * Converts this ListPrivateConnectionsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SslConfig + * Gets the default type url for ListPrivateConnectionsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace SslConfig { - - /** SslType enum. */ - enum SslType { - SSL_TYPE_UNSPECIFIED = 0, - SERVER_ONLY = 1, - SERVER_CLIENT = 2 - } - } - - /** Properties of a MySqlConnectionProfile. */ - interface IMySqlConnectionProfile { - - /** MySqlConnectionProfile host */ - host?: (string|null); - - /** MySqlConnectionProfile port */ - port?: (number|null); - - /** MySqlConnectionProfile username */ - username?: (string|null); - - /** MySqlConnectionProfile password */ - password?: (string|null); + /** Properties of a ListPrivateConnectionsResponse. */ + interface IListPrivateConnectionsResponse { - /** MySqlConnectionProfile passwordSet */ - passwordSet?: (boolean|null); + /** ListPrivateConnectionsResponse privateConnections */ + privateConnections?: (google.cloud.clouddms.v1.IPrivateConnection[]|null); - /** MySqlConnectionProfile ssl */ - ssl?: (google.cloud.clouddms.v1.ISslConfig|null); + /** ListPrivateConnectionsResponse nextPageToken */ + nextPageToken?: (string|null); - /** MySqlConnectionProfile cloudSqlId */ - cloudSqlId?: (string|null); + /** ListPrivateConnectionsResponse unreachable */ + unreachable?: (string[]|null); } - /** Represents a MySqlConnectionProfile. */ - class MySqlConnectionProfile implements IMySqlConnectionProfile { + /** Represents a ListPrivateConnectionsResponse. */ + class ListPrivateConnectionsResponse implements IListPrivateConnectionsResponse { /** - * Constructs a new MySqlConnectionProfile. + * Constructs a new ListPrivateConnectionsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.clouddms.v1.IMySqlConnectionProfile); - - /** MySqlConnectionProfile host. */ - public host: string; - - /** MySqlConnectionProfile port. */ - public port: number; - - /** MySqlConnectionProfile username. */ - public username: string; - - /** MySqlConnectionProfile password. */ - public password: string; + constructor(properties?: google.cloud.clouddms.v1.IListPrivateConnectionsResponse); - /** MySqlConnectionProfile passwordSet. */ - public passwordSet: boolean; + /** ListPrivateConnectionsResponse privateConnections. */ + public privateConnections: google.cloud.clouddms.v1.IPrivateConnection[]; - /** MySqlConnectionProfile ssl. */ - public ssl?: (google.cloud.clouddms.v1.ISslConfig|null); + /** ListPrivateConnectionsResponse nextPageToken. */ + public nextPageToken: string; - /** MySqlConnectionProfile cloudSqlId. */ - public cloudSqlId: string; + /** ListPrivateConnectionsResponse unreachable. */ + public unreachable: string[]; /** - * Creates a new MySqlConnectionProfile instance using the specified properties. + * Creates a new ListPrivateConnectionsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns MySqlConnectionProfile instance + * @returns ListPrivateConnectionsResponse instance */ - public static create(properties?: google.cloud.clouddms.v1.IMySqlConnectionProfile): google.cloud.clouddms.v1.MySqlConnectionProfile; + public static create(properties?: google.cloud.clouddms.v1.IListPrivateConnectionsResponse): google.cloud.clouddms.v1.ListPrivateConnectionsResponse; /** - * Encodes the specified MySqlConnectionProfile message. Does not implicitly {@link google.cloud.clouddms.v1.MySqlConnectionProfile.verify|verify} messages. - * @param message MySqlConnectionProfile message or plain object to encode + * Encodes the specified ListPrivateConnectionsResponse message. Does not implicitly {@link google.cloud.clouddms.v1.ListPrivateConnectionsResponse.verify|verify} messages. + * @param message ListPrivateConnectionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.clouddms.v1.IMySqlConnectionProfile, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.clouddms.v1.IListPrivateConnectionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MySqlConnectionProfile message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.MySqlConnectionProfile.verify|verify} messages. - * @param message MySqlConnectionProfile message or plain object to encode + * Encodes the specified ListPrivateConnectionsResponse message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ListPrivateConnectionsResponse.verify|verify} messages. + * @param message ListPrivateConnectionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.clouddms.v1.IMySqlConnectionProfile, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.clouddms.v1.IListPrivateConnectionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MySqlConnectionProfile message from the specified reader or buffer. + * Decodes a ListPrivateConnectionsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MySqlConnectionProfile + * @returns ListPrivateConnectionsResponse * @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.clouddms.v1.MySqlConnectionProfile; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.clouddms.v1.ListPrivateConnectionsResponse; /** - * Decodes a MySqlConnectionProfile message from the specified reader or buffer, length delimited. + * Decodes a ListPrivateConnectionsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MySqlConnectionProfile + * @returns ListPrivateConnectionsResponse * @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.clouddms.v1.MySqlConnectionProfile; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.clouddms.v1.ListPrivateConnectionsResponse; /** - * Verifies a MySqlConnectionProfile message. + * Verifies a ListPrivateConnectionsResponse 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 MySqlConnectionProfile message from a plain object. Also converts values to their respective internal types. + * Creates a ListPrivateConnectionsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MySqlConnectionProfile + * @returns ListPrivateConnectionsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.MySqlConnectionProfile; + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.ListPrivateConnectionsResponse; /** - * Creates a plain object from a MySqlConnectionProfile message. Also converts values to other types if specified. - * @param message MySqlConnectionProfile + * Creates a plain object from a ListPrivateConnectionsResponse message. Also converts values to other types if specified. + * @param message ListPrivateConnectionsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.clouddms.v1.MySqlConnectionProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.clouddms.v1.ListPrivateConnectionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MySqlConnectionProfile to JSON. + * Converts this ListPrivateConnectionsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MySqlConnectionProfile + * Gets the default type url for ListPrivateConnectionsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PostgreSqlConnectionProfile. */ - interface IPostgreSqlConnectionProfile { - - /** PostgreSqlConnectionProfile host */ - host?: (string|null); - - /** PostgreSqlConnectionProfile port */ - port?: (number|null); - - /** PostgreSqlConnectionProfile username */ - username?: (string|null); + /** Properties of a DeletePrivateConnectionRequest. */ + interface IDeletePrivateConnectionRequest { - /** PostgreSqlConnectionProfile password */ - password?: (string|null); - - /** PostgreSqlConnectionProfile passwordSet */ - passwordSet?: (boolean|null); - - /** PostgreSqlConnectionProfile ssl */ - ssl?: (google.cloud.clouddms.v1.ISslConfig|null); + /** DeletePrivateConnectionRequest name */ + name?: (string|null); - /** PostgreSqlConnectionProfile cloudSqlId */ - cloudSqlId?: (string|null); + /** DeletePrivateConnectionRequest requestId */ + requestId?: (string|null); } - /** Represents a PostgreSqlConnectionProfile. */ - class PostgreSqlConnectionProfile implements IPostgreSqlConnectionProfile { + /** Represents a DeletePrivateConnectionRequest. */ + class DeletePrivateConnectionRequest implements IDeletePrivateConnectionRequest { /** - * Constructs a new PostgreSqlConnectionProfile. + * Constructs a new DeletePrivateConnectionRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.clouddms.v1.IPostgreSqlConnectionProfile); - - /** PostgreSqlConnectionProfile host. */ - public host: string; - - /** PostgreSqlConnectionProfile port. */ - public port: number; - - /** PostgreSqlConnectionProfile username. */ - public username: string; - - /** PostgreSqlConnectionProfile password. */ - public password: string; + constructor(properties?: google.cloud.clouddms.v1.IDeletePrivateConnectionRequest); - /** PostgreSqlConnectionProfile passwordSet. */ - public passwordSet: boolean; - - /** PostgreSqlConnectionProfile ssl. */ - public ssl?: (google.cloud.clouddms.v1.ISslConfig|null); + /** DeletePrivateConnectionRequest name. */ + public name: string; - /** PostgreSqlConnectionProfile cloudSqlId. */ - public cloudSqlId: string; + /** DeletePrivateConnectionRequest requestId. */ + public requestId: string; /** - * Creates a new PostgreSqlConnectionProfile instance using the specified properties. + * Creates a new DeletePrivateConnectionRequest instance using the specified properties. * @param [properties] Properties to set - * @returns PostgreSqlConnectionProfile instance + * @returns DeletePrivateConnectionRequest instance */ - public static create(properties?: google.cloud.clouddms.v1.IPostgreSqlConnectionProfile): google.cloud.clouddms.v1.PostgreSqlConnectionProfile; + public static create(properties?: google.cloud.clouddms.v1.IDeletePrivateConnectionRequest): google.cloud.clouddms.v1.DeletePrivateConnectionRequest; /** - * Encodes the specified PostgreSqlConnectionProfile message. Does not implicitly {@link google.cloud.clouddms.v1.PostgreSqlConnectionProfile.verify|verify} messages. - * @param message PostgreSqlConnectionProfile message or plain object to encode + * Encodes the specified DeletePrivateConnectionRequest message. Does not implicitly {@link google.cloud.clouddms.v1.DeletePrivateConnectionRequest.verify|verify} messages. + * @param message DeletePrivateConnectionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.clouddms.v1.IPostgreSqlConnectionProfile, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.clouddms.v1.IDeletePrivateConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PostgreSqlConnectionProfile message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.PostgreSqlConnectionProfile.verify|verify} messages. - * @param message PostgreSqlConnectionProfile message or plain object to encode + * Encodes the specified DeletePrivateConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.DeletePrivateConnectionRequest.verify|verify} messages. + * @param message DeletePrivateConnectionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.clouddms.v1.IPostgreSqlConnectionProfile, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.clouddms.v1.IDeletePrivateConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PostgreSqlConnectionProfile message from the specified reader or buffer. + * Decodes a DeletePrivateConnectionRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PostgreSqlConnectionProfile + * @returns DeletePrivateConnectionRequest * @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.clouddms.v1.PostgreSqlConnectionProfile; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.clouddms.v1.DeletePrivateConnectionRequest; /** - * Decodes a PostgreSqlConnectionProfile message from the specified reader or buffer, length delimited. + * Decodes a DeletePrivateConnectionRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PostgreSqlConnectionProfile + * @returns DeletePrivateConnectionRequest * @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.clouddms.v1.PostgreSqlConnectionProfile; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.clouddms.v1.DeletePrivateConnectionRequest; /** - * Verifies a PostgreSqlConnectionProfile message. + * Verifies a DeletePrivateConnectionRequest 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 PostgreSqlConnectionProfile message from a plain object. Also converts values to their respective internal types. + * Creates a DeletePrivateConnectionRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PostgreSqlConnectionProfile + * @returns DeletePrivateConnectionRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.PostgreSqlConnectionProfile; + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.DeletePrivateConnectionRequest; /** - * Creates a plain object from a PostgreSqlConnectionProfile message. Also converts values to other types if specified. - * @param message PostgreSqlConnectionProfile + * Creates a plain object from a DeletePrivateConnectionRequest message. Also converts values to other types if specified. + * @param message DeletePrivateConnectionRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.clouddms.v1.PostgreSqlConnectionProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.clouddms.v1.DeletePrivateConnectionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PostgreSqlConnectionProfile to JSON. + * Converts this DeletePrivateConnectionRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PostgreSqlConnectionProfile + * Gets the default type url for DeletePrivateConnectionRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CloudSqlConnectionProfile. */ - interface ICloudSqlConnectionProfile { - - /** CloudSqlConnectionProfile cloudSqlId */ - cloudSqlId?: (string|null); - - /** CloudSqlConnectionProfile settings */ - settings?: (google.cloud.clouddms.v1.ICloudSqlSettings|null); - - /** CloudSqlConnectionProfile privateIp */ - privateIp?: (string|null); + /** Properties of a GetPrivateConnectionRequest. */ + interface IGetPrivateConnectionRequest { - /** CloudSqlConnectionProfile publicIp */ - publicIp?: (string|null); + /** GetPrivateConnectionRequest name */ + name?: (string|null); } - /** Represents a CloudSqlConnectionProfile. */ - class CloudSqlConnectionProfile implements ICloudSqlConnectionProfile { + /** Represents a GetPrivateConnectionRequest. */ + class GetPrivateConnectionRequest implements IGetPrivateConnectionRequest { /** - * Constructs a new CloudSqlConnectionProfile. + * Constructs a new GetPrivateConnectionRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.clouddms.v1.ICloudSqlConnectionProfile); - - /** CloudSqlConnectionProfile cloudSqlId. */ - public cloudSqlId: string; - - /** CloudSqlConnectionProfile settings. */ - public settings?: (google.cloud.clouddms.v1.ICloudSqlSettings|null); - - /** CloudSqlConnectionProfile privateIp. */ - public privateIp: string; + constructor(properties?: google.cloud.clouddms.v1.IGetPrivateConnectionRequest); - /** CloudSqlConnectionProfile publicIp. */ - public publicIp: string; + /** GetPrivateConnectionRequest name. */ + public name: string; /** - * Creates a new CloudSqlConnectionProfile instance using the specified properties. + * Creates a new GetPrivateConnectionRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CloudSqlConnectionProfile instance + * @returns GetPrivateConnectionRequest instance */ - public static create(properties?: google.cloud.clouddms.v1.ICloudSqlConnectionProfile): google.cloud.clouddms.v1.CloudSqlConnectionProfile; + public static create(properties?: google.cloud.clouddms.v1.IGetPrivateConnectionRequest): google.cloud.clouddms.v1.GetPrivateConnectionRequest; /** - * Encodes the specified CloudSqlConnectionProfile message. Does not implicitly {@link google.cloud.clouddms.v1.CloudSqlConnectionProfile.verify|verify} messages. - * @param message CloudSqlConnectionProfile message or plain object to encode + * Encodes the specified GetPrivateConnectionRequest message. Does not implicitly {@link google.cloud.clouddms.v1.GetPrivateConnectionRequest.verify|verify} messages. + * @param message GetPrivateConnectionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.clouddms.v1.ICloudSqlConnectionProfile, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.clouddms.v1.IGetPrivateConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CloudSqlConnectionProfile message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.CloudSqlConnectionProfile.verify|verify} messages. - * @param message CloudSqlConnectionProfile message or plain object to encode + * Encodes the specified GetPrivateConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.GetPrivateConnectionRequest.verify|verify} messages. + * @param message GetPrivateConnectionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.clouddms.v1.ICloudSqlConnectionProfile, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.clouddms.v1.IGetPrivateConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CloudSqlConnectionProfile message from the specified reader or buffer. + * Decodes a GetPrivateConnectionRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CloudSqlConnectionProfile + * @returns GetPrivateConnectionRequest * @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.clouddms.v1.CloudSqlConnectionProfile; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.clouddms.v1.GetPrivateConnectionRequest; /** - * Decodes a CloudSqlConnectionProfile message from the specified reader or buffer, length delimited. + * Decodes a GetPrivateConnectionRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CloudSqlConnectionProfile + * @returns GetPrivateConnectionRequest * @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.clouddms.v1.CloudSqlConnectionProfile; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.clouddms.v1.GetPrivateConnectionRequest; /** - * Verifies a CloudSqlConnectionProfile message. + * Verifies a GetPrivateConnectionRequest 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 CloudSqlConnectionProfile message from a plain object. Also converts values to their respective internal types. + * Creates a GetPrivateConnectionRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CloudSqlConnectionProfile + * @returns GetPrivateConnectionRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.CloudSqlConnectionProfile; + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.GetPrivateConnectionRequest; /** - * Creates a plain object from a CloudSqlConnectionProfile message. Also converts values to other types if specified. - * @param message CloudSqlConnectionProfile + * Creates a plain object from a GetPrivateConnectionRequest message. Also converts values to other types if specified. + * @param message GetPrivateConnectionRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.clouddms.v1.CloudSqlConnectionProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.clouddms.v1.GetPrivateConnectionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CloudSqlConnectionProfile to JSON. + * Converts this GetPrivateConnectionRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CloudSqlConnectionProfile + * Gets the default type url for GetPrivateConnectionRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SqlAclEntry. */ - interface ISqlAclEntry { + /** Properties of an OperationMetadata. */ + interface IOperationMetadata { - /** SqlAclEntry value */ - value?: (string|null); + /** OperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** SqlAclEntry expireTime */ - expireTime?: (google.protobuf.ITimestamp|null); + /** OperationMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); - /** SqlAclEntry ttl */ - ttl?: (google.protobuf.IDuration|null); + /** OperationMetadata target */ + target?: (string|null); - /** SqlAclEntry label */ - label?: (string|null); + /** OperationMetadata verb */ + verb?: (string|null); + + /** OperationMetadata statusMessage */ + statusMessage?: (string|null); + + /** OperationMetadata requestedCancellation */ + requestedCancellation?: (boolean|null); + + /** OperationMetadata apiVersion */ + apiVersion?: (string|null); } - /** Represents a SqlAclEntry. */ - class SqlAclEntry implements ISqlAclEntry { + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { /** - * Constructs a new SqlAclEntry. + * Constructs a new OperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.clouddms.v1.ISqlAclEntry); + constructor(properties?: google.cloud.clouddms.v1.IOperationMetadata); - /** SqlAclEntry value. */ - public value: string; + /** OperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** SqlAclEntry expireTime. */ - public expireTime?: (google.protobuf.ITimestamp|null); + /** OperationMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); - /** SqlAclEntry ttl. */ - public ttl?: (google.protobuf.IDuration|null); + /** OperationMetadata target. */ + public target: string; - /** SqlAclEntry label. */ - public label: string; + /** OperationMetadata verb. */ + public verb: string; - /** SqlAclEntry expiration. */ - public expiration?: ("expireTime"|"ttl"); + /** OperationMetadata statusMessage. */ + public statusMessage: string; + + /** OperationMetadata requestedCancellation. */ + public requestedCancellation: boolean; + + /** OperationMetadata apiVersion. */ + public apiVersion: string; /** - * Creates a new SqlAclEntry instance using the specified properties. + * Creates a new OperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns SqlAclEntry instance + * @returns OperationMetadata instance */ - public static create(properties?: google.cloud.clouddms.v1.ISqlAclEntry): google.cloud.clouddms.v1.SqlAclEntry; + public static create(properties?: google.cloud.clouddms.v1.IOperationMetadata): google.cloud.clouddms.v1.OperationMetadata; /** - * Encodes the specified SqlAclEntry message. Does not implicitly {@link google.cloud.clouddms.v1.SqlAclEntry.verify|verify} messages. - * @param message SqlAclEntry message or plain object to encode + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.clouddms.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.clouddms.v1.ISqlAclEntry, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.clouddms.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SqlAclEntry message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.SqlAclEntry.verify|verify} messages. - * @param message SqlAclEntry message or plain object to encode + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.clouddms.v1.ISqlAclEntry, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.clouddms.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SqlAclEntry message from the specified reader or buffer. + * Decodes an OperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SqlAclEntry + * @returns OperationMetadata * @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.clouddms.v1.SqlAclEntry; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.clouddms.v1.OperationMetadata; /** - * Decodes a SqlAclEntry message from the specified reader or buffer, length delimited. + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SqlAclEntry + * @returns OperationMetadata * @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.clouddms.v1.SqlAclEntry; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.clouddms.v1.OperationMetadata; /** - * Verifies a SqlAclEntry message. + * Verifies an OperationMetadata 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 SqlAclEntry message from a plain object. Also converts values to their respective internal types. + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SqlAclEntry + * @returns OperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.SqlAclEntry; + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.OperationMetadata; /** - * Creates a plain object from a SqlAclEntry message. Also converts values to other types if specified. - * @param message SqlAclEntry + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @param message OperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.clouddms.v1.SqlAclEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.clouddms.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SqlAclEntry to JSON. + * Converts this OperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SqlAclEntry + * Gets the default type url for OperationMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SqlIpConfig. */ - interface ISqlIpConfig { + /** Properties of a ListConversionWorkspacesRequest. */ + interface IListConversionWorkspacesRequest { - /** SqlIpConfig enableIpv4 */ - enableIpv4?: (google.protobuf.IBoolValue|null); + /** ListConversionWorkspacesRequest parent */ + parent?: (string|null); - /** SqlIpConfig privateNetwork */ - privateNetwork?: (string|null); + /** ListConversionWorkspacesRequest pageSize */ + pageSize?: (number|null); - /** SqlIpConfig requireSsl */ - requireSsl?: (google.protobuf.IBoolValue|null); + /** ListConversionWorkspacesRequest pageToken */ + pageToken?: (string|null); - /** SqlIpConfig authorizedNetworks */ - authorizedNetworks?: (google.cloud.clouddms.v1.ISqlAclEntry[]|null); + /** ListConversionWorkspacesRequest filter */ + filter?: (string|null); } - /** Represents a SqlIpConfig. */ - class SqlIpConfig implements ISqlIpConfig { + /** Represents a ListConversionWorkspacesRequest. */ + class ListConversionWorkspacesRequest implements IListConversionWorkspacesRequest { /** - * Constructs a new SqlIpConfig. + * Constructs a new ListConversionWorkspacesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.clouddms.v1.ISqlIpConfig); + constructor(properties?: google.cloud.clouddms.v1.IListConversionWorkspacesRequest); - /** SqlIpConfig enableIpv4. */ - public enableIpv4?: (google.protobuf.IBoolValue|null); + /** ListConversionWorkspacesRequest parent. */ + public parent: string; - /** SqlIpConfig privateNetwork. */ - public privateNetwork: string; + /** ListConversionWorkspacesRequest pageSize. */ + public pageSize: number; - /** SqlIpConfig requireSsl. */ - public requireSsl?: (google.protobuf.IBoolValue|null); + /** ListConversionWorkspacesRequest pageToken. */ + public pageToken: string; - /** SqlIpConfig authorizedNetworks. */ - public authorizedNetworks: google.cloud.clouddms.v1.ISqlAclEntry[]; + /** ListConversionWorkspacesRequest filter. */ + public filter: string; /** - * Creates a new SqlIpConfig instance using the specified properties. + * Creates a new ListConversionWorkspacesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SqlIpConfig instance + * @returns ListConversionWorkspacesRequest instance */ - public static create(properties?: google.cloud.clouddms.v1.ISqlIpConfig): google.cloud.clouddms.v1.SqlIpConfig; + public static create(properties?: google.cloud.clouddms.v1.IListConversionWorkspacesRequest): google.cloud.clouddms.v1.ListConversionWorkspacesRequest; /** - * Encodes the specified SqlIpConfig message. Does not implicitly {@link google.cloud.clouddms.v1.SqlIpConfig.verify|verify} messages. - * @param message SqlIpConfig message or plain object to encode + * Encodes the specified ListConversionWorkspacesRequest message. Does not implicitly {@link google.cloud.clouddms.v1.ListConversionWorkspacesRequest.verify|verify} messages. + * @param message ListConversionWorkspacesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.clouddms.v1.ISqlIpConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.clouddms.v1.IListConversionWorkspacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SqlIpConfig message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.SqlIpConfig.verify|verify} messages. - * @param message SqlIpConfig message or plain object to encode + * Encodes the specified ListConversionWorkspacesRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ListConversionWorkspacesRequest.verify|verify} messages. + * @param message ListConversionWorkspacesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.clouddms.v1.ISqlIpConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.clouddms.v1.IListConversionWorkspacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SqlIpConfig message from the specified reader or buffer. + * Decodes a ListConversionWorkspacesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SqlIpConfig + * @returns ListConversionWorkspacesRequest * @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.clouddms.v1.SqlIpConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.clouddms.v1.ListConversionWorkspacesRequest; /** - * Decodes a SqlIpConfig message from the specified reader or buffer, length delimited. + * Decodes a ListConversionWorkspacesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SqlIpConfig + * @returns ListConversionWorkspacesRequest * @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.clouddms.v1.SqlIpConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.clouddms.v1.ListConversionWorkspacesRequest; /** - * Verifies a SqlIpConfig message. + * Verifies a ListConversionWorkspacesRequest 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 SqlIpConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ListConversionWorkspacesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SqlIpConfig + * @returns ListConversionWorkspacesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.SqlIpConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.ListConversionWorkspacesRequest; /** - * Creates a plain object from a SqlIpConfig message. Also converts values to other types if specified. - * @param message SqlIpConfig + * Creates a plain object from a ListConversionWorkspacesRequest message. Also converts values to other types if specified. + * @param message ListConversionWorkspacesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.clouddms.v1.SqlIpConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.clouddms.v1.ListConversionWorkspacesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SqlIpConfig to JSON. + * Converts this ListConversionWorkspacesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SqlIpConfig + * Gets the default type url for ListConversionWorkspacesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CloudSqlSettings. */ - interface ICloudSqlSettings { + /** Properties of a ListConversionWorkspacesResponse. */ + interface IListConversionWorkspacesResponse { - /** CloudSqlSettings databaseVersion */ - databaseVersion?: (google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion|keyof typeof google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion|null); + /** ListConversionWorkspacesResponse conversionWorkspaces */ + conversionWorkspaces?: (google.cloud.clouddms.v1.IConversionWorkspace[]|null); - /** CloudSqlSettings userLabels */ - userLabels?: ({ [k: string]: string }|null); + /** ListConversionWorkspacesResponse nextPageToken */ + nextPageToken?: (string|null); - /** CloudSqlSettings tier */ - tier?: (string|null); + /** ListConversionWorkspacesResponse unreachable */ + unreachable?: (string[]|null); + } - /** CloudSqlSettings storageAutoResizeLimit */ - storageAutoResizeLimit?: (google.protobuf.IInt64Value|null); + /** Represents a ListConversionWorkspacesResponse. */ + class ListConversionWorkspacesResponse implements IListConversionWorkspacesResponse { - /** CloudSqlSettings activationPolicy */ - activationPolicy?: (google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy|keyof typeof google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy|null); + /** + * Constructs a new ListConversionWorkspacesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IListConversionWorkspacesResponse); - /** CloudSqlSettings ipConfig */ - ipConfig?: (google.cloud.clouddms.v1.ISqlIpConfig|null); + /** ListConversionWorkspacesResponse conversionWorkspaces. */ + public conversionWorkspaces: google.cloud.clouddms.v1.IConversionWorkspace[]; - /** CloudSqlSettings autoStorageIncrease */ - autoStorageIncrease?: (google.protobuf.IBoolValue|null); + /** ListConversionWorkspacesResponse nextPageToken. */ + public nextPageToken: string; - /** CloudSqlSettings databaseFlags */ - databaseFlags?: ({ [k: string]: string }|null); + /** ListConversionWorkspacesResponse unreachable. */ + public unreachable: string[]; - /** CloudSqlSettings dataDiskType */ - dataDiskType?: (google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType|keyof typeof google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType|null); - - /** CloudSqlSettings dataDiskSizeGb */ - dataDiskSizeGb?: (google.protobuf.IInt64Value|null); - - /** CloudSqlSettings zone */ - zone?: (string|null); - - /** CloudSqlSettings sourceId */ - sourceId?: (string|null); - - /** CloudSqlSettings rootPassword */ - rootPassword?: (string|null); - - /** CloudSqlSettings rootPasswordSet */ - rootPasswordSet?: (boolean|null); - - /** CloudSqlSettings collation */ - collation?: (string|null); - } - - /** Represents a CloudSqlSettings. */ - class CloudSqlSettings implements ICloudSqlSettings { - - /** - * Constructs a new CloudSqlSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.clouddms.v1.ICloudSqlSettings); - - /** CloudSqlSettings databaseVersion. */ - public databaseVersion: (google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion|keyof typeof google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion); - - /** CloudSqlSettings userLabels. */ - public userLabels: { [k: string]: string }; - - /** CloudSqlSettings tier. */ - public tier: string; - - /** CloudSqlSettings storageAutoResizeLimit. */ - public storageAutoResizeLimit?: (google.protobuf.IInt64Value|null); - - /** CloudSqlSettings activationPolicy. */ - public activationPolicy: (google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy|keyof typeof google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy); - - /** CloudSqlSettings ipConfig. */ - public ipConfig?: (google.cloud.clouddms.v1.ISqlIpConfig|null); - - /** CloudSqlSettings autoStorageIncrease. */ - public autoStorageIncrease?: (google.protobuf.IBoolValue|null); - - /** CloudSqlSettings databaseFlags. */ - public databaseFlags: { [k: string]: string }; - - /** CloudSqlSettings dataDiskType. */ - public dataDiskType: (google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType|keyof typeof google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType); - - /** CloudSqlSettings dataDiskSizeGb. */ - public dataDiskSizeGb?: (google.protobuf.IInt64Value|null); - - /** CloudSqlSettings zone. */ - public zone: string; - - /** CloudSqlSettings sourceId. */ - public sourceId: string; - - /** CloudSqlSettings rootPassword. */ - public rootPassword: string; - - /** CloudSqlSettings rootPasswordSet. */ - public rootPasswordSet: boolean; - - /** CloudSqlSettings collation. */ - public collation: string; + /** + * Creates a new ListConversionWorkspacesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListConversionWorkspacesResponse instance + */ + public static create(properties?: google.cloud.clouddms.v1.IListConversionWorkspacesResponse): google.cloud.clouddms.v1.ListConversionWorkspacesResponse; /** - * Creates a new CloudSqlSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudSqlSettings instance - */ - public static create(properties?: google.cloud.clouddms.v1.ICloudSqlSettings): google.cloud.clouddms.v1.CloudSqlSettings; - - /** - * Encodes the specified CloudSqlSettings message. Does not implicitly {@link google.cloud.clouddms.v1.CloudSqlSettings.verify|verify} messages. - * @param message CloudSqlSettings message or plain object to encode + * Encodes the specified ListConversionWorkspacesResponse message. Does not implicitly {@link google.cloud.clouddms.v1.ListConversionWorkspacesResponse.verify|verify} messages. + * @param message ListConversionWorkspacesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.clouddms.v1.ICloudSqlSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.clouddms.v1.IListConversionWorkspacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CloudSqlSettings message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.CloudSqlSettings.verify|verify} messages. - * @param message CloudSqlSettings message or plain object to encode + * Encodes the specified ListConversionWorkspacesResponse message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ListConversionWorkspacesResponse.verify|verify} messages. + * @param message ListConversionWorkspacesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.clouddms.v1.ICloudSqlSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.clouddms.v1.IListConversionWorkspacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CloudSqlSettings message from the specified reader or buffer. + * Decodes a ListConversionWorkspacesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CloudSqlSettings + * @returns ListConversionWorkspacesResponse * @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.clouddms.v1.CloudSqlSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.clouddms.v1.ListConversionWorkspacesResponse; /** - * Decodes a CloudSqlSettings message from the specified reader or buffer, length delimited. + * Decodes a ListConversionWorkspacesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CloudSqlSettings + * @returns ListConversionWorkspacesResponse * @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.clouddms.v1.CloudSqlSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.clouddms.v1.ListConversionWorkspacesResponse; /** - * Verifies a CloudSqlSettings message. + * Verifies a ListConversionWorkspacesResponse 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 CloudSqlSettings message from a plain object. Also converts values to their respective internal types. + * Creates a ListConversionWorkspacesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CloudSqlSettings + * @returns ListConversionWorkspacesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.CloudSqlSettings; + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.ListConversionWorkspacesResponse; /** - * Creates a plain object from a CloudSqlSettings message. Also converts values to other types if specified. - * @param message CloudSqlSettings + * Creates a plain object from a ListConversionWorkspacesResponse message. Also converts values to other types if specified. + * @param message ListConversionWorkspacesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.clouddms.v1.CloudSqlSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.clouddms.v1.ListConversionWorkspacesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CloudSqlSettings to JSON. + * Converts this ListConversionWorkspacesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CloudSqlSettings + * Gets the default type url for ListConversionWorkspacesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace CloudSqlSettings { - - /** SqlActivationPolicy enum. */ - enum SqlActivationPolicy { - SQL_ACTIVATION_POLICY_UNSPECIFIED = 0, - ALWAYS = 1, - NEVER = 2 - } - - /** SqlDataDiskType enum. */ - enum SqlDataDiskType { - SQL_DATA_DISK_TYPE_UNSPECIFIED = 0, - PD_SSD = 1, - PD_HDD = 2 - } - - /** SqlDatabaseVersion enum. */ - enum SqlDatabaseVersion { - SQL_DATABASE_VERSION_UNSPECIFIED = 0, - MYSQL_5_6 = 1, - MYSQL_5_7 = 2, - POSTGRES_9_6 = 3, - POSTGRES_11 = 4, - POSTGRES_10 = 5, - MYSQL_8_0 = 6, - POSTGRES_12 = 7, - POSTGRES_13 = 8 - } - } + /** Properties of a GetConversionWorkspaceRequest. */ + interface IGetConversionWorkspaceRequest { - /** Properties of a StaticIpConnectivity. */ - interface IStaticIpConnectivity { + /** GetConversionWorkspaceRequest name */ + name?: (string|null); } - /** Represents a StaticIpConnectivity. */ - class StaticIpConnectivity implements IStaticIpConnectivity { + /** Represents a GetConversionWorkspaceRequest. */ + class GetConversionWorkspaceRequest implements IGetConversionWorkspaceRequest { /** - * Constructs a new StaticIpConnectivity. + * Constructs a new GetConversionWorkspaceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.clouddms.v1.IStaticIpConnectivity); + constructor(properties?: google.cloud.clouddms.v1.IGetConversionWorkspaceRequest); + + /** GetConversionWorkspaceRequest name. */ + public name: string; /** - * Creates a new StaticIpConnectivity instance using the specified properties. + * Creates a new GetConversionWorkspaceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns StaticIpConnectivity instance + * @returns GetConversionWorkspaceRequest instance */ - public static create(properties?: google.cloud.clouddms.v1.IStaticIpConnectivity): google.cloud.clouddms.v1.StaticIpConnectivity; + public static create(properties?: google.cloud.clouddms.v1.IGetConversionWorkspaceRequest): google.cloud.clouddms.v1.GetConversionWorkspaceRequest; /** - * Encodes the specified StaticIpConnectivity message. Does not implicitly {@link google.cloud.clouddms.v1.StaticIpConnectivity.verify|verify} messages. - * @param message StaticIpConnectivity message or plain object to encode + * Encodes the specified GetConversionWorkspaceRequest message. Does not implicitly {@link google.cloud.clouddms.v1.GetConversionWorkspaceRequest.verify|verify} messages. + * @param message GetConversionWorkspaceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.clouddms.v1.IStaticIpConnectivity, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.clouddms.v1.IGetConversionWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StaticIpConnectivity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.StaticIpConnectivity.verify|verify} messages. - * @param message StaticIpConnectivity message or plain object to encode + * Encodes the specified GetConversionWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.GetConversionWorkspaceRequest.verify|verify} messages. + * @param message GetConversionWorkspaceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.clouddms.v1.IStaticIpConnectivity, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.clouddms.v1.IGetConversionWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StaticIpConnectivity message from the specified reader or buffer. + * Decodes a GetConversionWorkspaceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StaticIpConnectivity + * @returns GetConversionWorkspaceRequest * @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.clouddms.v1.StaticIpConnectivity; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.clouddms.v1.GetConversionWorkspaceRequest; /** - * Decodes a StaticIpConnectivity message from the specified reader or buffer, length delimited. + * Decodes a GetConversionWorkspaceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StaticIpConnectivity + * @returns GetConversionWorkspaceRequest * @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.clouddms.v1.StaticIpConnectivity; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.clouddms.v1.GetConversionWorkspaceRequest; /** - * Verifies a StaticIpConnectivity message. + * Verifies a GetConversionWorkspaceRequest 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 StaticIpConnectivity message from a plain object. Also converts values to their respective internal types. + * Creates a GetConversionWorkspaceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StaticIpConnectivity + * @returns GetConversionWorkspaceRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.StaticIpConnectivity; + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.GetConversionWorkspaceRequest; /** - * Creates a plain object from a StaticIpConnectivity message. Also converts values to other types if specified. - * @param message StaticIpConnectivity + * Creates a plain object from a GetConversionWorkspaceRequest message. Also converts values to other types if specified. + * @param message GetConversionWorkspaceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.clouddms.v1.StaticIpConnectivity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.clouddms.v1.GetConversionWorkspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StaticIpConnectivity to JSON. + * Converts this GetConversionWorkspaceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for StaticIpConnectivity + * Gets the default type url for GetConversionWorkspaceRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ReverseSshConnectivity. */ - interface IReverseSshConnectivity { + /** Properties of a CreateConversionWorkspaceRequest. */ + interface ICreateConversionWorkspaceRequest { - /** ReverseSshConnectivity vmIp */ - vmIp?: (string|null); + /** CreateConversionWorkspaceRequest parent */ + parent?: (string|null); - /** ReverseSshConnectivity vmPort */ - vmPort?: (number|null); + /** CreateConversionWorkspaceRequest conversionWorkspaceId */ + conversionWorkspaceId?: (string|null); - /** ReverseSshConnectivity vm */ - vm?: (string|null); + /** CreateConversionWorkspaceRequest conversionWorkspace */ + conversionWorkspace?: (google.cloud.clouddms.v1.IConversionWorkspace|null); - /** ReverseSshConnectivity vpc */ - vpc?: (string|null); + /** CreateConversionWorkspaceRequest requestId */ + requestId?: (string|null); } - /** Represents a ReverseSshConnectivity. */ - class ReverseSshConnectivity implements IReverseSshConnectivity { + /** Represents a CreateConversionWorkspaceRequest. */ + class CreateConversionWorkspaceRequest implements ICreateConversionWorkspaceRequest { /** - * Constructs a new ReverseSshConnectivity. + * Constructs a new CreateConversionWorkspaceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.clouddms.v1.IReverseSshConnectivity); + constructor(properties?: google.cloud.clouddms.v1.ICreateConversionWorkspaceRequest); - /** ReverseSshConnectivity vmIp. */ - public vmIp: string; + /** CreateConversionWorkspaceRequest parent. */ + public parent: string; - /** ReverseSshConnectivity vmPort. */ - public vmPort: number; + /** CreateConversionWorkspaceRequest conversionWorkspaceId. */ + public conversionWorkspaceId: string; - /** ReverseSshConnectivity vm. */ - public vm: string; + /** CreateConversionWorkspaceRequest conversionWorkspace. */ + public conversionWorkspace?: (google.cloud.clouddms.v1.IConversionWorkspace|null); - /** ReverseSshConnectivity vpc. */ - public vpc: string; + /** CreateConversionWorkspaceRequest requestId. */ + public requestId: string; /** - * Creates a new ReverseSshConnectivity instance using the specified properties. + * Creates a new CreateConversionWorkspaceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ReverseSshConnectivity instance + * @returns CreateConversionWorkspaceRequest instance */ - public static create(properties?: google.cloud.clouddms.v1.IReverseSshConnectivity): google.cloud.clouddms.v1.ReverseSshConnectivity; + public static create(properties?: google.cloud.clouddms.v1.ICreateConversionWorkspaceRequest): google.cloud.clouddms.v1.CreateConversionWorkspaceRequest; /** - * Encodes the specified ReverseSshConnectivity message. Does not implicitly {@link google.cloud.clouddms.v1.ReverseSshConnectivity.verify|verify} messages. - * @param message ReverseSshConnectivity message or plain object to encode + * Encodes the specified CreateConversionWorkspaceRequest message. Does not implicitly {@link google.cloud.clouddms.v1.CreateConversionWorkspaceRequest.verify|verify} messages. + * @param message CreateConversionWorkspaceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.clouddms.v1.IReverseSshConnectivity, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.clouddms.v1.ICreateConversionWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ReverseSshConnectivity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ReverseSshConnectivity.verify|verify} messages. - * @param message ReverseSshConnectivity message or plain object to encode + * Encodes the specified CreateConversionWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.CreateConversionWorkspaceRequest.verify|verify} messages. + * @param message CreateConversionWorkspaceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.clouddms.v1.IReverseSshConnectivity, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.clouddms.v1.ICreateConversionWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ReverseSshConnectivity message from the specified reader or buffer. + * Decodes a CreateConversionWorkspaceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ReverseSshConnectivity + * @returns CreateConversionWorkspaceRequest * @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.clouddms.v1.ReverseSshConnectivity; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.clouddms.v1.CreateConversionWorkspaceRequest; /** - * Decodes a ReverseSshConnectivity message from the specified reader or buffer, length delimited. + * Decodes a CreateConversionWorkspaceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ReverseSshConnectivity + * @returns CreateConversionWorkspaceRequest * @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.clouddms.v1.ReverseSshConnectivity; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.clouddms.v1.CreateConversionWorkspaceRequest; /** - * Verifies a ReverseSshConnectivity message. + * Verifies a CreateConversionWorkspaceRequest 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 ReverseSshConnectivity message from a plain object. Also converts values to their respective internal types. + * Creates a CreateConversionWorkspaceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ReverseSshConnectivity + * @returns CreateConversionWorkspaceRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.ReverseSshConnectivity; + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.CreateConversionWorkspaceRequest; /** - * Creates a plain object from a ReverseSshConnectivity message. Also converts values to other types if specified. - * @param message ReverseSshConnectivity + * Creates a plain object from a CreateConversionWorkspaceRequest message. Also converts values to other types if specified. + * @param message CreateConversionWorkspaceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.clouddms.v1.ReverseSshConnectivity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.clouddms.v1.CreateConversionWorkspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ReverseSshConnectivity to JSON. + * Converts this CreateConversionWorkspaceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ReverseSshConnectivity + * Gets the default type url for CreateConversionWorkspaceRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a VpcPeeringConnectivity. */ - interface IVpcPeeringConnectivity { + /** Properties of an UpdateConversionWorkspaceRequest. */ + interface IUpdateConversionWorkspaceRequest { - /** VpcPeeringConnectivity vpc */ - vpc?: (string|null); + /** UpdateConversionWorkspaceRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateConversionWorkspaceRequest conversionWorkspace */ + conversionWorkspace?: (google.cloud.clouddms.v1.IConversionWorkspace|null); + + /** UpdateConversionWorkspaceRequest requestId */ + requestId?: (string|null); } - /** Represents a VpcPeeringConnectivity. */ - class VpcPeeringConnectivity implements IVpcPeeringConnectivity { + /** Represents an UpdateConversionWorkspaceRequest. */ + class UpdateConversionWorkspaceRequest implements IUpdateConversionWorkspaceRequest { /** - * Constructs a new VpcPeeringConnectivity. + * Constructs a new UpdateConversionWorkspaceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.clouddms.v1.IVpcPeeringConnectivity); + constructor(properties?: google.cloud.clouddms.v1.IUpdateConversionWorkspaceRequest); - /** VpcPeeringConnectivity vpc. */ - public vpc: string; + /** UpdateConversionWorkspaceRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateConversionWorkspaceRequest conversionWorkspace. */ + public conversionWorkspace?: (google.cloud.clouddms.v1.IConversionWorkspace|null); + + /** UpdateConversionWorkspaceRequest requestId. */ + public requestId: string; /** - * Creates a new VpcPeeringConnectivity instance using the specified properties. + * Creates a new UpdateConversionWorkspaceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns VpcPeeringConnectivity instance + * @returns UpdateConversionWorkspaceRequest instance */ - public static create(properties?: google.cloud.clouddms.v1.IVpcPeeringConnectivity): google.cloud.clouddms.v1.VpcPeeringConnectivity; + public static create(properties?: google.cloud.clouddms.v1.IUpdateConversionWorkspaceRequest): google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest; /** - * Encodes the specified VpcPeeringConnectivity message. Does not implicitly {@link google.cloud.clouddms.v1.VpcPeeringConnectivity.verify|verify} messages. - * @param message VpcPeeringConnectivity message or plain object to encode + * Encodes the specified UpdateConversionWorkspaceRequest message. Does not implicitly {@link google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest.verify|verify} messages. + * @param message UpdateConversionWorkspaceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.clouddms.v1.IVpcPeeringConnectivity, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.clouddms.v1.IUpdateConversionWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VpcPeeringConnectivity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.VpcPeeringConnectivity.verify|verify} messages. - * @param message VpcPeeringConnectivity message or plain object to encode + * Encodes the specified UpdateConversionWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest.verify|verify} messages. + * @param message UpdateConversionWorkspaceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.clouddms.v1.IVpcPeeringConnectivity, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.clouddms.v1.IUpdateConversionWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VpcPeeringConnectivity message from the specified reader or buffer. + * Decodes an UpdateConversionWorkspaceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VpcPeeringConnectivity + * @returns UpdateConversionWorkspaceRequest * @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.clouddms.v1.VpcPeeringConnectivity; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest; /** - * Decodes a VpcPeeringConnectivity message from the specified reader or buffer, length delimited. + * Decodes an UpdateConversionWorkspaceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VpcPeeringConnectivity + * @returns UpdateConversionWorkspaceRequest * @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.clouddms.v1.VpcPeeringConnectivity; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest; /** - * Verifies a VpcPeeringConnectivity message. + * Verifies an UpdateConversionWorkspaceRequest 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 VpcPeeringConnectivity message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateConversionWorkspaceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VpcPeeringConnectivity + * @returns UpdateConversionWorkspaceRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.VpcPeeringConnectivity; + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest; /** - * Creates a plain object from a VpcPeeringConnectivity message. Also converts values to other types if specified. - * @param message VpcPeeringConnectivity + * Creates a plain object from an UpdateConversionWorkspaceRequest message. Also converts values to other types if specified. + * @param message UpdateConversionWorkspaceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.clouddms.v1.VpcPeeringConnectivity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VpcPeeringConnectivity to JSON. + * Converts this UpdateConversionWorkspaceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for VpcPeeringConnectivity + * Gets the default type url for UpdateConversionWorkspaceRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DatabaseType. */ - interface IDatabaseType { + /** Properties of a DeleteConversionWorkspaceRequest. */ + interface IDeleteConversionWorkspaceRequest { - /** DatabaseType provider */ - provider?: (google.cloud.clouddms.v1.DatabaseProvider|keyof typeof google.cloud.clouddms.v1.DatabaseProvider|null); + /** DeleteConversionWorkspaceRequest name */ + name?: (string|null); - /** DatabaseType engine */ - engine?: (google.cloud.clouddms.v1.DatabaseEngine|keyof typeof google.cloud.clouddms.v1.DatabaseEngine|null); + /** DeleteConversionWorkspaceRequest requestId */ + requestId?: (string|null); } - /** Represents a DatabaseType. */ - class DatabaseType implements IDatabaseType { + /** Represents a DeleteConversionWorkspaceRequest. */ + class DeleteConversionWorkspaceRequest implements IDeleteConversionWorkspaceRequest { /** - * Constructs a new DatabaseType. + * Constructs a new DeleteConversionWorkspaceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.clouddms.v1.IDatabaseType); + constructor(properties?: google.cloud.clouddms.v1.IDeleteConversionWorkspaceRequest); - /** DatabaseType provider. */ - public provider: (google.cloud.clouddms.v1.DatabaseProvider|keyof typeof google.cloud.clouddms.v1.DatabaseProvider); + /** DeleteConversionWorkspaceRequest name. */ + public name: string; - /** DatabaseType engine. */ - public engine: (google.cloud.clouddms.v1.DatabaseEngine|keyof typeof google.cloud.clouddms.v1.DatabaseEngine); + /** DeleteConversionWorkspaceRequest requestId. */ + public requestId: string; /** - * Creates a new DatabaseType instance using the specified properties. + * Creates a new DeleteConversionWorkspaceRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DatabaseType instance + * @returns DeleteConversionWorkspaceRequest instance */ - public static create(properties?: google.cloud.clouddms.v1.IDatabaseType): google.cloud.clouddms.v1.DatabaseType; + public static create(properties?: google.cloud.clouddms.v1.IDeleteConversionWorkspaceRequest): google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest; /** - * Encodes the specified DatabaseType message. Does not implicitly {@link google.cloud.clouddms.v1.DatabaseType.verify|verify} messages. - * @param message DatabaseType message or plain object to encode + * Encodes the specified DeleteConversionWorkspaceRequest message. Does not implicitly {@link google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest.verify|verify} messages. + * @param message DeleteConversionWorkspaceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.clouddms.v1.IDatabaseType, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.clouddms.v1.IDeleteConversionWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DatabaseType message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.DatabaseType.verify|verify} messages. - * @param message DatabaseType message or plain object to encode + * Encodes the specified DeleteConversionWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest.verify|verify} messages. + * @param message DeleteConversionWorkspaceRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.clouddms.v1.IDatabaseType, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.clouddms.v1.IDeleteConversionWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DatabaseType message from the specified reader or buffer. + * Decodes a DeleteConversionWorkspaceRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DatabaseType + * @returns DeleteConversionWorkspaceRequest * @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.clouddms.v1.DatabaseType; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest; /** - * Decodes a DatabaseType message from the specified reader or buffer, length delimited. + * Decodes a DeleteConversionWorkspaceRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DatabaseType + * @returns DeleteConversionWorkspaceRequest * @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.clouddms.v1.DatabaseType; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest; /** - * Verifies a DatabaseType message. + * Verifies a DeleteConversionWorkspaceRequest 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 DatabaseType message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteConversionWorkspaceRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DatabaseType + * @returns DeleteConversionWorkspaceRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.DatabaseType; + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest; /** - * Creates a plain object from a DatabaseType message. Also converts values to other types if specified. - * @param message DatabaseType + * Creates a plain object from a DeleteConversionWorkspaceRequest message. Also converts values to other types if specified. + * @param message DeleteConversionWorkspaceRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.clouddms.v1.DatabaseType, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DatabaseType to JSON. + * Converts this DeleteConversionWorkspaceRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DatabaseType + * Gets the default type url for DeleteConversionWorkspaceRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MigrationJob. */ - interface IMigrationJob { + /** Properties of a CommitConversionWorkspaceRequest. */ + interface ICommitConversionWorkspaceRequest { - /** MigrationJob name */ + /** CommitConversionWorkspaceRequest name */ name?: (string|null); - /** MigrationJob createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** CommitConversionWorkspaceRequest commitName */ + commitName?: (string|null); + } - /** MigrationJob updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** Represents a CommitConversionWorkspaceRequest. */ + class CommitConversionWorkspaceRequest implements ICommitConversionWorkspaceRequest { - /** MigrationJob labels */ - labels?: ({ [k: string]: string }|null); + /** + * Constructs a new CommitConversionWorkspaceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.ICommitConversionWorkspaceRequest); - /** MigrationJob displayName */ - displayName?: (string|null); + /** CommitConversionWorkspaceRequest name. */ + public name: string; - /** MigrationJob state */ - state?: (google.cloud.clouddms.v1.MigrationJob.State|keyof typeof google.cloud.clouddms.v1.MigrationJob.State|null); + /** CommitConversionWorkspaceRequest commitName. */ + public commitName: string; - /** MigrationJob phase */ - phase?: (google.cloud.clouddms.v1.MigrationJob.Phase|keyof typeof google.cloud.clouddms.v1.MigrationJob.Phase|null); + /** + * Creates a new CommitConversionWorkspaceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CommitConversionWorkspaceRequest instance + */ + public static create(properties?: google.cloud.clouddms.v1.ICommitConversionWorkspaceRequest): google.cloud.clouddms.v1.CommitConversionWorkspaceRequest; - /** MigrationJob type */ - type?: (google.cloud.clouddms.v1.MigrationJob.Type|keyof typeof google.cloud.clouddms.v1.MigrationJob.Type|null); + /** + * Encodes the specified CommitConversionWorkspaceRequest message. Does not implicitly {@link google.cloud.clouddms.v1.CommitConversionWorkspaceRequest.verify|verify} messages. + * @param message CommitConversionWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.ICommitConversionWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** MigrationJob dumpPath */ - dumpPath?: (string|null); + /** + * Encodes the specified CommitConversionWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.CommitConversionWorkspaceRequest.verify|verify} messages. + * @param message CommitConversionWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.ICommitConversionWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** MigrationJob source */ - source?: (string|null); + /** + * Decodes a CommitConversionWorkspaceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommitConversionWorkspaceRequest + * @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.clouddms.v1.CommitConversionWorkspaceRequest; - /** MigrationJob destination */ - destination?: (string|null); + /** + * Decodes a CommitConversionWorkspaceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommitConversionWorkspaceRequest + * @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.clouddms.v1.CommitConversionWorkspaceRequest; - /** MigrationJob reverseSshConnectivity */ - reverseSshConnectivity?: (google.cloud.clouddms.v1.IReverseSshConnectivity|null); + /** + * Verifies a CommitConversionWorkspaceRequest 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); - /** MigrationJob vpcPeeringConnectivity */ - vpcPeeringConnectivity?: (google.cloud.clouddms.v1.IVpcPeeringConnectivity|null); + /** + * Creates a CommitConversionWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommitConversionWorkspaceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.CommitConversionWorkspaceRequest; - /** MigrationJob staticIpConnectivity */ - staticIpConnectivity?: (google.cloud.clouddms.v1.IStaticIpConnectivity|null); + /** + * Creates a plain object from a CommitConversionWorkspaceRequest message. Also converts values to other types if specified. + * @param message CommitConversionWorkspaceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.CommitConversionWorkspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** MigrationJob duration */ - duration?: (google.protobuf.IDuration|null); + /** + * Converts this CommitConversionWorkspaceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** MigrationJob error */ - error?: (google.rpc.IStatus|null); + /** + * Gets the default type url for CommitConversionWorkspaceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** MigrationJob sourceDatabase */ - sourceDatabase?: (google.cloud.clouddms.v1.IDatabaseType|null); + /** Properties of a RollbackConversionWorkspaceRequest. */ + interface IRollbackConversionWorkspaceRequest { - /** MigrationJob destinationDatabase */ - destinationDatabase?: (google.cloud.clouddms.v1.IDatabaseType|null); + /** RollbackConversionWorkspaceRequest name */ + name?: (string|null); + } - /** MigrationJob endTime */ - endTime?: (google.protobuf.ITimestamp|null); + /** Represents a RollbackConversionWorkspaceRequest. */ + class RollbackConversionWorkspaceRequest implements IRollbackConversionWorkspaceRequest { + + /** + * Constructs a new RollbackConversionWorkspaceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IRollbackConversionWorkspaceRequest); + + /** RollbackConversionWorkspaceRequest name. */ + public name: string; + + /** + * Creates a new RollbackConversionWorkspaceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RollbackConversionWorkspaceRequest instance + */ + public static create(properties?: google.cloud.clouddms.v1.IRollbackConversionWorkspaceRequest): google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest; + + /** + * Encodes the specified RollbackConversionWorkspaceRequest message. Does not implicitly {@link google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest.verify|verify} messages. + * @param message RollbackConversionWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IRollbackConversionWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RollbackConversionWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest.verify|verify} messages. + * @param message RollbackConversionWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IRollbackConversionWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RollbackConversionWorkspaceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RollbackConversionWorkspaceRequest + * @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.clouddms.v1.RollbackConversionWorkspaceRequest; + + /** + * Decodes a RollbackConversionWorkspaceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RollbackConversionWorkspaceRequest + * @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.clouddms.v1.RollbackConversionWorkspaceRequest; + + /** + * Verifies a RollbackConversionWorkspaceRequest 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 RollbackConversionWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RollbackConversionWorkspaceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest; + + /** + * Creates a plain object from a RollbackConversionWorkspaceRequest message. Also converts values to other types if specified. + * @param message RollbackConversionWorkspaceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RollbackConversionWorkspaceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RollbackConversionWorkspaceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a MigrationJob. */ - class MigrationJob implements IMigrationJob { + /** Properties of an ApplyConversionWorkspaceRequest. */ + interface IApplyConversionWorkspaceRequest { + + /** ApplyConversionWorkspaceRequest name */ + name?: (string|null); + + /** ApplyConversionWorkspaceRequest filter */ + filter?: (string|null); + + /** ApplyConversionWorkspaceRequest connectionProfile */ + connectionProfile?: (string|null); + } + + /** Represents an ApplyConversionWorkspaceRequest. */ + class ApplyConversionWorkspaceRequest implements IApplyConversionWorkspaceRequest { /** - * Constructs a new MigrationJob. + * Constructs a new ApplyConversionWorkspaceRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.clouddms.v1.IMigrationJob); + constructor(properties?: google.cloud.clouddms.v1.IApplyConversionWorkspaceRequest); - /** MigrationJob name. */ + /** ApplyConversionWorkspaceRequest name. */ public name: string; - /** MigrationJob createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** ApplyConversionWorkspaceRequest filter. */ + public filter: string; - /** MigrationJob updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** ApplyConversionWorkspaceRequest connectionProfile. */ + public connectionProfile?: (string|null); - /** MigrationJob labels. */ - public labels: { [k: string]: string }; + /** ApplyConversionWorkspaceRequest destination. */ + public destination?: "connectionProfile"; - /** MigrationJob displayName. */ - public displayName: string; + /** + * Creates a new ApplyConversionWorkspaceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ApplyConversionWorkspaceRequest instance + */ + public static create(properties?: google.cloud.clouddms.v1.IApplyConversionWorkspaceRequest): google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest; - /** MigrationJob state. */ - public state: (google.cloud.clouddms.v1.MigrationJob.State|keyof typeof google.cloud.clouddms.v1.MigrationJob.State); + /** + * Encodes the specified ApplyConversionWorkspaceRequest message. Does not implicitly {@link google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest.verify|verify} messages. + * @param message ApplyConversionWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IApplyConversionWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** MigrationJob phase. */ - public phase: (google.cloud.clouddms.v1.MigrationJob.Phase|keyof typeof google.cloud.clouddms.v1.MigrationJob.Phase); + /** + * Encodes the specified ApplyConversionWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest.verify|verify} messages. + * @param message ApplyConversionWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IApplyConversionWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** MigrationJob type. */ - public type: (google.cloud.clouddms.v1.MigrationJob.Type|keyof typeof google.cloud.clouddms.v1.MigrationJob.Type); + /** + * Decodes an ApplyConversionWorkspaceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ApplyConversionWorkspaceRequest + * @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.clouddms.v1.ApplyConversionWorkspaceRequest; - /** MigrationJob dumpPath. */ - public dumpPath: string; + /** + * Decodes an ApplyConversionWorkspaceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ApplyConversionWorkspaceRequest + * @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.clouddms.v1.ApplyConversionWorkspaceRequest; - /** MigrationJob source. */ - public source: string; + /** + * Verifies an ApplyConversionWorkspaceRequest 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 ApplyConversionWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ApplyConversionWorkspaceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest; + + /** + * Creates a plain object from an ApplyConversionWorkspaceRequest message. Also converts values to other types if specified. + * @param message ApplyConversionWorkspaceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ApplyConversionWorkspaceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ApplyConversionWorkspaceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SeedConversionWorkspaceRequest. */ + interface ISeedConversionWorkspaceRequest { + + /** SeedConversionWorkspaceRequest name */ + name?: (string|null); + + /** SeedConversionWorkspaceRequest autoCommit */ + autoCommit?: (boolean|null); + + /** SeedConversionWorkspaceRequest sourceConnectionProfile */ + sourceConnectionProfile?: (string|null); + + /** SeedConversionWorkspaceRequest destinationConnectionProfile */ + destinationConnectionProfile?: (string|null); + } + + /** Represents a SeedConversionWorkspaceRequest. */ + class SeedConversionWorkspaceRequest implements ISeedConversionWorkspaceRequest { + + /** + * Constructs a new SeedConversionWorkspaceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.ISeedConversionWorkspaceRequest); + + /** SeedConversionWorkspaceRequest name. */ + public name: string; + + /** SeedConversionWorkspaceRequest autoCommit. */ + public autoCommit: boolean; + + /** SeedConversionWorkspaceRequest sourceConnectionProfile. */ + public sourceConnectionProfile?: (string|null); + + /** SeedConversionWorkspaceRequest destinationConnectionProfile. */ + public destinationConnectionProfile?: (string|null); + + /** SeedConversionWorkspaceRequest seedFrom. */ + public seedFrom?: ("sourceConnectionProfile"|"destinationConnectionProfile"); + + /** + * Creates a new SeedConversionWorkspaceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SeedConversionWorkspaceRequest instance + */ + public static create(properties?: google.cloud.clouddms.v1.ISeedConversionWorkspaceRequest): google.cloud.clouddms.v1.SeedConversionWorkspaceRequest; + + /** + * Encodes the specified SeedConversionWorkspaceRequest message. Does not implicitly {@link google.cloud.clouddms.v1.SeedConversionWorkspaceRequest.verify|verify} messages. + * @param message SeedConversionWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.ISeedConversionWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SeedConversionWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.SeedConversionWorkspaceRequest.verify|verify} messages. + * @param message SeedConversionWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.ISeedConversionWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SeedConversionWorkspaceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SeedConversionWorkspaceRequest + * @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.clouddms.v1.SeedConversionWorkspaceRequest; + + /** + * Decodes a SeedConversionWorkspaceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SeedConversionWorkspaceRequest + * @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.clouddms.v1.SeedConversionWorkspaceRequest; + + /** + * Verifies a SeedConversionWorkspaceRequest 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 SeedConversionWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SeedConversionWorkspaceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.SeedConversionWorkspaceRequest; + + /** + * Creates a plain object from a SeedConversionWorkspaceRequest message. Also converts values to other types if specified. + * @param message SeedConversionWorkspaceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.SeedConversionWorkspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SeedConversionWorkspaceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SeedConversionWorkspaceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConvertConversionWorkspaceRequest. */ + interface IConvertConversionWorkspaceRequest { + + /** ConvertConversionWorkspaceRequest name */ + name?: (string|null); + + /** ConvertConversionWorkspaceRequest autoCommit */ + autoCommit?: (boolean|null); + + /** ConvertConversionWorkspaceRequest filter */ + filter?: (string|null); + } + + /** Represents a ConvertConversionWorkspaceRequest. */ + class ConvertConversionWorkspaceRequest implements IConvertConversionWorkspaceRequest { + + /** + * Constructs a new ConvertConversionWorkspaceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IConvertConversionWorkspaceRequest); + + /** ConvertConversionWorkspaceRequest name. */ + public name: string; + + /** ConvertConversionWorkspaceRequest autoCommit. */ + public autoCommit: boolean; + + /** ConvertConversionWorkspaceRequest filter. */ + public filter: string; + + /** + * Creates a new ConvertConversionWorkspaceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ConvertConversionWorkspaceRequest instance + */ + public static create(properties?: google.cloud.clouddms.v1.IConvertConversionWorkspaceRequest): google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest; + + /** + * Encodes the specified ConvertConversionWorkspaceRequest message. Does not implicitly {@link google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest.verify|verify} messages. + * @param message ConvertConversionWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IConvertConversionWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConvertConversionWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest.verify|verify} messages. + * @param message ConvertConversionWorkspaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IConvertConversionWorkspaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConvertConversionWorkspaceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConvertConversionWorkspaceRequest + * @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.clouddms.v1.ConvertConversionWorkspaceRequest; + + /** + * Decodes a ConvertConversionWorkspaceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConvertConversionWorkspaceRequest + * @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.clouddms.v1.ConvertConversionWorkspaceRequest; + + /** + * Verifies a ConvertConversionWorkspaceRequest 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 ConvertConversionWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConvertConversionWorkspaceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest; + + /** + * Creates a plain object from a ConvertConversionWorkspaceRequest message. Also converts values to other types if specified. + * @param message ConvertConversionWorkspaceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConvertConversionWorkspaceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConvertConversionWorkspaceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImportMappingRulesRequest. */ + interface IImportMappingRulesRequest { + + /** ImportMappingRulesRequest parent */ + parent?: (string|null); + + /** ImportMappingRulesRequest rulesFormat */ + rulesFormat?: (google.cloud.clouddms.v1.ImportRulesFileFormat|keyof typeof google.cloud.clouddms.v1.ImportRulesFileFormat|null); + + /** ImportMappingRulesRequest rulesFiles */ + rulesFiles?: (google.cloud.clouddms.v1.ImportMappingRulesRequest.IRulesFile[]|null); + + /** ImportMappingRulesRequest autoCommit */ + autoCommit?: (boolean|null); + } + + /** Represents an ImportMappingRulesRequest. */ + class ImportMappingRulesRequest implements IImportMappingRulesRequest { + + /** + * Constructs a new ImportMappingRulesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IImportMappingRulesRequest); + + /** ImportMappingRulesRequest parent. */ + public parent: string; + + /** ImportMappingRulesRequest rulesFormat. */ + public rulesFormat: (google.cloud.clouddms.v1.ImportRulesFileFormat|keyof typeof google.cloud.clouddms.v1.ImportRulesFileFormat); + + /** ImportMappingRulesRequest rulesFiles. */ + public rulesFiles: google.cloud.clouddms.v1.ImportMappingRulesRequest.IRulesFile[]; + + /** ImportMappingRulesRequest autoCommit. */ + public autoCommit: boolean; + + /** + * Creates a new ImportMappingRulesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportMappingRulesRequest instance + */ + public static create(properties?: google.cloud.clouddms.v1.IImportMappingRulesRequest): google.cloud.clouddms.v1.ImportMappingRulesRequest; + + /** + * Encodes the specified ImportMappingRulesRequest message. Does not implicitly {@link google.cloud.clouddms.v1.ImportMappingRulesRequest.verify|verify} messages. + * @param message ImportMappingRulesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IImportMappingRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportMappingRulesRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ImportMappingRulesRequest.verify|verify} messages. + * @param message ImportMappingRulesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IImportMappingRulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportMappingRulesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportMappingRulesRequest + * @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.clouddms.v1.ImportMappingRulesRequest; + + /** + * Decodes an ImportMappingRulesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportMappingRulesRequest + * @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.clouddms.v1.ImportMappingRulesRequest; + + /** + * Verifies an ImportMappingRulesRequest 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 ImportMappingRulesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportMappingRulesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.ImportMappingRulesRequest; + + /** + * Creates a plain object from an ImportMappingRulesRequest message. Also converts values to other types if specified. + * @param message ImportMappingRulesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.ImportMappingRulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportMappingRulesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportMappingRulesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ImportMappingRulesRequest { + + /** Properties of a RulesFile. */ + interface IRulesFile { + + /** RulesFile rulesSourceFilename */ + rulesSourceFilename?: (string|null); + + /** RulesFile rulesContent */ + rulesContent?: (string|null); + } + + /** Represents a RulesFile. */ + class RulesFile implements IRulesFile { + + /** + * Constructs a new RulesFile. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.ImportMappingRulesRequest.IRulesFile); + + /** RulesFile rulesSourceFilename. */ + public rulesSourceFilename: string; + + /** RulesFile rulesContent. */ + public rulesContent: string; + + /** + * Creates a new RulesFile instance using the specified properties. + * @param [properties] Properties to set + * @returns RulesFile instance + */ + public static create(properties?: google.cloud.clouddms.v1.ImportMappingRulesRequest.IRulesFile): google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile; + + /** + * Encodes the specified RulesFile message. Does not implicitly {@link google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile.verify|verify} messages. + * @param message RulesFile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.ImportMappingRulesRequest.IRulesFile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RulesFile message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile.verify|verify} messages. + * @param message RulesFile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.ImportMappingRulesRequest.IRulesFile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RulesFile message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RulesFile + * @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.clouddms.v1.ImportMappingRulesRequest.RulesFile; + + /** + * Decodes a RulesFile message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RulesFile + * @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.clouddms.v1.ImportMappingRulesRequest.RulesFile; + + /** + * Verifies a RulesFile 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 RulesFile message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RulesFile + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile; + + /** + * Creates a plain object from a RulesFile message. Also converts values to other types if specified. + * @param message RulesFile + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RulesFile to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RulesFile + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a DescribeDatabaseEntitiesRequest. */ + interface IDescribeDatabaseEntitiesRequest { + + /** DescribeDatabaseEntitiesRequest conversionWorkspace */ + conversionWorkspace?: (string|null); + + /** DescribeDatabaseEntitiesRequest pageSize */ + pageSize?: (number|null); + + /** DescribeDatabaseEntitiesRequest pageToken */ + pageToken?: (string|null); + + /** DescribeDatabaseEntitiesRequest tree */ + tree?: (google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest.DBTreeType|keyof typeof google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest.DBTreeType|null); + + /** DescribeDatabaseEntitiesRequest uncommitted */ + uncommitted?: (boolean|null); + + /** DescribeDatabaseEntitiesRequest commitId */ + commitId?: (string|null); + + /** DescribeDatabaseEntitiesRequest filter */ + filter?: (string|null); + } + + /** Represents a DescribeDatabaseEntitiesRequest. */ + class DescribeDatabaseEntitiesRequest implements IDescribeDatabaseEntitiesRequest { + + /** + * Constructs a new DescribeDatabaseEntitiesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IDescribeDatabaseEntitiesRequest); + + /** DescribeDatabaseEntitiesRequest conversionWorkspace. */ + public conversionWorkspace: string; + + /** DescribeDatabaseEntitiesRequest pageSize. */ + public pageSize: number; + + /** DescribeDatabaseEntitiesRequest pageToken. */ + public pageToken: string; + + /** DescribeDatabaseEntitiesRequest tree. */ + public tree: (google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest.DBTreeType|keyof typeof google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest.DBTreeType); + + /** DescribeDatabaseEntitiesRequest uncommitted. */ + public uncommitted: boolean; + + /** DescribeDatabaseEntitiesRequest commitId. */ + public commitId: string; + + /** DescribeDatabaseEntitiesRequest filter. */ + public filter: string; + + /** + * Creates a new DescribeDatabaseEntitiesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DescribeDatabaseEntitiesRequest instance + */ + public static create(properties?: google.cloud.clouddms.v1.IDescribeDatabaseEntitiesRequest): google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest; + + /** + * Encodes the specified DescribeDatabaseEntitiesRequest message. Does not implicitly {@link google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest.verify|verify} messages. + * @param message DescribeDatabaseEntitiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IDescribeDatabaseEntitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescribeDatabaseEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest.verify|verify} messages. + * @param message DescribeDatabaseEntitiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IDescribeDatabaseEntitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescribeDatabaseEntitiesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescribeDatabaseEntitiesRequest + * @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.clouddms.v1.DescribeDatabaseEntitiesRequest; + + /** + * Decodes a DescribeDatabaseEntitiesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescribeDatabaseEntitiesRequest + * @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.clouddms.v1.DescribeDatabaseEntitiesRequest; + + /** + * Verifies a DescribeDatabaseEntitiesRequest 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 DescribeDatabaseEntitiesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescribeDatabaseEntitiesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest; + + /** + * Creates a plain object from a DescribeDatabaseEntitiesRequest message. Also converts values to other types if specified. + * @param message DescribeDatabaseEntitiesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescribeDatabaseEntitiesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescribeDatabaseEntitiesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescribeDatabaseEntitiesRequest { + + /** DBTreeType enum. */ + enum DBTreeType { + DB_TREE_TYPE_UNSPECIFIED = 0, + SOURCE_TREE = 1, + DRAFT_TREE = 2, + DESTINATION_TREE = 3 + } + } + + /** Properties of a DescribeDatabaseEntitiesResponse. */ + interface IDescribeDatabaseEntitiesResponse { + + /** DescribeDatabaseEntitiesResponse databaseEntities */ + databaseEntities?: (google.cloud.clouddms.v1.IDatabaseEntity[]|null); + + /** DescribeDatabaseEntitiesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a DescribeDatabaseEntitiesResponse. */ + class DescribeDatabaseEntitiesResponse implements IDescribeDatabaseEntitiesResponse { + + /** + * Constructs a new DescribeDatabaseEntitiesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IDescribeDatabaseEntitiesResponse); + + /** DescribeDatabaseEntitiesResponse databaseEntities. */ + public databaseEntities: google.cloud.clouddms.v1.IDatabaseEntity[]; + + /** DescribeDatabaseEntitiesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new DescribeDatabaseEntitiesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns DescribeDatabaseEntitiesResponse instance + */ + public static create(properties?: google.cloud.clouddms.v1.IDescribeDatabaseEntitiesResponse): google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse; + + /** + * Encodes the specified DescribeDatabaseEntitiesResponse message. Does not implicitly {@link google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse.verify|verify} messages. + * @param message DescribeDatabaseEntitiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IDescribeDatabaseEntitiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescribeDatabaseEntitiesResponse message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse.verify|verify} messages. + * @param message DescribeDatabaseEntitiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IDescribeDatabaseEntitiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescribeDatabaseEntitiesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescribeDatabaseEntitiesResponse + * @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.clouddms.v1.DescribeDatabaseEntitiesResponse; + + /** + * Decodes a DescribeDatabaseEntitiesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescribeDatabaseEntitiesResponse + * @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.clouddms.v1.DescribeDatabaseEntitiesResponse; + + /** + * Verifies a DescribeDatabaseEntitiesResponse 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 DescribeDatabaseEntitiesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescribeDatabaseEntitiesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse; + + /** + * Creates a plain object from a DescribeDatabaseEntitiesResponse message. Also converts values to other types if specified. + * @param message DescribeDatabaseEntitiesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescribeDatabaseEntitiesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescribeDatabaseEntitiesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SearchBackgroundJobsRequest. */ + interface ISearchBackgroundJobsRequest { + + /** SearchBackgroundJobsRequest conversionWorkspace */ + conversionWorkspace?: (string|null); + + /** SearchBackgroundJobsRequest returnMostRecentPerJobType */ + returnMostRecentPerJobType?: (boolean|null); + + /** SearchBackgroundJobsRequest maxSize */ + maxSize?: (number|null); + + /** SearchBackgroundJobsRequest completedUntilTime */ + completedUntilTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a SearchBackgroundJobsRequest. */ + class SearchBackgroundJobsRequest implements ISearchBackgroundJobsRequest { + + /** + * Constructs a new SearchBackgroundJobsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.ISearchBackgroundJobsRequest); + + /** SearchBackgroundJobsRequest conversionWorkspace. */ + public conversionWorkspace: string; + + /** SearchBackgroundJobsRequest returnMostRecentPerJobType. */ + public returnMostRecentPerJobType: boolean; + + /** SearchBackgroundJobsRequest maxSize. */ + public maxSize: number; + + /** SearchBackgroundJobsRequest completedUntilTime. */ + public completedUntilTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new SearchBackgroundJobsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchBackgroundJobsRequest instance + */ + public static create(properties?: google.cloud.clouddms.v1.ISearchBackgroundJobsRequest): google.cloud.clouddms.v1.SearchBackgroundJobsRequest; + + /** + * Encodes the specified SearchBackgroundJobsRequest message. Does not implicitly {@link google.cloud.clouddms.v1.SearchBackgroundJobsRequest.verify|verify} messages. + * @param message SearchBackgroundJobsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.ISearchBackgroundJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchBackgroundJobsRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.SearchBackgroundJobsRequest.verify|verify} messages. + * @param message SearchBackgroundJobsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.ISearchBackgroundJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchBackgroundJobsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchBackgroundJobsRequest + * @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.clouddms.v1.SearchBackgroundJobsRequest; + + /** + * Decodes a SearchBackgroundJobsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchBackgroundJobsRequest + * @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.clouddms.v1.SearchBackgroundJobsRequest; + + /** + * Verifies a SearchBackgroundJobsRequest 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 SearchBackgroundJobsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchBackgroundJobsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.SearchBackgroundJobsRequest; + + /** + * Creates a plain object from a SearchBackgroundJobsRequest message. Also converts values to other types if specified. + * @param message SearchBackgroundJobsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.SearchBackgroundJobsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchBackgroundJobsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchBackgroundJobsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SearchBackgroundJobsResponse. */ + interface ISearchBackgroundJobsResponse { + + /** SearchBackgroundJobsResponse jobs */ + jobs?: (google.cloud.clouddms.v1.IBackgroundJobLogEntry[]|null); + } + + /** Represents a SearchBackgroundJobsResponse. */ + class SearchBackgroundJobsResponse implements ISearchBackgroundJobsResponse { + + /** + * Constructs a new SearchBackgroundJobsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.ISearchBackgroundJobsResponse); + + /** SearchBackgroundJobsResponse jobs. */ + public jobs: google.cloud.clouddms.v1.IBackgroundJobLogEntry[]; + + /** + * Creates a new SearchBackgroundJobsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchBackgroundJobsResponse instance + */ + public static create(properties?: google.cloud.clouddms.v1.ISearchBackgroundJobsResponse): google.cloud.clouddms.v1.SearchBackgroundJobsResponse; + + /** + * Encodes the specified SearchBackgroundJobsResponse message. Does not implicitly {@link google.cloud.clouddms.v1.SearchBackgroundJobsResponse.verify|verify} messages. + * @param message SearchBackgroundJobsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.ISearchBackgroundJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchBackgroundJobsResponse message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.SearchBackgroundJobsResponse.verify|verify} messages. + * @param message SearchBackgroundJobsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.ISearchBackgroundJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchBackgroundJobsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchBackgroundJobsResponse + * @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.clouddms.v1.SearchBackgroundJobsResponse; + + /** + * Decodes a SearchBackgroundJobsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchBackgroundJobsResponse + * @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.clouddms.v1.SearchBackgroundJobsResponse; + + /** + * Verifies a SearchBackgroundJobsResponse 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 SearchBackgroundJobsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchBackgroundJobsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.SearchBackgroundJobsResponse; + + /** + * Creates a plain object from a SearchBackgroundJobsResponse message. Also converts values to other types if specified. + * @param message SearchBackgroundJobsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.SearchBackgroundJobsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchBackgroundJobsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchBackgroundJobsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DescribeConversionWorkspaceRevisionsRequest. */ + interface IDescribeConversionWorkspaceRevisionsRequest { + + /** DescribeConversionWorkspaceRevisionsRequest conversionWorkspace */ + conversionWorkspace?: (string|null); + + /** DescribeConversionWorkspaceRevisionsRequest commitId */ + commitId?: (string|null); + } + + /** Represents a DescribeConversionWorkspaceRevisionsRequest. */ + class DescribeConversionWorkspaceRevisionsRequest implements IDescribeConversionWorkspaceRevisionsRequest { + + /** + * Constructs a new DescribeConversionWorkspaceRevisionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsRequest); + + /** DescribeConversionWorkspaceRevisionsRequest conversionWorkspace. */ + public conversionWorkspace: string; + + /** DescribeConversionWorkspaceRevisionsRequest commitId. */ + public commitId: string; + + /** + * Creates a new DescribeConversionWorkspaceRevisionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DescribeConversionWorkspaceRevisionsRequest instance + */ + public static create(properties?: google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsRequest): google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest; + + /** + * Encodes the specified DescribeConversionWorkspaceRevisionsRequest message. Does not implicitly {@link google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest.verify|verify} messages. + * @param message DescribeConversionWorkspaceRevisionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescribeConversionWorkspaceRevisionsRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest.verify|verify} messages. + * @param message DescribeConversionWorkspaceRevisionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescribeConversionWorkspaceRevisionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescribeConversionWorkspaceRevisionsRequest + * @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.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest; + + /** + * Decodes a DescribeConversionWorkspaceRevisionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescribeConversionWorkspaceRevisionsRequest + * @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.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest; + + /** + * Verifies a DescribeConversionWorkspaceRevisionsRequest 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 DescribeConversionWorkspaceRevisionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescribeConversionWorkspaceRevisionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest; + + /** + * Creates a plain object from a DescribeConversionWorkspaceRevisionsRequest message. Also converts values to other types if specified. + * @param message DescribeConversionWorkspaceRevisionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescribeConversionWorkspaceRevisionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescribeConversionWorkspaceRevisionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DescribeConversionWorkspaceRevisionsResponse. */ + interface IDescribeConversionWorkspaceRevisionsResponse { + + /** DescribeConversionWorkspaceRevisionsResponse revisions */ + revisions?: (google.cloud.clouddms.v1.IConversionWorkspace[]|null); + } + + /** Represents a DescribeConversionWorkspaceRevisionsResponse. */ + class DescribeConversionWorkspaceRevisionsResponse implements IDescribeConversionWorkspaceRevisionsResponse { + + /** + * Constructs a new DescribeConversionWorkspaceRevisionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsResponse); + + /** DescribeConversionWorkspaceRevisionsResponse revisions. */ + public revisions: google.cloud.clouddms.v1.IConversionWorkspace[]; + + /** + * Creates a new DescribeConversionWorkspaceRevisionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns DescribeConversionWorkspaceRevisionsResponse instance + */ + public static create(properties?: google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsResponse): google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse; + + /** + * Encodes the specified DescribeConversionWorkspaceRevisionsResponse message. Does not implicitly {@link google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse.verify|verify} messages. + * @param message DescribeConversionWorkspaceRevisionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescribeConversionWorkspaceRevisionsResponse message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse.verify|verify} messages. + * @param message DescribeConversionWorkspaceRevisionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescribeConversionWorkspaceRevisionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescribeConversionWorkspaceRevisionsResponse + * @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.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse; + + /** + * Decodes a DescribeConversionWorkspaceRevisionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescribeConversionWorkspaceRevisionsResponse + * @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.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse; + + /** + * Verifies a DescribeConversionWorkspaceRevisionsResponse 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 DescribeConversionWorkspaceRevisionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescribeConversionWorkspaceRevisionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse; + + /** + * Creates a plain object from a DescribeConversionWorkspaceRevisionsResponse message. Also converts values to other types if specified. + * @param message DescribeConversionWorkspaceRevisionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescribeConversionWorkspaceRevisionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescribeConversionWorkspaceRevisionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchStaticIpsRequest. */ + interface IFetchStaticIpsRequest { + + /** FetchStaticIpsRequest name */ + name?: (string|null); + + /** FetchStaticIpsRequest pageSize */ + pageSize?: (number|null); + + /** FetchStaticIpsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a FetchStaticIpsRequest. */ + class FetchStaticIpsRequest implements IFetchStaticIpsRequest { + + /** + * Constructs a new FetchStaticIpsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IFetchStaticIpsRequest); + + /** FetchStaticIpsRequest name. */ + public name: string; + + /** FetchStaticIpsRequest pageSize. */ + public pageSize: number; + + /** FetchStaticIpsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new FetchStaticIpsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchStaticIpsRequest instance + */ + public static create(properties?: google.cloud.clouddms.v1.IFetchStaticIpsRequest): google.cloud.clouddms.v1.FetchStaticIpsRequest; + + /** + * Encodes the specified FetchStaticIpsRequest message. Does not implicitly {@link google.cloud.clouddms.v1.FetchStaticIpsRequest.verify|verify} messages. + * @param message FetchStaticIpsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IFetchStaticIpsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchStaticIpsRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.FetchStaticIpsRequest.verify|verify} messages. + * @param message FetchStaticIpsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IFetchStaticIpsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchStaticIpsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchStaticIpsRequest + * @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.clouddms.v1.FetchStaticIpsRequest; + + /** + * Decodes a FetchStaticIpsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchStaticIpsRequest + * @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.clouddms.v1.FetchStaticIpsRequest; + + /** + * Verifies a FetchStaticIpsRequest 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 FetchStaticIpsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchStaticIpsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.FetchStaticIpsRequest; + + /** + * Creates a plain object from a FetchStaticIpsRequest message. Also converts values to other types if specified. + * @param message FetchStaticIpsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.FetchStaticIpsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchStaticIpsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchStaticIpsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchStaticIpsResponse. */ + interface IFetchStaticIpsResponse { + + /** FetchStaticIpsResponse staticIps */ + staticIps?: (string[]|null); + + /** FetchStaticIpsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a FetchStaticIpsResponse. */ + class FetchStaticIpsResponse implements IFetchStaticIpsResponse { + + /** + * Constructs a new FetchStaticIpsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IFetchStaticIpsResponse); + + /** FetchStaticIpsResponse staticIps. */ + public staticIps: string[]; + + /** FetchStaticIpsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new FetchStaticIpsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchStaticIpsResponse instance + */ + public static create(properties?: google.cloud.clouddms.v1.IFetchStaticIpsResponse): google.cloud.clouddms.v1.FetchStaticIpsResponse; + + /** + * Encodes the specified FetchStaticIpsResponse message. Does not implicitly {@link google.cloud.clouddms.v1.FetchStaticIpsResponse.verify|verify} messages. + * @param message FetchStaticIpsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IFetchStaticIpsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchStaticIpsResponse message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.FetchStaticIpsResponse.verify|verify} messages. + * @param message FetchStaticIpsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IFetchStaticIpsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchStaticIpsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchStaticIpsResponse + * @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.clouddms.v1.FetchStaticIpsResponse; + + /** + * Decodes a FetchStaticIpsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchStaticIpsResponse + * @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.clouddms.v1.FetchStaticIpsResponse; + + /** + * Verifies a FetchStaticIpsResponse 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 FetchStaticIpsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchStaticIpsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.FetchStaticIpsResponse; + + /** + * Creates a plain object from a FetchStaticIpsResponse message. Also converts values to other types if specified. + * @param message FetchStaticIpsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.FetchStaticIpsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchStaticIpsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchStaticIpsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SslConfig. */ + interface ISslConfig { + + /** SslConfig type */ + type?: (google.cloud.clouddms.v1.SslConfig.SslType|keyof typeof google.cloud.clouddms.v1.SslConfig.SslType|null); + + /** SslConfig clientKey */ + clientKey?: (string|null); + + /** SslConfig clientCertificate */ + clientCertificate?: (string|null); + + /** SslConfig caCertificate */ + caCertificate?: (string|null); + } + + /** Represents a SslConfig. */ + class SslConfig implements ISslConfig { + + /** + * Constructs a new SslConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.ISslConfig); + + /** SslConfig type. */ + public type: (google.cloud.clouddms.v1.SslConfig.SslType|keyof typeof google.cloud.clouddms.v1.SslConfig.SslType); + + /** SslConfig clientKey. */ + public clientKey: string; + + /** SslConfig clientCertificate. */ + public clientCertificate: string; + + /** SslConfig caCertificate. */ + public caCertificate: string; + + /** + * Creates a new SslConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SslConfig instance + */ + public static create(properties?: google.cloud.clouddms.v1.ISslConfig): google.cloud.clouddms.v1.SslConfig; + + /** + * Encodes the specified SslConfig message. Does not implicitly {@link google.cloud.clouddms.v1.SslConfig.verify|verify} messages. + * @param message SslConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.ISslConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SslConfig message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.SslConfig.verify|verify} messages. + * @param message SslConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.ISslConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SslConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SslConfig + * @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.clouddms.v1.SslConfig; + + /** + * Decodes a SslConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SslConfig + * @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.clouddms.v1.SslConfig; + + /** + * Verifies a SslConfig 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 SslConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SslConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.SslConfig; + + /** + * Creates a plain object from a SslConfig message. Also converts values to other types if specified. + * @param message SslConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.SslConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SslConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SslConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SslConfig { + + /** SslType enum. */ + enum SslType { + SSL_TYPE_UNSPECIFIED = 0, + SERVER_ONLY = 1, + SERVER_CLIENT = 2 + } + } + + /** Properties of a MySqlConnectionProfile. */ + interface IMySqlConnectionProfile { + + /** MySqlConnectionProfile host */ + host?: (string|null); + + /** MySqlConnectionProfile port */ + port?: (number|null); + + /** MySqlConnectionProfile username */ + username?: (string|null); + + /** MySqlConnectionProfile password */ + password?: (string|null); + + /** MySqlConnectionProfile passwordSet */ + passwordSet?: (boolean|null); + + /** MySqlConnectionProfile ssl */ + ssl?: (google.cloud.clouddms.v1.ISslConfig|null); + + /** MySqlConnectionProfile cloudSqlId */ + cloudSqlId?: (string|null); + } + + /** Represents a MySqlConnectionProfile. */ + class MySqlConnectionProfile implements IMySqlConnectionProfile { + + /** + * Constructs a new MySqlConnectionProfile. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IMySqlConnectionProfile); + + /** MySqlConnectionProfile host. */ + public host: string; + + /** MySqlConnectionProfile port. */ + public port: number; + + /** MySqlConnectionProfile username. */ + public username: string; + + /** MySqlConnectionProfile password. */ + public password: string; + + /** MySqlConnectionProfile passwordSet. */ + public passwordSet: boolean; + + /** MySqlConnectionProfile ssl. */ + public ssl?: (google.cloud.clouddms.v1.ISslConfig|null); + + /** MySqlConnectionProfile cloudSqlId. */ + public cloudSqlId: string; + + /** + * Creates a new MySqlConnectionProfile instance using the specified properties. + * @param [properties] Properties to set + * @returns MySqlConnectionProfile instance + */ + public static create(properties?: google.cloud.clouddms.v1.IMySqlConnectionProfile): google.cloud.clouddms.v1.MySqlConnectionProfile; + + /** + * Encodes the specified MySqlConnectionProfile message. Does not implicitly {@link google.cloud.clouddms.v1.MySqlConnectionProfile.verify|verify} messages. + * @param message MySqlConnectionProfile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IMySqlConnectionProfile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MySqlConnectionProfile message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.MySqlConnectionProfile.verify|verify} messages. + * @param message MySqlConnectionProfile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IMySqlConnectionProfile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MySqlConnectionProfile message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MySqlConnectionProfile + * @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.clouddms.v1.MySqlConnectionProfile; + + /** + * Decodes a MySqlConnectionProfile message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MySqlConnectionProfile + * @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.clouddms.v1.MySqlConnectionProfile; + + /** + * Verifies a MySqlConnectionProfile 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 MySqlConnectionProfile message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MySqlConnectionProfile + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.MySqlConnectionProfile; + + /** + * Creates a plain object from a MySqlConnectionProfile message. Also converts values to other types if specified. + * @param message MySqlConnectionProfile + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.MySqlConnectionProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MySqlConnectionProfile to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MySqlConnectionProfile + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** NetworkArchitecture enum. */ + enum NetworkArchitecture { + NETWORK_ARCHITECTURE_UNSPECIFIED = 0, + NETWORK_ARCHITECTURE_OLD_CSQL_PRODUCER = 1, + NETWORK_ARCHITECTURE_NEW_CSQL_PRODUCER = 2 + } + + /** Properties of a PostgreSqlConnectionProfile. */ + interface IPostgreSqlConnectionProfile { + + /** PostgreSqlConnectionProfile host */ + host?: (string|null); + + /** PostgreSqlConnectionProfile port */ + port?: (number|null); + + /** PostgreSqlConnectionProfile username */ + username?: (string|null); + + /** PostgreSqlConnectionProfile password */ + password?: (string|null); + + /** PostgreSqlConnectionProfile passwordSet */ + passwordSet?: (boolean|null); + + /** PostgreSqlConnectionProfile ssl */ + ssl?: (google.cloud.clouddms.v1.ISslConfig|null); + + /** PostgreSqlConnectionProfile cloudSqlId */ + cloudSqlId?: (string|null); + + /** PostgreSqlConnectionProfile networkArchitecture */ + networkArchitecture?: (google.cloud.clouddms.v1.NetworkArchitecture|keyof typeof google.cloud.clouddms.v1.NetworkArchitecture|null); + + /** PostgreSqlConnectionProfile staticIpConnectivity */ + staticIpConnectivity?: (google.cloud.clouddms.v1.IStaticIpConnectivity|null); + + /** PostgreSqlConnectionProfile privateServiceConnectConnectivity */ + privateServiceConnectConnectivity?: (google.cloud.clouddms.v1.IPrivateServiceConnectConnectivity|null); + } + + /** Represents a PostgreSqlConnectionProfile. */ + class PostgreSqlConnectionProfile implements IPostgreSqlConnectionProfile { + + /** + * Constructs a new PostgreSqlConnectionProfile. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IPostgreSqlConnectionProfile); + + /** PostgreSqlConnectionProfile host. */ + public host: string; + + /** PostgreSqlConnectionProfile port. */ + public port: number; + + /** PostgreSqlConnectionProfile username. */ + public username: string; + + /** PostgreSqlConnectionProfile password. */ + public password: string; + + /** PostgreSqlConnectionProfile passwordSet. */ + public passwordSet: boolean; + + /** PostgreSqlConnectionProfile ssl. */ + public ssl?: (google.cloud.clouddms.v1.ISslConfig|null); + + /** PostgreSqlConnectionProfile cloudSqlId. */ + public cloudSqlId: string; + + /** PostgreSqlConnectionProfile networkArchitecture. */ + public networkArchitecture: (google.cloud.clouddms.v1.NetworkArchitecture|keyof typeof google.cloud.clouddms.v1.NetworkArchitecture); + + /** PostgreSqlConnectionProfile staticIpConnectivity. */ + public staticIpConnectivity?: (google.cloud.clouddms.v1.IStaticIpConnectivity|null); + + /** PostgreSqlConnectionProfile privateServiceConnectConnectivity. */ + public privateServiceConnectConnectivity?: (google.cloud.clouddms.v1.IPrivateServiceConnectConnectivity|null); + + /** PostgreSqlConnectionProfile connectivity. */ + public connectivity?: ("staticIpConnectivity"|"privateServiceConnectConnectivity"); + + /** + * Creates a new PostgreSqlConnectionProfile instance using the specified properties. + * @param [properties] Properties to set + * @returns PostgreSqlConnectionProfile instance + */ + public static create(properties?: google.cloud.clouddms.v1.IPostgreSqlConnectionProfile): google.cloud.clouddms.v1.PostgreSqlConnectionProfile; + + /** + * Encodes the specified PostgreSqlConnectionProfile message. Does not implicitly {@link google.cloud.clouddms.v1.PostgreSqlConnectionProfile.verify|verify} messages. + * @param message PostgreSqlConnectionProfile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IPostgreSqlConnectionProfile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PostgreSqlConnectionProfile message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.PostgreSqlConnectionProfile.verify|verify} messages. + * @param message PostgreSqlConnectionProfile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IPostgreSqlConnectionProfile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PostgreSqlConnectionProfile message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PostgreSqlConnectionProfile + * @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.clouddms.v1.PostgreSqlConnectionProfile; + + /** + * Decodes a PostgreSqlConnectionProfile message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PostgreSqlConnectionProfile + * @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.clouddms.v1.PostgreSqlConnectionProfile; + + /** + * Verifies a PostgreSqlConnectionProfile 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 PostgreSqlConnectionProfile message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PostgreSqlConnectionProfile + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.PostgreSqlConnectionProfile; + + /** + * Creates a plain object from a PostgreSqlConnectionProfile message. Also converts values to other types if specified. + * @param message PostgreSqlConnectionProfile + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.PostgreSqlConnectionProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PostgreSqlConnectionProfile to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PostgreSqlConnectionProfile + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OracleConnectionProfile. */ + interface IOracleConnectionProfile { + + /** OracleConnectionProfile host */ + host?: (string|null); + + /** OracleConnectionProfile port */ + port?: (number|null); + + /** OracleConnectionProfile username */ + username?: (string|null); + + /** OracleConnectionProfile password */ + password?: (string|null); + + /** OracleConnectionProfile passwordSet */ + passwordSet?: (boolean|null); + + /** OracleConnectionProfile databaseService */ + databaseService?: (string|null); + + /** OracleConnectionProfile staticServiceIpConnectivity */ + staticServiceIpConnectivity?: (google.cloud.clouddms.v1.IStaticServiceIpConnectivity|null); + + /** OracleConnectionProfile forwardSshConnectivity */ + forwardSshConnectivity?: (google.cloud.clouddms.v1.IForwardSshTunnelConnectivity|null); + + /** OracleConnectionProfile privateConnectivity */ + privateConnectivity?: (google.cloud.clouddms.v1.IPrivateConnectivity|null); + } + + /** Represents an OracleConnectionProfile. */ + class OracleConnectionProfile implements IOracleConnectionProfile { + + /** + * Constructs a new OracleConnectionProfile. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IOracleConnectionProfile); + + /** OracleConnectionProfile host. */ + public host: string; + + /** OracleConnectionProfile port. */ + public port: number; + + /** OracleConnectionProfile username. */ + public username: string; + + /** OracleConnectionProfile password. */ + public password: string; + + /** OracleConnectionProfile passwordSet. */ + public passwordSet: boolean; + + /** OracleConnectionProfile databaseService. */ + public databaseService: string; + + /** OracleConnectionProfile staticServiceIpConnectivity. */ + public staticServiceIpConnectivity?: (google.cloud.clouddms.v1.IStaticServiceIpConnectivity|null); + + /** OracleConnectionProfile forwardSshConnectivity. */ + public forwardSshConnectivity?: (google.cloud.clouddms.v1.IForwardSshTunnelConnectivity|null); + + /** OracleConnectionProfile privateConnectivity. */ + public privateConnectivity?: (google.cloud.clouddms.v1.IPrivateConnectivity|null); + + /** OracleConnectionProfile connectivity. */ + public connectivity?: ("staticServiceIpConnectivity"|"forwardSshConnectivity"|"privateConnectivity"); + + /** + * Creates a new OracleConnectionProfile instance using the specified properties. + * @param [properties] Properties to set + * @returns OracleConnectionProfile instance + */ + public static create(properties?: google.cloud.clouddms.v1.IOracleConnectionProfile): google.cloud.clouddms.v1.OracleConnectionProfile; + + /** + * Encodes the specified OracleConnectionProfile message. Does not implicitly {@link google.cloud.clouddms.v1.OracleConnectionProfile.verify|verify} messages. + * @param message OracleConnectionProfile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IOracleConnectionProfile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OracleConnectionProfile message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.OracleConnectionProfile.verify|verify} messages. + * @param message OracleConnectionProfile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IOracleConnectionProfile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OracleConnectionProfile message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OracleConnectionProfile + * @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.clouddms.v1.OracleConnectionProfile; + + /** + * Decodes an OracleConnectionProfile message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OracleConnectionProfile + * @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.clouddms.v1.OracleConnectionProfile; + + /** + * Verifies an OracleConnectionProfile 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 OracleConnectionProfile message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OracleConnectionProfile + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.OracleConnectionProfile; + + /** + * Creates a plain object from an OracleConnectionProfile message. Also converts values to other types if specified. + * @param message OracleConnectionProfile + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.OracleConnectionProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OracleConnectionProfile to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OracleConnectionProfile + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudSqlConnectionProfile. */ + interface ICloudSqlConnectionProfile { + + /** CloudSqlConnectionProfile cloudSqlId */ + cloudSqlId?: (string|null); + + /** CloudSqlConnectionProfile settings */ + settings?: (google.cloud.clouddms.v1.ICloudSqlSettings|null); + + /** CloudSqlConnectionProfile privateIp */ + privateIp?: (string|null); + + /** CloudSqlConnectionProfile publicIp */ + publicIp?: (string|null); + + /** CloudSqlConnectionProfile additionalPublicIp */ + additionalPublicIp?: (string|null); + } + + /** Represents a CloudSqlConnectionProfile. */ + class CloudSqlConnectionProfile implements ICloudSqlConnectionProfile { + + /** + * Constructs a new CloudSqlConnectionProfile. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.ICloudSqlConnectionProfile); + + /** CloudSqlConnectionProfile cloudSqlId. */ + public cloudSqlId: string; + + /** CloudSqlConnectionProfile settings. */ + public settings?: (google.cloud.clouddms.v1.ICloudSqlSettings|null); + + /** CloudSqlConnectionProfile privateIp. */ + public privateIp: string; + + /** CloudSqlConnectionProfile publicIp. */ + public publicIp: string; + + /** CloudSqlConnectionProfile additionalPublicIp. */ + public additionalPublicIp: string; + + /** + * Creates a new CloudSqlConnectionProfile instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudSqlConnectionProfile instance + */ + public static create(properties?: google.cloud.clouddms.v1.ICloudSqlConnectionProfile): google.cloud.clouddms.v1.CloudSqlConnectionProfile; + + /** + * Encodes the specified CloudSqlConnectionProfile message. Does not implicitly {@link google.cloud.clouddms.v1.CloudSqlConnectionProfile.verify|verify} messages. + * @param message CloudSqlConnectionProfile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.ICloudSqlConnectionProfile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudSqlConnectionProfile message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.CloudSqlConnectionProfile.verify|verify} messages. + * @param message CloudSqlConnectionProfile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.ICloudSqlConnectionProfile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudSqlConnectionProfile message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudSqlConnectionProfile + * @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.clouddms.v1.CloudSqlConnectionProfile; + + /** + * Decodes a CloudSqlConnectionProfile message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudSqlConnectionProfile + * @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.clouddms.v1.CloudSqlConnectionProfile; + + /** + * Verifies a CloudSqlConnectionProfile 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 CloudSqlConnectionProfile message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudSqlConnectionProfile + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.CloudSqlConnectionProfile; + + /** + * Creates a plain object from a CloudSqlConnectionProfile message. Also converts values to other types if specified. + * @param message CloudSqlConnectionProfile + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.CloudSqlConnectionProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudSqlConnectionProfile to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudSqlConnectionProfile + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AlloyDbConnectionProfile. */ + interface IAlloyDbConnectionProfile { + + /** AlloyDbConnectionProfile clusterId */ + clusterId?: (string|null); + + /** AlloyDbConnectionProfile settings */ + settings?: (google.cloud.clouddms.v1.IAlloyDbSettings|null); + } + + /** Represents an AlloyDbConnectionProfile. */ + class AlloyDbConnectionProfile implements IAlloyDbConnectionProfile { + + /** + * Constructs a new AlloyDbConnectionProfile. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IAlloyDbConnectionProfile); + + /** AlloyDbConnectionProfile clusterId. */ + public clusterId: string; + + /** AlloyDbConnectionProfile settings. */ + public settings?: (google.cloud.clouddms.v1.IAlloyDbSettings|null); + + /** + * Creates a new AlloyDbConnectionProfile instance using the specified properties. + * @param [properties] Properties to set + * @returns AlloyDbConnectionProfile instance + */ + public static create(properties?: google.cloud.clouddms.v1.IAlloyDbConnectionProfile): google.cloud.clouddms.v1.AlloyDbConnectionProfile; + + /** + * Encodes the specified AlloyDbConnectionProfile message. Does not implicitly {@link google.cloud.clouddms.v1.AlloyDbConnectionProfile.verify|verify} messages. + * @param message AlloyDbConnectionProfile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IAlloyDbConnectionProfile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AlloyDbConnectionProfile message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.AlloyDbConnectionProfile.verify|verify} messages. + * @param message AlloyDbConnectionProfile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IAlloyDbConnectionProfile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AlloyDbConnectionProfile message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AlloyDbConnectionProfile + * @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.clouddms.v1.AlloyDbConnectionProfile; + + /** + * Decodes an AlloyDbConnectionProfile message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AlloyDbConnectionProfile + * @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.clouddms.v1.AlloyDbConnectionProfile; + + /** + * Verifies an AlloyDbConnectionProfile 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 AlloyDbConnectionProfile message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AlloyDbConnectionProfile + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.AlloyDbConnectionProfile; + + /** + * Creates a plain object from an AlloyDbConnectionProfile message. Also converts values to other types if specified. + * @param message AlloyDbConnectionProfile + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.AlloyDbConnectionProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AlloyDbConnectionProfile to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AlloyDbConnectionProfile + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SqlAclEntry. */ + interface ISqlAclEntry { + + /** SqlAclEntry value */ + value?: (string|null); + + /** SqlAclEntry expireTime */ + expireTime?: (google.protobuf.ITimestamp|null); + + /** SqlAclEntry ttl */ + ttl?: (google.protobuf.IDuration|null); + + /** SqlAclEntry label */ + label?: (string|null); + } + + /** Represents a SqlAclEntry. */ + class SqlAclEntry implements ISqlAclEntry { + + /** + * Constructs a new SqlAclEntry. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.ISqlAclEntry); + + /** SqlAclEntry value. */ + public value: string; + + /** SqlAclEntry expireTime. */ + public expireTime?: (google.protobuf.ITimestamp|null); + + /** SqlAclEntry ttl. */ + public ttl?: (google.protobuf.IDuration|null); + + /** SqlAclEntry label. */ + public label: string; + + /** SqlAclEntry expiration. */ + public expiration?: ("expireTime"|"ttl"); + + /** + * Creates a new SqlAclEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns SqlAclEntry instance + */ + public static create(properties?: google.cloud.clouddms.v1.ISqlAclEntry): google.cloud.clouddms.v1.SqlAclEntry; + + /** + * Encodes the specified SqlAclEntry message. Does not implicitly {@link google.cloud.clouddms.v1.SqlAclEntry.verify|verify} messages. + * @param message SqlAclEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.ISqlAclEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SqlAclEntry message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.SqlAclEntry.verify|verify} messages. + * @param message SqlAclEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.ISqlAclEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SqlAclEntry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SqlAclEntry + * @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.clouddms.v1.SqlAclEntry; + + /** + * Decodes a SqlAclEntry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SqlAclEntry + * @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.clouddms.v1.SqlAclEntry; + + /** + * Verifies a SqlAclEntry 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 SqlAclEntry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SqlAclEntry + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.SqlAclEntry; + + /** + * Creates a plain object from a SqlAclEntry message. Also converts values to other types if specified. + * @param message SqlAclEntry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.SqlAclEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SqlAclEntry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SqlAclEntry + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SqlIpConfig. */ + interface ISqlIpConfig { + + /** SqlIpConfig enableIpv4 */ + enableIpv4?: (google.protobuf.IBoolValue|null); + + /** SqlIpConfig privateNetwork */ + privateNetwork?: (string|null); + + /** SqlIpConfig allocatedIpRange */ + allocatedIpRange?: (string|null); + + /** SqlIpConfig requireSsl */ + requireSsl?: (google.protobuf.IBoolValue|null); + + /** SqlIpConfig authorizedNetworks */ + authorizedNetworks?: (google.cloud.clouddms.v1.ISqlAclEntry[]|null); + } + + /** Represents a SqlIpConfig. */ + class SqlIpConfig implements ISqlIpConfig { + + /** + * Constructs a new SqlIpConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.ISqlIpConfig); + + /** SqlIpConfig enableIpv4. */ + public enableIpv4?: (google.protobuf.IBoolValue|null); + + /** SqlIpConfig privateNetwork. */ + public privateNetwork: string; + + /** SqlIpConfig allocatedIpRange. */ + public allocatedIpRange: string; + + /** SqlIpConfig requireSsl. */ + public requireSsl?: (google.protobuf.IBoolValue|null); + + /** SqlIpConfig authorizedNetworks. */ + public authorizedNetworks: google.cloud.clouddms.v1.ISqlAclEntry[]; + + /** + * Creates a new SqlIpConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SqlIpConfig instance + */ + public static create(properties?: google.cloud.clouddms.v1.ISqlIpConfig): google.cloud.clouddms.v1.SqlIpConfig; + + /** + * Encodes the specified SqlIpConfig message. Does not implicitly {@link google.cloud.clouddms.v1.SqlIpConfig.verify|verify} messages. + * @param message SqlIpConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.ISqlIpConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SqlIpConfig message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.SqlIpConfig.verify|verify} messages. + * @param message SqlIpConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.ISqlIpConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SqlIpConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SqlIpConfig + * @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.clouddms.v1.SqlIpConfig; + + /** + * Decodes a SqlIpConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SqlIpConfig + * @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.clouddms.v1.SqlIpConfig; + + /** + * Verifies a SqlIpConfig 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 SqlIpConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SqlIpConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.SqlIpConfig; + + /** + * Creates a plain object from a SqlIpConfig message. Also converts values to other types if specified. + * @param message SqlIpConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.SqlIpConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SqlIpConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SqlIpConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudSqlSettings. */ + interface ICloudSqlSettings { + + /** CloudSqlSettings databaseVersion */ + databaseVersion?: (google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion|keyof typeof google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion|null); + + /** CloudSqlSettings userLabels */ + userLabels?: ({ [k: string]: string }|null); + + /** CloudSqlSettings tier */ + tier?: (string|null); + + /** CloudSqlSettings storageAutoResizeLimit */ + storageAutoResizeLimit?: (google.protobuf.IInt64Value|null); + + /** CloudSqlSettings activationPolicy */ + activationPolicy?: (google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy|keyof typeof google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy|null); + + /** CloudSqlSettings ipConfig */ + ipConfig?: (google.cloud.clouddms.v1.ISqlIpConfig|null); + + /** CloudSqlSettings autoStorageIncrease */ + autoStorageIncrease?: (google.protobuf.IBoolValue|null); + + /** CloudSqlSettings databaseFlags */ + databaseFlags?: ({ [k: string]: string }|null); + + /** CloudSqlSettings dataDiskType */ + dataDiskType?: (google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType|keyof typeof google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType|null); + + /** CloudSqlSettings dataDiskSizeGb */ + dataDiskSizeGb?: (google.protobuf.IInt64Value|null); + + /** CloudSqlSettings zone */ + zone?: (string|null); + + /** CloudSqlSettings secondaryZone */ + secondaryZone?: (string|null); + + /** CloudSqlSettings sourceId */ + sourceId?: (string|null); + + /** CloudSqlSettings rootPassword */ + rootPassword?: (string|null); + + /** CloudSqlSettings rootPasswordSet */ + rootPasswordSet?: (boolean|null); + + /** CloudSqlSettings collation */ + collation?: (string|null); + + /** CloudSqlSettings cmekKeyName */ + cmekKeyName?: (string|null); + + /** CloudSqlSettings availabilityType */ + availabilityType?: (google.cloud.clouddms.v1.CloudSqlSettings.SqlAvailabilityType|keyof typeof google.cloud.clouddms.v1.CloudSqlSettings.SqlAvailabilityType|null); + } + + /** Represents a CloudSqlSettings. */ + class CloudSqlSettings implements ICloudSqlSettings { + + /** + * Constructs a new CloudSqlSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.ICloudSqlSettings); + + /** CloudSqlSettings databaseVersion. */ + public databaseVersion: (google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion|keyof typeof google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion); + + /** CloudSqlSettings userLabels. */ + public userLabels: { [k: string]: string }; + + /** CloudSqlSettings tier. */ + public tier: string; + + /** CloudSqlSettings storageAutoResizeLimit. */ + public storageAutoResizeLimit?: (google.protobuf.IInt64Value|null); + + /** CloudSqlSettings activationPolicy. */ + public activationPolicy: (google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy|keyof typeof google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy); + + /** CloudSqlSettings ipConfig. */ + public ipConfig?: (google.cloud.clouddms.v1.ISqlIpConfig|null); + + /** CloudSqlSettings autoStorageIncrease. */ + public autoStorageIncrease?: (google.protobuf.IBoolValue|null); + + /** CloudSqlSettings databaseFlags. */ + public databaseFlags: { [k: string]: string }; + + /** CloudSqlSettings dataDiskType. */ + public dataDiskType: (google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType|keyof typeof google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType); + + /** CloudSqlSettings dataDiskSizeGb. */ + public dataDiskSizeGb?: (google.protobuf.IInt64Value|null); + + /** CloudSqlSettings zone. */ + public zone: string; + + /** CloudSqlSettings secondaryZone. */ + public secondaryZone: string; + + /** CloudSqlSettings sourceId. */ + public sourceId: string; + + /** CloudSqlSettings rootPassword. */ + public rootPassword: string; + + /** CloudSqlSettings rootPasswordSet. */ + public rootPasswordSet: boolean; + + /** CloudSqlSettings collation. */ + public collation: string; + + /** CloudSqlSettings cmekKeyName. */ + public cmekKeyName: string; + + /** CloudSqlSettings availabilityType. */ + public availabilityType: (google.cloud.clouddms.v1.CloudSqlSettings.SqlAvailabilityType|keyof typeof google.cloud.clouddms.v1.CloudSqlSettings.SqlAvailabilityType); + + /** + * Creates a new CloudSqlSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudSqlSettings instance + */ + public static create(properties?: google.cloud.clouddms.v1.ICloudSqlSettings): google.cloud.clouddms.v1.CloudSqlSettings; + + /** + * Encodes the specified CloudSqlSettings message. Does not implicitly {@link google.cloud.clouddms.v1.CloudSqlSettings.verify|verify} messages. + * @param message CloudSqlSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.ICloudSqlSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudSqlSettings message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.CloudSqlSettings.verify|verify} messages. + * @param message CloudSqlSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.ICloudSqlSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudSqlSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudSqlSettings + * @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.clouddms.v1.CloudSqlSettings; + + /** + * Decodes a CloudSqlSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudSqlSettings + * @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.clouddms.v1.CloudSqlSettings; + + /** + * Verifies a CloudSqlSettings 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 CloudSqlSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudSqlSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.CloudSqlSettings; + + /** + * Creates a plain object from a CloudSqlSettings message. Also converts values to other types if specified. + * @param message CloudSqlSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.CloudSqlSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudSqlSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudSqlSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CloudSqlSettings { + + /** SqlActivationPolicy enum. */ + enum SqlActivationPolicy { + SQL_ACTIVATION_POLICY_UNSPECIFIED = 0, + ALWAYS = 1, + NEVER = 2 + } + + /** SqlDataDiskType enum. */ + enum SqlDataDiskType { + SQL_DATA_DISK_TYPE_UNSPECIFIED = 0, + PD_SSD = 1, + PD_HDD = 2 + } + + /** SqlDatabaseVersion enum. */ + enum SqlDatabaseVersion { + SQL_DATABASE_VERSION_UNSPECIFIED = 0, + MYSQL_5_6 = 1, + MYSQL_5_7 = 2, + POSTGRES_9_6 = 3, + POSTGRES_11 = 4, + POSTGRES_10 = 5, + MYSQL_8_0 = 6, + POSTGRES_12 = 7, + POSTGRES_13 = 8, + POSTGRES_14 = 17 + } + + /** SqlAvailabilityType enum. */ + enum SqlAvailabilityType { + SQL_AVAILABILITY_TYPE_UNSPECIFIED = 0, + ZONAL = 1, + REGIONAL = 2 + } + } + + /** Properties of an AlloyDbSettings. */ + interface IAlloyDbSettings { + + /** AlloyDbSettings initialUser */ + initialUser?: (google.cloud.clouddms.v1.AlloyDbSettings.IUserPassword|null); + + /** AlloyDbSettings vpcNetwork */ + vpcNetwork?: (string|null); + + /** AlloyDbSettings labels */ + labels?: ({ [k: string]: string }|null); + + /** AlloyDbSettings primaryInstanceSettings */ + primaryInstanceSettings?: (google.cloud.clouddms.v1.AlloyDbSettings.IPrimaryInstanceSettings|null); + + /** AlloyDbSettings encryptionConfig */ + encryptionConfig?: (google.cloud.clouddms.v1.AlloyDbSettings.IEncryptionConfig|null); + } + + /** Represents an AlloyDbSettings. */ + class AlloyDbSettings implements IAlloyDbSettings { + + /** + * Constructs a new AlloyDbSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IAlloyDbSettings); + + /** AlloyDbSettings initialUser. */ + public initialUser?: (google.cloud.clouddms.v1.AlloyDbSettings.IUserPassword|null); + + /** AlloyDbSettings vpcNetwork. */ + public vpcNetwork: string; + + /** AlloyDbSettings labels. */ + public labels: { [k: string]: string }; + + /** AlloyDbSettings primaryInstanceSettings. */ + public primaryInstanceSettings?: (google.cloud.clouddms.v1.AlloyDbSettings.IPrimaryInstanceSettings|null); + + /** AlloyDbSettings encryptionConfig. */ + public encryptionConfig?: (google.cloud.clouddms.v1.AlloyDbSettings.IEncryptionConfig|null); + + /** + * Creates a new AlloyDbSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns AlloyDbSettings instance + */ + public static create(properties?: google.cloud.clouddms.v1.IAlloyDbSettings): google.cloud.clouddms.v1.AlloyDbSettings; + + /** + * Encodes the specified AlloyDbSettings message. Does not implicitly {@link google.cloud.clouddms.v1.AlloyDbSettings.verify|verify} messages. + * @param message AlloyDbSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IAlloyDbSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AlloyDbSettings message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.AlloyDbSettings.verify|verify} messages. + * @param message AlloyDbSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IAlloyDbSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AlloyDbSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AlloyDbSettings + * @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.clouddms.v1.AlloyDbSettings; + + /** + * Decodes an AlloyDbSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AlloyDbSettings + * @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.clouddms.v1.AlloyDbSettings; + + /** + * Verifies an AlloyDbSettings 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 AlloyDbSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AlloyDbSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.AlloyDbSettings; + + /** + * Creates a plain object from an AlloyDbSettings message. Also converts values to other types if specified. + * @param message AlloyDbSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.AlloyDbSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AlloyDbSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AlloyDbSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AlloyDbSettings { + + /** Properties of a UserPassword. */ + interface IUserPassword { + + /** UserPassword user */ + user?: (string|null); + + /** UserPassword password */ + password?: (string|null); + + /** UserPassword passwordSet */ + passwordSet?: (boolean|null); + } + + /** Represents a UserPassword. */ + class UserPassword implements IUserPassword { + + /** + * Constructs a new UserPassword. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.AlloyDbSettings.IUserPassword); + + /** UserPassword user. */ + public user: string; + + /** UserPassword password. */ + public password: string; + + /** UserPassword passwordSet. */ + public passwordSet: boolean; + + /** + * Creates a new UserPassword instance using the specified properties. + * @param [properties] Properties to set + * @returns UserPassword instance + */ + public static create(properties?: google.cloud.clouddms.v1.AlloyDbSettings.IUserPassword): google.cloud.clouddms.v1.AlloyDbSettings.UserPassword; + + /** + * Encodes the specified UserPassword message. Does not implicitly {@link google.cloud.clouddms.v1.AlloyDbSettings.UserPassword.verify|verify} messages. + * @param message UserPassword message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.AlloyDbSettings.IUserPassword, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserPassword message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.AlloyDbSettings.UserPassword.verify|verify} messages. + * @param message UserPassword message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.AlloyDbSettings.IUserPassword, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserPassword message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserPassword + * @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.clouddms.v1.AlloyDbSettings.UserPassword; + + /** + * Decodes a UserPassword message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserPassword + * @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.clouddms.v1.AlloyDbSettings.UserPassword; + + /** + * Verifies a UserPassword 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 UserPassword message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserPassword + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.AlloyDbSettings.UserPassword; + + /** + * Creates a plain object from a UserPassword message. Also converts values to other types if specified. + * @param message UserPassword + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.AlloyDbSettings.UserPassword, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserPassword to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserPassword + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PrimaryInstanceSettings. */ + interface IPrimaryInstanceSettings { + + /** PrimaryInstanceSettings id */ + id?: (string|null); + + /** PrimaryInstanceSettings machineConfig */ + machineConfig?: (google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.IMachineConfig|null); + + /** PrimaryInstanceSettings databaseFlags */ + databaseFlags?: ({ [k: string]: string }|null); + + /** PrimaryInstanceSettings labels */ + labels?: ({ [k: string]: string }|null); + + /** PrimaryInstanceSettings privateIp */ + privateIp?: (string|null); + } + + /** Represents a PrimaryInstanceSettings. */ + class PrimaryInstanceSettings implements IPrimaryInstanceSettings { + + /** + * Constructs a new PrimaryInstanceSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.AlloyDbSettings.IPrimaryInstanceSettings); + + /** PrimaryInstanceSettings id. */ + public id: string; + + /** PrimaryInstanceSettings machineConfig. */ + public machineConfig?: (google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.IMachineConfig|null); + + /** PrimaryInstanceSettings databaseFlags. */ + public databaseFlags: { [k: string]: string }; + + /** PrimaryInstanceSettings labels. */ + public labels: { [k: string]: string }; + + /** PrimaryInstanceSettings privateIp. */ + public privateIp: string; + + /** + * Creates a new PrimaryInstanceSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PrimaryInstanceSettings instance + */ + public static create(properties?: google.cloud.clouddms.v1.AlloyDbSettings.IPrimaryInstanceSettings): google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings; + + /** + * Encodes the specified PrimaryInstanceSettings message. Does not implicitly {@link google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.verify|verify} messages. + * @param message PrimaryInstanceSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.AlloyDbSettings.IPrimaryInstanceSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrimaryInstanceSettings message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.verify|verify} messages. + * @param message PrimaryInstanceSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.AlloyDbSettings.IPrimaryInstanceSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrimaryInstanceSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrimaryInstanceSettings + * @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.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings; + + /** + * Decodes a PrimaryInstanceSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrimaryInstanceSettings + * @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.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings; + + /** + * Verifies a PrimaryInstanceSettings 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 PrimaryInstanceSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrimaryInstanceSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings; + + /** + * Creates a plain object from a PrimaryInstanceSettings message. Also converts values to other types if specified. + * @param message PrimaryInstanceSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrimaryInstanceSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrimaryInstanceSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PrimaryInstanceSettings { + + /** Properties of a MachineConfig. */ + interface IMachineConfig { + + /** MachineConfig cpuCount */ + cpuCount?: (number|null); + } + + /** Represents a MachineConfig. */ + class MachineConfig implements IMachineConfig { + + /** + * Constructs a new MachineConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.IMachineConfig); + + /** MachineConfig cpuCount. */ + public cpuCount: number; + + /** + * Creates a new MachineConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns MachineConfig instance + */ + public static create(properties?: google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.IMachineConfig): google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig; + + /** + * Encodes the specified MachineConfig message. Does not implicitly {@link google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig.verify|verify} messages. + * @param message MachineConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.IMachineConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MachineConfig message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig.verify|verify} messages. + * @param message MachineConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.IMachineConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MachineConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MachineConfig + * @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.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig; + + /** + * Decodes a MachineConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MachineConfig + * @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.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig; + + /** + * Verifies a MachineConfig 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 MachineConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MachineConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig; + + /** + * Creates a plain object from a MachineConfig message. Also converts values to other types if specified. + * @param message MachineConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MachineConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MachineConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EncryptionConfig. */ + interface IEncryptionConfig { + + /** EncryptionConfig kmsKeyName */ + kmsKeyName?: (string|null); + } + + /** Represents an EncryptionConfig. */ + class EncryptionConfig implements IEncryptionConfig { + + /** + * Constructs a new EncryptionConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.AlloyDbSettings.IEncryptionConfig); + + /** EncryptionConfig kmsKeyName. */ + public kmsKeyName: string; + + /** + * Creates a new EncryptionConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns EncryptionConfig instance + */ + public static create(properties?: google.cloud.clouddms.v1.AlloyDbSettings.IEncryptionConfig): google.cloud.clouddms.v1.AlloyDbSettings.EncryptionConfig; + + /** + * Encodes the specified EncryptionConfig message. Does not implicitly {@link google.cloud.clouddms.v1.AlloyDbSettings.EncryptionConfig.verify|verify} messages. + * @param message EncryptionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.AlloyDbSettings.IEncryptionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.AlloyDbSettings.EncryptionConfig.verify|verify} messages. + * @param message EncryptionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.AlloyDbSettings.IEncryptionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EncryptionConfig + * @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.clouddms.v1.AlloyDbSettings.EncryptionConfig; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EncryptionConfig + * @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.clouddms.v1.AlloyDbSettings.EncryptionConfig; + + /** + * Verifies an EncryptionConfig 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 EncryptionConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EncryptionConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.AlloyDbSettings.EncryptionConfig; + + /** + * Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified. + * @param message EncryptionConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.AlloyDbSettings.EncryptionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EncryptionConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EncryptionConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a StaticIpConnectivity. */ + interface IStaticIpConnectivity { + } + + /** Represents a StaticIpConnectivity. */ + class StaticIpConnectivity implements IStaticIpConnectivity { + + /** + * Constructs a new StaticIpConnectivity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IStaticIpConnectivity); + + /** + * Creates a new StaticIpConnectivity instance using the specified properties. + * @param [properties] Properties to set + * @returns StaticIpConnectivity instance + */ + public static create(properties?: google.cloud.clouddms.v1.IStaticIpConnectivity): google.cloud.clouddms.v1.StaticIpConnectivity; + + /** + * Encodes the specified StaticIpConnectivity message. Does not implicitly {@link google.cloud.clouddms.v1.StaticIpConnectivity.verify|verify} messages. + * @param message StaticIpConnectivity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IStaticIpConnectivity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StaticIpConnectivity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.StaticIpConnectivity.verify|verify} messages. + * @param message StaticIpConnectivity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IStaticIpConnectivity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StaticIpConnectivity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StaticIpConnectivity + * @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.clouddms.v1.StaticIpConnectivity; + + /** + * Decodes a StaticIpConnectivity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StaticIpConnectivity + * @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.clouddms.v1.StaticIpConnectivity; + + /** + * Verifies a StaticIpConnectivity 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 StaticIpConnectivity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StaticIpConnectivity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.StaticIpConnectivity; + + /** + * Creates a plain object from a StaticIpConnectivity message. Also converts values to other types if specified. + * @param message StaticIpConnectivity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.StaticIpConnectivity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StaticIpConnectivity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StaticIpConnectivity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PrivateServiceConnectConnectivity. */ + interface IPrivateServiceConnectConnectivity { + + /** PrivateServiceConnectConnectivity serviceAttachment */ + serviceAttachment?: (string|null); + } + + /** Represents a PrivateServiceConnectConnectivity. */ + class PrivateServiceConnectConnectivity implements IPrivateServiceConnectConnectivity { + + /** + * Constructs a new PrivateServiceConnectConnectivity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IPrivateServiceConnectConnectivity); + + /** PrivateServiceConnectConnectivity serviceAttachment. */ + public serviceAttachment: string; + + /** + * Creates a new PrivateServiceConnectConnectivity instance using the specified properties. + * @param [properties] Properties to set + * @returns PrivateServiceConnectConnectivity instance + */ + public static create(properties?: google.cloud.clouddms.v1.IPrivateServiceConnectConnectivity): google.cloud.clouddms.v1.PrivateServiceConnectConnectivity; + + /** + * Encodes the specified PrivateServiceConnectConnectivity message. Does not implicitly {@link google.cloud.clouddms.v1.PrivateServiceConnectConnectivity.verify|verify} messages. + * @param message PrivateServiceConnectConnectivity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IPrivateServiceConnectConnectivity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrivateServiceConnectConnectivity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.PrivateServiceConnectConnectivity.verify|verify} messages. + * @param message PrivateServiceConnectConnectivity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IPrivateServiceConnectConnectivity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrivateServiceConnectConnectivity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrivateServiceConnectConnectivity + * @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.clouddms.v1.PrivateServiceConnectConnectivity; + + /** + * Decodes a PrivateServiceConnectConnectivity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrivateServiceConnectConnectivity + * @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.clouddms.v1.PrivateServiceConnectConnectivity; + + /** + * Verifies a PrivateServiceConnectConnectivity 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 PrivateServiceConnectConnectivity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrivateServiceConnectConnectivity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.PrivateServiceConnectConnectivity; + + /** + * Creates a plain object from a PrivateServiceConnectConnectivity message. Also converts values to other types if specified. + * @param message PrivateServiceConnectConnectivity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.PrivateServiceConnectConnectivity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrivateServiceConnectConnectivity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrivateServiceConnectConnectivity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReverseSshConnectivity. */ + interface IReverseSshConnectivity { + + /** ReverseSshConnectivity vmIp */ + vmIp?: (string|null); + + /** ReverseSshConnectivity vmPort */ + vmPort?: (number|null); + + /** ReverseSshConnectivity vm */ + vm?: (string|null); + + /** ReverseSshConnectivity vpc */ + vpc?: (string|null); + } + + /** Represents a ReverseSshConnectivity. */ + class ReverseSshConnectivity implements IReverseSshConnectivity { + + /** + * Constructs a new ReverseSshConnectivity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IReverseSshConnectivity); + + /** ReverseSshConnectivity vmIp. */ + public vmIp: string; + + /** ReverseSshConnectivity vmPort. */ + public vmPort: number; + + /** ReverseSshConnectivity vm. */ + public vm: string; + + /** ReverseSshConnectivity vpc. */ + public vpc: string; + + /** + * Creates a new ReverseSshConnectivity instance using the specified properties. + * @param [properties] Properties to set + * @returns ReverseSshConnectivity instance + */ + public static create(properties?: google.cloud.clouddms.v1.IReverseSshConnectivity): google.cloud.clouddms.v1.ReverseSshConnectivity; + + /** + * Encodes the specified ReverseSshConnectivity message. Does not implicitly {@link google.cloud.clouddms.v1.ReverseSshConnectivity.verify|verify} messages. + * @param message ReverseSshConnectivity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IReverseSshConnectivity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReverseSshConnectivity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ReverseSshConnectivity.verify|verify} messages. + * @param message ReverseSshConnectivity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IReverseSshConnectivity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReverseSshConnectivity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReverseSshConnectivity + * @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.clouddms.v1.ReverseSshConnectivity; + + /** + * Decodes a ReverseSshConnectivity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReverseSshConnectivity + * @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.clouddms.v1.ReverseSshConnectivity; + + /** + * Verifies a ReverseSshConnectivity 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 ReverseSshConnectivity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReverseSshConnectivity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.ReverseSshConnectivity; + + /** + * Creates a plain object from a ReverseSshConnectivity message. Also converts values to other types if specified. + * @param message ReverseSshConnectivity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.ReverseSshConnectivity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReverseSshConnectivity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReverseSshConnectivity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VpcPeeringConnectivity. */ + interface IVpcPeeringConnectivity { + + /** VpcPeeringConnectivity vpc */ + vpc?: (string|null); + } + + /** Represents a VpcPeeringConnectivity. */ + class VpcPeeringConnectivity implements IVpcPeeringConnectivity { + + /** + * Constructs a new VpcPeeringConnectivity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IVpcPeeringConnectivity); + + /** VpcPeeringConnectivity vpc. */ + public vpc: string; + + /** + * Creates a new VpcPeeringConnectivity instance using the specified properties. + * @param [properties] Properties to set + * @returns VpcPeeringConnectivity instance + */ + public static create(properties?: google.cloud.clouddms.v1.IVpcPeeringConnectivity): google.cloud.clouddms.v1.VpcPeeringConnectivity; + + /** + * Encodes the specified VpcPeeringConnectivity message. Does not implicitly {@link google.cloud.clouddms.v1.VpcPeeringConnectivity.verify|verify} messages. + * @param message VpcPeeringConnectivity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IVpcPeeringConnectivity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VpcPeeringConnectivity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.VpcPeeringConnectivity.verify|verify} messages. + * @param message VpcPeeringConnectivity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IVpcPeeringConnectivity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VpcPeeringConnectivity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VpcPeeringConnectivity + * @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.clouddms.v1.VpcPeeringConnectivity; + + /** + * Decodes a VpcPeeringConnectivity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VpcPeeringConnectivity + * @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.clouddms.v1.VpcPeeringConnectivity; + + /** + * Verifies a VpcPeeringConnectivity 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 VpcPeeringConnectivity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VpcPeeringConnectivity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.VpcPeeringConnectivity; + + /** + * Creates a plain object from a VpcPeeringConnectivity message. Also converts values to other types if specified. + * @param message VpcPeeringConnectivity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.VpcPeeringConnectivity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VpcPeeringConnectivity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VpcPeeringConnectivity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ForwardSshTunnelConnectivity. */ + interface IForwardSshTunnelConnectivity { + + /** ForwardSshTunnelConnectivity hostname */ + hostname?: (string|null); + + /** ForwardSshTunnelConnectivity username */ + username?: (string|null); + + /** ForwardSshTunnelConnectivity port */ + port?: (number|null); + + /** ForwardSshTunnelConnectivity password */ + password?: (string|null); + + /** ForwardSshTunnelConnectivity privateKey */ + privateKey?: (string|null); + } + + /** Represents a ForwardSshTunnelConnectivity. */ + class ForwardSshTunnelConnectivity implements IForwardSshTunnelConnectivity { + + /** + * Constructs a new ForwardSshTunnelConnectivity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IForwardSshTunnelConnectivity); + + /** ForwardSshTunnelConnectivity hostname. */ + public hostname: string; + + /** ForwardSshTunnelConnectivity username. */ + public username: string; + + /** ForwardSshTunnelConnectivity port. */ + public port: number; + + /** ForwardSshTunnelConnectivity password. */ + public password?: (string|null); + + /** ForwardSshTunnelConnectivity privateKey. */ + public privateKey?: (string|null); + + /** ForwardSshTunnelConnectivity authenticationMethod. */ + public authenticationMethod?: ("password"|"privateKey"); + + /** + * Creates a new ForwardSshTunnelConnectivity instance using the specified properties. + * @param [properties] Properties to set + * @returns ForwardSshTunnelConnectivity instance + */ + public static create(properties?: google.cloud.clouddms.v1.IForwardSshTunnelConnectivity): google.cloud.clouddms.v1.ForwardSshTunnelConnectivity; + + /** + * Encodes the specified ForwardSshTunnelConnectivity message. Does not implicitly {@link google.cloud.clouddms.v1.ForwardSshTunnelConnectivity.verify|verify} messages. + * @param message ForwardSshTunnelConnectivity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IForwardSshTunnelConnectivity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ForwardSshTunnelConnectivity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ForwardSshTunnelConnectivity.verify|verify} messages. + * @param message ForwardSshTunnelConnectivity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IForwardSshTunnelConnectivity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ForwardSshTunnelConnectivity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ForwardSshTunnelConnectivity + * @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.clouddms.v1.ForwardSshTunnelConnectivity; + + /** + * Decodes a ForwardSshTunnelConnectivity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ForwardSshTunnelConnectivity + * @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.clouddms.v1.ForwardSshTunnelConnectivity; + + /** + * Verifies a ForwardSshTunnelConnectivity 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 ForwardSshTunnelConnectivity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ForwardSshTunnelConnectivity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.ForwardSshTunnelConnectivity; + + /** + * Creates a plain object from a ForwardSshTunnelConnectivity message. Also converts values to other types if specified. + * @param message ForwardSshTunnelConnectivity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.ForwardSshTunnelConnectivity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ForwardSshTunnelConnectivity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ForwardSshTunnelConnectivity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StaticServiceIpConnectivity. */ + interface IStaticServiceIpConnectivity { + } + + /** Represents a StaticServiceIpConnectivity. */ + class StaticServiceIpConnectivity implements IStaticServiceIpConnectivity { + + /** + * Constructs a new StaticServiceIpConnectivity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IStaticServiceIpConnectivity); + + /** + * Creates a new StaticServiceIpConnectivity instance using the specified properties. + * @param [properties] Properties to set + * @returns StaticServiceIpConnectivity instance + */ + public static create(properties?: google.cloud.clouddms.v1.IStaticServiceIpConnectivity): google.cloud.clouddms.v1.StaticServiceIpConnectivity; + + /** + * Encodes the specified StaticServiceIpConnectivity message. Does not implicitly {@link google.cloud.clouddms.v1.StaticServiceIpConnectivity.verify|verify} messages. + * @param message StaticServiceIpConnectivity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IStaticServiceIpConnectivity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StaticServiceIpConnectivity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.StaticServiceIpConnectivity.verify|verify} messages. + * @param message StaticServiceIpConnectivity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IStaticServiceIpConnectivity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StaticServiceIpConnectivity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StaticServiceIpConnectivity + * @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.clouddms.v1.StaticServiceIpConnectivity; + + /** + * Decodes a StaticServiceIpConnectivity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StaticServiceIpConnectivity + * @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.clouddms.v1.StaticServiceIpConnectivity; + + /** + * Verifies a StaticServiceIpConnectivity 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 StaticServiceIpConnectivity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StaticServiceIpConnectivity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.StaticServiceIpConnectivity; + + /** + * Creates a plain object from a StaticServiceIpConnectivity message. Also converts values to other types if specified. + * @param message StaticServiceIpConnectivity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.StaticServiceIpConnectivity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StaticServiceIpConnectivity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StaticServiceIpConnectivity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PrivateConnectivity. */ + interface IPrivateConnectivity { + + /** PrivateConnectivity privateConnection */ + privateConnection?: (string|null); + } + + /** Represents a PrivateConnectivity. */ + class PrivateConnectivity implements IPrivateConnectivity { + + /** + * Constructs a new PrivateConnectivity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IPrivateConnectivity); + + /** PrivateConnectivity privateConnection. */ + public privateConnection: string; + + /** + * Creates a new PrivateConnectivity instance using the specified properties. + * @param [properties] Properties to set + * @returns PrivateConnectivity instance + */ + public static create(properties?: google.cloud.clouddms.v1.IPrivateConnectivity): google.cloud.clouddms.v1.PrivateConnectivity; + + /** + * Encodes the specified PrivateConnectivity message. Does not implicitly {@link google.cloud.clouddms.v1.PrivateConnectivity.verify|verify} messages. + * @param message PrivateConnectivity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IPrivateConnectivity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrivateConnectivity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.PrivateConnectivity.verify|verify} messages. + * @param message PrivateConnectivity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IPrivateConnectivity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrivateConnectivity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrivateConnectivity + * @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.clouddms.v1.PrivateConnectivity; + + /** + * Decodes a PrivateConnectivity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrivateConnectivity + * @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.clouddms.v1.PrivateConnectivity; + + /** + * Verifies a PrivateConnectivity 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 PrivateConnectivity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrivateConnectivity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.PrivateConnectivity; + + /** + * Creates a plain object from a PrivateConnectivity message. Also converts values to other types if specified. + * @param message PrivateConnectivity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.PrivateConnectivity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrivateConnectivity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrivateConnectivity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DatabaseType. */ + interface IDatabaseType { + + /** DatabaseType provider */ + provider?: (google.cloud.clouddms.v1.DatabaseProvider|keyof typeof google.cloud.clouddms.v1.DatabaseProvider|null); + + /** DatabaseType engine */ + engine?: (google.cloud.clouddms.v1.DatabaseEngine|keyof typeof google.cloud.clouddms.v1.DatabaseEngine|null); + } + + /** Represents a DatabaseType. */ + class DatabaseType implements IDatabaseType { + + /** + * Constructs a new DatabaseType. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IDatabaseType); + + /** DatabaseType provider. */ + public provider: (google.cloud.clouddms.v1.DatabaseProvider|keyof typeof google.cloud.clouddms.v1.DatabaseProvider); + + /** DatabaseType engine. */ + public engine: (google.cloud.clouddms.v1.DatabaseEngine|keyof typeof google.cloud.clouddms.v1.DatabaseEngine); + + /** + * Creates a new DatabaseType instance using the specified properties. + * @param [properties] Properties to set + * @returns DatabaseType instance + */ + public static create(properties?: google.cloud.clouddms.v1.IDatabaseType): google.cloud.clouddms.v1.DatabaseType; + + /** + * Encodes the specified DatabaseType message. Does not implicitly {@link google.cloud.clouddms.v1.DatabaseType.verify|verify} messages. + * @param message DatabaseType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IDatabaseType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DatabaseType message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.DatabaseType.verify|verify} messages. + * @param message DatabaseType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IDatabaseType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DatabaseType message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DatabaseType + * @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.clouddms.v1.DatabaseType; + + /** + * Decodes a DatabaseType message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DatabaseType + * @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.clouddms.v1.DatabaseType; + + /** + * Verifies a DatabaseType 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 DatabaseType message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DatabaseType + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.DatabaseType; + + /** + * Creates a plain object from a DatabaseType message. Also converts values to other types if specified. + * @param message DatabaseType + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.DatabaseType, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DatabaseType to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DatabaseType + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MigrationJob. */ + interface IMigrationJob { + + /** MigrationJob name */ + name?: (string|null); + + /** MigrationJob createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** MigrationJob updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** MigrationJob labels */ + labels?: ({ [k: string]: string }|null); + + /** MigrationJob displayName */ + displayName?: (string|null); + + /** MigrationJob state */ + state?: (google.cloud.clouddms.v1.MigrationJob.State|keyof typeof google.cloud.clouddms.v1.MigrationJob.State|null); + + /** MigrationJob phase */ + phase?: (google.cloud.clouddms.v1.MigrationJob.Phase|keyof typeof google.cloud.clouddms.v1.MigrationJob.Phase|null); + + /** MigrationJob type */ + type?: (google.cloud.clouddms.v1.MigrationJob.Type|keyof typeof google.cloud.clouddms.v1.MigrationJob.Type|null); + + /** MigrationJob dumpPath */ + dumpPath?: (string|null); + + /** MigrationJob dumpFlags */ + dumpFlags?: (google.cloud.clouddms.v1.MigrationJob.IDumpFlags|null); + + /** MigrationJob source */ + source?: (string|null); + + /** MigrationJob destination */ + destination?: (string|null); + + /** MigrationJob reverseSshConnectivity */ + reverseSshConnectivity?: (google.cloud.clouddms.v1.IReverseSshConnectivity|null); + + /** MigrationJob vpcPeeringConnectivity */ + vpcPeeringConnectivity?: (google.cloud.clouddms.v1.IVpcPeeringConnectivity|null); + + /** MigrationJob staticIpConnectivity */ + staticIpConnectivity?: (google.cloud.clouddms.v1.IStaticIpConnectivity|null); + + /** MigrationJob duration */ + duration?: (google.protobuf.IDuration|null); + + /** MigrationJob error */ + error?: (google.rpc.IStatus|null); + + /** MigrationJob sourceDatabase */ + sourceDatabase?: (google.cloud.clouddms.v1.IDatabaseType|null); + + /** MigrationJob destinationDatabase */ + destinationDatabase?: (google.cloud.clouddms.v1.IDatabaseType|null); + + /** MigrationJob endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** MigrationJob conversionWorkspace */ + conversionWorkspace?: (google.cloud.clouddms.v1.IConversionWorkspaceInfo|null); + + /** MigrationJob filter */ + filter?: (string|null); + + /** MigrationJob cmekKeyName */ + cmekKeyName?: (string|null); + } + + /** Represents a MigrationJob. */ + class MigrationJob implements IMigrationJob { + + /** + * Constructs a new MigrationJob. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IMigrationJob); + + /** MigrationJob name. */ + public name: string; + + /** MigrationJob createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** MigrationJob updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** MigrationJob labels. */ + public labels: { [k: string]: string }; + + /** MigrationJob displayName. */ + public displayName: string; + + /** MigrationJob state. */ + public state: (google.cloud.clouddms.v1.MigrationJob.State|keyof typeof google.cloud.clouddms.v1.MigrationJob.State); + + /** MigrationJob phase. */ + public phase: (google.cloud.clouddms.v1.MigrationJob.Phase|keyof typeof google.cloud.clouddms.v1.MigrationJob.Phase); + + /** MigrationJob type. */ + public type: (google.cloud.clouddms.v1.MigrationJob.Type|keyof typeof google.cloud.clouddms.v1.MigrationJob.Type); + + /** MigrationJob dumpPath. */ + public dumpPath: string; + + /** MigrationJob dumpFlags. */ + public dumpFlags?: (google.cloud.clouddms.v1.MigrationJob.IDumpFlags|null); + + /** MigrationJob source. */ + public source: string; + + /** MigrationJob destination. */ + public destination: string; + + /** MigrationJob reverseSshConnectivity. */ + public reverseSshConnectivity?: (google.cloud.clouddms.v1.IReverseSshConnectivity|null); + + /** MigrationJob vpcPeeringConnectivity. */ + public vpcPeeringConnectivity?: (google.cloud.clouddms.v1.IVpcPeeringConnectivity|null); + + /** MigrationJob staticIpConnectivity. */ + public staticIpConnectivity?: (google.cloud.clouddms.v1.IStaticIpConnectivity|null); + + /** MigrationJob duration. */ + public duration?: (google.protobuf.IDuration|null); + + /** MigrationJob error. */ + public error?: (google.rpc.IStatus|null); + + /** MigrationJob sourceDatabase. */ + public sourceDatabase?: (google.cloud.clouddms.v1.IDatabaseType|null); + + /** MigrationJob destinationDatabase. */ + public destinationDatabase?: (google.cloud.clouddms.v1.IDatabaseType|null); + + /** MigrationJob endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** MigrationJob conversionWorkspace. */ + public conversionWorkspace?: (google.cloud.clouddms.v1.IConversionWorkspaceInfo|null); + + /** MigrationJob filter. */ + public filter: string; + + /** MigrationJob cmekKeyName. */ + public cmekKeyName: string; + + /** MigrationJob connectivity. */ + public connectivity?: ("reverseSshConnectivity"|"vpcPeeringConnectivity"|"staticIpConnectivity"); + + /** + * Creates a new MigrationJob instance using the specified properties. + * @param [properties] Properties to set + * @returns MigrationJob instance + */ + public static create(properties?: google.cloud.clouddms.v1.IMigrationJob): google.cloud.clouddms.v1.MigrationJob; + + /** + * Encodes the specified MigrationJob message. Does not implicitly {@link google.cloud.clouddms.v1.MigrationJob.verify|verify} messages. + * @param message MigrationJob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IMigrationJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MigrationJob message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.MigrationJob.verify|verify} messages. + * @param message MigrationJob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IMigrationJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MigrationJob message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MigrationJob + * @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.clouddms.v1.MigrationJob; + + /** + * Decodes a MigrationJob message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MigrationJob + * @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.clouddms.v1.MigrationJob; + + /** + * Verifies a MigrationJob 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 MigrationJob message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MigrationJob + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.MigrationJob; + + /** + * Creates a plain object from a MigrationJob message. Also converts values to other types if specified. + * @param message MigrationJob + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.MigrationJob, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MigrationJob to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MigrationJob + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MigrationJob { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + MAINTENANCE = 1, + DRAFT = 2, + CREATING = 3, + NOT_STARTED = 4, + RUNNING = 5, + FAILED = 6, + COMPLETED = 7, + DELETING = 8, + STOPPING = 9, + STOPPED = 10, + DELETED = 11, + UPDATING = 12, + STARTING = 13, + RESTARTING = 14, + RESUMING = 15 + } + + /** Phase enum. */ + enum Phase { + PHASE_UNSPECIFIED = 0, + FULL_DUMP = 1, + CDC = 2, + PROMOTE_IN_PROGRESS = 3, + WAITING_FOR_SOURCE_WRITES_TO_STOP = 4, + PREPARING_THE_DUMP = 5 + } + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + ONE_TIME = 1, + CONTINUOUS = 2 + } + + /** Properties of a DumpFlag. */ + interface IDumpFlag { + + /** DumpFlag name */ + name?: (string|null); + + /** DumpFlag value */ + value?: (string|null); + } + + /** Represents a DumpFlag. */ + class DumpFlag implements IDumpFlag { + + /** + * Constructs a new DumpFlag. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.MigrationJob.IDumpFlag); + + /** DumpFlag name. */ + public name: string; + + /** DumpFlag value. */ + public value: string; + + /** + * Creates a new DumpFlag instance using the specified properties. + * @param [properties] Properties to set + * @returns DumpFlag instance + */ + public static create(properties?: google.cloud.clouddms.v1.MigrationJob.IDumpFlag): google.cloud.clouddms.v1.MigrationJob.DumpFlag; + + /** + * Encodes the specified DumpFlag message. Does not implicitly {@link google.cloud.clouddms.v1.MigrationJob.DumpFlag.verify|verify} messages. + * @param message DumpFlag message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.MigrationJob.IDumpFlag, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DumpFlag message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.MigrationJob.DumpFlag.verify|verify} messages. + * @param message DumpFlag message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.MigrationJob.IDumpFlag, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DumpFlag message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DumpFlag + * @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.clouddms.v1.MigrationJob.DumpFlag; + + /** + * Decodes a DumpFlag message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DumpFlag + * @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.clouddms.v1.MigrationJob.DumpFlag; + + /** + * Verifies a DumpFlag 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 DumpFlag message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DumpFlag + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.MigrationJob.DumpFlag; + + /** + * Creates a plain object from a DumpFlag message. Also converts values to other types if specified. + * @param message DumpFlag + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.MigrationJob.DumpFlag, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DumpFlag to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DumpFlag + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DumpFlags. */ + interface IDumpFlags { + + /** DumpFlags dumpFlags */ + dumpFlags?: (google.cloud.clouddms.v1.MigrationJob.IDumpFlag[]|null); + } + + /** Represents a DumpFlags. */ + class DumpFlags implements IDumpFlags { + + /** + * Constructs a new DumpFlags. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.MigrationJob.IDumpFlags); + + /** DumpFlags dumpFlags. */ + public dumpFlags: google.cloud.clouddms.v1.MigrationJob.IDumpFlag[]; + + /** + * Creates a new DumpFlags instance using the specified properties. + * @param [properties] Properties to set + * @returns DumpFlags instance + */ + public static create(properties?: google.cloud.clouddms.v1.MigrationJob.IDumpFlags): google.cloud.clouddms.v1.MigrationJob.DumpFlags; + + /** + * Encodes the specified DumpFlags message. Does not implicitly {@link google.cloud.clouddms.v1.MigrationJob.DumpFlags.verify|verify} messages. + * @param message DumpFlags message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.MigrationJob.IDumpFlags, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DumpFlags message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.MigrationJob.DumpFlags.verify|verify} messages. + * @param message DumpFlags message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.MigrationJob.IDumpFlags, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DumpFlags message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DumpFlags + * @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.clouddms.v1.MigrationJob.DumpFlags; + + /** + * Decodes a DumpFlags message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DumpFlags + * @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.clouddms.v1.MigrationJob.DumpFlags; + + /** + * Verifies a DumpFlags 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 DumpFlags message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DumpFlags + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.MigrationJob.DumpFlags; + + /** + * Creates a plain object from a DumpFlags message. Also converts values to other types if specified. + * @param message DumpFlags + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.MigrationJob.DumpFlags, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DumpFlags to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DumpFlags + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a ConversionWorkspaceInfo. */ + interface IConversionWorkspaceInfo { + + /** ConversionWorkspaceInfo name */ + name?: (string|null); + + /** ConversionWorkspaceInfo commitId */ + commitId?: (string|null); + } + + /** Represents a ConversionWorkspaceInfo. */ + class ConversionWorkspaceInfo implements IConversionWorkspaceInfo { + + /** + * Constructs a new ConversionWorkspaceInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IConversionWorkspaceInfo); + + /** ConversionWorkspaceInfo name. */ + public name: string; + + /** ConversionWorkspaceInfo commitId. */ + public commitId: string; + + /** + * Creates a new ConversionWorkspaceInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ConversionWorkspaceInfo instance + */ + public static create(properties?: google.cloud.clouddms.v1.IConversionWorkspaceInfo): google.cloud.clouddms.v1.ConversionWorkspaceInfo; + + /** + * Encodes the specified ConversionWorkspaceInfo message. Does not implicitly {@link google.cloud.clouddms.v1.ConversionWorkspaceInfo.verify|verify} messages. + * @param message ConversionWorkspaceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IConversionWorkspaceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConversionWorkspaceInfo message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ConversionWorkspaceInfo.verify|verify} messages. + * @param message ConversionWorkspaceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IConversionWorkspaceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConversionWorkspaceInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConversionWorkspaceInfo + * @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.clouddms.v1.ConversionWorkspaceInfo; + + /** + * Decodes a ConversionWorkspaceInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConversionWorkspaceInfo + * @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.clouddms.v1.ConversionWorkspaceInfo; + + /** + * Verifies a ConversionWorkspaceInfo 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 ConversionWorkspaceInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConversionWorkspaceInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.ConversionWorkspaceInfo; + + /** + * Creates a plain object from a ConversionWorkspaceInfo message. Also converts values to other types if specified. + * @param message ConversionWorkspaceInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.ConversionWorkspaceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConversionWorkspaceInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConversionWorkspaceInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConnectionProfile. */ + interface IConnectionProfile { + + /** ConnectionProfile name */ + name?: (string|null); + + /** ConnectionProfile createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** ConnectionProfile updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** ConnectionProfile labels */ + labels?: ({ [k: string]: string }|null); + + /** ConnectionProfile state */ + state?: (google.cloud.clouddms.v1.ConnectionProfile.State|keyof typeof google.cloud.clouddms.v1.ConnectionProfile.State|null); + + /** ConnectionProfile displayName */ + displayName?: (string|null); + + /** ConnectionProfile mysql */ + mysql?: (google.cloud.clouddms.v1.IMySqlConnectionProfile|null); + + /** ConnectionProfile postgresql */ + postgresql?: (google.cloud.clouddms.v1.IPostgreSqlConnectionProfile|null); + + /** ConnectionProfile oracle */ + oracle?: (google.cloud.clouddms.v1.IOracleConnectionProfile|null); + + /** ConnectionProfile cloudsql */ + cloudsql?: (google.cloud.clouddms.v1.ICloudSqlConnectionProfile|null); + + /** ConnectionProfile alloydb */ + alloydb?: (google.cloud.clouddms.v1.IAlloyDbConnectionProfile|null); + + /** ConnectionProfile error */ + error?: (google.rpc.IStatus|null); + + /** ConnectionProfile provider */ + provider?: (google.cloud.clouddms.v1.DatabaseProvider|keyof typeof google.cloud.clouddms.v1.DatabaseProvider|null); + } + + /** Represents a ConnectionProfile. */ + class ConnectionProfile implements IConnectionProfile { + + /** + * Constructs a new ConnectionProfile. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IConnectionProfile); + + /** ConnectionProfile name. */ + public name: string; + + /** ConnectionProfile createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** ConnectionProfile updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** ConnectionProfile labels. */ + public labels: { [k: string]: string }; + + /** ConnectionProfile state. */ + public state: (google.cloud.clouddms.v1.ConnectionProfile.State|keyof typeof google.cloud.clouddms.v1.ConnectionProfile.State); + + /** ConnectionProfile displayName. */ + public displayName: string; + + /** ConnectionProfile mysql. */ + public mysql?: (google.cloud.clouddms.v1.IMySqlConnectionProfile|null); + + /** ConnectionProfile postgresql. */ + public postgresql?: (google.cloud.clouddms.v1.IPostgreSqlConnectionProfile|null); + + /** ConnectionProfile oracle. */ + public oracle?: (google.cloud.clouddms.v1.IOracleConnectionProfile|null); + + /** ConnectionProfile cloudsql. */ + public cloudsql?: (google.cloud.clouddms.v1.ICloudSqlConnectionProfile|null); + + /** ConnectionProfile alloydb. */ + public alloydb?: (google.cloud.clouddms.v1.IAlloyDbConnectionProfile|null); + + /** ConnectionProfile error. */ + public error?: (google.rpc.IStatus|null); + + /** ConnectionProfile provider. */ + public provider: (google.cloud.clouddms.v1.DatabaseProvider|keyof typeof google.cloud.clouddms.v1.DatabaseProvider); + + /** ConnectionProfile connectionProfile. */ + public connectionProfile?: ("mysql"|"postgresql"|"oracle"|"cloudsql"|"alloydb"); + + /** + * Creates a new ConnectionProfile instance using the specified properties. + * @param [properties] Properties to set + * @returns ConnectionProfile instance + */ + public static create(properties?: google.cloud.clouddms.v1.IConnectionProfile): google.cloud.clouddms.v1.ConnectionProfile; + + /** + * Encodes the specified ConnectionProfile message. Does not implicitly {@link google.cloud.clouddms.v1.ConnectionProfile.verify|verify} messages. + * @param message ConnectionProfile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IConnectionProfile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConnectionProfile message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ConnectionProfile.verify|verify} messages. + * @param message ConnectionProfile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IConnectionProfile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConnectionProfile message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConnectionProfile + * @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.clouddms.v1.ConnectionProfile; + + /** + * Decodes a ConnectionProfile message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConnectionProfile + * @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.clouddms.v1.ConnectionProfile; + + /** + * Verifies a ConnectionProfile 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 ConnectionProfile message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConnectionProfile + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.ConnectionProfile; + + /** + * Creates a plain object from a ConnectionProfile message. Also converts values to other types if specified. + * @param message ConnectionProfile + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.ConnectionProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConnectionProfile to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConnectionProfile + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ConnectionProfile { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + DRAFT = 1, + CREATING = 2, + READY = 3, + UPDATING = 4, + DELETING = 5, + DELETED = 6, + FAILED = 7 + } + } + + /** Properties of a MigrationJobVerificationError. */ + interface IMigrationJobVerificationError { + + /** MigrationJobVerificationError errorCode */ + errorCode?: (google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode|keyof typeof google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode|null); + + /** MigrationJobVerificationError errorMessage */ + errorMessage?: (string|null); + + /** MigrationJobVerificationError errorDetailMessage */ + errorDetailMessage?: (string|null); + } + + /** Represents a MigrationJobVerificationError. */ + class MigrationJobVerificationError implements IMigrationJobVerificationError { + + /** + * Constructs a new MigrationJobVerificationError. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IMigrationJobVerificationError); + + /** MigrationJobVerificationError errorCode. */ + public errorCode: (google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode|keyof typeof google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode); + + /** MigrationJobVerificationError errorMessage. */ + public errorMessage: string; + + /** MigrationJobVerificationError errorDetailMessage. */ + public errorDetailMessage: string; + + /** + * Creates a new MigrationJobVerificationError instance using the specified properties. + * @param [properties] Properties to set + * @returns MigrationJobVerificationError instance + */ + public static create(properties?: google.cloud.clouddms.v1.IMigrationJobVerificationError): google.cloud.clouddms.v1.MigrationJobVerificationError; + + /** + * Encodes the specified MigrationJobVerificationError message. Does not implicitly {@link google.cloud.clouddms.v1.MigrationJobVerificationError.verify|verify} messages. + * @param message MigrationJobVerificationError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IMigrationJobVerificationError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MigrationJobVerificationError message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.MigrationJobVerificationError.verify|verify} messages. + * @param message MigrationJobVerificationError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IMigrationJobVerificationError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MigrationJobVerificationError message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MigrationJobVerificationError + * @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.clouddms.v1.MigrationJobVerificationError; + + /** + * Decodes a MigrationJobVerificationError message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MigrationJobVerificationError + * @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.clouddms.v1.MigrationJobVerificationError; + + /** + * Verifies a MigrationJobVerificationError 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 MigrationJobVerificationError message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MigrationJobVerificationError + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.MigrationJobVerificationError; + + /** + * Creates a plain object from a MigrationJobVerificationError message. Also converts values to other types if specified. + * @param message MigrationJobVerificationError + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.MigrationJobVerificationError, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MigrationJobVerificationError to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MigrationJobVerificationError + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MigrationJobVerificationError { + + /** ErrorCode enum. */ + enum ErrorCode { + ERROR_CODE_UNSPECIFIED = 0, + CONNECTION_FAILURE = 1, + AUTHENTICATION_FAILURE = 2, + INVALID_CONNECTION_PROFILE_CONFIG = 3, + VERSION_INCOMPATIBILITY = 4, + CONNECTION_PROFILE_TYPES_INCOMPATIBILITY = 5, + NO_PGLOGICAL_INSTALLED = 7, + PGLOGICAL_NODE_ALREADY_EXISTS = 8, + INVALID_WAL_LEVEL = 9, + INVALID_SHARED_PRELOAD_LIBRARY = 10, + INSUFFICIENT_MAX_REPLICATION_SLOTS = 11, + INSUFFICIENT_MAX_WAL_SENDERS = 12, + INSUFFICIENT_MAX_WORKER_PROCESSES = 13, + UNSUPPORTED_EXTENSIONS = 14, + UNSUPPORTED_MIGRATION_TYPE = 15, + INVALID_RDS_LOGICAL_REPLICATION = 16, + UNSUPPORTED_GTID_MODE = 17, + UNSUPPORTED_TABLE_DEFINITION = 18, + UNSUPPORTED_DEFINER = 19, + CANT_RESTART_RUNNING_MIGRATION = 21, + TABLES_WITH_LIMITED_SUPPORT = 24, + UNSUPPORTED_DATABASE_LOCALE = 25, + UNSUPPORTED_DATABASE_FDW_CONFIG = 26, + ERROR_RDBMS = 27, + SOURCE_SIZE_EXCEEDS_THRESHOLD = 28 + } + } + + /** DatabaseEngine enum. */ + enum DatabaseEngine { + DATABASE_ENGINE_UNSPECIFIED = 0, + MYSQL = 1, + POSTGRESQL = 2, + ORACLE = 4 + } + + /** DatabaseProvider enum. */ + enum DatabaseProvider { + DATABASE_PROVIDER_UNSPECIFIED = 0, + CLOUDSQL = 1, + RDS = 2, + AURORA = 3, + ALLOYDB = 4 + } + + /** Properties of a PrivateConnection. */ + interface IPrivateConnection { + + /** PrivateConnection name */ + name?: (string|null); + + /** PrivateConnection createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** PrivateConnection updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** PrivateConnection labels */ + labels?: ({ [k: string]: string }|null); + + /** PrivateConnection displayName */ + displayName?: (string|null); + + /** PrivateConnection state */ + state?: (google.cloud.clouddms.v1.PrivateConnection.State|keyof typeof google.cloud.clouddms.v1.PrivateConnection.State|null); + + /** PrivateConnection error */ + error?: (google.rpc.IStatus|null); + + /** PrivateConnection vpcPeeringConfig */ + vpcPeeringConfig?: (google.cloud.clouddms.v1.IVpcPeeringConfig|null); + } + + /** Represents a PrivateConnection. */ + class PrivateConnection implements IPrivateConnection { + + /** + * Constructs a new PrivateConnection. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IPrivateConnection); + + /** PrivateConnection name. */ + public name: string; + + /** PrivateConnection createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** PrivateConnection updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** PrivateConnection labels. */ + public labels: { [k: string]: string }; + + /** PrivateConnection displayName. */ + public displayName: string; + + /** PrivateConnection state. */ + public state: (google.cloud.clouddms.v1.PrivateConnection.State|keyof typeof google.cloud.clouddms.v1.PrivateConnection.State); + + /** PrivateConnection error. */ + public error?: (google.rpc.IStatus|null); + + /** PrivateConnection vpcPeeringConfig. */ + public vpcPeeringConfig?: (google.cloud.clouddms.v1.IVpcPeeringConfig|null); + + /** PrivateConnection connectivity. */ + public connectivity?: "vpcPeeringConfig"; + + /** + * Creates a new PrivateConnection instance using the specified properties. + * @param [properties] Properties to set + * @returns PrivateConnection instance + */ + public static create(properties?: google.cloud.clouddms.v1.IPrivateConnection): google.cloud.clouddms.v1.PrivateConnection; + + /** + * Encodes the specified PrivateConnection message. Does not implicitly {@link google.cloud.clouddms.v1.PrivateConnection.verify|verify} messages. + * @param message PrivateConnection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IPrivateConnection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrivateConnection message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.PrivateConnection.verify|verify} messages. + * @param message PrivateConnection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IPrivateConnection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrivateConnection message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrivateConnection + * @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.clouddms.v1.PrivateConnection; + + /** + * Decodes a PrivateConnection message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrivateConnection + * @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.clouddms.v1.PrivateConnection; + + /** + * Verifies a PrivateConnection 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 PrivateConnection message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrivateConnection + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.PrivateConnection; + + /** + * Creates a plain object from a PrivateConnection message. Also converts values to other types if specified. + * @param message PrivateConnection + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.PrivateConnection, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrivateConnection to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrivateConnection + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PrivateConnection { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + CREATED = 2, + FAILED = 3, + DELETING = 4, + FAILED_TO_DELETE = 5, + DELETED = 6 + } + } + + /** Properties of a VpcPeeringConfig. */ + interface IVpcPeeringConfig { + + /** VpcPeeringConfig vpcName */ + vpcName?: (string|null); + + /** VpcPeeringConfig subnet */ + subnet?: (string|null); + } + + /** Represents a VpcPeeringConfig. */ + class VpcPeeringConfig implements IVpcPeeringConfig { + + /** + * Constructs a new VpcPeeringConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IVpcPeeringConfig); + + /** VpcPeeringConfig vpcName. */ + public vpcName: string; + + /** VpcPeeringConfig subnet. */ + public subnet: string; + + /** + * Creates a new VpcPeeringConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns VpcPeeringConfig instance + */ + public static create(properties?: google.cloud.clouddms.v1.IVpcPeeringConfig): google.cloud.clouddms.v1.VpcPeeringConfig; + + /** + * Encodes the specified VpcPeeringConfig message. Does not implicitly {@link google.cloud.clouddms.v1.VpcPeeringConfig.verify|verify} messages. + * @param message VpcPeeringConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IVpcPeeringConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VpcPeeringConfig message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.VpcPeeringConfig.verify|verify} messages. + * @param message VpcPeeringConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IVpcPeeringConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VpcPeeringConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VpcPeeringConfig + * @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.clouddms.v1.VpcPeeringConfig; + + /** + * Decodes a VpcPeeringConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VpcPeeringConfig + * @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.clouddms.v1.VpcPeeringConfig; + + /** + * Verifies a VpcPeeringConfig 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 VpcPeeringConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VpcPeeringConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.VpcPeeringConfig; + + /** + * Creates a plain object from a VpcPeeringConfig message. Also converts values to other types if specified. + * @param message VpcPeeringConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.VpcPeeringConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VpcPeeringConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VpcPeeringConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DatabaseEngineInfo. */ + interface IDatabaseEngineInfo { + + /** DatabaseEngineInfo engine */ + engine?: (google.cloud.clouddms.v1.DatabaseEngine|keyof typeof google.cloud.clouddms.v1.DatabaseEngine|null); + + /** DatabaseEngineInfo version */ + version?: (string|null); + } + + /** Represents a DatabaseEngineInfo. */ + class DatabaseEngineInfo implements IDatabaseEngineInfo { + + /** + * Constructs a new DatabaseEngineInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IDatabaseEngineInfo); + + /** DatabaseEngineInfo engine. */ + public engine: (google.cloud.clouddms.v1.DatabaseEngine|keyof typeof google.cloud.clouddms.v1.DatabaseEngine); + + /** DatabaseEngineInfo version. */ + public version: string; + + /** + * Creates a new DatabaseEngineInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns DatabaseEngineInfo instance + */ + public static create(properties?: google.cloud.clouddms.v1.IDatabaseEngineInfo): google.cloud.clouddms.v1.DatabaseEngineInfo; + + /** + * Encodes the specified DatabaseEngineInfo message. Does not implicitly {@link google.cloud.clouddms.v1.DatabaseEngineInfo.verify|verify} messages. + * @param message DatabaseEngineInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IDatabaseEngineInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DatabaseEngineInfo message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.DatabaseEngineInfo.verify|verify} messages. + * @param message DatabaseEngineInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IDatabaseEngineInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DatabaseEngineInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DatabaseEngineInfo + * @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.clouddms.v1.DatabaseEngineInfo; + + /** + * Decodes a DatabaseEngineInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DatabaseEngineInfo + * @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.clouddms.v1.DatabaseEngineInfo; + + /** + * Verifies a DatabaseEngineInfo 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 DatabaseEngineInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DatabaseEngineInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.DatabaseEngineInfo; + + /** + * Creates a plain object from a DatabaseEngineInfo message. Also converts values to other types if specified. + * @param message DatabaseEngineInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.DatabaseEngineInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DatabaseEngineInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DatabaseEngineInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConversionWorkspace. */ + interface IConversionWorkspace { + + /** ConversionWorkspace name */ + name?: (string|null); + + /** ConversionWorkspace source */ + source?: (google.cloud.clouddms.v1.IDatabaseEngineInfo|null); + + /** ConversionWorkspace destination */ + destination?: (google.cloud.clouddms.v1.IDatabaseEngineInfo|null); + + /** ConversionWorkspace globalSettings */ + globalSettings?: ({ [k: string]: string }|null); + + /** ConversionWorkspace hasUncommittedChanges */ + hasUncommittedChanges?: (boolean|null); + + /** ConversionWorkspace latestCommitId */ + latestCommitId?: (string|null); + + /** ConversionWorkspace latestCommitTime */ + latestCommitTime?: (google.protobuf.ITimestamp|null); + + /** ConversionWorkspace createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** ConversionWorkspace updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** ConversionWorkspace displayName */ + displayName?: (string|null); + } + + /** Represents a ConversionWorkspace. */ + class ConversionWorkspace implements IConversionWorkspace { + + /** + * Constructs a new ConversionWorkspace. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IConversionWorkspace); + + /** ConversionWorkspace name. */ + public name: string; + + /** ConversionWorkspace source. */ + public source?: (google.cloud.clouddms.v1.IDatabaseEngineInfo|null); + + /** ConversionWorkspace destination. */ + public destination?: (google.cloud.clouddms.v1.IDatabaseEngineInfo|null); + + /** ConversionWorkspace globalSettings. */ + public globalSettings: { [k: string]: string }; + + /** ConversionWorkspace hasUncommittedChanges. */ + public hasUncommittedChanges: boolean; + + /** ConversionWorkspace latestCommitId. */ + public latestCommitId: string; + + /** ConversionWorkspace latestCommitTime. */ + public latestCommitTime?: (google.protobuf.ITimestamp|null); + + /** ConversionWorkspace createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** ConversionWorkspace updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** ConversionWorkspace displayName. */ + public displayName: string; + + /** + * Creates a new ConversionWorkspace instance using the specified properties. + * @param [properties] Properties to set + * @returns ConversionWorkspace instance + */ + public static create(properties?: google.cloud.clouddms.v1.IConversionWorkspace): google.cloud.clouddms.v1.ConversionWorkspace; + + /** + * Encodes the specified ConversionWorkspace message. Does not implicitly {@link google.cloud.clouddms.v1.ConversionWorkspace.verify|verify} messages. + * @param message ConversionWorkspace message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IConversionWorkspace, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConversionWorkspace message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ConversionWorkspace.verify|verify} messages. + * @param message ConversionWorkspace message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IConversionWorkspace, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConversionWorkspace message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConversionWorkspace + * @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.clouddms.v1.ConversionWorkspace; + + /** + * Decodes a ConversionWorkspace message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConversionWorkspace + * @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.clouddms.v1.ConversionWorkspace; + + /** + * Verifies a ConversionWorkspace 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 ConversionWorkspace message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConversionWorkspace + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.ConversionWorkspace; + + /** + * Creates a plain object from a ConversionWorkspace message. Also converts values to other types if specified. + * @param message ConversionWorkspace + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.ConversionWorkspace, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConversionWorkspace to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConversionWorkspace + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackgroundJobLogEntry. */ + interface IBackgroundJobLogEntry { + + /** BackgroundJobLogEntry id */ + id?: (string|null); + + /** BackgroundJobLogEntry jobType */ + jobType?: (google.cloud.clouddms.v1.BackgroundJobType|keyof typeof google.cloud.clouddms.v1.BackgroundJobType|null); + + /** BackgroundJobLogEntry startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** BackgroundJobLogEntry finishTime */ + finishTime?: (google.protobuf.ITimestamp|null); + + /** BackgroundJobLogEntry completionState */ + completionState?: (google.cloud.clouddms.v1.BackgroundJobLogEntry.JobCompletionState|keyof typeof google.cloud.clouddms.v1.BackgroundJobLogEntry.JobCompletionState|null); + + /** BackgroundJobLogEntry completionComment */ + completionComment?: (string|null); + + /** BackgroundJobLogEntry requestAutocommit */ + requestAutocommit?: (boolean|null); + + /** BackgroundJobLogEntry seedJobDetails */ + seedJobDetails?: (google.cloud.clouddms.v1.BackgroundJobLogEntry.ISeedJobDetails|null); + + /** BackgroundJobLogEntry importRulesJobDetails */ + importRulesJobDetails?: (google.cloud.clouddms.v1.BackgroundJobLogEntry.IImportRulesJobDetails|null); + + /** BackgroundJobLogEntry convertJobDetails */ + convertJobDetails?: (google.cloud.clouddms.v1.BackgroundJobLogEntry.IConvertJobDetails|null); + + /** BackgroundJobLogEntry applyJobDetails */ + applyJobDetails?: (google.cloud.clouddms.v1.BackgroundJobLogEntry.IApplyJobDetails|null); + } + + /** Represents a BackgroundJobLogEntry. */ + class BackgroundJobLogEntry implements IBackgroundJobLogEntry { + + /** + * Constructs a new BackgroundJobLogEntry. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IBackgroundJobLogEntry); + + /** BackgroundJobLogEntry id. */ + public id: string; + + /** BackgroundJobLogEntry jobType. */ + public jobType: (google.cloud.clouddms.v1.BackgroundJobType|keyof typeof google.cloud.clouddms.v1.BackgroundJobType); + + /** BackgroundJobLogEntry startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** BackgroundJobLogEntry finishTime. */ + public finishTime?: (google.protobuf.ITimestamp|null); + + /** BackgroundJobLogEntry completionState. */ + public completionState: (google.cloud.clouddms.v1.BackgroundJobLogEntry.JobCompletionState|keyof typeof google.cloud.clouddms.v1.BackgroundJobLogEntry.JobCompletionState); + + /** BackgroundJobLogEntry completionComment. */ + public completionComment: string; + + /** BackgroundJobLogEntry requestAutocommit. */ + public requestAutocommit: boolean; + + /** BackgroundJobLogEntry seedJobDetails. */ + public seedJobDetails?: (google.cloud.clouddms.v1.BackgroundJobLogEntry.ISeedJobDetails|null); + + /** BackgroundJobLogEntry importRulesJobDetails. */ + public importRulesJobDetails?: (google.cloud.clouddms.v1.BackgroundJobLogEntry.IImportRulesJobDetails|null); + + /** BackgroundJobLogEntry convertJobDetails. */ + public convertJobDetails?: (google.cloud.clouddms.v1.BackgroundJobLogEntry.IConvertJobDetails|null); + + /** BackgroundJobLogEntry applyJobDetails. */ + public applyJobDetails?: (google.cloud.clouddms.v1.BackgroundJobLogEntry.IApplyJobDetails|null); + + /** BackgroundJobLogEntry jobDetails. */ + public jobDetails?: ("seedJobDetails"|"importRulesJobDetails"|"convertJobDetails"|"applyJobDetails"); + + /** + * Creates a new BackgroundJobLogEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns BackgroundJobLogEntry instance + */ + public static create(properties?: google.cloud.clouddms.v1.IBackgroundJobLogEntry): google.cloud.clouddms.v1.BackgroundJobLogEntry; + + /** + * Encodes the specified BackgroundJobLogEntry message. Does not implicitly {@link google.cloud.clouddms.v1.BackgroundJobLogEntry.verify|verify} messages. + * @param message BackgroundJobLogEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IBackgroundJobLogEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackgroundJobLogEntry message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.BackgroundJobLogEntry.verify|verify} messages. + * @param message BackgroundJobLogEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IBackgroundJobLogEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackgroundJobLogEntry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackgroundJobLogEntry + * @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.clouddms.v1.BackgroundJobLogEntry; + + /** + * Decodes a BackgroundJobLogEntry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackgroundJobLogEntry + * @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.clouddms.v1.BackgroundJobLogEntry; + + /** + * Verifies a BackgroundJobLogEntry 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 BackgroundJobLogEntry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackgroundJobLogEntry + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.BackgroundJobLogEntry; + + /** + * Creates a plain object from a BackgroundJobLogEntry message. Also converts values to other types if specified. + * @param message BackgroundJobLogEntry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.BackgroundJobLogEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackgroundJobLogEntry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackgroundJobLogEntry + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BackgroundJobLogEntry { + + /** JobCompletionState enum. */ + enum JobCompletionState { + JOB_COMPLETION_STATE_UNSPECIFIED = 0, + SUCCEEDED = 1, + FAILED = 2 + } + + /** Properties of a SeedJobDetails. */ + interface ISeedJobDetails { + + /** SeedJobDetails connectionProfile */ + connectionProfile?: (string|null); + } + + /** Represents a SeedJobDetails. */ + class SeedJobDetails implements ISeedJobDetails { + + /** + * Constructs a new SeedJobDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.BackgroundJobLogEntry.ISeedJobDetails); + + /** SeedJobDetails connectionProfile. */ + public connectionProfile: string; + + /** + * Creates a new SeedJobDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns SeedJobDetails instance + */ + public static create(properties?: google.cloud.clouddms.v1.BackgroundJobLogEntry.ISeedJobDetails): google.cloud.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails; + + /** + * Encodes the specified SeedJobDetails message. Does not implicitly {@link google.cloud.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails.verify|verify} messages. + * @param message SeedJobDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.BackgroundJobLogEntry.ISeedJobDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SeedJobDetails message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails.verify|verify} messages. + * @param message SeedJobDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.BackgroundJobLogEntry.ISeedJobDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SeedJobDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SeedJobDetails + * @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.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails; + + /** + * Decodes a SeedJobDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SeedJobDetails + * @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.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails; + + /** + * Verifies a SeedJobDetails 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 SeedJobDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SeedJobDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails; + + /** + * Creates a plain object from a SeedJobDetails message. Also converts values to other types if specified. + * @param message SeedJobDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SeedJobDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SeedJobDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImportRulesJobDetails. */ + interface IImportRulesJobDetails { + + /** ImportRulesJobDetails files */ + files?: (string[]|null); + + /** ImportRulesJobDetails fileFormat */ + fileFormat?: (google.cloud.clouddms.v1.ImportRulesFileFormat|keyof typeof google.cloud.clouddms.v1.ImportRulesFileFormat|null); + } + + /** Represents an ImportRulesJobDetails. */ + class ImportRulesJobDetails implements IImportRulesJobDetails { + + /** + * Constructs a new ImportRulesJobDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.BackgroundJobLogEntry.IImportRulesJobDetails); + + /** ImportRulesJobDetails files. */ + public files: string[]; + + /** ImportRulesJobDetails fileFormat. */ + public fileFormat: (google.cloud.clouddms.v1.ImportRulesFileFormat|keyof typeof google.cloud.clouddms.v1.ImportRulesFileFormat); + + /** + * Creates a new ImportRulesJobDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportRulesJobDetails instance + */ + public static create(properties?: google.cloud.clouddms.v1.BackgroundJobLogEntry.IImportRulesJobDetails): google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails; + + /** + * Encodes the specified ImportRulesJobDetails message. Does not implicitly {@link google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails.verify|verify} messages. + * @param message ImportRulesJobDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.BackgroundJobLogEntry.IImportRulesJobDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImportRulesJobDetails message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails.verify|verify} messages. + * @param message ImportRulesJobDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.BackgroundJobLogEntry.IImportRulesJobDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImportRulesJobDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportRulesJobDetails + * @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.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails; + + /** + * Decodes an ImportRulesJobDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportRulesJobDetails + * @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.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails; + + /** + * Verifies an ImportRulesJobDetails 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 ImportRulesJobDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportRulesJobDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails; + + /** + * Creates a plain object from an ImportRulesJobDetails message. Also converts values to other types if specified. + * @param message ImportRulesJobDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImportRulesJobDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImportRulesJobDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConvertJobDetails. */ + interface IConvertJobDetails { + + /** ConvertJobDetails filter */ + filter?: (string|null); + } + + /** Represents a ConvertJobDetails. */ + class ConvertJobDetails implements IConvertJobDetails { + + /** + * Constructs a new ConvertJobDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.BackgroundJobLogEntry.IConvertJobDetails); + + /** ConvertJobDetails filter. */ + public filter: string; + + /** + * Creates a new ConvertJobDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns ConvertJobDetails instance + */ + public static create(properties?: google.cloud.clouddms.v1.BackgroundJobLogEntry.IConvertJobDetails): google.cloud.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails; + + /** + * Encodes the specified ConvertJobDetails message. Does not implicitly {@link google.cloud.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails.verify|verify} messages. + * @param message ConvertJobDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.BackgroundJobLogEntry.IConvertJobDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConvertJobDetails message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails.verify|verify} messages. + * @param message ConvertJobDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.BackgroundJobLogEntry.IConvertJobDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConvertJobDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConvertJobDetails + * @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.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails; + + /** + * Decodes a ConvertJobDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConvertJobDetails + * @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.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails; + + /** + * Verifies a ConvertJobDetails 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 ConvertJobDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConvertJobDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails; + + /** + * Creates a plain object from a ConvertJobDetails message. Also converts values to other types if specified. + * @param message ConvertJobDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConvertJobDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConvertJobDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ApplyJobDetails. */ + interface IApplyJobDetails { + + /** ApplyJobDetails connectionProfile */ + connectionProfile?: (string|null); + + /** ApplyJobDetails filter */ + filter?: (string|null); + } + + /** Represents an ApplyJobDetails. */ + class ApplyJobDetails implements IApplyJobDetails { + + /** + * Constructs a new ApplyJobDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.BackgroundJobLogEntry.IApplyJobDetails); + + /** ApplyJobDetails connectionProfile. */ + public connectionProfile: string; + + /** ApplyJobDetails filter. */ + public filter: string; + + /** + * Creates a new ApplyJobDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns ApplyJobDetails instance + */ + public static create(properties?: google.cloud.clouddms.v1.BackgroundJobLogEntry.IApplyJobDetails): google.cloud.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails; + + /** + * Encodes the specified ApplyJobDetails message. Does not implicitly {@link google.cloud.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails.verify|verify} messages. + * @param message ApplyJobDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.BackgroundJobLogEntry.IApplyJobDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ApplyJobDetails message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails.verify|verify} messages. + * @param message ApplyJobDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.BackgroundJobLogEntry.IApplyJobDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ApplyJobDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ApplyJobDetails + * @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.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails; + + /** + * Decodes an ApplyJobDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ApplyJobDetails + * @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.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails; + + /** + * Verifies an ApplyJobDetails 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 ApplyJobDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ApplyJobDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails; + + /** + * Creates a plain object from an ApplyJobDetails message. Also converts values to other types if specified. + * @param message ApplyJobDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ApplyJobDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ApplyJobDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a DatabaseEntity. */ + interface IDatabaseEntity { + + /** DatabaseEntity shortName */ + shortName?: (string|null); + + /** DatabaseEntity parentEntity */ + parentEntity?: (string|null); + + /** DatabaseEntity tree */ + tree?: (google.cloud.clouddms.v1.DatabaseEntity.TreeType|keyof typeof google.cloud.clouddms.v1.DatabaseEntity.TreeType|null); + + /** DatabaseEntity entityType */ + entityType?: (google.cloud.clouddms.v1.DatabaseEntityType|keyof typeof google.cloud.clouddms.v1.DatabaseEntityType|null); + + /** DatabaseEntity mappings */ + mappings?: (google.cloud.clouddms.v1.IEntityMapping[]|null); + + /** DatabaseEntity schema */ + schema?: (google.cloud.clouddms.v1.ISchemaEntity|null); + + /** DatabaseEntity table */ + table?: (google.cloud.clouddms.v1.ITableEntity|null); + + /** DatabaseEntity view */ + view?: (google.cloud.clouddms.v1.IViewEntity|null); + + /** DatabaseEntity sequence */ + sequence?: (google.cloud.clouddms.v1.ISequenceEntity|null); + + /** DatabaseEntity storedProcedure */ + storedProcedure?: (google.cloud.clouddms.v1.IStoredProcedureEntity|null); + + /** DatabaseEntity databaseFunction */ + databaseFunction?: (google.cloud.clouddms.v1.IFunctionEntity|null); + + /** DatabaseEntity synonym */ + synonym?: (google.cloud.clouddms.v1.ISynonymEntity|null); + + /** DatabaseEntity databasePackage */ + databasePackage?: (google.cloud.clouddms.v1.IPackageEntity|null); + } + + /** Represents a DatabaseEntity. */ + class DatabaseEntity implements IDatabaseEntity { + + /** + * Constructs a new DatabaseEntity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IDatabaseEntity); + + /** DatabaseEntity shortName. */ + public shortName: string; + + /** DatabaseEntity parentEntity. */ + public parentEntity: string; + + /** DatabaseEntity tree. */ + public tree: (google.cloud.clouddms.v1.DatabaseEntity.TreeType|keyof typeof google.cloud.clouddms.v1.DatabaseEntity.TreeType); + + /** DatabaseEntity entityType. */ + public entityType: (google.cloud.clouddms.v1.DatabaseEntityType|keyof typeof google.cloud.clouddms.v1.DatabaseEntityType); + + /** DatabaseEntity mappings. */ + public mappings: google.cloud.clouddms.v1.IEntityMapping[]; + + /** DatabaseEntity schema. */ + public schema?: (google.cloud.clouddms.v1.ISchemaEntity|null); + + /** DatabaseEntity table. */ + public table?: (google.cloud.clouddms.v1.ITableEntity|null); + + /** DatabaseEntity view. */ + public view?: (google.cloud.clouddms.v1.IViewEntity|null); + + /** DatabaseEntity sequence. */ + public sequence?: (google.cloud.clouddms.v1.ISequenceEntity|null); + + /** DatabaseEntity storedProcedure. */ + public storedProcedure?: (google.cloud.clouddms.v1.IStoredProcedureEntity|null); + + /** DatabaseEntity databaseFunction. */ + public databaseFunction?: (google.cloud.clouddms.v1.IFunctionEntity|null); + + /** DatabaseEntity synonym. */ + public synonym?: (google.cloud.clouddms.v1.ISynonymEntity|null); + + /** DatabaseEntity databasePackage. */ + public databasePackage?: (google.cloud.clouddms.v1.IPackageEntity|null); + + /** DatabaseEntity entityBody. */ + public entityBody?: ("schema"|"table"|"view"|"sequence"|"storedProcedure"|"databaseFunction"|"synonym"|"databasePackage"); + + /** + * Creates a new DatabaseEntity instance using the specified properties. + * @param [properties] Properties to set + * @returns DatabaseEntity instance + */ + public static create(properties?: google.cloud.clouddms.v1.IDatabaseEntity): google.cloud.clouddms.v1.DatabaseEntity; + + /** + * Encodes the specified DatabaseEntity message. Does not implicitly {@link google.cloud.clouddms.v1.DatabaseEntity.verify|verify} messages. + * @param message DatabaseEntity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IDatabaseEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DatabaseEntity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.DatabaseEntity.verify|verify} messages. + * @param message DatabaseEntity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IDatabaseEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DatabaseEntity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DatabaseEntity + * @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.clouddms.v1.DatabaseEntity; + + /** + * Decodes a DatabaseEntity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DatabaseEntity + * @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.clouddms.v1.DatabaseEntity; + + /** + * Verifies a DatabaseEntity 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 DatabaseEntity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DatabaseEntity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.DatabaseEntity; + + /** + * Creates a plain object from a DatabaseEntity message. Also converts values to other types if specified. + * @param message DatabaseEntity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.DatabaseEntity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DatabaseEntity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DatabaseEntity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DatabaseEntity { + + /** TreeType enum. */ + enum TreeType { + TREE_TYPE_UNSPECIFIED = 0, + SOURCE = 1, + DRAFT = 2, + DESTINATION = 3 + } + } + + /** Properties of a SchemaEntity. */ + interface ISchemaEntity { + + /** SchemaEntity customFeatures */ + customFeatures?: (google.protobuf.IStruct|null); + } + + /** Represents a SchemaEntity. */ + class SchemaEntity implements ISchemaEntity { + + /** + * Constructs a new SchemaEntity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.ISchemaEntity); + + /** SchemaEntity customFeatures. */ + public customFeatures?: (google.protobuf.IStruct|null); + + /** + * Creates a new SchemaEntity instance using the specified properties. + * @param [properties] Properties to set + * @returns SchemaEntity instance + */ + public static create(properties?: google.cloud.clouddms.v1.ISchemaEntity): google.cloud.clouddms.v1.SchemaEntity; + + /** + * Encodes the specified SchemaEntity message. Does not implicitly {@link google.cloud.clouddms.v1.SchemaEntity.verify|verify} messages. + * @param message SchemaEntity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.ISchemaEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchemaEntity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.SchemaEntity.verify|verify} messages. + * @param message SchemaEntity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.ISchemaEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchemaEntity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchemaEntity + * @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.clouddms.v1.SchemaEntity; + + /** + * Decodes a SchemaEntity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchemaEntity + * @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.clouddms.v1.SchemaEntity; + + /** + * Verifies a SchemaEntity 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 SchemaEntity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchemaEntity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.SchemaEntity; + + /** + * Creates a plain object from a SchemaEntity message. Also converts values to other types if specified. + * @param message SchemaEntity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.SchemaEntity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchemaEntity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SchemaEntity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TableEntity. */ + interface ITableEntity { + + /** TableEntity columns */ + columns?: (google.cloud.clouddms.v1.IColumnEntity[]|null); + + /** TableEntity constraints */ + constraints?: (google.cloud.clouddms.v1.IConstraintEntity[]|null); + + /** TableEntity indices */ + indices?: (google.cloud.clouddms.v1.IIndexEntity[]|null); + + /** TableEntity triggers */ + triggers?: (google.cloud.clouddms.v1.ITriggerEntity[]|null); + + /** TableEntity customFeatures */ + customFeatures?: (google.protobuf.IStruct|null); + + /** TableEntity comment */ + comment?: (string|null); + } + + /** Represents a TableEntity. */ + class TableEntity implements ITableEntity { + + /** + * Constructs a new TableEntity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.ITableEntity); + + /** TableEntity columns. */ + public columns: google.cloud.clouddms.v1.IColumnEntity[]; + + /** TableEntity constraints. */ + public constraints: google.cloud.clouddms.v1.IConstraintEntity[]; + + /** TableEntity indices. */ + public indices: google.cloud.clouddms.v1.IIndexEntity[]; + + /** TableEntity triggers. */ + public triggers: google.cloud.clouddms.v1.ITriggerEntity[]; + + /** TableEntity customFeatures. */ + public customFeatures?: (google.protobuf.IStruct|null); + + /** TableEntity comment. */ + public comment: string; + + /** + * Creates a new TableEntity instance using the specified properties. + * @param [properties] Properties to set + * @returns TableEntity instance + */ + public static create(properties?: google.cloud.clouddms.v1.ITableEntity): google.cloud.clouddms.v1.TableEntity; + + /** + * Encodes the specified TableEntity message. Does not implicitly {@link google.cloud.clouddms.v1.TableEntity.verify|verify} messages. + * @param message TableEntity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.ITableEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TableEntity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.TableEntity.verify|verify} messages. + * @param message TableEntity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.ITableEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TableEntity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TableEntity + * @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.clouddms.v1.TableEntity; + + /** + * Decodes a TableEntity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TableEntity + * @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.clouddms.v1.TableEntity; + + /** + * Verifies a TableEntity 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 TableEntity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TableEntity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.TableEntity; + + /** + * Creates a plain object from a TableEntity message. Also converts values to other types if specified. + * @param message TableEntity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.TableEntity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TableEntity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TableEntity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ColumnEntity. */ + interface IColumnEntity { + + /** ColumnEntity name */ + name?: (string|null); + + /** ColumnEntity dataType */ + dataType?: (string|null); + + /** ColumnEntity charset */ + charset?: (string|null); + + /** ColumnEntity collation */ + collation?: (string|null); + + /** ColumnEntity length */ + length?: (number|Long|string|null); + + /** ColumnEntity precision */ + precision?: (number|null); + + /** ColumnEntity scale */ + scale?: (number|null); + + /** ColumnEntity fractionalSecondsPrecision */ + fractionalSecondsPrecision?: (number|null); + + /** ColumnEntity array */ + array?: (boolean|null); + + /** ColumnEntity arrayLength */ + arrayLength?: (number|null); + + /** ColumnEntity nullable */ + nullable?: (boolean|null); + + /** ColumnEntity autoGenerated */ + autoGenerated?: (boolean|null); + + /** ColumnEntity udt */ + udt?: (boolean|null); + + /** ColumnEntity customFeatures */ + customFeatures?: (google.protobuf.IStruct|null); + + /** ColumnEntity setValues */ + setValues?: (string[]|null); + + /** ColumnEntity comment */ + comment?: (string|null); + + /** ColumnEntity ordinalPosition */ + ordinalPosition?: (number|null); + + /** ColumnEntity defaultValue */ + defaultValue?: (string|null); + } + + /** Represents a ColumnEntity. */ + class ColumnEntity implements IColumnEntity { + + /** + * Constructs a new ColumnEntity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IColumnEntity); + + /** ColumnEntity name. */ + public name: string; + + /** ColumnEntity dataType. */ + public dataType: string; + + /** ColumnEntity charset. */ + public charset: string; + + /** ColumnEntity collation. */ + public collation: string; + + /** ColumnEntity length. */ + public length: (number|Long|string); + + /** ColumnEntity precision. */ + public precision: number; + + /** ColumnEntity scale. */ + public scale: number; + + /** ColumnEntity fractionalSecondsPrecision. */ + public fractionalSecondsPrecision: number; + + /** ColumnEntity array. */ + public array: boolean; + + /** ColumnEntity arrayLength. */ + public arrayLength: number; + + /** ColumnEntity nullable. */ + public nullable: boolean; + + /** ColumnEntity autoGenerated. */ + public autoGenerated: boolean; + + /** ColumnEntity udt. */ + public udt: boolean; + + /** ColumnEntity customFeatures. */ + public customFeatures?: (google.protobuf.IStruct|null); + + /** ColumnEntity setValues. */ + public setValues: string[]; + + /** ColumnEntity comment. */ + public comment: string; + + /** ColumnEntity ordinalPosition. */ + public ordinalPosition: number; + + /** ColumnEntity defaultValue. */ + public defaultValue: string; + + /** + * Creates a new ColumnEntity instance using the specified properties. + * @param [properties] Properties to set + * @returns ColumnEntity instance + */ + public static create(properties?: google.cloud.clouddms.v1.IColumnEntity): google.cloud.clouddms.v1.ColumnEntity; + + /** + * Encodes the specified ColumnEntity message. Does not implicitly {@link google.cloud.clouddms.v1.ColumnEntity.verify|verify} messages. + * @param message ColumnEntity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IColumnEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ColumnEntity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ColumnEntity.verify|verify} messages. + * @param message ColumnEntity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IColumnEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ColumnEntity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ColumnEntity + * @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.clouddms.v1.ColumnEntity; + + /** + * Decodes a ColumnEntity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ColumnEntity + * @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.clouddms.v1.ColumnEntity; + + /** + * Verifies a ColumnEntity 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 ColumnEntity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ColumnEntity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.ColumnEntity; + + /** + * Creates a plain object from a ColumnEntity message. Also converts values to other types if specified. + * @param message ColumnEntity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.ColumnEntity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ColumnEntity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ColumnEntity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConstraintEntity. */ + interface IConstraintEntity { + + /** ConstraintEntity name */ + name?: (string|null); + + /** ConstraintEntity type */ + type?: (string|null); + + /** ConstraintEntity tableColumns */ + tableColumns?: (string[]|null); + + /** ConstraintEntity customFeatures */ + customFeatures?: (google.protobuf.IStruct|null); + + /** ConstraintEntity referenceColumns */ + referenceColumns?: (string[]|null); + + /** ConstraintEntity referenceTable */ + referenceTable?: (string|null); + + /** ConstraintEntity tableName */ + tableName?: (string|null); + } + + /** Represents a ConstraintEntity. */ + class ConstraintEntity implements IConstraintEntity { + + /** + * Constructs a new ConstraintEntity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IConstraintEntity); + + /** ConstraintEntity name. */ + public name: string; + + /** ConstraintEntity type. */ + public type: string; + + /** ConstraintEntity tableColumns. */ + public tableColumns: string[]; + + /** ConstraintEntity customFeatures. */ + public customFeatures?: (google.protobuf.IStruct|null); + + /** ConstraintEntity referenceColumns. */ + public referenceColumns: string[]; + + /** ConstraintEntity referenceTable. */ + public referenceTable: string; + + /** ConstraintEntity tableName. */ + public tableName: string; + + /** + * Creates a new ConstraintEntity instance using the specified properties. + * @param [properties] Properties to set + * @returns ConstraintEntity instance + */ + public static create(properties?: google.cloud.clouddms.v1.IConstraintEntity): google.cloud.clouddms.v1.ConstraintEntity; + + /** + * Encodes the specified ConstraintEntity message. Does not implicitly {@link google.cloud.clouddms.v1.ConstraintEntity.verify|verify} messages. + * @param message ConstraintEntity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IConstraintEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConstraintEntity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ConstraintEntity.verify|verify} messages. + * @param message ConstraintEntity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IConstraintEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConstraintEntity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConstraintEntity + * @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.clouddms.v1.ConstraintEntity; + + /** + * Decodes a ConstraintEntity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConstraintEntity + * @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.clouddms.v1.ConstraintEntity; + + /** + * Verifies a ConstraintEntity 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 ConstraintEntity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConstraintEntity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.ConstraintEntity; + + /** + * Creates a plain object from a ConstraintEntity message. Also converts values to other types if specified. + * @param message ConstraintEntity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.ConstraintEntity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConstraintEntity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConstraintEntity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an IndexEntity. */ + interface IIndexEntity { + + /** IndexEntity name */ + name?: (string|null); + + /** IndexEntity type */ + type?: (string|null); + + /** IndexEntity tableColumns */ + tableColumns?: (string[]|null); + + /** IndexEntity unique */ + unique?: (boolean|null); + + /** IndexEntity customFeatures */ + customFeatures?: (google.protobuf.IStruct|null); + } + + /** Represents an IndexEntity. */ + class IndexEntity implements IIndexEntity { + + /** + * Constructs a new IndexEntity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IIndexEntity); + + /** IndexEntity name. */ + public name: string; + + /** IndexEntity type. */ + public type: string; + + /** IndexEntity tableColumns. */ + public tableColumns: string[]; + + /** IndexEntity unique. */ + public unique: boolean; + + /** IndexEntity customFeatures. */ + public customFeatures?: (google.protobuf.IStruct|null); + + /** + * Creates a new IndexEntity instance using the specified properties. + * @param [properties] Properties to set + * @returns IndexEntity instance + */ + public static create(properties?: google.cloud.clouddms.v1.IIndexEntity): google.cloud.clouddms.v1.IndexEntity; + + /** + * Encodes the specified IndexEntity message. Does not implicitly {@link google.cloud.clouddms.v1.IndexEntity.verify|verify} messages. + * @param message IndexEntity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IIndexEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IndexEntity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.IndexEntity.verify|verify} messages. + * @param message IndexEntity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IIndexEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IndexEntity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IndexEntity + * @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.clouddms.v1.IndexEntity; + + /** + * Decodes an IndexEntity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IndexEntity + * @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.clouddms.v1.IndexEntity; + + /** + * Verifies an IndexEntity 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 IndexEntity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IndexEntity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.IndexEntity; + + /** + * Creates a plain object from an IndexEntity message. Also converts values to other types if specified. + * @param message IndexEntity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.IndexEntity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IndexEntity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IndexEntity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TriggerEntity. */ + interface ITriggerEntity { + + /** TriggerEntity name */ + name?: (string|null); + + /** TriggerEntity triggeringEvents */ + triggeringEvents?: (string[]|null); + + /** TriggerEntity triggerType */ + triggerType?: (string|null); + + /** TriggerEntity sqlCode */ + sqlCode?: (string|null); + + /** TriggerEntity customFeatures */ + customFeatures?: (google.protobuf.IStruct|null); + } + + /** Represents a TriggerEntity. */ + class TriggerEntity implements ITriggerEntity { + + /** + * Constructs a new TriggerEntity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.ITriggerEntity); + + /** TriggerEntity name. */ + public name: string; + + /** TriggerEntity triggeringEvents. */ + public triggeringEvents: string[]; + + /** TriggerEntity triggerType. */ + public triggerType: string; + + /** TriggerEntity sqlCode. */ + public sqlCode: string; + + /** TriggerEntity customFeatures. */ + public customFeatures?: (google.protobuf.IStruct|null); + + /** + * Creates a new TriggerEntity instance using the specified properties. + * @param [properties] Properties to set + * @returns TriggerEntity instance + */ + public static create(properties?: google.cloud.clouddms.v1.ITriggerEntity): google.cloud.clouddms.v1.TriggerEntity; + + /** + * Encodes the specified TriggerEntity message. Does not implicitly {@link google.cloud.clouddms.v1.TriggerEntity.verify|verify} messages. + * @param message TriggerEntity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.ITriggerEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TriggerEntity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.TriggerEntity.verify|verify} messages. + * @param message TriggerEntity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.ITriggerEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TriggerEntity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TriggerEntity + * @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.clouddms.v1.TriggerEntity; + + /** + * Decodes a TriggerEntity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TriggerEntity + * @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.clouddms.v1.TriggerEntity; + + /** + * Verifies a TriggerEntity 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 TriggerEntity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TriggerEntity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.TriggerEntity; + + /** + * Creates a plain object from a TriggerEntity message. Also converts values to other types if specified. + * @param message TriggerEntity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.TriggerEntity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TriggerEntity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TriggerEntity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ViewEntity. */ + interface IViewEntity { + + /** ViewEntity sqlCode */ + sqlCode?: (string|null); + + /** ViewEntity customFeatures */ + customFeatures?: (google.protobuf.IStruct|null); + + /** ViewEntity constraints */ + constraints?: (google.cloud.clouddms.v1.IConstraintEntity[]|null); + } + + /** Represents a ViewEntity. */ + class ViewEntity implements IViewEntity { + + /** + * Constructs a new ViewEntity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IViewEntity); + + /** ViewEntity sqlCode. */ + public sqlCode: string; + + /** ViewEntity customFeatures. */ + public customFeatures?: (google.protobuf.IStruct|null); + + /** ViewEntity constraints. */ + public constraints: google.cloud.clouddms.v1.IConstraintEntity[]; + + /** + * Creates a new ViewEntity instance using the specified properties. + * @param [properties] Properties to set + * @returns ViewEntity instance + */ + public static create(properties?: google.cloud.clouddms.v1.IViewEntity): google.cloud.clouddms.v1.ViewEntity; + + /** + * Encodes the specified ViewEntity message. Does not implicitly {@link google.cloud.clouddms.v1.ViewEntity.verify|verify} messages. + * @param message ViewEntity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IViewEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ViewEntity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ViewEntity.verify|verify} messages. + * @param message ViewEntity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IViewEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ViewEntity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ViewEntity + * @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.clouddms.v1.ViewEntity; + + /** + * Decodes a ViewEntity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ViewEntity + * @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.clouddms.v1.ViewEntity; + + /** + * Verifies a ViewEntity 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 ViewEntity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ViewEntity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.ViewEntity; + + /** + * Creates a plain object from a ViewEntity message. Also converts values to other types if specified. + * @param message ViewEntity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.ViewEntity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ViewEntity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ViewEntity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SequenceEntity. */ + interface ISequenceEntity { + + /** SequenceEntity increment */ + increment?: (number|Long|string|null); + + /** SequenceEntity startValue */ + startValue?: (Uint8Array|string|null); + + /** SequenceEntity maxValue */ + maxValue?: (Uint8Array|string|null); + + /** SequenceEntity minValue */ + minValue?: (Uint8Array|string|null); + + /** SequenceEntity cycle */ + cycle?: (boolean|null); + + /** SequenceEntity cache */ + cache?: (number|Long|string|null); + + /** SequenceEntity customFeatures */ + customFeatures?: (google.protobuf.IStruct|null); + } + + /** Represents a SequenceEntity. */ + class SequenceEntity implements ISequenceEntity { + + /** + * Constructs a new SequenceEntity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.ISequenceEntity); + + /** SequenceEntity increment. */ + public increment: (number|Long|string); + + /** SequenceEntity startValue. */ + public startValue: (Uint8Array|string); + + /** SequenceEntity maxValue. */ + public maxValue: (Uint8Array|string); + + /** SequenceEntity minValue. */ + public minValue: (Uint8Array|string); + + /** SequenceEntity cycle. */ + public cycle: boolean; + + /** SequenceEntity cache. */ + public cache: (number|Long|string); + + /** SequenceEntity customFeatures. */ + public customFeatures?: (google.protobuf.IStruct|null); + + /** + * Creates a new SequenceEntity instance using the specified properties. + * @param [properties] Properties to set + * @returns SequenceEntity instance + */ + public static create(properties?: google.cloud.clouddms.v1.ISequenceEntity): google.cloud.clouddms.v1.SequenceEntity; + + /** + * Encodes the specified SequenceEntity message. Does not implicitly {@link google.cloud.clouddms.v1.SequenceEntity.verify|verify} messages. + * @param message SequenceEntity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.ISequenceEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SequenceEntity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.SequenceEntity.verify|verify} messages. + * @param message SequenceEntity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.ISequenceEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SequenceEntity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SequenceEntity + * @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.clouddms.v1.SequenceEntity; + + /** + * Decodes a SequenceEntity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SequenceEntity + * @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.clouddms.v1.SequenceEntity; + + /** + * Verifies a SequenceEntity 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 SequenceEntity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SequenceEntity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.SequenceEntity; + + /** + * Creates a plain object from a SequenceEntity message. Also converts values to other types if specified. + * @param message SequenceEntity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.SequenceEntity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SequenceEntity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SequenceEntity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StoredProcedureEntity. */ + interface IStoredProcedureEntity { + + /** StoredProcedureEntity sqlCode */ + sqlCode?: (string|null); + + /** StoredProcedureEntity customFeatures */ + customFeatures?: (google.protobuf.IStruct|null); + } + + /** Represents a StoredProcedureEntity. */ + class StoredProcedureEntity implements IStoredProcedureEntity { + + /** + * Constructs a new StoredProcedureEntity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IStoredProcedureEntity); + + /** StoredProcedureEntity sqlCode. */ + public sqlCode: string; + + /** StoredProcedureEntity customFeatures. */ + public customFeatures?: (google.protobuf.IStruct|null); + + /** + * Creates a new StoredProcedureEntity instance using the specified properties. + * @param [properties] Properties to set + * @returns StoredProcedureEntity instance + */ + public static create(properties?: google.cloud.clouddms.v1.IStoredProcedureEntity): google.cloud.clouddms.v1.StoredProcedureEntity; + + /** + * Encodes the specified StoredProcedureEntity message. Does not implicitly {@link google.cloud.clouddms.v1.StoredProcedureEntity.verify|verify} messages. + * @param message StoredProcedureEntity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IStoredProcedureEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StoredProcedureEntity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.StoredProcedureEntity.verify|verify} messages. + * @param message StoredProcedureEntity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IStoredProcedureEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StoredProcedureEntity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StoredProcedureEntity + * @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.clouddms.v1.StoredProcedureEntity; + + /** + * Decodes a StoredProcedureEntity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StoredProcedureEntity + * @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.clouddms.v1.StoredProcedureEntity; + + /** + * Verifies a StoredProcedureEntity 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 StoredProcedureEntity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StoredProcedureEntity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.StoredProcedureEntity; + + /** + * Creates a plain object from a StoredProcedureEntity message. Also converts values to other types if specified. + * @param message StoredProcedureEntity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.StoredProcedureEntity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StoredProcedureEntity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StoredProcedureEntity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunctionEntity. */ + interface IFunctionEntity { + + /** FunctionEntity sqlCode */ + sqlCode?: (string|null); + + /** FunctionEntity customFeatures */ + customFeatures?: (google.protobuf.IStruct|null); + } + + /** Represents a FunctionEntity. */ + class FunctionEntity implements IFunctionEntity { + + /** + * Constructs a new FunctionEntity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IFunctionEntity); + + /** FunctionEntity sqlCode. */ + public sqlCode: string; + + /** FunctionEntity customFeatures. */ + public customFeatures?: (google.protobuf.IStruct|null); + + /** + * Creates a new FunctionEntity instance using the specified properties. + * @param [properties] Properties to set + * @returns FunctionEntity instance + */ + public static create(properties?: google.cloud.clouddms.v1.IFunctionEntity): google.cloud.clouddms.v1.FunctionEntity; + + /** + * Encodes the specified FunctionEntity message. Does not implicitly {@link google.cloud.clouddms.v1.FunctionEntity.verify|verify} messages. + * @param message FunctionEntity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IFunctionEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunctionEntity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.FunctionEntity.verify|verify} messages. + * @param message FunctionEntity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IFunctionEntity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunctionEntity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunctionEntity + * @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.clouddms.v1.FunctionEntity; + + /** + * Decodes a FunctionEntity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunctionEntity + * @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.clouddms.v1.FunctionEntity; + + /** + * Verifies a FunctionEntity 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 FunctionEntity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunctionEntity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.FunctionEntity; + + /** + * Creates a plain object from a FunctionEntity message. Also converts values to other types if specified. + * @param message FunctionEntity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.FunctionEntity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunctionEntity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** MigrationJob destination. */ - public destination: string; + /** + * Gets the default type url for FunctionEntity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** MigrationJob reverseSshConnectivity. */ - public reverseSshConnectivity?: (google.cloud.clouddms.v1.IReverseSshConnectivity|null); + /** Properties of a SynonymEntity. */ + interface ISynonymEntity { - /** MigrationJob vpcPeeringConnectivity. */ - public vpcPeeringConnectivity?: (google.cloud.clouddms.v1.IVpcPeeringConnectivity|null); + /** SynonymEntity sourceEntity */ + sourceEntity?: (string|null); - /** MigrationJob staticIpConnectivity. */ - public staticIpConnectivity?: (google.cloud.clouddms.v1.IStaticIpConnectivity|null); + /** SynonymEntity sourceType */ + sourceType?: (google.cloud.clouddms.v1.DatabaseEntityType|keyof typeof google.cloud.clouddms.v1.DatabaseEntityType|null); - /** MigrationJob duration. */ - public duration?: (google.protobuf.IDuration|null); + /** SynonymEntity customFeatures */ + customFeatures?: (google.protobuf.IStruct|null); + } - /** MigrationJob error. */ - public error?: (google.rpc.IStatus|null); + /** Represents a SynonymEntity. */ + class SynonymEntity implements ISynonymEntity { - /** MigrationJob sourceDatabase. */ - public sourceDatabase?: (google.cloud.clouddms.v1.IDatabaseType|null); + /** + * Constructs a new SynonymEntity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.ISynonymEntity); - /** MigrationJob destinationDatabase. */ - public destinationDatabase?: (google.cloud.clouddms.v1.IDatabaseType|null); + /** SynonymEntity sourceEntity. */ + public sourceEntity: string; - /** MigrationJob endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); + /** SynonymEntity sourceType. */ + public sourceType: (google.cloud.clouddms.v1.DatabaseEntityType|keyof typeof google.cloud.clouddms.v1.DatabaseEntityType); - /** MigrationJob connectivity. */ - public connectivity?: ("reverseSshConnectivity"|"vpcPeeringConnectivity"|"staticIpConnectivity"); + /** SynonymEntity customFeatures. */ + public customFeatures?: (google.protobuf.IStruct|null); /** - * Creates a new MigrationJob instance using the specified properties. + * Creates a new SynonymEntity instance using the specified properties. * @param [properties] Properties to set - * @returns MigrationJob instance + * @returns SynonymEntity instance */ - public static create(properties?: google.cloud.clouddms.v1.IMigrationJob): google.cloud.clouddms.v1.MigrationJob; + public static create(properties?: google.cloud.clouddms.v1.ISynonymEntity): google.cloud.clouddms.v1.SynonymEntity; /** - * Encodes the specified MigrationJob message. Does not implicitly {@link google.cloud.clouddms.v1.MigrationJob.verify|verify} messages. - * @param message MigrationJob message or plain object to encode + * Encodes the specified SynonymEntity message. Does not implicitly {@link google.cloud.clouddms.v1.SynonymEntity.verify|verify} messages. + * @param message SynonymEntity message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.clouddms.v1.IMigrationJob, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.clouddms.v1.ISynonymEntity, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MigrationJob message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.MigrationJob.verify|verify} messages. - * @param message MigrationJob message or plain object to encode + * Encodes the specified SynonymEntity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.SynonymEntity.verify|verify} messages. + * @param message SynonymEntity message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.clouddms.v1.IMigrationJob, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.clouddms.v1.ISynonymEntity, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MigrationJob message from the specified reader or buffer. + * Decodes a SynonymEntity message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MigrationJob + * @returns SynonymEntity * @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.clouddms.v1.MigrationJob; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.clouddms.v1.SynonymEntity; /** - * Decodes a MigrationJob message from the specified reader or buffer, length delimited. + * Decodes a SynonymEntity message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MigrationJob + * @returns SynonymEntity * @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.clouddms.v1.MigrationJob; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.clouddms.v1.SynonymEntity; /** - * Verifies a MigrationJob message. + * Verifies a SynonymEntity 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 MigrationJob message from a plain object. Also converts values to their respective internal types. + * Creates a SynonymEntity message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MigrationJob + * @returns SynonymEntity */ - public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.MigrationJob; + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.SynonymEntity; /** - * Creates a plain object from a MigrationJob message. Also converts values to other types if specified. - * @param message MigrationJob + * Creates a plain object from a SynonymEntity message. Also converts values to other types if specified. + * @param message SynonymEntity * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.clouddms.v1.MigrationJob, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.clouddms.v1.SynonymEntity, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MigrationJob to JSON. + * Converts this SynonymEntity to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MigrationJob + * Gets the default type url for SynonymEntity * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace MigrationJob { + /** Properties of a PackageEntity. */ + interface IPackageEntity { - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - MAINTENANCE = 1, - DRAFT = 2, - CREATING = 3, - NOT_STARTED = 4, - RUNNING = 5, - FAILED = 6, - COMPLETED = 7, - DELETING = 8, - STOPPING = 9, - STOPPED = 10, - DELETED = 11, - UPDATING = 12, - STARTING = 13, - RESTARTING = 14, - RESUMING = 15 - } + /** PackageEntity packageSqlCode */ + packageSqlCode?: (string|null); - /** Phase enum. */ - enum Phase { - PHASE_UNSPECIFIED = 0, - FULL_DUMP = 1, - CDC = 2, - PROMOTE_IN_PROGRESS = 3, - WAITING_FOR_SOURCE_WRITES_TO_STOP = 4, - PREPARING_THE_DUMP = 5 - } + /** PackageEntity packageBody */ + packageBody?: (string|null); - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - ONE_TIME = 1, - CONTINUOUS = 2 - } + /** PackageEntity customFeatures */ + customFeatures?: (google.protobuf.IStruct|null); } - /** Properties of a ConnectionProfile. */ - interface IConnectionProfile { + /** Represents a PackageEntity. */ + class PackageEntity implements IPackageEntity { - /** ConnectionProfile name */ - name?: (string|null); + /** + * Constructs a new PackageEntity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IPackageEntity); - /** ConnectionProfile createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** PackageEntity packageSqlCode. */ + public packageSqlCode: string; - /** ConnectionProfile updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** PackageEntity packageBody. */ + public packageBody: string; - /** ConnectionProfile labels */ - labels?: ({ [k: string]: string }|null); + /** PackageEntity customFeatures. */ + public customFeatures?: (google.protobuf.IStruct|null); - /** ConnectionProfile state */ - state?: (google.cloud.clouddms.v1.ConnectionProfile.State|keyof typeof google.cloud.clouddms.v1.ConnectionProfile.State|null); + /** + * Creates a new PackageEntity instance using the specified properties. + * @param [properties] Properties to set + * @returns PackageEntity instance + */ + public static create(properties?: google.cloud.clouddms.v1.IPackageEntity): google.cloud.clouddms.v1.PackageEntity; - /** ConnectionProfile displayName */ - displayName?: (string|null); + /** + * Encodes the specified PackageEntity message. Does not implicitly {@link google.cloud.clouddms.v1.PackageEntity.verify|verify} messages. + * @param message PackageEntity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.clouddms.v1.IPackageEntity, writer?: $protobuf.Writer): $protobuf.Writer; - /** ConnectionProfile mysql */ - mysql?: (google.cloud.clouddms.v1.IMySqlConnectionProfile|null); + /** + * Encodes the specified PackageEntity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.PackageEntity.verify|verify} messages. + * @param message PackageEntity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.clouddms.v1.IPackageEntity, writer?: $protobuf.Writer): $protobuf.Writer; - /** ConnectionProfile postgresql */ - postgresql?: (google.cloud.clouddms.v1.IPostgreSqlConnectionProfile|null); + /** + * Decodes a PackageEntity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PackageEntity + * @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.clouddms.v1.PackageEntity; - /** ConnectionProfile cloudsql */ - cloudsql?: (google.cloud.clouddms.v1.ICloudSqlConnectionProfile|null); + /** + * Decodes a PackageEntity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PackageEntity + * @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.clouddms.v1.PackageEntity; - /** ConnectionProfile error */ - error?: (google.rpc.IStatus|null); + /** + * Verifies a PackageEntity 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); - /** ConnectionProfile provider */ - provider?: (google.cloud.clouddms.v1.DatabaseProvider|keyof typeof google.cloud.clouddms.v1.DatabaseProvider|null); - } + /** + * Creates a PackageEntity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PackageEntity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.PackageEntity; - /** Represents a ConnectionProfile. */ - class ConnectionProfile implements IConnectionProfile { + /** + * Creates a plain object from a PackageEntity message. Also converts values to other types if specified. + * @param message PackageEntity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.clouddms.v1.PackageEntity, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Constructs a new ConnectionProfile. - * @param [properties] Properties to set + * Converts this PackageEntity to JSON. + * @returns JSON object */ - constructor(properties?: google.cloud.clouddms.v1.IConnectionProfile); + public toJSON(): { [k: string]: any }; - /** ConnectionProfile name. */ - public name: string; + /** + * Gets the default type url for PackageEntity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** ConnectionProfile createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** Properties of an EntityMapping. */ + interface IEntityMapping { - /** ConnectionProfile updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** EntityMapping sourceEntity */ + sourceEntity?: (string|null); - /** ConnectionProfile labels. */ - public labels: { [k: string]: string }; + /** EntityMapping draftEntity */ + draftEntity?: (string|null); - /** ConnectionProfile state. */ - public state: (google.cloud.clouddms.v1.ConnectionProfile.State|keyof typeof google.cloud.clouddms.v1.ConnectionProfile.State); + /** EntityMapping sourceType */ + sourceType?: (google.cloud.clouddms.v1.DatabaseEntityType|keyof typeof google.cloud.clouddms.v1.DatabaseEntityType|null); - /** ConnectionProfile displayName. */ - public displayName: string; + /** EntityMapping draftType */ + draftType?: (google.cloud.clouddms.v1.DatabaseEntityType|keyof typeof google.cloud.clouddms.v1.DatabaseEntityType|null); - /** ConnectionProfile mysql. */ - public mysql?: (google.cloud.clouddms.v1.IMySqlConnectionProfile|null); + /** EntityMapping mappingLog */ + mappingLog?: (google.cloud.clouddms.v1.IEntityMappingLogEntry[]|null); + } - /** ConnectionProfile postgresql. */ - public postgresql?: (google.cloud.clouddms.v1.IPostgreSqlConnectionProfile|null); + /** Represents an EntityMapping. */ + class EntityMapping implements IEntityMapping { - /** ConnectionProfile cloudsql. */ - public cloudsql?: (google.cloud.clouddms.v1.ICloudSqlConnectionProfile|null); + /** + * Constructs a new EntityMapping. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.clouddms.v1.IEntityMapping); - /** ConnectionProfile error. */ - public error?: (google.rpc.IStatus|null); + /** EntityMapping sourceEntity. */ + public sourceEntity: string; - /** ConnectionProfile provider. */ - public provider: (google.cloud.clouddms.v1.DatabaseProvider|keyof typeof google.cloud.clouddms.v1.DatabaseProvider); + /** EntityMapping draftEntity. */ + public draftEntity: string; - /** ConnectionProfile connectionProfile. */ - public connectionProfile?: ("mysql"|"postgresql"|"cloudsql"); + /** EntityMapping sourceType. */ + public sourceType: (google.cloud.clouddms.v1.DatabaseEntityType|keyof typeof google.cloud.clouddms.v1.DatabaseEntityType); + + /** EntityMapping draftType. */ + public draftType: (google.cloud.clouddms.v1.DatabaseEntityType|keyof typeof google.cloud.clouddms.v1.DatabaseEntityType); + + /** EntityMapping mappingLog. */ + public mappingLog: google.cloud.clouddms.v1.IEntityMappingLogEntry[]; /** - * Creates a new ConnectionProfile instance using the specified properties. + * Creates a new EntityMapping instance using the specified properties. * @param [properties] Properties to set - * @returns ConnectionProfile instance + * @returns EntityMapping instance */ - public static create(properties?: google.cloud.clouddms.v1.IConnectionProfile): google.cloud.clouddms.v1.ConnectionProfile; + public static create(properties?: google.cloud.clouddms.v1.IEntityMapping): google.cloud.clouddms.v1.EntityMapping; /** - * Encodes the specified ConnectionProfile message. Does not implicitly {@link google.cloud.clouddms.v1.ConnectionProfile.verify|verify} messages. - * @param message ConnectionProfile message or plain object to encode + * Encodes the specified EntityMapping message. Does not implicitly {@link google.cloud.clouddms.v1.EntityMapping.verify|verify} messages. + * @param message EntityMapping message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.clouddms.v1.IConnectionProfile, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.clouddms.v1.IEntityMapping, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ConnectionProfile message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ConnectionProfile.verify|verify} messages. - * @param message ConnectionProfile message or plain object to encode + * Encodes the specified EntityMapping message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.EntityMapping.verify|verify} messages. + * @param message EntityMapping message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.clouddms.v1.IConnectionProfile, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.clouddms.v1.IEntityMapping, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ConnectionProfile message from the specified reader or buffer. + * Decodes an EntityMapping message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ConnectionProfile + * @returns EntityMapping * @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.clouddms.v1.ConnectionProfile; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.clouddms.v1.EntityMapping; /** - * Decodes a ConnectionProfile message from the specified reader or buffer, length delimited. + * Decodes an EntityMapping message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ConnectionProfile + * @returns EntityMapping * @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.clouddms.v1.ConnectionProfile; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.clouddms.v1.EntityMapping; /** - * Verifies a ConnectionProfile message. + * Verifies an EntityMapping 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 ConnectionProfile message from a plain object. Also converts values to their respective internal types. + * Creates an EntityMapping message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ConnectionProfile + * @returns EntityMapping */ - public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.ConnectionProfile; + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.EntityMapping; /** - * Creates a plain object from a ConnectionProfile message. Also converts values to other types if specified. - * @param message ConnectionProfile + * Creates a plain object from an EntityMapping message. Also converts values to other types if specified. + * @param message EntityMapping * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.clouddms.v1.ConnectionProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.clouddms.v1.EntityMapping, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ConnectionProfile to JSON. + * Converts this EntityMapping to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ConnectionProfile + * Gets the default type url for EntityMapping * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace ConnectionProfile { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - DRAFT = 1, - CREATING = 2, - READY = 3, - UPDATING = 4, - DELETING = 5, - DELETED = 6, - FAILED = 7 - } - } - - /** Properties of a MigrationJobVerificationError. */ - interface IMigrationJobVerificationError { + /** Properties of an EntityMappingLogEntry. */ + interface IEntityMappingLogEntry { - /** MigrationJobVerificationError errorCode */ - errorCode?: (google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode|keyof typeof google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode|null); + /** EntityMappingLogEntry ruleId */ + ruleId?: (string|null); - /** MigrationJobVerificationError errorMessage */ - errorMessage?: (string|null); + /** EntityMappingLogEntry ruleRevisionId */ + ruleRevisionId?: (string|null); - /** MigrationJobVerificationError errorDetailMessage */ - errorDetailMessage?: (string|null); + /** EntityMappingLogEntry mappingComment */ + mappingComment?: (string|null); } - /** Represents a MigrationJobVerificationError. */ - class MigrationJobVerificationError implements IMigrationJobVerificationError { + /** Represents an EntityMappingLogEntry. */ + class EntityMappingLogEntry implements IEntityMappingLogEntry { /** - * Constructs a new MigrationJobVerificationError. + * Constructs a new EntityMappingLogEntry. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.clouddms.v1.IMigrationJobVerificationError); + constructor(properties?: google.cloud.clouddms.v1.IEntityMappingLogEntry); - /** MigrationJobVerificationError errorCode. */ - public errorCode: (google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode|keyof typeof google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode); + /** EntityMappingLogEntry ruleId. */ + public ruleId: string; - /** MigrationJobVerificationError errorMessage. */ - public errorMessage: string; + /** EntityMappingLogEntry ruleRevisionId. */ + public ruleRevisionId: string; - /** MigrationJobVerificationError errorDetailMessage. */ - public errorDetailMessage: string; + /** EntityMappingLogEntry mappingComment. */ + public mappingComment: string; /** - * Creates a new MigrationJobVerificationError instance using the specified properties. + * Creates a new EntityMappingLogEntry instance using the specified properties. * @param [properties] Properties to set - * @returns MigrationJobVerificationError instance + * @returns EntityMappingLogEntry instance */ - public static create(properties?: google.cloud.clouddms.v1.IMigrationJobVerificationError): google.cloud.clouddms.v1.MigrationJobVerificationError; + public static create(properties?: google.cloud.clouddms.v1.IEntityMappingLogEntry): google.cloud.clouddms.v1.EntityMappingLogEntry; /** - * Encodes the specified MigrationJobVerificationError message. Does not implicitly {@link google.cloud.clouddms.v1.MigrationJobVerificationError.verify|verify} messages. - * @param message MigrationJobVerificationError message or plain object to encode + * Encodes the specified EntityMappingLogEntry message. Does not implicitly {@link google.cloud.clouddms.v1.EntityMappingLogEntry.verify|verify} messages. + * @param message EntityMappingLogEntry message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.clouddms.v1.IMigrationJobVerificationError, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.clouddms.v1.IEntityMappingLogEntry, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MigrationJobVerificationError message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.MigrationJobVerificationError.verify|verify} messages. - * @param message MigrationJobVerificationError message or plain object to encode + * Encodes the specified EntityMappingLogEntry message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.EntityMappingLogEntry.verify|verify} messages. + * @param message EntityMappingLogEntry message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.clouddms.v1.IMigrationJobVerificationError, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.clouddms.v1.IEntityMappingLogEntry, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MigrationJobVerificationError message from the specified reader or buffer. + * Decodes an EntityMappingLogEntry message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MigrationJobVerificationError + * @returns EntityMappingLogEntry * @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.clouddms.v1.MigrationJobVerificationError; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.clouddms.v1.EntityMappingLogEntry; /** - * Decodes a MigrationJobVerificationError message from the specified reader or buffer, length delimited. + * Decodes an EntityMappingLogEntry message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MigrationJobVerificationError + * @returns EntityMappingLogEntry * @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.clouddms.v1.MigrationJobVerificationError; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.clouddms.v1.EntityMappingLogEntry; /** - * Verifies a MigrationJobVerificationError message. + * Verifies an EntityMappingLogEntry 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 MigrationJobVerificationError message from a plain object. Also converts values to their respective internal types. + * Creates an EntityMappingLogEntry message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MigrationJobVerificationError + * @returns EntityMappingLogEntry */ - public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.MigrationJobVerificationError; + public static fromObject(object: { [k: string]: any }): google.cloud.clouddms.v1.EntityMappingLogEntry; /** - * Creates a plain object from a MigrationJobVerificationError message. Also converts values to other types if specified. - * @param message MigrationJobVerificationError + * Creates a plain object from an EntityMappingLogEntry message. Also converts values to other types if specified. + * @param message EntityMappingLogEntry * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.clouddms.v1.MigrationJobVerificationError, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.clouddms.v1.EntityMappingLogEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MigrationJobVerificationError to JSON. + * Converts this EntityMappingLogEntry to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MigrationJobVerificationError + * Gets the default type url for EntityMappingLogEntry * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace MigrationJobVerificationError { - - /** ErrorCode enum. */ - enum ErrorCode { - ERROR_CODE_UNSPECIFIED = 0, - CONNECTION_FAILURE = 1, - AUTHENTICATION_FAILURE = 2, - INVALID_CONNECTION_PROFILE_CONFIG = 3, - VERSION_INCOMPATIBILITY = 4, - CONNECTION_PROFILE_TYPES_INCOMPATIBILITY = 5, - NO_PGLOGICAL_INSTALLED = 7, - PGLOGICAL_NODE_ALREADY_EXISTS = 8, - INVALID_WAL_LEVEL = 9, - INVALID_SHARED_PRELOAD_LIBRARY = 10, - INSUFFICIENT_MAX_REPLICATION_SLOTS = 11, - INSUFFICIENT_MAX_WAL_SENDERS = 12, - INSUFFICIENT_MAX_WORKER_PROCESSES = 13, - UNSUPPORTED_EXTENSIONS = 14, - UNSUPPORTED_MIGRATION_TYPE = 15, - INVALID_RDS_LOGICAL_REPLICATION = 16, - UNSUPPORTED_GTID_MODE = 17, - UNSUPPORTED_TABLE_DEFINITION = 18, - UNSUPPORTED_DEFINER = 19, - CANT_RESTART_RUNNING_MIGRATION = 21 - } + /** DatabaseEntityType enum. */ + enum DatabaseEntityType { + DATABASE_ENTITY_TYPE_UNSPECIFIED = 0, + DATABASE_ENTITY_TYPE_SCHEMA = 1, + DATABASE_ENTITY_TYPE_TABLE = 2, + DATABASE_ENTITY_TYPE_COLUMN = 3, + DATABASE_ENTITY_TYPE_CONSTRAINT = 4, + DATABASE_ENTITY_TYPE_INDEX = 5, + DATABASE_ENTITY_TYPE_TRIGGER = 6, + DATABASE_ENTITY_TYPE_VIEW = 7, + DATABASE_ENTITY_TYPE_SEQUENCE = 8, + DATABASE_ENTITY_TYPE_STORED_PROCEDURE = 9, + DATABASE_ENTITY_TYPE_FUNCTION = 10, + DATABASE_ENTITY_TYPE_SYNONYM = 11, + DATABASE_ENTITY_TYPE_DATABASE_PACKAGE = 12, + DATABASE_ENTITY_TYPE_UDT = 13, + DATABASE_ENTITY_TYPE_MATERIALIZED_VIEW = 14, + DATABASE_ENTITY_TYPE_DATABASE = 15 } - /** DatabaseEngine enum. */ - enum DatabaseEngine { - DATABASE_ENGINE_UNSPECIFIED = 0, - MYSQL = 1, - POSTGRESQL = 2 + /** BackgroundJobType enum. */ + enum BackgroundJobType { + BACKGROUND_JOB_TYPE_UNSPECIFIED = 0, + BACKGROUND_JOB_TYPE_SOURCE_SEED = 1, + BACKGROUND_JOB_TYPE_CONVERT = 2, + BACKGROUND_JOB_TYPE_APPLY_DESTINATION = 3, + BACKGROUND_JOB_TYPE_IMPORT_RULES_FILE = 5 } - /** DatabaseProvider enum. */ - enum DatabaseProvider { - DATABASE_PROVIDER_UNSPECIFIED = 0, - CLOUDSQL = 1, - RDS = 2 + /** ImportRulesFileFormat enum. */ + enum ImportRulesFileFormat { + IMPORT_RULES_FILE_FORMAT_UNSPECIFIED = 0, + IMPORT_RULES_FILE_FORMAT_HARBOUR_BRIDGE_SESSION_FILE = 1, + IMPORT_RULES_FILE_FORMAT_ORATOPG_CONFIG_FILE = 2 } } } @@ -9960,6 +17833,335 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a Struct. */ + interface IStruct { + + /** Struct fields */ + fields?: ({ [k: string]: google.protobuf.IValue }|null); + } + + /** Represents a Struct. */ + class Struct implements IStruct { + + /** + * Constructs a new Struct. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IStruct); + + /** Struct fields. */ + public fields: { [k: string]: google.protobuf.IValue }; + + /** + * Creates a new Struct instance using the specified properties. + * @param [properties] Properties to set + * @returns Struct instance + */ + public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; + + /** + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Struct message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Struct + * @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.protobuf.Struct; + + /** + * Decodes a Struct message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Struct + * @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.protobuf.Struct; + + /** + * Verifies a Struct 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 Struct message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Struct + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; + + /** + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @param message Struct + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Struct to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Struct + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Value. */ + interface IValue { + + /** Value nullValue */ + nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); + + /** Value numberValue */ + numberValue?: (number|null); + + /** Value stringValue */ + stringValue?: (string|null); + + /** Value boolValue */ + boolValue?: (boolean|null); + + /** Value structValue */ + structValue?: (google.protobuf.IStruct|null); + + /** Value listValue */ + listValue?: (google.protobuf.IListValue|null); + } + + /** Represents a Value. */ + class Value implements IValue { + + /** + * Constructs a new Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IValue); + + /** Value nullValue. */ + public nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); + + /** Value numberValue. */ + public numberValue?: (number|null); + + /** Value stringValue. */ + public stringValue?: (string|null); + + /** Value boolValue. */ + public boolValue?: (boolean|null); + + /** Value structValue. */ + public structValue?: (google.protobuf.IStruct|null); + + /** Value listValue. */ + public listValue?: (google.protobuf.IListValue|null); + + /** Value kind. */ + public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); + + /** + * Creates a new Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Value instance + */ + public static create(properties?: google.protobuf.IValue): google.protobuf.Value; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Value + * @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.protobuf.Value; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Value + * @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.protobuf.Value; + + /** + * Verifies a Value 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 Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Value; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @param message Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** NullValue enum. */ + enum NullValue { + NULL_VALUE = 0 + } + + /** Properties of a ListValue. */ + interface IListValue { + + /** ListValue values */ + values?: (google.protobuf.IValue[]|null); + } + + /** Represents a ListValue. */ + class ListValue implements IListValue { + + /** + * Constructs a new ListValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IListValue); + + /** ListValue values. */ + public values: google.protobuf.IValue[]; + + /** + * Creates a new ListValue instance using the specified properties. + * @param [properties] Properties to set + * @returns ListValue instance + */ + public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; + + /** + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListValue + * @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.protobuf.ListValue; + + /** + * Decodes a ListValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListValue + * @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.protobuf.ListValue; + + /** + * Verifies a ListValue 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 ListValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; + + /** + * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * @param message ListValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of an Empty. */ interface IEmpty { } diff --git a/packages/google-cloud-clouddms/protos/protos.js b/packages/google-cloud-clouddms/protos/protos.js index 54fdb3463ba..cba805a8493 100644 --- a/packages/google-cloud-clouddms/protos/protos.js +++ b/packages/google-cloud-clouddms/protos/protos.js @@ -659,817 +659,658 @@ * @variation 2 */ - return DataMigrationService; - })(); + /** + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|createPrivateConnection}. + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @typedef CreatePrivateConnectionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - v1.ListMigrationJobsRequest = (function() { + /** + * Calls CreatePrivateConnection. + * @function createPrivateConnection + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @instance + * @param {google.cloud.clouddms.v1.ICreatePrivateConnectionRequest} request CreatePrivateConnectionRequest message or plain object + * @param {google.cloud.clouddms.v1.DataMigrationService.CreatePrivateConnectionCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataMigrationService.prototype.createPrivateConnection = function createPrivateConnection(request, callback) { + return this.rpcCall(createPrivateConnection, $root.google.cloud.clouddms.v1.CreatePrivateConnectionRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreatePrivateConnection" }); /** - * Properties of a ListMigrationJobsRequest. - * @memberof google.cloud.clouddms.v1 - * @interface IListMigrationJobsRequest - * @property {string|null} [parent] ListMigrationJobsRequest parent - * @property {number|null} [pageSize] ListMigrationJobsRequest pageSize - * @property {string|null} [pageToken] ListMigrationJobsRequest pageToken - * @property {string|null} [filter] ListMigrationJobsRequest filter - * @property {string|null} [orderBy] ListMigrationJobsRequest orderBy + * Calls CreatePrivateConnection. + * @function createPrivateConnection + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @instance + * @param {google.cloud.clouddms.v1.ICreatePrivateConnectionRequest} request CreatePrivateConnectionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new ListMigrationJobsRequest. - * @memberof google.cloud.clouddms.v1 - * @classdesc Represents a ListMigrationJobsRequest. - * @implements IListMigrationJobsRequest - * @constructor - * @param {google.cloud.clouddms.v1.IListMigrationJobsRequest=} [properties] Properties to set + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|getPrivateConnection}. + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @typedef GetPrivateConnectionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.clouddms.v1.PrivateConnection} [response] PrivateConnection */ - function ListMigrationJobsRequest(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]]; - } /** - * ListMigrationJobsRequest parent. - * @member {string} parent - * @memberof google.cloud.clouddms.v1.ListMigrationJobsRequest + * Calls GetPrivateConnection. + * @function getPrivateConnection + * @memberof google.cloud.clouddms.v1.DataMigrationService * @instance + * @param {google.cloud.clouddms.v1.IGetPrivateConnectionRequest} request GetPrivateConnectionRequest message or plain object + * @param {google.cloud.clouddms.v1.DataMigrationService.GetPrivateConnectionCallback} callback Node-style callback called with the error, if any, and PrivateConnection + * @returns {undefined} + * @variation 1 */ - ListMigrationJobsRequest.prototype.parent = ""; + Object.defineProperty(DataMigrationService.prototype.getPrivateConnection = function getPrivateConnection(request, callback) { + return this.rpcCall(getPrivateConnection, $root.google.cloud.clouddms.v1.GetPrivateConnectionRequest, $root.google.cloud.clouddms.v1.PrivateConnection, request, callback); + }, "name", { value: "GetPrivateConnection" }); /** - * ListMigrationJobsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.clouddms.v1.ListMigrationJobsRequest + * Calls GetPrivateConnection. + * @function getPrivateConnection + * @memberof google.cloud.clouddms.v1.DataMigrationService * @instance + * @param {google.cloud.clouddms.v1.IGetPrivateConnectionRequest} request GetPrivateConnectionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListMigrationJobsRequest.prototype.pageSize = 0; /** - * ListMigrationJobsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.clouddms.v1.ListMigrationJobsRequest - * @instance + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|listPrivateConnections}. + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @typedef ListPrivateConnectionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.clouddms.v1.ListPrivateConnectionsResponse} [response] ListPrivateConnectionsResponse */ - ListMigrationJobsRequest.prototype.pageToken = ""; /** - * ListMigrationJobsRequest filter. - * @member {string} filter - * @memberof google.cloud.clouddms.v1.ListMigrationJobsRequest + * Calls ListPrivateConnections. + * @function listPrivateConnections + * @memberof google.cloud.clouddms.v1.DataMigrationService * @instance + * @param {google.cloud.clouddms.v1.IListPrivateConnectionsRequest} request ListPrivateConnectionsRequest message or plain object + * @param {google.cloud.clouddms.v1.DataMigrationService.ListPrivateConnectionsCallback} callback Node-style callback called with the error, if any, and ListPrivateConnectionsResponse + * @returns {undefined} + * @variation 1 */ - ListMigrationJobsRequest.prototype.filter = ""; + Object.defineProperty(DataMigrationService.prototype.listPrivateConnections = function listPrivateConnections(request, callback) { + return this.rpcCall(listPrivateConnections, $root.google.cloud.clouddms.v1.ListPrivateConnectionsRequest, $root.google.cloud.clouddms.v1.ListPrivateConnectionsResponse, request, callback); + }, "name", { value: "ListPrivateConnections" }); /** - * ListMigrationJobsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.clouddms.v1.ListMigrationJobsRequest + * Calls ListPrivateConnections. + * @function listPrivateConnections + * @memberof google.cloud.clouddms.v1.DataMigrationService * @instance + * @param {google.cloud.clouddms.v1.IListPrivateConnectionsRequest} request ListPrivateConnectionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListMigrationJobsRequest.prototype.orderBy = ""; /** - * Creates a new ListMigrationJobsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.clouddms.v1.ListMigrationJobsRequest - * @static - * @param {google.cloud.clouddms.v1.IListMigrationJobsRequest=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.ListMigrationJobsRequest} ListMigrationJobsRequest instance + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|deletePrivateConnection}. + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @typedef DeletePrivateConnectionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - ListMigrationJobsRequest.create = function create(properties) { - return new ListMigrationJobsRequest(properties); - }; /** - * Encodes the specified ListMigrationJobsRequest message. Does not implicitly {@link google.cloud.clouddms.v1.ListMigrationJobsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.clouddms.v1.ListMigrationJobsRequest - * @static - * @param {google.cloud.clouddms.v1.IListMigrationJobsRequest} message ListMigrationJobsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls DeletePrivateConnection. + * @function deletePrivateConnection + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @instance + * @param {google.cloud.clouddms.v1.IDeletePrivateConnectionRequest} request DeletePrivateConnectionRequest message or plain object + * @param {google.cloud.clouddms.v1.DataMigrationService.DeletePrivateConnectionCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - ListMigrationJobsRequest.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.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; + Object.defineProperty(DataMigrationService.prototype.deletePrivateConnection = function deletePrivateConnection(request, callback) { + return this.rpcCall(deletePrivateConnection, $root.google.cloud.clouddms.v1.DeletePrivateConnectionRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeletePrivateConnection" }); /** - * Encodes the specified ListMigrationJobsRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ListMigrationJobsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.ListMigrationJobsRequest - * @static - * @param {google.cloud.clouddms.v1.IListMigrationJobsRequest} message ListMigrationJobsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls DeletePrivateConnection. + * @function deletePrivateConnection + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @instance + * @param {google.cloud.clouddms.v1.IDeletePrivateConnectionRequest} request DeletePrivateConnectionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListMigrationJobsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a ListMigrationJobsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.clouddms.v1.ListMigrationJobsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.ListMigrationJobsRequest} ListMigrationJobsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|getConversionWorkspace}. + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @typedef GetConversionWorkspaceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.clouddms.v1.ConversionWorkspace} [response] ConversionWorkspace */ - ListMigrationJobsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.ListMigrationJobsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a ListMigrationJobsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.ListMigrationJobsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.ListMigrationJobsRequest} ListMigrationJobsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetConversionWorkspace. + * @function getConversionWorkspace + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @instance + * @param {google.cloud.clouddms.v1.IGetConversionWorkspaceRequest} request GetConversionWorkspaceRequest message or plain object + * @param {google.cloud.clouddms.v1.DataMigrationService.GetConversionWorkspaceCallback} callback Node-style callback called with the error, if any, and ConversionWorkspace + * @returns {undefined} + * @variation 1 */ - ListMigrationJobsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(DataMigrationService.prototype.getConversionWorkspace = function getConversionWorkspace(request, callback) { + return this.rpcCall(getConversionWorkspace, $root.google.cloud.clouddms.v1.GetConversionWorkspaceRequest, $root.google.cloud.clouddms.v1.ConversionWorkspace, request, callback); + }, "name", { value: "GetConversionWorkspace" }); /** - * Verifies a ListMigrationJobsRequest message. - * @function verify - * @memberof google.cloud.clouddms.v1.ListMigrationJobsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls GetConversionWorkspace. + * @function getConversionWorkspace + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @instance + * @param {google.cloud.clouddms.v1.IGetConversionWorkspaceRequest} request GetConversionWorkspaceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListMigrationJobsRequest.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.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; /** - * Creates a ListMigrationJobsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.clouddms.v1.ListMigrationJobsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.ListMigrationJobsRequest} ListMigrationJobsRequest + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|listConversionWorkspaces}. + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @typedef ListConversionWorkspacesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.clouddms.v1.ListConversionWorkspacesResponse} [response] ListConversionWorkspacesResponse */ - ListMigrationJobsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.ListMigrationJobsRequest) - return object; - var message = new $root.google.cloud.clouddms.v1.ListMigrationJobsRequest(); - 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.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; /** - * Creates a plain object from a ListMigrationJobsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.clouddms.v1.ListMigrationJobsRequest - * @static - * @param {google.cloud.clouddms.v1.ListMigrationJobsRequest} message ListMigrationJobsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListMigrationJobsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - 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.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; + * Calls ListConversionWorkspaces. + * @function listConversionWorkspaces + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @instance + * @param {google.cloud.clouddms.v1.IListConversionWorkspacesRequest} request ListConversionWorkspacesRequest message or plain object + * @param {google.cloud.clouddms.v1.DataMigrationService.ListConversionWorkspacesCallback} callback Node-style callback called with the error, if any, and ListConversionWorkspacesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataMigrationService.prototype.listConversionWorkspaces = function listConversionWorkspaces(request, callback) { + return this.rpcCall(listConversionWorkspaces, $root.google.cloud.clouddms.v1.ListConversionWorkspacesRequest, $root.google.cloud.clouddms.v1.ListConversionWorkspacesResponse, request, callback); + }, "name", { value: "ListConversionWorkspaces" }); /** - * Converts this ListMigrationJobsRequest to JSON. - * @function toJSON - * @memberof google.cloud.clouddms.v1.ListMigrationJobsRequest + * Calls ListConversionWorkspaces. + * @function listConversionWorkspaces + * @memberof google.cloud.clouddms.v1.DataMigrationService * @instance - * @returns {Object.} JSON object + * @param {google.cloud.clouddms.v1.IListConversionWorkspacesRequest} request ListConversionWorkspacesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListMigrationJobsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; /** - * Gets the default type url for ListMigrationJobsRequest - * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.ListMigrationJobsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|createConversionWorkspace}. + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @typedef CreateConversionWorkspaceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - ListMigrationJobsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.clouddms.v1.ListMigrationJobsRequest"; - }; - return ListMigrationJobsRequest; - })(); + /** + * Calls CreateConversionWorkspace. + * @function createConversionWorkspace + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @instance + * @param {google.cloud.clouddms.v1.ICreateConversionWorkspaceRequest} request CreateConversionWorkspaceRequest message or plain object + * @param {google.cloud.clouddms.v1.DataMigrationService.CreateConversionWorkspaceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataMigrationService.prototype.createConversionWorkspace = function createConversionWorkspace(request, callback) { + return this.rpcCall(createConversionWorkspace, $root.google.cloud.clouddms.v1.CreateConversionWorkspaceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateConversionWorkspace" }); - v1.ListMigrationJobsResponse = (function() { + /** + * Calls CreateConversionWorkspace. + * @function createConversionWorkspace + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @instance + * @param {google.cloud.clouddms.v1.ICreateConversionWorkspaceRequest} request CreateConversionWorkspaceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ /** - * Properties of a ListMigrationJobsResponse. - * @memberof google.cloud.clouddms.v1 - * @interface IListMigrationJobsResponse - * @property {Array.|null} [migrationJobs] ListMigrationJobsResponse migrationJobs - * @property {string|null} [nextPageToken] ListMigrationJobsResponse nextPageToken - * @property {Array.|null} [unreachable] ListMigrationJobsResponse unreachable + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|updateConversionWorkspace}. + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @typedef UpdateConversionWorkspaceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ /** - * Constructs a new ListMigrationJobsResponse. - * @memberof google.cloud.clouddms.v1 - * @classdesc Represents a ListMigrationJobsResponse. - * @implements IListMigrationJobsResponse - * @constructor - * @param {google.cloud.clouddms.v1.IListMigrationJobsResponse=} [properties] Properties to set + * Calls UpdateConversionWorkspace. + * @function updateConversionWorkspace + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @instance + * @param {google.cloud.clouddms.v1.IUpdateConversionWorkspaceRequest} request UpdateConversionWorkspaceRequest message or plain object + * @param {google.cloud.clouddms.v1.DataMigrationService.UpdateConversionWorkspaceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - function ListMigrationJobsResponse(properties) { - this.migrationJobs = []; - this.unreachable = []; - 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]]; - } + Object.defineProperty(DataMigrationService.prototype.updateConversionWorkspace = function updateConversionWorkspace(request, callback) { + return this.rpcCall(updateConversionWorkspace, $root.google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateConversionWorkspace" }); /** - * ListMigrationJobsResponse migrationJobs. - * @member {Array.} migrationJobs - * @memberof google.cloud.clouddms.v1.ListMigrationJobsResponse + * Calls UpdateConversionWorkspace. + * @function updateConversionWorkspace + * @memberof google.cloud.clouddms.v1.DataMigrationService * @instance + * @param {google.cloud.clouddms.v1.IUpdateConversionWorkspaceRequest} request UpdateConversionWorkspaceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListMigrationJobsResponse.prototype.migrationJobs = $util.emptyArray; /** - * ListMigrationJobsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.clouddms.v1.ListMigrationJobsResponse + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|deleteConversionWorkspace}. + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @typedef DeleteConversionWorkspaceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteConversionWorkspace. + * @function deleteConversionWorkspace + * @memberof google.cloud.clouddms.v1.DataMigrationService * @instance + * @param {google.cloud.clouddms.v1.IDeleteConversionWorkspaceRequest} request DeleteConversionWorkspaceRequest message or plain object + * @param {google.cloud.clouddms.v1.DataMigrationService.DeleteConversionWorkspaceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - ListMigrationJobsResponse.prototype.nextPageToken = ""; + Object.defineProperty(DataMigrationService.prototype.deleteConversionWorkspace = function deleteConversionWorkspace(request, callback) { + return this.rpcCall(deleteConversionWorkspace, $root.google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteConversionWorkspace" }); /** - * ListMigrationJobsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.clouddms.v1.ListMigrationJobsResponse + * Calls DeleteConversionWorkspace. + * @function deleteConversionWorkspace + * @memberof google.cloud.clouddms.v1.DataMigrationService * @instance + * @param {google.cloud.clouddms.v1.IDeleteConversionWorkspaceRequest} request DeleteConversionWorkspaceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListMigrationJobsResponse.prototype.unreachable = $util.emptyArray; /** - * Creates a new ListMigrationJobsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.clouddms.v1.ListMigrationJobsResponse - * @static - * @param {google.cloud.clouddms.v1.IListMigrationJobsResponse=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.ListMigrationJobsResponse} ListMigrationJobsResponse instance + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|seedConversionWorkspace}. + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @typedef SeedConversionWorkspaceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - ListMigrationJobsResponse.create = function create(properties) { - return new ListMigrationJobsResponse(properties); - }; /** - * Encodes the specified ListMigrationJobsResponse message. Does not implicitly {@link google.cloud.clouddms.v1.ListMigrationJobsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.clouddms.v1.ListMigrationJobsResponse - * @static - * @param {google.cloud.clouddms.v1.IListMigrationJobsResponse} message ListMigrationJobsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls SeedConversionWorkspace. + * @function seedConversionWorkspace + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @instance + * @param {google.cloud.clouddms.v1.ISeedConversionWorkspaceRequest} request SeedConversionWorkspaceRequest message or plain object + * @param {google.cloud.clouddms.v1.DataMigrationService.SeedConversionWorkspaceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - ListMigrationJobsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.migrationJobs != null && message.migrationJobs.length) - for (var i = 0; i < message.migrationJobs.length; ++i) - $root.google.cloud.clouddms.v1.MigrationJob.encode(message.migrationJobs[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); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); - return writer; - }; + Object.defineProperty(DataMigrationService.prototype.seedConversionWorkspace = function seedConversionWorkspace(request, callback) { + return this.rpcCall(seedConversionWorkspace, $root.google.cloud.clouddms.v1.SeedConversionWorkspaceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "SeedConversionWorkspace" }); /** - * Encodes the specified ListMigrationJobsResponse message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ListMigrationJobsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.ListMigrationJobsResponse - * @static - * @param {google.cloud.clouddms.v1.IListMigrationJobsResponse} message ListMigrationJobsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls SeedConversionWorkspace. + * @function seedConversionWorkspace + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @instance + * @param {google.cloud.clouddms.v1.ISeedConversionWorkspaceRequest} request SeedConversionWorkspaceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListMigrationJobsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a ListMigrationJobsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.clouddms.v1.ListMigrationJobsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.ListMigrationJobsResponse} ListMigrationJobsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|importMappingRules}. + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @typedef ImportMappingRulesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - ListMigrationJobsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.ListMigrationJobsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.migrationJobs && message.migrationJobs.length)) - message.migrationJobs = []; - message.migrationJobs.push($root.google.cloud.clouddms.v1.MigrationJob.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a ListMigrationJobsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.ListMigrationJobsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.ListMigrationJobsResponse} ListMigrationJobsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ImportMappingRules. + * @function importMappingRules + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @instance + * @param {google.cloud.clouddms.v1.IImportMappingRulesRequest} request ImportMappingRulesRequest message or plain object + * @param {google.cloud.clouddms.v1.DataMigrationService.ImportMappingRulesCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - ListMigrationJobsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(DataMigrationService.prototype.importMappingRules = function importMappingRules(request, callback) { + return this.rpcCall(importMappingRules, $root.google.cloud.clouddms.v1.ImportMappingRulesRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ImportMappingRules" }); /** - * Verifies a ListMigrationJobsResponse message. - * @function verify - * @memberof google.cloud.clouddms.v1.ListMigrationJobsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls ImportMappingRules. + * @function importMappingRules + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @instance + * @param {google.cloud.clouddms.v1.IImportMappingRulesRequest} request ImportMappingRulesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListMigrationJobsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.migrationJobs != null && message.hasOwnProperty("migrationJobs")) { - if (!Array.isArray(message.migrationJobs)) - return "migrationJobs: array expected"; - for (var i = 0; i < message.migrationJobs.length; ++i) { - var error = $root.google.cloud.clouddms.v1.MigrationJob.verify(message.migrationJobs[i]); - if (error) - return "migrationJobs." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } - return null; - }; /** - * Creates a ListMigrationJobsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.clouddms.v1.ListMigrationJobsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.ListMigrationJobsResponse} ListMigrationJobsResponse + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|convertConversionWorkspace}. + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @typedef ConvertConversionWorkspaceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - ListMigrationJobsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.ListMigrationJobsResponse) - return object; - var message = new $root.google.cloud.clouddms.v1.ListMigrationJobsResponse(); - if (object.migrationJobs) { - if (!Array.isArray(object.migrationJobs)) - throw TypeError(".google.cloud.clouddms.v1.ListMigrationJobsResponse.migrationJobs: array expected"); - message.migrationJobs = []; - for (var i = 0; i < object.migrationJobs.length; ++i) { - if (typeof object.migrationJobs[i] !== "object") - throw TypeError(".google.cloud.clouddms.v1.ListMigrationJobsResponse.migrationJobs: object expected"); - message.migrationJobs[i] = $root.google.cloud.clouddms.v1.MigrationJob.fromObject(object.migrationJobs[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.clouddms.v1.ListMigrationJobsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } - return message; - }; /** - * Creates a plain object from a ListMigrationJobsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.clouddms.v1.ListMigrationJobsResponse - * @static - * @param {google.cloud.clouddms.v1.ListMigrationJobsResponse} message ListMigrationJobsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls ConvertConversionWorkspace. + * @function convertConversionWorkspace + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @instance + * @param {google.cloud.clouddms.v1.IConvertConversionWorkspaceRequest} request ConvertConversionWorkspaceRequest message or plain object + * @param {google.cloud.clouddms.v1.DataMigrationService.ConvertConversionWorkspaceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - ListMigrationJobsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.migrationJobs = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.migrationJobs && message.migrationJobs.length) { - object.migrationJobs = []; - for (var j = 0; j < message.migrationJobs.length; ++j) - object.migrationJobs[j] = $root.google.cloud.clouddms.v1.MigrationJob.toObject(message.migrationJobs[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } - return object; - }; + Object.defineProperty(DataMigrationService.prototype.convertConversionWorkspace = function convertConversionWorkspace(request, callback) { + return this.rpcCall(convertConversionWorkspace, $root.google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ConvertConversionWorkspace" }); /** - * Converts this ListMigrationJobsResponse to JSON. - * @function toJSON - * @memberof google.cloud.clouddms.v1.ListMigrationJobsResponse + * Calls ConvertConversionWorkspace. + * @function convertConversionWorkspace + * @memberof google.cloud.clouddms.v1.DataMigrationService * @instance - * @returns {Object.} JSON object + * @param {google.cloud.clouddms.v1.IConvertConversionWorkspaceRequest} request ConvertConversionWorkspaceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListMigrationJobsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; /** - * Gets the default type url for ListMigrationJobsResponse - * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.ListMigrationJobsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|commitConversionWorkspace}. + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @typedef CommitConversionWorkspaceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - ListMigrationJobsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.clouddms.v1.ListMigrationJobsResponse"; - }; - return ListMigrationJobsResponse; - })(); + /** + * Calls CommitConversionWorkspace. + * @function commitConversionWorkspace + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @instance + * @param {google.cloud.clouddms.v1.ICommitConversionWorkspaceRequest} request CommitConversionWorkspaceRequest message or plain object + * @param {google.cloud.clouddms.v1.DataMigrationService.CommitConversionWorkspaceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataMigrationService.prototype.commitConversionWorkspace = function commitConversionWorkspace(request, callback) { + return this.rpcCall(commitConversionWorkspace, $root.google.cloud.clouddms.v1.CommitConversionWorkspaceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CommitConversionWorkspace" }); - v1.GetMigrationJobRequest = (function() { + /** + * Calls CommitConversionWorkspace. + * @function commitConversionWorkspace + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @instance + * @param {google.cloud.clouddms.v1.ICommitConversionWorkspaceRequest} request CommitConversionWorkspaceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ /** - * Properties of a GetMigrationJobRequest. - * @memberof google.cloud.clouddms.v1 - * @interface IGetMigrationJobRequest - * @property {string|null} [name] GetMigrationJobRequest name + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|rollbackConversionWorkspace}. + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @typedef RollbackConversionWorkspaceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ /** - * Constructs a new GetMigrationJobRequest. - * @memberof google.cloud.clouddms.v1 - * @classdesc Represents a GetMigrationJobRequest. - * @implements IGetMigrationJobRequest - * @constructor - * @param {google.cloud.clouddms.v1.IGetMigrationJobRequest=} [properties] Properties to set + * Calls RollbackConversionWorkspace. + * @function rollbackConversionWorkspace + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @instance + * @param {google.cloud.clouddms.v1.IRollbackConversionWorkspaceRequest} request RollbackConversionWorkspaceRequest message or plain object + * @param {google.cloud.clouddms.v1.DataMigrationService.RollbackConversionWorkspaceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - function GetMigrationJobRequest(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]]; - } + Object.defineProperty(DataMigrationService.prototype.rollbackConversionWorkspace = function rollbackConversionWorkspace(request, callback) { + return this.rpcCall(rollbackConversionWorkspace, $root.google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RollbackConversionWorkspace" }); /** - * GetMigrationJobRequest name. - * @member {string} name - * @memberof google.cloud.clouddms.v1.GetMigrationJobRequest + * Calls RollbackConversionWorkspace. + * @function rollbackConversionWorkspace + * @memberof google.cloud.clouddms.v1.DataMigrationService * @instance + * @param {google.cloud.clouddms.v1.IRollbackConversionWorkspaceRequest} request RollbackConversionWorkspaceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetMigrationJobRequest.prototype.name = ""; /** - * Creates a new GetMigrationJobRequest instance using the specified properties. - * @function create - * @memberof google.cloud.clouddms.v1.GetMigrationJobRequest - * @static - * @param {google.cloud.clouddms.v1.IGetMigrationJobRequest=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.GetMigrationJobRequest} GetMigrationJobRequest instance + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|applyConversionWorkspace}. + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @typedef ApplyConversionWorkspaceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - GetMigrationJobRequest.create = function create(properties) { - return new GetMigrationJobRequest(properties); - }; /** - * Encodes the specified GetMigrationJobRequest message. Does not implicitly {@link google.cloud.clouddms.v1.GetMigrationJobRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.clouddms.v1.GetMigrationJobRequest - * @static - * @param {google.cloud.clouddms.v1.IGetMigrationJobRequest} message GetMigrationJobRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ApplyConversionWorkspace. + * @function applyConversionWorkspace + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @instance + * @param {google.cloud.clouddms.v1.IApplyConversionWorkspaceRequest} request ApplyConversionWorkspaceRequest message or plain object + * @param {google.cloud.clouddms.v1.DataMigrationService.ApplyConversionWorkspaceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - GetMigrationJobRequest.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; - }; + Object.defineProperty(DataMigrationService.prototype.applyConversionWorkspace = function applyConversionWorkspace(request, callback) { + return this.rpcCall(applyConversionWorkspace, $root.google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ApplyConversionWorkspace" }); /** - * Encodes the specified GetMigrationJobRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.GetMigrationJobRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.GetMigrationJobRequest - * @static - * @param {google.cloud.clouddms.v1.IGetMigrationJobRequest} message GetMigrationJobRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ApplyConversionWorkspace. + * @function applyConversionWorkspace + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @instance + * @param {google.cloud.clouddms.v1.IApplyConversionWorkspaceRequest} request ApplyConversionWorkspaceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetMigrationJobRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a GetMigrationJobRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.clouddms.v1.GetMigrationJobRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.GetMigrationJobRequest} GetMigrationJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|describeDatabaseEntities}. + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @typedef DescribeDatabaseEntitiesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse} [response] DescribeDatabaseEntitiesResponse */ - GetMigrationJobRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.GetMigrationJobRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a GetMigrationJobRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.GetMigrationJobRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.GetMigrationJobRequest} GetMigrationJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DescribeDatabaseEntities. + * @function describeDatabaseEntities + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @instance + * @param {google.cloud.clouddms.v1.IDescribeDatabaseEntitiesRequest} request DescribeDatabaseEntitiesRequest message or plain object + * @param {google.cloud.clouddms.v1.DataMigrationService.DescribeDatabaseEntitiesCallback} callback Node-style callback called with the error, if any, and DescribeDatabaseEntitiesResponse + * @returns {undefined} + * @variation 1 */ - GetMigrationJobRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(DataMigrationService.prototype.describeDatabaseEntities = function describeDatabaseEntities(request, callback) { + return this.rpcCall(describeDatabaseEntities, $root.google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest, $root.google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse, request, callback); + }, "name", { value: "DescribeDatabaseEntities" }); /** - * Verifies a GetMigrationJobRequest message. - * @function verify - * @memberof google.cloud.clouddms.v1.GetMigrationJobRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls DescribeDatabaseEntities. + * @function describeDatabaseEntities + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @instance + * @param {google.cloud.clouddms.v1.IDescribeDatabaseEntitiesRequest} request DescribeDatabaseEntitiesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetMigrationJobRequest.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 GetMigrationJobRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.clouddms.v1.GetMigrationJobRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.GetMigrationJobRequest} GetMigrationJobRequest + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|searchBackgroundJobs}. + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @typedef SearchBackgroundJobsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.clouddms.v1.SearchBackgroundJobsResponse} [response] SearchBackgroundJobsResponse */ - GetMigrationJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.GetMigrationJobRequest) - return object; - var message = new $root.google.cloud.clouddms.v1.GetMigrationJobRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; /** - * Creates a plain object from a GetMigrationJobRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.clouddms.v1.GetMigrationJobRequest - * @static - * @param {google.cloud.clouddms.v1.GetMigrationJobRequest} message GetMigrationJobRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls SearchBackgroundJobs. + * @function searchBackgroundJobs + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @instance + * @param {google.cloud.clouddms.v1.ISearchBackgroundJobsRequest} request SearchBackgroundJobsRequest message or plain object + * @param {google.cloud.clouddms.v1.DataMigrationService.SearchBackgroundJobsCallback} callback Node-style callback called with the error, if any, and SearchBackgroundJobsResponse + * @returns {undefined} + * @variation 1 */ - GetMigrationJobRequest.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; - }; + Object.defineProperty(DataMigrationService.prototype.searchBackgroundJobs = function searchBackgroundJobs(request, callback) { + return this.rpcCall(searchBackgroundJobs, $root.google.cloud.clouddms.v1.SearchBackgroundJobsRequest, $root.google.cloud.clouddms.v1.SearchBackgroundJobsResponse, request, callback); + }, "name", { value: "SearchBackgroundJobs" }); /** - * Converts this GetMigrationJobRequest to JSON. - * @function toJSON - * @memberof google.cloud.clouddms.v1.GetMigrationJobRequest + * Calls SearchBackgroundJobs. + * @function searchBackgroundJobs + * @memberof google.cloud.clouddms.v1.DataMigrationService * @instance - * @returns {Object.} JSON object + * @param {google.cloud.clouddms.v1.ISearchBackgroundJobsRequest} request SearchBackgroundJobsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetMigrationJobRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; /** - * Gets the default type url for GetMigrationJobRequest - * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.GetMigrationJobRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|describeConversionWorkspaceRevisions}. + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @typedef DescribeConversionWorkspaceRevisionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse} [response] DescribeConversionWorkspaceRevisionsResponse */ - GetMigrationJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.clouddms.v1.GetMigrationJobRequest"; - }; - return GetMigrationJobRequest; + /** + * Calls DescribeConversionWorkspaceRevisions. + * @function describeConversionWorkspaceRevisions + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @instance + * @param {google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsRequest} request DescribeConversionWorkspaceRevisionsRequest message or plain object + * @param {google.cloud.clouddms.v1.DataMigrationService.DescribeConversionWorkspaceRevisionsCallback} callback Node-style callback called with the error, if any, and DescribeConversionWorkspaceRevisionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataMigrationService.prototype.describeConversionWorkspaceRevisions = function describeConversionWorkspaceRevisions(request, callback) { + return this.rpcCall(describeConversionWorkspaceRevisions, $root.google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest, $root.google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse, request, callback); + }, "name", { value: "DescribeConversionWorkspaceRevisions" }); + + /** + * Calls DescribeConversionWorkspaceRevisions. + * @function describeConversionWorkspaceRevisions + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @instance + * @param {google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsRequest} request DescribeConversionWorkspaceRevisionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.clouddms.v1.DataMigrationService|fetchStaticIps}. + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @typedef FetchStaticIpsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.clouddms.v1.FetchStaticIpsResponse} [response] FetchStaticIpsResponse + */ + + /** + * Calls FetchStaticIps. + * @function fetchStaticIps + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @instance + * @param {google.cloud.clouddms.v1.IFetchStaticIpsRequest} request FetchStaticIpsRequest message or plain object + * @param {google.cloud.clouddms.v1.DataMigrationService.FetchStaticIpsCallback} callback Node-style callback called with the error, if any, and FetchStaticIpsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataMigrationService.prototype.fetchStaticIps = function fetchStaticIps(request, callback) { + return this.rpcCall(fetchStaticIps, $root.google.cloud.clouddms.v1.FetchStaticIpsRequest, $root.google.cloud.clouddms.v1.FetchStaticIpsResponse, request, callback); + }, "name", { value: "FetchStaticIps" }); + + /** + * Calls FetchStaticIps. + * @function fetchStaticIps + * @memberof google.cloud.clouddms.v1.DataMigrationService + * @instance + * @param {google.cloud.clouddms.v1.IFetchStaticIpsRequest} request FetchStaticIpsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return DataMigrationService; })(); - v1.CreateMigrationJobRequest = (function() { + v1.ListMigrationJobsRequest = (function() { /** - * Properties of a CreateMigrationJobRequest. + * Properties of a ListMigrationJobsRequest. * @memberof google.cloud.clouddms.v1 - * @interface ICreateMigrationJobRequest - * @property {string|null} [parent] CreateMigrationJobRequest parent - * @property {string|null} [migrationJobId] CreateMigrationJobRequest migrationJobId - * @property {google.cloud.clouddms.v1.IMigrationJob|null} [migrationJob] CreateMigrationJobRequest migrationJob - * @property {string|null} [requestId] CreateMigrationJobRequest requestId + * @interface IListMigrationJobsRequest + * @property {string|null} [parent] ListMigrationJobsRequest parent + * @property {number|null} [pageSize] ListMigrationJobsRequest pageSize + * @property {string|null} [pageToken] ListMigrationJobsRequest pageToken + * @property {string|null} [filter] ListMigrationJobsRequest filter + * @property {string|null} [orderBy] ListMigrationJobsRequest orderBy */ /** - * Constructs a new CreateMigrationJobRequest. + * Constructs a new ListMigrationJobsRequest. * @memberof google.cloud.clouddms.v1 - * @classdesc Represents a CreateMigrationJobRequest. - * @implements ICreateMigrationJobRequest + * @classdesc Represents a ListMigrationJobsRequest. + * @implements IListMigrationJobsRequest * @constructor - * @param {google.cloud.clouddms.v1.ICreateMigrationJobRequest=} [properties] Properties to set + * @param {google.cloud.clouddms.v1.IListMigrationJobsRequest=} [properties] Properties to set */ - function CreateMigrationJobRequest(properties) { + function ListMigrationJobsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1477,100 +1318,110 @@ } /** - * CreateMigrationJobRequest parent. + * ListMigrationJobsRequest parent. * @member {string} parent - * @memberof google.cloud.clouddms.v1.CreateMigrationJobRequest + * @memberof google.cloud.clouddms.v1.ListMigrationJobsRequest * @instance */ - CreateMigrationJobRequest.prototype.parent = ""; + ListMigrationJobsRequest.prototype.parent = ""; /** - * CreateMigrationJobRequest migrationJobId. - * @member {string} migrationJobId - * @memberof google.cloud.clouddms.v1.CreateMigrationJobRequest + * ListMigrationJobsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.clouddms.v1.ListMigrationJobsRequest * @instance */ - CreateMigrationJobRequest.prototype.migrationJobId = ""; + ListMigrationJobsRequest.prototype.pageSize = 0; /** - * CreateMigrationJobRequest migrationJob. - * @member {google.cloud.clouddms.v1.IMigrationJob|null|undefined} migrationJob - * @memberof google.cloud.clouddms.v1.CreateMigrationJobRequest + * ListMigrationJobsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.clouddms.v1.ListMigrationJobsRequest * @instance */ - CreateMigrationJobRequest.prototype.migrationJob = null; + ListMigrationJobsRequest.prototype.pageToken = ""; /** - * CreateMigrationJobRequest requestId. - * @member {string} requestId - * @memberof google.cloud.clouddms.v1.CreateMigrationJobRequest + * ListMigrationJobsRequest filter. + * @member {string} filter + * @memberof google.cloud.clouddms.v1.ListMigrationJobsRequest * @instance */ - CreateMigrationJobRequest.prototype.requestId = ""; + ListMigrationJobsRequest.prototype.filter = ""; /** - * Creates a new CreateMigrationJobRequest instance using the specified properties. + * ListMigrationJobsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.clouddms.v1.ListMigrationJobsRequest + * @instance + */ + ListMigrationJobsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListMigrationJobsRequest instance using the specified properties. * @function create - * @memberof google.cloud.clouddms.v1.CreateMigrationJobRequest + * @memberof google.cloud.clouddms.v1.ListMigrationJobsRequest * @static - * @param {google.cloud.clouddms.v1.ICreateMigrationJobRequest=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.CreateMigrationJobRequest} CreateMigrationJobRequest instance + * @param {google.cloud.clouddms.v1.IListMigrationJobsRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.ListMigrationJobsRequest} ListMigrationJobsRequest instance */ - CreateMigrationJobRequest.create = function create(properties) { - return new CreateMigrationJobRequest(properties); + ListMigrationJobsRequest.create = function create(properties) { + return new ListMigrationJobsRequest(properties); }; /** - * Encodes the specified CreateMigrationJobRequest message. Does not implicitly {@link google.cloud.clouddms.v1.CreateMigrationJobRequest.verify|verify} messages. + * Encodes the specified ListMigrationJobsRequest message. Does not implicitly {@link google.cloud.clouddms.v1.ListMigrationJobsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.clouddms.v1.CreateMigrationJobRequest + * @memberof google.cloud.clouddms.v1.ListMigrationJobsRequest * @static - * @param {google.cloud.clouddms.v1.ICreateMigrationJobRequest} message CreateMigrationJobRequest message or plain object to encode + * @param {google.cloud.clouddms.v1.IListMigrationJobsRequest} message ListMigrationJobsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateMigrationJobRequest.encode = function encode(message, writer) { + ListMigrationJobsRequest.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.migrationJobId != null && Object.hasOwnProperty.call(message, "migrationJobId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.migrationJobId); - if (message.migrationJob != null && Object.hasOwnProperty.call(message, "migrationJob")) - $root.google.cloud.clouddms.v1.MigrationJob.encode(message.migrationJob, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + 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.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified CreateMigrationJobRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.CreateMigrationJobRequest.verify|verify} messages. + * Encodes the specified ListMigrationJobsRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ListMigrationJobsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.CreateMigrationJobRequest + * @memberof google.cloud.clouddms.v1.ListMigrationJobsRequest * @static - * @param {google.cloud.clouddms.v1.ICreateMigrationJobRequest} message CreateMigrationJobRequest message or plain object to encode + * @param {google.cloud.clouddms.v1.IListMigrationJobsRequest} message ListMigrationJobsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateMigrationJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListMigrationJobsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateMigrationJobRequest message from the specified reader or buffer. + * Decodes a ListMigrationJobsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.clouddms.v1.CreateMigrationJobRequest + * @memberof google.cloud.clouddms.v1.ListMigrationJobsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.CreateMigrationJobRequest} CreateMigrationJobRequest + * @returns {google.cloud.clouddms.v1.ListMigrationJobsRequest} ListMigrationJobsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateMigrationJobRequest.decode = function decode(reader, length) { + ListMigrationJobsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.CreateMigrationJobRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.ListMigrationJobsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -1579,15 +1430,19 @@ break; } case 2: { - message.migrationJobId = reader.string(); + message.pageSize = reader.int32(); break; } case 3: { - message.migrationJob = $root.google.cloud.clouddms.v1.MigrationJob.decode(reader, reader.uint32()); + message.pageToken = reader.string(); break; } case 4: { - message.requestId = reader.string(); + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); break; } default: @@ -1599,154 +1454,159 @@ }; /** - * Decodes a CreateMigrationJobRequest message from the specified reader or buffer, length delimited. + * Decodes a ListMigrationJobsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.CreateMigrationJobRequest + * @memberof google.cloud.clouddms.v1.ListMigrationJobsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.CreateMigrationJobRequest} CreateMigrationJobRequest + * @returns {google.cloud.clouddms.v1.ListMigrationJobsRequest} ListMigrationJobsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateMigrationJobRequest.decodeDelimited = function decodeDelimited(reader) { + ListMigrationJobsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateMigrationJobRequest message. + * Verifies a ListMigrationJobsRequest message. * @function verify - * @memberof google.cloud.clouddms.v1.CreateMigrationJobRequest + * @memberof google.cloud.clouddms.v1.ListMigrationJobsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateMigrationJobRequest.verify = function verify(message) { + ListMigrationJobsRequest.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.migrationJobId != null && message.hasOwnProperty("migrationJobId")) - if (!$util.isString(message.migrationJobId)) - return "migrationJobId: string expected"; - if (message.migrationJob != null && message.hasOwnProperty("migrationJob")) { - var error = $root.google.cloud.clouddms.v1.MigrationJob.verify(message.migrationJob); - if (error) - return "migrationJob." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates a CreateMigrationJobRequest message from a plain object. Also converts values to their respective internal types. + 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.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListMigrationJobsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.clouddms.v1.CreateMigrationJobRequest + * @memberof google.cloud.clouddms.v1.ListMigrationJobsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.CreateMigrationJobRequest} CreateMigrationJobRequest + * @returns {google.cloud.clouddms.v1.ListMigrationJobsRequest} ListMigrationJobsRequest */ - CreateMigrationJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.CreateMigrationJobRequest) + ListMigrationJobsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.ListMigrationJobsRequest) return object; - var message = new $root.google.cloud.clouddms.v1.CreateMigrationJobRequest(); + var message = new $root.google.cloud.clouddms.v1.ListMigrationJobsRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.migrationJobId != null) - message.migrationJobId = String(object.migrationJobId); - if (object.migrationJob != null) { - if (typeof object.migrationJob !== "object") - throw TypeError(".google.cloud.clouddms.v1.CreateMigrationJobRequest.migrationJob: object expected"); - message.migrationJob = $root.google.cloud.clouddms.v1.MigrationJob.fromObject(object.migrationJob); - } - if (object.requestId != null) - message.requestId = String(object.requestId); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); return message; }; /** - * Creates a plain object from a CreateMigrationJobRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListMigrationJobsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.clouddms.v1.CreateMigrationJobRequest + * @memberof google.cloud.clouddms.v1.ListMigrationJobsRequest * @static - * @param {google.cloud.clouddms.v1.CreateMigrationJobRequest} message CreateMigrationJobRequest + * @param {google.cloud.clouddms.v1.ListMigrationJobsRequest} message ListMigrationJobsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateMigrationJobRequest.toObject = function toObject(message, options) { + ListMigrationJobsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.migrationJobId = ""; - object.migrationJob = null; - object.requestId = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.migrationJobId != null && message.hasOwnProperty("migrationJobId")) - object.migrationJobId = message.migrationJobId; - if (message.migrationJob != null && message.hasOwnProperty("migrationJob")) - object.migrationJob = $root.google.cloud.clouddms.v1.MigrationJob.toObject(message.migrationJob, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; return object; }; /** - * Converts this CreateMigrationJobRequest to JSON. + * Converts this ListMigrationJobsRequest to JSON. * @function toJSON - * @memberof google.cloud.clouddms.v1.CreateMigrationJobRequest + * @memberof google.cloud.clouddms.v1.ListMigrationJobsRequest * @instance * @returns {Object.} JSON object */ - CreateMigrationJobRequest.prototype.toJSON = function toJSON() { + ListMigrationJobsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateMigrationJobRequest + * Gets the default type url for ListMigrationJobsRequest * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.CreateMigrationJobRequest + * @memberof google.cloud.clouddms.v1.ListMigrationJobsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateMigrationJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListMigrationJobsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.clouddms.v1.CreateMigrationJobRequest"; + return typeUrlPrefix + "/google.cloud.clouddms.v1.ListMigrationJobsRequest"; }; - return CreateMigrationJobRequest; + return ListMigrationJobsRequest; })(); - v1.UpdateMigrationJobRequest = (function() { + v1.ListMigrationJobsResponse = (function() { /** - * Properties of an UpdateMigrationJobRequest. + * Properties of a ListMigrationJobsResponse. * @memberof google.cloud.clouddms.v1 - * @interface IUpdateMigrationJobRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateMigrationJobRequest updateMask - * @property {google.cloud.clouddms.v1.IMigrationJob|null} [migrationJob] UpdateMigrationJobRequest migrationJob - * @property {string|null} [requestId] UpdateMigrationJobRequest requestId + * @interface IListMigrationJobsResponse + * @property {Array.|null} [migrationJobs] ListMigrationJobsResponse migrationJobs + * @property {string|null} [nextPageToken] ListMigrationJobsResponse nextPageToken + * @property {Array.|null} [unreachable] ListMigrationJobsResponse unreachable */ /** - * Constructs a new UpdateMigrationJobRequest. + * Constructs a new ListMigrationJobsResponse. * @memberof google.cloud.clouddms.v1 - * @classdesc Represents an UpdateMigrationJobRequest. - * @implements IUpdateMigrationJobRequest + * @classdesc Represents a ListMigrationJobsResponse. + * @implements IListMigrationJobsResponse * @constructor - * @param {google.cloud.clouddms.v1.IUpdateMigrationJobRequest=} [properties] Properties to set + * @param {google.cloud.clouddms.v1.IListMigrationJobsResponse=} [properties] Properties to set */ - function UpdateMigrationJobRequest(properties) { + function ListMigrationJobsResponse(properties) { + this.migrationJobs = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1754,103 +1614,109 @@ } /** - * UpdateMigrationJobRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.clouddms.v1.UpdateMigrationJobRequest + * ListMigrationJobsResponse migrationJobs. + * @member {Array.} migrationJobs + * @memberof google.cloud.clouddms.v1.ListMigrationJobsResponse * @instance */ - UpdateMigrationJobRequest.prototype.updateMask = null; + ListMigrationJobsResponse.prototype.migrationJobs = $util.emptyArray; /** - * UpdateMigrationJobRequest migrationJob. - * @member {google.cloud.clouddms.v1.IMigrationJob|null|undefined} migrationJob - * @memberof google.cloud.clouddms.v1.UpdateMigrationJobRequest + * ListMigrationJobsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.clouddms.v1.ListMigrationJobsResponse * @instance */ - UpdateMigrationJobRequest.prototype.migrationJob = null; + ListMigrationJobsResponse.prototype.nextPageToken = ""; /** - * UpdateMigrationJobRequest requestId. - * @member {string} requestId - * @memberof google.cloud.clouddms.v1.UpdateMigrationJobRequest + * ListMigrationJobsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.clouddms.v1.ListMigrationJobsResponse * @instance */ - UpdateMigrationJobRequest.prototype.requestId = ""; + ListMigrationJobsResponse.prototype.unreachable = $util.emptyArray; /** - * Creates a new UpdateMigrationJobRequest instance using the specified properties. + * Creates a new ListMigrationJobsResponse instance using the specified properties. * @function create - * @memberof google.cloud.clouddms.v1.UpdateMigrationJobRequest + * @memberof google.cloud.clouddms.v1.ListMigrationJobsResponse * @static - * @param {google.cloud.clouddms.v1.IUpdateMigrationJobRequest=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.UpdateMigrationJobRequest} UpdateMigrationJobRequest instance + * @param {google.cloud.clouddms.v1.IListMigrationJobsResponse=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.ListMigrationJobsResponse} ListMigrationJobsResponse instance */ - UpdateMigrationJobRequest.create = function create(properties) { - return new UpdateMigrationJobRequest(properties); + ListMigrationJobsResponse.create = function create(properties) { + return new ListMigrationJobsResponse(properties); }; /** - * Encodes the specified UpdateMigrationJobRequest message. Does not implicitly {@link google.cloud.clouddms.v1.UpdateMigrationJobRequest.verify|verify} messages. + * Encodes the specified ListMigrationJobsResponse message. Does not implicitly {@link google.cloud.clouddms.v1.ListMigrationJobsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.clouddms.v1.UpdateMigrationJobRequest + * @memberof google.cloud.clouddms.v1.ListMigrationJobsResponse * @static - * @param {google.cloud.clouddms.v1.IUpdateMigrationJobRequest} message UpdateMigrationJobRequest message or plain object to encode + * @param {google.cloud.clouddms.v1.IListMigrationJobsResponse} message ListMigrationJobsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateMigrationJobRequest.encode = function encode(message, writer) { + ListMigrationJobsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.migrationJob != null && Object.hasOwnProperty.call(message, "migrationJob")) - $root.google.cloud.clouddms.v1.MigrationJob.encode(message.migrationJob, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + if (message.migrationJobs != null && message.migrationJobs.length) + for (var i = 0; i < message.migrationJobs.length; ++i) + $root.google.cloud.clouddms.v1.MigrationJob.encode(message.migrationJobs[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); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); return writer; }; /** - * Encodes the specified UpdateMigrationJobRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.UpdateMigrationJobRequest.verify|verify} messages. + * Encodes the specified ListMigrationJobsResponse message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ListMigrationJobsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.UpdateMigrationJobRequest + * @memberof google.cloud.clouddms.v1.ListMigrationJobsResponse * @static - * @param {google.cloud.clouddms.v1.IUpdateMigrationJobRequest} message UpdateMigrationJobRequest message or plain object to encode + * @param {google.cloud.clouddms.v1.IListMigrationJobsResponse} message ListMigrationJobsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateMigrationJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListMigrationJobsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateMigrationJobRequest message from the specified reader or buffer. + * Decodes a ListMigrationJobsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.clouddms.v1.UpdateMigrationJobRequest + * @memberof google.cloud.clouddms.v1.ListMigrationJobsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.UpdateMigrationJobRequest} UpdateMigrationJobRequest + * @returns {google.cloud.clouddms.v1.ListMigrationJobsResponse} ListMigrationJobsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateMigrationJobRequest.decode = function decode(reader, length) { + ListMigrationJobsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.UpdateMigrationJobRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.ListMigrationJobsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + if (!(message.migrationJobs && message.migrationJobs.length)) + message.migrationJobs = []; + message.migrationJobs.push($root.google.cloud.clouddms.v1.MigrationJob.decode(reader, reader.uint32())); break; } case 2: { - message.migrationJob = $root.google.cloud.clouddms.v1.MigrationJob.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; } case 3: { - message.requestId = reader.string(); + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); break; } default: @@ -1862,151 +1728,169 @@ }; /** - * Decodes an UpdateMigrationJobRequest message from the specified reader or buffer, length delimited. + * Decodes a ListMigrationJobsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.UpdateMigrationJobRequest + * @memberof google.cloud.clouddms.v1.ListMigrationJobsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.UpdateMigrationJobRequest} UpdateMigrationJobRequest + * @returns {google.cloud.clouddms.v1.ListMigrationJobsResponse} ListMigrationJobsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateMigrationJobRequest.decodeDelimited = function decodeDelimited(reader) { + ListMigrationJobsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateMigrationJobRequest message. + * Verifies a ListMigrationJobsResponse message. * @function verify - * @memberof google.cloud.clouddms.v1.UpdateMigrationJobRequest + * @memberof google.cloud.clouddms.v1.ListMigrationJobsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateMigrationJobRequest.verify = function verify(message) { + ListMigrationJobsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.migrationJobs != null && message.hasOwnProperty("migrationJobs")) { + if (!Array.isArray(message.migrationJobs)) + return "migrationJobs: array expected"; + for (var i = 0; i < message.migrationJobs.length; ++i) { + var error = $root.google.cloud.clouddms.v1.MigrationJob.verify(message.migrationJobs[i]); + if (error) + return "migrationJobs." + error; + } } - if (message.migrationJob != null && message.hasOwnProperty("migrationJob")) { - var error = $root.google.cloud.clouddms.v1.MigrationJob.verify(message.migrationJob); - if (error) - return "migrationJob." + error; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; return null; }; /** - * Creates an UpdateMigrationJobRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListMigrationJobsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.clouddms.v1.UpdateMigrationJobRequest + * @memberof google.cloud.clouddms.v1.ListMigrationJobsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.UpdateMigrationJobRequest} UpdateMigrationJobRequest + * @returns {google.cloud.clouddms.v1.ListMigrationJobsResponse} ListMigrationJobsResponse */ - UpdateMigrationJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.UpdateMigrationJobRequest) + ListMigrationJobsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.ListMigrationJobsResponse) return object; - var message = new $root.google.cloud.clouddms.v1.UpdateMigrationJobRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.clouddms.v1.UpdateMigrationJobRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.clouddms.v1.ListMigrationJobsResponse(); + if (object.migrationJobs) { + if (!Array.isArray(object.migrationJobs)) + throw TypeError(".google.cloud.clouddms.v1.ListMigrationJobsResponse.migrationJobs: array expected"); + message.migrationJobs = []; + for (var i = 0; i < object.migrationJobs.length; ++i) { + if (typeof object.migrationJobs[i] !== "object") + throw TypeError(".google.cloud.clouddms.v1.ListMigrationJobsResponse.migrationJobs: object expected"); + message.migrationJobs[i] = $root.google.cloud.clouddms.v1.MigrationJob.fromObject(object.migrationJobs[i]); + } } - if (object.migrationJob != null) { - if (typeof object.migrationJob !== "object") - throw TypeError(".google.cloud.clouddms.v1.UpdateMigrationJobRequest.migrationJob: object expected"); - message.migrationJob = $root.google.cloud.clouddms.v1.MigrationJob.fromObject(object.migrationJob); + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.clouddms.v1.ListMigrationJobsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); } - if (object.requestId != null) - message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from an UpdateMigrationJobRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListMigrationJobsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.clouddms.v1.UpdateMigrationJobRequest + * @memberof google.cloud.clouddms.v1.ListMigrationJobsResponse * @static - * @param {google.cloud.clouddms.v1.UpdateMigrationJobRequest} message UpdateMigrationJobRequest + * @param {google.cloud.clouddms.v1.ListMigrationJobsResponse} message ListMigrationJobsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateMigrationJobRequest.toObject = function toObject(message, options) { + ListMigrationJobsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.updateMask = null; - object.migrationJob = null; - object.requestId = ""; + if (options.arrays || options.defaults) { + object.migrationJobs = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.migrationJobs && message.migrationJobs.length) { + object.migrationJobs = []; + for (var j = 0; j < message.migrationJobs.length; ++j) + object.migrationJobs[j] = $root.google.cloud.clouddms.v1.MigrationJob.toObject(message.migrationJobs[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.migrationJob != null && message.hasOwnProperty("migrationJob")) - object.migrationJob = $root.google.cloud.clouddms.v1.MigrationJob.toObject(message.migrationJob, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; return object; }; /** - * Converts this UpdateMigrationJobRequest to JSON. + * Converts this ListMigrationJobsResponse to JSON. * @function toJSON - * @memberof google.cloud.clouddms.v1.UpdateMigrationJobRequest + * @memberof google.cloud.clouddms.v1.ListMigrationJobsResponse * @instance * @returns {Object.} JSON object */ - UpdateMigrationJobRequest.prototype.toJSON = function toJSON() { + ListMigrationJobsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateMigrationJobRequest + * Gets the default type url for ListMigrationJobsResponse * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.UpdateMigrationJobRequest + * @memberof google.cloud.clouddms.v1.ListMigrationJobsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateMigrationJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListMigrationJobsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.clouddms.v1.UpdateMigrationJobRequest"; + return typeUrlPrefix + "/google.cloud.clouddms.v1.ListMigrationJobsResponse"; }; - return UpdateMigrationJobRequest; + return ListMigrationJobsResponse; })(); - v1.DeleteMigrationJobRequest = (function() { + v1.GetMigrationJobRequest = (function() { /** - * Properties of a DeleteMigrationJobRequest. + * Properties of a GetMigrationJobRequest. * @memberof google.cloud.clouddms.v1 - * @interface IDeleteMigrationJobRequest - * @property {string|null} [name] DeleteMigrationJobRequest name - * @property {string|null} [requestId] DeleteMigrationJobRequest requestId - * @property {boolean|null} [force] DeleteMigrationJobRequest force + * @interface IGetMigrationJobRequest + * @property {string|null} [name] GetMigrationJobRequest name */ /** - * Constructs a new DeleteMigrationJobRequest. + * Constructs a new GetMigrationJobRequest. * @memberof google.cloud.clouddms.v1 - * @classdesc Represents a DeleteMigrationJobRequest. - * @implements IDeleteMigrationJobRequest + * @classdesc Represents a GetMigrationJobRequest. + * @implements IGetMigrationJobRequest * @constructor - * @param {google.cloud.clouddms.v1.IDeleteMigrationJobRequest=} [properties] Properties to set + * @param {google.cloud.clouddms.v1.IGetMigrationJobRequest=} [properties] Properties to set */ - function DeleteMigrationJobRequest(properties) { + function GetMigrationJobRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2014,90 +1898,70 @@ } /** - * DeleteMigrationJobRequest name. + * GetMigrationJobRequest name. * @member {string} name - * @memberof google.cloud.clouddms.v1.DeleteMigrationJobRequest - * @instance - */ - DeleteMigrationJobRequest.prototype.name = ""; - - /** - * DeleteMigrationJobRequest requestId. - * @member {string} requestId - * @memberof google.cloud.clouddms.v1.DeleteMigrationJobRequest - * @instance - */ - DeleteMigrationJobRequest.prototype.requestId = ""; - - /** - * DeleteMigrationJobRequest force. - * @member {boolean} force - * @memberof google.cloud.clouddms.v1.DeleteMigrationJobRequest + * @memberof google.cloud.clouddms.v1.GetMigrationJobRequest * @instance */ - DeleteMigrationJobRequest.prototype.force = false; + GetMigrationJobRequest.prototype.name = ""; /** - * Creates a new DeleteMigrationJobRequest instance using the specified properties. + * Creates a new GetMigrationJobRequest instance using the specified properties. * @function create - * @memberof google.cloud.clouddms.v1.DeleteMigrationJobRequest + * @memberof google.cloud.clouddms.v1.GetMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.IDeleteMigrationJobRequest=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.DeleteMigrationJobRequest} DeleteMigrationJobRequest instance + * @param {google.cloud.clouddms.v1.IGetMigrationJobRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.GetMigrationJobRequest} GetMigrationJobRequest instance */ - DeleteMigrationJobRequest.create = function create(properties) { - return new DeleteMigrationJobRequest(properties); + GetMigrationJobRequest.create = function create(properties) { + return new GetMigrationJobRequest(properties); }; /** - * Encodes the specified DeleteMigrationJobRequest message. Does not implicitly {@link google.cloud.clouddms.v1.DeleteMigrationJobRequest.verify|verify} messages. + * Encodes the specified GetMigrationJobRequest message. Does not implicitly {@link google.cloud.clouddms.v1.GetMigrationJobRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.clouddms.v1.DeleteMigrationJobRequest + * @memberof google.cloud.clouddms.v1.GetMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.IDeleteMigrationJobRequest} message DeleteMigrationJobRequest message or plain object to encode + * @param {google.cloud.clouddms.v1.IGetMigrationJobRequest} message GetMigrationJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteMigrationJobRequest.encode = function encode(message, writer) { + GetMigrationJobRequest.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.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); return writer; }; /** - * Encodes the specified DeleteMigrationJobRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.DeleteMigrationJobRequest.verify|verify} messages. + * Encodes the specified GetMigrationJobRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.GetMigrationJobRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.DeleteMigrationJobRequest + * @memberof google.cloud.clouddms.v1.GetMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.IDeleteMigrationJobRequest} message DeleteMigrationJobRequest message or plain object to encode + * @param {google.cloud.clouddms.v1.IGetMigrationJobRequest} message GetMigrationJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteMigrationJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetMigrationJobRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteMigrationJobRequest message from the specified reader or buffer. + * Decodes a GetMigrationJobRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.clouddms.v1.DeleteMigrationJobRequest + * @memberof google.cloud.clouddms.v1.GetMigrationJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.DeleteMigrationJobRequest} DeleteMigrationJobRequest + * @returns {google.cloud.clouddms.v1.GetMigrationJobRequest} GetMigrationJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteMigrationJobRequest.decode = function decode(reader, length) { + GetMigrationJobRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.DeleteMigrationJobRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.GetMigrationJobRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -2105,14 +1969,6 @@ message.name = reader.string(); break; } - case 2: { - message.requestId = reader.string(); - break; - } - case 3: { - message.force = reader.bool(); - break; - } default: reader.skipType(tag & 7); break; @@ -2122,139 +1978,125 @@ }; /** - * Decodes a DeleteMigrationJobRequest message from the specified reader or buffer, length delimited. + * Decodes a GetMigrationJobRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.DeleteMigrationJobRequest + * @memberof google.cloud.clouddms.v1.GetMigrationJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.DeleteMigrationJobRequest} DeleteMigrationJobRequest + * @returns {google.cloud.clouddms.v1.GetMigrationJobRequest} GetMigrationJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteMigrationJobRequest.decodeDelimited = function decodeDelimited(reader) { + GetMigrationJobRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteMigrationJobRequest message. + * Verifies a GetMigrationJobRequest message. * @function verify - * @memberof google.cloud.clouddms.v1.DeleteMigrationJobRequest + * @memberof google.cloud.clouddms.v1.GetMigrationJobRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteMigrationJobRequest.verify = function verify(message) { + GetMigrationJobRequest.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.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; return null; }; /** - * Creates a DeleteMigrationJobRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetMigrationJobRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.clouddms.v1.DeleteMigrationJobRequest + * @memberof google.cloud.clouddms.v1.GetMigrationJobRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.DeleteMigrationJobRequest} DeleteMigrationJobRequest + * @returns {google.cloud.clouddms.v1.GetMigrationJobRequest} GetMigrationJobRequest */ - DeleteMigrationJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.DeleteMigrationJobRequest) + GetMigrationJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.GetMigrationJobRequest) return object; - var message = new $root.google.cloud.clouddms.v1.DeleteMigrationJobRequest(); + var message = new $root.google.cloud.clouddms.v1.GetMigrationJobRequest(); if (object.name != null) message.name = String(object.name); - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.force != null) - message.force = Boolean(object.force); return message; }; /** - * Creates a plain object from a DeleteMigrationJobRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetMigrationJobRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.clouddms.v1.DeleteMigrationJobRequest + * @memberof google.cloud.clouddms.v1.GetMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.DeleteMigrationJobRequest} message DeleteMigrationJobRequest + * @param {google.cloud.clouddms.v1.GetMigrationJobRequest} message GetMigrationJobRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteMigrationJobRequest.toObject = function toObject(message, options) { + GetMigrationJobRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.requestId = ""; - object.force = false; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; return object; }; /** - * Converts this DeleteMigrationJobRequest to JSON. + * Converts this GetMigrationJobRequest to JSON. * @function toJSON - * @memberof google.cloud.clouddms.v1.DeleteMigrationJobRequest + * @memberof google.cloud.clouddms.v1.GetMigrationJobRequest * @instance * @returns {Object.} JSON object */ - DeleteMigrationJobRequest.prototype.toJSON = function toJSON() { + GetMigrationJobRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteMigrationJobRequest + * Gets the default type url for GetMigrationJobRequest * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.DeleteMigrationJobRequest + * @memberof google.cloud.clouddms.v1.GetMigrationJobRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteMigrationJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetMigrationJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.clouddms.v1.DeleteMigrationJobRequest"; + return typeUrlPrefix + "/google.cloud.clouddms.v1.GetMigrationJobRequest"; }; - return DeleteMigrationJobRequest; + return GetMigrationJobRequest; })(); - v1.StartMigrationJobRequest = (function() { + v1.CreateMigrationJobRequest = (function() { /** - * Properties of a StartMigrationJobRequest. + * Properties of a CreateMigrationJobRequest. * @memberof google.cloud.clouddms.v1 - * @interface IStartMigrationJobRequest - * @property {string|null} [name] StartMigrationJobRequest name + * @interface ICreateMigrationJobRequest + * @property {string|null} [parent] CreateMigrationJobRequest parent + * @property {string|null} [migrationJobId] CreateMigrationJobRequest migrationJobId + * @property {google.cloud.clouddms.v1.IMigrationJob|null} [migrationJob] CreateMigrationJobRequest migrationJob + * @property {string|null} [requestId] CreateMigrationJobRequest requestId */ /** - * Constructs a new StartMigrationJobRequest. + * Constructs a new CreateMigrationJobRequest. * @memberof google.cloud.clouddms.v1 - * @classdesc Represents a StartMigrationJobRequest. - * @implements IStartMigrationJobRequest + * @classdesc Represents a CreateMigrationJobRequest. + * @implements ICreateMigrationJobRequest * @constructor - * @param {google.cloud.clouddms.v1.IStartMigrationJobRequest=} [properties] Properties to set + * @param {google.cloud.clouddms.v1.ICreateMigrationJobRequest=} [properties] Properties to set */ - function StartMigrationJobRequest(properties) { + function CreateMigrationJobRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2262,75 +2104,117 @@ } /** - * StartMigrationJobRequest name. - * @member {string} name - * @memberof google.cloud.clouddms.v1.StartMigrationJobRequest + * CreateMigrationJobRequest parent. + * @member {string} parent + * @memberof google.cloud.clouddms.v1.CreateMigrationJobRequest * @instance */ - StartMigrationJobRequest.prototype.name = ""; + CreateMigrationJobRequest.prototype.parent = ""; /** - * Creates a new StartMigrationJobRequest instance using the specified properties. + * CreateMigrationJobRequest migrationJobId. + * @member {string} migrationJobId + * @memberof google.cloud.clouddms.v1.CreateMigrationJobRequest + * @instance + */ + CreateMigrationJobRequest.prototype.migrationJobId = ""; + + /** + * CreateMigrationJobRequest migrationJob. + * @member {google.cloud.clouddms.v1.IMigrationJob|null|undefined} migrationJob + * @memberof google.cloud.clouddms.v1.CreateMigrationJobRequest + * @instance + */ + CreateMigrationJobRequest.prototype.migrationJob = null; + + /** + * CreateMigrationJobRequest requestId. + * @member {string} requestId + * @memberof google.cloud.clouddms.v1.CreateMigrationJobRequest + * @instance + */ + CreateMigrationJobRequest.prototype.requestId = ""; + + /** + * Creates a new CreateMigrationJobRequest instance using the specified properties. * @function create - * @memberof google.cloud.clouddms.v1.StartMigrationJobRequest + * @memberof google.cloud.clouddms.v1.CreateMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.IStartMigrationJobRequest=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.StartMigrationJobRequest} StartMigrationJobRequest instance + * @param {google.cloud.clouddms.v1.ICreateMigrationJobRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.CreateMigrationJobRequest} CreateMigrationJobRequest instance */ - StartMigrationJobRequest.create = function create(properties) { - return new StartMigrationJobRequest(properties); + CreateMigrationJobRequest.create = function create(properties) { + return new CreateMigrationJobRequest(properties); }; /** - * Encodes the specified StartMigrationJobRequest message. Does not implicitly {@link google.cloud.clouddms.v1.StartMigrationJobRequest.verify|verify} messages. + * Encodes the specified CreateMigrationJobRequest message. Does not implicitly {@link google.cloud.clouddms.v1.CreateMigrationJobRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.clouddms.v1.StartMigrationJobRequest + * @memberof google.cloud.clouddms.v1.CreateMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.IStartMigrationJobRequest} message StartMigrationJobRequest message or plain object to encode + * @param {google.cloud.clouddms.v1.ICreateMigrationJobRequest} message CreateMigrationJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StartMigrationJobRequest.encode = function encode(message, writer) { + CreateMigrationJobRequest.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.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.migrationJobId != null && Object.hasOwnProperty.call(message, "migrationJobId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.migrationJobId); + if (message.migrationJob != null && Object.hasOwnProperty.call(message, "migrationJob")) + $root.google.cloud.clouddms.v1.MigrationJob.encode(message.migrationJob, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); return writer; }; /** - * Encodes the specified StartMigrationJobRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.StartMigrationJobRequest.verify|verify} messages. + * Encodes the specified CreateMigrationJobRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.CreateMigrationJobRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.StartMigrationJobRequest + * @memberof google.cloud.clouddms.v1.CreateMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.IStartMigrationJobRequest} message StartMigrationJobRequest message or plain object to encode + * @param {google.cloud.clouddms.v1.ICreateMigrationJobRequest} message CreateMigrationJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StartMigrationJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateMigrationJobRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StartMigrationJobRequest message from the specified reader or buffer. + * Decodes a CreateMigrationJobRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.clouddms.v1.StartMigrationJobRequest + * @memberof google.cloud.clouddms.v1.CreateMigrationJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.StartMigrationJobRequest} StartMigrationJobRequest + * @returns {google.cloud.clouddms.v1.CreateMigrationJobRequest} CreateMigrationJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StartMigrationJobRequest.decode = function decode(reader, length) { + CreateMigrationJobRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.StartMigrationJobRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.CreateMigrationJobRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + message.migrationJobId = reader.string(); + break; + } + case 3: { + message.migrationJob = $root.google.cloud.clouddms.v1.MigrationJob.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); break; } default: @@ -2342,122 +2226,154 @@ }; /** - * Decodes a StartMigrationJobRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateMigrationJobRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.StartMigrationJobRequest + * @memberof google.cloud.clouddms.v1.CreateMigrationJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.StartMigrationJobRequest} StartMigrationJobRequest + * @returns {google.cloud.clouddms.v1.CreateMigrationJobRequest} CreateMigrationJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StartMigrationJobRequest.decodeDelimited = function decodeDelimited(reader) { + CreateMigrationJobRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StartMigrationJobRequest message. + * Verifies a CreateMigrationJobRequest message. * @function verify - * @memberof google.cloud.clouddms.v1.StartMigrationJobRequest + * @memberof google.cloud.clouddms.v1.CreateMigrationJobRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StartMigrationJobRequest.verify = function verify(message) { + CreateMigrationJobRequest.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.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.migrationJobId != null && message.hasOwnProperty("migrationJobId")) + if (!$util.isString(message.migrationJobId)) + return "migrationJobId: string expected"; + if (message.migrationJob != null && message.hasOwnProperty("migrationJob")) { + var error = $root.google.cloud.clouddms.v1.MigrationJob.verify(message.migrationJob); + if (error) + return "migrationJob." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates a StartMigrationJobRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateMigrationJobRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.clouddms.v1.StartMigrationJobRequest + * @memberof google.cloud.clouddms.v1.CreateMigrationJobRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.StartMigrationJobRequest} StartMigrationJobRequest + * @returns {google.cloud.clouddms.v1.CreateMigrationJobRequest} CreateMigrationJobRequest */ - StartMigrationJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.StartMigrationJobRequest) + CreateMigrationJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.CreateMigrationJobRequest) return object; - var message = new $root.google.cloud.clouddms.v1.StartMigrationJobRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.clouddms.v1.CreateMigrationJobRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.migrationJobId != null) + message.migrationJobId = String(object.migrationJobId); + if (object.migrationJob != null) { + if (typeof object.migrationJob !== "object") + throw TypeError(".google.cloud.clouddms.v1.CreateMigrationJobRequest.migrationJob: object expected"); + message.migrationJob = $root.google.cloud.clouddms.v1.MigrationJob.fromObject(object.migrationJob); + } + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a StartMigrationJobRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateMigrationJobRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.clouddms.v1.StartMigrationJobRequest + * @memberof google.cloud.clouddms.v1.CreateMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.StartMigrationJobRequest} message StartMigrationJobRequest + * @param {google.cloud.clouddms.v1.CreateMigrationJobRequest} message CreateMigrationJobRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StartMigrationJobRequest.toObject = function toObject(message, options) { + CreateMigrationJobRequest.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; + if (options.defaults) { + object.parent = ""; + object.migrationJobId = ""; + object.migrationJob = null; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.migrationJobId != null && message.hasOwnProperty("migrationJobId")) + object.migrationJobId = message.migrationJobId; + if (message.migrationJob != null && message.hasOwnProperty("migrationJob")) + object.migrationJob = $root.google.cloud.clouddms.v1.MigrationJob.toObject(message.migrationJob, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; return object; }; /** - * Converts this StartMigrationJobRequest to JSON. + * Converts this CreateMigrationJobRequest to JSON. * @function toJSON - * @memberof google.cloud.clouddms.v1.StartMigrationJobRequest + * @memberof google.cloud.clouddms.v1.CreateMigrationJobRequest * @instance * @returns {Object.} JSON object */ - StartMigrationJobRequest.prototype.toJSON = function toJSON() { + CreateMigrationJobRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for StartMigrationJobRequest + * Gets the default type url for CreateMigrationJobRequest * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.StartMigrationJobRequest + * @memberof google.cloud.clouddms.v1.CreateMigrationJobRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - StartMigrationJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateMigrationJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.clouddms.v1.StartMigrationJobRequest"; + return typeUrlPrefix + "/google.cloud.clouddms.v1.CreateMigrationJobRequest"; }; - return StartMigrationJobRequest; + return CreateMigrationJobRequest; })(); - v1.StopMigrationJobRequest = (function() { + v1.UpdateMigrationJobRequest = (function() { /** - * Properties of a StopMigrationJobRequest. + * Properties of an UpdateMigrationJobRequest. * @memberof google.cloud.clouddms.v1 - * @interface IStopMigrationJobRequest - * @property {string|null} [name] StopMigrationJobRequest name + * @interface IUpdateMigrationJobRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateMigrationJobRequest updateMask + * @property {google.cloud.clouddms.v1.IMigrationJob|null} [migrationJob] UpdateMigrationJobRequest migrationJob + * @property {string|null} [requestId] UpdateMigrationJobRequest requestId */ /** - * Constructs a new StopMigrationJobRequest. + * Constructs a new UpdateMigrationJobRequest. * @memberof google.cloud.clouddms.v1 - * @classdesc Represents a StopMigrationJobRequest. - * @implements IStopMigrationJobRequest + * @classdesc Represents an UpdateMigrationJobRequest. + * @implements IUpdateMigrationJobRequest * @constructor - * @param {google.cloud.clouddms.v1.IStopMigrationJobRequest=} [properties] Properties to set + * @param {google.cloud.clouddms.v1.IUpdateMigrationJobRequest=} [properties] Properties to set */ - function StopMigrationJobRequest(properties) { + function UpdateMigrationJobRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2465,75 +2381,103 @@ } /** - * StopMigrationJobRequest name. - * @member {string} name - * @memberof google.cloud.clouddms.v1.StopMigrationJobRequest + * UpdateMigrationJobRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.clouddms.v1.UpdateMigrationJobRequest * @instance */ - StopMigrationJobRequest.prototype.name = ""; + UpdateMigrationJobRequest.prototype.updateMask = null; /** - * Creates a new StopMigrationJobRequest instance using the specified properties. + * UpdateMigrationJobRequest migrationJob. + * @member {google.cloud.clouddms.v1.IMigrationJob|null|undefined} migrationJob + * @memberof google.cloud.clouddms.v1.UpdateMigrationJobRequest + * @instance + */ + UpdateMigrationJobRequest.prototype.migrationJob = null; + + /** + * UpdateMigrationJobRequest requestId. + * @member {string} requestId + * @memberof google.cloud.clouddms.v1.UpdateMigrationJobRequest + * @instance + */ + UpdateMigrationJobRequest.prototype.requestId = ""; + + /** + * Creates a new UpdateMigrationJobRequest instance using the specified properties. * @function create - * @memberof google.cloud.clouddms.v1.StopMigrationJobRequest + * @memberof google.cloud.clouddms.v1.UpdateMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.IStopMigrationJobRequest=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.StopMigrationJobRequest} StopMigrationJobRequest instance + * @param {google.cloud.clouddms.v1.IUpdateMigrationJobRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.UpdateMigrationJobRequest} UpdateMigrationJobRequest instance */ - StopMigrationJobRequest.create = function create(properties) { - return new StopMigrationJobRequest(properties); + UpdateMigrationJobRequest.create = function create(properties) { + return new UpdateMigrationJobRequest(properties); }; /** - * Encodes the specified StopMigrationJobRequest message. Does not implicitly {@link google.cloud.clouddms.v1.StopMigrationJobRequest.verify|verify} messages. + * Encodes the specified UpdateMigrationJobRequest message. Does not implicitly {@link google.cloud.clouddms.v1.UpdateMigrationJobRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.clouddms.v1.StopMigrationJobRequest + * @memberof google.cloud.clouddms.v1.UpdateMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.IStopMigrationJobRequest} message StopMigrationJobRequest message or plain object to encode + * @param {google.cloud.clouddms.v1.IUpdateMigrationJobRequest} message UpdateMigrationJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StopMigrationJobRequest.encode = function encode(message, writer) { + UpdateMigrationJobRequest.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.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.migrationJob != null && Object.hasOwnProperty.call(message, "migrationJob")) + $root.google.cloud.clouddms.v1.MigrationJob.encode(message.migrationJob, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); return writer; }; /** - * Encodes the specified StopMigrationJobRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.StopMigrationJobRequest.verify|verify} messages. + * Encodes the specified UpdateMigrationJobRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.UpdateMigrationJobRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.StopMigrationJobRequest + * @memberof google.cloud.clouddms.v1.UpdateMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.IStopMigrationJobRequest} message StopMigrationJobRequest message or plain object to encode + * @param {google.cloud.clouddms.v1.IUpdateMigrationJobRequest} message UpdateMigrationJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StopMigrationJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateMigrationJobRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StopMigrationJobRequest message from the specified reader or buffer. + * Decodes an UpdateMigrationJobRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.clouddms.v1.StopMigrationJobRequest + * @memberof google.cloud.clouddms.v1.UpdateMigrationJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.StopMigrationJobRequest} StopMigrationJobRequest + * @returns {google.cloud.clouddms.v1.UpdateMigrationJobRequest} UpdateMigrationJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StopMigrationJobRequest.decode = function decode(reader, length) { + UpdateMigrationJobRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.StopMigrationJobRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.UpdateMigrationJobRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.migrationJob = $root.google.cloud.clouddms.v1.MigrationJob.decode(reader, reader.uint32()); + break; + } + case 3: { + message.requestId = reader.string(); break; } default: @@ -2545,122 +2489,151 @@ }; /** - * Decodes a StopMigrationJobRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateMigrationJobRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.StopMigrationJobRequest + * @memberof google.cloud.clouddms.v1.UpdateMigrationJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.StopMigrationJobRequest} StopMigrationJobRequest + * @returns {google.cloud.clouddms.v1.UpdateMigrationJobRequest} UpdateMigrationJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StopMigrationJobRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateMigrationJobRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StopMigrationJobRequest message. + * Verifies an UpdateMigrationJobRequest message. * @function verify - * @memberof google.cloud.clouddms.v1.StopMigrationJobRequest + * @memberof google.cloud.clouddms.v1.UpdateMigrationJobRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StopMigrationJobRequest.verify = function verify(message) { + UpdateMigrationJobRequest.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.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.migrationJob != null && message.hasOwnProperty("migrationJob")) { + var error = $root.google.cloud.clouddms.v1.MigrationJob.verify(message.migrationJob); + if (error) + return "migrationJob." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates a StopMigrationJobRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateMigrationJobRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.clouddms.v1.StopMigrationJobRequest + * @memberof google.cloud.clouddms.v1.UpdateMigrationJobRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.StopMigrationJobRequest} StopMigrationJobRequest + * @returns {google.cloud.clouddms.v1.UpdateMigrationJobRequest} UpdateMigrationJobRequest */ - StopMigrationJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.StopMigrationJobRequest) + UpdateMigrationJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.UpdateMigrationJobRequest) return object; - var message = new $root.google.cloud.clouddms.v1.StopMigrationJobRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.clouddms.v1.UpdateMigrationJobRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.clouddms.v1.UpdateMigrationJobRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.migrationJob != null) { + if (typeof object.migrationJob !== "object") + throw TypeError(".google.cloud.clouddms.v1.UpdateMigrationJobRequest.migrationJob: object expected"); + message.migrationJob = $root.google.cloud.clouddms.v1.MigrationJob.fromObject(object.migrationJob); + } + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a StopMigrationJobRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateMigrationJobRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.clouddms.v1.StopMigrationJobRequest + * @memberof google.cloud.clouddms.v1.UpdateMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.StopMigrationJobRequest} message StopMigrationJobRequest + * @param {google.cloud.clouddms.v1.UpdateMigrationJobRequest} message UpdateMigrationJobRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StopMigrationJobRequest.toObject = function toObject(message, options) { + UpdateMigrationJobRequest.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; + if (options.defaults) { + object.updateMask = null; + object.migrationJob = null; + object.requestId = ""; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.migrationJob != null && message.hasOwnProperty("migrationJob")) + object.migrationJob = $root.google.cloud.clouddms.v1.MigrationJob.toObject(message.migrationJob, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; return object; }; /** - * Converts this StopMigrationJobRequest to JSON. + * Converts this UpdateMigrationJobRequest to JSON. * @function toJSON - * @memberof google.cloud.clouddms.v1.StopMigrationJobRequest + * @memberof google.cloud.clouddms.v1.UpdateMigrationJobRequest * @instance * @returns {Object.} JSON object */ - StopMigrationJobRequest.prototype.toJSON = function toJSON() { + UpdateMigrationJobRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for StopMigrationJobRequest + * Gets the default type url for UpdateMigrationJobRequest * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.StopMigrationJobRequest + * @memberof google.cloud.clouddms.v1.UpdateMigrationJobRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - StopMigrationJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateMigrationJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.clouddms.v1.StopMigrationJobRequest"; + return typeUrlPrefix + "/google.cloud.clouddms.v1.UpdateMigrationJobRequest"; }; - return StopMigrationJobRequest; + return UpdateMigrationJobRequest; })(); - v1.ResumeMigrationJobRequest = (function() { + v1.DeleteMigrationJobRequest = (function() { /** - * Properties of a ResumeMigrationJobRequest. + * Properties of a DeleteMigrationJobRequest. * @memberof google.cloud.clouddms.v1 - * @interface IResumeMigrationJobRequest - * @property {string|null} [name] ResumeMigrationJobRequest name + * @interface IDeleteMigrationJobRequest + * @property {string|null} [name] DeleteMigrationJobRequest name + * @property {string|null} [requestId] DeleteMigrationJobRequest requestId + * @property {boolean|null} [force] DeleteMigrationJobRequest force */ /** - * Constructs a new ResumeMigrationJobRequest. + * Constructs a new DeleteMigrationJobRequest. * @memberof google.cloud.clouddms.v1 - * @classdesc Represents a ResumeMigrationJobRequest. - * @implements IResumeMigrationJobRequest + * @classdesc Represents a DeleteMigrationJobRequest. + * @implements IDeleteMigrationJobRequest * @constructor - * @param {google.cloud.clouddms.v1.IResumeMigrationJobRequest=} [properties] Properties to set + * @param {google.cloud.clouddms.v1.IDeleteMigrationJobRequest=} [properties] Properties to set */ - function ResumeMigrationJobRequest(properties) { + function DeleteMigrationJobRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2668,70 +2641,90 @@ } /** - * ResumeMigrationJobRequest name. + * DeleteMigrationJobRequest name. * @member {string} name - * @memberof google.cloud.clouddms.v1.ResumeMigrationJobRequest + * @memberof google.cloud.clouddms.v1.DeleteMigrationJobRequest * @instance */ - ResumeMigrationJobRequest.prototype.name = ""; + DeleteMigrationJobRequest.prototype.name = ""; /** - * Creates a new ResumeMigrationJobRequest instance using the specified properties. + * DeleteMigrationJobRequest requestId. + * @member {string} requestId + * @memberof google.cloud.clouddms.v1.DeleteMigrationJobRequest + * @instance + */ + DeleteMigrationJobRequest.prototype.requestId = ""; + + /** + * DeleteMigrationJobRequest force. + * @member {boolean} force + * @memberof google.cloud.clouddms.v1.DeleteMigrationJobRequest + * @instance + */ + DeleteMigrationJobRequest.prototype.force = false; + + /** + * Creates a new DeleteMigrationJobRequest instance using the specified properties. * @function create - * @memberof google.cloud.clouddms.v1.ResumeMigrationJobRequest + * @memberof google.cloud.clouddms.v1.DeleteMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.IResumeMigrationJobRequest=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.ResumeMigrationJobRequest} ResumeMigrationJobRequest instance + * @param {google.cloud.clouddms.v1.IDeleteMigrationJobRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.DeleteMigrationJobRequest} DeleteMigrationJobRequest instance */ - ResumeMigrationJobRequest.create = function create(properties) { - return new ResumeMigrationJobRequest(properties); + DeleteMigrationJobRequest.create = function create(properties) { + return new DeleteMigrationJobRequest(properties); }; /** - * Encodes the specified ResumeMigrationJobRequest message. Does not implicitly {@link google.cloud.clouddms.v1.ResumeMigrationJobRequest.verify|verify} messages. + * Encodes the specified DeleteMigrationJobRequest message. Does not implicitly {@link google.cloud.clouddms.v1.DeleteMigrationJobRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.clouddms.v1.ResumeMigrationJobRequest + * @memberof google.cloud.clouddms.v1.DeleteMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.IResumeMigrationJobRequest} message ResumeMigrationJobRequest message or plain object to encode + * @param {google.cloud.clouddms.v1.IDeleteMigrationJobRequest} message DeleteMigrationJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResumeMigrationJobRequest.encode = function encode(message, writer) { + DeleteMigrationJobRequest.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.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); return writer; }; /** - * Encodes the specified ResumeMigrationJobRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ResumeMigrationJobRequest.verify|verify} messages. + * Encodes the specified DeleteMigrationJobRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.DeleteMigrationJobRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.ResumeMigrationJobRequest + * @memberof google.cloud.clouddms.v1.DeleteMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.IResumeMigrationJobRequest} message ResumeMigrationJobRequest message or plain object to encode + * @param {google.cloud.clouddms.v1.IDeleteMigrationJobRequest} message DeleteMigrationJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResumeMigrationJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteMigrationJobRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResumeMigrationJobRequest message from the specified reader or buffer. + * Decodes a DeleteMigrationJobRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.clouddms.v1.ResumeMigrationJobRequest + * @memberof google.cloud.clouddms.v1.DeleteMigrationJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.ResumeMigrationJobRequest} ResumeMigrationJobRequest + * @returns {google.cloud.clouddms.v1.DeleteMigrationJobRequest} DeleteMigrationJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResumeMigrationJobRequest.decode = function decode(reader, length) { + DeleteMigrationJobRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.ResumeMigrationJobRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.DeleteMigrationJobRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -2739,6 +2732,14 @@ message.name = reader.string(); break; } + case 2: { + message.requestId = reader.string(); + break; + } + case 3: { + message.force = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -2748,122 +2749,139 @@ }; /** - * Decodes a ResumeMigrationJobRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteMigrationJobRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.ResumeMigrationJobRequest + * @memberof google.cloud.clouddms.v1.DeleteMigrationJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.ResumeMigrationJobRequest} ResumeMigrationJobRequest + * @returns {google.cloud.clouddms.v1.DeleteMigrationJobRequest} DeleteMigrationJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResumeMigrationJobRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteMigrationJobRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResumeMigrationJobRequest message. + * Verifies a DeleteMigrationJobRequest message. * @function verify - * @memberof google.cloud.clouddms.v1.ResumeMigrationJobRequest + * @memberof google.cloud.clouddms.v1.DeleteMigrationJobRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResumeMigrationJobRequest.verify = function verify(message) { + DeleteMigrationJobRequest.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.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; return null; }; /** - * Creates a ResumeMigrationJobRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteMigrationJobRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.clouddms.v1.ResumeMigrationJobRequest + * @memberof google.cloud.clouddms.v1.DeleteMigrationJobRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.ResumeMigrationJobRequest} ResumeMigrationJobRequest + * @returns {google.cloud.clouddms.v1.DeleteMigrationJobRequest} DeleteMigrationJobRequest */ - ResumeMigrationJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.ResumeMigrationJobRequest) + DeleteMigrationJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.DeleteMigrationJobRequest) return object; - var message = new $root.google.cloud.clouddms.v1.ResumeMigrationJobRequest(); + var message = new $root.google.cloud.clouddms.v1.DeleteMigrationJobRequest(); if (object.name != null) message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.force != null) + message.force = Boolean(object.force); return message; }; /** - * Creates a plain object from a ResumeMigrationJobRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteMigrationJobRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.clouddms.v1.ResumeMigrationJobRequest + * @memberof google.cloud.clouddms.v1.DeleteMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.ResumeMigrationJobRequest} message ResumeMigrationJobRequest + * @param {google.cloud.clouddms.v1.DeleteMigrationJobRequest} message DeleteMigrationJobRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResumeMigrationJobRequest.toObject = function toObject(message, options) { + DeleteMigrationJobRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.name = ""; + object.requestId = ""; + object.force = false; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; return object; }; /** - * Converts this ResumeMigrationJobRequest to JSON. + * Converts this DeleteMigrationJobRequest to JSON. * @function toJSON - * @memberof google.cloud.clouddms.v1.ResumeMigrationJobRequest + * @memberof google.cloud.clouddms.v1.DeleteMigrationJobRequest * @instance * @returns {Object.} JSON object */ - ResumeMigrationJobRequest.prototype.toJSON = function toJSON() { + DeleteMigrationJobRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResumeMigrationJobRequest + * Gets the default type url for DeleteMigrationJobRequest * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.ResumeMigrationJobRequest + * @memberof google.cloud.clouddms.v1.DeleteMigrationJobRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResumeMigrationJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteMigrationJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.clouddms.v1.ResumeMigrationJobRequest"; + return typeUrlPrefix + "/google.cloud.clouddms.v1.DeleteMigrationJobRequest"; }; - return ResumeMigrationJobRequest; + return DeleteMigrationJobRequest; })(); - v1.PromoteMigrationJobRequest = (function() { + v1.StartMigrationJobRequest = (function() { /** - * Properties of a PromoteMigrationJobRequest. + * Properties of a StartMigrationJobRequest. * @memberof google.cloud.clouddms.v1 - * @interface IPromoteMigrationJobRequest - * @property {string|null} [name] PromoteMigrationJobRequest name + * @interface IStartMigrationJobRequest + * @property {string|null} [name] StartMigrationJobRequest name */ /** - * Constructs a new PromoteMigrationJobRequest. + * Constructs a new StartMigrationJobRequest. * @memberof google.cloud.clouddms.v1 - * @classdesc Represents a PromoteMigrationJobRequest. - * @implements IPromoteMigrationJobRequest + * @classdesc Represents a StartMigrationJobRequest. + * @implements IStartMigrationJobRequest * @constructor - * @param {google.cloud.clouddms.v1.IPromoteMigrationJobRequest=} [properties] Properties to set + * @param {google.cloud.clouddms.v1.IStartMigrationJobRequest=} [properties] Properties to set */ - function PromoteMigrationJobRequest(properties) { + function StartMigrationJobRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2871,35 +2889,35 @@ } /** - * PromoteMigrationJobRequest name. + * StartMigrationJobRequest name. * @member {string} name - * @memberof google.cloud.clouddms.v1.PromoteMigrationJobRequest + * @memberof google.cloud.clouddms.v1.StartMigrationJobRequest * @instance */ - PromoteMigrationJobRequest.prototype.name = ""; + StartMigrationJobRequest.prototype.name = ""; /** - * Creates a new PromoteMigrationJobRequest instance using the specified properties. + * Creates a new StartMigrationJobRequest instance using the specified properties. * @function create - * @memberof google.cloud.clouddms.v1.PromoteMigrationJobRequest + * @memberof google.cloud.clouddms.v1.StartMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.IPromoteMigrationJobRequest=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.PromoteMigrationJobRequest} PromoteMigrationJobRequest instance + * @param {google.cloud.clouddms.v1.IStartMigrationJobRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.StartMigrationJobRequest} StartMigrationJobRequest instance */ - PromoteMigrationJobRequest.create = function create(properties) { - return new PromoteMigrationJobRequest(properties); + StartMigrationJobRequest.create = function create(properties) { + return new StartMigrationJobRequest(properties); }; /** - * Encodes the specified PromoteMigrationJobRequest message. Does not implicitly {@link google.cloud.clouddms.v1.PromoteMigrationJobRequest.verify|verify} messages. + * Encodes the specified StartMigrationJobRequest message. Does not implicitly {@link google.cloud.clouddms.v1.StartMigrationJobRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.clouddms.v1.PromoteMigrationJobRequest + * @memberof google.cloud.clouddms.v1.StartMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.IPromoteMigrationJobRequest} message PromoteMigrationJobRequest message or plain object to encode + * @param {google.cloud.clouddms.v1.IStartMigrationJobRequest} message StartMigrationJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PromoteMigrationJobRequest.encode = function encode(message, writer) { + StartMigrationJobRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -2908,33 +2926,33 @@ }; /** - * Encodes the specified PromoteMigrationJobRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.PromoteMigrationJobRequest.verify|verify} messages. + * Encodes the specified StartMigrationJobRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.StartMigrationJobRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.PromoteMigrationJobRequest + * @memberof google.cloud.clouddms.v1.StartMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.IPromoteMigrationJobRequest} message PromoteMigrationJobRequest message or plain object to encode + * @param {google.cloud.clouddms.v1.IStartMigrationJobRequest} message StartMigrationJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PromoteMigrationJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + StartMigrationJobRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PromoteMigrationJobRequest message from the specified reader or buffer. + * Decodes a StartMigrationJobRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.clouddms.v1.PromoteMigrationJobRequest + * @memberof google.cloud.clouddms.v1.StartMigrationJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.PromoteMigrationJobRequest} PromoteMigrationJobRequest + * @returns {google.cloud.clouddms.v1.StartMigrationJobRequest} StartMigrationJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PromoteMigrationJobRequest.decode = function decode(reader, length) { + StartMigrationJobRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.PromoteMigrationJobRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.StartMigrationJobRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -2951,30 +2969,30 @@ }; /** - * Decodes a PromoteMigrationJobRequest message from the specified reader or buffer, length delimited. + * Decodes a StartMigrationJobRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.PromoteMigrationJobRequest + * @memberof google.cloud.clouddms.v1.StartMigrationJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.PromoteMigrationJobRequest} PromoteMigrationJobRequest + * @returns {google.cloud.clouddms.v1.StartMigrationJobRequest} StartMigrationJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PromoteMigrationJobRequest.decodeDelimited = function decodeDelimited(reader) { + StartMigrationJobRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PromoteMigrationJobRequest message. + * Verifies a StartMigrationJobRequest message. * @function verify - * @memberof google.cloud.clouddms.v1.PromoteMigrationJobRequest + * @memberof google.cloud.clouddms.v1.StartMigrationJobRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PromoteMigrationJobRequest.verify = function verify(message) { + StartMigrationJobRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -2984,32 +3002,32 @@ }; /** - * Creates a PromoteMigrationJobRequest message from a plain object. Also converts values to their respective internal types. + * Creates a StartMigrationJobRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.clouddms.v1.PromoteMigrationJobRequest + * @memberof google.cloud.clouddms.v1.StartMigrationJobRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.PromoteMigrationJobRequest} PromoteMigrationJobRequest + * @returns {google.cloud.clouddms.v1.StartMigrationJobRequest} StartMigrationJobRequest */ - PromoteMigrationJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.PromoteMigrationJobRequest) + StartMigrationJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.StartMigrationJobRequest) return object; - var message = new $root.google.cloud.clouddms.v1.PromoteMigrationJobRequest(); + var message = new $root.google.cloud.clouddms.v1.StartMigrationJobRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a PromoteMigrationJobRequest message. Also converts values to other types if specified. + * Creates a plain object from a StartMigrationJobRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.clouddms.v1.PromoteMigrationJobRequest + * @memberof google.cloud.clouddms.v1.StartMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.PromoteMigrationJobRequest} message PromoteMigrationJobRequest + * @param {google.cloud.clouddms.v1.StartMigrationJobRequest} message StartMigrationJobRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PromoteMigrationJobRequest.toObject = function toObject(message, options) { + StartMigrationJobRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -3021,52 +3039,52 @@ }; /** - * Converts this PromoteMigrationJobRequest to JSON. + * Converts this StartMigrationJobRequest to JSON. * @function toJSON - * @memberof google.cloud.clouddms.v1.PromoteMigrationJobRequest + * @memberof google.cloud.clouddms.v1.StartMigrationJobRequest * @instance * @returns {Object.} JSON object */ - PromoteMigrationJobRequest.prototype.toJSON = function toJSON() { + StartMigrationJobRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PromoteMigrationJobRequest + * Gets the default type url for StartMigrationJobRequest * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.PromoteMigrationJobRequest + * @memberof google.cloud.clouddms.v1.StartMigrationJobRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PromoteMigrationJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + StartMigrationJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.clouddms.v1.PromoteMigrationJobRequest"; + return typeUrlPrefix + "/google.cloud.clouddms.v1.StartMigrationJobRequest"; }; - return PromoteMigrationJobRequest; + return StartMigrationJobRequest; })(); - v1.VerifyMigrationJobRequest = (function() { + v1.StopMigrationJobRequest = (function() { /** - * Properties of a VerifyMigrationJobRequest. + * Properties of a StopMigrationJobRequest. * @memberof google.cloud.clouddms.v1 - * @interface IVerifyMigrationJobRequest - * @property {string|null} [name] VerifyMigrationJobRequest name + * @interface IStopMigrationJobRequest + * @property {string|null} [name] StopMigrationJobRequest name */ /** - * Constructs a new VerifyMigrationJobRequest. + * Constructs a new StopMigrationJobRequest. * @memberof google.cloud.clouddms.v1 - * @classdesc Represents a VerifyMigrationJobRequest. - * @implements IVerifyMigrationJobRequest + * @classdesc Represents a StopMigrationJobRequest. + * @implements IStopMigrationJobRequest * @constructor - * @param {google.cloud.clouddms.v1.IVerifyMigrationJobRequest=} [properties] Properties to set + * @param {google.cloud.clouddms.v1.IStopMigrationJobRequest=} [properties] Properties to set */ - function VerifyMigrationJobRequest(properties) { + function StopMigrationJobRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3074,35 +3092,35 @@ } /** - * VerifyMigrationJobRequest name. + * StopMigrationJobRequest name. * @member {string} name - * @memberof google.cloud.clouddms.v1.VerifyMigrationJobRequest + * @memberof google.cloud.clouddms.v1.StopMigrationJobRequest * @instance */ - VerifyMigrationJobRequest.prototype.name = ""; + StopMigrationJobRequest.prototype.name = ""; /** - * Creates a new VerifyMigrationJobRequest instance using the specified properties. + * Creates a new StopMigrationJobRequest instance using the specified properties. * @function create - * @memberof google.cloud.clouddms.v1.VerifyMigrationJobRequest + * @memberof google.cloud.clouddms.v1.StopMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.IVerifyMigrationJobRequest=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.VerifyMigrationJobRequest} VerifyMigrationJobRequest instance + * @param {google.cloud.clouddms.v1.IStopMigrationJobRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.StopMigrationJobRequest} StopMigrationJobRequest instance */ - VerifyMigrationJobRequest.create = function create(properties) { - return new VerifyMigrationJobRequest(properties); + StopMigrationJobRequest.create = function create(properties) { + return new StopMigrationJobRequest(properties); }; /** - * Encodes the specified VerifyMigrationJobRequest message. Does not implicitly {@link google.cloud.clouddms.v1.VerifyMigrationJobRequest.verify|verify} messages. + * Encodes the specified StopMigrationJobRequest message. Does not implicitly {@link google.cloud.clouddms.v1.StopMigrationJobRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.clouddms.v1.VerifyMigrationJobRequest + * @memberof google.cloud.clouddms.v1.StopMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.IVerifyMigrationJobRequest} message VerifyMigrationJobRequest message or plain object to encode + * @param {google.cloud.clouddms.v1.IStopMigrationJobRequest} message StopMigrationJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VerifyMigrationJobRequest.encode = function encode(message, writer) { + StopMigrationJobRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -3111,33 +3129,33 @@ }; /** - * Encodes the specified VerifyMigrationJobRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.VerifyMigrationJobRequest.verify|verify} messages. + * Encodes the specified StopMigrationJobRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.StopMigrationJobRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.VerifyMigrationJobRequest + * @memberof google.cloud.clouddms.v1.StopMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.IVerifyMigrationJobRequest} message VerifyMigrationJobRequest message or plain object to encode + * @param {google.cloud.clouddms.v1.IStopMigrationJobRequest} message StopMigrationJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VerifyMigrationJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + StopMigrationJobRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VerifyMigrationJobRequest message from the specified reader or buffer. + * Decodes a StopMigrationJobRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.clouddms.v1.VerifyMigrationJobRequest + * @memberof google.cloud.clouddms.v1.StopMigrationJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.VerifyMigrationJobRequest} VerifyMigrationJobRequest + * @returns {google.cloud.clouddms.v1.StopMigrationJobRequest} StopMigrationJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VerifyMigrationJobRequest.decode = function decode(reader, length) { + StopMigrationJobRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.VerifyMigrationJobRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.StopMigrationJobRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -3154,30 +3172,30 @@ }; /** - * Decodes a VerifyMigrationJobRequest message from the specified reader or buffer, length delimited. + * Decodes a StopMigrationJobRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.VerifyMigrationJobRequest + * @memberof google.cloud.clouddms.v1.StopMigrationJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.VerifyMigrationJobRequest} VerifyMigrationJobRequest + * @returns {google.cloud.clouddms.v1.StopMigrationJobRequest} StopMigrationJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VerifyMigrationJobRequest.decodeDelimited = function decodeDelimited(reader) { + StopMigrationJobRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VerifyMigrationJobRequest message. + * Verifies a StopMigrationJobRequest message. * @function verify - * @memberof google.cloud.clouddms.v1.VerifyMigrationJobRequest + * @memberof google.cloud.clouddms.v1.StopMigrationJobRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VerifyMigrationJobRequest.verify = function verify(message) { + StopMigrationJobRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -3187,32 +3205,32 @@ }; /** - * Creates a VerifyMigrationJobRequest message from a plain object. Also converts values to their respective internal types. + * Creates a StopMigrationJobRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.clouddms.v1.VerifyMigrationJobRequest + * @memberof google.cloud.clouddms.v1.StopMigrationJobRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.VerifyMigrationJobRequest} VerifyMigrationJobRequest + * @returns {google.cloud.clouddms.v1.StopMigrationJobRequest} StopMigrationJobRequest */ - VerifyMigrationJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.VerifyMigrationJobRequest) + StopMigrationJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.StopMigrationJobRequest) return object; - var message = new $root.google.cloud.clouddms.v1.VerifyMigrationJobRequest(); + var message = new $root.google.cloud.clouddms.v1.StopMigrationJobRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a VerifyMigrationJobRequest message. Also converts values to other types if specified. + * Creates a plain object from a StopMigrationJobRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.clouddms.v1.VerifyMigrationJobRequest + * @memberof google.cloud.clouddms.v1.StopMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.VerifyMigrationJobRequest} message VerifyMigrationJobRequest + * @param {google.cloud.clouddms.v1.StopMigrationJobRequest} message StopMigrationJobRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VerifyMigrationJobRequest.toObject = function toObject(message, options) { + StopMigrationJobRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -3224,52 +3242,52 @@ }; /** - * Converts this VerifyMigrationJobRequest to JSON. + * Converts this StopMigrationJobRequest to JSON. * @function toJSON - * @memberof google.cloud.clouddms.v1.VerifyMigrationJobRequest + * @memberof google.cloud.clouddms.v1.StopMigrationJobRequest * @instance * @returns {Object.} JSON object */ - VerifyMigrationJobRequest.prototype.toJSON = function toJSON() { + StopMigrationJobRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for VerifyMigrationJobRequest + * Gets the default type url for StopMigrationJobRequest * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.VerifyMigrationJobRequest + * @memberof google.cloud.clouddms.v1.StopMigrationJobRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - VerifyMigrationJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + StopMigrationJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.clouddms.v1.VerifyMigrationJobRequest"; + return typeUrlPrefix + "/google.cloud.clouddms.v1.StopMigrationJobRequest"; }; - return VerifyMigrationJobRequest; + return StopMigrationJobRequest; })(); - v1.RestartMigrationJobRequest = (function() { + v1.ResumeMigrationJobRequest = (function() { /** - * Properties of a RestartMigrationJobRequest. + * Properties of a ResumeMigrationJobRequest. * @memberof google.cloud.clouddms.v1 - * @interface IRestartMigrationJobRequest - * @property {string|null} [name] RestartMigrationJobRequest name + * @interface IResumeMigrationJobRequest + * @property {string|null} [name] ResumeMigrationJobRequest name */ /** - * Constructs a new RestartMigrationJobRequest. + * Constructs a new ResumeMigrationJobRequest. * @memberof google.cloud.clouddms.v1 - * @classdesc Represents a RestartMigrationJobRequest. - * @implements IRestartMigrationJobRequest + * @classdesc Represents a ResumeMigrationJobRequest. + * @implements IResumeMigrationJobRequest * @constructor - * @param {google.cloud.clouddms.v1.IRestartMigrationJobRequest=} [properties] Properties to set + * @param {google.cloud.clouddms.v1.IResumeMigrationJobRequest=} [properties] Properties to set */ - function RestartMigrationJobRequest(properties) { + function ResumeMigrationJobRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3277,35 +3295,35 @@ } /** - * RestartMigrationJobRequest name. + * ResumeMigrationJobRequest name. * @member {string} name - * @memberof google.cloud.clouddms.v1.RestartMigrationJobRequest + * @memberof google.cloud.clouddms.v1.ResumeMigrationJobRequest * @instance */ - RestartMigrationJobRequest.prototype.name = ""; + ResumeMigrationJobRequest.prototype.name = ""; /** - * Creates a new RestartMigrationJobRequest instance using the specified properties. + * Creates a new ResumeMigrationJobRequest instance using the specified properties. * @function create - * @memberof google.cloud.clouddms.v1.RestartMigrationJobRequest + * @memberof google.cloud.clouddms.v1.ResumeMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.IRestartMigrationJobRequest=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.RestartMigrationJobRequest} RestartMigrationJobRequest instance + * @param {google.cloud.clouddms.v1.IResumeMigrationJobRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.ResumeMigrationJobRequest} ResumeMigrationJobRequest instance */ - RestartMigrationJobRequest.create = function create(properties) { - return new RestartMigrationJobRequest(properties); + ResumeMigrationJobRequest.create = function create(properties) { + return new ResumeMigrationJobRequest(properties); }; /** - * Encodes the specified RestartMigrationJobRequest message. Does not implicitly {@link google.cloud.clouddms.v1.RestartMigrationJobRequest.verify|verify} messages. + * Encodes the specified ResumeMigrationJobRequest message. Does not implicitly {@link google.cloud.clouddms.v1.ResumeMigrationJobRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.clouddms.v1.RestartMigrationJobRequest + * @memberof google.cloud.clouddms.v1.ResumeMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.IRestartMigrationJobRequest} message RestartMigrationJobRequest message or plain object to encode + * @param {google.cloud.clouddms.v1.IResumeMigrationJobRequest} message ResumeMigrationJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RestartMigrationJobRequest.encode = function encode(message, writer) { + ResumeMigrationJobRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -3314,33 +3332,33 @@ }; /** - * Encodes the specified RestartMigrationJobRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.RestartMigrationJobRequest.verify|verify} messages. + * Encodes the specified ResumeMigrationJobRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ResumeMigrationJobRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.RestartMigrationJobRequest + * @memberof google.cloud.clouddms.v1.ResumeMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.IRestartMigrationJobRequest} message RestartMigrationJobRequest message or plain object to encode + * @param {google.cloud.clouddms.v1.IResumeMigrationJobRequest} message ResumeMigrationJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RestartMigrationJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + ResumeMigrationJobRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RestartMigrationJobRequest message from the specified reader or buffer. + * Decodes a ResumeMigrationJobRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.clouddms.v1.RestartMigrationJobRequest + * @memberof google.cloud.clouddms.v1.ResumeMigrationJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.RestartMigrationJobRequest} RestartMigrationJobRequest + * @returns {google.cloud.clouddms.v1.ResumeMigrationJobRequest} ResumeMigrationJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RestartMigrationJobRequest.decode = function decode(reader, length) { + ResumeMigrationJobRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.RestartMigrationJobRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.ResumeMigrationJobRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -3357,30 +3375,30 @@ }; /** - * Decodes a RestartMigrationJobRequest message from the specified reader or buffer, length delimited. + * Decodes a ResumeMigrationJobRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.RestartMigrationJobRequest + * @memberof google.cloud.clouddms.v1.ResumeMigrationJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.RestartMigrationJobRequest} RestartMigrationJobRequest + * @returns {google.cloud.clouddms.v1.ResumeMigrationJobRequest} ResumeMigrationJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RestartMigrationJobRequest.decodeDelimited = function decodeDelimited(reader) { + ResumeMigrationJobRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RestartMigrationJobRequest message. + * Verifies a ResumeMigrationJobRequest message. * @function verify - * @memberof google.cloud.clouddms.v1.RestartMigrationJobRequest + * @memberof google.cloud.clouddms.v1.ResumeMigrationJobRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RestartMigrationJobRequest.verify = function verify(message) { + ResumeMigrationJobRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -3390,32 +3408,32 @@ }; /** - * Creates a RestartMigrationJobRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ResumeMigrationJobRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.clouddms.v1.RestartMigrationJobRequest + * @memberof google.cloud.clouddms.v1.ResumeMigrationJobRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.RestartMigrationJobRequest} RestartMigrationJobRequest + * @returns {google.cloud.clouddms.v1.ResumeMigrationJobRequest} ResumeMigrationJobRequest */ - RestartMigrationJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.RestartMigrationJobRequest) + ResumeMigrationJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.ResumeMigrationJobRequest) return object; - var message = new $root.google.cloud.clouddms.v1.RestartMigrationJobRequest(); + var message = new $root.google.cloud.clouddms.v1.ResumeMigrationJobRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a RestartMigrationJobRequest message. Also converts values to other types if specified. + * Creates a plain object from a ResumeMigrationJobRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.clouddms.v1.RestartMigrationJobRequest + * @memberof google.cloud.clouddms.v1.ResumeMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.RestartMigrationJobRequest} message RestartMigrationJobRequest + * @param {google.cloud.clouddms.v1.ResumeMigrationJobRequest} message ResumeMigrationJobRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RestartMigrationJobRequest.toObject = function toObject(message, options) { + ResumeMigrationJobRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -3427,56 +3445,52 @@ }; /** - * Converts this RestartMigrationJobRequest to JSON. + * Converts this ResumeMigrationJobRequest to JSON. * @function toJSON - * @memberof google.cloud.clouddms.v1.RestartMigrationJobRequest + * @memberof google.cloud.clouddms.v1.ResumeMigrationJobRequest * @instance * @returns {Object.} JSON object */ - RestartMigrationJobRequest.prototype.toJSON = function toJSON() { + ResumeMigrationJobRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RestartMigrationJobRequest + * Gets the default type url for ResumeMigrationJobRequest * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.RestartMigrationJobRequest + * @memberof google.cloud.clouddms.v1.ResumeMigrationJobRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RestartMigrationJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ResumeMigrationJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.clouddms.v1.RestartMigrationJobRequest"; + return typeUrlPrefix + "/google.cloud.clouddms.v1.ResumeMigrationJobRequest"; }; - return RestartMigrationJobRequest; + return ResumeMigrationJobRequest; })(); - v1.GenerateSshScriptRequest = (function() { + v1.PromoteMigrationJobRequest = (function() { /** - * Properties of a GenerateSshScriptRequest. + * Properties of a PromoteMigrationJobRequest. * @memberof google.cloud.clouddms.v1 - * @interface IGenerateSshScriptRequest - * @property {string|null} [migrationJob] GenerateSshScriptRequest migrationJob - * @property {string|null} [vm] GenerateSshScriptRequest vm - * @property {google.cloud.clouddms.v1.IVmCreationConfig|null} [vmCreationConfig] GenerateSshScriptRequest vmCreationConfig - * @property {google.cloud.clouddms.v1.IVmSelectionConfig|null} [vmSelectionConfig] GenerateSshScriptRequest vmSelectionConfig - * @property {number|null} [vmPort] GenerateSshScriptRequest vmPort + * @interface IPromoteMigrationJobRequest + * @property {string|null} [name] PromoteMigrationJobRequest name */ /** - * Constructs a new GenerateSshScriptRequest. + * Constructs a new PromoteMigrationJobRequest. * @memberof google.cloud.clouddms.v1 - * @classdesc Represents a GenerateSshScriptRequest. - * @implements IGenerateSshScriptRequest + * @classdesc Represents a PromoteMigrationJobRequest. + * @implements IPromoteMigrationJobRequest * @constructor - * @param {google.cloud.clouddms.v1.IGenerateSshScriptRequest=} [properties] Properties to set + * @param {google.cloud.clouddms.v1.IPromoteMigrationJobRequest=} [properties] Properties to set */ - function GenerateSshScriptRequest(properties) { + function PromoteMigrationJobRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3484,145 +3498,75 @@ } /** - * GenerateSshScriptRequest migrationJob. - * @member {string} migrationJob - * @memberof google.cloud.clouddms.v1.GenerateSshScriptRequest - * @instance - */ - GenerateSshScriptRequest.prototype.migrationJob = ""; - - /** - * GenerateSshScriptRequest vm. - * @member {string} vm - * @memberof google.cloud.clouddms.v1.GenerateSshScriptRequest - * @instance - */ - GenerateSshScriptRequest.prototype.vm = ""; - - /** - * GenerateSshScriptRequest vmCreationConfig. - * @member {google.cloud.clouddms.v1.IVmCreationConfig|null|undefined} vmCreationConfig - * @memberof google.cloud.clouddms.v1.GenerateSshScriptRequest - * @instance - */ - GenerateSshScriptRequest.prototype.vmCreationConfig = null; - - /** - * GenerateSshScriptRequest vmSelectionConfig. - * @member {google.cloud.clouddms.v1.IVmSelectionConfig|null|undefined} vmSelectionConfig - * @memberof google.cloud.clouddms.v1.GenerateSshScriptRequest - * @instance - */ - GenerateSshScriptRequest.prototype.vmSelectionConfig = null; - - /** - * GenerateSshScriptRequest vmPort. - * @member {number} vmPort - * @memberof google.cloud.clouddms.v1.GenerateSshScriptRequest - * @instance - */ - GenerateSshScriptRequest.prototype.vmPort = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * GenerateSshScriptRequest vmConfig. - * @member {"vmCreationConfig"|"vmSelectionConfig"|undefined} vmConfig - * @memberof google.cloud.clouddms.v1.GenerateSshScriptRequest + * PromoteMigrationJobRequest name. + * @member {string} name + * @memberof google.cloud.clouddms.v1.PromoteMigrationJobRequest * @instance */ - Object.defineProperty(GenerateSshScriptRequest.prototype, "vmConfig", { - get: $util.oneOfGetter($oneOfFields = ["vmCreationConfig", "vmSelectionConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); + PromoteMigrationJobRequest.prototype.name = ""; /** - * Creates a new GenerateSshScriptRequest instance using the specified properties. + * Creates a new PromoteMigrationJobRequest instance using the specified properties. * @function create - * @memberof google.cloud.clouddms.v1.GenerateSshScriptRequest + * @memberof google.cloud.clouddms.v1.PromoteMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.IGenerateSshScriptRequest=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.GenerateSshScriptRequest} GenerateSshScriptRequest instance + * @param {google.cloud.clouddms.v1.IPromoteMigrationJobRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.PromoteMigrationJobRequest} PromoteMigrationJobRequest instance */ - GenerateSshScriptRequest.create = function create(properties) { - return new GenerateSshScriptRequest(properties); + PromoteMigrationJobRequest.create = function create(properties) { + return new PromoteMigrationJobRequest(properties); }; /** - * Encodes the specified GenerateSshScriptRequest message. Does not implicitly {@link google.cloud.clouddms.v1.GenerateSshScriptRequest.verify|verify} messages. + * Encodes the specified PromoteMigrationJobRequest message. Does not implicitly {@link google.cloud.clouddms.v1.PromoteMigrationJobRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.clouddms.v1.GenerateSshScriptRequest + * @memberof google.cloud.clouddms.v1.PromoteMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.IGenerateSshScriptRequest} message GenerateSshScriptRequest message or plain object to encode + * @param {google.cloud.clouddms.v1.IPromoteMigrationJobRequest} message PromoteMigrationJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GenerateSshScriptRequest.encode = function encode(message, writer) { + PromoteMigrationJobRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.migrationJob != null && Object.hasOwnProperty.call(message, "migrationJob")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.migrationJob); - if (message.vm != null && Object.hasOwnProperty.call(message, "vm")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.vm); - if (message.vmPort != null && Object.hasOwnProperty.call(message, "vmPort")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.vmPort); - if (message.vmCreationConfig != null && Object.hasOwnProperty.call(message, "vmCreationConfig")) - $root.google.cloud.clouddms.v1.VmCreationConfig.encode(message.vmCreationConfig, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - if (message.vmSelectionConfig != null && Object.hasOwnProperty.call(message, "vmSelectionConfig")) - $root.google.cloud.clouddms.v1.VmSelectionConfig.encode(message.vmSelectionConfig, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified GenerateSshScriptRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.GenerateSshScriptRequest.verify|verify} messages. + * Encodes the specified PromoteMigrationJobRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.PromoteMigrationJobRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.GenerateSshScriptRequest + * @memberof google.cloud.clouddms.v1.PromoteMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.IGenerateSshScriptRequest} message GenerateSshScriptRequest message or plain object to encode + * @param {google.cloud.clouddms.v1.IPromoteMigrationJobRequest} message PromoteMigrationJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GenerateSshScriptRequest.encodeDelimited = function encodeDelimited(message, writer) { + PromoteMigrationJobRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GenerateSshScriptRequest message from the specified reader or buffer. + * Decodes a PromoteMigrationJobRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.clouddms.v1.GenerateSshScriptRequest + * @memberof google.cloud.clouddms.v1.PromoteMigrationJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.GenerateSshScriptRequest} GenerateSshScriptRequest + * @returns {google.cloud.clouddms.v1.PromoteMigrationJobRequest} PromoteMigrationJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GenerateSshScriptRequest.decode = function decode(reader, length) { + PromoteMigrationJobRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.GenerateSshScriptRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.PromoteMigrationJobRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.migrationJob = reader.string(); - break; - } - case 2: { - message.vm = reader.string(); - break; - } - case 100: { - message.vmCreationConfig = $root.google.cloud.clouddms.v1.VmCreationConfig.decode(reader, reader.uint32()); - break; - } - case 101: { - message.vmSelectionConfig = $root.google.cloud.clouddms.v1.VmSelectionConfig.decode(reader, reader.uint32()); - break; - } - case 3: { - message.vmPort = reader.int32(); + message.name = reader.string(); break; } default: @@ -3634,180 +3578,122 @@ }; /** - * Decodes a GenerateSshScriptRequest message from the specified reader or buffer, length delimited. + * Decodes a PromoteMigrationJobRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.GenerateSshScriptRequest + * @memberof google.cloud.clouddms.v1.PromoteMigrationJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.GenerateSshScriptRequest} GenerateSshScriptRequest + * @returns {google.cloud.clouddms.v1.PromoteMigrationJobRequest} PromoteMigrationJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GenerateSshScriptRequest.decodeDelimited = function decodeDelimited(reader) { + PromoteMigrationJobRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GenerateSshScriptRequest message. + * Verifies a PromoteMigrationJobRequest message. * @function verify - * @memberof google.cloud.clouddms.v1.GenerateSshScriptRequest + * @memberof google.cloud.clouddms.v1.PromoteMigrationJobRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GenerateSshScriptRequest.verify = function verify(message) { + PromoteMigrationJobRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.migrationJob != null && message.hasOwnProperty("migrationJob")) - if (!$util.isString(message.migrationJob)) - return "migrationJob: string expected"; - if (message.vm != null && message.hasOwnProperty("vm")) - if (!$util.isString(message.vm)) - return "vm: string expected"; - if (message.vmCreationConfig != null && message.hasOwnProperty("vmCreationConfig")) { - properties.vmConfig = 1; - { - var error = $root.google.cloud.clouddms.v1.VmCreationConfig.verify(message.vmCreationConfig); - if (error) - return "vmCreationConfig." + error; - } - } - if (message.vmSelectionConfig != null && message.hasOwnProperty("vmSelectionConfig")) { - if (properties.vmConfig === 1) - return "vmConfig: multiple values"; - properties.vmConfig = 1; - { - var error = $root.google.cloud.clouddms.v1.VmSelectionConfig.verify(message.vmSelectionConfig); - if (error) - return "vmSelectionConfig." + error; - } - } - if (message.vmPort != null && message.hasOwnProperty("vmPort")) - if (!$util.isInteger(message.vmPort)) - return "vmPort: integer expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a GenerateSshScriptRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PromoteMigrationJobRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.clouddms.v1.GenerateSshScriptRequest + * @memberof google.cloud.clouddms.v1.PromoteMigrationJobRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.GenerateSshScriptRequest} GenerateSshScriptRequest + * @returns {google.cloud.clouddms.v1.PromoteMigrationJobRequest} PromoteMigrationJobRequest */ - GenerateSshScriptRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.GenerateSshScriptRequest) + PromoteMigrationJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.PromoteMigrationJobRequest) return object; - var message = new $root.google.cloud.clouddms.v1.GenerateSshScriptRequest(); - if (object.migrationJob != null) - message.migrationJob = String(object.migrationJob); - if (object.vm != null) - message.vm = String(object.vm); - if (object.vmCreationConfig != null) { - if (typeof object.vmCreationConfig !== "object") - throw TypeError(".google.cloud.clouddms.v1.GenerateSshScriptRequest.vmCreationConfig: object expected"); - message.vmCreationConfig = $root.google.cloud.clouddms.v1.VmCreationConfig.fromObject(object.vmCreationConfig); - } - if (object.vmSelectionConfig != null) { - if (typeof object.vmSelectionConfig !== "object") - throw TypeError(".google.cloud.clouddms.v1.GenerateSshScriptRequest.vmSelectionConfig: object expected"); - message.vmSelectionConfig = $root.google.cloud.clouddms.v1.VmSelectionConfig.fromObject(object.vmSelectionConfig); - } - if (object.vmPort != null) - message.vmPort = object.vmPort | 0; + var message = new $root.google.cloud.clouddms.v1.PromoteMigrationJobRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a GenerateSshScriptRequest message. Also converts values to other types if specified. + * Creates a plain object from a PromoteMigrationJobRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.clouddms.v1.GenerateSshScriptRequest + * @memberof google.cloud.clouddms.v1.PromoteMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.GenerateSshScriptRequest} message GenerateSshScriptRequest + * @param {google.cloud.clouddms.v1.PromoteMigrationJobRequest} message PromoteMigrationJobRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GenerateSshScriptRequest.toObject = function toObject(message, options) { + PromoteMigrationJobRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.migrationJob = ""; - object.vm = ""; - object.vmPort = 0; - } - if (message.migrationJob != null && message.hasOwnProperty("migrationJob")) - object.migrationJob = message.migrationJob; - if (message.vm != null && message.hasOwnProperty("vm")) - object.vm = message.vm; - if (message.vmPort != null && message.hasOwnProperty("vmPort")) - object.vmPort = message.vmPort; - if (message.vmCreationConfig != null && message.hasOwnProperty("vmCreationConfig")) { - object.vmCreationConfig = $root.google.cloud.clouddms.v1.VmCreationConfig.toObject(message.vmCreationConfig, options); - if (options.oneofs) - object.vmConfig = "vmCreationConfig"; - } - if (message.vmSelectionConfig != null && message.hasOwnProperty("vmSelectionConfig")) { - object.vmSelectionConfig = $root.google.cloud.clouddms.v1.VmSelectionConfig.toObject(message.vmSelectionConfig, options); - if (options.oneofs) - object.vmConfig = "vmSelectionConfig"; - } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this GenerateSshScriptRequest to JSON. + * Converts this PromoteMigrationJobRequest to JSON. * @function toJSON - * @memberof google.cloud.clouddms.v1.GenerateSshScriptRequest + * @memberof google.cloud.clouddms.v1.PromoteMigrationJobRequest * @instance * @returns {Object.} JSON object */ - GenerateSshScriptRequest.prototype.toJSON = function toJSON() { + PromoteMigrationJobRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GenerateSshScriptRequest + * Gets the default type url for PromoteMigrationJobRequest * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.GenerateSshScriptRequest + * @memberof google.cloud.clouddms.v1.PromoteMigrationJobRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GenerateSshScriptRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PromoteMigrationJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.clouddms.v1.GenerateSshScriptRequest"; + return typeUrlPrefix + "/google.cloud.clouddms.v1.PromoteMigrationJobRequest"; }; - return GenerateSshScriptRequest; + return PromoteMigrationJobRequest; })(); - v1.VmCreationConfig = (function() { + v1.VerifyMigrationJobRequest = (function() { /** - * Properties of a VmCreationConfig. + * Properties of a VerifyMigrationJobRequest. * @memberof google.cloud.clouddms.v1 - * @interface IVmCreationConfig - * @property {string|null} [vmMachineType] VmCreationConfig vmMachineType - * @property {string|null} [vmZone] VmCreationConfig vmZone - * @property {string|null} [subnet] VmCreationConfig subnet + * @interface IVerifyMigrationJobRequest + * @property {string|null} [name] VerifyMigrationJobRequest name */ /** - * Constructs a new VmCreationConfig. + * Constructs a new VerifyMigrationJobRequest. * @memberof google.cloud.clouddms.v1 - * @classdesc Represents a VmCreationConfig. - * @implements IVmCreationConfig + * @classdesc Represents a VerifyMigrationJobRequest. + * @implements IVerifyMigrationJobRequest * @constructor - * @param {google.cloud.clouddms.v1.IVmCreationConfig=} [properties] Properties to set + * @param {google.cloud.clouddms.v1.IVerifyMigrationJobRequest=} [properties] Properties to set */ - function VmCreationConfig(properties) { + function VerifyMigrationJobRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3815,103 +3701,75 @@ } /** - * VmCreationConfig vmMachineType. - * @member {string} vmMachineType - * @memberof google.cloud.clouddms.v1.VmCreationConfig - * @instance - */ - VmCreationConfig.prototype.vmMachineType = ""; - - /** - * VmCreationConfig vmZone. - * @member {string} vmZone - * @memberof google.cloud.clouddms.v1.VmCreationConfig - * @instance - */ - VmCreationConfig.prototype.vmZone = ""; - - /** - * VmCreationConfig subnet. - * @member {string} subnet - * @memberof google.cloud.clouddms.v1.VmCreationConfig + * VerifyMigrationJobRequest name. + * @member {string} name + * @memberof google.cloud.clouddms.v1.VerifyMigrationJobRequest * @instance */ - VmCreationConfig.prototype.subnet = ""; + VerifyMigrationJobRequest.prototype.name = ""; /** - * Creates a new VmCreationConfig instance using the specified properties. + * Creates a new VerifyMigrationJobRequest instance using the specified properties. * @function create - * @memberof google.cloud.clouddms.v1.VmCreationConfig + * @memberof google.cloud.clouddms.v1.VerifyMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.IVmCreationConfig=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.VmCreationConfig} VmCreationConfig instance + * @param {google.cloud.clouddms.v1.IVerifyMigrationJobRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.VerifyMigrationJobRequest} VerifyMigrationJobRequest instance */ - VmCreationConfig.create = function create(properties) { - return new VmCreationConfig(properties); + VerifyMigrationJobRequest.create = function create(properties) { + return new VerifyMigrationJobRequest(properties); }; /** - * Encodes the specified VmCreationConfig message. Does not implicitly {@link google.cloud.clouddms.v1.VmCreationConfig.verify|verify} messages. + * Encodes the specified VerifyMigrationJobRequest message. Does not implicitly {@link google.cloud.clouddms.v1.VerifyMigrationJobRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.clouddms.v1.VmCreationConfig + * @memberof google.cloud.clouddms.v1.VerifyMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.IVmCreationConfig} message VmCreationConfig message or plain object to encode + * @param {google.cloud.clouddms.v1.IVerifyMigrationJobRequest} message VerifyMigrationJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VmCreationConfig.encode = function encode(message, writer) { + VerifyMigrationJobRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.vmMachineType != null && Object.hasOwnProperty.call(message, "vmMachineType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.vmMachineType); - if (message.vmZone != null && Object.hasOwnProperty.call(message, "vmZone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.vmZone); - if (message.subnet != null && Object.hasOwnProperty.call(message, "subnet")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.subnet); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified VmCreationConfig message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.VmCreationConfig.verify|verify} messages. + * Encodes the specified VerifyMigrationJobRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.VerifyMigrationJobRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.VmCreationConfig + * @memberof google.cloud.clouddms.v1.VerifyMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.IVmCreationConfig} message VmCreationConfig message or plain object to encode + * @param {google.cloud.clouddms.v1.IVerifyMigrationJobRequest} message VerifyMigrationJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VmCreationConfig.encodeDelimited = function encodeDelimited(message, writer) { + VerifyMigrationJobRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VmCreationConfig message from the specified reader or buffer. + * Decodes a VerifyMigrationJobRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.clouddms.v1.VmCreationConfig + * @memberof google.cloud.clouddms.v1.VerifyMigrationJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.VmCreationConfig} VmCreationConfig + * @returns {google.cloud.clouddms.v1.VerifyMigrationJobRequest} VerifyMigrationJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VmCreationConfig.decode = function decode(reader, length) { + VerifyMigrationJobRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.VmCreationConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.VerifyMigrationJobRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.vmMachineType = reader.string(); - break; - } - case 2: { - message.vmZone = reader.string(); - break; - } - case 3: { - message.subnet = reader.string(); + message.name = reader.string(); break; } default: @@ -3923,139 +3781,122 @@ }; /** - * Decodes a VmCreationConfig message from the specified reader or buffer, length delimited. + * Decodes a VerifyMigrationJobRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.VmCreationConfig + * @memberof google.cloud.clouddms.v1.VerifyMigrationJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.VmCreationConfig} VmCreationConfig + * @returns {google.cloud.clouddms.v1.VerifyMigrationJobRequest} VerifyMigrationJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VmCreationConfig.decodeDelimited = function decodeDelimited(reader) { + VerifyMigrationJobRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VmCreationConfig message. + * Verifies a VerifyMigrationJobRequest message. * @function verify - * @memberof google.cloud.clouddms.v1.VmCreationConfig + * @memberof google.cloud.clouddms.v1.VerifyMigrationJobRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VmCreationConfig.verify = function verify(message) { + VerifyMigrationJobRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.vmMachineType != null && message.hasOwnProperty("vmMachineType")) - if (!$util.isString(message.vmMachineType)) - return "vmMachineType: string expected"; - if (message.vmZone != null && message.hasOwnProperty("vmZone")) - if (!$util.isString(message.vmZone)) - return "vmZone: string expected"; - if (message.subnet != null && message.hasOwnProperty("subnet")) - if (!$util.isString(message.subnet)) - return "subnet: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a VmCreationConfig message from a plain object. Also converts values to their respective internal types. + * Creates a VerifyMigrationJobRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.clouddms.v1.VmCreationConfig + * @memberof google.cloud.clouddms.v1.VerifyMigrationJobRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.VmCreationConfig} VmCreationConfig + * @returns {google.cloud.clouddms.v1.VerifyMigrationJobRequest} VerifyMigrationJobRequest */ - VmCreationConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.VmCreationConfig) + VerifyMigrationJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.VerifyMigrationJobRequest) return object; - var message = new $root.google.cloud.clouddms.v1.VmCreationConfig(); - if (object.vmMachineType != null) - message.vmMachineType = String(object.vmMachineType); - if (object.vmZone != null) - message.vmZone = String(object.vmZone); - if (object.subnet != null) - message.subnet = String(object.subnet); + var message = new $root.google.cloud.clouddms.v1.VerifyMigrationJobRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a VmCreationConfig message. Also converts values to other types if specified. + * Creates a plain object from a VerifyMigrationJobRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.clouddms.v1.VmCreationConfig + * @memberof google.cloud.clouddms.v1.VerifyMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.VmCreationConfig} message VmCreationConfig + * @param {google.cloud.clouddms.v1.VerifyMigrationJobRequest} message VerifyMigrationJobRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VmCreationConfig.toObject = function toObject(message, options) { + VerifyMigrationJobRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.vmMachineType = ""; - object.vmZone = ""; - object.subnet = ""; - } - if (message.vmMachineType != null && message.hasOwnProperty("vmMachineType")) - object.vmMachineType = message.vmMachineType; - if (message.vmZone != null && message.hasOwnProperty("vmZone")) - object.vmZone = message.vmZone; - if (message.subnet != null && message.hasOwnProperty("subnet")) - object.subnet = message.subnet; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this VmCreationConfig to JSON. + * Converts this VerifyMigrationJobRequest to JSON. * @function toJSON - * @memberof google.cloud.clouddms.v1.VmCreationConfig + * @memberof google.cloud.clouddms.v1.VerifyMigrationJobRequest * @instance * @returns {Object.} JSON object */ - VmCreationConfig.prototype.toJSON = function toJSON() { + VerifyMigrationJobRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for VmCreationConfig + * Gets the default type url for VerifyMigrationJobRequest * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.VmCreationConfig + * @memberof google.cloud.clouddms.v1.VerifyMigrationJobRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - VmCreationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + VerifyMigrationJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.clouddms.v1.VmCreationConfig"; + return typeUrlPrefix + "/google.cloud.clouddms.v1.VerifyMigrationJobRequest"; }; - return VmCreationConfig; + return VerifyMigrationJobRequest; })(); - v1.VmSelectionConfig = (function() { + v1.RestartMigrationJobRequest = (function() { /** - * Properties of a VmSelectionConfig. + * Properties of a RestartMigrationJobRequest. * @memberof google.cloud.clouddms.v1 - * @interface IVmSelectionConfig - * @property {string|null} [vmZone] VmSelectionConfig vmZone + * @interface IRestartMigrationJobRequest + * @property {string|null} [name] RestartMigrationJobRequest name */ /** - * Constructs a new VmSelectionConfig. + * Constructs a new RestartMigrationJobRequest. * @memberof google.cloud.clouddms.v1 - * @classdesc Represents a VmSelectionConfig. - * @implements IVmSelectionConfig + * @classdesc Represents a RestartMigrationJobRequest. + * @implements IRestartMigrationJobRequest * @constructor - * @param {google.cloud.clouddms.v1.IVmSelectionConfig=} [properties] Properties to set + * @param {google.cloud.clouddms.v1.IRestartMigrationJobRequest=} [properties] Properties to set */ - function VmSelectionConfig(properties) { + function RestartMigrationJobRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4063,75 +3904,75 @@ } /** - * VmSelectionConfig vmZone. - * @member {string} vmZone - * @memberof google.cloud.clouddms.v1.VmSelectionConfig + * RestartMigrationJobRequest name. + * @member {string} name + * @memberof google.cloud.clouddms.v1.RestartMigrationJobRequest * @instance */ - VmSelectionConfig.prototype.vmZone = ""; + RestartMigrationJobRequest.prototype.name = ""; /** - * Creates a new VmSelectionConfig instance using the specified properties. + * Creates a new RestartMigrationJobRequest instance using the specified properties. * @function create - * @memberof google.cloud.clouddms.v1.VmSelectionConfig + * @memberof google.cloud.clouddms.v1.RestartMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.IVmSelectionConfig=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.VmSelectionConfig} VmSelectionConfig instance + * @param {google.cloud.clouddms.v1.IRestartMigrationJobRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.RestartMigrationJobRequest} RestartMigrationJobRequest instance */ - VmSelectionConfig.create = function create(properties) { - return new VmSelectionConfig(properties); + RestartMigrationJobRequest.create = function create(properties) { + return new RestartMigrationJobRequest(properties); }; /** - * Encodes the specified VmSelectionConfig message. Does not implicitly {@link google.cloud.clouddms.v1.VmSelectionConfig.verify|verify} messages. + * Encodes the specified RestartMigrationJobRequest message. Does not implicitly {@link google.cloud.clouddms.v1.RestartMigrationJobRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.clouddms.v1.VmSelectionConfig + * @memberof google.cloud.clouddms.v1.RestartMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.IVmSelectionConfig} message VmSelectionConfig message or plain object to encode + * @param {google.cloud.clouddms.v1.IRestartMigrationJobRequest} message RestartMigrationJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VmSelectionConfig.encode = function encode(message, writer) { + RestartMigrationJobRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.vmZone != null && Object.hasOwnProperty.call(message, "vmZone")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.vmZone); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified VmSelectionConfig message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.VmSelectionConfig.verify|verify} messages. + * Encodes the specified RestartMigrationJobRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.RestartMigrationJobRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.VmSelectionConfig + * @memberof google.cloud.clouddms.v1.RestartMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.IVmSelectionConfig} message VmSelectionConfig message or plain object to encode + * @param {google.cloud.clouddms.v1.IRestartMigrationJobRequest} message RestartMigrationJobRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VmSelectionConfig.encodeDelimited = function encodeDelimited(message, writer) { + RestartMigrationJobRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VmSelectionConfig message from the specified reader or buffer. + * Decodes a RestartMigrationJobRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.clouddms.v1.VmSelectionConfig + * @memberof google.cloud.clouddms.v1.RestartMigrationJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.VmSelectionConfig} VmSelectionConfig + * @returns {google.cloud.clouddms.v1.RestartMigrationJobRequest} RestartMigrationJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VmSelectionConfig.decode = function decode(reader, length) { + RestartMigrationJobRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.VmSelectionConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.RestartMigrationJobRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.vmZone = reader.string(); + message.name = reader.string(); break; } default: @@ -4143,122 +3984,126 @@ }; /** - * Decodes a VmSelectionConfig message from the specified reader or buffer, length delimited. + * Decodes a RestartMigrationJobRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.VmSelectionConfig + * @memberof google.cloud.clouddms.v1.RestartMigrationJobRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.VmSelectionConfig} VmSelectionConfig + * @returns {google.cloud.clouddms.v1.RestartMigrationJobRequest} RestartMigrationJobRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VmSelectionConfig.decodeDelimited = function decodeDelimited(reader) { + RestartMigrationJobRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VmSelectionConfig message. + * Verifies a RestartMigrationJobRequest message. * @function verify - * @memberof google.cloud.clouddms.v1.VmSelectionConfig + * @memberof google.cloud.clouddms.v1.RestartMigrationJobRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VmSelectionConfig.verify = function verify(message) { + RestartMigrationJobRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.vmZone != null && message.hasOwnProperty("vmZone")) - if (!$util.isString(message.vmZone)) - return "vmZone: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a VmSelectionConfig message from a plain object. Also converts values to their respective internal types. + * Creates a RestartMigrationJobRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.clouddms.v1.VmSelectionConfig + * @memberof google.cloud.clouddms.v1.RestartMigrationJobRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.VmSelectionConfig} VmSelectionConfig + * @returns {google.cloud.clouddms.v1.RestartMigrationJobRequest} RestartMigrationJobRequest */ - VmSelectionConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.VmSelectionConfig) + RestartMigrationJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.RestartMigrationJobRequest) return object; - var message = new $root.google.cloud.clouddms.v1.VmSelectionConfig(); - if (object.vmZone != null) - message.vmZone = String(object.vmZone); + var message = new $root.google.cloud.clouddms.v1.RestartMigrationJobRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a VmSelectionConfig message. Also converts values to other types if specified. + * Creates a plain object from a RestartMigrationJobRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.clouddms.v1.VmSelectionConfig + * @memberof google.cloud.clouddms.v1.RestartMigrationJobRequest * @static - * @param {google.cloud.clouddms.v1.VmSelectionConfig} message VmSelectionConfig + * @param {google.cloud.clouddms.v1.RestartMigrationJobRequest} message RestartMigrationJobRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VmSelectionConfig.toObject = function toObject(message, options) { + RestartMigrationJobRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.vmZone = ""; - if (message.vmZone != null && message.hasOwnProperty("vmZone")) - object.vmZone = message.vmZone; + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this VmSelectionConfig to JSON. + * Converts this RestartMigrationJobRequest to JSON. * @function toJSON - * @memberof google.cloud.clouddms.v1.VmSelectionConfig + * @memberof google.cloud.clouddms.v1.RestartMigrationJobRequest * @instance * @returns {Object.} JSON object */ - VmSelectionConfig.prototype.toJSON = function toJSON() { + RestartMigrationJobRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for VmSelectionConfig + * Gets the default type url for RestartMigrationJobRequest * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.VmSelectionConfig + * @memberof google.cloud.clouddms.v1.RestartMigrationJobRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - VmSelectionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RestartMigrationJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.clouddms.v1.VmSelectionConfig"; + return typeUrlPrefix + "/google.cloud.clouddms.v1.RestartMigrationJobRequest"; }; - return VmSelectionConfig; + return RestartMigrationJobRequest; })(); - v1.SshScript = (function() { + v1.GenerateSshScriptRequest = (function() { /** - * Properties of a SshScript. + * Properties of a GenerateSshScriptRequest. * @memberof google.cloud.clouddms.v1 - * @interface ISshScript - * @property {string|null} [script] SshScript script + * @interface IGenerateSshScriptRequest + * @property {string|null} [migrationJob] GenerateSshScriptRequest migrationJob + * @property {string|null} [vm] GenerateSshScriptRequest vm + * @property {google.cloud.clouddms.v1.IVmCreationConfig|null} [vmCreationConfig] GenerateSshScriptRequest vmCreationConfig + * @property {google.cloud.clouddms.v1.IVmSelectionConfig|null} [vmSelectionConfig] GenerateSshScriptRequest vmSelectionConfig + * @property {number|null} [vmPort] GenerateSshScriptRequest vmPort */ /** - * Constructs a new SshScript. + * Constructs a new GenerateSshScriptRequest. * @memberof google.cloud.clouddms.v1 - * @classdesc Represents a SshScript. - * @implements ISshScript + * @classdesc Represents a GenerateSshScriptRequest. + * @implements IGenerateSshScriptRequest * @constructor - * @param {google.cloud.clouddms.v1.ISshScript=} [properties] Properties to set + * @param {google.cloud.clouddms.v1.IGenerateSshScriptRequest=} [properties] Properties to set */ - function SshScript(properties) { + function GenerateSshScriptRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4266,75 +4111,145 @@ } /** - * SshScript script. - * @member {string} script - * @memberof google.cloud.clouddms.v1.SshScript + * GenerateSshScriptRequest migrationJob. + * @member {string} migrationJob + * @memberof google.cloud.clouddms.v1.GenerateSshScriptRequest * @instance */ - SshScript.prototype.script = ""; + GenerateSshScriptRequest.prototype.migrationJob = ""; /** - * Creates a new SshScript instance using the specified properties. - * @function create - * @memberof google.cloud.clouddms.v1.SshScript - * @static - * @param {google.cloud.clouddms.v1.ISshScript=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.SshScript} SshScript instance + * GenerateSshScriptRequest vm. + * @member {string} vm + * @memberof google.cloud.clouddms.v1.GenerateSshScriptRequest + * @instance */ - SshScript.create = function create(properties) { - return new SshScript(properties); - }; + GenerateSshScriptRequest.prototype.vm = ""; /** - * Encodes the specified SshScript message. Does not implicitly {@link google.cloud.clouddms.v1.SshScript.verify|verify} messages. - * @function encode - * @memberof google.cloud.clouddms.v1.SshScript - * @static - * @param {google.cloud.clouddms.v1.ISshScript} message SshScript message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * GenerateSshScriptRequest vmCreationConfig. + * @member {google.cloud.clouddms.v1.IVmCreationConfig|null|undefined} vmCreationConfig + * @memberof google.cloud.clouddms.v1.GenerateSshScriptRequest + * @instance */ - SshScript.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.script != null && Object.hasOwnProperty.call(message, "script")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.script); - return writer; + GenerateSshScriptRequest.prototype.vmCreationConfig = null; + + /** + * GenerateSshScriptRequest vmSelectionConfig. + * @member {google.cloud.clouddms.v1.IVmSelectionConfig|null|undefined} vmSelectionConfig + * @memberof google.cloud.clouddms.v1.GenerateSshScriptRequest + * @instance + */ + GenerateSshScriptRequest.prototype.vmSelectionConfig = null; + + /** + * GenerateSshScriptRequest vmPort. + * @member {number} vmPort + * @memberof google.cloud.clouddms.v1.GenerateSshScriptRequest + * @instance + */ + GenerateSshScriptRequest.prototype.vmPort = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GenerateSshScriptRequest vmConfig. + * @member {"vmCreationConfig"|"vmSelectionConfig"|undefined} vmConfig + * @memberof google.cloud.clouddms.v1.GenerateSshScriptRequest + * @instance + */ + Object.defineProperty(GenerateSshScriptRequest.prototype, "vmConfig", { + get: $util.oneOfGetter($oneOfFields = ["vmCreationConfig", "vmSelectionConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GenerateSshScriptRequest instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.GenerateSshScriptRequest + * @static + * @param {google.cloud.clouddms.v1.IGenerateSshScriptRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.GenerateSshScriptRequest} GenerateSshScriptRequest instance + */ + GenerateSshScriptRequest.create = function create(properties) { + return new GenerateSshScriptRequest(properties); }; /** - * Encodes the specified SshScript message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.SshScript.verify|verify} messages. + * Encodes the specified GenerateSshScriptRequest message. Does not implicitly {@link google.cloud.clouddms.v1.GenerateSshScriptRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.GenerateSshScriptRequest + * @static + * @param {google.cloud.clouddms.v1.IGenerateSshScriptRequest} message GenerateSshScriptRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateSshScriptRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.migrationJob != null && Object.hasOwnProperty.call(message, "migrationJob")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.migrationJob); + if (message.vm != null && Object.hasOwnProperty.call(message, "vm")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.vm); + if (message.vmPort != null && Object.hasOwnProperty.call(message, "vmPort")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.vmPort); + if (message.vmCreationConfig != null && Object.hasOwnProperty.call(message, "vmCreationConfig")) + $root.google.cloud.clouddms.v1.VmCreationConfig.encode(message.vmCreationConfig, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.vmSelectionConfig != null && Object.hasOwnProperty.call(message, "vmSelectionConfig")) + $root.google.cloud.clouddms.v1.VmSelectionConfig.encode(message.vmSelectionConfig, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GenerateSshScriptRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.GenerateSshScriptRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.SshScript + * @memberof google.cloud.clouddms.v1.GenerateSshScriptRequest * @static - * @param {google.cloud.clouddms.v1.ISshScript} message SshScript message or plain object to encode + * @param {google.cloud.clouddms.v1.IGenerateSshScriptRequest} message GenerateSshScriptRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SshScript.encodeDelimited = function encodeDelimited(message, writer) { + GenerateSshScriptRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SshScript message from the specified reader or buffer. + * Decodes a GenerateSshScriptRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.clouddms.v1.SshScript + * @memberof google.cloud.clouddms.v1.GenerateSshScriptRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.SshScript} SshScript + * @returns {google.cloud.clouddms.v1.GenerateSshScriptRequest} GenerateSshScriptRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SshScript.decode = function decode(reader, length) { + GenerateSshScriptRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.SshScript(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.GenerateSshScriptRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.script = reader.string(); + message.migrationJob = reader.string(); + break; + } + case 2: { + message.vm = reader.string(); + break; + } + case 100: { + message.vmCreationConfig = $root.google.cloud.clouddms.v1.VmCreationConfig.decode(reader, reader.uint32()); + break; + } + case 101: { + message.vmSelectionConfig = $root.google.cloud.clouddms.v1.VmSelectionConfig.decode(reader, reader.uint32()); + break; + } + case 3: { + message.vmPort = reader.int32(); break; } default: @@ -4346,126 +4261,180 @@ }; /** - * Decodes a SshScript message from the specified reader or buffer, length delimited. + * Decodes a GenerateSshScriptRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.SshScript + * @memberof google.cloud.clouddms.v1.GenerateSshScriptRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.SshScript} SshScript + * @returns {google.cloud.clouddms.v1.GenerateSshScriptRequest} GenerateSshScriptRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SshScript.decodeDelimited = function decodeDelimited(reader) { + GenerateSshScriptRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SshScript message. + * Verifies a GenerateSshScriptRequest message. * @function verify - * @memberof google.cloud.clouddms.v1.SshScript + * @memberof google.cloud.clouddms.v1.GenerateSshScriptRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SshScript.verify = function verify(message) { + GenerateSshScriptRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.script != null && message.hasOwnProperty("script")) - if (!$util.isString(message.script)) - return "script: string expected"; + var properties = {}; + if (message.migrationJob != null && message.hasOwnProperty("migrationJob")) + if (!$util.isString(message.migrationJob)) + return "migrationJob: string expected"; + if (message.vm != null && message.hasOwnProperty("vm")) + if (!$util.isString(message.vm)) + return "vm: string expected"; + if (message.vmCreationConfig != null && message.hasOwnProperty("vmCreationConfig")) { + properties.vmConfig = 1; + { + var error = $root.google.cloud.clouddms.v1.VmCreationConfig.verify(message.vmCreationConfig); + if (error) + return "vmCreationConfig." + error; + } + } + if (message.vmSelectionConfig != null && message.hasOwnProperty("vmSelectionConfig")) { + if (properties.vmConfig === 1) + return "vmConfig: multiple values"; + properties.vmConfig = 1; + { + var error = $root.google.cloud.clouddms.v1.VmSelectionConfig.verify(message.vmSelectionConfig); + if (error) + return "vmSelectionConfig." + error; + } + } + if (message.vmPort != null && message.hasOwnProperty("vmPort")) + if (!$util.isInteger(message.vmPort)) + return "vmPort: integer expected"; return null; }; /** - * Creates a SshScript message from a plain object. Also converts values to their respective internal types. + * Creates a GenerateSshScriptRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.clouddms.v1.SshScript + * @memberof google.cloud.clouddms.v1.GenerateSshScriptRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.SshScript} SshScript + * @returns {google.cloud.clouddms.v1.GenerateSshScriptRequest} GenerateSshScriptRequest */ - SshScript.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.SshScript) + GenerateSshScriptRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.GenerateSshScriptRequest) return object; - var message = new $root.google.cloud.clouddms.v1.SshScript(); - if (object.script != null) - message.script = String(object.script); + var message = new $root.google.cloud.clouddms.v1.GenerateSshScriptRequest(); + if (object.migrationJob != null) + message.migrationJob = String(object.migrationJob); + if (object.vm != null) + message.vm = String(object.vm); + if (object.vmCreationConfig != null) { + if (typeof object.vmCreationConfig !== "object") + throw TypeError(".google.cloud.clouddms.v1.GenerateSshScriptRequest.vmCreationConfig: object expected"); + message.vmCreationConfig = $root.google.cloud.clouddms.v1.VmCreationConfig.fromObject(object.vmCreationConfig); + } + if (object.vmSelectionConfig != null) { + if (typeof object.vmSelectionConfig !== "object") + throw TypeError(".google.cloud.clouddms.v1.GenerateSshScriptRequest.vmSelectionConfig: object expected"); + message.vmSelectionConfig = $root.google.cloud.clouddms.v1.VmSelectionConfig.fromObject(object.vmSelectionConfig); + } + if (object.vmPort != null) + message.vmPort = object.vmPort | 0; return message; }; /** - * Creates a plain object from a SshScript message. Also converts values to other types if specified. + * Creates a plain object from a GenerateSshScriptRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.clouddms.v1.SshScript + * @memberof google.cloud.clouddms.v1.GenerateSshScriptRequest * @static - * @param {google.cloud.clouddms.v1.SshScript} message SshScript + * @param {google.cloud.clouddms.v1.GenerateSshScriptRequest} message GenerateSshScriptRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SshScript.toObject = function toObject(message, options) { + GenerateSshScriptRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.script = ""; - if (message.script != null && message.hasOwnProperty("script")) - object.script = message.script; + if (options.defaults) { + object.migrationJob = ""; + object.vm = ""; + object.vmPort = 0; + } + if (message.migrationJob != null && message.hasOwnProperty("migrationJob")) + object.migrationJob = message.migrationJob; + if (message.vm != null && message.hasOwnProperty("vm")) + object.vm = message.vm; + if (message.vmPort != null && message.hasOwnProperty("vmPort")) + object.vmPort = message.vmPort; + if (message.vmCreationConfig != null && message.hasOwnProperty("vmCreationConfig")) { + object.vmCreationConfig = $root.google.cloud.clouddms.v1.VmCreationConfig.toObject(message.vmCreationConfig, options); + if (options.oneofs) + object.vmConfig = "vmCreationConfig"; + } + if (message.vmSelectionConfig != null && message.hasOwnProperty("vmSelectionConfig")) { + object.vmSelectionConfig = $root.google.cloud.clouddms.v1.VmSelectionConfig.toObject(message.vmSelectionConfig, options); + if (options.oneofs) + object.vmConfig = "vmSelectionConfig"; + } return object; }; /** - * Converts this SshScript to JSON. + * Converts this GenerateSshScriptRequest to JSON. * @function toJSON - * @memberof google.cloud.clouddms.v1.SshScript + * @memberof google.cloud.clouddms.v1.GenerateSshScriptRequest * @instance * @returns {Object.} JSON object */ - SshScript.prototype.toJSON = function toJSON() { + GenerateSshScriptRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SshScript + * Gets the default type url for GenerateSshScriptRequest * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.SshScript + * @memberof google.cloud.clouddms.v1.GenerateSshScriptRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SshScript.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GenerateSshScriptRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.clouddms.v1.SshScript"; + return typeUrlPrefix + "/google.cloud.clouddms.v1.GenerateSshScriptRequest"; }; - return SshScript; + return GenerateSshScriptRequest; })(); - v1.ListConnectionProfilesRequest = (function() { + v1.VmCreationConfig = (function() { /** - * Properties of a ListConnectionProfilesRequest. + * Properties of a VmCreationConfig. * @memberof google.cloud.clouddms.v1 - * @interface IListConnectionProfilesRequest - * @property {string|null} [parent] ListConnectionProfilesRequest parent - * @property {number|null} [pageSize] ListConnectionProfilesRequest pageSize - * @property {string|null} [pageToken] ListConnectionProfilesRequest pageToken - * @property {string|null} [filter] ListConnectionProfilesRequest filter - * @property {string|null} [orderBy] ListConnectionProfilesRequest orderBy + * @interface IVmCreationConfig + * @property {string|null} [vmMachineType] VmCreationConfig vmMachineType + * @property {string|null} [vmZone] VmCreationConfig vmZone + * @property {string|null} [subnet] VmCreationConfig subnet */ /** - * Constructs a new ListConnectionProfilesRequest. + * Constructs a new VmCreationConfig. * @memberof google.cloud.clouddms.v1 - * @classdesc Represents a ListConnectionProfilesRequest. - * @implements IListConnectionProfilesRequest + * @classdesc Represents a VmCreationConfig. + * @implements IVmCreationConfig * @constructor - * @param {google.cloud.clouddms.v1.IListConnectionProfilesRequest=} [properties] Properties to set + * @param {google.cloud.clouddms.v1.IVmCreationConfig=} [properties] Properties to set */ - function ListConnectionProfilesRequest(properties) { + function VmCreationConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4473,131 +4442,103 @@ } /** - * ListConnectionProfilesRequest parent. - * @member {string} parent - * @memberof google.cloud.clouddms.v1.ListConnectionProfilesRequest - * @instance - */ - ListConnectionProfilesRequest.prototype.parent = ""; - - /** - * ListConnectionProfilesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.clouddms.v1.ListConnectionProfilesRequest - * @instance - */ - ListConnectionProfilesRequest.prototype.pageSize = 0; - - /** - * ListConnectionProfilesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.clouddms.v1.ListConnectionProfilesRequest + * VmCreationConfig vmMachineType. + * @member {string} vmMachineType + * @memberof google.cloud.clouddms.v1.VmCreationConfig * @instance */ - ListConnectionProfilesRequest.prototype.pageToken = ""; + VmCreationConfig.prototype.vmMachineType = ""; /** - * ListConnectionProfilesRequest filter. - * @member {string} filter - * @memberof google.cloud.clouddms.v1.ListConnectionProfilesRequest + * VmCreationConfig vmZone. + * @member {string} vmZone + * @memberof google.cloud.clouddms.v1.VmCreationConfig * @instance */ - ListConnectionProfilesRequest.prototype.filter = ""; + VmCreationConfig.prototype.vmZone = ""; /** - * ListConnectionProfilesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.clouddms.v1.ListConnectionProfilesRequest + * VmCreationConfig subnet. + * @member {string} subnet + * @memberof google.cloud.clouddms.v1.VmCreationConfig * @instance */ - ListConnectionProfilesRequest.prototype.orderBy = ""; + VmCreationConfig.prototype.subnet = ""; /** - * Creates a new ListConnectionProfilesRequest instance using the specified properties. + * Creates a new VmCreationConfig instance using the specified properties. * @function create - * @memberof google.cloud.clouddms.v1.ListConnectionProfilesRequest + * @memberof google.cloud.clouddms.v1.VmCreationConfig * @static - * @param {google.cloud.clouddms.v1.IListConnectionProfilesRequest=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.ListConnectionProfilesRequest} ListConnectionProfilesRequest instance + * @param {google.cloud.clouddms.v1.IVmCreationConfig=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.VmCreationConfig} VmCreationConfig instance */ - ListConnectionProfilesRequest.create = function create(properties) { - return new ListConnectionProfilesRequest(properties); + VmCreationConfig.create = function create(properties) { + return new VmCreationConfig(properties); }; /** - * Encodes the specified ListConnectionProfilesRequest message. Does not implicitly {@link google.cloud.clouddms.v1.ListConnectionProfilesRequest.verify|verify} messages. + * Encodes the specified VmCreationConfig message. Does not implicitly {@link google.cloud.clouddms.v1.VmCreationConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.clouddms.v1.ListConnectionProfilesRequest + * @memberof google.cloud.clouddms.v1.VmCreationConfig * @static - * @param {google.cloud.clouddms.v1.IListConnectionProfilesRequest} message ListConnectionProfilesRequest message or plain object to encode + * @param {google.cloud.clouddms.v1.IVmCreationConfig} message VmCreationConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListConnectionProfilesRequest.encode = function encode(message, writer) { + VmCreationConfig.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.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.vmMachineType != null && Object.hasOwnProperty.call(message, "vmMachineType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.vmMachineType); + if (message.vmZone != null && Object.hasOwnProperty.call(message, "vmZone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.vmZone); + if (message.subnet != null && Object.hasOwnProperty.call(message, "subnet")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.subnet); return writer; }; /** - * Encodes the specified ListConnectionProfilesRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ListConnectionProfilesRequest.verify|verify} messages. + * Encodes the specified VmCreationConfig message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.VmCreationConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.ListConnectionProfilesRequest + * @memberof google.cloud.clouddms.v1.VmCreationConfig * @static - * @param {google.cloud.clouddms.v1.IListConnectionProfilesRequest} message ListConnectionProfilesRequest message or plain object to encode + * @param {google.cloud.clouddms.v1.IVmCreationConfig} message VmCreationConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListConnectionProfilesRequest.encodeDelimited = function encodeDelimited(message, writer) { + VmCreationConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListConnectionProfilesRequest message from the specified reader or buffer. + * Decodes a VmCreationConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.clouddms.v1.ListConnectionProfilesRequest + * @memberof google.cloud.clouddms.v1.VmCreationConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.ListConnectionProfilesRequest} ListConnectionProfilesRequest + * @returns {google.cloud.clouddms.v1.VmCreationConfig} VmCreationConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListConnectionProfilesRequest.decode = function decode(reader, length) { + VmCreationConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.ListConnectionProfilesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.VmCreationConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.vmMachineType = reader.string(); break; } case 2: { - message.pageSize = reader.int32(); + message.vmZone = reader.string(); break; } case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); + message.subnet = reader.string(); break; } default: @@ -4609,159 +4550,139 @@ }; /** - * Decodes a ListConnectionProfilesRequest message from the specified reader or buffer, length delimited. + * Decodes a VmCreationConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.ListConnectionProfilesRequest + * @memberof google.cloud.clouddms.v1.VmCreationConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.ListConnectionProfilesRequest} ListConnectionProfilesRequest + * @returns {google.cloud.clouddms.v1.VmCreationConfig} VmCreationConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListConnectionProfilesRequest.decodeDelimited = function decodeDelimited(reader) { + VmCreationConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListConnectionProfilesRequest message. + * Verifies a VmCreationConfig message. * @function verify - * @memberof google.cloud.clouddms.v1.ListConnectionProfilesRequest + * @memberof google.cloud.clouddms.v1.VmCreationConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListConnectionProfilesRequest.verify = function verify(message) { + VmCreationConfig.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.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; + if (message.vmMachineType != null && message.hasOwnProperty("vmMachineType")) + if (!$util.isString(message.vmMachineType)) + return "vmMachineType: string expected"; + if (message.vmZone != null && message.hasOwnProperty("vmZone")) + if (!$util.isString(message.vmZone)) + return "vmZone: string expected"; + if (message.subnet != null && message.hasOwnProperty("subnet")) + if (!$util.isString(message.subnet)) + return "subnet: string expected"; return null; }; /** - * Creates a ListConnectionProfilesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a VmCreationConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.clouddms.v1.ListConnectionProfilesRequest + * @memberof google.cloud.clouddms.v1.VmCreationConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.ListConnectionProfilesRequest} ListConnectionProfilesRequest + * @returns {google.cloud.clouddms.v1.VmCreationConfig} VmCreationConfig */ - ListConnectionProfilesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.ListConnectionProfilesRequest) + VmCreationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.VmCreationConfig) return object; - var message = new $root.google.cloud.clouddms.v1.ListConnectionProfilesRequest(); - 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.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); + var message = new $root.google.cloud.clouddms.v1.VmCreationConfig(); + if (object.vmMachineType != null) + message.vmMachineType = String(object.vmMachineType); + if (object.vmZone != null) + message.vmZone = String(object.vmZone); + if (object.subnet != null) + message.subnet = String(object.subnet); return message; }; /** - * Creates a plain object from a ListConnectionProfilesRequest message. Also converts values to other types if specified. + * Creates a plain object from a VmCreationConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.clouddms.v1.ListConnectionProfilesRequest + * @memberof google.cloud.clouddms.v1.VmCreationConfig * @static - * @param {google.cloud.clouddms.v1.ListConnectionProfilesRequest} message ListConnectionProfilesRequest + * @param {google.cloud.clouddms.v1.VmCreationConfig} message VmCreationConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListConnectionProfilesRequest.toObject = function toObject(message, options) { + VmCreationConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; + object.vmMachineType = ""; + object.vmZone = ""; + object.subnet = ""; } - 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.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; + if (message.vmMachineType != null && message.hasOwnProperty("vmMachineType")) + object.vmMachineType = message.vmMachineType; + if (message.vmZone != null && message.hasOwnProperty("vmZone")) + object.vmZone = message.vmZone; + if (message.subnet != null && message.hasOwnProperty("subnet")) + object.subnet = message.subnet; return object; }; /** - * Converts this ListConnectionProfilesRequest to JSON. + * Converts this VmCreationConfig to JSON. * @function toJSON - * @memberof google.cloud.clouddms.v1.ListConnectionProfilesRequest + * @memberof google.cloud.clouddms.v1.VmCreationConfig * @instance * @returns {Object.} JSON object */ - ListConnectionProfilesRequest.prototype.toJSON = function toJSON() { + VmCreationConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListConnectionProfilesRequest + * Gets the default type url for VmCreationConfig * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.ListConnectionProfilesRequest + * @memberof google.cloud.clouddms.v1.VmCreationConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListConnectionProfilesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + VmCreationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.clouddms.v1.ListConnectionProfilesRequest"; + return typeUrlPrefix + "/google.cloud.clouddms.v1.VmCreationConfig"; }; - return ListConnectionProfilesRequest; + return VmCreationConfig; })(); - v1.ListConnectionProfilesResponse = (function() { + v1.VmSelectionConfig = (function() { /** - * Properties of a ListConnectionProfilesResponse. + * Properties of a VmSelectionConfig. * @memberof google.cloud.clouddms.v1 - * @interface IListConnectionProfilesResponse - * @property {Array.|null} [connectionProfiles] ListConnectionProfilesResponse connectionProfiles - * @property {string|null} [nextPageToken] ListConnectionProfilesResponse nextPageToken - * @property {Array.|null} [unreachable] ListConnectionProfilesResponse unreachable + * @interface IVmSelectionConfig + * @property {string|null} [vmZone] VmSelectionConfig vmZone */ /** - * Constructs a new ListConnectionProfilesResponse. + * Constructs a new VmSelectionConfig. * @memberof google.cloud.clouddms.v1 - * @classdesc Represents a ListConnectionProfilesResponse. - * @implements IListConnectionProfilesResponse + * @classdesc Represents a VmSelectionConfig. + * @implements IVmSelectionConfig * @constructor - * @param {google.cloud.clouddms.v1.IListConnectionProfilesResponse=} [properties] Properties to set + * @param {google.cloud.clouddms.v1.IVmSelectionConfig=} [properties] Properties to set */ - function ListConnectionProfilesResponse(properties) { - this.connectionProfiles = []; - this.unreachable = []; + function VmSelectionConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4769,109 +4690,75 @@ } /** - * ListConnectionProfilesResponse connectionProfiles. - * @member {Array.} connectionProfiles - * @memberof google.cloud.clouddms.v1.ListConnectionProfilesResponse - * @instance - */ - ListConnectionProfilesResponse.prototype.connectionProfiles = $util.emptyArray; - - /** - * ListConnectionProfilesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.clouddms.v1.ListConnectionProfilesResponse + * VmSelectionConfig vmZone. + * @member {string} vmZone + * @memberof google.cloud.clouddms.v1.VmSelectionConfig * @instance */ - ListConnectionProfilesResponse.prototype.nextPageToken = ""; + VmSelectionConfig.prototype.vmZone = ""; /** - * ListConnectionProfilesResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.clouddms.v1.ListConnectionProfilesResponse - * @instance - */ - ListConnectionProfilesResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListConnectionProfilesResponse instance using the specified properties. + * Creates a new VmSelectionConfig instance using the specified properties. * @function create - * @memberof google.cloud.clouddms.v1.ListConnectionProfilesResponse + * @memberof google.cloud.clouddms.v1.VmSelectionConfig * @static - * @param {google.cloud.clouddms.v1.IListConnectionProfilesResponse=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.ListConnectionProfilesResponse} ListConnectionProfilesResponse instance + * @param {google.cloud.clouddms.v1.IVmSelectionConfig=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.VmSelectionConfig} VmSelectionConfig instance */ - ListConnectionProfilesResponse.create = function create(properties) { - return new ListConnectionProfilesResponse(properties); + VmSelectionConfig.create = function create(properties) { + return new VmSelectionConfig(properties); }; /** - * Encodes the specified ListConnectionProfilesResponse message. Does not implicitly {@link google.cloud.clouddms.v1.ListConnectionProfilesResponse.verify|verify} messages. + * Encodes the specified VmSelectionConfig message. Does not implicitly {@link google.cloud.clouddms.v1.VmSelectionConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.clouddms.v1.ListConnectionProfilesResponse + * @memberof google.cloud.clouddms.v1.VmSelectionConfig * @static - * @param {google.cloud.clouddms.v1.IListConnectionProfilesResponse} message ListConnectionProfilesResponse message or plain object to encode + * @param {google.cloud.clouddms.v1.IVmSelectionConfig} message VmSelectionConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListConnectionProfilesResponse.encode = function encode(message, writer) { + VmSelectionConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.connectionProfiles != null && message.connectionProfiles.length) - for (var i = 0; i < message.connectionProfiles.length; ++i) - $root.google.cloud.clouddms.v1.ConnectionProfile.encode(message.connectionProfiles[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); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + if (message.vmZone != null && Object.hasOwnProperty.call(message, "vmZone")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.vmZone); return writer; }; /** - * Encodes the specified ListConnectionProfilesResponse message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ListConnectionProfilesResponse.verify|verify} messages. + * Encodes the specified VmSelectionConfig message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.VmSelectionConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.ListConnectionProfilesResponse + * @memberof google.cloud.clouddms.v1.VmSelectionConfig * @static - * @param {google.cloud.clouddms.v1.IListConnectionProfilesResponse} message ListConnectionProfilesResponse message or plain object to encode + * @param {google.cloud.clouddms.v1.IVmSelectionConfig} message VmSelectionConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListConnectionProfilesResponse.encodeDelimited = function encodeDelimited(message, writer) { + VmSelectionConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListConnectionProfilesResponse message from the specified reader or buffer. + * Decodes a VmSelectionConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.clouddms.v1.ListConnectionProfilesResponse + * @memberof google.cloud.clouddms.v1.VmSelectionConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.ListConnectionProfilesResponse} ListConnectionProfilesResponse + * @returns {google.cloud.clouddms.v1.VmSelectionConfig} VmSelectionConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListConnectionProfilesResponse.decode = function decode(reader, length) { + VmSelectionConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.ListConnectionProfilesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.VmSelectionConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.connectionProfiles && message.connectionProfiles.length)) - message.connectionProfiles = []; - message.connectionProfiles.push($root.google.cloud.clouddms.v1.ConnectionProfile.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); + message.vmZone = reader.string(); break; } default: @@ -4883,169 +4770,122 @@ }; /** - * Decodes a ListConnectionProfilesResponse message from the specified reader or buffer, length delimited. + * Decodes a VmSelectionConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.ListConnectionProfilesResponse + * @memberof google.cloud.clouddms.v1.VmSelectionConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.ListConnectionProfilesResponse} ListConnectionProfilesResponse + * @returns {google.cloud.clouddms.v1.VmSelectionConfig} VmSelectionConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListConnectionProfilesResponse.decodeDelimited = function decodeDelimited(reader) { + VmSelectionConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListConnectionProfilesResponse message. + * Verifies a VmSelectionConfig message. * @function verify - * @memberof google.cloud.clouddms.v1.ListConnectionProfilesResponse + * @memberof google.cloud.clouddms.v1.VmSelectionConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListConnectionProfilesResponse.verify = function verify(message) { + VmSelectionConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.connectionProfiles != null && message.hasOwnProperty("connectionProfiles")) { - if (!Array.isArray(message.connectionProfiles)) - return "connectionProfiles: array expected"; - for (var i = 0; i < message.connectionProfiles.length; ++i) { - var error = $root.google.cloud.clouddms.v1.ConnectionProfile.verify(message.connectionProfiles[i]); - if (error) - return "connectionProfiles." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; - } + if (message.vmZone != null && message.hasOwnProperty("vmZone")) + if (!$util.isString(message.vmZone)) + return "vmZone: string expected"; return null; }; /** - * Creates a ListConnectionProfilesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a VmSelectionConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.clouddms.v1.ListConnectionProfilesResponse + * @memberof google.cloud.clouddms.v1.VmSelectionConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.ListConnectionProfilesResponse} ListConnectionProfilesResponse + * @returns {google.cloud.clouddms.v1.VmSelectionConfig} VmSelectionConfig */ - ListConnectionProfilesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.ListConnectionProfilesResponse) + VmSelectionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.VmSelectionConfig) return object; - var message = new $root.google.cloud.clouddms.v1.ListConnectionProfilesResponse(); - if (object.connectionProfiles) { - if (!Array.isArray(object.connectionProfiles)) - throw TypeError(".google.cloud.clouddms.v1.ListConnectionProfilesResponse.connectionProfiles: array expected"); - message.connectionProfiles = []; - for (var i = 0; i < object.connectionProfiles.length; ++i) { - if (typeof object.connectionProfiles[i] !== "object") - throw TypeError(".google.cloud.clouddms.v1.ListConnectionProfilesResponse.connectionProfiles: object expected"); - message.connectionProfiles[i] = $root.google.cloud.clouddms.v1.ConnectionProfile.fromObject(object.connectionProfiles[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.clouddms.v1.ListConnectionProfilesResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } + var message = new $root.google.cloud.clouddms.v1.VmSelectionConfig(); + if (object.vmZone != null) + message.vmZone = String(object.vmZone); return message; }; /** - * Creates a plain object from a ListConnectionProfilesResponse message. Also converts values to other types if specified. + * Creates a plain object from a VmSelectionConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.clouddms.v1.ListConnectionProfilesResponse + * @memberof google.cloud.clouddms.v1.VmSelectionConfig * @static - * @param {google.cloud.clouddms.v1.ListConnectionProfilesResponse} message ListConnectionProfilesResponse + * @param {google.cloud.clouddms.v1.VmSelectionConfig} message VmSelectionConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListConnectionProfilesResponse.toObject = function toObject(message, options) { + VmSelectionConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.connectionProfiles = []; - object.unreachable = []; - } if (options.defaults) - object.nextPageToken = ""; - if (message.connectionProfiles && message.connectionProfiles.length) { - object.connectionProfiles = []; - for (var j = 0; j < message.connectionProfiles.length; ++j) - object.connectionProfiles[j] = $root.google.cloud.clouddms.v1.ConnectionProfile.toObject(message.connectionProfiles[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; - } + object.vmZone = ""; + if (message.vmZone != null && message.hasOwnProperty("vmZone")) + object.vmZone = message.vmZone; return object; }; /** - * Converts this ListConnectionProfilesResponse to JSON. + * Converts this VmSelectionConfig to JSON. * @function toJSON - * @memberof google.cloud.clouddms.v1.ListConnectionProfilesResponse + * @memberof google.cloud.clouddms.v1.VmSelectionConfig * @instance * @returns {Object.} JSON object */ - ListConnectionProfilesResponse.prototype.toJSON = function toJSON() { + VmSelectionConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListConnectionProfilesResponse + * Gets the default type url for VmSelectionConfig * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.ListConnectionProfilesResponse + * @memberof google.cloud.clouddms.v1.VmSelectionConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListConnectionProfilesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + VmSelectionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.clouddms.v1.ListConnectionProfilesResponse"; + return typeUrlPrefix + "/google.cloud.clouddms.v1.VmSelectionConfig"; }; - return ListConnectionProfilesResponse; + return VmSelectionConfig; })(); - v1.GetConnectionProfileRequest = (function() { + v1.SshScript = (function() { /** - * Properties of a GetConnectionProfileRequest. + * Properties of a SshScript. * @memberof google.cloud.clouddms.v1 - * @interface IGetConnectionProfileRequest - * @property {string|null} [name] GetConnectionProfileRequest name + * @interface ISshScript + * @property {string|null} [script] SshScript script */ /** - * Constructs a new GetConnectionProfileRequest. + * Constructs a new SshScript. * @memberof google.cloud.clouddms.v1 - * @classdesc Represents a GetConnectionProfileRequest. - * @implements IGetConnectionProfileRequest + * @classdesc Represents a SshScript. + * @implements ISshScript * @constructor - * @param {google.cloud.clouddms.v1.IGetConnectionProfileRequest=} [properties] Properties to set + * @param {google.cloud.clouddms.v1.ISshScript=} [properties] Properties to set */ - function GetConnectionProfileRequest(properties) { + function SshScript(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5053,75 +4893,75 @@ } /** - * GetConnectionProfileRequest name. - * @member {string} name - * @memberof google.cloud.clouddms.v1.GetConnectionProfileRequest + * SshScript script. + * @member {string} script + * @memberof google.cloud.clouddms.v1.SshScript * @instance */ - GetConnectionProfileRequest.prototype.name = ""; + SshScript.prototype.script = ""; /** - * Creates a new GetConnectionProfileRequest instance using the specified properties. + * Creates a new SshScript instance using the specified properties. * @function create - * @memberof google.cloud.clouddms.v1.GetConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.SshScript * @static - * @param {google.cloud.clouddms.v1.IGetConnectionProfileRequest=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.GetConnectionProfileRequest} GetConnectionProfileRequest instance + * @param {google.cloud.clouddms.v1.ISshScript=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.SshScript} SshScript instance */ - GetConnectionProfileRequest.create = function create(properties) { - return new GetConnectionProfileRequest(properties); + SshScript.create = function create(properties) { + return new SshScript(properties); }; /** - * Encodes the specified GetConnectionProfileRequest message. Does not implicitly {@link google.cloud.clouddms.v1.GetConnectionProfileRequest.verify|verify} messages. + * Encodes the specified SshScript message. Does not implicitly {@link google.cloud.clouddms.v1.SshScript.verify|verify} messages. * @function encode - * @memberof google.cloud.clouddms.v1.GetConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.SshScript * @static - * @param {google.cloud.clouddms.v1.IGetConnectionProfileRequest} message GetConnectionProfileRequest message or plain object to encode + * @param {google.cloud.clouddms.v1.ISshScript} message SshScript message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetConnectionProfileRequest.encode = function encode(message, writer) { + SshScript.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.script != null && Object.hasOwnProperty.call(message, "script")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.script); return writer; }; /** - * Encodes the specified GetConnectionProfileRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.GetConnectionProfileRequest.verify|verify} messages. + * Encodes the specified SshScript message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.SshScript.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.GetConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.SshScript * @static - * @param {google.cloud.clouddms.v1.IGetConnectionProfileRequest} message GetConnectionProfileRequest message or plain object to encode + * @param {google.cloud.clouddms.v1.ISshScript} message SshScript message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetConnectionProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { + SshScript.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetConnectionProfileRequest message from the specified reader or buffer. + * Decodes a SshScript message from the specified reader or buffer. * @function decode - * @memberof google.cloud.clouddms.v1.GetConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.SshScript * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.GetConnectionProfileRequest} GetConnectionProfileRequest + * @returns {google.cloud.clouddms.v1.SshScript} SshScript * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetConnectionProfileRequest.decode = function decode(reader, length) { + SshScript.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.GetConnectionProfileRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.SshScript(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.script = reader.string(); break; } default: @@ -5133,125 +4973,126 @@ }; /** - * Decodes a GetConnectionProfileRequest message from the specified reader or buffer, length delimited. + * Decodes a SshScript message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.GetConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.SshScript * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.GetConnectionProfileRequest} GetConnectionProfileRequest + * @returns {google.cloud.clouddms.v1.SshScript} SshScript * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetConnectionProfileRequest.decodeDelimited = function decodeDelimited(reader) { + SshScript.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetConnectionProfileRequest message. + * Verifies a SshScript message. * @function verify - * @memberof google.cloud.clouddms.v1.GetConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.SshScript * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetConnectionProfileRequest.verify = function verify(message) { + SshScript.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.script != null && message.hasOwnProperty("script")) + if (!$util.isString(message.script)) + return "script: string expected"; return null; }; /** - * Creates a GetConnectionProfileRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SshScript message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.clouddms.v1.GetConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.SshScript * @static * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.GetConnectionProfileRequest} GetConnectionProfileRequest + * @returns {google.cloud.clouddms.v1.SshScript} SshScript */ - GetConnectionProfileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.GetConnectionProfileRequest) + SshScript.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.SshScript) return object; - var message = new $root.google.cloud.clouddms.v1.GetConnectionProfileRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.clouddms.v1.SshScript(); + if (object.script != null) + message.script = String(object.script); return message; }; /** - * Creates a plain object from a GetConnectionProfileRequest message. Also converts values to other types if specified. + * Creates a plain object from a SshScript message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.clouddms.v1.GetConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.SshScript * @static - * @param {google.cloud.clouddms.v1.GetConnectionProfileRequest} message GetConnectionProfileRequest + * @param {google.cloud.clouddms.v1.SshScript} message SshScript * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetConnectionProfileRequest.toObject = function toObject(message, options) { + SshScript.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; + object.script = ""; + if (message.script != null && message.hasOwnProperty("script")) + object.script = message.script; return object; }; /** - * Converts this GetConnectionProfileRequest to JSON. + * Converts this SshScript to JSON. * @function toJSON - * @memberof google.cloud.clouddms.v1.GetConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.SshScript * @instance * @returns {Object.} JSON object */ - GetConnectionProfileRequest.prototype.toJSON = function toJSON() { + SshScript.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetConnectionProfileRequest + * Gets the default type url for SshScript * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.GetConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.SshScript * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetConnectionProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SshScript.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.clouddms.v1.GetConnectionProfileRequest"; + return typeUrlPrefix + "/google.cloud.clouddms.v1.SshScript"; }; - return GetConnectionProfileRequest; + return SshScript; })(); - v1.CreateConnectionProfileRequest = (function() { + v1.ListConnectionProfilesRequest = (function() { /** - * Properties of a CreateConnectionProfileRequest. + * Properties of a ListConnectionProfilesRequest. * @memberof google.cloud.clouddms.v1 - * @interface ICreateConnectionProfileRequest - * @property {string|null} [parent] CreateConnectionProfileRequest parent - * @property {string|null} [connectionProfileId] CreateConnectionProfileRequest connectionProfileId - * @property {google.cloud.clouddms.v1.IConnectionProfile|null} [connectionProfile] CreateConnectionProfileRequest connectionProfile - * @property {string|null} [requestId] CreateConnectionProfileRequest requestId + * @interface IListConnectionProfilesRequest + * @property {string|null} [parent] ListConnectionProfilesRequest parent + * @property {number|null} [pageSize] ListConnectionProfilesRequest pageSize + * @property {string|null} [pageToken] ListConnectionProfilesRequest pageToken + * @property {string|null} [filter] ListConnectionProfilesRequest filter + * @property {string|null} [orderBy] ListConnectionProfilesRequest orderBy */ /** - * Constructs a new CreateConnectionProfileRequest. + * Constructs a new ListConnectionProfilesRequest. * @memberof google.cloud.clouddms.v1 - * @classdesc Represents a CreateConnectionProfileRequest. - * @implements ICreateConnectionProfileRequest + * @classdesc Represents a ListConnectionProfilesRequest. + * @implements IListConnectionProfilesRequest * @constructor - * @param {google.cloud.clouddms.v1.ICreateConnectionProfileRequest=} [properties] Properties to set + * @param {google.cloud.clouddms.v1.IListConnectionProfilesRequest=} [properties] Properties to set */ - function CreateConnectionProfileRequest(properties) { + function ListConnectionProfilesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5259,100 +5100,110 @@ } /** - * CreateConnectionProfileRequest parent. + * ListConnectionProfilesRequest parent. * @member {string} parent - * @memberof google.cloud.clouddms.v1.CreateConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.ListConnectionProfilesRequest * @instance */ - CreateConnectionProfileRequest.prototype.parent = ""; + ListConnectionProfilesRequest.prototype.parent = ""; /** - * CreateConnectionProfileRequest connectionProfileId. - * @member {string} connectionProfileId - * @memberof google.cloud.clouddms.v1.CreateConnectionProfileRequest + * ListConnectionProfilesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.clouddms.v1.ListConnectionProfilesRequest * @instance */ - CreateConnectionProfileRequest.prototype.connectionProfileId = ""; + ListConnectionProfilesRequest.prototype.pageSize = 0; /** - * CreateConnectionProfileRequest connectionProfile. - * @member {google.cloud.clouddms.v1.IConnectionProfile|null|undefined} connectionProfile - * @memberof google.cloud.clouddms.v1.CreateConnectionProfileRequest + * ListConnectionProfilesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.clouddms.v1.ListConnectionProfilesRequest * @instance */ - CreateConnectionProfileRequest.prototype.connectionProfile = null; + ListConnectionProfilesRequest.prototype.pageToken = ""; /** - * CreateConnectionProfileRequest requestId. - * @member {string} requestId - * @memberof google.cloud.clouddms.v1.CreateConnectionProfileRequest + * ListConnectionProfilesRequest filter. + * @member {string} filter + * @memberof google.cloud.clouddms.v1.ListConnectionProfilesRequest * @instance */ - CreateConnectionProfileRequest.prototype.requestId = ""; + ListConnectionProfilesRequest.prototype.filter = ""; /** - * Creates a new CreateConnectionProfileRequest instance using the specified properties. + * ListConnectionProfilesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.clouddms.v1.ListConnectionProfilesRequest + * @instance + */ + ListConnectionProfilesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListConnectionProfilesRequest instance using the specified properties. * @function create - * @memberof google.cloud.clouddms.v1.CreateConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.ListConnectionProfilesRequest * @static - * @param {google.cloud.clouddms.v1.ICreateConnectionProfileRequest=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.CreateConnectionProfileRequest} CreateConnectionProfileRequest instance + * @param {google.cloud.clouddms.v1.IListConnectionProfilesRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.ListConnectionProfilesRequest} ListConnectionProfilesRequest instance */ - CreateConnectionProfileRequest.create = function create(properties) { - return new CreateConnectionProfileRequest(properties); + ListConnectionProfilesRequest.create = function create(properties) { + return new ListConnectionProfilesRequest(properties); }; /** - * Encodes the specified CreateConnectionProfileRequest message. Does not implicitly {@link google.cloud.clouddms.v1.CreateConnectionProfileRequest.verify|verify} messages. + * Encodes the specified ListConnectionProfilesRequest message. Does not implicitly {@link google.cloud.clouddms.v1.ListConnectionProfilesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.clouddms.v1.CreateConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.ListConnectionProfilesRequest * @static - * @param {google.cloud.clouddms.v1.ICreateConnectionProfileRequest} message CreateConnectionProfileRequest message or plain object to encode + * @param {google.cloud.clouddms.v1.IListConnectionProfilesRequest} message ListConnectionProfilesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateConnectionProfileRequest.encode = function encode(message, writer) { + ListConnectionProfilesRequest.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.connectionProfileId != null && Object.hasOwnProperty.call(message, "connectionProfileId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.connectionProfileId); - if (message.connectionProfile != null && Object.hasOwnProperty.call(message, "connectionProfile")) - $root.google.cloud.clouddms.v1.ConnectionProfile.encode(message.connectionProfile, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + 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.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified CreateConnectionProfileRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.CreateConnectionProfileRequest.verify|verify} messages. + * Encodes the specified ListConnectionProfilesRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ListConnectionProfilesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.CreateConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.ListConnectionProfilesRequest * @static - * @param {google.cloud.clouddms.v1.ICreateConnectionProfileRequest} message CreateConnectionProfileRequest message or plain object to encode + * @param {google.cloud.clouddms.v1.IListConnectionProfilesRequest} message ListConnectionProfilesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateConnectionProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListConnectionProfilesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateConnectionProfileRequest message from the specified reader or buffer. + * Decodes a ListConnectionProfilesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.clouddms.v1.CreateConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.ListConnectionProfilesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.CreateConnectionProfileRequest} CreateConnectionProfileRequest + * @returns {google.cloud.clouddms.v1.ListConnectionProfilesRequest} ListConnectionProfilesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateConnectionProfileRequest.decode = function decode(reader, length) { + ListConnectionProfilesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.CreateConnectionProfileRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.ListConnectionProfilesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -5361,15 +5212,19 @@ break; } case 2: { - message.connectionProfileId = reader.string(); + message.pageSize = reader.int32(); break; } case 3: { - message.connectionProfile = $root.google.cloud.clouddms.v1.ConnectionProfile.decode(reader, reader.uint32()); + message.pageToken = reader.string(); break; } case 4: { - message.requestId = reader.string(); + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); break; } default: @@ -5381,154 +5236,159 @@ }; /** - * Decodes a CreateConnectionProfileRequest message from the specified reader or buffer, length delimited. + * Decodes a ListConnectionProfilesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.CreateConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.ListConnectionProfilesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.CreateConnectionProfileRequest} CreateConnectionProfileRequest + * @returns {google.cloud.clouddms.v1.ListConnectionProfilesRequest} ListConnectionProfilesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateConnectionProfileRequest.decodeDelimited = function decodeDelimited(reader) { + ListConnectionProfilesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateConnectionProfileRequest message. + * Verifies a ListConnectionProfilesRequest message. * @function verify - * @memberof google.cloud.clouddms.v1.CreateConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.ListConnectionProfilesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateConnectionProfileRequest.verify = function verify(message) { + ListConnectionProfilesRequest.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.connectionProfileId != null && message.hasOwnProperty("connectionProfileId")) - if (!$util.isString(message.connectionProfileId)) - return "connectionProfileId: string expected"; - if (message.connectionProfile != null && message.hasOwnProperty("connectionProfile")) { - var error = $root.google.cloud.clouddms.v1.ConnectionProfile.verify(message.connectionProfile); - if (error) - return "connectionProfile." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: 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.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; return null; }; /** - * Creates a CreateConnectionProfileRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListConnectionProfilesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.clouddms.v1.CreateConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.ListConnectionProfilesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.CreateConnectionProfileRequest} CreateConnectionProfileRequest + * @returns {google.cloud.clouddms.v1.ListConnectionProfilesRequest} ListConnectionProfilesRequest */ - CreateConnectionProfileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.CreateConnectionProfileRequest) + ListConnectionProfilesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.ListConnectionProfilesRequest) return object; - var message = new $root.google.cloud.clouddms.v1.CreateConnectionProfileRequest(); + var message = new $root.google.cloud.clouddms.v1.ListConnectionProfilesRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.connectionProfileId != null) - message.connectionProfileId = String(object.connectionProfileId); - if (object.connectionProfile != null) { - if (typeof object.connectionProfile !== "object") - throw TypeError(".google.cloud.clouddms.v1.CreateConnectionProfileRequest.connectionProfile: object expected"); - message.connectionProfile = $root.google.cloud.clouddms.v1.ConnectionProfile.fromObject(object.connectionProfile); - } - if (object.requestId != null) - message.requestId = String(object.requestId); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); return message; }; /** - * Creates a plain object from a CreateConnectionProfileRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListConnectionProfilesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.clouddms.v1.CreateConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.ListConnectionProfilesRequest * @static - * @param {google.cloud.clouddms.v1.CreateConnectionProfileRequest} message CreateConnectionProfileRequest + * @param {google.cloud.clouddms.v1.ListConnectionProfilesRequest} message ListConnectionProfilesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateConnectionProfileRequest.toObject = function toObject(message, options) { + ListConnectionProfilesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.connectionProfileId = ""; - object.connectionProfile = null; - object.requestId = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.connectionProfileId != null && message.hasOwnProperty("connectionProfileId")) - object.connectionProfileId = message.connectionProfileId; - if (message.connectionProfile != null && message.hasOwnProperty("connectionProfile")) - object.connectionProfile = $root.google.cloud.clouddms.v1.ConnectionProfile.toObject(message.connectionProfile, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; return object; }; /** - * Converts this CreateConnectionProfileRequest to JSON. + * Converts this ListConnectionProfilesRequest to JSON. * @function toJSON - * @memberof google.cloud.clouddms.v1.CreateConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.ListConnectionProfilesRequest * @instance * @returns {Object.} JSON object */ - CreateConnectionProfileRequest.prototype.toJSON = function toJSON() { + ListConnectionProfilesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateConnectionProfileRequest + * Gets the default type url for ListConnectionProfilesRequest * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.CreateConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.ListConnectionProfilesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateConnectionProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListConnectionProfilesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.clouddms.v1.CreateConnectionProfileRequest"; + return typeUrlPrefix + "/google.cloud.clouddms.v1.ListConnectionProfilesRequest"; }; - return CreateConnectionProfileRequest; + return ListConnectionProfilesRequest; })(); - v1.UpdateConnectionProfileRequest = (function() { + v1.ListConnectionProfilesResponse = (function() { /** - * Properties of an UpdateConnectionProfileRequest. + * Properties of a ListConnectionProfilesResponse. * @memberof google.cloud.clouddms.v1 - * @interface IUpdateConnectionProfileRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateConnectionProfileRequest updateMask - * @property {google.cloud.clouddms.v1.IConnectionProfile|null} [connectionProfile] UpdateConnectionProfileRequest connectionProfile - * @property {string|null} [requestId] UpdateConnectionProfileRequest requestId + * @interface IListConnectionProfilesResponse + * @property {Array.|null} [connectionProfiles] ListConnectionProfilesResponse connectionProfiles + * @property {string|null} [nextPageToken] ListConnectionProfilesResponse nextPageToken + * @property {Array.|null} [unreachable] ListConnectionProfilesResponse unreachable */ /** - * Constructs a new UpdateConnectionProfileRequest. + * Constructs a new ListConnectionProfilesResponse. * @memberof google.cloud.clouddms.v1 - * @classdesc Represents an UpdateConnectionProfileRequest. - * @implements IUpdateConnectionProfileRequest + * @classdesc Represents a ListConnectionProfilesResponse. + * @implements IListConnectionProfilesResponse * @constructor - * @param {google.cloud.clouddms.v1.IUpdateConnectionProfileRequest=} [properties] Properties to set + * @param {google.cloud.clouddms.v1.IListConnectionProfilesResponse=} [properties] Properties to set */ - function UpdateConnectionProfileRequest(properties) { + function ListConnectionProfilesResponse(properties) { + this.connectionProfiles = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5536,103 +5396,109 @@ } /** - * UpdateConnectionProfileRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.clouddms.v1.UpdateConnectionProfileRequest + * ListConnectionProfilesResponse connectionProfiles. + * @member {Array.} connectionProfiles + * @memberof google.cloud.clouddms.v1.ListConnectionProfilesResponse * @instance */ - UpdateConnectionProfileRequest.prototype.updateMask = null; + ListConnectionProfilesResponse.prototype.connectionProfiles = $util.emptyArray; /** - * UpdateConnectionProfileRequest connectionProfile. - * @member {google.cloud.clouddms.v1.IConnectionProfile|null|undefined} connectionProfile - * @memberof google.cloud.clouddms.v1.UpdateConnectionProfileRequest + * ListConnectionProfilesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.clouddms.v1.ListConnectionProfilesResponse * @instance */ - UpdateConnectionProfileRequest.prototype.connectionProfile = null; + ListConnectionProfilesResponse.prototype.nextPageToken = ""; /** - * UpdateConnectionProfileRequest requestId. - * @member {string} requestId - * @memberof google.cloud.clouddms.v1.UpdateConnectionProfileRequest + * ListConnectionProfilesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.clouddms.v1.ListConnectionProfilesResponse * @instance */ - UpdateConnectionProfileRequest.prototype.requestId = ""; + ListConnectionProfilesResponse.prototype.unreachable = $util.emptyArray; /** - * Creates a new UpdateConnectionProfileRequest instance using the specified properties. + * Creates a new ListConnectionProfilesResponse instance using the specified properties. * @function create - * @memberof google.cloud.clouddms.v1.UpdateConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.ListConnectionProfilesResponse * @static - * @param {google.cloud.clouddms.v1.IUpdateConnectionProfileRequest=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.UpdateConnectionProfileRequest} UpdateConnectionProfileRequest instance + * @param {google.cloud.clouddms.v1.IListConnectionProfilesResponse=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.ListConnectionProfilesResponse} ListConnectionProfilesResponse instance */ - UpdateConnectionProfileRequest.create = function create(properties) { - return new UpdateConnectionProfileRequest(properties); + ListConnectionProfilesResponse.create = function create(properties) { + return new ListConnectionProfilesResponse(properties); }; /** - * Encodes the specified UpdateConnectionProfileRequest message. Does not implicitly {@link google.cloud.clouddms.v1.UpdateConnectionProfileRequest.verify|verify} messages. + * Encodes the specified ListConnectionProfilesResponse message. Does not implicitly {@link google.cloud.clouddms.v1.ListConnectionProfilesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.clouddms.v1.UpdateConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.ListConnectionProfilesResponse * @static - * @param {google.cloud.clouddms.v1.IUpdateConnectionProfileRequest} message UpdateConnectionProfileRequest message or plain object to encode + * @param {google.cloud.clouddms.v1.IListConnectionProfilesResponse} message ListConnectionProfilesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateConnectionProfileRequest.encode = function encode(message, writer) { + ListConnectionProfilesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.connectionProfile != null && Object.hasOwnProperty.call(message, "connectionProfile")) - $root.google.cloud.clouddms.v1.ConnectionProfile.encode(message.connectionProfile, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + if (message.connectionProfiles != null && message.connectionProfiles.length) + for (var i = 0; i < message.connectionProfiles.length; ++i) + $root.google.cloud.clouddms.v1.ConnectionProfile.encode(message.connectionProfiles[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); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); return writer; }; /** - * Encodes the specified UpdateConnectionProfileRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.UpdateConnectionProfileRequest.verify|verify} messages. + * Encodes the specified ListConnectionProfilesResponse message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ListConnectionProfilesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.UpdateConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.ListConnectionProfilesResponse * @static - * @param {google.cloud.clouddms.v1.IUpdateConnectionProfileRequest} message UpdateConnectionProfileRequest message or plain object to encode + * @param {google.cloud.clouddms.v1.IListConnectionProfilesResponse} message ListConnectionProfilesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateConnectionProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListConnectionProfilesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateConnectionProfileRequest message from the specified reader or buffer. + * Decodes a ListConnectionProfilesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.clouddms.v1.UpdateConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.ListConnectionProfilesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.UpdateConnectionProfileRequest} UpdateConnectionProfileRequest + * @returns {google.cloud.clouddms.v1.ListConnectionProfilesResponse} ListConnectionProfilesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateConnectionProfileRequest.decode = function decode(reader, length) { + ListConnectionProfilesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.UpdateConnectionProfileRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.ListConnectionProfilesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + if (!(message.connectionProfiles && message.connectionProfiles.length)) + message.connectionProfiles = []; + message.connectionProfiles.push($root.google.cloud.clouddms.v1.ConnectionProfile.decode(reader, reader.uint32())); break; } case 2: { - message.connectionProfile = $root.google.cloud.clouddms.v1.ConnectionProfile.decode(reader, reader.uint32()); + message.nextPageToken = reader.string(); break; } case 3: { - message.requestId = reader.string(); + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); break; } default: @@ -5644,151 +5510,169 @@ }; /** - * Decodes an UpdateConnectionProfileRequest message from the specified reader or buffer, length delimited. + * Decodes a ListConnectionProfilesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.UpdateConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.ListConnectionProfilesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.UpdateConnectionProfileRequest} UpdateConnectionProfileRequest + * @returns {google.cloud.clouddms.v1.ListConnectionProfilesResponse} ListConnectionProfilesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateConnectionProfileRequest.decodeDelimited = function decodeDelimited(reader) { + ListConnectionProfilesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateConnectionProfileRequest message. + * Verifies a ListConnectionProfilesResponse message. * @function verify - * @memberof google.cloud.clouddms.v1.UpdateConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.ListConnectionProfilesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateConnectionProfileRequest.verify = function verify(message) { + ListConnectionProfilesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.connectionProfiles != null && message.hasOwnProperty("connectionProfiles")) { + if (!Array.isArray(message.connectionProfiles)) + return "connectionProfiles: array expected"; + for (var i = 0; i < message.connectionProfiles.length; ++i) { + var error = $root.google.cloud.clouddms.v1.ConnectionProfile.verify(message.connectionProfiles[i]); + if (error) + return "connectionProfiles." + error; + } } - if (message.connectionProfile != null && message.hasOwnProperty("connectionProfile")) { - var error = $root.google.cloud.clouddms.v1.ConnectionProfile.verify(message.connectionProfile); - if (error) - return "connectionProfile." + error; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; return null; }; /** - * Creates an UpdateConnectionProfileRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListConnectionProfilesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.clouddms.v1.UpdateConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.ListConnectionProfilesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.UpdateConnectionProfileRequest} UpdateConnectionProfileRequest + * @returns {google.cloud.clouddms.v1.ListConnectionProfilesResponse} ListConnectionProfilesResponse */ - UpdateConnectionProfileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.UpdateConnectionProfileRequest) + ListConnectionProfilesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.ListConnectionProfilesResponse) return object; - var message = new $root.google.cloud.clouddms.v1.UpdateConnectionProfileRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.clouddms.v1.UpdateConnectionProfileRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.clouddms.v1.ListConnectionProfilesResponse(); + if (object.connectionProfiles) { + if (!Array.isArray(object.connectionProfiles)) + throw TypeError(".google.cloud.clouddms.v1.ListConnectionProfilesResponse.connectionProfiles: array expected"); + message.connectionProfiles = []; + for (var i = 0; i < object.connectionProfiles.length; ++i) { + if (typeof object.connectionProfiles[i] !== "object") + throw TypeError(".google.cloud.clouddms.v1.ListConnectionProfilesResponse.connectionProfiles: object expected"); + message.connectionProfiles[i] = $root.google.cloud.clouddms.v1.ConnectionProfile.fromObject(object.connectionProfiles[i]); + } } - if (object.connectionProfile != null) { - if (typeof object.connectionProfile !== "object") - throw TypeError(".google.cloud.clouddms.v1.UpdateConnectionProfileRequest.connectionProfile: object expected"); - message.connectionProfile = $root.google.cloud.clouddms.v1.ConnectionProfile.fromObject(object.connectionProfile); + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.clouddms.v1.ListConnectionProfilesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); } - if (object.requestId != null) - message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from an UpdateConnectionProfileRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListConnectionProfilesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.clouddms.v1.UpdateConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.ListConnectionProfilesResponse * @static - * @param {google.cloud.clouddms.v1.UpdateConnectionProfileRequest} message UpdateConnectionProfileRequest + * @param {google.cloud.clouddms.v1.ListConnectionProfilesResponse} message ListConnectionProfilesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateConnectionProfileRequest.toObject = function toObject(message, options) { + ListConnectionProfilesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.updateMask = null; - object.connectionProfile = null; - object.requestId = ""; + if (options.arrays || options.defaults) { + object.connectionProfiles = []; + object.unreachable = []; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.connectionProfile != null && message.hasOwnProperty("connectionProfile")) - object.connectionProfile = $root.google.cloud.clouddms.v1.ConnectionProfile.toObject(message.connectionProfile, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; + if (options.defaults) + object.nextPageToken = ""; + if (message.connectionProfiles && message.connectionProfiles.length) { + object.connectionProfiles = []; + for (var j = 0; j < message.connectionProfiles.length; ++j) + object.connectionProfiles[j] = $root.google.cloud.clouddms.v1.ConnectionProfile.toObject(message.connectionProfiles[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; /** - * Converts this UpdateConnectionProfileRequest to JSON. + * Converts this ListConnectionProfilesResponse to JSON. * @function toJSON - * @memberof google.cloud.clouddms.v1.UpdateConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.ListConnectionProfilesResponse * @instance * @returns {Object.} JSON object */ - UpdateConnectionProfileRequest.prototype.toJSON = function toJSON() { + ListConnectionProfilesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateConnectionProfileRequest + * Gets the default type url for ListConnectionProfilesResponse * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.UpdateConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.ListConnectionProfilesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateConnectionProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListConnectionProfilesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.clouddms.v1.UpdateConnectionProfileRequest"; + return typeUrlPrefix + "/google.cloud.clouddms.v1.ListConnectionProfilesResponse"; }; - return UpdateConnectionProfileRequest; + return ListConnectionProfilesResponse; })(); - v1.DeleteConnectionProfileRequest = (function() { + v1.GetConnectionProfileRequest = (function() { /** - * Properties of a DeleteConnectionProfileRequest. + * Properties of a GetConnectionProfileRequest. * @memberof google.cloud.clouddms.v1 - * @interface IDeleteConnectionProfileRequest - * @property {string|null} [name] DeleteConnectionProfileRequest name - * @property {string|null} [requestId] DeleteConnectionProfileRequest requestId - * @property {boolean|null} [force] DeleteConnectionProfileRequest force + * @interface IGetConnectionProfileRequest + * @property {string|null} [name] GetConnectionProfileRequest name */ /** - * Constructs a new DeleteConnectionProfileRequest. + * Constructs a new GetConnectionProfileRequest. * @memberof google.cloud.clouddms.v1 - * @classdesc Represents a DeleteConnectionProfileRequest. - * @implements IDeleteConnectionProfileRequest + * @classdesc Represents a GetConnectionProfileRequest. + * @implements IGetConnectionProfileRequest * @constructor - * @param {google.cloud.clouddms.v1.IDeleteConnectionProfileRequest=} [properties] Properties to set + * @param {google.cloud.clouddms.v1.IGetConnectionProfileRequest=} [properties] Properties to set */ - function DeleteConnectionProfileRequest(properties) { + function GetConnectionProfileRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5796,90 +5680,70 @@ } /** - * DeleteConnectionProfileRequest name. + * GetConnectionProfileRequest name. * @member {string} name - * @memberof google.cloud.clouddms.v1.DeleteConnectionProfileRequest - * @instance - */ - DeleteConnectionProfileRequest.prototype.name = ""; - - /** - * DeleteConnectionProfileRequest requestId. - * @member {string} requestId - * @memberof google.cloud.clouddms.v1.DeleteConnectionProfileRequest - * @instance - */ - DeleteConnectionProfileRequest.prototype.requestId = ""; - - /** - * DeleteConnectionProfileRequest force. - * @member {boolean} force - * @memberof google.cloud.clouddms.v1.DeleteConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.GetConnectionProfileRequest * @instance */ - DeleteConnectionProfileRequest.prototype.force = false; + GetConnectionProfileRequest.prototype.name = ""; /** - * Creates a new DeleteConnectionProfileRequest instance using the specified properties. + * Creates a new GetConnectionProfileRequest instance using the specified properties. * @function create - * @memberof google.cloud.clouddms.v1.DeleteConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.GetConnectionProfileRequest * @static - * @param {google.cloud.clouddms.v1.IDeleteConnectionProfileRequest=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.DeleteConnectionProfileRequest} DeleteConnectionProfileRequest instance + * @param {google.cloud.clouddms.v1.IGetConnectionProfileRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.GetConnectionProfileRequest} GetConnectionProfileRequest instance */ - DeleteConnectionProfileRequest.create = function create(properties) { - return new DeleteConnectionProfileRequest(properties); + GetConnectionProfileRequest.create = function create(properties) { + return new GetConnectionProfileRequest(properties); }; /** - * Encodes the specified DeleteConnectionProfileRequest message. Does not implicitly {@link google.cloud.clouddms.v1.DeleteConnectionProfileRequest.verify|verify} messages. + * Encodes the specified GetConnectionProfileRequest message. Does not implicitly {@link google.cloud.clouddms.v1.GetConnectionProfileRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.clouddms.v1.DeleteConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.GetConnectionProfileRequest * @static - * @param {google.cloud.clouddms.v1.IDeleteConnectionProfileRequest} message DeleteConnectionProfileRequest message or plain object to encode + * @param {google.cloud.clouddms.v1.IGetConnectionProfileRequest} message GetConnectionProfileRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteConnectionProfileRequest.encode = function encode(message, writer) { + GetConnectionProfileRequest.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.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); return writer; }; /** - * Encodes the specified DeleteConnectionProfileRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.DeleteConnectionProfileRequest.verify|verify} messages. + * Encodes the specified GetConnectionProfileRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.GetConnectionProfileRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.DeleteConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.GetConnectionProfileRequest * @static - * @param {google.cloud.clouddms.v1.IDeleteConnectionProfileRequest} message DeleteConnectionProfileRequest message or plain object to encode + * @param {google.cloud.clouddms.v1.IGetConnectionProfileRequest} message GetConnectionProfileRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteConnectionProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetConnectionProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteConnectionProfileRequest message from the specified reader or buffer. + * Decodes a GetConnectionProfileRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.clouddms.v1.DeleteConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.GetConnectionProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.DeleteConnectionProfileRequest} DeleteConnectionProfileRequest + * @returns {google.cloud.clouddms.v1.GetConnectionProfileRequest} GetConnectionProfileRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteConnectionProfileRequest.decode = function decode(reader, length) { + GetConnectionProfileRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.DeleteConnectionProfileRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.GetConnectionProfileRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -5887,14 +5751,6 @@ message.name = reader.string(); break; } - case 2: { - message.requestId = reader.string(); - break; - } - case 3: { - message.force = reader.bool(); - break; - } default: reader.skipType(tag & 7); break; @@ -5904,145 +5760,127 @@ }; /** - * Decodes a DeleteConnectionProfileRequest message from the specified reader or buffer, length delimited. + * Decodes a GetConnectionProfileRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.DeleteConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.GetConnectionProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.DeleteConnectionProfileRequest} DeleteConnectionProfileRequest + * @returns {google.cloud.clouddms.v1.GetConnectionProfileRequest} GetConnectionProfileRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteConnectionProfileRequest.decodeDelimited = function decodeDelimited(reader) { + GetConnectionProfileRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteConnectionProfileRequest message. + * Verifies a GetConnectionProfileRequest message. * @function verify - * @memberof google.cloud.clouddms.v1.DeleteConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.GetConnectionProfileRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteConnectionProfileRequest.verify = function verify(message) { + GetConnectionProfileRequest.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.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; return null; }; /** - * Creates a DeleteConnectionProfileRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetConnectionProfileRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.clouddms.v1.DeleteConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.GetConnectionProfileRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.DeleteConnectionProfileRequest} DeleteConnectionProfileRequest + * @returns {google.cloud.clouddms.v1.GetConnectionProfileRequest} GetConnectionProfileRequest */ - DeleteConnectionProfileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.DeleteConnectionProfileRequest) + GetConnectionProfileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.GetConnectionProfileRequest) return object; - var message = new $root.google.cloud.clouddms.v1.DeleteConnectionProfileRequest(); + var message = new $root.google.cloud.clouddms.v1.GetConnectionProfileRequest(); if (object.name != null) message.name = String(object.name); - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.force != null) - message.force = Boolean(object.force); return message; }; /** - * Creates a plain object from a DeleteConnectionProfileRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetConnectionProfileRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.clouddms.v1.DeleteConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.GetConnectionProfileRequest * @static - * @param {google.cloud.clouddms.v1.DeleteConnectionProfileRequest} message DeleteConnectionProfileRequest + * @param {google.cloud.clouddms.v1.GetConnectionProfileRequest} message GetConnectionProfileRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteConnectionProfileRequest.toObject = function toObject(message, options) { + GetConnectionProfileRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.requestId = ""; - object.force = false; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; return object; }; /** - * Converts this DeleteConnectionProfileRequest to JSON. + * Converts this GetConnectionProfileRequest to JSON. * @function toJSON - * @memberof google.cloud.clouddms.v1.DeleteConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.GetConnectionProfileRequest * @instance * @returns {Object.} JSON object */ - DeleteConnectionProfileRequest.prototype.toJSON = function toJSON() { + GetConnectionProfileRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteConnectionProfileRequest + * Gets the default type url for GetConnectionProfileRequest * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.DeleteConnectionProfileRequest + * @memberof google.cloud.clouddms.v1.GetConnectionProfileRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteConnectionProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetConnectionProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.clouddms.v1.DeleteConnectionProfileRequest"; + return typeUrlPrefix + "/google.cloud.clouddms.v1.GetConnectionProfileRequest"; }; - return DeleteConnectionProfileRequest; + return GetConnectionProfileRequest; })(); - v1.OperationMetadata = (function() { + v1.CreateConnectionProfileRequest = (function() { /** - * Properties of an OperationMetadata. + * Properties of a CreateConnectionProfileRequest. * @memberof google.cloud.clouddms.v1 - * @interface IOperationMetadata - * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime - * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime - * @property {string|null} [target] OperationMetadata target - * @property {string|null} [verb] OperationMetadata verb - * @property {string|null} [statusMessage] OperationMetadata statusMessage - * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation - * @property {string|null} [apiVersion] OperationMetadata apiVersion + * @interface ICreateConnectionProfileRequest + * @property {string|null} [parent] CreateConnectionProfileRequest parent + * @property {string|null} [connectionProfileId] CreateConnectionProfileRequest connectionProfileId + * @property {google.cloud.clouddms.v1.IConnectionProfile|null} [connectionProfile] CreateConnectionProfileRequest connectionProfile + * @property {string|null} [requestId] CreateConnectionProfileRequest requestId + * @property {boolean|null} [validateOnly] CreateConnectionProfileRequest validateOnly + * @property {boolean|null} [skipValidation] CreateConnectionProfileRequest skipValidation */ /** - * Constructs a new OperationMetadata. + * Constructs a new CreateConnectionProfileRequest. * @memberof google.cloud.clouddms.v1 - * @classdesc Represents an OperationMetadata. - * @implements IOperationMetadata + * @classdesc Represents a CreateConnectionProfileRequest. + * @implements ICreateConnectionProfileRequest * @constructor - * @param {google.cloud.clouddms.v1.IOperationMetadata=} [properties] Properties to set + * @param {google.cloud.clouddms.v1.ICreateConnectionProfileRequest=} [properties] Properties to set */ - function OperationMetadata(properties) { + function CreateConnectionProfileRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6050,159 +5888,145 @@ } /** - * OperationMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.clouddms.v1.OperationMetadata + * CreateConnectionProfileRequest parent. + * @member {string} parent + * @memberof google.cloud.clouddms.v1.CreateConnectionProfileRequest * @instance */ - OperationMetadata.prototype.createTime = null; + CreateConnectionProfileRequest.prototype.parent = ""; /** - * OperationMetadata endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.clouddms.v1.OperationMetadata + * CreateConnectionProfileRequest connectionProfileId. + * @member {string} connectionProfileId + * @memberof google.cloud.clouddms.v1.CreateConnectionProfileRequest * @instance */ - OperationMetadata.prototype.endTime = null; + CreateConnectionProfileRequest.prototype.connectionProfileId = ""; /** - * OperationMetadata target. - * @member {string} target - * @memberof google.cloud.clouddms.v1.OperationMetadata + * CreateConnectionProfileRequest connectionProfile. + * @member {google.cloud.clouddms.v1.IConnectionProfile|null|undefined} connectionProfile + * @memberof google.cloud.clouddms.v1.CreateConnectionProfileRequest * @instance */ - OperationMetadata.prototype.target = ""; + CreateConnectionProfileRequest.prototype.connectionProfile = null; /** - * OperationMetadata verb. - * @member {string} verb - * @memberof google.cloud.clouddms.v1.OperationMetadata + * CreateConnectionProfileRequest requestId. + * @member {string} requestId + * @memberof google.cloud.clouddms.v1.CreateConnectionProfileRequest * @instance */ - OperationMetadata.prototype.verb = ""; + CreateConnectionProfileRequest.prototype.requestId = ""; /** - * OperationMetadata statusMessage. - * @member {string} statusMessage - * @memberof google.cloud.clouddms.v1.OperationMetadata + * CreateConnectionProfileRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.clouddms.v1.CreateConnectionProfileRequest * @instance */ - OperationMetadata.prototype.statusMessage = ""; - - /** - * OperationMetadata requestedCancellation. - * @member {boolean} requestedCancellation - * @memberof google.cloud.clouddms.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.requestedCancellation = false; + CreateConnectionProfileRequest.prototype.validateOnly = false; /** - * OperationMetadata apiVersion. - * @member {string} apiVersion - * @memberof google.cloud.clouddms.v1.OperationMetadata + * CreateConnectionProfileRequest skipValidation. + * @member {boolean} skipValidation + * @memberof google.cloud.clouddms.v1.CreateConnectionProfileRequest * @instance */ - OperationMetadata.prototype.apiVersion = ""; + CreateConnectionProfileRequest.prototype.skipValidation = false; /** - * Creates a new OperationMetadata instance using the specified properties. + * Creates a new CreateConnectionProfileRequest instance using the specified properties. * @function create - * @memberof google.cloud.clouddms.v1.OperationMetadata + * @memberof google.cloud.clouddms.v1.CreateConnectionProfileRequest * @static - * @param {google.cloud.clouddms.v1.IOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.OperationMetadata} OperationMetadata instance + * @param {google.cloud.clouddms.v1.ICreateConnectionProfileRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.CreateConnectionProfileRequest} CreateConnectionProfileRequest instance */ - OperationMetadata.create = function create(properties) { - return new OperationMetadata(properties); + CreateConnectionProfileRequest.create = function create(properties) { + return new CreateConnectionProfileRequest(properties); }; /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.clouddms.v1.OperationMetadata.verify|verify} messages. + * Encodes the specified CreateConnectionProfileRequest message. Does not implicitly {@link google.cloud.clouddms.v1.CreateConnectionProfileRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.clouddms.v1.OperationMetadata + * @memberof google.cloud.clouddms.v1.CreateConnectionProfileRequest * @static - * @param {google.cloud.clouddms.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {google.cloud.clouddms.v1.ICreateConnectionProfileRequest} message CreateConnectionProfileRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationMetadata.encode = function encode(message, writer) { + CreateConnectionProfileRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); - if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); - if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); - if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); - if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.connectionProfileId != null && Object.hasOwnProperty.call(message, "connectionProfileId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.connectionProfileId); + if (message.connectionProfile != null && Object.hasOwnProperty.call(message, "connectionProfile")) + $root.google.cloud.clouddms.v1.ConnectionProfile.encode(message.connectionProfile, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); + if (message.skipValidation != null && Object.hasOwnProperty.call(message, "skipValidation")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.skipValidation); return writer; }; /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.OperationMetadata.verify|verify} messages. + * Encodes the specified CreateConnectionProfileRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.CreateConnectionProfileRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.OperationMetadata + * @memberof google.cloud.clouddms.v1.CreateConnectionProfileRequest * @static - * @param {google.cloud.clouddms.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {google.cloud.clouddms.v1.ICreateConnectionProfileRequest} message CreateConnectionProfileRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + CreateConnectionProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OperationMetadata message from the specified reader or buffer. + * Decodes a CreateConnectionProfileRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.clouddms.v1.OperationMetadata + * @memberof google.cloud.clouddms.v1.CreateConnectionProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.OperationMetadata} OperationMetadata + * @returns {google.cloud.clouddms.v1.CreateConnectionProfileRequest} CreateConnectionProfileRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperationMetadata.decode = function decode(reader, length) { + CreateConnectionProfileRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.OperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.CreateConnectionProfileRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.parent = reader.string(); break; } case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.connectionProfileId = reader.string(); break; } case 3: { - message.target = reader.string(); + message.connectionProfile = $root.google.cloud.clouddms.v1.ConnectionProfile.decode(reader, reader.uint32()); break; } case 4: { - message.verb = reader.string(); + message.requestId = reader.string(); break; } case 5: { - message.statusMessage = reader.string(); + message.validateOnly = reader.bool(); break; } case 6: { - message.requestedCancellation = reader.bool(); - break; - } - case 7: { - message.apiVersion = reader.string(); + message.skipValidation = reader.bool(); break; } default: @@ -6214,184 +6038,172 @@ }; /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a CreateConnectionProfileRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.OperationMetadata + * @memberof google.cloud.clouddms.v1.CreateConnectionProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.OperationMetadata} OperationMetadata + * @returns {google.cloud.clouddms.v1.CreateConnectionProfileRequest} CreateConnectionProfileRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperationMetadata.decodeDelimited = function decodeDelimited(reader) { + CreateConnectionProfileRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OperationMetadata message. + * Verifies a CreateConnectionProfileRequest message. * @function verify - * @memberof google.cloud.clouddms.v1.OperationMetadata + * @memberof google.cloud.clouddms.v1.CreateConnectionProfileRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OperationMetadata.verify = function verify(message) { + CreateConnectionProfileRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.connectionProfileId != null && message.hasOwnProperty("connectionProfileId")) + if (!$util.isString(message.connectionProfileId)) + return "connectionProfileId: string expected"; + if (message.connectionProfile != null && message.hasOwnProperty("connectionProfile")) { + var error = $root.google.cloud.clouddms.v1.ConnectionProfile.verify(message.connectionProfile); if (error) - return "endTime." + error; + return "connectionProfile." + error; } - if (message.target != null && message.hasOwnProperty("target")) - if (!$util.isString(message.target)) - return "target: string expected"; - if (message.verb != null && message.hasOwnProperty("verb")) - if (!$util.isString(message.verb)) - return "verb: string expected"; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - if (!$util.isString(message.statusMessage)) - return "statusMessage: string expected"; - if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) - if (typeof message.requestedCancellation !== "boolean") - return "requestedCancellation: boolean expected"; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - if (!$util.isString(message.apiVersion)) - return "apiVersion: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + if (message.skipValidation != null && message.hasOwnProperty("skipValidation")) + if (typeof message.skipValidation !== "boolean") + return "skipValidation: boolean expected"; return null; }; /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a CreateConnectionProfileRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.clouddms.v1.OperationMetadata + * @memberof google.cloud.clouddms.v1.CreateConnectionProfileRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.OperationMetadata} OperationMetadata + * @returns {google.cloud.clouddms.v1.CreateConnectionProfileRequest} CreateConnectionProfileRequest */ - OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.OperationMetadata) + CreateConnectionProfileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.CreateConnectionProfileRequest) return object; - var message = new $root.google.cloud.clouddms.v1.OperationMetadata(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.clouddms.v1.OperationMetadata.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.clouddms.v1.OperationMetadata.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + var message = new $root.google.cloud.clouddms.v1.CreateConnectionProfileRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.connectionProfileId != null) + message.connectionProfileId = String(object.connectionProfileId); + if (object.connectionProfile != null) { + if (typeof object.connectionProfile !== "object") + throw TypeError(".google.cloud.clouddms.v1.CreateConnectionProfileRequest.connectionProfile: object expected"); + message.connectionProfile = $root.google.cloud.clouddms.v1.ConnectionProfile.fromObject(object.connectionProfile); } - if (object.target != null) - message.target = String(object.target); - if (object.verb != null) - message.verb = String(object.verb); - if (object.statusMessage != null) - message.statusMessage = String(object.statusMessage); - if (object.requestedCancellation != null) - message.requestedCancellation = Boolean(object.requestedCancellation); - if (object.apiVersion != null) - message.apiVersion = String(object.apiVersion); + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + if (object.skipValidation != null) + message.skipValidation = Boolean(object.skipValidation); return message; }; /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from a CreateConnectionProfileRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.clouddms.v1.OperationMetadata + * @memberof google.cloud.clouddms.v1.CreateConnectionProfileRequest * @static - * @param {google.cloud.clouddms.v1.OperationMetadata} message OperationMetadata + * @param {google.cloud.clouddms.v1.CreateConnectionProfileRequest} message CreateConnectionProfileRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OperationMetadata.toObject = function toObject(message, options) { + CreateConnectionProfileRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.createTime = null; - object.endTime = null; - object.target = ""; - object.verb = ""; - object.statusMessage = ""; - object.requestedCancellation = false; - object.apiVersion = ""; + object.parent = ""; + object.connectionProfileId = ""; + object.connectionProfile = null; + object.requestId = ""; + object.validateOnly = false; + object.skipValidation = false; } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = message.target; - if (message.verb != null && message.hasOwnProperty("verb")) - object.verb = message.verb; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - object.statusMessage = message.statusMessage; - if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) - object.requestedCancellation = message.requestedCancellation; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - object.apiVersion = message.apiVersion; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.connectionProfileId != null && message.hasOwnProperty("connectionProfileId")) + object.connectionProfileId = message.connectionProfileId; + if (message.connectionProfile != null && message.hasOwnProperty("connectionProfile")) + object.connectionProfile = $root.google.cloud.clouddms.v1.ConnectionProfile.toObject(message.connectionProfile, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + if (message.skipValidation != null && message.hasOwnProperty("skipValidation")) + object.skipValidation = message.skipValidation; return object; }; /** - * Converts this OperationMetadata to JSON. + * Converts this CreateConnectionProfileRequest to JSON. * @function toJSON - * @memberof google.cloud.clouddms.v1.OperationMetadata + * @memberof google.cloud.clouddms.v1.CreateConnectionProfileRequest * @instance * @returns {Object.} JSON object */ - OperationMetadata.prototype.toJSON = function toJSON() { + CreateConnectionProfileRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OperationMetadata + * Gets the default type url for CreateConnectionProfileRequest * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.OperationMetadata + * @memberof google.cloud.clouddms.v1.CreateConnectionProfileRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateConnectionProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.clouddms.v1.OperationMetadata"; + return typeUrlPrefix + "/google.cloud.clouddms.v1.CreateConnectionProfileRequest"; }; - return OperationMetadata; + return CreateConnectionProfileRequest; })(); - v1.SslConfig = (function() { + v1.UpdateConnectionProfileRequest = (function() { /** - * Properties of a SslConfig. + * Properties of an UpdateConnectionProfileRequest. * @memberof google.cloud.clouddms.v1 - * @interface ISslConfig - * @property {google.cloud.clouddms.v1.SslConfig.SslType|null} [type] SslConfig type - * @property {string|null} [clientKey] SslConfig clientKey - * @property {string|null} [clientCertificate] SslConfig clientCertificate - * @property {string|null} [caCertificate] SslConfig caCertificate + * @interface IUpdateConnectionProfileRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateConnectionProfileRequest updateMask + * @property {google.cloud.clouddms.v1.IConnectionProfile|null} [connectionProfile] UpdateConnectionProfileRequest connectionProfile + * @property {string|null} [requestId] UpdateConnectionProfileRequest requestId + * @property {boolean|null} [validateOnly] UpdateConnectionProfileRequest validateOnly + * @property {boolean|null} [skipValidation] UpdateConnectionProfileRequest skipValidation */ /** - * Constructs a new SslConfig. + * Constructs a new UpdateConnectionProfileRequest. * @memberof google.cloud.clouddms.v1 - * @classdesc Represents a SslConfig. - * @implements ISslConfig + * @classdesc Represents an UpdateConnectionProfileRequest. + * @implements IUpdateConnectionProfileRequest * @constructor - * @param {google.cloud.clouddms.v1.ISslConfig=} [properties] Properties to set + * @param {google.cloud.clouddms.v1.IUpdateConnectionProfileRequest=} [properties] Properties to set */ - function SslConfig(properties) { + function UpdateConnectionProfileRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6399,117 +6211,131 @@ } /** - * SslConfig type. - * @member {google.cloud.clouddms.v1.SslConfig.SslType} type - * @memberof google.cloud.clouddms.v1.SslConfig + * UpdateConnectionProfileRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.clouddms.v1.UpdateConnectionProfileRequest * @instance */ - SslConfig.prototype.type = 0; + UpdateConnectionProfileRequest.prototype.updateMask = null; /** - * SslConfig clientKey. - * @member {string} clientKey - * @memberof google.cloud.clouddms.v1.SslConfig + * UpdateConnectionProfileRequest connectionProfile. + * @member {google.cloud.clouddms.v1.IConnectionProfile|null|undefined} connectionProfile + * @memberof google.cloud.clouddms.v1.UpdateConnectionProfileRequest * @instance */ - SslConfig.prototype.clientKey = ""; + UpdateConnectionProfileRequest.prototype.connectionProfile = null; /** - * SslConfig clientCertificate. - * @member {string} clientCertificate - * @memberof google.cloud.clouddms.v1.SslConfig + * UpdateConnectionProfileRequest requestId. + * @member {string} requestId + * @memberof google.cloud.clouddms.v1.UpdateConnectionProfileRequest * @instance */ - SslConfig.prototype.clientCertificate = ""; + UpdateConnectionProfileRequest.prototype.requestId = ""; /** - * SslConfig caCertificate. - * @member {string} caCertificate - * @memberof google.cloud.clouddms.v1.SslConfig + * UpdateConnectionProfileRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.clouddms.v1.UpdateConnectionProfileRequest * @instance */ - SslConfig.prototype.caCertificate = ""; + UpdateConnectionProfileRequest.prototype.validateOnly = false; /** - * Creates a new SslConfig instance using the specified properties. + * UpdateConnectionProfileRequest skipValidation. + * @member {boolean} skipValidation + * @memberof google.cloud.clouddms.v1.UpdateConnectionProfileRequest + * @instance + */ + UpdateConnectionProfileRequest.prototype.skipValidation = false; + + /** + * Creates a new UpdateConnectionProfileRequest instance using the specified properties. * @function create - * @memberof google.cloud.clouddms.v1.SslConfig + * @memberof google.cloud.clouddms.v1.UpdateConnectionProfileRequest * @static - * @param {google.cloud.clouddms.v1.ISslConfig=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.SslConfig} SslConfig instance + * @param {google.cloud.clouddms.v1.IUpdateConnectionProfileRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.UpdateConnectionProfileRequest} UpdateConnectionProfileRequest instance */ - SslConfig.create = function create(properties) { - return new SslConfig(properties); + UpdateConnectionProfileRequest.create = function create(properties) { + return new UpdateConnectionProfileRequest(properties); }; /** - * Encodes the specified SslConfig message. Does not implicitly {@link google.cloud.clouddms.v1.SslConfig.verify|verify} messages. + * Encodes the specified UpdateConnectionProfileRequest message. Does not implicitly {@link google.cloud.clouddms.v1.UpdateConnectionProfileRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.clouddms.v1.SslConfig + * @memberof google.cloud.clouddms.v1.UpdateConnectionProfileRequest * @static - * @param {google.cloud.clouddms.v1.ISslConfig} message SslConfig message or plain object to encode + * @param {google.cloud.clouddms.v1.IUpdateConnectionProfileRequest} message UpdateConnectionProfileRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SslConfig.encode = function encode(message, writer) { + UpdateConnectionProfileRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.clientKey != null && Object.hasOwnProperty.call(message, "clientKey")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.clientKey); - if (message.clientCertificate != null && Object.hasOwnProperty.call(message, "clientCertificate")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clientCertificate); - if (message.caCertificate != null && Object.hasOwnProperty.call(message, "caCertificate")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.caCertificate); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.connectionProfile != null && Object.hasOwnProperty.call(message, "connectionProfile")) + $root.google.cloud.clouddms.v1.ConnectionProfile.encode(message.connectionProfile, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + if (message.skipValidation != null && Object.hasOwnProperty.call(message, "skipValidation")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.skipValidation); return writer; }; /** - * Encodes the specified SslConfig message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.SslConfig.verify|verify} messages. + * Encodes the specified UpdateConnectionProfileRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.UpdateConnectionProfileRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.SslConfig + * @memberof google.cloud.clouddms.v1.UpdateConnectionProfileRequest * @static - * @param {google.cloud.clouddms.v1.ISslConfig} message SslConfig message or plain object to encode + * @param {google.cloud.clouddms.v1.IUpdateConnectionProfileRequest} message UpdateConnectionProfileRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SslConfig.encodeDelimited = function encodeDelimited(message, writer) { + UpdateConnectionProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SslConfig message from the specified reader or buffer. + * Decodes an UpdateConnectionProfileRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.clouddms.v1.SslConfig + * @memberof google.cloud.clouddms.v1.UpdateConnectionProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.SslConfig} SslConfig + * @returns {google.cloud.clouddms.v1.UpdateConnectionProfileRequest} UpdateConnectionProfileRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SslConfig.decode = function decode(reader, length) { + UpdateConnectionProfileRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.SslConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.UpdateConnectionProfileRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.type = reader.int32(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } case 2: { - message.clientKey = reader.string(); + message.connectionProfile = $root.google.cloud.clouddms.v1.ConnectionProfile.decode(reader, reader.uint32()); break; } case 3: { - message.clientCertificate = reader.string(); + message.requestId = reader.string(); break; } case 4: { - message.caCertificate = reader.string(); + message.validateOnly = reader.bool(); + break; + } + case 5: { + message.skipValidation = reader.bool(); break; } default: @@ -6521,193 +6347,167 @@ }; /** - * Decodes a SslConfig message from the specified reader or buffer, length delimited. + * Decodes an UpdateConnectionProfileRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.SslConfig + * @memberof google.cloud.clouddms.v1.UpdateConnectionProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.SslConfig} SslConfig + * @returns {google.cloud.clouddms.v1.UpdateConnectionProfileRequest} UpdateConnectionProfileRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SslConfig.decodeDelimited = function decodeDelimited(reader) { + UpdateConnectionProfileRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SslConfig message. + * Verifies an UpdateConnectionProfileRequest message. * @function verify - * @memberof google.cloud.clouddms.v1.SslConfig + * @memberof google.cloud.clouddms.v1.UpdateConnectionProfileRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SslConfig.verify = function verify(message) { + UpdateConnectionProfileRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.clientKey != null && message.hasOwnProperty("clientKey")) - if (!$util.isString(message.clientKey)) - return "clientKey: string expected"; - if (message.clientCertificate != null && message.hasOwnProperty("clientCertificate")) - if (!$util.isString(message.clientCertificate)) - return "clientCertificate: string expected"; - if (message.caCertificate != null && message.hasOwnProperty("caCertificate")) - if (!$util.isString(message.caCertificate)) - return "caCertificate: string expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.connectionProfile != null && message.hasOwnProperty("connectionProfile")) { + var error = $root.google.cloud.clouddms.v1.ConnectionProfile.verify(message.connectionProfile); + if (error) + return "connectionProfile." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + if (message.skipValidation != null && message.hasOwnProperty("skipValidation")) + if (typeof message.skipValidation !== "boolean") + return "skipValidation: boolean expected"; return null; }; /** - * Creates a SslConfig message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateConnectionProfileRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.clouddms.v1.SslConfig + * @memberof google.cloud.clouddms.v1.UpdateConnectionProfileRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.SslConfig} SslConfig + * @returns {google.cloud.clouddms.v1.UpdateConnectionProfileRequest} UpdateConnectionProfileRequest */ - SslConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.SslConfig) + UpdateConnectionProfileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.UpdateConnectionProfileRequest) return object; - var message = new $root.google.cloud.clouddms.v1.SslConfig(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "SSL_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "SERVER_ONLY": - case 1: - message.type = 1; - break; - case "SERVER_CLIENT": - case 2: - message.type = 2; - break; + var message = new $root.google.cloud.clouddms.v1.UpdateConnectionProfileRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.clouddms.v1.UpdateConnectionProfileRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.clientKey != null) - message.clientKey = String(object.clientKey); - if (object.clientCertificate != null) - message.clientCertificate = String(object.clientCertificate); - if (object.caCertificate != null) - message.caCertificate = String(object.caCertificate); + if (object.connectionProfile != null) { + if (typeof object.connectionProfile !== "object") + throw TypeError(".google.cloud.clouddms.v1.UpdateConnectionProfileRequest.connectionProfile: object expected"); + message.connectionProfile = $root.google.cloud.clouddms.v1.ConnectionProfile.fromObject(object.connectionProfile); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + if (object.skipValidation != null) + message.skipValidation = Boolean(object.skipValidation); return message; }; /** - * Creates a plain object from a SslConfig message. Also converts values to other types if specified. + * Creates a plain object from an UpdateConnectionProfileRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.clouddms.v1.SslConfig + * @memberof google.cloud.clouddms.v1.UpdateConnectionProfileRequest * @static - * @param {google.cloud.clouddms.v1.SslConfig} message SslConfig + * @param {google.cloud.clouddms.v1.UpdateConnectionProfileRequest} message UpdateConnectionProfileRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SslConfig.toObject = function toObject(message, options) { + UpdateConnectionProfileRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.type = options.enums === String ? "SSL_TYPE_UNSPECIFIED" : 0; - object.clientKey = ""; - object.clientCertificate = ""; - object.caCertificate = ""; + object.updateMask = null; + object.connectionProfile = null; + object.requestId = ""; + object.validateOnly = false; + object.skipValidation = false; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.clouddms.v1.SslConfig.SslType[message.type] === undefined ? message.type : $root.google.cloud.clouddms.v1.SslConfig.SslType[message.type] : message.type; - if (message.clientKey != null && message.hasOwnProperty("clientKey")) - object.clientKey = message.clientKey; - if (message.clientCertificate != null && message.hasOwnProperty("clientCertificate")) - object.clientCertificate = message.clientCertificate; - if (message.caCertificate != null && message.hasOwnProperty("caCertificate")) - object.caCertificate = message.caCertificate; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.connectionProfile != null && message.hasOwnProperty("connectionProfile")) + object.connectionProfile = $root.google.cloud.clouddms.v1.ConnectionProfile.toObject(message.connectionProfile, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + if (message.skipValidation != null && message.hasOwnProperty("skipValidation")) + object.skipValidation = message.skipValidation; return object; }; /** - * Converts this SslConfig to JSON. + * Converts this UpdateConnectionProfileRequest to JSON. * @function toJSON - * @memberof google.cloud.clouddms.v1.SslConfig + * @memberof google.cloud.clouddms.v1.UpdateConnectionProfileRequest * @instance * @returns {Object.} JSON object */ - SslConfig.prototype.toJSON = function toJSON() { + UpdateConnectionProfileRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SslConfig + * Gets the default type url for UpdateConnectionProfileRequest * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.SslConfig + * @memberof google.cloud.clouddms.v1.UpdateConnectionProfileRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SslConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateConnectionProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.clouddms.v1.SslConfig"; + return typeUrlPrefix + "/google.cloud.clouddms.v1.UpdateConnectionProfileRequest"; }; - /** - * SslType enum. - * @name google.cloud.clouddms.v1.SslConfig.SslType - * @enum {number} - * @property {number} SSL_TYPE_UNSPECIFIED=0 SSL_TYPE_UNSPECIFIED value - * @property {number} SERVER_ONLY=1 SERVER_ONLY value - * @property {number} SERVER_CLIENT=2 SERVER_CLIENT value - */ - SslConfig.SslType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SSL_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SERVER_ONLY"] = 1; - values[valuesById[2] = "SERVER_CLIENT"] = 2; - return values; - })(); - - return SslConfig; + return UpdateConnectionProfileRequest; })(); - v1.MySqlConnectionProfile = (function() { + v1.DeleteConnectionProfileRequest = (function() { /** - * Properties of a MySqlConnectionProfile. + * Properties of a DeleteConnectionProfileRequest. * @memberof google.cloud.clouddms.v1 - * @interface IMySqlConnectionProfile - * @property {string|null} [host] MySqlConnectionProfile host - * @property {number|null} [port] MySqlConnectionProfile port - * @property {string|null} [username] MySqlConnectionProfile username - * @property {string|null} [password] MySqlConnectionProfile password - * @property {boolean|null} [passwordSet] MySqlConnectionProfile passwordSet - * @property {google.cloud.clouddms.v1.ISslConfig|null} [ssl] MySqlConnectionProfile ssl - * @property {string|null} [cloudSqlId] MySqlConnectionProfile cloudSqlId + * @interface IDeleteConnectionProfileRequest + * @property {string|null} [name] DeleteConnectionProfileRequest name + * @property {string|null} [requestId] DeleteConnectionProfileRequest requestId + * @property {boolean|null} [force] DeleteConnectionProfileRequest force */ /** - * Constructs a new MySqlConnectionProfile. + * Constructs a new DeleteConnectionProfileRequest. * @memberof google.cloud.clouddms.v1 - * @classdesc Represents a MySqlConnectionProfile. - * @implements IMySqlConnectionProfile + * @classdesc Represents a DeleteConnectionProfileRequest. + * @implements IDeleteConnectionProfileRequest * @constructor - * @param {google.cloud.clouddms.v1.IMySqlConnectionProfile=} [properties] Properties to set + * @param {google.cloud.clouddms.v1.IDeleteConnectionProfileRequest=} [properties] Properties to set */ - function MySqlConnectionProfile(properties) { + function DeleteConnectionProfileRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6715,159 +6515,103 @@ } /** - * MySqlConnectionProfile host. - * @member {string} host - * @memberof google.cloud.clouddms.v1.MySqlConnectionProfile - * @instance - */ - MySqlConnectionProfile.prototype.host = ""; - - /** - * MySqlConnectionProfile port. - * @member {number} port - * @memberof google.cloud.clouddms.v1.MySqlConnectionProfile - * @instance - */ - MySqlConnectionProfile.prototype.port = 0; - - /** - * MySqlConnectionProfile username. - * @member {string} username - * @memberof google.cloud.clouddms.v1.MySqlConnectionProfile - * @instance - */ - MySqlConnectionProfile.prototype.username = ""; - - /** - * MySqlConnectionProfile password. - * @member {string} password - * @memberof google.cloud.clouddms.v1.MySqlConnectionProfile - * @instance - */ - MySqlConnectionProfile.prototype.password = ""; - - /** - * MySqlConnectionProfile passwordSet. - * @member {boolean} passwordSet - * @memberof google.cloud.clouddms.v1.MySqlConnectionProfile + * DeleteConnectionProfileRequest name. + * @member {string} name + * @memberof google.cloud.clouddms.v1.DeleteConnectionProfileRequest * @instance */ - MySqlConnectionProfile.prototype.passwordSet = false; + DeleteConnectionProfileRequest.prototype.name = ""; /** - * MySqlConnectionProfile ssl. - * @member {google.cloud.clouddms.v1.ISslConfig|null|undefined} ssl - * @memberof google.cloud.clouddms.v1.MySqlConnectionProfile + * DeleteConnectionProfileRequest requestId. + * @member {string} requestId + * @memberof google.cloud.clouddms.v1.DeleteConnectionProfileRequest * @instance */ - MySqlConnectionProfile.prototype.ssl = null; + DeleteConnectionProfileRequest.prototype.requestId = ""; /** - * MySqlConnectionProfile cloudSqlId. - * @member {string} cloudSqlId - * @memberof google.cloud.clouddms.v1.MySqlConnectionProfile + * DeleteConnectionProfileRequest force. + * @member {boolean} force + * @memberof google.cloud.clouddms.v1.DeleteConnectionProfileRequest * @instance */ - MySqlConnectionProfile.prototype.cloudSqlId = ""; + DeleteConnectionProfileRequest.prototype.force = false; /** - * Creates a new MySqlConnectionProfile instance using the specified properties. + * Creates a new DeleteConnectionProfileRequest instance using the specified properties. * @function create - * @memberof google.cloud.clouddms.v1.MySqlConnectionProfile + * @memberof google.cloud.clouddms.v1.DeleteConnectionProfileRequest * @static - * @param {google.cloud.clouddms.v1.IMySqlConnectionProfile=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.MySqlConnectionProfile} MySqlConnectionProfile instance + * @param {google.cloud.clouddms.v1.IDeleteConnectionProfileRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.DeleteConnectionProfileRequest} DeleteConnectionProfileRequest instance */ - MySqlConnectionProfile.create = function create(properties) { - return new MySqlConnectionProfile(properties); + DeleteConnectionProfileRequest.create = function create(properties) { + return new DeleteConnectionProfileRequest(properties); }; /** - * Encodes the specified MySqlConnectionProfile message. Does not implicitly {@link google.cloud.clouddms.v1.MySqlConnectionProfile.verify|verify} messages. + * Encodes the specified DeleteConnectionProfileRequest message. Does not implicitly {@link google.cloud.clouddms.v1.DeleteConnectionProfileRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.clouddms.v1.MySqlConnectionProfile + * @memberof google.cloud.clouddms.v1.DeleteConnectionProfileRequest * @static - * @param {google.cloud.clouddms.v1.IMySqlConnectionProfile} message MySqlConnectionProfile message or plain object to encode + * @param {google.cloud.clouddms.v1.IDeleteConnectionProfileRequest} message DeleteConnectionProfileRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MySqlConnectionProfile.encode = function encode(message, writer) { + DeleteConnectionProfileRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.host != null && Object.hasOwnProperty.call(message, "host")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.host); - if (message.port != null && Object.hasOwnProperty.call(message, "port")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.port); - if (message.username != null && Object.hasOwnProperty.call(message, "username")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.username); - if (message.password != null && Object.hasOwnProperty.call(message, "password")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.password); - if (message.passwordSet != null && Object.hasOwnProperty.call(message, "passwordSet")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.passwordSet); - if (message.ssl != null && Object.hasOwnProperty.call(message, "ssl")) - $root.google.cloud.clouddms.v1.SslConfig.encode(message.ssl, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.cloudSqlId != null && Object.hasOwnProperty.call(message, "cloudSqlId")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.cloudSqlId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); return writer; }; /** - * Encodes the specified MySqlConnectionProfile message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.MySqlConnectionProfile.verify|verify} messages. + * Encodes the specified DeleteConnectionProfileRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.DeleteConnectionProfileRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.MySqlConnectionProfile + * @memberof google.cloud.clouddms.v1.DeleteConnectionProfileRequest * @static - * @param {google.cloud.clouddms.v1.IMySqlConnectionProfile} message MySqlConnectionProfile message or plain object to encode + * @param {google.cloud.clouddms.v1.IDeleteConnectionProfileRequest} message DeleteConnectionProfileRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MySqlConnectionProfile.encodeDelimited = function encodeDelimited(message, writer) { + DeleteConnectionProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MySqlConnectionProfile message from the specified reader or buffer. + * Decodes a DeleteConnectionProfileRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.clouddms.v1.MySqlConnectionProfile + * @memberof google.cloud.clouddms.v1.DeleteConnectionProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.MySqlConnectionProfile} MySqlConnectionProfile + * @returns {google.cloud.clouddms.v1.DeleteConnectionProfileRequest} DeleteConnectionProfileRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MySqlConnectionProfile.decode = function decode(reader, length) { + DeleteConnectionProfileRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.MySqlConnectionProfile(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.DeleteConnectionProfileRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.host = reader.string(); + message.name = reader.string(); break; } case 2: { - message.port = reader.int32(); + message.requestId = reader.string(); break; } case 3: { - message.username = reader.string(); - break; - } - case 4: { - message.password = reader.string(); - break; - } - case 5: { - message.passwordSet = reader.bool(); - break; - } - case 6: { - message.ssl = $root.google.cloud.clouddms.v1.SslConfig.decode(reader, reader.uint32()); - break; - } - case 7: { - message.cloudSqlId = reader.string(); + message.force = reader.bool(); break; } default: @@ -6879,182 +6623,143 @@ }; /** - * Decodes a MySqlConnectionProfile message from the specified reader or buffer, length delimited. + * Decodes a DeleteConnectionProfileRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.MySqlConnectionProfile + * @memberof google.cloud.clouddms.v1.DeleteConnectionProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.MySqlConnectionProfile} MySqlConnectionProfile + * @returns {google.cloud.clouddms.v1.DeleteConnectionProfileRequest} DeleteConnectionProfileRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MySqlConnectionProfile.decodeDelimited = function decodeDelimited(reader) { + DeleteConnectionProfileRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MySqlConnectionProfile message. + * Verifies a DeleteConnectionProfileRequest message. * @function verify - * @memberof google.cloud.clouddms.v1.MySqlConnectionProfile + * @memberof google.cloud.clouddms.v1.DeleteConnectionProfileRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MySqlConnectionProfile.verify = function verify(message) { + DeleteConnectionProfileRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.host != null && message.hasOwnProperty("host")) - if (!$util.isString(message.host)) - return "host: string expected"; - if (message.port != null && message.hasOwnProperty("port")) - if (!$util.isInteger(message.port)) - return "port: integer expected"; - if (message.username != null && message.hasOwnProperty("username")) - if (!$util.isString(message.username)) - return "username: string expected"; - if (message.password != null && message.hasOwnProperty("password")) - if (!$util.isString(message.password)) - return "password: string expected"; - if (message.passwordSet != null && message.hasOwnProperty("passwordSet")) - if (typeof message.passwordSet !== "boolean") - return "passwordSet: boolean expected"; - if (message.ssl != null && message.hasOwnProperty("ssl")) { - var error = $root.google.cloud.clouddms.v1.SslConfig.verify(message.ssl); - if (error) - return "ssl." + error; - } - if (message.cloudSqlId != null && message.hasOwnProperty("cloudSqlId")) - if (!$util.isString(message.cloudSqlId)) - return "cloudSqlId: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; return null; }; /** - * Creates a MySqlConnectionProfile message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteConnectionProfileRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.clouddms.v1.MySqlConnectionProfile + * @memberof google.cloud.clouddms.v1.DeleteConnectionProfileRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.MySqlConnectionProfile} MySqlConnectionProfile + * @returns {google.cloud.clouddms.v1.DeleteConnectionProfileRequest} DeleteConnectionProfileRequest */ - MySqlConnectionProfile.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.MySqlConnectionProfile) + DeleteConnectionProfileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.DeleteConnectionProfileRequest) return object; - var message = new $root.google.cloud.clouddms.v1.MySqlConnectionProfile(); - if (object.host != null) - message.host = String(object.host); - if (object.port != null) - message.port = object.port | 0; - if (object.username != null) - message.username = String(object.username); - if (object.password != null) - message.password = String(object.password); - if (object.passwordSet != null) - message.passwordSet = Boolean(object.passwordSet); - if (object.ssl != null) { - if (typeof object.ssl !== "object") - throw TypeError(".google.cloud.clouddms.v1.MySqlConnectionProfile.ssl: object expected"); - message.ssl = $root.google.cloud.clouddms.v1.SslConfig.fromObject(object.ssl); - } - if (object.cloudSqlId != null) - message.cloudSqlId = String(object.cloudSqlId); + var message = new $root.google.cloud.clouddms.v1.DeleteConnectionProfileRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.force != null) + message.force = Boolean(object.force); return message; }; /** - * Creates a plain object from a MySqlConnectionProfile message. Also converts values to other types if specified. + * Creates a plain object from a DeleteConnectionProfileRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.clouddms.v1.MySqlConnectionProfile + * @memberof google.cloud.clouddms.v1.DeleteConnectionProfileRequest * @static - * @param {google.cloud.clouddms.v1.MySqlConnectionProfile} message MySqlConnectionProfile + * @param {google.cloud.clouddms.v1.DeleteConnectionProfileRequest} message DeleteConnectionProfileRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MySqlConnectionProfile.toObject = function toObject(message, options) { + DeleteConnectionProfileRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.host = ""; - object.port = 0; - object.username = ""; - object.password = ""; - object.passwordSet = false; - object.ssl = null; - object.cloudSqlId = ""; - } - if (message.host != null && message.hasOwnProperty("host")) - object.host = message.host; - if (message.port != null && message.hasOwnProperty("port")) - object.port = message.port; - if (message.username != null && message.hasOwnProperty("username")) - object.username = message.username; - if (message.password != null && message.hasOwnProperty("password")) - object.password = message.password; - if (message.passwordSet != null && message.hasOwnProperty("passwordSet")) - object.passwordSet = message.passwordSet; - if (message.ssl != null && message.hasOwnProperty("ssl")) - object.ssl = $root.google.cloud.clouddms.v1.SslConfig.toObject(message.ssl, options); - if (message.cloudSqlId != null && message.hasOwnProperty("cloudSqlId")) - object.cloudSqlId = message.cloudSqlId; + object.name = ""; + object.requestId = ""; + object.force = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; return object; }; /** - * Converts this MySqlConnectionProfile to JSON. + * Converts this DeleteConnectionProfileRequest to JSON. * @function toJSON - * @memberof google.cloud.clouddms.v1.MySqlConnectionProfile + * @memberof google.cloud.clouddms.v1.DeleteConnectionProfileRequest * @instance * @returns {Object.} JSON object */ - MySqlConnectionProfile.prototype.toJSON = function toJSON() { + DeleteConnectionProfileRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MySqlConnectionProfile + * Gets the default type url for DeleteConnectionProfileRequest * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.MySqlConnectionProfile + * @memberof google.cloud.clouddms.v1.DeleteConnectionProfileRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MySqlConnectionProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteConnectionProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.clouddms.v1.MySqlConnectionProfile"; + return typeUrlPrefix + "/google.cloud.clouddms.v1.DeleteConnectionProfileRequest"; }; - return MySqlConnectionProfile; + return DeleteConnectionProfileRequest; })(); - v1.PostgreSqlConnectionProfile = (function() { + v1.CreatePrivateConnectionRequest = (function() { /** - * Properties of a PostgreSqlConnectionProfile. + * Properties of a CreatePrivateConnectionRequest. * @memberof google.cloud.clouddms.v1 - * @interface IPostgreSqlConnectionProfile - * @property {string|null} [host] PostgreSqlConnectionProfile host - * @property {number|null} [port] PostgreSqlConnectionProfile port - * @property {string|null} [username] PostgreSqlConnectionProfile username - * @property {string|null} [password] PostgreSqlConnectionProfile password - * @property {boolean|null} [passwordSet] PostgreSqlConnectionProfile passwordSet - * @property {google.cloud.clouddms.v1.ISslConfig|null} [ssl] PostgreSqlConnectionProfile ssl - * @property {string|null} [cloudSqlId] PostgreSqlConnectionProfile cloudSqlId + * @interface ICreatePrivateConnectionRequest + * @property {string|null} [parent] CreatePrivateConnectionRequest parent + * @property {string|null} [privateConnectionId] CreatePrivateConnectionRequest privateConnectionId + * @property {google.cloud.clouddms.v1.IPrivateConnection|null} [privateConnection] CreatePrivateConnectionRequest privateConnection + * @property {string|null} [requestId] CreatePrivateConnectionRequest requestId + * @property {boolean|null} [skipValidation] CreatePrivateConnectionRequest skipValidation */ /** - * Constructs a new PostgreSqlConnectionProfile. + * Constructs a new CreatePrivateConnectionRequest. * @memberof google.cloud.clouddms.v1 - * @classdesc Represents a PostgreSqlConnectionProfile. - * @implements IPostgreSqlConnectionProfile + * @classdesc Represents a CreatePrivateConnectionRequest. + * @implements ICreatePrivateConnectionRequest * @constructor - * @param {google.cloud.clouddms.v1.IPostgreSqlConnectionProfile=} [properties] Properties to set + * @param {google.cloud.clouddms.v1.ICreatePrivateConnectionRequest=} [properties] Properties to set */ - function PostgreSqlConnectionProfile(properties) { + function CreatePrivateConnectionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7062,159 +6767,131 @@ } /** - * PostgreSqlConnectionProfile host. - * @member {string} host - * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile - * @instance - */ - PostgreSqlConnectionProfile.prototype.host = ""; - - /** - * PostgreSqlConnectionProfile port. - * @member {number} port - * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile - * @instance - */ - PostgreSqlConnectionProfile.prototype.port = 0; - - /** - * PostgreSqlConnectionProfile username. - * @member {string} username - * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * CreatePrivateConnectionRequest parent. + * @member {string} parent + * @memberof google.cloud.clouddms.v1.CreatePrivateConnectionRequest * @instance */ - PostgreSqlConnectionProfile.prototype.username = ""; + CreatePrivateConnectionRequest.prototype.parent = ""; /** - * PostgreSqlConnectionProfile password. - * @member {string} password - * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * CreatePrivateConnectionRequest privateConnectionId. + * @member {string} privateConnectionId + * @memberof google.cloud.clouddms.v1.CreatePrivateConnectionRequest * @instance */ - PostgreSqlConnectionProfile.prototype.password = ""; + CreatePrivateConnectionRequest.prototype.privateConnectionId = ""; /** - * PostgreSqlConnectionProfile passwordSet. - * @member {boolean} passwordSet - * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * CreatePrivateConnectionRequest privateConnection. + * @member {google.cloud.clouddms.v1.IPrivateConnection|null|undefined} privateConnection + * @memberof google.cloud.clouddms.v1.CreatePrivateConnectionRequest * @instance */ - PostgreSqlConnectionProfile.prototype.passwordSet = false; + CreatePrivateConnectionRequest.prototype.privateConnection = null; /** - * PostgreSqlConnectionProfile ssl. - * @member {google.cloud.clouddms.v1.ISslConfig|null|undefined} ssl - * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * CreatePrivateConnectionRequest requestId. + * @member {string} requestId + * @memberof google.cloud.clouddms.v1.CreatePrivateConnectionRequest * @instance */ - PostgreSqlConnectionProfile.prototype.ssl = null; + CreatePrivateConnectionRequest.prototype.requestId = ""; /** - * PostgreSqlConnectionProfile cloudSqlId. - * @member {string} cloudSqlId - * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * CreatePrivateConnectionRequest skipValidation. + * @member {boolean} skipValidation + * @memberof google.cloud.clouddms.v1.CreatePrivateConnectionRequest * @instance */ - PostgreSqlConnectionProfile.prototype.cloudSqlId = ""; + CreatePrivateConnectionRequest.prototype.skipValidation = false; /** - * Creates a new PostgreSqlConnectionProfile instance using the specified properties. + * Creates a new CreatePrivateConnectionRequest instance using the specified properties. * @function create - * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * @memberof google.cloud.clouddms.v1.CreatePrivateConnectionRequest * @static - * @param {google.cloud.clouddms.v1.IPostgreSqlConnectionProfile=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.PostgreSqlConnectionProfile} PostgreSqlConnectionProfile instance + * @param {google.cloud.clouddms.v1.ICreatePrivateConnectionRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.CreatePrivateConnectionRequest} CreatePrivateConnectionRequest instance */ - PostgreSqlConnectionProfile.create = function create(properties) { - return new PostgreSqlConnectionProfile(properties); + CreatePrivateConnectionRequest.create = function create(properties) { + return new CreatePrivateConnectionRequest(properties); }; /** - * Encodes the specified PostgreSqlConnectionProfile message. Does not implicitly {@link google.cloud.clouddms.v1.PostgreSqlConnectionProfile.verify|verify} messages. + * Encodes the specified CreatePrivateConnectionRequest message. Does not implicitly {@link google.cloud.clouddms.v1.CreatePrivateConnectionRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * @memberof google.cloud.clouddms.v1.CreatePrivateConnectionRequest * @static - * @param {google.cloud.clouddms.v1.IPostgreSqlConnectionProfile} message PostgreSqlConnectionProfile message or plain object to encode + * @param {google.cloud.clouddms.v1.ICreatePrivateConnectionRequest} message CreatePrivateConnectionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PostgreSqlConnectionProfile.encode = function encode(message, writer) { + CreatePrivateConnectionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.host != null && Object.hasOwnProperty.call(message, "host")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.host); - if (message.port != null && Object.hasOwnProperty.call(message, "port")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.port); - if (message.username != null && Object.hasOwnProperty.call(message, "username")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.username); - if (message.password != null && Object.hasOwnProperty.call(message, "password")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.password); - if (message.passwordSet != null && Object.hasOwnProperty.call(message, "passwordSet")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.passwordSet); - if (message.ssl != null && Object.hasOwnProperty.call(message, "ssl")) - $root.google.cloud.clouddms.v1.SslConfig.encode(message.ssl, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.cloudSqlId != null && Object.hasOwnProperty.call(message, "cloudSqlId")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.cloudSqlId); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.privateConnectionId != null && Object.hasOwnProperty.call(message, "privateConnectionId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.privateConnectionId); + if (message.privateConnection != null && Object.hasOwnProperty.call(message, "privateConnection")) + $root.google.cloud.clouddms.v1.PrivateConnection.encode(message.privateConnection, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + if (message.skipValidation != null && Object.hasOwnProperty.call(message, "skipValidation")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.skipValidation); return writer; }; /** - * Encodes the specified PostgreSqlConnectionProfile message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.PostgreSqlConnectionProfile.verify|verify} messages. + * Encodes the specified CreatePrivateConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.CreatePrivateConnectionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * @memberof google.cloud.clouddms.v1.CreatePrivateConnectionRequest * @static - * @param {google.cloud.clouddms.v1.IPostgreSqlConnectionProfile} message PostgreSqlConnectionProfile message or plain object to encode + * @param {google.cloud.clouddms.v1.ICreatePrivateConnectionRequest} message CreatePrivateConnectionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PostgreSqlConnectionProfile.encodeDelimited = function encodeDelimited(message, writer) { + CreatePrivateConnectionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PostgreSqlConnectionProfile message from the specified reader or buffer. + * Decodes a CreatePrivateConnectionRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * @memberof google.cloud.clouddms.v1.CreatePrivateConnectionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.PostgreSqlConnectionProfile} PostgreSqlConnectionProfile + * @returns {google.cloud.clouddms.v1.CreatePrivateConnectionRequest} CreatePrivateConnectionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PostgreSqlConnectionProfile.decode = function decode(reader, length) { + CreatePrivateConnectionRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.PostgreSqlConnectionProfile(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.CreatePrivateConnectionRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.host = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.port = reader.int32(); + message.privateConnectionId = reader.string(); break; } case 3: { - message.username = reader.string(); + message.privateConnection = $root.google.cloud.clouddms.v1.PrivateConnection.decode(reader, reader.uint32()); break; } case 4: { - message.password = reader.string(); + message.requestId = reader.string(); break; } case 5: { - message.passwordSet = reader.bool(); - break; - } - case 6: { - message.ssl = $root.google.cloud.clouddms.v1.SslConfig.decode(reader, reader.uint32()); - break; - } - case 7: { - message.cloudSqlId = reader.string(); + message.skipValidation = reader.bool(); break; } default: @@ -7226,179 +6903,164 @@ }; /** - * Decodes a PostgreSqlConnectionProfile message from the specified reader or buffer, length delimited. + * Decodes a CreatePrivateConnectionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * @memberof google.cloud.clouddms.v1.CreatePrivateConnectionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.PostgreSqlConnectionProfile} PostgreSqlConnectionProfile + * @returns {google.cloud.clouddms.v1.CreatePrivateConnectionRequest} CreatePrivateConnectionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PostgreSqlConnectionProfile.decodeDelimited = function decodeDelimited(reader) { + CreatePrivateConnectionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PostgreSqlConnectionProfile message. + * Verifies a CreatePrivateConnectionRequest message. * @function verify - * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * @memberof google.cloud.clouddms.v1.CreatePrivateConnectionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PostgreSqlConnectionProfile.verify = function verify(message) { + CreatePrivateConnectionRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.host != null && message.hasOwnProperty("host")) - if (!$util.isString(message.host)) - return "host: string expected"; - if (message.port != null && message.hasOwnProperty("port")) - if (!$util.isInteger(message.port)) - return "port: integer expected"; - if (message.username != null && message.hasOwnProperty("username")) - if (!$util.isString(message.username)) - return "username: string expected"; - if (message.password != null && message.hasOwnProperty("password")) - if (!$util.isString(message.password)) - return "password: string expected"; - if (message.passwordSet != null && message.hasOwnProperty("passwordSet")) - if (typeof message.passwordSet !== "boolean") - return "passwordSet: boolean expected"; - if (message.ssl != null && message.hasOwnProperty("ssl")) { - var error = $root.google.cloud.clouddms.v1.SslConfig.verify(message.ssl); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.privateConnectionId != null && message.hasOwnProperty("privateConnectionId")) + if (!$util.isString(message.privateConnectionId)) + return "privateConnectionId: string expected"; + if (message.privateConnection != null && message.hasOwnProperty("privateConnection")) { + var error = $root.google.cloud.clouddms.v1.PrivateConnection.verify(message.privateConnection); if (error) - return "ssl." + error; + return "privateConnection." + error; } - if (message.cloudSqlId != null && message.hasOwnProperty("cloudSqlId")) - if (!$util.isString(message.cloudSqlId)) - return "cloudSqlId: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.skipValidation != null && message.hasOwnProperty("skipValidation")) + if (typeof message.skipValidation !== "boolean") + return "skipValidation: boolean expected"; return null; }; /** - * Creates a PostgreSqlConnectionProfile message from a plain object. Also converts values to their respective internal types. + * Creates a CreatePrivateConnectionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * @memberof google.cloud.clouddms.v1.CreatePrivateConnectionRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.PostgreSqlConnectionProfile} PostgreSqlConnectionProfile + * @returns {google.cloud.clouddms.v1.CreatePrivateConnectionRequest} CreatePrivateConnectionRequest */ - PostgreSqlConnectionProfile.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.PostgreSqlConnectionProfile) + CreatePrivateConnectionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.CreatePrivateConnectionRequest) return object; - var message = new $root.google.cloud.clouddms.v1.PostgreSqlConnectionProfile(); - if (object.host != null) - message.host = String(object.host); - if (object.port != null) - message.port = object.port | 0; - if (object.username != null) - message.username = String(object.username); - if (object.password != null) - message.password = String(object.password); - if (object.passwordSet != null) - message.passwordSet = Boolean(object.passwordSet); - if (object.ssl != null) { - if (typeof object.ssl !== "object") - throw TypeError(".google.cloud.clouddms.v1.PostgreSqlConnectionProfile.ssl: object expected"); - message.ssl = $root.google.cloud.clouddms.v1.SslConfig.fromObject(object.ssl); + var message = new $root.google.cloud.clouddms.v1.CreatePrivateConnectionRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.privateConnectionId != null) + message.privateConnectionId = String(object.privateConnectionId); + if (object.privateConnection != null) { + if (typeof object.privateConnection !== "object") + throw TypeError(".google.cloud.clouddms.v1.CreatePrivateConnectionRequest.privateConnection: object expected"); + message.privateConnection = $root.google.cloud.clouddms.v1.PrivateConnection.fromObject(object.privateConnection); } - if (object.cloudSqlId != null) - message.cloudSqlId = String(object.cloudSqlId); + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.skipValidation != null) + message.skipValidation = Boolean(object.skipValidation); return message; }; /** - * Creates a plain object from a PostgreSqlConnectionProfile message. Also converts values to other types if specified. + * Creates a plain object from a CreatePrivateConnectionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * @memberof google.cloud.clouddms.v1.CreatePrivateConnectionRequest * @static - * @param {google.cloud.clouddms.v1.PostgreSqlConnectionProfile} message PostgreSqlConnectionProfile + * @param {google.cloud.clouddms.v1.CreatePrivateConnectionRequest} message CreatePrivateConnectionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PostgreSqlConnectionProfile.toObject = function toObject(message, options) { + CreatePrivateConnectionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.host = ""; - object.port = 0; - object.username = ""; - object.password = ""; - object.passwordSet = false; - object.ssl = null; - object.cloudSqlId = ""; + object.parent = ""; + object.privateConnectionId = ""; + object.privateConnection = null; + object.requestId = ""; + object.skipValidation = false; } - if (message.host != null && message.hasOwnProperty("host")) - object.host = message.host; - if (message.port != null && message.hasOwnProperty("port")) - object.port = message.port; - if (message.username != null && message.hasOwnProperty("username")) - object.username = message.username; - if (message.password != null && message.hasOwnProperty("password")) - object.password = message.password; - if (message.passwordSet != null && message.hasOwnProperty("passwordSet")) - object.passwordSet = message.passwordSet; - if (message.ssl != null && message.hasOwnProperty("ssl")) - object.ssl = $root.google.cloud.clouddms.v1.SslConfig.toObject(message.ssl, options); - if (message.cloudSqlId != null && message.hasOwnProperty("cloudSqlId")) - object.cloudSqlId = message.cloudSqlId; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.privateConnectionId != null && message.hasOwnProperty("privateConnectionId")) + object.privateConnectionId = message.privateConnectionId; + if (message.privateConnection != null && message.hasOwnProperty("privateConnection")) + object.privateConnection = $root.google.cloud.clouddms.v1.PrivateConnection.toObject(message.privateConnection, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.skipValidation != null && message.hasOwnProperty("skipValidation")) + object.skipValidation = message.skipValidation; return object; }; /** - * Converts this PostgreSqlConnectionProfile to JSON. + * Converts this CreatePrivateConnectionRequest to JSON. * @function toJSON - * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * @memberof google.cloud.clouddms.v1.CreatePrivateConnectionRequest * @instance * @returns {Object.} JSON object */ - PostgreSqlConnectionProfile.prototype.toJSON = function toJSON() { + CreatePrivateConnectionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PostgreSqlConnectionProfile + * Gets the default type url for CreatePrivateConnectionRequest * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * @memberof google.cloud.clouddms.v1.CreatePrivateConnectionRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PostgreSqlConnectionProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreatePrivateConnectionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.clouddms.v1.PostgreSqlConnectionProfile"; + return typeUrlPrefix + "/google.cloud.clouddms.v1.CreatePrivateConnectionRequest"; }; - return PostgreSqlConnectionProfile; + return CreatePrivateConnectionRequest; })(); - v1.CloudSqlConnectionProfile = (function() { + v1.ListPrivateConnectionsRequest = (function() { /** - * Properties of a CloudSqlConnectionProfile. + * Properties of a ListPrivateConnectionsRequest. * @memberof google.cloud.clouddms.v1 - * @interface ICloudSqlConnectionProfile - * @property {string|null} [cloudSqlId] CloudSqlConnectionProfile cloudSqlId - * @property {google.cloud.clouddms.v1.ICloudSqlSettings|null} [settings] CloudSqlConnectionProfile settings - * @property {string|null} [privateIp] CloudSqlConnectionProfile privateIp - * @property {string|null} [publicIp] CloudSqlConnectionProfile publicIp + * @interface IListPrivateConnectionsRequest + * @property {string|null} [parent] ListPrivateConnectionsRequest parent + * @property {number|null} [pageSize] ListPrivateConnectionsRequest pageSize + * @property {string|null} [pageToken] ListPrivateConnectionsRequest pageToken + * @property {string|null} [filter] ListPrivateConnectionsRequest filter + * @property {string|null} [orderBy] ListPrivateConnectionsRequest orderBy */ /** - * Constructs a new CloudSqlConnectionProfile. + * Constructs a new ListPrivateConnectionsRequest. * @memberof google.cloud.clouddms.v1 - * @classdesc Represents a CloudSqlConnectionProfile. - * @implements ICloudSqlConnectionProfile + * @classdesc Represents a ListPrivateConnectionsRequest. + * @implements IListPrivateConnectionsRequest * @constructor - * @param {google.cloud.clouddms.v1.ICloudSqlConnectionProfile=} [properties] Properties to set + * @param {google.cloud.clouddms.v1.IListPrivateConnectionsRequest=} [properties] Properties to set */ - function CloudSqlConnectionProfile(properties) { + function ListPrivateConnectionsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7406,117 +7068,131 @@ } /** - * CloudSqlConnectionProfile cloudSqlId. - * @member {string} cloudSqlId - * @memberof google.cloud.clouddms.v1.CloudSqlConnectionProfile + * ListPrivateConnectionsRequest parent. + * @member {string} parent + * @memberof google.cloud.clouddms.v1.ListPrivateConnectionsRequest * @instance */ - CloudSqlConnectionProfile.prototype.cloudSqlId = ""; + ListPrivateConnectionsRequest.prototype.parent = ""; /** - * CloudSqlConnectionProfile settings. - * @member {google.cloud.clouddms.v1.ICloudSqlSettings|null|undefined} settings - * @memberof google.cloud.clouddms.v1.CloudSqlConnectionProfile + * ListPrivateConnectionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.clouddms.v1.ListPrivateConnectionsRequest * @instance */ - CloudSqlConnectionProfile.prototype.settings = null; + ListPrivateConnectionsRequest.prototype.pageSize = 0; /** - * CloudSqlConnectionProfile privateIp. - * @member {string} privateIp - * @memberof google.cloud.clouddms.v1.CloudSqlConnectionProfile + * ListPrivateConnectionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.clouddms.v1.ListPrivateConnectionsRequest * @instance */ - CloudSqlConnectionProfile.prototype.privateIp = ""; + ListPrivateConnectionsRequest.prototype.pageToken = ""; /** - * CloudSqlConnectionProfile publicIp. - * @member {string} publicIp - * @memberof google.cloud.clouddms.v1.CloudSqlConnectionProfile + * ListPrivateConnectionsRequest filter. + * @member {string} filter + * @memberof google.cloud.clouddms.v1.ListPrivateConnectionsRequest * @instance */ - CloudSqlConnectionProfile.prototype.publicIp = ""; + ListPrivateConnectionsRequest.prototype.filter = ""; /** - * Creates a new CloudSqlConnectionProfile instance using the specified properties. + * ListPrivateConnectionsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.clouddms.v1.ListPrivateConnectionsRequest + * @instance + */ + ListPrivateConnectionsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListPrivateConnectionsRequest instance using the specified properties. * @function create - * @memberof google.cloud.clouddms.v1.CloudSqlConnectionProfile + * @memberof google.cloud.clouddms.v1.ListPrivateConnectionsRequest * @static - * @param {google.cloud.clouddms.v1.ICloudSqlConnectionProfile=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.CloudSqlConnectionProfile} CloudSqlConnectionProfile instance + * @param {google.cloud.clouddms.v1.IListPrivateConnectionsRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.ListPrivateConnectionsRequest} ListPrivateConnectionsRequest instance */ - CloudSqlConnectionProfile.create = function create(properties) { - return new CloudSqlConnectionProfile(properties); + ListPrivateConnectionsRequest.create = function create(properties) { + return new ListPrivateConnectionsRequest(properties); }; /** - * Encodes the specified CloudSqlConnectionProfile message. Does not implicitly {@link google.cloud.clouddms.v1.CloudSqlConnectionProfile.verify|verify} messages. + * Encodes the specified ListPrivateConnectionsRequest message. Does not implicitly {@link google.cloud.clouddms.v1.ListPrivateConnectionsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.clouddms.v1.CloudSqlConnectionProfile + * @memberof google.cloud.clouddms.v1.ListPrivateConnectionsRequest * @static - * @param {google.cloud.clouddms.v1.ICloudSqlConnectionProfile} message CloudSqlConnectionProfile message or plain object to encode + * @param {google.cloud.clouddms.v1.IListPrivateConnectionsRequest} message ListPrivateConnectionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudSqlConnectionProfile.encode = function encode(message, writer) { + ListPrivateConnectionsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.cloudSqlId != null && Object.hasOwnProperty.call(message, "cloudSqlId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.cloudSqlId); - if (message.settings != null && Object.hasOwnProperty.call(message, "settings")) - $root.google.cloud.clouddms.v1.CloudSqlSettings.encode(message.settings, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.privateIp != null && Object.hasOwnProperty.call(message, "privateIp")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.privateIp); - if (message.publicIp != null && Object.hasOwnProperty.call(message, "publicIp")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.publicIp); + 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.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified CloudSqlConnectionProfile message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.CloudSqlConnectionProfile.verify|verify} messages. + * Encodes the specified ListPrivateConnectionsRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ListPrivateConnectionsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.CloudSqlConnectionProfile + * @memberof google.cloud.clouddms.v1.ListPrivateConnectionsRequest * @static - * @param {google.cloud.clouddms.v1.ICloudSqlConnectionProfile} message CloudSqlConnectionProfile message or plain object to encode + * @param {google.cloud.clouddms.v1.IListPrivateConnectionsRequest} message ListPrivateConnectionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudSqlConnectionProfile.encodeDelimited = function encodeDelimited(message, writer) { + ListPrivateConnectionsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CloudSqlConnectionProfile message from the specified reader or buffer. + * Decodes a ListPrivateConnectionsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.clouddms.v1.CloudSqlConnectionProfile + * @memberof google.cloud.clouddms.v1.ListPrivateConnectionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.CloudSqlConnectionProfile} CloudSqlConnectionProfile + * @returns {google.cloud.clouddms.v1.ListPrivateConnectionsRequest} ListPrivateConnectionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudSqlConnectionProfile.decode = function decode(reader, length) { + ListPrivateConnectionsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.CloudSqlConnectionProfile(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.ListPrivateConnectionsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.cloudSqlId = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.settings = $root.google.cloud.clouddms.v1.CloudSqlSettings.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); break; } case 3: { - message.privateIp = reader.string(); + message.pageToken = reader.string(); break; } case 4: { - message.publicIp = reader.string(); + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); break; } default: @@ -7528,155 +7204,159 @@ }; /** - * Decodes a CloudSqlConnectionProfile message from the specified reader or buffer, length delimited. + * Decodes a ListPrivateConnectionsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.CloudSqlConnectionProfile + * @memberof google.cloud.clouddms.v1.ListPrivateConnectionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.CloudSqlConnectionProfile} CloudSqlConnectionProfile + * @returns {google.cloud.clouddms.v1.ListPrivateConnectionsRequest} ListPrivateConnectionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudSqlConnectionProfile.decodeDelimited = function decodeDelimited(reader) { + ListPrivateConnectionsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CloudSqlConnectionProfile message. + * Verifies a ListPrivateConnectionsRequest message. * @function verify - * @memberof google.cloud.clouddms.v1.CloudSqlConnectionProfile + * @memberof google.cloud.clouddms.v1.ListPrivateConnectionsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CloudSqlConnectionProfile.verify = function verify(message) { + ListPrivateConnectionsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.cloudSqlId != null && message.hasOwnProperty("cloudSqlId")) - if (!$util.isString(message.cloudSqlId)) - return "cloudSqlId: string expected"; - if (message.settings != null && message.hasOwnProperty("settings")) { - var error = $root.google.cloud.clouddms.v1.CloudSqlSettings.verify(message.settings); - if (error) - return "settings." + error; - } - if (message.privateIp != null && message.hasOwnProperty("privateIp")) - if (!$util.isString(message.privateIp)) - return "privateIp: string expected"; - if (message.publicIp != null && message.hasOwnProperty("publicIp")) - if (!$util.isString(message.publicIp)) - return "publicIp: string 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.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; return null; }; /** - * Creates a CloudSqlConnectionProfile message from a plain object. Also converts values to their respective internal types. + * Creates a ListPrivateConnectionsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.clouddms.v1.CloudSqlConnectionProfile + * @memberof google.cloud.clouddms.v1.ListPrivateConnectionsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.CloudSqlConnectionProfile} CloudSqlConnectionProfile + * @returns {google.cloud.clouddms.v1.ListPrivateConnectionsRequest} ListPrivateConnectionsRequest */ - CloudSqlConnectionProfile.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.CloudSqlConnectionProfile) + ListPrivateConnectionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.ListPrivateConnectionsRequest) return object; - var message = new $root.google.cloud.clouddms.v1.CloudSqlConnectionProfile(); - if (object.cloudSqlId != null) - message.cloudSqlId = String(object.cloudSqlId); - if (object.settings != null) { - if (typeof object.settings !== "object") - throw TypeError(".google.cloud.clouddms.v1.CloudSqlConnectionProfile.settings: object expected"); - message.settings = $root.google.cloud.clouddms.v1.CloudSqlSettings.fromObject(object.settings); - } - if (object.privateIp != null) - message.privateIp = String(object.privateIp); - if (object.publicIp != null) - message.publicIp = String(object.publicIp); + var message = new $root.google.cloud.clouddms.v1.ListPrivateConnectionsRequest(); + 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.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); return message; }; /** - * Creates a plain object from a CloudSqlConnectionProfile message. Also converts values to other types if specified. + * Creates a plain object from a ListPrivateConnectionsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.clouddms.v1.CloudSqlConnectionProfile + * @memberof google.cloud.clouddms.v1.ListPrivateConnectionsRequest * @static - * @param {google.cloud.clouddms.v1.CloudSqlConnectionProfile} message CloudSqlConnectionProfile + * @param {google.cloud.clouddms.v1.ListPrivateConnectionsRequest} message ListPrivateConnectionsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CloudSqlConnectionProfile.toObject = function toObject(message, options) { + ListPrivateConnectionsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.cloudSqlId = ""; - object.settings = null; - object.privateIp = ""; - object.publicIp = ""; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; } - if (message.cloudSqlId != null && message.hasOwnProperty("cloudSqlId")) - object.cloudSqlId = message.cloudSqlId; - if (message.settings != null && message.hasOwnProperty("settings")) - object.settings = $root.google.cloud.clouddms.v1.CloudSqlSettings.toObject(message.settings, options); - if (message.privateIp != null && message.hasOwnProperty("privateIp")) - object.privateIp = message.privateIp; - if (message.publicIp != null && message.hasOwnProperty("publicIp")) - object.publicIp = message.publicIp; + 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.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; return object; }; /** - * Converts this CloudSqlConnectionProfile to JSON. + * Converts this ListPrivateConnectionsRequest to JSON. * @function toJSON - * @memberof google.cloud.clouddms.v1.CloudSqlConnectionProfile + * @memberof google.cloud.clouddms.v1.ListPrivateConnectionsRequest * @instance * @returns {Object.} JSON object */ - CloudSqlConnectionProfile.prototype.toJSON = function toJSON() { + ListPrivateConnectionsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CloudSqlConnectionProfile + * Gets the default type url for ListPrivateConnectionsRequest * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.CloudSqlConnectionProfile + * @memberof google.cloud.clouddms.v1.ListPrivateConnectionsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CloudSqlConnectionProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListPrivateConnectionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.clouddms.v1.CloudSqlConnectionProfile"; + return typeUrlPrefix + "/google.cloud.clouddms.v1.ListPrivateConnectionsRequest"; }; - return CloudSqlConnectionProfile; + return ListPrivateConnectionsRequest; })(); - v1.SqlAclEntry = (function() { + v1.ListPrivateConnectionsResponse = (function() { /** - * Properties of a SqlAclEntry. + * Properties of a ListPrivateConnectionsResponse. * @memberof google.cloud.clouddms.v1 - * @interface ISqlAclEntry - * @property {string|null} [value] SqlAclEntry value - * @property {google.protobuf.ITimestamp|null} [expireTime] SqlAclEntry expireTime - * @property {google.protobuf.IDuration|null} [ttl] SqlAclEntry ttl - * @property {string|null} [label] SqlAclEntry label + * @interface IListPrivateConnectionsResponse + * @property {Array.|null} [privateConnections] ListPrivateConnectionsResponse privateConnections + * @property {string|null} [nextPageToken] ListPrivateConnectionsResponse nextPageToken + * @property {Array.|null} [unreachable] ListPrivateConnectionsResponse unreachable */ /** - * Constructs a new SqlAclEntry. + * Constructs a new ListPrivateConnectionsResponse. * @memberof google.cloud.clouddms.v1 - * @classdesc Represents a SqlAclEntry. - * @implements ISqlAclEntry + * @classdesc Represents a ListPrivateConnectionsResponse. + * @implements IListPrivateConnectionsResponse * @constructor - * @param {google.cloud.clouddms.v1.ISqlAclEntry=} [properties] Properties to set + * @param {google.cloud.clouddms.v1.IListPrivateConnectionsResponse=} [properties] Properties to set */ - function SqlAclEntry(properties) { + function ListPrivateConnectionsResponse(properties) { + this.privateConnections = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7684,131 +7364,109 @@ } /** - * SqlAclEntry value. - * @member {string} value - * @memberof google.cloud.clouddms.v1.SqlAclEntry - * @instance - */ - SqlAclEntry.prototype.value = ""; - - /** - * SqlAclEntry expireTime. - * @member {google.protobuf.ITimestamp|null|undefined} expireTime - * @memberof google.cloud.clouddms.v1.SqlAclEntry - * @instance - */ - SqlAclEntry.prototype.expireTime = null; - - /** - * SqlAclEntry ttl. - * @member {google.protobuf.IDuration|null|undefined} ttl - * @memberof google.cloud.clouddms.v1.SqlAclEntry + * ListPrivateConnectionsResponse privateConnections. + * @member {Array.} privateConnections + * @memberof google.cloud.clouddms.v1.ListPrivateConnectionsResponse * @instance */ - SqlAclEntry.prototype.ttl = null; + ListPrivateConnectionsResponse.prototype.privateConnections = $util.emptyArray; /** - * SqlAclEntry label. - * @member {string} label - * @memberof google.cloud.clouddms.v1.SqlAclEntry + * ListPrivateConnectionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.clouddms.v1.ListPrivateConnectionsResponse * @instance */ - SqlAclEntry.prototype.label = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ListPrivateConnectionsResponse.prototype.nextPageToken = ""; /** - * SqlAclEntry expiration. - * @member {"expireTime"|"ttl"|undefined} expiration - * @memberof google.cloud.clouddms.v1.SqlAclEntry + * ListPrivateConnectionsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.clouddms.v1.ListPrivateConnectionsResponse * @instance */ - Object.defineProperty(SqlAclEntry.prototype, "expiration", { - get: $util.oneOfGetter($oneOfFields = ["expireTime", "ttl"]), - set: $util.oneOfSetter($oneOfFields) - }); + ListPrivateConnectionsResponse.prototype.unreachable = $util.emptyArray; /** - * Creates a new SqlAclEntry instance using the specified properties. + * Creates a new ListPrivateConnectionsResponse instance using the specified properties. * @function create - * @memberof google.cloud.clouddms.v1.SqlAclEntry + * @memberof google.cloud.clouddms.v1.ListPrivateConnectionsResponse * @static - * @param {google.cloud.clouddms.v1.ISqlAclEntry=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.SqlAclEntry} SqlAclEntry instance + * @param {google.cloud.clouddms.v1.IListPrivateConnectionsResponse=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.ListPrivateConnectionsResponse} ListPrivateConnectionsResponse instance */ - SqlAclEntry.create = function create(properties) { - return new SqlAclEntry(properties); + ListPrivateConnectionsResponse.create = function create(properties) { + return new ListPrivateConnectionsResponse(properties); }; /** - * Encodes the specified SqlAclEntry message. Does not implicitly {@link google.cloud.clouddms.v1.SqlAclEntry.verify|verify} messages. + * Encodes the specified ListPrivateConnectionsResponse message. Does not implicitly {@link google.cloud.clouddms.v1.ListPrivateConnectionsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.clouddms.v1.SqlAclEntry + * @memberof google.cloud.clouddms.v1.ListPrivateConnectionsResponse * @static - * @param {google.cloud.clouddms.v1.ISqlAclEntry} message SqlAclEntry message or plain object to encode + * @param {google.cloud.clouddms.v1.IListPrivateConnectionsResponse} message ListPrivateConnectionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SqlAclEntry.encode = function encode(message, writer) { + ListPrivateConnectionsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.label); - if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.ttl != null && Object.hasOwnProperty.call(message, "ttl")) - $root.google.protobuf.Duration.encode(message.ttl, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.privateConnections != null && message.privateConnections.length) + for (var i = 0; i < message.privateConnections.length; ++i) + $root.google.cloud.clouddms.v1.PrivateConnection.encode(message.privateConnections[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); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); return writer; }; /** - * Encodes the specified SqlAclEntry message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.SqlAclEntry.verify|verify} messages. + * Encodes the specified ListPrivateConnectionsResponse message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ListPrivateConnectionsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.SqlAclEntry + * @memberof google.cloud.clouddms.v1.ListPrivateConnectionsResponse * @static - * @param {google.cloud.clouddms.v1.ISqlAclEntry} message SqlAclEntry message or plain object to encode + * @param {google.cloud.clouddms.v1.IListPrivateConnectionsResponse} message ListPrivateConnectionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SqlAclEntry.encodeDelimited = function encodeDelimited(message, writer) { + ListPrivateConnectionsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SqlAclEntry message from the specified reader or buffer. + * Decodes a ListPrivateConnectionsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.clouddms.v1.SqlAclEntry + * @memberof google.cloud.clouddms.v1.ListPrivateConnectionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.SqlAclEntry} SqlAclEntry + * @returns {google.cloud.clouddms.v1.ListPrivateConnectionsResponse} ListPrivateConnectionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SqlAclEntry.decode = function decode(reader, length) { + ListPrivateConnectionsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.SqlAclEntry(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.ListPrivateConnectionsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.value = reader.string(); - break; - } - case 10: { - message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + if (!(message.privateConnections && message.privateConnections.length)) + message.privateConnections = []; + message.privateConnections.push($root.google.cloud.clouddms.v1.PrivateConnection.decode(reader, reader.uint32())); break; } - case 11: { - message.ttl = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + case 2: { + message.nextPageToken = reader.string(); break; } case 3: { - message.label = reader.string(); + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); break; } default: @@ -7820,174 +7478,170 @@ }; /** - * Decodes a SqlAclEntry message from the specified reader or buffer, length delimited. + * Decodes a ListPrivateConnectionsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.SqlAclEntry + * @memberof google.cloud.clouddms.v1.ListPrivateConnectionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.SqlAclEntry} SqlAclEntry + * @returns {google.cloud.clouddms.v1.ListPrivateConnectionsResponse} ListPrivateConnectionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SqlAclEntry.decodeDelimited = function decodeDelimited(reader) { + ListPrivateConnectionsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SqlAclEntry message. + * Verifies a ListPrivateConnectionsResponse message. * @function verify - * @memberof google.cloud.clouddms.v1.SqlAclEntry + * @memberof google.cloud.clouddms.v1.ListPrivateConnectionsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SqlAclEntry.verify = function verify(message) { + ListPrivateConnectionsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - if (message.expireTime != null && message.hasOwnProperty("expireTime")) { - properties.expiration = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.expireTime); + if (message.privateConnections != null && message.hasOwnProperty("privateConnections")) { + if (!Array.isArray(message.privateConnections)) + return "privateConnections: array expected"; + for (var i = 0; i < message.privateConnections.length; ++i) { + var error = $root.google.cloud.clouddms.v1.PrivateConnection.verify(message.privateConnections[i]); if (error) - return "expireTime." + error; + return "privateConnections." + error; } } - if (message.ttl != null && message.hasOwnProperty("ttl")) { - if (properties.expiration === 1) - return "expiration: multiple values"; - properties.expiration = 1; - { - var error = $root.google.protobuf.Duration.verify(message.ttl); - if (error) - return "ttl." + error; - } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; } - if (message.label != null && message.hasOwnProperty("label")) - if (!$util.isString(message.label)) - return "label: string expected"; return null; }; /** - * Creates a SqlAclEntry message from a plain object. Also converts values to their respective internal types. + * Creates a ListPrivateConnectionsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.clouddms.v1.SqlAclEntry + * @memberof google.cloud.clouddms.v1.ListPrivateConnectionsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.SqlAclEntry} SqlAclEntry + * @returns {google.cloud.clouddms.v1.ListPrivateConnectionsResponse} ListPrivateConnectionsResponse */ - SqlAclEntry.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.SqlAclEntry) + ListPrivateConnectionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.ListPrivateConnectionsResponse) return object; - var message = new $root.google.cloud.clouddms.v1.SqlAclEntry(); - if (object.value != null) - message.value = String(object.value); - if (object.expireTime != null) { - if (typeof object.expireTime !== "object") - throw TypeError(".google.cloud.clouddms.v1.SqlAclEntry.expireTime: object expected"); - message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); + var message = new $root.google.cloud.clouddms.v1.ListPrivateConnectionsResponse(); + if (object.privateConnections) { + if (!Array.isArray(object.privateConnections)) + throw TypeError(".google.cloud.clouddms.v1.ListPrivateConnectionsResponse.privateConnections: array expected"); + message.privateConnections = []; + for (var i = 0; i < object.privateConnections.length; ++i) { + if (typeof object.privateConnections[i] !== "object") + throw TypeError(".google.cloud.clouddms.v1.ListPrivateConnectionsResponse.privateConnections: object expected"); + message.privateConnections[i] = $root.google.cloud.clouddms.v1.PrivateConnection.fromObject(object.privateConnections[i]); + } } - if (object.ttl != null) { - if (typeof object.ttl !== "object") - throw TypeError(".google.cloud.clouddms.v1.SqlAclEntry.ttl: object expected"); - message.ttl = $root.google.protobuf.Duration.fromObject(object.ttl); + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.clouddms.v1.ListPrivateConnectionsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); } - if (object.label != null) - message.label = String(object.label); return message; }; /** - * Creates a plain object from a SqlAclEntry message. Also converts values to other types if specified. + * Creates a plain object from a ListPrivateConnectionsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.clouddms.v1.SqlAclEntry + * @memberof google.cloud.clouddms.v1.ListPrivateConnectionsResponse * @static - * @param {google.cloud.clouddms.v1.SqlAclEntry} message SqlAclEntry + * @param {google.cloud.clouddms.v1.ListPrivateConnectionsResponse} message ListPrivateConnectionsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SqlAclEntry.toObject = function toObject(message, options) { + ListPrivateConnectionsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.value = ""; - object.label = ""; + if (options.arrays || options.defaults) { + object.privateConnections = []; + object.unreachable = []; } - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - if (message.label != null && message.hasOwnProperty("label")) - object.label = message.label; - if (message.expireTime != null && message.hasOwnProperty("expireTime")) { - object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); - if (options.oneofs) - object.expiration = "expireTime"; + if (options.defaults) + object.nextPageToken = ""; + if (message.privateConnections && message.privateConnections.length) { + object.privateConnections = []; + for (var j = 0; j < message.privateConnections.length; ++j) + object.privateConnections[j] = $root.google.cloud.clouddms.v1.PrivateConnection.toObject(message.privateConnections[j], options); } - if (message.ttl != null && message.hasOwnProperty("ttl")) { - object.ttl = $root.google.protobuf.Duration.toObject(message.ttl, options); - if (options.oneofs) - object.expiration = "ttl"; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; } return object; }; /** - * Converts this SqlAclEntry to JSON. + * Converts this ListPrivateConnectionsResponse to JSON. * @function toJSON - * @memberof google.cloud.clouddms.v1.SqlAclEntry + * @memberof google.cloud.clouddms.v1.ListPrivateConnectionsResponse * @instance * @returns {Object.} JSON object */ - SqlAclEntry.prototype.toJSON = function toJSON() { + ListPrivateConnectionsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SqlAclEntry + * Gets the default type url for ListPrivateConnectionsResponse * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.SqlAclEntry + * @memberof google.cloud.clouddms.v1.ListPrivateConnectionsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SqlAclEntry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListPrivateConnectionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.clouddms.v1.SqlAclEntry"; + return typeUrlPrefix + "/google.cloud.clouddms.v1.ListPrivateConnectionsResponse"; }; - return SqlAclEntry; + return ListPrivateConnectionsResponse; })(); - v1.SqlIpConfig = (function() { + v1.DeletePrivateConnectionRequest = (function() { /** - * Properties of a SqlIpConfig. + * Properties of a DeletePrivateConnectionRequest. * @memberof google.cloud.clouddms.v1 - * @interface ISqlIpConfig - * @property {google.protobuf.IBoolValue|null} [enableIpv4] SqlIpConfig enableIpv4 - * @property {string|null} [privateNetwork] SqlIpConfig privateNetwork - * @property {google.protobuf.IBoolValue|null} [requireSsl] SqlIpConfig requireSsl - * @property {Array.|null} [authorizedNetworks] SqlIpConfig authorizedNetworks + * @interface IDeletePrivateConnectionRequest + * @property {string|null} [name] DeletePrivateConnectionRequest name + * @property {string|null} [requestId] DeletePrivateConnectionRequest requestId */ /** - * Constructs a new SqlIpConfig. + * Constructs a new DeletePrivateConnectionRequest. * @memberof google.cloud.clouddms.v1 - * @classdesc Represents a SqlIpConfig. - * @implements ISqlIpConfig + * @classdesc Represents a DeletePrivateConnectionRequest. + * @implements IDeletePrivateConnectionRequest * @constructor - * @param {google.cloud.clouddms.v1.ISqlIpConfig=} [properties] Properties to set + * @param {google.cloud.clouddms.v1.IDeletePrivateConnectionRequest=} [properties] Properties to set */ - function SqlIpConfig(properties) { - this.authorizedNetworks = []; + function DeletePrivateConnectionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7995,120 +7649,89 @@ } /** - * SqlIpConfig enableIpv4. - * @member {google.protobuf.IBoolValue|null|undefined} enableIpv4 - * @memberof google.cloud.clouddms.v1.SqlIpConfig - * @instance - */ - SqlIpConfig.prototype.enableIpv4 = null; - - /** - * SqlIpConfig privateNetwork. - * @member {string} privateNetwork - * @memberof google.cloud.clouddms.v1.SqlIpConfig - * @instance - */ - SqlIpConfig.prototype.privateNetwork = ""; - - /** - * SqlIpConfig requireSsl. - * @member {google.protobuf.IBoolValue|null|undefined} requireSsl - * @memberof google.cloud.clouddms.v1.SqlIpConfig + * DeletePrivateConnectionRequest name. + * @member {string} name + * @memberof google.cloud.clouddms.v1.DeletePrivateConnectionRequest * @instance */ - SqlIpConfig.prototype.requireSsl = null; + DeletePrivateConnectionRequest.prototype.name = ""; /** - * SqlIpConfig authorizedNetworks. - * @member {Array.} authorizedNetworks - * @memberof google.cloud.clouddms.v1.SqlIpConfig + * DeletePrivateConnectionRequest requestId. + * @member {string} requestId + * @memberof google.cloud.clouddms.v1.DeletePrivateConnectionRequest * @instance */ - SqlIpConfig.prototype.authorizedNetworks = $util.emptyArray; + DeletePrivateConnectionRequest.prototype.requestId = ""; /** - * Creates a new SqlIpConfig instance using the specified properties. + * Creates a new DeletePrivateConnectionRequest instance using the specified properties. * @function create - * @memberof google.cloud.clouddms.v1.SqlIpConfig + * @memberof google.cloud.clouddms.v1.DeletePrivateConnectionRequest * @static - * @param {google.cloud.clouddms.v1.ISqlIpConfig=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.SqlIpConfig} SqlIpConfig instance + * @param {google.cloud.clouddms.v1.IDeletePrivateConnectionRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.DeletePrivateConnectionRequest} DeletePrivateConnectionRequest instance */ - SqlIpConfig.create = function create(properties) { - return new SqlIpConfig(properties); + DeletePrivateConnectionRequest.create = function create(properties) { + return new DeletePrivateConnectionRequest(properties); }; /** - * Encodes the specified SqlIpConfig message. Does not implicitly {@link google.cloud.clouddms.v1.SqlIpConfig.verify|verify} messages. + * Encodes the specified DeletePrivateConnectionRequest message. Does not implicitly {@link google.cloud.clouddms.v1.DeletePrivateConnectionRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.clouddms.v1.SqlIpConfig + * @memberof google.cloud.clouddms.v1.DeletePrivateConnectionRequest * @static - * @param {google.cloud.clouddms.v1.ISqlIpConfig} message SqlIpConfig message or plain object to encode + * @param {google.cloud.clouddms.v1.IDeletePrivateConnectionRequest} message DeletePrivateConnectionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SqlIpConfig.encode = function encode(message, writer) { + DeletePrivateConnectionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.enableIpv4 != null && Object.hasOwnProperty.call(message, "enableIpv4")) - $root.google.protobuf.BoolValue.encode(message.enableIpv4, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.privateNetwork != null && Object.hasOwnProperty.call(message, "privateNetwork")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.privateNetwork); - if (message.requireSsl != null && Object.hasOwnProperty.call(message, "requireSsl")) - $root.google.protobuf.BoolValue.encode(message.requireSsl, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.authorizedNetworks != null && message.authorizedNetworks.length) - for (var i = 0; i < message.authorizedNetworks.length; ++i) - $root.google.cloud.clouddms.v1.SqlAclEntry.encode(message.authorizedNetworks[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); return writer; }; /** - * Encodes the specified SqlIpConfig message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.SqlIpConfig.verify|verify} messages. + * Encodes the specified DeletePrivateConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.DeletePrivateConnectionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.SqlIpConfig + * @memberof google.cloud.clouddms.v1.DeletePrivateConnectionRequest * @static - * @param {google.cloud.clouddms.v1.ISqlIpConfig} message SqlIpConfig message or plain object to encode + * @param {google.cloud.clouddms.v1.IDeletePrivateConnectionRequest} message DeletePrivateConnectionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SqlIpConfig.encodeDelimited = function encodeDelimited(message, writer) { + DeletePrivateConnectionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SqlIpConfig message from the specified reader or buffer. + * Decodes a DeletePrivateConnectionRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.clouddms.v1.SqlIpConfig + * @memberof google.cloud.clouddms.v1.DeletePrivateConnectionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.SqlIpConfig} SqlIpConfig + * @returns {google.cloud.clouddms.v1.DeletePrivateConnectionRequest} DeletePrivateConnectionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SqlIpConfig.decode = function decode(reader, length) { + DeletePrivateConnectionRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.SqlIpConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.DeletePrivateConnectionRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.enableIpv4 = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + message.name = reader.string(); break; } case 2: { - message.privateNetwork = reader.string(); - break; - } - case 3: { - message.requireSsl = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.authorizedNetworks && message.authorizedNetworks.length)) - message.authorizedNetworks = []; - message.authorizedNetworks.push($root.google.cloud.clouddms.v1.SqlAclEntry.decode(reader, reader.uint32())); + message.requestId = reader.string(); break; } default: @@ -8120,191 +7743,131 @@ }; /** - * Decodes a SqlIpConfig message from the specified reader or buffer, length delimited. + * Decodes a DeletePrivateConnectionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.SqlIpConfig + * @memberof google.cloud.clouddms.v1.DeletePrivateConnectionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.SqlIpConfig} SqlIpConfig + * @returns {google.cloud.clouddms.v1.DeletePrivateConnectionRequest} DeletePrivateConnectionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SqlIpConfig.decodeDelimited = function decodeDelimited(reader) { + DeletePrivateConnectionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SqlIpConfig message. + * Verifies a DeletePrivateConnectionRequest message. * @function verify - * @memberof google.cloud.clouddms.v1.SqlIpConfig + * @memberof google.cloud.clouddms.v1.DeletePrivateConnectionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SqlIpConfig.verify = function verify(message) { + DeletePrivateConnectionRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.enableIpv4 != null && message.hasOwnProperty("enableIpv4")) { - var error = $root.google.protobuf.BoolValue.verify(message.enableIpv4); - if (error) - return "enableIpv4." + error; - } - if (message.privateNetwork != null && message.hasOwnProperty("privateNetwork")) - if (!$util.isString(message.privateNetwork)) - return "privateNetwork: string expected"; - if (message.requireSsl != null && message.hasOwnProperty("requireSsl")) { - var error = $root.google.protobuf.BoolValue.verify(message.requireSsl); - if (error) - return "requireSsl." + error; - } - if (message.authorizedNetworks != null && message.hasOwnProperty("authorizedNetworks")) { - if (!Array.isArray(message.authorizedNetworks)) - return "authorizedNetworks: array expected"; - for (var i = 0; i < message.authorizedNetworks.length; ++i) { - var error = $root.google.cloud.clouddms.v1.SqlAclEntry.verify(message.authorizedNetworks[i]); - if (error) - return "authorizedNetworks." + error; - } - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates a SqlIpConfig message from a plain object. Also converts values to their respective internal types. + * Creates a DeletePrivateConnectionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.clouddms.v1.SqlIpConfig + * @memberof google.cloud.clouddms.v1.DeletePrivateConnectionRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.SqlIpConfig} SqlIpConfig + * @returns {google.cloud.clouddms.v1.DeletePrivateConnectionRequest} DeletePrivateConnectionRequest */ - SqlIpConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.SqlIpConfig) + DeletePrivateConnectionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.DeletePrivateConnectionRequest) return object; - var message = new $root.google.cloud.clouddms.v1.SqlIpConfig(); - if (object.enableIpv4 != null) { - if (typeof object.enableIpv4 !== "object") - throw TypeError(".google.cloud.clouddms.v1.SqlIpConfig.enableIpv4: object expected"); - message.enableIpv4 = $root.google.protobuf.BoolValue.fromObject(object.enableIpv4); - } - if (object.privateNetwork != null) - message.privateNetwork = String(object.privateNetwork); - if (object.requireSsl != null) { - if (typeof object.requireSsl !== "object") - throw TypeError(".google.cloud.clouddms.v1.SqlIpConfig.requireSsl: object expected"); - message.requireSsl = $root.google.protobuf.BoolValue.fromObject(object.requireSsl); - } - if (object.authorizedNetworks) { - if (!Array.isArray(object.authorizedNetworks)) - throw TypeError(".google.cloud.clouddms.v1.SqlIpConfig.authorizedNetworks: array expected"); - message.authorizedNetworks = []; - for (var i = 0; i < object.authorizedNetworks.length; ++i) { - if (typeof object.authorizedNetworks[i] !== "object") - throw TypeError(".google.cloud.clouddms.v1.SqlIpConfig.authorizedNetworks: object expected"); - message.authorizedNetworks[i] = $root.google.cloud.clouddms.v1.SqlAclEntry.fromObject(object.authorizedNetworks[i]); - } - } + var message = new $root.google.cloud.clouddms.v1.DeletePrivateConnectionRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a SqlIpConfig message. Also converts values to other types if specified. + * Creates a plain object from a DeletePrivateConnectionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.clouddms.v1.SqlIpConfig + * @memberof google.cloud.clouddms.v1.DeletePrivateConnectionRequest * @static - * @param {google.cloud.clouddms.v1.SqlIpConfig} message SqlIpConfig + * @param {google.cloud.clouddms.v1.DeletePrivateConnectionRequest} message DeletePrivateConnectionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SqlIpConfig.toObject = function toObject(message, options) { + DeletePrivateConnectionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.authorizedNetworks = []; if (options.defaults) { - object.enableIpv4 = null; - object.privateNetwork = ""; - object.requireSsl = null; - } - if (message.enableIpv4 != null && message.hasOwnProperty("enableIpv4")) - object.enableIpv4 = $root.google.protobuf.BoolValue.toObject(message.enableIpv4, options); - if (message.privateNetwork != null && message.hasOwnProperty("privateNetwork")) - object.privateNetwork = message.privateNetwork; - if (message.requireSsl != null && message.hasOwnProperty("requireSsl")) - object.requireSsl = $root.google.protobuf.BoolValue.toObject(message.requireSsl, options); - if (message.authorizedNetworks && message.authorizedNetworks.length) { - object.authorizedNetworks = []; - for (var j = 0; j < message.authorizedNetworks.length; ++j) - object.authorizedNetworks[j] = $root.google.cloud.clouddms.v1.SqlAclEntry.toObject(message.authorizedNetworks[j], options); + object.name = ""; + object.requestId = ""; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; return object; }; /** - * Converts this SqlIpConfig to JSON. + * Converts this DeletePrivateConnectionRequest to JSON. * @function toJSON - * @memberof google.cloud.clouddms.v1.SqlIpConfig + * @memberof google.cloud.clouddms.v1.DeletePrivateConnectionRequest * @instance * @returns {Object.} JSON object */ - SqlIpConfig.prototype.toJSON = function toJSON() { + DeletePrivateConnectionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SqlIpConfig + * Gets the default type url for DeletePrivateConnectionRequest * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.SqlIpConfig + * @memberof google.cloud.clouddms.v1.DeletePrivateConnectionRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SqlIpConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeletePrivateConnectionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.clouddms.v1.SqlIpConfig"; + return typeUrlPrefix + "/google.cloud.clouddms.v1.DeletePrivateConnectionRequest"; }; - return SqlIpConfig; + return DeletePrivateConnectionRequest; })(); - v1.CloudSqlSettings = (function() { + v1.GetPrivateConnectionRequest = (function() { /** - * Properties of a CloudSqlSettings. + * Properties of a GetPrivateConnectionRequest. * @memberof google.cloud.clouddms.v1 - * @interface ICloudSqlSettings - * @property {google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion|null} [databaseVersion] CloudSqlSettings databaseVersion - * @property {Object.|null} [userLabels] CloudSqlSettings userLabels - * @property {string|null} [tier] CloudSqlSettings tier - * @property {google.protobuf.IInt64Value|null} [storageAutoResizeLimit] CloudSqlSettings storageAutoResizeLimit - * @property {google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy|null} [activationPolicy] CloudSqlSettings activationPolicy - * @property {google.cloud.clouddms.v1.ISqlIpConfig|null} [ipConfig] CloudSqlSettings ipConfig - * @property {google.protobuf.IBoolValue|null} [autoStorageIncrease] CloudSqlSettings autoStorageIncrease - * @property {Object.|null} [databaseFlags] CloudSqlSettings databaseFlags - * @property {google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType|null} [dataDiskType] CloudSqlSettings dataDiskType - * @property {google.protobuf.IInt64Value|null} [dataDiskSizeGb] CloudSqlSettings dataDiskSizeGb - * @property {string|null} [zone] CloudSqlSettings zone - * @property {string|null} [sourceId] CloudSqlSettings sourceId - * @property {string|null} [rootPassword] CloudSqlSettings rootPassword - * @property {boolean|null} [rootPasswordSet] CloudSqlSettings rootPasswordSet - * @property {string|null} [collation] CloudSqlSettings collation + * @interface IGetPrivateConnectionRequest + * @property {string|null} [name] GetPrivateConnectionRequest name */ /** - * Constructs a new CloudSqlSettings. + * Constructs a new GetPrivateConnectionRequest. * @memberof google.cloud.clouddms.v1 - * @classdesc Represents a CloudSqlSettings. - * @implements ICloudSqlSettings + * @classdesc Represents a GetPrivateConnectionRequest. + * @implements IGetPrivateConnectionRequest * @constructor - * @param {google.cloud.clouddms.v1.ICloudSqlSettings=} [properties] Properties to set + * @param {google.cloud.clouddms.v1.IGetPrivateConnectionRequest=} [properties] Properties to set */ - function CloudSqlSettings(properties) { - this.userLabels = {}; - this.databaseFlags = {}; + function GetPrivateConnectionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8312,311 +7875,75 @@ } /** - * CloudSqlSettings databaseVersion. - * @member {google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion} databaseVersion - * @memberof google.cloud.clouddms.v1.CloudSqlSettings - * @instance - */ - CloudSqlSettings.prototype.databaseVersion = 0; - - /** - * CloudSqlSettings userLabels. - * @member {Object.} userLabels - * @memberof google.cloud.clouddms.v1.CloudSqlSettings - * @instance - */ - CloudSqlSettings.prototype.userLabels = $util.emptyObject; - - /** - * CloudSqlSettings tier. - * @member {string} tier - * @memberof google.cloud.clouddms.v1.CloudSqlSettings - * @instance - */ - CloudSqlSettings.prototype.tier = ""; - - /** - * CloudSqlSettings storageAutoResizeLimit. - * @member {google.protobuf.IInt64Value|null|undefined} storageAutoResizeLimit - * @memberof google.cloud.clouddms.v1.CloudSqlSettings - * @instance - */ - CloudSqlSettings.prototype.storageAutoResizeLimit = null; - - /** - * CloudSqlSettings activationPolicy. - * @member {google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy} activationPolicy - * @memberof google.cloud.clouddms.v1.CloudSqlSettings - * @instance - */ - CloudSqlSettings.prototype.activationPolicy = 0; - - /** - * CloudSqlSettings ipConfig. - * @member {google.cloud.clouddms.v1.ISqlIpConfig|null|undefined} ipConfig - * @memberof google.cloud.clouddms.v1.CloudSqlSettings - * @instance - */ - CloudSqlSettings.prototype.ipConfig = null; - - /** - * CloudSqlSettings autoStorageIncrease. - * @member {google.protobuf.IBoolValue|null|undefined} autoStorageIncrease - * @memberof google.cloud.clouddms.v1.CloudSqlSettings - * @instance - */ - CloudSqlSettings.prototype.autoStorageIncrease = null; - - /** - * CloudSqlSettings databaseFlags. - * @member {Object.} databaseFlags - * @memberof google.cloud.clouddms.v1.CloudSqlSettings - * @instance - */ - CloudSqlSettings.prototype.databaseFlags = $util.emptyObject; - - /** - * CloudSqlSettings dataDiskType. - * @member {google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType} dataDiskType - * @memberof google.cloud.clouddms.v1.CloudSqlSettings - * @instance - */ - CloudSqlSettings.prototype.dataDiskType = 0; - - /** - * CloudSqlSettings dataDiskSizeGb. - * @member {google.protobuf.IInt64Value|null|undefined} dataDiskSizeGb - * @memberof google.cloud.clouddms.v1.CloudSqlSettings - * @instance - */ - CloudSqlSettings.prototype.dataDiskSizeGb = null; - - /** - * CloudSqlSettings zone. - * @member {string} zone - * @memberof google.cloud.clouddms.v1.CloudSqlSettings - * @instance - */ - CloudSqlSettings.prototype.zone = ""; - - /** - * CloudSqlSettings sourceId. - * @member {string} sourceId - * @memberof google.cloud.clouddms.v1.CloudSqlSettings - * @instance - */ - CloudSqlSettings.prototype.sourceId = ""; - - /** - * CloudSqlSettings rootPassword. - * @member {string} rootPassword - * @memberof google.cloud.clouddms.v1.CloudSqlSettings - * @instance - */ - CloudSqlSettings.prototype.rootPassword = ""; - - /** - * CloudSqlSettings rootPasswordSet. - * @member {boolean} rootPasswordSet - * @memberof google.cloud.clouddms.v1.CloudSqlSettings - * @instance - */ - CloudSqlSettings.prototype.rootPasswordSet = false; - - /** - * CloudSqlSettings collation. - * @member {string} collation - * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * GetPrivateConnectionRequest name. + * @member {string} name + * @memberof google.cloud.clouddms.v1.GetPrivateConnectionRequest * @instance */ - CloudSqlSettings.prototype.collation = ""; + GetPrivateConnectionRequest.prototype.name = ""; /** - * Creates a new CloudSqlSettings instance using the specified properties. + * Creates a new GetPrivateConnectionRequest instance using the specified properties. * @function create - * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @memberof google.cloud.clouddms.v1.GetPrivateConnectionRequest * @static - * @param {google.cloud.clouddms.v1.ICloudSqlSettings=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.CloudSqlSettings} CloudSqlSettings instance + * @param {google.cloud.clouddms.v1.IGetPrivateConnectionRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.GetPrivateConnectionRequest} GetPrivateConnectionRequest instance */ - CloudSqlSettings.create = function create(properties) { - return new CloudSqlSettings(properties); + GetPrivateConnectionRequest.create = function create(properties) { + return new GetPrivateConnectionRequest(properties); }; /** - * Encodes the specified CloudSqlSettings message. Does not implicitly {@link google.cloud.clouddms.v1.CloudSqlSettings.verify|verify} messages. + * Encodes the specified GetPrivateConnectionRequest message. Does not implicitly {@link google.cloud.clouddms.v1.GetPrivateConnectionRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @memberof google.cloud.clouddms.v1.GetPrivateConnectionRequest * @static - * @param {google.cloud.clouddms.v1.ICloudSqlSettings} message CloudSqlSettings message or plain object to encode + * @param {google.cloud.clouddms.v1.IGetPrivateConnectionRequest} message GetPrivateConnectionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudSqlSettings.encode = function encode(message, writer) { + GetPrivateConnectionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.databaseVersion != null && Object.hasOwnProperty.call(message, "databaseVersion")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.databaseVersion); - if (message.userLabels != null && Object.hasOwnProperty.call(message, "userLabels")) - for (var keys = Object.keys(message.userLabels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); - if (message.tier != null && Object.hasOwnProperty.call(message, "tier")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.tier); - if (message.storageAutoResizeLimit != null && Object.hasOwnProperty.call(message, "storageAutoResizeLimit")) - $root.google.protobuf.Int64Value.encode(message.storageAutoResizeLimit, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.activationPolicy != null && Object.hasOwnProperty.call(message, "activationPolicy")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.activationPolicy); - if (message.ipConfig != null && Object.hasOwnProperty.call(message, "ipConfig")) - $root.google.cloud.clouddms.v1.SqlIpConfig.encode(message.ipConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.autoStorageIncrease != null && Object.hasOwnProperty.call(message, "autoStorageIncrease")) - $root.google.protobuf.BoolValue.encode(message.autoStorageIncrease, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.databaseFlags != null && Object.hasOwnProperty.call(message, "databaseFlags")) - for (var keys = Object.keys(message.databaseFlags), i = 0; i < keys.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.databaseFlags[keys[i]]).ldelim(); - if (message.dataDiskType != null && Object.hasOwnProperty.call(message, "dataDiskType")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.dataDiskType); - if (message.dataDiskSizeGb != null && Object.hasOwnProperty.call(message, "dataDiskSizeGb")) - $root.google.protobuf.Int64Value.encode(message.dataDiskSizeGb, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.zone); - if (message.sourceId != null && Object.hasOwnProperty.call(message, "sourceId")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.sourceId); - if (message.rootPassword != null && Object.hasOwnProperty.call(message, "rootPassword")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.rootPassword); - if (message.rootPasswordSet != null && Object.hasOwnProperty.call(message, "rootPasswordSet")) - writer.uint32(/* id 14, wireType 0 =*/112).bool(message.rootPasswordSet); - if (message.collation != null && Object.hasOwnProperty.call(message, "collation")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.collation); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified CloudSqlSettings message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.CloudSqlSettings.verify|verify} messages. + * Encodes the specified GetPrivateConnectionRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.GetPrivateConnectionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @memberof google.cloud.clouddms.v1.GetPrivateConnectionRequest * @static - * @param {google.cloud.clouddms.v1.ICloudSqlSettings} message CloudSqlSettings message or plain object to encode + * @param {google.cloud.clouddms.v1.IGetPrivateConnectionRequest} message GetPrivateConnectionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudSqlSettings.encodeDelimited = function encodeDelimited(message, writer) { + GetPrivateConnectionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CloudSqlSettings message from the specified reader or buffer. + * Decodes a GetPrivateConnectionRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @memberof google.cloud.clouddms.v1.GetPrivateConnectionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.CloudSqlSettings} CloudSqlSettings + * @returns {google.cloud.clouddms.v1.GetPrivateConnectionRequest} GetPrivateConnectionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudSqlSettings.decode = function decode(reader, length) { + GetPrivateConnectionRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.CloudSqlSettings(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.GetPrivateConnectionRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.databaseVersion = reader.int32(); - break; - } - case 2: { - if (message.userLabels === $util.emptyObject) - message.userLabels = {}; - 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.userLabels[key] = value; - break; - } - case 3: { - message.tier = reader.string(); - break; - } - case 4: { - message.storageAutoResizeLimit = $root.google.protobuf.Int64Value.decode(reader, reader.uint32()); - break; - } - case 5: { - message.activationPolicy = reader.int32(); - break; - } - case 6: { - message.ipConfig = $root.google.cloud.clouddms.v1.SqlIpConfig.decode(reader, reader.uint32()); - break; - } - case 7: { - message.autoStorageIncrease = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); - break; - } - case 8: { - if (message.databaseFlags === $util.emptyObject) - message.databaseFlags = {}; - 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.databaseFlags[key] = value; - break; - } - case 9: { - message.dataDiskType = reader.int32(); - break; - } - case 10: { - message.dataDiskSizeGb = $root.google.protobuf.Int64Value.decode(reader, reader.uint32()); - break; - } - case 11: { - message.zone = reader.string(); - break; - } - case 12: { - message.sourceId = reader.string(); - break; - } - case 13: { - message.rootPassword = reader.string(); - break; - } - case 14: { - message.rootPasswordSet = reader.bool(); - break; - } - case 15: { - message.collation = reader.string(); + message.name = reader.string(); break; } default: @@ -8628,445 +7955,128 @@ }; /** - * Decodes a CloudSqlSettings message from the specified reader or buffer, length delimited. + * Decodes a GetPrivateConnectionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @memberof google.cloud.clouddms.v1.GetPrivateConnectionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.CloudSqlSettings} CloudSqlSettings + * @returns {google.cloud.clouddms.v1.GetPrivateConnectionRequest} GetPrivateConnectionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudSqlSettings.decodeDelimited = function decodeDelimited(reader) { + GetPrivateConnectionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CloudSqlSettings message. + * Verifies a GetPrivateConnectionRequest message. * @function verify - * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @memberof google.cloud.clouddms.v1.GetPrivateConnectionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CloudSqlSettings.verify = function verify(message) { + GetPrivateConnectionRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.databaseVersion != null && message.hasOwnProperty("databaseVersion")) - switch (message.databaseVersion) { - default: - return "databaseVersion: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - if (message.userLabels != null && message.hasOwnProperty("userLabels")) { - if (!$util.isObject(message.userLabels)) - return "userLabels: object expected"; - var key = Object.keys(message.userLabels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.userLabels[key[i]])) - return "userLabels: string{k:string} expected"; - } - if (message.tier != null && message.hasOwnProperty("tier")) - if (!$util.isString(message.tier)) - return "tier: string expected"; - if (message.storageAutoResizeLimit != null && message.hasOwnProperty("storageAutoResizeLimit")) { - var error = $root.google.protobuf.Int64Value.verify(message.storageAutoResizeLimit); - if (error) - return "storageAutoResizeLimit." + error; - } - if (message.activationPolicy != null && message.hasOwnProperty("activationPolicy")) - switch (message.activationPolicy) { - default: - return "activationPolicy: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.ipConfig != null && message.hasOwnProperty("ipConfig")) { - var error = $root.google.cloud.clouddms.v1.SqlIpConfig.verify(message.ipConfig); - if (error) - return "ipConfig." + error; - } - if (message.autoStorageIncrease != null && message.hasOwnProperty("autoStorageIncrease")) { - var error = $root.google.protobuf.BoolValue.verify(message.autoStorageIncrease); - if (error) - return "autoStorageIncrease." + error; - } - if (message.databaseFlags != null && message.hasOwnProperty("databaseFlags")) { - if (!$util.isObject(message.databaseFlags)) - return "databaseFlags: object expected"; - var key = Object.keys(message.databaseFlags); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.databaseFlags[key[i]])) - return "databaseFlags: string{k:string} expected"; - } - if (message.dataDiskType != null && message.hasOwnProperty("dataDiskType")) - switch (message.dataDiskType) { - default: - return "dataDiskType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.dataDiskSizeGb != null && message.hasOwnProperty("dataDiskSizeGb")) { - var error = $root.google.protobuf.Int64Value.verify(message.dataDiskSizeGb); - if (error) - return "dataDiskSizeGb." + error; - } - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - if (message.sourceId != null && message.hasOwnProperty("sourceId")) - if (!$util.isString(message.sourceId)) - return "sourceId: string expected"; - if (message.rootPassword != null && message.hasOwnProperty("rootPassword")) - if (!$util.isString(message.rootPassword)) - return "rootPassword: string expected"; - if (message.rootPasswordSet != null && message.hasOwnProperty("rootPasswordSet")) - if (typeof message.rootPasswordSet !== "boolean") - return "rootPasswordSet: boolean expected"; - if (message.collation != null && message.hasOwnProperty("collation")) - if (!$util.isString(message.collation)) - return "collation: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a CloudSqlSettings message from a plain object. Also converts values to their respective internal types. + * Creates a GetPrivateConnectionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @memberof google.cloud.clouddms.v1.GetPrivateConnectionRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.CloudSqlSettings} CloudSqlSettings + * @returns {google.cloud.clouddms.v1.GetPrivateConnectionRequest} GetPrivateConnectionRequest */ - CloudSqlSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.CloudSqlSettings) + GetPrivateConnectionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.GetPrivateConnectionRequest) return object; - var message = new $root.google.cloud.clouddms.v1.CloudSqlSettings(); - switch (object.databaseVersion) { - default: - if (typeof object.databaseVersion === "number") { - message.databaseVersion = object.databaseVersion; - break; - } - break; - case "SQL_DATABASE_VERSION_UNSPECIFIED": - case 0: - message.databaseVersion = 0; - break; - case "MYSQL_5_6": - case 1: - message.databaseVersion = 1; - break; - case "MYSQL_5_7": - case 2: - message.databaseVersion = 2; - break; - case "POSTGRES_9_6": - case 3: - message.databaseVersion = 3; - break; - case "POSTGRES_11": - case 4: - message.databaseVersion = 4; - break; - case "POSTGRES_10": - case 5: - message.databaseVersion = 5; - break; - case "MYSQL_8_0": - case 6: - message.databaseVersion = 6; - break; - case "POSTGRES_12": - case 7: - message.databaseVersion = 7; - break; - case "POSTGRES_13": - case 8: - message.databaseVersion = 8; - break; - } - if (object.userLabels) { - if (typeof object.userLabels !== "object") - throw TypeError(".google.cloud.clouddms.v1.CloudSqlSettings.userLabels: object expected"); - message.userLabels = {}; - for (var keys = Object.keys(object.userLabels), i = 0; i < keys.length; ++i) - message.userLabels[keys[i]] = String(object.userLabels[keys[i]]); - } - if (object.tier != null) - message.tier = String(object.tier); - if (object.storageAutoResizeLimit != null) { - if (typeof object.storageAutoResizeLimit !== "object") - throw TypeError(".google.cloud.clouddms.v1.CloudSqlSettings.storageAutoResizeLimit: object expected"); - message.storageAutoResizeLimit = $root.google.protobuf.Int64Value.fromObject(object.storageAutoResizeLimit); - } - switch (object.activationPolicy) { - default: - if (typeof object.activationPolicy === "number") { - message.activationPolicy = object.activationPolicy; - break; - } - break; - case "SQL_ACTIVATION_POLICY_UNSPECIFIED": - case 0: - message.activationPolicy = 0; - break; - case "ALWAYS": - case 1: - message.activationPolicy = 1; - break; - case "NEVER": - case 2: - message.activationPolicy = 2; - break; - } - if (object.ipConfig != null) { - if (typeof object.ipConfig !== "object") - throw TypeError(".google.cloud.clouddms.v1.CloudSqlSettings.ipConfig: object expected"); - message.ipConfig = $root.google.cloud.clouddms.v1.SqlIpConfig.fromObject(object.ipConfig); - } - if (object.autoStorageIncrease != null) { - if (typeof object.autoStorageIncrease !== "object") - throw TypeError(".google.cloud.clouddms.v1.CloudSqlSettings.autoStorageIncrease: object expected"); - message.autoStorageIncrease = $root.google.protobuf.BoolValue.fromObject(object.autoStorageIncrease); - } - if (object.databaseFlags) { - if (typeof object.databaseFlags !== "object") - throw TypeError(".google.cloud.clouddms.v1.CloudSqlSettings.databaseFlags: object expected"); - message.databaseFlags = {}; - for (var keys = Object.keys(object.databaseFlags), i = 0; i < keys.length; ++i) - message.databaseFlags[keys[i]] = String(object.databaseFlags[keys[i]]); - } - switch (object.dataDiskType) { - default: - if (typeof object.dataDiskType === "number") { - message.dataDiskType = object.dataDiskType; - break; - } - break; - case "SQL_DATA_DISK_TYPE_UNSPECIFIED": - case 0: - message.dataDiskType = 0; - break; - case "PD_SSD": - case 1: - message.dataDiskType = 1; - break; - case "PD_HDD": - case 2: - message.dataDiskType = 2; - break; - } - if (object.dataDiskSizeGb != null) { - if (typeof object.dataDiskSizeGb !== "object") - throw TypeError(".google.cloud.clouddms.v1.CloudSqlSettings.dataDiskSizeGb: object expected"); - message.dataDiskSizeGb = $root.google.protobuf.Int64Value.fromObject(object.dataDiskSizeGb); - } - if (object.zone != null) - message.zone = String(object.zone); - if (object.sourceId != null) - message.sourceId = String(object.sourceId); - if (object.rootPassword != null) - message.rootPassword = String(object.rootPassword); - if (object.rootPasswordSet != null) - message.rootPasswordSet = Boolean(object.rootPasswordSet); - if (object.collation != null) - message.collation = String(object.collation); + var message = new $root.google.cloud.clouddms.v1.GetPrivateConnectionRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a CloudSqlSettings message. Also converts values to other types if specified. + * Creates a plain object from a GetPrivateConnectionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @memberof google.cloud.clouddms.v1.GetPrivateConnectionRequest * @static - * @param {google.cloud.clouddms.v1.CloudSqlSettings} message CloudSqlSettings + * @param {google.cloud.clouddms.v1.GetPrivateConnectionRequest} message GetPrivateConnectionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CloudSqlSettings.toObject = function toObject(message, options) { + GetPrivateConnectionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) { - object.userLabels = {}; - object.databaseFlags = {}; - } - if (options.defaults) { - object.databaseVersion = options.enums === String ? "SQL_DATABASE_VERSION_UNSPECIFIED" : 0; - object.tier = ""; - object.storageAutoResizeLimit = null; - object.activationPolicy = options.enums === String ? "SQL_ACTIVATION_POLICY_UNSPECIFIED" : 0; - object.ipConfig = null; - object.autoStorageIncrease = null; - object.dataDiskType = options.enums === String ? "SQL_DATA_DISK_TYPE_UNSPECIFIED" : 0; - object.dataDiskSizeGb = null; - object.zone = ""; - object.sourceId = ""; - object.rootPassword = ""; - object.rootPasswordSet = false; - object.collation = ""; - } - if (message.databaseVersion != null && message.hasOwnProperty("databaseVersion")) - object.databaseVersion = options.enums === String ? $root.google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion[message.databaseVersion] === undefined ? message.databaseVersion : $root.google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion[message.databaseVersion] : message.databaseVersion; - var keys2; - if (message.userLabels && (keys2 = Object.keys(message.userLabels)).length) { - object.userLabels = {}; - for (var j = 0; j < keys2.length; ++j) - object.userLabels[keys2[j]] = message.userLabels[keys2[j]]; - } - if (message.tier != null && message.hasOwnProperty("tier")) - object.tier = message.tier; - if (message.storageAutoResizeLimit != null && message.hasOwnProperty("storageAutoResizeLimit")) - object.storageAutoResizeLimit = $root.google.protobuf.Int64Value.toObject(message.storageAutoResizeLimit, options); - if (message.activationPolicy != null && message.hasOwnProperty("activationPolicy")) - object.activationPolicy = options.enums === String ? $root.google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy[message.activationPolicy] === undefined ? message.activationPolicy : $root.google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy[message.activationPolicy] : message.activationPolicy; - if (message.ipConfig != null && message.hasOwnProperty("ipConfig")) - object.ipConfig = $root.google.cloud.clouddms.v1.SqlIpConfig.toObject(message.ipConfig, options); - if (message.autoStorageIncrease != null && message.hasOwnProperty("autoStorageIncrease")) - object.autoStorageIncrease = $root.google.protobuf.BoolValue.toObject(message.autoStorageIncrease, options); - if (message.databaseFlags && (keys2 = Object.keys(message.databaseFlags)).length) { - object.databaseFlags = {}; - for (var j = 0; j < keys2.length; ++j) - object.databaseFlags[keys2[j]] = message.databaseFlags[keys2[j]]; - } - if (message.dataDiskType != null && message.hasOwnProperty("dataDiskType")) - object.dataDiskType = options.enums === String ? $root.google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType[message.dataDiskType] === undefined ? message.dataDiskType : $root.google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType[message.dataDiskType] : message.dataDiskType; - if (message.dataDiskSizeGb != null && message.hasOwnProperty("dataDiskSizeGb")) - object.dataDiskSizeGb = $root.google.protobuf.Int64Value.toObject(message.dataDiskSizeGb, options); - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - if (message.sourceId != null && message.hasOwnProperty("sourceId")) - object.sourceId = message.sourceId; - if (message.rootPassword != null && message.hasOwnProperty("rootPassword")) - object.rootPassword = message.rootPassword; - if (message.rootPasswordSet != null && message.hasOwnProperty("rootPasswordSet")) - object.rootPasswordSet = message.rootPasswordSet; - if (message.collation != null && message.hasOwnProperty("collation")) - object.collation = message.collation; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this CloudSqlSettings to JSON. + * Converts this GetPrivateConnectionRequest to JSON. * @function toJSON - * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @memberof google.cloud.clouddms.v1.GetPrivateConnectionRequest * @instance * @returns {Object.} JSON object */ - CloudSqlSettings.prototype.toJSON = function toJSON() { + GetPrivateConnectionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CloudSqlSettings + * Gets the default type url for GetPrivateConnectionRequest * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @memberof google.cloud.clouddms.v1.GetPrivateConnectionRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CloudSqlSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetPrivateConnectionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.clouddms.v1.CloudSqlSettings"; + return typeUrlPrefix + "/google.cloud.clouddms.v1.GetPrivateConnectionRequest"; }; - /** - * SqlActivationPolicy enum. - * @name google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy - * @enum {number} - * @property {number} SQL_ACTIVATION_POLICY_UNSPECIFIED=0 SQL_ACTIVATION_POLICY_UNSPECIFIED value - * @property {number} ALWAYS=1 ALWAYS value - * @property {number} NEVER=2 NEVER value - */ - CloudSqlSettings.SqlActivationPolicy = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SQL_ACTIVATION_POLICY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ALWAYS"] = 1; - values[valuesById[2] = "NEVER"] = 2; - return values; - })(); - - /** - * SqlDataDiskType enum. - * @name google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType - * @enum {number} - * @property {number} SQL_DATA_DISK_TYPE_UNSPECIFIED=0 SQL_DATA_DISK_TYPE_UNSPECIFIED value - * @property {number} PD_SSD=1 PD_SSD value - * @property {number} PD_HDD=2 PD_HDD value - */ - CloudSqlSettings.SqlDataDiskType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SQL_DATA_DISK_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PD_SSD"] = 1; - values[valuesById[2] = "PD_HDD"] = 2; - return values; - })(); - - /** - * SqlDatabaseVersion enum. - * @name google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion - * @enum {number} - * @property {number} SQL_DATABASE_VERSION_UNSPECIFIED=0 SQL_DATABASE_VERSION_UNSPECIFIED value - * @property {number} MYSQL_5_6=1 MYSQL_5_6 value - * @property {number} MYSQL_5_7=2 MYSQL_5_7 value - * @property {number} POSTGRES_9_6=3 POSTGRES_9_6 value - * @property {number} POSTGRES_11=4 POSTGRES_11 value - * @property {number} POSTGRES_10=5 POSTGRES_10 value - * @property {number} MYSQL_8_0=6 MYSQL_8_0 value - * @property {number} POSTGRES_12=7 POSTGRES_12 value - * @property {number} POSTGRES_13=8 POSTGRES_13 value - */ - CloudSqlSettings.SqlDatabaseVersion = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SQL_DATABASE_VERSION_UNSPECIFIED"] = 0; - values[valuesById[1] = "MYSQL_5_6"] = 1; - values[valuesById[2] = "MYSQL_5_7"] = 2; - values[valuesById[3] = "POSTGRES_9_6"] = 3; - values[valuesById[4] = "POSTGRES_11"] = 4; - values[valuesById[5] = "POSTGRES_10"] = 5; - values[valuesById[6] = "MYSQL_8_0"] = 6; - values[valuesById[7] = "POSTGRES_12"] = 7; - values[valuesById[8] = "POSTGRES_13"] = 8; - return values; - })(); - - return CloudSqlSettings; + return GetPrivateConnectionRequest; })(); - v1.StaticIpConnectivity = (function() { + v1.OperationMetadata = (function() { /** - * Properties of a StaticIpConnectivity. + * Properties of an OperationMetadata. * @memberof google.cloud.clouddms.v1 - * @interface IStaticIpConnectivity + * @interface IOperationMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime + * @property {string|null} [target] OperationMetadata target + * @property {string|null} [verb] OperationMetadata verb + * @property {string|null} [statusMessage] OperationMetadata statusMessage + * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation + * @property {string|null} [apiVersion] OperationMetadata apiVersion */ /** - * Constructs a new StaticIpConnectivity. + * Constructs a new OperationMetadata. * @memberof google.cloud.clouddms.v1 - * @classdesc Represents a StaticIpConnectivity. - * @implements IStaticIpConnectivity + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata * @constructor - * @param {google.cloud.clouddms.v1.IStaticIpConnectivity=} [properties] Properties to set + * @param {google.cloud.clouddms.v1.IOperationMetadata=} [properties] Properties to set */ - function StaticIpConnectivity(properties) { + function OperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9074,63 +8084,161 @@ } /** - * Creates a new StaticIpConnectivity instance using the specified properties. - * @function create - * @memberof google.cloud.clouddms.v1.StaticIpConnectivity - * @static - * @param {google.cloud.clouddms.v1.IStaticIpConnectivity=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.StaticIpConnectivity} StaticIpConnectivity instance + * OperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.clouddms.v1.OperationMetadata + * @instance */ - StaticIpConnectivity.create = function create(properties) { - return new StaticIpConnectivity(properties); - }; + OperationMetadata.prototype.createTime = null; /** - * Encodes the specified StaticIpConnectivity message. Does not implicitly {@link google.cloud.clouddms.v1.StaticIpConnectivity.verify|verify} messages. - * @function encode - * @memberof google.cloud.clouddms.v1.StaticIpConnectivity - * @static - * @param {google.cloud.clouddms.v1.IStaticIpConnectivity} message StaticIpConnectivity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.clouddms.v1.OperationMetadata + * @instance */ - StaticIpConnectivity.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + OperationMetadata.prototype.endTime = null; /** - * Encodes the specified StaticIpConnectivity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.StaticIpConnectivity.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.StaticIpConnectivity - * @static - * @param {google.cloud.clouddms.v1.IStaticIpConnectivity} message StaticIpConnectivity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.clouddms.v1.OperationMetadata + * @instance */ - StaticIpConnectivity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + OperationMetadata.prototype.target = ""; + + /** + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.clouddms.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.verb = ""; + + /** + * OperationMetadata statusMessage. + * @member {string} statusMessage + * @memberof google.cloud.clouddms.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.statusMessage = ""; + + /** + * OperationMetadata requestedCancellation. + * @member {boolean} requestedCancellation + * @memberof google.cloud.clouddms.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.requestedCancellation = false; + + /** + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.clouddms.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.apiVersion = ""; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.OperationMetadata + * @static + * @param {google.cloud.clouddms.v1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); }; /** - * Decodes a StaticIpConnectivity message from the specified reader or buffer. + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.clouddms.v1.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.OperationMetadata + * @static + * @param {google.cloud.clouddms.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); + if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); + if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); + if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); + if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); + return writer; + }; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.OperationMetadata + * @static + * @param {google.cloud.clouddms.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.clouddms.v1.StaticIpConnectivity + * @memberof google.cloud.clouddms.v1.OperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.StaticIpConnectivity} StaticIpConnectivity + * @returns {google.cloud.clouddms.v1.OperationMetadata} OperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StaticIpConnectivity.decode = function decode(reader, length) { + OperationMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.StaticIpConnectivity(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.OperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.target = reader.string(); + break; + } + case 4: { + message.verb = reader.string(); + break; + } + case 5: { + message.statusMessage = reader.string(); + break; + } + case 6: { + message.requestedCancellation = reader.bool(); + break; + } + case 7: { + message.apiVersion = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -9140,112 +8248,184 @@ }; /** - * Decodes a StaticIpConnectivity message from the specified reader or buffer, length delimited. + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.StaticIpConnectivity + * @memberof google.cloud.clouddms.v1.OperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.StaticIpConnectivity} StaticIpConnectivity + * @returns {google.cloud.clouddms.v1.OperationMetadata} OperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StaticIpConnectivity.decodeDelimited = function decodeDelimited(reader) { + OperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StaticIpConnectivity message. + * Verifies an OperationMetadata message. * @function verify - * @memberof google.cloud.clouddms.v1.StaticIpConnectivity + * @memberof google.cloud.clouddms.v1.OperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StaticIpConnectivity.verify = function verify(message) { + OperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.verb != null && message.hasOwnProperty("verb")) + if (!$util.isString(message.verb)) + return "verb: string expected"; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + if (!$util.isString(message.statusMessage)) + return "statusMessage: string expected"; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + if (typeof message.requestedCancellation !== "boolean") + return "requestedCancellation: boolean expected"; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + if (!$util.isString(message.apiVersion)) + return "apiVersion: string expected"; return null; }; /** - * Creates a StaticIpConnectivity message from a plain object. Also converts values to their respective internal types. + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.clouddms.v1.StaticIpConnectivity + * @memberof google.cloud.clouddms.v1.OperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.StaticIpConnectivity} StaticIpConnectivity + * @returns {google.cloud.clouddms.v1.OperationMetadata} OperationMetadata */ - StaticIpConnectivity.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.StaticIpConnectivity) + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.OperationMetadata) return object; - return new $root.google.cloud.clouddms.v1.StaticIpConnectivity(); + var message = new $root.google.cloud.clouddms.v1.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.clouddms.v1.OperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.clouddms.v1.OperationMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.target != null) + message.target = String(object.target); + if (object.verb != null) + message.verb = String(object.verb); + if (object.statusMessage != null) + message.statusMessage = String(object.statusMessage); + if (object.requestedCancellation != null) + message.requestedCancellation = Boolean(object.requestedCancellation); + if (object.apiVersion != null) + message.apiVersion = String(object.apiVersion); + return message; }; /** - * Creates a plain object from a StaticIpConnectivity message. Also converts values to other types if specified. + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.clouddms.v1.StaticIpConnectivity + * @memberof google.cloud.clouddms.v1.OperationMetadata * @static - * @param {google.cloud.clouddms.v1.StaticIpConnectivity} message StaticIpConnectivity + * @param {google.cloud.clouddms.v1.OperationMetadata} message OperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StaticIpConnectivity.toObject = function toObject() { - return {}; + OperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.target = ""; + object.verb = ""; + object.statusMessage = ""; + object.requestedCancellation = false; + object.apiVersion = ""; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = message.target; + if (message.verb != null && message.hasOwnProperty("verb")) + object.verb = message.verb; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + object.statusMessage = message.statusMessage; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + object.requestedCancellation = message.requestedCancellation; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + object.apiVersion = message.apiVersion; + return object; }; /** - * Converts this StaticIpConnectivity to JSON. + * Converts this OperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.clouddms.v1.StaticIpConnectivity + * @memberof google.cloud.clouddms.v1.OperationMetadata * @instance * @returns {Object.} JSON object */ - StaticIpConnectivity.prototype.toJSON = function toJSON() { + OperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for StaticIpConnectivity + * Gets the default type url for OperationMetadata * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.StaticIpConnectivity + * @memberof google.cloud.clouddms.v1.OperationMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - StaticIpConnectivity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.clouddms.v1.StaticIpConnectivity"; + return typeUrlPrefix + "/google.cloud.clouddms.v1.OperationMetadata"; }; - return StaticIpConnectivity; + return OperationMetadata; })(); - v1.ReverseSshConnectivity = (function() { + v1.ListConversionWorkspacesRequest = (function() { /** - * Properties of a ReverseSshConnectivity. + * Properties of a ListConversionWorkspacesRequest. * @memberof google.cloud.clouddms.v1 - * @interface IReverseSshConnectivity - * @property {string|null} [vmIp] ReverseSshConnectivity vmIp - * @property {number|null} [vmPort] ReverseSshConnectivity vmPort - * @property {string|null} [vm] ReverseSshConnectivity vm - * @property {string|null} [vpc] ReverseSshConnectivity vpc + * @interface IListConversionWorkspacesRequest + * @property {string|null} [parent] ListConversionWorkspacesRequest parent + * @property {number|null} [pageSize] ListConversionWorkspacesRequest pageSize + * @property {string|null} [pageToken] ListConversionWorkspacesRequest pageToken + * @property {string|null} [filter] ListConversionWorkspacesRequest filter */ /** - * Constructs a new ReverseSshConnectivity. + * Constructs a new ListConversionWorkspacesRequest. * @memberof google.cloud.clouddms.v1 - * @classdesc Represents a ReverseSshConnectivity. - * @implements IReverseSshConnectivity + * @classdesc Represents a ListConversionWorkspacesRequest. + * @implements IListConversionWorkspacesRequest * @constructor - * @param {google.cloud.clouddms.v1.IReverseSshConnectivity=} [properties] Properties to set + * @param {google.cloud.clouddms.v1.IListConversionWorkspacesRequest=} [properties] Properties to set */ - function ReverseSshConnectivity(properties) { + function ListConversionWorkspacesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9253,117 +8433,117 @@ } /** - * ReverseSshConnectivity vmIp. - * @member {string} vmIp - * @memberof google.cloud.clouddms.v1.ReverseSshConnectivity + * ListConversionWorkspacesRequest parent. + * @member {string} parent + * @memberof google.cloud.clouddms.v1.ListConversionWorkspacesRequest * @instance */ - ReverseSshConnectivity.prototype.vmIp = ""; + ListConversionWorkspacesRequest.prototype.parent = ""; /** - * ReverseSshConnectivity vmPort. - * @member {number} vmPort - * @memberof google.cloud.clouddms.v1.ReverseSshConnectivity + * ListConversionWorkspacesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.clouddms.v1.ListConversionWorkspacesRequest * @instance */ - ReverseSshConnectivity.prototype.vmPort = 0; + ListConversionWorkspacesRequest.prototype.pageSize = 0; /** - * ReverseSshConnectivity vm. - * @member {string} vm - * @memberof google.cloud.clouddms.v1.ReverseSshConnectivity + * ListConversionWorkspacesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.clouddms.v1.ListConversionWorkspacesRequest * @instance */ - ReverseSshConnectivity.prototype.vm = ""; + ListConversionWorkspacesRequest.prototype.pageToken = ""; /** - * ReverseSshConnectivity vpc. - * @member {string} vpc - * @memberof google.cloud.clouddms.v1.ReverseSshConnectivity + * ListConversionWorkspacesRequest filter. + * @member {string} filter + * @memberof google.cloud.clouddms.v1.ListConversionWorkspacesRequest * @instance */ - ReverseSshConnectivity.prototype.vpc = ""; + ListConversionWorkspacesRequest.prototype.filter = ""; /** - * Creates a new ReverseSshConnectivity instance using the specified properties. + * Creates a new ListConversionWorkspacesRequest instance using the specified properties. * @function create - * @memberof google.cloud.clouddms.v1.ReverseSshConnectivity + * @memberof google.cloud.clouddms.v1.ListConversionWorkspacesRequest * @static - * @param {google.cloud.clouddms.v1.IReverseSshConnectivity=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.ReverseSshConnectivity} ReverseSshConnectivity instance + * @param {google.cloud.clouddms.v1.IListConversionWorkspacesRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.ListConversionWorkspacesRequest} ListConversionWorkspacesRequest instance */ - ReverseSshConnectivity.create = function create(properties) { - return new ReverseSshConnectivity(properties); + ListConversionWorkspacesRequest.create = function create(properties) { + return new ListConversionWorkspacesRequest(properties); }; /** - * Encodes the specified ReverseSshConnectivity message. Does not implicitly {@link google.cloud.clouddms.v1.ReverseSshConnectivity.verify|verify} messages. + * Encodes the specified ListConversionWorkspacesRequest message. Does not implicitly {@link google.cloud.clouddms.v1.ListConversionWorkspacesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.clouddms.v1.ReverseSshConnectivity + * @memberof google.cloud.clouddms.v1.ListConversionWorkspacesRequest * @static - * @param {google.cloud.clouddms.v1.IReverseSshConnectivity} message ReverseSshConnectivity message or plain object to encode + * @param {google.cloud.clouddms.v1.IListConversionWorkspacesRequest} message ListConversionWorkspacesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReverseSshConnectivity.encode = function encode(message, writer) { + ListConversionWorkspacesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.vmIp != null && Object.hasOwnProperty.call(message, "vmIp")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.vmIp); - if (message.vmPort != null && Object.hasOwnProperty.call(message, "vmPort")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.vmPort); - if (message.vm != null && Object.hasOwnProperty.call(message, "vm")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.vm); - if (message.vpc != null && Object.hasOwnProperty.call(message, "vpc")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.vpc); + 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.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); return writer; }; /** - * Encodes the specified ReverseSshConnectivity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ReverseSshConnectivity.verify|verify} messages. + * Encodes the specified ListConversionWorkspacesRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ListConversionWorkspacesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.ReverseSshConnectivity + * @memberof google.cloud.clouddms.v1.ListConversionWorkspacesRequest * @static - * @param {google.cloud.clouddms.v1.IReverseSshConnectivity} message ReverseSshConnectivity message or plain object to encode + * @param {google.cloud.clouddms.v1.IListConversionWorkspacesRequest} message ListConversionWorkspacesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReverseSshConnectivity.encodeDelimited = function encodeDelimited(message, writer) { + ListConversionWorkspacesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReverseSshConnectivity message from the specified reader or buffer. + * Decodes a ListConversionWorkspacesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.clouddms.v1.ReverseSshConnectivity + * @memberof google.cloud.clouddms.v1.ListConversionWorkspacesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.ReverseSshConnectivity} ReverseSshConnectivity + * @returns {google.cloud.clouddms.v1.ListConversionWorkspacesRequest} ListConversionWorkspacesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReverseSshConnectivity.decode = function decode(reader, length) { + ListConversionWorkspacesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.ReverseSshConnectivity(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.ListConversionWorkspacesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.vmIp = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.vmPort = reader.int32(); + message.pageSize = reader.int32(); break; } case 3: { - message.vm = reader.string(); + message.pageToken = reader.string(); break; } case 4: { - message.vpc = reader.string(); + message.filter = reader.string(); break; } default: @@ -9375,147 +8555,151 @@ }; /** - * Decodes a ReverseSshConnectivity message from the specified reader or buffer, length delimited. + * Decodes a ListConversionWorkspacesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.ReverseSshConnectivity + * @memberof google.cloud.clouddms.v1.ListConversionWorkspacesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.ReverseSshConnectivity} ReverseSshConnectivity + * @returns {google.cloud.clouddms.v1.ListConversionWorkspacesRequest} ListConversionWorkspacesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReverseSshConnectivity.decodeDelimited = function decodeDelimited(reader) { + ListConversionWorkspacesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReverseSshConnectivity message. + * Verifies a ListConversionWorkspacesRequest message. * @function verify - * @memberof google.cloud.clouddms.v1.ReverseSshConnectivity + * @memberof google.cloud.clouddms.v1.ListConversionWorkspacesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReverseSshConnectivity.verify = function verify(message) { + ListConversionWorkspacesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.vmIp != null && message.hasOwnProperty("vmIp")) - if (!$util.isString(message.vmIp)) - return "vmIp: string expected"; - if (message.vmPort != null && message.hasOwnProperty("vmPort")) - if (!$util.isInteger(message.vmPort)) - return "vmPort: integer expected"; - if (message.vm != null && message.hasOwnProperty("vm")) - if (!$util.isString(message.vm)) - return "vm: string expected"; - if (message.vpc != null && message.hasOwnProperty("vpc")) - if (!$util.isString(message.vpc)) - return "vpc: string 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.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; return null; }; /** - * Creates a ReverseSshConnectivity message from a plain object. Also converts values to their respective internal types. + * Creates a ListConversionWorkspacesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.clouddms.v1.ReverseSshConnectivity + * @memberof google.cloud.clouddms.v1.ListConversionWorkspacesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.ReverseSshConnectivity} ReverseSshConnectivity + * @returns {google.cloud.clouddms.v1.ListConversionWorkspacesRequest} ListConversionWorkspacesRequest */ - ReverseSshConnectivity.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.ReverseSshConnectivity) + ListConversionWorkspacesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.ListConversionWorkspacesRequest) return object; - var message = new $root.google.cloud.clouddms.v1.ReverseSshConnectivity(); - if (object.vmIp != null) - message.vmIp = String(object.vmIp); - if (object.vmPort != null) - message.vmPort = object.vmPort | 0; - if (object.vm != null) - message.vm = String(object.vm); - if (object.vpc != null) - message.vpc = String(object.vpc); + var message = new $root.google.cloud.clouddms.v1.ListConversionWorkspacesRequest(); + 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.filter != null) + message.filter = String(object.filter); return message; }; /** - * Creates a plain object from a ReverseSshConnectivity message. Also converts values to other types if specified. + * Creates a plain object from a ListConversionWorkspacesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.clouddms.v1.ReverseSshConnectivity + * @memberof google.cloud.clouddms.v1.ListConversionWorkspacesRequest * @static - * @param {google.cloud.clouddms.v1.ReverseSshConnectivity} message ReverseSshConnectivity + * @param {google.cloud.clouddms.v1.ListConversionWorkspacesRequest} message ListConversionWorkspacesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReverseSshConnectivity.toObject = function toObject(message, options) { + ListConversionWorkspacesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.vmIp = ""; - object.vmPort = 0; - object.vm = ""; - object.vpc = ""; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; } - if (message.vmIp != null && message.hasOwnProperty("vmIp")) - object.vmIp = message.vmIp; - if (message.vmPort != null && message.hasOwnProperty("vmPort")) - object.vmPort = message.vmPort; - if (message.vm != null && message.hasOwnProperty("vm")) - object.vm = message.vm; - if (message.vpc != null && message.hasOwnProperty("vpc")) - object.vpc = message.vpc; + 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.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; return object; }; /** - * Converts this ReverseSshConnectivity to JSON. + * Converts this ListConversionWorkspacesRequest to JSON. * @function toJSON - * @memberof google.cloud.clouddms.v1.ReverseSshConnectivity + * @memberof google.cloud.clouddms.v1.ListConversionWorkspacesRequest * @instance * @returns {Object.} JSON object */ - ReverseSshConnectivity.prototype.toJSON = function toJSON() { + ListConversionWorkspacesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ReverseSshConnectivity + * Gets the default type url for ListConversionWorkspacesRequest * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.ReverseSshConnectivity + * @memberof google.cloud.clouddms.v1.ListConversionWorkspacesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ReverseSshConnectivity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListConversionWorkspacesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.clouddms.v1.ReverseSshConnectivity"; + return typeUrlPrefix + "/google.cloud.clouddms.v1.ListConversionWorkspacesRequest"; }; - return ReverseSshConnectivity; + return ListConversionWorkspacesRequest; })(); - v1.VpcPeeringConnectivity = (function() { + v1.ListConversionWorkspacesResponse = (function() { /** - * Properties of a VpcPeeringConnectivity. + * Properties of a ListConversionWorkspacesResponse. * @memberof google.cloud.clouddms.v1 - * @interface IVpcPeeringConnectivity - * @property {string|null} [vpc] VpcPeeringConnectivity vpc + * @interface IListConversionWorkspacesResponse + * @property {Array.|null} [conversionWorkspaces] ListConversionWorkspacesResponse conversionWorkspaces + * @property {string|null} [nextPageToken] ListConversionWorkspacesResponse nextPageToken + * @property {Array.|null} [unreachable] ListConversionWorkspacesResponse unreachable */ /** - * Constructs a new VpcPeeringConnectivity. + * Constructs a new ListConversionWorkspacesResponse. * @memberof google.cloud.clouddms.v1 - * @classdesc Represents a VpcPeeringConnectivity. - * @implements IVpcPeeringConnectivity + * @classdesc Represents a ListConversionWorkspacesResponse. + * @implements IListConversionWorkspacesResponse * @constructor - * @param {google.cloud.clouddms.v1.IVpcPeeringConnectivity=} [properties] Properties to set + * @param {google.cloud.clouddms.v1.IListConversionWorkspacesResponse=} [properties] Properties to set */ - function VpcPeeringConnectivity(properties) { + function ListConversionWorkspacesResponse(properties) { + this.conversionWorkspaces = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9523,75 +8707,109 @@ } /** - * VpcPeeringConnectivity vpc. - * @member {string} vpc - * @memberof google.cloud.clouddms.v1.VpcPeeringConnectivity + * ListConversionWorkspacesResponse conversionWorkspaces. + * @member {Array.} conversionWorkspaces + * @memberof google.cloud.clouddms.v1.ListConversionWorkspacesResponse * @instance */ - VpcPeeringConnectivity.prototype.vpc = ""; + ListConversionWorkspacesResponse.prototype.conversionWorkspaces = $util.emptyArray; /** - * Creates a new VpcPeeringConnectivity instance using the specified properties. + * ListConversionWorkspacesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.clouddms.v1.ListConversionWorkspacesResponse + * @instance + */ + ListConversionWorkspacesResponse.prototype.nextPageToken = ""; + + /** + * ListConversionWorkspacesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.clouddms.v1.ListConversionWorkspacesResponse + * @instance + */ + ListConversionWorkspacesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListConversionWorkspacesResponse instance using the specified properties. * @function create - * @memberof google.cloud.clouddms.v1.VpcPeeringConnectivity + * @memberof google.cloud.clouddms.v1.ListConversionWorkspacesResponse * @static - * @param {google.cloud.clouddms.v1.IVpcPeeringConnectivity=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.VpcPeeringConnectivity} VpcPeeringConnectivity instance + * @param {google.cloud.clouddms.v1.IListConversionWorkspacesResponse=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.ListConversionWorkspacesResponse} ListConversionWorkspacesResponse instance */ - VpcPeeringConnectivity.create = function create(properties) { - return new VpcPeeringConnectivity(properties); + ListConversionWorkspacesResponse.create = function create(properties) { + return new ListConversionWorkspacesResponse(properties); }; /** - * Encodes the specified VpcPeeringConnectivity message. Does not implicitly {@link google.cloud.clouddms.v1.VpcPeeringConnectivity.verify|verify} messages. + * Encodes the specified ListConversionWorkspacesResponse message. Does not implicitly {@link google.cloud.clouddms.v1.ListConversionWorkspacesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.clouddms.v1.VpcPeeringConnectivity + * @memberof google.cloud.clouddms.v1.ListConversionWorkspacesResponse * @static - * @param {google.cloud.clouddms.v1.IVpcPeeringConnectivity} message VpcPeeringConnectivity message or plain object to encode + * @param {google.cloud.clouddms.v1.IListConversionWorkspacesResponse} message ListConversionWorkspacesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VpcPeeringConnectivity.encode = function encode(message, writer) { + ListConversionWorkspacesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.vpc != null && Object.hasOwnProperty.call(message, "vpc")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.vpc); + if (message.conversionWorkspaces != null && message.conversionWorkspaces.length) + for (var i = 0; i < message.conversionWorkspaces.length; ++i) + $root.google.cloud.clouddms.v1.ConversionWorkspace.encode(message.conversionWorkspaces[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); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); return writer; }; /** - * Encodes the specified VpcPeeringConnectivity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.VpcPeeringConnectivity.verify|verify} messages. + * Encodes the specified ListConversionWorkspacesResponse message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ListConversionWorkspacesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.VpcPeeringConnectivity + * @memberof google.cloud.clouddms.v1.ListConversionWorkspacesResponse * @static - * @param {google.cloud.clouddms.v1.IVpcPeeringConnectivity} message VpcPeeringConnectivity message or plain object to encode + * @param {google.cloud.clouddms.v1.IListConversionWorkspacesResponse} message ListConversionWorkspacesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VpcPeeringConnectivity.encodeDelimited = function encodeDelimited(message, writer) { + ListConversionWorkspacesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VpcPeeringConnectivity message from the specified reader or buffer. + * Decodes a ListConversionWorkspacesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.clouddms.v1.VpcPeeringConnectivity + * @memberof google.cloud.clouddms.v1.ListConversionWorkspacesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.VpcPeeringConnectivity} VpcPeeringConnectivity + * @returns {google.cloud.clouddms.v1.ListConversionWorkspacesResponse} ListConversionWorkspacesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VpcPeeringConnectivity.decode = function decode(reader, length) { + ListConversionWorkspacesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.VpcPeeringConnectivity(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.ListConversionWorkspacesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.vpc = reader.string(); + if (!(message.conversionWorkspaces && message.conversionWorkspaces.length)) + message.conversionWorkspaces = []; + message.conversionWorkspaces.push($root.google.cloud.clouddms.v1.ConversionWorkspace.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); break; } default: @@ -9603,123 +8821,169 @@ }; /** - * Decodes a VpcPeeringConnectivity message from the specified reader or buffer, length delimited. + * Decodes a ListConversionWorkspacesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.VpcPeeringConnectivity + * @memberof google.cloud.clouddms.v1.ListConversionWorkspacesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.VpcPeeringConnectivity} VpcPeeringConnectivity + * @returns {google.cloud.clouddms.v1.ListConversionWorkspacesResponse} ListConversionWorkspacesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VpcPeeringConnectivity.decodeDelimited = function decodeDelimited(reader) { + ListConversionWorkspacesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VpcPeeringConnectivity message. + * Verifies a ListConversionWorkspacesResponse message. * @function verify - * @memberof google.cloud.clouddms.v1.VpcPeeringConnectivity + * @memberof google.cloud.clouddms.v1.ListConversionWorkspacesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VpcPeeringConnectivity.verify = function verify(message) { + ListConversionWorkspacesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.vpc != null && message.hasOwnProperty("vpc")) - if (!$util.isString(message.vpc)) - return "vpc: string expected"; + if (message.conversionWorkspaces != null && message.hasOwnProperty("conversionWorkspaces")) { + if (!Array.isArray(message.conversionWorkspaces)) + return "conversionWorkspaces: array expected"; + for (var i = 0; i < message.conversionWorkspaces.length; ++i) { + var error = $root.google.cloud.clouddms.v1.ConversionWorkspace.verify(message.conversionWorkspaces[i]); + if (error) + return "conversionWorkspaces." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } return null; }; /** - * Creates a VpcPeeringConnectivity message from a plain object. Also converts values to their respective internal types. + * Creates a ListConversionWorkspacesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.clouddms.v1.VpcPeeringConnectivity + * @memberof google.cloud.clouddms.v1.ListConversionWorkspacesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.VpcPeeringConnectivity} VpcPeeringConnectivity + * @returns {google.cloud.clouddms.v1.ListConversionWorkspacesResponse} ListConversionWorkspacesResponse */ - VpcPeeringConnectivity.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.VpcPeeringConnectivity) + ListConversionWorkspacesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.ListConversionWorkspacesResponse) return object; - var message = new $root.google.cloud.clouddms.v1.VpcPeeringConnectivity(); - if (object.vpc != null) - message.vpc = String(object.vpc); - return message; - }; - - /** - * Creates a plain object from a VpcPeeringConnectivity message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.clouddms.v1.VpcPeeringConnectivity - * @static - * @param {google.cloud.clouddms.v1.VpcPeeringConnectivity} message VpcPeeringConnectivity + var message = new $root.google.cloud.clouddms.v1.ListConversionWorkspacesResponse(); + if (object.conversionWorkspaces) { + if (!Array.isArray(object.conversionWorkspaces)) + throw TypeError(".google.cloud.clouddms.v1.ListConversionWorkspacesResponse.conversionWorkspaces: array expected"); + message.conversionWorkspaces = []; + for (var i = 0; i < object.conversionWorkspaces.length; ++i) { + if (typeof object.conversionWorkspaces[i] !== "object") + throw TypeError(".google.cloud.clouddms.v1.ListConversionWorkspacesResponse.conversionWorkspaces: object expected"); + message.conversionWorkspaces[i] = $root.google.cloud.clouddms.v1.ConversionWorkspace.fromObject(object.conversionWorkspaces[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.clouddms.v1.ListConversionWorkspacesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListConversionWorkspacesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.ListConversionWorkspacesResponse + * @static + * @param {google.cloud.clouddms.v1.ListConversionWorkspacesResponse} message ListConversionWorkspacesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VpcPeeringConnectivity.toObject = function toObject(message, options) { + ListConversionWorkspacesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.conversionWorkspaces = []; + object.unreachable = []; + } if (options.defaults) - object.vpc = ""; - if (message.vpc != null && message.hasOwnProperty("vpc")) - object.vpc = message.vpc; + object.nextPageToken = ""; + if (message.conversionWorkspaces && message.conversionWorkspaces.length) { + object.conversionWorkspaces = []; + for (var j = 0; j < message.conversionWorkspaces.length; ++j) + object.conversionWorkspaces[j] = $root.google.cloud.clouddms.v1.ConversionWorkspace.toObject(message.conversionWorkspaces[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } return object; }; /** - * Converts this VpcPeeringConnectivity to JSON. + * Converts this ListConversionWorkspacesResponse to JSON. * @function toJSON - * @memberof google.cloud.clouddms.v1.VpcPeeringConnectivity + * @memberof google.cloud.clouddms.v1.ListConversionWorkspacesResponse * @instance * @returns {Object.} JSON object */ - VpcPeeringConnectivity.prototype.toJSON = function toJSON() { + ListConversionWorkspacesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for VpcPeeringConnectivity + * Gets the default type url for ListConversionWorkspacesResponse * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.VpcPeeringConnectivity + * @memberof google.cloud.clouddms.v1.ListConversionWorkspacesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - VpcPeeringConnectivity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListConversionWorkspacesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.clouddms.v1.VpcPeeringConnectivity"; + return typeUrlPrefix + "/google.cloud.clouddms.v1.ListConversionWorkspacesResponse"; }; - return VpcPeeringConnectivity; + return ListConversionWorkspacesResponse; })(); - v1.DatabaseType = (function() { + v1.GetConversionWorkspaceRequest = (function() { /** - * Properties of a DatabaseType. + * Properties of a GetConversionWorkspaceRequest. * @memberof google.cloud.clouddms.v1 - * @interface IDatabaseType - * @property {google.cloud.clouddms.v1.DatabaseProvider|null} [provider] DatabaseType provider - * @property {google.cloud.clouddms.v1.DatabaseEngine|null} [engine] DatabaseType engine + * @interface IGetConversionWorkspaceRequest + * @property {string|null} [name] GetConversionWorkspaceRequest name */ /** - * Constructs a new DatabaseType. + * Constructs a new GetConversionWorkspaceRequest. * @memberof google.cloud.clouddms.v1 - * @classdesc Represents a DatabaseType. - * @implements IDatabaseType + * @classdesc Represents a GetConversionWorkspaceRequest. + * @implements IGetConversionWorkspaceRequest * @constructor - * @param {google.cloud.clouddms.v1.IDatabaseType=} [properties] Properties to set + * @param {google.cloud.clouddms.v1.IGetConversionWorkspaceRequest=} [properties] Properties to set */ - function DatabaseType(properties) { + function GetConversionWorkspaceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9727,89 +8991,75 @@ } /** - * DatabaseType provider. - * @member {google.cloud.clouddms.v1.DatabaseProvider} provider - * @memberof google.cloud.clouddms.v1.DatabaseType - * @instance - */ - DatabaseType.prototype.provider = 0; - - /** - * DatabaseType engine. - * @member {google.cloud.clouddms.v1.DatabaseEngine} engine - * @memberof google.cloud.clouddms.v1.DatabaseType + * GetConversionWorkspaceRequest name. + * @member {string} name + * @memberof google.cloud.clouddms.v1.GetConversionWorkspaceRequest * @instance */ - DatabaseType.prototype.engine = 0; + GetConversionWorkspaceRequest.prototype.name = ""; /** - * Creates a new DatabaseType instance using the specified properties. + * Creates a new GetConversionWorkspaceRequest instance using the specified properties. * @function create - * @memberof google.cloud.clouddms.v1.DatabaseType + * @memberof google.cloud.clouddms.v1.GetConversionWorkspaceRequest * @static - * @param {google.cloud.clouddms.v1.IDatabaseType=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.DatabaseType} DatabaseType instance + * @param {google.cloud.clouddms.v1.IGetConversionWorkspaceRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.GetConversionWorkspaceRequest} GetConversionWorkspaceRequest instance */ - DatabaseType.create = function create(properties) { - return new DatabaseType(properties); + GetConversionWorkspaceRequest.create = function create(properties) { + return new GetConversionWorkspaceRequest(properties); }; /** - * Encodes the specified DatabaseType message. Does not implicitly {@link google.cloud.clouddms.v1.DatabaseType.verify|verify} messages. + * Encodes the specified GetConversionWorkspaceRequest message. Does not implicitly {@link google.cloud.clouddms.v1.GetConversionWorkspaceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.clouddms.v1.DatabaseType + * @memberof google.cloud.clouddms.v1.GetConversionWorkspaceRequest * @static - * @param {google.cloud.clouddms.v1.IDatabaseType} message DatabaseType message or plain object to encode + * @param {google.cloud.clouddms.v1.IGetConversionWorkspaceRequest} message GetConversionWorkspaceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DatabaseType.encode = function encode(message, writer) { + GetConversionWorkspaceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.provider != null && Object.hasOwnProperty.call(message, "provider")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.provider); - if (message.engine != null && Object.hasOwnProperty.call(message, "engine")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.engine); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified DatabaseType message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.DatabaseType.verify|verify} messages. + * Encodes the specified GetConversionWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.GetConversionWorkspaceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.DatabaseType + * @memberof google.cloud.clouddms.v1.GetConversionWorkspaceRequest * @static - * @param {google.cloud.clouddms.v1.IDatabaseType} message DatabaseType message or plain object to encode + * @param {google.cloud.clouddms.v1.IGetConversionWorkspaceRequest} message GetConversionWorkspaceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DatabaseType.encodeDelimited = function encodeDelimited(message, writer) { + GetConversionWorkspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DatabaseType message from the specified reader or buffer. + * Decodes a GetConversionWorkspaceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.clouddms.v1.DatabaseType + * @memberof google.cloud.clouddms.v1.GetConversionWorkspaceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.DatabaseType} DatabaseType + * @returns {google.cloud.clouddms.v1.GetConversionWorkspaceRequest} GetConversionWorkspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DatabaseType.decode = function decode(reader, length) { + GetConversionWorkspaceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.DatabaseType(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.GetConversionWorkspaceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.provider = reader.int32(); - break; - } - case 2: { - message.engine = reader.int32(); + message.name = reader.string(); break; } default: @@ -9821,198 +9071,125 @@ }; /** - * Decodes a DatabaseType message from the specified reader or buffer, length delimited. + * Decodes a GetConversionWorkspaceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.DatabaseType + * @memberof google.cloud.clouddms.v1.GetConversionWorkspaceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.DatabaseType} DatabaseType + * @returns {google.cloud.clouddms.v1.GetConversionWorkspaceRequest} GetConversionWorkspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DatabaseType.decodeDelimited = function decodeDelimited(reader) { + GetConversionWorkspaceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DatabaseType message. + * Verifies a GetConversionWorkspaceRequest message. * @function verify - * @memberof google.cloud.clouddms.v1.DatabaseType + * @memberof google.cloud.clouddms.v1.GetConversionWorkspaceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DatabaseType.verify = function verify(message) { + GetConversionWorkspaceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.provider != null && message.hasOwnProperty("provider")) - switch (message.provider) { - default: - return "provider: enum value expected"; - case 0: - case 1: - 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.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a DatabaseType message from a plain object. Also converts values to their respective internal types. + * Creates a GetConversionWorkspaceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.clouddms.v1.DatabaseType + * @memberof google.cloud.clouddms.v1.GetConversionWorkspaceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.DatabaseType} DatabaseType + * @returns {google.cloud.clouddms.v1.GetConversionWorkspaceRequest} GetConversionWorkspaceRequest */ - DatabaseType.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.DatabaseType) + GetConversionWorkspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.GetConversionWorkspaceRequest) return object; - var message = new $root.google.cloud.clouddms.v1.DatabaseType(); - switch (object.provider) { - default: - if (typeof object.provider === "number") { - message.provider = object.provider; - break; - } - break; - case "DATABASE_PROVIDER_UNSPECIFIED": - case 0: - message.provider = 0; - break; - case "CLOUDSQL": - case 1: - message.provider = 1; - break; - case "RDS": - case 2: - message.provider = 2; - break; - } - switch (object.engine) { - default: - if (typeof object.engine === "number") { - message.engine = object.engine; - break; - } - break; - case "DATABASE_ENGINE_UNSPECIFIED": - case 0: - message.engine = 0; - break; - case "MYSQL": - case 1: - message.engine = 1; - break; - case "POSTGRESQL": - case 2: - message.engine = 2; - break; - } + var message = new $root.google.cloud.clouddms.v1.GetConversionWorkspaceRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a DatabaseType message. Also converts values to other types if specified. + * Creates a plain object from a GetConversionWorkspaceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.clouddms.v1.DatabaseType + * @memberof google.cloud.clouddms.v1.GetConversionWorkspaceRequest * @static - * @param {google.cloud.clouddms.v1.DatabaseType} message DatabaseType + * @param {google.cloud.clouddms.v1.GetConversionWorkspaceRequest} message GetConversionWorkspaceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DatabaseType.toObject = function toObject(message, options) { + GetConversionWorkspaceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.provider = options.enums === String ? "DATABASE_PROVIDER_UNSPECIFIED" : 0; - object.engine = options.enums === String ? "DATABASE_ENGINE_UNSPECIFIED" : 0; - } - if (message.provider != null && message.hasOwnProperty("provider")) - object.provider = options.enums === String ? $root.google.cloud.clouddms.v1.DatabaseProvider[message.provider] === undefined ? message.provider : $root.google.cloud.clouddms.v1.DatabaseProvider[message.provider] : message.provider; - if (message.engine != null && message.hasOwnProperty("engine")) - object.engine = options.enums === String ? $root.google.cloud.clouddms.v1.DatabaseEngine[message.engine] === undefined ? message.engine : $root.google.cloud.clouddms.v1.DatabaseEngine[message.engine] : message.engine; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this DatabaseType to JSON. + * Converts this GetConversionWorkspaceRequest to JSON. * @function toJSON - * @memberof google.cloud.clouddms.v1.DatabaseType + * @memberof google.cloud.clouddms.v1.GetConversionWorkspaceRequest * @instance * @returns {Object.} JSON object */ - DatabaseType.prototype.toJSON = function toJSON() { + GetConversionWorkspaceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DatabaseType + * Gets the default type url for GetConversionWorkspaceRequest * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.DatabaseType + * @memberof google.cloud.clouddms.v1.GetConversionWorkspaceRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DatabaseType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetConversionWorkspaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.clouddms.v1.DatabaseType"; + return typeUrlPrefix + "/google.cloud.clouddms.v1.GetConversionWorkspaceRequest"; }; - return DatabaseType; + return GetConversionWorkspaceRequest; })(); - v1.MigrationJob = (function() { + v1.CreateConversionWorkspaceRequest = (function() { /** - * Properties of a MigrationJob. + * Properties of a CreateConversionWorkspaceRequest. * @memberof google.cloud.clouddms.v1 - * @interface IMigrationJob - * @property {string|null} [name] MigrationJob name - * @property {google.protobuf.ITimestamp|null} [createTime] MigrationJob createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] MigrationJob updateTime - * @property {Object.|null} [labels] MigrationJob labels - * @property {string|null} [displayName] MigrationJob displayName - * @property {google.cloud.clouddms.v1.MigrationJob.State|null} [state] MigrationJob state - * @property {google.cloud.clouddms.v1.MigrationJob.Phase|null} [phase] MigrationJob phase - * @property {google.cloud.clouddms.v1.MigrationJob.Type|null} [type] MigrationJob type - * @property {string|null} [dumpPath] MigrationJob dumpPath - * @property {string|null} [source] MigrationJob source - * @property {string|null} [destination] MigrationJob destination - * @property {google.cloud.clouddms.v1.IReverseSshConnectivity|null} [reverseSshConnectivity] MigrationJob reverseSshConnectivity - * @property {google.cloud.clouddms.v1.IVpcPeeringConnectivity|null} [vpcPeeringConnectivity] MigrationJob vpcPeeringConnectivity - * @property {google.cloud.clouddms.v1.IStaticIpConnectivity|null} [staticIpConnectivity] MigrationJob staticIpConnectivity - * @property {google.protobuf.IDuration|null} [duration] MigrationJob duration - * @property {google.rpc.IStatus|null} [error] MigrationJob error - * @property {google.cloud.clouddms.v1.IDatabaseType|null} [sourceDatabase] MigrationJob sourceDatabase - * @property {google.cloud.clouddms.v1.IDatabaseType|null} [destinationDatabase] MigrationJob destinationDatabase - * @property {google.protobuf.ITimestamp|null} [endTime] MigrationJob endTime + * @interface ICreateConversionWorkspaceRequest + * @property {string|null} [parent] CreateConversionWorkspaceRequest parent + * @property {string|null} [conversionWorkspaceId] CreateConversionWorkspaceRequest conversionWorkspaceId + * @property {google.cloud.clouddms.v1.IConversionWorkspace|null} [conversionWorkspace] CreateConversionWorkspaceRequest conversionWorkspace + * @property {string|null} [requestId] CreateConversionWorkspaceRequest requestId */ /** - * Constructs a new MigrationJob. + * Constructs a new CreateConversionWorkspaceRequest. * @memberof google.cloud.clouddms.v1 - * @classdesc Represents a MigrationJob. - * @implements IMigrationJob + * @classdesc Represents a CreateConversionWorkspaceRequest. + * @implements ICreateConversionWorkspaceRequest * @constructor - * @param {google.cloud.clouddms.v1.IMigrationJob=} [properties] Properties to set + * @param {google.cloud.clouddms.v1.ICreateConversionWorkspaceRequest=} [properties] Properties to set */ - function MigrationJob(properties) { - this.labels = {}; + function CreateConversionWorkspaceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10020,361 +9197,380 @@ } /** - * MigrationJob name. - * @member {string} name - * @memberof google.cloud.clouddms.v1.MigrationJob + * CreateConversionWorkspaceRequest parent. + * @member {string} parent + * @memberof google.cloud.clouddms.v1.CreateConversionWorkspaceRequest * @instance */ - MigrationJob.prototype.name = ""; + CreateConversionWorkspaceRequest.prototype.parent = ""; /** - * MigrationJob createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.clouddms.v1.MigrationJob + * CreateConversionWorkspaceRequest conversionWorkspaceId. + * @member {string} conversionWorkspaceId + * @memberof google.cloud.clouddms.v1.CreateConversionWorkspaceRequest * @instance */ - MigrationJob.prototype.createTime = null; + CreateConversionWorkspaceRequest.prototype.conversionWorkspaceId = ""; /** - * MigrationJob updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.clouddms.v1.MigrationJob + * CreateConversionWorkspaceRequest conversionWorkspace. + * @member {google.cloud.clouddms.v1.IConversionWorkspace|null|undefined} conversionWorkspace + * @memberof google.cloud.clouddms.v1.CreateConversionWorkspaceRequest * @instance */ - MigrationJob.prototype.updateTime = null; + CreateConversionWorkspaceRequest.prototype.conversionWorkspace = null; /** - * MigrationJob labels. - * @member {Object.} labels - * @memberof google.cloud.clouddms.v1.MigrationJob + * CreateConversionWorkspaceRequest requestId. + * @member {string} requestId + * @memberof google.cloud.clouddms.v1.CreateConversionWorkspaceRequest * @instance */ - MigrationJob.prototype.labels = $util.emptyObject; + CreateConversionWorkspaceRequest.prototype.requestId = ""; /** - * MigrationJob displayName. - * @member {string} displayName - * @memberof google.cloud.clouddms.v1.MigrationJob - * @instance + * Creates a new CreateConversionWorkspaceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.CreateConversionWorkspaceRequest + * @static + * @param {google.cloud.clouddms.v1.ICreateConversionWorkspaceRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.CreateConversionWorkspaceRequest} CreateConversionWorkspaceRequest instance */ - MigrationJob.prototype.displayName = ""; + CreateConversionWorkspaceRequest.create = function create(properties) { + return new CreateConversionWorkspaceRequest(properties); + }; /** - * MigrationJob state. - * @member {google.cloud.clouddms.v1.MigrationJob.State} state - * @memberof google.cloud.clouddms.v1.MigrationJob - * @instance - */ - MigrationJob.prototype.state = 0; - - /** - * MigrationJob phase. - * @member {google.cloud.clouddms.v1.MigrationJob.Phase} phase - * @memberof google.cloud.clouddms.v1.MigrationJob - * @instance + * Encodes the specified CreateConversionWorkspaceRequest message. Does not implicitly {@link google.cloud.clouddms.v1.CreateConversionWorkspaceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.CreateConversionWorkspaceRequest + * @static + * @param {google.cloud.clouddms.v1.ICreateConversionWorkspaceRequest} message CreateConversionWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - MigrationJob.prototype.phase = 0; + CreateConversionWorkspaceRequest.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.conversionWorkspaceId != null && Object.hasOwnProperty.call(message, "conversionWorkspaceId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.conversionWorkspaceId); + if (message.conversionWorkspace != null && Object.hasOwnProperty.call(message, "conversionWorkspace")) + $root.google.cloud.clouddms.v1.ConversionWorkspace.encode(message.conversionWorkspace, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + return writer; + }; /** - * MigrationJob type. - * @member {google.cloud.clouddms.v1.MigrationJob.Type} type - * @memberof google.cloud.clouddms.v1.MigrationJob - * @instance + * Encodes the specified CreateConversionWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.CreateConversionWorkspaceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.CreateConversionWorkspaceRequest + * @static + * @param {google.cloud.clouddms.v1.ICreateConversionWorkspaceRequest} message CreateConversionWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - MigrationJob.prototype.type = 0; + CreateConversionWorkspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * MigrationJob dumpPath. - * @member {string} dumpPath - * @memberof google.cloud.clouddms.v1.MigrationJob - * @instance + * Decodes a CreateConversionWorkspaceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.CreateConversionWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.CreateConversionWorkspaceRequest} CreateConversionWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrationJob.prototype.dumpPath = ""; + CreateConversionWorkspaceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.CreateConversionWorkspaceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.conversionWorkspaceId = reader.string(); + break; + } + case 3: { + message.conversionWorkspace = $root.google.cloud.clouddms.v1.ConversionWorkspace.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * MigrationJob source. - * @member {string} source - * @memberof google.cloud.clouddms.v1.MigrationJob - * @instance + * Decodes a CreateConversionWorkspaceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.CreateConversionWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.CreateConversionWorkspaceRequest} CreateConversionWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrationJob.prototype.source = ""; + CreateConversionWorkspaceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * MigrationJob destination. - * @member {string} destination - * @memberof google.cloud.clouddms.v1.MigrationJob - * @instance + * Verifies a CreateConversionWorkspaceRequest message. + * @function verify + * @memberof google.cloud.clouddms.v1.CreateConversionWorkspaceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MigrationJob.prototype.destination = ""; + CreateConversionWorkspaceRequest.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.conversionWorkspaceId != null && message.hasOwnProperty("conversionWorkspaceId")) + if (!$util.isString(message.conversionWorkspaceId)) + return "conversionWorkspaceId: string expected"; + if (message.conversionWorkspace != null && message.hasOwnProperty("conversionWorkspace")) { + var error = $root.google.cloud.clouddms.v1.ConversionWorkspace.verify(message.conversionWorkspace); + if (error) + return "conversionWorkspace." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; /** - * MigrationJob reverseSshConnectivity. - * @member {google.cloud.clouddms.v1.IReverseSshConnectivity|null|undefined} reverseSshConnectivity - * @memberof google.cloud.clouddms.v1.MigrationJob - * @instance + * Creates a CreateConversionWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.CreateConversionWorkspaceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.CreateConversionWorkspaceRequest} CreateConversionWorkspaceRequest */ - MigrationJob.prototype.reverseSshConnectivity = null; + CreateConversionWorkspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.CreateConversionWorkspaceRequest) + return object; + var message = new $root.google.cloud.clouddms.v1.CreateConversionWorkspaceRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.conversionWorkspaceId != null) + message.conversionWorkspaceId = String(object.conversionWorkspaceId); + if (object.conversionWorkspace != null) { + if (typeof object.conversionWorkspace !== "object") + throw TypeError(".google.cloud.clouddms.v1.CreateConversionWorkspaceRequest.conversionWorkspace: object expected"); + message.conversionWorkspace = $root.google.cloud.clouddms.v1.ConversionWorkspace.fromObject(object.conversionWorkspace); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; /** - * MigrationJob vpcPeeringConnectivity. - * @member {google.cloud.clouddms.v1.IVpcPeeringConnectivity|null|undefined} vpcPeeringConnectivity - * @memberof google.cloud.clouddms.v1.MigrationJob - * @instance + * Creates a plain object from a CreateConversionWorkspaceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.CreateConversionWorkspaceRequest + * @static + * @param {google.cloud.clouddms.v1.CreateConversionWorkspaceRequest} message CreateConversionWorkspaceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - MigrationJob.prototype.vpcPeeringConnectivity = null; + CreateConversionWorkspaceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.conversionWorkspaceId = ""; + object.conversionWorkspace = null; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.conversionWorkspaceId != null && message.hasOwnProperty("conversionWorkspaceId")) + object.conversionWorkspaceId = message.conversionWorkspaceId; + if (message.conversionWorkspace != null && message.hasOwnProperty("conversionWorkspace")) + object.conversionWorkspace = $root.google.cloud.clouddms.v1.ConversionWorkspace.toObject(message.conversionWorkspace, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; /** - * MigrationJob staticIpConnectivity. - * @member {google.cloud.clouddms.v1.IStaticIpConnectivity|null|undefined} staticIpConnectivity - * @memberof google.cloud.clouddms.v1.MigrationJob + * Converts this CreateConversionWorkspaceRequest to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.CreateConversionWorkspaceRequest * @instance + * @returns {Object.} JSON object */ - MigrationJob.prototype.staticIpConnectivity = null; + CreateConversionWorkspaceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * MigrationJob duration. - * @member {google.protobuf.IDuration|null|undefined} duration - * @memberof google.cloud.clouddms.v1.MigrationJob - * @instance + * Gets the default type url for CreateConversionWorkspaceRequest + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.CreateConversionWorkspaceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - MigrationJob.prototype.duration = null; + CreateConversionWorkspaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.CreateConversionWorkspaceRequest"; + }; + + return CreateConversionWorkspaceRequest; + })(); + + v1.UpdateConversionWorkspaceRequest = (function() { /** - * MigrationJob error. - * @member {google.rpc.IStatus|null|undefined} error - * @memberof google.cloud.clouddms.v1.MigrationJob - * @instance + * Properties of an UpdateConversionWorkspaceRequest. + * @memberof google.cloud.clouddms.v1 + * @interface IUpdateConversionWorkspaceRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateConversionWorkspaceRequest updateMask + * @property {google.cloud.clouddms.v1.IConversionWorkspace|null} [conversionWorkspace] UpdateConversionWorkspaceRequest conversionWorkspace + * @property {string|null} [requestId] UpdateConversionWorkspaceRequest requestId */ - MigrationJob.prototype.error = null; /** - * MigrationJob sourceDatabase. - * @member {google.cloud.clouddms.v1.IDatabaseType|null|undefined} sourceDatabase - * @memberof google.cloud.clouddms.v1.MigrationJob - * @instance + * Constructs a new UpdateConversionWorkspaceRequest. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents an UpdateConversionWorkspaceRequest. + * @implements IUpdateConversionWorkspaceRequest + * @constructor + * @param {google.cloud.clouddms.v1.IUpdateConversionWorkspaceRequest=} [properties] Properties to set */ - MigrationJob.prototype.sourceDatabase = null; + function UpdateConversionWorkspaceRequest(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]]; + } /** - * MigrationJob destinationDatabase. - * @member {google.cloud.clouddms.v1.IDatabaseType|null|undefined} destinationDatabase - * @memberof google.cloud.clouddms.v1.MigrationJob + * UpdateConversionWorkspaceRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest * @instance */ - MigrationJob.prototype.destinationDatabase = null; + UpdateConversionWorkspaceRequest.prototype.updateMask = null; /** - * MigrationJob endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.clouddms.v1.MigrationJob + * UpdateConversionWorkspaceRequest conversionWorkspace. + * @member {google.cloud.clouddms.v1.IConversionWorkspace|null|undefined} conversionWorkspace + * @memberof google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest * @instance */ - MigrationJob.prototype.endTime = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + UpdateConversionWorkspaceRequest.prototype.conversionWorkspace = null; /** - * MigrationJob connectivity. - * @member {"reverseSshConnectivity"|"vpcPeeringConnectivity"|"staticIpConnectivity"|undefined} connectivity - * @memberof google.cloud.clouddms.v1.MigrationJob + * UpdateConversionWorkspaceRequest requestId. + * @member {string} requestId + * @memberof google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest * @instance */ - Object.defineProperty(MigrationJob.prototype, "connectivity", { - get: $util.oneOfGetter($oneOfFields = ["reverseSshConnectivity", "vpcPeeringConnectivity", "staticIpConnectivity"]), - set: $util.oneOfSetter($oneOfFields) - }); + UpdateConversionWorkspaceRequest.prototype.requestId = ""; /** - * Creates a new MigrationJob instance using the specified properties. + * Creates a new UpdateConversionWorkspaceRequest instance using the specified properties. * @function create - * @memberof google.cloud.clouddms.v1.MigrationJob + * @memberof google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest * @static - * @param {google.cloud.clouddms.v1.IMigrationJob=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.MigrationJob} MigrationJob instance + * @param {google.cloud.clouddms.v1.IUpdateConversionWorkspaceRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest} UpdateConversionWorkspaceRequest instance */ - MigrationJob.create = function create(properties) { - return new MigrationJob(properties); + UpdateConversionWorkspaceRequest.create = function create(properties) { + return new UpdateConversionWorkspaceRequest(properties); }; /** - * Encodes the specified MigrationJob message. Does not implicitly {@link google.cloud.clouddms.v1.MigrationJob.verify|verify} messages. + * Encodes the specified UpdateConversionWorkspaceRequest message. Does not implicitly {@link google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.clouddms.v1.MigrationJob + * @memberof google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest * @static - * @param {google.cloud.clouddms.v1.IMigrationJob} message MigrationJob message or plain object to encode + * @param {google.cloud.clouddms.v1.IUpdateConversionWorkspaceRequest} message UpdateConversionWorkspaceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MigrationJob.encode = function encode(message, writer) { + UpdateConversionWorkspaceRequest.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); - if (message.phase != null && Object.hasOwnProperty.call(message, "phase")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.phase); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.type); - if (message.dumpPath != null && Object.hasOwnProperty.call(message, "dumpPath")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.dumpPath); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.source); - if (message.destination != null && Object.hasOwnProperty.call(message, "destination")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.destination); - if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) - $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.sourceDatabase != null && Object.hasOwnProperty.call(message, "sourceDatabase")) - $root.google.cloud.clouddms.v1.DatabaseType.encode(message.sourceDatabase, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.destinationDatabase != null && Object.hasOwnProperty.call(message, "destinationDatabase")) - $root.google.cloud.clouddms.v1.DatabaseType.encode(message.destinationDatabase, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.reverseSshConnectivity != null && Object.hasOwnProperty.call(message, "reverseSshConnectivity")) - $root.google.cloud.clouddms.v1.ReverseSshConnectivity.encode(message.reverseSshConnectivity, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.vpcPeeringConnectivity != null && Object.hasOwnProperty.call(message, "vpcPeeringConnectivity")) - $root.google.cloud.clouddms.v1.VpcPeeringConnectivity.encode(message.vpcPeeringConnectivity, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); - if (message.staticIpConnectivity != null && Object.hasOwnProperty.call(message, "staticIpConnectivity")) - $root.google.cloud.clouddms.v1.StaticIpConnectivity.encode(message.staticIpConnectivity, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.conversionWorkspace != null && Object.hasOwnProperty.call(message, "conversionWorkspace")) + $root.google.cloud.clouddms.v1.ConversionWorkspace.encode(message.conversionWorkspace, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); return writer; }; /** - * Encodes the specified MigrationJob message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.MigrationJob.verify|verify} messages. + * Encodes the specified UpdateConversionWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.MigrationJob + * @memberof google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest * @static - * @param {google.cloud.clouddms.v1.IMigrationJob} message MigrationJob message or plain object to encode + * @param {google.cloud.clouddms.v1.IUpdateConversionWorkspaceRequest} message UpdateConversionWorkspaceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MigrationJob.encodeDelimited = function encodeDelimited(message, writer) { + UpdateConversionWorkspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MigrationJob message from the specified reader or buffer. + * Decodes an UpdateConversionWorkspaceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.clouddms.v1.MigrationJob + * @memberof google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.MigrationJob} MigrationJob + * @returns {google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest} UpdateConversionWorkspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrationJob.decode = function decode(reader, length) { + UpdateConversionWorkspaceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.MigrationJob(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } case 2: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.conversionWorkspace = $root.google.cloud.clouddms.v1.ConversionWorkspace.decode(reader, reader.uint32()); break; } case 3: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - if (message.labels === $util.emptyObject) - message.labels = {}; - 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.labels[key] = value; - break; - } - case 5: { - message.displayName = reader.string(); - break; - } - case 6: { - message.state = reader.int32(); - break; - } - case 7: { - message.phase = reader.int32(); - break; - } - case 8: { - message.type = reader.int32(); - break; - } - case 9: { - message.dumpPath = reader.string(); - break; - } - case 10: { - message.source = reader.string(); - break; - } - case 11: { - message.destination = reader.string(); - break; - } - case 101: { - message.reverseSshConnectivity = $root.google.cloud.clouddms.v1.ReverseSshConnectivity.decode(reader, reader.uint32()); - break; - } - case 102: { - message.vpcPeeringConnectivity = $root.google.cloud.clouddms.v1.VpcPeeringConnectivity.decode(reader, reader.uint32()); - break; - } - case 103: { - message.staticIpConnectivity = $root.google.cloud.clouddms.v1.StaticIpConnectivity.decode(reader, reader.uint32()); - break; - } - case 12: { - message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 13: { - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - case 14: { - message.sourceDatabase = $root.google.cloud.clouddms.v1.DatabaseType.decode(reader, reader.uint32()); - break; - } - case 15: { - message.destinationDatabase = $root.google.cloud.clouddms.v1.DatabaseType.decode(reader, reader.uint32()); - break; - } - case 16: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.requestId = reader.string(); break; } default: @@ -10386,595 +9582,150 @@ }; /** - * Decodes a MigrationJob message from the specified reader or buffer, length delimited. + * Decodes an UpdateConversionWorkspaceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.MigrationJob + * @memberof google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.MigrationJob} MigrationJob + * @returns {google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest} UpdateConversionWorkspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrationJob.decodeDelimited = function decodeDelimited(reader) { + UpdateConversionWorkspaceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MigrationJob message. + * Verifies an UpdateConversionWorkspaceRequest message. * @function verify - * @memberof google.cloud.clouddms.v1.MigrationJob + * @memberof google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MigrationJob.verify = function verify(message) { + UpdateConversionWorkspaceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: 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.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - break; - } - if (message.phase != null && message.hasOwnProperty("phase")) - switch (message.phase) { - default: - return "phase: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.dumpPath != null && message.hasOwnProperty("dumpPath")) - if (!$util.isString(message.dumpPath)) - return "dumpPath: string expected"; - if (message.source != null && message.hasOwnProperty("source")) - if (!$util.isString(message.source)) - return "source: string expected"; - if (message.destination != null && message.hasOwnProperty("destination")) - if (!$util.isString(message.destination)) - return "destination: string expected"; - if (message.reverseSshConnectivity != null && message.hasOwnProperty("reverseSshConnectivity")) { - properties.connectivity = 1; - { - var error = $root.google.cloud.clouddms.v1.ReverseSshConnectivity.verify(message.reverseSshConnectivity); - if (error) - return "reverseSshConnectivity." + error; - } - } - if (message.vpcPeeringConnectivity != null && message.hasOwnProperty("vpcPeeringConnectivity")) { - if (properties.connectivity === 1) - return "connectivity: multiple values"; - properties.connectivity = 1; - { - var error = $root.google.cloud.clouddms.v1.VpcPeeringConnectivity.verify(message.vpcPeeringConnectivity); - if (error) - return "vpcPeeringConnectivity." + error; - } - } - if (message.staticIpConnectivity != null && message.hasOwnProperty("staticIpConnectivity")) { - if (properties.connectivity === 1) - return "connectivity: multiple values"; - properties.connectivity = 1; - { - var error = $root.google.cloud.clouddms.v1.StaticIpConnectivity.verify(message.staticIpConnectivity); - if (error) - return "staticIpConnectivity." + error; - } - } - if (message.duration != null && message.hasOwnProperty("duration")) { - var error = $root.google.protobuf.Duration.verify(message.duration); - if (error) - return "duration." + error; - } - if (message.error != null && message.hasOwnProperty("error")) { - var error = $root.google.rpc.Status.verify(message.error); - if (error) - return "error." + error; - } - if (message.sourceDatabase != null && message.hasOwnProperty("sourceDatabase")) { - var error = $root.google.cloud.clouddms.v1.DatabaseType.verify(message.sourceDatabase); - if (error) - return "sourceDatabase." + error; - } - if (message.destinationDatabase != null && message.hasOwnProperty("destinationDatabase")) { - var error = $root.google.cloud.clouddms.v1.DatabaseType.verify(message.destinationDatabase); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); if (error) - return "destinationDatabase." + error; + return "updateMask." + error; } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (message.conversionWorkspace != null && message.hasOwnProperty("conversionWorkspace")) { + var error = $root.google.cloud.clouddms.v1.ConversionWorkspace.verify(message.conversionWorkspace); if (error) - return "endTime." + error; + return "conversionWorkspace." + error; } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates a MigrationJob message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateConversionWorkspaceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.clouddms.v1.MigrationJob + * @memberof google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.MigrationJob} MigrationJob + * @returns {google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest} UpdateConversionWorkspaceRequest */ - MigrationJob.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.MigrationJob) + UpdateConversionWorkspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest) return object; - var message = new $root.google.cloud.clouddms.v1.MigrationJob(); - if (object.name != null) - message.name = String(object.name); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.clouddms.v1.MigrationJob.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + var message = new $root.google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.clouddms.v1.MigrationJob.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.clouddms.v1.MigrationJob.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.displayName != null) - message.displayName = String(object.displayName); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "MAINTENANCE": - case 1: - message.state = 1; - break; - case "DRAFT": - case 2: - message.state = 2; - break; - case "CREATING": - case 3: - message.state = 3; - break; - case "NOT_STARTED": - case 4: - message.state = 4; - break; - case "RUNNING": - case 5: - message.state = 5; - break; - case "FAILED": - case 6: - message.state = 6; - break; - case "COMPLETED": - case 7: - message.state = 7; - break; - case "DELETING": - case 8: - message.state = 8; - break; - case "STOPPING": - case 9: - message.state = 9; - break; - case "STOPPED": - case 10: - message.state = 10; - break; - case "DELETED": - case 11: - message.state = 11; - break; - case "UPDATING": - case 12: - message.state = 12; - break; - case "STARTING": - case 13: - message.state = 13; - break; - case "RESTARTING": - case 14: - message.state = 14; - break; - case "RESUMING": - case 15: - message.state = 15; - break; - } - switch (object.phase) { - default: - if (typeof object.phase === "number") { - message.phase = object.phase; - break; - } - break; - case "PHASE_UNSPECIFIED": - case 0: - message.phase = 0; - break; - case "FULL_DUMP": - case 1: - message.phase = 1; - break; - case "CDC": - case 2: - message.phase = 2; - break; - case "PROMOTE_IN_PROGRESS": - case 3: - message.phase = 3; - break; - case "WAITING_FOR_SOURCE_WRITES_TO_STOP": - case 4: - message.phase = 4; - break; - case "PREPARING_THE_DUMP": - case 5: - message.phase = 5; - break; - } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "ONE_TIME": - case 1: - message.type = 1; - break; - case "CONTINUOUS": - case 2: - message.type = 2; - break; - } - if (object.dumpPath != null) - message.dumpPath = String(object.dumpPath); - if (object.source != null) - message.source = String(object.source); - if (object.destination != null) - message.destination = String(object.destination); - if (object.reverseSshConnectivity != null) { - if (typeof object.reverseSshConnectivity !== "object") - throw TypeError(".google.cloud.clouddms.v1.MigrationJob.reverseSshConnectivity: object expected"); - message.reverseSshConnectivity = $root.google.cloud.clouddms.v1.ReverseSshConnectivity.fromObject(object.reverseSshConnectivity); - } - if (object.vpcPeeringConnectivity != null) { - if (typeof object.vpcPeeringConnectivity !== "object") - throw TypeError(".google.cloud.clouddms.v1.MigrationJob.vpcPeeringConnectivity: object expected"); - message.vpcPeeringConnectivity = $root.google.cloud.clouddms.v1.VpcPeeringConnectivity.fromObject(object.vpcPeeringConnectivity); - } - if (object.staticIpConnectivity != null) { - if (typeof object.staticIpConnectivity !== "object") - throw TypeError(".google.cloud.clouddms.v1.MigrationJob.staticIpConnectivity: object expected"); - message.staticIpConnectivity = $root.google.cloud.clouddms.v1.StaticIpConnectivity.fromObject(object.staticIpConnectivity); - } - if (object.duration != null) { - if (typeof object.duration !== "object") - throw TypeError(".google.cloud.clouddms.v1.MigrationJob.duration: object expected"); - message.duration = $root.google.protobuf.Duration.fromObject(object.duration); - } - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".google.cloud.clouddms.v1.MigrationJob.error: object expected"); - message.error = $root.google.rpc.Status.fromObject(object.error); - } - if (object.sourceDatabase != null) { - if (typeof object.sourceDatabase !== "object") - throw TypeError(".google.cloud.clouddms.v1.MigrationJob.sourceDatabase: object expected"); - message.sourceDatabase = $root.google.cloud.clouddms.v1.DatabaseType.fromObject(object.sourceDatabase); - } - if (object.destinationDatabase != null) { - if (typeof object.destinationDatabase !== "object") - throw TypeError(".google.cloud.clouddms.v1.MigrationJob.destinationDatabase: object expected"); - message.destinationDatabase = $root.google.cloud.clouddms.v1.DatabaseType.fromObject(object.destinationDatabase); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.clouddms.v1.MigrationJob.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + if (object.conversionWorkspace != null) { + if (typeof object.conversionWorkspace !== "object") + throw TypeError(".google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest.conversionWorkspace: object expected"); + message.conversionWorkspace = $root.google.cloud.clouddms.v1.ConversionWorkspace.fromObject(object.conversionWorkspace); } + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a MigrationJob message. Also converts values to other types if specified. + * Creates a plain object from an UpdateConversionWorkspaceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.clouddms.v1.MigrationJob + * @memberof google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest * @static - * @param {google.cloud.clouddms.v1.MigrationJob} message MigrationJob + * @param {google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest} message UpdateConversionWorkspaceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MigrationJob.toObject = function toObject(message, options) { + UpdateConversionWorkspaceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.labels = {}; if (options.defaults) { - object.name = ""; - object.createTime = null; - object.updateTime = null; - object.displayName = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.phase = options.enums === String ? "PHASE_UNSPECIFIED" : 0; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.dumpPath = ""; - object.source = ""; - object.destination = ""; - object.duration = null; - object.error = null; - object.sourceDatabase = null; - object.destinationDatabase = null; - object.endTime = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - 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); - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.clouddms.v1.MigrationJob.State[message.state] === undefined ? message.state : $root.google.cloud.clouddms.v1.MigrationJob.State[message.state] : message.state; - if (message.phase != null && message.hasOwnProperty("phase")) - object.phase = options.enums === String ? $root.google.cloud.clouddms.v1.MigrationJob.Phase[message.phase] === undefined ? message.phase : $root.google.cloud.clouddms.v1.MigrationJob.Phase[message.phase] : message.phase; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.clouddms.v1.MigrationJob.Type[message.type] === undefined ? message.type : $root.google.cloud.clouddms.v1.MigrationJob.Type[message.type] : message.type; - if (message.dumpPath != null && message.hasOwnProperty("dumpPath")) - object.dumpPath = message.dumpPath; - if (message.source != null && message.hasOwnProperty("source")) - object.source = message.source; - if (message.destination != null && message.hasOwnProperty("destination")) - object.destination = message.destination; - if (message.duration != null && message.hasOwnProperty("duration")) - object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); - if (message.error != null && message.hasOwnProperty("error")) - object.error = $root.google.rpc.Status.toObject(message.error, options); - if (message.sourceDatabase != null && message.hasOwnProperty("sourceDatabase")) - object.sourceDatabase = $root.google.cloud.clouddms.v1.DatabaseType.toObject(message.sourceDatabase, options); - if (message.destinationDatabase != null && message.hasOwnProperty("destinationDatabase")) - object.destinationDatabase = $root.google.cloud.clouddms.v1.DatabaseType.toObject(message.destinationDatabase, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.reverseSshConnectivity != null && message.hasOwnProperty("reverseSshConnectivity")) { - object.reverseSshConnectivity = $root.google.cloud.clouddms.v1.ReverseSshConnectivity.toObject(message.reverseSshConnectivity, options); - if (options.oneofs) - object.connectivity = "reverseSshConnectivity"; - } - if (message.vpcPeeringConnectivity != null && message.hasOwnProperty("vpcPeeringConnectivity")) { - object.vpcPeeringConnectivity = $root.google.cloud.clouddms.v1.VpcPeeringConnectivity.toObject(message.vpcPeeringConnectivity, options); - if (options.oneofs) - object.connectivity = "vpcPeeringConnectivity"; - } - if (message.staticIpConnectivity != null && message.hasOwnProperty("staticIpConnectivity")) { - object.staticIpConnectivity = $root.google.cloud.clouddms.v1.StaticIpConnectivity.toObject(message.staticIpConnectivity, options); - if (options.oneofs) - object.connectivity = "staticIpConnectivity"; + object.updateMask = null; + object.conversionWorkspace = null; + object.requestId = ""; } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.conversionWorkspace != null && message.hasOwnProperty("conversionWorkspace")) + object.conversionWorkspace = $root.google.cloud.clouddms.v1.ConversionWorkspace.toObject(message.conversionWorkspace, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; return object; }; /** - * Converts this MigrationJob to JSON. + * Converts this UpdateConversionWorkspaceRequest to JSON. * @function toJSON - * @memberof google.cloud.clouddms.v1.MigrationJob + * @memberof google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest * @instance * @returns {Object.} JSON object */ - MigrationJob.prototype.toJSON = function toJSON() { + UpdateConversionWorkspaceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MigrationJob + * Gets the default type url for UpdateConversionWorkspaceRequest * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.MigrationJob + * @memberof google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MigrationJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateConversionWorkspaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.clouddms.v1.MigrationJob"; + return typeUrlPrefix + "/google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest"; }; - /** - * State enum. - * @name google.cloud.clouddms.v1.MigrationJob.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} MAINTENANCE=1 MAINTENANCE value - * @property {number} DRAFT=2 DRAFT value - * @property {number} CREATING=3 CREATING value - * @property {number} NOT_STARTED=4 NOT_STARTED value - * @property {number} RUNNING=5 RUNNING value - * @property {number} FAILED=6 FAILED value - * @property {number} COMPLETED=7 COMPLETED value - * @property {number} DELETING=8 DELETING value - * @property {number} STOPPING=9 STOPPING value - * @property {number} STOPPED=10 STOPPED value - * @property {number} DELETED=11 DELETED value - * @property {number} UPDATING=12 UPDATING value - * @property {number} STARTING=13 STARTING value - * @property {number} RESTARTING=14 RESTARTING value - * @property {number} RESUMING=15 RESUMING value - */ - MigrationJob.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "MAINTENANCE"] = 1; - values[valuesById[2] = "DRAFT"] = 2; - values[valuesById[3] = "CREATING"] = 3; - values[valuesById[4] = "NOT_STARTED"] = 4; - values[valuesById[5] = "RUNNING"] = 5; - values[valuesById[6] = "FAILED"] = 6; - values[valuesById[7] = "COMPLETED"] = 7; - values[valuesById[8] = "DELETING"] = 8; - values[valuesById[9] = "STOPPING"] = 9; - values[valuesById[10] = "STOPPED"] = 10; - values[valuesById[11] = "DELETED"] = 11; - values[valuesById[12] = "UPDATING"] = 12; - values[valuesById[13] = "STARTING"] = 13; - values[valuesById[14] = "RESTARTING"] = 14; - values[valuesById[15] = "RESUMING"] = 15; - return values; - })(); - - /** - * Phase enum. - * @name google.cloud.clouddms.v1.MigrationJob.Phase - * @enum {number} - * @property {number} PHASE_UNSPECIFIED=0 PHASE_UNSPECIFIED value - * @property {number} FULL_DUMP=1 FULL_DUMP value - * @property {number} CDC=2 CDC value - * @property {number} PROMOTE_IN_PROGRESS=3 PROMOTE_IN_PROGRESS value - * @property {number} WAITING_FOR_SOURCE_WRITES_TO_STOP=4 WAITING_FOR_SOURCE_WRITES_TO_STOP value - * @property {number} PREPARING_THE_DUMP=5 PREPARING_THE_DUMP value - */ - MigrationJob.Phase = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PHASE_UNSPECIFIED"] = 0; - values[valuesById[1] = "FULL_DUMP"] = 1; - values[valuesById[2] = "CDC"] = 2; - values[valuesById[3] = "PROMOTE_IN_PROGRESS"] = 3; - values[valuesById[4] = "WAITING_FOR_SOURCE_WRITES_TO_STOP"] = 4; - values[valuesById[5] = "PREPARING_THE_DUMP"] = 5; - return values; - })(); - - /** - * Type enum. - * @name google.cloud.clouddms.v1.MigrationJob.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} ONE_TIME=1 ONE_TIME value - * @property {number} CONTINUOUS=2 CONTINUOUS value - */ - MigrationJob.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ONE_TIME"] = 1; - values[valuesById[2] = "CONTINUOUS"] = 2; - return values; - })(); - - return MigrationJob; + return UpdateConversionWorkspaceRequest; })(); - v1.ConnectionProfile = (function() { + v1.DeleteConversionWorkspaceRequest = (function() { /** - * Properties of a ConnectionProfile. + * Properties of a DeleteConversionWorkspaceRequest. * @memberof google.cloud.clouddms.v1 - * @interface IConnectionProfile - * @property {string|null} [name] ConnectionProfile name - * @property {google.protobuf.ITimestamp|null} [createTime] ConnectionProfile createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] ConnectionProfile updateTime - * @property {Object.|null} [labels] ConnectionProfile labels - * @property {google.cloud.clouddms.v1.ConnectionProfile.State|null} [state] ConnectionProfile state - * @property {string|null} [displayName] ConnectionProfile displayName - * @property {google.cloud.clouddms.v1.IMySqlConnectionProfile|null} [mysql] ConnectionProfile mysql - * @property {google.cloud.clouddms.v1.IPostgreSqlConnectionProfile|null} [postgresql] ConnectionProfile postgresql - * @property {google.cloud.clouddms.v1.ICloudSqlConnectionProfile|null} [cloudsql] ConnectionProfile cloudsql - * @property {google.rpc.IStatus|null} [error] ConnectionProfile error - * @property {google.cloud.clouddms.v1.DatabaseProvider|null} [provider] ConnectionProfile provider + * @interface IDeleteConversionWorkspaceRequest + * @property {string|null} [name] DeleteConversionWorkspaceRequest name + * @property {string|null} [requestId] DeleteConversionWorkspaceRequest requestId */ /** - * Constructs a new ConnectionProfile. + * Constructs a new DeleteConversionWorkspaceRequest. * @memberof google.cloud.clouddms.v1 - * @classdesc Represents a ConnectionProfile. - * @implements IConnectionProfile + * @classdesc Represents a DeleteConversionWorkspaceRequest. + * @implements IDeleteConversionWorkspaceRequest * @constructor - * @param {google.cloud.clouddms.v1.IConnectionProfile=} [properties] Properties to set + * @param {google.cloud.clouddms.v1.IDeleteConversionWorkspaceRequest=} [properties] Properties to set */ - function ConnectionProfile(properties) { - this.labels = {}; + function DeleteConversionWorkspaceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10982,185 +9733,80 @@ } /** - * ConnectionProfile name. + * DeleteConversionWorkspaceRequest name. * @member {string} name - * @memberof google.cloud.clouddms.v1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.name = ""; - - /** - * ConnectionProfile createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.clouddms.v1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.createTime = null; - - /** - * ConnectionProfile updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.clouddms.v1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.updateTime = null; - - /** - * ConnectionProfile labels. - * @member {Object.} labels - * @memberof google.cloud.clouddms.v1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.labels = $util.emptyObject; - - /** - * ConnectionProfile state. - * @member {google.cloud.clouddms.v1.ConnectionProfile.State} state - * @memberof google.cloud.clouddms.v1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.state = 0; - - /** - * ConnectionProfile displayName. - * @member {string} displayName - * @memberof google.cloud.clouddms.v1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.displayName = ""; - - /** - * ConnectionProfile mysql. - * @member {google.cloud.clouddms.v1.IMySqlConnectionProfile|null|undefined} mysql - * @memberof google.cloud.clouddms.v1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.mysql = null; - - /** - * ConnectionProfile postgresql. - * @member {google.cloud.clouddms.v1.IPostgreSqlConnectionProfile|null|undefined} postgresql - * @memberof google.cloud.clouddms.v1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.postgresql = null; - - /** - * ConnectionProfile cloudsql. - * @member {google.cloud.clouddms.v1.ICloudSqlConnectionProfile|null|undefined} cloudsql - * @memberof google.cloud.clouddms.v1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.cloudsql = null; - - /** - * ConnectionProfile error. - * @member {google.rpc.IStatus|null|undefined} error - * @memberof google.cloud.clouddms.v1.ConnectionProfile - * @instance - */ - ConnectionProfile.prototype.error = null; - - /** - * ConnectionProfile provider. - * @member {google.cloud.clouddms.v1.DatabaseProvider} provider - * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @memberof google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest * @instance */ - ConnectionProfile.prototype.provider = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + DeleteConversionWorkspaceRequest.prototype.name = ""; /** - * ConnectionProfile connectionProfile. - * @member {"mysql"|"postgresql"|"cloudsql"|undefined} connectionProfile - * @memberof google.cloud.clouddms.v1.ConnectionProfile + * DeleteConversionWorkspaceRequest requestId. + * @member {string} requestId + * @memberof google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest * @instance */ - Object.defineProperty(ConnectionProfile.prototype, "connectionProfile", { - get: $util.oneOfGetter($oneOfFields = ["mysql", "postgresql", "cloudsql"]), - set: $util.oneOfSetter($oneOfFields) - }); + DeleteConversionWorkspaceRequest.prototype.requestId = ""; /** - * Creates a new ConnectionProfile instance using the specified properties. + * Creates a new DeleteConversionWorkspaceRequest instance using the specified properties. * @function create - * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @memberof google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest * @static - * @param {google.cloud.clouddms.v1.IConnectionProfile=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.ConnectionProfile} ConnectionProfile instance + * @param {google.cloud.clouddms.v1.IDeleteConversionWorkspaceRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest} DeleteConversionWorkspaceRequest instance */ - ConnectionProfile.create = function create(properties) { - return new ConnectionProfile(properties); + DeleteConversionWorkspaceRequest.create = function create(properties) { + return new DeleteConversionWorkspaceRequest(properties); }; /** - * Encodes the specified ConnectionProfile message. Does not implicitly {@link google.cloud.clouddms.v1.ConnectionProfile.verify|verify} messages. + * Encodes the specified DeleteConversionWorkspaceRequest message. Does not implicitly {@link google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @memberof google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest * @static - * @param {google.cloud.clouddms.v1.IConnectionProfile} message ConnectionProfile message or plain object to encode + * @param {google.cloud.clouddms.v1.IDeleteConversionWorkspaceRequest} message DeleteConversionWorkspaceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConnectionProfile.encode = function encode(message, writer) { + DeleteConversionWorkspaceRequest.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.provider != null && Object.hasOwnProperty.call(message, "provider")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.provider); - if (message.mysql != null && Object.hasOwnProperty.call(message, "mysql")) - $root.google.cloud.clouddms.v1.MySqlConnectionProfile.encode(message.mysql, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - if (message.postgresql != null && Object.hasOwnProperty.call(message, "postgresql")) - $root.google.cloud.clouddms.v1.PostgreSqlConnectionProfile.encode(message.postgresql, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.cloudsql != null && Object.hasOwnProperty.call(message, "cloudsql")) - $root.google.cloud.clouddms.v1.CloudSqlConnectionProfile.encode(message.cloudsql, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); return writer; }; /** - * Encodes the specified ConnectionProfile message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ConnectionProfile.verify|verify} messages. + * Encodes the specified DeleteConversionWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @memberof google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest * @static - * @param {google.cloud.clouddms.v1.IConnectionProfile} message ConnectionProfile message or plain object to encode + * @param {google.cloud.clouddms.v1.IDeleteConversionWorkspaceRequest} message DeleteConversionWorkspaceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConnectionProfile.encodeDelimited = function encodeDelimited(message, writer) { + DeleteConversionWorkspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ConnectionProfile message from the specified reader or buffer. + * Decodes a DeleteConversionWorkspaceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @memberof google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.ConnectionProfile} ConnectionProfile + * @returns {google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest} DeleteConversionWorkspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConnectionProfile.decode = function decode(reader, length) { + DeleteConversionWorkspaceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.ConnectionProfile(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -11169,62 +9815,7 @@ break; } case 2: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - if (message.labels === $util.emptyObject) - message.labels = {}; - 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.labels[key] = value; - break; - } - case 5: { - message.state = reader.int32(); - break; - } - case 6: { - message.displayName = reader.string(); - break; - } - case 100: { - message.mysql = $root.google.cloud.clouddms.v1.MySqlConnectionProfile.decode(reader, reader.uint32()); - break; - } - case 101: { - message.postgresql = $root.google.cloud.clouddms.v1.PostgreSqlConnectionProfile.decode(reader, reader.uint32()); - break; - } - case 102: { - message.cloudsql = $root.google.cloud.clouddms.v1.CloudSqlConnectionProfile.decode(reader, reader.uint32()); - break; - } - case 7: { - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - case 8: { - message.provider = reader.int32(); + message.requestId = reader.string(); break; } default: @@ -11236,369 +9827,132 @@ }; /** - * Decodes a ConnectionProfile message from the specified reader or buffer, length delimited. + * Decodes a DeleteConversionWorkspaceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @memberof google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.ConnectionProfile} ConnectionProfile + * @returns {google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest} DeleteConversionWorkspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConnectionProfile.decodeDelimited = function decodeDelimited(reader) { + DeleteConversionWorkspaceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ConnectionProfile message. + * Verifies a DeleteConversionWorkspaceRequest message. * @function verify - * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @memberof google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ConnectionProfile.verify = function verify(message) { + DeleteConversionWorkspaceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: 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.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.mysql != null && message.hasOwnProperty("mysql")) { - properties.connectionProfile = 1; - { - var error = $root.google.cloud.clouddms.v1.MySqlConnectionProfile.verify(message.mysql); - if (error) - return "mysql." + error; - } - } - if (message.postgresql != null && message.hasOwnProperty("postgresql")) { - if (properties.connectionProfile === 1) - return "connectionProfile: multiple values"; - properties.connectionProfile = 1; - { - var error = $root.google.cloud.clouddms.v1.PostgreSqlConnectionProfile.verify(message.postgresql); - if (error) - return "postgresql." + error; - } - } - if (message.cloudsql != null && message.hasOwnProperty("cloudsql")) { - if (properties.connectionProfile === 1) - return "connectionProfile: multiple values"; - properties.connectionProfile = 1; - { - var error = $root.google.cloud.clouddms.v1.CloudSqlConnectionProfile.verify(message.cloudsql); - if (error) - return "cloudsql." + error; - } - } - if (message.error != null && message.hasOwnProperty("error")) { - var error = $root.google.rpc.Status.verify(message.error); - if (error) - return "error." + error; - } - if (message.provider != null && message.hasOwnProperty("provider")) - switch (message.provider) { - default: - return "provider: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates a ConnectionProfile message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteConversionWorkspaceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @memberof google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.ConnectionProfile} ConnectionProfile + * @returns {google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest} DeleteConversionWorkspaceRequest */ - ConnectionProfile.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.ConnectionProfile) + DeleteConversionWorkspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest) return object; - var message = new $root.google.cloud.clouddms.v1.ConnectionProfile(); + var message = new $root.google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest(); if (object.name != null) message.name = String(object.name); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.clouddms.v1.ConnectionProfile.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.clouddms.v1.ConnectionProfile.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.clouddms.v1.ConnectionProfile.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "DRAFT": - case 1: - message.state = 1; - break; - case "CREATING": - case 2: - message.state = 2; - break; - case "READY": - case 3: - message.state = 3; - break; - case "UPDATING": - case 4: - message.state = 4; - break; - case "DELETING": - case 5: - message.state = 5; - break; - case "DELETED": - case 6: - message.state = 6; - break; - case "FAILED": - case 7: - message.state = 7; - break; - } - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.mysql != null) { - if (typeof object.mysql !== "object") - throw TypeError(".google.cloud.clouddms.v1.ConnectionProfile.mysql: object expected"); - message.mysql = $root.google.cloud.clouddms.v1.MySqlConnectionProfile.fromObject(object.mysql); - } - if (object.postgresql != null) { - if (typeof object.postgresql !== "object") - throw TypeError(".google.cloud.clouddms.v1.ConnectionProfile.postgresql: object expected"); - message.postgresql = $root.google.cloud.clouddms.v1.PostgreSqlConnectionProfile.fromObject(object.postgresql); - } - if (object.cloudsql != null) { - if (typeof object.cloudsql !== "object") - throw TypeError(".google.cloud.clouddms.v1.ConnectionProfile.cloudsql: object expected"); - message.cloudsql = $root.google.cloud.clouddms.v1.CloudSqlConnectionProfile.fromObject(object.cloudsql); - } - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".google.cloud.clouddms.v1.ConnectionProfile.error: object expected"); - message.error = $root.google.rpc.Status.fromObject(object.error); - } - switch (object.provider) { - default: - if (typeof object.provider === "number") { - message.provider = object.provider; - break; - } - break; - case "DATABASE_PROVIDER_UNSPECIFIED": - case 0: - message.provider = 0; - break; - case "CLOUDSQL": - case 1: - message.provider = 1; - break; - case "RDS": - case 2: - message.provider = 2; - break; - } + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a ConnectionProfile message. Also converts values to other types if specified. + * Creates a plain object from a DeleteConversionWorkspaceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @memberof google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest * @static - * @param {google.cloud.clouddms.v1.ConnectionProfile} message ConnectionProfile + * @param {google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest} message DeleteConversionWorkspaceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ConnectionProfile.toObject = function toObject(message, options) { + DeleteConversionWorkspaceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.labels = {}; if (options.defaults) { object.name = ""; - object.createTime = null; - object.updateTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.displayName = ""; - object.error = null; - object.provider = options.enums === String ? "DATABASE_PROVIDER_UNSPECIFIED" : 0; + object.requestId = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - 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); - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.clouddms.v1.ConnectionProfile.State[message.state] === undefined ? message.state : $root.google.cloud.clouddms.v1.ConnectionProfile.State[message.state] : message.state; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.error != null && message.hasOwnProperty("error")) - object.error = $root.google.rpc.Status.toObject(message.error, options); - if (message.provider != null && message.hasOwnProperty("provider")) - object.provider = options.enums === String ? $root.google.cloud.clouddms.v1.DatabaseProvider[message.provider] === undefined ? message.provider : $root.google.cloud.clouddms.v1.DatabaseProvider[message.provider] : message.provider; - if (message.mysql != null && message.hasOwnProperty("mysql")) { - object.mysql = $root.google.cloud.clouddms.v1.MySqlConnectionProfile.toObject(message.mysql, options); - if (options.oneofs) - object.connectionProfile = "mysql"; - } - if (message.postgresql != null && message.hasOwnProperty("postgresql")) { - object.postgresql = $root.google.cloud.clouddms.v1.PostgreSqlConnectionProfile.toObject(message.postgresql, options); - if (options.oneofs) - object.connectionProfile = "postgresql"; - } - if (message.cloudsql != null && message.hasOwnProperty("cloudsql")) { - object.cloudsql = $root.google.cloud.clouddms.v1.CloudSqlConnectionProfile.toObject(message.cloudsql, options); - if (options.oneofs) - object.connectionProfile = "cloudsql"; - } + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; return object; }; /** - * Converts this ConnectionProfile to JSON. + * Converts this DeleteConversionWorkspaceRequest to JSON. * @function toJSON - * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @memberof google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest * @instance * @returns {Object.} JSON object */ - ConnectionProfile.prototype.toJSON = function toJSON() { + DeleteConversionWorkspaceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ConnectionProfile + * Gets the default type url for DeleteConversionWorkspaceRequest * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @memberof google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ConnectionProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteConversionWorkspaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.clouddms.v1.ConnectionProfile"; + return typeUrlPrefix + "/google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest"; }; - /** - * State enum. - * @name google.cloud.clouddms.v1.ConnectionProfile.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} DRAFT=1 DRAFT value - * @property {number} CREATING=2 CREATING value - * @property {number} READY=3 READY value - * @property {number} UPDATING=4 UPDATING value - * @property {number} DELETING=5 DELETING value - * @property {number} DELETED=6 DELETED value - * @property {number} FAILED=7 FAILED value - */ - ConnectionProfile.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DRAFT"] = 1; - values[valuesById[2] = "CREATING"] = 2; - values[valuesById[3] = "READY"] = 3; - values[valuesById[4] = "UPDATING"] = 4; - values[valuesById[5] = "DELETING"] = 5; - values[valuesById[6] = "DELETED"] = 6; - values[valuesById[7] = "FAILED"] = 7; - return values; - })(); - - return ConnectionProfile; + return DeleteConversionWorkspaceRequest; })(); - v1.MigrationJobVerificationError = (function() { + v1.CommitConversionWorkspaceRequest = (function() { /** - * Properties of a MigrationJobVerificationError. + * Properties of a CommitConversionWorkspaceRequest. * @memberof google.cloud.clouddms.v1 - * @interface IMigrationJobVerificationError - * @property {google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode|null} [errorCode] MigrationJobVerificationError errorCode - * @property {string|null} [errorMessage] MigrationJobVerificationError errorMessage - * @property {string|null} [errorDetailMessage] MigrationJobVerificationError errorDetailMessage + * @interface ICommitConversionWorkspaceRequest + * @property {string|null} [name] CommitConversionWorkspaceRequest name + * @property {string|null} [commitName] CommitConversionWorkspaceRequest commitName */ /** - * Constructs a new MigrationJobVerificationError. + * Constructs a new CommitConversionWorkspaceRequest. * @memberof google.cloud.clouddms.v1 - * @classdesc Represents a MigrationJobVerificationError. - * @implements IMigrationJobVerificationError + * @classdesc Represents a CommitConversionWorkspaceRequest. + * @implements ICommitConversionWorkspaceRequest * @constructor - * @param {google.cloud.clouddms.v1.IMigrationJobVerificationError=} [properties] Properties to set + * @param {google.cloud.clouddms.v1.ICommitConversionWorkspaceRequest=} [properties] Properties to set */ - function MigrationJobVerificationError(properties) { + function CommitConversionWorkspaceRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11606,103 +9960,89 @@ } /** - * MigrationJobVerificationError errorCode. - * @member {google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode} errorCode - * @memberof google.cloud.clouddms.v1.MigrationJobVerificationError - * @instance - */ - MigrationJobVerificationError.prototype.errorCode = 0; - - /** - * MigrationJobVerificationError errorMessage. - * @member {string} errorMessage - * @memberof google.cloud.clouddms.v1.MigrationJobVerificationError + * CommitConversionWorkspaceRequest name. + * @member {string} name + * @memberof google.cloud.clouddms.v1.CommitConversionWorkspaceRequest * @instance */ - MigrationJobVerificationError.prototype.errorMessage = ""; + CommitConversionWorkspaceRequest.prototype.name = ""; /** - * MigrationJobVerificationError errorDetailMessage. - * @member {string} errorDetailMessage - * @memberof google.cloud.clouddms.v1.MigrationJobVerificationError + * CommitConversionWorkspaceRequest commitName. + * @member {string} commitName + * @memberof google.cloud.clouddms.v1.CommitConversionWorkspaceRequest * @instance */ - MigrationJobVerificationError.prototype.errorDetailMessage = ""; + CommitConversionWorkspaceRequest.prototype.commitName = ""; /** - * Creates a new MigrationJobVerificationError instance using the specified properties. + * Creates a new CommitConversionWorkspaceRequest instance using the specified properties. * @function create - * @memberof google.cloud.clouddms.v1.MigrationJobVerificationError + * @memberof google.cloud.clouddms.v1.CommitConversionWorkspaceRequest * @static - * @param {google.cloud.clouddms.v1.IMigrationJobVerificationError=} [properties] Properties to set - * @returns {google.cloud.clouddms.v1.MigrationJobVerificationError} MigrationJobVerificationError instance + * @param {google.cloud.clouddms.v1.ICommitConversionWorkspaceRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.CommitConversionWorkspaceRequest} CommitConversionWorkspaceRequest instance */ - MigrationJobVerificationError.create = function create(properties) { - return new MigrationJobVerificationError(properties); + CommitConversionWorkspaceRequest.create = function create(properties) { + return new CommitConversionWorkspaceRequest(properties); }; /** - * Encodes the specified MigrationJobVerificationError message. Does not implicitly {@link google.cloud.clouddms.v1.MigrationJobVerificationError.verify|verify} messages. + * Encodes the specified CommitConversionWorkspaceRequest message. Does not implicitly {@link google.cloud.clouddms.v1.CommitConversionWorkspaceRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.clouddms.v1.MigrationJobVerificationError + * @memberof google.cloud.clouddms.v1.CommitConversionWorkspaceRequest * @static - * @param {google.cloud.clouddms.v1.IMigrationJobVerificationError} message MigrationJobVerificationError message or plain object to encode + * @param {google.cloud.clouddms.v1.ICommitConversionWorkspaceRequest} message CommitConversionWorkspaceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MigrationJobVerificationError.encode = function encode(message, writer) { + CommitConversionWorkspaceRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.errorCode != null && Object.hasOwnProperty.call(message, "errorCode")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.errorCode); - if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.errorMessage); - if (message.errorDetailMessage != null && Object.hasOwnProperty.call(message, "errorDetailMessage")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.errorDetailMessage); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.commitName != null && Object.hasOwnProperty.call(message, "commitName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.commitName); return writer; }; /** - * Encodes the specified MigrationJobVerificationError message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.MigrationJobVerificationError.verify|verify} messages. + * Encodes the specified CommitConversionWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.CommitConversionWorkspaceRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.clouddms.v1.MigrationJobVerificationError + * @memberof google.cloud.clouddms.v1.CommitConversionWorkspaceRequest * @static - * @param {google.cloud.clouddms.v1.IMigrationJobVerificationError} message MigrationJobVerificationError message or plain object to encode + * @param {google.cloud.clouddms.v1.ICommitConversionWorkspaceRequest} message CommitConversionWorkspaceRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MigrationJobVerificationError.encodeDelimited = function encodeDelimited(message, writer) { + CommitConversionWorkspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MigrationJobVerificationError message from the specified reader or buffer. + * Decodes a CommitConversionWorkspaceRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.clouddms.v1.MigrationJobVerificationError + * @memberof google.cloud.clouddms.v1.CommitConversionWorkspaceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.clouddms.v1.MigrationJobVerificationError} MigrationJobVerificationError + * @returns {google.cloud.clouddms.v1.CommitConversionWorkspaceRequest} CommitConversionWorkspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrationJobVerificationError.decode = function decode(reader, length) { + CommitConversionWorkspaceRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.MigrationJobVerificationError(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.CommitConversionWorkspaceRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.errorCode = reader.int32(); + message.name = reader.string(); break; } case 2: { - message.errorMessage = reader.string(); - break; - } - case 3: { - message.errorDetailMessage = reader.string(); + message.commitName = reader.string(); break; } default: @@ -11714,818 +10054,22609 @@ }; /** - * Decodes a MigrationJobVerificationError message from the specified reader or buffer, length delimited. + * Decodes a CommitConversionWorkspaceRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.clouddms.v1.MigrationJobVerificationError + * @memberof google.cloud.clouddms.v1.CommitConversionWorkspaceRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.clouddms.v1.MigrationJobVerificationError} MigrationJobVerificationError + * @returns {google.cloud.clouddms.v1.CommitConversionWorkspaceRequest} CommitConversionWorkspaceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrationJobVerificationError.decodeDelimited = function decodeDelimited(reader) { + CommitConversionWorkspaceRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MigrationJobVerificationError message. + * Verifies a CommitConversionWorkspaceRequest message. * @function verify - * @memberof google.cloud.clouddms.v1.MigrationJobVerificationError + * @memberof google.cloud.clouddms.v1.CommitConversionWorkspaceRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MigrationJobVerificationError.verify = function verify(message) { + CommitConversionWorkspaceRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.errorCode != null && message.hasOwnProperty("errorCode")) - switch (message.errorCode) { - default: - return "errorCode: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - case 19: - case 21: - break; - } - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) - if (!$util.isString(message.errorMessage)) - return "errorMessage: string expected"; - if (message.errorDetailMessage != null && message.hasOwnProperty("errorDetailMessage")) - if (!$util.isString(message.errorDetailMessage)) - return "errorDetailMessage: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.commitName != null && message.hasOwnProperty("commitName")) + if (!$util.isString(message.commitName)) + return "commitName: string expected"; return null; }; /** - * Creates a MigrationJobVerificationError message from a plain object. Also converts values to their respective internal types. + * Creates a CommitConversionWorkspaceRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.clouddms.v1.MigrationJobVerificationError + * @memberof google.cloud.clouddms.v1.CommitConversionWorkspaceRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.clouddms.v1.MigrationJobVerificationError} MigrationJobVerificationError + * @returns {google.cloud.clouddms.v1.CommitConversionWorkspaceRequest} CommitConversionWorkspaceRequest */ - MigrationJobVerificationError.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.clouddms.v1.MigrationJobVerificationError) + CommitConversionWorkspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.CommitConversionWorkspaceRequest) return object; - var message = new $root.google.cloud.clouddms.v1.MigrationJobVerificationError(); - switch (object.errorCode) { - default: - if (typeof object.errorCode === "number") { - message.errorCode = object.errorCode; - break; - } - break; - case "ERROR_CODE_UNSPECIFIED": - case 0: - message.errorCode = 0; - break; - case "CONNECTION_FAILURE": - case 1: - message.errorCode = 1; - break; - case "AUTHENTICATION_FAILURE": - case 2: - message.errorCode = 2; - break; - case "INVALID_CONNECTION_PROFILE_CONFIG": - case 3: - message.errorCode = 3; - break; - case "VERSION_INCOMPATIBILITY": - case 4: - message.errorCode = 4; - break; - case "CONNECTION_PROFILE_TYPES_INCOMPATIBILITY": - case 5: - message.errorCode = 5; - break; - case "NO_PGLOGICAL_INSTALLED": - case 7: - message.errorCode = 7; - break; - case "PGLOGICAL_NODE_ALREADY_EXISTS": - case 8: - message.errorCode = 8; - break; - case "INVALID_WAL_LEVEL": - case 9: - message.errorCode = 9; - break; - case "INVALID_SHARED_PRELOAD_LIBRARY": - case 10: - message.errorCode = 10; - break; - case "INSUFFICIENT_MAX_REPLICATION_SLOTS": - case 11: - message.errorCode = 11; - break; - case "INSUFFICIENT_MAX_WAL_SENDERS": - case 12: - message.errorCode = 12; - break; - case "INSUFFICIENT_MAX_WORKER_PROCESSES": - case 13: - message.errorCode = 13; - break; - case "UNSUPPORTED_EXTENSIONS": - case 14: - message.errorCode = 14; - break; - case "UNSUPPORTED_MIGRATION_TYPE": - case 15: - message.errorCode = 15; - break; - case "INVALID_RDS_LOGICAL_REPLICATION": - case 16: - message.errorCode = 16; - break; - case "UNSUPPORTED_GTID_MODE": - case 17: - message.errorCode = 17; - break; - case "UNSUPPORTED_TABLE_DEFINITION": - case 18: - message.errorCode = 18; - break; - case "UNSUPPORTED_DEFINER": - case 19: - message.errorCode = 19; - break; - case "CANT_RESTART_RUNNING_MIGRATION": - case 21: - message.errorCode = 21; - break; - } - if (object.errorMessage != null) - message.errorMessage = String(object.errorMessage); - if (object.errorDetailMessage != null) - message.errorDetailMessage = String(object.errorDetailMessage); + var message = new $root.google.cloud.clouddms.v1.CommitConversionWorkspaceRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.commitName != null) + message.commitName = String(object.commitName); return message; }; /** - * Creates a plain object from a MigrationJobVerificationError message. Also converts values to other types if specified. + * Creates a plain object from a CommitConversionWorkspaceRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.clouddms.v1.MigrationJobVerificationError + * @memberof google.cloud.clouddms.v1.CommitConversionWorkspaceRequest * @static - * @param {google.cloud.clouddms.v1.MigrationJobVerificationError} message MigrationJobVerificationError + * @param {google.cloud.clouddms.v1.CommitConversionWorkspaceRequest} message CommitConversionWorkspaceRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MigrationJobVerificationError.toObject = function toObject(message, options) { + CommitConversionWorkspaceRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.errorCode = options.enums === String ? "ERROR_CODE_UNSPECIFIED" : 0; - object.errorMessage = ""; - object.errorDetailMessage = ""; + object.name = ""; + object.commitName = ""; } - if (message.errorCode != null && message.hasOwnProperty("errorCode")) - object.errorCode = options.enums === String ? $root.google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode[message.errorCode] === undefined ? message.errorCode : $root.google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode[message.errorCode] : message.errorCode; - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) - object.errorMessage = message.errorMessage; - if (message.errorDetailMessage != null && message.hasOwnProperty("errorDetailMessage")) - object.errorDetailMessage = message.errorDetailMessage; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.commitName != null && message.hasOwnProperty("commitName")) + object.commitName = message.commitName; return object; }; /** - * Converts this MigrationJobVerificationError to JSON. + * Converts this CommitConversionWorkspaceRequest to JSON. * @function toJSON - * @memberof google.cloud.clouddms.v1.MigrationJobVerificationError + * @memberof google.cloud.clouddms.v1.CommitConversionWorkspaceRequest * @instance * @returns {Object.} JSON object */ - MigrationJobVerificationError.prototype.toJSON = function toJSON() { + CommitConversionWorkspaceRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MigrationJobVerificationError + * Gets the default type url for CommitConversionWorkspaceRequest * @function getTypeUrl - * @memberof google.cloud.clouddms.v1.MigrationJobVerificationError + * @memberof google.cloud.clouddms.v1.CommitConversionWorkspaceRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MigrationJobVerificationError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CommitConversionWorkspaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.clouddms.v1.MigrationJobVerificationError"; + return typeUrlPrefix + "/google.cloud.clouddms.v1.CommitConversionWorkspaceRequest"; }; + return CommitConversionWorkspaceRequest; + })(); + + v1.RollbackConversionWorkspaceRequest = (function() { + /** - * ErrorCode enum. - * @name google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode - * @enum {number} - * @property {number} ERROR_CODE_UNSPECIFIED=0 ERROR_CODE_UNSPECIFIED value - * @property {number} CONNECTION_FAILURE=1 CONNECTION_FAILURE value - * @property {number} AUTHENTICATION_FAILURE=2 AUTHENTICATION_FAILURE value - * @property {number} INVALID_CONNECTION_PROFILE_CONFIG=3 INVALID_CONNECTION_PROFILE_CONFIG value - * @property {number} VERSION_INCOMPATIBILITY=4 VERSION_INCOMPATIBILITY value - * @property {number} CONNECTION_PROFILE_TYPES_INCOMPATIBILITY=5 CONNECTION_PROFILE_TYPES_INCOMPATIBILITY value - * @property {number} NO_PGLOGICAL_INSTALLED=7 NO_PGLOGICAL_INSTALLED value - * @property {number} PGLOGICAL_NODE_ALREADY_EXISTS=8 PGLOGICAL_NODE_ALREADY_EXISTS value - * @property {number} INVALID_WAL_LEVEL=9 INVALID_WAL_LEVEL value - * @property {number} INVALID_SHARED_PRELOAD_LIBRARY=10 INVALID_SHARED_PRELOAD_LIBRARY value - * @property {number} INSUFFICIENT_MAX_REPLICATION_SLOTS=11 INSUFFICIENT_MAX_REPLICATION_SLOTS value - * @property {number} INSUFFICIENT_MAX_WAL_SENDERS=12 INSUFFICIENT_MAX_WAL_SENDERS value - * @property {number} INSUFFICIENT_MAX_WORKER_PROCESSES=13 INSUFFICIENT_MAX_WORKER_PROCESSES value - * @property {number} UNSUPPORTED_EXTENSIONS=14 UNSUPPORTED_EXTENSIONS value - * @property {number} UNSUPPORTED_MIGRATION_TYPE=15 UNSUPPORTED_MIGRATION_TYPE value - * @property {number} INVALID_RDS_LOGICAL_REPLICATION=16 INVALID_RDS_LOGICAL_REPLICATION value - * @property {number} UNSUPPORTED_GTID_MODE=17 UNSUPPORTED_GTID_MODE value - * @property {number} UNSUPPORTED_TABLE_DEFINITION=18 UNSUPPORTED_TABLE_DEFINITION value - * @property {number} UNSUPPORTED_DEFINER=19 UNSUPPORTED_DEFINER value - * @property {number} CANT_RESTART_RUNNING_MIGRATION=21 CANT_RESTART_RUNNING_MIGRATION value + * Properties of a RollbackConversionWorkspaceRequest. + * @memberof google.cloud.clouddms.v1 + * @interface IRollbackConversionWorkspaceRequest + * @property {string|null} [name] RollbackConversionWorkspaceRequest name */ - MigrationJobVerificationError.ErrorCode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ERROR_CODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CONNECTION_FAILURE"] = 1; - values[valuesById[2] = "AUTHENTICATION_FAILURE"] = 2; - values[valuesById[3] = "INVALID_CONNECTION_PROFILE_CONFIG"] = 3; - values[valuesById[4] = "VERSION_INCOMPATIBILITY"] = 4; - values[valuesById[5] = "CONNECTION_PROFILE_TYPES_INCOMPATIBILITY"] = 5; - values[valuesById[7] = "NO_PGLOGICAL_INSTALLED"] = 7; - values[valuesById[8] = "PGLOGICAL_NODE_ALREADY_EXISTS"] = 8; - values[valuesById[9] = "INVALID_WAL_LEVEL"] = 9; - values[valuesById[10] = "INVALID_SHARED_PRELOAD_LIBRARY"] = 10; - values[valuesById[11] = "INSUFFICIENT_MAX_REPLICATION_SLOTS"] = 11; - values[valuesById[12] = "INSUFFICIENT_MAX_WAL_SENDERS"] = 12; - values[valuesById[13] = "INSUFFICIENT_MAX_WORKER_PROCESSES"] = 13; - values[valuesById[14] = "UNSUPPORTED_EXTENSIONS"] = 14; - values[valuesById[15] = "UNSUPPORTED_MIGRATION_TYPE"] = 15; - values[valuesById[16] = "INVALID_RDS_LOGICAL_REPLICATION"] = 16; - values[valuesById[17] = "UNSUPPORTED_GTID_MODE"] = 17; - values[valuesById[18] = "UNSUPPORTED_TABLE_DEFINITION"] = 18; - values[valuesById[19] = "UNSUPPORTED_DEFINER"] = 19; - values[valuesById[21] = "CANT_RESTART_RUNNING_MIGRATION"] = 21; - return values; - })(); - return MigrationJobVerificationError; - })(); + /** + * Constructs a new RollbackConversionWorkspaceRequest. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a RollbackConversionWorkspaceRequest. + * @implements IRollbackConversionWorkspaceRequest + * @constructor + * @param {google.cloud.clouddms.v1.IRollbackConversionWorkspaceRequest=} [properties] Properties to set + */ + function RollbackConversionWorkspaceRequest(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]]; + } - /** - * DatabaseEngine enum. - * @name google.cloud.clouddms.v1.DatabaseEngine - * @enum {number} - * @property {number} DATABASE_ENGINE_UNSPECIFIED=0 DATABASE_ENGINE_UNSPECIFIED value - * @property {number} MYSQL=1 MYSQL value - * @property {number} POSTGRESQL=2 POSTGRESQL value - */ - v1.DatabaseEngine = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DATABASE_ENGINE_UNSPECIFIED"] = 0; - values[valuesById[1] = "MYSQL"] = 1; - values[valuesById[2] = "POSTGRESQL"] = 2; - return values; - })(); + /** + * RollbackConversionWorkspaceRequest name. + * @member {string} name + * @memberof google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest + * @instance + */ + RollbackConversionWorkspaceRequest.prototype.name = ""; - /** - * DatabaseProvider enum. - * @name google.cloud.clouddms.v1.DatabaseProvider - * @enum {number} - * @property {number} DATABASE_PROVIDER_UNSPECIFIED=0 DATABASE_PROVIDER_UNSPECIFIED value - * @property {number} CLOUDSQL=1 CLOUDSQL value - * @property {number} RDS=2 RDS value - */ - v1.DatabaseProvider = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DATABASE_PROVIDER_UNSPECIFIED"] = 0; - values[valuesById[1] = "CLOUDSQL"] = 1; - values[valuesById[2] = "RDS"] = 2; - return values; - })(); + /** + * Creates a new RollbackConversionWorkspaceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest + * @static + * @param {google.cloud.clouddms.v1.IRollbackConversionWorkspaceRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest} RollbackConversionWorkspaceRequest instance + */ + RollbackConversionWorkspaceRequest.create = function create(properties) { + return new RollbackConversionWorkspaceRequest(properties); + }; - return v1; - })(); + /** + * Encodes the specified RollbackConversionWorkspaceRequest message. Does not implicitly {@link google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest + * @static + * @param {google.cloud.clouddms.v1.IRollbackConversionWorkspaceRequest} message RollbackConversionWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RollbackConversionWorkspaceRequest.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; + }; - return clouddms; - })(); + /** + * Encodes the specified RollbackConversionWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest + * @static + * @param {google.cloud.clouddms.v1.IRollbackConversionWorkspaceRequest} message RollbackConversionWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RollbackConversionWorkspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - return cloud; - })(); + /** + * Decodes a RollbackConversionWorkspaceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest} RollbackConversionWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RollbackConversionWorkspaceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - google.api = (function() { + /** + * Decodes a RollbackConversionWorkspaceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest} RollbackConversionWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RollbackConversionWorkspaceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; + /** + * Verifies a RollbackConversionWorkspaceRequest message. + * @function verify + * @memberof google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RollbackConversionWorkspaceRequest.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; + }; - api.Http = (function() { + /** + * Creates a RollbackConversionWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest} RollbackConversionWorkspaceRequest + */ + RollbackConversionWorkspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest) + return object; + var message = new $root.google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion - */ + /** + * Creates a plain object from a RollbackConversionWorkspaceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest + * @static + * @param {google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest} message RollbackConversionWorkspaceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RollbackConversionWorkspaceRequest.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; + }; - /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp - * @constructor - * @param {google.api.IHttp=} [properties] Properties to set - */ - function Http(properties) { - 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]]; - } - - /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance - */ - Http.prototype.rules = $util.emptyArray; + /** + * Converts this RollbackConversionWorkspaceRequest to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest + * @instance + * @returns {Object.} JSON object + */ + RollbackConversionWorkspaceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http - * @instance - */ - Http.prototype.fullyDecodeReservedExpansion = false; + /** + * Gets the default type url for RollbackConversionWorkspaceRequest + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RollbackConversionWorkspaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest"; + }; - /** - * Creates a new Http instance using the specified properties. - * @function create - * @memberof google.api.Http - * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance - */ - Http.create = function create(properties) { - return new Http(properties); - }; + return RollbackConversionWorkspaceRequest; + })(); - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encode - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); - return writer; - }; + v1.ApplyConversionWorkspaceRequest = (function() { - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of an ApplyConversionWorkspaceRequest. + * @memberof google.cloud.clouddms.v1 + * @interface IApplyConversionWorkspaceRequest + * @property {string|null} [name] ApplyConversionWorkspaceRequest name + * @property {string|null} [filter] ApplyConversionWorkspaceRequest filter + * @property {string|null} [connectionProfile] ApplyConversionWorkspaceRequest connectionProfile + */ - /** - * Decodes a Http message from the specified reader or buffer. - * @function decode - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - } - case 2: { - message.fullyDecodeReservedExpansion = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; + /** + * Constructs a new ApplyConversionWorkspaceRequest. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents an ApplyConversionWorkspaceRequest. + * @implements IApplyConversionWorkspaceRequest + * @constructor + * @param {google.cloud.clouddms.v1.IApplyConversionWorkspaceRequest=} [properties] Properties to set + */ + function ApplyConversionWorkspaceRequest(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]]; } - } - return message; - }; - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * ApplyConversionWorkspaceRequest name. + * @member {string} name + * @memberof google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest + * @instance + */ + ApplyConversionWorkspaceRequest.prototype.name = ""; - /** - * Verifies a Http message. - * @function verify - * @memberof google.api.Http - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Http.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; - return null; - }; + /** + * ApplyConversionWorkspaceRequest filter. + * @member {string} filter + * @memberof google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest + * @instance + */ + ApplyConversionWorkspaceRequest.prototype.filter = ""; - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Http - * @static - * @param {Object.} object Plain object - * @returns {google.api.Http} Http - */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) - return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - return message; - }; + /** + * ApplyConversionWorkspaceRequest connectionProfile. + * @member {string|null|undefined} connectionProfile + * @memberof google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest + * @instance + */ + ApplyConversionWorkspaceRequest.prototype.connectionProfile = null; - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Http - * @static - * @param {google.api.Http} message Http - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Http.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; - return object; - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Converts this Http to JSON. - * @function toJSON - * @memberof google.api.Http - * @instance - * @returns {Object.} JSON object - */ - Http.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * ApplyConversionWorkspaceRequest destination. + * @member {"connectionProfile"|undefined} destination + * @memberof google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest + * @instance + */ + Object.defineProperty(ApplyConversionWorkspaceRequest.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["connectionProfile"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Gets the default type url for Http - * @function getTypeUrl - * @memberof google.api.Http - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Http"; - }; + /** + * Creates a new ApplyConversionWorkspaceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest + * @static + * @param {google.cloud.clouddms.v1.IApplyConversionWorkspaceRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest} ApplyConversionWorkspaceRequest instance + */ + ApplyConversionWorkspaceRequest.create = function create(properties) { + return new ApplyConversionWorkspaceRequest(properties); + }; - return Http; - })(); + /** + * Encodes the specified ApplyConversionWorkspaceRequest message. Does not implicitly {@link google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest + * @static + * @param {google.cloud.clouddms.v1.IApplyConversionWorkspaceRequest} message ApplyConversionWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ApplyConversionWorkspaceRequest.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.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.connectionProfile != null && Object.hasOwnProperty.call(message, "connectionProfile")) + writer.uint32(/* id 100, wireType 2 =*/802).string(message.connectionProfile); + return writer; + }; - api.HttpRule = (function() { + /** + * Encodes the specified ApplyConversionWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest + * @static + * @param {google.cloud.clouddms.v1.IApplyConversionWorkspaceRequest} message ApplyConversionWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ApplyConversionWorkspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [responseBody] HttpRule responseBody - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings - */ + /** + * Decodes an ApplyConversionWorkspaceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest} ApplyConversionWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ApplyConversionWorkspaceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.filter = reader.string(); + break; + } + case 100: { + message.connectionProfile = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule - * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set - */ - function HttpRule(properties) { - this.additionalBindings = []; - 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]]; - } + /** + * Decodes an ApplyConversionWorkspaceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest} ApplyConversionWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ApplyConversionWorkspaceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; + /** + * Verifies an ApplyConversionWorkspaceRequest message. + * @function verify + * @memberof google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ApplyConversionWorkspaceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.connectionProfile != null && message.hasOwnProperty("connectionProfile")) { + properties.destination = 1; + if (!$util.isString(message.connectionProfile)) + return "connectionProfile: string expected"; + } + return null; + }; - /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; + /** + * Creates an ApplyConversionWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest} ApplyConversionWorkspaceRequest + */ + ApplyConversionWorkspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest) + return object; + var message = new $root.google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.filter != null) + message.filter = String(object.filter); + if (object.connectionProfile != null) + message.connectionProfile = String(object.connectionProfile); + return message; + }; - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; + /** + * Creates a plain object from an ApplyConversionWorkspaceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest + * @static + * @param {google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest} message ApplyConversionWorkspaceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ApplyConversionWorkspaceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.filter = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.connectionProfile != null && message.hasOwnProperty("connectionProfile")) { + object.connectionProfile = message.connectionProfile; + if (options.oneofs) + object.destination = "connectionProfile"; + } + return object; + }; - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = null; + /** + * Converts this ApplyConversionWorkspaceRequest to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest + * @instance + * @returns {Object.} JSON object + */ + ApplyConversionWorkspaceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = null; + /** + * Gets the default type url for ApplyConversionWorkspaceRequest + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ApplyConversionWorkspaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest"; + }; - /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = null; + return ApplyConversionWorkspaceRequest; + })(); - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; + v1.SeedConversionWorkspaceRequest = (function() { - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; + /** + * Properties of a SeedConversionWorkspaceRequest. + * @memberof google.cloud.clouddms.v1 + * @interface ISeedConversionWorkspaceRequest + * @property {string|null} [name] SeedConversionWorkspaceRequest name + * @property {boolean|null} [autoCommit] SeedConversionWorkspaceRequest autoCommit + * @property {string|null} [sourceConnectionProfile] SeedConversionWorkspaceRequest sourceConnectionProfile + * @property {string|null} [destinationConnectionProfile] SeedConversionWorkspaceRequest destinationConnectionProfile + */ - /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.responseBody = ""; + /** + * Constructs a new SeedConversionWorkspaceRequest. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a SeedConversionWorkspaceRequest. + * @implements ISeedConversionWorkspaceRequest + * @constructor + * @param {google.cloud.clouddms.v1.ISeedConversionWorkspaceRequest=} [properties] Properties to set + */ + function SeedConversionWorkspaceRequest(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]]; + } - /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.additionalBindings = $util.emptyArray; + /** + * SeedConversionWorkspaceRequest name. + * @member {string} name + * @memberof google.cloud.clouddms.v1.SeedConversionWorkspaceRequest + * @instance + */ + SeedConversionWorkspaceRequest.prototype.name = ""; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * SeedConversionWorkspaceRequest autoCommit. + * @member {boolean} autoCommit + * @memberof google.cloud.clouddms.v1.SeedConversionWorkspaceRequest + * @instance + */ + SeedConversionWorkspaceRequest.prototype.autoCommit = false; - /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule - * @instance - */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * SeedConversionWorkspaceRequest sourceConnectionProfile. + * @member {string|null|undefined} sourceConnectionProfile + * @memberof google.cloud.clouddms.v1.SeedConversionWorkspaceRequest + * @instance + */ + SeedConversionWorkspaceRequest.prototype.sourceConnectionProfile = null; - /** - * Creates a new HttpRule instance using the specified properties. - * @function create - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance - */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); - }; + /** + * SeedConversionWorkspaceRequest destinationConnectionProfile. + * @member {string|null|undefined} destinationConnectionProfile + * @memberof google.cloud.clouddms.v1.SeedConversionWorkspaceRequest + * @instance + */ + SeedConversionWorkspaceRequest.prototype.destinationConnectionProfile = null; - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encode - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); - return writer; - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * SeedConversionWorkspaceRequest seedFrom. + * @member {"sourceConnectionProfile"|"destinationConnectionProfile"|undefined} seedFrom + * @memberof google.cloud.clouddms.v1.SeedConversionWorkspaceRequest + * @instance + */ + Object.defineProperty(SeedConversionWorkspaceRequest.prototype, "seedFrom", { + get: $util.oneOfGetter($oneOfFields = ["sourceConnectionProfile", "destinationConnectionProfile"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @function decode - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.get = reader.string(); - break; - } - case 3: { - message.put = reader.string(); - break; - } - case 4: { - message.post = reader.string(); - break; + /** + * Creates a new SeedConversionWorkspaceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.SeedConversionWorkspaceRequest + * @static + * @param {google.cloud.clouddms.v1.ISeedConversionWorkspaceRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.SeedConversionWorkspaceRequest} SeedConversionWorkspaceRequest instance + */ + SeedConversionWorkspaceRequest.create = function create(properties) { + return new SeedConversionWorkspaceRequest(properties); + }; + + /** + * Encodes the specified SeedConversionWorkspaceRequest message. Does not implicitly {@link google.cloud.clouddms.v1.SeedConversionWorkspaceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.SeedConversionWorkspaceRequest + * @static + * @param {google.cloud.clouddms.v1.ISeedConversionWorkspaceRequest} message SeedConversionWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SeedConversionWorkspaceRequest.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.autoCommit != null && Object.hasOwnProperty.call(message, "autoCommit")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.autoCommit); + if (message.sourceConnectionProfile != null && Object.hasOwnProperty.call(message, "sourceConnectionProfile")) + writer.uint32(/* id 100, wireType 2 =*/802).string(message.sourceConnectionProfile); + if (message.destinationConnectionProfile != null && Object.hasOwnProperty.call(message, "destinationConnectionProfile")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.destinationConnectionProfile); + return writer; + }; + + /** + * Encodes the specified SeedConversionWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.SeedConversionWorkspaceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.SeedConversionWorkspaceRequest + * @static + * @param {google.cloud.clouddms.v1.ISeedConversionWorkspaceRequest} message SeedConversionWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SeedConversionWorkspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SeedConversionWorkspaceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.SeedConversionWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.SeedConversionWorkspaceRequest} SeedConversionWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SeedConversionWorkspaceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.SeedConversionWorkspaceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.autoCommit = reader.bool(); + break; + } + case 100: { + message.sourceConnectionProfile = reader.string(); + break; + } + case 101: { + message.destinationConnectionProfile = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } } - case 5: { - message["delete"] = reader.string(); - break; + return message; + }; + + /** + * Decodes a SeedConversionWorkspaceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.SeedConversionWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.SeedConversionWorkspaceRequest} SeedConversionWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SeedConversionWorkspaceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SeedConversionWorkspaceRequest message. + * @function verify + * @memberof google.cloud.clouddms.v1.SeedConversionWorkspaceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SeedConversionWorkspaceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.autoCommit != null && message.hasOwnProperty("autoCommit")) + if (typeof message.autoCommit !== "boolean") + return "autoCommit: boolean expected"; + if (message.sourceConnectionProfile != null && message.hasOwnProperty("sourceConnectionProfile")) { + properties.seedFrom = 1; + if (!$util.isString(message.sourceConnectionProfile)) + return "sourceConnectionProfile: string expected"; + } + if (message.destinationConnectionProfile != null && message.hasOwnProperty("destinationConnectionProfile")) { + if (properties.seedFrom === 1) + return "seedFrom: multiple values"; + properties.seedFrom = 1; + if (!$util.isString(message.destinationConnectionProfile)) + return "destinationConnectionProfile: string expected"; } - case 6: { - message.patch = reader.string(); - break; + return null; + }; + + /** + * Creates a SeedConversionWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.SeedConversionWorkspaceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.SeedConversionWorkspaceRequest} SeedConversionWorkspaceRequest + */ + SeedConversionWorkspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.SeedConversionWorkspaceRequest) + return object; + var message = new $root.google.cloud.clouddms.v1.SeedConversionWorkspaceRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.autoCommit != null) + message.autoCommit = Boolean(object.autoCommit); + if (object.sourceConnectionProfile != null) + message.sourceConnectionProfile = String(object.sourceConnectionProfile); + if (object.destinationConnectionProfile != null) + message.destinationConnectionProfile = String(object.destinationConnectionProfile); + return message; + }; + + /** + * Creates a plain object from a SeedConversionWorkspaceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.SeedConversionWorkspaceRequest + * @static + * @param {google.cloud.clouddms.v1.SeedConversionWorkspaceRequest} message SeedConversionWorkspaceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SeedConversionWorkspaceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.autoCommit = false; } - case 8: { - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.autoCommit != null && message.hasOwnProperty("autoCommit")) + object.autoCommit = message.autoCommit; + if (message.sourceConnectionProfile != null && message.hasOwnProperty("sourceConnectionProfile")) { + object.sourceConnectionProfile = message.sourceConnectionProfile; + if (options.oneofs) + object.seedFrom = "sourceConnectionProfile"; } - case 7: { - message.body = reader.string(); - break; + if (message.destinationConnectionProfile != null && message.hasOwnProperty("destinationConnectionProfile")) { + object.destinationConnectionProfile = message.destinationConnectionProfile; + if (options.oneofs) + object.seedFrom = "destinationConnectionProfile"; } - case 12: { + return object; + }; + + /** + * Converts this SeedConversionWorkspaceRequest to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.SeedConversionWorkspaceRequest + * @instance + * @returns {Object.} JSON object + */ + SeedConversionWorkspaceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SeedConversionWorkspaceRequest + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.SeedConversionWorkspaceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SeedConversionWorkspaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.SeedConversionWorkspaceRequest"; + }; + + return SeedConversionWorkspaceRequest; + })(); + + v1.ConvertConversionWorkspaceRequest = (function() { + + /** + * Properties of a ConvertConversionWorkspaceRequest. + * @memberof google.cloud.clouddms.v1 + * @interface IConvertConversionWorkspaceRequest + * @property {string|null} [name] ConvertConversionWorkspaceRequest name + * @property {boolean|null} [autoCommit] ConvertConversionWorkspaceRequest autoCommit + * @property {string|null} [filter] ConvertConversionWorkspaceRequest filter + */ + + /** + * Constructs a new ConvertConversionWorkspaceRequest. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a ConvertConversionWorkspaceRequest. + * @implements IConvertConversionWorkspaceRequest + * @constructor + * @param {google.cloud.clouddms.v1.IConvertConversionWorkspaceRequest=} [properties] Properties to set + */ + function ConvertConversionWorkspaceRequest(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]]; + } + + /** + * ConvertConversionWorkspaceRequest name. + * @member {string} name + * @memberof google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest + * @instance + */ + ConvertConversionWorkspaceRequest.prototype.name = ""; + + /** + * ConvertConversionWorkspaceRequest autoCommit. + * @member {boolean} autoCommit + * @memberof google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest + * @instance + */ + ConvertConversionWorkspaceRequest.prototype.autoCommit = false; + + /** + * ConvertConversionWorkspaceRequest filter. + * @member {string} filter + * @memberof google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest + * @instance + */ + ConvertConversionWorkspaceRequest.prototype.filter = ""; + + /** + * Creates a new ConvertConversionWorkspaceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest + * @static + * @param {google.cloud.clouddms.v1.IConvertConversionWorkspaceRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest} ConvertConversionWorkspaceRequest instance + */ + ConvertConversionWorkspaceRequest.create = function create(properties) { + return new ConvertConversionWorkspaceRequest(properties); + }; + + /** + * Encodes the specified ConvertConversionWorkspaceRequest message. Does not implicitly {@link google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest + * @static + * @param {google.cloud.clouddms.v1.IConvertConversionWorkspaceRequest} message ConvertConversionWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConvertConversionWorkspaceRequest.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.autoCommit != null && Object.hasOwnProperty.call(message, "autoCommit")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.autoCommit); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ConvertConversionWorkspaceRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest + * @static + * @param {google.cloud.clouddms.v1.IConvertConversionWorkspaceRequest} message ConvertConversionWorkspaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConvertConversionWorkspaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConvertConversionWorkspaceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest} ConvertConversionWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConvertConversionWorkspaceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 4: { + message.autoCommit = reader.bool(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConvertConversionWorkspaceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest} ConvertConversionWorkspaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConvertConversionWorkspaceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConvertConversionWorkspaceRequest message. + * @function verify + * @memberof google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConvertConversionWorkspaceRequest.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.autoCommit != null && message.hasOwnProperty("autoCommit")) + if (typeof message.autoCommit !== "boolean") + return "autoCommit: boolean expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ConvertConversionWorkspaceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest} ConvertConversionWorkspaceRequest + */ + ConvertConversionWorkspaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest) + return object; + var message = new $root.google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.autoCommit != null) + message.autoCommit = Boolean(object.autoCommit); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ConvertConversionWorkspaceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest + * @static + * @param {google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest} message ConvertConversionWorkspaceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConvertConversionWorkspaceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.autoCommit = false; + object.filter = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.autoCommit != null && message.hasOwnProperty("autoCommit")) + object.autoCommit = message.autoCommit; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ConvertConversionWorkspaceRequest to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest + * @instance + * @returns {Object.} JSON object + */ + ConvertConversionWorkspaceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConvertConversionWorkspaceRequest + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConvertConversionWorkspaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest"; + }; + + return ConvertConversionWorkspaceRequest; + })(); + + v1.ImportMappingRulesRequest = (function() { + + /** + * Properties of an ImportMappingRulesRequest. + * @memberof google.cloud.clouddms.v1 + * @interface IImportMappingRulesRequest + * @property {string|null} [parent] ImportMappingRulesRequest parent + * @property {google.cloud.clouddms.v1.ImportRulesFileFormat|null} [rulesFormat] ImportMappingRulesRequest rulesFormat + * @property {Array.|null} [rulesFiles] ImportMappingRulesRequest rulesFiles + * @property {boolean|null} [autoCommit] ImportMappingRulesRequest autoCommit + */ + + /** + * Constructs a new ImportMappingRulesRequest. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents an ImportMappingRulesRequest. + * @implements IImportMappingRulesRequest + * @constructor + * @param {google.cloud.clouddms.v1.IImportMappingRulesRequest=} [properties] Properties to set + */ + function ImportMappingRulesRequest(properties) { + this.rulesFiles = []; + 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]]; + } + + /** + * ImportMappingRulesRequest parent. + * @member {string} parent + * @memberof google.cloud.clouddms.v1.ImportMappingRulesRequest + * @instance + */ + ImportMappingRulesRequest.prototype.parent = ""; + + /** + * ImportMappingRulesRequest rulesFormat. + * @member {google.cloud.clouddms.v1.ImportRulesFileFormat} rulesFormat + * @memberof google.cloud.clouddms.v1.ImportMappingRulesRequest + * @instance + */ + ImportMappingRulesRequest.prototype.rulesFormat = 0; + + /** + * ImportMappingRulesRequest rulesFiles. + * @member {Array.} rulesFiles + * @memberof google.cloud.clouddms.v1.ImportMappingRulesRequest + * @instance + */ + ImportMappingRulesRequest.prototype.rulesFiles = $util.emptyArray; + + /** + * ImportMappingRulesRequest autoCommit. + * @member {boolean} autoCommit + * @memberof google.cloud.clouddms.v1.ImportMappingRulesRequest + * @instance + */ + ImportMappingRulesRequest.prototype.autoCommit = false; + + /** + * Creates a new ImportMappingRulesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.ImportMappingRulesRequest + * @static + * @param {google.cloud.clouddms.v1.IImportMappingRulesRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.ImportMappingRulesRequest} ImportMappingRulesRequest instance + */ + ImportMappingRulesRequest.create = function create(properties) { + return new ImportMappingRulesRequest(properties); + }; + + /** + * Encodes the specified ImportMappingRulesRequest message. Does not implicitly {@link google.cloud.clouddms.v1.ImportMappingRulesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.ImportMappingRulesRequest + * @static + * @param {google.cloud.clouddms.v1.IImportMappingRulesRequest} message ImportMappingRulesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportMappingRulesRequest.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.rulesFormat != null && Object.hasOwnProperty.call(message, "rulesFormat")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.rulesFormat); + if (message.rulesFiles != null && message.rulesFiles.length) + for (var i = 0; i < message.rulesFiles.length; ++i) + $root.google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile.encode(message.rulesFiles[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.autoCommit != null && Object.hasOwnProperty.call(message, "autoCommit")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.autoCommit); + return writer; + }; + + /** + * Encodes the specified ImportMappingRulesRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ImportMappingRulesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.ImportMappingRulesRequest + * @static + * @param {google.cloud.clouddms.v1.IImportMappingRulesRequest} message ImportMappingRulesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportMappingRulesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportMappingRulesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.ImportMappingRulesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.ImportMappingRulesRequest} ImportMappingRulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportMappingRulesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.ImportMappingRulesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.rulesFormat = reader.int32(); + break; + } + case 3: { + if (!(message.rulesFiles && message.rulesFiles.length)) + message.rulesFiles = []; + message.rulesFiles.push($root.google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile.decode(reader, reader.uint32())); + break; + } + case 6: { + message.autoCommit = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImportMappingRulesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.ImportMappingRulesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.ImportMappingRulesRequest} ImportMappingRulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportMappingRulesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportMappingRulesRequest message. + * @function verify + * @memberof google.cloud.clouddms.v1.ImportMappingRulesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportMappingRulesRequest.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.rulesFormat != null && message.hasOwnProperty("rulesFormat")) + switch (message.rulesFormat) { + default: + return "rulesFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.rulesFiles != null && message.hasOwnProperty("rulesFiles")) { + if (!Array.isArray(message.rulesFiles)) + return "rulesFiles: array expected"; + for (var i = 0; i < message.rulesFiles.length; ++i) { + var error = $root.google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile.verify(message.rulesFiles[i]); + if (error) + return "rulesFiles." + error; + } + } + if (message.autoCommit != null && message.hasOwnProperty("autoCommit")) + if (typeof message.autoCommit !== "boolean") + return "autoCommit: boolean expected"; + return null; + }; + + /** + * Creates an ImportMappingRulesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.ImportMappingRulesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.ImportMappingRulesRequest} ImportMappingRulesRequest + */ + ImportMappingRulesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.ImportMappingRulesRequest) + return object; + var message = new $root.google.cloud.clouddms.v1.ImportMappingRulesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + switch (object.rulesFormat) { + default: + if (typeof object.rulesFormat === "number") { + message.rulesFormat = object.rulesFormat; + break; + } + break; + case "IMPORT_RULES_FILE_FORMAT_UNSPECIFIED": + case 0: + message.rulesFormat = 0; + break; + case "IMPORT_RULES_FILE_FORMAT_HARBOUR_BRIDGE_SESSION_FILE": + case 1: + message.rulesFormat = 1; + break; + case "IMPORT_RULES_FILE_FORMAT_ORATOPG_CONFIG_FILE": + case 2: + message.rulesFormat = 2; + break; + } + if (object.rulesFiles) { + if (!Array.isArray(object.rulesFiles)) + throw TypeError(".google.cloud.clouddms.v1.ImportMappingRulesRequest.rulesFiles: array expected"); + message.rulesFiles = []; + for (var i = 0; i < object.rulesFiles.length; ++i) { + if (typeof object.rulesFiles[i] !== "object") + throw TypeError(".google.cloud.clouddms.v1.ImportMappingRulesRequest.rulesFiles: object expected"); + message.rulesFiles[i] = $root.google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile.fromObject(object.rulesFiles[i]); + } + } + if (object.autoCommit != null) + message.autoCommit = Boolean(object.autoCommit); + return message; + }; + + /** + * Creates a plain object from an ImportMappingRulesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.ImportMappingRulesRequest + * @static + * @param {google.cloud.clouddms.v1.ImportMappingRulesRequest} message ImportMappingRulesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportMappingRulesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rulesFiles = []; + if (options.defaults) { + object.parent = ""; + object.rulesFormat = options.enums === String ? "IMPORT_RULES_FILE_FORMAT_UNSPECIFIED" : 0; + object.autoCommit = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.rulesFormat != null && message.hasOwnProperty("rulesFormat")) + object.rulesFormat = options.enums === String ? $root.google.cloud.clouddms.v1.ImportRulesFileFormat[message.rulesFormat] === undefined ? message.rulesFormat : $root.google.cloud.clouddms.v1.ImportRulesFileFormat[message.rulesFormat] : message.rulesFormat; + if (message.rulesFiles && message.rulesFiles.length) { + object.rulesFiles = []; + for (var j = 0; j < message.rulesFiles.length; ++j) + object.rulesFiles[j] = $root.google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile.toObject(message.rulesFiles[j], options); + } + if (message.autoCommit != null && message.hasOwnProperty("autoCommit")) + object.autoCommit = message.autoCommit; + return object; + }; + + /** + * Converts this ImportMappingRulesRequest to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.ImportMappingRulesRequest + * @instance + * @returns {Object.} JSON object + */ + ImportMappingRulesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImportMappingRulesRequest + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.ImportMappingRulesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportMappingRulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.ImportMappingRulesRequest"; + }; + + ImportMappingRulesRequest.RulesFile = (function() { + + /** + * Properties of a RulesFile. + * @memberof google.cloud.clouddms.v1.ImportMappingRulesRequest + * @interface IRulesFile + * @property {string|null} [rulesSourceFilename] RulesFile rulesSourceFilename + * @property {string|null} [rulesContent] RulesFile rulesContent + */ + + /** + * Constructs a new RulesFile. + * @memberof google.cloud.clouddms.v1.ImportMappingRulesRequest + * @classdesc Represents a RulesFile. + * @implements IRulesFile + * @constructor + * @param {google.cloud.clouddms.v1.ImportMappingRulesRequest.IRulesFile=} [properties] Properties to set + */ + function RulesFile(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]]; + } + + /** + * RulesFile rulesSourceFilename. + * @member {string} rulesSourceFilename + * @memberof google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile + * @instance + */ + RulesFile.prototype.rulesSourceFilename = ""; + + /** + * RulesFile rulesContent. + * @member {string} rulesContent + * @memberof google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile + * @instance + */ + RulesFile.prototype.rulesContent = ""; + + /** + * Creates a new RulesFile instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile + * @static + * @param {google.cloud.clouddms.v1.ImportMappingRulesRequest.IRulesFile=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile} RulesFile instance + */ + RulesFile.create = function create(properties) { + return new RulesFile(properties); + }; + + /** + * Encodes the specified RulesFile message. Does not implicitly {@link google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile + * @static + * @param {google.cloud.clouddms.v1.ImportMappingRulesRequest.IRulesFile} message RulesFile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RulesFile.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rulesSourceFilename != null && Object.hasOwnProperty.call(message, "rulesSourceFilename")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.rulesSourceFilename); + if (message.rulesContent != null && Object.hasOwnProperty.call(message, "rulesContent")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.rulesContent); + return writer; + }; + + /** + * Encodes the specified RulesFile message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile + * @static + * @param {google.cloud.clouddms.v1.ImportMappingRulesRequest.IRulesFile} message RulesFile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RulesFile.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RulesFile message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile} RulesFile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RulesFile.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rulesSourceFilename = reader.string(); + break; + } + case 2: { + message.rulesContent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RulesFile message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile} RulesFile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RulesFile.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RulesFile message. + * @function verify + * @memberof google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RulesFile.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rulesSourceFilename != null && message.hasOwnProperty("rulesSourceFilename")) + if (!$util.isString(message.rulesSourceFilename)) + return "rulesSourceFilename: string expected"; + if (message.rulesContent != null && message.hasOwnProperty("rulesContent")) + if (!$util.isString(message.rulesContent)) + return "rulesContent: string expected"; + return null; + }; + + /** + * Creates a RulesFile message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile} RulesFile + */ + RulesFile.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile) + return object; + var message = new $root.google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile(); + if (object.rulesSourceFilename != null) + message.rulesSourceFilename = String(object.rulesSourceFilename); + if (object.rulesContent != null) + message.rulesContent = String(object.rulesContent); + return message; + }; + + /** + * Creates a plain object from a RulesFile message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile + * @static + * @param {google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile} message RulesFile + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RulesFile.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.rulesSourceFilename = ""; + object.rulesContent = ""; + } + if (message.rulesSourceFilename != null && message.hasOwnProperty("rulesSourceFilename")) + object.rulesSourceFilename = message.rulesSourceFilename; + if (message.rulesContent != null && message.hasOwnProperty("rulesContent")) + object.rulesContent = message.rulesContent; + return object; + }; + + /** + * Converts this RulesFile to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile + * @instance + * @returns {Object.} JSON object + */ + RulesFile.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RulesFile + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RulesFile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile"; + }; + + return RulesFile; + })(); + + return ImportMappingRulesRequest; + })(); + + v1.DescribeDatabaseEntitiesRequest = (function() { + + /** + * Properties of a DescribeDatabaseEntitiesRequest. + * @memberof google.cloud.clouddms.v1 + * @interface IDescribeDatabaseEntitiesRequest + * @property {string|null} [conversionWorkspace] DescribeDatabaseEntitiesRequest conversionWorkspace + * @property {number|null} [pageSize] DescribeDatabaseEntitiesRequest pageSize + * @property {string|null} [pageToken] DescribeDatabaseEntitiesRequest pageToken + * @property {google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest.DBTreeType|null} [tree] DescribeDatabaseEntitiesRequest tree + * @property {boolean|null} [uncommitted] DescribeDatabaseEntitiesRequest uncommitted + * @property {string|null} [commitId] DescribeDatabaseEntitiesRequest commitId + * @property {string|null} [filter] DescribeDatabaseEntitiesRequest filter + */ + + /** + * Constructs a new DescribeDatabaseEntitiesRequest. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a DescribeDatabaseEntitiesRequest. + * @implements IDescribeDatabaseEntitiesRequest + * @constructor + * @param {google.cloud.clouddms.v1.IDescribeDatabaseEntitiesRequest=} [properties] Properties to set + */ + function DescribeDatabaseEntitiesRequest(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]]; + } + + /** + * DescribeDatabaseEntitiesRequest conversionWorkspace. + * @member {string} conversionWorkspace + * @memberof google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest + * @instance + */ + DescribeDatabaseEntitiesRequest.prototype.conversionWorkspace = ""; + + /** + * DescribeDatabaseEntitiesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest + * @instance + */ + DescribeDatabaseEntitiesRequest.prototype.pageSize = 0; + + /** + * DescribeDatabaseEntitiesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest + * @instance + */ + DescribeDatabaseEntitiesRequest.prototype.pageToken = ""; + + /** + * DescribeDatabaseEntitiesRequest tree. + * @member {google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest.DBTreeType} tree + * @memberof google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest + * @instance + */ + DescribeDatabaseEntitiesRequest.prototype.tree = 0; + + /** + * DescribeDatabaseEntitiesRequest uncommitted. + * @member {boolean} uncommitted + * @memberof google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest + * @instance + */ + DescribeDatabaseEntitiesRequest.prototype.uncommitted = false; + + /** + * DescribeDatabaseEntitiesRequest commitId. + * @member {string} commitId + * @memberof google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest + * @instance + */ + DescribeDatabaseEntitiesRequest.prototype.commitId = ""; + + /** + * DescribeDatabaseEntitiesRequest filter. + * @member {string} filter + * @memberof google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest + * @instance + */ + DescribeDatabaseEntitiesRequest.prototype.filter = ""; + + /** + * Creates a new DescribeDatabaseEntitiesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest + * @static + * @param {google.cloud.clouddms.v1.IDescribeDatabaseEntitiesRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest} DescribeDatabaseEntitiesRequest instance + */ + DescribeDatabaseEntitiesRequest.create = function create(properties) { + return new DescribeDatabaseEntitiesRequest(properties); + }; + + /** + * Encodes the specified DescribeDatabaseEntitiesRequest message. Does not implicitly {@link google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest + * @static + * @param {google.cloud.clouddms.v1.IDescribeDatabaseEntitiesRequest} message DescribeDatabaseEntitiesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescribeDatabaseEntitiesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conversionWorkspace != null && Object.hasOwnProperty.call(message, "conversionWorkspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversionWorkspace); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.tree != null && Object.hasOwnProperty.call(message, "tree")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.tree); + if (message.uncommitted != null && Object.hasOwnProperty.call(message, "uncommitted")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.uncommitted); + if (message.commitId != null && Object.hasOwnProperty.call(message, "commitId")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.commitId); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.filter); + return writer; + }; + + /** + * Encodes the specified DescribeDatabaseEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest + * @static + * @param {google.cloud.clouddms.v1.IDescribeDatabaseEntitiesRequest} message DescribeDatabaseEntitiesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescribeDatabaseEntitiesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescribeDatabaseEntitiesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest} DescribeDatabaseEntitiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescribeDatabaseEntitiesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.conversionWorkspace = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } + case 6: { + message.tree = reader.int32(); + break; + } + case 11: { + message.uncommitted = reader.bool(); + break; + } + case 12: { + message.commitId = reader.string(); + break; + } + case 13: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescribeDatabaseEntitiesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest} DescribeDatabaseEntitiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescribeDatabaseEntitiesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescribeDatabaseEntitiesRequest message. + * @function verify + * @memberof google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescribeDatabaseEntitiesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.conversionWorkspace != null && message.hasOwnProperty("conversionWorkspace")) + if (!$util.isString(message.conversionWorkspace)) + return "conversionWorkspace: 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.tree != null && message.hasOwnProperty("tree")) + switch (message.tree) { + default: + return "tree: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.uncommitted != null && message.hasOwnProperty("uncommitted")) + if (typeof message.uncommitted !== "boolean") + return "uncommitted: boolean expected"; + if (message.commitId != null && message.hasOwnProperty("commitId")) + if (!$util.isString(message.commitId)) + return "commitId: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a DescribeDatabaseEntitiesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest} DescribeDatabaseEntitiesRequest + */ + DescribeDatabaseEntitiesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest) + return object; + var message = new $root.google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest(); + if (object.conversionWorkspace != null) + message.conversionWorkspace = String(object.conversionWorkspace); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + switch (object.tree) { + default: + if (typeof object.tree === "number") { + message.tree = object.tree; + break; + } + break; + case "DB_TREE_TYPE_UNSPECIFIED": + case 0: + message.tree = 0; + break; + case "SOURCE_TREE": + case 1: + message.tree = 1; + break; + case "DRAFT_TREE": + case 2: + message.tree = 2; + break; + case "DESTINATION_TREE": + case 3: + message.tree = 3; + break; + } + if (object.uncommitted != null) + message.uncommitted = Boolean(object.uncommitted); + if (object.commitId != null) + message.commitId = String(object.commitId); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a DescribeDatabaseEntitiesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest + * @static + * @param {google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest} message DescribeDatabaseEntitiesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescribeDatabaseEntitiesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.conversionWorkspace = ""; + object.pageSize = 0; + object.pageToken = ""; + object.tree = options.enums === String ? "DB_TREE_TYPE_UNSPECIFIED" : 0; + object.uncommitted = false; + object.commitId = ""; + object.filter = ""; + } + if (message.conversionWorkspace != null && message.hasOwnProperty("conversionWorkspace")) + object.conversionWorkspace = message.conversionWorkspace; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.tree != null && message.hasOwnProperty("tree")) + object.tree = options.enums === String ? $root.google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest.DBTreeType[message.tree] === undefined ? message.tree : $root.google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest.DBTreeType[message.tree] : message.tree; + if (message.uncommitted != null && message.hasOwnProperty("uncommitted")) + object.uncommitted = message.uncommitted; + if (message.commitId != null && message.hasOwnProperty("commitId")) + object.commitId = message.commitId; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this DescribeDatabaseEntitiesRequest to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest + * @instance + * @returns {Object.} JSON object + */ + DescribeDatabaseEntitiesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescribeDatabaseEntitiesRequest + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescribeDatabaseEntitiesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest"; + }; + + /** + * DBTreeType enum. + * @name google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest.DBTreeType + * @enum {number} + * @property {number} DB_TREE_TYPE_UNSPECIFIED=0 DB_TREE_TYPE_UNSPECIFIED value + * @property {number} SOURCE_TREE=1 SOURCE_TREE value + * @property {number} DRAFT_TREE=2 DRAFT_TREE value + * @property {number} DESTINATION_TREE=3 DESTINATION_TREE value + */ + DescribeDatabaseEntitiesRequest.DBTreeType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DB_TREE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SOURCE_TREE"] = 1; + values[valuesById[2] = "DRAFT_TREE"] = 2; + values[valuesById[3] = "DESTINATION_TREE"] = 3; + return values; + })(); + + return DescribeDatabaseEntitiesRequest; + })(); + + v1.DescribeDatabaseEntitiesResponse = (function() { + + /** + * Properties of a DescribeDatabaseEntitiesResponse. + * @memberof google.cloud.clouddms.v1 + * @interface IDescribeDatabaseEntitiesResponse + * @property {Array.|null} [databaseEntities] DescribeDatabaseEntitiesResponse databaseEntities + * @property {string|null} [nextPageToken] DescribeDatabaseEntitiesResponse nextPageToken + */ + + /** + * Constructs a new DescribeDatabaseEntitiesResponse. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a DescribeDatabaseEntitiesResponse. + * @implements IDescribeDatabaseEntitiesResponse + * @constructor + * @param {google.cloud.clouddms.v1.IDescribeDatabaseEntitiesResponse=} [properties] Properties to set + */ + function DescribeDatabaseEntitiesResponse(properties) { + this.databaseEntities = []; + 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]]; + } + + /** + * DescribeDatabaseEntitiesResponse databaseEntities. + * @member {Array.} databaseEntities + * @memberof google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse + * @instance + */ + DescribeDatabaseEntitiesResponse.prototype.databaseEntities = $util.emptyArray; + + /** + * DescribeDatabaseEntitiesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse + * @instance + */ + DescribeDatabaseEntitiesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new DescribeDatabaseEntitiesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse + * @static + * @param {google.cloud.clouddms.v1.IDescribeDatabaseEntitiesResponse=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse} DescribeDatabaseEntitiesResponse instance + */ + DescribeDatabaseEntitiesResponse.create = function create(properties) { + return new DescribeDatabaseEntitiesResponse(properties); + }; + + /** + * Encodes the specified DescribeDatabaseEntitiesResponse message. Does not implicitly {@link google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse + * @static + * @param {google.cloud.clouddms.v1.IDescribeDatabaseEntitiesResponse} message DescribeDatabaseEntitiesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescribeDatabaseEntitiesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.databaseEntities != null && message.databaseEntities.length) + for (var i = 0; i < message.databaseEntities.length; ++i) + $root.google.cloud.clouddms.v1.DatabaseEntity.encode(message.databaseEntities[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 DescribeDatabaseEntitiesResponse message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse + * @static + * @param {google.cloud.clouddms.v1.IDescribeDatabaseEntitiesResponse} message DescribeDatabaseEntitiesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescribeDatabaseEntitiesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescribeDatabaseEntitiesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse} DescribeDatabaseEntitiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescribeDatabaseEntitiesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.databaseEntities && message.databaseEntities.length)) + message.databaseEntities = []; + message.databaseEntities.push($root.google.cloud.clouddms.v1.DatabaseEntity.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescribeDatabaseEntitiesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse} DescribeDatabaseEntitiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescribeDatabaseEntitiesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescribeDatabaseEntitiesResponse message. + * @function verify + * @memberof google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescribeDatabaseEntitiesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.databaseEntities != null && message.hasOwnProperty("databaseEntities")) { + if (!Array.isArray(message.databaseEntities)) + return "databaseEntities: array expected"; + for (var i = 0; i < message.databaseEntities.length; ++i) { + var error = $root.google.cloud.clouddms.v1.DatabaseEntity.verify(message.databaseEntities[i]); + if (error) + return "databaseEntities." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a DescribeDatabaseEntitiesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse} DescribeDatabaseEntitiesResponse + */ + DescribeDatabaseEntitiesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse) + return object; + var message = new $root.google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse(); + if (object.databaseEntities) { + if (!Array.isArray(object.databaseEntities)) + throw TypeError(".google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse.databaseEntities: array expected"); + message.databaseEntities = []; + for (var i = 0; i < object.databaseEntities.length; ++i) { + if (typeof object.databaseEntities[i] !== "object") + throw TypeError(".google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse.databaseEntities: object expected"); + message.databaseEntities[i] = $root.google.cloud.clouddms.v1.DatabaseEntity.fromObject(object.databaseEntities[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a DescribeDatabaseEntitiesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse + * @static + * @param {google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse} message DescribeDatabaseEntitiesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescribeDatabaseEntitiesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.databaseEntities = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.databaseEntities && message.databaseEntities.length) { + object.databaseEntities = []; + for (var j = 0; j < message.databaseEntities.length; ++j) + object.databaseEntities[j] = $root.google.cloud.clouddms.v1.DatabaseEntity.toObject(message.databaseEntities[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this DescribeDatabaseEntitiesResponse to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse + * @instance + * @returns {Object.} JSON object + */ + DescribeDatabaseEntitiesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescribeDatabaseEntitiesResponse + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescribeDatabaseEntitiesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse"; + }; + + return DescribeDatabaseEntitiesResponse; + })(); + + v1.SearchBackgroundJobsRequest = (function() { + + /** + * Properties of a SearchBackgroundJobsRequest. + * @memberof google.cloud.clouddms.v1 + * @interface ISearchBackgroundJobsRequest + * @property {string|null} [conversionWorkspace] SearchBackgroundJobsRequest conversionWorkspace + * @property {boolean|null} [returnMostRecentPerJobType] SearchBackgroundJobsRequest returnMostRecentPerJobType + * @property {number|null} [maxSize] SearchBackgroundJobsRequest maxSize + * @property {google.protobuf.ITimestamp|null} [completedUntilTime] SearchBackgroundJobsRequest completedUntilTime + */ + + /** + * Constructs a new SearchBackgroundJobsRequest. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a SearchBackgroundJobsRequest. + * @implements ISearchBackgroundJobsRequest + * @constructor + * @param {google.cloud.clouddms.v1.ISearchBackgroundJobsRequest=} [properties] Properties to set + */ + function SearchBackgroundJobsRequest(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]]; + } + + /** + * SearchBackgroundJobsRequest conversionWorkspace. + * @member {string} conversionWorkspace + * @memberof google.cloud.clouddms.v1.SearchBackgroundJobsRequest + * @instance + */ + SearchBackgroundJobsRequest.prototype.conversionWorkspace = ""; + + /** + * SearchBackgroundJobsRequest returnMostRecentPerJobType. + * @member {boolean} returnMostRecentPerJobType + * @memberof google.cloud.clouddms.v1.SearchBackgroundJobsRequest + * @instance + */ + SearchBackgroundJobsRequest.prototype.returnMostRecentPerJobType = false; + + /** + * SearchBackgroundJobsRequest maxSize. + * @member {number} maxSize + * @memberof google.cloud.clouddms.v1.SearchBackgroundJobsRequest + * @instance + */ + SearchBackgroundJobsRequest.prototype.maxSize = 0; + + /** + * SearchBackgroundJobsRequest completedUntilTime. + * @member {google.protobuf.ITimestamp|null|undefined} completedUntilTime + * @memberof google.cloud.clouddms.v1.SearchBackgroundJobsRequest + * @instance + */ + SearchBackgroundJobsRequest.prototype.completedUntilTime = null; + + /** + * Creates a new SearchBackgroundJobsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.SearchBackgroundJobsRequest + * @static + * @param {google.cloud.clouddms.v1.ISearchBackgroundJobsRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.SearchBackgroundJobsRequest} SearchBackgroundJobsRequest instance + */ + SearchBackgroundJobsRequest.create = function create(properties) { + return new SearchBackgroundJobsRequest(properties); + }; + + /** + * Encodes the specified SearchBackgroundJobsRequest message. Does not implicitly {@link google.cloud.clouddms.v1.SearchBackgroundJobsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.SearchBackgroundJobsRequest + * @static + * @param {google.cloud.clouddms.v1.ISearchBackgroundJobsRequest} message SearchBackgroundJobsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchBackgroundJobsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conversionWorkspace != null && Object.hasOwnProperty.call(message, "conversionWorkspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversionWorkspace); + if (message.returnMostRecentPerJobType != null && Object.hasOwnProperty.call(message, "returnMostRecentPerJobType")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.returnMostRecentPerJobType); + if (message.maxSize != null && Object.hasOwnProperty.call(message, "maxSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.maxSize); + if (message.completedUntilTime != null && Object.hasOwnProperty.call(message, "completedUntilTime")) + $root.google.protobuf.Timestamp.encode(message.completedUntilTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SearchBackgroundJobsRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.SearchBackgroundJobsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.SearchBackgroundJobsRequest + * @static + * @param {google.cloud.clouddms.v1.ISearchBackgroundJobsRequest} message SearchBackgroundJobsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchBackgroundJobsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchBackgroundJobsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.SearchBackgroundJobsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.SearchBackgroundJobsRequest} SearchBackgroundJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchBackgroundJobsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.SearchBackgroundJobsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.conversionWorkspace = reader.string(); + break; + } + case 2: { + message.returnMostRecentPerJobType = reader.bool(); + break; + } + case 3: { + message.maxSize = reader.int32(); + break; + } + case 4: { + message.completedUntilTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchBackgroundJobsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.SearchBackgroundJobsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.SearchBackgroundJobsRequest} SearchBackgroundJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchBackgroundJobsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchBackgroundJobsRequest message. + * @function verify + * @memberof google.cloud.clouddms.v1.SearchBackgroundJobsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchBackgroundJobsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.conversionWorkspace != null && message.hasOwnProperty("conversionWorkspace")) + if (!$util.isString(message.conversionWorkspace)) + return "conversionWorkspace: string expected"; + if (message.returnMostRecentPerJobType != null && message.hasOwnProperty("returnMostRecentPerJobType")) + if (typeof message.returnMostRecentPerJobType !== "boolean") + return "returnMostRecentPerJobType: boolean expected"; + if (message.maxSize != null && message.hasOwnProperty("maxSize")) + if (!$util.isInteger(message.maxSize)) + return "maxSize: integer expected"; + if (message.completedUntilTime != null && message.hasOwnProperty("completedUntilTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.completedUntilTime); + if (error) + return "completedUntilTime." + error; + } + return null; + }; + + /** + * Creates a SearchBackgroundJobsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.SearchBackgroundJobsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.SearchBackgroundJobsRequest} SearchBackgroundJobsRequest + */ + SearchBackgroundJobsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.SearchBackgroundJobsRequest) + return object; + var message = new $root.google.cloud.clouddms.v1.SearchBackgroundJobsRequest(); + if (object.conversionWorkspace != null) + message.conversionWorkspace = String(object.conversionWorkspace); + if (object.returnMostRecentPerJobType != null) + message.returnMostRecentPerJobType = Boolean(object.returnMostRecentPerJobType); + if (object.maxSize != null) + message.maxSize = object.maxSize | 0; + if (object.completedUntilTime != null) { + if (typeof object.completedUntilTime !== "object") + throw TypeError(".google.cloud.clouddms.v1.SearchBackgroundJobsRequest.completedUntilTime: object expected"); + message.completedUntilTime = $root.google.protobuf.Timestamp.fromObject(object.completedUntilTime); + } + return message; + }; + + /** + * Creates a plain object from a SearchBackgroundJobsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.SearchBackgroundJobsRequest + * @static + * @param {google.cloud.clouddms.v1.SearchBackgroundJobsRequest} message SearchBackgroundJobsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchBackgroundJobsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.conversionWorkspace = ""; + object.returnMostRecentPerJobType = false; + object.maxSize = 0; + object.completedUntilTime = null; + } + if (message.conversionWorkspace != null && message.hasOwnProperty("conversionWorkspace")) + object.conversionWorkspace = message.conversionWorkspace; + if (message.returnMostRecentPerJobType != null && message.hasOwnProperty("returnMostRecentPerJobType")) + object.returnMostRecentPerJobType = message.returnMostRecentPerJobType; + if (message.maxSize != null && message.hasOwnProperty("maxSize")) + object.maxSize = message.maxSize; + if (message.completedUntilTime != null && message.hasOwnProperty("completedUntilTime")) + object.completedUntilTime = $root.google.protobuf.Timestamp.toObject(message.completedUntilTime, options); + return object; + }; + + /** + * Converts this SearchBackgroundJobsRequest to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.SearchBackgroundJobsRequest + * @instance + * @returns {Object.} JSON object + */ + SearchBackgroundJobsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchBackgroundJobsRequest + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.SearchBackgroundJobsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchBackgroundJobsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.SearchBackgroundJobsRequest"; + }; + + return SearchBackgroundJobsRequest; + })(); + + v1.SearchBackgroundJobsResponse = (function() { + + /** + * Properties of a SearchBackgroundJobsResponse. + * @memberof google.cloud.clouddms.v1 + * @interface ISearchBackgroundJobsResponse + * @property {Array.|null} [jobs] SearchBackgroundJobsResponse jobs + */ + + /** + * Constructs a new SearchBackgroundJobsResponse. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a SearchBackgroundJobsResponse. + * @implements ISearchBackgroundJobsResponse + * @constructor + * @param {google.cloud.clouddms.v1.ISearchBackgroundJobsResponse=} [properties] Properties to set + */ + function SearchBackgroundJobsResponse(properties) { + this.jobs = []; + 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]]; + } + + /** + * SearchBackgroundJobsResponse jobs. + * @member {Array.} jobs + * @memberof google.cloud.clouddms.v1.SearchBackgroundJobsResponse + * @instance + */ + SearchBackgroundJobsResponse.prototype.jobs = $util.emptyArray; + + /** + * Creates a new SearchBackgroundJobsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.SearchBackgroundJobsResponse + * @static + * @param {google.cloud.clouddms.v1.ISearchBackgroundJobsResponse=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.SearchBackgroundJobsResponse} SearchBackgroundJobsResponse instance + */ + SearchBackgroundJobsResponse.create = function create(properties) { + return new SearchBackgroundJobsResponse(properties); + }; + + /** + * Encodes the specified SearchBackgroundJobsResponse message. Does not implicitly {@link google.cloud.clouddms.v1.SearchBackgroundJobsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.SearchBackgroundJobsResponse + * @static + * @param {google.cloud.clouddms.v1.ISearchBackgroundJobsResponse} message SearchBackgroundJobsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchBackgroundJobsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.jobs != null && message.jobs.length) + for (var i = 0; i < message.jobs.length; ++i) + $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.encode(message.jobs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SearchBackgroundJobsResponse message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.SearchBackgroundJobsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.SearchBackgroundJobsResponse + * @static + * @param {google.cloud.clouddms.v1.ISearchBackgroundJobsResponse} message SearchBackgroundJobsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchBackgroundJobsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchBackgroundJobsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.SearchBackgroundJobsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.SearchBackgroundJobsResponse} SearchBackgroundJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchBackgroundJobsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.SearchBackgroundJobsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.jobs && message.jobs.length)) + message.jobs = []; + message.jobs.push($root.google.cloud.clouddms.v1.BackgroundJobLogEntry.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchBackgroundJobsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.SearchBackgroundJobsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.SearchBackgroundJobsResponse} SearchBackgroundJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchBackgroundJobsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchBackgroundJobsResponse message. + * @function verify + * @memberof google.cloud.clouddms.v1.SearchBackgroundJobsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchBackgroundJobsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.jobs != null && message.hasOwnProperty("jobs")) { + if (!Array.isArray(message.jobs)) + return "jobs: array expected"; + for (var i = 0; i < message.jobs.length; ++i) { + var error = $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.verify(message.jobs[i]); + if (error) + return "jobs." + error; + } + } + return null; + }; + + /** + * Creates a SearchBackgroundJobsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.SearchBackgroundJobsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.SearchBackgroundJobsResponse} SearchBackgroundJobsResponse + */ + SearchBackgroundJobsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.SearchBackgroundJobsResponse) + return object; + var message = new $root.google.cloud.clouddms.v1.SearchBackgroundJobsResponse(); + if (object.jobs) { + if (!Array.isArray(object.jobs)) + throw TypeError(".google.cloud.clouddms.v1.SearchBackgroundJobsResponse.jobs: array expected"); + message.jobs = []; + for (var i = 0; i < object.jobs.length; ++i) { + if (typeof object.jobs[i] !== "object") + throw TypeError(".google.cloud.clouddms.v1.SearchBackgroundJobsResponse.jobs: object expected"); + message.jobs[i] = $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.fromObject(object.jobs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SearchBackgroundJobsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.SearchBackgroundJobsResponse + * @static + * @param {google.cloud.clouddms.v1.SearchBackgroundJobsResponse} message SearchBackgroundJobsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchBackgroundJobsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.jobs = []; + if (message.jobs && message.jobs.length) { + object.jobs = []; + for (var j = 0; j < message.jobs.length; ++j) + object.jobs[j] = $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.toObject(message.jobs[j], options); + } + return object; + }; + + /** + * Converts this SearchBackgroundJobsResponse to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.SearchBackgroundJobsResponse + * @instance + * @returns {Object.} JSON object + */ + SearchBackgroundJobsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchBackgroundJobsResponse + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.SearchBackgroundJobsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchBackgroundJobsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.SearchBackgroundJobsResponse"; + }; + + return SearchBackgroundJobsResponse; + })(); + + v1.DescribeConversionWorkspaceRevisionsRequest = (function() { + + /** + * Properties of a DescribeConversionWorkspaceRevisionsRequest. + * @memberof google.cloud.clouddms.v1 + * @interface IDescribeConversionWorkspaceRevisionsRequest + * @property {string|null} [conversionWorkspace] DescribeConversionWorkspaceRevisionsRequest conversionWorkspace + * @property {string|null} [commitId] DescribeConversionWorkspaceRevisionsRequest commitId + */ + + /** + * Constructs a new DescribeConversionWorkspaceRevisionsRequest. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a DescribeConversionWorkspaceRevisionsRequest. + * @implements IDescribeConversionWorkspaceRevisionsRequest + * @constructor + * @param {google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsRequest=} [properties] Properties to set + */ + function DescribeConversionWorkspaceRevisionsRequest(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]]; + } + + /** + * DescribeConversionWorkspaceRevisionsRequest conversionWorkspace. + * @member {string} conversionWorkspace + * @memberof google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest + * @instance + */ + DescribeConversionWorkspaceRevisionsRequest.prototype.conversionWorkspace = ""; + + /** + * DescribeConversionWorkspaceRevisionsRequest commitId. + * @member {string} commitId + * @memberof google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest + * @instance + */ + DescribeConversionWorkspaceRevisionsRequest.prototype.commitId = ""; + + /** + * Creates a new DescribeConversionWorkspaceRevisionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest + * @static + * @param {google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest} DescribeConversionWorkspaceRevisionsRequest instance + */ + DescribeConversionWorkspaceRevisionsRequest.create = function create(properties) { + return new DescribeConversionWorkspaceRevisionsRequest(properties); + }; + + /** + * Encodes the specified DescribeConversionWorkspaceRevisionsRequest message. Does not implicitly {@link google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest + * @static + * @param {google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsRequest} message DescribeConversionWorkspaceRevisionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescribeConversionWorkspaceRevisionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conversionWorkspace != null && Object.hasOwnProperty.call(message, "conversionWorkspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversionWorkspace); + if (message.commitId != null && Object.hasOwnProperty.call(message, "commitId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.commitId); + return writer; + }; + + /** + * Encodes the specified DescribeConversionWorkspaceRevisionsRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest + * @static + * @param {google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsRequest} message DescribeConversionWorkspaceRevisionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescribeConversionWorkspaceRevisionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescribeConversionWorkspaceRevisionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest} DescribeConversionWorkspaceRevisionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescribeConversionWorkspaceRevisionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.conversionWorkspace = reader.string(); + break; + } + case 2: { + message.commitId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescribeConversionWorkspaceRevisionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest} DescribeConversionWorkspaceRevisionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescribeConversionWorkspaceRevisionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescribeConversionWorkspaceRevisionsRequest message. + * @function verify + * @memberof google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescribeConversionWorkspaceRevisionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.conversionWorkspace != null && message.hasOwnProperty("conversionWorkspace")) + if (!$util.isString(message.conversionWorkspace)) + return "conversionWorkspace: string expected"; + if (message.commitId != null && message.hasOwnProperty("commitId")) + if (!$util.isString(message.commitId)) + return "commitId: string expected"; + return null; + }; + + /** + * Creates a DescribeConversionWorkspaceRevisionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest} DescribeConversionWorkspaceRevisionsRequest + */ + DescribeConversionWorkspaceRevisionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest) + return object; + var message = new $root.google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest(); + if (object.conversionWorkspace != null) + message.conversionWorkspace = String(object.conversionWorkspace); + if (object.commitId != null) + message.commitId = String(object.commitId); + return message; + }; + + /** + * Creates a plain object from a DescribeConversionWorkspaceRevisionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest + * @static + * @param {google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest} message DescribeConversionWorkspaceRevisionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescribeConversionWorkspaceRevisionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.conversionWorkspace = ""; + object.commitId = ""; + } + if (message.conversionWorkspace != null && message.hasOwnProperty("conversionWorkspace")) + object.conversionWorkspace = message.conversionWorkspace; + if (message.commitId != null && message.hasOwnProperty("commitId")) + object.commitId = message.commitId; + return object; + }; + + /** + * Converts this DescribeConversionWorkspaceRevisionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest + * @instance + * @returns {Object.} JSON object + */ + DescribeConversionWorkspaceRevisionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescribeConversionWorkspaceRevisionsRequest + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescribeConversionWorkspaceRevisionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest"; + }; + + return DescribeConversionWorkspaceRevisionsRequest; + })(); + + v1.DescribeConversionWorkspaceRevisionsResponse = (function() { + + /** + * Properties of a DescribeConversionWorkspaceRevisionsResponse. + * @memberof google.cloud.clouddms.v1 + * @interface IDescribeConversionWorkspaceRevisionsResponse + * @property {Array.|null} [revisions] DescribeConversionWorkspaceRevisionsResponse revisions + */ + + /** + * Constructs a new DescribeConversionWorkspaceRevisionsResponse. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a DescribeConversionWorkspaceRevisionsResponse. + * @implements IDescribeConversionWorkspaceRevisionsResponse + * @constructor + * @param {google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsResponse=} [properties] Properties to set + */ + function DescribeConversionWorkspaceRevisionsResponse(properties) { + this.revisions = []; + 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]]; + } + + /** + * DescribeConversionWorkspaceRevisionsResponse revisions. + * @member {Array.} revisions + * @memberof google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse + * @instance + */ + DescribeConversionWorkspaceRevisionsResponse.prototype.revisions = $util.emptyArray; + + /** + * Creates a new DescribeConversionWorkspaceRevisionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse + * @static + * @param {google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsResponse=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse} DescribeConversionWorkspaceRevisionsResponse instance + */ + DescribeConversionWorkspaceRevisionsResponse.create = function create(properties) { + return new DescribeConversionWorkspaceRevisionsResponse(properties); + }; + + /** + * Encodes the specified DescribeConversionWorkspaceRevisionsResponse message. Does not implicitly {@link google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse + * @static + * @param {google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsResponse} message DescribeConversionWorkspaceRevisionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescribeConversionWorkspaceRevisionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.revisions != null && message.revisions.length) + for (var i = 0; i < message.revisions.length; ++i) + $root.google.cloud.clouddms.v1.ConversionWorkspace.encode(message.revisions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DescribeConversionWorkspaceRevisionsResponse message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse + * @static + * @param {google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsResponse} message DescribeConversionWorkspaceRevisionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescribeConversionWorkspaceRevisionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescribeConversionWorkspaceRevisionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse} DescribeConversionWorkspaceRevisionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescribeConversionWorkspaceRevisionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.revisions && message.revisions.length)) + message.revisions = []; + message.revisions.push($root.google.cloud.clouddms.v1.ConversionWorkspace.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescribeConversionWorkspaceRevisionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse} DescribeConversionWorkspaceRevisionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescribeConversionWorkspaceRevisionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescribeConversionWorkspaceRevisionsResponse message. + * @function verify + * @memberof google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescribeConversionWorkspaceRevisionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.revisions != null && message.hasOwnProperty("revisions")) { + if (!Array.isArray(message.revisions)) + return "revisions: array expected"; + for (var i = 0; i < message.revisions.length; ++i) { + var error = $root.google.cloud.clouddms.v1.ConversionWorkspace.verify(message.revisions[i]); + if (error) + return "revisions." + error; + } + } + return null; + }; + + /** + * Creates a DescribeConversionWorkspaceRevisionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse} DescribeConversionWorkspaceRevisionsResponse + */ + DescribeConversionWorkspaceRevisionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse) + return object; + var message = new $root.google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse(); + if (object.revisions) { + if (!Array.isArray(object.revisions)) + throw TypeError(".google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse.revisions: array expected"); + message.revisions = []; + for (var i = 0; i < object.revisions.length; ++i) { + if (typeof object.revisions[i] !== "object") + throw TypeError(".google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse.revisions: object expected"); + message.revisions[i] = $root.google.cloud.clouddms.v1.ConversionWorkspace.fromObject(object.revisions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a DescribeConversionWorkspaceRevisionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse + * @static + * @param {google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse} message DescribeConversionWorkspaceRevisionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescribeConversionWorkspaceRevisionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.revisions = []; + if (message.revisions && message.revisions.length) { + object.revisions = []; + for (var j = 0; j < message.revisions.length; ++j) + object.revisions[j] = $root.google.cloud.clouddms.v1.ConversionWorkspace.toObject(message.revisions[j], options); + } + return object; + }; + + /** + * Converts this DescribeConversionWorkspaceRevisionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse + * @instance + * @returns {Object.} JSON object + */ + DescribeConversionWorkspaceRevisionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescribeConversionWorkspaceRevisionsResponse + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescribeConversionWorkspaceRevisionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse"; + }; + + return DescribeConversionWorkspaceRevisionsResponse; + })(); + + v1.FetchStaticIpsRequest = (function() { + + /** + * Properties of a FetchStaticIpsRequest. + * @memberof google.cloud.clouddms.v1 + * @interface IFetchStaticIpsRequest + * @property {string|null} [name] FetchStaticIpsRequest name + * @property {number|null} [pageSize] FetchStaticIpsRequest pageSize + * @property {string|null} [pageToken] FetchStaticIpsRequest pageToken + */ + + /** + * Constructs a new FetchStaticIpsRequest. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a FetchStaticIpsRequest. + * @implements IFetchStaticIpsRequest + * @constructor + * @param {google.cloud.clouddms.v1.IFetchStaticIpsRequest=} [properties] Properties to set + */ + function FetchStaticIpsRequest(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]]; + } + + /** + * FetchStaticIpsRequest name. + * @member {string} name + * @memberof google.cloud.clouddms.v1.FetchStaticIpsRequest + * @instance + */ + FetchStaticIpsRequest.prototype.name = ""; + + /** + * FetchStaticIpsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.clouddms.v1.FetchStaticIpsRequest + * @instance + */ + FetchStaticIpsRequest.prototype.pageSize = 0; + + /** + * FetchStaticIpsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.clouddms.v1.FetchStaticIpsRequest + * @instance + */ + FetchStaticIpsRequest.prototype.pageToken = ""; + + /** + * Creates a new FetchStaticIpsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.FetchStaticIpsRequest + * @static + * @param {google.cloud.clouddms.v1.IFetchStaticIpsRequest=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.FetchStaticIpsRequest} FetchStaticIpsRequest instance + */ + FetchStaticIpsRequest.create = function create(properties) { + return new FetchStaticIpsRequest(properties); + }; + + /** + * Encodes the specified FetchStaticIpsRequest message. Does not implicitly {@link google.cloud.clouddms.v1.FetchStaticIpsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.FetchStaticIpsRequest + * @static + * @param {google.cloud.clouddms.v1.IFetchStaticIpsRequest} message FetchStaticIpsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchStaticIpsRequest.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.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); + return writer; + }; + + /** + * Encodes the specified FetchStaticIpsRequest message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.FetchStaticIpsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.FetchStaticIpsRequest + * @static + * @param {google.cloud.clouddms.v1.IFetchStaticIpsRequest} message FetchStaticIpsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchStaticIpsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchStaticIpsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.FetchStaticIpsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.FetchStaticIpsRequest} FetchStaticIpsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchStaticIpsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.FetchStaticIpsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchStaticIpsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.FetchStaticIpsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.FetchStaticIpsRequest} FetchStaticIpsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchStaticIpsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchStaticIpsRequest message. + * @function verify + * @memberof google.cloud.clouddms.v1.FetchStaticIpsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchStaticIpsRequest.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.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"; + return null; + }; + + /** + * Creates a FetchStaticIpsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.FetchStaticIpsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.FetchStaticIpsRequest} FetchStaticIpsRequest + */ + FetchStaticIpsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.FetchStaticIpsRequest) + return object; + var message = new $root.google.cloud.clouddms.v1.FetchStaticIpsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a FetchStaticIpsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.FetchStaticIpsRequest + * @static + * @param {google.cloud.clouddms.v1.FetchStaticIpsRequest} message FetchStaticIpsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchStaticIpsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this FetchStaticIpsRequest to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.FetchStaticIpsRequest + * @instance + * @returns {Object.} JSON object + */ + FetchStaticIpsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchStaticIpsRequest + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.FetchStaticIpsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchStaticIpsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.FetchStaticIpsRequest"; + }; + + return FetchStaticIpsRequest; + })(); + + v1.FetchStaticIpsResponse = (function() { + + /** + * Properties of a FetchStaticIpsResponse. + * @memberof google.cloud.clouddms.v1 + * @interface IFetchStaticIpsResponse + * @property {Array.|null} [staticIps] FetchStaticIpsResponse staticIps + * @property {string|null} [nextPageToken] FetchStaticIpsResponse nextPageToken + */ + + /** + * Constructs a new FetchStaticIpsResponse. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a FetchStaticIpsResponse. + * @implements IFetchStaticIpsResponse + * @constructor + * @param {google.cloud.clouddms.v1.IFetchStaticIpsResponse=} [properties] Properties to set + */ + function FetchStaticIpsResponse(properties) { + this.staticIps = []; + 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]]; + } + + /** + * FetchStaticIpsResponse staticIps. + * @member {Array.} staticIps + * @memberof google.cloud.clouddms.v1.FetchStaticIpsResponse + * @instance + */ + FetchStaticIpsResponse.prototype.staticIps = $util.emptyArray; + + /** + * FetchStaticIpsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.clouddms.v1.FetchStaticIpsResponse + * @instance + */ + FetchStaticIpsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new FetchStaticIpsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.FetchStaticIpsResponse + * @static + * @param {google.cloud.clouddms.v1.IFetchStaticIpsResponse=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.FetchStaticIpsResponse} FetchStaticIpsResponse instance + */ + FetchStaticIpsResponse.create = function create(properties) { + return new FetchStaticIpsResponse(properties); + }; + + /** + * Encodes the specified FetchStaticIpsResponse message. Does not implicitly {@link google.cloud.clouddms.v1.FetchStaticIpsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.FetchStaticIpsResponse + * @static + * @param {google.cloud.clouddms.v1.IFetchStaticIpsResponse} message FetchStaticIpsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchStaticIpsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.staticIps != null && message.staticIps.length) + for (var i = 0; i < message.staticIps.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.staticIps[i]); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified FetchStaticIpsResponse message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.FetchStaticIpsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.FetchStaticIpsResponse + * @static + * @param {google.cloud.clouddms.v1.IFetchStaticIpsResponse} message FetchStaticIpsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchStaticIpsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchStaticIpsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.FetchStaticIpsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.FetchStaticIpsResponse} FetchStaticIpsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchStaticIpsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.FetchStaticIpsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.staticIps && message.staticIps.length)) + message.staticIps = []; + message.staticIps.push(reader.string()); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchStaticIpsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.FetchStaticIpsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.FetchStaticIpsResponse} FetchStaticIpsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchStaticIpsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchStaticIpsResponse message. + * @function verify + * @memberof google.cloud.clouddms.v1.FetchStaticIpsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchStaticIpsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.staticIps != null && message.hasOwnProperty("staticIps")) { + if (!Array.isArray(message.staticIps)) + return "staticIps: array expected"; + for (var i = 0; i < message.staticIps.length; ++i) + if (!$util.isString(message.staticIps[i])) + return "staticIps: string[] expected"; + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a FetchStaticIpsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.FetchStaticIpsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.FetchStaticIpsResponse} FetchStaticIpsResponse + */ + FetchStaticIpsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.FetchStaticIpsResponse) + return object; + var message = new $root.google.cloud.clouddms.v1.FetchStaticIpsResponse(); + if (object.staticIps) { + if (!Array.isArray(object.staticIps)) + throw TypeError(".google.cloud.clouddms.v1.FetchStaticIpsResponse.staticIps: array expected"); + message.staticIps = []; + for (var i = 0; i < object.staticIps.length; ++i) + message.staticIps[i] = String(object.staticIps[i]); + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a FetchStaticIpsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.FetchStaticIpsResponse + * @static + * @param {google.cloud.clouddms.v1.FetchStaticIpsResponse} message FetchStaticIpsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchStaticIpsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.staticIps = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.staticIps && message.staticIps.length) { + object.staticIps = []; + for (var j = 0; j < message.staticIps.length; ++j) + object.staticIps[j] = message.staticIps[j]; + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this FetchStaticIpsResponse to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.FetchStaticIpsResponse + * @instance + * @returns {Object.} JSON object + */ + FetchStaticIpsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchStaticIpsResponse + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.FetchStaticIpsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchStaticIpsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.FetchStaticIpsResponse"; + }; + + return FetchStaticIpsResponse; + })(); + + v1.SslConfig = (function() { + + /** + * Properties of a SslConfig. + * @memberof google.cloud.clouddms.v1 + * @interface ISslConfig + * @property {google.cloud.clouddms.v1.SslConfig.SslType|null} [type] SslConfig type + * @property {string|null} [clientKey] SslConfig clientKey + * @property {string|null} [clientCertificate] SslConfig clientCertificate + * @property {string|null} [caCertificate] SslConfig caCertificate + */ + + /** + * Constructs a new SslConfig. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a SslConfig. + * @implements ISslConfig + * @constructor + * @param {google.cloud.clouddms.v1.ISslConfig=} [properties] Properties to set + */ + function SslConfig(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]]; + } + + /** + * SslConfig type. + * @member {google.cloud.clouddms.v1.SslConfig.SslType} type + * @memberof google.cloud.clouddms.v1.SslConfig + * @instance + */ + SslConfig.prototype.type = 0; + + /** + * SslConfig clientKey. + * @member {string} clientKey + * @memberof google.cloud.clouddms.v1.SslConfig + * @instance + */ + SslConfig.prototype.clientKey = ""; + + /** + * SslConfig clientCertificate. + * @member {string} clientCertificate + * @memberof google.cloud.clouddms.v1.SslConfig + * @instance + */ + SslConfig.prototype.clientCertificate = ""; + + /** + * SslConfig caCertificate. + * @member {string} caCertificate + * @memberof google.cloud.clouddms.v1.SslConfig + * @instance + */ + SslConfig.prototype.caCertificate = ""; + + /** + * Creates a new SslConfig instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.SslConfig + * @static + * @param {google.cloud.clouddms.v1.ISslConfig=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.SslConfig} SslConfig instance + */ + SslConfig.create = function create(properties) { + return new SslConfig(properties); + }; + + /** + * Encodes the specified SslConfig message. Does not implicitly {@link google.cloud.clouddms.v1.SslConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.SslConfig + * @static + * @param {google.cloud.clouddms.v1.ISslConfig} message SslConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SslConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.clientKey != null && Object.hasOwnProperty.call(message, "clientKey")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.clientKey); + if (message.clientCertificate != null && Object.hasOwnProperty.call(message, "clientCertificate")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clientCertificate); + if (message.caCertificate != null && Object.hasOwnProperty.call(message, "caCertificate")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.caCertificate); + return writer; + }; + + /** + * Encodes the specified SslConfig message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.SslConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.SslConfig + * @static + * @param {google.cloud.clouddms.v1.ISslConfig} message SslConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SslConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SslConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.SslConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.SslConfig} SslConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SslConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.SslConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + message.clientKey = reader.string(); + break; + } + case 3: { + message.clientCertificate = reader.string(); + break; + } + case 4: { + message.caCertificate = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SslConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.SslConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.SslConfig} SslConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SslConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SslConfig message. + * @function verify + * @memberof google.cloud.clouddms.v1.SslConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SslConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.clientKey != null && message.hasOwnProperty("clientKey")) + if (!$util.isString(message.clientKey)) + return "clientKey: string expected"; + if (message.clientCertificate != null && message.hasOwnProperty("clientCertificate")) + if (!$util.isString(message.clientCertificate)) + return "clientCertificate: string expected"; + if (message.caCertificate != null && message.hasOwnProperty("caCertificate")) + if (!$util.isString(message.caCertificate)) + return "caCertificate: string expected"; + return null; + }; + + /** + * Creates a SslConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.SslConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.SslConfig} SslConfig + */ + SslConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.SslConfig) + return object; + var message = new $root.google.cloud.clouddms.v1.SslConfig(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "SSL_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "SERVER_ONLY": + case 1: + message.type = 1; + break; + case "SERVER_CLIENT": + case 2: + message.type = 2; + break; + } + if (object.clientKey != null) + message.clientKey = String(object.clientKey); + if (object.clientCertificate != null) + message.clientCertificate = String(object.clientCertificate); + if (object.caCertificate != null) + message.caCertificate = String(object.caCertificate); + return message; + }; + + /** + * Creates a plain object from a SslConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.SslConfig + * @static + * @param {google.cloud.clouddms.v1.SslConfig} message SslConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SslConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "SSL_TYPE_UNSPECIFIED" : 0; + object.clientKey = ""; + object.clientCertificate = ""; + object.caCertificate = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.clouddms.v1.SslConfig.SslType[message.type] === undefined ? message.type : $root.google.cloud.clouddms.v1.SslConfig.SslType[message.type] : message.type; + if (message.clientKey != null && message.hasOwnProperty("clientKey")) + object.clientKey = message.clientKey; + if (message.clientCertificate != null && message.hasOwnProperty("clientCertificate")) + object.clientCertificate = message.clientCertificate; + if (message.caCertificate != null && message.hasOwnProperty("caCertificate")) + object.caCertificate = message.caCertificate; + return object; + }; + + /** + * Converts this SslConfig to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.SslConfig + * @instance + * @returns {Object.} JSON object + */ + SslConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SslConfig + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.SslConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SslConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.SslConfig"; + }; + + /** + * SslType enum. + * @name google.cloud.clouddms.v1.SslConfig.SslType + * @enum {number} + * @property {number} SSL_TYPE_UNSPECIFIED=0 SSL_TYPE_UNSPECIFIED value + * @property {number} SERVER_ONLY=1 SERVER_ONLY value + * @property {number} SERVER_CLIENT=2 SERVER_CLIENT value + */ + SslConfig.SslType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SSL_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SERVER_ONLY"] = 1; + values[valuesById[2] = "SERVER_CLIENT"] = 2; + return values; + })(); + + return SslConfig; + })(); + + v1.MySqlConnectionProfile = (function() { + + /** + * Properties of a MySqlConnectionProfile. + * @memberof google.cloud.clouddms.v1 + * @interface IMySqlConnectionProfile + * @property {string|null} [host] MySqlConnectionProfile host + * @property {number|null} [port] MySqlConnectionProfile port + * @property {string|null} [username] MySqlConnectionProfile username + * @property {string|null} [password] MySqlConnectionProfile password + * @property {boolean|null} [passwordSet] MySqlConnectionProfile passwordSet + * @property {google.cloud.clouddms.v1.ISslConfig|null} [ssl] MySqlConnectionProfile ssl + * @property {string|null} [cloudSqlId] MySqlConnectionProfile cloudSqlId + */ + + /** + * Constructs a new MySqlConnectionProfile. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a MySqlConnectionProfile. + * @implements IMySqlConnectionProfile + * @constructor + * @param {google.cloud.clouddms.v1.IMySqlConnectionProfile=} [properties] Properties to set + */ + function MySqlConnectionProfile(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]]; + } + + /** + * MySqlConnectionProfile host. + * @member {string} host + * @memberof google.cloud.clouddms.v1.MySqlConnectionProfile + * @instance + */ + MySqlConnectionProfile.prototype.host = ""; + + /** + * MySqlConnectionProfile port. + * @member {number} port + * @memberof google.cloud.clouddms.v1.MySqlConnectionProfile + * @instance + */ + MySqlConnectionProfile.prototype.port = 0; + + /** + * MySqlConnectionProfile username. + * @member {string} username + * @memberof google.cloud.clouddms.v1.MySqlConnectionProfile + * @instance + */ + MySqlConnectionProfile.prototype.username = ""; + + /** + * MySqlConnectionProfile password. + * @member {string} password + * @memberof google.cloud.clouddms.v1.MySqlConnectionProfile + * @instance + */ + MySqlConnectionProfile.prototype.password = ""; + + /** + * MySqlConnectionProfile passwordSet. + * @member {boolean} passwordSet + * @memberof google.cloud.clouddms.v1.MySqlConnectionProfile + * @instance + */ + MySqlConnectionProfile.prototype.passwordSet = false; + + /** + * MySqlConnectionProfile ssl. + * @member {google.cloud.clouddms.v1.ISslConfig|null|undefined} ssl + * @memberof google.cloud.clouddms.v1.MySqlConnectionProfile + * @instance + */ + MySqlConnectionProfile.prototype.ssl = null; + + /** + * MySqlConnectionProfile cloudSqlId. + * @member {string} cloudSqlId + * @memberof google.cloud.clouddms.v1.MySqlConnectionProfile + * @instance + */ + MySqlConnectionProfile.prototype.cloudSqlId = ""; + + /** + * Creates a new MySqlConnectionProfile instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.MySqlConnectionProfile + * @static + * @param {google.cloud.clouddms.v1.IMySqlConnectionProfile=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.MySqlConnectionProfile} MySqlConnectionProfile instance + */ + MySqlConnectionProfile.create = function create(properties) { + return new MySqlConnectionProfile(properties); + }; + + /** + * Encodes the specified MySqlConnectionProfile message. Does not implicitly {@link google.cloud.clouddms.v1.MySqlConnectionProfile.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.MySqlConnectionProfile + * @static + * @param {google.cloud.clouddms.v1.IMySqlConnectionProfile} message MySqlConnectionProfile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MySqlConnectionProfile.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.host != null && Object.hasOwnProperty.call(message, "host")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.host); + if (message.port != null && Object.hasOwnProperty.call(message, "port")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.port); + if (message.username != null && Object.hasOwnProperty.call(message, "username")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.username); + if (message.password != null && Object.hasOwnProperty.call(message, "password")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.password); + if (message.passwordSet != null && Object.hasOwnProperty.call(message, "passwordSet")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.passwordSet); + if (message.ssl != null && Object.hasOwnProperty.call(message, "ssl")) + $root.google.cloud.clouddms.v1.SslConfig.encode(message.ssl, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.cloudSqlId != null && Object.hasOwnProperty.call(message, "cloudSqlId")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.cloudSqlId); + return writer; + }; + + /** + * Encodes the specified MySqlConnectionProfile message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.MySqlConnectionProfile.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.MySqlConnectionProfile + * @static + * @param {google.cloud.clouddms.v1.IMySqlConnectionProfile} message MySqlConnectionProfile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MySqlConnectionProfile.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MySqlConnectionProfile message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.MySqlConnectionProfile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.MySqlConnectionProfile} MySqlConnectionProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MySqlConnectionProfile.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.MySqlConnectionProfile(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.host = reader.string(); + break; + } + case 2: { + message.port = reader.int32(); + break; + } + case 3: { + message.username = reader.string(); + break; + } + case 4: { + message.password = reader.string(); + break; + } + case 5: { + message.passwordSet = reader.bool(); + break; + } + case 6: { + message.ssl = $root.google.cloud.clouddms.v1.SslConfig.decode(reader, reader.uint32()); + break; + } + case 7: { + message.cloudSqlId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MySqlConnectionProfile message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.MySqlConnectionProfile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.MySqlConnectionProfile} MySqlConnectionProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MySqlConnectionProfile.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MySqlConnectionProfile message. + * @function verify + * @memberof google.cloud.clouddms.v1.MySqlConnectionProfile + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MySqlConnectionProfile.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.host != null && message.hasOwnProperty("host")) + if (!$util.isString(message.host)) + return "host: string expected"; + if (message.port != null && message.hasOwnProperty("port")) + if (!$util.isInteger(message.port)) + return "port: integer expected"; + if (message.username != null && message.hasOwnProperty("username")) + if (!$util.isString(message.username)) + return "username: string expected"; + if (message.password != null && message.hasOwnProperty("password")) + if (!$util.isString(message.password)) + return "password: string expected"; + if (message.passwordSet != null && message.hasOwnProperty("passwordSet")) + if (typeof message.passwordSet !== "boolean") + return "passwordSet: boolean expected"; + if (message.ssl != null && message.hasOwnProperty("ssl")) { + var error = $root.google.cloud.clouddms.v1.SslConfig.verify(message.ssl); + if (error) + return "ssl." + error; + } + if (message.cloudSqlId != null && message.hasOwnProperty("cloudSqlId")) + if (!$util.isString(message.cloudSqlId)) + return "cloudSqlId: string expected"; + return null; + }; + + /** + * Creates a MySqlConnectionProfile message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.MySqlConnectionProfile + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.MySqlConnectionProfile} MySqlConnectionProfile + */ + MySqlConnectionProfile.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.MySqlConnectionProfile) + return object; + var message = new $root.google.cloud.clouddms.v1.MySqlConnectionProfile(); + if (object.host != null) + message.host = String(object.host); + if (object.port != null) + message.port = object.port | 0; + if (object.username != null) + message.username = String(object.username); + if (object.password != null) + message.password = String(object.password); + if (object.passwordSet != null) + message.passwordSet = Boolean(object.passwordSet); + if (object.ssl != null) { + if (typeof object.ssl !== "object") + throw TypeError(".google.cloud.clouddms.v1.MySqlConnectionProfile.ssl: object expected"); + message.ssl = $root.google.cloud.clouddms.v1.SslConfig.fromObject(object.ssl); + } + if (object.cloudSqlId != null) + message.cloudSqlId = String(object.cloudSqlId); + return message; + }; + + /** + * Creates a plain object from a MySqlConnectionProfile message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.MySqlConnectionProfile + * @static + * @param {google.cloud.clouddms.v1.MySqlConnectionProfile} message MySqlConnectionProfile + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MySqlConnectionProfile.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.host = ""; + object.port = 0; + object.username = ""; + object.password = ""; + object.passwordSet = false; + object.ssl = null; + object.cloudSqlId = ""; + } + if (message.host != null && message.hasOwnProperty("host")) + object.host = message.host; + if (message.port != null && message.hasOwnProperty("port")) + object.port = message.port; + if (message.username != null && message.hasOwnProperty("username")) + object.username = message.username; + if (message.password != null && message.hasOwnProperty("password")) + object.password = message.password; + if (message.passwordSet != null && message.hasOwnProperty("passwordSet")) + object.passwordSet = message.passwordSet; + if (message.ssl != null && message.hasOwnProperty("ssl")) + object.ssl = $root.google.cloud.clouddms.v1.SslConfig.toObject(message.ssl, options); + if (message.cloudSqlId != null && message.hasOwnProperty("cloudSqlId")) + object.cloudSqlId = message.cloudSqlId; + return object; + }; + + /** + * Converts this MySqlConnectionProfile to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.MySqlConnectionProfile + * @instance + * @returns {Object.} JSON object + */ + MySqlConnectionProfile.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MySqlConnectionProfile + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.MySqlConnectionProfile + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MySqlConnectionProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.MySqlConnectionProfile"; + }; + + return MySqlConnectionProfile; + })(); + + /** + * NetworkArchitecture enum. + * @name google.cloud.clouddms.v1.NetworkArchitecture + * @enum {number} + * @property {number} NETWORK_ARCHITECTURE_UNSPECIFIED=0 NETWORK_ARCHITECTURE_UNSPECIFIED value + * @property {number} NETWORK_ARCHITECTURE_OLD_CSQL_PRODUCER=1 NETWORK_ARCHITECTURE_OLD_CSQL_PRODUCER value + * @property {number} NETWORK_ARCHITECTURE_NEW_CSQL_PRODUCER=2 NETWORK_ARCHITECTURE_NEW_CSQL_PRODUCER value + */ + v1.NetworkArchitecture = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NETWORK_ARCHITECTURE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NETWORK_ARCHITECTURE_OLD_CSQL_PRODUCER"] = 1; + values[valuesById[2] = "NETWORK_ARCHITECTURE_NEW_CSQL_PRODUCER"] = 2; + return values; + })(); + + v1.PostgreSqlConnectionProfile = (function() { + + /** + * Properties of a PostgreSqlConnectionProfile. + * @memberof google.cloud.clouddms.v1 + * @interface IPostgreSqlConnectionProfile + * @property {string|null} [host] PostgreSqlConnectionProfile host + * @property {number|null} [port] PostgreSqlConnectionProfile port + * @property {string|null} [username] PostgreSqlConnectionProfile username + * @property {string|null} [password] PostgreSqlConnectionProfile password + * @property {boolean|null} [passwordSet] PostgreSqlConnectionProfile passwordSet + * @property {google.cloud.clouddms.v1.ISslConfig|null} [ssl] PostgreSqlConnectionProfile ssl + * @property {string|null} [cloudSqlId] PostgreSqlConnectionProfile cloudSqlId + * @property {google.cloud.clouddms.v1.NetworkArchitecture|null} [networkArchitecture] PostgreSqlConnectionProfile networkArchitecture + * @property {google.cloud.clouddms.v1.IStaticIpConnectivity|null} [staticIpConnectivity] PostgreSqlConnectionProfile staticIpConnectivity + * @property {google.cloud.clouddms.v1.IPrivateServiceConnectConnectivity|null} [privateServiceConnectConnectivity] PostgreSqlConnectionProfile privateServiceConnectConnectivity + */ + + /** + * Constructs a new PostgreSqlConnectionProfile. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a PostgreSqlConnectionProfile. + * @implements IPostgreSqlConnectionProfile + * @constructor + * @param {google.cloud.clouddms.v1.IPostgreSqlConnectionProfile=} [properties] Properties to set + */ + function PostgreSqlConnectionProfile(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]]; + } + + /** + * PostgreSqlConnectionProfile host. + * @member {string} host + * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * @instance + */ + PostgreSqlConnectionProfile.prototype.host = ""; + + /** + * PostgreSqlConnectionProfile port. + * @member {number} port + * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * @instance + */ + PostgreSqlConnectionProfile.prototype.port = 0; + + /** + * PostgreSqlConnectionProfile username. + * @member {string} username + * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * @instance + */ + PostgreSqlConnectionProfile.prototype.username = ""; + + /** + * PostgreSqlConnectionProfile password. + * @member {string} password + * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * @instance + */ + PostgreSqlConnectionProfile.prototype.password = ""; + + /** + * PostgreSqlConnectionProfile passwordSet. + * @member {boolean} passwordSet + * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * @instance + */ + PostgreSqlConnectionProfile.prototype.passwordSet = false; + + /** + * PostgreSqlConnectionProfile ssl. + * @member {google.cloud.clouddms.v1.ISslConfig|null|undefined} ssl + * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * @instance + */ + PostgreSqlConnectionProfile.prototype.ssl = null; + + /** + * PostgreSqlConnectionProfile cloudSqlId. + * @member {string} cloudSqlId + * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * @instance + */ + PostgreSqlConnectionProfile.prototype.cloudSqlId = ""; + + /** + * PostgreSqlConnectionProfile networkArchitecture. + * @member {google.cloud.clouddms.v1.NetworkArchitecture} networkArchitecture + * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * @instance + */ + PostgreSqlConnectionProfile.prototype.networkArchitecture = 0; + + /** + * PostgreSqlConnectionProfile staticIpConnectivity. + * @member {google.cloud.clouddms.v1.IStaticIpConnectivity|null|undefined} staticIpConnectivity + * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * @instance + */ + PostgreSqlConnectionProfile.prototype.staticIpConnectivity = null; + + /** + * PostgreSqlConnectionProfile privateServiceConnectConnectivity. + * @member {google.cloud.clouddms.v1.IPrivateServiceConnectConnectivity|null|undefined} privateServiceConnectConnectivity + * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * @instance + */ + PostgreSqlConnectionProfile.prototype.privateServiceConnectConnectivity = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PostgreSqlConnectionProfile connectivity. + * @member {"staticIpConnectivity"|"privateServiceConnectConnectivity"|undefined} connectivity + * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * @instance + */ + Object.defineProperty(PostgreSqlConnectionProfile.prototype, "connectivity", { + get: $util.oneOfGetter($oneOfFields = ["staticIpConnectivity", "privateServiceConnectConnectivity"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PostgreSqlConnectionProfile instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * @static + * @param {google.cloud.clouddms.v1.IPostgreSqlConnectionProfile=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.PostgreSqlConnectionProfile} PostgreSqlConnectionProfile instance + */ + PostgreSqlConnectionProfile.create = function create(properties) { + return new PostgreSqlConnectionProfile(properties); + }; + + /** + * Encodes the specified PostgreSqlConnectionProfile message. Does not implicitly {@link google.cloud.clouddms.v1.PostgreSqlConnectionProfile.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * @static + * @param {google.cloud.clouddms.v1.IPostgreSqlConnectionProfile} message PostgreSqlConnectionProfile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PostgreSqlConnectionProfile.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.host != null && Object.hasOwnProperty.call(message, "host")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.host); + if (message.port != null && Object.hasOwnProperty.call(message, "port")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.port); + if (message.username != null && Object.hasOwnProperty.call(message, "username")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.username); + if (message.password != null && Object.hasOwnProperty.call(message, "password")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.password); + if (message.passwordSet != null && Object.hasOwnProperty.call(message, "passwordSet")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.passwordSet); + if (message.ssl != null && Object.hasOwnProperty.call(message, "ssl")) + $root.google.cloud.clouddms.v1.SslConfig.encode(message.ssl, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.cloudSqlId != null && Object.hasOwnProperty.call(message, "cloudSqlId")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.cloudSqlId); + if (message.networkArchitecture != null && Object.hasOwnProperty.call(message, "networkArchitecture")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.networkArchitecture); + if (message.staticIpConnectivity != null && Object.hasOwnProperty.call(message, "staticIpConnectivity")) + $root.google.cloud.clouddms.v1.StaticIpConnectivity.encode(message.staticIpConnectivity, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.privateServiceConnectConnectivity != null && Object.hasOwnProperty.call(message, "privateServiceConnectConnectivity")) + $root.google.cloud.clouddms.v1.PrivateServiceConnectConnectivity.encode(message.privateServiceConnectConnectivity, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PostgreSqlConnectionProfile message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.PostgreSqlConnectionProfile.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * @static + * @param {google.cloud.clouddms.v1.IPostgreSqlConnectionProfile} message PostgreSqlConnectionProfile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PostgreSqlConnectionProfile.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PostgreSqlConnectionProfile message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.PostgreSqlConnectionProfile} PostgreSqlConnectionProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PostgreSqlConnectionProfile.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.PostgreSqlConnectionProfile(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.host = reader.string(); + break; + } + case 2: { + message.port = reader.int32(); + break; + } + case 3: { + message.username = reader.string(); + break; + } + case 4: { + message.password = reader.string(); + break; + } + case 5: { + message.passwordSet = reader.bool(); + break; + } + case 6: { + message.ssl = $root.google.cloud.clouddms.v1.SslConfig.decode(reader, reader.uint32()); + break; + } + case 7: { + message.cloudSqlId = reader.string(); + break; + } + case 8: { + message.networkArchitecture = reader.int32(); + break; + } + case 100: { + message.staticIpConnectivity = $root.google.cloud.clouddms.v1.StaticIpConnectivity.decode(reader, reader.uint32()); + break; + } + case 101: { + message.privateServiceConnectConnectivity = $root.google.cloud.clouddms.v1.PrivateServiceConnectConnectivity.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PostgreSqlConnectionProfile message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.PostgreSqlConnectionProfile} PostgreSqlConnectionProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PostgreSqlConnectionProfile.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PostgreSqlConnectionProfile message. + * @function verify + * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PostgreSqlConnectionProfile.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.host != null && message.hasOwnProperty("host")) + if (!$util.isString(message.host)) + return "host: string expected"; + if (message.port != null && message.hasOwnProperty("port")) + if (!$util.isInteger(message.port)) + return "port: integer expected"; + if (message.username != null && message.hasOwnProperty("username")) + if (!$util.isString(message.username)) + return "username: string expected"; + if (message.password != null && message.hasOwnProperty("password")) + if (!$util.isString(message.password)) + return "password: string expected"; + if (message.passwordSet != null && message.hasOwnProperty("passwordSet")) + if (typeof message.passwordSet !== "boolean") + return "passwordSet: boolean expected"; + if (message.ssl != null && message.hasOwnProperty("ssl")) { + var error = $root.google.cloud.clouddms.v1.SslConfig.verify(message.ssl); + if (error) + return "ssl." + error; + } + if (message.cloudSqlId != null && message.hasOwnProperty("cloudSqlId")) + if (!$util.isString(message.cloudSqlId)) + return "cloudSqlId: string expected"; + if (message.networkArchitecture != null && message.hasOwnProperty("networkArchitecture")) + switch (message.networkArchitecture) { + default: + return "networkArchitecture: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.staticIpConnectivity != null && message.hasOwnProperty("staticIpConnectivity")) { + properties.connectivity = 1; + { + var error = $root.google.cloud.clouddms.v1.StaticIpConnectivity.verify(message.staticIpConnectivity); + if (error) + return "staticIpConnectivity." + error; + } + } + if (message.privateServiceConnectConnectivity != null && message.hasOwnProperty("privateServiceConnectConnectivity")) { + if (properties.connectivity === 1) + return "connectivity: multiple values"; + properties.connectivity = 1; + { + var error = $root.google.cloud.clouddms.v1.PrivateServiceConnectConnectivity.verify(message.privateServiceConnectConnectivity); + if (error) + return "privateServiceConnectConnectivity." + error; + } + } + return null; + }; + + /** + * Creates a PostgreSqlConnectionProfile message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.PostgreSqlConnectionProfile} PostgreSqlConnectionProfile + */ + PostgreSqlConnectionProfile.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.PostgreSqlConnectionProfile) + return object; + var message = new $root.google.cloud.clouddms.v1.PostgreSqlConnectionProfile(); + if (object.host != null) + message.host = String(object.host); + if (object.port != null) + message.port = object.port | 0; + if (object.username != null) + message.username = String(object.username); + if (object.password != null) + message.password = String(object.password); + if (object.passwordSet != null) + message.passwordSet = Boolean(object.passwordSet); + if (object.ssl != null) { + if (typeof object.ssl !== "object") + throw TypeError(".google.cloud.clouddms.v1.PostgreSqlConnectionProfile.ssl: object expected"); + message.ssl = $root.google.cloud.clouddms.v1.SslConfig.fromObject(object.ssl); + } + if (object.cloudSqlId != null) + message.cloudSqlId = String(object.cloudSqlId); + switch (object.networkArchitecture) { + default: + if (typeof object.networkArchitecture === "number") { + message.networkArchitecture = object.networkArchitecture; + break; + } + break; + case "NETWORK_ARCHITECTURE_UNSPECIFIED": + case 0: + message.networkArchitecture = 0; + break; + case "NETWORK_ARCHITECTURE_OLD_CSQL_PRODUCER": + case 1: + message.networkArchitecture = 1; + break; + case "NETWORK_ARCHITECTURE_NEW_CSQL_PRODUCER": + case 2: + message.networkArchitecture = 2; + break; + } + if (object.staticIpConnectivity != null) { + if (typeof object.staticIpConnectivity !== "object") + throw TypeError(".google.cloud.clouddms.v1.PostgreSqlConnectionProfile.staticIpConnectivity: object expected"); + message.staticIpConnectivity = $root.google.cloud.clouddms.v1.StaticIpConnectivity.fromObject(object.staticIpConnectivity); + } + if (object.privateServiceConnectConnectivity != null) { + if (typeof object.privateServiceConnectConnectivity !== "object") + throw TypeError(".google.cloud.clouddms.v1.PostgreSqlConnectionProfile.privateServiceConnectConnectivity: object expected"); + message.privateServiceConnectConnectivity = $root.google.cloud.clouddms.v1.PrivateServiceConnectConnectivity.fromObject(object.privateServiceConnectConnectivity); + } + return message; + }; + + /** + * Creates a plain object from a PostgreSqlConnectionProfile message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * @static + * @param {google.cloud.clouddms.v1.PostgreSqlConnectionProfile} message PostgreSqlConnectionProfile + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PostgreSqlConnectionProfile.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.host = ""; + object.port = 0; + object.username = ""; + object.password = ""; + object.passwordSet = false; + object.ssl = null; + object.cloudSqlId = ""; + object.networkArchitecture = options.enums === String ? "NETWORK_ARCHITECTURE_UNSPECIFIED" : 0; + } + if (message.host != null && message.hasOwnProperty("host")) + object.host = message.host; + if (message.port != null && message.hasOwnProperty("port")) + object.port = message.port; + if (message.username != null && message.hasOwnProperty("username")) + object.username = message.username; + if (message.password != null && message.hasOwnProperty("password")) + object.password = message.password; + if (message.passwordSet != null && message.hasOwnProperty("passwordSet")) + object.passwordSet = message.passwordSet; + if (message.ssl != null && message.hasOwnProperty("ssl")) + object.ssl = $root.google.cloud.clouddms.v1.SslConfig.toObject(message.ssl, options); + if (message.cloudSqlId != null && message.hasOwnProperty("cloudSqlId")) + object.cloudSqlId = message.cloudSqlId; + if (message.networkArchitecture != null && message.hasOwnProperty("networkArchitecture")) + object.networkArchitecture = options.enums === String ? $root.google.cloud.clouddms.v1.NetworkArchitecture[message.networkArchitecture] === undefined ? message.networkArchitecture : $root.google.cloud.clouddms.v1.NetworkArchitecture[message.networkArchitecture] : message.networkArchitecture; + if (message.staticIpConnectivity != null && message.hasOwnProperty("staticIpConnectivity")) { + object.staticIpConnectivity = $root.google.cloud.clouddms.v1.StaticIpConnectivity.toObject(message.staticIpConnectivity, options); + if (options.oneofs) + object.connectivity = "staticIpConnectivity"; + } + if (message.privateServiceConnectConnectivity != null && message.hasOwnProperty("privateServiceConnectConnectivity")) { + object.privateServiceConnectConnectivity = $root.google.cloud.clouddms.v1.PrivateServiceConnectConnectivity.toObject(message.privateServiceConnectConnectivity, options); + if (options.oneofs) + object.connectivity = "privateServiceConnectConnectivity"; + } + return object; + }; + + /** + * Converts this PostgreSqlConnectionProfile to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * @instance + * @returns {Object.} JSON object + */ + PostgreSqlConnectionProfile.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PostgreSqlConnectionProfile + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.PostgreSqlConnectionProfile + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PostgreSqlConnectionProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.PostgreSqlConnectionProfile"; + }; + + return PostgreSqlConnectionProfile; + })(); + + v1.OracleConnectionProfile = (function() { + + /** + * Properties of an OracleConnectionProfile. + * @memberof google.cloud.clouddms.v1 + * @interface IOracleConnectionProfile + * @property {string|null} [host] OracleConnectionProfile host + * @property {number|null} [port] OracleConnectionProfile port + * @property {string|null} [username] OracleConnectionProfile username + * @property {string|null} [password] OracleConnectionProfile password + * @property {boolean|null} [passwordSet] OracleConnectionProfile passwordSet + * @property {string|null} [databaseService] OracleConnectionProfile databaseService + * @property {google.cloud.clouddms.v1.IStaticServiceIpConnectivity|null} [staticServiceIpConnectivity] OracleConnectionProfile staticServiceIpConnectivity + * @property {google.cloud.clouddms.v1.IForwardSshTunnelConnectivity|null} [forwardSshConnectivity] OracleConnectionProfile forwardSshConnectivity + * @property {google.cloud.clouddms.v1.IPrivateConnectivity|null} [privateConnectivity] OracleConnectionProfile privateConnectivity + */ + + /** + * Constructs a new OracleConnectionProfile. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents an OracleConnectionProfile. + * @implements IOracleConnectionProfile + * @constructor + * @param {google.cloud.clouddms.v1.IOracleConnectionProfile=} [properties] Properties to set + */ + function OracleConnectionProfile(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]]; + } + + /** + * OracleConnectionProfile host. + * @member {string} host + * @memberof google.cloud.clouddms.v1.OracleConnectionProfile + * @instance + */ + OracleConnectionProfile.prototype.host = ""; + + /** + * OracleConnectionProfile port. + * @member {number} port + * @memberof google.cloud.clouddms.v1.OracleConnectionProfile + * @instance + */ + OracleConnectionProfile.prototype.port = 0; + + /** + * OracleConnectionProfile username. + * @member {string} username + * @memberof google.cloud.clouddms.v1.OracleConnectionProfile + * @instance + */ + OracleConnectionProfile.prototype.username = ""; + + /** + * OracleConnectionProfile password. + * @member {string} password + * @memberof google.cloud.clouddms.v1.OracleConnectionProfile + * @instance + */ + OracleConnectionProfile.prototype.password = ""; + + /** + * OracleConnectionProfile passwordSet. + * @member {boolean} passwordSet + * @memberof google.cloud.clouddms.v1.OracleConnectionProfile + * @instance + */ + OracleConnectionProfile.prototype.passwordSet = false; + + /** + * OracleConnectionProfile databaseService. + * @member {string} databaseService + * @memberof google.cloud.clouddms.v1.OracleConnectionProfile + * @instance + */ + OracleConnectionProfile.prototype.databaseService = ""; + + /** + * OracleConnectionProfile staticServiceIpConnectivity. + * @member {google.cloud.clouddms.v1.IStaticServiceIpConnectivity|null|undefined} staticServiceIpConnectivity + * @memberof google.cloud.clouddms.v1.OracleConnectionProfile + * @instance + */ + OracleConnectionProfile.prototype.staticServiceIpConnectivity = null; + + /** + * OracleConnectionProfile forwardSshConnectivity. + * @member {google.cloud.clouddms.v1.IForwardSshTunnelConnectivity|null|undefined} forwardSshConnectivity + * @memberof google.cloud.clouddms.v1.OracleConnectionProfile + * @instance + */ + OracleConnectionProfile.prototype.forwardSshConnectivity = null; + + /** + * OracleConnectionProfile privateConnectivity. + * @member {google.cloud.clouddms.v1.IPrivateConnectivity|null|undefined} privateConnectivity + * @memberof google.cloud.clouddms.v1.OracleConnectionProfile + * @instance + */ + OracleConnectionProfile.prototype.privateConnectivity = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OracleConnectionProfile connectivity. + * @member {"staticServiceIpConnectivity"|"forwardSshConnectivity"|"privateConnectivity"|undefined} connectivity + * @memberof google.cloud.clouddms.v1.OracleConnectionProfile + * @instance + */ + Object.defineProperty(OracleConnectionProfile.prototype, "connectivity", { + get: $util.oneOfGetter($oneOfFields = ["staticServiceIpConnectivity", "forwardSshConnectivity", "privateConnectivity"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OracleConnectionProfile instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.OracleConnectionProfile + * @static + * @param {google.cloud.clouddms.v1.IOracleConnectionProfile=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.OracleConnectionProfile} OracleConnectionProfile instance + */ + OracleConnectionProfile.create = function create(properties) { + return new OracleConnectionProfile(properties); + }; + + /** + * Encodes the specified OracleConnectionProfile message. Does not implicitly {@link google.cloud.clouddms.v1.OracleConnectionProfile.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.OracleConnectionProfile + * @static + * @param {google.cloud.clouddms.v1.IOracleConnectionProfile} message OracleConnectionProfile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OracleConnectionProfile.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.host != null && Object.hasOwnProperty.call(message, "host")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.host); + if (message.port != null && Object.hasOwnProperty.call(message, "port")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.port); + if (message.username != null && Object.hasOwnProperty.call(message, "username")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.username); + if (message.password != null && Object.hasOwnProperty.call(message, "password")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.password); + if (message.passwordSet != null && Object.hasOwnProperty.call(message, "passwordSet")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.passwordSet); + if (message.databaseService != null && Object.hasOwnProperty.call(message, "databaseService")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.databaseService); + if (message.staticServiceIpConnectivity != null && Object.hasOwnProperty.call(message, "staticServiceIpConnectivity")) + $root.google.cloud.clouddms.v1.StaticServiceIpConnectivity.encode(message.staticServiceIpConnectivity, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.forwardSshConnectivity != null && Object.hasOwnProperty.call(message, "forwardSshConnectivity")) + $root.google.cloud.clouddms.v1.ForwardSshTunnelConnectivity.encode(message.forwardSshConnectivity, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.privateConnectivity != null && Object.hasOwnProperty.call(message, "privateConnectivity")) + $root.google.cloud.clouddms.v1.PrivateConnectivity.encode(message.privateConnectivity, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OracleConnectionProfile message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.OracleConnectionProfile.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.OracleConnectionProfile + * @static + * @param {google.cloud.clouddms.v1.IOracleConnectionProfile} message OracleConnectionProfile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OracleConnectionProfile.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OracleConnectionProfile message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.OracleConnectionProfile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.OracleConnectionProfile} OracleConnectionProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OracleConnectionProfile.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.OracleConnectionProfile(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.host = reader.string(); + break; + } + case 2: { + message.port = reader.int32(); + break; + } + case 3: { + message.username = reader.string(); + break; + } + case 4: { + message.password = reader.string(); + break; + } + case 5: { + message.passwordSet = reader.bool(); + break; + } + case 6: { + message.databaseService = reader.string(); + break; + } + case 100: { + message.staticServiceIpConnectivity = $root.google.cloud.clouddms.v1.StaticServiceIpConnectivity.decode(reader, reader.uint32()); + break; + } + case 101: { + message.forwardSshConnectivity = $root.google.cloud.clouddms.v1.ForwardSshTunnelConnectivity.decode(reader, reader.uint32()); + break; + } + case 102: { + message.privateConnectivity = $root.google.cloud.clouddms.v1.PrivateConnectivity.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OracleConnectionProfile message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.OracleConnectionProfile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.OracleConnectionProfile} OracleConnectionProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OracleConnectionProfile.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OracleConnectionProfile message. + * @function verify + * @memberof google.cloud.clouddms.v1.OracleConnectionProfile + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OracleConnectionProfile.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.host != null && message.hasOwnProperty("host")) + if (!$util.isString(message.host)) + return "host: string expected"; + if (message.port != null && message.hasOwnProperty("port")) + if (!$util.isInteger(message.port)) + return "port: integer expected"; + if (message.username != null && message.hasOwnProperty("username")) + if (!$util.isString(message.username)) + return "username: string expected"; + if (message.password != null && message.hasOwnProperty("password")) + if (!$util.isString(message.password)) + return "password: string expected"; + if (message.passwordSet != null && message.hasOwnProperty("passwordSet")) + if (typeof message.passwordSet !== "boolean") + return "passwordSet: boolean expected"; + if (message.databaseService != null && message.hasOwnProperty("databaseService")) + if (!$util.isString(message.databaseService)) + return "databaseService: string expected"; + if (message.staticServiceIpConnectivity != null && message.hasOwnProperty("staticServiceIpConnectivity")) { + properties.connectivity = 1; + { + var error = $root.google.cloud.clouddms.v1.StaticServiceIpConnectivity.verify(message.staticServiceIpConnectivity); + if (error) + return "staticServiceIpConnectivity." + error; + } + } + if (message.forwardSshConnectivity != null && message.hasOwnProperty("forwardSshConnectivity")) { + if (properties.connectivity === 1) + return "connectivity: multiple values"; + properties.connectivity = 1; + { + var error = $root.google.cloud.clouddms.v1.ForwardSshTunnelConnectivity.verify(message.forwardSshConnectivity); + if (error) + return "forwardSshConnectivity." + error; + } + } + if (message.privateConnectivity != null && message.hasOwnProperty("privateConnectivity")) { + if (properties.connectivity === 1) + return "connectivity: multiple values"; + properties.connectivity = 1; + { + var error = $root.google.cloud.clouddms.v1.PrivateConnectivity.verify(message.privateConnectivity); + if (error) + return "privateConnectivity." + error; + } + } + return null; + }; + + /** + * Creates an OracleConnectionProfile message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.OracleConnectionProfile + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.OracleConnectionProfile} OracleConnectionProfile + */ + OracleConnectionProfile.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.OracleConnectionProfile) + return object; + var message = new $root.google.cloud.clouddms.v1.OracleConnectionProfile(); + if (object.host != null) + message.host = String(object.host); + if (object.port != null) + message.port = object.port | 0; + if (object.username != null) + message.username = String(object.username); + if (object.password != null) + message.password = String(object.password); + if (object.passwordSet != null) + message.passwordSet = Boolean(object.passwordSet); + if (object.databaseService != null) + message.databaseService = String(object.databaseService); + if (object.staticServiceIpConnectivity != null) { + if (typeof object.staticServiceIpConnectivity !== "object") + throw TypeError(".google.cloud.clouddms.v1.OracleConnectionProfile.staticServiceIpConnectivity: object expected"); + message.staticServiceIpConnectivity = $root.google.cloud.clouddms.v1.StaticServiceIpConnectivity.fromObject(object.staticServiceIpConnectivity); + } + if (object.forwardSshConnectivity != null) { + if (typeof object.forwardSshConnectivity !== "object") + throw TypeError(".google.cloud.clouddms.v1.OracleConnectionProfile.forwardSshConnectivity: object expected"); + message.forwardSshConnectivity = $root.google.cloud.clouddms.v1.ForwardSshTunnelConnectivity.fromObject(object.forwardSshConnectivity); + } + if (object.privateConnectivity != null) { + if (typeof object.privateConnectivity !== "object") + throw TypeError(".google.cloud.clouddms.v1.OracleConnectionProfile.privateConnectivity: object expected"); + message.privateConnectivity = $root.google.cloud.clouddms.v1.PrivateConnectivity.fromObject(object.privateConnectivity); + } + return message; + }; + + /** + * Creates a plain object from an OracleConnectionProfile message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.OracleConnectionProfile + * @static + * @param {google.cloud.clouddms.v1.OracleConnectionProfile} message OracleConnectionProfile + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OracleConnectionProfile.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.host = ""; + object.port = 0; + object.username = ""; + object.password = ""; + object.passwordSet = false; + object.databaseService = ""; + } + if (message.host != null && message.hasOwnProperty("host")) + object.host = message.host; + if (message.port != null && message.hasOwnProperty("port")) + object.port = message.port; + if (message.username != null && message.hasOwnProperty("username")) + object.username = message.username; + if (message.password != null && message.hasOwnProperty("password")) + object.password = message.password; + if (message.passwordSet != null && message.hasOwnProperty("passwordSet")) + object.passwordSet = message.passwordSet; + if (message.databaseService != null && message.hasOwnProperty("databaseService")) + object.databaseService = message.databaseService; + if (message.staticServiceIpConnectivity != null && message.hasOwnProperty("staticServiceIpConnectivity")) { + object.staticServiceIpConnectivity = $root.google.cloud.clouddms.v1.StaticServiceIpConnectivity.toObject(message.staticServiceIpConnectivity, options); + if (options.oneofs) + object.connectivity = "staticServiceIpConnectivity"; + } + if (message.forwardSshConnectivity != null && message.hasOwnProperty("forwardSshConnectivity")) { + object.forwardSshConnectivity = $root.google.cloud.clouddms.v1.ForwardSshTunnelConnectivity.toObject(message.forwardSshConnectivity, options); + if (options.oneofs) + object.connectivity = "forwardSshConnectivity"; + } + if (message.privateConnectivity != null && message.hasOwnProperty("privateConnectivity")) { + object.privateConnectivity = $root.google.cloud.clouddms.v1.PrivateConnectivity.toObject(message.privateConnectivity, options); + if (options.oneofs) + object.connectivity = "privateConnectivity"; + } + return object; + }; + + /** + * Converts this OracleConnectionProfile to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.OracleConnectionProfile + * @instance + * @returns {Object.} JSON object + */ + OracleConnectionProfile.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OracleConnectionProfile + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.OracleConnectionProfile + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OracleConnectionProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.OracleConnectionProfile"; + }; + + return OracleConnectionProfile; + })(); + + v1.CloudSqlConnectionProfile = (function() { + + /** + * Properties of a CloudSqlConnectionProfile. + * @memberof google.cloud.clouddms.v1 + * @interface ICloudSqlConnectionProfile + * @property {string|null} [cloudSqlId] CloudSqlConnectionProfile cloudSqlId + * @property {google.cloud.clouddms.v1.ICloudSqlSettings|null} [settings] CloudSqlConnectionProfile settings + * @property {string|null} [privateIp] CloudSqlConnectionProfile privateIp + * @property {string|null} [publicIp] CloudSqlConnectionProfile publicIp + * @property {string|null} [additionalPublicIp] CloudSqlConnectionProfile additionalPublicIp + */ + + /** + * Constructs a new CloudSqlConnectionProfile. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a CloudSqlConnectionProfile. + * @implements ICloudSqlConnectionProfile + * @constructor + * @param {google.cloud.clouddms.v1.ICloudSqlConnectionProfile=} [properties] Properties to set + */ + function CloudSqlConnectionProfile(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]]; + } + + /** + * CloudSqlConnectionProfile cloudSqlId. + * @member {string} cloudSqlId + * @memberof google.cloud.clouddms.v1.CloudSqlConnectionProfile + * @instance + */ + CloudSqlConnectionProfile.prototype.cloudSqlId = ""; + + /** + * CloudSqlConnectionProfile settings. + * @member {google.cloud.clouddms.v1.ICloudSqlSettings|null|undefined} settings + * @memberof google.cloud.clouddms.v1.CloudSqlConnectionProfile + * @instance + */ + CloudSqlConnectionProfile.prototype.settings = null; + + /** + * CloudSqlConnectionProfile privateIp. + * @member {string} privateIp + * @memberof google.cloud.clouddms.v1.CloudSqlConnectionProfile + * @instance + */ + CloudSqlConnectionProfile.prototype.privateIp = ""; + + /** + * CloudSqlConnectionProfile publicIp. + * @member {string} publicIp + * @memberof google.cloud.clouddms.v1.CloudSqlConnectionProfile + * @instance + */ + CloudSqlConnectionProfile.prototype.publicIp = ""; + + /** + * CloudSqlConnectionProfile additionalPublicIp. + * @member {string} additionalPublicIp + * @memberof google.cloud.clouddms.v1.CloudSqlConnectionProfile + * @instance + */ + CloudSqlConnectionProfile.prototype.additionalPublicIp = ""; + + /** + * Creates a new CloudSqlConnectionProfile instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.CloudSqlConnectionProfile + * @static + * @param {google.cloud.clouddms.v1.ICloudSqlConnectionProfile=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.CloudSqlConnectionProfile} CloudSqlConnectionProfile instance + */ + CloudSqlConnectionProfile.create = function create(properties) { + return new CloudSqlConnectionProfile(properties); + }; + + /** + * Encodes the specified CloudSqlConnectionProfile message. Does not implicitly {@link google.cloud.clouddms.v1.CloudSqlConnectionProfile.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.CloudSqlConnectionProfile + * @static + * @param {google.cloud.clouddms.v1.ICloudSqlConnectionProfile} message CloudSqlConnectionProfile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudSqlConnectionProfile.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cloudSqlId != null && Object.hasOwnProperty.call(message, "cloudSqlId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cloudSqlId); + if (message.settings != null && Object.hasOwnProperty.call(message, "settings")) + $root.google.cloud.clouddms.v1.CloudSqlSettings.encode(message.settings, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.privateIp != null && Object.hasOwnProperty.call(message, "privateIp")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.privateIp); + if (message.publicIp != null && Object.hasOwnProperty.call(message, "publicIp")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.publicIp); + if (message.additionalPublicIp != null && Object.hasOwnProperty.call(message, "additionalPublicIp")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.additionalPublicIp); + return writer; + }; + + /** + * Encodes the specified CloudSqlConnectionProfile message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.CloudSqlConnectionProfile.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.CloudSqlConnectionProfile + * @static + * @param {google.cloud.clouddms.v1.ICloudSqlConnectionProfile} message CloudSqlConnectionProfile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudSqlConnectionProfile.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudSqlConnectionProfile message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.CloudSqlConnectionProfile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.CloudSqlConnectionProfile} CloudSqlConnectionProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudSqlConnectionProfile.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.CloudSqlConnectionProfile(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cloudSqlId = reader.string(); + break; + } + case 2: { + message.settings = $root.google.cloud.clouddms.v1.CloudSqlSettings.decode(reader, reader.uint32()); + break; + } + case 3: { + message.privateIp = reader.string(); + break; + } + case 4: { + message.publicIp = reader.string(); + break; + } + case 5: { + message.additionalPublicIp = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudSqlConnectionProfile message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.CloudSqlConnectionProfile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.CloudSqlConnectionProfile} CloudSqlConnectionProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudSqlConnectionProfile.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudSqlConnectionProfile message. + * @function verify + * @memberof google.cloud.clouddms.v1.CloudSqlConnectionProfile + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudSqlConnectionProfile.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cloudSqlId != null && message.hasOwnProperty("cloudSqlId")) + if (!$util.isString(message.cloudSqlId)) + return "cloudSqlId: string expected"; + if (message.settings != null && message.hasOwnProperty("settings")) { + var error = $root.google.cloud.clouddms.v1.CloudSqlSettings.verify(message.settings); + if (error) + return "settings." + error; + } + if (message.privateIp != null && message.hasOwnProperty("privateIp")) + if (!$util.isString(message.privateIp)) + return "privateIp: string expected"; + if (message.publicIp != null && message.hasOwnProperty("publicIp")) + if (!$util.isString(message.publicIp)) + return "publicIp: string expected"; + if (message.additionalPublicIp != null && message.hasOwnProperty("additionalPublicIp")) + if (!$util.isString(message.additionalPublicIp)) + return "additionalPublicIp: string expected"; + return null; + }; + + /** + * Creates a CloudSqlConnectionProfile message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.CloudSqlConnectionProfile + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.CloudSqlConnectionProfile} CloudSqlConnectionProfile + */ + CloudSqlConnectionProfile.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.CloudSqlConnectionProfile) + return object; + var message = new $root.google.cloud.clouddms.v1.CloudSqlConnectionProfile(); + if (object.cloudSqlId != null) + message.cloudSqlId = String(object.cloudSqlId); + if (object.settings != null) { + if (typeof object.settings !== "object") + throw TypeError(".google.cloud.clouddms.v1.CloudSqlConnectionProfile.settings: object expected"); + message.settings = $root.google.cloud.clouddms.v1.CloudSqlSettings.fromObject(object.settings); + } + if (object.privateIp != null) + message.privateIp = String(object.privateIp); + if (object.publicIp != null) + message.publicIp = String(object.publicIp); + if (object.additionalPublicIp != null) + message.additionalPublicIp = String(object.additionalPublicIp); + return message; + }; + + /** + * Creates a plain object from a CloudSqlConnectionProfile message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.CloudSqlConnectionProfile + * @static + * @param {google.cloud.clouddms.v1.CloudSqlConnectionProfile} message CloudSqlConnectionProfile + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudSqlConnectionProfile.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cloudSqlId = ""; + object.settings = null; + object.privateIp = ""; + object.publicIp = ""; + object.additionalPublicIp = ""; + } + if (message.cloudSqlId != null && message.hasOwnProperty("cloudSqlId")) + object.cloudSqlId = message.cloudSqlId; + if (message.settings != null && message.hasOwnProperty("settings")) + object.settings = $root.google.cloud.clouddms.v1.CloudSqlSettings.toObject(message.settings, options); + if (message.privateIp != null && message.hasOwnProperty("privateIp")) + object.privateIp = message.privateIp; + if (message.publicIp != null && message.hasOwnProperty("publicIp")) + object.publicIp = message.publicIp; + if (message.additionalPublicIp != null && message.hasOwnProperty("additionalPublicIp")) + object.additionalPublicIp = message.additionalPublicIp; + return object; + }; + + /** + * Converts this CloudSqlConnectionProfile to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.CloudSqlConnectionProfile + * @instance + * @returns {Object.} JSON object + */ + CloudSqlConnectionProfile.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudSqlConnectionProfile + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.CloudSqlConnectionProfile + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudSqlConnectionProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.CloudSqlConnectionProfile"; + }; + + return CloudSqlConnectionProfile; + })(); + + v1.AlloyDbConnectionProfile = (function() { + + /** + * Properties of an AlloyDbConnectionProfile. + * @memberof google.cloud.clouddms.v1 + * @interface IAlloyDbConnectionProfile + * @property {string|null} [clusterId] AlloyDbConnectionProfile clusterId + * @property {google.cloud.clouddms.v1.IAlloyDbSettings|null} [settings] AlloyDbConnectionProfile settings + */ + + /** + * Constructs a new AlloyDbConnectionProfile. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents an AlloyDbConnectionProfile. + * @implements IAlloyDbConnectionProfile + * @constructor + * @param {google.cloud.clouddms.v1.IAlloyDbConnectionProfile=} [properties] Properties to set + */ + function AlloyDbConnectionProfile(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]]; + } + + /** + * AlloyDbConnectionProfile clusterId. + * @member {string} clusterId + * @memberof google.cloud.clouddms.v1.AlloyDbConnectionProfile + * @instance + */ + AlloyDbConnectionProfile.prototype.clusterId = ""; + + /** + * AlloyDbConnectionProfile settings. + * @member {google.cloud.clouddms.v1.IAlloyDbSettings|null|undefined} settings + * @memberof google.cloud.clouddms.v1.AlloyDbConnectionProfile + * @instance + */ + AlloyDbConnectionProfile.prototype.settings = null; + + /** + * Creates a new AlloyDbConnectionProfile instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.AlloyDbConnectionProfile + * @static + * @param {google.cloud.clouddms.v1.IAlloyDbConnectionProfile=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.AlloyDbConnectionProfile} AlloyDbConnectionProfile instance + */ + AlloyDbConnectionProfile.create = function create(properties) { + return new AlloyDbConnectionProfile(properties); + }; + + /** + * Encodes the specified AlloyDbConnectionProfile message. Does not implicitly {@link google.cloud.clouddms.v1.AlloyDbConnectionProfile.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.AlloyDbConnectionProfile + * @static + * @param {google.cloud.clouddms.v1.IAlloyDbConnectionProfile} message AlloyDbConnectionProfile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AlloyDbConnectionProfile.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clusterId); + if (message.settings != null && Object.hasOwnProperty.call(message, "settings")) + $root.google.cloud.clouddms.v1.AlloyDbSettings.encode(message.settings, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AlloyDbConnectionProfile message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.AlloyDbConnectionProfile.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.AlloyDbConnectionProfile + * @static + * @param {google.cloud.clouddms.v1.IAlloyDbConnectionProfile} message AlloyDbConnectionProfile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AlloyDbConnectionProfile.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AlloyDbConnectionProfile message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.AlloyDbConnectionProfile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.AlloyDbConnectionProfile} AlloyDbConnectionProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AlloyDbConnectionProfile.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.AlloyDbConnectionProfile(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.clusterId = reader.string(); + break; + } + case 2: { + message.settings = $root.google.cloud.clouddms.v1.AlloyDbSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AlloyDbConnectionProfile message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.AlloyDbConnectionProfile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.AlloyDbConnectionProfile} AlloyDbConnectionProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AlloyDbConnectionProfile.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AlloyDbConnectionProfile message. + * @function verify + * @memberof google.cloud.clouddms.v1.AlloyDbConnectionProfile + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AlloyDbConnectionProfile.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.settings != null && message.hasOwnProperty("settings")) { + var error = $root.google.cloud.clouddms.v1.AlloyDbSettings.verify(message.settings); + if (error) + return "settings." + error; + } + return null; + }; + + /** + * Creates an AlloyDbConnectionProfile message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.AlloyDbConnectionProfile + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.AlloyDbConnectionProfile} AlloyDbConnectionProfile + */ + AlloyDbConnectionProfile.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.AlloyDbConnectionProfile) + return object; + var message = new $root.google.cloud.clouddms.v1.AlloyDbConnectionProfile(); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.settings != null) { + if (typeof object.settings !== "object") + throw TypeError(".google.cloud.clouddms.v1.AlloyDbConnectionProfile.settings: object expected"); + message.settings = $root.google.cloud.clouddms.v1.AlloyDbSettings.fromObject(object.settings); + } + return message; + }; + + /** + * Creates a plain object from an AlloyDbConnectionProfile message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.AlloyDbConnectionProfile + * @static + * @param {google.cloud.clouddms.v1.AlloyDbConnectionProfile} message AlloyDbConnectionProfile + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AlloyDbConnectionProfile.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.clusterId = ""; + object.settings = null; + } + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.settings != null && message.hasOwnProperty("settings")) + object.settings = $root.google.cloud.clouddms.v1.AlloyDbSettings.toObject(message.settings, options); + return object; + }; + + /** + * Converts this AlloyDbConnectionProfile to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.AlloyDbConnectionProfile + * @instance + * @returns {Object.} JSON object + */ + AlloyDbConnectionProfile.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AlloyDbConnectionProfile + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.AlloyDbConnectionProfile + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AlloyDbConnectionProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.AlloyDbConnectionProfile"; + }; + + return AlloyDbConnectionProfile; + })(); + + v1.SqlAclEntry = (function() { + + /** + * Properties of a SqlAclEntry. + * @memberof google.cloud.clouddms.v1 + * @interface ISqlAclEntry + * @property {string|null} [value] SqlAclEntry value + * @property {google.protobuf.ITimestamp|null} [expireTime] SqlAclEntry expireTime + * @property {google.protobuf.IDuration|null} [ttl] SqlAclEntry ttl + * @property {string|null} [label] SqlAclEntry label + */ + + /** + * Constructs a new SqlAclEntry. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a SqlAclEntry. + * @implements ISqlAclEntry + * @constructor + * @param {google.cloud.clouddms.v1.ISqlAclEntry=} [properties] Properties to set + */ + function SqlAclEntry(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]]; + } + + /** + * SqlAclEntry value. + * @member {string} value + * @memberof google.cloud.clouddms.v1.SqlAclEntry + * @instance + */ + SqlAclEntry.prototype.value = ""; + + /** + * SqlAclEntry expireTime. + * @member {google.protobuf.ITimestamp|null|undefined} expireTime + * @memberof google.cloud.clouddms.v1.SqlAclEntry + * @instance + */ + SqlAclEntry.prototype.expireTime = null; + + /** + * SqlAclEntry ttl. + * @member {google.protobuf.IDuration|null|undefined} ttl + * @memberof google.cloud.clouddms.v1.SqlAclEntry + * @instance + */ + SqlAclEntry.prototype.ttl = null; + + /** + * SqlAclEntry label. + * @member {string} label + * @memberof google.cloud.clouddms.v1.SqlAclEntry + * @instance + */ + SqlAclEntry.prototype.label = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SqlAclEntry expiration. + * @member {"expireTime"|"ttl"|undefined} expiration + * @memberof google.cloud.clouddms.v1.SqlAclEntry + * @instance + */ + Object.defineProperty(SqlAclEntry.prototype, "expiration", { + get: $util.oneOfGetter($oneOfFields = ["expireTime", "ttl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SqlAclEntry instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.SqlAclEntry + * @static + * @param {google.cloud.clouddms.v1.ISqlAclEntry=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.SqlAclEntry} SqlAclEntry instance + */ + SqlAclEntry.create = function create(properties) { + return new SqlAclEntry(properties); + }; + + /** + * Encodes the specified SqlAclEntry message. Does not implicitly {@link google.cloud.clouddms.v1.SqlAclEntry.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.SqlAclEntry + * @static + * @param {google.cloud.clouddms.v1.ISqlAclEntry} message SqlAclEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SqlAclEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.label); + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.ttl != null && Object.hasOwnProperty.call(message, "ttl")) + $root.google.protobuf.Duration.encode(message.ttl, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SqlAclEntry message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.SqlAclEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.SqlAclEntry + * @static + * @param {google.cloud.clouddms.v1.ISqlAclEntry} message SqlAclEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SqlAclEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SqlAclEntry message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.SqlAclEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.SqlAclEntry} SqlAclEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SqlAclEntry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.SqlAclEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; + } + case 10: { + message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 11: { + message.ttl = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 3: { + message.label = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SqlAclEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.SqlAclEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.SqlAclEntry} SqlAclEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SqlAclEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SqlAclEntry message. + * @function verify + * @memberof google.cloud.clouddms.v1.SqlAclEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SqlAclEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + properties.expiration = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.expireTime); + if (error) + return "expireTime." + error; + } + } + if (message.ttl != null && message.hasOwnProperty("ttl")) { + if (properties.expiration === 1) + return "expiration: multiple values"; + properties.expiration = 1; + { + var error = $root.google.protobuf.Duration.verify(message.ttl); + if (error) + return "ttl." + error; + } + } + if (message.label != null && message.hasOwnProperty("label")) + if (!$util.isString(message.label)) + return "label: string expected"; + return null; + }; + + /** + * Creates a SqlAclEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.SqlAclEntry + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.SqlAclEntry} SqlAclEntry + */ + SqlAclEntry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.SqlAclEntry) + return object; + var message = new $root.google.cloud.clouddms.v1.SqlAclEntry(); + if (object.value != null) + message.value = String(object.value); + if (object.expireTime != null) { + if (typeof object.expireTime !== "object") + throw TypeError(".google.cloud.clouddms.v1.SqlAclEntry.expireTime: object expected"); + message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); + } + if (object.ttl != null) { + if (typeof object.ttl !== "object") + throw TypeError(".google.cloud.clouddms.v1.SqlAclEntry.ttl: object expected"); + message.ttl = $root.google.protobuf.Duration.fromObject(object.ttl); + } + if (object.label != null) + message.label = String(object.label); + return message; + }; + + /** + * Creates a plain object from a SqlAclEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.SqlAclEntry + * @static + * @param {google.cloud.clouddms.v1.SqlAclEntry} message SqlAclEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SqlAclEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.value = ""; + object.label = ""; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.label != null && message.hasOwnProperty("label")) + object.label = message.label; + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + if (options.oneofs) + object.expiration = "expireTime"; + } + if (message.ttl != null && message.hasOwnProperty("ttl")) { + object.ttl = $root.google.protobuf.Duration.toObject(message.ttl, options); + if (options.oneofs) + object.expiration = "ttl"; + } + return object; + }; + + /** + * Converts this SqlAclEntry to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.SqlAclEntry + * @instance + * @returns {Object.} JSON object + */ + SqlAclEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SqlAclEntry + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.SqlAclEntry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SqlAclEntry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.SqlAclEntry"; + }; + + return SqlAclEntry; + })(); + + v1.SqlIpConfig = (function() { + + /** + * Properties of a SqlIpConfig. + * @memberof google.cloud.clouddms.v1 + * @interface ISqlIpConfig + * @property {google.protobuf.IBoolValue|null} [enableIpv4] SqlIpConfig enableIpv4 + * @property {string|null} [privateNetwork] SqlIpConfig privateNetwork + * @property {string|null} [allocatedIpRange] SqlIpConfig allocatedIpRange + * @property {google.protobuf.IBoolValue|null} [requireSsl] SqlIpConfig requireSsl + * @property {Array.|null} [authorizedNetworks] SqlIpConfig authorizedNetworks + */ + + /** + * Constructs a new SqlIpConfig. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a SqlIpConfig. + * @implements ISqlIpConfig + * @constructor + * @param {google.cloud.clouddms.v1.ISqlIpConfig=} [properties] Properties to set + */ + function SqlIpConfig(properties) { + this.authorizedNetworks = []; + 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]]; + } + + /** + * SqlIpConfig enableIpv4. + * @member {google.protobuf.IBoolValue|null|undefined} enableIpv4 + * @memberof google.cloud.clouddms.v1.SqlIpConfig + * @instance + */ + SqlIpConfig.prototype.enableIpv4 = null; + + /** + * SqlIpConfig privateNetwork. + * @member {string} privateNetwork + * @memberof google.cloud.clouddms.v1.SqlIpConfig + * @instance + */ + SqlIpConfig.prototype.privateNetwork = ""; + + /** + * SqlIpConfig allocatedIpRange. + * @member {string} allocatedIpRange + * @memberof google.cloud.clouddms.v1.SqlIpConfig + * @instance + */ + SqlIpConfig.prototype.allocatedIpRange = ""; + + /** + * SqlIpConfig requireSsl. + * @member {google.protobuf.IBoolValue|null|undefined} requireSsl + * @memberof google.cloud.clouddms.v1.SqlIpConfig + * @instance + */ + SqlIpConfig.prototype.requireSsl = null; + + /** + * SqlIpConfig authorizedNetworks. + * @member {Array.} authorizedNetworks + * @memberof google.cloud.clouddms.v1.SqlIpConfig + * @instance + */ + SqlIpConfig.prototype.authorizedNetworks = $util.emptyArray; + + /** + * Creates a new SqlIpConfig instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.SqlIpConfig + * @static + * @param {google.cloud.clouddms.v1.ISqlIpConfig=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.SqlIpConfig} SqlIpConfig instance + */ + SqlIpConfig.create = function create(properties) { + return new SqlIpConfig(properties); + }; + + /** + * Encodes the specified SqlIpConfig message. Does not implicitly {@link google.cloud.clouddms.v1.SqlIpConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.SqlIpConfig + * @static + * @param {google.cloud.clouddms.v1.ISqlIpConfig} message SqlIpConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SqlIpConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableIpv4 != null && Object.hasOwnProperty.call(message, "enableIpv4")) + $root.google.protobuf.BoolValue.encode(message.enableIpv4, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.privateNetwork != null && Object.hasOwnProperty.call(message, "privateNetwork")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.privateNetwork); + if (message.requireSsl != null && Object.hasOwnProperty.call(message, "requireSsl")) + $root.google.protobuf.BoolValue.encode(message.requireSsl, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.authorizedNetworks != null && message.authorizedNetworks.length) + for (var i = 0; i < message.authorizedNetworks.length; ++i) + $root.google.cloud.clouddms.v1.SqlAclEntry.encode(message.authorizedNetworks[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.allocatedIpRange != null && Object.hasOwnProperty.call(message, "allocatedIpRange")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.allocatedIpRange); + return writer; + }; + + /** + * Encodes the specified SqlIpConfig message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.SqlIpConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.SqlIpConfig + * @static + * @param {google.cloud.clouddms.v1.ISqlIpConfig} message SqlIpConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SqlIpConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SqlIpConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.SqlIpConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.SqlIpConfig} SqlIpConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SqlIpConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.SqlIpConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enableIpv4 = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } + case 2: { + message.privateNetwork = reader.string(); + break; + } + case 5: { + message.allocatedIpRange = reader.string(); + break; + } + case 3: { + message.requireSsl = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.authorizedNetworks && message.authorizedNetworks.length)) + message.authorizedNetworks = []; + message.authorizedNetworks.push($root.google.cloud.clouddms.v1.SqlAclEntry.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SqlIpConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.SqlIpConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.SqlIpConfig} SqlIpConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SqlIpConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SqlIpConfig message. + * @function verify + * @memberof google.cloud.clouddms.v1.SqlIpConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SqlIpConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enableIpv4 != null && message.hasOwnProperty("enableIpv4")) { + var error = $root.google.protobuf.BoolValue.verify(message.enableIpv4); + if (error) + return "enableIpv4." + error; + } + if (message.privateNetwork != null && message.hasOwnProperty("privateNetwork")) + if (!$util.isString(message.privateNetwork)) + return "privateNetwork: string expected"; + if (message.allocatedIpRange != null && message.hasOwnProperty("allocatedIpRange")) + if (!$util.isString(message.allocatedIpRange)) + return "allocatedIpRange: string expected"; + if (message.requireSsl != null && message.hasOwnProperty("requireSsl")) { + var error = $root.google.protobuf.BoolValue.verify(message.requireSsl); + if (error) + return "requireSsl." + error; + } + if (message.authorizedNetworks != null && message.hasOwnProperty("authorizedNetworks")) { + if (!Array.isArray(message.authorizedNetworks)) + return "authorizedNetworks: array expected"; + for (var i = 0; i < message.authorizedNetworks.length; ++i) { + var error = $root.google.cloud.clouddms.v1.SqlAclEntry.verify(message.authorizedNetworks[i]); + if (error) + return "authorizedNetworks." + error; + } + } + return null; + }; + + /** + * Creates a SqlIpConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.SqlIpConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.SqlIpConfig} SqlIpConfig + */ + SqlIpConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.SqlIpConfig) + return object; + var message = new $root.google.cloud.clouddms.v1.SqlIpConfig(); + if (object.enableIpv4 != null) { + if (typeof object.enableIpv4 !== "object") + throw TypeError(".google.cloud.clouddms.v1.SqlIpConfig.enableIpv4: object expected"); + message.enableIpv4 = $root.google.protobuf.BoolValue.fromObject(object.enableIpv4); + } + if (object.privateNetwork != null) + message.privateNetwork = String(object.privateNetwork); + if (object.allocatedIpRange != null) + message.allocatedIpRange = String(object.allocatedIpRange); + if (object.requireSsl != null) { + if (typeof object.requireSsl !== "object") + throw TypeError(".google.cloud.clouddms.v1.SqlIpConfig.requireSsl: object expected"); + message.requireSsl = $root.google.protobuf.BoolValue.fromObject(object.requireSsl); + } + if (object.authorizedNetworks) { + if (!Array.isArray(object.authorizedNetworks)) + throw TypeError(".google.cloud.clouddms.v1.SqlIpConfig.authorizedNetworks: array expected"); + message.authorizedNetworks = []; + for (var i = 0; i < object.authorizedNetworks.length; ++i) { + if (typeof object.authorizedNetworks[i] !== "object") + throw TypeError(".google.cloud.clouddms.v1.SqlIpConfig.authorizedNetworks: object expected"); + message.authorizedNetworks[i] = $root.google.cloud.clouddms.v1.SqlAclEntry.fromObject(object.authorizedNetworks[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SqlIpConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.SqlIpConfig + * @static + * @param {google.cloud.clouddms.v1.SqlIpConfig} message SqlIpConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SqlIpConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.authorizedNetworks = []; + if (options.defaults) { + object.enableIpv4 = null; + object.privateNetwork = ""; + object.requireSsl = null; + object.allocatedIpRange = ""; + } + if (message.enableIpv4 != null && message.hasOwnProperty("enableIpv4")) + object.enableIpv4 = $root.google.protobuf.BoolValue.toObject(message.enableIpv4, options); + if (message.privateNetwork != null && message.hasOwnProperty("privateNetwork")) + object.privateNetwork = message.privateNetwork; + if (message.requireSsl != null && message.hasOwnProperty("requireSsl")) + object.requireSsl = $root.google.protobuf.BoolValue.toObject(message.requireSsl, options); + if (message.authorizedNetworks && message.authorizedNetworks.length) { + object.authorizedNetworks = []; + for (var j = 0; j < message.authorizedNetworks.length; ++j) + object.authorizedNetworks[j] = $root.google.cloud.clouddms.v1.SqlAclEntry.toObject(message.authorizedNetworks[j], options); + } + if (message.allocatedIpRange != null && message.hasOwnProperty("allocatedIpRange")) + object.allocatedIpRange = message.allocatedIpRange; + return object; + }; + + /** + * Converts this SqlIpConfig to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.SqlIpConfig + * @instance + * @returns {Object.} JSON object + */ + SqlIpConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SqlIpConfig + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.SqlIpConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SqlIpConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.SqlIpConfig"; + }; + + return SqlIpConfig; + })(); + + v1.CloudSqlSettings = (function() { + + /** + * Properties of a CloudSqlSettings. + * @memberof google.cloud.clouddms.v1 + * @interface ICloudSqlSettings + * @property {google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion|null} [databaseVersion] CloudSqlSettings databaseVersion + * @property {Object.|null} [userLabels] CloudSqlSettings userLabels + * @property {string|null} [tier] CloudSqlSettings tier + * @property {google.protobuf.IInt64Value|null} [storageAutoResizeLimit] CloudSqlSettings storageAutoResizeLimit + * @property {google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy|null} [activationPolicy] CloudSqlSettings activationPolicy + * @property {google.cloud.clouddms.v1.ISqlIpConfig|null} [ipConfig] CloudSqlSettings ipConfig + * @property {google.protobuf.IBoolValue|null} [autoStorageIncrease] CloudSqlSettings autoStorageIncrease + * @property {Object.|null} [databaseFlags] CloudSqlSettings databaseFlags + * @property {google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType|null} [dataDiskType] CloudSqlSettings dataDiskType + * @property {google.protobuf.IInt64Value|null} [dataDiskSizeGb] CloudSqlSettings dataDiskSizeGb + * @property {string|null} [zone] CloudSqlSettings zone + * @property {string|null} [secondaryZone] CloudSqlSettings secondaryZone + * @property {string|null} [sourceId] CloudSqlSettings sourceId + * @property {string|null} [rootPassword] CloudSqlSettings rootPassword + * @property {boolean|null} [rootPasswordSet] CloudSqlSettings rootPasswordSet + * @property {string|null} [collation] CloudSqlSettings collation + * @property {string|null} [cmekKeyName] CloudSqlSettings cmekKeyName + * @property {google.cloud.clouddms.v1.CloudSqlSettings.SqlAvailabilityType|null} [availabilityType] CloudSqlSettings availabilityType + */ + + /** + * Constructs a new CloudSqlSettings. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a CloudSqlSettings. + * @implements ICloudSqlSettings + * @constructor + * @param {google.cloud.clouddms.v1.ICloudSqlSettings=} [properties] Properties to set + */ + function CloudSqlSettings(properties) { + this.userLabels = {}; + this.databaseFlags = {}; + 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]]; + } + + /** + * CloudSqlSettings databaseVersion. + * @member {google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion} databaseVersion + * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @instance + */ + CloudSqlSettings.prototype.databaseVersion = 0; + + /** + * CloudSqlSettings userLabels. + * @member {Object.} userLabels + * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @instance + */ + CloudSqlSettings.prototype.userLabels = $util.emptyObject; + + /** + * CloudSqlSettings tier. + * @member {string} tier + * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @instance + */ + CloudSqlSettings.prototype.tier = ""; + + /** + * CloudSqlSettings storageAutoResizeLimit. + * @member {google.protobuf.IInt64Value|null|undefined} storageAutoResizeLimit + * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @instance + */ + CloudSqlSettings.prototype.storageAutoResizeLimit = null; + + /** + * CloudSqlSettings activationPolicy. + * @member {google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy} activationPolicy + * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @instance + */ + CloudSqlSettings.prototype.activationPolicy = 0; + + /** + * CloudSqlSettings ipConfig. + * @member {google.cloud.clouddms.v1.ISqlIpConfig|null|undefined} ipConfig + * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @instance + */ + CloudSqlSettings.prototype.ipConfig = null; + + /** + * CloudSqlSettings autoStorageIncrease. + * @member {google.protobuf.IBoolValue|null|undefined} autoStorageIncrease + * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @instance + */ + CloudSqlSettings.prototype.autoStorageIncrease = null; + + /** + * CloudSqlSettings databaseFlags. + * @member {Object.} databaseFlags + * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @instance + */ + CloudSqlSettings.prototype.databaseFlags = $util.emptyObject; + + /** + * CloudSqlSettings dataDiskType. + * @member {google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType} dataDiskType + * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @instance + */ + CloudSqlSettings.prototype.dataDiskType = 0; + + /** + * CloudSqlSettings dataDiskSizeGb. + * @member {google.protobuf.IInt64Value|null|undefined} dataDiskSizeGb + * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @instance + */ + CloudSqlSettings.prototype.dataDiskSizeGb = null; + + /** + * CloudSqlSettings zone. + * @member {string} zone + * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @instance + */ + CloudSqlSettings.prototype.zone = ""; + + /** + * CloudSqlSettings secondaryZone. + * @member {string} secondaryZone + * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @instance + */ + CloudSqlSettings.prototype.secondaryZone = ""; + + /** + * CloudSqlSettings sourceId. + * @member {string} sourceId + * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @instance + */ + CloudSqlSettings.prototype.sourceId = ""; + + /** + * CloudSqlSettings rootPassword. + * @member {string} rootPassword + * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @instance + */ + CloudSqlSettings.prototype.rootPassword = ""; + + /** + * CloudSqlSettings rootPasswordSet. + * @member {boolean} rootPasswordSet + * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @instance + */ + CloudSqlSettings.prototype.rootPasswordSet = false; + + /** + * CloudSqlSettings collation. + * @member {string} collation + * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @instance + */ + CloudSqlSettings.prototype.collation = ""; + + /** + * CloudSqlSettings cmekKeyName. + * @member {string} cmekKeyName + * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @instance + */ + CloudSqlSettings.prototype.cmekKeyName = ""; + + /** + * CloudSqlSettings availabilityType. + * @member {google.cloud.clouddms.v1.CloudSqlSettings.SqlAvailabilityType} availabilityType + * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @instance + */ + CloudSqlSettings.prototype.availabilityType = 0; + + /** + * Creates a new CloudSqlSettings instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @static + * @param {google.cloud.clouddms.v1.ICloudSqlSettings=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.CloudSqlSettings} CloudSqlSettings instance + */ + CloudSqlSettings.create = function create(properties) { + return new CloudSqlSettings(properties); + }; + + /** + * Encodes the specified CloudSqlSettings message. Does not implicitly {@link google.cloud.clouddms.v1.CloudSqlSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @static + * @param {google.cloud.clouddms.v1.ICloudSqlSettings} message CloudSqlSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudSqlSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.databaseVersion != null && Object.hasOwnProperty.call(message, "databaseVersion")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.databaseVersion); + if (message.userLabels != null && Object.hasOwnProperty.call(message, "userLabels")) + for (var keys = Object.keys(message.userLabels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); + if (message.tier != null && Object.hasOwnProperty.call(message, "tier")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tier); + if (message.storageAutoResizeLimit != null && Object.hasOwnProperty.call(message, "storageAutoResizeLimit")) + $root.google.protobuf.Int64Value.encode(message.storageAutoResizeLimit, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.activationPolicy != null && Object.hasOwnProperty.call(message, "activationPolicy")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.activationPolicy); + if (message.ipConfig != null && Object.hasOwnProperty.call(message, "ipConfig")) + $root.google.cloud.clouddms.v1.SqlIpConfig.encode(message.ipConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.autoStorageIncrease != null && Object.hasOwnProperty.call(message, "autoStorageIncrease")) + $root.google.protobuf.BoolValue.encode(message.autoStorageIncrease, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.databaseFlags != null && Object.hasOwnProperty.call(message, "databaseFlags")) + for (var keys = Object.keys(message.databaseFlags), i = 0; i < keys.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.databaseFlags[keys[i]]).ldelim(); + if (message.dataDiskType != null && Object.hasOwnProperty.call(message, "dataDiskType")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.dataDiskType); + if (message.dataDiskSizeGb != null && Object.hasOwnProperty.call(message, "dataDiskSizeGb")) + $root.google.protobuf.Int64Value.encode(message.dataDiskSizeGb, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.zone); + if (message.sourceId != null && Object.hasOwnProperty.call(message, "sourceId")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.sourceId); + if (message.rootPassword != null && Object.hasOwnProperty.call(message, "rootPassword")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.rootPassword); + if (message.rootPasswordSet != null && Object.hasOwnProperty.call(message, "rootPasswordSet")) + writer.uint32(/* id 14, wireType 0 =*/112).bool(message.rootPasswordSet); + if (message.collation != null && Object.hasOwnProperty.call(message, "collation")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.collation); + if (message.cmekKeyName != null && Object.hasOwnProperty.call(message, "cmekKeyName")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.cmekKeyName); + if (message.availabilityType != null && Object.hasOwnProperty.call(message, "availabilityType")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.availabilityType); + if (message.secondaryZone != null && Object.hasOwnProperty.call(message, "secondaryZone")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.secondaryZone); + return writer; + }; + + /** + * Encodes the specified CloudSqlSettings message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.CloudSqlSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @static + * @param {google.cloud.clouddms.v1.ICloudSqlSettings} message CloudSqlSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudSqlSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudSqlSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.CloudSqlSettings} CloudSqlSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudSqlSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.CloudSqlSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.databaseVersion = reader.int32(); + break; + } + case 2: { + if (message.userLabels === $util.emptyObject) + message.userLabels = {}; + 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.userLabels[key] = value; + break; + } + case 3: { + message.tier = reader.string(); + break; + } + case 4: { + message.storageAutoResizeLimit = $root.google.protobuf.Int64Value.decode(reader, reader.uint32()); + break; + } + case 5: { + message.activationPolicy = reader.int32(); + break; + } + case 6: { + message.ipConfig = $root.google.cloud.clouddms.v1.SqlIpConfig.decode(reader, reader.uint32()); + break; + } + case 7: { + message.autoStorageIncrease = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } + case 8: { + if (message.databaseFlags === $util.emptyObject) + message.databaseFlags = {}; + 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.databaseFlags[key] = value; + break; + } + case 9: { + message.dataDiskType = reader.int32(); + break; + } + case 10: { + message.dataDiskSizeGb = $root.google.protobuf.Int64Value.decode(reader, reader.uint32()); + break; + } + case 11: { + message.zone = reader.string(); + break; + } + case 18: { + message.secondaryZone = reader.string(); + break; + } + case 12: { + message.sourceId = reader.string(); + break; + } + case 13: { + message.rootPassword = reader.string(); + break; + } + case 14: { + message.rootPasswordSet = reader.bool(); + break; + } + case 15: { + message.collation = reader.string(); + break; + } + case 16: { + message.cmekKeyName = reader.string(); + break; + } + case 17: { + message.availabilityType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudSqlSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.CloudSqlSettings} CloudSqlSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudSqlSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudSqlSettings message. + * @function verify + * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudSqlSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.databaseVersion != null && message.hasOwnProperty("databaseVersion")) + switch (message.databaseVersion) { + default: + return "databaseVersion: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 17: + break; + } + if (message.userLabels != null && message.hasOwnProperty("userLabels")) { + if (!$util.isObject(message.userLabels)) + return "userLabels: object expected"; + var key = Object.keys(message.userLabels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.userLabels[key[i]])) + return "userLabels: string{k:string} expected"; + } + if (message.tier != null && message.hasOwnProperty("tier")) + if (!$util.isString(message.tier)) + return "tier: string expected"; + if (message.storageAutoResizeLimit != null && message.hasOwnProperty("storageAutoResizeLimit")) { + var error = $root.google.protobuf.Int64Value.verify(message.storageAutoResizeLimit); + if (error) + return "storageAutoResizeLimit." + error; + } + if (message.activationPolicy != null && message.hasOwnProperty("activationPolicy")) + switch (message.activationPolicy) { + default: + return "activationPolicy: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.ipConfig != null && message.hasOwnProperty("ipConfig")) { + var error = $root.google.cloud.clouddms.v1.SqlIpConfig.verify(message.ipConfig); + if (error) + return "ipConfig." + error; + } + if (message.autoStorageIncrease != null && message.hasOwnProperty("autoStorageIncrease")) { + var error = $root.google.protobuf.BoolValue.verify(message.autoStorageIncrease); + if (error) + return "autoStorageIncrease." + error; + } + if (message.databaseFlags != null && message.hasOwnProperty("databaseFlags")) { + if (!$util.isObject(message.databaseFlags)) + return "databaseFlags: object expected"; + var key = Object.keys(message.databaseFlags); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.databaseFlags[key[i]])) + return "databaseFlags: string{k:string} expected"; + } + if (message.dataDiskType != null && message.hasOwnProperty("dataDiskType")) + switch (message.dataDiskType) { + default: + return "dataDiskType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.dataDiskSizeGb != null && message.hasOwnProperty("dataDiskSizeGb")) { + var error = $root.google.protobuf.Int64Value.verify(message.dataDiskSizeGb); + if (error) + return "dataDiskSizeGb." + error; + } + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + if (message.secondaryZone != null && message.hasOwnProperty("secondaryZone")) + if (!$util.isString(message.secondaryZone)) + return "secondaryZone: string expected"; + if (message.sourceId != null && message.hasOwnProperty("sourceId")) + if (!$util.isString(message.sourceId)) + return "sourceId: string expected"; + if (message.rootPassword != null && message.hasOwnProperty("rootPassword")) + if (!$util.isString(message.rootPassword)) + return "rootPassword: string expected"; + if (message.rootPasswordSet != null && message.hasOwnProperty("rootPasswordSet")) + if (typeof message.rootPasswordSet !== "boolean") + return "rootPasswordSet: boolean expected"; + if (message.collation != null && message.hasOwnProperty("collation")) + if (!$util.isString(message.collation)) + return "collation: string expected"; + if (message.cmekKeyName != null && message.hasOwnProperty("cmekKeyName")) + if (!$util.isString(message.cmekKeyName)) + return "cmekKeyName: string expected"; + if (message.availabilityType != null && message.hasOwnProperty("availabilityType")) + switch (message.availabilityType) { + default: + return "availabilityType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a CloudSqlSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.CloudSqlSettings} CloudSqlSettings + */ + CloudSqlSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.CloudSqlSettings) + return object; + var message = new $root.google.cloud.clouddms.v1.CloudSqlSettings(); + switch (object.databaseVersion) { + default: + if (typeof object.databaseVersion === "number") { + message.databaseVersion = object.databaseVersion; + break; + } + break; + case "SQL_DATABASE_VERSION_UNSPECIFIED": + case 0: + message.databaseVersion = 0; + break; + case "MYSQL_5_6": + case 1: + message.databaseVersion = 1; + break; + case "MYSQL_5_7": + case 2: + message.databaseVersion = 2; + break; + case "POSTGRES_9_6": + case 3: + message.databaseVersion = 3; + break; + case "POSTGRES_11": + case 4: + message.databaseVersion = 4; + break; + case "POSTGRES_10": + case 5: + message.databaseVersion = 5; + break; + case "MYSQL_8_0": + case 6: + message.databaseVersion = 6; + break; + case "POSTGRES_12": + case 7: + message.databaseVersion = 7; + break; + case "POSTGRES_13": + case 8: + message.databaseVersion = 8; + break; + case "POSTGRES_14": + case 17: + message.databaseVersion = 17; + break; + } + if (object.userLabels) { + if (typeof object.userLabels !== "object") + throw TypeError(".google.cloud.clouddms.v1.CloudSqlSettings.userLabels: object expected"); + message.userLabels = {}; + for (var keys = Object.keys(object.userLabels), i = 0; i < keys.length; ++i) + message.userLabels[keys[i]] = String(object.userLabels[keys[i]]); + } + if (object.tier != null) + message.tier = String(object.tier); + if (object.storageAutoResizeLimit != null) { + if (typeof object.storageAutoResizeLimit !== "object") + throw TypeError(".google.cloud.clouddms.v1.CloudSqlSettings.storageAutoResizeLimit: object expected"); + message.storageAutoResizeLimit = $root.google.protobuf.Int64Value.fromObject(object.storageAutoResizeLimit); + } + switch (object.activationPolicy) { + default: + if (typeof object.activationPolicy === "number") { + message.activationPolicy = object.activationPolicy; + break; + } + break; + case "SQL_ACTIVATION_POLICY_UNSPECIFIED": + case 0: + message.activationPolicy = 0; + break; + case "ALWAYS": + case 1: + message.activationPolicy = 1; + break; + case "NEVER": + case 2: + message.activationPolicy = 2; + break; + } + if (object.ipConfig != null) { + if (typeof object.ipConfig !== "object") + throw TypeError(".google.cloud.clouddms.v1.CloudSqlSettings.ipConfig: object expected"); + message.ipConfig = $root.google.cloud.clouddms.v1.SqlIpConfig.fromObject(object.ipConfig); + } + if (object.autoStorageIncrease != null) { + if (typeof object.autoStorageIncrease !== "object") + throw TypeError(".google.cloud.clouddms.v1.CloudSqlSettings.autoStorageIncrease: object expected"); + message.autoStorageIncrease = $root.google.protobuf.BoolValue.fromObject(object.autoStorageIncrease); + } + if (object.databaseFlags) { + if (typeof object.databaseFlags !== "object") + throw TypeError(".google.cloud.clouddms.v1.CloudSqlSettings.databaseFlags: object expected"); + message.databaseFlags = {}; + for (var keys = Object.keys(object.databaseFlags), i = 0; i < keys.length; ++i) + message.databaseFlags[keys[i]] = String(object.databaseFlags[keys[i]]); + } + switch (object.dataDiskType) { + default: + if (typeof object.dataDiskType === "number") { + message.dataDiskType = object.dataDiskType; + break; + } + break; + case "SQL_DATA_DISK_TYPE_UNSPECIFIED": + case 0: + message.dataDiskType = 0; + break; + case "PD_SSD": + case 1: + message.dataDiskType = 1; + break; + case "PD_HDD": + case 2: + message.dataDiskType = 2; + break; + } + if (object.dataDiskSizeGb != null) { + if (typeof object.dataDiskSizeGb !== "object") + throw TypeError(".google.cloud.clouddms.v1.CloudSqlSettings.dataDiskSizeGb: object expected"); + message.dataDiskSizeGb = $root.google.protobuf.Int64Value.fromObject(object.dataDiskSizeGb); + } + if (object.zone != null) + message.zone = String(object.zone); + if (object.secondaryZone != null) + message.secondaryZone = String(object.secondaryZone); + if (object.sourceId != null) + message.sourceId = String(object.sourceId); + if (object.rootPassword != null) + message.rootPassword = String(object.rootPassword); + if (object.rootPasswordSet != null) + message.rootPasswordSet = Boolean(object.rootPasswordSet); + if (object.collation != null) + message.collation = String(object.collation); + if (object.cmekKeyName != null) + message.cmekKeyName = String(object.cmekKeyName); + switch (object.availabilityType) { + default: + if (typeof object.availabilityType === "number") { + message.availabilityType = object.availabilityType; + break; + } + break; + case "SQL_AVAILABILITY_TYPE_UNSPECIFIED": + case 0: + message.availabilityType = 0; + break; + case "ZONAL": + case 1: + message.availabilityType = 1; + break; + case "REGIONAL": + case 2: + message.availabilityType = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a CloudSqlSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @static + * @param {google.cloud.clouddms.v1.CloudSqlSettings} message CloudSqlSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudSqlSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) { + object.userLabels = {}; + object.databaseFlags = {}; + } + if (options.defaults) { + object.databaseVersion = options.enums === String ? "SQL_DATABASE_VERSION_UNSPECIFIED" : 0; + object.tier = ""; + object.storageAutoResizeLimit = null; + object.activationPolicy = options.enums === String ? "SQL_ACTIVATION_POLICY_UNSPECIFIED" : 0; + object.ipConfig = null; + object.autoStorageIncrease = null; + object.dataDiskType = options.enums === String ? "SQL_DATA_DISK_TYPE_UNSPECIFIED" : 0; + object.dataDiskSizeGb = null; + object.zone = ""; + object.sourceId = ""; + object.rootPassword = ""; + object.rootPasswordSet = false; + object.collation = ""; + object.cmekKeyName = ""; + object.availabilityType = options.enums === String ? "SQL_AVAILABILITY_TYPE_UNSPECIFIED" : 0; + object.secondaryZone = ""; + } + if (message.databaseVersion != null && message.hasOwnProperty("databaseVersion")) + object.databaseVersion = options.enums === String ? $root.google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion[message.databaseVersion] === undefined ? message.databaseVersion : $root.google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion[message.databaseVersion] : message.databaseVersion; + var keys2; + if (message.userLabels && (keys2 = Object.keys(message.userLabels)).length) { + object.userLabels = {}; + for (var j = 0; j < keys2.length; ++j) + object.userLabels[keys2[j]] = message.userLabels[keys2[j]]; + } + if (message.tier != null && message.hasOwnProperty("tier")) + object.tier = message.tier; + if (message.storageAutoResizeLimit != null && message.hasOwnProperty("storageAutoResizeLimit")) + object.storageAutoResizeLimit = $root.google.protobuf.Int64Value.toObject(message.storageAutoResizeLimit, options); + if (message.activationPolicy != null && message.hasOwnProperty("activationPolicy")) + object.activationPolicy = options.enums === String ? $root.google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy[message.activationPolicy] === undefined ? message.activationPolicy : $root.google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy[message.activationPolicy] : message.activationPolicy; + if (message.ipConfig != null && message.hasOwnProperty("ipConfig")) + object.ipConfig = $root.google.cloud.clouddms.v1.SqlIpConfig.toObject(message.ipConfig, options); + if (message.autoStorageIncrease != null && message.hasOwnProperty("autoStorageIncrease")) + object.autoStorageIncrease = $root.google.protobuf.BoolValue.toObject(message.autoStorageIncrease, options); + if (message.databaseFlags && (keys2 = Object.keys(message.databaseFlags)).length) { + object.databaseFlags = {}; + for (var j = 0; j < keys2.length; ++j) + object.databaseFlags[keys2[j]] = message.databaseFlags[keys2[j]]; + } + if (message.dataDiskType != null && message.hasOwnProperty("dataDiskType")) + object.dataDiskType = options.enums === String ? $root.google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType[message.dataDiskType] === undefined ? message.dataDiskType : $root.google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType[message.dataDiskType] : message.dataDiskType; + if (message.dataDiskSizeGb != null && message.hasOwnProperty("dataDiskSizeGb")) + object.dataDiskSizeGb = $root.google.protobuf.Int64Value.toObject(message.dataDiskSizeGb, options); + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + if (message.sourceId != null && message.hasOwnProperty("sourceId")) + object.sourceId = message.sourceId; + if (message.rootPassword != null && message.hasOwnProperty("rootPassword")) + object.rootPassword = message.rootPassword; + if (message.rootPasswordSet != null && message.hasOwnProperty("rootPasswordSet")) + object.rootPasswordSet = message.rootPasswordSet; + if (message.collation != null && message.hasOwnProperty("collation")) + object.collation = message.collation; + if (message.cmekKeyName != null && message.hasOwnProperty("cmekKeyName")) + object.cmekKeyName = message.cmekKeyName; + if (message.availabilityType != null && message.hasOwnProperty("availabilityType")) + object.availabilityType = options.enums === String ? $root.google.cloud.clouddms.v1.CloudSqlSettings.SqlAvailabilityType[message.availabilityType] === undefined ? message.availabilityType : $root.google.cloud.clouddms.v1.CloudSqlSettings.SqlAvailabilityType[message.availabilityType] : message.availabilityType; + if (message.secondaryZone != null && message.hasOwnProperty("secondaryZone")) + object.secondaryZone = message.secondaryZone; + return object; + }; + + /** + * Converts this CloudSqlSettings to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @instance + * @returns {Object.} JSON object + */ + CloudSqlSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudSqlSettings + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.CloudSqlSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudSqlSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.CloudSqlSettings"; + }; + + /** + * SqlActivationPolicy enum. + * @name google.cloud.clouddms.v1.CloudSqlSettings.SqlActivationPolicy + * @enum {number} + * @property {number} SQL_ACTIVATION_POLICY_UNSPECIFIED=0 SQL_ACTIVATION_POLICY_UNSPECIFIED value + * @property {number} ALWAYS=1 ALWAYS value + * @property {number} NEVER=2 NEVER value + */ + CloudSqlSettings.SqlActivationPolicy = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SQL_ACTIVATION_POLICY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ALWAYS"] = 1; + values[valuesById[2] = "NEVER"] = 2; + return values; + })(); + + /** + * SqlDataDiskType enum. + * @name google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType + * @enum {number} + * @property {number} SQL_DATA_DISK_TYPE_UNSPECIFIED=0 SQL_DATA_DISK_TYPE_UNSPECIFIED value + * @property {number} PD_SSD=1 PD_SSD value + * @property {number} PD_HDD=2 PD_HDD value + */ + CloudSqlSettings.SqlDataDiskType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SQL_DATA_DISK_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PD_SSD"] = 1; + values[valuesById[2] = "PD_HDD"] = 2; + return values; + })(); + + /** + * SqlDatabaseVersion enum. + * @name google.cloud.clouddms.v1.CloudSqlSettings.SqlDatabaseVersion + * @enum {number} + * @property {number} SQL_DATABASE_VERSION_UNSPECIFIED=0 SQL_DATABASE_VERSION_UNSPECIFIED value + * @property {number} MYSQL_5_6=1 MYSQL_5_6 value + * @property {number} MYSQL_5_7=2 MYSQL_5_7 value + * @property {number} POSTGRES_9_6=3 POSTGRES_9_6 value + * @property {number} POSTGRES_11=4 POSTGRES_11 value + * @property {number} POSTGRES_10=5 POSTGRES_10 value + * @property {number} MYSQL_8_0=6 MYSQL_8_0 value + * @property {number} POSTGRES_12=7 POSTGRES_12 value + * @property {number} POSTGRES_13=8 POSTGRES_13 value + * @property {number} POSTGRES_14=17 POSTGRES_14 value + */ + CloudSqlSettings.SqlDatabaseVersion = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SQL_DATABASE_VERSION_UNSPECIFIED"] = 0; + values[valuesById[1] = "MYSQL_5_6"] = 1; + values[valuesById[2] = "MYSQL_5_7"] = 2; + values[valuesById[3] = "POSTGRES_9_6"] = 3; + values[valuesById[4] = "POSTGRES_11"] = 4; + values[valuesById[5] = "POSTGRES_10"] = 5; + values[valuesById[6] = "MYSQL_8_0"] = 6; + values[valuesById[7] = "POSTGRES_12"] = 7; + values[valuesById[8] = "POSTGRES_13"] = 8; + values[valuesById[17] = "POSTGRES_14"] = 17; + return values; + })(); + + /** + * SqlAvailabilityType enum. + * @name google.cloud.clouddms.v1.CloudSqlSettings.SqlAvailabilityType + * @enum {number} + * @property {number} SQL_AVAILABILITY_TYPE_UNSPECIFIED=0 SQL_AVAILABILITY_TYPE_UNSPECIFIED value + * @property {number} ZONAL=1 ZONAL value + * @property {number} REGIONAL=2 REGIONAL value + */ + CloudSqlSettings.SqlAvailabilityType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SQL_AVAILABILITY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ZONAL"] = 1; + values[valuesById[2] = "REGIONAL"] = 2; + return values; + })(); + + return CloudSqlSettings; + })(); + + v1.AlloyDbSettings = (function() { + + /** + * Properties of an AlloyDbSettings. + * @memberof google.cloud.clouddms.v1 + * @interface IAlloyDbSettings + * @property {google.cloud.clouddms.v1.AlloyDbSettings.IUserPassword|null} [initialUser] AlloyDbSettings initialUser + * @property {string|null} [vpcNetwork] AlloyDbSettings vpcNetwork + * @property {Object.|null} [labels] AlloyDbSettings labels + * @property {google.cloud.clouddms.v1.AlloyDbSettings.IPrimaryInstanceSettings|null} [primaryInstanceSettings] AlloyDbSettings primaryInstanceSettings + * @property {google.cloud.clouddms.v1.AlloyDbSettings.IEncryptionConfig|null} [encryptionConfig] AlloyDbSettings encryptionConfig + */ + + /** + * Constructs a new AlloyDbSettings. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents an AlloyDbSettings. + * @implements IAlloyDbSettings + * @constructor + * @param {google.cloud.clouddms.v1.IAlloyDbSettings=} [properties] Properties to set + */ + function AlloyDbSettings(properties) { + this.labels = {}; + 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]]; + } + + /** + * AlloyDbSettings initialUser. + * @member {google.cloud.clouddms.v1.AlloyDbSettings.IUserPassword|null|undefined} initialUser + * @memberof google.cloud.clouddms.v1.AlloyDbSettings + * @instance + */ + AlloyDbSettings.prototype.initialUser = null; + + /** + * AlloyDbSettings vpcNetwork. + * @member {string} vpcNetwork + * @memberof google.cloud.clouddms.v1.AlloyDbSettings + * @instance + */ + AlloyDbSettings.prototype.vpcNetwork = ""; + + /** + * AlloyDbSettings labels. + * @member {Object.} labels + * @memberof google.cloud.clouddms.v1.AlloyDbSettings + * @instance + */ + AlloyDbSettings.prototype.labels = $util.emptyObject; + + /** + * AlloyDbSettings primaryInstanceSettings. + * @member {google.cloud.clouddms.v1.AlloyDbSettings.IPrimaryInstanceSettings|null|undefined} primaryInstanceSettings + * @memberof google.cloud.clouddms.v1.AlloyDbSettings + * @instance + */ + AlloyDbSettings.prototype.primaryInstanceSettings = null; + + /** + * AlloyDbSettings encryptionConfig. + * @member {google.cloud.clouddms.v1.AlloyDbSettings.IEncryptionConfig|null|undefined} encryptionConfig + * @memberof google.cloud.clouddms.v1.AlloyDbSettings + * @instance + */ + AlloyDbSettings.prototype.encryptionConfig = null; + + /** + * Creates a new AlloyDbSettings instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.AlloyDbSettings + * @static + * @param {google.cloud.clouddms.v1.IAlloyDbSettings=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.AlloyDbSettings} AlloyDbSettings instance + */ + AlloyDbSettings.create = function create(properties) { + return new AlloyDbSettings(properties); + }; + + /** + * Encodes the specified AlloyDbSettings message. Does not implicitly {@link google.cloud.clouddms.v1.AlloyDbSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.AlloyDbSettings + * @static + * @param {google.cloud.clouddms.v1.IAlloyDbSettings} message AlloyDbSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AlloyDbSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initialUser != null && Object.hasOwnProperty.call(message, "initialUser")) + $root.google.cloud.clouddms.v1.AlloyDbSettings.UserPassword.encode(message.initialUser, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.vpcNetwork != null && Object.hasOwnProperty.call(message, "vpcNetwork")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.vpcNetwork); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), 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.labels[keys[i]]).ldelim(); + if (message.primaryInstanceSettings != null && Object.hasOwnProperty.call(message, "primaryInstanceSettings")) + $root.google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.encode(message.primaryInstanceSettings, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.encryptionConfig != null && Object.hasOwnProperty.call(message, "encryptionConfig")) + $root.google.cloud.clouddms.v1.AlloyDbSettings.EncryptionConfig.encode(message.encryptionConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AlloyDbSettings message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.AlloyDbSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.AlloyDbSettings + * @static + * @param {google.cloud.clouddms.v1.IAlloyDbSettings} message AlloyDbSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AlloyDbSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AlloyDbSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.AlloyDbSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.AlloyDbSettings} AlloyDbSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AlloyDbSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.AlloyDbSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.initialUser = $root.google.cloud.clouddms.v1.AlloyDbSettings.UserPassword.decode(reader, reader.uint32()); + break; + } + case 2: { + message.vpcNetwork = reader.string(); + break; + } + case 3: { + if (message.labels === $util.emptyObject) + message.labels = {}; + 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.labels[key] = value; + break; + } + case 4: { + message.primaryInstanceSettings = $root.google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.decode(reader, reader.uint32()); + break; + } + case 5: { + message.encryptionConfig = $root.google.cloud.clouddms.v1.AlloyDbSettings.EncryptionConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AlloyDbSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.AlloyDbSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.AlloyDbSettings} AlloyDbSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AlloyDbSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AlloyDbSettings message. + * @function verify + * @memberof google.cloud.clouddms.v1.AlloyDbSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AlloyDbSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.initialUser != null && message.hasOwnProperty("initialUser")) { + var error = $root.google.cloud.clouddms.v1.AlloyDbSettings.UserPassword.verify(message.initialUser); + if (error) + return "initialUser." + error; + } + if (message.vpcNetwork != null && message.hasOwnProperty("vpcNetwork")) + if (!$util.isString(message.vpcNetwork)) + return "vpcNetwork: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.primaryInstanceSettings != null && message.hasOwnProperty("primaryInstanceSettings")) { + var error = $root.google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.verify(message.primaryInstanceSettings); + if (error) + return "primaryInstanceSettings." + error; + } + if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) { + var error = $root.google.cloud.clouddms.v1.AlloyDbSettings.EncryptionConfig.verify(message.encryptionConfig); + if (error) + return "encryptionConfig." + error; + } + return null; + }; + + /** + * Creates an AlloyDbSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.AlloyDbSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.AlloyDbSettings} AlloyDbSettings + */ + AlloyDbSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.AlloyDbSettings) + return object; + var message = new $root.google.cloud.clouddms.v1.AlloyDbSettings(); + if (object.initialUser != null) { + if (typeof object.initialUser !== "object") + throw TypeError(".google.cloud.clouddms.v1.AlloyDbSettings.initialUser: object expected"); + message.initialUser = $root.google.cloud.clouddms.v1.AlloyDbSettings.UserPassword.fromObject(object.initialUser); + } + if (object.vpcNetwork != null) + message.vpcNetwork = String(object.vpcNetwork); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.clouddms.v1.AlloyDbSettings.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.primaryInstanceSettings != null) { + if (typeof object.primaryInstanceSettings !== "object") + throw TypeError(".google.cloud.clouddms.v1.AlloyDbSettings.primaryInstanceSettings: object expected"); + message.primaryInstanceSettings = $root.google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.fromObject(object.primaryInstanceSettings); + } + if (object.encryptionConfig != null) { + if (typeof object.encryptionConfig !== "object") + throw TypeError(".google.cloud.clouddms.v1.AlloyDbSettings.encryptionConfig: object expected"); + message.encryptionConfig = $root.google.cloud.clouddms.v1.AlloyDbSettings.EncryptionConfig.fromObject(object.encryptionConfig); + } + return message; + }; + + /** + * Creates a plain object from an AlloyDbSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.AlloyDbSettings + * @static + * @param {google.cloud.clouddms.v1.AlloyDbSettings} message AlloyDbSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AlloyDbSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.initialUser = null; + object.vpcNetwork = ""; + object.primaryInstanceSettings = null; + object.encryptionConfig = null; + } + if (message.initialUser != null && message.hasOwnProperty("initialUser")) + object.initialUser = $root.google.cloud.clouddms.v1.AlloyDbSettings.UserPassword.toObject(message.initialUser, options); + if (message.vpcNetwork != null && message.hasOwnProperty("vpcNetwork")) + object.vpcNetwork = message.vpcNetwork; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.primaryInstanceSettings != null && message.hasOwnProperty("primaryInstanceSettings")) + object.primaryInstanceSettings = $root.google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.toObject(message.primaryInstanceSettings, options); + if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) + object.encryptionConfig = $root.google.cloud.clouddms.v1.AlloyDbSettings.EncryptionConfig.toObject(message.encryptionConfig, options); + return object; + }; + + /** + * Converts this AlloyDbSettings to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.AlloyDbSettings + * @instance + * @returns {Object.} JSON object + */ + AlloyDbSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AlloyDbSettings + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.AlloyDbSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AlloyDbSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.AlloyDbSettings"; + }; + + AlloyDbSettings.UserPassword = (function() { + + /** + * Properties of a UserPassword. + * @memberof google.cloud.clouddms.v1.AlloyDbSettings + * @interface IUserPassword + * @property {string|null} [user] UserPassword user + * @property {string|null} [password] UserPassword password + * @property {boolean|null} [passwordSet] UserPassword passwordSet + */ + + /** + * Constructs a new UserPassword. + * @memberof google.cloud.clouddms.v1.AlloyDbSettings + * @classdesc Represents a UserPassword. + * @implements IUserPassword + * @constructor + * @param {google.cloud.clouddms.v1.AlloyDbSettings.IUserPassword=} [properties] Properties to set + */ + function UserPassword(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]]; + } + + /** + * UserPassword user. + * @member {string} user + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.UserPassword + * @instance + */ + UserPassword.prototype.user = ""; + + /** + * UserPassword password. + * @member {string} password + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.UserPassword + * @instance + */ + UserPassword.prototype.password = ""; + + /** + * UserPassword passwordSet. + * @member {boolean} passwordSet + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.UserPassword + * @instance + */ + UserPassword.prototype.passwordSet = false; + + /** + * Creates a new UserPassword instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.UserPassword + * @static + * @param {google.cloud.clouddms.v1.AlloyDbSettings.IUserPassword=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.AlloyDbSettings.UserPassword} UserPassword instance + */ + UserPassword.create = function create(properties) { + return new UserPassword(properties); + }; + + /** + * Encodes the specified UserPassword message. Does not implicitly {@link google.cloud.clouddms.v1.AlloyDbSettings.UserPassword.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.UserPassword + * @static + * @param {google.cloud.clouddms.v1.AlloyDbSettings.IUserPassword} message UserPassword message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserPassword.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.user != null && Object.hasOwnProperty.call(message, "user")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.user); + if (message.password != null && Object.hasOwnProperty.call(message, "password")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.password); + if (message.passwordSet != null && Object.hasOwnProperty.call(message, "passwordSet")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.passwordSet); + return writer; + }; + + /** + * Encodes the specified UserPassword message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.AlloyDbSettings.UserPassword.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.UserPassword + * @static + * @param {google.cloud.clouddms.v1.AlloyDbSettings.IUserPassword} message UserPassword message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserPassword.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserPassword message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.UserPassword + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.AlloyDbSettings.UserPassword} UserPassword + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserPassword.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.AlloyDbSettings.UserPassword(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.user = reader.string(); + break; + } + case 2: { + message.password = reader.string(); + break; + } + case 3: { + message.passwordSet = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserPassword message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.UserPassword + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.AlloyDbSettings.UserPassword} UserPassword + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserPassword.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserPassword message. + * @function verify + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.UserPassword + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserPassword.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.user != null && message.hasOwnProperty("user")) + if (!$util.isString(message.user)) + return "user: string expected"; + if (message.password != null && message.hasOwnProperty("password")) + if (!$util.isString(message.password)) + return "password: string expected"; + if (message.passwordSet != null && message.hasOwnProperty("passwordSet")) + if (typeof message.passwordSet !== "boolean") + return "passwordSet: boolean expected"; + return null; + }; + + /** + * Creates a UserPassword message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.UserPassword + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.AlloyDbSettings.UserPassword} UserPassword + */ + UserPassword.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.AlloyDbSettings.UserPassword) + return object; + var message = new $root.google.cloud.clouddms.v1.AlloyDbSettings.UserPassword(); + if (object.user != null) + message.user = String(object.user); + if (object.password != null) + message.password = String(object.password); + if (object.passwordSet != null) + message.passwordSet = Boolean(object.passwordSet); + return message; + }; + + /** + * Creates a plain object from a UserPassword message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.UserPassword + * @static + * @param {google.cloud.clouddms.v1.AlloyDbSettings.UserPassword} message UserPassword + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserPassword.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.user = ""; + object.password = ""; + object.passwordSet = false; + } + if (message.user != null && message.hasOwnProperty("user")) + object.user = message.user; + if (message.password != null && message.hasOwnProperty("password")) + object.password = message.password; + if (message.passwordSet != null && message.hasOwnProperty("passwordSet")) + object.passwordSet = message.passwordSet; + return object; + }; + + /** + * Converts this UserPassword to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.UserPassword + * @instance + * @returns {Object.} JSON object + */ + UserPassword.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserPassword + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.UserPassword + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserPassword.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.AlloyDbSettings.UserPassword"; + }; + + return UserPassword; + })(); + + AlloyDbSettings.PrimaryInstanceSettings = (function() { + + /** + * Properties of a PrimaryInstanceSettings. + * @memberof google.cloud.clouddms.v1.AlloyDbSettings + * @interface IPrimaryInstanceSettings + * @property {string|null} [id] PrimaryInstanceSettings id + * @property {google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.IMachineConfig|null} [machineConfig] PrimaryInstanceSettings machineConfig + * @property {Object.|null} [databaseFlags] PrimaryInstanceSettings databaseFlags + * @property {Object.|null} [labels] PrimaryInstanceSettings labels + * @property {string|null} [privateIp] PrimaryInstanceSettings privateIp + */ + + /** + * Constructs a new PrimaryInstanceSettings. + * @memberof google.cloud.clouddms.v1.AlloyDbSettings + * @classdesc Represents a PrimaryInstanceSettings. + * @implements IPrimaryInstanceSettings + * @constructor + * @param {google.cloud.clouddms.v1.AlloyDbSettings.IPrimaryInstanceSettings=} [properties] Properties to set + */ + function PrimaryInstanceSettings(properties) { + this.databaseFlags = {}; + this.labels = {}; + 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]]; + } + + /** + * PrimaryInstanceSettings id. + * @member {string} id + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings + * @instance + */ + PrimaryInstanceSettings.prototype.id = ""; + + /** + * PrimaryInstanceSettings machineConfig. + * @member {google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.IMachineConfig|null|undefined} machineConfig + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings + * @instance + */ + PrimaryInstanceSettings.prototype.machineConfig = null; + + /** + * PrimaryInstanceSettings databaseFlags. + * @member {Object.} databaseFlags + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings + * @instance + */ + PrimaryInstanceSettings.prototype.databaseFlags = $util.emptyObject; + + /** + * PrimaryInstanceSettings labels. + * @member {Object.} labels + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings + * @instance + */ + PrimaryInstanceSettings.prototype.labels = $util.emptyObject; + + /** + * PrimaryInstanceSettings privateIp. + * @member {string} privateIp + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings + * @instance + */ + PrimaryInstanceSettings.prototype.privateIp = ""; + + /** + * Creates a new PrimaryInstanceSettings instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings + * @static + * @param {google.cloud.clouddms.v1.AlloyDbSettings.IPrimaryInstanceSettings=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings} PrimaryInstanceSettings instance + */ + PrimaryInstanceSettings.create = function create(properties) { + return new PrimaryInstanceSettings(properties); + }; + + /** + * Encodes the specified PrimaryInstanceSettings message. Does not implicitly {@link google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings + * @static + * @param {google.cloud.clouddms.v1.AlloyDbSettings.IPrimaryInstanceSettings} message PrimaryInstanceSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrimaryInstanceSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.machineConfig != null && Object.hasOwnProperty.call(message, "machineConfig")) + $root.google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig.encode(message.machineConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.databaseFlags != null && Object.hasOwnProperty.call(message, "databaseFlags")) + for (var keys = Object.keys(message.databaseFlags), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.databaseFlags[keys[i]]).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.privateIp != null && Object.hasOwnProperty.call(message, "privateIp")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.privateIp); + return writer; + }; + + /** + * Encodes the specified PrimaryInstanceSettings message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings + * @static + * @param {google.cloud.clouddms.v1.AlloyDbSettings.IPrimaryInstanceSettings} message PrimaryInstanceSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrimaryInstanceSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrimaryInstanceSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings} PrimaryInstanceSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrimaryInstanceSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.machineConfig = $root.google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig.decode(reader, reader.uint32()); + break; + } + case 6: { + if (message.databaseFlags === $util.emptyObject) + message.databaseFlags = {}; + 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.databaseFlags[key] = value; + break; + } + case 7: { + if (message.labels === $util.emptyObject) + message.labels = {}; + 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.labels[key] = value; + break; + } + case 8: { + message.privateIp = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PrimaryInstanceSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings} PrimaryInstanceSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrimaryInstanceSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrimaryInstanceSettings message. + * @function verify + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrimaryInstanceSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.machineConfig != null && message.hasOwnProperty("machineConfig")) { + var error = $root.google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig.verify(message.machineConfig); + if (error) + return "machineConfig." + error; + } + if (message.databaseFlags != null && message.hasOwnProperty("databaseFlags")) { + if (!$util.isObject(message.databaseFlags)) + return "databaseFlags: object expected"; + var key = Object.keys(message.databaseFlags); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.databaseFlags[key[i]])) + return "databaseFlags: string{k:string} expected"; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.privateIp != null && message.hasOwnProperty("privateIp")) + if (!$util.isString(message.privateIp)) + return "privateIp: string expected"; + return null; + }; + + /** + * Creates a PrimaryInstanceSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings} PrimaryInstanceSettings + */ + PrimaryInstanceSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings) + return object; + var message = new $root.google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings(); + if (object.id != null) + message.id = String(object.id); + if (object.machineConfig != null) { + if (typeof object.machineConfig !== "object") + throw TypeError(".google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.machineConfig: object expected"); + message.machineConfig = $root.google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig.fromObject(object.machineConfig); + } + if (object.databaseFlags) { + if (typeof object.databaseFlags !== "object") + throw TypeError(".google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.databaseFlags: object expected"); + message.databaseFlags = {}; + for (var keys = Object.keys(object.databaseFlags), i = 0; i < keys.length; ++i) + message.databaseFlags[keys[i]] = String(object.databaseFlags[keys[i]]); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.privateIp != null) + message.privateIp = String(object.privateIp); + return message; + }; + + /** + * Creates a plain object from a PrimaryInstanceSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings + * @static + * @param {google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings} message PrimaryInstanceSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrimaryInstanceSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) { + object.databaseFlags = {}; + object.labels = {}; + } + if (options.defaults) { + object.id = ""; + object.machineConfig = null; + object.privateIp = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.machineConfig != null && message.hasOwnProperty("machineConfig")) + object.machineConfig = $root.google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig.toObject(message.machineConfig, options); + var keys2; + if (message.databaseFlags && (keys2 = Object.keys(message.databaseFlags)).length) { + object.databaseFlags = {}; + for (var j = 0; j < keys2.length; ++j) + object.databaseFlags[keys2[j]] = message.databaseFlags[keys2[j]]; + } + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.privateIp != null && message.hasOwnProperty("privateIp")) + object.privateIp = message.privateIp; + return object; + }; + + /** + * Converts this PrimaryInstanceSettings to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings + * @instance + * @returns {Object.} JSON object + */ + PrimaryInstanceSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PrimaryInstanceSettings + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrimaryInstanceSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings"; + }; + + PrimaryInstanceSettings.MachineConfig = (function() { + + /** + * Properties of a MachineConfig. + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings + * @interface IMachineConfig + * @property {number|null} [cpuCount] MachineConfig cpuCount + */ + + /** + * Constructs a new MachineConfig. + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings + * @classdesc Represents a MachineConfig. + * @implements IMachineConfig + * @constructor + * @param {google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.IMachineConfig=} [properties] Properties to set + */ + function MachineConfig(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]]; + } + + /** + * MachineConfig cpuCount. + * @member {number} cpuCount + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig + * @instance + */ + MachineConfig.prototype.cpuCount = 0; + + /** + * Creates a new MachineConfig instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig + * @static + * @param {google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.IMachineConfig=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig} MachineConfig instance + */ + MachineConfig.create = function create(properties) { + return new MachineConfig(properties); + }; + + /** + * Encodes the specified MachineConfig message. Does not implicitly {@link google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig + * @static + * @param {google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.IMachineConfig} message MachineConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MachineConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cpuCount != null && Object.hasOwnProperty.call(message, "cpuCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.cpuCount); + return writer; + }; + + /** + * Encodes the specified MachineConfig message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig + * @static + * @param {google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.IMachineConfig} message MachineConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MachineConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MachineConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig} MachineConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MachineConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cpuCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MachineConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig} MachineConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MachineConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MachineConfig message. + * @function verify + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MachineConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cpuCount != null && message.hasOwnProperty("cpuCount")) + if (!$util.isInteger(message.cpuCount)) + return "cpuCount: integer expected"; + return null; + }; + + /** + * Creates a MachineConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig} MachineConfig + */ + MachineConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig) + return object; + var message = new $root.google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig(); + if (object.cpuCount != null) + message.cpuCount = object.cpuCount | 0; + return message; + }; + + /** + * Creates a plain object from a MachineConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig + * @static + * @param {google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig} message MachineConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MachineConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.cpuCount = 0; + if (message.cpuCount != null && message.hasOwnProperty("cpuCount")) + object.cpuCount = message.cpuCount; + return object; + }; + + /** + * Converts this MachineConfig to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig + * @instance + * @returns {Object.} JSON object + */ + MachineConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MachineConfig + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MachineConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.AlloyDbSettings.PrimaryInstanceSettings.MachineConfig"; + }; + + return MachineConfig; + })(); + + return PrimaryInstanceSettings; + })(); + + AlloyDbSettings.EncryptionConfig = (function() { + + /** + * Properties of an EncryptionConfig. + * @memberof google.cloud.clouddms.v1.AlloyDbSettings + * @interface IEncryptionConfig + * @property {string|null} [kmsKeyName] EncryptionConfig kmsKeyName + */ + + /** + * Constructs a new EncryptionConfig. + * @memberof google.cloud.clouddms.v1.AlloyDbSettings + * @classdesc Represents an EncryptionConfig. + * @implements IEncryptionConfig + * @constructor + * @param {google.cloud.clouddms.v1.AlloyDbSettings.IEncryptionConfig=} [properties] Properties to set + */ + function EncryptionConfig(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]]; + } + + /** + * EncryptionConfig kmsKeyName. + * @member {string} kmsKeyName + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.EncryptionConfig + * @instance + */ + EncryptionConfig.prototype.kmsKeyName = ""; + + /** + * Creates a new EncryptionConfig instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.EncryptionConfig + * @static + * @param {google.cloud.clouddms.v1.AlloyDbSettings.IEncryptionConfig=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.AlloyDbSettings.EncryptionConfig} EncryptionConfig instance + */ + EncryptionConfig.create = function create(properties) { + return new EncryptionConfig(properties); + }; + + /** + * Encodes the specified EncryptionConfig message. Does not implicitly {@link google.cloud.clouddms.v1.AlloyDbSettings.EncryptionConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.EncryptionConfig + * @static + * @param {google.cloud.clouddms.v1.AlloyDbSettings.IEncryptionConfig} message EncryptionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kmsKeyName); + return writer; + }; + + /** + * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.AlloyDbSettings.EncryptionConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.EncryptionConfig + * @static + * @param {google.cloud.clouddms.v1.AlloyDbSettings.IEncryptionConfig} message EncryptionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.EncryptionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.AlloyDbSettings.EncryptionConfig} EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.AlloyDbSettings.EncryptionConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.kmsKeyName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.EncryptionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.AlloyDbSettings.EncryptionConfig} EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EncryptionConfig message. + * @function verify + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.EncryptionConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EncryptionConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (!$util.isString(message.kmsKeyName)) + return "kmsKeyName: string expected"; + return null; + }; + + /** + * Creates an EncryptionConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.EncryptionConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.AlloyDbSettings.EncryptionConfig} EncryptionConfig + */ + EncryptionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.AlloyDbSettings.EncryptionConfig) + return object; + var message = new $root.google.cloud.clouddms.v1.AlloyDbSettings.EncryptionConfig(); + if (object.kmsKeyName != null) + message.kmsKeyName = String(object.kmsKeyName); + return message; + }; + + /** + * Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.EncryptionConfig + * @static + * @param {google.cloud.clouddms.v1.AlloyDbSettings.EncryptionConfig} message EncryptionConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EncryptionConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.kmsKeyName = ""; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + object.kmsKeyName = message.kmsKeyName; + return object; + }; + + /** + * Converts this EncryptionConfig to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.EncryptionConfig + * @instance + * @returns {Object.} JSON object + */ + EncryptionConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EncryptionConfig + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.AlloyDbSettings.EncryptionConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EncryptionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.AlloyDbSettings.EncryptionConfig"; + }; + + return EncryptionConfig; + })(); + + return AlloyDbSettings; + })(); + + v1.StaticIpConnectivity = (function() { + + /** + * Properties of a StaticIpConnectivity. + * @memberof google.cloud.clouddms.v1 + * @interface IStaticIpConnectivity + */ + + /** + * Constructs a new StaticIpConnectivity. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a StaticIpConnectivity. + * @implements IStaticIpConnectivity + * @constructor + * @param {google.cloud.clouddms.v1.IStaticIpConnectivity=} [properties] Properties to set + */ + function StaticIpConnectivity(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]]; + } + + /** + * Creates a new StaticIpConnectivity instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.StaticIpConnectivity + * @static + * @param {google.cloud.clouddms.v1.IStaticIpConnectivity=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.StaticIpConnectivity} StaticIpConnectivity instance + */ + StaticIpConnectivity.create = function create(properties) { + return new StaticIpConnectivity(properties); + }; + + /** + * Encodes the specified StaticIpConnectivity message. Does not implicitly {@link google.cloud.clouddms.v1.StaticIpConnectivity.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.StaticIpConnectivity + * @static + * @param {google.cloud.clouddms.v1.IStaticIpConnectivity} message StaticIpConnectivity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StaticIpConnectivity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified StaticIpConnectivity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.StaticIpConnectivity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.StaticIpConnectivity + * @static + * @param {google.cloud.clouddms.v1.IStaticIpConnectivity} message StaticIpConnectivity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StaticIpConnectivity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StaticIpConnectivity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.StaticIpConnectivity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.StaticIpConnectivity} StaticIpConnectivity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StaticIpConnectivity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.StaticIpConnectivity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StaticIpConnectivity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.StaticIpConnectivity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.StaticIpConnectivity} StaticIpConnectivity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StaticIpConnectivity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StaticIpConnectivity message. + * @function verify + * @memberof google.cloud.clouddms.v1.StaticIpConnectivity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StaticIpConnectivity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a StaticIpConnectivity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.StaticIpConnectivity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.StaticIpConnectivity} StaticIpConnectivity + */ + StaticIpConnectivity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.StaticIpConnectivity) + return object; + return new $root.google.cloud.clouddms.v1.StaticIpConnectivity(); + }; + + /** + * Creates a plain object from a StaticIpConnectivity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.StaticIpConnectivity + * @static + * @param {google.cloud.clouddms.v1.StaticIpConnectivity} message StaticIpConnectivity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StaticIpConnectivity.toObject = function toObject() { + return {}; + }; + + /** + * Converts this StaticIpConnectivity to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.StaticIpConnectivity + * @instance + * @returns {Object.} JSON object + */ + StaticIpConnectivity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StaticIpConnectivity + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.StaticIpConnectivity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StaticIpConnectivity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.StaticIpConnectivity"; + }; + + return StaticIpConnectivity; + })(); + + v1.PrivateServiceConnectConnectivity = (function() { + + /** + * Properties of a PrivateServiceConnectConnectivity. + * @memberof google.cloud.clouddms.v1 + * @interface IPrivateServiceConnectConnectivity + * @property {string|null} [serviceAttachment] PrivateServiceConnectConnectivity serviceAttachment + */ + + /** + * Constructs a new PrivateServiceConnectConnectivity. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a PrivateServiceConnectConnectivity. + * @implements IPrivateServiceConnectConnectivity + * @constructor + * @param {google.cloud.clouddms.v1.IPrivateServiceConnectConnectivity=} [properties] Properties to set + */ + function PrivateServiceConnectConnectivity(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]]; + } + + /** + * PrivateServiceConnectConnectivity serviceAttachment. + * @member {string} serviceAttachment + * @memberof google.cloud.clouddms.v1.PrivateServiceConnectConnectivity + * @instance + */ + PrivateServiceConnectConnectivity.prototype.serviceAttachment = ""; + + /** + * Creates a new PrivateServiceConnectConnectivity instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.PrivateServiceConnectConnectivity + * @static + * @param {google.cloud.clouddms.v1.IPrivateServiceConnectConnectivity=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.PrivateServiceConnectConnectivity} PrivateServiceConnectConnectivity instance + */ + PrivateServiceConnectConnectivity.create = function create(properties) { + return new PrivateServiceConnectConnectivity(properties); + }; + + /** + * Encodes the specified PrivateServiceConnectConnectivity message. Does not implicitly {@link google.cloud.clouddms.v1.PrivateServiceConnectConnectivity.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.PrivateServiceConnectConnectivity + * @static + * @param {google.cloud.clouddms.v1.IPrivateServiceConnectConnectivity} message PrivateServiceConnectConnectivity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateServiceConnectConnectivity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serviceAttachment != null && Object.hasOwnProperty.call(message, "serviceAttachment")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.serviceAttachment); + return writer; + }; + + /** + * Encodes the specified PrivateServiceConnectConnectivity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.PrivateServiceConnectConnectivity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.PrivateServiceConnectConnectivity + * @static + * @param {google.cloud.clouddms.v1.IPrivateServiceConnectConnectivity} message PrivateServiceConnectConnectivity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateServiceConnectConnectivity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrivateServiceConnectConnectivity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.PrivateServiceConnectConnectivity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.PrivateServiceConnectConnectivity} PrivateServiceConnectConnectivity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateServiceConnectConnectivity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.PrivateServiceConnectConnectivity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.serviceAttachment = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PrivateServiceConnectConnectivity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.PrivateServiceConnectConnectivity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.PrivateServiceConnectConnectivity} PrivateServiceConnectConnectivity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateServiceConnectConnectivity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrivateServiceConnectConnectivity message. + * @function verify + * @memberof google.cloud.clouddms.v1.PrivateServiceConnectConnectivity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrivateServiceConnectConnectivity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serviceAttachment != null && message.hasOwnProperty("serviceAttachment")) + if (!$util.isString(message.serviceAttachment)) + return "serviceAttachment: string expected"; + return null; + }; + + /** + * Creates a PrivateServiceConnectConnectivity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.PrivateServiceConnectConnectivity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.PrivateServiceConnectConnectivity} PrivateServiceConnectConnectivity + */ + PrivateServiceConnectConnectivity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.PrivateServiceConnectConnectivity) + return object; + var message = new $root.google.cloud.clouddms.v1.PrivateServiceConnectConnectivity(); + if (object.serviceAttachment != null) + message.serviceAttachment = String(object.serviceAttachment); + return message; + }; + + /** + * Creates a plain object from a PrivateServiceConnectConnectivity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.PrivateServiceConnectConnectivity + * @static + * @param {google.cloud.clouddms.v1.PrivateServiceConnectConnectivity} message PrivateServiceConnectConnectivity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrivateServiceConnectConnectivity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.serviceAttachment = ""; + if (message.serviceAttachment != null && message.hasOwnProperty("serviceAttachment")) + object.serviceAttachment = message.serviceAttachment; + return object; + }; + + /** + * Converts this PrivateServiceConnectConnectivity to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.PrivateServiceConnectConnectivity + * @instance + * @returns {Object.} JSON object + */ + PrivateServiceConnectConnectivity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PrivateServiceConnectConnectivity + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.PrivateServiceConnectConnectivity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrivateServiceConnectConnectivity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.PrivateServiceConnectConnectivity"; + }; + + return PrivateServiceConnectConnectivity; + })(); + + v1.ReverseSshConnectivity = (function() { + + /** + * Properties of a ReverseSshConnectivity. + * @memberof google.cloud.clouddms.v1 + * @interface IReverseSshConnectivity + * @property {string|null} [vmIp] ReverseSshConnectivity vmIp + * @property {number|null} [vmPort] ReverseSshConnectivity vmPort + * @property {string|null} [vm] ReverseSshConnectivity vm + * @property {string|null} [vpc] ReverseSshConnectivity vpc + */ + + /** + * Constructs a new ReverseSshConnectivity. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a ReverseSshConnectivity. + * @implements IReverseSshConnectivity + * @constructor + * @param {google.cloud.clouddms.v1.IReverseSshConnectivity=} [properties] Properties to set + */ + function ReverseSshConnectivity(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]]; + } + + /** + * ReverseSshConnectivity vmIp. + * @member {string} vmIp + * @memberof google.cloud.clouddms.v1.ReverseSshConnectivity + * @instance + */ + ReverseSshConnectivity.prototype.vmIp = ""; + + /** + * ReverseSshConnectivity vmPort. + * @member {number} vmPort + * @memberof google.cloud.clouddms.v1.ReverseSshConnectivity + * @instance + */ + ReverseSshConnectivity.prototype.vmPort = 0; + + /** + * ReverseSshConnectivity vm. + * @member {string} vm + * @memberof google.cloud.clouddms.v1.ReverseSshConnectivity + * @instance + */ + ReverseSshConnectivity.prototype.vm = ""; + + /** + * ReverseSshConnectivity vpc. + * @member {string} vpc + * @memberof google.cloud.clouddms.v1.ReverseSshConnectivity + * @instance + */ + ReverseSshConnectivity.prototype.vpc = ""; + + /** + * Creates a new ReverseSshConnectivity instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.ReverseSshConnectivity + * @static + * @param {google.cloud.clouddms.v1.IReverseSshConnectivity=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.ReverseSshConnectivity} ReverseSshConnectivity instance + */ + ReverseSshConnectivity.create = function create(properties) { + return new ReverseSshConnectivity(properties); + }; + + /** + * Encodes the specified ReverseSshConnectivity message. Does not implicitly {@link google.cloud.clouddms.v1.ReverseSshConnectivity.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.ReverseSshConnectivity + * @static + * @param {google.cloud.clouddms.v1.IReverseSshConnectivity} message ReverseSshConnectivity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReverseSshConnectivity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.vmIp != null && Object.hasOwnProperty.call(message, "vmIp")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.vmIp); + if (message.vmPort != null && Object.hasOwnProperty.call(message, "vmPort")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.vmPort); + if (message.vm != null && Object.hasOwnProperty.call(message, "vm")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.vm); + if (message.vpc != null && Object.hasOwnProperty.call(message, "vpc")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.vpc); + return writer; + }; + + /** + * Encodes the specified ReverseSshConnectivity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ReverseSshConnectivity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.ReverseSshConnectivity + * @static + * @param {google.cloud.clouddms.v1.IReverseSshConnectivity} message ReverseSshConnectivity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReverseSshConnectivity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReverseSshConnectivity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.ReverseSshConnectivity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.ReverseSshConnectivity} ReverseSshConnectivity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReverseSshConnectivity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.ReverseSshConnectivity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.vmIp = reader.string(); + break; + } + case 2: { + message.vmPort = reader.int32(); + break; + } + case 3: { + message.vm = reader.string(); + break; + } + case 4: { + message.vpc = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReverseSshConnectivity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.ReverseSshConnectivity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.ReverseSshConnectivity} ReverseSshConnectivity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReverseSshConnectivity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReverseSshConnectivity message. + * @function verify + * @memberof google.cloud.clouddms.v1.ReverseSshConnectivity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReverseSshConnectivity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.vmIp != null && message.hasOwnProperty("vmIp")) + if (!$util.isString(message.vmIp)) + return "vmIp: string expected"; + if (message.vmPort != null && message.hasOwnProperty("vmPort")) + if (!$util.isInteger(message.vmPort)) + return "vmPort: integer expected"; + if (message.vm != null && message.hasOwnProperty("vm")) + if (!$util.isString(message.vm)) + return "vm: string expected"; + if (message.vpc != null && message.hasOwnProperty("vpc")) + if (!$util.isString(message.vpc)) + return "vpc: string expected"; + return null; + }; + + /** + * Creates a ReverseSshConnectivity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.ReverseSshConnectivity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.ReverseSshConnectivity} ReverseSshConnectivity + */ + ReverseSshConnectivity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.ReverseSshConnectivity) + return object; + var message = new $root.google.cloud.clouddms.v1.ReverseSshConnectivity(); + if (object.vmIp != null) + message.vmIp = String(object.vmIp); + if (object.vmPort != null) + message.vmPort = object.vmPort | 0; + if (object.vm != null) + message.vm = String(object.vm); + if (object.vpc != null) + message.vpc = String(object.vpc); + return message; + }; + + /** + * Creates a plain object from a ReverseSshConnectivity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.ReverseSshConnectivity + * @static + * @param {google.cloud.clouddms.v1.ReverseSshConnectivity} message ReverseSshConnectivity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReverseSshConnectivity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.vmIp = ""; + object.vmPort = 0; + object.vm = ""; + object.vpc = ""; + } + if (message.vmIp != null && message.hasOwnProperty("vmIp")) + object.vmIp = message.vmIp; + if (message.vmPort != null && message.hasOwnProperty("vmPort")) + object.vmPort = message.vmPort; + if (message.vm != null && message.hasOwnProperty("vm")) + object.vm = message.vm; + if (message.vpc != null && message.hasOwnProperty("vpc")) + object.vpc = message.vpc; + return object; + }; + + /** + * Converts this ReverseSshConnectivity to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.ReverseSshConnectivity + * @instance + * @returns {Object.} JSON object + */ + ReverseSshConnectivity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReverseSshConnectivity + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.ReverseSshConnectivity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReverseSshConnectivity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.ReverseSshConnectivity"; + }; + + return ReverseSshConnectivity; + })(); + + v1.VpcPeeringConnectivity = (function() { + + /** + * Properties of a VpcPeeringConnectivity. + * @memberof google.cloud.clouddms.v1 + * @interface IVpcPeeringConnectivity + * @property {string|null} [vpc] VpcPeeringConnectivity vpc + */ + + /** + * Constructs a new VpcPeeringConnectivity. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a VpcPeeringConnectivity. + * @implements IVpcPeeringConnectivity + * @constructor + * @param {google.cloud.clouddms.v1.IVpcPeeringConnectivity=} [properties] Properties to set + */ + function VpcPeeringConnectivity(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]]; + } + + /** + * VpcPeeringConnectivity vpc. + * @member {string} vpc + * @memberof google.cloud.clouddms.v1.VpcPeeringConnectivity + * @instance + */ + VpcPeeringConnectivity.prototype.vpc = ""; + + /** + * Creates a new VpcPeeringConnectivity instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.VpcPeeringConnectivity + * @static + * @param {google.cloud.clouddms.v1.IVpcPeeringConnectivity=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.VpcPeeringConnectivity} VpcPeeringConnectivity instance + */ + VpcPeeringConnectivity.create = function create(properties) { + return new VpcPeeringConnectivity(properties); + }; + + /** + * Encodes the specified VpcPeeringConnectivity message. Does not implicitly {@link google.cloud.clouddms.v1.VpcPeeringConnectivity.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.VpcPeeringConnectivity + * @static + * @param {google.cloud.clouddms.v1.IVpcPeeringConnectivity} message VpcPeeringConnectivity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpcPeeringConnectivity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.vpc != null && Object.hasOwnProperty.call(message, "vpc")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.vpc); + return writer; + }; + + /** + * Encodes the specified VpcPeeringConnectivity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.VpcPeeringConnectivity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.VpcPeeringConnectivity + * @static + * @param {google.cloud.clouddms.v1.IVpcPeeringConnectivity} message VpcPeeringConnectivity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpcPeeringConnectivity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VpcPeeringConnectivity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.VpcPeeringConnectivity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.VpcPeeringConnectivity} VpcPeeringConnectivity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpcPeeringConnectivity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.VpcPeeringConnectivity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.vpc = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VpcPeeringConnectivity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.VpcPeeringConnectivity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.VpcPeeringConnectivity} VpcPeeringConnectivity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpcPeeringConnectivity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VpcPeeringConnectivity message. + * @function verify + * @memberof google.cloud.clouddms.v1.VpcPeeringConnectivity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VpcPeeringConnectivity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.vpc != null && message.hasOwnProperty("vpc")) + if (!$util.isString(message.vpc)) + return "vpc: string expected"; + return null; + }; + + /** + * Creates a VpcPeeringConnectivity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.VpcPeeringConnectivity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.VpcPeeringConnectivity} VpcPeeringConnectivity + */ + VpcPeeringConnectivity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.VpcPeeringConnectivity) + return object; + var message = new $root.google.cloud.clouddms.v1.VpcPeeringConnectivity(); + if (object.vpc != null) + message.vpc = String(object.vpc); + return message; + }; + + /** + * Creates a plain object from a VpcPeeringConnectivity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.VpcPeeringConnectivity + * @static + * @param {google.cloud.clouddms.v1.VpcPeeringConnectivity} message VpcPeeringConnectivity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VpcPeeringConnectivity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.vpc = ""; + if (message.vpc != null && message.hasOwnProperty("vpc")) + object.vpc = message.vpc; + return object; + }; + + /** + * Converts this VpcPeeringConnectivity to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.VpcPeeringConnectivity + * @instance + * @returns {Object.} JSON object + */ + VpcPeeringConnectivity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VpcPeeringConnectivity + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.VpcPeeringConnectivity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VpcPeeringConnectivity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.VpcPeeringConnectivity"; + }; + + return VpcPeeringConnectivity; + })(); + + v1.ForwardSshTunnelConnectivity = (function() { + + /** + * Properties of a ForwardSshTunnelConnectivity. + * @memberof google.cloud.clouddms.v1 + * @interface IForwardSshTunnelConnectivity + * @property {string|null} [hostname] ForwardSshTunnelConnectivity hostname + * @property {string|null} [username] ForwardSshTunnelConnectivity username + * @property {number|null} [port] ForwardSshTunnelConnectivity port + * @property {string|null} [password] ForwardSshTunnelConnectivity password + * @property {string|null} [privateKey] ForwardSshTunnelConnectivity privateKey + */ + + /** + * Constructs a new ForwardSshTunnelConnectivity. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a ForwardSshTunnelConnectivity. + * @implements IForwardSshTunnelConnectivity + * @constructor + * @param {google.cloud.clouddms.v1.IForwardSshTunnelConnectivity=} [properties] Properties to set + */ + function ForwardSshTunnelConnectivity(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]]; + } + + /** + * ForwardSshTunnelConnectivity hostname. + * @member {string} hostname + * @memberof google.cloud.clouddms.v1.ForwardSshTunnelConnectivity + * @instance + */ + ForwardSshTunnelConnectivity.prototype.hostname = ""; + + /** + * ForwardSshTunnelConnectivity username. + * @member {string} username + * @memberof google.cloud.clouddms.v1.ForwardSshTunnelConnectivity + * @instance + */ + ForwardSshTunnelConnectivity.prototype.username = ""; + + /** + * ForwardSshTunnelConnectivity port. + * @member {number} port + * @memberof google.cloud.clouddms.v1.ForwardSshTunnelConnectivity + * @instance + */ + ForwardSshTunnelConnectivity.prototype.port = 0; + + /** + * ForwardSshTunnelConnectivity password. + * @member {string|null|undefined} password + * @memberof google.cloud.clouddms.v1.ForwardSshTunnelConnectivity + * @instance + */ + ForwardSshTunnelConnectivity.prototype.password = null; + + /** + * ForwardSshTunnelConnectivity privateKey. + * @member {string|null|undefined} privateKey + * @memberof google.cloud.clouddms.v1.ForwardSshTunnelConnectivity + * @instance + */ + ForwardSshTunnelConnectivity.prototype.privateKey = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ForwardSshTunnelConnectivity authenticationMethod. + * @member {"password"|"privateKey"|undefined} authenticationMethod + * @memberof google.cloud.clouddms.v1.ForwardSshTunnelConnectivity + * @instance + */ + Object.defineProperty(ForwardSshTunnelConnectivity.prototype, "authenticationMethod", { + get: $util.oneOfGetter($oneOfFields = ["password", "privateKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ForwardSshTunnelConnectivity instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.ForwardSshTunnelConnectivity + * @static + * @param {google.cloud.clouddms.v1.IForwardSshTunnelConnectivity=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.ForwardSshTunnelConnectivity} ForwardSshTunnelConnectivity instance + */ + ForwardSshTunnelConnectivity.create = function create(properties) { + return new ForwardSshTunnelConnectivity(properties); + }; + + /** + * Encodes the specified ForwardSshTunnelConnectivity message. Does not implicitly {@link google.cloud.clouddms.v1.ForwardSshTunnelConnectivity.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.ForwardSshTunnelConnectivity + * @static + * @param {google.cloud.clouddms.v1.IForwardSshTunnelConnectivity} message ForwardSshTunnelConnectivity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ForwardSshTunnelConnectivity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.hostname); + if (message.username != null && Object.hasOwnProperty.call(message, "username")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.username); + if (message.port != null && Object.hasOwnProperty.call(message, "port")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.port); + if (message.password != null && Object.hasOwnProperty.call(message, "password")) + writer.uint32(/* id 100, wireType 2 =*/802).string(message.password); + if (message.privateKey != null && Object.hasOwnProperty.call(message, "privateKey")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.privateKey); + return writer; + }; + + /** + * Encodes the specified ForwardSshTunnelConnectivity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ForwardSshTunnelConnectivity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.ForwardSshTunnelConnectivity + * @static + * @param {google.cloud.clouddms.v1.IForwardSshTunnelConnectivity} message ForwardSshTunnelConnectivity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ForwardSshTunnelConnectivity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ForwardSshTunnelConnectivity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.ForwardSshTunnelConnectivity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.ForwardSshTunnelConnectivity} ForwardSshTunnelConnectivity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ForwardSshTunnelConnectivity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.ForwardSshTunnelConnectivity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.hostname = reader.string(); + break; + } + case 2: { + message.username = reader.string(); + break; + } + case 3: { + message.port = reader.int32(); + break; + } + case 100: { + message.password = reader.string(); + break; + } + case 101: { + message.privateKey = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ForwardSshTunnelConnectivity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.ForwardSshTunnelConnectivity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.ForwardSshTunnelConnectivity} ForwardSshTunnelConnectivity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ForwardSshTunnelConnectivity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ForwardSshTunnelConnectivity message. + * @function verify + * @memberof google.cloud.clouddms.v1.ForwardSshTunnelConnectivity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ForwardSshTunnelConnectivity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.hostname != null && message.hasOwnProperty("hostname")) + if (!$util.isString(message.hostname)) + return "hostname: string expected"; + if (message.username != null && message.hasOwnProperty("username")) + if (!$util.isString(message.username)) + return "username: string expected"; + if (message.port != null && message.hasOwnProperty("port")) + if (!$util.isInteger(message.port)) + return "port: integer expected"; + if (message.password != null && message.hasOwnProperty("password")) { + properties.authenticationMethod = 1; + if (!$util.isString(message.password)) + return "password: string expected"; + } + if (message.privateKey != null && message.hasOwnProperty("privateKey")) { + if (properties.authenticationMethod === 1) + return "authenticationMethod: multiple values"; + properties.authenticationMethod = 1; + if (!$util.isString(message.privateKey)) + return "privateKey: string expected"; + } + return null; + }; + + /** + * Creates a ForwardSshTunnelConnectivity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.ForwardSshTunnelConnectivity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.ForwardSshTunnelConnectivity} ForwardSshTunnelConnectivity + */ + ForwardSshTunnelConnectivity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.ForwardSshTunnelConnectivity) + return object; + var message = new $root.google.cloud.clouddms.v1.ForwardSshTunnelConnectivity(); + if (object.hostname != null) + message.hostname = String(object.hostname); + if (object.username != null) + message.username = String(object.username); + if (object.port != null) + message.port = object.port | 0; + if (object.password != null) + message.password = String(object.password); + if (object.privateKey != null) + message.privateKey = String(object.privateKey); + return message; + }; + + /** + * Creates a plain object from a ForwardSshTunnelConnectivity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.ForwardSshTunnelConnectivity + * @static + * @param {google.cloud.clouddms.v1.ForwardSshTunnelConnectivity} message ForwardSshTunnelConnectivity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ForwardSshTunnelConnectivity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.hostname = ""; + object.username = ""; + object.port = 0; + } + if (message.hostname != null && message.hasOwnProperty("hostname")) + object.hostname = message.hostname; + if (message.username != null && message.hasOwnProperty("username")) + object.username = message.username; + if (message.port != null && message.hasOwnProperty("port")) + object.port = message.port; + if (message.password != null && message.hasOwnProperty("password")) { + object.password = message.password; + if (options.oneofs) + object.authenticationMethod = "password"; + } + if (message.privateKey != null && message.hasOwnProperty("privateKey")) { + object.privateKey = message.privateKey; + if (options.oneofs) + object.authenticationMethod = "privateKey"; + } + return object; + }; + + /** + * Converts this ForwardSshTunnelConnectivity to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.ForwardSshTunnelConnectivity + * @instance + * @returns {Object.} JSON object + */ + ForwardSshTunnelConnectivity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ForwardSshTunnelConnectivity + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.ForwardSshTunnelConnectivity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ForwardSshTunnelConnectivity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.ForwardSshTunnelConnectivity"; + }; + + return ForwardSshTunnelConnectivity; + })(); + + v1.StaticServiceIpConnectivity = (function() { + + /** + * Properties of a StaticServiceIpConnectivity. + * @memberof google.cloud.clouddms.v1 + * @interface IStaticServiceIpConnectivity + */ + + /** + * Constructs a new StaticServiceIpConnectivity. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a StaticServiceIpConnectivity. + * @implements IStaticServiceIpConnectivity + * @constructor + * @param {google.cloud.clouddms.v1.IStaticServiceIpConnectivity=} [properties] Properties to set + */ + function StaticServiceIpConnectivity(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]]; + } + + /** + * Creates a new StaticServiceIpConnectivity instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.StaticServiceIpConnectivity + * @static + * @param {google.cloud.clouddms.v1.IStaticServiceIpConnectivity=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.StaticServiceIpConnectivity} StaticServiceIpConnectivity instance + */ + StaticServiceIpConnectivity.create = function create(properties) { + return new StaticServiceIpConnectivity(properties); + }; + + /** + * Encodes the specified StaticServiceIpConnectivity message. Does not implicitly {@link google.cloud.clouddms.v1.StaticServiceIpConnectivity.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.StaticServiceIpConnectivity + * @static + * @param {google.cloud.clouddms.v1.IStaticServiceIpConnectivity} message StaticServiceIpConnectivity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StaticServiceIpConnectivity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified StaticServiceIpConnectivity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.StaticServiceIpConnectivity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.StaticServiceIpConnectivity + * @static + * @param {google.cloud.clouddms.v1.IStaticServiceIpConnectivity} message StaticServiceIpConnectivity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StaticServiceIpConnectivity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StaticServiceIpConnectivity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.StaticServiceIpConnectivity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.StaticServiceIpConnectivity} StaticServiceIpConnectivity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StaticServiceIpConnectivity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.StaticServiceIpConnectivity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StaticServiceIpConnectivity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.StaticServiceIpConnectivity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.StaticServiceIpConnectivity} StaticServiceIpConnectivity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StaticServiceIpConnectivity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StaticServiceIpConnectivity message. + * @function verify + * @memberof google.cloud.clouddms.v1.StaticServiceIpConnectivity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StaticServiceIpConnectivity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a StaticServiceIpConnectivity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.StaticServiceIpConnectivity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.StaticServiceIpConnectivity} StaticServiceIpConnectivity + */ + StaticServiceIpConnectivity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.StaticServiceIpConnectivity) + return object; + return new $root.google.cloud.clouddms.v1.StaticServiceIpConnectivity(); + }; + + /** + * Creates a plain object from a StaticServiceIpConnectivity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.StaticServiceIpConnectivity + * @static + * @param {google.cloud.clouddms.v1.StaticServiceIpConnectivity} message StaticServiceIpConnectivity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StaticServiceIpConnectivity.toObject = function toObject() { + return {}; + }; + + /** + * Converts this StaticServiceIpConnectivity to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.StaticServiceIpConnectivity + * @instance + * @returns {Object.} JSON object + */ + StaticServiceIpConnectivity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StaticServiceIpConnectivity + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.StaticServiceIpConnectivity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StaticServiceIpConnectivity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.StaticServiceIpConnectivity"; + }; + + return StaticServiceIpConnectivity; + })(); + + v1.PrivateConnectivity = (function() { + + /** + * Properties of a PrivateConnectivity. + * @memberof google.cloud.clouddms.v1 + * @interface IPrivateConnectivity + * @property {string|null} [privateConnection] PrivateConnectivity privateConnection + */ + + /** + * Constructs a new PrivateConnectivity. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a PrivateConnectivity. + * @implements IPrivateConnectivity + * @constructor + * @param {google.cloud.clouddms.v1.IPrivateConnectivity=} [properties] Properties to set + */ + function PrivateConnectivity(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]]; + } + + /** + * PrivateConnectivity privateConnection. + * @member {string} privateConnection + * @memberof google.cloud.clouddms.v1.PrivateConnectivity + * @instance + */ + PrivateConnectivity.prototype.privateConnection = ""; + + /** + * Creates a new PrivateConnectivity instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.PrivateConnectivity + * @static + * @param {google.cloud.clouddms.v1.IPrivateConnectivity=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.PrivateConnectivity} PrivateConnectivity instance + */ + PrivateConnectivity.create = function create(properties) { + return new PrivateConnectivity(properties); + }; + + /** + * Encodes the specified PrivateConnectivity message. Does not implicitly {@link google.cloud.clouddms.v1.PrivateConnectivity.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.PrivateConnectivity + * @static + * @param {google.cloud.clouddms.v1.IPrivateConnectivity} message PrivateConnectivity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateConnectivity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.privateConnection != null && Object.hasOwnProperty.call(message, "privateConnection")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.privateConnection); + return writer; + }; + + /** + * Encodes the specified PrivateConnectivity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.PrivateConnectivity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.PrivateConnectivity + * @static + * @param {google.cloud.clouddms.v1.IPrivateConnectivity} message PrivateConnectivity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateConnectivity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrivateConnectivity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.PrivateConnectivity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.PrivateConnectivity} PrivateConnectivity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateConnectivity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.PrivateConnectivity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.privateConnection = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PrivateConnectivity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.PrivateConnectivity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.PrivateConnectivity} PrivateConnectivity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateConnectivity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrivateConnectivity message. + * @function verify + * @memberof google.cloud.clouddms.v1.PrivateConnectivity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrivateConnectivity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.privateConnection != null && message.hasOwnProperty("privateConnection")) + if (!$util.isString(message.privateConnection)) + return "privateConnection: string expected"; + return null; + }; + + /** + * Creates a PrivateConnectivity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.PrivateConnectivity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.PrivateConnectivity} PrivateConnectivity + */ + PrivateConnectivity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.PrivateConnectivity) + return object; + var message = new $root.google.cloud.clouddms.v1.PrivateConnectivity(); + if (object.privateConnection != null) + message.privateConnection = String(object.privateConnection); + return message; + }; + + /** + * Creates a plain object from a PrivateConnectivity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.PrivateConnectivity + * @static + * @param {google.cloud.clouddms.v1.PrivateConnectivity} message PrivateConnectivity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrivateConnectivity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.privateConnection = ""; + if (message.privateConnection != null && message.hasOwnProperty("privateConnection")) + object.privateConnection = message.privateConnection; + return object; + }; + + /** + * Converts this PrivateConnectivity to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.PrivateConnectivity + * @instance + * @returns {Object.} JSON object + */ + PrivateConnectivity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PrivateConnectivity + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.PrivateConnectivity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrivateConnectivity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.PrivateConnectivity"; + }; + + return PrivateConnectivity; + })(); + + v1.DatabaseType = (function() { + + /** + * Properties of a DatabaseType. + * @memberof google.cloud.clouddms.v1 + * @interface IDatabaseType + * @property {google.cloud.clouddms.v1.DatabaseProvider|null} [provider] DatabaseType provider + * @property {google.cloud.clouddms.v1.DatabaseEngine|null} [engine] DatabaseType engine + */ + + /** + * Constructs a new DatabaseType. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a DatabaseType. + * @implements IDatabaseType + * @constructor + * @param {google.cloud.clouddms.v1.IDatabaseType=} [properties] Properties to set + */ + function DatabaseType(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]]; + } + + /** + * DatabaseType provider. + * @member {google.cloud.clouddms.v1.DatabaseProvider} provider + * @memberof google.cloud.clouddms.v1.DatabaseType + * @instance + */ + DatabaseType.prototype.provider = 0; + + /** + * DatabaseType engine. + * @member {google.cloud.clouddms.v1.DatabaseEngine} engine + * @memberof google.cloud.clouddms.v1.DatabaseType + * @instance + */ + DatabaseType.prototype.engine = 0; + + /** + * Creates a new DatabaseType instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.DatabaseType + * @static + * @param {google.cloud.clouddms.v1.IDatabaseType=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.DatabaseType} DatabaseType instance + */ + DatabaseType.create = function create(properties) { + return new DatabaseType(properties); + }; + + /** + * Encodes the specified DatabaseType message. Does not implicitly {@link google.cloud.clouddms.v1.DatabaseType.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.DatabaseType + * @static + * @param {google.cloud.clouddms.v1.IDatabaseType} message DatabaseType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseType.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.provider != null && Object.hasOwnProperty.call(message, "provider")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.provider); + if (message.engine != null && Object.hasOwnProperty.call(message, "engine")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.engine); + return writer; + }; + + /** + * Encodes the specified DatabaseType message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.DatabaseType.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.DatabaseType + * @static + * @param {google.cloud.clouddms.v1.IDatabaseType} message DatabaseType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseType.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DatabaseType message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.DatabaseType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.DatabaseType} DatabaseType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseType.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.DatabaseType(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.provider = reader.int32(); + break; + } + case 2: { + message.engine = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DatabaseType message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.DatabaseType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.DatabaseType} DatabaseType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseType.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DatabaseType message. + * @function verify + * @memberof google.cloud.clouddms.v1.DatabaseType + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DatabaseType.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.provider != null && message.hasOwnProperty("provider")) + switch (message.provider) { + default: + return "provider: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.engine != null && message.hasOwnProperty("engine")) + switch (message.engine) { + default: + return "engine: enum value expected"; + case 0: + case 1: + case 2: + case 4: + break; + } + return null; + }; + + /** + * Creates a DatabaseType message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.DatabaseType + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.DatabaseType} DatabaseType + */ + DatabaseType.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.DatabaseType) + return object; + var message = new $root.google.cloud.clouddms.v1.DatabaseType(); + switch (object.provider) { + default: + if (typeof object.provider === "number") { + message.provider = object.provider; + break; + } + break; + case "DATABASE_PROVIDER_UNSPECIFIED": + case 0: + message.provider = 0; + break; + case "CLOUDSQL": + case 1: + message.provider = 1; + break; + case "RDS": + case 2: + message.provider = 2; + break; + case "AURORA": + case 3: + message.provider = 3; + break; + case "ALLOYDB": + case 4: + message.provider = 4; + break; + } + switch (object.engine) { + default: + if (typeof object.engine === "number") { + message.engine = object.engine; + break; + } + break; + case "DATABASE_ENGINE_UNSPECIFIED": + case 0: + message.engine = 0; + break; + case "MYSQL": + case 1: + message.engine = 1; + break; + case "POSTGRESQL": + case 2: + message.engine = 2; + break; + case "ORACLE": + case 4: + message.engine = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a DatabaseType message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.DatabaseType + * @static + * @param {google.cloud.clouddms.v1.DatabaseType} message DatabaseType + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DatabaseType.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.provider = options.enums === String ? "DATABASE_PROVIDER_UNSPECIFIED" : 0; + object.engine = options.enums === String ? "DATABASE_ENGINE_UNSPECIFIED" : 0; + } + if (message.provider != null && message.hasOwnProperty("provider")) + object.provider = options.enums === String ? $root.google.cloud.clouddms.v1.DatabaseProvider[message.provider] === undefined ? message.provider : $root.google.cloud.clouddms.v1.DatabaseProvider[message.provider] : message.provider; + if (message.engine != null && message.hasOwnProperty("engine")) + object.engine = options.enums === String ? $root.google.cloud.clouddms.v1.DatabaseEngine[message.engine] === undefined ? message.engine : $root.google.cloud.clouddms.v1.DatabaseEngine[message.engine] : message.engine; + return object; + }; + + /** + * Converts this DatabaseType to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.DatabaseType + * @instance + * @returns {Object.} JSON object + */ + DatabaseType.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DatabaseType + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.DatabaseType + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DatabaseType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.DatabaseType"; + }; + + return DatabaseType; + })(); + + v1.MigrationJob = (function() { + + /** + * Properties of a MigrationJob. + * @memberof google.cloud.clouddms.v1 + * @interface IMigrationJob + * @property {string|null} [name] MigrationJob name + * @property {google.protobuf.ITimestamp|null} [createTime] MigrationJob createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] MigrationJob updateTime + * @property {Object.|null} [labels] MigrationJob labels + * @property {string|null} [displayName] MigrationJob displayName + * @property {google.cloud.clouddms.v1.MigrationJob.State|null} [state] MigrationJob state + * @property {google.cloud.clouddms.v1.MigrationJob.Phase|null} [phase] MigrationJob phase + * @property {google.cloud.clouddms.v1.MigrationJob.Type|null} [type] MigrationJob type + * @property {string|null} [dumpPath] MigrationJob dumpPath + * @property {google.cloud.clouddms.v1.MigrationJob.IDumpFlags|null} [dumpFlags] MigrationJob dumpFlags + * @property {string|null} [source] MigrationJob source + * @property {string|null} [destination] MigrationJob destination + * @property {google.cloud.clouddms.v1.IReverseSshConnectivity|null} [reverseSshConnectivity] MigrationJob reverseSshConnectivity + * @property {google.cloud.clouddms.v1.IVpcPeeringConnectivity|null} [vpcPeeringConnectivity] MigrationJob vpcPeeringConnectivity + * @property {google.cloud.clouddms.v1.IStaticIpConnectivity|null} [staticIpConnectivity] MigrationJob staticIpConnectivity + * @property {google.protobuf.IDuration|null} [duration] MigrationJob duration + * @property {google.rpc.IStatus|null} [error] MigrationJob error + * @property {google.cloud.clouddms.v1.IDatabaseType|null} [sourceDatabase] MigrationJob sourceDatabase + * @property {google.cloud.clouddms.v1.IDatabaseType|null} [destinationDatabase] MigrationJob destinationDatabase + * @property {google.protobuf.ITimestamp|null} [endTime] MigrationJob endTime + * @property {google.cloud.clouddms.v1.IConversionWorkspaceInfo|null} [conversionWorkspace] MigrationJob conversionWorkspace + * @property {string|null} [filter] MigrationJob filter + * @property {string|null} [cmekKeyName] MigrationJob cmekKeyName + */ + + /** + * Constructs a new MigrationJob. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a MigrationJob. + * @implements IMigrationJob + * @constructor + * @param {google.cloud.clouddms.v1.IMigrationJob=} [properties] Properties to set + */ + function MigrationJob(properties) { + this.labels = {}; + 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]]; + } + + /** + * MigrationJob name. + * @member {string} name + * @memberof google.cloud.clouddms.v1.MigrationJob + * @instance + */ + MigrationJob.prototype.name = ""; + + /** + * MigrationJob createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.clouddms.v1.MigrationJob + * @instance + */ + MigrationJob.prototype.createTime = null; + + /** + * MigrationJob updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.clouddms.v1.MigrationJob + * @instance + */ + MigrationJob.prototype.updateTime = null; + + /** + * MigrationJob labels. + * @member {Object.} labels + * @memberof google.cloud.clouddms.v1.MigrationJob + * @instance + */ + MigrationJob.prototype.labels = $util.emptyObject; + + /** + * MigrationJob displayName. + * @member {string} displayName + * @memberof google.cloud.clouddms.v1.MigrationJob + * @instance + */ + MigrationJob.prototype.displayName = ""; + + /** + * MigrationJob state. + * @member {google.cloud.clouddms.v1.MigrationJob.State} state + * @memberof google.cloud.clouddms.v1.MigrationJob + * @instance + */ + MigrationJob.prototype.state = 0; + + /** + * MigrationJob phase. + * @member {google.cloud.clouddms.v1.MigrationJob.Phase} phase + * @memberof google.cloud.clouddms.v1.MigrationJob + * @instance + */ + MigrationJob.prototype.phase = 0; + + /** + * MigrationJob type. + * @member {google.cloud.clouddms.v1.MigrationJob.Type} type + * @memberof google.cloud.clouddms.v1.MigrationJob + * @instance + */ + MigrationJob.prototype.type = 0; + + /** + * MigrationJob dumpPath. + * @member {string} dumpPath + * @memberof google.cloud.clouddms.v1.MigrationJob + * @instance + */ + MigrationJob.prototype.dumpPath = ""; + + /** + * MigrationJob dumpFlags. + * @member {google.cloud.clouddms.v1.MigrationJob.IDumpFlags|null|undefined} dumpFlags + * @memberof google.cloud.clouddms.v1.MigrationJob + * @instance + */ + MigrationJob.prototype.dumpFlags = null; + + /** + * MigrationJob source. + * @member {string} source + * @memberof google.cloud.clouddms.v1.MigrationJob + * @instance + */ + MigrationJob.prototype.source = ""; + + /** + * MigrationJob destination. + * @member {string} destination + * @memberof google.cloud.clouddms.v1.MigrationJob + * @instance + */ + MigrationJob.prototype.destination = ""; + + /** + * MigrationJob reverseSshConnectivity. + * @member {google.cloud.clouddms.v1.IReverseSshConnectivity|null|undefined} reverseSshConnectivity + * @memberof google.cloud.clouddms.v1.MigrationJob + * @instance + */ + MigrationJob.prototype.reverseSshConnectivity = null; + + /** + * MigrationJob vpcPeeringConnectivity. + * @member {google.cloud.clouddms.v1.IVpcPeeringConnectivity|null|undefined} vpcPeeringConnectivity + * @memberof google.cloud.clouddms.v1.MigrationJob + * @instance + */ + MigrationJob.prototype.vpcPeeringConnectivity = null; + + /** + * MigrationJob staticIpConnectivity. + * @member {google.cloud.clouddms.v1.IStaticIpConnectivity|null|undefined} staticIpConnectivity + * @memberof google.cloud.clouddms.v1.MigrationJob + * @instance + */ + MigrationJob.prototype.staticIpConnectivity = null; + + /** + * MigrationJob duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.cloud.clouddms.v1.MigrationJob + * @instance + */ + MigrationJob.prototype.duration = null; + + /** + * MigrationJob error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.cloud.clouddms.v1.MigrationJob + * @instance + */ + MigrationJob.prototype.error = null; + + /** + * MigrationJob sourceDatabase. + * @member {google.cloud.clouddms.v1.IDatabaseType|null|undefined} sourceDatabase + * @memberof google.cloud.clouddms.v1.MigrationJob + * @instance + */ + MigrationJob.prototype.sourceDatabase = null; + + /** + * MigrationJob destinationDatabase. + * @member {google.cloud.clouddms.v1.IDatabaseType|null|undefined} destinationDatabase + * @memberof google.cloud.clouddms.v1.MigrationJob + * @instance + */ + MigrationJob.prototype.destinationDatabase = null; + + /** + * MigrationJob endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.clouddms.v1.MigrationJob + * @instance + */ + MigrationJob.prototype.endTime = null; + + /** + * MigrationJob conversionWorkspace. + * @member {google.cloud.clouddms.v1.IConversionWorkspaceInfo|null|undefined} conversionWorkspace + * @memberof google.cloud.clouddms.v1.MigrationJob + * @instance + */ + MigrationJob.prototype.conversionWorkspace = null; + + /** + * MigrationJob filter. + * @member {string} filter + * @memberof google.cloud.clouddms.v1.MigrationJob + * @instance + */ + MigrationJob.prototype.filter = ""; + + /** + * MigrationJob cmekKeyName. + * @member {string} cmekKeyName + * @memberof google.cloud.clouddms.v1.MigrationJob + * @instance + */ + MigrationJob.prototype.cmekKeyName = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MigrationJob connectivity. + * @member {"reverseSshConnectivity"|"vpcPeeringConnectivity"|"staticIpConnectivity"|undefined} connectivity + * @memberof google.cloud.clouddms.v1.MigrationJob + * @instance + */ + Object.defineProperty(MigrationJob.prototype, "connectivity", { + get: $util.oneOfGetter($oneOfFields = ["reverseSshConnectivity", "vpcPeeringConnectivity", "staticIpConnectivity"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MigrationJob instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.MigrationJob + * @static + * @param {google.cloud.clouddms.v1.IMigrationJob=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.MigrationJob} MigrationJob instance + */ + MigrationJob.create = function create(properties) { + return new MigrationJob(properties); + }; + + /** + * Encodes the specified MigrationJob message. Does not implicitly {@link google.cloud.clouddms.v1.MigrationJob.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.MigrationJob + * @static + * @param {google.cloud.clouddms.v1.IMigrationJob} message MigrationJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MigrationJob.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); + if (message.phase != null && Object.hasOwnProperty.call(message, "phase")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.phase); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.type); + if (message.dumpPath != null && Object.hasOwnProperty.call(message, "dumpPath")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.dumpPath); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.source); + if (message.destination != null && Object.hasOwnProperty.call(message, "destination")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.destination); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.sourceDatabase != null && Object.hasOwnProperty.call(message, "sourceDatabase")) + $root.google.cloud.clouddms.v1.DatabaseType.encode(message.sourceDatabase, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.destinationDatabase != null && Object.hasOwnProperty.call(message, "destinationDatabase")) + $root.google.cloud.clouddms.v1.DatabaseType.encode(message.destinationDatabase, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.dumpFlags != null && Object.hasOwnProperty.call(message, "dumpFlags")) + $root.google.cloud.clouddms.v1.MigrationJob.DumpFlags.encode(message.dumpFlags, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.conversionWorkspace != null && Object.hasOwnProperty.call(message, "conversionWorkspace")) + $root.google.cloud.clouddms.v1.ConversionWorkspaceInfo.encode(message.conversionWorkspace, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 20, wireType 2 =*/162).string(message.filter); + if (message.cmekKeyName != null && Object.hasOwnProperty.call(message, "cmekKeyName")) + writer.uint32(/* id 21, wireType 2 =*/170).string(message.cmekKeyName); + if (message.reverseSshConnectivity != null && Object.hasOwnProperty.call(message, "reverseSshConnectivity")) + $root.google.cloud.clouddms.v1.ReverseSshConnectivity.encode(message.reverseSshConnectivity, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.vpcPeeringConnectivity != null && Object.hasOwnProperty.call(message, "vpcPeeringConnectivity")) + $root.google.cloud.clouddms.v1.VpcPeeringConnectivity.encode(message.vpcPeeringConnectivity, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + if (message.staticIpConnectivity != null && Object.hasOwnProperty.call(message, "staticIpConnectivity")) + $root.google.cloud.clouddms.v1.StaticIpConnectivity.encode(message.staticIpConnectivity, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MigrationJob message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.MigrationJob.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.MigrationJob + * @static + * @param {google.cloud.clouddms.v1.IMigrationJob} message MigrationJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MigrationJob.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MigrationJob message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.MigrationJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.MigrationJob} MigrationJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MigrationJob.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.MigrationJob(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + if (message.labels === $util.emptyObject) + message.labels = {}; + 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.labels[key] = value; + break; + } + case 5: { + message.displayName = reader.string(); + break; + } + case 6: { + message.state = reader.int32(); + break; + } + case 7: { + message.phase = reader.int32(); + break; + } + case 8: { + message.type = reader.int32(); + break; + } + case 9: { + message.dumpPath = reader.string(); + break; + } + case 17: { + message.dumpFlags = $root.google.cloud.clouddms.v1.MigrationJob.DumpFlags.decode(reader, reader.uint32()); + break; + } + case 10: { + message.source = reader.string(); + break; + } + case 11: { + message.destination = reader.string(); + break; + } + case 101: { + message.reverseSshConnectivity = $root.google.cloud.clouddms.v1.ReverseSshConnectivity.decode(reader, reader.uint32()); + break; + } + case 102: { + message.vpcPeeringConnectivity = $root.google.cloud.clouddms.v1.VpcPeeringConnectivity.decode(reader, reader.uint32()); + break; + } + case 103: { + message.staticIpConnectivity = $root.google.cloud.clouddms.v1.StaticIpConnectivity.decode(reader, reader.uint32()); + break; + } + case 12: { + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 13: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 14: { + message.sourceDatabase = $root.google.cloud.clouddms.v1.DatabaseType.decode(reader, reader.uint32()); + break; + } + case 15: { + message.destinationDatabase = $root.google.cloud.clouddms.v1.DatabaseType.decode(reader, reader.uint32()); + break; + } + case 16: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 18: { + message.conversionWorkspace = $root.google.cloud.clouddms.v1.ConversionWorkspaceInfo.decode(reader, reader.uint32()); + break; + } + case 20: { + message.filter = reader.string(); + break; + } + case 21: { + message.cmekKeyName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MigrationJob message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.MigrationJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.MigrationJob} MigrationJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MigrationJob.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MigrationJob message. + * @function verify + * @memberof google.cloud.clouddms.v1.MigrationJob + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MigrationJob.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: 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.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + break; + } + if (message.phase != null && message.hasOwnProperty("phase")) + switch (message.phase) { + default: + return "phase: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.dumpPath != null && message.hasOwnProperty("dumpPath")) + if (!$util.isString(message.dumpPath)) + return "dumpPath: string expected"; + if (message.dumpFlags != null && message.hasOwnProperty("dumpFlags")) { + var error = $root.google.cloud.clouddms.v1.MigrationJob.DumpFlags.verify(message.dumpFlags); + if (error) + return "dumpFlags." + error; + } + if (message.source != null && message.hasOwnProperty("source")) + if (!$util.isString(message.source)) + return "source: string expected"; + if (message.destination != null && message.hasOwnProperty("destination")) + if (!$util.isString(message.destination)) + return "destination: string expected"; + if (message.reverseSshConnectivity != null && message.hasOwnProperty("reverseSshConnectivity")) { + properties.connectivity = 1; + { + var error = $root.google.cloud.clouddms.v1.ReverseSshConnectivity.verify(message.reverseSshConnectivity); + if (error) + return "reverseSshConnectivity." + error; + } + } + if (message.vpcPeeringConnectivity != null && message.hasOwnProperty("vpcPeeringConnectivity")) { + if (properties.connectivity === 1) + return "connectivity: multiple values"; + properties.connectivity = 1; + { + var error = $root.google.cloud.clouddms.v1.VpcPeeringConnectivity.verify(message.vpcPeeringConnectivity); + if (error) + return "vpcPeeringConnectivity." + error; + } + } + if (message.staticIpConnectivity != null && message.hasOwnProperty("staticIpConnectivity")) { + if (properties.connectivity === 1) + return "connectivity: multiple values"; + properties.connectivity = 1; + { + var error = $root.google.cloud.clouddms.v1.StaticIpConnectivity.verify(message.staticIpConnectivity); + if (error) + return "staticIpConnectivity." + error; + } + } + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); + if (error) + return "duration." + error; + } + if (message.error != null && message.hasOwnProperty("error")) { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + if (message.sourceDatabase != null && message.hasOwnProperty("sourceDatabase")) { + var error = $root.google.cloud.clouddms.v1.DatabaseType.verify(message.sourceDatabase); + if (error) + return "sourceDatabase." + error; + } + if (message.destinationDatabase != null && message.hasOwnProperty("destinationDatabase")) { + var error = $root.google.cloud.clouddms.v1.DatabaseType.verify(message.destinationDatabase); + if (error) + return "destinationDatabase." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.conversionWorkspace != null && message.hasOwnProperty("conversionWorkspace")) { + var error = $root.google.cloud.clouddms.v1.ConversionWorkspaceInfo.verify(message.conversionWorkspace); + if (error) + return "conversionWorkspace." + error; + } + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.cmekKeyName != null && message.hasOwnProperty("cmekKeyName")) + if (!$util.isString(message.cmekKeyName)) + return "cmekKeyName: string expected"; + return null; + }; + + /** + * Creates a MigrationJob message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.MigrationJob + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.MigrationJob} MigrationJob + */ + MigrationJob.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.MigrationJob) + return object; + var message = new $root.google.cloud.clouddms.v1.MigrationJob(); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.clouddms.v1.MigrationJob.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.clouddms.v1.MigrationJob.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.clouddms.v1.MigrationJob.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.displayName != null) + message.displayName = String(object.displayName); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "MAINTENANCE": + case 1: + message.state = 1; + break; + case "DRAFT": + case 2: + message.state = 2; + break; + case "CREATING": + case 3: + message.state = 3; + break; + case "NOT_STARTED": + case 4: + message.state = 4; + break; + case "RUNNING": + case 5: + message.state = 5; + break; + case "FAILED": + case 6: + message.state = 6; + break; + case "COMPLETED": + case 7: + message.state = 7; + break; + case "DELETING": + case 8: + message.state = 8; + break; + case "STOPPING": + case 9: + message.state = 9; + break; + case "STOPPED": + case 10: + message.state = 10; + break; + case "DELETED": + case 11: + message.state = 11; + break; + case "UPDATING": + case 12: + message.state = 12; + break; + case "STARTING": + case 13: + message.state = 13; + break; + case "RESTARTING": + case 14: + message.state = 14; + break; + case "RESUMING": + case 15: + message.state = 15; + break; + } + switch (object.phase) { + default: + if (typeof object.phase === "number") { + message.phase = object.phase; + break; + } + break; + case "PHASE_UNSPECIFIED": + case 0: + message.phase = 0; + break; + case "FULL_DUMP": + case 1: + message.phase = 1; + break; + case "CDC": + case 2: + message.phase = 2; + break; + case "PROMOTE_IN_PROGRESS": + case 3: + message.phase = 3; + break; + case "WAITING_FOR_SOURCE_WRITES_TO_STOP": + case 4: + message.phase = 4; + break; + case "PREPARING_THE_DUMP": + case 5: + message.phase = 5; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "ONE_TIME": + case 1: + message.type = 1; + break; + case "CONTINUOUS": + case 2: + message.type = 2; + break; + } + if (object.dumpPath != null) + message.dumpPath = String(object.dumpPath); + if (object.dumpFlags != null) { + if (typeof object.dumpFlags !== "object") + throw TypeError(".google.cloud.clouddms.v1.MigrationJob.dumpFlags: object expected"); + message.dumpFlags = $root.google.cloud.clouddms.v1.MigrationJob.DumpFlags.fromObject(object.dumpFlags); + } + if (object.source != null) + message.source = String(object.source); + if (object.destination != null) + message.destination = String(object.destination); + if (object.reverseSshConnectivity != null) { + if (typeof object.reverseSshConnectivity !== "object") + throw TypeError(".google.cloud.clouddms.v1.MigrationJob.reverseSshConnectivity: object expected"); + message.reverseSshConnectivity = $root.google.cloud.clouddms.v1.ReverseSshConnectivity.fromObject(object.reverseSshConnectivity); + } + if (object.vpcPeeringConnectivity != null) { + if (typeof object.vpcPeeringConnectivity !== "object") + throw TypeError(".google.cloud.clouddms.v1.MigrationJob.vpcPeeringConnectivity: object expected"); + message.vpcPeeringConnectivity = $root.google.cloud.clouddms.v1.VpcPeeringConnectivity.fromObject(object.vpcPeeringConnectivity); + } + if (object.staticIpConnectivity != null) { + if (typeof object.staticIpConnectivity !== "object") + throw TypeError(".google.cloud.clouddms.v1.MigrationJob.staticIpConnectivity: object expected"); + message.staticIpConnectivity = $root.google.cloud.clouddms.v1.StaticIpConnectivity.fromObject(object.staticIpConnectivity); + } + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.cloud.clouddms.v1.MigrationJob.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + } + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.cloud.clouddms.v1.MigrationJob.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + if (object.sourceDatabase != null) { + if (typeof object.sourceDatabase !== "object") + throw TypeError(".google.cloud.clouddms.v1.MigrationJob.sourceDatabase: object expected"); + message.sourceDatabase = $root.google.cloud.clouddms.v1.DatabaseType.fromObject(object.sourceDatabase); + } + if (object.destinationDatabase != null) { + if (typeof object.destinationDatabase !== "object") + throw TypeError(".google.cloud.clouddms.v1.MigrationJob.destinationDatabase: object expected"); + message.destinationDatabase = $root.google.cloud.clouddms.v1.DatabaseType.fromObject(object.destinationDatabase); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.clouddms.v1.MigrationJob.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.conversionWorkspace != null) { + if (typeof object.conversionWorkspace !== "object") + throw TypeError(".google.cloud.clouddms.v1.MigrationJob.conversionWorkspace: object expected"); + message.conversionWorkspace = $root.google.cloud.clouddms.v1.ConversionWorkspaceInfo.fromObject(object.conversionWorkspace); + } + if (object.filter != null) + message.filter = String(object.filter); + if (object.cmekKeyName != null) + message.cmekKeyName = String(object.cmekKeyName); + return message; + }; + + /** + * Creates a plain object from a MigrationJob message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.MigrationJob + * @static + * @param {google.cloud.clouddms.v1.MigrationJob} message MigrationJob + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MigrationJob.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.updateTime = null; + object.displayName = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.phase = options.enums === String ? "PHASE_UNSPECIFIED" : 0; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.dumpPath = ""; + object.source = ""; + object.destination = ""; + object.duration = null; + object.error = null; + object.sourceDatabase = null; + object.destinationDatabase = null; + object.endTime = null; + object.dumpFlags = null; + object.conversionWorkspace = null; + object.filter = ""; + object.cmekKeyName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + 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); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.clouddms.v1.MigrationJob.State[message.state] === undefined ? message.state : $root.google.cloud.clouddms.v1.MigrationJob.State[message.state] : message.state; + if (message.phase != null && message.hasOwnProperty("phase")) + object.phase = options.enums === String ? $root.google.cloud.clouddms.v1.MigrationJob.Phase[message.phase] === undefined ? message.phase : $root.google.cloud.clouddms.v1.MigrationJob.Phase[message.phase] : message.phase; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.clouddms.v1.MigrationJob.Type[message.type] === undefined ? message.type : $root.google.cloud.clouddms.v1.MigrationJob.Type[message.type] : message.type; + if (message.dumpPath != null && message.hasOwnProperty("dumpPath")) + object.dumpPath = message.dumpPath; + if (message.source != null && message.hasOwnProperty("source")) + object.source = message.source; + if (message.destination != null && message.hasOwnProperty("destination")) + object.destination = message.destination; + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (message.sourceDatabase != null && message.hasOwnProperty("sourceDatabase")) + object.sourceDatabase = $root.google.cloud.clouddms.v1.DatabaseType.toObject(message.sourceDatabase, options); + if (message.destinationDatabase != null && message.hasOwnProperty("destinationDatabase")) + object.destinationDatabase = $root.google.cloud.clouddms.v1.DatabaseType.toObject(message.destinationDatabase, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.dumpFlags != null && message.hasOwnProperty("dumpFlags")) + object.dumpFlags = $root.google.cloud.clouddms.v1.MigrationJob.DumpFlags.toObject(message.dumpFlags, options); + if (message.conversionWorkspace != null && message.hasOwnProperty("conversionWorkspace")) + object.conversionWorkspace = $root.google.cloud.clouddms.v1.ConversionWorkspaceInfo.toObject(message.conversionWorkspace, options); + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.cmekKeyName != null && message.hasOwnProperty("cmekKeyName")) + object.cmekKeyName = message.cmekKeyName; + if (message.reverseSshConnectivity != null && message.hasOwnProperty("reverseSshConnectivity")) { + object.reverseSshConnectivity = $root.google.cloud.clouddms.v1.ReverseSshConnectivity.toObject(message.reverseSshConnectivity, options); + if (options.oneofs) + object.connectivity = "reverseSshConnectivity"; + } + if (message.vpcPeeringConnectivity != null && message.hasOwnProperty("vpcPeeringConnectivity")) { + object.vpcPeeringConnectivity = $root.google.cloud.clouddms.v1.VpcPeeringConnectivity.toObject(message.vpcPeeringConnectivity, options); + if (options.oneofs) + object.connectivity = "vpcPeeringConnectivity"; + } + if (message.staticIpConnectivity != null && message.hasOwnProperty("staticIpConnectivity")) { + object.staticIpConnectivity = $root.google.cloud.clouddms.v1.StaticIpConnectivity.toObject(message.staticIpConnectivity, options); + if (options.oneofs) + object.connectivity = "staticIpConnectivity"; + } + return object; + }; + + /** + * Converts this MigrationJob to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.MigrationJob + * @instance + * @returns {Object.} JSON object + */ + MigrationJob.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MigrationJob + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.MigrationJob + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MigrationJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.MigrationJob"; + }; + + /** + * State enum. + * @name google.cloud.clouddms.v1.MigrationJob.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} MAINTENANCE=1 MAINTENANCE value + * @property {number} DRAFT=2 DRAFT value + * @property {number} CREATING=3 CREATING value + * @property {number} NOT_STARTED=4 NOT_STARTED value + * @property {number} RUNNING=5 RUNNING value + * @property {number} FAILED=6 FAILED value + * @property {number} COMPLETED=7 COMPLETED value + * @property {number} DELETING=8 DELETING value + * @property {number} STOPPING=9 STOPPING value + * @property {number} STOPPED=10 STOPPED value + * @property {number} DELETED=11 DELETED value + * @property {number} UPDATING=12 UPDATING value + * @property {number} STARTING=13 STARTING value + * @property {number} RESTARTING=14 RESTARTING value + * @property {number} RESUMING=15 RESUMING value + */ + MigrationJob.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MAINTENANCE"] = 1; + values[valuesById[2] = "DRAFT"] = 2; + values[valuesById[3] = "CREATING"] = 3; + values[valuesById[4] = "NOT_STARTED"] = 4; + values[valuesById[5] = "RUNNING"] = 5; + values[valuesById[6] = "FAILED"] = 6; + values[valuesById[7] = "COMPLETED"] = 7; + values[valuesById[8] = "DELETING"] = 8; + values[valuesById[9] = "STOPPING"] = 9; + values[valuesById[10] = "STOPPED"] = 10; + values[valuesById[11] = "DELETED"] = 11; + values[valuesById[12] = "UPDATING"] = 12; + values[valuesById[13] = "STARTING"] = 13; + values[valuesById[14] = "RESTARTING"] = 14; + values[valuesById[15] = "RESUMING"] = 15; + return values; + })(); + + /** + * Phase enum. + * @name google.cloud.clouddms.v1.MigrationJob.Phase + * @enum {number} + * @property {number} PHASE_UNSPECIFIED=0 PHASE_UNSPECIFIED value + * @property {number} FULL_DUMP=1 FULL_DUMP value + * @property {number} CDC=2 CDC value + * @property {number} PROMOTE_IN_PROGRESS=3 PROMOTE_IN_PROGRESS value + * @property {number} WAITING_FOR_SOURCE_WRITES_TO_STOP=4 WAITING_FOR_SOURCE_WRITES_TO_STOP value + * @property {number} PREPARING_THE_DUMP=5 PREPARING_THE_DUMP value + */ + MigrationJob.Phase = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PHASE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FULL_DUMP"] = 1; + values[valuesById[2] = "CDC"] = 2; + values[valuesById[3] = "PROMOTE_IN_PROGRESS"] = 3; + values[valuesById[4] = "WAITING_FOR_SOURCE_WRITES_TO_STOP"] = 4; + values[valuesById[5] = "PREPARING_THE_DUMP"] = 5; + return values; + })(); + + /** + * Type enum. + * @name google.cloud.clouddms.v1.MigrationJob.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} ONE_TIME=1 ONE_TIME value + * @property {number} CONTINUOUS=2 CONTINUOUS value + */ + MigrationJob.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ONE_TIME"] = 1; + values[valuesById[2] = "CONTINUOUS"] = 2; + return values; + })(); + + MigrationJob.DumpFlag = (function() { + + /** + * Properties of a DumpFlag. + * @memberof google.cloud.clouddms.v1.MigrationJob + * @interface IDumpFlag + * @property {string|null} [name] DumpFlag name + * @property {string|null} [value] DumpFlag value + */ + + /** + * Constructs a new DumpFlag. + * @memberof google.cloud.clouddms.v1.MigrationJob + * @classdesc Represents a DumpFlag. + * @implements IDumpFlag + * @constructor + * @param {google.cloud.clouddms.v1.MigrationJob.IDumpFlag=} [properties] Properties to set + */ + function DumpFlag(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]]; + } + + /** + * DumpFlag name. + * @member {string} name + * @memberof google.cloud.clouddms.v1.MigrationJob.DumpFlag + * @instance + */ + DumpFlag.prototype.name = ""; + + /** + * DumpFlag value. + * @member {string} value + * @memberof google.cloud.clouddms.v1.MigrationJob.DumpFlag + * @instance + */ + DumpFlag.prototype.value = ""; + + /** + * Creates a new DumpFlag instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.MigrationJob.DumpFlag + * @static + * @param {google.cloud.clouddms.v1.MigrationJob.IDumpFlag=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.MigrationJob.DumpFlag} DumpFlag instance + */ + DumpFlag.create = function create(properties) { + return new DumpFlag(properties); + }; + + /** + * Encodes the specified DumpFlag message. Does not implicitly {@link google.cloud.clouddms.v1.MigrationJob.DumpFlag.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.MigrationJob.DumpFlag + * @static + * @param {google.cloud.clouddms.v1.MigrationJob.IDumpFlag} message DumpFlag message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DumpFlag.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.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + return writer; + }; + + /** + * Encodes the specified DumpFlag message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.MigrationJob.DumpFlag.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.MigrationJob.DumpFlag + * @static + * @param {google.cloud.clouddms.v1.MigrationJob.IDumpFlag} message DumpFlag message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DumpFlag.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DumpFlag message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.MigrationJob.DumpFlag + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.MigrationJob.DumpFlag} DumpFlag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DumpFlag.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.MigrationJob.DumpFlag(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DumpFlag message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.MigrationJob.DumpFlag + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.MigrationJob.DumpFlag} DumpFlag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DumpFlag.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DumpFlag message. + * @function verify + * @memberof google.cloud.clouddms.v1.MigrationJob.DumpFlag + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DumpFlag.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.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates a DumpFlag message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.MigrationJob.DumpFlag + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.MigrationJob.DumpFlag} DumpFlag + */ + DumpFlag.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.MigrationJob.DumpFlag) + return object; + var message = new $root.google.cloud.clouddms.v1.MigrationJob.DumpFlag(); + if (object.name != null) + message.name = String(object.name); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a DumpFlag message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.MigrationJob.DumpFlag + * @static + * @param {google.cloud.clouddms.v1.MigrationJob.DumpFlag} message DumpFlag + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DumpFlag.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.value = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this DumpFlag to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.MigrationJob.DumpFlag + * @instance + * @returns {Object.} JSON object + */ + DumpFlag.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DumpFlag + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.MigrationJob.DumpFlag + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DumpFlag.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.MigrationJob.DumpFlag"; + }; + + return DumpFlag; + })(); + + MigrationJob.DumpFlags = (function() { + + /** + * Properties of a DumpFlags. + * @memberof google.cloud.clouddms.v1.MigrationJob + * @interface IDumpFlags + * @property {Array.|null} [dumpFlags] DumpFlags dumpFlags + */ + + /** + * Constructs a new DumpFlags. + * @memberof google.cloud.clouddms.v1.MigrationJob + * @classdesc Represents a DumpFlags. + * @implements IDumpFlags + * @constructor + * @param {google.cloud.clouddms.v1.MigrationJob.IDumpFlags=} [properties] Properties to set + */ + function DumpFlags(properties) { + this.dumpFlags = []; + 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]]; + } + + /** + * DumpFlags dumpFlags. + * @member {Array.} dumpFlags + * @memberof google.cloud.clouddms.v1.MigrationJob.DumpFlags + * @instance + */ + DumpFlags.prototype.dumpFlags = $util.emptyArray; + + /** + * Creates a new DumpFlags instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.MigrationJob.DumpFlags + * @static + * @param {google.cloud.clouddms.v1.MigrationJob.IDumpFlags=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.MigrationJob.DumpFlags} DumpFlags instance + */ + DumpFlags.create = function create(properties) { + return new DumpFlags(properties); + }; + + /** + * Encodes the specified DumpFlags message. Does not implicitly {@link google.cloud.clouddms.v1.MigrationJob.DumpFlags.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.MigrationJob.DumpFlags + * @static + * @param {google.cloud.clouddms.v1.MigrationJob.IDumpFlags} message DumpFlags message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DumpFlags.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dumpFlags != null && message.dumpFlags.length) + for (var i = 0; i < message.dumpFlags.length; ++i) + $root.google.cloud.clouddms.v1.MigrationJob.DumpFlag.encode(message.dumpFlags[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DumpFlags message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.MigrationJob.DumpFlags.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.MigrationJob.DumpFlags + * @static + * @param {google.cloud.clouddms.v1.MigrationJob.IDumpFlags} message DumpFlags message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DumpFlags.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DumpFlags message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.MigrationJob.DumpFlags + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.MigrationJob.DumpFlags} DumpFlags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DumpFlags.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.MigrationJob.DumpFlags(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dumpFlags && message.dumpFlags.length)) + message.dumpFlags = []; + message.dumpFlags.push($root.google.cloud.clouddms.v1.MigrationJob.DumpFlag.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DumpFlags message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.MigrationJob.DumpFlags + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.MigrationJob.DumpFlags} DumpFlags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DumpFlags.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DumpFlags message. + * @function verify + * @memberof google.cloud.clouddms.v1.MigrationJob.DumpFlags + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DumpFlags.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dumpFlags != null && message.hasOwnProperty("dumpFlags")) { + if (!Array.isArray(message.dumpFlags)) + return "dumpFlags: array expected"; + for (var i = 0; i < message.dumpFlags.length; ++i) { + var error = $root.google.cloud.clouddms.v1.MigrationJob.DumpFlag.verify(message.dumpFlags[i]); + if (error) + return "dumpFlags." + error; + } + } + return null; + }; + + /** + * Creates a DumpFlags message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.MigrationJob.DumpFlags + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.MigrationJob.DumpFlags} DumpFlags + */ + DumpFlags.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.MigrationJob.DumpFlags) + return object; + var message = new $root.google.cloud.clouddms.v1.MigrationJob.DumpFlags(); + if (object.dumpFlags) { + if (!Array.isArray(object.dumpFlags)) + throw TypeError(".google.cloud.clouddms.v1.MigrationJob.DumpFlags.dumpFlags: array expected"); + message.dumpFlags = []; + for (var i = 0; i < object.dumpFlags.length; ++i) { + if (typeof object.dumpFlags[i] !== "object") + throw TypeError(".google.cloud.clouddms.v1.MigrationJob.DumpFlags.dumpFlags: object expected"); + message.dumpFlags[i] = $root.google.cloud.clouddms.v1.MigrationJob.DumpFlag.fromObject(object.dumpFlags[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a DumpFlags message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.MigrationJob.DumpFlags + * @static + * @param {google.cloud.clouddms.v1.MigrationJob.DumpFlags} message DumpFlags + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DumpFlags.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dumpFlags = []; + if (message.dumpFlags && message.dumpFlags.length) { + object.dumpFlags = []; + for (var j = 0; j < message.dumpFlags.length; ++j) + object.dumpFlags[j] = $root.google.cloud.clouddms.v1.MigrationJob.DumpFlag.toObject(message.dumpFlags[j], options); + } + return object; + }; + + /** + * Converts this DumpFlags to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.MigrationJob.DumpFlags + * @instance + * @returns {Object.} JSON object + */ + DumpFlags.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DumpFlags + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.MigrationJob.DumpFlags + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DumpFlags.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.MigrationJob.DumpFlags"; + }; + + return DumpFlags; + })(); + + return MigrationJob; + })(); + + v1.ConversionWorkspaceInfo = (function() { + + /** + * Properties of a ConversionWorkspaceInfo. + * @memberof google.cloud.clouddms.v1 + * @interface IConversionWorkspaceInfo + * @property {string|null} [name] ConversionWorkspaceInfo name + * @property {string|null} [commitId] ConversionWorkspaceInfo commitId + */ + + /** + * Constructs a new ConversionWorkspaceInfo. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a ConversionWorkspaceInfo. + * @implements IConversionWorkspaceInfo + * @constructor + * @param {google.cloud.clouddms.v1.IConversionWorkspaceInfo=} [properties] Properties to set + */ + function ConversionWorkspaceInfo(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]]; + } + + /** + * ConversionWorkspaceInfo name. + * @member {string} name + * @memberof google.cloud.clouddms.v1.ConversionWorkspaceInfo + * @instance + */ + ConversionWorkspaceInfo.prototype.name = ""; + + /** + * ConversionWorkspaceInfo commitId. + * @member {string} commitId + * @memberof google.cloud.clouddms.v1.ConversionWorkspaceInfo + * @instance + */ + ConversionWorkspaceInfo.prototype.commitId = ""; + + /** + * Creates a new ConversionWorkspaceInfo instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.ConversionWorkspaceInfo + * @static + * @param {google.cloud.clouddms.v1.IConversionWorkspaceInfo=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.ConversionWorkspaceInfo} ConversionWorkspaceInfo instance + */ + ConversionWorkspaceInfo.create = function create(properties) { + return new ConversionWorkspaceInfo(properties); + }; + + /** + * Encodes the specified ConversionWorkspaceInfo message. Does not implicitly {@link google.cloud.clouddms.v1.ConversionWorkspaceInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.ConversionWorkspaceInfo + * @static + * @param {google.cloud.clouddms.v1.IConversionWorkspaceInfo} message ConversionWorkspaceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversionWorkspaceInfo.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.commitId != null && Object.hasOwnProperty.call(message, "commitId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.commitId); + return writer; + }; + + /** + * Encodes the specified ConversionWorkspaceInfo message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ConversionWorkspaceInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.ConversionWorkspaceInfo + * @static + * @param {google.cloud.clouddms.v1.IConversionWorkspaceInfo} message ConversionWorkspaceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversionWorkspaceInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConversionWorkspaceInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.ConversionWorkspaceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.ConversionWorkspaceInfo} ConversionWorkspaceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversionWorkspaceInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.ConversionWorkspaceInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.commitId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConversionWorkspaceInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.ConversionWorkspaceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.ConversionWorkspaceInfo} ConversionWorkspaceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversionWorkspaceInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConversionWorkspaceInfo message. + * @function verify + * @memberof google.cloud.clouddms.v1.ConversionWorkspaceInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConversionWorkspaceInfo.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.commitId != null && message.hasOwnProperty("commitId")) + if (!$util.isString(message.commitId)) + return "commitId: string expected"; + return null; + }; + + /** + * Creates a ConversionWorkspaceInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.ConversionWorkspaceInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.ConversionWorkspaceInfo} ConversionWorkspaceInfo + */ + ConversionWorkspaceInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.ConversionWorkspaceInfo) + return object; + var message = new $root.google.cloud.clouddms.v1.ConversionWorkspaceInfo(); + if (object.name != null) + message.name = String(object.name); + if (object.commitId != null) + message.commitId = String(object.commitId); + return message; + }; + + /** + * Creates a plain object from a ConversionWorkspaceInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.ConversionWorkspaceInfo + * @static + * @param {google.cloud.clouddms.v1.ConversionWorkspaceInfo} message ConversionWorkspaceInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConversionWorkspaceInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.commitId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.commitId != null && message.hasOwnProperty("commitId")) + object.commitId = message.commitId; + return object; + }; + + /** + * Converts this ConversionWorkspaceInfo to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.ConversionWorkspaceInfo + * @instance + * @returns {Object.} JSON object + */ + ConversionWorkspaceInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConversionWorkspaceInfo + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.ConversionWorkspaceInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConversionWorkspaceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.ConversionWorkspaceInfo"; + }; + + return ConversionWorkspaceInfo; + })(); + + v1.ConnectionProfile = (function() { + + /** + * Properties of a ConnectionProfile. + * @memberof google.cloud.clouddms.v1 + * @interface IConnectionProfile + * @property {string|null} [name] ConnectionProfile name + * @property {google.protobuf.ITimestamp|null} [createTime] ConnectionProfile createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] ConnectionProfile updateTime + * @property {Object.|null} [labels] ConnectionProfile labels + * @property {google.cloud.clouddms.v1.ConnectionProfile.State|null} [state] ConnectionProfile state + * @property {string|null} [displayName] ConnectionProfile displayName + * @property {google.cloud.clouddms.v1.IMySqlConnectionProfile|null} [mysql] ConnectionProfile mysql + * @property {google.cloud.clouddms.v1.IPostgreSqlConnectionProfile|null} [postgresql] ConnectionProfile postgresql + * @property {google.cloud.clouddms.v1.IOracleConnectionProfile|null} [oracle] ConnectionProfile oracle + * @property {google.cloud.clouddms.v1.ICloudSqlConnectionProfile|null} [cloudsql] ConnectionProfile cloudsql + * @property {google.cloud.clouddms.v1.IAlloyDbConnectionProfile|null} [alloydb] ConnectionProfile alloydb + * @property {google.rpc.IStatus|null} [error] ConnectionProfile error + * @property {google.cloud.clouddms.v1.DatabaseProvider|null} [provider] ConnectionProfile provider + */ + + /** + * Constructs a new ConnectionProfile. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a ConnectionProfile. + * @implements IConnectionProfile + * @constructor + * @param {google.cloud.clouddms.v1.IConnectionProfile=} [properties] Properties to set + */ + function ConnectionProfile(properties) { + this.labels = {}; + 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]]; + } + + /** + * ConnectionProfile name. + * @member {string} name + * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @instance + */ + ConnectionProfile.prototype.name = ""; + + /** + * ConnectionProfile createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @instance + */ + ConnectionProfile.prototype.createTime = null; + + /** + * ConnectionProfile updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @instance + */ + ConnectionProfile.prototype.updateTime = null; + + /** + * ConnectionProfile labels. + * @member {Object.} labels + * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @instance + */ + ConnectionProfile.prototype.labels = $util.emptyObject; + + /** + * ConnectionProfile state. + * @member {google.cloud.clouddms.v1.ConnectionProfile.State} state + * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @instance + */ + ConnectionProfile.prototype.state = 0; + + /** + * ConnectionProfile displayName. + * @member {string} displayName + * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @instance + */ + ConnectionProfile.prototype.displayName = ""; + + /** + * ConnectionProfile mysql. + * @member {google.cloud.clouddms.v1.IMySqlConnectionProfile|null|undefined} mysql + * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @instance + */ + ConnectionProfile.prototype.mysql = null; + + /** + * ConnectionProfile postgresql. + * @member {google.cloud.clouddms.v1.IPostgreSqlConnectionProfile|null|undefined} postgresql + * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @instance + */ + ConnectionProfile.prototype.postgresql = null; + + /** + * ConnectionProfile oracle. + * @member {google.cloud.clouddms.v1.IOracleConnectionProfile|null|undefined} oracle + * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @instance + */ + ConnectionProfile.prototype.oracle = null; + + /** + * ConnectionProfile cloudsql. + * @member {google.cloud.clouddms.v1.ICloudSqlConnectionProfile|null|undefined} cloudsql + * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @instance + */ + ConnectionProfile.prototype.cloudsql = null; + + /** + * ConnectionProfile alloydb. + * @member {google.cloud.clouddms.v1.IAlloyDbConnectionProfile|null|undefined} alloydb + * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @instance + */ + ConnectionProfile.prototype.alloydb = null; + + /** + * ConnectionProfile error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @instance + */ + ConnectionProfile.prototype.error = null; + + /** + * ConnectionProfile provider. + * @member {google.cloud.clouddms.v1.DatabaseProvider} provider + * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @instance + */ + ConnectionProfile.prototype.provider = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ConnectionProfile connectionProfile. + * @member {"mysql"|"postgresql"|"oracle"|"cloudsql"|"alloydb"|undefined} connectionProfile + * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @instance + */ + Object.defineProperty(ConnectionProfile.prototype, "connectionProfile", { + get: $util.oneOfGetter($oneOfFields = ["mysql", "postgresql", "oracle", "cloudsql", "alloydb"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ConnectionProfile instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @static + * @param {google.cloud.clouddms.v1.IConnectionProfile=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.ConnectionProfile} ConnectionProfile instance + */ + ConnectionProfile.create = function create(properties) { + return new ConnectionProfile(properties); + }; + + /** + * Encodes the specified ConnectionProfile message. Does not implicitly {@link google.cloud.clouddms.v1.ConnectionProfile.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @static + * @param {google.cloud.clouddms.v1.IConnectionProfile} message ConnectionProfile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConnectionProfile.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.provider != null && Object.hasOwnProperty.call(message, "provider")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.provider); + if (message.mysql != null && Object.hasOwnProperty.call(message, "mysql")) + $root.google.cloud.clouddms.v1.MySqlConnectionProfile.encode(message.mysql, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.postgresql != null && Object.hasOwnProperty.call(message, "postgresql")) + $root.google.cloud.clouddms.v1.PostgreSqlConnectionProfile.encode(message.postgresql, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.cloudsql != null && Object.hasOwnProperty.call(message, "cloudsql")) + $root.google.cloud.clouddms.v1.CloudSqlConnectionProfile.encode(message.cloudsql, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + if (message.oracle != null && Object.hasOwnProperty.call(message, "oracle")) + $root.google.cloud.clouddms.v1.OracleConnectionProfile.encode(message.oracle, writer.uint32(/* id 104, wireType 2 =*/834).fork()).ldelim(); + if (message.alloydb != null && Object.hasOwnProperty.call(message, "alloydb")) + $root.google.cloud.clouddms.v1.AlloyDbConnectionProfile.encode(message.alloydb, writer.uint32(/* id 105, wireType 2 =*/842).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConnectionProfile message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ConnectionProfile.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @static + * @param {google.cloud.clouddms.v1.IConnectionProfile} message ConnectionProfile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConnectionProfile.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConnectionProfile message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.ConnectionProfile} ConnectionProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConnectionProfile.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.ConnectionProfile(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + if (message.labels === $util.emptyObject) + message.labels = {}; + 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.labels[key] = value; + break; + } + case 5: { + message.state = reader.int32(); + break; + } + case 6: { + message.displayName = reader.string(); + break; + } + case 100: { + message.mysql = $root.google.cloud.clouddms.v1.MySqlConnectionProfile.decode(reader, reader.uint32()); + break; + } + case 101: { + message.postgresql = $root.google.cloud.clouddms.v1.PostgreSqlConnectionProfile.decode(reader, reader.uint32()); + break; + } + case 104: { + message.oracle = $root.google.cloud.clouddms.v1.OracleConnectionProfile.decode(reader, reader.uint32()); + break; + } + case 102: { + message.cloudsql = $root.google.cloud.clouddms.v1.CloudSqlConnectionProfile.decode(reader, reader.uint32()); + break; + } + case 105: { + message.alloydb = $root.google.cloud.clouddms.v1.AlloyDbConnectionProfile.decode(reader, reader.uint32()); + break; + } + case 7: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 8: { + message.provider = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConnectionProfile message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.ConnectionProfile} ConnectionProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConnectionProfile.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConnectionProfile message. + * @function verify + * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConnectionProfile.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: 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.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.mysql != null && message.hasOwnProperty("mysql")) { + properties.connectionProfile = 1; + { + var error = $root.google.cloud.clouddms.v1.MySqlConnectionProfile.verify(message.mysql); + if (error) + return "mysql." + error; + } + } + if (message.postgresql != null && message.hasOwnProperty("postgresql")) { + if (properties.connectionProfile === 1) + return "connectionProfile: multiple values"; + properties.connectionProfile = 1; + { + var error = $root.google.cloud.clouddms.v1.PostgreSqlConnectionProfile.verify(message.postgresql); + if (error) + return "postgresql." + error; + } + } + if (message.oracle != null && message.hasOwnProperty("oracle")) { + if (properties.connectionProfile === 1) + return "connectionProfile: multiple values"; + properties.connectionProfile = 1; + { + var error = $root.google.cloud.clouddms.v1.OracleConnectionProfile.verify(message.oracle); + if (error) + return "oracle." + error; + } + } + if (message.cloudsql != null && message.hasOwnProperty("cloudsql")) { + if (properties.connectionProfile === 1) + return "connectionProfile: multiple values"; + properties.connectionProfile = 1; + { + var error = $root.google.cloud.clouddms.v1.CloudSqlConnectionProfile.verify(message.cloudsql); + if (error) + return "cloudsql." + error; + } + } + if (message.alloydb != null && message.hasOwnProperty("alloydb")) { + if (properties.connectionProfile === 1) + return "connectionProfile: multiple values"; + properties.connectionProfile = 1; + { + var error = $root.google.cloud.clouddms.v1.AlloyDbConnectionProfile.verify(message.alloydb); + if (error) + return "alloydb." + error; + } + } + if (message.error != null && message.hasOwnProperty("error")) { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + if (message.provider != null && message.hasOwnProperty("provider")) + switch (message.provider) { + default: + return "provider: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a ConnectionProfile message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.ConnectionProfile} ConnectionProfile + */ + ConnectionProfile.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.ConnectionProfile) + return object; + var message = new $root.google.cloud.clouddms.v1.ConnectionProfile(); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.clouddms.v1.ConnectionProfile.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.clouddms.v1.ConnectionProfile.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.clouddms.v1.ConnectionProfile.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "DRAFT": + case 1: + message.state = 1; + break; + case "CREATING": + case 2: + message.state = 2; + break; + case "READY": + case 3: + message.state = 3; + break; + case "UPDATING": + case 4: + message.state = 4; + break; + case "DELETING": + case 5: + message.state = 5; + break; + case "DELETED": + case 6: + message.state = 6; + break; + case "FAILED": + case 7: + message.state = 7; + break; + } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.mysql != null) { + if (typeof object.mysql !== "object") + throw TypeError(".google.cloud.clouddms.v1.ConnectionProfile.mysql: object expected"); + message.mysql = $root.google.cloud.clouddms.v1.MySqlConnectionProfile.fromObject(object.mysql); + } + if (object.postgresql != null) { + if (typeof object.postgresql !== "object") + throw TypeError(".google.cloud.clouddms.v1.ConnectionProfile.postgresql: object expected"); + message.postgresql = $root.google.cloud.clouddms.v1.PostgreSqlConnectionProfile.fromObject(object.postgresql); + } + if (object.oracle != null) { + if (typeof object.oracle !== "object") + throw TypeError(".google.cloud.clouddms.v1.ConnectionProfile.oracle: object expected"); + message.oracle = $root.google.cloud.clouddms.v1.OracleConnectionProfile.fromObject(object.oracle); + } + if (object.cloudsql != null) { + if (typeof object.cloudsql !== "object") + throw TypeError(".google.cloud.clouddms.v1.ConnectionProfile.cloudsql: object expected"); + message.cloudsql = $root.google.cloud.clouddms.v1.CloudSqlConnectionProfile.fromObject(object.cloudsql); + } + if (object.alloydb != null) { + if (typeof object.alloydb !== "object") + throw TypeError(".google.cloud.clouddms.v1.ConnectionProfile.alloydb: object expected"); + message.alloydb = $root.google.cloud.clouddms.v1.AlloyDbConnectionProfile.fromObject(object.alloydb); + } + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.cloud.clouddms.v1.ConnectionProfile.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + switch (object.provider) { + default: + if (typeof object.provider === "number") { + message.provider = object.provider; + break; + } + break; + case "DATABASE_PROVIDER_UNSPECIFIED": + case 0: + message.provider = 0; + break; + case "CLOUDSQL": + case 1: + message.provider = 1; + break; + case "RDS": + case 2: + message.provider = 2; + break; + case "AURORA": + case 3: + message.provider = 3; + break; + case "ALLOYDB": + case 4: + message.provider = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a ConnectionProfile message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @static + * @param {google.cloud.clouddms.v1.ConnectionProfile} message ConnectionProfile + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConnectionProfile.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.updateTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.displayName = ""; + object.error = null; + object.provider = options.enums === String ? "DATABASE_PROVIDER_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + 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); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.clouddms.v1.ConnectionProfile.State[message.state] === undefined ? message.state : $root.google.cloud.clouddms.v1.ConnectionProfile.State[message.state] : message.state; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (message.provider != null && message.hasOwnProperty("provider")) + object.provider = options.enums === String ? $root.google.cloud.clouddms.v1.DatabaseProvider[message.provider] === undefined ? message.provider : $root.google.cloud.clouddms.v1.DatabaseProvider[message.provider] : message.provider; + if (message.mysql != null && message.hasOwnProperty("mysql")) { + object.mysql = $root.google.cloud.clouddms.v1.MySqlConnectionProfile.toObject(message.mysql, options); + if (options.oneofs) + object.connectionProfile = "mysql"; + } + if (message.postgresql != null && message.hasOwnProperty("postgresql")) { + object.postgresql = $root.google.cloud.clouddms.v1.PostgreSqlConnectionProfile.toObject(message.postgresql, options); + if (options.oneofs) + object.connectionProfile = "postgresql"; + } + if (message.cloudsql != null && message.hasOwnProperty("cloudsql")) { + object.cloudsql = $root.google.cloud.clouddms.v1.CloudSqlConnectionProfile.toObject(message.cloudsql, options); + if (options.oneofs) + object.connectionProfile = "cloudsql"; + } + if (message.oracle != null && message.hasOwnProperty("oracle")) { + object.oracle = $root.google.cloud.clouddms.v1.OracleConnectionProfile.toObject(message.oracle, options); + if (options.oneofs) + object.connectionProfile = "oracle"; + } + if (message.alloydb != null && message.hasOwnProperty("alloydb")) { + object.alloydb = $root.google.cloud.clouddms.v1.AlloyDbConnectionProfile.toObject(message.alloydb, options); + if (options.oneofs) + object.connectionProfile = "alloydb"; + } + return object; + }; + + /** + * Converts this ConnectionProfile to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @instance + * @returns {Object.} JSON object + */ + ConnectionProfile.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConnectionProfile + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.ConnectionProfile + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConnectionProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.ConnectionProfile"; + }; + + /** + * State enum. + * @name google.cloud.clouddms.v1.ConnectionProfile.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} DRAFT=1 DRAFT value + * @property {number} CREATING=2 CREATING value + * @property {number} READY=3 READY value + * @property {number} UPDATING=4 UPDATING value + * @property {number} DELETING=5 DELETING value + * @property {number} DELETED=6 DELETED value + * @property {number} FAILED=7 FAILED value + */ + ConnectionProfile.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DRAFT"] = 1; + values[valuesById[2] = "CREATING"] = 2; + values[valuesById[3] = "READY"] = 3; + values[valuesById[4] = "UPDATING"] = 4; + values[valuesById[5] = "DELETING"] = 5; + values[valuesById[6] = "DELETED"] = 6; + values[valuesById[7] = "FAILED"] = 7; + return values; + })(); + + return ConnectionProfile; + })(); + + v1.MigrationJobVerificationError = (function() { + + /** + * Properties of a MigrationJobVerificationError. + * @memberof google.cloud.clouddms.v1 + * @interface IMigrationJobVerificationError + * @property {google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode|null} [errorCode] MigrationJobVerificationError errorCode + * @property {string|null} [errorMessage] MigrationJobVerificationError errorMessage + * @property {string|null} [errorDetailMessage] MigrationJobVerificationError errorDetailMessage + */ + + /** + * Constructs a new MigrationJobVerificationError. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a MigrationJobVerificationError. + * @implements IMigrationJobVerificationError + * @constructor + * @param {google.cloud.clouddms.v1.IMigrationJobVerificationError=} [properties] Properties to set + */ + function MigrationJobVerificationError(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]]; + } + + /** + * MigrationJobVerificationError errorCode. + * @member {google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode} errorCode + * @memberof google.cloud.clouddms.v1.MigrationJobVerificationError + * @instance + */ + MigrationJobVerificationError.prototype.errorCode = 0; + + /** + * MigrationJobVerificationError errorMessage. + * @member {string} errorMessage + * @memberof google.cloud.clouddms.v1.MigrationJobVerificationError + * @instance + */ + MigrationJobVerificationError.prototype.errorMessage = ""; + + /** + * MigrationJobVerificationError errorDetailMessage. + * @member {string} errorDetailMessage + * @memberof google.cloud.clouddms.v1.MigrationJobVerificationError + * @instance + */ + MigrationJobVerificationError.prototype.errorDetailMessage = ""; + + /** + * Creates a new MigrationJobVerificationError instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.MigrationJobVerificationError + * @static + * @param {google.cloud.clouddms.v1.IMigrationJobVerificationError=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.MigrationJobVerificationError} MigrationJobVerificationError instance + */ + MigrationJobVerificationError.create = function create(properties) { + return new MigrationJobVerificationError(properties); + }; + + /** + * Encodes the specified MigrationJobVerificationError message. Does not implicitly {@link google.cloud.clouddms.v1.MigrationJobVerificationError.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.MigrationJobVerificationError + * @static + * @param {google.cloud.clouddms.v1.IMigrationJobVerificationError} message MigrationJobVerificationError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MigrationJobVerificationError.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.errorCode != null && Object.hasOwnProperty.call(message, "errorCode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.errorCode); + if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.errorMessage); + if (message.errorDetailMessage != null && Object.hasOwnProperty.call(message, "errorDetailMessage")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.errorDetailMessage); + return writer; + }; + + /** + * Encodes the specified MigrationJobVerificationError message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.MigrationJobVerificationError.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.MigrationJobVerificationError + * @static + * @param {google.cloud.clouddms.v1.IMigrationJobVerificationError} message MigrationJobVerificationError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MigrationJobVerificationError.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MigrationJobVerificationError message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.MigrationJobVerificationError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.MigrationJobVerificationError} MigrationJobVerificationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MigrationJobVerificationError.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.MigrationJobVerificationError(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.errorCode = reader.int32(); + break; + } + case 2: { + message.errorMessage = reader.string(); + break; + } + case 3: { + message.errorDetailMessage = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MigrationJobVerificationError message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.MigrationJobVerificationError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.MigrationJobVerificationError} MigrationJobVerificationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MigrationJobVerificationError.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MigrationJobVerificationError message. + * @function verify + * @memberof google.cloud.clouddms.v1.MigrationJobVerificationError + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MigrationJobVerificationError.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.errorCode != null && message.hasOwnProperty("errorCode")) + switch (message.errorCode) { + default: + return "errorCode: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 21: + case 24: + case 25: + case 26: + case 27: + case 28: + break; + } + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + if (!$util.isString(message.errorMessage)) + return "errorMessage: string expected"; + if (message.errorDetailMessage != null && message.hasOwnProperty("errorDetailMessage")) + if (!$util.isString(message.errorDetailMessage)) + return "errorDetailMessage: string expected"; + return null; + }; + + /** + * Creates a MigrationJobVerificationError message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.MigrationJobVerificationError + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.MigrationJobVerificationError} MigrationJobVerificationError + */ + MigrationJobVerificationError.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.MigrationJobVerificationError) + return object; + var message = new $root.google.cloud.clouddms.v1.MigrationJobVerificationError(); + switch (object.errorCode) { + default: + if (typeof object.errorCode === "number") { + message.errorCode = object.errorCode; + break; + } + break; + case "ERROR_CODE_UNSPECIFIED": + case 0: + message.errorCode = 0; + break; + case "CONNECTION_FAILURE": + case 1: + message.errorCode = 1; + break; + case "AUTHENTICATION_FAILURE": + case 2: + message.errorCode = 2; + break; + case "INVALID_CONNECTION_PROFILE_CONFIG": + case 3: + message.errorCode = 3; + break; + case "VERSION_INCOMPATIBILITY": + case 4: + message.errorCode = 4; + break; + case "CONNECTION_PROFILE_TYPES_INCOMPATIBILITY": + case 5: + message.errorCode = 5; + break; + case "NO_PGLOGICAL_INSTALLED": + case 7: + message.errorCode = 7; + break; + case "PGLOGICAL_NODE_ALREADY_EXISTS": + case 8: + message.errorCode = 8; + break; + case "INVALID_WAL_LEVEL": + case 9: + message.errorCode = 9; + break; + case "INVALID_SHARED_PRELOAD_LIBRARY": + case 10: + message.errorCode = 10; + break; + case "INSUFFICIENT_MAX_REPLICATION_SLOTS": + case 11: + message.errorCode = 11; + break; + case "INSUFFICIENT_MAX_WAL_SENDERS": + case 12: + message.errorCode = 12; + break; + case "INSUFFICIENT_MAX_WORKER_PROCESSES": + case 13: + message.errorCode = 13; + break; + case "UNSUPPORTED_EXTENSIONS": + case 14: + message.errorCode = 14; + break; + case "UNSUPPORTED_MIGRATION_TYPE": + case 15: + message.errorCode = 15; + break; + case "INVALID_RDS_LOGICAL_REPLICATION": + case 16: + message.errorCode = 16; + break; + case "UNSUPPORTED_GTID_MODE": + case 17: + message.errorCode = 17; + break; + case "UNSUPPORTED_TABLE_DEFINITION": + case 18: + message.errorCode = 18; + break; + case "UNSUPPORTED_DEFINER": + case 19: + message.errorCode = 19; + break; + case "CANT_RESTART_RUNNING_MIGRATION": + case 21: + message.errorCode = 21; + break; + case "TABLES_WITH_LIMITED_SUPPORT": + case 24: + message.errorCode = 24; + break; + case "UNSUPPORTED_DATABASE_LOCALE": + case 25: + message.errorCode = 25; + break; + case "UNSUPPORTED_DATABASE_FDW_CONFIG": + case 26: + message.errorCode = 26; + break; + case "ERROR_RDBMS": + case 27: + message.errorCode = 27; + break; + case "SOURCE_SIZE_EXCEEDS_THRESHOLD": + case 28: + message.errorCode = 28; + break; + } + if (object.errorMessage != null) + message.errorMessage = String(object.errorMessage); + if (object.errorDetailMessage != null) + message.errorDetailMessage = String(object.errorDetailMessage); + return message; + }; + + /** + * Creates a plain object from a MigrationJobVerificationError message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.MigrationJobVerificationError + * @static + * @param {google.cloud.clouddms.v1.MigrationJobVerificationError} message MigrationJobVerificationError + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MigrationJobVerificationError.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.errorCode = options.enums === String ? "ERROR_CODE_UNSPECIFIED" : 0; + object.errorMessage = ""; + object.errorDetailMessage = ""; + } + if (message.errorCode != null && message.hasOwnProperty("errorCode")) + object.errorCode = options.enums === String ? $root.google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode[message.errorCode] === undefined ? message.errorCode : $root.google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode[message.errorCode] : message.errorCode; + if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) + object.errorMessage = message.errorMessage; + if (message.errorDetailMessage != null && message.hasOwnProperty("errorDetailMessage")) + object.errorDetailMessage = message.errorDetailMessage; + return object; + }; + + /** + * Converts this MigrationJobVerificationError to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.MigrationJobVerificationError + * @instance + * @returns {Object.} JSON object + */ + MigrationJobVerificationError.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MigrationJobVerificationError + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.MigrationJobVerificationError + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MigrationJobVerificationError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.MigrationJobVerificationError"; + }; + + /** + * ErrorCode enum. + * @name google.cloud.clouddms.v1.MigrationJobVerificationError.ErrorCode + * @enum {number} + * @property {number} ERROR_CODE_UNSPECIFIED=0 ERROR_CODE_UNSPECIFIED value + * @property {number} CONNECTION_FAILURE=1 CONNECTION_FAILURE value + * @property {number} AUTHENTICATION_FAILURE=2 AUTHENTICATION_FAILURE value + * @property {number} INVALID_CONNECTION_PROFILE_CONFIG=3 INVALID_CONNECTION_PROFILE_CONFIG value + * @property {number} VERSION_INCOMPATIBILITY=4 VERSION_INCOMPATIBILITY value + * @property {number} CONNECTION_PROFILE_TYPES_INCOMPATIBILITY=5 CONNECTION_PROFILE_TYPES_INCOMPATIBILITY value + * @property {number} NO_PGLOGICAL_INSTALLED=7 NO_PGLOGICAL_INSTALLED value + * @property {number} PGLOGICAL_NODE_ALREADY_EXISTS=8 PGLOGICAL_NODE_ALREADY_EXISTS value + * @property {number} INVALID_WAL_LEVEL=9 INVALID_WAL_LEVEL value + * @property {number} INVALID_SHARED_PRELOAD_LIBRARY=10 INVALID_SHARED_PRELOAD_LIBRARY value + * @property {number} INSUFFICIENT_MAX_REPLICATION_SLOTS=11 INSUFFICIENT_MAX_REPLICATION_SLOTS value + * @property {number} INSUFFICIENT_MAX_WAL_SENDERS=12 INSUFFICIENT_MAX_WAL_SENDERS value + * @property {number} INSUFFICIENT_MAX_WORKER_PROCESSES=13 INSUFFICIENT_MAX_WORKER_PROCESSES value + * @property {number} UNSUPPORTED_EXTENSIONS=14 UNSUPPORTED_EXTENSIONS value + * @property {number} UNSUPPORTED_MIGRATION_TYPE=15 UNSUPPORTED_MIGRATION_TYPE value + * @property {number} INVALID_RDS_LOGICAL_REPLICATION=16 INVALID_RDS_LOGICAL_REPLICATION value + * @property {number} UNSUPPORTED_GTID_MODE=17 UNSUPPORTED_GTID_MODE value + * @property {number} UNSUPPORTED_TABLE_DEFINITION=18 UNSUPPORTED_TABLE_DEFINITION value + * @property {number} UNSUPPORTED_DEFINER=19 UNSUPPORTED_DEFINER value + * @property {number} CANT_RESTART_RUNNING_MIGRATION=21 CANT_RESTART_RUNNING_MIGRATION value + * @property {number} TABLES_WITH_LIMITED_SUPPORT=24 TABLES_WITH_LIMITED_SUPPORT value + * @property {number} UNSUPPORTED_DATABASE_LOCALE=25 UNSUPPORTED_DATABASE_LOCALE value + * @property {number} UNSUPPORTED_DATABASE_FDW_CONFIG=26 UNSUPPORTED_DATABASE_FDW_CONFIG value + * @property {number} ERROR_RDBMS=27 ERROR_RDBMS value + * @property {number} SOURCE_SIZE_EXCEEDS_THRESHOLD=28 SOURCE_SIZE_EXCEEDS_THRESHOLD value + */ + MigrationJobVerificationError.ErrorCode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ERROR_CODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONNECTION_FAILURE"] = 1; + values[valuesById[2] = "AUTHENTICATION_FAILURE"] = 2; + values[valuesById[3] = "INVALID_CONNECTION_PROFILE_CONFIG"] = 3; + values[valuesById[4] = "VERSION_INCOMPATIBILITY"] = 4; + values[valuesById[5] = "CONNECTION_PROFILE_TYPES_INCOMPATIBILITY"] = 5; + values[valuesById[7] = "NO_PGLOGICAL_INSTALLED"] = 7; + values[valuesById[8] = "PGLOGICAL_NODE_ALREADY_EXISTS"] = 8; + values[valuesById[9] = "INVALID_WAL_LEVEL"] = 9; + values[valuesById[10] = "INVALID_SHARED_PRELOAD_LIBRARY"] = 10; + values[valuesById[11] = "INSUFFICIENT_MAX_REPLICATION_SLOTS"] = 11; + values[valuesById[12] = "INSUFFICIENT_MAX_WAL_SENDERS"] = 12; + values[valuesById[13] = "INSUFFICIENT_MAX_WORKER_PROCESSES"] = 13; + values[valuesById[14] = "UNSUPPORTED_EXTENSIONS"] = 14; + values[valuesById[15] = "UNSUPPORTED_MIGRATION_TYPE"] = 15; + values[valuesById[16] = "INVALID_RDS_LOGICAL_REPLICATION"] = 16; + values[valuesById[17] = "UNSUPPORTED_GTID_MODE"] = 17; + values[valuesById[18] = "UNSUPPORTED_TABLE_DEFINITION"] = 18; + values[valuesById[19] = "UNSUPPORTED_DEFINER"] = 19; + values[valuesById[21] = "CANT_RESTART_RUNNING_MIGRATION"] = 21; + values[valuesById[24] = "TABLES_WITH_LIMITED_SUPPORT"] = 24; + values[valuesById[25] = "UNSUPPORTED_DATABASE_LOCALE"] = 25; + values[valuesById[26] = "UNSUPPORTED_DATABASE_FDW_CONFIG"] = 26; + values[valuesById[27] = "ERROR_RDBMS"] = 27; + values[valuesById[28] = "SOURCE_SIZE_EXCEEDS_THRESHOLD"] = 28; + return values; + })(); + + return MigrationJobVerificationError; + })(); + + /** + * DatabaseEngine enum. + * @name google.cloud.clouddms.v1.DatabaseEngine + * @enum {number} + * @property {number} DATABASE_ENGINE_UNSPECIFIED=0 DATABASE_ENGINE_UNSPECIFIED value + * @property {number} MYSQL=1 MYSQL value + * @property {number} POSTGRESQL=2 POSTGRESQL value + * @property {number} ORACLE=4 ORACLE value + */ + v1.DatabaseEngine = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATABASE_ENGINE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MYSQL"] = 1; + values[valuesById[2] = "POSTGRESQL"] = 2; + values[valuesById[4] = "ORACLE"] = 4; + return values; + })(); + + /** + * DatabaseProvider enum. + * @name google.cloud.clouddms.v1.DatabaseProvider + * @enum {number} + * @property {number} DATABASE_PROVIDER_UNSPECIFIED=0 DATABASE_PROVIDER_UNSPECIFIED value + * @property {number} CLOUDSQL=1 CLOUDSQL value + * @property {number} RDS=2 RDS value + * @property {number} AURORA=3 AURORA value + * @property {number} ALLOYDB=4 ALLOYDB value + */ + v1.DatabaseProvider = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATABASE_PROVIDER_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUDSQL"] = 1; + values[valuesById[2] = "RDS"] = 2; + values[valuesById[3] = "AURORA"] = 3; + values[valuesById[4] = "ALLOYDB"] = 4; + return values; + })(); + + v1.PrivateConnection = (function() { + + /** + * Properties of a PrivateConnection. + * @memberof google.cloud.clouddms.v1 + * @interface IPrivateConnection + * @property {string|null} [name] PrivateConnection name + * @property {google.protobuf.ITimestamp|null} [createTime] PrivateConnection createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] PrivateConnection updateTime + * @property {Object.|null} [labels] PrivateConnection labels + * @property {string|null} [displayName] PrivateConnection displayName + * @property {google.cloud.clouddms.v1.PrivateConnection.State|null} [state] PrivateConnection state + * @property {google.rpc.IStatus|null} [error] PrivateConnection error + * @property {google.cloud.clouddms.v1.IVpcPeeringConfig|null} [vpcPeeringConfig] PrivateConnection vpcPeeringConfig + */ + + /** + * Constructs a new PrivateConnection. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a PrivateConnection. + * @implements IPrivateConnection + * @constructor + * @param {google.cloud.clouddms.v1.IPrivateConnection=} [properties] Properties to set + */ + function PrivateConnection(properties) { + this.labels = {}; + 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]]; + } + + /** + * PrivateConnection name. + * @member {string} name + * @memberof google.cloud.clouddms.v1.PrivateConnection + * @instance + */ + PrivateConnection.prototype.name = ""; + + /** + * PrivateConnection createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.clouddms.v1.PrivateConnection + * @instance + */ + PrivateConnection.prototype.createTime = null; + + /** + * PrivateConnection updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.clouddms.v1.PrivateConnection + * @instance + */ + PrivateConnection.prototype.updateTime = null; + + /** + * PrivateConnection labels. + * @member {Object.} labels + * @memberof google.cloud.clouddms.v1.PrivateConnection + * @instance + */ + PrivateConnection.prototype.labels = $util.emptyObject; + + /** + * PrivateConnection displayName. + * @member {string} displayName + * @memberof google.cloud.clouddms.v1.PrivateConnection + * @instance + */ + PrivateConnection.prototype.displayName = ""; + + /** + * PrivateConnection state. + * @member {google.cloud.clouddms.v1.PrivateConnection.State} state + * @memberof google.cloud.clouddms.v1.PrivateConnection + * @instance + */ + PrivateConnection.prototype.state = 0; + + /** + * PrivateConnection error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.cloud.clouddms.v1.PrivateConnection + * @instance + */ + PrivateConnection.prototype.error = null; + + /** + * PrivateConnection vpcPeeringConfig. + * @member {google.cloud.clouddms.v1.IVpcPeeringConfig|null|undefined} vpcPeeringConfig + * @memberof google.cloud.clouddms.v1.PrivateConnection + * @instance + */ + PrivateConnection.prototype.vpcPeeringConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PrivateConnection connectivity. + * @member {"vpcPeeringConfig"|undefined} connectivity + * @memberof google.cloud.clouddms.v1.PrivateConnection + * @instance + */ + Object.defineProperty(PrivateConnection.prototype, "connectivity", { + get: $util.oneOfGetter($oneOfFields = ["vpcPeeringConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PrivateConnection instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.PrivateConnection + * @static + * @param {google.cloud.clouddms.v1.IPrivateConnection=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.PrivateConnection} PrivateConnection instance + */ + PrivateConnection.create = function create(properties) { + return new PrivateConnection(properties); + }; + + /** + * Encodes the specified PrivateConnection message. Does not implicitly {@link google.cloud.clouddms.v1.PrivateConnection.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.PrivateConnection + * @static + * @param {google.cloud.clouddms.v1.IPrivateConnection} message PrivateConnection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateConnection.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.vpcPeeringConfig != null && Object.hasOwnProperty.call(message, "vpcPeeringConfig")) + $root.google.cloud.clouddms.v1.VpcPeeringConfig.encode(message.vpcPeeringConfig, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PrivateConnection message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.PrivateConnection.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.PrivateConnection + * @static + * @param {google.cloud.clouddms.v1.IPrivateConnection} message PrivateConnection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateConnection.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrivateConnection message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.PrivateConnection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.PrivateConnection} PrivateConnection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateConnection.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.PrivateConnection(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + if (message.labels === $util.emptyObject) + message.labels = {}; + 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.labels[key] = value; + break; + } + case 5: { + message.displayName = reader.string(); + break; + } + case 6: { + message.state = reader.int32(); + break; + } + case 7: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 100: { + message.vpcPeeringConfig = $root.google.cloud.clouddms.v1.VpcPeeringConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PrivateConnection message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.PrivateConnection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.PrivateConnection} PrivateConnection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateConnection.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrivateConnection message. + * @function verify + * @memberof google.cloud.clouddms.v1.PrivateConnection + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrivateConnection.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: 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.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.error != null && message.hasOwnProperty("error")) { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + if (message.vpcPeeringConfig != null && message.hasOwnProperty("vpcPeeringConfig")) { + properties.connectivity = 1; + { + var error = $root.google.cloud.clouddms.v1.VpcPeeringConfig.verify(message.vpcPeeringConfig); + if (error) + return "vpcPeeringConfig." + error; + } + } + return null; + }; + + /** + * Creates a PrivateConnection message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.PrivateConnection + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.PrivateConnection} PrivateConnection + */ + PrivateConnection.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.PrivateConnection) + return object; + var message = new $root.google.cloud.clouddms.v1.PrivateConnection(); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.clouddms.v1.PrivateConnection.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.clouddms.v1.PrivateConnection.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.clouddms.v1.PrivateConnection.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.displayName != null) + message.displayName = String(object.displayName); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "CREATED": + case 2: + message.state = 2; + break; + case "FAILED": + case 3: + message.state = 3; + break; + case "DELETING": + case 4: + message.state = 4; + break; + case "FAILED_TO_DELETE": + case 5: + message.state = 5; + break; + case "DELETED": + case 6: + message.state = 6; + break; + } + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.cloud.clouddms.v1.PrivateConnection.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + if (object.vpcPeeringConfig != null) { + if (typeof object.vpcPeeringConfig !== "object") + throw TypeError(".google.cloud.clouddms.v1.PrivateConnection.vpcPeeringConfig: object expected"); + message.vpcPeeringConfig = $root.google.cloud.clouddms.v1.VpcPeeringConfig.fromObject(object.vpcPeeringConfig); + } + return message; + }; + + /** + * Creates a plain object from a PrivateConnection message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.PrivateConnection + * @static + * @param {google.cloud.clouddms.v1.PrivateConnection} message PrivateConnection + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrivateConnection.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.updateTime = null; + object.displayName = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.error = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + 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); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.clouddms.v1.PrivateConnection.State[message.state] === undefined ? message.state : $root.google.cloud.clouddms.v1.PrivateConnection.State[message.state] : message.state; + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (message.vpcPeeringConfig != null && message.hasOwnProperty("vpcPeeringConfig")) { + object.vpcPeeringConfig = $root.google.cloud.clouddms.v1.VpcPeeringConfig.toObject(message.vpcPeeringConfig, options); + if (options.oneofs) + object.connectivity = "vpcPeeringConfig"; + } + return object; + }; + + /** + * Converts this PrivateConnection to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.PrivateConnection + * @instance + * @returns {Object.} JSON object + */ + PrivateConnection.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PrivateConnection + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.PrivateConnection + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrivateConnection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.PrivateConnection"; + }; + + /** + * State enum. + * @name google.cloud.clouddms.v1.PrivateConnection.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} CREATED=2 CREATED value + * @property {number} FAILED=3 FAILED value + * @property {number} DELETING=4 DELETING value + * @property {number} FAILED_TO_DELETE=5 FAILED_TO_DELETE value + * @property {number} DELETED=6 DELETED value + */ + PrivateConnection.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "CREATED"] = 2; + values[valuesById[3] = "FAILED"] = 3; + values[valuesById[4] = "DELETING"] = 4; + values[valuesById[5] = "FAILED_TO_DELETE"] = 5; + values[valuesById[6] = "DELETED"] = 6; + return values; + })(); + + return PrivateConnection; + })(); + + v1.VpcPeeringConfig = (function() { + + /** + * Properties of a VpcPeeringConfig. + * @memberof google.cloud.clouddms.v1 + * @interface IVpcPeeringConfig + * @property {string|null} [vpcName] VpcPeeringConfig vpcName + * @property {string|null} [subnet] VpcPeeringConfig subnet + */ + + /** + * Constructs a new VpcPeeringConfig. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a VpcPeeringConfig. + * @implements IVpcPeeringConfig + * @constructor + * @param {google.cloud.clouddms.v1.IVpcPeeringConfig=} [properties] Properties to set + */ + function VpcPeeringConfig(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]]; + } + + /** + * VpcPeeringConfig vpcName. + * @member {string} vpcName + * @memberof google.cloud.clouddms.v1.VpcPeeringConfig + * @instance + */ + VpcPeeringConfig.prototype.vpcName = ""; + + /** + * VpcPeeringConfig subnet. + * @member {string} subnet + * @memberof google.cloud.clouddms.v1.VpcPeeringConfig + * @instance + */ + VpcPeeringConfig.prototype.subnet = ""; + + /** + * Creates a new VpcPeeringConfig instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.VpcPeeringConfig + * @static + * @param {google.cloud.clouddms.v1.IVpcPeeringConfig=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.VpcPeeringConfig} VpcPeeringConfig instance + */ + VpcPeeringConfig.create = function create(properties) { + return new VpcPeeringConfig(properties); + }; + + /** + * Encodes the specified VpcPeeringConfig message. Does not implicitly {@link google.cloud.clouddms.v1.VpcPeeringConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.VpcPeeringConfig + * @static + * @param {google.cloud.clouddms.v1.IVpcPeeringConfig} message VpcPeeringConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpcPeeringConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.vpcName != null && Object.hasOwnProperty.call(message, "vpcName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.vpcName); + if (message.subnet != null && Object.hasOwnProperty.call(message, "subnet")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subnet); + return writer; + }; + + /** + * Encodes the specified VpcPeeringConfig message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.VpcPeeringConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.VpcPeeringConfig + * @static + * @param {google.cloud.clouddms.v1.IVpcPeeringConfig} message VpcPeeringConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpcPeeringConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VpcPeeringConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.VpcPeeringConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.VpcPeeringConfig} VpcPeeringConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpcPeeringConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.VpcPeeringConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.vpcName = reader.string(); + break; + } + case 2: { + message.subnet = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VpcPeeringConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.VpcPeeringConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.VpcPeeringConfig} VpcPeeringConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpcPeeringConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VpcPeeringConfig message. + * @function verify + * @memberof google.cloud.clouddms.v1.VpcPeeringConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VpcPeeringConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.vpcName != null && message.hasOwnProperty("vpcName")) + if (!$util.isString(message.vpcName)) + return "vpcName: string expected"; + if (message.subnet != null && message.hasOwnProperty("subnet")) + if (!$util.isString(message.subnet)) + return "subnet: string expected"; + return null; + }; + + /** + * Creates a VpcPeeringConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.VpcPeeringConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.VpcPeeringConfig} VpcPeeringConfig + */ + VpcPeeringConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.VpcPeeringConfig) + return object; + var message = new $root.google.cloud.clouddms.v1.VpcPeeringConfig(); + if (object.vpcName != null) + message.vpcName = String(object.vpcName); + if (object.subnet != null) + message.subnet = String(object.subnet); + return message; + }; + + /** + * Creates a plain object from a VpcPeeringConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.VpcPeeringConfig + * @static + * @param {google.cloud.clouddms.v1.VpcPeeringConfig} message VpcPeeringConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VpcPeeringConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.vpcName = ""; + object.subnet = ""; + } + if (message.vpcName != null && message.hasOwnProperty("vpcName")) + object.vpcName = message.vpcName; + if (message.subnet != null && message.hasOwnProperty("subnet")) + object.subnet = message.subnet; + return object; + }; + + /** + * Converts this VpcPeeringConfig to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.VpcPeeringConfig + * @instance + * @returns {Object.} JSON object + */ + VpcPeeringConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VpcPeeringConfig + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.VpcPeeringConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VpcPeeringConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.VpcPeeringConfig"; + }; + + return VpcPeeringConfig; + })(); + + v1.DatabaseEngineInfo = (function() { + + /** + * Properties of a DatabaseEngineInfo. + * @memberof google.cloud.clouddms.v1 + * @interface IDatabaseEngineInfo + * @property {google.cloud.clouddms.v1.DatabaseEngine|null} [engine] DatabaseEngineInfo engine + * @property {string|null} [version] DatabaseEngineInfo version + */ + + /** + * Constructs a new DatabaseEngineInfo. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a DatabaseEngineInfo. + * @implements IDatabaseEngineInfo + * @constructor + * @param {google.cloud.clouddms.v1.IDatabaseEngineInfo=} [properties] Properties to set + */ + function DatabaseEngineInfo(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]]; + } + + /** + * DatabaseEngineInfo engine. + * @member {google.cloud.clouddms.v1.DatabaseEngine} engine + * @memberof google.cloud.clouddms.v1.DatabaseEngineInfo + * @instance + */ + DatabaseEngineInfo.prototype.engine = 0; + + /** + * DatabaseEngineInfo version. + * @member {string} version + * @memberof google.cloud.clouddms.v1.DatabaseEngineInfo + * @instance + */ + DatabaseEngineInfo.prototype.version = ""; + + /** + * Creates a new DatabaseEngineInfo instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.DatabaseEngineInfo + * @static + * @param {google.cloud.clouddms.v1.IDatabaseEngineInfo=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.DatabaseEngineInfo} DatabaseEngineInfo instance + */ + DatabaseEngineInfo.create = function create(properties) { + return new DatabaseEngineInfo(properties); + }; + + /** + * Encodes the specified DatabaseEngineInfo message. Does not implicitly {@link google.cloud.clouddms.v1.DatabaseEngineInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.DatabaseEngineInfo + * @static + * @param {google.cloud.clouddms.v1.IDatabaseEngineInfo} message DatabaseEngineInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseEngineInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.engine != null && Object.hasOwnProperty.call(message, "engine")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.engine); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); + return writer; + }; + + /** + * Encodes the specified DatabaseEngineInfo message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.DatabaseEngineInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.DatabaseEngineInfo + * @static + * @param {google.cloud.clouddms.v1.IDatabaseEngineInfo} message DatabaseEngineInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseEngineInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DatabaseEngineInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.DatabaseEngineInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.DatabaseEngineInfo} DatabaseEngineInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseEngineInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.DatabaseEngineInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.engine = reader.int32(); + break; + } + case 2: { + message.version = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DatabaseEngineInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.DatabaseEngineInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.DatabaseEngineInfo} DatabaseEngineInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseEngineInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DatabaseEngineInfo message. + * @function verify + * @memberof google.cloud.clouddms.v1.DatabaseEngineInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DatabaseEngineInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.engine != null && message.hasOwnProperty("engine")) + switch (message.engine) { + default: + return "engine: enum value expected"; + case 0: + case 1: + case 2: + case 4: + break; + } + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + return null; + }; + + /** + * Creates a DatabaseEngineInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.DatabaseEngineInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.DatabaseEngineInfo} DatabaseEngineInfo + */ + DatabaseEngineInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.DatabaseEngineInfo) + return object; + var message = new $root.google.cloud.clouddms.v1.DatabaseEngineInfo(); + switch (object.engine) { + default: + if (typeof object.engine === "number") { + message.engine = object.engine; + break; + } + break; + case "DATABASE_ENGINE_UNSPECIFIED": + case 0: + message.engine = 0; + break; + case "MYSQL": + case 1: + message.engine = 1; + break; + case "POSTGRESQL": + case 2: + message.engine = 2; + break; + case "ORACLE": + case 4: + message.engine = 4; + break; + } + if (object.version != null) + message.version = String(object.version); + return message; + }; + + /** + * Creates a plain object from a DatabaseEngineInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.DatabaseEngineInfo + * @static + * @param {google.cloud.clouddms.v1.DatabaseEngineInfo} message DatabaseEngineInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DatabaseEngineInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.engine = options.enums === String ? "DATABASE_ENGINE_UNSPECIFIED" : 0; + object.version = ""; + } + if (message.engine != null && message.hasOwnProperty("engine")) + object.engine = options.enums === String ? $root.google.cloud.clouddms.v1.DatabaseEngine[message.engine] === undefined ? message.engine : $root.google.cloud.clouddms.v1.DatabaseEngine[message.engine] : message.engine; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this DatabaseEngineInfo to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.DatabaseEngineInfo + * @instance + * @returns {Object.} JSON object + */ + DatabaseEngineInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DatabaseEngineInfo + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.DatabaseEngineInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DatabaseEngineInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.DatabaseEngineInfo"; + }; + + return DatabaseEngineInfo; + })(); + + v1.ConversionWorkspace = (function() { + + /** + * Properties of a ConversionWorkspace. + * @memberof google.cloud.clouddms.v1 + * @interface IConversionWorkspace + * @property {string|null} [name] ConversionWorkspace name + * @property {google.cloud.clouddms.v1.IDatabaseEngineInfo|null} [source] ConversionWorkspace source + * @property {google.cloud.clouddms.v1.IDatabaseEngineInfo|null} [destination] ConversionWorkspace destination + * @property {Object.|null} [globalSettings] ConversionWorkspace globalSettings + * @property {boolean|null} [hasUncommittedChanges] ConversionWorkspace hasUncommittedChanges + * @property {string|null} [latestCommitId] ConversionWorkspace latestCommitId + * @property {google.protobuf.ITimestamp|null} [latestCommitTime] ConversionWorkspace latestCommitTime + * @property {google.protobuf.ITimestamp|null} [createTime] ConversionWorkspace createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] ConversionWorkspace updateTime + * @property {string|null} [displayName] ConversionWorkspace displayName + */ + + /** + * Constructs a new ConversionWorkspace. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a ConversionWorkspace. + * @implements IConversionWorkspace + * @constructor + * @param {google.cloud.clouddms.v1.IConversionWorkspace=} [properties] Properties to set + */ + function ConversionWorkspace(properties) { + this.globalSettings = {}; + 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]]; + } + + /** + * ConversionWorkspace name. + * @member {string} name + * @memberof google.cloud.clouddms.v1.ConversionWorkspace + * @instance + */ + ConversionWorkspace.prototype.name = ""; + + /** + * ConversionWorkspace source. + * @member {google.cloud.clouddms.v1.IDatabaseEngineInfo|null|undefined} source + * @memberof google.cloud.clouddms.v1.ConversionWorkspace + * @instance + */ + ConversionWorkspace.prototype.source = null; + + /** + * ConversionWorkspace destination. + * @member {google.cloud.clouddms.v1.IDatabaseEngineInfo|null|undefined} destination + * @memberof google.cloud.clouddms.v1.ConversionWorkspace + * @instance + */ + ConversionWorkspace.prototype.destination = null; + + /** + * ConversionWorkspace globalSettings. + * @member {Object.} globalSettings + * @memberof google.cloud.clouddms.v1.ConversionWorkspace + * @instance + */ + ConversionWorkspace.prototype.globalSettings = $util.emptyObject; + + /** + * ConversionWorkspace hasUncommittedChanges. + * @member {boolean} hasUncommittedChanges + * @memberof google.cloud.clouddms.v1.ConversionWorkspace + * @instance + */ + ConversionWorkspace.prototype.hasUncommittedChanges = false; + + /** + * ConversionWorkspace latestCommitId. + * @member {string} latestCommitId + * @memberof google.cloud.clouddms.v1.ConversionWorkspace + * @instance + */ + ConversionWorkspace.prototype.latestCommitId = ""; + + /** + * ConversionWorkspace latestCommitTime. + * @member {google.protobuf.ITimestamp|null|undefined} latestCommitTime + * @memberof google.cloud.clouddms.v1.ConversionWorkspace + * @instance + */ + ConversionWorkspace.prototype.latestCommitTime = null; + + /** + * ConversionWorkspace createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.clouddms.v1.ConversionWorkspace + * @instance + */ + ConversionWorkspace.prototype.createTime = null; + + /** + * ConversionWorkspace updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.clouddms.v1.ConversionWorkspace + * @instance + */ + ConversionWorkspace.prototype.updateTime = null; + + /** + * ConversionWorkspace displayName. + * @member {string} displayName + * @memberof google.cloud.clouddms.v1.ConversionWorkspace + * @instance + */ + ConversionWorkspace.prototype.displayName = ""; + + /** + * Creates a new ConversionWorkspace instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.ConversionWorkspace + * @static + * @param {google.cloud.clouddms.v1.IConversionWorkspace=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.ConversionWorkspace} ConversionWorkspace instance + */ + ConversionWorkspace.create = function create(properties) { + return new ConversionWorkspace(properties); + }; + + /** + * Encodes the specified ConversionWorkspace message. Does not implicitly {@link google.cloud.clouddms.v1.ConversionWorkspace.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.ConversionWorkspace + * @static + * @param {google.cloud.clouddms.v1.IConversionWorkspace} message ConversionWorkspace message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversionWorkspace.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.source != null && Object.hasOwnProperty.call(message, "source")) + $root.google.cloud.clouddms.v1.DatabaseEngineInfo.encode(message.source, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.destination != null && Object.hasOwnProperty.call(message, "destination")) + $root.google.cloud.clouddms.v1.DatabaseEngineInfo.encode(message.destination, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.globalSettings != null && Object.hasOwnProperty.call(message, "globalSettings")) + for (var keys = Object.keys(message.globalSettings), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.globalSettings[keys[i]]).ldelim(); + if (message.hasUncommittedChanges != null && Object.hasOwnProperty.call(message, "hasUncommittedChanges")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.hasUncommittedChanges); + if (message.latestCommitId != null && Object.hasOwnProperty.call(message, "latestCommitId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.latestCommitId); + if (message.latestCommitTime != null && Object.hasOwnProperty.call(message, "latestCommitTime")) + $root.google.protobuf.Timestamp.encode(message.latestCommitTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified ConversionWorkspace message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ConversionWorkspace.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.ConversionWorkspace + * @static + * @param {google.cloud.clouddms.v1.IConversionWorkspace} message ConversionWorkspace message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversionWorkspace.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConversionWorkspace message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.ConversionWorkspace + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.ConversionWorkspace} ConversionWorkspace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversionWorkspace.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.ConversionWorkspace(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.source = $root.google.cloud.clouddms.v1.DatabaseEngineInfo.decode(reader, reader.uint32()); + break; + } + case 3: { + message.destination = $root.google.cloud.clouddms.v1.DatabaseEngineInfo.decode(reader, reader.uint32()); + break; + } + case 4: { + if (message.globalSettings === $util.emptyObject) + message.globalSettings = {}; + 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.globalSettings[key] = value; + break; + } + case 5: { + message.hasUncommittedChanges = reader.bool(); + break; + } + case 6: { + message.latestCommitId = reader.string(); + break; + } + case 7: { + message.latestCommitTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 10: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 11: { + message.displayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConversionWorkspace message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.ConversionWorkspace + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.ConversionWorkspace} ConversionWorkspace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversionWorkspace.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConversionWorkspace message. + * @function verify + * @memberof google.cloud.clouddms.v1.ConversionWorkspace + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConversionWorkspace.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.source != null && message.hasOwnProperty("source")) { + var error = $root.google.cloud.clouddms.v1.DatabaseEngineInfo.verify(message.source); + if (error) + return "source." + error; + } + if (message.destination != null && message.hasOwnProperty("destination")) { + var error = $root.google.cloud.clouddms.v1.DatabaseEngineInfo.verify(message.destination); + if (error) + return "destination." + error; + } + if (message.globalSettings != null && message.hasOwnProperty("globalSettings")) { + if (!$util.isObject(message.globalSettings)) + return "globalSettings: object expected"; + var key = Object.keys(message.globalSettings); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.globalSettings[key[i]])) + return "globalSettings: string{k:string} expected"; + } + if (message.hasUncommittedChanges != null && message.hasOwnProperty("hasUncommittedChanges")) + if (typeof message.hasUncommittedChanges !== "boolean") + return "hasUncommittedChanges: boolean expected"; + if (message.latestCommitId != null && message.hasOwnProperty("latestCommitId")) + if (!$util.isString(message.latestCommitId)) + return "latestCommitId: string expected"; + if (message.latestCommitTime != null && message.hasOwnProperty("latestCommitTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.latestCommitTime); + if (error) + return "latestCommitTime." + error; + } + 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.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + return null; + }; + + /** + * Creates a ConversionWorkspace message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.ConversionWorkspace + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.ConversionWorkspace} ConversionWorkspace + */ + ConversionWorkspace.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.ConversionWorkspace) + return object; + var message = new $root.google.cloud.clouddms.v1.ConversionWorkspace(); + if (object.name != null) + message.name = String(object.name); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError(".google.cloud.clouddms.v1.ConversionWorkspace.source: object expected"); + message.source = $root.google.cloud.clouddms.v1.DatabaseEngineInfo.fromObject(object.source); + } + if (object.destination != null) { + if (typeof object.destination !== "object") + throw TypeError(".google.cloud.clouddms.v1.ConversionWorkspace.destination: object expected"); + message.destination = $root.google.cloud.clouddms.v1.DatabaseEngineInfo.fromObject(object.destination); + } + if (object.globalSettings) { + if (typeof object.globalSettings !== "object") + throw TypeError(".google.cloud.clouddms.v1.ConversionWorkspace.globalSettings: object expected"); + message.globalSettings = {}; + for (var keys = Object.keys(object.globalSettings), i = 0; i < keys.length; ++i) + message.globalSettings[keys[i]] = String(object.globalSettings[keys[i]]); + } + if (object.hasUncommittedChanges != null) + message.hasUncommittedChanges = Boolean(object.hasUncommittedChanges); + if (object.latestCommitId != null) + message.latestCommitId = String(object.latestCommitId); + if (object.latestCommitTime != null) { + if (typeof object.latestCommitTime !== "object") + throw TypeError(".google.cloud.clouddms.v1.ConversionWorkspace.latestCommitTime: object expected"); + message.latestCommitTime = $root.google.protobuf.Timestamp.fromObject(object.latestCommitTime); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.clouddms.v1.ConversionWorkspace.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.clouddms.v1.ConversionWorkspace.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; + + /** + * Creates a plain object from a ConversionWorkspace message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.ConversionWorkspace + * @static + * @param {google.cloud.clouddms.v1.ConversionWorkspace} message ConversionWorkspace + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConversionWorkspace.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.globalSettings = {}; + if (options.defaults) { + object.name = ""; + object.source = null; + object.destination = null; + object.hasUncommittedChanges = false; + object.latestCommitId = ""; + object.latestCommitTime = null; + object.createTime = null; + object.updateTime = null; + object.displayName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.source != null && message.hasOwnProperty("source")) + object.source = $root.google.cloud.clouddms.v1.DatabaseEngineInfo.toObject(message.source, options); + if (message.destination != null && message.hasOwnProperty("destination")) + object.destination = $root.google.cloud.clouddms.v1.DatabaseEngineInfo.toObject(message.destination, options); + var keys2; + if (message.globalSettings && (keys2 = Object.keys(message.globalSettings)).length) { + object.globalSettings = {}; + for (var j = 0; j < keys2.length; ++j) + object.globalSettings[keys2[j]] = message.globalSettings[keys2[j]]; + } + if (message.hasUncommittedChanges != null && message.hasOwnProperty("hasUncommittedChanges")) + object.hasUncommittedChanges = message.hasUncommittedChanges; + if (message.latestCommitId != null && message.hasOwnProperty("latestCommitId")) + object.latestCommitId = message.latestCommitId; + if (message.latestCommitTime != null && message.hasOwnProperty("latestCommitTime")) + object.latestCommitTime = $root.google.protobuf.Timestamp.toObject(message.latestCommitTime, options); + 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.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this ConversionWorkspace to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.ConversionWorkspace + * @instance + * @returns {Object.} JSON object + */ + ConversionWorkspace.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConversionWorkspace + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.ConversionWorkspace + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConversionWorkspace.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.ConversionWorkspace"; + }; + + return ConversionWorkspace; + })(); + + v1.BackgroundJobLogEntry = (function() { + + /** + * Properties of a BackgroundJobLogEntry. + * @memberof google.cloud.clouddms.v1 + * @interface IBackgroundJobLogEntry + * @property {string|null} [id] BackgroundJobLogEntry id + * @property {google.cloud.clouddms.v1.BackgroundJobType|null} [jobType] BackgroundJobLogEntry jobType + * @property {google.protobuf.ITimestamp|null} [startTime] BackgroundJobLogEntry startTime + * @property {google.protobuf.ITimestamp|null} [finishTime] BackgroundJobLogEntry finishTime + * @property {google.cloud.clouddms.v1.BackgroundJobLogEntry.JobCompletionState|null} [completionState] BackgroundJobLogEntry completionState + * @property {string|null} [completionComment] BackgroundJobLogEntry completionComment + * @property {boolean|null} [requestAutocommit] BackgroundJobLogEntry requestAutocommit + * @property {google.cloud.clouddms.v1.BackgroundJobLogEntry.ISeedJobDetails|null} [seedJobDetails] BackgroundJobLogEntry seedJobDetails + * @property {google.cloud.clouddms.v1.BackgroundJobLogEntry.IImportRulesJobDetails|null} [importRulesJobDetails] BackgroundJobLogEntry importRulesJobDetails + * @property {google.cloud.clouddms.v1.BackgroundJobLogEntry.IConvertJobDetails|null} [convertJobDetails] BackgroundJobLogEntry convertJobDetails + * @property {google.cloud.clouddms.v1.BackgroundJobLogEntry.IApplyJobDetails|null} [applyJobDetails] BackgroundJobLogEntry applyJobDetails + */ + + /** + * Constructs a new BackgroundJobLogEntry. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a BackgroundJobLogEntry. + * @implements IBackgroundJobLogEntry + * @constructor + * @param {google.cloud.clouddms.v1.IBackgroundJobLogEntry=} [properties] Properties to set + */ + function BackgroundJobLogEntry(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]]; + } + + /** + * BackgroundJobLogEntry id. + * @member {string} id + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry + * @instance + */ + BackgroundJobLogEntry.prototype.id = ""; + + /** + * BackgroundJobLogEntry jobType. + * @member {google.cloud.clouddms.v1.BackgroundJobType} jobType + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry + * @instance + */ + BackgroundJobLogEntry.prototype.jobType = 0; + + /** + * BackgroundJobLogEntry startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry + * @instance + */ + BackgroundJobLogEntry.prototype.startTime = null; + + /** + * BackgroundJobLogEntry finishTime. + * @member {google.protobuf.ITimestamp|null|undefined} finishTime + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry + * @instance + */ + BackgroundJobLogEntry.prototype.finishTime = null; + + /** + * BackgroundJobLogEntry completionState. + * @member {google.cloud.clouddms.v1.BackgroundJobLogEntry.JobCompletionState} completionState + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry + * @instance + */ + BackgroundJobLogEntry.prototype.completionState = 0; + + /** + * BackgroundJobLogEntry completionComment. + * @member {string} completionComment + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry + * @instance + */ + BackgroundJobLogEntry.prototype.completionComment = ""; + + /** + * BackgroundJobLogEntry requestAutocommit. + * @member {boolean} requestAutocommit + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry + * @instance + */ + BackgroundJobLogEntry.prototype.requestAutocommit = false; + + /** + * BackgroundJobLogEntry seedJobDetails. + * @member {google.cloud.clouddms.v1.BackgroundJobLogEntry.ISeedJobDetails|null|undefined} seedJobDetails + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry + * @instance + */ + BackgroundJobLogEntry.prototype.seedJobDetails = null; + + /** + * BackgroundJobLogEntry importRulesJobDetails. + * @member {google.cloud.clouddms.v1.BackgroundJobLogEntry.IImportRulesJobDetails|null|undefined} importRulesJobDetails + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry + * @instance + */ + BackgroundJobLogEntry.prototype.importRulesJobDetails = null; + + /** + * BackgroundJobLogEntry convertJobDetails. + * @member {google.cloud.clouddms.v1.BackgroundJobLogEntry.IConvertJobDetails|null|undefined} convertJobDetails + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry + * @instance + */ + BackgroundJobLogEntry.prototype.convertJobDetails = null; + + /** + * BackgroundJobLogEntry applyJobDetails. + * @member {google.cloud.clouddms.v1.BackgroundJobLogEntry.IApplyJobDetails|null|undefined} applyJobDetails + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry + * @instance + */ + BackgroundJobLogEntry.prototype.applyJobDetails = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BackgroundJobLogEntry jobDetails. + * @member {"seedJobDetails"|"importRulesJobDetails"|"convertJobDetails"|"applyJobDetails"|undefined} jobDetails + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry + * @instance + */ + Object.defineProperty(BackgroundJobLogEntry.prototype, "jobDetails", { + get: $util.oneOfGetter($oneOfFields = ["seedJobDetails", "importRulesJobDetails", "convertJobDetails", "applyJobDetails"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BackgroundJobLogEntry instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry + * @static + * @param {google.cloud.clouddms.v1.IBackgroundJobLogEntry=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.BackgroundJobLogEntry} BackgroundJobLogEntry instance + */ + BackgroundJobLogEntry.create = function create(properties) { + return new BackgroundJobLogEntry(properties); + }; + + /** + * Encodes the specified BackgroundJobLogEntry message. Does not implicitly {@link google.cloud.clouddms.v1.BackgroundJobLogEntry.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry + * @static + * @param {google.cloud.clouddms.v1.IBackgroundJobLogEntry} message BackgroundJobLogEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackgroundJobLogEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.jobType != null && Object.hasOwnProperty.call(message, "jobType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.jobType); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) + $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.completionState != null && Object.hasOwnProperty.call(message, "completionState")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.completionState); + if (message.completionComment != null && Object.hasOwnProperty.call(message, "completionComment")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.completionComment); + if (message.requestAutocommit != null && Object.hasOwnProperty.call(message, "requestAutocommit")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.requestAutocommit); + if (message.seedJobDetails != null && Object.hasOwnProperty.call(message, "seedJobDetails")) + $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails.encode(message.seedJobDetails, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.importRulesJobDetails != null && Object.hasOwnProperty.call(message, "importRulesJobDetails")) + $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails.encode(message.importRulesJobDetails, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.convertJobDetails != null && Object.hasOwnProperty.call(message, "convertJobDetails")) + $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails.encode(message.convertJobDetails, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + if (message.applyJobDetails != null && Object.hasOwnProperty.call(message, "applyJobDetails")) + $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails.encode(message.applyJobDetails, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BackgroundJobLogEntry message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.BackgroundJobLogEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry + * @static + * @param {google.cloud.clouddms.v1.IBackgroundJobLogEntry} message BackgroundJobLogEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackgroundJobLogEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackgroundJobLogEntry message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.BackgroundJobLogEntry} BackgroundJobLogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackgroundJobLogEntry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.BackgroundJobLogEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.jobType = reader.int32(); + break; + } + case 3: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.completionState = reader.int32(); + break; + } + case 6: { + message.completionComment = reader.string(); + break; + } + case 7: { + message.requestAutocommit = reader.bool(); + break; + } + case 100: { + message.seedJobDetails = $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails.decode(reader, reader.uint32()); + break; + } + case 101: { + message.importRulesJobDetails = $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails.decode(reader, reader.uint32()); + break; + } + case 102: { + message.convertJobDetails = $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails.decode(reader, reader.uint32()); + break; + } + case 103: { + message.applyJobDetails = $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackgroundJobLogEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.BackgroundJobLogEntry} BackgroundJobLogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackgroundJobLogEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackgroundJobLogEntry message. + * @function verify + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackgroundJobLogEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.jobType != null && message.hasOwnProperty("jobType")) + switch (message.jobType) { + default: + return "jobType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 5: + break; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.finishTime != null && message.hasOwnProperty("finishTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.finishTime); + if (error) + return "finishTime." + error; + } + if (message.completionState != null && message.hasOwnProperty("completionState")) + switch (message.completionState) { + default: + return "completionState: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.completionComment != null && message.hasOwnProperty("completionComment")) + if (!$util.isString(message.completionComment)) + return "completionComment: string expected"; + if (message.requestAutocommit != null && message.hasOwnProperty("requestAutocommit")) + if (typeof message.requestAutocommit !== "boolean") + return "requestAutocommit: boolean expected"; + if (message.seedJobDetails != null && message.hasOwnProperty("seedJobDetails")) { + properties.jobDetails = 1; + { + var error = $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails.verify(message.seedJobDetails); + if (error) + return "seedJobDetails." + error; + } + } + if (message.importRulesJobDetails != null && message.hasOwnProperty("importRulesJobDetails")) { + if (properties.jobDetails === 1) + return "jobDetails: multiple values"; + properties.jobDetails = 1; + { + var error = $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails.verify(message.importRulesJobDetails); + if (error) + return "importRulesJobDetails." + error; + } + } + if (message.convertJobDetails != null && message.hasOwnProperty("convertJobDetails")) { + if (properties.jobDetails === 1) + return "jobDetails: multiple values"; + properties.jobDetails = 1; + { + var error = $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails.verify(message.convertJobDetails); + if (error) + return "convertJobDetails." + error; + } + } + if (message.applyJobDetails != null && message.hasOwnProperty("applyJobDetails")) { + if (properties.jobDetails === 1) + return "jobDetails: multiple values"; + properties.jobDetails = 1; + { + var error = $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails.verify(message.applyJobDetails); + if (error) + return "applyJobDetails." + error; + } + } + return null; + }; + + /** + * Creates a BackgroundJobLogEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.BackgroundJobLogEntry} BackgroundJobLogEntry + */ + BackgroundJobLogEntry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.BackgroundJobLogEntry) + return object; + var message = new $root.google.cloud.clouddms.v1.BackgroundJobLogEntry(); + if (object.id != null) + message.id = String(object.id); + switch (object.jobType) { + default: + if (typeof object.jobType === "number") { + message.jobType = object.jobType; + break; + } + break; + case "BACKGROUND_JOB_TYPE_UNSPECIFIED": + case 0: + message.jobType = 0; + break; + case "BACKGROUND_JOB_TYPE_SOURCE_SEED": + case 1: + message.jobType = 1; + break; + case "BACKGROUND_JOB_TYPE_CONVERT": + case 2: + message.jobType = 2; + break; + case "BACKGROUND_JOB_TYPE_APPLY_DESTINATION": + case 3: + message.jobType = 3; + break; + case "BACKGROUND_JOB_TYPE_IMPORT_RULES_FILE": + case 5: + message.jobType = 5; + break; + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.clouddms.v1.BackgroundJobLogEntry.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.finishTime != null) { + if (typeof object.finishTime !== "object") + throw TypeError(".google.cloud.clouddms.v1.BackgroundJobLogEntry.finishTime: object expected"); + message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime); + } + switch (object.completionState) { + default: + if (typeof object.completionState === "number") { + message.completionState = object.completionState; + break; + } + break; + case "JOB_COMPLETION_STATE_UNSPECIFIED": + case 0: + message.completionState = 0; + break; + case "SUCCEEDED": + case 1: + message.completionState = 1; + break; + case "FAILED": + case 2: + message.completionState = 2; + break; + } + if (object.completionComment != null) + message.completionComment = String(object.completionComment); + if (object.requestAutocommit != null) + message.requestAutocommit = Boolean(object.requestAutocommit); + if (object.seedJobDetails != null) { + if (typeof object.seedJobDetails !== "object") + throw TypeError(".google.cloud.clouddms.v1.BackgroundJobLogEntry.seedJobDetails: object expected"); + message.seedJobDetails = $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails.fromObject(object.seedJobDetails); + } + if (object.importRulesJobDetails != null) { + if (typeof object.importRulesJobDetails !== "object") + throw TypeError(".google.cloud.clouddms.v1.BackgroundJobLogEntry.importRulesJobDetails: object expected"); + message.importRulesJobDetails = $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails.fromObject(object.importRulesJobDetails); + } + if (object.convertJobDetails != null) { + if (typeof object.convertJobDetails !== "object") + throw TypeError(".google.cloud.clouddms.v1.BackgroundJobLogEntry.convertJobDetails: object expected"); + message.convertJobDetails = $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails.fromObject(object.convertJobDetails); + } + if (object.applyJobDetails != null) { + if (typeof object.applyJobDetails !== "object") + throw TypeError(".google.cloud.clouddms.v1.BackgroundJobLogEntry.applyJobDetails: object expected"); + message.applyJobDetails = $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails.fromObject(object.applyJobDetails); + } + return message; + }; + + /** + * Creates a plain object from a BackgroundJobLogEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry + * @static + * @param {google.cloud.clouddms.v1.BackgroundJobLogEntry} message BackgroundJobLogEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackgroundJobLogEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.jobType = options.enums === String ? "BACKGROUND_JOB_TYPE_UNSPECIFIED" : 0; + object.startTime = null; + object.finishTime = null; + object.completionState = options.enums === String ? "JOB_COMPLETION_STATE_UNSPECIFIED" : 0; + object.completionComment = ""; + object.requestAutocommit = false; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.jobType != null && message.hasOwnProperty("jobType")) + object.jobType = options.enums === String ? $root.google.cloud.clouddms.v1.BackgroundJobType[message.jobType] === undefined ? message.jobType : $root.google.cloud.clouddms.v1.BackgroundJobType[message.jobType] : message.jobType; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.finishTime != null && message.hasOwnProperty("finishTime")) + object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); + if (message.completionState != null && message.hasOwnProperty("completionState")) + object.completionState = options.enums === String ? $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.JobCompletionState[message.completionState] === undefined ? message.completionState : $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.JobCompletionState[message.completionState] : message.completionState; + if (message.completionComment != null && message.hasOwnProperty("completionComment")) + object.completionComment = message.completionComment; + if (message.requestAutocommit != null && message.hasOwnProperty("requestAutocommit")) + object.requestAutocommit = message.requestAutocommit; + if (message.seedJobDetails != null && message.hasOwnProperty("seedJobDetails")) { + object.seedJobDetails = $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails.toObject(message.seedJobDetails, options); + if (options.oneofs) + object.jobDetails = "seedJobDetails"; + } + if (message.importRulesJobDetails != null && message.hasOwnProperty("importRulesJobDetails")) { + object.importRulesJobDetails = $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails.toObject(message.importRulesJobDetails, options); + if (options.oneofs) + object.jobDetails = "importRulesJobDetails"; + } + if (message.convertJobDetails != null && message.hasOwnProperty("convertJobDetails")) { + object.convertJobDetails = $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails.toObject(message.convertJobDetails, options); + if (options.oneofs) + object.jobDetails = "convertJobDetails"; + } + if (message.applyJobDetails != null && message.hasOwnProperty("applyJobDetails")) { + object.applyJobDetails = $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails.toObject(message.applyJobDetails, options); + if (options.oneofs) + object.jobDetails = "applyJobDetails"; + } + return object; + }; + + /** + * Converts this BackgroundJobLogEntry to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry + * @instance + * @returns {Object.} JSON object + */ + BackgroundJobLogEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackgroundJobLogEntry + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackgroundJobLogEntry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.BackgroundJobLogEntry"; + }; + + /** + * JobCompletionState enum. + * @name google.cloud.clouddms.v1.BackgroundJobLogEntry.JobCompletionState + * @enum {number} + * @property {number} JOB_COMPLETION_STATE_UNSPECIFIED=0 JOB_COMPLETION_STATE_UNSPECIFIED value + * @property {number} SUCCEEDED=1 SUCCEEDED value + * @property {number} FAILED=2 FAILED value + */ + BackgroundJobLogEntry.JobCompletionState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JOB_COMPLETION_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SUCCEEDED"] = 1; + values[valuesById[2] = "FAILED"] = 2; + return values; + })(); + + BackgroundJobLogEntry.SeedJobDetails = (function() { + + /** + * Properties of a SeedJobDetails. + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry + * @interface ISeedJobDetails + * @property {string|null} [connectionProfile] SeedJobDetails connectionProfile + */ + + /** + * Constructs a new SeedJobDetails. + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry + * @classdesc Represents a SeedJobDetails. + * @implements ISeedJobDetails + * @constructor + * @param {google.cloud.clouddms.v1.BackgroundJobLogEntry.ISeedJobDetails=} [properties] Properties to set + */ + function SeedJobDetails(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]]; + } + + /** + * SeedJobDetails connectionProfile. + * @member {string} connectionProfile + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails + * @instance + */ + SeedJobDetails.prototype.connectionProfile = ""; + + /** + * Creates a new SeedJobDetails instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails + * @static + * @param {google.cloud.clouddms.v1.BackgroundJobLogEntry.ISeedJobDetails=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails} SeedJobDetails instance + */ + SeedJobDetails.create = function create(properties) { + return new SeedJobDetails(properties); + }; + + /** + * Encodes the specified SeedJobDetails message. Does not implicitly {@link google.cloud.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails + * @static + * @param {google.cloud.clouddms.v1.BackgroundJobLogEntry.ISeedJobDetails} message SeedJobDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SeedJobDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.connectionProfile != null && Object.hasOwnProperty.call(message, "connectionProfile")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.connectionProfile); + return writer; + }; + + /** + * Encodes the specified SeedJobDetails message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails + * @static + * @param {google.cloud.clouddms.v1.BackgroundJobLogEntry.ISeedJobDetails} message SeedJobDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SeedJobDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SeedJobDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails} SeedJobDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SeedJobDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.connectionProfile = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SeedJobDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails} SeedJobDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SeedJobDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SeedJobDetails message. + * @function verify + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SeedJobDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.connectionProfile != null && message.hasOwnProperty("connectionProfile")) + if (!$util.isString(message.connectionProfile)) + return "connectionProfile: string expected"; + return null; + }; + + /** + * Creates a SeedJobDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails} SeedJobDetails + */ + SeedJobDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails) + return object; + var message = new $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails(); + if (object.connectionProfile != null) + message.connectionProfile = String(object.connectionProfile); + return message; + }; + + /** + * Creates a plain object from a SeedJobDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails + * @static + * @param {google.cloud.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails} message SeedJobDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SeedJobDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.connectionProfile = ""; + if (message.connectionProfile != null && message.hasOwnProperty("connectionProfile")) + object.connectionProfile = message.connectionProfile; + return object; + }; + + /** + * Converts this SeedJobDetails to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails + * @instance + * @returns {Object.} JSON object + */ + SeedJobDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SeedJobDetails + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SeedJobDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.BackgroundJobLogEntry.SeedJobDetails"; + }; + + return SeedJobDetails; + })(); + + BackgroundJobLogEntry.ImportRulesJobDetails = (function() { + + /** + * Properties of an ImportRulesJobDetails. + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry + * @interface IImportRulesJobDetails + * @property {Array.|null} [files] ImportRulesJobDetails files + * @property {google.cloud.clouddms.v1.ImportRulesFileFormat|null} [fileFormat] ImportRulesJobDetails fileFormat + */ + + /** + * Constructs a new ImportRulesJobDetails. + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry + * @classdesc Represents an ImportRulesJobDetails. + * @implements IImportRulesJobDetails + * @constructor + * @param {google.cloud.clouddms.v1.BackgroundJobLogEntry.IImportRulesJobDetails=} [properties] Properties to set + */ + function ImportRulesJobDetails(properties) { + this.files = []; + 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]]; + } + + /** + * ImportRulesJobDetails files. + * @member {Array.} files + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails + * @instance + */ + ImportRulesJobDetails.prototype.files = $util.emptyArray; + + /** + * ImportRulesJobDetails fileFormat. + * @member {google.cloud.clouddms.v1.ImportRulesFileFormat} fileFormat + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails + * @instance + */ + ImportRulesJobDetails.prototype.fileFormat = 0; + + /** + * Creates a new ImportRulesJobDetails instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails + * @static + * @param {google.cloud.clouddms.v1.BackgroundJobLogEntry.IImportRulesJobDetails=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails} ImportRulesJobDetails instance + */ + ImportRulesJobDetails.create = function create(properties) { + return new ImportRulesJobDetails(properties); + }; + + /** + * Encodes the specified ImportRulesJobDetails message. Does not implicitly {@link google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails + * @static + * @param {google.cloud.clouddms.v1.BackgroundJobLogEntry.IImportRulesJobDetails} message ImportRulesJobDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportRulesJobDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.files != null && message.files.length) + for (var i = 0; i < message.files.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.files[i]); + if (message.fileFormat != null && Object.hasOwnProperty.call(message, "fileFormat")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.fileFormat); + return writer; + }; + + /** + * Encodes the specified ImportRulesJobDetails message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails + * @static + * @param {google.cloud.clouddms.v1.BackgroundJobLogEntry.IImportRulesJobDetails} message ImportRulesJobDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImportRulesJobDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImportRulesJobDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails} ImportRulesJobDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportRulesJobDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.files && message.files.length)) + message.files = []; + message.files.push(reader.string()); + break; + } + case 2: { + message.fileFormat = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImportRulesJobDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails} ImportRulesJobDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImportRulesJobDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImportRulesJobDetails message. + * @function verify + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImportRulesJobDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.files != null && message.hasOwnProperty("files")) { + if (!Array.isArray(message.files)) + return "files: array expected"; + for (var i = 0; i < message.files.length; ++i) + if (!$util.isString(message.files[i])) + return "files: string[] expected"; + } + if (message.fileFormat != null && message.hasOwnProperty("fileFormat")) + switch (message.fileFormat) { + default: + return "fileFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an ImportRulesJobDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails} ImportRulesJobDetails + */ + ImportRulesJobDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails) + return object; + var message = new $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails(); + if (object.files) { + if (!Array.isArray(object.files)) + throw TypeError(".google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails.files: array expected"); + message.files = []; + for (var i = 0; i < object.files.length; ++i) + message.files[i] = String(object.files[i]); + } + switch (object.fileFormat) { + default: + if (typeof object.fileFormat === "number") { + message.fileFormat = object.fileFormat; + break; + } + break; + case "IMPORT_RULES_FILE_FORMAT_UNSPECIFIED": + case 0: + message.fileFormat = 0; + break; + case "IMPORT_RULES_FILE_FORMAT_HARBOUR_BRIDGE_SESSION_FILE": + case 1: + message.fileFormat = 1; + break; + case "IMPORT_RULES_FILE_FORMAT_ORATOPG_CONFIG_FILE": + case 2: + message.fileFormat = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an ImportRulesJobDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails + * @static + * @param {google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails} message ImportRulesJobDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportRulesJobDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.files = []; + if (options.defaults) + object.fileFormat = options.enums === String ? "IMPORT_RULES_FILE_FORMAT_UNSPECIFIED" : 0; + if (message.files && message.files.length) { + object.files = []; + for (var j = 0; j < message.files.length; ++j) + object.files[j] = message.files[j]; + } + if (message.fileFormat != null && message.hasOwnProperty("fileFormat")) + object.fileFormat = options.enums === String ? $root.google.cloud.clouddms.v1.ImportRulesFileFormat[message.fileFormat] === undefined ? message.fileFormat : $root.google.cloud.clouddms.v1.ImportRulesFileFormat[message.fileFormat] : message.fileFormat; + return object; + }; + + /** + * Converts this ImportRulesJobDetails to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails + * @instance + * @returns {Object.} JSON object + */ + ImportRulesJobDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImportRulesJobDetails + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportRulesJobDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.BackgroundJobLogEntry.ImportRulesJobDetails"; + }; + + return ImportRulesJobDetails; + })(); + + BackgroundJobLogEntry.ConvertJobDetails = (function() { + + /** + * Properties of a ConvertJobDetails. + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry + * @interface IConvertJobDetails + * @property {string|null} [filter] ConvertJobDetails filter + */ + + /** + * Constructs a new ConvertJobDetails. + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry + * @classdesc Represents a ConvertJobDetails. + * @implements IConvertJobDetails + * @constructor + * @param {google.cloud.clouddms.v1.BackgroundJobLogEntry.IConvertJobDetails=} [properties] Properties to set + */ + function ConvertJobDetails(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]]; + } + + /** + * ConvertJobDetails filter. + * @member {string} filter + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails + * @instance + */ + ConvertJobDetails.prototype.filter = ""; + + /** + * Creates a new ConvertJobDetails instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails + * @static + * @param {google.cloud.clouddms.v1.BackgroundJobLogEntry.IConvertJobDetails=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails} ConvertJobDetails instance + */ + ConvertJobDetails.create = function create(properties) { + return new ConvertJobDetails(properties); + }; + + /** + * Encodes the specified ConvertJobDetails message. Does not implicitly {@link google.cloud.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails + * @static + * @param {google.cloud.clouddms.v1.BackgroundJobLogEntry.IConvertJobDetails} message ConvertJobDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConvertJobDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ConvertJobDetails message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails + * @static + * @param {google.cloud.clouddms.v1.BackgroundJobLogEntry.IConvertJobDetails} message ConvertJobDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConvertJobDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConvertJobDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails} ConvertJobDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConvertJobDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConvertJobDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails} ConvertJobDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConvertJobDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConvertJobDetails message. + * @function verify + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConvertJobDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ConvertJobDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails} ConvertJobDetails + */ + ConvertJobDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails) + return object; + var message = new $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails(); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ConvertJobDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails + * @static + * @param {google.cloud.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails} message ConvertJobDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConvertJobDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.filter = ""; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ConvertJobDetails to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails + * @instance + * @returns {Object.} JSON object + */ + ConvertJobDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConvertJobDetails + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConvertJobDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.BackgroundJobLogEntry.ConvertJobDetails"; + }; + + return ConvertJobDetails; + })(); + + BackgroundJobLogEntry.ApplyJobDetails = (function() { + + /** + * Properties of an ApplyJobDetails. + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry + * @interface IApplyJobDetails + * @property {string|null} [connectionProfile] ApplyJobDetails connectionProfile + * @property {string|null} [filter] ApplyJobDetails filter + */ + + /** + * Constructs a new ApplyJobDetails. + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry + * @classdesc Represents an ApplyJobDetails. + * @implements IApplyJobDetails + * @constructor + * @param {google.cloud.clouddms.v1.BackgroundJobLogEntry.IApplyJobDetails=} [properties] Properties to set + */ + function ApplyJobDetails(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]]; + } + + /** + * ApplyJobDetails connectionProfile. + * @member {string} connectionProfile + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails + * @instance + */ + ApplyJobDetails.prototype.connectionProfile = ""; + + /** + * ApplyJobDetails filter. + * @member {string} filter + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails + * @instance + */ + ApplyJobDetails.prototype.filter = ""; + + /** + * Creates a new ApplyJobDetails instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails + * @static + * @param {google.cloud.clouddms.v1.BackgroundJobLogEntry.IApplyJobDetails=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails} ApplyJobDetails instance + */ + ApplyJobDetails.create = function create(properties) { + return new ApplyJobDetails(properties); + }; + + /** + * Encodes the specified ApplyJobDetails message. Does not implicitly {@link google.cloud.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails + * @static + * @param {google.cloud.clouddms.v1.BackgroundJobLogEntry.IApplyJobDetails} message ApplyJobDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ApplyJobDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.connectionProfile != null && Object.hasOwnProperty.call(message, "connectionProfile")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.connectionProfile); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ApplyJobDetails message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails + * @static + * @param {google.cloud.clouddms.v1.BackgroundJobLogEntry.IApplyJobDetails} message ApplyJobDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ApplyJobDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ApplyJobDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails} ApplyJobDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ApplyJobDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.connectionProfile = reader.string(); + break; + } + case 2: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ApplyJobDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails} ApplyJobDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ApplyJobDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ApplyJobDetails message. + * @function verify + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ApplyJobDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.connectionProfile != null && message.hasOwnProperty("connectionProfile")) + if (!$util.isString(message.connectionProfile)) + return "connectionProfile: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates an ApplyJobDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails} ApplyJobDetails + */ + ApplyJobDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails) + return object; + var message = new $root.google.cloud.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails(); + if (object.connectionProfile != null) + message.connectionProfile = String(object.connectionProfile); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from an ApplyJobDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails + * @static + * @param {google.cloud.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails} message ApplyJobDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ApplyJobDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.connectionProfile = ""; + object.filter = ""; + } + if (message.connectionProfile != null && message.hasOwnProperty("connectionProfile")) + object.connectionProfile = message.connectionProfile; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ApplyJobDetails to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails + * @instance + * @returns {Object.} JSON object + */ + ApplyJobDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ApplyJobDetails + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ApplyJobDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.BackgroundJobLogEntry.ApplyJobDetails"; + }; + + return ApplyJobDetails; + })(); + + return BackgroundJobLogEntry; + })(); + + v1.DatabaseEntity = (function() { + + /** + * Properties of a DatabaseEntity. + * @memberof google.cloud.clouddms.v1 + * @interface IDatabaseEntity + * @property {string|null} [shortName] DatabaseEntity shortName + * @property {string|null} [parentEntity] DatabaseEntity parentEntity + * @property {google.cloud.clouddms.v1.DatabaseEntity.TreeType|null} [tree] DatabaseEntity tree + * @property {google.cloud.clouddms.v1.DatabaseEntityType|null} [entityType] DatabaseEntity entityType + * @property {Array.|null} [mappings] DatabaseEntity mappings + * @property {google.cloud.clouddms.v1.ISchemaEntity|null} [schema] DatabaseEntity schema + * @property {google.cloud.clouddms.v1.ITableEntity|null} [table] DatabaseEntity table + * @property {google.cloud.clouddms.v1.IViewEntity|null} [view] DatabaseEntity view + * @property {google.cloud.clouddms.v1.ISequenceEntity|null} [sequence] DatabaseEntity sequence + * @property {google.cloud.clouddms.v1.IStoredProcedureEntity|null} [storedProcedure] DatabaseEntity storedProcedure + * @property {google.cloud.clouddms.v1.IFunctionEntity|null} [databaseFunction] DatabaseEntity databaseFunction + * @property {google.cloud.clouddms.v1.ISynonymEntity|null} [synonym] DatabaseEntity synonym + * @property {google.cloud.clouddms.v1.IPackageEntity|null} [databasePackage] DatabaseEntity databasePackage + */ + + /** + * Constructs a new DatabaseEntity. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a DatabaseEntity. + * @implements IDatabaseEntity + * @constructor + * @param {google.cloud.clouddms.v1.IDatabaseEntity=} [properties] Properties to set + */ + function DatabaseEntity(properties) { + this.mappings = []; + 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]]; + } + + /** + * DatabaseEntity shortName. + * @member {string} shortName + * @memberof google.cloud.clouddms.v1.DatabaseEntity + * @instance + */ + DatabaseEntity.prototype.shortName = ""; + + /** + * DatabaseEntity parentEntity. + * @member {string} parentEntity + * @memberof google.cloud.clouddms.v1.DatabaseEntity + * @instance + */ + DatabaseEntity.prototype.parentEntity = ""; + + /** + * DatabaseEntity tree. + * @member {google.cloud.clouddms.v1.DatabaseEntity.TreeType} tree + * @memberof google.cloud.clouddms.v1.DatabaseEntity + * @instance + */ + DatabaseEntity.prototype.tree = 0; + + /** + * DatabaseEntity entityType. + * @member {google.cloud.clouddms.v1.DatabaseEntityType} entityType + * @memberof google.cloud.clouddms.v1.DatabaseEntity + * @instance + */ + DatabaseEntity.prototype.entityType = 0; + + /** + * DatabaseEntity mappings. + * @member {Array.} mappings + * @memberof google.cloud.clouddms.v1.DatabaseEntity + * @instance + */ + DatabaseEntity.prototype.mappings = $util.emptyArray; + + /** + * DatabaseEntity schema. + * @member {google.cloud.clouddms.v1.ISchemaEntity|null|undefined} schema + * @memberof google.cloud.clouddms.v1.DatabaseEntity + * @instance + */ + DatabaseEntity.prototype.schema = null; + + /** + * DatabaseEntity table. + * @member {google.cloud.clouddms.v1.ITableEntity|null|undefined} table + * @memberof google.cloud.clouddms.v1.DatabaseEntity + * @instance + */ + DatabaseEntity.prototype.table = null; + + /** + * DatabaseEntity view. + * @member {google.cloud.clouddms.v1.IViewEntity|null|undefined} view + * @memberof google.cloud.clouddms.v1.DatabaseEntity + * @instance + */ + DatabaseEntity.prototype.view = null; + + /** + * DatabaseEntity sequence. + * @member {google.cloud.clouddms.v1.ISequenceEntity|null|undefined} sequence + * @memberof google.cloud.clouddms.v1.DatabaseEntity + * @instance + */ + DatabaseEntity.prototype.sequence = null; + + /** + * DatabaseEntity storedProcedure. + * @member {google.cloud.clouddms.v1.IStoredProcedureEntity|null|undefined} storedProcedure + * @memberof google.cloud.clouddms.v1.DatabaseEntity + * @instance + */ + DatabaseEntity.prototype.storedProcedure = null; + + /** + * DatabaseEntity databaseFunction. + * @member {google.cloud.clouddms.v1.IFunctionEntity|null|undefined} databaseFunction + * @memberof google.cloud.clouddms.v1.DatabaseEntity + * @instance + */ + DatabaseEntity.prototype.databaseFunction = null; + + /** + * DatabaseEntity synonym. + * @member {google.cloud.clouddms.v1.ISynonymEntity|null|undefined} synonym + * @memberof google.cloud.clouddms.v1.DatabaseEntity + * @instance + */ + DatabaseEntity.prototype.synonym = null; + + /** + * DatabaseEntity databasePackage. + * @member {google.cloud.clouddms.v1.IPackageEntity|null|undefined} databasePackage + * @memberof google.cloud.clouddms.v1.DatabaseEntity + * @instance + */ + DatabaseEntity.prototype.databasePackage = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DatabaseEntity entityBody. + * @member {"schema"|"table"|"view"|"sequence"|"storedProcedure"|"databaseFunction"|"synonym"|"databasePackage"|undefined} entityBody + * @memberof google.cloud.clouddms.v1.DatabaseEntity + * @instance + */ + Object.defineProperty(DatabaseEntity.prototype, "entityBody", { + get: $util.oneOfGetter($oneOfFields = ["schema", "table", "view", "sequence", "storedProcedure", "databaseFunction", "synonym", "databasePackage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DatabaseEntity instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.DatabaseEntity + * @static + * @param {google.cloud.clouddms.v1.IDatabaseEntity=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.DatabaseEntity} DatabaseEntity instance + */ + DatabaseEntity.create = function create(properties) { + return new DatabaseEntity(properties); + }; + + /** + * Encodes the specified DatabaseEntity message. Does not implicitly {@link google.cloud.clouddms.v1.DatabaseEntity.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.DatabaseEntity + * @static + * @param {google.cloud.clouddms.v1.IDatabaseEntity} message DatabaseEntity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseEntity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.shortName != null && Object.hasOwnProperty.call(message, "shortName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.shortName); + if (message.parentEntity != null && Object.hasOwnProperty.call(message, "parentEntity")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.parentEntity); + if (message.tree != null && Object.hasOwnProperty.call(message, "tree")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.tree); + if (message.entityType != null && Object.hasOwnProperty.call(message, "entityType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.entityType); + if (message.mappings != null && message.mappings.length) + for (var i = 0; i < message.mappings.length; ++i) + $root.google.cloud.clouddms.v1.EntityMapping.encode(message.mappings[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + $root.google.cloud.clouddms.v1.SchemaEntity.encode(message.schema, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + if (message.table != null && Object.hasOwnProperty.call(message, "table")) + $root.google.cloud.clouddms.v1.TableEntity.encode(message.table, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + $root.google.cloud.clouddms.v1.ViewEntity.encode(message.view, writer.uint32(/* id 104, wireType 2 =*/834).fork()).ldelim(); + if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) + $root.google.cloud.clouddms.v1.SequenceEntity.encode(message.sequence, writer.uint32(/* id 105, wireType 2 =*/842).fork()).ldelim(); + if (message.storedProcedure != null && Object.hasOwnProperty.call(message, "storedProcedure")) + $root.google.cloud.clouddms.v1.StoredProcedureEntity.encode(message.storedProcedure, writer.uint32(/* id 106, wireType 2 =*/850).fork()).ldelim(); + if (message.databaseFunction != null && Object.hasOwnProperty.call(message, "databaseFunction")) + $root.google.cloud.clouddms.v1.FunctionEntity.encode(message.databaseFunction, writer.uint32(/* id 107, wireType 2 =*/858).fork()).ldelim(); + if (message.synonym != null && Object.hasOwnProperty.call(message, "synonym")) + $root.google.cloud.clouddms.v1.SynonymEntity.encode(message.synonym, writer.uint32(/* id 108, wireType 2 =*/866).fork()).ldelim(); + if (message.databasePackage != null && Object.hasOwnProperty.call(message, "databasePackage")) + $root.google.cloud.clouddms.v1.PackageEntity.encode(message.databasePackage, writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DatabaseEntity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.DatabaseEntity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.DatabaseEntity + * @static + * @param {google.cloud.clouddms.v1.IDatabaseEntity} message DatabaseEntity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseEntity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DatabaseEntity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.DatabaseEntity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.DatabaseEntity} DatabaseEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseEntity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.DatabaseEntity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.shortName = reader.string(); + break; + } + case 2: { + message.parentEntity = reader.string(); + break; + } + case 3: { + message.tree = reader.int32(); + break; + } + case 4: { + message.entityType = reader.int32(); + break; + } + case 5: { + if (!(message.mappings && message.mappings.length)) + message.mappings = []; + message.mappings.push($root.google.cloud.clouddms.v1.EntityMapping.decode(reader, reader.uint32())); + break; + } + case 102: { + message.schema = $root.google.cloud.clouddms.v1.SchemaEntity.decode(reader, reader.uint32()); + break; + } + case 103: { + message.table = $root.google.cloud.clouddms.v1.TableEntity.decode(reader, reader.uint32()); + break; + } + case 104: { + message.view = $root.google.cloud.clouddms.v1.ViewEntity.decode(reader, reader.uint32()); + break; + } + case 105: { + message.sequence = $root.google.cloud.clouddms.v1.SequenceEntity.decode(reader, reader.uint32()); + break; + } + case 106: { + message.storedProcedure = $root.google.cloud.clouddms.v1.StoredProcedureEntity.decode(reader, reader.uint32()); + break; + } + case 107: { + message.databaseFunction = $root.google.cloud.clouddms.v1.FunctionEntity.decode(reader, reader.uint32()); + break; + } + case 108: { + message.synonym = $root.google.cloud.clouddms.v1.SynonymEntity.decode(reader, reader.uint32()); + break; + } + case 109: { + message.databasePackage = $root.google.cloud.clouddms.v1.PackageEntity.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DatabaseEntity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.DatabaseEntity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.DatabaseEntity} DatabaseEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseEntity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DatabaseEntity message. + * @function verify + * @memberof google.cloud.clouddms.v1.DatabaseEntity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DatabaseEntity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.shortName != null && message.hasOwnProperty("shortName")) + if (!$util.isString(message.shortName)) + return "shortName: string expected"; + if (message.parentEntity != null && message.hasOwnProperty("parentEntity")) + if (!$util.isString(message.parentEntity)) + return "parentEntity: string expected"; + if (message.tree != null && message.hasOwnProperty("tree")) + switch (message.tree) { + default: + return "tree: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.entityType != null && message.hasOwnProperty("entityType")) + switch (message.entityType) { + default: + return "entityType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + break; + } + if (message.mappings != null && message.hasOwnProperty("mappings")) { + if (!Array.isArray(message.mappings)) + return "mappings: array expected"; + for (var i = 0; i < message.mappings.length; ++i) { + var error = $root.google.cloud.clouddms.v1.EntityMapping.verify(message.mappings[i]); + if (error) + return "mappings." + error; + } + } + if (message.schema != null && message.hasOwnProperty("schema")) { + properties.entityBody = 1; + { + var error = $root.google.cloud.clouddms.v1.SchemaEntity.verify(message.schema); + if (error) + return "schema." + error; + } + } + if (message.table != null && message.hasOwnProperty("table")) { + if (properties.entityBody === 1) + return "entityBody: multiple values"; + properties.entityBody = 1; + { + var error = $root.google.cloud.clouddms.v1.TableEntity.verify(message.table); + if (error) + return "table." + error; + } + } + if (message.view != null && message.hasOwnProperty("view")) { + if (properties.entityBody === 1) + return "entityBody: multiple values"; + properties.entityBody = 1; + { + var error = $root.google.cloud.clouddms.v1.ViewEntity.verify(message.view); + if (error) + return "view." + error; + } + } + if (message.sequence != null && message.hasOwnProperty("sequence")) { + if (properties.entityBody === 1) + return "entityBody: multiple values"; + properties.entityBody = 1; + { + var error = $root.google.cloud.clouddms.v1.SequenceEntity.verify(message.sequence); + if (error) + return "sequence." + error; + } + } + if (message.storedProcedure != null && message.hasOwnProperty("storedProcedure")) { + if (properties.entityBody === 1) + return "entityBody: multiple values"; + properties.entityBody = 1; + { + var error = $root.google.cloud.clouddms.v1.StoredProcedureEntity.verify(message.storedProcedure); + if (error) + return "storedProcedure." + error; + } + } + if (message.databaseFunction != null && message.hasOwnProperty("databaseFunction")) { + if (properties.entityBody === 1) + return "entityBody: multiple values"; + properties.entityBody = 1; + { + var error = $root.google.cloud.clouddms.v1.FunctionEntity.verify(message.databaseFunction); + if (error) + return "databaseFunction." + error; + } + } + if (message.synonym != null && message.hasOwnProperty("synonym")) { + if (properties.entityBody === 1) + return "entityBody: multiple values"; + properties.entityBody = 1; + { + var error = $root.google.cloud.clouddms.v1.SynonymEntity.verify(message.synonym); + if (error) + return "synonym." + error; + } + } + if (message.databasePackage != null && message.hasOwnProperty("databasePackage")) { + if (properties.entityBody === 1) + return "entityBody: multiple values"; + properties.entityBody = 1; + { + var error = $root.google.cloud.clouddms.v1.PackageEntity.verify(message.databasePackage); + if (error) + return "databasePackage." + error; + } + } + return null; + }; + + /** + * Creates a DatabaseEntity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.DatabaseEntity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.DatabaseEntity} DatabaseEntity + */ + DatabaseEntity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.DatabaseEntity) + return object; + var message = new $root.google.cloud.clouddms.v1.DatabaseEntity(); + if (object.shortName != null) + message.shortName = String(object.shortName); + if (object.parentEntity != null) + message.parentEntity = String(object.parentEntity); + switch (object.tree) { + default: + if (typeof object.tree === "number") { + message.tree = object.tree; + break; + } + break; + case "TREE_TYPE_UNSPECIFIED": + case 0: + message.tree = 0; + break; + case "SOURCE": + case 1: + message.tree = 1; + break; + case "DRAFT": + case 2: + message.tree = 2; + break; + case "DESTINATION": + case 3: + message.tree = 3; + break; + } + switch (object.entityType) { + default: + if (typeof object.entityType === "number") { + message.entityType = object.entityType; + break; + } + break; + case "DATABASE_ENTITY_TYPE_UNSPECIFIED": + case 0: + message.entityType = 0; + break; + case "DATABASE_ENTITY_TYPE_SCHEMA": + case 1: + message.entityType = 1; + break; + case "DATABASE_ENTITY_TYPE_TABLE": + case 2: + message.entityType = 2; + break; + case "DATABASE_ENTITY_TYPE_COLUMN": + case 3: + message.entityType = 3; + break; + case "DATABASE_ENTITY_TYPE_CONSTRAINT": + case 4: + message.entityType = 4; + break; + case "DATABASE_ENTITY_TYPE_INDEX": + case 5: + message.entityType = 5; + break; + case "DATABASE_ENTITY_TYPE_TRIGGER": + case 6: + message.entityType = 6; + break; + case "DATABASE_ENTITY_TYPE_VIEW": + case 7: + message.entityType = 7; + break; + case "DATABASE_ENTITY_TYPE_SEQUENCE": + case 8: + message.entityType = 8; + break; + case "DATABASE_ENTITY_TYPE_STORED_PROCEDURE": + case 9: + message.entityType = 9; + break; + case "DATABASE_ENTITY_TYPE_FUNCTION": + case 10: + message.entityType = 10; + break; + case "DATABASE_ENTITY_TYPE_SYNONYM": + case 11: + message.entityType = 11; + break; + case "DATABASE_ENTITY_TYPE_DATABASE_PACKAGE": + case 12: + message.entityType = 12; + break; + case "DATABASE_ENTITY_TYPE_UDT": + case 13: + message.entityType = 13; + break; + case "DATABASE_ENTITY_TYPE_MATERIALIZED_VIEW": + case 14: + message.entityType = 14; + break; + case "DATABASE_ENTITY_TYPE_DATABASE": + case 15: + message.entityType = 15; + break; + } + if (object.mappings) { + if (!Array.isArray(object.mappings)) + throw TypeError(".google.cloud.clouddms.v1.DatabaseEntity.mappings: array expected"); + message.mappings = []; + for (var i = 0; i < object.mappings.length; ++i) { + if (typeof object.mappings[i] !== "object") + throw TypeError(".google.cloud.clouddms.v1.DatabaseEntity.mappings: object expected"); + message.mappings[i] = $root.google.cloud.clouddms.v1.EntityMapping.fromObject(object.mappings[i]); + } + } + if (object.schema != null) { + if (typeof object.schema !== "object") + throw TypeError(".google.cloud.clouddms.v1.DatabaseEntity.schema: object expected"); + message.schema = $root.google.cloud.clouddms.v1.SchemaEntity.fromObject(object.schema); + } + if (object.table != null) { + if (typeof object.table !== "object") + throw TypeError(".google.cloud.clouddms.v1.DatabaseEntity.table: object expected"); + message.table = $root.google.cloud.clouddms.v1.TableEntity.fromObject(object.table); + } + if (object.view != null) { + if (typeof object.view !== "object") + throw TypeError(".google.cloud.clouddms.v1.DatabaseEntity.view: object expected"); + message.view = $root.google.cloud.clouddms.v1.ViewEntity.fromObject(object.view); + } + if (object.sequence != null) { + if (typeof object.sequence !== "object") + throw TypeError(".google.cloud.clouddms.v1.DatabaseEntity.sequence: object expected"); + message.sequence = $root.google.cloud.clouddms.v1.SequenceEntity.fromObject(object.sequence); + } + if (object.storedProcedure != null) { + if (typeof object.storedProcedure !== "object") + throw TypeError(".google.cloud.clouddms.v1.DatabaseEntity.storedProcedure: object expected"); + message.storedProcedure = $root.google.cloud.clouddms.v1.StoredProcedureEntity.fromObject(object.storedProcedure); + } + if (object.databaseFunction != null) { + if (typeof object.databaseFunction !== "object") + throw TypeError(".google.cloud.clouddms.v1.DatabaseEntity.databaseFunction: object expected"); + message.databaseFunction = $root.google.cloud.clouddms.v1.FunctionEntity.fromObject(object.databaseFunction); + } + if (object.synonym != null) { + if (typeof object.synonym !== "object") + throw TypeError(".google.cloud.clouddms.v1.DatabaseEntity.synonym: object expected"); + message.synonym = $root.google.cloud.clouddms.v1.SynonymEntity.fromObject(object.synonym); + } + if (object.databasePackage != null) { + if (typeof object.databasePackage !== "object") + throw TypeError(".google.cloud.clouddms.v1.DatabaseEntity.databasePackage: object expected"); + message.databasePackage = $root.google.cloud.clouddms.v1.PackageEntity.fromObject(object.databasePackage); + } + return message; + }; + + /** + * Creates a plain object from a DatabaseEntity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.DatabaseEntity + * @static + * @param {google.cloud.clouddms.v1.DatabaseEntity} message DatabaseEntity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DatabaseEntity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.mappings = []; + if (options.defaults) { + object.shortName = ""; + object.parentEntity = ""; + object.tree = options.enums === String ? "TREE_TYPE_UNSPECIFIED" : 0; + object.entityType = options.enums === String ? "DATABASE_ENTITY_TYPE_UNSPECIFIED" : 0; + } + if (message.shortName != null && message.hasOwnProperty("shortName")) + object.shortName = message.shortName; + if (message.parentEntity != null && message.hasOwnProperty("parentEntity")) + object.parentEntity = message.parentEntity; + if (message.tree != null && message.hasOwnProperty("tree")) + object.tree = options.enums === String ? $root.google.cloud.clouddms.v1.DatabaseEntity.TreeType[message.tree] === undefined ? message.tree : $root.google.cloud.clouddms.v1.DatabaseEntity.TreeType[message.tree] : message.tree; + if (message.entityType != null && message.hasOwnProperty("entityType")) + object.entityType = options.enums === String ? $root.google.cloud.clouddms.v1.DatabaseEntityType[message.entityType] === undefined ? message.entityType : $root.google.cloud.clouddms.v1.DatabaseEntityType[message.entityType] : message.entityType; + if (message.mappings && message.mappings.length) { + object.mappings = []; + for (var j = 0; j < message.mappings.length; ++j) + object.mappings[j] = $root.google.cloud.clouddms.v1.EntityMapping.toObject(message.mappings[j], options); + } + if (message.schema != null && message.hasOwnProperty("schema")) { + object.schema = $root.google.cloud.clouddms.v1.SchemaEntity.toObject(message.schema, options); + if (options.oneofs) + object.entityBody = "schema"; + } + if (message.table != null && message.hasOwnProperty("table")) { + object.table = $root.google.cloud.clouddms.v1.TableEntity.toObject(message.table, options); + if (options.oneofs) + object.entityBody = "table"; + } + if (message.view != null && message.hasOwnProperty("view")) { + object.view = $root.google.cloud.clouddms.v1.ViewEntity.toObject(message.view, options); + if (options.oneofs) + object.entityBody = "view"; + } + if (message.sequence != null && message.hasOwnProperty("sequence")) { + object.sequence = $root.google.cloud.clouddms.v1.SequenceEntity.toObject(message.sequence, options); + if (options.oneofs) + object.entityBody = "sequence"; + } + if (message.storedProcedure != null && message.hasOwnProperty("storedProcedure")) { + object.storedProcedure = $root.google.cloud.clouddms.v1.StoredProcedureEntity.toObject(message.storedProcedure, options); + if (options.oneofs) + object.entityBody = "storedProcedure"; + } + if (message.databaseFunction != null && message.hasOwnProperty("databaseFunction")) { + object.databaseFunction = $root.google.cloud.clouddms.v1.FunctionEntity.toObject(message.databaseFunction, options); + if (options.oneofs) + object.entityBody = "databaseFunction"; + } + if (message.synonym != null && message.hasOwnProperty("synonym")) { + object.synonym = $root.google.cloud.clouddms.v1.SynonymEntity.toObject(message.synonym, options); + if (options.oneofs) + object.entityBody = "synonym"; + } + if (message.databasePackage != null && message.hasOwnProperty("databasePackage")) { + object.databasePackage = $root.google.cloud.clouddms.v1.PackageEntity.toObject(message.databasePackage, options); + if (options.oneofs) + object.entityBody = "databasePackage"; + } + return object; + }; + + /** + * Converts this DatabaseEntity to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.DatabaseEntity + * @instance + * @returns {Object.} JSON object + */ + DatabaseEntity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DatabaseEntity + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.DatabaseEntity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DatabaseEntity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.DatabaseEntity"; + }; + + /** + * TreeType enum. + * @name google.cloud.clouddms.v1.DatabaseEntity.TreeType + * @enum {number} + * @property {number} TREE_TYPE_UNSPECIFIED=0 TREE_TYPE_UNSPECIFIED value + * @property {number} SOURCE=1 SOURCE value + * @property {number} DRAFT=2 DRAFT value + * @property {number} DESTINATION=3 DESTINATION value + */ + DatabaseEntity.TreeType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TREE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SOURCE"] = 1; + values[valuesById[2] = "DRAFT"] = 2; + values[valuesById[3] = "DESTINATION"] = 3; + return values; + })(); + + return DatabaseEntity; + })(); + + v1.SchemaEntity = (function() { + + /** + * Properties of a SchemaEntity. + * @memberof google.cloud.clouddms.v1 + * @interface ISchemaEntity + * @property {google.protobuf.IStruct|null} [customFeatures] SchemaEntity customFeatures + */ + + /** + * Constructs a new SchemaEntity. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a SchemaEntity. + * @implements ISchemaEntity + * @constructor + * @param {google.cloud.clouddms.v1.ISchemaEntity=} [properties] Properties to set + */ + function SchemaEntity(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]]; + } + + /** + * SchemaEntity customFeatures. + * @member {google.protobuf.IStruct|null|undefined} customFeatures + * @memberof google.cloud.clouddms.v1.SchemaEntity + * @instance + */ + SchemaEntity.prototype.customFeatures = null; + + /** + * Creates a new SchemaEntity instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.SchemaEntity + * @static + * @param {google.cloud.clouddms.v1.ISchemaEntity=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.SchemaEntity} SchemaEntity instance + */ + SchemaEntity.create = function create(properties) { + return new SchemaEntity(properties); + }; + + /** + * Encodes the specified SchemaEntity message. Does not implicitly {@link google.cloud.clouddms.v1.SchemaEntity.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.SchemaEntity + * @static + * @param {google.cloud.clouddms.v1.ISchemaEntity} message SchemaEntity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaEntity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.customFeatures != null && Object.hasOwnProperty.call(message, "customFeatures")) + $root.google.protobuf.Struct.encode(message.customFeatures, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SchemaEntity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.SchemaEntity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.SchemaEntity + * @static + * @param {google.cloud.clouddms.v1.ISchemaEntity} message SchemaEntity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaEntity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SchemaEntity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.SchemaEntity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.SchemaEntity} SchemaEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaEntity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.SchemaEntity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.customFeatures = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SchemaEntity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.SchemaEntity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.SchemaEntity} SchemaEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaEntity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SchemaEntity message. + * @function verify + * @memberof google.cloud.clouddms.v1.SchemaEntity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SchemaEntity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.customFeatures != null && message.hasOwnProperty("customFeatures")) { + var error = $root.google.protobuf.Struct.verify(message.customFeatures); + if (error) + return "customFeatures." + error; + } + return null; + }; + + /** + * Creates a SchemaEntity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.SchemaEntity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.SchemaEntity} SchemaEntity + */ + SchemaEntity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.SchemaEntity) + return object; + var message = new $root.google.cloud.clouddms.v1.SchemaEntity(); + if (object.customFeatures != null) { + if (typeof object.customFeatures !== "object") + throw TypeError(".google.cloud.clouddms.v1.SchemaEntity.customFeatures: object expected"); + message.customFeatures = $root.google.protobuf.Struct.fromObject(object.customFeatures); + } + return message; + }; + + /** + * Creates a plain object from a SchemaEntity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.SchemaEntity + * @static + * @param {google.cloud.clouddms.v1.SchemaEntity} message SchemaEntity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SchemaEntity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.customFeatures = null; + if (message.customFeatures != null && message.hasOwnProperty("customFeatures")) + object.customFeatures = $root.google.protobuf.Struct.toObject(message.customFeatures, options); + return object; + }; + + /** + * Converts this SchemaEntity to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.SchemaEntity + * @instance + * @returns {Object.} JSON object + */ + SchemaEntity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SchemaEntity + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.SchemaEntity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SchemaEntity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.SchemaEntity"; + }; + + return SchemaEntity; + })(); + + v1.TableEntity = (function() { + + /** + * Properties of a TableEntity. + * @memberof google.cloud.clouddms.v1 + * @interface ITableEntity + * @property {Array.|null} [columns] TableEntity columns + * @property {Array.|null} [constraints] TableEntity constraints + * @property {Array.|null} [indices] TableEntity indices + * @property {Array.|null} [triggers] TableEntity triggers + * @property {google.protobuf.IStruct|null} [customFeatures] TableEntity customFeatures + * @property {string|null} [comment] TableEntity comment + */ + + /** + * Constructs a new TableEntity. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a TableEntity. + * @implements ITableEntity + * @constructor + * @param {google.cloud.clouddms.v1.ITableEntity=} [properties] Properties to set + */ + function TableEntity(properties) { + this.columns = []; + this.constraints = []; + this.indices = []; + this.triggers = []; + 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]]; + } + + /** + * TableEntity columns. + * @member {Array.} columns + * @memberof google.cloud.clouddms.v1.TableEntity + * @instance + */ + TableEntity.prototype.columns = $util.emptyArray; + + /** + * TableEntity constraints. + * @member {Array.} constraints + * @memberof google.cloud.clouddms.v1.TableEntity + * @instance + */ + TableEntity.prototype.constraints = $util.emptyArray; + + /** + * TableEntity indices. + * @member {Array.} indices + * @memberof google.cloud.clouddms.v1.TableEntity + * @instance + */ + TableEntity.prototype.indices = $util.emptyArray; + + /** + * TableEntity triggers. + * @member {Array.} triggers + * @memberof google.cloud.clouddms.v1.TableEntity + * @instance + */ + TableEntity.prototype.triggers = $util.emptyArray; + + /** + * TableEntity customFeatures. + * @member {google.protobuf.IStruct|null|undefined} customFeatures + * @memberof google.cloud.clouddms.v1.TableEntity + * @instance + */ + TableEntity.prototype.customFeatures = null; + + /** + * TableEntity comment. + * @member {string} comment + * @memberof google.cloud.clouddms.v1.TableEntity + * @instance + */ + TableEntity.prototype.comment = ""; + + /** + * Creates a new TableEntity instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.TableEntity + * @static + * @param {google.cloud.clouddms.v1.ITableEntity=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.TableEntity} TableEntity instance + */ + TableEntity.create = function create(properties) { + return new TableEntity(properties); + }; + + /** + * Encodes the specified TableEntity message. Does not implicitly {@link google.cloud.clouddms.v1.TableEntity.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.TableEntity + * @static + * @param {google.cloud.clouddms.v1.ITableEntity} message TableEntity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableEntity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.columns != null && message.columns.length) + for (var i = 0; i < message.columns.length; ++i) + $root.google.cloud.clouddms.v1.ColumnEntity.encode(message.columns[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.constraints != null && message.constraints.length) + for (var i = 0; i < message.constraints.length; ++i) + $root.google.cloud.clouddms.v1.ConstraintEntity.encode(message.constraints[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.indices != null && message.indices.length) + for (var i = 0; i < message.indices.length; ++i) + $root.google.cloud.clouddms.v1.IndexEntity.encode(message.indices[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.triggers != null && message.triggers.length) + for (var i = 0; i < message.triggers.length; ++i) + $root.google.cloud.clouddms.v1.TriggerEntity.encode(message.triggers[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.customFeatures != null && Object.hasOwnProperty.call(message, "customFeatures")) + $root.google.protobuf.Struct.encode(message.customFeatures, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.comment != null && Object.hasOwnProperty.call(message, "comment")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.comment); + return writer; + }; + + /** + * Encodes the specified TableEntity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.TableEntity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.TableEntity + * @static + * @param {google.cloud.clouddms.v1.ITableEntity} message TableEntity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableEntity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TableEntity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.TableEntity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.TableEntity} TableEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableEntity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.TableEntity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.columns && message.columns.length)) + message.columns = []; + message.columns.push($root.google.cloud.clouddms.v1.ColumnEntity.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.constraints && message.constraints.length)) + message.constraints = []; + message.constraints.push($root.google.cloud.clouddms.v1.ConstraintEntity.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.indices && message.indices.length)) + message.indices = []; + message.indices.push($root.google.cloud.clouddms.v1.IndexEntity.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.triggers && message.triggers.length)) + message.triggers = []; + message.triggers.push($root.google.cloud.clouddms.v1.TriggerEntity.decode(reader, reader.uint32())); + break; + } + case 5: { + message.customFeatures = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 6: { + message.comment = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TableEntity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.TableEntity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.TableEntity} TableEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableEntity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TableEntity message. + * @function verify + * @memberof google.cloud.clouddms.v1.TableEntity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TableEntity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.columns != null && message.hasOwnProperty("columns")) { + if (!Array.isArray(message.columns)) + return "columns: array expected"; + for (var i = 0; i < message.columns.length; ++i) { + var error = $root.google.cloud.clouddms.v1.ColumnEntity.verify(message.columns[i]); + if (error) + return "columns." + error; + } + } + if (message.constraints != null && message.hasOwnProperty("constraints")) { + if (!Array.isArray(message.constraints)) + return "constraints: array expected"; + for (var i = 0; i < message.constraints.length; ++i) { + var error = $root.google.cloud.clouddms.v1.ConstraintEntity.verify(message.constraints[i]); + if (error) + return "constraints." + error; + } + } + if (message.indices != null && message.hasOwnProperty("indices")) { + if (!Array.isArray(message.indices)) + return "indices: array expected"; + for (var i = 0; i < message.indices.length; ++i) { + var error = $root.google.cloud.clouddms.v1.IndexEntity.verify(message.indices[i]); + if (error) + return "indices." + error; + } + } + if (message.triggers != null && message.hasOwnProperty("triggers")) { + if (!Array.isArray(message.triggers)) + return "triggers: array expected"; + for (var i = 0; i < message.triggers.length; ++i) { + var error = $root.google.cloud.clouddms.v1.TriggerEntity.verify(message.triggers[i]); + if (error) + return "triggers." + error; + } + } + if (message.customFeatures != null && message.hasOwnProperty("customFeatures")) { + var error = $root.google.protobuf.Struct.verify(message.customFeatures); + if (error) + return "customFeatures." + error; + } + if (message.comment != null && message.hasOwnProperty("comment")) + if (!$util.isString(message.comment)) + return "comment: string expected"; + return null; + }; + + /** + * Creates a TableEntity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.TableEntity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.TableEntity} TableEntity + */ + TableEntity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.TableEntity) + return object; + var message = new $root.google.cloud.clouddms.v1.TableEntity(); + if (object.columns) { + if (!Array.isArray(object.columns)) + throw TypeError(".google.cloud.clouddms.v1.TableEntity.columns: array expected"); + message.columns = []; + for (var i = 0; i < object.columns.length; ++i) { + if (typeof object.columns[i] !== "object") + throw TypeError(".google.cloud.clouddms.v1.TableEntity.columns: object expected"); + message.columns[i] = $root.google.cloud.clouddms.v1.ColumnEntity.fromObject(object.columns[i]); + } + } + if (object.constraints) { + if (!Array.isArray(object.constraints)) + throw TypeError(".google.cloud.clouddms.v1.TableEntity.constraints: array expected"); + message.constraints = []; + for (var i = 0; i < object.constraints.length; ++i) { + if (typeof object.constraints[i] !== "object") + throw TypeError(".google.cloud.clouddms.v1.TableEntity.constraints: object expected"); + message.constraints[i] = $root.google.cloud.clouddms.v1.ConstraintEntity.fromObject(object.constraints[i]); + } + } + if (object.indices) { + if (!Array.isArray(object.indices)) + throw TypeError(".google.cloud.clouddms.v1.TableEntity.indices: array expected"); + message.indices = []; + for (var i = 0; i < object.indices.length; ++i) { + if (typeof object.indices[i] !== "object") + throw TypeError(".google.cloud.clouddms.v1.TableEntity.indices: object expected"); + message.indices[i] = $root.google.cloud.clouddms.v1.IndexEntity.fromObject(object.indices[i]); + } + } + if (object.triggers) { + if (!Array.isArray(object.triggers)) + throw TypeError(".google.cloud.clouddms.v1.TableEntity.triggers: array expected"); + message.triggers = []; + for (var i = 0; i < object.triggers.length; ++i) { + if (typeof object.triggers[i] !== "object") + throw TypeError(".google.cloud.clouddms.v1.TableEntity.triggers: object expected"); + message.triggers[i] = $root.google.cloud.clouddms.v1.TriggerEntity.fromObject(object.triggers[i]); + } + } + if (object.customFeatures != null) { + if (typeof object.customFeatures !== "object") + throw TypeError(".google.cloud.clouddms.v1.TableEntity.customFeatures: object expected"); + message.customFeatures = $root.google.protobuf.Struct.fromObject(object.customFeatures); + } + if (object.comment != null) + message.comment = String(object.comment); + return message; + }; + + /** + * Creates a plain object from a TableEntity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.TableEntity + * @static + * @param {google.cloud.clouddms.v1.TableEntity} message TableEntity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TableEntity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.columns = []; + object.constraints = []; + object.indices = []; + object.triggers = []; + } + if (options.defaults) { + object.customFeatures = null; + object.comment = ""; + } + if (message.columns && message.columns.length) { + object.columns = []; + for (var j = 0; j < message.columns.length; ++j) + object.columns[j] = $root.google.cloud.clouddms.v1.ColumnEntity.toObject(message.columns[j], options); + } + if (message.constraints && message.constraints.length) { + object.constraints = []; + for (var j = 0; j < message.constraints.length; ++j) + object.constraints[j] = $root.google.cloud.clouddms.v1.ConstraintEntity.toObject(message.constraints[j], options); + } + if (message.indices && message.indices.length) { + object.indices = []; + for (var j = 0; j < message.indices.length; ++j) + object.indices[j] = $root.google.cloud.clouddms.v1.IndexEntity.toObject(message.indices[j], options); + } + if (message.triggers && message.triggers.length) { + object.triggers = []; + for (var j = 0; j < message.triggers.length; ++j) + object.triggers[j] = $root.google.cloud.clouddms.v1.TriggerEntity.toObject(message.triggers[j], options); + } + if (message.customFeatures != null && message.hasOwnProperty("customFeatures")) + object.customFeatures = $root.google.protobuf.Struct.toObject(message.customFeatures, options); + if (message.comment != null && message.hasOwnProperty("comment")) + object.comment = message.comment; + return object; + }; + + /** + * Converts this TableEntity to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.TableEntity + * @instance + * @returns {Object.} JSON object + */ + TableEntity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TableEntity + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.TableEntity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TableEntity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.TableEntity"; + }; + + return TableEntity; + })(); + + v1.ColumnEntity = (function() { + + /** + * Properties of a ColumnEntity. + * @memberof google.cloud.clouddms.v1 + * @interface IColumnEntity + * @property {string|null} [name] ColumnEntity name + * @property {string|null} [dataType] ColumnEntity dataType + * @property {string|null} [charset] ColumnEntity charset + * @property {string|null} [collation] ColumnEntity collation + * @property {number|Long|null} [length] ColumnEntity length + * @property {number|null} [precision] ColumnEntity precision + * @property {number|null} [scale] ColumnEntity scale + * @property {number|null} [fractionalSecondsPrecision] ColumnEntity fractionalSecondsPrecision + * @property {boolean|null} [array] ColumnEntity array + * @property {number|null} [arrayLength] ColumnEntity arrayLength + * @property {boolean|null} [nullable] ColumnEntity nullable + * @property {boolean|null} [autoGenerated] ColumnEntity autoGenerated + * @property {boolean|null} [udt] ColumnEntity udt + * @property {google.protobuf.IStruct|null} [customFeatures] ColumnEntity customFeatures + * @property {Array.|null} [setValues] ColumnEntity setValues + * @property {string|null} [comment] ColumnEntity comment + * @property {number|null} [ordinalPosition] ColumnEntity ordinalPosition + * @property {string|null} [defaultValue] ColumnEntity defaultValue + */ + + /** + * Constructs a new ColumnEntity. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a ColumnEntity. + * @implements IColumnEntity + * @constructor + * @param {google.cloud.clouddms.v1.IColumnEntity=} [properties] Properties to set + */ + function ColumnEntity(properties) { + this.setValues = []; + 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]]; + } + + /** + * ColumnEntity name. + * @member {string} name + * @memberof google.cloud.clouddms.v1.ColumnEntity + * @instance + */ + ColumnEntity.prototype.name = ""; + + /** + * ColumnEntity dataType. + * @member {string} dataType + * @memberof google.cloud.clouddms.v1.ColumnEntity + * @instance + */ + ColumnEntity.prototype.dataType = ""; + + /** + * ColumnEntity charset. + * @member {string} charset + * @memberof google.cloud.clouddms.v1.ColumnEntity + * @instance + */ + ColumnEntity.prototype.charset = ""; + + /** + * ColumnEntity collation. + * @member {string} collation + * @memberof google.cloud.clouddms.v1.ColumnEntity + * @instance + */ + ColumnEntity.prototype.collation = ""; + + /** + * ColumnEntity length. + * @member {number|Long} length + * @memberof google.cloud.clouddms.v1.ColumnEntity + * @instance + */ + ColumnEntity.prototype.length = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ColumnEntity precision. + * @member {number} precision + * @memberof google.cloud.clouddms.v1.ColumnEntity + * @instance + */ + ColumnEntity.prototype.precision = 0; + + /** + * ColumnEntity scale. + * @member {number} scale + * @memberof google.cloud.clouddms.v1.ColumnEntity + * @instance + */ + ColumnEntity.prototype.scale = 0; + + /** + * ColumnEntity fractionalSecondsPrecision. + * @member {number} fractionalSecondsPrecision + * @memberof google.cloud.clouddms.v1.ColumnEntity + * @instance + */ + ColumnEntity.prototype.fractionalSecondsPrecision = 0; + + /** + * ColumnEntity array. + * @member {boolean} array + * @memberof google.cloud.clouddms.v1.ColumnEntity + * @instance + */ + ColumnEntity.prototype.array = false; + + /** + * ColumnEntity arrayLength. + * @member {number} arrayLength + * @memberof google.cloud.clouddms.v1.ColumnEntity + * @instance + */ + ColumnEntity.prototype.arrayLength = 0; + + /** + * ColumnEntity nullable. + * @member {boolean} nullable + * @memberof google.cloud.clouddms.v1.ColumnEntity + * @instance + */ + ColumnEntity.prototype.nullable = false; + + /** + * ColumnEntity autoGenerated. + * @member {boolean} autoGenerated + * @memberof google.cloud.clouddms.v1.ColumnEntity + * @instance + */ + ColumnEntity.prototype.autoGenerated = false; + + /** + * ColumnEntity udt. + * @member {boolean} udt + * @memberof google.cloud.clouddms.v1.ColumnEntity + * @instance + */ + ColumnEntity.prototype.udt = false; + + /** + * ColumnEntity customFeatures. + * @member {google.protobuf.IStruct|null|undefined} customFeatures + * @memberof google.cloud.clouddms.v1.ColumnEntity + * @instance + */ + ColumnEntity.prototype.customFeatures = null; + + /** + * ColumnEntity setValues. + * @member {Array.} setValues + * @memberof google.cloud.clouddms.v1.ColumnEntity + * @instance + */ + ColumnEntity.prototype.setValues = $util.emptyArray; + + /** + * ColumnEntity comment. + * @member {string} comment + * @memberof google.cloud.clouddms.v1.ColumnEntity + * @instance + */ + ColumnEntity.prototype.comment = ""; + + /** + * ColumnEntity ordinalPosition. + * @member {number} ordinalPosition + * @memberof google.cloud.clouddms.v1.ColumnEntity + * @instance + */ + ColumnEntity.prototype.ordinalPosition = 0; + + /** + * ColumnEntity defaultValue. + * @member {string} defaultValue + * @memberof google.cloud.clouddms.v1.ColumnEntity + * @instance + */ + ColumnEntity.prototype.defaultValue = ""; + + /** + * Creates a new ColumnEntity instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.ColumnEntity + * @static + * @param {google.cloud.clouddms.v1.IColumnEntity=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.ColumnEntity} ColumnEntity instance + */ + ColumnEntity.create = function create(properties) { + return new ColumnEntity(properties); + }; + + /** + * Encodes the specified ColumnEntity message. Does not implicitly {@link google.cloud.clouddms.v1.ColumnEntity.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.ColumnEntity + * @static + * @param {google.cloud.clouddms.v1.IColumnEntity} message ColumnEntity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ColumnEntity.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.dataType != null && Object.hasOwnProperty.call(message, "dataType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataType); + if (message.charset != null && Object.hasOwnProperty.call(message, "charset")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.charset); + if (message.collation != null && Object.hasOwnProperty.call(message, "collation")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.collation); + if (message.length != null && Object.hasOwnProperty.call(message, "length")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.length); + if (message.precision != null && Object.hasOwnProperty.call(message, "precision")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.precision); + if (message.scale != null && Object.hasOwnProperty.call(message, "scale")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.scale); + if (message.fractionalSecondsPrecision != null && Object.hasOwnProperty.call(message, "fractionalSecondsPrecision")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.fractionalSecondsPrecision); + if (message.array != null && Object.hasOwnProperty.call(message, "array")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.array); + if (message.arrayLength != null && Object.hasOwnProperty.call(message, "arrayLength")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.arrayLength); + if (message.nullable != null && Object.hasOwnProperty.call(message, "nullable")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.nullable); + if (message.autoGenerated != null && Object.hasOwnProperty.call(message, "autoGenerated")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.autoGenerated); + if (message.udt != null && Object.hasOwnProperty.call(message, "udt")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.udt); + if (message.customFeatures != null && Object.hasOwnProperty.call(message, "customFeatures")) + $root.google.protobuf.Struct.encode(message.customFeatures, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.setValues != null && message.setValues.length) + for (var i = 0; i < message.setValues.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.setValues[i]); + if (message.comment != null && Object.hasOwnProperty.call(message, "comment")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.comment); + if (message.ordinalPosition != null && Object.hasOwnProperty.call(message, "ordinalPosition")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.ordinalPosition); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.defaultValue); + return writer; + }; + + /** + * Encodes the specified ColumnEntity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ColumnEntity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.ColumnEntity + * @static + * @param {google.cloud.clouddms.v1.IColumnEntity} message ColumnEntity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ColumnEntity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ColumnEntity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.ColumnEntity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.ColumnEntity} ColumnEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ColumnEntity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.ColumnEntity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.dataType = reader.string(); + break; + } + case 3: { + message.charset = reader.string(); + break; + } + case 4: { + message.collation = reader.string(); + break; + } + case 5: { + message.length = reader.int64(); + break; + } + case 6: { + message.precision = reader.int32(); + break; + } + case 7: { + message.scale = reader.int32(); + break; + } + case 8: { + message.fractionalSecondsPrecision = reader.int32(); + break; + } + case 9: { + message.array = reader.bool(); + break; + } + case 10: { + message.arrayLength = reader.int32(); + break; + } + case 11: { + message.nullable = reader.bool(); + break; + } + case 12: { + message.autoGenerated = reader.bool(); + break; + } + case 13: { + message.udt = reader.bool(); + break; + } + case 14: { + message.customFeatures = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 15: { + if (!(message.setValues && message.setValues.length)) + message.setValues = []; + message.setValues.push(reader.string()); + break; + } + case 16: { + message.comment = reader.string(); + break; + } + case 17: { + message.ordinalPosition = reader.int32(); + break; + } + case 18: { + message.defaultValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ColumnEntity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.ColumnEntity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.ColumnEntity} ColumnEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ColumnEntity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ColumnEntity message. + * @function verify + * @memberof google.cloud.clouddms.v1.ColumnEntity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ColumnEntity.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.dataType != null && message.hasOwnProperty("dataType")) + if (!$util.isString(message.dataType)) + return "dataType: string expected"; + if (message.charset != null && message.hasOwnProperty("charset")) + if (!$util.isString(message.charset)) + return "charset: string expected"; + if (message.collation != null && message.hasOwnProperty("collation")) + if (!$util.isString(message.collation)) + return "collation: string expected"; + if (message.length != null && message.hasOwnProperty("length")) + if (!$util.isInteger(message.length) && !(message.length && $util.isInteger(message.length.low) && $util.isInteger(message.length.high))) + return "length: integer|Long expected"; + if (message.precision != null && message.hasOwnProperty("precision")) + if (!$util.isInteger(message.precision)) + return "precision: integer expected"; + if (message.scale != null && message.hasOwnProperty("scale")) + if (!$util.isInteger(message.scale)) + return "scale: integer expected"; + if (message.fractionalSecondsPrecision != null && message.hasOwnProperty("fractionalSecondsPrecision")) + if (!$util.isInteger(message.fractionalSecondsPrecision)) + return "fractionalSecondsPrecision: integer expected"; + if (message.array != null && message.hasOwnProperty("array")) + if (typeof message.array !== "boolean") + return "array: boolean expected"; + if (message.arrayLength != null && message.hasOwnProperty("arrayLength")) + if (!$util.isInteger(message.arrayLength)) + return "arrayLength: integer expected"; + if (message.nullable != null && message.hasOwnProperty("nullable")) + if (typeof message.nullable !== "boolean") + return "nullable: boolean expected"; + if (message.autoGenerated != null && message.hasOwnProperty("autoGenerated")) + if (typeof message.autoGenerated !== "boolean") + return "autoGenerated: boolean expected"; + if (message.udt != null && message.hasOwnProperty("udt")) + if (typeof message.udt !== "boolean") + return "udt: boolean expected"; + if (message.customFeatures != null && message.hasOwnProperty("customFeatures")) { + var error = $root.google.protobuf.Struct.verify(message.customFeatures); + if (error) + return "customFeatures." + error; + } + if (message.setValues != null && message.hasOwnProperty("setValues")) { + if (!Array.isArray(message.setValues)) + return "setValues: array expected"; + for (var i = 0; i < message.setValues.length; ++i) + if (!$util.isString(message.setValues[i])) + return "setValues: string[] expected"; + } + if (message.comment != null && message.hasOwnProperty("comment")) + if (!$util.isString(message.comment)) + return "comment: string expected"; + if (message.ordinalPosition != null && message.hasOwnProperty("ordinalPosition")) + if (!$util.isInteger(message.ordinalPosition)) + return "ordinalPosition: integer expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + return null; + }; + + /** + * Creates a ColumnEntity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.ColumnEntity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.ColumnEntity} ColumnEntity + */ + ColumnEntity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.ColumnEntity) + return object; + var message = new $root.google.cloud.clouddms.v1.ColumnEntity(); + if (object.name != null) + message.name = String(object.name); + if (object.dataType != null) + message.dataType = String(object.dataType); + if (object.charset != null) + message.charset = String(object.charset); + if (object.collation != null) + message.collation = String(object.collation); + if (object.length != null) + if ($util.Long) + (message.length = $util.Long.fromValue(object.length)).unsigned = false; + else if (typeof object.length === "string") + message.length = parseInt(object.length, 10); + else if (typeof object.length === "number") + message.length = object.length; + else if (typeof object.length === "object") + message.length = new $util.LongBits(object.length.low >>> 0, object.length.high >>> 0).toNumber(); + if (object.precision != null) + message.precision = object.precision | 0; + if (object.scale != null) + message.scale = object.scale | 0; + if (object.fractionalSecondsPrecision != null) + message.fractionalSecondsPrecision = object.fractionalSecondsPrecision | 0; + if (object.array != null) + message.array = Boolean(object.array); + if (object.arrayLength != null) + message.arrayLength = object.arrayLength | 0; + if (object.nullable != null) + message.nullable = Boolean(object.nullable); + if (object.autoGenerated != null) + message.autoGenerated = Boolean(object.autoGenerated); + if (object.udt != null) + message.udt = Boolean(object.udt); + if (object.customFeatures != null) { + if (typeof object.customFeatures !== "object") + throw TypeError(".google.cloud.clouddms.v1.ColumnEntity.customFeatures: object expected"); + message.customFeatures = $root.google.protobuf.Struct.fromObject(object.customFeatures); + } + if (object.setValues) { + if (!Array.isArray(object.setValues)) + throw TypeError(".google.cloud.clouddms.v1.ColumnEntity.setValues: array expected"); + message.setValues = []; + for (var i = 0; i < object.setValues.length; ++i) + message.setValues[i] = String(object.setValues[i]); + } + if (object.comment != null) + message.comment = String(object.comment); + if (object.ordinalPosition != null) + message.ordinalPosition = object.ordinalPosition | 0; + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + return message; + }; + + /** + * Creates a plain object from a ColumnEntity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.ColumnEntity + * @static + * @param {google.cloud.clouddms.v1.ColumnEntity} message ColumnEntity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ColumnEntity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.setValues = []; + if (options.defaults) { + object.name = ""; + object.dataType = ""; + object.charset = ""; + object.collation = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.length = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.length = options.longs === String ? "0" : 0; + object.precision = 0; + object.scale = 0; + object.fractionalSecondsPrecision = 0; + object.array = false; + object.arrayLength = 0; + object.nullable = false; + object.autoGenerated = false; + object.udt = false; + object.customFeatures = null; + object.comment = ""; + object.ordinalPosition = 0; + object.defaultValue = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.dataType != null && message.hasOwnProperty("dataType")) + object.dataType = message.dataType; + if (message.charset != null && message.hasOwnProperty("charset")) + object.charset = message.charset; + if (message.collation != null && message.hasOwnProperty("collation")) + object.collation = message.collation; + if (message.length != null && message.hasOwnProperty("length")) + if (typeof message.length === "number") + object.length = options.longs === String ? String(message.length) : message.length; + else + object.length = options.longs === String ? $util.Long.prototype.toString.call(message.length) : options.longs === Number ? new $util.LongBits(message.length.low >>> 0, message.length.high >>> 0).toNumber() : message.length; + if (message.precision != null && message.hasOwnProperty("precision")) + object.precision = message.precision; + if (message.scale != null && message.hasOwnProperty("scale")) + object.scale = message.scale; + if (message.fractionalSecondsPrecision != null && message.hasOwnProperty("fractionalSecondsPrecision")) + object.fractionalSecondsPrecision = message.fractionalSecondsPrecision; + if (message.array != null && message.hasOwnProperty("array")) + object.array = message.array; + if (message.arrayLength != null && message.hasOwnProperty("arrayLength")) + object.arrayLength = message.arrayLength; + if (message.nullable != null && message.hasOwnProperty("nullable")) + object.nullable = message.nullable; + if (message.autoGenerated != null && message.hasOwnProperty("autoGenerated")) + object.autoGenerated = message.autoGenerated; + if (message.udt != null && message.hasOwnProperty("udt")) + object.udt = message.udt; + if (message.customFeatures != null && message.hasOwnProperty("customFeatures")) + object.customFeatures = $root.google.protobuf.Struct.toObject(message.customFeatures, options); + if (message.setValues && message.setValues.length) { + object.setValues = []; + for (var j = 0; j < message.setValues.length; ++j) + object.setValues[j] = message.setValues[j]; + } + if (message.comment != null && message.hasOwnProperty("comment")) + object.comment = message.comment; + if (message.ordinalPosition != null && message.hasOwnProperty("ordinalPosition")) + object.ordinalPosition = message.ordinalPosition; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + return object; + }; + + /** + * Converts this ColumnEntity to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.ColumnEntity + * @instance + * @returns {Object.} JSON object + */ + ColumnEntity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ColumnEntity + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.ColumnEntity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ColumnEntity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.ColumnEntity"; + }; + + return ColumnEntity; + })(); + + v1.ConstraintEntity = (function() { + + /** + * Properties of a ConstraintEntity. + * @memberof google.cloud.clouddms.v1 + * @interface IConstraintEntity + * @property {string|null} [name] ConstraintEntity name + * @property {string|null} [type] ConstraintEntity type + * @property {Array.|null} [tableColumns] ConstraintEntity tableColumns + * @property {google.protobuf.IStruct|null} [customFeatures] ConstraintEntity customFeatures + * @property {Array.|null} [referenceColumns] ConstraintEntity referenceColumns + * @property {string|null} [referenceTable] ConstraintEntity referenceTable + * @property {string|null} [tableName] ConstraintEntity tableName + */ + + /** + * Constructs a new ConstraintEntity. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a ConstraintEntity. + * @implements IConstraintEntity + * @constructor + * @param {google.cloud.clouddms.v1.IConstraintEntity=} [properties] Properties to set + */ + function ConstraintEntity(properties) { + this.tableColumns = []; + this.referenceColumns = []; + 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]]; + } + + /** + * ConstraintEntity name. + * @member {string} name + * @memberof google.cloud.clouddms.v1.ConstraintEntity + * @instance + */ + ConstraintEntity.prototype.name = ""; + + /** + * ConstraintEntity type. + * @member {string} type + * @memberof google.cloud.clouddms.v1.ConstraintEntity + * @instance + */ + ConstraintEntity.prototype.type = ""; + + /** + * ConstraintEntity tableColumns. + * @member {Array.} tableColumns + * @memberof google.cloud.clouddms.v1.ConstraintEntity + * @instance + */ + ConstraintEntity.prototype.tableColumns = $util.emptyArray; + + /** + * ConstraintEntity customFeatures. + * @member {google.protobuf.IStruct|null|undefined} customFeatures + * @memberof google.cloud.clouddms.v1.ConstraintEntity + * @instance + */ + ConstraintEntity.prototype.customFeatures = null; + + /** + * ConstraintEntity referenceColumns. + * @member {Array.} referenceColumns + * @memberof google.cloud.clouddms.v1.ConstraintEntity + * @instance + */ + ConstraintEntity.prototype.referenceColumns = $util.emptyArray; + + /** + * ConstraintEntity referenceTable. + * @member {string} referenceTable + * @memberof google.cloud.clouddms.v1.ConstraintEntity + * @instance + */ + ConstraintEntity.prototype.referenceTable = ""; + + /** + * ConstraintEntity tableName. + * @member {string} tableName + * @memberof google.cloud.clouddms.v1.ConstraintEntity + * @instance + */ + ConstraintEntity.prototype.tableName = ""; + + /** + * Creates a new ConstraintEntity instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.ConstraintEntity + * @static + * @param {google.cloud.clouddms.v1.IConstraintEntity=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.ConstraintEntity} ConstraintEntity instance + */ + ConstraintEntity.create = function create(properties) { + return new ConstraintEntity(properties); + }; + + /** + * Encodes the specified ConstraintEntity message. Does not implicitly {@link google.cloud.clouddms.v1.ConstraintEntity.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.ConstraintEntity + * @static + * @param {google.cloud.clouddms.v1.IConstraintEntity} message ConstraintEntity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConstraintEntity.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.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.type); + if (message.tableColumns != null && message.tableColumns.length) + for (var i = 0; i < message.tableColumns.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tableColumns[i]); + if (message.customFeatures != null && Object.hasOwnProperty.call(message, "customFeatures")) + $root.google.protobuf.Struct.encode(message.customFeatures, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.referenceColumns != null && message.referenceColumns.length) + for (var i = 0; i < message.referenceColumns.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.referenceColumns[i]); + if (message.referenceTable != null && Object.hasOwnProperty.call(message, "referenceTable")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.referenceTable); + if (message.tableName != null && Object.hasOwnProperty.call(message, "tableName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.tableName); + return writer; + }; + + /** + * Encodes the specified ConstraintEntity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ConstraintEntity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.ConstraintEntity + * @static + * @param {google.cloud.clouddms.v1.IConstraintEntity} message ConstraintEntity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConstraintEntity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConstraintEntity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.ConstraintEntity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.ConstraintEntity} ConstraintEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConstraintEntity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.ConstraintEntity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.type = reader.string(); + break; + } + case 3: { + if (!(message.tableColumns && message.tableColumns.length)) + message.tableColumns = []; + message.tableColumns.push(reader.string()); + break; + } + case 4: { + message.customFeatures = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 5: { + if (!(message.referenceColumns && message.referenceColumns.length)) + message.referenceColumns = []; + message.referenceColumns.push(reader.string()); + break; + } + case 6: { + message.referenceTable = reader.string(); + break; + } + case 7: { + message.tableName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConstraintEntity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.ConstraintEntity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.ConstraintEntity} ConstraintEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConstraintEntity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConstraintEntity message. + * @function verify + * @memberof google.cloud.clouddms.v1.ConstraintEntity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConstraintEntity.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.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.tableColumns != null && message.hasOwnProperty("tableColumns")) { + if (!Array.isArray(message.tableColumns)) + return "tableColumns: array expected"; + for (var i = 0; i < message.tableColumns.length; ++i) + if (!$util.isString(message.tableColumns[i])) + return "tableColumns: string[] expected"; + } + if (message.customFeatures != null && message.hasOwnProperty("customFeatures")) { + var error = $root.google.protobuf.Struct.verify(message.customFeatures); + if (error) + return "customFeatures." + error; + } + if (message.referenceColumns != null && message.hasOwnProperty("referenceColumns")) { + if (!Array.isArray(message.referenceColumns)) + return "referenceColumns: array expected"; + for (var i = 0; i < message.referenceColumns.length; ++i) + if (!$util.isString(message.referenceColumns[i])) + return "referenceColumns: string[] expected"; + } + if (message.referenceTable != null && message.hasOwnProperty("referenceTable")) + if (!$util.isString(message.referenceTable)) + return "referenceTable: string expected"; + if (message.tableName != null && message.hasOwnProperty("tableName")) + if (!$util.isString(message.tableName)) + return "tableName: string expected"; + return null; + }; + + /** + * Creates a ConstraintEntity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.ConstraintEntity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.ConstraintEntity} ConstraintEntity + */ + ConstraintEntity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.ConstraintEntity) + return object; + var message = new $root.google.cloud.clouddms.v1.ConstraintEntity(); + if (object.name != null) + message.name = String(object.name); + if (object.type != null) + message.type = String(object.type); + if (object.tableColumns) { + if (!Array.isArray(object.tableColumns)) + throw TypeError(".google.cloud.clouddms.v1.ConstraintEntity.tableColumns: array expected"); + message.tableColumns = []; + for (var i = 0; i < object.tableColumns.length; ++i) + message.tableColumns[i] = String(object.tableColumns[i]); + } + if (object.customFeatures != null) { + if (typeof object.customFeatures !== "object") + throw TypeError(".google.cloud.clouddms.v1.ConstraintEntity.customFeatures: object expected"); + message.customFeatures = $root.google.protobuf.Struct.fromObject(object.customFeatures); + } + if (object.referenceColumns) { + if (!Array.isArray(object.referenceColumns)) + throw TypeError(".google.cloud.clouddms.v1.ConstraintEntity.referenceColumns: array expected"); + message.referenceColumns = []; + for (var i = 0; i < object.referenceColumns.length; ++i) + message.referenceColumns[i] = String(object.referenceColumns[i]); + } + if (object.referenceTable != null) + message.referenceTable = String(object.referenceTable); + if (object.tableName != null) + message.tableName = String(object.tableName); + return message; + }; + + /** + * Creates a plain object from a ConstraintEntity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.ConstraintEntity + * @static + * @param {google.cloud.clouddms.v1.ConstraintEntity} message ConstraintEntity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConstraintEntity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.tableColumns = []; + object.referenceColumns = []; + } + if (options.defaults) { + object.name = ""; + object.type = ""; + object.customFeatures = null; + object.referenceTable = ""; + object.tableName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.tableColumns && message.tableColumns.length) { + object.tableColumns = []; + for (var j = 0; j < message.tableColumns.length; ++j) + object.tableColumns[j] = message.tableColumns[j]; + } + if (message.customFeatures != null && message.hasOwnProperty("customFeatures")) + object.customFeatures = $root.google.protobuf.Struct.toObject(message.customFeatures, options); + if (message.referenceColumns && message.referenceColumns.length) { + object.referenceColumns = []; + for (var j = 0; j < message.referenceColumns.length; ++j) + object.referenceColumns[j] = message.referenceColumns[j]; + } + if (message.referenceTable != null && message.hasOwnProperty("referenceTable")) + object.referenceTable = message.referenceTable; + if (message.tableName != null && message.hasOwnProperty("tableName")) + object.tableName = message.tableName; + return object; + }; + + /** + * Converts this ConstraintEntity to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.ConstraintEntity + * @instance + * @returns {Object.} JSON object + */ + ConstraintEntity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConstraintEntity + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.ConstraintEntity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConstraintEntity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.ConstraintEntity"; + }; + + return ConstraintEntity; + })(); + + v1.IndexEntity = (function() { + + /** + * Properties of an IndexEntity. + * @memberof google.cloud.clouddms.v1 + * @interface IIndexEntity + * @property {string|null} [name] IndexEntity name + * @property {string|null} [type] IndexEntity type + * @property {Array.|null} [tableColumns] IndexEntity tableColumns + * @property {boolean|null} [unique] IndexEntity unique + * @property {google.protobuf.IStruct|null} [customFeatures] IndexEntity customFeatures + */ + + /** + * Constructs a new IndexEntity. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents an IndexEntity. + * @implements IIndexEntity + * @constructor + * @param {google.cloud.clouddms.v1.IIndexEntity=} [properties] Properties to set + */ + function IndexEntity(properties) { + this.tableColumns = []; + 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]]; + } + + /** + * IndexEntity name. + * @member {string} name + * @memberof google.cloud.clouddms.v1.IndexEntity + * @instance + */ + IndexEntity.prototype.name = ""; + + /** + * IndexEntity type. + * @member {string} type + * @memberof google.cloud.clouddms.v1.IndexEntity + * @instance + */ + IndexEntity.prototype.type = ""; + + /** + * IndexEntity tableColumns. + * @member {Array.} tableColumns + * @memberof google.cloud.clouddms.v1.IndexEntity + * @instance + */ + IndexEntity.prototype.tableColumns = $util.emptyArray; + + /** + * IndexEntity unique. + * @member {boolean} unique + * @memberof google.cloud.clouddms.v1.IndexEntity + * @instance + */ + IndexEntity.prototype.unique = false; + + /** + * IndexEntity customFeatures. + * @member {google.protobuf.IStruct|null|undefined} customFeatures + * @memberof google.cloud.clouddms.v1.IndexEntity + * @instance + */ + IndexEntity.prototype.customFeatures = null; + + /** + * Creates a new IndexEntity instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.IndexEntity + * @static + * @param {google.cloud.clouddms.v1.IIndexEntity=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.IndexEntity} IndexEntity instance + */ + IndexEntity.create = function create(properties) { + return new IndexEntity(properties); + }; + + /** + * Encodes the specified IndexEntity message. Does not implicitly {@link google.cloud.clouddms.v1.IndexEntity.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.IndexEntity + * @static + * @param {google.cloud.clouddms.v1.IIndexEntity} message IndexEntity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IndexEntity.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.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.type); + if (message.tableColumns != null && message.tableColumns.length) + for (var i = 0; i < message.tableColumns.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tableColumns[i]); + if (message.unique != null && Object.hasOwnProperty.call(message, "unique")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.unique); + if (message.customFeatures != null && Object.hasOwnProperty.call(message, "customFeatures")) + $root.google.protobuf.Struct.encode(message.customFeatures, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified IndexEntity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.IndexEntity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.IndexEntity + * @static + * @param {google.cloud.clouddms.v1.IIndexEntity} message IndexEntity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IndexEntity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IndexEntity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.IndexEntity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.IndexEntity} IndexEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IndexEntity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.IndexEntity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.type = reader.string(); + break; + } + case 3: { + if (!(message.tableColumns && message.tableColumns.length)) + message.tableColumns = []; + message.tableColumns.push(reader.string()); + break; + } + case 4: { + message.unique = reader.bool(); + break; + } + case 5: { + message.customFeatures = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IndexEntity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.IndexEntity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.IndexEntity} IndexEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IndexEntity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IndexEntity message. + * @function verify + * @memberof google.cloud.clouddms.v1.IndexEntity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IndexEntity.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.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.tableColumns != null && message.hasOwnProperty("tableColumns")) { + if (!Array.isArray(message.tableColumns)) + return "tableColumns: array expected"; + for (var i = 0; i < message.tableColumns.length; ++i) + if (!$util.isString(message.tableColumns[i])) + return "tableColumns: string[] expected"; + } + if (message.unique != null && message.hasOwnProperty("unique")) + if (typeof message.unique !== "boolean") + return "unique: boolean expected"; + if (message.customFeatures != null && message.hasOwnProperty("customFeatures")) { + var error = $root.google.protobuf.Struct.verify(message.customFeatures); + if (error) + return "customFeatures." + error; + } + return null; + }; + + /** + * Creates an IndexEntity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.IndexEntity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.IndexEntity} IndexEntity + */ + IndexEntity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.IndexEntity) + return object; + var message = new $root.google.cloud.clouddms.v1.IndexEntity(); + if (object.name != null) + message.name = String(object.name); + if (object.type != null) + message.type = String(object.type); + if (object.tableColumns) { + if (!Array.isArray(object.tableColumns)) + throw TypeError(".google.cloud.clouddms.v1.IndexEntity.tableColumns: array expected"); + message.tableColumns = []; + for (var i = 0; i < object.tableColumns.length; ++i) + message.tableColumns[i] = String(object.tableColumns[i]); + } + if (object.unique != null) + message.unique = Boolean(object.unique); + if (object.customFeatures != null) { + if (typeof object.customFeatures !== "object") + throw TypeError(".google.cloud.clouddms.v1.IndexEntity.customFeatures: object expected"); + message.customFeatures = $root.google.protobuf.Struct.fromObject(object.customFeatures); + } + return message; + }; + + /** + * Creates a plain object from an IndexEntity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.IndexEntity + * @static + * @param {google.cloud.clouddms.v1.IndexEntity} message IndexEntity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IndexEntity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.tableColumns = []; + if (options.defaults) { + object.name = ""; + object.type = ""; + object.unique = false; + object.customFeatures = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.tableColumns && message.tableColumns.length) { + object.tableColumns = []; + for (var j = 0; j < message.tableColumns.length; ++j) + object.tableColumns[j] = message.tableColumns[j]; + } + if (message.unique != null && message.hasOwnProperty("unique")) + object.unique = message.unique; + if (message.customFeatures != null && message.hasOwnProperty("customFeatures")) + object.customFeatures = $root.google.protobuf.Struct.toObject(message.customFeatures, options); + return object; + }; + + /** + * Converts this IndexEntity to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.IndexEntity + * @instance + * @returns {Object.} JSON object + */ + IndexEntity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IndexEntity + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.IndexEntity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IndexEntity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.IndexEntity"; + }; + + return IndexEntity; + })(); + + v1.TriggerEntity = (function() { + + /** + * Properties of a TriggerEntity. + * @memberof google.cloud.clouddms.v1 + * @interface ITriggerEntity + * @property {string|null} [name] TriggerEntity name + * @property {Array.|null} [triggeringEvents] TriggerEntity triggeringEvents + * @property {string|null} [triggerType] TriggerEntity triggerType + * @property {string|null} [sqlCode] TriggerEntity sqlCode + * @property {google.protobuf.IStruct|null} [customFeatures] TriggerEntity customFeatures + */ + + /** + * Constructs a new TriggerEntity. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a TriggerEntity. + * @implements ITriggerEntity + * @constructor + * @param {google.cloud.clouddms.v1.ITriggerEntity=} [properties] Properties to set + */ + function TriggerEntity(properties) { + this.triggeringEvents = []; + 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]]; + } + + /** + * TriggerEntity name. + * @member {string} name + * @memberof google.cloud.clouddms.v1.TriggerEntity + * @instance + */ + TriggerEntity.prototype.name = ""; + + /** + * TriggerEntity triggeringEvents. + * @member {Array.} triggeringEvents + * @memberof google.cloud.clouddms.v1.TriggerEntity + * @instance + */ + TriggerEntity.prototype.triggeringEvents = $util.emptyArray; + + /** + * TriggerEntity triggerType. + * @member {string} triggerType + * @memberof google.cloud.clouddms.v1.TriggerEntity + * @instance + */ + TriggerEntity.prototype.triggerType = ""; + + /** + * TriggerEntity sqlCode. + * @member {string} sqlCode + * @memberof google.cloud.clouddms.v1.TriggerEntity + * @instance + */ + TriggerEntity.prototype.sqlCode = ""; + + /** + * TriggerEntity customFeatures. + * @member {google.protobuf.IStruct|null|undefined} customFeatures + * @memberof google.cloud.clouddms.v1.TriggerEntity + * @instance + */ + TriggerEntity.prototype.customFeatures = null; + + /** + * Creates a new TriggerEntity instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.TriggerEntity + * @static + * @param {google.cloud.clouddms.v1.ITriggerEntity=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.TriggerEntity} TriggerEntity instance + */ + TriggerEntity.create = function create(properties) { + return new TriggerEntity(properties); + }; + + /** + * Encodes the specified TriggerEntity message. Does not implicitly {@link google.cloud.clouddms.v1.TriggerEntity.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.TriggerEntity + * @static + * @param {google.cloud.clouddms.v1.ITriggerEntity} message TriggerEntity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TriggerEntity.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.triggeringEvents != null && message.triggeringEvents.length) + for (var i = 0; i < message.triggeringEvents.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.triggeringEvents[i]); + if (message.triggerType != null && Object.hasOwnProperty.call(message, "triggerType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.triggerType); + if (message.sqlCode != null && Object.hasOwnProperty.call(message, "sqlCode")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.sqlCode); + if (message.customFeatures != null && Object.hasOwnProperty.call(message, "customFeatures")) + $root.google.protobuf.Struct.encode(message.customFeatures, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TriggerEntity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.TriggerEntity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.TriggerEntity + * @static + * @param {google.cloud.clouddms.v1.ITriggerEntity} message TriggerEntity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TriggerEntity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TriggerEntity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.TriggerEntity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.TriggerEntity} TriggerEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TriggerEntity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.TriggerEntity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.triggeringEvents && message.triggeringEvents.length)) + message.triggeringEvents = []; + message.triggeringEvents.push(reader.string()); + break; + } + case 3: { + message.triggerType = reader.string(); + break; + } + case 4: { + message.sqlCode = reader.string(); + break; + } + case 5: { + message.customFeatures = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TriggerEntity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.TriggerEntity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.TriggerEntity} TriggerEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TriggerEntity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TriggerEntity message. + * @function verify + * @memberof google.cloud.clouddms.v1.TriggerEntity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TriggerEntity.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.triggeringEvents != null && message.hasOwnProperty("triggeringEvents")) { + if (!Array.isArray(message.triggeringEvents)) + return "triggeringEvents: array expected"; + for (var i = 0; i < message.triggeringEvents.length; ++i) + if (!$util.isString(message.triggeringEvents[i])) + return "triggeringEvents: string[] expected"; + } + if (message.triggerType != null && message.hasOwnProperty("triggerType")) + if (!$util.isString(message.triggerType)) + return "triggerType: string expected"; + if (message.sqlCode != null && message.hasOwnProperty("sqlCode")) + if (!$util.isString(message.sqlCode)) + return "sqlCode: string expected"; + if (message.customFeatures != null && message.hasOwnProperty("customFeatures")) { + var error = $root.google.protobuf.Struct.verify(message.customFeatures); + if (error) + return "customFeatures." + error; + } + return null; + }; + + /** + * Creates a TriggerEntity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.TriggerEntity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.TriggerEntity} TriggerEntity + */ + TriggerEntity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.TriggerEntity) + return object; + var message = new $root.google.cloud.clouddms.v1.TriggerEntity(); + if (object.name != null) + message.name = String(object.name); + if (object.triggeringEvents) { + if (!Array.isArray(object.triggeringEvents)) + throw TypeError(".google.cloud.clouddms.v1.TriggerEntity.triggeringEvents: array expected"); + message.triggeringEvents = []; + for (var i = 0; i < object.triggeringEvents.length; ++i) + message.triggeringEvents[i] = String(object.triggeringEvents[i]); + } + if (object.triggerType != null) + message.triggerType = String(object.triggerType); + if (object.sqlCode != null) + message.sqlCode = String(object.sqlCode); + if (object.customFeatures != null) { + if (typeof object.customFeatures !== "object") + throw TypeError(".google.cloud.clouddms.v1.TriggerEntity.customFeatures: object expected"); + message.customFeatures = $root.google.protobuf.Struct.fromObject(object.customFeatures); + } + return message; + }; + + /** + * Creates a plain object from a TriggerEntity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.TriggerEntity + * @static + * @param {google.cloud.clouddms.v1.TriggerEntity} message TriggerEntity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TriggerEntity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.triggeringEvents = []; + if (options.defaults) { + object.name = ""; + object.triggerType = ""; + object.sqlCode = ""; + object.customFeatures = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.triggeringEvents && message.triggeringEvents.length) { + object.triggeringEvents = []; + for (var j = 0; j < message.triggeringEvents.length; ++j) + object.triggeringEvents[j] = message.triggeringEvents[j]; + } + if (message.triggerType != null && message.hasOwnProperty("triggerType")) + object.triggerType = message.triggerType; + if (message.sqlCode != null && message.hasOwnProperty("sqlCode")) + object.sqlCode = message.sqlCode; + if (message.customFeatures != null && message.hasOwnProperty("customFeatures")) + object.customFeatures = $root.google.protobuf.Struct.toObject(message.customFeatures, options); + return object; + }; + + /** + * Converts this TriggerEntity to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.TriggerEntity + * @instance + * @returns {Object.} JSON object + */ + TriggerEntity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TriggerEntity + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.TriggerEntity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TriggerEntity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.TriggerEntity"; + }; + + return TriggerEntity; + })(); + + v1.ViewEntity = (function() { + + /** + * Properties of a ViewEntity. + * @memberof google.cloud.clouddms.v1 + * @interface IViewEntity + * @property {string|null} [sqlCode] ViewEntity sqlCode + * @property {google.protobuf.IStruct|null} [customFeatures] ViewEntity customFeatures + * @property {Array.|null} [constraints] ViewEntity constraints + */ + + /** + * Constructs a new ViewEntity. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a ViewEntity. + * @implements IViewEntity + * @constructor + * @param {google.cloud.clouddms.v1.IViewEntity=} [properties] Properties to set + */ + function ViewEntity(properties) { + this.constraints = []; + 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]]; + } + + /** + * ViewEntity sqlCode. + * @member {string} sqlCode + * @memberof google.cloud.clouddms.v1.ViewEntity + * @instance + */ + ViewEntity.prototype.sqlCode = ""; + + /** + * ViewEntity customFeatures. + * @member {google.protobuf.IStruct|null|undefined} customFeatures + * @memberof google.cloud.clouddms.v1.ViewEntity + * @instance + */ + ViewEntity.prototype.customFeatures = null; + + /** + * ViewEntity constraints. + * @member {Array.} constraints + * @memberof google.cloud.clouddms.v1.ViewEntity + * @instance + */ + ViewEntity.prototype.constraints = $util.emptyArray; + + /** + * Creates a new ViewEntity instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.ViewEntity + * @static + * @param {google.cloud.clouddms.v1.IViewEntity=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.ViewEntity} ViewEntity instance + */ + ViewEntity.create = function create(properties) { + return new ViewEntity(properties); + }; + + /** + * Encodes the specified ViewEntity message. Does not implicitly {@link google.cloud.clouddms.v1.ViewEntity.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.ViewEntity + * @static + * @param {google.cloud.clouddms.v1.IViewEntity} message ViewEntity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ViewEntity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sqlCode != null && Object.hasOwnProperty.call(message, "sqlCode")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sqlCode); + if (message.customFeatures != null && Object.hasOwnProperty.call(message, "customFeatures")) + $root.google.protobuf.Struct.encode(message.customFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.constraints != null && message.constraints.length) + for (var i = 0; i < message.constraints.length; ++i) + $root.google.cloud.clouddms.v1.ConstraintEntity.encode(message.constraints[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ViewEntity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.ViewEntity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.ViewEntity + * @static + * @param {google.cloud.clouddms.v1.IViewEntity} message ViewEntity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ViewEntity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ViewEntity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.ViewEntity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.ViewEntity} ViewEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ViewEntity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.ViewEntity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sqlCode = reader.string(); + break; + } + case 2: { + message.customFeatures = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.constraints && message.constraints.length)) + message.constraints = []; + message.constraints.push($root.google.cloud.clouddms.v1.ConstraintEntity.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ViewEntity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.ViewEntity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.ViewEntity} ViewEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ViewEntity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ViewEntity message. + * @function verify + * @memberof google.cloud.clouddms.v1.ViewEntity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ViewEntity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sqlCode != null && message.hasOwnProperty("sqlCode")) + if (!$util.isString(message.sqlCode)) + return "sqlCode: string expected"; + if (message.customFeatures != null && message.hasOwnProperty("customFeatures")) { + var error = $root.google.protobuf.Struct.verify(message.customFeatures); + if (error) + return "customFeatures." + error; + } + if (message.constraints != null && message.hasOwnProperty("constraints")) { + if (!Array.isArray(message.constraints)) + return "constraints: array expected"; + for (var i = 0; i < message.constraints.length; ++i) { + var error = $root.google.cloud.clouddms.v1.ConstraintEntity.verify(message.constraints[i]); + if (error) + return "constraints." + error; + } + } + return null; + }; + + /** + * Creates a ViewEntity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.ViewEntity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.ViewEntity} ViewEntity + */ + ViewEntity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.ViewEntity) + return object; + var message = new $root.google.cloud.clouddms.v1.ViewEntity(); + if (object.sqlCode != null) + message.sqlCode = String(object.sqlCode); + if (object.customFeatures != null) { + if (typeof object.customFeatures !== "object") + throw TypeError(".google.cloud.clouddms.v1.ViewEntity.customFeatures: object expected"); + message.customFeatures = $root.google.protobuf.Struct.fromObject(object.customFeatures); + } + if (object.constraints) { + if (!Array.isArray(object.constraints)) + throw TypeError(".google.cloud.clouddms.v1.ViewEntity.constraints: array expected"); + message.constraints = []; + for (var i = 0; i < object.constraints.length; ++i) { + if (typeof object.constraints[i] !== "object") + throw TypeError(".google.cloud.clouddms.v1.ViewEntity.constraints: object expected"); + message.constraints[i] = $root.google.cloud.clouddms.v1.ConstraintEntity.fromObject(object.constraints[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ViewEntity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.ViewEntity + * @static + * @param {google.cloud.clouddms.v1.ViewEntity} message ViewEntity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ViewEntity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.constraints = []; + if (options.defaults) { + object.sqlCode = ""; + object.customFeatures = null; + } + if (message.sqlCode != null && message.hasOwnProperty("sqlCode")) + object.sqlCode = message.sqlCode; + if (message.customFeatures != null && message.hasOwnProperty("customFeatures")) + object.customFeatures = $root.google.protobuf.Struct.toObject(message.customFeatures, options); + if (message.constraints && message.constraints.length) { + object.constraints = []; + for (var j = 0; j < message.constraints.length; ++j) + object.constraints[j] = $root.google.cloud.clouddms.v1.ConstraintEntity.toObject(message.constraints[j], options); + } + return object; + }; + + /** + * Converts this ViewEntity to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.ViewEntity + * @instance + * @returns {Object.} JSON object + */ + ViewEntity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ViewEntity + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.ViewEntity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ViewEntity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.ViewEntity"; + }; + + return ViewEntity; + })(); + + v1.SequenceEntity = (function() { + + /** + * Properties of a SequenceEntity. + * @memberof google.cloud.clouddms.v1 + * @interface ISequenceEntity + * @property {number|Long|null} [increment] SequenceEntity increment + * @property {Uint8Array|null} [startValue] SequenceEntity startValue + * @property {Uint8Array|null} [maxValue] SequenceEntity maxValue + * @property {Uint8Array|null} [minValue] SequenceEntity minValue + * @property {boolean|null} [cycle] SequenceEntity cycle + * @property {number|Long|null} [cache] SequenceEntity cache + * @property {google.protobuf.IStruct|null} [customFeatures] SequenceEntity customFeatures + */ + + /** + * Constructs a new SequenceEntity. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a SequenceEntity. + * @implements ISequenceEntity + * @constructor + * @param {google.cloud.clouddms.v1.ISequenceEntity=} [properties] Properties to set + */ + function SequenceEntity(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]]; + } + + /** + * SequenceEntity increment. + * @member {number|Long} increment + * @memberof google.cloud.clouddms.v1.SequenceEntity + * @instance + */ + SequenceEntity.prototype.increment = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * SequenceEntity startValue. + * @member {Uint8Array} startValue + * @memberof google.cloud.clouddms.v1.SequenceEntity + * @instance + */ + SequenceEntity.prototype.startValue = $util.newBuffer([]); + + /** + * SequenceEntity maxValue. + * @member {Uint8Array} maxValue + * @memberof google.cloud.clouddms.v1.SequenceEntity + * @instance + */ + SequenceEntity.prototype.maxValue = $util.newBuffer([]); + + /** + * SequenceEntity minValue. + * @member {Uint8Array} minValue + * @memberof google.cloud.clouddms.v1.SequenceEntity + * @instance + */ + SequenceEntity.prototype.minValue = $util.newBuffer([]); + + /** + * SequenceEntity cycle. + * @member {boolean} cycle + * @memberof google.cloud.clouddms.v1.SequenceEntity + * @instance + */ + SequenceEntity.prototype.cycle = false; + + /** + * SequenceEntity cache. + * @member {number|Long} cache + * @memberof google.cloud.clouddms.v1.SequenceEntity + * @instance + */ + SequenceEntity.prototype.cache = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * SequenceEntity customFeatures. + * @member {google.protobuf.IStruct|null|undefined} customFeatures + * @memberof google.cloud.clouddms.v1.SequenceEntity + * @instance + */ + SequenceEntity.prototype.customFeatures = null; + + /** + * Creates a new SequenceEntity instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.SequenceEntity + * @static + * @param {google.cloud.clouddms.v1.ISequenceEntity=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.SequenceEntity} SequenceEntity instance + */ + SequenceEntity.create = function create(properties) { + return new SequenceEntity(properties); + }; + + /** + * Encodes the specified SequenceEntity message. Does not implicitly {@link google.cloud.clouddms.v1.SequenceEntity.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.SequenceEntity + * @static + * @param {google.cloud.clouddms.v1.ISequenceEntity} message SequenceEntity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SequenceEntity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.increment != null && Object.hasOwnProperty.call(message, "increment")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.increment); + if (message.startValue != null && Object.hasOwnProperty.call(message, "startValue")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.startValue); + if (message.maxValue != null && Object.hasOwnProperty.call(message, "maxValue")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.maxValue); + if (message.minValue != null && Object.hasOwnProperty.call(message, "minValue")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.minValue); + if (message.cycle != null && Object.hasOwnProperty.call(message, "cycle")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.cycle); + if (message.cache != null && Object.hasOwnProperty.call(message, "cache")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.cache); + if (message.customFeatures != null && Object.hasOwnProperty.call(message, "customFeatures")) + $root.google.protobuf.Struct.encode(message.customFeatures, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SequenceEntity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.SequenceEntity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.SequenceEntity + * @static + * @param {google.cloud.clouddms.v1.ISequenceEntity} message SequenceEntity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SequenceEntity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SequenceEntity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.SequenceEntity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.SequenceEntity} SequenceEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SequenceEntity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.SequenceEntity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.increment = reader.int64(); + break; + } + case 2: { + message.startValue = reader.bytes(); + break; + } + case 3: { + message.maxValue = reader.bytes(); + break; + } + case 4: { + message.minValue = reader.bytes(); + break; + } + case 5: { + message.cycle = reader.bool(); + break; + } + case 6: { + message.cache = reader.int64(); + break; + } + case 7: { + message.customFeatures = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SequenceEntity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.SequenceEntity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.SequenceEntity} SequenceEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SequenceEntity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SequenceEntity message. + * @function verify + * @memberof google.cloud.clouddms.v1.SequenceEntity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SequenceEntity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.increment != null && message.hasOwnProperty("increment")) + if (!$util.isInteger(message.increment) && !(message.increment && $util.isInteger(message.increment.low) && $util.isInteger(message.increment.high))) + return "increment: integer|Long expected"; + if (message.startValue != null && message.hasOwnProperty("startValue")) + if (!(message.startValue && typeof message.startValue.length === "number" || $util.isString(message.startValue))) + return "startValue: buffer expected"; + if (message.maxValue != null && message.hasOwnProperty("maxValue")) + if (!(message.maxValue && typeof message.maxValue.length === "number" || $util.isString(message.maxValue))) + return "maxValue: buffer expected"; + if (message.minValue != null && message.hasOwnProperty("minValue")) + if (!(message.minValue && typeof message.minValue.length === "number" || $util.isString(message.minValue))) + return "minValue: buffer expected"; + if (message.cycle != null && message.hasOwnProperty("cycle")) + if (typeof message.cycle !== "boolean") + return "cycle: boolean expected"; + if (message.cache != null && message.hasOwnProperty("cache")) + if (!$util.isInteger(message.cache) && !(message.cache && $util.isInteger(message.cache.low) && $util.isInteger(message.cache.high))) + return "cache: integer|Long expected"; + if (message.customFeatures != null && message.hasOwnProperty("customFeatures")) { + var error = $root.google.protobuf.Struct.verify(message.customFeatures); + if (error) + return "customFeatures." + error; + } + return null; + }; + + /** + * Creates a SequenceEntity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.SequenceEntity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.SequenceEntity} SequenceEntity + */ + SequenceEntity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.SequenceEntity) + return object; + var message = new $root.google.cloud.clouddms.v1.SequenceEntity(); + if (object.increment != null) + if ($util.Long) + (message.increment = $util.Long.fromValue(object.increment)).unsigned = false; + else if (typeof object.increment === "string") + message.increment = parseInt(object.increment, 10); + else if (typeof object.increment === "number") + message.increment = object.increment; + else if (typeof object.increment === "object") + message.increment = new $util.LongBits(object.increment.low >>> 0, object.increment.high >>> 0).toNumber(); + if (object.startValue != null) + if (typeof object.startValue === "string") + $util.base64.decode(object.startValue, message.startValue = $util.newBuffer($util.base64.length(object.startValue)), 0); + else if (object.startValue.length >= 0) + message.startValue = object.startValue; + if (object.maxValue != null) + if (typeof object.maxValue === "string") + $util.base64.decode(object.maxValue, message.maxValue = $util.newBuffer($util.base64.length(object.maxValue)), 0); + else if (object.maxValue.length >= 0) + message.maxValue = object.maxValue; + if (object.minValue != null) + if (typeof object.minValue === "string") + $util.base64.decode(object.minValue, message.minValue = $util.newBuffer($util.base64.length(object.minValue)), 0); + else if (object.minValue.length >= 0) + message.minValue = object.minValue; + if (object.cycle != null) + message.cycle = Boolean(object.cycle); + if (object.cache != null) + if ($util.Long) + (message.cache = $util.Long.fromValue(object.cache)).unsigned = false; + else if (typeof object.cache === "string") + message.cache = parseInt(object.cache, 10); + else if (typeof object.cache === "number") + message.cache = object.cache; + else if (typeof object.cache === "object") + message.cache = new $util.LongBits(object.cache.low >>> 0, object.cache.high >>> 0).toNumber(); + if (object.customFeatures != null) { + if (typeof object.customFeatures !== "object") + throw TypeError(".google.cloud.clouddms.v1.SequenceEntity.customFeatures: object expected"); + message.customFeatures = $root.google.protobuf.Struct.fromObject(object.customFeatures); + } + return message; + }; + + /** + * Creates a plain object from a SequenceEntity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.SequenceEntity + * @static + * @param {google.cloud.clouddms.v1.SequenceEntity} message SequenceEntity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SequenceEntity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.increment = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.increment = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.startValue = ""; + else { + object.startValue = []; + if (options.bytes !== Array) + object.startValue = $util.newBuffer(object.startValue); + } + if (options.bytes === String) + object.maxValue = ""; + else { + object.maxValue = []; + if (options.bytes !== Array) + object.maxValue = $util.newBuffer(object.maxValue); + } + if (options.bytes === String) + object.minValue = ""; + else { + object.minValue = []; + if (options.bytes !== Array) + object.minValue = $util.newBuffer(object.minValue); + } + object.cycle = false; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.cache = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.cache = options.longs === String ? "0" : 0; + object.customFeatures = null; + } + if (message.increment != null && message.hasOwnProperty("increment")) + if (typeof message.increment === "number") + object.increment = options.longs === String ? String(message.increment) : message.increment; + else + object.increment = options.longs === String ? $util.Long.prototype.toString.call(message.increment) : options.longs === Number ? new $util.LongBits(message.increment.low >>> 0, message.increment.high >>> 0).toNumber() : message.increment; + if (message.startValue != null && message.hasOwnProperty("startValue")) + object.startValue = options.bytes === String ? $util.base64.encode(message.startValue, 0, message.startValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.startValue) : message.startValue; + if (message.maxValue != null && message.hasOwnProperty("maxValue")) + object.maxValue = options.bytes === String ? $util.base64.encode(message.maxValue, 0, message.maxValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.maxValue) : message.maxValue; + if (message.minValue != null && message.hasOwnProperty("minValue")) + object.minValue = options.bytes === String ? $util.base64.encode(message.minValue, 0, message.minValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.minValue) : message.minValue; + if (message.cycle != null && message.hasOwnProperty("cycle")) + object.cycle = message.cycle; + if (message.cache != null && message.hasOwnProperty("cache")) + if (typeof message.cache === "number") + object.cache = options.longs === String ? String(message.cache) : message.cache; + else + object.cache = options.longs === String ? $util.Long.prototype.toString.call(message.cache) : options.longs === Number ? new $util.LongBits(message.cache.low >>> 0, message.cache.high >>> 0).toNumber() : message.cache; + if (message.customFeatures != null && message.hasOwnProperty("customFeatures")) + object.customFeatures = $root.google.protobuf.Struct.toObject(message.customFeatures, options); + return object; + }; + + /** + * Converts this SequenceEntity to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.SequenceEntity + * @instance + * @returns {Object.} JSON object + */ + SequenceEntity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SequenceEntity + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.SequenceEntity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SequenceEntity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.SequenceEntity"; + }; + + return SequenceEntity; + })(); + + v1.StoredProcedureEntity = (function() { + + /** + * Properties of a StoredProcedureEntity. + * @memberof google.cloud.clouddms.v1 + * @interface IStoredProcedureEntity + * @property {string|null} [sqlCode] StoredProcedureEntity sqlCode + * @property {google.protobuf.IStruct|null} [customFeatures] StoredProcedureEntity customFeatures + */ + + /** + * Constructs a new StoredProcedureEntity. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a StoredProcedureEntity. + * @implements IStoredProcedureEntity + * @constructor + * @param {google.cloud.clouddms.v1.IStoredProcedureEntity=} [properties] Properties to set + */ + function StoredProcedureEntity(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]]; + } + + /** + * StoredProcedureEntity sqlCode. + * @member {string} sqlCode + * @memberof google.cloud.clouddms.v1.StoredProcedureEntity + * @instance + */ + StoredProcedureEntity.prototype.sqlCode = ""; + + /** + * StoredProcedureEntity customFeatures. + * @member {google.protobuf.IStruct|null|undefined} customFeatures + * @memberof google.cloud.clouddms.v1.StoredProcedureEntity + * @instance + */ + StoredProcedureEntity.prototype.customFeatures = null; + + /** + * Creates a new StoredProcedureEntity instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.StoredProcedureEntity + * @static + * @param {google.cloud.clouddms.v1.IStoredProcedureEntity=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.StoredProcedureEntity} StoredProcedureEntity instance + */ + StoredProcedureEntity.create = function create(properties) { + return new StoredProcedureEntity(properties); + }; + + /** + * Encodes the specified StoredProcedureEntity message. Does not implicitly {@link google.cloud.clouddms.v1.StoredProcedureEntity.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.StoredProcedureEntity + * @static + * @param {google.cloud.clouddms.v1.IStoredProcedureEntity} message StoredProcedureEntity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoredProcedureEntity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sqlCode != null && Object.hasOwnProperty.call(message, "sqlCode")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sqlCode); + if (message.customFeatures != null && Object.hasOwnProperty.call(message, "customFeatures")) + $root.google.protobuf.Struct.encode(message.customFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified StoredProcedureEntity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.StoredProcedureEntity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.StoredProcedureEntity + * @static + * @param {google.cloud.clouddms.v1.IStoredProcedureEntity} message StoredProcedureEntity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoredProcedureEntity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StoredProcedureEntity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.StoredProcedureEntity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.StoredProcedureEntity} StoredProcedureEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoredProcedureEntity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.StoredProcedureEntity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sqlCode = reader.string(); + break; + } + case 2: { + message.customFeatures = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StoredProcedureEntity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.StoredProcedureEntity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.StoredProcedureEntity} StoredProcedureEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoredProcedureEntity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StoredProcedureEntity message. + * @function verify + * @memberof google.cloud.clouddms.v1.StoredProcedureEntity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StoredProcedureEntity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sqlCode != null && message.hasOwnProperty("sqlCode")) + if (!$util.isString(message.sqlCode)) + return "sqlCode: string expected"; + if (message.customFeatures != null && message.hasOwnProperty("customFeatures")) { + var error = $root.google.protobuf.Struct.verify(message.customFeatures); + if (error) + return "customFeatures." + error; + } + return null; + }; + + /** + * Creates a StoredProcedureEntity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.StoredProcedureEntity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.StoredProcedureEntity} StoredProcedureEntity + */ + StoredProcedureEntity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.StoredProcedureEntity) + return object; + var message = new $root.google.cloud.clouddms.v1.StoredProcedureEntity(); + if (object.sqlCode != null) + message.sqlCode = String(object.sqlCode); + if (object.customFeatures != null) { + if (typeof object.customFeatures !== "object") + throw TypeError(".google.cloud.clouddms.v1.StoredProcedureEntity.customFeatures: object expected"); + message.customFeatures = $root.google.protobuf.Struct.fromObject(object.customFeatures); + } + return message; + }; + + /** + * Creates a plain object from a StoredProcedureEntity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.StoredProcedureEntity + * @static + * @param {google.cloud.clouddms.v1.StoredProcedureEntity} message StoredProcedureEntity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StoredProcedureEntity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sqlCode = ""; + object.customFeatures = null; + } + if (message.sqlCode != null && message.hasOwnProperty("sqlCode")) + object.sqlCode = message.sqlCode; + if (message.customFeatures != null && message.hasOwnProperty("customFeatures")) + object.customFeatures = $root.google.protobuf.Struct.toObject(message.customFeatures, options); + return object; + }; + + /** + * Converts this StoredProcedureEntity to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.StoredProcedureEntity + * @instance + * @returns {Object.} JSON object + */ + StoredProcedureEntity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StoredProcedureEntity + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.StoredProcedureEntity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StoredProcedureEntity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.StoredProcedureEntity"; + }; + + return StoredProcedureEntity; + })(); + + v1.FunctionEntity = (function() { + + /** + * Properties of a FunctionEntity. + * @memberof google.cloud.clouddms.v1 + * @interface IFunctionEntity + * @property {string|null} [sqlCode] FunctionEntity sqlCode + * @property {google.protobuf.IStruct|null} [customFeatures] FunctionEntity customFeatures + */ + + /** + * Constructs a new FunctionEntity. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a FunctionEntity. + * @implements IFunctionEntity + * @constructor + * @param {google.cloud.clouddms.v1.IFunctionEntity=} [properties] Properties to set + */ + function FunctionEntity(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]]; + } + + /** + * FunctionEntity sqlCode. + * @member {string} sqlCode + * @memberof google.cloud.clouddms.v1.FunctionEntity + * @instance + */ + FunctionEntity.prototype.sqlCode = ""; + + /** + * FunctionEntity customFeatures. + * @member {google.protobuf.IStruct|null|undefined} customFeatures + * @memberof google.cloud.clouddms.v1.FunctionEntity + * @instance + */ + FunctionEntity.prototype.customFeatures = null; + + /** + * Creates a new FunctionEntity instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.FunctionEntity + * @static + * @param {google.cloud.clouddms.v1.IFunctionEntity=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.FunctionEntity} FunctionEntity instance + */ + FunctionEntity.create = function create(properties) { + return new FunctionEntity(properties); + }; + + /** + * Encodes the specified FunctionEntity message. Does not implicitly {@link google.cloud.clouddms.v1.FunctionEntity.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.FunctionEntity + * @static + * @param {google.cloud.clouddms.v1.IFunctionEntity} message FunctionEntity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunctionEntity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sqlCode != null && Object.hasOwnProperty.call(message, "sqlCode")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sqlCode); + if (message.customFeatures != null && Object.hasOwnProperty.call(message, "customFeatures")) + $root.google.protobuf.Struct.encode(message.customFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FunctionEntity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.FunctionEntity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.FunctionEntity + * @static + * @param {google.cloud.clouddms.v1.IFunctionEntity} message FunctionEntity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunctionEntity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunctionEntity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.FunctionEntity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.FunctionEntity} FunctionEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunctionEntity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.FunctionEntity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sqlCode = reader.string(); + break; + } + case 2: { + message.customFeatures = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunctionEntity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.FunctionEntity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.FunctionEntity} FunctionEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunctionEntity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunctionEntity message. + * @function verify + * @memberof google.cloud.clouddms.v1.FunctionEntity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunctionEntity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sqlCode != null && message.hasOwnProperty("sqlCode")) + if (!$util.isString(message.sqlCode)) + return "sqlCode: string expected"; + if (message.customFeatures != null && message.hasOwnProperty("customFeatures")) { + var error = $root.google.protobuf.Struct.verify(message.customFeatures); + if (error) + return "customFeatures." + error; + } + return null; + }; + + /** + * Creates a FunctionEntity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.FunctionEntity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.FunctionEntity} FunctionEntity + */ + FunctionEntity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.FunctionEntity) + return object; + var message = new $root.google.cloud.clouddms.v1.FunctionEntity(); + if (object.sqlCode != null) + message.sqlCode = String(object.sqlCode); + if (object.customFeatures != null) { + if (typeof object.customFeatures !== "object") + throw TypeError(".google.cloud.clouddms.v1.FunctionEntity.customFeatures: object expected"); + message.customFeatures = $root.google.protobuf.Struct.fromObject(object.customFeatures); + } + return message; + }; + + /** + * Creates a plain object from a FunctionEntity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.FunctionEntity + * @static + * @param {google.cloud.clouddms.v1.FunctionEntity} message FunctionEntity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunctionEntity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sqlCode = ""; + object.customFeatures = null; + } + if (message.sqlCode != null && message.hasOwnProperty("sqlCode")) + object.sqlCode = message.sqlCode; + if (message.customFeatures != null && message.hasOwnProperty("customFeatures")) + object.customFeatures = $root.google.protobuf.Struct.toObject(message.customFeatures, options); + return object; + }; + + /** + * Converts this FunctionEntity to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.FunctionEntity + * @instance + * @returns {Object.} JSON object + */ + FunctionEntity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunctionEntity + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.FunctionEntity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunctionEntity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.FunctionEntity"; + }; + + return FunctionEntity; + })(); + + v1.SynonymEntity = (function() { + + /** + * Properties of a SynonymEntity. + * @memberof google.cloud.clouddms.v1 + * @interface ISynonymEntity + * @property {string|null} [sourceEntity] SynonymEntity sourceEntity + * @property {google.cloud.clouddms.v1.DatabaseEntityType|null} [sourceType] SynonymEntity sourceType + * @property {google.protobuf.IStruct|null} [customFeatures] SynonymEntity customFeatures + */ + + /** + * Constructs a new SynonymEntity. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a SynonymEntity. + * @implements ISynonymEntity + * @constructor + * @param {google.cloud.clouddms.v1.ISynonymEntity=} [properties] Properties to set + */ + function SynonymEntity(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]]; + } + + /** + * SynonymEntity sourceEntity. + * @member {string} sourceEntity + * @memberof google.cloud.clouddms.v1.SynonymEntity + * @instance + */ + SynonymEntity.prototype.sourceEntity = ""; + + /** + * SynonymEntity sourceType. + * @member {google.cloud.clouddms.v1.DatabaseEntityType} sourceType + * @memberof google.cloud.clouddms.v1.SynonymEntity + * @instance + */ + SynonymEntity.prototype.sourceType = 0; + + /** + * SynonymEntity customFeatures. + * @member {google.protobuf.IStruct|null|undefined} customFeatures + * @memberof google.cloud.clouddms.v1.SynonymEntity + * @instance + */ + SynonymEntity.prototype.customFeatures = null; + + /** + * Creates a new SynonymEntity instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.SynonymEntity + * @static + * @param {google.cloud.clouddms.v1.ISynonymEntity=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.SynonymEntity} SynonymEntity instance + */ + SynonymEntity.create = function create(properties) { + return new SynonymEntity(properties); + }; + + /** + * Encodes the specified SynonymEntity message. Does not implicitly {@link google.cloud.clouddms.v1.SynonymEntity.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.SynonymEntity + * @static + * @param {google.cloud.clouddms.v1.ISynonymEntity} message SynonymEntity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SynonymEntity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourceEntity != null && Object.hasOwnProperty.call(message, "sourceEntity")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceEntity); + if (message.sourceType != null && Object.hasOwnProperty.call(message, "sourceType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.sourceType); + if (message.customFeatures != null && Object.hasOwnProperty.call(message, "customFeatures")) + $root.google.protobuf.Struct.encode(message.customFeatures, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SynonymEntity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.SynonymEntity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.SynonymEntity + * @static + * @param {google.cloud.clouddms.v1.ISynonymEntity} message SynonymEntity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SynonymEntity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SynonymEntity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.SynonymEntity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.SynonymEntity} SynonymEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SynonymEntity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.SynonymEntity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sourceEntity = reader.string(); + break; + } + case 2: { + message.sourceType = reader.int32(); + break; + } + case 3: { + message.customFeatures = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SynonymEntity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.SynonymEntity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.SynonymEntity} SynonymEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SynonymEntity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SynonymEntity message. + * @function verify + * @memberof google.cloud.clouddms.v1.SynonymEntity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SynonymEntity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sourceEntity != null && message.hasOwnProperty("sourceEntity")) + if (!$util.isString(message.sourceEntity)) + return "sourceEntity: string expected"; + if (message.sourceType != null && message.hasOwnProperty("sourceType")) + switch (message.sourceType) { + default: + return "sourceType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + break; + } + if (message.customFeatures != null && message.hasOwnProperty("customFeatures")) { + var error = $root.google.protobuf.Struct.verify(message.customFeatures); + if (error) + return "customFeatures." + error; + } + return null; + }; + + /** + * Creates a SynonymEntity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.SynonymEntity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.SynonymEntity} SynonymEntity + */ + SynonymEntity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.SynonymEntity) + return object; + var message = new $root.google.cloud.clouddms.v1.SynonymEntity(); + if (object.sourceEntity != null) + message.sourceEntity = String(object.sourceEntity); + switch (object.sourceType) { + default: + if (typeof object.sourceType === "number") { + message.sourceType = object.sourceType; + break; + } + break; + case "DATABASE_ENTITY_TYPE_UNSPECIFIED": + case 0: + message.sourceType = 0; + break; + case "DATABASE_ENTITY_TYPE_SCHEMA": + case 1: + message.sourceType = 1; + break; + case "DATABASE_ENTITY_TYPE_TABLE": + case 2: + message.sourceType = 2; + break; + case "DATABASE_ENTITY_TYPE_COLUMN": + case 3: + message.sourceType = 3; + break; + case "DATABASE_ENTITY_TYPE_CONSTRAINT": + case 4: + message.sourceType = 4; + break; + case "DATABASE_ENTITY_TYPE_INDEX": + case 5: + message.sourceType = 5; + break; + case "DATABASE_ENTITY_TYPE_TRIGGER": + case 6: + message.sourceType = 6; + break; + case "DATABASE_ENTITY_TYPE_VIEW": + case 7: + message.sourceType = 7; + break; + case "DATABASE_ENTITY_TYPE_SEQUENCE": + case 8: + message.sourceType = 8; + break; + case "DATABASE_ENTITY_TYPE_STORED_PROCEDURE": + case 9: + message.sourceType = 9; + break; + case "DATABASE_ENTITY_TYPE_FUNCTION": + case 10: + message.sourceType = 10; + break; + case "DATABASE_ENTITY_TYPE_SYNONYM": + case 11: + message.sourceType = 11; + break; + case "DATABASE_ENTITY_TYPE_DATABASE_PACKAGE": + case 12: + message.sourceType = 12; + break; + case "DATABASE_ENTITY_TYPE_UDT": + case 13: + message.sourceType = 13; + break; + case "DATABASE_ENTITY_TYPE_MATERIALIZED_VIEW": + case 14: + message.sourceType = 14; + break; + case "DATABASE_ENTITY_TYPE_DATABASE": + case 15: + message.sourceType = 15; + break; + } + if (object.customFeatures != null) { + if (typeof object.customFeatures !== "object") + throw TypeError(".google.cloud.clouddms.v1.SynonymEntity.customFeatures: object expected"); + message.customFeatures = $root.google.protobuf.Struct.fromObject(object.customFeatures); + } + return message; + }; + + /** + * Creates a plain object from a SynonymEntity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.SynonymEntity + * @static + * @param {google.cloud.clouddms.v1.SynonymEntity} message SynonymEntity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SynonymEntity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sourceEntity = ""; + object.sourceType = options.enums === String ? "DATABASE_ENTITY_TYPE_UNSPECIFIED" : 0; + object.customFeatures = null; + } + if (message.sourceEntity != null && message.hasOwnProperty("sourceEntity")) + object.sourceEntity = message.sourceEntity; + if (message.sourceType != null && message.hasOwnProperty("sourceType")) + object.sourceType = options.enums === String ? $root.google.cloud.clouddms.v1.DatabaseEntityType[message.sourceType] === undefined ? message.sourceType : $root.google.cloud.clouddms.v1.DatabaseEntityType[message.sourceType] : message.sourceType; + if (message.customFeatures != null && message.hasOwnProperty("customFeatures")) + object.customFeatures = $root.google.protobuf.Struct.toObject(message.customFeatures, options); + return object; + }; + + /** + * Converts this SynonymEntity to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.SynonymEntity + * @instance + * @returns {Object.} JSON object + */ + SynonymEntity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SynonymEntity + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.SynonymEntity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SynonymEntity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.SynonymEntity"; + }; + + return SynonymEntity; + })(); + + v1.PackageEntity = (function() { + + /** + * Properties of a PackageEntity. + * @memberof google.cloud.clouddms.v1 + * @interface IPackageEntity + * @property {string|null} [packageSqlCode] PackageEntity packageSqlCode + * @property {string|null} [packageBody] PackageEntity packageBody + * @property {google.protobuf.IStruct|null} [customFeatures] PackageEntity customFeatures + */ + + /** + * Constructs a new PackageEntity. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents a PackageEntity. + * @implements IPackageEntity + * @constructor + * @param {google.cloud.clouddms.v1.IPackageEntity=} [properties] Properties to set + */ + function PackageEntity(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]]; + } + + /** + * PackageEntity packageSqlCode. + * @member {string} packageSqlCode + * @memberof google.cloud.clouddms.v1.PackageEntity + * @instance + */ + PackageEntity.prototype.packageSqlCode = ""; + + /** + * PackageEntity packageBody. + * @member {string} packageBody + * @memberof google.cloud.clouddms.v1.PackageEntity + * @instance + */ + PackageEntity.prototype.packageBody = ""; + + /** + * PackageEntity customFeatures. + * @member {google.protobuf.IStruct|null|undefined} customFeatures + * @memberof google.cloud.clouddms.v1.PackageEntity + * @instance + */ + PackageEntity.prototype.customFeatures = null; + + /** + * Creates a new PackageEntity instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.PackageEntity + * @static + * @param {google.cloud.clouddms.v1.IPackageEntity=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.PackageEntity} PackageEntity instance + */ + PackageEntity.create = function create(properties) { + return new PackageEntity(properties); + }; + + /** + * Encodes the specified PackageEntity message. Does not implicitly {@link google.cloud.clouddms.v1.PackageEntity.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.PackageEntity + * @static + * @param {google.cloud.clouddms.v1.IPackageEntity} message PackageEntity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PackageEntity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.packageSqlCode != null && Object.hasOwnProperty.call(message, "packageSqlCode")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.packageSqlCode); + if (message.packageBody != null && Object.hasOwnProperty.call(message, "packageBody")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.packageBody); + if (message.customFeatures != null && Object.hasOwnProperty.call(message, "customFeatures")) + $root.google.protobuf.Struct.encode(message.customFeatures, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PackageEntity message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.PackageEntity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.PackageEntity + * @static + * @param {google.cloud.clouddms.v1.IPackageEntity} message PackageEntity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PackageEntity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PackageEntity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.PackageEntity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.PackageEntity} PackageEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PackageEntity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.PackageEntity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.packageSqlCode = reader.string(); + break; + } + case 2: { + message.packageBody = reader.string(); + break; + } + case 3: { + message.customFeatures = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PackageEntity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.PackageEntity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.PackageEntity} PackageEntity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PackageEntity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PackageEntity message. + * @function verify + * @memberof google.cloud.clouddms.v1.PackageEntity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PackageEntity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.packageSqlCode != null && message.hasOwnProperty("packageSqlCode")) + if (!$util.isString(message.packageSqlCode)) + return "packageSqlCode: string expected"; + if (message.packageBody != null && message.hasOwnProperty("packageBody")) + if (!$util.isString(message.packageBody)) + return "packageBody: string expected"; + if (message.customFeatures != null && message.hasOwnProperty("customFeatures")) { + var error = $root.google.protobuf.Struct.verify(message.customFeatures); + if (error) + return "customFeatures." + error; + } + return null; + }; + + /** + * Creates a PackageEntity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.PackageEntity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.PackageEntity} PackageEntity + */ + PackageEntity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.PackageEntity) + return object; + var message = new $root.google.cloud.clouddms.v1.PackageEntity(); + if (object.packageSqlCode != null) + message.packageSqlCode = String(object.packageSqlCode); + if (object.packageBody != null) + message.packageBody = String(object.packageBody); + if (object.customFeatures != null) { + if (typeof object.customFeatures !== "object") + throw TypeError(".google.cloud.clouddms.v1.PackageEntity.customFeatures: object expected"); + message.customFeatures = $root.google.protobuf.Struct.fromObject(object.customFeatures); + } + return message; + }; + + /** + * Creates a plain object from a PackageEntity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.PackageEntity + * @static + * @param {google.cloud.clouddms.v1.PackageEntity} message PackageEntity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PackageEntity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.packageSqlCode = ""; + object.packageBody = ""; + object.customFeatures = null; + } + if (message.packageSqlCode != null && message.hasOwnProperty("packageSqlCode")) + object.packageSqlCode = message.packageSqlCode; + if (message.packageBody != null && message.hasOwnProperty("packageBody")) + object.packageBody = message.packageBody; + if (message.customFeatures != null && message.hasOwnProperty("customFeatures")) + object.customFeatures = $root.google.protobuf.Struct.toObject(message.customFeatures, options); + return object; + }; + + /** + * Converts this PackageEntity to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.PackageEntity + * @instance + * @returns {Object.} JSON object + */ + PackageEntity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PackageEntity + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.PackageEntity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PackageEntity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.PackageEntity"; + }; + + return PackageEntity; + })(); + + v1.EntityMapping = (function() { + + /** + * Properties of an EntityMapping. + * @memberof google.cloud.clouddms.v1 + * @interface IEntityMapping + * @property {string|null} [sourceEntity] EntityMapping sourceEntity + * @property {string|null} [draftEntity] EntityMapping draftEntity + * @property {google.cloud.clouddms.v1.DatabaseEntityType|null} [sourceType] EntityMapping sourceType + * @property {google.cloud.clouddms.v1.DatabaseEntityType|null} [draftType] EntityMapping draftType + * @property {Array.|null} [mappingLog] EntityMapping mappingLog + */ + + /** + * Constructs a new EntityMapping. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents an EntityMapping. + * @implements IEntityMapping + * @constructor + * @param {google.cloud.clouddms.v1.IEntityMapping=} [properties] Properties to set + */ + function EntityMapping(properties) { + this.mappingLog = []; + 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]]; + } + + /** + * EntityMapping sourceEntity. + * @member {string} sourceEntity + * @memberof google.cloud.clouddms.v1.EntityMapping + * @instance + */ + EntityMapping.prototype.sourceEntity = ""; + + /** + * EntityMapping draftEntity. + * @member {string} draftEntity + * @memberof google.cloud.clouddms.v1.EntityMapping + * @instance + */ + EntityMapping.prototype.draftEntity = ""; + + /** + * EntityMapping sourceType. + * @member {google.cloud.clouddms.v1.DatabaseEntityType} sourceType + * @memberof google.cloud.clouddms.v1.EntityMapping + * @instance + */ + EntityMapping.prototype.sourceType = 0; + + /** + * EntityMapping draftType. + * @member {google.cloud.clouddms.v1.DatabaseEntityType} draftType + * @memberof google.cloud.clouddms.v1.EntityMapping + * @instance + */ + EntityMapping.prototype.draftType = 0; + + /** + * EntityMapping mappingLog. + * @member {Array.} mappingLog + * @memberof google.cloud.clouddms.v1.EntityMapping + * @instance + */ + EntityMapping.prototype.mappingLog = $util.emptyArray; + + /** + * Creates a new EntityMapping instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.EntityMapping + * @static + * @param {google.cloud.clouddms.v1.IEntityMapping=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.EntityMapping} EntityMapping instance + */ + EntityMapping.create = function create(properties) { + return new EntityMapping(properties); + }; + + /** + * Encodes the specified EntityMapping message. Does not implicitly {@link google.cloud.clouddms.v1.EntityMapping.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.EntityMapping + * @static + * @param {google.cloud.clouddms.v1.IEntityMapping} message EntityMapping message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityMapping.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourceEntity != null && Object.hasOwnProperty.call(message, "sourceEntity")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceEntity); + if (message.draftEntity != null && Object.hasOwnProperty.call(message, "draftEntity")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.draftEntity); + if (message.mappingLog != null && message.mappingLog.length) + for (var i = 0; i < message.mappingLog.length; ++i) + $root.google.cloud.clouddms.v1.EntityMappingLogEntry.encode(message.mappingLog[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.sourceType != null && Object.hasOwnProperty.call(message, "sourceType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.sourceType); + if (message.draftType != null && Object.hasOwnProperty.call(message, "draftType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.draftType); + return writer; + }; + + /** + * Encodes the specified EntityMapping message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.EntityMapping.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.EntityMapping + * @static + * @param {google.cloud.clouddms.v1.IEntityMapping} message EntityMapping message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityMapping.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EntityMapping message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.EntityMapping + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.EntityMapping} EntityMapping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityMapping.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.EntityMapping(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sourceEntity = reader.string(); + break; + } + case 2: { + message.draftEntity = reader.string(); + break; + } + case 4: { + message.sourceType = reader.int32(); + break; + } + case 5: { + message.draftType = reader.int32(); + break; + } + case 3: { + if (!(message.mappingLog && message.mappingLog.length)) + message.mappingLog = []; + message.mappingLog.push($root.google.cloud.clouddms.v1.EntityMappingLogEntry.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EntityMapping message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.EntityMapping + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.EntityMapping} EntityMapping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityMapping.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EntityMapping message. + * @function verify + * @memberof google.cloud.clouddms.v1.EntityMapping + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EntityMapping.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sourceEntity != null && message.hasOwnProperty("sourceEntity")) + if (!$util.isString(message.sourceEntity)) + return "sourceEntity: string expected"; + if (message.draftEntity != null && message.hasOwnProperty("draftEntity")) + if (!$util.isString(message.draftEntity)) + return "draftEntity: string expected"; + if (message.sourceType != null && message.hasOwnProperty("sourceType")) + switch (message.sourceType) { + default: + return "sourceType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + break; + } + if (message.draftType != null && message.hasOwnProperty("draftType")) + switch (message.draftType) { + default: + return "draftType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + break; + } + if (message.mappingLog != null && message.hasOwnProperty("mappingLog")) { + if (!Array.isArray(message.mappingLog)) + return "mappingLog: array expected"; + for (var i = 0; i < message.mappingLog.length; ++i) { + var error = $root.google.cloud.clouddms.v1.EntityMappingLogEntry.verify(message.mappingLog[i]); + if (error) + return "mappingLog." + error; + } + } + return null; + }; + + /** + * Creates an EntityMapping message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.EntityMapping + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.EntityMapping} EntityMapping + */ + EntityMapping.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.EntityMapping) + return object; + var message = new $root.google.cloud.clouddms.v1.EntityMapping(); + if (object.sourceEntity != null) + message.sourceEntity = String(object.sourceEntity); + if (object.draftEntity != null) + message.draftEntity = String(object.draftEntity); + switch (object.sourceType) { + default: + if (typeof object.sourceType === "number") { + message.sourceType = object.sourceType; + break; + } + break; + case "DATABASE_ENTITY_TYPE_UNSPECIFIED": + case 0: + message.sourceType = 0; + break; + case "DATABASE_ENTITY_TYPE_SCHEMA": + case 1: + message.sourceType = 1; + break; + case "DATABASE_ENTITY_TYPE_TABLE": + case 2: + message.sourceType = 2; + break; + case "DATABASE_ENTITY_TYPE_COLUMN": + case 3: + message.sourceType = 3; + break; + case "DATABASE_ENTITY_TYPE_CONSTRAINT": + case 4: + message.sourceType = 4; + break; + case "DATABASE_ENTITY_TYPE_INDEX": + case 5: + message.sourceType = 5; + break; + case "DATABASE_ENTITY_TYPE_TRIGGER": + case 6: + message.sourceType = 6; + break; + case "DATABASE_ENTITY_TYPE_VIEW": + case 7: + message.sourceType = 7; + break; + case "DATABASE_ENTITY_TYPE_SEQUENCE": + case 8: + message.sourceType = 8; + break; + case "DATABASE_ENTITY_TYPE_STORED_PROCEDURE": + case 9: + message.sourceType = 9; + break; + case "DATABASE_ENTITY_TYPE_FUNCTION": + case 10: + message.sourceType = 10; + break; + case "DATABASE_ENTITY_TYPE_SYNONYM": + case 11: + message.sourceType = 11; + break; + case "DATABASE_ENTITY_TYPE_DATABASE_PACKAGE": + case 12: + message.sourceType = 12; + break; + case "DATABASE_ENTITY_TYPE_UDT": + case 13: + message.sourceType = 13; + break; + case "DATABASE_ENTITY_TYPE_MATERIALIZED_VIEW": + case 14: + message.sourceType = 14; + break; + case "DATABASE_ENTITY_TYPE_DATABASE": + case 15: + message.sourceType = 15; + break; + } + switch (object.draftType) { + default: + if (typeof object.draftType === "number") { + message.draftType = object.draftType; + break; + } + break; + case "DATABASE_ENTITY_TYPE_UNSPECIFIED": + case 0: + message.draftType = 0; + break; + case "DATABASE_ENTITY_TYPE_SCHEMA": + case 1: + message.draftType = 1; + break; + case "DATABASE_ENTITY_TYPE_TABLE": + case 2: + message.draftType = 2; + break; + case "DATABASE_ENTITY_TYPE_COLUMN": + case 3: + message.draftType = 3; + break; + case "DATABASE_ENTITY_TYPE_CONSTRAINT": + case 4: + message.draftType = 4; + break; + case "DATABASE_ENTITY_TYPE_INDEX": + case 5: + message.draftType = 5; + break; + case "DATABASE_ENTITY_TYPE_TRIGGER": + case 6: + message.draftType = 6; + break; + case "DATABASE_ENTITY_TYPE_VIEW": + case 7: + message.draftType = 7; + break; + case "DATABASE_ENTITY_TYPE_SEQUENCE": + case 8: + message.draftType = 8; + break; + case "DATABASE_ENTITY_TYPE_STORED_PROCEDURE": + case 9: + message.draftType = 9; + break; + case "DATABASE_ENTITY_TYPE_FUNCTION": + case 10: + message.draftType = 10; + break; + case "DATABASE_ENTITY_TYPE_SYNONYM": + case 11: + message.draftType = 11; + break; + case "DATABASE_ENTITY_TYPE_DATABASE_PACKAGE": + case 12: + message.draftType = 12; + break; + case "DATABASE_ENTITY_TYPE_UDT": + case 13: + message.draftType = 13; + break; + case "DATABASE_ENTITY_TYPE_MATERIALIZED_VIEW": + case 14: + message.draftType = 14; + break; + case "DATABASE_ENTITY_TYPE_DATABASE": + case 15: + message.draftType = 15; + break; + } + if (object.mappingLog) { + if (!Array.isArray(object.mappingLog)) + throw TypeError(".google.cloud.clouddms.v1.EntityMapping.mappingLog: array expected"); + message.mappingLog = []; + for (var i = 0; i < object.mappingLog.length; ++i) { + if (typeof object.mappingLog[i] !== "object") + throw TypeError(".google.cloud.clouddms.v1.EntityMapping.mappingLog: object expected"); + message.mappingLog[i] = $root.google.cloud.clouddms.v1.EntityMappingLogEntry.fromObject(object.mappingLog[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EntityMapping message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.EntityMapping + * @static + * @param {google.cloud.clouddms.v1.EntityMapping} message EntityMapping + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EntityMapping.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.mappingLog = []; + if (options.defaults) { + object.sourceEntity = ""; + object.draftEntity = ""; + object.sourceType = options.enums === String ? "DATABASE_ENTITY_TYPE_UNSPECIFIED" : 0; + object.draftType = options.enums === String ? "DATABASE_ENTITY_TYPE_UNSPECIFIED" : 0; + } + if (message.sourceEntity != null && message.hasOwnProperty("sourceEntity")) + object.sourceEntity = message.sourceEntity; + if (message.draftEntity != null && message.hasOwnProperty("draftEntity")) + object.draftEntity = message.draftEntity; + if (message.mappingLog && message.mappingLog.length) { + object.mappingLog = []; + for (var j = 0; j < message.mappingLog.length; ++j) + object.mappingLog[j] = $root.google.cloud.clouddms.v1.EntityMappingLogEntry.toObject(message.mappingLog[j], options); + } + if (message.sourceType != null && message.hasOwnProperty("sourceType")) + object.sourceType = options.enums === String ? $root.google.cloud.clouddms.v1.DatabaseEntityType[message.sourceType] === undefined ? message.sourceType : $root.google.cloud.clouddms.v1.DatabaseEntityType[message.sourceType] : message.sourceType; + if (message.draftType != null && message.hasOwnProperty("draftType")) + object.draftType = options.enums === String ? $root.google.cloud.clouddms.v1.DatabaseEntityType[message.draftType] === undefined ? message.draftType : $root.google.cloud.clouddms.v1.DatabaseEntityType[message.draftType] : message.draftType; + return object; + }; + + /** + * Converts this EntityMapping to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.EntityMapping + * @instance + * @returns {Object.} JSON object + */ + EntityMapping.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EntityMapping + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.EntityMapping + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EntityMapping.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.EntityMapping"; + }; + + return EntityMapping; + })(); + + v1.EntityMappingLogEntry = (function() { + + /** + * Properties of an EntityMappingLogEntry. + * @memberof google.cloud.clouddms.v1 + * @interface IEntityMappingLogEntry + * @property {string|null} [ruleId] EntityMappingLogEntry ruleId + * @property {string|null} [ruleRevisionId] EntityMappingLogEntry ruleRevisionId + * @property {string|null} [mappingComment] EntityMappingLogEntry mappingComment + */ + + /** + * Constructs a new EntityMappingLogEntry. + * @memberof google.cloud.clouddms.v1 + * @classdesc Represents an EntityMappingLogEntry. + * @implements IEntityMappingLogEntry + * @constructor + * @param {google.cloud.clouddms.v1.IEntityMappingLogEntry=} [properties] Properties to set + */ + function EntityMappingLogEntry(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]]; + } + + /** + * EntityMappingLogEntry ruleId. + * @member {string} ruleId + * @memberof google.cloud.clouddms.v1.EntityMappingLogEntry + * @instance + */ + EntityMappingLogEntry.prototype.ruleId = ""; + + /** + * EntityMappingLogEntry ruleRevisionId. + * @member {string} ruleRevisionId + * @memberof google.cloud.clouddms.v1.EntityMappingLogEntry + * @instance + */ + EntityMappingLogEntry.prototype.ruleRevisionId = ""; + + /** + * EntityMappingLogEntry mappingComment. + * @member {string} mappingComment + * @memberof google.cloud.clouddms.v1.EntityMappingLogEntry + * @instance + */ + EntityMappingLogEntry.prototype.mappingComment = ""; + + /** + * Creates a new EntityMappingLogEntry instance using the specified properties. + * @function create + * @memberof google.cloud.clouddms.v1.EntityMappingLogEntry + * @static + * @param {google.cloud.clouddms.v1.IEntityMappingLogEntry=} [properties] Properties to set + * @returns {google.cloud.clouddms.v1.EntityMappingLogEntry} EntityMappingLogEntry instance + */ + EntityMappingLogEntry.create = function create(properties) { + return new EntityMappingLogEntry(properties); + }; + + /** + * Encodes the specified EntityMappingLogEntry message. Does not implicitly {@link google.cloud.clouddms.v1.EntityMappingLogEntry.verify|verify} messages. + * @function encode + * @memberof google.cloud.clouddms.v1.EntityMappingLogEntry + * @static + * @param {google.cloud.clouddms.v1.IEntityMappingLogEntry} message EntityMappingLogEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityMappingLogEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ruleId != null && Object.hasOwnProperty.call(message, "ruleId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.ruleId); + if (message.ruleRevisionId != null && Object.hasOwnProperty.call(message, "ruleRevisionId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.ruleRevisionId); + if (message.mappingComment != null && Object.hasOwnProperty.call(message, "mappingComment")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.mappingComment); + return writer; + }; + + /** + * Encodes the specified EntityMappingLogEntry message, length delimited. Does not implicitly {@link google.cloud.clouddms.v1.EntityMappingLogEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.clouddms.v1.EntityMappingLogEntry + * @static + * @param {google.cloud.clouddms.v1.IEntityMappingLogEntry} message EntityMappingLogEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityMappingLogEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EntityMappingLogEntry message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.clouddms.v1.EntityMappingLogEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.clouddms.v1.EntityMappingLogEntry} EntityMappingLogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityMappingLogEntry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.clouddms.v1.EntityMappingLogEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ruleId = reader.string(); + break; + } + case 2: { + message.ruleRevisionId = reader.string(); + break; + } + case 3: { + message.mappingComment = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EntityMappingLogEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.clouddms.v1.EntityMappingLogEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.clouddms.v1.EntityMappingLogEntry} EntityMappingLogEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityMappingLogEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EntityMappingLogEntry message. + * @function verify + * @memberof google.cloud.clouddms.v1.EntityMappingLogEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EntityMappingLogEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ruleId != null && message.hasOwnProperty("ruleId")) + if (!$util.isString(message.ruleId)) + return "ruleId: string expected"; + if (message.ruleRevisionId != null && message.hasOwnProperty("ruleRevisionId")) + if (!$util.isString(message.ruleRevisionId)) + return "ruleRevisionId: string expected"; + if (message.mappingComment != null && message.hasOwnProperty("mappingComment")) + if (!$util.isString(message.mappingComment)) + return "mappingComment: string expected"; + return null; + }; + + /** + * Creates an EntityMappingLogEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.clouddms.v1.EntityMappingLogEntry + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.clouddms.v1.EntityMappingLogEntry} EntityMappingLogEntry + */ + EntityMappingLogEntry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.clouddms.v1.EntityMappingLogEntry) + return object; + var message = new $root.google.cloud.clouddms.v1.EntityMappingLogEntry(); + if (object.ruleId != null) + message.ruleId = String(object.ruleId); + if (object.ruleRevisionId != null) + message.ruleRevisionId = String(object.ruleRevisionId); + if (object.mappingComment != null) + message.mappingComment = String(object.mappingComment); + return message; + }; + + /** + * Creates a plain object from an EntityMappingLogEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.clouddms.v1.EntityMappingLogEntry + * @static + * @param {google.cloud.clouddms.v1.EntityMappingLogEntry} message EntityMappingLogEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EntityMappingLogEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.ruleId = ""; + object.ruleRevisionId = ""; + object.mappingComment = ""; + } + if (message.ruleId != null && message.hasOwnProperty("ruleId")) + object.ruleId = message.ruleId; + if (message.ruleRevisionId != null && message.hasOwnProperty("ruleRevisionId")) + object.ruleRevisionId = message.ruleRevisionId; + if (message.mappingComment != null && message.hasOwnProperty("mappingComment")) + object.mappingComment = message.mappingComment; + return object; + }; + + /** + * Converts this EntityMappingLogEntry to JSON. + * @function toJSON + * @memberof google.cloud.clouddms.v1.EntityMappingLogEntry + * @instance + * @returns {Object.} JSON object + */ + EntityMappingLogEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EntityMappingLogEntry + * @function getTypeUrl + * @memberof google.cloud.clouddms.v1.EntityMappingLogEntry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EntityMappingLogEntry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.clouddms.v1.EntityMappingLogEntry"; + }; + + return EntityMappingLogEntry; + })(); + + /** + * DatabaseEntityType enum. + * @name google.cloud.clouddms.v1.DatabaseEntityType + * @enum {number} + * @property {number} DATABASE_ENTITY_TYPE_UNSPECIFIED=0 DATABASE_ENTITY_TYPE_UNSPECIFIED value + * @property {number} DATABASE_ENTITY_TYPE_SCHEMA=1 DATABASE_ENTITY_TYPE_SCHEMA value + * @property {number} DATABASE_ENTITY_TYPE_TABLE=2 DATABASE_ENTITY_TYPE_TABLE value + * @property {number} DATABASE_ENTITY_TYPE_COLUMN=3 DATABASE_ENTITY_TYPE_COLUMN value + * @property {number} DATABASE_ENTITY_TYPE_CONSTRAINT=4 DATABASE_ENTITY_TYPE_CONSTRAINT value + * @property {number} DATABASE_ENTITY_TYPE_INDEX=5 DATABASE_ENTITY_TYPE_INDEX value + * @property {number} DATABASE_ENTITY_TYPE_TRIGGER=6 DATABASE_ENTITY_TYPE_TRIGGER value + * @property {number} DATABASE_ENTITY_TYPE_VIEW=7 DATABASE_ENTITY_TYPE_VIEW value + * @property {number} DATABASE_ENTITY_TYPE_SEQUENCE=8 DATABASE_ENTITY_TYPE_SEQUENCE value + * @property {number} DATABASE_ENTITY_TYPE_STORED_PROCEDURE=9 DATABASE_ENTITY_TYPE_STORED_PROCEDURE value + * @property {number} DATABASE_ENTITY_TYPE_FUNCTION=10 DATABASE_ENTITY_TYPE_FUNCTION value + * @property {number} DATABASE_ENTITY_TYPE_SYNONYM=11 DATABASE_ENTITY_TYPE_SYNONYM value + * @property {number} DATABASE_ENTITY_TYPE_DATABASE_PACKAGE=12 DATABASE_ENTITY_TYPE_DATABASE_PACKAGE value + * @property {number} DATABASE_ENTITY_TYPE_UDT=13 DATABASE_ENTITY_TYPE_UDT value + * @property {number} DATABASE_ENTITY_TYPE_MATERIALIZED_VIEW=14 DATABASE_ENTITY_TYPE_MATERIALIZED_VIEW value + * @property {number} DATABASE_ENTITY_TYPE_DATABASE=15 DATABASE_ENTITY_TYPE_DATABASE value + */ + v1.DatabaseEntityType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATABASE_ENTITY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DATABASE_ENTITY_TYPE_SCHEMA"] = 1; + values[valuesById[2] = "DATABASE_ENTITY_TYPE_TABLE"] = 2; + values[valuesById[3] = "DATABASE_ENTITY_TYPE_COLUMN"] = 3; + values[valuesById[4] = "DATABASE_ENTITY_TYPE_CONSTRAINT"] = 4; + values[valuesById[5] = "DATABASE_ENTITY_TYPE_INDEX"] = 5; + values[valuesById[6] = "DATABASE_ENTITY_TYPE_TRIGGER"] = 6; + values[valuesById[7] = "DATABASE_ENTITY_TYPE_VIEW"] = 7; + values[valuesById[8] = "DATABASE_ENTITY_TYPE_SEQUENCE"] = 8; + values[valuesById[9] = "DATABASE_ENTITY_TYPE_STORED_PROCEDURE"] = 9; + values[valuesById[10] = "DATABASE_ENTITY_TYPE_FUNCTION"] = 10; + values[valuesById[11] = "DATABASE_ENTITY_TYPE_SYNONYM"] = 11; + values[valuesById[12] = "DATABASE_ENTITY_TYPE_DATABASE_PACKAGE"] = 12; + values[valuesById[13] = "DATABASE_ENTITY_TYPE_UDT"] = 13; + values[valuesById[14] = "DATABASE_ENTITY_TYPE_MATERIALIZED_VIEW"] = 14; + values[valuesById[15] = "DATABASE_ENTITY_TYPE_DATABASE"] = 15; + return values; + })(); + + /** + * BackgroundJobType enum. + * @name google.cloud.clouddms.v1.BackgroundJobType + * @enum {number} + * @property {number} BACKGROUND_JOB_TYPE_UNSPECIFIED=0 BACKGROUND_JOB_TYPE_UNSPECIFIED value + * @property {number} BACKGROUND_JOB_TYPE_SOURCE_SEED=1 BACKGROUND_JOB_TYPE_SOURCE_SEED value + * @property {number} BACKGROUND_JOB_TYPE_CONVERT=2 BACKGROUND_JOB_TYPE_CONVERT value + * @property {number} BACKGROUND_JOB_TYPE_APPLY_DESTINATION=3 BACKGROUND_JOB_TYPE_APPLY_DESTINATION value + * @property {number} BACKGROUND_JOB_TYPE_IMPORT_RULES_FILE=5 BACKGROUND_JOB_TYPE_IMPORT_RULES_FILE value + */ + v1.BackgroundJobType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BACKGROUND_JOB_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BACKGROUND_JOB_TYPE_SOURCE_SEED"] = 1; + values[valuesById[2] = "BACKGROUND_JOB_TYPE_CONVERT"] = 2; + values[valuesById[3] = "BACKGROUND_JOB_TYPE_APPLY_DESTINATION"] = 3; + values[valuesById[5] = "BACKGROUND_JOB_TYPE_IMPORT_RULES_FILE"] = 5; + return values; + })(); + + /** + * ImportRulesFileFormat enum. + * @name google.cloud.clouddms.v1.ImportRulesFileFormat + * @enum {number} + * @property {number} IMPORT_RULES_FILE_FORMAT_UNSPECIFIED=0 IMPORT_RULES_FILE_FORMAT_UNSPECIFIED value + * @property {number} IMPORT_RULES_FILE_FORMAT_HARBOUR_BRIDGE_SESSION_FILE=1 IMPORT_RULES_FILE_FORMAT_HARBOUR_BRIDGE_SESSION_FILE value + * @property {number} IMPORT_RULES_FILE_FORMAT_ORATOPG_CONFIG_FILE=2 IMPORT_RULES_FILE_FORMAT_ORATOPG_CONFIG_FILE value + */ + v1.ImportRulesFileFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IMPORT_RULES_FILE_FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "IMPORT_RULES_FILE_FORMAT_HARBOUR_BRIDGE_SESSION_FILE"] = 1; + values[valuesById[2] = "IMPORT_RULES_FILE_FORMAT_ORATOPG_CONFIG_FILE"] = 2; + return values; + })(); + + return v1; + })(); + + return clouddms; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + 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]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + 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]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { message.responseBody = reader.string(); break; } @@ -20302,11 +40433,263 @@ message.deprecated = Boolean(object.deprecated); if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } @@ -20314,26 +40697,22 @@ }; /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumOptions.toObject = function toObject(message, options) { + EnumValueOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.uninterpretedOption = []; - if (options.defaults) { - object.allowAlias = false; + if (options.defaults) object.deprecated = false; - } - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - object.allowAlias = message.allowAlias; if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; if (message.uninterpretedOption && message.uninterpretedOption.length) { @@ -20345,53 +40724,55 @@ }; /** - * Converts this EnumOptions to JSON. + * Converts this EnumValueOptions to JSON. * @function toJSON - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.EnumValueOptions * @instance * @returns {Object.} JSON object */ - EnumOptions.prototype.toJSON = function toJSON() { + EnumValueOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EnumOptions + * Gets the default type url for EnumValueOptions * @function getTypeUrl - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.EnumValueOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.EnumOptions"; + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; }; - return EnumOptions; + return EnumValueOptions; })(); - protobuf.EnumValueOptions = (function() { + protobuf.ServiceOptions = (function() { /** - * Properties of an EnumValueOptions. + * Properties of a ServiceOptions. * @memberof google.protobuf - * @interface IEnumValueOptions - * @property {boolean|null} [deprecated] EnumValueOptions deprecated - * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + * @interface IServiceOptions + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes */ /** - * Constructs a new EnumValueOptions. + * Constructs a new ServiceOptions. * @memberof google.protobuf - * @classdesc Represents an EnumValueOptions. - * @implements IEnumValueOptions + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions * @constructor - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set */ - function EnumValueOptions(properties) { + function ServiceOptions(properties) { this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -20400,85 +40781,105 @@ } /** - * EnumValueOptions deprecated. + * ServiceOptions deprecated. * @member {boolean} deprecated - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.ServiceOptions * @instance */ - EnumValueOptions.prototype.deprecated = false; + ServiceOptions.prototype.deprecated = false; /** - * EnumValueOptions uninterpretedOption. + * ServiceOptions uninterpretedOption. * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.ServiceOptions * @instance */ - EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * Creates a new EnumValueOptions instance using the specified properties. + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. * @function create - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance */ - EnumValueOptions.create = function create(properties) { - return new EnumValueOptions(properties); + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); }; /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encode = function encode(message, writer) { + ServiceOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); return writer; }; /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnumValueOptions message from the specified reader or buffer. + * Decodes a ServiceOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.ServiceOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.protobuf.ServiceOptions} ServiceOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueOptions.decode = function decode(reader, length) { + ServiceOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { + case 33: { message.deprecated = reader.bool(); break; } @@ -20488,6 +40889,14 @@ message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -20497,30 +40906,30 @@ }; /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.ServiceOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.protobuf.ServiceOptions} ServiceOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EnumValueOptions message. + * Verifies a ServiceOptions message. * @function verify - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.ServiceOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumValueOptions.verify = function verify(message) { + ServiceOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.deprecated != null && message.hasOwnProperty("deprecated")) @@ -20535,53 +40944,66 @@ return "uninterpretedOption." + error; } } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; return null; }; /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.ServiceOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.protobuf.ServiceOptions} ServiceOptions */ - EnumValueOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueOptions) + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) return object; - var message = new $root.google.protobuf.EnumValueOptions(); + var message = new $root.google.protobuf.ServiceOptions(); if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); return message; }; /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {google.protobuf.ServiceOptions} message ServiceOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumValueOptions.toObject = function toObject(message, options) { + ServiceOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.uninterpretedOption = []; - if (options.defaults) + if (options.defaults) { object.deprecated = false; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; if (message.uninterpretedOption && message.uninterpretedOption.length) { @@ -20589,60 +41011,67 @@ for (var j = 0; j < message.uninterpretedOption.length; ++j) object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; return object; }; /** - * Converts this EnumValueOptions to JSON. + * Converts this ServiceOptions to JSON. * @function toJSON - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.ServiceOptions * @instance * @returns {Object.} JSON object */ - EnumValueOptions.prototype.toJSON = function toJSON() { + ServiceOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EnumValueOptions + * Gets the default type url for ServiceOptions * @function getTypeUrl - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.ServiceOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; }; - return EnumValueOptions; + return ServiceOptions; })(); - protobuf.ServiceOptions = (function() { + protobuf.MethodOptions = (function() { /** - * Properties of a ServiceOptions. + * Properties of a MethodOptions. * @memberof google.protobuf - * @interface IServiceOptions - * @property {boolean|null} [deprecated] ServiceOptions deprecated - * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption - * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost - * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo */ /** - * Constructs a new ServiceOptions. + * Constructs a new MethodOptions. * @memberof google.protobuf - * @classdesc Represents a ServiceOptions. - * @implements IServiceOptions + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions * @constructor - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set */ - function ServiceOptions(properties) { + function MethodOptions(properties) { this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20650,101 +41079,122 @@ } /** - * ServiceOptions deprecated. + * MethodOptions deprecated. * @member {boolean} deprecated - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions * @instance */ - ServiceOptions.prototype.deprecated = false; + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * ServiceOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ServiceOptions + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions * @instance */ - ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + MethodOptions.prototype[".google.api.http"] = null; /** - * ServiceOptions .google.api.defaultHost. - * @member {string} .google.api.defaultHost - * @memberof google.protobuf.ServiceOptions + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions * @instance */ - ServiceOptions.prototype[".google.api.defaultHost"] = ""; + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; /** - * ServiceOptions .google.api.oauthScopes. - * @member {string} .google.api.oauthScopes - * @memberof google.protobuf.ServiceOptions + * MethodOptions .google.longrunning.operationInfo. + * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo + * @memberof google.protobuf.MethodOptions * @instance */ - ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + MethodOptions.prototype[".google.longrunning.operationInfo"] = null; /** - * Creates a new ServiceOptions instance using the specified properties. + * Creates a new MethodOptions instance using the specified properties. * @function create - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance */ - ServiceOptions.create = function create(properties) { - return new ServiceOptions(properties); + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); }; /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encode = function encode(message, writer) { + MethodOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) - writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); - if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) - writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) + $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); return writer; }; /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ServiceOptions message from the specified reader or buffer. + * Decodes a MethodOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.MethodOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.protobuf.MethodOptions} MethodOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceOptions.decode = function decode(reader, length) { + MethodOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -20752,18 +41202,28 @@ message.deprecated = reader.bool(); break; } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } - case 1049: { - message[".google.api.defaultHost"] = reader.string(); + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); break; } - case 1050: { - message[".google.api.oauthScopes"] = reader.string(); + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + case 1049: { + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); break; } default: @@ -20775,35 +41235,44 @@ }; /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.MethodOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.protobuf.MethodOptions} MethodOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + MethodOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ServiceOptions message. + * Verifies a MethodOptions message. * @function verify - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.MethodOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ServiceOptions.verify = function verify(message) { + MethodOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.deprecated != null && message.hasOwnProperty("deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -20813,134 +41282,204 @@ return "uninterpretedOption." + error; } } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - if (!$util.isString(message[".google.api.defaultHost"])) - return ".google.api.defaultHost: string expected"; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - if (!$util.isString(message[".google.api.oauthScopes"])) - return ".google.api.oauthScopes: string expected"; + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { + var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); + if (error) + return ".google.longrunning.operationInfo." + error; + } return null; }; /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.MethodOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.protobuf.MethodOptions} MethodOptions */ - ServiceOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceOptions) + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) return object; - var message = new $root.google.protobuf.ServiceOptions(); + var message = new $root.google.protobuf.MethodOptions(); if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } - if (object[".google.api.defaultHost"] != null) - message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); - if (object[".google.api.oauthScopes"] != null) - message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + if (object[".google.longrunning.operationInfo"] != null) { + if (typeof object[".google.longrunning.operationInfo"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); + } return message; }; /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {google.protobuf.MethodOptions} message MethodOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceOptions.toObject = function toObject(message, options) { + MethodOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } if (options.defaults) { object.deprecated = false; - object[".google.api.defaultHost"] = ""; - object[".google.api.oauthScopes"] = ""; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.longrunning.operationInfo"] = null; + object[".google.api.http"] = null; } if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) + object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); return object; }; /** - * Converts this ServiceOptions to JSON. + * Converts this MethodOptions to JSON. * @function toJSON - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.MethodOptions * @instance * @returns {Object.} JSON object */ - ServiceOptions.prototype.toJSON = function toJSON() { + MethodOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ServiceOptions + * Gets the default type url for MethodOptions * @function getTypeUrl - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.MethodOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ServiceOptions"; - }; + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); - return ServiceOptions; + return MethodOptions; })(); - protobuf.MethodOptions = (function() { + protobuf.UninterpretedOption = (function() { /** - * Properties of a MethodOptions. + * Properties of an UninterpretedOption. * @memberof google.protobuf - * @interface IMethodOptions - * @property {boolean|null} [deprecated] MethodOptions deprecated - * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel - * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption - * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http - * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature - * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue */ /** - * Constructs a new MethodOptions. + * Constructs a new UninterpretedOption. * @memberof google.protobuf - * @classdesc Represents a MethodOptions. - * @implements IMethodOptions + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set */ - function MethodOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.methodSignature"] = []; + function UninterpretedOption(properties) { + this.name = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20948,151 +41487,162 @@ } /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption * @instance */ - MethodOptions.prototype.deprecated = false; + UninterpretedOption.prototype.name = $util.emptyArray; /** - * MethodOptions idempotencyLevel. - * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel - * @memberof google.protobuf.MethodOptions + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - MethodOptions.prototype.idempotencyLevel = 0; + UninterpretedOption.prototype.identifierValue = ""; /** - * MethodOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MethodOptions + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - MethodOptions.prototype[".google.api.http"] = null; + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature - * @memberof google.protobuf.MethodOptions + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + UninterpretedOption.prototype.doubleValue = 0; /** - * MethodOptions .google.longrunning.operationInfo. - * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo - * @memberof google.protobuf.MethodOptions + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); /** - * Creates a new MethodOptions instance using the specified properties. + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. * @function create - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - * @returns {google.protobuf.MethodOptions} MethodOptions instance + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance */ - MethodOptions.create = function create(properties) { - return new MethodOptions(properties); + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); }; /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. * @function encode - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encode = function encode(message, writer) { + UninterpretedOption.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) - writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) - $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); - if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); return writer; }; /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MethodOptions message from the specified reader or buffer. + * Decodes an UninterpretedOption message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.UninterpretedOption * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodOptions.decode = function decode(reader, length) { + UninterpretedOption.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 33: { - message.deprecated = reader.bool(); + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); break; } - case 34: { - message.idempotencyLevel = reader.int32(); + case 3: { + message.identifierValue = reader.string(); break; } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + case 4: { + message.positiveIntValue = reader.uint64(); break; } - case 72295728: { - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + case 5: { + message.negativeIntValue = reader.int64(); break; } - case 1051: { - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); + case 6: { + message.doubleValue = reader.double(); break; } - case 1049: { - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); break; } default: @@ -21104,414 +41654,533 @@ }; /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.UninterpretedOption * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodOptions.decodeDelimited = function decodeDelimited(reader) { + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MethodOptions message. + * Verifies an UninterpretedOption message. * @function verify - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.UninterpretedOption * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MethodOptions.verify = function verify(message) { + UninterpretedOption.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - switch (message.idempotencyLevel) { - default: - return "idempotencyLevel: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + error; - } - if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { - if (!Array.isArray(message[".google.api.methodSignature"])) - return ".google.api.methodSignature: array expected"; - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - if (!$util.isString(message[".google.api.methodSignature"][i])) - return ".google.api.methodSignature: string[] expected"; - } - if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { - var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); - if (error) - return ".google.longrunning.operationInfo." + error; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; return null; }; /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.UninterpretedOption * @static * @param {Object.} object Plain object - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption */ - MethodOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodOptions) + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) return object; - var message = new $root.google.protobuf.MethodOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - switch (object.idempotencyLevel) { - default: - if (typeof object.idempotencyLevel === "number") { - message.idempotencyLevel = object.idempotencyLevel; - break; - } - break; - case "IDEMPOTENCY_UNKNOWN": - case 0: - message.idempotencyLevel = 0; - break; - case "NO_SIDE_EFFECTS": - case 1: - message.idempotencyLevel = 1; - break; - case "IDEMPOTENT": - case 2: - message.idempotencyLevel = 2; - break; - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); } } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - if (object[".google.api.methodSignature"]) { - if (!Array.isArray(object[".google.api.methodSignature"])) - throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); - message[".google.api.methodSignature"] = []; - for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) - message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); - } - if (object[".google.longrunning.operationInfo"] != null) { - if (typeof object[".google.longrunning.operationInfo"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); - } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length >= 0) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); return message; }; /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodOptions.toObject = function toObject(message, options) { + UninterpretedOption.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.methodSignature"] = []; - } + if (options.arrays || options.defaults) + object.name = []; if (options.defaults) { - object.deprecated = false; - object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; - object[".google.longrunning.operationInfo"] = null; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; } - if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) - object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); - if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { - object[".google.api.methodSignature"] = []; - for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) - object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; return object; }; - /** - * Converts this MethodOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MethodOptions - * @instance - * @returns {Object.} JSON object - */ - MethodOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(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]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; - /** - * Gets the default type url for MethodOptions - * @function getTypeUrl - * @memberof google.protobuf.MethodOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodOptions"; - }; + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; - /** - * IdempotencyLevel enum. - * @name google.protobuf.MethodOptions.IdempotencyLevel - * @enum {number} - * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value - * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value - * @property {number} IDEMPOTENT=2 IDEMPOTENT value - */ - MethodOptions.IdempotencyLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; - values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; - values[valuesById[2] = "IDEMPOTENT"] = 2; - return values; - })(); + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; - return MethodOptions; - })(); + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - protobuf.UninterpretedOption = (function() { + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; - /** - * Properties of an UninterpretedOption. - * @memberof google.protobuf - * @interface IUninterpretedOption - * @property {Array.|null} [name] UninterpretedOption name - * @property {string|null} [identifierValue] UninterpretedOption identifierValue - * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue - * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue - * @property {number|null} [doubleValue] UninterpretedOption doubleValue - * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue - * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue - */ + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Constructs a new UninterpretedOption. - * @memberof google.protobuf - * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption - * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - */ - function UninterpretedOption(properties) { - this.name = []; - 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]]; - } + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; - /** - * UninterpretedOption name. - * @member {Array.} name - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.name = $util.emptyArray; + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; - /** - * UninterpretedOption identifierValue. - * @member {string} identifierValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.identifierValue = ""; + return NamePart; + })(); - /** - * UninterpretedOption positiveIntValue. - * @member {number|Long} positiveIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + return UninterpretedOption; + })(); - /** - * UninterpretedOption negativeIntValue. - * @member {number|Long} negativeIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + protobuf.SourceCodeInfo = (function() { /** - * UninterpretedOption doubleValue. - * @member {number} doubleValue - * @memberof google.protobuf.UninterpretedOption - * @instance + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location */ - UninterpretedOption.prototype.doubleValue = 0; /** - * UninterpretedOption stringValue. - * @member {Uint8Array} stringValue - * @memberof google.protobuf.UninterpretedOption - * @instance + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set */ - UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + function SourceCodeInfo(properties) { + this.location = []; + 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]]; + } /** - * UninterpretedOption aggregateValue. - * @member {string} aggregateValue - * @memberof google.protobuf.UninterpretedOption + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo * @instance */ - UninterpretedOption.prototype.aggregateValue = ""; + SourceCodeInfo.prototype.location = $util.emptyArray; /** - * Creates a new UninterpretedOption instance using the specified properties. + * Creates a new SourceCodeInfo instance using the specified properties. * @function create - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance */ - UninterpretedOption.create = function create(properties) { - return new UninterpretedOption(properties); + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); }; /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. * @function encode - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encode = function encode(message, writer) { + SourceCodeInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.name.length) - for (var i = 0; i < message.name.length; ++i) - $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); - if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); - if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); - if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UninterpretedOption message from the specified reader or buffer. + * Decodes a SourceCodeInfo message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.SourceCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UninterpretedOption.decode = function decode(reader, length) { + SourceCodeInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: { - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - } - case 3: { - message.identifierValue = reader.string(); - break; - } - case 4: { - message.positiveIntValue = reader.uint64(); - break; - } - case 5: { - message.negativeIntValue = reader.int64(); - break; - } - case 6: { - message.doubleValue = reader.double(); - break; - } - case 7: { - message.stringValue = reader.bytes(); - break; - } - case 8: { - message.aggregateValue = reader.string(); + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); break; } default: @@ -21523,224 +42192,143 @@ }; /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.SourceCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UninterpretedOption message. + * Verifies a SourceCodeInfo message. * @function verify - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.SourceCodeInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UninterpretedOption.verify = function verify(message) { + SourceCodeInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) { - if (!Array.isArray(message.name)) - return "name: array expected"; - for (var i = 0; i < message.name.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); if (error) - return "name." + error; + return "location." + error; } } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - if (!$util.isString(message.identifierValue)) - return "identifierValue: string expected"; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) - return "positiveIntValue: integer|Long expected"; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) - return "negativeIntValue: integer|Long expected"; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) - return "stringValue: buffer expected"; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - if (!$util.isString(message.aggregateValue)) - return "aggregateValue: string expected"; return null; }; /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.SourceCodeInfo * @static * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo */ - UninterpretedOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption) + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) return object; - var message = new $root.google.protobuf.UninterpretedOption(); - if (object.name) { - if (!Array.isArray(object.name)) - throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); - message.name = []; - for (var i = 0; i < object.name.length; ++i) { - if (typeof object.name[i] !== "object") - throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); - message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); } } - if (object.identifierValue != null) - message.identifierValue = String(object.identifierValue); - if (object.positiveIntValue != null) - if ($util.Long) - (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; - else if (typeof object.positiveIntValue === "string") - message.positiveIntValue = parseInt(object.positiveIntValue, 10); - else if (typeof object.positiveIntValue === "number") - message.positiveIntValue = object.positiveIntValue; - else if (typeof object.positiveIntValue === "object") - message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); - if (object.negativeIntValue != null) - if ($util.Long) - (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; - else if (typeof object.negativeIntValue === "string") - message.negativeIntValue = parseInt(object.negativeIntValue, 10); - else if (typeof object.negativeIntValue === "number") - message.negativeIntValue = object.negativeIntValue; - else if (typeof object.negativeIntValue === "object") - message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.stringValue != null) - if (typeof object.stringValue === "string") - $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length >= 0) - message.stringValue = object.stringValue; - if (object.aggregateValue != null) - message.aggregateValue = String(object.aggregateValue); return message; }; /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UninterpretedOption.toObject = function toObject(message, options) { + SourceCodeInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.name = []; - if (options.defaults) { - object.identifierValue = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.positiveIntValue = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.negativeIntValue = options.longs === String ? "0" : 0; - object.doubleValue = 0; - if (options.bytes === String) - object.stringValue = ""; - else { - object.stringValue = []; - if (options.bytes !== Array) - object.stringValue = $util.newBuffer(object.stringValue); - } - object.aggregateValue = ""; - } - if (message.name && message.name.length) { - object.name = []; - for (var j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - object.identifierValue = message.identifierValue; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (typeof message.positiveIntValue === "number") - object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; - else - object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (typeof message.negativeIntValue === "number") - object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; - else - object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - object.aggregateValue = message.aggregateValue; return object; }; /** - * Converts this UninterpretedOption to JSON. + * Converts this SourceCodeInfo to JSON. * @function toJSON - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.SourceCodeInfo * @instance * @returns {Object.} JSON object */ - UninterpretedOption.prototype.toJSON = function toJSON() { + SourceCodeInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UninterpretedOption + * Gets the default type url for SourceCodeInfo * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.SourceCodeInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; }; - UninterpretedOption.NamePart = (function() { + SourceCodeInfo.Location = (function() { /** - * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart - * @property {string} namePart NamePart namePart - * @property {boolean} isExtension NamePart isExtension + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments */ /** - * Constructs a new NamePart. - * @memberof google.protobuf.UninterpretedOption - * @classdesc Represents a NamePart. - * @implements INamePart + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation * @constructor - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set */ - function NamePart(properties) { + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21748,87 +42336,156 @@ } /** - * NamePart namePart. - * @member {string} namePart - * @memberof google.protobuf.UninterpretedOption.NamePart + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location * @instance */ - NamePart.prototype.namePart = ""; + Location.prototype.path = $util.emptyArray; /** - * NamePart isExtension. - * @member {boolean} isExtension - * @memberof google.protobuf.UninterpretedOption.NamePart + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location * @instance */ - NamePart.prototype.isExtension = false; + Location.prototype.span = $util.emptyArray; /** - * Creates a new NamePart instance using the specified properties. + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. * @function create - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance */ - NamePart.create = function create(properties) { - return new NamePart(properties); + Location.create = function create(properties) { + return new Location(properties); }; /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. * @function encode - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NamePart.encode = function encode(message, writer) { + Location.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); return writer; }; /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NamePart.encodeDelimited = function encodeDelimited(message, writer) { + Location.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NamePart message from the specified reader or buffer. + * Decodes a Location message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.protobuf.SourceCodeInfo.Location * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @returns {google.protobuf.SourceCodeInfo.Location} Location * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NamePart.decode = function decode(reader, length) { + Location.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.namePart = reader.string(); + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); break; } case 2: { - message.isExtension = reader.bool(); + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); break; } default: @@ -21836,141 +42493,201 @@ break; } } - if (!message.hasOwnProperty("namePart")) - throw $util.ProtocolError("missing required 'namePart'", { instance: message }); - if (!message.hasOwnProperty("isExtension")) - throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); return message; }; /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. + * Decodes a Location message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.protobuf.SourceCodeInfo.Location * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @returns {google.protobuf.SourceCodeInfo.Location} Location * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NamePart.decodeDelimited = function decodeDelimited(reader) { + Location.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NamePart message. + * Verifies a Location message. * @function verify - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.protobuf.SourceCodeInfo.Location * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NamePart.verify = function verify(message) { + Location.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (!$util.isString(message.namePart)) - return "namePart: string expected"; - if (typeof message.isExtension !== "boolean") - return "isExtension: boolean expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } return null; }; /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * Creates a Location message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.protobuf.SourceCodeInfo.Location * @static * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @returns {google.protobuf.SourceCodeInfo.Location} Location */ - NamePart.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) return object; - var message = new $root.google.protobuf.UninterpretedOption.NamePart(); - if (object.namePart != null) - message.namePart = String(object.namePart); - if (object.isExtension != null) - message.isExtension = Boolean(object.isExtension); + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } return message; }; /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * Creates a plain object from a Location message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.protobuf.SourceCodeInfo.Location * @static - * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {google.protobuf.SourceCodeInfo.Location} message Location * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NamePart.toObject = function toObject(message, options) { + Location.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } if (options.defaults) { - object.namePart = ""; - object.isExtension = false; + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; } - if (message.namePart != null && message.hasOwnProperty("namePart")) - object.namePart = message.namePart; - if (message.isExtension != null && message.hasOwnProperty("isExtension")) - object.isExtension = message.isExtension; return object; }; /** - * Converts this NamePart to JSON. + * Converts this Location to JSON. * @function toJSON - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.protobuf.SourceCodeInfo.Location * @instance * @returns {Object.} JSON object */ - NamePart.prototype.toJSON = function toJSON() { + Location.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for NamePart + * Gets the default type url for Location * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption.NamePart + * @memberof google.protobuf.SourceCodeInfo.Location * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; }; - return NamePart; + return Location; })(); - return UninterpretedOption; + return SourceCodeInfo; })(); - protobuf.SourceCodeInfo = (function() { + protobuf.GeneratedCodeInfo = (function() { /** - * Properties of a SourceCodeInfo. + * Properties of a GeneratedCodeInfo. * @memberof google.protobuf - * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation */ /** - * Constructs a new SourceCodeInfo. + * Constructs a new GeneratedCodeInfo. * @memberof google.protobuf - * @classdesc Represents a SourceCodeInfo. - * @implements ISourceCodeInfo + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo * @constructor - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set */ - function SourceCodeInfo(properties) { - this.location = []; + function GeneratedCodeInfo(properties) { + this.annotation = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21978,78 +42695,78 @@ } /** - * SourceCodeInfo location. - * @member {Array.} location - * @memberof google.protobuf.SourceCodeInfo + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo * @instance */ - SourceCodeInfo.prototype.location = $util.emptyArray; + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; /** - * Creates a new SourceCodeInfo instance using the specified properties. + * Creates a new GeneratedCodeInfo instance using the specified properties. * @function create - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance */ - SourceCodeInfo.create = function create(properties) { - return new SourceCodeInfo(properties); + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); }; /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. * @function encode - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encode = function encode(message, writer) { + GeneratedCodeInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.location != null && message.location.length) - for (var i = 0; i < message.location.length; ++i) - $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceCodeInfo.decode = function decode(reader, length) { + GeneratedCodeInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); break; } default: @@ -22061,143 +42778,141 @@ }; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SourceCodeInfo message. + * Verifies a GeneratedCodeInfo message. * @function verify - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SourceCodeInfo.verify = function verify(message) { + GeneratedCodeInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) { - if (!Array.isArray(message.location)) - return "location: array expected"; - for (var i = 0; i < message.location.length; ++i) { - var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); if (error) - return "location." + error; + return "annotation." + error; } } return null; }; /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo */ - SourceCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo) + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) return object; - var message = new $root.google.protobuf.SourceCodeInfo(); - if (object.location) { - if (!Array.isArray(object.location)) - throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); - message.location = []; - for (var i = 0; i < object.location.length; ++i) { - if (typeof object.location[i] !== "object") - throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); - message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); } } return message; }; /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SourceCodeInfo.toObject = function toObject(message, options) { + GeneratedCodeInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.location = []; - if (message.location && message.location.length) { - object.location = []; - for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); } return object; }; /** - * Converts this SourceCodeInfo to JSON. + * Converts this GeneratedCodeInfo to JSON. * @function toJSON - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.GeneratedCodeInfo * @instance * @returns {Object.} JSON object */ - SourceCodeInfo.prototype.toJSON = function toJSON() { + GeneratedCodeInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SourceCodeInfo + * Gets the default type url for GeneratedCodeInfo * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; }; - SourceCodeInfo.Location = (function() { + GeneratedCodeInfo.Annotation = (function() { /** - * Properties of a Location. - * @memberof google.protobuf.SourceCodeInfo - * @interface ILocation - * @property {Array.|null} [path] Location path - * @property {Array.|null} [span] Location span - * @property {string|null} [leadingComments] Location leadingComments - * @property {string|null} [trailingComments] Location trailingComments - * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic */ /** - * Constructs a new Location. - * @memberof google.protobuf.SourceCodeInfo - * @classdesc Represents a Location. - * @implements ILocation + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation * @constructor - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set */ - function Location(properties) { + function Annotation(properties) { this.path = []; - this.span = []; - this.leadingDetachedComments = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22205,67 +42920,67 @@ } /** - * Location path. + * Annotation path. * @member {Array.} path - * @memberof google.protobuf.SourceCodeInfo.Location + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @instance */ - Location.prototype.path = $util.emptyArray; + Annotation.prototype.path = $util.emptyArray; /** - * Location span. - * @member {Array.} span - * @memberof google.protobuf.SourceCodeInfo.Location + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @instance */ - Location.prototype.span = $util.emptyArray; + Annotation.prototype.sourceFile = ""; /** - * Location leadingComments. - * @member {string} leadingComments - * @memberof google.protobuf.SourceCodeInfo.Location + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @instance */ - Location.prototype.leadingComments = ""; + Annotation.prototype.begin = 0; /** - * Location trailingComments. - * @member {string} trailingComments - * @memberof google.protobuf.SourceCodeInfo.Location + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @instance */ - Location.prototype.trailingComments = ""; + Annotation.prototype.end = 0; /** - * Location leadingDetachedComments. - * @member {Array.} leadingDetachedComments - * @memberof google.protobuf.SourceCodeInfo.Location + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @instance */ - Location.prototype.leadingDetachedComments = $util.emptyArray; + Annotation.prototype.semantic = 0; /** - * Creates a new Location instance using the specified properties. + * Creates a new Annotation instance using the specified properties. * @function create - * @memberof google.protobuf.SourceCodeInfo.Location + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance */ - Location.create = function create(properties) { - return new Location(properties); + Annotation.create = function create(properties) { + return new Annotation(properties); }; /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. * @function encode - * @memberof google.protobuf.SourceCodeInfo.Location + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Location.encode = function encode(message, writer) { + Annotation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.path != null && message.path.length) { @@ -22274,50 +42989,45 @@ writer.int32(message.path[i]); writer.ldelim(); } - if (message.span != null && message.span.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.span.length; ++i) - writer.int32(message.span[i]); - writer.ldelim(); - } - if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); - if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); - if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); return writer; }; /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Location.encodeDelimited = function encodeDelimited(message, writer) { + Annotation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Location message from the specified reader or buffer. + * Decodes an Annotation message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.SourceCodeInfo.Location + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Location.decode = function decode(reader, length) { + Annotation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -22333,28 +43043,19 @@ break; } case 2: { - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); + message.sourceFile = reader.string(); break; } case 3: { - message.leadingComments = reader.string(); + message.begin = reader.int32(); break; } case 4: { - message.trailingComments = reader.string(); + message.end = reader.int32(); break; } - case 6: { - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); + case 5: { + message.semantic = reader.int32(); break; } default: @@ -22366,30 +43067,30 @@ }; /** - * Decodes a Location message from the specified reader or buffer, length delimited. + * Decodes an Annotation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Location.decodeDelimited = function decodeDelimited(reader) { + Annotation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Location message. + * Verifies an Annotation message. * @function verify - * @memberof google.protobuf.SourceCodeInfo.Location + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Location.verify = function verify(message) { + Annotation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.path != null && message.hasOwnProperty("path")) { @@ -22399,164 +43100,420 @@ if (!$util.isInteger(message.path[i])) return "path: integer[] expected"; } - if (message.span != null && message.hasOwnProperty("span")) { - if (!Array.isArray(message.span)) - return "span: array expected"; - for (var i = 0; i < message.span.length; ++i) - if (!$util.isInteger(message.span[i])) - return "span: integer[] expected"; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - if (!$util.isString(message.leadingComments)) - return "leadingComments: string expected"; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - if (!$util.isString(message.trailingComments)) - return "trailingComments: string expected"; - if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { - if (!Array.isArray(message.leadingDetachedComments)) - return "leadingDetachedComments: array expected"; - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - if (!$util.isString(message.leadingDetachedComments[i])) - return "leadingDetachedComments: string[] expected"; - } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.SourceCodeInfo.Location + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation */ - Location.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) return object; - var message = new $root.google.protobuf.SourceCodeInfo.Location(); + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.span) { - if (!Array.isArray(object.span)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); - message.span = []; - for (var i = 0; i < object.span.length; ++i) - message.span[i] = object.span[i] | 0; + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; } - if (object.leadingComments != null) - message.leadingComments = String(object.leadingComments); - if (object.trailingComments != null) - message.trailingComments = String(object.trailingComments); - if (object.leadingDetachedComments) { - if (!Array.isArray(object.leadingDetachedComments)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); - message.leadingDetachedComments = []; - for (var i = 0; i < object.leadingDetachedComments.length; ++i) - message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; } return message; }; /** - * Creates a plain object from a Location message. Also converts values to other types if specified. + * Creates a plain object from an Annotation message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.SourceCodeInfo.Location + * @memberof google.protobuf.GeneratedCodeInfo.Annotation * @static - * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Location.toObject = function toObject(message, options) { + Annotation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { + if (options.arrays || options.defaults) object.path = []; - object.span = []; - object.leadingDetachedComments = []; - } if (options.defaults) { - object.leadingComments = ""; - object.trailingComments = ""; + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; } if (message.path && message.path.length) { object.path = []; for (var j = 0; j < message.path.length; ++j) object.path[j] = message.path[j]; } - if (message.span && message.span.length) { - object.span = []; - for (var j = 0; j < message.span.length; ++j) - object.span[j] = message.span[j]; + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - object.leadingComments = message.leadingComments; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - object.trailingComments = message.trailingComments; - if (message.leadingDetachedComments && message.leadingDetachedComments.length) { - object.leadingDetachedComments = []; - for (var j = 0; j < message.leadingDetachedComments.length; ++j) - object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(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]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) return object; - }; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; - /** - * Converts this Location to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - * @returns {Object.} JSON object - */ - Location.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; - /** - * Gets the default type url for Location - * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; - }; + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Location; - })(); + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; - return SourceCodeInfo; + return Duration; })(); - protobuf.GeneratedCodeInfo = (function() { + protobuf.Timestamp = (function() { /** - * Properties of a GeneratedCodeInfo. + * Properties of a Timestamp. * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos */ /** - * Constructs a new GeneratedCodeInfo. + * Constructs a new Timestamp. * @memberof google.protobuf - * @classdesc Represents a GeneratedCodeInfo. - * @implements IGeneratedCodeInfo + * @classdesc Represents a Timestamp. + * @implements ITimestamp * @constructor - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @param {google.protobuf.ITimestamp=} [properties] Properties to set */ - function GeneratedCodeInfo(properties) { - this.annotation = []; + function Timestamp(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22564,78 +43521,89 @@ } /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp * @instance */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new GeneratedCodeInfo instance using the specified properties. + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. * @function create - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance */ - GeneratedCodeInfo.create = function create(properties) { - return new GeneratedCodeInfo(properties); + Timestamp.create = function create(properties) { + return new Timestamp(properties); }; /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encode - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GeneratedCodeInfo.encode = function encode(message, writer) { + Timestamp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.annotation != null && message.annotation.length) - for (var i = 0; i < message.annotation.length; ++i) - $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); return writer; }; /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * Decodes a Timestamp message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.Timestamp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @returns {google.protobuf.Timestamp} Timestamp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GeneratedCodeInfo.decode = function decode(reader, length) { + Timestamp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); break; } default: @@ -22647,501 +43615,348 @@ }; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * Decodes a Timestamp message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.Timestamp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @returns {google.protobuf.Timestamp} Timestamp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + Timestamp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GeneratedCodeInfo message. + * Verifies a Timestamp message. * @function verify - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.Timestamp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GeneratedCodeInfo.verify = function verify(message) { + Timestamp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.annotation != null && message.hasOwnProperty("annotation")) { - if (!Array.isArray(message.annotation)) - return "annotation: array expected"; - for (var i = 0; i < message.annotation.length; ++i) { - var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); - if (error) - return "annotation." + error; - } - } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; return null; }; /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.Timestamp * @static * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @returns {google.protobuf.Timestamp} Timestamp */ - GeneratedCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) return object; - var message = new $root.google.protobuf.GeneratedCodeInfo(); - if (object.annotation) { - if (!Array.isArray(object.annotation)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); - message.annotation = []; - for (var i = 0; i < object.annotation.length; ++i) { - if (typeof object.annotation[i] !== "object") - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); - message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); - } - } + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; return message; }; /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {google.protobuf.Timestamp} message Timestamp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GeneratedCodeInfo.toObject = function toObject(message, options) { + Timestamp.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.annotation = []; - if (message.annotation && message.annotation.length) { - object.annotation = []; - for (var j = 0; j < message.annotation.length; ++j) - object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; return object; }; /** - * Converts this GeneratedCodeInfo to JSON. + * Converts this Timestamp to JSON. * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.Timestamp * @instance * @returns {Object.} JSON object */ - GeneratedCodeInfo.prototype.toJSON = function toJSON() { + Timestamp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GeneratedCodeInfo + * Gets the default type url for Timestamp * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.Timestamp * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + return typeUrlPrefix + "/google.protobuf.Timestamp"; }; - GeneratedCodeInfo.Annotation = (function() { - - /** - * Properties of an Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @interface IAnnotation - * @property {Array.|null} [path] Annotation path - * @property {string|null} [sourceFile] Annotation sourceFile - * @property {number|null} [begin] Annotation begin - * @property {number|null} [end] Annotation end - * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic - */ - - /** - * Constructs a new Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @classdesc Represents an Annotation. - * @implements IAnnotation - * @constructor - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - */ - function Annotation(properties) { - this.path = []; - 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]]; - } - - /** - * Annotation path. - * @member {Array.} path - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.path = $util.emptyArray; - - /** - * Annotation sourceFile. - * @member {string} sourceFile - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.sourceFile = ""; - - /** - * Annotation begin. - * @member {number} begin - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.begin = 0; - - /** - * Annotation end. - * @member {number} end - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.end = 0; - - /** - * Annotation semantic. - * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.semantic = 0; - - /** - * Creates a new Annotation instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance - */ - Annotation.create = function create(properties) { - return new Annotation(properties); - }; + return Timestamp; + })(); - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); - if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); - if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); - return writer; - }; + protobuf.DoubleValue = (function() { - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a DoubleValue. + * @memberof google.protobuf + * @interface IDoubleValue + * @property {number|null} [value] DoubleValue value + */ - /** - * Decodes an Annotation message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - message.sourceFile = reader.string(); - break; - } - case 3: { - message.begin = reader.int32(); - break; - } - case 4: { - message.end = reader.int32(); - break; - } - case 5: { - message.semantic = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Constructs a new DoubleValue. + * @memberof google.protobuf + * @classdesc Represents a DoubleValue. + * @implements IDoubleValue + * @constructor + * @param {google.protobuf.IDoubleValue=} [properties] Properties to set + */ + function DoubleValue(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]]; + } - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * DoubleValue value. + * @member {number} value + * @memberof google.protobuf.DoubleValue + * @instance + */ + DoubleValue.prototype.value = 0; - /** - * Verifies an Annotation message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Annotation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - if (!$util.isString(message.sourceFile)) - return "sourceFile: string expected"; - if (message.begin != null && message.hasOwnProperty("begin")) - if (!$util.isInteger(message.begin)) - return "begin: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.semantic != null && message.hasOwnProperty("semantic")) - switch (message.semantic) { - default: - return "semantic: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; + /** + * Creates a new DoubleValue instance using the specified properties. + * @function create + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue=} [properties] Properties to set + * @returns {google.protobuf.DoubleValue} DoubleValue instance + */ + DoubleValue.create = function create(properties) { + return new DoubleValue(properties); + }; - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - */ - Annotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.sourceFile != null) - message.sourceFile = String(object.sourceFile); - if (object.begin != null) - message.begin = object.begin | 0; - if (object.end != null) - message.end = object.end | 0; - switch (object.semantic) { - default: - if (typeof object.semantic === "number") { - message.semantic = object.semantic; + /** + * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DoubleValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); + return writer; + }; + + /** + * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DoubleValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DoubleValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DoubleValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DoubleValue} DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DoubleValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DoubleValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.double(); break; } - break; - case "NONE": - case 0: - message.semantic = 0; - break; - case "SET": - case 1: - message.semantic = 1; - break; - case "ALIAS": - case 2: - message.semantic = 2; + default: + reader.skipType(tag & 7); break; } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Annotation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.path = []; - if (options.defaults) { - object.sourceFile = ""; - object.begin = 0; - object.end = 0; - object.semantic = options.enums === String ? "NONE" : 0; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - object.sourceFile = message.sourceFile; - if (message.begin != null && message.hasOwnProperty("begin")) - object.begin = message.begin; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.semantic != null && message.hasOwnProperty("semantic")) - object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + /** + * Decodes a DoubleValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DoubleValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DoubleValue} DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DoubleValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DoubleValue message. + * @function verify + * @memberof google.protobuf.DoubleValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DoubleValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + return null; + }; + + /** + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DoubleValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DoubleValue} DoubleValue + */ + DoubleValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DoubleValue) return object; - }; - - /** - * Converts this Annotation to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - * @returns {Object.} JSON object - */ - Annotation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + var message = new $root.google.protobuf.DoubleValue(); + if (object.value != null) + message.value = Number(object.value); + return message; + }; - /** - * Gets the default type url for Annotation - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; - }; + /** + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.DoubleValue} message DoubleValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DoubleValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + return object; + }; - /** - * Semantic enum. - * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic - * @enum {number} - * @property {number} NONE=0 NONE value - * @property {number} SET=1 SET value - * @property {number} ALIAS=2 ALIAS value - */ - Annotation.Semantic = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NONE"] = 0; - values[valuesById[1] = "SET"] = 1; - values[valuesById[2] = "ALIAS"] = 2; - return values; - })(); + /** + * Converts this DoubleValue to JSON. + * @function toJSON + * @memberof google.protobuf.DoubleValue + * @instance + * @returns {Object.} JSON object + */ + DoubleValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Annotation; - })(); + /** + * Gets the default type url for DoubleValue + * @function getTypeUrl + * @memberof google.protobuf.DoubleValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DoubleValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DoubleValue"; + }; - return GeneratedCodeInfo; + return DoubleValue; })(); - protobuf.Duration = (function() { + protobuf.FloatValue = (function() { /** - * Properties of a Duration. + * Properties of a FloatValue. * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos + * @interface IFloatValue + * @property {number|null} [value] FloatValue value */ /** - * Constructs a new Duration. + * Constructs a new FloatValue. * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration + * @classdesc Represents a FloatValue. + * @implements IFloatValue * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set + * @param {google.protobuf.IFloatValue=} [properties] Properties to set */ - function Duration(properties) { + function FloatValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23149,89 +43964,75 @@ } /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration + * FloatValue value. + * @member {number} value + * @memberof google.protobuf.FloatValue * @instance */ - Duration.prototype.nanos = 0; + FloatValue.prototype.value = 0; /** - * Creates a new Duration instance using the specified properties. + * Creates a new FloatValue instance using the specified properties. * @function create - * @memberof google.protobuf.Duration + * @memberof google.protobuf.FloatValue * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance + * @param {google.protobuf.IFloatValue=} [properties] Properties to set + * @returns {google.protobuf.FloatValue} FloatValue instance */ - Duration.create = function create(properties) { - return new Duration(properties); + FloatValue.create = function create(properties) { + return new FloatValue(properties); }; /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. * @function encode - * @memberof google.protobuf.Duration + * @memberof google.protobuf.FloatValue * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Duration.encode = function encode(message, writer) { + FloatValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); return writer; }; /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Duration + * @memberof google.protobuf.FloatValue * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { + FloatValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Duration message from the specified reader or buffer. + * Decodes a FloatValue message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Duration + * @memberof google.protobuf.FloatValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration + * @returns {google.protobuf.FloatValue} FloatValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Duration.decode = function decode(reader, length) { + FloatValue.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FloatValue(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); + message.value = reader.float(); break; } default: @@ -23243,146 +44044,122 @@ }; /** - * Decodes a Duration message from the specified reader or buffer, length delimited. + * Decodes a FloatValue message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Duration + * @memberof google.protobuf.FloatValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration + * @returns {google.protobuf.FloatValue} FloatValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Duration.decodeDelimited = function decodeDelimited(reader) { + FloatValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Duration message. + * Verifies a FloatValue message. * @function verify - * @memberof google.protobuf.Duration + * @memberof google.protobuf.FloatValue * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Duration.verify = function verify(message) { + FloatValue.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; return null; }; /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Duration + * @memberof google.protobuf.FloatValue * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration + * @returns {google.protobuf.FloatValue} FloatValue */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) + FloatValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FloatValue) return object; - var message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; + var message = new $root.google.protobuf.FloatValue(); + if (object.value != null) + message.value = Number(object.value); return message; }; /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Duration + * @memberof google.protobuf.FloatValue * @static - * @param {google.protobuf.Duration} message Duration + * @param {google.protobuf.FloatValue} message FloatValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Duration.toObject = function toObject(message, options) { + FloatValue.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; return object; }; /** - * Converts this Duration to JSON. + * Converts this FloatValue to JSON. * @function toJSON - * @memberof google.protobuf.Duration + * @memberof google.protobuf.FloatValue * @instance * @returns {Object.} JSON object */ - Duration.prototype.toJSON = function toJSON() { + FloatValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Duration + * Gets the default type url for FloatValue * @function getTypeUrl - * @memberof google.protobuf.Duration + * @memberof google.protobuf.FloatValue * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FloatValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.Duration"; + return typeUrlPrefix + "/google.protobuf.FloatValue"; }; - return Duration; + return FloatValue; })(); - protobuf.Timestamp = (function() { + protobuf.Int64Value = (function() { /** - * Properties of a Timestamp. + * Properties of an Int64Value. * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos + * @interface IInt64Value + * @property {number|Long|null} [value] Int64Value value */ /** - * Constructs a new Timestamp. + * Constructs a new Int64Value. * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp + * @classdesc Represents an Int64Value. + * @implements IInt64Value * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @param {google.protobuf.IInt64Value=} [properties] Properties to set */ - function Timestamp(properties) { + function Int64Value(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23390,89 +44167,75 @@ } /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp + * Int64Value value. + * @member {number|Long} value + * @memberof google.protobuf.Int64Value * @instance */ - Timestamp.prototype.nanos = 0; + Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new Timestamp instance using the specified properties. + * Creates a new Int64Value instance using the specified properties. * @function create - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Int64Value * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance + * @param {google.protobuf.IInt64Value=} [properties] Properties to set + * @returns {google.protobuf.Int64Value} Int64Value instance */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); + Int64Value.create = function create(properties) { + return new Int64Value(properties); }; /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. * @function encode - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Int64Value * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Timestamp.encode = function encode(message, writer) { + Int64Value.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value); return writer; }; /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Int64Value * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + Int64Value.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Timestamp message from the specified reader or buffer. + * Decodes an Int64Value message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Int64Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.protobuf.Int64Value} Int64Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Timestamp.decode = function decode(reader, length) { + Int64Value.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Int64Value(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); + message.value = reader.int64(); break; } default: @@ -23484,145 +44247,136 @@ }; /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * Decodes an Int64Value message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Int64Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.protobuf.Int64Value} Int64Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { + Int64Value.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Timestamp message. + * Verifies an Int64Value message. * @function verify - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Int64Value * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Timestamp.verify = function verify(message) { + Int64Value.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; return null; }; /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Int64Value * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.protobuf.Int64Value} Int64Value */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) + Int64Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Int64Value) return object; - var message = new $root.google.protobuf.Timestamp(); - if (object.seconds != null) + var message = new $root.google.protobuf.Int64Value(); + if (object.value != null) if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; + (message.value = $util.Long.fromValue(object.value)).unsigned = false; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Int64Value * @static - * @param {google.protobuf.Timestamp} message Timestamp + * @param {google.protobuf.Int64Value} message Int64Value * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Timestamp.toObject = function toObject(message, options) { + Int64Value.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; return object; }; /** - * Converts this Timestamp to JSON. + * Converts this Int64Value to JSON. * @function toJSON - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Int64Value * @instance * @returns {Object.} JSON object */ - Timestamp.prototype.toJSON = function toJSON() { + Int64Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Timestamp + * Gets the default type url for Int64Value * @function getTypeUrl - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.Int64Value * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Int64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.Timestamp"; + return typeUrlPrefix + "/google.protobuf.Int64Value"; }; - return Timestamp; + return Int64Value; })(); - protobuf.DoubleValue = (function() { + protobuf.UInt64Value = (function() { /** - * Properties of a DoubleValue. + * Properties of a UInt64Value. * @memberof google.protobuf - * @interface IDoubleValue - * @property {number|null} [value] DoubleValue value + * @interface IUInt64Value + * @property {number|Long|null} [value] UInt64Value value */ /** - * Constructs a new DoubleValue. + * Constructs a new UInt64Value. * @memberof google.protobuf - * @classdesc Represents a DoubleValue. - * @implements IDoubleValue + * @classdesc Represents a UInt64Value. + * @implements IUInt64Value * @constructor - * @param {google.protobuf.IDoubleValue=} [properties] Properties to set + * @param {google.protobuf.IUInt64Value=} [properties] Properties to set */ - function DoubleValue(properties) { + function UInt64Value(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23630,75 +44384,75 @@ } /** - * DoubleValue value. - * @member {number} value - * @memberof google.protobuf.DoubleValue + * UInt64Value value. + * @member {number|Long} value + * @memberof google.protobuf.UInt64Value * @instance */ - DoubleValue.prototype.value = 0; + UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * Creates a new DoubleValue instance using the specified properties. + * Creates a new UInt64Value instance using the specified properties. * @function create - * @memberof google.protobuf.DoubleValue + * @memberof google.protobuf.UInt64Value * @static - * @param {google.protobuf.IDoubleValue=} [properties] Properties to set - * @returns {google.protobuf.DoubleValue} DoubleValue instance + * @param {google.protobuf.IUInt64Value=} [properties] Properties to set + * @returns {google.protobuf.UInt64Value} UInt64Value instance */ - DoubleValue.create = function create(properties) { - return new DoubleValue(properties); + UInt64Value.create = function create(properties) { + return new UInt64Value(properties); }; /** - * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. * @function encode - * @memberof google.protobuf.DoubleValue + * @memberof google.protobuf.UInt64Value * @static - * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode + * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DoubleValue.encode = function encode(message, writer) { + UInt64Value.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.value); return writer; }; /** - * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.DoubleValue + * @memberof google.protobuf.UInt64Value * @static - * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode + * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DoubleValue.encodeDelimited = function encodeDelimited(message, writer) { + UInt64Value.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DoubleValue message from the specified reader or buffer. + * Decodes a UInt64Value message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.DoubleValue + * @memberof google.protobuf.UInt64Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DoubleValue} DoubleValue + * @returns {google.protobuf.UInt64Value} UInt64Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DoubleValue.decode = function decode(reader, length) { + UInt64Value.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DoubleValue(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UInt64Value(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.value = reader.double(); + message.value = reader.uint64(); break; } default: @@ -23710,122 +44464,136 @@ }; /** - * Decodes a DoubleValue message from the specified reader or buffer, length delimited. + * Decodes a UInt64Value message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.DoubleValue + * @memberof google.protobuf.UInt64Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DoubleValue} DoubleValue + * @returns {google.protobuf.UInt64Value} UInt64Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DoubleValue.decodeDelimited = function decodeDelimited(reader) { + UInt64Value.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DoubleValue message. + * Verifies a UInt64Value message. * @function verify - * @memberof google.protobuf.DoubleValue + * @memberof google.protobuf.UInt64Value * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DoubleValue.verify = function verify(message) { + UInt64Value.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "number") - return "value: number expected"; + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; return null; }; /** - * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.DoubleValue + * @memberof google.protobuf.UInt64Value * @static * @param {Object.} object Plain object - * @returns {google.protobuf.DoubleValue} DoubleValue + * @returns {google.protobuf.UInt64Value} UInt64Value */ - DoubleValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DoubleValue) + UInt64Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UInt64Value) return object; - var message = new $root.google.protobuf.DoubleValue(); + var message = new $root.google.protobuf.UInt64Value(); if (object.value != null) - message.value = Number(object.value); + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = true; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true); return message; }; /** - * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.DoubleValue + * @memberof google.protobuf.UInt64Value * @static - * @param {google.protobuf.DoubleValue} message DoubleValue + * @param {google.protobuf.UInt64Value} message UInt64Value * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DoubleValue.toObject = function toObject(message, options) { + UInt64Value.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.value = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; return object; }; /** - * Converts this DoubleValue to JSON. + * Converts this UInt64Value to JSON. * @function toJSON - * @memberof google.protobuf.DoubleValue + * @memberof google.protobuf.UInt64Value * @instance * @returns {Object.} JSON object */ - DoubleValue.prototype.toJSON = function toJSON() { + UInt64Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DoubleValue + * Gets the default type url for UInt64Value * @function getTypeUrl - * @memberof google.protobuf.DoubleValue + * @memberof google.protobuf.UInt64Value * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DoubleValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UInt64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.DoubleValue"; + return typeUrlPrefix + "/google.protobuf.UInt64Value"; }; - return DoubleValue; + return UInt64Value; })(); - protobuf.FloatValue = (function() { + protobuf.Int32Value = (function() { /** - * Properties of a FloatValue. + * Properties of an Int32Value. * @memberof google.protobuf - * @interface IFloatValue - * @property {number|null} [value] FloatValue value + * @interface IInt32Value + * @property {number|null} [value] Int32Value value */ /** - * Constructs a new FloatValue. + * Constructs a new Int32Value. * @memberof google.protobuf - * @classdesc Represents a FloatValue. - * @implements IFloatValue + * @classdesc Represents an Int32Value. + * @implements IInt32Value * @constructor - * @param {google.protobuf.IFloatValue=} [properties] Properties to set + * @param {google.protobuf.IInt32Value=} [properties] Properties to set */ - function FloatValue(properties) { + function Int32Value(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23833,75 +44601,75 @@ } /** - * FloatValue value. + * Int32Value value. * @member {number} value - * @memberof google.protobuf.FloatValue + * @memberof google.protobuf.Int32Value * @instance */ - FloatValue.prototype.value = 0; + Int32Value.prototype.value = 0; /** - * Creates a new FloatValue instance using the specified properties. + * Creates a new Int32Value instance using the specified properties. * @function create - * @memberof google.protobuf.FloatValue + * @memberof google.protobuf.Int32Value * @static - * @param {google.protobuf.IFloatValue=} [properties] Properties to set - * @returns {google.protobuf.FloatValue} FloatValue instance + * @param {google.protobuf.IInt32Value=} [properties] Properties to set + * @returns {google.protobuf.Int32Value} Int32Value instance */ - FloatValue.create = function create(properties) { - return new FloatValue(properties); + Int32Value.create = function create(properties) { + return new Int32Value(properties); }; /** - * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. * @function encode - * @memberof google.protobuf.FloatValue + * @memberof google.protobuf.Int32Value * @static - * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode + * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FloatValue.encode = function encode(message, writer) { + Int32Value.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.value); return writer; }; /** - * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FloatValue + * @memberof google.protobuf.Int32Value * @static - * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode + * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FloatValue.encodeDelimited = function encodeDelimited(message, writer) { + Int32Value.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FloatValue message from the specified reader or buffer. + * Decodes an Int32Value message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FloatValue + * @memberof google.protobuf.Int32Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FloatValue} FloatValue + * @returns {google.protobuf.Int32Value} Int32Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FloatValue.decode = function decode(reader, length) { + Int32Value.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FloatValue(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Int32Value(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.value = reader.float(); + message.value = reader.int32(); break; } default: @@ -23913,122 +44681,122 @@ }; /** - * Decodes a FloatValue message from the specified reader or buffer, length delimited. + * Decodes an Int32Value message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FloatValue + * @memberof google.protobuf.Int32Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FloatValue} FloatValue + * @returns {google.protobuf.Int32Value} Int32Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FloatValue.decodeDelimited = function decodeDelimited(reader) { + Int32Value.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FloatValue message. + * Verifies an Int32Value message. * @function verify - * @memberof google.protobuf.FloatValue + * @memberof google.protobuf.Int32Value * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FloatValue.verify = function verify(message) { + Int32Value.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "number") - return "value: number expected"; + if (!$util.isInteger(message.value)) + return "value: integer expected"; return null; }; /** - * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. + * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FloatValue + * @memberof google.protobuf.Int32Value * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FloatValue} FloatValue + * @returns {google.protobuf.Int32Value} Int32Value */ - FloatValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FloatValue) + Int32Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Int32Value) return object; - var message = new $root.google.protobuf.FloatValue(); + var message = new $root.google.protobuf.Int32Value(); if (object.value != null) - message.value = Number(object.value); + message.value = object.value | 0; return message; }; /** - * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FloatValue + * @memberof google.protobuf.Int32Value * @static - * @param {google.protobuf.FloatValue} message FloatValue + * @param {google.protobuf.Int32Value} message Int32Value * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FloatValue.toObject = function toObject(message, options) { + Int32Value.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.value = 0; if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + object.value = message.value; return object; }; /** - * Converts this FloatValue to JSON. + * Converts this Int32Value to JSON. * @function toJSON - * @memberof google.protobuf.FloatValue + * @memberof google.protobuf.Int32Value * @instance * @returns {Object.} JSON object */ - FloatValue.prototype.toJSON = function toJSON() { + Int32Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FloatValue + * Gets the default type url for Int32Value * @function getTypeUrl - * @memberof google.protobuf.FloatValue + * @memberof google.protobuf.Int32Value * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FloatValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Int32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FloatValue"; + return typeUrlPrefix + "/google.protobuf.Int32Value"; }; - return FloatValue; + return Int32Value; })(); - protobuf.Int64Value = (function() { + protobuf.UInt32Value = (function() { /** - * Properties of an Int64Value. + * Properties of a UInt32Value. * @memberof google.protobuf - * @interface IInt64Value - * @property {number|Long|null} [value] Int64Value value + * @interface IUInt32Value + * @property {number|null} [value] UInt32Value value */ /** - * Constructs a new Int64Value. + * Constructs a new UInt32Value. * @memberof google.protobuf - * @classdesc Represents an Int64Value. - * @implements IInt64Value + * @classdesc Represents a UInt32Value. + * @implements IUInt32Value * @constructor - * @param {google.protobuf.IInt64Value=} [properties] Properties to set + * @param {google.protobuf.IUInt32Value=} [properties] Properties to set */ - function Int64Value(properties) { + function UInt32Value(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24036,75 +44804,75 @@ } /** - * Int64Value value. - * @member {number|Long} value - * @memberof google.protobuf.Int64Value + * UInt32Value value. + * @member {number} value + * @memberof google.protobuf.UInt32Value * @instance */ - Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + UInt32Value.prototype.value = 0; /** - * Creates a new Int64Value instance using the specified properties. + * Creates a new UInt32Value instance using the specified properties. * @function create - * @memberof google.protobuf.Int64Value + * @memberof google.protobuf.UInt32Value * @static - * @param {google.protobuf.IInt64Value=} [properties] Properties to set - * @returns {google.protobuf.Int64Value} Int64Value instance + * @param {google.protobuf.IUInt32Value=} [properties] Properties to set + * @returns {google.protobuf.UInt32Value} UInt32Value instance */ - Int64Value.create = function create(properties) { - return new Int64Value(properties); + UInt32Value.create = function create(properties) { + return new UInt32Value(properties); }; /** - * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. * @function encode - * @memberof google.protobuf.Int64Value + * @memberof google.protobuf.UInt32Value * @static - * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode + * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Int64Value.encode = function encode(message, writer) { + UInt32Value.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value); + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.value); return writer; }; /** - * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Int64Value + * @memberof google.protobuf.UInt32Value * @static - * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode + * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Int64Value.encodeDelimited = function encodeDelimited(message, writer) { + UInt32Value.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Int64Value message from the specified reader or buffer. + * Decodes a UInt32Value message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Int64Value + * @memberof google.protobuf.UInt32Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Int64Value} Int64Value + * @returns {google.protobuf.UInt32Value} UInt32Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Int64Value.decode = function decode(reader, length) { + UInt32Value.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Int64Value(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UInt32Value(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.value = reader.int64(); + message.value = reader.uint32(); break; } default: @@ -24116,136 +44884,122 @@ }; /** - * Decodes an Int64Value message from the specified reader or buffer, length delimited. + * Decodes a UInt32Value message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Int64Value + * @memberof google.protobuf.UInt32Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Int64Value} Int64Value + * @returns {google.protobuf.UInt32Value} UInt32Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Int64Value.decodeDelimited = function decodeDelimited(reader) { + UInt32Value.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Int64Value message. + * Verifies a UInt32Value message. * @function verify - * @memberof google.protobuf.Int64Value + * @memberof google.protobuf.UInt32Value * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Int64Value.verify = function verify(message) { + UInt32Value.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) - return "value: integer|Long expected"; + if (!$util.isInteger(message.value)) + return "value: integer expected"; return null; }; /** - * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Int64Value + * @memberof google.protobuf.UInt32Value * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Int64Value} Int64Value + * @returns {google.protobuf.UInt32Value} UInt32Value */ - Int64Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Int64Value) + UInt32Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UInt32Value) return object; - var message = new $root.google.protobuf.Int64Value(); + var message = new $root.google.protobuf.UInt32Value(); if (object.value != null) - if ($util.Long) - (message.value = $util.Long.fromValue(object.value)).unsigned = false; - else if (typeof object.value === "string") - message.value = parseInt(object.value, 10); - else if (typeof object.value === "number") - message.value = object.value; - else if (typeof object.value === "object") - message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); + message.value = object.value >>> 0; return message; }; /** - * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Int64Value + * @memberof google.protobuf.UInt32Value * @static - * @param {google.protobuf.Int64Value} message Int64Value + * @param {google.protobuf.UInt32Value} message UInt32Value * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Int64Value.toObject = function toObject(message, options) { + UInt32Value.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.value = options.longs === String ? "0" : 0; + object.value = 0; if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value === "number") - object.value = options.longs === String ? String(message.value) : message.value; - else - object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; + object.value = message.value; return object; }; /** - * Converts this Int64Value to JSON. + * Converts this UInt32Value to JSON. * @function toJSON - * @memberof google.protobuf.Int64Value + * @memberof google.protobuf.UInt32Value * @instance * @returns {Object.} JSON object */ - Int64Value.prototype.toJSON = function toJSON() { + UInt32Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Int64Value + * Gets the default type url for UInt32Value * @function getTypeUrl - * @memberof google.protobuf.Int64Value + * @memberof google.protobuf.UInt32Value * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Int64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UInt32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.Int64Value"; + return typeUrlPrefix + "/google.protobuf.UInt32Value"; }; - return Int64Value; + return UInt32Value; })(); - protobuf.UInt64Value = (function() { + protobuf.BoolValue = (function() { /** - * Properties of a UInt64Value. + * Properties of a BoolValue. * @memberof google.protobuf - * @interface IUInt64Value - * @property {number|Long|null} [value] UInt64Value value + * @interface IBoolValue + * @property {boolean|null} [value] BoolValue value */ /** - * Constructs a new UInt64Value. + * Constructs a new BoolValue. * @memberof google.protobuf - * @classdesc Represents a UInt64Value. - * @implements IUInt64Value + * @classdesc Represents a BoolValue. + * @implements IBoolValue * @constructor - * @param {google.protobuf.IUInt64Value=} [properties] Properties to set + * @param {google.protobuf.IBoolValue=} [properties] Properties to set */ - function UInt64Value(properties) { + function BoolValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24253,75 +45007,75 @@ } /** - * UInt64Value value. - * @member {number|Long} value - * @memberof google.protobuf.UInt64Value + * BoolValue value. + * @member {boolean} value + * @memberof google.protobuf.BoolValue * @instance */ - UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + BoolValue.prototype.value = false; /** - * Creates a new UInt64Value instance using the specified properties. + * Creates a new BoolValue instance using the specified properties. * @function create - * @memberof google.protobuf.UInt64Value + * @memberof google.protobuf.BoolValue * @static - * @param {google.protobuf.IUInt64Value=} [properties] Properties to set - * @returns {google.protobuf.UInt64Value} UInt64Value instance + * @param {google.protobuf.IBoolValue=} [properties] Properties to set + * @returns {google.protobuf.BoolValue} BoolValue instance */ - UInt64Value.create = function create(properties) { - return new UInt64Value(properties); + BoolValue.create = function create(properties) { + return new BoolValue(properties); }; /** - * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. * @function encode - * @memberof google.protobuf.UInt64Value + * @memberof google.protobuf.BoolValue * @static - * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode + * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UInt64Value.encode = function encode(message, writer) { + BoolValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.value); + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.value); return writer; }; /** - * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.UInt64Value + * @memberof google.protobuf.BoolValue * @static - * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode + * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UInt64Value.encodeDelimited = function encodeDelimited(message, writer) { + BoolValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a UInt64Value message from the specified reader or buffer. + * Decodes a BoolValue message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.UInt64Value + * @memberof google.protobuf.BoolValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UInt64Value} UInt64Value + * @returns {google.protobuf.BoolValue} BoolValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UInt64Value.decode = function decode(reader, length) { + BoolValue.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UInt64Value(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.BoolValue(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.value = reader.uint64(); + message.value = reader.bool(); break; } default: @@ -24333,136 +45087,122 @@ }; /** - * Decodes a UInt64Value message from the specified reader or buffer, length delimited. + * Decodes a BoolValue message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.UInt64Value + * @memberof google.protobuf.BoolValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UInt64Value} UInt64Value + * @returns {google.protobuf.BoolValue} BoolValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UInt64Value.decodeDelimited = function decodeDelimited(reader) { + BoolValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a UInt64Value message. + * Verifies a BoolValue message. * @function verify - * @memberof google.protobuf.UInt64Value + * @memberof google.protobuf.BoolValue * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UInt64Value.verify = function verify(message) { + BoolValue.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) - return "value: integer|Long expected"; + if (typeof message.value !== "boolean") + return "value: boolean expected"; return null; }; /** - * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.UInt64Value + * @memberof google.protobuf.BoolValue * @static * @param {Object.} object Plain object - * @returns {google.protobuf.UInt64Value} UInt64Value + * @returns {google.protobuf.BoolValue} BoolValue */ - UInt64Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UInt64Value) + BoolValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.BoolValue) return object; - var message = new $root.google.protobuf.UInt64Value(); + var message = new $root.google.protobuf.BoolValue(); if (object.value != null) - if ($util.Long) - (message.value = $util.Long.fromValue(object.value)).unsigned = true; - else if (typeof object.value === "string") - message.value = parseInt(object.value, 10); - else if (typeof object.value === "number") - message.value = object.value; - else if (typeof object.value === "object") - message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true); + message.value = Boolean(object.value); return message; }; /** - * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.UInt64Value + * @memberof google.protobuf.BoolValue * @static - * @param {google.protobuf.UInt64Value} message UInt64Value + * @param {google.protobuf.BoolValue} message BoolValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UInt64Value.toObject = function toObject(message, options) { + BoolValue.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.value = options.longs === String ? "0" : 0; + object.value = false; if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value === "number") - object.value = options.longs === String ? String(message.value) : message.value; - else - object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; + object.value = message.value; return object; }; /** - * Converts this UInt64Value to JSON. + * Converts this BoolValue to JSON. * @function toJSON - * @memberof google.protobuf.UInt64Value + * @memberof google.protobuf.BoolValue * @instance * @returns {Object.} JSON object */ - UInt64Value.prototype.toJSON = function toJSON() { + BoolValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UInt64Value + * Gets the default type url for BoolValue * @function getTypeUrl - * @memberof google.protobuf.UInt64Value + * @memberof google.protobuf.BoolValue * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UInt64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BoolValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.UInt64Value"; + return typeUrlPrefix + "/google.protobuf.BoolValue"; }; - return UInt64Value; + return BoolValue; })(); - protobuf.Int32Value = (function() { + protobuf.StringValue = (function() { /** - * Properties of an Int32Value. + * Properties of a StringValue. * @memberof google.protobuf - * @interface IInt32Value - * @property {number|null} [value] Int32Value value + * @interface IStringValue + * @property {string|null} [value] StringValue value */ /** - * Constructs a new Int32Value. + * Constructs a new StringValue. * @memberof google.protobuf - * @classdesc Represents an Int32Value. - * @implements IInt32Value + * @classdesc Represents a StringValue. + * @implements IStringValue * @constructor - * @param {google.protobuf.IInt32Value=} [properties] Properties to set + * @param {google.protobuf.IStringValue=} [properties] Properties to set */ - function Int32Value(properties) { + function StringValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24470,75 +45210,75 @@ } /** - * Int32Value value. - * @member {number} value - * @memberof google.protobuf.Int32Value + * StringValue value. + * @member {string} value + * @memberof google.protobuf.StringValue * @instance */ - Int32Value.prototype.value = 0; + StringValue.prototype.value = ""; /** - * Creates a new Int32Value instance using the specified properties. + * Creates a new StringValue instance using the specified properties. * @function create - * @memberof google.protobuf.Int32Value + * @memberof google.protobuf.StringValue * @static - * @param {google.protobuf.IInt32Value=} [properties] Properties to set - * @returns {google.protobuf.Int32Value} Int32Value instance + * @param {google.protobuf.IStringValue=} [properties] Properties to set + * @returns {google.protobuf.StringValue} StringValue instance */ - Int32Value.create = function create(properties) { - return new Int32Value(properties); + StringValue.create = function create(properties) { + return new StringValue(properties); }; /** - * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. * @function encode - * @memberof google.protobuf.Int32Value + * @memberof google.protobuf.StringValue * @static - * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode + * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Int32Value.encode = function encode(message, writer) { + StringValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.value); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); return writer; }; /** - * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Int32Value + * @memberof google.protobuf.StringValue * @static - * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode + * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Int32Value.encodeDelimited = function encodeDelimited(message, writer) { + StringValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Int32Value message from the specified reader or buffer. + * Decodes a StringValue message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Int32Value + * @memberof google.protobuf.StringValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Int32Value} Int32Value + * @returns {google.protobuf.StringValue} StringValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Int32Value.decode = function decode(reader, length) { + StringValue.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Int32Value(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.StringValue(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.value = reader.int32(); + message.value = reader.string(); break; } default: @@ -24550,122 +45290,122 @@ }; /** - * Decodes an Int32Value message from the specified reader or buffer, length delimited. + * Decodes a StringValue message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Int32Value + * @memberof google.protobuf.StringValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Int32Value} Int32Value + * @returns {google.protobuf.StringValue} StringValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Int32Value.decodeDelimited = function decodeDelimited(reader) { + StringValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Int32Value message. + * Verifies a StringValue message. * @function verify - * @memberof google.protobuf.Int32Value + * @memberof google.protobuf.StringValue * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Int32Value.verify = function verify(message) { + StringValue.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value)) - return "value: integer expected"; + if (!$util.isString(message.value)) + return "value: string expected"; return null; }; /** - * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. + * Creates a StringValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Int32Value + * @memberof google.protobuf.StringValue * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Int32Value} Int32Value + * @returns {google.protobuf.StringValue} StringValue */ - Int32Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Int32Value) + StringValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.StringValue) return object; - var message = new $root.google.protobuf.Int32Value(); + var message = new $root.google.protobuf.StringValue(); if (object.value != null) - message.value = object.value | 0; + message.value = String(object.value); return message; }; /** - * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * Creates a plain object from a StringValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Int32Value + * @memberof google.protobuf.StringValue * @static - * @param {google.protobuf.Int32Value} message Int32Value + * @param {google.protobuf.StringValue} message StringValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Int32Value.toObject = function toObject(message, options) { + StringValue.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.value = 0; + object.value = ""; if (message.value != null && message.hasOwnProperty("value")) object.value = message.value; return object; }; /** - * Converts this Int32Value to JSON. + * Converts this StringValue to JSON. * @function toJSON - * @memberof google.protobuf.Int32Value + * @memberof google.protobuf.StringValue * @instance * @returns {Object.} JSON object */ - Int32Value.prototype.toJSON = function toJSON() { + StringValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Int32Value + * Gets the default type url for StringValue * @function getTypeUrl - * @memberof google.protobuf.Int32Value + * @memberof google.protobuf.StringValue * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Int32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + StringValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.Int32Value"; + return typeUrlPrefix + "/google.protobuf.StringValue"; }; - return Int32Value; + return StringValue; })(); - protobuf.UInt32Value = (function() { + protobuf.BytesValue = (function() { /** - * Properties of a UInt32Value. + * Properties of a BytesValue. * @memberof google.protobuf - * @interface IUInt32Value - * @property {number|null} [value] UInt32Value value + * @interface IBytesValue + * @property {Uint8Array|null} [value] BytesValue value */ /** - * Constructs a new UInt32Value. + * Constructs a new BytesValue. * @memberof google.protobuf - * @classdesc Represents a UInt32Value. - * @implements IUInt32Value + * @classdesc Represents a BytesValue. + * @implements IBytesValue * @constructor - * @param {google.protobuf.IUInt32Value=} [properties] Properties to set + * @param {google.protobuf.IBytesValue=} [properties] Properties to set */ - function UInt32Value(properties) { + function BytesValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24673,75 +45413,75 @@ } /** - * UInt32Value value. - * @member {number} value - * @memberof google.protobuf.UInt32Value + * BytesValue value. + * @member {Uint8Array} value + * @memberof google.protobuf.BytesValue * @instance */ - UInt32Value.prototype.value = 0; + BytesValue.prototype.value = $util.newBuffer([]); /** - * Creates a new UInt32Value instance using the specified properties. + * Creates a new BytesValue instance using the specified properties. * @function create - * @memberof google.protobuf.UInt32Value + * @memberof google.protobuf.BytesValue * @static - * @param {google.protobuf.IUInt32Value=} [properties] Properties to set - * @returns {google.protobuf.UInt32Value} UInt32Value instance + * @param {google.protobuf.IBytesValue=} [properties] Properties to set + * @returns {google.protobuf.BytesValue} BytesValue instance */ - UInt32Value.create = function create(properties) { - return new UInt32Value(properties); + BytesValue.create = function create(properties) { + return new BytesValue(properties); }; /** - * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. * @function encode - * @memberof google.protobuf.UInt32Value + * @memberof google.protobuf.BytesValue * @static - * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode + * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UInt32Value.encode = function encode(message, writer) { + BytesValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.value); + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value); return writer; }; /** - * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.UInt32Value + * @memberof google.protobuf.BytesValue * @static - * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode + * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UInt32Value.encodeDelimited = function encodeDelimited(message, writer) { + BytesValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a UInt32Value message from the specified reader or buffer. + * Decodes a BytesValue message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.UInt32Value + * @memberof google.protobuf.BytesValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UInt32Value} UInt32Value + * @returns {google.protobuf.BytesValue} BytesValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UInt32Value.decode = function decode(reader, length) { + BytesValue.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UInt32Value(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.BytesValue(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.value = reader.uint32(); + message.value = reader.bytes(); break; } default: @@ -24753,122 +45493,132 @@ }; /** - * Decodes a UInt32Value message from the specified reader or buffer, length delimited. + * Decodes a BytesValue message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.UInt32Value + * @memberof google.protobuf.BytesValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UInt32Value} UInt32Value + * @returns {google.protobuf.BytesValue} BytesValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UInt32Value.decodeDelimited = function decodeDelimited(reader) { + BytesValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a UInt32Value message. + * Verifies a BytesValue message. * @function verify - * @memberof google.protobuf.UInt32Value + * @memberof google.protobuf.BytesValue * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UInt32Value.verify = function verify(message) { + BytesValue.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value)) - return "value: integer expected"; + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; return null; }; /** - * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.UInt32Value + * @memberof google.protobuf.BytesValue * @static * @param {Object.} object Plain object - * @returns {google.protobuf.UInt32Value} UInt32Value + * @returns {google.protobuf.BytesValue} BytesValue */ - UInt32Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UInt32Value) + BytesValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.BytesValue) return object; - var message = new $root.google.protobuf.UInt32Value(); + var message = new $root.google.protobuf.BytesValue(); if (object.value != null) - message.value = object.value >>> 0; + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; return message; }; /** - * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * Creates a plain object from a BytesValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.UInt32Value + * @memberof google.protobuf.BytesValue * @static - * @param {google.protobuf.UInt32Value} message UInt32Value + * @param {google.protobuf.BytesValue} message BytesValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UInt32Value.toObject = function toObject(message, options) { + BytesValue.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.value = 0; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; return object; }; /** - * Converts this UInt32Value to JSON. + * Converts this BytesValue to JSON. * @function toJSON - * @memberof google.protobuf.UInt32Value + * @memberof google.protobuf.BytesValue * @instance * @returns {Object.} JSON object */ - UInt32Value.prototype.toJSON = function toJSON() { + BytesValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UInt32Value + * Gets the default type url for BytesValue * @function getTypeUrl - * @memberof google.protobuf.UInt32Value + * @memberof google.protobuf.BytesValue * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UInt32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BytesValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.UInt32Value"; + return typeUrlPrefix + "/google.protobuf.BytesValue"; }; - return UInt32Value; + return BytesValue; })(); - protobuf.BoolValue = (function() { + protobuf.Any = (function() { /** - * Properties of a BoolValue. + * Properties of an Any. * @memberof google.protobuf - * @interface IBoolValue - * @property {boolean|null} [value] BoolValue value + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value */ /** - * Constructs a new BoolValue. + * Constructs a new Any. * @memberof google.protobuf - * @classdesc Represents a BoolValue. - * @implements IBoolValue + * @classdesc Represents an Any. + * @implements IAny * @constructor - * @param {google.protobuf.IBoolValue=} [properties] Properties to set + * @param {google.protobuf.IAny=} [properties] Properties to set */ - function BoolValue(properties) { + function Any(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24876,75 +45626,89 @@ } /** - * BoolValue value. - * @member {boolean} value - * @memberof google.protobuf.BoolValue + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any * @instance */ - BoolValue.prototype.value = false; + Any.prototype.type_url = ""; /** - * Creates a new BoolValue instance using the specified properties. + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. * @function create - * @memberof google.protobuf.BoolValue + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.IBoolValue=} [properties] Properties to set - * @returns {google.protobuf.BoolValue} BoolValue instance + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance */ - BoolValue.create = function create(properties) { - return new BoolValue(properties); + Any.create = function create(properties) { + return new Any(properties); }; /** - * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. * @function encode - * @memberof google.protobuf.BoolValue + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode + * @param {google.protobuf.IAny} message Any message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BoolValue.encode = function encode(message, writer) { + Any.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.value); + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); return writer; }; /** - * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.BoolValue + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode + * @param {google.protobuf.IAny} message Any message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BoolValue.encodeDelimited = function encodeDelimited(message, writer) { + Any.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BoolValue message from the specified reader or buffer. + * Decodes an Any message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.BoolValue + * @memberof google.protobuf.Any * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.BoolValue} BoolValue + * @returns {google.protobuf.Any} Any * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BoolValue.decode = function decode(reader, length) { + Any.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.BoolValue(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.value = reader.bool(); + message.type_url = reader.string(); + break; + } + case 2: { + message.value = reader.bytes(); break; } default: @@ -24956,122 +45720,141 @@ }; /** - * Decodes a BoolValue message from the specified reader or buffer, length delimited. + * Decodes an Any message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.BoolValue + * @memberof google.protobuf.Any * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.BoolValue} BoolValue + * @returns {google.protobuf.Any} Any * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BoolValue.decodeDelimited = function decodeDelimited(reader) { + Any.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BoolValue message. + * Verifies an Any message. * @function verify - * @memberof google.protobuf.BoolValue + * @memberof google.protobuf.Any * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BoolValue.verify = function verify(message) { + Any.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "boolean") - return "value: boolean expected"; + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; return null; }; /** - * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. + * Creates an Any message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.BoolValue + * @memberof google.protobuf.Any * @static * @param {Object.} object Plain object - * @returns {google.protobuf.BoolValue} BoolValue + * @returns {google.protobuf.Any} Any */ - BoolValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.BoolValue) + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) return object; - var message = new $root.google.protobuf.BoolValue(); + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); if (object.value != null) - message.value = Boolean(object.value); + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; return message; }; /** - * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * Creates a plain object from an Any message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.BoolValue + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.BoolValue} message BoolValue + * @param {google.protobuf.Any} message Any * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BoolValue.toObject = function toObject(message, options) { + Any.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.value = false; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; return object; }; /** - * Converts this BoolValue to JSON. + * Converts this Any to JSON. * @function toJSON - * @memberof google.protobuf.BoolValue + * @memberof google.protobuf.Any * @instance * @returns {Object.} JSON object */ - BoolValue.prototype.toJSON = function toJSON() { + Any.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BoolValue + * Gets the default type url for Any * @function getTypeUrl - * @memberof google.protobuf.BoolValue + * @memberof google.protobuf.Any * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BoolValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.BoolValue"; + return typeUrlPrefix + "/google.protobuf.Any"; }; - return BoolValue; + return Any; })(); - protobuf.StringValue = (function() { + protobuf.Struct = (function() { /** - * Properties of a StringValue. + * Properties of a Struct. * @memberof google.protobuf - * @interface IStringValue - * @property {string|null} [value] StringValue value + * @interface IStruct + * @property {Object.|null} [fields] Struct fields */ /** - * Constructs a new StringValue. + * Constructs a new Struct. * @memberof google.protobuf - * @classdesc Represents a StringValue. - * @implements IStringValue + * @classdesc Represents a Struct. + * @implements IStruct * @constructor - * @param {google.protobuf.IStringValue=} [properties] Properties to set + * @param {google.protobuf.IStruct=} [properties] Properties to set */ - function StringValue(properties) { + function Struct(properties) { + this.fields = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25079,75 +45862,97 @@ } /** - * StringValue value. - * @member {string} value - * @memberof google.protobuf.StringValue + * Struct fields. + * @member {Object.} fields + * @memberof google.protobuf.Struct * @instance */ - StringValue.prototype.value = ""; + Struct.prototype.fields = $util.emptyObject; /** - * Creates a new StringValue instance using the specified properties. + * Creates a new Struct instance using the specified properties. * @function create - * @memberof google.protobuf.StringValue + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.IStringValue=} [properties] Properties to set - * @returns {google.protobuf.StringValue} StringValue instance + * @param {google.protobuf.IStruct=} [properties] Properties to set + * @returns {google.protobuf.Struct} Struct instance */ - StringValue.create = function create(properties) { - return new StringValue(properties); + Struct.create = function create(properties) { + return new Struct(properties); }; /** - * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. * @function encode - * @memberof google.protobuf.StringValue + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode + * @param {google.protobuf.IStruct} message Struct message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StringValue.encode = function encode(message, writer) { + Struct.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + if (message.fields != null && Object.hasOwnProperty.call(message, "fields")) + for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; /** - * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.StringValue + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode + * @param {google.protobuf.IStruct} message Struct message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StringValue.encodeDelimited = function encodeDelimited(message, writer) { + Struct.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StringValue message from the specified reader or buffer. + * Decodes a Struct message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.StringValue + * @memberof google.protobuf.Struct * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.StringValue} StringValue + * @returns {google.protobuf.Struct} Struct * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StringValue.decode = function decode(reader, length) { + Struct.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.StringValue(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Struct(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.value = reader.string(); + if (message.fields === $util.emptyObject) + message.fields = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.fields[key] = value; break; } default: @@ -25159,198 +45964,306 @@ }; /** - * Decodes a StringValue message from the specified reader or buffer, length delimited. + * Decodes a Struct message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.StringValue + * @memberof google.protobuf.Struct * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.StringValue} StringValue + * @returns {google.protobuf.Struct} Struct * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StringValue.decodeDelimited = function decodeDelimited(reader) { + Struct.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StringValue message. + * Verifies a Struct message. * @function verify - * @memberof google.protobuf.StringValue + * @memberof google.protobuf.Struct * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StringValue.verify = function verify(message) { + Struct.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!$util.isObject(message.fields)) + return "fields: object expected"; + var key = Object.keys(message.fields); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.fields[key[i]]); + if (error) + return "fields." + error; + } + } return null; }; /** - * Creates a StringValue message from a plain object. Also converts values to their respective internal types. + * Creates a Struct message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.StringValue + * @memberof google.protobuf.Struct * @static * @param {Object.} object Plain object - * @returns {google.protobuf.StringValue} StringValue + * @returns {google.protobuf.Struct} Struct */ - StringValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.StringValue) + Struct.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Struct) return object; - var message = new $root.google.protobuf.StringValue(); - if (object.value != null) - message.value = String(object.value); + var message = new $root.google.protobuf.Struct(); + if (object.fields) { + if (typeof object.fields !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields = {}; + for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { + if (typeof object.fields[keys[i]] !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); + } + } return message; }; /** - * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * Creates a plain object from a Struct message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.StringValue + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.StringValue} message StringValue + * @param {google.protobuf.Struct} message Struct * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StringValue.toObject = function toObject(message, options) { + Struct.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.value = ""; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; + if (options.objects || options.defaults) + object.fields = {}; + var keys2; + if (message.fields && (keys2 = Object.keys(message.fields)).length) { + object.fields = {}; + for (var j = 0; j < keys2.length; ++j) + object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); + } return object; }; /** - * Converts this StringValue to JSON. + * Converts this Struct to JSON. * @function toJSON - * @memberof google.protobuf.StringValue + * @memberof google.protobuf.Struct * @instance * @returns {Object.} JSON object */ - StringValue.prototype.toJSON = function toJSON() { + Struct.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for StringValue + * Gets the default type url for Struct * @function getTypeUrl - * @memberof google.protobuf.StringValue + * @memberof google.protobuf.Struct * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - StringValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Struct.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.StringValue"; + return typeUrlPrefix + "/google.protobuf.Struct"; }; - return StringValue; + return Struct; })(); - protobuf.BytesValue = (function() { + protobuf.Value = (function() { /** - * Properties of a BytesValue. + * Properties of a Value. * @memberof google.protobuf - * @interface IBytesValue - * @property {Uint8Array|null} [value] BytesValue value + * @interface IValue + * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue + * @property {number|null} [numberValue] Value numberValue + * @property {string|null} [stringValue] Value stringValue + * @property {boolean|null} [boolValue] Value boolValue + * @property {google.protobuf.IStruct|null} [structValue] Value structValue + * @property {google.protobuf.IListValue|null} [listValue] Value listValue + */ + + /** + * Constructs a new Value. + * @memberof google.protobuf + * @classdesc Represents a Value. + * @implements IValue + * @constructor + * @param {google.protobuf.IValue=} [properties] Properties to set + */ + function Value(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]]; + } + + /** + * Value nullValue. + * @member {google.protobuf.NullValue|null|undefined} nullValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.nullValue = null; + + /** + * Value numberValue. + * @member {number|null|undefined} numberValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.numberValue = null; + + /** + * Value stringValue. + * @member {string|null|undefined} stringValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.stringValue = null; + + /** + * Value boolValue. + * @member {boolean|null|undefined} boolValue + * @memberof google.protobuf.Value + * @instance */ + Value.prototype.boolValue = null; /** - * Constructs a new BytesValue. - * @memberof google.protobuf - * @classdesc Represents a BytesValue. - * @implements IBytesValue - * @constructor - * @param {google.protobuf.IBytesValue=} [properties] Properties to set + * Value structValue. + * @member {google.protobuf.IStruct|null|undefined} structValue + * @memberof google.protobuf.Value + * @instance */ - function BytesValue(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]]; - } + Value.prototype.structValue = null; /** - * BytesValue value. - * @member {Uint8Array} value - * @memberof google.protobuf.BytesValue + * Value listValue. + * @member {google.protobuf.IListValue|null|undefined} listValue + * @memberof google.protobuf.Value * @instance */ - BytesValue.prototype.value = $util.newBuffer([]); + Value.prototype.listValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new BytesValue instance using the specified properties. + * Value kind. + * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind + * @memberof google.protobuf.Value + * @instance + */ + Object.defineProperty(Value.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Value instance using the specified properties. * @function create - * @memberof google.protobuf.BytesValue + * @memberof google.protobuf.Value * @static - * @param {google.protobuf.IBytesValue=} [properties] Properties to set - * @returns {google.protobuf.BytesValue} BytesValue instance + * @param {google.protobuf.IValue=} [properties] Properties to set + * @returns {google.protobuf.Value} Value instance */ - BytesValue.create = function create(properties) { - return new BytesValue(properties); + Value.create = function create(properties) { + return new Value(properties); }; /** - * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. * @function encode - * @memberof google.protobuf.BytesValue + * @memberof google.protobuf.Value * @static - * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode + * @param {google.protobuf.IValue} message Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BytesValue.encode = function encode(message, writer) { + Value.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value); + if (message.nullValue != null && Object.hasOwnProperty.call(message, "nullValue")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue); + if (message.numberValue != null && Object.hasOwnProperty.call(message, "numberValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); + if (message.structValue != null && Object.hasOwnProperty.call(message, "structValue")) + $root.google.protobuf.Struct.encode(message.structValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.listValue != null && Object.hasOwnProperty.call(message, "listValue")) + $root.google.protobuf.ListValue.encode(message.listValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.BytesValue + * @memberof google.protobuf.Value * @static - * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode + * @param {google.protobuf.IValue} message Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BytesValue.encodeDelimited = function encodeDelimited(message, writer) { + Value.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BytesValue message from the specified reader or buffer. + * Decodes a Value message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.BytesValue + * @memberof google.protobuf.Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.BytesValue} BytesValue + * @returns {google.protobuf.Value} Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BytesValue.decode = function decode(reader, length) { + Value.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.BytesValue(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Value(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.value = reader.bytes(); + message.nullValue = reader.int32(); + break; + } + case 2: { + message.numberValue = reader.double(); + break; + } + case 3: { + message.stringValue = reader.string(); + break; + } + case 4: { + message.boolValue = reader.bool(); + break; + } + case 5: { + message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 6: { + message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); break; } default: @@ -25362,132 +46275,235 @@ }; /** - * Decodes a BytesValue message from the specified reader or buffer, length delimited. + * Decodes a Value message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.BytesValue + * @memberof google.protobuf.Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.BytesValue} BytesValue + * @returns {google.protobuf.Value} Value * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BytesValue.decodeDelimited = function decodeDelimited(reader) { + Value.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BytesValue message. + * Verifies a Value message. * @function verify - * @memberof google.protobuf.BytesValue + * @memberof google.protobuf.Value * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BytesValue.verify = function verify(message) { + Value.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; + var properties = {}; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + properties.kind = 1; + switch (message.nullValue) { + default: + return "nullValue: enum value expected"; + case 0: + break; + } + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.numberValue !== "number") + return "numberValue: number expected"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.Struct.verify(message.structValue); + if (error) + return "structValue." + error; + } + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.ListValue.verify(message.listValue); + if (error) + return "listValue." + error; + } + } return null; }; /** - * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. + * Creates a Value message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.BytesValue + * @memberof google.protobuf.Value * @static * @param {Object.} object Plain object - * @returns {google.protobuf.BytesValue} BytesValue + * @returns {google.protobuf.Value} Value */ - BytesValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.BytesValue) + Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Value) return object; - var message = new $root.google.protobuf.BytesValue(); - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length >= 0) - message.value = object.value; + var message = new $root.google.protobuf.Value(); + switch (object.nullValue) { + default: + if (typeof object.nullValue === "number") { + message.nullValue = object.nullValue; + break; + } + break; + case "NULL_VALUE": + case 0: + message.nullValue = 0; + break; + } + if (object.numberValue != null) + message.numberValue = Number(object.numberValue); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.structValue != null) { + if (typeof object.structValue !== "object") + throw TypeError(".google.protobuf.Value.structValue: object expected"); + message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue); + } + if (object.listValue != null) { + if (typeof object.listValue !== "object") + throw TypeError(".google.protobuf.Value.listValue: object expected"); + message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue); + } return message; }; /** - * Creates a plain object from a BytesValue message. Also converts values to other types if specified. + * Creates a plain object from a Value message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.BytesValue + * @memberof google.protobuf.Value * @static - * @param {google.protobuf.BytesValue} message BytesValue + * @param {google.protobuf.Value} message Value * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BytesValue.toObject = function toObject(message, options) { + Value.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] === undefined ? message.nullValue : $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; + if (options.oneofs) + object.kind = "nullValue"; + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; + if (options.oneofs) + object.kind = "numberValue"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.kind = "stringValue"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.kind = "boolValue"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); + if (options.oneofs) + object.kind = "structValue"; + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); + if (options.oneofs) + object.kind = "listValue"; + } return object; }; /** - * Converts this BytesValue to JSON. + * Converts this Value to JSON. * @function toJSON - * @memberof google.protobuf.BytesValue + * @memberof google.protobuf.Value * @instance * @returns {Object.} JSON object */ - BytesValue.prototype.toJSON = function toJSON() { + Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BytesValue + * Gets the default type url for Value * @function getTypeUrl - * @memberof google.protobuf.BytesValue + * @memberof google.protobuf.Value * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BytesValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.BytesValue"; + return typeUrlPrefix + "/google.protobuf.Value"; }; - return BytesValue; + return Value; })(); - protobuf.Any = (function() { + /** + * NullValue enum. + * @name google.protobuf.NullValue + * @enum {number} + * @property {number} NULL_VALUE=0 NULL_VALUE value + */ + protobuf.NullValue = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NULL_VALUE"] = 0; + return values; + })(); + + protobuf.ListValue = (function() { /** - * Properties of an Any. + * Properties of a ListValue. * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value + * @interface IListValue + * @property {Array.|null} [values] ListValue values */ /** - * Constructs a new Any. + * Constructs a new ListValue. * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny + * @classdesc Represents a ListValue. + * @implements IListValue * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set + * @param {google.protobuf.IListValue=} [properties] Properties to set */ - function Any(properties) { + function ListValue(properties) { + this.values = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25495,89 +46511,78 @@ } /** - * Any type_url. - * @member {string} type_url - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.type_url = ""; - - /** - * Any value. - * @member {Uint8Array} value - * @memberof google.protobuf.Any + * ListValue values. + * @member {Array.} values + * @memberof google.protobuf.ListValue * @instance */ - Any.prototype.value = $util.newBuffer([]); + ListValue.prototype.values = $util.emptyArray; /** - * Creates a new Any instance using the specified properties. + * Creates a new ListValue instance using the specified properties. * @function create - * @memberof google.protobuf.Any + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.IAny=} [properties] Properties to set - * @returns {google.protobuf.Any} Any instance + * @param {google.protobuf.IListValue=} [properties] Properties to set + * @returns {google.protobuf.ListValue} ListValue instance */ - Any.create = function create(properties) { - return new Any(properties); + ListValue.create = function create(properties) { + return new ListValue(properties); }; /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. * @function encode - * @memberof google.protobuf.Any + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Any.encode = function encode(message, writer) { + ListValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Any + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Any.encodeDelimited = function encodeDelimited(message, writer) { + ListValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Any message from the specified reader or buffer. + * Decodes a ListValue message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Any + * @memberof google.protobuf.ListValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Any} Any + * @returns {google.protobuf.ListValue} ListValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Any.decode = function decode(reader, length) { + ListValue.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ListValue(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.type_url = reader.string(); - break; - } - case 2: { - message.value = reader.bytes(); + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); break; } default: @@ -25589,120 +46594,119 @@ }; /** - * Decodes an Any message from the specified reader or buffer, length delimited. + * Decodes a ListValue message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Any + * @memberof google.protobuf.ListValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Any} Any + * @returns {google.protobuf.ListValue} ListValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Any.decodeDelimited = function decodeDelimited(reader) { + ListValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Any message. + * Verifies a ListValue message. * @function verify - * @memberof google.protobuf.Any + * @memberof google.protobuf.ListValue * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Any.verify = function verify(message) { + ListValue.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type_url != null && message.hasOwnProperty("type_url")) - if (!$util.isString(message.type_url)) - return "type_url: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer 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) { + var error = $root.google.protobuf.Value.verify(message.values[i]); + if (error) + return "values." + error; + } + } return null; }; /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Any + * @memberof google.protobuf.ListValue * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Any} Any + * @returns {google.protobuf.ListValue} ListValue */ - Any.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Any) + ListValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ListValue) return object; - var message = new $root.google.protobuf.Any(); - if (object.type_url != null) - message.type_url = String(object.type_url); - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length >= 0) - message.value = object.value; + var message = new $root.google.protobuf.ListValue(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.protobuf.ListValue.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".google.protobuf.ListValue.values: object expected"); + message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); + } + } return message; }; /** - * Creates a plain object from an Any message. Also converts values to other types if specified. + * Creates a plain object from a ListValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Any + * @memberof google.protobuf.ListValue * @static - * @param {google.protobuf.Any} message Any + * @param {google.protobuf.ListValue} message ListValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Any.toObject = function toObject(message, options) { + ListValue.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.type_url = ""; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } + if (options.arrays || options.defaults) + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); } - if (message.type_url != null && message.hasOwnProperty("type_url")) - object.type_url = message.type_url; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; return object; }; /** - * Converts this Any to JSON. + * Converts this ListValue to JSON. * @function toJSON - * @memberof google.protobuf.Any + * @memberof google.protobuf.ListValue * @instance * @returns {Object.} JSON object */ - Any.prototype.toJSON = function toJSON() { + ListValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Any + * Gets the default type url for ListValue * @function getTypeUrl - * @memberof google.protobuf.Any + * @memberof google.protobuf.ListValue * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.Any"; + return typeUrlPrefix + "/google.protobuf.ListValue"; }; - return Any; + return ListValue; })(); protobuf.Empty = (function() { diff --git a/packages/google-cloud-clouddms/protos/protos.json b/packages/google-cloud-clouddms/protos/protos.json index e6e150c50fc..7039076e446 100644 --- a/packages/google-cloud-clouddms/protos/protos.json +++ b/packages/google-cloud-clouddms/protos/protos.json @@ -11,10 +11,12 @@ "csharp_namespace": "Google.Cloud.CloudDms.V1", "go_package": "cloud.google.com/go/clouddms/apiv1/clouddmspb;clouddmspb", "java_multiple_files": true, - "java_outer_classname": "ClouddmsResourcesProto", + "java_outer_classname": "ConversionWorkspaceResourcesProto", "java_package": "com.google.cloud.clouddms.v1", "php_namespace": "Google\\Cloud\\CloudDms\\V1", - "ruby_package": "Google::Cloud::CloudDMS::V1" + "ruby_package": "Google::Cloud::CloudDMS::V1", + "(google.api.resource_definition).type": "compute.googleapis.com/Networks", + "(google.api.resource_definition).pattern": "projects/{project}/global/networks/{network}" }, "nested": { "DataMigrationService": { @@ -418,265 +420,2136 @@ } } ] + }, + "CreatePrivateConnection": { + "requestType": "CreatePrivateConnectionRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/privateConnections", + "(google.api.http).body": "private_connection", + "(google.api.method_signature)": "parent,private_connection,private_connection_id", + "(google.longrunning.operation_info).response_type": "PrivateConnection", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/privateConnections", + "body": "private_connection" + } + }, + { + "(google.api.method_signature)": "parent,private_connection,private_connection_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "PrivateConnection", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetPrivateConnection": { + "requestType": "GetPrivateConnectionRequest", + "responseType": "PrivateConnection", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/privateConnections/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/privateConnections/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListPrivateConnections": { + "requestType": "ListPrivateConnectionsRequest", + "responseType": "ListPrivateConnectionsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/privateConnections", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/privateConnections" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeletePrivateConnection": { + "requestType": "DeletePrivateConnectionRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/privateConnections/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/privateConnections/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetConversionWorkspace": { + "requestType": "GetConversionWorkspaceRequest", + "responseType": "ConversionWorkspace", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/conversionWorkspaces/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/conversionWorkspaces/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListConversionWorkspaces": { + "requestType": "ListConversionWorkspacesRequest", + "responseType": "ListConversionWorkspacesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/conversionWorkspaces", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/conversionWorkspaces" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateConversionWorkspace": { + "requestType": "CreateConversionWorkspaceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/conversionWorkspaces", + "(google.api.http).body": "conversion_workspace", + "(google.api.method_signature)": "parent,conversion_workspace,conversion_workspace_id", + "(google.longrunning.operation_info).response_type": "ConversionWorkspace", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/conversionWorkspaces", + "body": "conversion_workspace" + } + }, + { + "(google.api.method_signature)": "parent,conversion_workspace,conversion_workspace_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ConversionWorkspace", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateConversionWorkspace": { + "requestType": "UpdateConversionWorkspaceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{conversion_workspace.name=projects/*/locations/*/conversionWorkspaces/*}", + "(google.api.http).body": "conversion_workspace", + "(google.api.method_signature)": "conversion_workspace,update_mask", + "(google.longrunning.operation_info).response_type": "ConversionWorkspace", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{conversion_workspace.name=projects/*/locations/*/conversionWorkspaces/*}", + "body": "conversion_workspace" + } + }, + { + "(google.api.method_signature)": "conversion_workspace,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ConversionWorkspace", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteConversionWorkspace": { + "requestType": "DeleteConversionWorkspaceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/conversionWorkspaces/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/conversionWorkspaces/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "SeedConversionWorkspace": { + "requestType": "SeedConversionWorkspaceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/conversionWorkspaces/*}:seed", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "ConversionWorkspace", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/conversionWorkspaces/*}:seed", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ConversionWorkspace", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ImportMappingRules": { + "requestType": "ImportMappingRulesRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/conversionWorkspaces/*}/mappingRules:import", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "ConversionWorkspace", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/conversionWorkspaces/*}/mappingRules:import", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ConversionWorkspace", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ConvertConversionWorkspace": { + "requestType": "ConvertConversionWorkspaceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/conversionWorkspaces/*}:convert", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "ConversionWorkspace", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/conversionWorkspaces/*}:convert", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ConversionWorkspace", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "CommitConversionWorkspace": { + "requestType": "CommitConversionWorkspaceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/conversionWorkspaces/*}:commit", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "ConversionWorkspace", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/conversionWorkspaces/*}:commit", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ConversionWorkspace", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "RollbackConversionWorkspace": { + "requestType": "RollbackConversionWorkspaceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/conversionWorkspaces/*}:rollback", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "ConversionWorkspace", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/conversionWorkspaces/*}:rollback", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ConversionWorkspace", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ApplyConversionWorkspace": { + "requestType": "ApplyConversionWorkspaceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/conversionWorkspaces/*}:apply", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "ConversionWorkspace", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/conversionWorkspaces/*}:apply", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ConversionWorkspace", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DescribeDatabaseEntities": { + "requestType": "DescribeDatabaseEntitiesRequest", + "responseType": "DescribeDatabaseEntitiesResponse", + "options": { + "(google.api.http).get": "/v1/{conversion_workspace=projects/*/locations/*/conversionWorkspaces/*}:describeDatabaseEntities" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{conversion_workspace=projects/*/locations/*/conversionWorkspaces/*}:describeDatabaseEntities" + } + } + ] + }, + "SearchBackgroundJobs": { + "requestType": "SearchBackgroundJobsRequest", + "responseType": "SearchBackgroundJobsResponse", + "options": { + "(google.api.http).get": "/v1/{conversion_workspace=projects/*/locations/*/conversionWorkspaces/*}:searchBackgroundJobs" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{conversion_workspace=projects/*/locations/*/conversionWorkspaces/*}:searchBackgroundJobs" + } + } + ] + }, + "DescribeConversionWorkspaceRevisions": { + "requestType": "DescribeConversionWorkspaceRevisionsRequest", + "responseType": "DescribeConversionWorkspaceRevisionsResponse", + "options": { + "(google.api.http).get": "/v1/{conversion_workspace=projects/*/locations/*/conversionWorkspaces/*}:describeConversionWorkspaceRevisions" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{conversion_workspace=projects/*/locations/*/conversionWorkspaces/*}:describeConversionWorkspaceRevisions" + } + } + ] + }, + "FetchStaticIps": { + "requestType": "FetchStaticIpsRequest", + "responseType": "FetchStaticIpsResponse", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*}:fetchStaticIps", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*}:fetchStaticIps" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "ListMigrationJobsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "datamigration.googleapis.com/MigrationJob" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + }, + "orderBy": { + "type": "string", + "id": 5 + } + } + }, + "ListMigrationJobsResponse": { + "fields": { + "migrationJobs": { + "rule": "repeated", + "type": "MigrationJob", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetMigrationJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "datamigration.googleapis.com/MigrationJob" + } + } + } + }, + "CreateMigrationJobRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "datamigration.googleapis.com/MigrationJob" + } + }, + "migrationJobId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "migrationJob": { + "type": "MigrationJob", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4 + } + } + }, + "UpdateMigrationJobRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "migrationJob": { + "type": "MigrationJob", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3 + } + } + }, + "DeleteMigrationJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "datamigration.googleapis.com/MigrationJob" + } + }, + "requestId": { + "type": "string", + "id": 2 + }, + "force": { + "type": "bool", + "id": 3 + } + } + }, + "StartMigrationJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "datamigration.googleapis.com/MigrationJob" + } + } + } + }, + "StopMigrationJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "datamigration.googleapis.com/MigrationJob" + } + } + } + }, + "ResumeMigrationJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "datamigration.googleapis.com/MigrationJob" + } + } + } + }, + "PromoteMigrationJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "datamigration.googleapis.com/MigrationJob" + } + } + } + }, + "VerifyMigrationJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "datamigration.googleapis.com/MigrationJob" + } + } + } + }, + "RestartMigrationJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "datamigration.googleapis.com/MigrationJob" + } + } + } + }, + "GenerateSshScriptRequest": { + "oneofs": { + "vmConfig": { + "oneof": [ + "vmCreationConfig", + "vmSelectionConfig" + ] + } + }, + "fields": { + "migrationJob": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "datamigration.googleapis.com/MigrationJob" + } + }, + "vm": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "vmCreationConfig": { + "type": "VmCreationConfig", + "id": 100 + }, + "vmSelectionConfig": { + "type": "VmSelectionConfig", + "id": 101 + }, + "vmPort": { + "type": "int32", + "id": 3 + } + } + }, + "VmCreationConfig": { + "fields": { + "vmMachineType": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "vmZone": { + "type": "string", + "id": 2 + }, + "subnet": { + "type": "string", + "id": 3 + } + } + }, + "VmSelectionConfig": { + "fields": { + "vmZone": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "SshScript": { + "fields": { + "script": { + "type": "string", + "id": 1 + } + } + }, + "ListConnectionProfilesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "datamigration.googleapis.com/ConnectionProfile" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + }, + "orderBy": { + "type": "string", + "id": 5 + } + } + }, + "ListConnectionProfilesResponse": { + "fields": { + "connectionProfiles": { + "rule": "repeated", + "type": "ConnectionProfile", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetConnectionProfileRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "datamigration.googleapis.com/ConnectionProfile" + } + } + } + }, + "CreateConnectionProfileRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "datamigration.googleapis.com/ConnectionProfile" + } + }, + "connectionProfileId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "connectionProfile": { + "type": "ConnectionProfile", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validateOnly": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "skipValidation": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateConnectionProfileRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "connectionProfile": { + "type": "ConnectionProfile", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "skipValidation": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteConnectionProfileRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "datamigration.googleapis.com/ConnectionProfile" + } + }, + "requestId": { + "type": "string", + "id": 2 + }, + "force": { + "type": "bool", + "id": 3 + } + } + }, + "CreatePrivateConnectionRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "datamigration.googleapis.com/PrivateConnection" + } + }, + "privateConnectionId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "privateConnection": { + "type": "PrivateConnection", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "skipValidation": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListPrivateConnectionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "datamigration.googleapis.com/PrivateConnection" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + }, + "orderBy": { + "type": "string", + "id": 5 + } + } + }, + "ListPrivateConnectionsResponse": { + "fields": { + "privateConnections": { + "rule": "repeated", + "type": "PrivateConnection", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "DeletePrivateConnectionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "datamigration.googleapis.com/PrivateConnection" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GetPrivateConnectionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "datamigration.googleapis.com/PrivateConnection" + } + } + } + }, + "OperationMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "target": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "verb": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "statusMessage": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "requestedCancellation": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "apiVersion": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ListConversionWorkspacesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "datamigration.googleapis.com/ConversionWorkspace" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + } + } + }, + "ListConversionWorkspacesResponse": { + "fields": { + "conversionWorkspaces": { + "rule": "repeated", + "type": "ConversionWorkspace", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetConversionWorkspaceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "datamigration.googleapis.com/ConversionWorkspace" + } + } + } + }, + "CreateConversionWorkspaceRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "datamigration.googleapis.com/ConversionWorkspace" + } + }, + "conversionWorkspaceId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "conversionWorkspace": { + "type": "ConversionWorkspace", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4 + } + } + }, + "UpdateConversionWorkspaceRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "conversionWorkspace": { + "type": "ConversionWorkspace", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3 + } + } + }, + "DeleteConversionWorkspaceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "datamigration.googleapis.com/ConversionWorkspace" + } + }, + "requestId": { + "type": "string", + "id": 2 + } + } + }, + "CommitConversionWorkspaceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "datamigration.googleapis.com/ConversionWorkspace" + } + }, + "commitName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "RollbackConversionWorkspaceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "datamigration.googleapis.com/ConversionWorkspace" + } + } + } + }, + "ApplyConversionWorkspaceRequest": { + "oneofs": { + "destination": { + "oneof": [ + "connectionProfile" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "datamigration.googleapis.com/ConversionWorkspace" + } + }, + "filter": { + "type": "string", + "id": 2 + }, + "connectionProfile": { + "type": "string", + "id": 100 + } + } + }, + "SeedConversionWorkspaceRequest": { + "oneofs": { + "seedFrom": { + "oneof": [ + "sourceConnectionProfile", + "destinationConnectionProfile" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "datamigration.googleapis.com/ConversionWorkspace" + } + }, + "autoCommit": { + "type": "bool", + "id": 2 + }, + "sourceConnectionProfile": { + "type": "string", + "id": 100 + }, + "destinationConnectionProfile": { + "type": "string", + "id": 101 + } + } + }, + "ConvertConversionWorkspaceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "datamigration.googleapis.com/ConversionWorkspace" + } + }, + "autoCommit": { + "type": "bool", + "id": 4 + }, + "filter": { + "type": "string", + "id": 5 + } + } + }, + "ImportMappingRulesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "datamigration.googleapis.com/ConversionWorkspace" + } + }, + "rulesFormat": { + "type": "ImportRulesFileFormat", + "id": 2 + }, + "rulesFiles": { + "rule": "repeated", + "type": "RulesFile", + "id": 3 + }, + "autoCommit": { + "type": "bool", + "id": 6 + } + }, + "nested": { + "RulesFile": { + "fields": { + "rulesSourceFilename": { + "type": "string", + "id": 1 + }, + "rulesContent": { + "type": "string", + "id": 2 + } + } + } + } + }, + "DescribeDatabaseEntitiesRequest": { + "fields": { + "conversionWorkspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "datamigration.googleapis.com/ConversionWorkspace" + } + }, + "pageSize": { + "type": "int32", + "id": 3 + }, + "pageToken": { + "type": "string", + "id": 4 + }, + "tree": { + "type": "DBTreeType", + "id": 6 + }, + "uncommitted": { + "type": "bool", + "id": 11 + }, + "commitId": { + "type": "string", + "id": 12 + }, + "filter": { + "type": "string", + "id": 13 + } + }, + "nested": { + "DBTreeType": { + "values": { + "DB_TREE_TYPE_UNSPECIFIED": 0, + "SOURCE_TREE": 1, + "DRAFT_TREE": 2, + "DESTINATION_TREE": 3 + } + } + } + }, + "DescribeDatabaseEntitiesResponse": { + "fields": { + "databaseEntities": { + "rule": "repeated", + "type": "DatabaseEntity", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "SearchBackgroundJobsRequest": { + "fields": { + "conversionWorkspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "datamigration.googleapis.com/ConversionWorkspace" + } + }, + "returnMostRecentPerJobType": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maxSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "completedUntilTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SearchBackgroundJobsResponse": { + "fields": { + "jobs": { + "rule": "repeated", + "type": "BackgroundJobLogEntry", + "id": 1 + } + } + }, + "DescribeConversionWorkspaceRevisionsRequest": { + "fields": { + "conversionWorkspace": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "datamigration.googleapis.com/ConversionWorkspace" + } + }, + "commitId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DescribeConversionWorkspaceRevisionsResponse": { + "fields": { + "revisions": { + "rule": "repeated", + "type": "ConversionWorkspace", + "id": 1 + } + } + }, + "FetchStaticIpsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "FetchStaticIpsResponse": { + "fields": { + "staticIps": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "SslConfig": { + "fields": { + "type": { + "type": "SslType", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "clientKey": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "INPUT_ONLY" + } + }, + "clientCertificate": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "INPUT_ONLY" + } + }, + "caCertificate": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "SslType": { + "values": { + "SSL_TYPE_UNSPECIFIED": 0, + "SERVER_ONLY": 1, + "SERVER_CLIENT": 2 + } + } + } + }, + "MySqlConnectionProfile": { + "fields": { + "host": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "port": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "username": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "password": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "passwordSet": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "ssl": { + "type": "SslConfig", + "id": 6 + }, + "cloudSqlId": { + "type": "string", + "id": 7 + } + } + }, + "NetworkArchitecture": { + "values": { + "NETWORK_ARCHITECTURE_UNSPECIFIED": 0, + "NETWORK_ARCHITECTURE_OLD_CSQL_PRODUCER": 1, + "NETWORK_ARCHITECTURE_NEW_CSQL_PRODUCER": 2 + } + }, + "PostgreSqlConnectionProfile": { + "oneofs": { + "connectivity": { + "oneof": [ + "staticIpConnectivity", + "privateServiceConnectConnectivity" + ] + } + }, + "fields": { + "host": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "port": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "username": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "password": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "passwordSet": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "ssl": { + "type": "SslConfig", + "id": 6 + }, + "cloudSqlId": { + "type": "string", + "id": 7 + }, + "networkArchitecture": { + "type": "NetworkArchitecture", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "staticIpConnectivity": { + "type": "StaticIpConnectivity", + "id": 100 + }, + "privateServiceConnectConnectivity": { + "type": "PrivateServiceConnectConnectivity", + "id": 101 + } + } + }, + "OracleConnectionProfile": { + "oneofs": { + "connectivity": { + "oneof": [ + "staticServiceIpConnectivity", + "forwardSshConnectivity", + "privateConnectivity" + ] + } + }, + "fields": { + "host": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "port": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "username": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "password": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "passwordSet": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "databaseService": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "staticServiceIpConnectivity": { + "type": "StaticServiceIpConnectivity", + "id": 100 + }, + "forwardSshConnectivity": { + "type": "ForwardSshTunnelConnectivity", + "id": 101 + }, + "privateConnectivity": { + "type": "PrivateConnectivity", + "id": 102 } } }, - "ListMigrationJobsRequest": { + "CloudSqlConnectionProfile": { "fields": { - "parent": { + "cloudSqlId": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datamigration.googleapis.com/MigrationJob" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "pageSize": { - "type": "int32", - "id": 2 + "settings": { + "type": "CloudSqlSettings", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } }, - "pageToken": { + "privateIp": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "filter": { + "publicIp": { "type": "string", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "orderBy": { + "additionalPublicIp": { "type": "string", - "id": 5 + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, - "ListMigrationJobsResponse": { + "AlloyDbConnectionProfile": { "fields": { - "migrationJobs": { - "rule": "repeated", - "type": "MigrationJob", - "id": 1 - }, - "nextPageToken": { + "clusterId": { "type": "string", - "id": 2 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 + "settings": { + "type": "AlloyDbSettings", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } } } }, - "GetMigrationJobRequest": { + "SqlAclEntry": { + "oneofs": { + "expiration": { + "oneof": [ + "expireTime", + "ttl" + ] + } + }, "fields": { - "name": { + "value": { "type": "string", - "id": 1, + "id": 1 + }, + "expireTime": { + "type": "google.protobuf.Timestamp", + "id": 10 + }, + "ttl": { + "type": "google.protobuf.Duration", + "id": 11, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datamigration.googleapis.com/MigrationJob" + "(google.api.field_behavior)": "INPUT_ONLY" } + }, + "label": { + "type": "string", + "id": 3 } } }, - "CreateMigrationJobRequest": { + "SqlIpConfig": { "fields": { - "parent": { + "enableIpv4": { + "type": "google.protobuf.BoolValue", + "id": 1 + }, + "privateNetwork": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datamigration.googleapis.com/MigrationJob" - } + "id": 2 }, - "migrationJobId": { + "allocatedIpRange": { "type": "string", - "id": 2, + "id": 5, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } }, - "migrationJob": { - "type": "MigrationJob", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "requireSsl": { + "type": "google.protobuf.BoolValue", + "id": 3 }, - "requestId": { - "type": "string", + "authorizedNetworks": { + "rule": "repeated", + "type": "SqlAclEntry", "id": 4 } } }, - "UpdateMigrationJobRequest": { + "CloudSqlSettings": { "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "databaseVersion": { + "type": "SqlDatabaseVersion", + "id": 1 }, - "migrationJob": { - "type": "MigrationJob", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "userLabels": { + "keyType": "string", + "type": "string", + "id": 2 }, - "requestId": { + "tier": { "type": "string", "id": 3 - } - } - }, - "DeleteMigrationJobRequest": { - "fields": { - "name": { + }, + "storageAutoResizeLimit": { + "type": "google.protobuf.Int64Value", + "id": 4 + }, + "activationPolicy": { + "type": "SqlActivationPolicy", + "id": 5 + }, + "ipConfig": { + "type": "SqlIpConfig", + "id": 6 + }, + "autoStorageIncrease": { + "type": "google.protobuf.BoolValue", + "id": 7 + }, + "databaseFlags": { + "keyType": "string", "type": "string", - "id": 1, + "id": 8 + }, + "dataDiskType": { + "type": "SqlDataDiskType", + "id": 9 + }, + "dataDiskSizeGb": { + "type": "google.protobuf.Int64Value", + "id": 10 + }, + "zone": { + "type": "string", + "id": 11 + }, + "secondaryZone": { + "type": "string", + "id": 18, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datamigration.googleapis.com/MigrationJob" + "(google.api.field_behavior)": "OPTIONAL" } }, - "requestId": { + "sourceId": { "type": "string", - "id": 2 + "id": 12 }, - "force": { + "rootPassword": { + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "INPUT_ONLY" + } + }, + "rootPasswordSet": { "type": "bool", - "id": 3 - } - } - }, - "StartMigrationJobRequest": { - "fields": { - "name": { + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "collation": { "type": "string", - "id": 1, + "id": 15 + }, + "cmekKeyName": { + "type": "string", + "id": 16 + }, + "availabilityType": { + "type": "SqlAvailabilityType", + "id": 17, "options": { - "(google.api.resource_reference).type": "datamigration.googleapis.com/MigrationJob" + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "SqlActivationPolicy": { + "values": { + "SQL_ACTIVATION_POLICY_UNSPECIFIED": 0, + "ALWAYS": 1, + "NEVER": 2 + } + }, + "SqlDataDiskType": { + "values": { + "SQL_DATA_DISK_TYPE_UNSPECIFIED": 0, + "PD_SSD": 1, + "PD_HDD": 2 + } + }, + "SqlDatabaseVersion": { + "values": { + "SQL_DATABASE_VERSION_UNSPECIFIED": 0, + "MYSQL_5_6": 1, + "MYSQL_5_7": 2, + "POSTGRES_9_6": 3, + "POSTGRES_11": 4, + "POSTGRES_10": 5, + "MYSQL_8_0": 6, + "POSTGRES_12": 7, + "POSTGRES_13": 8, + "POSTGRES_14": 17 + } + }, + "SqlAvailabilityType": { + "values": { + "SQL_AVAILABILITY_TYPE_UNSPECIFIED": 0, + "ZONAL": 1, + "REGIONAL": 2 } } } }, - "StopMigrationJobRequest": { + "AlloyDbSettings": { "fields": { - "name": { - "type": "string", + "initialUser": { + "type": "UserPassword", "id": 1, "options": { - "(google.api.resource_reference).type": "datamigration.googleapis.com/MigrationJob" + "(google.api.field_behavior)": "INPUT_ONLY" } - } - } - }, - "ResumeMigrationJobRequest": { - "fields": { - "name": { + }, + "vpcNetwork": { "type": "string", - "id": 1, + "id": 2, "options": { - "(google.api.resource_reference).type": "datamigration.googleapis.com/MigrationJob" + "(google.api.field_behavior)": "REQUIRED" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "primaryInstanceSettings": { + "type": "PrimaryInstanceSettings", + "id": 4 + }, + "encryptionConfig": { + "type": "EncryptionConfig", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "UserPassword": { + "fields": { + "user": { + "type": "string", + "id": 1 + }, + "password": { + "type": "string", + "id": 2 + }, + "passwordSet": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "PrimaryInstanceSettings": { + "fields": { + "id": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "machineConfig": { + "type": "MachineConfig", + "id": 2 + }, + "databaseFlags": { + "keyType": "string", + "type": "string", + "id": 6 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 7 + }, + "privateIp": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "MachineConfig": { + "fields": { + "cpuCount": { + "type": "int32", + "id": 1 + } + } + } + } + }, + "EncryptionConfig": { + "fields": { + "kmsKeyName": { + "type": "string", + "id": 1 + } } } } }, - "PromoteMigrationJobRequest": { + "StaticIpConnectivity": { + "fields": {} + }, + "PrivateServiceConnectConnectivity": { "fields": { - "name": { + "serviceAttachment": { "type": "string", "id": 1, "options": { - "(google.api.resource_reference).type": "datamigration.googleapis.com/MigrationJob" + "(google.api.field_behavior)": "REQUIRED" } } } }, - "VerifyMigrationJobRequest": { + "ReverseSshConnectivity": { "fields": { - "name": { + "vmIp": { "type": "string", "id": 1, "options": { - "(google.api.resource_reference).type": "datamigration.googleapis.com/MigrationJob" + "(google.api.field_behavior)": "REQUIRED" + } + }, + "vmPort": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" } + }, + "vm": { + "type": "string", + "id": 3 + }, + "vpc": { + "type": "string", + "id": 4 } } }, - "RestartMigrationJobRequest": { + "VpcPeeringConnectivity": { "fields": { - "name": { + "vpc": { "type": "string", - "id": 1, - "options": { - "(google.api.resource_reference).type": "datamigration.googleapis.com/MigrationJob" - } + "id": 1 } } }, - "GenerateSshScriptRequest": { + "ForwardSshTunnelConnectivity": { "oneofs": { - "vmConfig": { + "authenticationMethod": { "oneof": [ - "vmCreationConfig", - "vmSelectionConfig" + "password", + "privateKey" ] } }, "fields": { - "migrationJob": { + "hostname": { "type": "string", "id": 1, "options": { - "(google.api.resource_reference).type": "datamigration.googleapis.com/MigrationJob" + "(google.api.field_behavior)": "REQUIRED" } }, - "vm": { + "username": { "type": "string", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } }, - "vmCreationConfig": { - "type": "VmCreationConfig", - "id": 100 - }, - "vmSelectionConfig": { - "type": "VmSelectionConfig", - "id": 101 - }, - "vmPort": { + "port": { "type": "int32", "id": 3 - } - } - }, - "VmCreationConfig": { - "fields": { - "vmMachineType": { + }, + "password": { "type": "string", - "id": 1, + "id": 100, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "INPUT_ONLY" } }, - "vmZone": { - "type": "string", - "id": 2 - }, - "subnet": { + "privateKey": { "type": "string", - "id": 3 + "id": 101, + "options": { + "(google.api.field_behavior)": "INPUT_ONLY" + } } } }, - "VmSelectionConfig": { + "StaticServiceIpConnectivity": { + "fields": {} + }, + "PrivateConnectivity": { "fields": { - "vmZone": { + "privateConnection": { "type": "string", "id": 1, "options": { @@ -685,874 +2558,1145 @@ } } }, - "SshScript": { + "DatabaseType": { "fields": { - "script": { - "type": "string", + "provider": { + "type": "DatabaseProvider", "id": 1 + }, + "engine": { + "type": "DatabaseEngine", + "id": 2 } } }, - "ListConnectionProfilesRequest": { + "MigrationJob": { + "options": { + "(google.api.resource).type": "datamigration.googleapis.com/MigrationJob", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/migrationJobs/{migration_job}" + }, + "oneofs": { + "connectivity": { + "oneof": [ + "reverseSshConnectivity", + "vpcPeeringConnectivity", + "staticIpConnectivity" + ] + } + }, "fields": { - "parent": { + "name": { "type": "string", - "id": 1, + "id": 1 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "datamigration.googleapis.com/ConnectionProfile" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "filter": { + "labels": { + "keyType": "string", "type": "string", "id": 4 }, - "orderBy": { + "displayName": { "type": "string", "id": 5 - } - } - }, - "ListConnectionProfilesResponse": { - "fields": { - "connectionProfiles": { - "rule": "repeated", - "type": "ConnectionProfile", - "id": 1 }, - "nextPageToken": { - "type": "string", - "id": 2 + "state": { + "type": "State", + "id": 6 }, - "unreachable": { - "rule": "repeated", + "phase": { + "type": "Phase", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "type": { + "type": "Type", + "id": 8, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "dumpPath": { "type": "string", - "id": 3 - } - } - }, - "GetConnectionProfileRequest": { - "fields": { - "name": { + "id": 9 + }, + "dumpFlags": { + "type": "DumpFlags", + "id": 17 + }, + "source": { "type": "string", - "id": 1, + "id": 10, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datamigration.googleapis.com/ConnectionProfile" + "(google.api.field_behavior)": "REQUIRED" } - } - } - }, - "CreateConnectionProfileRequest": { - "fields": { - "parent": { + }, + "destination": { "type": "string", - "id": 1, + "id": 11, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "reverseSshConnectivity": { + "type": "ReverseSshConnectivity", + "id": 101 + }, + "vpcPeeringConnectivity": { + "type": "VpcPeeringConnectivity", + "id": 102 + }, + "staticIpConnectivity": { + "type": "StaticIpConnectivity", + "id": 103 + }, + "duration": { + "type": "google.protobuf.Duration", + "id": 12, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datamigration.googleapis.com/ConnectionProfile" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "connectionProfileId": { - "type": "string", - "id": 2, + "error": { + "type": "google.rpc.Status", + "id": 13, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "connectionProfile": { - "type": "ConnectionProfile", - "id": 3, + "sourceDatabase": { + "type": "DatabaseType", + "id": 14 + }, + "destinationDatabase": { + "type": "DatabaseType", + "id": 15 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 16, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "requestId": { + "conversionWorkspace": { + "type": "ConversionWorkspaceInfo", + "id": 18 + }, + "filter": { "type": "string", - "id": 4 + "id": 20 + }, + "cmekKeyName": { + "type": "string", + "id": 21 } - } - }, - "UpdateConnectionProfileRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "MAINTENANCE": 1, + "DRAFT": 2, + "CREATING": 3, + "NOT_STARTED": 4, + "RUNNING": 5, + "FAILED": 6, + "COMPLETED": 7, + "DELETING": 8, + "STOPPING": 9, + "STOPPED": 10, + "DELETED": 11, + "UPDATING": 12, + "STARTING": 13, + "RESTARTING": 14, + "RESUMING": 15 } }, - "connectionProfile": { - "type": "ConnectionProfile", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" + "Phase": { + "values": { + "PHASE_UNSPECIFIED": 0, + "FULL_DUMP": 1, + "CDC": 2, + "PROMOTE_IN_PROGRESS": 3, + "WAITING_FOR_SOURCE_WRITES_TO_STOP": 4, + "PREPARING_THE_DUMP": 5 } }, - "requestId": { - "type": "string", - "id": 3 + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "ONE_TIME": 1, + "CONTINUOUS": 2 + } + }, + "DumpFlag": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "type": "string", + "id": 2 + } + } + }, + "DumpFlags": { + "fields": { + "dumpFlags": { + "rule": "repeated", + "type": "DumpFlag", + "id": 1 + } + } } } }, - "DeleteConnectionProfileRequest": { + "ConversionWorkspaceInfo": { "fields": { "name": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "datamigration.googleapis.com/ConnectionProfile" - } + "id": 1 }, - "requestId": { + "commitId": { "type": "string", "id": 2 - }, - "force": { - "type": "bool", - "id": 3 } } }, - "OperationMetadata": { + "ConnectionProfile": { + "options": { + "(google.api.resource).type": "datamigration.googleapis.com/ConnectionProfile", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/connectionProfiles/{connection_profile}" + }, + "oneofs": { + "connectionProfile": { + "oneof": [ + "mysql", + "postgresql", + "oracle", + "cloudsql", + "alloydb" + ] + } + }, "fields": { + "name": { + "type": "string", + "id": 1 + }, "createTime": { "type": "google.protobuf.Timestamp", - "id": 1, + "id": 2, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "endTime": { + "updateTime": { "type": "google.protobuf.Timestamp", - "id": 2, + "id": 3, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "target": { + "labels": { + "keyType": "string", "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "id": 4 }, - "verb": { + "state": { + "type": "State", + "id": 5 + }, + "displayName": { "type": "string", - "id": 4, + "id": 6 + }, + "mysql": { + "type": "MySqlConnectionProfile", + "id": 100 + }, + "postgresql": { + "type": "PostgreSqlConnectionProfile", + "id": 101 + }, + "oracle": { + "type": "OracleConnectionProfile", + "id": 104 + }, + "cloudsql": { + "type": "CloudSqlConnectionProfile", + "id": 102 + }, + "alloydb": { + "type": "AlloyDbConnectionProfile", + "id": 105 + }, + "error": { + "type": "google.rpc.Status", + "id": 7, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "statusMessage": { - "type": "string", - "id": 5, + "provider": { + "type": "DatabaseProvider", + "id": 8 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "DRAFT": 1, + "CREATING": 2, + "READY": 3, + "UPDATING": 4, + "DELETING": 5, + "DELETED": 6, + "FAILED": 7 + } + } + } + }, + "MigrationJobVerificationError": { + "fields": { + "errorCode": { + "type": "ErrorCode", + "id": 1, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "requestedCancellation": { - "type": "bool", - "id": 6, + "errorMessage": { + "type": "string", + "id": 2, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "apiVersion": { + "errorDetailMessage": { "type": "string", - "id": 7, + "id": 3, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } } + }, + "nested": { + "ErrorCode": { + "values": { + "ERROR_CODE_UNSPECIFIED": 0, + "CONNECTION_FAILURE": 1, + "AUTHENTICATION_FAILURE": 2, + "INVALID_CONNECTION_PROFILE_CONFIG": 3, + "VERSION_INCOMPATIBILITY": 4, + "CONNECTION_PROFILE_TYPES_INCOMPATIBILITY": 5, + "NO_PGLOGICAL_INSTALLED": 7, + "PGLOGICAL_NODE_ALREADY_EXISTS": 8, + "INVALID_WAL_LEVEL": 9, + "INVALID_SHARED_PRELOAD_LIBRARY": 10, + "INSUFFICIENT_MAX_REPLICATION_SLOTS": 11, + "INSUFFICIENT_MAX_WAL_SENDERS": 12, + "INSUFFICIENT_MAX_WORKER_PROCESSES": 13, + "UNSUPPORTED_EXTENSIONS": 14, + "UNSUPPORTED_MIGRATION_TYPE": 15, + "INVALID_RDS_LOGICAL_REPLICATION": 16, + "UNSUPPORTED_GTID_MODE": 17, + "UNSUPPORTED_TABLE_DEFINITION": 18, + "UNSUPPORTED_DEFINER": 19, + "CANT_RESTART_RUNNING_MIGRATION": 21, + "TABLES_WITH_LIMITED_SUPPORT": 24, + "UNSUPPORTED_DATABASE_LOCALE": 25, + "UNSUPPORTED_DATABASE_FDW_CONFIG": 26, + "ERROR_RDBMS": 27, + "SOURCE_SIZE_EXCEEDS_THRESHOLD": 28 + } + } } }, - "SslConfig": { + "DatabaseEngine": { + "values": { + "DATABASE_ENGINE_UNSPECIFIED": 0, + "MYSQL": 1, + "POSTGRESQL": 2, + "ORACLE": 4 + } + }, + "DatabaseProvider": { + "values": { + "DATABASE_PROVIDER_UNSPECIFIED": 0, + "CLOUDSQL": 1, + "RDS": 2, + "AURORA": 3, + "ALLOYDB": 4 + } + }, + "PrivateConnection": { + "options": { + "(google.api.resource).type": "datamigration.googleapis.com/PrivateConnection", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/privateConnections/{private_connection}" + }, + "oneofs": { + "connectivity": { + "oneof": [ + "vpcPeeringConfig" + ] + } + }, "fields": { - "type": { - "type": "SslType", - "id": 1, + "name": { + "type": "string", + "id": 1 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "clientKey": { - "type": "string", - "id": 2, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3, "options": { - "(google.api.field_behavior)": "INPUT_ONLY" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "clientCertificate": { + "labels": { + "keyType": "string", "type": "string", - "id": 3, + "id": 4 + }, + "displayName": { + "type": "string", + "id": 5 + }, + "state": { + "type": "State", + "id": 6, "options": { - "(google.api.field_behavior)": "INPUT_ONLY" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "caCertificate": { - "type": "string", - "id": 4, + "error": { + "type": "google.rpc.Status", + "id": 7, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "vpcPeeringConfig": { + "type": "VpcPeeringConfig", + "id": 100 } }, "nested": { - "SslType": { + "State": { "values": { - "SSL_TYPE_UNSPECIFIED": 0, - "SERVER_ONLY": 1, - "SERVER_CLIENT": 2 + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "CREATED": 2, + "FAILED": 3, + "DELETING": 4, + "FAILED_TO_DELETE": 5, + "DELETED": 6 } } } }, - "MySqlConnectionProfile": { + "VpcPeeringConfig": { "fields": { - "host": { + "vpcName": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "compute.googleapis.com/Networks" } }, - "port": { - "type": "int32", + "subnet": { + "type": "string", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } - }, - "username": { - "type": "string", - "id": 3, + } + } + }, + "DatabaseEngineInfo": { + "fields": { + "engine": { + "type": "DatabaseEngine", + "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED" } }, - "password": { + "version": { "type": "string", - "id": 4, + "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } - }, - "passwordSet": { - "type": "bool", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "ssl": { - "type": "SslConfig", - "id": 6 - }, - "cloudSqlId": { - "type": "string", - "id": 7 } } }, - "PostgreSqlConnectionProfile": { + "ConversionWorkspace": { + "options": { + "(google.api.resource).type": "datamigration.googleapis.com/ConversionWorkspace", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}" + }, "fields": { - "host": { + "name": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "id": 1 }, - "port": { - "type": "int32", + "source": { + "type": "DatabaseEngineInfo", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } }, - "username": { - "type": "string", + "destination": { + "type": "DatabaseEngineInfo", "id": 3, "options": { "(google.api.field_behavior)": "REQUIRED" } }, - "password": { + "globalSettings": { + "keyType": "string", "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "id": 4 }, - "passwordSet": { + "hasUncommittedChanges": { "type": "bool", "id": 5, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "ssl": { - "type": "SslConfig", - "id": 6 - }, - "cloudSqlId": { - "type": "string", - "id": 7 - } - } - }, - "CloudSqlConnectionProfile": { - "fields": { - "cloudSqlId": { + "latestCommitId": { "type": "string", - "id": 1, + "id": 6, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "settings": { - "type": "CloudSqlSettings", - "id": 2, + "latestCommitTime": { + "type": "google.protobuf.Timestamp", + "id": 7, "options": { - "(google.api.field_behavior)": "IMMUTABLE" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "privateIp": { - "type": "string", - "id": 3, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 9, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "publicIp": { - "type": "string", - "id": 4, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 10, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "displayName": { + "type": "string", + "id": 11 } } }, - "SqlAclEntry": { + "BackgroundJobLogEntry": { "oneofs": { - "expiration": { + "jobDetails": { "oneof": [ - "expireTime", - "ttl" + "seedJobDetails", + "importRulesJobDetails", + "convertJobDetails", + "applyJobDetails" ] } }, "fields": { - "value": { - "type": "string", - "id": 1 - }, - "expireTime": { - "type": "google.protobuf.Timestamp", - "id": 10 - }, - "ttl": { - "type": "google.protobuf.Duration", - "id": 11, - "options": { - "(google.api.field_behavior)": "INPUT_ONLY" - } - }, - "label": { - "type": "string", - "id": 3 - } - } - }, - "SqlIpConfig": { - "fields": { - "enableIpv4": { - "type": "google.protobuf.BoolValue", - "id": 1 - }, - "privateNetwork": { + "id": { "type": "string", - "id": 2 - }, - "requireSsl": { - "type": "google.protobuf.BoolValue", - "id": 3 - }, - "authorizedNetworks": { - "rule": "repeated", - "type": "SqlAclEntry", - "id": 4 - } - } - }, - "CloudSqlSettings": { - "fields": { - "databaseVersion": { - "type": "SqlDatabaseVersion", "id": 1 }, - "userLabels": { - "keyType": "string", - "type": "string", + "jobType": { + "type": "BackgroundJobType", "id": 2 }, - "tier": { - "type": "string", + "startTime": { + "type": "google.protobuf.Timestamp", "id": 3 }, - "storageAutoResizeLimit": { - "type": "google.protobuf.Int64Value", + "finishTime": { + "type": "google.protobuf.Timestamp", "id": 4 }, - "activationPolicy": { - "type": "SqlActivationPolicy", + "completionState": { + "type": "JobCompletionState", "id": 5 }, - "ipConfig": { - "type": "SqlIpConfig", + "completionComment": { + "type": "string", "id": 6 }, - "autoStorageIncrease": { - "type": "google.protobuf.BoolValue", + "requestAutocommit": { + "type": "bool", "id": 7 }, - "databaseFlags": { - "keyType": "string", - "type": "string", - "id": 8 - }, - "dataDiskType": { - "type": "SqlDataDiskType", - "id": 9 - }, - "dataDiskSizeGb": { - "type": "google.protobuf.Int64Value", - "id": 10 - }, - "zone": { - "type": "string", - "id": 11 - }, - "sourceId": { - "type": "string", - "id": 12 + "seedJobDetails": { + "type": "SeedJobDetails", + "id": 100 }, - "rootPassword": { - "type": "string", - "id": 13, - "options": { - "(google.api.field_behavior)": "INPUT_ONLY" - } + "importRulesJobDetails": { + "type": "ImportRulesJobDetails", + "id": 101 }, - "rootPasswordSet": { - "type": "bool", - "id": 14, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "convertJobDetails": { + "type": "ConvertJobDetails", + "id": 102 }, - "collation": { - "type": "string", - "id": 15 + "applyJobDetails": { + "type": "ApplyJobDetails", + "id": 103 } }, "nested": { - "SqlActivationPolicy": { + "JobCompletionState": { "values": { - "SQL_ACTIVATION_POLICY_UNSPECIFIED": 0, - "ALWAYS": 1, - "NEVER": 2 + "JOB_COMPLETION_STATE_UNSPECIFIED": 0, + "SUCCEEDED": 1, + "FAILED": 2 + } + }, + "SeedJobDetails": { + "fields": { + "connectionProfile": { + "type": "string", + "id": 1 + } + } + }, + "ImportRulesJobDetails": { + "fields": { + "files": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "fileFormat": { + "type": "ImportRulesFileFormat", + "id": 2 + } } }, - "SqlDataDiskType": { - "values": { - "SQL_DATA_DISK_TYPE_UNSPECIFIED": 0, - "PD_SSD": 1, - "PD_HDD": 2 + "ConvertJobDetails": { + "fields": { + "filter": { + "type": "string", + "id": 1 + } } }, - "SqlDatabaseVersion": { - "values": { - "SQL_DATABASE_VERSION_UNSPECIFIED": 0, - "MYSQL_5_6": 1, - "MYSQL_5_7": 2, - "POSTGRES_9_6": 3, - "POSTGRES_11": 4, - "POSTGRES_10": 5, - "MYSQL_8_0": 6, - "POSTGRES_12": 7, - "POSTGRES_13": 8 + "ApplyJobDetails": { + "fields": { + "connectionProfile": { + "type": "string", + "id": 1 + }, + "filter": { + "type": "string", + "id": 2 + } } } } }, - "StaticIpConnectivity": { - "fields": {} - }, - "ReverseSshConnectivity": { + "DatabaseEntity": { + "oneofs": { + "entityBody": { + "oneof": [ + "schema", + "table", + "view", + "sequence", + "storedProcedure", + "databaseFunction", + "synonym", + "databasePackage" + ] + } + }, "fields": { - "vmIp": { + "shortName": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "vmPort": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "id": 1 }, - "vm": { + "parentEntity": { "type": "string", + "id": 2 + }, + "tree": { + "type": "TreeType", "id": 3 }, - "vpc": { - "type": "string", + "entityType": { + "type": "DatabaseEntityType", "id": 4 + }, + "mappings": { + "rule": "repeated", + "type": "EntityMapping", + "id": 5 + }, + "schema": { + "type": "SchemaEntity", + "id": 102 + }, + "table": { + "type": "TableEntity", + "id": 103 + }, + "view": { + "type": "ViewEntity", + "id": 104 + }, + "sequence": { + "type": "SequenceEntity", + "id": 105 + }, + "storedProcedure": { + "type": "StoredProcedureEntity", + "id": 106 + }, + "databaseFunction": { + "type": "FunctionEntity", + "id": 107 + }, + "synonym": { + "type": "SynonymEntity", + "id": 108 + }, + "databasePackage": { + "type": "PackageEntity", + "id": 109 + } + }, + "nested": { + "TreeType": { + "values": { + "TREE_TYPE_UNSPECIFIED": 0, + "SOURCE": 1, + "DRAFT": 2, + "DESTINATION": 3 + } } } }, - "VpcPeeringConnectivity": { + "SchemaEntity": { "fields": { - "vpc": { - "type": "string", + "customFeatures": { + "type": "google.protobuf.Struct", "id": 1 } } }, - "DatabaseType": { + "TableEntity": { "fields": { - "provider": { - "type": "DatabaseProvider", + "columns": { + "rule": "repeated", + "type": "ColumnEntity", "id": 1 }, - "engine": { - "type": "DatabaseEngine", + "constraints": { + "rule": "repeated", + "type": "ConstraintEntity", "id": 2 + }, + "indices": { + "rule": "repeated", + "type": "IndexEntity", + "id": 3 + }, + "triggers": { + "rule": "repeated", + "type": "TriggerEntity", + "id": 4 + }, + "customFeatures": { + "type": "google.protobuf.Struct", + "id": 5 + }, + "comment": { + "type": "string", + "id": 6 } } }, - "MigrationJob": { - "options": { - "(google.api.resource).type": "datamigration.googleapis.com/MigrationJob", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/migrationJobs/{migration_job}" - }, - "oneofs": { - "connectivity": { - "oneof": [ - "reverseSshConnectivity", - "vpcPeeringConnectivity", - "staticIpConnectivity" - ] - } - }, + "ColumnEntity": { "fields": { "name": { "type": "string", "id": 1 }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "dataType": { + "type": "string", + "id": 2 }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "charset": { + "type": "string", + "id": 3 }, - "labels": { - "keyType": "string", + "collation": { "type": "string", "id": 4 }, - "displayName": { - "type": "string", + "length": { + "type": "int64", "id": 5 }, - "state": { - "type": "State", + "precision": { + "type": "int32", "id": 6 }, - "phase": { - "type": "Phase", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "scale": { + "type": "int32", + "id": 7 }, - "type": { - "type": "Type", - "id": 8, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "fractionalSecondsPrecision": { + "type": "int32", + "id": 8 }, - "dumpPath": { - "type": "string", + "array": { + "type": "bool", "id": 9 }, - "source": { + "arrayLength": { + "type": "int32", + "id": 10 + }, + "nullable": { + "type": "bool", + "id": 11 + }, + "autoGenerated": { + "type": "bool", + "id": 12 + }, + "udt": { + "type": "bool", + "id": 13 + }, + "customFeatures": { + "type": "google.protobuf.Struct", + "id": 14 + }, + "setValues": { + "rule": "repeated", "type": "string", - "id": 10, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "id": 15 }, - "destination": { + "comment": { "type": "string", - "id": 11, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "id": 16 }, - "reverseSshConnectivity": { - "type": "ReverseSshConnectivity", - "id": 101 + "ordinalPosition": { + "type": "int32", + "id": 17 }, - "vpcPeeringConnectivity": { - "type": "VpcPeeringConnectivity", - "id": 102 + "defaultValue": { + "type": "string", + "id": 18 + } + } + }, + "ConstraintEntity": { + "fields": { + "name": { + "type": "string", + "id": 1 }, - "staticIpConnectivity": { - "type": "StaticIpConnectivity", - "id": 103 + "type": { + "type": "string", + "id": 2 }, - "duration": { - "type": "google.protobuf.Duration", - "id": 12, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "tableColumns": { + "rule": "repeated", + "type": "string", + "id": 3 }, - "error": { - "type": "google.rpc.Status", - "id": 13, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "customFeatures": { + "type": "google.protobuf.Struct", + "id": 4 }, - "sourceDatabase": { - "type": "DatabaseType", - "id": 14 + "referenceColumns": { + "rule": "repeated", + "type": "string", + "id": 5 }, - "destinationDatabase": { - "type": "DatabaseType", - "id": 15 + "referenceTable": { + "type": "string", + "id": 6 }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 16, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "tableName": { + "type": "string", + "id": 7 } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "MAINTENANCE": 1, - "DRAFT": 2, - "CREATING": 3, - "NOT_STARTED": 4, - "RUNNING": 5, - "FAILED": 6, - "COMPLETED": 7, - "DELETING": 8, - "STOPPING": 9, - "STOPPED": 10, - "DELETED": 11, - "UPDATING": 12, - "STARTING": 13, - "RESTARTING": 14, - "RESUMING": 15 - } + } + }, + "IndexEntity": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "type": { + "type": "string", + "id": 2 + }, + "tableColumns": { + "rule": "repeated", + "type": "string", + "id": 3 }, - "Phase": { - "values": { - "PHASE_UNSPECIFIED": 0, - "FULL_DUMP": 1, - "CDC": 2, - "PROMOTE_IN_PROGRESS": 3, - "WAITING_FOR_SOURCE_WRITES_TO_STOP": 4, - "PREPARING_THE_DUMP": 5 - } + "unique": { + "type": "bool", + "id": 4 }, - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "ONE_TIME": 1, - "CONTINUOUS": 2 - } + "customFeatures": { + "type": "google.protobuf.Struct", + "id": 5 } } }, - "ConnectionProfile": { - "options": { - "(google.api.resource).type": "datamigration.googleapis.com/ConnectionProfile", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/connectionProfiles/{connection_profile}" - }, - "oneofs": { - "connectionProfile": { - "oneof": [ - "mysql", - "postgresql", - "cloudsql" - ] - } - }, + "TriggerEntity": { "fields": { "name": { "type": "string", "id": 1 }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "triggeringEvents": { + "rule": "repeated", + "type": "string", + "id": 2 }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "triggerType": { + "type": "string", + "id": 3 }, - "labels": { - "keyType": "string", + "sqlCode": { "type": "string", "id": 4 }, - "state": { - "type": "State", + "customFeatures": { + "type": "google.protobuf.Struct", "id": 5 - }, - "displayName": { + } + } + }, + "ViewEntity": { + "fields": { + "sqlCode": { "type": "string", - "id": 6 + "id": 1 }, - "mysql": { - "type": "MySqlConnectionProfile", - "id": 100 + "customFeatures": { + "type": "google.protobuf.Struct", + "id": 2 }, - "postgresql": { - "type": "PostgreSqlConnectionProfile", - "id": 101 + "constraints": { + "rule": "repeated", + "type": "ConstraintEntity", + "id": 3 + } + } + }, + "SequenceEntity": { + "fields": { + "increment": { + "type": "int64", + "id": 1 }, - "cloudsql": { - "type": "CloudSqlConnectionProfile", - "id": 102 + "startValue": { + "type": "bytes", + "id": 2 }, - "error": { - "type": "google.rpc.Status", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "maxValue": { + "type": "bytes", + "id": 3 }, - "provider": { - "type": "DatabaseProvider", - "id": 8 + "minValue": { + "type": "bytes", + "id": 4 + }, + "cycle": { + "type": "bool", + "id": 5 + }, + "cache": { + "type": "int64", + "id": 6 + }, + "customFeatures": { + "type": "google.protobuf.Struct", + "id": 7 } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "DRAFT": 1, - "CREATING": 2, - "READY": 3, - "UPDATING": 4, - "DELETING": 5, - "DELETED": 6, - "FAILED": 7 - } + } + }, + "StoredProcedureEntity": { + "fields": { + "sqlCode": { + "type": "string", + "id": 1 + }, + "customFeatures": { + "type": "google.protobuf.Struct", + "id": 2 } } }, - "MigrationJobVerificationError": { + "FunctionEntity": { "fields": { - "errorCode": { - "type": "ErrorCode", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "sqlCode": { + "type": "string", + "id": 1 }, - "errorMessage": { + "customFeatures": { + "type": "google.protobuf.Struct", + "id": 2 + } + } + }, + "SynonymEntity": { + "fields": { + "sourceEntity": { "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "id": 1 }, - "errorDetailMessage": { + "sourceType": { + "type": "DatabaseEntityType", + "id": 2 + }, + "customFeatures": { + "type": "google.protobuf.Struct", + "id": 3 + } + } + }, + "PackageEntity": { + "fields": { + "packageSqlCode": { "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "id": 1 + }, + "packageBody": { + "type": "string", + "id": 2 + }, + "customFeatures": { + "type": "google.protobuf.Struct", + "id": 3 } - }, - "nested": { - "ErrorCode": { - "values": { - "ERROR_CODE_UNSPECIFIED": 0, - "CONNECTION_FAILURE": 1, - "AUTHENTICATION_FAILURE": 2, - "INVALID_CONNECTION_PROFILE_CONFIG": 3, - "VERSION_INCOMPATIBILITY": 4, - "CONNECTION_PROFILE_TYPES_INCOMPATIBILITY": 5, - "NO_PGLOGICAL_INSTALLED": 7, - "PGLOGICAL_NODE_ALREADY_EXISTS": 8, - "INVALID_WAL_LEVEL": 9, - "INVALID_SHARED_PRELOAD_LIBRARY": 10, - "INSUFFICIENT_MAX_REPLICATION_SLOTS": 11, - "INSUFFICIENT_MAX_WAL_SENDERS": 12, - "INSUFFICIENT_MAX_WORKER_PROCESSES": 13, - "UNSUPPORTED_EXTENSIONS": 14, - "UNSUPPORTED_MIGRATION_TYPE": 15, - "INVALID_RDS_LOGICAL_REPLICATION": 16, - "UNSUPPORTED_GTID_MODE": 17, - "UNSUPPORTED_TABLE_DEFINITION": 18, - "UNSUPPORTED_DEFINER": 19, - "CANT_RESTART_RUNNING_MIGRATION": 21 - } + } + }, + "EntityMapping": { + "fields": { + "sourceEntity": { + "type": "string", + "id": 1 + }, + "draftEntity": { + "type": "string", + "id": 2 + }, + "sourceType": { + "type": "DatabaseEntityType", + "id": 4 + }, + "draftType": { + "type": "DatabaseEntityType", + "id": 5 + }, + "mappingLog": { + "rule": "repeated", + "type": "EntityMappingLogEntry", + "id": 3 } } }, - "DatabaseEngine": { + "EntityMappingLogEntry": { + "fields": { + "ruleId": { + "type": "string", + "id": 1 + }, + "ruleRevisionId": { + "type": "string", + "id": 2 + }, + "mappingComment": { + "type": "string", + "id": 3 + } + } + }, + "DatabaseEntityType": { "values": { - "DATABASE_ENGINE_UNSPECIFIED": 0, - "MYSQL": 1, - "POSTGRESQL": 2 + "DATABASE_ENTITY_TYPE_UNSPECIFIED": 0, + "DATABASE_ENTITY_TYPE_SCHEMA": 1, + "DATABASE_ENTITY_TYPE_TABLE": 2, + "DATABASE_ENTITY_TYPE_COLUMN": 3, + "DATABASE_ENTITY_TYPE_CONSTRAINT": 4, + "DATABASE_ENTITY_TYPE_INDEX": 5, + "DATABASE_ENTITY_TYPE_TRIGGER": 6, + "DATABASE_ENTITY_TYPE_VIEW": 7, + "DATABASE_ENTITY_TYPE_SEQUENCE": 8, + "DATABASE_ENTITY_TYPE_STORED_PROCEDURE": 9, + "DATABASE_ENTITY_TYPE_FUNCTION": 10, + "DATABASE_ENTITY_TYPE_SYNONYM": 11, + "DATABASE_ENTITY_TYPE_DATABASE_PACKAGE": 12, + "DATABASE_ENTITY_TYPE_UDT": 13, + "DATABASE_ENTITY_TYPE_MATERIALIZED_VIEW": 14, + "DATABASE_ENTITY_TYPE_DATABASE": 15 } }, - "DatabaseProvider": { + "BackgroundJobType": { "values": { - "DATABASE_PROVIDER_UNSPECIFIED": 0, - "CLOUDSQL": 1, - "RDS": 2 + "BACKGROUND_JOB_TYPE_UNSPECIFIED": 0, + "BACKGROUND_JOB_TYPE_SOURCE_SEED": 1, + "BACKGROUND_JOB_TYPE_CONVERT": 2, + "BACKGROUND_JOB_TYPE_APPLY_DESTINATION": 3, + "BACKGROUND_JOB_TYPE_IMPORT_RULES_FILE": 5 + } + }, + "ImportRulesFileFormat": { + "values": { + "IMPORT_RULES_FILE_FORMAT_UNSPECIFIED": 0, + "IMPORT_RULES_FILE_FORMAT_HARBOUR_BRIDGE_SESSION_FILE": 1, + "IMPORT_RULES_FILE_FORMAT_ORATOPG_CONFIG_FILE": 2 } } } @@ -2810,6 +4954,69 @@ } } }, + "Struct": { + "fields": { + "fields": { + "keyType": "string", + "type": "Value", + "id": 1 + } + } + }, + "Value": { + "oneofs": { + "kind": { + "oneof": [ + "nullValue", + "numberValue", + "stringValue", + "boolValue", + "structValue", + "listValue" + ] + } + }, + "fields": { + "nullValue": { + "type": "NullValue", + "id": 1 + }, + "numberValue": { + "type": "double", + "id": 2 + }, + "stringValue": { + "type": "string", + "id": 3 + }, + "boolValue": { + "type": "bool", + "id": 4 + }, + "structValue": { + "type": "Struct", + "id": 5 + }, + "listValue": { + "type": "ListValue", + "id": 6 + } + } + }, + "NullValue": { + "values": { + "NULL_VALUE": 0 + } + }, + "ListValue": { + "fields": { + "values": { + "rule": "repeated", + "type": "Value", + "id": 1 + } + } + }, "Empty": { "fields": {} }, diff --git a/packages/google-cloud-clouddms/samples/README.md b/packages/google-cloud-clouddms/samples/README.md index 3b56625fba6..9592b8641c7 100644 --- a/packages/google-cloud-clouddms/samples/README.md +++ b/packages/google-cloud-clouddms/samples/README.md @@ -12,25 +12,43 @@ * [Before you begin](#before-you-begin) * [Samples](#samples) + * [Data_migration_service.apply_conversion_workspace](#data_migration_service.apply_conversion_workspace) + * [Data_migration_service.commit_conversion_workspace](#data_migration_service.commit_conversion_workspace) + * [Data_migration_service.convert_conversion_workspace](#data_migration_service.convert_conversion_workspace) * [Data_migration_service.create_connection_profile](#data_migration_service.create_connection_profile) + * [Data_migration_service.create_conversion_workspace](#data_migration_service.create_conversion_workspace) * [Data_migration_service.create_migration_job](#data_migration_service.create_migration_job) + * [Data_migration_service.create_private_connection](#data_migration_service.create_private_connection) * [Data_migration_service.delete_connection_profile](#data_migration_service.delete_connection_profile) + * [Data_migration_service.delete_conversion_workspace](#data_migration_service.delete_conversion_workspace) * [Data_migration_service.delete_migration_job](#data_migration_service.delete_migration_job) + * [Data_migration_service.delete_private_connection](#data_migration_service.delete_private_connection) + * [Data_migration_service.describe_conversion_workspace_revisions](#data_migration_service.describe_conversion_workspace_revisions) + * [Data_migration_service.describe_database_entities](#data_migration_service.describe_database_entities) + * [Data_migration_service.fetch_static_ips](#data_migration_service.fetch_static_ips) * [Data_migration_service.generate_ssh_script](#data_migration_service.generate_ssh_script) * [Data_migration_service.get_connection_profile](#data_migration_service.get_connection_profile) + * [Data_migration_service.get_conversion_workspace](#data_migration_service.get_conversion_workspace) * [Data_migration_service.get_migration_job](#data_migration_service.get_migration_job) + * [Data_migration_service.get_private_connection](#data_migration_service.get_private_connection) + * [Data_migration_service.import_mapping_rules](#data_migration_service.import_mapping_rules) * [Data_migration_service.list_connection_profiles](#data_migration_service.list_connection_profiles) + * [Data_migration_service.list_conversion_workspaces](#data_migration_service.list_conversion_workspaces) * [Data_migration_service.list_migration_jobs](#data_migration_service.list_migration_jobs) + * [Data_migration_service.list_private_connections](#data_migration_service.list_private_connections) * [Data_migration_service.promote_migration_job](#data_migration_service.promote_migration_job) * [Data_migration_service.restart_migration_job](#data_migration_service.restart_migration_job) * [Data_migration_service.resume_migration_job](#data_migration_service.resume_migration_job) + * [Data_migration_service.rollback_conversion_workspace](#data_migration_service.rollback_conversion_workspace) + * [Data_migration_service.search_background_jobs](#data_migration_service.search_background_jobs) + * [Data_migration_service.seed_conversion_workspace](#data_migration_service.seed_conversion_workspace) * [Data_migration_service.start_migration_job](#data_migration_service.start_migration_job) * [Data_migration_service.stop_migration_job](#data_migration_service.stop_migration_job) * [Data_migration_service.update_connection_profile](#data_migration_service.update_connection_profile) + * [Data_migration_service.update_conversion_workspace](#data_migration_service.update_conversion_workspace) * [Data_migration_service.update_migration_job](#data_migration_service.update_migration_job) * [Data_migration_service.verify_migration_job](#data_migration_service.verify_migration_job) * [Quickstart](#quickstart) - * [Quickstart](#quickstart) ## Before you begin @@ -47,6 +65,57 @@ Before running the samples, make sure you've followed the steps outlined in +### Data_migration_service.apply_conversion_workspace + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.apply_conversion_workspace.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.apply_conversion_workspace.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.apply_conversion_workspace.js` + + +----- + + + + +### Data_migration_service.commit_conversion_workspace + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.commit_conversion_workspace.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.commit_conversion_workspace.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.commit_conversion_workspace.js` + + +----- + + + + +### Data_migration_service.convert_conversion_workspace + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.convert_conversion_workspace.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.convert_conversion_workspace.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.convert_conversion_workspace.js` + + +----- + + + + ### Data_migration_service.create_connection_profile View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.create_connection_profile.js). @@ -64,6 +133,23 @@ __Usage:__ +### Data_migration_service.create_conversion_workspace + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.create_conversion_workspace.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.create_conversion_workspace.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.create_conversion_workspace.js` + + +----- + + + + ### Data_migration_service.create_migration_job View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.create_migration_job.js). @@ -81,6 +167,23 @@ __Usage:__ +### Data_migration_service.create_private_connection + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.create_private_connection.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.create_private_connection.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.create_private_connection.js` + + +----- + + + + ### Data_migration_service.delete_connection_profile View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.delete_connection_profile.js). @@ -98,6 +201,23 @@ __Usage:__ +### Data_migration_service.delete_conversion_workspace + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.delete_conversion_workspace.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.delete_conversion_workspace.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.delete_conversion_workspace.js` + + +----- + + + + ### Data_migration_service.delete_migration_job View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.delete_migration_job.js). @@ -115,6 +235,74 @@ __Usage:__ +### Data_migration_service.delete_private_connection + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.delete_private_connection.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.delete_private_connection.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.delete_private_connection.js` + + +----- + + + + +### Data_migration_service.describe_conversion_workspace_revisions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.describe_conversion_workspace_revisions.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.describe_conversion_workspace_revisions.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.describe_conversion_workspace_revisions.js` + + +----- + + + + +### Data_migration_service.describe_database_entities + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.describe_database_entities.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.describe_database_entities.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.describe_database_entities.js` + + +----- + + + + +### Data_migration_service.fetch_static_ips + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.fetch_static_ips.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.fetch_static_ips.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.fetch_static_ips.js` + + +----- + + + + ### Data_migration_service.generate_ssh_script View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.generate_ssh_script.js). @@ -149,6 +337,23 @@ __Usage:__ +### Data_migration_service.get_conversion_workspace + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.get_conversion_workspace.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.get_conversion_workspace.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.get_conversion_workspace.js` + + +----- + + + + ### Data_migration_service.get_migration_job View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.get_migration_job.js). @@ -166,6 +371,40 @@ __Usage:__ +### Data_migration_service.get_private_connection + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.get_private_connection.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.get_private_connection.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.get_private_connection.js` + + +----- + + + + +### Data_migration_service.import_mapping_rules + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.import_mapping_rules.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.import_mapping_rules.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.import_mapping_rules.js` + + +----- + + + + ### Data_migration_service.list_connection_profiles View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.list_connection_profiles.js). @@ -183,6 +422,23 @@ __Usage:__ +### Data_migration_service.list_conversion_workspaces + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.list_conversion_workspaces.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.list_conversion_workspaces.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.list_conversion_workspaces.js` + + +----- + + + + ### Data_migration_service.list_migration_jobs View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.list_migration_jobs.js). @@ -200,6 +456,23 @@ __Usage:__ +### Data_migration_service.list_private_connections + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.list_private_connections.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.list_private_connections.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.list_private_connections.js` + + +----- + + + + ### Data_migration_service.promote_migration_job View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.promote_migration_job.js). @@ -251,6 +524,57 @@ __Usage:__ +### Data_migration_service.rollback_conversion_workspace + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.rollback_conversion_workspace.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.rollback_conversion_workspace.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.rollback_conversion_workspace.js` + + +----- + + + + +### Data_migration_service.search_background_jobs + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.search_background_jobs.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.search_background_jobs.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.search_background_jobs.js` + + +----- + + + + +### Data_migration_service.seed_conversion_workspace + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.seed_conversion_workspace.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.seed_conversion_workspace.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.seed_conversion_workspace.js` + + +----- + + + + ### Data_migration_service.start_migration_job View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.start_migration_job.js). @@ -302,16 +626,16 @@ __Usage:__ -### Data_migration_service.update_migration_job +### Data_migration_service.update_conversion_workspace -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.update_migration_job.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.update_conversion_workspace.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.update_migration_job.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.update_conversion_workspace.js,samples/README.md) __Usage:__ -`node packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.update_migration_job.js` +`node packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.update_conversion_workspace.js` ----- @@ -319,16 +643,16 @@ __Usage:__ -### Data_migration_service.verify_migration_job +### Data_migration_service.update_migration_job -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.verify_migration_job.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.update_migration_job.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.verify_migration_job.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.update_migration_job.js,samples/README.md) __Usage:__ -`node packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.verify_migration_job.js` +`node packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.update_migration_job.js` ----- @@ -336,16 +660,16 @@ __Usage:__ -### Quickstart +### Data_migration_service.verify_migration_job -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/quickstart.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.verify_migration_job.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/quickstart.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.verify_migration_job.js,samples/README.md) __Usage:__ -`node packages/google-cloud-clouddms/samples/quickstart.js` +`node packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.verify_migration_job.js` ----- @@ -355,14 +679,14 @@ __Usage:__ ### Quickstart -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/test/quickstart.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-clouddms/samples/quickstart.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/test/quickstart.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-clouddms/samples/quickstart.js,samples/README.md) __Usage:__ -`node packages/google-cloud-clouddms/samples/test/quickstart.js` +`node packages/google-cloud-clouddms/samples/quickstart.js` diff --git a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.apply_conversion_workspace.js b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.apply_conversion_workspace.js new file mode 100644 index 00000000000..5db674a94e3 --- /dev/null +++ b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.apply_conversion_workspace.js @@ -0,0 +1,73 @@ +// Copyright 2023 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 datamigration_v1_generated_DataMigrationService_ApplyConversionWorkspace_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 conversion workspace resource for which to apply + * the draft tree. Must be in the form of: + * projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}. + */ + // const name = 'abc123' + /** + * Filter which entities to apply. Leaving this field empty will apply all of + * the entities. Supports Google AIP 160 based filtering. + */ + // const filter = 'abc123' + /** + * Fully qualified (Uri) name of the destination connection profile. + */ + // const connectionProfile = 'abc123' + + // Imports the Clouddms library + const {DataMigrationServiceClient} = require('@google-cloud/dms').v1; + + // Instantiates a client + const clouddmsClient = new DataMigrationServiceClient(); + + async function callApplyConversionWorkspace() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await clouddmsClient.applyConversionWorkspace(request); + const [response] = await operation.promise(); + console.log(response); + } + + callApplyConversionWorkspace(); + // [END datamigration_v1_generated_DataMigrationService_ApplyConversionWorkspace_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.commit_conversion_workspace.js b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.commit_conversion_workspace.js new file mode 100644 index 00000000000..3713e685e6c --- /dev/null +++ b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.commit_conversion_workspace.js @@ -0,0 +1,66 @@ +// Copyright 2023 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 datamigration_v1_generated_DataMigrationService_CommitConversionWorkspace_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. Name of the conversion workspace resource to commit. + */ + // const name = 'abc123' + /** + * Optional. Optional name of the commit. + */ + // const commitName = 'abc123' + + // Imports the Clouddms library + const {DataMigrationServiceClient} = require('@google-cloud/dms').v1; + + // Instantiates a client + const clouddmsClient = new DataMigrationServiceClient(); + + async function callCommitConversionWorkspace() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await clouddmsClient.commitConversionWorkspace(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCommitConversionWorkspace(); + // [END datamigration_v1_generated_DataMigrationService_CommitConversionWorkspace_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.convert_conversion_workspace.js b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.convert_conversion_workspace.js new file mode 100644 index 00000000000..6cfa23a9b62 --- /dev/null +++ b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.convert_conversion_workspace.js @@ -0,0 +1,72 @@ +// Copyright 2023 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() { + // [START datamigration_v1_generated_DataMigrationService_ConvertConversionWorkspace_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. + */ + /** + * Name of the conversion workspace resource to convert in the form of: + * projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}. + */ + // const name = 'abc123' + /** + * Specifies whether the conversion workspace is to be committed automatically + * after the conversion. + */ + // const autoCommit = true + /** + * Filter the entities to convert. Leaving this field empty will convert all + * of the entities. Supports Google AIP-160 style filtering. + */ + // const filter = 'abc123' + + // Imports the Clouddms library + const {DataMigrationServiceClient} = require('@google-cloud/dms').v1; + + // Instantiates a client + const clouddmsClient = new DataMigrationServiceClient(); + + async function callConvertConversionWorkspace() { + // Construct request + const request = { + }; + + // Run request + const [operation] = await clouddmsClient.convertConversionWorkspace(request); + const [response] = await operation.promise(); + console.log(response); + } + + callConvertConversionWorkspace(); + // [END datamigration_v1_generated_DataMigrationService_ConvertConversionWorkspace_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.create_connection_profile.js b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.create_connection_profile.js index 475e2685aba..8580dab4f6a 100644 --- a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.create_connection_profile.js +++ b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.create_connection_profile.js @@ -29,7 +29,7 @@ function main(parent, connectionProfileId, connectionProfile) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The parent, which owns this collection of connection profiles. + * Required. The parent which owns this collection of connection profiles. */ // const parent = 'abc123' /** @@ -41,13 +41,25 @@ function main(parent, connectionProfileId, connectionProfile) { */ // const connectionProfile = {} /** - * A unique id used to identify the request. If the server receives two - * requests with the same id, then the second request will be ignored. + * Optional. A unique ID used to identify the request. If the server receives + * two requests with the same ID, then the second request is ignored. * It is recommended to always set this value to a UUID. - * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores + * The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores * (_), and hyphens (-). The maximum length is 40 characters. */ // const requestId = 'abc123' + /** + * Optional. Only validate the connection profile, but don't create any + * resources. The default is false. Only supported for Oracle connection + * profiles. + */ + // const validateOnly = true + /** + * Optional. Create the connection profile without validating it. + * The default is false. + * Only supported for Oracle connection profiles. + */ + // const skipValidation = true // Imports the Clouddms library const {DataMigrationServiceClient} = require('@google-cloud/dms').v1; diff --git a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.create_conversion_workspace.js b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.create_conversion_workspace.js new file mode 100644 index 00000000000..3d6acdcda7f --- /dev/null +++ b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.create_conversion_workspace.js @@ -0,0 +1,80 @@ +// Copyright 2023 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, conversionWorkspaceId, conversionWorkspace) { + // [START datamigration_v1_generated_DataMigrationService_CreateConversionWorkspace_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 which owns this collection of conversion workspaces. + */ + // const parent = 'abc123' + /** + * Required. The ID of the conversion workspace to create. + */ + // const conversionWorkspaceId = 'abc123' + /** + * Required. Represents a conversion workspace object. + */ + // const conversionWorkspace = {} + /** + * A unique ID used to identify the request. If the server receives two + * requests with the same ID, then the second request is ignored. + * It is recommended to always set this value to a UUID. + * The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores + * (_), and hyphens (-). The maximum length is 40 characters. + */ + // const requestId = 'abc123' + + // Imports the Clouddms library + const {DataMigrationServiceClient} = require('@google-cloud/dms').v1; + + // Instantiates a client + const clouddmsClient = new DataMigrationServiceClient(); + + async function callCreateConversionWorkspace() { + // Construct request + const request = { + parent, + conversionWorkspaceId, + conversionWorkspace, + }; + + // Run request + const [operation] = await clouddmsClient.createConversionWorkspace(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateConversionWorkspace(); + // [END datamigration_v1_generated_DataMigrationService_CreateConversionWorkspace_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.create_migration_job.js b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.create_migration_job.js index 43daeb5cb79..58f2117f811 100644 --- a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.create_migration_job.js +++ b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.create_migration_job.js @@ -29,7 +29,7 @@ function main(parent, migrationJobId, migrationJob) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The parent, which owns this collection of migration jobs. + * Required. The parent which owns this collection of migration jobs. */ // const parent = 'abc123' /** @@ -43,10 +43,10 @@ function main(parent, migrationJobId, migrationJob) { */ // const migrationJob = {} /** - * A unique id used to identify the request. If the server receives two - * requests with the same id, then the second request will be ignored. + * A unique ID used to identify the request. If the server receives two + * requests with the same ID, then the second request is ignored. * It is recommended to always set this value to a UUID. - * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores + * The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores * (_), and hyphens (-). The maximum length is 40 characters. */ // const requestId = 'abc123' diff --git a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.create_private_connection.js b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.create_private_connection.js new file mode 100644 index 00000000000..b4d4931f8b8 --- /dev/null +++ b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.create_private_connection.js @@ -0,0 +1,84 @@ +// Copyright 2023 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, privateConnectionId, privateConnection) { + // [START datamigration_v1_generated_DataMigrationService_CreatePrivateConnection_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 that owns the collection of PrivateConnections. + */ + // const parent = 'abc123' + /** + * Required. The private connection identifier. + */ + // const privateConnectionId = 'abc123' + /** + * Required. The private connection resource to create. + */ + // const privateConnection = {} + /** + * Optional. A unique ID used to identify the request. If the server receives + * two requests with the same ID, then the second request is ignored. + * It is recommended to always set this value to a UUID. + * The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores + * (_), and hyphens (-). The maximum length is 40 characters. + */ + // const requestId = 'abc123' + /** + * Optional. If set to true, will skip validations. + */ + // const skipValidation = true + + // Imports the Clouddms library + const {DataMigrationServiceClient} = require('@google-cloud/dms').v1; + + // Instantiates a client + const clouddmsClient = new DataMigrationServiceClient(); + + async function callCreatePrivateConnection() { + // Construct request + const request = { + parent, + privateConnectionId, + privateConnection, + }; + + // Run request + const [operation] = await clouddmsClient.createPrivateConnection(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreatePrivateConnection(); + // [END datamigration_v1_generated_DataMigrationService_CreatePrivateConnection_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.delete_connection_profile.js b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.delete_connection_profile.js index 063f474fd9a..1cfb2661d82 100644 --- a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.delete_connection_profile.js +++ b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.delete_connection_profile.js @@ -33,10 +33,10 @@ function main(name) { */ // const name = 'abc123' /** - * A unique id used to identify the request. If the server receives two - * requests with the same id, then the second request will be ignored. + * A unique ID used to identify the request. If the server receives two + * requests with the same ID, then the second request is ignored. * It is recommended to always set this value to a UUID. - * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores + * The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores * (_), and hyphens (-). The maximum length is 40 characters. */ // const requestId = 'abc123' diff --git a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.delete_conversion_workspace.js b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.delete_conversion_workspace.js new file mode 100644 index 00000000000..eb820265914 --- /dev/null +++ b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.delete_conversion_workspace.js @@ -0,0 +1,70 @@ +// Copyright 2023 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 datamigration_v1_generated_DataMigrationService_DeleteConversionWorkspace_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. Name of the conversion workspace resource to delete. + */ + // const name = 'abc123' + /** + * A unique ID used to identify the request. If the server receives two + * requests with the same ID, then the second request is ignored. + * It is recommended to always set this value to a UUID. + * The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores + * (_), and hyphens (-). The maximum length is 40 characters. + */ + // const requestId = 'abc123' + + // Imports the Clouddms library + const {DataMigrationServiceClient} = require('@google-cloud/dms').v1; + + // Instantiates a client + const clouddmsClient = new DataMigrationServiceClient(); + + async function callDeleteConversionWorkspace() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await clouddmsClient.deleteConversionWorkspace(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteConversionWorkspace(); + // [END datamigration_v1_generated_DataMigrationService_DeleteConversionWorkspace_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.delete_migration_job.js b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.delete_migration_job.js index 5cb329bef03..1269bfb4e20 100644 --- a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.delete_migration_job.js +++ b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.delete_migration_job.js @@ -33,10 +33,10 @@ function main(name) { */ // const name = 'abc123' /** - * A unique id used to identify the request. If the server receives two - * requests with the same id, then the second request will be ignored. + * A unique ID used to identify the request. If the server receives two + * requests with the same ID, then the second request is ignored. * It is recommended to always set this value to a UUID. - * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores + * The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores * (_), and hyphens (-). The maximum length is 40 characters. */ // const requestId = 'abc123' diff --git a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.delete_private_connection.js b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.delete_private_connection.js new file mode 100644 index 00000000000..ad09b321cd1 --- /dev/null +++ b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.delete_private_connection.js @@ -0,0 +1,70 @@ +// Copyright 2023 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 datamigration_v1_generated_DataMigrationService_DeletePrivateConnection_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 private connection to delete. + */ + // const name = 'abc123' + /** + * Optional. A unique ID used to identify the request. If the server receives + * two requests with the same ID, then the second request is ignored. + * It is recommended to always set this value to a UUID. + * The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores + * (_), and hyphens (-). The maximum length is 40 characters. + */ + // const requestId = 'abc123' + + // Imports the Clouddms library + const {DataMigrationServiceClient} = require('@google-cloud/dms').v1; + + // Instantiates a client + const clouddmsClient = new DataMigrationServiceClient(); + + async function callDeletePrivateConnection() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await clouddmsClient.deletePrivateConnection(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeletePrivateConnection(); + // [END datamigration_v1_generated_DataMigrationService_DeletePrivateConnection_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.describe_conversion_workspace_revisions.js b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.describe_conversion_workspace_revisions.js new file mode 100644 index 00000000000..cccca2fbcef --- /dev/null +++ b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.describe_conversion_workspace_revisions.js @@ -0,0 +1,67 @@ +// Copyright 2023 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(conversionWorkspace) { + // [START datamigration_v1_generated_DataMigrationService_DescribeConversionWorkspaceRevisions_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. Name of the conversion workspace resource whose revisions are + * listed. Must be in the form of: + * projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}. + */ + // const conversionWorkspace = 'abc123' + /** + * Optional. Optional filter to request a specific commit ID. + */ + // const commitId = 'abc123' + + // Imports the Clouddms library + const {DataMigrationServiceClient} = require('@google-cloud/dms').v1; + + // Instantiates a client + const clouddmsClient = new DataMigrationServiceClient(); + + async function callDescribeConversionWorkspaceRevisions() { + // Construct request + const request = { + conversionWorkspace, + }; + + // Run request + const response = await clouddmsClient.describeConversionWorkspaceRevisions(request); + console.log(response); + } + + callDescribeConversionWorkspaceRevisions(); + // [END datamigration_v1_generated_DataMigrationService_DescribeConversionWorkspaceRevisions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.describe_database_entities.js b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.describe_database_entities.js new file mode 100644 index 00000000000..16f8a7ca305 --- /dev/null +++ b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.describe_database_entities.js @@ -0,0 +1,97 @@ +// Copyright 2023 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(conversionWorkspace) { + // [START datamigration_v1_generated_DataMigrationService_DescribeDatabaseEntities_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. Name of the conversion workspace resource whose database entities + * are described. Must be in the form of: + * projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}. + */ + // const conversionWorkspace = 'abc123' + /** + * The maximum number of entities to return. The service may return + * fewer entities than the value specifies. + */ + // const pageSize = 1234 + /** + * The nextPageToken value received in the previous call to + * conversionWorkspace.describeDatabaseEntities, used in the subsequent + * request to retrieve the next page of results. On first call this should be + * left blank. When paginating, all other parameters provided to + * conversionWorkspace.describeDatabaseEntities must match the call that + * provided the page token. + */ + // const pageToken = 'abc123' + /** + * The tree to fetch. + */ + // const tree = {} + /** + * Whether to retrieve the latest committed version of the entities or the + * latest version. This field is ignored if a specific commit_id is specified. + */ + // const uncommitted = true + /** + * Request a specific commit ID. If not specified, the entities from the + * latest commit are returned. + */ + // const commitId = 'abc123' + /** + * Filter the returned entities based on AIP-160 standard. + */ + // const filter = 'abc123' + + // Imports the Clouddms library + const {DataMigrationServiceClient} = require('@google-cloud/dms').v1; + + // Instantiates a client + const clouddmsClient = new DataMigrationServiceClient(); + + async function callDescribeDatabaseEntities() { + // Construct request + const request = { + conversionWorkspace, + }; + + // Run request + const iterable = await clouddmsClient.describeDatabaseEntitiesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callDescribeDatabaseEntities(); + // [END datamigration_v1_generated_DataMigrationService_DescribeDatabaseEntities_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.fetch_static_ips.js b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.fetch_static_ips.js new file mode 100644 index 00000000000..8e43a0fb1e8 --- /dev/null +++ b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.fetch_static_ips.js @@ -0,0 +1,72 @@ +// Copyright 2023 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 datamigration_v1_generated_DataMigrationService_FetchStaticIps_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 for the location for which static IPs should be + * returned. Must be in the format `projects/* /locations/*`. + */ + // const name = 'abc123' + /** + * Maximum number of IPs to return. + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `FetchStaticIps` call. + */ + // const pageToken = 'abc123' + + // Imports the Clouddms library + const {DataMigrationServiceClient} = require('@google-cloud/dms').v1; + + // Instantiates a client + const clouddmsClient = new DataMigrationServiceClient(); + + async function callFetchStaticIps() { + // Construct request + const request = { + name, + }; + + // Run request + const iterable = await clouddmsClient.fetchStaticIpsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callFetchStaticIps(); + // [END datamigration_v1_generated_DataMigrationService_FetchStaticIps_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.generate_ssh_script.js b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.generate_ssh_script.js index b9aa11f44b2..41c49068a4d 100644 --- a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.generate_ssh_script.js +++ b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.generate_ssh_script.js @@ -45,7 +45,7 @@ function main(vm) { */ // const vmSelectionConfig = {} /** - * The port that will be open on the bastion host + * The port that will be open on the bastion host. */ // const vmPort = 1234 diff --git a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.get_conversion_workspace.js b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.get_conversion_workspace.js new file mode 100644 index 00000000000..9404cbd5bb9 --- /dev/null +++ b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.get_conversion_workspace.js @@ -0,0 +1,61 @@ +// Copyright 2023 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 datamigration_v1_generated_DataMigrationService_GetConversionWorkspace_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. Name of the conversion workspace resource to get. + */ + // const name = 'abc123' + + // Imports the Clouddms library + const {DataMigrationServiceClient} = require('@google-cloud/dms').v1; + + // Instantiates a client + const clouddmsClient = new DataMigrationServiceClient(); + + async function callGetConversionWorkspace() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await clouddmsClient.getConversionWorkspace(request); + console.log(response); + } + + callGetConversionWorkspace(); + // [END datamigration_v1_generated_DataMigrationService_GetConversionWorkspace_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.get_private_connection.js b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.get_private_connection.js new file mode 100644 index 00000000000..599f19db773 --- /dev/null +++ b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.get_private_connection.js @@ -0,0 +1,61 @@ +// Copyright 2023 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 datamigration_v1_generated_DataMigrationService_GetPrivateConnection_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 private connection to get. + */ + // const name = 'abc123' + + // Imports the Clouddms library + const {DataMigrationServiceClient} = require('@google-cloud/dms').v1; + + // Instantiates a client + const clouddmsClient = new DataMigrationServiceClient(); + + async function callGetPrivateConnection() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await clouddmsClient.getPrivateConnection(request); + console.log(response); + } + + callGetPrivateConnection(); + // [END datamigration_v1_generated_DataMigrationService_GetPrivateConnection_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.import_mapping_rules.js b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.import_mapping_rules.js new file mode 100644 index 00000000000..3f36ebaa657 --- /dev/null +++ b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.import_mapping_rules.js @@ -0,0 +1,77 @@ +// Copyright 2023 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 datamigration_v1_generated_DataMigrationService_ImportMappingRules_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. Name of the conversion workspace resource to import the rules to + * in the form of: + * projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}. + */ + // const parent = 'abc123' + /** + * The format of the rules content file. + */ + // const rulesFormat = {} + /** + * One or more rules files. + */ + // const rulesFiles = 1234 + /** + * Should the conversion workspace be committed automatically after the + * import operation. + */ + // const autoCommit = true + + // Imports the Clouddms library + const {DataMigrationServiceClient} = require('@google-cloud/dms').v1; + + // Instantiates a client + const clouddmsClient = new DataMigrationServiceClient(); + + async function callImportMappingRules() { + // Construct request + const request = { + parent, + }; + + // Run request + const [operation] = await clouddmsClient.importMappingRules(request); + const [response] = await operation.promise(); + console.log(response); + } + + callImportMappingRules(); + // [END datamigration_v1_generated_DataMigrationService_ImportMappingRules_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.list_connection_profiles.js b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.list_connection_profiles.js index f7e26c97fc9..6ef17632e23 100644 --- a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.list_connection_profiles.js +++ b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.list_connection_profiles.js @@ -29,13 +29,13 @@ function main(parent) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The parent, which owns this collection of connection profiles. + * Required. The parent which owns this collection of connection profiles. */ // const parent = 'abc123' /** * The maximum number of connection profiles to return. The service may return * fewer than this value. If unspecified, at most 50 connection profiles will - * be returned. The maximum value is 1000; values above 1000 will be coerced + * be returned. The maximum value is 1000; values above 1000 are coerced * to 1000. */ // const pageSize = 1234 @@ -59,7 +59,7 @@ function main(parent) { */ // const filter = 'abc123' /** - * the order by fields for the result. + * A comma-separated list of fields to order results according to. */ // const orderBy = 'abc123' diff --git a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.list_conversion_workspaces.js b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.list_conversion_workspaces.js new file mode 100644 index 00000000000..ebc40be958e --- /dev/null +++ b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.list_conversion_workspaces.js @@ -0,0 +1,88 @@ +// Copyright 2023 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 datamigration_v1_generated_DataMigrationService_ListConversionWorkspaces_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 which owns this collection of conversion workspaces. + */ + // const parent = 'abc123' + /** + * The maximum number of conversion workspaces to return. The service may + * return fewer than this value. If unspecified, at most 50 sets are returned. + */ + // const pageSize = 1234 + /** + * The nextPageToken value received in the previous call to + * conversionWorkspaces.list, used in the subsequent request to retrieve the + * next page of results. On first call this should be left blank. When + * paginating, all other parameters provided to conversionWorkspaces.list must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * A filter expression that filters conversion workspaces listed in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value must + * be a string, a number, or a boolean. The comparison operator must be either + * =, !=, >, or <. For example, list conversion workspaces created this year + * by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.** You can + * also filter nested fields. For example, you could specify + * **source.version = "12.c.1"** to select all conversion workspaces with + * source database version equal to 12.c.1. + */ + // const filter = 'abc123' + + // Imports the Clouddms library + const {DataMigrationServiceClient} = require('@google-cloud/dms').v1; + + // Instantiates a client + const clouddmsClient = new DataMigrationServiceClient(); + + async function callListConversionWorkspaces() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await clouddmsClient.listConversionWorkspacesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListConversionWorkspaces(); + // [END datamigration_v1_generated_DataMigrationService_ListConversionWorkspaces_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.list_migration_jobs.js b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.list_migration_jobs.js index ed6e4df3b56..35f88731cbf 100644 --- a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.list_migration_jobs.js +++ b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.list_migration_jobs.js @@ -29,13 +29,13 @@ function main(parent) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The parent, which owns this collection of migrationJobs. + * Required. The parent which owns this collection of migrationJobs. */ // const parent = 'abc123' /** * The maximum number of migration jobs to return. The service may return * fewer than this value. If unspecified, at most 50 migration jobs will be - * returned. The maximum value is 1000; values above 1000 will be coerced to + * returned. The maximum value is 1000; values above 1000 are coerced to * 1000. */ // const pageSize = 1234 diff --git a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.list_private_connections.js b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.list_private_connections.js new file mode 100644 index 00000000000..c26d7f629f3 --- /dev/null +++ b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.list_private_connections.js @@ -0,0 +1,90 @@ +// Copyright 2023 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 datamigration_v1_generated_DataMigrationService_ListPrivateConnections_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 that owns the collection of private connections. + */ + // const parent = 'abc123' + /** + * Maximum number of private connections to return. + * If unspecified, at most 50 private connections that are returned. + * The maximum value is 1000; values above 1000 are coerced to 1000. + */ + // const pageSize = 1234 + /** + * Page token received from a previous `ListPrivateConnections` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListPrivateConnections` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + /** + * A filter expression that filters private connections listed in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value must + * be a string, a number, or a boolean. The comparison operator must be either + * =, !=, >, or <. For example, list private connections created this year by + * specifying **createTime %gt; 2021-01-01T00:00:00.000000000Z**. + */ + // const filter = 'abc123' + /** + * Order by fields for the result. + */ + // const orderBy = 'abc123' + + // Imports the Clouddms library + const {DataMigrationServiceClient} = require('@google-cloud/dms').v1; + + // Instantiates a client + const clouddmsClient = new DataMigrationServiceClient(); + + async function callListPrivateConnections() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await clouddmsClient.listPrivateConnectionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListPrivateConnections(); + // [END datamigration_v1_generated_DataMigrationService_ListPrivateConnections_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.rollback_conversion_workspace.js b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.rollback_conversion_workspace.js new file mode 100644 index 00000000000..82543b62268 --- /dev/null +++ b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.rollback_conversion_workspace.js @@ -0,0 +1,62 @@ +// Copyright 2023 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 datamigration_v1_generated_DataMigrationService_RollbackConversionWorkspace_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. Name of the conversion workspace resource to roll back to. + */ + // const name = 'abc123' + + // Imports the Clouddms library + const {DataMigrationServiceClient} = require('@google-cloud/dms').v1; + + // Instantiates a client + const clouddmsClient = new DataMigrationServiceClient(); + + async function callRollbackConversionWorkspace() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await clouddmsClient.rollbackConversionWorkspace(request); + const [response] = await operation.promise(); + console.log(response); + } + + callRollbackConversionWorkspace(); + // [END datamigration_v1_generated_DataMigrationService_RollbackConversionWorkspace_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.search_background_jobs.js b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.search_background_jobs.js new file mode 100644 index 00000000000..13315d18fb3 --- /dev/null +++ b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.search_background_jobs.js @@ -0,0 +1,79 @@ +// Copyright 2023 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(conversionWorkspace) { + // [START datamigration_v1_generated_DataMigrationService_SearchBackgroundJobs_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. Name of the conversion workspace resource whose jobs are listed, + * in the form of: + * projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}. + */ + // const conversionWorkspace = 'abc123' + /** + * Optional. Whether or not to return just the most recent job per job type, + */ + // const returnMostRecentPerJobType = true + /** + * Optional. The maximum number of jobs to return. The service may return + * fewer than this value. If unspecified, at most 100 jobs are + * returned. The maximum value is 100; values above 100 are coerced to + * 100. + */ + // const maxSize = 1234 + /** + * Optional. If provided, only returns jobs that completed until (not + * including) the given timestamp. + */ + // const completedUntilTime = {} + + // Imports the Clouddms library + const {DataMigrationServiceClient} = require('@google-cloud/dms').v1; + + // Instantiates a client + const clouddmsClient = new DataMigrationServiceClient(); + + async function callSearchBackgroundJobs() { + // Construct request + const request = { + conversionWorkspace, + }; + + // Run request + const response = await clouddmsClient.searchBackgroundJobs(request); + console.log(response); + } + + callSearchBackgroundJobs(); + // [END datamigration_v1_generated_DataMigrationService_SearchBackgroundJobs_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.seed_conversion_workspace.js b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.seed_conversion_workspace.js new file mode 100644 index 00000000000..00a5882ef2f --- /dev/null +++ b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.seed_conversion_workspace.js @@ -0,0 +1,76 @@ +// Copyright 2023 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() { + // [START datamigration_v1_generated_DataMigrationService_SeedConversionWorkspace_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. + */ + /** + * Name of the conversion workspace resource to seed with new database + * structure, in the form of: + * projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}. + */ + // const name = 'abc123' + /** + * Should the conversion workspace be committed automatically after the + * seed operation. + */ + // const autoCommit = true + /** + * Fully qualified (Uri) name of the source connection profile. + */ + // const sourceConnectionProfile = 'abc123' + /** + * Fully qualified (Uri) name of the destination connection profile. + */ + // const destinationConnectionProfile = 'abc123' + + // Imports the Clouddms library + const {DataMigrationServiceClient} = require('@google-cloud/dms').v1; + + // Instantiates a client + const clouddmsClient = new DataMigrationServiceClient(); + + async function callSeedConversionWorkspace() { + // Construct request + const request = { + }; + + // Run request + const [operation] = await clouddmsClient.seedConversionWorkspace(request); + const [response] = await operation.promise(); + console.log(response); + } + + callSeedConversionWorkspace(); + // [END datamigration_v1_generated_DataMigrationService_SeedConversionWorkspace_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.update_connection_profile.js b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.update_connection_profile.js index 0085459adb9..5cd2c736cdc 100644 --- a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.update_connection_profile.js +++ b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.update_connection_profile.js @@ -29,8 +29,8 @@ function main(updateMask, connectionProfile) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. Field mask is used to specify the fields to be overwritten in the - * connection profile resource by the update. + * Required. Field mask is used to specify the fields to be overwritten by the + * update in the conversion workspace resource. */ // const updateMask = {} /** @@ -38,13 +38,25 @@ function main(updateMask, connectionProfile) { */ // const connectionProfile = {} /** - * A unique id used to identify the request. If the server receives two - * requests with the same id, then the second request will be ignored. + * Optional. A unique ID used to identify the request. If the server receives + * two requests with the same ID, then the second request is ignored. * It is recommended to always set this value to a UUID. - * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores + * The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores * (_), and hyphens (-). The maximum length is 40 characters. */ // const requestId = 'abc123' + /** + * Optional. Only validate the connection profile, but don't update any + * resources. The default is false. Only supported for Oracle connection + * profiles. + */ + // const validateOnly = true + /** + * Optional. Update the connection profile without validating it. + * The default is false. + * Only supported for Oracle connection profiles. + */ + // const skipValidation = true // Imports the Clouddms library const {DataMigrationServiceClient} = require('@google-cloud/dms').v1; diff --git a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.update_conversion_workspace.js b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.update_conversion_workspace.js new file mode 100644 index 00000000000..8f17bbddc1a --- /dev/null +++ b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.update_conversion_workspace.js @@ -0,0 +1,76 @@ +// Copyright 2023 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(updateMask, conversionWorkspace) { + // [START datamigration_v1_generated_DataMigrationService_UpdateConversionWorkspace_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. Field mask is used to specify the fields to be overwritten by the + * update in the conversion workspace resource. + */ + // const updateMask = {} + /** + * Required. The conversion workspace parameters to update. + */ + // const conversionWorkspace = {} + /** + * A unique ID used to identify the request. If the server receives two + * requests with the same ID, then the second request is ignored. + * It is recommended to always set this value to a UUID. + * The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores + * (_), and hyphens (-). The maximum length is 40 characters. + */ + // const requestId = 'abc123' + + // Imports the Clouddms library + const {DataMigrationServiceClient} = require('@google-cloud/dms').v1; + + // Instantiates a client + const clouddmsClient = new DataMigrationServiceClient(); + + async function callUpdateConversionWorkspace() { + // Construct request + const request = { + updateMask, + conversionWorkspace, + }; + + // Run request + const [operation] = await clouddmsClient.updateConversionWorkspace(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateConversionWorkspace(); + // [END datamigration_v1_generated_DataMigrationService_UpdateConversionWorkspace_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.update_migration_job.js b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.update_migration_job.js index f898c3c6c6a..894a974f424 100644 --- a/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.update_migration_job.js +++ b/packages/google-cloud-clouddms/samples/generated/v1/data_migration_service.update_migration_job.js @@ -29,8 +29,8 @@ function main(updateMask, migrationJob) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. Field mask is used to specify the fields to be overwritten in the - * migration job resource by the update. + * Required. Field mask is used to specify the fields to be overwritten by the + * update in the conversion workspace resource. */ // const updateMask = {} /** @@ -38,10 +38,10 @@ function main(updateMask, migrationJob) { */ // const migrationJob = {} /** - * A unique id used to identify the request. If the server receives two - * requests with the same id, then the second request will be ignored. + * A unique ID used to identify the request. If the server receives two + * requests with the same ID, then the second request is ignored. * It is recommended to always set this value to a UUID. - * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores + * The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores * (_), and hyphens (-). The maximum length is 40 characters. */ // const requestId = 'abc123' diff --git a/packages/google-cloud-clouddms/samples/generated/v1/snippet_metadata.google.cloud.clouddms.v1.json b/packages/google-cloud-clouddms/samples/generated/v1/snippet_metadata.google.cloud.clouddms.v1.json index fb947b49d95..45bd0519799 100644 --- a/packages/google-cloud-clouddms/samples/generated/v1/snippet_metadata.google.cloud.clouddms.v1.json +++ b/packages/google-cloud-clouddms/samples/generated/v1/snippet_metadata.google.cloud.clouddms.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-clouddms", - "version": "2.2.1", + "version": "2.3.0", "language": "TYPESCRIPT", "apis": [ { @@ -555,7 +555,7 @@ "regionTag": "datamigration_v1_generated_DataMigrationService_ListConnectionProfiles_async", "title": "DataMigrationService listConnectionProfiles Sample", "origin": "API_DEFINITION", - "description": " Retrieve a list of all connection profiles in a given project and location.", + "description": " Retrieves a list of all connection profiles in a given project and location.", "canonical": true, "file": "data_migration_service.list_connection_profiles.js", "language": "JAVASCRIPT", @@ -658,7 +658,7 @@ "segments": [ { "start": 25, - "end": 72, + "end": 84, "type": "FULL" } ], @@ -682,6 +682,14 @@ { "name": "request_id", "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "skip_validation", + "type": "TYPE_BOOL" } ], "resultType": ".google.longrunning.Operation", @@ -710,7 +718,7 @@ "segments": [ { "start": 25, - "end": 68, + "end": 80, "type": "FULL" } ], @@ -730,6 +738,14 @@ { "name": "request_id", "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "skip_validation", + "type": "TYPE_BOOL" } ], "resultType": ".google.longrunning.Operation", @@ -794,6 +810,930 @@ } } } + }, + { + "regionTag": "datamigration_v1_generated_DataMigrationService_CreatePrivateConnection_async", + "title": "DataMigrationService createPrivateConnection Sample", + "origin": "API_DEFINITION", + "description": " Creates a new private connection in a given project and location.", + "canonical": true, + "file": "data_migration_service.create_private_connection.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreatePrivateConnection", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.CreatePrivateConnection", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "private_connection_id", + "type": "TYPE_STRING" + }, + { + "name": "private_connection", + "type": ".google.cloud.clouddms.v1.PrivateConnection" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "skip_validation", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataMigrationServiceClient", + "fullName": "google.cloud.clouddms.v1.DataMigrationServiceClient" + }, + "method": { + "shortName": "CreatePrivateConnection", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.CreatePrivateConnection", + "service": { + "shortName": "DataMigrationService", + "fullName": "google.cloud.clouddms.v1.DataMigrationService" + } + } + } + }, + { + "regionTag": "datamigration_v1_generated_DataMigrationService_GetPrivateConnection_async", + "title": "DataMigrationService getPrivateConnection Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single private connection.", + "canonical": true, + "file": "data_migration_service.get_private_connection.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetPrivateConnection", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.GetPrivateConnection", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.clouddms.v1.PrivateConnection", + "client": { + "shortName": "DataMigrationServiceClient", + "fullName": "google.cloud.clouddms.v1.DataMigrationServiceClient" + }, + "method": { + "shortName": "GetPrivateConnection", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.GetPrivateConnection", + "service": { + "shortName": "DataMigrationService", + "fullName": "google.cloud.clouddms.v1.DataMigrationService" + } + } + } + }, + { + "regionTag": "datamigration_v1_generated_DataMigrationService_ListPrivateConnections_async", + "title": "DataMigrationService listPrivateConnections Sample", + "origin": "API_DEFINITION", + "description": " Retrieves a list of private connections in a given project and location.", + "canonical": true, + "file": "data_migration_service.list_private_connections.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListPrivateConnections", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.ListPrivateConnections", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.clouddms.v1.ListPrivateConnectionsResponse", + "client": { + "shortName": "DataMigrationServiceClient", + "fullName": "google.cloud.clouddms.v1.DataMigrationServiceClient" + }, + "method": { + "shortName": "ListPrivateConnections", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.ListPrivateConnections", + "service": { + "shortName": "DataMigrationService", + "fullName": "google.cloud.clouddms.v1.DataMigrationService" + } + } + } + }, + { + "regionTag": "datamigration_v1_generated_DataMigrationService_DeletePrivateConnection_async", + "title": "DataMigrationService deletePrivateConnection Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single Database Migration Service private connection.", + "canonical": true, + "file": "data_migration_service.delete_private_connection.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeletePrivateConnection", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.DeletePrivateConnection", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataMigrationServiceClient", + "fullName": "google.cloud.clouddms.v1.DataMigrationServiceClient" + }, + "method": { + "shortName": "DeletePrivateConnection", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.DeletePrivateConnection", + "service": { + "shortName": "DataMigrationService", + "fullName": "google.cloud.clouddms.v1.DataMigrationService" + } + } + } + }, + { + "regionTag": "datamigration_v1_generated_DataMigrationService_GetConversionWorkspace_async", + "title": "DataMigrationService getConversionWorkspace Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single conversion workspace.", + "canonical": true, + "file": "data_migration_service.get_conversion_workspace.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetConversionWorkspace", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.GetConversionWorkspace", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.clouddms.v1.ConversionWorkspace", + "client": { + "shortName": "DataMigrationServiceClient", + "fullName": "google.cloud.clouddms.v1.DataMigrationServiceClient" + }, + "method": { + "shortName": "GetConversionWorkspace", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.GetConversionWorkspace", + "service": { + "shortName": "DataMigrationService", + "fullName": "google.cloud.clouddms.v1.DataMigrationService" + } + } + } + }, + { + "regionTag": "datamigration_v1_generated_DataMigrationService_ListConversionWorkspaces_async", + "title": "DataMigrationService listConversionWorkspaces Sample", + "origin": "API_DEFINITION", + "description": " Lists conversion workspaces in a given project and location.", + "canonical": true, + "file": "data_migration_service.list_conversion_workspaces.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 80, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListConversionWorkspaces", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.ListConversionWorkspaces", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.clouddms.v1.ListConversionWorkspacesResponse", + "client": { + "shortName": "DataMigrationServiceClient", + "fullName": "google.cloud.clouddms.v1.DataMigrationServiceClient" + }, + "method": { + "shortName": "ListConversionWorkspaces", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.ListConversionWorkspaces", + "service": { + "shortName": "DataMigrationService", + "fullName": "google.cloud.clouddms.v1.DataMigrationService" + } + } + } + }, + { + "regionTag": "datamigration_v1_generated_DataMigrationService_CreateConversionWorkspace_async", + "title": "DataMigrationService createConversionWorkspace Sample", + "origin": "API_DEFINITION", + "description": " Creates a new conversion workspace in a given project and location.", + "canonical": true, + "file": "data_migration_service.create_conversion_workspace.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateConversionWorkspace", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.CreateConversionWorkspace", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "conversion_workspace_id", + "type": "TYPE_STRING" + }, + { + "name": "conversion_workspace", + "type": ".google.cloud.clouddms.v1.ConversionWorkspace" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataMigrationServiceClient", + "fullName": "google.cloud.clouddms.v1.DataMigrationServiceClient" + }, + "method": { + "shortName": "CreateConversionWorkspace", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.CreateConversionWorkspace", + "service": { + "shortName": "DataMigrationService", + "fullName": "google.cloud.clouddms.v1.DataMigrationService" + } + } + } + }, + { + "regionTag": "datamigration_v1_generated_DataMigrationService_UpdateConversionWorkspace_async", + "title": "DataMigrationService updateConversionWorkspace Sample", + "origin": "API_DEFINITION", + "description": " Updates the parameters of a single conversion workspace.", + "canonical": true, + "file": "data_migration_service.update_conversion_workspace.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateConversionWorkspace", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.UpdateConversionWorkspace", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "conversion_workspace", + "type": ".google.cloud.clouddms.v1.ConversionWorkspace" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataMigrationServiceClient", + "fullName": "google.cloud.clouddms.v1.DataMigrationServiceClient" + }, + "method": { + "shortName": "UpdateConversionWorkspace", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.UpdateConversionWorkspace", + "service": { + "shortName": "DataMigrationService", + "fullName": "google.cloud.clouddms.v1.DataMigrationService" + } + } + } + }, + { + "regionTag": "datamigration_v1_generated_DataMigrationService_DeleteConversionWorkspace_async", + "title": "DataMigrationService deleteConversionWorkspace Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single conversion workspace.", + "canonical": true, + "file": "data_migration_service.delete_conversion_workspace.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteConversionWorkspace", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.DeleteConversionWorkspace", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataMigrationServiceClient", + "fullName": "google.cloud.clouddms.v1.DataMigrationServiceClient" + }, + "method": { + "shortName": "DeleteConversionWorkspace", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.DeleteConversionWorkspace", + "service": { + "shortName": "DataMigrationService", + "fullName": "google.cloud.clouddms.v1.DataMigrationService" + } + } + } + }, + { + "regionTag": "datamigration_v1_generated_DataMigrationService_SeedConversionWorkspace_async", + "title": "DataMigrationService seedConversionWorkspace Sample", + "origin": "API_DEFINITION", + "description": " Imports a snapshot of the source database into the conversion workspace.", + "canonical": true, + "file": "data_migration_service.seed_conversion_workspace.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SeedConversionWorkspace", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.SeedConversionWorkspace", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "auto_commit", + "type": "TYPE_BOOL" + }, + { + "name": "source_connection_profile", + "type": "TYPE_STRING" + }, + { + "name": "destination_connection_profile", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataMigrationServiceClient", + "fullName": "google.cloud.clouddms.v1.DataMigrationServiceClient" + }, + "method": { + "shortName": "SeedConversionWorkspace", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.SeedConversionWorkspace", + "service": { + "shortName": "DataMigrationService", + "fullName": "google.cloud.clouddms.v1.DataMigrationService" + } + } + } + }, + { + "regionTag": "datamigration_v1_generated_DataMigrationService_ImportMappingRules_async", + "title": "DataMigrationService importMappingRules Sample", + "origin": "API_DEFINITION", + "description": " Imports the mapping rules for a given conversion workspace. Supports various formats of external rules files.", + "canonical": true, + "file": "data_migration_service.import_mapping_rules.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ImportMappingRules", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.ImportMappingRules", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "rules_format", + "type": ".google.cloud.clouddms.v1.ImportRulesFileFormat" + }, + { + "name": "rules_files", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "auto_commit", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataMigrationServiceClient", + "fullName": "google.cloud.clouddms.v1.DataMigrationServiceClient" + }, + "method": { + "shortName": "ImportMappingRules", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.ImportMappingRules", + "service": { + "shortName": "DataMigrationService", + "fullName": "google.cloud.clouddms.v1.DataMigrationService" + } + } + } + }, + { + "regionTag": "datamigration_v1_generated_DataMigrationService_ConvertConversionWorkspace_async", + "title": "DataMigrationService convertConversionWorkspace Sample", + "origin": "API_DEFINITION", + "description": " Creates a draft tree schema for the destination database.", + "canonical": true, + "file": "data_migration_service.convert_conversion_workspace.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ConvertConversionWorkspace", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.ConvertConversionWorkspace", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "auto_commit", + "type": "TYPE_BOOL" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataMigrationServiceClient", + "fullName": "google.cloud.clouddms.v1.DataMigrationServiceClient" + }, + "method": { + "shortName": "ConvertConversionWorkspace", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.ConvertConversionWorkspace", + "service": { + "shortName": "DataMigrationService", + "fullName": "google.cloud.clouddms.v1.DataMigrationService" + } + } + } + }, + { + "regionTag": "datamigration_v1_generated_DataMigrationService_CommitConversionWorkspace_async", + "title": "DataMigrationService commitConversionWorkspace Sample", + "origin": "API_DEFINITION", + "description": " Marks all the data in the conversion workspace as committed.", + "canonical": true, + "file": "data_migration_service.commit_conversion_workspace.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CommitConversionWorkspace", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.CommitConversionWorkspace", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "commit_name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataMigrationServiceClient", + "fullName": "google.cloud.clouddms.v1.DataMigrationServiceClient" + }, + "method": { + "shortName": "CommitConversionWorkspace", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.CommitConversionWorkspace", + "service": { + "shortName": "DataMigrationService", + "fullName": "google.cloud.clouddms.v1.DataMigrationService" + } + } + } + }, + { + "regionTag": "datamigration_v1_generated_DataMigrationService_RollbackConversionWorkspace_async", + "title": "DataMigrationService rollbackConversionWorkspace Sample", + "origin": "API_DEFINITION", + "description": " Rolls back a conversion workspace to the last committed snapshot.", + "canonical": true, + "file": "data_migration_service.rollback_conversion_workspace.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RollbackConversionWorkspace", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.RollbackConversionWorkspace", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataMigrationServiceClient", + "fullName": "google.cloud.clouddms.v1.DataMigrationServiceClient" + }, + "method": { + "shortName": "RollbackConversionWorkspace", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.RollbackConversionWorkspace", + "service": { + "shortName": "DataMigrationService", + "fullName": "google.cloud.clouddms.v1.DataMigrationService" + } + } + } + }, + { + "regionTag": "datamigration_v1_generated_DataMigrationService_ApplyConversionWorkspace_async", + "title": "DataMigrationService applyConversionWorkspace Sample", + "origin": "API_DEFINITION", + "description": " Applies draft tree onto a specific destination database.", + "canonical": true, + "file": "data_migration_service.apply_conversion_workspace.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ApplyConversionWorkspace", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.ApplyConversionWorkspace", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "connection_profile", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DataMigrationServiceClient", + "fullName": "google.cloud.clouddms.v1.DataMigrationServiceClient" + }, + "method": { + "shortName": "ApplyConversionWorkspace", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.ApplyConversionWorkspace", + "service": { + "shortName": "DataMigrationService", + "fullName": "google.cloud.clouddms.v1.DataMigrationService" + } + } + } + }, + { + "regionTag": "datamigration_v1_generated_DataMigrationService_DescribeDatabaseEntities_async", + "title": "DataMigrationService describeDatabaseEntities Sample", + "origin": "API_DEFINITION", + "description": " Describes the database entities tree for a specific conversion workspace and a specific tree type. Database entities are not resources like conversion workspaces or mapping rules, and they can't be created, updated or deleted. Instead, they are simple data objects describing the structure of the client database.", + "canonical": true, + "file": "data_migration_service.describe_database_entities.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 89, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DescribeDatabaseEntities", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.DescribeDatabaseEntities", + "async": true, + "parameters": [ + { + "name": "conversion_workspace", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "tree", + "type": ".google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest.DBTreeType" + }, + { + "name": "uncommitted", + "type": "TYPE_BOOL" + }, + { + "name": "commit_id", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.clouddms.v1.DescribeDatabaseEntitiesResponse", + "client": { + "shortName": "DataMigrationServiceClient", + "fullName": "google.cloud.clouddms.v1.DataMigrationServiceClient" + }, + "method": { + "shortName": "DescribeDatabaseEntities", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.DescribeDatabaseEntities", + "service": { + "shortName": "DataMigrationService", + "fullName": "google.cloud.clouddms.v1.DataMigrationService" + } + } + } + }, + { + "regionTag": "datamigration_v1_generated_DataMigrationService_SearchBackgroundJobs_async", + "title": "DataMigrationService searchBackgroundJobs Sample", + "origin": "API_DEFINITION", + "description": " Searches/lists the background jobs for a specific conversion workspace. The background jobs are not resources like conversion workspaces or mapping rules, and they can't be created, updated or deleted. Instead, they are a way to expose the data plane jobs log.", + "canonical": true, + "file": "data_migration_service.search_background_jobs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SearchBackgroundJobs", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.SearchBackgroundJobs", + "async": true, + "parameters": [ + { + "name": "conversion_workspace", + "type": "TYPE_STRING" + }, + { + "name": "return_most_recent_per_job_type", + "type": "TYPE_BOOL" + }, + { + "name": "max_size", + "type": "TYPE_INT32" + }, + { + "name": "completed_until_time", + "type": ".google.protobuf.Timestamp" + } + ], + "resultType": ".google.cloud.clouddms.v1.SearchBackgroundJobsResponse", + "client": { + "shortName": "DataMigrationServiceClient", + "fullName": "google.cloud.clouddms.v1.DataMigrationServiceClient" + }, + "method": { + "shortName": "SearchBackgroundJobs", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.SearchBackgroundJobs", + "service": { + "shortName": "DataMigrationService", + "fullName": "google.cloud.clouddms.v1.DataMigrationService" + } + } + } + }, + { + "regionTag": "datamigration_v1_generated_DataMigrationService_DescribeConversionWorkspaceRevisions_async", + "title": "DataMigrationService describeConversionWorkspaceRevisions Sample", + "origin": "API_DEFINITION", + "description": " Retrieves a list of committed revisions of a specific conversion workspace.", + "canonical": true, + "file": "data_migration_service.describe_conversion_workspace_revisions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DescribeConversionWorkspaceRevisions", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.DescribeConversionWorkspaceRevisions", + "async": true, + "parameters": [ + { + "name": "conversion_workspace", + "type": "TYPE_STRING" + }, + { + "name": "commit_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse", + "client": { + "shortName": "DataMigrationServiceClient", + "fullName": "google.cloud.clouddms.v1.DataMigrationServiceClient" + }, + "method": { + "shortName": "DescribeConversionWorkspaceRevisions", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.DescribeConversionWorkspaceRevisions", + "service": { + "shortName": "DataMigrationService", + "fullName": "google.cloud.clouddms.v1.DataMigrationService" + } + } + } + }, + { + "regionTag": "datamigration_v1_generated_DataMigrationService_FetchStaticIps_async", + "title": "DataMigrationService fetchStaticIps Sample", + "origin": "API_DEFINITION", + "description": " Fetches a set of static IP addresses that need to be allowlisted by the customer when using the static-IP connectivity method.", + "canonical": true, + "file": "data_migration_service.fetch_static_ips.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchStaticIps", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.FetchStaticIps", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.clouddms.v1.FetchStaticIpsResponse", + "client": { + "shortName": "DataMigrationServiceClient", + "fullName": "google.cloud.clouddms.v1.DataMigrationServiceClient" + }, + "method": { + "shortName": "FetchStaticIps", + "fullName": "google.cloud.clouddms.v1.DataMigrationService.FetchStaticIps", + "service": { + "shortName": "DataMigrationService", + "fullName": "google.cloud.clouddms.v1.DataMigrationService" + } + } + } } ] } \ No newline at end of file diff --git a/packages/google-cloud-clouddms/samples/package.json b/packages/google-cloud-clouddms/samples/package.json index 16437fba389..dd1ee1d1b63 100644 --- a/packages/google-cloud-clouddms/samples/package.json +++ b/packages/google-cloud-clouddms/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/dms": "^2.2.2" + "@google-cloud/dms": "^2.3.0" }, "devDependencies": { "c8": "^7.1.0", diff --git a/packages/google-cloud-clouddms/src/v1/data_migration_service_client.ts b/packages/google-cloud-clouddms/src/v1/data_migration_service_client.ts index 605e3579efc..828c19396e0 100644 --- a/packages/google-cloud-clouddms/src/v1/data_migration_service_client.ts +++ b/packages/google-cloud-clouddms/src/v1/data_migration_service_client.ts @@ -27,6 +27,10 @@ import type { LROperation, PaginationCallback, GaxCall, + IamClient, + IamProtos, + LocationsClient, + LocationProtos, } from 'google-gax'; import {Transform} from 'stream'; import * as protos from '../../protos/protos'; @@ -61,6 +65,8 @@ export class DataMigrationServiceClient { }; warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; + iamClient: IamClient; + locationsClient: LocationsClient; pathTemplates: {[name: string]: gax.PathTemplate}; operationsClient: gax.OperationsClient; dataMigrationServiceStub?: Promise<{[name: string]: Function}>; @@ -158,6 +164,12 @@ export class DataMigrationServiceClient { if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; } + this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); + + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); // Determine the client header string. const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; @@ -184,12 +196,18 @@ export class DataMigrationServiceClient { connectionProfilePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/connectionProfiles/{connection_profile}' ), + conversionWorkspacePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}' + ), locationPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}' ), migrationJobPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/migrationJobs/{migration_job}' ), + privateConnectionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/privateConnections/{private_connection}' + ), projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), @@ -209,6 +227,26 @@ export class DataMigrationServiceClient { 'nextPageToken', 'connectionProfiles' ), + listPrivateConnections: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'privateConnections' + ), + listConversionWorkspaces: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'conversionWorkspaces' + ), + describeDatabaseEntities: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'databaseEntities' + ), + fetchStaticIps: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'staticIps' + ), }; const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); @@ -237,6 +275,12 @@ export class DataMigrationServiceClient { { get: '/v1/{resource=projects/*/locations/*/migrationJobs/*}:getIamPolicy', }, + { + get: '/v1/{resource=projects/*/locations/*/conversionWorkspaces/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/privateConnections/*}:getIamPolicy', + }, ], }, { @@ -248,6 +292,14 @@ export class DataMigrationServiceClient { post: '/v1/{resource=projects/*/locations/*/migrationJobs/*}:setIamPolicy', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/conversionWorkspaces/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/privateConnections/*}:setIamPolicy', + body: '*', + }, ], }, { @@ -259,6 +311,14 @@ export class DataMigrationServiceClient { post: '/v1/{resource=projects/*/locations/*/connectionProfiles/*}:testIamPermissions', body: '*', }, + { + post: '/v1/{resource=projects/*/locations/*/conversionWorkspaces/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/privateConnections/*}:testIamPermissions', + body: '*', + }, ], }, { @@ -355,6 +415,72 @@ export class DataMigrationServiceClient { const deleteConnectionProfileMetadata = protoFilesRoot.lookup( '.google.cloud.clouddms.v1.OperationMetadata' ) as gax.protobuf.Type; + const createPrivateConnectionResponse = protoFilesRoot.lookup( + '.google.cloud.clouddms.v1.PrivateConnection' + ) as gax.protobuf.Type; + const createPrivateConnectionMetadata = protoFilesRoot.lookup( + '.google.cloud.clouddms.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deletePrivateConnectionResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deletePrivateConnectionMetadata = protoFilesRoot.lookup( + '.google.cloud.clouddms.v1.OperationMetadata' + ) as gax.protobuf.Type; + const createConversionWorkspaceResponse = protoFilesRoot.lookup( + '.google.cloud.clouddms.v1.ConversionWorkspace' + ) as gax.protobuf.Type; + const createConversionWorkspaceMetadata = protoFilesRoot.lookup( + '.google.cloud.clouddms.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateConversionWorkspaceResponse = protoFilesRoot.lookup( + '.google.cloud.clouddms.v1.ConversionWorkspace' + ) as gax.protobuf.Type; + const updateConversionWorkspaceMetadata = protoFilesRoot.lookup( + '.google.cloud.clouddms.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteConversionWorkspaceResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteConversionWorkspaceMetadata = protoFilesRoot.lookup( + '.google.cloud.clouddms.v1.OperationMetadata' + ) as gax.protobuf.Type; + const seedConversionWorkspaceResponse = protoFilesRoot.lookup( + '.google.cloud.clouddms.v1.ConversionWorkspace' + ) as gax.protobuf.Type; + const seedConversionWorkspaceMetadata = protoFilesRoot.lookup( + '.google.cloud.clouddms.v1.OperationMetadata' + ) as gax.protobuf.Type; + const importMappingRulesResponse = protoFilesRoot.lookup( + '.google.cloud.clouddms.v1.ConversionWorkspace' + ) as gax.protobuf.Type; + const importMappingRulesMetadata = protoFilesRoot.lookup( + '.google.cloud.clouddms.v1.OperationMetadata' + ) as gax.protobuf.Type; + const convertConversionWorkspaceResponse = protoFilesRoot.lookup( + '.google.cloud.clouddms.v1.ConversionWorkspace' + ) as gax.protobuf.Type; + const convertConversionWorkspaceMetadata = protoFilesRoot.lookup( + '.google.cloud.clouddms.v1.OperationMetadata' + ) as gax.protobuf.Type; + const commitConversionWorkspaceResponse = protoFilesRoot.lookup( + '.google.cloud.clouddms.v1.ConversionWorkspace' + ) as gax.protobuf.Type; + const commitConversionWorkspaceMetadata = protoFilesRoot.lookup( + '.google.cloud.clouddms.v1.OperationMetadata' + ) as gax.protobuf.Type; + const rollbackConversionWorkspaceResponse = protoFilesRoot.lookup( + '.google.cloud.clouddms.v1.ConversionWorkspace' + ) as gax.protobuf.Type; + const rollbackConversionWorkspaceMetadata = protoFilesRoot.lookup( + '.google.cloud.clouddms.v1.OperationMetadata' + ) as gax.protobuf.Type; + const applyConversionWorkspaceResponse = protoFilesRoot.lookup( + '.google.cloud.clouddms.v1.ConversionWorkspace' + ) as gax.protobuf.Type; + const applyConversionWorkspaceMetadata = protoFilesRoot.lookup( + '.google.cloud.clouddms.v1.OperationMetadata' + ) as gax.protobuf.Type; this.descriptors.longrunning = { createMigrationJob: new this._gaxModule.LongrunningDescriptor( @@ -429,6 +555,101 @@ export class DataMigrationServiceClient { deleteConnectionProfileMetadata ) ), + createPrivateConnection: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createPrivateConnectionResponse.decode.bind( + createPrivateConnectionResponse + ), + createPrivateConnectionMetadata.decode.bind( + createPrivateConnectionMetadata + ) + ), + deletePrivateConnection: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deletePrivateConnectionResponse.decode.bind( + deletePrivateConnectionResponse + ), + deletePrivateConnectionMetadata.decode.bind( + deletePrivateConnectionMetadata + ) + ), + createConversionWorkspace: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createConversionWorkspaceResponse.decode.bind( + createConversionWorkspaceResponse + ), + createConversionWorkspaceMetadata.decode.bind( + createConversionWorkspaceMetadata + ) + ), + updateConversionWorkspace: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateConversionWorkspaceResponse.decode.bind( + updateConversionWorkspaceResponse + ), + updateConversionWorkspaceMetadata.decode.bind( + updateConversionWorkspaceMetadata + ) + ), + deleteConversionWorkspace: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteConversionWorkspaceResponse.decode.bind( + deleteConversionWorkspaceResponse + ), + deleteConversionWorkspaceMetadata.decode.bind( + deleteConversionWorkspaceMetadata + ) + ), + seedConversionWorkspace: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + seedConversionWorkspaceResponse.decode.bind( + seedConversionWorkspaceResponse + ), + seedConversionWorkspaceMetadata.decode.bind( + seedConversionWorkspaceMetadata + ) + ), + importMappingRules: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + importMappingRulesResponse.decode.bind(importMappingRulesResponse), + importMappingRulesMetadata.decode.bind(importMappingRulesMetadata) + ), + convertConversionWorkspace: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + convertConversionWorkspaceResponse.decode.bind( + convertConversionWorkspaceResponse + ), + convertConversionWorkspaceMetadata.decode.bind( + convertConversionWorkspaceMetadata + ) + ), + commitConversionWorkspace: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + commitConversionWorkspaceResponse.decode.bind( + commitConversionWorkspaceResponse + ), + commitConversionWorkspaceMetadata.decode.bind( + commitConversionWorkspaceMetadata + ) + ), + rollbackConversionWorkspace: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + rollbackConversionWorkspaceResponse.decode.bind( + rollbackConversionWorkspaceResponse + ), + rollbackConversionWorkspaceMetadata.decode.bind( + rollbackConversionWorkspaceMetadata + ) + ), + applyConversionWorkspace: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + applyConversionWorkspaceResponse.decode.bind( + applyConversionWorkspaceResponse + ), + applyConversionWorkspaceMetadata.decode.bind( + applyConversionWorkspaceMetadata + ) + ), }; // Put together the default options sent with requests. @@ -498,6 +719,25 @@ export class DataMigrationServiceClient { 'createConnectionProfile', 'updateConnectionProfile', 'deleteConnectionProfile', + 'createPrivateConnection', + 'getPrivateConnection', + 'listPrivateConnections', + 'deletePrivateConnection', + 'getConversionWorkspace', + 'listConversionWorkspaces', + 'createConversionWorkspace', + 'updateConversionWorkspace', + 'deleteConversionWorkspace', + 'seedConversionWorkspace', + 'importMappingRules', + 'convertConversionWorkspace', + 'commitConversionWorkspace', + 'rollbackConversionWorkspace', + 'applyConversionWorkspace', + 'describeDatabaseEntities', + 'searchBackgroundJobs', + 'describeConversionWorkspaceRevisions', + 'fetchStaticIps', ]; for (const methodName of dataMigrationServiceStubMethods) { const callPromise = this.dataMigrationServiceStub.then( @@ -690,7 +930,7 @@ export class DataMigrationServiceClient { * @param {google.cloud.clouddms.v1.VmSelectionConfig} request.vmSelectionConfig * The VM selection configuration * @param {number} request.vmPort - * The port that will be open on the bastion host + * The port that will be open on the bastion host. * @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. @@ -866,103 +1106,76 @@ export class DataMigrationServiceClient { this.initialize(); return this.innerApiCalls.getConnectionProfile(request, options, callback); } - /** - * Creates a new migration job in a given project and location. + * Gets details of a single private connection. * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. The parent, which owns this collection of migration jobs. - * @param {string} request.migrationJobId - * Required. The ID of the instance to create. - * @param {google.cloud.clouddms.v1.MigrationJob} request.migrationJob - * Required. Represents a [migration - * job](https://cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.migrationJobs) - * object. - * @param {string} request.requestId - * A unique id used to identify the request. If the server receives two - * requests with the same id, then the second request will be ignored. - * - * It is recommended to always set this value to a UUID. - * - * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores - * (_), and hyphens (-). The maximum length is 40 characters. + * @param {string} request.name + * Required. The name of the private connection to get. * @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. + * The first element of the array is an object representing {@link google.cloud.clouddms.v1.PrivateConnection | PrivateConnection}. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example include:samples/generated/v1/data_migration_service.create_migration_job.js - * region_tag:datamigration_v1_generated_DataMigrationService_CreateMigrationJob_async + * @example include:samples/generated/v1/data_migration_service.get_private_connection.js + * region_tag:datamigration_v1_generated_DataMigrationService_GetPrivateConnection_async */ - createMigrationJob( - request?: protos.google.cloud.clouddms.v1.ICreateMigrationJobRequest, + getPrivateConnection( + request?: protos.google.cloud.clouddms.v1.IGetPrivateConnectionRequest, options?: CallOptions ): Promise< [ - LROperation< - protos.google.cloud.clouddms.v1.IMigrationJob, - protos.google.cloud.clouddms.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.clouddms.v1.IPrivateConnection, + protos.google.cloud.clouddms.v1.IGetPrivateConnectionRequest | undefined, {} | undefined ] >; - createMigrationJob( - request: protos.google.cloud.clouddms.v1.ICreateMigrationJobRequest, + getPrivateConnection( + request: protos.google.cloud.clouddms.v1.IGetPrivateConnectionRequest, options: CallOptions, callback: Callback< - LROperation< - protos.google.cloud.clouddms.v1.IMigrationJob, - protos.google.cloud.clouddms.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.clouddms.v1.IPrivateConnection, + | protos.google.cloud.clouddms.v1.IGetPrivateConnectionRequest + | null + | undefined, {} | null | undefined > ): void; - createMigrationJob( - request: protos.google.cloud.clouddms.v1.ICreateMigrationJobRequest, + getPrivateConnection( + request: protos.google.cloud.clouddms.v1.IGetPrivateConnectionRequest, callback: Callback< - LROperation< - protos.google.cloud.clouddms.v1.IMigrationJob, - protos.google.cloud.clouddms.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.clouddms.v1.IPrivateConnection, + | protos.google.cloud.clouddms.v1.IGetPrivateConnectionRequest + | null + | undefined, {} | null | undefined > ): void; - createMigrationJob( - request?: protos.google.cloud.clouddms.v1.ICreateMigrationJobRequest, + getPrivateConnection( + request?: protos.google.cloud.clouddms.v1.IGetPrivateConnectionRequest, optionsOrCallback?: | CallOptions | Callback< - LROperation< - protos.google.cloud.clouddms.v1.IMigrationJob, - protos.google.cloud.clouddms.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.clouddms.v1.IPrivateConnection, + | protos.google.cloud.clouddms.v1.IGetPrivateConnectionRequest + | null + | undefined, {} | null | undefined >, callback?: Callback< - LROperation< - protos.google.cloud.clouddms.v1.IMigrationJob, - protos.google.cloud.clouddms.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.clouddms.v1.IPrivateConnection, + | protos.google.cloud.clouddms.v1.IGetPrivateConnectionRequest + | null + | undefined, {} | null | undefined > ): Promise< [ - LROperation< - protos.google.cloud.clouddms.v1.IMigrationJob, - protos.google.cloud.clouddms.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.clouddms.v1.IPrivateConnection, + protos.google.cloud.clouddms.v1.IGetPrivateConnectionRequest | undefined, {} | undefined ] > | void { @@ -979,139 +1192,87 @@ export class DataMigrationServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', + name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.createMigrationJob(request, options, callback); - } - /** - * Check the status of the long running operation returned by `createMigrationJob()`. - * @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 - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/data_migration_service.create_migration_job.js - * region_tag:datamigration_v1_generated_DataMigrationService_CreateMigrationJob_async - */ - async checkCreateMigrationJobProgress( - name: string - ): Promise< - LROperation< - protos.google.cloud.clouddms.v1.MigrationJob, - protos.google.cloud.clouddms.v1.OperationMetadata - > - > { - 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.createMigrationJob, - this._gaxModule.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.cloud.clouddms.v1.MigrationJob, - protos.google.cloud.clouddms.v1.OperationMetadata - >; + return this.innerApiCalls.getPrivateConnection(request, options, callback); } /** - * Updates the parameters of a single migration job. + * Gets details of a single conversion workspace. * * @param {Object} request * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Field mask is used to specify the fields to be overwritten in the - * migration job resource by the update. - * @param {google.cloud.clouddms.v1.MigrationJob} request.migrationJob - * Required. The migration job parameters to update. - * @param {string} request.requestId - * A unique id used to identify the request. If the server receives two - * requests with the same id, then the second request will be ignored. - * - * It is recommended to always set this value to a UUID. - * - * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores - * (_), and hyphens (-). The maximum length is 40 characters. + * @param {string} request.name + * Required. Name of the conversion workspace resource to get. * @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. + * The first element of the array is an object representing {@link google.cloud.clouddms.v1.ConversionWorkspace | ConversionWorkspace}. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example include:samples/generated/v1/data_migration_service.update_migration_job.js - * region_tag:datamigration_v1_generated_DataMigrationService_UpdateMigrationJob_async + * @example include:samples/generated/v1/data_migration_service.get_conversion_workspace.js + * region_tag:datamigration_v1_generated_DataMigrationService_GetConversionWorkspace_async */ - updateMigrationJob( - request?: protos.google.cloud.clouddms.v1.IUpdateMigrationJobRequest, + getConversionWorkspace( + request?: protos.google.cloud.clouddms.v1.IGetConversionWorkspaceRequest, options?: CallOptions ): Promise< [ - LROperation< - protos.google.cloud.clouddms.v1.IMigrationJob, - protos.google.cloud.clouddms.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.clouddms.v1.IConversionWorkspace, + ( + | protos.google.cloud.clouddms.v1.IGetConversionWorkspaceRequest + | undefined + ), {} | undefined ] >; - updateMigrationJob( - request: protos.google.cloud.clouddms.v1.IUpdateMigrationJobRequest, + getConversionWorkspace( + request: protos.google.cloud.clouddms.v1.IGetConversionWorkspaceRequest, options: CallOptions, callback: Callback< - LROperation< - protos.google.cloud.clouddms.v1.IMigrationJob, - protos.google.cloud.clouddms.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.clouddms.v1.IConversionWorkspace, + | protos.google.cloud.clouddms.v1.IGetConversionWorkspaceRequest + | null + | undefined, {} | null | undefined > ): void; - updateMigrationJob( - request: protos.google.cloud.clouddms.v1.IUpdateMigrationJobRequest, + getConversionWorkspace( + request: protos.google.cloud.clouddms.v1.IGetConversionWorkspaceRequest, callback: Callback< - LROperation< - protos.google.cloud.clouddms.v1.IMigrationJob, - protos.google.cloud.clouddms.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.clouddms.v1.IConversionWorkspace, + | protos.google.cloud.clouddms.v1.IGetConversionWorkspaceRequest + | null + | undefined, {} | null | undefined > ): void; - updateMigrationJob( - request?: protos.google.cloud.clouddms.v1.IUpdateMigrationJobRequest, + getConversionWorkspace( + request?: protos.google.cloud.clouddms.v1.IGetConversionWorkspaceRequest, optionsOrCallback?: | CallOptions | Callback< - LROperation< - protos.google.cloud.clouddms.v1.IMigrationJob, - protos.google.cloud.clouddms.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.clouddms.v1.IConversionWorkspace, + | protos.google.cloud.clouddms.v1.IGetConversionWorkspaceRequest + | null + | undefined, {} | null | undefined >, callback?: Callback< - LROperation< - protos.google.cloud.clouddms.v1.IMigrationJob, - protos.google.cloud.clouddms.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.clouddms.v1.IConversionWorkspace, + | protos.google.cloud.clouddms.v1.IGetConversionWorkspaceRequest + | null + | undefined, {} | null | undefined > ): Promise< [ - LROperation< - protos.google.cloud.clouddms.v1.IMigrationJob, - protos.google.cloud.clouddms.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.clouddms.v1.IConversionWorkspace, + ( + | protos.google.cloud.clouddms.v1.IGetConversionWorkspaceRequest + | undefined + ), {} | undefined ] > | void { @@ -1128,65 +1289,251 @@ export class DataMigrationServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - 'migration_job.name': request.migrationJob!.name ?? '', + name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.updateMigrationJob(request, options, callback); + return this.innerApiCalls.getConversionWorkspace( + request, + options, + callback + ); } /** - * Check the status of the long running operation returned by `updateMigrationJob()`. - * @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. + * Searches/lists the background jobs for a specific + * conversion workspace. + * + * The background jobs are not resources like conversion workspaces or + * mapping rules, and they can't be created, updated or deleted. + * Instead, they are a way to expose the data plane jobs log. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.conversionWorkspace + * Required. Name of the conversion workspace resource whose jobs are listed, + * in the form of: + * projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}. + * @param {boolean} [request.returnMostRecentPerJobType] + * Optional. Whether or not to return just the most recent job per job type, + * @param {number} [request.maxSize] + * Optional. The maximum number of jobs to return. The service may return + * fewer than this value. If unspecified, at most 100 jobs are + * returned. The maximum value is 100; values above 100 are coerced to + * 100. + * @param {google.protobuf.Timestamp} [request.completedUntilTime] + * Optional. If provided, only returns jobs that completed until (not + * including) the given timestamp. + * @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 google.cloud.clouddms.v1.SearchBackgroundJobsResponse | SearchBackgroundJobsResponse}. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example include:samples/generated/v1/data_migration_service.update_migration_job.js - * region_tag:datamigration_v1_generated_DataMigrationService_UpdateMigrationJob_async + * @example include:samples/generated/v1/data_migration_service.search_background_jobs.js + * region_tag:datamigration_v1_generated_DataMigrationService_SearchBackgroundJobs_async */ - async checkUpdateMigrationJobProgress( - name: string + searchBackgroundJobs( + request?: protos.google.cloud.clouddms.v1.ISearchBackgroundJobsRequest, + options?: CallOptions ): Promise< - LROperation< - protos.google.cloud.clouddms.v1.MigrationJob, - protos.google.cloud.clouddms.v1.OperationMetadata + [ + protos.google.cloud.clouddms.v1.ISearchBackgroundJobsResponse, + protos.google.cloud.clouddms.v1.ISearchBackgroundJobsRequest | undefined, + {} | undefined + ] + >; + searchBackgroundJobs( + request: protos.google.cloud.clouddms.v1.ISearchBackgroundJobsRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.clouddms.v1.ISearchBackgroundJobsResponse, + | protos.google.cloud.clouddms.v1.ISearchBackgroundJobsRequest + | null + | undefined, + {} | null | undefined > - > { - 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.updateMigrationJob, - this._gaxModule.createDefaultBackoffSettings() + ): void; + searchBackgroundJobs( + request: protos.google.cloud.clouddms.v1.ISearchBackgroundJobsRequest, + callback: Callback< + protos.google.cloud.clouddms.v1.ISearchBackgroundJobsResponse, + | protos.google.cloud.clouddms.v1.ISearchBackgroundJobsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + searchBackgroundJobs( + request?: protos.google.cloud.clouddms.v1.ISearchBackgroundJobsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.clouddms.v1.ISearchBackgroundJobsResponse, + | protos.google.cloud.clouddms.v1.ISearchBackgroundJobsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.clouddms.v1.ISearchBackgroundJobsResponse, + | protos.google.cloud.clouddms.v1.ISearchBackgroundJobsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.clouddms.v1.ISearchBackgroundJobsResponse, + protos.google.cloud.clouddms.v1.ISearchBackgroundJobsRequest | 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({ + conversion_workspace: request.conversionWorkspace ?? '', + }); + this.initialize(); + return this.innerApiCalls.searchBackgroundJobs(request, options, callback); + } + /** + * Retrieves a list of committed revisions of a specific conversion + * workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.conversionWorkspace + * Required. Name of the conversion workspace resource whose revisions are + * listed. Must be in the form of: + * projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}. + * @param {string} [request.commitId] + * Optional. Optional filter to request a specific commit ID. + * @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 google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse | DescribeConversionWorkspaceRevisionsResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/data_migration_service.describe_conversion_workspace_revisions.js + * region_tag:datamigration_v1_generated_DataMigrationService_DescribeConversionWorkspaceRevisions_async + */ + describeConversionWorkspaceRevisions( + request?: protos.google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsResponse, + ( + | protos.google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsRequest + | undefined + ), + {} | undefined + ] + >; + describeConversionWorkspaceRevisions( + request: protos.google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsResponse, + | protos.google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + describeConversionWorkspaceRevisions( + request: protos.google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsRequest, + callback: Callback< + protos.google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsResponse, + | protos.google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + describeConversionWorkspaceRevisions( + request?: protos.google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsResponse, + | protos.google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsResponse, + | protos.google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsResponse, + ( + | protos.google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsRequest + | 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({ + conversion_workspace: request.conversionWorkspace ?? '', + }); + this.initialize(); + return this.innerApiCalls.describeConversionWorkspaceRevisions( + request, + options, + callback ); - return decodeOperation as LROperation< - protos.google.cloud.clouddms.v1.MigrationJob, - protos.google.cloud.clouddms.v1.OperationMetadata - >; } + /** - * Deletes a single migration job. + * Creates a new migration job in a given project and location. * * @param {Object} request * The request object that will be sent. - * @param {string} request.name - * Required. Name of the migration job resource to delete. + * @param {string} request.parent + * Required. The parent which owns this collection of migration jobs. + * @param {string} request.migrationJobId + * Required. The ID of the instance to create. + * @param {google.cloud.clouddms.v1.MigrationJob} request.migrationJob + * Required. Represents a [migration + * job](https://cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.migrationJobs) + * object. * @param {string} request.requestId - * A unique id used to identify the request. If the server receives two - * requests with the same id, then the second request will be ignored. + * A unique ID used to identify the request. If the server receives two + * requests with the same ID, then the second request is ignored. * * It is recommended to always set this value to a UUID. * - * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores + * The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores * (_), and hyphens (-). The maximum length is 40 characters. - * @param {boolean} request.force - * The destination CloudSQL connection profile is always deleted with the - * migration job. In case of force delete, the destination CloudSQL replica - * database is also deleted. * @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. @@ -1196,52 +1543,52 @@ export class DataMigrationServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example include:samples/generated/v1/data_migration_service.delete_migration_job.js - * region_tag:datamigration_v1_generated_DataMigrationService_DeleteMigrationJob_async + * @example include:samples/generated/v1/data_migration_service.create_migration_job.js + * region_tag:datamigration_v1_generated_DataMigrationService_CreateMigrationJob_async */ - deleteMigrationJob( - request?: protos.google.cloud.clouddms.v1.IDeleteMigrationJobRequest, + createMigrationJob( + request?: protos.google.cloud.clouddms.v1.ICreateMigrationJobRequest, options?: CallOptions ): Promise< [ LROperation< - protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, {} | undefined ] >; - deleteMigrationJob( - request: protos.google.cloud.clouddms.v1.IDeleteMigrationJobRequest, + createMigrationJob( + request: protos.google.cloud.clouddms.v1.ICreateMigrationJobRequest, options: CallOptions, callback: Callback< LROperation< - protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - deleteMigrationJob( - request: protos.google.cloud.clouddms.v1.IDeleteMigrationJobRequest, + createMigrationJob( + request: protos.google.cloud.clouddms.v1.ICreateMigrationJobRequest, callback: Callback< LROperation< - protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - deleteMigrationJob( - request?: protos.google.cloud.clouddms.v1.IDeleteMigrationJobRequest, + createMigrationJob( + request?: protos.google.cloud.clouddms.v1.ICreateMigrationJobRequest, optionsOrCallback?: | CallOptions | Callback< LROperation< - protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, @@ -1249,7 +1596,7 @@ export class DataMigrationServiceClient { >, callback?: Callback< LROperation< - protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, @@ -1258,7 +1605,7 @@ export class DataMigrationServiceClient { ): Promise< [ LROperation< - protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, @@ -1278,13 +1625,13 @@ export class DataMigrationServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', + parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.deleteMigrationJob(request, options, callback); + return this.innerApiCalls.createMigrationJob(request, options, callback); } /** - * Check the status of the long running operation returned by `deleteMigrationJob()`. + * Check the status of the long running operation returned by `createMigrationJob()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. @@ -1292,14 +1639,14 @@ export class DataMigrationServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example include:samples/generated/v1/data_migration_service.delete_migration_job.js - * region_tag:datamigration_v1_generated_DataMigrationService_DeleteMigrationJob_async + * @example include:samples/generated/v1/data_migration_service.create_migration_job.js + * region_tag:datamigration_v1_generated_DataMigrationService_CreateMigrationJob_async */ - async checkDeleteMigrationJobProgress( + async checkCreateMigrationJobProgress( name: string ): Promise< LROperation< - protos.google.protobuf.Empty, + protos.google.cloud.clouddms.v1.MigrationJob, protos.google.cloud.clouddms.v1.OperationMetadata > > { @@ -1310,35 +1657,46 @@ export class DataMigrationServiceClient { const [operation] = await this.operationsClient.getOperation(request); const decodeOperation = new this._gaxModule.Operation( operation, - this.descriptors.longrunning.deleteMigrationJob, + this.descriptors.longrunning.createMigrationJob, this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< - protos.google.protobuf.Empty, + protos.google.cloud.clouddms.v1.MigrationJob, protos.google.cloud.clouddms.v1.OperationMetadata >; } /** - * Start an already created migration job. + * Updates the parameters of a single migration job. * * @param {Object} request * The request object that will be sent. - * @param {string} request.name - * Name of the migration job resource to start. - * @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. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask is used to specify the fields to be overwritten by the + * update in the conversion workspace resource. + * @param {google.cloud.clouddms.v1.MigrationJob} request.migrationJob + * Required. The migration job parameters to update. + * @param {string} request.requestId + * A unique ID used to identify the request. If the server receives two + * requests with the same ID, then the second request is ignored. + * + * It is recommended to always set this value to a UUID. + * + * The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores + * (_), and hyphens (-). The maximum length is 40 characters. + * @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 * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example include:samples/generated/v1/data_migration_service.start_migration_job.js - * region_tag:datamigration_v1_generated_DataMigrationService_StartMigrationJob_async + * @example include:samples/generated/v1/data_migration_service.update_migration_job.js + * region_tag:datamigration_v1_generated_DataMigrationService_UpdateMigrationJob_async */ - startMigrationJob( - request?: protos.google.cloud.clouddms.v1.IStartMigrationJobRequest, + updateMigrationJob( + request?: protos.google.cloud.clouddms.v1.IUpdateMigrationJobRequest, options?: CallOptions ): Promise< [ @@ -1350,8 +1708,8 @@ export class DataMigrationServiceClient { {} | undefined ] >; - startMigrationJob( - request: protos.google.cloud.clouddms.v1.IStartMigrationJobRequest, + updateMigrationJob( + request: protos.google.cloud.clouddms.v1.IUpdateMigrationJobRequest, options: CallOptions, callback: Callback< LROperation< @@ -1362,8 +1720,8 @@ export class DataMigrationServiceClient { {} | null | undefined > ): void; - startMigrationJob( - request: protos.google.cloud.clouddms.v1.IStartMigrationJobRequest, + updateMigrationJob( + request: protos.google.cloud.clouddms.v1.IUpdateMigrationJobRequest, callback: Callback< LROperation< protos.google.cloud.clouddms.v1.IMigrationJob, @@ -1373,8 +1731,8 @@ export class DataMigrationServiceClient { {} | null | undefined > ): void; - startMigrationJob( - request?: protos.google.cloud.clouddms.v1.IStartMigrationJobRequest, + updateMigrationJob( + request?: protos.google.cloud.clouddms.v1.IUpdateMigrationJobRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1416,13 +1774,13 @@ export class DataMigrationServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', + 'migration_job.name': request.migrationJob!.name ?? '', }); this.initialize(); - return this.innerApiCalls.startMigrationJob(request, options, callback); + return this.innerApiCalls.updateMigrationJob(request, options, callback); } /** - * Check the status of the long running operation returned by `startMigrationJob()`. + * Check the status of the long running operation returned by `updateMigrationJob()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. @@ -1430,10 +1788,10 @@ export class DataMigrationServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example include:samples/generated/v1/data_migration_service.start_migration_job.js - * region_tag:datamigration_v1_generated_DataMigrationService_StartMigrationJob_async + * @example include:samples/generated/v1/data_migration_service.update_migration_job.js + * region_tag:datamigration_v1_generated_DataMigrationService_UpdateMigrationJob_async */ - async checkStartMigrationJobProgress( + async checkUpdateMigrationJobProgress( name: string ): Promise< LROperation< @@ -1448,7 +1806,7 @@ export class DataMigrationServiceClient { const [operation] = await this.operationsClient.getOperation(request); const decodeOperation = new this._gaxModule.Operation( operation, - this.descriptors.longrunning.startMigrationJob, + this.descriptors.longrunning.updateMigrationJob, this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< @@ -1457,12 +1815,24 @@ export class DataMigrationServiceClient { >; } /** - * Stops a running migration job. + * Deletes a single migration job. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Name of the migration job resource to stop. + * Required. Name of the migration job resource to delete. + * @param {string} request.requestId + * A unique ID used to identify the request. If the server receives two + * requests with the same ID, then the second request is ignored. + * + * It is recommended to always set this value to a UUID. + * + * The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores + * (_), and hyphens (-). The maximum length is 40 characters. + * @param {boolean} request.force + * The destination CloudSQL connection profile is always deleted with the + * migration job. In case of force delete, the destination CloudSQL replica + * database is also deleted. * @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. @@ -1472,52 +1842,52 @@ export class DataMigrationServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example include:samples/generated/v1/data_migration_service.stop_migration_job.js - * region_tag:datamigration_v1_generated_DataMigrationService_StopMigrationJob_async + * @example include:samples/generated/v1/data_migration_service.delete_migration_job.js + * region_tag:datamigration_v1_generated_DataMigrationService_DeleteMigrationJob_async */ - stopMigrationJob( - request?: protos.google.cloud.clouddms.v1.IStopMigrationJobRequest, + deleteMigrationJob( + request?: protos.google.cloud.clouddms.v1.IDeleteMigrationJobRequest, options?: CallOptions ): Promise< [ LROperation< - protos.google.cloud.clouddms.v1.IMigrationJob, + protos.google.protobuf.IEmpty, protos.google.cloud.clouddms.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, {} | undefined ] >; - stopMigrationJob( - request: protos.google.cloud.clouddms.v1.IStopMigrationJobRequest, + deleteMigrationJob( + request: protos.google.cloud.clouddms.v1.IDeleteMigrationJobRequest, options: CallOptions, callback: Callback< LROperation< - protos.google.cloud.clouddms.v1.IMigrationJob, + protos.google.protobuf.IEmpty, protos.google.cloud.clouddms.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - stopMigrationJob( - request: protos.google.cloud.clouddms.v1.IStopMigrationJobRequest, + deleteMigrationJob( + request: protos.google.cloud.clouddms.v1.IDeleteMigrationJobRequest, callback: Callback< LROperation< - protos.google.cloud.clouddms.v1.IMigrationJob, + protos.google.protobuf.IEmpty, protos.google.cloud.clouddms.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - stopMigrationJob( - request?: protos.google.cloud.clouddms.v1.IStopMigrationJobRequest, + deleteMigrationJob( + request?: protos.google.cloud.clouddms.v1.IDeleteMigrationJobRequest, optionsOrCallback?: | CallOptions | Callback< LROperation< - protos.google.cloud.clouddms.v1.IMigrationJob, + protos.google.protobuf.IEmpty, protos.google.cloud.clouddms.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, @@ -1525,7 +1895,7 @@ export class DataMigrationServiceClient { >, callback?: Callback< LROperation< - protos.google.cloud.clouddms.v1.IMigrationJob, + protos.google.protobuf.IEmpty, protos.google.cloud.clouddms.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, @@ -1534,7 +1904,7 @@ export class DataMigrationServiceClient { ): Promise< [ LROperation< - protos.google.cloud.clouddms.v1.IMigrationJob, + protos.google.protobuf.IEmpty, protos.google.cloud.clouddms.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, @@ -1557,10 +1927,10 @@ export class DataMigrationServiceClient { name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.stopMigrationJob(request, options, callback); + return this.innerApiCalls.deleteMigrationJob(request, options, callback); } /** - * Check the status of the long running operation returned by `stopMigrationJob()`. + * Check the status of the long running operation returned by `deleteMigrationJob()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. @@ -1568,14 +1938,14 @@ export class DataMigrationServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example include:samples/generated/v1/data_migration_service.stop_migration_job.js - * region_tag:datamigration_v1_generated_DataMigrationService_StopMigrationJob_async + * @example include:samples/generated/v1/data_migration_service.delete_migration_job.js + * region_tag:datamigration_v1_generated_DataMigrationService_DeleteMigrationJob_async */ - async checkStopMigrationJobProgress( + async checkDeleteMigrationJobProgress( name: string ): Promise< LROperation< - protos.google.cloud.clouddms.v1.MigrationJob, + protos.google.protobuf.Empty, protos.google.cloud.clouddms.v1.OperationMetadata > > { @@ -1586,22 +1956,21 @@ export class DataMigrationServiceClient { const [operation] = await this.operationsClient.getOperation(request); const decodeOperation = new this._gaxModule.Operation( operation, - this.descriptors.longrunning.stopMigrationJob, + this.descriptors.longrunning.deleteMigrationJob, this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< - protos.google.cloud.clouddms.v1.MigrationJob, + protos.google.protobuf.Empty, protos.google.cloud.clouddms.v1.OperationMetadata >; } /** - * Resume a migration job that is currently stopped and is resumable (was - * stopped during CDC phase). + * Start an already created migration job. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Name of the migration job resource to resume. + * Name of the migration job resource to start. * @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. @@ -1611,11 +1980,11 @@ export class DataMigrationServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example include:samples/generated/v1/data_migration_service.resume_migration_job.js - * region_tag:datamigration_v1_generated_DataMigrationService_ResumeMigrationJob_async + * @example include:samples/generated/v1/data_migration_service.start_migration_job.js + * region_tag:datamigration_v1_generated_DataMigrationService_StartMigrationJob_async */ - resumeMigrationJob( - request?: protos.google.cloud.clouddms.v1.IResumeMigrationJobRequest, + startMigrationJob( + request?: protos.google.cloud.clouddms.v1.IStartMigrationJobRequest, options?: CallOptions ): Promise< [ @@ -1627,8 +1996,8 @@ export class DataMigrationServiceClient { {} | undefined ] >; - resumeMigrationJob( - request: protos.google.cloud.clouddms.v1.IResumeMigrationJobRequest, + startMigrationJob( + request: protos.google.cloud.clouddms.v1.IStartMigrationJobRequest, options: CallOptions, callback: Callback< LROperation< @@ -1639,8 +2008,8 @@ export class DataMigrationServiceClient { {} | null | undefined > ): void; - resumeMigrationJob( - request: protos.google.cloud.clouddms.v1.IResumeMigrationJobRequest, + startMigrationJob( + request: protos.google.cloud.clouddms.v1.IStartMigrationJobRequest, callback: Callback< LROperation< protos.google.cloud.clouddms.v1.IMigrationJob, @@ -1650,8 +2019,8 @@ export class DataMigrationServiceClient { {} | null | undefined > ): void; - resumeMigrationJob( - request?: protos.google.cloud.clouddms.v1.IResumeMigrationJobRequest, + startMigrationJob( + request?: protos.google.cloud.clouddms.v1.IStartMigrationJobRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1696,10 +2065,10 @@ export class DataMigrationServiceClient { name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.resumeMigrationJob(request, options, callback); + return this.innerApiCalls.startMigrationJob(request, options, callback); } /** - * Check the status of the long running operation returned by `resumeMigrationJob()`. + * Check the status of the long running operation returned by `startMigrationJob()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. @@ -1707,10 +2076,10 @@ export class DataMigrationServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example include:samples/generated/v1/data_migration_service.resume_migration_job.js - * region_tag:datamigration_v1_generated_DataMigrationService_ResumeMigrationJob_async + * @example include:samples/generated/v1/data_migration_service.start_migration_job.js + * region_tag:datamigration_v1_generated_DataMigrationService_StartMigrationJob_async */ - async checkResumeMigrationJobProgress( + async checkStartMigrationJobProgress( name: string ): Promise< LROperation< @@ -1725,7 +2094,7 @@ export class DataMigrationServiceClient { const [operation] = await this.operationsClient.getOperation(request); const decodeOperation = new this._gaxModule.Operation( operation, - this.descriptors.longrunning.resumeMigrationJob, + this.descriptors.longrunning.startMigrationJob, this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< @@ -1734,13 +2103,12 @@ export class DataMigrationServiceClient { >; } /** - * Promote a migration job, stopping replication to the destination and - * promoting the destination to be a standalone database. + * Stops a running migration job. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Name of the migration job resource to promote. + * Name of the migration job resource to stop. * @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. @@ -1750,11 +2118,11 @@ export class DataMigrationServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example include:samples/generated/v1/data_migration_service.promote_migration_job.js - * region_tag:datamigration_v1_generated_DataMigrationService_PromoteMigrationJob_async + * @example include:samples/generated/v1/data_migration_service.stop_migration_job.js + * region_tag:datamigration_v1_generated_DataMigrationService_StopMigrationJob_async */ - promoteMigrationJob( - request?: protos.google.cloud.clouddms.v1.IPromoteMigrationJobRequest, + stopMigrationJob( + request?: protos.google.cloud.clouddms.v1.IStopMigrationJobRequest, options?: CallOptions ): Promise< [ @@ -1766,8 +2134,8 @@ export class DataMigrationServiceClient { {} | undefined ] >; - promoteMigrationJob( - request: protos.google.cloud.clouddms.v1.IPromoteMigrationJobRequest, + stopMigrationJob( + request: protos.google.cloud.clouddms.v1.IStopMigrationJobRequest, options: CallOptions, callback: Callback< LROperation< @@ -1778,8 +2146,8 @@ export class DataMigrationServiceClient { {} | null | undefined > ): void; - promoteMigrationJob( - request: protos.google.cloud.clouddms.v1.IPromoteMigrationJobRequest, + stopMigrationJob( + request: protos.google.cloud.clouddms.v1.IStopMigrationJobRequest, callback: Callback< LROperation< protos.google.cloud.clouddms.v1.IMigrationJob, @@ -1789,8 +2157,8 @@ export class DataMigrationServiceClient { {} | null | undefined > ): void; - promoteMigrationJob( - request?: protos.google.cloud.clouddms.v1.IPromoteMigrationJobRequest, + stopMigrationJob( + request?: protos.google.cloud.clouddms.v1.IStopMigrationJobRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1835,10 +2203,10 @@ export class DataMigrationServiceClient { name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.promoteMigrationJob(request, options, callback); + return this.innerApiCalls.stopMigrationJob(request, options, callback); } /** - * Check the status of the long running operation returned by `promoteMigrationJob()`. + * Check the status of the long running operation returned by `stopMigrationJob()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. @@ -1846,10 +2214,10 @@ export class DataMigrationServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example include:samples/generated/v1/data_migration_service.promote_migration_job.js - * region_tag:datamigration_v1_generated_DataMigrationService_PromoteMigrationJob_async + * @example include:samples/generated/v1/data_migration_service.stop_migration_job.js + * region_tag:datamigration_v1_generated_DataMigrationService_StopMigrationJob_async */ - async checkPromoteMigrationJobProgress( + async checkStopMigrationJobProgress( name: string ): Promise< LROperation< @@ -1864,7 +2232,7 @@ export class DataMigrationServiceClient { const [operation] = await this.operationsClient.getOperation(request); const decodeOperation = new this._gaxModule.Operation( operation, - this.descriptors.longrunning.promoteMigrationJob, + this.descriptors.longrunning.stopMigrationJob, this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< @@ -1873,13 +2241,13 @@ export class DataMigrationServiceClient { >; } /** - * Verify a migration job, making sure the destination can reach the source - * and that all configuration and prerequisites are met. + * Resume a migration job that is currently stopped and is resumable (was + * stopped during CDC phase). * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Name of the migration job resource to verify. + * Name of the migration job resource to resume. * @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. @@ -1889,11 +2257,11 @@ export class DataMigrationServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example include:samples/generated/v1/data_migration_service.verify_migration_job.js - * region_tag:datamigration_v1_generated_DataMigrationService_VerifyMigrationJob_async + * @example include:samples/generated/v1/data_migration_service.resume_migration_job.js + * region_tag:datamigration_v1_generated_DataMigrationService_ResumeMigrationJob_async */ - verifyMigrationJob( - request?: protos.google.cloud.clouddms.v1.IVerifyMigrationJobRequest, + resumeMigrationJob( + request?: protos.google.cloud.clouddms.v1.IResumeMigrationJobRequest, options?: CallOptions ): Promise< [ @@ -1905,8 +2273,8 @@ export class DataMigrationServiceClient { {} | undefined ] >; - verifyMigrationJob( - request: protos.google.cloud.clouddms.v1.IVerifyMigrationJobRequest, + resumeMigrationJob( + request: protos.google.cloud.clouddms.v1.IResumeMigrationJobRequest, options: CallOptions, callback: Callback< LROperation< @@ -1917,8 +2285,8 @@ export class DataMigrationServiceClient { {} | null | undefined > ): void; - verifyMigrationJob( - request: protos.google.cloud.clouddms.v1.IVerifyMigrationJobRequest, + resumeMigrationJob( + request: protos.google.cloud.clouddms.v1.IResumeMigrationJobRequest, callback: Callback< LROperation< protos.google.cloud.clouddms.v1.IMigrationJob, @@ -1928,8 +2296,8 @@ export class DataMigrationServiceClient { {} | null | undefined > ): void; - verifyMigrationJob( - request?: protos.google.cloud.clouddms.v1.IVerifyMigrationJobRequest, + resumeMigrationJob( + request?: protos.google.cloud.clouddms.v1.IResumeMigrationJobRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1974,10 +2342,10 @@ export class DataMigrationServiceClient { name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.verifyMigrationJob(request, options, callback); + return this.innerApiCalls.resumeMigrationJob(request, options, callback); } /** - * Check the status of the long running operation returned by `verifyMigrationJob()`. + * Check the status of the long running operation returned by `resumeMigrationJob()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. @@ -1985,10 +2353,10 @@ export class DataMigrationServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example include:samples/generated/v1/data_migration_service.verify_migration_job.js - * region_tag:datamigration_v1_generated_DataMigrationService_VerifyMigrationJob_async + * @example include:samples/generated/v1/data_migration_service.resume_migration_job.js + * region_tag:datamigration_v1_generated_DataMigrationService_ResumeMigrationJob_async */ - async checkVerifyMigrationJobProgress( + async checkResumeMigrationJobProgress( name: string ): Promise< LROperation< @@ -2003,7 +2371,7 @@ export class DataMigrationServiceClient { const [operation] = await this.operationsClient.getOperation(request); const decodeOperation = new this._gaxModule.Operation( operation, - this.descriptors.longrunning.verifyMigrationJob, + this.descriptors.longrunning.resumeMigrationJob, this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< @@ -2012,14 +2380,13 @@ export class DataMigrationServiceClient { >; } /** - * Restart a stopped or failed migration job, resetting the destination - * instance to its original state and starting the migration process from - * scratch. + * Promote a migration job, stopping replication to the destination and + * promoting the destination to be a standalone database. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Name of the migration job resource to restart. + * Name of the migration job resource to promote. * @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. @@ -2029,11 +2396,11 @@ export class DataMigrationServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example include:samples/generated/v1/data_migration_service.restart_migration_job.js - * region_tag:datamigration_v1_generated_DataMigrationService_RestartMigrationJob_async + * @example include:samples/generated/v1/data_migration_service.promote_migration_job.js + * region_tag:datamigration_v1_generated_DataMigrationService_PromoteMigrationJob_async */ - restartMigrationJob( - request?: protos.google.cloud.clouddms.v1.IRestartMigrationJobRequest, + promoteMigrationJob( + request?: protos.google.cloud.clouddms.v1.IPromoteMigrationJobRequest, options?: CallOptions ): Promise< [ @@ -2045,8 +2412,8 @@ export class DataMigrationServiceClient { {} | undefined ] >; - restartMigrationJob( - request: protos.google.cloud.clouddms.v1.IRestartMigrationJobRequest, + promoteMigrationJob( + request: protos.google.cloud.clouddms.v1.IPromoteMigrationJobRequest, options: CallOptions, callback: Callback< LROperation< @@ -2057,8 +2424,8 @@ export class DataMigrationServiceClient { {} | null | undefined > ): void; - restartMigrationJob( - request: protos.google.cloud.clouddms.v1.IRestartMigrationJobRequest, + promoteMigrationJob( + request: protos.google.cloud.clouddms.v1.IPromoteMigrationJobRequest, callback: Callback< LROperation< protos.google.cloud.clouddms.v1.IMigrationJob, @@ -2068,8 +2435,8 @@ export class DataMigrationServiceClient { {} | null | undefined > ): void; - restartMigrationJob( - request?: protos.google.cloud.clouddms.v1.IRestartMigrationJobRequest, + promoteMigrationJob( + request?: protos.google.cloud.clouddms.v1.IPromoteMigrationJobRequest, optionsOrCallback?: | CallOptions | Callback< @@ -2114,10 +2481,10 @@ export class DataMigrationServiceClient { name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.restartMigrationJob(request, options, callback); + return this.innerApiCalls.promoteMigrationJob(request, options, callback); } /** - * Check the status of the long running operation returned by `restartMigrationJob()`. + * Check the status of the long running operation returned by `promoteMigrationJob()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. @@ -2125,10 +2492,10 @@ export class DataMigrationServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example include:samples/generated/v1/data_migration_service.restart_migration_job.js - * region_tag:datamigration_v1_generated_DataMigrationService_RestartMigrationJob_async + * @example include:samples/generated/v1/data_migration_service.promote_migration_job.js + * region_tag:datamigration_v1_generated_DataMigrationService_PromoteMigrationJob_async */ - async checkRestartMigrationJobProgress( + async checkPromoteMigrationJobProgress( name: string ): Promise< LROperation< @@ -2143,7 +2510,7 @@ export class DataMigrationServiceClient { const [operation] = await this.operationsClient.getOperation(request); const decodeOperation = new this._gaxModule.Operation( operation, - this.descriptors.longrunning.restartMigrationJob, + this.descriptors.longrunning.promoteMigrationJob, this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< @@ -2152,24 +2519,13 @@ export class DataMigrationServiceClient { >; } /** - * Creates a new connection profile in a given project and location. + * Verify a migration job, making sure the destination can reach the source + * and that all configuration and prerequisites are met. * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. The parent, which owns this collection of connection profiles. - * @param {string} request.connectionProfileId - * Required. The connection profile identifier. - * @param {google.cloud.clouddms.v1.ConnectionProfile} request.connectionProfile - * Required. The create request body including the connection profile data - * @param {string} request.requestId - * A unique id used to identify the request. If the server receives two - * requests with the same id, then the second request will be ignored. - * - * It is recommended to always set this value to a UUID. - * - * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores - * (_), and hyphens (-). The maximum length is 40 characters. + * @param {string} request.name + * Name of the migration job resource to verify. * @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. @@ -2179,52 +2535,52 @@ export class DataMigrationServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example include:samples/generated/v1/data_migration_service.create_connection_profile.js - * region_tag:datamigration_v1_generated_DataMigrationService_CreateConnectionProfile_async + * @example include:samples/generated/v1/data_migration_service.verify_migration_job.js + * region_tag:datamigration_v1_generated_DataMigrationService_VerifyMigrationJob_async */ - createConnectionProfile( - request?: protos.google.cloud.clouddms.v1.ICreateConnectionProfileRequest, + verifyMigrationJob( + request?: protos.google.cloud.clouddms.v1.IVerifyMigrationJobRequest, options?: CallOptions ): Promise< [ LROperation< - protos.google.cloud.clouddms.v1.IConnectionProfile, + protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, {} | undefined ] >; - createConnectionProfile( - request: protos.google.cloud.clouddms.v1.ICreateConnectionProfileRequest, + verifyMigrationJob( + request: protos.google.cloud.clouddms.v1.IVerifyMigrationJobRequest, options: CallOptions, callback: Callback< LROperation< - protos.google.cloud.clouddms.v1.IConnectionProfile, + protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - createConnectionProfile( - request: protos.google.cloud.clouddms.v1.ICreateConnectionProfileRequest, + verifyMigrationJob( + request: protos.google.cloud.clouddms.v1.IVerifyMigrationJobRequest, callback: Callback< LROperation< - protos.google.cloud.clouddms.v1.IConnectionProfile, + protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - createConnectionProfile( - request?: protos.google.cloud.clouddms.v1.ICreateConnectionProfileRequest, + verifyMigrationJob( + request?: protos.google.cloud.clouddms.v1.IVerifyMigrationJobRequest, optionsOrCallback?: | CallOptions | Callback< LROperation< - protos.google.cloud.clouddms.v1.IConnectionProfile, + protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, @@ -2232,7 +2588,7 @@ export class DataMigrationServiceClient { >, callback?: Callback< LROperation< - protos.google.cloud.clouddms.v1.IConnectionProfile, + protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, @@ -2241,7 +2597,7 @@ export class DataMigrationServiceClient { ): Promise< [ LROperation< - protos.google.cloud.clouddms.v1.IConnectionProfile, + protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, @@ -2261,17 +2617,13 @@ export class DataMigrationServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', + name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.createConnectionProfile( - request, - options, - callback - ); + return this.innerApiCalls.verifyMigrationJob(request, options, callback); } /** - * Check the status of the long running operation returned by `createConnectionProfile()`. + * Check the status of the long running operation returned by `verifyMigrationJob()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. @@ -2279,14 +2631,14 @@ export class DataMigrationServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example include:samples/generated/v1/data_migration_service.create_connection_profile.js - * region_tag:datamigration_v1_generated_DataMigrationService_CreateConnectionProfile_async + * @example include:samples/generated/v1/data_migration_service.verify_migration_job.js + * region_tag:datamigration_v1_generated_DataMigrationService_VerifyMigrationJob_async */ - async checkCreateConnectionProfileProgress( + async checkVerifyMigrationJobProgress( name: string ): Promise< LROperation< - protos.google.cloud.clouddms.v1.ConnectionProfile, + protos.google.cloud.clouddms.v1.MigrationJob, protos.google.cloud.clouddms.v1.OperationMetadata > > { @@ -2297,32 +2649,23 @@ export class DataMigrationServiceClient { const [operation] = await this.operationsClient.getOperation(request); const decodeOperation = new this._gaxModule.Operation( operation, - this.descriptors.longrunning.createConnectionProfile, + this.descriptors.longrunning.verifyMigrationJob, this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< - protos.google.cloud.clouddms.v1.ConnectionProfile, + protos.google.cloud.clouddms.v1.MigrationJob, protos.google.cloud.clouddms.v1.OperationMetadata >; } /** - * Update the configuration of a single connection profile. + * Restart a stopped or failed migration job, resetting the destination + * instance to its original state and starting the migration process from + * scratch. * * @param {Object} request * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Field mask is used to specify the fields to be overwritten in the - * connection profile resource by the update. - * @param {google.cloud.clouddms.v1.ConnectionProfile} request.connectionProfile - * Required. The connection profile parameters to update. - * @param {string} request.requestId - * A unique id used to identify the request. If the server receives two - * requests with the same id, then the second request will be ignored. - * - * It is recommended to always set this value to a UUID. - * - * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores - * (_), and hyphens (-). The maximum length is 40 characters. + * @param {string} request.name + * Name of the migration job resource to restart. * @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. @@ -2332,52 +2675,52 @@ export class DataMigrationServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example include:samples/generated/v1/data_migration_service.update_connection_profile.js - * region_tag:datamigration_v1_generated_DataMigrationService_UpdateConnectionProfile_async + * @example include:samples/generated/v1/data_migration_service.restart_migration_job.js + * region_tag:datamigration_v1_generated_DataMigrationService_RestartMigrationJob_async */ - updateConnectionProfile( - request?: protos.google.cloud.clouddms.v1.IUpdateConnectionProfileRequest, + restartMigrationJob( + request?: protos.google.cloud.clouddms.v1.IRestartMigrationJobRequest, options?: CallOptions ): Promise< [ LROperation< - protos.google.cloud.clouddms.v1.IConnectionProfile, + protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, {} | undefined ] >; - updateConnectionProfile( - request: protos.google.cloud.clouddms.v1.IUpdateConnectionProfileRequest, + restartMigrationJob( + request: protos.google.cloud.clouddms.v1.IRestartMigrationJobRequest, options: CallOptions, callback: Callback< LROperation< - protos.google.cloud.clouddms.v1.IConnectionProfile, + protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - updateConnectionProfile( - request: protos.google.cloud.clouddms.v1.IUpdateConnectionProfileRequest, + restartMigrationJob( + request: protos.google.cloud.clouddms.v1.IRestartMigrationJobRequest, callback: Callback< LROperation< - protos.google.cloud.clouddms.v1.IConnectionProfile, + protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - updateConnectionProfile( - request?: protos.google.cloud.clouddms.v1.IUpdateConnectionProfileRequest, + restartMigrationJob( + request?: protos.google.cloud.clouddms.v1.IRestartMigrationJobRequest, optionsOrCallback?: | CallOptions | Callback< LROperation< - protos.google.cloud.clouddms.v1.IConnectionProfile, + protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, @@ -2385,7 +2728,7 @@ export class DataMigrationServiceClient { >, callback?: Callback< LROperation< - protos.google.cloud.clouddms.v1.IConnectionProfile, + protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, @@ -2394,7 +2737,7 @@ export class DataMigrationServiceClient { ): Promise< [ LROperation< - protos.google.cloud.clouddms.v1.IConnectionProfile, + protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, @@ -2414,17 +2757,13 @@ export class DataMigrationServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - 'connection_profile.name': request.connectionProfile!.name ?? '', + name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.updateConnectionProfile( - request, - options, - callback - ); + return this.innerApiCalls.restartMigrationJob(request, options, callback); } /** - * Check the status of the long running operation returned by `updateConnectionProfile()`. + * Check the status of the long running operation returned by `restartMigrationJob()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. @@ -2432,14 +2771,14 @@ export class DataMigrationServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example include:samples/generated/v1/data_migration_service.update_connection_profile.js - * region_tag:datamigration_v1_generated_DataMigrationService_UpdateConnectionProfile_async + * @example include:samples/generated/v1/data_migration_service.restart_migration_job.js + * region_tag:datamigration_v1_generated_DataMigrationService_RestartMigrationJob_async */ - async checkUpdateConnectionProfileProgress( + async checkRestartMigrationJobProgress( name: string ): Promise< LROperation< - protos.google.cloud.clouddms.v1.ConnectionProfile, + protos.google.cloud.clouddms.v1.MigrationJob, protos.google.cloud.clouddms.v1.OperationMetadata > > { @@ -2450,34 +2789,41 @@ export class DataMigrationServiceClient { const [operation] = await this.operationsClient.getOperation(request); const decodeOperation = new this._gaxModule.Operation( operation, - this.descriptors.longrunning.updateConnectionProfile, + this.descriptors.longrunning.restartMigrationJob, this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< - protos.google.cloud.clouddms.v1.ConnectionProfile, + protos.google.cloud.clouddms.v1.MigrationJob, protos.google.cloud.clouddms.v1.OperationMetadata >; } /** - * Deletes a single Database Migration Service connection profile. - * A connection profile can only be deleted if it is not in use by any - * active migration jobs. + * Creates a new connection profile in a given project and location. * * @param {Object} request * The request object that will be sent. - * @param {string} request.name - * Required. Name of the connection profile resource to delete. - * @param {string} request.requestId - * A unique id used to identify the request. If the server receives two - * requests with the same id, then the second request will be ignored. + * @param {string} request.parent + * Required. The parent which owns this collection of connection profiles. + * @param {string} request.connectionProfileId + * Required. The connection profile identifier. + * @param {google.cloud.clouddms.v1.ConnectionProfile} request.connectionProfile + * Required. The create request body including the connection profile data + * @param {string} [request.requestId] + * Optional. A unique ID used to identify the request. If the server receives + * two requests with the same ID, then the second request is ignored. * * It is recommended to always set this value to a UUID. * - * The id must contain only letters (a-z, A-Z), numbers (0-9), underscores + * The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores * (_), and hyphens (-). The maximum length is 40 characters. - * @param {boolean} request.force - * In case of force delete, the CloudSQL replica database is also deleted - * (only for CloudSQL connection profile). + * @param {boolean} [request.validateOnly] + * Optional. Only validate the connection profile, but don't create any + * resources. The default is false. Only supported for Oracle connection + * profiles. + * @param {boolean} [request.skipValidation] + * Optional. Create the connection profile without validating it. + * The default is false. + * Only supported for Oracle connection profiles. * @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. @@ -2487,52 +2833,52 @@ export class DataMigrationServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example include:samples/generated/v1/data_migration_service.delete_connection_profile.js - * region_tag:datamigration_v1_generated_DataMigrationService_DeleteConnectionProfile_async + * @example include:samples/generated/v1/data_migration_service.create_connection_profile.js + * region_tag:datamigration_v1_generated_DataMigrationService_CreateConnectionProfile_async */ - deleteConnectionProfile( - request?: protos.google.cloud.clouddms.v1.IDeleteConnectionProfileRequest, + createConnectionProfile( + request?: protos.google.cloud.clouddms.v1.ICreateConnectionProfileRequest, options?: CallOptions ): Promise< [ LROperation< - protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IConnectionProfile, protos.google.cloud.clouddms.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, {} | undefined ] >; - deleteConnectionProfile( - request: protos.google.cloud.clouddms.v1.IDeleteConnectionProfileRequest, + createConnectionProfile( + request: protos.google.cloud.clouddms.v1.ICreateConnectionProfileRequest, options: CallOptions, callback: Callback< LROperation< - protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IConnectionProfile, protos.google.cloud.clouddms.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - deleteConnectionProfile( - request: protos.google.cloud.clouddms.v1.IDeleteConnectionProfileRequest, + createConnectionProfile( + request: protos.google.cloud.clouddms.v1.ICreateConnectionProfileRequest, callback: Callback< LROperation< - protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IConnectionProfile, protos.google.cloud.clouddms.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - deleteConnectionProfile( - request?: protos.google.cloud.clouddms.v1.IDeleteConnectionProfileRequest, + createConnectionProfile( + request?: protos.google.cloud.clouddms.v1.ICreateConnectionProfileRequest, optionsOrCallback?: | CallOptions | Callback< LROperation< - protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IConnectionProfile, protos.google.cloud.clouddms.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, @@ -2540,7 +2886,7 @@ export class DataMigrationServiceClient { >, callback?: Callback< LROperation< - protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IConnectionProfile, protos.google.cloud.clouddms.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, @@ -2549,7 +2895,7 @@ export class DataMigrationServiceClient { ): Promise< [ LROperation< - protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IConnectionProfile, protos.google.cloud.clouddms.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, @@ -2557,160 +2903,3105 @@ export class DataMigrationServiceClient { ] > | void { request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as CallOptions; - } + 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(); + return this.innerApiCalls.createConnectionProfile( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `createConnectionProfile()`. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/data_migration_service.create_connection_profile.js + * region_tag:datamigration_v1_generated_DataMigrationService_CreateConnectionProfile_async + */ + async checkCreateConnectionProfileProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.clouddms.v1.ConnectionProfile, + protos.google.cloud.clouddms.v1.OperationMetadata + > + > { + 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.createConnectionProfile, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.clouddms.v1.ConnectionProfile, + protos.google.cloud.clouddms.v1.OperationMetadata + >; + } + /** + * Update the configuration of a single connection profile. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask is used to specify the fields to be overwritten by the + * update in the conversion workspace resource. + * @param {google.cloud.clouddms.v1.ConnectionProfile} request.connectionProfile + * Required. The connection profile parameters to update. + * @param {string} [request.requestId] + * Optional. A unique ID used to identify the request. If the server receives + * two requests with the same ID, then the second request is ignored. + * + * It is recommended to always set this value to a UUID. + * + * The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores + * (_), and hyphens (-). The maximum length is 40 characters. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the connection profile, but don't update any + * resources. The default is false. Only supported for Oracle connection + * profiles. + * @param {boolean} [request.skipValidation] + * Optional. Update the connection profile without validating it. + * The default is false. + * Only supported for Oracle connection profiles. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/data_migration_service.update_connection_profile.js + * region_tag:datamigration_v1_generated_DataMigrationService_UpdateConnectionProfile_async + */ + updateConnectionProfile( + request?: protos.google.cloud.clouddms.v1.IUpdateConnectionProfileRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.clouddms.v1.IConnectionProfile, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateConnectionProfile( + request: protos.google.cloud.clouddms.v1.IUpdateConnectionProfileRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConnectionProfile, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateConnectionProfile( + request: protos.google.cloud.clouddms.v1.IUpdateConnectionProfileRequest, + callback: Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConnectionProfile, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateConnectionProfile( + request?: protos.google.cloud.clouddms.v1.IUpdateConnectionProfileRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConnectionProfile, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConnectionProfile, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.clouddms.v1.IConnectionProfile, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + 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({ + 'connection_profile.name': request.connectionProfile!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateConnectionProfile( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `updateConnectionProfile()`. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/data_migration_service.update_connection_profile.js + * region_tag:datamigration_v1_generated_DataMigrationService_UpdateConnectionProfile_async + */ + async checkUpdateConnectionProfileProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.clouddms.v1.ConnectionProfile, + protos.google.cloud.clouddms.v1.OperationMetadata + > + > { + 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.updateConnectionProfile, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.clouddms.v1.ConnectionProfile, + protos.google.cloud.clouddms.v1.OperationMetadata + >; + } + /** + * Deletes a single Database Migration Service connection profile. + * A connection profile can only be deleted if it is not in use by any + * active migration jobs. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the connection profile resource to delete. + * @param {string} request.requestId + * A unique ID used to identify the request. If the server receives two + * requests with the same ID, then the second request is ignored. + * + * It is recommended to always set this value to a UUID. + * + * The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores + * (_), and hyphens (-). The maximum length is 40 characters. + * @param {boolean} request.force + * In case of force delete, the CloudSQL replica database is also deleted + * (only for CloudSQL connection profile). + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/data_migration_service.delete_connection_profile.js + * region_tag:datamigration_v1_generated_DataMigrationService_DeleteConnectionProfile_async + */ + deleteConnectionProfile( + request?: protos.google.cloud.clouddms.v1.IDeleteConnectionProfileRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteConnectionProfile( + request: protos.google.cloud.clouddms.v1.IDeleteConnectionProfileRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteConnectionProfile( + request: protos.google.cloud.clouddms.v1.IDeleteConnectionProfileRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteConnectionProfile( + request?: protos.google.cloud.clouddms.v1.IDeleteConnectionProfileRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + 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({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteConnectionProfile( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `deleteConnectionProfile()`. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/data_migration_service.delete_connection_profile.js + * region_tag:datamigration_v1_generated_DataMigrationService_DeleteConnectionProfile_async + */ + async checkDeleteConnectionProfileProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.clouddms.v1.OperationMetadata + > + > { + 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.deleteConnectionProfile, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.clouddms.v1.OperationMetadata + >; + } + /** + * Creates a new private connection in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent that owns the collection of PrivateConnections. + * @param {string} request.privateConnectionId + * Required. The private connection identifier. + * @param {google.cloud.clouddms.v1.PrivateConnection} request.privateConnection + * Required. The private connection resource to create. + * @param {string} [request.requestId] + * Optional. A unique ID used to identify the request. If the server receives + * two requests with the same ID, then the second request is ignored. + * + * It is recommended to always set this value to a UUID. + * + * The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores + * (_), and hyphens (-). The maximum length is 40 characters. + * @param {boolean} [request.skipValidation] + * Optional. If set to true, will skip validations. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/data_migration_service.create_private_connection.js + * region_tag:datamigration_v1_generated_DataMigrationService_CreatePrivateConnection_async + */ + createPrivateConnection( + request?: protos.google.cloud.clouddms.v1.ICreatePrivateConnectionRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.clouddms.v1.IPrivateConnection, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createPrivateConnection( + request: protos.google.cloud.clouddms.v1.ICreatePrivateConnectionRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.clouddms.v1.IPrivateConnection, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createPrivateConnection( + request: protos.google.cloud.clouddms.v1.ICreatePrivateConnectionRequest, + callback: Callback< + LROperation< + protos.google.cloud.clouddms.v1.IPrivateConnection, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createPrivateConnection( + request?: protos.google.cloud.clouddms.v1.ICreatePrivateConnectionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.clouddms.v1.IPrivateConnection, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.clouddms.v1.IPrivateConnection, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.clouddms.v1.IPrivateConnection, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + 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(); + return this.innerApiCalls.createPrivateConnection( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `createPrivateConnection()`. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/data_migration_service.create_private_connection.js + * region_tag:datamigration_v1_generated_DataMigrationService_CreatePrivateConnection_async + */ + async checkCreatePrivateConnectionProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.clouddms.v1.PrivateConnection, + protos.google.cloud.clouddms.v1.OperationMetadata + > + > { + 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.createPrivateConnection, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.clouddms.v1.PrivateConnection, + protos.google.cloud.clouddms.v1.OperationMetadata + >; + } + /** + * Deletes a single Database Migration Service private connection. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the private connection to delete. + * @param {string} [request.requestId] + * Optional. A unique ID used to identify the request. If the server receives + * two requests with the same ID, then the second request is ignored. + * + * It is recommended to always set this value to a UUID. + * + * The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores + * (_), and hyphens (-). The maximum length is 40 characters. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/data_migration_service.delete_private_connection.js + * region_tag:datamigration_v1_generated_DataMigrationService_DeletePrivateConnection_async + */ + deletePrivateConnection( + request?: protos.google.cloud.clouddms.v1.IDeletePrivateConnectionRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deletePrivateConnection( + request: protos.google.cloud.clouddms.v1.IDeletePrivateConnectionRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deletePrivateConnection( + request: protos.google.cloud.clouddms.v1.IDeletePrivateConnectionRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deletePrivateConnection( + request?: protos.google.cloud.clouddms.v1.IDeletePrivateConnectionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + 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({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deletePrivateConnection( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `deletePrivateConnection()`. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/data_migration_service.delete_private_connection.js + * region_tag:datamigration_v1_generated_DataMigrationService_DeletePrivateConnection_async + */ + async checkDeletePrivateConnectionProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.clouddms.v1.OperationMetadata + > + > { + 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.deletePrivateConnection, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.clouddms.v1.OperationMetadata + >; + } + /** + * Creates a new conversion workspace in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent which owns this collection of conversion workspaces. + * @param {string} request.conversionWorkspaceId + * Required. The ID of the conversion workspace to create. + * @param {google.cloud.clouddms.v1.ConversionWorkspace} request.conversionWorkspace + * Required. Represents a conversion workspace object. + * @param {string} request.requestId + * A unique ID used to identify the request. If the server receives two + * requests with the same ID, then the second request is ignored. + * + * It is recommended to always set this value to a UUID. + * + * The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores + * (_), and hyphens (-). The maximum length is 40 characters. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/data_migration_service.create_conversion_workspace.js + * region_tag:datamigration_v1_generated_DataMigrationService_CreateConversionWorkspace_async + */ + createConversionWorkspace( + request?: protos.google.cloud.clouddms.v1.ICreateConversionWorkspaceRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createConversionWorkspace( + request: protos.google.cloud.clouddms.v1.ICreateConversionWorkspaceRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createConversionWorkspace( + request: protos.google.cloud.clouddms.v1.ICreateConversionWorkspaceRequest, + callback: Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createConversionWorkspace( + request?: protos.google.cloud.clouddms.v1.ICreateConversionWorkspaceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + 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(); + return this.innerApiCalls.createConversionWorkspace( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `createConversionWorkspace()`. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/data_migration_service.create_conversion_workspace.js + * region_tag:datamigration_v1_generated_DataMigrationService_CreateConversionWorkspace_async + */ + async checkCreateConversionWorkspaceProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.clouddms.v1.ConversionWorkspace, + protos.google.cloud.clouddms.v1.OperationMetadata + > + > { + 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.createConversionWorkspace, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.clouddms.v1.ConversionWorkspace, + protos.google.cloud.clouddms.v1.OperationMetadata + >; + } + /** + * Updates the parameters of a single conversion workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask is used to specify the fields to be overwritten by the + * update in the conversion workspace resource. + * @param {google.cloud.clouddms.v1.ConversionWorkspace} request.conversionWorkspace + * Required. The conversion workspace parameters to update. + * @param {string} request.requestId + * A unique ID used to identify the request. If the server receives two + * requests with the same ID, then the second request is ignored. + * + * It is recommended to always set this value to a UUID. + * + * The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores + * (_), and hyphens (-). The maximum length is 40 characters. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/data_migration_service.update_conversion_workspace.js + * region_tag:datamigration_v1_generated_DataMigrationService_UpdateConversionWorkspace_async + */ + updateConversionWorkspace( + request?: protos.google.cloud.clouddms.v1.IUpdateConversionWorkspaceRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateConversionWorkspace( + request: protos.google.cloud.clouddms.v1.IUpdateConversionWorkspaceRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateConversionWorkspace( + request: protos.google.cloud.clouddms.v1.IUpdateConversionWorkspaceRequest, + callback: Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateConversionWorkspace( + request?: protos.google.cloud.clouddms.v1.IUpdateConversionWorkspaceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + 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({ + 'conversion_workspace.name': request.conversionWorkspace!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateConversionWorkspace( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `updateConversionWorkspace()`. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/data_migration_service.update_conversion_workspace.js + * region_tag:datamigration_v1_generated_DataMigrationService_UpdateConversionWorkspace_async + */ + async checkUpdateConversionWorkspaceProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.clouddms.v1.ConversionWorkspace, + protos.google.cloud.clouddms.v1.OperationMetadata + > + > { + 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.updateConversionWorkspace, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.clouddms.v1.ConversionWorkspace, + protos.google.cloud.clouddms.v1.OperationMetadata + >; + } + /** + * Deletes a single conversion workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the conversion workspace resource to delete. + * @param {string} request.requestId + * A unique ID used to identify the request. If the server receives two + * requests with the same ID, then the second request is ignored. + * + * It is recommended to always set this value to a UUID. + * + * The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores + * (_), and hyphens (-). The maximum length is 40 characters. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/data_migration_service.delete_conversion_workspace.js + * region_tag:datamigration_v1_generated_DataMigrationService_DeleteConversionWorkspace_async + */ + deleteConversionWorkspace( + request?: protos.google.cloud.clouddms.v1.IDeleteConversionWorkspaceRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteConversionWorkspace( + request: protos.google.cloud.clouddms.v1.IDeleteConversionWorkspaceRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteConversionWorkspace( + request: protos.google.cloud.clouddms.v1.IDeleteConversionWorkspaceRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteConversionWorkspace( + request?: protos.google.cloud.clouddms.v1.IDeleteConversionWorkspaceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + 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({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteConversionWorkspace( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `deleteConversionWorkspace()`. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/data_migration_service.delete_conversion_workspace.js + * region_tag:datamigration_v1_generated_DataMigrationService_DeleteConversionWorkspace_async + */ + async checkDeleteConversionWorkspaceProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.clouddms.v1.OperationMetadata + > + > { + 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.deleteConversionWorkspace, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.clouddms.v1.OperationMetadata + >; + } + /** + * Imports a snapshot of the source database into the + * conversion workspace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Name of the conversion workspace resource to seed with new database + * structure, in the form of: + * projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}. + * @param {boolean} request.autoCommit + * Should the conversion workspace be committed automatically after the + * seed operation. + * @param {string} request.sourceConnectionProfile + * Fully qualified (Uri) name of the source connection profile. + * @param {string} request.destinationConnectionProfile + * Fully qualified (Uri) name of the destination connection profile. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/data_migration_service.seed_conversion_workspace.js + * region_tag:datamigration_v1_generated_DataMigrationService_SeedConversionWorkspace_async + */ + seedConversionWorkspace( + request?: protos.google.cloud.clouddms.v1.ISeedConversionWorkspaceRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + seedConversionWorkspace( + request: protos.google.cloud.clouddms.v1.ISeedConversionWorkspaceRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + seedConversionWorkspace( + request: protos.google.cloud.clouddms.v1.ISeedConversionWorkspaceRequest, + callback: Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + seedConversionWorkspace( + request?: protos.google.cloud.clouddms.v1.ISeedConversionWorkspaceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + 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({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.seedConversionWorkspace( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `seedConversionWorkspace()`. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/data_migration_service.seed_conversion_workspace.js + * region_tag:datamigration_v1_generated_DataMigrationService_SeedConversionWorkspace_async + */ + async checkSeedConversionWorkspaceProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.clouddms.v1.ConversionWorkspace, + protos.google.cloud.clouddms.v1.OperationMetadata + > + > { + 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.seedConversionWorkspace, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.clouddms.v1.ConversionWorkspace, + protos.google.cloud.clouddms.v1.OperationMetadata + >; + } + /** + * Imports the mapping rules for a given conversion workspace. + * Supports various formats of external rules files. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Name of the conversion workspace resource to import the rules to + * in the form of: + * projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}. + * @param {google.cloud.clouddms.v1.ImportRulesFileFormat} request.rulesFormat + * The format of the rules content file. + * @param {number[]} request.rulesFiles + * One or more rules files. + * @param {boolean} request.autoCommit + * Should the conversion workspace be committed automatically after the + * import operation. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/data_migration_service.import_mapping_rules.js + * region_tag:datamigration_v1_generated_DataMigrationService_ImportMappingRules_async + */ + importMappingRules( + request?: protos.google.cloud.clouddms.v1.IImportMappingRulesRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + importMappingRules( + request: protos.google.cloud.clouddms.v1.IImportMappingRulesRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + importMappingRules( + request: protos.google.cloud.clouddms.v1.IImportMappingRulesRequest, + callback: Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + importMappingRules( + request?: protos.google.cloud.clouddms.v1.IImportMappingRulesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + 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(); + return this.innerApiCalls.importMappingRules(request, options, callback); + } + /** + * Check the status of the long running operation returned by `importMappingRules()`. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/data_migration_service.import_mapping_rules.js + * region_tag:datamigration_v1_generated_DataMigrationService_ImportMappingRules_async + */ + async checkImportMappingRulesProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.clouddms.v1.ConversionWorkspace, + protos.google.cloud.clouddms.v1.OperationMetadata + > + > { + 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.importMappingRules, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.clouddms.v1.ConversionWorkspace, + protos.google.cloud.clouddms.v1.OperationMetadata + >; + } + /** + * Creates a draft tree schema for the destination database. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Name of the conversion workspace resource to convert in the form of: + * projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}. + * @param {boolean} request.autoCommit + * Specifies whether the conversion workspace is to be committed automatically + * after the conversion. + * @param {string} request.filter + * Filter the entities to convert. Leaving this field empty will convert all + * of the entities. Supports Google AIP-160 style filtering. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/data_migration_service.convert_conversion_workspace.js + * region_tag:datamigration_v1_generated_DataMigrationService_ConvertConversionWorkspace_async + */ + convertConversionWorkspace( + request?: protos.google.cloud.clouddms.v1.IConvertConversionWorkspaceRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + convertConversionWorkspace( + request: protos.google.cloud.clouddms.v1.IConvertConversionWorkspaceRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + convertConversionWorkspace( + request: protos.google.cloud.clouddms.v1.IConvertConversionWorkspaceRequest, + callback: Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + convertConversionWorkspace( + request?: protos.google.cloud.clouddms.v1.IConvertConversionWorkspaceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + 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({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.convertConversionWorkspace( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `convertConversionWorkspace()`. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/data_migration_service.convert_conversion_workspace.js + * region_tag:datamigration_v1_generated_DataMigrationService_ConvertConversionWorkspace_async + */ + async checkConvertConversionWorkspaceProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.clouddms.v1.ConversionWorkspace, + protos.google.cloud.clouddms.v1.OperationMetadata + > + > { + 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.convertConversionWorkspace, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.clouddms.v1.ConversionWorkspace, + protos.google.cloud.clouddms.v1.OperationMetadata + >; + } + /** + * Marks all the data in the conversion workspace as committed. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the conversion workspace resource to commit. + * @param {string} [request.commitName] + * Optional. Optional name of the commit. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/data_migration_service.commit_conversion_workspace.js + * region_tag:datamigration_v1_generated_DataMigrationService_CommitConversionWorkspace_async + */ + commitConversionWorkspace( + request?: protos.google.cloud.clouddms.v1.ICommitConversionWorkspaceRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + commitConversionWorkspace( + request: protos.google.cloud.clouddms.v1.ICommitConversionWorkspaceRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + commitConversionWorkspace( + request: protos.google.cloud.clouddms.v1.ICommitConversionWorkspaceRequest, + callback: Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + commitConversionWorkspace( + request?: protos.google.cloud.clouddms.v1.ICommitConversionWorkspaceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + 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({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.commitConversionWorkspace( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `commitConversionWorkspace()`. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/data_migration_service.commit_conversion_workspace.js + * region_tag:datamigration_v1_generated_DataMigrationService_CommitConversionWorkspace_async + */ + async checkCommitConversionWorkspaceProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.clouddms.v1.ConversionWorkspace, + protos.google.cloud.clouddms.v1.OperationMetadata + > + > { + 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.commitConversionWorkspace, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.clouddms.v1.ConversionWorkspace, + protos.google.cloud.clouddms.v1.OperationMetadata + >; + } + /** + * Rolls back a conversion workspace to the last committed snapshot. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the conversion workspace resource to roll back to. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/data_migration_service.rollback_conversion_workspace.js + * region_tag:datamigration_v1_generated_DataMigrationService_RollbackConversionWorkspace_async + */ + rollbackConversionWorkspace( + request?: protos.google.cloud.clouddms.v1.IRollbackConversionWorkspaceRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + rollbackConversionWorkspace( + request: protos.google.cloud.clouddms.v1.IRollbackConversionWorkspaceRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + rollbackConversionWorkspace( + request: protos.google.cloud.clouddms.v1.IRollbackConversionWorkspaceRequest, + callback: Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + rollbackConversionWorkspace( + request?: protos.google.cloud.clouddms.v1.IRollbackConversionWorkspaceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + 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({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.rollbackConversionWorkspace( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `rollbackConversionWorkspace()`. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/data_migration_service.rollback_conversion_workspace.js + * region_tag:datamigration_v1_generated_DataMigrationService_RollbackConversionWorkspace_async + */ + async checkRollbackConversionWorkspaceProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.clouddms.v1.ConversionWorkspace, + protos.google.cloud.clouddms.v1.OperationMetadata + > + > { + 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.rollbackConversionWorkspace, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.clouddms.v1.ConversionWorkspace, + protos.google.cloud.clouddms.v1.OperationMetadata + >; + } + /** + * Applies draft tree onto a specific destination database. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the conversion workspace resource for which to apply + * the draft tree. Must be in the form of: + * projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}. + * @param {string} request.filter + * Filter which entities to apply. Leaving this field empty will apply all of + * the entities. Supports Google AIP 160 based filtering. + * @param {string} request.connectionProfile + * Fully qualified (Uri) name of the destination connection profile. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/data_migration_service.apply_conversion_workspace.js + * region_tag:datamigration_v1_generated_DataMigrationService_ApplyConversionWorkspace_async + */ + applyConversionWorkspace( + request?: protos.google.cloud.clouddms.v1.IApplyConversionWorkspaceRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + applyConversionWorkspace( + request: protos.google.cloud.clouddms.v1.IApplyConversionWorkspaceRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + applyConversionWorkspace( + request: protos.google.cloud.clouddms.v1.IApplyConversionWorkspaceRequest, + callback: Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + applyConversionWorkspace( + request?: protos.google.cloud.clouddms.v1.IApplyConversionWorkspaceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >, + 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({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.applyConversionWorkspace( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `applyConversionWorkspace()`. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/data_migration_service.apply_conversion_workspace.js + * region_tag:datamigration_v1_generated_DataMigrationService_ApplyConversionWorkspace_async + */ + async checkApplyConversionWorkspaceProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.clouddms.v1.ConversionWorkspace, + protos.google.cloud.clouddms.v1.OperationMetadata + > + > { + 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.applyConversionWorkspace, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.clouddms.v1.ConversionWorkspace, + protos.google.cloud.clouddms.v1.OperationMetadata + >; + } + /** + * Lists migration jobs in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent which owns this collection of migrationJobs. + * @param {number} request.pageSize + * The maximum number of migration jobs to return. The service may return + * fewer than this value. If unspecified, at most 50 migration jobs will be + * returned. The maximum value is 1000; values above 1000 are coerced to + * 1000. + * @param {string} request.pageToken + * The nextPageToken value received in the previous call to + * migrationJobs.list, used in the subsequent request to retrieve the next + * page of results. On first call this should be left blank. When paginating, + * all other parameters provided to migrationJobs.list must match the call + * that provided the page token. + * @param {string} request.filter + * A filter expression that filters migration jobs listed in the response. + * The expression must specify the field name, a comparison operator, and the + * value that you want to use for filtering. The value must be a string, + * a number, or a boolean. The comparison operator must be + * either =, !=, >, or <. For example, list migration jobs created this year + * by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.** + * You can also filter nested fields. For example, you could specify + * **reverseSshConnectivity.vmIp = "1.2.3.4"** to select all migration + * jobs connecting through the specific SSH tunnel bastion. + * @param {string} request.orderBy + * Sort the results based on the migration job name. + * Valid values are: "name", "name asc", and "name desc". + * @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 google.cloud.clouddms.v1.MigrationJob | MigrationJob}. + * 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 `listMigrationJobsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listMigrationJobs( + request?: protos.google.cloud.clouddms.v1.IListMigrationJobsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.clouddms.v1.IMigrationJob[], + protos.google.cloud.clouddms.v1.IListMigrationJobsRequest | null, + protos.google.cloud.clouddms.v1.IListMigrationJobsResponse + ] + >; + listMigrationJobs( + request: protos.google.cloud.clouddms.v1.IListMigrationJobsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.clouddms.v1.IListMigrationJobsRequest, + | protos.google.cloud.clouddms.v1.IListMigrationJobsResponse + | null + | undefined, + protos.google.cloud.clouddms.v1.IMigrationJob + > + ): void; + listMigrationJobs( + request: protos.google.cloud.clouddms.v1.IListMigrationJobsRequest, + callback: PaginationCallback< + protos.google.cloud.clouddms.v1.IListMigrationJobsRequest, + | protos.google.cloud.clouddms.v1.IListMigrationJobsResponse + | null + | undefined, + protos.google.cloud.clouddms.v1.IMigrationJob + > + ): void; + listMigrationJobs( + request?: protos.google.cloud.clouddms.v1.IListMigrationJobsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.clouddms.v1.IListMigrationJobsRequest, + | protos.google.cloud.clouddms.v1.IListMigrationJobsResponse + | null + | undefined, + protos.google.cloud.clouddms.v1.IMigrationJob + >, + callback?: PaginationCallback< + protos.google.cloud.clouddms.v1.IListMigrationJobsRequest, + | protos.google.cloud.clouddms.v1.IListMigrationJobsResponse + | null + | undefined, + protos.google.cloud.clouddms.v1.IMigrationJob + > + ): Promise< + [ + protos.google.cloud.clouddms.v1.IMigrationJob[], + protos.google.cloud.clouddms.v1.IListMigrationJobsRequest | null, + protos.google.cloud.clouddms.v1.IListMigrationJobsResponse + ] + > | 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(); + return this.innerApiCalls.listMigrationJobs(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent which owns this collection of migrationJobs. + * @param {number} request.pageSize + * The maximum number of migration jobs to return. The service may return + * fewer than this value. If unspecified, at most 50 migration jobs will be + * returned. The maximum value is 1000; values above 1000 are coerced to + * 1000. + * @param {string} request.pageToken + * The nextPageToken value received in the previous call to + * migrationJobs.list, used in the subsequent request to retrieve the next + * page of results. On first call this should be left blank. When paginating, + * all other parameters provided to migrationJobs.list must match the call + * that provided the page token. + * @param {string} request.filter + * A filter expression that filters migration jobs listed in the response. + * The expression must specify the field name, a comparison operator, and the + * value that you want to use for filtering. The value must be a string, + * a number, or a boolean. The comparison operator must be + * either =, !=, >, or <. For example, list migration jobs created this year + * by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.** + * You can also filter nested fields. For example, you could specify + * **reverseSshConnectivity.vmIp = "1.2.3.4"** to select all migration + * jobs connecting through the specific SSH tunnel bastion. + * @param {string} request.orderBy + * Sort the results based on the migration job name. + * Valid values are: "name", "name asc", and "name desc". + * @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 google.cloud.clouddms.v1.MigrationJob | MigrationJob} 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 `listMigrationJobsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listMigrationJobsStream( + request?: protos.google.cloud.clouddms.v1.IListMigrationJobsRequest, + 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['listMigrationJobs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listMigrationJobs.createStream( + this.innerApiCalls.listMigrationJobs as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listMigrationJobs`, 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 which owns this collection of migrationJobs. + * @param {number} request.pageSize + * The maximum number of migration jobs to return. The service may return + * fewer than this value. If unspecified, at most 50 migration jobs will be + * returned. The maximum value is 1000; values above 1000 are coerced to + * 1000. + * @param {string} request.pageToken + * The nextPageToken value received in the previous call to + * migrationJobs.list, used in the subsequent request to retrieve the next + * page of results. On first call this should be left blank. When paginating, + * all other parameters provided to migrationJobs.list must match the call + * that provided the page token. + * @param {string} request.filter + * A filter expression that filters migration jobs listed in the response. + * The expression must specify the field name, a comparison operator, and the + * value that you want to use for filtering. The value must be a string, + * a number, or a boolean. The comparison operator must be + * either =, !=, >, or <. For example, list migration jobs created this year + * by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.** + * You can also filter nested fields. For example, you could specify + * **reverseSshConnectivity.vmIp = "1.2.3.4"** to select all migration + * jobs connecting through the specific SSH tunnel bastion. + * @param {string} request.orderBy + * Sort the results based on the migration job name. + * Valid values are: "name", "name asc", and "name desc". + * @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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.clouddms.v1.MigrationJob | MigrationJob}. 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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/data_migration_service.list_migration_jobs.js + * region_tag:datamigration_v1_generated_DataMigrationService_ListMigrationJobs_async + */ + listMigrationJobsAsync( + request?: protos.google.cloud.clouddms.v1.IListMigrationJobsRequest, + 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['listMigrationJobs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listMigrationJobs.asyncIterate( + this.innerApiCalls['listMigrationJobs'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Retrieves a list of all connection profiles in a given project and + * location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent which owns this collection of connection profiles. + * @param {number} request.pageSize + * The maximum number of connection profiles to return. The service may return + * fewer than this value. If unspecified, at most 50 connection profiles will + * be returned. The maximum value is 1000; values above 1000 are coerced + * to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListConnectionProfiles` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListConnectionProfiles` + * must match the call that provided the page token. + * @param {string} request.filter + * A filter expression that filters connection profiles listed in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value must + * be a string, a number, or a boolean. The comparison operator must be either + * =, !=, >, or <. For example, list connection profiles created this year by + * specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z**. You can + * also filter nested fields. For example, you could specify **mySql.username + * = %lt;my_username%gt;** to list all connection profiles configured to + * connect with a specific username. + * @param {string} request.orderBy + * A comma-separated list of fields to order results according to. + * @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 google.cloud.clouddms.v1.ConnectionProfile | ConnectionProfile}. + * 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 `listConnectionProfilesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listConnectionProfiles( + request?: protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.clouddms.v1.IConnectionProfile[], + protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest | null, + protos.google.cloud.clouddms.v1.IListConnectionProfilesResponse + ] + >; + listConnectionProfiles( + request: protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest, + | protos.google.cloud.clouddms.v1.IListConnectionProfilesResponse + | null + | undefined, + protos.google.cloud.clouddms.v1.IConnectionProfile + > + ): void; + listConnectionProfiles( + request: protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest, + callback: PaginationCallback< + protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest, + | protos.google.cloud.clouddms.v1.IListConnectionProfilesResponse + | null + | undefined, + protos.google.cloud.clouddms.v1.IConnectionProfile + > + ): void; + listConnectionProfiles( + request?: protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest, + | protos.google.cloud.clouddms.v1.IListConnectionProfilesResponse + | null + | undefined, + protos.google.cloud.clouddms.v1.IConnectionProfile + >, + callback?: PaginationCallback< + protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest, + | protos.google.cloud.clouddms.v1.IListConnectionProfilesResponse + | null + | undefined, + protos.google.cloud.clouddms.v1.IConnectionProfile + > + ): Promise< + [ + protos.google.cloud.clouddms.v1.IConnectionProfile[], + protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest | null, + protos.google.cloud.clouddms.v1.IListConnectionProfilesResponse + ] + > | 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(); + return this.innerApiCalls.listConnectionProfiles( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent which owns this collection of connection profiles. + * @param {number} request.pageSize + * The maximum number of connection profiles to return. The service may return + * fewer than this value. If unspecified, at most 50 connection profiles will + * be returned. The maximum value is 1000; values above 1000 are coerced + * to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListConnectionProfiles` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListConnectionProfiles` + * must match the call that provided the page token. + * @param {string} request.filter + * A filter expression that filters connection profiles listed in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value must + * be a string, a number, or a boolean. The comparison operator must be either + * =, !=, >, or <. For example, list connection profiles created this year by + * specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z**. You can + * also filter nested fields. For example, you could specify **mySql.username + * = %lt;my_username%gt;** to list all connection profiles configured to + * connect with a specific username. + * @param {string} request.orderBy + * A comma-separated list of fields to order results according to. + * @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 google.cloud.clouddms.v1.ConnectionProfile | ConnectionProfile} 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 `listConnectionProfilesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listConnectionProfilesStream( + request?: protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest, + 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['listConnectionProfiles']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listConnectionProfiles.createStream( + this.innerApiCalls.listConnectionProfiles as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listConnectionProfiles`, 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 which owns this collection of connection profiles. + * @param {number} request.pageSize + * The maximum number of connection profiles to return. The service may return + * fewer than this value. If unspecified, at most 50 connection profiles will + * be returned. The maximum value is 1000; values above 1000 are coerced + * to 1000. + * @param {string} request.pageToken + * A page token, received from a previous `ListConnectionProfiles` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListConnectionProfiles` + * must match the call that provided the page token. + * @param {string} request.filter + * A filter expression that filters connection profiles listed in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value must + * be a string, a number, or a boolean. The comparison operator must be either + * =, !=, >, or <. For example, list connection profiles created this year by + * specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z**. You can + * also filter nested fields. For example, you could specify **mySql.username + * = %lt;my_username%gt;** to list all connection profiles configured to + * connect with a specific username. + * @param {string} request.orderBy + * A comma-separated list of fields to order results according to. + * @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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.clouddms.v1.ConnectionProfile | ConnectionProfile}. 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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/data_migration_service.list_connection_profiles.js + * region_tag:datamigration_v1_generated_DataMigrationService_ListConnectionProfiles_async + */ + listConnectionProfilesAsync( + request?: protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest, + 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['listConnectionProfiles']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listConnectionProfiles.asyncIterate( + this.innerApiCalls['listConnectionProfiles'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Retrieves a list of private connections in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent that owns the collection of private connections. + * @param {number} request.pageSize + * Maximum number of private connections to return. + * If unspecified, at most 50 private connections that are returned. + * The maximum value is 1000; values above 1000 are coerced to 1000. + * @param {string} request.pageToken + * Page token received from a previous `ListPrivateConnections` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListPrivateConnections` must match the call that provided the page + * token. + * @param {string} request.filter + * A filter expression that filters private connections listed in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value must + * be a string, a number, or a boolean. The comparison operator must be either + * =, !=, >, or <. For example, list private connections created this year by + * specifying **createTime %gt; 2021-01-01T00:00:00.000000000Z**. + * @param {string} request.orderBy + * Order by fields for the result. + * @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 google.cloud.clouddms.v1.PrivateConnection | PrivateConnection}. + * 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 `listPrivateConnectionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listPrivateConnections( + request?: protos.google.cloud.clouddms.v1.IListPrivateConnectionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.clouddms.v1.IPrivateConnection[], + protos.google.cloud.clouddms.v1.IListPrivateConnectionsRequest | null, + protos.google.cloud.clouddms.v1.IListPrivateConnectionsResponse + ] + >; + listPrivateConnections( + request: protos.google.cloud.clouddms.v1.IListPrivateConnectionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.clouddms.v1.IListPrivateConnectionsRequest, + | protos.google.cloud.clouddms.v1.IListPrivateConnectionsResponse + | null + | undefined, + protos.google.cloud.clouddms.v1.IPrivateConnection + > + ): void; + listPrivateConnections( + request: protos.google.cloud.clouddms.v1.IListPrivateConnectionsRequest, + callback: PaginationCallback< + protos.google.cloud.clouddms.v1.IListPrivateConnectionsRequest, + | protos.google.cloud.clouddms.v1.IListPrivateConnectionsResponse + | null + | undefined, + protos.google.cloud.clouddms.v1.IPrivateConnection + > + ): void; + listPrivateConnections( + request?: protos.google.cloud.clouddms.v1.IListPrivateConnectionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.clouddms.v1.IListPrivateConnectionsRequest, + | protos.google.cloud.clouddms.v1.IListPrivateConnectionsResponse + | null + | undefined, + protos.google.cloud.clouddms.v1.IPrivateConnection + >, + callback?: PaginationCallback< + protos.google.cloud.clouddms.v1.IListPrivateConnectionsRequest, + | protos.google.cloud.clouddms.v1.IListPrivateConnectionsResponse + | null + | undefined, + protos.google.cloud.clouddms.v1.IPrivateConnection + > + ): Promise< + [ + protos.google.cloud.clouddms.v1.IPrivateConnection[], + protos.google.cloud.clouddms.v1.IListPrivateConnectionsRequest | null, + protos.google.cloud.clouddms.v1.IListPrivateConnectionsResponse + ] + > | 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(); + return this.innerApiCalls.listPrivateConnections( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent that owns the collection of private connections. + * @param {number} request.pageSize + * Maximum number of private connections to return. + * If unspecified, at most 50 private connections that are returned. + * The maximum value is 1000; values above 1000 are coerced to 1000. + * @param {string} request.pageToken + * Page token received from a previous `ListPrivateConnections` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListPrivateConnections` must match the call that provided the page + * token. + * @param {string} request.filter + * A filter expression that filters private connections listed in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value must + * be a string, a number, or a boolean. The comparison operator must be either + * =, !=, >, or <. For example, list private connections created this year by + * specifying **createTime %gt; 2021-01-01T00:00:00.000000000Z**. + * @param {string} request.orderBy + * Order by fields for the result. + * @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 google.cloud.clouddms.v1.PrivateConnection | PrivateConnection} 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 `listPrivateConnectionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listPrivateConnectionsStream( + request?: protos.google.cloud.clouddms.v1.IListPrivateConnectionsRequest, + 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['listPrivateConnections']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listPrivateConnections.createStream( + this.innerApiCalls.listPrivateConnections as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listPrivateConnections`, 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 that owns the collection of private connections. + * @param {number} request.pageSize + * Maximum number of private connections to return. + * If unspecified, at most 50 private connections that are returned. + * The maximum value is 1000; values above 1000 are coerced to 1000. + * @param {string} request.pageToken + * Page token received from a previous `ListPrivateConnections` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListPrivateConnections` must match the call that provided the page + * token. + * @param {string} request.filter + * A filter expression that filters private connections listed in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value must + * be a string, a number, or a boolean. The comparison operator must be either + * =, !=, >, or <. For example, list private connections created this year by + * specifying **createTime %gt; 2021-01-01T00:00:00.000000000Z**. + * @param {string} request.orderBy + * Order by fields for the result. + * @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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.clouddms.v1.PrivateConnection | PrivateConnection}. 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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/data_migration_service.list_private_connections.js + * region_tag:datamigration_v1_generated_DataMigrationService_ListPrivateConnections_async + */ + listPrivateConnectionsAsync( + request?: protos.google.cloud.clouddms.v1.IListPrivateConnectionsRequest, + 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['listPrivateConnections']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listPrivateConnections.asyncIterate( + this.innerApiCalls['listPrivateConnections'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists conversion workspaces in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent which owns this collection of conversion workspaces. + * @param {number} request.pageSize + * The maximum number of conversion workspaces to return. The service may + * return fewer than this value. If unspecified, at most 50 sets are returned. + * @param {string} request.pageToken + * The nextPageToken value received in the previous call to + * conversionWorkspaces.list, used in the subsequent request to retrieve the + * next page of results. On first call this should be left blank. When + * paginating, all other parameters provided to conversionWorkspaces.list must + * match the call that provided the page token. + * @param {string} request.filter + * A filter expression that filters conversion workspaces listed in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value must + * be a string, a number, or a boolean. The comparison operator must be either + * =, !=, >, or <. For example, list conversion workspaces created this year + * by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.** You can + * also filter nested fields. For example, you could specify + * **source.version = "12.c.1"** to select all conversion workspaces with + * source database version equal to 12.c.1. + * @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 google.cloud.clouddms.v1.ConversionWorkspace | ConversionWorkspace}. + * 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 `listConversionWorkspacesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listConversionWorkspaces( + request?: protos.google.cloud.clouddms.v1.IListConversionWorkspacesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.clouddms.v1.IConversionWorkspace[], + protos.google.cloud.clouddms.v1.IListConversionWorkspacesRequest | null, + protos.google.cloud.clouddms.v1.IListConversionWorkspacesResponse + ] + >; + listConversionWorkspaces( + request: protos.google.cloud.clouddms.v1.IListConversionWorkspacesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.clouddms.v1.IListConversionWorkspacesRequest, + | protos.google.cloud.clouddms.v1.IListConversionWorkspacesResponse + | null + | undefined, + protos.google.cloud.clouddms.v1.IConversionWorkspace + > + ): void; + listConversionWorkspaces( + request: protos.google.cloud.clouddms.v1.IListConversionWorkspacesRequest, + callback: PaginationCallback< + protos.google.cloud.clouddms.v1.IListConversionWorkspacesRequest, + | protos.google.cloud.clouddms.v1.IListConversionWorkspacesResponse + | null + | undefined, + protos.google.cloud.clouddms.v1.IConversionWorkspace + > + ): void; + listConversionWorkspaces( + request?: protos.google.cloud.clouddms.v1.IListConversionWorkspacesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.clouddms.v1.IListConversionWorkspacesRequest, + | protos.google.cloud.clouddms.v1.IListConversionWorkspacesResponse + | null + | undefined, + protos.google.cloud.clouddms.v1.IConversionWorkspace + >, + callback?: PaginationCallback< + protos.google.cloud.clouddms.v1.IListConversionWorkspacesRequest, + | protos.google.cloud.clouddms.v1.IListConversionWorkspacesResponse + | null + | undefined, + protos.google.cloud.clouddms.v1.IConversionWorkspace + > + ): Promise< + [ + protos.google.cloud.clouddms.v1.IConversionWorkspace[], + protos.google.cloud.clouddms.v1.IListConversionWorkspacesRequest | null, + protos.google.cloud.clouddms.v1.IListConversionWorkspacesResponse + ] + > | 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(); + return this.innerApiCalls.listConversionWorkspaces( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent which owns this collection of conversion workspaces. + * @param {number} request.pageSize + * The maximum number of conversion workspaces to return. The service may + * return fewer than this value. If unspecified, at most 50 sets are returned. + * @param {string} request.pageToken + * The nextPageToken value received in the previous call to + * conversionWorkspaces.list, used in the subsequent request to retrieve the + * next page of results. On first call this should be left blank. When + * paginating, all other parameters provided to conversionWorkspaces.list must + * match the call that provided the page token. + * @param {string} request.filter + * A filter expression that filters conversion workspaces listed in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value must + * be a string, a number, or a boolean. The comparison operator must be either + * =, !=, >, or <. For example, list conversion workspaces created this year + * by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.** You can + * also filter nested fields. For example, you could specify + * **source.version = "12.c.1"** to select all conversion workspaces with + * source database version equal to 12.c.1. + * @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 google.cloud.clouddms.v1.ConversionWorkspace | ConversionWorkspace} 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 `listConversionWorkspacesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listConversionWorkspacesStream( + request?: protos.google.cloud.clouddms.v1.IListConversionWorkspacesRequest, + 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['listConversionWorkspaces']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listConversionWorkspaces.createStream( + this.innerApiCalls.listConversionWorkspaces as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listConversionWorkspaces`, 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 which owns this collection of conversion workspaces. + * @param {number} request.pageSize + * The maximum number of conversion workspaces to return. The service may + * return fewer than this value. If unspecified, at most 50 sets are returned. + * @param {string} request.pageToken + * The nextPageToken value received in the previous call to + * conversionWorkspaces.list, used in the subsequent request to retrieve the + * next page of results. On first call this should be left blank. When + * paginating, all other parameters provided to conversionWorkspaces.list must + * match the call that provided the page token. + * @param {string} request.filter + * A filter expression that filters conversion workspaces listed in the + * response. The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value must + * be a string, a number, or a boolean. The comparison operator must be either + * =, !=, >, or <. For example, list conversion workspaces created this year + * by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.** You can + * also filter nested fields. For example, you could specify + * **source.version = "12.c.1"** to select all conversion workspaces with + * source database version equal to 12.c.1. + * @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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.clouddms.v1.ConversionWorkspace | ConversionWorkspace}. 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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/data_migration_service.list_conversion_workspaces.js + * region_tag:datamigration_v1_generated_DataMigrationService_ListConversionWorkspaces_async + */ + listConversionWorkspacesAsync( + request?: protos.google.cloud.clouddms.v1.IListConversionWorkspacesRequest, + 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({ - name: request.name ?? '', + parent: request.parent ?? '', }); + const defaultCallSettings = this._defaults['listConversionWorkspaces']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.innerApiCalls.deleteConnectionProfile( - request, - options, - callback - ); - } - /** - * Check the status of the long running operation returned by `deleteConnectionProfile()`. - * @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 - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example include:samples/generated/v1/data_migration_service.delete_connection_profile.js - * region_tag:datamigration_v1_generated_DataMigrationService_DeleteConnectionProfile_async - */ - async checkDeleteConnectionProfileProgress( - name: string - ): Promise< - LROperation< - protos.google.protobuf.Empty, - protos.google.cloud.clouddms.v1.OperationMetadata - > - > { - 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.deleteConnectionProfile, - this._gaxModule.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.protobuf.Empty, - protos.google.cloud.clouddms.v1.OperationMetadata - >; + return this.descriptors.page.listConversionWorkspaces.asyncIterate( + this.innerApiCalls['listConversionWorkspaces'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; } /** - * Lists migration jobs in a given project and location. + * Describes the database entities tree for a specific conversion workspace + * and a specific tree type. + * + * Database entities are not resources like conversion workspaces or mapping + * rules, and they can't be created, updated or deleted. Instead, they are + * simple data objects describing the structure of the client database. * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. The parent, which owns this collection of migrationJobs. + * @param {string} request.conversionWorkspace + * Required. Name of the conversion workspace resource whose database entities + * are described. Must be in the form of: + * projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}. * @param {number} request.pageSize - * The maximum number of migration jobs to return. The service may return - * fewer than this value. If unspecified, at most 50 migration jobs will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * The maximum number of entities to return. The service may return + * fewer entities than the value specifies. * @param {string} request.pageToken * The nextPageToken value received in the previous call to - * migrationJobs.list, used in the subsequent request to retrieve the next - * page of results. On first call this should be left blank. When paginating, - * all other parameters provided to migrationJobs.list must match the call - * that provided the page token. + * conversionWorkspace.describeDatabaseEntities, used in the subsequent + * request to retrieve the next page of results. On first call this should be + * left blank. When paginating, all other parameters provided to + * conversionWorkspace.describeDatabaseEntities must match the call that + * provided the page token. + * @param {google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest.DBTreeType} request.tree + * The tree to fetch. + * @param {boolean} request.uncommitted + * Whether to retrieve the latest committed version of the entities or the + * latest version. This field is ignored if a specific commit_id is specified. + * @param {string} request.commitId + * Request a specific commit ID. If not specified, the entities from the + * latest commit are returned. * @param {string} request.filter - * A filter expression that filters migration jobs listed in the response. - * The expression must specify the field name, a comparison operator, and the - * value that you want to use for filtering. The value must be a string, - * a number, or a boolean. The comparison operator must be - * either =, !=, >, or <. For example, list migration jobs created this year - * by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.** - * You can also filter nested fields. For example, you could specify - * **reverseSshConnectivity.vmIp = "1.2.3.4"** to select all migration - * jobs connecting through the specific SSH tunnel bastion. - * @param {string} request.orderBy - * Sort the results based on the migration job name. - * Valid values are: "name", "name asc", and "name desc". + * Filter the returned entities based on AIP-160 standard. * @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 google.cloud.clouddms.v1.MigrationJob | MigrationJob}. + * The first element of the array is Array of {@link google.cloud.clouddms.v1.DatabaseEntity | DatabaseEntity}. * 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 `listMigrationJobsAsync()` + * We recommend using `describeDatabaseEntitiesAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listMigrationJobs( - request?: protos.google.cloud.clouddms.v1.IListMigrationJobsRequest, + describeDatabaseEntities( + request?: protos.google.cloud.clouddms.v1.IDescribeDatabaseEntitiesRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.clouddms.v1.IMigrationJob[], - protos.google.cloud.clouddms.v1.IListMigrationJobsRequest | null, - protos.google.cloud.clouddms.v1.IListMigrationJobsResponse + protos.google.cloud.clouddms.v1.IDatabaseEntity[], + protos.google.cloud.clouddms.v1.IDescribeDatabaseEntitiesRequest | null, + protos.google.cloud.clouddms.v1.IDescribeDatabaseEntitiesResponse ] >; - listMigrationJobs( - request: protos.google.cloud.clouddms.v1.IListMigrationJobsRequest, + describeDatabaseEntities( + request: protos.google.cloud.clouddms.v1.IDescribeDatabaseEntitiesRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.clouddms.v1.IListMigrationJobsRequest, - | protos.google.cloud.clouddms.v1.IListMigrationJobsResponse + protos.google.cloud.clouddms.v1.IDescribeDatabaseEntitiesRequest, + | protos.google.cloud.clouddms.v1.IDescribeDatabaseEntitiesResponse | null | undefined, - protos.google.cloud.clouddms.v1.IMigrationJob + protos.google.cloud.clouddms.v1.IDatabaseEntity > ): void; - listMigrationJobs( - request: protos.google.cloud.clouddms.v1.IListMigrationJobsRequest, + describeDatabaseEntities( + request: protos.google.cloud.clouddms.v1.IDescribeDatabaseEntitiesRequest, callback: PaginationCallback< - protos.google.cloud.clouddms.v1.IListMigrationJobsRequest, - | protos.google.cloud.clouddms.v1.IListMigrationJobsResponse + protos.google.cloud.clouddms.v1.IDescribeDatabaseEntitiesRequest, + | protos.google.cloud.clouddms.v1.IDescribeDatabaseEntitiesResponse | null | undefined, - protos.google.cloud.clouddms.v1.IMigrationJob + protos.google.cloud.clouddms.v1.IDatabaseEntity > ): void; - listMigrationJobs( - request?: protos.google.cloud.clouddms.v1.IListMigrationJobsRequest, + describeDatabaseEntities( + request?: protos.google.cloud.clouddms.v1.IDescribeDatabaseEntitiesRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.cloud.clouddms.v1.IListMigrationJobsRequest, - | protos.google.cloud.clouddms.v1.IListMigrationJobsResponse + protos.google.cloud.clouddms.v1.IDescribeDatabaseEntitiesRequest, + | protos.google.cloud.clouddms.v1.IDescribeDatabaseEntitiesResponse | null | undefined, - protos.google.cloud.clouddms.v1.IMigrationJob + protos.google.cloud.clouddms.v1.IDatabaseEntity >, callback?: PaginationCallback< - protos.google.cloud.clouddms.v1.IListMigrationJobsRequest, - | protos.google.cloud.clouddms.v1.IListMigrationJobsResponse + protos.google.cloud.clouddms.v1.IDescribeDatabaseEntitiesRequest, + | protos.google.cloud.clouddms.v1.IDescribeDatabaseEntitiesResponse | null | undefined, - protos.google.cloud.clouddms.v1.IMigrationJob + protos.google.cloud.clouddms.v1.IDatabaseEntity > ): Promise< [ - protos.google.cloud.clouddms.v1.IMigrationJob[], - protos.google.cloud.clouddms.v1.IListMigrationJobsRequest | null, - protos.google.cloud.clouddms.v1.IListMigrationJobsResponse + protos.google.cloud.clouddms.v1.IDatabaseEntity[], + protos.google.cloud.clouddms.v1.IDescribeDatabaseEntitiesRequest | null, + protos.google.cloud.clouddms.v1.IDescribeDatabaseEntitiesResponse ] > | void { request = request || {}; @@ -2726,56 +6017,58 @@ export class DataMigrationServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', + conversion_workspace: request.conversionWorkspace ?? '', }); this.initialize(); - return this.innerApiCalls.listMigrationJobs(request, options, callback); + return this.innerApiCalls.describeDatabaseEntities( + request, + options, + callback + ); } /** * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. The parent, which owns this collection of migrationJobs. + * @param {string} request.conversionWorkspace + * Required. Name of the conversion workspace resource whose database entities + * are described. Must be in the form of: + * projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}. * @param {number} request.pageSize - * The maximum number of migration jobs to return. The service may return - * fewer than this value. If unspecified, at most 50 migration jobs will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * The maximum number of entities to return. The service may return + * fewer entities than the value specifies. * @param {string} request.pageToken * The nextPageToken value received in the previous call to - * migrationJobs.list, used in the subsequent request to retrieve the next - * page of results. On first call this should be left blank. When paginating, - * all other parameters provided to migrationJobs.list must match the call - * that provided the page token. + * conversionWorkspace.describeDatabaseEntities, used in the subsequent + * request to retrieve the next page of results. On first call this should be + * left blank. When paginating, all other parameters provided to + * conversionWorkspace.describeDatabaseEntities must match the call that + * provided the page token. + * @param {google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest.DBTreeType} request.tree + * The tree to fetch. + * @param {boolean} request.uncommitted + * Whether to retrieve the latest committed version of the entities or the + * latest version. This field is ignored if a specific commit_id is specified. + * @param {string} request.commitId + * Request a specific commit ID. If not specified, the entities from the + * latest commit are returned. * @param {string} request.filter - * A filter expression that filters migration jobs listed in the response. - * The expression must specify the field name, a comparison operator, and the - * value that you want to use for filtering. The value must be a string, - * a number, or a boolean. The comparison operator must be - * either =, !=, >, or <. For example, list migration jobs created this year - * by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.** - * You can also filter nested fields. For example, you could specify - * **reverseSshConnectivity.vmIp = "1.2.3.4"** to select all migration - * jobs connecting through the specific SSH tunnel bastion. - * @param {string} request.orderBy - * Sort the results based on the migration job name. - * Valid values are: "name", "name asc", and "name desc". + * Filter the returned entities based on AIP-160 standard. * @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 google.cloud.clouddms.v1.MigrationJob | MigrationJob} on 'data' event. + * An object stream which emits an object representing {@link google.cloud.clouddms.v1.DatabaseEntity | DatabaseEntity} 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 `listMigrationJobsAsync()` + * We recommend using `describeDatabaseEntitiesAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listMigrationJobsStream( - request?: protos.google.cloud.clouddms.v1.IListMigrationJobsRequest, + describeDatabaseEntitiesStream( + request?: protos.google.cloud.clouddms.v1.IDescribeDatabaseEntitiesRequest, options?: CallOptions ): Transform { request = request || {}; @@ -2784,181 +6077,162 @@ export class DataMigrationServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', + conversion_workspace: request.conversionWorkspace ?? '', }); - const defaultCallSettings = this._defaults['listMigrationJobs']; + const defaultCallSettings = this._defaults['describeDatabaseEntities']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listMigrationJobs.createStream( - this.innerApiCalls.listMigrationJobs as GaxCall, + return this.descriptors.page.describeDatabaseEntities.createStream( + this.innerApiCalls.describeDatabaseEntities as GaxCall, request, callSettings ); } /** - * Equivalent to `listMigrationJobs`, but returns an iterable object. + * Equivalent to `describeDatabaseEntities`, 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, which owns this collection of migrationJobs. + * @param {string} request.conversionWorkspace + * Required. Name of the conversion workspace resource whose database entities + * are described. Must be in the form of: + * projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}. * @param {number} request.pageSize - * The maximum number of migration jobs to return. The service may return - * fewer than this value. If unspecified, at most 50 migration jobs will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * The maximum number of entities to return. The service may return + * fewer entities than the value specifies. * @param {string} request.pageToken * The nextPageToken value received in the previous call to - * migrationJobs.list, used in the subsequent request to retrieve the next - * page of results. On first call this should be left blank. When paginating, - * all other parameters provided to migrationJobs.list must match the call - * that provided the page token. + * conversionWorkspace.describeDatabaseEntities, used in the subsequent + * request to retrieve the next page of results. On first call this should be + * left blank. When paginating, all other parameters provided to + * conversionWorkspace.describeDatabaseEntities must match the call that + * provided the page token. + * @param {google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest.DBTreeType} request.tree + * The tree to fetch. + * @param {boolean} request.uncommitted + * Whether to retrieve the latest committed version of the entities or the + * latest version. This field is ignored if a specific commit_id is specified. + * @param {string} request.commitId + * Request a specific commit ID. If not specified, the entities from the + * latest commit are returned. * @param {string} request.filter - * A filter expression that filters migration jobs listed in the response. - * The expression must specify the field name, a comparison operator, and the - * value that you want to use for filtering. The value must be a string, - * a number, or a boolean. The comparison operator must be - * either =, !=, >, or <. For example, list migration jobs created this year - * by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.** - * You can also filter nested fields. For example, you could specify - * **reverseSshConnectivity.vmIp = "1.2.3.4"** to select all migration - * jobs connecting through the specific SSH tunnel bastion. - * @param {string} request.orderBy - * Sort the results based on the migration job name. - * Valid values are: "name", "name asc", and "name desc". + * Filter the returned entities based on AIP-160 standard. * @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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.cloud.clouddms.v1.MigrationJob | MigrationJob}. The API will be called under the hood as needed, once per the page, + * {@link google.cloud.clouddms.v1.DatabaseEntity | DatabaseEntity}. 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 * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1/data_migration_service.list_migration_jobs.js - * region_tag:datamigration_v1_generated_DataMigrationService_ListMigrationJobs_async + * @example include:samples/generated/v1/data_migration_service.describe_database_entities.js + * region_tag:datamigration_v1_generated_DataMigrationService_DescribeDatabaseEntities_async */ - listMigrationJobsAsync( - request?: protos.google.cloud.clouddms.v1.IListMigrationJobsRequest, + describeDatabaseEntitiesAsync( + request?: protos.google.cloud.clouddms.v1.IDescribeDatabaseEntitiesRequest, options?: CallOptions - ): AsyncIterable { + ): 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 ?? '', + conversion_workspace: request.conversionWorkspace ?? '', }); - const defaultCallSettings = this._defaults['listMigrationJobs']; + const defaultCallSettings = this._defaults['describeDatabaseEntities']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listMigrationJobs.asyncIterate( - this.innerApiCalls['listMigrationJobs'] as GaxCall, + return this.descriptors.page.describeDatabaseEntities.asyncIterate( + this.innerApiCalls['describeDatabaseEntities'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Retrieve a list of all connection profiles in a given project and location. + * Fetches a set of static IP addresses that need to be allowlisted by the + * customer when using the static-IP connectivity method. * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. The parent, which owns this collection of connection profiles. + * @param {string} request.name + * Required. The resource name for the location for which static IPs should be + * returned. Must be in the format `projects/* /locations/*`. * @param {number} request.pageSize - * The maximum number of connection profiles to return. The service may return - * fewer than this value. If unspecified, at most 50 connection profiles will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. + * Maximum number of IPs to return. * @param {string} request.pageToken - * A page token, received from a previous `ListConnectionProfiles` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListConnectionProfiles` - * must match the call that provided the page token. - * @param {string} request.filter - * A filter expression that filters connection profiles listed in the - * response. The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value must - * be a string, a number, or a boolean. The comparison operator must be either - * =, !=, >, or <. For example, list connection profiles created this year by - * specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z**. You can - * also filter nested fields. For example, you could specify **mySql.username - * = %lt;my_username%gt;** to list all connection profiles configured to - * connect with a specific username. - * @param {string} request.orderBy - * the order by fields for the result. + * A page token, received from a previous `FetchStaticIps` call. * @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 google.cloud.clouddms.v1.ConnectionProfile | ConnectionProfile}. + * The first element of the array is Array of string. * 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 `listConnectionProfilesAsync()` + * We recommend using `fetchStaticIpsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listConnectionProfiles( - request?: protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest, + fetchStaticIps( + request?: protos.google.cloud.clouddms.v1.IFetchStaticIpsRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.clouddms.v1.IConnectionProfile[], - protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest | null, - protos.google.cloud.clouddms.v1.IListConnectionProfilesResponse + string[], + protos.google.cloud.clouddms.v1.IFetchStaticIpsRequest | null, + protos.google.cloud.clouddms.v1.IFetchStaticIpsResponse ] >; - listConnectionProfiles( - request: protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest, + fetchStaticIps( + request: protos.google.cloud.clouddms.v1.IFetchStaticIpsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest, - | protos.google.cloud.clouddms.v1.IListConnectionProfilesResponse + protos.google.cloud.clouddms.v1.IFetchStaticIpsRequest, + | protos.google.cloud.clouddms.v1.IFetchStaticIpsResponse | null | undefined, - protos.google.cloud.clouddms.v1.IConnectionProfile + string > ): void; - listConnectionProfiles( - request: protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest, + fetchStaticIps( + request: protos.google.cloud.clouddms.v1.IFetchStaticIpsRequest, callback: PaginationCallback< - protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest, - | protos.google.cloud.clouddms.v1.IListConnectionProfilesResponse + protos.google.cloud.clouddms.v1.IFetchStaticIpsRequest, + | protos.google.cloud.clouddms.v1.IFetchStaticIpsResponse | null | undefined, - protos.google.cloud.clouddms.v1.IConnectionProfile + string > ): void; - listConnectionProfiles( - request?: protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest, + fetchStaticIps( + request?: protos.google.cloud.clouddms.v1.IFetchStaticIpsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest, - | protos.google.cloud.clouddms.v1.IListConnectionProfilesResponse + protos.google.cloud.clouddms.v1.IFetchStaticIpsRequest, + | protos.google.cloud.clouddms.v1.IFetchStaticIpsResponse | null | undefined, - protos.google.cloud.clouddms.v1.IConnectionProfile + string >, callback?: PaginationCallback< - protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest, - | protos.google.cloud.clouddms.v1.IListConnectionProfilesResponse + protos.google.cloud.clouddms.v1.IFetchStaticIpsRequest, + | protos.google.cloud.clouddms.v1.IFetchStaticIpsResponse | null | undefined, - protos.google.cloud.clouddms.v1.IConnectionProfile + string > ): Promise< [ - protos.google.cloud.clouddms.v1.IConnectionProfile[], - protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest | null, - protos.google.cloud.clouddms.v1.IListConnectionProfilesResponse + string[], + protos.google.cloud.clouddms.v1.IFetchStaticIpsRequest | null, + protos.google.cloud.clouddms.v1.IFetchStaticIpsResponse ] > | void { request = request || {}; @@ -2974,59 +6248,37 @@ export class DataMigrationServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', + name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.listConnectionProfiles( - request, - options, - callback - ); + return this.innerApiCalls.fetchStaticIps(request, options, callback); } - /** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent, which owns this collection of connection profiles. - * @param {number} request.pageSize - * The maximum number of connection profiles to return. The service may return - * fewer than this value. If unspecified, at most 50 connection profiles will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. - * @param {string} request.pageToken - * A page token, received from a previous `ListConnectionProfiles` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListConnectionProfiles` - * must match the call that provided the page token. - * @param {string} request.filter - * A filter expression that filters connection profiles listed in the - * response. The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value must - * be a string, a number, or a boolean. The comparison operator must be either - * =, !=, >, or <. For example, list connection profiles created this year by - * specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z**. You can - * also filter nested fields. For example, you could specify **mySql.username - * = %lt;my_username%gt;** to list all connection profiles configured to - * connect with a specific username. - * @param {string} request.orderBy - * the order by fields for the result. + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name for the location for which static IPs should be + * returned. Must be in the format `projects/* /locations/*`. + * @param {number} request.pageSize + * Maximum number of IPs to return. + * @param {string} request.pageToken + * A page token, received from a previous `FetchStaticIps` call. * @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 google.cloud.clouddms.v1.ConnectionProfile | ConnectionProfile} on 'data' event. + * An object stream which emits an object representing string 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 `listConnectionProfilesAsync()` + * We recommend using `fetchStaticIpsAsync()` * method described below for async iteration which you can stop as needed. * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ - listConnectionProfilesStream( - request?: protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest, + fetchStaticIpsStream( + request?: protos.google.cloud.clouddms.v1.IFetchStaticIpsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -3035,83 +6287,460 @@ export class DataMigrationServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', + name: request.name ?? '', }); - const defaultCallSettings = this._defaults['listConnectionProfiles']; + const defaultCallSettings = this._defaults['fetchStaticIps']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listConnectionProfiles.createStream( - this.innerApiCalls.listConnectionProfiles as GaxCall, + return this.descriptors.page.fetchStaticIps.createStream( + this.innerApiCalls.fetchStaticIps as GaxCall, request, callSettings ); } /** - * Equivalent to `listConnectionProfiles`, but returns an iterable object. + * Equivalent to `fetchStaticIps`, 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, which owns this collection of connection profiles. + * @param {string} request.name + * Required. The resource name for the location for which static IPs should be + * returned. Must be in the format `projects/* /locations/*`. * @param {number} request.pageSize - * The maximum number of connection profiles to return. The service may return - * fewer than this value. If unspecified, at most 50 connection profiles will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. + * Maximum number of IPs to return. * @param {string} request.pageToken - * A page token, received from a previous `ListConnectionProfiles` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListConnectionProfiles` - * must match the call that provided the page token. - * @param {string} request.filter - * A filter expression that filters connection profiles listed in the - * response. The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value must - * be a string, a number, or a boolean. The comparison operator must be either - * =, !=, >, or <. For example, list connection profiles created this year by - * specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z**. You can - * also filter nested fields. For example, you could specify **mySql.username - * = %lt;my_username%gt;** to list all connection profiles configured to - * connect with a specific username. - * @param {string} request.orderBy - * the order by fields for the result. + * A page token, received from a previous `FetchStaticIps` call. * @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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). * When you iterate the returned iterable, each element will be an object representing - * {@link google.cloud.clouddms.v1.ConnectionProfile | ConnectionProfile}. The API will be called under the hood as needed, once per the page, + * string. 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 * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example include:samples/generated/v1/data_migration_service.list_connection_profiles.js - * region_tag:datamigration_v1_generated_DataMigrationService_ListConnectionProfiles_async + * @example include:samples/generated/v1/data_migration_service.fetch_static_ips.js + * region_tag:datamigration_v1_generated_DataMigrationService_FetchStaticIps_async */ - listConnectionProfilesAsync( - request?: protos.google.cloud.clouddms.v1.IListConnectionProfilesRequest, + fetchStaticIpsAsync( + request?: protos.google.cloud.clouddms.v1.IFetchStaticIpsRequest, options?: CallOptions - ): AsyncIterable { + ): 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 ?? '', + name: request.name ?? '', }); - const defaultCallSettings = this._defaults['listConnectionProfiles']; + const defaultCallSettings = this._defaults['fetchStaticIps']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listConnectionProfiles.asyncIterate( - this.innerApiCalls['listConnectionProfiles'] as GaxCall, + return this.descriptors.page.fetchStaticIps.asyncIterate( + this.innerApiCalls['fetchStaticIps'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; + } + /** + * Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {Object} [request.options] + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * + * This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | GetPolicyOptions}. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.Policy | Policy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.Policy | Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: IamProtos.google.iam.v1.GetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.getIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + setIamPolicy( + request: IamProtos.google.iam.v1.SetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.setIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + */ + testIamPermissions( + request: IamProtos.google.iam.v1.TestIamPermissionsRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.testIamPermissions(request, options, callback); + } + + /** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @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 google.cloud.location.Location | Location}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + + /** + * Lists information about the supported locations for this service. 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.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list 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} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.Location | Location}. 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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); } + // -------------------- // -- Path templates -- // -------------------- @@ -3177,6 +6806,67 @@ export class DataMigrationServiceClient { ).connection_profile; } + /** + * Return a fully-qualified conversionWorkspace resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} conversion_workspace + * @returns {string} Resource name string. + */ + conversionWorkspacePath( + project: string, + location: string, + conversionWorkspace: string + ) { + return this.pathTemplates.conversionWorkspacePathTemplate.render({ + project: project, + location: location, + conversion_workspace: conversionWorkspace, + }); + } + + /** + * Parse the project from ConversionWorkspace resource. + * + * @param {string} conversionWorkspaceName + * A fully-qualified path representing ConversionWorkspace resource. + * @returns {string} A string representing the project. + */ + matchProjectFromConversionWorkspaceName(conversionWorkspaceName: string) { + return this.pathTemplates.conversionWorkspacePathTemplate.match( + conversionWorkspaceName + ).project; + } + + /** + * Parse the location from ConversionWorkspace resource. + * + * @param {string} conversionWorkspaceName + * A fully-qualified path representing ConversionWorkspace resource. + * @returns {string} A string representing the location. + */ + matchLocationFromConversionWorkspaceName(conversionWorkspaceName: string) { + return this.pathTemplates.conversionWorkspacePathTemplate.match( + conversionWorkspaceName + ).location; + } + + /** + * Parse the conversion_workspace from ConversionWorkspace resource. + * + * @param {string} conversionWorkspaceName + * A fully-qualified path representing ConversionWorkspace resource. + * @returns {string} A string representing the conversion_workspace. + */ + matchConversionWorkspaceFromConversionWorkspaceName( + conversionWorkspaceName: string + ) { + return this.pathTemplates.conversionWorkspacePathTemplate.match( + conversionWorkspaceName + ).conversion_workspace; + } + /** * Return a fully-qualified location resource name string. * @@ -3265,6 +6955,67 @@ export class DataMigrationServiceClient { .migration_job; } + /** + * Return a fully-qualified privateConnection resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} private_connection + * @returns {string} Resource name string. + */ + privateConnectionPath( + project: string, + location: string, + privateConnection: string + ) { + return this.pathTemplates.privateConnectionPathTemplate.render({ + project: project, + location: location, + private_connection: privateConnection, + }); + } + + /** + * Parse the project from PrivateConnection resource. + * + * @param {string} privateConnectionName + * A fully-qualified path representing PrivateConnection resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPrivateConnectionName(privateConnectionName: string) { + return this.pathTemplates.privateConnectionPathTemplate.match( + privateConnectionName + ).project; + } + + /** + * Parse the location from PrivateConnection resource. + * + * @param {string} privateConnectionName + * A fully-qualified path representing PrivateConnection resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPrivateConnectionName(privateConnectionName: string) { + return this.pathTemplates.privateConnectionPathTemplate.match( + privateConnectionName + ).location; + } + + /** + * Parse the private_connection from PrivateConnection resource. + * + * @param {string} privateConnectionName + * A fully-qualified path representing PrivateConnection resource. + * @returns {string} A string representing the private_connection. + */ + matchPrivateConnectionFromPrivateConnectionName( + privateConnectionName: string + ) { + return this.pathTemplates.privateConnectionPathTemplate.match( + privateConnectionName + ).private_connection; + } + /** * Return a fully-qualified project resource name string. * @@ -3299,6 +7050,8 @@ export class DataMigrationServiceClient { return this.dataMigrationServiceStub.then(stub => { this._terminated = true; stub.close(); + this.iamClient.close(); + this.locationsClient.close(); this.operationsClient.close(); }); } diff --git a/packages/google-cloud-clouddms/src/v1/data_migration_service_client_config.json b/packages/google-cloud-clouddms/src/v1/data_migration_service_client_config.json index 33c9e3a8686..8e34da8c8c8 100644 --- a/packages/google-cloud-clouddms/src/v1/data_migration_service_client_config.json +++ b/packages/google-cloud-clouddms/src/v1/data_migration_service_client_config.json @@ -104,6 +104,101 @@ "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" + }, + "CreatePrivateConnection": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetPrivateConnection": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListPrivateConnections": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeletePrivateConnection": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetConversionWorkspace": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListConversionWorkspaces": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateConversionWorkspace": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateConversionWorkspace": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteConversionWorkspace": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SeedConversionWorkspace": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ImportMappingRules": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ConvertConversionWorkspace": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CommitConversionWorkspace": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RollbackConversionWorkspace": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ApplyConversionWorkspace": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DescribeDatabaseEntities": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SearchBackgroundJobs": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DescribeConversionWorkspaceRevisions": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "FetchStaticIps": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" } } } diff --git a/packages/google-cloud-clouddms/src/v1/data_migration_service_proto_list.json b/packages/google-cloud-clouddms/src/v1/data_migration_service_proto_list.json index 888fb46fae1..9617525e5a5 100644 --- a/packages/google-cloud-clouddms/src/v1/data_migration_service_proto_list.json +++ b/packages/google-cloud-clouddms/src/v1/data_migration_service_proto_list.json @@ -1,4 +1,5 @@ [ "../../protos/google/cloud/clouddms/v1/clouddms.proto", - "../../protos/google/cloud/clouddms/v1/clouddms_resources.proto" + "../../protos/google/cloud/clouddms/v1/clouddms_resources.proto", + "../../protos/google/cloud/clouddms/v1/conversionworkspace_resources.proto" ] diff --git a/packages/google-cloud-clouddms/src/v1/gapic_metadata.json b/packages/google-cloud-clouddms/src/v1/gapic_metadata.json index a50466d0076..b6a2e2f6715 100644 --- a/packages/google-cloud-clouddms/src/v1/gapic_metadata.json +++ b/packages/google-cloud-clouddms/src/v1/gapic_metadata.json @@ -25,6 +25,26 @@ "getConnectionProfile" ] }, + "GetPrivateConnection": { + "methods": [ + "getPrivateConnection" + ] + }, + "GetConversionWorkspace": { + "methods": [ + "getConversionWorkspace" + ] + }, + "SearchBackgroundJobs": { + "methods": [ + "searchBackgroundJobs" + ] + }, + "DescribeConversionWorkspaceRevisions": { + "methods": [ + "describeConversionWorkspaceRevisions" + ] + }, "CreateMigrationJob": { "methods": [ "createMigrationJob" @@ -85,6 +105,61 @@ "deleteConnectionProfile" ] }, + "CreatePrivateConnection": { + "methods": [ + "createPrivateConnection" + ] + }, + "DeletePrivateConnection": { + "methods": [ + "deletePrivateConnection" + ] + }, + "CreateConversionWorkspace": { + "methods": [ + "createConversionWorkspace" + ] + }, + "UpdateConversionWorkspace": { + "methods": [ + "updateConversionWorkspace" + ] + }, + "DeleteConversionWorkspace": { + "methods": [ + "deleteConversionWorkspace" + ] + }, + "SeedConversionWorkspace": { + "methods": [ + "seedConversionWorkspace" + ] + }, + "ImportMappingRules": { + "methods": [ + "importMappingRules" + ] + }, + "ConvertConversionWorkspace": { + "methods": [ + "convertConversionWorkspace" + ] + }, + "CommitConversionWorkspace": { + "methods": [ + "commitConversionWorkspace" + ] + }, + "RollbackConversionWorkspace": { + "methods": [ + "rollbackConversionWorkspace" + ] + }, + "ApplyConversionWorkspace": { + "methods": [ + "applyConversionWorkspace" + ] + }, "ListMigrationJobs": { "methods": [ "listMigrationJobs", @@ -98,6 +173,34 @@ "listConnectionProfilesStream", "listConnectionProfilesAsync" ] + }, + "ListPrivateConnections": { + "methods": [ + "listPrivateConnections", + "listPrivateConnectionsStream", + "listPrivateConnectionsAsync" + ] + }, + "ListConversionWorkspaces": { + "methods": [ + "listConversionWorkspaces", + "listConversionWorkspacesStream", + "listConversionWorkspacesAsync" + ] + }, + "DescribeDatabaseEntities": { + "methods": [ + "describeDatabaseEntities", + "describeDatabaseEntitiesStream", + "describeDatabaseEntitiesAsync" + ] + }, + "FetchStaticIps": { + "methods": [ + "fetchStaticIps", + "fetchStaticIpsStream", + "fetchStaticIpsAsync" + ] } } }, @@ -119,6 +222,26 @@ "getConnectionProfile" ] }, + "GetPrivateConnection": { + "methods": [ + "getPrivateConnection" + ] + }, + "GetConversionWorkspace": { + "methods": [ + "getConversionWorkspace" + ] + }, + "SearchBackgroundJobs": { + "methods": [ + "searchBackgroundJobs" + ] + }, + "DescribeConversionWorkspaceRevisions": { + "methods": [ + "describeConversionWorkspaceRevisions" + ] + }, "CreateMigrationJob": { "methods": [ "createMigrationJob" @@ -179,6 +302,61 @@ "deleteConnectionProfile" ] }, + "CreatePrivateConnection": { + "methods": [ + "createPrivateConnection" + ] + }, + "DeletePrivateConnection": { + "methods": [ + "deletePrivateConnection" + ] + }, + "CreateConversionWorkspace": { + "methods": [ + "createConversionWorkspace" + ] + }, + "UpdateConversionWorkspace": { + "methods": [ + "updateConversionWorkspace" + ] + }, + "DeleteConversionWorkspace": { + "methods": [ + "deleteConversionWorkspace" + ] + }, + "SeedConversionWorkspace": { + "methods": [ + "seedConversionWorkspace" + ] + }, + "ImportMappingRules": { + "methods": [ + "importMappingRules" + ] + }, + "ConvertConversionWorkspace": { + "methods": [ + "convertConversionWorkspace" + ] + }, + "CommitConversionWorkspace": { + "methods": [ + "commitConversionWorkspace" + ] + }, + "RollbackConversionWorkspace": { + "methods": [ + "rollbackConversionWorkspace" + ] + }, + "ApplyConversionWorkspace": { + "methods": [ + "applyConversionWorkspace" + ] + }, "ListMigrationJobs": { "methods": [ "listMigrationJobs", @@ -192,6 +370,34 @@ "listConnectionProfilesStream", "listConnectionProfilesAsync" ] + }, + "ListPrivateConnections": { + "methods": [ + "listPrivateConnections", + "listPrivateConnectionsStream", + "listPrivateConnectionsAsync" + ] + }, + "ListConversionWorkspaces": { + "methods": [ + "listConversionWorkspaces", + "listConversionWorkspacesStream", + "listConversionWorkspacesAsync" + ] + }, + "DescribeDatabaseEntities": { + "methods": [ + "describeDatabaseEntities", + "describeDatabaseEntitiesStream", + "describeDatabaseEntitiesAsync" + ] + }, + "FetchStaticIps": { + "methods": [ + "fetchStaticIps", + "fetchStaticIpsStream", + "fetchStaticIpsAsync" + ] } } } diff --git a/packages/google-cloud-clouddms/test/gapic_data_migration_service_v1.ts b/packages/google-cloud-clouddms/test/gapic_data_migration_service_v1.ts index 1e519637adf..2983ee96829 100644 --- a/packages/google-cloud-clouddms/test/gapic_data_migration_service_v1.ts +++ b/packages/google-cloud-clouddms/test/gapic_data_migration_service_v1.ts @@ -25,7 +25,13 @@ import * as datamigrationserviceModule from '../src'; import {PassThrough} from 'stream'; -import {protobuf, LROperation, operationsProtos} from 'google-gax'; +import { + protobuf, + LROperation, + operationsProtos, + IamProtos, + LocationProtos, +} from 'google-gax'; // Dynamically loaded proto JSON is needed to get the type information // to fill in default values for request objects @@ -670,8 +676,8 @@ describe('v1.DataMigrationServiceClient', () => { }); }); - describe('createMigrationJob', () => { - it('invokes createMigrationJob without error', async () => { + describe('getPrivateConnection', () => { + it('invokes getPrivateConnection without error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -679,33 +685,32 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.CreateMigrationJobRequest() + new protos.google.cloud.clouddms.v1.GetPrivateConnectionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.CreateMigrationJobRequest', - ['parent'] + '.google.cloud.clouddms.v1.GetPrivateConnectionRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.clouddms.v1.PrivateConnection() ); - client.innerApiCalls.createMigrationJob = - stubLongRunningCall(expectedResponse); - const [operation] = await client.createMigrationJob(request); - const [response] = await operation.promise(); + client.innerApiCalls.getPrivateConnection = + stubSimpleCall(expectedResponse); + const [response] = await client.getPrivateConnection(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createMigrationJob as SinonStub + client.innerApiCalls.getPrivateConnection as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createMigrationJob as SinonStub + client.innerApiCalls.getPrivateConnection as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createMigrationJob without error using callback', async () => { + it('invokes getPrivateConnection without error using callback', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -713,28 +718,25 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.CreateMigrationJobRequest() + new protos.google.cloud.clouddms.v1.GetPrivateConnectionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.CreateMigrationJobRequest', - ['parent'] + '.google.cloud.clouddms.v1.GetPrivateConnectionRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.clouddms.v1.PrivateConnection() ); - client.innerApiCalls.createMigrationJob = - stubLongRunningCallWithCallback(expectedResponse); + client.innerApiCalls.getPrivateConnection = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.createMigrationJob( + client.getPrivateConnection( request, ( err?: Error | null, - result?: LROperation< - protos.google.cloud.clouddms.v1.IMigrationJob, - protos.google.cloud.clouddms.v1.IOperationMetadata - > | null + result?: protos.google.cloud.clouddms.v1.IPrivateConnection | null ) => { if (err) { reject(err); @@ -744,23 +746,19 @@ describe('v1.DataMigrationServiceClient', () => { } ); }); - const operation = (await promise) as LROperation< - protos.google.cloud.clouddms.v1.IMigrationJob, - protos.google.cloud.clouddms.v1.IOperationMetadata - >; - const [response] = await operation.promise(); + const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createMigrationJob as SinonStub + client.innerApiCalls.getPrivateConnection as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createMigrationJob as SinonStub + client.innerApiCalls.getPrivateConnection as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createMigrationJob with call error', async () => { + it('invokes getPrivateConnection with error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -768,31 +766,31 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.CreateMigrationJobRequest() + new protos.google.cloud.clouddms.v1.GetPrivateConnectionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.CreateMigrationJobRequest', - ['parent'] + '.google.cloud.clouddms.v1.GetPrivateConnectionRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.createMigrationJob = stubLongRunningCall( + client.innerApiCalls.getPrivateConnection = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.createMigrationJob(request), expectedError); + await assert.rejects(client.getPrivateConnection(request), expectedError); const actualRequest = ( - client.innerApiCalls.createMigrationJob as SinonStub + client.innerApiCalls.getPrivateConnection as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createMigrationJob as SinonStub + client.innerApiCalls.getPrivateConnection as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createMigrationJob with LRO error', async () => { + it('invokes getPrivateConnection with closed client', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -800,78 +798,162 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.CreateMigrationJobRequest() + new protos.google.cloud.clouddms.v1.GetPrivateConnectionRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.CreateMigrationJobRequest', - ['parent'] + '.google.cloud.clouddms.v1.GetPrivateConnectionRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createMigrationJob = stubLongRunningCall( - undefined, - undefined, - expectedError + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getPrivateConnection(request), expectedError); + }); + }); + + describe('getConversionWorkspace', () => { + it('invokes getConversionWorkspace without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.GetConversionWorkspaceRequest() ); - const [operation] = await client.createMigrationJob(request); - await assert.rejects(operation.promise(), expectedError); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.GetConversionWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ConversionWorkspace() + ); + client.innerApiCalls.getConversionWorkspace = + stubSimpleCall(expectedResponse); + const [response] = await client.getConversionWorkspace(request); + assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createMigrationJob as SinonStub + client.innerApiCalls.getConversionWorkspace as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createMigrationJob as SinonStub + client.innerApiCalls.getConversionWorkspace as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkCreateMigrationJobProgress without error', async () => { + it('invokes getConversionWorkspace without error using callback', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.GetConversionWorkspaceRequest() ); - 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.checkCreateMigrationJobProgress( - expectedResponse.name + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.GetConversionWorkspaceRequest', + ['name'] ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ConversionWorkspace() + ); + client.innerApiCalls.getConversionWorkspace = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getConversionWorkspace( + request, + ( + err?: Error | null, + result?: protos.google.cloud.clouddms.v1.IConversionWorkspace | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getConversionWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getConversionWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkCreateMigrationJobProgress with error', async () => { + it('invokes getConversionWorkspace with error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.GetConversionWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.GetConversionWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( + client.innerApiCalls.getConversionWorkspace = stubSimpleCall( undefined, expectedError ); await assert.rejects( - client.checkCreateMigrationJobProgress(''), + client.getConversionWorkspace(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.getConversionWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getConversionWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConversionWorkspace with closed client', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.GetConversionWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.GetConversionWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getConversionWorkspace(request), expectedError ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('updateMigrationJob', () => { - it('invokes updateMigrationJob without error', async () => { + describe('searchBackgroundJobs', () => { + it('invokes searchBackgroundJobs without error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -879,34 +961,32 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.UpdateMigrationJobRequest() + new protos.google.cloud.clouddms.v1.SearchBackgroundJobsRequest() ); - request.migrationJob ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.UpdateMigrationJobRequest', - ['migrationJob', 'name'] + '.google.cloud.clouddms.v1.SearchBackgroundJobsRequest', + ['conversionWorkspace'] ); - request.migrationJob.name = defaultValue1; - const expectedHeaderRequestParams = `migration_job.name=${defaultValue1}`; + request.conversionWorkspace = defaultValue1; + const expectedHeaderRequestParams = `conversion_workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.clouddms.v1.SearchBackgroundJobsResponse() ); - client.innerApiCalls.updateMigrationJob = - stubLongRunningCall(expectedResponse); - const [operation] = await client.updateMigrationJob(request); - const [response] = await operation.promise(); + client.innerApiCalls.searchBackgroundJobs = + stubSimpleCall(expectedResponse); + const [response] = await client.searchBackgroundJobs(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.updateMigrationJob as SinonStub + client.innerApiCalls.searchBackgroundJobs as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.updateMigrationJob as SinonStub + client.innerApiCalls.searchBackgroundJobs as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateMigrationJob without error using callback', async () => { + it('invokes searchBackgroundJobs without error using callback', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -914,29 +994,25 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.UpdateMigrationJobRequest() + new protos.google.cloud.clouddms.v1.SearchBackgroundJobsRequest() ); - request.migrationJob ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.UpdateMigrationJobRequest', - ['migrationJob', 'name'] + '.google.cloud.clouddms.v1.SearchBackgroundJobsRequest', + ['conversionWorkspace'] ); - request.migrationJob.name = defaultValue1; - const expectedHeaderRequestParams = `migration_job.name=${defaultValue1}`; + request.conversionWorkspace = defaultValue1; + const expectedHeaderRequestParams = `conversion_workspace=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.clouddms.v1.SearchBackgroundJobsResponse() ); - client.innerApiCalls.updateMigrationJob = - stubLongRunningCallWithCallback(expectedResponse); + client.innerApiCalls.searchBackgroundJobs = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.updateMigrationJob( + client.searchBackgroundJobs( request, ( err?: Error | null, - result?: LROperation< - protos.google.cloud.clouddms.v1.IMigrationJob, - protos.google.cloud.clouddms.v1.IOperationMetadata - > | null + result?: protos.google.cloud.clouddms.v1.ISearchBackgroundJobsResponse | null ) => { if (err) { reject(err); @@ -946,23 +1022,19 @@ describe('v1.DataMigrationServiceClient', () => { } ); }); - const operation = (await promise) as LROperation< - protos.google.cloud.clouddms.v1.IMigrationJob, - protos.google.cloud.clouddms.v1.IOperationMetadata - >; - const [response] = await operation.promise(); + const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.updateMigrationJob as SinonStub + client.innerApiCalls.searchBackgroundJobs as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.updateMigrationJob as SinonStub + client.innerApiCalls.searchBackgroundJobs as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateMigrationJob with call error', async () => { + it('invokes searchBackgroundJobs with error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -970,32 +1042,31 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.UpdateMigrationJobRequest() + new protos.google.cloud.clouddms.v1.SearchBackgroundJobsRequest() ); - request.migrationJob ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.UpdateMigrationJobRequest', - ['migrationJob', 'name'] + '.google.cloud.clouddms.v1.SearchBackgroundJobsRequest', + ['conversionWorkspace'] ); - request.migrationJob.name = defaultValue1; - const expectedHeaderRequestParams = `migration_job.name=${defaultValue1}`; + request.conversionWorkspace = defaultValue1; + const expectedHeaderRequestParams = `conversion_workspace=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.updateMigrationJob = stubLongRunningCall( + client.innerApiCalls.searchBackgroundJobs = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.updateMigrationJob(request), expectedError); + await assert.rejects(client.searchBackgroundJobs(request), expectedError); const actualRequest = ( - client.innerApiCalls.updateMigrationJob as SinonStub + client.innerApiCalls.searchBackgroundJobs as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.updateMigrationJob as SinonStub + client.innerApiCalls.searchBackgroundJobs as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateMigrationJob with LRO error', async () => { + it('invokes searchBackgroundJobs with closed client', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1003,79 +1074,162 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.UpdateMigrationJobRequest() + new protos.google.cloud.clouddms.v1.SearchBackgroundJobsRequest() ); - request.migrationJob ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.UpdateMigrationJobRequest', - ['migrationJob', 'name'] - ); - request.migrationJob.name = defaultValue1; - const expectedHeaderRequestParams = `migration_job.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateMigrationJob = stubLongRunningCall( - undefined, - undefined, - expectedError + '.google.cloud.clouddms.v1.SearchBackgroundJobsRequest', + ['conversionWorkspace'] ); - const [operation] = await client.updateMigrationJob(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = ( - client.innerApiCalls.updateMigrationJob as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateMigrationJob as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + request.conversionWorkspace = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.searchBackgroundJobs(request), expectedError); }); + }); - it('invokes checkUpdateMigrationJobProgress without error', async () => { + describe('describeConversionWorkspaceRevisions', () => { + it('invokes describeConversionWorkspaceRevisions without error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest() ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest', + ['conversionWorkspace'] + ); + request.conversionWorkspace = defaultValue1; + const expectedHeaderRequestParams = `conversion_workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse() + ); + client.innerApiCalls.describeConversionWorkspaceRevisions = + stubSimpleCall(expectedResponse); + const [response] = await client.describeConversionWorkspaceRevisions( + request + ); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.describeConversionWorkspaceRevisions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.describeConversionWorkspaceRevisions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkUpdateMigrationJobProgress( - expectedResponse.name + it('invokes describeConversionWorkspaceRevisions without error using callback', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest() ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest', + ['conversionWorkspace'] + ); + request.conversionWorkspace = defaultValue1; + const expectedHeaderRequestParams = `conversion_workspace=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsResponse() + ); + client.innerApiCalls.describeConversionWorkspaceRevisions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.describeConversionWorkspaceRevisions( + request, + ( + err?: Error | null, + result?: protos.google.cloud.clouddms.v1.IDescribeConversionWorkspaceRevisionsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.describeConversionWorkspaceRevisions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.describeConversionWorkspaceRevisions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkUpdateMigrationJobProgress with error', async () => { + it('invokes describeConversionWorkspaceRevisions with error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest', + ['conversionWorkspace'] + ); + request.conversionWorkspace = defaultValue1; + const expectedHeaderRequestParams = `conversion_workspace=${defaultValue1}`; const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( - undefined, + client.innerApiCalls.describeConversionWorkspaceRevisions = + stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.describeConversionWorkspaceRevisions(request), expectedError ); + const actualRequest = ( + client.innerApiCalls.describeConversionWorkspaceRevisions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.describeConversionWorkspaceRevisions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes describeConversionWorkspaceRevisions with closed client', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.DescribeConversionWorkspaceRevisionsRequest', + ['conversionWorkspace'] + ); + request.conversionWorkspace = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); await assert.rejects( - client.checkUpdateMigrationJobProgress(''), + client.describeConversionWorkspaceRevisions(request), expectedError ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('deleteMigrationJob', () => { - it('invokes deleteMigrationJob without error', async () => { + describe('createMigrationJob', () => { + it('invokes createMigrationJob without error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1083,33 +1237,33 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.DeleteMigrationJobRequest() + new protos.google.cloud.clouddms.v1.CreateMigrationJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.DeleteMigrationJobRequest', - ['name'] + '.google.cloud.clouddms.v1.CreateMigrationJobRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.deleteMigrationJob = + client.innerApiCalls.createMigrationJob = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteMigrationJob(request); + const [operation] = await client.createMigrationJob(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.deleteMigrationJob as SinonStub + client.innerApiCalls.createMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteMigrationJob as SinonStub + client.innerApiCalls.createMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteMigrationJob without error using callback', async () => { + it('invokes createMigrationJob without error using callback', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1117,26 +1271,26 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.DeleteMigrationJobRequest() + new protos.google.cloud.clouddms.v1.CreateMigrationJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.DeleteMigrationJobRequest', - ['name'] + '.google.cloud.clouddms.v1.CreateMigrationJobRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.deleteMigrationJob = + client.innerApiCalls.createMigrationJob = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.deleteMigrationJob( + client.createMigrationJob( request, ( err?: Error | null, result?: LROperation< - protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata > | null ) => { @@ -1149,22 +1303,22 @@ describe('v1.DataMigrationServiceClient', () => { ); }); const operation = (await promise) as LROperation< - protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.deleteMigrationJob as SinonStub + client.innerApiCalls.createMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteMigrationJob as SinonStub + client.innerApiCalls.createMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteMigrationJob with call error', async () => { + it('invokes createMigrationJob with call error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1172,31 +1326,31 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.DeleteMigrationJobRequest() + new protos.google.cloud.clouddms.v1.CreateMigrationJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.DeleteMigrationJobRequest', - ['name'] + '.google.cloud.clouddms.v1.CreateMigrationJobRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.deleteMigrationJob = stubLongRunningCall( + client.innerApiCalls.createMigrationJob = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.deleteMigrationJob(request), expectedError); + await assert.rejects(client.createMigrationJob(request), expectedError); const actualRequest = ( - client.innerApiCalls.deleteMigrationJob as SinonStub + client.innerApiCalls.createMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteMigrationJob as SinonStub + client.innerApiCalls.createMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteMigrationJob with LRO error', async () => { + it('invokes createMigrationJob with LRO error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1204,33 +1358,33 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.DeleteMigrationJobRequest() + new protos.google.cloud.clouddms.v1.CreateMigrationJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.DeleteMigrationJobRequest', - ['name'] + '.google.cloud.clouddms.v1.CreateMigrationJobRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.deleteMigrationJob = stubLongRunningCall( + client.innerApiCalls.createMigrationJob = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.deleteMigrationJob(request); + const [operation] = await client.createMigrationJob(request); await assert.rejects(operation.promise(), expectedError); const actualRequest = ( - client.innerApiCalls.deleteMigrationJob as SinonStub + client.innerApiCalls.createMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteMigrationJob as SinonStub + client.innerApiCalls.createMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkDeleteMigrationJobProgress without error', async () => { + it('invokes checkCreateMigrationJobProgress without error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1245,7 +1399,7 @@ describe('v1.DataMigrationServiceClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDeleteMigrationJobProgress( + const decodedOperation = await client.checkCreateMigrationJobProgress( expectedResponse.name ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); @@ -1253,7 +1407,7 @@ describe('v1.DataMigrationServiceClient', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkDeleteMigrationJobProgress with error', async () => { + it('invokes checkCreateMigrationJobProgress with error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1267,15 +1421,15 @@ describe('v1.DataMigrationServiceClient', () => { expectedError ); await assert.rejects( - client.checkDeleteMigrationJobProgress(''), + client.checkCreateMigrationJobProgress(''), expectedError ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('startMigrationJob', () => { - it('invokes startMigrationJob without error', async () => { + describe('updateMigrationJob', () => { + it('invokes updateMigrationJob without error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1283,33 +1437,34 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.StartMigrationJobRequest() + new protos.google.cloud.clouddms.v1.UpdateMigrationJobRequest() ); + request.migrationJob ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.StartMigrationJobRequest', - ['name'] + '.google.cloud.clouddms.v1.UpdateMigrationJobRequest', + ['migrationJob', 'name'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.migrationJob.name = defaultValue1; + const expectedHeaderRequestParams = `migration_job.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.startMigrationJob = + client.innerApiCalls.updateMigrationJob = stubLongRunningCall(expectedResponse); - const [operation] = await client.startMigrationJob(request); + const [operation] = await client.updateMigrationJob(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.startMigrationJob as SinonStub + client.innerApiCalls.updateMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.startMigrationJob as SinonStub + client.innerApiCalls.updateMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes startMigrationJob without error using callback', async () => { + it('invokes updateMigrationJob without error using callback', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1317,21 +1472,22 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.StartMigrationJobRequest() + new protos.google.cloud.clouddms.v1.UpdateMigrationJobRequest() ); + request.migrationJob ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.StartMigrationJobRequest', - ['name'] + '.google.cloud.clouddms.v1.UpdateMigrationJobRequest', + ['migrationJob', 'name'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.migrationJob.name = defaultValue1; + const expectedHeaderRequestParams = `migration_job.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.startMigrationJob = + client.innerApiCalls.updateMigrationJob = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.startMigrationJob( + client.updateMigrationJob( request, ( err?: Error | null, @@ -1355,16 +1511,16 @@ describe('v1.DataMigrationServiceClient', () => { const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.startMigrationJob as SinonStub + client.innerApiCalls.updateMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.startMigrationJob as SinonStub + client.innerApiCalls.updateMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes startMigrationJob with call error', async () => { + it('invokes updateMigrationJob with call error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1372,31 +1528,32 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.StartMigrationJobRequest() + new protos.google.cloud.clouddms.v1.UpdateMigrationJobRequest() ); + request.migrationJob ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.StartMigrationJobRequest', - ['name'] + '.google.cloud.clouddms.v1.UpdateMigrationJobRequest', + ['migrationJob', 'name'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.migrationJob.name = defaultValue1; + const expectedHeaderRequestParams = `migration_job.name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.startMigrationJob = stubLongRunningCall( + client.innerApiCalls.updateMigrationJob = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.startMigrationJob(request), expectedError); + await assert.rejects(client.updateMigrationJob(request), expectedError); const actualRequest = ( - client.innerApiCalls.startMigrationJob as SinonStub + client.innerApiCalls.updateMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.startMigrationJob as SinonStub + client.innerApiCalls.updateMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes startMigrationJob with LRO error', async () => { + it('invokes updateMigrationJob with LRO error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1404,33 +1561,34 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.StartMigrationJobRequest() + new protos.google.cloud.clouddms.v1.UpdateMigrationJobRequest() ); + request.migrationJob ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.StartMigrationJobRequest', - ['name'] + '.google.cloud.clouddms.v1.UpdateMigrationJobRequest', + ['migrationJob', 'name'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.migrationJob.name = defaultValue1; + const expectedHeaderRequestParams = `migration_job.name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.startMigrationJob = stubLongRunningCall( + client.innerApiCalls.updateMigrationJob = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.startMigrationJob(request); + const [operation] = await client.updateMigrationJob(request); await assert.rejects(operation.promise(), expectedError); const actualRequest = ( - client.innerApiCalls.startMigrationJob as SinonStub + client.innerApiCalls.updateMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.startMigrationJob as SinonStub + client.innerApiCalls.updateMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkStartMigrationJobProgress without error', async () => { + it('invokes checkUpdateMigrationJobProgress without error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1445,7 +1603,7 @@ describe('v1.DataMigrationServiceClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkStartMigrationJobProgress( + const decodedOperation = await client.checkUpdateMigrationJobProgress( expectedResponse.name ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); @@ -1453,7 +1611,7 @@ describe('v1.DataMigrationServiceClient', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkStartMigrationJobProgress with error', async () => { + it('invokes checkUpdateMigrationJobProgress with error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1467,15 +1625,15 @@ describe('v1.DataMigrationServiceClient', () => { expectedError ); await assert.rejects( - client.checkStartMigrationJobProgress(''), + client.checkUpdateMigrationJobProgress(''), expectedError ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('stopMigrationJob', () => { - it('invokes stopMigrationJob without error', async () => { + describe('deleteMigrationJob', () => { + it('invokes deleteMigrationJob without error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1483,10 +1641,10 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.StopMigrationJobRequest() + new protos.google.cloud.clouddms.v1.DeleteMigrationJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.StopMigrationJobRequest', + '.google.cloud.clouddms.v1.DeleteMigrationJobRequest', ['name'] ); request.name = defaultValue1; @@ -1494,22 +1652,22 @@ describe('v1.DataMigrationServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.stopMigrationJob = + client.innerApiCalls.deleteMigrationJob = stubLongRunningCall(expectedResponse); - const [operation] = await client.stopMigrationJob(request); + const [operation] = await client.deleteMigrationJob(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.stopMigrationJob as SinonStub + client.innerApiCalls.deleteMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.stopMigrationJob as SinonStub + client.innerApiCalls.deleteMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes stopMigrationJob without error using callback', async () => { + it('invokes deleteMigrationJob without error using callback', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1517,10 +1675,10 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.StopMigrationJobRequest() + new protos.google.cloud.clouddms.v1.DeleteMigrationJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.StopMigrationJobRequest', + '.google.cloud.clouddms.v1.DeleteMigrationJobRequest', ['name'] ); request.name = defaultValue1; @@ -1528,15 +1686,15 @@ describe('v1.DataMigrationServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.stopMigrationJob = + client.innerApiCalls.deleteMigrationJob = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.stopMigrationJob( + client.deleteMigrationJob( request, ( err?: Error | null, result?: LROperation< - protos.google.cloud.clouddms.v1.IMigrationJob, + protos.google.protobuf.IEmpty, protos.google.cloud.clouddms.v1.IOperationMetadata > | null ) => { @@ -1549,22 +1707,22 @@ describe('v1.DataMigrationServiceClient', () => { ); }); const operation = (await promise) as LROperation< - protos.google.cloud.clouddms.v1.IMigrationJob, + protos.google.protobuf.IEmpty, protos.google.cloud.clouddms.v1.IOperationMetadata >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.stopMigrationJob as SinonStub + client.innerApiCalls.deleteMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.stopMigrationJob as SinonStub + client.innerApiCalls.deleteMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes stopMigrationJob with call error', async () => { + it('invokes deleteMigrationJob with call error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1572,31 +1730,31 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.StopMigrationJobRequest() + new protos.google.cloud.clouddms.v1.DeleteMigrationJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.StopMigrationJobRequest', + '.google.cloud.clouddms.v1.DeleteMigrationJobRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.stopMigrationJob = stubLongRunningCall( + client.innerApiCalls.deleteMigrationJob = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.stopMigrationJob(request), expectedError); + await assert.rejects(client.deleteMigrationJob(request), expectedError); const actualRequest = ( - client.innerApiCalls.stopMigrationJob as SinonStub + client.innerApiCalls.deleteMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.stopMigrationJob as SinonStub + client.innerApiCalls.deleteMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes stopMigrationJob with LRO error', async () => { + it('invokes deleteMigrationJob with LRO error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1604,33 +1762,33 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.StopMigrationJobRequest() + new protos.google.cloud.clouddms.v1.DeleteMigrationJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.StopMigrationJobRequest', + '.google.cloud.clouddms.v1.DeleteMigrationJobRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.stopMigrationJob = stubLongRunningCall( + client.innerApiCalls.deleteMigrationJob = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.stopMigrationJob(request); + const [operation] = await client.deleteMigrationJob(request); await assert.rejects(operation.promise(), expectedError); const actualRequest = ( - client.innerApiCalls.stopMigrationJob as SinonStub + client.innerApiCalls.deleteMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.stopMigrationJob as SinonStub + client.innerApiCalls.deleteMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkStopMigrationJobProgress without error', async () => { + it('invokes checkDeleteMigrationJobProgress without error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1645,7 +1803,7 @@ describe('v1.DataMigrationServiceClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkStopMigrationJobProgress( + const decodedOperation = await client.checkDeleteMigrationJobProgress( expectedResponse.name ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); @@ -1653,7 +1811,7 @@ describe('v1.DataMigrationServiceClient', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkStopMigrationJobProgress with error', async () => { + it('invokes checkDeleteMigrationJobProgress with error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1667,15 +1825,15 @@ describe('v1.DataMigrationServiceClient', () => { expectedError ); await assert.rejects( - client.checkStopMigrationJobProgress(''), + client.checkDeleteMigrationJobProgress(''), expectedError ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('resumeMigrationJob', () => { - it('invokes resumeMigrationJob without error', async () => { + describe('startMigrationJob', () => { + it('invokes startMigrationJob without error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1683,10 +1841,10 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.ResumeMigrationJobRequest() + new protos.google.cloud.clouddms.v1.StartMigrationJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.ResumeMigrationJobRequest', + '.google.cloud.clouddms.v1.StartMigrationJobRequest', ['name'] ); request.name = defaultValue1; @@ -1694,22 +1852,22 @@ describe('v1.DataMigrationServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.resumeMigrationJob = + client.innerApiCalls.startMigrationJob = stubLongRunningCall(expectedResponse); - const [operation] = await client.resumeMigrationJob(request); + const [operation] = await client.startMigrationJob(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.resumeMigrationJob as SinonStub + client.innerApiCalls.startMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.resumeMigrationJob as SinonStub + client.innerApiCalls.startMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes resumeMigrationJob without error using callback', async () => { + it('invokes startMigrationJob without error using callback', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1717,10 +1875,10 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.ResumeMigrationJobRequest() + new protos.google.cloud.clouddms.v1.StartMigrationJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.ResumeMigrationJobRequest', + '.google.cloud.clouddms.v1.StartMigrationJobRequest', ['name'] ); request.name = defaultValue1; @@ -1728,10 +1886,10 @@ describe('v1.DataMigrationServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.resumeMigrationJob = + client.innerApiCalls.startMigrationJob = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.resumeMigrationJob( + client.startMigrationJob( request, ( err?: Error | null, @@ -1755,16 +1913,16 @@ describe('v1.DataMigrationServiceClient', () => { const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.resumeMigrationJob as SinonStub + client.innerApiCalls.startMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.resumeMigrationJob as SinonStub + client.innerApiCalls.startMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes resumeMigrationJob with call error', async () => { + it('invokes startMigrationJob with call error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1772,31 +1930,31 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.ResumeMigrationJobRequest() + new protos.google.cloud.clouddms.v1.StartMigrationJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.ResumeMigrationJobRequest', + '.google.cloud.clouddms.v1.StartMigrationJobRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.resumeMigrationJob = stubLongRunningCall( + client.innerApiCalls.startMigrationJob = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.resumeMigrationJob(request), expectedError); + await assert.rejects(client.startMigrationJob(request), expectedError); const actualRequest = ( - client.innerApiCalls.resumeMigrationJob as SinonStub + client.innerApiCalls.startMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.resumeMigrationJob as SinonStub + client.innerApiCalls.startMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes resumeMigrationJob with LRO error', async () => { + it('invokes startMigrationJob with LRO error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1804,33 +1962,33 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.ResumeMigrationJobRequest() + new protos.google.cloud.clouddms.v1.StartMigrationJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.ResumeMigrationJobRequest', + '.google.cloud.clouddms.v1.StartMigrationJobRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.resumeMigrationJob = stubLongRunningCall( + client.innerApiCalls.startMigrationJob = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.resumeMigrationJob(request); + const [operation] = await client.startMigrationJob(request); await assert.rejects(operation.promise(), expectedError); const actualRequest = ( - client.innerApiCalls.resumeMigrationJob as SinonStub + client.innerApiCalls.startMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.resumeMigrationJob as SinonStub + client.innerApiCalls.startMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkResumeMigrationJobProgress without error', async () => { + it('invokes checkStartMigrationJobProgress without error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1845,7 +2003,7 @@ describe('v1.DataMigrationServiceClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkResumeMigrationJobProgress( + const decodedOperation = await client.checkStartMigrationJobProgress( expectedResponse.name ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); @@ -1853,7 +2011,7 @@ describe('v1.DataMigrationServiceClient', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkResumeMigrationJobProgress with error', async () => { + it('invokes checkStartMigrationJobProgress with error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1867,15 +2025,15 @@ describe('v1.DataMigrationServiceClient', () => { expectedError ); await assert.rejects( - client.checkResumeMigrationJobProgress(''), + client.checkStartMigrationJobProgress(''), expectedError ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('promoteMigrationJob', () => { - it('invokes promoteMigrationJob without error', async () => { + describe('stopMigrationJob', () => { + it('invokes stopMigrationJob without error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1883,10 +2041,10 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.PromoteMigrationJobRequest() + new protos.google.cloud.clouddms.v1.StopMigrationJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.PromoteMigrationJobRequest', + '.google.cloud.clouddms.v1.StopMigrationJobRequest', ['name'] ); request.name = defaultValue1; @@ -1894,22 +2052,22 @@ describe('v1.DataMigrationServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.promoteMigrationJob = + client.innerApiCalls.stopMigrationJob = stubLongRunningCall(expectedResponse); - const [operation] = await client.promoteMigrationJob(request); + const [operation] = await client.stopMigrationJob(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.promoteMigrationJob as SinonStub + client.innerApiCalls.stopMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.promoteMigrationJob as SinonStub + client.innerApiCalls.stopMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes promoteMigrationJob without error using callback', async () => { + it('invokes stopMigrationJob without error using callback', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1917,10 +2075,10 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.PromoteMigrationJobRequest() + new protos.google.cloud.clouddms.v1.StopMigrationJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.PromoteMigrationJobRequest', + '.google.cloud.clouddms.v1.StopMigrationJobRequest', ['name'] ); request.name = defaultValue1; @@ -1928,10 +2086,10 @@ describe('v1.DataMigrationServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.promoteMigrationJob = + client.innerApiCalls.stopMigrationJob = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.promoteMigrationJob( + client.stopMigrationJob( request, ( err?: Error | null, @@ -1955,16 +2113,16 @@ describe('v1.DataMigrationServiceClient', () => { const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.promoteMigrationJob as SinonStub + client.innerApiCalls.stopMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.promoteMigrationJob as SinonStub + client.innerApiCalls.stopMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes promoteMigrationJob with call error', async () => { + it('invokes stopMigrationJob with call error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -1972,31 +2130,31 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.PromoteMigrationJobRequest() + new protos.google.cloud.clouddms.v1.StopMigrationJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.PromoteMigrationJobRequest', + '.google.cloud.clouddms.v1.StopMigrationJobRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.promoteMigrationJob = stubLongRunningCall( + client.innerApiCalls.stopMigrationJob = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.promoteMigrationJob(request), expectedError); + await assert.rejects(client.stopMigrationJob(request), expectedError); const actualRequest = ( - client.innerApiCalls.promoteMigrationJob as SinonStub + client.innerApiCalls.stopMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.promoteMigrationJob as SinonStub + client.innerApiCalls.stopMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes promoteMigrationJob with LRO error', async () => { + it('invokes stopMigrationJob with LRO error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2004,33 +2162,33 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.PromoteMigrationJobRequest() + new protos.google.cloud.clouddms.v1.StopMigrationJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.PromoteMigrationJobRequest', + '.google.cloud.clouddms.v1.StopMigrationJobRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.promoteMigrationJob = stubLongRunningCall( + client.innerApiCalls.stopMigrationJob = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.promoteMigrationJob(request); + const [operation] = await client.stopMigrationJob(request); await assert.rejects(operation.promise(), expectedError); const actualRequest = ( - client.innerApiCalls.promoteMigrationJob as SinonStub + client.innerApiCalls.stopMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.promoteMigrationJob as SinonStub + client.innerApiCalls.stopMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkPromoteMigrationJobProgress without error', async () => { + it('invokes checkStopMigrationJobProgress without error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2045,7 +2203,7 @@ describe('v1.DataMigrationServiceClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkPromoteMigrationJobProgress( + const decodedOperation = await client.checkStopMigrationJobProgress( expectedResponse.name ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); @@ -2053,7 +2211,7 @@ describe('v1.DataMigrationServiceClient', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkPromoteMigrationJobProgress with error', async () => { + it('invokes checkStopMigrationJobProgress with error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2067,15 +2225,15 @@ describe('v1.DataMigrationServiceClient', () => { expectedError ); await assert.rejects( - client.checkPromoteMigrationJobProgress(''), + client.checkStopMigrationJobProgress(''), expectedError ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('verifyMigrationJob', () => { - it('invokes verifyMigrationJob without error', async () => { + describe('resumeMigrationJob', () => { + it('invokes resumeMigrationJob without error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2083,10 +2241,10 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.VerifyMigrationJobRequest() + new protos.google.cloud.clouddms.v1.ResumeMigrationJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.VerifyMigrationJobRequest', + '.google.cloud.clouddms.v1.ResumeMigrationJobRequest', ['name'] ); request.name = defaultValue1; @@ -2094,22 +2252,22 @@ describe('v1.DataMigrationServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.verifyMigrationJob = + client.innerApiCalls.resumeMigrationJob = stubLongRunningCall(expectedResponse); - const [operation] = await client.verifyMigrationJob(request); + const [operation] = await client.resumeMigrationJob(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.verifyMigrationJob as SinonStub + client.innerApiCalls.resumeMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.verifyMigrationJob as SinonStub + client.innerApiCalls.resumeMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes verifyMigrationJob without error using callback', async () => { + it('invokes resumeMigrationJob without error using callback', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2117,10 +2275,10 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.VerifyMigrationJobRequest() + new protos.google.cloud.clouddms.v1.ResumeMigrationJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.VerifyMigrationJobRequest', + '.google.cloud.clouddms.v1.ResumeMigrationJobRequest', ['name'] ); request.name = defaultValue1; @@ -2128,10 +2286,10 @@ describe('v1.DataMigrationServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.verifyMigrationJob = + client.innerApiCalls.resumeMigrationJob = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.verifyMigrationJob( + client.resumeMigrationJob( request, ( err?: Error | null, @@ -2155,16 +2313,16 @@ describe('v1.DataMigrationServiceClient', () => { const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.verifyMigrationJob as SinonStub + client.innerApiCalls.resumeMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.verifyMigrationJob as SinonStub + client.innerApiCalls.resumeMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes verifyMigrationJob with call error', async () => { + it('invokes resumeMigrationJob with call error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2172,31 +2330,31 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.VerifyMigrationJobRequest() + new protos.google.cloud.clouddms.v1.ResumeMigrationJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.VerifyMigrationJobRequest', + '.google.cloud.clouddms.v1.ResumeMigrationJobRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.verifyMigrationJob = stubLongRunningCall( + client.innerApiCalls.resumeMigrationJob = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.verifyMigrationJob(request), expectedError); + await assert.rejects(client.resumeMigrationJob(request), expectedError); const actualRequest = ( - client.innerApiCalls.verifyMigrationJob as SinonStub + client.innerApiCalls.resumeMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.verifyMigrationJob as SinonStub + client.innerApiCalls.resumeMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes verifyMigrationJob with LRO error', async () => { + it('invokes resumeMigrationJob with LRO error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2204,33 +2362,33 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.VerifyMigrationJobRequest() + new protos.google.cloud.clouddms.v1.ResumeMigrationJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.VerifyMigrationJobRequest', + '.google.cloud.clouddms.v1.ResumeMigrationJobRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.verifyMigrationJob = stubLongRunningCall( + client.innerApiCalls.resumeMigrationJob = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.verifyMigrationJob(request); + const [operation] = await client.resumeMigrationJob(request); await assert.rejects(operation.promise(), expectedError); const actualRequest = ( - client.innerApiCalls.verifyMigrationJob as SinonStub + client.innerApiCalls.resumeMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.verifyMigrationJob as SinonStub + client.innerApiCalls.resumeMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkVerifyMigrationJobProgress without error', async () => { + it('invokes checkResumeMigrationJobProgress without error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2245,7 +2403,7 @@ describe('v1.DataMigrationServiceClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkVerifyMigrationJobProgress( + const decodedOperation = await client.checkResumeMigrationJobProgress( expectedResponse.name ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); @@ -2253,7 +2411,7 @@ describe('v1.DataMigrationServiceClient', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkVerifyMigrationJobProgress with error', async () => { + it('invokes checkResumeMigrationJobProgress with error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2267,15 +2425,15 @@ describe('v1.DataMigrationServiceClient', () => { expectedError ); await assert.rejects( - client.checkVerifyMigrationJobProgress(''), + client.checkResumeMigrationJobProgress(''), expectedError ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('restartMigrationJob', () => { - it('invokes restartMigrationJob without error', async () => { + describe('promoteMigrationJob', () => { + it('invokes promoteMigrationJob without error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2283,10 +2441,10 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.RestartMigrationJobRequest() + new protos.google.cloud.clouddms.v1.PromoteMigrationJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.RestartMigrationJobRequest', + '.google.cloud.clouddms.v1.PromoteMigrationJobRequest', ['name'] ); request.name = defaultValue1; @@ -2294,22 +2452,22 @@ describe('v1.DataMigrationServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.restartMigrationJob = + client.innerApiCalls.promoteMigrationJob = stubLongRunningCall(expectedResponse); - const [operation] = await client.restartMigrationJob(request); + const [operation] = await client.promoteMigrationJob(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.restartMigrationJob as SinonStub + client.innerApiCalls.promoteMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.restartMigrationJob as SinonStub + client.innerApiCalls.promoteMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes restartMigrationJob without error using callback', async () => { + it('invokes promoteMigrationJob without error using callback', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2317,10 +2475,10 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.RestartMigrationJobRequest() + new protos.google.cloud.clouddms.v1.PromoteMigrationJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.RestartMigrationJobRequest', + '.google.cloud.clouddms.v1.PromoteMigrationJobRequest', ['name'] ); request.name = defaultValue1; @@ -2328,10 +2486,10 @@ describe('v1.DataMigrationServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.restartMigrationJob = + client.innerApiCalls.promoteMigrationJob = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.restartMigrationJob( + client.promoteMigrationJob( request, ( err?: Error | null, @@ -2355,16 +2513,16 @@ describe('v1.DataMigrationServiceClient', () => { const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.restartMigrationJob as SinonStub + client.innerApiCalls.promoteMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.restartMigrationJob as SinonStub + client.innerApiCalls.promoteMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes restartMigrationJob with call error', async () => { + it('invokes promoteMigrationJob with call error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2372,31 +2530,31 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.RestartMigrationJobRequest() + new protos.google.cloud.clouddms.v1.PromoteMigrationJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.RestartMigrationJobRequest', + '.google.cloud.clouddms.v1.PromoteMigrationJobRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.restartMigrationJob = stubLongRunningCall( + client.innerApiCalls.promoteMigrationJob = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.restartMigrationJob(request), expectedError); + await assert.rejects(client.promoteMigrationJob(request), expectedError); const actualRequest = ( - client.innerApiCalls.restartMigrationJob as SinonStub + client.innerApiCalls.promoteMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.restartMigrationJob as SinonStub + client.innerApiCalls.promoteMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes restartMigrationJob with LRO error', async () => { + it('invokes promoteMigrationJob with LRO error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2404,33 +2562,33 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.RestartMigrationJobRequest() + new protos.google.cloud.clouddms.v1.PromoteMigrationJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.RestartMigrationJobRequest', + '.google.cloud.clouddms.v1.PromoteMigrationJobRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.restartMigrationJob = stubLongRunningCall( + client.innerApiCalls.promoteMigrationJob = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.restartMigrationJob(request); + const [operation] = await client.promoteMigrationJob(request); await assert.rejects(operation.promise(), expectedError); const actualRequest = ( - client.innerApiCalls.restartMigrationJob as SinonStub + client.innerApiCalls.promoteMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.restartMigrationJob as SinonStub + client.innerApiCalls.promoteMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkRestartMigrationJobProgress without error', async () => { + it('invokes checkPromoteMigrationJobProgress without error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2445,7 +2603,7 @@ describe('v1.DataMigrationServiceClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkRestartMigrationJobProgress( + const decodedOperation = await client.checkPromoteMigrationJobProgress( expectedResponse.name ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); @@ -2453,7 +2611,7 @@ describe('v1.DataMigrationServiceClient', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkRestartMigrationJobProgress with error', async () => { + it('invokes checkPromoteMigrationJobProgress with error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2467,15 +2625,15 @@ describe('v1.DataMigrationServiceClient', () => { expectedError ); await assert.rejects( - client.checkRestartMigrationJobProgress(''), + client.checkPromoteMigrationJobProgress(''), expectedError ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('createConnectionProfile', () => { - it('invokes createConnectionProfile without error', async () => { + describe('verifyMigrationJob', () => { + it('invokes verifyMigrationJob without error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2483,33 +2641,33 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.CreateConnectionProfileRequest() + new protos.google.cloud.clouddms.v1.VerifyMigrationJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.CreateConnectionProfileRequest', - ['parent'] + '.google.cloud.clouddms.v1.VerifyMigrationJobRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.createConnectionProfile = + client.innerApiCalls.verifyMigrationJob = stubLongRunningCall(expectedResponse); - const [operation] = await client.createConnectionProfile(request); + const [operation] = await client.verifyMigrationJob(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createConnectionProfile as SinonStub + client.innerApiCalls.verifyMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createConnectionProfile as SinonStub + client.innerApiCalls.verifyMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createConnectionProfile without error using callback', async () => { + it('invokes verifyMigrationJob without error using callback', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2517,26 +2675,26 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.CreateConnectionProfileRequest() + new protos.google.cloud.clouddms.v1.VerifyMigrationJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.CreateConnectionProfileRequest', - ['parent'] + '.google.cloud.clouddms.v1.VerifyMigrationJobRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.createConnectionProfile = + client.innerApiCalls.verifyMigrationJob = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.createConnectionProfile( + client.verifyMigrationJob( request, ( err?: Error | null, result?: LROperation< - protos.google.cloud.clouddms.v1.IConnectionProfile, + protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata > | null ) => { @@ -2549,22 +2707,22 @@ describe('v1.DataMigrationServiceClient', () => { ); }); const operation = (await promise) as LROperation< - protos.google.cloud.clouddms.v1.IConnectionProfile, + protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createConnectionProfile as SinonStub + client.innerApiCalls.verifyMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createConnectionProfile as SinonStub + client.innerApiCalls.verifyMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createConnectionProfile with call error', async () => { + it('invokes verifyMigrationJob with call error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2572,34 +2730,31 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.CreateConnectionProfileRequest() + new protos.google.cloud.clouddms.v1.VerifyMigrationJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.CreateConnectionProfileRequest', - ['parent'] + '.google.cloud.clouddms.v1.VerifyMigrationJobRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.createConnectionProfile = stubLongRunningCall( + client.innerApiCalls.verifyMigrationJob = stubLongRunningCall( undefined, expectedError ); - await assert.rejects( - client.createConnectionProfile(request), - expectedError - ); + await assert.rejects(client.verifyMigrationJob(request), expectedError); const actualRequest = ( - client.innerApiCalls.createConnectionProfile as SinonStub + client.innerApiCalls.verifyMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createConnectionProfile as SinonStub + client.innerApiCalls.verifyMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createConnectionProfile with LRO error', async () => { + it('invokes verifyMigrationJob with LRO error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2607,33 +2762,33 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.CreateConnectionProfileRequest() + new protos.google.cloud.clouddms.v1.VerifyMigrationJobRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.CreateConnectionProfileRequest', - ['parent'] + '.google.cloud.clouddms.v1.VerifyMigrationJobRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.createConnectionProfile = stubLongRunningCall( + client.innerApiCalls.verifyMigrationJob = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.createConnectionProfile(request); + const [operation] = await client.verifyMigrationJob(request); await assert.rejects(operation.promise(), expectedError); const actualRequest = ( - client.innerApiCalls.createConnectionProfile as SinonStub + client.innerApiCalls.verifyMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createConnectionProfile as SinonStub + client.innerApiCalls.verifyMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkCreateConnectionProfileProgress without error', async () => { + it('invokes checkVerifyMigrationJobProgress without error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2648,16 +2803,15 @@ describe('v1.DataMigrationServiceClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = - await client.checkCreateConnectionProfileProgress( - expectedResponse.name - ); + const decodedOperation = await client.checkVerifyMigrationJobProgress( + expectedResponse.name + ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); assert(decodedOperation.metadata); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkCreateConnectionProfileProgress with error', async () => { + it('invokes checkVerifyMigrationJobProgress with error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2671,15 +2825,15 @@ describe('v1.DataMigrationServiceClient', () => { expectedError ); await assert.rejects( - client.checkCreateConnectionProfileProgress(''), + client.checkVerifyMigrationJobProgress(''), expectedError ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('updateConnectionProfile', () => { - it('invokes updateConnectionProfile without error', async () => { + describe('restartMigrationJob', () => { + it('invokes restartMigrationJob without error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2687,34 +2841,33 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.UpdateConnectionProfileRequest() + new protos.google.cloud.clouddms.v1.RestartMigrationJobRequest() ); - request.connectionProfile ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.UpdateConnectionProfileRequest', - ['connectionProfile', 'name'] + '.google.cloud.clouddms.v1.RestartMigrationJobRequest', + ['name'] ); - request.connectionProfile.name = defaultValue1; - const expectedHeaderRequestParams = `connection_profile.name=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.updateConnectionProfile = + client.innerApiCalls.restartMigrationJob = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateConnectionProfile(request); + const [operation] = await client.restartMigrationJob(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.updateConnectionProfile as SinonStub + client.innerApiCalls.restartMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.updateConnectionProfile as SinonStub + client.innerApiCalls.restartMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateConnectionProfile without error using callback', async () => { + it('invokes restartMigrationJob without error using callback', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2722,27 +2875,26 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.UpdateConnectionProfileRequest() + new protos.google.cloud.clouddms.v1.RestartMigrationJobRequest() ); - request.connectionProfile ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.UpdateConnectionProfileRequest', - ['connectionProfile', 'name'] + '.google.cloud.clouddms.v1.RestartMigrationJobRequest', + ['name'] ); - request.connectionProfile.name = defaultValue1; - const expectedHeaderRequestParams = `connection_profile.name=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.updateConnectionProfile = + client.innerApiCalls.restartMigrationJob = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.updateConnectionProfile( + client.restartMigrationJob( request, ( err?: Error | null, result?: LROperation< - protos.google.cloud.clouddms.v1.IConnectionProfile, + protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata > | null ) => { @@ -2755,22 +2907,22 @@ describe('v1.DataMigrationServiceClient', () => { ); }); const operation = (await promise) as LROperation< - protos.google.cloud.clouddms.v1.IConnectionProfile, + protos.google.cloud.clouddms.v1.IMigrationJob, protos.google.cloud.clouddms.v1.IOperationMetadata >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.updateConnectionProfile as SinonStub + client.innerApiCalls.restartMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.updateConnectionProfile as SinonStub + client.innerApiCalls.restartMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateConnectionProfile with call error', async () => { + it('invokes restartMigrationJob with call error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2778,35 +2930,31 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.UpdateConnectionProfileRequest() + new protos.google.cloud.clouddms.v1.RestartMigrationJobRequest() ); - request.connectionProfile ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.UpdateConnectionProfileRequest', - ['connectionProfile', 'name'] + '.google.cloud.clouddms.v1.RestartMigrationJobRequest', + ['name'] ); - request.connectionProfile.name = defaultValue1; - const expectedHeaderRequestParams = `connection_profile.name=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.updateConnectionProfile = stubLongRunningCall( + client.innerApiCalls.restartMigrationJob = stubLongRunningCall( undefined, expectedError ); - await assert.rejects( - client.updateConnectionProfile(request), - expectedError - ); + await assert.rejects(client.restartMigrationJob(request), expectedError); const actualRequest = ( - client.innerApiCalls.updateConnectionProfile as SinonStub + client.innerApiCalls.restartMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.updateConnectionProfile as SinonStub + client.innerApiCalls.restartMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateConnectionProfile with LRO error', async () => { + it('invokes restartMigrationJob with LRO error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2814,34 +2962,33 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.UpdateConnectionProfileRequest() + new protos.google.cloud.clouddms.v1.RestartMigrationJobRequest() ); - request.connectionProfile ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.UpdateConnectionProfileRequest', - ['connectionProfile', 'name'] + '.google.cloud.clouddms.v1.RestartMigrationJobRequest', + ['name'] ); - request.connectionProfile.name = defaultValue1; - const expectedHeaderRequestParams = `connection_profile.name=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.updateConnectionProfile = stubLongRunningCall( + client.innerApiCalls.restartMigrationJob = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.updateConnectionProfile(request); + const [operation] = await client.restartMigrationJob(request); await assert.rejects(operation.promise(), expectedError); const actualRequest = ( - client.innerApiCalls.updateConnectionProfile as SinonStub + client.innerApiCalls.restartMigrationJob as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.updateConnectionProfile as SinonStub + client.innerApiCalls.restartMigrationJob as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkUpdateConnectionProfileProgress without error', async () => { + it('invokes checkRestartMigrationJobProgress without error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2856,16 +3003,15 @@ describe('v1.DataMigrationServiceClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = - await client.checkUpdateConnectionProfileProgress( - expectedResponse.name - ); + const decodedOperation = await client.checkRestartMigrationJobProgress( + expectedResponse.name + ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); assert(decodedOperation.metadata); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkUpdateConnectionProfileProgress with error', async () => { + it('invokes checkRestartMigrationJobProgress with error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2879,15 +3025,15 @@ describe('v1.DataMigrationServiceClient', () => { expectedError ); await assert.rejects( - client.checkUpdateConnectionProfileProgress(''), + client.checkRestartMigrationJobProgress(''), expectedError ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('deleteConnectionProfile', () => { - it('invokes deleteConnectionProfile without error', async () => { + describe('createConnectionProfile', () => { + it('invokes createConnectionProfile without error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2895,33 +3041,33 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.DeleteConnectionProfileRequest() + new protos.google.cloud.clouddms.v1.CreateConnectionProfileRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.DeleteConnectionProfileRequest', - ['name'] + '.google.cloud.clouddms.v1.CreateConnectionProfileRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.deleteConnectionProfile = + client.innerApiCalls.createConnectionProfile = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteConnectionProfile(request); + const [operation] = await client.createConnectionProfile(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.deleteConnectionProfile as SinonStub + client.innerApiCalls.createConnectionProfile as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteConnectionProfile as SinonStub + client.innerApiCalls.createConnectionProfile as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteConnectionProfile without error using callback', async () => { + it('invokes createConnectionProfile without error using callback', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2929,26 +3075,26 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.DeleteConnectionProfileRequest() + new protos.google.cloud.clouddms.v1.CreateConnectionProfileRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.DeleteConnectionProfileRequest', - ['name'] + '.google.cloud.clouddms.v1.CreateConnectionProfileRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.deleteConnectionProfile = + client.innerApiCalls.createConnectionProfile = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.deleteConnectionProfile( + client.createConnectionProfile( request, ( err?: Error | null, result?: LROperation< - protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IConnectionProfile, protos.google.cloud.clouddms.v1.IOperationMetadata > | null ) => { @@ -2961,22 +3107,22 @@ describe('v1.DataMigrationServiceClient', () => { ); }); const operation = (await promise) as LROperation< - protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IConnectionProfile, protos.google.cloud.clouddms.v1.IOperationMetadata >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.deleteConnectionProfile as SinonStub + client.innerApiCalls.createConnectionProfile as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteConnectionProfile as SinonStub + client.innerApiCalls.createConnectionProfile as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteConnectionProfile with call error', async () => { + it('invokes createConnectionProfile with call error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -2984,34 +3130,34 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.DeleteConnectionProfileRequest() + new protos.google.cloud.clouddms.v1.CreateConnectionProfileRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.DeleteConnectionProfileRequest', - ['name'] + '.google.cloud.clouddms.v1.CreateConnectionProfileRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.deleteConnectionProfile = stubLongRunningCall( + client.innerApiCalls.createConnectionProfile = stubLongRunningCall( undefined, expectedError ); await assert.rejects( - client.deleteConnectionProfile(request), + client.createConnectionProfile(request), expectedError ); const actualRequest = ( - client.innerApiCalls.deleteConnectionProfile as SinonStub + client.innerApiCalls.createConnectionProfile as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteConnectionProfile as SinonStub + client.innerApiCalls.createConnectionProfile as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteConnectionProfile with LRO error', async () => { + it('invokes createConnectionProfile with LRO error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3019,33 +3165,33 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.DeleteConnectionProfileRequest() + new protos.google.cloud.clouddms.v1.CreateConnectionProfileRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.DeleteConnectionProfileRequest', - ['name'] + '.google.cloud.clouddms.v1.CreateConnectionProfileRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.deleteConnectionProfile = stubLongRunningCall( + client.innerApiCalls.createConnectionProfile = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.deleteConnectionProfile(request); + const [operation] = await client.createConnectionProfile(request); await assert.rejects(operation.promise(), expectedError); const actualRequest = ( - client.innerApiCalls.deleteConnectionProfile as SinonStub + client.innerApiCalls.createConnectionProfile as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteConnectionProfile as SinonStub + client.innerApiCalls.createConnectionProfile as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkDeleteConnectionProfileProgress without error', async () => { + it('invokes checkCreateConnectionProfileProgress without error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3061,7 +3207,7 @@ describe('v1.DataMigrationServiceClient', () => { client.operationsClient.getOperation = stubSimpleCall(expectedResponse); const decodedOperation = - await client.checkDeleteConnectionProfileProgress( + await client.checkCreateConnectionProfileProgress( expectedResponse.name ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); @@ -3069,7 +3215,7 @@ describe('v1.DataMigrationServiceClient', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkDeleteConnectionProfileProgress with error', async () => { + it('invokes checkCreateConnectionProfileProgress with error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3083,15 +3229,15 @@ describe('v1.DataMigrationServiceClient', () => { expectedError ); await assert.rejects( - client.checkDeleteConnectionProfileProgress(''), + client.checkCreateConnectionProfileProgress(''), expectedError ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('listMigrationJobs', () => { - it('invokes listMigrationJobs without error', async () => { + describe('updateConnectionProfile', () => { + it('invokes updateConnectionProfile without error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3099,39 +3245,34 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.ListMigrationJobsRequest() + new protos.google.cloud.clouddms.v1.UpdateConnectionProfileRequest() ); + request.connectionProfile ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.ListMigrationJobsRequest', - ['parent'] + '.google.cloud.clouddms.v1.UpdateConnectionProfileRequest', + ['connectionProfile', 'name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.clouddms.v1.MigrationJob() - ), - generateSampleMessage( - new protos.google.cloud.clouddms.v1.MigrationJob() - ), - generateSampleMessage( - new protos.google.cloud.clouddms.v1.MigrationJob() - ), - ]; - client.innerApiCalls.listMigrationJobs = stubSimpleCall(expectedResponse); - const [response] = await client.listMigrationJobs(request); + request.connectionProfile.name = defaultValue1; + const expectedHeaderRequestParams = `connection_profile.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateConnectionProfile = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateConnectionProfile(request); + const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listMigrationJobs as SinonStub + client.innerApiCalls.updateConnectionProfile as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listMigrationJobs as SinonStub + client.innerApiCalls.updateConnectionProfile as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listMigrationJobs without error using callback', async () => { + it('invokes updateConnectionProfile without error using callback', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3139,33 +3280,29 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.ListMigrationJobsRequest() + new protos.google.cloud.clouddms.v1.UpdateConnectionProfileRequest() ); + request.connectionProfile ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.ListMigrationJobsRequest', - ['parent'] + '.google.cloud.clouddms.v1.UpdateConnectionProfileRequest', + ['connectionProfile', 'name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.clouddms.v1.MigrationJob() - ), - generateSampleMessage( - new protos.google.cloud.clouddms.v1.MigrationJob() - ), - generateSampleMessage( - new protos.google.cloud.clouddms.v1.MigrationJob() - ), - ]; - client.innerApiCalls.listMigrationJobs = - stubSimpleCallWithCallback(expectedResponse); + request.connectionProfile.name = defaultValue1; + const expectedHeaderRequestParams = `connection_profile.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateConnectionProfile = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listMigrationJobs( + client.updateConnectionProfile( request, ( err?: Error | null, - result?: protos.google.cloud.clouddms.v1.IMigrationJob[] | null + result?: LROperation< + protos.google.cloud.clouddms.v1.IConnectionProfile, + protos.google.cloud.clouddms.v1.IOperationMetadata + > | null ) => { if (err) { reject(err); @@ -3175,19 +3312,23 @@ describe('v1.DataMigrationServiceClient', () => { } ); }); - const response = await promise; + const operation = (await promise) as LROperation< + protos.google.cloud.clouddms.v1.IConnectionProfile, + protos.google.cloud.clouddms.v1.IOperationMetadata + >; + const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listMigrationJobs as SinonStub + client.innerApiCalls.updateConnectionProfile as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listMigrationJobs as SinonStub + client.innerApiCalls.updateConnectionProfile as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listMigrationJobs with error', async () => { + it('invokes updateConnectionProfile with call error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3195,31 +3336,2853 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.ListMigrationJobsRequest() + new protos.google.cloud.clouddms.v1.UpdateConnectionProfileRequest() ); + request.connectionProfile ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.ListMigrationJobsRequest', - ['parent'] + '.google.cloud.clouddms.v1.UpdateConnectionProfileRequest', + ['connectionProfile', 'name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.connectionProfile.name = defaultValue1; + const expectedHeaderRequestParams = `connection_profile.name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listMigrationJobs = stubSimpleCall( + client.innerApiCalls.updateConnectionProfile = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.listMigrationJobs(request), expectedError); + await assert.rejects( + client.updateConnectionProfile(request), + expectedError + ); const actualRequest = ( - client.innerApiCalls.listMigrationJobs as SinonStub + client.innerApiCalls.updateConnectionProfile as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listMigrationJobs as SinonStub + client.innerApiCalls.updateConnectionProfile as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listMigrationJobsStream without error', async () => { + it('invokes updateConnectionProfile with LRO error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.UpdateConnectionProfileRequest() + ); + request.connectionProfile ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.UpdateConnectionProfileRequest', + ['connectionProfile', 'name'] + ); + request.connectionProfile.name = defaultValue1; + const expectedHeaderRequestParams = `connection_profile.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateConnectionProfile = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateConnectionProfile(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateConnectionProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateConnectionProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateConnectionProfileProgress without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkUpdateConnectionProfileProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateConnectionProfileProgress with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkUpdateConnectionProfileProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteConnectionProfile', () => { + it('invokes deleteConnectionProfile without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.DeleteConnectionProfileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.DeleteConnectionProfileRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteConnectionProfile = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteConnectionProfile(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteConnectionProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteConnectionProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConnectionProfile without error using callback', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.DeleteConnectionProfileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.DeleteConnectionProfileRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteConnectionProfile = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteConnectionProfile( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteConnectionProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteConnectionProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConnectionProfile with call error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.DeleteConnectionProfileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.DeleteConnectionProfileRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteConnectionProfile = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.deleteConnectionProfile(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.deleteConnectionProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteConnectionProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConnectionProfile with LRO error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.DeleteConnectionProfileRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.DeleteConnectionProfileRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteConnectionProfile = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteConnectionProfile(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteConnectionProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteConnectionProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteConnectionProfileProgress without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkDeleteConnectionProfileProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteConnectionProfileProgress with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkDeleteConnectionProfileProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createPrivateConnection', () => { + it('invokes createPrivateConnection without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.CreatePrivateConnectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.CreatePrivateConnectionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createPrivateConnection = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createPrivateConnection(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createPrivateConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createPrivateConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createPrivateConnection without error using callback', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.CreatePrivateConnectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.CreatePrivateConnectionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createPrivateConnection = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createPrivateConnection( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.clouddms.v1.IPrivateConnection, + protos.google.cloud.clouddms.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.clouddms.v1.IPrivateConnection, + protos.google.cloud.clouddms.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createPrivateConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createPrivateConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createPrivateConnection with call error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.CreatePrivateConnectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.CreatePrivateConnectionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createPrivateConnection = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.createPrivateConnection(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.createPrivateConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createPrivateConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createPrivateConnection with LRO error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.CreatePrivateConnectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.CreatePrivateConnectionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createPrivateConnection = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createPrivateConnection(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createPrivateConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createPrivateConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreatePrivateConnectionProgress without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkCreatePrivateConnectionProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreatePrivateConnectionProgress with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkCreatePrivateConnectionProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deletePrivateConnection', () => { + it('invokes deletePrivateConnection without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.DeletePrivateConnectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.DeletePrivateConnectionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deletePrivateConnection = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deletePrivateConnection(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deletePrivateConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deletePrivateConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deletePrivateConnection without error using callback', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.DeletePrivateConnectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.DeletePrivateConnectionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deletePrivateConnection = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deletePrivateConnection( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deletePrivateConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deletePrivateConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deletePrivateConnection with call error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.DeletePrivateConnectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.DeletePrivateConnectionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deletePrivateConnection = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.deletePrivateConnection(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.deletePrivateConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deletePrivateConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deletePrivateConnection with LRO error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.DeletePrivateConnectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.DeletePrivateConnectionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deletePrivateConnection = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deletePrivateConnection(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deletePrivateConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deletePrivateConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeletePrivateConnectionProgress without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkDeletePrivateConnectionProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeletePrivateConnectionProgress with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkDeletePrivateConnectionProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createConversionWorkspace', () => { + it('invokes createConversionWorkspace without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.CreateConversionWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.CreateConversionWorkspaceRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createConversionWorkspace = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createConversionWorkspace(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createConversionWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createConversionWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConversionWorkspace without error using callback', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.CreateConversionWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.CreateConversionWorkspaceRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createConversionWorkspace = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createConversionWorkspace( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createConversionWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createConversionWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConversionWorkspace with call error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.CreateConversionWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.CreateConversionWorkspaceRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createConversionWorkspace = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.createConversionWorkspace(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.createConversionWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createConversionWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConversionWorkspace with LRO error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.CreateConversionWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.CreateConversionWorkspaceRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createConversionWorkspace = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createConversionWorkspace(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createConversionWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createConversionWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateConversionWorkspaceProgress without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkCreateConversionWorkspaceProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateConversionWorkspaceProgress with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkCreateConversionWorkspaceProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateConversionWorkspace', () => { + it('invokes updateConversionWorkspace without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest() + ); + request.conversionWorkspace ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest', + ['conversionWorkspace', 'name'] + ); + request.conversionWorkspace.name = defaultValue1; + const expectedHeaderRequestParams = `conversion_workspace.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateConversionWorkspace = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateConversionWorkspace(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateConversionWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateConversionWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateConversionWorkspace without error using callback', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest() + ); + request.conversionWorkspace ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest', + ['conversionWorkspace', 'name'] + ); + request.conversionWorkspace.name = defaultValue1; + const expectedHeaderRequestParams = `conversion_workspace.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateConversionWorkspace = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateConversionWorkspace( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateConversionWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateConversionWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateConversionWorkspace with call error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest() + ); + request.conversionWorkspace ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest', + ['conversionWorkspace', 'name'] + ); + request.conversionWorkspace.name = defaultValue1; + const expectedHeaderRequestParams = `conversion_workspace.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateConversionWorkspace = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.updateConversionWorkspace(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.updateConversionWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateConversionWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateConversionWorkspace with LRO error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest() + ); + request.conversionWorkspace ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.UpdateConversionWorkspaceRequest', + ['conversionWorkspace', 'name'] + ); + request.conversionWorkspace.name = defaultValue1; + const expectedHeaderRequestParams = `conversion_workspace.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateConversionWorkspace = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateConversionWorkspace(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateConversionWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateConversionWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateConversionWorkspaceProgress without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkUpdateConversionWorkspaceProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateConversionWorkspaceProgress with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkUpdateConversionWorkspaceProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteConversionWorkspace', () => { + it('invokes deleteConversionWorkspace without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteConversionWorkspace = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteConversionWorkspace(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteConversionWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteConversionWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConversionWorkspace without error using callback', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteConversionWorkspace = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteConversionWorkspace( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.clouddms.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteConversionWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteConversionWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConversionWorkspace with call error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteConversionWorkspace = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.deleteConversionWorkspace(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.deleteConversionWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteConversionWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConversionWorkspace with LRO error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.DeleteConversionWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteConversionWorkspace = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteConversionWorkspace(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteConversionWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteConversionWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteConversionWorkspaceProgress without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkDeleteConversionWorkspaceProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteConversionWorkspaceProgress with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkDeleteConversionWorkspaceProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('seedConversionWorkspace', () => { + it('invokes seedConversionWorkspace without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.SeedConversionWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.SeedConversionWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.seedConversionWorkspace = + stubLongRunningCall(expectedResponse); + const [operation] = await client.seedConversionWorkspace(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.seedConversionWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.seedConversionWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes seedConversionWorkspace without error using callback', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.SeedConversionWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.SeedConversionWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.seedConversionWorkspace = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.seedConversionWorkspace( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.seedConversionWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.seedConversionWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes seedConversionWorkspace with call error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.SeedConversionWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.SeedConversionWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.seedConversionWorkspace = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.seedConversionWorkspace(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.seedConversionWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.seedConversionWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes seedConversionWorkspace with LRO error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.SeedConversionWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.SeedConversionWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.seedConversionWorkspace = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.seedConversionWorkspace(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.seedConversionWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.seedConversionWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkSeedConversionWorkspaceProgress without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkSeedConversionWorkspaceProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkSeedConversionWorkspaceProgress with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkSeedConversionWorkspaceProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('importMappingRules', () => { + it('invokes importMappingRules without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ImportMappingRulesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ImportMappingRulesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.importMappingRules = + stubLongRunningCall(expectedResponse); + const [operation] = await client.importMappingRules(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.importMappingRules as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.importMappingRules as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importMappingRules without error using callback', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ImportMappingRulesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ImportMappingRulesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.importMappingRules = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.importMappingRules( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.importMappingRules as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.importMappingRules as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importMappingRules with call error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ImportMappingRulesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ImportMappingRulesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.importMappingRules = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.importMappingRules(request), expectedError); + const actualRequest = ( + client.innerApiCalls.importMappingRules as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.importMappingRules as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importMappingRules with LRO error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ImportMappingRulesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ImportMappingRulesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.importMappingRules = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.importMappingRules(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.importMappingRules as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.importMappingRules as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkImportMappingRulesProgress without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkImportMappingRulesProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkImportMappingRulesProgress with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkImportMappingRulesProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('convertConversionWorkspace', () => { + it('invokes convertConversionWorkspace without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.convertConversionWorkspace = + stubLongRunningCall(expectedResponse); + const [operation] = await client.convertConversionWorkspace(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.convertConversionWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.convertConversionWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes convertConversionWorkspace without error using callback', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.convertConversionWorkspace = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.convertConversionWorkspace( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.convertConversionWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.convertConversionWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes convertConversionWorkspace with call error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.convertConversionWorkspace = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.convertConversionWorkspace(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.convertConversionWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.convertConversionWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes convertConversionWorkspace with LRO error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ConvertConversionWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.convertConversionWorkspace = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.convertConversionWorkspace(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.convertConversionWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.convertConversionWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkConvertConversionWorkspaceProgress without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkConvertConversionWorkspaceProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkConvertConversionWorkspaceProgress with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkConvertConversionWorkspaceProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('commitConversionWorkspace', () => { + it('invokes commitConversionWorkspace without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.CommitConversionWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.CommitConversionWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.commitConversionWorkspace = + stubLongRunningCall(expectedResponse); + const [operation] = await client.commitConversionWorkspace(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.commitConversionWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.commitConversionWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes commitConversionWorkspace without error using callback', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.CommitConversionWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.CommitConversionWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.commitConversionWorkspace = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.commitConversionWorkspace( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.commitConversionWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.commitConversionWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes commitConversionWorkspace with call error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.CommitConversionWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.CommitConversionWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.commitConversionWorkspace = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.commitConversionWorkspace(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.commitConversionWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.commitConversionWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes commitConversionWorkspace with LRO error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.CommitConversionWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.CommitConversionWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.commitConversionWorkspace = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.commitConversionWorkspace(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.commitConversionWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.commitConversionWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCommitConversionWorkspaceProgress without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkCommitConversionWorkspaceProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCommitConversionWorkspaceProgress with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkCommitConversionWorkspaceProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('rollbackConversionWorkspace', () => { + it('invokes rollbackConversionWorkspace without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.rollbackConversionWorkspace = + stubLongRunningCall(expectedResponse); + const [operation] = await client.rollbackConversionWorkspace(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.rollbackConversionWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.rollbackConversionWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes rollbackConversionWorkspace without error using callback', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.rollbackConversionWorkspace = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.rollbackConversionWorkspace( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.rollbackConversionWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.rollbackConversionWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes rollbackConversionWorkspace with call error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.rollbackConversionWorkspace = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.rollbackConversionWorkspace(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.rollbackConversionWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.rollbackConversionWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes rollbackConversionWorkspace with LRO error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.RollbackConversionWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.rollbackConversionWorkspace = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.rollbackConversionWorkspace(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.rollbackConversionWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.rollbackConversionWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkRollbackConversionWorkspaceProgress without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkRollbackConversionWorkspaceProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkRollbackConversionWorkspaceProgress with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkRollbackConversionWorkspaceProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('applyConversionWorkspace', () => { + it('invokes applyConversionWorkspace without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.applyConversionWorkspace = + stubLongRunningCall(expectedResponse); + const [operation] = await client.applyConversionWorkspace(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.applyConversionWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.applyConversionWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes applyConversionWorkspace without error using callback', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.applyConversionWorkspace = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.applyConversionWorkspace( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.clouddms.v1.IConversionWorkspace, + protos.google.cloud.clouddms.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.applyConversionWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.applyConversionWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes applyConversionWorkspace with call error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.applyConversionWorkspace = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.applyConversionWorkspace(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.applyConversionWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.applyConversionWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes applyConversionWorkspace with LRO error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ApplyConversionWorkspaceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.applyConversionWorkspace = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.applyConversionWorkspace(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.applyConversionWorkspace as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.applyConversionWorkspace as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkApplyConversionWorkspaceProgress without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkApplyConversionWorkspaceProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkApplyConversionWorkspaceProgress with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkApplyConversionWorkspaceProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listMigrationJobs', () => { + it('invokes listMigrationJobs without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ListMigrationJobsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ListMigrationJobsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.clouddms.v1.MigrationJob() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.MigrationJob() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.MigrationJob() + ), + ]; + client.innerApiCalls.listMigrationJobs = stubSimpleCall(expectedResponse); + const [response] = await client.listMigrationJobs(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listMigrationJobs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listMigrationJobs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMigrationJobs without error using callback', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ListMigrationJobsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ListMigrationJobsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.clouddms.v1.MigrationJob() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.MigrationJob() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.MigrationJob() + ), + ]; + client.innerApiCalls.listMigrationJobs = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listMigrationJobs( + request, + ( + err?: Error | null, + result?: protos.google.cloud.clouddms.v1.IMigrationJob[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listMigrationJobs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listMigrationJobs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMigrationJobs with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ListMigrationJobsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ListMigrationJobsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listMigrationJobs = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listMigrationJobs(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listMigrationJobs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listMigrationJobs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMigrationJobsStream without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ListMigrationJobsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ListMigrationJobsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.clouddms.v1.MigrationJob() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.MigrationJob() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.MigrationJob() + ), + ]; + client.descriptors.page.listMigrationJobs.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listMigrationJobsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.clouddms.v1.MigrationJob[] = []; + stream.on( + 'data', + (response: protos.google.cloud.clouddms.v1.MigrationJob) => { + 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.listMigrationJobs.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listMigrationJobs, request) + ); + assert( + (client.descriptors.page.listMigrationJobs.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listMigrationJobsStream with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ListMigrationJobsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ListMigrationJobsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listMigrationJobs.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listMigrationJobsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.clouddms.v1.MigrationJob[] = []; + stream.on( + 'data', + (response: protos.google.cloud.clouddms.v1.MigrationJob) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listMigrationJobs.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listMigrationJobs, request) + ); + assert( + (client.descriptors.page.listMigrationJobs.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listMigrationJobs without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ListMigrationJobsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ListMigrationJobsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.clouddms.v1.MigrationJob() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.MigrationJob() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.MigrationJob() + ), + ]; + client.descriptors.page.listMigrationJobs.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.clouddms.v1.IMigrationJob[] = []; + const iterable = client.listMigrationJobsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listMigrationJobs.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listMigrationJobs.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listMigrationJobs with error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3229,58 +6192,1978 @@ describe('v1.DataMigrationServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.clouddms.v1.ListMigrationJobsRequest() ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.ListMigrationJobsRequest', - ['parent'] + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ListMigrationJobsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listMigrationJobs.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listMigrationJobsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.clouddms.v1.IMigrationJob[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listMigrationJobs.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listMigrationJobs.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listConnectionProfiles', () => { + it('invokes listConnectionProfiles without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ListConnectionProfilesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ListConnectionProfilesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.clouddms.v1.ConnectionProfile() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.ConnectionProfile() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.ConnectionProfile() + ), + ]; + client.innerApiCalls.listConnectionProfiles = + stubSimpleCall(expectedResponse); + const [response] = await client.listConnectionProfiles(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listConnectionProfiles as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listConnectionProfiles as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConnectionProfiles without error using callback', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ListConnectionProfilesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ListConnectionProfilesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.clouddms.v1.ConnectionProfile() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.ConnectionProfile() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.ConnectionProfile() + ), + ]; + client.innerApiCalls.listConnectionProfiles = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listConnectionProfiles( + request, + ( + err?: Error | null, + result?: protos.google.cloud.clouddms.v1.IConnectionProfile[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listConnectionProfiles as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listConnectionProfiles as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConnectionProfiles with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ListConnectionProfilesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ListConnectionProfilesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listConnectionProfiles = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listConnectionProfiles(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.listConnectionProfiles as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listConnectionProfiles as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConnectionProfilesStream without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ListConnectionProfilesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ListConnectionProfilesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.clouddms.v1.ConnectionProfile() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.ConnectionProfile() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.ConnectionProfile() + ), + ]; + client.descriptors.page.listConnectionProfiles.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listConnectionProfilesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.clouddms.v1.ConnectionProfile[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.clouddms.v1.ConnectionProfile) => { + 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.listConnectionProfiles + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listConnectionProfiles, request) + ); + assert( + ( + client.descriptors.page.listConnectionProfiles + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listConnectionProfilesStream with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ListConnectionProfilesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ListConnectionProfilesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listConnectionProfiles.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listConnectionProfilesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.clouddms.v1.ConnectionProfile[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.clouddms.v1.ConnectionProfile) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listConnectionProfiles + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listConnectionProfiles, request) + ); + assert( + ( + client.descriptors.page.listConnectionProfiles + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listConnectionProfiles without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ListConnectionProfilesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ListConnectionProfilesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.clouddms.v1.ConnectionProfile() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.ConnectionProfile() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.ConnectionProfile() + ), + ]; + client.descriptors.page.listConnectionProfiles.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.clouddms.v1.IConnectionProfile[] = + []; + const iterable = client.listConnectionProfilesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listConnectionProfiles + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listConnectionProfiles + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listConnectionProfiles with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ListConnectionProfilesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ListConnectionProfilesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listConnectionProfiles.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listConnectionProfilesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.clouddms.v1.IConnectionProfile[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listConnectionProfiles + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listConnectionProfiles + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listPrivateConnections', () => { + it('invokes listPrivateConnections without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ListPrivateConnectionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ListPrivateConnectionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.clouddms.v1.PrivateConnection() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.PrivateConnection() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.PrivateConnection() + ), + ]; + client.innerApiCalls.listPrivateConnections = + stubSimpleCall(expectedResponse); + const [response] = await client.listPrivateConnections(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listPrivateConnections as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listPrivateConnections as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPrivateConnections without error using callback', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ListPrivateConnectionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ListPrivateConnectionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.clouddms.v1.PrivateConnection() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.PrivateConnection() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.PrivateConnection() + ), + ]; + client.innerApiCalls.listPrivateConnections = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listPrivateConnections( + request, + ( + err?: Error | null, + result?: protos.google.cloud.clouddms.v1.IPrivateConnection[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listPrivateConnections as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listPrivateConnections as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPrivateConnections with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ListPrivateConnectionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ListPrivateConnectionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listPrivateConnections = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listPrivateConnections(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.listPrivateConnections as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listPrivateConnections as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPrivateConnectionsStream without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ListPrivateConnectionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ListPrivateConnectionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.clouddms.v1.PrivateConnection() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.PrivateConnection() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.PrivateConnection() + ), + ]; + client.descriptors.page.listPrivateConnections.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listPrivateConnectionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.clouddms.v1.PrivateConnection[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.clouddms.v1.PrivateConnection) => { + 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.listPrivateConnections + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listPrivateConnections, request) + ); + assert( + ( + client.descriptors.page.listPrivateConnections + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listPrivateConnectionsStream with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ListPrivateConnectionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ListPrivateConnectionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listPrivateConnections.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listPrivateConnectionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.clouddms.v1.PrivateConnection[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.clouddms.v1.PrivateConnection) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listPrivateConnections + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listPrivateConnections, request) + ); + assert( + ( + client.descriptors.page.listPrivateConnections + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listPrivateConnections without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ListPrivateConnectionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ListPrivateConnectionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.clouddms.v1.PrivateConnection() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.PrivateConnection() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.PrivateConnection() + ), + ]; + client.descriptors.page.listPrivateConnections.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.clouddms.v1.IPrivateConnection[] = + []; + const iterable = client.listPrivateConnectionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listPrivateConnections + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listPrivateConnections + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listPrivateConnections with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ListPrivateConnectionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ListPrivateConnectionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listPrivateConnections.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listPrivateConnectionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.clouddms.v1.IPrivateConnection[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listPrivateConnections + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listPrivateConnections + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listConversionWorkspaces', () => { + it('invokes listConversionWorkspaces without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ListConversionWorkspacesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ListConversionWorkspacesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.clouddms.v1.ConversionWorkspace() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.ConversionWorkspace() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.ConversionWorkspace() + ), + ]; + client.innerApiCalls.listConversionWorkspaces = + stubSimpleCall(expectedResponse); + const [response] = await client.listConversionWorkspaces(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listConversionWorkspaces as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listConversionWorkspaces as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConversionWorkspaces without error using callback', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ListConversionWorkspacesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ListConversionWorkspacesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.clouddms.v1.ConversionWorkspace() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.ConversionWorkspace() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.ConversionWorkspace() + ), + ]; + client.innerApiCalls.listConversionWorkspaces = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listConversionWorkspaces( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.clouddms.v1.IConversionWorkspace[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listConversionWorkspaces as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listConversionWorkspaces as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConversionWorkspaces with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ListConversionWorkspacesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ListConversionWorkspacesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listConversionWorkspaces = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listConversionWorkspaces(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.listConversionWorkspaces as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listConversionWorkspaces as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConversionWorkspacesStream without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ListConversionWorkspacesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ListConversionWorkspacesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.clouddms.v1.ConversionWorkspace() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.ConversionWorkspace() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.ConversionWorkspace() + ), + ]; + client.descriptors.page.listConversionWorkspaces.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listConversionWorkspacesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.clouddms.v1.ConversionWorkspace[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.clouddms.v1.ConversionWorkspace) => { + 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.listConversionWorkspaces + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listConversionWorkspaces, request) + ); + assert( + ( + client.descriptors.page.listConversionWorkspaces + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listConversionWorkspacesStream with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ListConversionWorkspacesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ListConversionWorkspacesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listConversionWorkspaces.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listConversionWorkspacesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.clouddms.v1.ConversionWorkspace[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.clouddms.v1.ConversionWorkspace) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listConversionWorkspaces + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listConversionWorkspaces, request) + ); + assert( + ( + client.descriptors.page.listConversionWorkspaces + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listConversionWorkspaces without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ListConversionWorkspacesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ListConversionWorkspacesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.clouddms.v1.ConversionWorkspace() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.ConversionWorkspace() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.ConversionWorkspace() + ), + ]; + client.descriptors.page.listConversionWorkspaces.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.clouddms.v1.IConversionWorkspace[] = + []; + const iterable = client.listConversionWorkspacesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listConversionWorkspaces + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listConversionWorkspaces + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listConversionWorkspaces with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.ListConversionWorkspacesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.ListConversionWorkspacesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listConversionWorkspaces.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listConversionWorkspacesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.clouddms.v1.IConversionWorkspace[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listConversionWorkspaces + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listConversionWorkspaces + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('describeDatabaseEntities', () => { + it('invokes describeDatabaseEntities without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest', + ['conversionWorkspace'] + ); + request.conversionWorkspace = defaultValue1; + const expectedHeaderRequestParams = `conversion_workspace=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.clouddms.v1.DatabaseEntity() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.DatabaseEntity() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.DatabaseEntity() + ), + ]; + client.innerApiCalls.describeDatabaseEntities = + stubSimpleCall(expectedResponse); + const [response] = await client.describeDatabaseEntities(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.describeDatabaseEntities as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.describeDatabaseEntities as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes describeDatabaseEntities without error using callback', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest', + ['conversionWorkspace'] + ); + request.conversionWorkspace = defaultValue1; + const expectedHeaderRequestParams = `conversion_workspace=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.clouddms.v1.DatabaseEntity() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.DatabaseEntity() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.DatabaseEntity() + ), + ]; + client.innerApiCalls.describeDatabaseEntities = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.describeDatabaseEntities( + request, + ( + err?: Error | null, + result?: protos.google.cloud.clouddms.v1.IDatabaseEntity[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.describeDatabaseEntities as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.describeDatabaseEntities as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes describeDatabaseEntities with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest', + ['conversionWorkspace'] + ); + request.conversionWorkspace = defaultValue1; + const expectedHeaderRequestParams = `conversion_workspace=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.describeDatabaseEntities = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.describeDatabaseEntities(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.describeDatabaseEntities as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.describeDatabaseEntities as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes describeDatabaseEntitiesStream without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest', + ['conversionWorkspace'] + ); + request.conversionWorkspace = defaultValue1; + const expectedHeaderRequestParams = `conversion_workspace=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.clouddms.v1.DatabaseEntity() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.DatabaseEntity() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.DatabaseEntity() + ), + ]; + client.descriptors.page.describeDatabaseEntities.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.describeDatabaseEntitiesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.clouddms.v1.DatabaseEntity[] = []; + stream.on( + 'data', + (response: protos.google.cloud.clouddms.v1.DatabaseEntity) => { + 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.describeDatabaseEntities + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.describeDatabaseEntities, request) + ); + assert( + ( + client.descriptors.page.describeDatabaseEntities + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes describeDatabaseEntitiesStream with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest', + ['conversionWorkspace'] + ); + request.conversionWorkspace = defaultValue1; + const expectedHeaderRequestParams = `conversion_workspace=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.describeDatabaseEntities.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.describeDatabaseEntitiesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.clouddms.v1.DatabaseEntity[] = []; + stream.on( + 'data', + (response: protos.google.cloud.clouddms.v1.DatabaseEntity) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.describeDatabaseEntities + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.describeDatabaseEntities, request) + ); + assert( + ( + client.descriptors.page.describeDatabaseEntities + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with describeDatabaseEntities without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest', + ['conversionWorkspace'] + ); + request.conversionWorkspace = defaultValue1; + const expectedHeaderRequestParams = `conversion_workspace=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.clouddms.v1.DatabaseEntity() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.DatabaseEntity() + ), + generateSampleMessage( + new protos.google.cloud.clouddms.v1.DatabaseEntity() + ), + ]; + client.descriptors.page.describeDatabaseEntities.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.clouddms.v1.IDatabaseEntity[] = []; + const iterable = client.describeDatabaseEntitiesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.describeDatabaseEntities + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.describeDatabaseEntities + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with describeDatabaseEntities with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest', + ['conversionWorkspace'] + ); + request.conversionWorkspace = defaultValue1; + const expectedHeaderRequestParams = `conversion_workspace=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.describeDatabaseEntities.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.describeDatabaseEntitiesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.clouddms.v1.IDatabaseEntity[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.describeDatabaseEntities + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.describeDatabaseEntities + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('fetchStaticIps', () => { + it('invokes fetchStaticIps without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.FetchStaticIpsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.FetchStaticIpsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = [new String(), new String(), new String()]; + client.innerApiCalls.fetchStaticIps = stubSimpleCall(expectedResponse); + const [response] = await client.fetchStaticIps(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchStaticIps as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchStaticIps as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchStaticIps without error using callback', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.FetchStaticIpsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.FetchStaticIpsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = [new String(), new String(), new String()]; + client.innerApiCalls.fetchStaticIps = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchStaticIps( + request, + (err?: Error | null, result?: string[] | null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchStaticIps as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchStaticIps as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchStaticIps with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.FetchStaticIpsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.FetchStaticIpsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchStaticIps = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.fetchStaticIps(request), expectedError); + const actualRequest = ( + client.innerApiCalls.fetchStaticIps as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchStaticIps as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchStaticIpsStream without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.FetchStaticIpsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.FetchStaticIpsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = [new String(), new String(), new String()]; + client.descriptors.page.fetchStaticIps.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.fetchStaticIpsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: string[] = []; + stream.on('data', (response: string) => { + 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.fetchStaticIps.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.fetchStaticIps, request) + ); + assert( + (client.descriptors.page.fetchStaticIps.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes fetchStaticIpsStream with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.FetchStaticIpsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.FetchStaticIpsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.fetchStaticIps.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.fetchStaticIpsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: string[] = []; + stream.on('data', (response: string) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.fetchStaticIps.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.fetchStaticIps, request) + ); + assert( + (client.descriptors.page.fetchStaticIps.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with fetchStaticIps without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.FetchStaticIpsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.FetchStaticIpsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = [new String(), new String(), new String()]; + client.descriptors.page.fetchStaticIps.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: string[] = []; + const iterable = client.fetchStaticIpsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.fetchStaticIps.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.fetchStaticIps.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with fetchStaticIps with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.clouddms.v1.FetchStaticIpsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.clouddms.v1.FetchStaticIpsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.fetchStaticIps.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.fetchStaticIpsAsync(request); + await assert.rejects(async () => { + const responses: string[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.fetchStaticIps.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.fetchStaticIps.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.clouddms.v1.MigrationJob() - ), - generateSampleMessage( - new protos.google.cloud.clouddms.v1.MigrationJob() - ), - generateSampleMessage( - new protos.google.cloud.clouddms.v1.MigrationJob() - ), - ]; - client.descriptors.page.listMigrationJobs.createStream = - stubPageStreamingCall(expectedResponse); - const stream = client.listMigrationJobsStream(request); + client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.getIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getIamPolicy without error using callback', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.clouddms.v1.MigrationJob[] = []; - stream.on( - 'data', - (response: protos.google.cloud.clouddms.v1.MigrationJob) => { - responses.push(response); + client.getIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } } ); - stream.on('end', () => { - resolve(responses); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.getIamPolicy as SinonStub).getCall(0)); + }); + it('invokes getIamPolicy with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', }); - stream.on('error', (err: Error) => { - reject(err); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.getIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', }); - }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.setIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); assert( - (client.descriptors.page.listMigrationJobs.createStream as SinonStub) + (client.iamClient.setIamPolicy as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listMigrationJobs, request) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes setIamPolicy without error using callback', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.setIamPolicy as SinonStub).getCall(0)); + }); + it('invokes setIamPolicy with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.setIamPolicy(request, expectedOptions), + expectedError ); assert( - (client.descriptors.page.listMigrationJobs.createStream as SinonStub) + (client.iamClient.setIamPolicy as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .calledWith(request, expectedOptions, undefined) ); }); - - it('invokes listMigrationJobsStream with error', async () => { + }); + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3288,49 +8171,226 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.ListMigrationJobsRequest() + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.ListMigrationJobsRequest', - ['parent'] + client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); + const response = await client.testIamPermissions( + request, + expectedOptions ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes testIamPermissions without error using callback', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.TestIamPermissionsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.testIamPermissions as SinonStub).getCall(0)); + }); + it('invokes testIamPermissions with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedError = new Error('expected'); - client.descriptors.page.listMigrationJobs.createStream = - stubPageStreamingCall(undefined, expectedError); - const stream = client.listMigrationJobsStream(request); + client.iamClient.testIamPermissions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.testIamPermissions(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getLocation without error using callback', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.clouddms.v1.MigrationJob[] = []; - stream.on( - 'data', - (response: protos.google.cloud.clouddms.v1.MigrationJob) => { - responses.push(response); + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } } ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); }); - await assert.rejects(promise, expectedError); - assert( - (client.descriptors.page.listMigrationJobs.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listMigrationJobs, request) + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub).getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getLocation(request, expectedOptions), + expectedError ); assert( - (client.descriptors.page.listMigrationJobs.createStream as SinonStub) + (client.locationsClient.getLocation as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .calledWith(request, expectedOptions, undefined) ); }); - - it('uses async iteration with listMigrationJobs without error', async () => { + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3338,49 +8398,48 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.ListMigrationJobsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.ListMigrationJobsRequest', - ['parent'] + new LocationProtos.google.cloud.location.ListLocationsRequest() ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = ''; + const expectedHeaderRequestParams = 'name='; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.clouddms.v1.MigrationJob() + new LocationProtos.google.cloud.location.Location() ), generateSampleMessage( - new protos.google.cloud.clouddms.v1.MigrationJob() + new LocationProtos.google.cloud.location.Location() ), generateSampleMessage( - new protos.google.cloud.clouddms.v1.MigrationJob() + new LocationProtos.google.cloud.location.Location() ), ]; - client.descriptors.page.listMigrationJobs.asyncIterate = + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.clouddms.v1.IMigrationJob[] = []; - const iterable = client.listMigrationJobsAsync(request); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listMigrationJobs.asyncIterate as SinonStub + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listMigrationJobs.asyncIterate as SinonStub) + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams ) ); }); - - it('uses async iteration with listMigrationJobs with error', async () => { + it('uses async iteration with listLocations with error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3388,32 +8447,32 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.ListMigrationJobsRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.ListMigrationJobsRequest', - ['parent'] + new LocationProtos.google.cloud.location.ListLocationsRequest() ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = ''; + const expectedHeaderRequestParams = 'name='; const expectedError = new Error('expected'); - client.descriptors.page.listMigrationJobs.asyncIterate = + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listMigrationJobsAsync(request); + const iterable = client.listLocationsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.clouddms.v1.IMigrationJob[] = []; + const responses: LocationProtos.google.cloud.location.ILocation[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( ( - client.descriptors.page.listMigrationJobs.asyncIterate as SinonStub + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( - (client.descriptors.page.listMigrationJobs.asyncIterate as SinonStub) + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) .getCall(0) .args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams @@ -3421,9 +8480,8 @@ describe('v1.DataMigrationServiceClient', () => { ); }); }); - - describe('listConnectionProfiles', () => { - it('invokes listConnectionProfiles without error', async () => { + describe('getOperation', () => { + it('invokes getOperation without error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3431,74 +8489,42 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.ListConnectionProfilesRequest() + new operationsProtos.google.longrunning.GetOperationRequest() ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.ListConnectionProfilesRequest', - ['parent'] + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.clouddms.v1.ConnectionProfile() - ), - generateSampleMessage( - new protos.google.cloud.clouddms.v1.ConnectionProfile() - ), - generateSampleMessage( - new protos.google.cloud.clouddms.v1.ConnectionProfile() - ), - ]; - client.innerApiCalls.listConnectionProfiles = - stubSimpleCall(expectedResponse); - const [response] = await client.listConnectionProfiles(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listConnectionProfiles as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listConnectionProfiles as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - - it('invokes listConnectionProfiles without error using callback', async () => { + it('invokes getOperation without error using callback', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.ListConnectionProfilesRequest() + new operationsProtos.google.longrunning.GetOperationRequest() ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.ListConnectionProfilesRequest', - ['parent'] + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.clouddms.v1.ConnectionProfile() - ), - generateSampleMessage( - new protos.google.cloud.clouddms.v1.ConnectionProfile() - ), - generateSampleMessage( - new protos.google.cloud.clouddms.v1.ConnectionProfile() - ), - ]; - client.innerApiCalls.listConnectionProfiles = - stubSimpleCallWithCallback(expectedResponse); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); const promise = new Promise((resolve, reject) => { - client.listConnectionProfiles( + client.operationsClient.getOperation( request, + undefined, ( err?: Error | null, - result?: protos.google.cloud.clouddms.v1.IConnectionProfile[] | null + result?: operationsProtos.google.longrunning.Operation | null ) => { if (err) { reject(err); @@ -3510,52 +8536,34 @@ describe('v1.DataMigrationServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listConnectionProfiles as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listConnectionProfiles as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - - it('invokes listConnectionProfiles with error', async () => { + it('invokes getOperation with error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.ListConnectionProfilesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.ListConnectionProfilesRequest', - ['parent'] + new operationsProtos.google.longrunning.GetOperationRequest() ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listConnectionProfiles = stubSimpleCall( + client.operationsClient.getOperation = stubSimpleCall( undefined, expectedError ); - await assert.rejects( - client.listConnectionProfiles(request), - expectedError + await assert.rejects(async () => { + await client.getOperation(request); + }, expectedError); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) ); - const actualRequest = ( - client.innerApiCalls.listConnectionProfiles as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listConnectionProfiles as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - - it('invokes listConnectionProfilesStream without error', async () => { + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3563,179 +8571,202 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.ListConnectionProfilesRequest() + new operationsProtos.google.longrunning.CancelOperationRequest() ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.ListConnectionProfilesRequest', - ['parent'] + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.clouddms.v1.ConnectionProfile() - ), - generateSampleMessage( - new protos.google.cloud.clouddms.v1.ConnectionProfile() - ), - generateSampleMessage( - new protos.google.cloud.clouddms.v1.ConnectionProfile() - ), - ]; - client.descriptors.page.listConnectionProfiles.createStream = - stubPageStreamingCall(expectedResponse); - const stream = client.listConnectionProfilesStream(request); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.clouddms.v1.ConnectionProfile[] = - []; - stream.on( - 'data', - (response: protos.google.cloud.clouddms.v1.ConnectionProfile) => { - responses.push(response); + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } } ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.cancelOperation(request); + }, expectedError); assert( - ( - client.descriptors.page.listConnectionProfiles - .createStream as SinonStub - ) + (client.operationsClient.cancelOperation as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listConnectionProfiles, request) + .calledWith(request) + ); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); assert( - ( - client.descriptors.page.listConnectionProfiles - .createStream as SinonStub - ) + (client.operationsClient.deleteOperation as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .calledWith(request) ); }); - - it('invokes listConnectionProfilesStream with error', async () => { + it('invokes deleteOperation without error using callback', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.ListConnectionProfilesRequest() + new operationsProtos.google.longrunning.DeleteOperationRequest() ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.ListConnectionProfilesRequest', - ['parent'] + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listConnectionProfiles.createStream = - stubPageStreamingCall(undefined, expectedError); - const stream = client.listConnectionProfilesStream(request); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.clouddms.v1.ConnectionProfile[] = - []; - stream.on( - 'data', - (response: protos.google.cloud.clouddms.v1.ConnectionProfile) => { - responses.push(response); + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } } ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); }); - await assert.rejects(promise, expectedError); - assert( - ( - client.descriptors.page.listConnectionProfiles - .createStream as SinonStub - ) - .getCall(0) - .calledWith(client.innerApiCalls.listConnectionProfiles, request) + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall( + undefined, + expectedError ); + await assert.rejects(async () => { + await client.deleteOperation(request); + }, expectedError); assert( - ( - client.descriptors.page.listConnectionProfiles - .createStream as SinonStub - ) + (client.operationsClient.deleteOperation as SinonStub) .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) + .calledWith(request) ); }); - - it('uses async iteration with listConnectionProfiles without error', async () => { + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.ListConnectionProfilesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.ListConnectionProfilesRequest', - ['parent'] + new operationsProtos.google.longrunning.ListOperationsRequest() ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.clouddms.v1.ConnectionProfile() + new operationsProtos.google.longrunning.ListOperationsResponse() ), generateSampleMessage( - new protos.google.cloud.clouddms.v1.ConnectionProfile() + new operationsProtos.google.longrunning.ListOperationsResponse() ), generateSampleMessage( - new protos.google.cloud.clouddms.v1.ConnectionProfile() + new operationsProtos.google.longrunning.ListOperationsResponse() ), ]; - client.descriptors.page.listConnectionProfiles.asyncIterate = + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.clouddms.v1.IConnectionProfile[] = + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = []; - const iterable = client.listConnectionProfilesAsync(request); + const iterable = client.operationsClient.listOperationsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listConnectionProfiles + client.operationsClient.descriptor.listOperations .asyncIterate as SinonStub ).getCall(0).args[1], request ); - assert( - ( - client.descriptors.page.listConnectionProfiles - .asyncIterate as SinonStub - ) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); }); - - it('uses async iteration with listConnectionProfiles with error', async () => { + it('uses async iteration with listOperations with error', async () => { const client = new datamigrationserviceModule.v1.DataMigrationServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -3743,20 +8774,14 @@ describe('v1.DataMigrationServiceClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.clouddms.v1.ListConnectionProfilesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.clouddms.v1.ListConnectionProfilesRequest', - ['parent'] + new operationsProtos.google.longrunning.ListOperationsRequest() ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listConnectionProfiles.asyncIterate = + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listConnectionProfilesAsync(request); + const iterable = client.operationsClient.listOperationsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.clouddms.v1.IConnectionProfile[] = + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -3764,21 +8789,11 @@ describe('v1.DataMigrationServiceClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listConnectionProfiles + client.operationsClient.descriptor.listOperations .asyncIterate as SinonStub ).getCall(0).args[1], request ); - assert( - ( - client.descriptors.page.listConnectionProfiles - .asyncIterate as SinonStub - ) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); }); }); @@ -3861,6 +8876,85 @@ describe('v1.DataMigrationServiceClient', () => { }); }); + describe('conversionWorkspace', () => { + const fakePath = '/rendered/path/conversionWorkspace'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + conversion_workspace: 'conversionWorkspaceValue', + }; + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.conversionWorkspacePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.conversionWorkspacePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('conversionWorkspacePath', () => { + const result = client.conversionWorkspacePath( + 'projectValue', + 'locationValue', + 'conversionWorkspaceValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.conversionWorkspacePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromConversionWorkspaceName', () => { + const result = client.matchProjectFromConversionWorkspaceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.conversionWorkspacePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromConversionWorkspaceName', () => { + const result = + client.matchLocationFromConversionWorkspaceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.conversionWorkspacePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConversionWorkspaceFromConversionWorkspaceName', () => { + const result = + client.matchConversionWorkspaceFromConversionWorkspaceName(fakePath); + assert.strictEqual(result, 'conversionWorkspaceValue'); + assert( + ( + client.pathTemplates.conversionWorkspacePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('location', () => { const fakePath = '/rendered/path/location'; const expectedParameters = { @@ -3976,6 +9070,84 @@ describe('v1.DataMigrationServiceClient', () => { }); }); + describe('privateConnection', () => { + const fakePath = '/rendered/path/privateConnection'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + private_connection: 'privateConnectionValue', + }; + const client = + new datamigrationserviceModule.v1.DataMigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.privateConnectionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.privateConnectionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('privateConnectionPath', () => { + const result = client.privateConnectionPath( + 'projectValue', + 'locationValue', + 'privateConnectionValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.privateConnectionPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPrivateConnectionName', () => { + const result = client.matchProjectFromPrivateConnectionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.privateConnectionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPrivateConnectionName', () => { + const result = client.matchLocationFromPrivateConnectionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.privateConnectionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPrivateConnectionFromPrivateConnectionName', () => { + const result = + client.matchPrivateConnectionFromPrivateConnectionName(fakePath); + assert.strictEqual(result, 'privateConnectionValue'); + assert( + ( + client.pathTemplates.privateConnectionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('project', () => { const fakePath = '/rendered/path/project'; const expectedParameters = { diff --git a/packages/google-cloud-compute/package.json b/packages/google-cloud-compute/package.json index ce6f2a5c4a0..7fe885abd7c 100644 --- a/packages/google-cloud-compute/package.json +++ b/packages/google-cloud-compute/package.json @@ -109,20 +109,20 @@ "zones" ], "scripts": { - "test": "c8 node build/test/run.js", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "system-test": "npm run compile && c8 mocha build/system-test", - "lint": "gts check", - "fix": "gts fix", - "docs": "node --max-old-space-size=8192 ./node_modules/.bin/jsdoc -c .jsdoc.js", - "docs-test": "linkinator docs", "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", + "docs": "node --max-old-space-size=8192 ./node_modules/.bin/jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 node build/test/run.js" }, "dependencies": { "google-gax": "^3.5.8" @@ -138,6 +138,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -149,5 +150,4 @@ "webpack-cli": "^5.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-compute" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-confidentialcomputing/.OwlBot.yaml b/packages/google-cloud-confidentialcomputing/.OwlBot.yaml new file mode 100644 index 00000000000..434c8b70e5b --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/.OwlBot.yaml @@ -0,0 +1,19 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# 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. + +deep-copy-regex: + - source: /google/cloud/confidentialcomputing/(.*)/.*-nodejs + dest: /owl-bot-staging/google-cloud-confidentialcomputing/$1 + +api-name: confidentialcomputing \ No newline at end of file diff --git a/packages/google-cloud-confidentialcomputing/.eslintignore b/packages/google-cloud-confidentialcomputing/.eslintignore new file mode 100644 index 00000000000..ea5b04aebe6 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ +samples/generated/ diff --git a/packages/google-cloud-confidentialcomputing/.eslintrc.json b/packages/google-cloud-confidentialcomputing/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-cloud-confidentialcomputing/.gitattributes b/packages/google-cloud-confidentialcomputing/.gitattributes new file mode 100644 index 00000000000..33739cb74e4 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/.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-confidentialcomputing/.gitignore b/packages/google-cloud-confidentialcomputing/.gitignore new file mode 100644 index 00000000000..d4f03a0df2e --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/.gitignore @@ -0,0 +1,14 @@ +**/*.log +**/node_modules +/.coverage +/coverage +/.nyc_output +/docs/ +/out/ +/build/ +system-test/secrets.js +system-test/*key.json +*.lock +.DS_Store +package-lock.json +__pycache__ diff --git a/packages/google-cloud-confidentialcomputing/.jsdoc.js b/packages/google-cloud-confidentialcomputing/.jsdoc.js new file mode 100644 index 00000000000..12da4cf64a4 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2023 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'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/jsdoc-fresh', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown', + 'jsdoc-region-tag' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'build/src', + 'protos' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2023 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/confidentialcomputing', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/google-cloud-confidentialcomputing/.mocharc.js b/packages/google-cloud-confidentialcomputing/.mocharc.js new file mode 100644 index 00000000000..49e7e228701 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/.mocharc.js @@ -0,0 +1,29 @@ +// Copyright 2023 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. +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000, + "recursive": true +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/packages/google-cloud-confidentialcomputing/.nycrc b/packages/google-cloud-confidentialcomputing/.nycrc new file mode 100644 index 00000000000..b18d5472b62 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/.nycrc @@ -0,0 +1,24 @@ +{ + "report-dir": "./.coverage", + "reporter": ["text", "lcov"], + "exclude": [ + "**/*-test", + "**/.coverage", + "**/apis", + "**/benchmark", + "**/conformance", + "**/docs", + "**/samples", + "**/scripts", + "**/protos", + "**/test", + "**/*.d.ts", + ".jsdoc.js", + "**/.jsdoc.js", + "karma.conf.js", + "webpack-tests.config.js", + "webpack.config.js" + ], + "exclude-after-remap": false, + "all": true +} diff --git a/packages/google-cloud-confidentialcomputing/.prettierignore b/packages/google-cloud-confidentialcomputing/.prettierignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-confidentialcomputing/.prettierrc.js b/packages/google-cloud-confidentialcomputing/.prettierrc.js new file mode 100644 index 00000000000..1e6cec783e4 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/.prettierrc.js @@ -0,0 +1,17 @@ +// Copyright 2023 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. + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/packages/google-cloud-confidentialcomputing/.repo-metadata.json b/packages/google-cloud-confidentialcomputing/.repo-metadata.json new file mode 100644 index 00000000000..164d2b6f835 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "name": "confidentialcomputing", + "name_pretty": "Confidential Computing API", + "product_documentation": "https://cloud.google.com/confidential-computing", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/confidentialcomputing/latest", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", + "release_level": "preview", + "language": "nodejs", + "repo": "googleapis/google-cloud-node", + "distribution_name": "@google-cloud/confidentialcomputing", + "api_id": "confidentialcomputing.googleapis.com", + "default_version": "v1alpha1", + "requires_billing": true, + "library_type": "GAPIC_AUTO", + "api_shortname": "confidentialcomputing" +} + diff --git a/packages/google-cloud-confidentialcomputing/CHANGELOG.md b/packages/google-cloud-confidentialcomputing/CHANGELOG.md new file mode 100644 index 00000000000..fe37df33c91 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/CHANGELOG.md @@ -0,0 +1,8 @@ +# Changelog + +## 0.1.0 (2023-04-24) + + +### Features + +* Add initial files for google.cloud.confidentialcomputing.v1alpha1 ([#4193](https://github.com/googleapis/google-cloud-node/issues/4193)) ([a2e0b9e](https://github.com/googleapis/google-cloud-node/commit/a2e0b9ed07f58228386f8ebcf5c16fa7ac589cc3)) diff --git a/packages/google-cloud-confidentialcomputing/CODE_OF_CONDUCT.md b/packages/google-cloud-confidentialcomputing/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..2add2547a81 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/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-confidentialcomputing/CONTRIBUTING.md b/packages/google-cloud-confidentialcomputing/CONTRIBUTING.md new file mode 100644 index 00000000000..3b7e29f4447 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/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 Confidential Computing API 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=confidentialcomputing.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-confidentialcomputing/LICENSE b/packages/google-cloud-confidentialcomputing/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/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-confidentialcomputing/README.md b/packages/google-cloud-confidentialcomputing/README.md new file mode 100644 index 00000000000..b40416a4291 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/README.md @@ -0,0 +1,182 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [Confidential Computing API: Node.js Client](https://github.com/googleapis/google-cloud-node) + +[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![npm version](https://img.shields.io/npm/v/@google-cloud/confidentialcomputing.svg)](https://www.npmjs.org/package/@google-cloud/confidentialcomputing) + + + + +Confidential Computing API client for Node.js + + +A comprehensive list of changes in each version may be found in +[the CHANGELOG](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-confidentialcomputing/CHANGELOG.md). + +* [Confidential Computing API Node.js Client API Reference][client-docs] +* [Confidential Computing API Documentation][product-docs] +* [github.com/googleapis/google-cloud-node/packages/google-cloud-confidentialcomputing](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-confidentialcomputing) + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + + +* [Quickstart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + * [Using the client library](#using-the-client-library) +* [Samples](#samples) +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Confidential Computing API API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + +### Installing the client library + +```bash +npm install @google-cloud/confidentialcomputing +``` + + +### Using the client library + +```javascript +/** + * 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 location where the Challenge will be + * used, in the format `projects/* /locations/*`. + */ +// const parent = 'abc123' +/** + * Required. The Challenge to be created. Currently this field can be empty as + * all the Challenge fields are set by the server. + */ +// const challenge = {} + +// Imports the Confidentialcomputing library +const {ConfidentialComputingClient} = + require('@google-cloud/confidentialcomputing').v1; + +// Instantiates a client +const confidentialcomputingClient = new ConfidentialComputingClient(); + +async function callCreateChallenge() { + // Construct request + const request = { + parent, + challenge, + }; + + // Run request + const response = await confidentialcomputingClient.createChallenge(request); + console.log(response); +} + +callCreateChallenge(); + +``` + + + +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. + +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Confidential_computing.create_challenge | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-confidentialcomputing/samples/generated/v1/confidential_computing.create_challenge.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-confidentialcomputing/samples/generated/v1/confidential_computing.create_challenge.js,samples/README.md) | +| Confidential_computing.verify_attestation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-confidentialcomputing/samples/generated/v1/confidential_computing.verify_attestation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-confidentialcomputing/samples/generated/v1/confidential_computing.verify_attestation.js,samples/README.md) | +| Confidential_computing.create_challenge | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/confidential_computing.create_challenge.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/confidential_computing.create_challenge.js,samples/README.md) | +| Confidential_computing.verify_attestation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/confidential_computing.verify_attestation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/confidential_computing.verify_attestation.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-confidentialcomputing/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-confidentialcomputing/samples/quickstart.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-confidentialcomputing/samples/test/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-confidentialcomputing/samples/test/quickstart.js,samples/README.md) | + + + +The [Confidential Computing API Node.js Client API Reference][client-docs] documentation +also contains samples. + +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. +If you are using an end-of-life version of Node.js, we recommend that you update +as soon as possible to an actively supported LTS version. + +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: + +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. + +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. +For example, `npm install @google-cloud/confidentialcomputing@legacy-8` installs client libraries +for versions compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + + + + + + + +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. + + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md). + +Please note that this `README.md`, the `samples/README.md`, +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. To edit one of these files, make an edit +to its templates in +[directory](https://github.com/googleapis/synthtool). + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) + +[client-docs]: https://cloud.google.com/nodejs/docs/reference/confidentialcomputing/latest +[product-docs]: https://cloud.google.com/confidential-computing +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[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=confidentialcomputing.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started diff --git a/packages/google-cloud-confidentialcomputing/linkinator.config.json b/packages/google-cloud-confidentialcomputing/linkinator.config.json new file mode 100644 index 00000000000..befd23c8633 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/linkinator.config.json @@ -0,0 +1,16 @@ +{ + "recurse": true, + "skip": [ + "https://codecov.io/gh/googleapis/", + "www.googleapis.com", + "img.shields.io", + "https://console.cloud.google.com/cloudshell", + "https://support.google.com" + ], + "silent": true, + "concurrency": 5, + "retry": true, + "retryErrors": true, + "retryErrorsCount": 5, + "retryErrorsJitter": 3000 +} diff --git a/packages/google-cloud-confidentialcomputing/package.json b/packages/google-cloud-confidentialcomputing/package.json new file mode 100644 index 00000000000..0e6e83354a8 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/package.json @@ -0,0 +1,73 @@ +{ + "name": "@google-cloud/confidentialcomputing", + "version": "0.1.0", + "description": "Confidential Computing API client for Node.js", + "repository": { + "type": "git", + "url": "https://github.com/googleapis/google-cloud-node.git", + "directory": "packages/google-cloud-confidentialcomputing" + }, + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-confidentialcomputing", + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google confidentialcomputing", + "confidentialcomputing", + "Confidential Computing API" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" + }, + "dependencies": { + "google-gax": "^3.5.8" + }, + "devDependencies": { + "@types/mocha": "^9.0.0", + "@types/node": "^18.0.0", + "@types/sinon": "^10.0.0", + "c8": "^7.3.5", + "gts": "^3.1.0", + "jsdoc": "^4.0.0", + "jsdoc-fresh": "^2.0.0", + "jsdoc-region-tag": "^2.0.0", + "linkinator": "^4.0.0", + "long": "^5.2.3", + "mocha": "^9.2.2", + "null-loader": "^4.0.1", + "pack-n-play": "^1.0.0-2", + "sinon": "^15.0.0", + "ts-loader": "^9.0.0", + "typescript": "^4.6.4", + "webpack": "^5.9.0", + "webpack-cli": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } +} \ No newline at end of file diff --git a/packages/google-cloud-confidentialcomputing/protos/google/cloud/confidentialcomputing/v1/service.proto b/packages/google-cloud-confidentialcomputing/protos/google/cloud/confidentialcomputing/v1/service.proto new file mode 100644 index 00000000000..846b4de0470 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/protos/google/cloud/confidentialcomputing/v1/service.proto @@ -0,0 +1,176 @@ +// Copyright 2023 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.confidentialcomputing.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/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.ConfidentialComputing.V1"; +option go_package = "cloud.google.com/go/confidentialcomputing/apiv1/confidentialcomputingpb;confidentialcomputingpb"; +option java_multiple_files = true; +option java_outer_classname = "ServiceProto"; +option java_package = "com.google.cloud.confidentialcomputing.v1"; +option php_namespace = "Google\\Cloud\\ConfidentialComputing\\V1"; +option ruby_package = "Google::Cloud::ConfidentialComputing::V1"; + +// Service describing handlers for resources +service ConfidentialComputing { + option (google.api.default_host) = "confidentialcomputing.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a new Challenge in a given project and location. + rpc CreateChallenge(CreateChallengeRequest) returns (Challenge) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/challenges" + body: "challenge" + }; + option (google.api.method_signature) = "parent,challenge"; + } + + // Verifies the provided attestation info, returning a signed OIDC token. + rpc VerifyAttestation(VerifyAttestationRequest) + returns (VerifyAttestationResponse) { + option (google.api.http) = { + post: "/v1/{challenge=projects/*/locations/*/challenges/*}:verifyAttestation" + body: "*" + }; + } +} + +// A Challenge from the server used to guarantee freshness of attestations +message Challenge { + option (google.api.resource) = { + type: "confidentialcomputing.googleapis.com/Challenge" + pattern: "projects/{project}/locations/{location}/challenges/{uuid}" + }; + + // Output only. The resource name for this Challenge in the format + // `projects/*/locations/*/challenges/*` + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this Challenge was created + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this Challenge will no longer be usable. It + // is also the expiration time for any tokens generated from this Challenge. + google.protobuf.Timestamp expire_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indicates if this challenge has been used to generate a token. + bool used = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identical to nonce, but as a string. + string tpm_nonce = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Message for creating a Challenge +message CreateChallengeRequest { + // Required. The resource name of the location where the Challenge will be + // used, in the format `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The Challenge to be created. Currently this field can be empty as + // all the Challenge fields are set by the server. + Challenge challenge = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// A request for an OIDC token, providing all the necessary information needed +// for this service to verify the plaform state of the requestor. +message VerifyAttestationRequest { + // Required. The name of the Challenge whose nonce was used to generate the + // attestation, in the format `projects/*/locations/*/challenges/*`. The + // provided Challenge will be consumed, and cannot be used again. + string challenge = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "confidentialcomputing.googleapis.com/Challenge" + } + ]; + + // Optional. Credentials used to populate the "emails" claim in the + // claims_token. + GcpCredentials gcp_credentials = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The TPM-specific data provided by the attesting platform, used to + // populate any of the claims regarding platform state. + TpmAttestation tpm_attestation = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// A response once an attestation has been successfully verified, containing a +// signed OIDC token. +message VerifyAttestationResponse { + // Output only. Same as claims_token, but as a string. + string oidc_claims_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Credentials issued by GCP which are linked to the platform attestation. These +// will be verified server-side as part of attestaion verification. +message GcpCredentials { + // Same as id_tokens, but as a string. + repeated string service_account_id_tokens = 2; +} + +// TPM2 data containing everything necessary to validate any platform state +// measured into the TPM. +message TpmAttestation { + // Information about Platform Control Registers (PCRs) including a signature + // over their values, which can be used for remote validation. + message Quote { + // The hash algorithm of the PCR bank being quoted, encoded as a TPM_ALG_ID + int32 hash_algo = 1; + + // Raw binary values of each PCRs being quoted. + map pcr_values = 2; + + // TPM2 quote, encoded as a TPMS_ATTEST + bytes raw_quote = 3; + + // TPM2 signature, encoded as a TPMT_SIGNATURE + bytes raw_signature = 4; + } + + // TPM2 PCR Quotes generated by calling TPM2_Quote on each PCR bank. + repeated Quote quotes = 1; + + // The binary TCG Event Log containing events measured into the TPM by the + // platform firmware and operating system. Formatted as described in the + // "TCG PC Client Platform Firmware Profile Specification". + bytes tcg_event_log = 2; + + // An Event Log containing additional events measured into the TPM that are + // not already present in the tcg_event_log. Formatted as described in the + // "Canonical Event Log Format" TCG Specification. + bytes canonical_event_log = 3; + + // DER-encoded X.509 certificate of the Attestation Key (otherwise known as + // an AK or a TPM restricted signing key) used to generate the quotes. + bytes ak_cert = 4; + + // List of DER-encoded X.509 certificates which, together with the ak_cert, + // chain back to a trusted Root Certificate. + repeated bytes cert_chain = 5; +} diff --git a/packages/google-cloud-confidentialcomputing/protos/google/cloud/confidentialcomputing/v1alpha1/service.proto b/packages/google-cloud-confidentialcomputing/protos/google/cloud/confidentialcomputing/v1alpha1/service.proto new file mode 100644 index 00000000000..89b4db4c2c2 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/protos/google/cloud/confidentialcomputing/v1alpha1/service.proto @@ -0,0 +1,184 @@ +// Copyright 2023 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.confidentialcomputing.v1alpha1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.ConfidentialComputing.V1Alpha1"; +option go_package = "cloud.google.com/go/confidentialcomputing/apiv1alpha1/confidentialcomputingpb;confidentialcomputingpb"; +option java_multiple_files = true; +option java_outer_classname = "ServiceProto"; +option java_package = "com.google.cloud.confidentialcomputing.v1alpha1"; +option php_namespace = "Google\\Cloud\\ConfidentialComputing\\V1alpha1"; +option ruby_package = "Google::Cloud::ConfidentialComputing::V1alpha1"; + +// Service describing handlers for resources +service ConfidentialComputing { + option (google.api.default_host) = "confidentialcomputing.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a new Challenge in a given project and location. + rpc CreateChallenge(CreateChallengeRequest) returns (Challenge) { + option (google.api.http) = { + post: "/v1alpha1/{parent=projects/*/locations/*}/challenges" + body: "challenge" + }; + option (google.api.method_signature) = "parent,challenge"; + } + + // Verifies the provided attestation info, returning a signed OIDC token. + rpc VerifyAttestation(VerifyAttestationRequest) + returns (VerifyAttestationResponse) { + option (google.api.http) = { + post: "/v1alpha1/{challenge=projects/*/locations/*/challenges/*}:verifyAttestation" + body: "*" + }; + } +} + +// A Challenge from the server used to guarantee freshness of attestations +message Challenge { + option (google.api.resource) = { + type: "confidentialcomputing.googleapis.com/Challenge" + pattern: "projects/{project}/locations/{location}/challenges/{uuid}" + }; + + // Output only. The resource name for this Challenge in the format + // `projects/*/locations/*/challenges/*` + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this Challenge was created + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this Challenge will no longer be usable. It + // is also the expiration time for any tokens generated from this Challenge. + google.protobuf.Timestamp expire_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indicates if this challenge has been used to generate a token. + bool used = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Random data which should be used when calling TPM2_Quote. + // -- + bytes nonce = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Message for creating a Challenge +message CreateChallengeRequest { + // Required. The resource name of the location where the Challenge will be + // used, in the format `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The Challenge to be created. Currently this field can be empty as + // all the Challenge fields are set by the server. + Challenge challenge = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// A request for an OIDC token, providing all the necessary information needed +// for this service to verify the plaform state of the requestor. +message VerifyAttestationRequest { + // Required. The name of the Challenge whose nonce was used to generate the + // attestation, in the format `projects/*/locations/*/challenges/*`. The + // provided Challenge will be consumed, and cannot be used again. + string challenge = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "confidentialcomputing.googleapis.com/Challenge" + } + ]; + + // Optional. Credentials used to populate the "emails" claim in the + // claims_token. + GcpCredentials gcp_credentials = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The TPM-specific data provided by the attesting platform, used to + // populate any of the claims regarding platform state. + TpmAttestation tpm_attestation = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// A response once an attestation has been successfully verified, containing a +// signed OIDC token. +message VerifyAttestationResponse { + // Output only. The OIDC token issued by this service. It contains specific + // platform claims based on the contents of the provided attestation. + // -- + bytes claims_token = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Credentials issued by GCP which are linked to the platform attestation. These +// will be verified server-side as part of attestaion verification. +message GcpCredentials { + // A list of service account OpenID Connect ID tokens identifying which + // service account identities should be included in the claims_token. These + // can be generated by calling `serviceAccounts.generateIdToken`. The + // Challenge.name must be used as the `audience` parameter, and the + // `includeEmail` parameter must be `true`. + // -- + repeated bytes id_tokens = 1; +} + +// TPM2 data containing everything necessary to validate any platform state +// measured into the TPM. +message TpmAttestation { + // Information about Platform Control Registers (PCRs) including a signature + // over their values, which can be used for remote validation. + message Quote { + // The hash algorithm of the PCR bank being quoted, encoded as a TPM_ALG_ID + int32 hash_algo = 1; + + // Raw binary values of each PCRs being quoted. + map pcr_values = 2; + + // TPM2 quote, encoded as a TPMS_ATTEST + bytes raw_quote = 3; + + // TPM2 signature, encoded as a TPMT_SIGNATURE + bytes raw_signature = 4; + } + + // TPM2 PCR Quotes generated by calling TPM2_Quote on each PCR bank. + repeated Quote quotes = 1; + + // The binary TCG Event Log containing events measured into the TPM by the + // platform firmware and operating system. Formatted as described in the + // "TCG PC Client Platform Firmware Profile Specification". + bytes tcg_event_log = 2; + + // An Event Log containing additional events measured into the TPM that are + // not already present in the tcg_event_log. Formatted as described in the + // "Canonical Event Log Format" TCG Specification. + bytes canonical_event_log = 3; + + // DER-encoded X.509 certificate of the Attestation Key (otherwise known as + // an AK or a TPM restricted signing key) used to generate the quotes. + bytes ak_cert = 4; + + // List of DER-encoded X.509 certificates which, together with the ak_cert, + // chain back to a trusted Root Certificate. + repeated bytes cert_chain = 5; +} diff --git a/packages/google-cloud-confidentialcomputing/protos/protos.d.ts b/packages/google-cloud-confidentialcomputing/protos/protos.d.ts new file mode 100644 index 00000000000..dbc88277274 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/protos/protos.d.ts @@ -0,0 +1,5777 @@ +// Copyright 2023 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. + +import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); +/** Namespace google. */ +export namespace google { + + /** Namespace cloud. */ + namespace cloud { + + /** Namespace confidentialcomputing. */ + namespace confidentialcomputing { + + /** Namespace v1. */ + namespace v1 { + + /** Represents a ConfidentialComputing */ + class ConfidentialComputing extends $protobuf.rpc.Service { + + /** + * Constructs a new ConfidentialComputing 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 ConfidentialComputing 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): ConfidentialComputing; + + /** + * Calls CreateChallenge. + * @param request CreateChallengeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Challenge + */ + public createChallenge(request: google.cloud.confidentialcomputing.v1.ICreateChallengeRequest, callback: google.cloud.confidentialcomputing.v1.ConfidentialComputing.CreateChallengeCallback): void; + + /** + * Calls CreateChallenge. + * @param request CreateChallengeRequest message or plain object + * @returns Promise + */ + public createChallenge(request: google.cloud.confidentialcomputing.v1.ICreateChallengeRequest): Promise; + + /** + * Calls VerifyAttestation. + * @param request VerifyAttestationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and VerifyAttestationResponse + */ + public verifyAttestation(request: google.cloud.confidentialcomputing.v1.IVerifyAttestationRequest, callback: google.cloud.confidentialcomputing.v1.ConfidentialComputing.VerifyAttestationCallback): void; + + /** + * Calls VerifyAttestation. + * @param request VerifyAttestationRequest message or plain object + * @returns Promise + */ + public verifyAttestation(request: google.cloud.confidentialcomputing.v1.IVerifyAttestationRequest): Promise; + } + + namespace ConfidentialComputing { + + /** + * Callback as used by {@link google.cloud.confidentialcomputing.v1.ConfidentialComputing|createChallenge}. + * @param error Error, if any + * @param [response] Challenge + */ + type CreateChallengeCallback = (error: (Error|null), response?: google.cloud.confidentialcomputing.v1.Challenge) => void; + + /** + * Callback as used by {@link google.cloud.confidentialcomputing.v1.ConfidentialComputing|verifyAttestation}. + * @param error Error, if any + * @param [response] VerifyAttestationResponse + */ + type VerifyAttestationCallback = (error: (Error|null), response?: google.cloud.confidentialcomputing.v1.VerifyAttestationResponse) => void; + } + + /** Properties of a Challenge. */ + interface IChallenge { + + /** Challenge name */ + name?: (string|null); + + /** Challenge createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Challenge expireTime */ + expireTime?: (google.protobuf.ITimestamp|null); + + /** Challenge used */ + used?: (boolean|null); + + /** Challenge tpmNonce */ + tpmNonce?: (string|null); + } + + /** Represents a Challenge. */ + class Challenge implements IChallenge { + + /** + * Constructs a new Challenge. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.confidentialcomputing.v1.IChallenge); + + /** Challenge name. */ + public name: string; + + /** Challenge createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Challenge expireTime. */ + public expireTime?: (google.protobuf.ITimestamp|null); + + /** Challenge used. */ + public used: boolean; + + /** Challenge tpmNonce. */ + public tpmNonce: string; + + /** + * Creates a new Challenge instance using the specified properties. + * @param [properties] Properties to set + * @returns Challenge instance + */ + public static create(properties?: google.cloud.confidentialcomputing.v1.IChallenge): google.cloud.confidentialcomputing.v1.Challenge; + + /** + * Encodes the specified Challenge message. Does not implicitly {@link google.cloud.confidentialcomputing.v1.Challenge.verify|verify} messages. + * @param message Challenge message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.confidentialcomputing.v1.IChallenge, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Challenge message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1.Challenge.verify|verify} messages. + * @param message Challenge message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.confidentialcomputing.v1.IChallenge, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Challenge message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Challenge + * @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.confidentialcomputing.v1.Challenge; + + /** + * Decodes a Challenge message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Challenge + * @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.confidentialcomputing.v1.Challenge; + + /** + * Verifies a Challenge 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 Challenge message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Challenge + */ + public static fromObject(object: { [k: string]: any }): google.cloud.confidentialcomputing.v1.Challenge; + + /** + * Creates a plain object from a Challenge message. Also converts values to other types if specified. + * @param message Challenge + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.confidentialcomputing.v1.Challenge, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Challenge to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Challenge + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateChallengeRequest. */ + interface ICreateChallengeRequest { + + /** CreateChallengeRequest parent */ + parent?: (string|null); + + /** CreateChallengeRequest challenge */ + challenge?: (google.cloud.confidentialcomputing.v1.IChallenge|null); + } + + /** Represents a CreateChallengeRequest. */ + class CreateChallengeRequest implements ICreateChallengeRequest { + + /** + * Constructs a new CreateChallengeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.confidentialcomputing.v1.ICreateChallengeRequest); + + /** CreateChallengeRequest parent. */ + public parent: string; + + /** CreateChallengeRequest challenge. */ + public challenge?: (google.cloud.confidentialcomputing.v1.IChallenge|null); + + /** + * Creates a new CreateChallengeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateChallengeRequest instance + */ + public static create(properties?: google.cloud.confidentialcomputing.v1.ICreateChallengeRequest): google.cloud.confidentialcomputing.v1.CreateChallengeRequest; + + /** + * Encodes the specified CreateChallengeRequest message. Does not implicitly {@link google.cloud.confidentialcomputing.v1.CreateChallengeRequest.verify|verify} messages. + * @param message CreateChallengeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.confidentialcomputing.v1.ICreateChallengeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateChallengeRequest message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1.CreateChallengeRequest.verify|verify} messages. + * @param message CreateChallengeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.confidentialcomputing.v1.ICreateChallengeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateChallengeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateChallengeRequest + * @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.confidentialcomputing.v1.CreateChallengeRequest; + + /** + * Decodes a CreateChallengeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateChallengeRequest + * @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.confidentialcomputing.v1.CreateChallengeRequest; + + /** + * Verifies a CreateChallengeRequest 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 CreateChallengeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateChallengeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.confidentialcomputing.v1.CreateChallengeRequest; + + /** + * Creates a plain object from a CreateChallengeRequest message. Also converts values to other types if specified. + * @param message CreateChallengeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.confidentialcomputing.v1.CreateChallengeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateChallengeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateChallengeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VerifyAttestationRequest. */ + interface IVerifyAttestationRequest { + + /** VerifyAttestationRequest challenge */ + challenge?: (string|null); + + /** VerifyAttestationRequest gcpCredentials */ + gcpCredentials?: (google.cloud.confidentialcomputing.v1.IGcpCredentials|null); + + /** VerifyAttestationRequest tpmAttestation */ + tpmAttestation?: (google.cloud.confidentialcomputing.v1.ITpmAttestation|null); + } + + /** Represents a VerifyAttestationRequest. */ + class VerifyAttestationRequest implements IVerifyAttestationRequest { + + /** + * Constructs a new VerifyAttestationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.confidentialcomputing.v1.IVerifyAttestationRequest); + + /** VerifyAttestationRequest challenge. */ + public challenge: string; + + /** VerifyAttestationRequest gcpCredentials. */ + public gcpCredentials?: (google.cloud.confidentialcomputing.v1.IGcpCredentials|null); + + /** VerifyAttestationRequest tpmAttestation. */ + public tpmAttestation?: (google.cloud.confidentialcomputing.v1.ITpmAttestation|null); + + /** + * Creates a new VerifyAttestationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns VerifyAttestationRequest instance + */ + public static create(properties?: google.cloud.confidentialcomputing.v1.IVerifyAttestationRequest): google.cloud.confidentialcomputing.v1.VerifyAttestationRequest; + + /** + * Encodes the specified VerifyAttestationRequest message. Does not implicitly {@link google.cloud.confidentialcomputing.v1.VerifyAttestationRequest.verify|verify} messages. + * @param message VerifyAttestationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.confidentialcomputing.v1.IVerifyAttestationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VerifyAttestationRequest message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1.VerifyAttestationRequest.verify|verify} messages. + * @param message VerifyAttestationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.confidentialcomputing.v1.IVerifyAttestationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VerifyAttestationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VerifyAttestationRequest + * @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.confidentialcomputing.v1.VerifyAttestationRequest; + + /** + * Decodes a VerifyAttestationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VerifyAttestationRequest + * @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.confidentialcomputing.v1.VerifyAttestationRequest; + + /** + * Verifies a VerifyAttestationRequest 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 VerifyAttestationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VerifyAttestationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.confidentialcomputing.v1.VerifyAttestationRequest; + + /** + * Creates a plain object from a VerifyAttestationRequest message. Also converts values to other types if specified. + * @param message VerifyAttestationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.confidentialcomputing.v1.VerifyAttestationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VerifyAttestationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VerifyAttestationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VerifyAttestationResponse. */ + interface IVerifyAttestationResponse { + + /** VerifyAttestationResponse oidcClaimsToken */ + oidcClaimsToken?: (string|null); + } + + /** Represents a VerifyAttestationResponse. */ + class VerifyAttestationResponse implements IVerifyAttestationResponse { + + /** + * Constructs a new VerifyAttestationResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.confidentialcomputing.v1.IVerifyAttestationResponse); + + /** VerifyAttestationResponse oidcClaimsToken. */ + public oidcClaimsToken: string; + + /** + * Creates a new VerifyAttestationResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns VerifyAttestationResponse instance + */ + public static create(properties?: google.cloud.confidentialcomputing.v1.IVerifyAttestationResponse): google.cloud.confidentialcomputing.v1.VerifyAttestationResponse; + + /** + * Encodes the specified VerifyAttestationResponse message. Does not implicitly {@link google.cloud.confidentialcomputing.v1.VerifyAttestationResponse.verify|verify} messages. + * @param message VerifyAttestationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.confidentialcomputing.v1.IVerifyAttestationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VerifyAttestationResponse message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1.VerifyAttestationResponse.verify|verify} messages. + * @param message VerifyAttestationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.confidentialcomputing.v1.IVerifyAttestationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VerifyAttestationResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VerifyAttestationResponse + * @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.confidentialcomputing.v1.VerifyAttestationResponse; + + /** + * Decodes a VerifyAttestationResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VerifyAttestationResponse + * @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.confidentialcomputing.v1.VerifyAttestationResponse; + + /** + * Verifies a VerifyAttestationResponse 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 VerifyAttestationResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VerifyAttestationResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.confidentialcomputing.v1.VerifyAttestationResponse; + + /** + * Creates a plain object from a VerifyAttestationResponse message. Also converts values to other types if specified. + * @param message VerifyAttestationResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.confidentialcomputing.v1.VerifyAttestationResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VerifyAttestationResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VerifyAttestationResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GcpCredentials. */ + interface IGcpCredentials { + + /** GcpCredentials serviceAccountIdTokens */ + serviceAccountIdTokens?: (string[]|null); + } + + /** Represents a GcpCredentials. */ + class GcpCredentials implements IGcpCredentials { + + /** + * Constructs a new GcpCredentials. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.confidentialcomputing.v1.IGcpCredentials); + + /** GcpCredentials serviceAccountIdTokens. */ + public serviceAccountIdTokens: string[]; + + /** + * Creates a new GcpCredentials instance using the specified properties. + * @param [properties] Properties to set + * @returns GcpCredentials instance + */ + public static create(properties?: google.cloud.confidentialcomputing.v1.IGcpCredentials): google.cloud.confidentialcomputing.v1.GcpCredentials; + + /** + * Encodes the specified GcpCredentials message. Does not implicitly {@link google.cloud.confidentialcomputing.v1.GcpCredentials.verify|verify} messages. + * @param message GcpCredentials message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.confidentialcomputing.v1.IGcpCredentials, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcpCredentials message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1.GcpCredentials.verify|verify} messages. + * @param message GcpCredentials message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.confidentialcomputing.v1.IGcpCredentials, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcpCredentials message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcpCredentials + * @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.confidentialcomputing.v1.GcpCredentials; + + /** + * Decodes a GcpCredentials message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcpCredentials + * @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.confidentialcomputing.v1.GcpCredentials; + + /** + * Verifies a GcpCredentials 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 GcpCredentials message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcpCredentials + */ + public static fromObject(object: { [k: string]: any }): google.cloud.confidentialcomputing.v1.GcpCredentials; + + /** + * Creates a plain object from a GcpCredentials message. Also converts values to other types if specified. + * @param message GcpCredentials + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.confidentialcomputing.v1.GcpCredentials, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcpCredentials to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcpCredentials + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TpmAttestation. */ + interface ITpmAttestation { + + /** TpmAttestation quotes */ + quotes?: (google.cloud.confidentialcomputing.v1.TpmAttestation.IQuote[]|null); + + /** TpmAttestation tcgEventLog */ + tcgEventLog?: (Uint8Array|string|null); + + /** TpmAttestation canonicalEventLog */ + canonicalEventLog?: (Uint8Array|string|null); + + /** TpmAttestation akCert */ + akCert?: (Uint8Array|string|null); + + /** TpmAttestation certChain */ + certChain?: (Uint8Array[]|null); + } + + /** Represents a TpmAttestation. */ + class TpmAttestation implements ITpmAttestation { + + /** + * Constructs a new TpmAttestation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.confidentialcomputing.v1.ITpmAttestation); + + /** TpmAttestation quotes. */ + public quotes: google.cloud.confidentialcomputing.v1.TpmAttestation.IQuote[]; + + /** TpmAttestation tcgEventLog. */ + public tcgEventLog: (Uint8Array|string); + + /** TpmAttestation canonicalEventLog. */ + public canonicalEventLog: (Uint8Array|string); + + /** TpmAttestation akCert. */ + public akCert: (Uint8Array|string); + + /** TpmAttestation certChain. */ + public certChain: Uint8Array[]; + + /** + * Creates a new TpmAttestation instance using the specified properties. + * @param [properties] Properties to set + * @returns TpmAttestation instance + */ + public static create(properties?: google.cloud.confidentialcomputing.v1.ITpmAttestation): google.cloud.confidentialcomputing.v1.TpmAttestation; + + /** + * Encodes the specified TpmAttestation message. Does not implicitly {@link google.cloud.confidentialcomputing.v1.TpmAttestation.verify|verify} messages. + * @param message TpmAttestation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.confidentialcomputing.v1.ITpmAttestation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TpmAttestation message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1.TpmAttestation.verify|verify} messages. + * @param message TpmAttestation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.confidentialcomputing.v1.ITpmAttestation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TpmAttestation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TpmAttestation + * @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.confidentialcomputing.v1.TpmAttestation; + + /** + * Decodes a TpmAttestation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TpmAttestation + * @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.confidentialcomputing.v1.TpmAttestation; + + /** + * Verifies a TpmAttestation 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 TpmAttestation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TpmAttestation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.confidentialcomputing.v1.TpmAttestation; + + /** + * Creates a plain object from a TpmAttestation message. Also converts values to other types if specified. + * @param message TpmAttestation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.confidentialcomputing.v1.TpmAttestation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TpmAttestation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TpmAttestation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace TpmAttestation { + + /** Properties of a Quote. */ + interface IQuote { + + /** Quote hashAlgo */ + hashAlgo?: (number|null); + + /** Quote pcrValues */ + pcrValues?: ({ [k: string]: Uint8Array }|null); + + /** Quote rawQuote */ + rawQuote?: (Uint8Array|string|null); + + /** Quote rawSignature */ + rawSignature?: (Uint8Array|string|null); + } + + /** Represents a Quote. */ + class Quote implements IQuote { + + /** + * Constructs a new Quote. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.confidentialcomputing.v1.TpmAttestation.IQuote); + + /** Quote hashAlgo. */ + public hashAlgo: number; + + /** Quote pcrValues. */ + public pcrValues: { [k: string]: Uint8Array }; + + /** Quote rawQuote. */ + public rawQuote: (Uint8Array|string); + + /** Quote rawSignature. */ + public rawSignature: (Uint8Array|string); + + /** + * Creates a new Quote instance using the specified properties. + * @param [properties] Properties to set + * @returns Quote instance + */ + public static create(properties?: google.cloud.confidentialcomputing.v1.TpmAttestation.IQuote): google.cloud.confidentialcomputing.v1.TpmAttestation.Quote; + + /** + * Encodes the specified Quote message. Does not implicitly {@link google.cloud.confidentialcomputing.v1.TpmAttestation.Quote.verify|verify} messages. + * @param message Quote message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.confidentialcomputing.v1.TpmAttestation.IQuote, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Quote message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1.TpmAttestation.Quote.verify|verify} messages. + * @param message Quote message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.confidentialcomputing.v1.TpmAttestation.IQuote, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Quote message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Quote + * @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.confidentialcomputing.v1.TpmAttestation.Quote; + + /** + * Decodes a Quote message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Quote + * @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.confidentialcomputing.v1.TpmAttestation.Quote; + + /** + * Verifies a Quote 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 Quote message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Quote + */ + public static fromObject(object: { [k: string]: any }): google.cloud.confidentialcomputing.v1.TpmAttestation.Quote; + + /** + * Creates a plain object from a Quote message. Also converts values to other types if specified. + * @param message Quote + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.confidentialcomputing.v1.TpmAttestation.Quote, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Quote to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Quote + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Namespace v1alpha1. */ + namespace v1alpha1 { + + /** Represents a ConfidentialComputing */ + class ConfidentialComputing extends $protobuf.rpc.Service { + + /** + * Constructs a new ConfidentialComputing 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 ConfidentialComputing 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): ConfidentialComputing; + + /** + * Calls CreateChallenge. + * @param request CreateChallengeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Challenge + */ + public createChallenge(request: google.cloud.confidentialcomputing.v1alpha1.ICreateChallengeRequest, callback: google.cloud.confidentialcomputing.v1alpha1.ConfidentialComputing.CreateChallengeCallback): void; + + /** + * Calls CreateChallenge. + * @param request CreateChallengeRequest message or plain object + * @returns Promise + */ + public createChallenge(request: google.cloud.confidentialcomputing.v1alpha1.ICreateChallengeRequest): Promise; + + /** + * Calls VerifyAttestation. + * @param request VerifyAttestationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and VerifyAttestationResponse + */ + public verifyAttestation(request: google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationRequest, callback: google.cloud.confidentialcomputing.v1alpha1.ConfidentialComputing.VerifyAttestationCallback): void; + + /** + * Calls VerifyAttestation. + * @param request VerifyAttestationRequest message or plain object + * @returns Promise + */ + public verifyAttestation(request: google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationRequest): Promise; + } + + namespace ConfidentialComputing { + + /** + * Callback as used by {@link google.cloud.confidentialcomputing.v1alpha1.ConfidentialComputing|createChallenge}. + * @param error Error, if any + * @param [response] Challenge + */ + type CreateChallengeCallback = (error: (Error|null), response?: google.cloud.confidentialcomputing.v1alpha1.Challenge) => void; + + /** + * Callback as used by {@link google.cloud.confidentialcomputing.v1alpha1.ConfidentialComputing|verifyAttestation}. + * @param error Error, if any + * @param [response] VerifyAttestationResponse + */ + type VerifyAttestationCallback = (error: (Error|null), response?: google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationResponse) => void; + } + + /** Properties of a Challenge. */ + interface IChallenge { + + /** Challenge name */ + name?: (string|null); + + /** Challenge createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Challenge expireTime */ + expireTime?: (google.protobuf.ITimestamp|null); + + /** Challenge used */ + used?: (boolean|null); + + /** Challenge nonce */ + nonce?: (Uint8Array|string|null); + } + + /** Represents a Challenge. */ + class Challenge implements IChallenge { + + /** + * Constructs a new Challenge. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.confidentialcomputing.v1alpha1.IChallenge); + + /** Challenge name. */ + public name: string; + + /** Challenge createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Challenge expireTime. */ + public expireTime?: (google.protobuf.ITimestamp|null); + + /** Challenge used. */ + public used: boolean; + + /** Challenge nonce. */ + public nonce: (Uint8Array|string); + + /** + * Creates a new Challenge instance using the specified properties. + * @param [properties] Properties to set + * @returns Challenge instance + */ + public static create(properties?: google.cloud.confidentialcomputing.v1alpha1.IChallenge): google.cloud.confidentialcomputing.v1alpha1.Challenge; + + /** + * Encodes the specified Challenge message. Does not implicitly {@link google.cloud.confidentialcomputing.v1alpha1.Challenge.verify|verify} messages. + * @param message Challenge message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.confidentialcomputing.v1alpha1.IChallenge, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Challenge message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1alpha1.Challenge.verify|verify} messages. + * @param message Challenge message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.confidentialcomputing.v1alpha1.IChallenge, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Challenge message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Challenge + * @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.confidentialcomputing.v1alpha1.Challenge; + + /** + * Decodes a Challenge message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Challenge + * @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.confidentialcomputing.v1alpha1.Challenge; + + /** + * Verifies a Challenge 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 Challenge message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Challenge + */ + public static fromObject(object: { [k: string]: any }): google.cloud.confidentialcomputing.v1alpha1.Challenge; + + /** + * Creates a plain object from a Challenge message. Also converts values to other types if specified. + * @param message Challenge + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.confidentialcomputing.v1alpha1.Challenge, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Challenge to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Challenge + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateChallengeRequest. */ + interface ICreateChallengeRequest { + + /** CreateChallengeRequest parent */ + parent?: (string|null); + + /** CreateChallengeRequest challenge */ + challenge?: (google.cloud.confidentialcomputing.v1alpha1.IChallenge|null); + } + + /** Represents a CreateChallengeRequest. */ + class CreateChallengeRequest implements ICreateChallengeRequest { + + /** + * Constructs a new CreateChallengeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.confidentialcomputing.v1alpha1.ICreateChallengeRequest); + + /** CreateChallengeRequest parent. */ + public parent: string; + + /** CreateChallengeRequest challenge. */ + public challenge?: (google.cloud.confidentialcomputing.v1alpha1.IChallenge|null); + + /** + * Creates a new CreateChallengeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateChallengeRequest instance + */ + public static create(properties?: google.cloud.confidentialcomputing.v1alpha1.ICreateChallengeRequest): google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest; + + /** + * Encodes the specified CreateChallengeRequest message. Does not implicitly {@link google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest.verify|verify} messages. + * @param message CreateChallengeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.confidentialcomputing.v1alpha1.ICreateChallengeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateChallengeRequest message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest.verify|verify} messages. + * @param message CreateChallengeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.confidentialcomputing.v1alpha1.ICreateChallengeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateChallengeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateChallengeRequest + * @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.confidentialcomputing.v1alpha1.CreateChallengeRequest; + + /** + * Decodes a CreateChallengeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateChallengeRequest + * @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.confidentialcomputing.v1alpha1.CreateChallengeRequest; + + /** + * Verifies a CreateChallengeRequest 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 CreateChallengeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateChallengeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest; + + /** + * Creates a plain object from a CreateChallengeRequest message. Also converts values to other types if specified. + * @param message CreateChallengeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateChallengeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateChallengeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VerifyAttestationRequest. */ + interface IVerifyAttestationRequest { + + /** VerifyAttestationRequest challenge */ + challenge?: (string|null); + + /** VerifyAttestationRequest gcpCredentials */ + gcpCredentials?: (google.cloud.confidentialcomputing.v1alpha1.IGcpCredentials|null); + + /** VerifyAttestationRequest tpmAttestation */ + tpmAttestation?: (google.cloud.confidentialcomputing.v1alpha1.ITpmAttestation|null); + } + + /** Represents a VerifyAttestationRequest. */ + class VerifyAttestationRequest implements IVerifyAttestationRequest { + + /** + * Constructs a new VerifyAttestationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationRequest); + + /** VerifyAttestationRequest challenge. */ + public challenge: string; + + /** VerifyAttestationRequest gcpCredentials. */ + public gcpCredentials?: (google.cloud.confidentialcomputing.v1alpha1.IGcpCredentials|null); + + /** VerifyAttestationRequest tpmAttestation. */ + public tpmAttestation?: (google.cloud.confidentialcomputing.v1alpha1.ITpmAttestation|null); + + /** + * Creates a new VerifyAttestationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns VerifyAttestationRequest instance + */ + public static create(properties?: google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationRequest): google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest; + + /** + * Encodes the specified VerifyAttestationRequest message. Does not implicitly {@link google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest.verify|verify} messages. + * @param message VerifyAttestationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VerifyAttestationRequest message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest.verify|verify} messages. + * @param message VerifyAttestationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VerifyAttestationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VerifyAttestationRequest + * @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.confidentialcomputing.v1alpha1.VerifyAttestationRequest; + + /** + * Decodes a VerifyAttestationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VerifyAttestationRequest + * @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.confidentialcomputing.v1alpha1.VerifyAttestationRequest; + + /** + * Verifies a VerifyAttestationRequest 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 VerifyAttestationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VerifyAttestationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest; + + /** + * Creates a plain object from a VerifyAttestationRequest message. Also converts values to other types if specified. + * @param message VerifyAttestationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VerifyAttestationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VerifyAttestationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VerifyAttestationResponse. */ + interface IVerifyAttestationResponse { + + /** VerifyAttestationResponse claimsToken */ + claimsToken?: (Uint8Array|string|null); + } + + /** Represents a VerifyAttestationResponse. */ + class VerifyAttestationResponse implements IVerifyAttestationResponse { + + /** + * Constructs a new VerifyAttestationResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationResponse); + + /** VerifyAttestationResponse claimsToken. */ + public claimsToken: (Uint8Array|string); + + /** + * Creates a new VerifyAttestationResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns VerifyAttestationResponse instance + */ + public static create(properties?: google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationResponse): google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationResponse; + + /** + * Encodes the specified VerifyAttestationResponse message. Does not implicitly {@link google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationResponse.verify|verify} messages. + * @param message VerifyAttestationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VerifyAttestationResponse message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationResponse.verify|verify} messages. + * @param message VerifyAttestationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VerifyAttestationResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VerifyAttestationResponse + * @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.confidentialcomputing.v1alpha1.VerifyAttestationResponse; + + /** + * Decodes a VerifyAttestationResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VerifyAttestationResponse + * @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.confidentialcomputing.v1alpha1.VerifyAttestationResponse; + + /** + * Verifies a VerifyAttestationResponse 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 VerifyAttestationResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VerifyAttestationResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationResponse; + + /** + * Creates a plain object from a VerifyAttestationResponse message. Also converts values to other types if specified. + * @param message VerifyAttestationResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VerifyAttestationResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VerifyAttestationResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GcpCredentials. */ + interface IGcpCredentials { + + /** GcpCredentials idTokens */ + idTokens?: (Uint8Array[]|null); + } + + /** Represents a GcpCredentials. */ + class GcpCredentials implements IGcpCredentials { + + /** + * Constructs a new GcpCredentials. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.confidentialcomputing.v1alpha1.IGcpCredentials); + + /** GcpCredentials idTokens. */ + public idTokens: Uint8Array[]; + + /** + * Creates a new GcpCredentials instance using the specified properties. + * @param [properties] Properties to set + * @returns GcpCredentials instance + */ + public static create(properties?: google.cloud.confidentialcomputing.v1alpha1.IGcpCredentials): google.cloud.confidentialcomputing.v1alpha1.GcpCredentials; + + /** + * Encodes the specified GcpCredentials message. Does not implicitly {@link google.cloud.confidentialcomputing.v1alpha1.GcpCredentials.verify|verify} messages. + * @param message GcpCredentials message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.confidentialcomputing.v1alpha1.IGcpCredentials, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcpCredentials message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1alpha1.GcpCredentials.verify|verify} messages. + * @param message GcpCredentials message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.confidentialcomputing.v1alpha1.IGcpCredentials, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcpCredentials message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcpCredentials + * @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.confidentialcomputing.v1alpha1.GcpCredentials; + + /** + * Decodes a GcpCredentials message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcpCredentials + * @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.confidentialcomputing.v1alpha1.GcpCredentials; + + /** + * Verifies a GcpCredentials 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 GcpCredentials message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcpCredentials + */ + public static fromObject(object: { [k: string]: any }): google.cloud.confidentialcomputing.v1alpha1.GcpCredentials; + + /** + * Creates a plain object from a GcpCredentials message. Also converts values to other types if specified. + * @param message GcpCredentials + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.confidentialcomputing.v1alpha1.GcpCredentials, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcpCredentials to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcpCredentials + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TpmAttestation. */ + interface ITpmAttestation { + + /** TpmAttestation quotes */ + quotes?: (google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.IQuote[]|null); + + /** TpmAttestation tcgEventLog */ + tcgEventLog?: (Uint8Array|string|null); + + /** TpmAttestation canonicalEventLog */ + canonicalEventLog?: (Uint8Array|string|null); + + /** TpmAttestation akCert */ + akCert?: (Uint8Array|string|null); + + /** TpmAttestation certChain */ + certChain?: (Uint8Array[]|null); + } + + /** Represents a TpmAttestation. */ + class TpmAttestation implements ITpmAttestation { + + /** + * Constructs a new TpmAttestation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.confidentialcomputing.v1alpha1.ITpmAttestation); + + /** TpmAttestation quotes. */ + public quotes: google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.IQuote[]; + + /** TpmAttestation tcgEventLog. */ + public tcgEventLog: (Uint8Array|string); + + /** TpmAttestation canonicalEventLog. */ + public canonicalEventLog: (Uint8Array|string); + + /** TpmAttestation akCert. */ + public akCert: (Uint8Array|string); + + /** TpmAttestation certChain. */ + public certChain: Uint8Array[]; + + /** + * Creates a new TpmAttestation instance using the specified properties. + * @param [properties] Properties to set + * @returns TpmAttestation instance + */ + public static create(properties?: google.cloud.confidentialcomputing.v1alpha1.ITpmAttestation): google.cloud.confidentialcomputing.v1alpha1.TpmAttestation; + + /** + * Encodes the specified TpmAttestation message. Does not implicitly {@link google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.verify|verify} messages. + * @param message TpmAttestation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.confidentialcomputing.v1alpha1.ITpmAttestation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TpmAttestation message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.verify|verify} messages. + * @param message TpmAttestation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.confidentialcomputing.v1alpha1.ITpmAttestation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TpmAttestation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TpmAttestation + * @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.confidentialcomputing.v1alpha1.TpmAttestation; + + /** + * Decodes a TpmAttestation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TpmAttestation + * @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.confidentialcomputing.v1alpha1.TpmAttestation; + + /** + * Verifies a TpmAttestation 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 TpmAttestation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TpmAttestation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.confidentialcomputing.v1alpha1.TpmAttestation; + + /** + * Creates a plain object from a TpmAttestation message. Also converts values to other types if specified. + * @param message TpmAttestation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.confidentialcomputing.v1alpha1.TpmAttestation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TpmAttestation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TpmAttestation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace TpmAttestation { + + /** Properties of a Quote. */ + interface IQuote { + + /** Quote hashAlgo */ + hashAlgo?: (number|null); + + /** Quote pcrValues */ + pcrValues?: ({ [k: string]: Uint8Array }|null); + + /** Quote rawQuote */ + rawQuote?: (Uint8Array|string|null); + + /** Quote rawSignature */ + rawSignature?: (Uint8Array|string|null); + } + + /** Represents a Quote. */ + class Quote implements IQuote { + + /** + * Constructs a new Quote. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.IQuote); + + /** Quote hashAlgo. */ + public hashAlgo: number; + + /** Quote pcrValues. */ + public pcrValues: { [k: string]: Uint8Array }; + + /** Quote rawQuote. */ + public rawQuote: (Uint8Array|string); + + /** Quote rawSignature. */ + public rawSignature: (Uint8Array|string); + + /** + * Creates a new Quote instance using the specified properties. + * @param [properties] Properties to set + * @returns Quote instance + */ + public static create(properties?: google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.IQuote): google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote; + + /** + * Encodes the specified Quote message. Does not implicitly {@link google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote.verify|verify} messages. + * @param message Quote message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.IQuote, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Quote message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote.verify|verify} messages. + * @param message Quote message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.IQuote, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Quote message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Quote + * @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.confidentialcomputing.v1alpha1.TpmAttestation.Quote; + + /** + * Decodes a Quote message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Quote + * @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.confidentialcomputing.v1alpha1.TpmAttestation.Quote; + + /** + * Verifies a Quote 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 Quote message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Quote + */ + public static fromObject(object: { [k: string]: any }): google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote; + + /** + * Creates a plain object from a Quote message. Also converts values to other types if specified. + * @param message Quote + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Quote to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Quote + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @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.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @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.api.Http; + + /** + * Verifies a Http 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 Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @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.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @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.api.HttpRule; + + /** + * Verifies a HttpRule 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 HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @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.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @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.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern 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 CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @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.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @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.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor 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 ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @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.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @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.api.ResourceReference; + + /** + * Verifies a ResourceReference 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 ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @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.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @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.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet 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 FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (string|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** FileDescriptorProto edition. */ + public edition: string; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @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.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @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.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto 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 FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @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.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @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.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto 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 DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @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.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @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.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange 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 ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @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.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @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.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange 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 ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @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.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @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.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions 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 ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @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.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @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.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto 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 FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @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.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @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.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto 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 OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @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.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @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.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto 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 EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @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.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @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.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange 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 EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @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.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @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.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto 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 EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @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.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @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.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto 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 ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @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.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @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.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto 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 MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @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.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @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.protobuf.FileOptions; + + /** + * Verifies a FileOptions 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 FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @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.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @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.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions 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 MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @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.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @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.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions 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 FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @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.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @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.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions 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 OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @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.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @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.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions 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 EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @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.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @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.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions 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 EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @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.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @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.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions 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 ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @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.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @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.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions 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 MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @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.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @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.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption 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 UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @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.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @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.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart 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 NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @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.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @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.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo 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 SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @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.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @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.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location 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 Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @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.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @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.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo 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 GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @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.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @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.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation 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 Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } + } + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @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.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @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.protobuf.Timestamp; + + /** + * Verifies a Timestamp 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 Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } +} diff --git a/packages/google-cloud-confidentialcomputing/protos/protos.js b/packages/google-cloud-confidentialcomputing/protos/protos.js new file mode 100644 index 00000000000..ce19d5cb754 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/protos/protos.js @@ -0,0 +1,15463 @@ +// Copyright 2023 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. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._google_cloud_confidentialcomputing_protos || ($protobuf.roots._google_cloud_confidentialcomputing_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.confidentialcomputing = (function() { + + /** + * Namespace confidentialcomputing. + * @memberof google.cloud + * @namespace + */ + var confidentialcomputing = {}; + + confidentialcomputing.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.confidentialcomputing + * @namespace + */ + var v1 = {}; + + v1.ConfidentialComputing = (function() { + + /** + * Constructs a new ConfidentialComputing service. + * @memberof google.cloud.confidentialcomputing.v1 + * @classdesc Represents a ConfidentialComputing + * @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 ConfidentialComputing(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ConfidentialComputing.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ConfidentialComputing; + + /** + * Creates new ConfidentialComputing service using the specified rpc implementation. + * @function create + * @memberof google.cloud.confidentialcomputing.v1.ConfidentialComputing + * @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 {ConfidentialComputing} RPC service. Useful where requests and/or responses are streamed. + */ + ConfidentialComputing.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.confidentialcomputing.v1.ConfidentialComputing|createChallenge}. + * @memberof google.cloud.confidentialcomputing.v1.ConfidentialComputing + * @typedef CreateChallengeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.confidentialcomputing.v1.Challenge} [response] Challenge + */ + + /** + * Calls CreateChallenge. + * @function createChallenge + * @memberof google.cloud.confidentialcomputing.v1.ConfidentialComputing + * @instance + * @param {google.cloud.confidentialcomputing.v1.ICreateChallengeRequest} request CreateChallengeRequest message or plain object + * @param {google.cloud.confidentialcomputing.v1.ConfidentialComputing.CreateChallengeCallback} callback Node-style callback called with the error, if any, and Challenge + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfidentialComputing.prototype.createChallenge = function createChallenge(request, callback) { + return this.rpcCall(createChallenge, $root.google.cloud.confidentialcomputing.v1.CreateChallengeRequest, $root.google.cloud.confidentialcomputing.v1.Challenge, request, callback); + }, "name", { value: "CreateChallenge" }); + + /** + * Calls CreateChallenge. + * @function createChallenge + * @memberof google.cloud.confidentialcomputing.v1.ConfidentialComputing + * @instance + * @param {google.cloud.confidentialcomputing.v1.ICreateChallengeRequest} request CreateChallengeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.confidentialcomputing.v1.ConfidentialComputing|verifyAttestation}. + * @memberof google.cloud.confidentialcomputing.v1.ConfidentialComputing + * @typedef VerifyAttestationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.confidentialcomputing.v1.VerifyAttestationResponse} [response] VerifyAttestationResponse + */ + + /** + * Calls VerifyAttestation. + * @function verifyAttestation + * @memberof google.cloud.confidentialcomputing.v1.ConfidentialComputing + * @instance + * @param {google.cloud.confidentialcomputing.v1.IVerifyAttestationRequest} request VerifyAttestationRequest message or plain object + * @param {google.cloud.confidentialcomputing.v1.ConfidentialComputing.VerifyAttestationCallback} callback Node-style callback called with the error, if any, and VerifyAttestationResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfidentialComputing.prototype.verifyAttestation = function verifyAttestation(request, callback) { + return this.rpcCall(verifyAttestation, $root.google.cloud.confidentialcomputing.v1.VerifyAttestationRequest, $root.google.cloud.confidentialcomputing.v1.VerifyAttestationResponse, request, callback); + }, "name", { value: "VerifyAttestation" }); + + /** + * Calls VerifyAttestation. + * @function verifyAttestation + * @memberof google.cloud.confidentialcomputing.v1.ConfidentialComputing + * @instance + * @param {google.cloud.confidentialcomputing.v1.IVerifyAttestationRequest} request VerifyAttestationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ConfidentialComputing; + })(); + + v1.Challenge = (function() { + + /** + * Properties of a Challenge. + * @memberof google.cloud.confidentialcomputing.v1 + * @interface IChallenge + * @property {string|null} [name] Challenge name + * @property {google.protobuf.ITimestamp|null} [createTime] Challenge createTime + * @property {google.protobuf.ITimestamp|null} [expireTime] Challenge expireTime + * @property {boolean|null} [used] Challenge used + * @property {string|null} [tpmNonce] Challenge tpmNonce + */ + + /** + * Constructs a new Challenge. + * @memberof google.cloud.confidentialcomputing.v1 + * @classdesc Represents a Challenge. + * @implements IChallenge + * @constructor + * @param {google.cloud.confidentialcomputing.v1.IChallenge=} [properties] Properties to set + */ + function Challenge(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]]; + } + + /** + * Challenge name. + * @member {string} name + * @memberof google.cloud.confidentialcomputing.v1.Challenge + * @instance + */ + Challenge.prototype.name = ""; + + /** + * Challenge createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.confidentialcomputing.v1.Challenge + * @instance + */ + Challenge.prototype.createTime = null; + + /** + * Challenge expireTime. + * @member {google.protobuf.ITimestamp|null|undefined} expireTime + * @memberof google.cloud.confidentialcomputing.v1.Challenge + * @instance + */ + Challenge.prototype.expireTime = null; + + /** + * Challenge used. + * @member {boolean} used + * @memberof google.cloud.confidentialcomputing.v1.Challenge + * @instance + */ + Challenge.prototype.used = false; + + /** + * Challenge tpmNonce. + * @member {string} tpmNonce + * @memberof google.cloud.confidentialcomputing.v1.Challenge + * @instance + */ + Challenge.prototype.tpmNonce = ""; + + /** + * Creates a new Challenge instance using the specified properties. + * @function create + * @memberof google.cloud.confidentialcomputing.v1.Challenge + * @static + * @param {google.cloud.confidentialcomputing.v1.IChallenge=} [properties] Properties to set + * @returns {google.cloud.confidentialcomputing.v1.Challenge} Challenge instance + */ + Challenge.create = function create(properties) { + return new Challenge(properties); + }; + + /** + * Encodes the specified Challenge message. Does not implicitly {@link google.cloud.confidentialcomputing.v1.Challenge.verify|verify} messages. + * @function encode + * @memberof google.cloud.confidentialcomputing.v1.Challenge + * @static + * @param {google.cloud.confidentialcomputing.v1.IChallenge} message Challenge message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Challenge.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.used != null && Object.hasOwnProperty.call(message, "used")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.used); + if (message.tpmNonce != null && Object.hasOwnProperty.call(message, "tpmNonce")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.tpmNonce); + return writer; + }; + + /** + * Encodes the specified Challenge message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1.Challenge.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.confidentialcomputing.v1.Challenge + * @static + * @param {google.cloud.confidentialcomputing.v1.IChallenge} message Challenge message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Challenge.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Challenge message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.confidentialcomputing.v1.Challenge + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.confidentialcomputing.v1.Challenge} Challenge + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Challenge.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.confidentialcomputing.v1.Challenge(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.used = reader.bool(); + break; + } + case 6: { + message.tpmNonce = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Challenge message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.confidentialcomputing.v1.Challenge + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.confidentialcomputing.v1.Challenge} Challenge + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Challenge.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Challenge message. + * @function verify + * @memberof google.cloud.confidentialcomputing.v1.Challenge + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Challenge.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.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expireTime); + if (error) + return "expireTime." + error; + } + if (message.used != null && message.hasOwnProperty("used")) + if (typeof message.used !== "boolean") + return "used: boolean expected"; + if (message.tpmNonce != null && message.hasOwnProperty("tpmNonce")) + if (!$util.isString(message.tpmNonce)) + return "tpmNonce: string expected"; + return null; + }; + + /** + * Creates a Challenge message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.confidentialcomputing.v1.Challenge + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.confidentialcomputing.v1.Challenge} Challenge + */ + Challenge.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.confidentialcomputing.v1.Challenge) + return object; + var message = new $root.google.cloud.confidentialcomputing.v1.Challenge(); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.confidentialcomputing.v1.Challenge.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.expireTime != null) { + if (typeof object.expireTime !== "object") + throw TypeError(".google.cloud.confidentialcomputing.v1.Challenge.expireTime: object expected"); + message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); + } + if (object.used != null) + message.used = Boolean(object.used); + if (object.tpmNonce != null) + message.tpmNonce = String(object.tpmNonce); + return message; + }; + + /** + * Creates a plain object from a Challenge message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.confidentialcomputing.v1.Challenge + * @static + * @param {google.cloud.confidentialcomputing.v1.Challenge} message Challenge + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Challenge.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.expireTime = null; + object.used = false; + object.tpmNonce = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + if (message.used != null && message.hasOwnProperty("used")) + object.used = message.used; + if (message.tpmNonce != null && message.hasOwnProperty("tpmNonce")) + object.tpmNonce = message.tpmNonce; + return object; + }; + + /** + * Converts this Challenge to JSON. + * @function toJSON + * @memberof google.cloud.confidentialcomputing.v1.Challenge + * @instance + * @returns {Object.} JSON object + */ + Challenge.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Challenge + * @function getTypeUrl + * @memberof google.cloud.confidentialcomputing.v1.Challenge + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Challenge.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.confidentialcomputing.v1.Challenge"; + }; + + return Challenge; + })(); + + v1.CreateChallengeRequest = (function() { + + /** + * Properties of a CreateChallengeRequest. + * @memberof google.cloud.confidentialcomputing.v1 + * @interface ICreateChallengeRequest + * @property {string|null} [parent] CreateChallengeRequest parent + * @property {google.cloud.confidentialcomputing.v1.IChallenge|null} [challenge] CreateChallengeRequest challenge + */ + + /** + * Constructs a new CreateChallengeRequest. + * @memberof google.cloud.confidentialcomputing.v1 + * @classdesc Represents a CreateChallengeRequest. + * @implements ICreateChallengeRequest + * @constructor + * @param {google.cloud.confidentialcomputing.v1.ICreateChallengeRequest=} [properties] Properties to set + */ + function CreateChallengeRequest(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]]; + } + + /** + * CreateChallengeRequest parent. + * @member {string} parent + * @memberof google.cloud.confidentialcomputing.v1.CreateChallengeRequest + * @instance + */ + CreateChallengeRequest.prototype.parent = ""; + + /** + * CreateChallengeRequest challenge. + * @member {google.cloud.confidentialcomputing.v1.IChallenge|null|undefined} challenge + * @memberof google.cloud.confidentialcomputing.v1.CreateChallengeRequest + * @instance + */ + CreateChallengeRequest.prototype.challenge = null; + + /** + * Creates a new CreateChallengeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.confidentialcomputing.v1.CreateChallengeRequest + * @static + * @param {google.cloud.confidentialcomputing.v1.ICreateChallengeRequest=} [properties] Properties to set + * @returns {google.cloud.confidentialcomputing.v1.CreateChallengeRequest} CreateChallengeRequest instance + */ + CreateChallengeRequest.create = function create(properties) { + return new CreateChallengeRequest(properties); + }; + + /** + * Encodes the specified CreateChallengeRequest message. Does not implicitly {@link google.cloud.confidentialcomputing.v1.CreateChallengeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.confidentialcomputing.v1.CreateChallengeRequest + * @static + * @param {google.cloud.confidentialcomputing.v1.ICreateChallengeRequest} message CreateChallengeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateChallengeRequest.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.challenge != null && Object.hasOwnProperty.call(message, "challenge")) + $root.google.cloud.confidentialcomputing.v1.Challenge.encode(message.challenge, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateChallengeRequest message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1.CreateChallengeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.confidentialcomputing.v1.CreateChallengeRequest + * @static + * @param {google.cloud.confidentialcomputing.v1.ICreateChallengeRequest} message CreateChallengeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateChallengeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateChallengeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.confidentialcomputing.v1.CreateChallengeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.confidentialcomputing.v1.CreateChallengeRequest} CreateChallengeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateChallengeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.confidentialcomputing.v1.CreateChallengeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.challenge = $root.google.cloud.confidentialcomputing.v1.Challenge.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateChallengeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.confidentialcomputing.v1.CreateChallengeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.confidentialcomputing.v1.CreateChallengeRequest} CreateChallengeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateChallengeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateChallengeRequest message. + * @function verify + * @memberof google.cloud.confidentialcomputing.v1.CreateChallengeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateChallengeRequest.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.challenge != null && message.hasOwnProperty("challenge")) { + var error = $root.google.cloud.confidentialcomputing.v1.Challenge.verify(message.challenge); + if (error) + return "challenge." + error; + } + return null; + }; + + /** + * Creates a CreateChallengeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.confidentialcomputing.v1.CreateChallengeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.confidentialcomputing.v1.CreateChallengeRequest} CreateChallengeRequest + */ + CreateChallengeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.confidentialcomputing.v1.CreateChallengeRequest) + return object; + var message = new $root.google.cloud.confidentialcomputing.v1.CreateChallengeRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.challenge != null) { + if (typeof object.challenge !== "object") + throw TypeError(".google.cloud.confidentialcomputing.v1.CreateChallengeRequest.challenge: object expected"); + message.challenge = $root.google.cloud.confidentialcomputing.v1.Challenge.fromObject(object.challenge); + } + return message; + }; + + /** + * Creates a plain object from a CreateChallengeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.confidentialcomputing.v1.CreateChallengeRequest + * @static + * @param {google.cloud.confidentialcomputing.v1.CreateChallengeRequest} message CreateChallengeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateChallengeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.challenge = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.challenge != null && message.hasOwnProperty("challenge")) + object.challenge = $root.google.cloud.confidentialcomputing.v1.Challenge.toObject(message.challenge, options); + return object; + }; + + /** + * Converts this CreateChallengeRequest to JSON. + * @function toJSON + * @memberof google.cloud.confidentialcomputing.v1.CreateChallengeRequest + * @instance + * @returns {Object.} JSON object + */ + CreateChallengeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateChallengeRequest + * @function getTypeUrl + * @memberof google.cloud.confidentialcomputing.v1.CreateChallengeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateChallengeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.confidentialcomputing.v1.CreateChallengeRequest"; + }; + + return CreateChallengeRequest; + })(); + + v1.VerifyAttestationRequest = (function() { + + /** + * Properties of a VerifyAttestationRequest. + * @memberof google.cloud.confidentialcomputing.v1 + * @interface IVerifyAttestationRequest + * @property {string|null} [challenge] VerifyAttestationRequest challenge + * @property {google.cloud.confidentialcomputing.v1.IGcpCredentials|null} [gcpCredentials] VerifyAttestationRequest gcpCredentials + * @property {google.cloud.confidentialcomputing.v1.ITpmAttestation|null} [tpmAttestation] VerifyAttestationRequest tpmAttestation + */ + + /** + * Constructs a new VerifyAttestationRequest. + * @memberof google.cloud.confidentialcomputing.v1 + * @classdesc Represents a VerifyAttestationRequest. + * @implements IVerifyAttestationRequest + * @constructor + * @param {google.cloud.confidentialcomputing.v1.IVerifyAttestationRequest=} [properties] Properties to set + */ + function VerifyAttestationRequest(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]]; + } + + /** + * VerifyAttestationRequest challenge. + * @member {string} challenge + * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationRequest + * @instance + */ + VerifyAttestationRequest.prototype.challenge = ""; + + /** + * VerifyAttestationRequest gcpCredentials. + * @member {google.cloud.confidentialcomputing.v1.IGcpCredentials|null|undefined} gcpCredentials + * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationRequest + * @instance + */ + VerifyAttestationRequest.prototype.gcpCredentials = null; + + /** + * VerifyAttestationRequest tpmAttestation. + * @member {google.cloud.confidentialcomputing.v1.ITpmAttestation|null|undefined} tpmAttestation + * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationRequest + * @instance + */ + VerifyAttestationRequest.prototype.tpmAttestation = null; + + /** + * Creates a new VerifyAttestationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationRequest + * @static + * @param {google.cloud.confidentialcomputing.v1.IVerifyAttestationRequest=} [properties] Properties to set + * @returns {google.cloud.confidentialcomputing.v1.VerifyAttestationRequest} VerifyAttestationRequest instance + */ + VerifyAttestationRequest.create = function create(properties) { + return new VerifyAttestationRequest(properties); + }; + + /** + * Encodes the specified VerifyAttestationRequest message. Does not implicitly {@link google.cloud.confidentialcomputing.v1.VerifyAttestationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationRequest + * @static + * @param {google.cloud.confidentialcomputing.v1.IVerifyAttestationRequest} message VerifyAttestationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerifyAttestationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.challenge != null && Object.hasOwnProperty.call(message, "challenge")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.challenge); + if (message.gcpCredentials != null && Object.hasOwnProperty.call(message, "gcpCredentials")) + $root.google.cloud.confidentialcomputing.v1.GcpCredentials.encode(message.gcpCredentials, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.tpmAttestation != null && Object.hasOwnProperty.call(message, "tpmAttestation")) + $root.google.cloud.confidentialcomputing.v1.TpmAttestation.encode(message.tpmAttestation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified VerifyAttestationRequest message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1.VerifyAttestationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationRequest + * @static + * @param {google.cloud.confidentialcomputing.v1.IVerifyAttestationRequest} message VerifyAttestationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerifyAttestationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VerifyAttestationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.confidentialcomputing.v1.VerifyAttestationRequest} VerifyAttestationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifyAttestationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.confidentialcomputing.v1.VerifyAttestationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.challenge = reader.string(); + break; + } + case 2: { + message.gcpCredentials = $root.google.cloud.confidentialcomputing.v1.GcpCredentials.decode(reader, reader.uint32()); + break; + } + case 3: { + message.tpmAttestation = $root.google.cloud.confidentialcomputing.v1.TpmAttestation.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VerifyAttestationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.confidentialcomputing.v1.VerifyAttestationRequest} VerifyAttestationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifyAttestationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VerifyAttestationRequest message. + * @function verify + * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VerifyAttestationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.challenge != null && message.hasOwnProperty("challenge")) + if (!$util.isString(message.challenge)) + return "challenge: string expected"; + if (message.gcpCredentials != null && message.hasOwnProperty("gcpCredentials")) { + var error = $root.google.cloud.confidentialcomputing.v1.GcpCredentials.verify(message.gcpCredentials); + if (error) + return "gcpCredentials." + error; + } + if (message.tpmAttestation != null && message.hasOwnProperty("tpmAttestation")) { + var error = $root.google.cloud.confidentialcomputing.v1.TpmAttestation.verify(message.tpmAttestation); + if (error) + return "tpmAttestation." + error; + } + return null; + }; + + /** + * Creates a VerifyAttestationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.confidentialcomputing.v1.VerifyAttestationRequest} VerifyAttestationRequest + */ + VerifyAttestationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.confidentialcomputing.v1.VerifyAttestationRequest) + return object; + var message = new $root.google.cloud.confidentialcomputing.v1.VerifyAttestationRequest(); + if (object.challenge != null) + message.challenge = String(object.challenge); + if (object.gcpCredentials != null) { + if (typeof object.gcpCredentials !== "object") + throw TypeError(".google.cloud.confidentialcomputing.v1.VerifyAttestationRequest.gcpCredentials: object expected"); + message.gcpCredentials = $root.google.cloud.confidentialcomputing.v1.GcpCredentials.fromObject(object.gcpCredentials); + } + if (object.tpmAttestation != null) { + if (typeof object.tpmAttestation !== "object") + throw TypeError(".google.cloud.confidentialcomputing.v1.VerifyAttestationRequest.tpmAttestation: object expected"); + message.tpmAttestation = $root.google.cloud.confidentialcomputing.v1.TpmAttestation.fromObject(object.tpmAttestation); + } + return message; + }; + + /** + * Creates a plain object from a VerifyAttestationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationRequest + * @static + * @param {google.cloud.confidentialcomputing.v1.VerifyAttestationRequest} message VerifyAttestationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VerifyAttestationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.challenge = ""; + object.gcpCredentials = null; + object.tpmAttestation = null; + } + if (message.challenge != null && message.hasOwnProperty("challenge")) + object.challenge = message.challenge; + if (message.gcpCredentials != null && message.hasOwnProperty("gcpCredentials")) + object.gcpCredentials = $root.google.cloud.confidentialcomputing.v1.GcpCredentials.toObject(message.gcpCredentials, options); + if (message.tpmAttestation != null && message.hasOwnProperty("tpmAttestation")) + object.tpmAttestation = $root.google.cloud.confidentialcomputing.v1.TpmAttestation.toObject(message.tpmAttestation, options); + return object; + }; + + /** + * Converts this VerifyAttestationRequest to JSON. + * @function toJSON + * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationRequest + * @instance + * @returns {Object.} JSON object + */ + VerifyAttestationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VerifyAttestationRequest + * @function getTypeUrl + * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VerifyAttestationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.confidentialcomputing.v1.VerifyAttestationRequest"; + }; + + return VerifyAttestationRequest; + })(); + + v1.VerifyAttestationResponse = (function() { + + /** + * Properties of a VerifyAttestationResponse. + * @memberof google.cloud.confidentialcomputing.v1 + * @interface IVerifyAttestationResponse + * @property {string|null} [oidcClaimsToken] VerifyAttestationResponse oidcClaimsToken + */ + + /** + * Constructs a new VerifyAttestationResponse. + * @memberof google.cloud.confidentialcomputing.v1 + * @classdesc Represents a VerifyAttestationResponse. + * @implements IVerifyAttestationResponse + * @constructor + * @param {google.cloud.confidentialcomputing.v1.IVerifyAttestationResponse=} [properties] Properties to set + */ + function VerifyAttestationResponse(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]]; + } + + /** + * VerifyAttestationResponse oidcClaimsToken. + * @member {string} oidcClaimsToken + * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationResponse + * @instance + */ + VerifyAttestationResponse.prototype.oidcClaimsToken = ""; + + /** + * Creates a new VerifyAttestationResponse instance using the specified properties. + * @function create + * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationResponse + * @static + * @param {google.cloud.confidentialcomputing.v1.IVerifyAttestationResponse=} [properties] Properties to set + * @returns {google.cloud.confidentialcomputing.v1.VerifyAttestationResponse} VerifyAttestationResponse instance + */ + VerifyAttestationResponse.create = function create(properties) { + return new VerifyAttestationResponse(properties); + }; + + /** + * Encodes the specified VerifyAttestationResponse message. Does not implicitly {@link google.cloud.confidentialcomputing.v1.VerifyAttestationResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationResponse + * @static + * @param {google.cloud.confidentialcomputing.v1.IVerifyAttestationResponse} message VerifyAttestationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerifyAttestationResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.oidcClaimsToken != null && Object.hasOwnProperty.call(message, "oidcClaimsToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.oidcClaimsToken); + return writer; + }; + + /** + * Encodes the specified VerifyAttestationResponse message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1.VerifyAttestationResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationResponse + * @static + * @param {google.cloud.confidentialcomputing.v1.IVerifyAttestationResponse} message VerifyAttestationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerifyAttestationResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VerifyAttestationResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.confidentialcomputing.v1.VerifyAttestationResponse} VerifyAttestationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifyAttestationResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.confidentialcomputing.v1.VerifyAttestationResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.oidcClaimsToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VerifyAttestationResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.confidentialcomputing.v1.VerifyAttestationResponse} VerifyAttestationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifyAttestationResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VerifyAttestationResponse message. + * @function verify + * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VerifyAttestationResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.oidcClaimsToken != null && message.hasOwnProperty("oidcClaimsToken")) + if (!$util.isString(message.oidcClaimsToken)) + return "oidcClaimsToken: string expected"; + return null; + }; + + /** + * Creates a VerifyAttestationResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.confidentialcomputing.v1.VerifyAttestationResponse} VerifyAttestationResponse + */ + VerifyAttestationResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.confidentialcomputing.v1.VerifyAttestationResponse) + return object; + var message = new $root.google.cloud.confidentialcomputing.v1.VerifyAttestationResponse(); + if (object.oidcClaimsToken != null) + message.oidcClaimsToken = String(object.oidcClaimsToken); + return message; + }; + + /** + * Creates a plain object from a VerifyAttestationResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationResponse + * @static + * @param {google.cloud.confidentialcomputing.v1.VerifyAttestationResponse} message VerifyAttestationResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VerifyAttestationResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.oidcClaimsToken = ""; + if (message.oidcClaimsToken != null && message.hasOwnProperty("oidcClaimsToken")) + object.oidcClaimsToken = message.oidcClaimsToken; + return object; + }; + + /** + * Converts this VerifyAttestationResponse to JSON. + * @function toJSON + * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationResponse + * @instance + * @returns {Object.} JSON object + */ + VerifyAttestationResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VerifyAttestationResponse + * @function getTypeUrl + * @memberof google.cloud.confidentialcomputing.v1.VerifyAttestationResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VerifyAttestationResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.confidentialcomputing.v1.VerifyAttestationResponse"; + }; + + return VerifyAttestationResponse; + })(); + + v1.GcpCredentials = (function() { + + /** + * Properties of a GcpCredentials. + * @memberof google.cloud.confidentialcomputing.v1 + * @interface IGcpCredentials + * @property {Array.|null} [serviceAccountIdTokens] GcpCredentials serviceAccountIdTokens + */ + + /** + * Constructs a new GcpCredentials. + * @memberof google.cloud.confidentialcomputing.v1 + * @classdesc Represents a GcpCredentials. + * @implements IGcpCredentials + * @constructor + * @param {google.cloud.confidentialcomputing.v1.IGcpCredentials=} [properties] Properties to set + */ + function GcpCredentials(properties) { + this.serviceAccountIdTokens = []; + 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]]; + } + + /** + * GcpCredentials serviceAccountIdTokens. + * @member {Array.} serviceAccountIdTokens + * @memberof google.cloud.confidentialcomputing.v1.GcpCredentials + * @instance + */ + GcpCredentials.prototype.serviceAccountIdTokens = $util.emptyArray; + + /** + * Creates a new GcpCredentials instance using the specified properties. + * @function create + * @memberof google.cloud.confidentialcomputing.v1.GcpCredentials + * @static + * @param {google.cloud.confidentialcomputing.v1.IGcpCredentials=} [properties] Properties to set + * @returns {google.cloud.confidentialcomputing.v1.GcpCredentials} GcpCredentials instance + */ + GcpCredentials.create = function create(properties) { + return new GcpCredentials(properties); + }; + + /** + * Encodes the specified GcpCredentials message. Does not implicitly {@link google.cloud.confidentialcomputing.v1.GcpCredentials.verify|verify} messages. + * @function encode + * @memberof google.cloud.confidentialcomputing.v1.GcpCredentials + * @static + * @param {google.cloud.confidentialcomputing.v1.IGcpCredentials} message GcpCredentials message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcpCredentials.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serviceAccountIdTokens != null && message.serviceAccountIdTokens.length) + for (var i = 0; i < message.serviceAccountIdTokens.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.serviceAccountIdTokens[i]); + return writer; + }; + + /** + * Encodes the specified GcpCredentials message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1.GcpCredentials.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.confidentialcomputing.v1.GcpCredentials + * @static + * @param {google.cloud.confidentialcomputing.v1.IGcpCredentials} message GcpCredentials message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcpCredentials.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcpCredentials message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.confidentialcomputing.v1.GcpCredentials + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.confidentialcomputing.v1.GcpCredentials} GcpCredentials + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcpCredentials.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.confidentialcomputing.v1.GcpCredentials(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.serviceAccountIdTokens && message.serviceAccountIdTokens.length)) + message.serviceAccountIdTokens = []; + message.serviceAccountIdTokens.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcpCredentials message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.confidentialcomputing.v1.GcpCredentials + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.confidentialcomputing.v1.GcpCredentials} GcpCredentials + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcpCredentials.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcpCredentials message. + * @function verify + * @memberof google.cloud.confidentialcomputing.v1.GcpCredentials + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcpCredentials.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serviceAccountIdTokens != null && message.hasOwnProperty("serviceAccountIdTokens")) { + if (!Array.isArray(message.serviceAccountIdTokens)) + return "serviceAccountIdTokens: array expected"; + for (var i = 0; i < message.serviceAccountIdTokens.length; ++i) + if (!$util.isString(message.serviceAccountIdTokens[i])) + return "serviceAccountIdTokens: string[] expected"; + } + return null; + }; + + /** + * Creates a GcpCredentials message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.confidentialcomputing.v1.GcpCredentials + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.confidentialcomputing.v1.GcpCredentials} GcpCredentials + */ + GcpCredentials.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.confidentialcomputing.v1.GcpCredentials) + return object; + var message = new $root.google.cloud.confidentialcomputing.v1.GcpCredentials(); + if (object.serviceAccountIdTokens) { + if (!Array.isArray(object.serviceAccountIdTokens)) + throw TypeError(".google.cloud.confidentialcomputing.v1.GcpCredentials.serviceAccountIdTokens: array expected"); + message.serviceAccountIdTokens = []; + for (var i = 0; i < object.serviceAccountIdTokens.length; ++i) + message.serviceAccountIdTokens[i] = String(object.serviceAccountIdTokens[i]); + } + return message; + }; + + /** + * Creates a plain object from a GcpCredentials message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.confidentialcomputing.v1.GcpCredentials + * @static + * @param {google.cloud.confidentialcomputing.v1.GcpCredentials} message GcpCredentials + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcpCredentials.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.serviceAccountIdTokens = []; + if (message.serviceAccountIdTokens && message.serviceAccountIdTokens.length) { + object.serviceAccountIdTokens = []; + for (var j = 0; j < message.serviceAccountIdTokens.length; ++j) + object.serviceAccountIdTokens[j] = message.serviceAccountIdTokens[j]; + } + return object; + }; + + /** + * Converts this GcpCredentials to JSON. + * @function toJSON + * @memberof google.cloud.confidentialcomputing.v1.GcpCredentials + * @instance + * @returns {Object.} JSON object + */ + GcpCredentials.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcpCredentials + * @function getTypeUrl + * @memberof google.cloud.confidentialcomputing.v1.GcpCredentials + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcpCredentials.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.confidentialcomputing.v1.GcpCredentials"; + }; + + return GcpCredentials; + })(); + + v1.TpmAttestation = (function() { + + /** + * Properties of a TpmAttestation. + * @memberof google.cloud.confidentialcomputing.v1 + * @interface ITpmAttestation + * @property {Array.|null} [quotes] TpmAttestation quotes + * @property {Uint8Array|null} [tcgEventLog] TpmAttestation tcgEventLog + * @property {Uint8Array|null} [canonicalEventLog] TpmAttestation canonicalEventLog + * @property {Uint8Array|null} [akCert] TpmAttestation akCert + * @property {Array.|null} [certChain] TpmAttestation certChain + */ + + /** + * Constructs a new TpmAttestation. + * @memberof google.cloud.confidentialcomputing.v1 + * @classdesc Represents a TpmAttestation. + * @implements ITpmAttestation + * @constructor + * @param {google.cloud.confidentialcomputing.v1.ITpmAttestation=} [properties] Properties to set + */ + function TpmAttestation(properties) { + this.quotes = []; + this.certChain = []; + 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]]; + } + + /** + * TpmAttestation quotes. + * @member {Array.} quotes + * @memberof google.cloud.confidentialcomputing.v1.TpmAttestation + * @instance + */ + TpmAttestation.prototype.quotes = $util.emptyArray; + + /** + * TpmAttestation tcgEventLog. + * @member {Uint8Array} tcgEventLog + * @memberof google.cloud.confidentialcomputing.v1.TpmAttestation + * @instance + */ + TpmAttestation.prototype.tcgEventLog = $util.newBuffer([]); + + /** + * TpmAttestation canonicalEventLog. + * @member {Uint8Array} canonicalEventLog + * @memberof google.cloud.confidentialcomputing.v1.TpmAttestation + * @instance + */ + TpmAttestation.prototype.canonicalEventLog = $util.newBuffer([]); + + /** + * TpmAttestation akCert. + * @member {Uint8Array} akCert + * @memberof google.cloud.confidentialcomputing.v1.TpmAttestation + * @instance + */ + TpmAttestation.prototype.akCert = $util.newBuffer([]); + + /** + * TpmAttestation certChain. + * @member {Array.} certChain + * @memberof google.cloud.confidentialcomputing.v1.TpmAttestation + * @instance + */ + TpmAttestation.prototype.certChain = $util.emptyArray; + + /** + * Creates a new TpmAttestation instance using the specified properties. + * @function create + * @memberof google.cloud.confidentialcomputing.v1.TpmAttestation + * @static + * @param {google.cloud.confidentialcomputing.v1.ITpmAttestation=} [properties] Properties to set + * @returns {google.cloud.confidentialcomputing.v1.TpmAttestation} TpmAttestation instance + */ + TpmAttestation.create = function create(properties) { + return new TpmAttestation(properties); + }; + + /** + * Encodes the specified TpmAttestation message. Does not implicitly {@link google.cloud.confidentialcomputing.v1.TpmAttestation.verify|verify} messages. + * @function encode + * @memberof google.cloud.confidentialcomputing.v1.TpmAttestation + * @static + * @param {google.cloud.confidentialcomputing.v1.ITpmAttestation} message TpmAttestation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TpmAttestation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.quotes != null && message.quotes.length) + for (var i = 0; i < message.quotes.length; ++i) + $root.google.cloud.confidentialcomputing.v1.TpmAttestation.Quote.encode(message.quotes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tcgEventLog != null && Object.hasOwnProperty.call(message, "tcgEventLog")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.tcgEventLog); + if (message.canonicalEventLog != null && Object.hasOwnProperty.call(message, "canonicalEventLog")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.canonicalEventLog); + if (message.akCert != null && Object.hasOwnProperty.call(message, "akCert")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.akCert); + if (message.certChain != null && message.certChain.length) + for (var i = 0; i < message.certChain.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.certChain[i]); + return writer; + }; + + /** + * Encodes the specified TpmAttestation message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1.TpmAttestation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.confidentialcomputing.v1.TpmAttestation + * @static + * @param {google.cloud.confidentialcomputing.v1.ITpmAttestation} message TpmAttestation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TpmAttestation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TpmAttestation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.confidentialcomputing.v1.TpmAttestation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.confidentialcomputing.v1.TpmAttestation} TpmAttestation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TpmAttestation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.confidentialcomputing.v1.TpmAttestation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.quotes && message.quotes.length)) + message.quotes = []; + message.quotes.push($root.google.cloud.confidentialcomputing.v1.TpmAttestation.Quote.decode(reader, reader.uint32())); + break; + } + case 2: { + message.tcgEventLog = reader.bytes(); + break; + } + case 3: { + message.canonicalEventLog = reader.bytes(); + break; + } + case 4: { + message.akCert = reader.bytes(); + break; + } + case 5: { + if (!(message.certChain && message.certChain.length)) + message.certChain = []; + message.certChain.push(reader.bytes()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TpmAttestation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.confidentialcomputing.v1.TpmAttestation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.confidentialcomputing.v1.TpmAttestation} TpmAttestation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TpmAttestation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TpmAttestation message. + * @function verify + * @memberof google.cloud.confidentialcomputing.v1.TpmAttestation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TpmAttestation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.quotes != null && message.hasOwnProperty("quotes")) { + if (!Array.isArray(message.quotes)) + return "quotes: array expected"; + for (var i = 0; i < message.quotes.length; ++i) { + var error = $root.google.cloud.confidentialcomputing.v1.TpmAttestation.Quote.verify(message.quotes[i]); + if (error) + return "quotes." + error; + } + } + if (message.tcgEventLog != null && message.hasOwnProperty("tcgEventLog")) + if (!(message.tcgEventLog && typeof message.tcgEventLog.length === "number" || $util.isString(message.tcgEventLog))) + return "tcgEventLog: buffer expected"; + if (message.canonicalEventLog != null && message.hasOwnProperty("canonicalEventLog")) + if (!(message.canonicalEventLog && typeof message.canonicalEventLog.length === "number" || $util.isString(message.canonicalEventLog))) + return "canonicalEventLog: buffer expected"; + if (message.akCert != null && message.hasOwnProperty("akCert")) + if (!(message.akCert && typeof message.akCert.length === "number" || $util.isString(message.akCert))) + return "akCert: buffer expected"; + if (message.certChain != null && message.hasOwnProperty("certChain")) { + if (!Array.isArray(message.certChain)) + return "certChain: array expected"; + for (var i = 0; i < message.certChain.length; ++i) + if (!(message.certChain[i] && typeof message.certChain[i].length === "number" || $util.isString(message.certChain[i]))) + return "certChain: buffer[] expected"; + } + return null; + }; + + /** + * Creates a TpmAttestation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.confidentialcomputing.v1.TpmAttestation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.confidentialcomputing.v1.TpmAttestation} TpmAttestation + */ + TpmAttestation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.confidentialcomputing.v1.TpmAttestation) + return object; + var message = new $root.google.cloud.confidentialcomputing.v1.TpmAttestation(); + if (object.quotes) { + if (!Array.isArray(object.quotes)) + throw TypeError(".google.cloud.confidentialcomputing.v1.TpmAttestation.quotes: array expected"); + message.quotes = []; + for (var i = 0; i < object.quotes.length; ++i) { + if (typeof object.quotes[i] !== "object") + throw TypeError(".google.cloud.confidentialcomputing.v1.TpmAttestation.quotes: object expected"); + message.quotes[i] = $root.google.cloud.confidentialcomputing.v1.TpmAttestation.Quote.fromObject(object.quotes[i]); + } + } + if (object.tcgEventLog != null) + if (typeof object.tcgEventLog === "string") + $util.base64.decode(object.tcgEventLog, message.tcgEventLog = $util.newBuffer($util.base64.length(object.tcgEventLog)), 0); + else if (object.tcgEventLog.length >= 0) + message.tcgEventLog = object.tcgEventLog; + if (object.canonicalEventLog != null) + if (typeof object.canonicalEventLog === "string") + $util.base64.decode(object.canonicalEventLog, message.canonicalEventLog = $util.newBuffer($util.base64.length(object.canonicalEventLog)), 0); + else if (object.canonicalEventLog.length >= 0) + message.canonicalEventLog = object.canonicalEventLog; + if (object.akCert != null) + if (typeof object.akCert === "string") + $util.base64.decode(object.akCert, message.akCert = $util.newBuffer($util.base64.length(object.akCert)), 0); + else if (object.akCert.length >= 0) + message.akCert = object.akCert; + if (object.certChain) { + if (!Array.isArray(object.certChain)) + throw TypeError(".google.cloud.confidentialcomputing.v1.TpmAttestation.certChain: array expected"); + message.certChain = []; + for (var i = 0; i < object.certChain.length; ++i) + if (typeof object.certChain[i] === "string") + $util.base64.decode(object.certChain[i], message.certChain[i] = $util.newBuffer($util.base64.length(object.certChain[i])), 0); + else if (object.certChain[i].length >= 0) + message.certChain[i] = object.certChain[i]; + } + return message; + }; + + /** + * Creates a plain object from a TpmAttestation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.confidentialcomputing.v1.TpmAttestation + * @static + * @param {google.cloud.confidentialcomputing.v1.TpmAttestation} message TpmAttestation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TpmAttestation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.quotes = []; + object.certChain = []; + } + if (options.defaults) { + if (options.bytes === String) + object.tcgEventLog = ""; + else { + object.tcgEventLog = []; + if (options.bytes !== Array) + object.tcgEventLog = $util.newBuffer(object.tcgEventLog); + } + if (options.bytes === String) + object.canonicalEventLog = ""; + else { + object.canonicalEventLog = []; + if (options.bytes !== Array) + object.canonicalEventLog = $util.newBuffer(object.canonicalEventLog); + } + if (options.bytes === String) + object.akCert = ""; + else { + object.akCert = []; + if (options.bytes !== Array) + object.akCert = $util.newBuffer(object.akCert); + } + } + if (message.quotes && message.quotes.length) { + object.quotes = []; + for (var j = 0; j < message.quotes.length; ++j) + object.quotes[j] = $root.google.cloud.confidentialcomputing.v1.TpmAttestation.Quote.toObject(message.quotes[j], options); + } + if (message.tcgEventLog != null && message.hasOwnProperty("tcgEventLog")) + object.tcgEventLog = options.bytes === String ? $util.base64.encode(message.tcgEventLog, 0, message.tcgEventLog.length) : options.bytes === Array ? Array.prototype.slice.call(message.tcgEventLog) : message.tcgEventLog; + if (message.canonicalEventLog != null && message.hasOwnProperty("canonicalEventLog")) + object.canonicalEventLog = options.bytes === String ? $util.base64.encode(message.canonicalEventLog, 0, message.canonicalEventLog.length) : options.bytes === Array ? Array.prototype.slice.call(message.canonicalEventLog) : message.canonicalEventLog; + if (message.akCert != null && message.hasOwnProperty("akCert")) + object.akCert = options.bytes === String ? $util.base64.encode(message.akCert, 0, message.akCert.length) : options.bytes === Array ? Array.prototype.slice.call(message.akCert) : message.akCert; + if (message.certChain && message.certChain.length) { + object.certChain = []; + for (var j = 0; j < message.certChain.length; ++j) + object.certChain[j] = options.bytes === String ? $util.base64.encode(message.certChain[j], 0, message.certChain[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.certChain[j]) : message.certChain[j]; + } + return object; + }; + + /** + * Converts this TpmAttestation to JSON. + * @function toJSON + * @memberof google.cloud.confidentialcomputing.v1.TpmAttestation + * @instance + * @returns {Object.} JSON object + */ + TpmAttestation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TpmAttestation + * @function getTypeUrl + * @memberof google.cloud.confidentialcomputing.v1.TpmAttestation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TpmAttestation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.confidentialcomputing.v1.TpmAttestation"; + }; + + TpmAttestation.Quote = (function() { + + /** + * Properties of a Quote. + * @memberof google.cloud.confidentialcomputing.v1.TpmAttestation + * @interface IQuote + * @property {number|null} [hashAlgo] Quote hashAlgo + * @property {Object.|null} [pcrValues] Quote pcrValues + * @property {Uint8Array|null} [rawQuote] Quote rawQuote + * @property {Uint8Array|null} [rawSignature] Quote rawSignature + */ + + /** + * Constructs a new Quote. + * @memberof google.cloud.confidentialcomputing.v1.TpmAttestation + * @classdesc Represents a Quote. + * @implements IQuote + * @constructor + * @param {google.cloud.confidentialcomputing.v1.TpmAttestation.IQuote=} [properties] Properties to set + */ + function Quote(properties) { + this.pcrValues = {}; + 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]]; + } + + /** + * Quote hashAlgo. + * @member {number} hashAlgo + * @memberof google.cloud.confidentialcomputing.v1.TpmAttestation.Quote + * @instance + */ + Quote.prototype.hashAlgo = 0; + + /** + * Quote pcrValues. + * @member {Object.} pcrValues + * @memberof google.cloud.confidentialcomputing.v1.TpmAttestation.Quote + * @instance + */ + Quote.prototype.pcrValues = $util.emptyObject; + + /** + * Quote rawQuote. + * @member {Uint8Array} rawQuote + * @memberof google.cloud.confidentialcomputing.v1.TpmAttestation.Quote + * @instance + */ + Quote.prototype.rawQuote = $util.newBuffer([]); + + /** + * Quote rawSignature. + * @member {Uint8Array} rawSignature + * @memberof google.cloud.confidentialcomputing.v1.TpmAttestation.Quote + * @instance + */ + Quote.prototype.rawSignature = $util.newBuffer([]); + + /** + * Creates a new Quote instance using the specified properties. + * @function create + * @memberof google.cloud.confidentialcomputing.v1.TpmAttestation.Quote + * @static + * @param {google.cloud.confidentialcomputing.v1.TpmAttestation.IQuote=} [properties] Properties to set + * @returns {google.cloud.confidentialcomputing.v1.TpmAttestation.Quote} Quote instance + */ + Quote.create = function create(properties) { + return new Quote(properties); + }; + + /** + * Encodes the specified Quote message. Does not implicitly {@link google.cloud.confidentialcomputing.v1.TpmAttestation.Quote.verify|verify} messages. + * @function encode + * @memberof google.cloud.confidentialcomputing.v1.TpmAttestation.Quote + * @static + * @param {google.cloud.confidentialcomputing.v1.TpmAttestation.IQuote} message Quote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Quote.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hashAlgo != null && Object.hasOwnProperty.call(message, "hashAlgo")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.hashAlgo); + if (message.pcrValues != null && Object.hasOwnProperty.call(message, "pcrValues")) + for (var keys = Object.keys(message.pcrValues), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 0 =*/8).int32(keys[i]).uint32(/* id 2, wireType 2 =*/18).bytes(message.pcrValues[keys[i]]).ldelim(); + if (message.rawQuote != null && Object.hasOwnProperty.call(message, "rawQuote")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.rawQuote); + if (message.rawSignature != null && Object.hasOwnProperty.call(message, "rawSignature")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.rawSignature); + return writer; + }; + + /** + * Encodes the specified Quote message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1.TpmAttestation.Quote.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.confidentialcomputing.v1.TpmAttestation.Quote + * @static + * @param {google.cloud.confidentialcomputing.v1.TpmAttestation.IQuote} message Quote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Quote.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Quote message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.confidentialcomputing.v1.TpmAttestation.Quote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.confidentialcomputing.v1.TpmAttestation.Quote} Quote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Quote.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.confidentialcomputing.v1.TpmAttestation.Quote(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.hashAlgo = reader.int32(); + break; + } + case 2: { + if (message.pcrValues === $util.emptyObject) + message.pcrValues = {}; + var end2 = reader.uint32() + reader.pos; + key = 0; + value = []; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.int32(); + break; + case 2: + value = reader.bytes(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.pcrValues[key] = value; + break; + } + case 3: { + message.rawQuote = reader.bytes(); + break; + } + case 4: { + message.rawSignature = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Quote message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.confidentialcomputing.v1.TpmAttestation.Quote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.confidentialcomputing.v1.TpmAttestation.Quote} Quote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Quote.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Quote message. + * @function verify + * @memberof google.cloud.confidentialcomputing.v1.TpmAttestation.Quote + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Quote.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hashAlgo != null && message.hasOwnProperty("hashAlgo")) + if (!$util.isInteger(message.hashAlgo)) + return "hashAlgo: integer expected"; + if (message.pcrValues != null && message.hasOwnProperty("pcrValues")) { + if (!$util.isObject(message.pcrValues)) + return "pcrValues: object expected"; + var key = Object.keys(message.pcrValues); + for (var i = 0; i < key.length; ++i) { + if (!$util.key32Re.test(key[i])) + return "pcrValues: integer key{k:int32} expected"; + if (!(message.pcrValues[key[i]] && typeof message.pcrValues[key[i]].length === "number" || $util.isString(message.pcrValues[key[i]]))) + return "pcrValues: buffer{k:int32} expected"; + } + } + if (message.rawQuote != null && message.hasOwnProperty("rawQuote")) + if (!(message.rawQuote && typeof message.rawQuote.length === "number" || $util.isString(message.rawQuote))) + return "rawQuote: buffer expected"; + if (message.rawSignature != null && message.hasOwnProperty("rawSignature")) + if (!(message.rawSignature && typeof message.rawSignature.length === "number" || $util.isString(message.rawSignature))) + return "rawSignature: buffer expected"; + return null; + }; + + /** + * Creates a Quote message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.confidentialcomputing.v1.TpmAttestation.Quote + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.confidentialcomputing.v1.TpmAttestation.Quote} Quote + */ + Quote.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.confidentialcomputing.v1.TpmAttestation.Quote) + return object; + var message = new $root.google.cloud.confidentialcomputing.v1.TpmAttestation.Quote(); + if (object.hashAlgo != null) + message.hashAlgo = object.hashAlgo | 0; + if (object.pcrValues) { + if (typeof object.pcrValues !== "object") + throw TypeError(".google.cloud.confidentialcomputing.v1.TpmAttestation.Quote.pcrValues: object expected"); + message.pcrValues = {}; + for (var keys = Object.keys(object.pcrValues), i = 0; i < keys.length; ++i) + if (typeof object.pcrValues[keys[i]] === "string") + $util.base64.decode(object.pcrValues[keys[i]], message.pcrValues[keys[i]] = $util.newBuffer($util.base64.length(object.pcrValues[keys[i]])), 0); + else if (object.pcrValues[keys[i]].length >= 0) + message.pcrValues[keys[i]] = object.pcrValues[keys[i]]; + } + if (object.rawQuote != null) + if (typeof object.rawQuote === "string") + $util.base64.decode(object.rawQuote, message.rawQuote = $util.newBuffer($util.base64.length(object.rawQuote)), 0); + else if (object.rawQuote.length >= 0) + message.rawQuote = object.rawQuote; + if (object.rawSignature != null) + if (typeof object.rawSignature === "string") + $util.base64.decode(object.rawSignature, message.rawSignature = $util.newBuffer($util.base64.length(object.rawSignature)), 0); + else if (object.rawSignature.length >= 0) + message.rawSignature = object.rawSignature; + return message; + }; + + /** + * Creates a plain object from a Quote message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.confidentialcomputing.v1.TpmAttestation.Quote + * @static + * @param {google.cloud.confidentialcomputing.v1.TpmAttestation.Quote} message Quote + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Quote.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.pcrValues = {}; + if (options.defaults) { + object.hashAlgo = 0; + if (options.bytes === String) + object.rawQuote = ""; + else { + object.rawQuote = []; + if (options.bytes !== Array) + object.rawQuote = $util.newBuffer(object.rawQuote); + } + if (options.bytes === String) + object.rawSignature = ""; + else { + object.rawSignature = []; + if (options.bytes !== Array) + object.rawSignature = $util.newBuffer(object.rawSignature); + } + } + if (message.hashAlgo != null && message.hasOwnProperty("hashAlgo")) + object.hashAlgo = message.hashAlgo; + var keys2; + if (message.pcrValues && (keys2 = Object.keys(message.pcrValues)).length) { + object.pcrValues = {}; + for (var j = 0; j < keys2.length; ++j) + object.pcrValues[keys2[j]] = options.bytes === String ? $util.base64.encode(message.pcrValues[keys2[j]], 0, message.pcrValues[keys2[j]].length) : options.bytes === Array ? Array.prototype.slice.call(message.pcrValues[keys2[j]]) : message.pcrValues[keys2[j]]; + } + if (message.rawQuote != null && message.hasOwnProperty("rawQuote")) + object.rawQuote = options.bytes === String ? $util.base64.encode(message.rawQuote, 0, message.rawQuote.length) : options.bytes === Array ? Array.prototype.slice.call(message.rawQuote) : message.rawQuote; + if (message.rawSignature != null && message.hasOwnProperty("rawSignature")) + object.rawSignature = options.bytes === String ? $util.base64.encode(message.rawSignature, 0, message.rawSignature.length) : options.bytes === Array ? Array.prototype.slice.call(message.rawSignature) : message.rawSignature; + return object; + }; + + /** + * Converts this Quote to JSON. + * @function toJSON + * @memberof google.cloud.confidentialcomputing.v1.TpmAttestation.Quote + * @instance + * @returns {Object.} JSON object + */ + Quote.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Quote + * @function getTypeUrl + * @memberof google.cloud.confidentialcomputing.v1.TpmAttestation.Quote + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Quote.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.confidentialcomputing.v1.TpmAttestation.Quote"; + }; + + return Quote; + })(); + + return TpmAttestation; + })(); + + return v1; + })(); + + confidentialcomputing.v1alpha1 = (function() { + + /** + * Namespace v1alpha1. + * @memberof google.cloud.confidentialcomputing + * @namespace + */ + var v1alpha1 = {}; + + v1alpha1.ConfidentialComputing = (function() { + + /** + * Constructs a new ConfidentialComputing service. + * @memberof google.cloud.confidentialcomputing.v1alpha1 + * @classdesc Represents a ConfidentialComputing + * @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 ConfidentialComputing(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ConfidentialComputing.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ConfidentialComputing; + + /** + * Creates new ConfidentialComputing service using the specified rpc implementation. + * @function create + * @memberof google.cloud.confidentialcomputing.v1alpha1.ConfidentialComputing + * @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 {ConfidentialComputing} RPC service. Useful where requests and/or responses are streamed. + */ + ConfidentialComputing.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.confidentialcomputing.v1alpha1.ConfidentialComputing|createChallenge}. + * @memberof google.cloud.confidentialcomputing.v1alpha1.ConfidentialComputing + * @typedef CreateChallengeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.confidentialcomputing.v1alpha1.Challenge} [response] Challenge + */ + + /** + * Calls CreateChallenge. + * @function createChallenge + * @memberof google.cloud.confidentialcomputing.v1alpha1.ConfidentialComputing + * @instance + * @param {google.cloud.confidentialcomputing.v1alpha1.ICreateChallengeRequest} request CreateChallengeRequest message or plain object + * @param {google.cloud.confidentialcomputing.v1alpha1.ConfidentialComputing.CreateChallengeCallback} callback Node-style callback called with the error, if any, and Challenge + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfidentialComputing.prototype.createChallenge = function createChallenge(request, callback) { + return this.rpcCall(createChallenge, $root.google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest, $root.google.cloud.confidentialcomputing.v1alpha1.Challenge, request, callback); + }, "name", { value: "CreateChallenge" }); + + /** + * Calls CreateChallenge. + * @function createChallenge + * @memberof google.cloud.confidentialcomputing.v1alpha1.ConfidentialComputing + * @instance + * @param {google.cloud.confidentialcomputing.v1alpha1.ICreateChallengeRequest} request CreateChallengeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.confidentialcomputing.v1alpha1.ConfidentialComputing|verifyAttestation}. + * @memberof google.cloud.confidentialcomputing.v1alpha1.ConfidentialComputing + * @typedef VerifyAttestationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationResponse} [response] VerifyAttestationResponse + */ + + /** + * Calls VerifyAttestation. + * @function verifyAttestation + * @memberof google.cloud.confidentialcomputing.v1alpha1.ConfidentialComputing + * @instance + * @param {google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationRequest} request VerifyAttestationRequest message or plain object + * @param {google.cloud.confidentialcomputing.v1alpha1.ConfidentialComputing.VerifyAttestationCallback} callback Node-style callback called with the error, if any, and VerifyAttestationResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConfidentialComputing.prototype.verifyAttestation = function verifyAttestation(request, callback) { + return this.rpcCall(verifyAttestation, $root.google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest, $root.google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationResponse, request, callback); + }, "name", { value: "VerifyAttestation" }); + + /** + * Calls VerifyAttestation. + * @function verifyAttestation + * @memberof google.cloud.confidentialcomputing.v1alpha1.ConfidentialComputing + * @instance + * @param {google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationRequest} request VerifyAttestationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ConfidentialComputing; + })(); + + v1alpha1.Challenge = (function() { + + /** + * Properties of a Challenge. + * @memberof google.cloud.confidentialcomputing.v1alpha1 + * @interface IChallenge + * @property {string|null} [name] Challenge name + * @property {google.protobuf.ITimestamp|null} [createTime] Challenge createTime + * @property {google.protobuf.ITimestamp|null} [expireTime] Challenge expireTime + * @property {boolean|null} [used] Challenge used + * @property {Uint8Array|null} [nonce] Challenge nonce + */ + + /** + * Constructs a new Challenge. + * @memberof google.cloud.confidentialcomputing.v1alpha1 + * @classdesc Represents a Challenge. + * @implements IChallenge + * @constructor + * @param {google.cloud.confidentialcomputing.v1alpha1.IChallenge=} [properties] Properties to set + */ + function Challenge(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]]; + } + + /** + * Challenge name. + * @member {string} name + * @memberof google.cloud.confidentialcomputing.v1alpha1.Challenge + * @instance + */ + Challenge.prototype.name = ""; + + /** + * Challenge createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.confidentialcomputing.v1alpha1.Challenge + * @instance + */ + Challenge.prototype.createTime = null; + + /** + * Challenge expireTime. + * @member {google.protobuf.ITimestamp|null|undefined} expireTime + * @memberof google.cloud.confidentialcomputing.v1alpha1.Challenge + * @instance + */ + Challenge.prototype.expireTime = null; + + /** + * Challenge used. + * @member {boolean} used + * @memberof google.cloud.confidentialcomputing.v1alpha1.Challenge + * @instance + */ + Challenge.prototype.used = false; + + /** + * Challenge nonce. + * @member {Uint8Array} nonce + * @memberof google.cloud.confidentialcomputing.v1alpha1.Challenge + * @instance + */ + Challenge.prototype.nonce = $util.newBuffer([]); + + /** + * Creates a new Challenge instance using the specified properties. + * @function create + * @memberof google.cloud.confidentialcomputing.v1alpha1.Challenge + * @static + * @param {google.cloud.confidentialcomputing.v1alpha1.IChallenge=} [properties] Properties to set + * @returns {google.cloud.confidentialcomputing.v1alpha1.Challenge} Challenge instance + */ + Challenge.create = function create(properties) { + return new Challenge(properties); + }; + + /** + * Encodes the specified Challenge message. Does not implicitly {@link google.cloud.confidentialcomputing.v1alpha1.Challenge.verify|verify} messages. + * @function encode + * @memberof google.cloud.confidentialcomputing.v1alpha1.Challenge + * @static + * @param {google.cloud.confidentialcomputing.v1alpha1.IChallenge} message Challenge message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Challenge.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.used != null && Object.hasOwnProperty.call(message, "used")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.used); + if (message.nonce != null && Object.hasOwnProperty.call(message, "nonce")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.nonce); + return writer; + }; + + /** + * Encodes the specified Challenge message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1alpha1.Challenge.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.confidentialcomputing.v1alpha1.Challenge + * @static + * @param {google.cloud.confidentialcomputing.v1alpha1.IChallenge} message Challenge message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Challenge.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Challenge message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.confidentialcomputing.v1alpha1.Challenge + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.confidentialcomputing.v1alpha1.Challenge} Challenge + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Challenge.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.confidentialcomputing.v1alpha1.Challenge(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.used = reader.bool(); + break; + } + case 5: { + message.nonce = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Challenge message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.confidentialcomputing.v1alpha1.Challenge + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.confidentialcomputing.v1alpha1.Challenge} Challenge + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Challenge.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Challenge message. + * @function verify + * @memberof google.cloud.confidentialcomputing.v1alpha1.Challenge + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Challenge.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.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expireTime); + if (error) + return "expireTime." + error; + } + if (message.used != null && message.hasOwnProperty("used")) + if (typeof message.used !== "boolean") + return "used: boolean expected"; + if (message.nonce != null && message.hasOwnProperty("nonce")) + if (!(message.nonce && typeof message.nonce.length === "number" || $util.isString(message.nonce))) + return "nonce: buffer expected"; + return null; + }; + + /** + * Creates a Challenge message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.confidentialcomputing.v1alpha1.Challenge + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.confidentialcomputing.v1alpha1.Challenge} Challenge + */ + Challenge.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.confidentialcomputing.v1alpha1.Challenge) + return object; + var message = new $root.google.cloud.confidentialcomputing.v1alpha1.Challenge(); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.confidentialcomputing.v1alpha1.Challenge.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.expireTime != null) { + if (typeof object.expireTime !== "object") + throw TypeError(".google.cloud.confidentialcomputing.v1alpha1.Challenge.expireTime: object expected"); + message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); + } + if (object.used != null) + message.used = Boolean(object.used); + if (object.nonce != null) + if (typeof object.nonce === "string") + $util.base64.decode(object.nonce, message.nonce = $util.newBuffer($util.base64.length(object.nonce)), 0); + else if (object.nonce.length >= 0) + message.nonce = object.nonce; + return message; + }; + + /** + * Creates a plain object from a Challenge message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.confidentialcomputing.v1alpha1.Challenge + * @static + * @param {google.cloud.confidentialcomputing.v1alpha1.Challenge} message Challenge + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Challenge.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.expireTime = null; + object.used = false; + if (options.bytes === String) + object.nonce = ""; + else { + object.nonce = []; + if (options.bytes !== Array) + object.nonce = $util.newBuffer(object.nonce); + } + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + if (message.used != null && message.hasOwnProperty("used")) + object.used = message.used; + if (message.nonce != null && message.hasOwnProperty("nonce")) + object.nonce = options.bytes === String ? $util.base64.encode(message.nonce, 0, message.nonce.length) : options.bytes === Array ? Array.prototype.slice.call(message.nonce) : message.nonce; + return object; + }; + + /** + * Converts this Challenge to JSON. + * @function toJSON + * @memberof google.cloud.confidentialcomputing.v1alpha1.Challenge + * @instance + * @returns {Object.} JSON object + */ + Challenge.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Challenge + * @function getTypeUrl + * @memberof google.cloud.confidentialcomputing.v1alpha1.Challenge + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Challenge.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.confidentialcomputing.v1alpha1.Challenge"; + }; + + return Challenge; + })(); + + v1alpha1.CreateChallengeRequest = (function() { + + /** + * Properties of a CreateChallengeRequest. + * @memberof google.cloud.confidentialcomputing.v1alpha1 + * @interface ICreateChallengeRequest + * @property {string|null} [parent] CreateChallengeRequest parent + * @property {google.cloud.confidentialcomputing.v1alpha1.IChallenge|null} [challenge] CreateChallengeRequest challenge + */ + + /** + * Constructs a new CreateChallengeRequest. + * @memberof google.cloud.confidentialcomputing.v1alpha1 + * @classdesc Represents a CreateChallengeRequest. + * @implements ICreateChallengeRequest + * @constructor + * @param {google.cloud.confidentialcomputing.v1alpha1.ICreateChallengeRequest=} [properties] Properties to set + */ + function CreateChallengeRequest(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]]; + } + + /** + * CreateChallengeRequest parent. + * @member {string} parent + * @memberof google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest + * @instance + */ + CreateChallengeRequest.prototype.parent = ""; + + /** + * CreateChallengeRequest challenge. + * @member {google.cloud.confidentialcomputing.v1alpha1.IChallenge|null|undefined} challenge + * @memberof google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest + * @instance + */ + CreateChallengeRequest.prototype.challenge = null; + + /** + * Creates a new CreateChallengeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest + * @static + * @param {google.cloud.confidentialcomputing.v1alpha1.ICreateChallengeRequest=} [properties] Properties to set + * @returns {google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest} CreateChallengeRequest instance + */ + CreateChallengeRequest.create = function create(properties) { + return new CreateChallengeRequest(properties); + }; + + /** + * Encodes the specified CreateChallengeRequest message. Does not implicitly {@link google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest + * @static + * @param {google.cloud.confidentialcomputing.v1alpha1.ICreateChallengeRequest} message CreateChallengeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateChallengeRequest.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.challenge != null && Object.hasOwnProperty.call(message, "challenge")) + $root.google.cloud.confidentialcomputing.v1alpha1.Challenge.encode(message.challenge, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateChallengeRequest message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest + * @static + * @param {google.cloud.confidentialcomputing.v1alpha1.ICreateChallengeRequest} message CreateChallengeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateChallengeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateChallengeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest} CreateChallengeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateChallengeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.challenge = $root.google.cloud.confidentialcomputing.v1alpha1.Challenge.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateChallengeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest} CreateChallengeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateChallengeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateChallengeRequest message. + * @function verify + * @memberof google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateChallengeRequest.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.challenge != null && message.hasOwnProperty("challenge")) { + var error = $root.google.cloud.confidentialcomputing.v1alpha1.Challenge.verify(message.challenge); + if (error) + return "challenge." + error; + } + return null; + }; + + /** + * Creates a CreateChallengeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest} CreateChallengeRequest + */ + CreateChallengeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest) + return object; + var message = new $root.google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.challenge != null) { + if (typeof object.challenge !== "object") + throw TypeError(".google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest.challenge: object expected"); + message.challenge = $root.google.cloud.confidentialcomputing.v1alpha1.Challenge.fromObject(object.challenge); + } + return message; + }; + + /** + * Creates a plain object from a CreateChallengeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest + * @static + * @param {google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest} message CreateChallengeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateChallengeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.challenge = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.challenge != null && message.hasOwnProperty("challenge")) + object.challenge = $root.google.cloud.confidentialcomputing.v1alpha1.Challenge.toObject(message.challenge, options); + return object; + }; + + /** + * Converts this CreateChallengeRequest to JSON. + * @function toJSON + * @memberof google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest + * @instance + * @returns {Object.} JSON object + */ + CreateChallengeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateChallengeRequest + * @function getTypeUrl + * @memberof google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateChallengeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest"; + }; + + return CreateChallengeRequest; + })(); + + v1alpha1.VerifyAttestationRequest = (function() { + + /** + * Properties of a VerifyAttestationRequest. + * @memberof google.cloud.confidentialcomputing.v1alpha1 + * @interface IVerifyAttestationRequest + * @property {string|null} [challenge] VerifyAttestationRequest challenge + * @property {google.cloud.confidentialcomputing.v1alpha1.IGcpCredentials|null} [gcpCredentials] VerifyAttestationRequest gcpCredentials + * @property {google.cloud.confidentialcomputing.v1alpha1.ITpmAttestation|null} [tpmAttestation] VerifyAttestationRequest tpmAttestation + */ + + /** + * Constructs a new VerifyAttestationRequest. + * @memberof google.cloud.confidentialcomputing.v1alpha1 + * @classdesc Represents a VerifyAttestationRequest. + * @implements IVerifyAttestationRequest + * @constructor + * @param {google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationRequest=} [properties] Properties to set + */ + function VerifyAttestationRequest(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]]; + } + + /** + * VerifyAttestationRequest challenge. + * @member {string} challenge + * @memberof google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest + * @instance + */ + VerifyAttestationRequest.prototype.challenge = ""; + + /** + * VerifyAttestationRequest gcpCredentials. + * @member {google.cloud.confidentialcomputing.v1alpha1.IGcpCredentials|null|undefined} gcpCredentials + * @memberof google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest + * @instance + */ + VerifyAttestationRequest.prototype.gcpCredentials = null; + + /** + * VerifyAttestationRequest tpmAttestation. + * @member {google.cloud.confidentialcomputing.v1alpha1.ITpmAttestation|null|undefined} tpmAttestation + * @memberof google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest + * @instance + */ + VerifyAttestationRequest.prototype.tpmAttestation = null; + + /** + * Creates a new VerifyAttestationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest + * @static + * @param {google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationRequest=} [properties] Properties to set + * @returns {google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest} VerifyAttestationRequest instance + */ + VerifyAttestationRequest.create = function create(properties) { + return new VerifyAttestationRequest(properties); + }; + + /** + * Encodes the specified VerifyAttestationRequest message. Does not implicitly {@link google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest + * @static + * @param {google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationRequest} message VerifyAttestationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerifyAttestationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.challenge != null && Object.hasOwnProperty.call(message, "challenge")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.challenge); + if (message.gcpCredentials != null && Object.hasOwnProperty.call(message, "gcpCredentials")) + $root.google.cloud.confidentialcomputing.v1alpha1.GcpCredentials.encode(message.gcpCredentials, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.tpmAttestation != null && Object.hasOwnProperty.call(message, "tpmAttestation")) + $root.google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.encode(message.tpmAttestation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified VerifyAttestationRequest message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest + * @static + * @param {google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationRequest} message VerifyAttestationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerifyAttestationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VerifyAttestationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest} VerifyAttestationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifyAttestationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.challenge = reader.string(); + break; + } + case 2: { + message.gcpCredentials = $root.google.cloud.confidentialcomputing.v1alpha1.GcpCredentials.decode(reader, reader.uint32()); + break; + } + case 3: { + message.tpmAttestation = $root.google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VerifyAttestationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest} VerifyAttestationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifyAttestationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VerifyAttestationRequest message. + * @function verify + * @memberof google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VerifyAttestationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.challenge != null && message.hasOwnProperty("challenge")) + if (!$util.isString(message.challenge)) + return "challenge: string expected"; + if (message.gcpCredentials != null && message.hasOwnProperty("gcpCredentials")) { + var error = $root.google.cloud.confidentialcomputing.v1alpha1.GcpCredentials.verify(message.gcpCredentials); + if (error) + return "gcpCredentials." + error; + } + if (message.tpmAttestation != null && message.hasOwnProperty("tpmAttestation")) { + var error = $root.google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.verify(message.tpmAttestation); + if (error) + return "tpmAttestation." + error; + } + return null; + }; + + /** + * Creates a VerifyAttestationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest} VerifyAttestationRequest + */ + VerifyAttestationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest) + return object; + var message = new $root.google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest(); + if (object.challenge != null) + message.challenge = String(object.challenge); + if (object.gcpCredentials != null) { + if (typeof object.gcpCredentials !== "object") + throw TypeError(".google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest.gcpCredentials: object expected"); + message.gcpCredentials = $root.google.cloud.confidentialcomputing.v1alpha1.GcpCredentials.fromObject(object.gcpCredentials); + } + if (object.tpmAttestation != null) { + if (typeof object.tpmAttestation !== "object") + throw TypeError(".google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest.tpmAttestation: object expected"); + message.tpmAttestation = $root.google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.fromObject(object.tpmAttestation); + } + return message; + }; + + /** + * Creates a plain object from a VerifyAttestationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest + * @static + * @param {google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest} message VerifyAttestationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VerifyAttestationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.challenge = ""; + object.gcpCredentials = null; + object.tpmAttestation = null; + } + if (message.challenge != null && message.hasOwnProperty("challenge")) + object.challenge = message.challenge; + if (message.gcpCredentials != null && message.hasOwnProperty("gcpCredentials")) + object.gcpCredentials = $root.google.cloud.confidentialcomputing.v1alpha1.GcpCredentials.toObject(message.gcpCredentials, options); + if (message.tpmAttestation != null && message.hasOwnProperty("tpmAttestation")) + object.tpmAttestation = $root.google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.toObject(message.tpmAttestation, options); + return object; + }; + + /** + * Converts this VerifyAttestationRequest to JSON. + * @function toJSON + * @memberof google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest + * @instance + * @returns {Object.} JSON object + */ + VerifyAttestationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VerifyAttestationRequest + * @function getTypeUrl + * @memberof google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VerifyAttestationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest"; + }; + + return VerifyAttestationRequest; + })(); + + v1alpha1.VerifyAttestationResponse = (function() { + + /** + * Properties of a VerifyAttestationResponse. + * @memberof google.cloud.confidentialcomputing.v1alpha1 + * @interface IVerifyAttestationResponse + * @property {Uint8Array|null} [claimsToken] VerifyAttestationResponse claimsToken + */ + + /** + * Constructs a new VerifyAttestationResponse. + * @memberof google.cloud.confidentialcomputing.v1alpha1 + * @classdesc Represents a VerifyAttestationResponse. + * @implements IVerifyAttestationResponse + * @constructor + * @param {google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationResponse=} [properties] Properties to set + */ + function VerifyAttestationResponse(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]]; + } + + /** + * VerifyAttestationResponse claimsToken. + * @member {Uint8Array} claimsToken + * @memberof google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationResponse + * @instance + */ + VerifyAttestationResponse.prototype.claimsToken = $util.newBuffer([]); + + /** + * Creates a new VerifyAttestationResponse instance using the specified properties. + * @function create + * @memberof google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationResponse + * @static + * @param {google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationResponse=} [properties] Properties to set + * @returns {google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationResponse} VerifyAttestationResponse instance + */ + VerifyAttestationResponse.create = function create(properties) { + return new VerifyAttestationResponse(properties); + }; + + /** + * Encodes the specified VerifyAttestationResponse message. Does not implicitly {@link google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationResponse + * @static + * @param {google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationResponse} message VerifyAttestationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerifyAttestationResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.claimsToken != null && Object.hasOwnProperty.call(message, "claimsToken")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.claimsToken); + return writer; + }; + + /** + * Encodes the specified VerifyAttestationResponse message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationResponse + * @static + * @param {google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationResponse} message VerifyAttestationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerifyAttestationResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VerifyAttestationResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationResponse} VerifyAttestationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifyAttestationResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.claimsToken = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VerifyAttestationResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationResponse} VerifyAttestationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifyAttestationResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VerifyAttestationResponse message. + * @function verify + * @memberof google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VerifyAttestationResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.claimsToken != null && message.hasOwnProperty("claimsToken")) + if (!(message.claimsToken && typeof message.claimsToken.length === "number" || $util.isString(message.claimsToken))) + return "claimsToken: buffer expected"; + return null; + }; + + /** + * Creates a VerifyAttestationResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationResponse} VerifyAttestationResponse + */ + VerifyAttestationResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationResponse) + return object; + var message = new $root.google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationResponse(); + if (object.claimsToken != null) + if (typeof object.claimsToken === "string") + $util.base64.decode(object.claimsToken, message.claimsToken = $util.newBuffer($util.base64.length(object.claimsToken)), 0); + else if (object.claimsToken.length >= 0) + message.claimsToken = object.claimsToken; + return message; + }; + + /** + * Creates a plain object from a VerifyAttestationResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationResponse + * @static + * @param {google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationResponse} message VerifyAttestationResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VerifyAttestationResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.claimsToken = ""; + else { + object.claimsToken = []; + if (options.bytes !== Array) + object.claimsToken = $util.newBuffer(object.claimsToken); + } + if (message.claimsToken != null && message.hasOwnProperty("claimsToken")) + object.claimsToken = options.bytes === String ? $util.base64.encode(message.claimsToken, 0, message.claimsToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.claimsToken) : message.claimsToken; + return object; + }; + + /** + * Converts this VerifyAttestationResponse to JSON. + * @function toJSON + * @memberof google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationResponse + * @instance + * @returns {Object.} JSON object + */ + VerifyAttestationResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VerifyAttestationResponse + * @function getTypeUrl + * @memberof google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VerifyAttestationResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationResponse"; + }; + + return VerifyAttestationResponse; + })(); + + v1alpha1.GcpCredentials = (function() { + + /** + * Properties of a GcpCredentials. + * @memberof google.cloud.confidentialcomputing.v1alpha1 + * @interface IGcpCredentials + * @property {Array.|null} [idTokens] GcpCredentials idTokens + */ + + /** + * Constructs a new GcpCredentials. + * @memberof google.cloud.confidentialcomputing.v1alpha1 + * @classdesc Represents a GcpCredentials. + * @implements IGcpCredentials + * @constructor + * @param {google.cloud.confidentialcomputing.v1alpha1.IGcpCredentials=} [properties] Properties to set + */ + function GcpCredentials(properties) { + this.idTokens = []; + 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]]; + } + + /** + * GcpCredentials idTokens. + * @member {Array.} idTokens + * @memberof google.cloud.confidentialcomputing.v1alpha1.GcpCredentials + * @instance + */ + GcpCredentials.prototype.idTokens = $util.emptyArray; + + /** + * Creates a new GcpCredentials instance using the specified properties. + * @function create + * @memberof google.cloud.confidentialcomputing.v1alpha1.GcpCredentials + * @static + * @param {google.cloud.confidentialcomputing.v1alpha1.IGcpCredentials=} [properties] Properties to set + * @returns {google.cloud.confidentialcomputing.v1alpha1.GcpCredentials} GcpCredentials instance + */ + GcpCredentials.create = function create(properties) { + return new GcpCredentials(properties); + }; + + /** + * Encodes the specified GcpCredentials message. Does not implicitly {@link google.cloud.confidentialcomputing.v1alpha1.GcpCredentials.verify|verify} messages. + * @function encode + * @memberof google.cloud.confidentialcomputing.v1alpha1.GcpCredentials + * @static + * @param {google.cloud.confidentialcomputing.v1alpha1.IGcpCredentials} message GcpCredentials message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcpCredentials.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.idTokens != null && message.idTokens.length) + for (var i = 0; i < message.idTokens.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.idTokens[i]); + return writer; + }; + + /** + * Encodes the specified GcpCredentials message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1alpha1.GcpCredentials.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.confidentialcomputing.v1alpha1.GcpCredentials + * @static + * @param {google.cloud.confidentialcomputing.v1alpha1.IGcpCredentials} message GcpCredentials message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcpCredentials.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcpCredentials message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.confidentialcomputing.v1alpha1.GcpCredentials + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.confidentialcomputing.v1alpha1.GcpCredentials} GcpCredentials + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcpCredentials.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.confidentialcomputing.v1alpha1.GcpCredentials(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.idTokens && message.idTokens.length)) + message.idTokens = []; + message.idTokens.push(reader.bytes()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcpCredentials message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.confidentialcomputing.v1alpha1.GcpCredentials + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.confidentialcomputing.v1alpha1.GcpCredentials} GcpCredentials + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcpCredentials.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcpCredentials message. + * @function verify + * @memberof google.cloud.confidentialcomputing.v1alpha1.GcpCredentials + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcpCredentials.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.idTokens != null && message.hasOwnProperty("idTokens")) { + if (!Array.isArray(message.idTokens)) + return "idTokens: array expected"; + for (var i = 0; i < message.idTokens.length; ++i) + if (!(message.idTokens[i] && typeof message.idTokens[i].length === "number" || $util.isString(message.idTokens[i]))) + return "idTokens: buffer[] expected"; + } + return null; + }; + + /** + * Creates a GcpCredentials message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.confidentialcomputing.v1alpha1.GcpCredentials + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.confidentialcomputing.v1alpha1.GcpCredentials} GcpCredentials + */ + GcpCredentials.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.confidentialcomputing.v1alpha1.GcpCredentials) + return object; + var message = new $root.google.cloud.confidentialcomputing.v1alpha1.GcpCredentials(); + if (object.idTokens) { + if (!Array.isArray(object.idTokens)) + throw TypeError(".google.cloud.confidentialcomputing.v1alpha1.GcpCredentials.idTokens: array expected"); + message.idTokens = []; + for (var i = 0; i < object.idTokens.length; ++i) + if (typeof object.idTokens[i] === "string") + $util.base64.decode(object.idTokens[i], message.idTokens[i] = $util.newBuffer($util.base64.length(object.idTokens[i])), 0); + else if (object.idTokens[i].length >= 0) + message.idTokens[i] = object.idTokens[i]; + } + return message; + }; + + /** + * Creates a plain object from a GcpCredentials message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.confidentialcomputing.v1alpha1.GcpCredentials + * @static + * @param {google.cloud.confidentialcomputing.v1alpha1.GcpCredentials} message GcpCredentials + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcpCredentials.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.idTokens = []; + if (message.idTokens && message.idTokens.length) { + object.idTokens = []; + for (var j = 0; j < message.idTokens.length; ++j) + object.idTokens[j] = options.bytes === String ? $util.base64.encode(message.idTokens[j], 0, message.idTokens[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.idTokens[j]) : message.idTokens[j]; + } + return object; + }; + + /** + * Converts this GcpCredentials to JSON. + * @function toJSON + * @memberof google.cloud.confidentialcomputing.v1alpha1.GcpCredentials + * @instance + * @returns {Object.} JSON object + */ + GcpCredentials.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcpCredentials + * @function getTypeUrl + * @memberof google.cloud.confidentialcomputing.v1alpha1.GcpCredentials + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcpCredentials.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.confidentialcomputing.v1alpha1.GcpCredentials"; + }; + + return GcpCredentials; + })(); + + v1alpha1.TpmAttestation = (function() { + + /** + * Properties of a TpmAttestation. + * @memberof google.cloud.confidentialcomputing.v1alpha1 + * @interface ITpmAttestation + * @property {Array.|null} [quotes] TpmAttestation quotes + * @property {Uint8Array|null} [tcgEventLog] TpmAttestation tcgEventLog + * @property {Uint8Array|null} [canonicalEventLog] TpmAttestation canonicalEventLog + * @property {Uint8Array|null} [akCert] TpmAttestation akCert + * @property {Array.|null} [certChain] TpmAttestation certChain + */ + + /** + * Constructs a new TpmAttestation. + * @memberof google.cloud.confidentialcomputing.v1alpha1 + * @classdesc Represents a TpmAttestation. + * @implements ITpmAttestation + * @constructor + * @param {google.cloud.confidentialcomputing.v1alpha1.ITpmAttestation=} [properties] Properties to set + */ + function TpmAttestation(properties) { + this.quotes = []; + this.certChain = []; + 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]]; + } + + /** + * TpmAttestation quotes. + * @member {Array.} quotes + * @memberof google.cloud.confidentialcomputing.v1alpha1.TpmAttestation + * @instance + */ + TpmAttestation.prototype.quotes = $util.emptyArray; + + /** + * TpmAttestation tcgEventLog. + * @member {Uint8Array} tcgEventLog + * @memberof google.cloud.confidentialcomputing.v1alpha1.TpmAttestation + * @instance + */ + TpmAttestation.prototype.tcgEventLog = $util.newBuffer([]); + + /** + * TpmAttestation canonicalEventLog. + * @member {Uint8Array} canonicalEventLog + * @memberof google.cloud.confidentialcomputing.v1alpha1.TpmAttestation + * @instance + */ + TpmAttestation.prototype.canonicalEventLog = $util.newBuffer([]); + + /** + * TpmAttestation akCert. + * @member {Uint8Array} akCert + * @memberof google.cloud.confidentialcomputing.v1alpha1.TpmAttestation + * @instance + */ + TpmAttestation.prototype.akCert = $util.newBuffer([]); + + /** + * TpmAttestation certChain. + * @member {Array.} certChain + * @memberof google.cloud.confidentialcomputing.v1alpha1.TpmAttestation + * @instance + */ + TpmAttestation.prototype.certChain = $util.emptyArray; + + /** + * Creates a new TpmAttestation instance using the specified properties. + * @function create + * @memberof google.cloud.confidentialcomputing.v1alpha1.TpmAttestation + * @static + * @param {google.cloud.confidentialcomputing.v1alpha1.ITpmAttestation=} [properties] Properties to set + * @returns {google.cloud.confidentialcomputing.v1alpha1.TpmAttestation} TpmAttestation instance + */ + TpmAttestation.create = function create(properties) { + return new TpmAttestation(properties); + }; + + /** + * Encodes the specified TpmAttestation message. Does not implicitly {@link google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.verify|verify} messages. + * @function encode + * @memberof google.cloud.confidentialcomputing.v1alpha1.TpmAttestation + * @static + * @param {google.cloud.confidentialcomputing.v1alpha1.ITpmAttestation} message TpmAttestation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TpmAttestation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.quotes != null && message.quotes.length) + for (var i = 0; i < message.quotes.length; ++i) + $root.google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote.encode(message.quotes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tcgEventLog != null && Object.hasOwnProperty.call(message, "tcgEventLog")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.tcgEventLog); + if (message.canonicalEventLog != null && Object.hasOwnProperty.call(message, "canonicalEventLog")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.canonicalEventLog); + if (message.akCert != null && Object.hasOwnProperty.call(message, "akCert")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.akCert); + if (message.certChain != null && message.certChain.length) + for (var i = 0; i < message.certChain.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.certChain[i]); + return writer; + }; + + /** + * Encodes the specified TpmAttestation message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.confidentialcomputing.v1alpha1.TpmAttestation + * @static + * @param {google.cloud.confidentialcomputing.v1alpha1.ITpmAttestation} message TpmAttestation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TpmAttestation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TpmAttestation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.confidentialcomputing.v1alpha1.TpmAttestation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.confidentialcomputing.v1alpha1.TpmAttestation} TpmAttestation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TpmAttestation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.confidentialcomputing.v1alpha1.TpmAttestation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.quotes && message.quotes.length)) + message.quotes = []; + message.quotes.push($root.google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote.decode(reader, reader.uint32())); + break; + } + case 2: { + message.tcgEventLog = reader.bytes(); + break; + } + case 3: { + message.canonicalEventLog = reader.bytes(); + break; + } + case 4: { + message.akCert = reader.bytes(); + break; + } + case 5: { + if (!(message.certChain && message.certChain.length)) + message.certChain = []; + message.certChain.push(reader.bytes()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TpmAttestation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.confidentialcomputing.v1alpha1.TpmAttestation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.confidentialcomputing.v1alpha1.TpmAttestation} TpmAttestation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TpmAttestation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TpmAttestation message. + * @function verify + * @memberof google.cloud.confidentialcomputing.v1alpha1.TpmAttestation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TpmAttestation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.quotes != null && message.hasOwnProperty("quotes")) { + if (!Array.isArray(message.quotes)) + return "quotes: array expected"; + for (var i = 0; i < message.quotes.length; ++i) { + var error = $root.google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote.verify(message.quotes[i]); + if (error) + return "quotes." + error; + } + } + if (message.tcgEventLog != null && message.hasOwnProperty("tcgEventLog")) + if (!(message.tcgEventLog && typeof message.tcgEventLog.length === "number" || $util.isString(message.tcgEventLog))) + return "tcgEventLog: buffer expected"; + if (message.canonicalEventLog != null && message.hasOwnProperty("canonicalEventLog")) + if (!(message.canonicalEventLog && typeof message.canonicalEventLog.length === "number" || $util.isString(message.canonicalEventLog))) + return "canonicalEventLog: buffer expected"; + if (message.akCert != null && message.hasOwnProperty("akCert")) + if (!(message.akCert && typeof message.akCert.length === "number" || $util.isString(message.akCert))) + return "akCert: buffer expected"; + if (message.certChain != null && message.hasOwnProperty("certChain")) { + if (!Array.isArray(message.certChain)) + return "certChain: array expected"; + for (var i = 0; i < message.certChain.length; ++i) + if (!(message.certChain[i] && typeof message.certChain[i].length === "number" || $util.isString(message.certChain[i]))) + return "certChain: buffer[] expected"; + } + return null; + }; + + /** + * Creates a TpmAttestation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.confidentialcomputing.v1alpha1.TpmAttestation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.confidentialcomputing.v1alpha1.TpmAttestation} TpmAttestation + */ + TpmAttestation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.confidentialcomputing.v1alpha1.TpmAttestation) + return object; + var message = new $root.google.cloud.confidentialcomputing.v1alpha1.TpmAttestation(); + if (object.quotes) { + if (!Array.isArray(object.quotes)) + throw TypeError(".google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.quotes: array expected"); + message.quotes = []; + for (var i = 0; i < object.quotes.length; ++i) { + if (typeof object.quotes[i] !== "object") + throw TypeError(".google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.quotes: object expected"); + message.quotes[i] = $root.google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote.fromObject(object.quotes[i]); + } + } + if (object.tcgEventLog != null) + if (typeof object.tcgEventLog === "string") + $util.base64.decode(object.tcgEventLog, message.tcgEventLog = $util.newBuffer($util.base64.length(object.tcgEventLog)), 0); + else if (object.tcgEventLog.length >= 0) + message.tcgEventLog = object.tcgEventLog; + if (object.canonicalEventLog != null) + if (typeof object.canonicalEventLog === "string") + $util.base64.decode(object.canonicalEventLog, message.canonicalEventLog = $util.newBuffer($util.base64.length(object.canonicalEventLog)), 0); + else if (object.canonicalEventLog.length >= 0) + message.canonicalEventLog = object.canonicalEventLog; + if (object.akCert != null) + if (typeof object.akCert === "string") + $util.base64.decode(object.akCert, message.akCert = $util.newBuffer($util.base64.length(object.akCert)), 0); + else if (object.akCert.length >= 0) + message.akCert = object.akCert; + if (object.certChain) { + if (!Array.isArray(object.certChain)) + throw TypeError(".google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.certChain: array expected"); + message.certChain = []; + for (var i = 0; i < object.certChain.length; ++i) + if (typeof object.certChain[i] === "string") + $util.base64.decode(object.certChain[i], message.certChain[i] = $util.newBuffer($util.base64.length(object.certChain[i])), 0); + else if (object.certChain[i].length >= 0) + message.certChain[i] = object.certChain[i]; + } + return message; + }; + + /** + * Creates a plain object from a TpmAttestation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.confidentialcomputing.v1alpha1.TpmAttestation + * @static + * @param {google.cloud.confidentialcomputing.v1alpha1.TpmAttestation} message TpmAttestation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TpmAttestation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.quotes = []; + object.certChain = []; + } + if (options.defaults) { + if (options.bytes === String) + object.tcgEventLog = ""; + else { + object.tcgEventLog = []; + if (options.bytes !== Array) + object.tcgEventLog = $util.newBuffer(object.tcgEventLog); + } + if (options.bytes === String) + object.canonicalEventLog = ""; + else { + object.canonicalEventLog = []; + if (options.bytes !== Array) + object.canonicalEventLog = $util.newBuffer(object.canonicalEventLog); + } + if (options.bytes === String) + object.akCert = ""; + else { + object.akCert = []; + if (options.bytes !== Array) + object.akCert = $util.newBuffer(object.akCert); + } + } + if (message.quotes && message.quotes.length) { + object.quotes = []; + for (var j = 0; j < message.quotes.length; ++j) + object.quotes[j] = $root.google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote.toObject(message.quotes[j], options); + } + if (message.tcgEventLog != null && message.hasOwnProperty("tcgEventLog")) + object.tcgEventLog = options.bytes === String ? $util.base64.encode(message.tcgEventLog, 0, message.tcgEventLog.length) : options.bytes === Array ? Array.prototype.slice.call(message.tcgEventLog) : message.tcgEventLog; + if (message.canonicalEventLog != null && message.hasOwnProperty("canonicalEventLog")) + object.canonicalEventLog = options.bytes === String ? $util.base64.encode(message.canonicalEventLog, 0, message.canonicalEventLog.length) : options.bytes === Array ? Array.prototype.slice.call(message.canonicalEventLog) : message.canonicalEventLog; + if (message.akCert != null && message.hasOwnProperty("akCert")) + object.akCert = options.bytes === String ? $util.base64.encode(message.akCert, 0, message.akCert.length) : options.bytes === Array ? Array.prototype.slice.call(message.akCert) : message.akCert; + if (message.certChain && message.certChain.length) { + object.certChain = []; + for (var j = 0; j < message.certChain.length; ++j) + object.certChain[j] = options.bytes === String ? $util.base64.encode(message.certChain[j], 0, message.certChain[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.certChain[j]) : message.certChain[j]; + } + return object; + }; + + /** + * Converts this TpmAttestation to JSON. + * @function toJSON + * @memberof google.cloud.confidentialcomputing.v1alpha1.TpmAttestation + * @instance + * @returns {Object.} JSON object + */ + TpmAttestation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TpmAttestation + * @function getTypeUrl + * @memberof google.cloud.confidentialcomputing.v1alpha1.TpmAttestation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TpmAttestation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.confidentialcomputing.v1alpha1.TpmAttestation"; + }; + + TpmAttestation.Quote = (function() { + + /** + * Properties of a Quote. + * @memberof google.cloud.confidentialcomputing.v1alpha1.TpmAttestation + * @interface IQuote + * @property {number|null} [hashAlgo] Quote hashAlgo + * @property {Object.|null} [pcrValues] Quote pcrValues + * @property {Uint8Array|null} [rawQuote] Quote rawQuote + * @property {Uint8Array|null} [rawSignature] Quote rawSignature + */ + + /** + * Constructs a new Quote. + * @memberof google.cloud.confidentialcomputing.v1alpha1.TpmAttestation + * @classdesc Represents a Quote. + * @implements IQuote + * @constructor + * @param {google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.IQuote=} [properties] Properties to set + */ + function Quote(properties) { + this.pcrValues = {}; + 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]]; + } + + /** + * Quote hashAlgo. + * @member {number} hashAlgo + * @memberof google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote + * @instance + */ + Quote.prototype.hashAlgo = 0; + + /** + * Quote pcrValues. + * @member {Object.} pcrValues + * @memberof google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote + * @instance + */ + Quote.prototype.pcrValues = $util.emptyObject; + + /** + * Quote rawQuote. + * @member {Uint8Array} rawQuote + * @memberof google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote + * @instance + */ + Quote.prototype.rawQuote = $util.newBuffer([]); + + /** + * Quote rawSignature. + * @member {Uint8Array} rawSignature + * @memberof google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote + * @instance + */ + Quote.prototype.rawSignature = $util.newBuffer([]); + + /** + * Creates a new Quote instance using the specified properties. + * @function create + * @memberof google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote + * @static + * @param {google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.IQuote=} [properties] Properties to set + * @returns {google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote} Quote instance + */ + Quote.create = function create(properties) { + return new Quote(properties); + }; + + /** + * Encodes the specified Quote message. Does not implicitly {@link google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote.verify|verify} messages. + * @function encode + * @memberof google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote + * @static + * @param {google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.IQuote} message Quote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Quote.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hashAlgo != null && Object.hasOwnProperty.call(message, "hashAlgo")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.hashAlgo); + if (message.pcrValues != null && Object.hasOwnProperty.call(message, "pcrValues")) + for (var keys = Object.keys(message.pcrValues), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 0 =*/8).int32(keys[i]).uint32(/* id 2, wireType 2 =*/18).bytes(message.pcrValues[keys[i]]).ldelim(); + if (message.rawQuote != null && Object.hasOwnProperty.call(message, "rawQuote")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.rawQuote); + if (message.rawSignature != null && Object.hasOwnProperty.call(message, "rawSignature")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.rawSignature); + return writer; + }; + + /** + * Encodes the specified Quote message, length delimited. Does not implicitly {@link google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote + * @static + * @param {google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.IQuote} message Quote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Quote.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Quote message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote} Quote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Quote.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.hashAlgo = reader.int32(); + break; + } + case 2: { + if (message.pcrValues === $util.emptyObject) + message.pcrValues = {}; + var end2 = reader.uint32() + reader.pos; + key = 0; + value = []; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.int32(); + break; + case 2: + value = reader.bytes(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.pcrValues[key] = value; + break; + } + case 3: { + message.rawQuote = reader.bytes(); + break; + } + case 4: { + message.rawSignature = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Quote message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote} Quote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Quote.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Quote message. + * @function verify + * @memberof google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Quote.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hashAlgo != null && message.hasOwnProperty("hashAlgo")) + if (!$util.isInteger(message.hashAlgo)) + return "hashAlgo: integer expected"; + if (message.pcrValues != null && message.hasOwnProperty("pcrValues")) { + if (!$util.isObject(message.pcrValues)) + return "pcrValues: object expected"; + var key = Object.keys(message.pcrValues); + for (var i = 0; i < key.length; ++i) { + if (!$util.key32Re.test(key[i])) + return "pcrValues: integer key{k:int32} expected"; + if (!(message.pcrValues[key[i]] && typeof message.pcrValues[key[i]].length === "number" || $util.isString(message.pcrValues[key[i]]))) + return "pcrValues: buffer{k:int32} expected"; + } + } + if (message.rawQuote != null && message.hasOwnProperty("rawQuote")) + if (!(message.rawQuote && typeof message.rawQuote.length === "number" || $util.isString(message.rawQuote))) + return "rawQuote: buffer expected"; + if (message.rawSignature != null && message.hasOwnProperty("rawSignature")) + if (!(message.rawSignature && typeof message.rawSignature.length === "number" || $util.isString(message.rawSignature))) + return "rawSignature: buffer expected"; + return null; + }; + + /** + * Creates a Quote message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote} Quote + */ + Quote.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote) + return object; + var message = new $root.google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote(); + if (object.hashAlgo != null) + message.hashAlgo = object.hashAlgo | 0; + if (object.pcrValues) { + if (typeof object.pcrValues !== "object") + throw TypeError(".google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote.pcrValues: object expected"); + message.pcrValues = {}; + for (var keys = Object.keys(object.pcrValues), i = 0; i < keys.length; ++i) + if (typeof object.pcrValues[keys[i]] === "string") + $util.base64.decode(object.pcrValues[keys[i]], message.pcrValues[keys[i]] = $util.newBuffer($util.base64.length(object.pcrValues[keys[i]])), 0); + else if (object.pcrValues[keys[i]].length >= 0) + message.pcrValues[keys[i]] = object.pcrValues[keys[i]]; + } + if (object.rawQuote != null) + if (typeof object.rawQuote === "string") + $util.base64.decode(object.rawQuote, message.rawQuote = $util.newBuffer($util.base64.length(object.rawQuote)), 0); + else if (object.rawQuote.length >= 0) + message.rawQuote = object.rawQuote; + if (object.rawSignature != null) + if (typeof object.rawSignature === "string") + $util.base64.decode(object.rawSignature, message.rawSignature = $util.newBuffer($util.base64.length(object.rawSignature)), 0); + else if (object.rawSignature.length >= 0) + message.rawSignature = object.rawSignature; + return message; + }; + + /** + * Creates a plain object from a Quote message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote + * @static + * @param {google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote} message Quote + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Quote.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.pcrValues = {}; + if (options.defaults) { + object.hashAlgo = 0; + if (options.bytes === String) + object.rawQuote = ""; + else { + object.rawQuote = []; + if (options.bytes !== Array) + object.rawQuote = $util.newBuffer(object.rawQuote); + } + if (options.bytes === String) + object.rawSignature = ""; + else { + object.rawSignature = []; + if (options.bytes !== Array) + object.rawSignature = $util.newBuffer(object.rawSignature); + } + } + if (message.hashAlgo != null && message.hasOwnProperty("hashAlgo")) + object.hashAlgo = message.hashAlgo; + var keys2; + if (message.pcrValues && (keys2 = Object.keys(message.pcrValues)).length) { + object.pcrValues = {}; + for (var j = 0; j < keys2.length; ++j) + object.pcrValues[keys2[j]] = options.bytes === String ? $util.base64.encode(message.pcrValues[keys2[j]], 0, message.pcrValues[keys2[j]].length) : options.bytes === Array ? Array.prototype.slice.call(message.pcrValues[keys2[j]]) : message.pcrValues[keys2[j]]; + } + if (message.rawQuote != null && message.hasOwnProperty("rawQuote")) + object.rawQuote = options.bytes === String ? $util.base64.encode(message.rawQuote, 0, message.rawQuote.length) : options.bytes === Array ? Array.prototype.slice.call(message.rawQuote) : message.rawQuote; + if (message.rawSignature != null && message.hasOwnProperty("rawSignature")) + object.rawSignature = options.bytes === String ? $util.base64.encode(message.rawSignature, 0, message.rawSignature.length) : options.bytes === Array ? Array.prototype.slice.call(message.rawSignature) : message.rawSignature; + return object; + }; + + /** + * Converts this Quote to JSON. + * @function toJSON + * @memberof google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote + * @instance + * @returns {Object.} JSON object + */ + Quote.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Quote + * @function getTypeUrl + * @memberof google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Quote.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.confidentialcomputing.v1alpha1.TpmAttestation.Quote"; + }; + + return Quote; + })(); + + return TpmAttestation; + })(); + + return v1alpha1; + })(); + + return confidentialcomputing; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + 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]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + 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]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(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]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + + return CustomHttpPattern; + })(); + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + 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]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(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]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + + return ResourceReference; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + 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]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {string|null} [edition] FileDescriptorProto edition + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + 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]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * FileDescriptorProto edition. + * @member {string} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = ""; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.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["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.edition); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 13: { + message.edition = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.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["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + if (!$util.isString(message.edition)) + return "edition: string expected"; + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + if (object.edition != null) + message.edition = String(object.edition); + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = message.edition; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + 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]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.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.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.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.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(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]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(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]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(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]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.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.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.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.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(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]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.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.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.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.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + 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]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.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.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.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.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(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]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(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]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.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.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.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.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + 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]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.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.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.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.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(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]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.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.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.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.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + 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]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions phpGenericServices. + * @member {boolean} phpGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) + writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 42: { + message.phpGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (typeof message.phpGenericServices !== "boolean") + return "phpGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.phpGenericServices != null) + message.phpGenericServices = Boolean(object.phpGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpGenericServices = false; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + object.phpGenericServices = message.phpGenericServices; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + 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]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { + writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.int32(message[".google.api.fieldBehavior"][i]); + writer.ldelim(); + } + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object.unverifiedLazy = false; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.deprecated = false; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + 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]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + 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]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length >= 0) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(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]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + 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]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + 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]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + 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]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + 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]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(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]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + + return Timestamp; + })(); + + return protobuf; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/google-cloud-confidentialcomputing/protos/protos.json b/packages/google-cloud-confidentialcomputing/protos/protos.json new file mode 100644 index 00000000000..838fb2210d3 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/protos/protos.json @@ -0,0 +1,1599 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "confidentialcomputing": { + "nested": { + "v1": { + "options": { + "csharp_namespace": "Google.Cloud.ConfidentialComputing.V1", + "go_package": "cloud.google.com/go/confidentialcomputing/apiv1/confidentialcomputingpb;confidentialcomputingpb", + "java_multiple_files": true, + "java_outer_classname": "ServiceProto", + "java_package": "com.google.cloud.confidentialcomputing.v1", + "php_namespace": "Google\\Cloud\\ConfidentialComputing\\V1", + "ruby_package": "Google::Cloud::ConfidentialComputing::V1" + }, + "nested": { + "ConfidentialComputing": { + "options": { + "(google.api.default_host)": "confidentialcomputing.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateChallenge": { + "requestType": "CreateChallengeRequest", + "responseType": "Challenge", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/challenges", + "(google.api.http).body": "challenge", + "(google.api.method_signature)": "parent,challenge" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/challenges", + "body": "challenge" + } + }, + { + "(google.api.method_signature)": "parent,challenge" + } + ] + }, + "VerifyAttestation": { + "requestType": "VerifyAttestationRequest", + "responseType": "VerifyAttestationResponse", + "options": { + "(google.api.http).post": "/v1/{challenge=projects/*/locations/*/challenges/*}:verifyAttestation", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{challenge=projects/*/locations/*/challenges/*}:verifyAttestation", + "body": "*" + } + } + ] + } + } + }, + "Challenge": { + "options": { + "(google.api.resource).type": "confidentialcomputing.googleapis.com/Challenge", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/challenges/{uuid}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "expireTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "used": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "tpmNonce": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "CreateChallengeRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "challenge": { + "type": "Challenge", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "VerifyAttestationRequest": { + "fields": { + "challenge": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "confidentialcomputing.googleapis.com/Challenge" + } + }, + "gcpCredentials": { + "type": "GcpCredentials", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "tpmAttestation": { + "type": "TpmAttestation", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "VerifyAttestationResponse": { + "fields": { + "oidcClaimsToken": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "GcpCredentials": { + "fields": { + "serviceAccountIdTokens": { + "rule": "repeated", + "type": "string", + "id": 2 + } + } + }, + "TpmAttestation": { + "fields": { + "quotes": { + "rule": "repeated", + "type": "Quote", + "id": 1 + }, + "tcgEventLog": { + "type": "bytes", + "id": 2 + }, + "canonicalEventLog": { + "type": "bytes", + "id": 3 + }, + "akCert": { + "type": "bytes", + "id": 4 + }, + "certChain": { + "rule": "repeated", + "type": "bytes", + "id": 5 + } + }, + "nested": { + "Quote": { + "fields": { + "hashAlgo": { + "type": "int32", + "id": 1 + }, + "pcrValues": { + "keyType": "int32", + "type": "bytes", + "id": 2 + }, + "rawQuote": { + "type": "bytes", + "id": 3 + }, + "rawSignature": { + "type": "bytes", + "id": 4 + } + } + } + } + } + } + }, + "v1alpha1": { + "options": { + "csharp_namespace": "Google.Cloud.ConfidentialComputing.V1Alpha1", + "go_package": "cloud.google.com/go/confidentialcomputing/apiv1alpha1/confidentialcomputingpb;confidentialcomputingpb", + "java_multiple_files": true, + "java_outer_classname": "ServiceProto", + "java_package": "com.google.cloud.confidentialcomputing.v1alpha1", + "php_namespace": "Google\\Cloud\\ConfidentialComputing\\V1alpha1", + "ruby_package": "Google::Cloud::ConfidentialComputing::V1alpha1" + }, + "nested": { + "ConfidentialComputing": { + "options": { + "(google.api.default_host)": "confidentialcomputing.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateChallenge": { + "requestType": "CreateChallengeRequest", + "responseType": "Challenge", + "options": { + "(google.api.http).post": "/v1alpha1/{parent=projects/*/locations/*}/challenges", + "(google.api.http).body": "challenge", + "(google.api.method_signature)": "parent,challenge" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha1/{parent=projects/*/locations/*}/challenges", + "body": "challenge" + } + }, + { + "(google.api.method_signature)": "parent,challenge" + } + ] + }, + "VerifyAttestation": { + "requestType": "VerifyAttestationRequest", + "responseType": "VerifyAttestationResponse", + "options": { + "(google.api.http).post": "/v1alpha1/{challenge=projects/*/locations/*/challenges/*}:verifyAttestation", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha1/{challenge=projects/*/locations/*/challenges/*}:verifyAttestation", + "body": "*" + } + } + ] + } + } + }, + "Challenge": { + "options": { + "(google.api.resource).type": "confidentialcomputing.googleapis.com/Challenge", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/challenges/{uuid}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "expireTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "used": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "nonce": { + "type": "bytes", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "CreateChallengeRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "challenge": { + "type": "Challenge", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "VerifyAttestationRequest": { + "fields": { + "challenge": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "confidentialcomputing.googleapis.com/Challenge" + } + }, + "gcpCredentials": { + "type": "GcpCredentials", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "tpmAttestation": { + "type": "TpmAttestation", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "VerifyAttestationResponse": { + "fields": { + "claimsToken": { + "type": "bytes", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "GcpCredentials": { + "fields": { + "idTokens": { + "rule": "repeated", + "type": "bytes", + "id": 1 + } + } + }, + "TpmAttestation": { + "fields": { + "quotes": { + "rule": "repeated", + "type": "Quote", + "id": 1 + }, + "tcgEventLog": { + "type": "bytes", + "id": 2 + }, + "canonicalEventLog": { + "type": "bytes", + "id": 3 + }, + "akCert": { + "type": "bytes", + "id": 4 + }, + "certChain": { + "rule": "repeated", + "type": "bytes", + "id": 5 + } + }, + "nested": { + "Quote": { + "fields": { + "hashAlgo": { + "type": "int32", + "id": 1 + }, + "pcrValues": { + "keyType": "int32", + "type": "bytes", + "id": 2 + }, + "rawQuote": { + "type": "bytes", + "id": 3 + }, + "rawSignature": { + "type": "bytes", + "id": 4 + } + } + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ResourceProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + }, + "edition": { + "type": "string", + "id": 13 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REQUIRED": 2, + "LABEL_REPEATED": 3 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "phpGenericServices": { + "type": "bool", + "id": 42, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + } + } + }, + "OneofOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/google-cloud-confidentialcomputing/samples/README.md b/packages/google-cloud-confidentialcomputing/samples/README.md new file mode 100644 index 00000000000..39ad449131a --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/samples/README.md @@ -0,0 +1,140 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [Confidential Computing API: Node.js Samples](https://github.com/googleapis/google-cloud-node) + +[![Open in Cloud Shell][shell_img]][shell_link] + + + +## Table of Contents + +* [Before you begin](#before-you-begin) +* [Samples](#samples) + * [Confidential_computing.create_challenge](#confidential_computing.create_challenge) + * [Confidential_computing.verify_attestation](#confidential_computing.verify_attestation) + * [Confidential_computing.create_challenge](#confidential_computing.create_challenge) + * [Confidential_computing.verify_attestation](#confidential_computing.verify_attestation) + * [Quickstart](#quickstart) + * [Quickstart](#quickstart) + +## Before you begin + +Before running the samples, make sure you've followed the steps outlined in +[Using the client library](https://github.com/googleapis/google-cloud-node#using-the-client-library). + +`cd samples` + +`npm install` + +`cd ..` + +## Samples + + + +### Confidential_computing.create_challenge + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-confidentialcomputing/samples/generated/v1/confidential_computing.create_challenge.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-confidentialcomputing/samples/generated/v1/confidential_computing.create_challenge.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-confidentialcomputing/samples/generated/v1/confidential_computing.create_challenge.js` + + +----- + + + + +### Confidential_computing.verify_attestation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-confidentialcomputing/samples/generated/v1/confidential_computing.verify_attestation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-confidentialcomputing/samples/generated/v1/confidential_computing.verify_attestation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-confidentialcomputing/samples/generated/v1/confidential_computing.verify_attestation.js` + + +----- + + + + +### Confidential_computing.create_challenge + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/confidential_computing.create_challenge.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/confidential_computing.create_challenge.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/confidential_computing.create_challenge.js` + + +----- + + + + +### Confidential_computing.verify_attestation + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/confidential_computing.verify_attestation.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/confidential_computing.verify_attestation.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/confidential_computing.verify_attestation.js` + + +----- + + + + +### Quickstart + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-confidentialcomputing/samples/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-confidentialcomputing/samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-confidentialcomputing/samples/quickstart.js` + + +----- + + + + +### Quickstart + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-confidentialcomputing/samples/test/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-confidentialcomputing/samples/test/quickstart.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-confidentialcomputing/samples/test/quickstart.js` + + + + + + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=samples/README.md +[product-docs]: https://cloud.google.com/confidential-computing diff --git a/packages/google-cloud-confidentialcomputing/samples/generated/v1/confidential_computing.create_challenge.js b/packages/google-cloud-confidentialcomputing/samples/generated/v1/confidential_computing.create_challenge.js new file mode 100644 index 00000000000..718f62cf0e0 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/samples/generated/v1/confidential_computing.create_challenge.js @@ -0,0 +1,68 @@ +// Copyright 2023 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, challenge) { + // [START confidentialcomputing_v1_generated_ConfidentialComputing_CreateChallenge_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 location where the Challenge will be + * used, in the format `projects/* /locations/*`. + */ + // const parent = 'abc123' + /** + * Required. The Challenge to be created. Currently this field can be empty as + * all the Challenge fields are set by the server. + */ + // const challenge = {} + + // Imports the Confidentialcomputing library + const {ConfidentialComputingClient} = require('@google-cloud/confidentialcomputing').v1; + + // Instantiates a client + const confidentialcomputingClient = new ConfidentialComputingClient(); + + async function callCreateChallenge() { + // Construct request + const request = { + parent, + challenge, + }; + + // Run request + const response = await confidentialcomputingClient.createChallenge(request); + console.log(response); + } + + callCreateChallenge(); + // [END confidentialcomputing_v1_generated_ConfidentialComputing_CreateChallenge_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-confidentialcomputing/samples/generated/v1/confidential_computing.verify_attestation.js b/packages/google-cloud-confidentialcomputing/samples/generated/v1/confidential_computing.verify_attestation.js new file mode 100644 index 00000000000..47a9a442e96 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/samples/generated/v1/confidential_computing.verify_attestation.js @@ -0,0 +1,74 @@ +// Copyright 2023 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(challenge, tpmAttestation) { + // [START confidentialcomputing_v1_generated_ConfidentialComputing_VerifyAttestation_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 Challenge whose nonce was used to generate the + * attestation, in the format `projects/* /locations/* /challenges/*`. The + * provided Challenge will be consumed, and cannot be used again. + */ + // const challenge = 'abc123' + /** + * Optional. Credentials used to populate the "emails" claim in the + * claims_token. + */ + // const gcpCredentials = {} + /** + * Required. The TPM-specific data provided by the attesting platform, used to + * populate any of the claims regarding platform state. + */ + // const tpmAttestation = {} + + // Imports the Confidentialcomputing library + const {ConfidentialComputingClient} = require('@google-cloud/confidentialcomputing').v1; + + // Instantiates a client + const confidentialcomputingClient = new ConfidentialComputingClient(); + + async function callVerifyAttestation() { + // Construct request + const request = { + challenge, + tpmAttestation, + }; + + // Run request + const response = await confidentialcomputingClient.verifyAttestation(request); + console.log(response); + } + + callVerifyAttestation(); + // [END confidentialcomputing_v1_generated_ConfidentialComputing_VerifyAttestation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-confidentialcomputing/samples/generated/v1/snippet_metadata.google.cloud.confidentialcomputing.v1.json b/packages/google-cloud-confidentialcomputing/samples/generated/v1/snippet_metadata.google.cloud.confidentialcomputing.v1.json new file mode 100644 index 00000000000..3aa205af721 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/samples/generated/v1/snippet_metadata.google.cloud.confidentialcomputing.v1.json @@ -0,0 +1,107 @@ +{ + "clientLibrary": { + "name": "nodejs-confidentialcomputing", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.confidentialcomputing.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "confidentialcomputing_v1_generated_ConfidentialComputing_CreateChallenge_async", + "title": "ConfidentialComputing createChallenge Sample", + "origin": "API_DEFINITION", + "description": " Creates a new Challenge in a given project and location.", + "canonical": true, + "file": "confidential_computing.create_challenge.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateChallenge", + "fullName": "google.cloud.confidentialcomputing.v1.ConfidentialComputing.CreateChallenge", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "challenge", + "type": ".google.cloud.confidentialcomputing.v1.Challenge" + } + ], + "resultType": ".google.cloud.confidentialcomputing.v1.Challenge", + "client": { + "shortName": "ConfidentialComputingClient", + "fullName": "google.cloud.confidentialcomputing.v1.ConfidentialComputingClient" + }, + "method": { + "shortName": "CreateChallenge", + "fullName": "google.cloud.confidentialcomputing.v1.ConfidentialComputing.CreateChallenge", + "service": { + "shortName": "ConfidentialComputing", + "fullName": "google.cloud.confidentialcomputing.v1.ConfidentialComputing" + } + } + } + }, + { + "regionTag": "confidentialcomputing_v1_generated_ConfidentialComputing_VerifyAttestation_async", + "title": "ConfidentialComputing verifyAttestation Sample", + "origin": "API_DEFINITION", + "description": " Verifies the provided attestation info, returning a signed OIDC token.", + "canonical": true, + "file": "confidential_computing.verify_attestation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "VerifyAttestation", + "fullName": "google.cloud.confidentialcomputing.v1.ConfidentialComputing.VerifyAttestation", + "async": true, + "parameters": [ + { + "name": "challenge", + "type": "TYPE_STRING" + }, + { + "name": "gcp_credentials", + "type": ".google.cloud.confidentialcomputing.v1.GcpCredentials" + }, + { + "name": "tpm_attestation", + "type": ".google.cloud.confidentialcomputing.v1.TpmAttestation" + } + ], + "resultType": ".google.cloud.confidentialcomputing.v1.VerifyAttestationResponse", + "client": { + "shortName": "ConfidentialComputingClient", + "fullName": "google.cloud.confidentialcomputing.v1.ConfidentialComputingClient" + }, + "method": { + "shortName": "VerifyAttestation", + "fullName": "google.cloud.confidentialcomputing.v1.ConfidentialComputing.VerifyAttestation", + "service": { + "shortName": "ConfidentialComputing", + "fullName": "google.cloud.confidentialcomputing.v1.ConfidentialComputing" + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/confidential_computing.create_challenge.js b/packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/confidential_computing.create_challenge.js new file mode 100644 index 00000000000..3eafd1512ab --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/confidential_computing.create_challenge.js @@ -0,0 +1,68 @@ +// Copyright 2023 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, challenge) { + // [START confidentialcomputing_v1alpha1_generated_ConfidentialComputing_CreateChallenge_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 location where the Challenge will be + * used, in the format `projects/* /locations/*`. + */ + // const parent = 'abc123' + /** + * Required. The Challenge to be created. Currently this field can be empty as + * all the Challenge fields are set by the server. + */ + // const challenge = {} + + // Imports the Confidentialcomputing library + const {ConfidentialComputingClient} = require('@google-cloud/confidentialcomputing').v1alpha1; + + // Instantiates a client + const confidentialcomputingClient = new ConfidentialComputingClient(); + + async function callCreateChallenge() { + // Construct request + const request = { + parent, + challenge, + }; + + // Run request + const response = await confidentialcomputingClient.createChallenge(request); + console.log(response); + } + + callCreateChallenge(); + // [END confidentialcomputing_v1alpha1_generated_ConfidentialComputing_CreateChallenge_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/confidential_computing.verify_attestation.js b/packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/confidential_computing.verify_attestation.js new file mode 100644 index 00000000000..b7d605bdb4e --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/confidential_computing.verify_attestation.js @@ -0,0 +1,74 @@ +// Copyright 2023 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(challenge, tpmAttestation) { + // [START confidentialcomputing_v1alpha1_generated_ConfidentialComputing_VerifyAttestation_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 Challenge whose nonce was used to generate the + * attestation, in the format `projects/* /locations/* /challenges/*`. The + * provided Challenge will be consumed, and cannot be used again. + */ + // const challenge = 'abc123' + /** + * Optional. Credentials used to populate the "emails" claim in the + * claims_token. + */ + // const gcpCredentials = {} + /** + * Required. The TPM-specific data provided by the attesting platform, used to + * populate any of the claims regarding platform state. + */ + // const tpmAttestation = {} + + // Imports the Confidentialcomputing library + const {ConfidentialComputingClient} = require('@google-cloud/confidentialcomputing').v1alpha1; + + // Instantiates a client + const confidentialcomputingClient = new ConfidentialComputingClient(); + + async function callVerifyAttestation() { + // Construct request + const request = { + challenge, + tpmAttestation, + }; + + // Run request + const response = await confidentialcomputingClient.verifyAttestation(request); + console.log(response); + } + + callVerifyAttestation(); + // [END confidentialcomputing_v1alpha1_generated_ConfidentialComputing_VerifyAttestation_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/snippet_metadata.google.cloud.confidentialcomputing.v1alpha1.json b/packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/snippet_metadata.google.cloud.confidentialcomputing.v1alpha1.json new file mode 100644 index 00000000000..0f701c5d076 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/samples/generated/v1alpha1/snippet_metadata.google.cloud.confidentialcomputing.v1alpha1.json @@ -0,0 +1,107 @@ +{ + "clientLibrary": { + "name": "nodejs-confidentialcomputing", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.confidentialcomputing.v1alpha1", + "version": "v1alpha1" + } + ] + }, + "snippets": [ + { + "regionTag": "confidentialcomputing_v1alpha1_generated_ConfidentialComputing_CreateChallenge_async", + "title": "ConfidentialComputing createChallenge Sample", + "origin": "API_DEFINITION", + "description": " Creates a new Challenge in a given project and location.", + "canonical": true, + "file": "confidential_computing.create_challenge.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateChallenge", + "fullName": "google.cloud.confidentialcomputing.v1alpha1.ConfidentialComputing.CreateChallenge", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "challenge", + "type": ".google.cloud.confidentialcomputing.v1alpha1.Challenge" + } + ], + "resultType": ".google.cloud.confidentialcomputing.v1alpha1.Challenge", + "client": { + "shortName": "ConfidentialComputingClient", + "fullName": "google.cloud.confidentialcomputing.v1alpha1.ConfidentialComputingClient" + }, + "method": { + "shortName": "CreateChallenge", + "fullName": "google.cloud.confidentialcomputing.v1alpha1.ConfidentialComputing.CreateChallenge", + "service": { + "shortName": "ConfidentialComputing", + "fullName": "google.cloud.confidentialcomputing.v1alpha1.ConfidentialComputing" + } + } + } + }, + { + "regionTag": "confidentialcomputing_v1alpha1_generated_ConfidentialComputing_VerifyAttestation_async", + "title": "ConfidentialComputing verifyAttestation Sample", + "origin": "API_DEFINITION", + "description": " Verifies the provided attestation info, returning a signed OIDC token.", + "canonical": true, + "file": "confidential_computing.verify_attestation.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "VerifyAttestation", + "fullName": "google.cloud.confidentialcomputing.v1alpha1.ConfidentialComputing.VerifyAttestation", + "async": true, + "parameters": [ + { + "name": "challenge", + "type": "TYPE_STRING" + }, + { + "name": "gcp_credentials", + "type": ".google.cloud.confidentialcomputing.v1alpha1.GcpCredentials" + }, + { + "name": "tpm_attestation", + "type": ".google.cloud.confidentialcomputing.v1alpha1.TpmAttestation" + } + ], + "resultType": ".google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationResponse", + "client": { + "shortName": "ConfidentialComputingClient", + "fullName": "google.cloud.confidentialcomputing.v1alpha1.ConfidentialComputingClient" + }, + "method": { + "shortName": "VerifyAttestation", + "fullName": "google.cloud.confidentialcomputing.v1alpha1.ConfidentialComputing.VerifyAttestation", + "service": { + "shortName": "ConfidentialComputing", + "fullName": "google.cloud.confidentialcomputing.v1alpha1.ConfidentialComputing" + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/google-cloud-confidentialcomputing/samples/package.json b/packages/google-cloud-confidentialcomputing/samples/package.json new file mode 100644 index 00000000000..bb77a7c50ca --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/samples/package.json @@ -0,0 +1,24 @@ +{ + "name": "confidentialcomputing-samples", + "private": true, + "license": "Apache-2.0", + "author": "Google LLC", + "engines": { + "node": ">=12.0.0" + }, + "files": [ + "*.js" + ], + "scripts": { + "test": "c8 mocha --timeout 600000 test/*.js", + "publish": "echo 'sample test; do not publish'" + }, + "dependencies": { + "@google-cloud/confidentialcomputing": "^0.1.0" + }, + "devDependencies": { + "c8": "^7.1.0", + "chai": "^4.2.0", + "mocha": "^8.0.0" + } +} diff --git a/packages/google-cloud-confidentialcomputing/samples/quickstart.js b/packages/google-cloud-confidentialcomputing/samples/quickstart.js new file mode 100644 index 00000000000..b84fc47d154 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/samples/quickstart.js @@ -0,0 +1,67 @@ +// Copyright 2023 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, challenge) { + // [START confidentialcomputing_quickstart] + /** + * 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 location where the Challenge will be + * used, in the format `projects/* /locations/*`. + */ + // const parent = 'abc123' + /** + * Required. The Challenge to be created. Currently this field can be empty as + * all the Challenge fields are set by the server. + */ + // const challenge = {} + + // Imports the Confidentialcomputing library + const {ConfidentialComputingClient} = + require('@google-cloud/confidentialcomputing').v1; + + // Instantiates a client + const confidentialcomputingClient = new ConfidentialComputingClient(); + + async function callCreateChallenge() { + // Construct request + const request = { + parent, + challenge, + }; + + // Run request + const response = await confidentialcomputingClient.createChallenge(request); + console.log(response); + } + + callCreateChallenge(); + // [END confidentialcomputing_quickstart] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-confidentialcomputing/samples/test/quickstart.js b/packages/google-cloud-confidentialcomputing/samples/test/quickstart.js new file mode 100644 index 00000000000..d5dc55b1648 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/samples/test/quickstart.js @@ -0,0 +1,43 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +const assert = require('assert'); +const path = require('path'); +const cp = require('child_process'); +const {describe, it, before} = require('mocha'); +const {ConfidentialComputingClient} = + require('@google-cloud/confidentialcomputing').v1alpha1; +const confidentialcomputingClient = new ConfidentialComputingClient(); + +const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); + +const cwd = path.join(__dirname, '..'); + +describe('Quickstart', () => { + let projectId; + + before(async () => { + projectId = await confidentialcomputingClient.getProjectId(); + }); + + it('should run quickstart', async () => { + const output = execSync( + `node ./quickstart.js projects/${projectId}/locations/us-central1`, + {cwd} + ); + assert(output !== null); + }); +}); diff --git a/packages/google-cloud-confidentialcomputing/src/index.ts b/packages/google-cloud-confidentialcomputing/src/index.ts new file mode 100644 index 00000000000..7f716cf5de3 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/src/index.ts @@ -0,0 +1,28 @@ +// Copyright 2023 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 synthtool. ** +// ** https://github.com/googleapis/synthtool ** +// ** All changes to this file may be overwritten. ** + +import * as v1 from './v1'; +import * as v1alpha1 from './v1alpha1'; + +const ConfidentialComputingClient = v1alpha1.ConfidentialComputingClient; +type ConfidentialComputingClient = v1alpha1.ConfidentialComputingClient; + +export {v1, v1alpha1, ConfidentialComputingClient}; +export default {v1, v1alpha1, ConfidentialComputingClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/packages/google-cloud-confidentialcomputing/src/v1/confidential_computing_client.ts b/packages/google-cloud-confidentialcomputing/src/v1/confidential_computing_client.ts new file mode 100644 index 00000000000..3175afead31 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/src/v1/confidential_computing_client.ts @@ -0,0 +1,725 @@ +// Copyright 2023 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, + LocationsClient, + LocationProtos, +} from 'google-gax'; + +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1/confidential_computing_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './confidential_computing_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service describing handlers for resources + * @class + * @memberof v1 + */ +export class ConfidentialComputingClient { + 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}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + confidentialComputingStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ConfidentialComputingClient. + * + * @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://developers.google.com/identity/protocols/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 | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * 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 ConfidentialComputingClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this + .constructor as typeof ConfidentialComputingClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.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 !== staticMembers.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 = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && '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 if (opts.fallback === 'rest') { + 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 = { + challengePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/challenges/{uuid}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.confidentialcomputing.v1.ConfidentialComputing', + 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.confidentialComputingStub) { + return this.confidentialComputingStub; + } + + // Put together the "service stub" for + // google.cloud.confidentialcomputing.v1.ConfidentialComputing. + this.confidentialComputingStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.confidentialcomputing.v1.ConfidentialComputing' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.confidentialcomputing.v1 + .ConfidentialComputing, + 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 confidentialComputingStubMethods = [ + 'createChallenge', + 'verifyAttestation', + ]; + for (const methodName of confidentialComputingStubMethods) { + const callPromise = this.confidentialComputingStub.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 = undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.confidentialComputingStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'confidentialcomputing.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'confidentialcomputing.googleapis.com'; + } + + /** + * 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/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 -- + // ------------------- + /** + * Creates a new Challenge in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the location where the Challenge will be + * used, in the format `projects/* /locations/*`. + * @param {google.cloud.confidentialcomputing.v1.Challenge} request.challenge + * Required. The Challenge to be created. Currently this field can be empty as + * all the Challenge fields are set by the server. + * @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 google.cloud.confidentialcomputing.v1.Challenge | Challenge}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/confidential_computing.create_challenge.js + * region_tag:confidentialcomputing_v1_generated_ConfidentialComputing_CreateChallenge_async + */ + createChallenge( + request?: protos.google.cloud.confidentialcomputing.v1.ICreateChallengeRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.confidentialcomputing.v1.IChallenge, + ( + | protos.google.cloud.confidentialcomputing.v1.ICreateChallengeRequest + | undefined + ), + {} | undefined + ] + >; + createChallenge( + request: protos.google.cloud.confidentialcomputing.v1.ICreateChallengeRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.confidentialcomputing.v1.IChallenge, + | protos.google.cloud.confidentialcomputing.v1.ICreateChallengeRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createChallenge( + request: protos.google.cloud.confidentialcomputing.v1.ICreateChallengeRequest, + callback: Callback< + protos.google.cloud.confidentialcomputing.v1.IChallenge, + | protos.google.cloud.confidentialcomputing.v1.ICreateChallengeRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createChallenge( + request?: protos.google.cloud.confidentialcomputing.v1.ICreateChallengeRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.confidentialcomputing.v1.IChallenge, + | protos.google.cloud.confidentialcomputing.v1.ICreateChallengeRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.confidentialcomputing.v1.IChallenge, + | protos.google.cloud.confidentialcomputing.v1.ICreateChallengeRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.confidentialcomputing.v1.IChallenge, + ( + | protos.google.cloud.confidentialcomputing.v1.ICreateChallengeRequest + | 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(); + return this.innerApiCalls.createChallenge(request, options, callback); + } + /** + * Verifies the provided attestation info, returning a signed OIDC token. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.challenge + * Required. The name of the Challenge whose nonce was used to generate the + * attestation, in the format `projects/* /locations/* /challenges/*`. The + * provided Challenge will be consumed, and cannot be used again. + * @param {google.cloud.confidentialcomputing.v1.GcpCredentials} [request.gcpCredentials] + * Optional. Credentials used to populate the "emails" claim in the + * claims_token. + * @param {google.cloud.confidentialcomputing.v1.TpmAttestation} request.tpmAttestation + * Required. The TPM-specific data provided by the attesting platform, used to + * populate any of the claims regarding platform state. + * @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 google.cloud.confidentialcomputing.v1.VerifyAttestationResponse | VerifyAttestationResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/confidential_computing.verify_attestation.js + * region_tag:confidentialcomputing_v1_generated_ConfidentialComputing_VerifyAttestation_async + */ + verifyAttestation( + request?: protos.google.cloud.confidentialcomputing.v1.IVerifyAttestationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.confidentialcomputing.v1.IVerifyAttestationResponse, + ( + | protos.google.cloud.confidentialcomputing.v1.IVerifyAttestationRequest + | undefined + ), + {} | undefined + ] + >; + verifyAttestation( + request: protos.google.cloud.confidentialcomputing.v1.IVerifyAttestationRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.confidentialcomputing.v1.IVerifyAttestationResponse, + | protos.google.cloud.confidentialcomputing.v1.IVerifyAttestationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + verifyAttestation( + request: protos.google.cloud.confidentialcomputing.v1.IVerifyAttestationRequest, + callback: Callback< + protos.google.cloud.confidentialcomputing.v1.IVerifyAttestationResponse, + | protos.google.cloud.confidentialcomputing.v1.IVerifyAttestationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + verifyAttestation( + request?: protos.google.cloud.confidentialcomputing.v1.IVerifyAttestationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.confidentialcomputing.v1.IVerifyAttestationResponse, + | protos.google.cloud.confidentialcomputing.v1.IVerifyAttestationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.confidentialcomputing.v1.IVerifyAttestationResponse, + | protos.google.cloud.confidentialcomputing.v1.IVerifyAttestationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.confidentialcomputing.v1.IVerifyAttestationResponse, + ( + | protos.google.cloud.confidentialcomputing.v1.IVerifyAttestationRequest + | 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({ + challenge: request.challenge ?? '', + }); + this.initialize(); + return this.innerApiCalls.verifyAttestation(request, options, callback); + } + + /** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @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 google.cloud.location.Location | Location}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + + /** + * Lists information about the supported locations for this service. 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.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list 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} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.Location | Location}. 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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified challenge resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} uuid + * @returns {string} Resource name string. + */ + challengePath(project: string, location: string, uuid: string) { + return this.pathTemplates.challengePathTemplate.render({ + project: project, + location: location, + uuid: uuid, + }); + } + + /** + * Parse the project from Challenge resource. + * + * @param {string} challengeName + * A fully-qualified path representing Challenge resource. + * @returns {string} A string representing the project. + */ + matchProjectFromChallengeName(challengeName: string) { + return this.pathTemplates.challengePathTemplate.match(challengeName) + .project; + } + + /** + * Parse the location from Challenge resource. + * + * @param {string} challengeName + * A fully-qualified path representing Challenge resource. + * @returns {string} A string representing the location. + */ + matchLocationFromChallengeName(challengeName: string) { + return this.pathTemplates.challengePathTemplate.match(challengeName) + .location; + } + + /** + * Parse the uuid from Challenge resource. + * + * @param {string} challengeName + * A fully-qualified path representing Challenge resource. + * @returns {string} A string representing the uuid. + */ + matchUuidFromChallengeName(challengeName: string) { + return this.pathTemplates.challengePathTemplate.match(challengeName).uuid; + } + + /** + * 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; + } + + /** + * 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.confidentialComputingStub && !this._terminated) { + return this.confidentialComputingStub.then(stub => { + this._terminated = true; + stub.close(); + this.locationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-confidentialcomputing/src/v1/confidential_computing_client_config.json b/packages/google-cloud-confidentialcomputing/src/v1/confidential_computing_client_config.json new file mode 100644 index 00000000000..cf97e8d69a2 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/src/v1/confidential_computing_client_config.json @@ -0,0 +1,48 @@ +{ + "interfaces": { + "google.cloud.confidentialcomputing.v1.ConfidentialComputing": { + "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": { + "CreateChallenge": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "VerifyAttestation": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + } + } + } + } +} diff --git a/packages/google-cloud-confidentialcomputing/src/v1/confidential_computing_proto_list.json b/packages/google-cloud-confidentialcomputing/src/v1/confidential_computing_proto_list.json new file mode 100644 index 00000000000..817ef76891d --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/src/v1/confidential_computing_proto_list.json @@ -0,0 +1,3 @@ +[ + "../../protos/google/cloud/confidentialcomputing/v1/service.proto" +] diff --git a/packages/google-cloud-confidentialcomputing/src/v1/gapic_metadata.json b/packages/google-cloud-confidentialcomputing/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..03c3f26180b --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/src/v1/gapic_metadata.json @@ -0,0 +1,43 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.confidentialcomputing.v1", + "libraryPackage": "@google-cloud/confidentialcomputing", + "services": { + "ConfidentialComputing": { + "clients": { + "grpc": { + "libraryClient": "ConfidentialComputingClient", + "rpcs": { + "CreateChallenge": { + "methods": [ + "createChallenge" + ] + }, + "VerifyAttestation": { + "methods": [ + "verifyAttestation" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ConfidentialComputingClient", + "rpcs": { + "CreateChallenge": { + "methods": [ + "createChallenge" + ] + }, + "VerifyAttestation": { + "methods": [ + "verifyAttestation" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-confidentialcomputing/src/v1/index.ts b/packages/google-cloud-confidentialcomputing/src/v1/index.ts new file mode 100644 index 00000000000..34654effd9a --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/src/v1/index.ts @@ -0,0 +1,19 @@ +// Copyright 2023 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. ** + +export {ConfidentialComputingClient} from './confidential_computing_client'; diff --git a/packages/google-cloud-confidentialcomputing/src/v1alpha1/confidential_computing_client.ts b/packages/google-cloud-confidentialcomputing/src/v1alpha1/confidential_computing_client.ts new file mode 100644 index 00000000000..8135ec2f9f9 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/src/v1alpha1/confidential_computing_client.ts @@ -0,0 +1,725 @@ +// Copyright 2023 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, + LocationsClient, + LocationProtos, +} from 'google-gax'; + +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1alpha1/confidential_computing_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './confidential_computing_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service describing handlers for resources + * @class + * @memberof v1alpha1 + */ +export class ConfidentialComputingClient { + 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}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + confidentialComputingStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ConfidentialComputingClient. + * + * @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://developers.google.com/identity/protocols/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 | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * 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 ConfidentialComputingClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this + .constructor as typeof ConfidentialComputingClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.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 !== staticMembers.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 = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && '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 if (opts.fallback === 'rest') { + 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 = { + challengePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/challenges/{uuid}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.confidentialcomputing.v1alpha1.ConfidentialComputing', + 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.confidentialComputingStub) { + return this.confidentialComputingStub; + } + + // Put together the "service stub" for + // google.cloud.confidentialcomputing.v1alpha1.ConfidentialComputing. + this.confidentialComputingStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.confidentialcomputing.v1alpha1.ConfidentialComputing' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.confidentialcomputing.v1alpha1 + .ConfidentialComputing, + 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 confidentialComputingStubMethods = [ + 'createChallenge', + 'verifyAttestation', + ]; + for (const methodName of confidentialComputingStubMethods) { + const callPromise = this.confidentialComputingStub.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 = undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.confidentialComputingStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'confidentialcomputing.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'confidentialcomputing.googleapis.com'; + } + + /** + * 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/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 -- + // ------------------- + /** + * Creates a new Challenge in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the location where the Challenge will be + * used, in the format `projects/* /locations/*`. + * @param {google.cloud.confidentialcomputing.v1alpha1.Challenge} request.challenge + * Required. The Challenge to be created. Currently this field can be empty as + * all the Challenge fields are set by the server. + * @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 google.cloud.confidentialcomputing.v1alpha1.Challenge | Challenge}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha1/confidential_computing.create_challenge.js + * region_tag:confidentialcomputing_v1alpha1_generated_ConfidentialComputing_CreateChallenge_async + */ + createChallenge( + request?: protos.google.cloud.confidentialcomputing.v1alpha1.ICreateChallengeRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.confidentialcomputing.v1alpha1.IChallenge, + ( + | protos.google.cloud.confidentialcomputing.v1alpha1.ICreateChallengeRequest + | undefined + ), + {} | undefined + ] + >; + createChallenge( + request: protos.google.cloud.confidentialcomputing.v1alpha1.ICreateChallengeRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.confidentialcomputing.v1alpha1.IChallenge, + | protos.google.cloud.confidentialcomputing.v1alpha1.ICreateChallengeRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createChallenge( + request: protos.google.cloud.confidentialcomputing.v1alpha1.ICreateChallengeRequest, + callback: Callback< + protos.google.cloud.confidentialcomputing.v1alpha1.IChallenge, + | protos.google.cloud.confidentialcomputing.v1alpha1.ICreateChallengeRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createChallenge( + request?: protos.google.cloud.confidentialcomputing.v1alpha1.ICreateChallengeRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.confidentialcomputing.v1alpha1.IChallenge, + | protos.google.cloud.confidentialcomputing.v1alpha1.ICreateChallengeRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.confidentialcomputing.v1alpha1.IChallenge, + | protos.google.cloud.confidentialcomputing.v1alpha1.ICreateChallengeRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.confidentialcomputing.v1alpha1.IChallenge, + ( + | protos.google.cloud.confidentialcomputing.v1alpha1.ICreateChallengeRequest + | 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(); + return this.innerApiCalls.createChallenge(request, options, callback); + } + /** + * Verifies the provided attestation info, returning a signed OIDC token. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.challenge + * Required. The name of the Challenge whose nonce was used to generate the + * attestation, in the format `projects/* /locations/* /challenges/*`. The + * provided Challenge will be consumed, and cannot be used again. + * @param {google.cloud.confidentialcomputing.v1alpha1.GcpCredentials} [request.gcpCredentials] + * Optional. Credentials used to populate the "emails" claim in the + * claims_token. + * @param {google.cloud.confidentialcomputing.v1alpha1.TpmAttestation} request.tpmAttestation + * Required. The TPM-specific data provided by the attesting platform, used to + * populate any of the claims regarding platform state. + * @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 google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationResponse | VerifyAttestationResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha1/confidential_computing.verify_attestation.js + * region_tag:confidentialcomputing_v1alpha1_generated_ConfidentialComputing_VerifyAttestation_async + */ + verifyAttestation( + request?: protos.google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationResponse, + ( + | protos.google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationRequest + | undefined + ), + {} | undefined + ] + >; + verifyAttestation( + request: protos.google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationResponse, + | protos.google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + verifyAttestation( + request: protos.google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationRequest, + callback: Callback< + protos.google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationResponse, + | protos.google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + verifyAttestation( + request?: protos.google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationResponse, + | protos.google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationResponse, + | protos.google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationResponse, + ( + | protos.google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationRequest + | 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({ + challenge: request.challenge ?? '', + }); + this.initialize(); + return this.innerApiCalls.verifyAttestation(request, options, callback); + } + + /** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @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 google.cloud.location.Location | Location}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + + /** + * Lists information about the supported locations for this service. 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.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list 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} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.Location | Location}. 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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified challenge resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} uuid + * @returns {string} Resource name string. + */ + challengePath(project: string, location: string, uuid: string) { + return this.pathTemplates.challengePathTemplate.render({ + project: project, + location: location, + uuid: uuid, + }); + } + + /** + * Parse the project from Challenge resource. + * + * @param {string} challengeName + * A fully-qualified path representing Challenge resource. + * @returns {string} A string representing the project. + */ + matchProjectFromChallengeName(challengeName: string) { + return this.pathTemplates.challengePathTemplate.match(challengeName) + .project; + } + + /** + * Parse the location from Challenge resource. + * + * @param {string} challengeName + * A fully-qualified path representing Challenge resource. + * @returns {string} A string representing the location. + */ + matchLocationFromChallengeName(challengeName: string) { + return this.pathTemplates.challengePathTemplate.match(challengeName) + .location; + } + + /** + * Parse the uuid from Challenge resource. + * + * @param {string} challengeName + * A fully-qualified path representing Challenge resource. + * @returns {string} A string representing the uuid. + */ + matchUuidFromChallengeName(challengeName: string) { + return this.pathTemplates.challengePathTemplate.match(challengeName).uuid; + } + + /** + * 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; + } + + /** + * 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.confidentialComputingStub && !this._terminated) { + return this.confidentialComputingStub.then(stub => { + this._terminated = true; + stub.close(); + this.locationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-confidentialcomputing/src/v1alpha1/confidential_computing_client_config.json b/packages/google-cloud-confidentialcomputing/src/v1alpha1/confidential_computing_client_config.json new file mode 100644 index 00000000000..e638222a37d --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/src/v1alpha1/confidential_computing_client_config.json @@ -0,0 +1,48 @@ +{ + "interfaces": { + "google.cloud.confidentialcomputing.v1alpha1.ConfidentialComputing": { + "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": { + "CreateChallenge": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "VerifyAttestation": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + } + } + } + } +} diff --git a/packages/google-cloud-confidentialcomputing/src/v1alpha1/confidential_computing_proto_list.json b/packages/google-cloud-confidentialcomputing/src/v1alpha1/confidential_computing_proto_list.json new file mode 100644 index 00000000000..550b9fc4db1 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/src/v1alpha1/confidential_computing_proto_list.json @@ -0,0 +1,3 @@ +[ + "../../protos/google/cloud/confidentialcomputing/v1alpha1/service.proto" +] diff --git a/packages/google-cloud-confidentialcomputing/src/v1alpha1/gapic_metadata.json b/packages/google-cloud-confidentialcomputing/src/v1alpha1/gapic_metadata.json new file mode 100644 index 00000000000..efbe4cdef07 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/src/v1alpha1/gapic_metadata.json @@ -0,0 +1,43 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.confidentialcomputing.v1alpha1", + "libraryPackage": "@google-cloud/confidentialcomputing", + "services": { + "ConfidentialComputing": { + "clients": { + "grpc": { + "libraryClient": "ConfidentialComputingClient", + "rpcs": { + "CreateChallenge": { + "methods": [ + "createChallenge" + ] + }, + "VerifyAttestation": { + "methods": [ + "verifyAttestation" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ConfidentialComputingClient", + "rpcs": { + "CreateChallenge": { + "methods": [ + "createChallenge" + ] + }, + "VerifyAttestation": { + "methods": [ + "verifyAttestation" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-confidentialcomputing/src/v1alpha1/index.ts b/packages/google-cloud-confidentialcomputing/src/v1alpha1/index.ts new file mode 100644 index 00000000000..34654effd9a --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/src/v1alpha1/index.ts @@ -0,0 +1,19 @@ +// Copyright 2023 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. ** + +export {ConfidentialComputingClient} from './confidential_computing_client'; diff --git a/packages/google-cloud-confidentialcomputing/system-test/fixtures/sample/src/index.js b/packages/google-cloud-confidentialcomputing/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..3a0fc7abdd8 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/system-test/fixtures/sample/src/index.js @@ -0,0 +1,27 @@ +// Copyright 2023 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. ** + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const confidentialcomputing = require('@google-cloud/confidentialcomputing'); + +function main() { + const confidentialComputingClient = + new confidentialcomputing.ConfidentialComputingClient(); +} + +main(); diff --git a/packages/google-cloud-confidentialcomputing/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-confidentialcomputing/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..73a686423d5 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,34 @@ +// Copyright 2023 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 {ConfidentialComputingClient} from '@google-cloud/confidentialcomputing'; + +// check that the client class type name can be used +function doStuffWithConfidentialComputingClient( + client: ConfidentialComputingClient +) { + client.close(); +} + +function main() { + // check that the client instance can be created + const confidentialComputingClient = new ConfidentialComputingClient(); + doStuffWithConfidentialComputingClient(confidentialComputingClient); +} + +main(); diff --git a/packages/google-cloud-confidentialcomputing/system-test/install.ts b/packages/google-cloud-confidentialcomputing/system-test/install.ts new file mode 100644 index 00000000000..f61fe236476 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/system-test/install.ts @@ -0,0 +1,51 @@ +// Copyright 2023 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 {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + it('TypeScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync( + './system-test/fixtures/sample/src/index.ts' + ).toString(), + }, + }; + await packNTest(options); + }); + + it('JavaScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync( + './system-test/fixtures/sample/src/index.js' + ).toString(), + }, + }; + await packNTest(options); + }); +}); diff --git a/packages/google-cloud-confidentialcomputing/test/gapic_confidential_computing_v1.ts b/packages/google-cloud-confidentialcomputing/test/gapic_confidential_computing_v1.ts new file mode 100644 index 00000000000..9ca258b2e66 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/test/gapic_confidential_computing_v1.ts @@ -0,0 +1,785 @@ +// Copyright 2023 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 confidentialcomputingModule from '../src'; + +import {protobuf, LocationProtos} 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 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.ConfidentialComputingClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + confidentialcomputingModule.v1.ConfidentialComputingClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + confidentialcomputingModule.v1.ConfidentialComputingClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = + confidentialcomputingModule.v1.ConfidentialComputingClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = + new confidentialcomputingModule.v1.ConfidentialComputingClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = + new confidentialcomputingModule.v1.ConfidentialComputingClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = + new confidentialcomputingModule.v1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.confidentialComputingStub, undefined); + await client.initialize(); + assert(client.confidentialComputingStub); + }); + + it('has close method for the initialized client', done => { + const client = + new confidentialcomputingModule.v1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.confidentialComputingStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = + new confidentialcomputingModule.v1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.confidentialComputingStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new confidentialcomputingModule.v1.ConfidentialComputingClient({ + 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 confidentialcomputingModule.v1.ConfidentialComputingClient({ + 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('createChallenge', () => { + it('invokes createChallenge without error', async () => { + const client = + new confidentialcomputingModule.v1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.confidentialcomputing.v1.CreateChallengeRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.confidentialcomputing.v1.CreateChallengeRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.confidentialcomputing.v1.Challenge() + ); + client.innerApiCalls.createChallenge = stubSimpleCall(expectedResponse); + const [response] = await client.createChallenge(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createChallenge as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createChallenge as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createChallenge without error using callback', async () => { + const client = + new confidentialcomputingModule.v1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.confidentialcomputing.v1.CreateChallengeRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.confidentialcomputing.v1.CreateChallengeRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.confidentialcomputing.v1.Challenge() + ); + client.innerApiCalls.createChallenge = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createChallenge( + request, + ( + err?: Error | null, + result?: protos.google.cloud.confidentialcomputing.v1.IChallenge | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createChallenge as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createChallenge as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createChallenge with error', async () => { + const client = + new confidentialcomputingModule.v1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.confidentialcomputing.v1.CreateChallengeRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.confidentialcomputing.v1.CreateChallengeRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createChallenge = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createChallenge(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createChallenge as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createChallenge as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createChallenge with closed client', async () => { + const client = + new confidentialcomputingModule.v1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.confidentialcomputing.v1.CreateChallengeRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.confidentialcomputing.v1.CreateChallengeRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createChallenge(request), expectedError); + }); + }); + + describe('verifyAttestation', () => { + it('invokes verifyAttestation without error', async () => { + const client = + new confidentialcomputingModule.v1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.confidentialcomputing.v1.VerifyAttestationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.confidentialcomputing.v1.VerifyAttestationRequest', + ['challenge'] + ); + request.challenge = defaultValue1; + const expectedHeaderRequestParams = `challenge=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.confidentialcomputing.v1.VerifyAttestationResponse() + ); + client.innerApiCalls.verifyAttestation = stubSimpleCall(expectedResponse); + const [response] = await client.verifyAttestation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.verifyAttestation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.verifyAttestation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes verifyAttestation without error using callback', async () => { + const client = + new confidentialcomputingModule.v1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.confidentialcomputing.v1.VerifyAttestationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.confidentialcomputing.v1.VerifyAttestationRequest', + ['challenge'] + ); + request.challenge = defaultValue1; + const expectedHeaderRequestParams = `challenge=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.confidentialcomputing.v1.VerifyAttestationResponse() + ); + client.innerApiCalls.verifyAttestation = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.verifyAttestation( + request, + ( + err?: Error | null, + result?: protos.google.cloud.confidentialcomputing.v1.IVerifyAttestationResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.verifyAttestation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.verifyAttestation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes verifyAttestation with error', async () => { + const client = + new confidentialcomputingModule.v1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.confidentialcomputing.v1.VerifyAttestationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.confidentialcomputing.v1.VerifyAttestationRequest', + ['challenge'] + ); + request.challenge = defaultValue1; + const expectedHeaderRequestParams = `challenge=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.verifyAttestation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.verifyAttestation(request), expectedError); + const actualRequest = ( + client.innerApiCalls.verifyAttestation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.verifyAttestation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes verifyAttestation with closed client', async () => { + const client = + new confidentialcomputingModule.v1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.confidentialcomputing.v1.VerifyAttestationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.confidentialcomputing.v1.VerifyAttestationRequest', + ['challenge'] + ); + request.challenge = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.verifyAttestation(request), expectedError); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = + new confidentialcomputingModule.v1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getLocation without error using callback', async () => { + const client = + new confidentialcomputingModule.v1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub).getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = + new confidentialcomputingModule.v1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getLocation(request, expectedOptions), + expectedError + ); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = + new confidentialcomputingModule.v1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = + new confidentialcomputingModule.v1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + describe('challenge', () => { + const fakePath = '/rendered/path/challenge'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + uuid: 'uuidValue', + }; + const client = + new confidentialcomputingModule.v1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.challengePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.challengePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('challengePath', () => { + const result = client.challengePath( + 'projectValue', + 'locationValue', + 'uuidValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.challengePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromChallengeName', () => { + const result = client.matchProjectFromChallengeName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.challengePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromChallengeName', () => { + const result = client.matchLocationFromChallengeName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.challengePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchUuidFromChallengeName', () => { + const result = client.matchUuidFromChallengeName(fakePath); + assert.strictEqual(result, 'uuidValue'); + assert( + (client.pathTemplates.challengePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = + new confidentialcomputingModule.v1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-confidentialcomputing/test/gapic_confidential_computing_v1alpha1.ts b/packages/google-cloud-confidentialcomputing/test/gapic_confidential_computing_v1alpha1.ts new file mode 100644 index 00000000000..734e0fc9469 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/test/gapic_confidential_computing_v1alpha1.ts @@ -0,0 +1,787 @@ +// Copyright 2023 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 confidentialcomputingModule from '../src'; + +import {protobuf, LocationProtos} 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 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('v1alpha1.ConfidentialComputingClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + confidentialcomputingModule.v1alpha1.ConfidentialComputingClient + .servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + confidentialcomputingModule.v1alpha1.ConfidentialComputingClient + .apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = + confidentialcomputingModule.v1alpha1.ConfidentialComputingClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = + new confidentialcomputingModule.v1alpha1.ConfidentialComputingClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = + new confidentialcomputingModule.v1alpha1.ConfidentialComputingClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = + new confidentialcomputingModule.v1alpha1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.confidentialComputingStub, undefined); + await client.initialize(); + assert(client.confidentialComputingStub); + }); + + it('has close method for the initialized client', done => { + const client = + new confidentialcomputingModule.v1alpha1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.confidentialComputingStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = + new confidentialcomputingModule.v1alpha1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.confidentialComputingStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new confidentialcomputingModule.v1alpha1.ConfidentialComputingClient({ + 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 confidentialcomputingModule.v1alpha1.ConfidentialComputingClient({ + 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('createChallenge', () => { + it('invokes createChallenge without error', async () => { + const client = + new confidentialcomputingModule.v1alpha1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.confidentialcomputing.v1alpha1.Challenge() + ); + client.innerApiCalls.createChallenge = stubSimpleCall(expectedResponse); + const [response] = await client.createChallenge(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createChallenge as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createChallenge as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createChallenge without error using callback', async () => { + const client = + new confidentialcomputingModule.v1alpha1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.confidentialcomputing.v1alpha1.Challenge() + ); + client.innerApiCalls.createChallenge = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createChallenge( + request, + ( + err?: Error | null, + result?: protos.google.cloud.confidentialcomputing.v1alpha1.IChallenge | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createChallenge as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createChallenge as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createChallenge with error', async () => { + const client = + new confidentialcomputingModule.v1alpha1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createChallenge = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createChallenge(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createChallenge as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createChallenge as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createChallenge with closed client', async () => { + const client = + new confidentialcomputingModule.v1alpha1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.confidentialcomputing.v1alpha1.CreateChallengeRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createChallenge(request), expectedError); + }); + }); + + describe('verifyAttestation', () => { + it('invokes verifyAttestation without error', async () => { + const client = + new confidentialcomputingModule.v1alpha1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest', + ['challenge'] + ); + request.challenge = defaultValue1; + const expectedHeaderRequestParams = `challenge=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationResponse() + ); + client.innerApiCalls.verifyAttestation = stubSimpleCall(expectedResponse); + const [response] = await client.verifyAttestation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.verifyAttestation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.verifyAttestation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes verifyAttestation without error using callback', async () => { + const client = + new confidentialcomputingModule.v1alpha1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest', + ['challenge'] + ); + request.challenge = defaultValue1; + const expectedHeaderRequestParams = `challenge=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationResponse() + ); + client.innerApiCalls.verifyAttestation = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.verifyAttestation( + request, + ( + err?: Error | null, + result?: protos.google.cloud.confidentialcomputing.v1alpha1.IVerifyAttestationResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.verifyAttestation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.verifyAttestation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes verifyAttestation with error', async () => { + const client = + new confidentialcomputingModule.v1alpha1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest', + ['challenge'] + ); + request.challenge = defaultValue1; + const expectedHeaderRequestParams = `challenge=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.verifyAttestation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.verifyAttestation(request), expectedError); + const actualRequest = ( + client.innerApiCalls.verifyAttestation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.verifyAttestation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes verifyAttestation with closed client', async () => { + const client = + new confidentialcomputingModule.v1alpha1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.confidentialcomputing.v1alpha1.VerifyAttestationRequest', + ['challenge'] + ); + request.challenge = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.verifyAttestation(request), expectedError); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = + new confidentialcomputingModule.v1alpha1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getLocation without error using callback', async () => { + const client = + new confidentialcomputingModule.v1alpha1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub).getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = + new confidentialcomputingModule.v1alpha1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getLocation(request, expectedOptions), + expectedError + ); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = + new confidentialcomputingModule.v1alpha1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = + new confidentialcomputingModule.v1alpha1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + describe('challenge', () => { + const fakePath = '/rendered/path/challenge'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + uuid: 'uuidValue', + }; + const client = + new confidentialcomputingModule.v1alpha1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.challengePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.challengePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('challengePath', () => { + const result = client.challengePath( + 'projectValue', + 'locationValue', + 'uuidValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.challengePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromChallengeName', () => { + const result = client.matchProjectFromChallengeName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.challengePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromChallengeName', () => { + const result = client.matchLocationFromChallengeName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.challengePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchUuidFromChallengeName', () => { + const result = client.matchUuidFromChallengeName(fakePath); + assert.strictEqual(result, 'uuidValue'); + assert( + (client.pathTemplates.challengePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = + new confidentialcomputingModule.v1alpha1.ConfidentialComputingClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-confidentialcomputing/tsconfig.json b/packages/google-cloud-confidentialcomputing/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2018", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts" + ] +} diff --git a/packages/google-cloud-confidentialcomputing/webpack.config.js b/packages/google-cloud-confidentialcomputing/webpack.config.js new file mode 100644 index 00000000000..152ef490ef4 --- /dev/null +++ b/packages/google-cloud-confidentialcomputing/webpack.config.js @@ -0,0 +1,64 @@ +// Copyright 2021 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. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: 'ConfidentialComputing', + filename: './confidential-computing.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/, + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader', + }, + ], + }, + mode: 'production', +}; diff --git a/packages/google-cloud-contactcenterinsights/CHANGELOG.md b/packages/google-cloud-contactcenterinsights/CHANGELOG.md index b29f0cc9400..3fe2ec9fdfc 100644 --- a/packages/google-cloud-contactcenterinsights/CHANGELOG.md +++ b/packages/google-cloud-contactcenterinsights/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.7.0](https://github.com/googleapis/google-cloud-node/compare/contact-center-insights-v2.6.0...contact-center-insights-v2.7.0) (2023-05-02) + + +### Features + +* [contactcenterinsights] support for generating summaries during conversation analysis ([#4215](https://github.com/googleapis/google-cloud-node/issues/4215)) ([f12c277](https://github.com/googleapis/google-cloud-node/commit/f12c277d7f7566ead6128076c1c9ba81a856256a)) + ## [2.6.0](https://github.com/googleapis/google-cloud-node/compare/contact-center-insights-v2.5.0...contact-center-insights-v2.6.0) (2023-04-13) diff --git a/packages/google-cloud-contactcenterinsights/package.json b/packages/google-cloud-contactcenterinsights/package.json index 557f564a1a0..94eb732b9c0 100644 --- a/packages/google-cloud-contactcenterinsights/package.json +++ b/packages/google-cloud-contactcenterinsights/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/contact-center-insights", - "version": "2.6.0", + "version": "2.7.0", "description": "contactcenterinsights client for Node.js", "repository": { "type": "git", @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-contactcenterinsights" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/resources.proto b/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/resources.proto index 939b26a7e93..736333aceee 100644 --- a/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/resources.proto +++ b/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/resources.proto @@ -28,6 +28,10 @@ option java_outer_classname = "ResourcesProto"; option java_package = "com.google.cloud.contactcenterinsights.v1"; option php_namespace = "Google\\Cloud\\ContactCenterInsights\\V1"; option ruby_package = "Google::Cloud::ContactCenterInsights::V1"; +option (google.api.resource_definition) = { + type: "dialogflow.googleapis.com/ConversationProfile" + pattern: "projects/{project}/locations/{location}/conversationProfiles/{conversation_profile}" +}; option (google.api.resource_definition) = { type: "dialogflow.googleapis.com/Participant" pattern: "projects/{project}/conversations/{conversation}/participants/{participant}" @@ -197,6 +201,10 @@ message Conversation { // Output only. The conversation's latest analysis, if one exists. Analysis latest_analysis = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Latest summary of the conversation. + ConversationSummarizationSuggestionData latest_summary = 20 + [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The annotations that were generated during the customer and // agent interaction. repeated RuntimeAnnotation runtime_annotations = 13 @@ -819,7 +827,7 @@ message PhraseMatchRuleGroup { // Required. The type of this phrase match rule group. PhraseMatchRuleGroupType type = 1 [(google.api.field_behavior) = REQUIRED]; - // A list of phase match rules that are included in this group. + // A list of phrase match rules that are included in this group. repeated PhraseMatchRule phrase_match_rules = 2; } @@ -954,6 +962,10 @@ message RuntimeAnnotation { // Dialogflow interaction data. DialogflowInteractionData dialogflow_interaction = 10; + + // Conversation summarization suggestion data. + ConversationSummarizationSuggestionData + conversation_summarization_suggestion = 12; } // The unique identifier of the annotation. @@ -1110,6 +1122,34 @@ message DialogflowInteractionData { float confidence = 2; } +// Conversation summarization suggestion data. +message ConversationSummarizationSuggestionData { + // The summarization content that is concatenated into one string. + string text = 1; + + // The summarization content that is divided into sections. The key is the + // section's name and the value is the section's content. There is no + // specific format for the key or value. + map text_sections = 5; + + // The confidence score of the summarization. + float confidence = 2; + + // A map that contains metadata about the summarization and the document + // from which it originates. + map metadata = 3; + + // The name of the answer record. + // Format: + // projects/{project}/locations/{location}/answerRecords/{answer_record} + string answer_record = 4; + + // The name of the model that generates this summary. + // Format: + // projects/{project}/locations/{location}/conversationModels/{conversation_model} + string conversation_model = 6; +} + // The call participant speaking for a given utterance. message ConversationParticipant { // The role of the participant. @@ -1182,6 +1222,32 @@ message View { // Selector of all available annotators and phrase matchers to run. message AnnotatorSelector { + // Configuration for summarization. + message SummarizationConfig { + // Summarization model to use, if `conversation_profile` is not used. + enum SummarizationModel { + // Unspecified summarization model. + SUMMARIZATION_MODEL_UNSPECIFIED = 0; + + // The Insights baseline model. + BASELINE_MODEL = 1; + } + + // Summarization must use either a preexisting conversation profile or one + // of the supported default models. + oneof model_source { + // Resource name of the Dialogflow conversation profile. + // Format: + // projects/{project}/locations/{location}/conversationProfiles/{conversation_profile} + string conversation_profile = 1 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/ConversationProfile" + }]; + + // Default summarization model to be used. + SummarizationModel summarization_model = 2; + } + } + // Whether to run the interruption annotator. bool run_interruption_annotator = 1; @@ -1221,4 +1287,10 @@ message AnnotatorSelector { repeated string issue_models = 10 [(google.api.resource_reference) = { type: "contactcenterinsights.googleapis.com/IssueModel" }]; + + // Whether to run the summarization annotator. + bool run_summarization_annotator = 9; + + // Configuration for the summarization annotator. + SummarizationConfig summarization_config = 11; } diff --git a/packages/google-cloud-contactcenterinsights/protos/protos.d.ts b/packages/google-cloud-contactcenterinsights/protos/protos.d.ts index 5f76d99e38e..36f82cc0bde 100644 --- a/packages/google-cloud-contactcenterinsights/protos/protos.d.ts +++ b/packages/google-cloud-contactcenterinsights/protos/protos.d.ts @@ -7928,6 +7928,9 @@ export namespace google { /** Conversation latestAnalysis */ latestAnalysis?: (google.cloud.contactcenterinsights.v1.IAnalysis|null); + /** Conversation latestSummary */ + latestSummary?: (google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData|null); + /** Conversation runtimeAnnotations */ runtimeAnnotations?: (google.cloud.contactcenterinsights.v1.IRuntimeAnnotation[]|null); @@ -7995,6 +7998,9 @@ export namespace google { /** Conversation latestAnalysis. */ public latestAnalysis?: (google.cloud.contactcenterinsights.v1.IAnalysis|null); + /** Conversation latestSummary. */ + public latestSummary?: (google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData|null); + /** Conversation runtimeAnnotations. */ public runtimeAnnotations: google.cloud.contactcenterinsights.v1.IRuntimeAnnotation[]; @@ -12605,6 +12611,9 @@ export namespace google { /** RuntimeAnnotation dialogflowInteraction */ dialogflowInteraction?: (google.cloud.contactcenterinsights.v1.IDialogflowInteractionData|null); + /** RuntimeAnnotation conversationSummarizationSuggestion */ + conversationSummarizationSuggestion?: (google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData|null); + /** RuntimeAnnotation annotationId */ annotationId?: (string|null); @@ -12645,6 +12654,9 @@ export namespace google { /** RuntimeAnnotation dialogflowInteraction. */ public dialogflowInteraction?: (google.cloud.contactcenterinsights.v1.IDialogflowInteractionData|null); + /** RuntimeAnnotation conversationSummarizationSuggestion. */ + public conversationSummarizationSuggestion?: (google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData|null); + /** RuntimeAnnotation annotationId. */ public annotationId: string; @@ -12661,7 +12673,7 @@ export namespace google { public answerFeedback?: (google.cloud.contactcenterinsights.v1.IAnswerFeedback|null); /** RuntimeAnnotation data. */ - public data?: ("articleSuggestion"|"faqAnswer"|"smartReply"|"smartComposeSuggestion"|"dialogflowInteraction"); + public data?: ("articleSuggestion"|"faqAnswer"|"smartReply"|"smartComposeSuggestion"|"dialogflowInteraction"|"conversationSummarizationSuggestion"); /** * Creates a new RuntimeAnnotation instance using the specified properties. @@ -13448,6 +13460,133 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a ConversationSummarizationSuggestionData. */ + interface IConversationSummarizationSuggestionData { + + /** ConversationSummarizationSuggestionData text */ + text?: (string|null); + + /** ConversationSummarizationSuggestionData textSections */ + textSections?: ({ [k: string]: string }|null); + + /** ConversationSummarizationSuggestionData confidence */ + confidence?: (number|null); + + /** ConversationSummarizationSuggestionData metadata */ + metadata?: ({ [k: string]: string }|null); + + /** ConversationSummarizationSuggestionData answerRecord */ + answerRecord?: (string|null); + + /** ConversationSummarizationSuggestionData conversationModel */ + conversationModel?: (string|null); + } + + /** Represents a ConversationSummarizationSuggestionData. */ + class ConversationSummarizationSuggestionData implements IConversationSummarizationSuggestionData { + + /** + * Constructs a new ConversationSummarizationSuggestionData. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData); + + /** ConversationSummarizationSuggestionData text. */ + public text: string; + + /** ConversationSummarizationSuggestionData textSections. */ + public textSections: { [k: string]: string }; + + /** ConversationSummarizationSuggestionData confidence. */ + public confidence: number; + + /** ConversationSummarizationSuggestionData metadata. */ + public metadata: { [k: string]: string }; + + /** ConversationSummarizationSuggestionData answerRecord. */ + public answerRecord: string; + + /** ConversationSummarizationSuggestionData conversationModel. */ + public conversationModel: string; + + /** + * Creates a new ConversationSummarizationSuggestionData instance using the specified properties. + * @param [properties] Properties to set + * @returns ConversationSummarizationSuggestionData instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData): google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData; + + /** + * Encodes the specified ConversationSummarizationSuggestionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.verify|verify} messages. + * @param message ConversationSummarizationSuggestionData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConversationSummarizationSuggestionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.verify|verify} messages. + * @param message ConversationSummarizationSuggestionData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConversationSummarizationSuggestionData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConversationSummarizationSuggestionData + * @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.contactcenterinsights.v1.ConversationSummarizationSuggestionData; + + /** + * Decodes a ConversationSummarizationSuggestionData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConversationSummarizationSuggestionData + * @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.contactcenterinsights.v1.ConversationSummarizationSuggestionData; + + /** + * Verifies a ConversationSummarizationSuggestionData 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 ConversationSummarizationSuggestionData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConversationSummarizationSuggestionData + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData; + + /** + * Creates a plain object from a ConversationSummarizationSuggestionData message. Also converts values to other types if specified. + * @param message ConversationSummarizationSuggestionData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConversationSummarizationSuggestionData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConversationSummarizationSuggestionData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a ConversationParticipant. */ interface IConversationParticipant { @@ -13734,6 +13873,12 @@ export namespace google { /** AnnotatorSelector issueModels */ issueModels?: (string[]|null); + + /** AnnotatorSelector runSummarizationAnnotator */ + runSummarizationAnnotator?: (boolean|null); + + /** AnnotatorSelector summarizationConfig */ + summarizationConfig?: (google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig|null); } /** Represents an AnnotatorSelector. */ @@ -13772,6 +13917,12 @@ export namespace google { /** AnnotatorSelector issueModels. */ public issueModels: string[]; + /** AnnotatorSelector runSummarizationAnnotator. */ + public runSummarizationAnnotator: boolean; + + /** AnnotatorSelector summarizationConfig. */ + public summarizationConfig?: (google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig|null); + /** * Creates a new AnnotatorSelector instance using the specified properties. * @param [properties] Properties to set @@ -13849,6 +14000,124 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + namespace AnnotatorSelector { + + /** Properties of a SummarizationConfig. */ + interface ISummarizationConfig { + + /** SummarizationConfig conversationProfile */ + conversationProfile?: (string|null); + + /** SummarizationConfig summarizationModel */ + summarizationModel?: (google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModel|keyof typeof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModel|null); + } + + /** Represents a SummarizationConfig. */ + class SummarizationConfig implements ISummarizationConfig { + + /** + * Constructs a new SummarizationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig); + + /** SummarizationConfig conversationProfile. */ + public conversationProfile?: (string|null); + + /** SummarizationConfig summarizationModel. */ + public summarizationModel?: (google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModel|keyof typeof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModel|null); + + /** SummarizationConfig modelSource. */ + public modelSource?: ("conversationProfile"|"summarizationModel"); + + /** + * Creates a new SummarizationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SummarizationConfig instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig): google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig; + + /** + * Encodes the specified SummarizationConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.verify|verify} messages. + * @param message SummarizationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SummarizationConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.verify|verify} messages. + * @param message SummarizationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SummarizationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SummarizationConfig + * @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.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig; + + /** + * Decodes a SummarizationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SummarizationConfig + * @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.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig; + + /** + * Verifies a SummarizationConfig 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 SummarizationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SummarizationConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig; + + /** + * Creates a plain object from a SummarizationConfig message. Also converts values to other types if specified. + * @param message SummarizationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SummarizationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SummarizationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SummarizationConfig { + + /** SummarizationModel enum. */ + enum SummarizationModel { + SUMMARIZATION_MODEL_UNSPECIFIED = 0, + BASELINE_MODEL = 1 + } + } + } } } } diff --git a/packages/google-cloud-contactcenterinsights/protos/protos.js b/packages/google-cloud-contactcenterinsights/protos/protos.js index 41e1ce6a699..0fa1a0a2fc2 100644 --- a/packages/google-cloud-contactcenterinsights/protos/protos.js +++ b/packages/google-cloud-contactcenterinsights/protos/protos.js @@ -17696,6 +17696,7 @@ * @property {google.protobuf.IDuration|null} [duration] Conversation duration * @property {number|null} [turnCount] Conversation turnCount * @property {google.cloud.contactcenterinsights.v1.IAnalysis|null} [latestAnalysis] Conversation latestAnalysis + * @property {google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData|null} [latestSummary] Conversation latestSummary * @property {Array.|null} [runtimeAnnotations] Conversation runtimeAnnotations * @property {Object.|null} [dialogflowIntents] Conversation dialogflowIntents * @property {string|null} [obfuscatedUserId] Conversation obfuscatedUserId @@ -17847,6 +17848,14 @@ */ Conversation.prototype.latestAnalysis = null; + /** + * Conversation latestSummary. + * @member {google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData|null|undefined} latestSummary + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.latestSummary = null; + /** * Conversation runtimeAnnotations. * @member {Array.} runtimeAnnotations @@ -17961,6 +17970,8 @@ writer.uint32(/* id 18, wireType 2 =*/146).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); $root.google.cloud.contactcenterinsights.v1.DialogflowIntent.encode(message.dialogflowIntents[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); } + if (message.latestSummary != null && Object.hasOwnProperty.call(message, "latestSummary")) + $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.encode(message.latestSummary, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); if (message.obfuscatedUserId != null && Object.hasOwnProperty.call(message, "obfuscatedUserId")) writer.uint32(/* id 21, wireType 2 =*/170).string(message.obfuscatedUserId); return writer; @@ -18080,6 +18091,10 @@ message.latestAnalysis = $root.google.cloud.contactcenterinsights.v1.Analysis.decode(reader, reader.uint32()); break; } + case 20: { + message.latestSummary = $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.decode(reader, reader.uint32()); + break; + } case 13: { if (!(message.runtimeAnnotations && message.runtimeAnnotations.length)) message.runtimeAnnotations = []; @@ -18239,6 +18254,11 @@ if (error) return "latestAnalysis." + error; } + if (message.latestSummary != null && message.hasOwnProperty("latestSummary")) { + var error = $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.verify(message.latestSummary); + if (error) + return "latestSummary." + error; + } if (message.runtimeAnnotations != null && message.hasOwnProperty("runtimeAnnotations")) { if (!Array.isArray(message.runtimeAnnotations)) return "runtimeAnnotations: array expected"; @@ -18361,6 +18381,11 @@ throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.latestAnalysis: object expected"); message.latestAnalysis = $root.google.cloud.contactcenterinsights.v1.Analysis.fromObject(object.latestAnalysis); } + if (object.latestSummary != null) { + if (typeof object.latestSummary !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.latestSummary: object expected"); + message.latestSummary = $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.fromObject(object.latestSummary); + } if (object.runtimeAnnotations) { if (!Array.isArray(object.runtimeAnnotations)) throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.runtimeAnnotations: array expected"); @@ -18418,6 +18443,7 @@ object.latestAnalysis = null; object.languageCode = ""; object.startTime = null; + object.latestSummary = null; object.obfuscatedUserId = ""; } if (message.name != null && message.hasOwnProperty("name")) @@ -18475,6 +18501,8 @@ for (var j = 0; j < keys2.length; ++j) object.dialogflowIntents[keys2[j]] = $root.google.cloud.contactcenterinsights.v1.DialogflowIntent.toObject(message.dialogflowIntents[keys2[j]], options); } + if (message.latestSummary != null && message.hasOwnProperty("latestSummary")) + object.latestSummary = $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.toObject(message.latestSummary, options); if (message.obfuscatedUserId != null && message.hasOwnProperty("obfuscatedUserId")) object.obfuscatedUserId = message.obfuscatedUserId; return object; @@ -29856,6 +29884,7 @@ * @property {google.cloud.contactcenterinsights.v1.ISmartReplyData|null} [smartReply] RuntimeAnnotation smartReply * @property {google.cloud.contactcenterinsights.v1.ISmartComposeSuggestionData|null} [smartComposeSuggestion] RuntimeAnnotation smartComposeSuggestion * @property {google.cloud.contactcenterinsights.v1.IDialogflowInteractionData|null} [dialogflowInteraction] RuntimeAnnotation dialogflowInteraction + * @property {google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData|null} [conversationSummarizationSuggestion] RuntimeAnnotation conversationSummarizationSuggestion * @property {string|null} [annotationId] RuntimeAnnotation annotationId * @property {google.protobuf.ITimestamp|null} [createTime] RuntimeAnnotation createTime * @property {google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null} [startBoundary] RuntimeAnnotation startBoundary @@ -29918,6 +29947,14 @@ */ RuntimeAnnotation.prototype.dialogflowInteraction = null; + /** + * RuntimeAnnotation conversationSummarizationSuggestion. + * @member {google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData|null|undefined} conversationSummarizationSuggestion + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @instance + */ + RuntimeAnnotation.prototype.conversationSummarizationSuggestion = null; + /** * RuntimeAnnotation annotationId. * @member {string} annotationId @@ -29963,12 +30000,12 @@ /** * RuntimeAnnotation data. - * @member {"articleSuggestion"|"faqAnswer"|"smartReply"|"smartComposeSuggestion"|"dialogflowInteraction"|undefined} data + * @member {"articleSuggestion"|"faqAnswer"|"smartReply"|"smartComposeSuggestion"|"dialogflowInteraction"|"conversationSummarizationSuggestion"|undefined} data * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation * @instance */ Object.defineProperty(RuntimeAnnotation.prototype, "data", { - get: $util.oneOfGetter($oneOfFields = ["articleSuggestion", "faqAnswer", "smartReply", "smartComposeSuggestion", "dialogflowInteraction"]), + get: $util.oneOfGetter($oneOfFields = ["articleSuggestion", "faqAnswer", "smartReply", "smartComposeSuggestion", "dialogflowInteraction", "conversationSummarizationSuggestion"]), set: $util.oneOfSetter($oneOfFields) }); @@ -30016,6 +30053,8 @@ $root.google.cloud.contactcenterinsights.v1.SmartComposeSuggestionData.encode(message.smartComposeSuggestion, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); if (message.dialogflowInteraction != null && Object.hasOwnProperty.call(message, "dialogflowInteraction")) $root.google.cloud.contactcenterinsights.v1.DialogflowInteractionData.encode(message.dialogflowInteraction, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.conversationSummarizationSuggestion != null && Object.hasOwnProperty.call(message, "conversationSummarizationSuggestion")) + $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.encode(message.conversationSummarizationSuggestion, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); return writer; }; @@ -30070,6 +30109,10 @@ message.dialogflowInteraction = $root.google.cloud.contactcenterinsights.v1.DialogflowInteractionData.decode(reader, reader.uint32()); break; } + case 12: { + message.conversationSummarizationSuggestion = $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.decode(reader, reader.uint32()); + break; + } case 1: { message.annotationId = reader.string(); break; @@ -30174,6 +30217,16 @@ return "dialogflowInteraction." + error; } } + if (message.conversationSummarizationSuggestion != null && message.hasOwnProperty("conversationSummarizationSuggestion")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.verify(message.conversationSummarizationSuggestion); + if (error) + return "conversationSummarizationSuggestion." + error; + } + } if (message.annotationId != null && message.hasOwnProperty("annotationId")) if (!$util.isString(message.annotationId)) return "annotationId: string expected"; @@ -30237,6 +30290,11 @@ throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.dialogflowInteraction: object expected"); message.dialogflowInteraction = $root.google.cloud.contactcenterinsights.v1.DialogflowInteractionData.fromObject(object.dialogflowInteraction); } + if (object.conversationSummarizationSuggestion != null) { + if (typeof object.conversationSummarizationSuggestion !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.conversationSummarizationSuggestion: object expected"); + message.conversationSummarizationSuggestion = $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.fromObject(object.conversationSummarizationSuggestion); + } if (object.annotationId != null) message.annotationId = String(object.annotationId); if (object.createTime != null) { @@ -30317,6 +30375,11 @@ if (options.oneofs) object.data = "dialogflowInteraction"; } + if (message.conversationSummarizationSuggestion != null && message.hasOwnProperty("conversationSummarizationSuggestion")) { + object.conversationSummarizationSuggestion = $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.toObject(message.conversationSummarizationSuggestion, options); + if (options.oneofs) + object.data = "conversationSummarizationSuggestion"; + } return object; }; @@ -32201,6 +32264,396 @@ return DialogflowInteractionData; })(); + v1.ConversationSummarizationSuggestionData = (function() { + + /** + * Properties of a ConversationSummarizationSuggestionData. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IConversationSummarizationSuggestionData + * @property {string|null} [text] ConversationSummarizationSuggestionData text + * @property {Object.|null} [textSections] ConversationSummarizationSuggestionData textSections + * @property {number|null} [confidence] ConversationSummarizationSuggestionData confidence + * @property {Object.|null} [metadata] ConversationSummarizationSuggestionData metadata + * @property {string|null} [answerRecord] ConversationSummarizationSuggestionData answerRecord + * @property {string|null} [conversationModel] ConversationSummarizationSuggestionData conversationModel + */ + + /** + * Constructs a new ConversationSummarizationSuggestionData. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ConversationSummarizationSuggestionData. + * @implements IConversationSummarizationSuggestionData + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData=} [properties] Properties to set + */ + function ConversationSummarizationSuggestionData(properties) { + this.textSections = {}; + this.metadata = {}; + 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]]; + } + + /** + * ConversationSummarizationSuggestionData text. + * @member {string} text + * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData + * @instance + */ + ConversationSummarizationSuggestionData.prototype.text = ""; + + /** + * ConversationSummarizationSuggestionData textSections. + * @member {Object.} textSections + * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData + * @instance + */ + ConversationSummarizationSuggestionData.prototype.textSections = $util.emptyObject; + + /** + * ConversationSummarizationSuggestionData confidence. + * @member {number} confidence + * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData + * @instance + */ + ConversationSummarizationSuggestionData.prototype.confidence = 0; + + /** + * ConversationSummarizationSuggestionData metadata. + * @member {Object.} metadata + * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData + * @instance + */ + ConversationSummarizationSuggestionData.prototype.metadata = $util.emptyObject; + + /** + * ConversationSummarizationSuggestionData answerRecord. + * @member {string} answerRecord + * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData + * @instance + */ + ConversationSummarizationSuggestionData.prototype.answerRecord = ""; + + /** + * ConversationSummarizationSuggestionData conversationModel. + * @member {string} conversationModel + * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData + * @instance + */ + ConversationSummarizationSuggestionData.prototype.conversationModel = ""; + + /** + * Creates a new ConversationSummarizationSuggestionData instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData + * @static + * @param {google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData} ConversationSummarizationSuggestionData instance + */ + ConversationSummarizationSuggestionData.create = function create(properties) { + return new ConversationSummarizationSuggestionData(properties); + }; + + /** + * Encodes the specified ConversationSummarizationSuggestionData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData + * @static + * @param {google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData} message ConversationSummarizationSuggestionData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationSummarizationSuggestionData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + for (var keys = Object.keys(message.metadata), 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.metadata[keys[i]]).ldelim(); + if (message.answerRecord != null && Object.hasOwnProperty.call(message, "answerRecord")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.answerRecord); + if (message.textSections != null && Object.hasOwnProperty.call(message, "textSections")) + for (var keys = Object.keys(message.textSections), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.textSections[keys[i]]).ldelim(); + if (message.conversationModel != null && Object.hasOwnProperty.call(message, "conversationModel")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.conversationModel); + return writer; + }; + + /** + * Encodes the specified ConversationSummarizationSuggestionData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData + * @static + * @param {google.cloud.contactcenterinsights.v1.IConversationSummarizationSuggestionData} message ConversationSummarizationSuggestionData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationSummarizationSuggestionData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConversationSummarizationSuggestionData message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData} ConversationSummarizationSuggestionData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationSummarizationSuggestionData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.text = reader.string(); + break; + } + case 5: { + if (message.textSections === $util.emptyObject) + message.textSections = {}; + 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.textSections[key] = value; + break; + } + case 2: { + message.confidence = reader.float(); + break; + } + case 3: { + if (message.metadata === $util.emptyObject) + message.metadata = {}; + 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.metadata[key] = value; + break; + } + case 4: { + message.answerRecord = reader.string(); + break; + } + case 6: { + message.conversationModel = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConversationSummarizationSuggestionData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData} ConversationSummarizationSuggestionData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationSummarizationSuggestionData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConversationSummarizationSuggestionData message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConversationSummarizationSuggestionData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + if (message.textSections != null && message.hasOwnProperty("textSections")) { + if (!$util.isObject(message.textSections)) + return "textSections: object expected"; + var key = Object.keys(message.textSections); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.textSections[key[i]])) + return "textSections: string{k:string} expected"; + } + if (message.confidence != null && message.hasOwnProperty("confidence")) + if (typeof message.confidence !== "number") + return "confidence: number expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (!$util.isObject(message.metadata)) + return "metadata: object expected"; + var key = Object.keys(message.metadata); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.metadata[key[i]])) + return "metadata: string{k:string} expected"; + } + if (message.answerRecord != null && message.hasOwnProperty("answerRecord")) + if (!$util.isString(message.answerRecord)) + return "answerRecord: string expected"; + if (message.conversationModel != null && message.hasOwnProperty("conversationModel")) + if (!$util.isString(message.conversationModel)) + return "conversationModel: string expected"; + return null; + }; + + /** + * Creates a ConversationSummarizationSuggestionData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData} ConversationSummarizationSuggestionData + */ + ConversationSummarizationSuggestionData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData(); + if (object.text != null) + message.text = String(object.text); + if (object.textSections) { + if (typeof object.textSections !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.textSections: object expected"); + message.textSections = {}; + for (var keys = Object.keys(object.textSections), i = 0; i < keys.length; ++i) + message.textSections[keys[i]] = String(object.textSections[keys[i]]); + } + if (object.confidence != null) + message.confidence = Number(object.confidence); + if (object.metadata) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.metadata: object expected"); + message.metadata = {}; + for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) + message.metadata[keys[i]] = String(object.metadata[keys[i]]); + } + if (object.answerRecord != null) + message.answerRecord = String(object.answerRecord); + if (object.conversationModel != null) + message.conversationModel = String(object.conversationModel); + return message; + }; + + /** + * Creates a plain object from a ConversationSummarizationSuggestionData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData + * @static + * @param {google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData} message ConversationSummarizationSuggestionData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConversationSummarizationSuggestionData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) { + object.metadata = {}; + object.textSections = {}; + } + if (options.defaults) { + object.text = ""; + object.confidence = 0; + object.answerRecord = ""; + object.conversationModel = ""; + } + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + if (message.confidence != null && message.hasOwnProperty("confidence")) + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + var keys2; + if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { + object.metadata = {}; + for (var j = 0; j < keys2.length; ++j) + object.metadata[keys2[j]] = message.metadata[keys2[j]]; + } + if (message.answerRecord != null && message.hasOwnProperty("answerRecord")) + object.answerRecord = message.answerRecord; + if (message.textSections && (keys2 = Object.keys(message.textSections)).length) { + object.textSections = {}; + for (var j = 0; j < keys2.length; ++j) + object.textSections[keys2[j]] = message.textSections[keys2[j]]; + } + if (message.conversationModel != null && message.hasOwnProperty("conversationModel")) + object.conversationModel = message.conversationModel; + return object; + }; + + /** + * Converts this ConversationSummarizationSuggestionData to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData + * @instance + * @returns {Object.} JSON object + */ + ConversationSummarizationSuggestionData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConversationSummarizationSuggestionData + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConversationSummarizationSuggestionData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData"; + }; + + return ConversationSummarizationSuggestionData; + })(); + v1.ConversationParticipant = (function() { /** @@ -32897,6 +33350,8 @@ * @property {boolean|null} [runIntentAnnotator] AnnotatorSelector runIntentAnnotator * @property {boolean|null} [runIssueModelAnnotator] AnnotatorSelector runIssueModelAnnotator * @property {Array.|null} [issueModels] AnnotatorSelector issueModels + * @property {boolean|null} [runSummarizationAnnotator] AnnotatorSelector runSummarizationAnnotator + * @property {google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig|null} [summarizationConfig] AnnotatorSelector summarizationConfig */ /** @@ -32988,6 +33443,22 @@ */ AnnotatorSelector.prototype.issueModels = $util.emptyArray; + /** + * AnnotatorSelector runSummarizationAnnotator. + * @member {boolean} runSummarizationAnnotator + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @instance + */ + AnnotatorSelector.prototype.runSummarizationAnnotator = false; + + /** + * AnnotatorSelector summarizationConfig. + * @member {google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig|null|undefined} summarizationConfig + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @instance + */ + AnnotatorSelector.prototype.summarizationConfig = null; + /** * Creates a new AnnotatorSelector instance using the specified properties. * @function create @@ -33029,9 +33500,13 @@ writer.uint32(/* id 7, wireType 0 =*/56).bool(message.runIntentAnnotator); if (message.runIssueModelAnnotator != null && Object.hasOwnProperty.call(message, "runIssueModelAnnotator")) writer.uint32(/* id 8, wireType 0 =*/64).bool(message.runIssueModelAnnotator); + if (message.runSummarizationAnnotator != null && Object.hasOwnProperty.call(message, "runSummarizationAnnotator")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.runSummarizationAnnotator); if (message.issueModels != null && message.issueModels.length) for (var i = 0; i < message.issueModels.length; ++i) writer.uint32(/* id 10, wireType 2 =*/82).string(message.issueModels[i]); + if (message.summarizationConfig != null && Object.hasOwnProperty.call(message, "summarizationConfig")) + $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.encode(message.summarizationConfig, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); return writer; }; @@ -33106,6 +33581,14 @@ message.issueModels.push(reader.string()); break; } + case 9: { + message.runSummarizationAnnotator = reader.bool(); + break; + } + case 11: { + message.summarizationConfig = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -33176,6 +33659,14 @@ if (!$util.isString(message.issueModels[i])) return "issueModels: string[] expected"; } + if (message.runSummarizationAnnotator != null && message.hasOwnProperty("runSummarizationAnnotator")) + if (typeof message.runSummarizationAnnotator !== "boolean") + return "runSummarizationAnnotator: boolean expected"; + if (message.summarizationConfig != null && message.hasOwnProperty("summarizationConfig")) { + var error = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.verify(message.summarizationConfig); + if (error) + return "summarizationConfig." + error; + } return null; }; @@ -33219,6 +33710,13 @@ for (var i = 0; i < object.issueModels.length; ++i) message.issueModels[i] = String(object.issueModels[i]); } + if (object.runSummarizationAnnotator != null) + message.runSummarizationAnnotator = Boolean(object.runSummarizationAnnotator); + if (object.summarizationConfig != null) { + if (typeof object.summarizationConfig !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.AnnotatorSelector.summarizationConfig: object expected"); + message.summarizationConfig = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.fromObject(object.summarizationConfig); + } return message; }; @@ -33247,6 +33745,8 @@ object.runEntityAnnotator = false; object.runIntentAnnotator = false; object.runIssueModelAnnotator = false; + object.runSummarizationAnnotator = false; + object.summarizationConfig = null; } if (message.runInterruptionAnnotator != null && message.hasOwnProperty("runInterruptionAnnotator")) object.runInterruptionAnnotator = message.runInterruptionAnnotator; @@ -33267,11 +33767,15 @@ object.runIntentAnnotator = message.runIntentAnnotator; if (message.runIssueModelAnnotator != null && message.hasOwnProperty("runIssueModelAnnotator")) object.runIssueModelAnnotator = message.runIssueModelAnnotator; + if (message.runSummarizationAnnotator != null && message.hasOwnProperty("runSummarizationAnnotator")) + object.runSummarizationAnnotator = message.runSummarizationAnnotator; if (message.issueModels && message.issueModels.length) { object.issueModels = []; for (var j = 0; j < message.issueModels.length; ++j) object.issueModels[j] = message.issueModels[j]; } + if (message.summarizationConfig != null && message.hasOwnProperty("summarizationConfig")) + object.summarizationConfig = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.toObject(message.summarizationConfig, options); return object; }; @@ -33301,6 +33805,289 @@ return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.AnnotatorSelector"; }; + AnnotatorSelector.SummarizationConfig = (function() { + + /** + * Properties of a SummarizationConfig. + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @interface ISummarizationConfig + * @property {string|null} [conversationProfile] SummarizationConfig conversationProfile + * @property {google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModel|null} [summarizationModel] SummarizationConfig summarizationModel + */ + + /** + * Constructs a new SummarizationConfig. + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @classdesc Represents a SummarizationConfig. + * @implements ISummarizationConfig + * @constructor + * @param {google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig=} [properties] Properties to set + */ + function SummarizationConfig(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]]; + } + + /** + * SummarizationConfig conversationProfile. + * @member {string|null|undefined} conversationProfile + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @instance + */ + SummarizationConfig.prototype.conversationProfile = null; + + /** + * SummarizationConfig summarizationModel. + * @member {google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModel|null|undefined} summarizationModel + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @instance + */ + SummarizationConfig.prototype.summarizationModel = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SummarizationConfig modelSource. + * @member {"conversationProfile"|"summarizationModel"|undefined} modelSource + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @instance + */ + Object.defineProperty(SummarizationConfig.prototype, "modelSource", { + get: $util.oneOfGetter($oneOfFields = ["conversationProfile", "summarizationModel"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SummarizationConfig instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig} SummarizationConfig instance + */ + SummarizationConfig.create = function create(properties) { + return new SummarizationConfig(properties); + }; + + /** + * Encodes the specified SummarizationConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig} message SummarizationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummarizationConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conversationProfile != null && Object.hasOwnProperty.call(message, "conversationProfile")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversationProfile); + if (message.summarizationModel != null && Object.hasOwnProperty.call(message, "summarizationModel")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.summarizationModel); + return writer; + }; + + /** + * Encodes the specified SummarizationConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.AnnotatorSelector.ISummarizationConfig} message SummarizationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummarizationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SummarizationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig} SummarizationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummarizationConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.conversationProfile = reader.string(); + break; + } + case 2: { + message.summarizationModel = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SummarizationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig} SummarizationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummarizationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SummarizationConfig message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SummarizationConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) { + properties.modelSource = 1; + if (!$util.isString(message.conversationProfile)) + return "conversationProfile: string expected"; + } + if (message.summarizationModel != null && message.hasOwnProperty("summarizationModel")) { + if (properties.modelSource === 1) + return "modelSource: multiple values"; + properties.modelSource = 1; + switch (message.summarizationModel) { + default: + return "summarizationModel: enum value expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a SummarizationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig} SummarizationConfig + */ + SummarizationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig(); + if (object.conversationProfile != null) + message.conversationProfile = String(object.conversationProfile); + switch (object.summarizationModel) { + default: + if (typeof object.summarizationModel === "number") { + message.summarizationModel = object.summarizationModel; + break; + } + break; + case "SUMMARIZATION_MODEL_UNSPECIFIED": + case 0: + message.summarizationModel = 0; + break; + case "BASELINE_MODEL": + case 1: + message.summarizationModel = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a SummarizationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig} message SummarizationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SummarizationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) { + object.conversationProfile = message.conversationProfile; + if (options.oneofs) + object.modelSource = "conversationProfile"; + } + if (message.summarizationModel != null && message.hasOwnProperty("summarizationModel")) { + object.summarizationModel = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModel[message.summarizationModel] === undefined ? message.summarizationModel : $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModel[message.summarizationModel] : message.summarizationModel; + if (options.oneofs) + object.modelSource = "summarizationModel"; + } + return object; + }; + + /** + * Converts this SummarizationConfig to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @instance + * @returns {Object.} JSON object + */ + SummarizationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SummarizationConfig + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SummarizationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig"; + }; + + /** + * SummarizationModel enum. + * @name google.cloud.contactcenterinsights.v1.AnnotatorSelector.SummarizationConfig.SummarizationModel + * @enum {number} + * @property {number} SUMMARIZATION_MODEL_UNSPECIFIED=0 SUMMARIZATION_MODEL_UNSPECIFIED value + * @property {number} BASELINE_MODEL=1 BASELINE_MODEL value + */ + SummarizationConfig.SummarizationModel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SUMMARIZATION_MODEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "BASELINE_MODEL"] = 1; + return values; + })(); + + return SummarizationConfig; + })(); + return AnnotatorSelector; })(); diff --git a/packages/google-cloud-contactcenterinsights/protos/protos.json b/packages/google-cloud-contactcenterinsights/protos/protos.json index dc61f3512e7..321f05891d6 100644 --- a/packages/google-cloud-contactcenterinsights/protos/protos.json +++ b/packages/google-cloud-contactcenterinsights/protos/protos.json @@ -2116,6 +2116,13 @@ "(google.api.field_behavior)": "OUTPUT_ONLY" } }, + "latestSummary": { + "type": "ConversationSummarizationSuggestionData", + "id": 20, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "runtimeAnnotations": { "rule": "repeated", "type": "RuntimeAnnotation", @@ -3051,7 +3058,8 @@ "faqAnswer", "smartReply", "smartComposeSuggestion", - "dialogflowInteraction" + "dialogflowInteraction", + "conversationSummarizationSuggestion" ] } }, @@ -3076,6 +3084,10 @@ "type": "DialogflowInteractionData", "id": 10 }, + "conversationSummarizationSuggestion": { + "type": "ConversationSummarizationSuggestionData", + "id": 12 + }, "annotationId": { "type": "string", "id": 1 @@ -3236,6 +3248,36 @@ } } }, + "ConversationSummarizationSuggestionData": { + "fields": { + "text": { + "type": "string", + "id": 1 + }, + "textSections": { + "keyType": "string", + "type": "string", + "id": 5 + }, + "confidence": { + "type": "float", + "id": 2 + }, + "metadata": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "answerRecord": { + "type": "string", + "id": 4 + }, + "conversationModel": { + "type": "string", + "id": 6 + } + } + }, "ConversationParticipant": { "oneofs": { "participant": { @@ -3367,6 +3409,47 @@ "options": { "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/IssueModel" } + }, + "runSummarizationAnnotator": { + "type": "bool", + "id": 9 + }, + "summarizationConfig": { + "type": "SummarizationConfig", + "id": 11 + } + }, + "nested": { + "SummarizationConfig": { + "oneofs": { + "modelSource": { + "oneof": [ + "conversationProfile", + "summarizationModel" + ] + } + }, + "fields": { + "conversationProfile": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "dialogflow.googleapis.com/ConversationProfile" + } + }, + "summarizationModel": { + "type": "SummarizationModel", + "id": 2 + } + }, + "nested": { + "SummarizationModel": { + "values": { + "SUMMARIZATION_MODEL_UNSPECIFIED": 0, + "BASELINE_MODEL": 1 + } + } + } } } } diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata.google.cloud.contactcenterinsights.v1.json b/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata.google.cloud.contactcenterinsights.v1.json index 2a9a2941f5a..bd4c8d8aa56 100644 --- a/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata.google.cloud.contactcenterinsights.v1.json +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata.google.cloud.contactcenterinsights.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-contactcenterinsights", - "version": "2.5.0", + "version": "2.7.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-contactcenterinsights/samples/package.json b/packages/google-cloud-contactcenterinsights/samples/package.json index 6fc0310186d..278752146cd 100644 --- a/packages/google-cloud-contactcenterinsights/samples/package.json +++ b/packages/google-cloud-contactcenterinsights/samples/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "@google-cloud/bigquery": "^6.0.0", - "@google-cloud/contact-center-insights": "^2.6.0", + "@google-cloud/contact-center-insights": "^2.7.0", "@google-cloud/pubsub": "^3.0.0" }, "devDependencies": { diff --git a/packages/google-cloud-contentwarehouse/package.json b/packages/google-cloud-contentwarehouse/package.json index ad98d4f9448..c1194d0e968 100644 --- a/packages/google-cloud-contentwarehouse/package.json +++ b/packages/google-cloud-contentwarehouse/package.json @@ -31,7 +31,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -39,10 +39,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -57,6 +58,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-datacatalog-lineage/package.json b/packages/google-cloud-datacatalog-lineage/package.json index ef710adda10..4a326b5b6d2 100644 --- a/packages/google-cloud-datacatalog-lineage/package.json +++ b/packages/google-cloud-datacatalog-lineage/package.json @@ -31,7 +31,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -39,10 +39,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -57,6 +58,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-datacatalog/package.json b/packages/google-cloud-datacatalog/package.json index 623364f733f..c4422461ad3 100644 --- a/packages/google-cloud-datacatalog/package.json +++ b/packages/google-cloud-datacatalog/package.json @@ -43,32 +43,31 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "pack-n-play": "^1.0.0-2", "sinon": "^15.0.0", "typescript": "^4.6.4" }, "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", - "fix": "gts fix", - "lint": "gts check", - "test": "c8 mocha build/test/*.js", "predocs-test": "npm run docs", "docs-test": "linkinator docs", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "system-test": "npm run compile && c8 mocha build/system-test", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", - "compile-protos": "compileProtos src", + "fix": "gts fix", + "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "pretest": "npm run compile", - "prelint": "cd samples; npm link ../; npm install", - "clean": "gts clean", - "precompile": "gts clean" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "license": "Apache-2.0", "engines": { "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-datacatalog" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-dataform/package.json b/packages/google-cloud-dataform/package.json index ecf4e0d8d42..a87d3e1f335 100644 --- a/packages/google-cloud-dataform/package.json +++ b/packages/google-cloud-dataform/package.json @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^10.0.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=v12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-dataform" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-datafusion/package.json b/packages/google-cloud-datafusion/package.json index ab7a6f87725..81eb76acfbb 100644 --- a/packages/google-cloud-datafusion/package.json +++ b/packages/google-cloud-datafusion/package.json @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-datafusion" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-datalabeling/package.json b/packages/google-cloud-datalabeling/package.json index 58729aea17f..c0dea7cf473 100644 --- a/packages/google-cloud-datalabeling/package.json +++ b/packages/google-cloud-datalabeling/package.json @@ -32,20 +32,20 @@ "Data Labeling API" ], "scripts": { - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "system-test": "npm run compile && c8 mocha build/system-test", - "docs": "jsdoc -c .jsdoc.js", - "lint": "gts check", - "fix": "gts fix", - "docs-test": "linkinator docs", "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", - "prepare": "npm run compile", - "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean" + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -60,6 +60,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -70,5 +71,4 @@ "webpack-cli": "^5.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-datalabeling" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-dataplex/CHANGELOG.md b/packages/google-cloud-dataplex/CHANGELOG.md index d87081c6cda..8380c901825 100644 --- a/packages/google-cloud-dataplex/CHANGELOG.md +++ b/packages/google-cloud-dataplex/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.4.0](https://github.com/googleapis/google-cloud-node/compare/dataplex-v2.3.2...dataplex-v2.4.0) (2023-05-04) + + +### Features + +* [dataplex] added new Dataplex APIs and new features for existing APIs (e.g. DataScans) ([#4230](https://github.com/googleapis/google-cloud-node/issues/4230)) ([5268d24](https://github.com/googleapis/google-cloud-node/commit/5268d24478595c01fe04215f50ece5558cfcdc46)) + ## [2.3.2](https://github.com/googleapis/google-cloud-node/compare/dataplex-v2.3.1...dataplex-v2.3.2) (2023-04-13) diff --git a/packages/google-cloud-dataplex/README.md b/packages/google-cloud-dataplex/README.md index 542664bbae1..e38444cbb6d 100644 --- a/packages/google-cloud-dataplex/README.md +++ b/packages/google-cloud-dataplex/README.md @@ -131,6 +131,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Dataplex_service.list_tasks | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_tasks.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_tasks.js,samples/README.md) | | Dataplex_service.list_zone_actions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zone_actions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zone_actions.js,samples/README.md) | | Dataplex_service.list_zones | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zones.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.list_zones.js,samples/README.md) | +| Dataplex_service.run_task | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.run_task.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.run_task.js,samples/README.md) | | Dataplex_service.update_asset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_asset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_asset.js,samples/README.md) | | Dataplex_service.update_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_environment.js,samples/README.md) | | Dataplex_service.update_lake | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_lake.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_lake.js,samples/README.md) | diff --git a/packages/google-cloud-dataplex/package.json b/packages/google-cloud-dataplex/package.json index 814177844e2..b2c694eb022 100644 --- a/packages/google-cloud-dataplex/package.json +++ b/packages/google-cloud-dataplex/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/dataplex", - "version": "2.3.2", + "version": "2.4.0", "description": "dataplex client for Node.js", "repository": { "type": "git", @@ -30,10 +30,9 @@ "dataplex service" ], "scripts": { - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "samples-test-suite": "cd samples/ && npm link ../ && npm test && cd ../", "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", + "samples-test-suite": "cd samples/ && npm link ../ && npm test && cd ../", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -41,7 +40,10 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", "test": "c8 mocha build/test" }, "dependencies": { @@ -58,6 +60,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -70,5 +73,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/analyze.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/analyze.proto index 874c1f9fbac..deaed52f231 100644 --- a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/analyze.proto +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/analyze.proto @@ -90,6 +90,7 @@ message Environment { } } + // Configuration for sessions created for this environment. message SessionSpec { // Optional. The idle time configuration of the session. The session will be // auto-terminated at the end of this period. @@ -104,12 +105,14 @@ message Environment { bool enable_fast_startup = 2 [(google.api.field_behavior) = OPTIONAL]; } + // Status of sessions created for this environment. message SessionStatus { // Output only. Queries over sessions to mark whether the environment is // currently active or not bool active = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } + // URI Endpoints to access sessions associated with the Environment. message Endpoints { // Output only. URI to serve notebook APIs string notebooks = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -244,6 +247,7 @@ message Content { string data_text = 9 [(google.api.field_behavior) = REQUIRED]; } + // Types of content oneof content { // Sql Script related configurations. SqlScript sql_script = 100; @@ -276,5 +280,6 @@ message Session { google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. State of Session State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/data_profile.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/data_profile.proto index 96f36946db4..eca8edb423b 100644 --- a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/data_profile.proto +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/data_profile.proto @@ -16,6 +16,7 @@ syntax = "proto3"; package google.cloud.dataplex.v1; +import "google/api/field_behavior.proto"; import "google/cloud/dataplex/v1/processing.proto"; option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; @@ -26,49 +27,42 @@ option java_package = "com.google.cloud.dataplex.v1"; // DataProfileScan related setting. message DataProfileSpec {} -// DataProfileResult defines the output of DataProfileScan. -// Each field of the table will have field type specific profile result. +// DataProfileResult defines the output of DataProfileScan. Each field of the +// table will have field type specific profile result. message DataProfileResult { - // Profile information describing the structure and layout of the data - // and contains the profile info. + // Contains name, type, mode and field type specific profile information. message Profile { - // Represents a column field within a table schema. + // A field within a table. message Field { - // ProfileInfo defines the profile information for each schema field type. + // The profile information for each field type. message ProfileInfo { - // StringFieldInfo defines output info for any string type field. + // The profile information for a string type field. message StringFieldInfo { - // The minimum length of the string field in the sampled data. - // Optional if zero non-null rows. + // Minimum length of non-null values in the scanned data. int64 min_length = 1; - // The maximum length of a string field in the sampled data. - // Optional if zero non-null rows. + // Maximum length of non-null values in the scanned data. int64 max_length = 2; - // The average length of a string field in the sampled data. - // Optional if zero non-null rows. + // Average length of non-null values in the scanned data. double average_length = 3; } - // IntegerFieldInfo defines output for any integer type field. + // The profile information for an integer type field. message IntegerFieldInfo { - // The average of non-null values of integer field in the sampled - // data. Return NaN, if the field has a NaN. Optional if zero non-null - // rows. + // Average of non-null values in the scanned data. NaN, if the field + // has a NaN. double average = 1; - // The standard deviation of non-null of integer field in the sampled - // data. Return NaN, if the field has a NaN. Optional if zero non-null - // rows. + // Standard deviation of non-null values in the scanned data. NaN, if + // the field has a NaN. double standard_deviation = 3; - // The minimum value of an integer field in the sampled data. - // Return NaN, if the field has a NaN. Optional if zero non-null - // rows. + // Minimum of non-null values in the scanned data. NaN, if the field + // has a NaN. int64 min = 4; - // A quartile divide the number of data points into four parts, or + // A quartile divides the number of data points into four parts, or // quarters, of more-or-less equal size. Three main quartiles used // are: The first quartile (Q1) splits off the lowest 25% of data from // the highest 75%. It is also known as the lower or 25th empirical @@ -76,34 +70,31 @@ message DataProfileResult { // quartile (Q2) is the median of a data set. So, 50% of the data lies // below this point. The third quartile (Q3) splits off the highest // 25% of data from the lowest 75%. It is known as the upper or 75th - // empirical quartile, as 75% of the data lies below this point. So, - // here the quartiles is provided as an ordered list of quartile - // values, occurring in order Q1, median, Q3. + // empirical quartile, as 75% of the data lies below this point. + // Here, the quartiles is provided as an ordered list of quartile + // values for the scanned data, occurring in order Q1, median, Q3. repeated int64 quartiles = 6; - // The maximum value of an integer field in the sampled data. - // Return NaN, if the field has a NaN. Optional if zero non-null - // rows. + // Maximum of non-null values in the scanned data. NaN, if the field + // has a NaN. int64 max = 5; } - // DoubleFieldInfo defines output for any double type field. + // The profile information for a double type field. message DoubleFieldInfo { - // The average of non-null values of double field in the sampled data. - // Return NaN, if the field has a NaN. Optional if zero non-null rows. + // Average of non-null values in the scanned data. NaN, if the field + // has a NaN. double average = 1; - // The standard deviation of non-null of double field in the sampled - // data. Return NaN, if the field has a NaN. Optional if zero non-null - // rows. + // Standard deviation of non-null values in the scanned data. NaN, if + // the field has a NaN. double standard_deviation = 3; - // The minimum value of a double field in the sampled data. - // Return NaN, if the field has a NaN. Optional if zero non-null - // rows. + // Minimum of non-null values in the scanned data. NaN, if the field + // has a NaN. double min = 4; - // A quartile divide the numebr of data points into four parts, or + // A quartile divides the number of data points into four parts, or // quarters, of more-or-less equal size. Three main quartiles used // are: The first quartile (Q1) splits off the lowest 25% of data from // the highest 75%. It is also known as the lower or 25th empirical @@ -111,50 +102,49 @@ message DataProfileResult { // quartile (Q2) is the median of a data set. So, 50% of the data lies // below this point. The third quartile (Q3) splits off the highest // 25% of data from the lowest 75%. It is known as the upper or 75th - // empirical quartile, as 75% of the data lies below this point. So, - // here the quartiles is provided as an ordered list of quartile - // values, occurring in order Q1, median, Q3. + // empirical quartile, as 75% of the data lies below this point. + // Here, the quartiles is provided as an ordered list of quartile + // values for the scanned data, occurring in order Q1, median, Q3. repeated double quartiles = 6; - // The maximum value of a double field in the sampled data. - // Return NaN, if the field has a NaN. Optional if zero non-null - // rows. + // Maximum of non-null values in the scanned data. NaN, if the field + // has a NaN. double max = 5; } - // The TopNValue defines the structure of output of top N values of a - // field. + // Top N non-null values in the scanned data. message TopNValue { - // The value is the string value of the actual value from the field. + // String value of a top N non-null value. string value = 1; - // The frequency count of the corresponding value in the field. + // Count of the corresponding value in the scanned data. int64 count = 2; } - // The ratio of null rows against the rows in the sampled data. + // Ratio of rows with null value against total scanned rows. double null_ratio = 2; - // The ratio of rows that are distinct against the rows in the sampled - // data. + // Ratio of rows with distinct values against total scanned rows. + // Not available for complex non-groupable field type RECORD and fields + // with REPEATABLE mode. double distinct_ratio = 3; - // The array of top N values of the field in the sampled data. - // Currently N is set as 10 or equal to distinct values in the field, - // whichever is smaller. This will be optional for complex non-groupable - // data-types such as JSON, ARRAY, JSON, STRUCT. + // The list of top N non-null values and number of times they occur in + // the scanned data. N is 10 or equal to the number of distinct values + // in the field, whichever is smaller. Not available for complex + // non-groupable field type RECORD and fields with REPEATABLE mode. repeated TopNValue top_n_values = 4; - // The corresponding profile for specific field type. - // Each field will have only one field type specific profile output. + // Structural and profile information for specific field type. Not + // available, if mode is REPEATABLE. oneof field_info { - // The corresponding string field profile. + // String type field information. StringFieldInfo string_profile = 101; - // The corresponding integer field profile. + // Integer type field information. IntegerFieldInfo integer_profile = 102; - // The corresponding double field profile. + // Double type field information. DoubleFieldInfo double_profile = 103; } } @@ -162,46 +152,34 @@ message DataProfileResult { // The name of the field. string name = 1; - // The field data type. Possible values include: - // - // * STRING - // * BYTE - // * INT64 - // * INT32 - // * INT16 - // * DOUBLE - // * FLOAT - // * DECIMAL - // * BOOLEAN - // * BINARY - // * TIMESTAMP - // * DATE - // * TIME - // * NULL - // * RECORD + // The data type retrieved from the schema of the data source. For + // instance, for a BigQuery native table, it is the [BigQuery Table + // Schema](https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#tablefieldschema). + // For a Dataplex Entity, it is the [Entity + // Schema](https://cloud.google.com/dataplex/docs/reference/rpc/google.cloud.dataplex.v1#type_3). string type = 2; - // The mode of the field. Its value will be: - // REQUIRED, if it is a required field. - // NULLABLE, if it is an optional field. - // REPEATED, if it is a repeated field. + // The mode of the field. Possible values include: + // + // * REQUIRED, if it is a required field. + // * NULLABLE, if it is an optional field. + // * REPEATED, if it is a repeated field. string mode = 3; - // The profile information for the corresponding field. + // Profile information for the corresponding field. ProfileInfo profile = 4; } - // The sequence of fields describing data in table entities. + // List of fields with structural and profile information for each field. repeated Field fields = 2; } - // The count of all rows in the sampled data. - // Return 0, if zero rows. + // The count of rows scanned. int64 row_count = 3; - // This represents the profile information per field. + // The profile information per field. Profile profile = 4; - // The data scanned for this profile. + // The data scanned for this result. ScannedData scanned_data = 5; } diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/data_quality.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/data_quality.proto index daea4e1a40a..b53ee61f5d8 100644 --- a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/data_quality.proto +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/data_quality.proto @@ -36,7 +36,7 @@ message DataQualityResult { // Overall data quality result -- `true` if all rules passed. bool passed = 5; - // A list of results at the dimension-level. + // A list of results at the dimension level. repeated DataQualityDimensionResult dimensions = 2; // A list of all the rules in a job, and their results. @@ -49,8 +49,7 @@ message DataQualityResult { ScannedData scanned_data = 7; } -// DataQualityRuleResult provides a more detailed, per-rule level view of the -// results. +// DataQualityRuleResult provides a more detailed, per-rule view of the results. message DataQualityRuleResult { // The rule specified in the DataQualitySpec, as is. DataQualityRule rule = 1; @@ -58,12 +57,15 @@ message DataQualityRuleResult { // Whether the rule passed or failed. bool passed = 7; - // The number of rows a rule was evaluated against. - // This field is only valid for ColumnMap type rules. + // The number of rows a rule was evaluated against. This field is only valid + // for ColumnMap type rules. + // // Evaluated count can be configured to either - // (1) include all rows (default) - with null rows automatically failing rule - // evaluation OR (2) exclude null rows from the evaluated_count, by setting - // ignore_nulls = true + // + // * include all rows (default) - with `null` rows automatically failing rule + // evaluation, or + // * exclude `null` rows from the `evaluated_count`, by setting + // `ignore_nulls = true`. int64 evaluated_count = 9; // The number of rows which passed a rule evaluation. @@ -73,7 +75,7 @@ message DataQualityRuleResult { // The number of rows with null values in the specified column. int64 null_count = 5; - // The ratio of passed_count / evaluated_count. + // The ratio of **passed_count / evaluated_count**. // This field is only valid for ColumnMap type rules. double pass_ratio = 6; @@ -82,8 +84,8 @@ message DataQualityRuleResult { string failing_rows_query = 10; } -// DataQualityDimensionResult provides a more detailed, per-dimension level view -// of the results. +// DataQualityDimensionResult provides a more detailed, per-dimension view of +// the results. message DataQualityDimensionResult { // Whether the dimension passed or failed. bool passed = 3; @@ -94,21 +96,25 @@ message DataQualityRule { // Evaluates whether each column value lies between a specified range. message RangeExpectation { // Optional. The minimum column value allowed for a row to pass this - // validation. At least one of min_value and max_value need to be provided. + // validation. At least one of `min_value` and `max_value` need to be + // provided. string min_value = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. The maximum column value allowed for a row to pass this - // validation. At least one of min_value and max_value need to be provided. + // validation. At least one of `min_value` and `max_value` need to be + // provided. string max_value = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Whether each value needs to be strictly greater than ('>') the - // minimum, or if equality is allowed. Only relevant if a min_value has been - // defined. Default = false. + // minimum, or if equality is allowed. + // + // Only relevant if a `min_value` has been defined. Default = false. bool strict_min_enabled = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Whether each value needs to be strictly lesser than ('<') the - // maximum, or if equality is allowed. Only relevant if a max_value has been - // defined. Default = false. + // maximum, or if equality is allowed. + // + // Only relevant if a `max_value` has been defined. Default = false. bool strict_max_enabled = 4 [(google.api.field_behavior) = OPTIONAL]; } @@ -117,11 +123,13 @@ message DataQualityRule { // Evaluates whether each column value is contained by a specified set. message SetExpectation { + // Expected values for the column value. repeated string values = 1; } // Evaluates whether each column value matches a specified regex. message RegexExpectation { + // A regular expression the column value is expected to match. string regex = 1; } @@ -131,6 +139,7 @@ message DataQualityRule { // Evaluates whether the column aggregate statistic lies between a specified // range. message StatisticRangeExpectation { + // The list of aggregate metrics a rule can be evaluated against. enum ColumnStatistic { // Unspecified statistic type STATISTIC_UNDEFINED = 0; @@ -145,45 +154,57 @@ message DataQualityRule { MAX = 3; } + // The aggregate metric to evaluate. ColumnStatistic statistic = 1; // The minimum column statistic value allowed for a row to pass this // validation. - // At least one of min_value and max_value need to be provided. + // + // At least one of `min_value` and `max_value` need to be provided. string min_value = 2; // The maximum column statistic value allowed for a row to pass this // validation. - // At least one of min_value and max_value need to be provided. + // + // At least one of `min_value` and `max_value` need to be provided. string max_value = 3; // Whether column statistic needs to be strictly greater than ('>') - // the minimum, or if equality is allowed. Only relevant if a min_value has - // been defined. Default = false. + // the minimum, or if equality is allowed. + // + // Only relevant if a `min_value` has been defined. Default = false. bool strict_min_enabled = 4; // Whether column statistic needs to be strictly lesser than ('<') the - // maximum, or if equality is allowed. Only relevant if a max_value has been - // defined. Default = false. + // maximum, or if equality is allowed. + // + // Only relevant if a `max_value` has been defined. Default = false. bool strict_max_enabled = 5; } // Evaluates whether each row passes the specified condition. + // // The SQL expression needs to use BigQuery standard SQL syntax and should - // produce a boolean per row as the result. + // produce a boolean value per row as the result. + // // Example: col1 >= 0 AND col2 < 10 message RowConditionExpectation { + // The SQL expression. string sql_expression = 1; } // Evaluates whether the provided expression is true. + // // The SQL expression needs to use BigQuery standard SQL syntax and should // produce a scalar boolean result. + // // Example: MIN(col1) >= 0 message TableConditionExpectation { + // The SQL expression. string sql_expression = 1; } + // The rule-specific configuration. oneof rule_type { // ColumnMap rule which evaluates whether each column value lies between a // specified range. @@ -218,19 +239,21 @@ message DataQualityRule { // Optional. The unnested column which this rule is evaluated against. string column = 500 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Rows with null values will automatically fail a rule, unless - // ignore_null is true. In that case, such null rows are trivially considered - // passing. Only applicable to ColumnMap rules. + // Optional. Rows with `null` values will automatically fail a rule, unless + // `ignore_null` is `true`. In that case, such `null` rows are trivially + // considered passing. + // + // Only applicable to ColumnMap rules. bool ignore_null = 501 [(google.api.field_behavior) = OPTIONAL]; // Required. The dimension a rule belongs to. Results are also aggregated at - // the dimension-level. Supported dimensions are ["COMPLETENESS", "ACCURACY", - // "CONSISTENCY", "VALIDITY", "UNIQUENESS", "INTEGRITY"] + // the dimension level. Supported dimensions are **["COMPLETENESS", + // "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", "INTEGRITY"]** string dimension = 502 [(google.api.field_behavior) = REQUIRED]; - // Optional. The minimum ratio of passing_rows / total_rows required to pass - // this rule, with a range of [0.0, 1.0] + // Optional. The minimum ratio of **passing_rows / total_rows** required to + // pass this rule, with a range of [0.0, 1.0]. // - // 0 indicates default value (i.e. 1.0) + // 0 indicates default value (i.e. 1.0). double threshold = 503 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/datascans.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/datascans.proto index 633023d0b70..78cb037242d 100644 --- a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/datascans.proto +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/datascans.proto @@ -24,7 +24,9 @@ import "google/cloud/dataplex/v1/data_profile.proto"; import "google/cloud/dataplex/v1/data_quality.proto"; import "google/cloud/dataplex/v1/processing.proto"; import "google/cloud/dataplex/v1/resources.proto"; +import "google/cloud/dataplex/v1/service.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; @@ -149,6 +151,10 @@ message CreateDataScanRequest { // * Must be between 1-63 characters. // * Must be unique within the customer project / location. string data_scan_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is `false`. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; } // Update dataScan request. @@ -161,6 +167,10 @@ message UpdateDataScanRequest { // Required. Mask of fields to update. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is `false`. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; } // Delete dataScan request. @@ -220,7 +230,7 @@ message ListDataScansRequest { ]; // Optional. Maximum number of dataScans to return. The service may return - // fewer than this value. If unspecified, at most 10 scans will be returned. + // fewer than this value. If unspecified, at most 500 scans 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]; @@ -288,7 +298,7 @@ message GetDataScanJobRequest { } // Required. The resource name of the DataScanJob: - // `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/dataScanJobs/{data_scan_job_id}` + // `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` // where `project` refers to a *project_id* or *project_number* and // `location_id` refers to a GCP region. string name = 1 [ diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/metadata.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/metadata.proto index 947399d7311..34ce91f21b7 100644 --- a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/metadata.proto +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/metadata.proto @@ -409,8 +409,7 @@ message Entity { // published table name. Specifying a new ID in an update entity // request will override the existing value. // The ID must contain only letters (a-z, A-Z), numbers (0-9), and - // underscores. Must begin with a letter and consist of 256 or fewer - // characters. + // underscores, and consist of 256 or fewer characters. string id = 7 [(google.api.field_behavior) = REQUIRED]; // Optional. The etag associated with the entity, which can be retrieved with @@ -463,6 +462,14 @@ message Entity { CompatibilityStatus compatibility = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Identifies the access mechanism to the entity. Not user + // settable. + StorageAccess access = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. System generated unique ID for the Entity. This ID will be + // different if the Entity is deleted and re-created with the same name. + string uid = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Required. The description of the data structure and layout. // The schema is not included in list responses. It is only included in // `SCHEMA` and `FULL` entity views of a `GetEntity` response. @@ -784,6 +791,25 @@ message StorageFormat { } } +// Describes the access mechanism of the data within its storage location. +message StorageAccess { + // Access Mode determines how data stored within the Entity is read. + enum AccessMode { + // Access mode unspecified. + ACCESS_MODE_UNSPECIFIED = 0; + + // Default. Data is accessed directly using storage APIs. + DIRECT = 1; + + // Data is accessed through a managed interface using BigQuery APIs. + MANAGED = 2; + } + + // Output only. Describes the read access mechanism of the data. Not user + // settable. + AccessMode read = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + // Identifies the cloud system that manages the data storage. enum StorageSystem { // Storage system unspecified. diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/processing.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/processing.proto index 1f652b4eb2b..38381131b8d 100644 --- a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/processing.proto +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/processing.proto @@ -26,27 +26,31 @@ option java_package = "com.google.cloud.dataplex.v1"; // DataScan scheduling and trigger settings. message Trigger { - // The scan runs one-time via RunDataScan API. + // The scan runs once via `RunDataScan` API. message OnDemand {} // The scan is scheduled to run periodically. message Schedule { - // Required. Cron schedule (https://en.wikipedia.org/wiki/Cron) for running + // Required. [Cron](https://en.wikipedia.org/wiki/Cron) schedule for running // scans periodically. - // To explicitly set a timezone to the cron tab, apply a prefix in the - // cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or "TZ=${IANA_TIME_ZONE}". - // The ${IANA_TIME_ZONE} may only be a valid string from IANA time zone - // database. For example, "CRON_TZ=America/New_York 1 * * * *", or - // "TZ=America/New_York 1 * * * *". + // + // To explicitly set a timezone in the cron tab, apply a prefix in the + // cron tab: **"CRON_TZ=${IANA_TIME_ZONE}"** or **"TZ=${IANA_TIME_ZONE}"**. + // The **${IANA_TIME_ZONE}** may only be a valid string from IANA time zone + // database + // ([wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)). + // For example, `CRON_TZ=America/New_York 1 * * * *`, or + // `TZ=America/New_York 1 * * * *`. + // // This field is required for Schedule scans. string cron = 1 [(google.api.field_behavior) = REQUIRED]; } // DataScan scheduling and trigger settings. - // If not specified, the default is OnDemand, which means the scan will not - // run until the user calls RunDataScan API. + // + // If not specified, the default is `onDemand`. oneof mode { - // The scan runs one-time shortly after DataScan Creation. + // The scan runs once via `RunDataScan` API. OnDemand on_demand = 100; // The scan is scheduled to run periodically. @@ -56,11 +60,11 @@ message Trigger { // The data source for DataScan. message DataSource { - // The source is required and immutable which means once entity is set, it - // cannot be change to others, and vice versa. + // The source is required and immutable. Once it is set, it cannot be change + // to others. oneof source { - // Immutable. The dataplex entity that contains the data for DataScan, of - // the form: + // Immutable. The Dataplex entity that represents the data source (e.g. + // BigQuery table) for DataScan, of the form: // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. string entity = 100 [ (google.api.field_behavior) = IMMUTABLE, @@ -68,6 +72,12 @@ message DataSource { type: "dataplex.googleapis.com/Entity" } ]; + + // Immutable. The service-qualified full resource name of the cloud resource + // for a DataScan job to scan against. The field could be: BigQuery table of + // type "TABLE" for DataProfileScan/DataQualityScan Format: + // //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID + string resource = 101 [(google.api.field_behavior) = IMMUTABLE]; } } @@ -76,13 +86,13 @@ message ScannedData { // A data range denoted by a pair of start/end values of a field. message IncrementalField { // The field that contains values which monotonically increases over time - // (e.g. timestamp). + // (e.g. a timestamp column). string field = 1; - // Value that marks the start of the range + // Value that marks the start of the range. string start = 2; - // Value that marks the end of the range + // Value that marks the end of the range. string end = 3; } diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/resources.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/resources.proto index 1e48448007d..d8b74d4a5e3 100644 --- a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/resources.proto +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/resources.proto @@ -254,9 +254,8 @@ message Zone { // discovery every 60 minutes. To explicitly set a timezone to the cron // tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or // TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string - // from IANA time zone database. For example, - // `CRON_TZ=America/New_York 1 * * * *`, - // or `TZ=America/New_York 1 * * * *`. + // from IANA time zone database. For example, `CRON_TZ=America/New_York 1 + // * * * *`, or `TZ=America/New_York 1 * * * *`. string schedule = 10 [(google.api.field_behavior) = OPTIONAL]; } } @@ -601,9 +600,8 @@ message Asset { // discovery every 60 minutes. To explicitly set a timezone to the cron // tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or // TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string - // from IANA time zone database. For example, - // `CRON_TZ=America/New_York 1 * * * *`, - // or `TZ=America/New_York 1 * * * *`. + // from IANA time zone database. For example, `CRON_TZ=America/New_York 1 + // * * * *`, or `TZ=America/New_York 1 * * * *`. string schedule = 10 [(google.api.field_behavior) = OPTIONAL]; } } @@ -622,6 +620,19 @@ message Asset { BIGQUERY_DATASET = 2; } + // Access Mode determines how data stored within the resource is read. This + // is only applicable to storage bucket assets. + enum AccessMode { + // Access mode unspecified. + ACCESS_MODE_UNSPECIFIED = 0; + + // Default. Data is accessed directly using storage APIs. + DIRECT = 1; + + // Data is accessed through a managed interface using BigQuery APIs. + MANAGED = 2; + } + // Immutable. Relative name of the cloud resource that contains the data // that is being managed within a lake. For example: // `projects/{project_number}/buckets/{bucket_id}` @@ -633,6 +644,10 @@ message Asset { (google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = IMMUTABLE ]; + + // Optional. Determines how read permissions are handled for each asset and + // their associated tables. Only available to storage buckets assets. + AccessMode read_access_mode = 5 [(google.api.field_behavior) = OPTIONAL]; } // Status of the resource referenced by an asset. @@ -657,6 +672,10 @@ message Asset { // Last update time of the status. google.protobuf.Timestamp update_time = 3; + + // Output only. Service account associated with the BigQuery Connection. + string managed_access_identity = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Status of discovery for an asset. diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/service.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/service.proto index 39d9ce479a2..3be1b369053 100644 --- a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/service.proto +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/service.proto @@ -294,6 +294,15 @@ service DataplexService { option (google.api.method_signature) = "parent"; } + // Run an on demand execution of a Task. + rpc RunTask(RunTaskRequest) returns (RunTaskResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}:run" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + // Get job resource. rpc GetJob(GetJobRequest) returns (Job) { option (google.api.http) = { @@ -891,6 +900,20 @@ message GetJobRequest { ]; } +message RunTaskRequest { + // Required. The resource name of the task: + // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dataplex.googleapis.com/Task" } + ]; +} + +message RunTaskResponse { + // Jobs created by RunTask API. + Job job = 1; +} + // List jobs request. message ListJobsRequest { // Required. The resource name of the parent environment: diff --git a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/tasks.proto b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/tasks.proto index c5748456a9b..afc71f89c16 100644 --- a/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/tasks.proto +++ b/packages/google-cloud-dataplex/protos/google/cloud/dataplex/v1/tasks.proto @@ -150,9 +150,8 @@ message Task { // tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or // "TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid // string from IANA time zone database. For example, - // `CRON_TZ=America/New_York 1 * * * *`, - // or `TZ=America/New_York 1 * * * *`. - // This field is required for RECURRING tasks. + // `CRON_TZ=America/New_York 1 * * * *`, or `TZ=America/New_York 1 * * * + // *`. This field is required for RECURRING tasks. string schedule = 100 [(google.api.field_behavior) = OPTIONAL]; } } diff --git a/packages/google-cloud-dataplex/protos/protos.d.ts b/packages/google-cloud-dataplex/protos/protos.d.ts index d01df1da55f..a07732558db 100644 --- a/packages/google-cloud-dataplex/protos/protos.d.ts +++ b/packages/google-cloud-dataplex/protos/protos.d.ts @@ -4107,6 +4107,9 @@ export namespace google { /** ResourceSpec type */ type?: (google.cloud.dataplex.v1.Asset.ResourceSpec.Type|keyof typeof google.cloud.dataplex.v1.Asset.ResourceSpec.Type|null); + + /** ResourceSpec readAccessMode */ + readAccessMode?: (google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode|keyof typeof google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode|null); } /** Represents a ResourceSpec. */ @@ -4124,6 +4127,9 @@ export namespace google { /** ResourceSpec type. */ public type: (google.cloud.dataplex.v1.Asset.ResourceSpec.Type|keyof typeof google.cloud.dataplex.v1.Asset.ResourceSpec.Type); + /** ResourceSpec readAccessMode. */ + public readAccessMode: (google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode|keyof typeof google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode); + /** * Creates a new ResourceSpec instance using the specified properties. * @param [properties] Properties to set @@ -4210,6 +4216,13 @@ export namespace google { STORAGE_BUCKET = 1, BIGQUERY_DATASET = 2 } + + /** AccessMode enum. */ + enum AccessMode { + ACCESS_MODE_UNSPECIFIED = 0, + DIRECT = 1, + MANAGED = 2 + } } /** Properties of a ResourceStatus. */ @@ -4223,6 +4236,9 @@ export namespace google { /** ResourceStatus updateTime */ updateTime?: (google.protobuf.ITimestamp|null); + + /** ResourceStatus managedAccessIdentity */ + managedAccessIdentity?: (string|null); } /** Represents a ResourceStatus. */ @@ -4243,6 +4259,9 @@ export namespace google { /** ResourceStatus updateTime. */ public updateTime?: (google.protobuf.ITimestamp|null); + /** ResourceStatus managedAccessIdentity. */ + public managedAccessIdentity: string; + /** * Creates a new ResourceStatus instance using the specified properties. * @param [properties] Properties to set @@ -6743,6 +6762,9 @@ export namespace google { /** DataSource entity */ entity?: (string|null); + + /** DataSource resource */ + resource?: (string|null); } /** Represents a DataSource. */ @@ -6757,8 +6779,11 @@ export namespace google { /** DataSource entity. */ public entity?: (string|null); + /** DataSource resource. */ + public resource?: (string|null); + /** DataSource source. */ - public source?: "entity"; + public source?: ("entity"|"resource"); /** * Creates a new DataSource instance using the specified properties. @@ -8687,6 +8712,9 @@ export namespace google { /** CreateDataScanRequest dataScanId */ dataScanId?: (string|null); + + /** CreateDataScanRequest validateOnly */ + validateOnly?: (boolean|null); } /** Represents a CreateDataScanRequest. */ @@ -8707,6 +8735,9 @@ export namespace google { /** CreateDataScanRequest dataScanId. */ public dataScanId: string; + /** CreateDataScanRequest validateOnly. */ + public validateOnly: boolean; + /** * Creates a new CreateDataScanRequest instance using the specified properties. * @param [properties] Properties to set @@ -8793,6 +8824,9 @@ export namespace google { /** UpdateDataScanRequest updateMask */ updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateDataScanRequest validateOnly */ + validateOnly?: (boolean|null); } /** Represents an UpdateDataScanRequest. */ @@ -8810,6 +8844,9 @@ export namespace google { /** UpdateDataScanRequest updateMask. */ public updateMask?: (google.protobuf.IFieldMask|null); + /** UpdateDataScanRequest validateOnly. */ + public validateOnly: boolean; + /** * Creates a new UpdateDataScanRequest instance using the specified properties. * @param [properties] Properties to set @@ -10436,10742 +10473,11076 @@ export namespace google { DATA_PROFILE = 2 } - /** Properties of a DiscoveryEvent. */ - interface IDiscoveryEvent { - - /** DiscoveryEvent message */ - message?: (string|null); - - /** DiscoveryEvent lakeId */ - lakeId?: (string|null); - - /** DiscoveryEvent zoneId */ - zoneId?: (string|null); - - /** DiscoveryEvent assetId */ - assetId?: (string|null); - - /** DiscoveryEvent dataLocation */ - dataLocation?: (string|null); - - /** DiscoveryEvent type */ - type?: (google.cloud.dataplex.v1.DiscoveryEvent.EventType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EventType|null); - - /** DiscoveryEvent config */ - config?: (google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null); - - /** DiscoveryEvent entity */ - entity?: (google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null); + /** Represents a DataplexService */ + class DataplexService extends $protobuf.rpc.Service { - /** DiscoveryEvent partition */ - partition?: (google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null); + /** + * Constructs a new DataplexService 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); - /** DiscoveryEvent action */ - action?: (google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null); - } + /** + * Creates new DataplexService 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): DataplexService; - /** Represents a DiscoveryEvent. */ - class DiscoveryEvent implements IDiscoveryEvent { + /** + * Calls CreateLake. + * @param request CreateLakeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createLake(request: google.cloud.dataplex.v1.ICreateLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateLakeCallback): void; /** - * Constructs a new DiscoveryEvent. - * @param [properties] Properties to set + * Calls CreateLake. + * @param request CreateLakeRequest message or plain object + * @returns Promise */ - constructor(properties?: google.cloud.dataplex.v1.IDiscoveryEvent); + public createLake(request: google.cloud.dataplex.v1.ICreateLakeRequest): Promise; - /** DiscoveryEvent message. */ - public message: string; + /** + * Calls UpdateLake. + * @param request UpdateLakeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateLake(request: google.cloud.dataplex.v1.IUpdateLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateLakeCallback): void; - /** DiscoveryEvent lakeId. */ - public lakeId: string; + /** + * Calls UpdateLake. + * @param request UpdateLakeRequest message or plain object + * @returns Promise + */ + public updateLake(request: google.cloud.dataplex.v1.IUpdateLakeRequest): Promise; - /** DiscoveryEvent zoneId. */ - public zoneId: string; + /** + * Calls DeleteLake. + * @param request DeleteLakeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteLake(request: google.cloud.dataplex.v1.IDeleteLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteLakeCallback): void; - /** DiscoveryEvent assetId. */ - public assetId: string; + /** + * Calls DeleteLake. + * @param request DeleteLakeRequest message or plain object + * @returns Promise + */ + public deleteLake(request: google.cloud.dataplex.v1.IDeleteLakeRequest): Promise; - /** DiscoveryEvent dataLocation. */ - public dataLocation: string; + /** + * Calls ListLakes. + * @param request ListLakesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListLakesResponse + */ + public listLakes(request: google.cloud.dataplex.v1.IListLakesRequest, callback: google.cloud.dataplex.v1.DataplexService.ListLakesCallback): void; - /** DiscoveryEvent type. */ - public type: (google.cloud.dataplex.v1.DiscoveryEvent.EventType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EventType); + /** + * Calls ListLakes. + * @param request ListLakesRequest message or plain object + * @returns Promise + */ + public listLakes(request: google.cloud.dataplex.v1.IListLakesRequest): Promise; - /** DiscoveryEvent config. */ - public config?: (google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null); + /** + * Calls GetLake. + * @param request GetLakeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Lake + */ + public getLake(request: google.cloud.dataplex.v1.IGetLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.GetLakeCallback): void; - /** DiscoveryEvent entity. */ - public entity?: (google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null); + /** + * Calls GetLake. + * @param request GetLakeRequest message or plain object + * @returns Promise + */ + public getLake(request: google.cloud.dataplex.v1.IGetLakeRequest): Promise; - /** DiscoveryEvent partition. */ - public partition?: (google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null); + /** + * Calls ListLakeActions. + * @param request ListLakeActionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListActionsResponse + */ + public listLakeActions(request: google.cloud.dataplex.v1.IListLakeActionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListLakeActionsCallback): void; - /** DiscoveryEvent action. */ - public action?: (google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null); + /** + * Calls ListLakeActions. + * @param request ListLakeActionsRequest message or plain object + * @returns Promise + */ + public listLakeActions(request: google.cloud.dataplex.v1.IListLakeActionsRequest): Promise; - /** DiscoveryEvent details. */ - public details?: ("config"|"entity"|"partition"|"action"); + /** + * Calls CreateZone. + * @param request CreateZoneRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createZone(request: google.cloud.dataplex.v1.ICreateZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateZoneCallback): void; /** - * Creates a new DiscoveryEvent instance using the specified properties. - * @param [properties] Properties to set - * @returns DiscoveryEvent instance + * Calls CreateZone. + * @param request CreateZoneRequest message or plain object + * @returns Promise */ - public static create(properties?: google.cloud.dataplex.v1.IDiscoveryEvent): google.cloud.dataplex.v1.DiscoveryEvent; + public createZone(request: google.cloud.dataplex.v1.ICreateZoneRequest): Promise; /** - * Encodes the specified DiscoveryEvent message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. - * @param message DiscoveryEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls UpdateZone. + * @param request UpdateZoneRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static encode(message: google.cloud.dataplex.v1.IDiscoveryEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public updateZone(request: google.cloud.dataplex.v1.IUpdateZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateZoneCallback): void; /** - * Encodes the specified DiscoveryEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. - * @param message DiscoveryEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls UpdateZone. + * @param request UpdateZoneRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDiscoveryEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public updateZone(request: google.cloud.dataplex.v1.IUpdateZoneRequest): Promise; /** - * Decodes a DiscoveryEvent message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DiscoveryEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteZone. + * @param request DeleteZoneRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent; + public deleteZone(request: google.cloud.dataplex.v1.IDeleteZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteZoneCallback): void; /** - * Decodes a DiscoveryEvent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DiscoveryEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteZone. + * @param request DeleteZoneRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent; + public deleteZone(request: google.cloud.dataplex.v1.IDeleteZoneRequest): Promise; /** - * Verifies a DiscoveryEvent message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls ListZones. + * @param request ListZonesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListZonesResponse */ - public static verify(message: { [k: string]: any }): (string|null); + public listZones(request: google.cloud.dataplex.v1.IListZonesRequest, callback: google.cloud.dataplex.v1.DataplexService.ListZonesCallback): void; /** - * Creates a DiscoveryEvent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DiscoveryEvent + * Calls ListZones. + * @param request ListZonesRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent; + public listZones(request: google.cloud.dataplex.v1.IListZonesRequest): Promise; /** - * Creates a plain object from a DiscoveryEvent message. Also converts values to other types if specified. - * @param message DiscoveryEvent - * @param [options] Conversion options - * @returns Plain object + * Calls GetZone. + * @param request GetZoneRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Zone */ - public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public getZone(request: google.cloud.dataplex.v1.IGetZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.GetZoneCallback): void; /** - * Converts this DiscoveryEvent to JSON. - * @returns JSON object + * Calls GetZone. + * @param request GetZoneRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; + public getZone(request: google.cloud.dataplex.v1.IGetZoneRequest): Promise; /** - * Gets the default type url for DiscoveryEvent - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Calls ListZoneActions. + * @param request ListZoneActionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListActionsResponse */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + public listZoneActions(request: google.cloud.dataplex.v1.IListZoneActionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListZoneActionsCallback): void; - namespace DiscoveryEvent { - - /** EventType enum. */ - enum EventType { - EVENT_TYPE_UNSPECIFIED = 0, - CONFIG = 1, - ENTITY_CREATED = 2, - ENTITY_UPDATED = 3, - ENTITY_DELETED = 4, - PARTITION_CREATED = 5, - PARTITION_UPDATED = 6, - PARTITION_DELETED = 7 - } + /** + * Calls ListZoneActions. + * @param request ListZoneActionsRequest message or plain object + * @returns Promise + */ + public listZoneActions(request: google.cloud.dataplex.v1.IListZoneActionsRequest): Promise; - /** EntityType enum. */ - enum EntityType { - ENTITY_TYPE_UNSPECIFIED = 0, - TABLE = 1, - FILESET = 2 - } + /** + * Calls CreateAsset. + * @param request CreateAssetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createAsset(request: google.cloud.dataplex.v1.ICreateAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateAssetCallback): void; - /** Properties of a ConfigDetails. */ - interface IConfigDetails { + /** + * Calls CreateAsset. + * @param request CreateAssetRequest message or plain object + * @returns Promise + */ + public createAsset(request: google.cloud.dataplex.v1.ICreateAssetRequest): Promise; - /** ConfigDetails parameters */ - parameters?: ({ [k: string]: string }|null); - } + /** + * Calls UpdateAsset. + * @param request UpdateAssetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateAsset(request: google.cloud.dataplex.v1.IUpdateAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateAssetCallback): void; - /** Represents a ConfigDetails. */ - class ConfigDetails implements IConfigDetails { + /** + * Calls UpdateAsset. + * @param request UpdateAssetRequest message or plain object + * @returns Promise + */ + public updateAsset(request: google.cloud.dataplex.v1.IUpdateAssetRequest): Promise; - /** - * Constructs a new ConfigDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails); + /** + * Calls DeleteAsset. + * @param request DeleteAssetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteAsset(request: google.cloud.dataplex.v1.IDeleteAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteAssetCallback): void; - /** ConfigDetails parameters. */ - public parameters: { [k: string]: string }; + /** + * Calls DeleteAsset. + * @param request DeleteAssetRequest message or plain object + * @returns Promise + */ + public deleteAsset(request: google.cloud.dataplex.v1.IDeleteAssetRequest): Promise; - /** - * Creates a new ConfigDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns ConfigDetails instance - */ - public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails): google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails; + /** + * Calls ListAssets. + * @param request ListAssetsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAssetsResponse + */ + public listAssets(request: google.cloud.dataplex.v1.IListAssetsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListAssetsCallback): void; - /** - * Encodes the specified ConfigDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. - * @param message ConfigDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Calls ListAssets. + * @param request ListAssetsRequest message or plain object + * @returns Promise + */ + public listAssets(request: google.cloud.dataplex.v1.IListAssetsRequest): Promise; - /** - * Encodes the specified ConfigDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. - * @param message ConfigDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Calls GetAsset. + * @param request GetAssetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Asset + */ + public getAsset(request: google.cloud.dataplex.v1.IGetAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.GetAssetCallback): void; - /** - * Decodes a ConfigDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConfigDetails - * @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.dataplex.v1.DiscoveryEvent.ConfigDetails; + /** + * Calls GetAsset. + * @param request GetAssetRequest message or plain object + * @returns Promise + */ + public getAsset(request: google.cloud.dataplex.v1.IGetAssetRequest): Promise; - /** - * Decodes a ConfigDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConfigDetails - * @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.dataplex.v1.DiscoveryEvent.ConfigDetails; + /** + * Calls ListAssetActions. + * @param request ListAssetActionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListActionsResponse + */ + public listAssetActions(request: google.cloud.dataplex.v1.IListAssetActionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListAssetActionsCallback): void; - /** - * Verifies a ConfigDetails 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); + /** + * Calls ListAssetActions. + * @param request ListAssetActionsRequest message or plain object + * @returns Promise + */ + public listAssetActions(request: google.cloud.dataplex.v1.IListAssetActionsRequest): Promise; - /** - * Creates a ConfigDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConfigDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails; + /** + * Calls CreateTask. + * @param request CreateTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createTask(request: google.cloud.dataplex.v1.ICreateTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateTaskCallback): void; - /** - * Creates a plain object from a ConfigDetails message. Also converts values to other types if specified. - * @param message ConfigDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Calls CreateTask. + * @param request CreateTaskRequest message or plain object + * @returns Promise + */ + public createTask(request: google.cloud.dataplex.v1.ICreateTaskRequest): Promise; - /** - * Converts this ConfigDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Calls UpdateTask. + * @param request UpdateTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateTask(request: google.cloud.dataplex.v1.IUpdateTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateTaskCallback): void; - /** - * Gets the default type url for ConfigDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Calls UpdateTask. + * @param request UpdateTaskRequest message or plain object + * @returns Promise + */ + public updateTask(request: google.cloud.dataplex.v1.IUpdateTaskRequest): Promise; - /** Properties of an EntityDetails. */ - interface IEntityDetails { + /** + * Calls DeleteTask. + * @param request DeleteTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteTask(request: google.cloud.dataplex.v1.IDeleteTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteTaskCallback): void; - /** EntityDetails entity */ - entity?: (string|null); + /** + * Calls DeleteTask. + * @param request DeleteTaskRequest message or plain object + * @returns Promise + */ + public deleteTask(request: google.cloud.dataplex.v1.IDeleteTaskRequest): Promise; - /** EntityDetails type */ - type?: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null); - } + /** + * Calls ListTasks. + * @param request ListTasksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListTasksResponse + */ + public listTasks(request: google.cloud.dataplex.v1.IListTasksRequest, callback: google.cloud.dataplex.v1.DataplexService.ListTasksCallback): void; - /** Represents an EntityDetails. */ - class EntityDetails implements IEntityDetails { + /** + * Calls ListTasks. + * @param request ListTasksRequest message or plain object + * @returns Promise + */ + public listTasks(request: google.cloud.dataplex.v1.IListTasksRequest): Promise; - /** - * Constructs a new EntityDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails); + /** + * Calls GetTask. + * @param request GetTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Task + */ + public getTask(request: google.cloud.dataplex.v1.IGetTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.GetTaskCallback): void; - /** EntityDetails entity. */ - public entity: string; + /** + * Calls GetTask. + * @param request GetTaskRequest message or plain object + * @returns Promise + */ + public getTask(request: google.cloud.dataplex.v1.IGetTaskRequest): Promise; - /** EntityDetails type. */ - public type: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType); + /** + * Calls ListJobs. + * @param request ListJobsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListJobsResponse + */ + public listJobs(request: google.cloud.dataplex.v1.IListJobsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListJobsCallback): void; - /** - * Creates a new EntityDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns EntityDetails instance - */ - public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails): google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails; + /** + * Calls ListJobs. + * @param request ListJobsRequest message or plain object + * @returns Promise + */ + public listJobs(request: google.cloud.dataplex.v1.IListJobsRequest): Promise; - /** - * Encodes the specified EntityDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. - * @param message EntityDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Calls RunTask. + * @param request RunTaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RunTaskResponse + */ + public runTask(request: google.cloud.dataplex.v1.IRunTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.RunTaskCallback): void; - /** - * Encodes the specified EntityDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. - * @param message EntityDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Calls RunTask. + * @param request RunTaskRequest message or plain object + * @returns Promise + */ + public runTask(request: google.cloud.dataplex.v1.IRunTaskRequest): Promise; - /** - * Decodes an EntityDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EntityDetails - * @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.dataplex.v1.DiscoveryEvent.EntityDetails; + /** + * Calls GetJob. + * @param request GetJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Job + */ + public getJob(request: google.cloud.dataplex.v1.IGetJobRequest, callback: google.cloud.dataplex.v1.DataplexService.GetJobCallback): void; - /** - * Decodes an EntityDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EntityDetails - * @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.dataplex.v1.DiscoveryEvent.EntityDetails; + /** + * Calls GetJob. + * @param request GetJobRequest message or plain object + * @returns Promise + */ + public getJob(request: google.cloud.dataplex.v1.IGetJobRequest): Promise; - /** - * Verifies an EntityDetails 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); + /** + * Calls CancelJob. + * @param request CancelJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelJob(request: google.cloud.dataplex.v1.ICancelJobRequest, callback: google.cloud.dataplex.v1.DataplexService.CancelJobCallback): void; - /** - * Creates an EntityDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EntityDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails; + /** + * Calls CancelJob. + * @param request CancelJobRequest message or plain object + * @returns Promise + */ + public cancelJob(request: google.cloud.dataplex.v1.ICancelJobRequest): Promise; - /** - * Creates a plain object from an EntityDetails message. Also converts values to other types if specified. - * @param message EntityDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Calls CreateEnvironment. + * @param request CreateEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createEnvironment(request: google.cloud.dataplex.v1.ICreateEnvironmentRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateEnvironmentCallback): void; - /** - * Converts this EntityDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Calls CreateEnvironment. + * @param request CreateEnvironmentRequest message or plain object + * @returns Promise + */ + public createEnvironment(request: google.cloud.dataplex.v1.ICreateEnvironmentRequest): Promise; - /** - * Gets the default type url for EntityDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Calls UpdateEnvironment. + * @param request UpdateEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateEnvironment(request: google.cloud.dataplex.v1.IUpdateEnvironmentRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateEnvironmentCallback): void; - /** Properties of a PartitionDetails. */ - interface IPartitionDetails { + /** + * Calls UpdateEnvironment. + * @param request UpdateEnvironmentRequest message or plain object + * @returns Promise + */ + public updateEnvironment(request: google.cloud.dataplex.v1.IUpdateEnvironmentRequest): Promise; - /** PartitionDetails partition */ - partition?: (string|null); + /** + * Calls DeleteEnvironment. + * @param request DeleteEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteEnvironment(request: google.cloud.dataplex.v1.IDeleteEnvironmentRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteEnvironmentCallback): void; - /** PartitionDetails entity */ - entity?: (string|null); + /** + * Calls DeleteEnvironment. + * @param request DeleteEnvironmentRequest message or plain object + * @returns Promise + */ + public deleteEnvironment(request: google.cloud.dataplex.v1.IDeleteEnvironmentRequest): Promise; - /** PartitionDetails type */ - type?: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null); + /** + * Calls ListEnvironments. + * @param request ListEnvironmentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListEnvironmentsResponse + */ + public listEnvironments(request: google.cloud.dataplex.v1.IListEnvironmentsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListEnvironmentsCallback): void; - /** PartitionDetails sampledDataLocations */ - sampledDataLocations?: (string[]|null); - } + /** + * Calls ListEnvironments. + * @param request ListEnvironmentsRequest message or plain object + * @returns Promise + */ + public listEnvironments(request: google.cloud.dataplex.v1.IListEnvironmentsRequest): Promise; - /** Represents a PartitionDetails. */ - class PartitionDetails implements IPartitionDetails { + /** + * Calls GetEnvironment. + * @param request GetEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Environment + */ + public getEnvironment(request: google.cloud.dataplex.v1.IGetEnvironmentRequest, callback: google.cloud.dataplex.v1.DataplexService.GetEnvironmentCallback): void; - /** - * Constructs a new PartitionDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails); + /** + * Calls GetEnvironment. + * @param request GetEnvironmentRequest message or plain object + * @returns Promise + */ + public getEnvironment(request: google.cloud.dataplex.v1.IGetEnvironmentRequest): Promise; - /** PartitionDetails partition. */ - public partition: string; + /** + * Calls ListSessions. + * @param request ListSessionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListSessionsResponse + */ + public listSessions(request: google.cloud.dataplex.v1.IListSessionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListSessionsCallback): void; - /** PartitionDetails entity. */ - public entity: string; + /** + * Calls ListSessions. + * @param request ListSessionsRequest message or plain object + * @returns Promise + */ + public listSessions(request: google.cloud.dataplex.v1.IListSessionsRequest): Promise; + } - /** PartitionDetails type. */ - public type: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType); + namespace DataplexService { - /** PartitionDetails sampledDataLocations. */ - public sampledDataLocations: string[]; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createLake}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateLakeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** - * Creates a new PartitionDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns PartitionDetails instance - */ - public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails): google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateLake}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateLakeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** - * Encodes the specified PartitionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. - * @param message PartitionDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteLake}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteLakeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** - * Encodes the specified PartitionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. - * @param message PartitionDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listLakes}. + * @param error Error, if any + * @param [response] ListLakesResponse + */ + type ListLakesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListLakesResponse) => void; - /** - * Decodes a PartitionDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PartitionDetails - * @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.dataplex.v1.DiscoveryEvent.PartitionDetails; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getLake}. + * @param error Error, if any + * @param [response] Lake + */ + type GetLakeCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Lake) => void; - /** - * Decodes a PartitionDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PartitionDetails - * @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.dataplex.v1.DiscoveryEvent.PartitionDetails; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listLakeActions}. + * @param error Error, if any + * @param [response] ListActionsResponse + */ + type ListLakeActionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListActionsResponse) => void; - /** - * Verifies a PartitionDetails 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); + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createZone}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateZoneCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** - * Creates a PartitionDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PartitionDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateZone}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateZoneCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** - * Creates a plain object from a PartitionDetails message. Also converts values to other types if specified. - * @param message PartitionDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteZone}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteZoneCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** - * Converts this PartitionDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listZones}. + * @param error Error, if any + * @param [response] ListZonesResponse + */ + type ListZonesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListZonesResponse) => void; - /** - * Gets the default type url for PartitionDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getZone}. + * @param error Error, if any + * @param [response] Zone + */ + type GetZoneCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Zone) => void; - /** Properties of an ActionDetails. */ - interface IActionDetails { + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listZoneActions}. + * @param error Error, if any + * @param [response] ListActionsResponse + */ + type ListZoneActionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListActionsResponse) => void; - /** ActionDetails type */ - type?: (string|null); - } + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createAsset}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateAssetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** Represents an ActionDetails. */ - class ActionDetails implements IActionDetails { + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateAsset}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateAssetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** - * Constructs a new ActionDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails); + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteAsset}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteAssetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** ActionDetails type. */ - public type: string; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listAssets}. + * @param error Error, if any + * @param [response] ListAssetsResponse + */ + type ListAssetsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListAssetsResponse) => void; - /** - * Creates a new ActionDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns ActionDetails instance - */ - public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails): google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getAsset}. + * @param error Error, if any + * @param [response] Asset + */ + type GetAssetCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Asset) => void; - /** - * Encodes the specified ActionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. - * @param message ActionDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listAssetActions}. + * @param error Error, if any + * @param [response] ListActionsResponse + */ + type ListAssetActionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListActionsResponse) => void; - /** - * Encodes the specified ActionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. - * @param message ActionDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createTask}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateTaskCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** - * Decodes an ActionDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActionDetails - * @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.dataplex.v1.DiscoveryEvent.ActionDetails; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateTask}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateTaskCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** - * Decodes an ActionDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActionDetails - * @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.dataplex.v1.DiscoveryEvent.ActionDetails; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteTask}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteTaskCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** - * Verifies an ActionDetails 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); + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listTasks}. + * @param error Error, if any + * @param [response] ListTasksResponse + */ + type ListTasksCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListTasksResponse) => void; - /** - * Creates an ActionDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActionDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getTask}. + * @param error Error, if any + * @param [response] Task + */ + type GetTaskCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Task) => void; - /** - * Creates a plain object from an ActionDetails message. Also converts values to other types if specified. - * @param message ActionDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listJobs}. + * @param error Error, if any + * @param [response] ListJobsResponse + */ + type ListJobsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListJobsResponse) => void; - /** - * Converts this ActionDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|runTask}. + * @param error Error, if any + * @param [response] RunTaskResponse + */ + type RunTaskCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.RunTaskResponse) => void; - /** - * Gets the default type url for ActionDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getJob}. + * @param error Error, if any + * @param [response] Job + */ + type GetJobCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Job) => void; - /** Properties of a JobEvent. */ - interface IJobEvent { + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|cancelJob}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelJobCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createEnvironment}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateEnvironment}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** JobEvent message */ - message?: (string|null); + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteEnvironment}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** JobEvent jobId */ - jobId?: (string|null); + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listEnvironments}. + * @param error Error, if any + * @param [response] ListEnvironmentsResponse + */ + type ListEnvironmentsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListEnvironmentsResponse) => void; - /** JobEvent startTime */ - startTime?: (google.protobuf.ITimestamp|null); + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getEnvironment}. + * @param error Error, if any + * @param [response] Environment + */ + type GetEnvironmentCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Environment) => void; - /** JobEvent endTime */ - endTime?: (google.protobuf.ITimestamp|null); + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listSessions}. + * @param error Error, if any + * @param [response] ListSessionsResponse + */ + type ListSessionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListSessionsResponse) => void; + } - /** JobEvent state */ - state?: (google.cloud.dataplex.v1.JobEvent.State|keyof typeof google.cloud.dataplex.v1.JobEvent.State|null); + /** Properties of a CreateLakeRequest. */ + interface ICreateLakeRequest { - /** JobEvent retries */ - retries?: (number|null); + /** CreateLakeRequest parent */ + parent?: (string|null); - /** JobEvent type */ - type?: (google.cloud.dataplex.v1.JobEvent.Type|keyof typeof google.cloud.dataplex.v1.JobEvent.Type|null); + /** CreateLakeRequest lakeId */ + lakeId?: (string|null); - /** JobEvent service */ - service?: (google.cloud.dataplex.v1.JobEvent.Service|keyof typeof google.cloud.dataplex.v1.JobEvent.Service|null); + /** CreateLakeRequest lake */ + lake?: (google.cloud.dataplex.v1.ILake|null); - /** JobEvent serviceJob */ - serviceJob?: (string|null); + /** CreateLakeRequest validateOnly */ + validateOnly?: (boolean|null); } - /** Represents a JobEvent. */ - class JobEvent implements IJobEvent { + /** Represents a CreateLakeRequest. */ + class CreateLakeRequest implements ICreateLakeRequest { /** - * Constructs a new JobEvent. + * Constructs a new CreateLakeRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IJobEvent); - - /** JobEvent message. */ - public message: string; - - /** JobEvent jobId. */ - public jobId: string; - - /** JobEvent startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** JobEvent endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** JobEvent state. */ - public state: (google.cloud.dataplex.v1.JobEvent.State|keyof typeof google.cloud.dataplex.v1.JobEvent.State); + constructor(properties?: google.cloud.dataplex.v1.ICreateLakeRequest); - /** JobEvent retries. */ - public retries: number; + /** CreateLakeRequest parent. */ + public parent: string; - /** JobEvent type. */ - public type: (google.cloud.dataplex.v1.JobEvent.Type|keyof typeof google.cloud.dataplex.v1.JobEvent.Type); + /** CreateLakeRequest lakeId. */ + public lakeId: string; - /** JobEvent service. */ - public service: (google.cloud.dataplex.v1.JobEvent.Service|keyof typeof google.cloud.dataplex.v1.JobEvent.Service); + /** CreateLakeRequest lake. */ + public lake?: (google.cloud.dataplex.v1.ILake|null); - /** JobEvent serviceJob. */ - public serviceJob: string; + /** CreateLakeRequest validateOnly. */ + public validateOnly: boolean; /** - * Creates a new JobEvent instance using the specified properties. + * Creates a new CreateLakeRequest instance using the specified properties. * @param [properties] Properties to set - * @returns JobEvent instance + * @returns CreateLakeRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IJobEvent): google.cloud.dataplex.v1.JobEvent; + public static create(properties?: google.cloud.dataplex.v1.ICreateLakeRequest): google.cloud.dataplex.v1.CreateLakeRequest; /** - * Encodes the specified JobEvent message. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. - * @param message JobEvent message or plain object to encode + * Encodes the specified CreateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. + * @param message CreateLakeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IJobEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.ICreateLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified JobEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. - * @param message JobEvent message or plain object to encode + * Encodes the specified CreateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. + * @param message CreateLakeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IJobEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a JobEvent message from the specified reader or buffer. + * Decodes a CreateLakeRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns JobEvent + * @returns CreateLakeRequest * @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.dataplex.v1.JobEvent; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateLakeRequest; /** - * Decodes a JobEvent message from the specified reader or buffer, length delimited. + * Decodes a CreateLakeRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns JobEvent + * @returns CreateLakeRequest * @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.dataplex.v1.JobEvent; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateLakeRequest; /** - * Verifies a JobEvent message. + * Verifies a CreateLakeRequest 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 JobEvent message from a plain object. Also converts values to their respective internal types. + * Creates a CreateLakeRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns JobEvent + * @returns CreateLakeRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.JobEvent; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateLakeRequest; /** - * Creates a plain object from a JobEvent message. Also converts values to other types if specified. - * @param message JobEvent + * Creates a plain object from a CreateLakeRequest message. Also converts values to other types if specified. + * @param message CreateLakeRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.JobEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.CreateLakeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this JobEvent to JSON. + * Converts this CreateLakeRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for JobEvent + * Gets the default type url for CreateLakeRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace JobEvent { - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - SPARK = 1, - NOTEBOOK = 2 - } - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - SUCCEEDED = 1, - FAILED = 2, - CANCELLED = 3, - ABORTED = 4 - } - - /** Service enum. */ - enum Service { - SERVICE_UNSPECIFIED = 0, - DATAPROC = 1 - } - } - - /** Properties of a SessionEvent. */ - interface ISessionEvent { - - /** SessionEvent message */ - message?: (string|null); - - /** SessionEvent userId */ - userId?: (string|null); - - /** SessionEvent sessionId */ - sessionId?: (string|null); - - /** SessionEvent type */ - type?: (google.cloud.dataplex.v1.SessionEvent.EventType|keyof typeof google.cloud.dataplex.v1.SessionEvent.EventType|null); - - /** SessionEvent query */ - query?: (google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null); + /** Properties of an UpdateLakeRequest. */ + interface IUpdateLakeRequest { - /** SessionEvent eventSucceeded */ - eventSucceeded?: (boolean|null); + /** UpdateLakeRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); - /** SessionEvent fastStartupEnabled */ - fastStartupEnabled?: (boolean|null); + /** UpdateLakeRequest lake */ + lake?: (google.cloud.dataplex.v1.ILake|null); - /** SessionEvent unassignedDuration */ - unassignedDuration?: (google.protobuf.IDuration|null); + /** UpdateLakeRequest validateOnly */ + validateOnly?: (boolean|null); } - /** Represents a SessionEvent. */ - class SessionEvent implements ISessionEvent { + /** Represents an UpdateLakeRequest. */ + class UpdateLakeRequest implements IUpdateLakeRequest { /** - * Constructs a new SessionEvent. + * Constructs a new UpdateLakeRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.ISessionEvent); - - /** SessionEvent message. */ - public message: string; - - /** SessionEvent userId. */ - public userId: string; - - /** SessionEvent sessionId. */ - public sessionId: string; - - /** SessionEvent type. */ - public type: (google.cloud.dataplex.v1.SessionEvent.EventType|keyof typeof google.cloud.dataplex.v1.SessionEvent.EventType); - - /** SessionEvent query. */ - public query?: (google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null); - - /** SessionEvent eventSucceeded. */ - public eventSucceeded: boolean; + constructor(properties?: google.cloud.dataplex.v1.IUpdateLakeRequest); - /** SessionEvent fastStartupEnabled. */ - public fastStartupEnabled: boolean; + /** UpdateLakeRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** SessionEvent unassignedDuration. */ - public unassignedDuration?: (google.protobuf.IDuration|null); + /** UpdateLakeRequest lake. */ + public lake?: (google.cloud.dataplex.v1.ILake|null); - /** SessionEvent detail. */ - public detail?: "query"; + /** UpdateLakeRequest validateOnly. */ + public validateOnly: boolean; /** - * Creates a new SessionEvent instance using the specified properties. + * Creates a new UpdateLakeRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SessionEvent instance + * @returns UpdateLakeRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.ISessionEvent): google.cloud.dataplex.v1.SessionEvent; + public static create(properties?: google.cloud.dataplex.v1.IUpdateLakeRequest): google.cloud.dataplex.v1.UpdateLakeRequest; /** - * Encodes the specified SessionEvent message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. - * @param message SessionEvent message or plain object to encode + * Encodes the specified UpdateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. + * @param message UpdateLakeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.ISessionEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IUpdateLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SessionEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. - * @param message SessionEvent message or plain object to encode + * Encodes the specified UpdateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. + * @param message UpdateLakeRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ISessionEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SessionEvent message from the specified reader or buffer. + * Decodes an UpdateLakeRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SessionEvent + * @returns UpdateLakeRequest * @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.dataplex.v1.SessionEvent; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateLakeRequest; /** - * Decodes a SessionEvent message from the specified reader or buffer, length delimited. + * Decodes an UpdateLakeRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SessionEvent + * @returns UpdateLakeRequest * @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.dataplex.v1.SessionEvent; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateLakeRequest; /** - * Verifies a SessionEvent message. + * Verifies an UpdateLakeRequest 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 SessionEvent message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateLakeRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SessionEvent + * @returns UpdateLakeRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.SessionEvent; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateLakeRequest; /** - * Creates a plain object from a SessionEvent message. Also converts values to other types if specified. - * @param message SessionEvent + * Creates a plain object from an UpdateLakeRequest message. Also converts values to other types if specified. + * @param message UpdateLakeRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.SessionEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.UpdateLakeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SessionEvent to JSON. + * Converts this UpdateLakeRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SessionEvent + * Gets the default type url for UpdateLakeRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace SessionEvent { - - /** EventType enum. */ - enum EventType { - EVENT_TYPE_UNSPECIFIED = 0, - START = 1, - STOP = 2, - QUERY = 3, - CREATE = 4 - } - - /** Properties of a QueryDetail. */ - interface IQueryDetail { - - /** QueryDetail queryId */ - queryId?: (string|null); - - /** QueryDetail queryText */ - queryText?: (string|null); - - /** QueryDetail engine */ - engine?: (google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|keyof typeof google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|null); - - /** QueryDetail duration */ - duration?: (google.protobuf.IDuration|null); - - /** QueryDetail resultSizeBytes */ - resultSizeBytes?: (number|Long|string|null); - - /** QueryDetail dataProcessedBytes */ - dataProcessedBytes?: (number|Long|string|null); - } - - /** Represents a QueryDetail. */ - class QueryDetail implements IQueryDetail { - - /** - * Constructs a new QueryDetail. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.SessionEvent.IQueryDetail); - - /** QueryDetail queryId. */ - public queryId: string; - - /** QueryDetail queryText. */ - public queryText: string; - - /** QueryDetail engine. */ - public engine: (google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|keyof typeof google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine); - - /** QueryDetail duration. */ - public duration?: (google.protobuf.IDuration|null); - - /** QueryDetail resultSizeBytes. */ - public resultSizeBytes: (number|Long|string); - - /** QueryDetail dataProcessedBytes. */ - public dataProcessedBytes: (number|Long|string); - - /** - * Creates a new QueryDetail instance using the specified properties. - * @param [properties] Properties to set - * @returns QueryDetail instance - */ - public static create(properties?: google.cloud.dataplex.v1.SessionEvent.IQueryDetail): google.cloud.dataplex.v1.SessionEvent.QueryDetail; - - /** - * Encodes the specified QueryDetail message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. - * @param message QueryDetail message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.SessionEvent.IQueryDetail, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryDetail message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. - * @param message QueryDetail message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.SessionEvent.IQueryDetail, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryDetail message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryDetail - * @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.dataplex.v1.SessionEvent.QueryDetail; - - /** - * Decodes a QueryDetail message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryDetail - * @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.dataplex.v1.SessionEvent.QueryDetail; - - /** - * Verifies a QueryDetail 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 QueryDetail message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryDetail - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.SessionEvent.QueryDetail; - - /** - * Creates a plain object from a QueryDetail message. Also converts values to other types if specified. - * @param message QueryDetail - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.SessionEvent.QueryDetail, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryDetail to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for QueryDetail - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace QueryDetail { + /** Properties of a DeleteLakeRequest. */ + interface IDeleteLakeRequest { - /** Engine enum. */ - enum Engine { - ENGINE_UNSPECIFIED = 0, - SPARK_SQL = 1, - BIGQUERY = 2 - } - } + /** DeleteLakeRequest name */ + name?: (string|null); } - /** Properties of a DataScanEvent. */ - interface IDataScanEvent { - - /** DataScanEvent dataSource */ - dataSource?: (string|null); - - /** DataScanEvent jobId */ - jobId?: (string|null); + /** Represents a DeleteLakeRequest. */ + class DeleteLakeRequest implements IDeleteLakeRequest { - /** DataScanEvent startTime */ - startTime?: (google.protobuf.ITimestamp|null); + /** + * Constructs a new DeleteLakeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDeleteLakeRequest); - /** DataScanEvent endTime */ - endTime?: (google.protobuf.ITimestamp|null); + /** DeleteLakeRequest name. */ + public name: string; - /** DataScanEvent type */ - type?: (google.cloud.dataplex.v1.DataScanEvent.ScanType|keyof typeof google.cloud.dataplex.v1.DataScanEvent.ScanType|null); + /** + * Creates a new DeleteLakeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteLakeRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IDeleteLakeRequest): google.cloud.dataplex.v1.DeleteLakeRequest; - /** DataScanEvent state */ - state?: (google.cloud.dataplex.v1.DataScanEvent.State|keyof typeof google.cloud.dataplex.v1.DataScanEvent.State|null); + /** + * Encodes the specified DeleteLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. + * @param message DeleteLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IDeleteLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** DataScanEvent message */ - message?: (string|null); + /** + * Encodes the specified DeleteLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. + * @param message DeleteLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** DataScanEvent specVersion */ - specVersion?: (string|null); + /** + * Decodes a DeleteLakeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteLakeRequest + * @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.dataplex.v1.DeleteLakeRequest; - /** DataScanEvent trigger */ - trigger?: (google.cloud.dataplex.v1.DataScanEvent.Trigger|keyof typeof google.cloud.dataplex.v1.DataScanEvent.Trigger|null); + /** + * Decodes a DeleteLakeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteLakeRequest + * @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.dataplex.v1.DeleteLakeRequest; - /** DataScanEvent scope */ - scope?: (google.cloud.dataplex.v1.DataScanEvent.Scope|keyof typeof google.cloud.dataplex.v1.DataScanEvent.Scope|null); + /** + * Verifies a DeleteLakeRequest 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); - /** DataScanEvent dataProfile */ - dataProfile?: (google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult|null); + /** + * Creates a DeleteLakeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteLakeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteLakeRequest; - /** DataScanEvent dataQuality */ - dataQuality?: (google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult|null); - } + /** + * Creates a plain object from a DeleteLakeRequest message. Also converts values to other types if specified. + * @param message DeleteLakeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DeleteLakeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents a DataScanEvent. */ - class DataScanEvent implements IDataScanEvent { + /** + * Converts this DeleteLakeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; /** - * Constructs a new DataScanEvent. - * @param [properties] Properties to set + * Gets the default type url for DeleteLakeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - constructor(properties?: google.cloud.dataplex.v1.IDataScanEvent); + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** DataScanEvent dataSource. */ - public dataSource: string; + /** Properties of a ListLakesRequest. */ + interface IListLakesRequest { - /** DataScanEvent jobId. */ - public jobId: string; + /** ListLakesRequest parent */ + parent?: (string|null); - /** DataScanEvent startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); + /** ListLakesRequest pageSize */ + pageSize?: (number|null); - /** DataScanEvent endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); + /** ListLakesRequest pageToken */ + pageToken?: (string|null); - /** DataScanEvent type. */ - public type: (google.cloud.dataplex.v1.DataScanEvent.ScanType|keyof typeof google.cloud.dataplex.v1.DataScanEvent.ScanType); + /** ListLakesRequest filter */ + filter?: (string|null); - /** DataScanEvent state. */ - public state: (google.cloud.dataplex.v1.DataScanEvent.State|keyof typeof google.cloud.dataplex.v1.DataScanEvent.State); + /** ListLakesRequest orderBy */ + orderBy?: (string|null); + } - /** DataScanEvent message. */ - public message: string; + /** Represents a ListLakesRequest. */ + class ListLakesRequest implements IListLakesRequest { - /** DataScanEvent specVersion. */ - public specVersion: string; + /** + * Constructs a new ListLakesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListLakesRequest); - /** DataScanEvent trigger. */ - public trigger: (google.cloud.dataplex.v1.DataScanEvent.Trigger|keyof typeof google.cloud.dataplex.v1.DataScanEvent.Trigger); + /** ListLakesRequest parent. */ + public parent: string; - /** DataScanEvent scope. */ - public scope: (google.cloud.dataplex.v1.DataScanEvent.Scope|keyof typeof google.cloud.dataplex.v1.DataScanEvent.Scope); + /** ListLakesRequest pageSize. */ + public pageSize: number; - /** DataScanEvent dataProfile. */ - public dataProfile?: (google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult|null); + /** ListLakesRequest pageToken. */ + public pageToken: string; - /** DataScanEvent dataQuality. */ - public dataQuality?: (google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult|null); + /** ListLakesRequest filter. */ + public filter: string; - /** DataScanEvent result. */ - public result?: ("dataProfile"|"dataQuality"); + /** ListLakesRequest orderBy. */ + public orderBy: string; /** - * Creates a new DataScanEvent instance using the specified properties. + * Creates a new ListLakesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DataScanEvent instance + * @returns ListLakesRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IDataScanEvent): google.cloud.dataplex.v1.DataScanEvent; + public static create(properties?: google.cloud.dataplex.v1.IListLakesRequest): google.cloud.dataplex.v1.ListLakesRequest; /** - * Encodes the specified DataScanEvent message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.verify|verify} messages. - * @param message DataScanEvent message or plain object to encode + * Encodes the specified ListLakesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. + * @param message ListLakesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IDataScanEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IListLakesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DataScanEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.verify|verify} messages. - * @param message DataScanEvent message or plain object to encode + * Encodes the specified ListLakesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. + * @param message ListLakesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDataScanEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListLakesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DataScanEvent message from the specified reader or buffer. + * Decodes a ListLakesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DataScanEvent + * @returns ListLakesRequest * @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.dataplex.v1.DataScanEvent; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListLakesRequest; /** - * Decodes a DataScanEvent message from the specified reader or buffer, length delimited. + * Decodes a ListLakesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DataScanEvent + * @returns ListLakesRequest * @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.dataplex.v1.DataScanEvent; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListLakesRequest; /** - * Verifies a DataScanEvent message. + * Verifies a ListLakesRequest 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 DataScanEvent message from a plain object. Also converts values to their respective internal types. + * Creates a ListLakesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DataScanEvent + * @returns ListLakesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScanEvent; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListLakesRequest; /** - * Creates a plain object from a DataScanEvent message. Also converts values to other types if specified. - * @param message DataScanEvent + * Creates a plain object from a ListLakesRequest message. Also converts values to other types if specified. + * @param message ListLakesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.DataScanEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.ListLakesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DataScanEvent to JSON. + * Converts this ListLakesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DataScanEvent + * Gets the default type url for ListLakesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace DataScanEvent { - - /** ScanType enum. */ - enum ScanType { - SCAN_TYPE_UNSPECIFIED = 0, - DATA_PROFILE = 1, - DATA_QUALITY = 2 - } - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - STARTED = 1, - SUCCEEDED = 2, - FAILED = 3, - CANCELLED = 4 - } - - /** Trigger enum. */ - enum Trigger { - TRIGGER_UNSPECIFIED = 0, - ON_DEMAND = 1, - SCHEDULE = 2 - } - - /** Scope enum. */ - enum Scope { - SCOPE_UNSPECIFIED = 0, - FULL = 1, - INCREMENTAL = 2 - } - - /** Properties of a DataProfileResult. */ - interface IDataProfileResult { - - /** DataProfileResult rowCount */ - rowCount?: (number|Long|string|null); - } - - /** Represents a DataProfileResult. */ - class DataProfileResult implements IDataProfileResult { - - /** - * Constructs a new DataProfileResult. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult); - - /** DataProfileResult rowCount. */ - public rowCount: (number|Long|string); - - /** - * Creates a new DataProfileResult instance using the specified properties. - * @param [properties] Properties to set - * @returns DataProfileResult instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult): google.cloud.dataplex.v1.DataScanEvent.DataProfileResult; + /** Properties of a ListLakesResponse. */ + interface IListLakesResponse { - /** - * Encodes the specified DataProfileResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.verify|verify} messages. - * @param message DataProfileResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListLakesResponse lakes */ + lakes?: (google.cloud.dataplex.v1.ILake[]|null); - /** - * Encodes the specified DataProfileResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.verify|verify} messages. - * @param message DataProfileResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListLakesResponse nextPageToken */ + nextPageToken?: (string|null); - /** - * Decodes a DataProfileResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataProfileResult - * @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.dataplex.v1.DataScanEvent.DataProfileResult; + /** ListLakesResponse unreachableLocations */ + unreachableLocations?: (string[]|null); + } - /** - * Decodes a DataProfileResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataProfileResult - * @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.dataplex.v1.DataScanEvent.DataProfileResult; + /** Represents a ListLakesResponse. */ + class ListLakesResponse implements IListLakesResponse { - /** - * Verifies a DataProfileResult 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); + /** + * Constructs a new ListLakesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListLakesResponse); - /** - * Creates a DataProfileResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataProfileResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScanEvent.DataProfileResult; + /** ListLakesResponse lakes. */ + public lakes: google.cloud.dataplex.v1.ILake[]; - /** - * Creates a plain object from a DataProfileResult message. Also converts values to other types if specified. - * @param message DataProfileResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataScanEvent.DataProfileResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ListLakesResponse nextPageToken. */ + public nextPageToken: string; - /** - * Converts this DataProfileResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** ListLakesResponse unreachableLocations. */ + public unreachableLocations: string[]; - /** - * Gets the default type url for DataProfileResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a new ListLakesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLakesResponse instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListLakesResponse): google.cloud.dataplex.v1.ListLakesResponse; - /** Properties of a DataQualityResult. */ - interface IDataQualityResult { + /** + * Encodes the specified ListLakesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. + * @param message ListLakesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListLakesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** DataQualityResult rowCount */ - rowCount?: (number|Long|string|null); + /** + * Encodes the specified ListLakesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. + * @param message ListLakesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListLakesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** DataQualityResult passed */ - passed?: (boolean|null); + /** + * Decodes a ListLakesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLakesResponse + * @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.dataplex.v1.ListLakesResponse; - /** DataQualityResult dimensionPassed */ - dimensionPassed?: ({ [k: string]: boolean }|null); - } + /** + * Decodes a ListLakesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLakesResponse + * @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.dataplex.v1.ListLakesResponse; - /** Represents a DataQualityResult. */ - class DataQualityResult implements IDataQualityResult { + /** + * Verifies a ListLakesResponse 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); - /** - * Constructs a new DataQualityResult. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult); + /** + * Creates a ListLakesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLakesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListLakesResponse; - /** DataQualityResult rowCount. */ - public rowCount: (number|Long|string); + /** + * Creates a plain object from a ListLakesResponse message. Also converts values to other types if specified. + * @param message ListLakesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListLakesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** DataQualityResult passed. */ - public passed: boolean; + /** + * Converts this ListLakesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** DataQualityResult dimensionPassed. */ - public dimensionPassed: { [k: string]: boolean }; + /** + * Gets the default type url for ListLakesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Creates a new DataQualityResult instance using the specified properties. - * @param [properties] Properties to set - * @returns DataQualityResult instance - */ - public static create(properties?: google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult): google.cloud.dataplex.v1.DataScanEvent.DataQualityResult; + /** Properties of a ListLakeActionsRequest. */ + interface IListLakeActionsRequest { - /** - * Encodes the specified DataQualityResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.verify|verify} messages. - * @param message DataQualityResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListLakeActionsRequest parent */ + parent?: (string|null); - /** - * Encodes the specified DataQualityResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.verify|verify} messages. - * @param message DataQualityResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListLakeActionsRequest pageSize */ + pageSize?: (number|null); - /** - * Decodes a DataQualityResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataQualityResult - * @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.dataplex.v1.DataScanEvent.DataQualityResult; + /** ListLakeActionsRequest pageToken */ + pageToken?: (string|null); + } - /** - * Decodes a DataQualityResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataQualityResult - * @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.dataplex.v1.DataScanEvent.DataQualityResult; + /** Represents a ListLakeActionsRequest. */ + class ListLakeActionsRequest implements IListLakeActionsRequest { - /** - * Verifies a DataQualityResult 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); + /** + * Constructs a new ListLakeActionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListLakeActionsRequest); - /** - * Creates a DataQualityResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataQualityResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScanEvent.DataQualityResult; + /** ListLakeActionsRequest parent. */ + public parent: string; - /** - * Creates a plain object from a DataQualityResult message. Also converts values to other types if specified. - * @param message DataQualityResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DataScanEvent.DataQualityResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ListLakeActionsRequest pageSize. */ + public pageSize: number; - /** - * Converts this DataQualityResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** ListLakeActionsRequest pageToken. */ + public pageToken: string; - /** - * Gets the default type url for DataQualityResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** + * Creates a new ListLakeActionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListLakeActionsRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListLakeActionsRequest): google.cloud.dataplex.v1.ListLakeActionsRequest; - /** Represents a MetadataService */ - class MetadataService extends $protobuf.rpc.Service { + /** + * Encodes the specified ListLakeActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. + * @param message ListLakeActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListLakeActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Constructs a new MetadataService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited + * Encodes the specified ListLakeActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. + * @param message ListLakeActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + public static encodeDelimited(message: google.cloud.dataplex.v1.IListLakeActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Creates new MetadataService 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. + * Decodes a ListLakeActionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListLakeActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): MetadataService; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListLakeActionsRequest; /** - * Calls CreateEntity. - * @param request CreateEntityRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Entity + * Decodes a ListLakeActionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListLakeActionsRequest + * @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.dataplex.v1.ListLakeActionsRequest; + + /** + * Verifies a ListLakeActionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public createEntity(request: google.cloud.dataplex.v1.ICreateEntityRequest, callback: google.cloud.dataplex.v1.MetadataService.CreateEntityCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls CreateEntity. - * @param request CreateEntityRequest message or plain object - * @returns Promise + * Creates a ListLakeActionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListLakeActionsRequest */ - public createEntity(request: google.cloud.dataplex.v1.ICreateEntityRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListLakeActionsRequest; /** - * Calls UpdateEntity. - * @param request UpdateEntityRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Entity + * Creates a plain object from a ListLakeActionsRequest message. Also converts values to other types if specified. + * @param message ListLakeActionsRequest + * @param [options] Conversion options + * @returns Plain object */ - public updateEntity(request: google.cloud.dataplex.v1.IUpdateEntityRequest, callback: google.cloud.dataplex.v1.MetadataService.UpdateEntityCallback): void; + public static toObject(message: google.cloud.dataplex.v1.ListLakeActionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls UpdateEntity. - * @param request UpdateEntityRequest message or plain object - * @returns Promise + * Converts this ListLakeActionsRequest to JSON. + * @returns JSON object */ - public updateEntity(request: google.cloud.dataplex.v1.IUpdateEntityRequest): Promise; + public toJSON(): { [k: string]: any }; /** - * Calls DeleteEntity. - * @param request DeleteEntityRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Gets the default type url for ListLakeActionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public deleteEntity(request: google.cloud.dataplex.v1.IDeleteEntityRequest, callback: google.cloud.dataplex.v1.MetadataService.DeleteEntityCallback): void; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListActionsResponse. */ + interface IListActionsResponse { + + /** ListActionsResponse actions */ + actions?: (google.cloud.dataplex.v1.IAction[]|null); + + /** ListActionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListActionsResponse. */ + class ListActionsResponse implements IListActionsResponse { /** - * Calls DeleteEntity. - * @param request DeleteEntityRequest message or plain object - * @returns Promise + * Constructs a new ListActionsResponse. + * @param [properties] Properties to set */ - public deleteEntity(request: google.cloud.dataplex.v1.IDeleteEntityRequest): Promise; + constructor(properties?: google.cloud.dataplex.v1.IListActionsResponse); + + /** ListActionsResponse actions. */ + public actions: google.cloud.dataplex.v1.IAction[]; + + /** ListActionsResponse nextPageToken. */ + public nextPageToken: string; /** - * Calls GetEntity. - * @param request GetEntityRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Entity + * Creates a new ListActionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListActionsResponse instance */ - public getEntity(request: google.cloud.dataplex.v1.IGetEntityRequest, callback: google.cloud.dataplex.v1.MetadataService.GetEntityCallback): void; + public static create(properties?: google.cloud.dataplex.v1.IListActionsResponse): google.cloud.dataplex.v1.ListActionsResponse; /** - * Calls GetEntity. - * @param request GetEntityRequest message or plain object - * @returns Promise + * Encodes the specified ListActionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. + * @param message ListActionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getEntity(request: google.cloud.dataplex.v1.IGetEntityRequest): Promise; + public static encode(message: google.cloud.dataplex.v1.IListActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListEntities. - * @param request ListEntitiesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListEntitiesResponse + * Encodes the specified ListActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. + * @param message ListActionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listEntities(request: google.cloud.dataplex.v1.IListEntitiesRequest, callback: google.cloud.dataplex.v1.MetadataService.ListEntitiesCallback): void; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListEntities. - * @param request ListEntitiesRequest message or plain object - * @returns Promise + * Decodes a ListActionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listEntities(request: google.cloud.dataplex.v1.IListEntitiesRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListActionsResponse; /** - * Calls CreatePartition. - * @param request CreatePartitionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Partition + * Decodes a ListActionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createPartition(request: google.cloud.dataplex.v1.ICreatePartitionRequest, callback: google.cloud.dataplex.v1.MetadataService.CreatePartitionCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListActionsResponse; /** - * Calls CreatePartition. - * @param request CreatePartitionRequest message or plain object - * @returns Promise + * Verifies a ListActionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public createPartition(request: google.cloud.dataplex.v1.ICreatePartitionRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls DeletePartition. - * @param request DeletePartitionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Creates a ListActionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListActionsResponse */ - public deletePartition(request: google.cloud.dataplex.v1.IDeletePartitionRequest, callback: google.cloud.dataplex.v1.MetadataService.DeletePartitionCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListActionsResponse; /** - * Calls DeletePartition. - * @param request DeletePartitionRequest message or plain object - * @returns Promise + * Creates a plain object from a ListActionsResponse message. Also converts values to other types if specified. + * @param message ListActionsResponse + * @param [options] Conversion options + * @returns Plain object */ - public deletePartition(request: google.cloud.dataplex.v1.IDeletePartitionRequest): Promise; + public static toObject(message: google.cloud.dataplex.v1.ListActionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls GetPartition. - * @param request GetPartitionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Partition + * Converts this ListActionsResponse to JSON. + * @returns JSON object */ - public getPartition(request: google.cloud.dataplex.v1.IGetPartitionRequest, callback: google.cloud.dataplex.v1.MetadataService.GetPartitionCallback): void; + public toJSON(): { [k: string]: any }; /** - * Calls GetPartition. - * @param request GetPartitionRequest message or plain object - * @returns Promise + * Gets the default type url for ListActionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public getPartition(request: google.cloud.dataplex.v1.IGetPartitionRequest): Promise; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetLakeRequest. */ + interface IGetLakeRequest { + + /** GetLakeRequest name */ + name?: (string|null); + } + + /** Represents a GetLakeRequest. */ + class GetLakeRequest implements IGetLakeRequest { /** - * Calls ListPartitions. - * @param request ListPartitionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListPartitionsResponse + * Constructs a new GetLakeRequest. + * @param [properties] Properties to set */ - public listPartitions(request: google.cloud.dataplex.v1.IListPartitionsRequest, callback: google.cloud.dataplex.v1.MetadataService.ListPartitionsCallback): void; + constructor(properties?: google.cloud.dataplex.v1.IGetLakeRequest); + + /** GetLakeRequest name. */ + public name: string; /** - * Calls ListPartitions. - * @param request ListPartitionsRequest message or plain object - * @returns Promise + * Creates a new GetLakeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetLakeRequest instance */ - public listPartitions(request: google.cloud.dataplex.v1.IListPartitionsRequest): Promise; - } - - namespace MetadataService { + public static create(properties?: google.cloud.dataplex.v1.IGetLakeRequest): google.cloud.dataplex.v1.GetLakeRequest; /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|createEntity}. - * @param error Error, if any - * @param [response] Entity + * Encodes the specified GetLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. + * @param message GetLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type CreateEntityCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Entity) => void; + public static encode(message: google.cloud.dataplex.v1.IGetLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|updateEntity}. - * @param error Error, if any - * @param [response] Entity + * Encodes the specified GetLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. + * @param message GetLakeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type UpdateEntityCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Entity) => void; + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|deleteEntity}. - * @param error Error, if any - * @param [response] Empty + * Decodes a GetLakeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type DeleteEntityCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetLakeRequest; /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|getEntity}. - * @param error Error, if any - * @param [response] Entity + * Decodes a GetLakeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type GetEntityCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Entity) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetLakeRequest; /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|listEntities}. - * @param error Error, if any - * @param [response] ListEntitiesResponse + * Verifies a GetLakeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type ListEntitiesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListEntitiesResponse) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|createPartition}. - * @param error Error, if any - * @param [response] Partition + * Creates a GetLakeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetLakeRequest */ - type CreatePartitionCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Partition) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetLakeRequest; /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|deletePartition}. - * @param error Error, if any - * @param [response] Empty + * Creates a plain object from a GetLakeRequest message. Also converts values to other types if specified. + * @param message GetLakeRequest + * @param [options] Conversion options + * @returns Plain object */ - type DeletePartitionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static toObject(message: google.cloud.dataplex.v1.GetLakeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|getPartition}. - * @param error Error, if any - * @param [response] Partition + * Converts this GetLakeRequest to JSON. + * @returns JSON object */ - type GetPartitionCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Partition) => void; + public toJSON(): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|listPartitions}. - * @param error Error, if any - * @param [response] ListPartitionsResponse + * Gets the default type url for GetLakeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - type ListPartitionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListPartitionsResponse) => void; + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateEntityRequest. */ - interface ICreateEntityRequest { + /** Properties of a CreateZoneRequest. */ + interface ICreateZoneRequest { - /** CreateEntityRequest parent */ + /** CreateZoneRequest parent */ parent?: (string|null); - /** CreateEntityRequest entity */ - entity?: (google.cloud.dataplex.v1.IEntity|null); + /** CreateZoneRequest zoneId */ + zoneId?: (string|null); - /** CreateEntityRequest validateOnly */ + /** CreateZoneRequest zone */ + zone?: (google.cloud.dataplex.v1.IZone|null); + + /** CreateZoneRequest validateOnly */ validateOnly?: (boolean|null); } - /** Represents a CreateEntityRequest. */ - class CreateEntityRequest implements ICreateEntityRequest { + /** Represents a CreateZoneRequest. */ + class CreateZoneRequest implements ICreateZoneRequest { /** - * Constructs a new CreateEntityRequest. + * Constructs a new CreateZoneRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.ICreateEntityRequest); + constructor(properties?: google.cloud.dataplex.v1.ICreateZoneRequest); - /** CreateEntityRequest parent. */ + /** CreateZoneRequest parent. */ public parent: string; - /** CreateEntityRequest entity. */ - public entity?: (google.cloud.dataplex.v1.IEntity|null); + /** CreateZoneRequest zoneId. */ + public zoneId: string; - /** CreateEntityRequest validateOnly. */ + /** CreateZoneRequest zone. */ + public zone?: (google.cloud.dataplex.v1.IZone|null); + + /** CreateZoneRequest validateOnly. */ public validateOnly: boolean; /** - * Creates a new CreateEntityRequest instance using the specified properties. + * Creates a new CreateZoneRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateEntityRequest instance + * @returns CreateZoneRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.ICreateEntityRequest): google.cloud.dataplex.v1.CreateEntityRequest; + public static create(properties?: google.cloud.dataplex.v1.ICreateZoneRequest): google.cloud.dataplex.v1.CreateZoneRequest; /** - * Encodes the specified CreateEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntityRequest.verify|verify} messages. - * @param message CreateEntityRequest message or plain object to encode + * Encodes the specified CreateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. + * @param message CreateZoneRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.ICreateEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.ICreateZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntityRequest.verify|verify} messages. - * @param message CreateEntityRequest message or plain object to encode + * Encodes the specified CreateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. + * @param message CreateZoneRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateEntityRequest message from the specified reader or buffer. + * Decodes a CreateZoneRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateEntityRequest + * @returns CreateZoneRequest * @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.dataplex.v1.CreateEntityRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateZoneRequest; /** - * Decodes a CreateEntityRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateZoneRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateEntityRequest + * @returns CreateZoneRequest * @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.dataplex.v1.CreateEntityRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateZoneRequest; /** - * Verifies a CreateEntityRequest message. + * Verifies a CreateZoneRequest 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 CreateEntityRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateZoneRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateEntityRequest + * @returns CreateZoneRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateEntityRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateZoneRequest; /** - * Creates a plain object from a CreateEntityRequest message. Also converts values to other types if specified. - * @param message CreateEntityRequest + * Creates a plain object from a CreateZoneRequest message. Also converts values to other types if specified. + * @param message CreateZoneRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.CreateEntityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.CreateZoneRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateEntityRequest to JSON. + * Converts this CreateZoneRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateEntityRequest + * Gets the default type url for CreateZoneRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateEntityRequest. */ - interface IUpdateEntityRequest { + /** Properties of an UpdateZoneRequest. */ + interface IUpdateZoneRequest { - /** UpdateEntityRequest entity */ - entity?: (google.cloud.dataplex.v1.IEntity|null); + /** UpdateZoneRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); - /** UpdateEntityRequest validateOnly */ + /** UpdateZoneRequest zone */ + zone?: (google.cloud.dataplex.v1.IZone|null); + + /** UpdateZoneRequest validateOnly */ validateOnly?: (boolean|null); } - /** Represents an UpdateEntityRequest. */ - class UpdateEntityRequest implements IUpdateEntityRequest { + /** Represents an UpdateZoneRequest. */ + class UpdateZoneRequest implements IUpdateZoneRequest { /** - * Constructs a new UpdateEntityRequest. + * Constructs a new UpdateZoneRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IUpdateEntityRequest); + constructor(properties?: google.cloud.dataplex.v1.IUpdateZoneRequest); - /** UpdateEntityRequest entity. */ - public entity?: (google.cloud.dataplex.v1.IEntity|null); + /** UpdateZoneRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** UpdateEntityRequest validateOnly. */ + /** UpdateZoneRequest zone. */ + public zone?: (google.cloud.dataplex.v1.IZone|null); + + /** UpdateZoneRequest validateOnly. */ public validateOnly: boolean; /** - * Creates a new UpdateEntityRequest instance using the specified properties. + * Creates a new UpdateZoneRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateEntityRequest instance + * @returns UpdateZoneRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IUpdateEntityRequest): google.cloud.dataplex.v1.UpdateEntityRequest; + public static create(properties?: google.cloud.dataplex.v1.IUpdateZoneRequest): google.cloud.dataplex.v1.UpdateZoneRequest; /** - * Encodes the specified UpdateEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntityRequest.verify|verify} messages. - * @param message UpdateEntityRequest message or plain object to encode + * Encodes the specified UpdateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. + * @param message UpdateZoneRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IUpdateEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IUpdateZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntityRequest.verify|verify} messages. - * @param message UpdateEntityRequest message or plain object to encode + * Encodes the specified UpdateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. + * @param message UpdateZoneRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateEntityRequest message from the specified reader or buffer. + * Decodes an UpdateZoneRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateEntityRequest + * @returns UpdateZoneRequest * @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.dataplex.v1.UpdateEntityRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateZoneRequest; /** - * Decodes an UpdateEntityRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateZoneRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateEntityRequest + * @returns UpdateZoneRequest * @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.dataplex.v1.UpdateEntityRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateZoneRequest; /** - * Verifies an UpdateEntityRequest message. + * Verifies an UpdateZoneRequest 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 UpdateEntityRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateZoneRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateEntityRequest + * @returns UpdateZoneRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateEntityRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateZoneRequest; /** - * Creates a plain object from an UpdateEntityRequest message. Also converts values to other types if specified. - * @param message UpdateEntityRequest + * Creates a plain object from an UpdateZoneRequest message. Also converts values to other types if specified. + * @param message UpdateZoneRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.UpdateEntityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.UpdateZoneRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateEntityRequest to JSON. + * Converts this UpdateZoneRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateEntityRequest + * Gets the default type url for UpdateZoneRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteEntityRequest. */ - interface IDeleteEntityRequest { + /** Properties of a DeleteZoneRequest. */ + interface IDeleteZoneRequest { - /** DeleteEntityRequest name */ + /** DeleteZoneRequest name */ name?: (string|null); - - /** DeleteEntityRequest etag */ - etag?: (string|null); } - /** Represents a DeleteEntityRequest. */ - class DeleteEntityRequest implements IDeleteEntityRequest { + /** Represents a DeleteZoneRequest. */ + class DeleteZoneRequest implements IDeleteZoneRequest { /** - * Constructs a new DeleteEntityRequest. + * Constructs a new DeleteZoneRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IDeleteEntityRequest); + constructor(properties?: google.cloud.dataplex.v1.IDeleteZoneRequest); - /** DeleteEntityRequest name. */ + /** DeleteZoneRequest name. */ public name: string; - /** DeleteEntityRequest etag. */ - public etag: string; - /** - * Creates a new DeleteEntityRequest instance using the specified properties. + * Creates a new DeleteZoneRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteEntityRequest instance + * @returns DeleteZoneRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IDeleteEntityRequest): google.cloud.dataplex.v1.DeleteEntityRequest; + public static create(properties?: google.cloud.dataplex.v1.IDeleteZoneRequest): google.cloud.dataplex.v1.DeleteZoneRequest; /** - * Encodes the specified DeleteEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEntityRequest.verify|verify} messages. - * @param message DeleteEntityRequest message or plain object to encode + * Encodes the specified DeleteZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. + * @param message DeleteZoneRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IDeleteEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IDeleteZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEntityRequest.verify|verify} messages. - * @param message DeleteEntityRequest message or plain object to encode + * Encodes the specified DeleteZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. + * @param message DeleteZoneRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteEntityRequest message from the specified reader or buffer. + * Decodes a DeleteZoneRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteEntityRequest + * @returns DeleteZoneRequest * @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.dataplex.v1.DeleteEntityRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteZoneRequest; /** - * Decodes a DeleteEntityRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteZoneRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteEntityRequest + * @returns DeleteZoneRequest * @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.dataplex.v1.DeleteEntityRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteZoneRequest; /** - * Verifies a DeleteEntityRequest message. + * Verifies a DeleteZoneRequest 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 DeleteEntityRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteZoneRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteEntityRequest + * @returns DeleteZoneRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteEntityRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteZoneRequest; /** - * Creates a plain object from a DeleteEntityRequest message. Also converts values to other types if specified. - * @param message DeleteEntityRequest + * Creates a plain object from a DeleteZoneRequest message. Also converts values to other types if specified. + * @param message DeleteZoneRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.DeleteEntityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.DeleteZoneRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteEntityRequest to JSON. + * Converts this DeleteZoneRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteEntityRequest + * Gets the default type url for DeleteZoneRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListEntitiesRequest. */ - interface IListEntitiesRequest { + /** Properties of a ListZonesRequest. */ + interface IListZonesRequest { - /** ListEntitiesRequest parent */ + /** ListZonesRequest parent */ parent?: (string|null); - /** ListEntitiesRequest view */ - view?: (google.cloud.dataplex.v1.ListEntitiesRequest.EntityView|keyof typeof google.cloud.dataplex.v1.ListEntitiesRequest.EntityView|null); - - /** ListEntitiesRequest pageSize */ + /** ListZonesRequest pageSize */ pageSize?: (number|null); - /** ListEntitiesRequest pageToken */ + /** ListZonesRequest pageToken */ pageToken?: (string|null); - /** ListEntitiesRequest filter */ + /** ListZonesRequest filter */ filter?: (string|null); + + /** ListZonesRequest orderBy */ + orderBy?: (string|null); } - /** Represents a ListEntitiesRequest. */ - class ListEntitiesRequest implements IListEntitiesRequest { + /** Represents a ListZonesRequest. */ + class ListZonesRequest implements IListZonesRequest { /** - * Constructs a new ListEntitiesRequest. + * Constructs a new ListZonesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IListEntitiesRequest); + constructor(properties?: google.cloud.dataplex.v1.IListZonesRequest); - /** ListEntitiesRequest parent. */ + /** ListZonesRequest parent. */ public parent: string; - /** ListEntitiesRequest view. */ - public view: (google.cloud.dataplex.v1.ListEntitiesRequest.EntityView|keyof typeof google.cloud.dataplex.v1.ListEntitiesRequest.EntityView); - - /** ListEntitiesRequest pageSize. */ + /** ListZonesRequest pageSize. */ public pageSize: number; - /** ListEntitiesRequest pageToken. */ + /** ListZonesRequest pageToken. */ public pageToken: string; - /** ListEntitiesRequest filter. */ + /** ListZonesRequest filter. */ public filter: string; + /** ListZonesRequest orderBy. */ + public orderBy: string; + /** - * Creates a new ListEntitiesRequest instance using the specified properties. + * Creates a new ListZonesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListEntitiesRequest instance + * @returns ListZonesRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IListEntitiesRequest): google.cloud.dataplex.v1.ListEntitiesRequest; + public static create(properties?: google.cloud.dataplex.v1.IListZonesRequest): google.cloud.dataplex.v1.ListZonesRequest; /** - * Encodes the specified ListEntitiesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesRequest.verify|verify} messages. - * @param message ListEntitiesRequest message or plain object to encode + * Encodes the specified ListZonesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. + * @param message ListZonesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IListEntitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IListZonesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesRequest.verify|verify} messages. - * @param message ListEntitiesRequest message or plain object to encode + * Encodes the specified ListZonesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. + * @param message ListZonesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListEntitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListZonesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListEntitiesRequest message from the specified reader or buffer. + * Decodes a ListZonesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListEntitiesRequest + * @returns ListZonesRequest * @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.dataplex.v1.ListEntitiesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListZonesRequest; /** - * Decodes a ListEntitiesRequest message from the specified reader or buffer, length delimited. + * Decodes a ListZonesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListEntitiesRequest + * @returns ListZonesRequest * @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.dataplex.v1.ListEntitiesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListZonesRequest; /** - * Verifies a ListEntitiesRequest message. + * Verifies a ListZonesRequest 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 ListEntitiesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListZonesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListEntitiesRequest + * @returns ListZonesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListEntitiesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListZonesRequest; /** - * Creates a plain object from a ListEntitiesRequest message. Also converts values to other types if specified. - * @param message ListEntitiesRequest + * Creates a plain object from a ListZonesRequest message. Also converts values to other types if specified. + * @param message ListZonesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.ListEntitiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.ListZonesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListEntitiesRequest to JSON. + * Converts this ListZonesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListEntitiesRequest + * Gets the default type url for ListZonesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace ListEntitiesRequest { - - /** EntityView enum. */ - enum EntityView { - ENTITY_VIEW_UNSPECIFIED = 0, - TABLES = 1, - FILESETS = 2 - } - } - - /** Properties of a ListEntitiesResponse. */ - interface IListEntitiesResponse { + /** Properties of a ListZonesResponse. */ + interface IListZonesResponse { - /** ListEntitiesResponse entities */ - entities?: (google.cloud.dataplex.v1.IEntity[]|null); + /** ListZonesResponse zones */ + zones?: (google.cloud.dataplex.v1.IZone[]|null); - /** ListEntitiesResponse nextPageToken */ + /** ListZonesResponse nextPageToken */ nextPageToken?: (string|null); } - /** Represents a ListEntitiesResponse. */ - class ListEntitiesResponse implements IListEntitiesResponse { + /** Represents a ListZonesResponse. */ + class ListZonesResponse implements IListZonesResponse { /** - * Constructs a new ListEntitiesResponse. + * Constructs a new ListZonesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IListEntitiesResponse); + constructor(properties?: google.cloud.dataplex.v1.IListZonesResponse); - /** ListEntitiesResponse entities. */ - public entities: google.cloud.dataplex.v1.IEntity[]; + /** ListZonesResponse zones. */ + public zones: google.cloud.dataplex.v1.IZone[]; - /** ListEntitiesResponse nextPageToken. */ + /** ListZonesResponse nextPageToken. */ public nextPageToken: string; /** - * Creates a new ListEntitiesResponse instance using the specified properties. + * Creates a new ListZonesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListEntitiesResponse instance + * @returns ListZonesResponse instance */ - public static create(properties?: google.cloud.dataplex.v1.IListEntitiesResponse): google.cloud.dataplex.v1.ListEntitiesResponse; + public static create(properties?: google.cloud.dataplex.v1.IListZonesResponse): google.cloud.dataplex.v1.ListZonesResponse; /** - * Encodes the specified ListEntitiesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesResponse.verify|verify} messages. - * @param message ListEntitiesResponse message or plain object to encode + * Encodes the specified ListZonesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. + * @param message ListZonesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IListEntitiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IListZonesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListEntitiesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesResponse.verify|verify} messages. - * @param message ListEntitiesResponse message or plain object to encode + * Encodes the specified ListZonesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. + * @param message ListZonesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListEntitiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListZonesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListEntitiesResponse message from the specified reader or buffer. + * Decodes a ListZonesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListEntitiesResponse + * @returns ListZonesResponse * @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.dataplex.v1.ListEntitiesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListZonesResponse; /** - * Decodes a ListEntitiesResponse message from the specified reader or buffer, length delimited. + * Decodes a ListZonesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListEntitiesResponse + * @returns ListZonesResponse * @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.dataplex.v1.ListEntitiesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListZonesResponse; /** - * Verifies a ListEntitiesResponse message. + * Verifies a ListZonesResponse 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 ListEntitiesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListZonesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListEntitiesResponse + * @returns ListZonesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListEntitiesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListZonesResponse; /** - * Creates a plain object from a ListEntitiesResponse message. Also converts values to other types if specified. - * @param message ListEntitiesResponse + * Creates a plain object from a ListZonesResponse message. Also converts values to other types if specified. + * @param message ListZonesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.ListEntitiesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.ListZonesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListEntitiesResponse to JSON. + * Converts this ListZonesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListEntitiesResponse + * Gets the default type url for ListZonesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetEntityRequest. */ - interface IGetEntityRequest { + /** Properties of a ListZoneActionsRequest. */ + interface IListZoneActionsRequest { - /** GetEntityRequest name */ - name?: (string|null); + /** ListZoneActionsRequest parent */ + parent?: (string|null); - /** GetEntityRequest view */ - view?: (google.cloud.dataplex.v1.GetEntityRequest.EntityView|keyof typeof google.cloud.dataplex.v1.GetEntityRequest.EntityView|null); + /** ListZoneActionsRequest pageSize */ + pageSize?: (number|null); + + /** ListZoneActionsRequest pageToken */ + pageToken?: (string|null); } - /** Represents a GetEntityRequest. */ - class GetEntityRequest implements IGetEntityRequest { + /** Represents a ListZoneActionsRequest. */ + class ListZoneActionsRequest implements IListZoneActionsRequest { /** - * Constructs a new GetEntityRequest. + * Constructs a new ListZoneActionsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IGetEntityRequest); + constructor(properties?: google.cloud.dataplex.v1.IListZoneActionsRequest); - /** GetEntityRequest name. */ - public name: string; + /** ListZoneActionsRequest parent. */ + public parent: string; - /** GetEntityRequest view. */ - public view: (google.cloud.dataplex.v1.GetEntityRequest.EntityView|keyof typeof google.cloud.dataplex.v1.GetEntityRequest.EntityView); + /** ListZoneActionsRequest pageSize. */ + public pageSize: number; + + /** ListZoneActionsRequest pageToken. */ + public pageToken: string; /** - * Creates a new GetEntityRequest instance using the specified properties. + * Creates a new ListZoneActionsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetEntityRequest instance + * @returns ListZoneActionsRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IGetEntityRequest): google.cloud.dataplex.v1.GetEntityRequest; + public static create(properties?: google.cloud.dataplex.v1.IListZoneActionsRequest): google.cloud.dataplex.v1.ListZoneActionsRequest; /** - * Encodes the specified GetEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEntityRequest.verify|verify} messages. - * @param message GetEntityRequest message or plain object to encode + * Encodes the specified ListZoneActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. + * @param message ListZoneActionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IGetEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IListZoneActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEntityRequest.verify|verify} messages. - * @param message GetEntityRequest message or plain object to encode + * Encodes the specified ListZoneActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. + * @param message ListZoneActionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGetEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListZoneActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetEntityRequest message from the specified reader or buffer. + * Decodes a ListZoneActionsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetEntityRequest + * @returns ListZoneActionsRequest * @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.dataplex.v1.GetEntityRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListZoneActionsRequest; /** - * Decodes a GetEntityRequest message from the specified reader or buffer, length delimited. + * Decodes a ListZoneActionsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetEntityRequest + * @returns ListZoneActionsRequest * @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.dataplex.v1.GetEntityRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListZoneActionsRequest; /** - * Verifies a GetEntityRequest message. + * Verifies a ListZoneActionsRequest 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 GetEntityRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListZoneActionsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetEntityRequest + * @returns ListZoneActionsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetEntityRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListZoneActionsRequest; /** - * Creates a plain object from a GetEntityRequest message. Also converts values to other types if specified. - * @param message GetEntityRequest + * Creates a plain object from a ListZoneActionsRequest message. Also converts values to other types if specified. + * @param message ListZoneActionsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.GetEntityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.ListZoneActionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetEntityRequest to JSON. + * Converts this ListZoneActionsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetEntityRequest + * Gets the default type url for ListZoneActionsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace GetEntityRequest { - - /** EntityView enum. */ - enum EntityView { - ENTITY_VIEW_UNSPECIFIED = 0, - BASIC = 1, - SCHEMA = 2, - FULL = 4 - } - } - - /** Properties of a ListPartitionsRequest. */ - interface IListPartitionsRequest { - - /** ListPartitionsRequest parent */ - parent?: (string|null); - - /** ListPartitionsRequest pageSize */ - pageSize?: (number|null); - - /** ListPartitionsRequest pageToken */ - pageToken?: (string|null); + /** Properties of a GetZoneRequest. */ + interface IGetZoneRequest { - /** ListPartitionsRequest filter */ - filter?: (string|null); + /** GetZoneRequest name */ + name?: (string|null); } - /** Represents a ListPartitionsRequest. */ - class ListPartitionsRequest implements IListPartitionsRequest { + /** Represents a GetZoneRequest. */ + class GetZoneRequest implements IGetZoneRequest { /** - * Constructs a new ListPartitionsRequest. + * Constructs a new GetZoneRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IListPartitionsRequest); - - /** ListPartitionsRequest parent. */ - public parent: string; - - /** ListPartitionsRequest pageSize. */ - public pageSize: number; - - /** ListPartitionsRequest pageToken. */ - public pageToken: string; + constructor(properties?: google.cloud.dataplex.v1.IGetZoneRequest); - /** ListPartitionsRequest filter. */ - public filter: string; + /** GetZoneRequest name. */ + public name: string; /** - * Creates a new ListPartitionsRequest instance using the specified properties. + * Creates a new GetZoneRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListPartitionsRequest instance + * @returns GetZoneRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IListPartitionsRequest): google.cloud.dataplex.v1.ListPartitionsRequest; + public static create(properties?: google.cloud.dataplex.v1.IGetZoneRequest): google.cloud.dataplex.v1.GetZoneRequest; /** - * Encodes the specified ListPartitionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsRequest.verify|verify} messages. - * @param message ListPartitionsRequest message or plain object to encode + * Encodes the specified GetZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. + * @param message GetZoneRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IListPartitionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IGetZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListPartitionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsRequest.verify|verify} messages. - * @param message ListPartitionsRequest message or plain object to encode + * Encodes the specified GetZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. + * @param message GetZoneRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListPartitionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListPartitionsRequest message from the specified reader or buffer. + * Decodes a GetZoneRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListPartitionsRequest + * @returns GetZoneRequest * @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.dataplex.v1.ListPartitionsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetZoneRequest; /** - * Decodes a ListPartitionsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetZoneRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListPartitionsRequest + * @returns GetZoneRequest * @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.dataplex.v1.ListPartitionsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetZoneRequest; /** - * Verifies a ListPartitionsRequest message. + * Verifies a GetZoneRequest 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 ListPartitionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetZoneRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListPartitionsRequest + * @returns GetZoneRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListPartitionsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetZoneRequest; /** - * Creates a plain object from a ListPartitionsRequest message. Also converts values to other types if specified. - * @param message ListPartitionsRequest + * Creates a plain object from a GetZoneRequest message. Also converts values to other types if specified. + * @param message GetZoneRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.ListPartitionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.GetZoneRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListPartitionsRequest to JSON. + * Converts this GetZoneRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListPartitionsRequest + * Gets the default type url for GetZoneRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreatePartitionRequest. */ - interface ICreatePartitionRequest { + /** Properties of a CreateAssetRequest. */ + interface ICreateAssetRequest { - /** CreatePartitionRequest parent */ + /** CreateAssetRequest parent */ parent?: (string|null); - /** CreatePartitionRequest partition */ - partition?: (google.cloud.dataplex.v1.IPartition|null); + /** CreateAssetRequest assetId */ + assetId?: (string|null); - /** CreatePartitionRequest validateOnly */ + /** CreateAssetRequest asset */ + asset?: (google.cloud.dataplex.v1.IAsset|null); + + /** CreateAssetRequest validateOnly */ validateOnly?: (boolean|null); } - /** Represents a CreatePartitionRequest. */ - class CreatePartitionRequest implements ICreatePartitionRequest { + /** Represents a CreateAssetRequest. */ + class CreateAssetRequest implements ICreateAssetRequest { /** - * Constructs a new CreatePartitionRequest. + * Constructs a new CreateAssetRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.ICreatePartitionRequest); + constructor(properties?: google.cloud.dataplex.v1.ICreateAssetRequest); - /** CreatePartitionRequest parent. */ + /** CreateAssetRequest parent. */ public parent: string; - /** CreatePartitionRequest partition. */ - public partition?: (google.cloud.dataplex.v1.IPartition|null); + /** CreateAssetRequest assetId. */ + public assetId: string; - /** CreatePartitionRequest validateOnly. */ + /** CreateAssetRequest asset. */ + public asset?: (google.cloud.dataplex.v1.IAsset|null); + + /** CreateAssetRequest validateOnly. */ public validateOnly: boolean; /** - * Creates a new CreatePartitionRequest instance using the specified properties. + * Creates a new CreateAssetRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreatePartitionRequest instance + * @returns CreateAssetRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.ICreatePartitionRequest): google.cloud.dataplex.v1.CreatePartitionRequest; + public static create(properties?: google.cloud.dataplex.v1.ICreateAssetRequest): google.cloud.dataplex.v1.CreateAssetRequest; /** - * Encodes the specified CreatePartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreatePartitionRequest.verify|verify} messages. - * @param message CreatePartitionRequest message or plain object to encode + * Encodes the specified CreateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. + * @param message CreateAssetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.ICreatePartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.ICreateAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreatePartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreatePartitionRequest.verify|verify} messages. - * @param message CreatePartitionRequest message or plain object to encode + * Encodes the specified CreateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. + * @param message CreateAssetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ICreatePartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreatePartitionRequest message from the specified reader or buffer. + * Decodes a CreateAssetRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreatePartitionRequest + * @returns CreateAssetRequest * @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.dataplex.v1.CreatePartitionRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateAssetRequest; /** - * Decodes a CreatePartitionRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateAssetRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreatePartitionRequest + * @returns CreateAssetRequest * @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.dataplex.v1.CreatePartitionRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateAssetRequest; /** - * Verifies a CreatePartitionRequest message. + * Verifies a CreateAssetRequest 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 CreatePartitionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateAssetRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreatePartitionRequest + * @returns CreateAssetRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreatePartitionRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateAssetRequest; /** - * Creates a plain object from a CreatePartitionRequest message. Also converts values to other types if specified. - * @param message CreatePartitionRequest + * Creates a plain object from a CreateAssetRequest message. Also converts values to other types if specified. + * @param message CreateAssetRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.CreatePartitionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.CreateAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreatePartitionRequest to JSON. + * Converts this CreateAssetRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreatePartitionRequest + * Gets the default type url for CreateAssetRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeletePartitionRequest. */ - interface IDeletePartitionRequest { + /** Properties of an UpdateAssetRequest. */ + interface IUpdateAssetRequest { - /** DeletePartitionRequest name */ - name?: (string|null); + /** UpdateAssetRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); - /** DeletePartitionRequest etag */ - etag?: (string|null); + /** UpdateAssetRequest asset */ + asset?: (google.cloud.dataplex.v1.IAsset|null); + + /** UpdateAssetRequest validateOnly */ + validateOnly?: (boolean|null); } - /** Represents a DeletePartitionRequest. */ - class DeletePartitionRequest implements IDeletePartitionRequest { + /** Represents an UpdateAssetRequest. */ + class UpdateAssetRequest implements IUpdateAssetRequest { /** - * Constructs a new DeletePartitionRequest. + * Constructs a new UpdateAssetRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IDeletePartitionRequest); + constructor(properties?: google.cloud.dataplex.v1.IUpdateAssetRequest); - /** DeletePartitionRequest name. */ - public name: string; + /** UpdateAssetRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** DeletePartitionRequest etag. */ - public etag: string; + /** UpdateAssetRequest asset. */ + public asset?: (google.cloud.dataplex.v1.IAsset|null); + + /** UpdateAssetRequest validateOnly. */ + public validateOnly: boolean; /** - * Creates a new DeletePartitionRequest instance using the specified properties. + * Creates a new UpdateAssetRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeletePartitionRequest instance + * @returns UpdateAssetRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IDeletePartitionRequest): google.cloud.dataplex.v1.DeletePartitionRequest; + public static create(properties?: google.cloud.dataplex.v1.IUpdateAssetRequest): google.cloud.dataplex.v1.UpdateAssetRequest; /** - * Encodes the specified DeletePartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeletePartitionRequest.verify|verify} messages. - * @param message DeletePartitionRequest message or plain object to encode + * Encodes the specified UpdateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. + * @param message UpdateAssetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IDeletePartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IUpdateAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeletePartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeletePartitionRequest.verify|verify} messages. - * @param message DeletePartitionRequest message or plain object to encode + * Encodes the specified UpdateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. + * @param message UpdateAssetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDeletePartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeletePartitionRequest message from the specified reader or buffer. + * Decodes an UpdateAssetRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeletePartitionRequest + * @returns UpdateAssetRequest * @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.dataplex.v1.DeletePartitionRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateAssetRequest; /** - * Decodes a DeletePartitionRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateAssetRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeletePartitionRequest + * @returns UpdateAssetRequest * @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.dataplex.v1.DeletePartitionRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateAssetRequest; /** - * Verifies a DeletePartitionRequest message. + * Verifies an UpdateAssetRequest 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 DeletePartitionRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateAssetRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeletePartitionRequest + * @returns UpdateAssetRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeletePartitionRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateAssetRequest; /** - * Creates a plain object from a DeletePartitionRequest message. Also converts values to other types if specified. - * @param message DeletePartitionRequest + * Creates a plain object from an UpdateAssetRequest message. Also converts values to other types if specified. + * @param message UpdateAssetRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.DeletePartitionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.UpdateAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeletePartitionRequest to JSON. + * Converts this UpdateAssetRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeletePartitionRequest + * Gets the default type url for UpdateAssetRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListPartitionsResponse. */ - interface IListPartitionsResponse { - - /** ListPartitionsResponse partitions */ - partitions?: (google.cloud.dataplex.v1.IPartition[]|null); + /** Properties of a DeleteAssetRequest. */ + interface IDeleteAssetRequest { - /** ListPartitionsResponse nextPageToken */ - nextPageToken?: (string|null); + /** DeleteAssetRequest name */ + name?: (string|null); } - /** Represents a ListPartitionsResponse. */ - class ListPartitionsResponse implements IListPartitionsResponse { + /** Represents a DeleteAssetRequest. */ + class DeleteAssetRequest implements IDeleteAssetRequest { /** - * Constructs a new ListPartitionsResponse. + * Constructs a new DeleteAssetRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IListPartitionsResponse); - - /** ListPartitionsResponse partitions. */ - public partitions: google.cloud.dataplex.v1.IPartition[]; + constructor(properties?: google.cloud.dataplex.v1.IDeleteAssetRequest); - /** ListPartitionsResponse nextPageToken. */ - public nextPageToken: string; + /** DeleteAssetRequest name. */ + public name: string; /** - * Creates a new ListPartitionsResponse instance using the specified properties. + * Creates a new DeleteAssetRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListPartitionsResponse instance + * @returns DeleteAssetRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IListPartitionsResponse): google.cloud.dataplex.v1.ListPartitionsResponse; + public static create(properties?: google.cloud.dataplex.v1.IDeleteAssetRequest): google.cloud.dataplex.v1.DeleteAssetRequest; /** - * Encodes the specified ListPartitionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsResponse.verify|verify} messages. - * @param message ListPartitionsResponse message or plain object to encode + * Encodes the specified DeleteAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. + * @param message DeleteAssetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IListPartitionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IDeleteAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListPartitionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsResponse.verify|verify} messages. - * @param message ListPartitionsResponse message or plain object to encode + * Encodes the specified DeleteAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. + * @param message DeleteAssetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListPartitionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListPartitionsResponse message from the specified reader or buffer. + * Decodes a DeleteAssetRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListPartitionsResponse + * @returns DeleteAssetRequest * @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.dataplex.v1.ListPartitionsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteAssetRequest; /** - * Decodes a ListPartitionsResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteAssetRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListPartitionsResponse + * @returns DeleteAssetRequest * @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.dataplex.v1.ListPartitionsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteAssetRequest; /** - * Verifies a ListPartitionsResponse message. + * Verifies a DeleteAssetRequest 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 ListPartitionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteAssetRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListPartitionsResponse + * @returns DeleteAssetRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListPartitionsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteAssetRequest; /** - * Creates a plain object from a ListPartitionsResponse message. Also converts values to other types if specified. - * @param message ListPartitionsResponse + * Creates a plain object from a DeleteAssetRequest message. Also converts values to other types if specified. + * @param message DeleteAssetRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.ListPartitionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.DeleteAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListPartitionsResponse to JSON. + * Converts this DeleteAssetRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListPartitionsResponse + * Gets the default type url for DeleteAssetRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetPartitionRequest. */ - interface IGetPartitionRequest { + /** Properties of a ListAssetsRequest. */ + interface IListAssetsRequest { - /** GetPartitionRequest name */ - name?: (string|null); + /** ListAssetsRequest parent */ + parent?: (string|null); + + /** ListAssetsRequest pageSize */ + pageSize?: (number|null); + + /** ListAssetsRequest pageToken */ + pageToken?: (string|null); + + /** ListAssetsRequest filter */ + filter?: (string|null); + + /** ListAssetsRequest orderBy */ + orderBy?: (string|null); } - /** Represents a GetPartitionRequest. */ - class GetPartitionRequest implements IGetPartitionRequest { + /** Represents a ListAssetsRequest. */ + class ListAssetsRequest implements IListAssetsRequest { /** - * Constructs a new GetPartitionRequest. + * Constructs a new ListAssetsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IGetPartitionRequest); + constructor(properties?: google.cloud.dataplex.v1.IListAssetsRequest); - /** GetPartitionRequest name. */ - public name: string; + /** ListAssetsRequest parent. */ + public parent: string; + + /** ListAssetsRequest pageSize. */ + public pageSize: number; + + /** ListAssetsRequest pageToken. */ + public pageToken: string; + + /** ListAssetsRequest filter. */ + public filter: string; + + /** ListAssetsRequest orderBy. */ + public orderBy: string; /** - * Creates a new GetPartitionRequest instance using the specified properties. + * Creates a new ListAssetsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetPartitionRequest instance + * @returns ListAssetsRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IGetPartitionRequest): google.cloud.dataplex.v1.GetPartitionRequest; + public static create(properties?: google.cloud.dataplex.v1.IListAssetsRequest): google.cloud.dataplex.v1.ListAssetsRequest; /** - * Encodes the specified GetPartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetPartitionRequest.verify|verify} messages. - * @param message GetPartitionRequest message or plain object to encode + * Encodes the specified ListAssetsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. + * @param message ListAssetsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IGetPartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IListAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetPartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetPartitionRequest.verify|verify} messages. - * @param message GetPartitionRequest message or plain object to encode + * Encodes the specified ListAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. + * @param message ListAssetsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGetPartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetPartitionRequest message from the specified reader or buffer. + * Decodes a ListAssetsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetPartitionRequest + * @returns ListAssetsRequest * @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.dataplex.v1.GetPartitionRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListAssetsRequest; /** - * Decodes a GetPartitionRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAssetsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetPartitionRequest + * @returns ListAssetsRequest * @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.dataplex.v1.GetPartitionRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListAssetsRequest; /** - * Verifies a GetPartitionRequest message. + * Verifies a ListAssetsRequest 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 GetPartitionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAssetsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetPartitionRequest + * @returns ListAssetsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetPartitionRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListAssetsRequest; /** - * Creates a plain object from a GetPartitionRequest message. Also converts values to other types if specified. - * @param message GetPartitionRequest + * Creates a plain object from a ListAssetsRequest message. Also converts values to other types if specified. + * @param message ListAssetsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.GetPartitionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.ListAssetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetPartitionRequest to JSON. + * Converts this ListAssetsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetPartitionRequest + * Gets the default type url for ListAssetsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an Entity. */ - interface IEntity { - - /** Entity name */ - name?: (string|null); - - /** Entity displayName */ - displayName?: (string|null); - - /** Entity description */ - description?: (string|null); - - /** Entity createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Entity updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Entity id */ - id?: (string|null); - - /** Entity etag */ - etag?: (string|null); - - /** Entity type */ - type?: (google.cloud.dataplex.v1.Entity.Type|keyof typeof google.cloud.dataplex.v1.Entity.Type|null); - - /** Entity asset */ - asset?: (string|null); - - /** Entity dataPath */ - dataPath?: (string|null); - - /** Entity dataPathPattern */ - dataPathPattern?: (string|null); - - /** Entity catalogEntry */ - catalogEntry?: (string|null); - - /** Entity system */ - system?: (google.cloud.dataplex.v1.StorageSystem|keyof typeof google.cloud.dataplex.v1.StorageSystem|null); - - /** Entity format */ - format?: (google.cloud.dataplex.v1.IStorageFormat|null); + /** Properties of a ListAssetsResponse. */ + interface IListAssetsResponse { - /** Entity compatibility */ - compatibility?: (google.cloud.dataplex.v1.Entity.ICompatibilityStatus|null); + /** ListAssetsResponse assets */ + assets?: (google.cloud.dataplex.v1.IAsset[]|null); - /** Entity schema */ - schema?: (google.cloud.dataplex.v1.ISchema|null); + /** ListAssetsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents an Entity. */ - class Entity implements IEntity { + /** Represents a ListAssetsResponse. */ + class ListAssetsResponse implements IListAssetsResponse { /** - * Constructs a new Entity. + * Constructs a new ListAssetsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IEntity); - - /** Entity name. */ - public name: string; - - /** Entity displayName. */ - public displayName: string; - - /** Entity description. */ - public description: string; - - /** Entity createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Entity updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Entity id. */ - public id: string; - - /** Entity etag. */ - public etag: string; - - /** Entity type. */ - public type: (google.cloud.dataplex.v1.Entity.Type|keyof typeof google.cloud.dataplex.v1.Entity.Type); - - /** Entity asset. */ - public asset: string; - - /** Entity dataPath. */ - public dataPath: string; - - /** Entity dataPathPattern. */ - public dataPathPattern: string; - - /** Entity catalogEntry. */ - public catalogEntry: string; - - /** Entity system. */ - public system: (google.cloud.dataplex.v1.StorageSystem|keyof typeof google.cloud.dataplex.v1.StorageSystem); - - /** Entity format. */ - public format?: (google.cloud.dataplex.v1.IStorageFormat|null); - - /** Entity compatibility. */ - public compatibility?: (google.cloud.dataplex.v1.Entity.ICompatibilityStatus|null); + constructor(properties?: google.cloud.dataplex.v1.IListAssetsResponse); - /** Entity schema. */ - public schema?: (google.cloud.dataplex.v1.ISchema|null); + /** ListAssetsResponse assets. */ + public assets: google.cloud.dataplex.v1.IAsset[]; + + /** ListAssetsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new Entity instance using the specified properties. + * Creates a new ListAssetsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns Entity instance + * @returns ListAssetsResponse instance */ - public static create(properties?: google.cloud.dataplex.v1.IEntity): google.cloud.dataplex.v1.Entity; + public static create(properties?: google.cloud.dataplex.v1.IListAssetsResponse): google.cloud.dataplex.v1.ListAssetsResponse; /** - * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.verify|verify} messages. - * @param message Entity message or plain object to encode + * Encodes the specified ListAssetsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. + * @param message ListAssetsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IListAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.verify|verify} messages. - * @param message Entity message or plain object to encode + * Encodes the specified ListAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. + * @param message ListAssetsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Entity message from the specified reader or buffer. + * Decodes a ListAssetsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Entity + * @returns ListAssetsResponse * @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.dataplex.v1.Entity; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListAssetsResponse; /** - * Decodes an Entity message from the specified reader or buffer, length delimited. + * Decodes a ListAssetsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Entity + * @returns ListAssetsResponse * @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.dataplex.v1.Entity; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListAssetsResponse; /** - * Verifies an Entity message. + * Verifies a ListAssetsResponse 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 Entity message from a plain object. Also converts values to their respective internal types. + * Creates a ListAssetsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Entity + * @returns ListAssetsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Entity; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListAssetsResponse; /** - * Creates a plain object from an Entity message. Also converts values to other types if specified. - * @param message Entity + * Creates a plain object from a ListAssetsResponse message. Also converts values to other types if specified. + * @param message ListAssetsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.Entity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.ListAssetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Entity to JSON. + * Converts this ListAssetsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Entity + * Gets the default type url for ListAssetsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Entity { - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - TABLE = 1, - FILESET = 2 - } - - /** Properties of a CompatibilityStatus. */ - interface ICompatibilityStatus { - - /** CompatibilityStatus hiveMetastore */ - hiveMetastore?: (google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null); - - /** CompatibilityStatus bigquery */ - bigquery?: (google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null); - } - - /** Represents a CompatibilityStatus. */ - class CompatibilityStatus implements ICompatibilityStatus { - - /** - * Constructs a new CompatibilityStatus. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Entity.ICompatibilityStatus); - - /** CompatibilityStatus hiveMetastore. */ - public hiveMetastore?: (google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null); - - /** CompatibilityStatus bigquery. */ - public bigquery?: (google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null); - - /** - * Creates a new CompatibilityStatus instance using the specified properties. - * @param [properties] Properties to set - * @returns CompatibilityStatus instance - */ - public static create(properties?: google.cloud.dataplex.v1.Entity.ICompatibilityStatus): google.cloud.dataplex.v1.Entity.CompatibilityStatus; - - /** - * Encodes the specified CompatibilityStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify|verify} messages. - * @param message CompatibilityStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Entity.ICompatibilityStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CompatibilityStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify|verify} messages. - * @param message CompatibilityStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Entity.ICompatibilityStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CompatibilityStatus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CompatibilityStatus - * @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.dataplex.v1.Entity.CompatibilityStatus; - - /** - * Decodes a CompatibilityStatus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CompatibilityStatus - * @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.dataplex.v1.Entity.CompatibilityStatus; - - /** - * Verifies a CompatibilityStatus 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 CompatibilityStatus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CompatibilityStatus - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Entity.CompatibilityStatus; - - /** - * Creates a plain object from a CompatibilityStatus message. Also converts values to other types if specified. - * @param message CompatibilityStatus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Entity.CompatibilityStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CompatibilityStatus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CompatibilityStatus - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Properties of a ListAssetActionsRequest. */ + interface IListAssetActionsRequest { - namespace CompatibilityStatus { + /** ListAssetActionsRequest parent */ + parent?: (string|null); - /** Properties of a Compatibility. */ - interface ICompatibility { + /** ListAssetActionsRequest pageSize */ + pageSize?: (number|null); - /** Compatibility compatible */ - compatible?: (boolean|null); + /** ListAssetActionsRequest pageToken */ + pageToken?: (string|null); + } - /** Compatibility reason */ - reason?: (string|null); - } + /** Represents a ListAssetActionsRequest. */ + class ListAssetActionsRequest implements IListAssetActionsRequest { - /** Represents a Compatibility. */ - class Compatibility implements ICompatibility { + /** + * Constructs a new ListAssetActionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListAssetActionsRequest); - /** - * Constructs a new Compatibility. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility); + /** ListAssetActionsRequest parent. */ + public parent: string; - /** Compatibility compatible. */ - public compatible: boolean; + /** ListAssetActionsRequest pageSize. */ + public pageSize: number; - /** Compatibility reason. */ - public reason: string; + /** ListAssetActionsRequest pageToken. */ + public pageToken: string; - /** - * Creates a new Compatibility instance using the specified properties. - * @param [properties] Properties to set - * @returns Compatibility instance - */ - public static create(properties?: google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility): google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility; + /** + * Creates a new ListAssetActionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAssetActionsRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListAssetActionsRequest): google.cloud.dataplex.v1.ListAssetActionsRequest; - /** - * Encodes the specified Compatibility message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify|verify} messages. - * @param message Compatibility message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ListAssetActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. + * @param message ListAssetActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListAssetActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified Compatibility message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify|verify} messages. - * @param message Compatibility message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ListAssetActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. + * @param message ListAssetActionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListAssetActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a Compatibility message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Compatibility - * @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.dataplex.v1.Entity.CompatibilityStatus.Compatibility; + /** + * Decodes a ListAssetActionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAssetActionsRequest + * @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.dataplex.v1.ListAssetActionsRequest; - /** - * Decodes a Compatibility message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Compatibility - * @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.dataplex.v1.Entity.CompatibilityStatus.Compatibility; + /** + * Decodes a ListAssetActionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAssetActionsRequest + * @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.dataplex.v1.ListAssetActionsRequest; - /** - * Verifies a Compatibility 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); + /** + * Verifies a ListAssetActionsRequest 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 Compatibility message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Compatibility - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility; + /** + * Creates a ListAssetActionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAssetActionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListAssetActionsRequest; - /** - * Creates a plain object from a Compatibility message. Also converts values to other types if specified. - * @param message Compatibility - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a ListAssetActionsRequest message. Also converts values to other types if specified. + * @param message ListAssetActionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListAssetActionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this Compatibility to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this ListAssetActionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for Compatibility - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** + * Gets the default type url for ListAssetActionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Partition. */ - interface IPartition { + /** Properties of a GetAssetRequest. */ + interface IGetAssetRequest { - /** Partition name */ + /** GetAssetRequest name */ name?: (string|null); - - /** Partition values */ - values?: (string[]|null); - - /** Partition location */ - location?: (string|null); - - /** Partition etag */ - etag?: (string|null); } - /** Represents a Partition. */ - class Partition implements IPartition { + /** Represents a GetAssetRequest. */ + class GetAssetRequest implements IGetAssetRequest { /** - * Constructs a new Partition. + * Constructs a new GetAssetRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IPartition); + constructor(properties?: google.cloud.dataplex.v1.IGetAssetRequest); - /** Partition name. */ + /** GetAssetRequest name. */ public name: string; - /** Partition values. */ - public values: string[]; - - /** Partition location. */ - public location: string; - - /** Partition etag. */ - public etag: string; - /** - * Creates a new Partition instance using the specified properties. + * Creates a new GetAssetRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Partition instance + * @returns GetAssetRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IPartition): google.cloud.dataplex.v1.Partition; + public static create(properties?: google.cloud.dataplex.v1.IGetAssetRequest): google.cloud.dataplex.v1.GetAssetRequest; /** - * Encodes the specified Partition message. Does not implicitly {@link google.cloud.dataplex.v1.Partition.verify|verify} messages. - * @param message Partition message or plain object to encode + * Encodes the specified GetAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. + * @param message GetAssetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IPartition, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IGetAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Partition message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Partition.verify|verify} messages. - * @param message Partition message or plain object to encode + * Encodes the specified GetAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. + * @param message GetAssetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IPartition, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Partition message from the specified reader or buffer. + * Decodes a GetAssetRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Partition + * @returns GetAssetRequest * @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.dataplex.v1.Partition; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetAssetRequest; /** - * Decodes a Partition message from the specified reader or buffer, length delimited. + * Decodes a GetAssetRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Partition + * @returns GetAssetRequest * @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.dataplex.v1.Partition; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetAssetRequest; /** - * Verifies a Partition message. + * Verifies a GetAssetRequest 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 Partition message from a plain object. Also converts values to their respective internal types. + * Creates a GetAssetRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Partition + * @returns GetAssetRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Partition; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetAssetRequest; /** - * Creates a plain object from a Partition message. Also converts values to other types if specified. - * @param message Partition + * Creates a plain object from a GetAssetRequest message. Also converts values to other types if specified. + * @param message GetAssetRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.Partition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.GetAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Partition to JSON. + * Converts this GetAssetRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Partition + * Gets the default type url for GetAssetRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Schema. */ - interface ISchema { + /** Properties of an OperationMetadata. */ + interface IOperationMetadata { - /** Schema userManaged */ - userManaged?: (boolean|null); + /** OperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** Schema fields */ - fields?: (google.cloud.dataplex.v1.Schema.ISchemaField[]|null); + /** OperationMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); - /** Schema partitionFields */ - partitionFields?: (google.cloud.dataplex.v1.Schema.IPartitionField[]|null); + /** OperationMetadata target */ + target?: (string|null); - /** Schema partitionStyle */ - partitionStyle?: (google.cloud.dataplex.v1.Schema.PartitionStyle|keyof typeof google.cloud.dataplex.v1.Schema.PartitionStyle|null); + /** OperationMetadata verb */ + verb?: (string|null); + + /** OperationMetadata statusMessage */ + statusMessage?: (string|null); + + /** OperationMetadata requestedCancellation */ + requestedCancellation?: (boolean|null); + + /** OperationMetadata apiVersion */ + apiVersion?: (string|null); } - /** Represents a Schema. */ - class Schema implements ISchema { + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { /** - * Constructs a new Schema. + * Constructs a new OperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.ISchema); + constructor(properties?: google.cloud.dataplex.v1.IOperationMetadata); - /** Schema userManaged. */ - public userManaged: boolean; + /** OperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** Schema fields. */ - public fields: google.cloud.dataplex.v1.Schema.ISchemaField[]; + /** OperationMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); - /** Schema partitionFields. */ - public partitionFields: google.cloud.dataplex.v1.Schema.IPartitionField[]; + /** OperationMetadata target. */ + public target: string; - /** Schema partitionStyle. */ - public partitionStyle: (google.cloud.dataplex.v1.Schema.PartitionStyle|keyof typeof google.cloud.dataplex.v1.Schema.PartitionStyle); + /** OperationMetadata verb. */ + public verb: string; + + /** OperationMetadata statusMessage. */ + public statusMessage: string; + + /** OperationMetadata requestedCancellation. */ + public requestedCancellation: boolean; + + /** OperationMetadata apiVersion. */ + public apiVersion: string; /** - * Creates a new Schema instance using the specified properties. + * Creates a new OperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns Schema instance + * @returns OperationMetadata instance */ - public static create(properties?: google.cloud.dataplex.v1.ISchema): google.cloud.dataplex.v1.Schema; + public static create(properties?: google.cloud.dataplex.v1.IOperationMetadata): google.cloud.dataplex.v1.OperationMetadata; /** - * Encodes the specified Schema message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.verify|verify} messages. - * @param message Schema message or plain object to encode + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.dataplex.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.ISchema, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Schema message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.verify|verify} messages. - * @param message Schema message or plain object to encode + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ISchema, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Schema message from the specified reader or buffer. + * Decodes an OperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Schema + * @returns OperationMetadata * @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.dataplex.v1.Schema; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.OperationMetadata; /** - * Decodes a Schema message from the specified reader or buffer, length delimited. + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Schema + * @returns OperationMetadata * @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.dataplex.v1.Schema; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.OperationMetadata; /** - * Verifies a Schema message. + * Verifies an OperationMetadata 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 Schema message from a plain object. Also converts values to their respective internal types. + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Schema + * @returns OperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Schema; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.OperationMetadata; /** - * Creates a plain object from a Schema message. Also converts values to other types if specified. - * @param message Schema + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @param message OperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.Schema, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Schema to JSON. + * Converts this OperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Schema + * Gets the default type url for OperationMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Schema { - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - BOOLEAN = 1, - BYTE = 2, - INT16 = 3, - INT32 = 4, - INT64 = 5, - FLOAT = 6, - DOUBLE = 7, - DECIMAL = 8, - STRING = 9, - BINARY = 10, - TIMESTAMP = 11, - DATE = 12, - TIME = 13, - RECORD = 14, - NULL = 100 - } - - /** Mode enum. */ - enum Mode { - MODE_UNSPECIFIED = 0, - REQUIRED = 1, - NULLABLE = 2, - REPEATED = 3 - } - - /** Properties of a SchemaField. */ - interface ISchemaField { - - /** SchemaField name */ - name?: (string|null); - - /** SchemaField description */ - description?: (string|null); - - /** SchemaField type */ - type?: (google.cloud.dataplex.v1.Schema.Type|keyof typeof google.cloud.dataplex.v1.Schema.Type|null); - - /** SchemaField mode */ - mode?: (google.cloud.dataplex.v1.Schema.Mode|keyof typeof google.cloud.dataplex.v1.Schema.Mode|null); - - /** SchemaField fields */ - fields?: (google.cloud.dataplex.v1.Schema.ISchemaField[]|null); - } - - /** Represents a SchemaField. */ - class SchemaField implements ISchemaField { - - /** - * Constructs a new SchemaField. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Schema.ISchemaField); - - /** SchemaField name. */ - public name: string; - - /** SchemaField description. */ - public description: string; - - /** SchemaField type. */ - public type: (google.cloud.dataplex.v1.Schema.Type|keyof typeof google.cloud.dataplex.v1.Schema.Type); - - /** SchemaField mode. */ - public mode: (google.cloud.dataplex.v1.Schema.Mode|keyof typeof google.cloud.dataplex.v1.Schema.Mode); - - /** SchemaField fields. */ - public fields: google.cloud.dataplex.v1.Schema.ISchemaField[]; - - /** - * Creates a new SchemaField instance using the specified properties. - * @param [properties] Properties to set - * @returns SchemaField instance - */ - public static create(properties?: google.cloud.dataplex.v1.Schema.ISchemaField): google.cloud.dataplex.v1.Schema.SchemaField; + /** Properties of a CreateTaskRequest. */ + interface ICreateTaskRequest { - /** - * Encodes the specified SchemaField message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.SchemaField.verify|verify} messages. - * @param message SchemaField message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Schema.ISchemaField, writer?: $protobuf.Writer): $protobuf.Writer; + /** CreateTaskRequest parent */ + parent?: (string|null); - /** - * Encodes the specified SchemaField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.SchemaField.verify|verify} messages. - * @param message SchemaField message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Schema.ISchemaField, writer?: $protobuf.Writer): $protobuf.Writer; + /** CreateTaskRequest taskId */ + taskId?: (string|null); - /** - * Decodes a SchemaField message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SchemaField - * @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.dataplex.v1.Schema.SchemaField; + /** CreateTaskRequest task */ + task?: (google.cloud.dataplex.v1.ITask|null); - /** - * Decodes a SchemaField message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SchemaField - * @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.dataplex.v1.Schema.SchemaField; + /** CreateTaskRequest validateOnly */ + validateOnly?: (boolean|null); + } - /** - * Verifies a SchemaField 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); + /** Represents a CreateTaskRequest. */ + class CreateTaskRequest implements ICreateTaskRequest { - /** - * Creates a SchemaField message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SchemaField - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Schema.SchemaField; + /** + * Constructs a new CreateTaskRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ICreateTaskRequest); - /** - * Creates a plain object from a SchemaField message. Also converts values to other types if specified. - * @param message SchemaField - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Schema.SchemaField, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** CreateTaskRequest parent. */ + public parent: string; - /** - * Converts this SchemaField to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** CreateTaskRequest taskId. */ + public taskId: string; - /** - * Gets the default type url for SchemaField - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** CreateTaskRequest task. */ + public task?: (google.cloud.dataplex.v1.ITask|null); - /** Properties of a PartitionField. */ - interface IPartitionField { + /** CreateTaskRequest validateOnly. */ + public validateOnly: boolean; - /** PartitionField name */ - name?: (string|null); + /** + * Creates a new CreateTaskRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateTaskRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.ICreateTaskRequest): google.cloud.dataplex.v1.CreateTaskRequest; - /** PartitionField type */ - type?: (google.cloud.dataplex.v1.Schema.Type|keyof typeof google.cloud.dataplex.v1.Schema.Type|null); - } + /** + * Encodes the specified CreateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. + * @param message CreateTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ICreateTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a PartitionField. */ - class PartitionField implements IPartitionField { + /** + * Encodes the specified CreateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. + * @param message CreateTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new PartitionField. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Schema.IPartitionField); + /** + * Decodes a CreateTaskRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateTaskRequest + * @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.dataplex.v1.CreateTaskRequest; - /** PartitionField name. */ - public name: string; + /** + * Decodes a CreateTaskRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateTaskRequest + * @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.dataplex.v1.CreateTaskRequest; - /** PartitionField type. */ - public type: (google.cloud.dataplex.v1.Schema.Type|keyof typeof google.cloud.dataplex.v1.Schema.Type); + /** + * Verifies a CreateTaskRequest 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 new PartitionField instance using the specified properties. - * @param [properties] Properties to set - * @returns PartitionField instance - */ - public static create(properties?: google.cloud.dataplex.v1.Schema.IPartitionField): google.cloud.dataplex.v1.Schema.PartitionField; + /** + * Creates a CreateTaskRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateTaskRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateTaskRequest; - /** - * Encodes the specified PartitionField message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.PartitionField.verify|verify} messages. - * @param message PartitionField message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Schema.IPartitionField, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from a CreateTaskRequest message. Also converts values to other types if specified. + * @param message CreateTaskRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.CreateTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified PartitionField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.PartitionField.verify|verify} messages. - * @param message PartitionField message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Schema.IPartitionField, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this CreateTaskRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Decodes a PartitionField message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PartitionField - * @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.dataplex.v1.Schema.PartitionField; + /** + * Gets the default type url for CreateTaskRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Decodes a PartitionField message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PartitionField - * @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.dataplex.v1.Schema.PartitionField; + /** Properties of an UpdateTaskRequest. */ + interface IUpdateTaskRequest { - /** - * Verifies a PartitionField 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); + /** UpdateTaskRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); - /** - * Creates a PartitionField message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PartitionField - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Schema.PartitionField; + /** UpdateTaskRequest task */ + task?: (google.cloud.dataplex.v1.ITask|null); - /** - * Creates a plain object from a PartitionField message. Also converts values to other types if specified. - * @param message PartitionField - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Schema.PartitionField, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** UpdateTaskRequest validateOnly */ + validateOnly?: (boolean|null); + } - /** - * Converts this PartitionField to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Represents an UpdateTaskRequest. */ + class UpdateTaskRequest implements IUpdateTaskRequest { - /** - * Gets the default type url for PartitionField - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Constructs a new UpdateTaskRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IUpdateTaskRequest); - /** PartitionStyle enum. */ - enum PartitionStyle { - PARTITION_STYLE_UNSPECIFIED = 0, - HIVE_COMPATIBLE = 1 - } - } + /** UpdateTaskRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** Properties of a StorageFormat. */ - interface IStorageFormat { + /** UpdateTaskRequest task. */ + public task?: (google.cloud.dataplex.v1.ITask|null); - /** StorageFormat format */ - format?: (google.cloud.dataplex.v1.StorageFormat.Format|keyof typeof google.cloud.dataplex.v1.StorageFormat.Format|null); + /** UpdateTaskRequest validateOnly. */ + public validateOnly: boolean; - /** StorageFormat compressionFormat */ - compressionFormat?: (google.cloud.dataplex.v1.StorageFormat.CompressionFormat|keyof typeof google.cloud.dataplex.v1.StorageFormat.CompressionFormat|null); + /** + * Creates a new UpdateTaskRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateTaskRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IUpdateTaskRequest): google.cloud.dataplex.v1.UpdateTaskRequest; - /** StorageFormat mimeType */ - mimeType?: (string|null); + /** + * Encodes the specified UpdateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. + * @param message UpdateTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IUpdateTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** StorageFormat csv */ - csv?: (google.cloud.dataplex.v1.StorageFormat.ICsvOptions|null); + /** + * Encodes the specified UpdateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. + * @param message UpdateTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** StorageFormat json */ - json?: (google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null); + /** + * Decodes an UpdateTaskRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateTaskRequest + * @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.dataplex.v1.UpdateTaskRequest; - /** StorageFormat iceberg */ - iceberg?: (google.cloud.dataplex.v1.StorageFormat.IIcebergOptions|null); - } + /** + * Decodes an UpdateTaskRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateTaskRequest + * @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.dataplex.v1.UpdateTaskRequest; - /** Represents a StorageFormat. */ - class StorageFormat implements IStorageFormat { + /** + * Verifies an UpdateTaskRequest 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); /** - * Constructs a new StorageFormat. - * @param [properties] Properties to set + * Creates an UpdateTaskRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateTaskRequest */ - constructor(properties?: google.cloud.dataplex.v1.IStorageFormat); + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateTaskRequest; - /** StorageFormat format. */ - public format: (google.cloud.dataplex.v1.StorageFormat.Format|keyof typeof google.cloud.dataplex.v1.StorageFormat.Format); + /** + * Creates a plain object from an UpdateTaskRequest message. Also converts values to other types if specified. + * @param message UpdateTaskRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.UpdateTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** StorageFormat compressionFormat. */ - public compressionFormat: (google.cloud.dataplex.v1.StorageFormat.CompressionFormat|keyof typeof google.cloud.dataplex.v1.StorageFormat.CompressionFormat); + /** + * Converts this UpdateTaskRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** StorageFormat mimeType. */ - public mimeType: string; + /** + * Gets the default type url for UpdateTaskRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** StorageFormat csv. */ - public csv?: (google.cloud.dataplex.v1.StorageFormat.ICsvOptions|null); + /** Properties of a DeleteTaskRequest. */ + interface IDeleteTaskRequest { - /** StorageFormat json. */ - public json?: (google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null); + /** DeleteTaskRequest name */ + name?: (string|null); + } - /** StorageFormat iceberg. */ - public iceberg?: (google.cloud.dataplex.v1.StorageFormat.IIcebergOptions|null); + /** Represents a DeleteTaskRequest. */ + class DeleteTaskRequest implements IDeleteTaskRequest { - /** StorageFormat options. */ - public options?: ("csv"|"json"|"iceberg"); + /** + * Constructs a new DeleteTaskRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IDeleteTaskRequest); + + /** DeleteTaskRequest name. */ + public name: string; /** - * Creates a new StorageFormat instance using the specified properties. + * Creates a new DeleteTaskRequest instance using the specified properties. * @param [properties] Properties to set - * @returns StorageFormat instance + * @returns DeleteTaskRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IStorageFormat): google.cloud.dataplex.v1.StorageFormat; + public static create(properties?: google.cloud.dataplex.v1.IDeleteTaskRequest): google.cloud.dataplex.v1.DeleteTaskRequest; /** - * Encodes the specified StorageFormat message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.verify|verify} messages. - * @param message StorageFormat message or plain object to encode + * Encodes the specified DeleteTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. + * @param message DeleteTaskRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IStorageFormat, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IDeleteTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StorageFormat message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.verify|verify} messages. - * @param message StorageFormat message or plain object to encode + * Encodes the specified DeleteTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. + * @param message DeleteTaskRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IStorageFormat, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StorageFormat message from the specified reader or buffer. + * Decodes a DeleteTaskRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StorageFormat + * @returns DeleteTaskRequest * @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.dataplex.v1.StorageFormat; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteTaskRequest; /** - * Decodes a StorageFormat message from the specified reader or buffer, length delimited. + * Decodes a DeleteTaskRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StorageFormat + * @returns DeleteTaskRequest * @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.dataplex.v1.StorageFormat; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteTaskRequest; /** - * Verifies a StorageFormat message. + * Verifies a DeleteTaskRequest 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 StorageFormat message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteTaskRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StorageFormat + * @returns DeleteTaskRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.StorageFormat; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteTaskRequest; /** - * Creates a plain object from a StorageFormat message. Also converts values to other types if specified. - * @param message StorageFormat + * Creates a plain object from a DeleteTaskRequest message. Also converts values to other types if specified. + * @param message DeleteTaskRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.StorageFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.DeleteTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StorageFormat to JSON. + * Converts this DeleteTaskRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for StorageFormat + * Gets the default type url for DeleteTaskRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace StorageFormat { - - /** Properties of a CsvOptions. */ - interface ICsvOptions { - - /** CsvOptions encoding */ - encoding?: (string|null); - - /** CsvOptions headerRows */ - headerRows?: (number|null); - - /** CsvOptions delimiter */ - delimiter?: (string|null); - - /** CsvOptions quote */ - quote?: (string|null); - } - - /** Represents a CsvOptions. */ - class CsvOptions implements ICsvOptions { - - /** - * Constructs a new CsvOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.StorageFormat.ICsvOptions); - - /** CsvOptions encoding. */ - public encoding: string; - - /** CsvOptions headerRows. */ - public headerRows: number; - - /** CsvOptions delimiter. */ - public delimiter: string; - - /** CsvOptions quote. */ - public quote: string; - - /** - * Creates a new CsvOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns CsvOptions instance - */ - public static create(properties?: google.cloud.dataplex.v1.StorageFormat.ICsvOptions): google.cloud.dataplex.v1.StorageFormat.CsvOptions; - - /** - * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify|verify} messages. - * @param message CsvOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.StorageFormat.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify|verify} messages. - * @param message CsvOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.StorageFormat.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CsvOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CsvOptions - * @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.dataplex.v1.StorageFormat.CsvOptions; - - /** - * Decodes a CsvOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CsvOptions - * @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.dataplex.v1.StorageFormat.CsvOptions; - - /** - * Verifies a CsvOptions 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 CsvOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CsvOptions - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.StorageFormat.CsvOptions; - - /** - * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. - * @param message CsvOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.StorageFormat.CsvOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CsvOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CsvOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a JsonOptions. */ - interface IJsonOptions { - - /** JsonOptions encoding */ - encoding?: (string|null); - } - - /** Represents a JsonOptions. */ - class JsonOptions implements IJsonOptions { - - /** - * Constructs a new JsonOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.StorageFormat.IJsonOptions); - - /** JsonOptions encoding. */ - public encoding: string; - - /** - * Creates a new JsonOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns JsonOptions instance - */ - public static create(properties?: google.cloud.dataplex.v1.StorageFormat.IJsonOptions): google.cloud.dataplex.v1.StorageFormat.JsonOptions; + /** Properties of a ListTasksRequest. */ + interface IListTasksRequest { - /** - * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify|verify} messages. - * @param message JsonOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.StorageFormat.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListTasksRequest parent */ + parent?: (string|null); - /** - * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify|verify} messages. - * @param message JsonOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.StorageFormat.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListTasksRequest pageSize */ + pageSize?: (number|null); - /** - * Decodes a JsonOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns JsonOptions - * @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.dataplex.v1.StorageFormat.JsonOptions; + /** ListTasksRequest pageToken */ + pageToken?: (string|null); - /** - * Decodes a JsonOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns JsonOptions - * @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.dataplex.v1.StorageFormat.JsonOptions; + /** ListTasksRequest filter */ + filter?: (string|null); - /** - * Verifies a JsonOptions 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); + /** ListTasksRequest orderBy */ + orderBy?: (string|null); + } - /** - * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns JsonOptions - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.StorageFormat.JsonOptions; + /** Represents a ListTasksRequest. */ + class ListTasksRequest implements IListTasksRequest { - /** - * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. - * @param message JsonOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.StorageFormat.JsonOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new ListTasksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListTasksRequest); - /** - * Converts this JsonOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** ListTasksRequest parent. */ + public parent: string; - /** - * Gets the default type url for JsonOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** ListTasksRequest pageSize. */ + public pageSize: number; - /** Properties of an IcebergOptions. */ - interface IIcebergOptions { + /** ListTasksRequest pageToken. */ + public pageToken: string; - /** IcebergOptions metadataLocation */ - metadataLocation?: (string|null); - } + /** ListTasksRequest filter. */ + public filter: string; - /** Represents an IcebergOptions. */ - class IcebergOptions implements IIcebergOptions { + /** ListTasksRequest orderBy. */ + public orderBy: string; - /** - * Constructs a new IcebergOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.StorageFormat.IIcebergOptions); + /** + * Creates a new ListTasksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTasksRequest instance + */ + public static create(properties?: google.cloud.dataplex.v1.IListTasksRequest): google.cloud.dataplex.v1.ListTasksRequest; - /** IcebergOptions metadataLocation. */ - public metadataLocation: string; + /** + * Encodes the specified ListTasksRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. + * @param message ListTasksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IListTasksRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new IcebergOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns IcebergOptions instance - */ - public static create(properties?: google.cloud.dataplex.v1.StorageFormat.IIcebergOptions): google.cloud.dataplex.v1.StorageFormat.IcebergOptions; + /** + * Encodes the specified ListTasksRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. + * @param message ListTasksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IListTasksRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified IcebergOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.IcebergOptions.verify|verify} messages. - * @param message IcebergOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.StorageFormat.IIcebergOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a ListTasksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTasksRequest + * @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.dataplex.v1.ListTasksRequest; - /** - * Encodes the specified IcebergOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.IcebergOptions.verify|verify} messages. - * @param message IcebergOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.StorageFormat.IIcebergOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a ListTasksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTasksRequest + * @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.dataplex.v1.ListTasksRequest; - /** - * Decodes an IcebergOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IcebergOptions - * @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.dataplex.v1.StorageFormat.IcebergOptions; + /** + * Verifies a ListTasksRequest 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); - /** - * Decodes an IcebergOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IcebergOptions - * @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.dataplex.v1.StorageFormat.IcebergOptions; + /** + * Creates a ListTasksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTasksRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListTasksRequest; - /** - * Verifies an IcebergOptions 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 plain object from a ListTasksRequest message. Also converts values to other types if specified. + * @param message ListTasksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.ListTasksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates an IcebergOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IcebergOptions - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.StorageFormat.IcebergOptions; + /** + * Converts this ListTasksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a plain object from an IcebergOptions message. Also converts values to other types if specified. - * @param message IcebergOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.StorageFormat.IcebergOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Gets the default type url for ListTasksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Converts this IcebergOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Properties of a ListTasksResponse. */ + interface IListTasksResponse { - /** - * Gets the default type url for IcebergOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** ListTasksResponse tasks */ + tasks?: (google.cloud.dataplex.v1.ITask[]|null); - /** Format enum. */ - enum Format { - FORMAT_UNSPECIFIED = 0, - PARQUET = 1, - AVRO = 2, - ORC = 3, - CSV = 100, - JSON = 101, - IMAGE = 200, - AUDIO = 201, - VIDEO = 202, - TEXT = 203, - TFRECORD = 204, - OTHER = 1000, - UNKNOWN = 1001 - } + /** ListTasksResponse nextPageToken */ + nextPageToken?: (string|null); - /** CompressionFormat enum. */ - enum CompressionFormat { - COMPRESSION_FORMAT_UNSPECIFIED = 0, - GZIP = 2, - BZIP2 = 3 - } + /** ListTasksResponse unreachableLocations */ + unreachableLocations?: (string[]|null); } - /** StorageSystem enum. */ - enum StorageSystem { - STORAGE_SYSTEM_UNSPECIFIED = 0, - CLOUD_STORAGE = 1, - BIGQUERY = 2 - } + /** Represents a ListTasksResponse. */ + class ListTasksResponse implements IListTasksResponse { - /** Represents a DataplexService */ - class DataplexService extends $protobuf.rpc.Service { + /** + * Constructs a new ListTasksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IListTasksResponse); + + /** ListTasksResponse tasks. */ + public tasks: google.cloud.dataplex.v1.ITask[]; + + /** ListTasksResponse nextPageToken. */ + public nextPageToken: string; + + /** ListTasksResponse unreachableLocations. */ + public unreachableLocations: string[]; /** - * Constructs a new DataplexService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited + * Creates a new ListTasksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTasksResponse instance */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + public static create(properties?: google.cloud.dataplex.v1.IListTasksResponse): google.cloud.dataplex.v1.ListTasksResponse; /** - * Creates new DataplexService 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. + * Encodes the specified ListTasksResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. + * @param message ListTasksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): DataplexService; + public static encode(message: google.cloud.dataplex.v1.IListTasksResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreateLake. - * @param request CreateLakeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Encodes the specified ListTasksResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. + * @param message ListTasksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public createLake(request: google.cloud.dataplex.v1.ICreateLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateLakeCallback): void; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListTasksResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreateLake. - * @param request CreateLakeRequest message or plain object - * @returns Promise + * Decodes a ListTasksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTasksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createLake(request: google.cloud.dataplex.v1.ICreateLakeRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListTasksResponse; /** - * Calls UpdateLake. - * @param request UpdateLakeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Decodes a ListTasksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTasksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public updateLake(request: google.cloud.dataplex.v1.IUpdateLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateLakeCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListTasksResponse; /** - * Calls UpdateLake. - * @param request UpdateLakeRequest message or plain object - * @returns Promise + * Verifies a ListTasksResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public updateLake(request: google.cloud.dataplex.v1.IUpdateLakeRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls DeleteLake. - * @param request DeleteLakeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Creates a ListTasksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTasksResponse */ - public deleteLake(request: google.cloud.dataplex.v1.IDeleteLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteLakeCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListTasksResponse; /** - * Calls DeleteLake. - * @param request DeleteLakeRequest message or plain object - * @returns Promise + * Creates a plain object from a ListTasksResponse message. Also converts values to other types if specified. + * @param message ListTasksResponse + * @param [options] Conversion options + * @returns Plain object */ - public deleteLake(request: google.cloud.dataplex.v1.IDeleteLakeRequest): Promise; + public static toObject(message: google.cloud.dataplex.v1.ListTasksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls ListLakes. - * @param request ListLakesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListLakesResponse + * Converts this ListTasksResponse to JSON. + * @returns JSON object */ - public listLakes(request: google.cloud.dataplex.v1.IListLakesRequest, callback: google.cloud.dataplex.v1.DataplexService.ListLakesCallback): void; + public toJSON(): { [k: string]: any }; /** - * Calls ListLakes. - * @param request ListLakesRequest message or plain object - * @returns Promise + * Gets the default type url for ListTasksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public listLakes(request: google.cloud.dataplex.v1.IListLakesRequest): Promise; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetTaskRequest. */ + interface IGetTaskRequest { + + /** GetTaskRequest name */ + name?: (string|null); + } + + /** Represents a GetTaskRequest. */ + class GetTaskRequest implements IGetTaskRequest { /** - * Calls GetLake. - * @param request GetLakeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Lake + * Constructs a new GetTaskRequest. + * @param [properties] Properties to set */ - public getLake(request: google.cloud.dataplex.v1.IGetLakeRequest, callback: google.cloud.dataplex.v1.DataplexService.GetLakeCallback): void; + constructor(properties?: google.cloud.dataplex.v1.IGetTaskRequest); + + /** GetTaskRequest name. */ + public name: string; /** - * Calls GetLake. - * @param request GetLakeRequest message or plain object - * @returns Promise + * Creates a new GetTaskRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetTaskRequest instance */ - public getLake(request: google.cloud.dataplex.v1.IGetLakeRequest): Promise; + public static create(properties?: google.cloud.dataplex.v1.IGetTaskRequest): google.cloud.dataplex.v1.GetTaskRequest; /** - * Calls ListLakeActions. - * @param request ListLakeActionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListActionsResponse + * Encodes the specified GetTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. + * @param message GetTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listLakeActions(request: google.cloud.dataplex.v1.IListLakeActionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListLakeActionsCallback): void; + public static encode(message: google.cloud.dataplex.v1.IGetTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListLakeActions. - * @param request ListLakeActionsRequest message or plain object - * @returns Promise + * Encodes the specified GetTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. + * @param message GetTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listLakeActions(request: google.cloud.dataplex.v1.IListLakeActionsRequest): Promise; + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreateZone. - * @param request CreateZoneRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Decodes a GetTaskRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createZone(request: google.cloud.dataplex.v1.ICreateZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateZoneCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetTaskRequest; /** - * Calls CreateZone. - * @param request CreateZoneRequest message or plain object - * @returns Promise + * Decodes a GetTaskRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createZone(request: google.cloud.dataplex.v1.ICreateZoneRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetTaskRequest; /** - * Calls UpdateZone. - * @param request UpdateZoneRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Verifies a GetTaskRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public updateZone(request: google.cloud.dataplex.v1.IUpdateZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateZoneCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls UpdateZone. - * @param request UpdateZoneRequest message or plain object - * @returns Promise + * Creates a GetTaskRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetTaskRequest */ - public updateZone(request: google.cloud.dataplex.v1.IUpdateZoneRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetTaskRequest; /** - * Calls DeleteZone. - * @param request DeleteZoneRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Creates a plain object from a GetTaskRequest message. Also converts values to other types if specified. + * @param message GetTaskRequest + * @param [options] Conversion options + * @returns Plain object */ - public deleteZone(request: google.cloud.dataplex.v1.IDeleteZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteZoneCallback): void; + public static toObject(message: google.cloud.dataplex.v1.GetTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls DeleteZone. - * @param request DeleteZoneRequest message or plain object - * @returns Promise + * Converts this GetTaskRequest to JSON. + * @returns JSON object */ - public deleteZone(request: google.cloud.dataplex.v1.IDeleteZoneRequest): Promise; + public toJSON(): { [k: string]: any }; /** - * Calls ListZones. - * @param request ListZonesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListZonesResponse + * Gets the default type url for GetTaskRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public listZones(request: google.cloud.dataplex.v1.IListZonesRequest, callback: google.cloud.dataplex.v1.DataplexService.ListZonesCallback): void; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetJobRequest. */ + interface IGetJobRequest { + + /** GetJobRequest name */ + name?: (string|null); + } + + /** Represents a GetJobRequest. */ + class GetJobRequest implements IGetJobRequest { /** - * Calls ListZones. - * @param request ListZonesRequest message or plain object - * @returns Promise + * Constructs a new GetJobRequest. + * @param [properties] Properties to set */ - public listZones(request: google.cloud.dataplex.v1.IListZonesRequest): Promise; + constructor(properties?: google.cloud.dataplex.v1.IGetJobRequest); + + /** GetJobRequest name. */ + public name: string; /** - * Calls GetZone. - * @param request GetZoneRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Zone + * Creates a new GetJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetJobRequest instance */ - public getZone(request: google.cloud.dataplex.v1.IGetZoneRequest, callback: google.cloud.dataplex.v1.DataplexService.GetZoneCallback): void; + public static create(properties?: google.cloud.dataplex.v1.IGetJobRequest): google.cloud.dataplex.v1.GetJobRequest; /** - * Calls GetZone. - * @param request GetZoneRequest message or plain object - * @returns Promise + * Encodes the specified GetJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. + * @param message GetJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getZone(request: google.cloud.dataplex.v1.IGetZoneRequest): Promise; + public static encode(message: google.cloud.dataplex.v1.IGetJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListZoneActions. - * @param request ListZoneActionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListActionsResponse + * Encodes the specified GetJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. + * @param message GetJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listZoneActions(request: google.cloud.dataplex.v1.IListZoneActionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListZoneActionsCallback): void; + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListZoneActions. - * @param request ListZoneActionsRequest message or plain object - * @returns Promise + * Decodes a GetJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listZoneActions(request: google.cloud.dataplex.v1.IListZoneActionsRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetJobRequest; /** - * Calls CreateAsset. - * @param request CreateAssetRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Decodes a GetJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createAsset(request: google.cloud.dataplex.v1.ICreateAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateAssetCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetJobRequest; /** - * Calls CreateAsset. - * @param request CreateAssetRequest message or plain object - * @returns Promise + * Verifies a GetJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public createAsset(request: google.cloud.dataplex.v1.ICreateAssetRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls UpdateAsset. - * @param request UpdateAssetRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Creates a GetJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetJobRequest */ - public updateAsset(request: google.cloud.dataplex.v1.IUpdateAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateAssetCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetJobRequest; /** - * Calls UpdateAsset. - * @param request UpdateAssetRequest message or plain object - * @returns Promise + * Creates a plain object from a GetJobRequest message. Also converts values to other types if specified. + * @param message GetJobRequest + * @param [options] Conversion options + * @returns Plain object */ - public updateAsset(request: google.cloud.dataplex.v1.IUpdateAssetRequest): Promise; + public static toObject(message: google.cloud.dataplex.v1.GetJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls DeleteAsset. - * @param request DeleteAssetRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Converts this GetJobRequest to JSON. + * @returns JSON object */ - public deleteAsset(request: google.cloud.dataplex.v1.IDeleteAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteAssetCallback): void; + public toJSON(): { [k: string]: any }; /** - * Calls DeleteAsset. - * @param request DeleteAssetRequest message or plain object - * @returns Promise + * Gets the default type url for GetJobRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public deleteAsset(request: google.cloud.dataplex.v1.IDeleteAssetRequest): Promise; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RunTaskRequest. */ + interface IRunTaskRequest { + + /** RunTaskRequest name */ + name?: (string|null); + } + + /** Represents a RunTaskRequest. */ + class RunTaskRequest implements IRunTaskRequest { /** - * Calls ListAssets. - * @param request ListAssetsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListAssetsResponse + * Constructs a new RunTaskRequest. + * @param [properties] Properties to set */ - public listAssets(request: google.cloud.dataplex.v1.IListAssetsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListAssetsCallback): void; + constructor(properties?: google.cloud.dataplex.v1.IRunTaskRequest); + + /** RunTaskRequest name. */ + public name: string; /** - * Calls ListAssets. - * @param request ListAssetsRequest message or plain object - * @returns Promise + * Creates a new RunTaskRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RunTaskRequest instance */ - public listAssets(request: google.cloud.dataplex.v1.IListAssetsRequest): Promise; + public static create(properties?: google.cloud.dataplex.v1.IRunTaskRequest): google.cloud.dataplex.v1.RunTaskRequest; /** - * Calls GetAsset. - * @param request GetAssetRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Asset + * Encodes the specified RunTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.RunTaskRequest.verify|verify} messages. + * @param message RunTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getAsset(request: google.cloud.dataplex.v1.IGetAssetRequest, callback: google.cloud.dataplex.v1.DataplexService.GetAssetCallback): void; + public static encode(message: google.cloud.dataplex.v1.IRunTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetAsset. - * @param request GetAssetRequest message or plain object - * @returns Promise + * Encodes the specified RunTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.RunTaskRequest.verify|verify} messages. + * @param message RunTaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getAsset(request: google.cloud.dataplex.v1.IGetAssetRequest): Promise; + public static encodeDelimited(message: google.cloud.dataplex.v1.IRunTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListAssetActions. - * @param request ListAssetActionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListActionsResponse + * Decodes a RunTaskRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listAssetActions(request: google.cloud.dataplex.v1.IListAssetActionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListAssetActionsCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.RunTaskRequest; /** - * Calls ListAssetActions. - * @param request ListAssetActionsRequest message or plain object - * @returns Promise + * Decodes a RunTaskRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listAssetActions(request: google.cloud.dataplex.v1.IListAssetActionsRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.RunTaskRequest; /** - * Calls CreateTask. - * @param request CreateTaskRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Verifies a RunTaskRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public createTask(request: google.cloud.dataplex.v1.ICreateTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateTaskCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls CreateTask. - * @param request CreateTaskRequest message or plain object - * @returns Promise + * Creates a RunTaskRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunTaskRequest */ - public createTask(request: google.cloud.dataplex.v1.ICreateTaskRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.RunTaskRequest; /** - * Calls UpdateTask. - * @param request UpdateTaskRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Creates a plain object from a RunTaskRequest message. Also converts values to other types if specified. + * @param message RunTaskRequest + * @param [options] Conversion options + * @returns Plain object */ - public updateTask(request: google.cloud.dataplex.v1.IUpdateTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateTaskCallback): void; + public static toObject(message: google.cloud.dataplex.v1.RunTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls UpdateTask. - * @param request UpdateTaskRequest message or plain object - * @returns Promise + * Converts this RunTaskRequest to JSON. + * @returns JSON object */ - public updateTask(request: google.cloud.dataplex.v1.IUpdateTaskRequest): Promise; + public toJSON(): { [k: string]: any }; /** - * Calls DeleteTask. - * @param request DeleteTaskRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Gets the default type url for RunTaskRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public deleteTask(request: google.cloud.dataplex.v1.IDeleteTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteTaskCallback): void; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RunTaskResponse. */ + interface IRunTaskResponse { + + /** RunTaskResponse job */ + job?: (google.cloud.dataplex.v1.IJob|null); + } + + /** Represents a RunTaskResponse. */ + class RunTaskResponse implements IRunTaskResponse { /** - * Calls DeleteTask. - * @param request DeleteTaskRequest message or plain object - * @returns Promise + * Constructs a new RunTaskResponse. + * @param [properties] Properties to set */ - public deleteTask(request: google.cloud.dataplex.v1.IDeleteTaskRequest): Promise; + constructor(properties?: google.cloud.dataplex.v1.IRunTaskResponse); + + /** RunTaskResponse job. */ + public job?: (google.cloud.dataplex.v1.IJob|null); /** - * Calls ListTasks. - * @param request ListTasksRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListTasksResponse + * Creates a new RunTaskResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RunTaskResponse instance */ - public listTasks(request: google.cloud.dataplex.v1.IListTasksRequest, callback: google.cloud.dataplex.v1.DataplexService.ListTasksCallback): void; + public static create(properties?: google.cloud.dataplex.v1.IRunTaskResponse): google.cloud.dataplex.v1.RunTaskResponse; /** - * Calls ListTasks. - * @param request ListTasksRequest message or plain object - * @returns Promise + * Encodes the specified RunTaskResponse message. Does not implicitly {@link google.cloud.dataplex.v1.RunTaskResponse.verify|verify} messages. + * @param message RunTaskResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listTasks(request: google.cloud.dataplex.v1.IListTasksRequest): Promise; + public static encode(message: google.cloud.dataplex.v1.IRunTaskResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetTask. - * @param request GetTaskRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Task + * Encodes the specified RunTaskResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.RunTaskResponse.verify|verify} messages. + * @param message RunTaskResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public getTask(request: google.cloud.dataplex.v1.IGetTaskRequest, callback: google.cloud.dataplex.v1.DataplexService.GetTaskCallback): void; + public static encodeDelimited(message: google.cloud.dataplex.v1.IRunTaskResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetTask. - * @param request GetTaskRequest message or plain object - * @returns Promise + * Decodes a RunTaskResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunTaskResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getTask(request: google.cloud.dataplex.v1.IGetTaskRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.RunTaskResponse; /** - * Calls ListJobs. - * @param request ListJobsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListJobsResponse + * Decodes a RunTaskResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunTaskResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listJobs(request: google.cloud.dataplex.v1.IListJobsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListJobsCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.RunTaskResponse; /** - * Calls ListJobs. - * @param request ListJobsRequest message or plain object - * @returns Promise + * Verifies a RunTaskResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public listJobs(request: google.cloud.dataplex.v1.IListJobsRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls GetJob. - * @param request GetJobRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Job + * Creates a RunTaskResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunTaskResponse */ - public getJob(request: google.cloud.dataplex.v1.IGetJobRequest, callback: google.cloud.dataplex.v1.DataplexService.GetJobCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.RunTaskResponse; /** - * Calls GetJob. - * @param request GetJobRequest message or plain object - * @returns Promise + * Creates a plain object from a RunTaskResponse message. Also converts values to other types if specified. + * @param message RunTaskResponse + * @param [options] Conversion options + * @returns Plain object */ - public getJob(request: google.cloud.dataplex.v1.IGetJobRequest): Promise; + public static toObject(message: google.cloud.dataplex.v1.RunTaskResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls CancelJob. - * @param request CancelJobRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Converts this RunTaskResponse to JSON. + * @returns JSON object */ - public cancelJob(request: google.cloud.dataplex.v1.ICancelJobRequest, callback: google.cloud.dataplex.v1.DataplexService.CancelJobCallback): void; + public toJSON(): { [k: string]: any }; /** - * Calls CancelJob. - * @param request CancelJobRequest message or plain object - * @returns Promise + * Gets the default type url for RunTaskResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public cancelJob(request: google.cloud.dataplex.v1.ICancelJobRequest): Promise; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListJobsRequest. */ + interface IListJobsRequest { + + /** ListJobsRequest parent */ + parent?: (string|null); + + /** ListJobsRequest pageSize */ + pageSize?: (number|null); + + /** ListJobsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListJobsRequest. */ + class ListJobsRequest implements IListJobsRequest { /** - * Calls CreateEnvironment. - * @param request CreateEnvironmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Constructs a new ListJobsRequest. + * @param [properties] Properties to set */ - public createEnvironment(request: google.cloud.dataplex.v1.ICreateEnvironmentRequest, callback: google.cloud.dataplex.v1.DataplexService.CreateEnvironmentCallback): void; + constructor(properties?: google.cloud.dataplex.v1.IListJobsRequest); + + /** ListJobsRequest parent. */ + public parent: string; + + /** ListJobsRequest pageSize. */ + public pageSize: number; + + /** ListJobsRequest pageToken. */ + public pageToken: string; /** - * Calls CreateEnvironment. - * @param request CreateEnvironmentRequest message or plain object - * @returns Promise + * Creates a new ListJobsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListJobsRequest instance */ - public createEnvironment(request: google.cloud.dataplex.v1.ICreateEnvironmentRequest): Promise; + public static create(properties?: google.cloud.dataplex.v1.IListJobsRequest): google.cloud.dataplex.v1.ListJobsRequest; /** - * Calls UpdateEnvironment. - * @param request UpdateEnvironmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Encodes the specified ListJobsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. + * @param message ListJobsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public updateEnvironment(request: google.cloud.dataplex.v1.IUpdateEnvironmentRequest, callback: google.cloud.dataplex.v1.DataplexService.UpdateEnvironmentCallback): void; + public static encode(message: google.cloud.dataplex.v1.IListJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls UpdateEnvironment. - * @param request UpdateEnvironmentRequest message or plain object - * @returns Promise + * Encodes the specified ListJobsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. + * @param message ListJobsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public updateEnvironment(request: google.cloud.dataplex.v1.IUpdateEnvironmentRequest): Promise; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls DeleteEnvironment. - * @param request DeleteEnvironmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Decodes a ListJobsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public deleteEnvironment(request: google.cloud.dataplex.v1.IDeleteEnvironmentRequest, callback: google.cloud.dataplex.v1.DataplexService.DeleteEnvironmentCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListJobsRequest; /** - * Calls DeleteEnvironment. - * @param request DeleteEnvironmentRequest message or plain object - * @returns Promise + * Decodes a ListJobsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public deleteEnvironment(request: google.cloud.dataplex.v1.IDeleteEnvironmentRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListJobsRequest; /** - * Calls ListEnvironments. - * @param request ListEnvironmentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListEnvironmentsResponse + * Verifies a ListJobsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public listEnvironments(request: google.cloud.dataplex.v1.IListEnvironmentsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListEnvironmentsCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls ListEnvironments. - * @param request ListEnvironmentsRequest message or plain object - * @returns Promise + * Creates a ListJobsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListJobsRequest */ - public listEnvironments(request: google.cloud.dataplex.v1.IListEnvironmentsRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListJobsRequest; /** - * Calls GetEnvironment. - * @param request GetEnvironmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Environment + * Creates a plain object from a ListJobsRequest message. Also converts values to other types if specified. + * @param message ListJobsRequest + * @param [options] Conversion options + * @returns Plain object */ - public getEnvironment(request: google.cloud.dataplex.v1.IGetEnvironmentRequest, callback: google.cloud.dataplex.v1.DataplexService.GetEnvironmentCallback): void; + public static toObject(message: google.cloud.dataplex.v1.ListJobsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls GetEnvironment. - * @param request GetEnvironmentRequest message or plain object - * @returns Promise + * Converts this ListJobsRequest to JSON. + * @returns JSON object */ - public getEnvironment(request: google.cloud.dataplex.v1.IGetEnvironmentRequest): Promise; + public toJSON(): { [k: string]: any }; /** - * Calls ListSessions. - * @param request ListSessionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListSessionsResponse + * Gets the default type url for ListJobsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public listSessions(request: google.cloud.dataplex.v1.IListSessionsRequest, callback: google.cloud.dataplex.v1.DataplexService.ListSessionsCallback): void; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListJobsResponse. */ + interface IListJobsResponse { + + /** ListJobsResponse jobs */ + jobs?: (google.cloud.dataplex.v1.IJob[]|null); + + /** ListJobsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListJobsResponse. */ + class ListJobsResponse implements IListJobsResponse { /** - * Calls ListSessions. - * @param request ListSessionsRequest message or plain object - * @returns Promise + * Constructs a new ListJobsResponse. + * @param [properties] Properties to set */ - public listSessions(request: google.cloud.dataplex.v1.IListSessionsRequest): Promise; - } + constructor(properties?: google.cloud.dataplex.v1.IListJobsResponse); - namespace DataplexService { + /** ListJobsResponse jobs. */ + public jobs: google.cloud.dataplex.v1.IJob[]; + + /** ListJobsResponse nextPageToken. */ + public nextPageToken: string; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createLake}. - * @param error Error, if any - * @param [response] Operation + * Creates a new ListJobsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListJobsResponse instance */ - type CreateLakeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static create(properties?: google.cloud.dataplex.v1.IListJobsResponse): google.cloud.dataplex.v1.ListJobsResponse; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateLake}. - * @param error Error, if any - * @param [response] Operation + * Encodes the specified ListJobsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. + * @param message ListJobsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type UpdateLakeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static encode(message: google.cloud.dataplex.v1.IListJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteLake}. - * @param error Error, if any - * @param [response] Operation + * Encodes the specified ListJobsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. + * @param message ListJobsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type DeleteLakeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listLakes}. - * @param error Error, if any - * @param [response] ListLakesResponse + * Decodes a ListJobsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type ListLakesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListLakesResponse) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListJobsResponse; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getLake}. - * @param error Error, if any - * @param [response] Lake + * Decodes a ListJobsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type GetLakeCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Lake) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListJobsResponse; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listLakeActions}. - * @param error Error, if any - * @param [response] ListActionsResponse + * Verifies a ListJobsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type ListLakeActionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListActionsResponse) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createZone}. - * @param error Error, if any - * @param [response] Operation + * Creates a ListJobsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListJobsResponse */ - type CreateZoneCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListJobsResponse; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateZone}. - * @param error Error, if any - * @param [response] Operation + * Creates a plain object from a ListJobsResponse message. Also converts values to other types if specified. + * @param message ListJobsResponse + * @param [options] Conversion options + * @returns Plain object */ - type UpdateZoneCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static toObject(message: google.cloud.dataplex.v1.ListJobsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteZone}. - * @param error Error, if any - * @param [response] Operation + * Converts this ListJobsResponse to JSON. + * @returns JSON object */ - type DeleteZoneCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public toJSON(): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listZones}. - * @param error Error, if any - * @param [response] ListZonesResponse + * Gets the default type url for ListJobsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - type ListZonesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListZonesResponse) => void; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CancelJobRequest. */ + interface ICancelJobRequest { + + /** CancelJobRequest name */ + name?: (string|null); + } + + /** Represents a CancelJobRequest. */ + class CancelJobRequest implements ICancelJobRequest { /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getZone}. - * @param error Error, if any - * @param [response] Zone + * Constructs a new CancelJobRequest. + * @param [properties] Properties to set */ - type GetZoneCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Zone) => void; + constructor(properties?: google.cloud.dataplex.v1.ICancelJobRequest); + + /** CancelJobRequest name. */ + public name: string; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listZoneActions}. - * @param error Error, if any - * @param [response] ListActionsResponse + * Creates a new CancelJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelJobRequest instance */ - type ListZoneActionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListActionsResponse) => void; + public static create(properties?: google.cloud.dataplex.v1.ICancelJobRequest): google.cloud.dataplex.v1.CancelJobRequest; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createAsset}. - * @param error Error, if any - * @param [response] Operation + * Encodes the specified CancelJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. + * @param message CancelJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type CreateAssetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static encode(message: google.cloud.dataplex.v1.ICancelJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateAsset}. - * @param error Error, if any - * @param [response] Operation + * Encodes the specified CancelJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. + * @param message CancelJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type UpdateAssetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static encodeDelimited(message: google.cloud.dataplex.v1.ICancelJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteAsset}. - * @param error Error, if any - * @param [response] Operation + * Decodes a CancelJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type DeleteAssetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CancelJobRequest; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listAssets}. - * @param error Error, if any - * @param [response] ListAssetsResponse + * Decodes a CancelJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type ListAssetsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListAssetsResponse) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CancelJobRequest; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getAsset}. - * @param error Error, if any - * @param [response] Asset + * Verifies a CancelJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type GetAssetCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Asset) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listAssetActions}. - * @param error Error, if any - * @param [response] ListActionsResponse + * Creates a CancelJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelJobRequest */ - type ListAssetActionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListActionsResponse) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CancelJobRequest; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createTask}. - * @param error Error, if any - * @param [response] Operation + * Creates a plain object from a CancelJobRequest message. Also converts values to other types if specified. + * @param message CancelJobRequest + * @param [options] Conversion options + * @returns Plain object */ - type CreateTaskCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static toObject(message: google.cloud.dataplex.v1.CancelJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateTask}. - * @param error Error, if any - * @param [response] Operation + * Converts this CancelJobRequest to JSON. + * @returns JSON object */ - type UpdateTaskCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public toJSON(): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteTask}. - * @param error Error, if any - * @param [response] Operation + * Gets the default type url for CancelJobRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - type DeleteTaskCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateEnvironmentRequest. */ + interface ICreateEnvironmentRequest { + + /** CreateEnvironmentRequest parent */ + parent?: (string|null); + + /** CreateEnvironmentRequest environmentId */ + environmentId?: (string|null); + + /** CreateEnvironmentRequest environment */ + environment?: (google.cloud.dataplex.v1.IEnvironment|null); + + /** CreateEnvironmentRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateEnvironmentRequest. */ + class CreateEnvironmentRequest implements ICreateEnvironmentRequest { /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listTasks}. - * @param error Error, if any - * @param [response] ListTasksResponse + * Constructs a new CreateEnvironmentRequest. + * @param [properties] Properties to set */ - type ListTasksCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListTasksResponse) => void; + constructor(properties?: google.cloud.dataplex.v1.ICreateEnvironmentRequest); + + /** CreateEnvironmentRequest parent. */ + public parent: string; + + /** CreateEnvironmentRequest environmentId. */ + public environmentId: string; + + /** CreateEnvironmentRequest environment. */ + public environment?: (google.cloud.dataplex.v1.IEnvironment|null); + + /** CreateEnvironmentRequest validateOnly. */ + public validateOnly: boolean; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getTask}. - * @param error Error, if any - * @param [response] Task + * Creates a new CreateEnvironmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateEnvironmentRequest instance */ - type GetTaskCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Task) => void; + public static create(properties?: google.cloud.dataplex.v1.ICreateEnvironmentRequest): google.cloud.dataplex.v1.CreateEnvironmentRequest; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listJobs}. - * @param error Error, if any - * @param [response] ListJobsResponse + * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateEnvironmentRequest.verify|verify} messages. + * @param message CreateEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type ListJobsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListJobsResponse) => void; + public static encode(message: google.cloud.dataplex.v1.ICreateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getJob}. - * @param error Error, if any - * @param [response] Job + * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateEnvironmentRequest.verify|verify} messages. + * @param message CreateEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type GetJobCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Job) => void; + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|cancelJob}. - * @param error Error, if any - * @param [response] Empty + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type CancelJobCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateEnvironmentRequest; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createEnvironment}. - * @param error Error, if any - * @param [response] Operation + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type CreateEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateEnvironmentRequest; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateEnvironment}. - * @param error Error, if any - * @param [response] Operation + * Verifies a CreateEnvironmentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type UpdateEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteEnvironment}. - * @param error Error, if any - * @param [response] Operation + * Creates a CreateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateEnvironmentRequest */ - type DeleteEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateEnvironmentRequest; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listEnvironments}. - * @param error Error, if any - * @param [response] ListEnvironmentsResponse + * Creates a plain object from a CreateEnvironmentRequest message. Also converts values to other types if specified. + * @param message CreateEnvironmentRequest + * @param [options] Conversion options + * @returns Plain object */ - type ListEnvironmentsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListEnvironmentsResponse) => void; + public static toObject(message: google.cloud.dataplex.v1.CreateEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getEnvironment}. - * @param error Error, if any - * @param [response] Environment + * Converts this CreateEnvironmentRequest to JSON. + * @returns JSON object */ - type GetEnvironmentCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Environment) => void; + public toJSON(): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listSessions}. - * @param error Error, if any - * @param [response] ListSessionsResponse + * Gets the default type url for CreateEnvironmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - type ListSessionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListSessionsResponse) => void; + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateLakeRequest. */ - interface ICreateLakeRequest { - - /** CreateLakeRequest parent */ - parent?: (string|null); + /** Properties of an UpdateEnvironmentRequest. */ + interface IUpdateEnvironmentRequest { - /** CreateLakeRequest lakeId */ - lakeId?: (string|null); + /** UpdateEnvironmentRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); - /** CreateLakeRequest lake */ - lake?: (google.cloud.dataplex.v1.ILake|null); + /** UpdateEnvironmentRequest environment */ + environment?: (google.cloud.dataplex.v1.IEnvironment|null); - /** CreateLakeRequest validateOnly */ + /** UpdateEnvironmentRequest validateOnly */ validateOnly?: (boolean|null); } - /** Represents a CreateLakeRequest. */ - class CreateLakeRequest implements ICreateLakeRequest { + /** Represents an UpdateEnvironmentRequest. */ + class UpdateEnvironmentRequest implements IUpdateEnvironmentRequest { /** - * Constructs a new CreateLakeRequest. + * Constructs a new UpdateEnvironmentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.ICreateLakeRequest); - - /** CreateLakeRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.dataplex.v1.IUpdateEnvironmentRequest); - /** CreateLakeRequest lakeId. */ - public lakeId: string; + /** UpdateEnvironmentRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** CreateLakeRequest lake. */ - public lake?: (google.cloud.dataplex.v1.ILake|null); + /** UpdateEnvironmentRequest environment. */ + public environment?: (google.cloud.dataplex.v1.IEnvironment|null); - /** CreateLakeRequest validateOnly. */ + /** UpdateEnvironmentRequest validateOnly. */ public validateOnly: boolean; /** - * Creates a new CreateLakeRequest instance using the specified properties. + * Creates a new UpdateEnvironmentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateLakeRequest instance + * @returns UpdateEnvironmentRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.ICreateLakeRequest): google.cloud.dataplex.v1.CreateLakeRequest; + public static create(properties?: google.cloud.dataplex.v1.IUpdateEnvironmentRequest): google.cloud.dataplex.v1.UpdateEnvironmentRequest; /** - * Encodes the specified CreateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. - * @param message CreateLakeRequest message or plain object to encode + * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEnvironmentRequest.verify|verify} messages. + * @param message UpdateEnvironmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.ICreateLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IUpdateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. - * @param message CreateLakeRequest message or plain object to encode + * Encodes the specified UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEnvironmentRequest.verify|verify} messages. + * @param message UpdateEnvironmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateLakeRequest message from the specified reader or buffer. + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateLakeRequest + * @returns UpdateEnvironmentRequest * @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.dataplex.v1.CreateLakeRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateEnvironmentRequest; /** - * Decodes a CreateLakeRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateLakeRequest + * @returns UpdateEnvironmentRequest * @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.dataplex.v1.CreateLakeRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateEnvironmentRequest; /** - * Verifies a CreateLakeRequest message. + * Verifies an UpdateEnvironmentRequest 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 CreateLakeRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateLakeRequest + * @returns UpdateEnvironmentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateLakeRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateEnvironmentRequest; /** - * Creates a plain object from a CreateLakeRequest message. Also converts values to other types if specified. - * @param message CreateLakeRequest + * Creates a plain object from an UpdateEnvironmentRequest message. Also converts values to other types if specified. + * @param message UpdateEnvironmentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.CreateLakeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.UpdateEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateLakeRequest to JSON. + * Converts this UpdateEnvironmentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateLakeRequest + * Gets the default type url for UpdateEnvironmentRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateLakeRequest. */ - interface IUpdateLakeRequest { - - /** UpdateLakeRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateLakeRequest lake */ - lake?: (google.cloud.dataplex.v1.ILake|null); + /** Properties of a DeleteEnvironmentRequest. */ + interface IDeleteEnvironmentRequest { - /** UpdateLakeRequest validateOnly */ - validateOnly?: (boolean|null); + /** DeleteEnvironmentRequest name */ + name?: (string|null); } - /** Represents an UpdateLakeRequest. */ - class UpdateLakeRequest implements IUpdateLakeRequest { + /** Represents a DeleteEnvironmentRequest. */ + class DeleteEnvironmentRequest implements IDeleteEnvironmentRequest { /** - * Constructs a new UpdateLakeRequest. + * Constructs a new DeleteEnvironmentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IUpdateLakeRequest); - - /** UpdateLakeRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateLakeRequest lake. */ - public lake?: (google.cloud.dataplex.v1.ILake|null); + constructor(properties?: google.cloud.dataplex.v1.IDeleteEnvironmentRequest); - /** UpdateLakeRequest validateOnly. */ - public validateOnly: boolean; + /** DeleteEnvironmentRequest name. */ + public name: string; /** - * Creates a new UpdateLakeRequest instance using the specified properties. + * Creates a new DeleteEnvironmentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateLakeRequest instance + * @returns DeleteEnvironmentRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IUpdateLakeRequest): google.cloud.dataplex.v1.UpdateLakeRequest; + public static create(properties?: google.cloud.dataplex.v1.IDeleteEnvironmentRequest): google.cloud.dataplex.v1.DeleteEnvironmentRequest; /** - * Encodes the specified UpdateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. - * @param message UpdateLakeRequest message or plain object to encode + * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEnvironmentRequest.verify|verify} messages. + * @param message DeleteEnvironmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IUpdateLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IDeleteEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. - * @param message UpdateLakeRequest message or plain object to encode + * Encodes the specified DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEnvironmentRequest.verify|verify} messages. + * @param message DeleteEnvironmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateLakeRequest message from the specified reader or buffer. + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateLakeRequest + * @returns DeleteEnvironmentRequest * @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.dataplex.v1.UpdateLakeRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteEnvironmentRequest; /** - * Decodes an UpdateLakeRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateLakeRequest + * @returns DeleteEnvironmentRequest * @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.dataplex.v1.UpdateLakeRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteEnvironmentRequest; /** - * Verifies an UpdateLakeRequest message. + * Verifies a DeleteEnvironmentRequest 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 UpdateLakeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteEnvironmentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateLakeRequest + * @returns DeleteEnvironmentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateLakeRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteEnvironmentRequest; /** - * Creates a plain object from an UpdateLakeRequest message. Also converts values to other types if specified. - * @param message UpdateLakeRequest + * Creates a plain object from a DeleteEnvironmentRequest message. Also converts values to other types if specified. + * @param message DeleteEnvironmentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.UpdateLakeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.DeleteEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateLakeRequest to JSON. + * Converts this DeleteEnvironmentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateLakeRequest + * Gets the default type url for DeleteEnvironmentRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteLakeRequest. */ - interface IDeleteLakeRequest { + /** Properties of a ListEnvironmentsRequest. */ + interface IListEnvironmentsRequest { - /** DeleteLakeRequest name */ - name?: (string|null); + /** ListEnvironmentsRequest parent */ + parent?: (string|null); + + /** ListEnvironmentsRequest pageSize */ + pageSize?: (number|null); + + /** ListEnvironmentsRequest pageToken */ + pageToken?: (string|null); + + /** ListEnvironmentsRequest filter */ + filter?: (string|null); + + /** ListEnvironmentsRequest orderBy */ + orderBy?: (string|null); } - /** Represents a DeleteLakeRequest. */ - class DeleteLakeRequest implements IDeleteLakeRequest { + /** Represents a ListEnvironmentsRequest. */ + class ListEnvironmentsRequest implements IListEnvironmentsRequest { /** - * Constructs a new DeleteLakeRequest. + * Constructs a new ListEnvironmentsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IDeleteLakeRequest); + constructor(properties?: google.cloud.dataplex.v1.IListEnvironmentsRequest); - /** DeleteLakeRequest name. */ - public name: string; + /** ListEnvironmentsRequest parent. */ + public parent: string; + + /** ListEnvironmentsRequest pageSize. */ + public pageSize: number; + + /** ListEnvironmentsRequest pageToken. */ + public pageToken: string; + + /** ListEnvironmentsRequest filter. */ + public filter: string; + + /** ListEnvironmentsRequest orderBy. */ + public orderBy: string; /** - * Creates a new DeleteLakeRequest instance using the specified properties. + * Creates a new ListEnvironmentsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteLakeRequest instance + * @returns ListEnvironmentsRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IDeleteLakeRequest): google.cloud.dataplex.v1.DeleteLakeRequest; + public static create(properties?: google.cloud.dataplex.v1.IListEnvironmentsRequest): google.cloud.dataplex.v1.ListEnvironmentsRequest; /** - * Encodes the specified DeleteLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. - * @param message DeleteLakeRequest message or plain object to encode + * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsRequest.verify|verify} messages. + * @param message ListEnvironmentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IDeleteLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IListEnvironmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. - * @param message DeleteLakeRequest message or plain object to encode + * Encodes the specified ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsRequest.verify|verify} messages. + * @param message ListEnvironmentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListEnvironmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteLakeRequest message from the specified reader or buffer. + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteLakeRequest + * @returns ListEnvironmentsRequest * @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.dataplex.v1.DeleteLakeRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListEnvironmentsRequest; /** - * Decodes a DeleteLakeRequest message from the specified reader or buffer, length delimited. + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteLakeRequest + * @returns ListEnvironmentsRequest * @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.dataplex.v1.DeleteLakeRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListEnvironmentsRequest; /** - * Verifies a DeleteLakeRequest message. + * Verifies a ListEnvironmentsRequest 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 DeleteLakeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListEnvironmentsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteLakeRequest + * @returns ListEnvironmentsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteLakeRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListEnvironmentsRequest; /** - * Creates a plain object from a DeleteLakeRequest message. Also converts values to other types if specified. - * @param message DeleteLakeRequest + * Creates a plain object from a ListEnvironmentsRequest message. Also converts values to other types if specified. + * @param message ListEnvironmentsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.DeleteLakeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.ListEnvironmentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteLakeRequest to JSON. + * Converts this ListEnvironmentsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteLakeRequest + * Gets the default type url for ListEnvironmentsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListLakesRequest. */ - interface IListLakesRequest { - - /** ListLakesRequest parent */ - parent?: (string|null); - - /** ListLakesRequest pageSize */ - pageSize?: (number|null); - - /** ListLakesRequest pageToken */ - pageToken?: (string|null); + /** Properties of a ListEnvironmentsResponse. */ + interface IListEnvironmentsResponse { - /** ListLakesRequest filter */ - filter?: (string|null); + /** ListEnvironmentsResponse environments */ + environments?: (google.cloud.dataplex.v1.IEnvironment[]|null); - /** ListLakesRequest orderBy */ - orderBy?: (string|null); + /** ListEnvironmentsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a ListLakesRequest. */ - class ListLakesRequest implements IListLakesRequest { + /** Represents a ListEnvironmentsResponse. */ + class ListEnvironmentsResponse implements IListEnvironmentsResponse { /** - * Constructs a new ListLakesRequest. + * Constructs a new ListEnvironmentsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IListLakesRequest); - - /** ListLakesRequest parent. */ - public parent: string; - - /** ListLakesRequest pageSize. */ - public pageSize: number; - - /** ListLakesRequest pageToken. */ - public pageToken: string; + constructor(properties?: google.cloud.dataplex.v1.IListEnvironmentsResponse); - /** ListLakesRequest filter. */ - public filter: string; + /** ListEnvironmentsResponse environments. */ + public environments: google.cloud.dataplex.v1.IEnvironment[]; - /** ListLakesRequest orderBy. */ - public orderBy: string; + /** ListEnvironmentsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new ListLakesRequest instance using the specified properties. + * Creates a new ListEnvironmentsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListLakesRequest instance + * @returns ListEnvironmentsResponse instance */ - public static create(properties?: google.cloud.dataplex.v1.IListLakesRequest): google.cloud.dataplex.v1.ListLakesRequest; + public static create(properties?: google.cloud.dataplex.v1.IListEnvironmentsResponse): google.cloud.dataplex.v1.ListEnvironmentsResponse; /** - * Encodes the specified ListLakesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. - * @param message ListLakesRequest message or plain object to encode + * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsResponse.verify|verify} messages. + * @param message ListEnvironmentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IListLakesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IListEnvironmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListLakesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. - * @param message ListLakesRequest message or plain object to encode + * Encodes the specified ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsResponse.verify|verify} messages. + * @param message ListEnvironmentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListLakesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListEnvironmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListLakesRequest message from the specified reader or buffer. + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListLakesRequest + * @returns ListEnvironmentsResponse * @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.dataplex.v1.ListLakesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListEnvironmentsResponse; /** - * Decodes a ListLakesRequest message from the specified reader or buffer, length delimited. + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListLakesRequest + * @returns ListEnvironmentsResponse * @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.dataplex.v1.ListLakesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListEnvironmentsResponse; /** - * Verifies a ListLakesRequest message. + * Verifies a ListEnvironmentsResponse 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 ListLakesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListEnvironmentsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListLakesRequest + * @returns ListEnvironmentsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListLakesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListEnvironmentsResponse; /** - * Creates a plain object from a ListLakesRequest message. Also converts values to other types if specified. - * @param message ListLakesRequest + * Creates a plain object from a ListEnvironmentsResponse message. Also converts values to other types if specified. + * @param message ListEnvironmentsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.ListLakesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.ListEnvironmentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListLakesRequest to JSON. + * Converts this ListEnvironmentsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListLakesRequest + * Gets the default type url for ListEnvironmentsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListLakesResponse. */ - interface IListLakesResponse { - - /** ListLakesResponse lakes */ - lakes?: (google.cloud.dataplex.v1.ILake[]|null); - - /** ListLakesResponse nextPageToken */ - nextPageToken?: (string|null); + /** Properties of a GetEnvironmentRequest. */ + interface IGetEnvironmentRequest { - /** ListLakesResponse unreachableLocations */ - unreachableLocations?: (string[]|null); + /** GetEnvironmentRequest name */ + name?: (string|null); } - /** Represents a ListLakesResponse. */ - class ListLakesResponse implements IListLakesResponse { + /** Represents a GetEnvironmentRequest. */ + class GetEnvironmentRequest implements IGetEnvironmentRequest { /** - * Constructs a new ListLakesResponse. + * Constructs a new GetEnvironmentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IListLakesResponse); - - /** ListLakesResponse lakes. */ - public lakes: google.cloud.dataplex.v1.ILake[]; - - /** ListLakesResponse nextPageToken. */ - public nextPageToken: string; + constructor(properties?: google.cloud.dataplex.v1.IGetEnvironmentRequest); - /** ListLakesResponse unreachableLocations. */ - public unreachableLocations: string[]; + /** GetEnvironmentRequest name. */ + public name: string; /** - * Creates a new ListLakesResponse instance using the specified properties. + * Creates a new GetEnvironmentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListLakesResponse instance + * @returns GetEnvironmentRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IListLakesResponse): google.cloud.dataplex.v1.ListLakesResponse; + public static create(properties?: google.cloud.dataplex.v1.IGetEnvironmentRequest): google.cloud.dataplex.v1.GetEnvironmentRequest; /** - * Encodes the specified ListLakesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. - * @param message ListLakesResponse message or plain object to encode + * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEnvironmentRequest.verify|verify} messages. + * @param message GetEnvironmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IListLakesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IGetEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListLakesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. - * @param message ListLakesResponse message or plain object to encode + * Encodes the specified GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEnvironmentRequest.verify|verify} messages. + * @param message GetEnvironmentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListLakesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListLakesResponse message from the specified reader or buffer. + * Decodes a GetEnvironmentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListLakesResponse + * @returns GetEnvironmentRequest * @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.dataplex.v1.ListLakesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetEnvironmentRequest; /** - * Decodes a ListLakesResponse message from the specified reader or buffer, length delimited. + * Decodes a GetEnvironmentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListLakesResponse + * @returns GetEnvironmentRequest * @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.dataplex.v1.ListLakesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetEnvironmentRequest; /** - * Verifies a ListLakesResponse message. + * Verifies a GetEnvironmentRequest 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 ListLakesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetEnvironmentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListLakesResponse + * @returns GetEnvironmentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListLakesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetEnvironmentRequest; /** - * Creates a plain object from a ListLakesResponse message. Also converts values to other types if specified. - * @param message ListLakesResponse + * Creates a plain object from a GetEnvironmentRequest message. Also converts values to other types if specified. + * @param message GetEnvironmentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.ListLakesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.GetEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListLakesResponse to JSON. + * Converts this GetEnvironmentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListLakesResponse + * Gets the default type url for GetEnvironmentRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListLakeActionsRequest. */ - interface IListLakeActionsRequest { + /** Properties of a ListSessionsRequest. */ + interface IListSessionsRequest { - /** ListLakeActionsRequest parent */ + /** ListSessionsRequest parent */ parent?: (string|null); - /** ListLakeActionsRequest pageSize */ + /** ListSessionsRequest pageSize */ pageSize?: (number|null); - /** ListLakeActionsRequest pageToken */ + /** ListSessionsRequest pageToken */ pageToken?: (string|null); + + /** ListSessionsRequest filter */ + filter?: (string|null); } - /** Represents a ListLakeActionsRequest. */ - class ListLakeActionsRequest implements IListLakeActionsRequest { + /** Represents a ListSessionsRequest. */ + class ListSessionsRequest implements IListSessionsRequest { /** - * Constructs a new ListLakeActionsRequest. + * Constructs a new ListSessionsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IListLakeActionsRequest); + constructor(properties?: google.cloud.dataplex.v1.IListSessionsRequest); - /** ListLakeActionsRequest parent. */ + /** ListSessionsRequest parent. */ public parent: string; - /** ListLakeActionsRequest pageSize. */ + /** ListSessionsRequest pageSize. */ public pageSize: number; - /** ListLakeActionsRequest pageToken. */ + /** ListSessionsRequest pageToken. */ public pageToken: string; + /** ListSessionsRequest filter. */ + public filter: string; + /** - * Creates a new ListLakeActionsRequest instance using the specified properties. + * Creates a new ListSessionsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListLakeActionsRequest instance + * @returns ListSessionsRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IListLakeActionsRequest): google.cloud.dataplex.v1.ListLakeActionsRequest; + public static create(properties?: google.cloud.dataplex.v1.IListSessionsRequest): google.cloud.dataplex.v1.ListSessionsRequest; /** - * Encodes the specified ListLakeActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. - * @param message ListLakeActionsRequest message or plain object to encode + * Encodes the specified ListSessionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsRequest.verify|verify} messages. + * @param message ListSessionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IListLakeActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IListSessionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListLakeActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. - * @param message ListLakeActionsRequest message or plain object to encode + * Encodes the specified ListSessionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsRequest.verify|verify} messages. + * @param message ListSessionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListLakeActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListSessionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListLakeActionsRequest message from the specified reader or buffer. + * Decodes a ListSessionsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListLakeActionsRequest + * @returns ListSessionsRequest * @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.dataplex.v1.ListLakeActionsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListSessionsRequest; /** - * Decodes a ListLakeActionsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListSessionsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListLakeActionsRequest + * @returns ListSessionsRequest * @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.dataplex.v1.ListLakeActionsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListSessionsRequest; /** - * Verifies a ListLakeActionsRequest message. + * Verifies a ListSessionsRequest 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 ListLakeActionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListSessionsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListLakeActionsRequest + * @returns ListSessionsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListLakeActionsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListSessionsRequest; /** - * Creates a plain object from a ListLakeActionsRequest message. Also converts values to other types if specified. - * @param message ListLakeActionsRequest + * Creates a plain object from a ListSessionsRequest message. Also converts values to other types if specified. + * @param message ListSessionsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.ListLakeActionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.ListSessionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListLakeActionsRequest to JSON. + * Converts this ListSessionsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListLakeActionsRequest + * Gets the default type url for ListSessionsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListActionsResponse. */ - interface IListActionsResponse { + /** Properties of a ListSessionsResponse. */ + interface IListSessionsResponse { - /** ListActionsResponse actions */ - actions?: (google.cloud.dataplex.v1.IAction[]|null); + /** ListSessionsResponse sessions */ + sessions?: (google.cloud.dataplex.v1.ISession[]|null); - /** ListActionsResponse nextPageToken */ + /** ListSessionsResponse nextPageToken */ nextPageToken?: (string|null); } - /** Represents a ListActionsResponse. */ - class ListActionsResponse implements IListActionsResponse { + /** Represents a ListSessionsResponse. */ + class ListSessionsResponse implements IListSessionsResponse { /** - * Constructs a new ListActionsResponse. + * Constructs a new ListSessionsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IListActionsResponse); + constructor(properties?: google.cloud.dataplex.v1.IListSessionsResponse); - /** ListActionsResponse actions. */ - public actions: google.cloud.dataplex.v1.IAction[]; + /** ListSessionsResponse sessions. */ + public sessions: google.cloud.dataplex.v1.ISession[]; - /** ListActionsResponse nextPageToken. */ + /** ListSessionsResponse nextPageToken. */ public nextPageToken: string; /** - * Creates a new ListActionsResponse instance using the specified properties. + * Creates a new ListSessionsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListActionsResponse instance + * @returns ListSessionsResponse instance */ - public static create(properties?: google.cloud.dataplex.v1.IListActionsResponse): google.cloud.dataplex.v1.ListActionsResponse; + public static create(properties?: google.cloud.dataplex.v1.IListSessionsResponse): google.cloud.dataplex.v1.ListSessionsResponse; /** - * Encodes the specified ListActionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. - * @param message ListActionsResponse message or plain object to encode + * Encodes the specified ListSessionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsResponse.verify|verify} messages. + * @param message ListSessionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IListActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IListSessionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. - * @param message ListActionsResponse message or plain object to encode + * Encodes the specified ListSessionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsResponse.verify|verify} messages. + * @param message ListSessionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListActionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListSessionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListActionsResponse message from the specified reader or buffer. + * Decodes a ListSessionsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListActionsResponse + * @returns ListSessionsResponse * @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.dataplex.v1.ListActionsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListSessionsResponse; /** - * Decodes a ListActionsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListSessionsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListActionsResponse + * @returns ListSessionsResponse * @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.dataplex.v1.ListActionsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListSessionsResponse; /** - * Verifies a ListActionsResponse message. + * Verifies a ListSessionsResponse 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 ListActionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListSessionsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListActionsResponse + * @returns ListSessionsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListActionsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListSessionsResponse; /** - * Creates a plain object from a ListActionsResponse message. Also converts values to other types if specified. - * @param message ListActionsResponse + * Creates a plain object from a ListSessionsResponse message. Also converts values to other types if specified. + * @param message ListSessionsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.ListActionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.ListSessionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListActionsResponse to JSON. + * Converts this ListSessionsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListActionsResponse + * Gets the default type url for ListSessionsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetLakeRequest. */ - interface IGetLakeRequest { + /** Properties of a Task. */ + interface ITask { - /** GetLakeRequest name */ + /** Task name */ name?: (string|null); + + /** Task uid */ + uid?: (string|null); + + /** Task createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Task updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Task description */ + description?: (string|null); + + /** Task displayName */ + displayName?: (string|null); + + /** Task state */ + state?: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State|null); + + /** Task labels */ + labels?: ({ [k: string]: string }|null); + + /** Task triggerSpec */ + triggerSpec?: (google.cloud.dataplex.v1.Task.ITriggerSpec|null); + + /** Task executionSpec */ + executionSpec?: (google.cloud.dataplex.v1.Task.IExecutionSpec|null); + + /** Task executionStatus */ + executionStatus?: (google.cloud.dataplex.v1.Task.IExecutionStatus|null); + + /** Task spark */ + spark?: (google.cloud.dataplex.v1.Task.ISparkTaskConfig|null); + + /** Task notebook */ + notebook?: (google.cloud.dataplex.v1.Task.INotebookTaskConfig|null); } - /** Represents a GetLakeRequest. */ - class GetLakeRequest implements IGetLakeRequest { + /** Represents a Task. */ + class Task implements ITask { + + /** + * Constructs a new Task. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ITask); + + /** Task name. */ + public name: string; + + /** Task uid. */ + public uid: string; + + /** Task createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Task updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Task description. */ + public description: string; + + /** Task displayName. */ + public displayName: string; + + /** Task state. */ + public state: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State); + + /** Task labels. */ + public labels: { [k: string]: string }; + + /** Task triggerSpec. */ + public triggerSpec?: (google.cloud.dataplex.v1.Task.ITriggerSpec|null); + + /** Task executionSpec. */ + public executionSpec?: (google.cloud.dataplex.v1.Task.IExecutionSpec|null); + + /** Task executionStatus. */ + public executionStatus?: (google.cloud.dataplex.v1.Task.IExecutionStatus|null); + + /** Task spark. */ + public spark?: (google.cloud.dataplex.v1.Task.ISparkTaskConfig|null); - /** - * Constructs a new GetLakeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IGetLakeRequest); + /** Task notebook. */ + public notebook?: (google.cloud.dataplex.v1.Task.INotebookTaskConfig|null); - /** GetLakeRequest name. */ - public name: string; + /** Task config. */ + public config?: ("spark"|"notebook"); /** - * Creates a new GetLakeRequest instance using the specified properties. + * Creates a new Task instance using the specified properties. * @param [properties] Properties to set - * @returns GetLakeRequest instance + * @returns Task instance */ - public static create(properties?: google.cloud.dataplex.v1.IGetLakeRequest): google.cloud.dataplex.v1.GetLakeRequest; + public static create(properties?: google.cloud.dataplex.v1.ITask): google.cloud.dataplex.v1.Task; /** - * Encodes the specified GetLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. - * @param message GetLakeRequest message or plain object to encode + * Encodes the specified Task message. Does not implicitly {@link google.cloud.dataplex.v1.Task.verify|verify} messages. + * @param message Task message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IGetLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.ITask, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. - * @param message GetLakeRequest message or plain object to encode + * Encodes the specified Task message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.verify|verify} messages. + * @param message Task message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGetLakeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.ITask, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetLakeRequest message from the specified reader or buffer. + * Decodes a Task message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetLakeRequest + * @returns Task * @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.dataplex.v1.GetLakeRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Task; /** - * Decodes a GetLakeRequest message from the specified reader or buffer, length delimited. + * Decodes a Task message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetLakeRequest + * @returns Task * @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.dataplex.v1.GetLakeRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Task; /** - * Verifies a GetLakeRequest message. + * Verifies a Task 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 GetLakeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Task message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetLakeRequest + * @returns Task */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetLakeRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task; /** - * Creates a plain object from a GetLakeRequest message. Also converts values to other types if specified. - * @param message GetLakeRequest + * Creates a plain object from a Task message. Also converts values to other types if specified. + * @param message Task * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.GetLakeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.Task, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetLakeRequest to JSON. + * Converts this Task to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetLakeRequest + * Gets the default type url for Task * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateZoneRequest. */ - interface ICreateZoneRequest { + namespace Task { - /** CreateZoneRequest parent */ - parent?: (string|null); + /** Properties of an InfrastructureSpec. */ + interface IInfrastructureSpec { - /** CreateZoneRequest zoneId */ - zoneId?: (string|null); + /** InfrastructureSpec batch */ + batch?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources|null); + + /** InfrastructureSpec containerImage */ + containerImage?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime|null); + + /** InfrastructureSpec vpcNetwork */ + vpcNetwork?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork|null); + } + + /** Represents an InfrastructureSpec. */ + class InfrastructureSpec implements IInfrastructureSpec { + + /** + * Constructs a new InfrastructureSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Task.IInfrastructureSpec); + + /** InfrastructureSpec batch. */ + public batch?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources|null); + + /** InfrastructureSpec containerImage. */ + public containerImage?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime|null); + + /** InfrastructureSpec vpcNetwork. */ + public vpcNetwork?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork|null); + + /** InfrastructureSpec resources. */ + public resources?: "batch"; + + /** InfrastructureSpec runtime. */ + public runtime?: "containerImage"; + + /** InfrastructureSpec network. */ + public network?: "vpcNetwork"; + + /** + * Creates a new InfrastructureSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns InfrastructureSpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.Task.IInfrastructureSpec): google.cloud.dataplex.v1.Task.InfrastructureSpec; + + /** + * Encodes the specified InfrastructureSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.verify|verify} messages. + * @param message InfrastructureSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Task.IInfrastructureSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InfrastructureSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.verify|verify} messages. + * @param message InfrastructureSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Task.IInfrastructureSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InfrastructureSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InfrastructureSpec + * @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.dataplex.v1.Task.InfrastructureSpec; + + /** + * Decodes an InfrastructureSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InfrastructureSpec + * @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.dataplex.v1.Task.InfrastructureSpec; + + /** + * Verifies an InfrastructureSpec 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 InfrastructureSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InfrastructureSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.InfrastructureSpec; + + /** + * Creates a plain object from an InfrastructureSpec message. Also converts values to other types if specified. + * @param message InfrastructureSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task.InfrastructureSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InfrastructureSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InfrastructureSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace InfrastructureSpec { + + /** Properties of a BatchComputeResources. */ + interface IBatchComputeResources { + + /** BatchComputeResources executorsCount */ + executorsCount?: (number|null); + + /** BatchComputeResources maxExecutorsCount */ + maxExecutorsCount?: (number|null); + } + + /** Represents a BatchComputeResources. */ + class BatchComputeResources implements IBatchComputeResources { + + /** + * Constructs a new BatchComputeResources. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources); + + /** BatchComputeResources executorsCount. */ + public executorsCount: number; + + /** BatchComputeResources maxExecutorsCount. */ + public maxExecutorsCount: number; + + /** + * Creates a new BatchComputeResources instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchComputeResources instance + */ + public static create(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources): google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources; + + /** + * Encodes the specified BatchComputeResources message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify|verify} messages. + * @param message BatchComputeResources message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchComputeResources message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify|verify} messages. + * @param message BatchComputeResources message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchComputeResources message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchComputeResources + * @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.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources; + + /** + * Decodes a BatchComputeResources message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchComputeResources + * @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.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources; + + /** + * Verifies a BatchComputeResources 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); - /** CreateZoneRequest zone */ - zone?: (google.cloud.dataplex.v1.IZone|null); + /** + * Creates a BatchComputeResources message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchComputeResources + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources; - /** CreateZoneRequest validateOnly */ - validateOnly?: (boolean|null); - } + /** + * Creates a plain object from a BatchComputeResources message. Also converts values to other types if specified. + * @param message BatchComputeResources + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents a CreateZoneRequest. */ - class CreateZoneRequest implements ICreateZoneRequest { + /** + * Converts this BatchComputeResources to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Constructs a new CreateZoneRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.ICreateZoneRequest); + /** + * Gets the default type url for BatchComputeResources + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** CreateZoneRequest parent. */ - public parent: string; + /** Properties of a ContainerImageRuntime. */ + interface IContainerImageRuntime { - /** CreateZoneRequest zoneId. */ - public zoneId: string; + /** ContainerImageRuntime image */ + image?: (string|null); - /** CreateZoneRequest zone. */ - public zone?: (google.cloud.dataplex.v1.IZone|null); + /** ContainerImageRuntime javaJars */ + javaJars?: (string[]|null); - /** CreateZoneRequest validateOnly. */ - public validateOnly: boolean; + /** ContainerImageRuntime pythonPackages */ + pythonPackages?: (string[]|null); - /** - * Creates a new CreateZoneRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateZoneRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.ICreateZoneRequest): google.cloud.dataplex.v1.CreateZoneRequest; + /** ContainerImageRuntime properties */ + properties?: ({ [k: string]: string }|null); + } - /** - * Encodes the specified CreateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. - * @param message CreateZoneRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.ICreateZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a ContainerImageRuntime. */ + class ContainerImageRuntime implements IContainerImageRuntime { - /** - * Encodes the specified CreateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. - * @param message CreateZoneRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new ContainerImageRuntime. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime); - /** - * Decodes a CreateZoneRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateZoneRequest - * @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.dataplex.v1.CreateZoneRequest; + /** ContainerImageRuntime image. */ + public image: string; - /** - * Decodes a CreateZoneRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateZoneRequest - * @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.dataplex.v1.CreateZoneRequest; + /** ContainerImageRuntime javaJars. */ + public javaJars: string[]; - /** - * Verifies a CreateZoneRequest 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); + /** ContainerImageRuntime pythonPackages. */ + public pythonPackages: string[]; - /** - * Creates a CreateZoneRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateZoneRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateZoneRequest; + /** ContainerImageRuntime properties. */ + public properties: { [k: string]: string }; - /** - * Creates a plain object from a CreateZoneRequest message. Also converts values to other types if specified. - * @param message CreateZoneRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.CreateZoneRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a new ContainerImageRuntime instance using the specified properties. + * @param [properties] Properties to set + * @returns ContainerImageRuntime instance + */ + public static create(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime): google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime; - /** - * Converts this CreateZoneRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Encodes the specified ContainerImageRuntime message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify|verify} messages. + * @param message ContainerImageRuntime message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Gets the default type url for CreateZoneRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Encodes the specified ContainerImageRuntime message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify|verify} messages. + * @param message ContainerImageRuntime message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of an UpdateZoneRequest. */ - interface IUpdateZoneRequest { + /** + * Decodes a ContainerImageRuntime message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ContainerImageRuntime + * @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.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime; - /** UpdateZoneRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** + * Decodes a ContainerImageRuntime message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ContainerImageRuntime + * @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.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime; - /** UpdateZoneRequest zone */ - zone?: (google.cloud.dataplex.v1.IZone|null); + /** + * Verifies a ContainerImageRuntime 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); - /** UpdateZoneRequest validateOnly */ - validateOnly?: (boolean|null); - } + /** + * Creates a ContainerImageRuntime message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContainerImageRuntime + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime; - /** Represents an UpdateZoneRequest. */ - class UpdateZoneRequest implements IUpdateZoneRequest { + /** + * Creates a plain object from a ContainerImageRuntime message. Also converts values to other types if specified. + * @param message ContainerImageRuntime + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Constructs a new UpdateZoneRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IUpdateZoneRequest); + /** + * Converts this ContainerImageRuntime to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** UpdateZoneRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** + * Gets the default type url for ContainerImageRuntime + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** UpdateZoneRequest zone. */ - public zone?: (google.cloud.dataplex.v1.IZone|null); + /** Properties of a VpcNetwork. */ + interface IVpcNetwork { - /** UpdateZoneRequest validateOnly. */ - public validateOnly: boolean; + /** VpcNetwork network */ + network?: (string|null); - /** - * Creates a new UpdateZoneRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateZoneRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IUpdateZoneRequest): google.cloud.dataplex.v1.UpdateZoneRequest; + /** VpcNetwork subNetwork */ + subNetwork?: (string|null); - /** - * Encodes the specified UpdateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. - * @param message UpdateZoneRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IUpdateZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** VpcNetwork networkTags */ + networkTags?: (string[]|null); + } - /** - * Encodes the specified UpdateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. - * @param message UpdateZoneRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a VpcNetwork. */ + class VpcNetwork implements IVpcNetwork { - /** - * Decodes an UpdateZoneRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateZoneRequest - * @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.dataplex.v1.UpdateZoneRequest; + /** + * Constructs a new VpcNetwork. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork); - /** - * Decodes an UpdateZoneRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateZoneRequest - * @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.dataplex.v1.UpdateZoneRequest; + /** VpcNetwork network. */ + public network?: (string|null); - /** - * Verifies an UpdateZoneRequest 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); + /** VpcNetwork subNetwork. */ + public subNetwork?: (string|null); - /** - * Creates an UpdateZoneRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateZoneRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateZoneRequest; + /** VpcNetwork networkTags. */ + public networkTags: string[]; - /** - * Creates a plain object from an UpdateZoneRequest message. Also converts values to other types if specified. - * @param message UpdateZoneRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.UpdateZoneRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** VpcNetwork networkName. */ + public networkName?: ("network"|"subNetwork"); - /** - * Converts this UpdateZoneRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a new VpcNetwork instance using the specified properties. + * @param [properties] Properties to set + * @returns VpcNetwork instance + */ + public static create(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork): google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork; - /** - * Gets the default type url for UpdateZoneRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Encodes the specified VpcNetwork message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify|verify} messages. + * @param message VpcNetwork message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a DeleteZoneRequest. */ - interface IDeleteZoneRequest { + /** + * Encodes the specified VpcNetwork message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify|verify} messages. + * @param message VpcNetwork message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork, writer?: $protobuf.Writer): $protobuf.Writer; - /** DeleteZoneRequest name */ - name?: (string|null); - } + /** + * Decodes a VpcNetwork message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VpcNetwork + * @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.dataplex.v1.Task.InfrastructureSpec.VpcNetwork; - /** Represents a DeleteZoneRequest. */ - class DeleteZoneRequest implements IDeleteZoneRequest { + /** + * Decodes a VpcNetwork message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VpcNetwork + * @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.dataplex.v1.Task.InfrastructureSpec.VpcNetwork; - /** - * Constructs a new DeleteZoneRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDeleteZoneRequest); + /** + * Verifies a VpcNetwork 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); - /** DeleteZoneRequest name. */ - public name: string; + /** + * Creates a VpcNetwork message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VpcNetwork + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork; - /** - * Creates a new DeleteZoneRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteZoneRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IDeleteZoneRequest): google.cloud.dataplex.v1.DeleteZoneRequest; + /** + * Creates a plain object from a VpcNetwork message. Also converts values to other types if specified. + * @param message VpcNetwork + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified DeleteZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. - * @param message DeleteZoneRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IDeleteZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this VpcNetwork to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Encodes the specified DeleteZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. - * @param message DeleteZoneRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Gets the default type url for VpcNetwork + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } - /** - * Decodes a DeleteZoneRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteZoneRequest - * @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.dataplex.v1.DeleteZoneRequest; + /** Properties of a TriggerSpec. */ + interface ITriggerSpec { - /** - * Decodes a DeleteZoneRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteZoneRequest - * @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.dataplex.v1.DeleteZoneRequest; + /** TriggerSpec type */ + type?: (google.cloud.dataplex.v1.Task.TriggerSpec.Type|keyof typeof google.cloud.dataplex.v1.Task.TriggerSpec.Type|null); - /** - * Verifies a DeleteZoneRequest 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); + /** TriggerSpec startTime */ + startTime?: (google.protobuf.ITimestamp|null); - /** - * Creates a DeleteZoneRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteZoneRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteZoneRequest; + /** TriggerSpec disabled */ + disabled?: (boolean|null); - /** - * Creates a plain object from a DeleteZoneRequest message. Also converts values to other types if specified. - * @param message DeleteZoneRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.DeleteZoneRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** TriggerSpec maxRetries */ + maxRetries?: (number|null); - /** - * Converts this DeleteZoneRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** TriggerSpec schedule */ + schedule?: (string|null); + } - /** - * Gets the default type url for DeleteZoneRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Represents a TriggerSpec. */ + class TriggerSpec implements ITriggerSpec { - /** Properties of a ListZonesRequest. */ - interface IListZonesRequest { + /** + * Constructs a new TriggerSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Task.ITriggerSpec); - /** ListZonesRequest parent */ - parent?: (string|null); + /** TriggerSpec type. */ + public type: (google.cloud.dataplex.v1.Task.TriggerSpec.Type|keyof typeof google.cloud.dataplex.v1.Task.TriggerSpec.Type); - /** ListZonesRequest pageSize */ - pageSize?: (number|null); + /** TriggerSpec startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** TriggerSpec disabled. */ + public disabled: boolean; + + /** TriggerSpec maxRetries. */ + public maxRetries: number; - /** ListZonesRequest pageToken */ - pageToken?: (string|null); + /** TriggerSpec schedule. */ + public schedule?: (string|null); - /** ListZonesRequest filter */ - filter?: (string|null); + /** TriggerSpec trigger. */ + public trigger?: "schedule"; - /** ListZonesRequest orderBy */ - orderBy?: (string|null); - } + /** + * Creates a new TriggerSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns TriggerSpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.Task.ITriggerSpec): google.cloud.dataplex.v1.Task.TriggerSpec; - /** Represents a ListZonesRequest. */ - class ListZonesRequest implements IListZonesRequest { + /** + * Encodes the specified TriggerSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.TriggerSpec.verify|verify} messages. + * @param message TriggerSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Task.ITriggerSpec, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new ListZonesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListZonesRequest); + /** + * Encodes the specified TriggerSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.TriggerSpec.verify|verify} messages. + * @param message TriggerSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Task.ITriggerSpec, writer?: $protobuf.Writer): $protobuf.Writer; - /** ListZonesRequest parent. */ - public parent: string; + /** + * Decodes a TriggerSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TriggerSpec + * @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.dataplex.v1.Task.TriggerSpec; - /** ListZonesRequest pageSize. */ - public pageSize: number; + /** + * Decodes a TriggerSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TriggerSpec + * @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.dataplex.v1.Task.TriggerSpec; - /** ListZonesRequest pageToken. */ - public pageToken: string; + /** + * Verifies a TriggerSpec 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); - /** ListZonesRequest filter. */ - public filter: string; + /** + * Creates a TriggerSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TriggerSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.TriggerSpec; - /** ListZonesRequest orderBy. */ - public orderBy: string; + /** + * Creates a plain object from a TriggerSpec message. Also converts values to other types if specified. + * @param message TriggerSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task.TriggerSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a new ListZonesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListZonesRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListZonesRequest): google.cloud.dataplex.v1.ListZonesRequest; + /** + * Converts this TriggerSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Encodes the specified ListZonesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. - * @param message ListZonesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListZonesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Gets the default type url for TriggerSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Encodes the specified ListZonesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. - * @param message ListZonesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListZonesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + namespace TriggerSpec { - /** - * Decodes a ListZonesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListZonesRequest - * @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.dataplex.v1.ListZonesRequest; + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + ON_DEMAND = 1, + RECURRING = 2 + } + } - /** - * Decodes a ListZonesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListZonesRequest - * @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.dataplex.v1.ListZonesRequest; + /** Properties of an ExecutionSpec. */ + interface IExecutionSpec { - /** - * Verifies a ListZonesRequest 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); + /** ExecutionSpec args */ + args?: ({ [k: string]: string }|null); - /** - * Creates a ListZonesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListZonesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListZonesRequest; + /** ExecutionSpec serviceAccount */ + serviceAccount?: (string|null); - /** - * Creates a plain object from a ListZonesRequest message. Also converts values to other types if specified. - * @param message ListZonesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListZonesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ExecutionSpec project */ + project?: (string|null); - /** - * Converts this ListZonesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** ExecutionSpec maxJobExecutionLifetime */ + maxJobExecutionLifetime?: (google.protobuf.IDuration|null); - /** - * Gets the default type url for ListZonesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** ExecutionSpec kmsKey */ + kmsKey?: (string|null); + } - /** Properties of a ListZonesResponse. */ - interface IListZonesResponse { + /** Represents an ExecutionSpec. */ + class ExecutionSpec implements IExecutionSpec { - /** ListZonesResponse zones */ - zones?: (google.cloud.dataplex.v1.IZone[]|null); + /** + * Constructs a new ExecutionSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Task.IExecutionSpec); - /** ListZonesResponse nextPageToken */ - nextPageToken?: (string|null); - } + /** ExecutionSpec args. */ + public args: { [k: string]: string }; - /** Represents a ListZonesResponse. */ - class ListZonesResponse implements IListZonesResponse { + /** ExecutionSpec serviceAccount. */ + public serviceAccount: string; - /** - * Constructs a new ListZonesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListZonesResponse); + /** ExecutionSpec project. */ + public project: string; - /** ListZonesResponse zones. */ - public zones: google.cloud.dataplex.v1.IZone[]; + /** ExecutionSpec maxJobExecutionLifetime. */ + public maxJobExecutionLifetime?: (google.protobuf.IDuration|null); - /** ListZonesResponse nextPageToken. */ - public nextPageToken: string; + /** ExecutionSpec kmsKey. */ + public kmsKey: string; - /** - * Creates a new ListZonesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListZonesResponse instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListZonesResponse): google.cloud.dataplex.v1.ListZonesResponse; + /** + * Creates a new ExecutionSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecutionSpec instance + */ + public static create(properties?: google.cloud.dataplex.v1.Task.IExecutionSpec): google.cloud.dataplex.v1.Task.ExecutionSpec; - /** - * Encodes the specified ListZonesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. - * @param message ListZonesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListZonesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ExecutionSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionSpec.verify|verify} messages. + * @param message ExecutionSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Task.IExecutionSpec, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ListZonesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. - * @param message ListZonesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListZonesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ExecutionSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionSpec.verify|verify} messages. + * @param message ExecutionSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Task.IExecutionSpec, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a ListZonesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListZonesResponse - * @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.dataplex.v1.ListZonesResponse; + /** + * Decodes an ExecutionSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecutionSpec + * @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.dataplex.v1.Task.ExecutionSpec; - /** - * Decodes a ListZonesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListZonesResponse - * @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.dataplex.v1.ListZonesResponse; + /** + * Decodes an ExecutionSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecutionSpec + * @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.dataplex.v1.Task.ExecutionSpec; - /** - * Verifies a ListZonesResponse 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); + /** + * Verifies an ExecutionSpec 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 ListZonesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListZonesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListZonesResponse; + /** + * Creates an ExecutionSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecutionSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.ExecutionSpec; - /** - * Creates a plain object from a ListZonesResponse message. Also converts values to other types if specified. - * @param message ListZonesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListZonesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from an ExecutionSpec message. Also converts values to other types if specified. + * @param message ExecutionSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task.ExecutionSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this ListZonesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this ExecutionSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for ListZonesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Gets the default type url for ExecutionSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Properties of a ListZoneActionsRequest. */ - interface IListZoneActionsRequest { + /** Properties of a SparkTaskConfig. */ + interface ISparkTaskConfig { - /** ListZoneActionsRequest parent */ - parent?: (string|null); + /** SparkTaskConfig mainJarFileUri */ + mainJarFileUri?: (string|null); - /** ListZoneActionsRequest pageSize */ - pageSize?: (number|null); + /** SparkTaskConfig mainClass */ + mainClass?: (string|null); - /** ListZoneActionsRequest pageToken */ - pageToken?: (string|null); - } + /** SparkTaskConfig pythonScriptFile */ + pythonScriptFile?: (string|null); - /** Represents a ListZoneActionsRequest. */ - class ListZoneActionsRequest implements IListZoneActionsRequest { + /** SparkTaskConfig sqlScriptFile */ + sqlScriptFile?: (string|null); - /** - * Constructs a new ListZoneActionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListZoneActionsRequest); + /** SparkTaskConfig sqlScript */ + sqlScript?: (string|null); - /** ListZoneActionsRequest parent. */ - public parent: string; + /** SparkTaskConfig fileUris */ + fileUris?: (string[]|null); - /** ListZoneActionsRequest pageSize. */ - public pageSize: number; + /** SparkTaskConfig archiveUris */ + archiveUris?: (string[]|null); - /** ListZoneActionsRequest pageToken. */ - public pageToken: string; + /** SparkTaskConfig infrastructureSpec */ + infrastructureSpec?: (google.cloud.dataplex.v1.Task.IInfrastructureSpec|null); + } - /** - * Creates a new ListZoneActionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListZoneActionsRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListZoneActionsRequest): google.cloud.dataplex.v1.ListZoneActionsRequest; + /** Represents a SparkTaskConfig. */ + class SparkTaskConfig implements ISparkTaskConfig { - /** - * Encodes the specified ListZoneActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. - * @param message ListZoneActionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListZoneActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new SparkTaskConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Task.ISparkTaskConfig); - /** - * Encodes the specified ListZoneActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. - * @param message ListZoneActionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListZoneActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** SparkTaskConfig mainJarFileUri. */ + public mainJarFileUri?: (string|null); - /** - * Decodes a ListZoneActionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListZoneActionsRequest - * @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.dataplex.v1.ListZoneActionsRequest; + /** SparkTaskConfig mainClass. */ + public mainClass?: (string|null); - /** - * Decodes a ListZoneActionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListZoneActionsRequest - * @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.dataplex.v1.ListZoneActionsRequest; + /** SparkTaskConfig pythonScriptFile. */ + public pythonScriptFile?: (string|null); - /** - * Verifies a ListZoneActionsRequest 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); + /** SparkTaskConfig sqlScriptFile. */ + public sqlScriptFile?: (string|null); - /** - * Creates a ListZoneActionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListZoneActionsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListZoneActionsRequest; + /** SparkTaskConfig sqlScript. */ + public sqlScript?: (string|null); - /** - * Creates a plain object from a ListZoneActionsRequest message. Also converts values to other types if specified. - * @param message ListZoneActionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListZoneActionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** SparkTaskConfig fileUris. */ + public fileUris: string[]; - /** - * Converts this ListZoneActionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** SparkTaskConfig archiveUris. */ + public archiveUris: string[]; - /** - * Gets the default type url for ListZoneActionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** SparkTaskConfig infrastructureSpec. */ + public infrastructureSpec?: (google.cloud.dataplex.v1.Task.IInfrastructureSpec|null); - /** Properties of a GetZoneRequest. */ - interface IGetZoneRequest { + /** SparkTaskConfig driver. */ + public driver?: ("mainJarFileUri"|"mainClass"|"pythonScriptFile"|"sqlScriptFile"|"sqlScript"); - /** GetZoneRequest name */ - name?: (string|null); - } + /** + * Creates a new SparkTaskConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SparkTaskConfig instance + */ + public static create(properties?: google.cloud.dataplex.v1.Task.ISparkTaskConfig): google.cloud.dataplex.v1.Task.SparkTaskConfig; - /** Represents a GetZoneRequest. */ - class GetZoneRequest implements IGetZoneRequest { + /** + * Encodes the specified SparkTaskConfig message. Does not implicitly {@link google.cloud.dataplex.v1.Task.SparkTaskConfig.verify|verify} messages. + * @param message SparkTaskConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Task.ISparkTaskConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new GetZoneRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IGetZoneRequest); + /** + * Encodes the specified SparkTaskConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.SparkTaskConfig.verify|verify} messages. + * @param message SparkTaskConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Task.ISparkTaskConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** GetZoneRequest name. */ - public name: string; + /** + * Decodes a SparkTaskConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SparkTaskConfig + * @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.dataplex.v1.Task.SparkTaskConfig; - /** - * Creates a new GetZoneRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetZoneRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IGetZoneRequest): google.cloud.dataplex.v1.GetZoneRequest; + /** + * Decodes a SparkTaskConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SparkTaskConfig + * @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.dataplex.v1.Task.SparkTaskConfig; - /** - * Encodes the specified GetZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. - * @param message GetZoneRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IGetZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies a SparkTaskConfig 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); - /** - * Encodes the specified GetZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. - * @param message GetZoneRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGetZoneRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a SparkTaskConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SparkTaskConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.SparkTaskConfig; - /** - * Decodes a GetZoneRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetZoneRequest - * @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.dataplex.v1.GetZoneRequest; + /** + * Creates a plain object from a SparkTaskConfig message. Also converts values to other types if specified. + * @param message SparkTaskConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task.SparkTaskConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a GetZoneRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetZoneRequest - * @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.dataplex.v1.GetZoneRequest; + /** + * Converts this SparkTaskConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Verifies a GetZoneRequest 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); + /** + * Gets the default type url for SparkTaskConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Creates a GetZoneRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetZoneRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetZoneRequest; + /** Properties of a NotebookTaskConfig. */ + interface INotebookTaskConfig { - /** - * Creates a plain object from a GetZoneRequest message. Also converts values to other types if specified. - * @param message GetZoneRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.GetZoneRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** NotebookTaskConfig notebook */ + notebook?: (string|null); - /** - * Converts this GetZoneRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** NotebookTaskConfig infrastructureSpec */ + infrastructureSpec?: (google.cloud.dataplex.v1.Task.IInfrastructureSpec|null); - /** - * Gets the default type url for GetZoneRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** NotebookTaskConfig fileUris */ + fileUris?: (string[]|null); - /** Properties of a CreateAssetRequest. */ - interface ICreateAssetRequest { + /** NotebookTaskConfig archiveUris */ + archiveUris?: (string[]|null); + } - /** CreateAssetRequest parent */ - parent?: (string|null); + /** Represents a NotebookTaskConfig. */ + class NotebookTaskConfig implements INotebookTaskConfig { - /** CreateAssetRequest assetId */ - assetId?: (string|null); + /** + * Constructs a new NotebookTaskConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Task.INotebookTaskConfig); - /** CreateAssetRequest asset */ - asset?: (google.cloud.dataplex.v1.IAsset|null); + /** NotebookTaskConfig notebook. */ + public notebook: string; - /** CreateAssetRequest validateOnly */ - validateOnly?: (boolean|null); - } + /** NotebookTaskConfig infrastructureSpec. */ + public infrastructureSpec?: (google.cloud.dataplex.v1.Task.IInfrastructureSpec|null); - /** Represents a CreateAssetRequest. */ - class CreateAssetRequest implements ICreateAssetRequest { + /** NotebookTaskConfig fileUris. */ + public fileUris: string[]; - /** - * Constructs a new CreateAssetRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.ICreateAssetRequest); + /** NotebookTaskConfig archiveUris. */ + public archiveUris: string[]; - /** CreateAssetRequest parent. */ - public parent: string; + /** + * Creates a new NotebookTaskConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NotebookTaskConfig instance + */ + public static create(properties?: google.cloud.dataplex.v1.Task.INotebookTaskConfig): google.cloud.dataplex.v1.Task.NotebookTaskConfig; - /** CreateAssetRequest assetId. */ - public assetId: string; + /** + * Encodes the specified NotebookTaskConfig message. Does not implicitly {@link google.cloud.dataplex.v1.Task.NotebookTaskConfig.verify|verify} messages. + * @param message NotebookTaskConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Task.INotebookTaskConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** CreateAssetRequest asset. */ - public asset?: (google.cloud.dataplex.v1.IAsset|null); + /** + * Encodes the specified NotebookTaskConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.NotebookTaskConfig.verify|verify} messages. + * @param message NotebookTaskConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Task.INotebookTaskConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** CreateAssetRequest validateOnly. */ - public validateOnly: boolean; + /** + * Decodes a NotebookTaskConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NotebookTaskConfig + * @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.dataplex.v1.Task.NotebookTaskConfig; - /** - * Creates a new CreateAssetRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateAssetRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.ICreateAssetRequest): google.cloud.dataplex.v1.CreateAssetRequest; + /** + * Decodes a NotebookTaskConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NotebookTaskConfig + * @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.dataplex.v1.Task.NotebookTaskConfig; - /** - * Encodes the specified CreateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. - * @param message CreateAssetRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.ICreateAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies a NotebookTaskConfig 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); - /** - * Encodes the specified CreateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. - * @param message CreateAssetRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a NotebookTaskConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NotebookTaskConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.NotebookTaskConfig; + + /** + * Creates a plain object from a NotebookTaskConfig message. Also converts values to other types if specified. + * @param message NotebookTaskConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task.NotebookTaskConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a CreateAssetRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateAssetRequest - * @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.dataplex.v1.CreateAssetRequest; + /** + * Converts this NotebookTaskConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Decodes a CreateAssetRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateAssetRequest - * @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.dataplex.v1.CreateAssetRequest; + /** + * Gets the default type url for NotebookTaskConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Verifies a CreateAssetRequest 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); + /** Properties of an ExecutionStatus. */ + interface IExecutionStatus { - /** - * Creates a CreateAssetRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateAssetRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateAssetRequest; + /** ExecutionStatus updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** - * Creates a plain object from a CreateAssetRequest message. Also converts values to other types if specified. - * @param message CreateAssetRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.CreateAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ExecutionStatus latestJob */ + latestJob?: (google.cloud.dataplex.v1.IJob|null); + } - /** - * Converts this CreateAssetRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Represents an ExecutionStatus. */ + class ExecutionStatus implements IExecutionStatus { - /** - * Gets the default type url for CreateAssetRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Constructs a new ExecutionStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.Task.IExecutionStatus); - /** Properties of an UpdateAssetRequest. */ - interface IUpdateAssetRequest { + /** ExecutionStatus updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** UpdateAssetRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** ExecutionStatus latestJob. */ + public latestJob?: (google.cloud.dataplex.v1.IJob|null); - /** UpdateAssetRequest asset */ - asset?: (google.cloud.dataplex.v1.IAsset|null); + /** + * Creates a new ExecutionStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecutionStatus instance + */ + public static create(properties?: google.cloud.dataplex.v1.Task.IExecutionStatus): google.cloud.dataplex.v1.Task.ExecutionStatus; - /** UpdateAssetRequest validateOnly */ - validateOnly?: (boolean|null); - } + /** + * Encodes the specified ExecutionStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionStatus.verify|verify} messages. + * @param message ExecutionStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.Task.IExecutionStatus, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents an UpdateAssetRequest. */ - class UpdateAssetRequest implements IUpdateAssetRequest { + /** + * Encodes the specified ExecutionStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionStatus.verify|verify} messages. + * @param message ExecutionStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.Task.IExecutionStatus, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new UpdateAssetRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IUpdateAssetRequest); + /** + * Decodes an ExecutionStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecutionStatus + * @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.dataplex.v1.Task.ExecutionStatus; - /** UpdateAssetRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** + * Decodes an ExecutionStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecutionStatus + * @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.dataplex.v1.Task.ExecutionStatus; - /** UpdateAssetRequest asset. */ - public asset?: (google.cloud.dataplex.v1.IAsset|null); + /** + * Verifies an ExecutionStatus 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); - /** UpdateAssetRequest validateOnly. */ - public validateOnly: boolean; + /** + * Creates an ExecutionStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecutionStatus + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.ExecutionStatus; - /** - * Creates a new UpdateAssetRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateAssetRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IUpdateAssetRequest): google.cloud.dataplex.v1.UpdateAssetRequest; + /** + * Creates a plain object from an ExecutionStatus message. Also converts values to other types if specified. + * @param message ExecutionStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Task.ExecutionStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified UpdateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. - * @param message UpdateAssetRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IUpdateAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this ExecutionStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Encodes the specified UpdateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. - * @param message UpdateAssetRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Gets the default type url for ExecutionStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } - /** - * Decodes an UpdateAssetRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateAssetRequest - * @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.dataplex.v1.UpdateAssetRequest; + /** Properties of a Job. */ + interface IJob { - /** - * Decodes an UpdateAssetRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateAssetRequest - * @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.dataplex.v1.UpdateAssetRequest; + /** Job name */ + name?: (string|null); - /** - * Verifies an UpdateAssetRequest 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); + /** Job uid */ + uid?: (string|null); - /** - * Creates an UpdateAssetRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateAssetRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateAssetRequest; + /** Job startTime */ + startTime?: (google.protobuf.ITimestamp|null); - /** - * Creates a plain object from an UpdateAssetRequest message. Also converts values to other types if specified. - * @param message UpdateAssetRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.UpdateAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Job endTime */ + endTime?: (google.protobuf.ITimestamp|null); - /** - * Converts this UpdateAssetRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Job state */ + state?: (google.cloud.dataplex.v1.Job.State|keyof typeof google.cloud.dataplex.v1.Job.State|null); - /** - * Gets the default type url for UpdateAssetRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Job retryCount */ + retryCount?: (number|null); + + /** Job service */ + service?: (google.cloud.dataplex.v1.Job.Service|keyof typeof google.cloud.dataplex.v1.Job.Service|null); - /** Properties of a DeleteAssetRequest. */ - interface IDeleteAssetRequest { + /** Job serviceJob */ + serviceJob?: (string|null); - /** DeleteAssetRequest name */ - name?: (string|null); + /** Job message */ + message?: (string|null); } - /** Represents a DeleteAssetRequest. */ - class DeleteAssetRequest implements IDeleteAssetRequest { + /** Represents a Job. */ + class Job implements IJob { /** - * Constructs a new DeleteAssetRequest. + * Constructs a new Job. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IDeleteAssetRequest); + constructor(properties?: google.cloud.dataplex.v1.IJob); - /** DeleteAssetRequest name. */ + /** Job name. */ public name: string; + /** Job uid. */ + public uid: string; + + /** Job startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** Job endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** Job state. */ + public state: (google.cloud.dataplex.v1.Job.State|keyof typeof google.cloud.dataplex.v1.Job.State); + + /** Job retryCount. */ + public retryCount: number; + + /** Job service. */ + public service: (google.cloud.dataplex.v1.Job.Service|keyof typeof google.cloud.dataplex.v1.Job.Service); + + /** Job serviceJob. */ + public serviceJob: string; + + /** Job message. */ + public message: string; + /** - * Creates a new DeleteAssetRequest instance using the specified properties. + * Creates a new Job instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteAssetRequest instance + * @returns Job instance */ - public static create(properties?: google.cloud.dataplex.v1.IDeleteAssetRequest): google.cloud.dataplex.v1.DeleteAssetRequest; + public static create(properties?: google.cloud.dataplex.v1.IJob): google.cloud.dataplex.v1.Job; /** - * Encodes the specified DeleteAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. - * @param message DeleteAssetRequest message or plain object to encode + * Encodes the specified Job message. Does not implicitly {@link google.cloud.dataplex.v1.Job.verify|verify} messages. + * @param message Job message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IDeleteAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IJob, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. - * @param message DeleteAssetRequest message or plain object to encode + * Encodes the specified Job message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Job.verify|verify} messages. + * @param message Job message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IJob, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteAssetRequest message from the specified reader or buffer. + * Decodes a Job message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteAssetRequest + * @returns Job * @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.dataplex.v1.DeleteAssetRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Job; /** - * Decodes a DeleteAssetRequest message from the specified reader or buffer, length delimited. + * Decodes a Job message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteAssetRequest + * @returns Job * @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.dataplex.v1.DeleteAssetRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Job; /** - * Verifies a DeleteAssetRequest message. + * Verifies a Job 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 DeleteAssetRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Job message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteAssetRequest + * @returns Job */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteAssetRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Job; /** - * Creates a plain object from a DeleteAssetRequest message. Also converts values to other types if specified. - * @param message DeleteAssetRequest + * Creates a plain object from a Job message. Also converts values to other types if specified. + * @param message Job * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.DeleteAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.Job, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteAssetRequest to JSON. + * Converts this Job to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteAssetRequest + * Gets the default type url for Job * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListAssetsRequest. */ - interface IListAssetsRequest { - - /** ListAssetsRequest parent */ - parent?: (string|null); - - /** ListAssetsRequest pageSize */ - pageSize?: (number|null); - - /** ListAssetsRequest pageToken */ - pageToken?: (string|null); + namespace Job { - /** ListAssetsRequest filter */ - filter?: (string|null); + /** Service enum. */ + enum Service { + SERVICE_UNSPECIFIED = 0, + DATAPROC = 1 + } - /** ListAssetsRequest orderBy */ - orderBy?: (string|null); + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + RUNNING = 1, + CANCELLING = 2, + CANCELLED = 3, + SUCCEEDED = 4, + FAILED = 5, + ABORTED = 6 + } } - /** Represents a ListAssetsRequest. */ - class ListAssetsRequest implements IListAssetsRequest { + /** Properties of a DiscoveryEvent. */ + interface IDiscoveryEvent { - /** - * Constructs a new ListAssetsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListAssetsRequest); + /** DiscoveryEvent message */ + message?: (string|null); - /** ListAssetsRequest parent. */ - public parent: string; + /** DiscoveryEvent lakeId */ + lakeId?: (string|null); - /** ListAssetsRequest pageSize. */ - public pageSize: number; + /** DiscoveryEvent zoneId */ + zoneId?: (string|null); - /** ListAssetsRequest pageToken. */ - public pageToken: string; + /** DiscoveryEvent assetId */ + assetId?: (string|null); - /** ListAssetsRequest filter. */ - public filter: string; + /** DiscoveryEvent dataLocation */ + dataLocation?: (string|null); - /** ListAssetsRequest orderBy. */ - public orderBy: string; + /** DiscoveryEvent type */ + type?: (google.cloud.dataplex.v1.DiscoveryEvent.EventType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EventType|null); - /** - * Creates a new ListAssetsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListAssetsRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListAssetsRequest): google.cloud.dataplex.v1.ListAssetsRequest; + /** DiscoveryEvent config */ + config?: (google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null); - /** - * Encodes the specified ListAssetsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. - * @param message ListAssetsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** DiscoveryEvent entity */ + entity?: (google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null); - /** - * Encodes the specified ListAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. - * @param message ListAssetsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListAssetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** DiscoveryEvent partition */ + partition?: (google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null); - /** - * Decodes a ListAssetsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListAssetsRequest - * @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.dataplex.v1.ListAssetsRequest; + /** DiscoveryEvent action */ + action?: (google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null); + } - /** - * Decodes a ListAssetsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListAssetsRequest - * @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.dataplex.v1.ListAssetsRequest; + /** Represents a DiscoveryEvent. */ + class DiscoveryEvent implements IDiscoveryEvent { /** - * Verifies a ListAssetsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Constructs a new DiscoveryEvent. + * @param [properties] Properties to set */ - public static verify(message: { [k: string]: any }): (string|null); + constructor(properties?: google.cloud.dataplex.v1.IDiscoveryEvent); - /** - * Creates a ListAssetsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListAssetsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListAssetsRequest; + /** DiscoveryEvent message. */ + public message: string; - /** - * Creates a plain object from a ListAssetsRequest message. Also converts values to other types if specified. - * @param message ListAssetsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListAssetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** DiscoveryEvent lakeId. */ + public lakeId: string; - /** - * Converts this ListAssetsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** DiscoveryEvent zoneId. */ + public zoneId: string; - /** - * Gets the default type url for ListAssetsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** DiscoveryEvent assetId. */ + public assetId: string; - /** Properties of a ListAssetsResponse. */ - interface IListAssetsResponse { + /** DiscoveryEvent dataLocation. */ + public dataLocation: string; - /** ListAssetsResponse assets */ - assets?: (google.cloud.dataplex.v1.IAsset[]|null); + /** DiscoveryEvent type. */ + public type: (google.cloud.dataplex.v1.DiscoveryEvent.EventType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EventType); - /** ListAssetsResponse nextPageToken */ - nextPageToken?: (string|null); - } + /** DiscoveryEvent config. */ + public config?: (google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null); - /** Represents a ListAssetsResponse. */ - class ListAssetsResponse implements IListAssetsResponse { + /** DiscoveryEvent entity. */ + public entity?: (google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null); - /** - * Constructs a new ListAssetsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListAssetsResponse); + /** DiscoveryEvent partition. */ + public partition?: (google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null); - /** ListAssetsResponse assets. */ - public assets: google.cloud.dataplex.v1.IAsset[]; + /** DiscoveryEvent action. */ + public action?: (google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null); - /** ListAssetsResponse nextPageToken. */ - public nextPageToken: string; + /** DiscoveryEvent details. */ + public details?: ("config"|"entity"|"partition"|"action"); /** - * Creates a new ListAssetsResponse instance using the specified properties. + * Creates a new DiscoveryEvent instance using the specified properties. * @param [properties] Properties to set - * @returns ListAssetsResponse instance + * @returns DiscoveryEvent instance */ - public static create(properties?: google.cloud.dataplex.v1.IListAssetsResponse): google.cloud.dataplex.v1.ListAssetsResponse; + public static create(properties?: google.cloud.dataplex.v1.IDiscoveryEvent): google.cloud.dataplex.v1.DiscoveryEvent; /** - * Encodes the specified ListAssetsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. - * @param message ListAssetsResponse message or plain object to encode + * Encodes the specified DiscoveryEvent message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. + * @param message DiscoveryEvent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IListAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IDiscoveryEvent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. - * @param message ListAssetsResponse message or plain object to encode + * Encodes the specified DiscoveryEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. + * @param message DiscoveryEvent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListAssetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IDiscoveryEvent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListAssetsResponse message from the specified reader or buffer. + * Decodes a DiscoveryEvent message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListAssetsResponse + * @returns DiscoveryEvent * @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.dataplex.v1.ListAssetsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DiscoveryEvent; /** - * Decodes a ListAssetsResponse message from the specified reader or buffer, length delimited. + * Decodes a DiscoveryEvent message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListAssetsResponse + * @returns DiscoveryEvent * @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.dataplex.v1.ListAssetsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DiscoveryEvent; /** - * Verifies a ListAssetsResponse message. + * Verifies a DiscoveryEvent 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 ListAssetsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DiscoveryEvent message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListAssetsResponse + * @returns DiscoveryEvent */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListAssetsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent; /** - * Creates a plain object from a ListAssetsResponse message. Also converts values to other types if specified. - * @param message ListAssetsResponse + * Creates a plain object from a DiscoveryEvent message. Also converts values to other types if specified. + * @param message DiscoveryEvent * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.ListAssetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListAssetsResponse to JSON. + * Converts this DiscoveryEvent to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListAssetsResponse + * Gets the default type url for DiscoveryEvent * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListAssetActionsRequest. */ - interface IListAssetActionsRequest { + namespace DiscoveryEvent { - /** ListAssetActionsRequest parent */ - parent?: (string|null); + /** EventType enum. */ + enum EventType { + EVENT_TYPE_UNSPECIFIED = 0, + CONFIG = 1, + ENTITY_CREATED = 2, + ENTITY_UPDATED = 3, + ENTITY_DELETED = 4, + PARTITION_CREATED = 5, + PARTITION_UPDATED = 6, + PARTITION_DELETED = 7 + } - /** ListAssetActionsRequest pageSize */ - pageSize?: (number|null); + /** EntityType enum. */ + enum EntityType { + ENTITY_TYPE_UNSPECIFIED = 0, + TABLE = 1, + FILESET = 2 + } - /** ListAssetActionsRequest pageToken */ - pageToken?: (string|null); - } + /** Properties of a ConfigDetails. */ + interface IConfigDetails { - /** Represents a ListAssetActionsRequest. */ - class ListAssetActionsRequest implements IListAssetActionsRequest { + /** ConfigDetails parameters */ + parameters?: ({ [k: string]: string }|null); + } - /** - * Constructs a new ListAssetActionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListAssetActionsRequest); + /** Represents a ConfigDetails. */ + class ConfigDetails implements IConfigDetails { - /** ListAssetActionsRequest parent. */ - public parent: string; + /** + * Constructs a new ConfigDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails); - /** ListAssetActionsRequest pageSize. */ - public pageSize: number; + /** ConfigDetails parameters. */ + public parameters: { [k: string]: string }; - /** ListAssetActionsRequest pageToken. */ - public pageToken: string; + /** + * Creates a new ConfigDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns ConfigDetails instance + */ + public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails): google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails; - /** - * Creates a new ListAssetActionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListAssetActionsRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListAssetActionsRequest): google.cloud.dataplex.v1.ListAssetActionsRequest; + /** + * Encodes the specified ConfigDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. + * @param message ConfigDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ListAssetActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. - * @param message ListAssetActionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListAssetActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ConfigDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. + * @param message ConfigDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ListAssetActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. - * @param message ListAssetActionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListAssetActionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a ConfigDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConfigDetails + * @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.dataplex.v1.DiscoveryEvent.ConfigDetails; - /** - * Decodes a ListAssetActionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListAssetActionsRequest - * @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.dataplex.v1.ListAssetActionsRequest; + /** + * Decodes a ConfigDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConfigDetails + * @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.dataplex.v1.DiscoveryEvent.ConfigDetails; + + /** + * Verifies a ConfigDetails 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 ConfigDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConfigDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails; + + /** + * Creates a plain object from a ConfigDetails message. Also converts values to other types if specified. + * @param message ConfigDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConfigDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConfigDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EntityDetails. */ + interface IEntityDetails { + + /** EntityDetails entity */ + entity?: (string|null); + + /** EntityDetails type */ + type?: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null); + } + + /** Represents an EntityDetails. */ + class EntityDetails implements IEntityDetails { + + /** + * Constructs a new EntityDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails); + + /** EntityDetails entity. */ + public entity: string; + + /** EntityDetails type. */ + public type: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType); + + /** + * Creates a new EntityDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns EntityDetails instance + */ + public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails): google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails; + + /** + * Encodes the specified EntityDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. + * @param message EntityDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a ListAssetActionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListAssetActionsRequest - * @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.dataplex.v1.ListAssetActionsRequest; + /** + * Encodes the specified EntityDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. + * @param message EntityDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a ListAssetActionsRequest 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); + /** + * Decodes an EntityDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EntityDetails + * @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.dataplex.v1.DiscoveryEvent.EntityDetails; - /** - * Creates a ListAssetActionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListAssetActionsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListAssetActionsRequest; + /** + * Decodes an EntityDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EntityDetails + * @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.dataplex.v1.DiscoveryEvent.EntityDetails; - /** - * Creates a plain object from a ListAssetActionsRequest message. Also converts values to other types if specified. - * @param message ListAssetActionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.ListAssetActionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies an EntityDetails 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); - /** - * Converts this ListAssetActionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates an EntityDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EntityDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails; - /** - * Gets the default type url for ListAssetActionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a plain object from an EntityDetails message. Also converts values to other types if specified. + * @param message EntityDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of a GetAssetRequest. */ - interface IGetAssetRequest { + /** + * Converts this EntityDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** GetAssetRequest name */ - name?: (string|null); - } + /** + * Gets the default type url for EntityDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Represents a GetAssetRequest. */ - class GetAssetRequest implements IGetAssetRequest { + /** Properties of a PartitionDetails. */ + interface IPartitionDetails { - /** - * Constructs a new GetAssetRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IGetAssetRequest); + /** PartitionDetails partition */ + partition?: (string|null); - /** GetAssetRequest name. */ - public name: string; + /** PartitionDetails entity */ + entity?: (string|null); - /** - * Creates a new GetAssetRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetAssetRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IGetAssetRequest): google.cloud.dataplex.v1.GetAssetRequest; + /** PartitionDetails type */ + type?: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null); - /** - * Encodes the specified GetAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. - * @param message GetAssetRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IGetAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** PartitionDetails sampledDataLocations */ + sampledDataLocations?: (string[]|null); + } - /** - * Encodes the specified GetAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. - * @param message GetAssetRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGetAssetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a PartitionDetails. */ + class PartitionDetails implements IPartitionDetails { - /** - * Decodes a GetAssetRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetAssetRequest - * @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.dataplex.v1.GetAssetRequest; + /** + * Constructs a new PartitionDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails); - /** - * Decodes a GetAssetRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetAssetRequest - * @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.dataplex.v1.GetAssetRequest; + /** PartitionDetails partition. */ + public partition: string; - /** - * Verifies a GetAssetRequest 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); + /** PartitionDetails entity. */ + public entity: string; - /** - * Creates a GetAssetRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetAssetRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetAssetRequest; + /** PartitionDetails type. */ + public type: (google.cloud.dataplex.v1.DiscoveryEvent.EntityType|keyof typeof google.cloud.dataplex.v1.DiscoveryEvent.EntityType); - /** - * Creates a plain object from a GetAssetRequest message. Also converts values to other types if specified. - * @param message GetAssetRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.GetAssetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** PartitionDetails sampledDataLocations. */ + public sampledDataLocations: string[]; - /** - * Converts this GetAssetRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a new PartitionDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns PartitionDetails instance + */ + public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails): google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails; - /** - * Gets the default type url for GetAssetRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Encodes the specified PartitionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. + * @param message PartitionDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of an OperationMetadata. */ - interface IOperationMetadata { + /** + * Encodes the specified PartitionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. + * @param message PartitionDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails, writer?: $protobuf.Writer): $protobuf.Writer; - /** OperationMetadata createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** + * Decodes a PartitionDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PartitionDetails + * @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.dataplex.v1.DiscoveryEvent.PartitionDetails; - /** OperationMetadata endTime */ - endTime?: (google.protobuf.ITimestamp|null); + /** + * Decodes a PartitionDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PartitionDetails + * @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.dataplex.v1.DiscoveryEvent.PartitionDetails; + + /** + * Verifies a PartitionDetails 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); - /** OperationMetadata target */ - target?: (string|null); + /** + * Creates a PartitionDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PartitionDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails; - /** OperationMetadata verb */ - verb?: (string|null); + /** + * Creates a plain object from a PartitionDetails message. Also converts values to other types if specified. + * @param message PartitionDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** OperationMetadata statusMessage */ - statusMessage?: (string|null); + /** + * Converts this PartitionDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** OperationMetadata requestedCancellation */ - requestedCancellation?: (boolean|null); + /** + * Gets the default type url for PartitionDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** OperationMetadata apiVersion */ - apiVersion?: (string|null); - } + /** Properties of an ActionDetails. */ + interface IActionDetails { - /** Represents an OperationMetadata. */ - class OperationMetadata implements IOperationMetadata { + /** ActionDetails type */ + type?: (string|null); + } - /** - * Constructs a new OperationMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IOperationMetadata); + /** Represents an ActionDetails. */ + class ActionDetails implements IActionDetails { - /** OperationMetadata createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** + * Constructs a new ActionDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails); - /** OperationMetadata endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); + /** ActionDetails type. */ + public type: string; - /** OperationMetadata target. */ - public target: string; + /** + * Creates a new ActionDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns ActionDetails instance + */ + public static create(properties?: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails): google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails; - /** OperationMetadata verb. */ - public verb: string; + /** + * Encodes the specified ActionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. + * @param message ActionDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails, writer?: $protobuf.Writer): $protobuf.Writer; - /** OperationMetadata statusMessage. */ - public statusMessage: string; + /** + * Encodes the specified ActionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. + * @param message ActionDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails, writer?: $protobuf.Writer): $protobuf.Writer; - /** OperationMetadata requestedCancellation. */ - public requestedCancellation: boolean; + /** + * Decodes an ActionDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ActionDetails + * @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.dataplex.v1.DiscoveryEvent.ActionDetails; - /** OperationMetadata apiVersion. */ - public apiVersion: string; + /** + * Decodes an ActionDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ActionDetails + * @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.dataplex.v1.DiscoveryEvent.ActionDetails; - /** - * Creates a new OperationMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns OperationMetadata instance - */ - public static create(properties?: google.cloud.dataplex.v1.IOperationMetadata): google.cloud.dataplex.v1.OperationMetadata; + /** + * Verifies an ActionDetails 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); - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.dataplex.v1.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates an ActionDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ActionDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails; - /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from an ActionDetails message. Also converts values to other types if specified. + * @param message ActionDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes an OperationMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OperationMetadata - * @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.dataplex.v1.OperationMetadata; + /** + * Converts this ActionDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OperationMetadata - * @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.dataplex.v1.OperationMetadata; + /** + * Gets the default type url for ActionDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } - /** - * Verifies an OperationMetadata 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); + /** Properties of a JobEvent. */ + interface IJobEvent { - /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OperationMetadata - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.OperationMetadata; + /** JobEvent message */ + message?: (string|null); - /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @param message OperationMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** JobEvent jobId */ + jobId?: (string|null); - /** - * Converts this OperationMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** JobEvent startTime */ + startTime?: (google.protobuf.ITimestamp|null); - /** - * Gets the default type url for OperationMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** JobEvent endTime */ + endTime?: (google.protobuf.ITimestamp|null); - /** Properties of a CreateTaskRequest. */ - interface ICreateTaskRequest { + /** JobEvent state */ + state?: (google.cloud.dataplex.v1.JobEvent.State|keyof typeof google.cloud.dataplex.v1.JobEvent.State|null); - /** CreateTaskRequest parent */ - parent?: (string|null); + /** JobEvent retries */ + retries?: (number|null); - /** CreateTaskRequest taskId */ - taskId?: (string|null); + /** JobEvent type */ + type?: (google.cloud.dataplex.v1.JobEvent.Type|keyof typeof google.cloud.dataplex.v1.JobEvent.Type|null); - /** CreateTaskRequest task */ - task?: (google.cloud.dataplex.v1.ITask|null); + /** JobEvent service */ + service?: (google.cloud.dataplex.v1.JobEvent.Service|keyof typeof google.cloud.dataplex.v1.JobEvent.Service|null); - /** CreateTaskRequest validateOnly */ - validateOnly?: (boolean|null); + /** JobEvent serviceJob */ + serviceJob?: (string|null); } - /** Represents a CreateTaskRequest. */ - class CreateTaskRequest implements ICreateTaskRequest { + /** Represents a JobEvent. */ + class JobEvent implements IJobEvent { /** - * Constructs a new CreateTaskRequest. + * Constructs a new JobEvent. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.ICreateTaskRequest); + constructor(properties?: google.cloud.dataplex.v1.IJobEvent); + + /** JobEvent message. */ + public message: string; + + /** JobEvent jobId. */ + public jobId: string; + + /** JobEvent startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); - /** CreateTaskRequest parent. */ - public parent: string; + /** JobEvent endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); - /** CreateTaskRequest taskId. */ - public taskId: string; + /** JobEvent state. */ + public state: (google.cloud.dataplex.v1.JobEvent.State|keyof typeof google.cloud.dataplex.v1.JobEvent.State); - /** CreateTaskRequest task. */ - public task?: (google.cloud.dataplex.v1.ITask|null); + /** JobEvent retries. */ + public retries: number; - /** CreateTaskRequest validateOnly. */ - public validateOnly: boolean; + /** JobEvent type. */ + public type: (google.cloud.dataplex.v1.JobEvent.Type|keyof typeof google.cloud.dataplex.v1.JobEvent.Type); + + /** JobEvent service. */ + public service: (google.cloud.dataplex.v1.JobEvent.Service|keyof typeof google.cloud.dataplex.v1.JobEvent.Service); + + /** JobEvent serviceJob. */ + public serviceJob: string; /** - * Creates a new CreateTaskRequest instance using the specified properties. + * Creates a new JobEvent instance using the specified properties. * @param [properties] Properties to set - * @returns CreateTaskRequest instance + * @returns JobEvent instance */ - public static create(properties?: google.cloud.dataplex.v1.ICreateTaskRequest): google.cloud.dataplex.v1.CreateTaskRequest; + public static create(properties?: google.cloud.dataplex.v1.IJobEvent): google.cloud.dataplex.v1.JobEvent; /** - * Encodes the specified CreateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. - * @param message CreateTaskRequest message or plain object to encode + * Encodes the specified JobEvent message. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. + * @param message JobEvent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.ICreateTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IJobEvent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. - * @param message CreateTaskRequest message or plain object to encode + * Encodes the specified JobEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. + * @param message JobEvent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IJobEvent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateTaskRequest message from the specified reader or buffer. + * Decodes a JobEvent message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateTaskRequest + * @returns JobEvent * @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.dataplex.v1.CreateTaskRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.JobEvent; /** - * Decodes a CreateTaskRequest message from the specified reader or buffer, length delimited. + * Decodes a JobEvent message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateTaskRequest + * @returns JobEvent * @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.dataplex.v1.CreateTaskRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.JobEvent; /** - * Verifies a CreateTaskRequest message. + * Verifies a JobEvent 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 CreateTaskRequest message from a plain object. Also converts values to their respective internal types. + * Creates a JobEvent message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateTaskRequest + * @returns JobEvent */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateTaskRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.JobEvent; /** - * Creates a plain object from a CreateTaskRequest message. Also converts values to other types if specified. - * @param message CreateTaskRequest + * Creates a plain object from a JobEvent message. Also converts values to other types if specified. + * @param message JobEvent * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.CreateTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.JobEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateTaskRequest to JSON. + * Converts this JobEvent to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateTaskRequest + * Gets the default type url for JobEvent * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateTaskRequest. */ - interface IUpdateTaskRequest { + namespace JobEvent { - /** UpdateTaskRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + SPARK = 1, + NOTEBOOK = 2 + } - /** UpdateTaskRequest task */ - task?: (google.cloud.dataplex.v1.ITask|null); + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + SUCCEEDED = 1, + FAILED = 2, + CANCELLED = 3, + ABORTED = 4 + } - /** UpdateTaskRequest validateOnly */ - validateOnly?: (boolean|null); + /** Service enum. */ + enum Service { + SERVICE_UNSPECIFIED = 0, + DATAPROC = 1 + } } - /** Represents an UpdateTaskRequest. */ - class UpdateTaskRequest implements IUpdateTaskRequest { + /** Properties of a SessionEvent. */ + interface ISessionEvent { - /** - * Constructs a new UpdateTaskRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IUpdateTaskRequest); + /** SessionEvent message */ + message?: (string|null); - /** UpdateTaskRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** SessionEvent userId */ + userId?: (string|null); - /** UpdateTaskRequest task. */ - public task?: (google.cloud.dataplex.v1.ITask|null); + /** SessionEvent sessionId */ + sessionId?: (string|null); - /** UpdateTaskRequest validateOnly. */ - public validateOnly: boolean; + /** SessionEvent type */ + type?: (google.cloud.dataplex.v1.SessionEvent.EventType|keyof typeof google.cloud.dataplex.v1.SessionEvent.EventType|null); - /** - * Creates a new UpdateTaskRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateTaskRequest instance - */ - public static create(properties?: google.cloud.dataplex.v1.IUpdateTaskRequest): google.cloud.dataplex.v1.UpdateTaskRequest; + /** SessionEvent query */ + query?: (google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null); - /** - * Encodes the specified UpdateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. - * @param message UpdateTaskRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IUpdateTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** SessionEvent eventSucceeded */ + eventSucceeded?: (boolean|null); - /** - * Encodes the specified UpdateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. - * @param message UpdateTaskRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** SessionEvent fastStartupEnabled */ + fastStartupEnabled?: (boolean|null); - /** - * Decodes an UpdateTaskRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateTaskRequest - * @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.dataplex.v1.UpdateTaskRequest; + /** SessionEvent unassignedDuration */ + unassignedDuration?: (google.protobuf.IDuration|null); + } - /** - * Decodes an UpdateTaskRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateTaskRequest - * @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.dataplex.v1.UpdateTaskRequest; + /** Represents a SessionEvent. */ + class SessionEvent implements ISessionEvent { /** - * Verifies an UpdateTaskRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Constructs a new SessionEvent. + * @param [properties] Properties to set */ - public static verify(message: { [k: string]: any }): (string|null); + constructor(properties?: google.cloud.dataplex.v1.ISessionEvent); - /** - * Creates an UpdateTaskRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateTaskRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateTaskRequest; + /** SessionEvent message. */ + public message: string; - /** - * Creates a plain object from an UpdateTaskRequest message. Also converts values to other types if specified. - * @param message UpdateTaskRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.UpdateTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** SessionEvent userId. */ + public userId: string; - /** - * Converts this UpdateTaskRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** SessionEvent sessionId. */ + public sessionId: string; - /** - * Gets the default type url for UpdateTaskRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** SessionEvent type. */ + public type: (google.cloud.dataplex.v1.SessionEvent.EventType|keyof typeof google.cloud.dataplex.v1.SessionEvent.EventType); - /** Properties of a DeleteTaskRequest. */ - interface IDeleteTaskRequest { + /** SessionEvent query. */ + public query?: (google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null); - /** DeleteTaskRequest name */ - name?: (string|null); - } + /** SessionEvent eventSucceeded. */ + public eventSucceeded: boolean; - /** Represents a DeleteTaskRequest. */ - class DeleteTaskRequest implements IDeleteTaskRequest { + /** SessionEvent fastStartupEnabled. */ + public fastStartupEnabled: boolean; - /** - * Constructs a new DeleteTaskRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IDeleteTaskRequest); + /** SessionEvent unassignedDuration. */ + public unassignedDuration?: (google.protobuf.IDuration|null); - /** DeleteTaskRequest name. */ - public name: string; + /** SessionEvent detail. */ + public detail?: "query"; /** - * Creates a new DeleteTaskRequest instance using the specified properties. + * Creates a new SessionEvent instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteTaskRequest instance + * @returns SessionEvent instance */ - public static create(properties?: google.cloud.dataplex.v1.IDeleteTaskRequest): google.cloud.dataplex.v1.DeleteTaskRequest; + public static create(properties?: google.cloud.dataplex.v1.ISessionEvent): google.cloud.dataplex.v1.SessionEvent; /** - * Encodes the specified DeleteTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. - * @param message DeleteTaskRequest message or plain object to encode + * Encodes the specified SessionEvent message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. + * @param message SessionEvent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IDeleteTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.ISessionEvent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. - * @param message DeleteTaskRequest message or plain object to encode + * Encodes the specified SessionEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. + * @param message SessionEvent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.ISessionEvent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteTaskRequest message from the specified reader or buffer. + * Decodes a SessionEvent message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteTaskRequest + * @returns SessionEvent * @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.dataplex.v1.DeleteTaskRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.SessionEvent; /** - * Decodes a DeleteTaskRequest message from the specified reader or buffer, length delimited. + * Decodes a SessionEvent message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteTaskRequest + * @returns SessionEvent * @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.dataplex.v1.DeleteTaskRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.SessionEvent; /** - * Verifies a DeleteTaskRequest message. + * Verifies a SessionEvent 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 DeleteTaskRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SessionEvent message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteTaskRequest + * @returns SessionEvent */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteTaskRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.SessionEvent; /** - * Creates a plain object from a DeleteTaskRequest message. Also converts values to other types if specified. - * @param message DeleteTaskRequest + * Creates a plain object from a SessionEvent message. Also converts values to other types if specified. + * @param message SessionEvent * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.DeleteTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.SessionEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteTaskRequest to JSON. + * Converts this SessionEvent to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteTaskRequest + * Gets the default type url for SessionEvent * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListTasksRequest. */ - interface IListTasksRequest { + namespace SessionEvent { - /** ListTasksRequest parent */ - parent?: (string|null); + /** EventType enum. */ + enum EventType { + EVENT_TYPE_UNSPECIFIED = 0, + START = 1, + STOP = 2, + QUERY = 3, + CREATE = 4 + } - /** ListTasksRequest pageSize */ - pageSize?: (number|null); + /** Properties of a QueryDetail. */ + interface IQueryDetail { - /** ListTasksRequest pageToken */ - pageToken?: (string|null); + /** QueryDetail queryId */ + queryId?: (string|null); - /** ListTasksRequest filter */ - filter?: (string|null); + /** QueryDetail queryText */ + queryText?: (string|null); - /** ListTasksRequest orderBy */ - orderBy?: (string|null); + /** QueryDetail engine */ + engine?: (google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|keyof typeof google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|null); + + /** QueryDetail duration */ + duration?: (google.protobuf.IDuration|null); + + /** QueryDetail resultSizeBytes */ + resultSizeBytes?: (number|Long|string|null); + + /** QueryDetail dataProcessedBytes */ + dataProcessedBytes?: (number|Long|string|null); + } + + /** Represents a QueryDetail. */ + class QueryDetail implements IQueryDetail { + + /** + * Constructs a new QueryDetail. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.SessionEvent.IQueryDetail); + + /** QueryDetail queryId. */ + public queryId: string; + + /** QueryDetail queryText. */ + public queryText: string; + + /** QueryDetail engine. */ + public engine: (google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|keyof typeof google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine); + + /** QueryDetail duration. */ + public duration?: (google.protobuf.IDuration|null); + + /** QueryDetail resultSizeBytes. */ + public resultSizeBytes: (number|Long|string); + + /** QueryDetail dataProcessedBytes. */ + public dataProcessedBytes: (number|Long|string); + + /** + * Creates a new QueryDetail instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryDetail instance + */ + public static create(properties?: google.cloud.dataplex.v1.SessionEvent.IQueryDetail): google.cloud.dataplex.v1.SessionEvent.QueryDetail; + + /** + * Encodes the specified QueryDetail message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. + * @param message QueryDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.SessionEvent.IQueryDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryDetail message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. + * @param message QueryDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.SessionEvent.IQueryDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryDetail message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryDetail + * @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.dataplex.v1.SessionEvent.QueryDetail; + + /** + * Decodes a QueryDetail message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryDetail + * @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.dataplex.v1.SessionEvent.QueryDetail; + + /** + * Verifies a QueryDetail 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 QueryDetail message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryDetail + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.SessionEvent.QueryDetail; + + /** + * Creates a plain object from a QueryDetail message. Also converts values to other types if specified. + * @param message QueryDetail + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.SessionEvent.QueryDetail, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryDetail to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryDetail + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace QueryDetail { + + /** Engine enum. */ + enum Engine { + ENGINE_UNSPECIFIED = 0, + SPARK_SQL = 1, + BIGQUERY = 2 + } + } } - /** Represents a ListTasksRequest. */ - class ListTasksRequest implements IListTasksRequest { + /** Properties of a DataScanEvent. */ + interface IDataScanEvent { + + /** DataScanEvent dataSource */ + dataSource?: (string|null); + + /** DataScanEvent jobId */ + jobId?: (string|null); + + /** DataScanEvent startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** DataScanEvent endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** DataScanEvent type */ + type?: (google.cloud.dataplex.v1.DataScanEvent.ScanType|keyof typeof google.cloud.dataplex.v1.DataScanEvent.ScanType|null); + + /** DataScanEvent state */ + state?: (google.cloud.dataplex.v1.DataScanEvent.State|keyof typeof google.cloud.dataplex.v1.DataScanEvent.State|null); + + /** DataScanEvent message */ + message?: (string|null); + + /** DataScanEvent specVersion */ + specVersion?: (string|null); + + /** DataScanEvent trigger */ + trigger?: (google.cloud.dataplex.v1.DataScanEvent.Trigger|keyof typeof google.cloud.dataplex.v1.DataScanEvent.Trigger|null); + + /** DataScanEvent scope */ + scope?: (google.cloud.dataplex.v1.DataScanEvent.Scope|keyof typeof google.cloud.dataplex.v1.DataScanEvent.Scope|null); + + /** DataScanEvent dataProfile */ + dataProfile?: (google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult|null); + + /** DataScanEvent dataQuality */ + dataQuality?: (google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult|null); + } + + /** Represents a DataScanEvent. */ + class DataScanEvent implements IDataScanEvent { /** - * Constructs a new ListTasksRequest. + * Constructs a new DataScanEvent. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IListTasksRequest); + constructor(properties?: google.cloud.dataplex.v1.IDataScanEvent); - /** ListTasksRequest parent. */ - public parent: string; + /** DataScanEvent dataSource. */ + public dataSource: string; - /** ListTasksRequest pageSize. */ - public pageSize: number; + /** DataScanEvent jobId. */ + public jobId: string; + + /** DataScanEvent startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** DataScanEvent endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** DataScanEvent type. */ + public type: (google.cloud.dataplex.v1.DataScanEvent.ScanType|keyof typeof google.cloud.dataplex.v1.DataScanEvent.ScanType); + + /** DataScanEvent state. */ + public state: (google.cloud.dataplex.v1.DataScanEvent.State|keyof typeof google.cloud.dataplex.v1.DataScanEvent.State); + + /** DataScanEvent message. */ + public message: string; + + /** DataScanEvent specVersion. */ + public specVersion: string; + + /** DataScanEvent trigger. */ + public trigger: (google.cloud.dataplex.v1.DataScanEvent.Trigger|keyof typeof google.cloud.dataplex.v1.DataScanEvent.Trigger); - /** ListTasksRequest pageToken. */ - public pageToken: string; + /** DataScanEvent scope. */ + public scope: (google.cloud.dataplex.v1.DataScanEvent.Scope|keyof typeof google.cloud.dataplex.v1.DataScanEvent.Scope); - /** ListTasksRequest filter. */ - public filter: string; + /** DataScanEvent dataProfile. */ + public dataProfile?: (google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult|null); - /** ListTasksRequest orderBy. */ - public orderBy: string; + /** DataScanEvent dataQuality. */ + public dataQuality?: (google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult|null); + + /** DataScanEvent result. */ + public result?: ("dataProfile"|"dataQuality"); /** - * Creates a new ListTasksRequest instance using the specified properties. + * Creates a new DataScanEvent instance using the specified properties. * @param [properties] Properties to set - * @returns ListTasksRequest instance + * @returns DataScanEvent instance */ - public static create(properties?: google.cloud.dataplex.v1.IListTasksRequest): google.cloud.dataplex.v1.ListTasksRequest; + public static create(properties?: google.cloud.dataplex.v1.IDataScanEvent): google.cloud.dataplex.v1.DataScanEvent; /** - * Encodes the specified ListTasksRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. - * @param message ListTasksRequest message or plain object to encode + * Encodes the specified DataScanEvent message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.verify|verify} messages. + * @param message DataScanEvent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IListTasksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IDataScanEvent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListTasksRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. - * @param message ListTasksRequest message or plain object to encode + * Encodes the specified DataScanEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.verify|verify} messages. + * @param message DataScanEvent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListTasksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IDataScanEvent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListTasksRequest message from the specified reader or buffer. + * Decodes a DataScanEvent message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListTasksRequest + * @returns DataScanEvent * @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.dataplex.v1.ListTasksRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DataScanEvent; /** - * Decodes a ListTasksRequest message from the specified reader or buffer, length delimited. + * Decodes a DataScanEvent message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListTasksRequest + * @returns DataScanEvent * @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.dataplex.v1.ListTasksRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DataScanEvent; /** - * Verifies a ListTasksRequest message. + * Verifies a DataScanEvent 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 ListTasksRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DataScanEvent message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListTasksRequest + * @returns DataScanEvent */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListTasksRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScanEvent; /** - * Creates a plain object from a ListTasksRequest message. Also converts values to other types if specified. - * @param message ListTasksRequest + * Creates a plain object from a DataScanEvent message. Also converts values to other types if specified. + * @param message DataScanEvent * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.ListTasksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.DataScanEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListTasksRequest to JSON. + * Converts this DataScanEvent to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListTasksRequest + * Gets the default type url for DataScanEvent * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListTasksResponse. */ - interface IListTasksResponse { + namespace DataScanEvent { - /** ListTasksResponse tasks */ - tasks?: (google.cloud.dataplex.v1.ITask[]|null); + /** ScanType enum. */ + enum ScanType { + SCAN_TYPE_UNSPECIFIED = 0, + DATA_PROFILE = 1, + DATA_QUALITY = 2 + } - /** ListTasksResponse nextPageToken */ - nextPageToken?: (string|null); + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + STARTED = 1, + SUCCEEDED = 2, + FAILED = 3, + CANCELLED = 4 + } - /** ListTasksResponse unreachableLocations */ - unreachableLocations?: (string[]|null); - } + /** Trigger enum. */ + enum Trigger { + TRIGGER_UNSPECIFIED = 0, + ON_DEMAND = 1, + SCHEDULE = 2 + } - /** Represents a ListTasksResponse. */ - class ListTasksResponse implements IListTasksResponse { + /** Scope enum. */ + enum Scope { + SCOPE_UNSPECIFIED = 0, + FULL = 1, + INCREMENTAL = 2 + } - /** - * Constructs a new ListTasksResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.IListTasksResponse); + /** Properties of a DataProfileResult. */ + interface IDataProfileResult { + + /** DataProfileResult rowCount */ + rowCount?: (number|Long|string|null); + } + + /** Represents a DataProfileResult. */ + class DataProfileResult implements IDataProfileResult { + + /** + * Constructs a new DataProfileResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult); + + /** DataProfileResult rowCount. */ + public rowCount: (number|Long|string); + + /** + * Creates a new DataProfileResult instance using the specified properties. + * @param [properties] Properties to set + * @returns DataProfileResult instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult): google.cloud.dataplex.v1.DataScanEvent.DataProfileResult; + + /** + * Encodes the specified DataProfileResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.verify|verify} messages. + * @param message DataProfileResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataProfileResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.verify|verify} messages. + * @param message DataProfileResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataProfileResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataProfileResult + * @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.dataplex.v1.DataScanEvent.DataProfileResult; + + /** + * Decodes a DataProfileResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataProfileResult + * @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.dataplex.v1.DataScanEvent.DataProfileResult; + + /** + * Verifies a DataProfileResult 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 DataProfileResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataProfileResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScanEvent.DataProfileResult; + + /** + * Creates a plain object from a DataProfileResult message. Also converts values to other types if specified. + * @param message DataProfileResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataScanEvent.DataProfileResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataProfileResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataProfileResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataQualityResult. */ + interface IDataQualityResult { + + /** DataQualityResult rowCount */ + rowCount?: (number|Long|string|null); + + /** DataQualityResult passed */ + passed?: (boolean|null); + + /** DataQualityResult dimensionPassed */ + dimensionPassed?: ({ [k: string]: boolean }|null); + } + + /** Represents a DataQualityResult. */ + class DataQualityResult implements IDataQualityResult { + + /** + * Constructs a new DataQualityResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult); + + /** DataQualityResult rowCount. */ + public rowCount: (number|Long|string); + + /** DataQualityResult passed. */ + public passed: boolean; + + /** DataQualityResult dimensionPassed. */ + public dimensionPassed: { [k: string]: boolean }; + + /** + * Creates a new DataQualityResult instance using the specified properties. + * @param [properties] Properties to set + * @returns DataQualityResult instance + */ + public static create(properties?: google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult): google.cloud.dataplex.v1.DataScanEvent.DataQualityResult; + + /** + * Encodes the specified DataQualityResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.verify|verify} messages. + * @param message DataQualityResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataQualityResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.verify|verify} messages. + * @param message DataQualityResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult, writer?: $protobuf.Writer): $protobuf.Writer; - /** ListTasksResponse tasks. */ - public tasks: google.cloud.dataplex.v1.ITask[]; + /** + * Decodes a DataQualityResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataQualityResult + * @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.dataplex.v1.DataScanEvent.DataQualityResult; - /** ListTasksResponse nextPageToken. */ - public nextPageToken: string; + /** + * Decodes a DataQualityResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataQualityResult + * @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.dataplex.v1.DataScanEvent.DataQualityResult; - /** ListTasksResponse unreachableLocations. */ - public unreachableLocations: string[]; + /** + * Verifies a DataQualityResult 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 new ListTasksResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListTasksResponse instance - */ - public static create(properties?: google.cloud.dataplex.v1.IListTasksResponse): google.cloud.dataplex.v1.ListTasksResponse; + /** + * Creates a DataQualityResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataQualityResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DataScanEvent.DataQualityResult; - /** - * Encodes the specified ListTasksResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. - * @param message ListTasksResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.IListTasksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from a DataQualityResult message. Also converts values to other types if specified. + * @param message DataQualityResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.DataScanEvent.DataQualityResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified ListTasksResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. - * @param message ListTasksResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListTasksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this DataQualityResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Decodes a ListTasksResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListTasksResponse - * @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.dataplex.v1.ListTasksResponse; + /** + * Gets the default type url for DataQualityResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } - /** - * Decodes a ListTasksResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListTasksResponse - * @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.dataplex.v1.ListTasksResponse; + /** Represents a MetadataService */ + class MetadataService extends $protobuf.rpc.Service { /** - * Verifies a ListTasksResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Constructs a new MetadataService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - public static verify(message: { [k: string]: any }): (string|null); + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates a ListTasksResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListTasksResponse + * Creates new MetadataService 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 fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListTasksResponse; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): MetadataService; /** - * Creates a plain object from a ListTasksResponse message. Also converts values to other types if specified. - * @param message ListTasksResponse - * @param [options] Conversion options - * @returns Plain object + * Calls CreateEntity. + * @param request CreateEntityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Entity */ - public static toObject(message: google.cloud.dataplex.v1.ListTasksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public createEntity(request: google.cloud.dataplex.v1.ICreateEntityRequest, callback: google.cloud.dataplex.v1.MetadataService.CreateEntityCallback): void; /** - * Converts this ListTasksResponse to JSON. - * @returns JSON object + * Calls CreateEntity. + * @param request CreateEntityRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; + public createEntity(request: google.cloud.dataplex.v1.ICreateEntityRequest): Promise; /** - * Gets the default type url for ListTasksResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Calls UpdateEntity. + * @param request UpdateEntityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Entity */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetTaskRequest. */ - interface IGetTaskRequest { - - /** GetTaskRequest name */ - name?: (string|null); - } - - /** Represents a GetTaskRequest. */ - class GetTaskRequest implements IGetTaskRequest { + public updateEntity(request: google.cloud.dataplex.v1.IUpdateEntityRequest, callback: google.cloud.dataplex.v1.MetadataService.UpdateEntityCallback): void; /** - * Constructs a new GetTaskRequest. - * @param [properties] Properties to set + * Calls UpdateEntity. + * @param request UpdateEntityRequest message or plain object + * @returns Promise */ - constructor(properties?: google.cloud.dataplex.v1.IGetTaskRequest); - - /** GetTaskRequest name. */ - public name: string; + public updateEntity(request: google.cloud.dataplex.v1.IUpdateEntityRequest): Promise; /** - * Creates a new GetTaskRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetTaskRequest instance + * Calls DeleteEntity. + * @param request DeleteEntityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static create(properties?: google.cloud.dataplex.v1.IGetTaskRequest): google.cloud.dataplex.v1.GetTaskRequest; + public deleteEntity(request: google.cloud.dataplex.v1.IDeleteEntityRequest, callback: google.cloud.dataplex.v1.MetadataService.DeleteEntityCallback): void; /** - * Encodes the specified GetTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. - * @param message GetTaskRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls DeleteEntity. + * @param request DeleteEntityRequest message or plain object + * @returns Promise */ - public static encode(message: google.cloud.dataplex.v1.IGetTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public deleteEntity(request: google.cloud.dataplex.v1.IDeleteEntityRequest): Promise; /** - * Encodes the specified GetTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. - * @param message GetTaskRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetEntity. + * @param request GetEntityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Entity */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGetTaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public getEntity(request: google.cloud.dataplex.v1.IGetEntityRequest, callback: google.cloud.dataplex.v1.MetadataService.GetEntityCallback): void; /** - * Decodes a GetTaskRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetEntity. + * @param request GetEntityRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetTaskRequest; + public getEntity(request: google.cloud.dataplex.v1.IGetEntityRequest): Promise; /** - * Decodes a GetTaskRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListEntities. + * @param request ListEntitiesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListEntitiesResponse */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetTaskRequest; + public listEntities(request: google.cloud.dataplex.v1.IListEntitiesRequest, callback: google.cloud.dataplex.v1.MetadataService.ListEntitiesCallback): void; /** - * Verifies a GetTaskRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls ListEntities. + * @param request ListEntitiesRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public listEntities(request: google.cloud.dataplex.v1.IListEntitiesRequest): Promise; /** - * Creates a GetTaskRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetTaskRequest + * Calls CreatePartition. + * @param request CreatePartitionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Partition */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetTaskRequest; + public createPartition(request: google.cloud.dataplex.v1.ICreatePartitionRequest, callback: google.cloud.dataplex.v1.MetadataService.CreatePartitionCallback): void; /** - * Creates a plain object from a GetTaskRequest message. Also converts values to other types if specified. - * @param message GetTaskRequest - * @param [options] Conversion options - * @returns Plain object + * Calls CreatePartition. + * @param request CreatePartitionRequest message or plain object + * @returns Promise */ - public static toObject(message: google.cloud.dataplex.v1.GetTaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public createPartition(request: google.cloud.dataplex.v1.ICreatePartitionRequest): Promise; /** - * Converts this GetTaskRequest to JSON. - * @returns JSON object + * Calls DeletePartition. + * @param request DeletePartitionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public toJSON(): { [k: string]: any }; + public deletePartition(request: google.cloud.dataplex.v1.IDeletePartitionRequest, callback: google.cloud.dataplex.v1.MetadataService.DeletePartitionCallback): void; /** - * Gets the default type url for GetTaskRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Calls DeletePartition. + * @param request DeletePartitionRequest message or plain object + * @returns Promise */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetJobRequest. */ - interface IGetJobRequest { - - /** GetJobRequest name */ - name?: (string|null); - } + public deletePartition(request: google.cloud.dataplex.v1.IDeletePartitionRequest): Promise; - /** Represents a GetJobRequest. */ - class GetJobRequest implements IGetJobRequest { + /** + * Calls GetPartition. + * @param request GetPartitionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Partition + */ + public getPartition(request: google.cloud.dataplex.v1.IGetPartitionRequest, callback: google.cloud.dataplex.v1.MetadataService.GetPartitionCallback): void; /** - * Constructs a new GetJobRequest. - * @param [properties] Properties to set + * Calls GetPartition. + * @param request GetPartitionRequest message or plain object + * @returns Promise */ - constructor(properties?: google.cloud.dataplex.v1.IGetJobRequest); + public getPartition(request: google.cloud.dataplex.v1.IGetPartitionRequest): Promise; - /** GetJobRequest name. */ - public name: string; + /** + * Calls ListPartitions. + * @param request ListPartitionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPartitionsResponse + */ + public listPartitions(request: google.cloud.dataplex.v1.IListPartitionsRequest, callback: google.cloud.dataplex.v1.MetadataService.ListPartitionsCallback): void; /** - * Creates a new GetJobRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetJobRequest instance + * Calls ListPartitions. + * @param request ListPartitionsRequest message or plain object + * @returns Promise */ - public static create(properties?: google.cloud.dataplex.v1.IGetJobRequest): google.cloud.dataplex.v1.GetJobRequest; + public listPartitions(request: google.cloud.dataplex.v1.IListPartitionsRequest): Promise; + } + + namespace MetadataService { /** - * Encodes the specified GetJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. - * @param message GetJobRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|createEntity}. + * @param error Error, if any + * @param [response] Entity */ - public static encode(message: google.cloud.dataplex.v1.IGetJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + type CreateEntityCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Entity) => void; /** - * Encodes the specified GetJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. - * @param message GetJobRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|updateEntity}. + * @param error Error, if any + * @param [response] Entity */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGetJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + type UpdateEntityCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Entity) => void; /** - * Decodes a GetJobRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|deleteEntity}. + * @param error Error, if any + * @param [response] Empty */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetJobRequest; + type DeleteEntityCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Decodes a GetJobRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|getEntity}. + * @param error Error, if any + * @param [response] Entity */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetJobRequest; + type GetEntityCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Entity) => void; /** - * Verifies a GetJobRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|listEntities}. + * @param error Error, if any + * @param [response] ListEntitiesResponse */ - public static verify(message: { [k: string]: any }): (string|null); + type ListEntitiesCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListEntitiesResponse) => void; /** - * Creates a GetJobRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetJobRequest + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|createPartition}. + * @param error Error, if any + * @param [response] Partition */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetJobRequest; + type CreatePartitionCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Partition) => void; /** - * Creates a plain object from a GetJobRequest message. Also converts values to other types if specified. - * @param message GetJobRequest - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|deletePartition}. + * @param error Error, if any + * @param [response] Empty */ - public static toObject(message: google.cloud.dataplex.v1.GetJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type DeletePartitionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Converts this GetJobRequest to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|getPartition}. + * @param error Error, if any + * @param [response] Partition */ - public toJSON(): { [k: string]: any }; + type GetPartitionCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.Partition) => void; /** - * Gets the default type url for GetJobRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|listPartitions}. + * @param error Error, if any + * @param [response] ListPartitionsResponse */ - public static getTypeUrl(typeUrlPrefix?: string): string; + type ListPartitionsCallback = (error: (Error|null), response?: google.cloud.dataplex.v1.ListPartitionsResponse) => void; } - /** Properties of a ListJobsRequest. */ - interface IListJobsRequest { + /** Properties of a CreateEntityRequest. */ + interface ICreateEntityRequest { - /** ListJobsRequest parent */ + /** CreateEntityRequest parent */ parent?: (string|null); - /** ListJobsRequest pageSize */ - pageSize?: (number|null); + /** CreateEntityRequest entity */ + entity?: (google.cloud.dataplex.v1.IEntity|null); - /** ListJobsRequest pageToken */ - pageToken?: (string|null); + /** CreateEntityRequest validateOnly */ + validateOnly?: (boolean|null); } - /** Represents a ListJobsRequest. */ - class ListJobsRequest implements IListJobsRequest { + /** Represents a CreateEntityRequest. */ + class CreateEntityRequest implements ICreateEntityRequest { /** - * Constructs a new ListJobsRequest. + * Constructs a new CreateEntityRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IListJobsRequest); + constructor(properties?: google.cloud.dataplex.v1.ICreateEntityRequest); - /** ListJobsRequest parent. */ + /** CreateEntityRequest parent. */ public parent: string; - /** ListJobsRequest pageSize. */ - public pageSize: number; + /** CreateEntityRequest entity. */ + public entity?: (google.cloud.dataplex.v1.IEntity|null); - /** ListJobsRequest pageToken. */ - public pageToken: string; + /** CreateEntityRequest validateOnly. */ + public validateOnly: boolean; /** - * Creates a new ListJobsRequest instance using the specified properties. + * Creates a new CreateEntityRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListJobsRequest instance + * @returns CreateEntityRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IListJobsRequest): google.cloud.dataplex.v1.ListJobsRequest; + public static create(properties?: google.cloud.dataplex.v1.ICreateEntityRequest): google.cloud.dataplex.v1.CreateEntityRequest; /** - * Encodes the specified ListJobsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. - * @param message ListJobsRequest message or plain object to encode + * Encodes the specified CreateEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntityRequest.verify|verify} messages. + * @param message CreateEntityRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IListJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.ICreateEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListJobsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. - * @param message ListJobsRequest message or plain object to encode + * Encodes the specified CreateEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntityRequest.verify|verify} messages. + * @param message CreateEntityRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListJobsRequest message from the specified reader or buffer. + * Decodes a CreateEntityRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListJobsRequest + * @returns CreateEntityRequest * @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.dataplex.v1.ListJobsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreateEntityRequest; /** - * Decodes a ListJobsRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateEntityRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListJobsRequest + * @returns CreateEntityRequest * @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.dataplex.v1.ListJobsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreateEntityRequest; /** - * Verifies a ListJobsRequest message. + * Verifies a CreateEntityRequest 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 ListJobsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateEntityRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListJobsRequest + * @returns CreateEntityRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListJobsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateEntityRequest; /** - * Creates a plain object from a ListJobsRequest message. Also converts values to other types if specified. - * @param message ListJobsRequest + * Creates a plain object from a CreateEntityRequest message. Also converts values to other types if specified. + * @param message CreateEntityRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.ListJobsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.CreateEntityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListJobsRequest to JSON. + * Converts this CreateEntityRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListJobsRequest + * Gets the default type url for CreateEntityRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListJobsResponse. */ - interface IListJobsResponse { + /** Properties of an UpdateEntityRequest. */ + interface IUpdateEntityRequest { - /** ListJobsResponse jobs */ - jobs?: (google.cloud.dataplex.v1.IJob[]|null); + /** UpdateEntityRequest entity */ + entity?: (google.cloud.dataplex.v1.IEntity|null); - /** ListJobsResponse nextPageToken */ - nextPageToken?: (string|null); + /** UpdateEntityRequest validateOnly */ + validateOnly?: (boolean|null); } - /** Represents a ListJobsResponse. */ - class ListJobsResponse implements IListJobsResponse { + /** Represents an UpdateEntityRequest. */ + class UpdateEntityRequest implements IUpdateEntityRequest { /** - * Constructs a new ListJobsResponse. + * Constructs a new UpdateEntityRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IListJobsResponse); + constructor(properties?: google.cloud.dataplex.v1.IUpdateEntityRequest); - /** ListJobsResponse jobs. */ - public jobs: google.cloud.dataplex.v1.IJob[]; + /** UpdateEntityRequest entity. */ + public entity?: (google.cloud.dataplex.v1.IEntity|null); - /** ListJobsResponse nextPageToken. */ - public nextPageToken: string; + /** UpdateEntityRequest validateOnly. */ + public validateOnly: boolean; /** - * Creates a new ListJobsResponse instance using the specified properties. + * Creates a new UpdateEntityRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListJobsResponse instance + * @returns UpdateEntityRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IListJobsResponse): google.cloud.dataplex.v1.ListJobsResponse; + public static create(properties?: google.cloud.dataplex.v1.IUpdateEntityRequest): google.cloud.dataplex.v1.UpdateEntityRequest; /** - * Encodes the specified ListJobsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. - * @param message ListJobsResponse message or plain object to encode + * Encodes the specified UpdateEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntityRequest.verify|verify} messages. + * @param message UpdateEntityRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IListJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IUpdateEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListJobsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. - * @param message ListJobsResponse message or plain object to encode + * Encodes the specified UpdateEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntityRequest.verify|verify} messages. + * @param message UpdateEntityRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListJobsResponse message from the specified reader or buffer. + * Decodes an UpdateEntityRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListJobsResponse + * @returns UpdateEntityRequest * @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.dataplex.v1.ListJobsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.UpdateEntityRequest; /** - * Decodes a ListJobsResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateEntityRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListJobsResponse + * @returns UpdateEntityRequest * @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.dataplex.v1.ListJobsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.UpdateEntityRequest; /** - * Verifies a ListJobsResponse message. + * Verifies an UpdateEntityRequest 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 ListJobsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateEntityRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListJobsResponse + * @returns UpdateEntityRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListJobsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateEntityRequest; /** - * Creates a plain object from a ListJobsResponse message. Also converts values to other types if specified. - * @param message ListJobsResponse + * Creates a plain object from an UpdateEntityRequest message. Also converts values to other types if specified. + * @param message UpdateEntityRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.ListJobsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.UpdateEntityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListJobsResponse to JSON. + * Converts this UpdateEntityRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListJobsResponse + * Gets the default type url for UpdateEntityRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CancelJobRequest. */ - interface ICancelJobRequest { + /** Properties of a DeleteEntityRequest. */ + interface IDeleteEntityRequest { - /** CancelJobRequest name */ + /** DeleteEntityRequest name */ name?: (string|null); + + /** DeleteEntityRequest etag */ + etag?: (string|null); } - /** Represents a CancelJobRequest. */ - class CancelJobRequest implements ICancelJobRequest { + /** Represents a DeleteEntityRequest. */ + class DeleteEntityRequest implements IDeleteEntityRequest { /** - * Constructs a new CancelJobRequest. + * Constructs a new DeleteEntityRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.ICancelJobRequest); + constructor(properties?: google.cloud.dataplex.v1.IDeleteEntityRequest); - /** CancelJobRequest name. */ + /** DeleteEntityRequest name. */ public name: string; + /** DeleteEntityRequest etag. */ + public etag: string; + /** - * Creates a new CancelJobRequest instance using the specified properties. + * Creates a new DeleteEntityRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CancelJobRequest instance + * @returns DeleteEntityRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.ICancelJobRequest): google.cloud.dataplex.v1.CancelJobRequest; + public static create(properties?: google.cloud.dataplex.v1.IDeleteEntityRequest): google.cloud.dataplex.v1.DeleteEntityRequest; /** - * Encodes the specified CancelJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. - * @param message CancelJobRequest message or plain object to encode + * Encodes the specified DeleteEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEntityRequest.verify|verify} messages. + * @param message DeleteEntityRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.ICancelJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IDeleteEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CancelJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. - * @param message CancelJobRequest message or plain object to encode + * Encodes the specified DeleteEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEntityRequest.verify|verify} messages. + * @param message DeleteEntityRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ICancelJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CancelJobRequest message from the specified reader or buffer. + * Decodes a DeleteEntityRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CancelJobRequest + * @returns DeleteEntityRequest * @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.dataplex.v1.CancelJobRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeleteEntityRequest; /** - * Decodes a CancelJobRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteEntityRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CancelJobRequest + * @returns DeleteEntityRequest * @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.dataplex.v1.CancelJobRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeleteEntityRequest; /** - * Verifies a CancelJobRequest message. + * Verifies a DeleteEntityRequest 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 CancelJobRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteEntityRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CancelJobRequest + * @returns DeleteEntityRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CancelJobRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteEntityRequest; /** - * Creates a plain object from a CancelJobRequest message. Also converts values to other types if specified. - * @param message CancelJobRequest + * Creates a plain object from a DeleteEntityRequest message. Also converts values to other types if specified. + * @param message DeleteEntityRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.CancelJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.DeleteEntityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CancelJobRequest to JSON. + * Converts this DeleteEntityRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CancelJobRequest + * Gets the default type url for DeleteEntityRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateEnvironmentRequest. */ - interface ICreateEnvironmentRequest { + /** Properties of a ListEntitiesRequest. */ + interface IListEntitiesRequest { - /** CreateEnvironmentRequest parent */ + /** ListEntitiesRequest parent */ parent?: (string|null); - /** CreateEnvironmentRequest environmentId */ - environmentId?: (string|null); + /** ListEntitiesRequest view */ + view?: (google.cloud.dataplex.v1.ListEntitiesRequest.EntityView|keyof typeof google.cloud.dataplex.v1.ListEntitiesRequest.EntityView|null); - /** CreateEnvironmentRequest environment */ - environment?: (google.cloud.dataplex.v1.IEnvironment|null); + /** ListEntitiesRequest pageSize */ + pageSize?: (number|null); - /** CreateEnvironmentRequest validateOnly */ - validateOnly?: (boolean|null); + /** ListEntitiesRequest pageToken */ + pageToken?: (string|null); + + /** ListEntitiesRequest filter */ + filter?: (string|null); } - /** Represents a CreateEnvironmentRequest. */ - class CreateEnvironmentRequest implements ICreateEnvironmentRequest { + /** Represents a ListEntitiesRequest. */ + class ListEntitiesRequest implements IListEntitiesRequest { /** - * Constructs a new CreateEnvironmentRequest. + * Constructs a new ListEntitiesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.ICreateEnvironmentRequest); + constructor(properties?: google.cloud.dataplex.v1.IListEntitiesRequest); - /** CreateEnvironmentRequest parent. */ + /** ListEntitiesRequest parent. */ public parent: string; - /** CreateEnvironmentRequest environmentId. */ - public environmentId: string; + /** ListEntitiesRequest view. */ + public view: (google.cloud.dataplex.v1.ListEntitiesRequest.EntityView|keyof typeof google.cloud.dataplex.v1.ListEntitiesRequest.EntityView); - /** CreateEnvironmentRequest environment. */ - public environment?: (google.cloud.dataplex.v1.IEnvironment|null); + /** ListEntitiesRequest pageSize. */ + public pageSize: number; - /** CreateEnvironmentRequest validateOnly. */ - public validateOnly: boolean; + /** ListEntitiesRequest pageToken. */ + public pageToken: string; + + /** ListEntitiesRequest filter. */ + public filter: string; /** - * Creates a new CreateEnvironmentRequest instance using the specified properties. + * Creates a new ListEntitiesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateEnvironmentRequest instance + * @returns ListEntitiesRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.ICreateEnvironmentRequest): google.cloud.dataplex.v1.CreateEnvironmentRequest; + public static create(properties?: google.cloud.dataplex.v1.IListEntitiesRequest): google.cloud.dataplex.v1.ListEntitiesRequest; /** - * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateEnvironmentRequest.verify|verify} messages. - * @param message CreateEnvironmentRequest message or plain object to encode + * Encodes the specified ListEntitiesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesRequest.verify|verify} messages. + * @param message ListEntitiesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.ICreateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IListEntitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateEnvironmentRequest.verify|verify} messages. - * @param message CreateEnvironmentRequest message or plain object to encode + * Encodes the specified ListEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesRequest.verify|verify} messages. + * @param message ListEntitiesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ICreateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListEntitiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateEnvironmentRequest message from the specified reader or buffer. + * Decodes a ListEntitiesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateEnvironmentRequest + * @returns ListEntitiesRequest * @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.dataplex.v1.CreateEnvironmentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListEntitiesRequest; /** - * Decodes a CreateEnvironmentRequest message from the specified reader or buffer, length delimited. + * Decodes a ListEntitiesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateEnvironmentRequest + * @returns ListEntitiesRequest * @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.dataplex.v1.CreateEnvironmentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListEntitiesRequest; /** - * Verifies a CreateEnvironmentRequest message. + * Verifies a ListEntitiesRequest 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 CreateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListEntitiesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateEnvironmentRequest + * @returns ListEntitiesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreateEnvironmentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListEntitiesRequest; /** - * Creates a plain object from a CreateEnvironmentRequest message. Also converts values to other types if specified. - * @param message CreateEnvironmentRequest + * Creates a plain object from a ListEntitiesRequest message. Also converts values to other types if specified. + * @param message ListEntitiesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.CreateEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.ListEntitiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateEnvironmentRequest to JSON. + * Converts this ListEntitiesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateEnvironmentRequest + * Gets the default type url for ListEntitiesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateEnvironmentRequest. */ - interface IUpdateEnvironmentRequest { + namespace ListEntitiesRequest { - /** UpdateEnvironmentRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** EntityView enum. */ + enum EntityView { + ENTITY_VIEW_UNSPECIFIED = 0, + TABLES = 1, + FILESETS = 2 + } + } - /** UpdateEnvironmentRequest environment */ - environment?: (google.cloud.dataplex.v1.IEnvironment|null); + /** Properties of a ListEntitiesResponse. */ + interface IListEntitiesResponse { - /** UpdateEnvironmentRequest validateOnly */ - validateOnly?: (boolean|null); + /** ListEntitiesResponse entities */ + entities?: (google.cloud.dataplex.v1.IEntity[]|null); + + /** ListEntitiesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents an UpdateEnvironmentRequest. */ - class UpdateEnvironmentRequest implements IUpdateEnvironmentRequest { + /** Represents a ListEntitiesResponse. */ + class ListEntitiesResponse implements IListEntitiesResponse { /** - * Constructs a new UpdateEnvironmentRequest. + * Constructs a new ListEntitiesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IUpdateEnvironmentRequest); - - /** UpdateEnvironmentRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + constructor(properties?: google.cloud.dataplex.v1.IListEntitiesResponse); - /** UpdateEnvironmentRequest environment. */ - public environment?: (google.cloud.dataplex.v1.IEnvironment|null); + /** ListEntitiesResponse entities. */ + public entities: google.cloud.dataplex.v1.IEntity[]; - /** UpdateEnvironmentRequest validateOnly. */ - public validateOnly: boolean; + /** ListEntitiesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new UpdateEnvironmentRequest instance using the specified properties. + * Creates a new ListEntitiesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateEnvironmentRequest instance + * @returns ListEntitiesResponse instance */ - public static create(properties?: google.cloud.dataplex.v1.IUpdateEnvironmentRequest): google.cloud.dataplex.v1.UpdateEnvironmentRequest; + public static create(properties?: google.cloud.dataplex.v1.IListEntitiesResponse): google.cloud.dataplex.v1.ListEntitiesResponse; /** - * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEnvironmentRequest.verify|verify} messages. - * @param message UpdateEnvironmentRequest message or plain object to encode + * Encodes the specified ListEntitiesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesResponse.verify|verify} messages. + * @param message ListEntitiesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IUpdateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IListEntitiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEnvironmentRequest.verify|verify} messages. - * @param message UpdateEnvironmentRequest message or plain object to encode + * Encodes the specified ListEntitiesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesResponse.verify|verify} messages. + * @param message ListEntitiesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IUpdateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListEntitiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer. + * Decodes a ListEntitiesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateEnvironmentRequest + * @returns ListEntitiesResponse * @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.dataplex.v1.UpdateEnvironmentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListEntitiesResponse; /** - * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer, length delimited. + * Decodes a ListEntitiesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateEnvironmentRequest + * @returns ListEntitiesResponse * @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.dataplex.v1.UpdateEnvironmentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListEntitiesResponse; /** - * Verifies an UpdateEnvironmentRequest message. + * Verifies a ListEntitiesResponse 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 UpdateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListEntitiesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateEnvironmentRequest + * @returns ListEntitiesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.UpdateEnvironmentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListEntitiesResponse; /** - * Creates a plain object from an UpdateEnvironmentRequest message. Also converts values to other types if specified. - * @param message UpdateEnvironmentRequest + * Creates a plain object from a ListEntitiesResponse message. Also converts values to other types if specified. + * @param message ListEntitiesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.UpdateEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.ListEntitiesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateEnvironmentRequest to JSON. + * Converts this ListEntitiesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateEnvironmentRequest + * Gets the default type url for ListEntitiesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteEnvironmentRequest. */ - interface IDeleteEnvironmentRequest { + /** Properties of a GetEntityRequest. */ + interface IGetEntityRequest { - /** DeleteEnvironmentRequest name */ + /** GetEntityRequest name */ name?: (string|null); + + /** GetEntityRequest view */ + view?: (google.cloud.dataplex.v1.GetEntityRequest.EntityView|keyof typeof google.cloud.dataplex.v1.GetEntityRequest.EntityView|null); } - /** Represents a DeleteEnvironmentRequest. */ - class DeleteEnvironmentRequest implements IDeleteEnvironmentRequest { + /** Represents a GetEntityRequest. */ + class GetEntityRequest implements IGetEntityRequest { /** - * Constructs a new DeleteEnvironmentRequest. + * Constructs a new GetEntityRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IDeleteEnvironmentRequest); + constructor(properties?: google.cloud.dataplex.v1.IGetEntityRequest); - /** DeleteEnvironmentRequest name. */ + /** GetEntityRequest name. */ public name: string; + /** GetEntityRequest view. */ + public view: (google.cloud.dataplex.v1.GetEntityRequest.EntityView|keyof typeof google.cloud.dataplex.v1.GetEntityRequest.EntityView); + /** - * Creates a new DeleteEnvironmentRequest instance using the specified properties. + * Creates a new GetEntityRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteEnvironmentRequest instance + * @returns GetEntityRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IDeleteEnvironmentRequest): google.cloud.dataplex.v1.DeleteEnvironmentRequest; + public static create(properties?: google.cloud.dataplex.v1.IGetEntityRequest): google.cloud.dataplex.v1.GetEntityRequest; /** - * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEnvironmentRequest.verify|verify} messages. - * @param message DeleteEnvironmentRequest message or plain object to encode + * Encodes the specified GetEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEntityRequest.verify|verify} messages. + * @param message GetEntityRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IDeleteEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IGetEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEnvironmentRequest.verify|verify} messages. - * @param message DeleteEnvironmentRequest message or plain object to encode + * Encodes the specified GetEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEntityRequest.verify|verify} messages. + * @param message GetEntityRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IDeleteEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetEntityRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer. + * Decodes a GetEntityRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteEnvironmentRequest + * @returns GetEntityRequest * @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.dataplex.v1.DeleteEnvironmentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetEntityRequest; /** - * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer, length delimited. + * Decodes a GetEntityRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteEnvironmentRequest + * @returns GetEntityRequest * @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.dataplex.v1.DeleteEnvironmentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetEntityRequest; /** - * Verifies a DeleteEnvironmentRequest message. + * Verifies a GetEntityRequest 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 DeleteEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetEntityRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteEnvironmentRequest + * @returns GetEntityRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeleteEnvironmentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetEntityRequest; /** - * Creates a plain object from a DeleteEnvironmentRequest message. Also converts values to other types if specified. - * @param message DeleteEnvironmentRequest + * Creates a plain object from a GetEntityRequest message. Also converts values to other types if specified. + * @param message GetEntityRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.DeleteEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.GetEntityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteEnvironmentRequest to JSON. + * Converts this GetEntityRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteEnvironmentRequest + * Gets the default type url for GetEntityRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListEnvironmentsRequest. */ - interface IListEnvironmentsRequest { + namespace GetEntityRequest { - /** ListEnvironmentsRequest parent */ + /** EntityView enum. */ + enum EntityView { + ENTITY_VIEW_UNSPECIFIED = 0, + BASIC = 1, + SCHEMA = 2, + FULL = 4 + } + } + + /** Properties of a ListPartitionsRequest. */ + interface IListPartitionsRequest { + + /** ListPartitionsRequest parent */ parent?: (string|null); - /** ListEnvironmentsRequest pageSize */ + /** ListPartitionsRequest pageSize */ pageSize?: (number|null); - /** ListEnvironmentsRequest pageToken */ + /** ListPartitionsRequest pageToken */ pageToken?: (string|null); - /** ListEnvironmentsRequest filter */ + /** ListPartitionsRequest filter */ filter?: (string|null); - - /** ListEnvironmentsRequest orderBy */ - orderBy?: (string|null); } - /** Represents a ListEnvironmentsRequest. */ - class ListEnvironmentsRequest implements IListEnvironmentsRequest { + /** Represents a ListPartitionsRequest. */ + class ListPartitionsRequest implements IListPartitionsRequest { /** - * Constructs a new ListEnvironmentsRequest. + * Constructs a new ListPartitionsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IListEnvironmentsRequest); + constructor(properties?: google.cloud.dataplex.v1.IListPartitionsRequest); - /** ListEnvironmentsRequest parent. */ + /** ListPartitionsRequest parent. */ public parent: string; - /** ListEnvironmentsRequest pageSize. */ + /** ListPartitionsRequest pageSize. */ public pageSize: number; - /** ListEnvironmentsRequest pageToken. */ + /** ListPartitionsRequest pageToken. */ public pageToken: string; - /** ListEnvironmentsRequest filter. */ + /** ListPartitionsRequest filter. */ public filter: string; - /** ListEnvironmentsRequest orderBy. */ - public orderBy: string; - /** - * Creates a new ListEnvironmentsRequest instance using the specified properties. + * Creates a new ListPartitionsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListEnvironmentsRequest instance + * @returns ListPartitionsRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IListEnvironmentsRequest): google.cloud.dataplex.v1.ListEnvironmentsRequest; + public static create(properties?: google.cloud.dataplex.v1.IListPartitionsRequest): google.cloud.dataplex.v1.ListPartitionsRequest; /** - * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsRequest.verify|verify} messages. - * @param message ListEnvironmentsRequest message or plain object to encode + * Encodes the specified ListPartitionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsRequest.verify|verify} messages. + * @param message ListPartitionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IListEnvironmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IListPartitionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsRequest.verify|verify} messages. - * @param message ListEnvironmentsRequest message or plain object to encode + * Encodes the specified ListPartitionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsRequest.verify|verify} messages. + * @param message ListPartitionsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListEnvironmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListPartitionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListEnvironmentsRequest message from the specified reader or buffer. + * Decodes a ListPartitionsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListEnvironmentsRequest + * @returns ListPartitionsRequest * @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.dataplex.v1.ListEnvironmentsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListPartitionsRequest; /** - * Decodes a ListEnvironmentsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListPartitionsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListEnvironmentsRequest + * @returns ListPartitionsRequest * @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.dataplex.v1.ListEnvironmentsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListPartitionsRequest; /** - * Verifies a ListEnvironmentsRequest message. + * Verifies a ListPartitionsRequest 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 ListEnvironmentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListPartitionsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListEnvironmentsRequest + * @returns ListPartitionsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListEnvironmentsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListPartitionsRequest; /** - * Creates a plain object from a ListEnvironmentsRequest message. Also converts values to other types if specified. - * @param message ListEnvironmentsRequest + * Creates a plain object from a ListPartitionsRequest message. Also converts values to other types if specified. + * @param message ListPartitionsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.ListEnvironmentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.ListPartitionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListEnvironmentsRequest to JSON. + * Converts this ListPartitionsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListEnvironmentsRequest + * Gets the default type url for ListPartitionsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListEnvironmentsResponse. */ - interface IListEnvironmentsResponse { + /** Properties of a CreatePartitionRequest. */ + interface ICreatePartitionRequest { - /** ListEnvironmentsResponse environments */ - environments?: (google.cloud.dataplex.v1.IEnvironment[]|null); + /** CreatePartitionRequest parent */ + parent?: (string|null); - /** ListEnvironmentsResponse nextPageToken */ - nextPageToken?: (string|null); + /** CreatePartitionRequest partition */ + partition?: (google.cloud.dataplex.v1.IPartition|null); + + /** CreatePartitionRequest validateOnly */ + validateOnly?: (boolean|null); } - /** Represents a ListEnvironmentsResponse. */ - class ListEnvironmentsResponse implements IListEnvironmentsResponse { + /** Represents a CreatePartitionRequest. */ + class CreatePartitionRequest implements ICreatePartitionRequest { /** - * Constructs a new ListEnvironmentsResponse. + * Constructs a new CreatePartitionRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IListEnvironmentsResponse); + constructor(properties?: google.cloud.dataplex.v1.ICreatePartitionRequest); - /** ListEnvironmentsResponse environments. */ - public environments: google.cloud.dataplex.v1.IEnvironment[]; + /** CreatePartitionRequest parent. */ + public parent: string; - /** ListEnvironmentsResponse nextPageToken. */ - public nextPageToken: string; + /** CreatePartitionRequest partition. */ + public partition?: (google.cloud.dataplex.v1.IPartition|null); + + /** CreatePartitionRequest validateOnly. */ + public validateOnly: boolean; /** - * Creates a new ListEnvironmentsResponse instance using the specified properties. + * Creates a new CreatePartitionRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListEnvironmentsResponse instance + * @returns CreatePartitionRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IListEnvironmentsResponse): google.cloud.dataplex.v1.ListEnvironmentsResponse; + public static create(properties?: google.cloud.dataplex.v1.ICreatePartitionRequest): google.cloud.dataplex.v1.CreatePartitionRequest; /** - * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsResponse.verify|verify} messages. - * @param message ListEnvironmentsResponse message or plain object to encode + * Encodes the specified CreatePartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreatePartitionRequest.verify|verify} messages. + * @param message CreatePartitionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IListEnvironmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.ICreatePartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsResponse.verify|verify} messages. - * @param message ListEnvironmentsResponse message or plain object to encode + * Encodes the specified CreatePartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreatePartitionRequest.verify|verify} messages. + * @param message CreatePartitionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListEnvironmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.ICreatePartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListEnvironmentsResponse message from the specified reader or buffer. + * Decodes a CreatePartitionRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListEnvironmentsResponse + * @returns CreatePartitionRequest * @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.dataplex.v1.ListEnvironmentsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.CreatePartitionRequest; /** - * Decodes a ListEnvironmentsResponse message from the specified reader or buffer, length delimited. + * Decodes a CreatePartitionRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListEnvironmentsResponse + * @returns CreatePartitionRequest * @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.dataplex.v1.ListEnvironmentsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.CreatePartitionRequest; /** - * Verifies a ListEnvironmentsResponse message. + * Verifies a CreatePartitionRequest 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 ListEnvironmentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreatePartitionRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListEnvironmentsResponse + * @returns CreatePartitionRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListEnvironmentsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.CreatePartitionRequest; /** - * Creates a plain object from a ListEnvironmentsResponse message. Also converts values to other types if specified. - * @param message ListEnvironmentsResponse + * Creates a plain object from a CreatePartitionRequest message. Also converts values to other types if specified. + * @param message CreatePartitionRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.ListEnvironmentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.CreatePartitionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListEnvironmentsResponse to JSON. + * Converts this CreatePartitionRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListEnvironmentsResponse + * Gets the default type url for CreatePartitionRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetEnvironmentRequest. */ - interface IGetEnvironmentRequest { + /** Properties of a DeletePartitionRequest. */ + interface IDeletePartitionRequest { - /** GetEnvironmentRequest name */ + /** DeletePartitionRequest name */ name?: (string|null); + + /** DeletePartitionRequest etag */ + etag?: (string|null); } - /** Represents a GetEnvironmentRequest. */ - class GetEnvironmentRequest implements IGetEnvironmentRequest { + /** Represents a DeletePartitionRequest. */ + class DeletePartitionRequest implements IDeletePartitionRequest { /** - * Constructs a new GetEnvironmentRequest. + * Constructs a new DeletePartitionRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IGetEnvironmentRequest); + constructor(properties?: google.cloud.dataplex.v1.IDeletePartitionRequest); - /** GetEnvironmentRequest name. */ + /** DeletePartitionRequest name. */ public name: string; + /** DeletePartitionRequest etag. */ + public etag: string; + /** - * Creates a new GetEnvironmentRequest instance using the specified properties. + * Creates a new DeletePartitionRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetEnvironmentRequest instance + * @returns DeletePartitionRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IGetEnvironmentRequest): google.cloud.dataplex.v1.GetEnvironmentRequest; + public static create(properties?: google.cloud.dataplex.v1.IDeletePartitionRequest): google.cloud.dataplex.v1.DeletePartitionRequest; /** - * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEnvironmentRequest.verify|verify} messages. - * @param message GetEnvironmentRequest message or plain object to encode + * Encodes the specified DeletePartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeletePartitionRequest.verify|verify} messages. + * @param message DeletePartitionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IGetEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IDeletePartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEnvironmentRequest.verify|verify} messages. - * @param message GetEnvironmentRequest message or plain object to encode + * Encodes the specified DeletePartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeletePartitionRequest.verify|verify} messages. + * @param message DeletePartitionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IGetEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IDeletePartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetEnvironmentRequest message from the specified reader or buffer. + * Decodes a DeletePartitionRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetEnvironmentRequest + * @returns DeletePartitionRequest * @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.dataplex.v1.GetEnvironmentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.DeletePartitionRequest; /** - * Decodes a GetEnvironmentRequest message from the specified reader or buffer, length delimited. + * Decodes a DeletePartitionRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetEnvironmentRequest + * @returns DeletePartitionRequest * @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.dataplex.v1.GetEnvironmentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.DeletePartitionRequest; /** - * Verifies a GetEnvironmentRequest message. + * Verifies a DeletePartitionRequest 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 GetEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeletePartitionRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetEnvironmentRequest + * @returns DeletePartitionRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetEnvironmentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.DeletePartitionRequest; /** - * Creates a plain object from a GetEnvironmentRequest message. Also converts values to other types if specified. - * @param message GetEnvironmentRequest + * Creates a plain object from a DeletePartitionRequest message. Also converts values to other types if specified. + * @param message DeletePartitionRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.GetEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.DeletePartitionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetEnvironmentRequest to JSON. + * Converts this DeletePartitionRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetEnvironmentRequest + * Gets the default type url for DeletePartitionRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListSessionsRequest. */ - interface IListSessionsRequest { - - /** ListSessionsRequest parent */ - parent?: (string|null); - - /** ListSessionsRequest pageSize */ - pageSize?: (number|null); + /** Properties of a ListPartitionsResponse. */ + interface IListPartitionsResponse { - /** ListSessionsRequest pageToken */ - pageToken?: (string|null); + /** ListPartitionsResponse partitions */ + partitions?: (google.cloud.dataplex.v1.IPartition[]|null); - /** ListSessionsRequest filter */ - filter?: (string|null); + /** ListPartitionsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a ListSessionsRequest. */ - class ListSessionsRequest implements IListSessionsRequest { + /** Represents a ListPartitionsResponse. */ + class ListPartitionsResponse implements IListPartitionsResponse { /** - * Constructs a new ListSessionsRequest. + * Constructs a new ListPartitionsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IListSessionsRequest); - - /** ListSessionsRequest parent. */ - public parent: string; - - /** ListSessionsRequest pageSize. */ - public pageSize: number; + constructor(properties?: google.cloud.dataplex.v1.IListPartitionsResponse); - /** ListSessionsRequest pageToken. */ - public pageToken: string; + /** ListPartitionsResponse partitions. */ + public partitions: google.cloud.dataplex.v1.IPartition[]; - /** ListSessionsRequest filter. */ - public filter: string; + /** ListPartitionsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new ListSessionsRequest instance using the specified properties. + * Creates a new ListPartitionsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListSessionsRequest instance + * @returns ListPartitionsResponse instance */ - public static create(properties?: google.cloud.dataplex.v1.IListSessionsRequest): google.cloud.dataplex.v1.ListSessionsRequest; + public static create(properties?: google.cloud.dataplex.v1.IListPartitionsResponse): google.cloud.dataplex.v1.ListPartitionsResponse; /** - * Encodes the specified ListSessionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsRequest.verify|verify} messages. - * @param message ListSessionsRequest message or plain object to encode + * Encodes the specified ListPartitionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsResponse.verify|verify} messages. + * @param message ListPartitionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IListSessionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IListPartitionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListSessionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsRequest.verify|verify} messages. - * @param message ListSessionsRequest message or plain object to encode + * Encodes the specified ListPartitionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsResponse.verify|verify} messages. + * @param message ListPartitionsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListSessionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IListPartitionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListSessionsRequest message from the specified reader or buffer. + * Decodes a ListPartitionsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListSessionsRequest + * @returns ListPartitionsResponse * @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.dataplex.v1.ListSessionsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.ListPartitionsResponse; /** - * Decodes a ListSessionsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListPartitionsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListSessionsRequest + * @returns ListPartitionsResponse * @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.dataplex.v1.ListSessionsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.ListPartitionsResponse; /** - * Verifies a ListSessionsRequest message. + * Verifies a ListPartitionsResponse 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 ListSessionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListPartitionsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListSessionsRequest + * @returns ListPartitionsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListSessionsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListPartitionsResponse; /** - * Creates a plain object from a ListSessionsRequest message. Also converts values to other types if specified. - * @param message ListSessionsRequest + * Creates a plain object from a ListPartitionsResponse message. Also converts values to other types if specified. + * @param message ListPartitionsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.ListSessionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.ListPartitionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListSessionsRequest to JSON. + * Converts this ListPartitionsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListSessionsRequest + * Gets the default type url for ListPartitionsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListSessionsResponse. */ - interface IListSessionsResponse { - - /** ListSessionsResponse sessions */ - sessions?: (google.cloud.dataplex.v1.ISession[]|null); + /** Properties of a GetPartitionRequest. */ + interface IGetPartitionRequest { - /** ListSessionsResponse nextPageToken */ - nextPageToken?: (string|null); + /** GetPartitionRequest name */ + name?: (string|null); } - /** Represents a ListSessionsResponse. */ - class ListSessionsResponse implements IListSessionsResponse { + /** Represents a GetPartitionRequest. */ + class GetPartitionRequest implements IGetPartitionRequest { /** - * Constructs a new ListSessionsResponse. + * Constructs a new GetPartitionRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IListSessionsResponse); - - /** ListSessionsResponse sessions. */ - public sessions: google.cloud.dataplex.v1.ISession[]; + constructor(properties?: google.cloud.dataplex.v1.IGetPartitionRequest); - /** ListSessionsResponse nextPageToken. */ - public nextPageToken: string; + /** GetPartitionRequest name. */ + public name: string; /** - * Creates a new ListSessionsResponse instance using the specified properties. + * Creates a new GetPartitionRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListSessionsResponse instance + * @returns GetPartitionRequest instance */ - public static create(properties?: google.cloud.dataplex.v1.IListSessionsResponse): google.cloud.dataplex.v1.ListSessionsResponse; + public static create(properties?: google.cloud.dataplex.v1.IGetPartitionRequest): google.cloud.dataplex.v1.GetPartitionRequest; /** - * Encodes the specified ListSessionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsResponse.verify|verify} messages. - * @param message ListSessionsResponse message or plain object to encode + * Encodes the specified GetPartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetPartitionRequest.verify|verify} messages. + * @param message GetPartitionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IListSessionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IGetPartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListSessionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsResponse.verify|verify} messages. - * @param message ListSessionsResponse message or plain object to encode + * Encodes the specified GetPartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetPartitionRequest.verify|verify} messages. + * @param message GetPartitionRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IListSessionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IGetPartitionRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListSessionsResponse message from the specified reader or buffer. + * Decodes a GetPartitionRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListSessionsResponse + * @returns GetPartitionRequest * @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.dataplex.v1.ListSessionsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.GetPartitionRequest; /** - * Decodes a ListSessionsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetPartitionRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListSessionsResponse + * @returns GetPartitionRequest * @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.dataplex.v1.ListSessionsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.GetPartitionRequest; /** - * Verifies a ListSessionsResponse message. + * Verifies a GetPartitionRequest 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 ListSessionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetPartitionRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListSessionsResponse + * @returns GetPartitionRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.ListSessionsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.GetPartitionRequest; /** - * Creates a plain object from a ListSessionsResponse message. Also converts values to other types if specified. - * @param message ListSessionsResponse + * Creates a plain object from a GetPartitionRequest message. Also converts values to other types if specified. + * @param message GetPartitionRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.ListSessionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.GetPartitionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListSessionsResponse to JSON. + * Converts this GetPartitionRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListSessionsResponse + * Gets the default type url for GetPartitionRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Task. */ - interface ITask { + /** Properties of an Entity. */ + interface IEntity { - /** Task name */ + /** Entity name */ name?: (string|null); - /** Task uid */ - uid?: (string|null); + /** Entity displayName */ + displayName?: (string|null); - /** Task createTime */ + /** Entity description */ + description?: (string|null); + + /** Entity createTime */ createTime?: (google.protobuf.ITimestamp|null); - /** Task updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** Entity updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Entity id */ + id?: (string|null); + + /** Entity etag */ + etag?: (string|null); + + /** Entity type */ + type?: (google.cloud.dataplex.v1.Entity.Type|keyof typeof google.cloud.dataplex.v1.Entity.Type|null); + + /** Entity asset */ + asset?: (string|null); - /** Task description */ - description?: (string|null); + /** Entity dataPath */ + dataPath?: (string|null); - /** Task displayName */ - displayName?: (string|null); + /** Entity dataPathPattern */ + dataPathPattern?: (string|null); - /** Task state */ - state?: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State|null); + /** Entity catalogEntry */ + catalogEntry?: (string|null); - /** Task labels */ - labels?: ({ [k: string]: string }|null); + /** Entity system */ + system?: (google.cloud.dataplex.v1.StorageSystem|keyof typeof google.cloud.dataplex.v1.StorageSystem|null); - /** Task triggerSpec */ - triggerSpec?: (google.cloud.dataplex.v1.Task.ITriggerSpec|null); + /** Entity format */ + format?: (google.cloud.dataplex.v1.IStorageFormat|null); - /** Task executionSpec */ - executionSpec?: (google.cloud.dataplex.v1.Task.IExecutionSpec|null); + /** Entity compatibility */ + compatibility?: (google.cloud.dataplex.v1.Entity.ICompatibilityStatus|null); - /** Task executionStatus */ - executionStatus?: (google.cloud.dataplex.v1.Task.IExecutionStatus|null); + /** Entity access */ + access?: (google.cloud.dataplex.v1.IStorageAccess|null); - /** Task spark */ - spark?: (google.cloud.dataplex.v1.Task.ISparkTaskConfig|null); + /** Entity uid */ + uid?: (string|null); - /** Task notebook */ - notebook?: (google.cloud.dataplex.v1.Task.INotebookTaskConfig|null); + /** Entity schema */ + schema?: (google.cloud.dataplex.v1.ISchema|null); } - /** Represents a Task. */ - class Task implements ITask { + /** Represents an Entity. */ + class Entity implements IEntity { /** - * Constructs a new Task. + * Constructs a new Entity. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.ITask); + constructor(properties?: google.cloud.dataplex.v1.IEntity); - /** Task name. */ + /** Entity name. */ public name: string; - /** Task uid. */ - public uid: string; + /** Entity displayName. */ + public displayName: string; - /** Task createTime. */ + /** Entity description. */ + public description: string; + + /** Entity createTime. */ public createTime?: (google.protobuf.ITimestamp|null); - /** Task updateTime. */ + /** Entity updateTime. */ public updateTime?: (google.protobuf.ITimestamp|null); - /** Task description. */ - public description: string; + /** Entity id. */ + public id: string; - /** Task displayName. */ - public displayName: string; + /** Entity etag. */ + public etag: string; - /** Task state. */ - public state: (google.cloud.dataplex.v1.State|keyof typeof google.cloud.dataplex.v1.State); + /** Entity type. */ + public type: (google.cloud.dataplex.v1.Entity.Type|keyof typeof google.cloud.dataplex.v1.Entity.Type); - /** Task labels. */ - public labels: { [k: string]: string }; + /** Entity asset. */ + public asset: string; - /** Task triggerSpec. */ - public triggerSpec?: (google.cloud.dataplex.v1.Task.ITriggerSpec|null); + /** Entity dataPath. */ + public dataPath: string; - /** Task executionSpec. */ - public executionSpec?: (google.cloud.dataplex.v1.Task.IExecutionSpec|null); + /** Entity dataPathPattern. */ + public dataPathPattern: string; - /** Task executionStatus. */ - public executionStatus?: (google.cloud.dataplex.v1.Task.IExecutionStatus|null); + /** Entity catalogEntry. */ + public catalogEntry: string; - /** Task spark. */ - public spark?: (google.cloud.dataplex.v1.Task.ISparkTaskConfig|null); + /** Entity system. */ + public system: (google.cloud.dataplex.v1.StorageSystem|keyof typeof google.cloud.dataplex.v1.StorageSystem); - /** Task notebook. */ - public notebook?: (google.cloud.dataplex.v1.Task.INotebookTaskConfig|null); + /** Entity format. */ + public format?: (google.cloud.dataplex.v1.IStorageFormat|null); - /** Task config. */ - public config?: ("spark"|"notebook"); + /** Entity compatibility. */ + public compatibility?: (google.cloud.dataplex.v1.Entity.ICompatibilityStatus|null); + + /** Entity access. */ + public access?: (google.cloud.dataplex.v1.IStorageAccess|null); + + /** Entity uid. */ + public uid: string; + + /** Entity schema. */ + public schema?: (google.cloud.dataplex.v1.ISchema|null); /** - * Creates a new Task instance using the specified properties. + * Creates a new Entity instance using the specified properties. * @param [properties] Properties to set - * @returns Task instance + * @returns Entity instance */ - public static create(properties?: google.cloud.dataplex.v1.ITask): google.cloud.dataplex.v1.Task; + public static create(properties?: google.cloud.dataplex.v1.IEntity): google.cloud.dataplex.v1.Entity; /** - * Encodes the specified Task message. Does not implicitly {@link google.cloud.dataplex.v1.Task.verify|verify} messages. - * @param message Task message or plain object to encode + * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.verify|verify} messages. + * @param message Entity message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.ITask, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Task message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.verify|verify} messages. - * @param message Task message or plain object to encode + * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.verify|verify} messages. + * @param message Entity message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.ITask, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IEntity, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Task message from the specified reader or buffer. + * Decodes an Entity message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Task + * @returns Entity * @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.dataplex.v1.Task; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Entity; /** - * Decodes a Task message from the specified reader or buffer, length delimited. + * Decodes an Entity message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Task + * @returns Entity * @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.dataplex.v1.Task; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Entity; /** - * Verifies a Task message. + * Verifies an Entity 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 Task message from a plain object. Also converts values to their respective internal types. + * Creates an Entity message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Task + * @returns Entity */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Entity; /** - * Creates a plain object from a Task message. Also converts values to other types if specified. - * @param message Task + * Creates a plain object from an Entity message. Also converts values to other types if specified. + * @param message Entity * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.Task, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.Entity, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Task to JSON. + * Converts this Entity to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Task + * Gets the default type url for Entity * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Task { + namespace Entity { - /** Properties of an InfrastructureSpec. */ - interface IInfrastructureSpec { + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + TABLE = 1, + FILESET = 2 + } - /** InfrastructureSpec batch */ - batch?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources|null); + /** Properties of a CompatibilityStatus. */ + interface ICompatibilityStatus { - /** InfrastructureSpec containerImage */ - containerImage?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime|null); + /** CompatibilityStatus hiveMetastore */ + hiveMetastore?: (google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null); - /** InfrastructureSpec vpcNetwork */ - vpcNetwork?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork|null); + /** CompatibilityStatus bigquery */ + bigquery?: (google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null); } - /** Represents an InfrastructureSpec. */ - class InfrastructureSpec implements IInfrastructureSpec { + /** Represents a CompatibilityStatus. */ + class CompatibilityStatus implements ICompatibilityStatus { /** - * Constructs a new InfrastructureSpec. + * Constructs a new CompatibilityStatus. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.Task.IInfrastructureSpec); - - /** InfrastructureSpec batch. */ - public batch?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources|null); - - /** InfrastructureSpec containerImage. */ - public containerImage?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime|null); - - /** InfrastructureSpec vpcNetwork. */ - public vpcNetwork?: (google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork|null); - - /** InfrastructureSpec resources. */ - public resources?: "batch"; + constructor(properties?: google.cloud.dataplex.v1.Entity.ICompatibilityStatus); - /** InfrastructureSpec runtime. */ - public runtime?: "containerImage"; + /** CompatibilityStatus hiveMetastore. */ + public hiveMetastore?: (google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null); - /** InfrastructureSpec network. */ - public network?: "vpcNetwork"; + /** CompatibilityStatus bigquery. */ + public bigquery?: (google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null); /** - * Creates a new InfrastructureSpec instance using the specified properties. + * Creates a new CompatibilityStatus instance using the specified properties. * @param [properties] Properties to set - * @returns InfrastructureSpec instance + * @returns CompatibilityStatus instance */ - public static create(properties?: google.cloud.dataplex.v1.Task.IInfrastructureSpec): google.cloud.dataplex.v1.Task.InfrastructureSpec; + public static create(properties?: google.cloud.dataplex.v1.Entity.ICompatibilityStatus): google.cloud.dataplex.v1.Entity.CompatibilityStatus; /** - * Encodes the specified InfrastructureSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.verify|verify} messages. - * @param message InfrastructureSpec message or plain object to encode + * Encodes the specified CompatibilityStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify|verify} messages. + * @param message CompatibilityStatus message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.Task.IInfrastructureSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.Entity.ICompatibilityStatus, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified InfrastructureSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.verify|verify} messages. - * @param message InfrastructureSpec message or plain object to encode + * Encodes the specified CompatibilityStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify|verify} messages. + * @param message CompatibilityStatus message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Task.IInfrastructureSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.Entity.ICompatibilityStatus, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an InfrastructureSpec message from the specified reader or buffer. + * Decodes a CompatibilityStatus message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns InfrastructureSpec + * @returns CompatibilityStatus * @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.dataplex.v1.Task.InfrastructureSpec; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Entity.CompatibilityStatus; /** - * Decodes an InfrastructureSpec message from the specified reader or buffer, length delimited. + * Decodes a CompatibilityStatus message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns InfrastructureSpec + * @returns CompatibilityStatus * @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.dataplex.v1.Task.InfrastructureSpec; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Entity.CompatibilityStatus; /** - * Verifies an InfrastructureSpec message. + * Verifies a CompatibilityStatus 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 InfrastructureSpec message from a plain object. Also converts values to their respective internal types. + * Creates a CompatibilityStatus message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns InfrastructureSpec + * @returns CompatibilityStatus */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.InfrastructureSpec; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Entity.CompatibilityStatus; /** - * Creates a plain object from an InfrastructureSpec message. Also converts values to other types if specified. - * @param message InfrastructureSpec + * Creates a plain object from a CompatibilityStatus message. Also converts values to other types if specified. + * @param message CompatibilityStatus * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.Task.InfrastructureSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.Entity.CompatibilityStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this InfrastructureSpec to JSON. + * Converts this CompatibilityStatus to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for InfrastructureSpec + * Gets the default type url for CompatibilityStatus * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace InfrastructureSpec { + namespace CompatibilityStatus { - /** Properties of a BatchComputeResources. */ - interface IBatchComputeResources { + /** Properties of a Compatibility. */ + interface ICompatibility { - /** BatchComputeResources executorsCount */ - executorsCount?: (number|null); + /** Compatibility compatible */ + compatible?: (boolean|null); - /** BatchComputeResources maxExecutorsCount */ - maxExecutorsCount?: (number|null); + /** Compatibility reason */ + reason?: (string|null); } - /** Represents a BatchComputeResources. */ - class BatchComputeResources implements IBatchComputeResources { + /** Represents a Compatibility. */ + class Compatibility implements ICompatibility { /** - * Constructs a new BatchComputeResources. + * Constructs a new Compatibility. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources); + constructor(properties?: google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility); - /** BatchComputeResources executorsCount. */ - public executorsCount: number; + /** Compatibility compatible. */ + public compatible: boolean; - /** BatchComputeResources maxExecutorsCount. */ - public maxExecutorsCount: number; + /** Compatibility reason. */ + public reason: string; /** - * Creates a new BatchComputeResources instance using the specified properties. + * Creates a new Compatibility instance using the specified properties. * @param [properties] Properties to set - * @returns BatchComputeResources instance + * @returns Compatibility instance */ - public static create(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources): google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources; + public static create(properties?: google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility): google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility; /** - * Encodes the specified BatchComputeResources message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify|verify} messages. - * @param message BatchComputeResources message or plain object to encode + * Encodes the specified Compatibility message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify|verify} messages. + * @param message Compatibility message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BatchComputeResources message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify|verify} messages. - * @param message BatchComputeResources message or plain object to encode + * Encodes the specified Compatibility message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify|verify} messages. + * @param message Compatibility message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BatchComputeResources message from the specified reader or buffer. + * Decodes a Compatibility message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BatchComputeResources + * @returns Compatibility * @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.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility; /** - * Decodes a BatchComputeResources message from the specified reader or buffer, length delimited. + * Decodes a Compatibility message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BatchComputeResources + * @returns Compatibility * @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.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility; /** - * Verifies a BatchComputeResources message. + * Verifies a Compatibility 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 BatchComputeResources message from a plain object. Also converts values to their respective internal types. + * Creates a Compatibility message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BatchComputeResources + * @returns Compatibility */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility; /** - * Creates a plain object from a BatchComputeResources message. Also converts values to other types if specified. - * @param message BatchComputeResources + * Creates a plain object from a Compatibility message. Also converts values to other types if specified. + * @param message Compatibility * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BatchComputeResources to JSON. + * Converts this Compatibility to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for BatchComputeResources + * Gets the default type url for Compatibility * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } + } + } - /** Properties of a ContainerImageRuntime. */ - interface IContainerImageRuntime { + /** Properties of a Partition. */ + interface IPartition { - /** ContainerImageRuntime image */ - image?: (string|null); + /** Partition name */ + name?: (string|null); - /** ContainerImageRuntime javaJars */ - javaJars?: (string[]|null); + /** Partition values */ + values?: (string[]|null); - /** ContainerImageRuntime pythonPackages */ - pythonPackages?: (string[]|null); + /** Partition location */ + location?: (string|null); - /** ContainerImageRuntime properties */ - properties?: ({ [k: string]: string }|null); - } + /** Partition etag */ + etag?: (string|null); + } - /** Represents a ContainerImageRuntime. */ - class ContainerImageRuntime implements IContainerImageRuntime { + /** Represents a Partition. */ + class Partition implements IPartition { - /** - * Constructs a new ContainerImageRuntime. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime); + /** + * Constructs a new Partition. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IPartition); - /** ContainerImageRuntime image. */ - public image: string; + /** Partition name. */ + public name: string; - /** ContainerImageRuntime javaJars. */ - public javaJars: string[]; + /** Partition values. */ + public values: string[]; - /** ContainerImageRuntime pythonPackages. */ - public pythonPackages: string[]; + /** Partition location. */ + public location: string; - /** ContainerImageRuntime properties. */ - public properties: { [k: string]: string }; + /** Partition etag. */ + public etag: string; - /** - * Creates a new ContainerImageRuntime instance using the specified properties. - * @param [properties] Properties to set - * @returns ContainerImageRuntime instance - */ - public static create(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime): google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime; + /** + * Creates a new Partition instance using the specified properties. + * @param [properties] Properties to set + * @returns Partition instance + */ + public static create(properties?: google.cloud.dataplex.v1.IPartition): google.cloud.dataplex.v1.Partition; - /** - * Encodes the specified ContainerImageRuntime message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify|verify} messages. - * @param message ContainerImageRuntime message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Partition message. Does not implicitly {@link google.cloud.dataplex.v1.Partition.verify|verify} messages. + * @param message Partition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IPartition, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ContainerImageRuntime message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify|verify} messages. - * @param message ContainerImageRuntime message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Partition message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Partition.verify|verify} messages. + * @param message Partition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IPartition, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a ContainerImageRuntime message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ContainerImageRuntime - * @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.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime; + /** + * Decodes a Partition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Partition + * @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.dataplex.v1.Partition; - /** - * Decodes a ContainerImageRuntime message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ContainerImageRuntime - * @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.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime; + /** + * Decodes a Partition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Partition + * @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.dataplex.v1.Partition; - /** - * Verifies a ContainerImageRuntime 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); + /** + * Verifies a Partition 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 ContainerImageRuntime message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ContainerImageRuntime - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime; + /** + * Creates a Partition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Partition + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Partition; - /** - * Creates a plain object from a ContainerImageRuntime message. Also converts values to other types if specified. - * @param message ContainerImageRuntime - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a Partition message. Also converts values to other types if specified. + * @param message Partition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Partition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Partition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Partition + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Schema. */ + interface ISchema { + + /** Schema userManaged */ + userManaged?: (boolean|null); - /** - * Converts this ContainerImageRuntime to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Schema fields */ + fields?: (google.cloud.dataplex.v1.Schema.ISchemaField[]|null); - /** - * Gets the default type url for ContainerImageRuntime - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Schema partitionFields */ + partitionFields?: (google.cloud.dataplex.v1.Schema.IPartitionField[]|null); - /** Properties of a VpcNetwork. */ - interface IVpcNetwork { + /** Schema partitionStyle */ + partitionStyle?: (google.cloud.dataplex.v1.Schema.PartitionStyle|keyof typeof google.cloud.dataplex.v1.Schema.PartitionStyle|null); + } - /** VpcNetwork network */ - network?: (string|null); + /** Represents a Schema. */ + class Schema implements ISchema { - /** VpcNetwork subNetwork */ - subNetwork?: (string|null); + /** + * Constructs a new Schema. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.ISchema); - /** VpcNetwork networkTags */ - networkTags?: (string[]|null); - } + /** Schema userManaged. */ + public userManaged: boolean; - /** Represents a VpcNetwork. */ - class VpcNetwork implements IVpcNetwork { + /** Schema fields. */ + public fields: google.cloud.dataplex.v1.Schema.ISchemaField[]; - /** - * Constructs a new VpcNetwork. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork); + /** Schema partitionFields. */ + public partitionFields: google.cloud.dataplex.v1.Schema.IPartitionField[]; - /** VpcNetwork network. */ - public network?: (string|null); + /** Schema partitionStyle. */ + public partitionStyle: (google.cloud.dataplex.v1.Schema.PartitionStyle|keyof typeof google.cloud.dataplex.v1.Schema.PartitionStyle); - /** VpcNetwork subNetwork. */ - public subNetwork?: (string|null); + /** + * Creates a new Schema instance using the specified properties. + * @param [properties] Properties to set + * @returns Schema instance + */ + public static create(properties?: google.cloud.dataplex.v1.ISchema): google.cloud.dataplex.v1.Schema; - /** VpcNetwork networkTags. */ - public networkTags: string[]; + /** + * Encodes the specified Schema message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.verify|verify} messages. + * @param message Schema message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.ISchema, writer?: $protobuf.Writer): $protobuf.Writer; - /** VpcNetwork networkName. */ - public networkName?: ("network"|"subNetwork"); + /** + * Encodes the specified Schema message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.verify|verify} messages. + * @param message Schema message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.ISchema, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new VpcNetwork instance using the specified properties. - * @param [properties] Properties to set - * @returns VpcNetwork instance - */ - public static create(properties?: google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork): google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork; + /** + * Decodes a Schema message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Schema + * @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.dataplex.v1.Schema; - /** - * Encodes the specified VpcNetwork message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify|verify} messages. - * @param message VpcNetwork message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a Schema message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Schema + * @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.dataplex.v1.Schema; - /** - * Encodes the specified VpcNetwork message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify|verify} messages. - * @param message VpcNetwork message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies a Schema 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); - /** - * Decodes a VpcNetwork message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VpcNetwork - * @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.dataplex.v1.Task.InfrastructureSpec.VpcNetwork; + /** + * Creates a Schema message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Schema + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Schema; - /** - * Decodes a VpcNetwork message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VpcNetwork - * @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.dataplex.v1.Task.InfrastructureSpec.VpcNetwork; + /** + * Creates a plain object from a Schema message. Also converts values to other types if specified. + * @param message Schema + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Schema, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Verifies a VpcNetwork 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); + /** + * Converts this Schema to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a VpcNetwork message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VpcNetwork - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork; + /** + * Gets the default type url for Schema + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Creates a plain object from a VpcNetwork message. Also converts values to other types if specified. - * @param message VpcNetwork - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork, options?: $protobuf.IConversionOptions): { [k: string]: any }; + namespace Schema { - /** - * Converts this VpcNetwork to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + BOOLEAN = 1, + BYTE = 2, + INT16 = 3, + INT32 = 4, + INT64 = 5, + FLOAT = 6, + DOUBLE = 7, + DECIMAL = 8, + STRING = 9, + BINARY = 10, + TIMESTAMP = 11, + DATE = 12, + TIME = 13, + RECORD = 14, + NULL = 100 + } - /** - * Gets the default type url for VpcNetwork - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + REQUIRED = 1, + NULLABLE = 2, + REPEATED = 3 } - /** Properties of a TriggerSpec. */ - interface ITriggerSpec { + /** Properties of a SchemaField. */ + interface ISchemaField { - /** TriggerSpec type */ - type?: (google.cloud.dataplex.v1.Task.TriggerSpec.Type|keyof typeof google.cloud.dataplex.v1.Task.TriggerSpec.Type|null); + /** SchemaField name */ + name?: (string|null); - /** TriggerSpec startTime */ - startTime?: (google.protobuf.ITimestamp|null); + /** SchemaField description */ + description?: (string|null); - /** TriggerSpec disabled */ - disabled?: (boolean|null); + /** SchemaField type */ + type?: (google.cloud.dataplex.v1.Schema.Type|keyof typeof google.cloud.dataplex.v1.Schema.Type|null); - /** TriggerSpec maxRetries */ - maxRetries?: (number|null); + /** SchemaField mode */ + mode?: (google.cloud.dataplex.v1.Schema.Mode|keyof typeof google.cloud.dataplex.v1.Schema.Mode|null); - /** TriggerSpec schedule */ - schedule?: (string|null); + /** SchemaField fields */ + fields?: (google.cloud.dataplex.v1.Schema.ISchemaField[]|null); } - /** Represents a TriggerSpec. */ - class TriggerSpec implements ITriggerSpec { + /** Represents a SchemaField. */ + class SchemaField implements ISchemaField { /** - * Constructs a new TriggerSpec. + * Constructs a new SchemaField. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.Task.ITriggerSpec); - - /** TriggerSpec type. */ - public type: (google.cloud.dataplex.v1.Task.TriggerSpec.Type|keyof typeof google.cloud.dataplex.v1.Task.TriggerSpec.Type); + constructor(properties?: google.cloud.dataplex.v1.Schema.ISchemaField); - /** TriggerSpec startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); + /** SchemaField name. */ + public name: string; - /** TriggerSpec disabled. */ - public disabled: boolean; + /** SchemaField description. */ + public description: string; - /** TriggerSpec maxRetries. */ - public maxRetries: number; + /** SchemaField type. */ + public type: (google.cloud.dataplex.v1.Schema.Type|keyof typeof google.cloud.dataplex.v1.Schema.Type); - /** TriggerSpec schedule. */ - public schedule?: (string|null); + /** SchemaField mode. */ + public mode: (google.cloud.dataplex.v1.Schema.Mode|keyof typeof google.cloud.dataplex.v1.Schema.Mode); - /** TriggerSpec trigger. */ - public trigger?: "schedule"; + /** SchemaField fields. */ + public fields: google.cloud.dataplex.v1.Schema.ISchemaField[]; /** - * Creates a new TriggerSpec instance using the specified properties. + * Creates a new SchemaField instance using the specified properties. * @param [properties] Properties to set - * @returns TriggerSpec instance + * @returns SchemaField instance */ - public static create(properties?: google.cloud.dataplex.v1.Task.ITriggerSpec): google.cloud.dataplex.v1.Task.TriggerSpec; + public static create(properties?: google.cloud.dataplex.v1.Schema.ISchemaField): google.cloud.dataplex.v1.Schema.SchemaField; /** - * Encodes the specified TriggerSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.TriggerSpec.verify|verify} messages. - * @param message TriggerSpec message or plain object to encode + * Encodes the specified SchemaField message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.SchemaField.verify|verify} messages. + * @param message SchemaField message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.Task.ITriggerSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.Schema.ISchemaField, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TriggerSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.TriggerSpec.verify|verify} messages. - * @param message TriggerSpec message or plain object to encode + * Encodes the specified SchemaField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.SchemaField.verify|verify} messages. + * @param message SchemaField message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Task.ITriggerSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.Schema.ISchemaField, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TriggerSpec message from the specified reader or buffer. + * Decodes a SchemaField message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TriggerSpec + * @returns SchemaField * @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.dataplex.v1.Task.TriggerSpec; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Schema.SchemaField; /** - * Decodes a TriggerSpec message from the specified reader or buffer, length delimited. + * Decodes a SchemaField message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TriggerSpec + * @returns SchemaField * @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.dataplex.v1.Task.TriggerSpec; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.Schema.SchemaField; /** - * Verifies a TriggerSpec message. + * Verifies a SchemaField 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 TriggerSpec message from a plain object. Also converts values to their respective internal types. + * Creates a SchemaField message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TriggerSpec + * @returns SchemaField */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.TriggerSpec; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Schema.SchemaField; /** - * Creates a plain object from a TriggerSpec message. Also converts values to other types if specified. - * @param message TriggerSpec + * Creates a plain object from a SchemaField message. Also converts values to other types if specified. + * @param message SchemaField * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.Task.TriggerSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.Schema.SchemaField, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TriggerSpec to JSON. + * Converts this SchemaField to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for TriggerSpec + * Gets the default type url for SchemaField * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace TriggerSpec { - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - ON_DEMAND = 1, - RECURRING = 2 - } - } - - /** Properties of an ExecutionSpec. */ - interface IExecutionSpec { - - /** ExecutionSpec args */ - args?: ({ [k: string]: string }|null); - - /** ExecutionSpec serviceAccount */ - serviceAccount?: (string|null); - - /** ExecutionSpec project */ - project?: (string|null); + /** Properties of a PartitionField. */ + interface IPartitionField { - /** ExecutionSpec maxJobExecutionLifetime */ - maxJobExecutionLifetime?: (google.protobuf.IDuration|null); + /** PartitionField name */ + name?: (string|null); - /** ExecutionSpec kmsKey */ - kmsKey?: (string|null); + /** PartitionField type */ + type?: (google.cloud.dataplex.v1.Schema.Type|keyof typeof google.cloud.dataplex.v1.Schema.Type|null); } - /** Represents an ExecutionSpec. */ - class ExecutionSpec implements IExecutionSpec { + /** Represents a PartitionField. */ + class PartitionField implements IPartitionField { /** - * Constructs a new ExecutionSpec. + * Constructs a new PartitionField. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.Task.IExecutionSpec); - - /** ExecutionSpec args. */ - public args: { [k: string]: string }; - - /** ExecutionSpec serviceAccount. */ - public serviceAccount: string; - - /** ExecutionSpec project. */ - public project: string; + constructor(properties?: google.cloud.dataplex.v1.Schema.IPartitionField); - /** ExecutionSpec maxJobExecutionLifetime. */ - public maxJobExecutionLifetime?: (google.protobuf.IDuration|null); + /** PartitionField name. */ + public name: string; - /** ExecutionSpec kmsKey. */ - public kmsKey: string; + /** PartitionField type. */ + public type: (google.cloud.dataplex.v1.Schema.Type|keyof typeof google.cloud.dataplex.v1.Schema.Type); /** - * Creates a new ExecutionSpec instance using the specified properties. + * Creates a new PartitionField instance using the specified properties. * @param [properties] Properties to set - * @returns ExecutionSpec instance + * @returns PartitionField instance */ - public static create(properties?: google.cloud.dataplex.v1.Task.IExecutionSpec): google.cloud.dataplex.v1.Task.ExecutionSpec; + public static create(properties?: google.cloud.dataplex.v1.Schema.IPartitionField): google.cloud.dataplex.v1.Schema.PartitionField; /** - * Encodes the specified ExecutionSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionSpec.verify|verify} messages. - * @param message ExecutionSpec message or plain object to encode + * Encodes the specified PartitionField message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.PartitionField.verify|verify} messages. + * @param message PartitionField message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.Task.IExecutionSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.Schema.IPartitionField, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExecutionSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionSpec.verify|verify} messages. - * @param message ExecutionSpec message or plain object to encode + * Encodes the specified PartitionField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.PartitionField.verify|verify} messages. + * @param message PartitionField message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Task.IExecutionSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.Schema.IPartitionField, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExecutionSpec message from the specified reader or buffer. + * Decodes a PartitionField message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExecutionSpec + * @returns PartitionField * @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.dataplex.v1.Task.ExecutionSpec; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.Schema.PartitionField; + + /** + * Decodes a PartitionField message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PartitionField + * @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.dataplex.v1.Schema.PartitionField; + + /** + * Verifies a PartitionField 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 PartitionField message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PartitionField + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Schema.PartitionField; + + /** + * Creates a plain object from a PartitionField message. Also converts values to other types if specified. + * @param message PartitionField + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.Schema.PartitionField, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PartitionField to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PartitionField + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** PartitionStyle enum. */ + enum PartitionStyle { + PARTITION_STYLE_UNSPECIFIED = 0, + HIVE_COMPATIBLE = 1 + } + } + + /** Properties of a StorageFormat. */ + interface IStorageFormat { + + /** StorageFormat format */ + format?: (google.cloud.dataplex.v1.StorageFormat.Format|keyof typeof google.cloud.dataplex.v1.StorageFormat.Format|null); + + /** StorageFormat compressionFormat */ + compressionFormat?: (google.cloud.dataplex.v1.StorageFormat.CompressionFormat|keyof typeof google.cloud.dataplex.v1.StorageFormat.CompressionFormat|null); + + /** StorageFormat mimeType */ + mimeType?: (string|null); + + /** StorageFormat csv */ + csv?: (google.cloud.dataplex.v1.StorageFormat.ICsvOptions|null); + + /** StorageFormat json */ + json?: (google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null); + + /** StorageFormat iceberg */ + iceberg?: (google.cloud.dataplex.v1.StorageFormat.IIcebergOptions|null); + } + + /** Represents a StorageFormat. */ + class StorageFormat implements IStorageFormat { + + /** + * Constructs a new StorageFormat. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.IStorageFormat); + + /** StorageFormat format. */ + public format: (google.cloud.dataplex.v1.StorageFormat.Format|keyof typeof google.cloud.dataplex.v1.StorageFormat.Format); + + /** StorageFormat compressionFormat. */ + public compressionFormat: (google.cloud.dataplex.v1.StorageFormat.CompressionFormat|keyof typeof google.cloud.dataplex.v1.StorageFormat.CompressionFormat); + + /** StorageFormat mimeType. */ + public mimeType: string; + + /** StorageFormat csv. */ + public csv?: (google.cloud.dataplex.v1.StorageFormat.ICsvOptions|null); + + /** StorageFormat json. */ + public json?: (google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null); + + /** StorageFormat iceberg. */ + public iceberg?: (google.cloud.dataplex.v1.StorageFormat.IIcebergOptions|null); + + /** StorageFormat options. */ + public options?: ("csv"|"json"|"iceberg"); + + /** + * Creates a new StorageFormat instance using the specified properties. + * @param [properties] Properties to set + * @returns StorageFormat instance + */ + public static create(properties?: google.cloud.dataplex.v1.IStorageFormat): google.cloud.dataplex.v1.StorageFormat; - /** - * Decodes an ExecutionSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecutionSpec - * @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.dataplex.v1.Task.ExecutionSpec; + /** + * Encodes the specified StorageFormat message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.verify|verify} messages. + * @param message StorageFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dataplex.v1.IStorageFormat, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies an ExecutionSpec 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); + /** + * Encodes the specified StorageFormat message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.verify|verify} messages. + * @param message StorageFormat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dataplex.v1.IStorageFormat, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates an ExecutionSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecutionSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.ExecutionSpec; + /** + * Decodes a StorageFormat message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StorageFormat + * @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.dataplex.v1.StorageFormat; - /** - * Creates a plain object from an ExecutionSpec message. Also converts values to other types if specified. - * @param message ExecutionSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dataplex.v1.Task.ExecutionSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a StorageFormat message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StorageFormat + * @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.dataplex.v1.StorageFormat; - /** - * Converts this ExecutionSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Verifies a StorageFormat 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); - /** - * Gets the default type url for ExecutionSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a StorageFormat message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StorageFormat + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.StorageFormat; - /** Properties of a SparkTaskConfig. */ - interface ISparkTaskConfig { + /** + * Creates a plain object from a StorageFormat message. Also converts values to other types if specified. + * @param message StorageFormat + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dataplex.v1.StorageFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** SparkTaskConfig mainJarFileUri */ - mainJarFileUri?: (string|null); + /** + * Converts this StorageFormat to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** SparkTaskConfig mainClass */ - mainClass?: (string|null); + /** + * Gets the default type url for StorageFormat + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** SparkTaskConfig pythonScriptFile */ - pythonScriptFile?: (string|null); + namespace StorageFormat { - /** SparkTaskConfig sqlScriptFile */ - sqlScriptFile?: (string|null); + /** Properties of a CsvOptions. */ + interface ICsvOptions { - /** SparkTaskConfig sqlScript */ - sqlScript?: (string|null); + /** CsvOptions encoding */ + encoding?: (string|null); - /** SparkTaskConfig fileUris */ - fileUris?: (string[]|null); + /** CsvOptions headerRows */ + headerRows?: (number|null); - /** SparkTaskConfig archiveUris */ - archiveUris?: (string[]|null); + /** CsvOptions delimiter */ + delimiter?: (string|null); - /** SparkTaskConfig infrastructureSpec */ - infrastructureSpec?: (google.cloud.dataplex.v1.Task.IInfrastructureSpec|null); + /** CsvOptions quote */ + quote?: (string|null); } - /** Represents a SparkTaskConfig. */ - class SparkTaskConfig implements ISparkTaskConfig { + /** Represents a CsvOptions. */ + class CsvOptions implements ICsvOptions { /** - * Constructs a new SparkTaskConfig. + * Constructs a new CsvOptions. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.Task.ISparkTaskConfig); - - /** SparkTaskConfig mainJarFileUri. */ - public mainJarFileUri?: (string|null); - - /** SparkTaskConfig mainClass. */ - public mainClass?: (string|null); - - /** SparkTaskConfig pythonScriptFile. */ - public pythonScriptFile?: (string|null); - - /** SparkTaskConfig sqlScriptFile. */ - public sqlScriptFile?: (string|null); - - /** SparkTaskConfig sqlScript. */ - public sqlScript?: (string|null); + constructor(properties?: google.cloud.dataplex.v1.StorageFormat.ICsvOptions); - /** SparkTaskConfig fileUris. */ - public fileUris: string[]; + /** CsvOptions encoding. */ + public encoding: string; - /** SparkTaskConfig archiveUris. */ - public archiveUris: string[]; + /** CsvOptions headerRows. */ + public headerRows: number; - /** SparkTaskConfig infrastructureSpec. */ - public infrastructureSpec?: (google.cloud.dataplex.v1.Task.IInfrastructureSpec|null); + /** CsvOptions delimiter. */ + public delimiter: string; - /** SparkTaskConfig driver. */ - public driver?: ("mainJarFileUri"|"mainClass"|"pythonScriptFile"|"sqlScriptFile"|"sqlScript"); + /** CsvOptions quote. */ + public quote: string; /** - * Creates a new SparkTaskConfig instance using the specified properties. + * Creates a new CsvOptions instance using the specified properties. * @param [properties] Properties to set - * @returns SparkTaskConfig instance + * @returns CsvOptions instance */ - public static create(properties?: google.cloud.dataplex.v1.Task.ISparkTaskConfig): google.cloud.dataplex.v1.Task.SparkTaskConfig; + public static create(properties?: google.cloud.dataplex.v1.StorageFormat.ICsvOptions): google.cloud.dataplex.v1.StorageFormat.CsvOptions; /** - * Encodes the specified SparkTaskConfig message. Does not implicitly {@link google.cloud.dataplex.v1.Task.SparkTaskConfig.verify|verify} messages. - * @param message SparkTaskConfig message or plain object to encode + * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify|verify} messages. + * @param message CsvOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.Task.ISparkTaskConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.StorageFormat.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SparkTaskConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.SparkTaskConfig.verify|verify} messages. - * @param message SparkTaskConfig message or plain object to encode + * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify|verify} messages. + * @param message CsvOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Task.ISparkTaskConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.StorageFormat.ICsvOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SparkTaskConfig message from the specified reader or buffer. + * Decodes a CsvOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SparkTaskConfig + * @returns CsvOptions * @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.dataplex.v1.Task.SparkTaskConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.StorageFormat.CsvOptions; /** - * Decodes a SparkTaskConfig message from the specified reader or buffer, length delimited. + * Decodes a CsvOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SparkTaskConfig + * @returns CsvOptions * @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.dataplex.v1.Task.SparkTaskConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.StorageFormat.CsvOptions; /** - * Verifies a SparkTaskConfig message. + * Verifies a CsvOptions 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 SparkTaskConfig message from a plain object. Also converts values to their respective internal types. + * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SparkTaskConfig + * @returns CsvOptions */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.SparkTaskConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.StorageFormat.CsvOptions; /** - * Creates a plain object from a SparkTaskConfig message. Also converts values to other types if specified. - * @param message SparkTaskConfig + * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. + * @param message CsvOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.Task.SparkTaskConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.StorageFormat.CsvOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SparkTaskConfig to JSON. + * Converts this CsvOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SparkTaskConfig + * Gets the default type url for CsvOptions * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a NotebookTaskConfig. */ - interface INotebookTaskConfig { - - /** NotebookTaskConfig notebook */ - notebook?: (string|null); - - /** NotebookTaskConfig infrastructureSpec */ - infrastructureSpec?: (google.cloud.dataplex.v1.Task.IInfrastructureSpec|null); - - /** NotebookTaskConfig fileUris */ - fileUris?: (string[]|null); + /** Properties of a JsonOptions. */ + interface IJsonOptions { - /** NotebookTaskConfig archiveUris */ - archiveUris?: (string[]|null); + /** JsonOptions encoding */ + encoding?: (string|null); } - /** Represents a NotebookTaskConfig. */ - class NotebookTaskConfig implements INotebookTaskConfig { - - /** - * Constructs a new NotebookTaskConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dataplex.v1.Task.INotebookTaskConfig); - - /** NotebookTaskConfig notebook. */ - public notebook: string; - - /** NotebookTaskConfig infrastructureSpec. */ - public infrastructureSpec?: (google.cloud.dataplex.v1.Task.IInfrastructureSpec|null); + /** Represents a JsonOptions. */ + class JsonOptions implements IJsonOptions { - /** NotebookTaskConfig fileUris. */ - public fileUris: string[]; + /** + * Constructs a new JsonOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dataplex.v1.StorageFormat.IJsonOptions); - /** NotebookTaskConfig archiveUris. */ - public archiveUris: string[]; + /** JsonOptions encoding. */ + public encoding: string; /** - * Creates a new NotebookTaskConfig instance using the specified properties. + * Creates a new JsonOptions instance using the specified properties. * @param [properties] Properties to set - * @returns NotebookTaskConfig instance + * @returns JsonOptions instance */ - public static create(properties?: google.cloud.dataplex.v1.Task.INotebookTaskConfig): google.cloud.dataplex.v1.Task.NotebookTaskConfig; + public static create(properties?: google.cloud.dataplex.v1.StorageFormat.IJsonOptions): google.cloud.dataplex.v1.StorageFormat.JsonOptions; /** - * Encodes the specified NotebookTaskConfig message. Does not implicitly {@link google.cloud.dataplex.v1.Task.NotebookTaskConfig.verify|verify} messages. - * @param message NotebookTaskConfig message or plain object to encode + * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify|verify} messages. + * @param message JsonOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.Task.INotebookTaskConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.StorageFormat.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified NotebookTaskConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.NotebookTaskConfig.verify|verify} messages. - * @param message NotebookTaskConfig message or plain object to encode + * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify|verify} messages. + * @param message JsonOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Task.INotebookTaskConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.StorageFormat.IJsonOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NotebookTaskConfig message from the specified reader or buffer. + * Decodes a JsonOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NotebookTaskConfig + * @returns JsonOptions * @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.dataplex.v1.Task.NotebookTaskConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.StorageFormat.JsonOptions; /** - * Decodes a NotebookTaskConfig message from the specified reader or buffer, length delimited. + * Decodes a JsonOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NotebookTaskConfig + * @returns JsonOptions * @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.dataplex.v1.Task.NotebookTaskConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.StorageFormat.JsonOptions; /** - * Verifies a NotebookTaskConfig message. + * Verifies a JsonOptions 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 NotebookTaskConfig message from a plain object. Also converts values to their respective internal types. + * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NotebookTaskConfig + * @returns JsonOptions */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.NotebookTaskConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.StorageFormat.JsonOptions; /** - * Creates a plain object from a NotebookTaskConfig message. Also converts values to other types if specified. - * @param message NotebookTaskConfig + * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. + * @param message JsonOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.Task.NotebookTaskConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.StorageFormat.JsonOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NotebookTaskConfig to JSON. + * Converts this JsonOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for NotebookTaskConfig + * Gets the default type url for JsonOptions * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ExecutionStatus. */ - interface IExecutionStatus { - - /** ExecutionStatus updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** Properties of an IcebergOptions. */ + interface IIcebergOptions { - /** ExecutionStatus latestJob */ - latestJob?: (google.cloud.dataplex.v1.IJob|null); + /** IcebergOptions metadataLocation */ + metadataLocation?: (string|null); } - /** Represents an ExecutionStatus. */ - class ExecutionStatus implements IExecutionStatus { + /** Represents an IcebergOptions. */ + class IcebergOptions implements IIcebergOptions { /** - * Constructs a new ExecutionStatus. + * Constructs a new IcebergOptions. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.Task.IExecutionStatus); - - /** ExecutionStatus updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + constructor(properties?: google.cloud.dataplex.v1.StorageFormat.IIcebergOptions); - /** ExecutionStatus latestJob. */ - public latestJob?: (google.cloud.dataplex.v1.IJob|null); + /** IcebergOptions metadataLocation. */ + public metadataLocation: string; /** - * Creates a new ExecutionStatus instance using the specified properties. + * Creates a new IcebergOptions instance using the specified properties. * @param [properties] Properties to set - * @returns ExecutionStatus instance + * @returns IcebergOptions instance */ - public static create(properties?: google.cloud.dataplex.v1.Task.IExecutionStatus): google.cloud.dataplex.v1.Task.ExecutionStatus; + public static create(properties?: google.cloud.dataplex.v1.StorageFormat.IIcebergOptions): google.cloud.dataplex.v1.StorageFormat.IcebergOptions; /** - * Encodes the specified ExecutionStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionStatus.verify|verify} messages. - * @param message ExecutionStatus message or plain object to encode + * Encodes the specified IcebergOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.IcebergOptions.verify|verify} messages. + * @param message IcebergOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.Task.IExecutionStatus, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.StorageFormat.IIcebergOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExecutionStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionStatus.verify|verify} messages. - * @param message ExecutionStatus message or plain object to encode + * Encodes the specified IcebergOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.IcebergOptions.verify|verify} messages. + * @param message IcebergOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.Task.IExecutionStatus, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.StorageFormat.IIcebergOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExecutionStatus message from the specified reader or buffer. + * Decodes an IcebergOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExecutionStatus + * @returns IcebergOptions * @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.dataplex.v1.Task.ExecutionStatus; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.StorageFormat.IcebergOptions; /** - * Decodes an ExecutionStatus message from the specified reader or buffer, length delimited. + * Decodes an IcebergOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExecutionStatus + * @returns IcebergOptions * @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.dataplex.v1.Task.ExecutionStatus; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.StorageFormat.IcebergOptions; /** - * Verifies an ExecutionStatus message. + * Verifies an IcebergOptions 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 ExecutionStatus message from a plain object. Also converts values to their respective internal types. + * Creates an IcebergOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExecutionStatus + * @returns IcebergOptions */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Task.ExecutionStatus; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.StorageFormat.IcebergOptions; /** - * Creates a plain object from an ExecutionStatus message. Also converts values to other types if specified. - * @param message ExecutionStatus + * Creates a plain object from an IcebergOptions message. Also converts values to other types if specified. + * @param message IcebergOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.Task.ExecutionStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.StorageFormat.IcebergOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExecutionStatus to JSON. + * Converts this IcebergOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ExecutionStatus + * Gets the default type url for IcebergOptions * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - } - - /** Properties of a Job. */ - interface IJob { - - /** Job name */ - name?: (string|null); - - /** Job uid */ - uid?: (string|null); - - /** Job startTime */ - startTime?: (google.protobuf.ITimestamp|null); - /** Job endTime */ - endTime?: (google.protobuf.ITimestamp|null); - - /** Job state */ - state?: (google.cloud.dataplex.v1.Job.State|keyof typeof google.cloud.dataplex.v1.Job.State|null); - - /** Job retryCount */ - retryCount?: (number|null); + /** Format enum. */ + enum Format { + FORMAT_UNSPECIFIED = 0, + PARQUET = 1, + AVRO = 2, + ORC = 3, + CSV = 100, + JSON = 101, + IMAGE = 200, + AUDIO = 201, + VIDEO = 202, + TEXT = 203, + TFRECORD = 204, + OTHER = 1000, + UNKNOWN = 1001 + } - /** Job service */ - service?: (google.cloud.dataplex.v1.Job.Service|keyof typeof google.cloud.dataplex.v1.Job.Service|null); + /** CompressionFormat enum. */ + enum CompressionFormat { + COMPRESSION_FORMAT_UNSPECIFIED = 0, + GZIP = 2, + BZIP2 = 3 + } + } - /** Job serviceJob */ - serviceJob?: (string|null); + /** Properties of a StorageAccess. */ + interface IStorageAccess { - /** Job message */ - message?: (string|null); + /** StorageAccess read */ + read?: (google.cloud.dataplex.v1.StorageAccess.AccessMode|keyof typeof google.cloud.dataplex.v1.StorageAccess.AccessMode|null); } - /** Represents a Job. */ - class Job implements IJob { + /** Represents a StorageAccess. */ + class StorageAccess implements IStorageAccess { /** - * Constructs a new Job. + * Constructs a new StorageAccess. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dataplex.v1.IJob); - - /** Job name. */ - public name: string; - - /** Job uid. */ - public uid: string; - - /** Job startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** Job endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** Job state. */ - public state: (google.cloud.dataplex.v1.Job.State|keyof typeof google.cloud.dataplex.v1.Job.State); - - /** Job retryCount. */ - public retryCount: number; - - /** Job service. */ - public service: (google.cloud.dataplex.v1.Job.Service|keyof typeof google.cloud.dataplex.v1.Job.Service); - - /** Job serviceJob. */ - public serviceJob: string; + constructor(properties?: google.cloud.dataplex.v1.IStorageAccess); - /** Job message. */ - public message: string; + /** StorageAccess read. */ + public read: (google.cloud.dataplex.v1.StorageAccess.AccessMode|keyof typeof google.cloud.dataplex.v1.StorageAccess.AccessMode); /** - * Creates a new Job instance using the specified properties. + * Creates a new StorageAccess instance using the specified properties. * @param [properties] Properties to set - * @returns Job instance + * @returns StorageAccess instance */ - public static create(properties?: google.cloud.dataplex.v1.IJob): google.cloud.dataplex.v1.Job; + public static create(properties?: google.cloud.dataplex.v1.IStorageAccess): google.cloud.dataplex.v1.StorageAccess; /** - * Encodes the specified Job message. Does not implicitly {@link google.cloud.dataplex.v1.Job.verify|verify} messages. - * @param message Job message or plain object to encode + * Encodes the specified StorageAccess message. Does not implicitly {@link google.cloud.dataplex.v1.StorageAccess.verify|verify} messages. + * @param message StorageAccess message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dataplex.v1.IJob, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dataplex.v1.IStorageAccess, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Job message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Job.verify|verify} messages. - * @param message Job message or plain object to encode + * Encodes the specified StorageAccess message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageAccess.verify|verify} messages. + * @param message StorageAccess message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dataplex.v1.IJob, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dataplex.v1.IStorageAccess, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Job message from the specified reader or buffer. + * Decodes a StorageAccess message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Job + * @returns StorageAccess * @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.dataplex.v1.Job; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dataplex.v1.StorageAccess; /** - * Decodes a Job message from the specified reader or buffer, length delimited. + * Decodes a StorageAccess message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Job + * @returns StorageAccess * @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.dataplex.v1.Job; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dataplex.v1.StorageAccess; /** - * Verifies a Job message. + * Verifies a StorageAccess 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 Job message from a plain object. Also converts values to their respective internal types. + * Creates a StorageAccess message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Job + * @returns StorageAccess */ - public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.Job; + public static fromObject(object: { [k: string]: any }): google.cloud.dataplex.v1.StorageAccess; /** - * Creates a plain object from a Job message. Also converts values to other types if specified. - * @param message Job + * Creates a plain object from a StorageAccess message. Also converts values to other types if specified. + * @param message StorageAccess * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dataplex.v1.Job, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dataplex.v1.StorageAccess, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Job to JSON. + * Converts this StorageAccess to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Job + * Gets the default type url for StorageAccess * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Job { + namespace StorageAccess { - /** Service enum. */ - enum Service { - SERVICE_UNSPECIFIED = 0, - DATAPROC = 1 + /** AccessMode enum. */ + enum AccessMode { + ACCESS_MODE_UNSPECIFIED = 0, + DIRECT = 1, + MANAGED = 2 } + } - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - RUNNING = 1, - CANCELLING = 2, - CANCELLED = 3, - SUCCEEDED = 4, - FAILED = 5, - ABORTED = 6 - } + /** StorageSystem enum. */ + enum StorageSystem { + STORAGE_SYSTEM_UNSPECIFIED = 0, + CLOUD_STORAGE = 1, + BIGQUERY = 2 } } } diff --git a/packages/google-cloud-dataplex/protos/protos.js b/packages/google-cloud-dataplex/protos/protos.js index 1f60fc2e3f3..a91b6580b61 100644 --- a/packages/google-cloud-dataplex/protos/protos.js +++ b/packages/google-cloud-dataplex/protos/protos.js @@ -10762,6 +10762,7 @@ * @interface IResourceSpec * @property {string|null} [name] ResourceSpec name * @property {google.cloud.dataplex.v1.Asset.ResourceSpec.Type|null} [type] ResourceSpec type + * @property {google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode|null} [readAccessMode] ResourceSpec readAccessMode */ /** @@ -10795,6 +10796,14 @@ */ ResourceSpec.prototype.type = 0; + /** + * ResourceSpec readAccessMode. + * @member {google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode} readAccessMode + * @memberof google.cloud.dataplex.v1.Asset.ResourceSpec + * @instance + */ + ResourceSpec.prototype.readAccessMode = 0; + /** * Creates a new ResourceSpec instance using the specified properties. * @function create @@ -10823,6 +10832,8 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.readAccessMode != null && Object.hasOwnProperty.call(message, "readAccessMode")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.readAccessMode); return writer; }; @@ -10865,6 +10876,10 @@ message.type = reader.int32(); break; } + case 5: { + message.readAccessMode = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -10912,6 +10927,15 @@ case 2: break; } + if (message.readAccessMode != null && message.hasOwnProperty("readAccessMode")) + switch (message.readAccessMode) { + default: + return "readAccessMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -10949,6 +10973,26 @@ message.type = 2; break; } + switch (object.readAccessMode) { + default: + if (typeof object.readAccessMode === "number") { + message.readAccessMode = object.readAccessMode; + break; + } + break; + case "ACCESS_MODE_UNSPECIFIED": + case 0: + message.readAccessMode = 0; + break; + case "DIRECT": + case 1: + message.readAccessMode = 1; + break; + case "MANAGED": + case 2: + message.readAccessMode = 2; + break; + } return message; }; @@ -10968,11 +11012,14 @@ if (options.defaults) { object.name = ""; object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.readAccessMode = options.enums === String ? "ACCESS_MODE_UNSPECIFIED" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.type != null && message.hasOwnProperty("type")) object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Asset.ResourceSpec.Type[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.Asset.ResourceSpec.Type[message.type] : message.type; + if (message.readAccessMode != null && message.hasOwnProperty("readAccessMode")) + object.readAccessMode = options.enums === String ? $root.google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode[message.readAccessMode] === undefined ? message.readAccessMode : $root.google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode[message.readAccessMode] : message.readAccessMode; return object; }; @@ -11018,6 +11065,22 @@ return values; })(); + /** + * AccessMode enum. + * @name google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode + * @enum {number} + * @property {number} ACCESS_MODE_UNSPECIFIED=0 ACCESS_MODE_UNSPECIFIED value + * @property {number} DIRECT=1 DIRECT value + * @property {number} MANAGED=2 MANAGED value + */ + ResourceSpec.AccessMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACCESS_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DIRECT"] = 1; + values[valuesById[2] = "MANAGED"] = 2; + return values; + })(); + return ResourceSpec; })(); @@ -11030,6 +11093,7 @@ * @property {google.cloud.dataplex.v1.Asset.ResourceStatus.State|null} [state] ResourceStatus state * @property {string|null} [message] ResourceStatus message * @property {google.protobuf.ITimestamp|null} [updateTime] ResourceStatus updateTime + * @property {string|null} [managedAccessIdentity] ResourceStatus managedAccessIdentity */ /** @@ -11071,6 +11135,14 @@ */ ResourceStatus.prototype.updateTime = null; + /** + * ResourceStatus managedAccessIdentity. + * @member {string} managedAccessIdentity + * @memberof google.cloud.dataplex.v1.Asset.ResourceStatus + * @instance + */ + ResourceStatus.prototype.managedAccessIdentity = ""; + /** * Creates a new ResourceStatus instance using the specified properties. * @function create @@ -11101,6 +11173,8 @@ writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.managedAccessIdentity != null && Object.hasOwnProperty.call(message, "managedAccessIdentity")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.managedAccessIdentity); return writer; }; @@ -11147,6 +11221,10 @@ message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } + case 4: { + message.managedAccessIdentity = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -11199,6 +11277,9 @@ if (error) return "updateTime." + error; } + if (message.managedAccessIdentity != null && message.hasOwnProperty("managedAccessIdentity")) + if (!$util.isString(message.managedAccessIdentity)) + return "managedAccessIdentity: string expected"; return null; }; @@ -11241,6 +11322,8 @@ throw TypeError(".google.cloud.dataplex.v1.Asset.ResourceStatus.updateTime: object expected"); message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } + if (object.managedAccessIdentity != null) + message.managedAccessIdentity = String(object.managedAccessIdentity); return message; }; @@ -11261,6 +11344,7 @@ object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; object.message = ""; object.updateTime = null; + object.managedAccessIdentity = ""; } if (message.state != null && message.hasOwnProperty("state")) object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Asset.ResourceStatus.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.Asset.ResourceStatus.State[message.state] : message.state; @@ -11268,6 +11352,8 @@ object.message = message.message; if (message.updateTime != null && message.hasOwnProperty("updateTime")) object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.managedAccessIdentity != null && message.hasOwnProperty("managedAccessIdentity")) + object.managedAccessIdentity = message.managedAccessIdentity; return object; }; @@ -17053,6 +17139,7 @@ * @memberof google.cloud.dataplex.v1 * @interface IDataSource * @property {string|null} [entity] DataSource entity + * @property {string|null} [resource] DataSource resource */ /** @@ -17078,17 +17165,25 @@ */ DataSource.prototype.entity = null; + /** + * DataSource resource. + * @member {string|null|undefined} resource + * @memberof google.cloud.dataplex.v1.DataSource + * @instance + */ + DataSource.prototype.resource = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * DataSource source. - * @member {"entity"|undefined} source + * @member {"entity"|"resource"|undefined} source * @memberof google.cloud.dataplex.v1.DataSource * @instance */ Object.defineProperty(DataSource.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["entity"]), + get: $util.oneOfGetter($oneOfFields = ["entity", "resource"]), set: $util.oneOfSetter($oneOfFields) }); @@ -17118,6 +17213,8 @@ writer = $Writer.create(); if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) writer.uint32(/* id 100, wireType 2 =*/802).string(message.entity); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.resource); return writer; }; @@ -17156,6 +17253,10 @@ message.entity = reader.string(); break; } + case 101: { + message.resource = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -17197,6 +17298,13 @@ if (!$util.isString(message.entity)) return "entity: string expected"; } + if (message.resource != null && message.hasOwnProperty("resource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + if (!$util.isString(message.resource)) + return "resource: string expected"; + } return null; }; @@ -17214,6 +17322,8 @@ var message = new $root.google.cloud.dataplex.v1.DataSource(); if (object.entity != null) message.entity = String(object.entity); + if (object.resource != null) + message.resource = String(object.resource); return message; }; @@ -17235,6 +17345,11 @@ if (options.oneofs) object.source = "entity"; } + if (message.resource != null && message.hasOwnProperty("resource")) { + object.resource = message.resource; + if (options.oneofs) + object.source = "resource"; + } return object; }; @@ -21587,6 +21702,7 @@ * @property {string|null} [parent] CreateDataScanRequest parent * @property {google.cloud.dataplex.v1.IDataScan|null} [dataScan] CreateDataScanRequest dataScan * @property {string|null} [dataScanId] CreateDataScanRequest dataScanId + * @property {boolean|null} [validateOnly] CreateDataScanRequest validateOnly */ /** @@ -21628,6 +21744,14 @@ */ CreateDataScanRequest.prototype.dataScanId = ""; + /** + * CreateDataScanRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateDataScanRequest + * @instance + */ + CreateDataScanRequest.prototype.validateOnly = false; + /** * Creates a new CreateDataScanRequest instance using the specified properties. * @function create @@ -21658,6 +21782,8 @@ $root.google.cloud.dataplex.v1.DataScan.encode(message.dataScan, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.dataScanId != null && Object.hasOwnProperty.call(message, "dataScanId")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.dataScanId); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); return writer; }; @@ -21704,6 +21830,10 @@ message.dataScanId = reader.string(); break; } + case 4: { + message.validateOnly = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -21750,6 +21880,9 @@ if (message.dataScanId != null && message.hasOwnProperty("dataScanId")) if (!$util.isString(message.dataScanId)) return "dataScanId: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; @@ -21774,6 +21907,8 @@ } if (object.dataScanId != null) message.dataScanId = String(object.dataScanId); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; @@ -21794,6 +21929,7 @@ object.parent = ""; object.dataScan = null; object.dataScanId = ""; + object.validateOnly = false; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; @@ -21801,6 +21937,8 @@ object.dataScan = $root.google.cloud.dataplex.v1.DataScan.toObject(message.dataScan, options); if (message.dataScanId != null && message.hasOwnProperty("dataScanId")) object.dataScanId = message.dataScanId; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; @@ -21841,6 +21979,7 @@ * @interface IUpdateDataScanRequest * @property {google.cloud.dataplex.v1.IDataScan|null} [dataScan] UpdateDataScanRequest dataScan * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDataScanRequest updateMask + * @property {boolean|null} [validateOnly] UpdateDataScanRequest validateOnly */ /** @@ -21874,6 +22013,14 @@ */ UpdateDataScanRequest.prototype.updateMask = null; + /** + * UpdateDataScanRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateDataScanRequest + * @instance + */ + UpdateDataScanRequest.prototype.validateOnly = false; + /** * Creates a new UpdateDataScanRequest instance using the specified properties. * @function create @@ -21902,6 +22049,8 @@ $root.google.cloud.dataplex.v1.DataScan.encode(message.dataScan, 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(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); return writer; }; @@ -21944,6 +22093,10 @@ message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } + case 3: { + message.validateOnly = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -21989,6 +22142,9 @@ if (error) return "updateMask." + error; } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; @@ -22014,6 +22170,8 @@ throw TypeError(".google.cloud.dataplex.v1.UpdateDataScanRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; @@ -22033,11 +22191,14 @@ if (options.defaults) { object.dataScan = null; object.updateMask = null; + object.validateOnly = false; } if (message.dataScan != null && message.hasOwnProperty("dataScan")) object.dataScan = $root.google.cloud.dataplex.v1.DataScan.toObject(message.dataScan, options); if (message.updateMask != null && message.hasOwnProperty("updateMask")) object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; @@ -26147,1789 +26308,1269 @@ return values; })(); - v1.DiscoveryEvent = (function() { + v1.DataplexService = (function() { /** - * Properties of a DiscoveryEvent. + * Constructs a new DataplexService service. * @memberof google.cloud.dataplex.v1 - * @interface IDiscoveryEvent - * @property {string|null} [message] DiscoveryEvent message - * @property {string|null} [lakeId] DiscoveryEvent lakeId - * @property {string|null} [zoneId] DiscoveryEvent zoneId - * @property {string|null} [assetId] DiscoveryEvent assetId - * @property {string|null} [dataLocation] DiscoveryEvent dataLocation - * @property {google.cloud.dataplex.v1.DiscoveryEvent.EventType|null} [type] DiscoveryEvent type - * @property {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null} [config] DiscoveryEvent config - * @property {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null} [entity] DiscoveryEvent entity - * @property {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null} [partition] DiscoveryEvent partition - * @property {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null} [action] DiscoveryEvent action + * @classdesc Represents a DataplexService + * @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 DataplexService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (DataplexService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DataplexService; /** - * Constructs a new DiscoveryEvent. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DiscoveryEvent. - * @implements IDiscoveryEvent - * @constructor - * @param {google.cloud.dataplex.v1.IDiscoveryEvent=} [properties] Properties to set + * Creates new DataplexService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dataplex.v1.DataplexService + * @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 {DataplexService} RPC service. Useful where requests and/or responses are streamed. */ - function DiscoveryEvent(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]]; - } + DataplexService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * DiscoveryEvent message. - * @member {string} message - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createLake}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef CreateLakeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateLake. + * @function createLake + * @memberof google.cloud.dataplex.v1.DataplexService * @instance + * @param {google.cloud.dataplex.v1.ICreateLakeRequest} request CreateLakeRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.CreateLakeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - DiscoveryEvent.prototype.message = ""; + Object.defineProperty(DataplexService.prototype.createLake = function createLake(request, callback) { + return this.rpcCall(createLake, $root.google.cloud.dataplex.v1.CreateLakeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateLake" }); /** - * DiscoveryEvent lakeId. - * @member {string} lakeId - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * Calls CreateLake. + * @function createLake + * @memberof google.cloud.dataplex.v1.DataplexService * @instance + * @param {google.cloud.dataplex.v1.ICreateLakeRequest} request CreateLakeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - DiscoveryEvent.prototype.lakeId = ""; /** - * DiscoveryEvent zoneId. - * @member {string} zoneId - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateLake}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef UpdateLakeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateLake. + * @function updateLake + * @memberof google.cloud.dataplex.v1.DataplexService * @instance + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} request UpdateLakeRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.UpdateLakeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - DiscoveryEvent.prototype.zoneId = ""; + Object.defineProperty(DataplexService.prototype.updateLake = function updateLake(request, callback) { + return this.rpcCall(updateLake, $root.google.cloud.dataplex.v1.UpdateLakeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateLake" }); /** - * DiscoveryEvent assetId. - * @member {string} assetId - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * Calls UpdateLake. + * @function updateLake + * @memberof google.cloud.dataplex.v1.DataplexService * @instance + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} request UpdateLakeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - DiscoveryEvent.prototype.assetId = ""; /** - * DiscoveryEvent dataLocation. - * @member {string} dataLocation - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteLake}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef DeleteLakeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteLake. + * @function deleteLake + * @memberof google.cloud.dataplex.v1.DataplexService * @instance + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} request DeleteLakeRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.DeleteLakeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - DiscoveryEvent.prototype.dataLocation = ""; + Object.defineProperty(DataplexService.prototype.deleteLake = function deleteLake(request, callback) { + return this.rpcCall(deleteLake, $root.google.cloud.dataplex.v1.DeleteLakeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteLake" }); /** - * DiscoveryEvent type. - * @member {google.cloud.dataplex.v1.DiscoveryEvent.EventType} type - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * Calls DeleteLake. + * @function deleteLake + * @memberof google.cloud.dataplex.v1.DataplexService * @instance + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} request DeleteLakeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - DiscoveryEvent.prototype.type = 0; /** - * DiscoveryEvent config. - * @member {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null|undefined} config - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listLakes}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListLakesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListLakesResponse} [response] ListLakesResponse + */ + + /** + * Calls ListLakes. + * @function listLakes + * @memberof google.cloud.dataplex.v1.DataplexService * @instance + * @param {google.cloud.dataplex.v1.IListLakesRequest} request ListLakesRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListLakesCallback} callback Node-style callback called with the error, if any, and ListLakesResponse + * @returns {undefined} + * @variation 1 */ - DiscoveryEvent.prototype.config = null; + Object.defineProperty(DataplexService.prototype.listLakes = function listLakes(request, callback) { + return this.rpcCall(listLakes, $root.google.cloud.dataplex.v1.ListLakesRequest, $root.google.cloud.dataplex.v1.ListLakesResponse, request, callback); + }, "name", { value: "ListLakes" }); /** - * DiscoveryEvent entity. - * @member {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null|undefined} entity - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * Calls ListLakes. + * @function listLakes + * @memberof google.cloud.dataplex.v1.DataplexService * @instance + * @param {google.cloud.dataplex.v1.IListLakesRequest} request ListLakesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - DiscoveryEvent.prototype.entity = null; /** - * DiscoveryEvent partition. - * @member {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null|undefined} partition - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getLake}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef GetLakeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Lake} [response] Lake + */ + + /** + * Calls GetLake. + * @function getLake + * @memberof google.cloud.dataplex.v1.DataplexService * @instance + * @param {google.cloud.dataplex.v1.IGetLakeRequest} request GetLakeRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.GetLakeCallback} callback Node-style callback called with the error, if any, and Lake + * @returns {undefined} + * @variation 1 */ - DiscoveryEvent.prototype.partition = null; + Object.defineProperty(DataplexService.prototype.getLake = function getLake(request, callback) { + return this.rpcCall(getLake, $root.google.cloud.dataplex.v1.GetLakeRequest, $root.google.cloud.dataplex.v1.Lake, request, callback); + }, "name", { value: "GetLake" }); /** - * DiscoveryEvent action. - * @member {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null|undefined} action - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * Calls GetLake. + * @function getLake + * @memberof google.cloud.dataplex.v1.DataplexService * @instance + * @param {google.cloud.dataplex.v1.IGetLakeRequest} request GetLakeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - DiscoveryEvent.prototype.action = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listLakeActions}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListLakeActionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListActionsResponse} [response] ListActionsResponse + */ /** - * DiscoveryEvent details. - * @member {"config"|"entity"|"partition"|"action"|undefined} details - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * Calls ListLakeActions. + * @function listLakeActions + * @memberof google.cloud.dataplex.v1.DataplexService * @instance + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} request ListLakeActionsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListLakeActionsCallback} callback Node-style callback called with the error, if any, and ListActionsResponse + * @returns {undefined} + * @variation 1 */ - Object.defineProperty(DiscoveryEvent.prototype, "details", { - get: $util.oneOfGetter($oneOfFields = ["config", "entity", "partition", "action"]), - set: $util.oneOfSetter($oneOfFields) - }); + Object.defineProperty(DataplexService.prototype.listLakeActions = function listLakeActions(request, callback) { + return this.rpcCall(listLakeActions, $root.google.cloud.dataplex.v1.ListLakeActionsRequest, $root.google.cloud.dataplex.v1.ListActionsResponse, request, callback); + }, "name", { value: "ListLakeActions" }); /** - * Creates a new DiscoveryEvent instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @static - * @param {google.cloud.dataplex.v1.IDiscoveryEvent=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent instance + * Calls ListLakeActions. + * @function listLakeActions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} request ListLakeActionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - DiscoveryEvent.create = function create(properties) { - return new DiscoveryEvent(properties); - }; /** - * Encodes the specified DiscoveryEvent message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @static - * @param {google.cloud.dataplex.v1.IDiscoveryEvent} message DiscoveryEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createZone}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef CreateZoneCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - DiscoveryEvent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); - if (message.lakeId != null && Object.hasOwnProperty.call(message, "lakeId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.lakeId); - if (message.zoneId != null && Object.hasOwnProperty.call(message, "zoneId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.zoneId); - if (message.assetId != null && Object.hasOwnProperty.call(message, "assetId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.assetId); - if (message.dataLocation != null && Object.hasOwnProperty.call(message, "dataLocation")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.dataLocation); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.type); - if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.encode(message.config, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) - $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.encode(message.entity, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) - $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.encode(message.partition, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.encode(message.action, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - return writer; - }; /** - * Encodes the specified DiscoveryEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @static - * @param {google.cloud.dataplex.v1.IDiscoveryEvent} message DiscoveryEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls CreateZone. + * @function createZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateZoneRequest} request CreateZoneRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.CreateZoneCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - DiscoveryEvent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(DataplexService.prototype.createZone = function createZone(request, callback) { + return this.rpcCall(createZone, $root.google.cloud.dataplex.v1.CreateZoneRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateZone" }); /** - * Decodes a DiscoveryEvent message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CreateZone. + * @function createZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateZoneRequest} request CreateZoneRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - DiscoveryEvent.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.message = reader.string(); - break; - } - case 2: { - message.lakeId = reader.string(); - break; - } - case 3: { - message.zoneId = reader.string(); - break; - } - case 4: { - message.assetId = reader.string(); - break; - } - case 5: { - message.dataLocation = reader.string(); - break; - } - case 10: { - message.type = reader.int32(); - break; - } - case 20: { - message.config = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.decode(reader, reader.uint32()); - break; - } - case 21: { - message.entity = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.decode(reader, reader.uint32()); - break; - } - case 22: { - message.partition = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.decode(reader, reader.uint32()); - break; - } - case 23: { - message.action = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a DiscoveryEvent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateZone}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef UpdateZoneCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - DiscoveryEvent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a DiscoveryEvent message. - * @function verify - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls UpdateZone. + * @function updateZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} request UpdateZoneRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.UpdateZoneCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - DiscoveryEvent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.lakeId != null && message.hasOwnProperty("lakeId")) - if (!$util.isString(message.lakeId)) - return "lakeId: string expected"; - if (message.zoneId != null && message.hasOwnProperty("zoneId")) - if (!$util.isString(message.zoneId)) - return "zoneId: string expected"; - if (message.assetId != null && message.hasOwnProperty("assetId")) - if (!$util.isString(message.assetId)) - return "assetId: string expected"; - if (message.dataLocation != null && message.hasOwnProperty("dataLocation")) - if (!$util.isString(message.dataLocation)) - return "dataLocation: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.config != null && message.hasOwnProperty("config")) { - properties.details = 1; - { - var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify(message.config); - if (error) - return "config." + error; - } - } - if (message.entity != null && message.hasOwnProperty("entity")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify(message.entity); - if (error) - return "entity." + error; - } - } - if (message.partition != null && message.hasOwnProperty("partition")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify(message.partition); - if (error) - return "partition." + error; - } - } - if (message.action != null && message.hasOwnProperty("action")) { - if (properties.details === 1) - return "details: multiple values"; - properties.details = 1; - { - var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify(message.action); - if (error) - return "action." + error; - } - } - return null; - }; + Object.defineProperty(DataplexService.prototype.updateZone = function updateZone(request, callback) { + return this.rpcCall(updateZone, $root.google.cloud.dataplex.v1.UpdateZoneRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateZone" }); /** - * Creates a DiscoveryEvent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent + * Calls UpdateZone. + * @function updateZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} request UpdateZoneRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - DiscoveryEvent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent) - return object; - var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent(); - if (object.message != null) - message.message = String(object.message); - if (object.lakeId != null) - message.lakeId = String(object.lakeId); - if (object.zoneId != null) - message.zoneId = String(object.zoneId); - if (object.assetId != null) - message.assetId = String(object.assetId); - if (object.dataLocation != null) - message.dataLocation = String(object.dataLocation); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "EVENT_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "CONFIG": - case 1: - message.type = 1; - break; - case "ENTITY_CREATED": - case 2: - message.type = 2; - break; - case "ENTITY_UPDATED": - case 3: - message.type = 3; - break; - case "ENTITY_DELETED": - case 4: - message.type = 4; - break; - case "PARTITION_CREATED": - case 5: - message.type = 5; - break; - case "PARTITION_UPDATED": - case 6: - message.type = 6; - break; - case "PARTITION_DELETED": - case 7: - message.type = 7; - break; - } - if (object.config != null) { - if (typeof object.config !== "object") - throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.config: object expected"); - message.config = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.fromObject(object.config); - } - if (object.entity != null) { - if (typeof object.entity !== "object") - throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.entity: object expected"); - message.entity = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.fromObject(object.entity); - } - if (object.partition != null) { - if (typeof object.partition !== "object") - throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.partition: object expected"); - message.partition = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.fromObject(object.partition); - } - if (object.action != null) { - if (typeof object.action !== "object") - throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.action: object expected"); - message.action = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.fromObject(object.action); - } - return message; - }; /** - * Creates a plain object from a DiscoveryEvent message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent} message DiscoveryEvent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteZone}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef DeleteZoneCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - DiscoveryEvent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.message = ""; - object.lakeId = ""; - object.zoneId = ""; - object.assetId = ""; - object.dataLocation = ""; - object.type = options.enums === String ? "EVENT_TYPE_UNSPECIFIED" : 0; - } - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.lakeId != null && message.hasOwnProperty("lakeId")) - object.lakeId = message.lakeId; - if (message.zoneId != null && message.hasOwnProperty("zoneId")) - object.zoneId = message.zoneId; - if (message.assetId != null && message.hasOwnProperty("assetId")) - object.assetId = message.assetId; - if (message.dataLocation != null && message.hasOwnProperty("dataLocation")) - object.dataLocation = message.dataLocation; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.EventType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.DiscoveryEvent.EventType[message.type] : message.type; - if (message.config != null && message.hasOwnProperty("config")) { - object.config = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.toObject(message.config, options); - if (options.oneofs) - object.details = "config"; - } - if (message.entity != null && message.hasOwnProperty("entity")) { - object.entity = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.toObject(message.entity, options); - if (options.oneofs) - object.details = "entity"; - } - if (message.partition != null && message.hasOwnProperty("partition")) { - object.partition = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.toObject(message.partition, options); - if (options.oneofs) - object.details = "partition"; - } - if (message.action != null && message.hasOwnProperty("action")) { - object.action = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.toObject(message.action, options); - if (options.oneofs) - object.details = "action"; - } - return object; - }; /** - * Converts this DiscoveryEvent to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * Calls DeleteZone. + * @function deleteZone + * @memberof google.cloud.dataplex.v1.DataplexService * @instance - * @returns {Object.} JSON object + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} request DeleteZoneRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.DeleteZoneCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - DiscoveryEvent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(DataplexService.prototype.deleteZone = function deleteZone(request, callback) { + return this.rpcCall(deleteZone, $root.google.cloud.dataplex.v1.DeleteZoneRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteZone" }); /** - * Gets the default type url for DiscoveryEvent - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Calls DeleteZone. + * @function deleteZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} request DeleteZoneRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - DiscoveryEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent"; - }; /** - * EventType enum. - * @name google.cloud.dataplex.v1.DiscoveryEvent.EventType - * @enum {number} - * @property {number} EVENT_TYPE_UNSPECIFIED=0 EVENT_TYPE_UNSPECIFIED value - * @property {number} CONFIG=1 CONFIG value - * @property {number} ENTITY_CREATED=2 ENTITY_CREATED value - * @property {number} ENTITY_UPDATED=3 ENTITY_UPDATED value - * @property {number} ENTITY_DELETED=4 ENTITY_DELETED value - * @property {number} PARTITION_CREATED=5 PARTITION_CREATED value - * @property {number} PARTITION_UPDATED=6 PARTITION_UPDATED value - * @property {number} PARTITION_DELETED=7 PARTITION_DELETED value + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listZones}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListZonesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListZonesResponse} [response] ListZonesResponse */ - DiscoveryEvent.EventType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EVENT_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CONFIG"] = 1; - values[valuesById[2] = "ENTITY_CREATED"] = 2; - values[valuesById[3] = "ENTITY_UPDATED"] = 3; - values[valuesById[4] = "ENTITY_DELETED"] = 4; - values[valuesById[5] = "PARTITION_CREATED"] = 5; - values[valuesById[6] = "PARTITION_UPDATED"] = 6; - values[valuesById[7] = "PARTITION_DELETED"] = 7; - return values; - })(); /** - * EntityType enum. - * @name google.cloud.dataplex.v1.DiscoveryEvent.EntityType - * @enum {number} - * @property {number} ENTITY_TYPE_UNSPECIFIED=0 ENTITY_TYPE_UNSPECIFIED value - * @property {number} TABLE=1 TABLE value - * @property {number} FILESET=2 FILESET value + * Calls ListZones. + * @function listZones + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListZonesRequest} request ListZonesRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListZonesCallback} callback Node-style callback called with the error, if any, and ListZonesResponse + * @returns {undefined} + * @variation 1 */ - DiscoveryEvent.EntityType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENTITY_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "TABLE"] = 1; - values[valuesById[2] = "FILESET"] = 2; - return values; - })(); + Object.defineProperty(DataplexService.prototype.listZones = function listZones(request, callback) { + return this.rpcCall(listZones, $root.google.cloud.dataplex.v1.ListZonesRequest, $root.google.cloud.dataplex.v1.ListZonesResponse, request, callback); + }, "name", { value: "ListZones" }); - DiscoveryEvent.ConfigDetails = (function() { + /** + * Calls ListZones. + * @function listZones + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListZonesRequest} request ListZonesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Properties of a ConfigDetails. - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @interface IConfigDetails - * @property {Object.|null} [parameters] ConfigDetails parameters - */ + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getZone}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef GetZoneCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Zone} [response] Zone + */ - /** - * Constructs a new ConfigDetails. - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @classdesc Represents a ConfigDetails. - * @implements IConfigDetails - * @constructor - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails=} [properties] Properties to set - */ - function ConfigDetails(properties) { - this.parameters = {}; - 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]]; - } + /** + * Calls GetZone. + * @function getZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetZoneRequest} request GetZoneRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.GetZoneCallback} callback Node-style callback called with the error, if any, and Zone + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.getZone = function getZone(request, callback) { + return this.rpcCall(getZone, $root.google.cloud.dataplex.v1.GetZoneRequest, $root.google.cloud.dataplex.v1.Zone, request, callback); + }, "name", { value: "GetZone" }); - /** - * ConfigDetails parameters. - * @member {Object.} parameters - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails - * @instance - */ - ConfigDetails.prototype.parameters = $util.emptyObject; + /** + * Calls GetZone. + * @function getZone + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetZoneRequest} request GetZoneRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Creates a new ConfigDetails instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails instance - */ - ConfigDetails.create = function create(properties) { - return new ConfigDetails(properties); - }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listZoneActions}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListZoneActionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListActionsResponse} [response] ListActionsResponse + */ - /** - * Encodes the specified ConfigDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails} message ConfigDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfigDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) - for (var keys = Object.keys(message.parameters), 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.parameters[keys[i]]).ldelim(); - return writer; - }; + /** + * Calls ListZoneActions. + * @function listZoneActions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} request ListZoneActionsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListZoneActionsCallback} callback Node-style callback called with the error, if any, and ListActionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listZoneActions = function listZoneActions(request, callback) { + return this.rpcCall(listZoneActions, $root.google.cloud.dataplex.v1.ListZoneActionsRequest, $root.google.cloud.dataplex.v1.ListActionsResponse, request, callback); + }, "name", { value: "ListZoneActions" }); - /** - * Encodes the specified ConfigDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails} message ConfigDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfigDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Calls ListZoneActions. + * @function listZoneActions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} request ListZoneActionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Decodes a ConfigDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfigDetails.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (message.parameters === $util.emptyObject) - message.parameters = {}; - 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.parameters[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createAsset}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef CreateAssetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * Decodes a ConfigDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfigDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Calls CreateAsset. + * @function createAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateAssetRequest} request CreateAssetRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.CreateAssetCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.createAsset = function createAsset(request, callback) { + return this.rpcCall(createAsset, $root.google.cloud.dataplex.v1.CreateAssetRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateAsset" }); - /** - * Verifies a ConfigDetails message. - * @function verify - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConfigDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parameters != null && message.hasOwnProperty("parameters")) { - if (!$util.isObject(message.parameters)) - return "parameters: object expected"; - var key = Object.keys(message.parameters); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.parameters[key[i]])) - return "parameters: string{k:string} expected"; - } - return null; - }; + /** + * Calls CreateAsset. + * @function createAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateAssetRequest} request CreateAssetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Creates a ConfigDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails - */ - ConfigDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails) - return object; - var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails(); - if (object.parameters) { - if (typeof object.parameters !== "object") - throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.parameters: object expected"); - message.parameters = {}; - for (var keys = Object.keys(object.parameters), i = 0; i < keys.length; ++i) - message.parameters[keys[i]] = String(object.parameters[keys[i]]); - } - return message; - }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateAsset}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef UpdateAssetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * Creates a plain object from a ConfigDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} message ConfigDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConfigDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.parameters = {}; - var keys2; - if (message.parameters && (keys2 = Object.keys(message.parameters)).length) { - object.parameters = {}; - for (var j = 0; j < keys2.length; ++j) - object.parameters[keys2[j]] = message.parameters[keys2[j]]; - } - return object; - }; + /** + * Calls UpdateAsset. + * @function updateAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} request UpdateAssetRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.UpdateAssetCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.updateAsset = function updateAsset(request, callback) { + return this.rpcCall(updateAsset, $root.google.cloud.dataplex.v1.UpdateAssetRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateAsset" }); - /** - * Converts this ConfigDetails to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails - * @instance - * @returns {Object.} JSON object - */ - ConfigDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Calls UpdateAsset. + * @function updateAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} request UpdateAssetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Gets the default type url for ConfigDetails - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConfigDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails"; - }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteAsset}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef DeleteAssetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - return ConfigDetails; - })(); + /** + * Calls DeleteAsset. + * @function deleteAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} request DeleteAssetRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.DeleteAssetCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.deleteAsset = function deleteAsset(request, callback) { + return this.rpcCall(deleteAsset, $root.google.cloud.dataplex.v1.DeleteAssetRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteAsset" }); - DiscoveryEvent.EntityDetails = (function() { + /** + * Calls DeleteAsset. + * @function deleteAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} request DeleteAssetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Properties of an EntityDetails. - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @interface IEntityDetails - * @property {string|null} [entity] EntityDetails entity - * @property {google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null} [type] EntityDetails type - */ + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listAssets}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListAssetsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListAssetsResponse} [response] ListAssetsResponse + */ - /** - * Constructs a new EntityDetails. - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @classdesc Represents an EntityDetails. - * @implements IEntityDetails - * @constructor - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails=} [properties] Properties to set - */ - function EntityDetails(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]]; - } + /** + * Calls ListAssets. + * @function listAssets + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListAssetsRequest} request ListAssetsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListAssetsCallback} callback Node-style callback called with the error, if any, and ListAssetsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listAssets = function listAssets(request, callback) { + return this.rpcCall(listAssets, $root.google.cloud.dataplex.v1.ListAssetsRequest, $root.google.cloud.dataplex.v1.ListAssetsResponse, request, callback); + }, "name", { value: "ListAssets" }); - /** - * EntityDetails entity. - * @member {string} entity - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @instance - */ - EntityDetails.prototype.entity = ""; + /** + * Calls ListAssets. + * @function listAssets + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListAssetsRequest} request ListAssetsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * EntityDetails type. - * @member {google.cloud.dataplex.v1.DiscoveryEvent.EntityType} type - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @instance - */ - EntityDetails.prototype.type = 0; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getAsset}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef GetAssetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Asset} [response] Asset + */ - /** - * Creates a new EntityDetails instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails instance - */ - EntityDetails.create = function create(properties) { - return new EntityDetails(properties); - }; + /** + * Calls GetAsset. + * @function getAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetAssetRequest} request GetAssetRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.GetAssetCallback} callback Node-style callback called with the error, if any, and Asset + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.getAsset = function getAsset(request, callback) { + return this.rpcCall(getAsset, $root.google.cloud.dataplex.v1.GetAssetRequest, $root.google.cloud.dataplex.v1.Asset, request, callback); + }, "name", { value: "GetAsset" }); - /** - * Encodes the specified EntityDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails} message EntityDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EntityDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.entity); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - return writer; - }; + /** + * Calls GetAsset. + * @function getAsset + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetAssetRequest} request GetAssetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Encodes the specified EntityDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails} message EntityDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EntityDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listAssetActions}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListAssetActionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListActionsResponse} [response] ListActionsResponse + */ - /** - * Decodes an EntityDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EntityDetails.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.entity = reader.string(); - break; - } - case 2: { - message.type = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Calls ListAssetActions. + * @function listAssetActions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} request ListAssetActionsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListAssetActionsCallback} callback Node-style callback called with the error, if any, and ListActionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listAssetActions = function listAssetActions(request, callback) { + return this.rpcCall(listAssetActions, $root.google.cloud.dataplex.v1.ListAssetActionsRequest, $root.google.cloud.dataplex.v1.ListActionsResponse, request, callback); + }, "name", { value: "ListAssetActions" }); - /** - * Decodes an EntityDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EntityDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Calls ListAssetActions. + * @function listAssetActions + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} request ListAssetActionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Verifies an EntityDetails message. - * @function verify - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EntityDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.entity != null && message.hasOwnProperty("entity")) - if (!$util.isString(message.entity)) - return "entity: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createTask}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef CreateTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * Creates an EntityDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails - */ - EntityDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails) - return object; - var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails(); - if (object.entity != null) - message.entity = String(object.entity); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "ENTITY_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "TABLE": - case 1: - message.type = 1; - break; - case "FILESET": - case 2: - message.type = 2; - break; - } - return message; - }; + /** + * Calls CreateTask. + * @function createTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateTaskRequest} request CreateTaskRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.CreateTaskCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.createTask = function createTask(request, callback) { + return this.rpcCall(createTask, $root.google.cloud.dataplex.v1.CreateTaskRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateTask" }); - /** - * Creates a plain object from an EntityDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} message EntityDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EntityDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.entity = ""; - object.type = options.enums === String ? "ENTITY_TYPE_UNSPECIFIED" : 0; - } - if (message.entity != null && message.hasOwnProperty("entity")) - object.entity = message.entity; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityType[message.type] : message.type; - return object; - }; + /** + * Calls CreateTask. + * @function createTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateTaskRequest} request CreateTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Converts this EntityDetails to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @instance - * @returns {Object.} JSON object - */ - EntityDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EntityDetails - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EntityDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails"; - }; - - return EntityDetails; - })(); + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateTask}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef UpdateTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - DiscoveryEvent.PartitionDetails = (function() { + /** + * Calls UpdateTask. + * @function updateTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} request UpdateTaskRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.UpdateTaskCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.updateTask = function updateTask(request, callback) { + return this.rpcCall(updateTask, $root.google.cloud.dataplex.v1.UpdateTaskRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateTask" }); - /** - * Properties of a PartitionDetails. - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @interface IPartitionDetails - * @property {string|null} [partition] PartitionDetails partition - * @property {string|null} [entity] PartitionDetails entity - * @property {google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null} [type] PartitionDetails type - * @property {Array.|null} [sampledDataLocations] PartitionDetails sampledDataLocations - */ + /** + * Calls UpdateTask. + * @function updateTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} request UpdateTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Constructs a new PartitionDetails. - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @classdesc Represents a PartitionDetails. - * @implements IPartitionDetails - * @constructor - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails=} [properties] Properties to set - */ - function PartitionDetails(properties) { - this.sampledDataLocations = []; - 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]]; - } + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteTask}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef DeleteTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * PartitionDetails partition. - * @member {string} partition - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @instance - */ - PartitionDetails.prototype.partition = ""; + /** + * Calls DeleteTask. + * @function deleteTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} request DeleteTaskRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.DeleteTaskCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.deleteTask = function deleteTask(request, callback) { + return this.rpcCall(deleteTask, $root.google.cloud.dataplex.v1.DeleteTaskRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteTask" }); - /** - * PartitionDetails entity. - * @member {string} entity - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @instance - */ - PartitionDetails.prototype.entity = ""; + /** + * Calls DeleteTask. + * @function deleteTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} request DeleteTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * PartitionDetails type. - * @member {google.cloud.dataplex.v1.DiscoveryEvent.EntityType} type - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @instance - */ - PartitionDetails.prototype.type = 0; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listTasks}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListTasksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListTasksResponse} [response] ListTasksResponse + */ - /** - * PartitionDetails sampledDataLocations. - * @member {Array.} sampledDataLocations - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @instance - */ - PartitionDetails.prototype.sampledDataLocations = $util.emptyArray; + /** + * Calls ListTasks. + * @function listTasks + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListTasksRequest} request ListTasksRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListTasksCallback} callback Node-style callback called with the error, if any, and ListTasksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listTasks = function listTasks(request, callback) { + return this.rpcCall(listTasks, $root.google.cloud.dataplex.v1.ListTasksRequest, $root.google.cloud.dataplex.v1.ListTasksResponse, request, callback); + }, "name", { value: "ListTasks" }); - /** - * Creates a new PartitionDetails instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails instance - */ - PartitionDetails.create = function create(properties) { - return new PartitionDetails(properties); - }; + /** + * Calls ListTasks. + * @function listTasks + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListTasksRequest} request ListTasksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Encodes the specified PartitionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails} message PartitionDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PartitionDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.partition); - if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.entity); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); - if (message.sampledDataLocations != null && message.sampledDataLocations.length) - for (var i = 0; i < message.sampledDataLocations.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.sampledDataLocations[i]); - return writer; - }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getTask}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef GetTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Task} [response] Task + */ - /** - * Encodes the specified PartitionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails} message PartitionDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PartitionDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Calls GetTask. + * @function getTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetTaskRequest} request GetTaskRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.GetTaskCallback} callback Node-style callback called with the error, if any, and Task + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.getTask = function getTask(request, callback) { + return this.rpcCall(getTask, $root.google.cloud.dataplex.v1.GetTaskRequest, $root.google.cloud.dataplex.v1.Task, request, callback); + }, "name", { value: "GetTask" }); - /** - * Decodes a PartitionDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PartitionDetails.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.partition = reader.string(); - break; - } - case 2: { - message.entity = reader.string(); - break; - } - case 3: { - message.type = reader.int32(); - break; - } - case 4: { - if (!(message.sampledDataLocations && message.sampledDataLocations.length)) - message.sampledDataLocations = []; - message.sampledDataLocations.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Calls GetTask. + * @function getTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetTaskRequest} request GetTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Decodes a PartitionDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PartitionDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listJobs}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListJobsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListJobsResponse} [response] ListJobsResponse + */ - /** - * Verifies a PartitionDetails message. - * @function verify - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PartitionDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.partition != null && message.hasOwnProperty("partition")) - if (!$util.isString(message.partition)) - return "partition: string expected"; - if (message.entity != null && message.hasOwnProperty("entity")) - if (!$util.isString(message.entity)) - return "entity: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.sampledDataLocations != null && message.hasOwnProperty("sampledDataLocations")) { - if (!Array.isArray(message.sampledDataLocations)) - return "sampledDataLocations: array expected"; - for (var i = 0; i < message.sampledDataLocations.length; ++i) - if (!$util.isString(message.sampledDataLocations[i])) - return "sampledDataLocations: string[] expected"; - } - return null; - }; + /** + * Calls ListJobs. + * @function listJobs + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListJobsRequest} request ListJobsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListJobsCallback} callback Node-style callback called with the error, if any, and ListJobsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listJobs = function listJobs(request, callback) { + return this.rpcCall(listJobs, $root.google.cloud.dataplex.v1.ListJobsRequest, $root.google.cloud.dataplex.v1.ListJobsResponse, request, callback); + }, "name", { value: "ListJobs" }); - /** - * Creates a PartitionDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails - */ - PartitionDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails) - return object; - var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails(); - if (object.partition != null) - message.partition = String(object.partition); - if (object.entity != null) - message.entity = String(object.entity); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "ENTITY_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "TABLE": - case 1: - message.type = 1; - break; - case "FILESET": - case 2: - message.type = 2; - break; - } - if (object.sampledDataLocations) { - if (!Array.isArray(object.sampledDataLocations)) - throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.sampledDataLocations: array expected"); - message.sampledDataLocations = []; - for (var i = 0; i < object.sampledDataLocations.length; ++i) - message.sampledDataLocations[i] = String(object.sampledDataLocations[i]); - } - return message; - }; + /** + * Calls ListJobs. + * @function listJobs + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListJobsRequest} request ListJobsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Creates a plain object from a PartitionDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} message PartitionDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PartitionDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.sampledDataLocations = []; - if (options.defaults) { - object.partition = ""; - object.entity = ""; - object.type = options.enums === String ? "ENTITY_TYPE_UNSPECIFIED" : 0; - } - if (message.partition != null && message.hasOwnProperty("partition")) - object.partition = message.partition; - if (message.entity != null && message.hasOwnProperty("entity")) - object.entity = message.entity; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityType[message.type] : message.type; - if (message.sampledDataLocations && message.sampledDataLocations.length) { - object.sampledDataLocations = []; - for (var j = 0; j < message.sampledDataLocations.length; ++j) - object.sampledDataLocations[j] = message.sampledDataLocations[j]; - } - return object; - }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|runTask}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef RunTaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.RunTaskResponse} [response] RunTaskResponse + */ - /** - * Converts this PartitionDetails to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @instance - * @returns {Object.} JSON object - */ - PartitionDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Calls RunTask. + * @function runTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IRunTaskRequest} request RunTaskRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.RunTaskCallback} callback Node-style callback called with the error, if any, and RunTaskResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.runTask = function runTask(request, callback) { + return this.rpcCall(runTask, $root.google.cloud.dataplex.v1.RunTaskRequest, $root.google.cloud.dataplex.v1.RunTaskResponse, request, callback); + }, "name", { value: "RunTask" }); - /** - * Gets the default type url for PartitionDetails - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PartitionDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails"; - }; + /** + * Calls RunTask. + * @function runTask + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IRunTaskRequest} request RunTaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - return PartitionDetails; - })(); + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getJob}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef GetJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Job} [response] Job + */ - DiscoveryEvent.ActionDetails = (function() { + /** + * Calls GetJob. + * @function getJob + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetJobRequest} request GetJobRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.GetJobCallback} callback Node-style callback called with the error, if any, and Job + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.getJob = function getJob(request, callback) { + return this.rpcCall(getJob, $root.google.cloud.dataplex.v1.GetJobRequest, $root.google.cloud.dataplex.v1.Job, request, callback); + }, "name", { value: "GetJob" }); - /** - * Properties of an ActionDetails. - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @interface IActionDetails - * @property {string|null} [type] ActionDetails type - */ - - /** - * Constructs a new ActionDetails. - * @memberof google.cloud.dataplex.v1.DiscoveryEvent - * @classdesc Represents an ActionDetails. - * @implements IActionDetails - * @constructor - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails=} [properties] Properties to set - */ - function ActionDetails(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]]; - } + /** + * Calls GetJob. + * @function getJob + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IGetJobRequest} request GetJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * ActionDetails type. - * @member {string} type - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails - * @instance - */ - ActionDetails.prototype.type = ""; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|cancelJob}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef CancelJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ - /** - * Creates a new ActionDetails instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails instance - */ - ActionDetails.create = function create(properties) { - return new ActionDetails(properties); - }; + /** + * Calls CancelJob. + * @function cancelJob + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICancelJobRequest} request CancelJobRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.CancelJobCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.cancelJob = function cancelJob(request, callback) { + return this.rpcCall(cancelJob, $root.google.cloud.dataplex.v1.CancelJobRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelJob" }); - /** - * Encodes the specified ActionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails} message ActionDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ActionDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - return writer; - }; + /** + * Calls CancelJob. + * @function cancelJob + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICancelJobRequest} request CancelJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Encodes the specified ActionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails} message ActionDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ActionDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createEnvironment}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef CreateEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * Decodes an ActionDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ActionDetails.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Calls CreateEnvironment. + * @function createEnvironment + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.CreateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.createEnvironment = function createEnvironment(request, callback) { + return this.rpcCall(createEnvironment, $root.google.cloud.dataplex.v1.CreateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateEnvironment" }); - /** - * Decodes an ActionDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ActionDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Calls CreateEnvironment. + * @function createEnvironment + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Verifies an ActionDetails message. - * @function verify - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ActionDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - return null; - }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateEnvironment}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef UpdateEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * Creates an ActionDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails - */ - ActionDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails) - return object; - var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails(); - if (object.type != null) - message.type = String(object.type); - return message; - }; + /** + * Calls UpdateEnvironment. + * @function updateEnvironment + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.UpdateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.updateEnvironment = function updateEnvironment(request, callback) { + return this.rpcCall(updateEnvironment, $root.google.cloud.dataplex.v1.UpdateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateEnvironment" }); - /** - * Creates a plain object from an ActionDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails - * @static - * @param {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} message ActionDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ActionDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.type = ""; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - return object; - }; + /** + * Calls UpdateEnvironment. + * @function updateEnvironment + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Converts this ActionDetails to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails - * @instance - * @returns {Object.} JSON object - */ - ActionDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteEnvironment}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef DeleteEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * Gets the default type url for ActionDetails - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ActionDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails"; - }; + /** + * Calls DeleteEnvironment. + * @function deleteEnvironment + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.DeleteEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.deleteEnvironment = function deleteEnvironment(request, callback) { + return this.rpcCall(deleteEnvironment, $root.google.cloud.dataplex.v1.DeleteEnvironmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteEnvironment" }); - return ActionDetails; - })(); + /** + * Calls DeleteEnvironment. + * @function deleteEnvironment + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - return DiscoveryEvent; - })(); + /** + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listEnvironments}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListEnvironmentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListEnvironmentsResponse} [response] ListEnvironmentsResponse + */ - v1.JobEvent = (function() { + /** + * Calls ListEnvironments. + * @function listEnvironments + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListEnvironmentsCallback} callback Node-style callback called with the error, if any, and ListEnvironmentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataplexService.prototype.listEnvironments = function listEnvironments(request, callback) { + return this.rpcCall(listEnvironments, $root.google.cloud.dataplex.v1.ListEnvironmentsRequest, $root.google.cloud.dataplex.v1.ListEnvironmentsResponse, request, callback); + }, "name", { value: "ListEnvironments" }); /** - * Properties of a JobEvent. - * @memberof google.cloud.dataplex.v1 - * @interface IJobEvent - * @property {string|null} [message] JobEvent message - * @property {string|null} [jobId] JobEvent jobId - * @property {google.protobuf.ITimestamp|null} [startTime] JobEvent startTime - * @property {google.protobuf.ITimestamp|null} [endTime] JobEvent endTime - * @property {google.cloud.dataplex.v1.JobEvent.State|null} [state] JobEvent state - * @property {number|null} [retries] JobEvent retries - * @property {google.cloud.dataplex.v1.JobEvent.Type|null} [type] JobEvent type - * @property {google.cloud.dataplex.v1.JobEvent.Service|null} [service] JobEvent service - * @property {string|null} [serviceJob] JobEvent serviceJob + * Calls ListEnvironments. + * @function listEnvironments + * @memberof google.cloud.dataplex.v1.DataplexService + * @instance + * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new JobEvent. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a JobEvent. - * @implements IJobEvent - * @constructor - * @param {google.cloud.dataplex.v1.IJobEvent=} [properties] Properties to set + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getEnvironment}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef GetEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Environment} [response] Environment */ - function JobEvent(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]]; - } /** - * JobEvent message. - * @member {string} message - * @memberof google.cloud.dataplex.v1.JobEvent + * Calls GetEnvironment. + * @function getEnvironment + * @memberof google.cloud.dataplex.v1.DataplexService * @instance + * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.GetEnvironmentCallback} callback Node-style callback called with the error, if any, and Environment + * @returns {undefined} + * @variation 1 */ - JobEvent.prototype.message = ""; + Object.defineProperty(DataplexService.prototype.getEnvironment = function getEnvironment(request, callback) { + return this.rpcCall(getEnvironment, $root.google.cloud.dataplex.v1.GetEnvironmentRequest, $root.google.cloud.dataplex.v1.Environment, request, callback); + }, "name", { value: "GetEnvironment" }); /** - * JobEvent jobId. - * @member {string} jobId - * @memberof google.cloud.dataplex.v1.JobEvent + * Calls GetEnvironment. + * @function getEnvironment + * @memberof google.cloud.dataplex.v1.DataplexService * @instance + * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - JobEvent.prototype.jobId = ""; /** - * JobEvent startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.dataplex.v1.JobEvent - * @instance + * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listSessions}. + * @memberof google.cloud.dataplex.v1.DataplexService + * @typedef ListSessionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListSessionsResponse} [response] ListSessionsResponse */ - JobEvent.prototype.startTime = null; /** - * JobEvent endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.dataplex.v1.JobEvent + * Calls ListSessions. + * @function listSessions + * @memberof google.cloud.dataplex.v1.DataplexService * @instance + * @param {google.cloud.dataplex.v1.IListSessionsRequest} request ListSessionsRequest message or plain object + * @param {google.cloud.dataplex.v1.DataplexService.ListSessionsCallback} callback Node-style callback called with the error, if any, and ListSessionsResponse + * @returns {undefined} + * @variation 1 */ - JobEvent.prototype.endTime = null; + Object.defineProperty(DataplexService.prototype.listSessions = function listSessions(request, callback) { + return this.rpcCall(listSessions, $root.google.cloud.dataplex.v1.ListSessionsRequest, $root.google.cloud.dataplex.v1.ListSessionsResponse, request, callback); + }, "name", { value: "ListSessions" }); /** - * JobEvent state. - * @member {google.cloud.dataplex.v1.JobEvent.State} state - * @memberof google.cloud.dataplex.v1.JobEvent + * Calls ListSessions. + * @function listSessions + * @memberof google.cloud.dataplex.v1.DataplexService * @instance + * @param {google.cloud.dataplex.v1.IListSessionsRequest} request ListSessionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - JobEvent.prototype.state = 0; + + return DataplexService; + })(); + + v1.CreateLakeRequest = (function() { /** - * JobEvent retries. - * @member {number} retries - * @memberof google.cloud.dataplex.v1.JobEvent + * Properties of a CreateLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreateLakeRequest + * @property {string|null} [parent] CreateLakeRequest parent + * @property {string|null} [lakeId] CreateLakeRequest lakeId + * @property {google.cloud.dataplex.v1.ILake|null} [lake] CreateLakeRequest lake + * @property {boolean|null} [validateOnly] CreateLakeRequest validateOnly + */ + + /** + * Constructs a new CreateLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreateLakeRequest. + * @implements ICreateLakeRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICreateLakeRequest=} [properties] Properties to set + */ + function CreateLakeRequest(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]]; + } + + /** + * CreateLakeRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateLakeRequest * @instance */ - JobEvent.prototype.retries = 0; + CreateLakeRequest.prototype.parent = ""; /** - * JobEvent type. - * @member {google.cloud.dataplex.v1.JobEvent.Type} type - * @memberof google.cloud.dataplex.v1.JobEvent + * CreateLakeRequest lakeId. + * @member {string} lakeId + * @memberof google.cloud.dataplex.v1.CreateLakeRequest * @instance */ - JobEvent.prototype.type = 0; + CreateLakeRequest.prototype.lakeId = ""; /** - * JobEvent service. - * @member {google.cloud.dataplex.v1.JobEvent.Service} service - * @memberof google.cloud.dataplex.v1.JobEvent + * CreateLakeRequest lake. + * @member {google.cloud.dataplex.v1.ILake|null|undefined} lake + * @memberof google.cloud.dataplex.v1.CreateLakeRequest * @instance */ - JobEvent.prototype.service = 0; + CreateLakeRequest.prototype.lake = null; /** - * JobEvent serviceJob. - * @member {string} serviceJob - * @memberof google.cloud.dataplex.v1.JobEvent + * CreateLakeRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateLakeRequest * @instance */ - JobEvent.prototype.serviceJob = ""; + CreateLakeRequest.prototype.validateOnly = false; /** - * Creates a new JobEvent instance using the specified properties. + * Creates a new CreateLakeRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.JobEvent + * @memberof google.cloud.dataplex.v1.CreateLakeRequest * @static - * @param {google.cloud.dataplex.v1.IJobEvent=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent instance + * @param {google.cloud.dataplex.v1.ICreateLakeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest instance */ - JobEvent.create = function create(properties) { - return new JobEvent(properties); + CreateLakeRequest.create = function create(properties) { + return new CreateLakeRequest(properties); }; /** - * Encodes the specified JobEvent message. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. + * Encodes the specified CreateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.JobEvent + * @memberof google.cloud.dataplex.v1.CreateLakeRequest * @static - * @param {google.cloud.dataplex.v1.IJobEvent} message JobEvent message or plain object to encode + * @param {google.cloud.dataplex.v1.ICreateLakeRequest} message CreateLakeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - JobEvent.encode = function encode(message, writer) { + CreateLakeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); - if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.jobId); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); - if (message.retries != null && Object.hasOwnProperty.call(message, "retries")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.retries); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.type); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.service); - if (message.serviceJob != null && Object.hasOwnProperty.call(message, "serviceJob")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.serviceJob); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.lakeId != null && Object.hasOwnProperty.call(message, "lakeId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.lakeId); + if (message.lake != null && Object.hasOwnProperty.call(message, "lake")) + $root.google.cloud.dataplex.v1.Lake.encode(message.lake, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); return writer; }; /** - * Encodes the specified JobEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. + * Encodes the specified CreateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.JobEvent + * @memberof google.cloud.dataplex.v1.CreateLakeRequest * @static - * @param {google.cloud.dataplex.v1.IJobEvent} message JobEvent message or plain object to encode + * @param {google.cloud.dataplex.v1.ICreateLakeRequest} message CreateLakeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - JobEvent.encodeDelimited = function encodeDelimited(message, writer) { + CreateLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a JobEvent message from the specified reader or buffer. + * Decodes a CreateLakeRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.JobEvent + * @memberof google.cloud.dataplex.v1.CreateLakeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent + * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - JobEvent.decode = function decode(reader, length) { + CreateLakeRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.JobEvent(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateLakeRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.message = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.jobId = reader.string(); + message.lakeId = reader.string(); break; } case 3: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.lake = $root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32()); break; } case 4: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.state = reader.int32(); - break; - } - case 6: { - message.retries = reader.int32(); - break; - } - case 7: { - message.type = reader.int32(); - break; - } - case 8: { - message.service = reader.int32(); - break; - } - case 9: { - message.serviceJob = reader.string(); + message.validateOnly = reader.bool(); break; } default: @@ -27941,331 +27582,154 @@ }; /** - * Decodes a JobEvent message from the specified reader or buffer, length delimited. + * Decodes a CreateLakeRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.JobEvent + * @memberof google.cloud.dataplex.v1.CreateLakeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent + * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - JobEvent.decodeDelimited = function decodeDelimited(reader) { + CreateLakeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a JobEvent message. + * Verifies a CreateLakeRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.JobEvent + * @memberof google.cloud.dataplex.v1.CreateLakeRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - JobEvent.verify = function verify(message) { + CreateLakeRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.jobId != null && message.hasOwnProperty("jobId")) - if (!$util.isString(message.jobId)) - return "jobId: string expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.lakeId != null && message.hasOwnProperty("lakeId")) + if (!$util.isString(message.lakeId)) + return "lakeId: string expected"; + if (message.lake != null && message.hasOwnProperty("lake")) { + var error = $root.google.cloud.dataplex.v1.Lake.verify(message.lake); if (error) - return "endTime." + error; + return "lake." + error; } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.retries != null && message.hasOwnProperty("retries")) - if (!$util.isInteger(message.retries)) - return "retries: integer expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.service != null && message.hasOwnProperty("service")) - switch (message.service) { - default: - return "service: enum value expected"; - case 0: - case 1: - break; - } - if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) - if (!$util.isString(message.serviceJob)) - return "serviceJob: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a JobEvent message from a plain object. Also converts values to their respective internal types. + * Creates a CreateLakeRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.JobEvent + * @memberof google.cloud.dataplex.v1.CreateLakeRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent + * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest */ - JobEvent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.JobEvent) + CreateLakeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateLakeRequest) return object; - var message = new $root.google.cloud.dataplex.v1.JobEvent(); - if (object.message != null) - message.message = String(object.message); - if (object.jobId != null) - message.jobId = String(object.jobId); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.JobEvent.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.JobEvent.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "SUCCEEDED": - case 1: - message.state = 1; - break; - case "FAILED": - case 2: - message.state = 2; - break; - case "CANCELLED": - case 3: - message.state = 3; - break; - case "ABORTED": - case 4: - message.state = 4; - break; - } - if (object.retries != null) - message.retries = object.retries | 0; - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "SPARK": - case 1: - message.type = 1; - break; - case "NOTEBOOK": - case 2: - message.type = 2; - break; - } - switch (object.service) { - default: - if (typeof object.service === "number") { - message.service = object.service; - break; - } - break; - case "SERVICE_UNSPECIFIED": - case 0: - message.service = 0; - break; - case "DATAPROC": - case 1: - message.service = 1; - break; + var message = new $root.google.cloud.dataplex.v1.CreateLakeRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.lakeId != null) + message.lakeId = String(object.lakeId); + if (object.lake != null) { + if (typeof object.lake !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateLakeRequest.lake: object expected"); + message.lake = $root.google.cloud.dataplex.v1.Lake.fromObject(object.lake); } - if (object.serviceJob != null) - message.serviceJob = String(object.serviceJob); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a JobEvent message. Also converts values to other types if specified. + * Creates a plain object from a CreateLakeRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.JobEvent + * @memberof google.cloud.dataplex.v1.CreateLakeRequest * @static - * @param {google.cloud.dataplex.v1.JobEvent} message JobEvent + * @param {google.cloud.dataplex.v1.CreateLakeRequest} message CreateLakeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - JobEvent.toObject = function toObject(message, options) { + CreateLakeRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.message = ""; - object.jobId = ""; - object.startTime = null; - object.endTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.retries = 0; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.service = options.enums === String ? "SERVICE_UNSPECIFIED" : 0; - object.serviceJob = ""; + object.parent = ""; + object.lakeId = ""; + object.lake = null; + object.validateOnly = false; } - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.jobId != null && message.hasOwnProperty("jobId")) - object.jobId = message.jobId; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataplex.v1.JobEvent.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.JobEvent.State[message.state] : message.state; - if (message.retries != null && message.hasOwnProperty("retries")) - object.retries = message.retries; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.JobEvent.Type[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.JobEvent.Type[message.type] : message.type; - if (message.service != null && message.hasOwnProperty("service")) - object.service = options.enums === String ? $root.google.cloud.dataplex.v1.JobEvent.Service[message.service] === undefined ? message.service : $root.google.cloud.dataplex.v1.JobEvent.Service[message.service] : message.service; - if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) - object.serviceJob = message.serviceJob; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.lakeId != null && message.hasOwnProperty("lakeId")) + object.lakeId = message.lakeId; + if (message.lake != null && message.hasOwnProperty("lake")) + object.lake = $root.google.cloud.dataplex.v1.Lake.toObject(message.lake, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this JobEvent to JSON. + * Converts this CreateLakeRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.JobEvent + * @memberof google.cloud.dataplex.v1.CreateLakeRequest * @instance * @returns {Object.} JSON object */ - JobEvent.prototype.toJSON = function toJSON() { + CreateLakeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for JobEvent + * Gets the default type url for CreateLakeRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.JobEvent + * @memberof google.cloud.dataplex.v1.CreateLakeRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - JobEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateLakeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.JobEvent"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateLakeRequest"; }; - /** - * Type enum. - * @name google.cloud.dataplex.v1.JobEvent.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} SPARK=1 SPARK value - * @property {number} NOTEBOOK=2 NOTEBOOK value - */ - JobEvent.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SPARK"] = 1; - values[valuesById[2] = "NOTEBOOK"] = 2; - return values; - })(); - - /** - * State enum. - * @name google.cloud.dataplex.v1.JobEvent.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} SUCCEEDED=1 SUCCEEDED value - * @property {number} FAILED=2 FAILED value - * @property {number} CANCELLED=3 CANCELLED value - * @property {number} ABORTED=4 ABORTED value - */ - JobEvent.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SUCCEEDED"] = 1; - values[valuesById[2] = "FAILED"] = 2; - values[valuesById[3] = "CANCELLED"] = 3; - values[valuesById[4] = "ABORTED"] = 4; - return values; - })(); - - /** - * Service enum. - * @name google.cloud.dataplex.v1.JobEvent.Service - * @enum {number} - * @property {number} SERVICE_UNSPECIFIED=0 SERVICE_UNSPECIFIED value - * @property {number} DATAPROC=1 DATAPROC value - */ - JobEvent.Service = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SERVICE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DATAPROC"] = 1; - return values; - })(); - - return JobEvent; + return CreateLakeRequest; })(); - v1.SessionEvent = (function() { + v1.UpdateLakeRequest = (function() { /** - * Properties of a SessionEvent. + * Properties of an UpdateLakeRequest. * @memberof google.cloud.dataplex.v1 - * @interface ISessionEvent - * @property {string|null} [message] SessionEvent message - * @property {string|null} [userId] SessionEvent userId - * @property {string|null} [sessionId] SessionEvent sessionId - * @property {google.cloud.dataplex.v1.SessionEvent.EventType|null} [type] SessionEvent type - * @property {google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null} [query] SessionEvent query - * @property {boolean|null} [eventSucceeded] SessionEvent eventSucceeded - * @property {boolean|null} [fastStartupEnabled] SessionEvent fastStartupEnabled - * @property {google.protobuf.IDuration|null} [unassignedDuration] SessionEvent unassignedDuration + * @interface IUpdateLakeRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateLakeRequest updateMask + * @property {google.cloud.dataplex.v1.ILake|null} [lake] UpdateLakeRequest lake + * @property {boolean|null} [validateOnly] UpdateLakeRequest validateOnly */ /** - * Constructs a new SessionEvent. + * Constructs a new UpdateLakeRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a SessionEvent. - * @implements ISessionEvent + * @classdesc Represents an UpdateLakeRequest. + * @implements IUpdateLakeRequest * @constructor - * @param {google.cloud.dataplex.v1.ISessionEvent=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest=} [properties] Properties to set */ - function SessionEvent(properties) { + function UpdateLakeRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28273,187 +27737,103 @@ } /** - * SessionEvent message. - * @member {string} message - * @memberof google.cloud.dataplex.v1.SessionEvent - * @instance - */ - SessionEvent.prototype.message = ""; - - /** - * SessionEvent userId. - * @member {string} userId - * @memberof google.cloud.dataplex.v1.SessionEvent - * @instance - */ - SessionEvent.prototype.userId = ""; - - /** - * SessionEvent sessionId. - * @member {string} sessionId - * @memberof google.cloud.dataplex.v1.SessionEvent - * @instance - */ - SessionEvent.prototype.sessionId = ""; - - /** - * SessionEvent type. - * @member {google.cloud.dataplex.v1.SessionEvent.EventType} type - * @memberof google.cloud.dataplex.v1.SessionEvent - * @instance - */ - SessionEvent.prototype.type = 0; - - /** - * SessionEvent query. - * @member {google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null|undefined} query - * @memberof google.cloud.dataplex.v1.SessionEvent - * @instance - */ - SessionEvent.prototype.query = null; - - /** - * SessionEvent eventSucceeded. - * @member {boolean} eventSucceeded - * @memberof google.cloud.dataplex.v1.SessionEvent - * @instance - */ - SessionEvent.prototype.eventSucceeded = false; - - /** - * SessionEvent fastStartupEnabled. - * @member {boolean} fastStartupEnabled - * @memberof google.cloud.dataplex.v1.SessionEvent + * UpdateLakeRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest * @instance */ - SessionEvent.prototype.fastStartupEnabled = false; + UpdateLakeRequest.prototype.updateMask = null; /** - * SessionEvent unassignedDuration. - * @member {google.protobuf.IDuration|null|undefined} unassignedDuration - * @memberof google.cloud.dataplex.v1.SessionEvent + * UpdateLakeRequest lake. + * @member {google.cloud.dataplex.v1.ILake|null|undefined} lake + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest * @instance */ - SessionEvent.prototype.unassignedDuration = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + UpdateLakeRequest.prototype.lake = null; /** - * SessionEvent detail. - * @member {"query"|undefined} detail - * @memberof google.cloud.dataplex.v1.SessionEvent + * UpdateLakeRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest * @instance */ - Object.defineProperty(SessionEvent.prototype, "detail", { - get: $util.oneOfGetter($oneOfFields = ["query"]), - set: $util.oneOfSetter($oneOfFields) - }); + UpdateLakeRequest.prototype.validateOnly = false; /** - * Creates a new SessionEvent instance using the specified properties. + * Creates a new UpdateLakeRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.SessionEvent + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest * @static - * @param {google.cloud.dataplex.v1.ISessionEvent=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent instance + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest instance */ - SessionEvent.create = function create(properties) { - return new SessionEvent(properties); + UpdateLakeRequest.create = function create(properties) { + return new UpdateLakeRequest(properties); }; /** - * Encodes the specified SessionEvent message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. + * Encodes the specified UpdateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.SessionEvent + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest * @static - * @param {google.cloud.dataplex.v1.ISessionEvent} message SessionEvent message or plain object to encode + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} message UpdateLakeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SessionEvent.encode = function encode(message, writer) { + UpdateLakeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); - if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.userId); - if (message.sessionId != null && Object.hasOwnProperty.call(message, "sessionId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.sessionId); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.encode(message.query, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.eventSucceeded != null && Object.hasOwnProperty.call(message, "eventSucceeded")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.eventSucceeded); - if (message.fastStartupEnabled != null && Object.hasOwnProperty.call(message, "fastStartupEnabled")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.fastStartupEnabled); - if (message.unassignedDuration != null && Object.hasOwnProperty.call(message, "unassignedDuration")) - $root.google.protobuf.Duration.encode(message.unassignedDuration, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - return writer; - }; - + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.lake != null && Object.hasOwnProperty.call(message, "lake")) + $root.google.cloud.dataplex.v1.Lake.encode(message.lake, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + /** - * Encodes the specified SessionEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. + * Encodes the specified UpdateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.SessionEvent + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest * @static - * @param {google.cloud.dataplex.v1.ISessionEvent} message SessionEvent message or plain object to encode + * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} message UpdateLakeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SessionEvent.encodeDelimited = function encodeDelimited(message, writer) { + UpdateLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SessionEvent message from the specified reader or buffer. + * Decodes an UpdateLakeRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.SessionEvent + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent + * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SessionEvent.decode = function decode(reader, length) { + UpdateLakeRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.SessionEvent(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateLakeRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.message = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } case 2: { - message.userId = reader.string(); + message.lake = $root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32()); break; } case 3: { - message.sessionId = reader.string(); - break; - } - case 4: { - message.type = reader.int32(); - break; - } - case 5: { - message.query = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.decode(reader, reader.uint32()); - break; - } - case 6: { - message.eventSucceeded = reader.bool(); - break; - } - case 7: { - message.fastStartupEnabled = reader.bool(); - break; - } - case 8: { - message.unassignedDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.validateOnly = reader.bool(); break; } default: @@ -28465,652 +27845,356 @@ }; /** - * Decodes a SessionEvent message from the specified reader or buffer, length delimited. + * Decodes an UpdateLakeRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.SessionEvent + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent + * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SessionEvent.decodeDelimited = function decodeDelimited(reader) { + UpdateLakeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SessionEvent message. + * Verifies an UpdateLakeRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.SessionEvent + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SessionEvent.verify = function verify(message) { + UpdateLakeRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.userId != null && message.hasOwnProperty("userId")) - if (!$util.isString(message.userId)) - return "userId: string expected"; - if (message.sessionId != null && message.hasOwnProperty("sessionId")) - if (!$util.isString(message.sessionId)) - return "sessionId: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.query != null && message.hasOwnProperty("query")) { - properties.detail = 1; - { - var error = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify(message.query); - if (error) - return "query." + error; - } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; } - if (message.eventSucceeded != null && message.hasOwnProperty("eventSucceeded")) - if (typeof message.eventSucceeded !== "boolean") - return "eventSucceeded: boolean expected"; - if (message.fastStartupEnabled != null && message.hasOwnProperty("fastStartupEnabled")) - if (typeof message.fastStartupEnabled !== "boolean") - return "fastStartupEnabled: boolean expected"; - if (message.unassignedDuration != null && message.hasOwnProperty("unassignedDuration")) { - var error = $root.google.protobuf.Duration.verify(message.unassignedDuration); + if (message.lake != null && message.hasOwnProperty("lake")) { + var error = $root.google.cloud.dataplex.v1.Lake.verify(message.lake); if (error) - return "unassignedDuration." + error; + return "lake." + error; } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a SessionEvent message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateLakeRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.SessionEvent + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent + * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest */ - SessionEvent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.SessionEvent) + UpdateLakeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateLakeRequest) return object; - var message = new $root.google.cloud.dataplex.v1.SessionEvent(); - if (object.message != null) - message.message = String(object.message); - if (object.userId != null) - message.userId = String(object.userId); - if (object.sessionId != null) - message.sessionId = String(object.sessionId); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "EVENT_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "START": - case 1: - message.type = 1; - break; - case "STOP": - case 2: - message.type = 2; - break; - case "QUERY": - case 3: - message.type = 3; - break; - case "CREATE": - case 4: - message.type = 4; - break; - } - if (object.query != null) { - if (typeof object.query !== "object") - throw TypeError(".google.cloud.dataplex.v1.SessionEvent.query: object expected"); - message.query = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.fromObject(object.query); + var message = new $root.google.cloud.dataplex.v1.UpdateLakeRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateLakeRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.eventSucceeded != null) - message.eventSucceeded = Boolean(object.eventSucceeded); - if (object.fastStartupEnabled != null) - message.fastStartupEnabled = Boolean(object.fastStartupEnabled); - if (object.unassignedDuration != null) { - if (typeof object.unassignedDuration !== "object") - throw TypeError(".google.cloud.dataplex.v1.SessionEvent.unassignedDuration: object expected"); - message.unassignedDuration = $root.google.protobuf.Duration.fromObject(object.unassignedDuration); + if (object.lake != null) { + if (typeof object.lake !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateLakeRequest.lake: object expected"); + message.lake = $root.google.cloud.dataplex.v1.Lake.fromObject(object.lake); } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a SessionEvent message. Also converts values to other types if specified. + * Creates a plain object from an UpdateLakeRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.SessionEvent + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest * @static - * @param {google.cloud.dataplex.v1.SessionEvent} message SessionEvent + * @param {google.cloud.dataplex.v1.UpdateLakeRequest} message UpdateLakeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SessionEvent.toObject = function toObject(message, options) { + UpdateLakeRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.message = ""; - object.userId = ""; - object.sessionId = ""; - object.type = options.enums === String ? "EVENT_TYPE_UNSPECIFIED" : 0; - object.eventSucceeded = false; - object.fastStartupEnabled = false; - object.unassignedDuration = null; - } - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.userId != null && message.hasOwnProperty("userId")) - object.userId = message.userId; - if (message.sessionId != null && message.hasOwnProperty("sessionId")) - object.sessionId = message.sessionId; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.SessionEvent.EventType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.SessionEvent.EventType[message.type] : message.type; - if (message.query != null && message.hasOwnProperty("query")) { - object.query = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.toObject(message.query, options); - if (options.oneofs) - object.detail = "query"; + object.updateMask = null; + object.lake = null; + object.validateOnly = false; } - if (message.eventSucceeded != null && message.hasOwnProperty("eventSucceeded")) - object.eventSucceeded = message.eventSucceeded; - if (message.fastStartupEnabled != null && message.hasOwnProperty("fastStartupEnabled")) - object.fastStartupEnabled = message.fastStartupEnabled; - if (message.unassignedDuration != null && message.hasOwnProperty("unassignedDuration")) - object.unassignedDuration = $root.google.protobuf.Duration.toObject(message.unassignedDuration, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.lake != null && message.hasOwnProperty("lake")) + object.lake = $root.google.cloud.dataplex.v1.Lake.toObject(message.lake, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this SessionEvent to JSON. + * Converts this UpdateLakeRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.SessionEvent + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest * @instance * @returns {Object.} JSON object */ - SessionEvent.prototype.toJSON = function toJSON() { + UpdateLakeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SessionEvent + * Gets the default type url for UpdateLakeRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.SessionEvent + * @memberof google.cloud.dataplex.v1.UpdateLakeRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SessionEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateLakeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.SessionEvent"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateLakeRequest"; }; + return UpdateLakeRequest; + })(); + + v1.DeleteLakeRequest = (function() { + /** - * EventType enum. - * @name google.cloud.dataplex.v1.SessionEvent.EventType - * @enum {number} - * @property {number} EVENT_TYPE_UNSPECIFIED=0 EVENT_TYPE_UNSPECIFIED value - * @property {number} START=1 START value - * @property {number} STOP=2 STOP value - * @property {number} QUERY=3 QUERY value - * @property {number} CREATE=4 CREATE value + * Properties of a DeleteLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IDeleteLakeRequest + * @property {string|null} [name] DeleteLakeRequest name */ - SessionEvent.EventType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EVENT_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "START"] = 1; - values[valuesById[2] = "STOP"] = 2; - values[valuesById[3] = "QUERY"] = 3; - values[valuesById[4] = "CREATE"] = 4; - return values; - })(); - SessionEvent.QueryDetail = (function() { + /** + * Constructs a new DeleteLakeRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DeleteLakeRequest. + * @implements IDeleteLakeRequest + * @constructor + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest=} [properties] Properties to set + */ + function DeleteLakeRequest(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]]; + } - /** - * Properties of a QueryDetail. - * @memberof google.cloud.dataplex.v1.SessionEvent - * @interface IQueryDetail - * @property {string|null} [queryId] QueryDetail queryId - * @property {string|null} [queryText] QueryDetail queryText - * @property {google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|null} [engine] QueryDetail engine - * @property {google.protobuf.IDuration|null} [duration] QueryDetail duration - * @property {number|Long|null} [resultSizeBytes] QueryDetail resultSizeBytes - * @property {number|Long|null} [dataProcessedBytes] QueryDetail dataProcessedBytes - */ + /** + * DeleteLakeRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @instance + */ + DeleteLakeRequest.prototype.name = ""; - /** - * Constructs a new QueryDetail. - * @memberof google.cloud.dataplex.v1.SessionEvent - * @classdesc Represents a QueryDetail. - * @implements IQueryDetail - * @constructor - * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail=} [properties] Properties to set - */ - function QueryDetail(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]]; - } + /** + * Creates a new DeleteLakeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest instance + */ + DeleteLakeRequest.create = function create(properties) { + return new DeleteLakeRequest(properties); + }; - /** - * QueryDetail queryId. - * @member {string} queryId - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @instance - */ - QueryDetail.prototype.queryId = ""; + /** + * Encodes the specified DeleteLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} message DeleteLakeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteLakeRequest.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; + }; - /** - * QueryDetail queryText. - * @member {string} queryText - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @instance - */ - QueryDetail.prototype.queryText = ""; + /** + * Encodes the specified DeleteLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} message DeleteLakeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * QueryDetail engine. - * @member {google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine} engine - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @instance - */ - QueryDetail.prototype.engine = 0; + /** + * Decodes a DeleteLakeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteLakeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteLakeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * QueryDetail duration. - * @member {google.protobuf.IDuration|null|undefined} duration - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @instance - */ - QueryDetail.prototype.duration = null; + /** + * Decodes a DeleteLakeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteLakeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * QueryDetail resultSizeBytes. - * @member {number|Long} resultSizeBytes - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @instance - */ - QueryDetail.prototype.resultSizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Verifies a DeleteLakeRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteLakeRequest.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; + }; - /** - * QueryDetail dataProcessedBytes. - * @member {number|Long} dataProcessedBytes - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @instance - */ - QueryDetail.prototype.dataProcessedBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Creates a DeleteLakeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest + */ + DeleteLakeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteLakeRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.DeleteLakeRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Creates a new QueryDetail instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @static - * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail instance - */ - QueryDetail.create = function create(properties) { - return new QueryDetail(properties); - }; + /** + * Creates a plain object from a DeleteLakeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {google.cloud.dataplex.v1.DeleteLakeRequest} message DeleteLakeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteLakeRequest.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; + }; - /** - * Encodes the specified QueryDetail message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @static - * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail} message QueryDetail message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDetail.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.queryId != null && Object.hasOwnProperty.call(message, "queryId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.queryId); - if (message.queryText != null && Object.hasOwnProperty.call(message, "queryText")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.queryText); - if (message.engine != null && Object.hasOwnProperty.call(message, "engine")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.engine); - if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) - $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.resultSizeBytes != null && Object.hasOwnProperty.call(message, "resultSizeBytes")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.resultSizeBytes); - if (message.dataProcessedBytes != null && Object.hasOwnProperty.call(message, "dataProcessedBytes")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.dataProcessedBytes); - return writer; - }; - - /** - * Encodes the specified QueryDetail message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @static - * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail} message QueryDetail message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDetail.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryDetail message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDetail.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.queryId = reader.string(); - break; - } - case 2: { - message.queryText = reader.string(); - break; - } - case 3: { - message.engine = reader.int32(); - break; - } - case 4: { - message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 5: { - message.resultSizeBytes = reader.int64(); - break; - } - case 6: { - message.dataProcessedBytes = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryDetail message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDetail.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryDetail message. - * @function verify - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryDetail.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.queryId != null && message.hasOwnProperty("queryId")) - if (!$util.isString(message.queryId)) - return "queryId: string expected"; - if (message.queryText != null && message.hasOwnProperty("queryText")) - if (!$util.isString(message.queryText)) - return "queryText: string expected"; - 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.duration != null && message.hasOwnProperty("duration")) { - var error = $root.google.protobuf.Duration.verify(message.duration); - if (error) - return "duration." + error; - } - if (message.resultSizeBytes != null && message.hasOwnProperty("resultSizeBytes")) - if (!$util.isInteger(message.resultSizeBytes) && !(message.resultSizeBytes && $util.isInteger(message.resultSizeBytes.low) && $util.isInteger(message.resultSizeBytes.high))) - return "resultSizeBytes: integer|Long expected"; - if (message.dataProcessedBytes != null && message.hasOwnProperty("dataProcessedBytes")) - if (!$util.isInteger(message.dataProcessedBytes) && !(message.dataProcessedBytes && $util.isInteger(message.dataProcessedBytes.low) && $util.isInteger(message.dataProcessedBytes.high))) - return "dataProcessedBytes: integer|Long expected"; - return null; - }; - - /** - * Creates a QueryDetail message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail - */ - QueryDetail.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail) - return object; - var message = new $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail(); - if (object.queryId != null) - message.queryId = String(object.queryId); - if (object.queryText != null) - message.queryText = String(object.queryText); - 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 "SPARK_SQL": - case 1: - message.engine = 1; - break; - case "BIGQUERY": - case 2: - message.engine = 2; - break; - } - if (object.duration != null) { - if (typeof object.duration !== "object") - throw TypeError(".google.cloud.dataplex.v1.SessionEvent.QueryDetail.duration: object expected"); - message.duration = $root.google.protobuf.Duration.fromObject(object.duration); - } - if (object.resultSizeBytes != null) - if ($util.Long) - (message.resultSizeBytes = $util.Long.fromValue(object.resultSizeBytes)).unsigned = false; - else if (typeof object.resultSizeBytes === "string") - message.resultSizeBytes = parseInt(object.resultSizeBytes, 10); - else if (typeof object.resultSizeBytes === "number") - message.resultSizeBytes = object.resultSizeBytes; - else if (typeof object.resultSizeBytes === "object") - message.resultSizeBytes = new $util.LongBits(object.resultSizeBytes.low >>> 0, object.resultSizeBytes.high >>> 0).toNumber(); - if (object.dataProcessedBytes != null) - if ($util.Long) - (message.dataProcessedBytes = $util.Long.fromValue(object.dataProcessedBytes)).unsigned = false; - else if (typeof object.dataProcessedBytes === "string") - message.dataProcessedBytes = parseInt(object.dataProcessedBytes, 10); - else if (typeof object.dataProcessedBytes === "number") - message.dataProcessedBytes = object.dataProcessedBytes; - else if (typeof object.dataProcessedBytes === "object") - message.dataProcessedBytes = new $util.LongBits(object.dataProcessedBytes.low >>> 0, object.dataProcessedBytes.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a QueryDetail message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @static - * @param {google.cloud.dataplex.v1.SessionEvent.QueryDetail} message QueryDetail - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryDetail.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.queryId = ""; - object.queryText = ""; - object.engine = options.enums === String ? "ENGINE_UNSPECIFIED" : 0; - object.duration = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.resultSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.resultSizeBytes = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.dataProcessedBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.dataProcessedBytes = options.longs === String ? "0" : 0; - } - if (message.queryId != null && message.hasOwnProperty("queryId")) - object.queryId = message.queryId; - if (message.queryText != null && message.hasOwnProperty("queryText")) - object.queryText = message.queryText; - if (message.engine != null && message.hasOwnProperty("engine")) - object.engine = options.enums === String ? $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine[message.engine] === undefined ? message.engine : $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine[message.engine] : message.engine; - if (message.duration != null && message.hasOwnProperty("duration")) - object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); - if (message.resultSizeBytes != null && message.hasOwnProperty("resultSizeBytes")) - if (typeof message.resultSizeBytes === "number") - object.resultSizeBytes = options.longs === String ? String(message.resultSizeBytes) : message.resultSizeBytes; - else - object.resultSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.resultSizeBytes) : options.longs === Number ? new $util.LongBits(message.resultSizeBytes.low >>> 0, message.resultSizeBytes.high >>> 0).toNumber() : message.resultSizeBytes; - if (message.dataProcessedBytes != null && message.hasOwnProperty("dataProcessedBytes")) - if (typeof message.dataProcessedBytes === "number") - object.dataProcessedBytes = options.longs === String ? String(message.dataProcessedBytes) : message.dataProcessedBytes; - else - object.dataProcessedBytes = options.longs === String ? $util.Long.prototype.toString.call(message.dataProcessedBytes) : options.longs === Number ? new $util.LongBits(message.dataProcessedBytes.low >>> 0, message.dataProcessedBytes.high >>> 0).toNumber() : message.dataProcessedBytes; - return object; - }; - - /** - * Converts this QueryDetail to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @instance - * @returns {Object.} JSON object - */ - QueryDetail.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for QueryDetail - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - QueryDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.SessionEvent.QueryDetail"; - }; - - /** - * Engine enum. - * @name google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine - * @enum {number} - * @property {number} ENGINE_UNSPECIFIED=0 ENGINE_UNSPECIFIED value - * @property {number} SPARK_SQL=1 SPARK_SQL value - * @property {number} BIGQUERY=2 BIGQUERY value - */ - QueryDetail.Engine = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENGINE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SPARK_SQL"] = 1; - values[valuesById[2] = "BIGQUERY"] = 2; - return values; - })(); + /** + * Converts this DeleteLakeRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteLakeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return QueryDetail; - })(); + /** + * Gets the default type url for DeleteLakeRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteLakeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteLakeRequest"; + }; - return SessionEvent; + return DeleteLakeRequest; })(); - v1.DataScanEvent = (function() { + v1.ListLakesRequest = (function() { /** - * Properties of a DataScanEvent. + * Properties of a ListLakesRequest. * @memberof google.cloud.dataplex.v1 - * @interface IDataScanEvent - * @property {string|null} [dataSource] DataScanEvent dataSource - * @property {string|null} [jobId] DataScanEvent jobId - * @property {google.protobuf.ITimestamp|null} [startTime] DataScanEvent startTime - * @property {google.protobuf.ITimestamp|null} [endTime] DataScanEvent endTime - * @property {google.cloud.dataplex.v1.DataScanEvent.ScanType|null} [type] DataScanEvent type - * @property {google.cloud.dataplex.v1.DataScanEvent.State|null} [state] DataScanEvent state - * @property {string|null} [message] DataScanEvent message - * @property {string|null} [specVersion] DataScanEvent specVersion - * @property {google.cloud.dataplex.v1.DataScanEvent.Trigger|null} [trigger] DataScanEvent trigger - * @property {google.cloud.dataplex.v1.DataScanEvent.Scope|null} [scope] DataScanEvent scope - * @property {google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult|null} [dataProfile] DataScanEvent dataProfile - * @property {google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult|null} [dataQuality] DataScanEvent dataQuality + * @interface IListLakesRequest + * @property {string|null} [parent] ListLakesRequest parent + * @property {number|null} [pageSize] ListLakesRequest pageSize + * @property {string|null} [pageToken] ListLakesRequest pageToken + * @property {string|null} [filter] ListLakesRequest filter + * @property {string|null} [orderBy] ListLakesRequest orderBy */ /** - * Constructs a new DataScanEvent. + * Constructs a new ListLakesRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DataScanEvent. - * @implements IDataScanEvent + * @classdesc Represents a ListLakesRequest. + * @implements IListLakesRequest * @constructor - * @param {google.cloud.dataplex.v1.IDataScanEvent=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListLakesRequest=} [properties] Properties to set */ - function DataScanEvent(properties) { + function ListLakesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29118,243 +28202,131 @@ } /** - * DataScanEvent dataSource. - * @member {string} dataSource - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @instance - */ - DataScanEvent.prototype.dataSource = ""; - - /** - * DataScanEvent jobId. - * @member {string} jobId - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @instance - */ - DataScanEvent.prototype.jobId = ""; - - /** - * DataScanEvent startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @instance - */ - DataScanEvent.prototype.startTime = null; - - /** - * DataScanEvent endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @instance - */ - DataScanEvent.prototype.endTime = null; - - /** - * DataScanEvent type. - * @member {google.cloud.dataplex.v1.DataScanEvent.ScanType} type - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @instance - */ - DataScanEvent.prototype.type = 0; - - /** - * DataScanEvent state. - * @member {google.cloud.dataplex.v1.DataScanEvent.State} state - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @instance - */ - DataScanEvent.prototype.state = 0; - - /** - * DataScanEvent message. - * @member {string} message - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @instance - */ - DataScanEvent.prototype.message = ""; - - /** - * DataScanEvent specVersion. - * @member {string} specVersion - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @instance - */ - DataScanEvent.prototype.specVersion = ""; - - /** - * DataScanEvent trigger. - * @member {google.cloud.dataplex.v1.DataScanEvent.Trigger} trigger - * @memberof google.cloud.dataplex.v1.DataScanEvent + * ListLakesRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListLakesRequest * @instance */ - DataScanEvent.prototype.trigger = 0; + ListLakesRequest.prototype.parent = ""; /** - * DataScanEvent scope. - * @member {google.cloud.dataplex.v1.DataScanEvent.Scope} scope - * @memberof google.cloud.dataplex.v1.DataScanEvent + * ListLakesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListLakesRequest * @instance */ - DataScanEvent.prototype.scope = 0; + ListLakesRequest.prototype.pageSize = 0; /** - * DataScanEvent dataProfile. - * @member {google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult|null|undefined} dataProfile - * @memberof google.cloud.dataplex.v1.DataScanEvent + * ListLakesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListLakesRequest * @instance */ - DataScanEvent.prototype.dataProfile = null; + ListLakesRequest.prototype.pageToken = ""; /** - * DataScanEvent dataQuality. - * @member {google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult|null|undefined} dataQuality - * @memberof google.cloud.dataplex.v1.DataScanEvent + * ListLakesRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListLakesRequest * @instance */ - DataScanEvent.prototype.dataQuality = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ListLakesRequest.prototype.filter = ""; /** - * DataScanEvent result. - * @member {"dataProfile"|"dataQuality"|undefined} result - * @memberof google.cloud.dataplex.v1.DataScanEvent + * ListLakesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListLakesRequest * @instance */ - Object.defineProperty(DataScanEvent.prototype, "result", { - get: $util.oneOfGetter($oneOfFields = ["dataProfile", "dataQuality"]), - set: $util.oneOfSetter($oneOfFields) - }); + ListLakesRequest.prototype.orderBy = ""; /** - * Creates a new DataScanEvent instance using the specified properties. + * Creates a new ListLakesRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.DataScanEvent + * @memberof google.cloud.dataplex.v1.ListLakesRequest * @static - * @param {google.cloud.dataplex.v1.IDataScanEvent=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataScanEvent} DataScanEvent instance + * @param {google.cloud.dataplex.v1.IListLakesRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest instance */ - DataScanEvent.create = function create(properties) { - return new DataScanEvent(properties); + ListLakesRequest.create = function create(properties) { + return new ListLakesRequest(properties); }; /** - * Encodes the specified DataScanEvent message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.verify|verify} messages. + * Encodes the specified ListLakesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.DataScanEvent + * @memberof google.cloud.dataplex.v1.ListLakesRequest * @static - * @param {google.cloud.dataplex.v1.IDataScanEvent} message DataScanEvent message or plain object to encode + * @param {google.cloud.dataplex.v1.IListLakesRequest} message ListLakesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataScanEvent.encode = function encode(message, writer) { + ListLakesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataSource); - if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.jobId); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.message); - if (message.specVersion != null && Object.hasOwnProperty.call(message, "specVersion")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.specVersion); - if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.trigger); - if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.scope); - if (message.dataProfile != null && Object.hasOwnProperty.call(message, "dataProfile")) - $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.encode(message.dataProfile, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.dataQuality != null && Object.hasOwnProperty.call(message, "dataQuality")) - $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.encode(message.dataQuality, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + 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.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified DataScanEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.verify|verify} messages. + * Encodes the specified ListLakesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataScanEvent + * @memberof google.cloud.dataplex.v1.ListLakesRequest * @static - * @param {google.cloud.dataplex.v1.IDataScanEvent} message DataScanEvent message or plain object to encode + * @param {google.cloud.dataplex.v1.IListLakesRequest} message ListLakesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataScanEvent.encodeDelimited = function encodeDelimited(message, writer) { + ListLakesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DataScanEvent message from the specified reader or buffer. + * Decodes a ListLakesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.DataScanEvent + * @memberof google.cloud.dataplex.v1.ListLakesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataScanEvent} DataScanEvent + * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataScanEvent.decode = function decode(reader, length) { + ListLakesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScanEvent(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListLakesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.dataSource = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.jobId = reader.string(); + message.pageSize = reader.int32(); break; } case 3: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.pageToken = reader.string(); break; } case 4: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.filter = reader.string(); break; } case 5: { - message.type = reader.int32(); - break; - } - case 6: { - message.state = reader.int32(); - break; - } - case 7: { - message.message = reader.string(); - break; - } - case 8: { - message.specVersion = reader.string(); - break; - } - case 9: { - message.trigger = reader.int32(); - break; - } - case 10: { - message.scope = reader.int32(); - break; - } - case 101: { - message.dataProfile = $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.decode(reader, reader.uint32()); - break; - } - case 102: { - message.dataQuality = $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.decode(reader, reader.uint32()); + message.orderBy = reader.string(); break; } default: @@ -29366,1373 +28338,788 @@ }; /** - * Decodes a DataScanEvent message from the specified reader or buffer, length delimited. + * Decodes a ListLakesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataScanEvent + * @memberof google.cloud.dataplex.v1.ListLakesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataScanEvent} DataScanEvent + * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataScanEvent.decodeDelimited = function decodeDelimited(reader) { + ListLakesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DataScanEvent message. + * Verifies a ListLakesRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.DataScanEvent + * @memberof google.cloud.dataplex.v1.ListLakesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DataScanEvent.verify = function verify(message) { + ListLakesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - if (!$util.isString(message.dataSource)) - return "dataSource: string expected"; - if (message.jobId != null && message.hasOwnProperty("jobId")) - if (!$util.isString(message.jobId)) - return "jobId: string expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.specVersion != null && message.hasOwnProperty("specVersion")) - if (!$util.isString(message.specVersion)) - return "specVersion: string expected"; - if (message.trigger != null && message.hasOwnProperty("trigger")) - switch (message.trigger) { - default: - return "trigger: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.scope != null && message.hasOwnProperty("scope")) - switch (message.scope) { - default: - return "scope: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.dataProfile != null && message.hasOwnProperty("dataProfile")) { - properties.result = 1; - { - var error = $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.verify(message.dataProfile); - if (error) - return "dataProfile." + error; - } - } - if (message.dataQuality != null && message.hasOwnProperty("dataQuality")) { - if (properties.result === 1) - return "result: multiple values"; - properties.result = 1; - { - var error = $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.verify(message.dataQuality); - if (error) - return "dataQuality." + error; - } - } + 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.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; return null; }; /** - * Creates a DataScanEvent message from a plain object. Also converts values to their respective internal types. + * Creates a ListLakesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.DataScanEvent + * @memberof google.cloud.dataplex.v1.ListLakesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataScanEvent} DataScanEvent + * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest */ - DataScanEvent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataScanEvent) + ListLakesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListLakesRequest) return object; - var message = new $root.google.cloud.dataplex.v1.DataScanEvent(); - if (object.dataSource != null) - message.dataSource = String(object.dataSource); - if (object.jobId != null) - message.jobId = String(object.jobId); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "SCAN_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "DATA_PROFILE": - case 1: - message.type = 1; - break; - case "DATA_QUALITY": - case 2: - message.type = 2; - break; - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "STARTED": - case 1: - message.state = 1; - break; - case "SUCCEEDED": - case 2: - message.state = 2; - break; - case "FAILED": - case 3: - message.state = 3; - break; - case "CANCELLED": - case 4: - message.state = 4; - break; - } - if (object.message != null) - message.message = String(object.message); - if (object.specVersion != null) - message.specVersion = String(object.specVersion); - switch (object.trigger) { - default: - if (typeof object.trigger === "number") { - message.trigger = object.trigger; - break; - } - break; - case "TRIGGER_UNSPECIFIED": - case 0: - message.trigger = 0; - break; - case "ON_DEMAND": - case 1: - message.trigger = 1; - break; - case "SCHEDULE": - case 2: - message.trigger = 2; - break; - } - switch (object.scope) { - default: - if (typeof object.scope === "number") { - message.scope = object.scope; - break; - } - break; - case "SCOPE_UNSPECIFIED": - case 0: - message.scope = 0; - break; - case "FULL": - case 1: - message.scope = 1; - break; - case "INCREMENTAL": - case 2: - message.scope = 2; - break; - } - if (object.dataProfile != null) { - if (typeof object.dataProfile !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.dataProfile: object expected"); - message.dataProfile = $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.fromObject(object.dataProfile); - } - if (object.dataQuality != null) { - if (typeof object.dataQuality !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.dataQuality: object expected"); - message.dataQuality = $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.fromObject(object.dataQuality); - } + var message = new $root.google.cloud.dataplex.v1.ListLakesRequest(); + 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.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); return message; }; /** - * Creates a plain object from a DataScanEvent message. Also converts values to other types if specified. + * Creates a plain object from a ListLakesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.DataScanEvent + * @memberof google.cloud.dataplex.v1.ListLakesRequest * @static - * @param {google.cloud.dataplex.v1.DataScanEvent} message DataScanEvent + * @param {google.cloud.dataplex.v1.ListLakesRequest} message ListLakesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DataScanEvent.toObject = function toObject(message, options) { + ListLakesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.dataSource = ""; - object.jobId = ""; - object.startTime = null; - object.endTime = null; - object.type = options.enums === String ? "SCAN_TYPE_UNSPECIFIED" : 0; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.message = ""; - object.specVersion = ""; - object.trigger = options.enums === String ? "TRIGGER_UNSPECIFIED" : 0; - object.scope = options.enums === String ? "SCOPE_UNSPECIFIED" : 0; - } - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - object.dataSource = message.dataSource; - if (message.jobId != null && message.hasOwnProperty("jobId")) - object.jobId = message.jobId; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DataScanEvent.ScanType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.DataScanEvent.ScanType[message.type] : message.type; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataplex.v1.DataScanEvent.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.DataScanEvent.State[message.state] : message.state; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.specVersion != null && message.hasOwnProperty("specVersion")) - object.specVersion = message.specVersion; - if (message.trigger != null && message.hasOwnProperty("trigger")) - object.trigger = options.enums === String ? $root.google.cloud.dataplex.v1.DataScanEvent.Trigger[message.trigger] === undefined ? message.trigger : $root.google.cloud.dataplex.v1.DataScanEvent.Trigger[message.trigger] : message.trigger; - if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = options.enums === String ? $root.google.cloud.dataplex.v1.DataScanEvent.Scope[message.scope] === undefined ? message.scope : $root.google.cloud.dataplex.v1.DataScanEvent.Scope[message.scope] : message.scope; - if (message.dataProfile != null && message.hasOwnProperty("dataProfile")) { - object.dataProfile = $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.toObject(message.dataProfile, options); - if (options.oneofs) - object.result = "dataProfile"; - } - if (message.dataQuality != null && message.hasOwnProperty("dataQuality")) { - object.dataQuality = $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.toObject(message.dataQuality, options); - if (options.oneofs) - object.result = "dataQuality"; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + 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.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; return object; }; /** - * Converts this DataScanEvent to JSON. + * Converts this ListLakesRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.DataScanEvent + * @memberof google.cloud.dataplex.v1.ListLakesRequest * @instance * @returns {Object.} JSON object */ - DataScanEvent.prototype.toJSON = function toJSON() { + ListLakesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DataScanEvent + * Gets the default type url for ListLakesRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataScanEvent + * @memberof google.cloud.dataplex.v1.ListLakesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DataScanEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListLakesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScanEvent"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListLakesRequest"; }; + return ListLakesRequest; + })(); + + v1.ListLakesResponse = (function() { + /** - * ScanType enum. - * @name google.cloud.dataplex.v1.DataScanEvent.ScanType - * @enum {number} - * @property {number} SCAN_TYPE_UNSPECIFIED=0 SCAN_TYPE_UNSPECIFIED value - * @property {number} DATA_PROFILE=1 DATA_PROFILE value - * @property {number} DATA_QUALITY=2 DATA_QUALITY value + * Properties of a ListLakesResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListLakesResponse + * @property {Array.|null} [lakes] ListLakesResponse lakes + * @property {string|null} [nextPageToken] ListLakesResponse nextPageToken + * @property {Array.|null} [unreachableLocations] ListLakesResponse unreachableLocations */ - DataScanEvent.ScanType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SCAN_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DATA_PROFILE"] = 1; - values[valuesById[2] = "DATA_QUALITY"] = 2; - return values; - })(); /** - * State enum. - * @name google.cloud.dataplex.v1.DataScanEvent.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} STARTED=1 STARTED value - * @property {number} SUCCEEDED=2 SUCCEEDED value - * @property {number} FAILED=3 FAILED value - * @property {number} CANCELLED=4 CANCELLED value + * Constructs a new ListLakesResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListLakesResponse. + * @implements IListLakesResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListLakesResponse=} [properties] Properties to set */ - DataScanEvent.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "STARTED"] = 1; - values[valuesById[2] = "SUCCEEDED"] = 2; - values[valuesById[3] = "FAILED"] = 3; - values[valuesById[4] = "CANCELLED"] = 4; - return values; - })(); + function ListLakesResponse(properties) { + this.lakes = []; + this.unreachableLocations = []; + 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]]; + } /** - * Trigger enum. - * @name google.cloud.dataplex.v1.DataScanEvent.Trigger - * @enum {number} - * @property {number} TRIGGER_UNSPECIFIED=0 TRIGGER_UNSPECIFIED value - * @property {number} ON_DEMAND=1 ON_DEMAND value - * @property {number} SCHEDULE=2 SCHEDULE value + * ListLakesResponse lakes. + * @member {Array.} lakes + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @instance */ - DataScanEvent.Trigger = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TRIGGER_UNSPECIFIED"] = 0; - values[valuesById[1] = "ON_DEMAND"] = 1; - values[valuesById[2] = "SCHEDULE"] = 2; - return values; - })(); + ListLakesResponse.prototype.lakes = $util.emptyArray; /** - * Scope enum. - * @name google.cloud.dataplex.v1.DataScanEvent.Scope - * @enum {number} - * @property {number} SCOPE_UNSPECIFIED=0 SCOPE_UNSPECIFIED value - * @property {number} FULL=1 FULL value - * @property {number} INCREMENTAL=2 INCREMENTAL value + * ListLakesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @instance */ - DataScanEvent.Scope = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SCOPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "FULL"] = 1; - values[valuesById[2] = "INCREMENTAL"] = 2; - return values; - })(); - - DataScanEvent.DataProfileResult = (function() { + ListLakesResponse.prototype.nextPageToken = ""; - /** - * Properties of a DataProfileResult. - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @interface IDataProfileResult - * @property {number|Long|null} [rowCount] DataProfileResult rowCount - */ + /** + * ListLakesResponse unreachableLocations. + * @member {Array.} unreachableLocations + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @instance + */ + ListLakesResponse.prototype.unreachableLocations = $util.emptyArray; - /** - * Constructs a new DataProfileResult. - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @classdesc Represents a DataProfileResult. - * @implements IDataProfileResult - * @constructor - * @param {google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult=} [properties] Properties to set - */ - function DataProfileResult(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]]; - } + /** + * Creates a new ListLakesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {google.cloud.dataplex.v1.IListLakesResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse instance + */ + ListLakesResponse.create = function create(properties) { + return new ListLakesResponse(properties); + }; - /** - * DataProfileResult rowCount. - * @member {number|Long} rowCount - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult - * @instance - */ - DataProfileResult.prototype.rowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new DataProfileResult instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult - * @static - * @param {google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataScanEvent.DataProfileResult} DataProfileResult instance - */ - DataProfileResult.create = function create(properties) { - return new DataProfileResult(properties); - }; - - /** - * Encodes the specified DataProfileResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult - * @static - * @param {google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult} message DataProfileResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataProfileResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.rowCount); - return writer; - }; + /** + * Encodes the specified ListLakesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {google.cloud.dataplex.v1.IListLakesResponse} message ListLakesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLakesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lakes != null && message.lakes.length) + for (var i = 0; i < message.lakes.length; ++i) + $root.google.cloud.dataplex.v1.Lake.encode(message.lakes[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); + if (message.unreachableLocations != null && message.unreachableLocations.length) + for (var i = 0; i < message.unreachableLocations.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); + return writer; + }; - /** - * Encodes the specified DataProfileResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult - * @static - * @param {google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult} message DataProfileResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataProfileResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ListLakesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {google.cloud.dataplex.v1.IListLakesResponse} message ListLakesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListLakesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a DataProfileResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataScanEvent.DataProfileResult} DataProfileResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataProfileResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.rowCount = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes a ListLakesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLakesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListLakesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.lakes && message.lakes.length)) + message.lakes = []; + message.lakes.push($root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachableLocations && message.unreachableLocations.length)) + message.unreachableLocations = []; + message.unreachableLocations.push(reader.string()); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a DataProfileResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataScanEvent.DataProfileResult} DataProfileResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataProfileResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a DataProfileResult message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataProfileResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rowCount != null && message.hasOwnProperty("rowCount")) - if (!$util.isInteger(message.rowCount) && !(message.rowCount && $util.isInteger(message.rowCount.low) && $util.isInteger(message.rowCount.high))) - return "rowCount: integer|Long expected"; - return null; - }; + /** + * Decodes a ListLakesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListLakesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a DataProfileResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataScanEvent.DataProfileResult} DataProfileResult - */ - DataProfileResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult) - return object; - var message = new $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult(); - if (object.rowCount != null) - if ($util.Long) - (message.rowCount = $util.Long.fromValue(object.rowCount)).unsigned = false; - else if (typeof object.rowCount === "string") - message.rowCount = parseInt(object.rowCount, 10); - else if (typeof object.rowCount === "number") - message.rowCount = object.rowCount; - else if (typeof object.rowCount === "object") - message.rowCount = new $util.LongBits(object.rowCount.low >>> 0, object.rowCount.high >>> 0).toNumber(); - return message; - }; + /** + * Verifies a ListLakesResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListLakesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lakes != null && message.hasOwnProperty("lakes")) { + if (!Array.isArray(message.lakes)) + return "lakes: array expected"; + for (var i = 0; i < message.lakes.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Lake.verify(message.lakes[i]); + if (error) + return "lakes." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { + if (!Array.isArray(message.unreachableLocations)) + return "unreachableLocations: array expected"; + for (var i = 0; i < message.unreachableLocations.length; ++i) + if (!$util.isString(message.unreachableLocations[i])) + return "unreachableLocations: string[] expected"; + } + return null; + }; - /** - * Creates a plain object from a DataProfileResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult - * @static - * @param {google.cloud.dataplex.v1.DataScanEvent.DataProfileResult} message DataProfileResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataProfileResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.rowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.rowCount = options.longs === String ? "0" : 0; - if (message.rowCount != null && message.hasOwnProperty("rowCount")) - if (typeof message.rowCount === "number") - object.rowCount = options.longs === String ? String(message.rowCount) : message.rowCount; - else - object.rowCount = options.longs === String ? $util.Long.prototype.toString.call(message.rowCount) : options.longs === Number ? new $util.LongBits(message.rowCount.low >>> 0, message.rowCount.high >>> 0).toNumber() : message.rowCount; + /** + * Creates a ListLakesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse + */ + ListLakesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListLakesResponse) return object; - }; - - /** - * Converts this DataProfileResult to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult - * @instance - * @returns {Object.} JSON object - */ - DataProfileResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataProfileResult - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataProfileResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + var message = new $root.google.cloud.dataplex.v1.ListLakesResponse(); + if (object.lakes) { + if (!Array.isArray(object.lakes)) + throw TypeError(".google.cloud.dataplex.v1.ListLakesResponse.lakes: array expected"); + message.lakes = []; + for (var i = 0; i < object.lakes.length; ++i) { + if (typeof object.lakes[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListLakesResponse.lakes: object expected"); + message.lakes[i] = $root.google.cloud.dataplex.v1.Lake.fromObject(object.lakes[i]); } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScanEvent.DataProfileResult"; - }; - - return DataProfileResult; - })(); + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachableLocations) { + if (!Array.isArray(object.unreachableLocations)) + throw TypeError(".google.cloud.dataplex.v1.ListLakesResponse.unreachableLocations: array expected"); + message.unreachableLocations = []; + for (var i = 0; i < object.unreachableLocations.length; ++i) + message.unreachableLocations[i] = String(object.unreachableLocations[i]); + } + return message; + }; - DataScanEvent.DataQualityResult = (function() { + /** + * Creates a plain object from a ListLakesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {google.cloud.dataplex.v1.ListLakesResponse} message ListLakesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListLakesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.lakes = []; + object.unreachableLocations = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.lakes && message.lakes.length) { + object.lakes = []; + for (var j = 0; j < message.lakes.length; ++j) + object.lakes[j] = $root.google.cloud.dataplex.v1.Lake.toObject(message.lakes[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachableLocations && message.unreachableLocations.length) { + object.unreachableLocations = []; + for (var j = 0; j < message.unreachableLocations.length; ++j) + object.unreachableLocations[j] = message.unreachableLocations[j]; + } + return object; + }; - /** - * Properties of a DataQualityResult. - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @interface IDataQualityResult - * @property {number|Long|null} [rowCount] DataQualityResult rowCount - * @property {boolean|null} [passed] DataQualityResult passed - * @property {Object.|null} [dimensionPassed] DataQualityResult dimensionPassed - */ + /** + * Converts this ListLakesResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @instance + * @returns {Object.} JSON object + */ + ListLakesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new DataQualityResult. - * @memberof google.cloud.dataplex.v1.DataScanEvent - * @classdesc Represents a DataQualityResult. - * @implements IDataQualityResult - * @constructor - * @param {google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult=} [properties] Properties to set - */ - function DataQualityResult(properties) { - this.dimensionPassed = {}; - 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]]; + /** + * Gets the default type url for ListLakesResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListLakesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListLakesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListLakesResponse"; + }; - /** - * DataQualityResult rowCount. - * @member {number|Long} rowCount - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult - * @instance - */ - DataQualityResult.prototype.rowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + return ListLakesResponse; + })(); - /** - * DataQualityResult passed. - * @member {boolean} passed - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult - * @instance - */ - DataQualityResult.prototype.passed = false; + v1.ListLakeActionsRequest = (function() { - /** - * DataQualityResult dimensionPassed. - * @member {Object.} dimensionPassed - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult - * @instance - */ - DataQualityResult.prototype.dimensionPassed = $util.emptyObject; + /** + * Properties of a ListLakeActionsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListLakeActionsRequest + * @property {string|null} [parent] ListLakeActionsRequest parent + * @property {number|null} [pageSize] ListLakeActionsRequest pageSize + * @property {string|null} [pageToken] ListLakeActionsRequest pageToken + */ - /** - * Creates a new DataQualityResult instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult - * @static - * @param {google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DataScanEvent.DataQualityResult} DataQualityResult instance - */ - DataQualityResult.create = function create(properties) { - return new DataQualityResult(properties); - }; + /** + * Constructs a new ListLakeActionsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListLakeActionsRequest. + * @implements IListLakeActionsRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest=} [properties] Properties to set + */ + function ListLakeActionsRequest(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]]; + } - /** - * Encodes the specified DataQualityResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult - * @static - * @param {google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult} message DataQualityResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataQualityResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.rowCount); - if (message.passed != null && Object.hasOwnProperty.call(message, "passed")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.passed); - if (message.dimensionPassed != null && Object.hasOwnProperty.call(message, "dimensionPassed")) - for (var keys = Object.keys(message.dimensionPassed), 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 0 =*/16).bool(message.dimensionPassed[keys[i]]).ldelim(); - return writer; - }; + /** + * ListLakeActionsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @instance + */ + ListLakeActionsRequest.prototype.parent = ""; - /** - * Encodes the specified DataQualityResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult - * @static - * @param {google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult} message DataQualityResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataQualityResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataQualityResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DataScanEvent.DataQualityResult} DataQualityResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataQualityResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.rowCount = reader.int64(); - break; - } - case 2: { - message.passed = reader.bool(); - break; - } - case 3: { - if (message.dimensionPassed === $util.emptyObject) - message.dimensionPassed = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = false; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.bool(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.dimensionPassed[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataQualityResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DataScanEvent.DataQualityResult} DataQualityResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataQualityResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataQualityResult message. - * @function verify - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataQualityResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rowCount != null && message.hasOwnProperty("rowCount")) - if (!$util.isInteger(message.rowCount) && !(message.rowCount && $util.isInteger(message.rowCount.low) && $util.isInteger(message.rowCount.high))) - return "rowCount: integer|Long expected"; - if (message.passed != null && message.hasOwnProperty("passed")) - if (typeof message.passed !== "boolean") - return "passed: boolean expected"; - if (message.dimensionPassed != null && message.hasOwnProperty("dimensionPassed")) { - if (!$util.isObject(message.dimensionPassed)) - return "dimensionPassed: object expected"; - var key = Object.keys(message.dimensionPassed); - for (var i = 0; i < key.length; ++i) - if (typeof message.dimensionPassed[key[i]] !== "boolean") - return "dimensionPassed: boolean{k:string} expected"; - } - return null; - }; - - /** - * Creates a DataQualityResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DataScanEvent.DataQualityResult} DataQualityResult - */ - DataQualityResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult) - return object; - var message = new $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult(); - if (object.rowCount != null) - if ($util.Long) - (message.rowCount = $util.Long.fromValue(object.rowCount)).unsigned = false; - else if (typeof object.rowCount === "string") - message.rowCount = parseInt(object.rowCount, 10); - else if (typeof object.rowCount === "number") - message.rowCount = object.rowCount; - else if (typeof object.rowCount === "object") - message.rowCount = new $util.LongBits(object.rowCount.low >>> 0, object.rowCount.high >>> 0).toNumber(); - if (object.passed != null) - message.passed = Boolean(object.passed); - if (object.dimensionPassed) { - if (typeof object.dimensionPassed !== "object") - throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.dimensionPassed: object expected"); - message.dimensionPassed = {}; - for (var keys = Object.keys(object.dimensionPassed), i = 0; i < keys.length; ++i) - message.dimensionPassed[keys[i]] = Boolean(object.dimensionPassed[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from a DataQualityResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult - * @static - * @param {google.cloud.dataplex.v1.DataScanEvent.DataQualityResult} message DataQualityResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataQualityResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.dimensionPassed = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.rowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.rowCount = options.longs === String ? "0" : 0; - object.passed = false; - } - if (message.rowCount != null && message.hasOwnProperty("rowCount")) - if (typeof message.rowCount === "number") - object.rowCount = options.longs === String ? String(message.rowCount) : message.rowCount; - else - object.rowCount = options.longs === String ? $util.Long.prototype.toString.call(message.rowCount) : options.longs === Number ? new $util.LongBits(message.rowCount.low >>> 0, message.rowCount.high >>> 0).toNumber() : message.rowCount; - if (message.passed != null && message.hasOwnProperty("passed")) - object.passed = message.passed; - var keys2; - if (message.dimensionPassed && (keys2 = Object.keys(message.dimensionPassed)).length) { - object.dimensionPassed = {}; - for (var j = 0; j < keys2.length; ++j) - object.dimensionPassed[keys2[j]] = message.dimensionPassed[keys2[j]]; - } - return object; - }; - - /** - * Converts this DataQualityResult to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult - * @instance - * @returns {Object.} JSON object - */ - DataQualityResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataQualityResult - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataQualityResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScanEvent.DataQualityResult"; - }; - - return DataQualityResult; - })(); - - return DataScanEvent; - })(); - - v1.MetadataService = (function() { + /** + * ListLakeActionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @instance + */ + ListLakeActionsRequest.prototype.pageSize = 0; /** - * Constructs a new MetadataService service. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a MetadataService - * @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 + * ListLakeActionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @instance */ - function MetadataService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (MetadataService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MetadataService; + ListLakeActionsRequest.prototype.pageToken = ""; /** - * Creates new MetadataService service using the specified rpc implementation. + * Creates a new ListLakeActionsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.MetadataService + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest * @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 {MetadataService} RPC service. Useful where requests and/or responses are streamed. + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest instance */ - MetadataService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); + ListLakeActionsRequest.create = function create(properties) { + return new ListLakeActionsRequest(properties); }; /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|createEntity}. - * @memberof google.cloud.dataplex.v1.MetadataService - * @typedef CreateEntityCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Entity} [response] Entity + * Encodes the specified ListLakeActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} message ListLakeActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + ListLakeActionsRequest.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); + return writer; + }; /** - * Calls CreateEntity. - * @function createEntity - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.ICreateEntityRequest} request CreateEntityRequest message or plain object - * @param {google.cloud.dataplex.v1.MetadataService.CreateEntityCallback} callback Node-style callback called with the error, if any, and Entity - * @returns {undefined} - * @variation 1 + * Encodes the specified ListLakeActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} message ListLakeActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(MetadataService.prototype.createEntity = function createEntity(request, callback) { - return this.rpcCall(createEntity, $root.google.cloud.dataplex.v1.CreateEntityRequest, $root.google.cloud.dataplex.v1.Entity, request, callback); - }, "name", { value: "CreateEntity" }); + ListLakeActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls CreateEntity. - * @function createEntity - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.ICreateEntityRequest} request CreateEntityRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a ListLakeActionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ListLakeActionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListLakeActionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|updateEntity}. - * @memberof google.cloud.dataplex.v1.MetadataService - * @typedef UpdateEntityCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Entity} [response] Entity + * Decodes a ListLakeActionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ListLakeActionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls UpdateEntity. - * @function updateEntity - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateEntityRequest} request UpdateEntityRequest message or plain object - * @param {google.cloud.dataplex.v1.MetadataService.UpdateEntityCallback} callback Node-style callback called with the error, if any, and Entity - * @returns {undefined} - * @variation 1 + * Verifies a ListLakeActionsRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(MetadataService.prototype.updateEntity = function updateEntity(request, callback) { - return this.rpcCall(updateEntity, $root.google.cloud.dataplex.v1.UpdateEntityRequest, $root.google.cloud.dataplex.v1.Entity, request, callback); - }, "name", { value: "UpdateEntity" }); + ListLakeActionsRequest.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"; + return null; + }; /** - * Calls UpdateEntity. - * @function updateEntity - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateEntityRequest} request UpdateEntityRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a ListLakeActionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest */ + ListLakeActionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListLakeActionsRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListLakeActionsRequest(); + 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); + return message; + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|deleteEntity}. - * @memberof google.cloud.dataplex.v1.MetadataService - * @typedef DeleteEntityCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Creates a plain object from a ListLakeActionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {google.cloud.dataplex.v1.ListLakeActionsRequest} message ListLakeActionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + ListLakeActionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + 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; + return object; + }; /** - * Calls DeleteEntity. - * @function deleteEntity - * @memberof google.cloud.dataplex.v1.MetadataService + * Converts this ListLakeActionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest * @instance - * @param {google.cloud.dataplex.v1.IDeleteEntityRequest} request DeleteEntityRequest message or plain object - * @param {google.cloud.dataplex.v1.MetadataService.DeleteEntityCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(MetadataService.prototype.deleteEntity = function deleteEntity(request, callback) { - return this.rpcCall(deleteEntity, $root.google.cloud.dataplex.v1.DeleteEntityRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteEntity" }); + ListLakeActionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls DeleteEntity. - * @function deleteEntity - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteEntityRequest} request DeleteEntityRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for ListLakeActionsRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + ListLakeActionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListLakeActionsRequest"; + }; + + return ListLakeActionsRequest; + })(); + + v1.ListActionsResponse = (function() { /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|getEntity}. - * @memberof google.cloud.dataplex.v1.MetadataService - * @typedef GetEntityCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Entity} [response] Entity + * Properties of a ListActionsResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListActionsResponse + * @property {Array.|null} [actions] ListActionsResponse actions + * @property {string|null} [nextPageToken] ListActionsResponse nextPageToken */ /** - * Calls GetEntity. - * @function getEntity - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.IGetEntityRequest} request GetEntityRequest message or plain object - * @param {google.cloud.dataplex.v1.MetadataService.GetEntityCallback} callback Node-style callback called with the error, if any, and Entity - * @returns {undefined} - * @variation 1 + * Constructs a new ListActionsResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListActionsResponse. + * @implements IListActionsResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListActionsResponse=} [properties] Properties to set */ - Object.defineProperty(MetadataService.prototype.getEntity = function getEntity(request, callback) { - return this.rpcCall(getEntity, $root.google.cloud.dataplex.v1.GetEntityRequest, $root.google.cloud.dataplex.v1.Entity, request, callback); - }, "name", { value: "GetEntity" }); + function ListActionsResponse(properties) { + this.actions = []; + 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]]; + } /** - * Calls GetEntity. - * @function getEntity - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.IGetEntityRequest} request GetEntityRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|listEntities}. - * @memberof google.cloud.dataplex.v1.MetadataService - * @typedef ListEntitiesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListEntitiesResponse} [response] ListEntitiesResponse - */ - - /** - * Calls ListEntities. - * @function listEntities - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.IListEntitiesRequest} request ListEntitiesRequest message or plain object - * @param {google.cloud.dataplex.v1.MetadataService.ListEntitiesCallback} callback Node-style callback called with the error, if any, and ListEntitiesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MetadataService.prototype.listEntities = function listEntities(request, callback) { - return this.rpcCall(listEntities, $root.google.cloud.dataplex.v1.ListEntitiesRequest, $root.google.cloud.dataplex.v1.ListEntitiesResponse, request, callback); - }, "name", { value: "ListEntities" }); - - /** - * Calls ListEntities. - * @function listEntities - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.IListEntitiesRequest} request ListEntitiesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|createPartition}. - * @memberof google.cloud.dataplex.v1.MetadataService - * @typedef CreatePartitionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Partition} [response] Partition - */ - - /** - * Calls CreatePartition. - * @function createPartition - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.ICreatePartitionRequest} request CreatePartitionRequest message or plain object - * @param {google.cloud.dataplex.v1.MetadataService.CreatePartitionCallback} callback Node-style callback called with the error, if any, and Partition - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MetadataService.prototype.createPartition = function createPartition(request, callback) { - return this.rpcCall(createPartition, $root.google.cloud.dataplex.v1.CreatePartitionRequest, $root.google.cloud.dataplex.v1.Partition, request, callback); - }, "name", { value: "CreatePartition" }); - - /** - * Calls CreatePartition. - * @function createPartition - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.ICreatePartitionRequest} request CreatePartitionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|deletePartition}. - * @memberof google.cloud.dataplex.v1.MetadataService - * @typedef DeletePartitionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeletePartition. - * @function deletePartition - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.IDeletePartitionRequest} request DeletePartitionRequest message or plain object - * @param {google.cloud.dataplex.v1.MetadataService.DeletePartitionCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MetadataService.prototype.deletePartition = function deletePartition(request, callback) { - return this.rpcCall(deletePartition, $root.google.cloud.dataplex.v1.DeletePartitionRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeletePartition" }); - - /** - * Calls DeletePartition. - * @function deletePartition - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.IDeletePartitionRequest} request DeletePartitionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|getPartition}. - * @memberof google.cloud.dataplex.v1.MetadataService - * @typedef GetPartitionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Partition} [response] Partition - */ - - /** - * Calls GetPartition. - * @function getPartition - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.IGetPartitionRequest} request GetPartitionRequest message or plain object - * @param {google.cloud.dataplex.v1.MetadataService.GetPartitionCallback} callback Node-style callback called with the error, if any, and Partition - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MetadataService.prototype.getPartition = function getPartition(request, callback) { - return this.rpcCall(getPartition, $root.google.cloud.dataplex.v1.GetPartitionRequest, $root.google.cloud.dataplex.v1.Partition, request, callback); - }, "name", { value: "GetPartition" }); - - /** - * Calls GetPartition. - * @function getPartition - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.IGetPartitionRequest} request GetPartitionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|listPartitions}. - * @memberof google.cloud.dataplex.v1.MetadataService - * @typedef ListPartitionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListPartitionsResponse} [response] ListPartitionsResponse - */ - - /** - * Calls ListPartitions. - * @function listPartitions - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.IListPartitionsRequest} request ListPartitionsRequest message or plain object - * @param {google.cloud.dataplex.v1.MetadataService.ListPartitionsCallback} callback Node-style callback called with the error, if any, and ListPartitionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MetadataService.prototype.listPartitions = function listPartitions(request, callback) { - return this.rpcCall(listPartitions, $root.google.cloud.dataplex.v1.ListPartitionsRequest, $root.google.cloud.dataplex.v1.ListPartitionsResponse, request, callback); - }, "name", { value: "ListPartitions" }); - - /** - * Calls ListPartitions. - * @function listPartitions - * @memberof google.cloud.dataplex.v1.MetadataService - * @instance - * @param {google.cloud.dataplex.v1.IListPartitionsRequest} request ListPartitionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return MetadataService; - })(); - - v1.CreateEntityRequest = (function() { - - /** - * Properties of a CreateEntityRequest. - * @memberof google.cloud.dataplex.v1 - * @interface ICreateEntityRequest - * @property {string|null} [parent] CreateEntityRequest parent - * @property {google.cloud.dataplex.v1.IEntity|null} [entity] CreateEntityRequest entity - * @property {boolean|null} [validateOnly] CreateEntityRequest validateOnly - */ - - /** - * Constructs a new CreateEntityRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CreateEntityRequest. - * @implements ICreateEntityRequest - * @constructor - * @param {google.cloud.dataplex.v1.ICreateEntityRequest=} [properties] Properties to set - */ - function CreateEntityRequest(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]]; - } - - /** - * CreateEntityRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.CreateEntityRequest - * @instance - */ - CreateEntityRequest.prototype.parent = ""; - - /** - * CreateEntityRequest entity. - * @member {google.cloud.dataplex.v1.IEntity|null|undefined} entity - * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * ListActionsResponse actions. + * @member {Array.} actions + * @memberof google.cloud.dataplex.v1.ListActionsResponse * @instance */ - CreateEntityRequest.prototype.entity = null; + ListActionsResponse.prototype.actions = $util.emptyArray; /** - * CreateEntityRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * ListActionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListActionsResponse * @instance */ - CreateEntityRequest.prototype.validateOnly = false; + ListActionsResponse.prototype.nextPageToken = ""; /** - * Creates a new CreateEntityRequest instance using the specified properties. + * Creates a new ListActionsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @memberof google.cloud.dataplex.v1.ListActionsResponse * @static - * @param {google.cloud.dataplex.v1.ICreateEntityRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CreateEntityRequest} CreateEntityRequest instance + * @param {google.cloud.dataplex.v1.IListActionsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse instance */ - CreateEntityRequest.create = function create(properties) { - return new CreateEntityRequest(properties); + ListActionsResponse.create = function create(properties) { + return new ListActionsResponse(properties); }; /** - * Encodes the specified CreateEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntityRequest.verify|verify} messages. + * Encodes the specified ListActionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @memberof google.cloud.dataplex.v1.ListActionsResponse * @static - * @param {google.cloud.dataplex.v1.ICreateEntityRequest} message CreateEntityRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListActionsResponse} message ListActionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateEntityRequest.encode = function encode(message, writer) { + ListActionsResponse.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.entity != null && Object.hasOwnProperty.call(message, "entity")) - $root.google.cloud.dataplex.v1.Entity.encode(message.entity, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + if (message.actions != null && message.actions.length) + for (var i = 0; i < message.actions.length; ++i) + $root.google.cloud.dataplex.v1.Action.encode(message.actions[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 CreateEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntityRequest.verify|verify} messages. + * Encodes the specified ListActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @memberof google.cloud.dataplex.v1.ListActionsResponse * @static - * @param {google.cloud.dataplex.v1.ICreateEntityRequest} message CreateEntityRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListActionsResponse} message ListActionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateEntityRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListActionsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateEntityRequest message from the specified reader or buffer. + * Decodes a ListActionsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @memberof google.cloud.dataplex.v1.ListActionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CreateEntityRequest} CreateEntityRequest + * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateEntityRequest.decode = function decode(reader, length) { + ListActionsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateEntityRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListActionsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 3: { - message.entity = $root.google.cloud.dataplex.v1.Entity.decode(reader, reader.uint32()); + if (!(message.actions && message.actions.length)) + message.actions = []; + message.actions.push($root.google.cloud.dataplex.v1.Action.decode(reader, reader.uint32())); break; } - case 4: { - message.validateOnly = reader.bool(); + case 2: { + message.nextPageToken = reader.string(); break; } default: @@ -30744,145 +29131,148 @@ }; /** - * Decodes a CreateEntityRequest message from the specified reader or buffer, length delimited. + * Decodes a ListActionsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @memberof google.cloud.dataplex.v1.ListActionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CreateEntityRequest} CreateEntityRequest + * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateEntityRequest.decodeDelimited = function decodeDelimited(reader) { + ListActionsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateEntityRequest message. + * Verifies a ListActionsResponse message. * @function verify - * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @memberof google.cloud.dataplex.v1.ListActionsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateEntityRequest.verify = function verify(message) { + ListActionsResponse.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.entity != null && message.hasOwnProperty("entity")) { - var error = $root.google.cloud.dataplex.v1.Entity.verify(message.entity); - if (error) - return "entity." + error; + if (message.actions != null && message.hasOwnProperty("actions")) { + if (!Array.isArray(message.actions)) + return "actions: array expected"; + for (var i = 0; i < message.actions.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Action.verify(message.actions[i]); + if (error) + return "actions." + error; + } } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a CreateEntityRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListActionsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @memberof google.cloud.dataplex.v1.ListActionsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CreateEntityRequest} CreateEntityRequest + * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse */ - CreateEntityRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CreateEntityRequest) + ListActionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListActionsResponse) return object; - var message = new $root.google.cloud.dataplex.v1.CreateEntityRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.entity != null) { - if (typeof object.entity !== "object") - throw TypeError(".google.cloud.dataplex.v1.CreateEntityRequest.entity: object expected"); - message.entity = $root.google.cloud.dataplex.v1.Entity.fromObject(object.entity); + var message = new $root.google.cloud.dataplex.v1.ListActionsResponse(); + if (object.actions) { + if (!Array.isArray(object.actions)) + throw TypeError(".google.cloud.dataplex.v1.ListActionsResponse.actions: array expected"); + message.actions = []; + for (var i = 0; i < object.actions.length; ++i) { + if (typeof object.actions[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListActionsResponse.actions: object expected"); + message.actions[i] = $root.google.cloud.dataplex.v1.Action.fromObject(object.actions[i]); + } } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a CreateEntityRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListActionsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @memberof google.cloud.dataplex.v1.ListActionsResponse * @static - * @param {google.cloud.dataplex.v1.CreateEntityRequest} message CreateEntityRequest + * @param {google.cloud.dataplex.v1.ListActionsResponse} message ListActionsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateEntityRequest.toObject = function toObject(message, options) { + ListActionsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.entity = null; - object.validateOnly = false; + if (options.arrays || options.defaults) + object.actions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.actions && message.actions.length) { + object.actions = []; + for (var j = 0; j < message.actions.length; ++j) + object.actions[j] = $root.google.cloud.dataplex.v1.Action.toObject(message.actions[j], options); } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.entity != null && message.hasOwnProperty("entity")) - object.entity = $root.google.cloud.dataplex.v1.Entity.toObject(message.entity, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this CreateEntityRequest to JSON. + * Converts this ListActionsResponse to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @memberof google.cloud.dataplex.v1.ListActionsResponse * @instance * @returns {Object.} JSON object */ - CreateEntityRequest.prototype.toJSON = function toJSON() { + ListActionsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateEntityRequest + * Gets the default type url for ListActionsResponse * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.CreateEntityRequest + * @memberof google.cloud.dataplex.v1.ListActionsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateEntityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListActionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateEntityRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListActionsResponse"; }; - return CreateEntityRequest; + return ListActionsResponse; })(); - v1.UpdateEntityRequest = (function() { + v1.GetLakeRequest = (function() { /** - * Properties of an UpdateEntityRequest. + * Properties of a GetLakeRequest. * @memberof google.cloud.dataplex.v1 - * @interface IUpdateEntityRequest - * @property {google.cloud.dataplex.v1.IEntity|null} [entity] UpdateEntityRequest entity - * @property {boolean|null} [validateOnly] UpdateEntityRequest validateOnly + * @interface IGetLakeRequest + * @property {string|null} [name] GetLakeRequest name */ /** - * Constructs a new UpdateEntityRequest. + * Constructs a new GetLakeRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an UpdateEntityRequest. - * @implements IUpdateEntityRequest + * @classdesc Represents a GetLakeRequest. + * @implements IGetLakeRequest * @constructor - * @param {google.cloud.dataplex.v1.IUpdateEntityRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IGetLakeRequest=} [properties] Properties to set */ - function UpdateEntityRequest(properties) { + function GetLakeRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -30890,89 +29280,75 @@ } /** - * UpdateEntityRequest entity. - * @member {google.cloud.dataplex.v1.IEntity|null|undefined} entity - * @memberof google.cloud.dataplex.v1.UpdateEntityRequest - * @instance - */ - UpdateEntityRequest.prototype.entity = null; - - /** - * UpdateEntityRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * GetLakeRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetLakeRequest * @instance */ - UpdateEntityRequest.prototype.validateOnly = false; + GetLakeRequest.prototype.name = ""; /** - * Creates a new UpdateEntityRequest instance using the specified properties. + * Creates a new GetLakeRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * @memberof google.cloud.dataplex.v1.GetLakeRequest * @static - * @param {google.cloud.dataplex.v1.IUpdateEntityRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.UpdateEntityRequest} UpdateEntityRequest instance + * @param {google.cloud.dataplex.v1.IGetLakeRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest instance */ - UpdateEntityRequest.create = function create(properties) { - return new UpdateEntityRequest(properties); + GetLakeRequest.create = function create(properties) { + return new GetLakeRequest(properties); }; /** - * Encodes the specified UpdateEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntityRequest.verify|verify} messages. + * Encodes the specified GetLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * @memberof google.cloud.dataplex.v1.GetLakeRequest * @static - * @param {google.cloud.dataplex.v1.IUpdateEntityRequest} message UpdateEntityRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetLakeRequest} message GetLakeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateEntityRequest.encode = function encode(message, writer) { + GetLakeRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) - $root.google.cloud.dataplex.v1.Entity.encode(message.entity, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified UpdateEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntityRequest.verify|verify} messages. + * Encodes the specified GetLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * @memberof google.cloud.dataplex.v1.GetLakeRequest * @static - * @param {google.cloud.dataplex.v1.IUpdateEntityRequest} message UpdateEntityRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetLakeRequest} message GetLakeRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateEntityRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateEntityRequest message from the specified reader or buffer. + * Decodes a GetLakeRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * @memberof google.cloud.dataplex.v1.GetLakeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.UpdateEntityRequest} UpdateEntityRequest + * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateEntityRequest.decode = function decode(reader, length) { + GetLakeRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateEntityRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetLakeRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: { - message.entity = $root.google.cloud.dataplex.v1.Entity.decode(reader, reader.uint32()); - break; - } - case 3: { - message.validateOnly = reader.bool(); + case 1: { + message.name = reader.string(); break; } default: @@ -30984,137 +29360,125 @@ }; /** - * Decodes an UpdateEntityRequest message from the specified reader or buffer, length delimited. + * Decodes a GetLakeRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * @memberof google.cloud.dataplex.v1.GetLakeRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.UpdateEntityRequest} UpdateEntityRequest + * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateEntityRequest.decodeDelimited = function decodeDelimited(reader) { + GetLakeRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateEntityRequest message. + * Verifies a GetLakeRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * @memberof google.cloud.dataplex.v1.GetLakeRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateEntityRequest.verify = function verify(message) { + GetLakeRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.entity != null && message.hasOwnProperty("entity")) { - var error = $root.google.cloud.dataplex.v1.Entity.verify(message.entity); - if (error) - return "entity." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an UpdateEntityRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetLakeRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * @memberof google.cloud.dataplex.v1.GetLakeRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.UpdateEntityRequest} UpdateEntityRequest + * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest */ - UpdateEntityRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.UpdateEntityRequest) + GetLakeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetLakeRequest) return object; - var message = new $root.google.cloud.dataplex.v1.UpdateEntityRequest(); - if (object.entity != null) { - if (typeof object.entity !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateEntityRequest.entity: object expected"); - message.entity = $root.google.cloud.dataplex.v1.Entity.fromObject(object.entity); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); + var message = new $root.google.cloud.dataplex.v1.GetLakeRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an UpdateEntityRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetLakeRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * @memberof google.cloud.dataplex.v1.GetLakeRequest * @static - * @param {google.cloud.dataplex.v1.UpdateEntityRequest} message UpdateEntityRequest + * @param {google.cloud.dataplex.v1.GetLakeRequest} message GetLakeRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateEntityRequest.toObject = function toObject(message, options) { + GetLakeRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.entity = null; - object.validateOnly = false; - } - if (message.entity != null && message.hasOwnProperty("entity")) - object.entity = $root.google.cloud.dataplex.v1.Entity.toObject(message.entity, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this UpdateEntityRequest to JSON. + * Converts this GetLakeRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * @memberof google.cloud.dataplex.v1.GetLakeRequest * @instance * @returns {Object.} JSON object */ - UpdateEntityRequest.prototype.toJSON = function toJSON() { + GetLakeRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateEntityRequest + * Gets the default type url for GetLakeRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.UpdateEntityRequest + * @memberof google.cloud.dataplex.v1.GetLakeRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateEntityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetLakeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateEntityRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetLakeRequest"; }; - return UpdateEntityRequest; + return GetLakeRequest; })(); - v1.DeleteEntityRequest = (function() { + v1.CreateZoneRequest = (function() { /** - * Properties of a DeleteEntityRequest. + * Properties of a CreateZoneRequest. * @memberof google.cloud.dataplex.v1 - * @interface IDeleteEntityRequest - * @property {string|null} [name] DeleteEntityRequest name - * @property {string|null} [etag] DeleteEntityRequest etag + * @interface ICreateZoneRequest + * @property {string|null} [parent] CreateZoneRequest parent + * @property {string|null} [zoneId] CreateZoneRequest zoneId + * @property {google.cloud.dataplex.v1.IZone|null} [zone] CreateZoneRequest zone + * @property {boolean|null} [validateOnly] CreateZoneRequest validateOnly */ /** - * Constructs a new DeleteEntityRequest. + * Constructs a new CreateZoneRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DeleteEntityRequest. - * @implements IDeleteEntityRequest + * @classdesc Represents a CreateZoneRequest. + * @implements ICreateZoneRequest * @constructor - * @param {google.cloud.dataplex.v1.IDeleteEntityRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.ICreateZoneRequest=} [properties] Properties to set */ - function DeleteEntityRequest(properties) { + function CreateZoneRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31122,89 +29486,117 @@ } /** - * DeleteEntityRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * CreateZoneRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @instance */ - DeleteEntityRequest.prototype.name = ""; + CreateZoneRequest.prototype.parent = ""; /** - * DeleteEntityRequest etag. - * @member {string} etag - * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * CreateZoneRequest zoneId. + * @member {string} zoneId + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @instance */ - DeleteEntityRequest.prototype.etag = ""; + CreateZoneRequest.prototype.zoneId = ""; /** - * Creates a new DeleteEntityRequest instance using the specified properties. + * CreateZoneRequest zone. + * @member {google.cloud.dataplex.v1.IZone|null|undefined} zone + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @instance + */ + CreateZoneRequest.prototype.zone = null; + + /** + * CreateZoneRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateZoneRequest + * @instance + */ + CreateZoneRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateZoneRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @static - * @param {google.cloud.dataplex.v1.IDeleteEntityRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DeleteEntityRequest} DeleteEntityRequest instance + * @param {google.cloud.dataplex.v1.ICreateZoneRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest instance */ - DeleteEntityRequest.create = function create(properties) { - return new DeleteEntityRequest(properties); + CreateZoneRequest.create = function create(properties) { + return new CreateZoneRequest(properties); }; /** - * Encodes the specified DeleteEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEntityRequest.verify|verify} messages. + * Encodes the specified CreateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @static - * @param {google.cloud.dataplex.v1.IDeleteEntityRequest} message DeleteEntityRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.ICreateZoneRequest} message CreateZoneRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteEntityRequest.encode = function encode(message, writer) { + CreateZoneRequest.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.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.zoneId != null && Object.hasOwnProperty.call(message, "zoneId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zoneId); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + $root.google.cloud.dataplex.v1.Zone.encode(message.zone, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); return writer; }; /** - * Encodes the specified DeleteEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEntityRequest.verify|verify} messages. + * Encodes the specified CreateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @static - * @param {google.cloud.dataplex.v1.IDeleteEntityRequest} message DeleteEntityRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.ICreateZoneRequest} message CreateZoneRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteEntityRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteEntityRequest message from the specified reader or buffer. + * Decodes a CreateZoneRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DeleteEntityRequest} DeleteEntityRequest + * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteEntityRequest.decode = function decode(reader, length) { + CreateZoneRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteEntityRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateZoneRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.etag = reader.string(); + message.zoneId = reader.string(); + break; + } + case 3: { + message.zone = $root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32()); + break; + } + case 4: { + message.validateOnly = reader.bool(); break; } default: @@ -31216,135 +29608,154 @@ }; /** - * Decodes a DeleteEntityRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateZoneRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DeleteEntityRequest} DeleteEntityRequest + * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteEntityRequest.decodeDelimited = function decodeDelimited(reader) { + CreateZoneRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteEntityRequest message. + * Verifies a CreateZoneRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteEntityRequest.verify = function verify(message) { + CreateZoneRequest.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.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.zoneId != null && message.hasOwnProperty("zoneId")) + if (!$util.isString(message.zoneId)) + return "zoneId: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) { + var error = $root.google.cloud.dataplex.v1.Zone.verify(message.zone); + if (error) + return "zone." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a DeleteEntityRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateZoneRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DeleteEntityRequest} DeleteEntityRequest + * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest */ - DeleteEntityRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DeleteEntityRequest) + CreateZoneRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateZoneRequest) return object; - var message = new $root.google.cloud.dataplex.v1.DeleteEntityRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.etag != null) - message.etag = String(object.etag); + var message = new $root.google.cloud.dataplex.v1.CreateZoneRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.zoneId != null) + message.zoneId = String(object.zoneId); + if (object.zone != null) { + if (typeof object.zone !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateZoneRequest.zone: object expected"); + message.zone = $root.google.cloud.dataplex.v1.Zone.fromObject(object.zone); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a DeleteEntityRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateZoneRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @static - * @param {google.cloud.dataplex.v1.DeleteEntityRequest} message DeleteEntityRequest + * @param {google.cloud.dataplex.v1.CreateZoneRequest} message CreateZoneRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteEntityRequest.toObject = function toObject(message, options) { + CreateZoneRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.etag = ""; + object.parent = ""; + object.zoneId = ""; + object.zone = null; + object.validateOnly = false; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.zoneId != null && message.hasOwnProperty("zoneId")) + object.zoneId = message.zoneId; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = $root.google.cloud.dataplex.v1.Zone.toObject(message.zone, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this DeleteEntityRequest to JSON. + * Converts this CreateZoneRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @instance * @returns {Object.} JSON object */ - DeleteEntityRequest.prototype.toJSON = function toJSON() { + CreateZoneRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteEntityRequest + * Gets the default type url for CreateZoneRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @memberof google.cloud.dataplex.v1.CreateZoneRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteEntityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateZoneRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteEntityRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateZoneRequest"; }; - return DeleteEntityRequest; + return CreateZoneRequest; })(); - v1.ListEntitiesRequest = (function() { + v1.UpdateZoneRequest = (function() { /** - * Properties of a ListEntitiesRequest. + * Properties of an UpdateZoneRequest. * @memberof google.cloud.dataplex.v1 - * @interface IListEntitiesRequest - * @property {string|null} [parent] ListEntitiesRequest parent - * @property {google.cloud.dataplex.v1.ListEntitiesRequest.EntityView|null} [view] ListEntitiesRequest view - * @property {number|null} [pageSize] ListEntitiesRequest pageSize - * @property {string|null} [pageToken] ListEntitiesRequest pageToken - * @property {string|null} [filter] ListEntitiesRequest filter + * @interface IUpdateZoneRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateZoneRequest updateMask + * @property {google.cloud.dataplex.v1.IZone|null} [zone] UpdateZoneRequest zone + * @property {boolean|null} [validateOnly] UpdateZoneRequest validateOnly */ /** - * Constructs a new ListEntitiesRequest. + * Constructs a new UpdateZoneRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListEntitiesRequest. - * @implements IListEntitiesRequest + * @classdesc Represents an UpdateZoneRequest. + * @implements IUpdateZoneRequest * @constructor - * @param {google.cloud.dataplex.v1.IListEntitiesRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest=} [properties] Properties to set */ - function ListEntitiesRequest(properties) { + function UpdateZoneRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31352,131 +29763,103 @@ } /** - * ListEntitiesRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest - * @instance - */ - ListEntitiesRequest.prototype.parent = ""; - - /** - * ListEntitiesRequest view. - * @member {google.cloud.dataplex.v1.ListEntitiesRequest.EntityView} view - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest - * @instance - */ - ListEntitiesRequest.prototype.view = 0; - - /** - * ListEntitiesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * UpdateZoneRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @instance */ - ListEntitiesRequest.prototype.pageSize = 0; + UpdateZoneRequest.prototype.updateMask = null; /** - * ListEntitiesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * UpdateZoneRequest zone. + * @member {google.cloud.dataplex.v1.IZone|null|undefined} zone + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @instance */ - ListEntitiesRequest.prototype.pageToken = ""; + UpdateZoneRequest.prototype.zone = null; /** - * ListEntitiesRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * UpdateZoneRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @instance */ - ListEntitiesRequest.prototype.filter = ""; + UpdateZoneRequest.prototype.validateOnly = false; /** - * Creates a new ListEntitiesRequest instance using the specified properties. + * Creates a new UpdateZoneRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @static - * @param {google.cloud.dataplex.v1.IListEntitiesRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListEntitiesRequest} ListEntitiesRequest instance + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest instance */ - ListEntitiesRequest.create = function create(properties) { - return new ListEntitiesRequest(properties); + UpdateZoneRequest.create = function create(properties) { + return new UpdateZoneRequest(properties); }; /** - * Encodes the specified ListEntitiesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesRequest.verify|verify} messages. + * Encodes the specified UpdateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @static - * @param {google.cloud.dataplex.v1.IListEntitiesRequest} message ListEntitiesRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} message UpdateZoneRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEntitiesRequest.encode = function encode(message, writer) { + UpdateZoneRequest.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.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + $root.google.cloud.dataplex.v1.Zone.encode(message.zone, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); return writer; }; /** - * Encodes the specified ListEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesRequest.verify|verify} messages. + * Encodes the specified UpdateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @static - * @param {google.cloud.dataplex.v1.IListEntitiesRequest} message ListEntitiesRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} message UpdateZoneRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEntitiesRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListEntitiesRequest message from the specified reader or buffer. + * Decodes an UpdateZoneRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListEntitiesRequest} ListEntitiesRequest + * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEntitiesRequest.decode = function decode(reader, length) { + UpdateZoneRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListEntitiesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateZoneRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } case 2: { - message.view = reader.int32(); + message.zone = $root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32()); break; } case 3: { - message.pageSize = reader.int32(); - break; - } - case 4: { - message.pageToken = reader.string(); - break; - } - case 5: { - message.filter = reader.string(); + message.validateOnly = reader.bool(); break; } default: @@ -31488,197 +29871,149 @@ }; /** - * Decodes a ListEntitiesRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateZoneRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListEntitiesRequest} ListEntitiesRequest + * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEntitiesRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateZoneRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListEntitiesRequest message. + * Verifies an UpdateZoneRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListEntitiesRequest.verify = function verify(message) { + UpdateZoneRequest.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.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - break; - } - 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.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.zone != null && message.hasOwnProperty("zone")) { + var error = $root.google.cloud.dataplex.v1.Zone.verify(message.zone); + if (error) + return "zone." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a ListEntitiesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateZoneRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListEntitiesRequest} ListEntitiesRequest + * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest */ - ListEntitiesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListEntitiesRequest) + UpdateZoneRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateZoneRequest) return object; - var message = new $root.google.cloud.dataplex.v1.ListEntitiesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - switch (object.view) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - case "ENTITY_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "TABLES": - case 1: - message.view = 1; - break; - case "FILESETS": - case 2: - message.view = 2; - break; + var message = new $root.google.cloud.dataplex.v1.UpdateZoneRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateZoneRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); + if (object.zone != null) { + if (typeof object.zone !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateZoneRequest.zone: object expected"); + message.zone = $root.google.cloud.dataplex.v1.Zone.fromObject(object.zone); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a ListEntitiesRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateZoneRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @static - * @param {google.cloud.dataplex.v1.ListEntitiesRequest} message ListEntitiesRequest + * @param {google.cloud.dataplex.v1.UpdateZoneRequest} message UpdateZoneRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListEntitiesRequest.toObject = function toObject(message, options) { + UpdateZoneRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.view = options.enums === String ? "ENTITY_VIEW_UNSPECIFIED" : 0; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; + object.updateMask = null; + object.zone = null; + object.validateOnly = false; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.dataplex.v1.ListEntitiesRequest.EntityView[message.view] === undefined ? message.view : $root.google.cloud.dataplex.v1.ListEntitiesRequest.EntityView[message.view] : message.view; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = $root.google.cloud.dataplex.v1.Zone.toObject(message.zone, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this ListEntitiesRequest to JSON. + * Converts this UpdateZoneRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @instance * @returns {Object.} JSON object */ - ListEntitiesRequest.prototype.toJSON = function toJSON() { + UpdateZoneRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListEntitiesRequest + * Gets the default type url for UpdateZoneRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @memberof google.cloud.dataplex.v1.UpdateZoneRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListEntitiesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateZoneRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListEntitiesRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateZoneRequest"; }; - /** - * EntityView enum. - * @name google.cloud.dataplex.v1.ListEntitiesRequest.EntityView - * @enum {number} - * @property {number} ENTITY_VIEW_UNSPECIFIED=0 ENTITY_VIEW_UNSPECIFIED value - * @property {number} TABLES=1 TABLES value - * @property {number} FILESETS=2 FILESETS value - */ - ListEntitiesRequest.EntityView = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENTITY_VIEW_UNSPECIFIED"] = 0; - values[valuesById[1] = "TABLES"] = 1; - values[valuesById[2] = "FILESETS"] = 2; - return values; - })(); - - return ListEntitiesRequest; + return UpdateZoneRequest; })(); - v1.ListEntitiesResponse = (function() { + v1.DeleteZoneRequest = (function() { /** - * Properties of a ListEntitiesResponse. + * Properties of a DeleteZoneRequest. * @memberof google.cloud.dataplex.v1 - * @interface IListEntitiesResponse - * @property {Array.|null} [entities] ListEntitiesResponse entities - * @property {string|null} [nextPageToken] ListEntitiesResponse nextPageToken + * @interface IDeleteZoneRequest + * @property {string|null} [name] DeleteZoneRequest name */ /** - * Constructs a new ListEntitiesResponse. + * Constructs a new DeleteZoneRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListEntitiesResponse. - * @implements IListEntitiesResponse + * @classdesc Represents a DeleteZoneRequest. + * @implements IDeleteZoneRequest * @constructor - * @param {google.cloud.dataplex.v1.IListEntitiesResponse=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest=} [properties] Properties to set */ - function ListEntitiesResponse(properties) { - this.entities = []; + function DeleteZoneRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31686,92 +30021,75 @@ } /** - * ListEntitiesResponse entities. - * @member {Array.} entities - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse - * @instance - */ - ListEntitiesResponse.prototype.entities = $util.emptyArray; - - /** - * ListEntitiesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * DeleteZoneRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest * @instance */ - ListEntitiesResponse.prototype.nextPageToken = ""; + DeleteZoneRequest.prototype.name = ""; /** - * Creates a new ListEntitiesResponse instance using the specified properties. + * Creates a new DeleteZoneRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest * @static - * @param {google.cloud.dataplex.v1.IListEntitiesResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListEntitiesResponse} ListEntitiesResponse instance + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest instance */ - ListEntitiesResponse.create = function create(properties) { - return new ListEntitiesResponse(properties); + DeleteZoneRequest.create = function create(properties) { + return new DeleteZoneRequest(properties); }; /** - * Encodes the specified ListEntitiesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesResponse.verify|verify} messages. + * Encodes the specified DeleteZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest * @static - * @param {google.cloud.dataplex.v1.IListEntitiesResponse} message ListEntitiesResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} message DeleteZoneRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEntitiesResponse.encode = function encode(message, writer) { + DeleteZoneRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.entities != null && message.entities.length) - for (var i = 0; i < message.entities.length; ++i) - $root.google.cloud.dataplex.v1.Entity.encode(message.entities[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); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListEntitiesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesResponse.verify|verify} messages. + * Encodes the specified DeleteZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest * @static - * @param {google.cloud.dataplex.v1.IListEntitiesResponse} message ListEntitiesResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} message DeleteZoneRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEntitiesResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeleteZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListEntitiesResponse message from the specified reader or buffer. + * Decodes a DeleteZoneRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListEntitiesResponse} ListEntitiesResponse + * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEntitiesResponse.decode = function decode(reader, length) { + DeleteZoneRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListEntitiesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteZoneRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.entities && message.entities.length)) - message.entities = []; - message.entities.push($root.google.cloud.dataplex.v1.Entity.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); + message.name = reader.string(); break; } default: @@ -31783,149 +30101,126 @@ }; /** - * Decodes a ListEntitiesResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteZoneRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListEntitiesResponse} ListEntitiesResponse + * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEntitiesResponse.decodeDelimited = function decodeDelimited(reader) { + DeleteZoneRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListEntitiesResponse message. + * Verifies a DeleteZoneRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListEntitiesResponse.verify = function verify(message) { + DeleteZoneRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.entities != null && message.hasOwnProperty("entities")) { - if (!Array.isArray(message.entities)) - return "entities: array expected"; - for (var i = 0; i < message.entities.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Entity.verify(message.entities[i]); - if (error) - return "entities." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListEntitiesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteZoneRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListEntitiesResponse} ListEntitiesResponse + * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest */ - ListEntitiesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListEntitiesResponse) + DeleteZoneRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteZoneRequest) return object; - var message = new $root.google.cloud.dataplex.v1.ListEntitiesResponse(); - if (object.entities) { - if (!Array.isArray(object.entities)) - throw TypeError(".google.cloud.dataplex.v1.ListEntitiesResponse.entities: array expected"); - message.entities = []; - for (var i = 0; i < object.entities.length; ++i) { - if (typeof object.entities[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListEntitiesResponse.entities: object expected"); - message.entities[i] = $root.google.cloud.dataplex.v1.Entity.fromObject(object.entities[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.cloud.dataplex.v1.DeleteZoneRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListEntitiesResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeleteZoneRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest * @static - * @param {google.cloud.dataplex.v1.ListEntitiesResponse} message ListEntitiesResponse + * @param {google.cloud.dataplex.v1.DeleteZoneRequest} message DeleteZoneRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListEntitiesResponse.toObject = function toObject(message, options) { + DeleteZoneRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.entities = []; if (options.defaults) - object.nextPageToken = ""; - if (message.entities && message.entities.length) { - object.entities = []; - for (var j = 0; j < message.entities.length; ++j) - object.entities[j] = $root.google.cloud.dataplex.v1.Entity.toObject(message.entities[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListEntitiesResponse to JSON. + * Converts this DeleteZoneRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest * @instance * @returns {Object.} JSON object */ - ListEntitiesResponse.prototype.toJSON = function toJSON() { + DeleteZoneRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListEntitiesResponse + * Gets the default type url for DeleteZoneRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListEntitiesResponse + * @memberof google.cloud.dataplex.v1.DeleteZoneRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListEntitiesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteZoneRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListEntitiesResponse"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteZoneRequest"; }; - return ListEntitiesResponse; + return DeleteZoneRequest; })(); - v1.GetEntityRequest = (function() { + v1.ListZonesRequest = (function() { /** - * Properties of a GetEntityRequest. + * Properties of a ListZonesRequest. * @memberof google.cloud.dataplex.v1 - * @interface IGetEntityRequest - * @property {string|null} [name] GetEntityRequest name - * @property {google.cloud.dataplex.v1.GetEntityRequest.EntityView|null} [view] GetEntityRequest view + * @interface IListZonesRequest + * @property {string|null} [parent] ListZonesRequest parent + * @property {number|null} [pageSize] ListZonesRequest pageSize + * @property {string|null} [pageToken] ListZonesRequest pageToken + * @property {string|null} [filter] ListZonesRequest filter + * @property {string|null} [orderBy] ListZonesRequest orderBy */ /** - * Constructs a new GetEntityRequest. + * Constructs a new ListZonesRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetEntityRequest. - * @implements IGetEntityRequest + * @classdesc Represents a ListZonesRequest. + * @implements IListZonesRequest * @constructor - * @param {google.cloud.dataplex.v1.IGetEntityRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListZonesRequest=} [properties] Properties to set */ - function GetEntityRequest(properties) { + function ListZonesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -31933,89 +30228,131 @@ } /** - * GetEntityRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GetEntityRequest + * ListZonesRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @instance */ - GetEntityRequest.prototype.name = ""; + ListZonesRequest.prototype.parent = ""; /** - * GetEntityRequest view. - * @member {google.cloud.dataplex.v1.GetEntityRequest.EntityView} view - * @memberof google.cloud.dataplex.v1.GetEntityRequest + * ListZonesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @instance */ - GetEntityRequest.prototype.view = 0; + ListZonesRequest.prototype.pageSize = 0; /** - * Creates a new GetEntityRequest instance using the specified properties. + * ListZonesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @instance + */ + ListZonesRequest.prototype.pageToken = ""; + + /** + * ListZonesRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @instance + */ + ListZonesRequest.prototype.filter = ""; + + /** + * ListZonesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListZonesRequest + * @instance + */ + ListZonesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListZonesRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @static - * @param {google.cloud.dataplex.v1.IGetEntityRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetEntityRequest} GetEntityRequest instance + * @param {google.cloud.dataplex.v1.IListZonesRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest instance */ - GetEntityRequest.create = function create(properties) { - return new GetEntityRequest(properties); + ListZonesRequest.create = function create(properties) { + return new ListZonesRequest(properties); }; /** - * Encodes the specified GetEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEntityRequest.verify|verify} messages. + * Encodes the specified ListZonesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @static - * @param {google.cloud.dataplex.v1.IGetEntityRequest} message GetEntityRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListZonesRequest} message ListZonesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEntityRequest.encode = function encode(message, writer) { + ListZonesRequest.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.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + 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.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified GetEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEntityRequest.verify|verify} messages. + * Encodes the specified ListZonesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @static - * @param {google.cloud.dataplex.v1.IGetEntityRequest} message GetEntityRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListZonesRequest} message ListZonesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEntityRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListZonesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetEntityRequest message from the specified reader or buffer. + * Decodes a ListZonesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetEntityRequest} GetEntityRequest + * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetEntityRequest.decode = function decode(reader, length) { + ListZonesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetEntityRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListZonesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.view = reader.int32(); + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); break; } default: @@ -32027,181 +30364,157 @@ }; /** - * Decodes a GetEntityRequest message from the specified reader or buffer, length delimited. + * Decodes a ListZonesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetEntityRequest} GetEntityRequest + * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetEntityRequest.decodeDelimited = function decodeDelimited(reader) { + ListZonesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetEntityRequest message. + * Verifies a ListZonesRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetEntityRequest.verify = function verify(message) { + ListZonesRequest.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.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - case 4: - break; - } + 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.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; return null; }; /** - * Creates a GetEntityRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListZonesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetEntityRequest} GetEntityRequest + * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest */ - GetEntityRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetEntityRequest) + ListZonesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListZonesRequest) return object; - var message = new $root.google.cloud.dataplex.v1.GetEntityRequest(); - if (object.name != null) - message.name = String(object.name); - switch (object.view) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - case "ENTITY_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "BASIC": - case 1: - message.view = 1; - break; - case "SCHEMA": - case 2: - message.view = 2; - break; - case "FULL": - case 4: - message.view = 4; - break; - } + var message = new $root.google.cloud.dataplex.v1.ListZonesRequest(); + 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.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); return message; }; /** - * Creates a plain object from a GetEntityRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListZonesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @static - * @param {google.cloud.dataplex.v1.GetEntityRequest} message GetEntityRequest + * @param {google.cloud.dataplex.v1.ListZonesRequest} message ListZonesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetEntityRequest.toObject = function toObject(message, options) { + ListZonesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.view = options.enums === String ? "ENTITY_VIEW_UNSPECIFIED" : 0; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.dataplex.v1.GetEntityRequest.EntityView[message.view] === undefined ? message.view : $root.google.cloud.dataplex.v1.GetEntityRequest.EntityView[message.view] : message.view; + 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.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; return object; }; /** - * Converts this GetEntityRequest to JSON. + * Converts this ListZonesRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @instance * @returns {Object.} JSON object */ - GetEntityRequest.prototype.toJSON = function toJSON() { + ListZonesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetEntityRequest + * Gets the default type url for ListZonesRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @memberof google.cloud.dataplex.v1.ListZonesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetEntityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListZonesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GetEntityRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListZonesRequest"; }; + return ListZonesRequest; + })(); + + v1.ListZonesResponse = (function() { + /** - * EntityView enum. - * @name google.cloud.dataplex.v1.GetEntityRequest.EntityView - * @enum {number} - * @property {number} ENTITY_VIEW_UNSPECIFIED=0 ENTITY_VIEW_UNSPECIFIED value - * @property {number} BASIC=1 BASIC value - * @property {number} SCHEMA=2 SCHEMA value - * @property {number} FULL=4 FULL value - */ - GetEntityRequest.EntityView = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENTITY_VIEW_UNSPECIFIED"] = 0; - values[valuesById[1] = "BASIC"] = 1; - values[valuesById[2] = "SCHEMA"] = 2; - values[valuesById[4] = "FULL"] = 4; - return values; - })(); - - return GetEntityRequest; - })(); - - v1.ListPartitionsRequest = (function() { - - /** - * Properties of a ListPartitionsRequest. + * Properties of a ListZonesResponse. * @memberof google.cloud.dataplex.v1 - * @interface IListPartitionsRequest - * @property {string|null} [parent] ListPartitionsRequest parent - * @property {number|null} [pageSize] ListPartitionsRequest pageSize - * @property {string|null} [pageToken] ListPartitionsRequest pageToken - * @property {string|null} [filter] ListPartitionsRequest filter + * @interface IListZonesResponse + * @property {Array.|null} [zones] ListZonesResponse zones + * @property {string|null} [nextPageToken] ListZonesResponse nextPageToken */ /** - * Constructs a new ListPartitionsRequest. + * Constructs a new ListZonesResponse. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListPartitionsRequest. - * @implements IListPartitionsRequest + * @classdesc Represents a ListZonesResponse. + * @implements IListZonesResponse * @constructor - * @param {google.cloud.dataplex.v1.IListPartitionsRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListZonesResponse=} [properties] Properties to set */ - function ListPartitionsRequest(properties) { + function ListZonesResponse(properties) { + this.zones = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32209,117 +30522,92 @@ } /** - * ListPartitionsRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest - * @instance - */ - ListPartitionsRequest.prototype.parent = ""; - - /** - * ListPartitionsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest - * @instance - */ - ListPartitionsRequest.prototype.pageSize = 0; - - /** - * ListPartitionsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * ListZonesResponse zones. + * @member {Array.} zones + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @instance */ - ListPartitionsRequest.prototype.pageToken = ""; + ListZonesResponse.prototype.zones = $util.emptyArray; /** - * ListPartitionsRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * ListZonesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @instance */ - ListPartitionsRequest.prototype.filter = ""; + ListZonesResponse.prototype.nextPageToken = ""; /** - * Creates a new ListPartitionsRequest instance using the specified properties. + * Creates a new ListZonesResponse instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @static - * @param {google.cloud.dataplex.v1.IListPartitionsRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListPartitionsRequest} ListPartitionsRequest instance + * @param {google.cloud.dataplex.v1.IListZonesResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse instance */ - ListPartitionsRequest.create = function create(properties) { - return new ListPartitionsRequest(properties); + ListZonesResponse.create = function create(properties) { + return new ListZonesResponse(properties); }; /** - * Encodes the specified ListPartitionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsRequest.verify|verify} messages. + * Encodes the specified ListZonesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @static - * @param {google.cloud.dataplex.v1.IListPartitionsRequest} message ListPartitionsRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListZonesResponse} message ListZonesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPartitionsRequest.encode = function encode(message, writer) { + ListZonesResponse.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.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.zones != null && message.zones.length) + for (var i = 0; i < message.zones.length; ++i) + $root.google.cloud.dataplex.v1.Zone.encode(message.zones[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 ListPartitionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsRequest.verify|verify} messages. + * Encodes the specified ListZonesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @static - * @param {google.cloud.dataplex.v1.IListPartitionsRequest} message ListPartitionsRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListZonesResponse} message ListZonesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPartitionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListZonesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListPartitionsRequest message from the specified reader or buffer. + * Decodes a ListZonesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListPartitionsRequest} ListPartitionsRequest + * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPartitionsRequest.decode = function decode(reader, length) { + ListZonesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListPartitionsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListZonesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + if (!(message.zones && message.zones.length)) + message.zones = []; + message.zones.push($root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32())); break; } case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); + message.nextPageToken = reader.string(); break; } default: @@ -32331,149 +30619,150 @@ }; /** - * Decodes a ListPartitionsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListZonesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListPartitionsRequest} ListPartitionsRequest + * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPartitionsRequest.decodeDelimited = function decodeDelimited(reader) { + ListZonesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListPartitionsRequest message. + * Verifies a ListZonesResponse message. * @function verify - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListPartitionsRequest.verify = function verify(message) { + ListZonesResponse.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.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; + if (message.zones != null && message.hasOwnProperty("zones")) { + if (!Array.isArray(message.zones)) + return "zones: array expected"; + for (var i = 0; i < message.zones.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Zone.verify(message.zones[i]); + if (error) + return "zones." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a ListPartitionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListZonesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListPartitionsRequest} ListPartitionsRequest + * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse */ - ListPartitionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListPartitionsRequest) + ListZonesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListZonesResponse) return object; - var message = new $root.google.cloud.dataplex.v1.ListPartitionsRequest(); - 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.filter != null) - message.filter = String(object.filter); + var message = new $root.google.cloud.dataplex.v1.ListZonesResponse(); + if (object.zones) { + if (!Array.isArray(object.zones)) + throw TypeError(".google.cloud.dataplex.v1.ListZonesResponse.zones: array expected"); + message.zones = []; + for (var i = 0; i < object.zones.length; ++i) { + if (typeof object.zones[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListZonesResponse.zones: object expected"); + message.zones[i] = $root.google.cloud.dataplex.v1.Zone.fromObject(object.zones[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListPartitionsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListZonesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @static - * @param {google.cloud.dataplex.v1.ListPartitionsRequest} message ListPartitionsRequest + * @param {google.cloud.dataplex.v1.ListZonesResponse} message ListZonesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListPartitionsRequest.toObject = function toObject(message, options) { + ListZonesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; + if (options.arrays || options.defaults) + object.zones = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.zones && message.zones.length) { + object.zones = []; + for (var j = 0; j < message.zones.length; ++j) + object.zones[j] = $root.google.cloud.dataplex.v1.Zone.toObject(message.zones[j], options); } - 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.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ListPartitionsRequest to JSON. + * Converts this ListZonesResponse to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @instance * @returns {Object.} JSON object */ - ListPartitionsRequest.prototype.toJSON = function toJSON() { + ListZonesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListPartitionsRequest + * Gets the default type url for ListZonesResponse * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListPartitionsRequest + * @memberof google.cloud.dataplex.v1.ListZonesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListPartitionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListZonesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListPartitionsRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListZonesResponse"; }; - return ListPartitionsRequest; + return ListZonesResponse; })(); - v1.CreatePartitionRequest = (function() { + v1.ListZoneActionsRequest = (function() { /** - * Properties of a CreatePartitionRequest. + * Properties of a ListZoneActionsRequest. * @memberof google.cloud.dataplex.v1 - * @interface ICreatePartitionRequest - * @property {string|null} [parent] CreatePartitionRequest parent - * @property {google.cloud.dataplex.v1.IPartition|null} [partition] CreatePartitionRequest partition - * @property {boolean|null} [validateOnly] CreatePartitionRequest validateOnly + * @interface IListZoneActionsRequest + * @property {string|null} [parent] ListZoneActionsRequest parent + * @property {number|null} [pageSize] ListZoneActionsRequest pageSize + * @property {string|null} [pageToken] ListZoneActionsRequest pageToken */ /** - * Constructs a new CreatePartitionRequest. + * Constructs a new ListZoneActionsRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CreatePartitionRequest. - * @implements ICreatePartitionRequest + * @classdesc Represents a ListZoneActionsRequest. + * @implements IListZoneActionsRequest * @constructor - * @param {google.cloud.dataplex.v1.ICreatePartitionRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest=} [properties] Properties to set */ - function CreatePartitionRequest(properties) { + function ListZoneActionsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32481,90 +30770,90 @@ } /** - * CreatePartitionRequest parent. + * ListZoneActionsRequest parent. * @member {string} parent - * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @instance */ - CreatePartitionRequest.prototype.parent = ""; + ListZoneActionsRequest.prototype.parent = ""; /** - * CreatePartitionRequest partition. - * @member {google.cloud.dataplex.v1.IPartition|null|undefined} partition - * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * ListZoneActionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @instance */ - CreatePartitionRequest.prototype.partition = null; + ListZoneActionsRequest.prototype.pageSize = 0; /** - * CreatePartitionRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * ListZoneActionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @instance */ - CreatePartitionRequest.prototype.validateOnly = false; + ListZoneActionsRequest.prototype.pageToken = ""; /** - * Creates a new CreatePartitionRequest instance using the specified properties. + * Creates a new ListZoneActionsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @static - * @param {google.cloud.dataplex.v1.ICreatePartitionRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CreatePartitionRequest} CreatePartitionRequest instance + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest instance */ - CreatePartitionRequest.create = function create(properties) { - return new CreatePartitionRequest(properties); + ListZoneActionsRequest.create = function create(properties) { + return new ListZoneActionsRequest(properties); }; /** - * Encodes the specified CreatePartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreatePartitionRequest.verify|verify} messages. + * Encodes the specified ListZoneActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @static - * @param {google.cloud.dataplex.v1.ICreatePartitionRequest} message CreatePartitionRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} message ListZoneActionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreatePartitionRequest.encode = function encode(message, writer) { + ListZoneActionsRequest.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.partition != null && Object.hasOwnProperty.call(message, "partition")) - $root.google.cloud.dataplex.v1.Partition.encode(message.partition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + 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); return writer; }; /** - * Encodes the specified CreatePartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreatePartitionRequest.verify|verify} messages. + * Encodes the specified ListZoneActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @static - * @param {google.cloud.dataplex.v1.ICreatePartitionRequest} message CreatePartitionRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} message ListZoneActionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreatePartitionRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListZoneActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreatePartitionRequest message from the specified reader or buffer. + * Decodes a ListZoneActionsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CreatePartitionRequest} CreatePartitionRequest + * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreatePartitionRequest.decode = function decode(reader, length) { + ListZoneActionsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreatePartitionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListZoneActionsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -32572,12 +30861,12 @@ message.parent = reader.string(); break; } - case 3: { - message.partition = $root.google.cloud.dataplex.v1.Partition.decode(reader, reader.uint32()); + case 2: { + message.pageSize = reader.int32(); break; } - case 4: { - message.validateOnly = reader.bool(); + case 3: { + message.pageToken = reader.string(); break; } default: @@ -32589,145 +30878,139 @@ }; /** - * Decodes a CreatePartitionRequest message from the specified reader or buffer, length delimited. + * Decodes a ListZoneActionsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CreatePartitionRequest} CreatePartitionRequest + * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreatePartitionRequest.decodeDelimited = function decodeDelimited(reader) { + ListZoneActionsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreatePartitionRequest message. + * Verifies a ListZoneActionsRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreatePartitionRequest.verify = function verify(message) { + ListZoneActionsRequest.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.partition != null && message.hasOwnProperty("partition")) { - var error = $root.google.cloud.dataplex.v1.Partition.verify(message.partition); - if (error) - return "partition." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean 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"; return null; }; /** - * Creates a CreatePartitionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListZoneActionsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CreatePartitionRequest} CreatePartitionRequest + * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest */ - CreatePartitionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CreatePartitionRequest) + ListZoneActionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListZoneActionsRequest) return object; - var message = new $root.google.cloud.dataplex.v1.CreatePartitionRequest(); + var message = new $root.google.cloud.dataplex.v1.ListZoneActionsRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.partition != null) { - if (typeof object.partition !== "object") - throw TypeError(".google.cloud.dataplex.v1.CreatePartitionRequest.partition: object expected"); - message.partition = $root.google.cloud.dataplex.v1.Partition.fromObject(object.partition); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a CreatePartitionRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListZoneActionsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @static - * @param {google.cloud.dataplex.v1.CreatePartitionRequest} message CreatePartitionRequest + * @param {google.cloud.dataplex.v1.ListZoneActionsRequest} message ListZoneActionsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreatePartitionRequest.toObject = function toObject(message, options) { + ListZoneActionsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.partition = null; - object.validateOnly = false; + object.pageSize = 0; + object.pageToken = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.partition != null && message.hasOwnProperty("partition")) - object.partition = $root.google.cloud.dataplex.v1.Partition.toObject(message.partition, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this CreatePartitionRequest to JSON. + * Converts this ListZoneActionsRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @instance * @returns {Object.} JSON object */ - CreatePartitionRequest.prototype.toJSON = function toJSON() { + ListZoneActionsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreatePartitionRequest + * Gets the default type url for ListZoneActionsRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreatePartitionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListZoneActionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.CreatePartitionRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListZoneActionsRequest"; }; - return CreatePartitionRequest; + return ListZoneActionsRequest; })(); - v1.DeletePartitionRequest = (function() { + v1.GetZoneRequest = (function() { /** - * Properties of a DeletePartitionRequest. + * Properties of a GetZoneRequest. * @memberof google.cloud.dataplex.v1 - * @interface IDeletePartitionRequest - * @property {string|null} [name] DeletePartitionRequest name - * @property {string|null} [etag] DeletePartitionRequest etag + * @interface IGetZoneRequest + * @property {string|null} [name] GetZoneRequest name */ /** - * Constructs a new DeletePartitionRequest. + * Constructs a new GetZoneRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DeletePartitionRequest. - * @implements IDeletePartitionRequest + * @classdesc Represents a GetZoneRequest. + * @implements IGetZoneRequest * @constructor - * @param {google.cloud.dataplex.v1.IDeletePartitionRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IGetZoneRequest=} [properties] Properties to set */ - function DeletePartitionRequest(properties) { + function GetZoneRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32735,80 +31018,70 @@ } /** - * DeletePartitionRequest name. + * GetZoneRequest name. * @member {string} name - * @memberof google.cloud.dataplex.v1.DeletePartitionRequest - * @instance - */ - DeletePartitionRequest.prototype.name = ""; - - /** - * DeletePartitionRequest etag. - * @member {string} etag - * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @memberof google.cloud.dataplex.v1.GetZoneRequest * @instance */ - DeletePartitionRequest.prototype.etag = ""; + GetZoneRequest.prototype.name = ""; /** - * Creates a new DeletePartitionRequest instance using the specified properties. + * Creates a new GetZoneRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @memberof google.cloud.dataplex.v1.GetZoneRequest * @static - * @param {google.cloud.dataplex.v1.IDeletePartitionRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DeletePartitionRequest} DeletePartitionRequest instance + * @param {google.cloud.dataplex.v1.IGetZoneRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest instance */ - DeletePartitionRequest.create = function create(properties) { - return new DeletePartitionRequest(properties); + GetZoneRequest.create = function create(properties) { + return new GetZoneRequest(properties); }; /** - * Encodes the specified DeletePartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeletePartitionRequest.verify|verify} messages. + * Encodes the specified GetZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @memberof google.cloud.dataplex.v1.GetZoneRequest * @static - * @param {google.cloud.dataplex.v1.IDeletePartitionRequest} message DeletePartitionRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetZoneRequest} message GetZoneRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeletePartitionRequest.encode = function encode(message, writer) { + GetZoneRequest.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.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); return writer; }; /** - * Encodes the specified DeletePartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeletePartitionRequest.verify|verify} messages. + * Encodes the specified GetZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @memberof google.cloud.dataplex.v1.GetZoneRequest * @static - * @param {google.cloud.dataplex.v1.IDeletePartitionRequest} message DeletePartitionRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetZoneRequest} message GetZoneRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeletePartitionRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeletePartitionRequest message from the specified reader or buffer. + * Decodes a GetZoneRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @memberof google.cloud.dataplex.v1.GetZoneRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DeletePartitionRequest} DeletePartitionRequest + * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeletePartitionRequest.decode = function decode(reader, length) { + GetZoneRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeletePartitionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetZoneRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -32816,10 +31089,6 @@ message.name = reader.string(); break; } - case 2: { - message.etag = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -32829,133 +31098,125 @@ }; /** - * Decodes a DeletePartitionRequest message from the specified reader or buffer, length delimited. + * Decodes a GetZoneRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @memberof google.cloud.dataplex.v1.GetZoneRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DeletePartitionRequest} DeletePartitionRequest + * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeletePartitionRequest.decodeDelimited = function decodeDelimited(reader) { + GetZoneRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeletePartitionRequest message. + * Verifies a GetZoneRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @memberof google.cloud.dataplex.v1.GetZoneRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeletePartitionRequest.verify = function verify(message) { + GetZoneRequest.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.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; return null; }; /** - * Creates a DeletePartitionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetZoneRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @memberof google.cloud.dataplex.v1.GetZoneRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DeletePartitionRequest} DeletePartitionRequest + * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest */ - DeletePartitionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DeletePartitionRequest) + GetZoneRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetZoneRequest) return object; - var message = new $root.google.cloud.dataplex.v1.DeletePartitionRequest(); + var message = new $root.google.cloud.dataplex.v1.GetZoneRequest(); if (object.name != null) message.name = String(object.name); - if (object.etag != null) - message.etag = String(object.etag); return message; }; /** - * Creates a plain object from a DeletePartitionRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetZoneRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @memberof google.cloud.dataplex.v1.GetZoneRequest * @static - * @param {google.cloud.dataplex.v1.DeletePartitionRequest} message DeletePartitionRequest + * @param {google.cloud.dataplex.v1.GetZoneRequest} message GetZoneRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeletePartitionRequest.toObject = function toObject(message, options) { + GetZoneRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.etag = ""; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; return object; }; /** - * Converts this DeletePartitionRequest to JSON. + * Converts this GetZoneRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @memberof google.cloud.dataplex.v1.GetZoneRequest * @instance * @returns {Object.} JSON object */ - DeletePartitionRequest.prototype.toJSON = function toJSON() { + GetZoneRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeletePartitionRequest + * Gets the default type url for GetZoneRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @memberof google.cloud.dataplex.v1.GetZoneRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeletePartitionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetZoneRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DeletePartitionRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetZoneRequest"; }; - return DeletePartitionRequest; + return GetZoneRequest; })(); - v1.ListPartitionsResponse = (function() { + v1.CreateAssetRequest = (function() { /** - * Properties of a ListPartitionsResponse. + * Properties of a CreateAssetRequest. * @memberof google.cloud.dataplex.v1 - * @interface IListPartitionsResponse - * @property {Array.|null} [partitions] ListPartitionsResponse partitions - * @property {string|null} [nextPageToken] ListPartitionsResponse nextPageToken + * @interface ICreateAssetRequest + * @property {string|null} [parent] CreateAssetRequest parent + * @property {string|null} [assetId] CreateAssetRequest assetId + * @property {google.cloud.dataplex.v1.IAsset|null} [asset] CreateAssetRequest asset + * @property {boolean|null} [validateOnly] CreateAssetRequest validateOnly */ /** - * Constructs a new ListPartitionsResponse. + * Constructs a new CreateAssetRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListPartitionsResponse. - * @implements IListPartitionsResponse + * @classdesc Represents a CreateAssetRequest. + * @implements ICreateAssetRequest * @constructor - * @param {google.cloud.dataplex.v1.IListPartitionsResponse=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.ICreateAssetRequest=} [properties] Properties to set */ - function ListPartitionsResponse(properties) { - this.partitions = []; + function CreateAssetRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32963,92 +31224,117 @@ } /** - * ListPartitionsResponse partitions. - * @member {Array.} partitions - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * CreateAssetRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @instance */ - ListPartitionsResponse.prototype.partitions = $util.emptyArray; + CreateAssetRequest.prototype.parent = ""; /** - * ListPartitionsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * CreateAssetRequest assetId. + * @member {string} assetId + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @instance */ - ListPartitionsResponse.prototype.nextPageToken = ""; + CreateAssetRequest.prototype.assetId = ""; /** - * Creates a new ListPartitionsResponse instance using the specified properties. + * CreateAssetRequest asset. + * @member {google.cloud.dataplex.v1.IAsset|null|undefined} asset + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @instance + */ + CreateAssetRequest.prototype.asset = null; + + /** + * CreateAssetRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @instance + */ + CreateAssetRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateAssetRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @static - * @param {google.cloud.dataplex.v1.IListPartitionsResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListPartitionsResponse} ListPartitionsResponse instance + * @param {google.cloud.dataplex.v1.ICreateAssetRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest instance */ - ListPartitionsResponse.create = function create(properties) { - return new ListPartitionsResponse(properties); + CreateAssetRequest.create = function create(properties) { + return new CreateAssetRequest(properties); }; /** - * Encodes the specified ListPartitionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsResponse.verify|verify} messages. + * Encodes the specified CreateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @static - * @param {google.cloud.dataplex.v1.IListPartitionsResponse} message ListPartitionsResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.ICreateAssetRequest} message CreateAssetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPartitionsResponse.encode = function encode(message, writer) { + CreateAssetRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.partitions != null && message.partitions.length) - for (var i = 0; i < message.partitions.length; ++i) - $root.google.cloud.dataplex.v1.Partition.encode(message.partitions[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); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.assetId != null && Object.hasOwnProperty.call(message, "assetId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.assetId); + if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) + $root.google.cloud.dataplex.v1.Asset.encode(message.asset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); return writer; }; /** - * Encodes the specified ListPartitionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsResponse.verify|verify} messages. + * Encodes the specified CreateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @static - * @param {google.cloud.dataplex.v1.IListPartitionsResponse} message ListPartitionsResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.ICreateAssetRequest} message CreateAssetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPartitionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + CreateAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListPartitionsResponse message from the specified reader or buffer. + * Decodes a CreateAssetRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListPartitionsResponse} ListPartitionsResponse + * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPartitionsResponse.decode = function decode(reader, length) { + CreateAssetRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListPartitionsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateAssetRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.partitions && message.partitions.length)) - message.partitions = []; - message.partitions.push($root.google.cloud.dataplex.v1.Partition.decode(reader, reader.uint32())); + message.parent = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); + message.assetId = reader.string(); + break; + } + case 3: { + message.asset = $root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32()); + break; + } + case 4: { + message.validateOnly = reader.bool(); break; } default: @@ -33060,148 +31346,154 @@ }; /** - * Decodes a ListPartitionsResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateAssetRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListPartitionsResponse} ListPartitionsResponse + * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPartitionsResponse.decodeDelimited = function decodeDelimited(reader) { + CreateAssetRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListPartitionsResponse message. + * Verifies a CreateAssetRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListPartitionsResponse.verify = function verify(message) { + CreateAssetRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.partitions != null && message.hasOwnProperty("partitions")) { - if (!Array.isArray(message.partitions)) - return "partitions: array expected"; - for (var i = 0; i < message.partitions.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Partition.verify(message.partitions[i]); - if (error) - return "partitions." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.assetId != null && message.hasOwnProperty("assetId")) + if (!$util.isString(message.assetId)) + return "assetId: string expected"; + if (message.asset != null && message.hasOwnProperty("asset")) { + var error = $root.google.cloud.dataplex.v1.Asset.verify(message.asset); + if (error) + return "asset." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a ListPartitionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateAssetRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListPartitionsResponse} ListPartitionsResponse + * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest */ - ListPartitionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListPartitionsResponse) + CreateAssetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateAssetRequest) return object; - var message = new $root.google.cloud.dataplex.v1.ListPartitionsResponse(); - if (object.partitions) { - if (!Array.isArray(object.partitions)) - throw TypeError(".google.cloud.dataplex.v1.ListPartitionsResponse.partitions: array expected"); - message.partitions = []; - for (var i = 0; i < object.partitions.length; ++i) { - if (typeof object.partitions[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListPartitionsResponse.partitions: object expected"); - message.partitions[i] = $root.google.cloud.dataplex.v1.Partition.fromObject(object.partitions[i]); - } + var message = new $root.google.cloud.dataplex.v1.CreateAssetRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.assetId != null) + message.assetId = String(object.assetId); + if (object.asset != null) { + if (typeof object.asset !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateAssetRequest.asset: object expected"); + message.asset = $root.google.cloud.dataplex.v1.Asset.fromObject(object.asset); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a ListPartitionsResponse message. Also converts values to other types if specified. + * Creates a plain object from a CreateAssetRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @static - * @param {google.cloud.dataplex.v1.ListPartitionsResponse} message ListPartitionsResponse + * @param {google.cloud.dataplex.v1.CreateAssetRequest} message CreateAssetRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListPartitionsResponse.toObject = function toObject(message, options) { + CreateAssetRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.partitions = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.partitions && message.partitions.length) { - object.partitions = []; - for (var j = 0; j < message.partitions.length; ++j) - object.partitions[j] = $root.google.cloud.dataplex.v1.Partition.toObject(message.partitions[j], options); + if (options.defaults) { + object.parent = ""; + object.assetId = ""; + object.asset = null; + object.validateOnly = false; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.assetId != null && message.hasOwnProperty("assetId")) + object.assetId = message.assetId; + if (message.asset != null && message.hasOwnProperty("asset")) + object.asset = $root.google.cloud.dataplex.v1.Asset.toObject(message.asset, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this ListPartitionsResponse to JSON. + * Converts this CreateAssetRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @instance * @returns {Object.} JSON object */ - ListPartitionsResponse.prototype.toJSON = function toJSON() { + CreateAssetRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListPartitionsResponse + * Gets the default type url for CreateAssetRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListPartitionsResponse + * @memberof google.cloud.dataplex.v1.CreateAssetRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListPartitionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateAssetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListPartitionsResponse"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateAssetRequest"; }; - return ListPartitionsResponse; + return CreateAssetRequest; })(); - v1.GetPartitionRequest = (function() { + v1.UpdateAssetRequest = (function() { /** - * Properties of a GetPartitionRequest. + * Properties of an UpdateAssetRequest. * @memberof google.cloud.dataplex.v1 - * @interface IGetPartitionRequest - * @property {string|null} [name] GetPartitionRequest name + * @interface IUpdateAssetRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAssetRequest updateMask + * @property {google.cloud.dataplex.v1.IAsset|null} [asset] UpdateAssetRequest asset + * @property {boolean|null} [validateOnly] UpdateAssetRequest validateOnly */ /** - * Constructs a new GetPartitionRequest. + * Constructs a new UpdateAssetRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetPartitionRequest. - * @implements IGetPartitionRequest + * @classdesc Represents an UpdateAssetRequest. + * @implements IUpdateAssetRequest * @constructor - * @param {google.cloud.dataplex.v1.IGetPartitionRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest=} [properties] Properties to set */ - function GetPartitionRequest(properties) { + function UpdateAssetRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33209,75 +31501,103 @@ } /** - * GetPartitionRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * UpdateAssetRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @instance */ - GetPartitionRequest.prototype.name = ""; + UpdateAssetRequest.prototype.updateMask = null; /** - * Creates a new GetPartitionRequest instance using the specified properties. + * UpdateAssetRequest asset. + * @member {google.cloud.dataplex.v1.IAsset|null|undefined} asset + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @instance + */ + UpdateAssetRequest.prototype.asset = null; + + /** + * UpdateAssetRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest + * @instance + */ + UpdateAssetRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateAssetRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @static - * @param {google.cloud.dataplex.v1.IGetPartitionRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetPartitionRequest} GetPartitionRequest instance + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest instance */ - GetPartitionRequest.create = function create(properties) { - return new GetPartitionRequest(properties); + UpdateAssetRequest.create = function create(properties) { + return new UpdateAssetRequest(properties); }; /** - * Encodes the specified GetPartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetPartitionRequest.verify|verify} messages. + * Encodes the specified UpdateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @static - * @param {google.cloud.dataplex.v1.IGetPartitionRequest} message GetPartitionRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} message UpdateAssetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPartitionRequest.encode = function encode(message, writer) { + UpdateAssetRequest.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.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) + $root.google.cloud.dataplex.v1.Asset.encode(message.asset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); return writer; }; /** - * Encodes the specified GetPartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetPartitionRequest.verify|verify} messages. + * Encodes the specified UpdateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @static - * @param {google.cloud.dataplex.v1.IGetPartitionRequest} message GetPartitionRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} message UpdateAssetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPartitionRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetPartitionRequest message from the specified reader or buffer. + * Decodes an UpdateAssetRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetPartitionRequest} GetPartitionRequest + * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetPartitionRequest.decode = function decode(reader, length) { + UpdateAssetRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetPartitionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateAssetRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.asset = $root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); break; } default: @@ -33289,137 +31609,149 @@ }; /** - * Decodes a GetPartitionRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateAssetRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetPartitionRequest} GetPartitionRequest + * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetPartitionRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateAssetRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetPartitionRequest message. + * Verifies an UpdateAssetRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetPartitionRequest.verify = function verify(message) { + UpdateAssetRequest.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.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.asset != null && message.hasOwnProperty("asset")) { + var error = $root.google.cloud.dataplex.v1.Asset.verify(message.asset); + if (error) + return "asset." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a GetPartitionRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateAssetRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetPartitionRequest} GetPartitionRequest + * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest */ - GetPartitionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetPartitionRequest) + UpdateAssetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateAssetRequest) return object; - var message = new $root.google.cloud.dataplex.v1.GetPartitionRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dataplex.v1.UpdateAssetRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateAssetRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.asset != null) { + if (typeof object.asset !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateAssetRequest.asset: object expected"); + message.asset = $root.google.cloud.dataplex.v1.Asset.fromObject(object.asset); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a GetPartitionRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateAssetRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @static - * @param {google.cloud.dataplex.v1.GetPartitionRequest} message GetPartitionRequest + * @param {google.cloud.dataplex.v1.UpdateAssetRequest} message UpdateAssetRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetPartitionRequest.toObject = function toObject(message, options) { + UpdateAssetRequest.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; + if (options.defaults) { + object.updateMask = null; + object.asset = null; + object.validateOnly = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.asset != null && message.hasOwnProperty("asset")) + object.asset = $root.google.cloud.dataplex.v1.Asset.toObject(message.asset, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this GetPartitionRequest to JSON. + * Converts this UpdateAssetRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @instance * @returns {Object.} JSON object */ - GetPartitionRequest.prototype.toJSON = function toJSON() { + UpdateAssetRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetPartitionRequest + * Gets the default type url for UpdateAssetRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GetPartitionRequest + * @memberof google.cloud.dataplex.v1.UpdateAssetRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetPartitionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateAssetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GetPartitionRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateAssetRequest"; }; - return GetPartitionRequest; + return UpdateAssetRequest; })(); - v1.Entity = (function() { + v1.DeleteAssetRequest = (function() { /** - * Properties of an Entity. + * Properties of a DeleteAssetRequest. * @memberof google.cloud.dataplex.v1 - * @interface IEntity - * @property {string|null} [name] Entity name - * @property {string|null} [displayName] Entity displayName - * @property {string|null} [description] Entity description - * @property {google.protobuf.ITimestamp|null} [createTime] Entity createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Entity updateTime - * @property {string|null} [id] Entity id - * @property {string|null} [etag] Entity etag - * @property {google.cloud.dataplex.v1.Entity.Type|null} [type] Entity type - * @property {string|null} [asset] Entity asset - * @property {string|null} [dataPath] Entity dataPath - * @property {string|null} [dataPathPattern] Entity dataPathPattern - * @property {string|null} [catalogEntry] Entity catalogEntry - * @property {google.cloud.dataplex.v1.StorageSystem|null} [system] Entity system - * @property {google.cloud.dataplex.v1.IStorageFormat|null} [format] Entity format - * @property {google.cloud.dataplex.v1.Entity.ICompatibilityStatus|null} [compatibility] Entity compatibility - * @property {google.cloud.dataplex.v1.ISchema|null} [schema] Entity schema + * @interface IDeleteAssetRequest + * @property {string|null} [name] DeleteAssetRequest name */ /** - * Constructs a new Entity. + * Constructs a new DeleteAssetRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an Entity. - * @implements IEntity + * @classdesc Represents a DeleteAssetRequest. + * @implements IDeleteAssetRequest * @constructor - * @param {google.cloud.dataplex.v1.IEntity=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest=} [properties] Properties to set */ - function Entity(properties) { + function DeleteAssetRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -33427,285 +31759,338 @@ } /** - * Entity name. + * DeleteAssetRequest name. * @member {string} name - * @memberof google.cloud.dataplex.v1.Entity + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest * @instance */ - Entity.prototype.name = ""; + DeleteAssetRequest.prototype.name = ""; /** - * Entity displayName. - * @member {string} displayName - * @memberof google.cloud.dataplex.v1.Entity - * @instance + * Creates a new DeleteAssetRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest instance */ - Entity.prototype.displayName = ""; + DeleteAssetRequest.create = function create(properties) { + return new DeleteAssetRequest(properties); + }; /** - * Entity description. - * @member {string} description - * @memberof google.cloud.dataplex.v1.Entity - * @instance + * Encodes the specified DeleteAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} message DeleteAssetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Entity.prototype.description = ""; + DeleteAssetRequest.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; + }; /** - * Entity createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dataplex.v1.Entity - * @instance + * Encodes the specified DeleteAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} message DeleteAssetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Entity.prototype.createTime = null; + DeleteAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Entity updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.Entity - * @instance + * Decodes a DeleteAssetRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Entity.prototype.updateTime = null; + DeleteAssetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteAssetRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Entity id. - * @member {string} id - * @memberof google.cloud.dataplex.v1.Entity - * @instance + * Decodes a DeleteAssetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Entity.prototype.id = ""; + DeleteAssetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Entity etag. - * @member {string} etag - * @memberof google.cloud.dataplex.v1.Entity - * @instance + * Verifies a DeleteAssetRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Entity.prototype.etag = ""; + DeleteAssetRequest.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; + }; /** - * Entity type. - * @member {google.cloud.dataplex.v1.Entity.Type} type - * @memberof google.cloud.dataplex.v1.Entity - * @instance + * Creates a DeleteAssetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest */ - Entity.prototype.type = 0; + DeleteAssetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteAssetRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.DeleteAssetRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; /** - * Entity asset. - * @member {string} asset - * @memberof google.cloud.dataplex.v1.Entity - * @instance + * Creates a plain object from a DeleteAssetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {google.cloud.dataplex.v1.DeleteAssetRequest} message DeleteAssetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Entity.prototype.asset = ""; + DeleteAssetRequest.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; + }; /** - * Entity dataPath. - * @member {string} dataPath - * @memberof google.cloud.dataplex.v1.Entity + * Converts this DeleteAssetRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest * @instance + * @returns {Object.} JSON object */ - Entity.prototype.dataPath = ""; + DeleteAssetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Entity dataPathPattern. - * @member {string} dataPathPattern - * @memberof google.cloud.dataplex.v1.Entity - * @instance + * Gets the default type url for DeleteAssetRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DeleteAssetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - Entity.prototype.dataPathPattern = ""; + DeleteAssetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteAssetRequest"; + }; + + return DeleteAssetRequest; + })(); + + v1.ListAssetsRequest = (function() { /** - * Entity catalogEntry. - * @member {string} catalogEntry - * @memberof google.cloud.dataplex.v1.Entity + * Properties of a ListAssetsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListAssetsRequest + * @property {string|null} [parent] ListAssetsRequest parent + * @property {number|null} [pageSize] ListAssetsRequest pageSize + * @property {string|null} [pageToken] ListAssetsRequest pageToken + * @property {string|null} [filter] ListAssetsRequest filter + * @property {string|null} [orderBy] ListAssetsRequest orderBy + */ + + /** + * Constructs a new ListAssetsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListAssetsRequest. + * @implements IListAssetsRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListAssetsRequest=} [properties] Properties to set + */ + function ListAssetsRequest(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]]; + } + + /** + * ListAssetsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListAssetsRequest * @instance */ - Entity.prototype.catalogEntry = ""; + ListAssetsRequest.prototype.parent = ""; /** - * Entity system. - * @member {google.cloud.dataplex.v1.StorageSystem} system - * @memberof google.cloud.dataplex.v1.Entity + * ListAssetsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListAssetsRequest * @instance */ - Entity.prototype.system = 0; + ListAssetsRequest.prototype.pageSize = 0; /** - * Entity format. - * @member {google.cloud.dataplex.v1.IStorageFormat|null|undefined} format - * @memberof google.cloud.dataplex.v1.Entity + * ListAssetsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListAssetsRequest * @instance */ - Entity.prototype.format = null; + ListAssetsRequest.prototype.pageToken = ""; /** - * Entity compatibility. - * @member {google.cloud.dataplex.v1.Entity.ICompatibilityStatus|null|undefined} compatibility - * @memberof google.cloud.dataplex.v1.Entity + * ListAssetsRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListAssetsRequest * @instance */ - Entity.prototype.compatibility = null; + ListAssetsRequest.prototype.filter = ""; /** - * Entity schema. - * @member {google.cloud.dataplex.v1.ISchema|null|undefined} schema - * @memberof google.cloud.dataplex.v1.Entity + * ListAssetsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListAssetsRequest * @instance */ - Entity.prototype.schema = null; + ListAssetsRequest.prototype.orderBy = ""; /** - * Creates a new Entity instance using the specified properties. + * Creates a new ListAssetsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.Entity + * @memberof google.cloud.dataplex.v1.ListAssetsRequest * @static - * @param {google.cloud.dataplex.v1.IEntity=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Entity} Entity instance + * @param {google.cloud.dataplex.v1.IListAssetsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest instance */ - Entity.create = function create(properties) { - return new Entity(properties); + ListAssetsRequest.create = function create(properties) { + return new ListAssetsRequest(properties); }; /** - * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.verify|verify} messages. + * Encodes the specified ListAssetsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.Entity + * @memberof google.cloud.dataplex.v1.ListAssetsRequest * @static - * @param {google.cloud.dataplex.v1.IEntity} message Entity message or plain object to encode + * @param {google.cloud.dataplex.v1.IListAssetsRequest} message ListAssetsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entity.encode = function encode(message, writer) { + ListAssetsRequest.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 5, wireType 2 =*/42).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.id); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.etag); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.type); - if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.asset); - if (message.dataPath != null && Object.hasOwnProperty.call(message, "dataPath")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.dataPath); - if (message.dataPathPattern != null && Object.hasOwnProperty.call(message, "dataPathPattern")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.dataPathPattern); - if (message.catalogEntry != null && Object.hasOwnProperty.call(message, "catalogEntry")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.catalogEntry); - if (message.system != null && Object.hasOwnProperty.call(message, "system")) - writer.uint32(/* id 15, wireType 0 =*/120).int32(message.system); - if (message.format != null && Object.hasOwnProperty.call(message, "format")) - $root.google.cloud.dataplex.v1.StorageFormat.encode(message.format, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.compatibility != null && Object.hasOwnProperty.call(message, "compatibility")) - $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.encode(message.compatibility, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - $root.google.cloud.dataplex.v1.Schema.encode(message.schema, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + 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.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.verify|verify} messages. + * Encodes the specified ListAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Entity + * @memberof google.cloud.dataplex.v1.ListAssetsRequest * @static - * @param {google.cloud.dataplex.v1.IEntity} message Entity message or plain object to encode + * @param {google.cloud.dataplex.v1.IListAssetsRequest} message ListAssetsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entity.encodeDelimited = function encodeDelimited(message, writer) { + ListAssetsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Entity message from the specified reader or buffer. + * Decodes a ListAssetsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.Entity + * @memberof google.cloud.dataplex.v1.ListAssetsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Entity} Entity + * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Entity.decode = function decode(reader, length) { + ListAssetsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Entity(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListAssetsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.displayName = reader.string(); + message.pageSize = reader.int32(); break; } case 3: { - message.description = reader.string(); - break; - } - case 5: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.id = reader.string(); - break; - } - case 8: { - message.etag = reader.string(); - break; - } - case 10: { - message.type = reader.int32(); - break; - } - case 11: { - message.asset = reader.string(); - break; - } - case 12: { - message.dataPath = reader.string(); - break; - } - case 13: { - message.dataPathPattern = reader.string(); - break; - } - case 14: { - message.catalogEntry = reader.string(); - break; - } - case 15: { - message.system = reader.int32(); - break; - } - case 16: { - message.format = $root.google.cloud.dataplex.v1.StorageFormat.decode(reader, reader.uint32()); + message.pageToken = reader.string(); break; } - case 19: { - message.compatibility = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.decode(reader, reader.uint32()); + case 4: { + message.filter = reader.string(); break; } - case 50: { - message.schema = $root.google.cloud.dataplex.v1.Schema.decode(reader, reader.uint32()); + case 5: { + message.orderBy = reader.string(); break; } default: @@ -33717,902 +32102,724 @@ }; /** - * Decodes an Entity message from the specified reader or buffer, length delimited. + * Decodes a ListAssetsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Entity + * @memberof google.cloud.dataplex.v1.ListAssetsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Entity} Entity + * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Entity.decodeDelimited = function decodeDelimited(reader) { + ListAssetsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Entity message. + * Verifies a ListAssetsRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.Entity + * @memberof google.cloud.dataplex.v1.ListAssetsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Entity.verify = function verify(message) { + ListAssetsRequest.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.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.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListAssetsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest + */ + ListAssetsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListAssetsRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListAssetsRequest(); + 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.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListAssetsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @static + * @param {google.cloud.dataplex.v1.ListAssetsRequest} message ListAssetsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAssetsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; } - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.asset != null && message.hasOwnProperty("asset")) - if (!$util.isString(message.asset)) - return "asset: string expected"; - if (message.dataPath != null && message.hasOwnProperty("dataPath")) - if (!$util.isString(message.dataPath)) - return "dataPath: string expected"; - if (message.dataPathPattern != null && message.hasOwnProperty("dataPathPattern")) - if (!$util.isString(message.dataPathPattern)) - return "dataPathPattern: string expected"; - if (message.catalogEntry != null && message.hasOwnProperty("catalogEntry")) - if (!$util.isString(message.catalogEntry)) - return "catalogEntry: string expected"; - if (message.system != null && message.hasOwnProperty("system")) - switch (message.system) { + 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.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListAssetsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @instance + * @returns {Object.} JSON object + */ + ListAssetsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAssetsRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListAssetsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAssetsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListAssetsRequest"; + }; + + return ListAssetsRequest; + })(); + + v1.ListAssetsResponse = (function() { + + /** + * Properties of a ListAssetsResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListAssetsResponse + * @property {Array.|null} [assets] ListAssetsResponse assets + * @property {string|null} [nextPageToken] ListAssetsResponse nextPageToken + */ + + /** + * Constructs a new ListAssetsResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListAssetsResponse. + * @implements IListAssetsResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListAssetsResponse=} [properties] Properties to set + */ + function ListAssetsResponse(properties) { + this.assets = []; + 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]]; + } + + /** + * ListAssetsResponse assets. + * @member {Array.} assets + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @instance + */ + ListAssetsResponse.prototype.assets = $util.emptyArray; + + /** + * ListAssetsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @instance + */ + ListAssetsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListAssetsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @static + * @param {google.cloud.dataplex.v1.IListAssetsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse instance + */ + ListAssetsResponse.create = function create(properties) { + return new ListAssetsResponse(properties); + }; + + /** + * Encodes the specified ListAssetsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @static + * @param {google.cloud.dataplex.v1.IListAssetsResponse} message ListAssetsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAssetsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.assets != null && message.assets.length) + for (var i = 0; i < message.assets.length; ++i) + $root.google.cloud.dataplex.v1.Asset.encode(message.assets[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 ListAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @static + * @param {google.cloud.dataplex.v1.IListAssetsResponse} message ListAssetsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAssetsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAssetsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAssetsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListAssetsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.assets && message.assets.length)) + message.assets = []; + message.assets.push($root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: - return "system: enum value expected"; - case 0: - case 1: - case 2: + reader.skipType(tag & 7); break; } - if (message.format != null && message.hasOwnProperty("format")) { - var error = $root.google.cloud.dataplex.v1.StorageFormat.verify(message.format); - if (error) - return "format." + error; - } - if (message.compatibility != null && message.hasOwnProperty("compatibility")) { - var error = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify(message.compatibility); - if (error) - return "compatibility." + error; } - if (message.schema != null && message.hasOwnProperty("schema")) { - var error = $root.google.cloud.dataplex.v1.Schema.verify(message.schema); - if (error) - return "schema." + error; + return message; + }; + + /** + * Decodes a ListAssetsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAssetsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAssetsResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListAssetsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAssetsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.assets != null && message.hasOwnProperty("assets")) { + if (!Array.isArray(message.assets)) + return "assets: array expected"; + for (var i = 0; i < message.assets.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Asset.verify(message.assets[i]); + if (error) + return "assets." + error; + } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates an Entity message from a plain object. Also converts values to their respective internal types. + * Creates a ListAssetsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.Entity + * @memberof google.cloud.dataplex.v1.ListAssetsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Entity} Entity + * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse */ - Entity.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Entity) + ListAssetsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListAssetsResponse) return object; - var message = new $root.google.cloud.dataplex.v1.Entity(); - 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.dataplex.v1.Entity.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.dataplex.v1.Entity.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.id != null) - message.id = String(object.id); - if (object.etag != null) - message.etag = String(object.etag); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "TABLE": - case 1: - message.type = 1; - break; - case "FILESET": - case 2: - message.type = 2; - break; - } - if (object.asset != null) - message.asset = String(object.asset); - if (object.dataPath != null) - message.dataPath = String(object.dataPath); - if (object.dataPathPattern != null) - message.dataPathPattern = String(object.dataPathPattern); - if (object.catalogEntry != null) - message.catalogEntry = String(object.catalogEntry); - switch (object.system) { - default: - if (typeof object.system === "number") { - message.system = object.system; - break; + var message = new $root.google.cloud.dataplex.v1.ListAssetsResponse(); + if (object.assets) { + if (!Array.isArray(object.assets)) + throw TypeError(".google.cloud.dataplex.v1.ListAssetsResponse.assets: array expected"); + message.assets = []; + for (var i = 0; i < object.assets.length; ++i) { + if (typeof object.assets[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListAssetsResponse.assets: object expected"); + message.assets[i] = $root.google.cloud.dataplex.v1.Asset.fromObject(object.assets[i]); } - break; - case "STORAGE_SYSTEM_UNSPECIFIED": - case 0: - message.system = 0; - break; - case "CLOUD_STORAGE": - case 1: - message.system = 1; - break; - case "BIGQUERY": - case 2: - message.system = 2; - break; - } - if (object.format != null) { - if (typeof object.format !== "object") - throw TypeError(".google.cloud.dataplex.v1.Entity.format: object expected"); - message.format = $root.google.cloud.dataplex.v1.StorageFormat.fromObject(object.format); - } - if (object.compatibility != null) { - if (typeof object.compatibility !== "object") - throw TypeError(".google.cloud.dataplex.v1.Entity.compatibility: object expected"); - message.compatibility = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.fromObject(object.compatibility); - } - if (object.schema != null) { - if (typeof object.schema !== "object") - throw TypeError(".google.cloud.dataplex.v1.Entity.schema: object expected"); - message.schema = $root.google.cloud.dataplex.v1.Schema.fromObject(object.schema); } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from an Entity message. Also converts values to other types if specified. + * Creates a plain object from a ListAssetsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.Entity + * @memberof google.cloud.dataplex.v1.ListAssetsResponse * @static - * @param {google.cloud.dataplex.v1.Entity} message Entity + * @param {google.cloud.dataplex.v1.ListAssetsResponse} message ListAssetsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Entity.toObject = function toObject(message, options) { + ListAssetsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.description = ""; - object.createTime = null; - object.updateTime = null; - object.id = ""; - object.etag = ""; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.asset = ""; - object.dataPath = ""; - object.dataPathPattern = ""; - object.catalogEntry = ""; - object.system = options.enums === String ? "STORAGE_SYSTEM_UNSPECIFIED" : 0; - object.format = null; - object.compatibility = null; - object.schema = null; + if (options.arrays || options.defaults) + object.assets = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.assets && message.assets.length) { + object.assets = []; + for (var j = 0; j < message.assets.length; ++j) + object.assets[j] = $root.google.cloud.dataplex.v1.Asset.toObject(message.assets[j], options); } - 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.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Entity.Type[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.Entity.Type[message.type] : message.type; - if (message.asset != null && message.hasOwnProperty("asset")) - object.asset = message.asset; - if (message.dataPath != null && message.hasOwnProperty("dataPath")) - object.dataPath = message.dataPath; - if (message.dataPathPattern != null && message.hasOwnProperty("dataPathPattern")) - object.dataPathPattern = message.dataPathPattern; - if (message.catalogEntry != null && message.hasOwnProperty("catalogEntry")) - object.catalogEntry = message.catalogEntry; - if (message.system != null && message.hasOwnProperty("system")) - object.system = options.enums === String ? $root.google.cloud.dataplex.v1.StorageSystem[message.system] === undefined ? message.system : $root.google.cloud.dataplex.v1.StorageSystem[message.system] : message.system; - if (message.format != null && message.hasOwnProperty("format")) - object.format = $root.google.cloud.dataplex.v1.StorageFormat.toObject(message.format, options); - if (message.compatibility != null && message.hasOwnProperty("compatibility")) - object.compatibility = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.toObject(message.compatibility, options); - if (message.schema != null && message.hasOwnProperty("schema")) - object.schema = $root.google.cloud.dataplex.v1.Schema.toObject(message.schema, options); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this Entity to JSON. + * Converts this ListAssetsResponse to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.Entity + * @memberof google.cloud.dataplex.v1.ListAssetsResponse * @instance * @returns {Object.} JSON object */ - Entity.prototype.toJSON = function toJSON() { + ListAssetsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Entity + * Gets the default type url for ListAssetsResponse * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Entity + * @memberof google.cloud.dataplex.v1.ListAssetsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Entity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListAssetsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Entity"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListAssetsResponse"; }; + return ListAssetsResponse; + })(); + + v1.ListAssetActionsRequest = (function() { + /** - * Type enum. - * @name google.cloud.dataplex.v1.Entity.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} TABLE=1 TABLE value - * @property {number} FILESET=2 FILESET value + * Properties of a ListAssetActionsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListAssetActionsRequest + * @property {string|null} [parent] ListAssetActionsRequest parent + * @property {number|null} [pageSize] ListAssetActionsRequest pageSize + * @property {string|null} [pageToken] ListAssetActionsRequest pageToken */ - Entity.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "TABLE"] = 1; - values[valuesById[2] = "FILESET"] = 2; - return values; - })(); - - Entity.CompatibilityStatus = (function() { - /** - * Properties of a CompatibilityStatus. - * @memberof google.cloud.dataplex.v1.Entity - * @interface ICompatibilityStatus - * @property {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null} [hiveMetastore] CompatibilityStatus hiveMetastore - * @property {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null} [bigquery] CompatibilityStatus bigquery - */ + /** + * Constructs a new ListAssetActionsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListAssetActionsRequest. + * @implements IListAssetActionsRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest=} [properties] Properties to set + */ + function ListAssetActionsRequest(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]]; + } - /** - * Constructs a new CompatibilityStatus. - * @memberof google.cloud.dataplex.v1.Entity - * @classdesc Represents a CompatibilityStatus. - * @implements ICompatibilityStatus - * @constructor - * @param {google.cloud.dataplex.v1.Entity.ICompatibilityStatus=} [properties] Properties to set - */ - function CompatibilityStatus(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]]; - } + /** + * ListAssetActionsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @instance + */ + ListAssetActionsRequest.prototype.parent = ""; - /** - * CompatibilityStatus hiveMetastore. - * @member {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null|undefined} hiveMetastore - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @instance - */ - CompatibilityStatus.prototype.hiveMetastore = null; + /** + * ListAssetActionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @instance + */ + ListAssetActionsRequest.prototype.pageSize = 0; - /** - * CompatibilityStatus bigquery. - * @member {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null|undefined} bigquery - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @instance - */ - CompatibilityStatus.prototype.bigquery = null; + /** + * ListAssetActionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @instance + */ + ListAssetActionsRequest.prototype.pageToken = ""; - /** - * Creates a new CompatibilityStatus instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @static - * @param {google.cloud.dataplex.v1.Entity.ICompatibilityStatus=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus} CompatibilityStatus instance - */ - CompatibilityStatus.create = function create(properties) { - return new CompatibilityStatus(properties); - }; + /** + * Creates a new ListAssetActionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest instance + */ + ListAssetActionsRequest.create = function create(properties) { + return new ListAssetActionsRequest(properties); + }; - /** - * Encodes the specified CompatibilityStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @static - * @param {google.cloud.dataplex.v1.Entity.ICompatibilityStatus} message CompatibilityStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompatibilityStatus.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.hiveMetastore != null && Object.hasOwnProperty.call(message, "hiveMetastore")) - $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.encode(message.hiveMetastore, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.bigquery != null && Object.hasOwnProperty.call(message, "bigquery")) - $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.encode(message.bigquery, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified ListAssetActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} message ListAssetActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAssetActionsRequest.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); + return writer; + }; - /** - * Encodes the specified CompatibilityStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @static - * @param {google.cloud.dataplex.v1.Entity.ICompatibilityStatus} message CompatibilityStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompatibilityStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ListAssetActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} message ListAssetActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAssetActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a CompatibilityStatus message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus} CompatibilityStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompatibilityStatus.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.hiveMetastore = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.decode(reader, reader.uint32()); - break; - } - case 2: { - message.bigquery = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes a ListAssetActionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAssetActionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListAssetActionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a CompatibilityStatus message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus} CompatibilityStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompatibilityStatus.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a CompatibilityStatus message. - * @function verify - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CompatibilityStatus.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.hiveMetastore != null && message.hasOwnProperty("hiveMetastore")) { - var error = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify(message.hiveMetastore); - if (error) - return "hiveMetastore." + error; - } - if (message.bigquery != null && message.hasOwnProperty("bigquery")) { - var error = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify(message.bigquery); - if (error) - return "bigquery." + error; - } - return null; - }; + /** + * Decodes a ListAssetActionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAssetActionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a CompatibilityStatus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus} CompatibilityStatus - */ - CompatibilityStatus.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus) - return object; - var message = new $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus(); - if (object.hiveMetastore != null) { - if (typeof object.hiveMetastore !== "object") - throw TypeError(".google.cloud.dataplex.v1.Entity.CompatibilityStatus.hiveMetastore: object expected"); - message.hiveMetastore = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.fromObject(object.hiveMetastore); - } - if (object.bigquery != null) { - if (typeof object.bigquery !== "object") - throw TypeError(".google.cloud.dataplex.v1.Entity.CompatibilityStatus.bigquery: object expected"); - message.bigquery = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.fromObject(object.bigquery); - } - return message; - }; + /** + * Verifies a ListAssetActionsRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAssetActionsRequest.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"; + return null; + }; - /** - * Creates a plain object from a CompatibilityStatus message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @static - * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus} message CompatibilityStatus - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CompatibilityStatus.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.hiveMetastore = null; - object.bigquery = null; - } - if (message.hiveMetastore != null && message.hasOwnProperty("hiveMetastore")) - object.hiveMetastore = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.toObject(message.hiveMetastore, options); - if (message.bigquery != null && message.hasOwnProperty("bigquery")) - object.bigquery = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.toObject(message.bigquery, options); + /** + * Creates a ListAssetActionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest + */ + ListAssetActionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListAssetActionsRequest) return object; - }; + var message = new $root.google.cloud.dataplex.v1.ListAssetActionsRequest(); + 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); + return message; + }; - /** - * Converts this CompatibilityStatus to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @instance - * @returns {Object.} JSON object - */ - CompatibilityStatus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a ListAssetActionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {google.cloud.dataplex.v1.ListAssetActionsRequest} message ListAssetActionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAssetActionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + 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; + return object; + }; - /** - * Gets the default type url for CompatibilityStatus - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CompatibilityStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Entity.CompatibilityStatus"; - }; + /** + * Converts this ListAssetActionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListAssetActionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - CompatibilityStatus.Compatibility = (function() { + /** + * Gets the default type url for ListAssetActionsRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAssetActionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListAssetActionsRequest"; + }; - /** - * Properties of a Compatibility. - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @interface ICompatibility - * @property {boolean|null} [compatible] Compatibility compatible - * @property {string|null} [reason] Compatibility reason - */ + return ListAssetActionsRequest; + })(); - /** - * Constructs a new Compatibility. - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus - * @classdesc Represents a Compatibility. - * @implements ICompatibility - * @constructor - * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility=} [properties] Properties to set - */ - function Compatibility(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]]; - } + v1.GetAssetRequest = (function() { - /** - * Compatibility compatible. - * @member {boolean} compatible - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @instance - */ - Compatibility.prototype.compatible = false; + /** + * Properties of a GetAssetRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetAssetRequest + * @property {string|null} [name] GetAssetRequest name + */ - /** - * Compatibility reason. - * @member {string} reason - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @instance - */ - Compatibility.prototype.reason = ""; + /** + * Constructs a new GetAssetRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetAssetRequest. + * @implements IGetAssetRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetAssetRequest=} [properties] Properties to set + */ + function GetAssetRequest(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]]; + } - /** - * Creates a new Compatibility instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @static - * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} Compatibility instance - */ - Compatibility.create = function create(properties) { - return new Compatibility(properties); - }; + /** + * GetAssetRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @instance + */ + GetAssetRequest.prototype.name = ""; - /** - * Encodes the specified Compatibility message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @static - * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility} message Compatibility message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Compatibility.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.compatible != null && Object.hasOwnProperty.call(message, "compatible")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.compatible); - if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.reason); - return writer; - }; + /** + * Creates a new GetAssetRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @static + * @param {google.cloud.dataplex.v1.IGetAssetRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest instance + */ + GetAssetRequest.create = function create(properties) { + return new GetAssetRequest(properties); + }; - /** - * Encodes the specified Compatibility message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @static - * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility} message Compatibility message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Compatibility.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Compatibility message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} Compatibility - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Compatibility.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.compatible = reader.bool(); - break; - } - case 2: { - message.reason = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Compatibility message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} Compatibility - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Compatibility.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Compatibility message. - * @function verify - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Compatibility.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.compatible != null && message.hasOwnProperty("compatible")) - if (typeof message.compatible !== "boolean") - return "compatible: boolean expected"; - if (message.reason != null && message.hasOwnProperty("reason")) - if (!$util.isString(message.reason)) - return "reason: string expected"; - return null; - }; - - /** - * Creates a Compatibility message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} Compatibility - */ - Compatibility.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility) - return object; - var message = new $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility(); - if (object.compatible != null) - message.compatible = Boolean(object.compatible); - if (object.reason != null) - message.reason = String(object.reason); - return message; - }; - - /** - * Creates a plain object from a Compatibility message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @static - * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} message Compatibility - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Compatibility.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.compatible = false; - object.reason = ""; - } - if (message.compatible != null && message.hasOwnProperty("compatible")) - object.compatible = message.compatible; - if (message.reason != null && message.hasOwnProperty("reason")) - object.reason = message.reason; - return object; - }; - - /** - * Converts this Compatibility to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @instance - * @returns {Object.} JSON object - */ - Compatibility.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Compatibility - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Compatibility.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility"; - }; - - return Compatibility; - })(); - - return CompatibilityStatus; - })(); - - return Entity; - })(); - - v1.Partition = (function() { - - /** - * Properties of a Partition. - * @memberof google.cloud.dataplex.v1 - * @interface IPartition - * @property {string|null} [name] Partition name - * @property {Array.|null} [values] Partition values - * @property {string|null} [location] Partition location - * @property {string|null} [etag] Partition etag - */ - - /** - * Constructs a new Partition. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a Partition. - * @implements IPartition - * @constructor - * @param {google.cloud.dataplex.v1.IPartition=} [properties] Properties to set - */ - function Partition(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]]; - } - - /** - * Partition name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.Partition - * @instance - */ - Partition.prototype.name = ""; - - /** - * Partition values. - * @member {Array.} values - * @memberof google.cloud.dataplex.v1.Partition - * @instance - */ - Partition.prototype.values = $util.emptyArray; - - /** - * Partition location. - * @member {string} location - * @memberof google.cloud.dataplex.v1.Partition - * @instance - */ - Partition.prototype.location = ""; - - /** - * Partition etag. - * @member {string} etag - * @memberof google.cloud.dataplex.v1.Partition - * @instance - */ - Partition.prototype.etag = ""; - - /** - * Creates a new Partition instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Partition - * @static - * @param {google.cloud.dataplex.v1.IPartition=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Partition} Partition instance - */ - Partition.create = function create(properties) { - return new Partition(properties); - }; - - /** - * Encodes the specified Partition message. Does not implicitly {@link google.cloud.dataplex.v1.Partition.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Partition - * @static - * @param {google.cloud.dataplex.v1.IPartition} message Partition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Partition.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.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.location); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.etag); - return writer; - }; + /** + * Encodes the specified GetAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @static + * @param {google.cloud.dataplex.v1.IGetAssetRequest} message GetAssetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAssetRequest.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 Partition message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Partition.verify|verify} messages. + * Encodes the specified GetAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Partition + * @memberof google.cloud.dataplex.v1.GetAssetRequest * @static - * @param {google.cloud.dataplex.v1.IPartition} message Partition message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetAssetRequest} message GetAssetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Partition.encodeDelimited = function encodeDelimited(message, writer) { + GetAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Partition message from the specified reader or buffer. + * Decodes a GetAssetRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.Partition + * @memberof google.cloud.dataplex.v1.GetAssetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Partition} Partition + * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Partition.decode = function decode(reader, length) { + GetAssetRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Partition(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetAssetRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -34620,20 +32827,6 @@ message.name = reader.string(); break; } - case 2: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push(reader.string()); - break; - } - case 3: { - message.location = reader.string(); - break; - } - case 4: { - message.etag = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -34643,165 +32836,128 @@ }; /** - * Decodes a Partition message from the specified reader or buffer, length delimited. + * Decodes a GetAssetRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Partition + * @memberof google.cloud.dataplex.v1.GetAssetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Partition} Partition + * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Partition.decodeDelimited = function decodeDelimited(reader) { + GetAssetRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Partition message. + * Verifies a GetAssetRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.Partition + * @memberof google.cloud.dataplex.v1.GetAssetRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Partition.verify = function verify(message) { + GetAssetRequest.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.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; return null; }; /** - * Creates a Partition message from a plain object. Also converts values to their respective internal types. + * Creates a GetAssetRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.Partition + * @memberof google.cloud.dataplex.v1.GetAssetRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Partition} Partition + * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest */ - Partition.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Partition) + GetAssetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetAssetRequest) return object; - var message = new $root.google.cloud.dataplex.v1.Partition(); + var message = new $root.google.cloud.dataplex.v1.GetAssetRequest(); if (object.name != null) message.name = String(object.name); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.cloud.dataplex.v1.Partition.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) - message.values[i] = String(object.values[i]); - } - if (object.location != null) - message.location = String(object.location); - if (object.etag != null) - message.etag = String(object.etag); return message; }; /** - * Creates a plain object from a Partition message. Also converts values to other types if specified. + * Creates a plain object from a GetAssetRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.Partition + * @memberof google.cloud.dataplex.v1.GetAssetRequest * @static - * @param {google.cloud.dataplex.v1.Partition} message Partition + * @param {google.cloud.dataplex.v1.GetAssetRequest} message GetAssetRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Partition.toObject = function toObject(message, options) { + GetAssetRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.location = ""; - object.etag = ""; - } 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.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; return object; }; /** - * Converts this Partition to JSON. + * Converts this GetAssetRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.Partition + * @memberof google.cloud.dataplex.v1.GetAssetRequest * @instance * @returns {Object.} JSON object */ - Partition.prototype.toJSON = function toJSON() { + GetAssetRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Partition + * Gets the default type url for GetAssetRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Partition + * @memberof google.cloud.dataplex.v1.GetAssetRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Partition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetAssetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Partition"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetAssetRequest"; }; - return Partition; + return GetAssetRequest; })(); - v1.Schema = (function() { + v1.OperationMetadata = (function() { /** - * Properties of a Schema. + * Properties of an OperationMetadata. * @memberof google.cloud.dataplex.v1 - * @interface ISchema - * @property {boolean|null} [userManaged] Schema userManaged - * @property {Array.|null} [fields] Schema fields - * @property {Array.|null} [partitionFields] Schema partitionFields - * @property {google.cloud.dataplex.v1.Schema.PartitionStyle|null} [partitionStyle] Schema partitionStyle + * @interface IOperationMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime + * @property {string|null} [target] OperationMetadata target + * @property {string|null} [verb] OperationMetadata verb + * @property {string|null} [statusMessage] OperationMetadata statusMessage + * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation + * @property {string|null} [apiVersion] OperationMetadata apiVersion */ /** - * Constructs a new Schema. + * Constructs a new OperationMetadata. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a Schema. - * @implements ISchema + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata * @constructor - * @param {google.cloud.dataplex.v1.ISchema=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IOperationMetadata=} [properties] Properties to set */ - function Schema(properties) { - this.fields = []; - this.partitionFields = []; + function OperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -34809,123 +32965,159 @@ } /** - * Schema userManaged. - * @member {boolean} userManaged - * @memberof google.cloud.dataplex.v1.Schema + * OperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.OperationMetadata * @instance */ - Schema.prototype.userManaged = false; + OperationMetadata.prototype.createTime = null; /** - * Schema fields. - * @member {Array.} fields - * @memberof google.cloud.dataplex.v1.Schema + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.dataplex.v1.OperationMetadata * @instance */ - Schema.prototype.fields = $util.emptyArray; + OperationMetadata.prototype.endTime = null; /** - * Schema partitionFields. - * @member {Array.} partitionFields - * @memberof google.cloud.dataplex.v1.Schema + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.dataplex.v1.OperationMetadata * @instance */ - Schema.prototype.partitionFields = $util.emptyArray; + OperationMetadata.prototype.target = ""; /** - * Schema partitionStyle. - * @member {google.cloud.dataplex.v1.Schema.PartitionStyle} partitionStyle - * @memberof google.cloud.dataplex.v1.Schema + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.dataplex.v1.OperationMetadata * @instance */ - Schema.prototype.partitionStyle = 0; + OperationMetadata.prototype.verb = ""; /** - * Creates a new Schema instance using the specified properties. + * OperationMetadata statusMessage. + * @member {string} statusMessage + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.statusMessage = ""; + + /** + * OperationMetadata requestedCancellation. + * @member {boolean} requestedCancellation + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.requestedCancellation = false; + + /** + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.dataplex.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.apiVersion = ""; + + /** + * Creates a new OperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.Schema + * @memberof google.cloud.dataplex.v1.OperationMetadata * @static - * @param {google.cloud.dataplex.v1.ISchema=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Schema} Schema instance + * @param {google.cloud.dataplex.v1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata instance */ - Schema.create = function create(properties) { - return new Schema(properties); + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); }; /** - * Encodes the specified Schema message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.verify|verify} messages. + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.dataplex.v1.OperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.Schema + * @memberof google.cloud.dataplex.v1.OperationMetadata * @static - * @param {google.cloud.dataplex.v1.ISchema} message Schema message or plain object to encode + * @param {google.cloud.dataplex.v1.IOperationMetadata} message OperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Schema.encode = function encode(message, writer) { + OperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.userManaged != null && Object.hasOwnProperty.call(message, "userManaged")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.userManaged); - if (message.fields != null && message.fields.length) - for (var i = 0; i < message.fields.length; ++i) - $root.google.cloud.dataplex.v1.Schema.SchemaField.encode(message.fields[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.partitionFields != null && message.partitionFields.length) - for (var i = 0; i < message.partitionFields.length; ++i) - $root.google.cloud.dataplex.v1.Schema.PartitionField.encode(message.partitionFields[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.partitionStyle != null && Object.hasOwnProperty.call(message, "partitionStyle")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.partitionStyle); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); + if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); + if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); + if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); + if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); return writer; }; /** - * Encodes the specified Schema message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.verify|verify} messages. + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.OperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Schema + * @memberof google.cloud.dataplex.v1.OperationMetadata * @static - * @param {google.cloud.dataplex.v1.ISchema} message Schema message or plain object to encode + * @param {google.cloud.dataplex.v1.IOperationMetadata} message OperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Schema.encodeDelimited = function encodeDelimited(message, writer) { + OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Schema message from the specified reader or buffer. + * Decodes an OperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.Schema + * @memberof google.cloud.dataplex.v1.OperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Schema} Schema + * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Schema.decode = function decode(reader, length) { + OperationMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Schema(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.OperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.userManaged = reader.bool(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 2: { - if (!(message.fields && message.fields.length)) - message.fields = []; - message.fields.push($root.google.cloud.dataplex.v1.Schema.SchemaField.decode(reader, reader.uint32())); + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 3: { - if (!(message.partitionFields && message.partitionFields.length)) - message.partitionFields = []; - message.partitionFields.push($root.google.cloud.dataplex.v1.Schema.PartitionField.decode(reader, reader.uint32())); + message.target = reader.string(); break; } case 4: { - message.partitionStyle = reader.int32(); + message.verb = reader.string(); + break; + } + case 5: { + message.statusMessage = reader.string(); + break; + } + case 6: { + message.requestedCancellation = reader.bool(); + break; + } + case 7: { + message.apiVersion = reader.string(); break; } default: @@ -34937,1033 +33129,1506 @@ }; /** - * Decodes a Schema message from the specified reader or buffer, length delimited. + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Schema + * @memberof google.cloud.dataplex.v1.OperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Schema} Schema + * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Schema.decodeDelimited = function decodeDelimited(reader) { + OperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Schema message. + * Verifies an OperationMetadata message. * @function verify - * @memberof google.cloud.dataplex.v1.Schema + * @memberof google.cloud.dataplex.v1.OperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Schema.verify = function verify(message) { + OperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.userManaged != null && message.hasOwnProperty("userManaged")) - if (typeof message.userManaged !== "boolean") - return "userManaged: boolean expected"; - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!Array.isArray(message.fields)) - return "fields: array expected"; - for (var i = 0; i < message.fields.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Schema.SchemaField.verify(message.fields[i]); - if (error) - return "fields." + error; - } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; } - if (message.partitionFields != null && message.hasOwnProperty("partitionFields")) { - if (!Array.isArray(message.partitionFields)) - return "partitionFields: array expected"; - for (var i = 0; i < message.partitionFields.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Schema.PartitionField.verify(message.partitionFields[i]); - if (error) - return "partitionFields." + error; - } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; } - if (message.partitionStyle != null && message.hasOwnProperty("partitionStyle")) - switch (message.partitionStyle) { - default: - return "partitionStyle: enum value expected"; - case 0: - case 1: - break; - } + if (message.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.verb != null && message.hasOwnProperty("verb")) + if (!$util.isString(message.verb)) + return "verb: string expected"; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + if (!$util.isString(message.statusMessage)) + return "statusMessage: string expected"; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + if (typeof message.requestedCancellation !== "boolean") + return "requestedCancellation: boolean expected"; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + if (!$util.isString(message.apiVersion)) + return "apiVersion: string expected"; return null; }; /** - * Creates a Schema message from a plain object. Also converts values to their respective internal types. + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.Schema + * @memberof google.cloud.dataplex.v1.OperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Schema} Schema + * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata */ - Schema.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Schema) + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.OperationMetadata) return object; - var message = new $root.google.cloud.dataplex.v1.Schema(); - if (object.userManaged != null) - message.userManaged = Boolean(object.userManaged); - if (object.fields) { - if (!Array.isArray(object.fields)) - throw TypeError(".google.cloud.dataplex.v1.Schema.fields: array expected"); - message.fields = []; - for (var i = 0; i < object.fields.length; ++i) { - if (typeof object.fields[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.Schema.fields: object expected"); - message.fields[i] = $root.google.cloud.dataplex.v1.Schema.SchemaField.fromObject(object.fields[i]); - } - } - if (object.partitionFields) { - if (!Array.isArray(object.partitionFields)) - throw TypeError(".google.cloud.dataplex.v1.Schema.partitionFields: array expected"); - message.partitionFields = []; - for (var i = 0; i < object.partitionFields.length; ++i) { - if (typeof object.partitionFields[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.Schema.partitionFields: object expected"); - message.partitionFields[i] = $root.google.cloud.dataplex.v1.Schema.PartitionField.fromObject(object.partitionFields[i]); - } + var message = new $root.google.cloud.dataplex.v1.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.OperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - switch (object.partitionStyle) { - default: - if (typeof object.partitionStyle === "number") { - message.partitionStyle = object.partitionStyle; - break; - } - break; - case "PARTITION_STYLE_UNSPECIFIED": - case 0: - message.partitionStyle = 0; - break; - case "HIVE_COMPATIBLE": - case 1: - message.partitionStyle = 1; - break; + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.OperationMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); } + if (object.target != null) + message.target = String(object.target); + if (object.verb != null) + message.verb = String(object.verb); + if (object.statusMessage != null) + message.statusMessage = String(object.statusMessage); + if (object.requestedCancellation != null) + message.requestedCancellation = Boolean(object.requestedCancellation); + if (object.apiVersion != null) + message.apiVersion = String(object.apiVersion); return message; }; /** - * Creates a plain object from a Schema message. Also converts values to other types if specified. + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.Schema + * @memberof google.cloud.dataplex.v1.OperationMetadata * @static - * @param {google.cloud.dataplex.v1.Schema} message Schema + * @param {google.cloud.dataplex.v1.OperationMetadata} message OperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Schema.toObject = function toObject(message, options) { + OperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.fields = []; - object.partitionFields = []; - } if (options.defaults) { - object.userManaged = false; - object.partitionStyle = options.enums === String ? "PARTITION_STYLE_UNSPECIFIED" : 0; - } - if (message.userManaged != null && message.hasOwnProperty("userManaged")) - object.userManaged = message.userManaged; - if (message.fields && message.fields.length) { - object.fields = []; - for (var j = 0; j < message.fields.length; ++j) - object.fields[j] = $root.google.cloud.dataplex.v1.Schema.SchemaField.toObject(message.fields[j], options); - } - if (message.partitionFields && message.partitionFields.length) { - object.partitionFields = []; - for (var j = 0; j < message.partitionFields.length; ++j) - object.partitionFields[j] = $root.google.cloud.dataplex.v1.Schema.PartitionField.toObject(message.partitionFields[j], options); + object.createTime = null; + object.endTime = null; + object.target = ""; + object.verb = ""; + object.statusMessage = ""; + object.requestedCancellation = false; + object.apiVersion = ""; } - if (message.partitionStyle != null && message.hasOwnProperty("partitionStyle")) - object.partitionStyle = options.enums === String ? $root.google.cloud.dataplex.v1.Schema.PartitionStyle[message.partitionStyle] === undefined ? message.partitionStyle : $root.google.cloud.dataplex.v1.Schema.PartitionStyle[message.partitionStyle] : message.partitionStyle; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = message.target; + if (message.verb != null && message.hasOwnProperty("verb")) + object.verb = message.verb; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + object.statusMessage = message.statusMessage; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + object.requestedCancellation = message.requestedCancellation; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + object.apiVersion = message.apiVersion; return object; }; /** - * Converts this Schema to JSON. + * Converts this OperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.Schema + * @memberof google.cloud.dataplex.v1.OperationMetadata * @instance * @returns {Object.} JSON object */ - Schema.prototype.toJSON = function toJSON() { + OperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Schema + * Gets the default type url for OperationMetadata * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Schema + * @memberof google.cloud.dataplex.v1.OperationMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Schema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Schema"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.OperationMetadata"; }; + return OperationMetadata; + })(); + + v1.CreateTaskRequest = (function() { + /** - * Type enum. - * @name google.cloud.dataplex.v1.Schema.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} BOOLEAN=1 BOOLEAN value - * @property {number} BYTE=2 BYTE value - * @property {number} INT16=3 INT16 value - * @property {number} INT32=4 INT32 value - * @property {number} INT64=5 INT64 value - * @property {number} FLOAT=6 FLOAT value - * @property {number} DOUBLE=7 DOUBLE value - * @property {number} DECIMAL=8 DECIMAL value - * @property {number} STRING=9 STRING value - * @property {number} BINARY=10 BINARY value - * @property {number} TIMESTAMP=11 TIMESTAMP value - * @property {number} DATE=12 DATE value - * @property {number} TIME=13 TIME value - * @property {number} RECORD=14 RECORD value - * @property {number} NULL=100 NULL value + * Properties of a CreateTaskRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreateTaskRequest + * @property {string|null} [parent] CreateTaskRequest parent + * @property {string|null} [taskId] CreateTaskRequest taskId + * @property {google.cloud.dataplex.v1.ITask|null} [task] CreateTaskRequest task + * @property {boolean|null} [validateOnly] CreateTaskRequest validateOnly */ - Schema.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "BOOLEAN"] = 1; - values[valuesById[2] = "BYTE"] = 2; - values[valuesById[3] = "INT16"] = 3; - values[valuesById[4] = "INT32"] = 4; - values[valuesById[5] = "INT64"] = 5; - values[valuesById[6] = "FLOAT"] = 6; - values[valuesById[7] = "DOUBLE"] = 7; - values[valuesById[8] = "DECIMAL"] = 8; - values[valuesById[9] = "STRING"] = 9; - values[valuesById[10] = "BINARY"] = 10; - values[valuesById[11] = "TIMESTAMP"] = 11; - values[valuesById[12] = "DATE"] = 12; - values[valuesById[13] = "TIME"] = 13; - values[valuesById[14] = "RECORD"] = 14; - values[valuesById[100] = "NULL"] = 100; - return values; - })(); /** - * Mode enum. - * @name google.cloud.dataplex.v1.Schema.Mode - * @enum {number} - * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value - * @property {number} REQUIRED=1 REQUIRED value - * @property {number} NULLABLE=2 NULLABLE value - * @property {number} REPEATED=3 REPEATED value + * Constructs a new CreateTaskRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreateTaskRequest. + * @implements ICreateTaskRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICreateTaskRequest=} [properties] Properties to set */ - Schema.Mode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "REQUIRED"] = 1; - values[valuesById[2] = "NULLABLE"] = 2; - values[valuesById[3] = "REPEATED"] = 3; - return values; - })(); + function CreateTaskRequest(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]]; + } - Schema.SchemaField = (function() { + /** + * CreateTaskRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @instance + */ + CreateTaskRequest.prototype.parent = ""; - /** - * Properties of a SchemaField. - * @memberof google.cloud.dataplex.v1.Schema - * @interface ISchemaField - * @property {string|null} [name] SchemaField name - * @property {string|null} [description] SchemaField description - * @property {google.cloud.dataplex.v1.Schema.Type|null} [type] SchemaField type - * @property {google.cloud.dataplex.v1.Schema.Mode|null} [mode] SchemaField mode - * @property {Array.|null} [fields] SchemaField fields - */ + /** + * CreateTaskRequest taskId. + * @member {string} taskId + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @instance + */ + CreateTaskRequest.prototype.taskId = ""; - /** - * Constructs a new SchemaField. - * @memberof google.cloud.dataplex.v1.Schema - * @classdesc Represents a SchemaField. - * @implements ISchemaField - * @constructor - * @param {google.cloud.dataplex.v1.Schema.ISchemaField=} [properties] Properties to set - */ - function SchemaField(properties) { - this.fields = []; - 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]]; - } + /** + * CreateTaskRequest task. + * @member {google.cloud.dataplex.v1.ITask|null|undefined} task + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @instance + */ + CreateTaskRequest.prototype.task = null; - /** - * SchemaField name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.Schema.SchemaField - * @instance - */ - SchemaField.prototype.name = ""; + /** + * CreateTaskRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @instance + */ + CreateTaskRequest.prototype.validateOnly = false; - /** - * SchemaField description. - * @member {string} description - * @memberof google.cloud.dataplex.v1.Schema.SchemaField - * @instance - */ - SchemaField.prototype.description = ""; + /** + * Creates a new CreateTaskRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateTaskRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest instance + */ + CreateTaskRequest.create = function create(properties) { + return new CreateTaskRequest(properties); + }; - /** - * SchemaField type. - * @member {google.cloud.dataplex.v1.Schema.Type} type - * @memberof google.cloud.dataplex.v1.Schema.SchemaField - * @instance - */ - SchemaField.prototype.type = 0; + /** + * Encodes the specified CreateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateTaskRequest} message CreateTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTaskRequest.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.taskId != null && Object.hasOwnProperty.call(message, "taskId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.taskId); + if (message.task != null && Object.hasOwnProperty.call(message, "task")) + $root.google.cloud.dataplex.v1.Task.encode(message.task, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; - /** - * SchemaField mode. - * @member {google.cloud.dataplex.v1.Schema.Mode} mode - * @memberof google.cloud.dataplex.v1.Schema.SchemaField - * @instance - */ - SchemaField.prototype.mode = 0; + /** + * Encodes the specified CreateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateTaskRequest} message CreateTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * SchemaField fields. - * @member {Array.} fields - * @memberof google.cloud.dataplex.v1.Schema.SchemaField - * @instance - */ - SchemaField.prototype.fields = $util.emptyArray; + /** + * Decodes a CreateTaskRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTaskRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateTaskRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.taskId = reader.string(); + break; + } + case 3: { + message.task = $root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32()); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a new SchemaField instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Schema.SchemaField - * @static - * @param {google.cloud.dataplex.v1.Schema.ISchemaField=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Schema.SchemaField} SchemaField instance - */ - SchemaField.create = function create(properties) { - return new SchemaField(properties); - }; + /** + * Decodes a CreateTaskRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTaskRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified SchemaField message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.SchemaField.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Schema.SchemaField - * @static - * @param {google.cloud.dataplex.v1.Schema.ISchemaField} message SchemaField message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SchemaField.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); - if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.mode); - if (message.fields != null && message.fields.length) - for (var i = 0; i < message.fields.length; ++i) - $root.google.cloud.dataplex.v1.Schema.SchemaField.encode(message.fields[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - return writer; - }; + /** + * Verifies a CreateTaskRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateTaskRequest.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.taskId != null && message.hasOwnProperty("taskId")) + if (!$util.isString(message.taskId)) + return "taskId: string expected"; + if (message.task != null && message.hasOwnProperty("task")) { + var error = $root.google.cloud.dataplex.v1.Task.verify(message.task); + if (error) + return "task." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; - /** - * Encodes the specified SchemaField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.SchemaField.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Schema.SchemaField - * @static - * @param {google.cloud.dataplex.v1.Schema.ISchemaField} message SchemaField message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SchemaField.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a CreateTaskRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest + */ + CreateTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateTaskRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CreateTaskRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.taskId != null) + message.taskId = String(object.taskId); + if (object.task != null) { + if (typeof object.task !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateTaskRequest.task: object expected"); + message.task = $root.google.cloud.dataplex.v1.Task.fromObject(object.task); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; - /** - * Decodes a SchemaField message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Schema.SchemaField - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Schema.SchemaField} SchemaField - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SchemaField.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Schema.SchemaField(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.description = reader.string(); - break; - } - case 3: { - message.type = reader.int32(); - break; - } - case 4: { - message.mode = reader.int32(); - break; - } - case 10: { - if (!(message.fields && message.fields.length)) - message.fields = []; - message.fields.push($root.google.cloud.dataplex.v1.Schema.SchemaField.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); + /** + * Creates a plain object from a CreateTaskRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {google.cloud.dataplex.v1.CreateTaskRequest} message CreateTaskRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateTaskRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.taskId = ""; + object.task = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.taskId != null && message.hasOwnProperty("taskId")) + object.taskId = message.taskId; + if (message.task != null && message.hasOwnProperty("task")) + object.task = $root.google.cloud.dataplex.v1.Task.toObject(message.task, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateTaskRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @instance + * @returns {Object.} JSON object + */ + CreateTaskRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateTaskRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.CreateTaskRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateTaskRequest"; + }; + + return CreateTaskRequest; + })(); + + v1.UpdateTaskRequest = (function() { + + /** + * Properties of an UpdateTaskRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IUpdateTaskRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTaskRequest updateMask + * @property {google.cloud.dataplex.v1.ITask|null} [task] UpdateTaskRequest task + * @property {boolean|null} [validateOnly] UpdateTaskRequest validateOnly + */ + + /** + * Constructs a new UpdateTaskRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an UpdateTaskRequest. + * @implements IUpdateTaskRequest + * @constructor + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest=} [properties] Properties to set + */ + function UpdateTaskRequest(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]]; + } + + /** + * UpdateTaskRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @instance + */ + UpdateTaskRequest.prototype.updateMask = null; + + /** + * UpdateTaskRequest task. + * @member {google.cloud.dataplex.v1.ITask|null|undefined} task + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @instance + */ + UpdateTaskRequest.prototype.task = null; + + /** + * UpdateTaskRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @instance + */ + UpdateTaskRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateTaskRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest instance + */ + UpdateTaskRequest.create = function create(properties) { + return new UpdateTaskRequest(properties); + }; + + /** + * Encodes the specified UpdateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} message UpdateTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateTaskRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.task != null && Object.hasOwnProperty.call(message, "task")) + $root.google.cloud.dataplex.v1.Task.encode(message.task, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} message UpdateTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateTaskRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateTaskRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateTaskRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.task = $root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32()); break; } + case 3: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; + + /** + * Decodes an UpdateTaskRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateTaskRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateTaskRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateTaskRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.task != null && message.hasOwnProperty("task")) { + var error = $root.google.cloud.dataplex.v1.Task.verify(message.task); + if (error) + return "task." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateTaskRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest + */ + UpdateTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateTaskRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.UpdateTaskRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateTaskRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.task != null) { + if (typeof object.task !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateTaskRequest.task: object expected"); + message.task = $root.google.cloud.dataplex.v1.Task.fromObject(object.task); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateTaskRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {google.cloud.dataplex.v1.UpdateTaskRequest} message UpdateTaskRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateTaskRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.task = null; + object.validateOnly = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.task != null && message.hasOwnProperty("task")) + object.task = $root.google.cloud.dataplex.v1.Task.toObject(message.task, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateTaskRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateTaskRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateTaskRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateTaskRequest"; + }; + + return UpdateTaskRequest; + })(); + + v1.DeleteTaskRequest = (function() { + + /** + * Properties of a DeleteTaskRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IDeleteTaskRequest + * @property {string|null} [name] DeleteTaskRequest name + */ + + /** + * Constructs a new DeleteTaskRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DeleteTaskRequest. + * @implements IDeleteTaskRequest + * @constructor + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest=} [properties] Properties to set + */ + function DeleteTaskRequest(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]]; + } + + /** + * DeleteTaskRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @instance + */ + DeleteTaskRequest.prototype.name = ""; + + /** + * Creates a new DeleteTaskRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest instance + */ + DeleteTaskRequest.create = function create(properties) { + return new DeleteTaskRequest(properties); + }; + + /** + * Encodes the specified DeleteTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} message DeleteTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteTaskRequest.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 DeleteTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} message DeleteTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteTaskRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteTaskRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteTaskRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteTaskRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteTaskRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteTaskRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteTaskRequest.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 DeleteTaskRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest + */ + DeleteTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteTaskRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.DeleteTaskRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteTaskRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {google.cloud.dataplex.v1.DeleteTaskRequest} message DeleteTaskRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteTaskRequest.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 DeleteTaskRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteTaskRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteTaskRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteTaskRequest"; + }; + + return DeleteTaskRequest; + })(); + + v1.ListTasksRequest = (function() { + + /** + * Properties of a ListTasksRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListTasksRequest + * @property {string|null} [parent] ListTasksRequest parent + * @property {number|null} [pageSize] ListTasksRequest pageSize + * @property {string|null} [pageToken] ListTasksRequest pageToken + * @property {string|null} [filter] ListTasksRequest filter + * @property {string|null} [orderBy] ListTasksRequest orderBy + */ + + /** + * Constructs a new ListTasksRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListTasksRequest. + * @implements IListTasksRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListTasksRequest=} [properties] Properties to set + */ + function ListTasksRequest(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]]; + } + + /** + * ListTasksRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @instance + */ + ListTasksRequest.prototype.parent = ""; + + /** + * ListTasksRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @instance + */ + ListTasksRequest.prototype.pageSize = 0; + + /** + * ListTasksRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @instance + */ + ListTasksRequest.prototype.pageToken = ""; + + /** + * ListTasksRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @instance + */ + ListTasksRequest.prototype.filter = ""; + + /** + * ListTasksRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @instance + */ + ListTasksRequest.prototype.orderBy = ""; - /** - * Decodes a SchemaField message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Schema.SchemaField - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Schema.SchemaField} SchemaField - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SchemaField.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new ListTasksRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {google.cloud.dataplex.v1.IListTasksRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest instance + */ + ListTasksRequest.create = function create(properties) { + return new ListTasksRequest(properties); + }; - /** - * Verifies a SchemaField message. - * @function verify - * @memberof google.cloud.dataplex.v1.Schema.SchemaField - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SchemaField.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 100: + /** + * Encodes the specified ListTasksRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {google.cloud.dataplex.v1.IListTasksRequest} message ListTasksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTasksRequest.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.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListTasksRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {google.cloud.dataplex.v1.IListTasksRequest} message ListTasksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTasksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTasksRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTasksRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListTasksRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); break; } - if (message.mode != null && message.hasOwnProperty("mode")) - switch (message.mode) { - default: - return "mode: enum value expected"; - case 0: - case 1: - case 2: - case 3: + case 2: { + message.pageSize = reader.int32(); break; } - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!Array.isArray(message.fields)) - return "fields: array expected"; - for (var i = 0; i < message.fields.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Schema.SchemaField.verify(message.fields[i]); - if (error) - return "fields." + error; + case 3: { + message.pageToken = reader.string(); + break; } - } - return null; - }; - - /** - * Creates a SchemaField message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Schema.SchemaField - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Schema.SchemaField} SchemaField - */ - SchemaField.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Schema.SchemaField) - return object; - var message = new $root.google.cloud.dataplex.v1.Schema.SchemaField(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; + case 4: { + message.filter = reader.string(); break; } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "BOOLEAN": - case 1: - message.type = 1; - break; - case "BYTE": - case 2: - message.type = 2; - break; - case "INT16": - case 3: - message.type = 3; - break; - case "INT32": - case 4: - message.type = 4; - break; - case "INT64": - case 5: - message.type = 5; - break; - case "FLOAT": - case 6: - message.type = 6; - break; - case "DOUBLE": - case 7: - message.type = 7; - break; - case "DECIMAL": - case 8: - message.type = 8; - break; - case "STRING": - case 9: - message.type = 9; - break; - case "BINARY": - case 10: - message.type = 10; - break; - case "TIMESTAMP": - case 11: - message.type = 11; - break; - case "DATE": - case 12: - message.type = 12; - break; - case "TIME": - case 13: - message.type = 13; - break; - case "RECORD": - case 14: - message.type = 14; - break; - case "NULL": - case 100: - message.type = 100; - break; - } - switch (object.mode) { - default: - if (typeof object.mode === "number") { - message.mode = object.mode; + case 5: { + message.orderBy = reader.string(); break; } + default: + reader.skipType(tag & 7); break; - case "MODE_UNSPECIFIED": - case 0: - message.mode = 0; - break; - case "REQUIRED": - case 1: - message.mode = 1; - break; - case "NULLABLE": - case 2: - message.mode = 2; - break; - case "REPEATED": - case 3: - message.mode = 3; - break; - } - if (object.fields) { - if (!Array.isArray(object.fields)) - throw TypeError(".google.cloud.dataplex.v1.Schema.SchemaField.fields: array expected"); - message.fields = []; - for (var i = 0; i < object.fields.length; ++i) { - if (typeof object.fields[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.Schema.SchemaField.fields: object expected"); - message.fields[i] = $root.google.cloud.dataplex.v1.Schema.SchemaField.fromObject(object.fields[i]); - } } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a SchemaField message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Schema.SchemaField - * @static - * @param {google.cloud.dataplex.v1.Schema.SchemaField} message SchemaField - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SchemaField.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.fields = []; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Schema.Type[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.Schema.Type[message.type] : message.type; - if (message.mode != null && message.hasOwnProperty("mode")) - object.mode = options.enums === String ? $root.google.cloud.dataplex.v1.Schema.Mode[message.mode] === undefined ? message.mode : $root.google.cloud.dataplex.v1.Schema.Mode[message.mode] : message.mode; - if (message.fields && message.fields.length) { - object.fields = []; - for (var j = 0; j < message.fields.length; ++j) - object.fields[j] = $root.google.cloud.dataplex.v1.Schema.SchemaField.toObject(message.fields[j], options); - } + /** + * Decodes a ListTasksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTasksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTasksRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTasksRequest.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.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListTasksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest + */ + ListTasksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListTasksRequest) return object; - }; + var message = new $root.google.cloud.dataplex.v1.ListTasksRequest(); + 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.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; - /** - * Converts this SchemaField to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Schema.SchemaField - * @instance - * @returns {Object.} JSON object - */ - SchemaField.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a ListTasksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {google.cloud.dataplex.v1.ListTasksRequest} message ListTasksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTasksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + 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.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; - /** - * Gets the default type url for SchemaField - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Schema.SchemaField - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SchemaField.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Schema.SchemaField"; - }; + /** + * Converts this ListTasksRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @instance + * @returns {Object.} JSON object + */ + ListTasksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return SchemaField; - })(); + /** + * Gets the default type url for ListTasksRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListTasksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListTasksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListTasksRequest"; + }; - Schema.PartitionField = (function() { + return ListTasksRequest; + })(); - /** - * Properties of a PartitionField. - * @memberof google.cloud.dataplex.v1.Schema - * @interface IPartitionField - * @property {string|null} [name] PartitionField name - * @property {google.cloud.dataplex.v1.Schema.Type|null} [type] PartitionField type - */ + v1.ListTasksResponse = (function() { - /** - * Constructs a new PartitionField. - * @memberof google.cloud.dataplex.v1.Schema - * @classdesc Represents a PartitionField. - * @implements IPartitionField - * @constructor - * @param {google.cloud.dataplex.v1.Schema.IPartitionField=} [properties] Properties to set - */ - function PartitionField(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]]; - } + /** + * Properties of a ListTasksResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListTasksResponse + * @property {Array.|null} [tasks] ListTasksResponse tasks + * @property {string|null} [nextPageToken] ListTasksResponse nextPageToken + * @property {Array.|null} [unreachableLocations] ListTasksResponse unreachableLocations + */ + + /** + * Constructs a new ListTasksResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListTasksResponse. + * @implements IListTasksResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListTasksResponse=} [properties] Properties to set + */ + function ListTasksResponse(properties) { + this.tasks = []; + this.unreachableLocations = []; + 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]]; + } + + /** + * ListTasksResponse tasks. + * @member {Array.} tasks + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @instance + */ + ListTasksResponse.prototype.tasks = $util.emptyArray; - /** - * PartitionField name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.Schema.PartitionField - * @instance - */ - PartitionField.prototype.name = ""; + /** + * ListTasksResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @instance + */ + ListTasksResponse.prototype.nextPageToken = ""; - /** - * PartitionField type. - * @member {google.cloud.dataplex.v1.Schema.Type} type - * @memberof google.cloud.dataplex.v1.Schema.PartitionField - * @instance - */ - PartitionField.prototype.type = 0; + /** + * ListTasksResponse unreachableLocations. + * @member {Array.} unreachableLocations + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @instance + */ + ListTasksResponse.prototype.unreachableLocations = $util.emptyArray; - /** - * Creates a new PartitionField instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Schema.PartitionField - * @static - * @param {google.cloud.dataplex.v1.Schema.IPartitionField=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Schema.PartitionField} PartitionField instance - */ - PartitionField.create = function create(properties) { - return new PartitionField(properties); - }; + /** + * Creates a new ListTasksResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {google.cloud.dataplex.v1.IListTasksResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse instance + */ + ListTasksResponse.create = function create(properties) { + return new ListTasksResponse(properties); + }; - /** - * Encodes the specified PartitionField message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.PartitionField.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Schema.PartitionField - * @static - * @param {google.cloud.dataplex.v1.Schema.IPartitionField} message PartitionField message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PartitionField.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.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - return writer; - }; + /** + * Encodes the specified ListTasksResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {google.cloud.dataplex.v1.IListTasksResponse} message ListTasksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTasksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tasks != null && message.tasks.length) + for (var i = 0; i < message.tasks.length; ++i) + $root.google.cloud.dataplex.v1.Task.encode(message.tasks[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); + if (message.unreachableLocations != null && message.unreachableLocations.length) + for (var i = 0; i < message.unreachableLocations.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); + return writer; + }; - /** - * Encodes the specified PartitionField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.PartitionField.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Schema.PartitionField - * @static - * @param {google.cloud.dataplex.v1.Schema.IPartitionField} message PartitionField message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PartitionField.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ListTasksResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {google.cloud.dataplex.v1.IListTasksResponse} message ListTasksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTasksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a PartitionField message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Schema.PartitionField - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Schema.PartitionField} PartitionField - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PartitionField.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Schema.PartitionField(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.type = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes a ListTasksResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTasksResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListTasksResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.tasks && message.tasks.length)) + message.tasks = []; + message.tasks.push($root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32())); break; } - } - return message; - }; - - /** - * Decodes a PartitionField message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Schema.PartitionField - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Schema.PartitionField} PartitionField - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PartitionField.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PartitionField message. - * @function verify - * @memberof google.cloud.dataplex.v1.Schema.PartitionField - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PartitionField.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.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 100: + case 2: { + message.nextPageToken = reader.string(); break; } - return null; - }; - - /** - * Creates a PartitionField message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Schema.PartitionField - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Schema.PartitionField} PartitionField - */ - PartitionField.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Schema.PartitionField) - return object; - var message = new $root.google.cloud.dataplex.v1.Schema.PartitionField(); - if (object.name != null) - message.name = String(object.name); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; + case 3: { + if (!(message.unreachableLocations && message.unreachableLocations.length)) + message.unreachableLocations = []; + message.unreachableLocations.push(reader.string()); break; } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "BOOLEAN": - case 1: - message.type = 1; - break; - case "BYTE": - case 2: - message.type = 2; - break; - case "INT16": - case 3: - message.type = 3; - break; - case "INT32": - case 4: - message.type = 4; - break; - case "INT64": - case 5: - message.type = 5; - break; - case "FLOAT": - case 6: - message.type = 6; - break; - case "DOUBLE": - case 7: - message.type = 7; - break; - case "DECIMAL": - case 8: - message.type = 8; - break; - case "STRING": - case 9: - message.type = 9; - break; - case "BINARY": - case 10: - message.type = 10; - break; - case "TIMESTAMP": - case 11: - message.type = 11; - break; - case "DATE": - case 12: - message.type = 12; - break; - case "TIME": - case 13: - message.type = 13; - break; - case "RECORD": - case 14: - message.type = 14; - break; - case "NULL": - case 100: - message.type = 100; + default: + reader.skipType(tag & 7); break; } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a PartitionField message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Schema.PartitionField - * @static - * @param {google.cloud.dataplex.v1.Schema.PartitionField} message PartitionField - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PartitionField.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Schema.Type[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.Schema.Type[message.type] : message.type; - return object; - }; + /** + * Decodes a ListTasksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTasksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this PartitionField to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Schema.PartitionField - * @instance - * @returns {Object.} JSON object - */ - PartitionField.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies a ListTasksResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTasksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tasks != null && message.hasOwnProperty("tasks")) { + if (!Array.isArray(message.tasks)) + return "tasks: array expected"; + for (var i = 0; i < message.tasks.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Task.verify(message.tasks[i]); + if (error) + return "tasks." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { + if (!Array.isArray(message.unreachableLocations)) + return "unreachableLocations: array expected"; + for (var i = 0; i < message.unreachableLocations.length; ++i) + if (!$util.isString(message.unreachableLocations[i])) + return "unreachableLocations: string[] expected"; + } + return null; + }; - /** - * Gets the default type url for PartitionField - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Schema.PartitionField - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PartitionField.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + /** + * Creates a ListTasksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse + */ + ListTasksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListTasksResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListTasksResponse(); + if (object.tasks) { + if (!Array.isArray(object.tasks)) + throw TypeError(".google.cloud.dataplex.v1.ListTasksResponse.tasks: array expected"); + message.tasks = []; + for (var i = 0; i < object.tasks.length; ++i) { + if (typeof object.tasks[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListTasksResponse.tasks: object expected"); + message.tasks[i] = $root.google.cloud.dataplex.v1.Task.fromObject(object.tasks[i]); } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Schema.PartitionField"; - }; + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachableLocations) { + if (!Array.isArray(object.unreachableLocations)) + throw TypeError(".google.cloud.dataplex.v1.ListTasksResponse.unreachableLocations: array expected"); + message.unreachableLocations = []; + for (var i = 0; i < object.unreachableLocations.length; ++i) + message.unreachableLocations[i] = String(object.unreachableLocations[i]); + } + return message; + }; - return PartitionField; - })(); + /** + * Creates a plain object from a ListTasksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {google.cloud.dataplex.v1.ListTasksResponse} message ListTasksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTasksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.tasks = []; + object.unreachableLocations = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.tasks && message.tasks.length) { + object.tasks = []; + for (var j = 0; j < message.tasks.length; ++j) + object.tasks[j] = $root.google.cloud.dataplex.v1.Task.toObject(message.tasks[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachableLocations && message.unreachableLocations.length) { + object.unreachableLocations = []; + for (var j = 0; j < message.unreachableLocations.length; ++j) + object.unreachableLocations[j] = message.unreachableLocations[j]; + } + return object; + }; /** - * PartitionStyle enum. - * @name google.cloud.dataplex.v1.Schema.PartitionStyle - * @enum {number} - * @property {number} PARTITION_STYLE_UNSPECIFIED=0 PARTITION_STYLE_UNSPECIFIED value - * @property {number} HIVE_COMPATIBLE=1 HIVE_COMPATIBLE value + * Converts this ListTasksResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @instance + * @returns {Object.} JSON object */ - Schema.PartitionStyle = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PARTITION_STYLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "HIVE_COMPATIBLE"] = 1; - return values; - })(); + ListTasksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListTasksResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListTasksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListTasksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListTasksResponse"; + }; - return Schema; + return ListTasksResponse; })(); - v1.StorageFormat = (function() { + v1.GetTaskRequest = (function() { /** - * Properties of a StorageFormat. + * Properties of a GetTaskRequest. * @memberof google.cloud.dataplex.v1 - * @interface IStorageFormat - * @property {google.cloud.dataplex.v1.StorageFormat.Format|null} [format] StorageFormat format - * @property {google.cloud.dataplex.v1.StorageFormat.CompressionFormat|null} [compressionFormat] StorageFormat compressionFormat - * @property {string|null} [mimeType] StorageFormat mimeType - * @property {google.cloud.dataplex.v1.StorageFormat.ICsvOptions|null} [csv] StorageFormat csv - * @property {google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null} [json] StorageFormat json - * @property {google.cloud.dataplex.v1.StorageFormat.IIcebergOptions|null} [iceberg] StorageFormat iceberg + * @interface IGetTaskRequest + * @property {string|null} [name] GetTaskRequest name */ /** - * Constructs a new StorageFormat. + * Constructs a new GetTaskRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a StorageFormat. - * @implements IStorageFormat + * @classdesc Represents a GetTaskRequest. + * @implements IGetTaskRequest * @constructor - * @param {google.cloud.dataplex.v1.IStorageFormat=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IGetTaskRequest=} [properties] Properties to set */ - function StorageFormat(properties) { + function GetTaskRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35971,159 +34636,75 @@ } /** - * StorageFormat format. - * @member {google.cloud.dataplex.v1.StorageFormat.Format} format - * @memberof google.cloud.dataplex.v1.StorageFormat - * @instance - */ - StorageFormat.prototype.format = 0; - - /** - * StorageFormat compressionFormat. - * @member {google.cloud.dataplex.v1.StorageFormat.CompressionFormat} compressionFormat - * @memberof google.cloud.dataplex.v1.StorageFormat - * @instance - */ - StorageFormat.prototype.compressionFormat = 0; - - /** - * StorageFormat mimeType. - * @member {string} mimeType - * @memberof google.cloud.dataplex.v1.StorageFormat - * @instance - */ - StorageFormat.prototype.mimeType = ""; - - /** - * StorageFormat csv. - * @member {google.cloud.dataplex.v1.StorageFormat.ICsvOptions|null|undefined} csv - * @memberof google.cloud.dataplex.v1.StorageFormat - * @instance - */ - StorageFormat.prototype.csv = null; - - /** - * StorageFormat json. - * @member {google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null|undefined} json - * @memberof google.cloud.dataplex.v1.StorageFormat - * @instance - */ - StorageFormat.prototype.json = null; - - /** - * StorageFormat iceberg. - * @member {google.cloud.dataplex.v1.StorageFormat.IIcebergOptions|null|undefined} iceberg - * @memberof google.cloud.dataplex.v1.StorageFormat - * @instance - */ - StorageFormat.prototype.iceberg = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * StorageFormat options. - * @member {"csv"|"json"|"iceberg"|undefined} options - * @memberof google.cloud.dataplex.v1.StorageFormat + * GetTaskRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetTaskRequest * @instance */ - Object.defineProperty(StorageFormat.prototype, "options", { - get: $util.oneOfGetter($oneOfFields = ["csv", "json", "iceberg"]), - set: $util.oneOfSetter($oneOfFields) - }); + GetTaskRequest.prototype.name = ""; /** - * Creates a new StorageFormat instance using the specified properties. + * Creates a new GetTaskRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.StorageFormat + * @memberof google.cloud.dataplex.v1.GetTaskRequest * @static - * @param {google.cloud.dataplex.v1.IStorageFormat=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.StorageFormat} StorageFormat instance + * @param {google.cloud.dataplex.v1.IGetTaskRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest instance */ - StorageFormat.create = function create(properties) { - return new StorageFormat(properties); + GetTaskRequest.create = function create(properties) { + return new GetTaskRequest(properties); }; /** - * Encodes the specified StorageFormat message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.verify|verify} messages. + * Encodes the specified GetTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.StorageFormat + * @memberof google.cloud.dataplex.v1.GetTaskRequest * @static - * @param {google.cloud.dataplex.v1.IStorageFormat} message StorageFormat message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetTaskRequest} message GetTaskRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StorageFormat.encode = function encode(message, writer) { + GetTaskRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.format != null && Object.hasOwnProperty.call(message, "format")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); - if (message.compressionFormat != null && Object.hasOwnProperty.call(message, "compressionFormat")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.compressionFormat); - if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.mimeType); - if (message.csv != null && Object.hasOwnProperty.call(message, "csv")) - $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.encode(message.csv, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.json != null && Object.hasOwnProperty.call(message, "json")) - $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.encode(message.json, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.iceberg != null && Object.hasOwnProperty.call(message, "iceberg")) - $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions.encode(message.iceberg, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified StorageFormat message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.verify|verify} messages. + * Encodes the specified GetTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.StorageFormat + * @memberof google.cloud.dataplex.v1.GetTaskRequest * @static - * @param {google.cloud.dataplex.v1.IStorageFormat} message StorageFormat message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetTaskRequest} message GetTaskRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StorageFormat.encodeDelimited = function encodeDelimited(message, writer) { + GetTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StorageFormat message from the specified reader or buffer. + * Decodes a GetTaskRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.StorageFormat + * @memberof google.cloud.dataplex.v1.GetTaskRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.StorageFormat} StorageFormat + * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StorageFormat.decode = function decode(reader, length) { + GetTaskRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.StorageFormat(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetTaskRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.format = reader.int32(); - break; - } - case 2: { - message.compressionFormat = reader.int32(); - break; - } - case 3: { - message.mimeType = reader.string(); - break; - } - case 10: { - message.csv = $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.decode(reader, reader.uint32()); - break; - } - case 11: { - message.json = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.decode(reader, reader.uint32()); - break; - } - case 12: { - message.iceberg = $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions.decode(reader, reader.uint32()); + message.name = reader.string(); break; } default: @@ -36135,2137 +34716,2722 @@ }; /** - * Decodes a StorageFormat message from the specified reader or buffer, length delimited. + * Decodes a GetTaskRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.StorageFormat + * @memberof google.cloud.dataplex.v1.GetTaskRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.StorageFormat} StorageFormat + * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StorageFormat.decodeDelimited = function decodeDelimited(reader) { + GetTaskRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StorageFormat message. + * Verifies a GetTaskRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.StorageFormat + * @memberof google.cloud.dataplex.v1.GetTaskRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StorageFormat.verify = function verify(message) { + GetTaskRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.format != null && message.hasOwnProperty("format")) - switch (message.format) { - default: - return "format: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 100: - case 101: - case 200: - case 201: - case 202: - case 203: - case 204: - case 1000: - case 1001: - break; - } - if (message.compressionFormat != null && message.hasOwnProperty("compressionFormat")) - switch (message.compressionFormat) { - default: - return "compressionFormat: enum value expected"; - case 0: - case 2: - case 3: - break; - } - if (message.mimeType != null && message.hasOwnProperty("mimeType")) - if (!$util.isString(message.mimeType)) - return "mimeType: string expected"; - if (message.csv != null && message.hasOwnProperty("csv")) { - properties.options = 1; - { - var error = $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify(message.csv); - if (error) - return "csv." + error; - } - } - if (message.json != null && message.hasOwnProperty("json")) { - if (properties.options === 1) - return "options: multiple values"; - properties.options = 1; - { - var error = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify(message.json); - if (error) - return "json." + error; - } - } - if (message.iceberg != null && message.hasOwnProperty("iceberg")) { - if (properties.options === 1) - return "options: multiple values"; - properties.options = 1; - { - var error = $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions.verify(message.iceberg); - if (error) - return "iceberg." + error; - } - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a StorageFormat message from a plain object. Also converts values to their respective internal types. + * Creates a GetTaskRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.StorageFormat + * @memberof google.cloud.dataplex.v1.GetTaskRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.StorageFormat} StorageFormat + * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest */ - StorageFormat.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.StorageFormat) + GetTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetTaskRequest) return object; - var message = new $root.google.cloud.dataplex.v1.StorageFormat(); - switch (object.format) { - default: - if (typeof object.format === "number") { - message.format = object.format; - break; - } - break; - case "FORMAT_UNSPECIFIED": - case 0: - message.format = 0; - break; - case "PARQUET": - case 1: - message.format = 1; - break; - case "AVRO": - case 2: - message.format = 2; - break; - case "ORC": - case 3: - message.format = 3; - break; - case "CSV": - case 100: - message.format = 100; - break; - case "JSON": - case 101: - message.format = 101; - break; - case "IMAGE": - case 200: - message.format = 200; - break; - case "AUDIO": - case 201: - message.format = 201; - break; - case "VIDEO": - case 202: - message.format = 202; - break; - case "TEXT": - case 203: - message.format = 203; - break; - case "TFRECORD": - case 204: - message.format = 204; - break; - case "OTHER": - case 1000: - message.format = 1000; - break; - case "UNKNOWN": - case 1001: - message.format = 1001; - break; + var message = new $root.google.cloud.dataplex.v1.GetTaskRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetTaskRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @static + * @param {google.cloud.dataplex.v1.GetTaskRequest} message GetTaskRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetTaskRequest.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 GetTaskRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @instance + * @returns {Object.} JSON object + */ + GetTaskRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetTaskRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.GetTaskRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - switch (object.compressionFormat) { - default: - if (typeof object.compressionFormat === "number") { - message.compressionFormat = object.compressionFormat; + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetTaskRequest"; + }; + + return GetTaskRequest; + })(); + + v1.GetJobRequest = (function() { + + /** + * Properties of a GetJobRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IGetJobRequest + * @property {string|null} [name] GetJobRequest name + */ + + /** + * Constructs a new GetJobRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a GetJobRequest. + * @implements IGetJobRequest + * @constructor + * @param {google.cloud.dataplex.v1.IGetJobRequest=} [properties] Properties to set + */ + function GetJobRequest(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]]; + } + + /** + * GetJobRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @instance + */ + GetJobRequest.prototype.name = ""; + + /** + * Creates a new GetJobRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @static + * @param {google.cloud.dataplex.v1.IGetJobRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest instance + */ + GetJobRequest.create = function create(properties) { + return new GetJobRequest(properties); + }; + + /** + * Encodes the specified GetJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @static + * @param {google.cloud.dataplex.v1.IGetJobRequest} message GetJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetJobRequest.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 GetJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @static + * @param {google.cloud.dataplex.v1.IGetJobRequest} message GetJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetJobRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetJobRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; } - break; - case "COMPRESSION_FORMAT_UNSPECIFIED": - case 0: - message.compressionFormat = 0; - break; - case "GZIP": - case 2: - message.compressionFormat = 2; - break; - case "BZIP2": - case 3: - message.compressionFormat = 3; - break; - } - if (object.mimeType != null) - message.mimeType = String(object.mimeType); - if (object.csv != null) { - if (typeof object.csv !== "object") - throw TypeError(".google.cloud.dataplex.v1.StorageFormat.csv: object expected"); - message.csv = $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.fromObject(object.csv); - } - if (object.json != null) { - if (typeof object.json !== "object") - throw TypeError(".google.cloud.dataplex.v1.StorageFormat.json: object expected"); - message.json = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.fromObject(object.json); - } - if (object.iceberg != null) { - if (typeof object.iceberg !== "object") - throw TypeError(".google.cloud.dataplex.v1.StorageFormat.iceberg: object expected"); - message.iceberg = $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions.fromObject(object.iceberg); } return message; }; /** - * Creates a plain object from a StorageFormat message. Also converts values to other types if specified. + * Decodes a GetJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetJobRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetJobRequest.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 GetJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.GetJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest + */ + GetJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetJobRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.GetJobRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetJobRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.StorageFormat + * @memberof google.cloud.dataplex.v1.GetJobRequest * @static - * @param {google.cloud.dataplex.v1.StorageFormat} message StorageFormat + * @param {google.cloud.dataplex.v1.GetJobRequest} message GetJobRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StorageFormat.toObject = function toObject(message, options) { + GetJobRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; - object.compressionFormat = options.enums === String ? "COMPRESSION_FORMAT_UNSPECIFIED" : 0; - object.mimeType = ""; - } - if (message.format != null && message.hasOwnProperty("format")) - object.format = options.enums === String ? $root.google.cloud.dataplex.v1.StorageFormat.Format[message.format] === undefined ? message.format : $root.google.cloud.dataplex.v1.StorageFormat.Format[message.format] : message.format; - if (message.compressionFormat != null && message.hasOwnProperty("compressionFormat")) - object.compressionFormat = options.enums === String ? $root.google.cloud.dataplex.v1.StorageFormat.CompressionFormat[message.compressionFormat] === undefined ? message.compressionFormat : $root.google.cloud.dataplex.v1.StorageFormat.CompressionFormat[message.compressionFormat] : message.compressionFormat; - if (message.mimeType != null && message.hasOwnProperty("mimeType")) - object.mimeType = message.mimeType; - if (message.csv != null && message.hasOwnProperty("csv")) { - object.csv = $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.toObject(message.csv, options); - if (options.oneofs) - object.options = "csv"; - } - if (message.json != null && message.hasOwnProperty("json")) { - object.json = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.toObject(message.json, options); - if (options.oneofs) - object.options = "json"; - } - if (message.iceberg != null && message.hasOwnProperty("iceberg")) { - object.iceberg = $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions.toObject(message.iceberg, options); - if (options.oneofs) - object.options = "iceberg"; - } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this StorageFormat to JSON. + * Converts this GetJobRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.StorageFormat + * @memberof google.cloud.dataplex.v1.GetJobRequest * @instance * @returns {Object.} JSON object */ - StorageFormat.prototype.toJSON = function toJSON() { + GetJobRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for StorageFormat + * Gets the default type url for GetJobRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.StorageFormat + * @memberof google.cloud.dataplex.v1.GetJobRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - StorageFormat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.StorageFormat"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetJobRequest"; }; - StorageFormat.CsvOptions = (function() { - - /** - * Properties of a CsvOptions. - * @memberof google.cloud.dataplex.v1.StorageFormat - * @interface ICsvOptions - * @property {string|null} [encoding] CsvOptions encoding - * @property {number|null} [headerRows] CsvOptions headerRows - * @property {string|null} [delimiter] CsvOptions delimiter - * @property {string|null} [quote] CsvOptions quote - */ - - /** - * Constructs a new CsvOptions. - * @memberof google.cloud.dataplex.v1.StorageFormat - * @classdesc Represents a CsvOptions. - * @implements ICsvOptions - * @constructor - * @param {google.cloud.dataplex.v1.StorageFormat.ICsvOptions=} [properties] Properties to set - */ - function CsvOptions(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]]; - } + return GetJobRequest; + })(); - /** - * CsvOptions encoding. - * @member {string} encoding - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions - * @instance - */ - CsvOptions.prototype.encoding = ""; + v1.RunTaskRequest = (function() { - /** - * CsvOptions headerRows. - * @member {number} headerRows - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions - * @instance - */ - CsvOptions.prototype.headerRows = 0; + /** + * Properties of a RunTaskRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IRunTaskRequest + * @property {string|null} [name] RunTaskRequest name + */ - /** - * CsvOptions delimiter. - * @member {string} delimiter - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions - * @instance - */ - CsvOptions.prototype.delimiter = ""; + /** + * Constructs a new RunTaskRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a RunTaskRequest. + * @implements IRunTaskRequest + * @constructor + * @param {google.cloud.dataplex.v1.IRunTaskRequest=} [properties] Properties to set + */ + function RunTaskRequest(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]]; + } - /** - * CsvOptions quote. - * @member {string} quote - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions - * @instance - */ - CsvOptions.prototype.quote = ""; + /** + * RunTaskRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.RunTaskRequest + * @instance + */ + RunTaskRequest.prototype.name = ""; - /** - * Creates a new CsvOptions instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions - * @static - * @param {google.cloud.dataplex.v1.StorageFormat.ICsvOptions=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.StorageFormat.CsvOptions} CsvOptions instance - */ - CsvOptions.create = function create(properties) { - return new CsvOptions(properties); - }; + /** + * Creates a new RunTaskRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.RunTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IRunTaskRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.RunTaskRequest} RunTaskRequest instance + */ + RunTaskRequest.create = function create(properties) { + return new RunTaskRequest(properties); + }; - /** - * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions - * @static - * @param {google.cloud.dataplex.v1.StorageFormat.ICsvOptions} message CsvOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CsvOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoding); - if (message.headerRows != null && Object.hasOwnProperty.call(message, "headerRows")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.headerRows); - if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.delimiter); - if (message.quote != null && Object.hasOwnProperty.call(message, "quote")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.quote); - return writer; - }; + /** + * Encodes the specified RunTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.RunTaskRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.RunTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IRunTaskRequest} message RunTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunTaskRequest.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 CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions - * @static - * @param {google.cloud.dataplex.v1.StorageFormat.ICsvOptions} message CsvOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CsvOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified RunTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.RunTaskRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.RunTaskRequest + * @static + * @param {google.cloud.dataplex.v1.IRunTaskRequest} message RunTaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a CsvOptions message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.StorageFormat.CsvOptions} CsvOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CsvOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.encoding = reader.string(); - break; - } - case 2: { - message.headerRows = reader.int32(); - break; - } - case 3: { - message.delimiter = reader.string(); - break; - } - case 4: { - message.quote = reader.string(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes a RunTaskRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.RunTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.RunTaskRequest} RunTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunTaskRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.RunTaskRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a CsvOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.StorageFormat.CsvOptions} CsvOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CsvOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a CsvOptions message. - * @function verify - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CsvOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.encoding != null && message.hasOwnProperty("encoding")) - if (!$util.isString(message.encoding)) - return "encoding: string expected"; - if (message.headerRows != null && message.hasOwnProperty("headerRows")) - if (!$util.isInteger(message.headerRows)) - return "headerRows: integer expected"; - if (message.delimiter != null && message.hasOwnProperty("delimiter")) - if (!$util.isString(message.delimiter)) - return "delimiter: string expected"; - if (message.quote != null && message.hasOwnProperty("quote")) - if (!$util.isString(message.quote)) - return "quote: string expected"; - return null; - }; + /** + * Decodes a RunTaskRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.RunTaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.RunTaskRequest} RunTaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunTaskRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.StorageFormat.CsvOptions} CsvOptions - */ - CsvOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions) - return object; - var message = new $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions(); - if (object.encoding != null) - message.encoding = String(object.encoding); - if (object.headerRows != null) - message.headerRows = object.headerRows | 0; - if (object.delimiter != null) - message.delimiter = String(object.delimiter); - if (object.quote != null) - message.quote = String(object.quote); - return message; - }; + /** + * Verifies a RunTaskRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.RunTaskRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunTaskRequest.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 plain object from a CsvOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions - * @static - * @param {google.cloud.dataplex.v1.StorageFormat.CsvOptions} message CsvOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CsvOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.encoding = ""; - object.headerRows = 0; - object.delimiter = ""; - object.quote = ""; - } - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = message.encoding; - if (message.headerRows != null && message.hasOwnProperty("headerRows")) - object.headerRows = message.headerRows; - if (message.delimiter != null && message.hasOwnProperty("delimiter")) - object.delimiter = message.delimiter; - if (message.quote != null && message.hasOwnProperty("quote")) - object.quote = message.quote; + /** + * Creates a RunTaskRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.RunTaskRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.RunTaskRequest} RunTaskRequest + */ + RunTaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.RunTaskRequest) return object; - }; + var message = new $root.google.cloud.dataplex.v1.RunTaskRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Converts this CsvOptions to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions - * @instance - * @returns {Object.} JSON object - */ - CsvOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a RunTaskRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.RunTaskRequest + * @static + * @param {google.cloud.dataplex.v1.RunTaskRequest} message RunTaskRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunTaskRequest.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; + }; - /** - * Gets the default type url for CsvOptions - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CsvOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.StorageFormat.CsvOptions"; - }; + /** + * Converts this RunTaskRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.RunTaskRequest + * @instance + * @returns {Object.} JSON object + */ + RunTaskRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return CsvOptions; - })(); + /** + * Gets the default type url for RunTaskRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.RunTaskRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.RunTaskRequest"; + }; - StorageFormat.JsonOptions = (function() { + return RunTaskRequest; + })(); - /** - * Properties of a JsonOptions. - * @memberof google.cloud.dataplex.v1.StorageFormat - * @interface IJsonOptions - * @property {string|null} [encoding] JsonOptions encoding - */ + v1.RunTaskResponse = (function() { - /** - * Constructs a new JsonOptions. - * @memberof google.cloud.dataplex.v1.StorageFormat - * @classdesc Represents a JsonOptions. - * @implements IJsonOptions - * @constructor - * @param {google.cloud.dataplex.v1.StorageFormat.IJsonOptions=} [properties] Properties to set - */ - function JsonOptions(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]]; - } + /** + * Properties of a RunTaskResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IRunTaskResponse + * @property {google.cloud.dataplex.v1.IJob|null} [job] RunTaskResponse job + */ - /** - * JsonOptions encoding. - * @member {string} encoding - * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions - * @instance - */ - JsonOptions.prototype.encoding = ""; + /** + * Constructs a new RunTaskResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a RunTaskResponse. + * @implements IRunTaskResponse + * @constructor + * @param {google.cloud.dataplex.v1.IRunTaskResponse=} [properties] Properties to set + */ + function RunTaskResponse(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]]; + } - /** - * Creates a new JsonOptions instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions - * @static - * @param {google.cloud.dataplex.v1.StorageFormat.IJsonOptions=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.StorageFormat.JsonOptions} JsonOptions instance - */ - JsonOptions.create = function create(properties) { - return new JsonOptions(properties); - }; + /** + * RunTaskResponse job. + * @member {google.cloud.dataplex.v1.IJob|null|undefined} job + * @memberof google.cloud.dataplex.v1.RunTaskResponse + * @instance + */ + RunTaskResponse.prototype.job = null; - /** - * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions - * @static - * @param {google.cloud.dataplex.v1.StorageFormat.IJsonOptions} message JsonOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JsonOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoding); - return writer; - }; + /** + * Creates a new RunTaskResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.RunTaskResponse + * @static + * @param {google.cloud.dataplex.v1.IRunTaskResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.RunTaskResponse} RunTaskResponse instance + */ + RunTaskResponse.create = function create(properties) { + return new RunTaskResponse(properties); + }; - /** - * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions - * @static - * @param {google.cloud.dataplex.v1.StorageFormat.IJsonOptions} message JsonOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JsonOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified RunTaskResponse message. Does not implicitly {@link google.cloud.dataplex.v1.RunTaskResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.RunTaskResponse + * @static + * @param {google.cloud.dataplex.v1.IRunTaskResponse} message RunTaskResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunTaskResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.job != null && Object.hasOwnProperty.call(message, "job")) + $root.google.cloud.dataplex.v1.Job.encode(message.job, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * Decodes a JsonOptions message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.StorageFormat.JsonOptions} JsonOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JsonOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.encoding = reader.string(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Encodes the specified RunTaskResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.RunTaskResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.RunTaskResponse + * @static + * @param {google.cloud.dataplex.v1.IRunTaskResponse} message RunTaskResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunTaskResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunTaskResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.RunTaskResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.RunTaskResponse} RunTaskResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunTaskResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.RunTaskResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.job = $root.google.cloud.dataplex.v1.Job.decode(reader, reader.uint32()); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a JsonOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.StorageFormat.JsonOptions} JsonOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JsonOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a JsonOptions message. - * @function verify - * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - JsonOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.encoding != null && message.hasOwnProperty("encoding")) - if (!$util.isString(message.encoding)) - return "encoding: string expected"; - return null; - }; + /** + * Decodes a RunTaskResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.RunTaskResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.RunTaskResponse} RunTaskResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunTaskResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.StorageFormat.JsonOptions} JsonOptions - */ - JsonOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions) - return object; - var message = new $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions(); - if (object.encoding != null) - message.encoding = String(object.encoding); - return message; - }; + /** + * Verifies a RunTaskResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.RunTaskResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunTaskResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.job != null && message.hasOwnProperty("job")) { + var error = $root.google.cloud.dataplex.v1.Job.verify(message.job); + if (error) + return "job." + error; + } + return null; + }; - /** - * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions - * @static - * @param {google.cloud.dataplex.v1.StorageFormat.JsonOptions} message JsonOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - JsonOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.encoding = ""; - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = message.encoding; + /** + * Creates a RunTaskResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.RunTaskResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.RunTaskResponse} RunTaskResponse + */ + RunTaskResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.RunTaskResponse) return object; - }; + var message = new $root.google.cloud.dataplex.v1.RunTaskResponse(); + if (object.job != null) { + if (typeof object.job !== "object") + throw TypeError(".google.cloud.dataplex.v1.RunTaskResponse.job: object expected"); + message.job = $root.google.cloud.dataplex.v1.Job.fromObject(object.job); + } + return message; + }; - /** - * Converts this JsonOptions to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions - * @instance - * @returns {Object.} JSON object - */ - JsonOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a RunTaskResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.RunTaskResponse + * @static + * @param {google.cloud.dataplex.v1.RunTaskResponse} message RunTaskResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunTaskResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.job = null; + if (message.job != null && message.hasOwnProperty("job")) + object.job = $root.google.cloud.dataplex.v1.Job.toObject(message.job, options); + return object; + }; - /** - * Gets the default type url for JsonOptions - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - JsonOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.StorageFormat.JsonOptions"; - }; + /** + * Converts this RunTaskResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.RunTaskResponse + * @instance + * @returns {Object.} JSON object + */ + RunTaskResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return JsonOptions; - })(); + /** + * Gets the default type url for RunTaskResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.RunTaskResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunTaskResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.RunTaskResponse"; + }; - StorageFormat.IcebergOptions = (function() { + return RunTaskResponse; + })(); - /** - * Properties of an IcebergOptions. - * @memberof google.cloud.dataplex.v1.StorageFormat - * @interface IIcebergOptions - * @property {string|null} [metadataLocation] IcebergOptions metadataLocation - */ + v1.ListJobsRequest = (function() { - /** - * Constructs a new IcebergOptions. - * @memberof google.cloud.dataplex.v1.StorageFormat - * @classdesc Represents an IcebergOptions. - * @implements IIcebergOptions - * @constructor - * @param {google.cloud.dataplex.v1.StorageFormat.IIcebergOptions=} [properties] Properties to set - */ - function IcebergOptions(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]]; - } + /** + * Properties of a ListJobsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListJobsRequest + * @property {string|null} [parent] ListJobsRequest parent + * @property {number|null} [pageSize] ListJobsRequest pageSize + * @property {string|null} [pageToken] ListJobsRequest pageToken + */ - /** - * IcebergOptions metadataLocation. - * @member {string} metadataLocation - * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions - * @instance - */ - IcebergOptions.prototype.metadataLocation = ""; + /** + * Constructs a new ListJobsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListJobsRequest. + * @implements IListJobsRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListJobsRequest=} [properties] Properties to set + */ + function ListJobsRequest(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]]; + } - /** - * Creates a new IcebergOptions instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions - * @static - * @param {google.cloud.dataplex.v1.StorageFormat.IIcebergOptions=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.StorageFormat.IcebergOptions} IcebergOptions instance - */ - IcebergOptions.create = function create(properties) { - return new IcebergOptions(properties); - }; + /** + * ListJobsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @instance + */ + ListJobsRequest.prototype.parent = ""; - /** - * Encodes the specified IcebergOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.IcebergOptions.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions - * @static - * @param {google.cloud.dataplex.v1.StorageFormat.IIcebergOptions} message IcebergOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IcebergOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metadataLocation != null && Object.hasOwnProperty.call(message, "metadataLocation")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.metadataLocation); - return writer; - }; + /** + * ListJobsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @instance + */ + ListJobsRequest.prototype.pageSize = 0; - /** - * Encodes the specified IcebergOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.IcebergOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions - * @static - * @param {google.cloud.dataplex.v1.StorageFormat.IIcebergOptions} message IcebergOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IcebergOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * ListJobsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @instance + */ + ListJobsRequest.prototype.pageToken = ""; - /** - * Decodes an IcebergOptions message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.StorageFormat.IcebergOptions} IcebergOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IcebergOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.metadataLocation = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a new ListJobsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {google.cloud.dataplex.v1.IListJobsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest instance + */ + ListJobsRequest.create = function create(properties) { + return new ListJobsRequest(properties); + }; - /** - * Decodes an IcebergOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.StorageFormat.IcebergOptions} IcebergOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IcebergOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified ListJobsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {google.cloud.dataplex.v1.IListJobsRequest} message ListJobsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListJobsRequest.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); + return writer; + }; - /** - * Verifies an IcebergOptions message. - * @function verify - * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IcebergOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.metadataLocation != null && message.hasOwnProperty("metadataLocation")) - if (!$util.isString(message.metadataLocation)) - return "metadataLocation: string expected"; - return null; - }; + /** + * Encodes the specified ListJobsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {google.cloud.dataplex.v1.IListJobsRequest} message ListJobsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListJobsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates an IcebergOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.StorageFormat.IcebergOptions} IcebergOptions - */ - IcebergOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions) - return object; - var message = new $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions(); - if (object.metadataLocation != null) - message.metadataLocation = String(object.metadataLocation); - return message; - }; + /** + * Decodes a ListJobsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListJobsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a plain object from an IcebergOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions - * @static - * @param {google.cloud.dataplex.v1.StorageFormat.IcebergOptions} message IcebergOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IcebergOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.metadataLocation = ""; - if (message.metadataLocation != null && message.hasOwnProperty("metadataLocation")) - object.metadataLocation = message.metadataLocation; - return object; - }; + /** + * Decodes a ListJobsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this IcebergOptions to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions - * @instance - * @returns {Object.} JSON object - */ - IcebergOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies a ListJobsRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListJobsRequest.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"; + return null; + }; - /** - * Gets the default type url for IcebergOptions - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - IcebergOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.StorageFormat.IcebergOptions"; - }; + /** + * Creates a ListJobsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest + */ + ListJobsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListJobsRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListJobsRequest(); + 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); + return message; + }; - return IcebergOptions; - })(); + /** + * Creates a plain object from a ListJobsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {google.cloud.dataplex.v1.ListJobsRequest} message ListJobsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListJobsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + 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; + return object; + }; /** - * Format enum. - * @name google.cloud.dataplex.v1.StorageFormat.Format - * @enum {number} - * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value - * @property {number} PARQUET=1 PARQUET value - * @property {number} AVRO=2 AVRO value - * @property {number} ORC=3 ORC value - * @property {number} CSV=100 CSV value - * @property {number} JSON=101 JSON value - * @property {number} IMAGE=200 IMAGE value - * @property {number} AUDIO=201 AUDIO value - * @property {number} VIDEO=202 VIDEO value - * @property {number} TEXT=203 TEXT value - * @property {number} TFRECORD=204 TFRECORD value - * @property {number} OTHER=1000 OTHER value - * @property {number} UNKNOWN=1001 UNKNOWN value + * Converts this ListJobsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @instance + * @returns {Object.} JSON object */ - StorageFormat.Format = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "PARQUET"] = 1; - values[valuesById[2] = "AVRO"] = 2; - values[valuesById[3] = "ORC"] = 3; - values[valuesById[100] = "CSV"] = 100; - values[valuesById[101] = "JSON"] = 101; - values[valuesById[200] = "IMAGE"] = 200; - values[valuesById[201] = "AUDIO"] = 201; - values[valuesById[202] = "VIDEO"] = 202; - values[valuesById[203] = "TEXT"] = 203; - values[valuesById[204] = "TFRECORD"] = 204; - values[valuesById[1000] = "OTHER"] = 1000; - values[valuesById[1001] = "UNKNOWN"] = 1001; - return values; - })(); + ListJobsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * CompressionFormat enum. - * @name google.cloud.dataplex.v1.StorageFormat.CompressionFormat - * @enum {number} - * @property {number} COMPRESSION_FORMAT_UNSPECIFIED=0 COMPRESSION_FORMAT_UNSPECIFIED value - * @property {number} GZIP=2 GZIP value - * @property {number} BZIP2=3 BZIP2 value + * Gets the default type url for ListJobsRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - StorageFormat.CompressionFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "COMPRESSION_FORMAT_UNSPECIFIED"] = 0; - values[valuesById[2] = "GZIP"] = 2; - values[valuesById[3] = "BZIP2"] = 3; - return values; - })(); + ListJobsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListJobsRequest"; + }; - return StorageFormat; + return ListJobsRequest; })(); - /** - * StorageSystem enum. - * @name google.cloud.dataplex.v1.StorageSystem - * @enum {number} - * @property {number} STORAGE_SYSTEM_UNSPECIFIED=0 STORAGE_SYSTEM_UNSPECIFIED value - * @property {number} CLOUD_STORAGE=1 CLOUD_STORAGE value - * @property {number} BIGQUERY=2 BIGQUERY value - */ - v1.StorageSystem = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STORAGE_SYSTEM_UNSPECIFIED"] = 0; - values[valuesById[1] = "CLOUD_STORAGE"] = 1; - values[valuesById[2] = "BIGQUERY"] = 2; - return values; - })(); + v1.ListJobsResponse = (function() { - v1.DataplexService = (function() { + /** + * Properties of a ListJobsResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListJobsResponse + * @property {Array.|null} [jobs] ListJobsResponse jobs + * @property {string|null} [nextPageToken] ListJobsResponse nextPageToken + */ /** - * Constructs a new DataplexService service. + * Constructs a new ListJobsResponse. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DataplexService - * @extends $protobuf.rpc.Service + * @classdesc Represents a ListJobsResponse. + * @implements IListJobsResponse * @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 + * @param {google.cloud.dataplex.v1.IListJobsResponse=} [properties] Properties to set */ - function DataplexService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + function ListJobsResponse(properties) { + this.jobs = []; + 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]]; } - (DataplexService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DataplexService; + /** + * ListJobsResponse jobs. + * @member {Array.} jobs + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @instance + */ + ListJobsResponse.prototype.jobs = $util.emptyArray; /** - * Creates new DataplexService service using the specified rpc implementation. + * ListJobsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @instance + */ + ListJobsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListJobsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.DataplexService + * @memberof google.cloud.dataplex.v1.ListJobsResponse * @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 {DataplexService} RPC service. Useful where requests and/or responses are streamed. + * @param {google.cloud.dataplex.v1.IListJobsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse instance */ - DataplexService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); + ListJobsResponse.create = function create(properties) { + return new ListJobsResponse(properties); }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createLake}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef CreateLakeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Encodes the specified ListJobsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {google.cloud.dataplex.v1.IListJobsResponse} message ListJobsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + ListJobsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.jobs != null && message.jobs.length) + for (var i = 0; i < message.jobs.length; ++i) + $root.google.cloud.dataplex.v1.Job.encode(message.jobs[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; + }; /** - * Calls CreateLake. - * @function createLake - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICreateLakeRequest} request CreateLakeRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.CreateLakeCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Encodes the specified ListJobsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {google.cloud.dataplex.v1.IListJobsResponse} message ListJobsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(DataplexService.prototype.createLake = function createLake(request, callback) { - return this.rpcCall(createLake, $root.google.cloud.dataplex.v1.CreateLakeRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateLake" }); + ListJobsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls CreateLake. - * @function createLake - * @memberof google.cloud.dataplex.v1.DataplexService + * Decodes a ListJobsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListJobsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.jobs && message.jobs.length)) + message.jobs = []; + message.jobs.push($root.google.cloud.dataplex.v1.Job.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListJobsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListJobsResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListJobsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.jobs != null && message.hasOwnProperty("jobs")) { + if (!Array.isArray(message.jobs)) + return "jobs: array expected"; + for (var i = 0; i < message.jobs.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Job.verify(message.jobs[i]); + if (error) + return "jobs." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListJobsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse + */ + ListJobsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListJobsResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListJobsResponse(); + if (object.jobs) { + if (!Array.isArray(object.jobs)) + throw TypeError(".google.cloud.dataplex.v1.ListJobsResponse.jobs: array expected"); + message.jobs = []; + for (var i = 0; i < object.jobs.length; ++i) { + if (typeof object.jobs[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListJobsResponse.jobs: object expected"); + message.jobs[i] = $root.google.cloud.dataplex.v1.Job.fromObject(object.jobs[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListJobsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {google.cloud.dataplex.v1.ListJobsResponse} message ListJobsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListJobsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.jobs = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.jobs && message.jobs.length) { + object.jobs = []; + for (var j = 0; j < message.jobs.length; ++j) + object.jobs[j] = $root.google.cloud.dataplex.v1.Job.toObject(message.jobs[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListJobsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListJobsResponse * @instance - * @param {google.cloud.dataplex.v1.ICreateLakeRequest} request CreateLakeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object + */ + ListJobsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListJobsResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListJobsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListJobsResponse"; + }; + + return ListJobsResponse; + })(); + + v1.CancelJobRequest = (function() { + + /** + * Properties of a CancelJobRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICancelJobRequest + * @property {string|null} [name] CancelJobRequest name */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateLake}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef UpdateLakeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Constructs a new CancelJobRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CancelJobRequest. + * @implements ICancelJobRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICancelJobRequest=} [properties] Properties to set */ + function CancelJobRequest(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]]; + } /** - * Calls UpdateLake. - * @function updateLake - * @memberof google.cloud.dataplex.v1.DataplexService + * CancelJobRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.CancelJobRequest * @instance - * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} request UpdateLakeRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.UpdateLakeCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DataplexService.prototype.updateLake = function updateLake(request, callback) { - return this.rpcCall(updateLake, $root.google.cloud.dataplex.v1.UpdateLakeRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateLake" }); + CancelJobRequest.prototype.name = ""; /** - * Calls UpdateLake. - * @function updateLake - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} request UpdateLakeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new CancelJobRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {google.cloud.dataplex.v1.ICancelJobRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest instance */ + CancelJobRequest.create = function create(properties) { + return new CancelJobRequest(properties); + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteLake}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef DeleteLakeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Encodes the specified CancelJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {google.cloud.dataplex.v1.ICancelJobRequest} message CancelJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + CancelJobRequest.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; + }; /** - * Calls DeleteLake. - * @function deleteLake - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} request DeleteLakeRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.DeleteLakeCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Encodes the specified CancelJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {google.cloud.dataplex.v1.ICancelJobRequest} message CancelJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(DataplexService.prototype.deleteLake = function deleteLake(request, callback) { - return this.rpcCall(deleteLake, $root.google.cloud.dataplex.v1.DeleteLakeRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteLake" }); + CancelJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls DeleteLake. - * @function deleteLake - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} request DeleteLakeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a CancelJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + CancelJobRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CancelJobRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listLakes}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListLakesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListLakesResponse} [response] ListLakesResponse + * Decodes a CancelJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + CancelJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls ListLakes. - * @function listLakes - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListLakesRequest} request ListLakesRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListLakesCallback} callback Node-style callback called with the error, if any, and ListLakesResponse - * @returns {undefined} - * @variation 1 + * Verifies a CancelJobRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(DataplexService.prototype.listLakes = function listLakes(request, callback) { - return this.rpcCall(listLakes, $root.google.cloud.dataplex.v1.ListLakesRequest, $root.google.cloud.dataplex.v1.ListLakesResponse, request, callback); - }, "name", { value: "ListLakes" }); + CancelJobRequest.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; + }; /** - * Calls ListLakes. - * @function listLakes - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListLakesRequest} request ListLakesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a CancelJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest */ + CancelJobRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CancelJobRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CancelJobRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getLake}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef GetLakeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Lake} [response] Lake + * Creates a plain object from a CancelJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {google.cloud.dataplex.v1.CancelJobRequest} message CancelJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + CancelJobRequest.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; + }; /** - * Calls GetLake. - * @function getLake - * @memberof google.cloud.dataplex.v1.DataplexService + * Converts this CancelJobRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CancelJobRequest * @instance - * @param {google.cloud.dataplex.v1.IGetLakeRequest} request GetLakeRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.GetLakeCallback} callback Node-style callback called with the error, if any, and Lake - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(DataplexService.prototype.getLake = function getLake(request, callback) { - return this.rpcCall(getLake, $root.google.cloud.dataplex.v1.GetLakeRequest, $root.google.cloud.dataplex.v1.Lake, request, callback); - }, "name", { value: "GetLake" }); + CancelJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls GetLake. - * @function getLake - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetLakeRequest} request GetLakeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for CancelJobRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + CancelJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.CancelJobRequest"; + }; - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listLakeActions}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListLakeActionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListActionsResponse} [response] ListActionsResponse - */ + return CancelJobRequest; + })(); - /** - * Calls ListLakeActions. - * @function listLakeActions - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} request ListLakeActionsRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListLakeActionsCallback} callback Node-style callback called with the error, if any, and ListActionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.listLakeActions = function listLakeActions(request, callback) { - return this.rpcCall(listLakeActions, $root.google.cloud.dataplex.v1.ListLakeActionsRequest, $root.google.cloud.dataplex.v1.ListActionsResponse, request, callback); - }, "name", { value: "ListLakeActions" }); + v1.CreateEnvironmentRequest = (function() { /** - * Calls ListLakeActions. - * @function listLakeActions - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} request ListLakeActionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Properties of a CreateEnvironmentRequest. + * @memberof google.cloud.dataplex.v1 + * @interface ICreateEnvironmentRequest + * @property {string|null} [parent] CreateEnvironmentRequest parent + * @property {string|null} [environmentId] CreateEnvironmentRequest environmentId + * @property {google.cloud.dataplex.v1.IEnvironment|null} [environment] CreateEnvironmentRequest environment + * @property {boolean|null} [validateOnly] CreateEnvironmentRequest validateOnly */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createZone}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef CreateZoneCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Constructs a new CreateEnvironmentRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a CreateEnvironmentRequest. + * @implements ICreateEnvironmentRequest + * @constructor + * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest=} [properties] Properties to set */ + function CreateEnvironmentRequest(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]]; + } /** - * Calls CreateZone. - * @function createZone - * @memberof google.cloud.dataplex.v1.DataplexService + * CreateEnvironmentRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest * @instance - * @param {google.cloud.dataplex.v1.ICreateZoneRequest} request CreateZoneRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.CreateZoneCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DataplexService.prototype.createZone = function createZone(request, callback) { - return this.rpcCall(createZone, $root.google.cloud.dataplex.v1.CreateZoneRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateZone" }); + CreateEnvironmentRequest.prototype.parent = ""; /** - * Calls CreateZone. - * @function createZone - * @memberof google.cloud.dataplex.v1.DataplexService + * CreateEnvironmentRequest environmentId. + * @member {string} environmentId + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest * @instance - * @param {google.cloud.dataplex.v1.ICreateZoneRequest} request CreateZoneRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + CreateEnvironmentRequest.prototype.environmentId = ""; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateZone}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef UpdateZoneCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * CreateEnvironmentRequest environment. + * @member {google.cloud.dataplex.v1.IEnvironment|null|undefined} environment + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @instance */ + CreateEnvironmentRequest.prototype.environment = null; /** - * Calls UpdateZone. - * @function updateZone - * @memberof google.cloud.dataplex.v1.DataplexService + * CreateEnvironmentRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest * @instance - * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} request UpdateZoneRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.UpdateZoneCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DataplexService.prototype.updateZone = function updateZone(request, callback) { - return this.rpcCall(updateZone, $root.google.cloud.dataplex.v1.UpdateZoneRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateZone" }); + CreateEnvironmentRequest.prototype.validateOnly = false; /** - * Calls UpdateZone. - * @function updateZone - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} request UpdateZoneRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new CreateEnvironmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateEnvironmentRequest} CreateEnvironmentRequest instance */ + CreateEnvironmentRequest.create = function create(properties) { + return new CreateEnvironmentRequest(properties); + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteZone}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef DeleteZoneCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateEnvironmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + CreateEnvironmentRequest.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.environmentId != null && Object.hasOwnProperty.call(message, "environmentId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.environmentId); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + $root.google.cloud.dataplex.v1.Environment.encode(message.environment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; /** - * Calls DeleteZone. - * @function deleteZone - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} request DeleteZoneRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.DeleteZoneCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateEnvironmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(DataplexService.prototype.deleteZone = function deleteZone(request, callback) { - return this.rpcCall(deleteZone, $root.google.cloud.dataplex.v1.DeleteZoneRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteZone" }); + CreateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls DeleteZone. - * @function deleteZone - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} request DeleteZoneRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.CreateEnvironmentRequest} CreateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + CreateEnvironmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateEnvironmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.environmentId = reader.string(); + break; + } + case 3: { + message.environment = $root.google.cloud.dataplex.v1.Environment.decode(reader, reader.uint32()); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listZones}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListZonesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListZonesResponse} [response] ListZonesResponse + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.CreateEnvironmentRequest} CreateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + CreateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls ListZones. - * @function listZones - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListZonesRequest} request ListZonesRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListZonesCallback} callback Node-style callback called with the error, if any, and ListZonesResponse - * @returns {undefined} - * @variation 1 + * Verifies a CreateEnvironmentRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(DataplexService.prototype.listZones = function listZones(request, callback) { - return this.rpcCall(listZones, $root.google.cloud.dataplex.v1.ListZonesRequest, $root.google.cloud.dataplex.v1.ListZonesResponse, request, callback); - }, "name", { value: "ListZones" }); + CreateEnvironmentRequest.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.environmentId != null && message.hasOwnProperty("environmentId")) + if (!$util.isString(message.environmentId)) + return "environmentId: string expected"; + if (message.environment != null && message.hasOwnProperty("environment")) { + var error = $root.google.cloud.dataplex.v1.Environment.verify(message.environment); + if (error) + return "environment." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; /** - * Calls ListZones. - * @function listZones - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListZonesRequest} request ListZonesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a CreateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.CreateEnvironmentRequest} CreateEnvironmentRequest */ + CreateEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateEnvironmentRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.CreateEnvironmentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.environmentId != null) + message.environmentId = String(object.environmentId); + if (object.environment != null) { + if (typeof object.environment !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateEnvironmentRequest.environment: object expected"); + message.environment = $root.google.cloud.dataplex.v1.Environment.fromObject(object.environment); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getZone}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef GetZoneCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Zone} [response] Zone + * Creates a plain object from a CreateEnvironmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.CreateEnvironmentRequest} message CreateEnvironmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + CreateEnvironmentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.environmentId = ""; + object.environment = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.environmentId != null && message.hasOwnProperty("environmentId")) + object.environmentId = message.environmentId; + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = $root.google.cloud.dataplex.v1.Environment.toObject(message.environment, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; /** - * Calls GetZone. - * @function getZone - * @memberof google.cloud.dataplex.v1.DataplexService + * Converts this CreateEnvironmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest * @instance - * @param {google.cloud.dataplex.v1.IGetZoneRequest} request GetZoneRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.GetZoneCallback} callback Node-style callback called with the error, if any, and Zone - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(DataplexService.prototype.getZone = function getZone(request, callback) { - return this.rpcCall(getZone, $root.google.cloud.dataplex.v1.GetZoneRequest, $root.google.cloud.dataplex.v1.Zone, request, callback); - }, "name", { value: "GetZone" }); + CreateEnvironmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls GetZone. - * @function getZone - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetZoneRequest} request GetZoneRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for CreateEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + CreateEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateEnvironmentRequest"; + }; - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listZoneActions}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListZoneActionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListActionsResponse} [response] ListActionsResponse - */ + return CreateEnvironmentRequest; + })(); + + v1.UpdateEnvironmentRequest = (function() { /** - * Calls ListZoneActions. - * @function listZoneActions - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} request ListZoneActionsRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListZoneActionsCallback} callback Node-style callback called with the error, if any, and ListActionsResponse - * @returns {undefined} - * @variation 1 + * Properties of an UpdateEnvironmentRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IUpdateEnvironmentRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEnvironmentRequest updateMask + * @property {google.cloud.dataplex.v1.IEnvironment|null} [environment] UpdateEnvironmentRequest environment + * @property {boolean|null} [validateOnly] UpdateEnvironmentRequest validateOnly */ - Object.defineProperty(DataplexService.prototype.listZoneActions = function listZoneActions(request, callback) { - return this.rpcCall(listZoneActions, $root.google.cloud.dataplex.v1.ListZoneActionsRequest, $root.google.cloud.dataplex.v1.ListActionsResponse, request, callback); - }, "name", { value: "ListZoneActions" }); /** - * Calls ListZoneActions. - * @function listZoneActions - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} request ListZoneActionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Constructs a new UpdateEnvironmentRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents an UpdateEnvironmentRequest. + * @implements IUpdateEnvironmentRequest + * @constructor + * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest=} [properties] Properties to set */ + function UpdateEnvironmentRequest(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]]; + } /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createAsset}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef CreateAssetCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * UpdateEnvironmentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @instance */ + UpdateEnvironmentRequest.prototype.updateMask = null; /** - * Calls CreateAsset. - * @function createAsset - * @memberof google.cloud.dataplex.v1.DataplexService + * UpdateEnvironmentRequest environment. + * @member {google.cloud.dataplex.v1.IEnvironment|null|undefined} environment + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest * @instance - * @param {google.cloud.dataplex.v1.ICreateAssetRequest} request CreateAssetRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.CreateAssetCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DataplexService.prototype.createAsset = function createAsset(request, callback) { - return this.rpcCall(createAsset, $root.google.cloud.dataplex.v1.CreateAssetRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateAsset" }); + UpdateEnvironmentRequest.prototype.environment = null; /** - * Calls CreateAsset. - * @function createAsset - * @memberof google.cloud.dataplex.v1.DataplexService + * UpdateEnvironmentRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest * @instance - * @param {google.cloud.dataplex.v1.ICreateAssetRequest} request CreateAssetRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + UpdateEnvironmentRequest.prototype.validateOnly = false; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateAsset}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef UpdateAssetCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates a new UpdateEnvironmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest instance */ + UpdateEnvironmentRequest.create = function create(properties) { + return new UpdateEnvironmentRequest(properties); + }; /** - * Calls UpdateAsset. - * @function updateAsset - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} request UpdateAssetRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.UpdateAssetCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEnvironmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(DataplexService.prototype.updateAsset = function updateAsset(request, callback) { - return this.rpcCall(updateAsset, $root.google.cloud.dataplex.v1.UpdateAssetRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateAsset" }); + UpdateEnvironmentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + $root.google.cloud.dataplex.v1.Environment.encode(message.environment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; /** - * Calls UpdateAsset. - * @function updateAsset - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} request UpdateAssetRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEnvironmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + UpdateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteAsset}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef DeleteAssetCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + UpdateEnvironmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateEnvironmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.environment = $root.google.cloud.dataplex.v1.Environment.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls DeleteAsset. - * @function deleteAsset - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} request DeleteAssetRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.DeleteAssetCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(DataplexService.prototype.deleteAsset = function deleteAsset(request, callback) { - return this.rpcCall(deleteAsset, $root.google.cloud.dataplex.v1.DeleteAssetRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteAsset" }); + UpdateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls DeleteAsset. - * @function deleteAsset - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} request DeleteAssetRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies an UpdateEnvironmentRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + UpdateEnvironmentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.environment != null && message.hasOwnProperty("environment")) { + var error = $root.google.cloud.dataplex.v1.Environment.verify(message.environment); + if (error) + return "environment." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listAssets}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListAssetsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListAssetsResponse} [response] ListAssetsResponse + * Creates an UpdateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest */ + UpdateEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateEnvironmentRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.UpdateEnvironmentRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateEnvironmentRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.environment != null) { + if (typeof object.environment !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateEnvironmentRequest.environment: object expected"); + message.environment = $root.google.cloud.dataplex.v1.Environment.fromObject(object.environment); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; /** - * Calls ListAssets. - * @function listAssets - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListAssetsRequest} request ListAssetsRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListAssetsCallback} callback Node-style callback called with the error, if any, and ListAssetsResponse - * @returns {undefined} - * @variation 1 + * Creates a plain object from an UpdateEnvironmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.UpdateEnvironmentRequest} message UpdateEnvironmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(DataplexService.prototype.listAssets = function listAssets(request, callback) { - return this.rpcCall(listAssets, $root.google.cloud.dataplex.v1.ListAssetsRequest, $root.google.cloud.dataplex.v1.ListAssetsResponse, request, callback); - }, "name", { value: "ListAssets" }); + UpdateEnvironmentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.environment = null; + object.validateOnly = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = $root.google.cloud.dataplex.v1.Environment.toObject(message.environment, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; /** - * Calls ListAssets. - * @function listAssets - * @memberof google.cloud.dataplex.v1.DataplexService + * Converts this UpdateEnvironmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest * @instance - * @param {google.cloud.dataplex.v1.IListAssetsRequest} request ListAssetsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + UpdateEnvironmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getAsset}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef GetAssetCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Asset} [response] Asset + * Gets the default type url for UpdateEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + UpdateEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateEnvironmentRequest"; + }; - /** - * Calls GetAsset. - * @function getAsset - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetAssetRequest} request GetAssetRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.GetAssetCallback} callback Node-style callback called with the error, if any, and Asset - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.getAsset = function getAsset(request, callback) { - return this.rpcCall(getAsset, $root.google.cloud.dataplex.v1.GetAssetRequest, $root.google.cloud.dataplex.v1.Asset, request, callback); - }, "name", { value: "GetAsset" }); + return UpdateEnvironmentRequest; + })(); + + v1.DeleteEnvironmentRequest = (function() { /** - * Calls GetAsset. - * @function getAsset - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetAssetRequest} request GetAssetRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Properties of a DeleteEnvironmentRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IDeleteEnvironmentRequest + * @property {string|null} [name] DeleteEnvironmentRequest name */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listAssetActions}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListAssetActionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListActionsResponse} [response] ListActionsResponse + * Constructs a new DeleteEnvironmentRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a DeleteEnvironmentRequest. + * @implements IDeleteEnvironmentRequest + * @constructor + * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest=} [properties] Properties to set */ + function DeleteEnvironmentRequest(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]]; + } /** - * Calls ListAssetActions. - * @function listAssetActions - * @memberof google.cloud.dataplex.v1.DataplexService + * DeleteEnvironmentRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest * @instance - * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} request ListAssetActionsRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListAssetActionsCallback} callback Node-style callback called with the error, if any, and ListActionsResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DataplexService.prototype.listAssetActions = function listAssetActions(request, callback) { - return this.rpcCall(listAssetActions, $root.google.cloud.dataplex.v1.ListAssetActionsRequest, $root.google.cloud.dataplex.v1.ListActionsResponse, request, callback); - }, "name", { value: "ListAssetActions" }); + DeleteEnvironmentRequest.prototype.name = ""; /** - * Calls ListAssetActions. - * @function listAssetActions - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} request ListAssetActionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new DeleteEnvironmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest instance */ + DeleteEnvironmentRequest.create = function create(properties) { + return new DeleteEnvironmentRequest(properties); + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createTask}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef CreateTaskCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEnvironmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + DeleteEnvironmentRequest.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; + }; /** - * Calls CreateTask. - * @function createTask - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICreateTaskRequest} request CreateTaskRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.CreateTaskCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Encodes the specified DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEnvironmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(DataplexService.prototype.createTask = function createTask(request, callback) { - return this.rpcCall(createTask, $root.google.cloud.dataplex.v1.CreateTaskRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateTask" }); + DeleteEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls CreateTask. - * @function createTask - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICreateTaskRequest} request CreateTaskRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + DeleteEnvironmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteEnvironmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateTask}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef UpdateTaskCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + DeleteEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls UpdateTask. - * @function updateTask - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} request UpdateTaskRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.UpdateTaskCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Verifies a DeleteEnvironmentRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(DataplexService.prototype.updateTask = function updateTask(request, callback) { - return this.rpcCall(updateTask, $root.google.cloud.dataplex.v1.UpdateTaskRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateTask" }); + DeleteEnvironmentRequest.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; + }; /** - * Calls UpdateTask. - * @function updateTask - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} request UpdateTaskRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a DeleteEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest */ + DeleteEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteEnvironmentRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.DeleteEnvironmentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteTask}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef DeleteTaskCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates a plain object from a DeleteEnvironmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @static + * @param {google.cloud.dataplex.v1.DeleteEnvironmentRequest} message DeleteEnvironmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + DeleteEnvironmentRequest.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; + }; /** - * Calls DeleteTask. - * @function deleteTask - * @memberof google.cloud.dataplex.v1.DataplexService + * Converts this DeleteEnvironmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest * @instance - * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} request DeleteTaskRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.DeleteTaskCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(DataplexService.prototype.deleteTask = function deleteTask(request, callback) { - return this.rpcCall(deleteTask, $root.google.cloud.dataplex.v1.DeleteTaskRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteTask" }); + DeleteEnvironmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls DeleteTask. - * @function deleteTask - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} request DeleteTaskRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for DeleteEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + DeleteEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteEnvironmentRequest"; + }; - /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listTasks}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListTasksCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListTasksResponse} [response] ListTasksResponse - */ + return DeleteEnvironmentRequest; + })(); - /** - * Calls ListTasks. - * @function listTasks - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListTasksRequest} request ListTasksRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListTasksCallback} callback Node-style callback called with the error, if any, and ListTasksResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DataplexService.prototype.listTasks = function listTasks(request, callback) { - return this.rpcCall(listTasks, $root.google.cloud.dataplex.v1.ListTasksRequest, $root.google.cloud.dataplex.v1.ListTasksResponse, request, callback); - }, "name", { value: "ListTasks" }); + v1.ListEnvironmentsRequest = (function() { /** - * Calls ListTasks. - * @function listTasks - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListTasksRequest} request ListTasksRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Properties of a ListEnvironmentsRequest. + * @memberof google.cloud.dataplex.v1 + * @interface IListEnvironmentsRequest + * @property {string|null} [parent] ListEnvironmentsRequest parent + * @property {number|null} [pageSize] ListEnvironmentsRequest pageSize + * @property {string|null} [pageToken] ListEnvironmentsRequest pageToken + * @property {string|null} [filter] ListEnvironmentsRequest filter + * @property {string|null} [orderBy] ListEnvironmentsRequest orderBy */ /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getTask}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef GetTaskCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Task} [response] Task + * Constructs a new ListEnvironmentsRequest. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListEnvironmentsRequest. + * @implements IListEnvironmentsRequest + * @constructor + * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest=} [properties] Properties to set */ + function ListEnvironmentsRequest(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]]; + } /** - * Calls GetTask. - * @function getTask - * @memberof google.cloud.dataplex.v1.DataplexService + * ListEnvironmentsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest * @instance - * @param {google.cloud.dataplex.v1.IGetTaskRequest} request GetTaskRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.GetTaskCallback} callback Node-style callback called with the error, if any, and Task - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DataplexService.prototype.getTask = function getTask(request, callback) { - return this.rpcCall(getTask, $root.google.cloud.dataplex.v1.GetTaskRequest, $root.google.cloud.dataplex.v1.Task, request, callback); - }, "name", { value: "GetTask" }); + ListEnvironmentsRequest.prototype.parent = ""; /** - * Calls GetTask. - * @function getTask - * @memberof google.cloud.dataplex.v1.DataplexService + * ListEnvironmentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest * @instance - * @param {google.cloud.dataplex.v1.IGetTaskRequest} request GetTaskRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ListEnvironmentsRequest.prototype.pageSize = 0; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listJobs}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListJobsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListJobsResponse} [response] ListJobsResponse + * ListEnvironmentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @instance */ + ListEnvironmentsRequest.prototype.pageToken = ""; /** - * Calls ListJobs. - * @function listJobs - * @memberof google.cloud.dataplex.v1.DataplexService + * ListEnvironmentsRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest * @instance - * @param {google.cloud.dataplex.v1.IListJobsRequest} request ListJobsRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListJobsCallback} callback Node-style callback called with the error, if any, and ListJobsResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DataplexService.prototype.listJobs = function listJobs(request, callback) { - return this.rpcCall(listJobs, $root.google.cloud.dataplex.v1.ListJobsRequest, $root.google.cloud.dataplex.v1.ListJobsResponse, request, callback); - }, "name", { value: "ListJobs" }); + ListEnvironmentsRequest.prototype.filter = ""; /** - * Calls ListJobs. - * @function listJobs - * @memberof google.cloud.dataplex.v1.DataplexService + * ListEnvironmentsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest * @instance - * @param {google.cloud.dataplex.v1.IListJobsRequest} request ListJobsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ListEnvironmentsRequest.prototype.orderBy = ""; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getJob}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef GetJobCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Job} [response] Job + * Creates a new ListEnvironmentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @static + * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListEnvironmentsRequest} ListEnvironmentsRequest instance */ + ListEnvironmentsRequest.create = function create(properties) { + return new ListEnvironmentsRequest(properties); + }; /** - * Calls GetJob. - * @function getJob - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetJobRequest} request GetJobRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.GetJobCallback} callback Node-style callback called with the error, if any, and Job - * @returns {undefined} - * @variation 1 + * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @static + * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(DataplexService.prototype.getJob = function getJob(request, callback) { - return this.rpcCall(getJob, $root.google.cloud.dataplex.v1.GetJobRequest, $root.google.cloud.dataplex.v1.Job, request, callback); - }, "name", { value: "GetJob" }); + ListEnvironmentsRequest.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.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; /** - * Calls GetJob. - * @function getJob - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetJobRequest} request GetJobRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @static + * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + ListEnvironmentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|cancelJob}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef CancelJobCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListEnvironmentsRequest} ListEnvironmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ListEnvironmentsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListEnvironmentsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls CancelJob. - * @function cancelJob - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICancelJobRequest} request CancelJobRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.CancelJobCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListEnvironmentsRequest} ListEnvironmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(DataplexService.prototype.cancelJob = function cancelJob(request, callback) { - return this.rpcCall(cancelJob, $root.google.cloud.dataplex.v1.CancelJobRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "CancelJob" }); + ListEnvironmentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls CancelJob. - * @function cancelJob - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICancelJobRequest} request CancelJobRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a ListEnvironmentsRequest message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + ListEnvironmentsRequest.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.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|createEnvironment}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef CreateEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates a ListEnvironmentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListEnvironmentsRequest} ListEnvironmentsRequest */ + ListEnvironmentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListEnvironmentsRequest) + return object; + var message = new $root.google.cloud.dataplex.v1.ListEnvironmentsRequest(); + 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.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; /** - * Calls CreateEnvironment. - * @function createEnvironment - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.CreateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Creates a plain object from a ListEnvironmentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @static + * @param {google.cloud.dataplex.v1.ListEnvironmentsRequest} message ListEnvironmentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(DataplexService.prototype.createEnvironment = function createEnvironment(request, callback) { - return this.rpcCall(createEnvironment, $root.google.cloud.dataplex.v1.CreateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateEnvironment" }); + ListEnvironmentsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + 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.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; /** - * Calls CreateEnvironment. - * @function createEnvironment - * @memberof google.cloud.dataplex.v1.DataplexService + * Converts this ListEnvironmentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest * @instance - * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + ListEnvironmentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|updateEnvironment}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef UpdateEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Gets the default type url for ListEnvironmentsRequest + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + ListEnvironmentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListEnvironmentsRequest"; + }; + + return ListEnvironmentsRequest; + })(); + + v1.ListEnvironmentsResponse = (function() { /** - * Calls UpdateEnvironment. - * @function updateEnvironment - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.UpdateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Properties of a ListEnvironmentsResponse. + * @memberof google.cloud.dataplex.v1 + * @interface IListEnvironmentsResponse + * @property {Array.|null} [environments] ListEnvironmentsResponse environments + * @property {string|null} [nextPageToken] ListEnvironmentsResponse nextPageToken */ - Object.defineProperty(DataplexService.prototype.updateEnvironment = function updateEnvironment(request, callback) { - return this.rpcCall(updateEnvironment, $root.google.cloud.dataplex.v1.UpdateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateEnvironment" }); /** - * Calls UpdateEnvironment. - * @function updateEnvironment - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Constructs a new ListEnvironmentsResponse. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a ListEnvironmentsResponse. + * @implements IListEnvironmentsResponse + * @constructor + * @param {google.cloud.dataplex.v1.IListEnvironmentsResponse=} [properties] Properties to set */ + function ListEnvironmentsResponse(properties) { + this.environments = []; + 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]]; + } /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|deleteEnvironment}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef DeleteEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * ListEnvironmentsResponse environments. + * @member {Array.} environments + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @instance */ + ListEnvironmentsResponse.prototype.environments = $util.emptyArray; /** - * Calls DeleteEnvironment. - * @function deleteEnvironment - * @memberof google.cloud.dataplex.v1.DataplexService + * ListEnvironmentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse * @instance - * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.DeleteEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(DataplexService.prototype.deleteEnvironment = function deleteEnvironment(request, callback) { - return this.rpcCall(deleteEnvironment, $root.google.cloud.dataplex.v1.DeleteEnvironmentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteEnvironment" }); + ListEnvironmentsResponse.prototype.nextPageToken = ""; /** - * Calls DeleteEnvironment. - * @function deleteEnvironment - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new ListEnvironmentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @static + * @param {google.cloud.dataplex.v1.IListEnvironmentsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListEnvironmentsResponse} ListEnvironmentsResponse instance */ + ListEnvironmentsResponse.create = function create(properties) { + return new ListEnvironmentsResponse(properties); + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listEnvironments}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListEnvironmentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListEnvironmentsResponse} [response] ListEnvironmentsResponse + * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @static + * @param {google.cloud.dataplex.v1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + ListEnvironmentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environments != null && message.environments.length) + for (var i = 0; i < message.environments.length; ++i) + $root.google.cloud.dataplex.v1.Environment.encode(message.environments[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; + }; /** - * Calls ListEnvironments. - * @function listEnvironments - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListEnvironmentsCallback} callback Node-style callback called with the error, if any, and ListEnvironmentsResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @static + * @param {google.cloud.dataplex.v1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(DataplexService.prototype.listEnvironments = function listEnvironments(request, callback) { - return this.rpcCall(listEnvironments, $root.google.cloud.dataplex.v1.ListEnvironmentsRequest, $root.google.cloud.dataplex.v1.ListEnvironmentsResponse, request, callback); - }, "name", { value: "ListEnvironments" }); + ListEnvironmentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls ListEnvironments. - * @function listEnvironments - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.ListEnvironmentsResponse} ListEnvironmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ListEnvironmentsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListEnvironmentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.environments && message.environments.length)) + message.environments = []; + message.environments.push($root.google.cloud.dataplex.v1.Environment.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|getEnvironment}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef GetEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.Environment} [response] Environment + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.ListEnvironmentsResponse} ListEnvironmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ListEnvironmentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls GetEnvironment. - * @function getEnvironment - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.GetEnvironmentCallback} callback Node-style callback called with the error, if any, and Environment - * @returns {undefined} - * @variation 1 + * Verifies a ListEnvironmentsResponse message. + * @function verify + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(DataplexService.prototype.getEnvironment = function getEnvironment(request, callback) { - return this.rpcCall(getEnvironment, $root.google.cloud.dataplex.v1.GetEnvironmentRequest, $root.google.cloud.dataplex.v1.Environment, request, callback); - }, "name", { value: "GetEnvironment" }); + ListEnvironmentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.environments != null && message.hasOwnProperty("environments")) { + if (!Array.isArray(message.environments)) + return "environments: array expected"; + for (var i = 0; i < message.environments.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Environment.verify(message.environments[i]); + if (error) + return "environments." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; /** - * Calls GetEnvironment. - * @function getEnvironment - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a ListEnvironmentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.ListEnvironmentsResponse} ListEnvironmentsResponse */ + ListEnvironmentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListEnvironmentsResponse) + return object; + var message = new $root.google.cloud.dataplex.v1.ListEnvironmentsResponse(); + if (object.environments) { + if (!Array.isArray(object.environments)) + throw TypeError(".google.cloud.dataplex.v1.ListEnvironmentsResponse.environments: array expected"); + message.environments = []; + for (var i = 0; i < object.environments.length; ++i) { + if (typeof object.environments[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListEnvironmentsResponse.environments: object expected"); + message.environments[i] = $root.google.cloud.dataplex.v1.Environment.fromObject(object.environments[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; /** - * Callback as used by {@link google.cloud.dataplex.v1.DataplexService|listSessions}. - * @memberof google.cloud.dataplex.v1.DataplexService - * @typedef ListSessionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dataplex.v1.ListSessionsResponse} [response] ListSessionsResponse + * Creates a plain object from a ListEnvironmentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @static + * @param {google.cloud.dataplex.v1.ListEnvironmentsResponse} message ListEnvironmentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + ListEnvironmentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.environments = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.environments && message.environments.length) { + object.environments = []; + for (var j = 0; j < message.environments.length; ++j) + object.environments[j] = $root.google.cloud.dataplex.v1.Environment.toObject(message.environments[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; /** - * Calls ListSessions. - * @function listSessions - * @memberof google.cloud.dataplex.v1.DataplexService + * Converts this ListEnvironmentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse * @instance - * @param {google.cloud.dataplex.v1.IListSessionsRequest} request ListSessionsRequest message or plain object - * @param {google.cloud.dataplex.v1.DataplexService.ListSessionsCallback} callback Node-style callback called with the error, if any, and ListSessionsResponse - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(DataplexService.prototype.listSessions = function listSessions(request, callback) { - return this.rpcCall(listSessions, $root.google.cloud.dataplex.v1.ListSessionsRequest, $root.google.cloud.dataplex.v1.ListSessionsResponse, request, callback); - }, "name", { value: "ListSessions" }); + ListEnvironmentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls ListSessions. - * @function listSessions - * @memberof google.cloud.dataplex.v1.DataplexService - * @instance - * @param {google.cloud.dataplex.v1.IListSessionsRequest} request ListSessionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for ListEnvironmentsResponse + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + ListEnvironmentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListEnvironmentsResponse"; + }; - return DataplexService; + return ListEnvironmentsResponse; })(); - v1.CreateLakeRequest = (function() { + v1.GetEnvironmentRequest = (function() { /** - * Properties of a CreateLakeRequest. + * Properties of a GetEnvironmentRequest. * @memberof google.cloud.dataplex.v1 - * @interface ICreateLakeRequest - * @property {string|null} [parent] CreateLakeRequest parent - * @property {string|null} [lakeId] CreateLakeRequest lakeId - * @property {google.cloud.dataplex.v1.ILake|null} [lake] CreateLakeRequest lake - * @property {boolean|null} [validateOnly] CreateLakeRequest validateOnly + * @interface IGetEnvironmentRequest + * @property {string|null} [name] GetEnvironmentRequest name */ /** - * Constructs a new CreateLakeRequest. + * Constructs a new GetEnvironmentRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CreateLakeRequest. - * @implements ICreateLakeRequest + * @classdesc Represents a GetEnvironmentRequest. + * @implements IGetEnvironmentRequest * @constructor - * @param {google.cloud.dataplex.v1.ICreateLakeRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest=} [properties] Properties to set */ - function CreateLakeRequest(properties) { + function GetEnvironmentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38273,117 +37439,75 @@ } /** - * CreateLakeRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.CreateLakeRequest - * @instance - */ - CreateLakeRequest.prototype.parent = ""; - - /** - * CreateLakeRequest lakeId. - * @member {string} lakeId - * @memberof google.cloud.dataplex.v1.CreateLakeRequest - * @instance - */ - CreateLakeRequest.prototype.lakeId = ""; - - /** - * CreateLakeRequest lake. - * @member {google.cloud.dataplex.v1.ILake|null|undefined} lake - * @memberof google.cloud.dataplex.v1.CreateLakeRequest - * @instance - */ - CreateLakeRequest.prototype.lake = null; - - /** - * CreateLakeRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * GetEnvironmentRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest * @instance */ - CreateLakeRequest.prototype.validateOnly = false; + GetEnvironmentRequest.prototype.name = ""; /** - * Creates a new CreateLakeRequest instance using the specified properties. + * Creates a new GetEnvironmentRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest * @static - * @param {google.cloud.dataplex.v1.ICreateLakeRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest instance + * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetEnvironmentRequest} GetEnvironmentRequest instance */ - CreateLakeRequest.create = function create(properties) { - return new CreateLakeRequest(properties); + GetEnvironmentRequest.create = function create(properties) { + return new GetEnvironmentRequest(properties); }; /** - * Encodes the specified CreateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. + * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEnvironmentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest * @static - * @param {google.cloud.dataplex.v1.ICreateLakeRequest} message CreateLakeRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateLakeRequest.encode = function encode(message, writer) { + GetEnvironmentRequest.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.lakeId != null && Object.hasOwnProperty.call(message, "lakeId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.lakeId); - if (message.lake != null && Object.hasOwnProperty.call(message, "lake")) - $root.google.cloud.dataplex.v1.Lake.encode(message.lake, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified CreateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateLakeRequest.verify|verify} messages. + * Encodes the specified GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEnvironmentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest * @static - * @param {google.cloud.dataplex.v1.ICreateLakeRequest} message CreateLakeRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateLakeRequest message from the specified reader or buffer. + * Decodes a GetEnvironmentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest + * @returns {google.cloud.dataplex.v1.GetEnvironmentRequest} GetEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateLakeRequest.decode = function decode(reader, length) { + GetEnvironmentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateLakeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetEnvironmentRequest(); while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.lakeId = reader.string(); - break; - } - case 3: { - message.lake = $root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32()); - break; - } - case 4: { - message.validateOnly = reader.bool(); + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; } default: @@ -38395,154 +37519,125 @@ }; /** - * Decodes a CreateLakeRequest message from the specified reader or buffer, length delimited. + * Decodes a GetEnvironmentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest + * @returns {google.cloud.dataplex.v1.GetEnvironmentRequest} GetEnvironmentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateLakeRequest.decodeDelimited = function decodeDelimited(reader) { + GetEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateLakeRequest message. + * Verifies a GetEnvironmentRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateLakeRequest.verify = function verify(message) { + GetEnvironmentRequest.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.lakeId != null && message.hasOwnProperty("lakeId")) - if (!$util.isString(message.lakeId)) - return "lakeId: string expected"; - if (message.lake != null && message.hasOwnProperty("lake")) { - var error = $root.google.cloud.dataplex.v1.Lake.verify(message.lake); - if (error) - return "lake." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a CreateLakeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetEnvironmentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CreateLakeRequest} CreateLakeRequest + * @returns {google.cloud.dataplex.v1.GetEnvironmentRequest} GetEnvironmentRequest */ - CreateLakeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CreateLakeRequest) + GetEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetEnvironmentRequest) return object; - var message = new $root.google.cloud.dataplex.v1.CreateLakeRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.lakeId != null) - message.lakeId = String(object.lakeId); - if (object.lake != null) { - if (typeof object.lake !== "object") - throw TypeError(".google.cloud.dataplex.v1.CreateLakeRequest.lake: object expected"); - message.lake = $root.google.cloud.dataplex.v1.Lake.fromObject(object.lake); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); + var message = new $root.google.cloud.dataplex.v1.GetEnvironmentRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a CreateLakeRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetEnvironmentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest * @static - * @param {google.cloud.dataplex.v1.CreateLakeRequest} message CreateLakeRequest + * @param {google.cloud.dataplex.v1.GetEnvironmentRequest} message GetEnvironmentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateLakeRequest.toObject = function toObject(message, options) { + GetEnvironmentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.lakeId = ""; - object.lake = null; - object.validateOnly = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.lakeId != null && message.hasOwnProperty("lakeId")) - object.lakeId = message.lakeId; - if (message.lake != null && message.hasOwnProperty("lake")) - object.lake = $root.google.cloud.dataplex.v1.Lake.toObject(message.lake, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this CreateLakeRequest to JSON. + * Converts this GetEnvironmentRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest * @instance * @returns {Object.} JSON object */ - CreateLakeRequest.prototype.toJSON = function toJSON() { + GetEnvironmentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateLakeRequest + * Gets the default type url for GetEnvironmentRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.CreateLakeRequest + * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateLakeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateLakeRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetEnvironmentRequest"; }; - return CreateLakeRequest; + return GetEnvironmentRequest; })(); - v1.UpdateLakeRequest = (function() { + v1.ListSessionsRequest = (function() { /** - * Properties of an UpdateLakeRequest. + * Properties of a ListSessionsRequest. * @memberof google.cloud.dataplex.v1 - * @interface IUpdateLakeRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateLakeRequest updateMask - * @property {google.cloud.dataplex.v1.ILake|null} [lake] UpdateLakeRequest lake - * @property {boolean|null} [validateOnly] UpdateLakeRequest validateOnly + * @interface IListSessionsRequest + * @property {string|null} [parent] ListSessionsRequest parent + * @property {number|null} [pageSize] ListSessionsRequest pageSize + * @property {string|null} [pageToken] ListSessionsRequest pageToken + * @property {string|null} [filter] ListSessionsRequest filter */ /** - * Constructs a new UpdateLakeRequest. + * Constructs a new ListSessionsRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an UpdateLakeRequest. - * @implements IUpdateLakeRequest + * @classdesc Represents a ListSessionsRequest. + * @implements IListSessionsRequest * @constructor - * @param {google.cloud.dataplex.v1.IUpdateLakeRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListSessionsRequest=} [properties] Properties to set */ - function UpdateLakeRequest(properties) { + function ListSessionsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38550,103 +37645,117 @@ } /** - * UpdateLakeRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * ListSessionsRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.ListSessionsRequest * @instance */ - UpdateLakeRequest.prototype.updateMask = null; + ListSessionsRequest.prototype.parent = ""; /** - * UpdateLakeRequest lake. - * @member {google.cloud.dataplex.v1.ILake|null|undefined} lake - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * ListSessionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListSessionsRequest * @instance */ - UpdateLakeRequest.prototype.lake = null; + ListSessionsRequest.prototype.pageSize = 0; /** - * UpdateLakeRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * ListSessionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListSessionsRequest * @instance */ - UpdateLakeRequest.prototype.validateOnly = false; + ListSessionsRequest.prototype.pageToken = ""; /** - * Creates a new UpdateLakeRequest instance using the specified properties. + * ListSessionsRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @instance + */ + ListSessionsRequest.prototype.filter = ""; + + /** + * Creates a new ListSessionsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @memberof google.cloud.dataplex.v1.ListSessionsRequest * @static - * @param {google.cloud.dataplex.v1.IUpdateLakeRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest instance + * @param {google.cloud.dataplex.v1.IListSessionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListSessionsRequest} ListSessionsRequest instance */ - UpdateLakeRequest.create = function create(properties) { - return new UpdateLakeRequest(properties); + ListSessionsRequest.create = function create(properties) { + return new ListSessionsRequest(properties); }; /** - * Encodes the specified UpdateLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. + * Encodes the specified ListSessionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @memberof google.cloud.dataplex.v1.ListSessionsRequest * @static - * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} message UpdateLakeRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListSessionsRequest} message ListSessionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateLakeRequest.encode = function encode(message, writer) { + ListSessionsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.lake != null && Object.hasOwnProperty.call(message, "lake")) - $root.google.cloud.dataplex.v1.Lake.encode(message.lake, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + 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.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); return writer; }; /** - * Encodes the specified UpdateLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateLakeRequest.verify|verify} messages. + * Encodes the specified ListSessionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @memberof google.cloud.dataplex.v1.ListSessionsRequest * @static - * @param {google.cloud.dataplex.v1.IUpdateLakeRequest} message UpdateLakeRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListSessionsRequest} message ListSessionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListSessionsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateLakeRequest message from the specified reader or buffer. + * Decodes a ListSessionsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @memberof google.cloud.dataplex.v1.ListSessionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest + * @returns {google.cloud.dataplex.v1.ListSessionsRequest} ListSessionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateLakeRequest.decode = function decode(reader, length) { + ListSessionsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateLakeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListSessionsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.parent = reader.string(); break; } case 2: { - message.lake = $root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); break; } case 3: { - message.validateOnly = reader.bool(); + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); break; } default: @@ -38658,149 +37767,149 @@ }; /** - * Decodes an UpdateLakeRequest message from the specified reader or buffer, length delimited. + * Decodes a ListSessionsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @memberof google.cloud.dataplex.v1.ListSessionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest + * @returns {google.cloud.dataplex.v1.ListSessionsRequest} ListSessionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateLakeRequest.decodeDelimited = function decodeDelimited(reader) { + ListSessionsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateLakeRequest message. + * Verifies a ListSessionsRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @memberof google.cloud.dataplex.v1.ListSessionsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateLakeRequest.verify = function verify(message) { + ListSessionsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.lake != null && message.hasOwnProperty("lake")) { - var error = $root.google.cloud.dataplex.v1.Lake.verify(message.lake); - if (error) - return "lake." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean 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.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; return null; }; /** - * Creates an UpdateLakeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListSessionsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @memberof google.cloud.dataplex.v1.ListSessionsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.UpdateLakeRequest} UpdateLakeRequest + * @returns {google.cloud.dataplex.v1.ListSessionsRequest} ListSessionsRequest */ - UpdateLakeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.UpdateLakeRequest) + ListSessionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListSessionsRequest) return object; - var message = new $root.google.cloud.dataplex.v1.UpdateLakeRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateLakeRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.lake != null) { - if (typeof object.lake !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateLakeRequest.lake: object expected"); - message.lake = $root.google.cloud.dataplex.v1.Lake.fromObject(object.lake); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); + var message = new $root.google.cloud.dataplex.v1.ListSessionsRequest(); + 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.filter != null) + message.filter = String(object.filter); return message; }; /** - * Creates a plain object from an UpdateLakeRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListSessionsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @memberof google.cloud.dataplex.v1.ListSessionsRequest * @static - * @param {google.cloud.dataplex.v1.UpdateLakeRequest} message UpdateLakeRequest + * @param {google.cloud.dataplex.v1.ListSessionsRequest} message ListSessionsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateLakeRequest.toObject = function toObject(message, options) { + ListSessionsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.updateMask = null; - object.lake = null; - object.validateOnly = false; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.lake != null && message.hasOwnProperty("lake")) - object.lake = $root.google.cloud.dataplex.v1.Lake.toObject(message.lake, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; + 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.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; return object; }; /** - * Converts this UpdateLakeRequest to JSON. + * Converts this ListSessionsRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @memberof google.cloud.dataplex.v1.ListSessionsRequest * @instance * @returns {Object.} JSON object */ - UpdateLakeRequest.prototype.toJSON = function toJSON() { + ListSessionsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateLakeRequest + * Gets the default type url for ListSessionsRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.UpdateLakeRequest + * @memberof google.cloud.dataplex.v1.ListSessionsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateLakeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListSessionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateLakeRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListSessionsRequest"; }; - return UpdateLakeRequest; + return ListSessionsRequest; })(); - v1.DeleteLakeRequest = (function() { + v1.ListSessionsResponse = (function() { /** - * Properties of a DeleteLakeRequest. + * Properties of a ListSessionsResponse. * @memberof google.cloud.dataplex.v1 - * @interface IDeleteLakeRequest - * @property {string|null} [name] DeleteLakeRequest name + * @interface IListSessionsResponse + * @property {Array.|null} [sessions] ListSessionsResponse sessions + * @property {string|null} [nextPageToken] ListSessionsResponse nextPageToken */ /** - * Constructs a new DeleteLakeRequest. + * Constructs a new ListSessionsResponse. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DeleteLakeRequest. - * @implements IDeleteLakeRequest + * @classdesc Represents a ListSessionsResponse. + * @implements IListSessionsResponse * @constructor - * @param {google.cloud.dataplex.v1.IDeleteLakeRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListSessionsResponse=} [properties] Properties to set */ - function DeleteLakeRequest(properties) { + function ListSessionsResponse(properties) { + this.sessions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38808,75 +37917,92 @@ } /** - * DeleteLakeRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * ListSessionsResponse sessions. + * @member {Array.} sessions + * @memberof google.cloud.dataplex.v1.ListSessionsResponse * @instance */ - DeleteLakeRequest.prototype.name = ""; + ListSessionsResponse.prototype.sessions = $util.emptyArray; /** - * Creates a new DeleteLakeRequest instance using the specified properties. + * ListSessionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @instance + */ + ListSessionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListSessionsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @memberof google.cloud.dataplex.v1.ListSessionsResponse * @static - * @param {google.cloud.dataplex.v1.IDeleteLakeRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest instance + * @param {google.cloud.dataplex.v1.IListSessionsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListSessionsResponse} ListSessionsResponse instance */ - DeleteLakeRequest.create = function create(properties) { - return new DeleteLakeRequest(properties); + ListSessionsResponse.create = function create(properties) { + return new ListSessionsResponse(properties); }; /** - * Encodes the specified DeleteLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. + * Encodes the specified ListSessionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @memberof google.cloud.dataplex.v1.ListSessionsResponse * @static - * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} message DeleteLakeRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListSessionsResponse} message ListSessionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteLakeRequest.encode = function encode(message, writer) { + ListSessionsResponse.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.sessions != null && message.sessions.length) + for (var i = 0; i < message.sessions.length; ++i) + $root.google.cloud.dataplex.v1.Session.encode(message.sessions[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 DeleteLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteLakeRequest.verify|verify} messages. + * Encodes the specified ListSessionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @memberof google.cloud.dataplex.v1.ListSessionsResponse * @static - * @param {google.cloud.dataplex.v1.IDeleteLakeRequest} message DeleteLakeRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListSessionsResponse} message ListSessionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListSessionsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteLakeRequest message from the specified reader or buffer. + * Decodes a ListSessionsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @memberof google.cloud.dataplex.v1.ListSessionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest + * @returns {google.cloud.dataplex.v1.ListSessionsResponse} ListSessionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteLakeRequest.decode = function decode(reader, length) { + ListSessionsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteLakeRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListSessionsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.sessions && message.sessions.length)) + message.sessions = []; + message.sessions.push($root.google.cloud.dataplex.v1.Session.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); break; } default: @@ -38888,126 +38014,161 @@ }; /** - * Decodes a DeleteLakeRequest message from the specified reader or buffer, length delimited. + * Decodes a ListSessionsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @memberof google.cloud.dataplex.v1.ListSessionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest + * @returns {google.cloud.dataplex.v1.ListSessionsResponse} ListSessionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteLakeRequest.decodeDelimited = function decodeDelimited(reader) { + ListSessionsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteLakeRequest message. + * Verifies a ListSessionsResponse message. * @function verify - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @memberof google.cloud.dataplex.v1.ListSessionsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteLakeRequest.verify = function verify(message) { + ListSessionsResponse.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.sessions != null && message.hasOwnProperty("sessions")) { + if (!Array.isArray(message.sessions)) + return "sessions: array expected"; + for (var i = 0; i < message.sessions.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Session.verify(message.sessions[i]); + if (error) + return "sessions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a DeleteLakeRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListSessionsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @memberof google.cloud.dataplex.v1.ListSessionsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DeleteLakeRequest} DeleteLakeRequest + * @returns {google.cloud.dataplex.v1.ListSessionsResponse} ListSessionsResponse */ - DeleteLakeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DeleteLakeRequest) + ListSessionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListSessionsResponse) return object; - var message = new $root.google.cloud.dataplex.v1.DeleteLakeRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dataplex.v1.ListSessionsResponse(); + if (object.sessions) { + if (!Array.isArray(object.sessions)) + throw TypeError(".google.cloud.dataplex.v1.ListSessionsResponse.sessions: array expected"); + message.sessions = []; + for (var i = 0; i < object.sessions.length; ++i) { + if (typeof object.sessions[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListSessionsResponse.sessions: object expected"); + message.sessions[i] = $root.google.cloud.dataplex.v1.Session.fromObject(object.sessions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a DeleteLakeRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListSessionsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @memberof google.cloud.dataplex.v1.ListSessionsResponse * @static - * @param {google.cloud.dataplex.v1.DeleteLakeRequest} message DeleteLakeRequest + * @param {google.cloud.dataplex.v1.ListSessionsResponse} message ListSessionsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteLakeRequest.toObject = function toObject(message, options) { + ListSessionsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.sessions = []; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.nextPageToken = ""; + if (message.sessions && message.sessions.length) { + object.sessions = []; + for (var j = 0; j < message.sessions.length; ++j) + object.sessions[j] = $root.google.cloud.dataplex.v1.Session.toObject(message.sessions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this DeleteLakeRequest to JSON. + * Converts this ListSessionsResponse to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @memberof google.cloud.dataplex.v1.ListSessionsResponse * @instance * @returns {Object.} JSON object */ - DeleteLakeRequest.prototype.toJSON = function toJSON() { + ListSessionsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteLakeRequest + * Gets the default type url for ListSessionsResponse * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DeleteLakeRequest + * @memberof google.cloud.dataplex.v1.ListSessionsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteLakeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListSessionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteLakeRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListSessionsResponse"; }; - return DeleteLakeRequest; + return ListSessionsResponse; })(); - v1.ListLakesRequest = (function() { + v1.Task = (function() { /** - * Properties of a ListLakesRequest. + * Properties of a Task. * @memberof google.cloud.dataplex.v1 - * @interface IListLakesRequest - * @property {string|null} [parent] ListLakesRequest parent - * @property {number|null} [pageSize] ListLakesRequest pageSize - * @property {string|null} [pageToken] ListLakesRequest pageToken - * @property {string|null} [filter] ListLakesRequest filter - * @property {string|null} [orderBy] ListLakesRequest orderBy + * @interface ITask + * @property {string|null} [name] Task name + * @property {string|null} [uid] Task uid + * @property {google.protobuf.ITimestamp|null} [createTime] Task createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Task updateTime + * @property {string|null} [description] Task description + * @property {string|null} [displayName] Task displayName + * @property {google.cloud.dataplex.v1.State|null} [state] Task state + * @property {Object.|null} [labels] Task labels + * @property {google.cloud.dataplex.v1.Task.ITriggerSpec|null} [triggerSpec] Task triggerSpec + * @property {google.cloud.dataplex.v1.Task.IExecutionSpec|null} [executionSpec] Task executionSpec + * @property {google.cloud.dataplex.v1.Task.IExecutionStatus|null} [executionStatus] Task executionStatus + * @property {google.cloud.dataplex.v1.Task.ISparkTaskConfig|null} [spark] Task spark + * @property {google.cloud.dataplex.v1.Task.INotebookTaskConfig|null} [notebook] Task notebook */ /** - * Constructs a new ListLakesRequest. + * Constructs a new Task. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListLakesRequest. - * @implements IListLakesRequest + * @classdesc Represents a Task. + * @implements ITask * @constructor - * @param {google.cloud.dataplex.v1.IListLakesRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.ITask=} [properties] Properties to set */ - function ListLakesRequest(properties) { + function Task(properties) { + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39015,131 +38176,277 @@ } /** - * ListLakesRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListLakesRequest + * Task name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Task * @instance */ - ListLakesRequest.prototype.parent = ""; + Task.prototype.name = ""; /** - * ListLakesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListLakesRequest + * Task uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.Task * @instance */ - ListLakesRequest.prototype.pageSize = 0; + Task.prototype.uid = ""; /** - * ListLakesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListLakesRequest + * Task createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dataplex.v1.Task * @instance */ - ListLakesRequest.prototype.pageToken = ""; + Task.prototype.createTime = null; /** - * ListLakesRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListLakesRequest + * Task updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Task * @instance */ - ListLakesRequest.prototype.filter = ""; + Task.prototype.updateTime = null; /** - * ListLakesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.dataplex.v1.ListLakesRequest + * Task description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.Task * @instance */ - ListLakesRequest.prototype.orderBy = ""; + Task.prototype.description = ""; /** - * Creates a new ListLakesRequest instance using the specified properties. + * Task displayName. + * @member {string} displayName + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.displayName = ""; + + /** + * Task state. + * @member {google.cloud.dataplex.v1.State} state + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.state = 0; + + /** + * Task labels. + * @member {Object.} labels + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.labels = $util.emptyObject; + + /** + * Task triggerSpec. + * @member {google.cloud.dataplex.v1.Task.ITriggerSpec|null|undefined} triggerSpec + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.triggerSpec = null; + + /** + * Task executionSpec. + * @member {google.cloud.dataplex.v1.Task.IExecutionSpec|null|undefined} executionSpec + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.executionSpec = null; + + /** + * Task executionStatus. + * @member {google.cloud.dataplex.v1.Task.IExecutionStatus|null|undefined} executionStatus + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.executionStatus = null; + + /** + * Task spark. + * @member {google.cloud.dataplex.v1.Task.ISparkTaskConfig|null|undefined} spark + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.spark = null; + + /** + * Task notebook. + * @member {google.cloud.dataplex.v1.Task.INotebookTaskConfig|null|undefined} notebook + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Task.prototype.notebook = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Task config. + * @member {"spark"|"notebook"|undefined} config + * @memberof google.cloud.dataplex.v1.Task + * @instance + */ + Object.defineProperty(Task.prototype, "config", { + get: $util.oneOfGetter($oneOfFields = ["spark", "notebook"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Task instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @memberof google.cloud.dataplex.v1.Task * @static - * @param {google.cloud.dataplex.v1.IListLakesRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest instance + * @param {google.cloud.dataplex.v1.ITask=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task} Task instance */ - ListLakesRequest.create = function create(properties) { - return new ListLakesRequest(properties); + Task.create = function create(properties) { + return new Task(properties); }; /** - * Encodes the specified ListLakesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. + * Encodes the specified Task message. Does not implicitly {@link google.cloud.dataplex.v1.Task.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @memberof google.cloud.dataplex.v1.Task * @static - * @param {google.cloud.dataplex.v1.IListLakesRequest} message ListLakesRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.ITask} message Task message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLakesRequest.encode = function encode(message, writer) { + Task.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.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + 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.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.triggerSpec != null && Object.hasOwnProperty.call(message, "triggerSpec")) + $root.google.cloud.dataplex.v1.Task.TriggerSpec.encode(message.triggerSpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.executionSpec != null && Object.hasOwnProperty.call(message, "executionSpec")) + $root.google.cloud.dataplex.v1.Task.ExecutionSpec.encode(message.executionSpec, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.executionStatus != null && Object.hasOwnProperty.call(message, "executionStatus")) + $root.google.cloud.dataplex.v1.Task.ExecutionStatus.encode(message.executionStatus, writer.uint32(/* id 201, wireType 2 =*/1610).fork()).ldelim(); + if (message.spark != null && Object.hasOwnProperty.call(message, "spark")) + $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.encode(message.spark, writer.uint32(/* id 300, wireType 2 =*/2402).fork()).ldelim(); + if (message.notebook != null && Object.hasOwnProperty.call(message, "notebook")) + $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.encode(message.notebook, writer.uint32(/* id 302, wireType 2 =*/2418).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListLakesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesRequest.verify|verify} messages. + * Encodes the specified Task message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @memberof google.cloud.dataplex.v1.Task * @static - * @param {google.cloud.dataplex.v1.IListLakesRequest} message ListLakesRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.ITask} message Task message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListLakesRequest.encodeDelimited = function encodeDelimited(message, writer) { + Task.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListLakesRequest message from the specified reader or buffer. + * Decodes a Task message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @memberof google.cloud.dataplex.v1.Task * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest + * @returns {google.cloud.dataplex.v1.Task} Task * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLakesRequest.decode = function decode(reader, length) { + Task.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListLakesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.name = reader.string(); break; } case 2: { - message.pageSize = reader.int32(); + message.uid = reader.string(); break; } case 3: { - message.pageToken = reader.string(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 4: { - message.filter = reader.string(); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 5: { - message.orderBy = reader.string(); + message.description = reader.string(); + break; + } + case 6: { + message.displayName = reader.string(); + break; + } + case 7: { + message.state = reader.int32(); + break; + } + case 8: { + if (message.labels === $util.emptyObject) + message.labels = {}; + 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.labels[key] = value; + break; + } + case 100: { + message.triggerSpec = $root.google.cloud.dataplex.v1.Task.TriggerSpec.decode(reader, reader.uint32()); + break; + } + case 101: { + message.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.decode(reader, reader.uint32()); + break; + } + case 201: { + message.executionStatus = $root.google.cloud.dataplex.v1.Task.ExecutionStatus.decode(reader, reader.uint32()); + break; + } + case 300: { + message.spark = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.decode(reader, reader.uint32()); + break; + } + case 302: { + message.notebook = $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.decode(reader, reader.uint32()); break; } default: @@ -39151,2431 +38458,3190 @@ }; /** - * Decodes a ListLakesRequest message from the specified reader or buffer, length delimited. + * Decodes a Task message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @memberof google.cloud.dataplex.v1.Task * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest + * @returns {google.cloud.dataplex.v1.Task} Task * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListLakesRequest.decodeDelimited = function decodeDelimited(reader) { + Task.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListLakesRequest message. + * Verifies a Task message. * @function verify - * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @memberof google.cloud.dataplex.v1.Task * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListLakesRequest.verify = function verify(message) { + Task.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.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: 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.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.triggerSpec != null && message.hasOwnProperty("triggerSpec")) { + var error = $root.google.cloud.dataplex.v1.Task.TriggerSpec.verify(message.triggerSpec); + if (error) + return "triggerSpec." + error; + } + if (message.executionSpec != null && message.hasOwnProperty("executionSpec")) { + var error = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.verify(message.executionSpec); + if (error) + return "executionSpec." + error; + } + if (message.executionStatus != null && message.hasOwnProperty("executionStatus")) { + var error = $root.google.cloud.dataplex.v1.Task.ExecutionStatus.verify(message.executionStatus); + if (error) + return "executionStatus." + error; + } + if (message.spark != null && message.hasOwnProperty("spark")) { + properties.config = 1; + { + var error = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.verify(message.spark); + if (error) + return "spark." + error; + } + } + if (message.notebook != null && message.hasOwnProperty("notebook")) { + if (properties.config === 1) + return "config: multiple values"; + properties.config = 1; + { + var error = $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.verify(message.notebook); + if (error) + return "notebook." + error; + } + } return null; }; /** - * Creates a ListLakesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Task message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @memberof google.cloud.dataplex.v1.Task * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListLakesRequest} ListLakesRequest + * @returns {google.cloud.dataplex.v1.Task} Task */ - ListLakesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListLakesRequest) + Task.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task) return object; - var message = new $root.google.cloud.dataplex.v1.ListLakesRequest(); - 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.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); + var message = new $root.google.cloud.dataplex.v1.Task(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.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.dataplex.v1.Task.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.description != null) + message.description = String(object.description); + if (object.displayName != null) + message.displayName = String(object.displayName); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ACTIVE": + case 1: + message.state = 1; + break; + case "CREATING": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "ACTION_REQUIRED": + case 4: + message.state = 4; + break; + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.triggerSpec != null) { + if (typeof object.triggerSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.triggerSpec: object expected"); + message.triggerSpec = $root.google.cloud.dataplex.v1.Task.TriggerSpec.fromObject(object.triggerSpec); + } + if (object.executionSpec != null) { + if (typeof object.executionSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.executionSpec: object expected"); + message.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.fromObject(object.executionSpec); + } + if (object.executionStatus != null) { + if (typeof object.executionStatus !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.executionStatus: object expected"); + message.executionStatus = $root.google.cloud.dataplex.v1.Task.ExecutionStatus.fromObject(object.executionStatus); + } + if (object.spark != null) { + if (typeof object.spark !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.spark: object expected"); + message.spark = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.fromObject(object.spark); + } + if (object.notebook != null) { + if (typeof object.notebook !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.notebook: object expected"); + message.notebook = $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.fromObject(object.notebook); + } return message; }; /** - * Creates a plain object from a ListLakesRequest message. Also converts values to other types if specified. + * Creates a plain object from a Task message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @memberof google.cloud.dataplex.v1.Task * @static - * @param {google.cloud.dataplex.v1.ListLakesRequest} message ListLakesRequest + * @param {google.cloud.dataplex.v1.Task} message Task * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListLakesRequest.toObject = function toObject(message, options) { + Task.toObject = function toObject(message, options) { if (!options) options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.createTime = null; + object.updateTime = null; + object.description = ""; + object.displayName = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.triggerSpec = null; + object.executionSpec = null; + object.executionStatus = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + 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.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.State[message.state] : message.state; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.triggerSpec != null && message.hasOwnProperty("triggerSpec")) + object.triggerSpec = $root.google.cloud.dataplex.v1.Task.TriggerSpec.toObject(message.triggerSpec, options); + if (message.executionSpec != null && message.hasOwnProperty("executionSpec")) + object.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.toObject(message.executionSpec, options); + if (message.executionStatus != null && message.hasOwnProperty("executionStatus")) + object.executionStatus = $root.google.cloud.dataplex.v1.Task.ExecutionStatus.toObject(message.executionStatus, options); + if (message.spark != null && message.hasOwnProperty("spark")) { + object.spark = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.toObject(message.spark, options); + if (options.oneofs) + object.config = "spark"; + } + if (message.notebook != null && message.hasOwnProperty("notebook")) { + object.notebook = $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.toObject(message.notebook, options); + if (options.oneofs) + object.config = "notebook"; } - 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.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; return object; }; /** - * Converts this ListLakesRequest to JSON. + * Converts this Task to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @memberof google.cloud.dataplex.v1.Task * @instance * @returns {Object.} JSON object */ - ListLakesRequest.prototype.toJSON = function toJSON() { + Task.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListLakesRequest + * Gets the default type url for Task * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListLakesRequest + * @memberof google.cloud.dataplex.v1.Task * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListLakesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Task.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListLakesRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task"; }; - return ListLakesRequest; - })(); + Task.InfrastructureSpec = (function() { - v1.ListLakesResponse = (function() { + /** + * Properties of an InfrastructureSpec. + * @memberof google.cloud.dataplex.v1.Task + * @interface IInfrastructureSpec + * @property {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources|null} [batch] InfrastructureSpec batch + * @property {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime|null} [containerImage] InfrastructureSpec containerImage + * @property {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork|null} [vpcNetwork] InfrastructureSpec vpcNetwork + */ - /** - * Properties of a ListLakesResponse. - * @memberof google.cloud.dataplex.v1 - * @interface IListLakesResponse - * @property {Array.|null} [lakes] ListLakesResponse lakes - * @property {string|null} [nextPageToken] ListLakesResponse nextPageToken - * @property {Array.|null} [unreachableLocations] ListLakesResponse unreachableLocations - */ + /** + * Constructs a new InfrastructureSpec. + * @memberof google.cloud.dataplex.v1.Task + * @classdesc Represents an InfrastructureSpec. + * @implements IInfrastructureSpec + * @constructor + * @param {google.cloud.dataplex.v1.Task.IInfrastructureSpec=} [properties] Properties to set + */ + function InfrastructureSpec(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]]; + } - /** - * Constructs a new ListLakesResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListLakesResponse. - * @implements IListLakesResponse - * @constructor - * @param {google.cloud.dataplex.v1.IListLakesResponse=} [properties] Properties to set - */ - function ListLakesResponse(properties) { - this.lakes = []; - this.unreachableLocations = []; - 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]]; - } + /** + * InfrastructureSpec batch. + * @member {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources|null|undefined} batch + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + */ + InfrastructureSpec.prototype.batch = null; - /** - * ListLakesResponse lakes. - * @member {Array.} lakes - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @instance - */ - ListLakesResponse.prototype.lakes = $util.emptyArray; + /** + * InfrastructureSpec containerImage. + * @member {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime|null|undefined} containerImage + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + */ + InfrastructureSpec.prototype.containerImage = null; - /** - * ListLakesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @instance - */ - ListLakesResponse.prototype.nextPageToken = ""; + /** + * InfrastructureSpec vpcNetwork. + * @member {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork|null|undefined} vpcNetwork + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + */ + InfrastructureSpec.prototype.vpcNetwork = null; - /** - * ListLakesResponse unreachableLocations. - * @member {Array.} unreachableLocations - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @instance - */ - ListLakesResponse.prototype.unreachableLocations = $util.emptyArray; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Creates a new ListLakesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @static - * @param {google.cloud.dataplex.v1.IListLakesResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse instance - */ - ListLakesResponse.create = function create(properties) { - return new ListLakesResponse(properties); - }; + /** + * InfrastructureSpec resources. + * @member {"batch"|undefined} resources + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + */ + Object.defineProperty(InfrastructureSpec.prototype, "resources", { + get: $util.oneOfGetter($oneOfFields = ["batch"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Encodes the specified ListLakesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @static - * @param {google.cloud.dataplex.v1.IListLakesResponse} message ListLakesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLakesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lakes != null && message.lakes.length) - for (var i = 0; i < message.lakes.length; ++i) - $root.google.cloud.dataplex.v1.Lake.encode(message.lakes[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); - if (message.unreachableLocations != null && message.unreachableLocations.length) - for (var i = 0; i < message.unreachableLocations.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); - return writer; - }; + /** + * InfrastructureSpec runtime. + * @member {"containerImage"|undefined} runtime + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + */ + Object.defineProperty(InfrastructureSpec.prototype, "runtime", { + get: $util.oneOfGetter($oneOfFields = ["containerImage"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Encodes the specified ListLakesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @static - * @param {google.cloud.dataplex.v1.IListLakesResponse} message ListLakesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLakesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * InfrastructureSpec network. + * @member {"vpcNetwork"|undefined} network + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + */ + Object.defineProperty(InfrastructureSpec.prototype, "network", { + get: $util.oneOfGetter($oneOfFields = ["vpcNetwork"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Decodes a ListLakesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLakesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListLakesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.lakes && message.lakes.length)) - message.lakes = []; - message.lakes.push($root.google.cloud.dataplex.v1.Lake.decode(reader, reader.uint32())); + /** + * Creates a new InfrastructureSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {google.cloud.dataplex.v1.Task.IInfrastructureSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec} InfrastructureSpec instance + */ + InfrastructureSpec.create = function create(properties) { + return new InfrastructureSpec(properties); + }; + + /** + * Encodes the specified InfrastructureSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {google.cloud.dataplex.v1.Task.IInfrastructureSpec} message InfrastructureSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InfrastructureSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.batch != null && Object.hasOwnProperty.call(message, "batch")) + $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.encode(message.batch, writer.uint32(/* id 52, wireType 2 =*/418).fork()).ldelim(); + if (message.containerImage != null && Object.hasOwnProperty.call(message, "containerImage")) + $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.encode(message.containerImage, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.vpcNetwork != null && Object.hasOwnProperty.call(message, "vpcNetwork")) + $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.encode(message.vpcNetwork, writer.uint32(/* id 150, wireType 2 =*/1202).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified InfrastructureSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {google.cloud.dataplex.v1.Task.IInfrastructureSpec} message InfrastructureSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InfrastructureSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InfrastructureSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec} InfrastructureSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InfrastructureSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 52: { + message.batch = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.decode(reader, reader.uint32()); + break; + } + case 101: { + message.containerImage = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.decode(reader, reader.uint32()); + break; + } + case 150: { + message.vpcNetwork = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; } - case 2: { - message.nextPageToken = reader.string(); - break; + } + return message; + }; + + /** + * Decodes an InfrastructureSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec} InfrastructureSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InfrastructureSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InfrastructureSpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InfrastructureSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.batch != null && message.hasOwnProperty("batch")) { + properties.resources = 1; + { + var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify(message.batch); + if (error) + return "batch." + error; } - case 3: { - if (!(message.unreachableLocations && message.unreachableLocations.length)) - message.unreachableLocations = []; - message.unreachableLocations.push(reader.string()); - break; + } + if (message.containerImage != null && message.hasOwnProperty("containerImage")) { + properties.runtime = 1; + { + var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify(message.containerImage); + if (error) + return "containerImage." + error; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; - - /** - * Decodes a ListLakesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLakesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + if (message.vpcNetwork != null && message.hasOwnProperty("vpcNetwork")) { + properties.network = 1; + { + var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify(message.vpcNetwork); + if (error) + return "vpcNetwork." + error; + } + } + return null; + }; - /** - * Verifies a ListLakesResponse message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListLakesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.lakes != null && message.hasOwnProperty("lakes")) { - if (!Array.isArray(message.lakes)) - return "lakes: array expected"; - for (var i = 0; i < message.lakes.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Lake.verify(message.lakes[i]); - if (error) - return "lakes." + error; + /** + * Creates an InfrastructureSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec} InfrastructureSpec + */ + InfrastructureSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.InfrastructureSpec) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec(); + if (object.batch != null) { + if (typeof object.batch !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.batch: object expected"); + message.batch = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.fromObject(object.batch); } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { - if (!Array.isArray(message.unreachableLocations)) - return "unreachableLocations: array expected"; - for (var i = 0; i < message.unreachableLocations.length; ++i) - if (!$util.isString(message.unreachableLocations[i])) - return "unreachableLocations: string[] expected"; - } - return null; - }; + if (object.containerImage != null) { + if (typeof object.containerImage !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.containerImage: object expected"); + message.containerImage = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.fromObject(object.containerImage); + } + if (object.vpcNetwork != null) { + if (typeof object.vpcNetwork !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.vpcNetwork: object expected"); + message.vpcNetwork = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.fromObject(object.vpcNetwork); + } + return message; + }; - /** - * Creates a ListLakesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListLakesResponse} ListLakesResponse - */ - ListLakesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListLakesResponse) - return object; - var message = new $root.google.cloud.dataplex.v1.ListLakesResponse(); - if (object.lakes) { - if (!Array.isArray(object.lakes)) - throw TypeError(".google.cloud.dataplex.v1.ListLakesResponse.lakes: array expected"); - message.lakes = []; - for (var i = 0; i < object.lakes.length; ++i) { - if (typeof object.lakes[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListLakesResponse.lakes: object expected"); - message.lakes[i] = $root.google.cloud.dataplex.v1.Lake.fromObject(object.lakes[i]); + /** + * Creates a plain object from an InfrastructureSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec} message InfrastructureSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InfrastructureSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.batch != null && message.hasOwnProperty("batch")) { + object.batch = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.toObject(message.batch, options); + if (options.oneofs) + object.resources = "batch"; } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachableLocations) { - if (!Array.isArray(object.unreachableLocations)) - throw TypeError(".google.cloud.dataplex.v1.ListLakesResponse.unreachableLocations: array expected"); - message.unreachableLocations = []; - for (var i = 0; i < object.unreachableLocations.length; ++i) - message.unreachableLocations[i] = String(object.unreachableLocations[i]); - } - return message; - }; + if (message.containerImage != null && message.hasOwnProperty("containerImage")) { + object.containerImage = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.toObject(message.containerImage, options); + if (options.oneofs) + object.runtime = "containerImage"; + } + if (message.vpcNetwork != null && message.hasOwnProperty("vpcNetwork")) { + object.vpcNetwork = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.toObject(message.vpcNetwork, options); + if (options.oneofs) + object.network = "vpcNetwork"; + } + return object; + }; - /** - * Creates a plain object from a ListLakesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @static - * @param {google.cloud.dataplex.v1.ListLakesResponse} message ListLakesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListLakesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.lakes = []; - object.unreachableLocations = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.lakes && message.lakes.length) { - object.lakes = []; - for (var j = 0; j < message.lakes.length; ++j) - object.lakes[j] = $root.google.cloud.dataplex.v1.Lake.toObject(message.lakes[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachableLocations && message.unreachableLocations.length) { - object.unreachableLocations = []; - for (var j = 0; j < message.unreachableLocations.length; ++j) - object.unreachableLocations[j] = message.unreachableLocations[j]; - } - return object; - }; + /** + * Converts this InfrastructureSpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @instance + * @returns {Object.} JSON object + */ + InfrastructureSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this ListLakesResponse to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @instance - * @returns {Object.} JSON object - */ - ListLakesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for InfrastructureSpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InfrastructureSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.InfrastructureSpec"; + }; - /** - * Gets the default type url for ListLakesResponse - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListLakesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListLakesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListLakesResponse"; - }; + InfrastructureSpec.BatchComputeResources = (function() { - return ListLakesResponse; - })(); + /** + * Properties of a BatchComputeResources. + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @interface IBatchComputeResources + * @property {number|null} [executorsCount] BatchComputeResources executorsCount + * @property {number|null} [maxExecutorsCount] BatchComputeResources maxExecutorsCount + */ - v1.ListLakeActionsRequest = (function() { + /** + * Constructs a new BatchComputeResources. + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @classdesc Represents a BatchComputeResources. + * @implements IBatchComputeResources + * @constructor + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources=} [properties] Properties to set + */ + function BatchComputeResources(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]]; + } - /** - * Properties of a ListLakeActionsRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IListLakeActionsRequest - * @property {string|null} [parent] ListLakeActionsRequest parent - * @property {number|null} [pageSize] ListLakeActionsRequest pageSize - * @property {string|null} [pageToken] ListLakeActionsRequest pageToken - */ + /** + * BatchComputeResources executorsCount. + * @member {number} executorsCount + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @instance + */ + BatchComputeResources.prototype.executorsCount = 0; - /** - * Constructs a new ListLakeActionsRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListLakeActionsRequest. - * @implements IListLakeActionsRequest - * @constructor - * @param {google.cloud.dataplex.v1.IListLakeActionsRequest=} [properties] Properties to set - */ - function ListLakeActionsRequest(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]]; - } + /** + * BatchComputeResources maxExecutorsCount. + * @member {number} maxExecutorsCount + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @instance + */ + BatchComputeResources.prototype.maxExecutorsCount = 0; - /** - * ListLakeActionsRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @instance - */ - ListLakeActionsRequest.prototype.parent = ""; + /** + * Creates a new BatchComputeResources instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} BatchComputeResources instance + */ + BatchComputeResources.create = function create(properties) { + return new BatchComputeResources(properties); + }; - /** - * ListLakeActionsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @instance - */ - ListLakeActionsRequest.prototype.pageSize = 0; + /** + * Encodes the specified BatchComputeResources message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources} message BatchComputeResources message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchComputeResources.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.executorsCount != null && Object.hasOwnProperty.call(message, "executorsCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.executorsCount); + if (message.maxExecutorsCount != null && Object.hasOwnProperty.call(message, "maxExecutorsCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxExecutorsCount); + return writer; + }; - /** - * ListLakeActionsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @instance - */ - ListLakeActionsRequest.prototype.pageToken = ""; + /** + * Encodes the specified BatchComputeResources message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources} message BatchComputeResources message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchComputeResources.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a new ListLakeActionsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @static - * @param {google.cloud.dataplex.v1.IListLakeActionsRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest instance - */ - ListLakeActionsRequest.create = function create(properties) { - return new ListLakeActionsRequest(properties); - }; + /** + * Decodes a BatchComputeResources message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} BatchComputeResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchComputeResources.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.executorsCount = reader.int32(); + break; + } + case 2: { + message.maxExecutorsCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified ListLakeActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @static - * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} message ListLakeActionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLakeActionsRequest.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); - return writer; - }; + /** + * Decodes a BatchComputeResources message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} BatchComputeResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchComputeResources.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified ListLakeActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListLakeActionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @static - * @param {google.cloud.dataplex.v1.IListLakeActionsRequest} message ListLakeActionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListLakeActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Verifies a BatchComputeResources message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchComputeResources.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.executorsCount != null && message.hasOwnProperty("executorsCount")) + if (!$util.isInteger(message.executorsCount)) + return "executorsCount: integer expected"; + if (message.maxExecutorsCount != null && message.hasOwnProperty("maxExecutorsCount")) + if (!$util.isInteger(message.maxExecutorsCount)) + return "maxExecutorsCount: integer expected"; + return null; + }; - /** - * Decodes a ListLakeActionsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLakeActionsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListLakeActionsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; + /** + * Creates a BatchComputeResources message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} BatchComputeResources + */ + BatchComputeResources.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources(); + if (object.executorsCount != null) + message.executorsCount = object.executorsCount | 0; + if (object.maxExecutorsCount != null) + message.maxExecutorsCount = object.maxExecutorsCount | 0; + return message; + }; + + /** + * Creates a plain object from a BatchComputeResources message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} message BatchComputeResources + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchComputeResources.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.executorsCount = 0; + object.maxExecutorsCount = 0; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + if (message.executorsCount != null && message.hasOwnProperty("executorsCount")) + object.executorsCount = message.executorsCount; + if (message.maxExecutorsCount != null && message.hasOwnProperty("maxExecutorsCount")) + object.maxExecutorsCount = message.maxExecutorsCount; + return object; + }; - /** - * Decodes a ListLakeActionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListLakeActionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Converts this BatchComputeResources to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @instance + * @returns {Object.} JSON object + */ + BatchComputeResources.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Verifies a ListLakeActionsRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListLakeActionsRequest.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"; - return null; - }; + /** + * Gets the default type url for BatchComputeResources + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchComputeResources.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources"; + }; - /** - * Creates a ListLakeActionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListLakeActionsRequest} ListLakeActionsRequest - */ - ListLakeActionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListLakeActionsRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.ListLakeActionsRequest(); - 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); - return message; - }; + return BatchComputeResources; + })(); + + InfrastructureSpec.ContainerImageRuntime = (function() { - /** - * Creates a plain object from a ListLakeActionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @static - * @param {google.cloud.dataplex.v1.ListLakeActionsRequest} message ListLakeActionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListLakeActionsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - 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; - return object; - }; + /** + * Properties of a ContainerImageRuntime. + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @interface IContainerImageRuntime + * @property {string|null} [image] ContainerImageRuntime image + * @property {Array.|null} [javaJars] ContainerImageRuntime javaJars + * @property {Array.|null} [pythonPackages] ContainerImageRuntime pythonPackages + * @property {Object.|null} [properties] ContainerImageRuntime properties + */ - /** - * Converts this ListLakeActionsRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @instance - * @returns {Object.} JSON object - */ - ListLakeActionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Constructs a new ContainerImageRuntime. + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @classdesc Represents a ContainerImageRuntime. + * @implements IContainerImageRuntime + * @constructor + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime=} [properties] Properties to set + */ + function ContainerImageRuntime(properties) { + this.javaJars = []; + this.pythonPackages = []; + this.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]]; + } - /** - * Gets the default type url for ListLakeActionsRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListLakeActionsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListLakeActionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListLakeActionsRequest"; - }; + /** + * ContainerImageRuntime image. + * @member {string} image + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @instance + */ + ContainerImageRuntime.prototype.image = ""; - return ListLakeActionsRequest; - })(); + /** + * ContainerImageRuntime javaJars. + * @member {Array.} javaJars + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @instance + */ + ContainerImageRuntime.prototype.javaJars = $util.emptyArray; - v1.ListActionsResponse = (function() { + /** + * ContainerImageRuntime pythonPackages. + * @member {Array.} pythonPackages + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @instance + */ + ContainerImageRuntime.prototype.pythonPackages = $util.emptyArray; - /** - * Properties of a ListActionsResponse. - * @memberof google.cloud.dataplex.v1 - * @interface IListActionsResponse - * @property {Array.|null} [actions] ListActionsResponse actions - * @property {string|null} [nextPageToken] ListActionsResponse nextPageToken - */ + /** + * ContainerImageRuntime properties. + * @member {Object.} properties + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @instance + */ + ContainerImageRuntime.prototype.properties = $util.emptyObject; - /** - * Constructs a new ListActionsResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListActionsResponse. - * @implements IListActionsResponse - * @constructor - * @param {google.cloud.dataplex.v1.IListActionsResponse=} [properties] Properties to set - */ - function ListActionsResponse(properties) { - this.actions = []; - 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]]; - } + /** + * Creates a new ContainerImageRuntime instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} ContainerImageRuntime instance + */ + ContainerImageRuntime.create = function create(properties) { + return new ContainerImageRuntime(properties); + }; - /** - * ListActionsResponse actions. - * @member {Array.} actions - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @instance - */ - ListActionsResponse.prototype.actions = $util.emptyArray; + /** + * Encodes the specified ContainerImageRuntime message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime} message ContainerImageRuntime message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContainerImageRuntime.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.image != null && Object.hasOwnProperty.call(message, "image")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.image); + if (message.javaJars != null && message.javaJars.length) + for (var i = 0; i < message.javaJars.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.javaJars[i]); + if (message.pythonPackages != null && message.pythonPackages.length) + for (var i = 0; i < message.pythonPackages.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pythonPackages[i]); + if (message.properties != null && Object.hasOwnProperty.call(message, "properties")) + for (var keys = Object.keys(message.properties), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.properties[keys[i]]).ldelim(); + return writer; + }; - /** - * ListActionsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @instance - */ - ListActionsResponse.prototype.nextPageToken = ""; + /** + * Encodes the specified ContainerImageRuntime message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime} message ContainerImageRuntime message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContainerImageRuntime.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a new ListActionsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @static - * @param {google.cloud.dataplex.v1.IListActionsResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse instance - */ - ListActionsResponse.create = function create(properties) { - return new ListActionsResponse(properties); - }; + /** + * Decodes a ContainerImageRuntime message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} ContainerImageRuntime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContainerImageRuntime.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.image = reader.string(); + break; + } + case 2: { + if (!(message.javaJars && message.javaJars.length)) + message.javaJars = []; + message.javaJars.push(reader.string()); + break; + } + case 3: { + if (!(message.pythonPackages && message.pythonPackages.length)) + message.pythonPackages = []; + message.pythonPackages.push(reader.string()); + break; + } + case 4: { + if (message.properties === $util.emptyObject) + message.properties = {}; + 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.properties[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified ListActionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @static - * @param {google.cloud.dataplex.v1.IListActionsResponse} message ListActionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListActionsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.actions != null && message.actions.length) - for (var i = 0; i < message.actions.length; ++i) - $root.google.cloud.dataplex.v1.Action.encode(message.actions[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; - }; + /** + * Decodes a ContainerImageRuntime message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} ContainerImageRuntime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContainerImageRuntime.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified ListActionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListActionsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @static - * @param {google.cloud.dataplex.v1.IListActionsResponse} message ListActionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListActionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Verifies a ContainerImageRuntime message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContainerImageRuntime.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.image != null && message.hasOwnProperty("image")) + if (!$util.isString(message.image)) + return "image: string expected"; + if (message.javaJars != null && message.hasOwnProperty("javaJars")) { + if (!Array.isArray(message.javaJars)) + return "javaJars: array expected"; + for (var i = 0; i < message.javaJars.length; ++i) + if (!$util.isString(message.javaJars[i])) + return "javaJars: string[] expected"; + } + if (message.pythonPackages != null && message.hasOwnProperty("pythonPackages")) { + if (!Array.isArray(message.pythonPackages)) + return "pythonPackages: array expected"; + for (var i = 0; i < message.pythonPackages.length; ++i) + if (!$util.isString(message.pythonPackages[i])) + return "pythonPackages: string[] expected"; + } + if (message.properties != null && message.hasOwnProperty("properties")) { + if (!$util.isObject(message.properties)) + return "properties: object expected"; + var key = Object.keys(message.properties); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.properties[key[i]])) + return "properties: string{k:string} expected"; + } + return null; + }; - /** - * Decodes a ListActionsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListActionsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListActionsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.actions && message.actions.length)) - message.actions = []; - message.actions.push($root.google.cloud.dataplex.v1.Action.decode(reader, reader.uint32())); - break; + /** + * Creates a ContainerImageRuntime message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} ContainerImageRuntime + */ + ContainerImageRuntime.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime(); + if (object.image != null) + message.image = String(object.image); + if (object.javaJars) { + if (!Array.isArray(object.javaJars)) + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.javaJars: array expected"); + message.javaJars = []; + for (var i = 0; i < object.javaJars.length; ++i) + message.javaJars[i] = String(object.javaJars[i]); } - case 2: { - message.nextPageToken = reader.string(); - break; + if (object.pythonPackages) { + if (!Array.isArray(object.pythonPackages)) + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.pythonPackages: array expected"); + message.pythonPackages = []; + for (var i = 0; i < object.pythonPackages.length; ++i) + message.pythonPackages[i] = String(object.pythonPackages[i]); } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + if (object.properties) { + if (typeof object.properties !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.properties: object expected"); + message.properties = {}; + for (var keys = Object.keys(object.properties), i = 0; i < keys.length; ++i) + message.properties[keys[i]] = String(object.properties[keys[i]]); + } + return message; + }; - /** - * Decodes a ListActionsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListActionsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a plain object from a ContainerImageRuntime message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} message ContainerImageRuntime + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContainerImageRuntime.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.javaJars = []; + object.pythonPackages = []; + } + if (options.objects || options.defaults) + object.properties = {}; + if (options.defaults) + object.image = ""; + if (message.image != null && message.hasOwnProperty("image")) + object.image = message.image; + if (message.javaJars && message.javaJars.length) { + object.javaJars = []; + for (var j = 0; j < message.javaJars.length; ++j) + object.javaJars[j] = message.javaJars[j]; + } + if (message.pythonPackages && message.pythonPackages.length) { + object.pythonPackages = []; + for (var j = 0; j < message.pythonPackages.length; ++j) + object.pythonPackages[j] = message.pythonPackages[j]; + } + var keys2; + if (message.properties && (keys2 = Object.keys(message.properties)).length) { + object.properties = {}; + for (var j = 0; j < keys2.length; ++j) + object.properties[keys2[j]] = message.properties[keys2[j]]; + } + return object; + }; - /** - * Verifies a ListActionsResponse message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListActionsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.actions != null && message.hasOwnProperty("actions")) { - if (!Array.isArray(message.actions)) - return "actions: array expected"; - for (var i = 0; i < message.actions.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Action.verify(message.actions[i]); - if (error) - return "actions." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + /** + * Converts this ContainerImageRuntime to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @instance + * @returns {Object.} JSON object + */ + ContainerImageRuntime.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ContainerImageRuntime + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ContainerImageRuntime.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime"; + }; - /** - * Creates a ListActionsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListActionsResponse} ListActionsResponse - */ - ListActionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListActionsResponse) - return object; - var message = new $root.google.cloud.dataplex.v1.ListActionsResponse(); - if (object.actions) { - if (!Array.isArray(object.actions)) - throw TypeError(".google.cloud.dataplex.v1.ListActionsResponse.actions: array expected"); - message.actions = []; - for (var i = 0; i < object.actions.length; ++i) { - if (typeof object.actions[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListActionsResponse.actions: object expected"); - message.actions[i] = $root.google.cloud.dataplex.v1.Action.fromObject(object.actions[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; + return ContainerImageRuntime; + })(); - /** - * Creates a plain object from a ListActionsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @static - * @param {google.cloud.dataplex.v1.ListActionsResponse} message ListActionsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListActionsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.actions = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.actions && message.actions.length) { - object.actions = []; - for (var j = 0; j < message.actions.length; ++j) - object.actions[j] = $root.google.cloud.dataplex.v1.Action.toObject(message.actions[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; + InfrastructureSpec.VpcNetwork = (function() { - /** - * Converts this ListActionsResponse to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @instance - * @returns {Object.} JSON object - */ - ListActionsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Properties of a VpcNetwork. + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @interface IVpcNetwork + * @property {string|null} [network] VpcNetwork network + * @property {string|null} [subNetwork] VpcNetwork subNetwork + * @property {Array.|null} [networkTags] VpcNetwork networkTags + */ - /** - * Gets the default type url for ListActionsResponse - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListActionsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListActionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListActionsResponse"; - }; + /** + * Constructs a new VpcNetwork. + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * @classdesc Represents a VpcNetwork. + * @implements IVpcNetwork + * @constructor + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork=} [properties] Properties to set + */ + function VpcNetwork(properties) { + this.networkTags = []; + 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]]; + } - return ListActionsResponse; - })(); + /** + * VpcNetwork network. + * @member {string|null|undefined} network + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @instance + */ + VpcNetwork.prototype.network = null; - v1.GetLakeRequest = (function() { + /** + * VpcNetwork subNetwork. + * @member {string|null|undefined} subNetwork + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @instance + */ + VpcNetwork.prototype.subNetwork = null; - /** - * Properties of a GetLakeRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IGetLakeRequest - * @property {string|null} [name] GetLakeRequest name - */ + /** + * VpcNetwork networkTags. + * @member {Array.} networkTags + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @instance + */ + VpcNetwork.prototype.networkTags = $util.emptyArray; - /** - * Constructs a new GetLakeRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetLakeRequest. - * @implements IGetLakeRequest - * @constructor - * @param {google.cloud.dataplex.v1.IGetLakeRequest=} [properties] Properties to set - */ - function GetLakeRequest(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]]; - } + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * GetLakeRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GetLakeRequest - * @instance - */ - GetLakeRequest.prototype.name = ""; + /** + * VpcNetwork networkName. + * @member {"network"|"subNetwork"|undefined} networkName + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @instance + */ + Object.defineProperty(VpcNetwork.prototype, "networkName", { + get: $util.oneOfGetter($oneOfFields = ["network", "subNetwork"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Creates a new GetLakeRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.GetLakeRequest - * @static - * @param {google.cloud.dataplex.v1.IGetLakeRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest instance - */ - GetLakeRequest.create = function create(properties) { - return new GetLakeRequest(properties); - }; + /** + * Creates a new VpcNetwork instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} VpcNetwork instance + */ + VpcNetwork.create = function create(properties) { + return new VpcNetwork(properties); + }; - /** - * Encodes the specified GetLakeRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.GetLakeRequest - * @static - * @param {google.cloud.dataplex.v1.IGetLakeRequest} message GetLakeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetLakeRequest.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 VpcNetwork message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork} message VpcNetwork message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpcNetwork.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.network); + if (message.subNetwork != null && Object.hasOwnProperty.call(message, "subNetwork")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subNetwork); + if (message.networkTags != null && message.networkTags.length) + for (var i = 0; i < message.networkTags.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkTags[i]); + return writer; + }; - /** - * Encodes the specified GetLakeRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetLakeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetLakeRequest - * @static - * @param {google.cloud.dataplex.v1.IGetLakeRequest} message GetLakeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetLakeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified VpcNetwork message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork} message VpcNetwork message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpcNetwork.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a GetLakeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.GetLakeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetLakeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetLakeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; + /** + * Decodes a VpcNetwork message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} VpcNetwork + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpcNetwork.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.network = reader.string(); + break; + } + case 2: { + message.subNetwork = reader.string(); + break; + } + case 3: { + if (!(message.networkTags && message.networkTags.length)) + message.networkTags = []; + message.networkTags.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + return message; + }; - /** - * Decodes a GetLakeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetLakeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetLakeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a VpcNetwork message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} VpcNetwork + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpcNetwork.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a GetLakeRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.GetLakeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetLakeRequest.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; - }; + /** + * Verifies a VpcNetwork message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VpcNetwork.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.network != null && message.hasOwnProperty("network")) { + properties.networkName = 1; + if (!$util.isString(message.network)) + return "network: string expected"; + } + if (message.subNetwork != null && message.hasOwnProperty("subNetwork")) { + if (properties.networkName === 1) + return "networkName: multiple values"; + properties.networkName = 1; + if (!$util.isString(message.subNetwork)) + return "subNetwork: string expected"; + } + if (message.networkTags != null && message.hasOwnProperty("networkTags")) { + if (!Array.isArray(message.networkTags)) + return "networkTags: array expected"; + for (var i = 0; i < message.networkTags.length; ++i) + if (!$util.isString(message.networkTags[i])) + return "networkTags: string[] expected"; + } + return null; + }; - /** - * Creates a GetLakeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.GetLakeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetLakeRequest} GetLakeRequest - */ - GetLakeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetLakeRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.GetLakeRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + /** + * Creates a VpcNetwork message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} VpcNetwork + */ + VpcNetwork.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork(); + if (object.network != null) + message.network = String(object.network); + if (object.subNetwork != null) + message.subNetwork = String(object.subNetwork); + if (object.networkTags) { + if (!Array.isArray(object.networkTags)) + throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.networkTags: array expected"); + message.networkTags = []; + for (var i = 0; i < object.networkTags.length; ++i) + message.networkTags[i] = String(object.networkTags[i]); + } + return message; + }; - /** - * Creates a plain object from a GetLakeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.GetLakeRequest - * @static - * @param {google.cloud.dataplex.v1.GetLakeRequest} message GetLakeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetLakeRequest.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; - }; + /** + * Creates a plain object from a VpcNetwork message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} message VpcNetwork + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VpcNetwork.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.networkTags = []; + if (message.network != null && message.hasOwnProperty("network")) { + object.network = message.network; + if (options.oneofs) + object.networkName = "network"; + } + if (message.subNetwork != null && message.hasOwnProperty("subNetwork")) { + object.subNetwork = message.subNetwork; + if (options.oneofs) + object.networkName = "subNetwork"; + } + if (message.networkTags && message.networkTags.length) { + object.networkTags = []; + for (var j = 0; j < message.networkTags.length; ++j) + object.networkTags[j] = message.networkTags[j]; + } + return object; + }; + + /** + * Converts this VpcNetwork to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @instance + * @returns {Object.} JSON object + */ + VpcNetwork.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VpcNetwork + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VpcNetwork.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork"; + }; - /** - * Converts this GetLakeRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.GetLakeRequest - * @instance - * @returns {Object.} JSON object - */ - GetLakeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return VpcNetwork; + })(); - /** - * Gets the default type url for GetLakeRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GetLakeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetLakeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GetLakeRequest"; - }; + return InfrastructureSpec; + })(); - return GetLakeRequest; - })(); + Task.TriggerSpec = (function() { - v1.CreateZoneRequest = (function() { + /** + * Properties of a TriggerSpec. + * @memberof google.cloud.dataplex.v1.Task + * @interface ITriggerSpec + * @property {google.cloud.dataplex.v1.Task.TriggerSpec.Type|null} [type] TriggerSpec type + * @property {google.protobuf.ITimestamp|null} [startTime] TriggerSpec startTime + * @property {boolean|null} [disabled] TriggerSpec disabled + * @property {number|null} [maxRetries] TriggerSpec maxRetries + * @property {string|null} [schedule] TriggerSpec schedule + */ - /** - * Properties of a CreateZoneRequest. - * @memberof google.cloud.dataplex.v1 - * @interface ICreateZoneRequest - * @property {string|null} [parent] CreateZoneRequest parent - * @property {string|null} [zoneId] CreateZoneRequest zoneId - * @property {google.cloud.dataplex.v1.IZone|null} [zone] CreateZoneRequest zone - * @property {boolean|null} [validateOnly] CreateZoneRequest validateOnly - */ + /** + * Constructs a new TriggerSpec. + * @memberof google.cloud.dataplex.v1.Task + * @classdesc Represents a TriggerSpec. + * @implements ITriggerSpec + * @constructor + * @param {google.cloud.dataplex.v1.Task.ITriggerSpec=} [properties] Properties to set + */ + function TriggerSpec(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]]; + } - /** - * Constructs a new CreateZoneRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CreateZoneRequest. - * @implements ICreateZoneRequest - * @constructor - * @param {google.cloud.dataplex.v1.ICreateZoneRequest=} [properties] Properties to set - */ - function CreateZoneRequest(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]]; - } + /** + * TriggerSpec type. + * @member {google.cloud.dataplex.v1.Task.TriggerSpec.Type} type + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + */ + TriggerSpec.prototype.type = 0; - /** - * CreateZoneRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @instance - */ - CreateZoneRequest.prototype.parent = ""; + /** + * TriggerSpec startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + */ + TriggerSpec.prototype.startTime = null; - /** - * CreateZoneRequest zoneId. - * @member {string} zoneId - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @instance - */ - CreateZoneRequest.prototype.zoneId = ""; + /** + * TriggerSpec disabled. + * @member {boolean} disabled + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + */ + TriggerSpec.prototype.disabled = false; - /** - * CreateZoneRequest zone. - * @member {google.cloud.dataplex.v1.IZone|null|undefined} zone - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @instance - */ - CreateZoneRequest.prototype.zone = null; + /** + * TriggerSpec maxRetries. + * @member {number} maxRetries + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + */ + TriggerSpec.prototype.maxRetries = 0; - /** - * CreateZoneRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @instance - */ - CreateZoneRequest.prototype.validateOnly = false; + /** + * TriggerSpec schedule. + * @member {string|null|undefined} schedule + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + */ + TriggerSpec.prototype.schedule = null; - /** - * Creates a new CreateZoneRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateZoneRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest instance - */ - CreateZoneRequest.create = function create(properties) { - return new CreateZoneRequest(properties); - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Encodes the specified CreateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateZoneRequest} message CreateZoneRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateZoneRequest.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.zoneId != null && Object.hasOwnProperty.call(message, "zoneId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zoneId); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - $root.google.cloud.dataplex.v1.Zone.encode(message.zone, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); - return writer; - }; + /** + * TriggerSpec trigger. + * @member {"schedule"|undefined} trigger + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + */ + Object.defineProperty(TriggerSpec.prototype, "trigger", { + get: $util.oneOfGetter($oneOfFields = ["schedule"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Encodes the specified CreateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateZoneRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateZoneRequest} message CreateZoneRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new TriggerSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {google.cloud.dataplex.v1.Task.ITriggerSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.TriggerSpec} TriggerSpec instance + */ + TriggerSpec.create = function create(properties) { + return new TriggerSpec(properties); + }; - /** - * Decodes a CreateZoneRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateZoneRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateZoneRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.zoneId = reader.string(); + /** + * Encodes the specified TriggerSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.TriggerSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {google.cloud.dataplex.v1.Task.ITriggerSpec} message TriggerSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TriggerSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disabled); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.maxRetries != null && Object.hasOwnProperty.call(message, "maxRetries")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.maxRetries); + if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) + writer.uint32(/* id 100, wireType 2 =*/802).string(message.schedule); + return writer; + }; + + /** + * Encodes the specified TriggerSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.TriggerSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {google.cloud.dataplex.v1.Task.ITriggerSpec} message TriggerSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TriggerSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TriggerSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.TriggerSpec} TriggerSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TriggerSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.TriggerSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.disabled = reader.bool(); + break; + } + case 7: { + message.maxRetries = reader.int32(); + break; + } + case 100: { + message.schedule = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; } - case 3: { - message.zone = $root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32()); + } + return message; + }; + + /** + * Decodes a TriggerSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.TriggerSpec} TriggerSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TriggerSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TriggerSpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TriggerSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: break; } - case 4: { - message.validateOnly = reader.bool(); + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + if (message.maxRetries != null && message.hasOwnProperty("maxRetries")) + if (!$util.isInteger(message.maxRetries)) + return "maxRetries: integer expected"; + if (message.schedule != null && message.hasOwnProperty("schedule")) { + properties.trigger = 1; + if (!$util.isString(message.schedule)) + return "schedule: string expected"; + } + return null; + }; + + /** + * Creates a TriggerSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.TriggerSpec} TriggerSpec + */ + TriggerSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.TriggerSpec) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.TriggerSpec(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; break; } - default: - reader.skipType(tag & 7); + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "ON_DEMAND": + case 1: + message.type = 1; + break; + case "RECURRING": + case 2: + message.type = 2; break; } - } - return message; - }; + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.TriggerSpec.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + if (object.maxRetries != null) + message.maxRetries = object.maxRetries | 0; + if (object.schedule != null) + message.schedule = String(object.schedule); + return message; + }; + + /** + * Creates a plain object from a TriggerSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {google.cloud.dataplex.v1.Task.TriggerSpec} message TriggerSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TriggerSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.disabled = false; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.startTime = null; + object.maxRetries = 0; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Task.TriggerSpec.Type[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.Task.TriggerSpec.Type[message.type] : message.type; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.maxRetries != null && message.hasOwnProperty("maxRetries")) + object.maxRetries = message.maxRetries; + if (message.schedule != null && message.hasOwnProperty("schedule")) { + object.schedule = message.schedule; + if (options.oneofs) + object.trigger = "schedule"; + } + return object; + }; + + /** + * Converts this TriggerSpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @instance + * @returns {Object.} JSON object + */ + TriggerSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TriggerSpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TriggerSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.TriggerSpec"; + }; + + /** + * Type enum. + * @name google.cloud.dataplex.v1.Task.TriggerSpec.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} ON_DEMAND=1 ON_DEMAND value + * @property {number} RECURRING=2 RECURRING value + */ + TriggerSpec.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ON_DEMAND"] = 1; + values[valuesById[2] = "RECURRING"] = 2; + return values; + })(); + + return TriggerSpec; + })(); + + Task.ExecutionSpec = (function() { - /** - * Decodes a CreateZoneRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateZoneRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Properties of an ExecutionSpec. + * @memberof google.cloud.dataplex.v1.Task + * @interface IExecutionSpec + * @property {Object.|null} [args] ExecutionSpec args + * @property {string|null} [serviceAccount] ExecutionSpec serviceAccount + * @property {string|null} [project] ExecutionSpec project + * @property {google.protobuf.IDuration|null} [maxJobExecutionLifetime] ExecutionSpec maxJobExecutionLifetime + * @property {string|null} [kmsKey] ExecutionSpec kmsKey + */ - /** - * Verifies a CreateZoneRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateZoneRequest.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.zoneId != null && message.hasOwnProperty("zoneId")) - if (!$util.isString(message.zoneId)) - return "zoneId: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) { - var error = $root.google.cloud.dataplex.v1.Zone.verify(message.zone); - if (error) - return "zone." + error; + /** + * Constructs a new ExecutionSpec. + * @memberof google.cloud.dataplex.v1.Task + * @classdesc Represents an ExecutionSpec. + * @implements IExecutionSpec + * @constructor + * @param {google.cloud.dataplex.v1.Task.IExecutionSpec=} [properties] Properties to set + */ + function ExecutionSpec(properties) { + this.args = {}; + 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]]; } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - /** - * Creates a CreateZoneRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CreateZoneRequest} CreateZoneRequest - */ - CreateZoneRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CreateZoneRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.CreateZoneRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.zoneId != null) - message.zoneId = String(object.zoneId); - if (object.zone != null) { - if (typeof object.zone !== "object") - throw TypeError(".google.cloud.dataplex.v1.CreateZoneRequest.zone: object expected"); - message.zone = $root.google.cloud.dataplex.v1.Zone.fromObject(object.zone); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; + /** + * ExecutionSpec args. + * @member {Object.} args + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @instance + */ + ExecutionSpec.prototype.args = $util.emptyObject; - /** - * Creates a plain object from a CreateZoneRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @static - * @param {google.cloud.dataplex.v1.CreateZoneRequest} message CreateZoneRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateZoneRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.zoneId = ""; - object.zone = null; - object.validateOnly = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.zoneId != null && message.hasOwnProperty("zoneId")) - object.zoneId = message.zoneId; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = $root.google.cloud.dataplex.v1.Zone.toObject(message.zone, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; + /** + * ExecutionSpec serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @instance + */ + ExecutionSpec.prototype.serviceAccount = ""; - /** - * Converts this CreateZoneRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @instance - * @returns {Object.} JSON object - */ - CreateZoneRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * ExecutionSpec project. + * @member {string} project + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @instance + */ + ExecutionSpec.prototype.project = ""; - /** - * Gets the default type url for CreateZoneRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.CreateZoneRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateZoneRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateZoneRequest"; - }; + /** + * ExecutionSpec maxJobExecutionLifetime. + * @member {google.protobuf.IDuration|null|undefined} maxJobExecutionLifetime + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @instance + */ + ExecutionSpec.prototype.maxJobExecutionLifetime = null; - return CreateZoneRequest; - })(); + /** + * ExecutionSpec kmsKey. + * @member {string} kmsKey + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @instance + */ + ExecutionSpec.prototype.kmsKey = ""; - v1.UpdateZoneRequest = (function() { + /** + * Creates a new ExecutionSpec instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {google.cloud.dataplex.v1.Task.IExecutionSpec=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.ExecutionSpec} ExecutionSpec instance + */ + ExecutionSpec.create = function create(properties) { + return new ExecutionSpec(properties); + }; - /** - * Properties of an UpdateZoneRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IUpdateZoneRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateZoneRequest updateMask - * @property {google.cloud.dataplex.v1.IZone|null} [zone] UpdateZoneRequest zone - * @property {boolean|null} [validateOnly] UpdateZoneRequest validateOnly - */ + /** + * Encodes the specified ExecutionSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {google.cloud.dataplex.v1.Task.IExecutionSpec} message ExecutionSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutionSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.args != null && Object.hasOwnProperty.call(message, "args")) + for (var keys = Object.keys(message.args), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.args[keys[i]]).ldelim(); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.serviceAccount); + if (message.project != null && Object.hasOwnProperty.call(message, "project")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.project); + if (message.maxJobExecutionLifetime != null && Object.hasOwnProperty.call(message, "maxJobExecutionLifetime")) + $root.google.protobuf.Duration.encode(message.maxJobExecutionLifetime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.kmsKey != null && Object.hasOwnProperty.call(message, "kmsKey")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.kmsKey); + return writer; + }; - /** - * Constructs a new UpdateZoneRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an UpdateZoneRequest. - * @implements IUpdateZoneRequest - * @constructor - * @param {google.cloud.dataplex.v1.IUpdateZoneRequest=} [properties] Properties to set - */ - function UpdateZoneRequest(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]]; - } + /** + * Encodes the specified ExecutionSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {google.cloud.dataplex.v1.Task.IExecutionSpec} message ExecutionSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutionSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * UpdateZoneRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @instance - */ - UpdateZoneRequest.prototype.updateMask = null; + /** + * Decodes an ExecutionSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.ExecutionSpec} ExecutionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutionSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.ExecutionSpec(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: { + if (message.args === $util.emptyObject) + message.args = {}; + 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.args[key] = value; + break; + } + case 5: { + message.serviceAccount = reader.string(); + break; + } + case 7: { + message.project = reader.string(); + break; + } + case 8: { + message.maxJobExecutionLifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 9: { + message.kmsKey = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * UpdateZoneRequest zone. - * @member {google.cloud.dataplex.v1.IZone|null|undefined} zone - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @instance - */ - UpdateZoneRequest.prototype.zone = null; + /** + * Decodes an ExecutionSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.ExecutionSpec} ExecutionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutionSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * UpdateZoneRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @instance - */ - UpdateZoneRequest.prototype.validateOnly = false; + /** + * Verifies an ExecutionSpec message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecutionSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.args != null && message.hasOwnProperty("args")) { + if (!$util.isObject(message.args)) + return "args: object expected"; + var key = Object.keys(message.args); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.args[key[i]])) + return "args: string{k:string} expected"; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.project != null && message.hasOwnProperty("project")) + if (!$util.isString(message.project)) + return "project: string expected"; + if (message.maxJobExecutionLifetime != null && message.hasOwnProperty("maxJobExecutionLifetime")) { + var error = $root.google.protobuf.Duration.verify(message.maxJobExecutionLifetime); + if (error) + return "maxJobExecutionLifetime." + error; + } + if (message.kmsKey != null && message.hasOwnProperty("kmsKey")) + if (!$util.isString(message.kmsKey)) + return "kmsKey: string expected"; + return null; + }; - /** - * Creates a new UpdateZoneRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateZoneRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest instance - */ - UpdateZoneRequest.create = function create(properties) { - return new UpdateZoneRequest(properties); - }; + /** + * Creates an ExecutionSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.ExecutionSpec} ExecutionSpec + */ + ExecutionSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.ExecutionSpec) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.ExecutionSpec(); + if (object.args) { + if (typeof object.args !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.ExecutionSpec.args: object expected"); + message.args = {}; + for (var keys = Object.keys(object.args), i = 0; i < keys.length; ++i) + message.args[keys[i]] = String(object.args[keys[i]]); + } + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.project != null) + message.project = String(object.project); + if (object.maxJobExecutionLifetime != null) { + if (typeof object.maxJobExecutionLifetime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.ExecutionSpec.maxJobExecutionLifetime: object expected"); + message.maxJobExecutionLifetime = $root.google.protobuf.Duration.fromObject(object.maxJobExecutionLifetime); + } + if (object.kmsKey != null) + message.kmsKey = String(object.kmsKey); + return message; + }; - /** - * Encodes the specified UpdateZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} message UpdateZoneRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateZoneRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - $root.google.cloud.dataplex.v1.Zone.encode(message.zone, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); - return writer; - }; + /** + * Creates a plain object from an ExecutionSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {google.cloud.dataplex.v1.Task.ExecutionSpec} message ExecutionSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecutionSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.args = {}; + if (options.defaults) { + object.serviceAccount = ""; + object.project = ""; + object.maxJobExecutionLifetime = null; + object.kmsKey = ""; + } + var keys2; + if (message.args && (keys2 = Object.keys(message.args)).length) { + object.args = {}; + for (var j = 0; j < keys2.length; ++j) + object.args[keys2[j]] = message.args[keys2[j]]; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.project != null && message.hasOwnProperty("project")) + object.project = message.project; + if (message.maxJobExecutionLifetime != null && message.hasOwnProperty("maxJobExecutionLifetime")) + object.maxJobExecutionLifetime = $root.google.protobuf.Duration.toObject(message.maxJobExecutionLifetime, options); + if (message.kmsKey != null && message.hasOwnProperty("kmsKey")) + object.kmsKey = message.kmsKey; + return object; + }; + + /** + * Converts this ExecutionSpec to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @instance + * @returns {Object.} JSON object + */ + ExecutionSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExecutionSpec + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecutionSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.ExecutionSpec"; + }; - /** - * Encodes the specified UpdateZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateZoneRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateZoneRequest} message UpdateZoneRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + return ExecutionSpec; + })(); - /** - * Decodes an UpdateZoneRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateZoneRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateZoneRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.zone = $root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32()); - break; - } - case 3: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + Task.SparkTaskConfig = (function() { - /** - * Decodes an UpdateZoneRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateZoneRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Properties of a SparkTaskConfig. + * @memberof google.cloud.dataplex.v1.Task + * @interface ISparkTaskConfig + * @property {string|null} [mainJarFileUri] SparkTaskConfig mainJarFileUri + * @property {string|null} [mainClass] SparkTaskConfig mainClass + * @property {string|null} [pythonScriptFile] SparkTaskConfig pythonScriptFile + * @property {string|null} [sqlScriptFile] SparkTaskConfig sqlScriptFile + * @property {string|null} [sqlScript] SparkTaskConfig sqlScript + * @property {Array.|null} [fileUris] SparkTaskConfig fileUris + * @property {Array.|null} [archiveUris] SparkTaskConfig archiveUris + * @property {google.cloud.dataplex.v1.Task.IInfrastructureSpec|null} [infrastructureSpec] SparkTaskConfig infrastructureSpec + */ - /** - * Verifies an UpdateZoneRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateZoneRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.zone != null && message.hasOwnProperty("zone")) { - var error = $root.google.cloud.dataplex.v1.Zone.verify(message.zone); - if (error) - return "zone." + error; + /** + * Constructs a new SparkTaskConfig. + * @memberof google.cloud.dataplex.v1.Task + * @classdesc Represents a SparkTaskConfig. + * @implements ISparkTaskConfig + * @constructor + * @param {google.cloud.dataplex.v1.Task.ISparkTaskConfig=} [properties] Properties to set + */ + function SparkTaskConfig(properties) { + this.fileUris = []; + this.archiveUris = []; + 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]]; } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - /** - * Creates an UpdateZoneRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.UpdateZoneRequest} UpdateZoneRequest - */ - UpdateZoneRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.UpdateZoneRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.UpdateZoneRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateZoneRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.zone != null) { - if (typeof object.zone !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateZoneRequest.zone: object expected"); - message.zone = $root.google.cloud.dataplex.v1.Zone.fromObject(object.zone); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; + /** + * SparkTaskConfig mainJarFileUri. + * @member {string|null|undefined} mainJarFileUri + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.mainJarFileUri = null; - /** - * Creates a plain object from an UpdateZoneRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @static - * @param {google.cloud.dataplex.v1.UpdateZoneRequest} message UpdateZoneRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateZoneRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.zone = null; - object.validateOnly = false; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = $root.google.cloud.dataplex.v1.Zone.toObject(message.zone, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; + /** + * SparkTaskConfig mainClass. + * @member {string|null|undefined} mainClass + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.mainClass = null; - /** - * Converts this UpdateZoneRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateZoneRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * SparkTaskConfig pythonScriptFile. + * @member {string|null|undefined} pythonScriptFile + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.pythonScriptFile = null; - /** - * Gets the default type url for UpdateZoneRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.UpdateZoneRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateZoneRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateZoneRequest"; - }; + /** + * SparkTaskConfig sqlScriptFile. + * @member {string|null|undefined} sqlScriptFile + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.sqlScriptFile = null; - return UpdateZoneRequest; - })(); + /** + * SparkTaskConfig sqlScript. + * @member {string|null|undefined} sqlScript + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.sqlScript = null; - v1.DeleteZoneRequest = (function() { + /** + * SparkTaskConfig fileUris. + * @member {Array.} fileUris + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.fileUris = $util.emptyArray; - /** - * Properties of a DeleteZoneRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IDeleteZoneRequest - * @property {string|null} [name] DeleteZoneRequest name - */ + /** + * SparkTaskConfig archiveUris. + * @member {Array.} archiveUris + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.archiveUris = $util.emptyArray; - /** - * Constructs a new DeleteZoneRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DeleteZoneRequest. - * @implements IDeleteZoneRequest - * @constructor - * @param {google.cloud.dataplex.v1.IDeleteZoneRequest=} [properties] Properties to set - */ - function DeleteZoneRequest(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]]; - } + /** + * SparkTaskConfig infrastructureSpec. + * @member {google.cloud.dataplex.v1.Task.IInfrastructureSpec|null|undefined} infrastructureSpec + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + SparkTaskConfig.prototype.infrastructureSpec = null; - /** - * DeleteZoneRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest - * @instance - */ - DeleteZoneRequest.prototype.name = ""; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Creates a new DeleteZoneRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteZoneRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest instance - */ - DeleteZoneRequest.create = function create(properties) { - return new DeleteZoneRequest(properties); - }; + /** + * SparkTaskConfig driver. + * @member {"mainJarFileUri"|"mainClass"|"pythonScriptFile"|"sqlScriptFile"|"sqlScript"|undefined} driver + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + */ + Object.defineProperty(SparkTaskConfig.prototype, "driver", { + get: $util.oneOfGetter($oneOfFields = ["mainJarFileUri", "mainClass", "pythonScriptFile", "sqlScriptFile", "sqlScript"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Encodes the specified DeleteZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} message DeleteZoneRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteZoneRequest.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; - }; + /** + * Creates a new SparkTaskConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.ISparkTaskConfig=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.SparkTaskConfig} SparkTaskConfig instance + */ + SparkTaskConfig.create = function create(properties) { + return new SparkTaskConfig(properties); + }; - /** - * Encodes the specified DeleteZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteZoneRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteZoneRequest} message DeleteZoneRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified SparkTaskConfig message. Does not implicitly {@link google.cloud.dataplex.v1.Task.SparkTaskConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.ISparkTaskConfig} message SparkTaskConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SparkTaskConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fileUris != null && message.fileUris.length) + for (var i = 0; i < message.fileUris.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.fileUris[i]); + if (message.archiveUris != null && message.archiveUris.length) + for (var i = 0; i < message.archiveUris.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.archiveUris[i]); + if (message.infrastructureSpec != null && Object.hasOwnProperty.call(message, "infrastructureSpec")) + $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.encode(message.infrastructureSpec, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.mainJarFileUri != null && Object.hasOwnProperty.call(message, "mainJarFileUri")) + writer.uint32(/* id 100, wireType 2 =*/802).string(message.mainJarFileUri); + if (message.mainClass != null && Object.hasOwnProperty.call(message, "mainClass")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.mainClass); + if (message.pythonScriptFile != null && Object.hasOwnProperty.call(message, "pythonScriptFile")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.pythonScriptFile); + if (message.sqlScriptFile != null && Object.hasOwnProperty.call(message, "sqlScriptFile")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.sqlScriptFile); + if (message.sqlScript != null && Object.hasOwnProperty.call(message, "sqlScript")) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.sqlScript); + return writer; + }; - /** - * Decodes a DeleteZoneRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteZoneRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteZoneRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); + /** + * Encodes the specified SparkTaskConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.SparkTaskConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.ISparkTaskConfig} message SparkTaskConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SparkTaskConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SparkTaskConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.SparkTaskConfig} SparkTaskConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SparkTaskConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.SparkTaskConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 100: { + message.mainJarFileUri = reader.string(); + break; + } + case 101: { + message.mainClass = reader.string(); + break; + } + case 102: { + message.pythonScriptFile = reader.string(); + break; + } + case 104: { + message.sqlScriptFile = reader.string(); + break; + } + case 105: { + message.sqlScript = reader.string(); + break; + } + case 3: { + if (!(message.fileUris && message.fileUris.length)) + message.fileUris = []; + message.fileUris.push(reader.string()); + break; + } + case 4: { + if (!(message.archiveUris && message.archiveUris.length)) + message.archiveUris = []; + message.archiveUris.push(reader.string()); + break; + } + case 6: { + message.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; - - /** - * Decodes a DeleteZoneRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteZoneRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return message; + }; + + /** + * Decodes a SparkTaskConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.SparkTaskConfig} SparkTaskConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SparkTaskConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SparkTaskConfig message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SparkTaskConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.mainJarFileUri != null && message.hasOwnProperty("mainJarFileUri")) { + properties.driver = 1; + if (!$util.isString(message.mainJarFileUri)) + return "mainJarFileUri: string expected"; + } + if (message.mainClass != null && message.hasOwnProperty("mainClass")) { + if (properties.driver === 1) + return "driver: multiple values"; + properties.driver = 1; + if (!$util.isString(message.mainClass)) + return "mainClass: string expected"; + } + if (message.pythonScriptFile != null && message.hasOwnProperty("pythonScriptFile")) { + if (properties.driver === 1) + return "driver: multiple values"; + properties.driver = 1; + if (!$util.isString(message.pythonScriptFile)) + return "pythonScriptFile: string expected"; + } + if (message.sqlScriptFile != null && message.hasOwnProperty("sqlScriptFile")) { + if (properties.driver === 1) + return "driver: multiple values"; + properties.driver = 1; + if (!$util.isString(message.sqlScriptFile)) + return "sqlScriptFile: string expected"; + } + if (message.sqlScript != null && message.hasOwnProperty("sqlScript")) { + if (properties.driver === 1) + return "driver: multiple values"; + properties.driver = 1; + if (!$util.isString(message.sqlScript)) + return "sqlScript: string expected"; + } + if (message.fileUris != null && message.hasOwnProperty("fileUris")) { + if (!Array.isArray(message.fileUris)) + return "fileUris: array expected"; + for (var i = 0; i < message.fileUris.length; ++i) + if (!$util.isString(message.fileUris[i])) + return "fileUris: string[] expected"; + } + if (message.archiveUris != null && message.hasOwnProperty("archiveUris")) { + if (!Array.isArray(message.archiveUris)) + return "archiveUris: array expected"; + for (var i = 0; i < message.archiveUris.length; ++i) + if (!$util.isString(message.archiveUris[i])) + return "archiveUris: string[] expected"; + } + if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) { + var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.verify(message.infrastructureSpec); + if (error) + return "infrastructureSpec." + error; + } + return null; + }; - /** - * Verifies a DeleteZoneRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteZoneRequest.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 SparkTaskConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.SparkTaskConfig} SparkTaskConfig + */ + SparkTaskConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.SparkTaskConfig) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.SparkTaskConfig(); + if (object.mainJarFileUri != null) + message.mainJarFileUri = String(object.mainJarFileUri); + if (object.mainClass != null) + message.mainClass = String(object.mainClass); + if (object.pythonScriptFile != null) + message.pythonScriptFile = String(object.pythonScriptFile); + if (object.sqlScriptFile != null) + message.sqlScriptFile = String(object.sqlScriptFile); + if (object.sqlScript != null) + message.sqlScript = String(object.sqlScript); + if (object.fileUris) { + if (!Array.isArray(object.fileUris)) + throw TypeError(".google.cloud.dataplex.v1.Task.SparkTaskConfig.fileUris: array expected"); + message.fileUris = []; + for (var i = 0; i < object.fileUris.length; ++i) + message.fileUris[i] = String(object.fileUris[i]); + } + if (object.archiveUris) { + if (!Array.isArray(object.archiveUris)) + throw TypeError(".google.cloud.dataplex.v1.Task.SparkTaskConfig.archiveUris: array expected"); + message.archiveUris = []; + for (var i = 0; i < object.archiveUris.length; ++i) + message.archiveUris[i] = String(object.archiveUris[i]); + } + if (object.infrastructureSpec != null) { + if (typeof object.infrastructureSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.SparkTaskConfig.infrastructureSpec: object expected"); + message.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.fromObject(object.infrastructureSpec); + } + return message; + }; - /** - * Creates a DeleteZoneRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DeleteZoneRequest} DeleteZoneRequest - */ - DeleteZoneRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DeleteZoneRequest) + /** + * Creates a plain object from a SparkTaskConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.SparkTaskConfig} message SparkTaskConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SparkTaskConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.fileUris = []; + object.archiveUris = []; + } + if (options.defaults) + object.infrastructureSpec = null; + if (message.fileUris && message.fileUris.length) { + object.fileUris = []; + for (var j = 0; j < message.fileUris.length; ++j) + object.fileUris[j] = message.fileUris[j]; + } + if (message.archiveUris && message.archiveUris.length) { + object.archiveUris = []; + for (var j = 0; j < message.archiveUris.length; ++j) + object.archiveUris[j] = message.archiveUris[j]; + } + if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) + object.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.toObject(message.infrastructureSpec, options); + if (message.mainJarFileUri != null && message.hasOwnProperty("mainJarFileUri")) { + object.mainJarFileUri = message.mainJarFileUri; + if (options.oneofs) + object.driver = "mainJarFileUri"; + } + if (message.mainClass != null && message.hasOwnProperty("mainClass")) { + object.mainClass = message.mainClass; + if (options.oneofs) + object.driver = "mainClass"; + } + if (message.pythonScriptFile != null && message.hasOwnProperty("pythonScriptFile")) { + object.pythonScriptFile = message.pythonScriptFile; + if (options.oneofs) + object.driver = "pythonScriptFile"; + } + if (message.sqlScriptFile != null && message.hasOwnProperty("sqlScriptFile")) { + object.sqlScriptFile = message.sqlScriptFile; + if (options.oneofs) + object.driver = "sqlScriptFile"; + } + if (message.sqlScript != null && message.hasOwnProperty("sqlScript")) { + object.sqlScript = message.sqlScript; + if (options.oneofs) + object.driver = "sqlScript"; + } return object; - var message = new $root.google.cloud.dataplex.v1.DeleteZoneRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteZoneRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest - * @static - * @param {google.cloud.dataplex.v1.DeleteZoneRequest} message DeleteZoneRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteZoneRequest.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 DeleteZoneRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteZoneRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + }; - /** - * Gets the default type url for DeleteZoneRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DeleteZoneRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteZoneRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteZoneRequest"; - }; + /** + * Converts this SparkTaskConfig to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @instance + * @returns {Object.} JSON object + */ + SparkTaskConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return DeleteZoneRequest; - })(); + /** + * Gets the default type url for SparkTaskConfig + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SparkTaskConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.SparkTaskConfig"; + }; - v1.ListZonesRequest = (function() { + return SparkTaskConfig; + })(); - /** - * Properties of a ListZonesRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IListZonesRequest - * @property {string|null} [parent] ListZonesRequest parent - * @property {number|null} [pageSize] ListZonesRequest pageSize - * @property {string|null} [pageToken] ListZonesRequest pageToken - * @property {string|null} [filter] ListZonesRequest filter - * @property {string|null} [orderBy] ListZonesRequest orderBy - */ + Task.NotebookTaskConfig = (function() { - /** - * Constructs a new ListZonesRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListZonesRequest. - * @implements IListZonesRequest - * @constructor - * @param {google.cloud.dataplex.v1.IListZonesRequest=} [properties] Properties to set - */ - function ListZonesRequest(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]]; - } + /** + * Properties of a NotebookTaskConfig. + * @memberof google.cloud.dataplex.v1.Task + * @interface INotebookTaskConfig + * @property {string|null} [notebook] NotebookTaskConfig notebook + * @property {google.cloud.dataplex.v1.Task.IInfrastructureSpec|null} [infrastructureSpec] NotebookTaskConfig infrastructureSpec + * @property {Array.|null} [fileUris] NotebookTaskConfig fileUris + * @property {Array.|null} [archiveUris] NotebookTaskConfig archiveUris + */ - /** - * ListZonesRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListZonesRequest - * @instance - */ - ListZonesRequest.prototype.parent = ""; + /** + * Constructs a new NotebookTaskConfig. + * @memberof google.cloud.dataplex.v1.Task + * @classdesc Represents a NotebookTaskConfig. + * @implements INotebookTaskConfig + * @constructor + * @param {google.cloud.dataplex.v1.Task.INotebookTaskConfig=} [properties] Properties to set + */ + function NotebookTaskConfig(properties) { + this.fileUris = []; + this.archiveUris = []; + 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]]; + } - /** - * ListZonesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListZonesRequest - * @instance - */ - ListZonesRequest.prototype.pageSize = 0; + /** + * NotebookTaskConfig notebook. + * @member {string} notebook + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @instance + */ + NotebookTaskConfig.prototype.notebook = ""; - /** - * ListZonesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListZonesRequest - * @instance - */ - ListZonesRequest.prototype.pageToken = ""; + /** + * NotebookTaskConfig infrastructureSpec. + * @member {google.cloud.dataplex.v1.Task.IInfrastructureSpec|null|undefined} infrastructureSpec + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @instance + */ + NotebookTaskConfig.prototype.infrastructureSpec = null; - /** - * ListZonesRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListZonesRequest - * @instance - */ - ListZonesRequest.prototype.filter = ""; + /** + * NotebookTaskConfig fileUris. + * @member {Array.} fileUris + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @instance + */ + NotebookTaskConfig.prototype.fileUris = $util.emptyArray; - /** - * ListZonesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.dataplex.v1.ListZonesRequest - * @instance - */ - ListZonesRequest.prototype.orderBy = ""; + /** + * NotebookTaskConfig archiveUris. + * @member {Array.} archiveUris + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @instance + */ + NotebookTaskConfig.prototype.archiveUris = $util.emptyArray; - /** - * Creates a new ListZonesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListZonesRequest - * @static - * @param {google.cloud.dataplex.v1.IListZonesRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest instance - */ - ListZonesRequest.create = function create(properties) { - return new ListZonesRequest(properties); - }; + /** + * Creates a new NotebookTaskConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.INotebookTaskConfig=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.NotebookTaskConfig} NotebookTaskConfig instance + */ + NotebookTaskConfig.create = function create(properties) { + return new NotebookTaskConfig(properties); + }; - /** - * Encodes the specified ListZonesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListZonesRequest - * @static - * @param {google.cloud.dataplex.v1.IListZonesRequest} message ListZonesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListZonesRequest.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.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; + /** + * Encodes the specified NotebookTaskConfig message. Does not implicitly {@link google.cloud.dataplex.v1.Task.NotebookTaskConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.INotebookTaskConfig} message NotebookTaskConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NotebookTaskConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.infrastructureSpec != null && Object.hasOwnProperty.call(message, "infrastructureSpec")) + $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.encode(message.infrastructureSpec, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.notebook != null && Object.hasOwnProperty.call(message, "notebook")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.notebook); + if (message.fileUris != null && message.fileUris.length) + for (var i = 0; i < message.fileUris.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.fileUris[i]); + if (message.archiveUris != null && message.archiveUris.length) + for (var i = 0; i < message.archiveUris.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.archiveUris[i]); + return writer; + }; - /** - * Encodes the specified ListZonesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListZonesRequest - * @static - * @param {google.cloud.dataplex.v1.IListZonesRequest} message ListZonesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListZonesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified NotebookTaskConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.NotebookTaskConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.INotebookTaskConfig} message NotebookTaskConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NotebookTaskConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ListZonesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListZonesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListZonesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListZonesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); + /** + * Decodes a NotebookTaskConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.NotebookTaskConfig} NotebookTaskConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NotebookTaskConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: { + message.notebook = reader.string(); + break; + } + case 3: { + message.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.decode(reader, reader.uint32()); + break; + } + case 5: { + if (!(message.fileUris && message.fileUris.length)) + message.fileUris = []; + message.fileUris.push(reader.string()); + break; + } + case 6: { + if (!(message.archiveUris && message.archiveUris.length)) + message.archiveUris = []; + message.archiveUris.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a ListZonesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListZonesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListZonesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a NotebookTaskConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.NotebookTaskConfig} NotebookTaskConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NotebookTaskConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a ListZonesRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListZonesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListZonesRequest.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.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; + /** + * Verifies a NotebookTaskConfig message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NotebookTaskConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.notebook != null && message.hasOwnProperty("notebook")) + if (!$util.isString(message.notebook)) + return "notebook: string expected"; + if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) { + var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.verify(message.infrastructureSpec); + if (error) + return "infrastructureSpec." + error; + } + if (message.fileUris != null && message.hasOwnProperty("fileUris")) { + if (!Array.isArray(message.fileUris)) + return "fileUris: array expected"; + for (var i = 0; i < message.fileUris.length; ++i) + if (!$util.isString(message.fileUris[i])) + return "fileUris: string[] expected"; + } + if (message.archiveUris != null && message.hasOwnProperty("archiveUris")) { + if (!Array.isArray(message.archiveUris)) + return "archiveUris: array expected"; + for (var i = 0; i < message.archiveUris.length; ++i) + if (!$util.isString(message.archiveUris[i])) + return "archiveUris: string[] expected"; + } + return null; + }; - /** - * Creates a ListZonesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListZonesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListZonesRequest} ListZonesRequest - */ - ListZonesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListZonesRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.ListZonesRequest(); - 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.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; + /** + * Creates a NotebookTaskConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.NotebookTaskConfig} NotebookTaskConfig + */ + NotebookTaskConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig(); + if (object.notebook != null) + message.notebook = String(object.notebook); + if (object.infrastructureSpec != null) { + if (typeof object.infrastructureSpec !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.NotebookTaskConfig.infrastructureSpec: object expected"); + message.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.fromObject(object.infrastructureSpec); + } + if (object.fileUris) { + if (!Array.isArray(object.fileUris)) + throw TypeError(".google.cloud.dataplex.v1.Task.NotebookTaskConfig.fileUris: array expected"); + message.fileUris = []; + for (var i = 0; i < object.fileUris.length; ++i) + message.fileUris[i] = String(object.fileUris[i]); + } + if (object.archiveUris) { + if (!Array.isArray(object.archiveUris)) + throw TypeError(".google.cloud.dataplex.v1.Task.NotebookTaskConfig.archiveUris: array expected"); + message.archiveUris = []; + for (var i = 0; i < object.archiveUris.length; ++i) + message.archiveUris[i] = String(object.archiveUris[i]); + } + return message; + }; - /** - * Creates a plain object from a ListZonesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListZonesRequest - * @static - * @param {google.cloud.dataplex.v1.ListZonesRequest} message ListZonesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListZonesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - 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.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; + /** + * Creates a plain object from a NotebookTaskConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {google.cloud.dataplex.v1.Task.NotebookTaskConfig} message NotebookTaskConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NotebookTaskConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.fileUris = []; + object.archiveUris = []; + } + if (options.defaults) { + object.infrastructureSpec = null; + object.notebook = ""; + } + if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) + object.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.toObject(message.infrastructureSpec, options); + if (message.notebook != null && message.hasOwnProperty("notebook")) + object.notebook = message.notebook; + if (message.fileUris && message.fileUris.length) { + object.fileUris = []; + for (var j = 0; j < message.fileUris.length; ++j) + object.fileUris[j] = message.fileUris[j]; + } + if (message.archiveUris && message.archiveUris.length) { + object.archiveUris = []; + for (var j = 0; j < message.archiveUris.length; ++j) + object.archiveUris[j] = message.archiveUris[j]; + } + return object; + }; - /** - * Converts this ListZonesRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListZonesRequest - * @instance - * @returns {Object.} JSON object - */ - ListZonesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this NotebookTaskConfig to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @instance + * @returns {Object.} JSON object + */ + NotebookTaskConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for ListZonesRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListZonesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListZonesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListZonesRequest"; - }; + /** + * Gets the default type url for NotebookTaskConfig + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NotebookTaskConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.NotebookTaskConfig"; + }; - return ListZonesRequest; - })(); + return NotebookTaskConfig; + })(); - v1.ListZonesResponse = (function() { + Task.ExecutionStatus = (function() { - /** - * Properties of a ListZonesResponse. - * @memberof google.cloud.dataplex.v1 - * @interface IListZonesResponse - * @property {Array.|null} [zones] ListZonesResponse zones - * @property {string|null} [nextPageToken] ListZonesResponse nextPageToken - */ + /** + * Properties of an ExecutionStatus. + * @memberof google.cloud.dataplex.v1.Task + * @interface IExecutionStatus + * @property {google.protobuf.ITimestamp|null} [updateTime] ExecutionStatus updateTime + * @property {google.cloud.dataplex.v1.IJob|null} [latestJob] ExecutionStatus latestJob + */ - /** - * Constructs a new ListZonesResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListZonesResponse. - * @implements IListZonesResponse - * @constructor - * @param {google.cloud.dataplex.v1.IListZonesResponse=} [properties] Properties to set - */ - function ListZonesResponse(properties) { - this.zones = []; - 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]]; - } + /** + * Constructs a new ExecutionStatus. + * @memberof google.cloud.dataplex.v1.Task + * @classdesc Represents an ExecutionStatus. + * @implements IExecutionStatus + * @constructor + * @param {google.cloud.dataplex.v1.Task.IExecutionStatus=} [properties] Properties to set + */ + function ExecutionStatus(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]]; + } - /** - * ListZonesResponse zones. - * @member {Array.} zones - * @memberof google.cloud.dataplex.v1.ListZonesResponse - * @instance - */ - ListZonesResponse.prototype.zones = $util.emptyArray; + /** + * ExecutionStatus updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @instance + */ + ExecutionStatus.prototype.updateTime = null; - /** - * ListZonesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListZonesResponse - * @instance - */ - ListZonesResponse.prototype.nextPageToken = ""; + /** + * ExecutionStatus latestJob. + * @member {google.cloud.dataplex.v1.IJob|null|undefined} latestJob + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @instance + */ + ExecutionStatus.prototype.latestJob = null; - /** - * Creates a new ListZonesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListZonesResponse - * @static - * @param {google.cloud.dataplex.v1.IListZonesResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse instance - */ - ListZonesResponse.create = function create(properties) { - return new ListZonesResponse(properties); - }; + /** + * Creates a new ExecutionStatus instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {google.cloud.dataplex.v1.Task.IExecutionStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Task.ExecutionStatus} ExecutionStatus instance + */ + ExecutionStatus.create = function create(properties) { + return new ExecutionStatus(properties); + }; - /** - * Encodes the specified ListZonesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListZonesResponse - * @static - * @param {google.cloud.dataplex.v1.IListZonesResponse} message ListZonesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListZonesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.zones != null && message.zones.length) - for (var i = 0; i < message.zones.length; ++i) - $root.google.cloud.dataplex.v1.Zone.encode(message.zones[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 ExecutionStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionStatus.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {google.cloud.dataplex.v1.Task.IExecutionStatus} message ExecutionStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutionStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.latestJob != null && Object.hasOwnProperty.call(message, "latestJob")) + $root.google.cloud.dataplex.v1.Job.encode(message.latestJob, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified ListZonesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZonesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListZonesResponse - * @static - * @param {google.cloud.dataplex.v1.IListZonesResponse} message ListZonesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListZonesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ExecutionStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {google.cloud.dataplex.v1.Task.IExecutionStatus} message ExecutionStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecutionStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ListZonesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListZonesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListZonesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListZonesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.zones && message.zones.length)) - message.zones = []; - message.zones.push($root.google.cloud.dataplex.v1.Zone.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); + /** + * Decodes an ExecutionStatus message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Task.ExecutionStatus} ExecutionStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutionStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.ExecutionStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.latestJob = $root.google.cloud.dataplex.v1.Job.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a ListZonesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListZonesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListZonesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an ExecutionStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Task.ExecutionStatus} ExecutionStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecutionStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a ListZonesResponse message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListZonesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListZonesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.zones != null && message.hasOwnProperty("zones")) { - if (!Array.isArray(message.zones)) - return "zones: array expected"; - for (var i = 0; i < message.zones.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Zone.verify(message.zones[i]); + /** + * Verifies an ExecutionStatus message. + * @function verify + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecutionStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); if (error) - return "zones." + error; + return "updateTime." + error; } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + if (message.latestJob != null && message.hasOwnProperty("latestJob")) { + var error = $root.google.cloud.dataplex.v1.Job.verify(message.latestJob); + if (error) + return "latestJob." + error; + } + return null; + }; - /** - * Creates a ListZonesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListZonesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListZonesResponse} ListZonesResponse - */ - ListZonesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListZonesResponse) - return object; - var message = new $root.google.cloud.dataplex.v1.ListZonesResponse(); - if (object.zones) { - if (!Array.isArray(object.zones)) - throw TypeError(".google.cloud.dataplex.v1.ListZonesResponse.zones: array expected"); - message.zones = []; - for (var i = 0; i < object.zones.length; ++i) { - if (typeof object.zones[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListZonesResponse.zones: object expected"); - message.zones[i] = $root.google.cloud.dataplex.v1.Zone.fromObject(object.zones[i]); + /** + * Creates an ExecutionStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Task.ExecutionStatus} ExecutionStatus + */ + ExecutionStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Task.ExecutionStatus) + return object; + var message = new $root.google.cloud.dataplex.v1.Task.ExecutionStatus(); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.ExecutionStatus.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; + if (object.latestJob != null) { + if (typeof object.latestJob !== "object") + throw TypeError(".google.cloud.dataplex.v1.Task.ExecutionStatus.latestJob: object expected"); + message.latestJob = $root.google.cloud.dataplex.v1.Job.fromObject(object.latestJob); + } + return message; + }; - /** - * Creates a plain object from a ListZonesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListZonesResponse - * @static - * @param {google.cloud.dataplex.v1.ListZonesResponse} message ListZonesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListZonesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.zones = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.zones && message.zones.length) { - object.zones = []; - for (var j = 0; j < message.zones.length; ++j) - object.zones[j] = $root.google.cloud.dataplex.v1.Zone.toObject(message.zones[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; + /** + * Creates a plain object from an ExecutionStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {google.cloud.dataplex.v1.Task.ExecutionStatus} message ExecutionStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecutionStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateTime = null; + object.latestJob = null; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.latestJob != null && message.hasOwnProperty("latestJob")) + object.latestJob = $root.google.cloud.dataplex.v1.Job.toObject(message.latestJob, options); + return object; + }; - /** - * Converts this ListZonesResponse to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListZonesResponse - * @instance - * @returns {Object.} JSON object - */ - ListZonesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this ExecutionStatus to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @instance + * @returns {Object.} JSON object + */ + ExecutionStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for ListZonesResponse - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListZonesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListZonesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListZonesResponse"; - }; + /** + * Gets the default type url for ExecutionStatus + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecutionStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.ExecutionStatus"; + }; - return ListZonesResponse; + return ExecutionStatus; + })(); + + return Task; })(); - v1.ListZoneActionsRequest = (function() { + v1.Job = (function() { /** - * Properties of a ListZoneActionsRequest. + * Properties of a Job. * @memberof google.cloud.dataplex.v1 - * @interface IListZoneActionsRequest - * @property {string|null} [parent] ListZoneActionsRequest parent - * @property {number|null} [pageSize] ListZoneActionsRequest pageSize - * @property {string|null} [pageToken] ListZoneActionsRequest pageToken + * @interface IJob + * @property {string|null} [name] Job name + * @property {string|null} [uid] Job uid + * @property {google.protobuf.ITimestamp|null} [startTime] Job startTime + * @property {google.protobuf.ITimestamp|null} [endTime] Job endTime + * @property {google.cloud.dataplex.v1.Job.State|null} [state] Job state + * @property {number|null} [retryCount] Job retryCount + * @property {google.cloud.dataplex.v1.Job.Service|null} [service] Job service + * @property {string|null} [serviceJob] Job serviceJob + * @property {string|null} [message] Job message */ /** - * Constructs a new ListZoneActionsRequest. + * Constructs a new Job. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListZoneActionsRequest. - * @implements IListZoneActionsRequest + * @classdesc Represents a Job. + * @implements IJob * @constructor - * @param {google.cloud.dataplex.v1.IListZoneActionsRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IJob=} [properties] Properties to set */ - function ListZoneActionsRequest(properties) { + function Job(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41583,318 +41649,150 @@ } /** - * ListZoneActionsRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * Job name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Job * @instance */ - ListZoneActionsRequest.prototype.parent = ""; + Job.prototype.name = ""; /** - * ListZoneActionsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * Job uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.Job * @instance */ - ListZoneActionsRequest.prototype.pageSize = 0; + Job.prototype.uid = ""; /** - * ListZoneActionsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * Job startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.dataplex.v1.Job * @instance */ - ListZoneActionsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListZoneActionsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest - * @static - * @param {google.cloud.dataplex.v1.IListZoneActionsRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest instance - */ - ListZoneActionsRequest.create = function create(properties) { - return new ListZoneActionsRequest(properties); - }; - - /** - * Encodes the specified ListZoneActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest - * @static - * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} message ListZoneActionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListZoneActionsRequest.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); - return writer; - }; - - /** - * Encodes the specified ListZoneActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListZoneActionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest - * @static - * @param {google.cloud.dataplex.v1.IListZoneActionsRequest} message ListZoneActionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListZoneActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListZoneActionsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListZoneActionsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListZoneActionsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListZoneActionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListZoneActionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListZoneActionsRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListZoneActionsRequest.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"; - return null; - }; - - /** - * Creates a ListZoneActionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListZoneActionsRequest} ListZoneActionsRequest - */ - ListZoneActionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListZoneActionsRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.ListZoneActionsRequest(); - 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); - return message; - }; + Job.prototype.startTime = null; /** - * Creates a plain object from a ListZoneActionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest - * @static - * @param {google.cloud.dataplex.v1.ListZoneActionsRequest} message ListZoneActionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Job endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.dataplex.v1.Job + * @instance */ - ListZoneActionsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - 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; - return object; - }; + Job.prototype.endTime = null; /** - * Converts this ListZoneActionsRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest + * Job state. + * @member {google.cloud.dataplex.v1.Job.State} state + * @memberof google.cloud.dataplex.v1.Job * @instance - * @returns {Object.} JSON object */ - ListZoneActionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Job.prototype.state = 0; /** - * Gets the default type url for ListZoneActionsRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListZoneActionsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Job retryCount. + * @member {number} retryCount + * @memberof google.cloud.dataplex.v1.Job + * @instance */ - ListZoneActionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListZoneActionsRequest"; - }; - - return ListZoneActionsRequest; - })(); - - v1.GetZoneRequest = (function() { + Job.prototype.retryCount = 0; /** - * Properties of a GetZoneRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IGetZoneRequest - * @property {string|null} [name] GetZoneRequest name + * Job service. + * @member {google.cloud.dataplex.v1.Job.Service} service + * @memberof google.cloud.dataplex.v1.Job + * @instance */ + Job.prototype.service = 0; /** - * Constructs a new GetZoneRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetZoneRequest. - * @implements IGetZoneRequest - * @constructor - * @param {google.cloud.dataplex.v1.IGetZoneRequest=} [properties] Properties to set + * Job serviceJob. + * @member {string} serviceJob + * @memberof google.cloud.dataplex.v1.Job + * @instance */ - function GetZoneRequest(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]]; - } + Job.prototype.serviceJob = ""; /** - * GetZoneRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GetZoneRequest + * Job message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.Job * @instance */ - GetZoneRequest.prototype.name = ""; + Job.prototype.message = ""; /** - * Creates a new GetZoneRequest instance using the specified properties. + * Creates a new Job instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @memberof google.cloud.dataplex.v1.Job * @static - * @param {google.cloud.dataplex.v1.IGetZoneRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest instance + * @param {google.cloud.dataplex.v1.IJob=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Job} Job instance */ - GetZoneRequest.create = function create(properties) { - return new GetZoneRequest(properties); + Job.create = function create(properties) { + return new Job(properties); }; /** - * Encodes the specified GetZoneRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. + * Encodes the specified Job message. Does not implicitly {@link google.cloud.dataplex.v1.Job.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @memberof google.cloud.dataplex.v1.Job * @static - * @param {google.cloud.dataplex.v1.IGetZoneRequest} message GetZoneRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IJob} message Job message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetZoneRequest.encode = function encode(message, writer) { + Job.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.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.retryCount != null && Object.hasOwnProperty.call(message, "retryCount")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.retryCount); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.service); + if (message.serviceJob != null && Object.hasOwnProperty.call(message, "serviceJob")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.serviceJob); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.message); return writer; }; /** - * Encodes the specified GetZoneRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetZoneRequest.verify|verify} messages. + * Encodes the specified Job message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Job.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @memberof google.cloud.dataplex.v1.Job * @static - * @param {google.cloud.dataplex.v1.IGetZoneRequest} message GetZoneRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IJob} message Job message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetZoneRequest.encodeDelimited = function encodeDelimited(message, writer) { + Job.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetZoneRequest message from the specified reader or buffer. + * Decodes a Job message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @memberof google.cloud.dataplex.v1.Job * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest + * @returns {google.cloud.dataplex.v1.Job} Job * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetZoneRequest.decode = function decode(reader, length) { + Job.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetZoneRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Job(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -41902,6 +41800,38 @@ message.name = reader.string(); break; } + case 2: { + message.uid = reader.string(); + break; + } + case 3: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.state = reader.int32(); + break; + } + case 6: { + message.retryCount = reader.uint32(); + break; + } + case 7: { + message.service = reader.int32(); + break; + } + case 8: { + message.serviceJob = reader.string(); + break; + } + case 9: { + message.message = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -41911,125 +41841,307 @@ }; /** - * Decodes a GetZoneRequest message from the specified reader or buffer, length delimited. + * Decodes a Job message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @memberof google.cloud.dataplex.v1.Job * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest + * @returns {google.cloud.dataplex.v1.Job} Job * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetZoneRequest.decodeDelimited = function decodeDelimited(reader) { + Job.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetZoneRequest message. + * Verifies a Job message. * @function verify - * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @memberof google.cloud.dataplex.v1.Job * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetZoneRequest.verify = function verify(message) { + Job.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.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.retryCount != null && message.hasOwnProperty("retryCount")) + if (!$util.isInteger(message.retryCount)) + return "retryCount: integer expected"; + if (message.service != null && message.hasOwnProperty("service")) + switch (message.service) { + default: + return "service: enum value expected"; + case 0: + case 1: + break; + } + if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) + if (!$util.isString(message.serviceJob)) + return "serviceJob: string expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; return null; }; /** - * Creates a GetZoneRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Job message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @memberof google.cloud.dataplex.v1.Job * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetZoneRequest} GetZoneRequest + * @returns {google.cloud.dataplex.v1.Job} Job */ - GetZoneRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetZoneRequest) + Job.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Job) return object; - var message = new $root.google.cloud.dataplex.v1.GetZoneRequest(); + var message = new $root.google.cloud.dataplex.v1.Job(); if (object.name != null) message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Job.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.Job.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "RUNNING": + case 1: + message.state = 1; + break; + case "CANCELLING": + case 2: + message.state = 2; + break; + case "CANCELLED": + case 3: + message.state = 3; + break; + case "SUCCEEDED": + case 4: + message.state = 4; + break; + case "FAILED": + case 5: + message.state = 5; + break; + case "ABORTED": + case 6: + message.state = 6; + break; + } + if (object.retryCount != null) + message.retryCount = object.retryCount >>> 0; + switch (object.service) { + default: + if (typeof object.service === "number") { + message.service = object.service; + break; + } + break; + case "SERVICE_UNSPECIFIED": + case 0: + message.service = 0; + break; + case "DATAPROC": + case 1: + message.service = 1; + break; + } + if (object.serviceJob != null) + message.serviceJob = String(object.serviceJob); + if (object.message != null) + message.message = String(object.message); return message; }; /** - * Creates a plain object from a GetZoneRequest message. Also converts values to other types if specified. + * Creates a plain object from a Job message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @memberof google.cloud.dataplex.v1.Job * @static - * @param {google.cloud.dataplex.v1.GetZoneRequest} message GetZoneRequest + * @param {google.cloud.dataplex.v1.Job} message Job * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetZoneRequest.toObject = function toObject(message, options) { + Job.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.name = ""; + object.uid = ""; + object.startTime = null; + object.endTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.retryCount = 0; + object.service = options.enums === String ? "SERVICE_UNSPECIFIED" : 0; + object.serviceJob = ""; + object.message = ""; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Job.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.Job.State[message.state] : message.state; + if (message.retryCount != null && message.hasOwnProperty("retryCount")) + object.retryCount = message.retryCount; + if (message.service != null && message.hasOwnProperty("service")) + object.service = options.enums === String ? $root.google.cloud.dataplex.v1.Job.Service[message.service] === undefined ? message.service : $root.google.cloud.dataplex.v1.Job.Service[message.service] : message.service; + if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) + object.serviceJob = message.serviceJob; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; return object; }; /** - * Converts this GetZoneRequest to JSON. + * Converts this Job to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @memberof google.cloud.dataplex.v1.Job * @instance * @returns {Object.} JSON object */ - GetZoneRequest.prototype.toJSON = function toJSON() { + Job.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetZoneRequest + * Gets the default type url for Job * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GetZoneRequest + * @memberof google.cloud.dataplex.v1.Job * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetZoneRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Job.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GetZoneRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.Job"; }; - return GetZoneRequest; + /** + * Service enum. + * @name google.cloud.dataplex.v1.Job.Service + * @enum {number} + * @property {number} SERVICE_UNSPECIFIED=0 SERVICE_UNSPECIFIED value + * @property {number} DATAPROC=1 DATAPROC value + */ + Job.Service = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SERVICE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DATAPROC"] = 1; + return values; + })(); + + /** + * State enum. + * @name google.cloud.dataplex.v1.Job.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} RUNNING=1 RUNNING value + * @property {number} CANCELLING=2 CANCELLING value + * @property {number} CANCELLED=3 CANCELLED value + * @property {number} SUCCEEDED=4 SUCCEEDED value + * @property {number} FAILED=5 FAILED value + * @property {number} ABORTED=6 ABORTED value + */ + Job.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "CANCELLING"] = 2; + values[valuesById[3] = "CANCELLED"] = 3; + values[valuesById[4] = "SUCCEEDED"] = 4; + values[valuesById[5] = "FAILED"] = 5; + values[valuesById[6] = "ABORTED"] = 6; + return values; + })(); + + return Job; })(); - v1.CreateAssetRequest = (function() { + v1.DiscoveryEvent = (function() { /** - * Properties of a CreateAssetRequest. + * Properties of a DiscoveryEvent. * @memberof google.cloud.dataplex.v1 - * @interface ICreateAssetRequest - * @property {string|null} [parent] CreateAssetRequest parent - * @property {string|null} [assetId] CreateAssetRequest assetId - * @property {google.cloud.dataplex.v1.IAsset|null} [asset] CreateAssetRequest asset - * @property {boolean|null} [validateOnly] CreateAssetRequest validateOnly + * @interface IDiscoveryEvent + * @property {string|null} [message] DiscoveryEvent message + * @property {string|null} [lakeId] DiscoveryEvent lakeId + * @property {string|null} [zoneId] DiscoveryEvent zoneId + * @property {string|null} [assetId] DiscoveryEvent assetId + * @property {string|null} [dataLocation] DiscoveryEvent dataLocation + * @property {google.cloud.dataplex.v1.DiscoveryEvent.EventType|null} [type] DiscoveryEvent type + * @property {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null} [config] DiscoveryEvent config + * @property {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null} [entity] DiscoveryEvent entity + * @property {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null} [partition] DiscoveryEvent partition + * @property {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null} [action] DiscoveryEvent action */ /** - * Constructs a new CreateAssetRequest. + * Constructs a new DiscoveryEvent. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CreateAssetRequest. - * @implements ICreateAssetRequest + * @classdesc Represents a DiscoveryEvent. + * @implements IDiscoveryEvent * @constructor - * @param {google.cloud.dataplex.v1.ICreateAssetRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IDiscoveryEvent=} [properties] Properties to set */ - function CreateAssetRequest(properties) { + function DiscoveryEvent(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42037,117 +42149,215 @@ } /** - * CreateAssetRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * DiscoveryEvent message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.DiscoveryEvent * @instance */ - CreateAssetRequest.prototype.parent = ""; + DiscoveryEvent.prototype.message = ""; /** - * CreateAssetRequest assetId. + * DiscoveryEvent lakeId. + * @member {string} lakeId + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.lakeId = ""; + + /** + * DiscoveryEvent zoneId. + * @member {string} zoneId + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.zoneId = ""; + + /** + * DiscoveryEvent assetId. * @member {string} assetId - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @memberof google.cloud.dataplex.v1.DiscoveryEvent * @instance */ - CreateAssetRequest.prototype.assetId = ""; + DiscoveryEvent.prototype.assetId = ""; /** - * CreateAssetRequest asset. - * @member {google.cloud.dataplex.v1.IAsset|null|undefined} asset - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * DiscoveryEvent dataLocation. + * @member {string} dataLocation + * @memberof google.cloud.dataplex.v1.DiscoveryEvent * @instance */ - CreateAssetRequest.prototype.asset = null; + DiscoveryEvent.prototype.dataLocation = ""; /** - * CreateAssetRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * DiscoveryEvent type. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.EventType} type + * @memberof google.cloud.dataplex.v1.DiscoveryEvent * @instance */ - CreateAssetRequest.prototype.validateOnly = false; + DiscoveryEvent.prototype.type = 0; /** - * Creates a new CreateAssetRequest instance using the specified properties. + * DiscoveryEvent config. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails|null|undefined} config + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.config = null; + + /** + * DiscoveryEvent entity. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails|null|undefined} entity + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.entity = null; + + /** + * DiscoveryEvent partition. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails|null|undefined} partition + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.partition = null; + + /** + * DiscoveryEvent action. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails|null|undefined} action + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + DiscoveryEvent.prototype.action = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DiscoveryEvent details. + * @member {"config"|"entity"|"partition"|"action"|undefined} details + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @instance + */ + Object.defineProperty(DiscoveryEvent.prototype, "details", { + get: $util.oneOfGetter($oneOfFields = ["config", "entity", "partition", "action"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DiscoveryEvent instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @memberof google.cloud.dataplex.v1.DiscoveryEvent * @static - * @param {google.cloud.dataplex.v1.ICreateAssetRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest instance + * @param {google.cloud.dataplex.v1.IDiscoveryEvent=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent instance */ - CreateAssetRequest.create = function create(properties) { - return new CreateAssetRequest(properties); + DiscoveryEvent.create = function create(properties) { + return new DiscoveryEvent(properties); }; /** - * Encodes the specified CreateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. + * Encodes the specified DiscoveryEvent message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @memberof google.cloud.dataplex.v1.DiscoveryEvent * @static - * @param {google.cloud.dataplex.v1.ICreateAssetRequest} message CreateAssetRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IDiscoveryEvent} message DiscoveryEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateAssetRequest.encode = function encode(message, writer) { + DiscoveryEvent.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.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.lakeId != null && Object.hasOwnProperty.call(message, "lakeId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.lakeId); + if (message.zoneId != null && Object.hasOwnProperty.call(message, "zoneId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.zoneId); if (message.assetId != null && Object.hasOwnProperty.call(message, "assetId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.assetId); - if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) - $root.google.cloud.dataplex.v1.Asset.encode(message.asset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.assetId); + if (message.dataLocation != null && Object.hasOwnProperty.call(message, "dataLocation")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.dataLocation); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.type); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.encode(message.config, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) + $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.encode(message.entity, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) + $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.encode(message.partition, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.encode(message.action, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateAssetRequest.verify|verify} messages. + * Encodes the specified DiscoveryEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @memberof google.cloud.dataplex.v1.DiscoveryEvent * @static - * @param {google.cloud.dataplex.v1.ICreateAssetRequest} message CreateAssetRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IDiscoveryEvent} message DiscoveryEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { + DiscoveryEvent.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateAssetRequest message from the specified reader or buffer. + * Decodes a DiscoveryEvent message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @memberof google.cloud.dataplex.v1.DiscoveryEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest + * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateAssetRequest.decode = function decode(reader, length) { + DiscoveryEvent.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateAssetRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.message = reader.string(); break; } case 2: { - message.assetId = reader.string(); + message.lakeId = reader.string(); break; } case 3: { - message.asset = $root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32()); + message.zoneId = reader.string(); break; } case 4: { - message.validateOnly = reader.bool(); + message.assetId = reader.string(); + break; + } + case 5: { + message.dataLocation = reader.string(); + break; + } + case 10: { + message.type = reader.int32(); + break; + } + case 20: { + message.config = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.decode(reader, reader.uint32()); + break; + } + case 21: { + message.entity = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.decode(reader, reader.uint32()); + break; + } + case 22: { + message.partition = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.decode(reader, reader.uint32()); + break; + } + case 23: { + message.action = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.decode(reader, reader.uint32()); break; } default: @@ -42159,1161 +42369,1347 @@ }; /** - * Decodes a CreateAssetRequest message from the specified reader or buffer, length delimited. + * Decodes a DiscoveryEvent message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @memberof google.cloud.dataplex.v1.DiscoveryEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest + * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateAssetRequest.decodeDelimited = function decodeDelimited(reader) { + DiscoveryEvent.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateAssetRequest message. + * Verifies a DiscoveryEvent message. * @function verify - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @memberof google.cloud.dataplex.v1.DiscoveryEvent * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateAssetRequest.verify = function verify(message) { + DiscoveryEvent.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"; + var properties = {}; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.lakeId != null && message.hasOwnProperty("lakeId")) + if (!$util.isString(message.lakeId)) + return "lakeId: string expected"; + if (message.zoneId != null && message.hasOwnProperty("zoneId")) + if (!$util.isString(message.zoneId)) + return "zoneId: string expected"; if (message.assetId != null && message.hasOwnProperty("assetId")) if (!$util.isString(message.assetId)) return "assetId: string expected"; - if (message.asset != null && message.hasOwnProperty("asset")) { - var error = $root.google.cloud.dataplex.v1.Asset.verify(message.asset); - if (error) - return "asset." + error; + if (message.dataLocation != null && message.hasOwnProperty("dataLocation")) + if (!$util.isString(message.dataLocation)) + return "dataLocation: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.config != null && message.hasOwnProperty("config")) { + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify(message.config); + if (error) + return "config." + error; + } + } + if (message.entity != null && message.hasOwnProperty("entity")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify(message.entity); + if (error) + return "entity." + error; + } + } + if (message.partition != null && message.hasOwnProperty("partition")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify(message.partition); + if (error) + return "partition." + error; + } + } + if (message.action != null && message.hasOwnProperty("action")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify(message.action); + if (error) + return "action." + error; + } } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; return null; }; /** - * Creates a CreateAssetRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DiscoveryEvent message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @memberof google.cloud.dataplex.v1.DiscoveryEvent * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CreateAssetRequest} CreateAssetRequest + * @returns {google.cloud.dataplex.v1.DiscoveryEvent} DiscoveryEvent */ - CreateAssetRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CreateAssetRequest) + DiscoveryEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent) return object; - var message = new $root.google.cloud.dataplex.v1.CreateAssetRequest(); - if (object.parent != null) - message.parent = String(object.parent); + var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent(); + if (object.message != null) + message.message = String(object.message); + if (object.lakeId != null) + message.lakeId = String(object.lakeId); + if (object.zoneId != null) + message.zoneId = String(object.zoneId); if (object.assetId != null) message.assetId = String(object.assetId); - if (object.asset != null) { - if (typeof object.asset !== "object") - throw TypeError(".google.cloud.dataplex.v1.CreateAssetRequest.asset: object expected"); - message.asset = $root.google.cloud.dataplex.v1.Asset.fromObject(object.asset); + if (object.dataLocation != null) + message.dataLocation = String(object.dataLocation); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "EVENT_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "CONFIG": + case 1: + message.type = 1; + break; + case "ENTITY_CREATED": + case 2: + message.type = 2; + break; + case "ENTITY_UPDATED": + case 3: + message.type = 3; + break; + case "ENTITY_DELETED": + case 4: + message.type = 4; + break; + case "PARTITION_CREATED": + case 5: + message.type = 5; + break; + case "PARTITION_UPDATED": + case 6: + message.type = 6; + break; + case "PARTITION_DELETED": + case 7: + message.type = 7; + break; + } + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.config: object expected"); + message.config = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.fromObject(object.config); + } + if (object.entity != null) { + if (typeof object.entity !== "object") + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.entity: object expected"); + message.entity = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.fromObject(object.entity); + } + if (object.partition != null) { + if (typeof object.partition !== "object") + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.partition: object expected"); + message.partition = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.fromObject(object.partition); + } + if (object.action != null) { + if (typeof object.action !== "object") + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.action: object expected"); + message.action = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.fromObject(object.action); } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a CreateAssetRequest message. Also converts values to other types if specified. + * Creates a plain object from a DiscoveryEvent message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @memberof google.cloud.dataplex.v1.DiscoveryEvent * @static - * @param {google.cloud.dataplex.v1.CreateAssetRequest} message CreateAssetRequest + * @param {google.cloud.dataplex.v1.DiscoveryEvent} message DiscoveryEvent * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateAssetRequest.toObject = function toObject(message, options) { + DiscoveryEvent.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; + object.message = ""; + object.lakeId = ""; + object.zoneId = ""; object.assetId = ""; - object.asset = null; - object.validateOnly = false; + object.dataLocation = ""; + object.type = options.enums === String ? "EVENT_TYPE_UNSPECIFIED" : 0; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.lakeId != null && message.hasOwnProperty("lakeId")) + object.lakeId = message.lakeId; + if (message.zoneId != null && message.hasOwnProperty("zoneId")) + object.zoneId = message.zoneId; if (message.assetId != null && message.hasOwnProperty("assetId")) object.assetId = message.assetId; - if (message.asset != null && message.hasOwnProperty("asset")) - object.asset = $root.google.cloud.dataplex.v1.Asset.toObject(message.asset, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; + if (message.dataLocation != null && message.hasOwnProperty("dataLocation")) + object.dataLocation = message.dataLocation; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.EventType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.DiscoveryEvent.EventType[message.type] : message.type; + if (message.config != null && message.hasOwnProperty("config")) { + object.config = $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.toObject(message.config, options); + if (options.oneofs) + object.details = "config"; + } + if (message.entity != null && message.hasOwnProperty("entity")) { + object.entity = $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.toObject(message.entity, options); + if (options.oneofs) + object.details = "entity"; + } + if (message.partition != null && message.hasOwnProperty("partition")) { + object.partition = $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.toObject(message.partition, options); + if (options.oneofs) + object.details = "partition"; + } + if (message.action != null && message.hasOwnProperty("action")) { + object.action = $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.toObject(message.action, options); + if (options.oneofs) + object.details = "action"; + } return object; }; /** - * Converts this CreateAssetRequest to JSON. + * Converts this DiscoveryEvent to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @memberof google.cloud.dataplex.v1.DiscoveryEvent * @instance * @returns {Object.} JSON object */ - CreateAssetRequest.prototype.toJSON = function toJSON() { + DiscoveryEvent.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateAssetRequest + * Gets the default type url for DiscoveryEvent * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.CreateAssetRequest + * @memberof google.cloud.dataplex.v1.DiscoveryEvent * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateAssetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DiscoveryEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateAssetRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent"; }; - return CreateAssetRequest; - })(); - - v1.UpdateAssetRequest = (function() { - /** - * Properties of an UpdateAssetRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IUpdateAssetRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAssetRequest updateMask - * @property {google.cloud.dataplex.v1.IAsset|null} [asset] UpdateAssetRequest asset - * @property {boolean|null} [validateOnly] UpdateAssetRequest validateOnly + * EventType enum. + * @name google.cloud.dataplex.v1.DiscoveryEvent.EventType + * @enum {number} + * @property {number} EVENT_TYPE_UNSPECIFIED=0 EVENT_TYPE_UNSPECIFIED value + * @property {number} CONFIG=1 CONFIG value + * @property {number} ENTITY_CREATED=2 ENTITY_CREATED value + * @property {number} ENTITY_UPDATED=3 ENTITY_UPDATED value + * @property {number} ENTITY_DELETED=4 ENTITY_DELETED value + * @property {number} PARTITION_CREATED=5 PARTITION_CREATED value + * @property {number} PARTITION_UPDATED=6 PARTITION_UPDATED value + * @property {number} PARTITION_DELETED=7 PARTITION_DELETED value */ + DiscoveryEvent.EventType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EVENT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONFIG"] = 1; + values[valuesById[2] = "ENTITY_CREATED"] = 2; + values[valuesById[3] = "ENTITY_UPDATED"] = 3; + values[valuesById[4] = "ENTITY_DELETED"] = 4; + values[valuesById[5] = "PARTITION_CREATED"] = 5; + values[valuesById[6] = "PARTITION_UPDATED"] = 6; + values[valuesById[7] = "PARTITION_DELETED"] = 7; + return values; + })(); /** - * Constructs a new UpdateAssetRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an UpdateAssetRequest. - * @implements IUpdateAssetRequest - * @constructor - * @param {google.cloud.dataplex.v1.IUpdateAssetRequest=} [properties] Properties to set + * EntityType enum. + * @name google.cloud.dataplex.v1.DiscoveryEvent.EntityType + * @enum {number} + * @property {number} ENTITY_TYPE_UNSPECIFIED=0 ENTITY_TYPE_UNSPECIFIED value + * @property {number} TABLE=1 TABLE value + * @property {number} FILESET=2 FILESET value */ - function UpdateAssetRequest(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]]; - } + DiscoveryEvent.EntityType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENTITY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TABLE"] = 1; + values[valuesById[2] = "FILESET"] = 2; + return values; + })(); - /** - * UpdateAssetRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest - * @instance - */ - UpdateAssetRequest.prototype.updateMask = null; + DiscoveryEvent.ConfigDetails = (function() { - /** - * UpdateAssetRequest asset. - * @member {google.cloud.dataplex.v1.IAsset|null|undefined} asset - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest - * @instance - */ - UpdateAssetRequest.prototype.asset = null; + /** + * Properties of a ConfigDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @interface IConfigDetails + * @property {Object.|null} [parameters] ConfigDetails parameters + */ - /** - * UpdateAssetRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest - * @instance - */ - UpdateAssetRequest.prototype.validateOnly = false; + /** + * Constructs a new ConfigDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @classdesc Represents a ConfigDetails. + * @implements IConfigDetails + * @constructor + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails=} [properties] Properties to set + */ + function ConfigDetails(properties) { + this.parameters = {}; + 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]]; + } - /** - * Creates a new UpdateAssetRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateAssetRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest instance - */ - UpdateAssetRequest.create = function create(properties) { - return new UpdateAssetRequest(properties); - }; + /** + * ConfigDetails parameters. + * @member {Object.} parameters + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @instance + */ + ConfigDetails.prototype.parameters = $util.emptyObject; - /** - * Encodes the specified UpdateAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} message UpdateAssetRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateAssetRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) - $root.google.cloud.dataplex.v1.Asset.encode(message.asset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); - return writer; - }; + /** + * Creates a new ConfigDetails instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails instance + */ + ConfigDetails.create = function create(properties) { + return new ConfigDetails(properties); + }; - /** - * Encodes the specified UpdateAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateAssetRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateAssetRequest} message UpdateAssetRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ConfigDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails} message ConfigDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfigDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) + for (var keys = Object.keys(message.parameters), 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.parameters[keys[i]]).ldelim(); + return writer; + }; - /** - * Decodes an UpdateAssetRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateAssetRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateAssetRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.asset = $root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32()); - break; - } - case 3: { - message.validateOnly = reader.bool(); + /** + * Encodes the specified ConfigDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IConfigDetails} message ConfigDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfigDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConfigDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfigDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (message.parameters === $util.emptyObject) + message.parameters = {}; + 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.parameters[key] = value; + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes an UpdateAssetRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateAssetRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a ConfigDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfigDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an UpdateAssetRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateAssetRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.asset != null && message.hasOwnProperty("asset")) { - var error = $root.google.cloud.dataplex.v1.Asset.verify(message.asset); - if (error) - return "asset." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; + /** + * Verifies a ConfigDetails message. + * @function verify + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConfigDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parameters != null && message.hasOwnProperty("parameters")) { + if (!$util.isObject(message.parameters)) + return "parameters: object expected"; + var key = Object.keys(message.parameters); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.parameters[key[i]])) + return "parameters: string{k:string} expected"; + } + return null; + }; - /** - * Creates an UpdateAssetRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.UpdateAssetRequest} UpdateAssetRequest - */ - UpdateAssetRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.UpdateAssetRequest) + /** + * Creates a ConfigDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} ConfigDetails + */ + ConfigDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails) + return object; + var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails(); + if (object.parameters) { + if (typeof object.parameters !== "object") + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails.parameters: object expected"); + message.parameters = {}; + for (var keys = Object.keys(object.parameters), i = 0; i < keys.length; ++i) + message.parameters[keys[i]] = String(object.parameters[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a ConfigDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails} message ConfigDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConfigDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.parameters = {}; + var keys2; + if (message.parameters && (keys2 = Object.keys(message.parameters)).length) { + object.parameters = {}; + for (var j = 0; j < keys2.length; ++j) + object.parameters[keys2[j]] = message.parameters[keys2[j]]; + } return object; - var message = new $root.google.cloud.dataplex.v1.UpdateAssetRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateAssetRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.asset != null) { - if (typeof object.asset !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateAssetRequest.asset: object expected"); - message.asset = $root.google.cloud.dataplex.v1.Asset.fromObject(object.asset); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; + }; - /** - * Creates a plain object from an UpdateAssetRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest - * @static - * @param {google.cloud.dataplex.v1.UpdateAssetRequest} message UpdateAssetRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateAssetRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.asset = null; - object.validateOnly = false; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.asset != null && message.hasOwnProperty("asset")) - object.asset = $root.google.cloud.dataplex.v1.Asset.toObject(message.asset, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; + /** + * Converts this ConfigDetails to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @instance + * @returns {Object.} JSON object + */ + ConfigDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this UpdateAssetRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateAssetRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for ConfigDetails + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConfigDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails"; + }; - /** - * Gets the default type url for UpdateAssetRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.UpdateAssetRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateAssetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + return ConfigDetails; + })(); + + DiscoveryEvent.EntityDetails = (function() { + + /** + * Properties of an EntityDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @interface IEntityDetails + * @property {string|null} [entity] EntityDetails entity + * @property {google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null} [type] EntityDetails type + */ + + /** + * Constructs a new EntityDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @classdesc Represents an EntityDetails. + * @implements IEntityDetails + * @constructor + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails=} [properties] Properties to set + */ + function EntityDetails(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]]; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateAssetRequest"; - }; - return UpdateAssetRequest; - })(); + /** + * EntityDetails entity. + * @member {string} entity + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @instance + */ + EntityDetails.prototype.entity = ""; - v1.DeleteAssetRequest = (function() { + /** + * EntityDetails type. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.EntityType} type + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @instance + */ + EntityDetails.prototype.type = 0; - /** - * Properties of a DeleteAssetRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IDeleteAssetRequest - * @property {string|null} [name] DeleteAssetRequest name - */ + /** + * Creates a new EntityDetails instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails instance + */ + EntityDetails.create = function create(properties) { + return new EntityDetails(properties); + }; - /** - * Constructs a new DeleteAssetRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DeleteAssetRequest. - * @implements IDeleteAssetRequest - * @constructor - * @param {google.cloud.dataplex.v1.IDeleteAssetRequest=} [properties] Properties to set - */ - function DeleteAssetRequest(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]]; - } + /** + * Encodes the specified EntityDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails} message EntityDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.entity); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + return writer; + }; - /** - * DeleteAssetRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest - * @instance - */ - DeleteAssetRequest.prototype.name = ""; + /** + * Encodes the specified EntityDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IEntityDetails} message EntityDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a new DeleteAssetRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteAssetRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest instance - */ - DeleteAssetRequest.create = function create(properties) { - return new DeleteAssetRequest(properties); - }; + /** + * Decodes an EntityDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.entity = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified DeleteAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} message DeleteAssetRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteAssetRequest.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; - }; + /** + * Decodes an EntityDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified DeleteAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteAssetRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest - * @static - * @param {google.cloud.dataplex.v1.IDeleteAssetRequest} message DeleteAssetRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Verifies an EntityDetails message. + * @function verify + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EntityDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entity != null && message.hasOwnProperty("entity")) + if (!$util.isString(message.entity)) + return "entity: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; - /** - * Decodes a DeleteAssetRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteAssetRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteAssetRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); + /** + * Creates an EntityDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} EntityDetails + */ + EntityDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails) + return object; + var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails(); + if (object.entity != null) + message.entity = String(object.entity); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; break; } - default: - reader.skipType(tag & 7); + break; + case "ENTITY_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TABLE": + case 1: + message.type = 1; + break; + case "FILESET": + case 2: + message.type = 2; break; } - } - return message; - }; - - /** - * Decodes a DeleteAssetRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteAssetRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteAssetRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteAssetRequest.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; - }; + return message; + }; - /** - * Creates a DeleteAssetRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DeleteAssetRequest} DeleteAssetRequest - */ - DeleteAssetRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DeleteAssetRequest) + /** + * Creates a plain object from an EntityDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails} message EntityDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EntityDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.entity = ""; + object.type = options.enums === String ? "ENTITY_TYPE_UNSPECIFIED" : 0; + } + if (message.entity != null && message.hasOwnProperty("entity")) + object.entity = message.entity; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityType[message.type] : message.type; return object; - var message = new $root.google.cloud.dataplex.v1.DeleteAssetRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteAssetRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest - * @static - * @param {google.cloud.dataplex.v1.DeleteAssetRequest} message DeleteAssetRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteAssetRequest.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 DeleteAssetRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteAssetRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + }; - /** - * Gets the default type url for DeleteAssetRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DeleteAssetRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteAssetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteAssetRequest"; - }; + /** + * Converts this EntityDetails to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @instance + * @returns {Object.} JSON object + */ + EntityDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return DeleteAssetRequest; - })(); + /** + * Gets the default type url for EntityDetails + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EntityDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails"; + }; - v1.ListAssetsRequest = (function() { + return EntityDetails; + })(); - /** - * Properties of a ListAssetsRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IListAssetsRequest - * @property {string|null} [parent] ListAssetsRequest parent - * @property {number|null} [pageSize] ListAssetsRequest pageSize - * @property {string|null} [pageToken] ListAssetsRequest pageToken - * @property {string|null} [filter] ListAssetsRequest filter - * @property {string|null} [orderBy] ListAssetsRequest orderBy - */ + DiscoveryEvent.PartitionDetails = (function() { - /** - * Constructs a new ListAssetsRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListAssetsRequest. - * @implements IListAssetsRequest - * @constructor - * @param {google.cloud.dataplex.v1.IListAssetsRequest=} [properties] Properties to set - */ - function ListAssetsRequest(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]]; - } + /** + * Properties of a PartitionDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @interface IPartitionDetails + * @property {string|null} [partition] PartitionDetails partition + * @property {string|null} [entity] PartitionDetails entity + * @property {google.cloud.dataplex.v1.DiscoveryEvent.EntityType|null} [type] PartitionDetails type + * @property {Array.|null} [sampledDataLocations] PartitionDetails sampledDataLocations + */ - /** - * ListAssetsRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListAssetsRequest - * @instance - */ - ListAssetsRequest.prototype.parent = ""; + /** + * Constructs a new PartitionDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @classdesc Represents a PartitionDetails. + * @implements IPartitionDetails + * @constructor + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails=} [properties] Properties to set + */ + function PartitionDetails(properties) { + this.sampledDataLocations = []; + 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]]; + } - /** - * ListAssetsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListAssetsRequest - * @instance - */ - ListAssetsRequest.prototype.pageSize = 0; + /** + * PartitionDetails partition. + * @member {string} partition + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @instance + */ + PartitionDetails.prototype.partition = ""; - /** - * ListAssetsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListAssetsRequest - * @instance - */ - ListAssetsRequest.prototype.pageToken = ""; + /** + * PartitionDetails entity. + * @member {string} entity + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @instance + */ + PartitionDetails.prototype.entity = ""; - /** - * ListAssetsRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListAssetsRequest - * @instance - */ - ListAssetsRequest.prototype.filter = ""; + /** + * PartitionDetails type. + * @member {google.cloud.dataplex.v1.DiscoveryEvent.EntityType} type + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @instance + */ + PartitionDetails.prototype.type = 0; - /** - * ListAssetsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.dataplex.v1.ListAssetsRequest - * @instance - */ - ListAssetsRequest.prototype.orderBy = ""; + /** + * PartitionDetails sampledDataLocations. + * @member {Array.} sampledDataLocations + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @instance + */ + PartitionDetails.prototype.sampledDataLocations = $util.emptyArray; - /** - * Creates a new ListAssetsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListAssetsRequest - * @static - * @param {google.cloud.dataplex.v1.IListAssetsRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest instance - */ - ListAssetsRequest.create = function create(properties) { - return new ListAssetsRequest(properties); - }; + /** + * Creates a new PartitionDetails instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails instance + */ + PartitionDetails.create = function create(properties) { + return new PartitionDetails(properties); + }; - /** - * Encodes the specified ListAssetsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListAssetsRequest - * @static - * @param {google.cloud.dataplex.v1.IListAssetsRequest} message ListAssetsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAssetsRequest.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.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; + /** + * Encodes the specified PartitionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails} message PartitionDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartitionDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.partition); + if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.entity); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); + if (message.sampledDataLocations != null && message.sampledDataLocations.length) + for (var i = 0; i < message.sampledDataLocations.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.sampledDataLocations[i]); + return writer; + }; - /** - * Encodes the specified ListAssetsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListAssetsRequest - * @static - * @param {google.cloud.dataplex.v1.IListAssetsRequest} message ListAssetsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAssetsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified PartitionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IPartitionDetails} message PartitionDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartitionDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ListAssetsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListAssetsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAssetsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListAssetsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); + /** + * Decodes a PartitionDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartitionDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.partition = reader.string(); + break; + } + case 2: { + message.entity = reader.string(); + break; + } + case 3: { + message.type = reader.int32(); + break; + } + case 4: { + if (!(message.sampledDataLocations && message.sampledDataLocations.length)) + message.sampledDataLocations = []; + message.sampledDataLocations.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); break; } - case 4: { - message.filter = reader.string(); + } + return message; + }; + + /** + * Decodes a PartitionDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartitionDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PartitionDetails message. + * @function verify + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PartitionDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.partition != null && message.hasOwnProperty("partition")) + if (!$util.isString(message.partition)) + return "partition: string expected"; + if (message.entity != null && message.hasOwnProperty("entity")) + if (!$util.isString(message.entity)) + return "entity: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: break; } - case 5: { - message.orderBy = reader.string(); + if (message.sampledDataLocations != null && message.hasOwnProperty("sampledDataLocations")) { + if (!Array.isArray(message.sampledDataLocations)) + return "sampledDataLocations: array expected"; + for (var i = 0; i < message.sampledDataLocations.length; ++i) + if (!$util.isString(message.sampledDataLocations[i])) + return "sampledDataLocations: string[] expected"; + } + return null; + }; + + /** + * Creates a PartitionDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} PartitionDetails + */ + PartitionDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails) + return object; + var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails(); + if (object.partition != null) + message.partition = String(object.partition); + if (object.entity != null) + message.entity = String(object.entity); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; break; } - default: - reader.skipType(tag & 7); + break; + case "ENTITY_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "TABLE": + case 1: + message.type = 1; + break; + case "FILESET": + case 2: + message.type = 2; break; } - } - return message; - }; - - /** - * Decodes a ListAssetsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListAssetsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAssetsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListAssetsRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListAssetsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListAssetsRequest.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.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; + if (object.sampledDataLocations) { + if (!Array.isArray(object.sampledDataLocations)) + throw TypeError(".google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails.sampledDataLocations: array expected"); + message.sampledDataLocations = []; + for (var i = 0; i < object.sampledDataLocations.length; ++i) + message.sampledDataLocations[i] = String(object.sampledDataLocations[i]); + } + return message; + }; - /** - * Creates a ListAssetsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListAssetsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListAssetsRequest} ListAssetsRequest - */ - ListAssetsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListAssetsRequest) + /** + * Creates a plain object from a PartitionDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails} message PartitionDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PartitionDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.sampledDataLocations = []; + if (options.defaults) { + object.partition = ""; + object.entity = ""; + object.type = options.enums === String ? "ENTITY_TYPE_UNSPECIFIED" : 0; + } + if (message.partition != null && message.hasOwnProperty("partition")) + object.partition = message.partition; + if (message.entity != null && message.hasOwnProperty("entity")) + object.entity = message.entity; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.DiscoveryEvent.EntityType[message.type] : message.type; + if (message.sampledDataLocations && message.sampledDataLocations.length) { + object.sampledDataLocations = []; + for (var j = 0; j < message.sampledDataLocations.length; ++j) + object.sampledDataLocations[j] = message.sampledDataLocations[j]; + } return object; - var message = new $root.google.cloud.dataplex.v1.ListAssetsRequest(); - 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.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; - - /** - * Creates a plain object from a ListAssetsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListAssetsRequest - * @static - * @param {google.cloud.dataplex.v1.ListAssetsRequest} message ListAssetsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListAssetsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - 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.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; - - /** - * Converts this ListAssetsRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListAssetsRequest - * @instance - * @returns {Object.} JSON object - */ - ListAssetsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + }; - /** - * Gets the default type url for ListAssetsRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListAssetsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListAssetsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListAssetsRequest"; - }; + /** + * Converts this PartitionDetails to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @instance + * @returns {Object.} JSON object + */ + PartitionDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ListAssetsRequest; - })(); + /** + * Gets the default type url for PartitionDetails + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PartitionDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails"; + }; - v1.ListAssetsResponse = (function() { + return PartitionDetails; + })(); - /** - * Properties of a ListAssetsResponse. - * @memberof google.cloud.dataplex.v1 - * @interface IListAssetsResponse - * @property {Array.|null} [assets] ListAssetsResponse assets - * @property {string|null} [nextPageToken] ListAssetsResponse nextPageToken - */ + DiscoveryEvent.ActionDetails = (function() { - /** - * Constructs a new ListAssetsResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListAssetsResponse. - * @implements IListAssetsResponse - * @constructor - * @param {google.cloud.dataplex.v1.IListAssetsResponse=} [properties] Properties to set - */ - function ListAssetsResponse(properties) { - this.assets = []; - 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]]; - } + /** + * Properties of an ActionDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @interface IActionDetails + * @property {string|null} [type] ActionDetails type + */ - /** - * ListAssetsResponse assets. - * @member {Array.} assets - * @memberof google.cloud.dataplex.v1.ListAssetsResponse - * @instance - */ - ListAssetsResponse.prototype.assets = $util.emptyArray; + /** + * Constructs a new ActionDetails. + * @memberof google.cloud.dataplex.v1.DiscoveryEvent + * @classdesc Represents an ActionDetails. + * @implements IActionDetails + * @constructor + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails=} [properties] Properties to set + */ + function ActionDetails(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]]; + } - /** - * ListAssetsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListAssetsResponse - * @instance - */ - ListAssetsResponse.prototype.nextPageToken = ""; + /** + * ActionDetails type. + * @member {string} type + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @instance + */ + ActionDetails.prototype.type = ""; - /** - * Creates a new ListAssetsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListAssetsResponse - * @static - * @param {google.cloud.dataplex.v1.IListAssetsResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse instance - */ - ListAssetsResponse.create = function create(properties) { - return new ListAssetsResponse(properties); - }; + /** + * Creates a new ActionDetails instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails instance + */ + ActionDetails.create = function create(properties) { + return new ActionDetails(properties); + }; - /** - * Encodes the specified ListAssetsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListAssetsResponse - * @static - * @param {google.cloud.dataplex.v1.IListAssetsResponse} message ListAssetsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAssetsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.assets != null && message.assets.length) - for (var i = 0; i < message.assets.length; ++i) - $root.google.cloud.dataplex.v1.Asset.encode(message.assets[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 ActionDetails message. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails} message ActionDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActionDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + return writer; + }; - /** - * Encodes the specified ListAssetsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListAssetsResponse - * @static - * @param {google.cloud.dataplex.v1.IListAssetsResponse} message ListAssetsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAssetsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ActionDetails message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.IActionDetails} message ActionDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActionDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ListAssetsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListAssetsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAssetsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListAssetsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.assets && message.assets.length)) - message.assets = []; - message.assets.push($root.google.cloud.dataplex.v1.Asset.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); + /** + * Decodes an ActionDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActionDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a ListAssetsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListAssetsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAssetsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an ActionDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActionDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a ListAssetsResponse message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListAssetsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListAssetsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.assets != null && message.hasOwnProperty("assets")) { - if (!Array.isArray(message.assets)) - return "assets: array expected"; - for (var i = 0; i < message.assets.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Asset.verify(message.assets[i]); - if (error) - return "assets." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + /** + * Verifies an ActionDetails message. + * @function verify + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ActionDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + return null; + }; + + /** + * Creates an ActionDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} ActionDetails + */ + ActionDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails) + return object; + var message = new $root.google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails(); + if (object.type != null) + message.type = String(object.type); + return message; + }; - /** - * Creates a ListAssetsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListAssetsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListAssetsResponse} ListAssetsResponse - */ - ListAssetsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListAssetsResponse) + /** + * Creates a plain object from an ActionDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails} message ActionDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ActionDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.type = ""; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; return object; - var message = new $root.google.cloud.dataplex.v1.ListAssetsResponse(); - if (object.assets) { - if (!Array.isArray(object.assets)) - throw TypeError(".google.cloud.dataplex.v1.ListAssetsResponse.assets: array expected"); - message.assets = []; - for (var i = 0; i < object.assets.length; ++i) { - if (typeof object.assets[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListAssetsResponse.assets: object expected"); - message.assets[i] = $root.google.cloud.dataplex.v1.Asset.fromObject(object.assets[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; + }; - /** - * Creates a plain object from a ListAssetsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListAssetsResponse - * @static - * @param {google.cloud.dataplex.v1.ListAssetsResponse} message ListAssetsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListAssetsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.assets = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.assets && message.assets.length) { - object.assets = []; - for (var j = 0; j < message.assets.length; ++j) - object.assets[j] = $root.google.cloud.dataplex.v1.Asset.toObject(message.assets[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; + /** + * Converts this ActionDetails to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @instance + * @returns {Object.} JSON object + */ + ActionDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this ListAssetsResponse to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListAssetsResponse - * @instance - * @returns {Object.} JSON object - */ - ListAssetsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for ActionDetails + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ActionDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails"; + }; - /** - * Gets the default type url for ListAssetsResponse - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListAssetsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListAssetsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListAssetsResponse"; - }; + return ActionDetails; + })(); - return ListAssetsResponse; + return DiscoveryEvent; })(); - v1.ListAssetActionsRequest = (function() { + v1.JobEvent = (function() { /** - * Properties of a ListAssetActionsRequest. + * Properties of a JobEvent. * @memberof google.cloud.dataplex.v1 - * @interface IListAssetActionsRequest - * @property {string|null} [parent] ListAssetActionsRequest parent - * @property {number|null} [pageSize] ListAssetActionsRequest pageSize - * @property {string|null} [pageToken] ListAssetActionsRequest pageToken + * @interface IJobEvent + * @property {string|null} [message] JobEvent message + * @property {string|null} [jobId] JobEvent jobId + * @property {google.protobuf.ITimestamp|null} [startTime] JobEvent startTime + * @property {google.protobuf.ITimestamp|null} [endTime] JobEvent endTime + * @property {google.cloud.dataplex.v1.JobEvent.State|null} [state] JobEvent state + * @property {number|null} [retries] JobEvent retries + * @property {google.cloud.dataplex.v1.JobEvent.Type|null} [type] JobEvent type + * @property {google.cloud.dataplex.v1.JobEvent.Service|null} [service] JobEvent service + * @property {string|null} [serviceJob] JobEvent serviceJob */ /** - * Constructs a new ListAssetActionsRequest. + * Constructs a new JobEvent. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListAssetActionsRequest. - * @implements IListAssetActionsRequest + * @classdesc Represents a JobEvent. + * @implements IJobEvent * @constructor - * @param {google.cloud.dataplex.v1.IListAssetActionsRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IJobEvent=} [properties] Properties to set */ - function ListAssetActionsRequest(properties) { + function JobEvent(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43321,323 +43717,187 @@ } /** - * ListAssetActionsRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * JobEvent message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.JobEvent * @instance */ - ListAssetActionsRequest.prototype.parent = ""; + JobEvent.prototype.message = ""; /** - * ListAssetActionsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * JobEvent jobId. + * @member {string} jobId + * @memberof google.cloud.dataplex.v1.JobEvent * @instance */ - ListAssetActionsRequest.prototype.pageSize = 0; + JobEvent.prototype.jobId = ""; /** - * ListAssetActionsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * JobEvent startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.dataplex.v1.JobEvent * @instance */ - ListAssetActionsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListAssetActionsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest - * @static - * @param {google.cloud.dataplex.v1.IListAssetActionsRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest instance - */ - ListAssetActionsRequest.create = function create(properties) { - return new ListAssetActionsRequest(properties); - }; - - /** - * Encodes the specified ListAssetActionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest - * @static - * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} message ListAssetActionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAssetActionsRequest.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); - return writer; - }; - - /** - * Encodes the specified ListAssetActionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListAssetActionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest - * @static - * @param {google.cloud.dataplex.v1.IListAssetActionsRequest} message ListAssetActionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAssetActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListAssetActionsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAssetActionsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListAssetActionsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListAssetActionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListAssetActionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListAssetActionsRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListAssetActionsRequest.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"; - return null; - }; - - /** - * Creates a ListAssetActionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListAssetActionsRequest} ListAssetActionsRequest - */ - ListAssetActionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListAssetActionsRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.ListAssetActionsRequest(); - 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); - return message; - }; + JobEvent.prototype.startTime = null; /** - * Creates a plain object from a ListAssetActionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest - * @static - * @param {google.cloud.dataplex.v1.ListAssetActionsRequest} message ListAssetActionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * JobEvent endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance */ - ListAssetActionsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - 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; - return object; - }; + JobEvent.prototype.endTime = null; /** - * Converts this ListAssetActionsRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest + * JobEvent state. + * @member {google.cloud.dataplex.v1.JobEvent.State} state + * @memberof google.cloud.dataplex.v1.JobEvent * @instance - * @returns {Object.} JSON object */ - ListAssetActionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + JobEvent.prototype.state = 0; /** - * Gets the default type url for ListAssetActionsRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListAssetActionsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * JobEvent retries. + * @member {number} retries + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance */ - ListAssetActionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListAssetActionsRequest"; - }; - - return ListAssetActionsRequest; - })(); - - v1.GetAssetRequest = (function() { + JobEvent.prototype.retries = 0; /** - * Properties of a GetAssetRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IGetAssetRequest - * @property {string|null} [name] GetAssetRequest name + * JobEvent type. + * @member {google.cloud.dataplex.v1.JobEvent.Type} type + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance */ + JobEvent.prototype.type = 0; /** - * Constructs a new GetAssetRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetAssetRequest. - * @implements IGetAssetRequest - * @constructor - * @param {google.cloud.dataplex.v1.IGetAssetRequest=} [properties] Properties to set + * JobEvent service. + * @member {google.cloud.dataplex.v1.JobEvent.Service} service + * @memberof google.cloud.dataplex.v1.JobEvent + * @instance */ - function GetAssetRequest(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]]; - } + JobEvent.prototype.service = 0; /** - * GetAssetRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GetAssetRequest + * JobEvent serviceJob. + * @member {string} serviceJob + * @memberof google.cloud.dataplex.v1.JobEvent * @instance */ - GetAssetRequest.prototype.name = ""; + JobEvent.prototype.serviceJob = ""; /** - * Creates a new GetAssetRequest instance using the specified properties. + * Creates a new JobEvent instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @memberof google.cloud.dataplex.v1.JobEvent * @static - * @param {google.cloud.dataplex.v1.IGetAssetRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest instance + * @param {google.cloud.dataplex.v1.IJobEvent=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent instance */ - GetAssetRequest.create = function create(properties) { - return new GetAssetRequest(properties); + JobEvent.create = function create(properties) { + return new JobEvent(properties); }; /** - * Encodes the specified GetAssetRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. + * Encodes the specified JobEvent message. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @memberof google.cloud.dataplex.v1.JobEvent * @static - * @param {google.cloud.dataplex.v1.IGetAssetRequest} message GetAssetRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IJobEvent} message JobEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetAssetRequest.encode = function encode(message, writer) { + JobEvent.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.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.jobId); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.retries != null && Object.hasOwnProperty.call(message, "retries")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.retries); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.type); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.service); + if (message.serviceJob != null && Object.hasOwnProperty.call(message, "serviceJob")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.serviceJob); return writer; }; /** - * Encodes the specified GetAssetRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetAssetRequest.verify|verify} messages. + * Encodes the specified JobEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.JobEvent.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @memberof google.cloud.dataplex.v1.JobEvent * @static - * @param {google.cloud.dataplex.v1.IGetAssetRequest} message GetAssetRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IJobEvent} message JobEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetAssetRequest.encodeDelimited = function encodeDelimited(message, writer) { + JobEvent.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetAssetRequest message from the specified reader or buffer. + * Decodes a JobEvent message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @memberof google.cloud.dataplex.v1.JobEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest + * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetAssetRequest.decode = function decode(reader, length) { + JobEvent.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetAssetRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.JobEvent(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.message = reader.string(); + break; + } + case 2: { + message.jobId = reader.string(); + break; + } + case 3: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.state = reader.int32(); + break; + } + case 6: { + message.retries = reader.int32(); + break; + } + case 7: { + message.type = reader.int32(); + break; + } + case 8: { + message.service = reader.int32(); + break; + } + case 9: { + message.serviceJob = reader.string(); break; } default: @@ -43649,128 +43909,331 @@ }; /** - * Decodes a GetAssetRequest message from the specified reader or buffer, length delimited. + * Decodes a JobEvent message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @memberof google.cloud.dataplex.v1.JobEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest + * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetAssetRequest.decodeDelimited = function decodeDelimited(reader) { + JobEvent.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetAssetRequest message. + * Verifies a JobEvent message. * @function verify - * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @memberof google.cloud.dataplex.v1.JobEvent * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetAssetRequest.verify = function verify(message) { + JobEvent.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.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.jobId != null && message.hasOwnProperty("jobId")) + if (!$util.isString(message.jobId)) + return "jobId: string expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.retries != null && message.hasOwnProperty("retries")) + if (!$util.isInteger(message.retries)) + return "retries: integer expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.service != null && message.hasOwnProperty("service")) + switch (message.service) { + default: + return "service: enum value expected"; + case 0: + case 1: + break; + } + if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) + if (!$util.isString(message.serviceJob)) + return "serviceJob: string expected"; return null; }; /** - * Creates a GetAssetRequest message from a plain object. Also converts values to their respective internal types. + * Creates a JobEvent message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @memberof google.cloud.dataplex.v1.JobEvent * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetAssetRequest} GetAssetRequest + * @returns {google.cloud.dataplex.v1.JobEvent} JobEvent */ - GetAssetRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetAssetRequest) + JobEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.JobEvent) return object; - var message = new $root.google.cloud.dataplex.v1.GetAssetRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dataplex.v1.JobEvent(); + if (object.message != null) + message.message = String(object.message); + if (object.jobId != null) + message.jobId = String(object.jobId); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.JobEvent.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.JobEvent.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "SUCCEEDED": + case 1: + message.state = 1; + break; + case "FAILED": + case 2: + message.state = 2; + break; + case "CANCELLED": + case 3: + message.state = 3; + break; + case "ABORTED": + case 4: + message.state = 4; + break; + } + if (object.retries != null) + message.retries = object.retries | 0; + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "SPARK": + case 1: + message.type = 1; + break; + case "NOTEBOOK": + case 2: + message.type = 2; + break; + } + switch (object.service) { + default: + if (typeof object.service === "number") { + message.service = object.service; + break; + } + break; + case "SERVICE_UNSPECIFIED": + case 0: + message.service = 0; + break; + case "DATAPROC": + case 1: + message.service = 1; + break; + } + if (object.serviceJob != null) + message.serviceJob = String(object.serviceJob); return message; }; /** - * Creates a plain object from a GetAssetRequest message. Also converts values to other types if specified. + * Creates a plain object from a JobEvent message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @memberof google.cloud.dataplex.v1.JobEvent * @static - * @param {google.cloud.dataplex.v1.GetAssetRequest} message GetAssetRequest + * @param {google.cloud.dataplex.v1.JobEvent} message JobEvent * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetAssetRequest.toObject = function toObject(message, options) { + JobEvent.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; + if (options.defaults) { + object.message = ""; + object.jobId = ""; + object.startTime = null; + object.endTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.retries = 0; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.service = options.enums === String ? "SERVICE_UNSPECIFIED" : 0; + object.serviceJob = ""; + } + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.jobId != null && message.hasOwnProperty("jobId")) + object.jobId = message.jobId; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.JobEvent.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.JobEvent.State[message.state] : message.state; + if (message.retries != null && message.hasOwnProperty("retries")) + object.retries = message.retries; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.JobEvent.Type[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.JobEvent.Type[message.type] : message.type; + if (message.service != null && message.hasOwnProperty("service")) + object.service = options.enums === String ? $root.google.cloud.dataplex.v1.JobEvent.Service[message.service] === undefined ? message.service : $root.google.cloud.dataplex.v1.JobEvent.Service[message.service] : message.service; + if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) + object.serviceJob = message.serviceJob; return object; }; /** - * Converts this GetAssetRequest to JSON. + * Converts this JobEvent to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @memberof google.cloud.dataplex.v1.JobEvent * @instance * @returns {Object.} JSON object */ - GetAssetRequest.prototype.toJSON = function toJSON() { + JobEvent.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetAssetRequest + * Gets the default type url for JobEvent * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GetAssetRequest + * @memberof google.cloud.dataplex.v1.JobEvent * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetAssetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + JobEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GetAssetRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.JobEvent"; }; - return GetAssetRequest; + /** + * Type enum. + * @name google.cloud.dataplex.v1.JobEvent.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} SPARK=1 SPARK value + * @property {number} NOTEBOOK=2 NOTEBOOK value + */ + JobEvent.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SPARK"] = 1; + values[valuesById[2] = "NOTEBOOK"] = 2; + return values; + })(); + + /** + * State enum. + * @name google.cloud.dataplex.v1.JobEvent.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} SUCCEEDED=1 SUCCEEDED value + * @property {number} FAILED=2 FAILED value + * @property {number} CANCELLED=3 CANCELLED value + * @property {number} ABORTED=4 ABORTED value + */ + JobEvent.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SUCCEEDED"] = 1; + values[valuesById[2] = "FAILED"] = 2; + values[valuesById[3] = "CANCELLED"] = 3; + values[valuesById[4] = "ABORTED"] = 4; + return values; + })(); + + /** + * Service enum. + * @name google.cloud.dataplex.v1.JobEvent.Service + * @enum {number} + * @property {number} SERVICE_UNSPECIFIED=0 SERVICE_UNSPECIFIED value + * @property {number} DATAPROC=1 DATAPROC value + */ + JobEvent.Service = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SERVICE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DATAPROC"] = 1; + return values; + })(); + + return JobEvent; })(); - v1.OperationMetadata = (function() { + v1.SessionEvent = (function() { /** - * Properties of an OperationMetadata. + * Properties of a SessionEvent. * @memberof google.cloud.dataplex.v1 - * @interface IOperationMetadata - * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime - * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime - * @property {string|null} [target] OperationMetadata target - * @property {string|null} [verb] OperationMetadata verb - * @property {string|null} [statusMessage] OperationMetadata statusMessage - * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation - * @property {string|null} [apiVersion] OperationMetadata apiVersion + * @interface ISessionEvent + * @property {string|null} [message] SessionEvent message + * @property {string|null} [userId] SessionEvent userId + * @property {string|null} [sessionId] SessionEvent sessionId + * @property {google.cloud.dataplex.v1.SessionEvent.EventType|null} [type] SessionEvent type + * @property {google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null} [query] SessionEvent query + * @property {boolean|null} [eventSucceeded] SessionEvent eventSucceeded + * @property {boolean|null} [fastStartupEnabled] SessionEvent fastStartupEnabled + * @property {google.protobuf.IDuration|null} [unassignedDuration] SessionEvent unassignedDuration */ /** - * Constructs a new OperationMetadata. + * Constructs a new SessionEvent. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an OperationMetadata. - * @implements IOperationMetadata + * @classdesc Represents a SessionEvent. + * @implements ISessionEvent * @constructor - * @param {google.cloud.dataplex.v1.IOperationMetadata=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.ISessionEvent=} [properties] Properties to set */ - function OperationMetadata(properties) { + function SessionEvent(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43778,159 +44241,187 @@ } /** - * OperationMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dataplex.v1.OperationMetadata + * SessionEvent message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.SessionEvent * @instance */ - OperationMetadata.prototype.createTime = null; + SessionEvent.prototype.message = ""; /** - * OperationMetadata endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.dataplex.v1.OperationMetadata + * SessionEvent userId. + * @member {string} userId + * @memberof google.cloud.dataplex.v1.SessionEvent * @instance */ - OperationMetadata.prototype.endTime = null; + SessionEvent.prototype.userId = ""; /** - * OperationMetadata target. - * @member {string} target - * @memberof google.cloud.dataplex.v1.OperationMetadata + * SessionEvent sessionId. + * @member {string} sessionId + * @memberof google.cloud.dataplex.v1.SessionEvent * @instance */ - OperationMetadata.prototype.target = ""; + SessionEvent.prototype.sessionId = ""; /** - * OperationMetadata verb. - * @member {string} verb - * @memberof google.cloud.dataplex.v1.OperationMetadata + * SessionEvent type. + * @member {google.cloud.dataplex.v1.SessionEvent.EventType} type + * @memberof google.cloud.dataplex.v1.SessionEvent * @instance */ - OperationMetadata.prototype.verb = ""; + SessionEvent.prototype.type = 0; /** - * OperationMetadata statusMessage. - * @member {string} statusMessage - * @memberof google.cloud.dataplex.v1.OperationMetadata + * SessionEvent query. + * @member {google.cloud.dataplex.v1.SessionEvent.IQueryDetail|null|undefined} query + * @memberof google.cloud.dataplex.v1.SessionEvent * @instance */ - OperationMetadata.prototype.statusMessage = ""; + SessionEvent.prototype.query = null; /** - * OperationMetadata requestedCancellation. - * @member {boolean} requestedCancellation - * @memberof google.cloud.dataplex.v1.OperationMetadata + * SessionEvent eventSucceeded. + * @member {boolean} eventSucceeded + * @memberof google.cloud.dataplex.v1.SessionEvent * @instance */ - OperationMetadata.prototype.requestedCancellation = false; + SessionEvent.prototype.eventSucceeded = false; /** - * OperationMetadata apiVersion. - * @member {string} apiVersion - * @memberof google.cloud.dataplex.v1.OperationMetadata + * SessionEvent fastStartupEnabled. + * @member {boolean} fastStartupEnabled + * @memberof google.cloud.dataplex.v1.SessionEvent * @instance */ - OperationMetadata.prototype.apiVersion = ""; + SessionEvent.prototype.fastStartupEnabled = false; /** - * Creates a new OperationMetadata instance using the specified properties. + * SessionEvent unassignedDuration. + * @member {google.protobuf.IDuration|null|undefined} unassignedDuration + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + SessionEvent.prototype.unassignedDuration = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SessionEvent detail. + * @member {"query"|undefined} detail + * @memberof google.cloud.dataplex.v1.SessionEvent + * @instance + */ + Object.defineProperty(SessionEvent.prototype, "detail", { + get: $util.oneOfGetter($oneOfFields = ["query"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SessionEvent instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.OperationMetadata + * @memberof google.cloud.dataplex.v1.SessionEvent * @static - * @param {google.cloud.dataplex.v1.IOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata instance + * @param {google.cloud.dataplex.v1.ISessionEvent=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent instance */ - OperationMetadata.create = function create(properties) { - return new OperationMetadata(properties); + SessionEvent.create = function create(properties) { + return new SessionEvent(properties); }; /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.dataplex.v1.OperationMetadata.verify|verify} messages. + * Encodes the specified SessionEvent message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.OperationMetadata + * @memberof google.cloud.dataplex.v1.SessionEvent * @static - * @param {google.cloud.dataplex.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {google.cloud.dataplex.v1.ISessionEvent} message SessionEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationMetadata.encode = function encode(message, writer) { + SessionEvent.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); - if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); - if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); - if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); - if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.userId); + if (message.sessionId != null && Object.hasOwnProperty.call(message, "sessionId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sessionId); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.encode(message.query, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.eventSucceeded != null && Object.hasOwnProperty.call(message, "eventSucceeded")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.eventSucceeded); + if (message.fastStartupEnabled != null && Object.hasOwnProperty.call(message, "fastStartupEnabled")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.fastStartupEnabled); + if (message.unassignedDuration != null && Object.hasOwnProperty.call(message, "unassignedDuration")) + $root.google.protobuf.Duration.encode(message.unassignedDuration, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.OperationMetadata.verify|verify} messages. + * Encodes the specified SessionEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.OperationMetadata + * @memberof google.cloud.dataplex.v1.SessionEvent * @static - * @param {google.cloud.dataplex.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {google.cloud.dataplex.v1.ISessionEvent} message SessionEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + SessionEvent.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OperationMetadata message from the specified reader or buffer. + * Decodes a SessionEvent message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.OperationMetadata + * @memberof google.cloud.dataplex.v1.SessionEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata + * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperationMetadata.decode = function decode(reader, length) { + SessionEvent.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.OperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.SessionEvent(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.message = reader.string(); break; } case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.userId = reader.string(); break; } case 3: { - message.target = reader.string(); + message.sessionId = reader.string(); break; } case 4: { - message.verb = reader.string(); + message.type = reader.int32(); break; } case 5: { - message.statusMessage = reader.string(); + message.query = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.decode(reader, reader.uint32()); break; } case 6: { - message.requestedCancellation = reader.bool(); + message.eventSucceeded = reader.bool(); break; } case 7: { - message.apiVersion = reader.string(); + message.fastStartupEnabled = reader.bool(); + break; + } + case 8: { + message.unassignedDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } default: @@ -43942,461 +44433,652 @@ }; /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a SessionEvent message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.OperationMetadata + * @memberof google.cloud.dataplex.v1.SessionEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata + * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperationMetadata.decodeDelimited = function decodeDelimited(reader) { + SessionEvent.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OperationMetadata message. + * Verifies a SessionEvent message. * @function verify - * @memberof google.cloud.dataplex.v1.OperationMetadata + * @memberof google.cloud.dataplex.v1.SessionEvent * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OperationMetadata.verify = function verify(message) { + SessionEvent.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; + var properties = {}; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.userId != null && message.hasOwnProperty("userId")) + if (!$util.isString(message.userId)) + return "userId: string expected"; + if (message.sessionId != null && message.hasOwnProperty("sessionId")) + if (!$util.isString(message.sessionId)) + return "sessionId: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.query != null && message.hasOwnProperty("query")) { + properties.detail = 1; + { + var error = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify(message.query); + if (error) + return "query." + error; + } } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (message.eventSucceeded != null && message.hasOwnProperty("eventSucceeded")) + if (typeof message.eventSucceeded !== "boolean") + return "eventSucceeded: boolean expected"; + if (message.fastStartupEnabled != null && message.hasOwnProperty("fastStartupEnabled")) + if (typeof message.fastStartupEnabled !== "boolean") + return "fastStartupEnabled: boolean expected"; + if (message.unassignedDuration != null && message.hasOwnProperty("unassignedDuration")) { + var error = $root.google.protobuf.Duration.verify(message.unassignedDuration); if (error) - return "endTime." + error; + return "unassignedDuration." + error; } - if (message.target != null && message.hasOwnProperty("target")) - if (!$util.isString(message.target)) - return "target: string expected"; - if (message.verb != null && message.hasOwnProperty("verb")) - if (!$util.isString(message.verb)) - return "verb: string expected"; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - if (!$util.isString(message.statusMessage)) - return "statusMessage: string expected"; - if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) - if (typeof message.requestedCancellation !== "boolean") - return "requestedCancellation: boolean expected"; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - if (!$util.isString(message.apiVersion)) - return "apiVersion: string expected"; return null; }; /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a SessionEvent message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.OperationMetadata + * @memberof google.cloud.dataplex.v1.SessionEvent * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.OperationMetadata} OperationMetadata + * @returns {google.cloud.dataplex.v1.SessionEvent} SessionEvent */ - OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.OperationMetadata) + SessionEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.SessionEvent) return object; - var message = new $root.google.cloud.dataplex.v1.OperationMetadata(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.OperationMetadata.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + var message = new $root.google.cloud.dataplex.v1.SessionEvent(); + if (object.message != null) + message.message = String(object.message); + if (object.userId != null) + message.userId = String(object.userId); + if (object.sessionId != null) + message.sessionId = String(object.sessionId); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "EVENT_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "START": + case 1: + message.type = 1; + break; + case "STOP": + case 2: + message.type = 2; + break; + case "QUERY": + case 3: + message.type = 3; + break; + case "CREATE": + case 4: + message.type = 4; + break; } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.OperationMetadata.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + if (object.query != null) { + if (typeof object.query !== "object") + throw TypeError(".google.cloud.dataplex.v1.SessionEvent.query: object expected"); + message.query = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.fromObject(object.query); + } + if (object.eventSucceeded != null) + message.eventSucceeded = Boolean(object.eventSucceeded); + if (object.fastStartupEnabled != null) + message.fastStartupEnabled = Boolean(object.fastStartupEnabled); + if (object.unassignedDuration != null) { + if (typeof object.unassignedDuration !== "object") + throw TypeError(".google.cloud.dataplex.v1.SessionEvent.unassignedDuration: object expected"); + message.unassignedDuration = $root.google.protobuf.Duration.fromObject(object.unassignedDuration); } - if (object.target != null) - message.target = String(object.target); - if (object.verb != null) - message.verb = String(object.verb); - if (object.statusMessage != null) - message.statusMessage = String(object.statusMessage); - if (object.requestedCancellation != null) - message.requestedCancellation = Boolean(object.requestedCancellation); - if (object.apiVersion != null) - message.apiVersion = String(object.apiVersion); return message; }; /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from a SessionEvent message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.OperationMetadata + * @memberof google.cloud.dataplex.v1.SessionEvent * @static - * @param {google.cloud.dataplex.v1.OperationMetadata} message OperationMetadata + * @param {google.cloud.dataplex.v1.SessionEvent} message SessionEvent * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OperationMetadata.toObject = function toObject(message, options) { + SessionEvent.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.createTime = null; - object.endTime = null; - object.target = ""; - object.verb = ""; - object.statusMessage = ""; - object.requestedCancellation = false; - object.apiVersion = ""; + object.message = ""; + object.userId = ""; + object.sessionId = ""; + object.type = options.enums === String ? "EVENT_TYPE_UNSPECIFIED" : 0; + object.eventSucceeded = false; + object.fastStartupEnabled = false; + object.unassignedDuration = null; } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = message.target; - if (message.verb != null && message.hasOwnProperty("verb")) - object.verb = message.verb; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - object.statusMessage = message.statusMessage; - if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) - object.requestedCancellation = message.requestedCancellation; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - object.apiVersion = message.apiVersion; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.userId != null && message.hasOwnProperty("userId")) + object.userId = message.userId; + if (message.sessionId != null && message.hasOwnProperty("sessionId")) + object.sessionId = message.sessionId; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.SessionEvent.EventType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.SessionEvent.EventType[message.type] : message.type; + if (message.query != null && message.hasOwnProperty("query")) { + object.query = $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.toObject(message.query, options); + if (options.oneofs) + object.detail = "query"; + } + if (message.eventSucceeded != null && message.hasOwnProperty("eventSucceeded")) + object.eventSucceeded = message.eventSucceeded; + if (message.fastStartupEnabled != null && message.hasOwnProperty("fastStartupEnabled")) + object.fastStartupEnabled = message.fastStartupEnabled; + if (message.unassignedDuration != null && message.hasOwnProperty("unassignedDuration")) + object.unassignedDuration = $root.google.protobuf.Duration.toObject(message.unassignedDuration, options); return object; }; /** - * Converts this OperationMetadata to JSON. + * Converts this SessionEvent to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.OperationMetadata + * @memberof google.cloud.dataplex.v1.SessionEvent * @instance * @returns {Object.} JSON object */ - OperationMetadata.prototype.toJSON = function toJSON() { + SessionEvent.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OperationMetadata + * Gets the default type url for SessionEvent * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.OperationMetadata + * @memberof google.cloud.dataplex.v1.SessionEvent * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SessionEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.OperationMetadata"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.SessionEvent"; }; - return OperationMetadata; - })(); - - v1.CreateTaskRequest = (function() { - /** - * Properties of a CreateTaskRequest. - * @memberof google.cloud.dataplex.v1 - * @interface ICreateTaskRequest - * @property {string|null} [parent] CreateTaskRequest parent - * @property {string|null} [taskId] CreateTaskRequest taskId - * @property {google.cloud.dataplex.v1.ITask|null} [task] CreateTaskRequest task - * @property {boolean|null} [validateOnly] CreateTaskRequest validateOnly + * EventType enum. + * @name google.cloud.dataplex.v1.SessionEvent.EventType + * @enum {number} + * @property {number} EVENT_TYPE_UNSPECIFIED=0 EVENT_TYPE_UNSPECIFIED value + * @property {number} START=1 START value + * @property {number} STOP=2 STOP value + * @property {number} QUERY=3 QUERY value + * @property {number} CREATE=4 CREATE value */ + SessionEvent.EventType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EVENT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "START"] = 1; + values[valuesById[2] = "STOP"] = 2; + values[valuesById[3] = "QUERY"] = 3; + values[valuesById[4] = "CREATE"] = 4; + return values; + })(); - /** - * Constructs a new CreateTaskRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CreateTaskRequest. - * @implements ICreateTaskRequest - * @constructor - * @param {google.cloud.dataplex.v1.ICreateTaskRequest=} [properties] Properties to set - */ - function CreateTaskRequest(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]]; - } + SessionEvent.QueryDetail = (function() { - /** - * CreateTaskRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.CreateTaskRequest - * @instance - */ - CreateTaskRequest.prototype.parent = ""; + /** + * Properties of a QueryDetail. + * @memberof google.cloud.dataplex.v1.SessionEvent + * @interface IQueryDetail + * @property {string|null} [queryId] QueryDetail queryId + * @property {string|null} [queryText] QueryDetail queryText + * @property {google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine|null} [engine] QueryDetail engine + * @property {google.protobuf.IDuration|null} [duration] QueryDetail duration + * @property {number|Long|null} [resultSizeBytes] QueryDetail resultSizeBytes + * @property {number|Long|null} [dataProcessedBytes] QueryDetail dataProcessedBytes + */ - /** - * CreateTaskRequest taskId. - * @member {string} taskId - * @memberof google.cloud.dataplex.v1.CreateTaskRequest - * @instance - */ - CreateTaskRequest.prototype.taskId = ""; + /** + * Constructs a new QueryDetail. + * @memberof google.cloud.dataplex.v1.SessionEvent + * @classdesc Represents a QueryDetail. + * @implements IQueryDetail + * @constructor + * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail=} [properties] Properties to set + */ + function QueryDetail(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]]; + } - /** - * CreateTaskRequest task. - * @member {google.cloud.dataplex.v1.ITask|null|undefined} task - * @memberof google.cloud.dataplex.v1.CreateTaskRequest - * @instance - */ - CreateTaskRequest.prototype.task = null; + /** + * QueryDetail queryId. + * @member {string} queryId + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.queryId = ""; - /** - * CreateTaskRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.CreateTaskRequest - * @instance - */ - CreateTaskRequest.prototype.validateOnly = false; + /** + * QueryDetail queryText. + * @member {string} queryText + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.queryText = ""; - /** - * Creates a new CreateTaskRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.CreateTaskRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateTaskRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest instance - */ - CreateTaskRequest.create = function create(properties) { - return new CreateTaskRequest(properties); - }; + /** + * QueryDetail engine. + * @member {google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine} engine + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.engine = 0; - /** - * Encodes the specified CreateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.CreateTaskRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateTaskRequest} message CreateTaskRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateTaskRequest.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.taskId != null && Object.hasOwnProperty.call(message, "taskId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.taskId); - if (message.task != null && Object.hasOwnProperty.call(message, "task")) - $root.google.cloud.dataplex.v1.Task.encode(message.task, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); - return writer; - }; + /** + * QueryDetail duration. + * @member {google.protobuf.IDuration|null|undefined} duration + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.duration = null; - /** - * Encodes the specified CreateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateTaskRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CreateTaskRequest - * @static - * @param {google.cloud.dataplex.v1.ICreateTaskRequest} message CreateTaskRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * QueryDetail resultSizeBytes. + * @member {number|Long} resultSizeBytes + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.resultSizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Decodes a CreateTaskRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.CreateTaskRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateTaskRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateTaskRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.taskId = reader.string(); + /** + * QueryDetail dataProcessedBytes. + * @member {number|Long} dataProcessedBytes + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + */ + QueryDetail.prototype.dataProcessedBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new QueryDetail instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail instance + */ + QueryDetail.create = function create(properties) { + return new QueryDetail(properties); + }; + + /** + * Encodes the specified QueryDetail message. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail} message QueryDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDetail.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.queryId != null && Object.hasOwnProperty.call(message, "queryId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.queryId); + if (message.queryText != null && Object.hasOwnProperty.call(message, "queryText")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.queryText); + if (message.engine != null && Object.hasOwnProperty.call(message, "engine")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.engine); + if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) + $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.resultSizeBytes != null && Object.hasOwnProperty.call(message, "resultSizeBytes")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.resultSizeBytes); + if (message.dataProcessedBytes != null && Object.hasOwnProperty.call(message, "dataProcessedBytes")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.dataProcessedBytes); + return writer; + }; + + /** + * Encodes the specified QueryDetail message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.SessionEvent.QueryDetail.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {google.cloud.dataplex.v1.SessionEvent.IQueryDetail} message QueryDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDetail.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDetail message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDetail.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.queryId = reader.string(); + break; + } + case 2: { + message.queryText = reader.string(); + break; + } + case 3: { + message.engine = reader.int32(); + break; + } + case 4: { + message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 5: { + message.resultSizeBytes = reader.int64(); + break; + } + case 6: { + message.dataProcessedBytes = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); break; } - case 3: { - message.task = $root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32()); + } + return message; + }; + + /** + * Decodes a QueryDetail message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDetail.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDetail message. + * @function verify + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDetail.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.queryId != null && message.hasOwnProperty("queryId")) + if (!$util.isString(message.queryId)) + return "queryId: string expected"; + if (message.queryText != null && message.hasOwnProperty("queryText")) + if (!$util.isString(message.queryText)) + return "queryText: string expected"; + if (message.engine != null && message.hasOwnProperty("engine")) + switch (message.engine) { + default: + return "engine: enum value expected"; + case 0: + case 1: + case 2: break; } - case 4: { - message.validateOnly = reader.bool(); + if (message.duration != null && message.hasOwnProperty("duration")) { + var error = $root.google.protobuf.Duration.verify(message.duration); + if (error) + return "duration." + error; + } + if (message.resultSizeBytes != null && message.hasOwnProperty("resultSizeBytes")) + if (!$util.isInteger(message.resultSizeBytes) && !(message.resultSizeBytes && $util.isInteger(message.resultSizeBytes.low) && $util.isInteger(message.resultSizeBytes.high))) + return "resultSizeBytes: integer|Long expected"; + if (message.dataProcessedBytes != null && message.hasOwnProperty("dataProcessedBytes")) + if (!$util.isInteger(message.dataProcessedBytes) && !(message.dataProcessedBytes && $util.isInteger(message.dataProcessedBytes.low) && $util.isInteger(message.dataProcessedBytes.high))) + return "dataProcessedBytes: integer|Long expected"; + return null; + }; + + /** + * Creates a QueryDetail message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.SessionEvent.QueryDetail} QueryDetail + */ + QueryDetail.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail) + return object; + var message = new $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail(); + if (object.queryId != null) + message.queryId = String(object.queryId); + if (object.queryText != null) + message.queryText = String(object.queryText); + switch (object.engine) { + default: + if (typeof object.engine === "number") { + message.engine = object.engine; break; } - default: - reader.skipType(tag & 7); + break; + case "ENGINE_UNSPECIFIED": + case 0: + message.engine = 0; + break; + case "SPARK_SQL": + case 1: + message.engine = 1; + break; + case "BIGQUERY": + case 2: + message.engine = 2; break; } - } - return message; - }; - - /** - * Decodes a CreateTaskRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CreateTaskRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateTaskRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateTaskRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.CreateTaskRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateTaskRequest.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.taskId != null && message.hasOwnProperty("taskId")) - if (!$util.isString(message.taskId)) - return "taskId: string expected"; - if (message.task != null && message.hasOwnProperty("task")) { - var error = $root.google.cloud.dataplex.v1.Task.verify(message.task); - if (error) - return "task." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; + if (object.duration != null) { + if (typeof object.duration !== "object") + throw TypeError(".google.cloud.dataplex.v1.SessionEvent.QueryDetail.duration: object expected"); + message.duration = $root.google.protobuf.Duration.fromObject(object.duration); + } + if (object.resultSizeBytes != null) + if ($util.Long) + (message.resultSizeBytes = $util.Long.fromValue(object.resultSizeBytes)).unsigned = false; + else if (typeof object.resultSizeBytes === "string") + message.resultSizeBytes = parseInt(object.resultSizeBytes, 10); + else if (typeof object.resultSizeBytes === "number") + message.resultSizeBytes = object.resultSizeBytes; + else if (typeof object.resultSizeBytes === "object") + message.resultSizeBytes = new $util.LongBits(object.resultSizeBytes.low >>> 0, object.resultSizeBytes.high >>> 0).toNumber(); + if (object.dataProcessedBytes != null) + if ($util.Long) + (message.dataProcessedBytes = $util.Long.fromValue(object.dataProcessedBytes)).unsigned = false; + else if (typeof object.dataProcessedBytes === "string") + message.dataProcessedBytes = parseInt(object.dataProcessedBytes, 10); + else if (typeof object.dataProcessedBytes === "number") + message.dataProcessedBytes = object.dataProcessedBytes; + else if (typeof object.dataProcessedBytes === "object") + message.dataProcessedBytes = new $util.LongBits(object.dataProcessedBytes.low >>> 0, object.dataProcessedBytes.high >>> 0).toNumber(); + return message; + }; - /** - * Creates a CreateTaskRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.CreateTaskRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CreateTaskRequest} CreateTaskRequest - */ - CreateTaskRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CreateTaskRequest) + /** + * Creates a plain object from a QueryDetail message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {google.cloud.dataplex.v1.SessionEvent.QueryDetail} message QueryDetail + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDetail.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.queryId = ""; + object.queryText = ""; + object.engine = options.enums === String ? "ENGINE_UNSPECIFIED" : 0; + object.duration = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.resultSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.resultSizeBytes = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.dataProcessedBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.dataProcessedBytes = options.longs === String ? "0" : 0; + } + if (message.queryId != null && message.hasOwnProperty("queryId")) + object.queryId = message.queryId; + if (message.queryText != null && message.hasOwnProperty("queryText")) + object.queryText = message.queryText; + if (message.engine != null && message.hasOwnProperty("engine")) + object.engine = options.enums === String ? $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine[message.engine] === undefined ? message.engine : $root.google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine[message.engine] : message.engine; + if (message.duration != null && message.hasOwnProperty("duration")) + object.duration = $root.google.protobuf.Duration.toObject(message.duration, options); + if (message.resultSizeBytes != null && message.hasOwnProperty("resultSizeBytes")) + if (typeof message.resultSizeBytes === "number") + object.resultSizeBytes = options.longs === String ? String(message.resultSizeBytes) : message.resultSizeBytes; + else + object.resultSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.resultSizeBytes) : options.longs === Number ? new $util.LongBits(message.resultSizeBytes.low >>> 0, message.resultSizeBytes.high >>> 0).toNumber() : message.resultSizeBytes; + if (message.dataProcessedBytes != null && message.hasOwnProperty("dataProcessedBytes")) + if (typeof message.dataProcessedBytes === "number") + object.dataProcessedBytes = options.longs === String ? String(message.dataProcessedBytes) : message.dataProcessedBytes; + else + object.dataProcessedBytes = options.longs === String ? $util.Long.prototype.toString.call(message.dataProcessedBytes) : options.longs === Number ? new $util.LongBits(message.dataProcessedBytes.low >>> 0, message.dataProcessedBytes.high >>> 0).toNumber() : message.dataProcessedBytes; return object; - var message = new $root.google.cloud.dataplex.v1.CreateTaskRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.taskId != null) - message.taskId = String(object.taskId); - if (object.task != null) { - if (typeof object.task !== "object") - throw TypeError(".google.cloud.dataplex.v1.CreateTaskRequest.task: object expected"); - message.task = $root.google.cloud.dataplex.v1.Task.fromObject(object.task); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; + }; - /** - * Creates a plain object from a CreateTaskRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.CreateTaskRequest - * @static - * @param {google.cloud.dataplex.v1.CreateTaskRequest} message CreateTaskRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateTaskRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.taskId = ""; - object.task = null; - object.validateOnly = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.taskId != null && message.hasOwnProperty("taskId")) - object.taskId = message.taskId; - if (message.task != null && message.hasOwnProperty("task")) - object.task = $root.google.cloud.dataplex.v1.Task.toObject(message.task, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; + /** + * Converts this QueryDetail to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @instance + * @returns {Object.} JSON object + */ + QueryDetail.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this CreateTaskRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.CreateTaskRequest - * @instance - * @returns {Object.} JSON object - */ - CreateTaskRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for QueryDetail + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.SessionEvent.QueryDetail + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.SessionEvent.QueryDetail"; + }; - /** - * Gets the default type url for CreateTaskRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.CreateTaskRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateTaskRequest"; - }; + /** + * Engine enum. + * @name google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine + * @enum {number} + * @property {number} ENGINE_UNSPECIFIED=0 ENGINE_UNSPECIFIED value + * @property {number} SPARK_SQL=1 SPARK_SQL value + * @property {number} BIGQUERY=2 BIGQUERY value + */ + QueryDetail.Engine = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENGINE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SPARK_SQL"] = 1; + values[valuesById[2] = "BIGQUERY"] = 2; + return values; + })(); - return CreateTaskRequest; + return QueryDetail; + })(); + + return SessionEvent; })(); - v1.UpdateTaskRequest = (function() { + v1.DataScanEvent = (function() { /** - * Properties of an UpdateTaskRequest. + * Properties of a DataScanEvent. * @memberof google.cloud.dataplex.v1 - * @interface IUpdateTaskRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTaskRequest updateMask - * @property {google.cloud.dataplex.v1.ITask|null} [task] UpdateTaskRequest task - * @property {boolean|null} [validateOnly] UpdateTaskRequest validateOnly + * @interface IDataScanEvent + * @property {string|null} [dataSource] DataScanEvent dataSource + * @property {string|null} [jobId] DataScanEvent jobId + * @property {google.protobuf.ITimestamp|null} [startTime] DataScanEvent startTime + * @property {google.protobuf.ITimestamp|null} [endTime] DataScanEvent endTime + * @property {google.cloud.dataplex.v1.DataScanEvent.ScanType|null} [type] DataScanEvent type + * @property {google.cloud.dataplex.v1.DataScanEvent.State|null} [state] DataScanEvent state + * @property {string|null} [message] DataScanEvent message + * @property {string|null} [specVersion] DataScanEvent specVersion + * @property {google.cloud.dataplex.v1.DataScanEvent.Trigger|null} [trigger] DataScanEvent trigger + * @property {google.cloud.dataplex.v1.DataScanEvent.Scope|null} [scope] DataScanEvent scope + * @property {google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult|null} [dataProfile] DataScanEvent dataProfile + * @property {google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult|null} [dataQuality] DataScanEvent dataQuality */ /** - * Constructs a new UpdateTaskRequest. + * Constructs a new DataScanEvent. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an UpdateTaskRequest. - * @implements IUpdateTaskRequest + * @classdesc Represents a DataScanEvent. + * @implements IDataScanEvent * @constructor - * @param {google.cloud.dataplex.v1.IUpdateTaskRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IDataScanEvent=} [properties] Properties to set */ - function UpdateTaskRequest(properties) { + function DataScanEvent(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -44404,333 +45086,243 @@ } /** - * UpdateTaskRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * DataScanEvent dataSource. + * @member {string} dataSource + * @memberof google.cloud.dataplex.v1.DataScanEvent * @instance */ - UpdateTaskRequest.prototype.updateMask = null; + DataScanEvent.prototype.dataSource = ""; /** - * UpdateTaskRequest task. - * @member {google.cloud.dataplex.v1.ITask|null|undefined} task - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * DataScanEvent jobId. + * @member {string} jobId + * @memberof google.cloud.dataplex.v1.DataScanEvent * @instance */ - UpdateTaskRequest.prototype.task = null; + DataScanEvent.prototype.jobId = ""; /** - * UpdateTaskRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * DataScanEvent startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.dataplex.v1.DataScanEvent * @instance */ - UpdateTaskRequest.prototype.validateOnly = false; - - /** - * Creates a new UpdateTaskRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateTaskRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest instance - */ - UpdateTaskRequest.create = function create(properties) { - return new UpdateTaskRequest(properties); - }; - - /** - * Encodes the specified UpdateTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} message UpdateTaskRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateTaskRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.task != null && Object.hasOwnProperty.call(message, "task")) - $root.google.cloud.dataplex.v1.Task.encode(message.task, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified UpdateTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateTaskRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest - * @static - * @param {google.cloud.dataplex.v1.IUpdateTaskRequest} message UpdateTaskRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateTaskRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateTaskRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateTaskRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 2: { - message.task = $root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32()); - break; - } - case 3: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateTaskRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateTaskRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateTaskRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateTaskRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.task != null && message.hasOwnProperty("task")) { - var error = $root.google.cloud.dataplex.v1.Task.verify(message.task); - if (error) - return "task." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates an UpdateTaskRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.UpdateTaskRequest} UpdateTaskRequest - */ - UpdateTaskRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.UpdateTaskRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.UpdateTaskRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateTaskRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.task != null) { - if (typeof object.task !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateTaskRequest.task: object expected"); - message.task = $root.google.cloud.dataplex.v1.Task.fromObject(object.task); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; + DataScanEvent.prototype.startTime = null; /** - * Creates a plain object from an UpdateTaskRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest - * @static - * @param {google.cloud.dataplex.v1.UpdateTaskRequest} message UpdateTaskRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * DataScanEvent endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @instance */ - UpdateTaskRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.task = null; - object.validateOnly = false; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.task != null && message.hasOwnProperty("task")) - object.task = $root.google.cloud.dataplex.v1.Task.toObject(message.task, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; + DataScanEvent.prototype.endTime = null; /** - * Converts this UpdateTaskRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest + * DataScanEvent type. + * @member {google.cloud.dataplex.v1.DataScanEvent.ScanType} type + * @memberof google.cloud.dataplex.v1.DataScanEvent * @instance - * @returns {Object.} JSON object */ - UpdateTaskRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + DataScanEvent.prototype.type = 0; /** - * Gets the default type url for UpdateTaskRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.UpdateTaskRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * DataScanEvent state. + * @member {google.cloud.dataplex.v1.DataScanEvent.State} state + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @instance */ - UpdateTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateTaskRequest"; - }; + DataScanEvent.prototype.state = 0; - return UpdateTaskRequest; - })(); + /** + * DataScanEvent message. + * @member {string} message + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @instance + */ + DataScanEvent.prototype.message = ""; - v1.DeleteTaskRequest = (function() { + /** + * DataScanEvent specVersion. + * @member {string} specVersion + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @instance + */ + DataScanEvent.prototype.specVersion = ""; /** - * Properties of a DeleteTaskRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IDeleteTaskRequest - * @property {string|null} [name] DeleteTaskRequest name + * DataScanEvent trigger. + * @member {google.cloud.dataplex.v1.DataScanEvent.Trigger} trigger + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @instance */ + DataScanEvent.prototype.trigger = 0; /** - * Constructs a new DeleteTaskRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DeleteTaskRequest. - * @implements IDeleteTaskRequest - * @constructor - * @param {google.cloud.dataplex.v1.IDeleteTaskRequest=} [properties] Properties to set + * DataScanEvent scope. + * @member {google.cloud.dataplex.v1.DataScanEvent.Scope} scope + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @instance */ - function DeleteTaskRequest(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]]; - } + DataScanEvent.prototype.scope = 0; /** - * DeleteTaskRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * DataScanEvent dataProfile. + * @member {google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult|null|undefined} dataProfile + * @memberof google.cloud.dataplex.v1.DataScanEvent * @instance */ - DeleteTaskRequest.prototype.name = ""; + DataScanEvent.prototype.dataProfile = null; /** - * Creates a new DeleteTaskRequest instance using the specified properties. + * DataScanEvent dataQuality. + * @member {google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult|null|undefined} dataQuality + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @instance + */ + DataScanEvent.prototype.dataQuality = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataScanEvent result. + * @member {"dataProfile"|"dataQuality"|undefined} result + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @instance + */ + Object.defineProperty(DataScanEvent.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["dataProfile", "dataQuality"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataScanEvent instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @memberof google.cloud.dataplex.v1.DataScanEvent * @static - * @param {google.cloud.dataplex.v1.IDeleteTaskRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest instance + * @param {google.cloud.dataplex.v1.IDataScanEvent=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataScanEvent} DataScanEvent instance */ - DeleteTaskRequest.create = function create(properties) { - return new DeleteTaskRequest(properties); + DataScanEvent.create = function create(properties) { + return new DataScanEvent(properties); }; /** - * Encodes the specified DeleteTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. + * Encodes the specified DataScanEvent message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @memberof google.cloud.dataplex.v1.DataScanEvent * @static - * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} message DeleteTaskRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IDataScanEvent} message DataScanEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteTaskRequest.encode = function encode(message, writer) { + DataScanEvent.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.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataSource); + if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.jobId); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.message); + if (message.specVersion != null && Object.hasOwnProperty.call(message, "specVersion")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.specVersion); + if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.trigger); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.scope); + if (message.dataProfile != null && Object.hasOwnProperty.call(message, "dataProfile")) + $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.encode(message.dataProfile, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.dataQuality != null && Object.hasOwnProperty.call(message, "dataQuality")) + $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.encode(message.dataQuality, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); return writer; }; /** - * Encodes the specified DeleteTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteTaskRequest.verify|verify} messages. + * Encodes the specified DataScanEvent message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @memberof google.cloud.dataplex.v1.DataScanEvent * @static - * @param {google.cloud.dataplex.v1.IDeleteTaskRequest} message DeleteTaskRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IDataScanEvent} message DataScanEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + DataScanEvent.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteTaskRequest message from the specified reader or buffer. + * Decodes a DataScanEvent message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @memberof google.cloud.dataplex.v1.DataScanEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest + * @returns {google.cloud.dataplex.v1.DataScanEvent} DataScanEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteTaskRequest.decode = function decode(reader, length) { + DataScanEvent.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteTaskRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScanEvent(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.dataSource = reader.string(); + break; + } + case 2: { + message.jobId = reader.string(); + break; + } + case 3: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.state = reader.int32(); + break; + } + case 7: { + message.message = reader.string(); + break; + } + case 8: { + message.specVersion = reader.string(); + break; + } + case 9: { + message.trigger = reader.int32(); + break; + } + case 10: { + message.scope = reader.int32(); + break; + } + case 101: { + message.dataProfile = $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.decode(reader, reader.uint32()); + break; + } + case 102: { + message.dataQuality = $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.decode(reader, reader.uint32()); break; } default: @@ -44742,1114 +45334,1269 @@ }; /** - * Decodes a DeleteTaskRequest message from the specified reader or buffer, length delimited. + * Decodes a DataScanEvent message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @memberof google.cloud.dataplex.v1.DataScanEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest + * @returns {google.cloud.dataplex.v1.DataScanEvent} DataScanEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteTaskRequest.decodeDelimited = function decodeDelimited(reader) { + DataScanEvent.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteTaskRequest message. + * Verifies a DataScanEvent message. * @function verify - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @memberof google.cloud.dataplex.v1.DataScanEvent * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteTaskRequest.verify = function verify(message) { + DataScanEvent.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"; + var properties = {}; + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + if (!$util.isString(message.dataSource)) + return "dataSource: string expected"; + if (message.jobId != null && message.hasOwnProperty("jobId")) + if (!$util.isString(message.jobId)) + return "jobId: string expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.specVersion != null && message.hasOwnProperty("specVersion")) + if (!$util.isString(message.specVersion)) + return "specVersion: string expected"; + if (message.trigger != null && message.hasOwnProperty("trigger")) + switch (message.trigger) { + default: + return "trigger: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.scope != null && message.hasOwnProperty("scope")) + switch (message.scope) { + default: + return "scope: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.dataProfile != null && message.hasOwnProperty("dataProfile")) { + properties.result = 1; + { + var error = $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.verify(message.dataProfile); + if (error) + return "dataProfile." + error; + } + } + if (message.dataQuality != null && message.hasOwnProperty("dataQuality")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.verify(message.dataQuality); + if (error) + return "dataQuality." + error; + } + } return null; }; /** - * Creates a DeleteTaskRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DataScanEvent message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @memberof google.cloud.dataplex.v1.DataScanEvent * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DeleteTaskRequest} DeleteTaskRequest + * @returns {google.cloud.dataplex.v1.DataScanEvent} DataScanEvent */ - DeleteTaskRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DeleteTaskRequest) + DataScanEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataScanEvent) return object; - var message = new $root.google.cloud.dataplex.v1.DeleteTaskRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dataplex.v1.DataScanEvent(); + if (object.dataSource != null) + message.dataSource = String(object.dataSource); + if (object.jobId != null) + message.jobId = String(object.jobId); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "SCAN_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "DATA_PROFILE": + case 1: + message.type = 1; + break; + case "DATA_QUALITY": + case 2: + message.type = 2; + break; + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "STARTED": + case 1: + message.state = 1; + break; + case "SUCCEEDED": + case 2: + message.state = 2; + break; + case "FAILED": + case 3: + message.state = 3; + break; + case "CANCELLED": + case 4: + message.state = 4; + break; + } + if (object.message != null) + message.message = String(object.message); + if (object.specVersion != null) + message.specVersion = String(object.specVersion); + switch (object.trigger) { + default: + if (typeof object.trigger === "number") { + message.trigger = object.trigger; + break; + } + break; + case "TRIGGER_UNSPECIFIED": + case 0: + message.trigger = 0; + break; + case "ON_DEMAND": + case 1: + message.trigger = 1; + break; + case "SCHEDULE": + case 2: + message.trigger = 2; + break; + } + switch (object.scope) { + default: + if (typeof object.scope === "number") { + message.scope = object.scope; + break; + } + break; + case "SCOPE_UNSPECIFIED": + case 0: + message.scope = 0; + break; + case "FULL": + case 1: + message.scope = 1; + break; + case "INCREMENTAL": + case 2: + message.scope = 2; + break; + } + if (object.dataProfile != null) { + if (typeof object.dataProfile !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.dataProfile: object expected"); + message.dataProfile = $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.fromObject(object.dataProfile); + } + if (object.dataQuality != null) { + if (typeof object.dataQuality !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.dataQuality: object expected"); + message.dataQuality = $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.fromObject(object.dataQuality); + } return message; }; /** - * Creates a plain object from a DeleteTaskRequest message. Also converts values to other types if specified. + * Creates a plain object from a DataScanEvent message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @memberof google.cloud.dataplex.v1.DataScanEvent * @static - * @param {google.cloud.dataplex.v1.DeleteTaskRequest} message DeleteTaskRequest + * @param {google.cloud.dataplex.v1.DataScanEvent} message DataScanEvent * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteTaskRequest.toObject = function toObject(message, options) { + DataScanEvent.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; + if (options.defaults) { + object.dataSource = ""; + object.jobId = ""; + object.startTime = null; + object.endTime = null; + object.type = options.enums === String ? "SCAN_TYPE_UNSPECIFIED" : 0; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.message = ""; + object.specVersion = ""; + object.trigger = options.enums === String ? "TRIGGER_UNSPECIFIED" : 0; + object.scope = options.enums === String ? "SCOPE_UNSPECIFIED" : 0; + } + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + object.dataSource = message.dataSource; + if (message.jobId != null && message.hasOwnProperty("jobId")) + object.jobId = message.jobId; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.DataScanEvent.ScanType[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.DataScanEvent.ScanType[message.type] : message.type; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dataplex.v1.DataScanEvent.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.DataScanEvent.State[message.state] : message.state; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.specVersion != null && message.hasOwnProperty("specVersion")) + object.specVersion = message.specVersion; + if (message.trigger != null && message.hasOwnProperty("trigger")) + object.trigger = options.enums === String ? $root.google.cloud.dataplex.v1.DataScanEvent.Trigger[message.trigger] === undefined ? message.trigger : $root.google.cloud.dataplex.v1.DataScanEvent.Trigger[message.trigger] : message.trigger; + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = options.enums === String ? $root.google.cloud.dataplex.v1.DataScanEvent.Scope[message.scope] === undefined ? message.scope : $root.google.cloud.dataplex.v1.DataScanEvent.Scope[message.scope] : message.scope; + if (message.dataProfile != null && message.hasOwnProperty("dataProfile")) { + object.dataProfile = $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.toObject(message.dataProfile, options); + if (options.oneofs) + object.result = "dataProfile"; + } + if (message.dataQuality != null && message.hasOwnProperty("dataQuality")) { + object.dataQuality = $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.toObject(message.dataQuality, options); + if (options.oneofs) + object.result = "dataQuality"; + } return object; }; /** - * Converts this DeleteTaskRequest to JSON. + * Converts this DataScanEvent to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @memberof google.cloud.dataplex.v1.DataScanEvent * @instance * @returns {Object.} JSON object */ - DeleteTaskRequest.prototype.toJSON = function toJSON() { + DataScanEvent.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteTaskRequest + * Gets the default type url for DataScanEvent * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DeleteTaskRequest + * @memberof google.cloud.dataplex.v1.DataScanEvent * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DataScanEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteTaskRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScanEvent"; }; - return DeleteTaskRequest; - })(); - - v1.ListTasksRequest = (function() { - /** - * Properties of a ListTasksRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IListTasksRequest - * @property {string|null} [parent] ListTasksRequest parent - * @property {number|null} [pageSize] ListTasksRequest pageSize - * @property {string|null} [pageToken] ListTasksRequest pageToken - * @property {string|null} [filter] ListTasksRequest filter - * @property {string|null} [orderBy] ListTasksRequest orderBy + * ScanType enum. + * @name google.cloud.dataplex.v1.DataScanEvent.ScanType + * @enum {number} + * @property {number} SCAN_TYPE_UNSPECIFIED=0 SCAN_TYPE_UNSPECIFIED value + * @property {number} DATA_PROFILE=1 DATA_PROFILE value + * @property {number} DATA_QUALITY=2 DATA_QUALITY value */ + DataScanEvent.ScanType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SCAN_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DATA_PROFILE"] = 1; + values[valuesById[2] = "DATA_QUALITY"] = 2; + return values; + })(); /** - * Constructs a new ListTasksRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListTasksRequest. - * @implements IListTasksRequest - * @constructor - * @param {google.cloud.dataplex.v1.IListTasksRequest=} [properties] Properties to set + * State enum. + * @name google.cloud.dataplex.v1.DataScanEvent.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} STARTED=1 STARTED value + * @property {number} SUCCEEDED=2 SUCCEEDED value + * @property {number} FAILED=3 FAILED value + * @property {number} CANCELLED=4 CANCELLED value */ - function ListTasksRequest(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]]; - } + DataScanEvent.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STARTED"] = 1; + values[valuesById[2] = "SUCCEEDED"] = 2; + values[valuesById[3] = "FAILED"] = 3; + values[valuesById[4] = "CANCELLED"] = 4; + return values; + })(); /** - * ListTasksRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListTasksRequest - * @instance + * Trigger enum. + * @name google.cloud.dataplex.v1.DataScanEvent.Trigger + * @enum {number} + * @property {number} TRIGGER_UNSPECIFIED=0 TRIGGER_UNSPECIFIED value + * @property {number} ON_DEMAND=1 ON_DEMAND value + * @property {number} SCHEDULE=2 SCHEDULE value */ - ListTasksRequest.prototype.parent = ""; + DataScanEvent.Trigger = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TRIGGER_UNSPECIFIED"] = 0; + values[valuesById[1] = "ON_DEMAND"] = 1; + values[valuesById[2] = "SCHEDULE"] = 2; + return values; + })(); /** - * ListTasksRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListTasksRequest - * @instance + * Scope enum. + * @name google.cloud.dataplex.v1.DataScanEvent.Scope + * @enum {number} + * @property {number} SCOPE_UNSPECIFIED=0 SCOPE_UNSPECIFIED value + * @property {number} FULL=1 FULL value + * @property {number} INCREMENTAL=2 INCREMENTAL value */ - ListTasksRequest.prototype.pageSize = 0; + DataScanEvent.Scope = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SCOPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FULL"] = 1; + values[valuesById[2] = "INCREMENTAL"] = 2; + return values; + })(); - /** - * ListTasksRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListTasksRequest - * @instance - */ - ListTasksRequest.prototype.pageToken = ""; + DataScanEvent.DataProfileResult = (function() { - /** - * ListTasksRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListTasksRequest - * @instance - */ - ListTasksRequest.prototype.filter = ""; + /** + * Properties of a DataProfileResult. + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @interface IDataProfileResult + * @property {number|Long|null} [rowCount] DataProfileResult rowCount + */ - /** - * ListTasksRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.dataplex.v1.ListTasksRequest - * @instance - */ - ListTasksRequest.prototype.orderBy = ""; + /** + * Constructs a new DataProfileResult. + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @classdesc Represents a DataProfileResult. + * @implements IDataProfileResult + * @constructor + * @param {google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult=} [properties] Properties to set + */ + function DataProfileResult(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]]; + } - /** - * Creates a new ListTasksRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListTasksRequest - * @static - * @param {google.cloud.dataplex.v1.IListTasksRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest instance - */ - ListTasksRequest.create = function create(properties) { - return new ListTasksRequest(properties); - }; + /** + * DataProfileResult rowCount. + * @member {number|Long} rowCount + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + * @instance + */ + DataProfileResult.prototype.rowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Encodes the specified ListTasksRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListTasksRequest - * @static - * @param {google.cloud.dataplex.v1.IListTasksRequest} message ListTasksRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTasksRequest.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.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); - return writer; - }; + /** + * Creates a new DataProfileResult instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataScanEvent.DataProfileResult} DataProfileResult instance + */ + DataProfileResult.create = function create(properties) { + return new DataProfileResult(properties); + }; - /** - * Encodes the specified ListTasksRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListTasksRequest - * @static - * @param {google.cloud.dataplex.v1.IListTasksRequest} message ListTasksRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTasksRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified DataProfileResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult} message DataProfileResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfileResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.rowCount); + return writer; + }; - /** - * Decodes a ListTasksRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListTasksRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTasksRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListTasksRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); + /** + * Encodes the specified DataProfileResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.IDataProfileResult} message DataProfileResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfileResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataProfileResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataScanEvent.DataProfileResult} DataProfileResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfileResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rowCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a ListTasksRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListTasksRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTasksRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a DataProfileResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataScanEvent.DataProfileResult} DataProfileResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfileResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a ListTasksRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListTasksRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListTasksRequest.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.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - return null; - }; + /** + * Verifies a DataProfileResult message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataProfileResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (!$util.isInteger(message.rowCount) && !(message.rowCount && $util.isInteger(message.rowCount.low) && $util.isInteger(message.rowCount.high))) + return "rowCount: integer|Long expected"; + return null; + }; - /** - * Creates a ListTasksRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListTasksRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListTasksRequest} ListTasksRequest - */ - ListTasksRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListTasksRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.ListTasksRequest(); - 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.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - return message; - }; + /** + * Creates a DataProfileResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataScanEvent.DataProfileResult} DataProfileResult + */ + DataProfileResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult) + return object; + var message = new $root.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult(); + if (object.rowCount != null) + if ($util.Long) + (message.rowCount = $util.Long.fromValue(object.rowCount)).unsigned = false; + else if (typeof object.rowCount === "string") + message.rowCount = parseInt(object.rowCount, 10); + else if (typeof object.rowCount === "number") + message.rowCount = object.rowCount; + else if (typeof object.rowCount === "object") + message.rowCount = new $util.LongBits(object.rowCount.low >>> 0, object.rowCount.high >>> 0).toNumber(); + return message; + }; - /** - * Creates a plain object from a ListTasksRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListTasksRequest - * @static - * @param {google.cloud.dataplex.v1.ListTasksRequest} message ListTasksRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListTasksRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - 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.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - return object; - }; + /** + * Creates a plain object from a DataProfileResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.DataProfileResult} message DataProfileResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataProfileResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.rowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.rowCount = options.longs === String ? "0" : 0; + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (typeof message.rowCount === "number") + object.rowCount = options.longs === String ? String(message.rowCount) : message.rowCount; + else + object.rowCount = options.longs === String ? $util.Long.prototype.toString.call(message.rowCount) : options.longs === Number ? new $util.LongBits(message.rowCount.low >>> 0, message.rowCount.high >>> 0).toNumber() : message.rowCount; + return object; + }; - /** - * Converts this ListTasksRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListTasksRequest - * @instance - * @returns {Object.} JSON object - */ - ListTasksRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this DataProfileResult to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + * @instance + * @returns {Object.} JSON object + */ + DataProfileResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for ListTasksRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListTasksRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListTasksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListTasksRequest"; - }; + /** + * Gets the default type url for DataProfileResult + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataProfileResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScanEvent.DataProfileResult"; + }; - return ListTasksRequest; - })(); + return DataProfileResult; + })(); - v1.ListTasksResponse = (function() { + DataScanEvent.DataQualityResult = (function() { - /** - * Properties of a ListTasksResponse. - * @memberof google.cloud.dataplex.v1 - * @interface IListTasksResponse - * @property {Array.|null} [tasks] ListTasksResponse tasks - * @property {string|null} [nextPageToken] ListTasksResponse nextPageToken - * @property {Array.|null} [unreachableLocations] ListTasksResponse unreachableLocations - */ + /** + * Properties of a DataQualityResult. + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @interface IDataQualityResult + * @property {number|Long|null} [rowCount] DataQualityResult rowCount + * @property {boolean|null} [passed] DataQualityResult passed + * @property {Object.|null} [dimensionPassed] DataQualityResult dimensionPassed + */ - /** - * Constructs a new ListTasksResponse. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListTasksResponse. - * @implements IListTasksResponse - * @constructor - * @param {google.cloud.dataplex.v1.IListTasksResponse=} [properties] Properties to set - */ - function ListTasksResponse(properties) { - this.tasks = []; - this.unreachableLocations = []; - 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]]; - } + /** + * Constructs a new DataQualityResult. + * @memberof google.cloud.dataplex.v1.DataScanEvent + * @classdesc Represents a DataQualityResult. + * @implements IDataQualityResult + * @constructor + * @param {google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult=} [properties] Properties to set + */ + function DataQualityResult(properties) { + this.dimensionPassed = {}; + 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]]; + } - /** - * ListTasksResponse tasks. - * @member {Array.} tasks - * @memberof google.cloud.dataplex.v1.ListTasksResponse - * @instance - */ - ListTasksResponse.prototype.tasks = $util.emptyArray; + /** + * DataQualityResult rowCount. + * @member {number|Long} rowCount + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult + * @instance + */ + DataQualityResult.prototype.rowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * ListTasksResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListTasksResponse - * @instance - */ - ListTasksResponse.prototype.nextPageToken = ""; + /** + * DataQualityResult passed. + * @member {boolean} passed + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult + * @instance + */ + DataQualityResult.prototype.passed = false; - /** - * ListTasksResponse unreachableLocations. - * @member {Array.} unreachableLocations - * @memberof google.cloud.dataplex.v1.ListTasksResponse - * @instance - */ - ListTasksResponse.prototype.unreachableLocations = $util.emptyArray; + /** + * DataQualityResult dimensionPassed. + * @member {Object.} dimensionPassed + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult + * @instance + */ + DataQualityResult.prototype.dimensionPassed = $util.emptyObject; - /** - * Creates a new ListTasksResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.ListTasksResponse - * @static - * @param {google.cloud.dataplex.v1.IListTasksResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse instance - */ - ListTasksResponse.create = function create(properties) { - return new ListTasksResponse(properties); - }; + /** + * Creates a new DataQualityResult instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DataScanEvent.DataQualityResult} DataQualityResult instance + */ + DataQualityResult.create = function create(properties) { + return new DataQualityResult(properties); + }; - /** - * Encodes the specified ListTasksResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.ListTasksResponse - * @static - * @param {google.cloud.dataplex.v1.IListTasksResponse} message ListTasksResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTasksResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tasks != null && message.tasks.length) - for (var i = 0; i < message.tasks.length; ++i) - $root.google.cloud.dataplex.v1.Task.encode(message.tasks[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); - if (message.unreachableLocations != null && message.unreachableLocations.length) - for (var i = 0; i < message.unreachableLocations.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachableLocations[i]); - return writer; - }; + /** + * Encodes the specified DataQualityResult message. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult} message DataQualityResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQualityResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.rowCount); + if (message.passed != null && Object.hasOwnProperty.call(message, "passed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.passed); + if (message.dimensionPassed != null && Object.hasOwnProperty.call(message, "dimensionPassed")) + for (var keys = Object.keys(message.dimensionPassed), 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 0 =*/16).bool(message.dimensionPassed[keys[i]]).ldelim(); + return writer; + }; - /** - * Encodes the specified ListTasksResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListTasksResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListTasksResponse - * @static - * @param {google.cloud.dataplex.v1.IListTasksResponse} message ListTasksResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTasksResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified DataQualityResult message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.IDataQualityResult} message DataQualityResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataQualityResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ListTasksResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.ListTasksResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTasksResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListTasksResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.tasks && message.tasks.length)) - message.tasks = []; - message.tasks.push($root.google.cloud.dataplex.v1.Task.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - case 3: { - if (!(message.unreachableLocations && message.unreachableLocations.length)) - message.unreachableLocations = []; - message.unreachableLocations.push(reader.string()); + /** + * Decodes a DataQualityResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.DataScanEvent.DataQualityResult} DataQualityResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQualityResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rowCount = reader.int64(); + break; + } + case 2: { + message.passed = reader.bool(); + break; + } + case 3: { + if (message.dimensionPassed === $util.emptyObject) + message.dimensionPassed = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = false; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.bool(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.dimensionPassed[key] = value; + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a ListTasksResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListTasksResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTasksResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a DataQualityResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.DataScanEvent.DataQualityResult} DataQualityResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataQualityResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a ListTasksResponse message. - * @function verify - * @memberof google.cloud.dataplex.v1.ListTasksResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListTasksResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tasks != null && message.hasOwnProperty("tasks")) { - if (!Array.isArray(message.tasks)) - return "tasks: array expected"; - for (var i = 0; i < message.tasks.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Task.verify(message.tasks[i]); - if (error) - return "tasks." + error; + /** + * Verifies a DataQualityResult message. + * @function verify + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataQualityResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (!$util.isInteger(message.rowCount) && !(message.rowCount && $util.isInteger(message.rowCount.low) && $util.isInteger(message.rowCount.high))) + return "rowCount: integer|Long expected"; + if (message.passed != null && message.hasOwnProperty("passed")) + if (typeof message.passed !== "boolean") + return "passed: boolean expected"; + if (message.dimensionPassed != null && message.hasOwnProperty("dimensionPassed")) { + if (!$util.isObject(message.dimensionPassed)) + return "dimensionPassed: object expected"; + var key = Object.keys(message.dimensionPassed); + for (var i = 0; i < key.length; ++i) + if (typeof message.dimensionPassed[key[i]] !== "boolean") + return "dimensionPassed: boolean{k:string} expected"; } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachableLocations != null && message.hasOwnProperty("unreachableLocations")) { - if (!Array.isArray(message.unreachableLocations)) - return "unreachableLocations: array expected"; - for (var i = 0; i < message.unreachableLocations.length; ++i) - if (!$util.isString(message.unreachableLocations[i])) - return "unreachableLocations: string[] expected"; - } - return null; - }; + return null; + }; - /** - * Creates a ListTasksResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.ListTasksResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListTasksResponse} ListTasksResponse - */ - ListTasksResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListTasksResponse) - return object; - var message = new $root.google.cloud.dataplex.v1.ListTasksResponse(); - if (object.tasks) { - if (!Array.isArray(object.tasks)) - throw TypeError(".google.cloud.dataplex.v1.ListTasksResponse.tasks: array expected"); - message.tasks = []; - for (var i = 0; i < object.tasks.length; ++i) { - if (typeof object.tasks[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListTasksResponse.tasks: object expected"); - message.tasks[i] = $root.google.cloud.dataplex.v1.Task.fromObject(object.tasks[i]); + /** + * Creates a DataQualityResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.DataScanEvent.DataQualityResult} DataQualityResult + */ + DataQualityResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult) + return object; + var message = new $root.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult(); + if (object.rowCount != null) + if ($util.Long) + (message.rowCount = $util.Long.fromValue(object.rowCount)).unsigned = false; + else if (typeof object.rowCount === "string") + message.rowCount = parseInt(object.rowCount, 10); + else if (typeof object.rowCount === "number") + message.rowCount = object.rowCount; + else if (typeof object.rowCount === "object") + message.rowCount = new $util.LongBits(object.rowCount.low >>> 0, object.rowCount.high >>> 0).toNumber(); + if (object.passed != null) + message.passed = Boolean(object.passed); + if (object.dimensionPassed) { + if (typeof object.dimensionPassed !== "object") + throw TypeError(".google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.dimensionPassed: object expected"); + message.dimensionPassed = {}; + for (var keys = Object.keys(object.dimensionPassed), i = 0; i < keys.length; ++i) + message.dimensionPassed[keys[i]] = Boolean(object.dimensionPassed[keys[i]]); } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachableLocations) { - if (!Array.isArray(object.unreachableLocations)) - throw TypeError(".google.cloud.dataplex.v1.ListTasksResponse.unreachableLocations: array expected"); - message.unreachableLocations = []; - for (var i = 0; i < object.unreachableLocations.length; ++i) - message.unreachableLocations[i] = String(object.unreachableLocations[i]); - } - return message; - }; + return message; + }; + + /** + * Creates a plain object from a DataQualityResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult + * @static + * @param {google.cloud.dataplex.v1.DataScanEvent.DataQualityResult} message DataQualityResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataQualityResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.dimensionPassed = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.rowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.rowCount = options.longs === String ? "0" : 0; + object.passed = false; + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (typeof message.rowCount === "number") + object.rowCount = options.longs === String ? String(message.rowCount) : message.rowCount; + else + object.rowCount = options.longs === String ? $util.Long.prototype.toString.call(message.rowCount) : options.longs === Number ? new $util.LongBits(message.rowCount.low >>> 0, message.rowCount.high >>> 0).toNumber() : message.rowCount; + if (message.passed != null && message.hasOwnProperty("passed")) + object.passed = message.passed; + var keys2; + if (message.dimensionPassed && (keys2 = Object.keys(message.dimensionPassed)).length) { + object.dimensionPassed = {}; + for (var j = 0; j < keys2.length; ++j) + object.dimensionPassed[keys2[j]] = message.dimensionPassed[keys2[j]]; + } + return object; + }; + + /** + * Converts this DataQualityResult to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult + * @instance + * @returns {Object.} JSON object + */ + DataQualityResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataQualityResult + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.DataScanEvent.DataQualityResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataQualityResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.DataScanEvent.DataQualityResult"; + }; - /** - * Creates a plain object from a ListTasksResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.ListTasksResponse - * @static - * @param {google.cloud.dataplex.v1.ListTasksResponse} message ListTasksResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListTasksResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.tasks = []; - object.unreachableLocations = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.tasks && message.tasks.length) { - object.tasks = []; - for (var j = 0; j < message.tasks.length; ++j) - object.tasks[j] = $root.google.cloud.dataplex.v1.Task.toObject(message.tasks[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachableLocations && message.unreachableLocations.length) { - object.unreachableLocations = []; - for (var j = 0; j < message.unreachableLocations.length; ++j) - object.unreachableLocations[j] = message.unreachableLocations[j]; - } - return object; - }; + return DataQualityResult; + })(); + + return DataScanEvent; + })(); + + v1.MetadataService = (function() { /** - * Converts this ListTasksResponse to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.ListTasksResponse - * @instance - * @returns {Object.} JSON object + * Constructs a new MetadataService service. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a MetadataService + * @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 */ - ListTasksResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + function MetadataService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (MetadataService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MetadataService; /** - * Gets the default type url for ListTasksResponse - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListTasksResponse + * Creates new MetadataService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dataplex.v1.MetadataService * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * @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 {MetadataService} RPC service. Useful where requests and/or responses are streamed. */ - ListTasksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListTasksResponse"; + MetadataService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); }; - return ListTasksResponse; - })(); - - v1.GetTaskRequest = (function() { - /** - * Properties of a GetTaskRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IGetTaskRequest - * @property {string|null} [name] GetTaskRequest name + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|createEntity}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef CreateEntityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Entity} [response] Entity */ /** - * Constructs a new GetTaskRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetTaskRequest. - * @implements IGetTaskRequest - * @constructor - * @param {google.cloud.dataplex.v1.IGetTaskRequest=} [properties] Properties to set + * Calls CreateEntity. + * @function createEntity + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.ICreateEntityRequest} request CreateEntityRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.CreateEntityCallback} callback Node-style callback called with the error, if any, and Entity + * @returns {undefined} + * @variation 1 */ - function GetTaskRequest(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]]; - } + Object.defineProperty(MetadataService.prototype.createEntity = function createEntity(request, callback) { + return this.rpcCall(createEntity, $root.google.cloud.dataplex.v1.CreateEntityRequest, $root.google.cloud.dataplex.v1.Entity, request, callback); + }, "name", { value: "CreateEntity" }); /** - * GetTaskRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GetTaskRequest + * Calls CreateEntity. + * @function createEntity + * @memberof google.cloud.dataplex.v1.MetadataService * @instance + * @param {google.cloud.dataplex.v1.ICreateEntityRequest} request CreateEntityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetTaskRequest.prototype.name = ""; /** - * Creates a new GetTaskRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.GetTaskRequest - * @static - * @param {google.cloud.dataplex.v1.IGetTaskRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest instance + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|updateEntity}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef UpdateEntityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Entity} [response] Entity */ - GetTaskRequest.create = function create(properties) { - return new GetTaskRequest(properties); - }; /** - * Encodes the specified GetTaskRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.GetTaskRequest - * @static - * @param {google.cloud.dataplex.v1.IGetTaskRequest} message GetTaskRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls UpdateEntity. + * @function updateEntity + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateEntityRequest} request UpdateEntityRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.UpdateEntityCallback} callback Node-style callback called with the error, if any, and Entity + * @returns {undefined} + * @variation 1 */ - GetTaskRequest.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; - }; + Object.defineProperty(MetadataService.prototype.updateEntity = function updateEntity(request, callback) { + return this.rpcCall(updateEntity, $root.google.cloud.dataplex.v1.UpdateEntityRequest, $root.google.cloud.dataplex.v1.Entity, request, callback); + }, "name", { value: "UpdateEntity" }); /** - * Encodes the specified GetTaskRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetTaskRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetTaskRequest - * @static - * @param {google.cloud.dataplex.v1.IGetTaskRequest} message GetTaskRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls UpdateEntity. + * @function updateEntity + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IUpdateEntityRequest} request UpdateEntityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetTaskRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a GetTaskRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.GetTaskRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|deleteEntity}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef DeleteEntityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty */ - GetTaskRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetTaskRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a GetTaskRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetTaskRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteEntity. + * @function deleteEntity + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteEntityRequest} request DeleteEntityRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.DeleteEntityCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 */ - GetTaskRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(MetadataService.prototype.deleteEntity = function deleteEntity(request, callback) { + return this.rpcCall(deleteEntity, $root.google.cloud.dataplex.v1.DeleteEntityRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteEntity" }); /** - * Verifies a GetTaskRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.GetTaskRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls DeleteEntity. + * @function deleteEntity + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IDeleteEntityRequest} request DeleteEntityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetTaskRequest.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 GetTaskRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.GetTaskRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetTaskRequest} GetTaskRequest + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|getEntity}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef GetEntityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Entity} [response] Entity */ - GetTaskRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetTaskRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.GetTaskRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; /** - * Creates a plain object from a GetTaskRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.GetTaskRequest - * @static - * @param {google.cloud.dataplex.v1.GetTaskRequest} message GetTaskRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls GetEntity. + * @function getEntity + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IGetEntityRequest} request GetEntityRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.GetEntityCallback} callback Node-style callback called with the error, if any, and Entity + * @returns {undefined} + * @variation 1 */ - GetTaskRequest.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; - }; + Object.defineProperty(MetadataService.prototype.getEntity = function getEntity(request, callback) { + return this.rpcCall(getEntity, $root.google.cloud.dataplex.v1.GetEntityRequest, $root.google.cloud.dataplex.v1.Entity, request, callback); + }, "name", { value: "GetEntity" }); /** - * Converts this GetTaskRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.GetTaskRequest + * Calls GetEntity. + * @function getEntity + * @memberof google.cloud.dataplex.v1.MetadataService * @instance - * @returns {Object.} JSON object + * @param {google.cloud.dataplex.v1.IGetEntityRequest} request GetEntityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetTaskRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; /** - * Gets the default type url for GetTaskRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GetTaskRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|listEntities}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef ListEntitiesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListEntitiesResponse} [response] ListEntitiesResponse */ - GetTaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GetTaskRequest"; - }; - return GetTaskRequest; - })(); - - v1.GetJobRequest = (function() { + /** + * Calls ListEntities. + * @function listEntities + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IListEntitiesRequest} request ListEntitiesRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.ListEntitiesCallback} callback Node-style callback called with the error, if any, and ListEntitiesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MetadataService.prototype.listEntities = function listEntities(request, callback) { + return this.rpcCall(listEntities, $root.google.cloud.dataplex.v1.ListEntitiesRequest, $root.google.cloud.dataplex.v1.ListEntitiesResponse, request, callback); + }, "name", { value: "ListEntities" }); /** - * Properties of a GetJobRequest. - * @memberof google.cloud.dataplex.v1 - * @interface IGetJobRequest - * @property {string|null} [name] GetJobRequest name + * Calls ListEntities. + * @function listEntities + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IListEntitiesRequest} request ListEntitiesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new GetJobRequest. - * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetJobRequest. - * @implements IGetJobRequest - * @constructor - * @param {google.cloud.dataplex.v1.IGetJobRequest=} [properties] Properties to set + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|createPartition}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef CreatePartitionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Partition} [response] Partition */ - function GetJobRequest(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]]; - } /** - * GetJobRequest name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.GetJobRequest + * Calls CreatePartition. + * @function createPartition + * @memberof google.cloud.dataplex.v1.MetadataService * @instance + * @param {google.cloud.dataplex.v1.ICreatePartitionRequest} request CreatePartitionRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.CreatePartitionCallback} callback Node-style callback called with the error, if any, and Partition + * @returns {undefined} + * @variation 1 */ - GetJobRequest.prototype.name = ""; + Object.defineProperty(MetadataService.prototype.createPartition = function createPartition(request, callback) { + return this.rpcCall(createPartition, $root.google.cloud.dataplex.v1.CreatePartitionRequest, $root.google.cloud.dataplex.v1.Partition, request, callback); + }, "name", { value: "CreatePartition" }); /** - * Creates a new GetJobRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.GetJobRequest - * @static - * @param {google.cloud.dataplex.v1.IGetJobRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest instance + * Calls CreatePartition. + * @function createPartition + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.ICreatePartitionRequest} request CreatePartitionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetJobRequest.create = function create(properties) { - return new GetJobRequest(properties); - }; /** - * Encodes the specified GetJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.GetJobRequest - * @static - * @param {google.cloud.dataplex.v1.IGetJobRequest} message GetJobRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|deletePartition}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef DeletePartitionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty */ - GetJobRequest.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 GetJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetJobRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetJobRequest - * @static - * @param {google.cloud.dataplex.v1.IGetJobRequest} message GetJobRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls DeletePartition. + * @function deletePartition + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IDeletePartitionRequest} request DeletePartitionRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.DeletePartitionCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 */ - GetJobRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(MetadataService.prototype.deletePartition = function deletePartition(request, callback) { + return this.rpcCall(deletePartition, $root.google.cloud.dataplex.v1.DeletePartitionRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeletePartition" }); /** - * Decodes a GetJobRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.GetJobRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeletePartition. + * @function deletePartition + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IDeletePartitionRequest} request DeletePartitionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetJobRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetJobRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a GetJobRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetJobRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|getPartition}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef GetPartitionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.Partition} [response] Partition */ - GetJobRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a GetJobRequest message. - * @function verify - * @memberof google.cloud.dataplex.v1.GetJobRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls GetPartition. + * @function getPartition + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IGetPartitionRequest} request GetPartitionRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.GetPartitionCallback} callback Node-style callback called with the error, if any, and Partition + * @returns {undefined} + * @variation 1 */ - GetJobRequest.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; - }; + Object.defineProperty(MetadataService.prototype.getPartition = function getPartition(request, callback) { + return this.rpcCall(getPartition, $root.google.cloud.dataplex.v1.GetPartitionRequest, $root.google.cloud.dataplex.v1.Partition, request, callback); + }, "name", { value: "GetPartition" }); /** - * Creates a GetJobRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.GetJobRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetJobRequest} GetJobRequest + * Calls GetPartition. + * @function getPartition + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IGetPartitionRequest} request GetPartitionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetJobRequest) - return object; - var message = new $root.google.cloud.dataplex.v1.GetJobRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; /** - * Creates a plain object from a GetJobRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.GetJobRequest - * @static - * @param {google.cloud.dataplex.v1.GetJobRequest} message GetJobRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.dataplex.v1.MetadataService|listPartitions}. + * @memberof google.cloud.dataplex.v1.MetadataService + * @typedef ListPartitionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dataplex.v1.ListPartitionsResponse} [response] ListPartitionsResponse */ - GetJobRequest.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 GetJobRequest to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.GetJobRequest + * Calls ListPartitions. + * @function listPartitions + * @memberof google.cloud.dataplex.v1.MetadataService * @instance - * @returns {Object.} JSON object + * @param {google.cloud.dataplex.v1.IListPartitionsRequest} request ListPartitionsRequest message or plain object + * @param {google.cloud.dataplex.v1.MetadataService.ListPartitionsCallback} callback Node-style callback called with the error, if any, and ListPartitionsResponse + * @returns {undefined} + * @variation 1 */ - GetJobRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(MetadataService.prototype.listPartitions = function listPartitions(request, callback) { + return this.rpcCall(listPartitions, $root.google.cloud.dataplex.v1.ListPartitionsRequest, $root.google.cloud.dataplex.v1.ListPartitionsResponse, request, callback); + }, "name", { value: "ListPartitions" }); /** - * Gets the default type url for GetJobRequest - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GetJobRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Calls ListPartitions. + * @function listPartitions + * @memberof google.cloud.dataplex.v1.MetadataService + * @instance + * @param {google.cloud.dataplex.v1.IListPartitionsRequest} request ListPartitionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GetJobRequest"; - }; - return GetJobRequest; + return MetadataService; })(); - v1.ListJobsRequest = (function() { + v1.CreateEntityRequest = (function() { /** - * Properties of a ListJobsRequest. + * Properties of a CreateEntityRequest. * @memberof google.cloud.dataplex.v1 - * @interface IListJobsRequest - * @property {string|null} [parent] ListJobsRequest parent - * @property {number|null} [pageSize] ListJobsRequest pageSize - * @property {string|null} [pageToken] ListJobsRequest pageToken + * @interface ICreateEntityRequest + * @property {string|null} [parent] CreateEntityRequest parent + * @property {google.cloud.dataplex.v1.IEntity|null} [entity] CreateEntityRequest entity + * @property {boolean|null} [validateOnly] CreateEntityRequest validateOnly */ /** - * Constructs a new ListJobsRequest. + * Constructs a new CreateEntityRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListJobsRequest. - * @implements IListJobsRequest + * @classdesc Represents a CreateEntityRequest. + * @implements ICreateEntityRequest * @constructor - * @param {google.cloud.dataplex.v1.IListJobsRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.ICreateEntityRequest=} [properties] Properties to set */ - function ListJobsRequest(properties) { + function CreateEntityRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -45857,90 +46604,90 @@ } /** - * ListJobsRequest parent. + * CreateEntityRequest parent. * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @memberof google.cloud.dataplex.v1.CreateEntityRequest * @instance */ - ListJobsRequest.prototype.parent = ""; + CreateEntityRequest.prototype.parent = ""; /** - * ListJobsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListJobsRequest + * CreateEntityRequest entity. + * @member {google.cloud.dataplex.v1.IEntity|null|undefined} entity + * @memberof google.cloud.dataplex.v1.CreateEntityRequest * @instance */ - ListJobsRequest.prototype.pageSize = 0; + CreateEntityRequest.prototype.entity = null; /** - * ListJobsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListJobsRequest + * CreateEntityRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreateEntityRequest * @instance */ - ListJobsRequest.prototype.pageToken = ""; + CreateEntityRequest.prototype.validateOnly = false; /** - * Creates a new ListJobsRequest instance using the specified properties. + * Creates a new CreateEntityRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @memberof google.cloud.dataplex.v1.CreateEntityRequest * @static - * @param {google.cloud.dataplex.v1.IListJobsRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest instance + * @param {google.cloud.dataplex.v1.ICreateEntityRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreateEntityRequest} CreateEntityRequest instance */ - ListJobsRequest.create = function create(properties) { - return new ListJobsRequest(properties); + CreateEntityRequest.create = function create(properties) { + return new CreateEntityRequest(properties); }; /** - * Encodes the specified ListJobsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. + * Encodes the specified CreateEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntityRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @memberof google.cloud.dataplex.v1.CreateEntityRequest * @static - * @param {google.cloud.dataplex.v1.IListJobsRequest} message ListJobsRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.ICreateEntityRequest} message CreateEntityRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListJobsRequest.encode = function encode(message, writer) { + CreateEntityRequest.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.entity != null && Object.hasOwnProperty.call(message, "entity")) + $root.google.cloud.dataplex.v1.Entity.encode(message.entity, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); return writer; }; /** - * Encodes the specified ListJobsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsRequest.verify|verify} messages. + * Encodes the specified CreateEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateEntityRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @memberof google.cloud.dataplex.v1.CreateEntityRequest * @static - * @param {google.cloud.dataplex.v1.IListJobsRequest} message ListJobsRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.ICreateEntityRequest} message CreateEntityRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListJobsRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateEntityRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListJobsRequest message from the specified reader or buffer. + * Decodes a CreateEntityRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @memberof google.cloud.dataplex.v1.CreateEntityRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest + * @returns {google.cloud.dataplex.v1.CreateEntityRequest} CreateEntityRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListJobsRequest.decode = function decode(reader, length) { + CreateEntityRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListJobsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateEntityRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -45948,12 +46695,12 @@ message.parent = reader.string(); break; } - case 2: { - message.pageSize = reader.int32(); + case 3: { + message.entity = $root.google.cloud.dataplex.v1.Entity.decode(reader, reader.uint32()); break; } - case 3: { - message.pageToken = reader.string(); + case 4: { + message.validateOnly = reader.bool(); break; } default: @@ -45965,141 +46712,145 @@ }; /** - * Decodes a ListJobsRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateEntityRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @memberof google.cloud.dataplex.v1.CreateEntityRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest + * @returns {google.cloud.dataplex.v1.CreateEntityRequest} CreateEntityRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListJobsRequest.decodeDelimited = function decodeDelimited(reader) { + CreateEntityRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListJobsRequest message. + * Verifies a CreateEntityRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @memberof google.cloud.dataplex.v1.CreateEntityRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListJobsRequest.verify = function verify(message) { + CreateEntityRequest.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.entity != null && message.hasOwnProperty("entity")) { + var error = $root.google.cloud.dataplex.v1.Entity.verify(message.entity); + if (error) + return "entity." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a ListJobsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateEntityRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @memberof google.cloud.dataplex.v1.CreateEntityRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListJobsRequest} ListJobsRequest + * @returns {google.cloud.dataplex.v1.CreateEntityRequest} CreateEntityRequest */ - ListJobsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListJobsRequest) + CreateEntityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreateEntityRequest) return object; - var message = new $root.google.cloud.dataplex.v1.ListJobsRequest(); + var message = new $root.google.cloud.dataplex.v1.CreateEntityRequest(); 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.entity != null) { + if (typeof object.entity !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreateEntityRequest.entity: object expected"); + message.entity = $root.google.cloud.dataplex.v1.Entity.fromObject(object.entity); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a ListJobsRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateEntityRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @memberof google.cloud.dataplex.v1.CreateEntityRequest * @static - * @param {google.cloud.dataplex.v1.ListJobsRequest} message ListJobsRequest + * @param {google.cloud.dataplex.v1.CreateEntityRequest} message CreateEntityRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListJobsRequest.toObject = function toObject(message, options) { + CreateEntityRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; + object.entity = null; + object.validateOnly = false; } 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.entity != null && message.hasOwnProperty("entity")) + object.entity = $root.google.cloud.dataplex.v1.Entity.toObject(message.entity, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this ListJobsRequest to JSON. + * Converts this CreateEntityRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @memberof google.cloud.dataplex.v1.CreateEntityRequest * @instance * @returns {Object.} JSON object */ - ListJobsRequest.prototype.toJSON = function toJSON() { + CreateEntityRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListJobsRequest + * Gets the default type url for CreateEntityRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListJobsRequest + * @memberof google.cloud.dataplex.v1.CreateEntityRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListJobsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateEntityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListJobsRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateEntityRequest"; }; - return ListJobsRequest; + return CreateEntityRequest; })(); - v1.ListJobsResponse = (function() { + v1.UpdateEntityRequest = (function() { /** - * Properties of a ListJobsResponse. + * Properties of an UpdateEntityRequest. * @memberof google.cloud.dataplex.v1 - * @interface IListJobsResponse - * @property {Array.|null} [jobs] ListJobsResponse jobs - * @property {string|null} [nextPageToken] ListJobsResponse nextPageToken + * @interface IUpdateEntityRequest + * @property {google.cloud.dataplex.v1.IEntity|null} [entity] UpdateEntityRequest entity + * @property {boolean|null} [validateOnly] UpdateEntityRequest validateOnly */ /** - * Constructs a new ListJobsResponse. + * Constructs a new UpdateEntityRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListJobsResponse. - * @implements IListJobsResponse + * @classdesc Represents an UpdateEntityRequest. + * @implements IUpdateEntityRequest * @constructor - * @param {google.cloud.dataplex.v1.IListJobsResponse=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IUpdateEntityRequest=} [properties] Properties to set */ - function ListJobsResponse(properties) { - this.jobs = []; + function UpdateEntityRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -46107,92 +46858,89 @@ } /** - * ListJobsResponse jobs. - * @member {Array.} jobs - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * UpdateEntityRequest entity. + * @member {google.cloud.dataplex.v1.IEntity|null|undefined} entity + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest * @instance */ - ListJobsResponse.prototype.jobs = $util.emptyArray; + UpdateEntityRequest.prototype.entity = null; /** - * ListJobsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * UpdateEntityRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest * @instance */ - ListJobsResponse.prototype.nextPageToken = ""; + UpdateEntityRequest.prototype.validateOnly = false; /** - * Creates a new ListJobsResponse instance using the specified properties. + * Creates a new UpdateEntityRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest * @static - * @param {google.cloud.dataplex.v1.IListJobsResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse instance + * @param {google.cloud.dataplex.v1.IUpdateEntityRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.UpdateEntityRequest} UpdateEntityRequest instance */ - ListJobsResponse.create = function create(properties) { - return new ListJobsResponse(properties); + UpdateEntityRequest.create = function create(properties) { + return new UpdateEntityRequest(properties); }; /** - * Encodes the specified ListJobsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. + * Encodes the specified UpdateEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntityRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest * @static - * @param {google.cloud.dataplex.v1.IListJobsResponse} message ListJobsResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.IUpdateEntityRequest} message UpdateEntityRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListJobsResponse.encode = function encode(message, writer) { + UpdateEntityRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.jobs != null && message.jobs.length) - for (var i = 0; i < message.jobs.length; ++i) - $root.google.cloud.dataplex.v1.Job.encode(message.jobs[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); + if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) + $root.google.cloud.dataplex.v1.Entity.encode(message.entity, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); return writer; }; /** - * Encodes the specified ListJobsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListJobsResponse.verify|verify} messages. + * Encodes the specified UpdateEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEntityRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest * @static - * @param {google.cloud.dataplex.v1.IListJobsResponse} message ListJobsResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.IUpdateEntityRequest} message UpdateEntityRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListJobsResponse.encodeDelimited = function encodeDelimited(message, writer) { + UpdateEntityRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListJobsResponse message from the specified reader or buffer. + * Decodes an UpdateEntityRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse + * @returns {google.cloud.dataplex.v1.UpdateEntityRequest} UpdateEntityRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListJobsResponse.decode = function decode(reader, length) { + UpdateEntityRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListJobsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateEntityRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - if (!(message.jobs && message.jobs.length)) - message.jobs = []; - message.jobs.push($root.google.cloud.dataplex.v1.Job.decode(reader, reader.uint32())); + case 2: { + message.entity = $root.google.cloud.dataplex.v1.Entity.decode(reader, reader.uint32()); break; } - case 2: { - message.nextPageToken = reader.string(); + case 3: { + message.validateOnly = reader.bool(); break; } default: @@ -46204,148 +46952,137 @@ }; /** - * Decodes a ListJobsResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateEntityRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse + * @returns {google.cloud.dataplex.v1.UpdateEntityRequest} UpdateEntityRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListJobsResponse.decodeDelimited = function decodeDelimited(reader) { + UpdateEntityRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListJobsResponse message. + * Verifies an UpdateEntityRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListJobsResponse.verify = function verify(message) { + UpdateEntityRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.jobs != null && message.hasOwnProperty("jobs")) { - if (!Array.isArray(message.jobs)) - return "jobs: array expected"; - for (var i = 0; i < message.jobs.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Job.verify(message.jobs[i]); - if (error) - return "jobs." + error; - } + if (message.entity != null && message.hasOwnProperty("entity")) { + var error = $root.google.cloud.dataplex.v1.Entity.verify(message.entity); + if (error) + return "entity." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a ListJobsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateEntityRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListJobsResponse} ListJobsResponse + * @returns {google.cloud.dataplex.v1.UpdateEntityRequest} UpdateEntityRequest */ - ListJobsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListJobsResponse) + UpdateEntityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.UpdateEntityRequest) return object; - var message = new $root.google.cloud.dataplex.v1.ListJobsResponse(); - if (object.jobs) { - if (!Array.isArray(object.jobs)) - throw TypeError(".google.cloud.dataplex.v1.ListJobsResponse.jobs: array expected"); - message.jobs = []; - for (var i = 0; i < object.jobs.length; ++i) { - if (typeof object.jobs[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListJobsResponse.jobs: object expected"); - message.jobs[i] = $root.google.cloud.dataplex.v1.Job.fromObject(object.jobs[i]); - } + var message = new $root.google.cloud.dataplex.v1.UpdateEntityRequest(); + if (object.entity != null) { + if (typeof object.entity !== "object") + throw TypeError(".google.cloud.dataplex.v1.UpdateEntityRequest.entity: object expected"); + message.entity = $root.google.cloud.dataplex.v1.Entity.fromObject(object.entity); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a ListJobsResponse message. Also converts values to other types if specified. + * Creates a plain object from an UpdateEntityRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest * @static - * @param {google.cloud.dataplex.v1.ListJobsResponse} message ListJobsResponse + * @param {google.cloud.dataplex.v1.UpdateEntityRequest} message UpdateEntityRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListJobsResponse.toObject = function toObject(message, options) { + UpdateEntityRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.jobs = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.jobs && message.jobs.length) { - object.jobs = []; - for (var j = 0; j < message.jobs.length; ++j) - object.jobs[j] = $root.google.cloud.dataplex.v1.Job.toObject(message.jobs[j], options); + if (options.defaults) { + object.entity = null; + object.validateOnly = false; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.entity != null && message.hasOwnProperty("entity")) + object.entity = $root.google.cloud.dataplex.v1.Entity.toObject(message.entity, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this ListJobsResponse to JSON. + * Converts this UpdateEntityRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest * @instance * @returns {Object.} JSON object */ - ListJobsResponse.prototype.toJSON = function toJSON() { + UpdateEntityRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListJobsResponse + * Gets the default type url for UpdateEntityRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListJobsResponse + * @memberof google.cloud.dataplex.v1.UpdateEntityRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListJobsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateEntityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListJobsResponse"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateEntityRequest"; }; - return ListJobsResponse; + return UpdateEntityRequest; })(); - v1.CancelJobRequest = (function() { + v1.DeleteEntityRequest = (function() { /** - * Properties of a CancelJobRequest. + * Properties of a DeleteEntityRequest. * @memberof google.cloud.dataplex.v1 - * @interface ICancelJobRequest - * @property {string|null} [name] CancelJobRequest name + * @interface IDeleteEntityRequest + * @property {string|null} [name] DeleteEntityRequest name + * @property {string|null} [etag] DeleteEntityRequest etag */ /** - * Constructs a new CancelJobRequest. + * Constructs a new DeleteEntityRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CancelJobRequest. - * @implements ICancelJobRequest + * @classdesc Represents a DeleteEntityRequest. + * @implements IDeleteEntityRequest * @constructor - * @param {google.cloud.dataplex.v1.ICancelJobRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IDeleteEntityRequest=} [properties] Properties to set */ - function CancelJobRequest(properties) { + function DeleteEntityRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -46353,70 +47090,80 @@ } /** - * CancelJobRequest name. + * DeleteEntityRequest name. * @member {string} name - * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest * @instance */ - CancelJobRequest.prototype.name = ""; + DeleteEntityRequest.prototype.name = ""; /** - * Creates a new CancelJobRequest instance using the specified properties. + * DeleteEntityRequest etag. + * @member {string} etag + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest + * @instance + */ + DeleteEntityRequest.prototype.etag = ""; + + /** + * Creates a new DeleteEntityRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest * @static - * @param {google.cloud.dataplex.v1.ICancelJobRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest instance + * @param {google.cloud.dataplex.v1.IDeleteEntityRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeleteEntityRequest} DeleteEntityRequest instance */ - CancelJobRequest.create = function create(properties) { - return new CancelJobRequest(properties); + DeleteEntityRequest.create = function create(properties) { + return new DeleteEntityRequest(properties); }; /** - * Encodes the specified CancelJobRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. + * Encodes the specified DeleteEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEntityRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest * @static - * @param {google.cloud.dataplex.v1.ICancelJobRequest} message CancelJobRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IDeleteEntityRequest} message DeleteEntityRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CancelJobRequest.encode = function encode(message, writer) { + DeleteEntityRequest.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.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); return writer; }; /** - * Encodes the specified CancelJobRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CancelJobRequest.verify|verify} messages. + * Encodes the specified DeleteEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEntityRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest * @static - * @param {google.cloud.dataplex.v1.ICancelJobRequest} message CancelJobRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IDeleteEntityRequest} message DeleteEntityRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CancelJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteEntityRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CancelJobRequest message from the specified reader or buffer. + * Decodes a DeleteEntityRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest + * @returns {google.cloud.dataplex.v1.DeleteEntityRequest} DeleteEntityRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CancelJobRequest.decode = function decode(reader, length) { + DeleteEntityRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CancelJobRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteEntityRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -46424,6 +47171,10 @@ message.name = reader.string(); break; } + case 2: { + message.etag = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -46433,125 +47184,135 @@ }; /** - * Decodes a CancelJobRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteEntityRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest + * @returns {google.cloud.dataplex.v1.DeleteEntityRequest} DeleteEntityRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CancelJobRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteEntityRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CancelJobRequest message. + * Verifies a DeleteEntityRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CancelJobRequest.verify = function verify(message) { + DeleteEntityRequest.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.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; return null; }; /** - * Creates a CancelJobRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteEntityRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CancelJobRequest} CancelJobRequest + * @returns {google.cloud.dataplex.v1.DeleteEntityRequest} DeleteEntityRequest */ - CancelJobRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CancelJobRequest) + DeleteEntityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeleteEntityRequest) return object; - var message = new $root.google.cloud.dataplex.v1.CancelJobRequest(); + var message = new $root.google.cloud.dataplex.v1.DeleteEntityRequest(); if (object.name != null) message.name = String(object.name); + if (object.etag != null) + message.etag = String(object.etag); return message; }; /** - * Creates a plain object from a CancelJobRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteEntityRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest * @static - * @param {google.cloud.dataplex.v1.CancelJobRequest} message CancelJobRequest + * @param {google.cloud.dataplex.v1.DeleteEntityRequest} message DeleteEntityRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CancelJobRequest.toObject = function toObject(message, options) { + DeleteEntityRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.name = ""; + object.etag = ""; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; return object; }; /** - * Converts this CancelJobRequest to JSON. + * Converts this DeleteEntityRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest * @instance * @returns {Object.} JSON object */ - CancelJobRequest.prototype.toJSON = function toJSON() { + DeleteEntityRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CancelJobRequest + * Gets the default type url for DeleteEntityRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.CancelJobRequest + * @memberof google.cloud.dataplex.v1.DeleteEntityRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CancelJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteEntityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.CancelJobRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteEntityRequest"; }; - return CancelJobRequest; + return DeleteEntityRequest; })(); - v1.CreateEnvironmentRequest = (function() { + v1.ListEntitiesRequest = (function() { /** - * Properties of a CreateEnvironmentRequest. + * Properties of a ListEntitiesRequest. * @memberof google.cloud.dataplex.v1 - * @interface ICreateEnvironmentRequest - * @property {string|null} [parent] CreateEnvironmentRequest parent - * @property {string|null} [environmentId] CreateEnvironmentRequest environmentId - * @property {google.cloud.dataplex.v1.IEnvironment|null} [environment] CreateEnvironmentRequest environment - * @property {boolean|null} [validateOnly] CreateEnvironmentRequest validateOnly + * @interface IListEntitiesRequest + * @property {string|null} [parent] ListEntitiesRequest parent + * @property {google.cloud.dataplex.v1.ListEntitiesRequest.EntityView|null} [view] ListEntitiesRequest view + * @property {number|null} [pageSize] ListEntitiesRequest pageSize + * @property {string|null} [pageToken] ListEntitiesRequest pageToken + * @property {string|null} [filter] ListEntitiesRequest filter */ /** - * Constructs a new CreateEnvironmentRequest. + * Constructs a new ListEntitiesRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a CreateEnvironmentRequest. - * @implements ICreateEnvironmentRequest + * @classdesc Represents a ListEntitiesRequest. + * @implements IListEntitiesRequest * @constructor - * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListEntitiesRequest=} [properties] Properties to set */ - function CreateEnvironmentRequest(properties) { + function ListEntitiesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -46559,100 +47320,110 @@ } /** - * CreateEnvironmentRequest parent. + * ListEntitiesRequest parent. * @member {string} parent - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest * @instance */ - CreateEnvironmentRequest.prototype.parent = ""; + ListEntitiesRequest.prototype.parent = ""; /** - * CreateEnvironmentRequest environmentId. - * @member {string} environmentId - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * ListEntitiesRequest view. + * @member {google.cloud.dataplex.v1.ListEntitiesRequest.EntityView} view + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest * @instance */ - CreateEnvironmentRequest.prototype.environmentId = ""; + ListEntitiesRequest.prototype.view = 0; /** - * CreateEnvironmentRequest environment. - * @member {google.cloud.dataplex.v1.IEnvironment|null|undefined} environment - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * ListEntitiesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest * @instance */ - CreateEnvironmentRequest.prototype.environment = null; + ListEntitiesRequest.prototype.pageSize = 0; /** - * CreateEnvironmentRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * ListEntitiesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest * @instance */ - CreateEnvironmentRequest.prototype.validateOnly = false; + ListEntitiesRequest.prototype.pageToken = ""; /** - * Creates a new CreateEnvironmentRequest instance using the specified properties. + * ListEntitiesRequest filter. + * @member {string} filter + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest + * @instance + */ + ListEntitiesRequest.prototype.filter = ""; + + /** + * Creates a new ListEntitiesRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest * @static - * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.CreateEnvironmentRequest} CreateEnvironmentRequest instance + * @param {google.cloud.dataplex.v1.IListEntitiesRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListEntitiesRequest} ListEntitiesRequest instance */ - CreateEnvironmentRequest.create = function create(properties) { - return new CreateEnvironmentRequest(properties); + ListEntitiesRequest.create = function create(properties) { + return new ListEntitiesRequest(properties); }; /** - * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreateEnvironmentRequest.verify|verify} messages. + * Encodes the specified ListEntitiesRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest * @static - * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListEntitiesRequest} message ListEntitiesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateEnvironmentRequest.encode = function encode(message, writer) { + ListEntitiesRequest.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.environmentId != null && Object.hasOwnProperty.call(message, "environmentId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.environmentId); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - $root.google.cloud.dataplex.v1.Environment.encode(message.environment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); return writer; }; /** - * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreateEnvironmentRequest.verify|verify} messages. + * Encodes the specified ListEntitiesRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest * @static - * @param {google.cloud.dataplex.v1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListEntitiesRequest} message ListEntitiesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListEntitiesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateEnvironmentRequest message from the specified reader or buffer. + * Decodes a ListEntitiesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.CreateEnvironmentRequest} CreateEnvironmentRequest + * @returns {google.cloud.dataplex.v1.ListEntitiesRequest} ListEntitiesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateEnvironmentRequest.decode = function decode(reader, length) { + ListEntitiesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreateEnvironmentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListEntitiesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -46661,15 +47432,19 @@ break; } case 2: { - message.environmentId = reader.string(); + message.view = reader.int32(); break; } case 3: { - message.environment = $root.google.cloud.dataplex.v1.Environment.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); break; } case 4: { - message.validateOnly = reader.bool(); + message.pageToken = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); break; } default: @@ -46681,154 +47456,197 @@ }; /** - * Decodes a CreateEnvironmentRequest message from the specified reader or buffer, length delimited. + * Decodes a ListEntitiesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.CreateEnvironmentRequest} CreateEnvironmentRequest + * @returns {google.cloud.dataplex.v1.ListEntitiesRequest} ListEntitiesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + ListEntitiesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateEnvironmentRequest message. + * Verifies a ListEntitiesRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateEnvironmentRequest.verify = function verify(message) { + ListEntitiesRequest.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.environmentId != null && message.hasOwnProperty("environmentId")) - if (!$util.isString(message.environmentId)) - return "environmentId: string expected"; - if (message.environment != null && message.hasOwnProperty("environment")) { - var error = $root.google.cloud.dataplex.v1.Environment.verify(message.environment); - if (error) - return "environment." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } + 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.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; return null; }; /** - * Creates a CreateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListEntitiesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.CreateEnvironmentRequest} CreateEnvironmentRequest + * @returns {google.cloud.dataplex.v1.ListEntitiesRequest} ListEntitiesRequest */ - CreateEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.CreateEnvironmentRequest) + ListEntitiesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListEntitiesRequest) return object; - var message = new $root.google.cloud.dataplex.v1.CreateEnvironmentRequest(); + var message = new $root.google.cloud.dataplex.v1.ListEntitiesRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.environmentId != null) - message.environmentId = String(object.environmentId); - if (object.environment != null) { - if (typeof object.environment !== "object") - throw TypeError(".google.cloud.dataplex.v1.CreateEnvironmentRequest.environment: object expected"); - message.environment = $root.google.cloud.dataplex.v1.Environment.fromObject(object.environment); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "ENTITY_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "TABLES": + case 1: + message.view = 1; + break; + case "FILESETS": + case 2: + message.view = 2; + break; } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); return message; }; /** - * Creates a plain object from a CreateEnvironmentRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListEntitiesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest * @static - * @param {google.cloud.dataplex.v1.CreateEnvironmentRequest} message CreateEnvironmentRequest + * @param {google.cloud.dataplex.v1.ListEntitiesRequest} message ListEntitiesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateEnvironmentRequest.toObject = function toObject(message, options) { + ListEntitiesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.environmentId = ""; - object.environment = null; - object.validateOnly = false; + object.view = options.enums === String ? "ENTITY_VIEW_UNSPECIFIED" : 0; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.environmentId != null && message.hasOwnProperty("environmentId")) - object.environmentId = message.environmentId; - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = $root.google.cloud.dataplex.v1.Environment.toObject(message.environment, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.dataplex.v1.ListEntitiesRequest.EntityView[message.view] === undefined ? message.view : $root.google.cloud.dataplex.v1.ListEntitiesRequest.EntityView[message.view] : message.view; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; return object; }; /** - * Converts this CreateEnvironmentRequest to JSON. + * Converts this ListEntitiesRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest * @instance * @returns {Object.} JSON object */ - CreateEnvironmentRequest.prototype.toJSON = function toJSON() { + ListEntitiesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateEnvironmentRequest + * Gets the default type url for ListEntitiesRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.CreateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.ListEntitiesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListEntitiesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.CreateEnvironmentRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListEntitiesRequest"; }; - return CreateEnvironmentRequest; + /** + * EntityView enum. + * @name google.cloud.dataplex.v1.ListEntitiesRequest.EntityView + * @enum {number} + * @property {number} ENTITY_VIEW_UNSPECIFIED=0 ENTITY_VIEW_UNSPECIFIED value + * @property {number} TABLES=1 TABLES value + * @property {number} FILESETS=2 FILESETS value + */ + ListEntitiesRequest.EntityView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENTITY_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "TABLES"] = 1; + values[valuesById[2] = "FILESETS"] = 2; + return values; + })(); + + return ListEntitiesRequest; })(); - v1.UpdateEnvironmentRequest = (function() { + v1.ListEntitiesResponse = (function() { /** - * Properties of an UpdateEnvironmentRequest. + * Properties of a ListEntitiesResponse. * @memberof google.cloud.dataplex.v1 - * @interface IUpdateEnvironmentRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEnvironmentRequest updateMask - * @property {google.cloud.dataplex.v1.IEnvironment|null} [environment] UpdateEnvironmentRequest environment - * @property {boolean|null} [validateOnly] UpdateEnvironmentRequest validateOnly + * @interface IListEntitiesResponse + * @property {Array.|null} [entities] ListEntitiesResponse entities + * @property {string|null} [nextPageToken] ListEntitiesResponse nextPageToken */ /** - * Constructs a new UpdateEnvironmentRequest. + * Constructs a new ListEntitiesResponse. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents an UpdateEnvironmentRequest. - * @implements IUpdateEnvironmentRequest + * @classdesc Represents a ListEntitiesResponse. + * @implements IListEntitiesResponse * @constructor - * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListEntitiesResponse=} [properties] Properties to set */ - function UpdateEnvironmentRequest(properties) { + function ListEntitiesResponse(properties) { + this.entities = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -46836,103 +47654,92 @@ } /** - * UpdateEnvironmentRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest - * @instance - */ - UpdateEnvironmentRequest.prototype.updateMask = null; - - /** - * UpdateEnvironmentRequest environment. - * @member {google.cloud.dataplex.v1.IEnvironment|null|undefined} environment - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * ListEntitiesResponse entities. + * @member {Array.} entities + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse * @instance */ - UpdateEnvironmentRequest.prototype.environment = null; + ListEntitiesResponse.prototype.entities = $util.emptyArray; /** - * UpdateEnvironmentRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * ListEntitiesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse * @instance */ - UpdateEnvironmentRequest.prototype.validateOnly = false; + ListEntitiesResponse.prototype.nextPageToken = ""; /** - * Creates a new UpdateEnvironmentRequest instance using the specified properties. + * Creates a new ListEntitiesResponse instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse * @static - * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest instance + * @param {google.cloud.dataplex.v1.IListEntitiesResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListEntitiesResponse} ListEntitiesResponse instance */ - UpdateEnvironmentRequest.create = function create(properties) { - return new UpdateEnvironmentRequest(properties); + ListEntitiesResponse.create = function create(properties) { + return new ListEntitiesResponse(properties); }; /** - * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEnvironmentRequest.verify|verify} messages. + * Encodes the specified ListEntitiesResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse * @static - * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListEntitiesResponse} message ListEntitiesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateEnvironmentRequest.encode = function encode(message, writer) { + ListEntitiesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - $root.google.cloud.dataplex.v1.Environment.encode(message.environment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + if (message.entities != null && message.entities.length) + for (var i = 0; i < message.entities.length; ++i) + $root.google.cloud.dataplex.v1.Entity.encode(message.entities[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 UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.UpdateEnvironmentRequest.verify|verify} messages. + * Encodes the specified ListEntitiesResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEntitiesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse * @static - * @param {google.cloud.dataplex.v1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListEntitiesResponse} message ListEntitiesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListEntitiesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer. + * Decodes a ListEntitiesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + * @returns {google.cloud.dataplex.v1.ListEntitiesResponse} ListEntitiesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateEnvironmentRequest.decode = function decode(reader, length) { + ListEntitiesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.UpdateEnvironmentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListEntitiesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + if (!(message.entities && message.entities.length)) + message.entities = []; + message.entities.push($root.google.cloud.dataplex.v1.Entity.decode(reader, reader.uint32())); break; } case 2: { - message.environment = $root.google.cloud.dataplex.v1.Environment.decode(reader, reader.uint32()); - break; - } - case 3: { - message.validateOnly = reader.bool(); + message.nextPageToken = reader.string(); break; } default: @@ -46944,149 +47751,149 @@ }; /** - * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer, length delimited. + * Decodes a ListEntitiesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + * @returns {google.cloud.dataplex.v1.ListEntitiesResponse} ListEntitiesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + ListEntitiesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateEnvironmentRequest message. + * Verifies a ListEntitiesResponse message. * @function verify - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateEnvironmentRequest.verify = function verify(message) { + ListEntitiesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.environment != null && message.hasOwnProperty("environment")) { - var error = $root.google.cloud.dataplex.v1.Environment.verify(message.environment); - if (error) - return "environment." + error; + if (message.entities != null && message.hasOwnProperty("entities")) { + if (!Array.isArray(message.entities)) + return "entities: array expected"; + for (var i = 0; i < message.entities.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Entity.verify(message.entities[i]); + if (error) + return "entities." + error; + } } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates an UpdateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListEntitiesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + * @returns {google.cloud.dataplex.v1.ListEntitiesResponse} ListEntitiesResponse */ - UpdateEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.UpdateEnvironmentRequest) + ListEntitiesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListEntitiesResponse) return object; - var message = new $root.google.cloud.dataplex.v1.UpdateEnvironmentRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateEnvironmentRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.environment != null) { - if (typeof object.environment !== "object") - throw TypeError(".google.cloud.dataplex.v1.UpdateEnvironmentRequest.environment: object expected"); - message.environment = $root.google.cloud.dataplex.v1.Environment.fromObject(object.environment); + var message = new $root.google.cloud.dataplex.v1.ListEntitiesResponse(); + if (object.entities) { + if (!Array.isArray(object.entities)) + throw TypeError(".google.cloud.dataplex.v1.ListEntitiesResponse.entities: array expected"); + message.entities = []; + for (var i = 0; i < object.entities.length; ++i) { + if (typeof object.entities[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListEntitiesResponse.entities: object expected"); + message.entities[i] = $root.google.cloud.dataplex.v1.Entity.fromObject(object.entities[i]); + } } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from an UpdateEnvironmentRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListEntitiesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse * @static - * @param {google.cloud.dataplex.v1.UpdateEnvironmentRequest} message UpdateEnvironmentRequest + * @param {google.cloud.dataplex.v1.ListEntitiesResponse} message ListEntitiesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateEnvironmentRequest.toObject = function toObject(message, options) { + ListEntitiesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.updateMask = null; - object.environment = null; - object.validateOnly = false; + if (options.arrays || options.defaults) + object.entities = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.entities && message.entities.length) { + object.entities = []; + for (var j = 0; j < message.entities.length; ++j) + object.entities[j] = $root.google.cloud.dataplex.v1.Entity.toObject(message.entities[j], options); } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = $root.google.cloud.dataplex.v1.Environment.toObject(message.environment, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this UpdateEnvironmentRequest to JSON. + * Converts this ListEntitiesResponse to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse * @instance * @returns {Object.} JSON object */ - UpdateEnvironmentRequest.prototype.toJSON = function toJSON() { + ListEntitiesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateEnvironmentRequest + * Gets the default type url for ListEntitiesResponse * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.UpdateEnvironmentRequest + * @memberof google.cloud.dataplex.v1.ListEntitiesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListEntitiesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.UpdateEnvironmentRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListEntitiesResponse"; }; - return UpdateEnvironmentRequest; + return ListEntitiesResponse; })(); - v1.DeleteEnvironmentRequest = (function() { + v1.GetEntityRequest = (function() { /** - * Properties of a DeleteEnvironmentRequest. + * Properties of a GetEntityRequest. * @memberof google.cloud.dataplex.v1 - * @interface IDeleteEnvironmentRequest - * @property {string|null} [name] DeleteEnvironmentRequest name + * @interface IGetEntityRequest + * @property {string|null} [name] GetEntityRequest name + * @property {google.cloud.dataplex.v1.GetEntityRequest.EntityView|null} [view] GetEntityRequest view */ /** - * Constructs a new DeleteEnvironmentRequest. + * Constructs a new GetEntityRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a DeleteEnvironmentRequest. - * @implements IDeleteEnvironmentRequest + * @classdesc Represents a GetEntityRequest. + * @implements IGetEntityRequest * @constructor - * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IGetEntityRequest=} [properties] Properties to set */ - function DeleteEnvironmentRequest(properties) { + function GetEntityRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -47094,70 +47901,80 @@ } /** - * DeleteEnvironmentRequest name. + * GetEntityRequest name. * @member {string} name - * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @memberof google.cloud.dataplex.v1.GetEntityRequest * @instance */ - DeleteEnvironmentRequest.prototype.name = ""; + GetEntityRequest.prototype.name = ""; /** - * Creates a new DeleteEnvironmentRequest instance using the specified properties. + * GetEntityRequest view. + * @member {google.cloud.dataplex.v1.GetEntityRequest.EntityView} view + * @memberof google.cloud.dataplex.v1.GetEntityRequest + * @instance + */ + GetEntityRequest.prototype.view = 0; + + /** + * Creates a new GetEntityRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @memberof google.cloud.dataplex.v1.GetEntityRequest * @static - * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest instance + * @param {google.cloud.dataplex.v1.IGetEntityRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetEntityRequest} GetEntityRequest instance */ - DeleteEnvironmentRequest.create = function create(properties) { - return new DeleteEnvironmentRequest(properties); + GetEntityRequest.create = function create(properties) { + return new GetEntityRequest(properties); }; /** - * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEnvironmentRequest.verify|verify} messages. + * Encodes the specified GetEntityRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEntityRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @memberof google.cloud.dataplex.v1.GetEntityRequest * @static - * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetEntityRequest} message GetEntityRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteEnvironmentRequest.encode = function encode(message, writer) { + GetEntityRequest.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.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); return writer; }; /** - * Encodes the specified DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeleteEnvironmentRequest.verify|verify} messages. + * Encodes the specified GetEntityRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEntityRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @memberof google.cloud.dataplex.v1.GetEntityRequest * @static - * @param {google.cloud.dataplex.v1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetEntityRequest} message GetEntityRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetEntityRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer. + * Decodes a GetEntityRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @memberof google.cloud.dataplex.v1.GetEntityRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + * @returns {google.cloud.dataplex.v1.GetEntityRequest} GetEntityRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteEnvironmentRequest.decode = function decode(reader, length) { + GetEntityRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeleteEnvironmentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetEntityRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -47165,6 +47982,10 @@ message.name = reader.string(); break; } + case 2: { + message.view = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -47174,126 +47995,181 @@ }; /** - * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer, length delimited. + * Decodes a GetEntityRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @memberof google.cloud.dataplex.v1.GetEntityRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + * @returns {google.cloud.dataplex.v1.GetEntityRequest} GetEntityRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + GetEntityRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteEnvironmentRequest message. + * Verifies a GetEntityRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @memberof google.cloud.dataplex.v1.GetEntityRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteEnvironmentRequest.verify = function verify(message) { + GetEntityRequest.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.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + case 4: + break; + } return null; }; /** - * Creates a DeleteEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetEntityRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @memberof google.cloud.dataplex.v1.GetEntityRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + * @returns {google.cloud.dataplex.v1.GetEntityRequest} GetEntityRequest */ - DeleteEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.DeleteEnvironmentRequest) + GetEntityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetEntityRequest) return object; - var message = new $root.google.cloud.dataplex.v1.DeleteEnvironmentRequest(); + var message = new $root.google.cloud.dataplex.v1.GetEntityRequest(); if (object.name != null) message.name = String(object.name); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "ENTITY_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BASIC": + case 1: + message.view = 1; + break; + case "SCHEMA": + case 2: + message.view = 2; + break; + case "FULL": + case 4: + message.view = 4; + break; + } return message; }; /** - * Creates a plain object from a DeleteEnvironmentRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetEntityRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @memberof google.cloud.dataplex.v1.GetEntityRequest * @static - * @param {google.cloud.dataplex.v1.DeleteEnvironmentRequest} message DeleteEnvironmentRequest + * @param {google.cloud.dataplex.v1.GetEntityRequest} message GetEntityRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteEnvironmentRequest.toObject = function toObject(message, options) { + GetEntityRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.name = ""; + object.view = options.enums === String ? "ENTITY_VIEW_UNSPECIFIED" : 0; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.dataplex.v1.GetEntityRequest.EntityView[message.view] === undefined ? message.view : $root.google.cloud.dataplex.v1.GetEntityRequest.EntityView[message.view] : message.view; return object; }; /** - * Converts this DeleteEnvironmentRequest to JSON. + * Converts this GetEntityRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @memberof google.cloud.dataplex.v1.GetEntityRequest * @instance * @returns {Object.} JSON object */ - DeleteEnvironmentRequest.prototype.toJSON = function toJSON() { + GetEntityRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteEnvironmentRequest + * Gets the default type url for GetEntityRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.DeleteEnvironmentRequest + * @memberof google.cloud.dataplex.v1.GetEntityRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetEntityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.DeleteEnvironmentRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetEntityRequest"; }; - return DeleteEnvironmentRequest; + /** + * EntityView enum. + * @name google.cloud.dataplex.v1.GetEntityRequest.EntityView + * @enum {number} + * @property {number} ENTITY_VIEW_UNSPECIFIED=0 ENTITY_VIEW_UNSPECIFIED value + * @property {number} BASIC=1 BASIC value + * @property {number} SCHEMA=2 SCHEMA value + * @property {number} FULL=4 FULL value + */ + GetEntityRequest.EntityView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENTITY_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "BASIC"] = 1; + values[valuesById[2] = "SCHEMA"] = 2; + values[valuesById[4] = "FULL"] = 4; + return values; + })(); + + return GetEntityRequest; })(); - v1.ListEnvironmentsRequest = (function() { + v1.ListPartitionsRequest = (function() { /** - * Properties of a ListEnvironmentsRequest. + * Properties of a ListPartitionsRequest. * @memberof google.cloud.dataplex.v1 - * @interface IListEnvironmentsRequest - * @property {string|null} [parent] ListEnvironmentsRequest parent - * @property {number|null} [pageSize] ListEnvironmentsRequest pageSize - * @property {string|null} [pageToken] ListEnvironmentsRequest pageToken - * @property {string|null} [filter] ListEnvironmentsRequest filter - * @property {string|null} [orderBy] ListEnvironmentsRequest orderBy + * @interface IListPartitionsRequest + * @property {string|null} [parent] ListPartitionsRequest parent + * @property {number|null} [pageSize] ListPartitionsRequest pageSize + * @property {string|null} [pageToken] ListPartitionsRequest pageToken + * @property {string|null} [filter] ListPartitionsRequest filter */ /** - * Constructs a new ListEnvironmentsRequest. + * Constructs a new ListPartitionsRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListEnvironmentsRequest. - * @implements IListEnvironmentsRequest + * @classdesc Represents a ListPartitionsRequest. + * @implements IListPartitionsRequest * @constructor - * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListPartitionsRequest=} [properties] Properties to set */ - function ListEnvironmentsRequest(properties) { + function ListPartitionsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -47301,67 +48177,59 @@ } /** - * ListEnvironmentsRequest parent. + * ListPartitionsRequest parent. * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest * @instance */ - ListEnvironmentsRequest.prototype.parent = ""; + ListPartitionsRequest.prototype.parent = ""; /** - * ListEnvironmentsRequest pageSize. + * ListPartitionsRequest pageSize. * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest * @instance */ - ListEnvironmentsRequest.prototype.pageSize = 0; + ListPartitionsRequest.prototype.pageSize = 0; /** - * ListEnvironmentsRequest pageToken. + * ListPartitionsRequest pageToken. * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest * @instance */ - ListEnvironmentsRequest.prototype.pageToken = ""; + ListPartitionsRequest.prototype.pageToken = ""; /** - * ListEnvironmentsRequest filter. + * ListPartitionsRequest filter. * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest - * @instance - */ - ListEnvironmentsRequest.prototype.filter = ""; - - /** - * ListEnvironmentsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest * @instance */ - ListEnvironmentsRequest.prototype.orderBy = ""; + ListPartitionsRequest.prototype.filter = ""; /** - * Creates a new ListEnvironmentsRequest instance using the specified properties. + * Creates a new ListPartitionsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest * @static - * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListEnvironmentsRequest} ListEnvironmentsRequest instance + * @param {google.cloud.dataplex.v1.IListPartitionsRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListPartitionsRequest} ListPartitionsRequest instance */ - ListEnvironmentsRequest.create = function create(properties) { - return new ListEnvironmentsRequest(properties); + ListPartitionsRequest.create = function create(properties) { + return new ListPartitionsRequest(properties); }; /** - * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsRequest.verify|verify} messages. + * Encodes the specified ListPartitionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest * @static - * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListPartitionsRequest} message ListPartitionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEnvironmentsRequest.encode = function encode(message, writer) { + ListPartitionsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) @@ -47372,39 +48240,37 @@ writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); return writer; }; /** - * Encodes the specified ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsRequest.verify|verify} messages. + * Encodes the specified ListPartitionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest * @static - * @param {google.cloud.dataplex.v1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListPartitionsRequest} message ListPartitionsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEnvironmentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListPartitionsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListEnvironmentsRequest message from the specified reader or buffer. + * Decodes a ListPartitionsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListEnvironmentsRequest} ListEnvironmentsRequest + * @returns {google.cloud.dataplex.v1.ListPartitionsRequest} ListPartitionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEnvironmentsRequest.decode = function decode(reader, length) { + ListPartitionsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListEnvironmentsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListPartitionsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -47424,10 +48290,6 @@ message.filter = reader.string(); break; } - case 5: { - message.orderBy = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -47437,30 +48299,30 @@ }; /** - * Decodes a ListEnvironmentsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListPartitionsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListEnvironmentsRequest} ListEnvironmentsRequest + * @returns {google.cloud.dataplex.v1.ListPartitionsRequest} ListPartitionsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEnvironmentsRequest.decodeDelimited = function decodeDelimited(reader) { + ListPartitionsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListEnvironmentsRequest message. + * Verifies a ListPartitionsRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListEnvironmentsRequest.verify = function verify(message) { + ListPartitionsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) @@ -47475,24 +48337,21 @@ if (message.filter != null && message.hasOwnProperty("filter")) if (!$util.isString(message.filter)) return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; return null; }; /** - * Creates a ListEnvironmentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListPartitionsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListEnvironmentsRequest} ListEnvironmentsRequest + * @returns {google.cloud.dataplex.v1.ListPartitionsRequest} ListPartitionsRequest */ - ListEnvironmentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListEnvironmentsRequest) + ListPartitionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListPartitionsRequest) return object; - var message = new $root.google.cloud.dataplex.v1.ListEnvironmentsRequest(); + var message = new $root.google.cloud.dataplex.v1.ListPartitionsRequest(); if (object.parent != null) message.parent = String(object.parent); if (object.pageSize != null) @@ -47501,21 +48360,19 @@ message.pageToken = String(object.pageToken); if (object.filter != null) message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); return message; }; /** - * Creates a plain object from a ListEnvironmentsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListPartitionsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest * @static - * @param {google.cloud.dataplex.v1.ListEnvironmentsRequest} message ListEnvironmentsRequest + * @param {google.cloud.dataplex.v1.ListPartitionsRequest} message ListPartitionsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListEnvironmentsRequest.toObject = function toObject(message, options) { + ListPartitionsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -47524,7 +48381,6 @@ object.pageSize = 0; object.pageToken = ""; object.filter = ""; - object.orderBy = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; @@ -47534,60 +48390,58 @@ object.pageToken = message.pageToken; if (message.filter != null && message.hasOwnProperty("filter")) object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; return object; }; /** - * Converts this ListEnvironmentsRequest to JSON. + * Converts this ListPartitionsRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest * @instance * @returns {Object.} JSON object */ - ListEnvironmentsRequest.prototype.toJSON = function toJSON() { + ListPartitionsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListEnvironmentsRequest + * Gets the default type url for ListPartitionsRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListEnvironmentsRequest + * @memberof google.cloud.dataplex.v1.ListPartitionsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListEnvironmentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListPartitionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListEnvironmentsRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListPartitionsRequest"; }; - return ListEnvironmentsRequest; + return ListPartitionsRequest; })(); - v1.ListEnvironmentsResponse = (function() { + v1.CreatePartitionRequest = (function() { /** - * Properties of a ListEnvironmentsResponse. + * Properties of a CreatePartitionRequest. * @memberof google.cloud.dataplex.v1 - * @interface IListEnvironmentsResponse - * @property {Array.|null} [environments] ListEnvironmentsResponse environments - * @property {string|null} [nextPageToken] ListEnvironmentsResponse nextPageToken + * @interface ICreatePartitionRequest + * @property {string|null} [parent] CreatePartitionRequest parent + * @property {google.cloud.dataplex.v1.IPartition|null} [partition] CreatePartitionRequest partition + * @property {boolean|null} [validateOnly] CreatePartitionRequest validateOnly */ /** - * Constructs a new ListEnvironmentsResponse. + * Constructs a new CreatePartitionRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListEnvironmentsResponse. - * @implements IListEnvironmentsResponse + * @classdesc Represents a CreatePartitionRequest. + * @implements ICreatePartitionRequest * @constructor - * @param {google.cloud.dataplex.v1.IListEnvironmentsResponse=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.ICreatePartitionRequest=} [properties] Properties to set */ - function ListEnvironmentsResponse(properties) { - this.environments = []; + function CreatePartitionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -47595,92 +48449,103 @@ } /** - * ListEnvironmentsResponse environments. - * @member {Array.} environments - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * CreatePartitionRequest parent. + * @member {string} parent + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest * @instance */ - ListEnvironmentsResponse.prototype.environments = $util.emptyArray; + CreatePartitionRequest.prototype.parent = ""; /** - * ListEnvironmentsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * CreatePartitionRequest partition. + * @member {google.cloud.dataplex.v1.IPartition|null|undefined} partition + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest * @instance */ - ListEnvironmentsResponse.prototype.nextPageToken = ""; + CreatePartitionRequest.prototype.partition = null; /** - * Creates a new ListEnvironmentsResponse instance using the specified properties. + * CreatePartitionRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest + * @instance + */ + CreatePartitionRequest.prototype.validateOnly = false; + + /** + * Creates a new CreatePartitionRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest * @static - * @param {google.cloud.dataplex.v1.IListEnvironmentsResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListEnvironmentsResponse} ListEnvironmentsResponse instance + * @param {google.cloud.dataplex.v1.ICreatePartitionRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.CreatePartitionRequest} CreatePartitionRequest instance */ - ListEnvironmentsResponse.create = function create(properties) { - return new ListEnvironmentsResponse(properties); + CreatePartitionRequest.create = function create(properties) { + return new CreatePartitionRequest(properties); }; /** - * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsResponse.verify|verify} messages. + * Encodes the specified CreatePartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.CreatePartitionRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest * @static - * @param {google.cloud.dataplex.v1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.ICreatePartitionRequest} message CreatePartitionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEnvironmentsResponse.encode = function encode(message, writer) { + CreatePartitionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.environments != null && message.environments.length) - for (var i = 0; i < message.environments.length; ++i) - $root.google.cloud.dataplex.v1.Environment.encode(message.environments[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); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.partition != null && Object.hasOwnProperty.call(message, "partition")) + $root.google.cloud.dataplex.v1.Partition.encode(message.partition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); return writer; }; /** - * Encodes the specified ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListEnvironmentsResponse.verify|verify} messages. + * Encodes the specified CreatePartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.CreatePartitionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest * @static - * @param {google.cloud.dataplex.v1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.ICreatePartitionRequest} message CreatePartitionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListEnvironmentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + CreatePartitionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListEnvironmentsResponse message from the specified reader or buffer. + * Decodes a CreatePartitionRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListEnvironmentsResponse} ListEnvironmentsResponse + * @returns {google.cloud.dataplex.v1.CreatePartitionRequest} CreatePartitionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEnvironmentsResponse.decode = function decode(reader, length) { + CreatePartitionRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListEnvironmentsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.CreatePartitionRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.environments && message.environments.length)) - message.environments = []; - message.environments.push($root.google.cloud.dataplex.v1.Environment.decode(reader, reader.uint32())); + message.parent = reader.string(); break; } - case 2: { - message.nextPageToken = reader.string(); + case 3: { + message.partition = $root.google.cloud.dataplex.v1.Partition.decode(reader, reader.uint32()); + break; + } + case 4: { + message.validateOnly = reader.bool(); break; } default: @@ -47692,148 +48557,145 @@ }; /** - * Decodes a ListEnvironmentsResponse message from the specified reader or buffer, length delimited. + * Decodes a CreatePartitionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListEnvironmentsResponse} ListEnvironmentsResponse + * @returns {google.cloud.dataplex.v1.CreatePartitionRequest} CreatePartitionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListEnvironmentsResponse.decodeDelimited = function decodeDelimited(reader) { + CreatePartitionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListEnvironmentsResponse message. + * Verifies a CreatePartitionRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListEnvironmentsResponse.verify = function verify(message) { + CreatePartitionRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.environments != null && message.hasOwnProperty("environments")) { - if (!Array.isArray(message.environments)) - return "environments: array expected"; - for (var i = 0; i < message.environments.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Environment.verify(message.environments[i]); - if (error) - return "environments." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.partition != null && message.hasOwnProperty("partition")) { + var error = $root.google.cloud.dataplex.v1.Partition.verify(message.partition); + if (error) + return "partition." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a ListEnvironmentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreatePartitionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListEnvironmentsResponse} ListEnvironmentsResponse + * @returns {google.cloud.dataplex.v1.CreatePartitionRequest} CreatePartitionRequest */ - ListEnvironmentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListEnvironmentsResponse) + CreatePartitionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.CreatePartitionRequest) return object; - var message = new $root.google.cloud.dataplex.v1.ListEnvironmentsResponse(); - if (object.environments) { - if (!Array.isArray(object.environments)) - throw TypeError(".google.cloud.dataplex.v1.ListEnvironmentsResponse.environments: array expected"); - message.environments = []; - for (var i = 0; i < object.environments.length; ++i) { - if (typeof object.environments[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListEnvironmentsResponse.environments: object expected"); - message.environments[i] = $root.google.cloud.dataplex.v1.Environment.fromObject(object.environments[i]); - } + var message = new $root.google.cloud.dataplex.v1.CreatePartitionRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.partition != null) { + if (typeof object.partition !== "object") + throw TypeError(".google.cloud.dataplex.v1.CreatePartitionRequest.partition: object expected"); + message.partition = $root.google.cloud.dataplex.v1.Partition.fromObject(object.partition); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a ListEnvironmentsResponse message. Also converts values to other types if specified. + * Creates a plain object from a CreatePartitionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest * @static - * @param {google.cloud.dataplex.v1.ListEnvironmentsResponse} message ListEnvironmentsResponse + * @param {google.cloud.dataplex.v1.CreatePartitionRequest} message CreatePartitionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListEnvironmentsResponse.toObject = function toObject(message, options) { + CreatePartitionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.environments = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.environments && message.environments.length) { - object.environments = []; - for (var j = 0; j < message.environments.length; ++j) - object.environments[j] = $root.google.cloud.dataplex.v1.Environment.toObject(message.environments[j], options); + if (options.defaults) { + object.parent = ""; + object.partition = null; + object.validateOnly = false; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.partition != null && message.hasOwnProperty("partition")) + object.partition = $root.google.cloud.dataplex.v1.Partition.toObject(message.partition, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this ListEnvironmentsResponse to JSON. + * Converts this CreatePartitionRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest * @instance * @returns {Object.} JSON object */ - ListEnvironmentsResponse.prototype.toJSON = function toJSON() { + CreatePartitionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListEnvironmentsResponse + * Gets the default type url for CreatePartitionRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListEnvironmentsResponse + * @memberof google.cloud.dataplex.v1.CreatePartitionRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListEnvironmentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreatePartitionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListEnvironmentsResponse"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.CreatePartitionRequest"; }; - return ListEnvironmentsResponse; + return CreatePartitionRequest; })(); - v1.GetEnvironmentRequest = (function() { + v1.DeletePartitionRequest = (function() { /** - * Properties of a GetEnvironmentRequest. + * Properties of a DeletePartitionRequest. * @memberof google.cloud.dataplex.v1 - * @interface IGetEnvironmentRequest - * @property {string|null} [name] GetEnvironmentRequest name + * @interface IDeletePartitionRequest + * @property {string|null} [name] DeletePartitionRequest name + * @property {string|null} [etag] DeletePartitionRequest etag */ /** - * Constructs a new GetEnvironmentRequest. + * Constructs a new DeletePartitionRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a GetEnvironmentRequest. - * @implements IGetEnvironmentRequest + * @classdesc Represents a DeletePartitionRequest. + * @implements IDeletePartitionRequest * @constructor - * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IDeletePartitionRequest=} [properties] Properties to set */ - function GetEnvironmentRequest(properties) { + function DeletePartitionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -47841,70 +48703,80 @@ } /** - * GetEnvironmentRequest name. + * DeletePartitionRequest name. * @member {string} name - * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest * @instance */ - GetEnvironmentRequest.prototype.name = ""; + DeletePartitionRequest.prototype.name = ""; /** - * Creates a new GetEnvironmentRequest instance using the specified properties. + * DeletePartitionRequest etag. + * @member {string} etag + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest + * @instance + */ + DeletePartitionRequest.prototype.etag = ""; + + /** + * Creates a new DeletePartitionRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest * @static - * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.GetEnvironmentRequest} GetEnvironmentRequest instance + * @param {google.cloud.dataplex.v1.IDeletePartitionRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.DeletePartitionRequest} DeletePartitionRequest instance */ - GetEnvironmentRequest.create = function create(properties) { - return new GetEnvironmentRequest(properties); + DeletePartitionRequest.create = function create(properties) { + return new DeletePartitionRequest(properties); }; /** - * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetEnvironmentRequest.verify|verify} messages. + * Encodes the specified DeletePartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.DeletePartitionRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest * @static - * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IDeletePartitionRequest} message DeletePartitionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEnvironmentRequest.encode = function encode(message, writer) { + DeletePartitionRequest.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.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); return writer; }; /** - * Encodes the specified GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetEnvironmentRequest.verify|verify} messages. + * Encodes the specified DeletePartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.DeletePartitionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest * @static - * @param {google.cloud.dataplex.v1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IDeletePartitionRequest} message DeletePartitionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeletePartitionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetEnvironmentRequest message from the specified reader or buffer. + * Decodes a DeletePartitionRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.GetEnvironmentRequest} GetEnvironmentRequest + * @returns {google.cloud.dataplex.v1.DeletePartitionRequest} DeletePartitionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetEnvironmentRequest.decode = function decode(reader, length) { + DeletePartitionRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetEnvironmentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.DeletePartitionRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -47912,6 +48784,10 @@ message.name = reader.string(); break; } + case 2: { + message.etag = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -47921,125 +48797,133 @@ }; /** - * Decodes a GetEnvironmentRequest message from the specified reader or buffer, length delimited. + * Decodes a DeletePartitionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.GetEnvironmentRequest} GetEnvironmentRequest + * @returns {google.cloud.dataplex.v1.DeletePartitionRequest} DeletePartitionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + DeletePartitionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetEnvironmentRequest message. + * Verifies a DeletePartitionRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetEnvironmentRequest.verify = function verify(message) { + DeletePartitionRequest.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.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; return null; }; /** - * Creates a GetEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeletePartitionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.GetEnvironmentRequest} GetEnvironmentRequest + * @returns {google.cloud.dataplex.v1.DeletePartitionRequest} DeletePartitionRequest */ - GetEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.GetEnvironmentRequest) + DeletePartitionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.DeletePartitionRequest) return object; - var message = new $root.google.cloud.dataplex.v1.GetEnvironmentRequest(); + var message = new $root.google.cloud.dataplex.v1.DeletePartitionRequest(); if (object.name != null) message.name = String(object.name); + if (object.etag != null) + message.etag = String(object.etag); return message; }; /** - * Creates a plain object from a GetEnvironmentRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeletePartitionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest * @static - * @param {google.cloud.dataplex.v1.GetEnvironmentRequest} message GetEnvironmentRequest + * @param {google.cloud.dataplex.v1.DeletePartitionRequest} message DeletePartitionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetEnvironmentRequest.toObject = function toObject(message, options) { + DeletePartitionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.name = ""; + object.etag = ""; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; return object; }; /** - * Converts this GetEnvironmentRequest to JSON. + * Converts this DeletePartitionRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest * @instance * @returns {Object.} JSON object */ - GetEnvironmentRequest.prototype.toJSON = function toJSON() { + DeletePartitionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetEnvironmentRequest + * Gets the default type url for DeletePartitionRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.GetEnvironmentRequest + * @memberof google.cloud.dataplex.v1.DeletePartitionRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeletePartitionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.GetEnvironmentRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.DeletePartitionRequest"; }; - return GetEnvironmentRequest; + return DeletePartitionRequest; })(); - v1.ListSessionsRequest = (function() { + v1.ListPartitionsResponse = (function() { /** - * Properties of a ListSessionsRequest. + * Properties of a ListPartitionsResponse. * @memberof google.cloud.dataplex.v1 - * @interface IListSessionsRequest - * @property {string|null} [parent] ListSessionsRequest parent - * @property {number|null} [pageSize] ListSessionsRequest pageSize - * @property {string|null} [pageToken] ListSessionsRequest pageToken - * @property {string|null} [filter] ListSessionsRequest filter + * @interface IListPartitionsResponse + * @property {Array.|null} [partitions] ListPartitionsResponse partitions + * @property {string|null} [nextPageToken] ListPartitionsResponse nextPageToken */ /** - * Constructs a new ListSessionsRequest. + * Constructs a new ListPartitionsResponse. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListSessionsRequest. - * @implements IListSessionsRequest + * @classdesc Represents a ListPartitionsResponse. + * @implements IListPartitionsResponse * @constructor - * @param {google.cloud.dataplex.v1.IListSessionsRequest=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IListPartitionsResponse=} [properties] Properties to set */ - function ListSessionsRequest(properties) { + function ListPartitionsResponse(properties) { + this.partitions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -48047,117 +48931,92 @@ } /** - * ListSessionsRequest parent. - * @member {string} parent - * @memberof google.cloud.dataplex.v1.ListSessionsRequest - * @instance - */ - ListSessionsRequest.prototype.parent = ""; - - /** - * ListSessionsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dataplex.v1.ListSessionsRequest - * @instance - */ - ListSessionsRequest.prototype.pageSize = 0; - - /** - * ListSessionsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * ListPartitionsResponse partitions. + * @member {Array.} partitions + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse * @instance */ - ListSessionsRequest.prototype.pageToken = ""; + ListPartitionsResponse.prototype.partitions = $util.emptyArray; /** - * ListSessionsRequest filter. - * @member {string} filter - * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * ListPartitionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse * @instance */ - ListSessionsRequest.prototype.filter = ""; + ListPartitionsResponse.prototype.nextPageToken = ""; /** - * Creates a new ListSessionsRequest instance using the specified properties. + * Creates a new ListPartitionsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse * @static - * @param {google.cloud.dataplex.v1.IListSessionsRequest=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListSessionsRequest} ListSessionsRequest instance + * @param {google.cloud.dataplex.v1.IListPartitionsResponse=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.ListPartitionsResponse} ListPartitionsResponse instance */ - ListSessionsRequest.create = function create(properties) { - return new ListSessionsRequest(properties); + ListPartitionsResponse.create = function create(properties) { + return new ListPartitionsResponse(properties); }; /** - * Encodes the specified ListSessionsRequest message. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsRequest.verify|verify} messages. + * Encodes the specified ListPartitionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse * @static - * @param {google.cloud.dataplex.v1.IListSessionsRequest} message ListSessionsRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListPartitionsResponse} message ListPartitionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSessionsRequest.encode = function encode(message, writer) { + ListPartitionsResponse.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.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.partitions != null && message.partitions.length) + for (var i = 0; i < message.partitions.length; ++i) + $root.google.cloud.dataplex.v1.Partition.encode(message.partitions[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 ListSessionsRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsRequest.verify|verify} messages. + * Encodes the specified ListPartitionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListPartitionsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse * @static - * @param {google.cloud.dataplex.v1.IListSessionsRequest} message ListSessionsRequest message or plain object to encode + * @param {google.cloud.dataplex.v1.IListPartitionsResponse} message ListPartitionsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSessionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListPartitionsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSessionsRequest message from the specified reader or buffer. + * Decodes a ListPartitionsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListSessionsRequest} ListSessionsRequest + * @returns {google.cloud.dataplex.v1.ListPartitionsResponse} ListPartitionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSessionsRequest.decode = function decode(reader, length) { + ListPartitionsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListSessionsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListPartitionsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + if (!(message.partitions && message.partitions.length)) + message.partitions = []; + message.partitions.push($root.google.cloud.dataplex.v1.Partition.decode(reader, reader.uint32())); break; } case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); + message.nextPageToken = reader.string(); break; } default: @@ -48169,149 +49028,148 @@ }; /** - * Decodes a ListSessionsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListPartitionsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListSessionsRequest} ListSessionsRequest + * @returns {google.cloud.dataplex.v1.ListPartitionsResponse} ListPartitionsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSessionsRequest.decodeDelimited = function decodeDelimited(reader) { + ListPartitionsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSessionsRequest message. + * Verifies a ListPartitionsResponse message. * @function verify - * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListSessionsRequest.verify = function verify(message) { + ListPartitionsResponse.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.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; + if (message.partitions != null && message.hasOwnProperty("partitions")) { + if (!Array.isArray(message.partitions)) + return "partitions: array expected"; + for (var i = 0; i < message.partitions.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Partition.verify(message.partitions[i]); + if (error) + return "partitions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a ListSessionsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListPartitionsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListSessionsRequest} ListSessionsRequest + * @returns {google.cloud.dataplex.v1.ListPartitionsResponse} ListPartitionsResponse */ - ListSessionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListSessionsRequest) + ListPartitionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.ListPartitionsResponse) return object; - var message = new $root.google.cloud.dataplex.v1.ListSessionsRequest(); - 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.filter != null) - message.filter = String(object.filter); + var message = new $root.google.cloud.dataplex.v1.ListPartitionsResponse(); + if (object.partitions) { + if (!Array.isArray(object.partitions)) + throw TypeError(".google.cloud.dataplex.v1.ListPartitionsResponse.partitions: array expected"); + message.partitions = []; + for (var i = 0; i < object.partitions.length; ++i) { + if (typeof object.partitions[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.ListPartitionsResponse.partitions: object expected"); + message.partitions[i] = $root.google.cloud.dataplex.v1.Partition.fromObject(object.partitions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListSessionsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListPartitionsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse * @static - * @param {google.cloud.dataplex.v1.ListSessionsRequest} message ListSessionsRequest + * @param {google.cloud.dataplex.v1.ListPartitionsResponse} message ListPartitionsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSessionsRequest.toObject = function toObject(message, options) { + ListPartitionsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - 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.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; + if (options.arrays || options.defaults) + object.partitions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.partitions && message.partitions.length) { + object.partitions = []; + for (var j = 0; j < message.partitions.length; ++j) + object.partitions[j] = $root.google.cloud.dataplex.v1.Partition.toObject(message.partitions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ListSessionsRequest to JSON. + * Converts this ListPartitionsResponse to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse * @instance * @returns {Object.} JSON object */ - ListSessionsRequest.prototype.toJSON = function toJSON() { + ListPartitionsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListSessionsRequest + * Gets the default type url for ListPartitionsResponse * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListSessionsRequest + * @memberof google.cloud.dataplex.v1.ListPartitionsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListSessionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListPartitionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListSessionsRequest"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.ListPartitionsResponse"; }; - return ListSessionsRequest; + return ListPartitionsResponse; })(); - v1.ListSessionsResponse = (function() { + v1.GetPartitionRequest = (function() { /** - * Properties of a ListSessionsResponse. + * Properties of a GetPartitionRequest. * @memberof google.cloud.dataplex.v1 - * @interface IListSessionsResponse - * @property {Array.|null} [sessions] ListSessionsResponse sessions - * @property {string|null} [nextPageToken] ListSessionsResponse nextPageToken + * @interface IGetPartitionRequest + * @property {string|null} [name] GetPartitionRequest name */ /** - * Constructs a new ListSessionsResponse. + * Constructs a new GetPartitionRequest. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a ListSessionsResponse. - * @implements IListSessionsResponse + * @classdesc Represents a GetPartitionRequest. + * @implements IGetPartitionRequest * @constructor - * @param {google.cloud.dataplex.v1.IListSessionsResponse=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IGetPartitionRequest=} [properties] Properties to set */ - function ListSessionsResponse(properties) { - this.sessions = []; + function GetPartitionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -48319,92 +49177,75 @@ } /** - * ListSessionsResponse sessions. - * @member {Array.} sessions - * @memberof google.cloud.dataplex.v1.ListSessionsResponse - * @instance - */ - ListSessionsResponse.prototype.sessions = $util.emptyArray; - - /** - * ListSessionsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * GetPartitionRequest name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.GetPartitionRequest * @instance */ - ListSessionsResponse.prototype.nextPageToken = ""; + GetPartitionRequest.prototype.name = ""; /** - * Creates a new ListSessionsResponse instance using the specified properties. + * Creates a new GetPartitionRequest instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @memberof google.cloud.dataplex.v1.GetPartitionRequest * @static - * @param {google.cloud.dataplex.v1.IListSessionsResponse=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.ListSessionsResponse} ListSessionsResponse instance + * @param {google.cloud.dataplex.v1.IGetPartitionRequest=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.GetPartitionRequest} GetPartitionRequest instance */ - ListSessionsResponse.create = function create(properties) { - return new ListSessionsResponse(properties); + GetPartitionRequest.create = function create(properties) { + return new GetPartitionRequest(properties); }; /** - * Encodes the specified ListSessionsResponse message. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsResponse.verify|verify} messages. + * Encodes the specified GetPartitionRequest message. Does not implicitly {@link google.cloud.dataplex.v1.GetPartitionRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @memberof google.cloud.dataplex.v1.GetPartitionRequest * @static - * @param {google.cloud.dataplex.v1.IListSessionsResponse} message ListSessionsResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetPartitionRequest} message GetPartitionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSessionsResponse.encode = function encode(message, writer) { + GetPartitionRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sessions != null && message.sessions.length) - for (var i = 0; i < message.sessions.length; ++i) - $root.google.cloud.dataplex.v1.Session.encode(message.sessions[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); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListSessionsResponse message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.ListSessionsResponse.verify|verify} messages. + * Encodes the specified GetPartitionRequest message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.GetPartitionRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @memberof google.cloud.dataplex.v1.GetPartitionRequest * @static - * @param {google.cloud.dataplex.v1.IListSessionsResponse} message ListSessionsResponse message or plain object to encode + * @param {google.cloud.dataplex.v1.IGetPartitionRequest} message GetPartitionRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListSessionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetPartitionRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListSessionsResponse message from the specified reader or buffer. + * Decodes a GetPartitionRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @memberof google.cloud.dataplex.v1.GetPartitionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.ListSessionsResponse} ListSessionsResponse + * @returns {google.cloud.dataplex.v1.GetPartitionRequest} GetPartitionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSessionsResponse.decode = function decode(reader, length) { + GetPartitionRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.ListSessionsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.GetPartitionRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.sessions && message.sessions.length)) - message.sessions = []; - message.sessions.push($root.google.cloud.dataplex.v1.Session.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); + message.name = reader.string(); break; } default: @@ -48416,161 +49257,139 @@ }; /** - * Decodes a ListSessionsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetPartitionRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @memberof google.cloud.dataplex.v1.GetPartitionRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.ListSessionsResponse} ListSessionsResponse + * @returns {google.cloud.dataplex.v1.GetPartitionRequest} GetPartitionRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListSessionsResponse.decodeDelimited = function decodeDelimited(reader) { + GetPartitionRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListSessionsResponse message. + * Verifies a GetPartitionRequest message. * @function verify - * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @memberof google.cloud.dataplex.v1.GetPartitionRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListSessionsResponse.verify = function verify(message) { + GetPartitionRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sessions != null && message.hasOwnProperty("sessions")) { - if (!Array.isArray(message.sessions)) - return "sessions: array expected"; - for (var i = 0; i < message.sessions.length; ++i) { - var error = $root.google.cloud.dataplex.v1.Session.verify(message.sessions[i]); - if (error) - return "sessions." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListSessionsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetPartitionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @memberof google.cloud.dataplex.v1.GetPartitionRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.ListSessionsResponse} ListSessionsResponse + * @returns {google.cloud.dataplex.v1.GetPartitionRequest} GetPartitionRequest */ - ListSessionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.ListSessionsResponse) + GetPartitionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.GetPartitionRequest) return object; - var message = new $root.google.cloud.dataplex.v1.ListSessionsResponse(); - if (object.sessions) { - if (!Array.isArray(object.sessions)) - throw TypeError(".google.cloud.dataplex.v1.ListSessionsResponse.sessions: array expected"); - message.sessions = []; - for (var i = 0; i < object.sessions.length; ++i) { - if (typeof object.sessions[i] !== "object") - throw TypeError(".google.cloud.dataplex.v1.ListSessionsResponse.sessions: object expected"); - message.sessions[i] = $root.google.cloud.dataplex.v1.Session.fromObject(object.sessions[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.cloud.dataplex.v1.GetPartitionRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListSessionsResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetPartitionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @memberof google.cloud.dataplex.v1.GetPartitionRequest * @static - * @param {google.cloud.dataplex.v1.ListSessionsResponse} message ListSessionsResponse + * @param {google.cloud.dataplex.v1.GetPartitionRequest} message GetPartitionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListSessionsResponse.toObject = function toObject(message, options) { + GetPartitionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.sessions = []; if (options.defaults) - object.nextPageToken = ""; - if (message.sessions && message.sessions.length) { - object.sessions = []; - for (var j = 0; j < message.sessions.length; ++j) - object.sessions[j] = $root.google.cloud.dataplex.v1.Session.toObject(message.sessions[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListSessionsResponse to JSON. + * Converts this GetPartitionRequest to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @memberof google.cloud.dataplex.v1.GetPartitionRequest * @instance * @returns {Object.} JSON object */ - ListSessionsResponse.prototype.toJSON = function toJSON() { + GetPartitionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListSessionsResponse + * Gets the default type url for GetPartitionRequest * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.ListSessionsResponse + * @memberof google.cloud.dataplex.v1.GetPartitionRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListSessionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetPartitionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.ListSessionsResponse"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.GetPartitionRequest"; }; - return ListSessionsResponse; + return GetPartitionRequest; })(); - v1.Task = (function() { + v1.Entity = (function() { /** - * Properties of a Task. + * Properties of an Entity. * @memberof google.cloud.dataplex.v1 - * @interface ITask - * @property {string|null} [name] Task name - * @property {string|null} [uid] Task uid - * @property {google.protobuf.ITimestamp|null} [createTime] Task createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Task updateTime - * @property {string|null} [description] Task description - * @property {string|null} [displayName] Task displayName - * @property {google.cloud.dataplex.v1.State|null} [state] Task state - * @property {Object.|null} [labels] Task labels - * @property {google.cloud.dataplex.v1.Task.ITriggerSpec|null} [triggerSpec] Task triggerSpec - * @property {google.cloud.dataplex.v1.Task.IExecutionSpec|null} [executionSpec] Task executionSpec - * @property {google.cloud.dataplex.v1.Task.IExecutionStatus|null} [executionStatus] Task executionStatus - * @property {google.cloud.dataplex.v1.Task.ISparkTaskConfig|null} [spark] Task spark - * @property {google.cloud.dataplex.v1.Task.INotebookTaskConfig|null} [notebook] Task notebook + * @interface IEntity + * @property {string|null} [name] Entity name + * @property {string|null} [displayName] Entity displayName + * @property {string|null} [description] Entity description + * @property {google.protobuf.ITimestamp|null} [createTime] Entity createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Entity updateTime + * @property {string|null} [id] Entity id + * @property {string|null} [etag] Entity etag + * @property {google.cloud.dataplex.v1.Entity.Type|null} [type] Entity type + * @property {string|null} [asset] Entity asset + * @property {string|null} [dataPath] Entity dataPath + * @property {string|null} [dataPathPattern] Entity dataPathPattern + * @property {string|null} [catalogEntry] Entity catalogEntry + * @property {google.cloud.dataplex.v1.StorageSystem|null} [system] Entity system + * @property {google.cloud.dataplex.v1.IStorageFormat|null} [format] Entity format + * @property {google.cloud.dataplex.v1.Entity.ICompatibilityStatus|null} [compatibility] Entity compatibility + * @property {google.cloud.dataplex.v1.IStorageAccess|null} [access] Entity access + * @property {string|null} [uid] Entity uid + * @property {google.cloud.dataplex.v1.ISchema|null} [schema] Entity schema */ /** - * Constructs a new Task. + * Constructs a new Entity. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a Task. - * @implements ITask + * @classdesc Represents an Entity. + * @implements IEntity * @constructor - * @param {google.cloud.dataplex.v1.ITask=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IEntity=} [properties] Properties to set */ - function Task(properties) { - this.labels = {}; + function Entity(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -48578,205 +49397,240 @@ } /** - * Task name. + * Entity name. * @member {string} name - * @memberof google.cloud.dataplex.v1.Task + * @memberof google.cloud.dataplex.v1.Entity * @instance */ - Task.prototype.name = ""; + Entity.prototype.name = ""; /** - * Task uid. - * @member {string} uid - * @memberof google.cloud.dataplex.v1.Task + * Entity displayName. + * @member {string} displayName + * @memberof google.cloud.dataplex.v1.Entity * @instance */ - Task.prototype.uid = ""; + Entity.prototype.displayName = ""; /** - * Task createTime. + * Entity description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.description = ""; + + /** + * Entity createTime. * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dataplex.v1.Task + * @memberof google.cloud.dataplex.v1.Entity * @instance */ - Task.prototype.createTime = null; + Entity.prototype.createTime = null; /** - * Task updateTime. + * Entity updateTime. * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.Task + * @memberof google.cloud.dataplex.v1.Entity * @instance */ - Task.prototype.updateTime = null; + Entity.prototype.updateTime = null; /** - * Task description. - * @member {string} description - * @memberof google.cloud.dataplex.v1.Task + * Entity id. + * @member {string} id + * @memberof google.cloud.dataplex.v1.Entity * @instance */ - Task.prototype.description = ""; + Entity.prototype.id = ""; /** - * Task displayName. - * @member {string} displayName - * @memberof google.cloud.dataplex.v1.Task + * Entity etag. + * @member {string} etag + * @memberof google.cloud.dataplex.v1.Entity * @instance */ - Task.prototype.displayName = ""; + Entity.prototype.etag = ""; /** - * Task state. - * @member {google.cloud.dataplex.v1.State} state - * @memberof google.cloud.dataplex.v1.Task + * Entity type. + * @member {google.cloud.dataplex.v1.Entity.Type} type + * @memberof google.cloud.dataplex.v1.Entity * @instance */ - Task.prototype.state = 0; + Entity.prototype.type = 0; /** - * Task labels. - * @member {Object.} labels - * @memberof google.cloud.dataplex.v1.Task + * Entity asset. + * @member {string} asset + * @memberof google.cloud.dataplex.v1.Entity * @instance */ - Task.prototype.labels = $util.emptyObject; + Entity.prototype.asset = ""; /** - * Task triggerSpec. - * @member {google.cloud.dataplex.v1.Task.ITriggerSpec|null|undefined} triggerSpec - * @memberof google.cloud.dataplex.v1.Task + * Entity dataPath. + * @member {string} dataPath + * @memberof google.cloud.dataplex.v1.Entity * @instance */ - Task.prototype.triggerSpec = null; + Entity.prototype.dataPath = ""; /** - * Task executionSpec. - * @member {google.cloud.dataplex.v1.Task.IExecutionSpec|null|undefined} executionSpec - * @memberof google.cloud.dataplex.v1.Task + * Entity dataPathPattern. + * @member {string} dataPathPattern + * @memberof google.cloud.dataplex.v1.Entity * @instance */ - Task.prototype.executionSpec = null; + Entity.prototype.dataPathPattern = ""; /** - * Task executionStatus. - * @member {google.cloud.dataplex.v1.Task.IExecutionStatus|null|undefined} executionStatus - * @memberof google.cloud.dataplex.v1.Task + * Entity catalogEntry. + * @member {string} catalogEntry + * @memberof google.cloud.dataplex.v1.Entity * @instance */ - Task.prototype.executionStatus = null; + Entity.prototype.catalogEntry = ""; /** - * Task spark. - * @member {google.cloud.dataplex.v1.Task.ISparkTaskConfig|null|undefined} spark - * @memberof google.cloud.dataplex.v1.Task + * Entity system. + * @member {google.cloud.dataplex.v1.StorageSystem} system + * @memberof google.cloud.dataplex.v1.Entity * @instance */ - Task.prototype.spark = null; + Entity.prototype.system = 0; /** - * Task notebook. - * @member {google.cloud.dataplex.v1.Task.INotebookTaskConfig|null|undefined} notebook - * @memberof google.cloud.dataplex.v1.Task + * Entity format. + * @member {google.cloud.dataplex.v1.IStorageFormat|null|undefined} format + * @memberof google.cloud.dataplex.v1.Entity * @instance */ - Task.prototype.notebook = null; + Entity.prototype.format = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Entity compatibility. + * @member {google.cloud.dataplex.v1.Entity.ICompatibilityStatus|null|undefined} compatibility + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.compatibility = null; /** - * Task config. - * @member {"spark"|"notebook"|undefined} config - * @memberof google.cloud.dataplex.v1.Task + * Entity access. + * @member {google.cloud.dataplex.v1.IStorageAccess|null|undefined} access + * @memberof google.cloud.dataplex.v1.Entity * @instance */ - Object.defineProperty(Task.prototype, "config", { - get: $util.oneOfGetter($oneOfFields = ["spark", "notebook"]), - set: $util.oneOfSetter($oneOfFields) - }); + Entity.prototype.access = null; /** - * Creates a new Task instance using the specified properties. + * Entity uid. + * @member {string} uid + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.uid = ""; + + /** + * Entity schema. + * @member {google.cloud.dataplex.v1.ISchema|null|undefined} schema + * @memberof google.cloud.dataplex.v1.Entity + * @instance + */ + Entity.prototype.schema = null; + + /** + * Creates a new Entity instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.Task + * @memberof google.cloud.dataplex.v1.Entity * @static - * @param {google.cloud.dataplex.v1.ITask=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Task} Task instance + * @param {google.cloud.dataplex.v1.IEntity=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Entity} Entity instance */ - Task.create = function create(properties) { - return new Task(properties); + Entity.create = function create(properties) { + return new Entity(properties); }; /** - * Encodes the specified Task message. Does not implicitly {@link google.cloud.dataplex.v1.Task.verify|verify} messages. + * Encodes the specified Entity message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.Task + * @memberof google.cloud.dataplex.v1.Entity * @static - * @param {google.cloud.dataplex.v1.ITask} message Task message or plain object to encode + * @param {google.cloud.dataplex.v1.IEntity} message Entity message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Task.encode = function encode(message, writer) { + Entity.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.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + 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 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.triggerSpec != null && Object.hasOwnProperty.call(message, "triggerSpec")) - $root.google.cloud.dataplex.v1.Task.TriggerSpec.encode(message.triggerSpec, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); - if (message.executionSpec != null && Object.hasOwnProperty.call(message, "executionSpec")) - $root.google.cloud.dataplex.v1.Task.ExecutionSpec.encode(message.executionSpec, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.executionStatus != null && Object.hasOwnProperty.call(message, "executionStatus")) - $root.google.cloud.dataplex.v1.Task.ExecutionStatus.encode(message.executionStatus, writer.uint32(/* id 201, wireType 2 =*/1610).fork()).ldelim(); - if (message.spark != null && Object.hasOwnProperty.call(message, "spark")) - $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.encode(message.spark, writer.uint32(/* id 300, wireType 2 =*/2402).fork()).ldelim(); - if (message.notebook != null && Object.hasOwnProperty.call(message, "notebook")) - $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.encode(message.notebook, writer.uint32(/* id 302, wireType 2 =*/2418).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.id); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.etag); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.type); + if (message.asset != null && Object.hasOwnProperty.call(message, "asset")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.asset); + if (message.dataPath != null && Object.hasOwnProperty.call(message, "dataPath")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.dataPath); + if (message.dataPathPattern != null && Object.hasOwnProperty.call(message, "dataPathPattern")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.dataPathPattern); + if (message.catalogEntry != null && Object.hasOwnProperty.call(message, "catalogEntry")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.catalogEntry); + if (message.system != null && Object.hasOwnProperty.call(message, "system")) + writer.uint32(/* id 15, wireType 0 =*/120).int32(message.system); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + $root.google.cloud.dataplex.v1.StorageFormat.encode(message.format, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.compatibility != null && Object.hasOwnProperty.call(message, "compatibility")) + $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.encode(message.compatibility, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.access != null && Object.hasOwnProperty.call(message, "access")) + $root.google.cloud.dataplex.v1.StorageAccess.encode(message.access, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 22, wireType 2 =*/178).string(message.uid); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + $root.google.cloud.dataplex.v1.Schema.encode(message.schema, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); return writer; }; /** - * Encodes the specified Task message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.verify|verify} messages. + * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Task + * @memberof google.cloud.dataplex.v1.Entity * @static - * @param {google.cloud.dataplex.v1.ITask} message Task message or plain object to encode + * @param {google.cloud.dataplex.v1.IEntity} message Entity message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Task.encodeDelimited = function encodeDelimited(message, writer) { + Entity.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Task message from the specified reader or buffer. + * Decodes an Entity message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.Task + * @memberof google.cloud.dataplex.v1.Entity * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Task} Task + * @returns {google.cloud.dataplex.v1.Entity} Entity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Task.decode = function decode(reader, length) { + Entity.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Entity(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -48785,70 +49639,71 @@ break; } case 2: { - message.uid = reader.string(); + message.displayName = 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()); + message.description = reader.string(); break; } case 5: { - message.description = reader.string(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 6: { - message.displayName = reader.string(); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 7: { - message.state = reader.int32(); + message.id = reader.string(); break; } case 8: { - if (message.labels === $util.emptyObject) - message.labels = {}; - 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.labels[key] = value; + message.etag = reader.string(); + break; + } + case 10: { + message.type = reader.int32(); break; } - case 100: { - message.triggerSpec = $root.google.cloud.dataplex.v1.Task.TriggerSpec.decode(reader, reader.uint32()); + case 11: { + message.asset = reader.string(); break; } - case 101: { - message.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.decode(reader, reader.uint32()); + case 12: { + message.dataPath = reader.string(); break; } - case 201: { - message.executionStatus = $root.google.cloud.dataplex.v1.Task.ExecutionStatus.decode(reader, reader.uint32()); + case 13: { + message.dataPathPattern = reader.string(); break; } - case 300: { - message.spark = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.decode(reader, reader.uint32()); + case 14: { + message.catalogEntry = reader.string(); break; } - case 302: { - message.notebook = $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.decode(reader, reader.uint32()); + case 15: { + message.system = reader.int32(); + break; + } + case 16: { + message.format = $root.google.cloud.dataplex.v1.StorageFormat.decode(reader, reader.uint32()); + break; + } + case 19: { + message.compatibility = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.decode(reader, reader.uint32()); + break; + } + case 21: { + message.access = $root.google.cloud.dataplex.v1.StorageAccess.decode(reader, reader.uint32()); + break; + } + case 22: { + message.uid = reader.string(); + break; + } + case 50: { + message.schema = $root.google.cloud.dataplex.v1.Schema.decode(reader, reader.uint32()); break; } default: @@ -48860,39 +49715,41 @@ }; /** - * Decodes a Task message from the specified reader or buffer, length delimited. + * Decodes an Entity message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Task + * @memberof google.cloud.dataplex.v1.Entity * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Task} Task + * @returns {google.cloud.dataplex.v1.Entity} Entity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Task.decodeDelimited = function decodeDelimited(reader) { + Entity.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Task message. + * Verifies an Entity message. * @function verify - * @memberof google.cloud.dataplex.v1.Task + * @memberof google.cloud.dataplex.v1.Entity * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Task.verify = function verify(message) { + Entity.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: 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) @@ -48903,1154 +49760,540 @@ if (error) return "updateTime." + error; } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { default: - return "state: enum value expected"; + return "type: enum value expected"; case 0: case 1: case 2: - case 3: - case 4: break; } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.triggerSpec != null && message.hasOwnProperty("triggerSpec")) { - var error = $root.google.cloud.dataplex.v1.Task.TriggerSpec.verify(message.triggerSpec); + if (message.asset != null && message.hasOwnProperty("asset")) + if (!$util.isString(message.asset)) + return "asset: string expected"; + if (message.dataPath != null && message.hasOwnProperty("dataPath")) + if (!$util.isString(message.dataPath)) + return "dataPath: string expected"; + if (message.dataPathPattern != null && message.hasOwnProperty("dataPathPattern")) + if (!$util.isString(message.dataPathPattern)) + return "dataPathPattern: string expected"; + if (message.catalogEntry != null && message.hasOwnProperty("catalogEntry")) + if (!$util.isString(message.catalogEntry)) + return "catalogEntry: string expected"; + if (message.system != null && message.hasOwnProperty("system")) + switch (message.system) { + default: + return "system: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.format != null && message.hasOwnProperty("format")) { + var error = $root.google.cloud.dataplex.v1.StorageFormat.verify(message.format); if (error) - return "triggerSpec." + error; + return "format." + error; } - if (message.executionSpec != null && message.hasOwnProperty("executionSpec")) { - var error = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.verify(message.executionSpec); + if (message.compatibility != null && message.hasOwnProperty("compatibility")) { + var error = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify(message.compatibility); if (error) - return "executionSpec." + error; + return "compatibility." + error; } - if (message.executionStatus != null && message.hasOwnProperty("executionStatus")) { - var error = $root.google.cloud.dataplex.v1.Task.ExecutionStatus.verify(message.executionStatus); + if (message.access != null && message.hasOwnProperty("access")) { + var error = $root.google.cloud.dataplex.v1.StorageAccess.verify(message.access); if (error) - return "executionStatus." + error; + return "access." + error; } - if (message.spark != null && message.hasOwnProperty("spark")) { - properties.config = 1; - { - var error = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.verify(message.spark); - if (error) - return "spark." + error; - } - } - if (message.notebook != null && message.hasOwnProperty("notebook")) { - if (properties.config === 1) - return "config: multiple values"; - properties.config = 1; - { - var error = $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.verify(message.notebook); - if (error) - return "notebook." + error; - } + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.schema != null && message.hasOwnProperty("schema")) { + var error = $root.google.cloud.dataplex.v1.Schema.verify(message.schema); + if (error) + return "schema." + error; } return null; }; /** - * Creates a Task message from a plain object. Also converts values to their respective internal types. + * Creates an Entity message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.Task + * @memberof google.cloud.dataplex.v1.Entity * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Task} Task + * @returns {google.cloud.dataplex.v1.Entity} Entity */ - Task.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Task) + Entity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Entity) return object; - var message = new $root.google.cloud.dataplex.v1.Task(); + var message = new $root.google.cloud.dataplex.v1.Entity(); if (object.name != null) message.name = String(object.name); - if (object.uid != null) - message.uid = String(object.uid); + 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.dataplex.v1.Task.createTime: object expected"); + throw TypeError(".google.cloud.dataplex.v1.Entity.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.dataplex.v1.Task.updateTime: object expected"); + throw TypeError(".google.cloud.dataplex.v1.Entity.updateTime: object expected"); message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } - if (object.description != null) - message.description = String(object.description); - if (object.displayName != null) - message.displayName = String(object.displayName); - switch (object.state) { + if (object.id != null) + message.id = String(object.id); + if (object.etag != null) + message.etag = String(object.etag); + switch (object.type) { default: - if (typeof object.state === "number") { - message.state = object.state; + if (typeof object.type === "number") { + message.type = object.type; break; } break; - case "STATE_UNSPECIFIED": + case "TYPE_UNSPECIFIED": case 0: - message.state = 0; + message.type = 0; break; - case "ACTIVE": + case "TABLE": case 1: - message.state = 1; + message.type = 1; break; - case "CREATING": + case "FILESET": case 2: - message.state = 2; + message.type = 2; break; - case "DELETING": - case 3: - message.state = 3; + } + if (object.asset != null) + message.asset = String(object.asset); + if (object.dataPath != null) + message.dataPath = String(object.dataPath); + if (object.dataPathPattern != null) + message.dataPathPattern = String(object.dataPathPattern); + if (object.catalogEntry != null) + message.catalogEntry = String(object.catalogEntry); + switch (object.system) { + default: + if (typeof object.system === "number") { + message.system = object.system; + break; + } break; - case "ACTION_REQUIRED": - case 4: - message.state = 4; + case "STORAGE_SYSTEM_UNSPECIFIED": + case 0: + message.system = 0; + break; + case "CLOUD_STORAGE": + case 1: + message.system = 1; + break; + case "BIGQUERY": + case 2: + message.system = 2; break; } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.triggerSpec != null) { - if (typeof object.triggerSpec !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.triggerSpec: object expected"); - message.triggerSpec = $root.google.cloud.dataplex.v1.Task.TriggerSpec.fromObject(object.triggerSpec); - } - if (object.executionSpec != null) { - if (typeof object.executionSpec !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.executionSpec: object expected"); - message.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.fromObject(object.executionSpec); + if (object.format != null) { + if (typeof object.format !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entity.format: object expected"); + message.format = $root.google.cloud.dataplex.v1.StorageFormat.fromObject(object.format); } - if (object.executionStatus != null) { - if (typeof object.executionStatus !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.executionStatus: object expected"); - message.executionStatus = $root.google.cloud.dataplex.v1.Task.ExecutionStatus.fromObject(object.executionStatus); + if (object.compatibility != null) { + if (typeof object.compatibility !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entity.compatibility: object expected"); + message.compatibility = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.fromObject(object.compatibility); } - if (object.spark != null) { - if (typeof object.spark !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.spark: object expected"); - message.spark = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.fromObject(object.spark); + if (object.access != null) { + if (typeof object.access !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entity.access: object expected"); + message.access = $root.google.cloud.dataplex.v1.StorageAccess.fromObject(object.access); } - if (object.notebook != null) { - if (typeof object.notebook !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.notebook: object expected"); - message.notebook = $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.fromObject(object.notebook); + if (object.uid != null) + message.uid = String(object.uid); + if (object.schema != null) { + if (typeof object.schema !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entity.schema: object expected"); + message.schema = $root.google.cloud.dataplex.v1.Schema.fromObject(object.schema); } return message; }; /** - * Creates a plain object from a Task message. Also converts values to other types if specified. + * Creates a plain object from an Entity message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.Task + * @memberof google.cloud.dataplex.v1.Entity * @static - * @param {google.cloud.dataplex.v1.Task} message Task + * @param {google.cloud.dataplex.v1.Entity} message Entity * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Task.toObject = function toObject(message, options) { + Entity.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.labels = {}; if (options.defaults) { object.name = ""; - object.uid = ""; + object.displayName = ""; + object.description = ""; object.createTime = null; object.updateTime = null; - object.description = ""; - object.displayName = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.triggerSpec = null; - object.executionSpec = null; - object.executionStatus = null; + object.id = ""; + object.etag = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.asset = ""; + object.dataPath = ""; + object.dataPathPattern = ""; + object.catalogEntry = ""; + object.system = options.enums === String ? "STORAGE_SYSTEM_UNSPECIFIED" : 0; + object.format = null; + object.compatibility = null; + object.access = null; + object.uid = ""; + object.schema = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; + 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.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataplex.v1.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.State[message.state] : message.state; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.triggerSpec != null && message.hasOwnProperty("triggerSpec")) - object.triggerSpec = $root.google.cloud.dataplex.v1.Task.TriggerSpec.toObject(message.triggerSpec, options); - if (message.executionSpec != null && message.hasOwnProperty("executionSpec")) - object.executionSpec = $root.google.cloud.dataplex.v1.Task.ExecutionSpec.toObject(message.executionSpec, options); - if (message.executionStatus != null && message.hasOwnProperty("executionStatus")) - object.executionStatus = $root.google.cloud.dataplex.v1.Task.ExecutionStatus.toObject(message.executionStatus, options); - if (message.spark != null && message.hasOwnProperty("spark")) { - object.spark = $root.google.cloud.dataplex.v1.Task.SparkTaskConfig.toObject(message.spark, options); - if (options.oneofs) - object.config = "spark"; - } - if (message.notebook != null && message.hasOwnProperty("notebook")) { - object.notebook = $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig.toObject(message.notebook, options); - if (options.oneofs) - object.config = "notebook"; - } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Entity.Type[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.Entity.Type[message.type] : message.type; + if (message.asset != null && message.hasOwnProperty("asset")) + object.asset = message.asset; + if (message.dataPath != null && message.hasOwnProperty("dataPath")) + object.dataPath = message.dataPath; + if (message.dataPathPattern != null && message.hasOwnProperty("dataPathPattern")) + object.dataPathPattern = message.dataPathPattern; + if (message.catalogEntry != null && message.hasOwnProperty("catalogEntry")) + object.catalogEntry = message.catalogEntry; + if (message.system != null && message.hasOwnProperty("system")) + object.system = options.enums === String ? $root.google.cloud.dataplex.v1.StorageSystem[message.system] === undefined ? message.system : $root.google.cloud.dataplex.v1.StorageSystem[message.system] : message.system; + if (message.format != null && message.hasOwnProperty("format")) + object.format = $root.google.cloud.dataplex.v1.StorageFormat.toObject(message.format, options); + if (message.compatibility != null && message.hasOwnProperty("compatibility")) + object.compatibility = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.toObject(message.compatibility, options); + if (message.access != null && message.hasOwnProperty("access")) + object.access = $root.google.cloud.dataplex.v1.StorageAccess.toObject(message.access, options); + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = $root.google.cloud.dataplex.v1.Schema.toObject(message.schema, options); return object; }; /** - * Converts this Task to JSON. + * Converts this Entity to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.Task + * @memberof google.cloud.dataplex.v1.Entity * @instance * @returns {Object.} JSON object */ - Task.prototype.toJSON = function toJSON() { + Entity.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Task + * Gets the default type url for Entity * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Task + * @memberof google.cloud.dataplex.v1.Entity * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Task.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Task"; - }; - - Task.InfrastructureSpec = (function() { - - /** - * Properties of an InfrastructureSpec. - * @memberof google.cloud.dataplex.v1.Task - * @interface IInfrastructureSpec - * @property {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources|null} [batch] InfrastructureSpec batch - * @property {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime|null} [containerImage] InfrastructureSpec containerImage - * @property {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork|null} [vpcNetwork] InfrastructureSpec vpcNetwork - */ - - /** - * Constructs a new InfrastructureSpec. - * @memberof google.cloud.dataplex.v1.Task - * @classdesc Represents an InfrastructureSpec. - * @implements IInfrastructureSpec - * @constructor - * @param {google.cloud.dataplex.v1.Task.IInfrastructureSpec=} [properties] Properties to set - */ - function InfrastructureSpec(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]]; - } - - /** - * InfrastructureSpec batch. - * @member {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources|null|undefined} batch - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @instance - */ - InfrastructureSpec.prototype.batch = null; - - /** - * InfrastructureSpec containerImage. - * @member {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime|null|undefined} containerImage - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @instance - */ - InfrastructureSpec.prototype.containerImage = null; - - /** - * InfrastructureSpec vpcNetwork. - * @member {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork|null|undefined} vpcNetwork - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @instance - */ - InfrastructureSpec.prototype.vpcNetwork = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * InfrastructureSpec resources. - * @member {"batch"|undefined} resources - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @instance - */ - Object.defineProperty(InfrastructureSpec.prototype, "resources", { - get: $util.oneOfGetter($oneOfFields = ["batch"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * InfrastructureSpec runtime. - * @member {"containerImage"|undefined} runtime - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @instance - */ - Object.defineProperty(InfrastructureSpec.prototype, "runtime", { - get: $util.oneOfGetter($oneOfFields = ["containerImage"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * InfrastructureSpec network. - * @member {"vpcNetwork"|undefined} network - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @instance - */ - Object.defineProperty(InfrastructureSpec.prototype, "network", { - get: $util.oneOfGetter($oneOfFields = ["vpcNetwork"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new InfrastructureSpec instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @static - * @param {google.cloud.dataplex.v1.Task.IInfrastructureSpec=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec} InfrastructureSpec instance - */ - InfrastructureSpec.create = function create(properties) { - return new InfrastructureSpec(properties); - }; - - /** - * Encodes the specified InfrastructureSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @static - * @param {google.cloud.dataplex.v1.Task.IInfrastructureSpec} message InfrastructureSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InfrastructureSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.batch != null && Object.hasOwnProperty.call(message, "batch")) - $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.encode(message.batch, writer.uint32(/* id 52, wireType 2 =*/418).fork()).ldelim(); - if (message.containerImage != null && Object.hasOwnProperty.call(message, "containerImage")) - $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.encode(message.containerImage, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.vpcNetwork != null && Object.hasOwnProperty.call(message, "vpcNetwork")) - $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.encode(message.vpcNetwork, writer.uint32(/* id 150, wireType 2 =*/1202).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified InfrastructureSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @static - * @param {google.cloud.dataplex.v1.Task.IInfrastructureSpec} message InfrastructureSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InfrastructureSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Entity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Entity"; + }; - /** - * Decodes an InfrastructureSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec} InfrastructureSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InfrastructureSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 52: { - message.batch = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.decode(reader, reader.uint32()); - break; - } - case 101: { - message.containerImage = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.decode(reader, reader.uint32()); - break; - } - case 150: { - message.vpcNetwork = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Type enum. + * @name google.cloud.dataplex.v1.Entity.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} TABLE=1 TABLE value + * @property {number} FILESET=2 FILESET value + */ + Entity.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TABLE"] = 1; + values[valuesById[2] = "FILESET"] = 2; + return values; + })(); - /** - * Decodes an InfrastructureSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec} InfrastructureSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InfrastructureSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Entity.CompatibilityStatus = (function() { /** - * Verifies an InfrastructureSpec message. - * @function verify - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Properties of a CompatibilityStatus. + * @memberof google.cloud.dataplex.v1.Entity + * @interface ICompatibilityStatus + * @property {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null} [hiveMetastore] CompatibilityStatus hiveMetastore + * @property {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null} [bigquery] CompatibilityStatus bigquery */ - InfrastructureSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.batch != null && message.hasOwnProperty("batch")) { - properties.resources = 1; - { - var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify(message.batch); - if (error) - return "batch." + error; - } - } - if (message.containerImage != null && message.hasOwnProperty("containerImage")) { - properties.runtime = 1; - { - var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify(message.containerImage); - if (error) - return "containerImage." + error; - } - } - if (message.vpcNetwork != null && message.hasOwnProperty("vpcNetwork")) { - properties.network = 1; - { - var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify(message.vpcNetwork); - if (error) - return "vpcNetwork." + error; - } - } - return null; - }; /** - * Creates an InfrastructureSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec} InfrastructureSpec + * Constructs a new CompatibilityStatus. + * @memberof google.cloud.dataplex.v1.Entity + * @classdesc Represents a CompatibilityStatus. + * @implements ICompatibilityStatus + * @constructor + * @param {google.cloud.dataplex.v1.Entity.ICompatibilityStatus=} [properties] Properties to set */ - InfrastructureSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Task.InfrastructureSpec) - return object; - var message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec(); - if (object.batch != null) { - if (typeof object.batch !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.batch: object expected"); - message.batch = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.fromObject(object.batch); - } - if (object.containerImage != null) { - if (typeof object.containerImage !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.containerImage: object expected"); - message.containerImage = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.fromObject(object.containerImage); - } - if (object.vpcNetwork != null) { - if (typeof object.vpcNetwork !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.vpcNetwork: object expected"); - message.vpcNetwork = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.fromObject(object.vpcNetwork); - } - return message; - }; + function CompatibilityStatus(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]]; + } /** - * Creates a plain object from an InfrastructureSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec} message InfrastructureSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * CompatibilityStatus hiveMetastore. + * @member {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null|undefined} hiveMetastore + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @instance */ - InfrastructureSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.batch != null && message.hasOwnProperty("batch")) { - object.batch = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.toObject(message.batch, options); - if (options.oneofs) - object.resources = "batch"; - } - if (message.containerImage != null && message.hasOwnProperty("containerImage")) { - object.containerImage = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.toObject(message.containerImage, options); - if (options.oneofs) - object.runtime = "containerImage"; - } - if (message.vpcNetwork != null && message.hasOwnProperty("vpcNetwork")) { - object.vpcNetwork = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.toObject(message.vpcNetwork, options); - if (options.oneofs) - object.network = "vpcNetwork"; - } - return object; - }; + CompatibilityStatus.prototype.hiveMetastore = null; /** - * Converts this InfrastructureSpec to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec + * CompatibilityStatus bigquery. + * @member {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility|null|undefined} bigquery + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus * @instance - * @returns {Object.} JSON object */ - InfrastructureSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + CompatibilityStatus.prototype.bigquery = null; /** - * Gets the default type url for InfrastructureSpec - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InfrastructureSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.InfrastructureSpec"; - }; - - InfrastructureSpec.BatchComputeResources = (function() { - - /** - * Properties of a BatchComputeResources. - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @interface IBatchComputeResources - * @property {number|null} [executorsCount] BatchComputeResources executorsCount - * @property {number|null} [maxExecutorsCount] BatchComputeResources maxExecutorsCount - */ - - /** - * Constructs a new BatchComputeResources. - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @classdesc Represents a BatchComputeResources. - * @implements IBatchComputeResources - * @constructor - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources=} [properties] Properties to set - */ - function BatchComputeResources(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]]; - } - - /** - * BatchComputeResources executorsCount. - * @member {number} executorsCount - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @instance - */ - BatchComputeResources.prototype.executorsCount = 0; - - /** - * BatchComputeResources maxExecutorsCount. - * @member {number} maxExecutorsCount - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @instance - */ - BatchComputeResources.prototype.maxExecutorsCount = 0; - - /** - * Creates a new BatchComputeResources instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} BatchComputeResources instance - */ - BatchComputeResources.create = function create(properties) { - return new BatchComputeResources(properties); - }; - - /** - * Encodes the specified BatchComputeResources message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources} message BatchComputeResources message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchComputeResources.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.executorsCount != null && Object.hasOwnProperty.call(message, "executorsCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.executorsCount); - if (message.maxExecutorsCount != null && Object.hasOwnProperty.call(message, "maxExecutorsCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxExecutorsCount); - return writer; - }; - - /** - * Encodes the specified BatchComputeResources message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IBatchComputeResources} message BatchComputeResources message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchComputeResources.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BatchComputeResources message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} BatchComputeResources - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchComputeResources.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.executorsCount = reader.int32(); - break; - } - case 2: { - message.maxExecutorsCount = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BatchComputeResources message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} BatchComputeResources - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchComputeResources.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BatchComputeResources message. - * @function verify - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BatchComputeResources.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.executorsCount != null && message.hasOwnProperty("executorsCount")) - if (!$util.isInteger(message.executorsCount)) - return "executorsCount: integer expected"; - if (message.maxExecutorsCount != null && message.hasOwnProperty("maxExecutorsCount")) - if (!$util.isInteger(message.maxExecutorsCount)) - return "maxExecutorsCount: integer expected"; - return null; - }; - - /** - * Creates a BatchComputeResources message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} BatchComputeResources - */ - BatchComputeResources.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources) - return object; - var message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources(); - if (object.executorsCount != null) - message.executorsCount = object.executorsCount | 0; - if (object.maxExecutorsCount != null) - message.maxExecutorsCount = object.maxExecutorsCount | 0; - return message; - }; - - /** - * Creates a plain object from a BatchComputeResources message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources} message BatchComputeResources - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BatchComputeResources.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.executorsCount = 0; - object.maxExecutorsCount = 0; - } - if (message.executorsCount != null && message.hasOwnProperty("executorsCount")) - object.executorsCount = message.executorsCount; - if (message.maxExecutorsCount != null && message.hasOwnProperty("maxExecutorsCount")) - object.maxExecutorsCount = message.maxExecutorsCount; - return object; - }; - - /** - * Converts this BatchComputeResources to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @instance - * @returns {Object.} JSON object - */ - BatchComputeResources.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BatchComputeResources - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BatchComputeResources.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources"; - }; - - return BatchComputeResources; - })(); - - InfrastructureSpec.ContainerImageRuntime = (function() { - - /** - * Properties of a ContainerImageRuntime. - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @interface IContainerImageRuntime - * @property {string|null} [image] ContainerImageRuntime image - * @property {Array.|null} [javaJars] ContainerImageRuntime javaJars - * @property {Array.|null} [pythonPackages] ContainerImageRuntime pythonPackages - * @property {Object.|null} [properties] ContainerImageRuntime properties - */ - - /** - * Constructs a new ContainerImageRuntime. - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @classdesc Represents a ContainerImageRuntime. - * @implements IContainerImageRuntime - * @constructor - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime=} [properties] Properties to set - */ - function ContainerImageRuntime(properties) { - this.javaJars = []; - this.pythonPackages = []; - this.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]]; - } - - /** - * ContainerImageRuntime image. - * @member {string} image - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @instance - */ - ContainerImageRuntime.prototype.image = ""; - - /** - * ContainerImageRuntime javaJars. - * @member {Array.} javaJars - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @instance - */ - ContainerImageRuntime.prototype.javaJars = $util.emptyArray; - - /** - * ContainerImageRuntime pythonPackages. - * @member {Array.} pythonPackages - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @instance - */ - ContainerImageRuntime.prototype.pythonPackages = $util.emptyArray; - - /** - * ContainerImageRuntime properties. - * @member {Object.} properties - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @instance - */ - ContainerImageRuntime.prototype.properties = $util.emptyObject; - - /** - * Creates a new ContainerImageRuntime instance using the specified properties. - * @function create - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} ContainerImageRuntime instance - */ - ContainerImageRuntime.create = function create(properties) { - return new ContainerImageRuntime(properties); - }; + * Creates a new CompatibilityStatus instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {google.cloud.dataplex.v1.Entity.ICompatibilityStatus=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus} CompatibilityStatus instance + */ + CompatibilityStatus.create = function create(properties) { + return new CompatibilityStatus(properties); + }; - /** - * Encodes the specified ContainerImageRuntime message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify|verify} messages. - * @function encode - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime} message ContainerImageRuntime message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContainerImageRuntime.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.image != null && Object.hasOwnProperty.call(message, "image")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.image); - if (message.javaJars != null && message.javaJars.length) - for (var i = 0; i < message.javaJars.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.javaJars[i]); - if (message.pythonPackages != null && message.pythonPackages.length) - for (var i = 0; i < message.pythonPackages.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pythonPackages[i]); - if (message.properties != null && Object.hasOwnProperty.call(message, "properties")) - for (var keys = Object.keys(message.properties), i = 0; i < keys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.properties[keys[i]]).ldelim(); - return writer; - }; + /** + * Encodes the specified CompatibilityStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {google.cloud.dataplex.v1.Entity.ICompatibilityStatus} message CompatibilityStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompatibilityStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hiveMetastore != null && Object.hasOwnProperty.call(message, "hiveMetastore")) + $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.encode(message.hiveMetastore, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.bigquery != null && Object.hasOwnProperty.call(message, "bigquery")) + $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.encode(message.bigquery, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified ContainerImageRuntime message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IContainerImageRuntime} message ContainerImageRuntime message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContainerImageRuntime.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified CompatibilityStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {google.cloud.dataplex.v1.Entity.ICompatibilityStatus} message CompatibilityStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompatibilityStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ContainerImageRuntime message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} ContainerImageRuntime - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContainerImageRuntime.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.image = reader.string(); - break; - } - case 2: { - if (!(message.javaJars && message.javaJars.length)) - message.javaJars = []; - message.javaJars.push(reader.string()); - break; - } - case 3: { - if (!(message.pythonPackages && message.pythonPackages.length)) - message.pythonPackages = []; - message.pythonPackages.push(reader.string()); - break; - } - case 4: { - if (message.properties === $util.emptyObject) - message.properties = {}; - 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.properties[key] = value; - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes a CompatibilityStatus message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus} CompatibilityStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompatibilityStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.hiveMetastore = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.decode(reader, reader.uint32()); + break; + } + case 2: { + message.bigquery = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.decode(reader, reader.uint32()); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a ContainerImageRuntime message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} ContainerImageRuntime - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContainerImageRuntime.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a ContainerImageRuntime message. - * @function verify - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ContainerImageRuntime.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.image != null && message.hasOwnProperty("image")) - if (!$util.isString(message.image)) - return "image: string expected"; - if (message.javaJars != null && message.hasOwnProperty("javaJars")) { - if (!Array.isArray(message.javaJars)) - return "javaJars: array expected"; - for (var i = 0; i < message.javaJars.length; ++i) - if (!$util.isString(message.javaJars[i])) - return "javaJars: string[] expected"; - } - if (message.pythonPackages != null && message.hasOwnProperty("pythonPackages")) { - if (!Array.isArray(message.pythonPackages)) - return "pythonPackages: array expected"; - for (var i = 0; i < message.pythonPackages.length; ++i) - if (!$util.isString(message.pythonPackages[i])) - return "pythonPackages: string[] expected"; - } - if (message.properties != null && message.hasOwnProperty("properties")) { - if (!$util.isObject(message.properties)) - return "properties: object expected"; - var key = Object.keys(message.properties); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.properties[key[i]])) - return "properties: string{k:string} expected"; - } - return null; - }; + /** + * Decodes a CompatibilityStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus} CompatibilityStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompatibilityStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a ContainerImageRuntime message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} ContainerImageRuntime - */ - ContainerImageRuntime.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime) - return object; - var message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime(); - if (object.image != null) - message.image = String(object.image); - if (object.javaJars) { - if (!Array.isArray(object.javaJars)) - throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.javaJars: array expected"); - message.javaJars = []; - for (var i = 0; i < object.javaJars.length; ++i) - message.javaJars[i] = String(object.javaJars[i]); - } - if (object.pythonPackages) { - if (!Array.isArray(object.pythonPackages)) - throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.pythonPackages: array expected"); - message.pythonPackages = []; - for (var i = 0; i < object.pythonPackages.length; ++i) - message.pythonPackages[i] = String(object.pythonPackages[i]); - } - if (object.properties) { - if (typeof object.properties !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime.properties: object expected"); - message.properties = {}; - for (var keys = Object.keys(object.properties), i = 0; i < keys.length; ++i) - message.properties[keys[i]] = String(object.properties[keys[i]]); - } - return message; - }; + /** + * Verifies a CompatibilityStatus message. + * @function verify + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompatibilityStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hiveMetastore != null && message.hasOwnProperty("hiveMetastore")) { + var error = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify(message.hiveMetastore); + if (error) + return "hiveMetastore." + error; + } + if (message.bigquery != null && message.hasOwnProperty("bigquery")) { + var error = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify(message.bigquery); + if (error) + return "bigquery." + error; + } + return null; + }; - /** - * Creates a plain object from a ContainerImageRuntime message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime} message ContainerImageRuntime - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ContainerImageRuntime.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.javaJars = []; - object.pythonPackages = []; - } - if (options.objects || options.defaults) - object.properties = {}; - if (options.defaults) - object.image = ""; - if (message.image != null && message.hasOwnProperty("image")) - object.image = message.image; - if (message.javaJars && message.javaJars.length) { - object.javaJars = []; - for (var j = 0; j < message.javaJars.length; ++j) - object.javaJars[j] = message.javaJars[j]; - } - if (message.pythonPackages && message.pythonPackages.length) { - object.pythonPackages = []; - for (var j = 0; j < message.pythonPackages.length; ++j) - object.pythonPackages[j] = message.pythonPackages[j]; - } - var keys2; - if (message.properties && (keys2 = Object.keys(message.properties)).length) { - object.properties = {}; - for (var j = 0; j < keys2.length; ++j) - object.properties[keys2[j]] = message.properties[keys2[j]]; - } + /** + * Creates a CompatibilityStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus} CompatibilityStatus + */ + CompatibilityStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus) return object; - }; + var message = new $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus(); + if (object.hiveMetastore != null) { + if (typeof object.hiveMetastore !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entity.CompatibilityStatus.hiveMetastore: object expected"); + message.hiveMetastore = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.fromObject(object.hiveMetastore); + } + if (object.bigquery != null) { + if (typeof object.bigquery !== "object") + throw TypeError(".google.cloud.dataplex.v1.Entity.CompatibilityStatus.bigquery: object expected"); + message.bigquery = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.fromObject(object.bigquery); + } + return message; + }; - /** - * Converts this ContainerImageRuntime to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @instance - * @returns {Object.} JSON object - */ - ContainerImageRuntime.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a CompatibilityStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus} message CompatibilityStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompatibilityStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.hiveMetastore = null; + object.bigquery = null; + } + if (message.hiveMetastore != null && message.hasOwnProperty("hiveMetastore")) + object.hiveMetastore = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.toObject(message.hiveMetastore, options); + if (message.bigquery != null && message.hasOwnProperty("bigquery")) + object.bigquery = $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.toObject(message.bigquery, options); + return object; + }; - /** - * Gets the default type url for ContainerImageRuntime - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ContainerImageRuntime.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime"; - }; + /** + * Converts this CompatibilityStatus to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @instance + * @returns {Object.} JSON object + */ + CompatibilityStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ContainerImageRuntime; - })(); + /** + * Gets the default type url for CompatibilityStatus + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CompatibilityStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Entity.CompatibilityStatus"; + }; - InfrastructureSpec.VpcNetwork = (function() { + CompatibilityStatus.Compatibility = (function() { /** - * Properties of a VpcNetwork. - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @interface IVpcNetwork - * @property {string|null} [network] VpcNetwork network - * @property {string|null} [subNetwork] VpcNetwork subNetwork - * @property {Array.|null} [networkTags] VpcNetwork networkTags + * Properties of a Compatibility. + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @interface ICompatibility + * @property {boolean|null} [compatible] Compatibility compatible + * @property {string|null} [reason] Compatibility reason */ /** - * Constructs a new VpcNetwork. - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec - * @classdesc Represents a VpcNetwork. - * @implements IVpcNetwork + * Constructs a new Compatibility. + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus + * @classdesc Represents a Compatibility. + * @implements ICompatibility * @constructor - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility=} [properties] Properties to set */ - function VpcNetwork(properties) { - this.networkTags = []; + function Compatibility(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -50058,120 +50301,89 @@ } /** - * VpcNetwork network. - * @member {string|null|undefined} network - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @instance - */ - VpcNetwork.prototype.network = null; - - /** - * VpcNetwork subNetwork. - * @member {string|null|undefined} subNetwork - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @instance - */ - VpcNetwork.prototype.subNetwork = null; - - /** - * VpcNetwork networkTags. - * @member {Array.} networkTags - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * Compatibility compatible. + * @member {boolean} compatible + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility * @instance */ - VpcNetwork.prototype.networkTags = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + Compatibility.prototype.compatible = false; /** - * VpcNetwork networkName. - * @member {"network"|"subNetwork"|undefined} networkName - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * Compatibility reason. + * @member {string} reason + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility * @instance */ - Object.defineProperty(VpcNetwork.prototype, "networkName", { - get: $util.oneOfGetter($oneOfFields = ["network", "subNetwork"]), - set: $util.oneOfSetter($oneOfFields) - }); + Compatibility.prototype.reason = ""; /** - * Creates a new VpcNetwork instance using the specified properties. + * Creates a new Compatibility instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} VpcNetwork instance + * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} Compatibility instance */ - VpcNetwork.create = function create(properties) { - return new VpcNetwork(properties); + Compatibility.create = function create(properties) { + return new Compatibility(properties); }; /** - * Encodes the specified VpcNetwork message. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify|verify} messages. + * Encodes the specified Compatibility message. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork} message VpcNetwork message or plain object to encode + * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility} message Compatibility message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VpcNetwork.encode = function encode(message, writer) { + Compatibility.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.network); - if (message.subNetwork != null && Object.hasOwnProperty.call(message, "subNetwork")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.subNetwork); - if (message.networkTags != null && message.networkTags.length) - for (var i = 0; i < message.networkTags.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkTags[i]); + if (message.compatible != null && Object.hasOwnProperty.call(message, "compatible")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.compatible); + if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.reason); return writer; }; /** - * Encodes the specified VpcNetwork message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.verify|verify} messages. + * Encodes the specified Compatibility message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.IVpcNetwork} message VpcNetwork message or plain object to encode + * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.ICompatibility} message Compatibility message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VpcNetwork.encodeDelimited = function encodeDelimited(message, writer) { + Compatibility.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VpcNetwork message from the specified reader or buffer. + * Decodes a Compatibility message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} VpcNetwork + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} Compatibility * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VpcNetwork.decode = function decode(reader, length) { + Compatibility.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.network = reader.string(); + message.compatible = reader.bool(); break; } case 2: { - message.subNetwork = reader.string(); - break; - } - case 3: { - if (!(message.networkTags && message.networkTags.length)) - message.networkTags = []; - message.networkTags.push(reader.string()); + message.reason = reader.string(); break; } default: @@ -50182,169 +50394,826 @@ return message; }; - /** - * Decodes a VpcNetwork message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} VpcNetwork - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpcNetwork.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a Compatibility message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} Compatibility + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Compatibility.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Compatibility message. + * @function verify + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Compatibility.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.compatible != null && message.hasOwnProperty("compatible")) + if (typeof message.compatible !== "boolean") + return "compatible: boolean expected"; + if (message.reason != null && message.hasOwnProperty("reason")) + if (!$util.isString(message.reason)) + return "reason: string expected"; + return null; + }; + + /** + * Creates a Compatibility message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} Compatibility + */ + Compatibility.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility) + return object; + var message = new $root.google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility(); + if (object.compatible != null) + message.compatible = Boolean(object.compatible); + if (object.reason != null) + message.reason = String(object.reason); + return message; + }; + + /** + * Creates a plain object from a Compatibility message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility} message Compatibility + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Compatibility.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.compatible = false; + object.reason = ""; + } + if (message.compatible != null && message.hasOwnProperty("compatible")) + object.compatible = message.compatible; + if (message.reason != null && message.hasOwnProperty("reason")) + object.reason = message.reason; + return object; + }; + + /** + * Converts this Compatibility to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @instance + * @returns {Object.} JSON object + */ + Compatibility.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Compatibility + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Compatibility.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility"; + }; + + return Compatibility; + })(); + + return CompatibilityStatus; + })(); + + return Entity; + })(); + + v1.Partition = (function() { + + /** + * Properties of a Partition. + * @memberof google.cloud.dataplex.v1 + * @interface IPartition + * @property {string|null} [name] Partition name + * @property {Array.|null} [values] Partition values + * @property {string|null} [location] Partition location + * @property {string|null} [etag] Partition etag + */ + + /** + * Constructs a new Partition. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a Partition. + * @implements IPartition + * @constructor + * @param {google.cloud.dataplex.v1.IPartition=} [properties] Properties to set + */ + function Partition(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]]; + } + + /** + * Partition name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Partition + * @instance + */ + Partition.prototype.name = ""; + + /** + * Partition values. + * @member {Array.} values + * @memberof google.cloud.dataplex.v1.Partition + * @instance + */ + Partition.prototype.values = $util.emptyArray; + + /** + * Partition location. + * @member {string} location + * @memberof google.cloud.dataplex.v1.Partition + * @instance + */ + Partition.prototype.location = ""; + + /** + * Partition etag. + * @member {string} etag + * @memberof google.cloud.dataplex.v1.Partition + * @instance + */ + Partition.prototype.etag = ""; + + /** + * Creates a new Partition instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {google.cloud.dataplex.v1.IPartition=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Partition} Partition instance + */ + Partition.create = function create(properties) { + return new Partition(properties); + }; + + /** + * Encodes the specified Partition message. Does not implicitly {@link google.cloud.dataplex.v1.Partition.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {google.cloud.dataplex.v1.IPartition} message Partition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Partition.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.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.location); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.etag); + return writer; + }; + + /** + * Encodes the specified Partition message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Partition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {google.cloud.dataplex.v1.IPartition} message Partition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Partition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Partition message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Partition} Partition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Partition.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Partition(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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.location = reader.string(); + break; + } + case 4: { + message.etag = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Partition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Partition} Partition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Partition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Partition message. + * @function verify + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Partition.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.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a Partition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Partition} Partition + */ + Partition.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Partition) + return object; + var message = new $root.google.cloud.dataplex.v1.Partition(); + if (object.name != null) + message.name = String(object.name); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.cloud.dataplex.v1.Partition.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + if (object.location != null) + message.location = String(object.location); + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a Partition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {google.cloud.dataplex.v1.Partition} message Partition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Partition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (options.defaults) { + object.name = ""; + object.location = ""; + object.etag = ""; + } + 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.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + return object; + }; + + /** + * Converts this Partition to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Partition + * @instance + * @returns {Object.} JSON object + */ + Partition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Partition + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Partition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Partition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Partition"; + }; + + return Partition; + })(); + + v1.Schema = (function() { + + /** + * Properties of a Schema. + * @memberof google.cloud.dataplex.v1 + * @interface ISchema + * @property {boolean|null} [userManaged] Schema userManaged + * @property {Array.|null} [fields] Schema fields + * @property {Array.|null} [partitionFields] Schema partitionFields + * @property {google.cloud.dataplex.v1.Schema.PartitionStyle|null} [partitionStyle] Schema partitionStyle + */ + + /** + * Constructs a new Schema. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a Schema. + * @implements ISchema + * @constructor + * @param {google.cloud.dataplex.v1.ISchema=} [properties] Properties to set + */ + function Schema(properties) { + this.fields = []; + this.partitionFields = []; + 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]]; + } + + /** + * Schema userManaged. + * @member {boolean} userManaged + * @memberof google.cloud.dataplex.v1.Schema + * @instance + */ + Schema.prototype.userManaged = false; + + /** + * Schema fields. + * @member {Array.} fields + * @memberof google.cloud.dataplex.v1.Schema + * @instance + */ + Schema.prototype.fields = $util.emptyArray; + + /** + * Schema partitionFields. + * @member {Array.} partitionFields + * @memberof google.cloud.dataplex.v1.Schema + * @instance + */ + Schema.prototype.partitionFields = $util.emptyArray; + + /** + * Schema partitionStyle. + * @member {google.cloud.dataplex.v1.Schema.PartitionStyle} partitionStyle + * @memberof google.cloud.dataplex.v1.Schema + * @instance + */ + Schema.prototype.partitionStyle = 0; + + /** + * Creates a new Schema instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {google.cloud.dataplex.v1.ISchema=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Schema} Schema instance + */ + Schema.create = function create(properties) { + return new Schema(properties); + }; + + /** + * Encodes the specified Schema message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {google.cloud.dataplex.v1.ISchema} message Schema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Schema.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userManaged != null && Object.hasOwnProperty.call(message, "userManaged")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.userManaged); + if (message.fields != null && message.fields.length) + for (var i = 0; i < message.fields.length; ++i) + $root.google.cloud.dataplex.v1.Schema.SchemaField.encode(message.fields[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.partitionFields != null && message.partitionFields.length) + for (var i = 0; i < message.partitionFields.length; ++i) + $root.google.cloud.dataplex.v1.Schema.PartitionField.encode(message.partitionFields[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.partitionStyle != null && Object.hasOwnProperty.call(message, "partitionStyle")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.partitionStyle); + return writer; + }; - /** - * Verifies a VpcNetwork message. - * @function verify - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VpcNetwork.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.network != null && message.hasOwnProperty("network")) { - properties.networkName = 1; - if (!$util.isString(message.network)) - return "network: string expected"; - } - if (message.subNetwork != null && message.hasOwnProperty("subNetwork")) { - if (properties.networkName === 1) - return "networkName: multiple values"; - properties.networkName = 1; - if (!$util.isString(message.subNetwork)) - return "subNetwork: string expected"; - } - if (message.networkTags != null && message.hasOwnProperty("networkTags")) { - if (!Array.isArray(message.networkTags)) - return "networkTags: array expected"; - for (var i = 0; i < message.networkTags.length; ++i) - if (!$util.isString(message.networkTags[i])) - return "networkTags: string[] expected"; - } - return null; - }; + /** + * Encodes the specified Schema message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {google.cloud.dataplex.v1.ISchema} message Schema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Schema.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a VpcNetwork message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} VpcNetwork - */ - VpcNetwork.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork) - return object; - var message = new $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork(); - if (object.network != null) - message.network = String(object.network); - if (object.subNetwork != null) - message.subNetwork = String(object.subNetwork); - if (object.networkTags) { - if (!Array.isArray(object.networkTags)) - throw TypeError(".google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork.networkTags: array expected"); - message.networkTags = []; - for (var i = 0; i < object.networkTags.length; ++i) - message.networkTags[i] = String(object.networkTags[i]); + /** + * Decodes a Schema message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.Schema} Schema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Schema.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Schema(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userManaged = reader.bool(); + break; } - return message; - }; - - /** - * Creates a plain object from a VpcNetwork message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @static - * @param {google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork} message VpcNetwork - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VpcNetwork.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.networkTags = []; - if (message.network != null && message.hasOwnProperty("network")) { - object.network = message.network; - if (options.oneofs) - object.networkName = "network"; + case 2: { + if (!(message.fields && message.fields.length)) + message.fields = []; + message.fields.push($root.google.cloud.dataplex.v1.Schema.SchemaField.decode(reader, reader.uint32())); + break; } - if (message.subNetwork != null && message.hasOwnProperty("subNetwork")) { - object.subNetwork = message.subNetwork; - if (options.oneofs) - object.networkName = "subNetwork"; + case 3: { + if (!(message.partitionFields && message.partitionFields.length)) + message.partitionFields = []; + message.partitionFields.push($root.google.cloud.dataplex.v1.Schema.PartitionField.decode(reader, reader.uint32())); + break; } - if (message.networkTags && message.networkTags.length) { - object.networkTags = []; - for (var j = 0; j < message.networkTags.length; ++j) - object.networkTags[j] = message.networkTags[j]; + case 4: { + message.partitionStyle = reader.int32(); + break; } - return object; - }; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Converts this VpcNetwork to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @instance - * @returns {Object.} JSON object - */ - VpcNetwork.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a Schema message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.Schema} Schema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Schema.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Gets the default type url for VpcNetwork - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VpcNetwork.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork"; - }; + /** + * Verifies a Schema message. + * @function verify + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Schema.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userManaged != null && message.hasOwnProperty("userManaged")) + if (typeof message.userManaged !== "boolean") + return "userManaged: boolean expected"; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!Array.isArray(message.fields)) + return "fields: array expected"; + for (var i = 0; i < message.fields.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Schema.SchemaField.verify(message.fields[i]); + if (error) + return "fields." + error; + } + } + if (message.partitionFields != null && message.hasOwnProperty("partitionFields")) { + if (!Array.isArray(message.partitionFields)) + return "partitionFields: array expected"; + for (var i = 0; i < message.partitionFields.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Schema.PartitionField.verify(message.partitionFields[i]); + if (error) + return "partitionFields." + error; + } + } + if (message.partitionStyle != null && message.hasOwnProperty("partitionStyle")) + switch (message.partitionStyle) { + default: + return "partitionStyle: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; - return VpcNetwork; - })(); + /** + * Creates a Schema message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.Schema} Schema + */ + Schema.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Schema) + return object; + var message = new $root.google.cloud.dataplex.v1.Schema(); + if (object.userManaged != null) + message.userManaged = Boolean(object.userManaged); + if (object.fields) { + if (!Array.isArray(object.fields)) + throw TypeError(".google.cloud.dataplex.v1.Schema.fields: array expected"); + message.fields = []; + for (var i = 0; i < object.fields.length; ++i) { + if (typeof object.fields[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.Schema.fields: object expected"); + message.fields[i] = $root.google.cloud.dataplex.v1.Schema.SchemaField.fromObject(object.fields[i]); + } + } + if (object.partitionFields) { + if (!Array.isArray(object.partitionFields)) + throw TypeError(".google.cloud.dataplex.v1.Schema.partitionFields: array expected"); + message.partitionFields = []; + for (var i = 0; i < object.partitionFields.length; ++i) { + if (typeof object.partitionFields[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.Schema.partitionFields: object expected"); + message.partitionFields[i] = $root.google.cloud.dataplex.v1.Schema.PartitionField.fromObject(object.partitionFields[i]); + } + } + switch (object.partitionStyle) { + default: + if (typeof object.partitionStyle === "number") { + message.partitionStyle = object.partitionStyle; + break; + } + break; + case "PARTITION_STYLE_UNSPECIFIED": + case 0: + message.partitionStyle = 0; + break; + case "HIVE_COMPATIBLE": + case 1: + message.partitionStyle = 1; + break; + } + return message; + }; - return InfrastructureSpec; + /** + * Creates a plain object from a Schema message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {google.cloud.dataplex.v1.Schema} message Schema + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Schema.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.fields = []; + object.partitionFields = []; + } + if (options.defaults) { + object.userManaged = false; + object.partitionStyle = options.enums === String ? "PARTITION_STYLE_UNSPECIFIED" : 0; + } + if (message.userManaged != null && message.hasOwnProperty("userManaged")) + object.userManaged = message.userManaged; + if (message.fields && message.fields.length) { + object.fields = []; + for (var j = 0; j < message.fields.length; ++j) + object.fields[j] = $root.google.cloud.dataplex.v1.Schema.SchemaField.toObject(message.fields[j], options); + } + if (message.partitionFields && message.partitionFields.length) { + object.partitionFields = []; + for (var j = 0; j < message.partitionFields.length; ++j) + object.partitionFields[j] = $root.google.cloud.dataplex.v1.Schema.PartitionField.toObject(message.partitionFields[j], options); + } + if (message.partitionStyle != null && message.hasOwnProperty("partitionStyle")) + object.partitionStyle = options.enums === String ? $root.google.cloud.dataplex.v1.Schema.PartitionStyle[message.partitionStyle] === undefined ? message.partitionStyle : $root.google.cloud.dataplex.v1.Schema.PartitionStyle[message.partitionStyle] : message.partitionStyle; + return object; + }; + + /** + * Converts this Schema to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Schema + * @instance + * @returns {Object.} JSON object + */ + Schema.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Schema + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Schema + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Schema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Schema"; + }; + + /** + * Type enum. + * @name google.cloud.dataplex.v1.Schema.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} BOOLEAN=1 BOOLEAN value + * @property {number} BYTE=2 BYTE value + * @property {number} INT16=3 INT16 value + * @property {number} INT32=4 INT32 value + * @property {number} INT64=5 INT64 value + * @property {number} FLOAT=6 FLOAT value + * @property {number} DOUBLE=7 DOUBLE value + * @property {number} DECIMAL=8 DECIMAL value + * @property {number} STRING=9 STRING value + * @property {number} BINARY=10 BINARY value + * @property {number} TIMESTAMP=11 TIMESTAMP value + * @property {number} DATE=12 DATE value + * @property {number} TIME=13 TIME value + * @property {number} RECORD=14 RECORD value + * @property {number} NULL=100 NULL value + */ + Schema.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BOOLEAN"] = 1; + values[valuesById[2] = "BYTE"] = 2; + values[valuesById[3] = "INT16"] = 3; + values[valuesById[4] = "INT32"] = 4; + values[valuesById[5] = "INT64"] = 5; + values[valuesById[6] = "FLOAT"] = 6; + values[valuesById[7] = "DOUBLE"] = 7; + values[valuesById[8] = "DECIMAL"] = 8; + values[valuesById[9] = "STRING"] = 9; + values[valuesById[10] = "BINARY"] = 10; + values[valuesById[11] = "TIMESTAMP"] = 11; + values[valuesById[12] = "DATE"] = 12; + values[valuesById[13] = "TIME"] = 13; + values[valuesById[14] = "RECORD"] = 14; + values[valuesById[100] = "NULL"] = 100; + return values; })(); - Task.TriggerSpec = (function() { + /** + * Mode enum. + * @name google.cloud.dataplex.v1.Schema.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} REQUIRED=1 REQUIRED value + * @property {number} NULLABLE=2 NULLABLE value + * @property {number} REPEATED=3 REPEATED value + */ + Schema.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "REQUIRED"] = 1; + values[valuesById[2] = "NULLABLE"] = 2; + values[valuesById[3] = "REPEATED"] = 3; + return values; + })(); + + Schema.SchemaField = (function() { /** - * Properties of a TriggerSpec. - * @memberof google.cloud.dataplex.v1.Task - * @interface ITriggerSpec - * @property {google.cloud.dataplex.v1.Task.TriggerSpec.Type|null} [type] TriggerSpec type - * @property {google.protobuf.ITimestamp|null} [startTime] TriggerSpec startTime - * @property {boolean|null} [disabled] TriggerSpec disabled - * @property {number|null} [maxRetries] TriggerSpec maxRetries - * @property {string|null} [schedule] TriggerSpec schedule + * Properties of a SchemaField. + * @memberof google.cloud.dataplex.v1.Schema + * @interface ISchemaField + * @property {string|null} [name] SchemaField name + * @property {string|null} [description] SchemaField description + * @property {google.cloud.dataplex.v1.Schema.Type|null} [type] SchemaField type + * @property {google.cloud.dataplex.v1.Schema.Mode|null} [mode] SchemaField mode + * @property {Array.|null} [fields] SchemaField fields */ /** - * Constructs a new TriggerSpec. - * @memberof google.cloud.dataplex.v1.Task - * @classdesc Represents a TriggerSpec. - * @implements ITriggerSpec + * Constructs a new SchemaField. + * @memberof google.cloud.dataplex.v1.Schema + * @classdesc Represents a SchemaField. + * @implements ISchemaField * @constructor - * @param {google.cloud.dataplex.v1.Task.ITriggerSpec=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.Schema.ISchemaField=} [properties] Properties to set */ - function TriggerSpec(properties) { + function SchemaField(properties) { + this.fields = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -50352,145 +51221,134 @@ } /** - * TriggerSpec type. - * @member {google.cloud.dataplex.v1.Task.TriggerSpec.Type} type - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec - * @instance - */ - TriggerSpec.prototype.type = 0; - - /** - * TriggerSpec startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * SchemaField name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Schema.SchemaField * @instance */ - TriggerSpec.prototype.startTime = null; + SchemaField.prototype.name = ""; /** - * TriggerSpec disabled. - * @member {boolean} disabled - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * SchemaField description. + * @member {string} description + * @memberof google.cloud.dataplex.v1.Schema.SchemaField * @instance */ - TriggerSpec.prototype.disabled = false; + SchemaField.prototype.description = ""; /** - * TriggerSpec maxRetries. - * @member {number} maxRetries - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * SchemaField type. + * @member {google.cloud.dataplex.v1.Schema.Type} type + * @memberof google.cloud.dataplex.v1.Schema.SchemaField * @instance */ - TriggerSpec.prototype.maxRetries = 0; + SchemaField.prototype.type = 0; /** - * TriggerSpec schedule. - * @member {string|null|undefined} schedule - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * SchemaField mode. + * @member {google.cloud.dataplex.v1.Schema.Mode} mode + * @memberof google.cloud.dataplex.v1.Schema.SchemaField * @instance */ - TriggerSpec.prototype.schedule = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + SchemaField.prototype.mode = 0; /** - * TriggerSpec trigger. - * @member {"schedule"|undefined} trigger - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * SchemaField fields. + * @member {Array.} fields + * @memberof google.cloud.dataplex.v1.Schema.SchemaField * @instance */ - Object.defineProperty(TriggerSpec.prototype, "trigger", { - get: $util.oneOfGetter($oneOfFields = ["schedule"]), - set: $util.oneOfSetter($oneOfFields) - }); + SchemaField.prototype.fields = $util.emptyArray; /** - * Creates a new TriggerSpec instance using the specified properties. + * Creates a new SchemaField instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @memberof google.cloud.dataplex.v1.Schema.SchemaField * @static - * @param {google.cloud.dataplex.v1.Task.ITriggerSpec=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Task.TriggerSpec} TriggerSpec instance + * @param {google.cloud.dataplex.v1.Schema.ISchemaField=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Schema.SchemaField} SchemaField instance */ - TriggerSpec.create = function create(properties) { - return new TriggerSpec(properties); + SchemaField.create = function create(properties) { + return new SchemaField(properties); }; /** - * Encodes the specified TriggerSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.TriggerSpec.verify|verify} messages. + * Encodes the specified SchemaField message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.SchemaField.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @memberof google.cloud.dataplex.v1.Schema.SchemaField * @static - * @param {google.cloud.dataplex.v1.Task.ITriggerSpec} message TriggerSpec message or plain object to encode + * @param {google.cloud.dataplex.v1.Schema.ISchemaField} message SchemaField message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TriggerSpec.encode = function encode(message, writer) { + SchemaField.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disabled); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.maxRetries != null && Object.hasOwnProperty.call(message, "maxRetries")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.maxRetries); - if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) - writer.uint32(/* id 100, wireType 2 =*/802).string(message.schedule); + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.mode); + if (message.fields != null && message.fields.length) + for (var i = 0; i < message.fields.length; ++i) + $root.google.cloud.dataplex.v1.Schema.SchemaField.encode(message.fields[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; /** - * Encodes the specified TriggerSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.TriggerSpec.verify|verify} messages. + * Encodes the specified SchemaField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.SchemaField.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @memberof google.cloud.dataplex.v1.Schema.SchemaField * @static - * @param {google.cloud.dataplex.v1.Task.ITriggerSpec} message TriggerSpec message or plain object to encode + * @param {google.cloud.dataplex.v1.Schema.ISchemaField} message SchemaField message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TriggerSpec.encodeDelimited = function encodeDelimited(message, writer) { + SchemaField.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TriggerSpec message from the specified reader or buffer. + * Decodes a SchemaField message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @memberof google.cloud.dataplex.v1.Schema.SchemaField * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Task.TriggerSpec} TriggerSpec + * @returns {google.cloud.dataplex.v1.Schema.SchemaField} SchemaField * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TriggerSpec.decode = function decode(reader, length) { + SchemaField.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.TriggerSpec(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Schema.SchemaField(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 5: { - message.type = reader.int32(); + case 1: { + message.name = reader.string(); break; } - case 6: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 2: { + message.description = reader.string(); break; } - case 4: { - message.disabled = reader.bool(); + case 3: { + message.type = reader.int32(); break; } - case 7: { - message.maxRetries = reader.int32(); + case 4: { + message.mode = reader.int32(); break; } - case 100: { - message.schedule = reader.string(); + case 10: { + if (!(message.fields && message.fields.length)) + message.fields = []; + message.fields.push($root.google.cloud.dataplex.v1.Schema.SchemaField.decode(reader, reader.uint32())); break; } default: @@ -50502,33 +51360,38 @@ }; /** - * Decodes a TriggerSpec message from the specified reader or buffer, length delimited. + * Decodes a SchemaField message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @memberof google.cloud.dataplex.v1.Schema.SchemaField * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Task.TriggerSpec} TriggerSpec + * @returns {google.cloud.dataplex.v1.Schema.SchemaField} SchemaField * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TriggerSpec.decodeDelimited = function decodeDelimited(reader) { + SchemaField.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TriggerSpec message. + * Verifies a SchemaField message. * @function verify - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @memberof google.cloud.dataplex.v1.Schema.SchemaField * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TriggerSpec.verify = function verify(message) { + SchemaField.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; if (message.type != null && message.hasOwnProperty("type")) switch (message.type) { default: @@ -50536,39 +51399,59 @@ case 0: case 1: case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 100: + break; + } + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + case 3: break; } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.disabled != null && message.hasOwnProperty("disabled")) - if (typeof message.disabled !== "boolean") - return "disabled: boolean expected"; - if (message.maxRetries != null && message.hasOwnProperty("maxRetries")) - if (!$util.isInteger(message.maxRetries)) - return "maxRetries: integer expected"; - if (message.schedule != null && message.hasOwnProperty("schedule")) { - properties.trigger = 1; - if (!$util.isString(message.schedule)) - return "schedule: string expected"; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!Array.isArray(message.fields)) + return "fields: array expected"; + for (var i = 0; i < message.fields.length; ++i) { + var error = $root.google.cloud.dataplex.v1.Schema.SchemaField.verify(message.fields[i]); + if (error) + return "fields." + error; + } } return null; }; /** - * Creates a TriggerSpec message from a plain object. Also converts values to their respective internal types. + * Creates a SchemaField message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @memberof google.cloud.dataplex.v1.Schema.SchemaField * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Task.TriggerSpec} TriggerSpec + * @returns {google.cloud.dataplex.v1.Schema.SchemaField} SchemaField */ - TriggerSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Task.TriggerSpec) + SchemaField.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Schema.SchemaField) return object; - var message = new $root.google.cloud.dataplex.v1.Task.TriggerSpec(); + var message = new $root.google.cloud.dataplex.v1.Schema.SchemaField(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); switch (object.type) { default: if (typeof object.type === "number") { @@ -50580,132 +51463,189 @@ case 0: message.type = 0; break; - case "ON_DEMAND": + case "BOOLEAN": case 1: message.type = 1; break; - case "RECURRING": + case "BYTE": case 2: message.type = 2; break; + case "INT16": + case 3: + message.type = 3; + break; + case "INT32": + case 4: + message.type = 4; + break; + case "INT64": + case 5: + message.type = 5; + break; + case "FLOAT": + case 6: + message.type = 6; + break; + case "DOUBLE": + case 7: + message.type = 7; + break; + case "DECIMAL": + case 8: + message.type = 8; + break; + case "STRING": + case 9: + message.type = 9; + break; + case "BINARY": + case 10: + message.type = 10; + break; + case "TIMESTAMP": + case 11: + message.type = 11; + break; + case "DATE": + case 12: + message.type = 12; + break; + case "TIME": + case 13: + message.type = 13; + break; + case "RECORD": + case 14: + message.type = 14; + break; + case "NULL": + case 100: + message.type = 100; + break; } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.TriggerSpec.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + switch (object.mode) { + default: + if (typeof object.mode === "number") { + message.mode = object.mode; + break; + } + break; + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "REQUIRED": + case 1: + message.mode = 1; + break; + case "NULLABLE": + case 2: + message.mode = 2; + break; + case "REPEATED": + case 3: + message.mode = 3; + break; + } + if (object.fields) { + if (!Array.isArray(object.fields)) + throw TypeError(".google.cloud.dataplex.v1.Schema.SchemaField.fields: array expected"); + message.fields = []; + for (var i = 0; i < object.fields.length; ++i) { + if (typeof object.fields[i] !== "object") + throw TypeError(".google.cloud.dataplex.v1.Schema.SchemaField.fields: object expected"); + message.fields[i] = $root.google.cloud.dataplex.v1.Schema.SchemaField.fromObject(object.fields[i]); + } } - if (object.disabled != null) - message.disabled = Boolean(object.disabled); - if (object.maxRetries != null) - message.maxRetries = object.maxRetries | 0; - if (object.schedule != null) - message.schedule = String(object.schedule); return message; }; /** - * Creates a plain object from a TriggerSpec message. Also converts values to other types if specified. + * Creates a plain object from a SchemaField message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @memberof google.cloud.dataplex.v1.Schema.SchemaField * @static - * @param {google.cloud.dataplex.v1.Task.TriggerSpec} message TriggerSpec + * @param {google.cloud.dataplex.v1.Schema.SchemaField} message SchemaField * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TriggerSpec.toObject = function toObject(message, options) { + SchemaField.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.fields = []; if (options.defaults) { - object.disabled = false; + object.name = ""; + object.description = ""; object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.startTime = null; - object.maxRetries = 0; + object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; } - if (message.disabled != null && message.hasOwnProperty("disabled")) - object.disabled = message.disabled; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Task.TriggerSpec.Type[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.Task.TriggerSpec.Type[message.type] : message.type; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.maxRetries != null && message.hasOwnProperty("maxRetries")) - object.maxRetries = message.maxRetries; - if (message.schedule != null && message.hasOwnProperty("schedule")) { - object.schedule = message.schedule; - if (options.oneofs) - object.trigger = "schedule"; + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Schema.Type[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.Schema.Type[message.type] : message.type; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.google.cloud.dataplex.v1.Schema.Mode[message.mode] === undefined ? message.mode : $root.google.cloud.dataplex.v1.Schema.Mode[message.mode] : message.mode; + if (message.fields && message.fields.length) { + object.fields = []; + for (var j = 0; j < message.fields.length; ++j) + object.fields[j] = $root.google.cloud.dataplex.v1.Schema.SchemaField.toObject(message.fields[j], options); } return object; }; /** - * Converts this TriggerSpec to JSON. + * Converts this SchemaField to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @memberof google.cloud.dataplex.v1.Schema.SchemaField * @instance * @returns {Object.} JSON object */ - TriggerSpec.prototype.toJSON = function toJSON() { + SchemaField.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TriggerSpec + * Gets the default type url for SchemaField * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Task.TriggerSpec + * @memberof google.cloud.dataplex.v1.Schema.SchemaField * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TriggerSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SchemaField.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.TriggerSpec"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.Schema.SchemaField"; }; - /** - * Type enum. - * @name google.cloud.dataplex.v1.Task.TriggerSpec.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} ON_DEMAND=1 ON_DEMAND value - * @property {number} RECURRING=2 RECURRING value - */ - TriggerSpec.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ON_DEMAND"] = 1; - values[valuesById[2] = "RECURRING"] = 2; - return values; - })(); - - return TriggerSpec; + return SchemaField; })(); - Task.ExecutionSpec = (function() { + Schema.PartitionField = (function() { /** - * Properties of an ExecutionSpec. - * @memberof google.cloud.dataplex.v1.Task - * @interface IExecutionSpec - * @property {Object.|null} [args] ExecutionSpec args - * @property {string|null} [serviceAccount] ExecutionSpec serviceAccount - * @property {string|null} [project] ExecutionSpec project - * @property {google.protobuf.IDuration|null} [maxJobExecutionLifetime] ExecutionSpec maxJobExecutionLifetime - * @property {string|null} [kmsKey] ExecutionSpec kmsKey + * Properties of a PartitionField. + * @memberof google.cloud.dataplex.v1.Schema + * @interface IPartitionField + * @property {string|null} [name] PartitionField name + * @property {google.cloud.dataplex.v1.Schema.Type|null} [type] PartitionField type */ /** - * Constructs a new ExecutionSpec. - * @memberof google.cloud.dataplex.v1.Task - * @classdesc Represents an ExecutionSpec. - * @implements IExecutionSpec + * Constructs a new PartitionField. + * @memberof google.cloud.dataplex.v1.Schema + * @classdesc Represents a PartitionField. + * @implements IPartitionField * @constructor - * @param {google.cloud.dataplex.v1.Task.IExecutionSpec=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.Schema.IPartitionField=} [properties] Properties to set */ - function ExecutionSpec(properties) { - this.args = {}; + function PartitionField(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -50713,151 +51653,89 @@ } /** - * ExecutionSpec args. - * @member {Object.} args - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @instance - */ - ExecutionSpec.prototype.args = $util.emptyObject; - - /** - * ExecutionSpec serviceAccount. - * @member {string} serviceAccount - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @instance - */ - ExecutionSpec.prototype.serviceAccount = ""; - - /** - * ExecutionSpec project. - * @member {string} project - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @instance - */ - ExecutionSpec.prototype.project = ""; - - /** - * ExecutionSpec maxJobExecutionLifetime. - * @member {google.protobuf.IDuration|null|undefined} maxJobExecutionLifetime - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * PartitionField name. + * @member {string} name + * @memberof google.cloud.dataplex.v1.Schema.PartitionField * @instance */ - ExecutionSpec.prototype.maxJobExecutionLifetime = null; + PartitionField.prototype.name = ""; /** - * ExecutionSpec kmsKey. - * @member {string} kmsKey - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * PartitionField type. + * @member {google.cloud.dataplex.v1.Schema.Type} type + * @memberof google.cloud.dataplex.v1.Schema.PartitionField * @instance */ - ExecutionSpec.prototype.kmsKey = ""; + PartitionField.prototype.type = 0; /** - * Creates a new ExecutionSpec instance using the specified properties. + * Creates a new PartitionField instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @memberof google.cloud.dataplex.v1.Schema.PartitionField * @static - * @param {google.cloud.dataplex.v1.Task.IExecutionSpec=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Task.ExecutionSpec} ExecutionSpec instance + * @param {google.cloud.dataplex.v1.Schema.IPartitionField=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.Schema.PartitionField} PartitionField instance */ - ExecutionSpec.create = function create(properties) { - return new ExecutionSpec(properties); + PartitionField.create = function create(properties) { + return new PartitionField(properties); }; /** - * Encodes the specified ExecutionSpec message. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionSpec.verify|verify} messages. + * Encodes the specified PartitionField message. Does not implicitly {@link google.cloud.dataplex.v1.Schema.PartitionField.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @memberof google.cloud.dataplex.v1.Schema.PartitionField * @static - * @param {google.cloud.dataplex.v1.Task.IExecutionSpec} message ExecutionSpec message or plain object to encode + * @param {google.cloud.dataplex.v1.Schema.IPartitionField} message PartitionField message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecutionSpec.encode = function encode(message, writer) { + PartitionField.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.args != null && Object.hasOwnProperty.call(message, "args")) - for (var keys = Object.keys(message.args), i = 0; i < keys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.args[keys[i]]).ldelim(); - if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.serviceAccount); - if (message.project != null && Object.hasOwnProperty.call(message, "project")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.project); - if (message.maxJobExecutionLifetime != null && Object.hasOwnProperty.call(message, "maxJobExecutionLifetime")) - $root.google.protobuf.Duration.encode(message.maxJobExecutionLifetime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.kmsKey != null && Object.hasOwnProperty.call(message, "kmsKey")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.kmsKey); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); return writer; }; /** - * Encodes the specified ExecutionSpec message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionSpec.verify|verify} messages. + * Encodes the specified PartitionField message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Schema.PartitionField.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @memberof google.cloud.dataplex.v1.Schema.PartitionField * @static - * @param {google.cloud.dataplex.v1.Task.IExecutionSpec} message ExecutionSpec message or plain object to encode + * @param {google.cloud.dataplex.v1.Schema.IPartitionField} message PartitionField message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecutionSpec.encodeDelimited = function encodeDelimited(message, writer) { + PartitionField.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExecutionSpec message from the specified reader or buffer. + * Decodes a PartitionField message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @memberof google.cloud.dataplex.v1.Schema.PartitionField * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Task.ExecutionSpec} ExecutionSpec + * @returns {google.cloud.dataplex.v1.Schema.PartitionField} PartitionField * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecutionSpec.decode = function decode(reader, length) { + PartitionField.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.ExecutionSpec(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Schema.PartitionField(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: { - if (message.args === $util.emptyObject) - message.args = {}; - 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.args[key] = value; - break; - } - case 5: { - message.serviceAccount = reader.string(); - break; - } - case 7: { - message.project = reader.string(); - break; - } - case 8: { - message.maxJobExecutionLifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + case 1: { + message.name = reader.string(); break; } - case 9: { - message.kmsKey = reader.string(); + case 2: { + message.type = reader.int32(); break; } default: @@ -50869,184 +51747,703 @@ }; /** - * Decodes an ExecutionSpec message from the specified reader or buffer, length delimited. + * Decodes a PartitionField message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @memberof google.cloud.dataplex.v1.Schema.PartitionField * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Task.ExecutionSpec} ExecutionSpec + * @returns {google.cloud.dataplex.v1.Schema.PartitionField} PartitionField * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecutionSpec.decodeDelimited = function decodeDelimited(reader) { + PartitionField.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExecutionSpec message. + * Verifies a PartitionField message. * @function verify - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @memberof google.cloud.dataplex.v1.Schema.PartitionField * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExecutionSpec.verify = function verify(message) { + PartitionField.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.args != null && message.hasOwnProperty("args")) { - if (!$util.isObject(message.args)) - return "args: object expected"; - var key = Object.keys(message.args); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.args[key[i]])) - return "args: string{k:string} expected"; - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - if (!$util.isString(message.serviceAccount)) - return "serviceAccount: string expected"; - if (message.project != null && message.hasOwnProperty("project")) - if (!$util.isString(message.project)) - return "project: string expected"; - if (message.maxJobExecutionLifetime != null && message.hasOwnProperty("maxJobExecutionLifetime")) { - var error = $root.google.protobuf.Duration.verify(message.maxJobExecutionLifetime); - if (error) - return "maxJobExecutionLifetime." + error; - } - if (message.kmsKey != null && message.hasOwnProperty("kmsKey")) - if (!$util.isString(message.kmsKey)) - return "kmsKey: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 100: + break; + } return null; }; /** - * Creates an ExecutionSpec message from a plain object. Also converts values to their respective internal types. + * Creates a PartitionField message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @memberof google.cloud.dataplex.v1.Schema.PartitionField * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Task.ExecutionSpec} ExecutionSpec + * @returns {google.cloud.dataplex.v1.Schema.PartitionField} PartitionField */ - ExecutionSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Task.ExecutionSpec) + PartitionField.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.Schema.PartitionField) return object; - var message = new $root.google.cloud.dataplex.v1.Task.ExecutionSpec(); - if (object.args) { - if (typeof object.args !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.ExecutionSpec.args: object expected"); - message.args = {}; - for (var keys = Object.keys(object.args), i = 0; i < keys.length; ++i) - message.args[keys[i]] = String(object.args[keys[i]]); - } - if (object.serviceAccount != null) - message.serviceAccount = String(object.serviceAccount); - if (object.project != null) - message.project = String(object.project); - if (object.maxJobExecutionLifetime != null) { - if (typeof object.maxJobExecutionLifetime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.ExecutionSpec.maxJobExecutionLifetime: object expected"); - message.maxJobExecutionLifetime = $root.google.protobuf.Duration.fromObject(object.maxJobExecutionLifetime); + var message = new $root.google.cloud.dataplex.v1.Schema.PartitionField(); + if (object.name != null) + message.name = String(object.name); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "BOOLEAN": + case 1: + message.type = 1; + break; + case "BYTE": + case 2: + message.type = 2; + break; + case "INT16": + case 3: + message.type = 3; + break; + case "INT32": + case 4: + message.type = 4; + break; + case "INT64": + case 5: + message.type = 5; + break; + case "FLOAT": + case 6: + message.type = 6; + break; + case "DOUBLE": + case 7: + message.type = 7; + break; + case "DECIMAL": + case 8: + message.type = 8; + break; + case "STRING": + case 9: + message.type = 9; + break; + case "BINARY": + case 10: + message.type = 10; + break; + case "TIMESTAMP": + case 11: + message.type = 11; + break; + case "DATE": + case 12: + message.type = 12; + break; + case "TIME": + case 13: + message.type = 13; + break; + case "RECORD": + case 14: + message.type = 14; + break; + case "NULL": + case 100: + message.type = 100; + break; } - if (object.kmsKey != null) - message.kmsKey = String(object.kmsKey); return message; }; /** - * Creates a plain object from an ExecutionSpec message. Also converts values to other types if specified. + * Creates a plain object from a PartitionField message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec + * @memberof google.cloud.dataplex.v1.Schema.PartitionField * @static - * @param {google.cloud.dataplex.v1.Task.ExecutionSpec} message ExecutionSpec + * @param {google.cloud.dataplex.v1.Schema.PartitionField} message PartitionField * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExecutionSpec.toObject = function toObject(message, options) { + PartitionField.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.args = {}; if (options.defaults) { - object.serviceAccount = ""; - object.project = ""; - object.maxJobExecutionLifetime = null; - object.kmsKey = ""; + object.name = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; } - var keys2; - if (message.args && (keys2 = Object.keys(message.args)).length) { - object.args = {}; - for (var j = 0; j < keys2.length; ++j) - object.args[keys2[j]] = message.args[keys2[j]]; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dataplex.v1.Schema.Type[message.type] === undefined ? message.type : $root.google.cloud.dataplex.v1.Schema.Type[message.type] : message.type; + return object; + }; + + /** + * Converts this PartitionField to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @instance + * @returns {Object.} JSON object + */ + PartitionField.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PartitionField + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.Schema.PartitionField + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PartitionField.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.Schema.PartitionField"; + }; + + return PartitionField; + })(); + + /** + * PartitionStyle enum. + * @name google.cloud.dataplex.v1.Schema.PartitionStyle + * @enum {number} + * @property {number} PARTITION_STYLE_UNSPECIFIED=0 PARTITION_STYLE_UNSPECIFIED value + * @property {number} HIVE_COMPATIBLE=1 HIVE_COMPATIBLE value + */ + Schema.PartitionStyle = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PARTITION_STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "HIVE_COMPATIBLE"] = 1; + return values; + })(); + + return Schema; + })(); + + v1.StorageFormat = (function() { + + /** + * Properties of a StorageFormat. + * @memberof google.cloud.dataplex.v1 + * @interface IStorageFormat + * @property {google.cloud.dataplex.v1.StorageFormat.Format|null} [format] StorageFormat format + * @property {google.cloud.dataplex.v1.StorageFormat.CompressionFormat|null} [compressionFormat] StorageFormat compressionFormat + * @property {string|null} [mimeType] StorageFormat mimeType + * @property {google.cloud.dataplex.v1.StorageFormat.ICsvOptions|null} [csv] StorageFormat csv + * @property {google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null} [json] StorageFormat json + * @property {google.cloud.dataplex.v1.StorageFormat.IIcebergOptions|null} [iceberg] StorageFormat iceberg + */ + + /** + * Constructs a new StorageFormat. + * @memberof google.cloud.dataplex.v1 + * @classdesc Represents a StorageFormat. + * @implements IStorageFormat + * @constructor + * @param {google.cloud.dataplex.v1.IStorageFormat=} [properties] Properties to set + */ + function StorageFormat(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]]; + } + + /** + * StorageFormat format. + * @member {google.cloud.dataplex.v1.StorageFormat.Format} format + * @memberof google.cloud.dataplex.v1.StorageFormat + * @instance + */ + StorageFormat.prototype.format = 0; + + /** + * StorageFormat compressionFormat. + * @member {google.cloud.dataplex.v1.StorageFormat.CompressionFormat} compressionFormat + * @memberof google.cloud.dataplex.v1.StorageFormat + * @instance + */ + StorageFormat.prototype.compressionFormat = 0; + + /** + * StorageFormat mimeType. + * @member {string} mimeType + * @memberof google.cloud.dataplex.v1.StorageFormat + * @instance + */ + StorageFormat.prototype.mimeType = ""; + + /** + * StorageFormat csv. + * @member {google.cloud.dataplex.v1.StorageFormat.ICsvOptions|null|undefined} csv + * @memberof google.cloud.dataplex.v1.StorageFormat + * @instance + */ + StorageFormat.prototype.csv = null; + + /** + * StorageFormat json. + * @member {google.cloud.dataplex.v1.StorageFormat.IJsonOptions|null|undefined} json + * @memberof google.cloud.dataplex.v1.StorageFormat + * @instance + */ + StorageFormat.prototype.json = null; + + /** + * StorageFormat iceberg. + * @member {google.cloud.dataplex.v1.StorageFormat.IIcebergOptions|null|undefined} iceberg + * @memberof google.cloud.dataplex.v1.StorageFormat + * @instance + */ + StorageFormat.prototype.iceberg = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * StorageFormat options. + * @member {"csv"|"json"|"iceberg"|undefined} options + * @memberof google.cloud.dataplex.v1.StorageFormat + * @instance + */ + Object.defineProperty(StorageFormat.prototype, "options", { + get: $util.oneOfGetter($oneOfFields = ["csv", "json", "iceberg"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new StorageFormat instance using the specified properties. + * @function create + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {google.cloud.dataplex.v1.IStorageFormat=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.StorageFormat} StorageFormat instance + */ + StorageFormat.create = function create(properties) { + return new StorageFormat(properties); + }; + + /** + * Encodes the specified StorageFormat message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.verify|verify} messages. + * @function encode + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {google.cloud.dataplex.v1.IStorageFormat} message StorageFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageFormat.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); + if (message.compressionFormat != null && Object.hasOwnProperty.call(message, "compressionFormat")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.compressionFormat); + if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.mimeType); + if (message.csv != null && Object.hasOwnProperty.call(message, "csv")) + $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.encode(message.csv, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.json != null && Object.hasOwnProperty.call(message, "json")) + $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.encode(message.json, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.iceberg != null && Object.hasOwnProperty.call(message, "iceberg")) + $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions.encode(message.iceberg, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified StorageFormat message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {google.cloud.dataplex.v1.IStorageFormat} message StorageFormat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageFormat.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StorageFormat message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dataplex.v1.StorageFormat} StorageFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageFormat.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.StorageFormat(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.format = reader.int32(); + break; + } + case 2: { + message.compressionFormat = reader.int32(); + break; + } + case 3: { + message.mimeType = reader.string(); + break; + } + case 10: { + message.csv = $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.decode(reader, reader.uint32()); + break; + } + case 11: { + message.json = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.decode(reader, reader.uint32()); + break; + } + case 12: { + message.iceberg = $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StorageFormat message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.StorageFormat} StorageFormat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageFormat.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StorageFormat message. + * @function verify + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StorageFormat.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.format != null && message.hasOwnProperty("format")) + switch (message.format) { + default: + return "format: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 100: + case 101: + case 200: + case 201: + case 202: + case 203: + case 204: + case 1000: + case 1001: + break; + } + if (message.compressionFormat != null && message.hasOwnProperty("compressionFormat")) + switch (message.compressionFormat) { + default: + return "compressionFormat: enum value expected"; + case 0: + case 2: + case 3: + break; + } + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + if (!$util.isString(message.mimeType)) + return "mimeType: string expected"; + if (message.csv != null && message.hasOwnProperty("csv")) { + properties.options = 1; + { + var error = $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify(message.csv); + if (error) + return "csv." + error; + } + } + if (message.json != null && message.hasOwnProperty("json")) { + if (properties.options === 1) + return "options: multiple values"; + properties.options = 1; + { + var error = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify(message.json); + if (error) + return "json." + error; + } + } + if (message.iceberg != null && message.hasOwnProperty("iceberg")) { + if (properties.options === 1) + return "options: multiple values"; + properties.options = 1; + { + var error = $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions.verify(message.iceberg); + if (error) + return "iceberg." + error; } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - object.serviceAccount = message.serviceAccount; - if (message.project != null && message.hasOwnProperty("project")) - object.project = message.project; - if (message.maxJobExecutionLifetime != null && message.hasOwnProperty("maxJobExecutionLifetime")) - object.maxJobExecutionLifetime = $root.google.protobuf.Duration.toObject(message.maxJobExecutionLifetime, options); - if (message.kmsKey != null && message.hasOwnProperty("kmsKey")) - object.kmsKey = message.kmsKey; + } + return null; + }; + + /** + * Creates a StorageFormat message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dataplex.v1.StorageFormat} StorageFormat + */ + StorageFormat.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.StorageFormat) return object; - }; + var message = new $root.google.cloud.dataplex.v1.StorageFormat(); + switch (object.format) { + default: + if (typeof object.format === "number") { + message.format = object.format; + break; + } + break; + case "FORMAT_UNSPECIFIED": + case 0: + message.format = 0; + break; + case "PARQUET": + case 1: + message.format = 1; + break; + case "AVRO": + case 2: + message.format = 2; + break; + case "ORC": + case 3: + message.format = 3; + break; + case "CSV": + case 100: + message.format = 100; + break; + case "JSON": + case 101: + message.format = 101; + break; + case "IMAGE": + case 200: + message.format = 200; + break; + case "AUDIO": + case 201: + message.format = 201; + break; + case "VIDEO": + case 202: + message.format = 202; + break; + case "TEXT": + case 203: + message.format = 203; + break; + case "TFRECORD": + case 204: + message.format = 204; + break; + case "OTHER": + case 1000: + message.format = 1000; + break; + case "UNKNOWN": + case 1001: + message.format = 1001; + break; + } + switch (object.compressionFormat) { + default: + if (typeof object.compressionFormat === "number") { + message.compressionFormat = object.compressionFormat; + break; + } + break; + case "COMPRESSION_FORMAT_UNSPECIFIED": + case 0: + message.compressionFormat = 0; + break; + case "GZIP": + case 2: + message.compressionFormat = 2; + break; + case "BZIP2": + case 3: + message.compressionFormat = 3; + break; + } + if (object.mimeType != null) + message.mimeType = String(object.mimeType); + if (object.csv != null) { + if (typeof object.csv !== "object") + throw TypeError(".google.cloud.dataplex.v1.StorageFormat.csv: object expected"); + message.csv = $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.fromObject(object.csv); + } + if (object.json != null) { + if (typeof object.json !== "object") + throw TypeError(".google.cloud.dataplex.v1.StorageFormat.json: object expected"); + message.json = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.fromObject(object.json); + } + if (object.iceberg != null) { + if (typeof object.iceberg !== "object") + throw TypeError(".google.cloud.dataplex.v1.StorageFormat.iceberg: object expected"); + message.iceberg = $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions.fromObject(object.iceberg); + } + return message; + }; - /** - * Converts this ExecutionSpec to JSON. - * @function toJSON - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @instance - * @returns {Object.} JSON object - */ - ExecutionSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a StorageFormat message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {google.cloud.dataplex.v1.StorageFormat} message StorageFormat + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StorageFormat.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; + object.compressionFormat = options.enums === String ? "COMPRESSION_FORMAT_UNSPECIFIED" : 0; + object.mimeType = ""; + } + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.cloud.dataplex.v1.StorageFormat.Format[message.format] === undefined ? message.format : $root.google.cloud.dataplex.v1.StorageFormat.Format[message.format] : message.format; + if (message.compressionFormat != null && message.hasOwnProperty("compressionFormat")) + object.compressionFormat = options.enums === String ? $root.google.cloud.dataplex.v1.StorageFormat.CompressionFormat[message.compressionFormat] === undefined ? message.compressionFormat : $root.google.cloud.dataplex.v1.StorageFormat.CompressionFormat[message.compressionFormat] : message.compressionFormat; + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + object.mimeType = message.mimeType; + if (message.csv != null && message.hasOwnProperty("csv")) { + object.csv = $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions.toObject(message.csv, options); + if (options.oneofs) + object.options = "csv"; + } + if (message.json != null && message.hasOwnProperty("json")) { + object.json = $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions.toObject(message.json, options); + if (options.oneofs) + object.options = "json"; + } + if (message.iceberg != null && message.hasOwnProperty("iceberg")) { + object.iceberg = $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions.toObject(message.iceberg, options); + if (options.oneofs) + object.options = "iceberg"; + } + return object; + }; - /** - * Gets the default type url for ExecutionSpec - * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Task.ExecutionSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExecutionSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.ExecutionSpec"; - }; + /** + * Converts this StorageFormat to JSON. + * @function toJSON + * @memberof google.cloud.dataplex.v1.StorageFormat + * @instance + * @returns {Object.} JSON object + */ + StorageFormat.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ExecutionSpec; - })(); + /** + * Gets the default type url for StorageFormat + * @function getTypeUrl + * @memberof google.cloud.dataplex.v1.StorageFormat + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StorageFormat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dataplex.v1.StorageFormat"; + }; - Task.SparkTaskConfig = (function() { + StorageFormat.CsvOptions = (function() { /** - * Properties of a SparkTaskConfig. - * @memberof google.cloud.dataplex.v1.Task - * @interface ISparkTaskConfig - * @property {string|null} [mainJarFileUri] SparkTaskConfig mainJarFileUri - * @property {string|null} [mainClass] SparkTaskConfig mainClass - * @property {string|null} [pythonScriptFile] SparkTaskConfig pythonScriptFile - * @property {string|null} [sqlScriptFile] SparkTaskConfig sqlScriptFile - * @property {string|null} [sqlScript] SparkTaskConfig sqlScript - * @property {Array.|null} [fileUris] SparkTaskConfig fileUris - * @property {Array.|null} [archiveUris] SparkTaskConfig archiveUris - * @property {google.cloud.dataplex.v1.Task.IInfrastructureSpec|null} [infrastructureSpec] SparkTaskConfig infrastructureSpec + * Properties of a CsvOptions. + * @memberof google.cloud.dataplex.v1.StorageFormat + * @interface ICsvOptions + * @property {string|null} [encoding] CsvOptions encoding + * @property {number|null} [headerRows] CsvOptions headerRows + * @property {string|null} [delimiter] CsvOptions delimiter + * @property {string|null} [quote] CsvOptions quote */ /** - * Constructs a new SparkTaskConfig. - * @memberof google.cloud.dataplex.v1.Task - * @classdesc Represents a SparkTaskConfig. - * @implements ISparkTaskConfig + * Constructs a new CsvOptions. + * @memberof google.cloud.dataplex.v1.StorageFormat + * @classdesc Represents a CsvOptions. + * @implements ICsvOptions * @constructor - * @param {google.cloud.dataplex.v1.Task.ISparkTaskConfig=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.StorageFormat.ICsvOptions=} [properties] Properties to set */ - function SparkTaskConfig(properties) { - this.fileUris = []; - this.archiveUris = []; + function CsvOptions(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -51054,441 +52451,269 @@ } /** - * SparkTaskConfig mainJarFileUri. - * @member {string|null|undefined} mainJarFileUri - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @instance - */ - SparkTaskConfig.prototype.mainJarFileUri = null; - - /** - * SparkTaskConfig mainClass. - * @member {string|null|undefined} mainClass - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @instance - */ - SparkTaskConfig.prototype.mainClass = null; - - /** - * SparkTaskConfig pythonScriptFile. - * @member {string|null|undefined} pythonScriptFile - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @instance - */ - SparkTaskConfig.prototype.pythonScriptFile = null; - - /** - * SparkTaskConfig sqlScriptFile. - * @member {string|null|undefined} sqlScriptFile - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @instance - */ - SparkTaskConfig.prototype.sqlScriptFile = null; - - /** - * SparkTaskConfig sqlScript. - * @member {string|null|undefined} sqlScript - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @instance - */ - SparkTaskConfig.prototype.sqlScript = null; - - /** - * SparkTaskConfig fileUris. - * @member {Array.} fileUris - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * CsvOptions encoding. + * @member {string} encoding + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions * @instance */ - SparkTaskConfig.prototype.fileUris = $util.emptyArray; + CsvOptions.prototype.encoding = ""; /** - * SparkTaskConfig archiveUris. - * @member {Array.} archiveUris - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * CsvOptions headerRows. + * @member {number} headerRows + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions * @instance */ - SparkTaskConfig.prototype.archiveUris = $util.emptyArray; + CsvOptions.prototype.headerRows = 0; /** - * SparkTaskConfig infrastructureSpec. - * @member {google.cloud.dataplex.v1.Task.IInfrastructureSpec|null|undefined} infrastructureSpec - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * CsvOptions delimiter. + * @member {string} delimiter + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions * @instance */ - SparkTaskConfig.prototype.infrastructureSpec = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + CsvOptions.prototype.delimiter = ""; /** - * SparkTaskConfig driver. - * @member {"mainJarFileUri"|"mainClass"|"pythonScriptFile"|"sqlScriptFile"|"sqlScript"|undefined} driver - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * CsvOptions quote. + * @member {string} quote + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions * @instance */ - Object.defineProperty(SparkTaskConfig.prototype, "driver", { - get: $util.oneOfGetter($oneOfFields = ["mainJarFileUri", "mainClass", "pythonScriptFile", "sqlScriptFile", "sqlScript"]), - set: $util.oneOfSetter($oneOfFields) - }); + CsvOptions.prototype.quote = ""; /** - * Creates a new SparkTaskConfig instance using the specified properties. + * Creates a new CsvOptions instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions * @static - * @param {google.cloud.dataplex.v1.Task.ISparkTaskConfig=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Task.SparkTaskConfig} SparkTaskConfig instance + * @param {google.cloud.dataplex.v1.StorageFormat.ICsvOptions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.StorageFormat.CsvOptions} CsvOptions instance */ - SparkTaskConfig.create = function create(properties) { - return new SparkTaskConfig(properties); + CsvOptions.create = function create(properties) { + return new CsvOptions(properties); }; /** - * Encodes the specified SparkTaskConfig message. Does not implicitly {@link google.cloud.dataplex.v1.Task.SparkTaskConfig.verify|verify} messages. + * Encodes the specified CsvOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions * @static - * @param {google.cloud.dataplex.v1.Task.ISparkTaskConfig} message SparkTaskConfig message or plain object to encode + * @param {google.cloud.dataplex.v1.StorageFormat.ICsvOptions} message CsvOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SparkTaskConfig.encode = function encode(message, writer) { + CsvOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.fileUris != null && message.fileUris.length) - for (var i = 0; i < message.fileUris.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.fileUris[i]); - if (message.archiveUris != null && message.archiveUris.length) - for (var i = 0; i < message.archiveUris.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.archiveUris[i]); - if (message.infrastructureSpec != null && Object.hasOwnProperty.call(message, "infrastructureSpec")) - $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.encode(message.infrastructureSpec, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.mainJarFileUri != null && Object.hasOwnProperty.call(message, "mainJarFileUri")) - writer.uint32(/* id 100, wireType 2 =*/802).string(message.mainJarFileUri); - if (message.mainClass != null && Object.hasOwnProperty.call(message, "mainClass")) - writer.uint32(/* id 101, wireType 2 =*/810).string(message.mainClass); - if (message.pythonScriptFile != null && Object.hasOwnProperty.call(message, "pythonScriptFile")) - writer.uint32(/* id 102, wireType 2 =*/818).string(message.pythonScriptFile); - if (message.sqlScriptFile != null && Object.hasOwnProperty.call(message, "sqlScriptFile")) - writer.uint32(/* id 104, wireType 2 =*/834).string(message.sqlScriptFile); - if (message.sqlScript != null && Object.hasOwnProperty.call(message, "sqlScript")) - writer.uint32(/* id 105, wireType 2 =*/842).string(message.sqlScript); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoding); + if (message.headerRows != null && Object.hasOwnProperty.call(message, "headerRows")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.headerRows); + if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.delimiter); + if (message.quote != null && Object.hasOwnProperty.call(message, "quote")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.quote); return writer; }; /** - * Encodes the specified SparkTaskConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.SparkTaskConfig.verify|verify} messages. + * Encodes the specified CsvOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.CsvOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions * @static - * @param {google.cloud.dataplex.v1.Task.ISparkTaskConfig} message SparkTaskConfig message or plain object to encode + * @param {google.cloud.dataplex.v1.StorageFormat.ICsvOptions} message CsvOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SparkTaskConfig.encodeDelimited = function encodeDelimited(message, writer) { + CsvOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SparkTaskConfig message from the specified reader or buffer. + * Decodes a CsvOptions message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Task.SparkTaskConfig} SparkTaskConfig + * @returns {google.cloud.dataplex.v1.StorageFormat.CsvOptions} CsvOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SparkTaskConfig.decode = function decode(reader, length) { + CsvOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.SparkTaskConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 100: { - message.mainJarFileUri = reader.string(); - break; - } - case 101: { - message.mainClass = reader.string(); - break; - } - case 102: { - message.pythonScriptFile = reader.string(); - break; - } - case 104: { - message.sqlScriptFile = reader.string(); + case 1: { + message.encoding = reader.string(); break; } - case 105: { - message.sqlScript = reader.string(); + case 2: { + message.headerRows = reader.int32(); break; } case 3: { - if (!(message.fileUris && message.fileUris.length)) - message.fileUris = []; - message.fileUris.push(reader.string()); - break; - } - case 4: { - if (!(message.archiveUris && message.archiveUris.length)) - message.archiveUris = []; - message.archiveUris.push(reader.string()); - break; - } - case 6: { - message.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SparkTaskConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Task.SparkTaskConfig} SparkTaskConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SparkTaskConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SparkTaskConfig message. - * @function verify - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SparkTaskConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.mainJarFileUri != null && message.hasOwnProperty("mainJarFileUri")) { - properties.driver = 1; - if (!$util.isString(message.mainJarFileUri)) - return "mainJarFileUri: string expected"; - } - if (message.mainClass != null && message.hasOwnProperty("mainClass")) { - if (properties.driver === 1) - return "driver: multiple values"; - properties.driver = 1; - if (!$util.isString(message.mainClass)) - return "mainClass: string expected"; - } - if (message.pythonScriptFile != null && message.hasOwnProperty("pythonScriptFile")) { - if (properties.driver === 1) - return "driver: multiple values"; - properties.driver = 1; - if (!$util.isString(message.pythonScriptFile)) - return "pythonScriptFile: string expected"; - } - if (message.sqlScriptFile != null && message.hasOwnProperty("sqlScriptFile")) { - if (properties.driver === 1) - return "driver: multiple values"; - properties.driver = 1; - if (!$util.isString(message.sqlScriptFile)) - return "sqlScriptFile: string expected"; - } - if (message.sqlScript != null && message.hasOwnProperty("sqlScript")) { - if (properties.driver === 1) - return "driver: multiple values"; - properties.driver = 1; - if (!$util.isString(message.sqlScript)) - return "sqlScript: string expected"; - } - if (message.fileUris != null && message.hasOwnProperty("fileUris")) { - if (!Array.isArray(message.fileUris)) - return "fileUris: array expected"; - for (var i = 0; i < message.fileUris.length; ++i) - if (!$util.isString(message.fileUris[i])) - return "fileUris: string[] expected"; - } - if (message.archiveUris != null && message.hasOwnProperty("archiveUris")) { - if (!Array.isArray(message.archiveUris)) - return "archiveUris: array expected"; - for (var i = 0; i < message.archiveUris.length; ++i) - if (!$util.isString(message.archiveUris[i])) - return "archiveUris: string[] expected"; - } - if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) { - var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.verify(message.infrastructureSpec); - if (error) - return "infrastructureSpec." + error; + message.delimiter = reader.string(); + break; + } + case 4: { + message.quote = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } } + return message; + }; + + /** + * Decodes a CsvOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dataplex.v1.StorageFormat.CsvOptions} CsvOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CsvOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CsvOptions message. + * @function verify + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CsvOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encoding != null && message.hasOwnProperty("encoding")) + if (!$util.isString(message.encoding)) + return "encoding: string expected"; + if (message.headerRows != null && message.hasOwnProperty("headerRows")) + if (!$util.isInteger(message.headerRows)) + return "headerRows: integer expected"; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + if (!$util.isString(message.delimiter)) + return "delimiter: string expected"; + if (message.quote != null && message.hasOwnProperty("quote")) + if (!$util.isString(message.quote)) + return "quote: string expected"; return null; }; /** - * Creates a SparkTaskConfig message from a plain object. Also converts values to their respective internal types. + * Creates a CsvOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Task.SparkTaskConfig} SparkTaskConfig + * @returns {google.cloud.dataplex.v1.StorageFormat.CsvOptions} CsvOptions */ - SparkTaskConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Task.SparkTaskConfig) + CsvOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions) return object; - var message = new $root.google.cloud.dataplex.v1.Task.SparkTaskConfig(); - if (object.mainJarFileUri != null) - message.mainJarFileUri = String(object.mainJarFileUri); - if (object.mainClass != null) - message.mainClass = String(object.mainClass); - if (object.pythonScriptFile != null) - message.pythonScriptFile = String(object.pythonScriptFile); - if (object.sqlScriptFile != null) - message.sqlScriptFile = String(object.sqlScriptFile); - if (object.sqlScript != null) - message.sqlScript = String(object.sqlScript); - if (object.fileUris) { - if (!Array.isArray(object.fileUris)) - throw TypeError(".google.cloud.dataplex.v1.Task.SparkTaskConfig.fileUris: array expected"); - message.fileUris = []; - for (var i = 0; i < object.fileUris.length; ++i) - message.fileUris[i] = String(object.fileUris[i]); - } - if (object.archiveUris) { - if (!Array.isArray(object.archiveUris)) - throw TypeError(".google.cloud.dataplex.v1.Task.SparkTaskConfig.archiveUris: array expected"); - message.archiveUris = []; - for (var i = 0; i < object.archiveUris.length; ++i) - message.archiveUris[i] = String(object.archiveUris[i]); - } - if (object.infrastructureSpec != null) { - if (typeof object.infrastructureSpec !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.SparkTaskConfig.infrastructureSpec: object expected"); - message.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.fromObject(object.infrastructureSpec); - } + var message = new $root.google.cloud.dataplex.v1.StorageFormat.CsvOptions(); + if (object.encoding != null) + message.encoding = String(object.encoding); + if (object.headerRows != null) + message.headerRows = object.headerRows | 0; + if (object.delimiter != null) + message.delimiter = String(object.delimiter); + if (object.quote != null) + message.quote = String(object.quote); return message; }; /** - * Creates a plain object from a SparkTaskConfig message. Also converts values to other types if specified. + * Creates a plain object from a CsvOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions * @static - * @param {google.cloud.dataplex.v1.Task.SparkTaskConfig} message SparkTaskConfig + * @param {google.cloud.dataplex.v1.StorageFormat.CsvOptions} message CsvOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SparkTaskConfig.toObject = function toObject(message, options) { + CsvOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.fileUris = []; - object.archiveUris = []; - } - if (options.defaults) - object.infrastructureSpec = null; - if (message.fileUris && message.fileUris.length) { - object.fileUris = []; - for (var j = 0; j < message.fileUris.length; ++j) - object.fileUris[j] = message.fileUris[j]; - } - if (message.archiveUris && message.archiveUris.length) { - object.archiveUris = []; - for (var j = 0; j < message.archiveUris.length; ++j) - object.archiveUris[j] = message.archiveUris[j]; - } - if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) - object.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.toObject(message.infrastructureSpec, options); - if (message.mainJarFileUri != null && message.hasOwnProperty("mainJarFileUri")) { - object.mainJarFileUri = message.mainJarFileUri; - if (options.oneofs) - object.driver = "mainJarFileUri"; - } - if (message.mainClass != null && message.hasOwnProperty("mainClass")) { - object.mainClass = message.mainClass; - if (options.oneofs) - object.driver = "mainClass"; - } - if (message.pythonScriptFile != null && message.hasOwnProperty("pythonScriptFile")) { - object.pythonScriptFile = message.pythonScriptFile; - if (options.oneofs) - object.driver = "pythonScriptFile"; - } - if (message.sqlScriptFile != null && message.hasOwnProperty("sqlScriptFile")) { - object.sqlScriptFile = message.sqlScriptFile; - if (options.oneofs) - object.driver = "sqlScriptFile"; - } - if (message.sqlScript != null && message.hasOwnProperty("sqlScript")) { - object.sqlScript = message.sqlScript; - if (options.oneofs) - object.driver = "sqlScript"; + if (options.defaults) { + object.encoding = ""; + object.headerRows = 0; + object.delimiter = ""; + object.quote = ""; } + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = message.encoding; + if (message.headerRows != null && message.hasOwnProperty("headerRows")) + object.headerRows = message.headerRows; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + object.delimiter = message.delimiter; + if (message.quote != null && message.hasOwnProperty("quote")) + object.quote = message.quote; return object; }; /** - * Converts this SparkTaskConfig to JSON. + * Converts this CsvOptions to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions * @instance * @returns {Object.} JSON object */ - SparkTaskConfig.prototype.toJSON = function toJSON() { + CsvOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SparkTaskConfig + * Gets the default type url for CsvOptions * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Task.SparkTaskConfig + * @memberof google.cloud.dataplex.v1.StorageFormat.CsvOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SparkTaskConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CsvOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.SparkTaskConfig"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.StorageFormat.CsvOptions"; }; - return SparkTaskConfig; + return CsvOptions; })(); - Task.NotebookTaskConfig = (function() { + StorageFormat.JsonOptions = (function() { /** - * Properties of a NotebookTaskConfig. - * @memberof google.cloud.dataplex.v1.Task - * @interface INotebookTaskConfig - * @property {string|null} [notebook] NotebookTaskConfig notebook - * @property {google.cloud.dataplex.v1.Task.IInfrastructureSpec|null} [infrastructureSpec] NotebookTaskConfig infrastructureSpec - * @property {Array.|null} [fileUris] NotebookTaskConfig fileUris - * @property {Array.|null} [archiveUris] NotebookTaskConfig archiveUris + * Properties of a JsonOptions. + * @memberof google.cloud.dataplex.v1.StorageFormat + * @interface IJsonOptions + * @property {string|null} [encoding] JsonOptions encoding */ /** - * Constructs a new NotebookTaskConfig. - * @memberof google.cloud.dataplex.v1.Task - * @classdesc Represents a NotebookTaskConfig. - * @implements INotebookTaskConfig + * Constructs a new JsonOptions. + * @memberof google.cloud.dataplex.v1.StorageFormat + * @classdesc Represents a JsonOptions. + * @implements IJsonOptions * @constructor - * @param {google.cloud.dataplex.v1.Task.INotebookTaskConfig=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.StorageFormat.IJsonOptions=} [properties] Properties to set */ - function NotebookTaskConfig(properties) { - this.fileUris = []; - this.archiveUris = []; + function JsonOptions(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -51496,123 +52721,75 @@ } /** - * NotebookTaskConfig notebook. - * @member {string} notebook - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig - * @instance - */ - NotebookTaskConfig.prototype.notebook = ""; - - /** - * NotebookTaskConfig infrastructureSpec. - * @member {google.cloud.dataplex.v1.Task.IInfrastructureSpec|null|undefined} infrastructureSpec - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig - * @instance - */ - NotebookTaskConfig.prototype.infrastructureSpec = null; - - /** - * NotebookTaskConfig fileUris. - * @member {Array.} fileUris - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig - * @instance - */ - NotebookTaskConfig.prototype.fileUris = $util.emptyArray; - - /** - * NotebookTaskConfig archiveUris. - * @member {Array.} archiveUris - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * JsonOptions encoding. + * @member {string} encoding + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions * @instance */ - NotebookTaskConfig.prototype.archiveUris = $util.emptyArray; + JsonOptions.prototype.encoding = ""; /** - * Creates a new NotebookTaskConfig instance using the specified properties. + * Creates a new JsonOptions instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions * @static - * @param {google.cloud.dataplex.v1.Task.INotebookTaskConfig=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Task.NotebookTaskConfig} NotebookTaskConfig instance + * @param {google.cloud.dataplex.v1.StorageFormat.IJsonOptions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.StorageFormat.JsonOptions} JsonOptions instance */ - NotebookTaskConfig.create = function create(properties) { - return new NotebookTaskConfig(properties); + JsonOptions.create = function create(properties) { + return new JsonOptions(properties); }; /** - * Encodes the specified NotebookTaskConfig message. Does not implicitly {@link google.cloud.dataplex.v1.Task.NotebookTaskConfig.verify|verify} messages. + * Encodes the specified JsonOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions * @static - * @param {google.cloud.dataplex.v1.Task.INotebookTaskConfig} message NotebookTaskConfig message or plain object to encode + * @param {google.cloud.dataplex.v1.StorageFormat.IJsonOptions} message JsonOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NotebookTaskConfig.encode = function encode(message, writer) { + JsonOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.infrastructureSpec != null && Object.hasOwnProperty.call(message, "infrastructureSpec")) - $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.encode(message.infrastructureSpec, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.notebook != null && Object.hasOwnProperty.call(message, "notebook")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.notebook); - if (message.fileUris != null && message.fileUris.length) - for (var i = 0; i < message.fileUris.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.fileUris[i]); - if (message.archiveUris != null && message.archiveUris.length) - for (var i = 0; i < message.archiveUris.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.archiveUris[i]); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.encoding); return writer; }; /** - * Encodes the specified NotebookTaskConfig message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.NotebookTaskConfig.verify|verify} messages. + * Encodes the specified JsonOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.JsonOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions * @static - * @param {google.cloud.dataplex.v1.Task.INotebookTaskConfig} message NotebookTaskConfig message or plain object to encode + * @param {google.cloud.dataplex.v1.StorageFormat.IJsonOptions} message JsonOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NotebookTaskConfig.encodeDelimited = function encodeDelimited(message, writer) { + JsonOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NotebookTaskConfig message from the specified reader or buffer. + * Decodes a JsonOptions message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Task.NotebookTaskConfig} NotebookTaskConfig + * @returns {google.cloud.dataplex.v1.StorageFormat.JsonOptions} JsonOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NotebookTaskConfig.decode = function decode(reader, length) { + JsonOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: { - message.notebook = reader.string(); - break; - } - case 3: { - message.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.decode(reader, reader.uint32()); - break; - } - case 5: { - if (!(message.fileUris && message.fileUris.length)) - message.fileUris = []; - message.fileUris.push(reader.string()); - break; - } - case 6: { - if (!(message.archiveUris && message.archiveUris.length)) - message.archiveUris = []; - message.archiveUris.push(reader.string()); + case 1: { + message.encoding = reader.string(); break; } default: @@ -51624,179 +52801,122 @@ }; /** - * Decodes a NotebookTaskConfig message from the specified reader or buffer, length delimited. + * Decodes a JsonOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Task.NotebookTaskConfig} NotebookTaskConfig + * @returns {google.cloud.dataplex.v1.StorageFormat.JsonOptions} JsonOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NotebookTaskConfig.decodeDelimited = function decodeDelimited(reader) { + JsonOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NotebookTaskConfig message. + * Verifies a JsonOptions message. * @function verify - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NotebookTaskConfig.verify = function verify(message) { + JsonOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.notebook != null && message.hasOwnProperty("notebook")) - if (!$util.isString(message.notebook)) - return "notebook: string expected"; - if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) { - var error = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.verify(message.infrastructureSpec); - if (error) - return "infrastructureSpec." + error; - } - if (message.fileUris != null && message.hasOwnProperty("fileUris")) { - if (!Array.isArray(message.fileUris)) - return "fileUris: array expected"; - for (var i = 0; i < message.fileUris.length; ++i) - if (!$util.isString(message.fileUris[i])) - return "fileUris: string[] expected"; - } - if (message.archiveUris != null && message.hasOwnProperty("archiveUris")) { - if (!Array.isArray(message.archiveUris)) - return "archiveUris: array expected"; - for (var i = 0; i < message.archiveUris.length; ++i) - if (!$util.isString(message.archiveUris[i])) - return "archiveUris: string[] expected"; - } + if (message.encoding != null && message.hasOwnProperty("encoding")) + if (!$util.isString(message.encoding)) + return "encoding: string expected"; return null; }; /** - * Creates a NotebookTaskConfig message from a plain object. Also converts values to their respective internal types. + * Creates a JsonOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Task.NotebookTaskConfig} NotebookTaskConfig + * @returns {google.cloud.dataplex.v1.StorageFormat.JsonOptions} JsonOptions */ - NotebookTaskConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig) + JsonOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions) return object; - var message = new $root.google.cloud.dataplex.v1.Task.NotebookTaskConfig(); - if (object.notebook != null) - message.notebook = String(object.notebook); - if (object.infrastructureSpec != null) { - if (typeof object.infrastructureSpec !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.NotebookTaskConfig.infrastructureSpec: object expected"); - message.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.fromObject(object.infrastructureSpec); - } - if (object.fileUris) { - if (!Array.isArray(object.fileUris)) - throw TypeError(".google.cloud.dataplex.v1.Task.NotebookTaskConfig.fileUris: array expected"); - message.fileUris = []; - for (var i = 0; i < object.fileUris.length; ++i) - message.fileUris[i] = String(object.fileUris[i]); - } - if (object.archiveUris) { - if (!Array.isArray(object.archiveUris)) - throw TypeError(".google.cloud.dataplex.v1.Task.NotebookTaskConfig.archiveUris: array expected"); - message.archiveUris = []; - for (var i = 0; i < object.archiveUris.length; ++i) - message.archiveUris[i] = String(object.archiveUris[i]); - } + var message = new $root.google.cloud.dataplex.v1.StorageFormat.JsonOptions(); + if (object.encoding != null) + message.encoding = String(object.encoding); return message; }; /** - * Creates a plain object from a NotebookTaskConfig message. Also converts values to other types if specified. + * Creates a plain object from a JsonOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions * @static - * @param {google.cloud.dataplex.v1.Task.NotebookTaskConfig} message NotebookTaskConfig + * @param {google.cloud.dataplex.v1.StorageFormat.JsonOptions} message JsonOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NotebookTaskConfig.toObject = function toObject(message, options) { + JsonOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.fileUris = []; - object.archiveUris = []; - } - if (options.defaults) { - object.infrastructureSpec = null; - object.notebook = ""; - } - if (message.infrastructureSpec != null && message.hasOwnProperty("infrastructureSpec")) - object.infrastructureSpec = $root.google.cloud.dataplex.v1.Task.InfrastructureSpec.toObject(message.infrastructureSpec, options); - if (message.notebook != null && message.hasOwnProperty("notebook")) - object.notebook = message.notebook; - if (message.fileUris && message.fileUris.length) { - object.fileUris = []; - for (var j = 0; j < message.fileUris.length; ++j) - object.fileUris[j] = message.fileUris[j]; - } - if (message.archiveUris && message.archiveUris.length) { - object.archiveUris = []; - for (var j = 0; j < message.archiveUris.length; ++j) - object.archiveUris[j] = message.archiveUris[j]; - } + if (options.defaults) + object.encoding = ""; + if (message.encoding != null && message.hasOwnProperty("encoding")) + object.encoding = message.encoding; return object; }; /** - * Converts this NotebookTaskConfig to JSON. + * Converts this JsonOptions to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions * @instance * @returns {Object.} JSON object */ - NotebookTaskConfig.prototype.toJSON = function toJSON() { + JsonOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for NotebookTaskConfig + * Gets the default type url for JsonOptions * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Task.NotebookTaskConfig + * @memberof google.cloud.dataplex.v1.StorageFormat.JsonOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - NotebookTaskConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + JsonOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.NotebookTaskConfig"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.StorageFormat.JsonOptions"; }; - return NotebookTaskConfig; + return JsonOptions; })(); - Task.ExecutionStatus = (function() { + StorageFormat.IcebergOptions = (function() { /** - * Properties of an ExecutionStatus. - * @memberof google.cloud.dataplex.v1.Task - * @interface IExecutionStatus - * @property {google.protobuf.ITimestamp|null} [updateTime] ExecutionStatus updateTime - * @property {google.cloud.dataplex.v1.IJob|null} [latestJob] ExecutionStatus latestJob + * Properties of an IcebergOptions. + * @memberof google.cloud.dataplex.v1.StorageFormat + * @interface IIcebergOptions + * @property {string|null} [metadataLocation] IcebergOptions metadataLocation */ /** - * Constructs a new ExecutionStatus. - * @memberof google.cloud.dataplex.v1.Task - * @classdesc Represents an ExecutionStatus. - * @implements IExecutionStatus + * Constructs a new IcebergOptions. + * @memberof google.cloud.dataplex.v1.StorageFormat + * @classdesc Represents an IcebergOptions. + * @implements IIcebergOptions * @constructor - * @param {google.cloud.dataplex.v1.Task.IExecutionStatus=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.StorageFormat.IIcebergOptions=} [properties] Properties to set */ - function ExecutionStatus(properties) { + function IcebergOptions(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -51804,89 +52924,75 @@ } /** - * ExecutionStatus updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus - * @instance - */ - ExecutionStatus.prototype.updateTime = null; - - /** - * ExecutionStatus latestJob. - * @member {google.cloud.dataplex.v1.IJob|null|undefined} latestJob - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * IcebergOptions metadataLocation. + * @member {string} metadataLocation + * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions * @instance */ - ExecutionStatus.prototype.latestJob = null; + IcebergOptions.prototype.metadataLocation = ""; /** - * Creates a new ExecutionStatus instance using the specified properties. + * Creates a new IcebergOptions instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions * @static - * @param {google.cloud.dataplex.v1.Task.IExecutionStatus=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Task.ExecutionStatus} ExecutionStatus instance + * @param {google.cloud.dataplex.v1.StorageFormat.IIcebergOptions=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.StorageFormat.IcebergOptions} IcebergOptions instance */ - ExecutionStatus.create = function create(properties) { - return new ExecutionStatus(properties); + IcebergOptions.create = function create(properties) { + return new IcebergOptions(properties); }; /** - * Encodes the specified ExecutionStatus message. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionStatus.verify|verify} messages. + * Encodes the specified IcebergOptions message. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.IcebergOptions.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions * @static - * @param {google.cloud.dataplex.v1.Task.IExecutionStatus} message ExecutionStatus message or plain object to encode + * @param {google.cloud.dataplex.v1.StorageFormat.IIcebergOptions} message IcebergOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecutionStatus.encode = function encode(message, writer) { + IcebergOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.latestJob != null && Object.hasOwnProperty.call(message, "latestJob")) - $root.google.cloud.dataplex.v1.Job.encode(message.latestJob, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.metadataLocation != null && Object.hasOwnProperty.call(message, "metadataLocation")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metadataLocation); return writer; }; /** - * Encodes the specified ExecutionStatus message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Task.ExecutionStatus.verify|verify} messages. + * Encodes the specified IcebergOptions message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageFormat.IcebergOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions * @static - * @param {google.cloud.dataplex.v1.Task.IExecutionStatus} message ExecutionStatus message or plain object to encode + * @param {google.cloud.dataplex.v1.StorageFormat.IIcebergOptions} message IcebergOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExecutionStatus.encodeDelimited = function encodeDelimited(message, writer) { + IcebergOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExecutionStatus message from the specified reader or buffer. + * Decodes an IcebergOptions message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Task.ExecutionStatus} ExecutionStatus + * @returns {google.cloud.dataplex.v1.StorageFormat.IcebergOptions} IcebergOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecutionStatus.decode = function decode(reader, length) { + IcebergOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Task.ExecutionStatus(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 9: { - message.latestJob = $root.google.cloud.dataplex.v1.Job.decode(reader, reader.uint32()); + case 1: { + message.metadataLocation = reader.string(); break; } default: @@ -51898,152 +53004,177 @@ }; /** - * Decodes an ExecutionStatus message from the specified reader or buffer, length delimited. + * Decodes an IcebergOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Task.ExecutionStatus} ExecutionStatus + * @returns {google.cloud.dataplex.v1.StorageFormat.IcebergOptions} IcebergOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExecutionStatus.decodeDelimited = function decodeDelimited(reader) { + IcebergOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExecutionStatus message. + * Verifies an IcebergOptions message. * @function verify - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExecutionStatus.verify = function verify(message) { + IcebergOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.latestJob != null && message.hasOwnProperty("latestJob")) { - var error = $root.google.cloud.dataplex.v1.Job.verify(message.latestJob); - if (error) - return "latestJob." + error; - } + if (message.metadataLocation != null && message.hasOwnProperty("metadataLocation")) + if (!$util.isString(message.metadataLocation)) + return "metadataLocation: string expected"; return null; }; /** - * Creates an ExecutionStatus message from a plain object. Also converts values to their respective internal types. + * Creates an IcebergOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Task.ExecutionStatus} ExecutionStatus + * @returns {google.cloud.dataplex.v1.StorageFormat.IcebergOptions} IcebergOptions */ - ExecutionStatus.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Task.ExecutionStatus) + IcebergOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions) return object; - var message = new $root.google.cloud.dataplex.v1.Task.ExecutionStatus(); - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.ExecutionStatus.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.latestJob != null) { - if (typeof object.latestJob !== "object") - throw TypeError(".google.cloud.dataplex.v1.Task.ExecutionStatus.latestJob: object expected"); - message.latestJob = $root.google.cloud.dataplex.v1.Job.fromObject(object.latestJob); - } + var message = new $root.google.cloud.dataplex.v1.StorageFormat.IcebergOptions(); + if (object.metadataLocation != null) + message.metadataLocation = String(object.metadataLocation); return message; }; /** - * Creates a plain object from an ExecutionStatus message. Also converts values to other types if specified. + * Creates a plain object from an IcebergOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions * @static - * @param {google.cloud.dataplex.v1.Task.ExecutionStatus} message ExecutionStatus + * @param {google.cloud.dataplex.v1.StorageFormat.IcebergOptions} message IcebergOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExecutionStatus.toObject = function toObject(message, options) { + IcebergOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.updateTime = null; - object.latestJob = null; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.latestJob != null && message.hasOwnProperty("latestJob")) - object.latestJob = $root.google.cloud.dataplex.v1.Job.toObject(message.latestJob, options); + if (options.defaults) + object.metadataLocation = ""; + if (message.metadataLocation != null && message.hasOwnProperty("metadataLocation")) + object.metadataLocation = message.metadataLocation; return object; }; /** - * Converts this ExecutionStatus to JSON. + * Converts this IcebergOptions to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions * @instance * @returns {Object.} JSON object */ - ExecutionStatus.prototype.toJSON = function toJSON() { + IcebergOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExecutionStatus + * Gets the default type url for IcebergOptions * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Task.ExecutionStatus + * @memberof google.cloud.dataplex.v1.StorageFormat.IcebergOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExecutionStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + IcebergOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Task.ExecutionStatus"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.StorageFormat.IcebergOptions"; }; - return ExecutionStatus; + return IcebergOptions; })(); - return Task; + /** + * Format enum. + * @name google.cloud.dataplex.v1.StorageFormat.Format + * @enum {number} + * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value + * @property {number} PARQUET=1 PARQUET value + * @property {number} AVRO=2 AVRO value + * @property {number} ORC=3 ORC value + * @property {number} CSV=100 CSV value + * @property {number} JSON=101 JSON value + * @property {number} IMAGE=200 IMAGE value + * @property {number} AUDIO=201 AUDIO value + * @property {number} VIDEO=202 VIDEO value + * @property {number} TEXT=203 TEXT value + * @property {number} TFRECORD=204 TFRECORD value + * @property {number} OTHER=1000 OTHER value + * @property {number} UNKNOWN=1001 UNKNOWN value + */ + StorageFormat.Format = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "PARQUET"] = 1; + values[valuesById[2] = "AVRO"] = 2; + values[valuesById[3] = "ORC"] = 3; + values[valuesById[100] = "CSV"] = 100; + values[valuesById[101] = "JSON"] = 101; + values[valuesById[200] = "IMAGE"] = 200; + values[valuesById[201] = "AUDIO"] = 201; + values[valuesById[202] = "VIDEO"] = 202; + values[valuesById[203] = "TEXT"] = 203; + values[valuesById[204] = "TFRECORD"] = 204; + values[valuesById[1000] = "OTHER"] = 1000; + values[valuesById[1001] = "UNKNOWN"] = 1001; + return values; + })(); + + /** + * CompressionFormat enum. + * @name google.cloud.dataplex.v1.StorageFormat.CompressionFormat + * @enum {number} + * @property {number} COMPRESSION_FORMAT_UNSPECIFIED=0 COMPRESSION_FORMAT_UNSPECIFIED value + * @property {number} GZIP=2 GZIP value + * @property {number} BZIP2=3 BZIP2 value + */ + StorageFormat.CompressionFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COMPRESSION_FORMAT_UNSPECIFIED"] = 0; + values[valuesById[2] = "GZIP"] = 2; + values[valuesById[3] = "BZIP2"] = 3; + return values; + })(); + + return StorageFormat; })(); - v1.Job = (function() { + v1.StorageAccess = (function() { /** - * Properties of a Job. + * Properties of a StorageAccess. * @memberof google.cloud.dataplex.v1 - * @interface IJob - * @property {string|null} [name] Job name - * @property {string|null} [uid] Job uid - * @property {google.protobuf.ITimestamp|null} [startTime] Job startTime - * @property {google.protobuf.ITimestamp|null} [endTime] Job endTime - * @property {google.cloud.dataplex.v1.Job.State|null} [state] Job state - * @property {number|null} [retryCount] Job retryCount - * @property {google.cloud.dataplex.v1.Job.Service|null} [service] Job service - * @property {string|null} [serviceJob] Job serviceJob - * @property {string|null} [message] Job message + * @interface IStorageAccess + * @property {google.cloud.dataplex.v1.StorageAccess.AccessMode|null} [read] StorageAccess read */ /** - * Constructs a new Job. + * Constructs a new StorageAccess. * @memberof google.cloud.dataplex.v1 - * @classdesc Represents a Job. - * @implements IJob + * @classdesc Represents a StorageAccess. + * @implements IStorageAccess * @constructor - * @param {google.cloud.dataplex.v1.IJob=} [properties] Properties to set + * @param {google.cloud.dataplex.v1.IStorageAccess=} [properties] Properties to set */ - function Job(properties) { + function StorageAccess(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -52051,187 +53182,75 @@ } /** - * Job name. - * @member {string} name - * @memberof google.cloud.dataplex.v1.Job - * @instance - */ - Job.prototype.name = ""; - - /** - * Job uid. - * @member {string} uid - * @memberof google.cloud.dataplex.v1.Job - * @instance - */ - Job.prototype.uid = ""; - - /** - * Job startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.dataplex.v1.Job - * @instance - */ - Job.prototype.startTime = null; - - /** - * Job endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.dataplex.v1.Job - * @instance - */ - Job.prototype.endTime = null; - - /** - * Job state. - * @member {google.cloud.dataplex.v1.Job.State} state - * @memberof google.cloud.dataplex.v1.Job - * @instance - */ - Job.prototype.state = 0; - - /** - * Job retryCount. - * @member {number} retryCount - * @memberof google.cloud.dataplex.v1.Job - * @instance - */ - Job.prototype.retryCount = 0; - - /** - * Job service. - * @member {google.cloud.dataplex.v1.Job.Service} service - * @memberof google.cloud.dataplex.v1.Job - * @instance - */ - Job.prototype.service = 0; - - /** - * Job serviceJob. - * @member {string} serviceJob - * @memberof google.cloud.dataplex.v1.Job - * @instance - */ - Job.prototype.serviceJob = ""; - - /** - * Job message. - * @member {string} message - * @memberof google.cloud.dataplex.v1.Job + * StorageAccess read. + * @member {google.cloud.dataplex.v1.StorageAccess.AccessMode} read + * @memberof google.cloud.dataplex.v1.StorageAccess * @instance */ - Job.prototype.message = ""; + StorageAccess.prototype.read = 0; /** - * Creates a new Job instance using the specified properties. + * Creates a new StorageAccess instance using the specified properties. * @function create - * @memberof google.cloud.dataplex.v1.Job + * @memberof google.cloud.dataplex.v1.StorageAccess * @static - * @param {google.cloud.dataplex.v1.IJob=} [properties] Properties to set - * @returns {google.cloud.dataplex.v1.Job} Job instance + * @param {google.cloud.dataplex.v1.IStorageAccess=} [properties] Properties to set + * @returns {google.cloud.dataplex.v1.StorageAccess} StorageAccess instance */ - Job.create = function create(properties) { - return new Job(properties); + StorageAccess.create = function create(properties) { + return new StorageAccess(properties); }; /** - * Encodes the specified Job message. Does not implicitly {@link google.cloud.dataplex.v1.Job.verify|verify} messages. + * Encodes the specified StorageAccess message. Does not implicitly {@link google.cloud.dataplex.v1.StorageAccess.verify|verify} messages. * @function encode - * @memberof google.cloud.dataplex.v1.Job + * @memberof google.cloud.dataplex.v1.StorageAccess * @static - * @param {google.cloud.dataplex.v1.IJob} message Job message or plain object to encode + * @param {google.cloud.dataplex.v1.IStorageAccess} message StorageAccess message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Job.encode = function encode(message, writer) { + StorageAccess.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.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); - if (message.retryCount != null && Object.hasOwnProperty.call(message, "retryCount")) - writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.retryCount); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.service); - if (message.serviceJob != null && Object.hasOwnProperty.call(message, "serviceJob")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.serviceJob); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.message); + if (message.read != null && Object.hasOwnProperty.call(message, "read")) + writer.uint32(/* id 21, wireType 0 =*/168).int32(message.read); return writer; }; /** - * Encodes the specified Job message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.Job.verify|verify} messages. + * Encodes the specified StorageAccess message, length delimited. Does not implicitly {@link google.cloud.dataplex.v1.StorageAccess.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dataplex.v1.Job + * @memberof google.cloud.dataplex.v1.StorageAccess * @static - * @param {google.cloud.dataplex.v1.IJob} message Job message or plain object to encode + * @param {google.cloud.dataplex.v1.IStorageAccess} message StorageAccess message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Job.encodeDelimited = function encodeDelimited(message, writer) { + StorageAccess.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Job message from the specified reader or buffer. + * Decodes a StorageAccess message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dataplex.v1.Job + * @memberof google.cloud.dataplex.v1.StorageAccess * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dataplex.v1.Job} Job + * @returns {google.cloud.dataplex.v1.StorageAccess} StorageAccess * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Job.decode = function decode(reader, length) { + StorageAccess.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.Job(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dataplex.v1.StorageAccess(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.uid = reader.string(); - break; - } - case 3: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.state = reader.int32(); - break; - } - case 6: { - message.retryCount = reader.uint32(); - break; - } - case 7: { - message.service = reader.int32(); - break; - } - case 8: { - message.serviceJob = reader.string(); - break; - } - case 9: { - message.message = reader.string(); + case 21: { + message.read = reader.int32(); break; } default: @@ -52243,278 +53262,158 @@ }; /** - * Decodes a Job message from the specified reader or buffer, length delimited. + * Decodes a StorageAccess message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dataplex.v1.Job + * @memberof google.cloud.dataplex.v1.StorageAccess * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dataplex.v1.Job} Job + * @returns {google.cloud.dataplex.v1.StorageAccess} StorageAccess * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Job.decodeDelimited = function decodeDelimited(reader) { + StorageAccess.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Job message. + * Verifies a StorageAccess message. * @function verify - * @memberof google.cloud.dataplex.v1.Job + * @memberof google.cloud.dataplex.v1.StorageAccess * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Job.verify = function verify(message) { + StorageAccess.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.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { + if (message.read != null && message.hasOwnProperty("read")) + switch (message.read) { default: - return "state: enum value expected"; + return "read: enum value expected"; case 0: case 1: case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.retryCount != null && message.hasOwnProperty("retryCount")) - if (!$util.isInteger(message.retryCount)) - return "retryCount: integer expected"; - if (message.service != null && message.hasOwnProperty("service")) - switch (message.service) { - default: - return "service: enum value expected"; - case 0: - case 1: break; } - if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) - if (!$util.isString(message.serviceJob)) - return "serviceJob: string expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; return null; }; /** - * Creates a Job message from a plain object. Also converts values to their respective internal types. + * Creates a StorageAccess message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dataplex.v1.Job + * @memberof google.cloud.dataplex.v1.StorageAccess * @static * @param {Object.} object Plain object - * @returns {google.cloud.dataplex.v1.Job} Job + * @returns {google.cloud.dataplex.v1.StorageAccess} StorageAccess */ - Job.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dataplex.v1.Job) + StorageAccess.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dataplex.v1.StorageAccess) return object; - var message = new $root.google.cloud.dataplex.v1.Job(); - if (object.name != null) - message.name = String(object.name); - if (object.uid != null) - message.uid = String(object.uid); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Job.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.dataplex.v1.Job.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - switch (object.state) { + var message = new $root.google.cloud.dataplex.v1.StorageAccess(); + switch (object.read) { default: - if (typeof object.state === "number") { - message.state = object.state; + if (typeof object.read === "number") { + message.read = object.read; break; } break; - case "STATE_UNSPECIFIED": + case "ACCESS_MODE_UNSPECIFIED": case 0: - message.state = 0; + message.read = 0; break; - case "RUNNING": + case "DIRECT": case 1: - message.state = 1; + message.read = 1; break; - case "CANCELLING": + case "MANAGED": case 2: - message.state = 2; - break; - case "CANCELLED": - case 3: - message.state = 3; - break; - case "SUCCEEDED": - case 4: - message.state = 4; - break; - case "FAILED": - case 5: - message.state = 5; - break; - case "ABORTED": - case 6: - message.state = 6; - break; - } - if (object.retryCount != null) - message.retryCount = object.retryCount >>> 0; - switch (object.service) { - default: - if (typeof object.service === "number") { - message.service = object.service; - break; - } - break; - case "SERVICE_UNSPECIFIED": - case 0: - message.service = 0; - break; - case "DATAPROC": - case 1: - message.service = 1; + message.read = 2; break; } - if (object.serviceJob != null) - message.serviceJob = String(object.serviceJob); - if (object.message != null) - message.message = String(object.message); return message; }; /** - * Creates a plain object from a Job message. Also converts values to other types if specified. + * Creates a plain object from a StorageAccess message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dataplex.v1.Job + * @memberof google.cloud.dataplex.v1.StorageAccess * @static - * @param {google.cloud.dataplex.v1.Job} message Job + * @param {google.cloud.dataplex.v1.StorageAccess} message StorageAccess * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Job.toObject = function toObject(message, options) { + StorageAccess.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.uid = ""; - object.startTime = null; - object.endTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.retryCount = 0; - object.service = options.enums === String ? "SERVICE_UNSPECIFIED" : 0; - object.serviceJob = ""; - object.message = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dataplex.v1.Job.State[message.state] === undefined ? message.state : $root.google.cloud.dataplex.v1.Job.State[message.state] : message.state; - if (message.retryCount != null && message.hasOwnProperty("retryCount")) - object.retryCount = message.retryCount; - if (message.service != null && message.hasOwnProperty("service")) - object.service = options.enums === String ? $root.google.cloud.dataplex.v1.Job.Service[message.service] === undefined ? message.service : $root.google.cloud.dataplex.v1.Job.Service[message.service] : message.service; - if (message.serviceJob != null && message.hasOwnProperty("serviceJob")) - object.serviceJob = message.serviceJob; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; + if (options.defaults) + object.read = options.enums === String ? "ACCESS_MODE_UNSPECIFIED" : 0; + if (message.read != null && message.hasOwnProperty("read")) + object.read = options.enums === String ? $root.google.cloud.dataplex.v1.StorageAccess.AccessMode[message.read] === undefined ? message.read : $root.google.cloud.dataplex.v1.StorageAccess.AccessMode[message.read] : message.read; return object; }; /** - * Converts this Job to JSON. + * Converts this StorageAccess to JSON. * @function toJSON - * @memberof google.cloud.dataplex.v1.Job + * @memberof google.cloud.dataplex.v1.StorageAccess * @instance * @returns {Object.} JSON object */ - Job.prototype.toJSON = function toJSON() { + StorageAccess.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Job + * Gets the default type url for StorageAccess * @function getTypeUrl - * @memberof google.cloud.dataplex.v1.Job + * @memberof google.cloud.dataplex.v1.StorageAccess * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Job.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + StorageAccess.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dataplex.v1.Job"; + return typeUrlPrefix + "/google.cloud.dataplex.v1.StorageAccess"; }; /** - * Service enum. - * @name google.cloud.dataplex.v1.Job.Service + * AccessMode enum. + * @name google.cloud.dataplex.v1.StorageAccess.AccessMode * @enum {number} - * @property {number} SERVICE_UNSPECIFIED=0 SERVICE_UNSPECIFIED value - * @property {number} DATAPROC=1 DATAPROC value + * @property {number} ACCESS_MODE_UNSPECIFIED=0 ACCESS_MODE_UNSPECIFIED value + * @property {number} DIRECT=1 DIRECT value + * @property {number} MANAGED=2 MANAGED value */ - Job.Service = (function() { + StorageAccess.AccessMode = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SERVICE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DATAPROC"] = 1; + values[valuesById[0] = "ACCESS_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DIRECT"] = 1; + values[valuesById[2] = "MANAGED"] = 2; return values; })(); - /** - * State enum. - * @name google.cloud.dataplex.v1.Job.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} RUNNING=1 RUNNING value - * @property {number} CANCELLING=2 CANCELLING value - * @property {number} CANCELLED=3 CANCELLED value - * @property {number} SUCCEEDED=4 SUCCEEDED value - * @property {number} FAILED=5 FAILED value - * @property {number} ABORTED=6 ABORTED value - */ - Job.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "RUNNING"] = 1; - values[valuesById[2] = "CANCELLING"] = 2; - values[valuesById[3] = "CANCELLED"] = 3; - values[valuesById[4] = "SUCCEEDED"] = 4; - values[valuesById[5] = "FAILED"] = 5; - values[valuesById[6] = "ABORTED"] = 6; - return values; - })(); + return StorageAccess; + })(); - return Job; + /** + * StorageSystem enum. + * @name google.cloud.dataplex.v1.StorageSystem + * @enum {number} + * @property {number} STORAGE_SYSTEM_UNSPECIFIED=0 STORAGE_SYSTEM_UNSPECIFIED value + * @property {number} CLOUD_STORAGE=1 CLOUD_STORAGE value + * @property {number} BIGQUERY=2 BIGQUERY value + */ + v1.StorageSystem = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STORAGE_SYSTEM_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD_STORAGE"] = 1; + values[valuesById[2] = "BIGQUERY"] = 2; + return values; })(); return v1; diff --git a/packages/google-cloud-dataplex/protos/protos.json b/packages/google-cloud-dataplex/protos/protos.json index f24542edef2..6dfab1327e5 100644 --- a/packages/google-cloud-dataplex/protos/protos.json +++ b/packages/google-cloud-dataplex/protos/protos.json @@ -10,7 +10,7 @@ "options": { "go_package": "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb", "java_multiple_files": true, - "java_outer_classname": "TasksProto", + "java_outer_classname": "MetadataProto", "java_package": "com.google.cloud.dataplex.v1" }, "nested": { @@ -1247,6 +1247,13 @@ "options": { "(google.api.field_behavior)": "IMMUTABLE" } + }, + "readAccessMode": { + "type": "AccessMode", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -1256,6 +1263,13 @@ "STORAGE_BUCKET": 1, "BIGQUERY_DATASET": 2 } + }, + "AccessMode": { + "values": { + "ACCESS_MODE_UNSPECIFIED": 0, + "DIRECT": 1, + "MANAGED": 2 + } } } }, @@ -1272,6 +1286,13 @@ "updateTime": { "type": "google.protobuf.Timestamp", "id": 3 + }, + "managedAccessIdentity": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -1895,7 +1916,8 @@ "oneofs": { "source": { "oneof": [ - "entity" + "entity", + "resource" ] } }, @@ -1907,6 +1929,13 @@ "(google.api.field_behavior)": "IMMUTABLE", "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" } + }, + "resource": { + "type": "string", + "id": 101, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } } } }, @@ -2408,6 +2437,13 @@ "options": { "(google.api.field_behavior)": "REQUIRED" } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -2426,6 +2462,13 @@ "options": { "(google.api.field_behavior)": "REQUIRED" } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -2901,456 +2944,587 @@ "DATA_PROFILE": 2 } }, - "DiscoveryEvent": { - "oneofs": { - "details": { - "oneof": [ - "config", - "entity", - "partition", - "action" - ] - } - }, - "fields": { - "message": { - "type": "string", - "id": 1 - }, - "lakeId": { - "type": "string", - "id": 2 - }, - "zoneId": { - "type": "string", - "id": 3 - }, - "assetId": { - "type": "string", - "id": 4 - }, - "dataLocation": { - "type": "string", - "id": 5 - }, - "type": { - "type": "EventType", - "id": 10 - }, - "config": { - "type": "ConfigDetails", - "id": 20 - }, - "entity": { - "type": "EntityDetails", - "id": 21 - }, - "partition": { - "type": "PartitionDetails", - "id": 22 - }, - "action": { - "type": "ActionDetails", - "id": 23 - } + "DataplexService": { + "options": { + "(google.api.default_host)": "dataplex.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" }, - "nested": { - "EventType": { - "values": { - "EVENT_TYPE_UNSPECIFIED": 0, - "CONFIG": 1, - "ENTITY_CREATED": 2, - "ENTITY_UPDATED": 3, - "ENTITY_DELETED": 4, - "PARTITION_CREATED": 5, - "PARTITION_UPDATED": 6, - "PARTITION_DELETED": 7 - } - }, - "EntityType": { - "values": { - "ENTITY_TYPE_UNSPECIFIED": 0, - "TABLE": 1, - "FILESET": 2 - } - }, - "ConfigDetails": { - "fields": { - "parameters": { - "keyType": "string", - "type": "string", - "id": 1 + "methods": { + "CreateLake": { + "requestType": "CreateLakeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/lakes", + "(google.api.http).body": "lake", + "(google.api.method_signature)": "parent,lake,lake_id", + "(google.longrunning.operation_info).response_type": "Lake", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/lakes", + "body": "lake" + } + }, + { + "(google.api.method_signature)": "parent,lake,lake_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Lake", + "metadata_type": "OperationMetadata" + } } - } + ] }, - "EntityDetails": { - "fields": { - "entity": { - "type": "string", - "id": 1 + "UpdateLake": { + "requestType": "UpdateLakeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{lake.name=projects/*/locations/*/lakes/*}", + "(google.api.http).body": "lake", + "(google.api.method_signature)": "lake,update_mask", + "(google.longrunning.operation_info).response_type": "Lake", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{lake.name=projects/*/locations/*/lakes/*}", + "body": "lake" + } }, - "type": { - "type": "EntityType", - "id": 2 + { + "(google.api.method_signature)": "lake,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Lake", + "metadata_type": "OperationMetadata" + } } - } + ] }, - "PartitionDetails": { - "fields": { - "partition": { - "type": "string", - "id": 1 - }, - "entity": { - "type": "string", - "id": 2 + "DeleteLake": { + "requestType": "DeleteLakeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/lakes/*}" + } }, - "type": { - "type": "EntityType", - "id": 3 + { + "(google.api.method_signature)": "name" }, - "sampledDataLocations": { - "rule": "repeated", - "type": "string", - "id": 4 + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } } - } + ] }, - "ActionDetails": { - "fields": { - "type": { - "type": "string", - "id": 1 + "ListLakes": { + "requestType": "ListLakesRequest", + "responseType": "ListLakesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/lakes", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/lakes" + } + }, + { + "(google.api.method_signature)": "parent" } - } - } - } - }, - "JobEvent": { - "fields": { - "message": { - "type": "string", - "id": 1 - }, - "jobId": { - "type": "string", - "id": 2 - }, - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 3 + ] }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 4 - }, - "state": { - "type": "State", - "id": 5 + "GetLake": { + "requestType": "GetLakeRequest", + "responseType": "Lake", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/lakes/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, - "retries": { - "type": "int32", - "id": 6 + "ListLakeActions": { + "requestType": "ListLakeActionsRequest", + "responseType": "ListActionsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*}/actions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*}/actions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, - "type": { - "type": "Type", - "id": 7 + "CreateZone": { + "requestType": "CreateZoneRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*}/zones", + "(google.api.http).body": "zone", + "(google.api.method_signature)": "parent,zone,zone_id", + "(google.longrunning.operation_info).response_type": "Zone", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/lakes/*}/zones", + "body": "zone" + } + }, + { + "(google.api.method_signature)": "parent,zone,zone_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Zone", + "metadata_type": "OperationMetadata" + } + } + ] }, - "service": { - "type": "Service", - "id": 8 + "UpdateZone": { + "requestType": "UpdateZoneRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{zone.name=projects/*/locations/*/lakes/*/zones/*}", + "(google.api.http).body": "zone", + "(google.api.method_signature)": "zone,update_mask", + "(google.longrunning.operation_info).response_type": "Zone", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{zone.name=projects/*/locations/*/lakes/*/zones/*}", + "body": "zone" + } + }, + { + "(google.api.method_signature)": "zone,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Zone", + "metadata_type": "OperationMetadata" + } + } + ] }, - "serviceJob": { - "type": "string", - "id": 9 - } - }, - "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "SPARK": 1, - "NOTEBOOK": 2 - } + "DeleteZone": { + "requestType": "DeleteZoneRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] }, - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "SUCCEEDED": 1, - "FAILED": 2, - "CANCELLED": 3, - "ABORTED": 4 - } + "ListZones": { + "requestType": "ListZonesRequest", + "responseType": "ListZonesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*}/zones", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*}/zones" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, - "Service": { - "values": { - "SERVICE_UNSPECIFIED": 0, - "DATAPROC": 1 - } - } - } - }, - "SessionEvent": { - "oneofs": { - "detail": { - "oneof": [ - "query" + "GetZone": { + "requestType": "GetZoneRequest", + "responseType": "Zone", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*}" + } + }, + { + "(google.api.method_signature)": "name" + } ] - } - }, - "fields": { - "message": { - "type": "string", - "id": 1 }, - "userId": { - "type": "string", - "id": 2 + "ListZoneActions": { + "requestType": "ListZoneActionsRequest", + "responseType": "ListActionsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/actions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/actions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, - "sessionId": { - "type": "string", - "id": 3 + "CreateAsset": { + "requestType": "CreateAssetRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets", + "(google.api.http).body": "asset", + "(google.api.method_signature)": "parent,asset,asset_id", + "(google.longrunning.operation_info).response_type": "Asset", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets", + "body": "asset" + } + }, + { + "(google.api.method_signature)": "parent,asset,asset_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Asset", + "metadata_type": "OperationMetadata" + } + } + ] }, - "type": { - "type": "EventType", - "id": 4 + "UpdateAsset": { + "requestType": "UpdateAssetRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{asset.name=projects/*/locations/*/lakes/*/zones/*/assets/*}", + "(google.api.http).body": "asset", + "(google.api.method_signature)": "asset,update_mask", + "(google.longrunning.operation_info).response_type": "Asset", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{asset.name=projects/*/locations/*/lakes/*/zones/*/assets/*}", + "body": "asset" + } + }, + { + "(google.api.method_signature)": "asset,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Asset", + "metadata_type": "OperationMetadata" + } + } + ] }, - "query": { - "type": "QueryDetail", - "id": 5 + "DeleteAsset": { + "requestType": "DeleteAssetRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] }, - "eventSucceeded": { - "type": "bool", - "id": 6 + "ListAssets": { + "requestType": "ListAssetsRequest", + "responseType": "ListAssetsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, - "fastStartupEnabled": { - "type": "bool", - "id": 7 + "GetAsset": { + "requestType": "GetAssetRequest", + "responseType": "Asset", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, - "unassignedDuration": { - "type": "google.protobuf.Duration", - "id": 8 - } - }, - "nested": { - "EventType": { - "values": { - "EVENT_TYPE_UNSPECIFIED": 0, - "START": 1, - "STOP": 2, - "QUERY": 3, - "CREATE": 4 - } + "ListAssetActions": { + "requestType": "ListAssetActionsRequest", + "responseType": "ListActionsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/assets/*}/actions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/assets/*}/actions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, - "QueryDetail": { - "fields": { - "queryId": { - "type": "string", - "id": 1 + "CreateTask": { + "requestType": "CreateTaskRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*}/tasks", + "(google.api.http).body": "task", + "(google.api.method_signature)": "parent,task,task_id", + "(google.longrunning.operation_info).response_type": "Task", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/lakes/*}/tasks", + "body": "task" + } }, - "queryText": { - "type": "string", - "id": 2 + { + "(google.api.method_signature)": "parent,task,task_id" }, - "engine": { - "type": "Engine", - "id": 3 + { + "(google.longrunning.operation_info)": { + "response_type": "Task", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateTask": { + "requestType": "UpdateTaskRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{task.name=projects/*/locations/*/lakes/*/tasks/*}", + "(google.api.http).body": "task", + "(google.api.method_signature)": "task,update_mask", + "(google.longrunning.operation_info).response_type": "Task", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{task.name=projects/*/locations/*/lakes/*/tasks/*}", + "body": "task" + } }, - "duration": { - "type": "google.protobuf.Duration", - "id": 4 + { + "(google.api.method_signature)": "task,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Task", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteTask": { + "requestType": "DeleteTaskRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}" + } }, - "resultSizeBytes": { - "type": "int64", - "id": 5 + { + "(google.api.method_signature)": "name" }, - "dataProcessedBytes": { - "type": "int64", - "id": 6 - } - }, - "nested": { - "Engine": { - "values": { - "ENGINE_UNSPECIFIED": 0, - "SPARK_SQL": 1, - "BIGQUERY": 2 + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" } } - } - } - } - }, - "DataScanEvent": { - "oneofs": { - "result": { - "oneof": [ - "dataProfile", - "dataQuality" ] - } - }, - "fields": { - "dataSource": { - "type": "string", - "id": 1 - }, - "jobId": { - "type": "string", - "id": 2 - }, - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 3 - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 4 - }, - "type": { - "type": "ScanType", - "id": 5 - }, - "state": { - "type": "State", - "id": 6 - }, - "message": { - "type": "string", - "id": 7 - }, - "specVersion": { - "type": "string", - "id": 8 - }, - "trigger": { - "type": "Trigger", - "id": 9 - }, - "scope": { - "type": "Scope", - "id": 10 - }, - "dataProfile": { - "type": "DataProfileResult", - "id": 101 - }, - "dataQuality": { - "type": "DataQualityResult", - "id": 102 - } - }, - "nested": { - "ScanType": { - "values": { - "SCAN_TYPE_UNSPECIFIED": 0, - "DATA_PROFILE": 1, - "DATA_QUALITY": 2 - } - }, - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "STARTED": 1, - "SUCCEEDED": 2, - "FAILED": 3, - "CANCELLED": 4 - } - }, - "Trigger": { - "values": { - "TRIGGER_UNSPECIFIED": 0, - "ON_DEMAND": 1, - "SCHEDULE": 2 - } - }, - "Scope": { - "values": { - "SCOPE_UNSPECIFIED": 0, - "FULL": 1, - "INCREMENTAL": 2 - } }, - "DataProfileResult": { - "fields": { - "rowCount": { - "type": "int64", - "id": 1 + "ListTasks": { + "requestType": "ListTasksRequest", + "responseType": "ListTasksResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*}/tasks", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*}/tasks" + } + }, + { + "(google.api.method_signature)": "parent" } - } + ] }, - "DataQualityResult": { - "fields": { - "rowCount": { - "type": "int64", - "id": 1 - }, - "passed": { - "type": "bool", - "id": 2 + "GetTask": { + "requestType": "GetTaskRequest", + "responseType": "Task", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}" + } }, - "dimensionPassed": { - "keyType": "string", - "type": "bool", - "id": 3 + { + "(google.api.method_signature)": "name" } - } - } - } - }, - "MetadataService": { - "options": { - "(google.api.default_host)": "dataplex.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "CreateEntity": { - "requestType": "CreateEntityRequest", - "responseType": "Entity", + ] + }, + "ListJobs": { + "requestType": "ListJobsRequest", + "responseType": "ListJobsResponse", "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities", - "(google.api.http).body": "entity", - "(google.api.method_signature)": "parent,entity" + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/tasks/*}/jobs", + "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities", - "body": "entity" + "get": "/v1/{parent=projects/*/locations/*/lakes/*/tasks/*}/jobs" } }, { - "(google.api.method_signature)": "parent,entity" + "(google.api.method_signature)": "parent" } ] }, - "UpdateEntity": { - "requestType": "UpdateEntityRequest", - "responseType": "Entity", + "RunTask": { + "requestType": "RunTaskRequest", + "responseType": "RunTaskResponse", "options": { - "(google.api.http).put": "/v1/{entity.name=projects/*/locations/*/lakes/*/zones/*/entities/*}", - "(google.api.http).body": "entity" + "(google.api.http).post": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}:run", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "put": "/v1/{entity.name=projects/*/locations/*/lakes/*/zones/*/entities/*}", - "body": "entity" + "post": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}:run", + "body": "*" } + }, + { + "(google.api.method_signature)": "name" } ] }, - "DeleteEntity": { - "requestType": "DeleteEntityRequest", - "responseType": "google.protobuf.Empty", + "GetJob": { + "requestType": "GetJobRequest", + "responseType": "Job", "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}", + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}" + "get": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}" } }, { @@ -3358,17 +3532,19 @@ } ] }, - "GetEntity": { - "requestType": "GetEntityRequest", - "responseType": "Entity", + "CancelJob": { + "requestType": "CancelJobRequest", + "responseType": "google.protobuf.Empty", "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}", + "(google.api.http).post": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}:cancel", + "(google.api.http).body": "*", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}" + "post": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}:cancel", + "body": "*" } }, { @@ -3376,73 +3552,117 @@ } ] }, - "ListEntities": { - "requestType": "ListEntitiesRequest", - "responseType": "ListEntitiesResponse", + "CreateEnvironment": { + "requestType": "CreateEnvironmentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*}/environments", + "(google.api.http).body": "environment", + "(google.api.method_signature)": "parent,environment,environment_id", + "(google.longrunning.operation_info).response_type": "Environment", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/lakes/*}/environments", + "body": "environment" + } + }, + { + "(google.api.method_signature)": "parent,environment,environment_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Environment", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateEnvironment": { + "requestType": "UpdateEnvironmentRequest", + "responseType": "google.longrunning.Operation", "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities", - "(google.api.method_signature)": "parent" + "(google.api.http).patch": "/v1/{environment.name=projects/*/locations/*/lakes/*/environments/*}", + "(google.api.http).body": "environment", + "(google.api.method_signature)": "environment,update_mask", + "(google.longrunning.operation_info).response_type": "Environment", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities" + "patch": "/v1/{environment.name=projects/*/locations/*/lakes/*/environments/*}", + "body": "environment" } }, { - "(google.api.method_signature)": "parent" + "(google.api.method_signature)": "environment,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Environment", + "metadata_type": "OperationMetadata" + } } ] }, - "CreatePartition": { - "requestType": "CreatePartitionRequest", - "responseType": "Partition", + "DeleteEnvironment": { + "requestType": "DeleteEnvironmentRequest", + "responseType": "google.longrunning.Operation", "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions", - "(google.api.http).body": "partition", - "(google.api.method_signature)": "parent,partition" + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/environments/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" }, "parsedOptions": [ { "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions", - "body": "partition" + "delete": "/v1/{name=projects/*/locations/*/lakes/*/environments/*}" } }, { - "(google.api.method_signature)": "parent,partition" + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } } ] }, - "DeletePartition": { - "requestType": "DeletePartitionRequest", - "responseType": "google.protobuf.Empty", + "ListEnvironments": { + "requestType": "ListEnvironmentsRequest", + "responseType": "ListEnvironmentsResponse", "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}", - "(google.api.method_signature)": "name" + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*}/environments", + "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}" + "get": "/v1/{parent=projects/*/locations/*/lakes/*}/environments" } }, { - "(google.api.method_signature)": "name" + "(google.api.method_signature)": "parent" } ] }, - "GetPartition": { - "requestType": "GetPartitionRequest", - "responseType": "Partition", + "GetEnvironment": { + "requestType": "GetEnvironmentRequest", + "responseType": "Environment", "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}", + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/environments/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}" + "get": "/v1/{name=projects/*/locations/*/lakes/*/environments/*}" } }, { @@ -3450,17 +3670,17 @@ } ] }, - "ListPartitions": { - "requestType": "ListPartitionsRequest", - "responseType": "ListPartitionsResponse", + "ListSessions": { + "requestType": "ListSessionsRequest", + "responseType": "ListSessionsResponse", "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions", + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/environments/*}/sessions", "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions" + "get": "/v1/{parent=projects/*/locations/*/lakes/*/environments/*}/sessions" } }, { @@ -3470,18 +3690,204 @@ } } }, - "CreateEntityRequest": { + "CreateLakeRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "lakeId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "lake": { + "type": "Lake", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateLakeRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "lake": { + "type": "Lake", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteLakeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + } + } + }, + "ListLakesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListLakesResponse": { + "fields": { + "lakes": { + "rule": "repeated", + "type": "Lake", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachableLocations": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "ListLakeActionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListActionsResponse": { + "fields": { + "actions": { + "rule": "repeated", + "type": "Action", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetLakeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } + } + } + }, + "CreateZoneRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" } }, - "entity": { - "type": "Entity", + "zoneId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "Zone", "id": 3, "options": { "(google.api.field_behavior)": "REQUIRED" @@ -3496,10 +3902,17 @@ } } }, - "UpdateEntityRequest": { + "UpdateZoneRequest": { "fields": { - "entity": { - "type": "Entity", + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "Zone", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" @@ -3514,79 +3927,63 @@ } } }, - "DeleteEntityRequest": { + "DeleteZoneRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" - } - }, - "etag": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" } } } }, - "ListEntitiesRequest": { + "ListZonesRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" } }, - "view": { - "type": "EntityView", + "pageSize": { + "type": "int32", "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } }, - "pageSize": { - "type": "int32", + "pageToken": { + "type": "string", "id": 3, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "pageToken": { + "filter": { "type": "string", "id": 4, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "filter": { + "orderBy": { "type": "string", "id": 5, "options": { "(google.api.field_behavior)": "OPTIONAL" } } - }, - "nested": { - "EntityView": { - "values": { - "ENTITY_VIEW_UNSPECIFIED": 0, - "TABLES": 1, - "FILESETS": 2 - } - } } }, - "ListEntitiesResponse": { + "ListZonesResponse": { "fields": { - "entities": { + "zones": { "rule": "repeated", - "type": "Entity", + "type": "Zone", "id": 1 }, "nextPageToken": { @@ -3595,43 +3992,14 @@ } } }, - "GetEntityRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" - } - }, - "view": { - "type": "EntityView", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "EntityView": { - "values": { - "ENTITY_VIEW_UNSPECIFIED": 0, - "BASIC": 1, - "SCHEMA": 2, - "FULL": 4 - } - } - } - }, - "ListPartitionsRequest": { + "ListZoneActionsRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" } }, "pageSize": { @@ -3647,28 +4015,40 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } - }, - "filter": { + } + } + }, + "GetZoneRequest": { + "fields": { + "name": { "type": "string", - "id": 4, + "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" } } } }, - "CreatePartitionRequest": { + "CreateAssetRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" } }, - "partition": { - "type": "Partition", + "assetId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "asset": { + "type": "Asset", "id": 3, "options": { "(google.api.field_behavior)": "REQUIRED" @@ -3683,1827 +4063,1695 @@ } } }, - "DeletePartitionRequest": { + "UpdateAssetRequest": { "fields": { - "name": { - "type": "string", + "updateMask": { + "type": "google.protobuf.FieldMask", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Partition" + "(google.api.field_behavior)": "REQUIRED" } }, - "etag": { - "type": "string", + "asset": { + "type": "Asset", "id": 2, "options": { - "deprecated": true, - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED" } - } - } - }, - "ListPartitionsResponse": { - "fields": { - "partitions": { - "rule": "repeated", - "type": "Partition", - "id": 1 }, - "nextPageToken": { - "type": "string", - "id": 2 + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, - "GetPartitionRequest": { + "DeleteAssetRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Partition" + "(google.api.resource_reference).type": "dataplex.googleapis.com/Asset" } } } }, - "Entity": { - "options": { - "(google.api.resource).type": "dataplex.googleapis.com/Entity", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}" - }, + "ListAssetsRequest": { "fields": { - "name": { + "parent": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" } }, - "displayName": { - "type": "string", + "pageSize": { + "type": "int32", "id": 2, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "description": { + "pageToken": { "type": "string", "id": 3, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "id": { + "filter": { "type": "string", - "id": 7, + "id": 4, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } }, - "etag": { + "orderBy": { "type": "string", - "id": 8, + "id": 5, "options": { "(google.api.field_behavior)": "OPTIONAL" } + } + } + }, + "ListAssetsResponse": { + "fields": { + "assets": { + "rule": "repeated", + "type": "Asset", + "id": 1 }, - "type": { - "type": "Type", - "id": 10, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "asset": { + "nextPageToken": { "type": "string", - "id": 11, + "id": 2 + } + } + }, + "ListAssetActionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, "options": { - "(google.api.field_behavior)": "IMMUTABLE" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Asset" } }, - "dataPath": { - "type": "string", - "id": 12, + "pageSize": { + "type": "int32", + "id": 2, "options": { - "(google.api.field_behavior)": "IMMUTABLE" + "(google.api.field_behavior)": "OPTIONAL" } }, - "dataPathPattern": { + "pageToken": { "type": "string", - "id": 13, + "id": 3, "options": { "(google.api.field_behavior)": "OPTIONAL" } - }, - "catalogEntry": { + } + } + }, + "GetAssetRequest": { + "fields": { + "name": { "type": "string", - "id": 14, + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Asset" + } + } + } + }, + "OperationMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "system": { - "type": "StorageSystem", - "id": 15, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, "options": { - "(google.api.field_behavior)": "IMMUTABLE" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "format": { - "type": "StorageFormat", - "id": 16, + "target": { + "type": "string", + "id": 3, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "compatibility": { - "type": "CompatibilityStatus", - "id": 19, + "verb": { + "type": "string", + "id": 4, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "schema": { - "type": "Schema", - "id": 50, + "statusMessage": { + "type": "string", + "id": 5, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OUTPUT_ONLY" } - } - }, - "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "TABLE": 1, - "FILESET": 2 + }, + "requestedCancellation": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "CompatibilityStatus": { - "fields": { - "hiveMetastore": { - "type": "Compatibility", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "bigquery": { - "type": "Compatibility", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "Compatibility": { - "fields": { - "compatible": { - "type": "bool", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "reason": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - } + "apiVersion": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" } } } }, - "Partition": { - "options": { - "(google.api.resource).type": "dataplex.googleapis.com/Partition", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}" - }, + "CreateTaskRequest": { "fields": { - "name": { + "parent": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Partition" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" } }, - "values": { - "rule": "repeated", + "taskId": { "type": "string", "id": 2, "options": { - "(google.api.field_behavior)": "IMMUTABLE" + "(google.api.field_behavior)": "REQUIRED" } }, - "location": { - "type": "string", + "task": { + "type": "Task", "id": 3, "options": { - "(google.api.field_behavior)": "IMMUTABLE" + "(google.api.field_behavior)": "REQUIRED" } }, - "etag": { - "type": "string", + "validateOnly": { + "type": "bool", "id": 4, "options": { - "deprecated": true, "(google.api.field_behavior)": "OPTIONAL" } } } }, - "Schema": { + "UpdateTaskRequest": { "fields": { - "userManaged": { - "type": "bool", + "updateMask": { + "type": "google.protobuf.FieldMask", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED" } }, - "fields": { - "rule": "repeated", - "type": "SchemaField", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "partitionFields": { - "rule": "repeated", - "type": "PartitionField", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "partitionStyle": { - "type": "PartitionStyle", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "BOOLEAN": 1, - "BYTE": 2, - "INT16": 3, - "INT32": 4, - "INT64": 5, - "FLOAT": 6, - "DOUBLE": 7, - "DECIMAL": 8, - "STRING": 9, - "BINARY": 10, - "TIMESTAMP": 11, - "DATE": 12, - "TIME": 13, - "RECORD": 14, - "NULL": 100 - } - }, - "Mode": { - "values": { - "MODE_UNSPECIFIED": 0, - "REQUIRED": 1, - "NULLABLE": 2, - "REPEATED": 3 - } - }, - "SchemaField": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "description": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "type": { - "type": "Type", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "mode": { - "type": "Mode", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "fields": { - "rule": "repeated", - "type": "SchemaField", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "PartitionField": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "type": { - "type": "Type", - "id": 2, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - } + "task": { + "type": "Task", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" } }, - "PartitionStyle": { - "values": { - "PARTITION_STYLE_UNSPECIFIED": 0, - "HIVE_COMPATIBLE": 1 + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "StorageFormat": { - "oneofs": { - "options": { - "oneof": [ - "csv", - "json", - "iceberg" - ] + "DeleteTaskRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Task" + } } - }, + } + }, + "ListTasksRequest": { "fields": { - "format": { - "type": "Format", + "parent": { + "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" } }, - "compressionFormat": { - "type": "CompressionFormat", + "pageSize": { + "type": "int32", "id": 2, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "mimeType": { + "pageToken": { "type": "string", "id": 3, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } }, - "csv": { - "type": "CsvOptions", - "id": 10, + "filter": { + "type": "string", + "id": 4, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "json": { - "type": "JsonOptions", - "id": 11, + "orderBy": { + "type": "string", + "id": 5, "options": { "(google.api.field_behavior)": "OPTIONAL" } + } + } + }, + "ListTasksResponse": { + "fields": { + "tasks": { + "rule": "repeated", + "type": "Task", + "id": 1 }, - "iceberg": { - "type": "IcebergOptions", - "id": 12, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachableLocations": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetTaskRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Task" } } - }, - "nested": { - "CsvOptions": { - "fields": { - "encoding": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "headerRows": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "delimiter": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "quote": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } + } + }, + "GetJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Job" + } + } + } + }, + "RunTaskRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Task" + } + } + } + }, + "RunTaskResponse": { + "fields": { + "job": { + "type": "Job", + "id": 1 + } + } + }, + "ListJobsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Task" } }, - "JsonOptions": { - "fields": { - "encoding": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } }, - "IcebergOptions": { - "fields": { - "metadataLocation": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListJobsResponse": { + "fields": { + "jobs": { + "rule": "repeated", + "type": "Job", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CancelJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Job" + } + } + } + }, + "CreateEnvironmentRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" } }, - "Format": { - "values": { - "FORMAT_UNSPECIFIED": 0, - "PARQUET": 1, - "AVRO": 2, - "ORC": 3, - "CSV": 100, - "JSON": 101, - "IMAGE": 200, - "AUDIO": 201, - "VIDEO": 202, - "TEXT": 203, - "TFRECORD": 204, - "OTHER": 1000, - "UNKNOWN": 1001 + "environmentId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" } }, - "CompressionFormat": { - "values": { - "COMPRESSION_FORMAT_UNSPECIFIED": 0, - "GZIP": 2, - "BZIP2": 3 + "environment": { + "type": "Environment", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "StorageSystem": { - "values": { - "STORAGE_SYSTEM_UNSPECIFIED": 0, - "CLOUD_STORAGE": 1, - "BIGQUERY": 2 - } - }, - "DataplexService": { - "options": { - "(google.api.default_host)": "dataplex.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "CreateLake": { - "requestType": "CreateLakeRequest", - "responseType": "google.longrunning.Operation", + "UpdateEnvironmentRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/lakes", - "(google.api.http).body": "lake", - "(google.api.method_signature)": "parent,lake,lake_id", - "(google.longrunning.operation_info).response_type": "Lake", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/lakes", - "body": "lake" - } - }, - { - "(google.api.method_signature)": "parent,lake,lake_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Lake", - "metadata_type": "OperationMetadata" - } - } - ] + "(google.api.field_behavior)": "REQUIRED" + } }, - "UpdateLake": { - "requestType": "UpdateLakeRequest", - "responseType": "google.longrunning.Operation", + "environment": { + "type": "Environment", + "id": 2, "options": { - "(google.api.http).patch": "/v1/{lake.name=projects/*/locations/*/lakes/*}", - "(google.api.http).body": "lake", - "(google.api.method_signature)": "lake,update_mask", - "(google.longrunning.operation_info).response_type": "Lake", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{lake.name=projects/*/locations/*/lakes/*}", - "body": "lake" - } - }, - { - "(google.api.method_signature)": "lake,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Lake", - "metadata_type": "OperationMetadata" - } - } - ] + "(google.api.field_behavior)": "REQUIRED" + } }, - "DeleteLake": { - "requestType": "DeleteLakeRequest", - "responseType": "google.longrunning.Operation", + "validateOnly": { + "type": "bool", + "id": 3, "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/lakes/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "ListLakes": { - "requestType": "ListLakesRequest", - "responseType": "ListLakesResponse", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteEnvironmentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/lakes", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/lakes" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetLake": { - "requestType": "GetLakeRequest", - "responseType": "Lake", + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Environment" + } + } + } + }, + "ListEnvironmentsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/lakes/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + } }, - "ListLakeActions": { - "requestType": "ListLakeActionsRequest", - "responseType": "ListActionsResponse", + "pageSize": { + "type": "int32", + "id": 2, "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*}/actions", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/lakes/*}/actions" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] + "(google.api.field_behavior)": "OPTIONAL" + } }, - "CreateZone": { - "requestType": "CreateZoneRequest", - "responseType": "google.longrunning.Operation", + "pageToken": { + "type": "string", + "id": 3, "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*}/zones", - "(google.api.http).body": "zone", - "(google.api.method_signature)": "parent,zone,zone_id", - "(google.longrunning.operation_info).response_type": "Zone", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/lakes/*}/zones", - "body": "zone" - } - }, - { - "(google.api.method_signature)": "parent,zone,zone_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Zone", - "metadata_type": "OperationMetadata" - } - } - ] + "(google.api.field_behavior)": "OPTIONAL" + } }, - "UpdateZone": { - "requestType": "UpdateZoneRequest", - "responseType": "google.longrunning.Operation", + "filter": { + "type": "string", + "id": 4, "options": { - "(google.api.http).patch": "/v1/{zone.name=projects/*/locations/*/lakes/*/zones/*}", - "(google.api.http).body": "zone", - "(google.api.method_signature)": "zone,update_mask", - "(google.longrunning.operation_info).response_type": "Zone", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{zone.name=projects/*/locations/*/lakes/*/zones/*}", - "body": "zone" - } - }, - { - "(google.api.method_signature)": "zone,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Zone", - "metadata_type": "OperationMetadata" - } - } - ] + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListEnvironmentsResponse": { + "fields": { + "environments": { + "rule": "repeated", + "type": "Environment", + "id": 1 }, - "DeleteZone": { - "requestType": "DeleteZoneRequest", - "responseType": "google.longrunning.Operation", + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetEnvironmentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Environment" + } + } + } + }, + "ListSessionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Environment" + } }, - "ListZones": { - "requestType": "ListZonesRequest", - "responseType": "ListZonesResponse", + "pageSize": { + "type": "int32", + "id": 2, "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*}/zones", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/lakes/*}/zones" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] + "(google.api.field_behavior)": "OPTIONAL" + } }, - "GetZone": { - "requestType": "GetZoneRequest", - "responseType": "Zone", + "pageToken": { + "type": "string", + "id": 3, "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] + "(google.api.field_behavior)": "OPTIONAL" + } }, - "ListZoneActions": { - "requestType": "ListZoneActionsRequest", - "responseType": "ListActionsResponse", + "filter": { + "type": "string", + "id": 4, "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/actions", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/actions" - } - }, - { - "(google.api.method_signature)": "parent" - } + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListSessionsResponse": { + "fields": { + "sessions": { + "rule": "repeated", + "type": "Session", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "Task": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Task", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}" + }, + "oneofs": { + "config": { + "oneof": [ + "spark", + "notebook" ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Task" + } }, - "CreateAsset": { - "requestType": "CreateAssetRequest", - "responseType": "google.longrunning.Operation", + "uid": { + "type": "string", + "id": 2, "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets", - "(google.api.http).body": "asset", - "(google.api.method_signature)": "parent,asset,asset_id", - "(google.longrunning.operation_info).response_type": "Asset", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets", - "body": "asset" - } - }, - { - "(google.api.method_signature)": "parent,asset,asset_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Asset", - "metadata_type": "OperationMetadata" - } - } - ] + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "UpdateAsset": { - "requestType": "UpdateAssetRequest", - "responseType": "google.longrunning.Operation", + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, "options": { - "(google.api.http).patch": "/v1/{asset.name=projects/*/locations/*/lakes/*/zones/*/assets/*}", - "(google.api.http).body": "asset", - "(google.api.method_signature)": "asset,update_mask", - "(google.longrunning.operation_info).response_type": "Asset", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{asset.name=projects/*/locations/*/lakes/*/zones/*/assets/*}", - "body": "asset" - } - }, - { - "(google.api.method_signature)": "asset,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Asset", - "metadata_type": "OperationMetadata" - } - } - ] + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "DeleteAsset": { - "requestType": "DeleteAssetRequest", - "responseType": "google.longrunning.Operation", + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, - "ListAssets": { - "requestType": "ListAssetsRequest", - "responseType": "ListAssetsResponse", + "displayName": { + "type": "string", + "id": 6, "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] + "(google.api.field_behavior)": "OPTIONAL" + } }, - "GetAsset": { - "requestType": "GetAssetRequest", - "responseType": "Asset", + "state": { + "type": "State", + "id": 7, "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "ListAssetActions": { - "requestType": "ListAssetActionsRequest", - "responseType": "ListActionsResponse", + "labels": { + "keyType": "string", + "type": "string", + "id": 8, "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/assets/*}/actions", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/assets/*}/actions" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] + "(google.api.field_behavior)": "OPTIONAL" + } }, - "CreateTask": { - "requestType": "CreateTaskRequest", - "responseType": "google.longrunning.Operation", + "triggerSpec": { + "type": "TriggerSpec", + "id": 100, "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*}/tasks", - "(google.api.http).body": "task", - "(google.api.method_signature)": "parent,task,task_id", - "(google.longrunning.operation_info).response_type": "Task", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/lakes/*}/tasks", - "body": "task" - } + "(google.api.field_behavior)": "REQUIRED" + } + }, + "executionSpec": { + "type": "ExecutionSpec", + "id": 101, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "executionStatus": { + "type": "ExecutionStatus", + "id": 201, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "spark": { + "type": "SparkTaskConfig", + "id": 300 + }, + "notebook": { + "type": "NotebookTaskConfig", + "id": 302 + } + }, + "nested": { + "InfrastructureSpec": { + "oneofs": { + "resources": { + "oneof": [ + "batch" + ] }, - { - "(google.api.method_signature)": "parent,task,task_id" + "runtime": { + "oneof": [ + "containerImage" + ] }, - { - "(google.longrunning.operation_info)": { - "response_type": "Task", - "metadata_type": "OperationMetadata" - } + "network": { + "oneof": [ + "vpcNetwork" + ] } - ] - }, - "UpdateTask": { - "requestType": "UpdateTaskRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{task.name=projects/*/locations/*/lakes/*/tasks/*}", - "(google.api.http).body": "task", - "(google.api.method_signature)": "task,update_mask", - "(google.longrunning.operation_info).response_type": "Task", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{task.name=projects/*/locations/*/lakes/*/tasks/*}", - "body": "task" - } + "fields": { + "batch": { + "type": "BatchComputeResources", + "id": 52 }, - { - "(google.api.method_signature)": "task,update_mask" + "containerImage": { + "type": "ContainerImageRuntime", + "id": 101 }, - { - "(google.longrunning.operation_info)": { - "response_type": "Task", - "metadata_type": "OperationMetadata" - } + "vpcNetwork": { + "type": "VpcNetwork", + "id": 150 } - ] - }, - "DeleteTask": { - "requestType": "DeleteTaskRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}" + "nested": { + "BatchComputeResources": { + "fields": { + "executorsCount": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maxExecutorsCount": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } } }, - { - "(google.api.method_signature)": "name" + "ContainerImageRuntime": { + "fields": { + "image": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "javaJars": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pythonPackages": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "properties": { + "keyType": "string", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" + "VpcNetwork": { + "oneofs": { + "networkName": { + "oneof": [ + "network", + "subNetwork" + ] + } + }, + "fields": { + "network": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "subNetwork": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "networkTags": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } } } - ] + } }, - "ListTasks": { - "requestType": "ListTasksRequest", - "responseType": "ListTasksResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*}/tasks", - "(google.api.method_signature)": "parent" + "TriggerSpec": { + "oneofs": { + "trigger": { + "oneof": [ + "schedule" + ] + } }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/lakes/*}/tasks" + "fields": { + "type": { + "type": "Type", + "id": 5, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" } }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetTask": { - "requestType": "GetTaskRequest", - "responseType": "Task", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}" + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListJobs": { - "requestType": "ListJobsRequest", - "responseType": "ListJobsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/tasks/*}/jobs", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/lakes/*/tasks/*}/jobs" + "disabled": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetJob": { - "requestType": "GetJobRequest", - "responseType": "Job", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}" + "maxRetries": { + "type": "int32", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } }, - { - "(google.api.method_signature)": "name" + "schedule": { + "type": "string", + "id": 100, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } - ] - }, - "CancelJob": { - "requestType": "CancelJobRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}:cancel", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name" }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}:cancel", - "body": "*" + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "ON_DEMAND": 1, + "RECURRING": 2 } - }, - { - "(google.api.method_signature)": "name" } - ] + } }, - "CreateEnvironment": { - "requestType": "CreateEnvironmentRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*}/environments", - "(google.api.http).body": "environment", - "(google.api.method_signature)": "parent,environment,environment_id", - "(google.longrunning.operation_info).response_type": "Environment", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/lakes/*}/environments", - "body": "environment" + "ExecutionSpec": { + "fields": { + "args": { + "keyType": "string", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } }, - { - "(google.api.method_signature)": "parent,environment,environment_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Environment", - "metadata_type": "OperationMetadata" + "serviceAccount": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" } - } - ] - }, - "UpdateEnvironment": { - "requestType": "UpdateEnvironmentRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{environment.name=projects/*/locations/*/lakes/*/environments/*}", - "(google.api.http).body": "environment", - "(google.api.method_signature)": "environment,update_mask", - "(google.longrunning.operation_info).response_type": "Environment", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{environment.name=projects/*/locations/*/lakes/*/environments/*}", - "body": "environment" + }, + "project": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } }, - { - "(google.api.method_signature)": "environment,update_mask" + "maxJobExecutionLifetime": { + "type": "google.protobuf.Duration", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, - { - "(google.longrunning.operation_info)": { - "response_type": "Environment", - "metadata_type": "OperationMetadata" + "kmsKey": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } } - ] + } }, - "DeleteEnvironment": { - "requestType": "DeleteEnvironmentRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/environments/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + "SparkTaskConfig": { + "oneofs": { + "driver": { + "oneof": [ + "mainJarFileUri", + "mainClass", + "pythonScriptFile", + "sqlScriptFile", + "sqlScript" + ] + } }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/lakes/*/environments/*}" + "fields": { + "mainJarFileUri": { + "type": "string", + "id": 100 + }, + "mainClass": { + "type": "string", + "id": 101 + }, + "pythonScriptFile": { + "type": "string", + "id": 102 + }, + "sqlScriptFile": { + "type": "string", + "id": 104 + }, + "sqlScript": { + "type": "string", + "id": 105 + }, + "fileUris": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } }, - { - "(google.api.method_signature)": "name" + "archiveUris": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" + "infrastructureSpec": { + "type": "InfrastructureSpec", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } } - ] + } }, - "ListEnvironments": { - "requestType": "ListEnvironmentsRequest", - "responseType": "ListEnvironmentsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*}/environments", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/lakes/*}/environments" + "NotebookTaskConfig": { + "fields": { + "notebook": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" } }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetEnvironment": { - "requestType": "GetEnvironmentRequest", - "responseType": "Environment", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/environments/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/lakes/*/environments/*}" + "infrastructureSpec": { + "type": "InfrastructureSpec", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListSessions": { - "requestType": "ListSessionsRequest", - "responseType": "ListSessionsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/environments/*}/sessions", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/lakes/*/environments/*}/sessions" + "fileUris": { + "rule": "repeated", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } }, - { - "(google.api.method_signature)": "parent" + "archiveUris": { + "rule": "repeated", + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } - ] - } - } - }, - "CreateLakeRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "lakeId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "lake": { - "type": "Lake", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateLakeRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "lake": { - "type": "Lake", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" } }, - "validateOnly": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" + "ExecutionStatus": { + "fields": { + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "latestJob": { + "type": "Job", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } } } } }, - "DeleteLakeRequest": { + "Job": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Job", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}" + }, "fields": { "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" - } - } - } - }, - "ListLakesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Job" } }, - "pageSize": { - "type": "int32", + "uid": { + "type": "string", "id": 2, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "pageToken": { - "type": "string", + "startTime": { + "type": "google.protobuf.Timestamp", "id": 3, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "filter": { - "type": "string", + "endTime": { + "type": "google.protobuf.Timestamp", "id": 4, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "orderBy": { - "type": "string", + "state": { + "type": "State", "id": 5, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OUTPUT_ONLY" } - } - } - }, - "ListLakesResponse": { - "fields": { - "lakes": { - "rule": "repeated", - "type": "Lake", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 }, - "unreachableLocations": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "ListLakeActionsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, + "retryCount": { + "type": "uint32", + "id": 6, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "pageSize": { - "type": "int32", - "id": 2, + "service": { + "type": "Service", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "serviceJob": { + "type": "string", + "id": 8, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "pageToken": { + "message": { "type": "string", - "id": 3, + "id": 9, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Service": { + "values": { + "SERVICE_UNSPECIFIED": 0, + "DATAPROC": 1 + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "RUNNING": 1, + "CANCELLING": 2, + "CANCELLED": 3, + "SUCCEEDED": 4, + "FAILED": 5, + "ABORTED": 6 } } } }, - "ListActionsResponse": { + "DiscoveryEvent": { + "oneofs": { + "details": { + "oneof": [ + "config", + "entity", + "partition", + "action" + ] + } + }, "fields": { - "actions": { - "rule": "repeated", - "type": "Action", + "message": { + "type": "string", "id": 1 }, - "nextPageToken": { + "lakeId": { "type": "string", "id": 2 - } - } - }, - "GetLakeRequest": { - "fields": { - "name": { + }, + "zoneId": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" - } - } - } - }, - "CreateZoneRequest": { - "fields": { - "parent": { + "id": 3 + }, + "assetId": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" - } + "id": 4 }, - "zoneId": { + "dataLocation": { "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" + "id": 5 + }, + "type": { + "type": "EventType", + "id": 10 + }, + "config": { + "type": "ConfigDetails", + "id": 20 + }, + "entity": { + "type": "EntityDetails", + "id": 21 + }, + "partition": { + "type": "PartitionDetails", + "id": 22 + }, + "action": { + "type": "ActionDetails", + "id": 23 + } + }, + "nested": { + "EventType": { + "values": { + "EVENT_TYPE_UNSPECIFIED": 0, + "CONFIG": 1, + "ENTITY_CREATED": 2, + "ENTITY_UPDATED": 3, + "ENTITY_DELETED": 4, + "PARTITION_CREATED": 5, + "PARTITION_UPDATED": 6, + "PARTITION_DELETED": 7 } }, - "zone": { - "type": "Zone", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" + "EntityType": { + "values": { + "ENTITY_TYPE_UNSPECIFIED": 0, + "TABLE": 1, + "FILESET": 2 } }, - "validateOnly": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" + "ConfigDetails": { + "fields": { + "parameters": { + "keyType": "string", + "type": "string", + "id": 1 + } } - } - } - }, - "UpdateZoneRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" + }, + "EntityDetails": { + "fields": { + "entity": { + "type": "string", + "id": 1 + }, + "type": { + "type": "EntityType", + "id": 2 + } } }, - "zone": { - "type": "Zone", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" + "PartitionDetails": { + "fields": { + "partition": { + "type": "string", + "id": 1 + }, + "entity": { + "type": "string", + "id": 2 + }, + "type": { + "type": "EntityType", + "id": 3 + }, + "sampledDataLocations": { + "rule": "repeated", + "type": "string", + "id": 4 + } } }, - "validateOnly": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" + "ActionDetails": { + "fields": { + "type": { + "type": "string", + "id": 1 + } } } } }, - "DeleteZoneRequest": { + "JobEvent": { "fields": { - "name": { + "message": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" - } - } - } - }, - "ListZonesRequest": { - "fields": { - "parent": { + "id": 1 + }, + "jobId": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" - } + "id": 2 }, - "pageSize": { + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + }, + "state": { + "type": "State", + "id": 5 + }, + "retries": { "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "id": 6 }, - "pageToken": { + "type": { + "type": "Type", + "id": 7 + }, + "service": { + "type": "Service", + "id": 8 + }, + "serviceJob": { "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" + "id": 9 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "SPARK": 1, + "NOTEBOOK": 2 } }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "SUCCEEDED": 1, + "FAILED": 2, + "CANCELLED": 3, + "ABORTED": 4 } }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" + "Service": { + "values": { + "SERVICE_UNSPECIFIED": 0, + "DATAPROC": 1 } } } }, - "ListZonesResponse": { + "SessionEvent": { + "oneofs": { + "detail": { + "oneof": [ + "query" + ] + } + }, "fields": { - "zones": { - "rule": "repeated", - "type": "Zone", + "message": { + "type": "string", "id": 1 }, - "nextPageToken": { + "userId": { "type": "string", "id": 2 - } - } - }, - "ListZoneActionsRequest": { - "fields": { - "parent": { + }, + "sessionId": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" - } + "id": 3 }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" + "type": { + "type": "EventType", + "id": 4 + }, + "query": { + "type": "QueryDetail", + "id": 5 + }, + "eventSucceeded": { + "type": "bool", + "id": 6 + }, + "fastStartupEnabled": { + "type": "bool", + "id": 7 + }, + "unassignedDuration": { + "type": "google.protobuf.Duration", + "id": 8 + } + }, + "nested": { + "EventType": { + "values": { + "EVENT_TYPE_UNSPECIFIED": 0, + "START": 1, + "STOP": 2, + "QUERY": 3, + "CREATE": 4 } }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" + "QueryDetail": { + "fields": { + "queryId": { + "type": "string", + "id": 1 + }, + "queryText": { + "type": "string", + "id": 2 + }, + "engine": { + "type": "Engine", + "id": 3 + }, + "duration": { + "type": "google.protobuf.Duration", + "id": 4 + }, + "resultSizeBytes": { + "type": "int64", + "id": 5 + }, + "dataProcessedBytes": { + "type": "int64", + "id": 6 + } + }, + "nested": { + "Engine": { + "values": { + "ENGINE_UNSPECIFIED": 0, + "SPARK_SQL": 1, + "BIGQUERY": 2 + } + } } } } }, - "GetZoneRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" - } + "DataScanEvent": { + "oneofs": { + "result": { + "oneof": [ + "dataProfile", + "dataQuality" + ] } - } - }, - "CreateAssetRequest": { + }, "fields": { - "parent": { + "dataSource": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" - } + "id": 1 }, - "assetId": { + "jobId": { "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "id": 2 }, - "asset": { - "type": "Asset", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 3 }, - "validateOnly": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateAssetRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 4 }, - "asset": { - "type": "Asset", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "type": { + "type": "ScanType", + "id": 5 }, - "validateOnly": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteAssetRequest": { - "fields": { - "name": { + "state": { + "type": "State", + "id": 6 + }, + "message": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Asset" - } - } - } - }, - "ListAssetsRequest": { - "fields": { - "parent": { + "id": 7 + }, + "specVersion": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" + "id": 8 + }, + "trigger": { + "type": "Trigger", + "id": 9 + }, + "scope": { + "type": "Scope", + "id": 10 + }, + "dataProfile": { + "type": "DataProfileResult", + "id": 101 + }, + "dataQuality": { + "type": "DataQualityResult", + "id": 102 + } + }, + "nested": { + "ScanType": { + "values": { + "SCAN_TYPE_UNSPECIFIED": 0, + "DATA_PROFILE": 1, + "DATA_QUALITY": 2 } }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "STARTED": 1, + "SUCCEEDED": 2, + "FAILED": 3, + "CANCELLED": 4 } }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" + "Trigger": { + "values": { + "TRIGGER_UNSPECIFIED": 0, + "ON_DEMAND": 1, + "SCHEDULE": 2 } }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" + "Scope": { + "values": { + "SCOPE_UNSPECIFIED": 0, + "FULL": 1, + "INCREMENTAL": 2 } }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" + "DataProfileResult": { + "fields": { + "rowCount": { + "type": "int64", + "id": 1 + } } - } - } - }, - "ListAssetsResponse": { - "fields": { - "assets": { - "rule": "repeated", - "type": "Asset", - "id": 1 }, - "nextPageToken": { - "type": "string", - "id": 2 + "DataQualityResult": { + "fields": { + "rowCount": { + "type": "int64", + "id": 1 + }, + "passed": { + "type": "bool", + "id": 2 + }, + "dimensionPassed": { + "keyType": "string", + "type": "bool", + "id": 3 + } + } } } }, - "ListAssetActionsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, + "MetadataService": { + "options": { + "(google.api.default_host)": "dataplex.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateEntity": { + "requestType": "CreateEntityRequest", + "responseType": "Entity", "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Asset" - } + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities", + "(google.api.http).body": "entity", + "(google.api.method_signature)": "parent,entity" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities", + "body": "entity" + } + }, + { + "(google.api.method_signature)": "parent,entity" + } + ] }, - "pageSize": { - "type": "int32", - "id": 2, + "UpdateEntity": { + "requestType": "UpdateEntityRequest", + "responseType": "Entity", "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "(google.api.http).put": "/v1/{entity.name=projects/*/locations/*/lakes/*/zones/*/entities/*}", + "(google.api.http).body": "entity" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "put": "/v1/{entity.name=projects/*/locations/*/lakes/*/zones/*/entities/*}", + "body": "entity" + } + } + ] }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "GetAssetRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Asset" - } - } - } - }, - "OperationMetadata": { - "fields": { - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 1, + "DeleteEntity": { + "requestType": "DeleteEntityRequest", + "responseType": "google.protobuf.Empty", "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 2, + "GetEntity": { + "requestType": "GetEntityRequest", + "responseType": "Entity", "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, - "target": { - "type": "string", - "id": 3, + "ListEntities": { + "requestType": "ListEntitiesRequest", + "responseType": "ListEntitiesResponse", "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, - "verb": { - "type": "string", - "id": 4, + "CreatePartition": { + "requestType": "CreatePartitionRequest", + "responseType": "Partition", "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions", + "(google.api.http).body": "partition", + "(google.api.method_signature)": "parent,partition" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions", + "body": "partition" + } + }, + { + "(google.api.method_signature)": "parent,partition" + } + ] }, - "statusMessage": { - "type": "string", - "id": 5, + "DeletePartition": { + "requestType": "DeletePartitionRequest", + "responseType": "google.protobuf.Empty", "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, - "requestedCancellation": { - "type": "bool", - "id": 6, + "GetPartition": { + "requestType": "GetPartitionRequest", + "responseType": "Partition", "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "(google.api.http).get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, - "apiVersion": { - "type": "string", - "id": 7, + "ListPartitions": { + "requestType": "ListPartitionsRequest", + "responseType": "ListPartitionsResponse", "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] } } }, - "CreateTaskRequest": { + "CreateEntityRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" - } - }, - "taskId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" } }, - "task": { - "type": "Task", + "entity": { + "type": "Entity", "id": 3, "options": { "(google.api.field_behavior)": "REQUIRED" @@ -5518,17 +5766,10 @@ } } }, - "UpdateTaskRequest": { + "UpdateEntityRequest": { "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "task": { - "type": "Task", + "entity": { + "type": "Entity", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" @@ -5543,108 +5784,124 @@ } } }, - "DeleteTaskRequest": { + "DeleteEntityRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Task" + "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" + } + }, + "etag": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" } } } }, - "ListTasksRequest": { + "ListEntitiesRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" + "(google.api.resource_reference).type": "dataplex.googleapis.com/Zone" } }, - "pageSize": { - "type": "int32", + "view": { + "type": "EntityView", "id": 2, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED" } }, - "pageToken": { - "type": "string", + "pageSize": { + "type": "int32", "id": 3, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "filter": { + "pageToken": { "type": "string", "id": 4, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "orderBy": { + "filter": { "type": "string", "id": 5, "options": { "(google.api.field_behavior)": "OPTIONAL" } } + }, + "nested": { + "EntityView": { + "values": { + "ENTITY_VIEW_UNSPECIFIED": 0, + "TABLES": 1, + "FILESETS": 2 + } + } } }, - "ListTasksResponse": { + "ListEntitiesResponse": { "fields": { - "tasks": { + "entities": { "rule": "repeated", - "type": "Task", + "type": "Entity", "id": 1 }, "nextPageToken": { "type": "string", "id": 2 - }, - "unreachableLocations": { - "rule": "repeated", - "type": "string", - "id": 3 } } }, - "GetTaskRequest": { + "GetEntityRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Task" + "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" } - } - } - }, - "GetJobRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, + }, + "view": { + "type": "EntityView", + "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Job" + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "EntityView": { + "values": { + "ENTITY_VIEW_UNSPECIFIED": 0, + "BASIC": 1, + "SCHEMA": 2, + "FULL": 4 } } } }, - "ListJobsRequest": { + "ListPartitionsRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Task" + "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" } }, "pageSize": { @@ -5660,53 +5917,28 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } - } - } - }, - "ListJobsResponse": { - "fields": { - "jobs": { - "rule": "repeated", - "type": "Job", - "id": 1 }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "CancelJobRequest": { - "fields": { - "name": { + "filter": { "type": "string", - "id": 1, + "id": 4, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Job" + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "CreateEnvironmentRequest": { + "CreatePartitionRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" - } - }, - "environmentId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" } }, - "environment": { - "type": "Environment", + "partition": { + "type": "Partition", "id": 3, "options": { "(google.api.field_behavior)": "REQUIRED" @@ -5721,88 +5953,31 @@ } } }, - "UpdateEnvironmentRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "environment": { - "type": "Environment", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteEnvironmentRequest": { + "DeletePartitionRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Environment" - } - } - } - }, - "ListEnvironmentsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Lake" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.resource_reference).type": "dataplex.googleapis.com/Partition" } }, - "orderBy": { + "etag": { "type": "string", - "id": 5, + "id": 2, "options": { + "deprecated": true, "(google.api.field_behavior)": "OPTIONAL" } } } }, - "ListEnvironmentsResponse": { + "ListPartitionsResponse": { "fields": { - "environments": { + "partitions": { "rule": "repeated", - "type": "Environment", + "type": "Partition", "id": 1 }, "nextPageToken": { @@ -5811,586 +5986,528 @@ } } }, - "GetEnvironmentRequest": { + "GetPartitionRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Environment" + "(google.api.resource_reference).type": "dataplex.googleapis.com/Partition" } } } }, - "ListSessionsRequest": { + "Entity": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Entity", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}" + }, "fields": { - "parent": { + "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Environment" + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Entity" } }, - "pageSize": { - "type": "int32", + "displayName": { + "type": "string", "id": 2, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "pageToken": { + "description": { "type": "string", "id": 3, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "filter": { - "type": "string", - "id": 4, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OUTPUT_ONLY" } - } - } - }, - "ListSessionsResponse": { - "fields": { - "sessions": { - "rule": "repeated", - "type": "Session", - "id": 1 }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "Task": { - "options": { - "(google.api.resource).type": "dataplex.googleapis.com/Task", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}" - }, - "oneofs": { - "config": { - "oneof": [ - "spark", - "notebook" - ] - } - }, - "fields": { - "name": { + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "id": { "type": "string", - "id": 1, + "id": 7, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Task" + "(google.api.field_behavior)": "REQUIRED" } }, - "uid": { + "etag": { "type": "string", - "id": 2, + "id": 8, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL" } }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 3, + "type": { + "type": "Type", + "id": 10, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "IMMUTABLE" } }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 4, + "asset": { + "type": "string", + "id": 11, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "IMMUTABLE" } }, - "description": { + "dataPath": { "type": "string", - "id": 5, + "id": 12, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "IMMUTABLE" } }, - "displayName": { + "dataPathPattern": { "type": "string", - "id": 6, + "id": 13, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "state": { - "type": "State", - "id": 7, + "catalogEntry": { + "type": "string", + "id": 14, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "labels": { - "keyType": "string", - "type": "string", - "id": 8, + "system": { + "type": "StorageSystem", + "id": 15, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "IMMUTABLE" } }, - "triggerSpec": { - "type": "TriggerSpec", - "id": 100, + "format": { + "type": "StorageFormat", + "id": 16, "options": { "(google.api.field_behavior)": "REQUIRED" } }, - "executionSpec": { - "type": "ExecutionSpec", - "id": 101, + "compatibility": { + "type": "CompatibilityStatus", + "id": 19, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "executionStatus": { - "type": "ExecutionStatus", - "id": 201, + "access": { + "type": "StorageAccess", + "id": 21, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "spark": { - "type": "SparkTaskConfig", - "id": 300 + "uid": { + "type": "string", + "id": 22, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "notebook": { - "type": "NotebookTaskConfig", - "id": 302 + "schema": { + "type": "Schema", + "id": 50, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } }, "nested": { - "InfrastructureSpec": { - "oneofs": { - "resources": { - "oneof": [ - "batch" - ] - }, - "runtime": { - "oneof": [ - "containerImage" - ] - }, - "network": { - "oneof": [ - "vpcNetwork" - ] - } - }, - "fields": { - "batch": { - "type": "BatchComputeResources", - "id": 52 - }, - "containerImage": { - "type": "ContainerImageRuntime", - "id": 101 - }, - "vpcNetwork": { - "type": "VpcNetwork", - "id": 150 - } - }, - "nested": { - "BatchComputeResources": { - "fields": { - "executorsCount": { - "type": "int32", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "maxExecutorsCount": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ContainerImageRuntime": { - "fields": { - "image": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "javaJars": { - "rule": "repeated", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pythonPackages": { - "rule": "repeated", - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "properties": { - "keyType": "string", - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "TABLE": 1, + "FILESET": 2 + } + }, + "CompatibilityStatus": { + "fields": { + "hiveMetastore": { + "type": "Compatibility", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "VpcNetwork": { - "oneofs": { - "networkName": { - "oneof": [ - "network", - "subNetwork" - ] - } - }, + "bigquery": { + "type": "Compatibility", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Compatibility": { "fields": { - "network": { - "type": "string", + "compatible": { + "type": "bool", "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "subNetwork": { + "reason": { "type": "string", "id": 2, "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "networkTags": { - "rule": "repeated", - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OUTPUT_ONLY" } } } } } + } + } + }, + "Partition": { + "options": { + "(google.api.resource).type": "dataplex.googleapis.com/Partition", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "dataplex.googleapis.com/Partition" + } }, - "TriggerSpec": { - "oneofs": { - "trigger": { - "oneof": [ - "schedule" - ] - } - }, - "fields": { - "type": { - "type": "Type", - "id": 5, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "disabled": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "maxRetries": { - "type": "int32", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "schedule": { - "type": "string", - "id": 100, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "ON_DEMAND": 1, - "RECURRING": 2 - } - } + "values": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" } }, - "ExecutionSpec": { - "fields": { - "args": { - "keyType": "string", - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "serviceAccount": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "project": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "maxJobExecutionLifetime": { - "type": "google.protobuf.Duration", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "kmsKey": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } + "location": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" } }, - "SparkTaskConfig": { - "oneofs": { - "driver": { - "oneof": [ - "mainJarFileUri", - "mainClass", - "pythonScriptFile", - "sqlScriptFile", - "sqlScript" - ] - } - }, - "fields": { - "mainJarFileUri": { - "type": "string", - "id": 100 - }, - "mainClass": { - "type": "string", - "id": 101 - }, - "pythonScriptFile": { - "type": "string", - "id": 102 - }, - "sqlScriptFile": { - "type": "string", - "id": 104 - }, - "sqlScript": { - "type": "string", - "id": 105 - }, - "fileUris": { - "rule": "repeated", + "etag": { + "type": "string", + "id": 4, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Schema": { + "fields": { + "userManaged": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "fields": { + "rule": "repeated", + "type": "SchemaField", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "partitionFields": { + "rule": "repeated", + "type": "PartitionField", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "partitionStyle": { + "type": "PartitionStyle", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "BOOLEAN": 1, + "BYTE": 2, + "INT16": 3, + "INT32": 4, + "INT64": 5, + "FLOAT": 6, + "DOUBLE": 7, + "DECIMAL": 8, + "STRING": 9, + "BINARY": 10, + "TIMESTAMP": 11, + "DATE": 12, + "TIME": 13, + "RECORD": 14, + "NULL": 100 + } + }, + "Mode": { + "values": { + "MODE_UNSPECIFIED": 0, + "REQUIRED": 1, + "NULLABLE": 2, + "REPEATED": 3 + } + }, + "SchemaField": { + "fields": { + "name": { "type": "string", - "id": 3, + "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED" } }, - "archiveUris": { - "rule": "repeated", + "description": { "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "infrastructureSpec": { - "type": "InfrastructureSpec", - "id": 6, + "id": 2, "options": { "(google.api.field_behavior)": "OPTIONAL" } - } - } - }, - "NotebookTaskConfig": { - "fields": { - "notebook": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } }, - "infrastructureSpec": { - "type": "InfrastructureSpec", + "type": { + "type": "Type", "id": 3, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED" } }, - "fileUris": { - "rule": "repeated", - "type": "string", - "id": 5, + "mode": { + "type": "Mode", + "id": 4, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED" } }, - "archiveUris": { + "fields": { "rule": "repeated", - "type": "string", - "id": 6, + "type": "SchemaField", + "id": 10, "options": { "(google.api.field_behavior)": "OPTIONAL" } } } }, - "ExecutionStatus": { + "PartitionField": { "fields": { - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 3, + "name": { + "type": "string", + "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED" } }, - "latestJob": { - "type": "Job", - "id": 9, + "type": { + "type": "Type", + "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "IMMUTABLE" } } } + }, + "PartitionStyle": { + "values": { + "PARTITION_STYLE_UNSPECIFIED": 0, + "HIVE_COMPATIBLE": 1 + } } } }, - "Job": { - "options": { - "(google.api.resource).type": "dataplex.googleapis.com/Job", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}" + "StorageFormat": { + "oneofs": { + "options": { + "oneof": [ + "csv", + "json", + "iceberg" + ] + } }, "fields": { - "name": { - "type": "string", + "format": { + "type": "Format", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "dataplex.googleapis.com/Job" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "uid": { - "type": "string", + "compressionFormat": { + "type": "CompressionFormat", "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL" } }, - "startTime": { - "type": "google.protobuf.Timestamp", + "mimeType": { + "type": "string", "id": 3, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "REQUIRED" } }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 4, + "csv": { + "type": "CsvOptions", + "id": 10, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL" } }, - "state": { - "type": "State", - "id": 5, + "json": { + "type": "JsonOptions", + "id": 11, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL" } }, - "retryCount": { - "type": "uint32", - "id": 6, + "iceberg": { + "type": "IcebergOptions", + "id": 12, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "CsvOptions": { + "fields": { + "encoding": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "headerRows": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "delimiter": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "quote": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } } }, - "service": { - "type": "Service", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "JsonOptions": { + "fields": { + "encoding": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } } }, - "serviceJob": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "IcebergOptions": { + "fields": { + "metadataLocation": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } } }, - "message": { - "type": "string", - "id": 9, + "Format": { + "values": { + "FORMAT_UNSPECIFIED": 0, + "PARQUET": 1, + "AVRO": 2, + "ORC": 3, + "CSV": 100, + "JSON": 101, + "IMAGE": 200, + "AUDIO": 201, + "VIDEO": 202, + "TEXT": 203, + "TFRECORD": 204, + "OTHER": 1000, + "UNKNOWN": 1001 + } + }, + "CompressionFormat": { + "values": { + "COMPRESSION_FORMAT_UNSPECIFIED": 0, + "GZIP": 2, + "BZIP2": 3 + } + } + } + }, + "StorageAccess": { + "fields": { + "read": { + "type": "AccessMode", + "id": 21, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } } }, "nested": { - "Service": { - "values": { - "SERVICE_UNSPECIFIED": 0, - "DATAPROC": 1 - } - }, - "State": { + "AccessMode": { "values": { - "STATE_UNSPECIFIED": 0, - "RUNNING": 1, - "CANCELLING": 2, - "CANCELLED": 3, - "SUCCEEDED": 4, - "FAILED": 5, - "ABORTED": 6 + "ACCESS_MODE_UNSPECIFIED": 0, + "DIRECT": 1, + "MANAGED": 2 } } } + }, + "StorageSystem": { + "values": { + "STORAGE_SYSTEM_UNSPECIFIED": 0, + "CLOUD_STORAGE": 1, + "BIGQUERY": 2 + } } } } diff --git a/packages/google-cloud-dataplex/samples/README.md b/packages/google-cloud-dataplex/samples/README.md index 7133f36ef00..e268d7cd930 100644 --- a/packages/google-cloud-dataplex/samples/README.md +++ b/packages/google-cloud-dataplex/samples/README.md @@ -55,6 +55,7 @@ * [Dataplex_service.list_tasks](#dataplex_service.list_tasks) * [Dataplex_service.list_zone_actions](#dataplex_service.list_zone_actions) * [Dataplex_service.list_zones](#dataplex_service.list_zones) + * [Dataplex_service.run_task](#dataplex_service.run_task) * [Dataplex_service.update_asset](#dataplex_service.update_asset) * [Dataplex_service.update_environment](#dataplex_service.update_environment) * [Dataplex_service.update_lake](#dataplex_service.update_lake) @@ -818,6 +819,23 @@ __Usage:__ +### Dataplex_service.run_task + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.run_task.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.run_task.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.run_task.js` + + +----- + + + + ### Dataplex_service.update_asset View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.update_asset.js). diff --git a/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.create_data_scan.js b/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.create_data_scan.js index 206953eec97..160cf9145dd 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.create_data_scan.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.create_data_scan.js @@ -48,6 +48,11 @@ function main(parent, dataScan, dataScanId) { * * Must be unique within the customer project / location. */ // const dataScanId = 'abc123' + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is `false`. + */ + // const validateOnly = true // Imports the Dataplex library const {DataScanServiceClient} = require('@google-cloud/dataplex').v1; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.get_data_scan_job.js b/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.get_data_scan_job.js index 52026dc382d..026095d05d8 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.get_data_scan_job.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.get_data_scan_job.js @@ -30,7 +30,7 @@ function main(name) { */ /** * Required. The resource name of the DataScanJob: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/dataScanJobs/{data_scan_job_id}` + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` * where `project` refers to a *project_id* or *project_number* and * `location_id` refers to a GCP region. */ diff --git a/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.list_data_scans.js b/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.list_data_scans.js index fdff3c58245..4a1e6a6c57e 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.list_data_scans.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.list_data_scans.js @@ -37,7 +37,7 @@ function main(parent) { // const parent = 'abc123' /** * Optional. Maximum number of dataScans to return. The service may return - * fewer than this value. If unspecified, at most 10 scans will be returned. + * fewer than this value. If unspecified, at most 500 scans will be returned. * The maximum value is 1000; values above 1000 will be coerced to 1000. */ // const pageSize = 1234 diff --git a/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.update_data_scan.js b/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.update_data_scan.js index b0ca6b3412f..bb40bcfec51 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.update_data_scan.js +++ b/packages/google-cloud-dataplex/samples/generated/v1/data_scan_service.update_data_scan.js @@ -37,6 +37,11 @@ function main(dataScan, updateMask) { * Required. Mask of fields to update. */ // const updateMask = {} + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is `false`. + */ + // const validateOnly = true // Imports the Dataplex library const {DataScanServiceClient} = require('@google-cloud/dataplex').v1; diff --git a/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.run_task.js b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.run_task.js new file mode 100644 index 00000000000..1f54972871b --- /dev/null +++ b/packages/google-cloud-dataplex/samples/generated/v1/dataplex_service.run_task.js @@ -0,0 +1,62 @@ +// Copyright 2023 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 dataplex_v1_generated_DataplexService_RunTask_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 task: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + */ + // const name = 'abc123' + + // Imports the Dataplex library + const {DataplexServiceClient} = require('@google-cloud/dataplex').v1; + + // Instantiates a client + const dataplexClient = new DataplexServiceClient(); + + async function callRunTask() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dataplexClient.runTask(request); + console.log(response); + } + + callRunTask(); + // [END dataplex_v1_generated_DataplexService_RunTask_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json b/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json index 11b855588b4..a01480792f5 100644 --- a/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json +++ b/packages/google-cloud-dataplex/samples/generated/v1/snippet_metadata.google.cloud.dataplex.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataplex", - "version": "2.3.1", + "version": "2.4.0", "language": "TYPESCRIPT", "apis": [ { @@ -1515,6 +1515,46 @@ } } }, + { + "regionTag": "dataplex_v1_generated_DataplexService_RunTask_async", + "title": "ContentService runTask Sample", + "origin": "API_DEFINITION", + "description": " Run an on demand execution of a Task.", + "canonical": true, + "file": "dataplex_service.run_task.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RunTask", + "fullName": "google.cloud.dataplex.v1.DataplexService.RunTask", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.dataplex.v1.RunTaskResponse", + "client": { + "shortName": "DataplexServiceClient", + "fullName": "google.cloud.dataplex.v1.DataplexServiceClient" + }, + "method": { + "shortName": "RunTask", + "fullName": "google.cloud.dataplex.v1.DataplexService.RunTask", + "service": { + "shortName": "DataplexService", + "fullName": "google.cloud.dataplex.v1.DataplexService" + } + } + } + }, { "regionTag": "dataplex_v1_generated_DataplexService_GetJob_async", "title": "ContentService getJob Sample", @@ -1894,7 +1934,7 @@ "segments": [ { "start": 25, - "end": 72, + "end": 77, "type": "FULL" } ], @@ -1914,6 +1954,10 @@ { "name": "data_scan_id", "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" } ], "resultType": ".google.longrunning.Operation", @@ -1942,7 +1986,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 65, "type": "FULL" } ], @@ -1958,6 +2002,10 @@ { "name": "update_mask", "type": ".google.protobuf.FieldMask" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" } ], "resultType": ".google.longrunning.Operation", diff --git a/packages/google-cloud-dataplex/samples/package.json b/packages/google-cloud-dataplex/samples/package.json index 1c149fae0ee..8b52cab7c4b 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": "^2.3.2" + "@google-cloud/dataplex": "^2.4.0" }, "devDependencies": { "c8": "^7.1.0", diff --git a/packages/google-cloud-dataplex/src/v1/data_scan_service_client.ts b/packages/google-cloud-dataplex/src/v1/data_scan_service_client.ts index 653af2e725a..b7c02c9f1a3 100644 --- a/packages/google-cloud-dataplex/src/v1/data_scan_service_client.ts +++ b/packages/google-cloud-dataplex/src/v1/data_scan_service_client.ts @@ -775,7 +775,7 @@ export class DataScanServiceClient { * The request object that will be sent. * @param {string} request.name * Required. The resource name of the DataScanJob: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/dataScanJobs/{data_scan_job_id}` + * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` * where `project` refers to a *project_id* or *project_number* and * `location_id` refers to a GCP region. * @param {google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView} [request.view] @@ -879,6 +879,9 @@ export class DataScanServiceClient { * * Must end with a number or a letter. * * Must be between 1-63 characters. * * Must be unique within the customer project / location. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is `false`. * @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. @@ -1021,6 +1024,9 @@ export class DataScanServiceClient { * Only fields specified in `update_mask` are updated. * @param {google.protobuf.FieldMask} request.updateMask * Required. Mask of fields to update. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is `false`. * @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. @@ -1305,7 +1311,7 @@ export class DataScanServiceClient { * `location_id` refers to a GCP region. * @param {number} [request.pageSize] * Optional. Maximum number of dataScans to return. The service may return - * fewer than this value. If unspecified, at most 10 scans will be returned. + * fewer than this value. If unspecified, at most 500 scans will be returned. * The maximum value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] * Optional. Page token received from a previous `ListDataScans` call. Provide @@ -1410,7 +1416,7 @@ export class DataScanServiceClient { * `location_id` refers to a GCP region. * @param {number} [request.pageSize] * Optional. Maximum number of dataScans to return. The service may return - * fewer than this value. If unspecified, at most 10 scans will be returned. + * fewer than this value. If unspecified, at most 500 scans will be returned. * The maximum value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] * Optional. Page token received from a previous `ListDataScans` call. Provide @@ -1469,7 +1475,7 @@ export class DataScanServiceClient { * `location_id` refers to a GCP region. * @param {number} [request.pageSize] * Optional. Maximum number of dataScans to return. The service may return - * fewer than this value. If unspecified, at most 10 scans will be returned. + * fewer than this value. If unspecified, at most 500 scans will be returned. * The maximum value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] * Optional. Page token received from a previous `ListDataScans` call. Provide diff --git a/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts b/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts index 4738d990c93..c66016039c2 100644 --- a/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts +++ b/packages/google-cloud-dataplex/src/v1/dataplex_service_client.ts @@ -692,6 +692,7 @@ export class DataplexServiceClient { 'listTasks', 'getTask', 'listJobs', + 'runTask', 'getJob', 'cancelJob', 'createEnvironment', @@ -1122,6 +1123,90 @@ export class DataplexServiceClient { this.initialize(); return this.innerApiCalls.getTask(request, options, callback); } + /** + * Run an on demand execution of a Task. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the task: + * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. + * @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 google.cloud.dataplex.v1.RunTaskResponse | RunTaskResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/dataplex_service.run_task.js + * region_tag:dataplex_v1_generated_DataplexService_RunTask_async + */ + runTask( + request?: protos.google.cloud.dataplex.v1.IRunTaskRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dataplex.v1.IRunTaskResponse, + protos.google.cloud.dataplex.v1.IRunTaskRequest | undefined, + {} | undefined + ] + >; + runTask( + request: protos.google.cloud.dataplex.v1.IRunTaskRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dataplex.v1.IRunTaskResponse, + protos.google.cloud.dataplex.v1.IRunTaskRequest | null | undefined, + {} | null | undefined + > + ): void; + runTask( + request: protos.google.cloud.dataplex.v1.IRunTaskRequest, + callback: Callback< + protos.google.cloud.dataplex.v1.IRunTaskResponse, + protos.google.cloud.dataplex.v1.IRunTaskRequest | null | undefined, + {} | null | undefined + > + ): void; + runTask( + request?: protos.google.cloud.dataplex.v1.IRunTaskRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dataplex.v1.IRunTaskResponse, + protos.google.cloud.dataplex.v1.IRunTaskRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dataplex.v1.IRunTaskResponse, + protos.google.cloud.dataplex.v1.IRunTaskRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dataplex.v1.IRunTaskResponse, + protos.google.cloud.dataplex.v1.IRunTaskRequest | 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(); + return this.innerApiCalls.runTask(request, options, callback); + } /** * Get job resource. * diff --git a/packages/google-cloud-dataplex/src/v1/dataplex_service_client_config.json b/packages/google-cloud-dataplex/src/v1/dataplex_service_client_config.json index 232a178a7cc..c90740bba85 100644 --- a/packages/google-cloud-dataplex/src/v1/dataplex_service_client_config.json +++ b/packages/google-cloud-dataplex/src/v1/dataplex_service_client_config.json @@ -152,6 +152,10 @@ "retry_codes_name": "unavailable", "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" }, + "RunTask": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "GetJob": { "timeout_millis": 60000, "retry_codes_name": "unavailable", diff --git a/packages/google-cloud-dataplex/src/v1/gapic_metadata.json b/packages/google-cloud-dataplex/src/v1/gapic_metadata.json index 9b67ace2916..24f9fba5473 100644 --- a/packages/google-cloud-dataplex/src/v1/gapic_metadata.json +++ b/packages/google-cloud-dataplex/src/v1/gapic_metadata.json @@ -128,6 +128,11 @@ "getTask" ] }, + "RunTask": { + "methods": [ + "runTask" + ] + }, "GetJob": { "methods": [ "getJob" @@ -313,6 +318,11 @@ "getTask" ] }, + "RunTask": { + "methods": [ + "runTask" + ] + }, "GetJob": { "methods": [ "getJob" diff --git a/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts b/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts index 570f9b499a8..ce3f80e14f2 100644 --- a/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts +++ b/packages/google-cloud-dataplex/test/gapic_dataplex_service_v1.ts @@ -772,6 +772,133 @@ describe('v1.DataplexServiceClient', () => { }); }); + describe('runTask', () => { + it('invokes runTask without error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.RunTaskRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.RunTaskRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.RunTaskResponse() + ); + client.innerApiCalls.runTask = stubSimpleCall(expectedResponse); + const [response] = await client.runTask(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.runTask as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.runTask as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runTask without error using callback', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.RunTaskRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.RunTaskRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dataplex.v1.RunTaskResponse() + ); + client.innerApiCalls.runTask = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.runTask( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dataplex.v1.IRunTaskResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.runTask as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.runTask as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runTask with error', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.RunTaskRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.RunTaskRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.runTask = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.runTask(request), expectedError); + const actualRequest = (client.innerApiCalls.runTask as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.runTask as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runTask with closed client', async () => { + const client = new dataplexserviceModule.v1.DataplexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dataplex.v1.RunTaskRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dataplex.v1.RunTaskRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.runTask(request), expectedError); + }); + }); + describe('getJob', () => { it('invokes getJob without error', async () => { const client = new dataplexserviceModule.v1.DataplexServiceClient({ diff --git a/packages/google-cloud-dataproc/CHANGELOG.md b/packages/google-cloud-dataproc/CHANGELOG.md index a4e5ba5dccf..0a8f3a731ad 100644 --- a/packages/google-cloud-dataproc/CHANGELOG.md +++ b/packages/google-cloud-dataproc/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/dataproc?activeTab=versions +## [4.5.0](https://github.com/googleapis/google-cloud-node/compare/dataproc-v4.4.1...dataproc-v4.5.0) (2023-04-24) + + +### Features + +* [dataproc] update go_package to v2 in google.cloud.dataproc.v1 ([#4184](https://github.com/googleapis/google-cloud-node/issues/4184)) ([c50526d](https://github.com/googleapis/google-cloud-node/commit/c50526dc1b23a0318adc8fde9a4a88af0725b030)) + ## [4.4.1](https://github.com/googleapis/google-cloud-node/compare/dataproc-v4.4.0...dataproc-v4.4.1) (2023-04-13) diff --git a/packages/google-cloud-dataproc/package.json b/packages/google-cloud-dataproc/package.json index 86140972853..febfd37cc97 100644 --- a/packages/google-cloud-dataproc/package.json +++ b/packages/google-cloud-dataproc/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/dataproc", "description": "Google Cloud Dataproc API client for Node.js", - "version": "4.4.1", + "version": "4.5.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { @@ -32,20 +32,20 @@ "Google Cloud Dataproc API" ], "scripts": { - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "lint": "gts check", - "docs": "jsdoc -c .jsdoc.js", - "system-test": "npm run compile && c8 mocha build/system-test", - "fix": "gts fix", - "docs-test": "linkinator docs", - "predocs-test": "npm run docs", - "prelint": "cd samples; npm link ../; npm install", "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", - "prepare": "npm run compile", - "precompile": "gts clean" + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -61,6 +61,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -71,5 +72,4 @@ "webpack-cli": "^5.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-dataproc" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/autoscaling_policies.proto b/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/autoscaling_policies.proto index 337ec6a6479..123cd73e24e 100644 --- a/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/autoscaling_policies.proto +++ b/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/autoscaling_policies.proto @@ -23,7 +23,7 @@ import "google/api/resource.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; -option go_package = "cloud.google.com/go/dataproc/apiv1/dataprocpb;dataprocpb"; +option go_package = "cloud.google.com/go/dataproc/v2/apiv1/dataprocpb;dataprocpb"; option java_multiple_files = true; option java_outer_classname = "AutoscalingPoliciesProto"; option java_package = "com.google.cloud.dataproc.v1"; diff --git a/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/batches.proto b/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/batches.proto index cde1351c83d..56d73f5c884 100644 --- a/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/batches.proto +++ b/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/batches.proto @@ -25,7 +25,7 @@ import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; -option go_package = "cloud.google.com/go/dataproc/apiv1/dataprocpb;dataprocpb"; +option go_package = "cloud.google.com/go/dataproc/v2/apiv1/dataprocpb;dataprocpb"; option java_multiple_files = true; option java_outer_classname = "BatchesProto"; option java_package = "com.google.cloud.dataproc.v1"; 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 d1e46bd3d56..a0a4e33cf2d 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 @@ -26,7 +26,7 @@ import "google/protobuf/duration.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; -option go_package = "cloud.google.com/go/dataproc/apiv1/dataprocpb;dataprocpb"; +option go_package = "cloud.google.com/go/dataproc/v2/apiv1/dataprocpb;dataprocpb"; option java_multiple_files = true; option java_outer_classname = "ClustersProto"; option java_package = "com.google.cloud.dataproc.v1"; diff --git a/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/jobs.proto b/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/jobs.proto index 1c19ce66bcd..8b1dec46020 100644 --- a/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/jobs.proto +++ b/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/jobs.proto @@ -24,7 +24,7 @@ import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; -option go_package = "cloud.google.com/go/dataproc/apiv1/dataprocpb;dataprocpb"; +option go_package = "cloud.google.com/go/dataproc/v2/apiv1/dataprocpb;dataprocpb"; option java_multiple_files = true; option java_outer_classname = "JobsProto"; option java_package = "com.google.cloud.dataproc.v1"; diff --git a/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/node_groups.proto b/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/node_groups.proto index 0bd3ef30fd2..5a7e47ef1e8 100644 --- a/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/node_groups.proto +++ b/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/node_groups.proto @@ -24,7 +24,7 @@ import "google/cloud/dataproc/v1/clusters.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/duration.proto"; -option go_package = "cloud.google.com/go/dataproc/apiv1/dataprocpb;dataprocpb"; +option go_package = "cloud.google.com/go/dataproc/v2/apiv1/dataprocpb;dataprocpb"; option java_multiple_files = true; option java_outer_classname = "NodeGroupsProto"; option java_package = "com.google.cloud.dataproc.v1"; diff --git a/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/operations.proto b/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/operations.proto index 57c913f7a31..d9fad26d212 100644 --- a/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/operations.proto +++ b/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/operations.proto @@ -19,7 +19,7 @@ package google.cloud.dataproc.v1; import "google/api/field_behavior.proto"; import "google/protobuf/timestamp.proto"; -option go_package = "cloud.google.com/go/dataproc/apiv1/dataprocpb;dataprocpb"; +option go_package = "cloud.google.com/go/dataproc/v2/apiv1/dataprocpb;dataprocpb"; option java_multiple_files = true; option java_outer_classname = "OperationsProto"; option java_package = "com.google.cloud.dataproc.v1"; diff --git a/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/shared.proto b/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/shared.proto index 72192bd40ba..e3f1091e180 100644 --- a/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/shared.proto +++ b/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/shared.proto @@ -21,7 +21,7 @@ import "google/api/resource.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; -option go_package = "cloud.google.com/go/dataproc/apiv1/dataprocpb;dataprocpb"; +option go_package = "cloud.google.com/go/dataproc/v2/apiv1/dataprocpb;dataprocpb"; option java_multiple_files = true; option java_outer_classname = "SharedProto"; option java_package = "com.google.cloud.dataproc.v1"; diff --git a/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/workflow_templates.proto b/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/workflow_templates.proto index 0b81da02e3e..bb6a639a095 100644 --- a/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/workflow_templates.proto +++ b/packages/google-cloud-dataproc/protos/google/cloud/dataproc/v1/workflow_templates.proto @@ -27,7 +27,7 @@ import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; -option go_package = "cloud.google.com/go/dataproc/apiv1/dataprocpb;dataprocpb"; +option go_package = "cloud.google.com/go/dataproc/v2/apiv1/dataprocpb;dataprocpb"; option java_multiple_files = true; option java_outer_classname = "WorkflowTemplatesProto"; option java_package = "com.google.cloud.dataproc.v1"; diff --git a/packages/google-cloud-dataproc/protos/protos.json b/packages/google-cloud-dataproc/protos/protos.json index 644b70f6c05..c2852fca4ba 100644 --- a/packages/google-cloud-dataproc/protos/protos.json +++ b/packages/google-cloud-dataproc/protos/protos.json @@ -8,7 +8,7 @@ "nested": { "v1": { "options": { - "go_package": "cloud.google.com/go/dataproc/apiv1/dataprocpb;dataprocpb", + "go_package": "cloud.google.com/go/dataproc/v2/apiv1/dataprocpb;dataprocpb", "java_multiple_files": true, "java_outer_classname": "WorkflowTemplatesProto", "java_package": "com.google.cloud.dataproc.v1", diff --git a/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata.google.cloud.dataproc.v1.json b/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata.google.cloud.dataproc.v1.json index 00ac8b239b6..67c977ad657 100644 --- a/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata.google.cloud.dataproc.v1.json +++ b/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata.google.cloud.dataproc.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataproc", - "version": "4.4.0", + "version": "4.5.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataproc/samples/package.json b/packages/google-cloud-dataproc/samples/package.json index e25d46776ad..1ca17e2416a 100644 --- a/packages/google-cloud-dataproc/samples/package.json +++ b/packages/google-cloud-dataproc/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha test --timeout 600000" }, "dependencies": { - "@google-cloud/dataproc": "^4.4.1", + "@google-cloud/dataproc": "^4.5.0", "@google-cloud/storage": "^6.0.0" }, "devDependencies": { diff --git a/packages/google-cloud-dataqna/package.json b/packages/google-cloud-dataqna/package.json index 002263e9a56..7f42df021e7 100644 --- a/packages/google-cloud-dataqna/package.json +++ b/packages/google-cloud-dataqna/package.json @@ -31,17 +31,18 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", "docs-test": "linkinator docs", "fix": "gts fix", - "prelint": "cd samples; npm link ../; npm i", "lint": "gts check", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", "test": "c8 mocha build/test" }, "dependencies": { @@ -57,6 +58,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -70,5 +72,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-dataqna" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-datastream/CHANGELOG.md b/packages/google-cloud-datastream/CHANGELOG.md index 714bee7a162..d6b483d5007 100644 --- a/packages/google-cloud-datastream/CHANGELOG.md +++ b/packages/google-cloud-datastream/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.3.0](https://github.com/googleapis/google-cloud-node/compare/datastream-v2.2.2...datastream-v2.3.0) (2023-05-20) + + +### Features + +* [datastream] Max concurrent backfill tasks ([#4254](https://github.com/googleapis/google-cloud-node/issues/4254)) ([f2c4a78](https://github.com/googleapis/google-cloud-node/commit/f2c4a78cb8929ea10713f5fa043cbe30df378287)) + ## [2.2.2](https://github.com/googleapis/google-cloud-node/compare/datastream-v2.2.1...datastream-v2.2.2) (2023-04-13) diff --git a/packages/google-cloud-datastream/README.md b/packages/google-cloud-datastream/README.md index abc51c351a5..f48a4e57464 100644 --- a/packages/google-cloud-datastream/README.md +++ b/packages/google-cloud-datastream/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Datastream: Node.js Client](https://github.com/googleapis/google-cloud-node) +# [Datastream: Node.js Client](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-datastream) [![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/datastream.svg)](https://www.npmjs.org/package/@google-cloud/datastream) @@ -115,58 +115,57 @@ listConnectionProfiles(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-datastream/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Datastream.create_connection_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.create_connection_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.create_connection_profile.js,samples/README.md) | -| Datastream.create_private_connection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.create_private_connection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.create_private_connection.js,samples/README.md) | -| Datastream.create_route | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.create_route.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.create_route.js,samples/README.md) | -| Datastream.create_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.create_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.create_stream.js,samples/README.md) | -| Datastream.delete_connection_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.delete_connection_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.delete_connection_profile.js,samples/README.md) | -| Datastream.delete_private_connection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.delete_private_connection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.delete_private_connection.js,samples/README.md) | -| Datastream.delete_route | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.delete_route.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.delete_route.js,samples/README.md) | -| Datastream.delete_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.delete_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.delete_stream.js,samples/README.md) | -| Datastream.discover_connection_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.discover_connection_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.discover_connection_profile.js,samples/README.md) | -| Datastream.fetch_static_ips | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.fetch_static_ips.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.fetch_static_ips.js,samples/README.md) | -| Datastream.get_connection_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.get_connection_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.get_connection_profile.js,samples/README.md) | -| Datastream.get_private_connection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.get_private_connection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.get_private_connection.js,samples/README.md) | -| Datastream.get_route | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.get_route.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.get_route.js,samples/README.md) | -| Datastream.get_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.get_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.get_stream.js,samples/README.md) | -| Datastream.get_stream_object | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.get_stream_object.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.get_stream_object.js,samples/README.md) | -| Datastream.list_connection_profiles | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.list_connection_profiles.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.list_connection_profiles.js,samples/README.md) | -| Datastream.list_private_connections | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.list_private_connections.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.list_private_connections.js,samples/README.md) | -| Datastream.list_routes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.list_routes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.list_routes.js,samples/README.md) | -| Datastream.list_stream_objects | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.list_stream_objects.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.list_stream_objects.js,samples/README.md) | -| Datastream.list_streams | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.list_streams.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.list_streams.js,samples/README.md) | -| Datastream.lookup_stream_object | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.lookup_stream_object.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.lookup_stream_object.js,samples/README.md) | -| Datastream.start_backfill_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.start_backfill_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.start_backfill_job.js,samples/README.md) | -| Datastream.stop_backfill_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.stop_backfill_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.stop_backfill_job.js,samples/README.md) | -| Datastream.update_connection_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.update_connection_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.update_connection_profile.js,samples/README.md) | -| Datastream.update_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.update_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.update_stream.js,samples/README.md) | -| Datastream.create_connection_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.create_connection_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.create_connection_profile.js,samples/README.md) | -| Datastream.create_private_connection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.create_private_connection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.create_private_connection.js,samples/README.md) | -| Datastream.create_route | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.create_route.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.create_route.js,samples/README.md) | -| Datastream.create_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.create_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.create_stream.js,samples/README.md) | -| Datastream.delete_connection_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.delete_connection_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.delete_connection_profile.js,samples/README.md) | -| Datastream.delete_private_connection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.delete_private_connection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.delete_private_connection.js,samples/README.md) | -| Datastream.delete_route | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.delete_route.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.delete_route.js,samples/README.md) | -| Datastream.delete_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.delete_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.delete_stream.js,samples/README.md) | -| Datastream.discover_connection_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.discover_connection_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.discover_connection_profile.js,samples/README.md) | -| Datastream.fetch_errors | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.fetch_errors.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.fetch_errors.js,samples/README.md) | -| Datastream.fetch_static_ips | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.fetch_static_ips.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.fetch_static_ips.js,samples/README.md) | -| Datastream.get_connection_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.get_connection_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.get_connection_profile.js,samples/README.md) | -| Datastream.get_private_connection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.get_private_connection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.get_private_connection.js,samples/README.md) | -| Datastream.get_route | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.get_route.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.get_route.js,samples/README.md) | -| Datastream.get_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.get_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.get_stream.js,samples/README.md) | -| Datastream.list_connection_profiles | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.list_connection_profiles.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.list_connection_profiles.js,samples/README.md) | -| Datastream.list_private_connections | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.list_private_connections.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.list_private_connections.js,samples/README.md) | -| Datastream.list_routes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.list_routes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.list_routes.js,samples/README.md) | -| Datastream.list_streams | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.list_streams.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.list_streams.js,samples/README.md) | -| Datastream.update_connection_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.update_connection_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.update_connection_profile.js,samples/README.md) | -| Datastream.update_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.update_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.update_stream.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/quickstart.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/test/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/test/quickstart.js,samples/README.md) | +| Datastream.create_connection_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.create_connection_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.create_connection_profile.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.create_private_connection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.create_private_connection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.create_private_connection.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.create_route | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.create_route.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.create_route.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.create_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.create_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.create_stream.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.delete_connection_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.delete_connection_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.delete_connection_profile.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.delete_private_connection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.delete_private_connection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.delete_private_connection.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.delete_route | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.delete_route.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.delete_route.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.delete_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.delete_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.delete_stream.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.discover_connection_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.discover_connection_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.discover_connection_profile.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.fetch_static_ips | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.fetch_static_ips.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.fetch_static_ips.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.get_connection_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.get_connection_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.get_connection_profile.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.get_private_connection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.get_private_connection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.get_private_connection.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.get_route | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.get_route.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.get_route.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.get_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.get_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.get_stream.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.get_stream_object | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.get_stream_object.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.get_stream_object.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.list_connection_profiles | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.list_connection_profiles.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.list_connection_profiles.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.list_private_connections | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.list_private_connections.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.list_private_connections.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.list_routes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.list_routes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.list_routes.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.list_stream_objects | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.list_stream_objects.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.list_stream_objects.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.list_streams | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.list_streams.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.list_streams.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.lookup_stream_object | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.lookup_stream_object.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.lookup_stream_object.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.start_backfill_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.start_backfill_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.start_backfill_job.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.stop_backfill_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.stop_backfill_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.stop_backfill_job.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.update_connection_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.update_connection_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.update_connection_profile.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.update_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1/datastream.update_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1/datastream.update_stream.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.create_connection_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.create_connection_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.create_connection_profile.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.create_private_connection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.create_private_connection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.create_private_connection.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.create_route | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.create_route.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.create_route.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.create_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.create_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.create_stream.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.delete_connection_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.delete_connection_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.delete_connection_profile.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.delete_private_connection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.delete_private_connection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.delete_private_connection.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.delete_route | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.delete_route.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.delete_route.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.delete_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.delete_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.delete_stream.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.discover_connection_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.discover_connection_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.discover_connection_profile.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.fetch_errors | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.fetch_errors.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.fetch_errors.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.fetch_static_ips | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.fetch_static_ips.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.fetch_static_ips.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.get_connection_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.get_connection_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.get_connection_profile.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.get_private_connection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.get_private_connection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.get_private_connection.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.get_route | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.get_route.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.get_route.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.get_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.get_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.get_stream.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.list_connection_profiles | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.list_connection_profiles.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.list_connection_profiles.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.list_private_connections | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.list_private_connections.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.list_private_connections.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.list_routes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.list_routes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.list_routes.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.list_streams | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.list_streams.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.list_streams.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.update_connection_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.update_connection_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.update_connection_profile.js,packages/google-cloud-datastream/samples/README.md) | +| Datastream.update_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.update_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/generated/v1alpha1/datastream.update_stream.js,packages/google-cloud-datastream/samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/quickstart.js,packages/google-cloud-datastream/samples/README.md) | diff --git a/packages/google-cloud-datastream/package.json b/packages/google-cloud-datastream/package.json index dbb145e2824..c9cd19c4a99 100644 --- a/packages/google-cloud-datastream/package.json +++ b/packages/google-cloud-datastream/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/datastream", - "version": "2.2.2", + "version": "2.3.0", "description": "datastream client for Node.js", "repository": { "type": "git", @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-datastream" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-datastream/protos/google/cloud/datastream/v1/datastream.proto b/packages/google-cloud-datastream/protos/google/cloud/datastream/v1/datastream.proto index cd977079450..bf0b13f5e2a 100644 --- a/packages/google-cloud-datastream/protos/google/cloud/datastream/v1/datastream.proto +++ b/packages/google-cloud-datastream/protos/google/cloud/datastream/v1/datastream.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -22,6 +22,7 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/datastream/v1/datastream_resources.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; @@ -36,11 +37,13 @@ option ruby_package = "Google::Cloud::Datastream::V1"; // Datastream service service Datastream { option (google.api.default_host) = "datastream.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Use this method to list connection profiles created in a project and // location. - rpc ListConnectionProfiles(ListConnectionProfilesRequest) returns (ListConnectionProfilesResponse) { + rpc ListConnectionProfiles(ListConnectionProfilesRequest) + returns (ListConnectionProfilesResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/connectionProfiles" }; @@ -48,7 +51,8 @@ service Datastream { } // Use this method to get details about a connection profile. - rpc GetConnectionProfile(GetConnectionProfileRequest) returns (ConnectionProfile) { + rpc GetConnectionProfile(GetConnectionProfileRequest) + returns (ConnectionProfile) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/connectionProfiles/*}" }; @@ -56,12 +60,14 @@ service Datastream { } // Use this method to create a connection profile in a project and location. - rpc CreateConnectionProfile(CreateConnectionProfileRequest) returns (google.longrunning.Operation) { + rpc CreateConnectionProfile(CreateConnectionProfileRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/connectionProfiles" body: "connection_profile" }; - option (google.api.method_signature) = "parent,connection_profile,connection_profile_id"; + option (google.api.method_signature) = + "parent,connection_profile,connection_profile_id"; option (google.longrunning.operation_info) = { response_type: "ConnectionProfile" metadata_type: "OperationMetadata" @@ -69,7 +75,8 @@ service Datastream { } // Use this method to update the parameters of a connection profile. - rpc UpdateConnectionProfile(UpdateConnectionProfileRequest) returns (google.longrunning.Operation) { + rpc UpdateConnectionProfile(UpdateConnectionProfileRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1/{connection_profile.name=projects/*/locations/*/connectionProfiles/*}" body: "connection_profile" @@ -82,7 +89,8 @@ service Datastream { } // Use this method to delete a connection profile. - rpc DeleteConnectionProfile(DeleteConnectionProfileRequest) returns (google.longrunning.Operation) { + rpc DeleteConnectionProfile(DeleteConnectionProfileRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/connectionProfiles/*}" }; @@ -97,7 +105,8 @@ service Datastream { // The discover API call exposes the data objects and metadata belonging to // the profile. Typically, a request returns children data objects of a // parent data object that's optionally supplied in the request. - rpc DiscoverConnectionProfile(DiscoverConnectionProfileRequest) returns (DiscoverConnectionProfileResponse) { + rpc DiscoverConnectionProfile(DiscoverConnectionProfileRequest) + returns (DiscoverConnectionProfileResponse) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/connectionProfiles:discover" body: "*" @@ -175,7 +184,8 @@ service Datastream { } // Use this method to list the objects of a specific stream. - rpc ListStreamObjects(ListStreamObjectsRequest) returns (ListStreamObjectsResponse) { + rpc ListStreamObjects(ListStreamObjectsRequest) + returns (ListStreamObjectsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*/streams/*}/objects" }; @@ -183,7 +193,8 @@ service Datastream { } // Use this method to start a backfill job for the specified stream object. - rpc StartBackfillJob(StartBackfillJobRequest) returns (StartBackfillJobResponse) { + rpc StartBackfillJob(StartBackfillJobRequest) + returns (StartBackfillJobResponse) { option (google.api.http) = { post: "/v1/{object=projects/*/locations/*/streams/*/objects/*}:startBackfillJob" body: "*" @@ -192,7 +203,8 @@ service Datastream { } // Use this method to stop a backfill job for the specified stream object. - rpc StopBackfillJob(StopBackfillJobRequest) returns (StopBackfillJobResponse) { + rpc StopBackfillJob(StopBackfillJobRequest) + returns (StopBackfillJobResponse) { option (google.api.http) = { post: "/v1/{object=projects/*/locations/*/streams/*/objects/*}:stopBackfillJob" body: "*" @@ -210,12 +222,14 @@ service Datastream { } // Use this method to create a private connectivity configuration. - rpc CreatePrivateConnection(CreatePrivateConnectionRequest) returns (google.longrunning.Operation) { + rpc CreatePrivateConnection(CreatePrivateConnectionRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/privateConnections" body: "private_connection" }; - option (google.api.method_signature) = "parent,private_connection,private_connection_id"; + option (google.api.method_signature) = + "parent,private_connection,private_connection_id"; option (google.longrunning.operation_info) = { response_type: "PrivateConnection" metadata_type: "OperationMetadata" @@ -223,7 +237,8 @@ service Datastream { } // Use this method to get details about a private connectivity configuration. - rpc GetPrivateConnection(GetPrivateConnectionRequest) returns (PrivateConnection) { + rpc GetPrivateConnection(GetPrivateConnectionRequest) + returns (PrivateConnection) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/privateConnections/*}" }; @@ -232,7 +247,8 @@ service Datastream { // Use this method to list private connectivity configurations in a project // and location. - rpc ListPrivateConnections(ListPrivateConnectionsRequest) returns (ListPrivateConnectionsResponse) { + rpc ListPrivateConnections(ListPrivateConnectionsRequest) + returns (ListPrivateConnectionsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/privateConnections" }; @@ -240,7 +256,8 @@ service Datastream { } // Use this method to delete a private connectivity configuration. - rpc DeletePrivateConnection(DeletePrivateConnectionRequest) returns (google.longrunning.Operation) { + rpc DeletePrivateConnection(DeletePrivateConnectionRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/privateConnections/*}" }; @@ -297,8 +314,8 @@ service Datastream { // Request message for 'discover' ConnectionProfile request. message DiscoverConnectionProfileRequest { - // Required. The parent resource of the connection profile type. Must be in the - // format `projects/*/locations/*`. + // Required. The parent resource of the connection profile type. Must be in + // the format `projects/*/locations/*`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -355,8 +372,8 @@ message DiscoverConnectionProfileResponse { // Request message for 'FetchStaticIps' request. message FetchStaticIpsRequest { - // Required. The resource name for the location for which static IPs should be returned. - // Must be in the format `projects/*/locations/*`. + // Required. The resource name for the location for which static IPs should be + // returned. Must be in the format `projects/*/locations/*`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -449,7 +466,8 @@ message CreateConnectionProfileRequest { string connection_profile_id = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The connection profile resource to create. - ConnectionProfile connection_profile = 3 [(google.api.field_behavior) = REQUIRED]; + ConnectionProfile connection_profile = 3 + [(google.api.field_behavior) = REQUIRED]; // Optional. A request ID to identify requests. Specify a unique request ID // so that if you must retry your request, the server will know to ignore @@ -466,8 +484,8 @@ message CreateConnectionProfileRequest { // not supported (00000000-0000-0000-0000-000000000000). string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Only validate the connection profile, but don't create any resources. - // The default is false. + // Optional. Only validate the connection profile, but don't create any + // resources. The default is false. bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. Create the connection profile without validating it. @@ -481,10 +499,12 @@ message UpdateConnectionProfileRequest { // The fields specified in the update_mask are relative to the resource, not // the full request. A field will be overwritten if it is in the mask. If the // user does not provide a mask then all fields will be overwritten. - google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; // Required. The connection profile to update. - ConnectionProfile connection_profile = 2 [(google.api.field_behavior) = REQUIRED]; + ConnectionProfile connection_profile = 2 + [(google.api.field_behavior) = REQUIRED]; // Optional. A request ID to identify requests. Specify a unique request ID // so that if you must retry your request, the server will know to ignore @@ -501,8 +521,8 @@ message UpdateConnectionProfileRequest { // not supported (00000000-0000-0000-0000-000000000000). string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Only validate the connection profile, but don't update any resources. - // The default is false. + // Optional. Only validate the connection profile, but don't update any + // resources. The default is false. bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. Update the connection profile without validating it. @@ -634,7 +654,8 @@ message UpdateStreamRequest { // The fields specified in the update_mask are relative to the resource, not // the full request. A field will be overwritten if it is in the mask. If the // user does not provide a mask then all fields will be overwritten. - google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; // Required. The stream resource to update. Stream stream = 2 [(google.api.field_behavior) = REQUIRED]; @@ -654,8 +675,8 @@ message UpdateStreamRequest { // not supported (00000000-0000-0000-0000-000000000000). string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Only validate the stream with the changes, without actually updating it. - // The default is false. + // Optional. Only validate the stream with the changes, without actually + // updating it. The default is false. bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. Update the stream without validating it. @@ -711,12 +732,14 @@ message LookupStreamObjectRequest { ]; // Required. The source object identifier which maps to the stream object. - SourceObjectIdentifier source_object_identifier = 2 [(google.api.field_behavior) = REQUIRED]; + SourceObjectIdentifier source_object_identifier = 2 + [(google.api.field_behavior) = REQUIRED]; } // Request for manually initiating a backfill job for a specific stream object. message StartBackfillJobRequest { - // Required. The name of the stream object resource to start a backfill job for. + // Required. The name of the stream object resource to start a backfill job + // for. string object = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -734,7 +757,8 @@ message StartBackfillJobResponse { // Request for manually stopping a running backfill job for a specific stream // object. message StopBackfillJobRequest { - // Required. The name of the stream object resource to stop the backfill job for. + // Required. The name of the stream object resource to stop the backfill job + // for. string object = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -784,10 +808,12 @@ message ListStreamObjectsResponse { // Represents the metadata of the long-running operation. message OperationMetadata { // Output only. The time the operation was created. - google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time the operation finished running. - google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Server-defined resource path for the target of the operation. string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -800,15 +826,17 @@ message OperationMetadata { // Output only. Identifies whether the user has requested cancellation // of the operation. Operations that have successfully been cancelled - // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - // corresponding to `Code.CANCELLED`. + // have [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. API version used to start the operation. string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Results of executed validations if there are any. - ValidationResult validation_result = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + ValidationResult validation_result = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Request for creating a private connection. @@ -825,7 +853,8 @@ message CreatePrivateConnectionRequest { string private_connection_id = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The Private Connectivity resource to create. - PrivateConnection private_connection = 3 [(google.api.field_behavior) = REQUIRED]; + PrivateConnection private_connection = 3 + [(google.api.field_behavior) = REQUIRED]; // Optional. A request ID to identify requests. Specify a unique request ID // so that if you must retry your request, the server will know to ignore @@ -841,11 +870,15 @@ message CreatePrivateConnectionRequest { // The request ID must be a valid UUID with the exception that zero UUID is // not supported (00000000-0000-0000-0000-000000000000). string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, will skip validations. + bool force = 6 [(google.api.field_behavior) = OPTIONAL]; } // Request for listing private connections. message ListPrivateConnectionsRequest { - // Required. The parent that owns the collection of private connectivity configurations. + // Required. The parent that owns the collection of private connectivity + // configurations. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -912,8 +945,8 @@ message DeletePrivateConnectionRequest { // not supported (00000000-0000-0000-0000-000000000000). string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. If set to true, any child routes that belong to this PrivateConnection will - // also be deleted. + // Optional. If set to true, any child routes that belong to this + // PrivateConnection will also be deleted. bool force = 3 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/packages/google-cloud-datastream/protos/google/cloud/datastream/v1/datastream_resources.proto b/packages/google-cloud-datastream/protos/google/cloud/datastream/v1/datastream_resources.proto index 80a8deeaefb..1007939dc8b 100644 --- a/packages/google-cloud-datastream/protos/google/cloud/datastream/v1/datastream_resources.proto +++ b/packages/google-cloud-datastream/protos/google/cloud/datastream/v1/datastream_resources.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -103,14 +103,12 @@ message GcsProfile { } // BigQuery warehouse profile. -message BigQueryProfile { +message BigQueryProfile {} -} - -// Static IP address connectivity. -message StaticServiceIpConnectivity { - -} +// Static IP address connectivity. Used when the source database is configured +// to allow incoming connections from the Datastream public IP addresses +// for the region specified in the connection profile. +message StaticServiceIpConnectivity {} // Forward SSH Tunnel connectivity. message ForwardSshTunnelConnectivity { @@ -181,10 +179,12 @@ message PrivateConnection { string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The create time of the resource. - google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The update time of the resource. - google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Labels. map labels = 4; @@ -195,7 +195,8 @@ message PrivateConnection { // Output only. The state of the Private Connection. State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. In case of error, the details of the error in a user-friendly format. + // Output only. In case of error, the details of the error in a user-friendly + // format. Error error = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; // VPC Peering Config. @@ -226,10 +227,12 @@ message Route { string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The create time of the resource. - google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The update time of the resource. - google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Labels. map labels = 4; @@ -262,8 +265,8 @@ message MysqlSslConfig { // Output only. Indicates whether the client_certificate field is set. bool client_certificate_set = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Input only. PEM-encoded certificate of the CA that signed the source database - // server's certificate. + // Input only. PEM-encoded certificate of the CA that signed the source + // database server's certificate. string ca_certificate = 5 [(google.api.field_behavior) = INPUT_ONLY]; // Output only. Indicates whether the ca_certificate field is set. @@ -282,10 +285,12 @@ message ConnectionProfile { string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The create time of the resource. - google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The update time of the resource. - google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Labels. map labels = 4; @@ -383,14 +388,10 @@ message OracleRdbms { // Oracle data source configuration message OracleSourceConfig { // Configuration to drop large object values. - message DropLargeObjects { - - } + message DropLargeObjects {} // Configuration to stream large object values. - message StreamLargeObjects { - - } + message StreamLargeObjects {} // Oracle objects to include in the stream. OracleRdbms include_objects = 1; @@ -398,16 +399,20 @@ message OracleSourceConfig { // Oracle objects to exclude from the stream. OracleRdbms exclude_objects = 2; - // Maximum number of concurrent CDC tasks. The number should be non negative. - // If not set (or set to 0), the system's default value will be used. + // Maximum number of concurrent CDC tasks. The number should be non-negative. + // If not set (or set to 0), the system's default value is used. int32 max_concurrent_cdc_tasks = 3; + // Maximum number of concurrent backfill tasks. The number should be + // non-negative. If not set (or set to 0), the system's default value is used. + int32 max_concurrent_backfill_tasks = 4; + // The configuration for handle Oracle large objects. oneof large_objects_handling { // Drop large object values. DropLargeObjects drop_large_objects = 100; - // Stream large object values. + // Stream large object values. NOTE: This feature is currently experimental. StreamLargeObjects stream_large_objects = 102; } } @@ -473,13 +478,21 @@ message PostgresqlSourceConfig { // PostgreSQL objects to exclude from the stream. PostgresqlRdbms exclude_objects = 2; - // Required. The name of the logical replication slot that's configured with the - // pgoutput plugin. - string replication_slot = 3 [(google.api.field_behavior) = REQUIRED]; + // Required. Immutable. The name of the logical replication slot that's + // configured with the pgoutput plugin. + string replication_slot = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; - // Required. The name of the publication that includes the set of all tables that are - // defined in the stream's include_objects. + // Required. The name of the publication that includes the set of all tables + // that are defined in the stream's include_objects. string publication = 4 [(google.api.field_behavior) = REQUIRED]; + + // Maximum number of concurrent backfill tasks. The number should be non + // negative. If not set (or set to 0), the system's default value will be + // used. + int32 max_concurrent_backfill_tasks = 5; } // MySQL Column. @@ -544,6 +557,11 @@ message MysqlSourceConfig { // Maximum number of concurrent CDC tasks. The number should be non negative. // If not set (or set to 0), the system's default value will be used. int32 max_concurrent_cdc_tasks = 3; + + // Maximum number of concurrent backfill tasks. The number should be non + // negative. If not set (or set to 0), the system's default value will be + // used. + int32 max_concurrent_backfill_tasks = 4; } // The configuration of the stream source. @@ -571,9 +589,7 @@ message SourceConfig { } // AVRO file format configuration. -message AvroFileFormat { - -} +message AvroFileFormat {} // JSON file format configuration. message JsonFileFormat { @@ -617,7 +633,8 @@ message GcsDestinationConfig { int32 file_rotation_mb = 2; // The maximum duration for which new events are added before a file is - // closed and a new file is created. + // closed and a new file is created. Values within the range of 15-60 seconds + // are allowed. google.protobuf.Duration file_rotation_interval = 3; // File Format that the data should be written in. @@ -630,9 +647,11 @@ message GcsDestinationConfig { } } +// BigQuery destination configuration message BigQueryDestinationConfig { // A single target dataset to which all data will be streamed. message SingleTargetDataset { + // The dataset ID of the target dataset. string dataset_id = 1; } @@ -661,6 +680,7 @@ message BigQueryDestinationConfig { string kms_key_name = 3; } + // The dataset template to use for dynamic dataset creation. DatasetTemplate dataset_template = 2; } @@ -759,18 +779,18 @@ message Stream { } // Backfill strategy to disable automatic backfill for the Stream's objects. - message BackfillNoneStrategy { - - } + message BackfillNoneStrategy {} // Output only. The stream's name. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The creation time of the stream. - google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The last update time of the stream. - google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Labels. map labels = 4; @@ -782,7 +802,8 @@ message Stream { SourceConfig source_config = 6 [(google.api.field_behavior) = REQUIRED]; // Required. Destination connection profile configuration. - DestinationConfig destination_config = 7 [(google.api.field_behavior) = REQUIRED]; + DestinationConfig destination_config = 7 + [(google.api.field_behavior) = REQUIRED]; // The state of the stream. State state = 8; @@ -804,7 +825,8 @@ message Stream { // If provided, it will be used to encrypt the data. // If left blank, data will be encrypted using an internal Stream-specific // encryption key provisioned through KMS. - optional string customer_managed_encryption_key = 10 [(google.api.field_behavior) = IMMUTABLE]; + optional string customer_managed_encryption_key = 10 + [(google.api.field_behavior) = IMMUTABLE]; } // A specific stream object (e.g a specific DB table). @@ -818,10 +840,12 @@ message StreamObject { string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The creation time of the object. - google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The last update time of the object. - google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Required. Display name. string display_name = 5 [(google.api.field_behavior) = REQUIRED]; @@ -930,10 +954,12 @@ message BackfillJob { Trigger trigger = 2; // Output only. Backfill job's start time. - google.protobuf.Timestamp last_start_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp last_start_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Backfill job's end time. - google.protobuf.Timestamp last_end_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp last_end_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Errors which caused the backfill job to fail. repeated Error errors = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/packages/google-cloud-datastream/protos/protos.d.ts b/packages/google-cloud-datastream/protos/protos.d.ts index ce591f8aa3c..d6e511be1be 100644 --- a/packages/google-cloud-datastream/protos/protos.d.ts +++ b/packages/google-cloud-datastream/protos/protos.d.ts @@ -3356,6 +3356,9 @@ export namespace google { /** CreatePrivateConnectionRequest requestId */ requestId?: (string|null); + + /** CreatePrivateConnectionRequest force */ + force?: (boolean|null); } /** Represents a CreatePrivateConnectionRequest. */ @@ -3379,6 +3382,9 @@ export namespace google { /** CreatePrivateConnectionRequest requestId. */ public requestId: string; + /** CreatePrivateConnectionRequest force. */ + public force: boolean; + /** * Creates a new CreatePrivateConnectionRequest instance using the specified properties. * @param [properties] Properties to set @@ -6463,6 +6469,9 @@ export namespace google { /** OracleSourceConfig maxConcurrentCdcTasks */ maxConcurrentCdcTasks?: (number|null); + /** OracleSourceConfig maxConcurrentBackfillTasks */ + maxConcurrentBackfillTasks?: (number|null); + /** OracleSourceConfig dropLargeObjects */ dropLargeObjects?: (google.cloud.datastream.v1.OracleSourceConfig.IDropLargeObjects|null); @@ -6488,6 +6497,9 @@ export namespace google { /** OracleSourceConfig maxConcurrentCdcTasks. */ public maxConcurrentCdcTasks: number; + /** OracleSourceConfig maxConcurrentBackfillTasks. */ + public maxConcurrentBackfillTasks: number; + /** OracleSourceConfig dropLargeObjects. */ public dropLargeObjects?: (google.cloud.datastream.v1.OracleSourceConfig.IDropLargeObjects|null); @@ -7216,6 +7228,9 @@ export namespace google { /** PostgresqlSourceConfig publication */ publication?: (string|null); + + /** PostgresqlSourceConfig maxConcurrentBackfillTasks */ + maxConcurrentBackfillTasks?: (number|null); } /** Represents a PostgresqlSourceConfig. */ @@ -7239,6 +7254,9 @@ export namespace google { /** PostgresqlSourceConfig publication. */ public publication: string; + /** PostgresqlSourceConfig maxConcurrentBackfillTasks. */ + public maxConcurrentBackfillTasks: number; + /** * Creates a new PostgresqlSourceConfig instance using the specified properties. * @param [properties] Properties to set @@ -7764,6 +7782,9 @@ export namespace google { /** MysqlSourceConfig maxConcurrentCdcTasks */ maxConcurrentCdcTasks?: (number|null); + + /** MysqlSourceConfig maxConcurrentBackfillTasks */ + maxConcurrentBackfillTasks?: (number|null); } /** Represents a MysqlSourceConfig. */ @@ -7784,6 +7805,9 @@ export namespace google { /** MysqlSourceConfig maxConcurrentCdcTasks. */ public maxConcurrentCdcTasks: number; + /** MysqlSourceConfig maxConcurrentBackfillTasks. */ + public maxConcurrentBackfillTasks: number; + /** * Creates a new MysqlSourceConfig instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-datastream/protos/protos.js b/packages/google-cloud-datastream/protos/protos.js index 098953c87e5..358f987df6e 100644 --- a/packages/google-cloud-datastream/protos/protos.js +++ b/packages/google-cloud-datastream/protos/protos.js @@ -7610,6 +7610,7 @@ * @property {string|null} [privateConnectionId] CreatePrivateConnectionRequest privateConnectionId * @property {google.cloud.datastream.v1.IPrivateConnection|null} [privateConnection] CreatePrivateConnectionRequest privateConnection * @property {string|null} [requestId] CreatePrivateConnectionRequest requestId + * @property {boolean|null} [force] CreatePrivateConnectionRequest force */ /** @@ -7659,6 +7660,14 @@ */ CreatePrivateConnectionRequest.prototype.requestId = ""; + /** + * CreatePrivateConnectionRequest force. + * @member {boolean} force + * @memberof google.cloud.datastream.v1.CreatePrivateConnectionRequest + * @instance + */ + CreatePrivateConnectionRequest.prototype.force = false; + /** * Creates a new CreatePrivateConnectionRequest instance using the specified properties. * @function create @@ -7691,6 +7700,8 @@ $root.google.cloud.datastream.v1.PrivateConnection.encode(message.privateConnection, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.force); return writer; }; @@ -7741,6 +7752,10 @@ message.requestId = reader.string(); break; } + case 6: { + message.force = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -7790,6 +7805,9 @@ if (message.requestId != null && message.hasOwnProperty("requestId")) if (!$util.isString(message.requestId)) return "requestId: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; return null; }; @@ -7816,6 +7834,8 @@ } if (object.requestId != null) message.requestId = String(object.requestId); + if (object.force != null) + message.force = Boolean(object.force); return message; }; @@ -7837,6 +7857,7 @@ object.privateConnectionId = ""; object.privateConnection = null; object.requestId = ""; + object.force = false; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; @@ -7846,6 +7867,8 @@ object.privateConnection = $root.google.cloud.datastream.v1.PrivateConnection.toObject(message.privateConnection, options); if (message.requestId != null && message.hasOwnProperty("requestId")) object.requestId = message.requestId; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; return object; }; @@ -15437,6 +15460,7 @@ * @property {google.cloud.datastream.v1.IOracleRdbms|null} [includeObjects] OracleSourceConfig includeObjects * @property {google.cloud.datastream.v1.IOracleRdbms|null} [excludeObjects] OracleSourceConfig excludeObjects * @property {number|null} [maxConcurrentCdcTasks] OracleSourceConfig maxConcurrentCdcTasks + * @property {number|null} [maxConcurrentBackfillTasks] OracleSourceConfig maxConcurrentBackfillTasks * @property {google.cloud.datastream.v1.OracleSourceConfig.IDropLargeObjects|null} [dropLargeObjects] OracleSourceConfig dropLargeObjects * @property {google.cloud.datastream.v1.OracleSourceConfig.IStreamLargeObjects|null} [streamLargeObjects] OracleSourceConfig streamLargeObjects */ @@ -15480,6 +15504,14 @@ */ OracleSourceConfig.prototype.maxConcurrentCdcTasks = 0; + /** + * OracleSourceConfig maxConcurrentBackfillTasks. + * @member {number} maxConcurrentBackfillTasks + * @memberof google.cloud.datastream.v1.OracleSourceConfig + * @instance + */ + OracleSourceConfig.prototype.maxConcurrentBackfillTasks = 0; + /** * OracleSourceConfig dropLargeObjects. * @member {google.cloud.datastream.v1.OracleSourceConfig.IDropLargeObjects|null|undefined} dropLargeObjects @@ -15540,6 +15572,8 @@ $root.google.cloud.datastream.v1.OracleRdbms.encode(message.excludeObjects, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.maxConcurrentCdcTasks != null && Object.hasOwnProperty.call(message, "maxConcurrentCdcTasks")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.maxConcurrentCdcTasks); + if (message.maxConcurrentBackfillTasks != null && Object.hasOwnProperty.call(message, "maxConcurrentBackfillTasks")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.maxConcurrentBackfillTasks); if (message.dropLargeObjects != null && Object.hasOwnProperty.call(message, "dropLargeObjects")) $root.google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects.encode(message.dropLargeObjects, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); if (message.streamLargeObjects != null && Object.hasOwnProperty.call(message, "streamLargeObjects")) @@ -15590,6 +15624,10 @@ message.maxConcurrentCdcTasks = reader.int32(); break; } + case 4: { + message.maxConcurrentBackfillTasks = reader.int32(); + break; + } case 100: { message.dropLargeObjects = $root.google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects.decode(reader, reader.uint32()); break; @@ -15647,6 +15685,9 @@ if (message.maxConcurrentCdcTasks != null && message.hasOwnProperty("maxConcurrentCdcTasks")) if (!$util.isInteger(message.maxConcurrentCdcTasks)) return "maxConcurrentCdcTasks: integer expected"; + if (message.maxConcurrentBackfillTasks != null && message.hasOwnProperty("maxConcurrentBackfillTasks")) + if (!$util.isInteger(message.maxConcurrentBackfillTasks)) + return "maxConcurrentBackfillTasks: integer expected"; if (message.dropLargeObjects != null && message.hasOwnProperty("dropLargeObjects")) { properties.largeObjectsHandling = 1; { @@ -15692,6 +15733,8 @@ } if (object.maxConcurrentCdcTasks != null) message.maxConcurrentCdcTasks = object.maxConcurrentCdcTasks | 0; + if (object.maxConcurrentBackfillTasks != null) + message.maxConcurrentBackfillTasks = object.maxConcurrentBackfillTasks | 0; if (object.dropLargeObjects != null) { if (typeof object.dropLargeObjects !== "object") throw TypeError(".google.cloud.datastream.v1.OracleSourceConfig.dropLargeObjects: object expected"); @@ -15722,6 +15765,7 @@ object.includeObjects = null; object.excludeObjects = null; object.maxConcurrentCdcTasks = 0; + object.maxConcurrentBackfillTasks = 0; } if (message.includeObjects != null && message.hasOwnProperty("includeObjects")) object.includeObjects = $root.google.cloud.datastream.v1.OracleRdbms.toObject(message.includeObjects, options); @@ -15729,6 +15773,8 @@ object.excludeObjects = $root.google.cloud.datastream.v1.OracleRdbms.toObject(message.excludeObjects, options); if (message.maxConcurrentCdcTasks != null && message.hasOwnProperty("maxConcurrentCdcTasks")) object.maxConcurrentCdcTasks = message.maxConcurrentCdcTasks; + if (message.maxConcurrentBackfillTasks != null && message.hasOwnProperty("maxConcurrentBackfillTasks")) + object.maxConcurrentBackfillTasks = message.maxConcurrentBackfillTasks; if (message.dropLargeObjects != null && message.hasOwnProperty("dropLargeObjects")) { object.dropLargeObjects = $root.google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects.toObject(message.dropLargeObjects, options); if (options.oneofs) @@ -17216,6 +17262,7 @@ * @property {google.cloud.datastream.v1.IPostgresqlRdbms|null} [excludeObjects] PostgresqlSourceConfig excludeObjects * @property {string|null} [replicationSlot] PostgresqlSourceConfig replicationSlot * @property {string|null} [publication] PostgresqlSourceConfig publication + * @property {number|null} [maxConcurrentBackfillTasks] PostgresqlSourceConfig maxConcurrentBackfillTasks */ /** @@ -17265,6 +17312,14 @@ */ PostgresqlSourceConfig.prototype.publication = ""; + /** + * PostgresqlSourceConfig maxConcurrentBackfillTasks. + * @member {number} maxConcurrentBackfillTasks + * @memberof google.cloud.datastream.v1.PostgresqlSourceConfig + * @instance + */ + PostgresqlSourceConfig.prototype.maxConcurrentBackfillTasks = 0; + /** * Creates a new PostgresqlSourceConfig instance using the specified properties. * @function create @@ -17297,6 +17352,8 @@ writer.uint32(/* id 3, wireType 2 =*/26).string(message.replicationSlot); if (message.publication != null && Object.hasOwnProperty.call(message, "publication")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.publication); + if (message.maxConcurrentBackfillTasks != null && Object.hasOwnProperty.call(message, "maxConcurrentBackfillTasks")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maxConcurrentBackfillTasks); return writer; }; @@ -17347,6 +17404,10 @@ message.publication = reader.string(); break; } + case 5: { + message.maxConcurrentBackfillTasks = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -17398,6 +17459,9 @@ if (message.publication != null && message.hasOwnProperty("publication")) if (!$util.isString(message.publication)) return "publication: string expected"; + if (message.maxConcurrentBackfillTasks != null && message.hasOwnProperty("maxConcurrentBackfillTasks")) + if (!$util.isInteger(message.maxConcurrentBackfillTasks)) + return "maxConcurrentBackfillTasks: integer expected"; return null; }; @@ -17427,6 +17491,8 @@ message.replicationSlot = String(object.replicationSlot); if (object.publication != null) message.publication = String(object.publication); + if (object.maxConcurrentBackfillTasks != null) + message.maxConcurrentBackfillTasks = object.maxConcurrentBackfillTasks | 0; return message; }; @@ -17448,6 +17514,7 @@ object.excludeObjects = null; object.replicationSlot = ""; object.publication = ""; + object.maxConcurrentBackfillTasks = 0; } if (message.includeObjects != null && message.hasOwnProperty("includeObjects")) object.includeObjects = $root.google.cloud.datastream.v1.PostgresqlRdbms.toObject(message.includeObjects, options); @@ -17457,6 +17524,8 @@ object.replicationSlot = message.replicationSlot; if (message.publication != null && message.hasOwnProperty("publication")) object.publication = message.publication; + if (message.maxConcurrentBackfillTasks != null && message.hasOwnProperty("maxConcurrentBackfillTasks")) + object.maxConcurrentBackfillTasks = message.maxConcurrentBackfillTasks; return object; }; @@ -18560,6 +18629,7 @@ * @property {google.cloud.datastream.v1.IMysqlRdbms|null} [includeObjects] MysqlSourceConfig includeObjects * @property {google.cloud.datastream.v1.IMysqlRdbms|null} [excludeObjects] MysqlSourceConfig excludeObjects * @property {number|null} [maxConcurrentCdcTasks] MysqlSourceConfig maxConcurrentCdcTasks + * @property {number|null} [maxConcurrentBackfillTasks] MysqlSourceConfig maxConcurrentBackfillTasks */ /** @@ -18601,6 +18671,14 @@ */ MysqlSourceConfig.prototype.maxConcurrentCdcTasks = 0; + /** + * MysqlSourceConfig maxConcurrentBackfillTasks. + * @member {number} maxConcurrentBackfillTasks + * @memberof google.cloud.datastream.v1.MysqlSourceConfig + * @instance + */ + MysqlSourceConfig.prototype.maxConcurrentBackfillTasks = 0; + /** * Creates a new MysqlSourceConfig instance using the specified properties. * @function create @@ -18631,6 +18709,8 @@ $root.google.cloud.datastream.v1.MysqlRdbms.encode(message.excludeObjects, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.maxConcurrentCdcTasks != null && Object.hasOwnProperty.call(message, "maxConcurrentCdcTasks")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.maxConcurrentCdcTasks); + if (message.maxConcurrentBackfillTasks != null && Object.hasOwnProperty.call(message, "maxConcurrentBackfillTasks")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.maxConcurrentBackfillTasks); return writer; }; @@ -18677,6 +18757,10 @@ message.maxConcurrentCdcTasks = reader.int32(); break; } + case 4: { + message.maxConcurrentBackfillTasks = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -18725,6 +18809,9 @@ if (message.maxConcurrentCdcTasks != null && message.hasOwnProperty("maxConcurrentCdcTasks")) if (!$util.isInteger(message.maxConcurrentCdcTasks)) return "maxConcurrentCdcTasks: integer expected"; + if (message.maxConcurrentBackfillTasks != null && message.hasOwnProperty("maxConcurrentBackfillTasks")) + if (!$util.isInteger(message.maxConcurrentBackfillTasks)) + return "maxConcurrentBackfillTasks: integer expected"; return null; }; @@ -18752,6 +18839,8 @@ } if (object.maxConcurrentCdcTasks != null) message.maxConcurrentCdcTasks = object.maxConcurrentCdcTasks | 0; + if (object.maxConcurrentBackfillTasks != null) + message.maxConcurrentBackfillTasks = object.maxConcurrentBackfillTasks | 0; return message; }; @@ -18772,6 +18861,7 @@ object.includeObjects = null; object.excludeObjects = null; object.maxConcurrentCdcTasks = 0; + object.maxConcurrentBackfillTasks = 0; } if (message.includeObjects != null && message.hasOwnProperty("includeObjects")) object.includeObjects = $root.google.cloud.datastream.v1.MysqlRdbms.toObject(message.includeObjects, options); @@ -18779,6 +18869,8 @@ object.excludeObjects = $root.google.cloud.datastream.v1.MysqlRdbms.toObject(message.excludeObjects, options); if (message.maxConcurrentCdcTasks != null && message.hasOwnProperty("maxConcurrentCdcTasks")) object.maxConcurrentCdcTasks = message.maxConcurrentCdcTasks; + if (message.maxConcurrentBackfillTasks != null && message.hasOwnProperty("maxConcurrentBackfillTasks")) + object.maxConcurrentBackfillTasks = message.maxConcurrentBackfillTasks; return object; }; diff --git a/packages/google-cloud-datastream/protos/protos.json b/packages/google-cloud-datastream/protos/protos.json index 1735d370cb6..23d3888d8c7 100644 --- a/packages/google-cloud-datastream/protos/protos.json +++ b/packages/google-cloud-datastream/protos/protos.json @@ -1208,6 +1208,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "force": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -1968,6 +1975,10 @@ "type": "int32", "id": 3 }, + "maxConcurrentBackfillTasks": { + "type": "int32", + "id": 4 + }, "dropLargeObjects": { "type": "DropLargeObjects", "id": 100 @@ -2071,7 +2082,7 @@ "type": "string", "id": 3, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "IMMUTABLE" } }, "publication": { @@ -2080,6 +2091,10 @@ "options": { "(google.api.field_behavior)": "REQUIRED" } + }, + "maxConcurrentBackfillTasks": { + "type": "int32", + "id": 5 } } }, @@ -2163,6 +2178,10 @@ "maxConcurrentCdcTasks": { "type": "int32", "id": 3 + }, + "maxConcurrentBackfillTasks": { + "type": "int32", + "id": 4 } } }, diff --git a/packages/google-cloud-datastream/samples/README.md b/packages/google-cloud-datastream/samples/README.md index bca158717e0..fd48e19a268 100644 --- a/packages/google-cloud-datastream/samples/README.md +++ b/packages/google-cloud-datastream/samples/README.md @@ -59,7 +59,6 @@ * [Datastream.update_connection_profile](#datastream.update_connection_profile) * [Datastream.update_stream](#datastream.update_stream) * [Quickstart](#quickstart) - * [Quickstart](#quickstart) ## Before you begin @@ -870,23 +869,6 @@ __Usage:__ `node packages/google-cloud-datastream/samples/quickstart.js` ------ - - - - -### Quickstart - -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastream/samples/test/quickstart.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-datastream/samples/test/quickstart.js,samples/README.md) - -__Usage:__ - - -`node packages/google-cloud-datastream/samples/test/quickstart.js` - - diff --git a/packages/google-cloud-datastream/samples/generated/v1/datastream.create_connection_profile.js b/packages/google-cloud-datastream/samples/generated/v1/datastream.create_connection_profile.js index f7af7f4a91c..34ad81ed63b 100644 --- a/packages/google-cloud-datastream/samples/generated/v1/datastream.create_connection_profile.js +++ b/packages/google-cloud-datastream/samples/generated/v1/datastream.create_connection_profile.js @@ -55,8 +55,8 @@ function main(parent, connectionProfileId, connectionProfile) { */ // const requestId = 'abc123' /** - * Optional. Only validate the connection profile, but don't create any resources. - * The default is false. + * Optional. Only validate the connection profile, but don't create any + * resources. The default is false. */ // const validateOnly = true /** diff --git a/packages/google-cloud-datastream/samples/generated/v1/datastream.create_private_connection.js b/packages/google-cloud-datastream/samples/generated/v1/datastream.create_private_connection.js index acfb975e55e..15cbea3137f 100644 --- a/packages/google-cloud-datastream/samples/generated/v1/datastream.create_private_connection.js +++ b/packages/google-cloud-datastream/samples/generated/v1/datastream.create_private_connection.js @@ -54,6 +54,10 @@ function main(parent, privateConnectionId, privateConnection) { * not supported (00000000-0000-0000-0000-000000000000). */ // const requestId = 'abc123' + /** + * Optional. If set to true, will skip validations. + */ + // const force = true // Imports the Datastream library const {DatastreamClient} = require('@google-cloud/datastream').v1; diff --git a/packages/google-cloud-datastream/samples/generated/v1/datastream.delete_private_connection.js b/packages/google-cloud-datastream/samples/generated/v1/datastream.delete_private_connection.js index 312338d1a4e..5ca12d1ac7f 100644 --- a/packages/google-cloud-datastream/samples/generated/v1/datastream.delete_private_connection.js +++ b/packages/google-cloud-datastream/samples/generated/v1/datastream.delete_private_connection.js @@ -47,8 +47,8 @@ function main(name) { */ // const requestId = 'abc123' /** - * Optional. If set to true, any child routes that belong to this PrivateConnection will - * also be deleted. + * Optional. If set to true, any child routes that belong to this + * PrivateConnection will also be deleted. */ // const force = true diff --git a/packages/google-cloud-datastream/samples/generated/v1/datastream.discover_connection_profile.js b/packages/google-cloud-datastream/samples/generated/v1/datastream.discover_connection_profile.js index 781977f5536..3627ae02f73 100644 --- a/packages/google-cloud-datastream/samples/generated/v1/datastream.discover_connection_profile.js +++ b/packages/google-cloud-datastream/samples/generated/v1/datastream.discover_connection_profile.js @@ -29,8 +29,8 @@ function main(parent) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The parent resource of the connection profile type. Must be in the - * format `projects/* /locations/*`. + * Required. The parent resource of the connection profile type. Must be in + * the format `projects/* /locations/*`. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-datastream/samples/generated/v1/datastream.fetch_static_ips.js b/packages/google-cloud-datastream/samples/generated/v1/datastream.fetch_static_ips.js index 8361829619a..fb209ac613b 100644 --- a/packages/google-cloud-datastream/samples/generated/v1/datastream.fetch_static_ips.js +++ b/packages/google-cloud-datastream/samples/generated/v1/datastream.fetch_static_ips.js @@ -29,8 +29,8 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name for the location for which static IPs should be returned. - * Must be in the format `projects/* /locations/*`. + * Required. The resource name for the location for which static IPs should be + * returned. Must be in the format `projects/* /locations/*`. */ // const name = 'abc123' /** diff --git a/packages/google-cloud-datastream/samples/generated/v1/datastream.list_private_connections.js b/packages/google-cloud-datastream/samples/generated/v1/datastream.list_private_connections.js index d67cba691e8..417b8d77b75 100644 --- a/packages/google-cloud-datastream/samples/generated/v1/datastream.list_private_connections.js +++ b/packages/google-cloud-datastream/samples/generated/v1/datastream.list_private_connections.js @@ -29,7 +29,8 @@ function main(parent) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The parent that owns the collection of private connectivity configurations. + * Required. The parent that owns the collection of private connectivity + * configurations. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-datastream/samples/generated/v1/datastream.start_backfill_job.js b/packages/google-cloud-datastream/samples/generated/v1/datastream.start_backfill_job.js index 8211d507edf..8143825d24d 100644 --- a/packages/google-cloud-datastream/samples/generated/v1/datastream.start_backfill_job.js +++ b/packages/google-cloud-datastream/samples/generated/v1/datastream.start_backfill_job.js @@ -29,7 +29,8 @@ function main(object) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the stream object resource to start a backfill job for. + * Required. The name of the stream object resource to start a backfill job + * for. */ // const object = 'abc123' diff --git a/packages/google-cloud-datastream/samples/generated/v1/datastream.stop_backfill_job.js b/packages/google-cloud-datastream/samples/generated/v1/datastream.stop_backfill_job.js index 74db633e5ae..d5d41bf6f0c 100644 --- a/packages/google-cloud-datastream/samples/generated/v1/datastream.stop_backfill_job.js +++ b/packages/google-cloud-datastream/samples/generated/v1/datastream.stop_backfill_job.js @@ -29,7 +29,8 @@ function main(object) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the stream object resource to stop the backfill job for. + * Required. The name of the stream object resource to stop the backfill job + * for. */ // const object = 'abc123' diff --git a/packages/google-cloud-datastream/samples/generated/v1/datastream.update_connection_profile.js b/packages/google-cloud-datastream/samples/generated/v1/datastream.update_connection_profile.js index 84684de0713..1c82f487811 100644 --- a/packages/google-cloud-datastream/samples/generated/v1/datastream.update_connection_profile.js +++ b/packages/google-cloud-datastream/samples/generated/v1/datastream.update_connection_profile.js @@ -55,8 +55,8 @@ function main(connectionProfile) { */ // const requestId = 'abc123' /** - * Optional. Only validate the connection profile, but don't update any resources. - * The default is false. + * Optional. Only validate the connection profile, but don't update any + * resources. The default is false. */ // const validateOnly = true /** diff --git a/packages/google-cloud-datastream/samples/generated/v1/datastream.update_stream.js b/packages/google-cloud-datastream/samples/generated/v1/datastream.update_stream.js index 11a55c08515..dd42264aa24 100644 --- a/packages/google-cloud-datastream/samples/generated/v1/datastream.update_stream.js +++ b/packages/google-cloud-datastream/samples/generated/v1/datastream.update_stream.js @@ -55,8 +55,8 @@ function main(stream) { */ // const requestId = 'abc123' /** - * Optional. Only validate the stream with the changes, without actually updating it. - * The default is false. + * Optional. Only validate the stream with the changes, without actually + * updating it. The default is false. */ // const validateOnly = true /** diff --git a/packages/google-cloud-datastream/samples/generated/v1/snippet_metadata.google.cloud.datastream.v1.json b/packages/google-cloud-datastream/samples/generated/v1/snippet_metadata.google.cloud.datastream.v1.json index e61264d01ff..3088428acad 100644 --- a/packages/google-cloud-datastream/samples/generated/v1/snippet_metadata.google.cloud.datastream.v1.json +++ b/packages/google-cloud-datastream/samples/generated/v1/snippet_metadata.google.cloud.datastream.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datastream", - "version": "2.2.0", + "version": "2.3.0", "language": "TYPESCRIPT", "apis": [ { @@ -734,7 +734,7 @@ "segments": [ { "start": 25, - "end": 53, + "end": 54, "type": "FULL" } ], @@ -774,7 +774,7 @@ "segments": [ { "start": 25, - "end": 53, + "end": 54, "type": "FULL" } ], @@ -862,7 +862,7 @@ "segments": [ { "start": 25, - "end": 78, + "end": 82, "type": "FULL" } ], @@ -886,6 +886,10 @@ { "name": "request_id", "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" } ], "resultType": ".google.longrunning.Operation", @@ -954,7 +958,7 @@ "segments": [ { "start": 25, - "end": 78, + "end": 79, "type": "FULL" } ], diff --git a/packages/google-cloud-datastream/samples/generated/v1alpha1/snippet_metadata.google.cloud.datastream.v1alpha1.json b/packages/google-cloud-datastream/samples/generated/v1alpha1/snippet_metadata.google.cloud.datastream.v1alpha1.json index 015966cd05b..64a6f1075f3 100644 --- a/packages/google-cloud-datastream/samples/generated/v1alpha1/snippet_metadata.google.cloud.datastream.v1alpha1.json +++ b/packages/google-cloud-datastream/samples/generated/v1alpha1/snippet_metadata.google.cloud.datastream.v1alpha1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datastream", - "version": "2.2.0", + "version": "2.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-datastream/samples/package.json b/packages/google-cloud-datastream/samples/package.json index e7549fe9e91..b049d47edd8 100644 --- a/packages/google-cloud-datastream/samples/package.json +++ b/packages/google-cloud-datastream/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/datastream": "^2.2.2" + "@google-cloud/datastream": "^2.3.0" }, "devDependencies": { "c8": "^7.1.0", diff --git a/packages/google-cloud-datastream/src/v1/datastream_client.ts b/packages/google-cloud-datastream/src/v1/datastream_client.ts index 9f2b2eaa1a8..ffa18cd1bca 100644 --- a/packages/google-cloud-datastream/src/v1/datastream_client.ts +++ b/packages/google-cloud-datastream/src/v1/datastream_client.ts @@ -694,8 +694,8 @@ export class DatastreamClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent resource of the connection profile type. Must be in the - * format `projects/* /locations/*`. + * Required. The parent resource of the connection profile type. Must be in + * the format `projects/* /locations/*`. * @param {google.cloud.datastream.v1.ConnectionProfile} request.connectionProfile * An ad-hoc connection profile configuration. * @param {string} request.connectionProfileName @@ -1080,7 +1080,8 @@ export class DatastreamClient { * @param {Object} request * The request object that will be sent. * @param {string} request.object - * Required. The name of the stream object resource to start a backfill job for. + * Required. The name of the stream object resource to start a backfill job + * for. * @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. @@ -1171,7 +1172,8 @@ export class DatastreamClient { * @param {Object} request * The request object that will be sent. * @param {string} request.object - * Required. The name of the stream object resource to stop the backfill job for. + * Required. The name of the stream object resource to stop the backfill job + * for. * @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. @@ -1463,8 +1465,8 @@ export class DatastreamClient { * The request ID must be a valid UUID with the exception that zero UUID is * not supported (00000000-0000-0000-0000-000000000000). * @param {boolean} [request.validateOnly] - * Optional. Only validate the connection profile, but don't create any resources. - * The default is false. + * Optional. Only validate the connection profile, but don't create any + * resources. The default is false. * @param {boolean} [request.force] * Optional. Create the connection profile without validating it. * @param {object} [options] @@ -1630,8 +1632,8 @@ export class DatastreamClient { * The request ID must be a valid UUID with the exception that zero UUID is * not supported (00000000-0000-0000-0000-000000000000). * @param {boolean} [request.validateOnly] - * Optional. Only validate the connection profile, but don't update any resources. - * The default is false. + * Optional. Only validate the connection profile, but don't update any + * resources. The default is false. * @param {boolean} [request.force] * Optional. Update the connection profile without validating it. * @param {object} [options] @@ -2114,8 +2116,8 @@ export class DatastreamClient { * The request ID must be a valid UUID with the exception that zero UUID is * not supported (00000000-0000-0000-0000-000000000000). * @param {boolean} [request.validateOnly] - * Optional. Only validate the stream with the changes, without actually updating it. - * The default is false. + * Optional. Only validate the stream with the changes, without actually + * updating it. The default is false. * @param {boolean} [request.force] * Optional. Update the stream without validating it. * @param {object} [options] @@ -2426,6 +2428,8 @@ export class DatastreamClient { * * The request ID must be a valid UUID with the exception that zero UUID is * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.force] + * Optional. If set to true, will skip validations. * @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. @@ -2583,8 +2587,8 @@ export class DatastreamClient { * The request ID must be a valid UUID with the exception that zero UUID is * not supported (00000000-0000-0000-0000-000000000000). * @param {boolean} [request.force] - * Optional. If set to true, any child routes that belong to this PrivateConnection will - * also be deleted. + * Optional. If set to true, any child routes that belong to this + * PrivateConnection will also be deleted. * @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. @@ -3680,8 +3684,8 @@ export class DatastreamClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The resource name for the location for which static IPs should be returned. - * Must be in the format `projects/* /locations/*`. + * Required. The resource name for the location for which static IPs should be + * returned. Must be in the format `projects/* /locations/*`. * @param {number} request.pageSize * Maximum number of Ips to return, will likely not be specified. * @param {string} request.pageToken @@ -3780,8 +3784,8 @@ export class DatastreamClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The resource name for the location for which static IPs should be returned. - * Must be in the format `projects/* /locations/*`. + * Required. The resource name for the location for which static IPs should be + * returned. Must be in the format `projects/* /locations/*`. * @param {number} request.pageSize * Maximum number of Ips to return, will likely not be specified. * @param {string} request.pageToken @@ -3828,8 +3832,8 @@ export class DatastreamClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The resource name for the location for which static IPs should be returned. - * Must be in the format `projects/* /locations/*`. + * Required. The resource name for the location for which static IPs should be + * returned. Must be in the format `projects/* /locations/*`. * @param {number} request.pageSize * Maximum number of Ips to return, will likely not be specified. * @param {string} request.pageToken @@ -3876,7 +3880,8 @@ export class DatastreamClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent that owns the collection of private connectivity configurations. + * Required. The parent that owns the collection of private connectivity + * configurations. * @param {number} request.pageSize * Maximum number of private connectivity configurations to return. * If unspecified, at most 50 private connectivity configurations that will be @@ -3990,7 +3995,8 @@ export class DatastreamClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent that owns the collection of private connectivity configurations. + * Required. The parent that owns the collection of private connectivity + * configurations. * @param {number} request.pageSize * Maximum number of private connectivity configurations to return. * If unspecified, at most 50 private connectivity configurations that will be @@ -4048,7 +4054,8 @@ export class DatastreamClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent that owns the collection of private connectivity configurations. + * Required. The parent that owns the collection of private connectivity + * configurations. * @param {number} request.pageSize * Maximum number of private connectivity configurations to return. * If unspecified, at most 50 private connectivity configurations that will be diff --git a/packages/google-cloud-deploy/CHANGELOG.md b/packages/google-cloud-deploy/CHANGELOG.md index 1eb63ec3519..4caea32f3fb 100644 --- a/packages/google-cloud-deploy/CHANGELOG.md +++ b/packages/google-cloud-deploy/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.5.0](https://github.com/googleapis/google-cloud-node/compare/deploy-v2.4.1...deploy-v2.5.0) (2023-05-04) + + +### Features + +* [deploy] added support for DeployArtifacts ([#4222](https://github.com/googleapis/google-cloud-node/issues/4222)) ([840390b](https://github.com/googleapis/google-cloud-node/commit/840390b4fdad779617572db6ce54922cb894e667)) + ## [2.4.1](https://github.com/googleapis/google-cloud-node/compare/deploy-v2.4.0...deploy-v2.4.1) (2023-04-13) diff --git a/packages/google-cloud-deploy/package.json b/packages/google-cloud-deploy/package.json index b4e81c234bb..93cf7c44628 100644 --- a/packages/google-cloud-deploy/package.json +++ b/packages/google-cloud-deploy/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/deploy", - "version": "2.4.1", + "version": "2.5.0", "description": "clouddeploy client for Node.js", "repository": { "type": "git", @@ -31,7 +31,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -39,10 +39,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -57,6 +58,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/cloud_deploy.proto b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/cloud_deploy.proto index 295cd61670a..139ca4718dd 100644 --- a/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/cloud_deploy.proto +++ b/packages/google-cloud-deploy/protos/google/cloud/deploy/v1/cloud_deploy.proto @@ -1428,6 +1428,10 @@ message TargetArtifact { // Output only. File path of the rendered manifest relative to the URI. string manifest_path = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. File path of the directory of rendered job manifests + // relative to the URI. This is only set if it is applicable. + string job_manifests_path = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } oneof uri { @@ -1449,6 +1453,18 @@ message TargetArtifact { [(google.api.field_behavior) = OUTPUT_ONLY]; } +// The artifacts produced by a deploy operation. +message DeployArtifact { + // Output only. URI of a directory containing the artifacts. All paths are + // relative to this location. + string artifact_uri = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. File paths of the manifests applied during the deploy + // operation relative to the URI. + repeated string manifest_paths = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + // CloudRunRenderMetadata contains Cloud Run information associated with a // `Release` render. message CloudRunRenderMetadata { @@ -1839,7 +1855,7 @@ message Phase { // Deployment job composition. message DeploymentJobs { - // Output only. The deploy Job. This is the first job run in the phase. + // Output only. The deploy Job. This is the deploy job in the phase. Job deploy_job = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The verify Job. Runs after a deploy if the deploy succeeds. @@ -2312,6 +2328,9 @@ message DeployJobRun { // Output only. Metadata containing information about the deploy job run. DeployJobRunMetadata metadata = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The artifact of a deploy job run, if available. + DeployArtifact artifact = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } // VerifyJobRun contains information specific to a verify `JobRun`. diff --git a/packages/google-cloud-deploy/protos/protos.d.ts b/packages/google-cloud-deploy/protos/protos.d.ts index 693d646745c..e424617c800 100644 --- a/packages/google-cloud-deploy/protos/protos.d.ts +++ b/packages/google-cloud-deploy/protos/protos.d.ts @@ -5774,6 +5774,9 @@ export namespace google { /** PhaseArtifact manifestPath */ manifestPath?: (string|null); + + /** PhaseArtifact jobManifestsPath */ + jobManifestsPath?: (string|null); } /** Represents a PhaseArtifact. */ @@ -5791,6 +5794,9 @@ export namespace google { /** PhaseArtifact manifestPath. */ public manifestPath: string; + /** PhaseArtifact jobManifestsPath. */ + public jobManifestsPath: string; + /** * Creates a new PhaseArtifact instance using the specified properties. * @param [properties] Properties to set @@ -5870,6 +5876,109 @@ export namespace google { } } + /** Properties of a DeployArtifact. */ + interface IDeployArtifact { + + /** DeployArtifact artifactUri */ + artifactUri?: (string|null); + + /** DeployArtifact manifestPaths */ + manifestPaths?: (string[]|null); + } + + /** Represents a DeployArtifact. */ + class DeployArtifact implements IDeployArtifact { + + /** + * Constructs a new DeployArtifact. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.deploy.v1.IDeployArtifact); + + /** DeployArtifact artifactUri. */ + public artifactUri: string; + + /** DeployArtifact manifestPaths. */ + public manifestPaths: string[]; + + /** + * Creates a new DeployArtifact instance using the specified properties. + * @param [properties] Properties to set + * @returns DeployArtifact instance + */ + public static create(properties?: google.cloud.deploy.v1.IDeployArtifact): google.cloud.deploy.v1.DeployArtifact; + + /** + * Encodes the specified DeployArtifact message. Does not implicitly {@link google.cloud.deploy.v1.DeployArtifact.verify|verify} messages. + * @param message DeployArtifact message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.deploy.v1.IDeployArtifact, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeployArtifact message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeployArtifact.verify|verify} messages. + * @param message DeployArtifact message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.deploy.v1.IDeployArtifact, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeployArtifact message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeployArtifact + * @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.deploy.v1.DeployArtifact; + + /** + * Decodes a DeployArtifact message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeployArtifact + * @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.deploy.v1.DeployArtifact; + + /** + * Verifies a DeployArtifact 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 DeployArtifact message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeployArtifact + */ + public static fromObject(object: { [k: string]: any }): google.cloud.deploy.v1.DeployArtifact; + + /** + * Creates a plain object from a DeployArtifact message. Also converts values to other types if specified. + * @param message DeployArtifact + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.deploy.v1.DeployArtifact, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeployArtifact to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeployArtifact + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a CloudRunRenderMetadata. */ interface ICloudRunRenderMetadata { @@ -9881,6 +9990,9 @@ export namespace google { /** DeployJobRun metadata */ metadata?: (google.cloud.deploy.v1.IDeployJobRunMetadata|null); + + /** DeployJobRun artifact */ + artifact?: (google.cloud.deploy.v1.IDeployArtifact|null); } /** Represents a DeployJobRun. */ @@ -9904,6 +10016,9 @@ export namespace google { /** DeployJobRun metadata. */ public metadata?: (google.cloud.deploy.v1.IDeployJobRunMetadata|null); + /** DeployJobRun artifact. */ + public artifact?: (google.cloud.deploy.v1.IDeployArtifact|null); + /** * Creates a new DeployJobRun instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-deploy/protos/protos.js b/packages/google-cloud-deploy/protos/protos.js index 652aee0a15a..7227789a8b3 100644 --- a/packages/google-cloud-deploy/protos/protos.js +++ b/packages/google-cloud-deploy/protos/protos.js @@ -14223,6 +14223,7 @@ * @interface IPhaseArtifact * @property {string|null} [skaffoldConfigPath] PhaseArtifact skaffoldConfigPath * @property {string|null} [manifestPath] PhaseArtifact manifestPath + * @property {string|null} [jobManifestsPath] PhaseArtifact jobManifestsPath */ /** @@ -14256,6 +14257,14 @@ */ PhaseArtifact.prototype.manifestPath = ""; + /** + * PhaseArtifact jobManifestsPath. + * @member {string} jobManifestsPath + * @memberof google.cloud.deploy.v1.TargetArtifact.PhaseArtifact + * @instance + */ + PhaseArtifact.prototype.jobManifestsPath = ""; + /** * Creates a new PhaseArtifact instance using the specified properties. * @function create @@ -14284,6 +14293,8 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.skaffoldConfigPath); if (message.manifestPath != null && Object.hasOwnProperty.call(message, "manifestPath")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.manifestPath); + if (message.jobManifestsPath != null && Object.hasOwnProperty.call(message, "jobManifestsPath")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.jobManifestsPath); return writer; }; @@ -14326,6 +14337,10 @@ message.manifestPath = reader.string(); break; } + case 4: { + message.jobManifestsPath = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -14367,6 +14382,9 @@ if (message.manifestPath != null && message.hasOwnProperty("manifestPath")) if (!$util.isString(message.manifestPath)) return "manifestPath: string expected"; + if (message.jobManifestsPath != null && message.hasOwnProperty("jobManifestsPath")) + if (!$util.isString(message.jobManifestsPath)) + return "jobManifestsPath: string expected"; return null; }; @@ -14386,6 +14404,8 @@ message.skaffoldConfigPath = String(object.skaffoldConfigPath); if (object.manifestPath != null) message.manifestPath = String(object.manifestPath); + if (object.jobManifestsPath != null) + message.jobManifestsPath = String(object.jobManifestsPath); return message; }; @@ -14405,11 +14425,14 @@ if (options.defaults) { object.skaffoldConfigPath = ""; object.manifestPath = ""; + object.jobManifestsPath = ""; } if (message.skaffoldConfigPath != null && message.hasOwnProperty("skaffoldConfigPath")) object.skaffoldConfigPath = message.skaffoldConfigPath; if (message.manifestPath != null && message.hasOwnProperty("manifestPath")) object.manifestPath = message.manifestPath; + if (message.jobManifestsPath != null && message.hasOwnProperty("jobManifestsPath")) + object.jobManifestsPath = message.jobManifestsPath; return object; }; @@ -14445,6 +14468,249 @@ return TargetArtifact; })(); + v1.DeployArtifact = (function() { + + /** + * Properties of a DeployArtifact. + * @memberof google.cloud.deploy.v1 + * @interface IDeployArtifact + * @property {string|null} [artifactUri] DeployArtifact artifactUri + * @property {Array.|null} [manifestPaths] DeployArtifact manifestPaths + */ + + /** + * Constructs a new DeployArtifact. + * @memberof google.cloud.deploy.v1 + * @classdesc Represents a DeployArtifact. + * @implements IDeployArtifact + * @constructor + * @param {google.cloud.deploy.v1.IDeployArtifact=} [properties] Properties to set + */ + function DeployArtifact(properties) { + this.manifestPaths = []; + 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]]; + } + + /** + * DeployArtifact artifactUri. + * @member {string} artifactUri + * @memberof google.cloud.deploy.v1.DeployArtifact + * @instance + */ + DeployArtifact.prototype.artifactUri = ""; + + /** + * DeployArtifact manifestPaths. + * @member {Array.} manifestPaths + * @memberof google.cloud.deploy.v1.DeployArtifact + * @instance + */ + DeployArtifact.prototype.manifestPaths = $util.emptyArray; + + /** + * Creates a new DeployArtifact instance using the specified properties. + * @function create + * @memberof google.cloud.deploy.v1.DeployArtifact + * @static + * @param {google.cloud.deploy.v1.IDeployArtifact=} [properties] Properties to set + * @returns {google.cloud.deploy.v1.DeployArtifact} DeployArtifact instance + */ + DeployArtifact.create = function create(properties) { + return new DeployArtifact(properties); + }; + + /** + * Encodes the specified DeployArtifact message. Does not implicitly {@link google.cloud.deploy.v1.DeployArtifact.verify|verify} messages. + * @function encode + * @memberof google.cloud.deploy.v1.DeployArtifact + * @static + * @param {google.cloud.deploy.v1.IDeployArtifact} message DeployArtifact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployArtifact.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.artifactUri != null && Object.hasOwnProperty.call(message, "artifactUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.artifactUri); + if (message.manifestPaths != null && message.manifestPaths.length) + for (var i = 0; i < message.manifestPaths.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.manifestPaths[i]); + return writer; + }; + + /** + * Encodes the specified DeployArtifact message, length delimited. Does not implicitly {@link google.cloud.deploy.v1.DeployArtifact.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.deploy.v1.DeployArtifact + * @static + * @param {google.cloud.deploy.v1.IDeployArtifact} message DeployArtifact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployArtifact.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeployArtifact message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.deploy.v1.DeployArtifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.deploy.v1.DeployArtifact} DeployArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeployArtifact.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.deploy.v1.DeployArtifact(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.artifactUri = reader.string(); + break; + } + case 2: { + if (!(message.manifestPaths && message.manifestPaths.length)) + message.manifestPaths = []; + message.manifestPaths.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeployArtifact message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.deploy.v1.DeployArtifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.deploy.v1.DeployArtifact} DeployArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeployArtifact.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeployArtifact message. + * @function verify + * @memberof google.cloud.deploy.v1.DeployArtifact + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeployArtifact.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.artifactUri != null && message.hasOwnProperty("artifactUri")) + if (!$util.isString(message.artifactUri)) + return "artifactUri: string expected"; + if (message.manifestPaths != null && message.hasOwnProperty("manifestPaths")) { + if (!Array.isArray(message.manifestPaths)) + return "manifestPaths: array expected"; + for (var i = 0; i < message.manifestPaths.length; ++i) + if (!$util.isString(message.manifestPaths[i])) + return "manifestPaths: string[] expected"; + } + return null; + }; + + /** + * Creates a DeployArtifact message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.deploy.v1.DeployArtifact + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.deploy.v1.DeployArtifact} DeployArtifact + */ + DeployArtifact.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.deploy.v1.DeployArtifact) + return object; + var message = new $root.google.cloud.deploy.v1.DeployArtifact(); + if (object.artifactUri != null) + message.artifactUri = String(object.artifactUri); + if (object.manifestPaths) { + if (!Array.isArray(object.manifestPaths)) + throw TypeError(".google.cloud.deploy.v1.DeployArtifact.manifestPaths: array expected"); + message.manifestPaths = []; + for (var i = 0; i < object.manifestPaths.length; ++i) + message.manifestPaths[i] = String(object.manifestPaths[i]); + } + return message; + }; + + /** + * Creates a plain object from a DeployArtifact message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.deploy.v1.DeployArtifact + * @static + * @param {google.cloud.deploy.v1.DeployArtifact} message DeployArtifact + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeployArtifact.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.manifestPaths = []; + if (options.defaults) + object.artifactUri = ""; + if (message.artifactUri != null && message.hasOwnProperty("artifactUri")) + object.artifactUri = message.artifactUri; + if (message.manifestPaths && message.manifestPaths.length) { + object.manifestPaths = []; + for (var j = 0; j < message.manifestPaths.length; ++j) + object.manifestPaths[j] = message.manifestPaths[j]; + } + return object; + }; + + /** + * Converts this DeployArtifact to JSON. + * @function toJSON + * @memberof google.cloud.deploy.v1.DeployArtifact + * @instance + * @returns {Object.} JSON object + */ + DeployArtifact.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeployArtifact + * @function getTypeUrl + * @memberof google.cloud.deploy.v1.DeployArtifact + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeployArtifact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.deploy.v1.DeployArtifact"; + }; + + return DeployArtifact; + })(); + v1.CloudRunRenderMetadata = (function() { /** @@ -24231,6 +24497,7 @@ * @property {google.cloud.deploy.v1.DeployJobRun.FailureCause|null} [failureCause] DeployJobRun failureCause * @property {string|null} [failureMessage] DeployJobRun failureMessage * @property {google.cloud.deploy.v1.IDeployJobRunMetadata|null} [metadata] DeployJobRun metadata + * @property {google.cloud.deploy.v1.IDeployArtifact|null} [artifact] DeployJobRun artifact */ /** @@ -24280,6 +24547,14 @@ */ DeployJobRun.prototype.metadata = null; + /** + * DeployJobRun artifact. + * @member {google.cloud.deploy.v1.IDeployArtifact|null|undefined} artifact + * @memberof google.cloud.deploy.v1.DeployJobRun + * @instance + */ + DeployJobRun.prototype.artifact = null; + /** * Creates a new DeployJobRun instance using the specified properties. * @function create @@ -24312,6 +24587,8 @@ writer.uint32(/* id 3, wireType 2 =*/26).string(message.failureMessage); if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) $root.google.cloud.deploy.v1.DeployJobRunMetadata.encode(message.metadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.artifact != null && Object.hasOwnProperty.call(message, "artifact")) + $root.google.cloud.deploy.v1.DeployArtifact.encode(message.artifact, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -24362,6 +24639,10 @@ message.metadata = $root.google.cloud.deploy.v1.DeployJobRunMetadata.decode(reader, reader.uint32()); break; } + case 5: { + message.artifact = $root.google.cloud.deploy.v1.DeployArtifact.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -24420,6 +24701,11 @@ if (error) return "metadata." + error; } + if (message.artifact != null && message.hasOwnProperty("artifact")) { + var error = $root.google.cloud.deploy.v1.DeployArtifact.verify(message.artifact); + if (error) + return "artifact." + error; + } return null; }; @@ -24476,6 +24762,11 @@ throw TypeError(".google.cloud.deploy.v1.DeployJobRun.metadata: object expected"); message.metadata = $root.google.cloud.deploy.v1.DeployJobRunMetadata.fromObject(object.metadata); } + if (object.artifact != null) { + if (typeof object.artifact !== "object") + throw TypeError(".google.cloud.deploy.v1.DeployJobRun.artifact: object expected"); + message.artifact = $root.google.cloud.deploy.v1.DeployArtifact.fromObject(object.artifact); + } return message; }; @@ -24497,6 +24788,7 @@ object.failureCause = options.enums === String ? "FAILURE_CAUSE_UNSPECIFIED" : 0; object.failureMessage = ""; object.metadata = null; + object.artifact = null; } if (message.build != null && message.hasOwnProperty("build")) object.build = message.build; @@ -24506,6 +24798,8 @@ object.failureMessage = message.failureMessage; if (message.metadata != null && message.hasOwnProperty("metadata")) object.metadata = $root.google.cloud.deploy.v1.DeployJobRunMetadata.toObject(message.metadata, options); + if (message.artifact != null && message.hasOwnProperty("artifact")) + object.artifact = $root.google.cloud.deploy.v1.DeployArtifact.toObject(message.artifact, options); return object; }; diff --git a/packages/google-cloud-deploy/protos/protos.json b/packages/google-cloud-deploy/protos/protos.json index aacb4cdb207..9aab411bbba 100644 --- a/packages/google-cloud-deploy/protos/protos.json +++ b/packages/google-cloud-deploy/protos/protos.json @@ -1911,11 +1911,37 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "jobManifestsPath": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } } } }, + "DeployArtifact": { + "fields": { + "artifactUri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "manifestPaths": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, "CloudRunRenderMetadata": { "fields": { "service": { @@ -2925,6 +2951,13 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "artifact": { + "type": "DeployArtifact", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { diff --git a/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json b/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json index 866b142cce6..4f3cd8063f1 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json +++ b/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-deploy", - "version": "2.4.0", + "version": "2.5.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-deploy/samples/package.json b/packages/google-cloud-deploy/samples/package.json index 5eb1fd775ef..ff7bb9287d3 100644 --- a/packages/google-cloud-deploy/samples/package.json +++ b/packages/google-cloud-deploy/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/deploy": "^2.4.1" + "@google-cloud/deploy": "^2.5.0" }, "devDependencies": { "c8": "^7.1.0", diff --git a/packages/google-cloud-dialogflow-cx/CHANGELOG.md b/packages/google-cloud-dialogflow-cx/CHANGELOG.md index 7d518763ed8..49220b088fc 100644 --- a/packages/google-cloud-dialogflow-cx/CHANGELOG.md +++ b/packages/google-cloud-dialogflow-cx/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [3.5.0](https://github.com/googleapis/google-cloud-node/compare/dialogflow-cx-v3.4.2...dialogflow-cx-v3.5.0) (2023-05-11) + + +### Features + +* [dialogflow-cx] extended CreateAgent timeout to 180 seconds ([22d6aa5](https://github.com/googleapis/google-cloud-node/commit/22d6aa5a2d9386ea5663672a4bfa8feff1f00eb7)) +* [dialogflow-cx] extended CreateAgent timeout to 180 seconds ([#4253](https://github.com/googleapis/google-cloud-node/issues/4253)) ([22d6aa5](https://github.com/googleapis/google-cloud-node/commit/22d6aa5a2d9386ea5663672a4bfa8feff1f00eb7)) +* Added debug info to StreamingDetectIntent ([22d6aa5](https://github.com/googleapis/google-cloud-node/commit/22d6aa5a2d9386ea5663672a4bfa8feff1f00eb7)) +* Added debug info to StreamingDetectIntent ([22d6aa5](https://github.com/googleapis/google-cloud-node/commit/22d6aa5a2d9386ea5663672a4bfa8feff1f00eb7)) +* Added dtmf digits to WebhookRequest ([22d6aa5](https://github.com/googleapis/google-cloud-node/commit/22d6aa5a2d9386ea5663672a4bfa8feff1f00eb7)) +* Added dtmf digits to WebhookRequest ([22d6aa5](https://github.com/googleapis/google-cloud-node/commit/22d6aa5a2d9386ea5663672a4bfa8feff1f00eb7)) +* Added FLOW as a new DiffType in TestRunDifference ([22d6aa5](https://github.com/googleapis/google-cloud-node/commit/22d6aa5a2d9386ea5663672a4bfa8feff1f00eb7)) +* Added FLOW as a new DiffType in TestRunDifference ([22d6aa5](https://github.com/googleapis/google-cloud-node/commit/22d6aa5a2d9386ea5663672a4bfa8feff1f00eb7)) + ## [3.4.2](https://github.com/googleapis/google-cloud-node/compare/dialogflow-cx-v3.4.1...dialogflow-cx-v3.4.2) (2023-04-13) diff --git a/packages/google-cloud-dialogflow-cx/README.md b/packages/google-cloud-dialogflow-cx/README.md index 6fd9b9de487..fce4f8251dd 100644 --- a/packages/google-cloud-dialogflow-cx/README.md +++ b/packages/google-cloud-dialogflow-cx/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Dialogflow CX API: Node.js Client](https://github.com/googleapis/google-cloud-node) +# [Dialogflow CX API: Node.js Client](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-dialogflow-cx) [![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/dialogflow-cx.svg)](https://www.npmjs.org/package/@google-cloud/dialogflow-cx) @@ -134,206 +134,205 @@ detectIntentAudio(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-dialogflow-cx/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Agents.create_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.create_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.create_agent.js,samples/README.md) | -| Agents.delete_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.delete_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.delete_agent.js,samples/README.md) | -| Agents.export_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.export_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.export_agent.js,samples/README.md) | -| Agents.get_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.get_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.get_agent.js,samples/README.md) | -| Agents.get_agent_validation_result | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.get_agent_validation_result.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.get_agent_validation_result.js,samples/README.md) | -| Agents.list_agents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.list_agents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.list_agents.js,samples/README.md) | -| Agents.restore_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.restore_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.restore_agent.js,samples/README.md) | -| Agents.update_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.update_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.update_agent.js,samples/README.md) | -| Agents.validate_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.validate_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.validate_agent.js,samples/README.md) | -| Changelogs.get_changelog | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/changelogs.get_changelog.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/changelogs.get_changelog.js,samples/README.md) | -| Changelogs.list_changelogs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/changelogs.list_changelogs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/changelogs.list_changelogs.js,samples/README.md) | -| Deployments.get_deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/deployments.get_deployment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/deployments.get_deployment.js,samples/README.md) | -| Deployments.list_deployments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/deployments.list_deployments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/deployments.list_deployments.js,samples/README.md) | -| Entity_types.create_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/entity_types.create_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/entity_types.create_entity_type.js,samples/README.md) | -| Entity_types.delete_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/entity_types.delete_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/entity_types.delete_entity_type.js,samples/README.md) | -| Entity_types.get_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/entity_types.get_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/entity_types.get_entity_type.js,samples/README.md) | -| Entity_types.list_entity_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/entity_types.list_entity_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/entity_types.list_entity_types.js,samples/README.md) | -| Entity_types.update_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/entity_types.update_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/entity_types.update_entity_type.js,samples/README.md) | -| Environments.create_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.create_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.create_environment.js,samples/README.md) | -| Environments.delete_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.delete_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.delete_environment.js,samples/README.md) | -| Environments.deploy_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.deploy_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.deploy_flow.js,samples/README.md) | -| Environments.get_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.get_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.get_environment.js,samples/README.md) | -| Environments.list_continuous_test_results | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.list_continuous_test_results.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.list_continuous_test_results.js,samples/README.md) | -| Environments.list_environments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.list_environments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.list_environments.js,samples/README.md) | -| Environments.lookup_environment_history | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.lookup_environment_history.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.lookup_environment_history.js,samples/README.md) | -| Environments.run_continuous_test | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.run_continuous_test.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.run_continuous_test.js,samples/README.md) | -| Environments.update_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.update_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.update_environment.js,samples/README.md) | -| Experiments.create_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.create_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.create_experiment.js,samples/README.md) | -| Experiments.delete_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.delete_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.delete_experiment.js,samples/README.md) | -| Experiments.get_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.get_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.get_experiment.js,samples/README.md) | -| Experiments.list_experiments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.list_experiments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.list_experiments.js,samples/README.md) | -| Experiments.start_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.start_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.start_experiment.js,samples/README.md) | -| Experiments.stop_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.stop_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.stop_experiment.js,samples/README.md) | -| Experiments.update_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.update_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.update_experiment.js,samples/README.md) | -| Flows.create_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.create_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.create_flow.js,samples/README.md) | -| Flows.delete_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.delete_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.delete_flow.js,samples/README.md) | -| Flows.export_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.export_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.export_flow.js,samples/README.md) | -| Flows.get_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.get_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.get_flow.js,samples/README.md) | -| Flows.get_flow_validation_result | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.get_flow_validation_result.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.get_flow_validation_result.js,samples/README.md) | -| Flows.import_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.import_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.import_flow.js,samples/README.md) | -| Flows.list_flows | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.list_flows.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.list_flows.js,samples/README.md) | -| Flows.train_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.train_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.train_flow.js,samples/README.md) | -| Flows.update_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.update_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.update_flow.js,samples/README.md) | -| Flows.validate_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.validate_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.validate_flow.js,samples/README.md) | -| Intents.create_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.create_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.create_intent.js,samples/README.md) | -| Intents.delete_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.delete_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.delete_intent.js,samples/README.md) | -| Intents.get_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.get_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.get_intent.js,samples/README.md) | -| Intents.list_intents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.list_intents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.list_intents.js,samples/README.md) | -| Intents.update_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.update_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.update_intent.js,samples/README.md) | -| Pages.create_page | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/pages.create_page.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/pages.create_page.js,samples/README.md) | -| Pages.delete_page | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/pages.delete_page.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/pages.delete_page.js,samples/README.md) | -| Pages.get_page | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/pages.get_page.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/pages.get_page.js,samples/README.md) | -| Pages.list_pages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/pages.list_pages.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/pages.list_pages.js,samples/README.md) | -| Pages.update_page | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/pages.update_page.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/pages.update_page.js,samples/README.md) | -| Security_settings_service.create_security_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/security_settings_service.create_security_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/security_settings_service.create_security_settings.js,samples/README.md) | -| Security_settings_service.delete_security_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/security_settings_service.delete_security_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/security_settings_service.delete_security_settings.js,samples/README.md) | -| Security_settings_service.get_security_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/security_settings_service.get_security_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/security_settings_service.get_security_settings.js,samples/README.md) | -| Security_settings_service.list_security_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/security_settings_service.list_security_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/security_settings_service.list_security_settings.js,samples/README.md) | -| Security_settings_service.update_security_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/security_settings_service.update_security_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/security_settings_service.update_security_settings.js,samples/README.md) | -| Session_entity_types.create_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/session_entity_types.create_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/session_entity_types.create_session_entity_type.js,samples/README.md) | -| Session_entity_types.delete_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/session_entity_types.delete_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/session_entity_types.delete_session_entity_type.js,samples/README.md) | -| Session_entity_types.get_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/session_entity_types.get_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/session_entity_types.get_session_entity_type.js,samples/README.md) | -| Session_entity_types.list_session_entity_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/session_entity_types.list_session_entity_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/session_entity_types.list_session_entity_types.js,samples/README.md) | -| Session_entity_types.update_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/session_entity_types.update_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/session_entity_types.update_session_entity_type.js,samples/README.md) | -| Sessions.detect_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.detect_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.detect_intent.js,samples/README.md) | -| Sessions.fulfill_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.fulfill_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.fulfill_intent.js,samples/README.md) | -| Sessions.match_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.match_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.match_intent.js,samples/README.md) | -| Sessions.streaming_detect_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.streaming_detect_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.streaming_detect_intent.js,samples/README.md) | -| Test_cases.batch_delete_test_cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.batch_delete_test_cases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.batch_delete_test_cases.js,samples/README.md) | -| Test_cases.batch_run_test_cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.batch_run_test_cases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.batch_run_test_cases.js,samples/README.md) | -| Test_cases.calculate_coverage | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.calculate_coverage.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.calculate_coverage.js,samples/README.md) | -| Test_cases.create_test_case | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.create_test_case.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.create_test_case.js,samples/README.md) | -| Test_cases.export_test_cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.export_test_cases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.export_test_cases.js,samples/README.md) | -| Test_cases.get_test_case | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.get_test_case.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.get_test_case.js,samples/README.md) | -| Test_cases.get_test_case_result | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.get_test_case_result.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.get_test_case_result.js,samples/README.md) | -| Test_cases.import_test_cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.import_test_cases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.import_test_cases.js,samples/README.md) | -| Test_cases.list_test_case_results | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.list_test_case_results.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.list_test_case_results.js,samples/README.md) | -| Test_cases.list_test_cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.list_test_cases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.list_test_cases.js,samples/README.md) | -| Test_cases.run_test_case | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.run_test_case.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.run_test_case.js,samples/README.md) | -| Test_cases.update_test_case | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.update_test_case.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.update_test_case.js,samples/README.md) | -| Transition_route_groups.create_transition_route_group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/transition_route_groups.create_transition_route_group.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/transition_route_groups.create_transition_route_group.js,samples/README.md) | -| Transition_route_groups.delete_transition_route_group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/transition_route_groups.delete_transition_route_group.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/transition_route_groups.delete_transition_route_group.js,samples/README.md) | -| Transition_route_groups.get_transition_route_group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/transition_route_groups.get_transition_route_group.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/transition_route_groups.get_transition_route_group.js,samples/README.md) | -| Transition_route_groups.list_transition_route_groups | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/transition_route_groups.list_transition_route_groups.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/transition_route_groups.list_transition_route_groups.js,samples/README.md) | -| Transition_route_groups.update_transition_route_group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/transition_route_groups.update_transition_route_group.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/transition_route_groups.update_transition_route_group.js,samples/README.md) | -| Versions.compare_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.compare_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.compare_versions.js,samples/README.md) | -| Versions.create_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.create_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.create_version.js,samples/README.md) | -| Versions.delete_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.delete_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.delete_version.js,samples/README.md) | -| Versions.get_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.get_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.get_version.js,samples/README.md) | -| Versions.list_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.list_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.list_versions.js,samples/README.md) | -| Versions.load_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.load_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.load_version.js,samples/README.md) | -| Versions.update_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.update_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.update_version.js,samples/README.md) | -| Webhooks.create_webhook | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/webhooks.create_webhook.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/webhooks.create_webhook.js,samples/README.md) | -| Webhooks.delete_webhook | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/webhooks.delete_webhook.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/webhooks.delete_webhook.js,samples/README.md) | -| Webhooks.get_webhook | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/webhooks.get_webhook.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/webhooks.get_webhook.js,samples/README.md) | -| Webhooks.list_webhooks | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/webhooks.list_webhooks.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/webhooks.list_webhooks.js,samples/README.md) | -| Webhooks.update_webhook | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/webhooks.update_webhook.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/webhooks.update_webhook.js,samples/README.md) | -| Agents.create_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.create_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.create_agent.js,samples/README.md) | -| Agents.delete_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.delete_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.delete_agent.js,samples/README.md) | -| Agents.export_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.export_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.export_agent.js,samples/README.md) | -| Agents.get_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.get_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.get_agent.js,samples/README.md) | -| Agents.get_agent_validation_result | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.get_agent_validation_result.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.get_agent_validation_result.js,samples/README.md) | -| Agents.list_agents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.list_agents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.list_agents.js,samples/README.md) | -| Agents.restore_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.restore_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.restore_agent.js,samples/README.md) | -| Agents.update_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.update_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.update_agent.js,samples/README.md) | -| Agents.validate_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.validate_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.validate_agent.js,samples/README.md) | -| Changelogs.get_changelog | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/changelogs.get_changelog.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/changelogs.get_changelog.js,samples/README.md) | -| Changelogs.list_changelogs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/changelogs.list_changelogs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/changelogs.list_changelogs.js,samples/README.md) | -| Deployments.get_deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/deployments.get_deployment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/deployments.get_deployment.js,samples/README.md) | -| Deployments.list_deployments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/deployments.list_deployments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/deployments.list_deployments.js,samples/README.md) | -| Entity_types.create_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/entity_types.create_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/entity_types.create_entity_type.js,samples/README.md) | -| Entity_types.delete_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/entity_types.delete_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/entity_types.delete_entity_type.js,samples/README.md) | -| Entity_types.get_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/entity_types.get_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/entity_types.get_entity_type.js,samples/README.md) | -| Entity_types.list_entity_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/entity_types.list_entity_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/entity_types.list_entity_types.js,samples/README.md) | -| Entity_types.update_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/entity_types.update_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/entity_types.update_entity_type.js,samples/README.md) | -| Environments.create_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.create_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.create_environment.js,samples/README.md) | -| Environments.delete_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.delete_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.delete_environment.js,samples/README.md) | -| Environments.deploy_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.deploy_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.deploy_flow.js,samples/README.md) | -| Environments.get_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.get_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.get_environment.js,samples/README.md) | -| Environments.list_continuous_test_results | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.list_continuous_test_results.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.list_continuous_test_results.js,samples/README.md) | -| Environments.list_environments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.list_environments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.list_environments.js,samples/README.md) | -| Environments.lookup_environment_history | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.lookup_environment_history.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.lookup_environment_history.js,samples/README.md) | -| Environments.run_continuous_test | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.run_continuous_test.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.run_continuous_test.js,samples/README.md) | -| Environments.update_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.update_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.update_environment.js,samples/README.md) | -| Experiments.create_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.create_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.create_experiment.js,samples/README.md) | -| Experiments.delete_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.delete_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.delete_experiment.js,samples/README.md) | -| Experiments.get_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.get_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.get_experiment.js,samples/README.md) | -| Experiments.list_experiments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.list_experiments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.list_experiments.js,samples/README.md) | -| Experiments.start_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.start_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.start_experiment.js,samples/README.md) | -| Experiments.stop_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.stop_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.stop_experiment.js,samples/README.md) | -| Experiments.update_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.update_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.update_experiment.js,samples/README.md) | -| Flows.create_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.create_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.create_flow.js,samples/README.md) | -| Flows.delete_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.delete_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.delete_flow.js,samples/README.md) | -| Flows.export_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.export_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.export_flow.js,samples/README.md) | -| Flows.get_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.get_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.get_flow.js,samples/README.md) | -| Flows.get_flow_validation_result | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.get_flow_validation_result.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.get_flow_validation_result.js,samples/README.md) | -| Flows.import_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.import_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.import_flow.js,samples/README.md) | -| Flows.list_flows | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.list_flows.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.list_flows.js,samples/README.md) | -| Flows.train_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.train_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.train_flow.js,samples/README.md) | -| Flows.update_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.update_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.update_flow.js,samples/README.md) | -| Flows.validate_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.validate_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.validate_flow.js,samples/README.md) | -| Intents.create_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.create_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.create_intent.js,samples/README.md) | -| Intents.delete_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.delete_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.delete_intent.js,samples/README.md) | -| Intents.get_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.get_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.get_intent.js,samples/README.md) | -| Intents.list_intents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.list_intents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.list_intents.js,samples/README.md) | -| Intents.update_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.update_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.update_intent.js,samples/README.md) | -| Pages.create_page | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/pages.create_page.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/pages.create_page.js,samples/README.md) | -| Pages.delete_page | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/pages.delete_page.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/pages.delete_page.js,samples/README.md) | -| Pages.get_page | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/pages.get_page.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/pages.get_page.js,samples/README.md) | -| Pages.list_pages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/pages.list_pages.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/pages.list_pages.js,samples/README.md) | -| Pages.update_page | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/pages.update_page.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/pages.update_page.js,samples/README.md) | -| Security_settings_service.create_security_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/security_settings_service.create_security_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/security_settings_service.create_security_settings.js,samples/README.md) | -| Security_settings_service.delete_security_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/security_settings_service.delete_security_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/security_settings_service.delete_security_settings.js,samples/README.md) | -| Security_settings_service.get_security_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/security_settings_service.get_security_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/security_settings_service.get_security_settings.js,samples/README.md) | -| Security_settings_service.list_security_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/security_settings_service.list_security_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/security_settings_service.list_security_settings.js,samples/README.md) | -| Security_settings_service.update_security_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/security_settings_service.update_security_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/security_settings_service.update_security_settings.js,samples/README.md) | -| Session_entity_types.create_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/session_entity_types.create_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/session_entity_types.create_session_entity_type.js,samples/README.md) | -| Session_entity_types.delete_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/session_entity_types.delete_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/session_entity_types.delete_session_entity_type.js,samples/README.md) | -| Session_entity_types.get_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/session_entity_types.get_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/session_entity_types.get_session_entity_type.js,samples/README.md) | -| Session_entity_types.list_session_entity_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/session_entity_types.list_session_entity_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/session_entity_types.list_session_entity_types.js,samples/README.md) | -| Session_entity_types.update_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/session_entity_types.update_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/session_entity_types.update_session_entity_type.js,samples/README.md) | -| Sessions.detect_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.detect_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.detect_intent.js,samples/README.md) | -| Sessions.fulfill_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.fulfill_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.fulfill_intent.js,samples/README.md) | -| Sessions.match_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.match_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.match_intent.js,samples/README.md) | -| Sessions.streaming_detect_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.streaming_detect_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.streaming_detect_intent.js,samples/README.md) | -| Test_cases.batch_delete_test_cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.batch_delete_test_cases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.batch_delete_test_cases.js,samples/README.md) | -| Test_cases.batch_run_test_cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.batch_run_test_cases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.batch_run_test_cases.js,samples/README.md) | -| Test_cases.calculate_coverage | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.calculate_coverage.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.calculate_coverage.js,samples/README.md) | -| Test_cases.create_test_case | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.create_test_case.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.create_test_case.js,samples/README.md) | -| Test_cases.export_test_cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.export_test_cases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.export_test_cases.js,samples/README.md) | -| Test_cases.get_test_case | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.get_test_case.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.get_test_case.js,samples/README.md) | -| Test_cases.get_test_case_result | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.get_test_case_result.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.get_test_case_result.js,samples/README.md) | -| Test_cases.import_test_cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.import_test_cases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.import_test_cases.js,samples/README.md) | -| Test_cases.list_test_case_results | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.list_test_case_results.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.list_test_case_results.js,samples/README.md) | -| Test_cases.list_test_cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.list_test_cases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.list_test_cases.js,samples/README.md) | -| Test_cases.run_test_case | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.run_test_case.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.run_test_case.js,samples/README.md) | -| Test_cases.update_test_case | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.update_test_case.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.update_test_case.js,samples/README.md) | -| Transition_route_groups.create_transition_route_group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/transition_route_groups.create_transition_route_group.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/transition_route_groups.create_transition_route_group.js,samples/README.md) | -| Transition_route_groups.delete_transition_route_group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/transition_route_groups.delete_transition_route_group.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/transition_route_groups.delete_transition_route_group.js,samples/README.md) | -| Transition_route_groups.get_transition_route_group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/transition_route_groups.get_transition_route_group.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/transition_route_groups.get_transition_route_group.js,samples/README.md) | -| Transition_route_groups.list_transition_route_groups | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/transition_route_groups.list_transition_route_groups.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/transition_route_groups.list_transition_route_groups.js,samples/README.md) | -| Transition_route_groups.update_transition_route_group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/transition_route_groups.update_transition_route_group.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/transition_route_groups.update_transition_route_group.js,samples/README.md) | -| Versions.compare_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.compare_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.compare_versions.js,samples/README.md) | -| Versions.create_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.create_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.create_version.js,samples/README.md) | -| Versions.delete_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.delete_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.delete_version.js,samples/README.md) | -| Versions.get_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.get_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.get_version.js,samples/README.md) | -| Versions.list_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.list_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.list_versions.js,samples/README.md) | -| Versions.load_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.load_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.load_version.js,samples/README.md) | -| Versions.update_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.update_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.update_version.js,samples/README.md) | -| Webhooks.create_webhook | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/webhooks.create_webhook.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/webhooks.create_webhook.js,samples/README.md) | -| Webhooks.delete_webhook | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/webhooks.delete_webhook.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/webhooks.delete_webhook.js,samples/README.md) | -| Webhooks.get_webhook | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/webhooks.get_webhook.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/webhooks.get_webhook.js,samples/README.md) | -| Webhooks.list_webhooks | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/webhooks.list_webhooks.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/webhooks.list_webhooks.js,samples/README.md) | -| Webhooks.update_webhook | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/webhooks.update_webhook.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/webhooks.update_webhook.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/quickstart.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/test/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/test/quickstart.js,samples/README.md) | +| Agents.create_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.create_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.create_agent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Agents.delete_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.delete_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.delete_agent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Agents.export_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.export_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.export_agent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Agents.get_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.get_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.get_agent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Agents.get_agent_validation_result | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.get_agent_validation_result.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.get_agent_validation_result.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Agents.list_agents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.list_agents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.list_agents.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Agents.restore_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.restore_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.restore_agent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Agents.update_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.update_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.update_agent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Agents.validate_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.validate_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.validate_agent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Changelogs.get_changelog | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/changelogs.get_changelog.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/changelogs.get_changelog.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Changelogs.list_changelogs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/changelogs.list_changelogs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/changelogs.list_changelogs.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Deployments.get_deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/deployments.get_deployment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/deployments.get_deployment.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Deployments.list_deployments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/deployments.list_deployments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/deployments.list_deployments.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Entity_types.create_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/entity_types.create_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/entity_types.create_entity_type.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Entity_types.delete_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/entity_types.delete_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/entity_types.delete_entity_type.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Entity_types.get_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/entity_types.get_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/entity_types.get_entity_type.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Entity_types.list_entity_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/entity_types.list_entity_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/entity_types.list_entity_types.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Entity_types.update_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/entity_types.update_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/entity_types.update_entity_type.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Environments.create_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.create_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.create_environment.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Environments.delete_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.delete_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.delete_environment.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Environments.deploy_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.deploy_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.deploy_flow.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Environments.get_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.get_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.get_environment.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Environments.list_continuous_test_results | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.list_continuous_test_results.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.list_continuous_test_results.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Environments.list_environments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.list_environments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.list_environments.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Environments.lookup_environment_history | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.lookup_environment_history.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.lookup_environment_history.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Environments.run_continuous_test | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.run_continuous_test.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.run_continuous_test.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Environments.update_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.update_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.update_environment.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Experiments.create_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.create_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.create_experiment.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Experiments.delete_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.delete_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.delete_experiment.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Experiments.get_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.get_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.get_experiment.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Experiments.list_experiments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.list_experiments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.list_experiments.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Experiments.start_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.start_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.start_experiment.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Experiments.stop_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.stop_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.stop_experiment.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Experiments.update_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.update_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.update_experiment.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Flows.create_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.create_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.create_flow.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Flows.delete_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.delete_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.delete_flow.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Flows.export_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.export_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.export_flow.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Flows.get_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.get_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.get_flow.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Flows.get_flow_validation_result | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.get_flow_validation_result.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.get_flow_validation_result.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Flows.import_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.import_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.import_flow.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Flows.list_flows | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.list_flows.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.list_flows.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Flows.train_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.train_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.train_flow.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Flows.update_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.update_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.update_flow.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Flows.validate_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.validate_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.validate_flow.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Intents.create_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.create_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.create_intent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Intents.delete_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.delete_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.delete_intent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Intents.get_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.get_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.get_intent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Intents.list_intents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.list_intents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.list_intents.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Intents.update_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.update_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.update_intent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Pages.create_page | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/pages.create_page.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/pages.create_page.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Pages.delete_page | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/pages.delete_page.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/pages.delete_page.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Pages.get_page | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/pages.get_page.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/pages.get_page.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Pages.list_pages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/pages.list_pages.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/pages.list_pages.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Pages.update_page | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/pages.update_page.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/pages.update_page.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Security_settings_service.create_security_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/security_settings_service.create_security_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/security_settings_service.create_security_settings.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Security_settings_service.delete_security_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/security_settings_service.delete_security_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/security_settings_service.delete_security_settings.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Security_settings_service.get_security_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/security_settings_service.get_security_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/security_settings_service.get_security_settings.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Security_settings_service.list_security_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/security_settings_service.list_security_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/security_settings_service.list_security_settings.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Security_settings_service.update_security_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/security_settings_service.update_security_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/security_settings_service.update_security_settings.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Session_entity_types.create_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/session_entity_types.create_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/session_entity_types.create_session_entity_type.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Session_entity_types.delete_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/session_entity_types.delete_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/session_entity_types.delete_session_entity_type.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Session_entity_types.get_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/session_entity_types.get_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/session_entity_types.get_session_entity_type.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Session_entity_types.list_session_entity_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/session_entity_types.list_session_entity_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/session_entity_types.list_session_entity_types.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Session_entity_types.update_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/session_entity_types.update_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/session_entity_types.update_session_entity_type.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Sessions.detect_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.detect_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.detect_intent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Sessions.fulfill_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.fulfill_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.fulfill_intent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Sessions.match_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.match_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.match_intent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Sessions.streaming_detect_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.streaming_detect_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.streaming_detect_intent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Test_cases.batch_delete_test_cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.batch_delete_test_cases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.batch_delete_test_cases.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Test_cases.batch_run_test_cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.batch_run_test_cases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.batch_run_test_cases.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Test_cases.calculate_coverage | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.calculate_coverage.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.calculate_coverage.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Test_cases.create_test_case | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.create_test_case.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.create_test_case.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Test_cases.export_test_cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.export_test_cases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.export_test_cases.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Test_cases.get_test_case | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.get_test_case.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.get_test_case.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Test_cases.get_test_case_result | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.get_test_case_result.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.get_test_case_result.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Test_cases.import_test_cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.import_test_cases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.import_test_cases.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Test_cases.list_test_case_results | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.list_test_case_results.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.list_test_case_results.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Test_cases.list_test_cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.list_test_cases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.list_test_cases.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Test_cases.run_test_case | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.run_test_case.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.run_test_case.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Test_cases.update_test_case | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.update_test_case.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.update_test_case.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Transition_route_groups.create_transition_route_group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/transition_route_groups.create_transition_route_group.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/transition_route_groups.create_transition_route_group.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Transition_route_groups.delete_transition_route_group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/transition_route_groups.delete_transition_route_group.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/transition_route_groups.delete_transition_route_group.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Transition_route_groups.get_transition_route_group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/transition_route_groups.get_transition_route_group.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/transition_route_groups.get_transition_route_group.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Transition_route_groups.list_transition_route_groups | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/transition_route_groups.list_transition_route_groups.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/transition_route_groups.list_transition_route_groups.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Transition_route_groups.update_transition_route_group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/transition_route_groups.update_transition_route_group.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/transition_route_groups.update_transition_route_group.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Versions.compare_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.compare_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.compare_versions.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Versions.create_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.create_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.create_version.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Versions.delete_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.delete_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.delete_version.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Versions.get_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.get_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.get_version.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Versions.list_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.list_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.list_versions.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Versions.load_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.load_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.load_version.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Versions.update_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.update_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.update_version.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Webhooks.create_webhook | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/webhooks.create_webhook.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/webhooks.create_webhook.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Webhooks.delete_webhook | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/webhooks.delete_webhook.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/webhooks.delete_webhook.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Webhooks.get_webhook | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/webhooks.get_webhook.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/webhooks.get_webhook.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Webhooks.list_webhooks | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/webhooks.list_webhooks.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/webhooks.list_webhooks.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Webhooks.update_webhook | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/webhooks.update_webhook.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/webhooks.update_webhook.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Agents.create_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.create_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.create_agent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Agents.delete_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.delete_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.delete_agent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Agents.export_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.export_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.export_agent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Agents.get_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.get_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.get_agent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Agents.get_agent_validation_result | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.get_agent_validation_result.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.get_agent_validation_result.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Agents.list_agents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.list_agents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.list_agents.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Agents.restore_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.restore_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.restore_agent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Agents.update_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.update_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.update_agent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Agents.validate_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.validate_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.validate_agent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Changelogs.get_changelog | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/changelogs.get_changelog.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/changelogs.get_changelog.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Changelogs.list_changelogs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/changelogs.list_changelogs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/changelogs.list_changelogs.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Deployments.get_deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/deployments.get_deployment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/deployments.get_deployment.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Deployments.list_deployments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/deployments.list_deployments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/deployments.list_deployments.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Entity_types.create_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/entity_types.create_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/entity_types.create_entity_type.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Entity_types.delete_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/entity_types.delete_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/entity_types.delete_entity_type.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Entity_types.get_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/entity_types.get_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/entity_types.get_entity_type.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Entity_types.list_entity_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/entity_types.list_entity_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/entity_types.list_entity_types.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Entity_types.update_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/entity_types.update_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/entity_types.update_entity_type.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Environments.create_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.create_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.create_environment.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Environments.delete_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.delete_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.delete_environment.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Environments.deploy_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.deploy_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.deploy_flow.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Environments.get_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.get_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.get_environment.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Environments.list_continuous_test_results | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.list_continuous_test_results.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.list_continuous_test_results.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Environments.list_environments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.list_environments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.list_environments.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Environments.lookup_environment_history | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.lookup_environment_history.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.lookup_environment_history.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Environments.run_continuous_test | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.run_continuous_test.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.run_continuous_test.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Environments.update_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.update_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.update_environment.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Experiments.create_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.create_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.create_experiment.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Experiments.delete_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.delete_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.delete_experiment.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Experiments.get_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.get_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.get_experiment.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Experiments.list_experiments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.list_experiments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.list_experiments.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Experiments.start_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.start_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.start_experiment.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Experiments.stop_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.stop_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.stop_experiment.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Experiments.update_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.update_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.update_experiment.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Flows.create_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.create_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.create_flow.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Flows.delete_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.delete_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.delete_flow.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Flows.export_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.export_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.export_flow.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Flows.get_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.get_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.get_flow.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Flows.get_flow_validation_result | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.get_flow_validation_result.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.get_flow_validation_result.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Flows.import_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.import_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.import_flow.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Flows.list_flows | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.list_flows.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.list_flows.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Flows.train_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.train_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.train_flow.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Flows.update_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.update_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.update_flow.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Flows.validate_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.validate_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.validate_flow.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Intents.create_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.create_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.create_intent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Intents.delete_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.delete_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.delete_intent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Intents.get_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.get_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.get_intent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Intents.list_intents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.list_intents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.list_intents.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Intents.update_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.update_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.update_intent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Pages.create_page | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/pages.create_page.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/pages.create_page.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Pages.delete_page | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/pages.delete_page.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/pages.delete_page.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Pages.get_page | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/pages.get_page.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/pages.get_page.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Pages.list_pages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/pages.list_pages.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/pages.list_pages.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Pages.update_page | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/pages.update_page.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/pages.update_page.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Security_settings_service.create_security_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/security_settings_service.create_security_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/security_settings_service.create_security_settings.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Security_settings_service.delete_security_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/security_settings_service.delete_security_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/security_settings_service.delete_security_settings.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Security_settings_service.get_security_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/security_settings_service.get_security_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/security_settings_service.get_security_settings.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Security_settings_service.list_security_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/security_settings_service.list_security_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/security_settings_service.list_security_settings.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Security_settings_service.update_security_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/security_settings_service.update_security_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/security_settings_service.update_security_settings.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Session_entity_types.create_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/session_entity_types.create_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/session_entity_types.create_session_entity_type.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Session_entity_types.delete_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/session_entity_types.delete_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/session_entity_types.delete_session_entity_type.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Session_entity_types.get_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/session_entity_types.get_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/session_entity_types.get_session_entity_type.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Session_entity_types.list_session_entity_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/session_entity_types.list_session_entity_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/session_entity_types.list_session_entity_types.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Session_entity_types.update_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/session_entity_types.update_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/session_entity_types.update_session_entity_type.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Sessions.detect_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.detect_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.detect_intent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Sessions.fulfill_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.fulfill_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.fulfill_intent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Sessions.match_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.match_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.match_intent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Sessions.streaming_detect_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.streaming_detect_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.streaming_detect_intent.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Test_cases.batch_delete_test_cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.batch_delete_test_cases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.batch_delete_test_cases.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Test_cases.batch_run_test_cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.batch_run_test_cases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.batch_run_test_cases.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Test_cases.calculate_coverage | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.calculate_coverage.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.calculate_coverage.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Test_cases.create_test_case | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.create_test_case.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.create_test_case.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Test_cases.export_test_cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.export_test_cases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.export_test_cases.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Test_cases.get_test_case | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.get_test_case.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.get_test_case.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Test_cases.get_test_case_result | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.get_test_case_result.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.get_test_case_result.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Test_cases.import_test_cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.import_test_cases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.import_test_cases.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Test_cases.list_test_case_results | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.list_test_case_results.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.list_test_case_results.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Test_cases.list_test_cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.list_test_cases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.list_test_cases.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Test_cases.run_test_case | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.run_test_case.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.run_test_case.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Test_cases.update_test_case | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.update_test_case.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.update_test_case.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Transition_route_groups.create_transition_route_group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/transition_route_groups.create_transition_route_group.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/transition_route_groups.create_transition_route_group.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Transition_route_groups.delete_transition_route_group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/transition_route_groups.delete_transition_route_group.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/transition_route_groups.delete_transition_route_group.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Transition_route_groups.get_transition_route_group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/transition_route_groups.get_transition_route_group.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/transition_route_groups.get_transition_route_group.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Transition_route_groups.list_transition_route_groups | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/transition_route_groups.list_transition_route_groups.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/transition_route_groups.list_transition_route_groups.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Transition_route_groups.update_transition_route_group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/transition_route_groups.update_transition_route_group.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/transition_route_groups.update_transition_route_group.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Versions.compare_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.compare_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.compare_versions.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Versions.create_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.create_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.create_version.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Versions.delete_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.delete_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.delete_version.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Versions.get_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.get_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.get_version.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Versions.list_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.list_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.list_versions.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Versions.load_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.load_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.load_version.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Versions.update_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.update_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.update_version.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Webhooks.create_webhook | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/webhooks.create_webhook.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/webhooks.create_webhook.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Webhooks.delete_webhook | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/webhooks.delete_webhook.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/webhooks.delete_webhook.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Webhooks.get_webhook | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/webhooks.get_webhook.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/webhooks.get_webhook.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Webhooks.list_webhooks | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/webhooks.list_webhooks.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/webhooks.list_webhooks.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Webhooks.update_webhook | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/webhooks.update_webhook.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/webhooks.update_webhook.js,packages/google-cloud-dialogflow-cx/samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/quickstart.js,packages/google-cloud-dialogflow-cx/samples/README.md) | diff --git a/packages/google-cloud-dialogflow-cx/package.json b/packages/google-cloud-dialogflow-cx/package.json index b628b2b1cb4..2697af5c003 100644 --- a/packages/google-cloud-dialogflow-cx/package.json +++ b/packages/google-cloud-dialogflow-cx/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/dialogflow-cx", - "version": "3.4.2", + "version": "3.5.0", "description": "Cx client for Node.js", "repository": { "type": "git", @@ -41,18 +41,19 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", "docs-test": "linkinator docs", "fix": "gts fix", "lint": "gts check", - "prelint": "cd samples; npm link ../; npm i", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 node build/test/run.js", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 node build/test/run.js" }, "dependencies": { "google-gax": "^3.5.8" @@ -67,6 +68,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -80,5 +82,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-dialogflow-cx" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/advanced_settings.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/advanced_settings.proto index 05460932a81..a50433e44f3 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/advanced_settings.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/advanced_settings.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/agent.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/agent.proto index 2c7ed1adb5e..a8d95f09718 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/agent.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/agent.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -416,7 +416,7 @@ message ExportAgentResponse { // The exported agent. oneof agent { // The URI to a file containing the exported agent. This field is populated - // only if `agent_uri` is specified in + // if `agent_uri` is specified in // [ExportAgentRequest][google.cloud.dialogflow.cx.v3.ExportAgentRequest]. string agent_uri = 1; diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/audio_config.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/audio_config.proto index 259c81cb40c..74f864bc2f9 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/audio_config.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/audio_config.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -190,6 +190,12 @@ message InputAudioConfig { // [Cloud Speech API // documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) // for more details. + // If you specify a model, the following models typically have the best + // performance: + // + // - phone_call (best for Agent Assist and telephony) + // - latest_short (best for Dialogflow non-telephony) + // - command_and_search (best for very short utterances and commands) string model = 7; // Optional. Which variant of the [Speech @@ -317,10 +323,20 @@ message OutputAudioConfig { SynthesizeSpeechConfig synthesize_speech_config = 3; } -// Settings related to speech generating. +// Settings related to speech synthesizing. message TextToSpeechSettings { - // Configuration of how speech should be synthesized, mapping from - // language (https://dialogflow.com/docs/reference/language) to + // Configuration of how speech should be synthesized, mapping from language + // (https://cloud.google.com/dialogflow/cx/docs/reference/language) to // SynthesizeSpeechConfig. + // + // These settings affect: + // + // - The synthesize configuration used in [phone + // gateway](https://cloud.google.com/dialogflow/cx/docs/concept/integration/phone-gateway). + // + // - You no longer need to specify + // [OutputAudioConfig.synthesize_speech_config][google.cloud.dialogflow.cx.v3.OutputAudioConfig.synthesize_speech_config] + // when invoking API calls. Your agent will use the pre-configured options + // for speech synthesizing. map synthesize_speech_configs = 1; } diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/changelog.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/changelog.proto index b7d8b29dc73..c4b805eafb2 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/changelog.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/changelog.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/deployment.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/deployment.proto index 9459b564363..c676332e330 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/deployment.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/deployment.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/entity_type.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/entity_type.proto index a0222a3f0ef..28b68b5d993 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/entity_type.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/entity_type.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/environment.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/environment.proto index 5175a15f79b..b20e0f73cc0 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/environment.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/environment.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/experiment.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/experiment.proto index c7f44775355..5931a38477a 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/experiment.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/experiment.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/flow.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/flow.proto index d84be312f72..b136137c635 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/flow.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/flow.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/fulfillment.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/fulfillment.proto index 5cf5f0f4080..ce75390d3b6 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/fulfillment.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/fulfillment.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/gcs.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/gcs.proto index bf1a43cb2b7..1a2b55bf01f 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/gcs.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/gcs.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -31,9 +31,7 @@ option ruby_package = "Google::Cloud::Dialogflow::CX::V3"; // exports objects (e.g. exported agent or transcripts) outside of Dialogflow. message GcsDestination { // Required. The Google Cloud Storage URI for the exported objects. A URI is - // of the form: - // gs://bucket/object-name-or-prefix - // Whether a full object name, or just a prefix, its usage depends on the - // Dialogflow operation. + // of the form: `gs://bucket/object-name-or-prefix` Whether a full object + // name, or just a prefix, its usage depends on the Dialogflow operation. string uri = 1 [(google.api.field_behavior) = REQUIRED]; } diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/intent.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/intent.proto index 5ff0fd986c4..4b67223f9d8 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/intent.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/intent.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/page.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/page.proto index 2b52455cc04..08aa938af61 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/page.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/page.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/response_message.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/response_message.proto index 658a32484da..9b002a103bf 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/response_message.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/response_message.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/security_settings.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/security_settings.proto index 4268ff600fd..eeb231e9379 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/security_settings.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/security_settings.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/session.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/session.proto index dc862d7d198..924911a705f 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/session.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/session.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -267,6 +267,74 @@ message StreamingDetectIntentRequest { // if some `Fulfillment`s in the agent have been configured to return partial // responses. bool enable_partial_response = 5; + + // If true, `StreamingDetectIntentResponse.debugging_info` will get populated. + bool enable_debugging_info = 8; +} + +// Cloud conversation info for easier debugging. +// It will get populated in `StreamingDetectIntentResponse` or +// `StreamingAnalyzeContentResponse` when the flag `enable_debugging_info` is +// set to true in corresponding requests. +message CloudConversationDebuggingInfo { + // Number of input audio data chunks in streaming requests. + int32 audio_data_chunks = 1; + + // Time offset of the end of speech utterance relative to the + // beginning of the first audio chunk. + google.protobuf.Duration result_end_time_offset = 2; + + // Duration of first audio chunk. + google.protobuf.Duration first_audio_duration = 3; + + // Whether client used single utterance mode. + bool single_utterance = 5; + + // Time offsets of the speech partial results relative to the beginning of + // the stream. + repeated google.protobuf.Duration speech_partial_results_end_times = 6; + + // Time offsets of the speech final results (is_final=true) relative to the + // beginning of the stream. + repeated google.protobuf.Duration speech_final_results_end_times = 7; + + // Total number of partial responses. + int32 partial_responses = 8; + + // Time offset of Speaker ID stream close time relative to the Speech stream + // close time in milliseconds. Only meaningful for conversations involving + // passive verification. + int32 speaker_id_passive_latency_ms_offset = 9; + + // Whether a barge-in event is triggered in this request. + bool bargein_event_triggered = 10; + + // Whether speech uses single utterance mode. + bool speech_single_utterance = 11; + + // Time offsets of the DTMF partial results relative to the beginning of + // the stream. + repeated google.protobuf.Duration dtmf_partial_results_times = 12; + + // Time offsets of the DTMF final results relative to the beginning of + // the stream. + repeated google.protobuf.Duration dtmf_final_results_times = 13; + + // Time offset of the end-of-single-utterance signal relative to the + // beginning of the stream. + google.protobuf.Duration single_utterance_end_time_offset = 14; + + // No speech timeout settings observed at runtime. + google.protobuf.Duration no_speech_timeout = 15; + + // Whether the streaming terminates with an injected text query. + bool is_input_text = 16; + + // Client half close time in terms of input audio duration. + google.protobuf.Duration client_half_close_time_offset = 17; + + // Client half close time in terms of API streaming duration. + google.protobuf.Duration client_half_close_streaming_time_offset = 18; } // The top-level message returned from the @@ -306,6 +374,10 @@ message StreamingDetectIntentResponse { // The response from detect intent. DetectIntentResponse detect_intent_response = 2; } + + // Debugging info that would get populated when + // `StreamingDetectIntentRequest.enable_debugging_info` is set to true. + CloudConversationDebuggingInfo debugging_info = 4; } // Contains a speech recognition result corresponding to a portion of the audio @@ -536,6 +608,7 @@ message QueryParameters { // // 4. An event to be triggered. // +// 5. DTMF digits to invoke an intent and fill in parameter value. message QueryInput { // Required. The input specification. oneof input { @@ -587,8 +660,9 @@ message QueryResult { // input, this field will contain the name of the event. string trigger_event = 14; - // If a [DTMF][DTMFInput] was provided as input, this field will contain - // a copy of the [DTMFInput][]. + // If a [DTMF][google.cloud.dialogflow.cx.v3.DtmfInput] was provided as + // input, this field will contain a copy of the + // [DtmfInput][google.cloud.dialogflow.cx.v3.DtmfInput]. DtmfInput dtmf = 23; } diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/session_entity_type.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/session_entity_type.proto index c56e323f148..e263dbbe8bc 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/session_entity_type.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/session_entity_type.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/test_case.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/test_case.proto index 632f782ce0f..22d69531ce3 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/test_case.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/test_case.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -395,6 +395,9 @@ message TestRunDifference { // The message utterance. UTTERANCE = 4; + + // The flow. + FLOW = 5; } // The type of diff. @@ -433,7 +436,7 @@ message TransitionCoverage { // The end node of a transition. TransitionNode target = 2; - // Whether or not the transition is covered by at least one of the + // Whether the transition is covered by at least one of the // agent's test cases. bool covered = 3; @@ -465,7 +468,7 @@ message TransitionRouteGroupCoverage { // Intent route or condition route. TransitionRoute transition_route = 1; - // Whether or not the transition route is covered by at least one of the + // Whether the transition route is covered by at least one of the // agent's test cases. bool covered = 2; } @@ -499,7 +502,7 @@ message IntentCoverage { type: "dialogflow.googleapis.com/Intent" }]; - // Whether or not the intent is covered by at least one of the agent's + // Whether the intent is covered by at least one of the agent's // test cases. bool covered = 2; } diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/transition_route_group.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/transition_route_group.proto index 2e24ec5499a..507eb17f4c7 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/transition_route_group.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/transition_route_group.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/validation_message.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/validation_message.proto index f74b21c8fcb..4db4bfcd866 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/validation_message.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/validation_message.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/version.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/version.proto index d2adfee4fd3..4ec02b7642a 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/version.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/version.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/webhook.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/webhook.proto index a858ad90c7b..d721b171144 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/webhook.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/webhook.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -373,6 +373,10 @@ message WebhookRequest { // If an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as // input, this field will contain the name of the event. string trigger_event = 14; + + // If [DTMF][google.cloud.dialogflow.cx.v3.DtmfInput] was provided as input, + // this field will contain the DTMF digits. + string dtmf_digits = 17; } // The language code specified in the [original diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/advanced_settings.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/advanced_settings.proto index 32e181b8a84..983fb1ff871 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/advanced_settings.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/advanced_settings.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/agent.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/agent.proto index d3f314ee4fa..403b1859809 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/agent.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/agent.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -416,7 +416,7 @@ message ExportAgentResponse { // The exported agent. oneof agent { // The URI to a file containing the exported agent. This field is populated - // only if `agent_uri` is specified in + // if `agent_uri` is specified in // [ExportAgentRequest][google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest]. string agent_uri = 1; diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto index 455b3695cb2..7c6cf8bf9cb 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -190,6 +190,12 @@ message InputAudioConfig { // [Cloud Speech API // documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) // for more details. + // If you specify a model, the following models typically have the best + // performance: + // + // - phone_call (best for Agent Assist and telephony) + // - latest_short (best for Dialogflow non-telephony) + // - command_and_search (best for very short utterances and commands) string model = 7; // Optional. Which variant of the [Speech @@ -317,10 +323,20 @@ message OutputAudioConfig { SynthesizeSpeechConfig synthesize_speech_config = 3; } -// Settings related to speech generating. +// Settings related to speech synthesizing. message TextToSpeechSettings { - // Configuration of how speech should be synthesized, mapping from - // language (https://dialogflow.com/docs/reference/language) to + // Configuration of how speech should be synthesized, mapping from language + // (https://cloud.google.com/dialogflow/cx/docs/reference/language) to // SynthesizeSpeechConfig. + // + // These settings affect: + // + // - The synthesize configuration used in [phone + // gateway](https://cloud.google.com/dialogflow/cx/docs/concept/integration/phone-gateway). + // + // - You no longer need to specify + // [OutputAudioConfig.synthesize_speech_config][google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.synthesize_speech_config] + // when invoking API calls. Your agent will use the pre-configured options + // for speech synthesizing. map synthesize_speech_configs = 1; } diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/changelog.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/changelog.proto index 2a51f5c57fc..e25e7c672a6 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/changelog.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/changelog.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/deployment.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/deployment.proto index 580c753ea15..3ace56c7ae5 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/deployment.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/deployment.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/entity_type.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/entity_type.proto index d7b08b81e3d..41d853e7d2e 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/entity_type.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/entity_type.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/environment.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/environment.proto index 6b975bf997a..140af1ab0d6 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/environment.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/environment.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto index 8c33b259dad..e9f8e51a40b 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/experiment.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/flow.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/flow.proto index 736ce1acdd4..f85168113d3 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/flow.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/flow.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto index 76c90b48b75..23d8e388de3 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto index 19ed9a8f1ed..c0b4d747f65 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/gcs.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -31,9 +31,7 @@ option ruby_package = "Google::Cloud::Dialogflow::CX::V3beta1"; // exports objects (e.g. exported agent or transcripts) outside of Dialogflow. message GcsDestination { // Required. The Google Cloud Storage URI for the exported objects. A URI is - // of the form: - // gs://bucket/object-name-or-prefix - // Whether a full object name, or just a prefix, its usage depends on the - // Dialogflow operation. + // of the form: `gs://bucket/object-name-or-prefix` Whether a full object + // name, or just a prefix, its usage depends on the Dialogflow operation. string uri = 1 [(google.api.field_behavior) = REQUIRED]; } diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/intent.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/intent.proto index d3bf64da00e..b62ae80682b 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/intent.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/intent.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/page.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/page.proto index d0aa008e2f9..6c59bcea401 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/page.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/page.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/response_message.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/response_message.proto index 4ebf02cd1b2..ba7dcbf288c 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/response_message.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/response_message.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/security_settings.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/security_settings.proto index 03fc1e392b2..08d59f86272 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/security_settings.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/security_settings.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/session.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/session.proto index 0d1f3c31c2a..4e691c5ba4e 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/session.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/session.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -267,6 +267,74 @@ message StreamingDetectIntentRequest { // if some `Fulfillment`s in the agent have been configured to return partial // responses. bool enable_partial_response = 5; + + // If true, `StreamingDetectIntentResponse.debugging_info` will get populated. + bool enable_debugging_info = 8; +} + +// Cloud conversation info for easier debugging. +// It will get populated in `StreamingDetectIntentResponse` or +// `StreamingAnalyzeContentResponse` when the flag `enable_debugging_info` is +// set to true in corresponding requests. +message CloudConversationDebuggingInfo { + // Number of input audio data chunks in streaming requests. + int32 audio_data_chunks = 1; + + // Time offset of the end of speech utterance relative to the + // beginning of the first audio chunk. + google.protobuf.Duration result_end_time_offset = 2; + + // Duration of first audio chunk. + google.protobuf.Duration first_audio_duration = 3; + + // Whether client used single utterance mode. + bool single_utterance = 5; + + // Time offsets of the speech partial results relative to the beginning of + // the stream. + repeated google.protobuf.Duration speech_partial_results_end_times = 6; + + // Time offsets of the speech final results (is_final=true) relative to the + // beginning of the stream. + repeated google.protobuf.Duration speech_final_results_end_times = 7; + + // Total number of partial responses. + int32 partial_responses = 8; + + // Time offset of Speaker ID stream close time relative to the Speech stream + // close time in milliseconds. Only meaningful for conversations involving + // passive verification. + int32 speaker_id_passive_latency_ms_offset = 9; + + // Whether a barge-in event is triggered in this request. + bool bargein_event_triggered = 10; + + // Whether speech uses single utterance mode. + bool speech_single_utterance = 11; + + // Time offsets of the DTMF partial results relative to the beginning of + // the stream. + repeated google.protobuf.Duration dtmf_partial_results_times = 12; + + // Time offsets of the DTMF final results relative to the beginning of + // the stream. + repeated google.protobuf.Duration dtmf_final_results_times = 13; + + // Time offset of the end-of-single-utterance signal relative to the + // beginning of the stream. + google.protobuf.Duration single_utterance_end_time_offset = 14; + + // No speech timeout settings observed at runtime. + google.protobuf.Duration no_speech_timeout = 15; + + // Whether the streaming terminates with an injected text query. + bool is_input_text = 16; + + // Client half close time in terms of input audio duration. + google.protobuf.Duration client_half_close_time_offset = 17; + + // Client half close time in terms of API streaming duration. + google.protobuf.Duration client_half_close_streaming_time_offset = 18; } // The top-level message returned from the @@ -306,6 +374,10 @@ message StreamingDetectIntentResponse { // The response from detect intent. DetectIntentResponse detect_intent_response = 2; } + + // Debugging info that would get populated when + // `StreamingDetectIntentRequest.enable_debugging_info` is set to true. + CloudConversationDebuggingInfo debugging_info = 4; } // Contains a speech recognition result corresponding to a portion of the audio @@ -538,6 +610,7 @@ message QueryParameters { // // 4. An event to be triggered. // +// 5. DTMF digits to invoke an intent and fill in parameter value. message QueryInput { // Required. The input specification. oneof input { @@ -589,8 +662,9 @@ message QueryResult { // as input, this field will contain the name of the event. string trigger_event = 14; - // If a [DTMF][DTMFInput] was provided as input, this field will contain - // a copy of the [DTMFInput][]. + // If a [DTMF][google.cloud.dialogflow.cx.v3beta1.DtmfInput] was provided as + // input, this field will contain a copy of the + // [DtmfInput][google.cloud.dialogflow.cx.v3beta1.DtmfInput]. DtmfInput dtmf = 23; } diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/session_entity_type.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/session_entity_type.proto index 4df5508df1a..0297d628ec8 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/session_entity_type.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/session_entity_type.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/test_case.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/test_case.proto index 837db529c94..62e0d5e6d7b 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/test_case.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/test_case.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -398,6 +398,9 @@ message TestRunDifference { // The message utterance. UTTERANCE = 4; + + // The flow. + FLOW = 5; } // The type of diff. @@ -438,7 +441,7 @@ message TransitionCoverage { // The end node of a transition. TransitionNode target = 2; - // Whether or not the transition is covered by at least one of the + // Whether the transition is covered by at least one of the // agent's test cases. bool covered = 3; @@ -470,7 +473,7 @@ message TransitionRouteGroupCoverage { // Intent route or condition route. TransitionRoute transition_route = 1; - // Whether or not the transition route is covered by at least one of the + // Whether the transition route is covered by at least one of the // agent's test cases. bool covered = 2; } @@ -504,7 +507,7 @@ message IntentCoverage { type: "dialogflow.googleapis.com/Intent" }]; - // Whether or not the intent is covered by at least one of the agent's + // Whether the intent is covered by at least one of the agent's // test cases. bool covered = 2; } diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/transition_route_group.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/transition_route_group.proto index d92e09e6a39..e616c7a3718 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/transition_route_group.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/transition_route_group.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/validation_message.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/validation_message.proto index 57acc9ee429..96ec7c6ddff 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/validation_message.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/validation_message.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/version.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/version.proto index 52b58025be2..452fd8b00c2 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/version.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/version.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/webhook.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/webhook.proto index 2e818508ee7..878f34ccbd7 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/webhook.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/webhook.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -373,6 +373,10 @@ message WebhookRequest { // If an [event][google.cloud.dialogflow.cx.v3beta1.EventInput] was provided // as input, this field will contain the name of the event. string trigger_event = 14; + + // If [DTMF][google.cloud.dialogflow.cx.v3beta1.DtmfInput] was provided as + // input, this field will contain the DTMF digits. + string dtmf_digits = 17; } // The language code specified in the [original diff --git a/packages/google-cloud-dialogflow-cx/protos/protos.d.ts b/packages/google-cloud-dialogflow-cx/protos/protos.d.ts index 1591f05c518..4e6b853011f 100644 --- a/packages/google-cloud-dialogflow-cx/protos/protos.d.ts +++ b/packages/google-cloud-dialogflow-cx/protos/protos.d.ts @@ -13950,7 +13950,8 @@ export namespace google { INTENT = 1, PAGE = 2, PARAMETERS = 3, - UTTERANCE = 4 + UTTERANCE = 4, + FLOW = 5 } } @@ -19078,6 +19079,9 @@ export namespace google { /** StreamingDetectIntentRequest enablePartialResponse */ enablePartialResponse?: (boolean|null); + + /** StreamingDetectIntentRequest enableDebuggingInfo */ + enableDebuggingInfo?: (boolean|null); } /** Represents a StreamingDetectIntentRequest. */ @@ -19104,6 +19108,9 @@ export namespace google { /** StreamingDetectIntentRequest enablePartialResponse. */ public enablePartialResponse: boolean; + /** StreamingDetectIntentRequest enableDebuggingInfo. */ + public enableDebuggingInfo: boolean; + /** * Creates a new StreamingDetectIntentRequest instance using the specified properties. * @param [properties] Properties to set @@ -19182,6 +19189,199 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a CloudConversationDebuggingInfo. */ + interface ICloudConversationDebuggingInfo { + + /** CloudConversationDebuggingInfo audioDataChunks */ + audioDataChunks?: (number|null); + + /** CloudConversationDebuggingInfo resultEndTimeOffset */ + resultEndTimeOffset?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo firstAudioDuration */ + firstAudioDuration?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo singleUtterance */ + singleUtterance?: (boolean|null); + + /** CloudConversationDebuggingInfo speechPartialResultsEndTimes */ + speechPartialResultsEndTimes?: (google.protobuf.IDuration[]|null); + + /** CloudConversationDebuggingInfo speechFinalResultsEndTimes */ + speechFinalResultsEndTimes?: (google.protobuf.IDuration[]|null); + + /** CloudConversationDebuggingInfo partialResponses */ + partialResponses?: (number|null); + + /** CloudConversationDebuggingInfo speakerIdPassiveLatencyMsOffset */ + speakerIdPassiveLatencyMsOffset?: (number|null); + + /** CloudConversationDebuggingInfo bargeinEventTriggered */ + bargeinEventTriggered?: (boolean|null); + + /** CloudConversationDebuggingInfo speechSingleUtterance */ + speechSingleUtterance?: (boolean|null); + + /** CloudConversationDebuggingInfo dtmfPartialResultsTimes */ + dtmfPartialResultsTimes?: (google.protobuf.IDuration[]|null); + + /** CloudConversationDebuggingInfo dtmfFinalResultsTimes */ + dtmfFinalResultsTimes?: (google.protobuf.IDuration[]|null); + + /** CloudConversationDebuggingInfo singleUtteranceEndTimeOffset */ + singleUtteranceEndTimeOffset?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo noSpeechTimeout */ + noSpeechTimeout?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo isInputText */ + isInputText?: (boolean|null); + + /** CloudConversationDebuggingInfo clientHalfCloseTimeOffset */ + clientHalfCloseTimeOffset?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo clientHalfCloseStreamingTimeOffset */ + clientHalfCloseStreamingTimeOffset?: (google.protobuf.IDuration|null); + } + + /** Represents a CloudConversationDebuggingInfo. */ + class CloudConversationDebuggingInfo implements ICloudConversationDebuggingInfo { + + /** + * Constructs a new CloudConversationDebuggingInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.ICloudConversationDebuggingInfo); + + /** CloudConversationDebuggingInfo audioDataChunks. */ + public audioDataChunks: number; + + /** CloudConversationDebuggingInfo resultEndTimeOffset. */ + public resultEndTimeOffset?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo firstAudioDuration. */ + public firstAudioDuration?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo singleUtterance. */ + public singleUtterance: boolean; + + /** CloudConversationDebuggingInfo speechPartialResultsEndTimes. */ + public speechPartialResultsEndTimes: google.protobuf.IDuration[]; + + /** CloudConversationDebuggingInfo speechFinalResultsEndTimes. */ + public speechFinalResultsEndTimes: google.protobuf.IDuration[]; + + /** CloudConversationDebuggingInfo partialResponses. */ + public partialResponses: number; + + /** CloudConversationDebuggingInfo speakerIdPassiveLatencyMsOffset. */ + public speakerIdPassiveLatencyMsOffset: number; + + /** CloudConversationDebuggingInfo bargeinEventTriggered. */ + public bargeinEventTriggered: boolean; + + /** CloudConversationDebuggingInfo speechSingleUtterance. */ + public speechSingleUtterance: boolean; + + /** CloudConversationDebuggingInfo dtmfPartialResultsTimes. */ + public dtmfPartialResultsTimes: google.protobuf.IDuration[]; + + /** CloudConversationDebuggingInfo dtmfFinalResultsTimes. */ + public dtmfFinalResultsTimes: google.protobuf.IDuration[]; + + /** CloudConversationDebuggingInfo singleUtteranceEndTimeOffset. */ + public singleUtteranceEndTimeOffset?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo noSpeechTimeout. */ + public noSpeechTimeout?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo isInputText. */ + public isInputText: boolean; + + /** CloudConversationDebuggingInfo clientHalfCloseTimeOffset. */ + public clientHalfCloseTimeOffset?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo clientHalfCloseStreamingTimeOffset. */ + public clientHalfCloseStreamingTimeOffset?: (google.protobuf.IDuration|null); + + /** + * Creates a new CloudConversationDebuggingInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudConversationDebuggingInfo instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.ICloudConversationDebuggingInfo): google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo; + + /** + * Encodes the specified CloudConversationDebuggingInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.verify|verify} messages. + * @param message CloudConversationDebuggingInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.ICloudConversationDebuggingInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudConversationDebuggingInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.verify|verify} messages. + * @param message CloudConversationDebuggingInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.ICloudConversationDebuggingInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudConversationDebuggingInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudConversationDebuggingInfo + * @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.dialogflow.cx.v3.CloudConversationDebuggingInfo; + + /** + * Decodes a CloudConversationDebuggingInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudConversationDebuggingInfo + * @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.dialogflow.cx.v3.CloudConversationDebuggingInfo; + + /** + * Verifies a CloudConversationDebuggingInfo 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 CloudConversationDebuggingInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudConversationDebuggingInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo; + + /** + * Creates a plain object from a CloudConversationDebuggingInfo message. Also converts values to other types if specified. + * @param message CloudConversationDebuggingInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudConversationDebuggingInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudConversationDebuggingInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a StreamingDetectIntentResponse. */ interface IStreamingDetectIntentResponse { @@ -19190,6 +19390,9 @@ export namespace google { /** StreamingDetectIntentResponse detectIntentResponse */ detectIntentResponse?: (google.cloud.dialogflow.cx.v3.IDetectIntentResponse|null); + + /** StreamingDetectIntentResponse debuggingInfo */ + debuggingInfo?: (google.cloud.dialogflow.cx.v3.ICloudConversationDebuggingInfo|null); } /** Represents a StreamingDetectIntentResponse. */ @@ -19207,6 +19410,9 @@ export namespace google { /** StreamingDetectIntentResponse detectIntentResponse. */ public detectIntentResponse?: (google.cloud.dialogflow.cx.v3.IDetectIntentResponse|null); + /** StreamingDetectIntentResponse debuggingInfo. */ + public debuggingInfo?: (google.cloud.dialogflow.cx.v3.ICloudConversationDebuggingInfo|null); + /** StreamingDetectIntentResponse response. */ public response?: ("recognitionResult"|"detectIntentResponse"); @@ -23986,6 +24192,9 @@ export namespace google { /** WebhookRequest triggerEvent */ triggerEvent?: (string|null); + /** WebhookRequest dtmfDigits */ + dtmfDigits?: (string|null); + /** WebhookRequest languageCode */ languageCode?: (string|null); @@ -24035,6 +24244,9 @@ export namespace google { /** WebhookRequest triggerEvent. */ public triggerEvent?: (string|null); + /** WebhookRequest dtmfDigits. */ + public dtmfDigits?: (string|null); + /** WebhookRequest languageCode. */ public languageCode: string; @@ -24060,7 +24272,7 @@ export namespace google { public sentimentAnalysisResult?: (google.cloud.dialogflow.cx.v3.WebhookRequest.ISentimentAnalysisResult|null); /** WebhookRequest query. */ - public query?: ("text"|"triggerIntent"|"transcript"|"triggerEvent"); + public query?: ("text"|"triggerIntent"|"transcript"|"triggerEvent"|"dtmfDigits"); /** * Creates a new WebhookRequest instance using the specified properties. @@ -44053,7 +44265,8 @@ export namespace google { INTENT = 1, PAGE = 2, PARAMETERS = 3, - UTTERANCE = 4 + UTTERANCE = 4, + FLOW = 5 } } @@ -49181,6 +49394,9 @@ export namespace google { /** StreamingDetectIntentRequest enablePartialResponse */ enablePartialResponse?: (boolean|null); + + /** StreamingDetectIntentRequest enableDebuggingInfo */ + enableDebuggingInfo?: (boolean|null); } /** Represents a StreamingDetectIntentRequest. */ @@ -49207,6 +49423,9 @@ export namespace google { /** StreamingDetectIntentRequest enablePartialResponse. */ public enablePartialResponse: boolean; + /** StreamingDetectIntentRequest enableDebuggingInfo. */ + public enableDebuggingInfo: boolean; + /** * Creates a new StreamingDetectIntentRequest instance using the specified properties. * @param [properties] Properties to set @@ -49285,6 +49504,199 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a CloudConversationDebuggingInfo. */ + interface ICloudConversationDebuggingInfo { + + /** CloudConversationDebuggingInfo audioDataChunks */ + audioDataChunks?: (number|null); + + /** CloudConversationDebuggingInfo resultEndTimeOffset */ + resultEndTimeOffset?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo firstAudioDuration */ + firstAudioDuration?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo singleUtterance */ + singleUtterance?: (boolean|null); + + /** CloudConversationDebuggingInfo speechPartialResultsEndTimes */ + speechPartialResultsEndTimes?: (google.protobuf.IDuration[]|null); + + /** CloudConversationDebuggingInfo speechFinalResultsEndTimes */ + speechFinalResultsEndTimes?: (google.protobuf.IDuration[]|null); + + /** CloudConversationDebuggingInfo partialResponses */ + partialResponses?: (number|null); + + /** CloudConversationDebuggingInfo speakerIdPassiveLatencyMsOffset */ + speakerIdPassiveLatencyMsOffset?: (number|null); + + /** CloudConversationDebuggingInfo bargeinEventTriggered */ + bargeinEventTriggered?: (boolean|null); + + /** CloudConversationDebuggingInfo speechSingleUtterance */ + speechSingleUtterance?: (boolean|null); + + /** CloudConversationDebuggingInfo dtmfPartialResultsTimes */ + dtmfPartialResultsTimes?: (google.protobuf.IDuration[]|null); + + /** CloudConversationDebuggingInfo dtmfFinalResultsTimes */ + dtmfFinalResultsTimes?: (google.protobuf.IDuration[]|null); + + /** CloudConversationDebuggingInfo singleUtteranceEndTimeOffset */ + singleUtteranceEndTimeOffset?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo noSpeechTimeout */ + noSpeechTimeout?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo isInputText */ + isInputText?: (boolean|null); + + /** CloudConversationDebuggingInfo clientHalfCloseTimeOffset */ + clientHalfCloseTimeOffset?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo clientHalfCloseStreamingTimeOffset */ + clientHalfCloseStreamingTimeOffset?: (google.protobuf.IDuration|null); + } + + /** Represents a CloudConversationDebuggingInfo. */ + class CloudConversationDebuggingInfo implements ICloudConversationDebuggingInfo { + + /** + * Constructs a new CloudConversationDebuggingInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3beta1.ICloudConversationDebuggingInfo); + + /** CloudConversationDebuggingInfo audioDataChunks. */ + public audioDataChunks: number; + + /** CloudConversationDebuggingInfo resultEndTimeOffset. */ + public resultEndTimeOffset?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo firstAudioDuration. */ + public firstAudioDuration?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo singleUtterance. */ + public singleUtterance: boolean; + + /** CloudConversationDebuggingInfo speechPartialResultsEndTimes. */ + public speechPartialResultsEndTimes: google.protobuf.IDuration[]; + + /** CloudConversationDebuggingInfo speechFinalResultsEndTimes. */ + public speechFinalResultsEndTimes: google.protobuf.IDuration[]; + + /** CloudConversationDebuggingInfo partialResponses. */ + public partialResponses: number; + + /** CloudConversationDebuggingInfo speakerIdPassiveLatencyMsOffset. */ + public speakerIdPassiveLatencyMsOffset: number; + + /** CloudConversationDebuggingInfo bargeinEventTriggered. */ + public bargeinEventTriggered: boolean; + + /** CloudConversationDebuggingInfo speechSingleUtterance. */ + public speechSingleUtterance: boolean; + + /** CloudConversationDebuggingInfo dtmfPartialResultsTimes. */ + public dtmfPartialResultsTimes: google.protobuf.IDuration[]; + + /** CloudConversationDebuggingInfo dtmfFinalResultsTimes. */ + public dtmfFinalResultsTimes: google.protobuf.IDuration[]; + + /** CloudConversationDebuggingInfo singleUtteranceEndTimeOffset. */ + public singleUtteranceEndTimeOffset?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo noSpeechTimeout. */ + public noSpeechTimeout?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo isInputText. */ + public isInputText: boolean; + + /** CloudConversationDebuggingInfo clientHalfCloseTimeOffset. */ + public clientHalfCloseTimeOffset?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo clientHalfCloseStreamingTimeOffset. */ + public clientHalfCloseStreamingTimeOffset?: (google.protobuf.IDuration|null); + + /** + * Creates a new CloudConversationDebuggingInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudConversationDebuggingInfo instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3beta1.ICloudConversationDebuggingInfo): google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo; + + /** + * Encodes the specified CloudConversationDebuggingInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo.verify|verify} messages. + * @param message CloudConversationDebuggingInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3beta1.ICloudConversationDebuggingInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudConversationDebuggingInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo.verify|verify} messages. + * @param message CloudConversationDebuggingInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3beta1.ICloudConversationDebuggingInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudConversationDebuggingInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudConversationDebuggingInfo + * @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.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo; + + /** + * Decodes a CloudConversationDebuggingInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudConversationDebuggingInfo + * @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.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo; + + /** + * Verifies a CloudConversationDebuggingInfo 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 CloudConversationDebuggingInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudConversationDebuggingInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo; + + /** + * Creates a plain object from a CloudConversationDebuggingInfo message. Also converts values to other types if specified. + * @param message CloudConversationDebuggingInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudConversationDebuggingInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudConversationDebuggingInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a StreamingDetectIntentResponse. */ interface IStreamingDetectIntentResponse { @@ -49293,6 +49705,9 @@ export namespace google { /** StreamingDetectIntentResponse detectIntentResponse */ detectIntentResponse?: (google.cloud.dialogflow.cx.v3beta1.IDetectIntentResponse|null); + + /** StreamingDetectIntentResponse debuggingInfo */ + debuggingInfo?: (google.cloud.dialogflow.cx.v3beta1.ICloudConversationDebuggingInfo|null); } /** Represents a StreamingDetectIntentResponse. */ @@ -49310,6 +49725,9 @@ export namespace google { /** StreamingDetectIntentResponse detectIntentResponse. */ public detectIntentResponse?: (google.cloud.dialogflow.cx.v3beta1.IDetectIntentResponse|null); + /** StreamingDetectIntentResponse debuggingInfo. */ + public debuggingInfo?: (google.cloud.dialogflow.cx.v3beta1.ICloudConversationDebuggingInfo|null); + /** StreamingDetectIntentResponse response. */ public response?: ("recognitionResult"|"detectIntentResponse"); @@ -54089,6 +54507,9 @@ export namespace google { /** WebhookRequest triggerEvent */ triggerEvent?: (string|null); + /** WebhookRequest dtmfDigits */ + dtmfDigits?: (string|null); + /** WebhookRequest languageCode */ languageCode?: (string|null); @@ -54138,6 +54559,9 @@ export namespace google { /** WebhookRequest triggerEvent. */ public triggerEvent?: (string|null); + /** WebhookRequest dtmfDigits. */ + public dtmfDigits?: (string|null); + /** WebhookRequest languageCode. */ public languageCode: string; @@ -54163,7 +54587,7 @@ export namespace google { public sentimentAnalysisResult?: (google.cloud.dialogflow.cx.v3beta1.WebhookRequest.ISentimentAnalysisResult|null); /** WebhookRequest query. */ - public query?: ("text"|"triggerIntent"|"transcript"|"triggerEvent"); + public query?: ("text"|"triggerIntent"|"transcript"|"triggerEvent"|"dtmfDigits"); /** * Creates a new WebhookRequest instance using the specified properties. diff --git a/packages/google-cloud-dialogflow-cx/protos/protos.js b/packages/google-cloud-dialogflow-cx/protos/protos.js index bd87a801cf4..bd0c5b68ddf 100644 --- a/packages/google-cloud-dialogflow-cx/protos/protos.js +++ b/packages/google-cloud-dialogflow-cx/protos/protos.js @@ -32777,6 +32777,7 @@ case 2: case 3: case 4: + case 5: break; } if (message.description != null && message.hasOwnProperty("description")) @@ -32824,6 +32825,10 @@ case 4: message.type = 4; break; + case "FLOW": + case 5: + message.type = 5; + break; } if (object.description != null) message.description = String(object.description); @@ -32889,6 +32894,7 @@ * @property {number} PAGE=2 PAGE value * @property {number} PARAMETERS=3 PARAMETERS value * @property {number} UTTERANCE=4 UTTERANCE value + * @property {number} FLOW=5 FLOW value */ TestRunDifference.DiffType = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -32897,6 +32903,7 @@ values[valuesById[2] = "PAGE"] = 2; values[valuesById[3] = "PARAMETERS"] = 3; values[valuesById[4] = "UTTERANCE"] = 4; + values[valuesById[5] = "FLOW"] = 5; return values; })(); @@ -44914,6 +44921,7 @@ * @property {google.cloud.dialogflow.cx.v3.IQueryInput|null} [queryInput] StreamingDetectIntentRequest queryInput * @property {google.cloud.dialogflow.cx.v3.IOutputAudioConfig|null} [outputAudioConfig] StreamingDetectIntentRequest outputAudioConfig * @property {boolean|null} [enablePartialResponse] StreamingDetectIntentRequest enablePartialResponse + * @property {boolean|null} [enableDebuggingInfo] StreamingDetectIntentRequest enableDebuggingInfo */ /** @@ -44971,6 +44979,14 @@ */ StreamingDetectIntentRequest.prototype.enablePartialResponse = false; + /** + * StreamingDetectIntentRequest enableDebuggingInfo. + * @member {boolean} enableDebuggingInfo + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest + * @instance + */ + StreamingDetectIntentRequest.prototype.enableDebuggingInfo = false; + /** * Creates a new StreamingDetectIntentRequest instance using the specified properties. * @function create @@ -45005,6 +45021,8 @@ $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.encode(message.outputAudioConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.enablePartialResponse != null && Object.hasOwnProperty.call(message, "enablePartialResponse")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.enablePartialResponse); + if (message.enableDebuggingInfo != null && Object.hasOwnProperty.call(message, "enableDebuggingInfo")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.enableDebuggingInfo); return writer; }; @@ -45059,6 +45077,10 @@ message.enablePartialResponse = reader.bool(); break; } + case 8: { + message.enableDebuggingInfo = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -45115,6 +45137,9 @@ if (message.enablePartialResponse != null && message.hasOwnProperty("enablePartialResponse")) if (typeof message.enablePartialResponse !== "boolean") return "enablePartialResponse: boolean expected"; + if (message.enableDebuggingInfo != null && message.hasOwnProperty("enableDebuggingInfo")) + if (typeof message.enableDebuggingInfo !== "boolean") + return "enableDebuggingInfo: boolean expected"; return null; }; @@ -45149,6 +45174,8 @@ } if (object.enablePartialResponse != null) message.enablePartialResponse = Boolean(object.enablePartialResponse); + if (object.enableDebuggingInfo != null) + message.enableDebuggingInfo = Boolean(object.enableDebuggingInfo); return message; }; @@ -45171,6 +45198,7 @@ object.queryInput = null; object.outputAudioConfig = null; object.enablePartialResponse = false; + object.enableDebuggingInfo = false; } if (message.session != null && message.hasOwnProperty("session")) object.session = message.session; @@ -45182,6 +45210,8 @@ object.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3.OutputAudioConfig.toObject(message.outputAudioConfig, options); if (message.enablePartialResponse != null && message.hasOwnProperty("enablePartialResponse")) object.enablePartialResponse = message.enablePartialResponse; + if (message.enableDebuggingInfo != null && message.hasOwnProperty("enableDebuggingInfo")) + object.enableDebuggingInfo = message.enableDebuggingInfo; return object; }; @@ -45214,6 +45244,694 @@ return StreamingDetectIntentRequest; })(); + v3.CloudConversationDebuggingInfo = (function() { + + /** + * Properties of a CloudConversationDebuggingInfo. + * @memberof google.cloud.dialogflow.cx.v3 + * @interface ICloudConversationDebuggingInfo + * @property {number|null} [audioDataChunks] CloudConversationDebuggingInfo audioDataChunks + * @property {google.protobuf.IDuration|null} [resultEndTimeOffset] CloudConversationDebuggingInfo resultEndTimeOffset + * @property {google.protobuf.IDuration|null} [firstAudioDuration] CloudConversationDebuggingInfo firstAudioDuration + * @property {boolean|null} [singleUtterance] CloudConversationDebuggingInfo singleUtterance + * @property {Array.|null} [speechPartialResultsEndTimes] CloudConversationDebuggingInfo speechPartialResultsEndTimes + * @property {Array.|null} [speechFinalResultsEndTimes] CloudConversationDebuggingInfo speechFinalResultsEndTimes + * @property {number|null} [partialResponses] CloudConversationDebuggingInfo partialResponses + * @property {number|null} [speakerIdPassiveLatencyMsOffset] CloudConversationDebuggingInfo speakerIdPassiveLatencyMsOffset + * @property {boolean|null} [bargeinEventTriggered] CloudConversationDebuggingInfo bargeinEventTriggered + * @property {boolean|null} [speechSingleUtterance] CloudConversationDebuggingInfo speechSingleUtterance + * @property {Array.|null} [dtmfPartialResultsTimes] CloudConversationDebuggingInfo dtmfPartialResultsTimes + * @property {Array.|null} [dtmfFinalResultsTimes] CloudConversationDebuggingInfo dtmfFinalResultsTimes + * @property {google.protobuf.IDuration|null} [singleUtteranceEndTimeOffset] CloudConversationDebuggingInfo singleUtteranceEndTimeOffset + * @property {google.protobuf.IDuration|null} [noSpeechTimeout] CloudConversationDebuggingInfo noSpeechTimeout + * @property {boolean|null} [isInputText] CloudConversationDebuggingInfo isInputText + * @property {google.protobuf.IDuration|null} [clientHalfCloseTimeOffset] CloudConversationDebuggingInfo clientHalfCloseTimeOffset + * @property {google.protobuf.IDuration|null} [clientHalfCloseStreamingTimeOffset] CloudConversationDebuggingInfo clientHalfCloseStreamingTimeOffset + */ + + /** + * Constructs a new CloudConversationDebuggingInfo. + * @memberof google.cloud.dialogflow.cx.v3 + * @classdesc Represents a CloudConversationDebuggingInfo. + * @implements ICloudConversationDebuggingInfo + * @constructor + * @param {google.cloud.dialogflow.cx.v3.ICloudConversationDebuggingInfo=} [properties] Properties to set + */ + function CloudConversationDebuggingInfo(properties) { + this.speechPartialResultsEndTimes = []; + this.speechFinalResultsEndTimes = []; + this.dtmfPartialResultsTimes = []; + this.dtmfFinalResultsTimes = []; + 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]]; + } + + /** + * CloudConversationDebuggingInfo audioDataChunks. + * @member {number} audioDataChunks + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.audioDataChunks = 0; + + /** + * CloudConversationDebuggingInfo resultEndTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} resultEndTimeOffset + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.resultEndTimeOffset = null; + + /** + * CloudConversationDebuggingInfo firstAudioDuration. + * @member {google.protobuf.IDuration|null|undefined} firstAudioDuration + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.firstAudioDuration = null; + + /** + * CloudConversationDebuggingInfo singleUtterance. + * @member {boolean} singleUtterance + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.singleUtterance = false; + + /** + * CloudConversationDebuggingInfo speechPartialResultsEndTimes. + * @member {Array.} speechPartialResultsEndTimes + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.speechPartialResultsEndTimes = $util.emptyArray; + + /** + * CloudConversationDebuggingInfo speechFinalResultsEndTimes. + * @member {Array.} speechFinalResultsEndTimes + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.speechFinalResultsEndTimes = $util.emptyArray; + + /** + * CloudConversationDebuggingInfo partialResponses. + * @member {number} partialResponses + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.partialResponses = 0; + + /** + * CloudConversationDebuggingInfo speakerIdPassiveLatencyMsOffset. + * @member {number} speakerIdPassiveLatencyMsOffset + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.speakerIdPassiveLatencyMsOffset = 0; + + /** + * CloudConversationDebuggingInfo bargeinEventTriggered. + * @member {boolean} bargeinEventTriggered + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.bargeinEventTriggered = false; + + /** + * CloudConversationDebuggingInfo speechSingleUtterance. + * @member {boolean} speechSingleUtterance + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.speechSingleUtterance = false; + + /** + * CloudConversationDebuggingInfo dtmfPartialResultsTimes. + * @member {Array.} dtmfPartialResultsTimes + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.dtmfPartialResultsTimes = $util.emptyArray; + + /** + * CloudConversationDebuggingInfo dtmfFinalResultsTimes. + * @member {Array.} dtmfFinalResultsTimes + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.dtmfFinalResultsTimes = $util.emptyArray; + + /** + * CloudConversationDebuggingInfo singleUtteranceEndTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} singleUtteranceEndTimeOffset + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.singleUtteranceEndTimeOffset = null; + + /** + * CloudConversationDebuggingInfo noSpeechTimeout. + * @member {google.protobuf.IDuration|null|undefined} noSpeechTimeout + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.noSpeechTimeout = null; + + /** + * CloudConversationDebuggingInfo isInputText. + * @member {boolean} isInputText + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.isInputText = false; + + /** + * CloudConversationDebuggingInfo clientHalfCloseTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} clientHalfCloseTimeOffset + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.clientHalfCloseTimeOffset = null; + + /** + * CloudConversationDebuggingInfo clientHalfCloseStreamingTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} clientHalfCloseStreamingTimeOffset + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.clientHalfCloseStreamingTimeOffset = null; + + /** + * Creates a new CloudConversationDebuggingInfo instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.ICloudConversationDebuggingInfo=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo} CloudConversationDebuggingInfo instance + */ + CloudConversationDebuggingInfo.create = function create(properties) { + return new CloudConversationDebuggingInfo(properties); + }; + + /** + * Encodes the specified CloudConversationDebuggingInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.ICloudConversationDebuggingInfo} message CloudConversationDebuggingInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudConversationDebuggingInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.audioDataChunks != null && Object.hasOwnProperty.call(message, "audioDataChunks")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.audioDataChunks); + if (message.resultEndTimeOffset != null && Object.hasOwnProperty.call(message, "resultEndTimeOffset")) + $root.google.protobuf.Duration.encode(message.resultEndTimeOffset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.firstAudioDuration != null && Object.hasOwnProperty.call(message, "firstAudioDuration")) + $root.google.protobuf.Duration.encode(message.firstAudioDuration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.singleUtterance != null && Object.hasOwnProperty.call(message, "singleUtterance")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.singleUtterance); + if (message.speechPartialResultsEndTimes != null && message.speechPartialResultsEndTimes.length) + for (var i = 0; i < message.speechPartialResultsEndTimes.length; ++i) + $root.google.protobuf.Duration.encode(message.speechPartialResultsEndTimes[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.speechFinalResultsEndTimes != null && message.speechFinalResultsEndTimes.length) + for (var i = 0; i < message.speechFinalResultsEndTimes.length; ++i) + $root.google.protobuf.Duration.encode(message.speechFinalResultsEndTimes[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.partialResponses != null && Object.hasOwnProperty.call(message, "partialResponses")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.partialResponses); + if (message.speakerIdPassiveLatencyMsOffset != null && Object.hasOwnProperty.call(message, "speakerIdPassiveLatencyMsOffset")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.speakerIdPassiveLatencyMsOffset); + if (message.bargeinEventTriggered != null && Object.hasOwnProperty.call(message, "bargeinEventTriggered")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.bargeinEventTriggered); + if (message.speechSingleUtterance != null && Object.hasOwnProperty.call(message, "speechSingleUtterance")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.speechSingleUtterance); + if (message.dtmfPartialResultsTimes != null && message.dtmfPartialResultsTimes.length) + for (var i = 0; i < message.dtmfPartialResultsTimes.length; ++i) + $root.google.protobuf.Duration.encode(message.dtmfPartialResultsTimes[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.dtmfFinalResultsTimes != null && message.dtmfFinalResultsTimes.length) + for (var i = 0; i < message.dtmfFinalResultsTimes.length; ++i) + $root.google.protobuf.Duration.encode(message.dtmfFinalResultsTimes[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.singleUtteranceEndTimeOffset != null && Object.hasOwnProperty.call(message, "singleUtteranceEndTimeOffset")) + $root.google.protobuf.Duration.encode(message.singleUtteranceEndTimeOffset, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.noSpeechTimeout != null && Object.hasOwnProperty.call(message, "noSpeechTimeout")) + $root.google.protobuf.Duration.encode(message.noSpeechTimeout, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.isInputText != null && Object.hasOwnProperty.call(message, "isInputText")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.isInputText); + if (message.clientHalfCloseTimeOffset != null && Object.hasOwnProperty.call(message, "clientHalfCloseTimeOffset")) + $root.google.protobuf.Duration.encode(message.clientHalfCloseTimeOffset, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.clientHalfCloseStreamingTimeOffset != null && Object.hasOwnProperty.call(message, "clientHalfCloseStreamingTimeOffset")) + $root.google.protobuf.Duration.encode(message.clientHalfCloseStreamingTimeOffset, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CloudConversationDebuggingInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.ICloudConversationDebuggingInfo} message CloudConversationDebuggingInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudConversationDebuggingInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudConversationDebuggingInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo} CloudConversationDebuggingInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudConversationDebuggingInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.audioDataChunks = reader.int32(); + break; + } + case 2: { + message.resultEndTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 3: { + message.firstAudioDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 5: { + message.singleUtterance = reader.bool(); + break; + } + case 6: { + if (!(message.speechPartialResultsEndTimes && message.speechPartialResultsEndTimes.length)) + message.speechPartialResultsEndTimes = []; + message.speechPartialResultsEndTimes.push($root.google.protobuf.Duration.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.speechFinalResultsEndTimes && message.speechFinalResultsEndTimes.length)) + message.speechFinalResultsEndTimes = []; + message.speechFinalResultsEndTimes.push($root.google.protobuf.Duration.decode(reader, reader.uint32())); + break; + } + case 8: { + message.partialResponses = reader.int32(); + break; + } + case 9: { + message.speakerIdPassiveLatencyMsOffset = reader.int32(); + break; + } + case 10: { + message.bargeinEventTriggered = reader.bool(); + break; + } + case 11: { + message.speechSingleUtterance = reader.bool(); + break; + } + case 12: { + if (!(message.dtmfPartialResultsTimes && message.dtmfPartialResultsTimes.length)) + message.dtmfPartialResultsTimes = []; + message.dtmfPartialResultsTimes.push($root.google.protobuf.Duration.decode(reader, reader.uint32())); + break; + } + case 13: { + if (!(message.dtmfFinalResultsTimes && message.dtmfFinalResultsTimes.length)) + message.dtmfFinalResultsTimes = []; + message.dtmfFinalResultsTimes.push($root.google.protobuf.Duration.decode(reader, reader.uint32())); + break; + } + case 14: { + message.singleUtteranceEndTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 15: { + message.noSpeechTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 16: { + message.isInputText = reader.bool(); + break; + } + case 17: { + message.clientHalfCloseTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 18: { + message.clientHalfCloseStreamingTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudConversationDebuggingInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo} CloudConversationDebuggingInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudConversationDebuggingInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudConversationDebuggingInfo message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudConversationDebuggingInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.audioDataChunks != null && message.hasOwnProperty("audioDataChunks")) + if (!$util.isInteger(message.audioDataChunks)) + return "audioDataChunks: integer expected"; + if (message.resultEndTimeOffset != null && message.hasOwnProperty("resultEndTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.resultEndTimeOffset); + if (error) + return "resultEndTimeOffset." + error; + } + if (message.firstAudioDuration != null && message.hasOwnProperty("firstAudioDuration")) { + var error = $root.google.protobuf.Duration.verify(message.firstAudioDuration); + if (error) + return "firstAudioDuration." + error; + } + if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) + if (typeof message.singleUtterance !== "boolean") + return "singleUtterance: boolean expected"; + if (message.speechPartialResultsEndTimes != null && message.hasOwnProperty("speechPartialResultsEndTimes")) { + if (!Array.isArray(message.speechPartialResultsEndTimes)) + return "speechPartialResultsEndTimes: array expected"; + for (var i = 0; i < message.speechPartialResultsEndTimes.length; ++i) { + var error = $root.google.protobuf.Duration.verify(message.speechPartialResultsEndTimes[i]); + if (error) + return "speechPartialResultsEndTimes." + error; + } + } + if (message.speechFinalResultsEndTimes != null && message.hasOwnProperty("speechFinalResultsEndTimes")) { + if (!Array.isArray(message.speechFinalResultsEndTimes)) + return "speechFinalResultsEndTimes: array expected"; + for (var i = 0; i < message.speechFinalResultsEndTimes.length; ++i) { + var error = $root.google.protobuf.Duration.verify(message.speechFinalResultsEndTimes[i]); + if (error) + return "speechFinalResultsEndTimes." + error; + } + } + if (message.partialResponses != null && message.hasOwnProperty("partialResponses")) + if (!$util.isInteger(message.partialResponses)) + return "partialResponses: integer expected"; + if (message.speakerIdPassiveLatencyMsOffset != null && message.hasOwnProperty("speakerIdPassiveLatencyMsOffset")) + if (!$util.isInteger(message.speakerIdPassiveLatencyMsOffset)) + return "speakerIdPassiveLatencyMsOffset: integer expected"; + if (message.bargeinEventTriggered != null && message.hasOwnProperty("bargeinEventTriggered")) + if (typeof message.bargeinEventTriggered !== "boolean") + return "bargeinEventTriggered: boolean expected"; + if (message.speechSingleUtterance != null && message.hasOwnProperty("speechSingleUtterance")) + if (typeof message.speechSingleUtterance !== "boolean") + return "speechSingleUtterance: boolean expected"; + if (message.dtmfPartialResultsTimes != null && message.hasOwnProperty("dtmfPartialResultsTimes")) { + if (!Array.isArray(message.dtmfPartialResultsTimes)) + return "dtmfPartialResultsTimes: array expected"; + for (var i = 0; i < message.dtmfPartialResultsTimes.length; ++i) { + var error = $root.google.protobuf.Duration.verify(message.dtmfPartialResultsTimes[i]); + if (error) + return "dtmfPartialResultsTimes." + error; + } + } + if (message.dtmfFinalResultsTimes != null && message.hasOwnProperty("dtmfFinalResultsTimes")) { + if (!Array.isArray(message.dtmfFinalResultsTimes)) + return "dtmfFinalResultsTimes: array expected"; + for (var i = 0; i < message.dtmfFinalResultsTimes.length; ++i) { + var error = $root.google.protobuf.Duration.verify(message.dtmfFinalResultsTimes[i]); + if (error) + return "dtmfFinalResultsTimes." + error; + } + } + if (message.singleUtteranceEndTimeOffset != null && message.hasOwnProperty("singleUtteranceEndTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.singleUtteranceEndTimeOffset); + if (error) + return "singleUtteranceEndTimeOffset." + error; + } + if (message.noSpeechTimeout != null && message.hasOwnProperty("noSpeechTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.noSpeechTimeout); + if (error) + return "noSpeechTimeout." + error; + } + if (message.isInputText != null && message.hasOwnProperty("isInputText")) + if (typeof message.isInputText !== "boolean") + return "isInputText: boolean expected"; + if (message.clientHalfCloseTimeOffset != null && message.hasOwnProperty("clientHalfCloseTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.clientHalfCloseTimeOffset); + if (error) + return "clientHalfCloseTimeOffset." + error; + } + if (message.clientHalfCloseStreamingTimeOffset != null && message.hasOwnProperty("clientHalfCloseStreamingTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.clientHalfCloseStreamingTimeOffset); + if (error) + return "clientHalfCloseStreamingTimeOffset." + error; + } + return null; + }; + + /** + * Creates a CloudConversationDebuggingInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo} CloudConversationDebuggingInfo + */ + CloudConversationDebuggingInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo(); + if (object.audioDataChunks != null) + message.audioDataChunks = object.audioDataChunks | 0; + if (object.resultEndTimeOffset != null) { + if (typeof object.resultEndTimeOffset !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.resultEndTimeOffset: object expected"); + message.resultEndTimeOffset = $root.google.protobuf.Duration.fromObject(object.resultEndTimeOffset); + } + if (object.firstAudioDuration != null) { + if (typeof object.firstAudioDuration !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.firstAudioDuration: object expected"); + message.firstAudioDuration = $root.google.protobuf.Duration.fromObject(object.firstAudioDuration); + } + if (object.singleUtterance != null) + message.singleUtterance = Boolean(object.singleUtterance); + if (object.speechPartialResultsEndTimes) { + if (!Array.isArray(object.speechPartialResultsEndTimes)) + throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.speechPartialResultsEndTimes: array expected"); + message.speechPartialResultsEndTimes = []; + for (var i = 0; i < object.speechPartialResultsEndTimes.length; ++i) { + if (typeof object.speechPartialResultsEndTimes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.speechPartialResultsEndTimes: object expected"); + message.speechPartialResultsEndTimes[i] = $root.google.protobuf.Duration.fromObject(object.speechPartialResultsEndTimes[i]); + } + } + if (object.speechFinalResultsEndTimes) { + if (!Array.isArray(object.speechFinalResultsEndTimes)) + throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.speechFinalResultsEndTimes: array expected"); + message.speechFinalResultsEndTimes = []; + for (var i = 0; i < object.speechFinalResultsEndTimes.length; ++i) { + if (typeof object.speechFinalResultsEndTimes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.speechFinalResultsEndTimes: object expected"); + message.speechFinalResultsEndTimes[i] = $root.google.protobuf.Duration.fromObject(object.speechFinalResultsEndTimes[i]); + } + } + if (object.partialResponses != null) + message.partialResponses = object.partialResponses | 0; + if (object.speakerIdPassiveLatencyMsOffset != null) + message.speakerIdPassiveLatencyMsOffset = object.speakerIdPassiveLatencyMsOffset | 0; + if (object.bargeinEventTriggered != null) + message.bargeinEventTriggered = Boolean(object.bargeinEventTriggered); + if (object.speechSingleUtterance != null) + message.speechSingleUtterance = Boolean(object.speechSingleUtterance); + if (object.dtmfPartialResultsTimes) { + if (!Array.isArray(object.dtmfPartialResultsTimes)) + throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.dtmfPartialResultsTimes: array expected"); + message.dtmfPartialResultsTimes = []; + for (var i = 0; i < object.dtmfPartialResultsTimes.length; ++i) { + if (typeof object.dtmfPartialResultsTimes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.dtmfPartialResultsTimes: object expected"); + message.dtmfPartialResultsTimes[i] = $root.google.protobuf.Duration.fromObject(object.dtmfPartialResultsTimes[i]); + } + } + if (object.dtmfFinalResultsTimes) { + if (!Array.isArray(object.dtmfFinalResultsTimes)) + throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.dtmfFinalResultsTimes: array expected"); + message.dtmfFinalResultsTimes = []; + for (var i = 0; i < object.dtmfFinalResultsTimes.length; ++i) { + if (typeof object.dtmfFinalResultsTimes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.dtmfFinalResultsTimes: object expected"); + message.dtmfFinalResultsTimes[i] = $root.google.protobuf.Duration.fromObject(object.dtmfFinalResultsTimes[i]); + } + } + if (object.singleUtteranceEndTimeOffset != null) { + if (typeof object.singleUtteranceEndTimeOffset !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.singleUtteranceEndTimeOffset: object expected"); + message.singleUtteranceEndTimeOffset = $root.google.protobuf.Duration.fromObject(object.singleUtteranceEndTimeOffset); + } + if (object.noSpeechTimeout != null) { + if (typeof object.noSpeechTimeout !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.noSpeechTimeout: object expected"); + message.noSpeechTimeout = $root.google.protobuf.Duration.fromObject(object.noSpeechTimeout); + } + if (object.isInputText != null) + message.isInputText = Boolean(object.isInputText); + if (object.clientHalfCloseTimeOffset != null) { + if (typeof object.clientHalfCloseTimeOffset !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.clientHalfCloseTimeOffset: object expected"); + message.clientHalfCloseTimeOffset = $root.google.protobuf.Duration.fromObject(object.clientHalfCloseTimeOffset); + } + if (object.clientHalfCloseStreamingTimeOffset != null) { + if (typeof object.clientHalfCloseStreamingTimeOffset !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.clientHalfCloseStreamingTimeOffset: object expected"); + message.clientHalfCloseStreamingTimeOffset = $root.google.protobuf.Duration.fromObject(object.clientHalfCloseStreamingTimeOffset); + } + return message; + }; + + /** + * Creates a plain object from a CloudConversationDebuggingInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @static + * @param {google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo} message CloudConversationDebuggingInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudConversationDebuggingInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.speechPartialResultsEndTimes = []; + object.speechFinalResultsEndTimes = []; + object.dtmfPartialResultsTimes = []; + object.dtmfFinalResultsTimes = []; + } + if (options.defaults) { + object.audioDataChunks = 0; + object.resultEndTimeOffset = null; + object.firstAudioDuration = null; + object.singleUtterance = false; + object.partialResponses = 0; + object.speakerIdPassiveLatencyMsOffset = 0; + object.bargeinEventTriggered = false; + object.speechSingleUtterance = false; + object.singleUtteranceEndTimeOffset = null; + object.noSpeechTimeout = null; + object.isInputText = false; + object.clientHalfCloseTimeOffset = null; + object.clientHalfCloseStreamingTimeOffset = null; + } + if (message.audioDataChunks != null && message.hasOwnProperty("audioDataChunks")) + object.audioDataChunks = message.audioDataChunks; + if (message.resultEndTimeOffset != null && message.hasOwnProperty("resultEndTimeOffset")) + object.resultEndTimeOffset = $root.google.protobuf.Duration.toObject(message.resultEndTimeOffset, options); + if (message.firstAudioDuration != null && message.hasOwnProperty("firstAudioDuration")) + object.firstAudioDuration = $root.google.protobuf.Duration.toObject(message.firstAudioDuration, options); + if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) + object.singleUtterance = message.singleUtterance; + if (message.speechPartialResultsEndTimes && message.speechPartialResultsEndTimes.length) { + object.speechPartialResultsEndTimes = []; + for (var j = 0; j < message.speechPartialResultsEndTimes.length; ++j) + object.speechPartialResultsEndTimes[j] = $root.google.protobuf.Duration.toObject(message.speechPartialResultsEndTimes[j], options); + } + if (message.speechFinalResultsEndTimes && message.speechFinalResultsEndTimes.length) { + object.speechFinalResultsEndTimes = []; + for (var j = 0; j < message.speechFinalResultsEndTimes.length; ++j) + object.speechFinalResultsEndTimes[j] = $root.google.protobuf.Duration.toObject(message.speechFinalResultsEndTimes[j], options); + } + if (message.partialResponses != null && message.hasOwnProperty("partialResponses")) + object.partialResponses = message.partialResponses; + if (message.speakerIdPassiveLatencyMsOffset != null && message.hasOwnProperty("speakerIdPassiveLatencyMsOffset")) + object.speakerIdPassiveLatencyMsOffset = message.speakerIdPassiveLatencyMsOffset; + if (message.bargeinEventTriggered != null && message.hasOwnProperty("bargeinEventTriggered")) + object.bargeinEventTriggered = message.bargeinEventTriggered; + if (message.speechSingleUtterance != null && message.hasOwnProperty("speechSingleUtterance")) + object.speechSingleUtterance = message.speechSingleUtterance; + if (message.dtmfPartialResultsTimes && message.dtmfPartialResultsTimes.length) { + object.dtmfPartialResultsTimes = []; + for (var j = 0; j < message.dtmfPartialResultsTimes.length; ++j) + object.dtmfPartialResultsTimes[j] = $root.google.protobuf.Duration.toObject(message.dtmfPartialResultsTimes[j], options); + } + if (message.dtmfFinalResultsTimes && message.dtmfFinalResultsTimes.length) { + object.dtmfFinalResultsTimes = []; + for (var j = 0; j < message.dtmfFinalResultsTimes.length; ++j) + object.dtmfFinalResultsTimes[j] = $root.google.protobuf.Duration.toObject(message.dtmfFinalResultsTimes[j], options); + } + if (message.singleUtteranceEndTimeOffset != null && message.hasOwnProperty("singleUtteranceEndTimeOffset")) + object.singleUtteranceEndTimeOffset = $root.google.protobuf.Duration.toObject(message.singleUtteranceEndTimeOffset, options); + if (message.noSpeechTimeout != null && message.hasOwnProperty("noSpeechTimeout")) + object.noSpeechTimeout = $root.google.protobuf.Duration.toObject(message.noSpeechTimeout, options); + if (message.isInputText != null && message.hasOwnProperty("isInputText")) + object.isInputText = message.isInputText; + if (message.clientHalfCloseTimeOffset != null && message.hasOwnProperty("clientHalfCloseTimeOffset")) + object.clientHalfCloseTimeOffset = $root.google.protobuf.Duration.toObject(message.clientHalfCloseTimeOffset, options); + if (message.clientHalfCloseStreamingTimeOffset != null && message.hasOwnProperty("clientHalfCloseStreamingTimeOffset")) + object.clientHalfCloseStreamingTimeOffset = $root.google.protobuf.Duration.toObject(message.clientHalfCloseStreamingTimeOffset, options); + return object; + }; + + /** + * Converts this CloudConversationDebuggingInfo to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @instance + * @returns {Object.} JSON object + */ + CloudConversationDebuggingInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudConversationDebuggingInfo + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudConversationDebuggingInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo"; + }; + + return CloudConversationDebuggingInfo; + })(); + v3.StreamingDetectIntentResponse = (function() { /** @@ -45222,6 +45940,7 @@ * @interface IStreamingDetectIntentResponse * @property {google.cloud.dialogflow.cx.v3.IStreamingRecognitionResult|null} [recognitionResult] StreamingDetectIntentResponse recognitionResult * @property {google.cloud.dialogflow.cx.v3.IDetectIntentResponse|null} [detectIntentResponse] StreamingDetectIntentResponse detectIntentResponse + * @property {google.cloud.dialogflow.cx.v3.ICloudConversationDebuggingInfo|null} [debuggingInfo] StreamingDetectIntentResponse debuggingInfo */ /** @@ -45255,6 +45974,14 @@ */ StreamingDetectIntentResponse.prototype.detectIntentResponse = null; + /** + * StreamingDetectIntentResponse debuggingInfo. + * @member {google.cloud.dialogflow.cx.v3.ICloudConversationDebuggingInfo|null|undefined} debuggingInfo + * @memberof google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse + * @instance + */ + StreamingDetectIntentResponse.prototype.debuggingInfo = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -45297,6 +46024,8 @@ $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.encode(message.recognitionResult, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.detectIntentResponse != null && Object.hasOwnProperty.call(message, "detectIntentResponse")) $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse.encode(message.detectIntentResponse, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.debuggingInfo != null && Object.hasOwnProperty.call(message, "debuggingInfo")) + $root.google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.encode(message.debuggingInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -45339,6 +46068,10 @@ message.detectIntentResponse = $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse.decode(reader, reader.uint32()); break; } + case 4: { + message.debuggingInfo = $root.google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -45393,6 +46126,11 @@ return "detectIntentResponse." + error; } } + if (message.debuggingInfo != null && message.hasOwnProperty("debuggingInfo")) { + var error = $root.google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.verify(message.debuggingInfo); + if (error) + return "debuggingInfo." + error; + } return null; }; @@ -45418,6 +46156,11 @@ throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse.detectIntentResponse: object expected"); message.detectIntentResponse = $root.google.cloud.dialogflow.cx.v3.DetectIntentResponse.fromObject(object.detectIntentResponse); } + if (object.debuggingInfo != null) { + if (typeof object.debuggingInfo !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse.debuggingInfo: object expected"); + message.debuggingInfo = $root.google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.fromObject(object.debuggingInfo); + } return message; }; @@ -45434,6 +46177,8 @@ if (!options) options = {}; var object = {}; + if (options.defaults) + object.debuggingInfo = null; if (message.recognitionResult != null && message.hasOwnProperty("recognitionResult")) { object.recognitionResult = $root.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.toObject(message.recognitionResult, options); if (options.oneofs) @@ -45444,6 +46189,8 @@ if (options.oneofs) object.response = "detectIntentResponse"; } + if (message.debuggingInfo != null && message.hasOwnProperty("debuggingInfo")) + object.debuggingInfo = $root.google.cloud.dialogflow.cx.v3.CloudConversationDebuggingInfo.toObject(message.debuggingInfo, options); return object; }; @@ -56839,6 +57586,7 @@ * @property {string|null} [triggerIntent] WebhookRequest triggerIntent * @property {string|null} [transcript] WebhookRequest transcript * @property {string|null} [triggerEvent] WebhookRequest triggerEvent + * @property {string|null} [dtmfDigits] WebhookRequest dtmfDigits * @property {string|null} [languageCode] WebhookRequest languageCode * @property {google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo|null} [fulfillmentInfo] WebhookRequest fulfillmentInfo * @property {google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo|null} [intentInfo] WebhookRequest intentInfo @@ -56905,6 +57653,14 @@ */ WebhookRequest.prototype.triggerEvent = null; + /** + * WebhookRequest dtmfDigits. + * @member {string|null|undefined} dtmfDigits + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @instance + */ + WebhookRequest.prototype.dtmfDigits = null; + /** * WebhookRequest languageCode. * @member {string} languageCode @@ -56974,12 +57730,12 @@ /** * WebhookRequest query. - * @member {"text"|"triggerIntent"|"transcript"|"triggerEvent"|undefined} query + * @member {"text"|"triggerIntent"|"transcript"|"triggerEvent"|"dtmfDigits"|undefined} query * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest * @instance */ Object.defineProperty(WebhookRequest.prototype, "query", { - get: $util.oneOfGetter($oneOfFields = ["text", "triggerIntent", "transcript", "triggerEvent"]), + get: $util.oneOfGetter($oneOfFields = ["text", "triggerIntent", "transcript", "triggerEvent", "dtmfDigits"]), set: $util.oneOfSetter($oneOfFields) }); @@ -57034,6 +57790,8 @@ writer.uint32(/* id 14, wireType 2 =*/114).string(message.triggerEvent); if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) writer.uint32(/* id 15, wireType 2 =*/122).string(message.languageCode); + if (message.dtmfDigits != null && Object.hasOwnProperty.call(message, "dtmfDigits")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.dtmfDigits); return writer; }; @@ -57088,6 +57846,10 @@ message.triggerEvent = reader.string(); break; } + case 17: { + message.dtmfDigits = reader.string(); + break; + } case 15: { message.languageCode = reader.string(); break; @@ -57187,6 +57949,13 @@ if (!$util.isString(message.triggerEvent)) return "triggerEvent: string expected"; } + if (message.dtmfDigits != null && message.hasOwnProperty("dtmfDigits")) { + if (properties.query === 1) + return "query: multiple values"; + properties.query = 1; + if (!$util.isString(message.dtmfDigits)) + return "dtmfDigits: string expected"; + } if (message.languageCode != null && message.hasOwnProperty("languageCode")) if (!$util.isString(message.languageCode)) return "languageCode: string expected"; @@ -57254,6 +58023,8 @@ message.transcript = String(object.transcript); if (object.triggerEvent != null) message.triggerEvent = String(object.triggerEvent); + if (object.dtmfDigits != null) + message.dtmfDigits = String(object.dtmfDigits); if (object.languageCode != null) message.languageCode = String(object.languageCode); if (object.fulfillmentInfo != null) { @@ -57365,6 +58136,11 @@ } if (message.languageCode != null && message.hasOwnProperty("languageCode")) object.languageCode = message.languageCode; + if (message.dtmfDigits != null && message.hasOwnProperty("dtmfDigits")) { + object.dtmfDigits = message.dtmfDigits; + if (options.oneofs) + object.query = "dtmfDigits"; + } return object; }; @@ -104134,6 +104910,7 @@ case 2: case 3: case 4: + case 5: break; } if (message.description != null && message.hasOwnProperty("description")) @@ -104181,6 +104958,10 @@ case 4: message.type = 4; break; + case "FLOW": + case 5: + message.type = 5; + break; } if (object.description != null) message.description = String(object.description); @@ -104246,6 +105027,7 @@ * @property {number} PAGE=2 PAGE value * @property {number} PARAMETERS=3 PARAMETERS value * @property {number} UTTERANCE=4 UTTERANCE value + * @property {number} FLOW=5 FLOW value */ TestRunDifference.DiffType = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -104254,6 +105036,7 @@ values[valuesById[2] = "PAGE"] = 2; values[valuesById[3] = "PARAMETERS"] = 3; values[valuesById[4] = "UTTERANCE"] = 4; + values[valuesById[5] = "FLOW"] = 5; return values; })(); @@ -116271,6 +117054,7 @@ * @property {google.cloud.dialogflow.cx.v3beta1.IQueryInput|null} [queryInput] StreamingDetectIntentRequest queryInput * @property {google.cloud.dialogflow.cx.v3beta1.IOutputAudioConfig|null} [outputAudioConfig] StreamingDetectIntentRequest outputAudioConfig * @property {boolean|null} [enablePartialResponse] StreamingDetectIntentRequest enablePartialResponse + * @property {boolean|null} [enableDebuggingInfo] StreamingDetectIntentRequest enableDebuggingInfo */ /** @@ -116328,6 +117112,14 @@ */ StreamingDetectIntentRequest.prototype.enablePartialResponse = false; + /** + * StreamingDetectIntentRequest enableDebuggingInfo. + * @member {boolean} enableDebuggingInfo + * @memberof google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentRequest + * @instance + */ + StreamingDetectIntentRequest.prototype.enableDebuggingInfo = false; + /** * Creates a new StreamingDetectIntentRequest instance using the specified properties. * @function create @@ -116362,6 +117154,8 @@ $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.encode(message.outputAudioConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.enablePartialResponse != null && Object.hasOwnProperty.call(message, "enablePartialResponse")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.enablePartialResponse); + if (message.enableDebuggingInfo != null && Object.hasOwnProperty.call(message, "enableDebuggingInfo")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.enableDebuggingInfo); return writer; }; @@ -116416,6 +117210,10 @@ message.enablePartialResponse = reader.bool(); break; } + case 8: { + message.enableDebuggingInfo = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -116472,6 +117270,9 @@ if (message.enablePartialResponse != null && message.hasOwnProperty("enablePartialResponse")) if (typeof message.enablePartialResponse !== "boolean") return "enablePartialResponse: boolean expected"; + if (message.enableDebuggingInfo != null && message.hasOwnProperty("enableDebuggingInfo")) + if (typeof message.enableDebuggingInfo !== "boolean") + return "enableDebuggingInfo: boolean expected"; return null; }; @@ -116506,6 +117307,8 @@ } if (object.enablePartialResponse != null) message.enablePartialResponse = Boolean(object.enablePartialResponse); + if (object.enableDebuggingInfo != null) + message.enableDebuggingInfo = Boolean(object.enableDebuggingInfo); return message; }; @@ -116528,6 +117331,7 @@ object.queryInput = null; object.outputAudioConfig = null; object.enablePartialResponse = false; + object.enableDebuggingInfo = false; } if (message.session != null && message.hasOwnProperty("session")) object.session = message.session; @@ -116539,6 +117343,8 @@ object.outputAudioConfig = $root.google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.toObject(message.outputAudioConfig, options); if (message.enablePartialResponse != null && message.hasOwnProperty("enablePartialResponse")) object.enablePartialResponse = message.enablePartialResponse; + if (message.enableDebuggingInfo != null && message.hasOwnProperty("enableDebuggingInfo")) + object.enableDebuggingInfo = message.enableDebuggingInfo; return object; }; @@ -116571,6 +117377,694 @@ return StreamingDetectIntentRequest; })(); + v3beta1.CloudConversationDebuggingInfo = (function() { + + /** + * Properties of a CloudConversationDebuggingInfo. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @interface ICloudConversationDebuggingInfo + * @property {number|null} [audioDataChunks] CloudConversationDebuggingInfo audioDataChunks + * @property {google.protobuf.IDuration|null} [resultEndTimeOffset] CloudConversationDebuggingInfo resultEndTimeOffset + * @property {google.protobuf.IDuration|null} [firstAudioDuration] CloudConversationDebuggingInfo firstAudioDuration + * @property {boolean|null} [singleUtterance] CloudConversationDebuggingInfo singleUtterance + * @property {Array.|null} [speechPartialResultsEndTimes] CloudConversationDebuggingInfo speechPartialResultsEndTimes + * @property {Array.|null} [speechFinalResultsEndTimes] CloudConversationDebuggingInfo speechFinalResultsEndTimes + * @property {number|null} [partialResponses] CloudConversationDebuggingInfo partialResponses + * @property {number|null} [speakerIdPassiveLatencyMsOffset] CloudConversationDebuggingInfo speakerIdPassiveLatencyMsOffset + * @property {boolean|null} [bargeinEventTriggered] CloudConversationDebuggingInfo bargeinEventTriggered + * @property {boolean|null} [speechSingleUtterance] CloudConversationDebuggingInfo speechSingleUtterance + * @property {Array.|null} [dtmfPartialResultsTimes] CloudConversationDebuggingInfo dtmfPartialResultsTimes + * @property {Array.|null} [dtmfFinalResultsTimes] CloudConversationDebuggingInfo dtmfFinalResultsTimes + * @property {google.protobuf.IDuration|null} [singleUtteranceEndTimeOffset] CloudConversationDebuggingInfo singleUtteranceEndTimeOffset + * @property {google.protobuf.IDuration|null} [noSpeechTimeout] CloudConversationDebuggingInfo noSpeechTimeout + * @property {boolean|null} [isInputText] CloudConversationDebuggingInfo isInputText + * @property {google.protobuf.IDuration|null} [clientHalfCloseTimeOffset] CloudConversationDebuggingInfo clientHalfCloseTimeOffset + * @property {google.protobuf.IDuration|null} [clientHalfCloseStreamingTimeOffset] CloudConversationDebuggingInfo clientHalfCloseStreamingTimeOffset + */ + + /** + * Constructs a new CloudConversationDebuggingInfo. + * @memberof google.cloud.dialogflow.cx.v3beta1 + * @classdesc Represents a CloudConversationDebuggingInfo. + * @implements ICloudConversationDebuggingInfo + * @constructor + * @param {google.cloud.dialogflow.cx.v3beta1.ICloudConversationDebuggingInfo=} [properties] Properties to set + */ + function CloudConversationDebuggingInfo(properties) { + this.speechPartialResultsEndTimes = []; + this.speechFinalResultsEndTimes = []; + this.dtmfPartialResultsTimes = []; + this.dtmfFinalResultsTimes = []; + 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]]; + } + + /** + * CloudConversationDebuggingInfo audioDataChunks. + * @member {number} audioDataChunks + * @memberof google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.audioDataChunks = 0; + + /** + * CloudConversationDebuggingInfo resultEndTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} resultEndTimeOffset + * @memberof google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.resultEndTimeOffset = null; + + /** + * CloudConversationDebuggingInfo firstAudioDuration. + * @member {google.protobuf.IDuration|null|undefined} firstAudioDuration + * @memberof google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.firstAudioDuration = null; + + /** + * CloudConversationDebuggingInfo singleUtterance. + * @member {boolean} singleUtterance + * @memberof google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.singleUtterance = false; + + /** + * CloudConversationDebuggingInfo speechPartialResultsEndTimes. + * @member {Array.} speechPartialResultsEndTimes + * @memberof google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.speechPartialResultsEndTimes = $util.emptyArray; + + /** + * CloudConversationDebuggingInfo speechFinalResultsEndTimes. + * @member {Array.} speechFinalResultsEndTimes + * @memberof google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.speechFinalResultsEndTimes = $util.emptyArray; + + /** + * CloudConversationDebuggingInfo partialResponses. + * @member {number} partialResponses + * @memberof google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.partialResponses = 0; + + /** + * CloudConversationDebuggingInfo speakerIdPassiveLatencyMsOffset. + * @member {number} speakerIdPassiveLatencyMsOffset + * @memberof google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.speakerIdPassiveLatencyMsOffset = 0; + + /** + * CloudConversationDebuggingInfo bargeinEventTriggered. + * @member {boolean} bargeinEventTriggered + * @memberof google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.bargeinEventTriggered = false; + + /** + * CloudConversationDebuggingInfo speechSingleUtterance. + * @member {boolean} speechSingleUtterance + * @memberof google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.speechSingleUtterance = false; + + /** + * CloudConversationDebuggingInfo dtmfPartialResultsTimes. + * @member {Array.} dtmfPartialResultsTimes + * @memberof google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.dtmfPartialResultsTimes = $util.emptyArray; + + /** + * CloudConversationDebuggingInfo dtmfFinalResultsTimes. + * @member {Array.} dtmfFinalResultsTimes + * @memberof google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.dtmfFinalResultsTimes = $util.emptyArray; + + /** + * CloudConversationDebuggingInfo singleUtteranceEndTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} singleUtteranceEndTimeOffset + * @memberof google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.singleUtteranceEndTimeOffset = null; + + /** + * CloudConversationDebuggingInfo noSpeechTimeout. + * @member {google.protobuf.IDuration|null|undefined} noSpeechTimeout + * @memberof google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.noSpeechTimeout = null; + + /** + * CloudConversationDebuggingInfo isInputText. + * @member {boolean} isInputText + * @memberof google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.isInputText = false; + + /** + * CloudConversationDebuggingInfo clientHalfCloseTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} clientHalfCloseTimeOffset + * @memberof google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.clientHalfCloseTimeOffset = null; + + /** + * CloudConversationDebuggingInfo clientHalfCloseStreamingTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} clientHalfCloseStreamingTimeOffset + * @memberof google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.clientHalfCloseStreamingTimeOffset = null; + + /** + * Creates a new CloudConversationDebuggingInfo instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ICloudConversationDebuggingInfo=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo} CloudConversationDebuggingInfo instance + */ + CloudConversationDebuggingInfo.create = function create(properties) { + return new CloudConversationDebuggingInfo(properties); + }; + + /** + * Encodes the specified CloudConversationDebuggingInfo message. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ICloudConversationDebuggingInfo} message CloudConversationDebuggingInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudConversationDebuggingInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.audioDataChunks != null && Object.hasOwnProperty.call(message, "audioDataChunks")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.audioDataChunks); + if (message.resultEndTimeOffset != null && Object.hasOwnProperty.call(message, "resultEndTimeOffset")) + $root.google.protobuf.Duration.encode(message.resultEndTimeOffset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.firstAudioDuration != null && Object.hasOwnProperty.call(message, "firstAudioDuration")) + $root.google.protobuf.Duration.encode(message.firstAudioDuration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.singleUtterance != null && Object.hasOwnProperty.call(message, "singleUtterance")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.singleUtterance); + if (message.speechPartialResultsEndTimes != null && message.speechPartialResultsEndTimes.length) + for (var i = 0; i < message.speechPartialResultsEndTimes.length; ++i) + $root.google.protobuf.Duration.encode(message.speechPartialResultsEndTimes[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.speechFinalResultsEndTimes != null && message.speechFinalResultsEndTimes.length) + for (var i = 0; i < message.speechFinalResultsEndTimes.length; ++i) + $root.google.protobuf.Duration.encode(message.speechFinalResultsEndTimes[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.partialResponses != null && Object.hasOwnProperty.call(message, "partialResponses")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.partialResponses); + if (message.speakerIdPassiveLatencyMsOffset != null && Object.hasOwnProperty.call(message, "speakerIdPassiveLatencyMsOffset")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.speakerIdPassiveLatencyMsOffset); + if (message.bargeinEventTriggered != null && Object.hasOwnProperty.call(message, "bargeinEventTriggered")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.bargeinEventTriggered); + if (message.speechSingleUtterance != null && Object.hasOwnProperty.call(message, "speechSingleUtterance")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.speechSingleUtterance); + if (message.dtmfPartialResultsTimes != null && message.dtmfPartialResultsTimes.length) + for (var i = 0; i < message.dtmfPartialResultsTimes.length; ++i) + $root.google.protobuf.Duration.encode(message.dtmfPartialResultsTimes[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.dtmfFinalResultsTimes != null && message.dtmfFinalResultsTimes.length) + for (var i = 0; i < message.dtmfFinalResultsTimes.length; ++i) + $root.google.protobuf.Duration.encode(message.dtmfFinalResultsTimes[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.singleUtteranceEndTimeOffset != null && Object.hasOwnProperty.call(message, "singleUtteranceEndTimeOffset")) + $root.google.protobuf.Duration.encode(message.singleUtteranceEndTimeOffset, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.noSpeechTimeout != null && Object.hasOwnProperty.call(message, "noSpeechTimeout")) + $root.google.protobuf.Duration.encode(message.noSpeechTimeout, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.isInputText != null && Object.hasOwnProperty.call(message, "isInputText")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.isInputText); + if (message.clientHalfCloseTimeOffset != null && Object.hasOwnProperty.call(message, "clientHalfCloseTimeOffset")) + $root.google.protobuf.Duration.encode(message.clientHalfCloseTimeOffset, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.clientHalfCloseStreamingTimeOffset != null && Object.hasOwnProperty.call(message, "clientHalfCloseStreamingTimeOffset")) + $root.google.protobuf.Duration.encode(message.clientHalfCloseStreamingTimeOffset, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CloudConversationDebuggingInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.ICloudConversationDebuggingInfo} message CloudConversationDebuggingInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudConversationDebuggingInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudConversationDebuggingInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo} CloudConversationDebuggingInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudConversationDebuggingInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.audioDataChunks = reader.int32(); + break; + } + case 2: { + message.resultEndTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 3: { + message.firstAudioDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 5: { + message.singleUtterance = reader.bool(); + break; + } + case 6: { + if (!(message.speechPartialResultsEndTimes && message.speechPartialResultsEndTimes.length)) + message.speechPartialResultsEndTimes = []; + message.speechPartialResultsEndTimes.push($root.google.protobuf.Duration.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.speechFinalResultsEndTimes && message.speechFinalResultsEndTimes.length)) + message.speechFinalResultsEndTimes = []; + message.speechFinalResultsEndTimes.push($root.google.protobuf.Duration.decode(reader, reader.uint32())); + break; + } + case 8: { + message.partialResponses = reader.int32(); + break; + } + case 9: { + message.speakerIdPassiveLatencyMsOffset = reader.int32(); + break; + } + case 10: { + message.bargeinEventTriggered = reader.bool(); + break; + } + case 11: { + message.speechSingleUtterance = reader.bool(); + break; + } + case 12: { + if (!(message.dtmfPartialResultsTimes && message.dtmfPartialResultsTimes.length)) + message.dtmfPartialResultsTimes = []; + message.dtmfPartialResultsTimes.push($root.google.protobuf.Duration.decode(reader, reader.uint32())); + break; + } + case 13: { + if (!(message.dtmfFinalResultsTimes && message.dtmfFinalResultsTimes.length)) + message.dtmfFinalResultsTimes = []; + message.dtmfFinalResultsTimes.push($root.google.protobuf.Duration.decode(reader, reader.uint32())); + break; + } + case 14: { + message.singleUtteranceEndTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 15: { + message.noSpeechTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 16: { + message.isInputText = reader.bool(); + break; + } + case 17: { + message.clientHalfCloseTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 18: { + message.clientHalfCloseStreamingTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudConversationDebuggingInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo} CloudConversationDebuggingInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudConversationDebuggingInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudConversationDebuggingInfo message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudConversationDebuggingInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.audioDataChunks != null && message.hasOwnProperty("audioDataChunks")) + if (!$util.isInteger(message.audioDataChunks)) + return "audioDataChunks: integer expected"; + if (message.resultEndTimeOffset != null && message.hasOwnProperty("resultEndTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.resultEndTimeOffset); + if (error) + return "resultEndTimeOffset." + error; + } + if (message.firstAudioDuration != null && message.hasOwnProperty("firstAudioDuration")) { + var error = $root.google.protobuf.Duration.verify(message.firstAudioDuration); + if (error) + return "firstAudioDuration." + error; + } + if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) + if (typeof message.singleUtterance !== "boolean") + return "singleUtterance: boolean expected"; + if (message.speechPartialResultsEndTimes != null && message.hasOwnProperty("speechPartialResultsEndTimes")) { + if (!Array.isArray(message.speechPartialResultsEndTimes)) + return "speechPartialResultsEndTimes: array expected"; + for (var i = 0; i < message.speechPartialResultsEndTimes.length; ++i) { + var error = $root.google.protobuf.Duration.verify(message.speechPartialResultsEndTimes[i]); + if (error) + return "speechPartialResultsEndTimes." + error; + } + } + if (message.speechFinalResultsEndTimes != null && message.hasOwnProperty("speechFinalResultsEndTimes")) { + if (!Array.isArray(message.speechFinalResultsEndTimes)) + return "speechFinalResultsEndTimes: array expected"; + for (var i = 0; i < message.speechFinalResultsEndTimes.length; ++i) { + var error = $root.google.protobuf.Duration.verify(message.speechFinalResultsEndTimes[i]); + if (error) + return "speechFinalResultsEndTimes." + error; + } + } + if (message.partialResponses != null && message.hasOwnProperty("partialResponses")) + if (!$util.isInteger(message.partialResponses)) + return "partialResponses: integer expected"; + if (message.speakerIdPassiveLatencyMsOffset != null && message.hasOwnProperty("speakerIdPassiveLatencyMsOffset")) + if (!$util.isInteger(message.speakerIdPassiveLatencyMsOffset)) + return "speakerIdPassiveLatencyMsOffset: integer expected"; + if (message.bargeinEventTriggered != null && message.hasOwnProperty("bargeinEventTriggered")) + if (typeof message.bargeinEventTriggered !== "boolean") + return "bargeinEventTriggered: boolean expected"; + if (message.speechSingleUtterance != null && message.hasOwnProperty("speechSingleUtterance")) + if (typeof message.speechSingleUtterance !== "boolean") + return "speechSingleUtterance: boolean expected"; + if (message.dtmfPartialResultsTimes != null && message.hasOwnProperty("dtmfPartialResultsTimes")) { + if (!Array.isArray(message.dtmfPartialResultsTimes)) + return "dtmfPartialResultsTimes: array expected"; + for (var i = 0; i < message.dtmfPartialResultsTimes.length; ++i) { + var error = $root.google.protobuf.Duration.verify(message.dtmfPartialResultsTimes[i]); + if (error) + return "dtmfPartialResultsTimes." + error; + } + } + if (message.dtmfFinalResultsTimes != null && message.hasOwnProperty("dtmfFinalResultsTimes")) { + if (!Array.isArray(message.dtmfFinalResultsTimes)) + return "dtmfFinalResultsTimes: array expected"; + for (var i = 0; i < message.dtmfFinalResultsTimes.length; ++i) { + var error = $root.google.protobuf.Duration.verify(message.dtmfFinalResultsTimes[i]); + if (error) + return "dtmfFinalResultsTimes." + error; + } + } + if (message.singleUtteranceEndTimeOffset != null && message.hasOwnProperty("singleUtteranceEndTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.singleUtteranceEndTimeOffset); + if (error) + return "singleUtteranceEndTimeOffset." + error; + } + if (message.noSpeechTimeout != null && message.hasOwnProperty("noSpeechTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.noSpeechTimeout); + if (error) + return "noSpeechTimeout." + error; + } + if (message.isInputText != null && message.hasOwnProperty("isInputText")) + if (typeof message.isInputText !== "boolean") + return "isInputText: boolean expected"; + if (message.clientHalfCloseTimeOffset != null && message.hasOwnProperty("clientHalfCloseTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.clientHalfCloseTimeOffset); + if (error) + return "clientHalfCloseTimeOffset." + error; + } + if (message.clientHalfCloseStreamingTimeOffset != null && message.hasOwnProperty("clientHalfCloseStreamingTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.clientHalfCloseStreamingTimeOffset); + if (error) + return "clientHalfCloseStreamingTimeOffset." + error; + } + return null; + }; + + /** + * Creates a CloudConversationDebuggingInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo} CloudConversationDebuggingInfo + */ + CloudConversationDebuggingInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo(); + if (object.audioDataChunks != null) + message.audioDataChunks = object.audioDataChunks | 0; + if (object.resultEndTimeOffset != null) { + if (typeof object.resultEndTimeOffset !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo.resultEndTimeOffset: object expected"); + message.resultEndTimeOffset = $root.google.protobuf.Duration.fromObject(object.resultEndTimeOffset); + } + if (object.firstAudioDuration != null) { + if (typeof object.firstAudioDuration !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo.firstAudioDuration: object expected"); + message.firstAudioDuration = $root.google.protobuf.Duration.fromObject(object.firstAudioDuration); + } + if (object.singleUtterance != null) + message.singleUtterance = Boolean(object.singleUtterance); + if (object.speechPartialResultsEndTimes) { + if (!Array.isArray(object.speechPartialResultsEndTimes)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo.speechPartialResultsEndTimes: array expected"); + message.speechPartialResultsEndTimes = []; + for (var i = 0; i < object.speechPartialResultsEndTimes.length; ++i) { + if (typeof object.speechPartialResultsEndTimes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo.speechPartialResultsEndTimes: object expected"); + message.speechPartialResultsEndTimes[i] = $root.google.protobuf.Duration.fromObject(object.speechPartialResultsEndTimes[i]); + } + } + if (object.speechFinalResultsEndTimes) { + if (!Array.isArray(object.speechFinalResultsEndTimes)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo.speechFinalResultsEndTimes: array expected"); + message.speechFinalResultsEndTimes = []; + for (var i = 0; i < object.speechFinalResultsEndTimes.length; ++i) { + if (typeof object.speechFinalResultsEndTimes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo.speechFinalResultsEndTimes: object expected"); + message.speechFinalResultsEndTimes[i] = $root.google.protobuf.Duration.fromObject(object.speechFinalResultsEndTimes[i]); + } + } + if (object.partialResponses != null) + message.partialResponses = object.partialResponses | 0; + if (object.speakerIdPassiveLatencyMsOffset != null) + message.speakerIdPassiveLatencyMsOffset = object.speakerIdPassiveLatencyMsOffset | 0; + if (object.bargeinEventTriggered != null) + message.bargeinEventTriggered = Boolean(object.bargeinEventTriggered); + if (object.speechSingleUtterance != null) + message.speechSingleUtterance = Boolean(object.speechSingleUtterance); + if (object.dtmfPartialResultsTimes) { + if (!Array.isArray(object.dtmfPartialResultsTimes)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo.dtmfPartialResultsTimes: array expected"); + message.dtmfPartialResultsTimes = []; + for (var i = 0; i < object.dtmfPartialResultsTimes.length; ++i) { + if (typeof object.dtmfPartialResultsTimes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo.dtmfPartialResultsTimes: object expected"); + message.dtmfPartialResultsTimes[i] = $root.google.protobuf.Duration.fromObject(object.dtmfPartialResultsTimes[i]); + } + } + if (object.dtmfFinalResultsTimes) { + if (!Array.isArray(object.dtmfFinalResultsTimes)) + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo.dtmfFinalResultsTimes: array expected"); + message.dtmfFinalResultsTimes = []; + for (var i = 0; i < object.dtmfFinalResultsTimes.length; ++i) { + if (typeof object.dtmfFinalResultsTimes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo.dtmfFinalResultsTimes: object expected"); + message.dtmfFinalResultsTimes[i] = $root.google.protobuf.Duration.fromObject(object.dtmfFinalResultsTimes[i]); + } + } + if (object.singleUtteranceEndTimeOffset != null) { + if (typeof object.singleUtteranceEndTimeOffset !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo.singleUtteranceEndTimeOffset: object expected"); + message.singleUtteranceEndTimeOffset = $root.google.protobuf.Duration.fromObject(object.singleUtteranceEndTimeOffset); + } + if (object.noSpeechTimeout != null) { + if (typeof object.noSpeechTimeout !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo.noSpeechTimeout: object expected"); + message.noSpeechTimeout = $root.google.protobuf.Duration.fromObject(object.noSpeechTimeout); + } + if (object.isInputText != null) + message.isInputText = Boolean(object.isInputText); + if (object.clientHalfCloseTimeOffset != null) { + if (typeof object.clientHalfCloseTimeOffset !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo.clientHalfCloseTimeOffset: object expected"); + message.clientHalfCloseTimeOffset = $root.google.protobuf.Duration.fromObject(object.clientHalfCloseTimeOffset); + } + if (object.clientHalfCloseStreamingTimeOffset != null) { + if (typeof object.clientHalfCloseStreamingTimeOffset !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo.clientHalfCloseStreamingTimeOffset: object expected"); + message.clientHalfCloseStreamingTimeOffset = $root.google.protobuf.Duration.fromObject(object.clientHalfCloseStreamingTimeOffset); + } + return message; + }; + + /** + * Creates a plain object from a CloudConversationDebuggingInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo + * @static + * @param {google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo} message CloudConversationDebuggingInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudConversationDebuggingInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.speechPartialResultsEndTimes = []; + object.speechFinalResultsEndTimes = []; + object.dtmfPartialResultsTimes = []; + object.dtmfFinalResultsTimes = []; + } + if (options.defaults) { + object.audioDataChunks = 0; + object.resultEndTimeOffset = null; + object.firstAudioDuration = null; + object.singleUtterance = false; + object.partialResponses = 0; + object.speakerIdPassiveLatencyMsOffset = 0; + object.bargeinEventTriggered = false; + object.speechSingleUtterance = false; + object.singleUtteranceEndTimeOffset = null; + object.noSpeechTimeout = null; + object.isInputText = false; + object.clientHalfCloseTimeOffset = null; + object.clientHalfCloseStreamingTimeOffset = null; + } + if (message.audioDataChunks != null && message.hasOwnProperty("audioDataChunks")) + object.audioDataChunks = message.audioDataChunks; + if (message.resultEndTimeOffset != null && message.hasOwnProperty("resultEndTimeOffset")) + object.resultEndTimeOffset = $root.google.protobuf.Duration.toObject(message.resultEndTimeOffset, options); + if (message.firstAudioDuration != null && message.hasOwnProperty("firstAudioDuration")) + object.firstAudioDuration = $root.google.protobuf.Duration.toObject(message.firstAudioDuration, options); + if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) + object.singleUtterance = message.singleUtterance; + if (message.speechPartialResultsEndTimes && message.speechPartialResultsEndTimes.length) { + object.speechPartialResultsEndTimes = []; + for (var j = 0; j < message.speechPartialResultsEndTimes.length; ++j) + object.speechPartialResultsEndTimes[j] = $root.google.protobuf.Duration.toObject(message.speechPartialResultsEndTimes[j], options); + } + if (message.speechFinalResultsEndTimes && message.speechFinalResultsEndTimes.length) { + object.speechFinalResultsEndTimes = []; + for (var j = 0; j < message.speechFinalResultsEndTimes.length; ++j) + object.speechFinalResultsEndTimes[j] = $root.google.protobuf.Duration.toObject(message.speechFinalResultsEndTimes[j], options); + } + if (message.partialResponses != null && message.hasOwnProperty("partialResponses")) + object.partialResponses = message.partialResponses; + if (message.speakerIdPassiveLatencyMsOffset != null && message.hasOwnProperty("speakerIdPassiveLatencyMsOffset")) + object.speakerIdPassiveLatencyMsOffset = message.speakerIdPassiveLatencyMsOffset; + if (message.bargeinEventTriggered != null && message.hasOwnProperty("bargeinEventTriggered")) + object.bargeinEventTriggered = message.bargeinEventTriggered; + if (message.speechSingleUtterance != null && message.hasOwnProperty("speechSingleUtterance")) + object.speechSingleUtterance = message.speechSingleUtterance; + if (message.dtmfPartialResultsTimes && message.dtmfPartialResultsTimes.length) { + object.dtmfPartialResultsTimes = []; + for (var j = 0; j < message.dtmfPartialResultsTimes.length; ++j) + object.dtmfPartialResultsTimes[j] = $root.google.protobuf.Duration.toObject(message.dtmfPartialResultsTimes[j], options); + } + if (message.dtmfFinalResultsTimes && message.dtmfFinalResultsTimes.length) { + object.dtmfFinalResultsTimes = []; + for (var j = 0; j < message.dtmfFinalResultsTimes.length; ++j) + object.dtmfFinalResultsTimes[j] = $root.google.protobuf.Duration.toObject(message.dtmfFinalResultsTimes[j], options); + } + if (message.singleUtteranceEndTimeOffset != null && message.hasOwnProperty("singleUtteranceEndTimeOffset")) + object.singleUtteranceEndTimeOffset = $root.google.protobuf.Duration.toObject(message.singleUtteranceEndTimeOffset, options); + if (message.noSpeechTimeout != null && message.hasOwnProperty("noSpeechTimeout")) + object.noSpeechTimeout = $root.google.protobuf.Duration.toObject(message.noSpeechTimeout, options); + if (message.isInputText != null && message.hasOwnProperty("isInputText")) + object.isInputText = message.isInputText; + if (message.clientHalfCloseTimeOffset != null && message.hasOwnProperty("clientHalfCloseTimeOffset")) + object.clientHalfCloseTimeOffset = $root.google.protobuf.Duration.toObject(message.clientHalfCloseTimeOffset, options); + if (message.clientHalfCloseStreamingTimeOffset != null && message.hasOwnProperty("clientHalfCloseStreamingTimeOffset")) + object.clientHalfCloseStreamingTimeOffset = $root.google.protobuf.Duration.toObject(message.clientHalfCloseStreamingTimeOffset, options); + return object; + }; + + /** + * Converts this CloudConversationDebuggingInfo to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo + * @instance + * @returns {Object.} JSON object + */ + CloudConversationDebuggingInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudConversationDebuggingInfo + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudConversationDebuggingInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo"; + }; + + return CloudConversationDebuggingInfo; + })(); + v3beta1.StreamingDetectIntentResponse = (function() { /** @@ -116579,6 +118073,7 @@ * @interface IStreamingDetectIntentResponse * @property {google.cloud.dialogflow.cx.v3beta1.IStreamingRecognitionResult|null} [recognitionResult] StreamingDetectIntentResponse recognitionResult * @property {google.cloud.dialogflow.cx.v3beta1.IDetectIntentResponse|null} [detectIntentResponse] StreamingDetectIntentResponse detectIntentResponse + * @property {google.cloud.dialogflow.cx.v3beta1.ICloudConversationDebuggingInfo|null} [debuggingInfo] StreamingDetectIntentResponse debuggingInfo */ /** @@ -116612,6 +118107,14 @@ */ StreamingDetectIntentResponse.prototype.detectIntentResponse = null; + /** + * StreamingDetectIntentResponse debuggingInfo. + * @member {google.cloud.dialogflow.cx.v3beta1.ICloudConversationDebuggingInfo|null|undefined} debuggingInfo + * @memberof google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentResponse + * @instance + */ + StreamingDetectIntentResponse.prototype.debuggingInfo = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -116654,6 +118157,8 @@ $root.google.cloud.dialogflow.cx.v3beta1.StreamingRecognitionResult.encode(message.recognitionResult, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.detectIntentResponse != null && Object.hasOwnProperty.call(message, "detectIntentResponse")) $root.google.cloud.dialogflow.cx.v3beta1.DetectIntentResponse.encode(message.detectIntentResponse, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.debuggingInfo != null && Object.hasOwnProperty.call(message, "debuggingInfo")) + $root.google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo.encode(message.debuggingInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -116696,6 +118201,10 @@ message.detectIntentResponse = $root.google.cloud.dialogflow.cx.v3beta1.DetectIntentResponse.decode(reader, reader.uint32()); break; } + case 4: { + message.debuggingInfo = $root.google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -116750,6 +118259,11 @@ return "detectIntentResponse." + error; } } + if (message.debuggingInfo != null && message.hasOwnProperty("debuggingInfo")) { + var error = $root.google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo.verify(message.debuggingInfo); + if (error) + return "debuggingInfo." + error; + } return null; }; @@ -116775,6 +118289,11 @@ throw TypeError(".google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentResponse.detectIntentResponse: object expected"); message.detectIntentResponse = $root.google.cloud.dialogflow.cx.v3beta1.DetectIntentResponse.fromObject(object.detectIntentResponse); } + if (object.debuggingInfo != null) { + if (typeof object.debuggingInfo !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentResponse.debuggingInfo: object expected"); + message.debuggingInfo = $root.google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo.fromObject(object.debuggingInfo); + } return message; }; @@ -116791,6 +118310,8 @@ if (!options) options = {}; var object = {}; + if (options.defaults) + object.debuggingInfo = null; if (message.recognitionResult != null && message.hasOwnProperty("recognitionResult")) { object.recognitionResult = $root.google.cloud.dialogflow.cx.v3beta1.StreamingRecognitionResult.toObject(message.recognitionResult, options); if (options.oneofs) @@ -116801,6 +118322,8 @@ if (options.oneofs) object.response = "detectIntentResponse"; } + if (message.debuggingInfo != null && message.hasOwnProperty("debuggingInfo")) + object.debuggingInfo = $root.google.cloud.dialogflow.cx.v3beta1.CloudConversationDebuggingInfo.toObject(message.debuggingInfo, options); return object; }; @@ -128196,6 +129719,7 @@ * @property {string|null} [triggerIntent] WebhookRequest triggerIntent * @property {string|null} [transcript] WebhookRequest transcript * @property {string|null} [triggerEvent] WebhookRequest triggerEvent + * @property {string|null} [dtmfDigits] WebhookRequest dtmfDigits * @property {string|null} [languageCode] WebhookRequest languageCode * @property {google.cloud.dialogflow.cx.v3beta1.WebhookRequest.IFulfillmentInfo|null} [fulfillmentInfo] WebhookRequest fulfillmentInfo * @property {google.cloud.dialogflow.cx.v3beta1.WebhookRequest.IIntentInfo|null} [intentInfo] WebhookRequest intentInfo @@ -128262,6 +129786,14 @@ */ WebhookRequest.prototype.triggerEvent = null; + /** + * WebhookRequest dtmfDigits. + * @member {string|null|undefined} dtmfDigits + * @memberof google.cloud.dialogflow.cx.v3beta1.WebhookRequest + * @instance + */ + WebhookRequest.prototype.dtmfDigits = null; + /** * WebhookRequest languageCode. * @member {string} languageCode @@ -128331,12 +129863,12 @@ /** * WebhookRequest query. - * @member {"text"|"triggerIntent"|"transcript"|"triggerEvent"|undefined} query + * @member {"text"|"triggerIntent"|"transcript"|"triggerEvent"|"dtmfDigits"|undefined} query * @memberof google.cloud.dialogflow.cx.v3beta1.WebhookRequest * @instance */ Object.defineProperty(WebhookRequest.prototype, "query", { - get: $util.oneOfGetter($oneOfFields = ["text", "triggerIntent", "transcript", "triggerEvent"]), + get: $util.oneOfGetter($oneOfFields = ["text", "triggerIntent", "transcript", "triggerEvent", "dtmfDigits"]), set: $util.oneOfSetter($oneOfFields) }); @@ -128391,6 +129923,8 @@ writer.uint32(/* id 14, wireType 2 =*/114).string(message.triggerEvent); if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) writer.uint32(/* id 15, wireType 2 =*/122).string(message.languageCode); + if (message.dtmfDigits != null && Object.hasOwnProperty.call(message, "dtmfDigits")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.dtmfDigits); return writer; }; @@ -128445,6 +129979,10 @@ message.triggerEvent = reader.string(); break; } + case 17: { + message.dtmfDigits = reader.string(); + break; + } case 15: { message.languageCode = reader.string(); break; @@ -128544,6 +130082,13 @@ if (!$util.isString(message.triggerEvent)) return "triggerEvent: string expected"; } + if (message.dtmfDigits != null && message.hasOwnProperty("dtmfDigits")) { + if (properties.query === 1) + return "query: multiple values"; + properties.query = 1; + if (!$util.isString(message.dtmfDigits)) + return "dtmfDigits: string expected"; + } if (message.languageCode != null && message.hasOwnProperty("languageCode")) if (!$util.isString(message.languageCode)) return "languageCode: string expected"; @@ -128611,6 +130156,8 @@ message.transcript = String(object.transcript); if (object.triggerEvent != null) message.triggerEvent = String(object.triggerEvent); + if (object.dtmfDigits != null) + message.dtmfDigits = String(object.dtmfDigits); if (object.languageCode != null) message.languageCode = String(object.languageCode); if (object.fulfillmentInfo != null) { @@ -128722,6 +130269,11 @@ } if (message.languageCode != null && message.hasOwnProperty("languageCode")) object.languageCode = message.languageCode; + if (message.dtmfDigits != null && message.hasOwnProperty("dtmfDigits")) { + object.dtmfDigits = message.dtmfDigits; + if (options.oneofs) + object.query = "dtmfDigits"; + } return object; }; diff --git a/packages/google-cloud-dialogflow-cx/protos/protos.json b/packages/google-cloud-dialogflow-cx/protos/protos.json index e064a917b28..f050e436f91 100644 --- a/packages/google-cloud-dialogflow-cx/protos/protos.json +++ b/packages/google-cloud-dialogflow-cx/protos/protos.json @@ -3681,7 +3681,8 @@ "INTENT": 1, "PAGE": 2, "PARAMETERS": 3, - "UTTERANCE": 4 + "UTTERANCE": 4, + "FLOW": 5 } } } @@ -4790,6 +4791,86 @@ "enablePartialResponse": { "type": "bool", "id": 5 + }, + "enableDebuggingInfo": { + "type": "bool", + "id": 8 + } + } + }, + "CloudConversationDebuggingInfo": { + "fields": { + "audioDataChunks": { + "type": "int32", + "id": 1 + }, + "resultEndTimeOffset": { + "type": "google.protobuf.Duration", + "id": 2 + }, + "firstAudioDuration": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "singleUtterance": { + "type": "bool", + "id": 5 + }, + "speechPartialResultsEndTimes": { + "rule": "repeated", + "type": "google.protobuf.Duration", + "id": 6 + }, + "speechFinalResultsEndTimes": { + "rule": "repeated", + "type": "google.protobuf.Duration", + "id": 7 + }, + "partialResponses": { + "type": "int32", + "id": 8 + }, + "speakerIdPassiveLatencyMsOffset": { + "type": "int32", + "id": 9 + }, + "bargeinEventTriggered": { + "type": "bool", + "id": 10 + }, + "speechSingleUtterance": { + "type": "bool", + "id": 11 + }, + "dtmfPartialResultsTimes": { + "rule": "repeated", + "type": "google.protobuf.Duration", + "id": 12 + }, + "dtmfFinalResultsTimes": { + "rule": "repeated", + "type": "google.protobuf.Duration", + "id": 13 + }, + "singleUtteranceEndTimeOffset": { + "type": "google.protobuf.Duration", + "id": 14 + }, + "noSpeechTimeout": { + "type": "google.protobuf.Duration", + "id": 15 + }, + "isInputText": { + "type": "bool", + "id": 16 + }, + "clientHalfCloseTimeOffset": { + "type": "google.protobuf.Duration", + "id": 17 + }, + "clientHalfCloseStreamingTimeOffset": { + "type": "google.protobuf.Duration", + "id": 18 } } }, @@ -4810,6 +4891,10 @@ "detectIntentResponse": { "type": "DetectIntentResponse", "id": 2 + }, + "debuggingInfo": { + "type": "CloudConversationDebuggingInfo", + "id": 4 } } }, @@ -6061,7 +6146,8 @@ "text", "triggerIntent", "transcript", - "triggerEvent" + "triggerEvent", + "dtmfDigits" ] } }, @@ -6089,6 +6175,10 @@ "type": "string", "id": 14 }, + "dtmfDigits": { + "type": "string", + "id": 17 + }, "languageCode": { "type": "string", "id": 15 @@ -11263,7 +11353,8 @@ "INTENT": 1, "PAGE": 2, "PARAMETERS": 3, - "UTTERANCE": 4 + "UTTERANCE": 4, + "FLOW": 5 } } } @@ -12372,6 +12463,86 @@ "enablePartialResponse": { "type": "bool", "id": 5 + }, + "enableDebuggingInfo": { + "type": "bool", + "id": 8 + } + } + }, + "CloudConversationDebuggingInfo": { + "fields": { + "audioDataChunks": { + "type": "int32", + "id": 1 + }, + "resultEndTimeOffset": { + "type": "google.protobuf.Duration", + "id": 2 + }, + "firstAudioDuration": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "singleUtterance": { + "type": "bool", + "id": 5 + }, + "speechPartialResultsEndTimes": { + "rule": "repeated", + "type": "google.protobuf.Duration", + "id": 6 + }, + "speechFinalResultsEndTimes": { + "rule": "repeated", + "type": "google.protobuf.Duration", + "id": 7 + }, + "partialResponses": { + "type": "int32", + "id": 8 + }, + "speakerIdPassiveLatencyMsOffset": { + "type": "int32", + "id": 9 + }, + "bargeinEventTriggered": { + "type": "bool", + "id": 10 + }, + "speechSingleUtterance": { + "type": "bool", + "id": 11 + }, + "dtmfPartialResultsTimes": { + "rule": "repeated", + "type": "google.protobuf.Duration", + "id": 12 + }, + "dtmfFinalResultsTimes": { + "rule": "repeated", + "type": "google.protobuf.Duration", + "id": 13 + }, + "singleUtteranceEndTimeOffset": { + "type": "google.protobuf.Duration", + "id": 14 + }, + "noSpeechTimeout": { + "type": "google.protobuf.Duration", + "id": 15 + }, + "isInputText": { + "type": "bool", + "id": 16 + }, + "clientHalfCloseTimeOffset": { + "type": "google.protobuf.Duration", + "id": 17 + }, + "clientHalfCloseStreamingTimeOffset": { + "type": "google.protobuf.Duration", + "id": 18 } } }, @@ -12392,6 +12563,10 @@ "detectIntentResponse": { "type": "DetectIntentResponse", "id": 2 + }, + "debuggingInfo": { + "type": "CloudConversationDebuggingInfo", + "id": 4 } } }, @@ -13643,7 +13818,8 @@ "text", "triggerIntent", "transcript", - "triggerEvent" + "triggerEvent", + "dtmfDigits" ] } }, @@ -13671,6 +13847,10 @@ "type": "string", "id": 14 }, + "dtmfDigits": { + "type": "string", + "id": 17 + }, "languageCode": { "type": "string", "id": 15 diff --git a/packages/google-cloud-dialogflow-cx/samples/README.md b/packages/google-cloud-dialogflow-cx/samples/README.md index 7474db6b08e..b909c568e55 100644 --- a/packages/google-cloud-dialogflow-cx/samples/README.md +++ b/packages/google-cloud-dialogflow-cx/samples/README.md @@ -207,7 +207,6 @@ * [Webhooks.list_webhooks](#webhooks.list_webhooks) * [Webhooks.update_webhook](#webhooks.update_webhook) * [Quickstart](#quickstart) - * [Quickstart](#quickstart) ## Before you begin @@ -3534,23 +3533,6 @@ __Usage:__ `node packages/google-cloud-dialogflow-cx/samples/quickstart.js` ------ - - - - -### Quickstart - -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/test/quickstart.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/test/quickstart.js,samples/README.md) - -__Usage:__ - - -`node packages/google-cloud-dialogflow-cx/samples/test/quickstart.js` - - diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.streaming_detect_intent.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.streaming_detect_intent.js index 54224182643..8b5aa24251a 100644 --- a/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.streaming_detect_intent.js +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.streaming_detect_intent.js @@ -65,6 +65,10 @@ function main(queryInput) { * responses. */ // const enablePartialResponse = true + /** + * If true, `StreamingDetectIntentResponse.debugging_info` will get populated. + */ + // const enableDebuggingInfo = true // Imports the Cx library const {SessionsClient} = require('@google-cloud/dialogflow-cx').v3; diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json b/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json index f1d8250b67b..4b7a31d54c4 100644 --- a/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cx", - "version": "3.4.1", + "version": "3.5.0", "language": "TYPESCRIPT", "apis": [ { @@ -2958,7 +2958,7 @@ "segments": [ { "start": 25, - "end": 90, + "end": 94, "type": "FULL" } ], @@ -2986,6 +2986,10 @@ { "name": "enable_partial_response", "type": "TYPE_BOOL" + }, + { + "name": "enable_debugging_info", + "type": "TYPE_BOOL" } ], "resultType": ".google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse", diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.streaming_detect_intent.js b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.streaming_detect_intent.js index a568cc5913d..005a4d65a8c 100644 --- a/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.streaming_detect_intent.js +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.streaming_detect_intent.js @@ -65,6 +65,10 @@ function main(queryInput) { * responses. */ // const enablePartialResponse = true + /** + * If true, `StreamingDetectIntentResponse.debugging_info` will get populated. + */ + // const enableDebuggingInfo = true // Imports the Cx library const {SessionsClient} = require('@google-cloud/dialogflow-cx').v3beta1; diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json index 51f5b9a456c..956dd735745 100644 --- a/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cx", - "version": "3.4.1", + "version": "3.5.0", "language": "TYPESCRIPT", "apis": [ { @@ -2958,7 +2958,7 @@ "segments": [ { "start": 25, - "end": 90, + "end": 94, "type": "FULL" } ], @@ -2986,6 +2986,10 @@ { "name": "enable_partial_response", "type": "TYPE_BOOL" + }, + { + "name": "enable_debugging_info", + "type": "TYPE_BOOL" } ], "resultType": ".google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentResponse", diff --git a/packages/google-cloud-dialogflow-cx/samples/package.json b/packages/google-cloud-dialogflow-cx/samples/package.json index 3a3556c3311..c63c7e42091 100644 --- a/packages/google-cloud-dialogflow-cx/samples/package.json +++ b/packages/google-cloud-dialogflow-cx/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/dialogflow-cx": "^3.4.2", + "@google-cloud/dialogflow-cx": "^3.5.0", "uuid": "^9.0.0" }, "devDependencies": { diff --git a/packages/google-cloud-dialogflow-cx/src/v3/agents_client_config.json b/packages/google-cloud-dialogflow-cx/src/v3/agents_client_config.json index d072d8bfc51..15f7e60ba8e 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3/agents_client_config.json +++ b/packages/google-cloud-dialogflow-cx/src/v3/agents_client_config.json @@ -34,7 +34,7 @@ "retry_params_name": "default" }, "CreateAgent": { - "timeout_millis": 60000, + "timeout_millis": 180000, "retry_codes_name": "unavailable", "retry_params_name": "default" }, diff --git a/packages/google-cloud-dialogflow-cx/src/v3beta1/agents_client_config.json b/packages/google-cloud-dialogflow-cx/src/v3beta1/agents_client_config.json index 89263a09c5b..40591853cba 100644 --- a/packages/google-cloud-dialogflow-cx/src/v3beta1/agents_client_config.json +++ b/packages/google-cloud-dialogflow-cx/src/v3beta1/agents_client_config.json @@ -34,7 +34,7 @@ "retry_params_name": "default" }, "CreateAgent": { - "timeout_millis": 60000, + "timeout_millis": 180000, "retry_codes_name": "unavailable", "retry_params_name": "default" }, diff --git a/packages/google-cloud-dialogflow/CHANGELOG.md b/packages/google-cloud-dialogflow/CHANGELOG.md index b412d12baba..9733a3331b5 100644 --- a/packages/google-cloud-dialogflow/CHANGELOG.md +++ b/packages/google-cloud-dialogflow/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/dialogflow?activeTab=versions +## [5.8.0](https://github.com/googleapis/google-cloud-node/compare/dialogflow-v5.7.1...dialogflow-v5.8.0) (2023-05-20) + + +### Features + +* [dialogflow] add baseline model configuration for conversation summarization ([#4255](https://github.com/googleapis/google-cloud-node/issues/4255)) ([88877b9](https://github.com/googleapis/google-cloud-node/commit/88877b9509815d76f1915aa87e97597ec7e1520d)) + ## [5.7.1](https://github.com/googleapis/google-cloud-node/compare/dialogflow-v5.7.0...dialogflow-v5.7.1) (2023-04-13) diff --git a/packages/google-cloud-dialogflow/README.md b/packages/google-cloud-dialogflow/README.md index 02308d1c865..09d93526172 100644 --- a/packages/google-cloud-dialogflow/README.md +++ b/packages/google-cloud-dialogflow/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Dialogflow API: Node.js Client](https://github.com/googleapis/google-cloud-node) +# [Dialogflow API: Node.js Client](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-dialogflow) [![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/dialogflow.svg)](https://www.npmjs.org/package/@google-cloud/dialogflow) @@ -58,207 +58,208 @@ npm install @google-cloud/dialogflow ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-dialogflow/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Agents.delete_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/agents.delete_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/agents.delete_agent.js,samples/README.md) | -| Agents.export_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/agents.export_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/agents.export_agent.js,samples/README.md) | -| Agents.get_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/agents.get_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/agents.get_agent.js,samples/README.md) | -| Agents.get_validation_result | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/agents.get_validation_result.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/agents.get_validation_result.js,samples/README.md) | -| Agents.import_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/agents.import_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/agents.import_agent.js,samples/README.md) | -| Agents.restore_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/agents.restore_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/agents.restore_agent.js,samples/README.md) | -| Agents.search_agents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/agents.search_agents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/agents.search_agents.js,samples/README.md) | -| Agents.set_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/agents.set_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/agents.set_agent.js,samples/README.md) | -| Agents.train_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/agents.train_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/agents.train_agent.js,samples/README.md) | -| Answer_records.list_answer_records | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/answer_records.list_answer_records.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/answer_records.list_answer_records.js,samples/README.md) | -| Answer_records.update_answer_record | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/answer_records.update_answer_record.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/answer_records.update_answer_record.js,samples/README.md) | -| Contexts.create_context | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/contexts.create_context.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/contexts.create_context.js,samples/README.md) | -| Contexts.delete_all_contexts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/contexts.delete_all_contexts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/contexts.delete_all_contexts.js,samples/README.md) | -| Contexts.delete_context | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/contexts.delete_context.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/contexts.delete_context.js,samples/README.md) | -| Contexts.get_context | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/contexts.get_context.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/contexts.get_context.js,samples/README.md) | -| Contexts.list_contexts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/contexts.list_contexts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/contexts.list_contexts.js,samples/README.md) | -| Contexts.update_context | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/contexts.update_context.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/contexts.update_context.js,samples/README.md) | -| Conversation_datasets.create_conversation_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_datasets.create_conversation_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_datasets.create_conversation_dataset.js,samples/README.md) | -| Conversation_datasets.delete_conversation_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_datasets.delete_conversation_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_datasets.delete_conversation_dataset.js,samples/README.md) | -| Conversation_datasets.get_conversation_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_datasets.get_conversation_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_datasets.get_conversation_dataset.js,samples/README.md) | -| Conversation_datasets.import_conversation_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_datasets.import_conversation_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_datasets.import_conversation_data.js,samples/README.md) | -| Conversation_datasets.list_conversation_datasets | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_datasets.list_conversation_datasets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_datasets.list_conversation_datasets.js,samples/README.md) | -| Conversation_models.create_conversation_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.create_conversation_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.create_conversation_model.js,samples/README.md) | -| Conversation_models.create_conversation_model_evaluation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.create_conversation_model_evaluation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.create_conversation_model_evaluation.js,samples/README.md) | -| Conversation_models.delete_conversation_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.delete_conversation_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.delete_conversation_model.js,samples/README.md) | -| Conversation_models.deploy_conversation_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.deploy_conversation_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.deploy_conversation_model.js,samples/README.md) | -| Conversation_models.get_conversation_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.get_conversation_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.get_conversation_model.js,samples/README.md) | -| Conversation_models.get_conversation_model_evaluation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.get_conversation_model_evaluation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.get_conversation_model_evaluation.js,samples/README.md) | -| Conversation_models.list_conversation_model_evaluations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.list_conversation_model_evaluations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.list_conversation_model_evaluations.js,samples/README.md) | -| Conversation_models.list_conversation_models | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.list_conversation_models.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.list_conversation_models.js,samples/README.md) | -| Conversation_models.undeploy_conversation_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.undeploy_conversation_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.undeploy_conversation_model.js,samples/README.md) | -| Conversation_profiles.clear_suggestion_feature_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_profiles.clear_suggestion_feature_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_profiles.clear_suggestion_feature_config.js,samples/README.md) | -| Conversation_profiles.create_conversation_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_profiles.create_conversation_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_profiles.create_conversation_profile.js,samples/README.md) | -| Conversation_profiles.delete_conversation_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_profiles.delete_conversation_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_profiles.delete_conversation_profile.js,samples/README.md) | -| Conversation_profiles.get_conversation_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_profiles.get_conversation_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_profiles.get_conversation_profile.js,samples/README.md) | -| Conversation_profiles.list_conversation_profiles | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_profiles.list_conversation_profiles.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_profiles.list_conversation_profiles.js,samples/README.md) | -| Conversation_profiles.set_suggestion_feature_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_profiles.set_suggestion_feature_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_profiles.set_suggestion_feature_config.js,samples/README.md) | -| Conversation_profiles.update_conversation_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_profiles.update_conversation_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_profiles.update_conversation_profile.js,samples/README.md) | -| Conversations.complete_conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversations.complete_conversation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversations.complete_conversation.js,samples/README.md) | -| Conversations.create_conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversations.create_conversation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversations.create_conversation.js,samples/README.md) | -| Conversations.get_conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversations.get_conversation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversations.get_conversation.js,samples/README.md) | -| Conversations.list_conversations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversations.list_conversations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversations.list_conversations.js,samples/README.md) | -| Conversations.list_messages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversations.list_messages.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversations.list_messages.js,samples/README.md) | -| Conversations.suggest_conversation_summary | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversations.suggest_conversation_summary.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversations.suggest_conversation_summary.js,samples/README.md) | -| Documents.create_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/documents.create_document.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/documents.create_document.js,samples/README.md) | -| Documents.delete_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/documents.delete_document.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/documents.delete_document.js,samples/README.md) | -| Documents.export_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/documents.export_document.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/documents.export_document.js,samples/README.md) | -| Documents.get_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/documents.get_document.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/documents.get_document.js,samples/README.md) | -| Documents.import_documents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/documents.import_documents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/documents.import_documents.js,samples/README.md) | -| Documents.list_documents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/documents.list_documents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/documents.list_documents.js,samples/README.md) | -| Documents.reload_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/documents.reload_document.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/documents.reload_document.js,samples/README.md) | -| Documents.update_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/documents.update_document.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/documents.update_document.js,samples/README.md) | -| Entity_types.batch_create_entities | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/entity_types.batch_create_entities.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/entity_types.batch_create_entities.js,samples/README.md) | -| Entity_types.batch_delete_entities | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/entity_types.batch_delete_entities.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/entity_types.batch_delete_entities.js,samples/README.md) | -| Entity_types.batch_delete_entity_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/entity_types.batch_delete_entity_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/entity_types.batch_delete_entity_types.js,samples/README.md) | -| Entity_types.batch_update_entities | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/entity_types.batch_update_entities.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/entity_types.batch_update_entities.js,samples/README.md) | -| Entity_types.batch_update_entity_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/entity_types.batch_update_entity_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/entity_types.batch_update_entity_types.js,samples/README.md) | -| Entity_types.create_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/entity_types.create_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/entity_types.create_entity_type.js,samples/README.md) | -| Entity_types.delete_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/entity_types.delete_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/entity_types.delete_entity_type.js,samples/README.md) | -| Entity_types.get_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/entity_types.get_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/entity_types.get_entity_type.js,samples/README.md) | -| Entity_types.list_entity_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/entity_types.list_entity_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/entity_types.list_entity_types.js,samples/README.md) | -| Entity_types.update_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/entity_types.update_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/entity_types.update_entity_type.js,samples/README.md) | -| Environments.create_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/environments.create_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/environments.create_environment.js,samples/README.md) | -| Environments.delete_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/environments.delete_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/environments.delete_environment.js,samples/README.md) | -| Environments.get_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/environments.get_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/environments.get_environment.js,samples/README.md) | -| Environments.get_environment_history | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/environments.get_environment_history.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/environments.get_environment_history.js,samples/README.md) | -| Environments.list_environments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/environments.list_environments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/environments.list_environments.js,samples/README.md) | -| Environments.update_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/environments.update_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/environments.update_environment.js,samples/README.md) | -| Fulfillments.get_fulfillment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/fulfillments.get_fulfillment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/fulfillments.get_fulfillment.js,samples/README.md) | -| Fulfillments.update_fulfillment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/fulfillments.update_fulfillment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/fulfillments.update_fulfillment.js,samples/README.md) | -| Intents.batch_delete_intents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/intents.batch_delete_intents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/intents.batch_delete_intents.js,samples/README.md) | -| Intents.batch_update_intents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/intents.batch_update_intents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/intents.batch_update_intents.js,samples/README.md) | -| Intents.create_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/intents.create_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/intents.create_intent.js,samples/README.md) | -| Intents.delete_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/intents.delete_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/intents.delete_intent.js,samples/README.md) | -| Intents.get_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/intents.get_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/intents.get_intent.js,samples/README.md) | -| Intents.list_intents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/intents.list_intents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/intents.list_intents.js,samples/README.md) | -| Intents.update_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/intents.update_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/intents.update_intent.js,samples/README.md) | -| Knowledge_bases.create_knowledge_base | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/knowledge_bases.create_knowledge_base.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/knowledge_bases.create_knowledge_base.js,samples/README.md) | -| Knowledge_bases.delete_knowledge_base | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/knowledge_bases.delete_knowledge_base.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/knowledge_bases.delete_knowledge_base.js,samples/README.md) | -| Knowledge_bases.get_knowledge_base | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/knowledge_bases.get_knowledge_base.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/knowledge_bases.get_knowledge_base.js,samples/README.md) | -| Knowledge_bases.list_knowledge_bases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/knowledge_bases.list_knowledge_bases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/knowledge_bases.list_knowledge_bases.js,samples/README.md) | -| Knowledge_bases.update_knowledge_base | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/knowledge_bases.update_knowledge_base.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/knowledge_bases.update_knowledge_base.js,samples/README.md) | -| Participants.analyze_content | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/participants.analyze_content.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/participants.analyze_content.js,samples/README.md) | -| Participants.create_participant | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/participants.create_participant.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/participants.create_participant.js,samples/README.md) | -| Participants.get_participant | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/participants.get_participant.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/participants.get_participant.js,samples/README.md) | -| Participants.list_participants | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/participants.list_participants.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/participants.list_participants.js,samples/README.md) | -| Participants.streaming_analyze_content | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/participants.streaming_analyze_content.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/participants.streaming_analyze_content.js,samples/README.md) | -| Participants.suggest_articles | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/participants.suggest_articles.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/participants.suggest_articles.js,samples/README.md) | -| Participants.suggest_faq_answers | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/participants.suggest_faq_answers.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/participants.suggest_faq_answers.js,samples/README.md) | -| Participants.suggest_smart_replies | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/participants.suggest_smart_replies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/participants.suggest_smart_replies.js,samples/README.md) | -| Participants.update_participant | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/participants.update_participant.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/participants.update_participant.js,samples/README.md) | -| Session_entity_types.create_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/session_entity_types.create_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/session_entity_types.create_session_entity_type.js,samples/README.md) | -| Session_entity_types.delete_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/session_entity_types.delete_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/session_entity_types.delete_session_entity_type.js,samples/README.md) | -| Session_entity_types.get_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/session_entity_types.get_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/session_entity_types.get_session_entity_type.js,samples/README.md) | -| Session_entity_types.list_session_entity_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/session_entity_types.list_session_entity_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/session_entity_types.list_session_entity_types.js,samples/README.md) | -| Session_entity_types.update_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/session_entity_types.update_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/session_entity_types.update_session_entity_type.js,samples/README.md) | -| Sessions.detect_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/sessions.detect_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/sessions.detect_intent.js,samples/README.md) | -| Sessions.streaming_detect_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/sessions.streaming_detect_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/sessions.streaming_detect_intent.js,samples/README.md) | -| Versions.create_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/versions.create_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/versions.create_version.js,samples/README.md) | -| Versions.delete_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/versions.delete_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/versions.delete_version.js,samples/README.md) | -| Versions.get_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/versions.get_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/versions.get_version.js,samples/README.md) | -| Versions.list_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/versions.list_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/versions.list_versions.js,samples/README.md) | -| Versions.update_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/versions.update_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/versions.update_version.js,samples/README.md) | -| Agents.delete_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.delete_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.delete_agent.js,samples/README.md) | -| Agents.export_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.export_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.export_agent.js,samples/README.md) | -| Agents.get_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.get_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.get_agent.js,samples/README.md) | -| Agents.get_validation_result | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.get_validation_result.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.get_validation_result.js,samples/README.md) | -| Agents.import_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.import_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.import_agent.js,samples/README.md) | -| Agents.restore_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.restore_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.restore_agent.js,samples/README.md) | -| Agents.search_agents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.search_agents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.search_agents.js,samples/README.md) | -| Agents.set_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.set_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.set_agent.js,samples/README.md) | -| Agents.train_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.train_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.train_agent.js,samples/README.md) | -| Answer_records.get_answer_record | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/answer_records.get_answer_record.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/answer_records.get_answer_record.js,samples/README.md) | -| Answer_records.list_answer_records | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/answer_records.list_answer_records.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/answer_records.list_answer_records.js,samples/README.md) | -| Answer_records.update_answer_record | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/answer_records.update_answer_record.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/answer_records.update_answer_record.js,samples/README.md) | -| Contexts.create_context | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/contexts.create_context.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/contexts.create_context.js,samples/README.md) | -| Contexts.delete_all_contexts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/contexts.delete_all_contexts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/contexts.delete_all_contexts.js,samples/README.md) | -| Contexts.delete_context | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/contexts.delete_context.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/contexts.delete_context.js,samples/README.md) | -| Contexts.get_context | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/contexts.get_context.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/contexts.get_context.js,samples/README.md) | -| Contexts.list_contexts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/contexts.list_contexts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/contexts.list_contexts.js,samples/README.md) | -| Contexts.update_context | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/contexts.update_context.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/contexts.update_context.js,samples/README.md) | -| Conversation_profiles.clear_suggestion_feature_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversation_profiles.clear_suggestion_feature_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/conversation_profiles.clear_suggestion_feature_config.js,samples/README.md) | -| Conversation_profiles.create_conversation_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversation_profiles.create_conversation_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/conversation_profiles.create_conversation_profile.js,samples/README.md) | -| Conversation_profiles.delete_conversation_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversation_profiles.delete_conversation_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/conversation_profiles.delete_conversation_profile.js,samples/README.md) | -| Conversation_profiles.get_conversation_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversation_profiles.get_conversation_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/conversation_profiles.get_conversation_profile.js,samples/README.md) | -| Conversation_profiles.list_conversation_profiles | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversation_profiles.list_conversation_profiles.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/conversation_profiles.list_conversation_profiles.js,samples/README.md) | -| Conversation_profiles.set_suggestion_feature_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversation_profiles.set_suggestion_feature_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/conversation_profiles.set_suggestion_feature_config.js,samples/README.md) | -| Conversation_profiles.update_conversation_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversation_profiles.update_conversation_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/conversation_profiles.update_conversation_profile.js,samples/README.md) | -| Conversations.batch_create_messages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.batch_create_messages.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.batch_create_messages.js,samples/README.md) | -| Conversations.complete_conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.complete_conversation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.complete_conversation.js,samples/README.md) | -| Conversations.create_conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.create_conversation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.create_conversation.js,samples/README.md) | -| Conversations.get_conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.get_conversation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.get_conversation.js,samples/README.md) | -| Conversations.list_conversations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.list_conversations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.list_conversations.js,samples/README.md) | -| Conversations.list_messages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.list_messages.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.list_messages.js,samples/README.md) | -| Conversations.suggest_conversation_summary | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.suggest_conversation_summary.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.suggest_conversation_summary.js,samples/README.md) | -| Documents.create_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/documents.create_document.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/documents.create_document.js,samples/README.md) | -| Documents.delete_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/documents.delete_document.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/documents.delete_document.js,samples/README.md) | -| Documents.get_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/documents.get_document.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/documents.get_document.js,samples/README.md) | -| Documents.import_documents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/documents.import_documents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/documents.import_documents.js,samples/README.md) | -| Documents.list_documents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/documents.list_documents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/documents.list_documents.js,samples/README.md) | -| Documents.reload_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/documents.reload_document.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/documents.reload_document.js,samples/README.md) | -| Documents.update_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/documents.update_document.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/documents.update_document.js,samples/README.md) | -| Entity_types.batch_create_entities | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.batch_create_entities.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.batch_create_entities.js,samples/README.md) | -| Entity_types.batch_delete_entities | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.batch_delete_entities.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.batch_delete_entities.js,samples/README.md) | -| Entity_types.batch_delete_entity_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.batch_delete_entity_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.batch_delete_entity_types.js,samples/README.md) | -| Entity_types.batch_update_entities | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.batch_update_entities.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.batch_update_entities.js,samples/README.md) | -| Entity_types.batch_update_entity_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.batch_update_entity_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.batch_update_entity_types.js,samples/README.md) | -| Entity_types.create_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.create_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.create_entity_type.js,samples/README.md) | -| Entity_types.delete_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.delete_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.delete_entity_type.js,samples/README.md) | -| Entity_types.get_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.get_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.get_entity_type.js,samples/README.md) | -| Entity_types.list_entity_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.list_entity_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.list_entity_types.js,samples/README.md) | -| Entity_types.update_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.update_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.update_entity_type.js,samples/README.md) | -| Environments.create_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/environments.create_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/environments.create_environment.js,samples/README.md) | -| Environments.delete_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/environments.delete_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/environments.delete_environment.js,samples/README.md) | -| Environments.get_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/environments.get_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/environments.get_environment.js,samples/README.md) | -| Environments.get_environment_history | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/environments.get_environment_history.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/environments.get_environment_history.js,samples/README.md) | -| Environments.list_environments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/environments.list_environments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/environments.list_environments.js,samples/README.md) | -| Environments.update_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/environments.update_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/environments.update_environment.js,samples/README.md) | -| Fulfillments.get_fulfillment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/fulfillments.get_fulfillment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/fulfillments.get_fulfillment.js,samples/README.md) | -| Fulfillments.update_fulfillment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/fulfillments.update_fulfillment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/fulfillments.update_fulfillment.js,samples/README.md) | -| Intents.batch_delete_intents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/intents.batch_delete_intents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/intents.batch_delete_intents.js,samples/README.md) | -| Intents.batch_update_intents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/intents.batch_update_intents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/intents.batch_update_intents.js,samples/README.md) | -| Intents.create_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/intents.create_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/intents.create_intent.js,samples/README.md) | -| Intents.delete_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/intents.delete_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/intents.delete_intent.js,samples/README.md) | -| Intents.get_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/intents.get_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/intents.get_intent.js,samples/README.md) | -| Intents.list_intents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/intents.list_intents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/intents.list_intents.js,samples/README.md) | -| Intents.update_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/intents.update_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/intents.update_intent.js,samples/README.md) | -| Knowledge_bases.create_knowledge_base | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/knowledge_bases.create_knowledge_base.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/knowledge_bases.create_knowledge_base.js,samples/README.md) | -| Knowledge_bases.delete_knowledge_base | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/knowledge_bases.delete_knowledge_base.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/knowledge_bases.delete_knowledge_base.js,samples/README.md) | -| Knowledge_bases.get_knowledge_base | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/knowledge_bases.get_knowledge_base.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/knowledge_bases.get_knowledge_base.js,samples/README.md) | -| Knowledge_bases.list_knowledge_bases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/knowledge_bases.list_knowledge_bases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/knowledge_bases.list_knowledge_bases.js,samples/README.md) | -| Knowledge_bases.update_knowledge_base | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/knowledge_bases.update_knowledge_base.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/knowledge_bases.update_knowledge_base.js,samples/README.md) | -| Participants.analyze_content | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.analyze_content.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.analyze_content.js,samples/README.md) | -| Participants.compile_suggestion | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.compile_suggestion.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.compile_suggestion.js,samples/README.md) | -| Participants.create_participant | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.create_participant.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.create_participant.js,samples/README.md) | -| Participants.get_participant | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.get_participant.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.get_participant.js,samples/README.md) | -| Participants.list_participants | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.list_participants.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.list_participants.js,samples/README.md) | -| Participants.list_suggestions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.list_suggestions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.list_suggestions.js,samples/README.md) | -| Participants.streaming_analyze_content | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.streaming_analyze_content.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.streaming_analyze_content.js,samples/README.md) | -| Participants.suggest_articles | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.suggest_articles.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.suggest_articles.js,samples/README.md) | -| Participants.suggest_faq_answers | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.suggest_faq_answers.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.suggest_faq_answers.js,samples/README.md) | -| Participants.suggest_smart_replies | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.suggest_smart_replies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.suggest_smart_replies.js,samples/README.md) | -| Participants.update_participant | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.update_participant.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.update_participant.js,samples/README.md) | -| Session_entity_types.create_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/session_entity_types.create_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/session_entity_types.create_session_entity_type.js,samples/README.md) | -| Session_entity_types.delete_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/session_entity_types.delete_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/session_entity_types.delete_session_entity_type.js,samples/README.md) | -| Session_entity_types.get_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/session_entity_types.get_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/session_entity_types.get_session_entity_type.js,samples/README.md) | -| Session_entity_types.list_session_entity_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/session_entity_types.list_session_entity_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/session_entity_types.list_session_entity_types.js,samples/README.md) | -| Session_entity_types.update_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/session_entity_types.update_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/session_entity_types.update_session_entity_type.js,samples/README.md) | -| Sessions.detect_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/sessions.detect_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/sessions.detect_intent.js,samples/README.md) | -| Sessions.streaming_detect_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/sessions.streaming_detect_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/sessions.streaming_detect_intent.js,samples/README.md) | -| Versions.create_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/versions.create_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/versions.create_version.js,samples/README.md) | -| Versions.delete_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/versions.delete_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/versions.delete_version.js,samples/README.md) | -| Versions.get_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/versions.get_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/versions.get_version.js,samples/README.md) | -| Versions.list_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/versions.list_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/versions.list_versions.js,samples/README.md) | -| Versions.update_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/versions.update_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/versions.update_version.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/quickstart.js,samples/README.md) | -| Quickstart.test | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/test/quickstart.test.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/test/quickstart.test.js,samples/README.md) | +| Agents.delete_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/agents.delete_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/agents.delete_agent.js,packages/google-cloud-dialogflow/samples/README.md) | +| Agents.export_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/agents.export_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/agents.export_agent.js,packages/google-cloud-dialogflow/samples/README.md) | +| Agents.get_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/agents.get_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/agents.get_agent.js,packages/google-cloud-dialogflow/samples/README.md) | +| Agents.get_validation_result | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/agents.get_validation_result.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/agents.get_validation_result.js,packages/google-cloud-dialogflow/samples/README.md) | +| Agents.import_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/agents.import_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/agents.import_agent.js,packages/google-cloud-dialogflow/samples/README.md) | +| Agents.restore_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/agents.restore_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/agents.restore_agent.js,packages/google-cloud-dialogflow/samples/README.md) | +| Agents.search_agents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/agents.search_agents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/agents.search_agents.js,packages/google-cloud-dialogflow/samples/README.md) | +| Agents.set_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/agents.set_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/agents.set_agent.js,packages/google-cloud-dialogflow/samples/README.md) | +| Agents.train_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/agents.train_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/agents.train_agent.js,packages/google-cloud-dialogflow/samples/README.md) | +| Answer_records.list_answer_records | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/answer_records.list_answer_records.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/answer_records.list_answer_records.js,packages/google-cloud-dialogflow/samples/README.md) | +| Answer_records.update_answer_record | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/answer_records.update_answer_record.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/answer_records.update_answer_record.js,packages/google-cloud-dialogflow/samples/README.md) | +| Contexts.create_context | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/contexts.create_context.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/contexts.create_context.js,packages/google-cloud-dialogflow/samples/README.md) | +| Contexts.delete_all_contexts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/contexts.delete_all_contexts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/contexts.delete_all_contexts.js,packages/google-cloud-dialogflow/samples/README.md) | +| Contexts.delete_context | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/contexts.delete_context.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/contexts.delete_context.js,packages/google-cloud-dialogflow/samples/README.md) | +| Contexts.get_context | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/contexts.get_context.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/contexts.get_context.js,packages/google-cloud-dialogflow/samples/README.md) | +| Contexts.list_contexts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/contexts.list_contexts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/contexts.list_contexts.js,packages/google-cloud-dialogflow/samples/README.md) | +| Contexts.update_context | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/contexts.update_context.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/contexts.update_context.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversation_datasets.create_conversation_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_datasets.create_conversation_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_datasets.create_conversation_dataset.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversation_datasets.delete_conversation_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_datasets.delete_conversation_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_datasets.delete_conversation_dataset.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversation_datasets.get_conversation_dataset | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_datasets.get_conversation_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_datasets.get_conversation_dataset.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversation_datasets.import_conversation_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_datasets.import_conversation_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_datasets.import_conversation_data.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversation_datasets.list_conversation_datasets | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_datasets.list_conversation_datasets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_datasets.list_conversation_datasets.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversation_models.create_conversation_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.create_conversation_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.create_conversation_model.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversation_models.create_conversation_model_evaluation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.create_conversation_model_evaluation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.create_conversation_model_evaluation.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversation_models.delete_conversation_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.delete_conversation_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.delete_conversation_model.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversation_models.deploy_conversation_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.deploy_conversation_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.deploy_conversation_model.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversation_models.get_conversation_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.get_conversation_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.get_conversation_model.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversation_models.get_conversation_model_evaluation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.get_conversation_model_evaluation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.get_conversation_model_evaluation.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversation_models.list_conversation_model_evaluations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.list_conversation_model_evaluations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.list_conversation_model_evaluations.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversation_models.list_conversation_models | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.list_conversation_models.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.list_conversation_models.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversation_models.undeploy_conversation_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.undeploy_conversation_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_models.undeploy_conversation_model.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversation_profiles.clear_suggestion_feature_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_profiles.clear_suggestion_feature_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_profiles.clear_suggestion_feature_config.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversation_profiles.create_conversation_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_profiles.create_conversation_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_profiles.create_conversation_profile.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversation_profiles.delete_conversation_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_profiles.delete_conversation_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_profiles.delete_conversation_profile.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversation_profiles.get_conversation_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_profiles.get_conversation_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_profiles.get_conversation_profile.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversation_profiles.list_conversation_profiles | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_profiles.list_conversation_profiles.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_profiles.list_conversation_profiles.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversation_profiles.set_suggestion_feature_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_profiles.set_suggestion_feature_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_profiles.set_suggestion_feature_config.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversation_profiles.update_conversation_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversation_profiles.update_conversation_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversation_profiles.update_conversation_profile.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversations.complete_conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversations.complete_conversation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversations.complete_conversation.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversations.create_conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversations.create_conversation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversations.create_conversation.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversations.generate_stateless_summary | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversations.generate_stateless_summary.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversations.generate_stateless_summary.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversations.get_conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversations.get_conversation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversations.get_conversation.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversations.list_conversations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversations.list_conversations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversations.list_conversations.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversations.list_messages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversations.list_messages.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversations.list_messages.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversations.suggest_conversation_summary | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversations.suggest_conversation_summary.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversations.suggest_conversation_summary.js,packages/google-cloud-dialogflow/samples/README.md) | +| Documents.create_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/documents.create_document.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/documents.create_document.js,packages/google-cloud-dialogflow/samples/README.md) | +| Documents.delete_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/documents.delete_document.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/documents.delete_document.js,packages/google-cloud-dialogflow/samples/README.md) | +| Documents.export_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/documents.export_document.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/documents.export_document.js,packages/google-cloud-dialogflow/samples/README.md) | +| Documents.get_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/documents.get_document.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/documents.get_document.js,packages/google-cloud-dialogflow/samples/README.md) | +| Documents.import_documents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/documents.import_documents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/documents.import_documents.js,packages/google-cloud-dialogflow/samples/README.md) | +| Documents.list_documents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/documents.list_documents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/documents.list_documents.js,packages/google-cloud-dialogflow/samples/README.md) | +| Documents.reload_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/documents.reload_document.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/documents.reload_document.js,packages/google-cloud-dialogflow/samples/README.md) | +| Documents.update_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/documents.update_document.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/documents.update_document.js,packages/google-cloud-dialogflow/samples/README.md) | +| Entity_types.batch_create_entities | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/entity_types.batch_create_entities.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/entity_types.batch_create_entities.js,packages/google-cloud-dialogflow/samples/README.md) | +| Entity_types.batch_delete_entities | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/entity_types.batch_delete_entities.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/entity_types.batch_delete_entities.js,packages/google-cloud-dialogflow/samples/README.md) | +| Entity_types.batch_delete_entity_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/entity_types.batch_delete_entity_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/entity_types.batch_delete_entity_types.js,packages/google-cloud-dialogflow/samples/README.md) | +| Entity_types.batch_update_entities | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/entity_types.batch_update_entities.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/entity_types.batch_update_entities.js,packages/google-cloud-dialogflow/samples/README.md) | +| Entity_types.batch_update_entity_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/entity_types.batch_update_entity_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/entity_types.batch_update_entity_types.js,packages/google-cloud-dialogflow/samples/README.md) | +| Entity_types.create_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/entity_types.create_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/entity_types.create_entity_type.js,packages/google-cloud-dialogflow/samples/README.md) | +| Entity_types.delete_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/entity_types.delete_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/entity_types.delete_entity_type.js,packages/google-cloud-dialogflow/samples/README.md) | +| Entity_types.get_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/entity_types.get_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/entity_types.get_entity_type.js,packages/google-cloud-dialogflow/samples/README.md) | +| Entity_types.list_entity_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/entity_types.list_entity_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/entity_types.list_entity_types.js,packages/google-cloud-dialogflow/samples/README.md) | +| Entity_types.update_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/entity_types.update_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/entity_types.update_entity_type.js,packages/google-cloud-dialogflow/samples/README.md) | +| Environments.create_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/environments.create_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/environments.create_environment.js,packages/google-cloud-dialogflow/samples/README.md) | +| Environments.delete_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/environments.delete_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/environments.delete_environment.js,packages/google-cloud-dialogflow/samples/README.md) | +| Environments.get_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/environments.get_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/environments.get_environment.js,packages/google-cloud-dialogflow/samples/README.md) | +| Environments.get_environment_history | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/environments.get_environment_history.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/environments.get_environment_history.js,packages/google-cloud-dialogflow/samples/README.md) | +| Environments.list_environments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/environments.list_environments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/environments.list_environments.js,packages/google-cloud-dialogflow/samples/README.md) | +| Environments.update_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/environments.update_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/environments.update_environment.js,packages/google-cloud-dialogflow/samples/README.md) | +| Fulfillments.get_fulfillment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/fulfillments.get_fulfillment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/fulfillments.get_fulfillment.js,packages/google-cloud-dialogflow/samples/README.md) | +| Fulfillments.update_fulfillment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/fulfillments.update_fulfillment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/fulfillments.update_fulfillment.js,packages/google-cloud-dialogflow/samples/README.md) | +| Intents.batch_delete_intents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/intents.batch_delete_intents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/intents.batch_delete_intents.js,packages/google-cloud-dialogflow/samples/README.md) | +| Intents.batch_update_intents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/intents.batch_update_intents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/intents.batch_update_intents.js,packages/google-cloud-dialogflow/samples/README.md) | +| Intents.create_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/intents.create_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/intents.create_intent.js,packages/google-cloud-dialogflow/samples/README.md) | +| Intents.delete_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/intents.delete_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/intents.delete_intent.js,packages/google-cloud-dialogflow/samples/README.md) | +| Intents.get_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/intents.get_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/intents.get_intent.js,packages/google-cloud-dialogflow/samples/README.md) | +| Intents.list_intents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/intents.list_intents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/intents.list_intents.js,packages/google-cloud-dialogflow/samples/README.md) | +| Intents.update_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/intents.update_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/intents.update_intent.js,packages/google-cloud-dialogflow/samples/README.md) | +| Knowledge_bases.create_knowledge_base | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/knowledge_bases.create_knowledge_base.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/knowledge_bases.create_knowledge_base.js,packages/google-cloud-dialogflow/samples/README.md) | +| Knowledge_bases.delete_knowledge_base | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/knowledge_bases.delete_knowledge_base.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/knowledge_bases.delete_knowledge_base.js,packages/google-cloud-dialogflow/samples/README.md) | +| Knowledge_bases.get_knowledge_base | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/knowledge_bases.get_knowledge_base.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/knowledge_bases.get_knowledge_base.js,packages/google-cloud-dialogflow/samples/README.md) | +| Knowledge_bases.list_knowledge_bases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/knowledge_bases.list_knowledge_bases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/knowledge_bases.list_knowledge_bases.js,packages/google-cloud-dialogflow/samples/README.md) | +| Knowledge_bases.update_knowledge_base | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/knowledge_bases.update_knowledge_base.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/knowledge_bases.update_knowledge_base.js,packages/google-cloud-dialogflow/samples/README.md) | +| Participants.analyze_content | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/participants.analyze_content.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/participants.analyze_content.js,packages/google-cloud-dialogflow/samples/README.md) | +| Participants.create_participant | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/participants.create_participant.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/participants.create_participant.js,packages/google-cloud-dialogflow/samples/README.md) | +| Participants.get_participant | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/participants.get_participant.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/participants.get_participant.js,packages/google-cloud-dialogflow/samples/README.md) | +| Participants.list_participants | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/participants.list_participants.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/participants.list_participants.js,packages/google-cloud-dialogflow/samples/README.md) | +| Participants.streaming_analyze_content | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/participants.streaming_analyze_content.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/participants.streaming_analyze_content.js,packages/google-cloud-dialogflow/samples/README.md) | +| Participants.suggest_articles | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/participants.suggest_articles.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/participants.suggest_articles.js,packages/google-cloud-dialogflow/samples/README.md) | +| Participants.suggest_faq_answers | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/participants.suggest_faq_answers.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/participants.suggest_faq_answers.js,packages/google-cloud-dialogflow/samples/README.md) | +| Participants.suggest_smart_replies | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/participants.suggest_smart_replies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/participants.suggest_smart_replies.js,packages/google-cloud-dialogflow/samples/README.md) | +| Participants.update_participant | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/participants.update_participant.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/participants.update_participant.js,packages/google-cloud-dialogflow/samples/README.md) | +| Session_entity_types.create_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/session_entity_types.create_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/session_entity_types.create_session_entity_type.js,packages/google-cloud-dialogflow/samples/README.md) | +| Session_entity_types.delete_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/session_entity_types.delete_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/session_entity_types.delete_session_entity_type.js,packages/google-cloud-dialogflow/samples/README.md) | +| Session_entity_types.get_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/session_entity_types.get_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/session_entity_types.get_session_entity_type.js,packages/google-cloud-dialogflow/samples/README.md) | +| Session_entity_types.list_session_entity_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/session_entity_types.list_session_entity_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/session_entity_types.list_session_entity_types.js,packages/google-cloud-dialogflow/samples/README.md) | +| Session_entity_types.update_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/session_entity_types.update_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/session_entity_types.update_session_entity_type.js,packages/google-cloud-dialogflow/samples/README.md) | +| Sessions.detect_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/sessions.detect_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/sessions.detect_intent.js,packages/google-cloud-dialogflow/samples/README.md) | +| Sessions.streaming_detect_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/sessions.streaming_detect_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/sessions.streaming_detect_intent.js,packages/google-cloud-dialogflow/samples/README.md) | +| Versions.create_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/versions.create_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/versions.create_version.js,packages/google-cloud-dialogflow/samples/README.md) | +| Versions.delete_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/versions.delete_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/versions.delete_version.js,packages/google-cloud-dialogflow/samples/README.md) | +| Versions.get_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/versions.get_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/versions.get_version.js,packages/google-cloud-dialogflow/samples/README.md) | +| Versions.list_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/versions.list_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/versions.list_versions.js,packages/google-cloud-dialogflow/samples/README.md) | +| Versions.update_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/versions.update_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/versions.update_version.js,packages/google-cloud-dialogflow/samples/README.md) | +| Agents.delete_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.delete_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.delete_agent.js,packages/google-cloud-dialogflow/samples/README.md) | +| Agents.export_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.export_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.export_agent.js,packages/google-cloud-dialogflow/samples/README.md) | +| Agents.get_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.get_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.get_agent.js,packages/google-cloud-dialogflow/samples/README.md) | +| Agents.get_validation_result | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.get_validation_result.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.get_validation_result.js,packages/google-cloud-dialogflow/samples/README.md) | +| Agents.import_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.import_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.import_agent.js,packages/google-cloud-dialogflow/samples/README.md) | +| Agents.restore_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.restore_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.restore_agent.js,packages/google-cloud-dialogflow/samples/README.md) | +| Agents.search_agents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.search_agents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.search_agents.js,packages/google-cloud-dialogflow/samples/README.md) | +| Agents.set_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.set_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.set_agent.js,packages/google-cloud-dialogflow/samples/README.md) | +| Agents.train_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.train_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/agents.train_agent.js,packages/google-cloud-dialogflow/samples/README.md) | +| Answer_records.get_answer_record | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/answer_records.get_answer_record.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/answer_records.get_answer_record.js,packages/google-cloud-dialogflow/samples/README.md) | +| Answer_records.list_answer_records | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/answer_records.list_answer_records.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/answer_records.list_answer_records.js,packages/google-cloud-dialogflow/samples/README.md) | +| Answer_records.update_answer_record | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/answer_records.update_answer_record.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/answer_records.update_answer_record.js,packages/google-cloud-dialogflow/samples/README.md) | +| Contexts.create_context | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/contexts.create_context.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/contexts.create_context.js,packages/google-cloud-dialogflow/samples/README.md) | +| Contexts.delete_all_contexts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/contexts.delete_all_contexts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/contexts.delete_all_contexts.js,packages/google-cloud-dialogflow/samples/README.md) | +| Contexts.delete_context | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/contexts.delete_context.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/contexts.delete_context.js,packages/google-cloud-dialogflow/samples/README.md) | +| Contexts.get_context | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/contexts.get_context.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/contexts.get_context.js,packages/google-cloud-dialogflow/samples/README.md) | +| Contexts.list_contexts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/contexts.list_contexts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/contexts.list_contexts.js,packages/google-cloud-dialogflow/samples/README.md) | +| Contexts.update_context | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/contexts.update_context.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/contexts.update_context.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversation_profiles.clear_suggestion_feature_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversation_profiles.clear_suggestion_feature_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/conversation_profiles.clear_suggestion_feature_config.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversation_profiles.create_conversation_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversation_profiles.create_conversation_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/conversation_profiles.create_conversation_profile.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversation_profiles.delete_conversation_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversation_profiles.delete_conversation_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/conversation_profiles.delete_conversation_profile.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversation_profiles.get_conversation_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversation_profiles.get_conversation_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/conversation_profiles.get_conversation_profile.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversation_profiles.list_conversation_profiles | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversation_profiles.list_conversation_profiles.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/conversation_profiles.list_conversation_profiles.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversation_profiles.set_suggestion_feature_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversation_profiles.set_suggestion_feature_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/conversation_profiles.set_suggestion_feature_config.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversation_profiles.update_conversation_profile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversation_profiles.update_conversation_profile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/conversation_profiles.update_conversation_profile.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversations.batch_create_messages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.batch_create_messages.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.batch_create_messages.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversations.complete_conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.complete_conversation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.complete_conversation.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversations.create_conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.create_conversation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.create_conversation.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversations.generate_stateless_summary | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.generate_stateless_summary.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.generate_stateless_summary.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversations.get_conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.get_conversation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.get_conversation.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversations.list_conversations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.list_conversations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.list_conversations.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversations.list_messages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.list_messages.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.list_messages.js,packages/google-cloud-dialogflow/samples/README.md) | +| Conversations.suggest_conversation_summary | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.suggest_conversation_summary.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.suggest_conversation_summary.js,packages/google-cloud-dialogflow/samples/README.md) | +| Documents.create_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/documents.create_document.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/documents.create_document.js,packages/google-cloud-dialogflow/samples/README.md) | +| Documents.delete_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/documents.delete_document.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/documents.delete_document.js,packages/google-cloud-dialogflow/samples/README.md) | +| Documents.get_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/documents.get_document.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/documents.get_document.js,packages/google-cloud-dialogflow/samples/README.md) | +| Documents.import_documents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/documents.import_documents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/documents.import_documents.js,packages/google-cloud-dialogflow/samples/README.md) | +| Documents.list_documents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/documents.list_documents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/documents.list_documents.js,packages/google-cloud-dialogflow/samples/README.md) | +| Documents.reload_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/documents.reload_document.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/documents.reload_document.js,packages/google-cloud-dialogflow/samples/README.md) | +| Documents.update_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/documents.update_document.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/documents.update_document.js,packages/google-cloud-dialogflow/samples/README.md) | +| Entity_types.batch_create_entities | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.batch_create_entities.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.batch_create_entities.js,packages/google-cloud-dialogflow/samples/README.md) | +| Entity_types.batch_delete_entities | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.batch_delete_entities.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.batch_delete_entities.js,packages/google-cloud-dialogflow/samples/README.md) | +| Entity_types.batch_delete_entity_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.batch_delete_entity_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.batch_delete_entity_types.js,packages/google-cloud-dialogflow/samples/README.md) | +| Entity_types.batch_update_entities | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.batch_update_entities.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.batch_update_entities.js,packages/google-cloud-dialogflow/samples/README.md) | +| Entity_types.batch_update_entity_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.batch_update_entity_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.batch_update_entity_types.js,packages/google-cloud-dialogflow/samples/README.md) | +| Entity_types.create_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.create_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.create_entity_type.js,packages/google-cloud-dialogflow/samples/README.md) | +| Entity_types.delete_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.delete_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.delete_entity_type.js,packages/google-cloud-dialogflow/samples/README.md) | +| Entity_types.get_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.get_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.get_entity_type.js,packages/google-cloud-dialogflow/samples/README.md) | +| Entity_types.list_entity_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.list_entity_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.list_entity_types.js,packages/google-cloud-dialogflow/samples/README.md) | +| Entity_types.update_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.update_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/entity_types.update_entity_type.js,packages/google-cloud-dialogflow/samples/README.md) | +| Environments.create_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/environments.create_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/environments.create_environment.js,packages/google-cloud-dialogflow/samples/README.md) | +| Environments.delete_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/environments.delete_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/environments.delete_environment.js,packages/google-cloud-dialogflow/samples/README.md) | +| Environments.get_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/environments.get_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/environments.get_environment.js,packages/google-cloud-dialogflow/samples/README.md) | +| Environments.get_environment_history | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/environments.get_environment_history.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/environments.get_environment_history.js,packages/google-cloud-dialogflow/samples/README.md) | +| Environments.list_environments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/environments.list_environments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/environments.list_environments.js,packages/google-cloud-dialogflow/samples/README.md) | +| Environments.update_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/environments.update_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/environments.update_environment.js,packages/google-cloud-dialogflow/samples/README.md) | +| Fulfillments.get_fulfillment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/fulfillments.get_fulfillment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/fulfillments.get_fulfillment.js,packages/google-cloud-dialogflow/samples/README.md) | +| Fulfillments.update_fulfillment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/fulfillments.update_fulfillment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/fulfillments.update_fulfillment.js,packages/google-cloud-dialogflow/samples/README.md) | +| Intents.batch_delete_intents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/intents.batch_delete_intents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/intents.batch_delete_intents.js,packages/google-cloud-dialogflow/samples/README.md) | +| Intents.batch_update_intents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/intents.batch_update_intents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/intents.batch_update_intents.js,packages/google-cloud-dialogflow/samples/README.md) | +| Intents.create_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/intents.create_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/intents.create_intent.js,packages/google-cloud-dialogflow/samples/README.md) | +| Intents.delete_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/intents.delete_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/intents.delete_intent.js,packages/google-cloud-dialogflow/samples/README.md) | +| Intents.get_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/intents.get_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/intents.get_intent.js,packages/google-cloud-dialogflow/samples/README.md) | +| Intents.list_intents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/intents.list_intents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/intents.list_intents.js,packages/google-cloud-dialogflow/samples/README.md) | +| Intents.update_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/intents.update_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/intents.update_intent.js,packages/google-cloud-dialogflow/samples/README.md) | +| Knowledge_bases.create_knowledge_base | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/knowledge_bases.create_knowledge_base.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/knowledge_bases.create_knowledge_base.js,packages/google-cloud-dialogflow/samples/README.md) | +| Knowledge_bases.delete_knowledge_base | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/knowledge_bases.delete_knowledge_base.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/knowledge_bases.delete_knowledge_base.js,packages/google-cloud-dialogflow/samples/README.md) | +| Knowledge_bases.get_knowledge_base | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/knowledge_bases.get_knowledge_base.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/knowledge_bases.get_knowledge_base.js,packages/google-cloud-dialogflow/samples/README.md) | +| Knowledge_bases.list_knowledge_bases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/knowledge_bases.list_knowledge_bases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/knowledge_bases.list_knowledge_bases.js,packages/google-cloud-dialogflow/samples/README.md) | +| Knowledge_bases.update_knowledge_base | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/knowledge_bases.update_knowledge_base.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/knowledge_bases.update_knowledge_base.js,packages/google-cloud-dialogflow/samples/README.md) | +| Participants.analyze_content | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.analyze_content.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.analyze_content.js,packages/google-cloud-dialogflow/samples/README.md) | +| Participants.compile_suggestion | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.compile_suggestion.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.compile_suggestion.js,packages/google-cloud-dialogflow/samples/README.md) | +| Participants.create_participant | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.create_participant.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.create_participant.js,packages/google-cloud-dialogflow/samples/README.md) | +| Participants.get_participant | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.get_participant.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.get_participant.js,packages/google-cloud-dialogflow/samples/README.md) | +| Participants.list_participants | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.list_participants.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.list_participants.js,packages/google-cloud-dialogflow/samples/README.md) | +| Participants.list_suggestions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.list_suggestions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.list_suggestions.js,packages/google-cloud-dialogflow/samples/README.md) | +| Participants.streaming_analyze_content | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.streaming_analyze_content.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.streaming_analyze_content.js,packages/google-cloud-dialogflow/samples/README.md) | +| Participants.suggest_articles | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.suggest_articles.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.suggest_articles.js,packages/google-cloud-dialogflow/samples/README.md) | +| Participants.suggest_faq_answers | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.suggest_faq_answers.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.suggest_faq_answers.js,packages/google-cloud-dialogflow/samples/README.md) | +| Participants.suggest_smart_replies | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.suggest_smart_replies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.suggest_smart_replies.js,packages/google-cloud-dialogflow/samples/README.md) | +| Participants.update_participant | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.update_participant.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.update_participant.js,packages/google-cloud-dialogflow/samples/README.md) | +| Session_entity_types.create_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/session_entity_types.create_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/session_entity_types.create_session_entity_type.js,packages/google-cloud-dialogflow/samples/README.md) | +| Session_entity_types.delete_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/session_entity_types.delete_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/session_entity_types.delete_session_entity_type.js,packages/google-cloud-dialogflow/samples/README.md) | +| Session_entity_types.get_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/session_entity_types.get_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/session_entity_types.get_session_entity_type.js,packages/google-cloud-dialogflow/samples/README.md) | +| Session_entity_types.list_session_entity_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/session_entity_types.list_session_entity_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/session_entity_types.list_session_entity_types.js,packages/google-cloud-dialogflow/samples/README.md) | +| Session_entity_types.update_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/session_entity_types.update_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/session_entity_types.update_session_entity_type.js,packages/google-cloud-dialogflow/samples/README.md) | +| Sessions.detect_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/sessions.detect_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/sessions.detect_intent.js,packages/google-cloud-dialogflow/samples/README.md) | +| Sessions.streaming_detect_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/sessions.streaming_detect_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/sessions.streaming_detect_intent.js,packages/google-cloud-dialogflow/samples/README.md) | +| Versions.create_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/versions.create_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/versions.create_version.js,packages/google-cloud-dialogflow/samples/README.md) | +| Versions.delete_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/versions.delete_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/versions.delete_version.js,packages/google-cloud-dialogflow/samples/README.md) | +| Versions.get_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/versions.get_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/versions.get_version.js,packages/google-cloud-dialogflow/samples/README.md) | +| Versions.list_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/versions.list_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/versions.list_versions.js,packages/google-cloud-dialogflow/samples/README.md) | +| Versions.update_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/versions.update_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/versions.update_version.js,packages/google-cloud-dialogflow/samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/quickstart.js,packages/google-cloud-dialogflow/samples/README.md) | diff --git a/packages/google-cloud-dialogflow/package.json b/packages/google-cloud-dialogflow/package.json index dfdaed164d2..a7f2ed9792e 100644 --- a/packages/google-cloud-dialogflow/package.json +++ b/packages/google-cloud-dialogflow/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/dialogflow", "description": "Dialogflow API client for Node.js", - "version": "5.7.1", + "version": "5.8.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { @@ -32,20 +32,20 @@ "Dialogflow API" ], "scripts": { - "test": "c8 mocha build/test/*_v2.js && c8 mocha build/test/*_v2beta1.js", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "system-test": "npm run compile && c8 mocha build/system-test", - "docs": "jsdoc -c .jsdoc.js", - "lint": "gts check", - "fix": "gts fix", - "docs-test": "linkinator docs", "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test/*_v2.js && c8 mocha build/test/*_v2beta1.js" }, "dependencies": { "google-gax": "^3.5.8" @@ -61,6 +61,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -71,5 +72,4 @@ "webpack-cli": "^5.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-dialogflow" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/agent.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/agent.proto index 64b219e5f20..5595f4c9751 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/agent.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/agent.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow/protos/google/cloud/dialogflow/v2/answer_record.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/answer_record.proto index 0eb5216a8c5..8f2587caa95 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/answer_record.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/answer_record.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -208,6 +208,8 @@ message AnswerFeedback { // Indicates whether the answer/item was clicked by the human agent // or not. Default to false. + // For knowledge search, the answer record is considered to be clicked if the + // answer was copied or any URI was clicked. bool clicked = 3; // Time when the answer/item was clicked. diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/audio_config.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/audio_config.proto index c86ec797ce9..d45dbc8fdbc 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/audio_config.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/audio_config.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -241,6 +241,12 @@ message InputAudioConfig { // [Cloud Speech API // documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) // for more details. + // If you specify a model, the following models typically have the best + // performance: + // + // - phone_call (best for Agent Assist and telephony) + // - latest_short (best for Dialogflow non-telephony) + // - command_and_search (best for very short utterances and commands) string model = 7; // Which variant of the [Speech @@ -266,6 +272,9 @@ message InputAudioConfig { // If `false` and recognition doesn't return any result, trigger // `NO_SPEECH_RECOGNIZED` event to Dialogflow agent. bool disable_no_speech_recognized_event = 14; + + // Enable automatic punctuation option at the speech backend. + bool enable_automatic_punctuation = 17; } // Gender of the voice as described in diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/context.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/context.proto index fad65640e57..63fa23dc678 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/context.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/context.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation.proto index a9dc36f7aca..625fec3a6c1 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -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/dialogflow/v2/conversation_profile.proto"; import "google/cloud/dialogflow/v2/participant.proto"; import "google/protobuf/timestamp.proto"; @@ -139,6 +140,20 @@ service Conversations { }; option (google.api.method_signature) = "conversation"; } + + // Generates and returns a summary for a conversation that does not have a + // resource created for it. + rpc GenerateStatelessSummary(GenerateStatelessSummaryRequest) + returns (GenerateStatelessSummaryResponse) { + option (google.api.http) = { + post: "/v2/{stateless_conversation.parent=projects/*}/suggestions:generateStatelessSummary" + body: "*" + additional_bindings { + post: "/v2/{stateless_conversation.parent=projects/*/locations/*}/suggestions:generateStatelessSummary" + body: "*" + } + }; + } } // Represents a conversation. @@ -461,3 +476,82 @@ message SuggestConversationSummaryResponse { // request if there weren't that many messages in the conversation. int32 context_size = 3; } + +// The request message for +// [Conversations.GenerateStatelessSummary][google.cloud.dialogflow.v2.Conversations.GenerateStatelessSummary]. +message GenerateStatelessSummaryRequest { + // The minimum amount of information required to generate a Summary without + // having a Conversation resource created. + message MinimalConversation { + // Required. The messages that the Summary will be generated from. It is + // expected that this message content is already redacted and does not + // contain any PII. Required fields: {content, language_code, participant, + // participant_role} Optional fields: {send_time} If send_time is not + // provided, then the messages must be provided in chronological order. + repeated Message messages = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The parent resource to charge for the Summary's generation. + // Format: `projects//locations/`. + string parent = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + } + + // Required. The conversation to suggest a summary for. + MinimalConversation stateless_conversation = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. A ConversationProfile containing information required for Summary + // generation. + // Required fields: {language_code, security_settings} + // Optional fields: {agent_assistant_config} + ConversationProfile conversation_profile = 2 + [(google.api.field_behavior) = REQUIRED]; + + // The name of the latest conversation message used as context for + // generating a Summary. If empty, the latest message of the conversation will + // be used. The format is specific to the user and the names of the messages + // provided. + string latest_message = 3 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Message" + }]; + + // Max number of messages prior to and including + // [latest_message] to use as context when compiling the + // suggestion. By default 500 and at most 1000. + int32 max_context_size = 4; +} + +// The response message for +// [Conversations.GenerateStatelessSummary][google.cloud.dialogflow.v2.Conversations.GenerateStatelessSummary]. +message GenerateStatelessSummaryResponse { + // Generated summary for a conversation. + message Summary { + // The summary content that is concatenated into one string. + string text = 1; + + // The summary content that is divided into sections. The key is the + // section's name and the value is the section's content. There is no + // specific format for the key or value. + map text_sections = 2; + } + + // Generated summary. + Summary summary = 1; + + // The name of the latest conversation message used as context for + // compiling suggestion. The format is specific to the user and the names of + // the messages provided. + string latest_message = 2 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Message" + }]; + + // Number of messages prior to and including + // [last_conversation_message][] used to compile the suggestion. It may be + // smaller than the [GenerateStatelessSummaryRequest.context_size][] field in + // the request if there weren't that many messages in the conversation. + int32 context_size = 3; +} diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_dataset.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_dataset.proto index 5757ef379b2..88953a86738 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_dataset.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_dataset.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_event.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_event.proto index 4ce33c7cd03..8d12ee65374 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_event.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_event.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_model.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_model.proto index 91634700954..fb6dfecc0df 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_model.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_model.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_profile.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_profile.proto index 669dac9bb7c..0ab690689e0 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_profile.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/conversation_profile.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -558,6 +558,16 @@ message HumanAgentAssistantConfig { string model = 1 [(google.api.resource_reference) = { type: "dialogflow.googleapis.com/ConversationModel" }]; + + // Version of current baseline model. It will be ignored if + // [model][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig.model] + // is set. Valid versions are: + // Article Suggestion baseline model: + // - 0.9 + // - 1.0 (default) + // Summarization baseline model: + // - 1.0 + string baseline_model_version = 8; } // Config to process conversation. diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/document.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/document.proto index 6f1fab774ea..de532fc4ef2 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/document.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/document.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -582,8 +582,13 @@ message ReloadDocumentRequest { ]; // The source for document reloading. + // // If provided, the service will load the contents from the source // and update document in the knowledge base. + // + // Reloading from a new document source is allowed for smart messaging + // documents only. If you want to update the source for other document types, + // please delete the existing document and create a new one instead. oneof source { // Optional. The path of gcs source file for reloading document content. For // now, only gcs uri is supported. diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/entity_type.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/entity_type.proto index 1d783c08ae3..b7069fb04c2 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/entity_type.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/entity_type.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow/protos/google/cloud/dialogflow/v2/environment.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/environment.proto index c57673d8d5f..1bff0ad60a3 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/environment.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/environment.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow/protos/google/cloud/dialogflow/v2/fulfillment.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/fulfillment.proto index f704eb080c5..14951bcfaa0 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/fulfillment.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/fulfillment.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow/protos/google/cloud/dialogflow/v2/gcs.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/gcs.proto index e77c36fa383..3c31506fc0b 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/gcs.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/gcs.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow/protos/google/cloud/dialogflow/v2/human_agent_assistant_event.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/human_agent_assistant_event.proto index 648db664397..d20408f1149 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/human_agent_assistant_event.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/human_agent_assistant_event.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow/protos/google/cloud/dialogflow/v2/intent.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/intent.proto index fee08d2dd54..1a949cc2705 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/intent.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/intent.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow/protos/google/cloud/dialogflow/v2/knowledge_base.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/knowledge_base.proto index c119b829f63..8a8c87cc5fb 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/knowledge_base.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/knowledge_base.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow/protos/google/cloud/dialogflow/v2/participant.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/participant.proto index 8a1b969b545..1abdde8523a 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/participant.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/participant.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -607,6 +607,10 @@ message StreamingAnalyzeContentRequest { // `Fulfillment`s in Dialogflow virtual agent have been configured to return // partial responses. bool enable_partial_automated_agent_reply = 12; + + // If true, `StreamingAnalyzeContentResponse.debugging_info` will get + // populated. + bool enable_debugging_info = 19; } // The top-level message returned from the `StreamingAnalyzeContent` method. @@ -677,6 +681,10 @@ message StreamingAnalyzeContentResponse { // Indicates the parameters of DTMF. DtmfParameters dtmf_parameters = 10; + + // Debugging info that would get populated when + // `StreamingAnalyzeContentRequest.enable_debugging_info` is set to true. + CloudConversationDebuggingInfo debugging_info = 11; } // The request message for diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/session.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/session.proto index 2099778174e..c7b18f67dc9 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/session.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/session.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -483,6 +483,74 @@ message StreamingDetectIntentRequest { // `query_input` was set to a streaming input audio config. The complete audio // over all streaming messages must not exceed 1 minute. bytes input_audio = 6; + + // if true, `StreamingDetectIntentResponse.debugging_info` will get populated. + bool enable_debugging_info = 8; +} + +// Cloud conversation info for easier debugging. +// It will get populated in `StreamingDetectIntentResponse` or +// `StreamingAnalyzeContentResponse` when the flag `enable_debugging_info` is +// set to true in corresponding requests. +message CloudConversationDebuggingInfo { + // Number of input audio data chunks in streaming requests. + int32 audio_data_chunks = 1; + + // Time offset of the end of speech utterance relative to the + // beginning of the first audio chunk. + google.protobuf.Duration result_end_time_offset = 2; + + // Duration of first audio chunk. + google.protobuf.Duration first_audio_duration = 3; + + // Whether client used single utterance mode. + bool single_utterance = 5; + + // Time offsets of the speech partial results relative to the beginning of + // the stream. + repeated google.protobuf.Duration speech_partial_results_end_times = 6; + + // Time offsets of the speech final results (is_final=true) relative to the + // beginning of the stream. + repeated google.protobuf.Duration speech_final_results_end_times = 7; + + // Total number of partial responses. + int32 partial_responses = 8; + + // Time offset of Speaker ID stream close time relative to the Speech stream + // close time in milliseconds. Only meaningful for conversations involving + // passive verification. + int32 speaker_id_passive_latency_ms_offset = 9; + + // Whether a barge-in event is triggered in this request. + bool bargein_event_triggered = 10; + + // Whether speech uses single utterance mode. + bool speech_single_utterance = 11; + + // Time offsets of the DTMF partial results relative to the beginning of + // the stream. + repeated google.protobuf.Duration dtmf_partial_results_times = 12; + + // Time offsets of the DTMF final results relative to the beginning of + // the stream. + repeated google.protobuf.Duration dtmf_final_results_times = 13; + + // Time offset of the end-of-single-utterance signal relative to the + // beginning of the stream. + google.protobuf.Duration single_utterance_end_time_offset = 14; + + // No speech timeout settings observed at runtime. + google.protobuf.Duration no_speech_timeout = 15; + + // Whether the streaming terminates with an injected text query. + bool is_input_text = 16; + + // Client half close time in terms of input audio duration. + google.protobuf.Duration client_half_close_time_offset = 17; + + // Client half close time in terms of API streaming duration. + google.protobuf.Duration client_half_close_streaming_time_offset = 18; } // The top-level message returned from the @@ -527,6 +595,10 @@ message StreamingDetectIntentResponse { // The config used by the speech synthesizer to generate the output audio. OutputAudioConfig output_audio_config = 6; + + // Debugging info that would get populated when + // `StreamingDetectIntentRequest.enable_debugging_info` is set to true. + CloudConversationDebuggingInfo debugging_info = 8; } // Contains a speech recognition result corresponding to a portion of the audio diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/session_entity_type.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/session_entity_type.proto index 876c26ab14e..ff158590786 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/session_entity_type.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/session_entity_type.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow/protos/google/cloud/dialogflow/v2/validation_result.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/validation_result.proto index aadfea415c5..01a9f84f9f7 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/validation_result.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/validation_result.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow/protos/google/cloud/dialogflow/v2/version.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/version.proto index 26c8f2c5401..c9f0560af7b 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/version.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/version.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow/protos/google/cloud/dialogflow/v2/webhook.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/webhook.proto index cbd99701eea..6aa28141b15 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/webhook.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2/webhook.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/agent.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/agent.proto index a6a23953993..a860df481a1 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/agent.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/agent.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/answer_record.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/answer_record.proto index 2e1817581bf..f14e61c69cb 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/answer_record.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/answer_record.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -176,6 +176,8 @@ message AnswerFeedback { // Indicates whether the answer/item was clicked by the human agent // or not. Default to false. + // For knowledge search, the answer record is considered to be clicked if the + // answer was copied or any URI was clicked. bool clicked = 3; // Time when the answer/item was clicked. diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/audio_config.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/audio_config.proto index 649b11b2bed..79c19c87b31 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/audio_config.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/audio_config.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -206,6 +206,16 @@ message SpeechWordInfo { // two phases. The durations are measured in terms of the audio length fromt the // the start of the input audio. // +// The flow goes like below: +// +// --> Time +// +// without speech detection | utterance only | utterance or no-speech event +// | | +// +-------------+ | +------------+ | +---------------+ +// ----------+ no barge-in +-|-+ barge-in +-|-+ normal period +----------- +// +-------------+ | +------------+ | +---------------+ +// // No-speech event is a response with END_OF_UTTERANCE without any transcript // following up. message BargeInConfig { @@ -274,6 +284,12 @@ message InputAudioConfig { // [Cloud Speech API // documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) // for more details. + // If you specify a model, the following models typically have the best + // performance: + // + // - phone_call (best for Agent Assist and telephony) + // - latest_short (best for Dialogflow non-telephony) + // - command_and_search (best for very short utterances and commands) string model = 7; // Which variant of the [Speech @@ -302,6 +318,9 @@ message InputAudioConfig { // Configuration of barge-in behavior during the streaming of input audio. BargeInConfig barge_in_config = 15; + + // Enable automatic punctuation option at the speech backend. + bool enable_automatic_punctuation = 17; } // Gender of the voice as described in diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/context.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/context.proto index 5eb7de6a434..c9210ad1f21 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/context.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/context.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation.proto index febaa863098..8627b6ae72c 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -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/dialogflow/v2beta1/conversation_profile.proto"; import "google/cloud/dialogflow/v2beta1/participant.proto"; import "google/protobuf/timestamp.proto"; @@ -154,6 +155,20 @@ service Conversations { }; option (google.api.method_signature) = "conversation"; } + + // Generates and returns a summary for a conversation that does not have a + // resource created for it. + rpc GenerateStatelessSummary(GenerateStatelessSummaryRequest) + returns (GenerateStatelessSummaryResponse) { + option (google.api.http) = { + post: "/v2beta1/{stateless_conversation.parent=projects/*}/suggestions:generateStatelessSummary" + body: "*" + additional_bindings { + post: "/v2beta1/{stateless_conversation.parent=projects/*/locations/*}/suggestions:generateStatelessSummary" + body: "*" + } + }; + } } // Represents a conversation. @@ -521,3 +536,82 @@ message SuggestConversationSummaryResponse { // request if there weren't that many messages in the conversation. int32 context_size = 3; } + +// The request message for +// [Conversations.GenerateStatelessSummary][google.cloud.dialogflow.v2beta1.Conversations.GenerateStatelessSummary]. +message GenerateStatelessSummaryRequest { + // The minimum amount of information required to generate a Summary without + // having a Conversation resource created. + message MinimalConversation { + // Required. The messages that the Summary will be generated from. It is + // expected that this message content is already redacted and does not + // contain any PII. Required fields: {content, language_code, participant, + // participant_role} Optional fields: {send_time} If send_time is not + // provided, then the messages must be provided in chronological order. + repeated Message messages = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The parent resource to charge for the Summary's generation. + // Format: `projects//locations/`. + string parent = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + } + + // Required. The conversation to suggest a summary for. + MinimalConversation stateless_conversation = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. A ConversationProfile containing information required for Summary + // generation. + // Required fields: {language_code, security_settings} + // Optional fields: {agent_assistant_config} + ConversationProfile conversation_profile = 2 + [(google.api.field_behavior) = REQUIRED]; + + // The name of the latest conversation message used as context for + // generating a Summary. If empty, the latest message of the conversation will + // be used. The format is specific to the user and the names of the messages + // provided. + string latest_message = 3 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Message" + }]; + + // Max number of messages prior to and including + // [latest_message] to use as context when compiling the + // suggestion. By default 500 and at most 1000. + int32 max_context_size = 4; +} + +// The response message for +// [Conversations.GenerateStatelessSummary][google.cloud.dialogflow.v2beta1.Conversations.GenerateStatelessSummary]. +message GenerateStatelessSummaryResponse { + // Generated summary for a conversation. + message Summary { + // The summary content that is concatenated into one string. + string text = 1; + + // The summary content that is divided into sections. The key is the + // section's name and the value is the section's content. There is no + // specific format for the key or value. + map text_sections = 2; + } + + // Generated summary. + Summary summary = 1; + + // The name of the latest conversation message used as context for + // compiling suggestion. The format is specific to the user and the names of + // the messages provided. + string latest_message = 2 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Message" + }]; + + // Number of messages prior to and including + // [last_conversation_message][] used to compile the suggestion. It may be + // smaller than the [GenerateStatelessSummaryRequest.context_size][] field in + // the request if there weren't that many messages in the conversation. + int32 context_size = 3; +} diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation_event.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation_event.proto index 79101074e55..6c3038380d4 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation_event.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation_event.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation_profile.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation_profile.proto index cfaaf2c9d84..9015a17a8bd 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation_profile.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/conversation_profile.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -472,6 +472,16 @@ message HumanAgentAssistantConfig { string model = 1 [(google.api.resource_reference) = { type: "dialogflow.googleapis.com/ConversationModel" }]; + + // Version of current baseline model. It will be ignored if + // [model][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig.model] + // is set. Valid versions are: + // Article Suggestion baseline model: + // - 0.9 + // - 1.0 (default) + // Summarization baseline model: + // - 1.0 + string baseline_model_version = 8; } // Config to process conversation. diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/document.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/document.proto index 2f5ee140608..73cf618e61a 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/document.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/document.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -626,8 +626,13 @@ message ReloadDocumentRequest { ]; // The source for document reloading. + // // Optional. If provided, the service will load the contents from the source // and update document in the knowledge base. + // + // Reloading from a new document source is allowed for smart messaging + // documents only. If you want to update the source for other document types, + // please delete the existing document and create a new one instead. oneof source { // The path for a Cloud Storage source file for reloading document content. // If not provided, the Document's existing source will be reloaded. diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/entity_type.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/entity_type.proto index 7fc3f67ed5f..7c90e69d762 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/entity_type.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/entity_type.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/environment.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/environment.proto index 1efbaf3aab3..a46c1c478b1 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/environment.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/environment.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/fulfillment.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/fulfillment.proto index 836a9d082f4..93c24f25d14 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/fulfillment.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/fulfillment.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/gcs.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/gcs.proto index 49aa6c3092a..00e51f5a2c6 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/gcs.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/gcs.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/human_agent_assistant_event.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/human_agent_assistant_event.proto index ae1d0db80be..63b77d53e77 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/human_agent_assistant_event.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/human_agent_assistant_event.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/intent.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/intent.proto index b4cb7e6e89e..fc3a9ed93a2 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/intent.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/intent.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/knowledge_base.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/knowledge_base.proto index 04b08bfa77e..0e55562450a 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/knowledge_base.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/knowledge_base.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/participant.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/participant.proto index 52bde05fb80..59786b579d9 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/participant.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/participant.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -868,6 +868,10 @@ message StreamingAnalyzeContentRequest { // `Fulfillment`s in Dialogflow virtual agent have been configured to return // partial responses. bool enable_partial_automated_agent_reply = 12; + + // if true, `StreamingAnalyzeContentResponse.debugging_info` will get + // populated. + bool enable_debugging_info = 19; } // The top-level message returned from the `StreamingAnalyzeContent` method. @@ -938,6 +942,10 @@ message StreamingAnalyzeContentResponse { // Indicates the parameters of DTMF. DtmfParameters dtmf_parameters = 10; + + // Debugging info that would get populated when + // `StreamingAnalyzeContentRequest.enable_debugging_info` is set to true. + CloudConversationDebuggingInfo debugging_info = 11; } // Represents a part of a message possibly annotated with an entity. The part diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/session.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/session.proto index b1683d8ec26..2577f07cc3a 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/session.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/session.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -583,6 +583,74 @@ message StreamingDetectIntentRequest { // `query_input` was set to a streaming input audio config. The complete audio // over all streaming messages must not exceed 1 minute. bytes input_audio = 6; + + // If true, `StreamingDetectIntentResponse.debugging_info` will get populated. + bool enable_debugging_info = 8; +} + +// Cloud conversation info for easier debugging. +// It will get populated in `StreamingDetectIntentResponse` or +// `StreamingAnalyzeContentResponse` when the flag `enable_debugging_info` is +// set to true in corresponding requests. +message CloudConversationDebuggingInfo { + // Number of input audio data chunks in streaming requests. + int32 audio_data_chunks = 1; + + // Time offset of the end of speech utterance relative to the + // beginning of the first audio chunk. + google.protobuf.Duration result_end_time_offset = 2; + + // Duration of first audio chunk. + google.protobuf.Duration first_audio_duration = 3; + + // Whether client used single utterance mode. + bool single_utterance = 5; + + // Time offsets of the speech partial results relative to the beginning of + // the stream. + repeated google.protobuf.Duration speech_partial_results_end_times = 6; + + // Time offsets of the speech final results (is_final=true) relative to the + // beginning of the stream. + repeated google.protobuf.Duration speech_final_results_end_times = 7; + + // Total number of partial responses. + int32 partial_responses = 8; + + // Time offset of Speaker ID stream close time relative to the Speech stream + // close time in milliseconds. Only meaningful for conversations involving + // passive verification. + int32 speaker_id_passive_latency_ms_offset = 9; + + // Whether a barge-in event is triggered in this request. + bool bargein_event_triggered = 10; + + // Whether speech uses single utterance mode. + bool speech_single_utterance = 11; + + // Time offsets of the DTMF partial results relative to the beginning of + // the stream. + repeated google.protobuf.Duration dtmf_partial_results_times = 12; + + // Time offsets of the DTMF final results relative to the beginning of + // the stream. + repeated google.protobuf.Duration dtmf_final_results_times = 13; + + // Time offset of the end-of-single-utterance signal relative to the + // beginning of the stream. + google.protobuf.Duration single_utterance_end_time_offset = 14; + + // No speech timeout settings observed at runtime. + google.protobuf.Duration no_speech_timeout = 15; + + // Whether the streaming terminates with an injected text query. + bool is_input_text = 16; + + // Client half close time in terms of input audio duration. + google.protobuf.Duration client_half_close_time_offset = 17; + + // Client half close time in terms of API streaming duration. + google.protobuf.Duration client_half_close_streaming_time_offset = 18; } // The top-level message returned from the @@ -643,6 +711,10 @@ message StreamingDetectIntentResponse { // The config used by the speech synthesizer to generate the output audio. OutputAudioConfig output_audio_config = 6; + + // Debugging info that would get populated when + // `StreamingDetectIntentRequest.enable_debugging_info` is set to true. + CloudConversationDebuggingInfo debugging_info = 8; } // Contains a speech recognition result corresponding to a portion of the audio @@ -679,7 +751,6 @@ message StreamingDetectIntentResponse { // 7 | unset | END_OF_SINGLE_UTTERANCE | unset // 8 | " that is the question" | TRANSCRIPT | true // ``` -// // Concatenating the finalized transcripts with `is_final` set to true, // the complete utterance becomes "to be or not to be that is the question". message StreamingRecognitionResult { @@ -691,10 +762,7 @@ message StreamingRecognitionResult { // Message contains a (possibly partial) transcript. TRANSCRIPT = 1; - // Message contains DTMF digits. When the client gets the message, it - // should stop sending additional data, half-close the gRPC connection, and - // wait for any additional results until the server closes the gRPC. - // connection. + // Message contains DTMF digits. DTMF_DIGITS = 3; // Event indicates that the server has detected the end of the user's speech diff --git a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/session_entity_type.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/session_entity_type.proto index bdc89a45f09..1f1550c69c3 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/session_entity_type.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/session_entity_type.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/validation_result.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/validation_result.proto index 91072ac155c..7b8c40e89f0 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/validation_result.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/validation_result.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/version.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/version.proto index d2933d10026..1e2f5e1b0b1 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/version.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/version.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/webhook.proto b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/webhook.proto index bb3ca20202d..0504f0f683b 100644 --- a/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/webhook.proto +++ b/packages/google-cloud-dialogflow/protos/google/cloud/dialogflow/v2beta1/webhook.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-dialogflow/protos/protos.d.ts b/packages/google-cloud-dialogflow/protos/protos.d.ts index 7738cdb70be..46b85b923b6 100644 --- a/packages/google-cloud-dialogflow/protos/protos.d.ts +++ b/packages/google-cloud-dialogflow/protos/protos.d.ts @@ -4194,6 +4194,9 @@ export namespace google { /** StreamingAnalyzeContentRequest enablePartialAutomatedAgentReply */ enablePartialAutomatedAgentReply?: (boolean|null); + + /** StreamingAnalyzeContentRequest enableDebuggingInfo */ + enableDebuggingInfo?: (boolean|null); } /** Represents a StreamingAnalyzeContentRequest. */ @@ -4238,6 +4241,9 @@ export namespace google { /** StreamingAnalyzeContentRequest enablePartialAutomatedAgentReply. */ public enablePartialAutomatedAgentReply: boolean; + /** StreamingAnalyzeContentRequest enableDebuggingInfo. */ + public enableDebuggingInfo: boolean; + /** StreamingAnalyzeContentRequest config. */ public config?: ("audioConfig"|"textConfig"); @@ -4348,6 +4354,9 @@ export namespace google { /** StreamingAnalyzeContentResponse dtmfParameters */ dtmfParameters?: (google.cloud.dialogflow.v2.IDtmfParameters|null); + + /** StreamingAnalyzeContentResponse debuggingInfo */ + debuggingInfo?: (google.cloud.dialogflow.v2.ICloudConversationDebuggingInfo|null); } /** Represents a StreamingAnalyzeContentResponse. */ @@ -4383,6 +4392,9 @@ export namespace google { /** StreamingAnalyzeContentResponse dtmfParameters. */ public dtmfParameters?: (google.cloud.dialogflow.v2.IDtmfParameters|null); + /** StreamingAnalyzeContentResponse debuggingInfo. */ + public debuggingInfo?: (google.cloud.dialogflow.v2.ICloudConversationDebuggingInfo|null); + /** * Creates a new StreamingAnalyzeContentResponse instance using the specified properties. * @param [properties] Properties to set @@ -6518,6 +6530,9 @@ export namespace google { /** InputAudioConfig disableNoSpeechRecognizedEvent */ disableNoSpeechRecognizedEvent?: (boolean|null); + + /** InputAudioConfig enableAutomaticPunctuation */ + enableAutomaticPunctuation?: (boolean|null); } /** Represents an InputAudioConfig. */ @@ -6559,6 +6574,9 @@ export namespace google { /** InputAudioConfig disableNoSpeechRecognizedEvent. */ public disableNoSpeechRecognizedEvent: boolean; + /** InputAudioConfig enableAutomaticPunctuation. */ + public enableAutomaticPunctuation: boolean; + /** * Creates a new InputAudioConfig instance using the specified properties. * @param [properties] Properties to set @@ -7984,6 +8002,9 @@ export namespace google { /** StreamingDetectIntentRequest inputAudio */ inputAudio?: (Uint8Array|string|null); + + /** StreamingDetectIntentRequest enableDebuggingInfo */ + enableDebuggingInfo?: (boolean|null); } /** Represents a StreamingDetectIntentRequest. */ @@ -8016,6 +8037,9 @@ export namespace google { /** StreamingDetectIntentRequest inputAudio. */ public inputAudio: (Uint8Array|string); + /** StreamingDetectIntentRequest enableDebuggingInfo. */ + public enableDebuggingInfo: boolean; + /** * Creates a new StreamingDetectIntentRequest instance using the specified properties. * @param [properties] Properties to set @@ -8094,6 +8118,199 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a CloudConversationDebuggingInfo. */ + interface ICloudConversationDebuggingInfo { + + /** CloudConversationDebuggingInfo audioDataChunks */ + audioDataChunks?: (number|null); + + /** CloudConversationDebuggingInfo resultEndTimeOffset */ + resultEndTimeOffset?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo firstAudioDuration */ + firstAudioDuration?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo singleUtterance */ + singleUtterance?: (boolean|null); + + /** CloudConversationDebuggingInfo speechPartialResultsEndTimes */ + speechPartialResultsEndTimes?: (google.protobuf.IDuration[]|null); + + /** CloudConversationDebuggingInfo speechFinalResultsEndTimes */ + speechFinalResultsEndTimes?: (google.protobuf.IDuration[]|null); + + /** CloudConversationDebuggingInfo partialResponses */ + partialResponses?: (number|null); + + /** CloudConversationDebuggingInfo speakerIdPassiveLatencyMsOffset */ + speakerIdPassiveLatencyMsOffset?: (number|null); + + /** CloudConversationDebuggingInfo bargeinEventTriggered */ + bargeinEventTriggered?: (boolean|null); + + /** CloudConversationDebuggingInfo speechSingleUtterance */ + speechSingleUtterance?: (boolean|null); + + /** CloudConversationDebuggingInfo dtmfPartialResultsTimes */ + dtmfPartialResultsTimes?: (google.protobuf.IDuration[]|null); + + /** CloudConversationDebuggingInfo dtmfFinalResultsTimes */ + dtmfFinalResultsTimes?: (google.protobuf.IDuration[]|null); + + /** CloudConversationDebuggingInfo singleUtteranceEndTimeOffset */ + singleUtteranceEndTimeOffset?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo noSpeechTimeout */ + noSpeechTimeout?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo isInputText */ + isInputText?: (boolean|null); + + /** CloudConversationDebuggingInfo clientHalfCloseTimeOffset */ + clientHalfCloseTimeOffset?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo clientHalfCloseStreamingTimeOffset */ + clientHalfCloseStreamingTimeOffset?: (google.protobuf.IDuration|null); + } + + /** Represents a CloudConversationDebuggingInfo. */ + class CloudConversationDebuggingInfo implements ICloudConversationDebuggingInfo { + + /** + * Constructs a new CloudConversationDebuggingInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2.ICloudConversationDebuggingInfo); + + /** CloudConversationDebuggingInfo audioDataChunks. */ + public audioDataChunks: number; + + /** CloudConversationDebuggingInfo resultEndTimeOffset. */ + public resultEndTimeOffset?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo firstAudioDuration. */ + public firstAudioDuration?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo singleUtterance. */ + public singleUtterance: boolean; + + /** CloudConversationDebuggingInfo speechPartialResultsEndTimes. */ + public speechPartialResultsEndTimes: google.protobuf.IDuration[]; + + /** CloudConversationDebuggingInfo speechFinalResultsEndTimes. */ + public speechFinalResultsEndTimes: google.protobuf.IDuration[]; + + /** CloudConversationDebuggingInfo partialResponses. */ + public partialResponses: number; + + /** CloudConversationDebuggingInfo speakerIdPassiveLatencyMsOffset. */ + public speakerIdPassiveLatencyMsOffset: number; + + /** CloudConversationDebuggingInfo bargeinEventTriggered. */ + public bargeinEventTriggered: boolean; + + /** CloudConversationDebuggingInfo speechSingleUtterance. */ + public speechSingleUtterance: boolean; + + /** CloudConversationDebuggingInfo dtmfPartialResultsTimes. */ + public dtmfPartialResultsTimes: google.protobuf.IDuration[]; + + /** CloudConversationDebuggingInfo dtmfFinalResultsTimes. */ + public dtmfFinalResultsTimes: google.protobuf.IDuration[]; + + /** CloudConversationDebuggingInfo singleUtteranceEndTimeOffset. */ + public singleUtteranceEndTimeOffset?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo noSpeechTimeout. */ + public noSpeechTimeout?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo isInputText. */ + public isInputText: boolean; + + /** CloudConversationDebuggingInfo clientHalfCloseTimeOffset. */ + public clientHalfCloseTimeOffset?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo clientHalfCloseStreamingTimeOffset. */ + public clientHalfCloseStreamingTimeOffset?: (google.protobuf.IDuration|null); + + /** + * Creates a new CloudConversationDebuggingInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudConversationDebuggingInfo instance + */ + public static create(properties?: google.cloud.dialogflow.v2.ICloudConversationDebuggingInfo): google.cloud.dialogflow.v2.CloudConversationDebuggingInfo; + + /** + * Encodes the specified CloudConversationDebuggingInfo message. Does not implicitly {@link google.cloud.dialogflow.v2.CloudConversationDebuggingInfo.verify|verify} messages. + * @param message CloudConversationDebuggingInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2.ICloudConversationDebuggingInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudConversationDebuggingInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.CloudConversationDebuggingInfo.verify|verify} messages. + * @param message CloudConversationDebuggingInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2.ICloudConversationDebuggingInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudConversationDebuggingInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudConversationDebuggingInfo + * @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.dialogflow.v2.CloudConversationDebuggingInfo; + + /** + * Decodes a CloudConversationDebuggingInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudConversationDebuggingInfo + * @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.dialogflow.v2.CloudConversationDebuggingInfo; + + /** + * Verifies a CloudConversationDebuggingInfo 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 CloudConversationDebuggingInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudConversationDebuggingInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.CloudConversationDebuggingInfo; + + /** + * Creates a plain object from a CloudConversationDebuggingInfo message. Also converts values to other types if specified. + * @param message CloudConversationDebuggingInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2.CloudConversationDebuggingInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudConversationDebuggingInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudConversationDebuggingInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a StreamingDetectIntentResponse. */ interface IStreamingDetectIntentResponse { @@ -8114,6 +8331,9 @@ export namespace google { /** StreamingDetectIntentResponse outputAudioConfig */ outputAudioConfig?: (google.cloud.dialogflow.v2.IOutputAudioConfig|null); + + /** StreamingDetectIntentResponse debuggingInfo */ + debuggingInfo?: (google.cloud.dialogflow.v2.ICloudConversationDebuggingInfo|null); } /** Represents a StreamingDetectIntentResponse. */ @@ -8143,6 +8363,9 @@ export namespace google { /** StreamingDetectIntentResponse outputAudioConfig. */ public outputAudioConfig?: (google.cloud.dialogflow.v2.IOutputAudioConfig|null); + /** StreamingDetectIntentResponse debuggingInfo. */ + public debuggingInfo?: (google.cloud.dialogflow.v2.ICloudConversationDebuggingInfo|null); + /** * Creates a new StreamingDetectIntentResponse instance using the specified properties. * @param [properties] Properties to set @@ -17771,6 +17994,20 @@ export namespace google { * @returns Promise */ public suggestConversationSummary(request: google.cloud.dialogflow.v2.ISuggestConversationSummaryRequest): Promise; + + /** + * Calls GenerateStatelessSummary. + * @param request GenerateStatelessSummaryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GenerateStatelessSummaryResponse + */ + public generateStatelessSummary(request: google.cloud.dialogflow.v2.IGenerateStatelessSummaryRequest, callback: google.cloud.dialogflow.v2.Conversations.GenerateStatelessSummaryCallback): void; + + /** + * Calls GenerateStatelessSummary. + * @param request GenerateStatelessSummaryRequest message or plain object + * @returns Promise + */ + public generateStatelessSummary(request: google.cloud.dialogflow.v2.IGenerateStatelessSummaryRequest): Promise; } namespace Conversations { @@ -17816,6 +18053,13 @@ export namespace google { * @param [response] SuggestConversationSummaryResponse */ type SuggestConversationSummaryCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2.SuggestConversationSummaryResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2.Conversations|generateStatelessSummary}. + * @param error Error, if any + * @param [response] GenerateStatelessSummaryResponse + */ + type GenerateStatelessSummaryCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse) => void; } /** Properties of a Conversation. */ @@ -19140,3130 +19384,3104 @@ export namespace google { } } - /** Represents a ConversationDatasets */ - class ConversationDatasets extends $protobuf.rpc.Service { - - /** - * Constructs a new ConversationDatasets 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 ConversationDatasets 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): ConversationDatasets; - - /** - * Calls CreateConversationDataset. - * @param request CreateConversationDatasetRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createConversationDataset(request: google.cloud.dialogflow.v2.ICreateConversationDatasetRequest, callback: google.cloud.dialogflow.v2.ConversationDatasets.CreateConversationDatasetCallback): void; - - /** - * Calls CreateConversationDataset. - * @param request CreateConversationDatasetRequest message or plain object - * @returns Promise - */ - public createConversationDataset(request: google.cloud.dialogflow.v2.ICreateConversationDatasetRequest): Promise; - - /** - * Calls GetConversationDataset. - * @param request GetConversationDatasetRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ConversationDataset - */ - public getConversationDataset(request: google.cloud.dialogflow.v2.IGetConversationDatasetRequest, callback: google.cloud.dialogflow.v2.ConversationDatasets.GetConversationDatasetCallback): void; - - /** - * Calls GetConversationDataset. - * @param request GetConversationDatasetRequest message or plain object - * @returns Promise - */ - public getConversationDataset(request: google.cloud.dialogflow.v2.IGetConversationDatasetRequest): Promise; - - /** - * Calls ListConversationDatasets. - * @param request ListConversationDatasetsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListConversationDatasetsResponse - */ - public listConversationDatasets(request: google.cloud.dialogflow.v2.IListConversationDatasetsRequest, callback: google.cloud.dialogflow.v2.ConversationDatasets.ListConversationDatasetsCallback): void; - - /** - * Calls ListConversationDatasets. - * @param request ListConversationDatasetsRequest message or plain object - * @returns Promise - */ - public listConversationDatasets(request: google.cloud.dialogflow.v2.IListConversationDatasetsRequest): Promise; + /** Properties of a GenerateStatelessSummaryRequest. */ + interface IGenerateStatelessSummaryRequest { - /** - * Calls DeleteConversationDataset. - * @param request DeleteConversationDatasetRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteConversationDataset(request: google.cloud.dialogflow.v2.IDeleteConversationDatasetRequest, callback: google.cloud.dialogflow.v2.ConversationDatasets.DeleteConversationDatasetCallback): void; + /** GenerateStatelessSummaryRequest statelessConversation */ + statelessConversation?: (google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.IMinimalConversation|null); - /** - * Calls DeleteConversationDataset. - * @param request DeleteConversationDatasetRequest message or plain object - * @returns Promise - */ - public deleteConversationDataset(request: google.cloud.dialogflow.v2.IDeleteConversationDatasetRequest): Promise; + /** GenerateStatelessSummaryRequest conversationProfile */ + conversationProfile?: (google.cloud.dialogflow.v2.IConversationProfile|null); - /** - * Calls ImportConversationData. - * @param request ImportConversationDataRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public importConversationData(request: google.cloud.dialogflow.v2.IImportConversationDataRequest, callback: google.cloud.dialogflow.v2.ConversationDatasets.ImportConversationDataCallback): void; + /** GenerateStatelessSummaryRequest latestMessage */ + latestMessage?: (string|null); - /** - * Calls ImportConversationData. - * @param request ImportConversationDataRequest message or plain object - * @returns Promise - */ - public importConversationData(request: google.cloud.dialogflow.v2.IImportConversationDataRequest): Promise; + /** GenerateStatelessSummaryRequest maxContextSize */ + maxContextSize?: (number|null); } - namespace ConversationDatasets { - - /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationDatasets|createConversationDataset}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateConversationDatasetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationDatasets|getConversationDataset}. - * @param error Error, if any - * @param [response] ConversationDataset - */ - type GetConversationDatasetCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2.ConversationDataset) => void; - - /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationDatasets|listConversationDatasets}. - * @param error Error, if any - * @param [response] ListConversationDatasetsResponse - */ - type ListConversationDatasetsCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2.ListConversationDatasetsResponse) => void; - - /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationDatasets|deleteConversationDataset}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteConversationDatasetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** Represents a GenerateStatelessSummaryRequest. */ + class GenerateStatelessSummaryRequest implements IGenerateStatelessSummaryRequest { /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationDatasets|importConversationData}. - * @param error Error, if any - * @param [response] Operation + * Constructs a new GenerateStatelessSummaryRequest. + * @param [properties] Properties to set */ - type ImportConversationDataCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - } + constructor(properties?: google.cloud.dialogflow.v2.IGenerateStatelessSummaryRequest); - /** Properties of a ConversationInfo. */ - interface IConversationInfo { - - /** ConversationInfo languageCode */ - languageCode?: (string|null); - } + /** GenerateStatelessSummaryRequest statelessConversation. */ + public statelessConversation?: (google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.IMinimalConversation|null); - /** Represents a ConversationInfo. */ - class ConversationInfo implements IConversationInfo { + /** GenerateStatelessSummaryRequest conversationProfile. */ + public conversationProfile?: (google.cloud.dialogflow.v2.IConversationProfile|null); - /** - * Constructs a new ConversationInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2.IConversationInfo); + /** GenerateStatelessSummaryRequest latestMessage. */ + public latestMessage: string; - /** ConversationInfo languageCode. */ - public languageCode: string; + /** GenerateStatelessSummaryRequest maxContextSize. */ + public maxContextSize: number; /** - * Creates a new ConversationInfo instance using the specified properties. + * Creates a new GenerateStatelessSummaryRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ConversationInfo instance + * @returns GenerateStatelessSummaryRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2.IConversationInfo): google.cloud.dialogflow.v2.ConversationInfo; + public static create(properties?: google.cloud.dialogflow.v2.IGenerateStatelessSummaryRequest): google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest; /** - * Encodes the specified ConversationInfo message. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationInfo.verify|verify} messages. - * @param message ConversationInfo message or plain object to encode + * Encodes the specified GenerateStatelessSummaryRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.verify|verify} messages. + * @param message GenerateStatelessSummaryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.IConversationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.IGenerateStatelessSummaryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ConversationInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationInfo.verify|verify} messages. - * @param message ConversationInfo message or plain object to encode + * Encodes the specified GenerateStatelessSummaryRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.verify|verify} messages. + * @param message GenerateStatelessSummaryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IConversationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.IGenerateStatelessSummaryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ConversationInfo message from the specified reader or buffer. + * Decodes a GenerateStatelessSummaryRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ConversationInfo + * @returns GenerateStatelessSummaryRequest * @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.dialogflow.v2.ConversationInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest; /** - * Decodes a ConversationInfo message from the specified reader or buffer, length delimited. + * Decodes a GenerateStatelessSummaryRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ConversationInfo + * @returns GenerateStatelessSummaryRequest * @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.dialogflow.v2.ConversationInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest; /** - * Verifies a ConversationInfo message. + * Verifies a GenerateStatelessSummaryRequest 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 ConversationInfo message from a plain object. Also converts values to their respective internal types. + * Creates a GenerateStatelessSummaryRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ConversationInfo + * @returns GenerateStatelessSummaryRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ConversationInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest; /** - * Creates a plain object from a ConversationInfo message. Also converts values to other types if specified. - * @param message ConversationInfo + * Creates a plain object from a GenerateStatelessSummaryRequest message. Also converts values to other types if specified. + * @param message GenerateStatelessSummaryRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.ConversationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ConversationInfo to JSON. + * Converts this GenerateStatelessSummaryRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ConversationInfo + * Gets the default type url for GenerateStatelessSummaryRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an InputConfig. */ - interface IInputConfig { - - /** InputConfig gcsSource */ - gcsSource?: (google.cloud.dialogflow.v2.IGcsSources|null); - } - - /** Represents an InputConfig. */ - class InputConfig implements IInputConfig { + namespace GenerateStatelessSummaryRequest { - /** - * Constructs a new InputConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2.IInputConfig); + /** Properties of a MinimalConversation. */ + interface IMinimalConversation { - /** InputConfig gcsSource. */ - public gcsSource?: (google.cloud.dialogflow.v2.IGcsSources|null); + /** MinimalConversation messages */ + messages?: (google.cloud.dialogflow.v2.IMessage[]|null); - /** InputConfig source. */ - public source?: "gcsSource"; + /** MinimalConversation parent */ + parent?: (string|null); + } - /** - * Creates a new InputConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns InputConfig instance - */ - public static create(properties?: google.cloud.dialogflow.v2.IInputConfig): google.cloud.dialogflow.v2.InputConfig; + /** Represents a MinimalConversation. */ + class MinimalConversation implements IMinimalConversation { - /** - * Encodes the specified InputConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.InputConfig.verify|verify} messages. - * @param message InputConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2.IInputConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new MinimalConversation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.IMinimalConversation); - /** - * Encodes the specified InputConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.InputConfig.verify|verify} messages. - * @param message InputConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IInputConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** MinimalConversation messages. */ + public messages: google.cloud.dialogflow.v2.IMessage[]; - /** - * Decodes an InputConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InputConfig - * @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.dialogflow.v2.InputConfig; + /** MinimalConversation parent. */ + public parent: string; - /** - * Decodes an InputConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InputConfig - * @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.dialogflow.v2.InputConfig; + /** + * Creates a new MinimalConversation instance using the specified properties. + * @param [properties] Properties to set + * @returns MinimalConversation instance + */ + public static create(properties?: google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.IMinimalConversation): google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation; - /** - * Verifies an InputConfig 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); + /** + * Encodes the specified MinimalConversation message. Does not implicitly {@link google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation.verify|verify} messages. + * @param message MinimalConversation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.IMinimalConversation, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates an InputConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InputConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.InputConfig; + /** + * Encodes the specified MinimalConversation message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation.verify|verify} messages. + * @param message MinimalConversation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.IMinimalConversation, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from an InputConfig message. Also converts values to other types if specified. - * @param message InputConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2.InputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a MinimalConversation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MinimalConversation + * @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.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation; - /** - * Converts this InputConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Decodes a MinimalConversation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MinimalConversation + * @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.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation; - /** - * Gets the default type url for InputConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Verifies a MinimalConversation 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); - /** Properties of a ConversationDataset. */ - interface IConversationDataset { + /** + * Creates a MinimalConversation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MinimalConversation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation; - /** ConversationDataset name */ - name?: (string|null); + /** + * Creates a plain object from a MinimalConversation message. Also converts values to other types if specified. + * @param message MinimalConversation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ConversationDataset displayName */ - displayName?: (string|null); + /** + * Converts this MinimalConversation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** ConversationDataset description */ - description?: (string|null); + /** + * Gets the default type url for MinimalConversation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } - /** ConversationDataset createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** Properties of a GenerateStatelessSummaryResponse. */ + interface IGenerateStatelessSummaryResponse { - /** ConversationDataset inputConfig */ - inputConfig?: (google.cloud.dialogflow.v2.IInputConfig|null); + /** GenerateStatelessSummaryResponse summary */ + summary?: (google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.ISummary|null); - /** ConversationDataset conversationInfo */ - conversationInfo?: (google.cloud.dialogflow.v2.IConversationInfo|null); + /** GenerateStatelessSummaryResponse latestMessage */ + latestMessage?: (string|null); - /** ConversationDataset conversationCount */ - conversationCount?: (number|Long|string|null); + /** GenerateStatelessSummaryResponse contextSize */ + contextSize?: (number|null); } - /** Represents a ConversationDataset. */ - class ConversationDataset implements IConversationDataset { + /** Represents a GenerateStatelessSummaryResponse. */ + class GenerateStatelessSummaryResponse implements IGenerateStatelessSummaryResponse { /** - * Constructs a new ConversationDataset. + * Constructs a new GenerateStatelessSummaryResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.IConversationDataset); - - /** ConversationDataset name. */ - public name: string; - - /** ConversationDataset displayName. */ - public displayName: string; - - /** ConversationDataset description. */ - public description: string; - - /** ConversationDataset createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + constructor(properties?: google.cloud.dialogflow.v2.IGenerateStatelessSummaryResponse); - /** ConversationDataset inputConfig. */ - public inputConfig?: (google.cloud.dialogflow.v2.IInputConfig|null); + /** GenerateStatelessSummaryResponse summary. */ + public summary?: (google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.ISummary|null); - /** ConversationDataset conversationInfo. */ - public conversationInfo?: (google.cloud.dialogflow.v2.IConversationInfo|null); + /** GenerateStatelessSummaryResponse latestMessage. */ + public latestMessage: string; - /** ConversationDataset conversationCount. */ - public conversationCount: (number|Long|string); + /** GenerateStatelessSummaryResponse contextSize. */ + public contextSize: number; /** - * Creates a new ConversationDataset instance using the specified properties. + * Creates a new GenerateStatelessSummaryResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ConversationDataset instance + * @returns GenerateStatelessSummaryResponse instance */ - public static create(properties?: google.cloud.dialogflow.v2.IConversationDataset): google.cloud.dialogflow.v2.ConversationDataset; + public static create(properties?: google.cloud.dialogflow.v2.IGenerateStatelessSummaryResponse): google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse; /** - * Encodes the specified ConversationDataset message. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationDataset.verify|verify} messages. - * @param message ConversationDataset message or plain object to encode + * Encodes the specified GenerateStatelessSummaryResponse message. Does not implicitly {@link google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.verify|verify} messages. + * @param message GenerateStatelessSummaryResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.IConversationDataset, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.IGenerateStatelessSummaryResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ConversationDataset message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationDataset.verify|verify} messages. - * @param message ConversationDataset message or plain object to encode + * Encodes the specified GenerateStatelessSummaryResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.verify|verify} messages. + * @param message GenerateStatelessSummaryResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IConversationDataset, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.IGenerateStatelessSummaryResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ConversationDataset message from the specified reader or buffer. + * Decodes a GenerateStatelessSummaryResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ConversationDataset + * @returns GenerateStatelessSummaryResponse * @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.dialogflow.v2.ConversationDataset; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse; /** - * Decodes a ConversationDataset message from the specified reader or buffer, length delimited. + * Decodes a GenerateStatelessSummaryResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ConversationDataset + * @returns GenerateStatelessSummaryResponse * @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.dialogflow.v2.ConversationDataset; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse; /** - * Verifies a ConversationDataset message. + * Verifies a GenerateStatelessSummaryResponse 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 ConversationDataset message from a plain object. Also converts values to their respective internal types. + * Creates a GenerateStatelessSummaryResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ConversationDataset + * @returns GenerateStatelessSummaryResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ConversationDataset; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse; /** - * Creates a plain object from a ConversationDataset message. Also converts values to other types if specified. - * @param message ConversationDataset + * Creates a plain object from a GenerateStatelessSummaryResponse message. Also converts values to other types if specified. + * @param message GenerateStatelessSummaryResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.ConversationDataset, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ConversationDataset to JSON. + * Converts this GenerateStatelessSummaryResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ConversationDataset + * Gets the default type url for GenerateStatelessSummaryResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateConversationDatasetRequest. */ - interface ICreateConversationDatasetRequest { + namespace GenerateStatelessSummaryResponse { - /** CreateConversationDatasetRequest parent */ - parent?: (string|null); + /** Properties of a Summary. */ + interface ISummary { - /** CreateConversationDatasetRequest conversationDataset */ - conversationDataset?: (google.cloud.dialogflow.v2.IConversationDataset|null); - } + /** Summary text */ + text?: (string|null); - /** Represents a CreateConversationDatasetRequest. */ - class CreateConversationDatasetRequest implements ICreateConversationDatasetRequest { + /** Summary textSections */ + textSections?: ({ [k: string]: string }|null); + } - /** - * Constructs a new CreateConversationDatasetRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2.ICreateConversationDatasetRequest); + /** Represents a Summary. */ + class Summary implements ISummary { - /** CreateConversationDatasetRequest parent. */ - public parent: string; + /** + * Constructs a new Summary. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.ISummary); - /** CreateConversationDatasetRequest conversationDataset. */ - public conversationDataset?: (google.cloud.dialogflow.v2.IConversationDataset|null); + /** Summary text. */ + public text: string; + + /** Summary textSections. */ + public textSections: { [k: string]: string }; + + /** + * Creates a new Summary instance using the specified properties. + * @param [properties] Properties to set + * @returns Summary instance + */ + public static create(properties?: google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.ISummary): google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary; + + /** + * Encodes the specified Summary message. Does not implicitly {@link google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary.verify|verify} messages. + * @param message Summary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.ISummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Summary message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary.verify|verify} messages. + * @param message Summary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.ISummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Summary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Summary + * @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.dialogflow.v2.GenerateStatelessSummaryResponse.Summary; + + /** + * Decodes a Summary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Summary + * @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.dialogflow.v2.GenerateStatelessSummaryResponse.Summary; + + /** + * Verifies a Summary 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 Summary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Summary + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary; + + /** + * Creates a plain object from a Summary message. Also converts values to other types if specified. + * @param message Summary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Summary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Summary + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Represents a ConversationProfiles */ + class ConversationProfiles extends $protobuf.rpc.Service { /** - * Creates a new CreateConversationDatasetRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateConversationDatasetRequest instance + * Constructs a new ConversationProfiles service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - public static create(properties?: google.cloud.dialogflow.v2.ICreateConversationDatasetRequest): google.cloud.dialogflow.v2.CreateConversationDatasetRequest; + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Encodes the specified CreateConversationDatasetRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationDatasetRequest.verify|verify} messages. - * @param message CreateConversationDatasetRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Creates new ConversationProfiles 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 encode(message: google.cloud.dialogflow.v2.ICreateConversationDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): ConversationProfiles; /** - * Encodes the specified CreateConversationDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationDatasetRequest.verify|verify} messages. - * @param message CreateConversationDatasetRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListConversationProfiles. + * @param request ListConversationProfilesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListConversationProfilesResponse */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.ICreateConversationDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public listConversationProfiles(request: google.cloud.dialogflow.v2.IListConversationProfilesRequest, callback: google.cloud.dialogflow.v2.ConversationProfiles.ListConversationProfilesCallback): void; /** - * Decodes a CreateConversationDatasetRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateConversationDatasetRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListConversationProfiles. + * @param request ListConversationProfilesRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.CreateConversationDatasetRequest; + public listConversationProfiles(request: google.cloud.dialogflow.v2.IListConversationProfilesRequest): Promise; /** - * Decodes a CreateConversationDatasetRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateConversationDatasetRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetConversationProfile. + * @param request GetConversationProfileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ConversationProfile */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.CreateConversationDatasetRequest; + public getConversationProfile(request: google.cloud.dialogflow.v2.IGetConversationProfileRequest, callback: google.cloud.dialogflow.v2.ConversationProfiles.GetConversationProfileCallback): void; /** - * Verifies a CreateConversationDatasetRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls GetConversationProfile. + * @param request GetConversationProfileRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public getConversationProfile(request: google.cloud.dialogflow.v2.IGetConversationProfileRequest): Promise; /** - * Creates a CreateConversationDatasetRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateConversationDatasetRequest + * Calls CreateConversationProfile. + * @param request CreateConversationProfileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ConversationProfile */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.CreateConversationDatasetRequest; + public createConversationProfile(request: google.cloud.dialogflow.v2.ICreateConversationProfileRequest, callback: google.cloud.dialogflow.v2.ConversationProfiles.CreateConversationProfileCallback): void; /** - * Creates a plain object from a CreateConversationDatasetRequest message. Also converts values to other types if specified. - * @param message CreateConversationDatasetRequest - * @param [options] Conversion options - * @returns Plain object + * Calls CreateConversationProfile. + * @param request CreateConversationProfileRequest message or plain object + * @returns Promise */ - public static toObject(message: google.cloud.dialogflow.v2.CreateConversationDatasetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public createConversationProfile(request: google.cloud.dialogflow.v2.ICreateConversationProfileRequest): Promise; /** - * Converts this CreateConversationDatasetRequest to JSON. - * @returns JSON object + * Calls UpdateConversationProfile. + * @param request UpdateConversationProfileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ConversationProfile */ - public toJSON(): { [k: string]: any }; + public updateConversationProfile(request: google.cloud.dialogflow.v2.IUpdateConversationProfileRequest, callback: google.cloud.dialogflow.v2.ConversationProfiles.UpdateConversationProfileCallback): void; /** - * Gets the default type url for CreateConversationDatasetRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Calls UpdateConversationProfile. + * @param request UpdateConversationProfileRequest message or plain object + * @returns Promise */ - public static getTypeUrl(typeUrlPrefix?: string): string; + public updateConversationProfile(request: google.cloud.dialogflow.v2.IUpdateConversationProfileRequest): Promise; + + /** + * Calls DeleteConversationProfile. + * @param request DeleteConversationProfileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteConversationProfile(request: google.cloud.dialogflow.v2.IDeleteConversationProfileRequest, callback: google.cloud.dialogflow.v2.ConversationProfiles.DeleteConversationProfileCallback): void; + + /** + * Calls DeleteConversationProfile. + * @param request DeleteConversationProfileRequest message or plain object + * @returns Promise + */ + public deleteConversationProfile(request: google.cloud.dialogflow.v2.IDeleteConversationProfileRequest): Promise; + + /** + * Calls SetSuggestionFeatureConfig. + * @param request SetSuggestionFeatureConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public setSuggestionFeatureConfig(request: google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigRequest, callback: google.cloud.dialogflow.v2.ConversationProfiles.SetSuggestionFeatureConfigCallback): void; + + /** + * Calls SetSuggestionFeatureConfig. + * @param request SetSuggestionFeatureConfigRequest message or plain object + * @returns Promise + */ + public setSuggestionFeatureConfig(request: google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigRequest): Promise; + + /** + * Calls ClearSuggestionFeatureConfig. + * @param request ClearSuggestionFeatureConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public clearSuggestionFeatureConfig(request: google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigRequest, callback: google.cloud.dialogflow.v2.ConversationProfiles.ClearSuggestionFeatureConfigCallback): void; + + /** + * Calls ClearSuggestionFeatureConfig. + * @param request ClearSuggestionFeatureConfigRequest message or plain object + * @returns Promise + */ + public clearSuggestionFeatureConfig(request: google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigRequest): Promise; } - /** Properties of a GetConversationDatasetRequest. */ - interface IGetConversationDatasetRequest { + namespace ConversationProfiles { - /** GetConversationDatasetRequest name */ + /** + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationProfiles|listConversationProfiles}. + * @param error Error, if any + * @param [response] ListConversationProfilesResponse + */ + type ListConversationProfilesCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2.ListConversationProfilesResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationProfiles|getConversationProfile}. + * @param error Error, if any + * @param [response] ConversationProfile + */ + type GetConversationProfileCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2.ConversationProfile) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationProfiles|createConversationProfile}. + * @param error Error, if any + * @param [response] ConversationProfile + */ + type CreateConversationProfileCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2.ConversationProfile) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationProfiles|updateConversationProfile}. + * @param error Error, if any + * @param [response] ConversationProfile + */ + type UpdateConversationProfileCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2.ConversationProfile) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationProfiles|deleteConversationProfile}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteConversationProfileCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationProfiles|setSuggestionFeatureConfig}. + * @param error Error, if any + * @param [response] Operation + */ + type SetSuggestionFeatureConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationProfiles|clearSuggestionFeatureConfig}. + * @param error Error, if any + * @param [response] Operation + */ + type ClearSuggestionFeatureConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of a ConversationProfile. */ + interface IConversationProfile { + + /** ConversationProfile name */ name?: (string|null); + + /** ConversationProfile displayName */ + displayName?: (string|null); + + /** ConversationProfile createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** ConversationProfile updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** ConversationProfile automatedAgentConfig */ + automatedAgentConfig?: (google.cloud.dialogflow.v2.IAutomatedAgentConfig|null); + + /** ConversationProfile humanAgentAssistantConfig */ + humanAgentAssistantConfig?: (google.cloud.dialogflow.v2.IHumanAgentAssistantConfig|null); + + /** ConversationProfile humanAgentHandoffConfig */ + humanAgentHandoffConfig?: (google.cloud.dialogflow.v2.IHumanAgentHandoffConfig|null); + + /** ConversationProfile notificationConfig */ + notificationConfig?: (google.cloud.dialogflow.v2.INotificationConfig|null); + + /** ConversationProfile loggingConfig */ + loggingConfig?: (google.cloud.dialogflow.v2.ILoggingConfig|null); + + /** ConversationProfile newMessageEventNotificationConfig */ + newMessageEventNotificationConfig?: (google.cloud.dialogflow.v2.INotificationConfig|null); + + /** ConversationProfile sttConfig */ + sttConfig?: (google.cloud.dialogflow.v2.ISpeechToTextConfig|null); + + /** ConversationProfile languageCode */ + languageCode?: (string|null); + + /** ConversationProfile timeZone */ + timeZone?: (string|null); + + /** ConversationProfile securitySettings */ + securitySettings?: (string|null); + + /** ConversationProfile ttsConfig */ + ttsConfig?: (google.cloud.dialogflow.v2.ISynthesizeSpeechConfig|null); } - /** Represents a GetConversationDatasetRequest. */ - class GetConversationDatasetRequest implements IGetConversationDatasetRequest { + /** Represents a ConversationProfile. */ + class ConversationProfile implements IConversationProfile { /** - * Constructs a new GetConversationDatasetRequest. + * Constructs a new ConversationProfile. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.IGetConversationDatasetRequest); + constructor(properties?: google.cloud.dialogflow.v2.IConversationProfile); - /** GetConversationDatasetRequest name. */ + /** ConversationProfile name. */ public name: string; + /** ConversationProfile displayName. */ + public displayName: string; + + /** ConversationProfile createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** ConversationProfile updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** ConversationProfile automatedAgentConfig. */ + public automatedAgentConfig?: (google.cloud.dialogflow.v2.IAutomatedAgentConfig|null); + + /** ConversationProfile humanAgentAssistantConfig. */ + public humanAgentAssistantConfig?: (google.cloud.dialogflow.v2.IHumanAgentAssistantConfig|null); + + /** ConversationProfile humanAgentHandoffConfig. */ + public humanAgentHandoffConfig?: (google.cloud.dialogflow.v2.IHumanAgentHandoffConfig|null); + + /** ConversationProfile notificationConfig. */ + public notificationConfig?: (google.cloud.dialogflow.v2.INotificationConfig|null); + + /** ConversationProfile loggingConfig. */ + public loggingConfig?: (google.cloud.dialogflow.v2.ILoggingConfig|null); + + /** ConversationProfile newMessageEventNotificationConfig. */ + public newMessageEventNotificationConfig?: (google.cloud.dialogflow.v2.INotificationConfig|null); + + /** ConversationProfile sttConfig. */ + public sttConfig?: (google.cloud.dialogflow.v2.ISpeechToTextConfig|null); + + /** ConversationProfile languageCode. */ + public languageCode: string; + + /** ConversationProfile timeZone. */ + public timeZone: string; + + /** ConversationProfile securitySettings. */ + public securitySettings: string; + + /** ConversationProfile ttsConfig. */ + public ttsConfig?: (google.cloud.dialogflow.v2.ISynthesizeSpeechConfig|null); + /** - * Creates a new GetConversationDatasetRequest instance using the specified properties. + * Creates a new ConversationProfile instance using the specified properties. * @param [properties] Properties to set - * @returns GetConversationDatasetRequest instance + * @returns ConversationProfile instance */ - public static create(properties?: google.cloud.dialogflow.v2.IGetConversationDatasetRequest): google.cloud.dialogflow.v2.GetConversationDatasetRequest; + public static create(properties?: google.cloud.dialogflow.v2.IConversationProfile): google.cloud.dialogflow.v2.ConversationProfile; /** - * Encodes the specified GetConversationDatasetRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.GetConversationDatasetRequest.verify|verify} messages. - * @param message GetConversationDatasetRequest message or plain object to encode + * Encodes the specified ConversationProfile message. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationProfile.verify|verify} messages. + * @param message ConversationProfile message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.IGetConversationDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.IConversationProfile, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetConversationDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.GetConversationDatasetRequest.verify|verify} messages. - * @param message GetConversationDatasetRequest message or plain object to encode + * Encodes the specified ConversationProfile message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationProfile.verify|verify} messages. + * @param message ConversationProfile message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IGetConversationDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.IConversationProfile, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetConversationDatasetRequest message from the specified reader or buffer. + * Decodes a ConversationProfile message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetConversationDatasetRequest + * @returns ConversationProfile * @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.dialogflow.v2.GetConversationDatasetRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.ConversationProfile; /** - * Decodes a GetConversationDatasetRequest message from the specified reader or buffer, length delimited. + * Decodes a ConversationProfile message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetConversationDatasetRequest + * @returns ConversationProfile * @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.dialogflow.v2.GetConversationDatasetRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.ConversationProfile; /** - * Verifies a GetConversationDatasetRequest message. + * Verifies a ConversationProfile 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 GetConversationDatasetRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ConversationProfile message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetConversationDatasetRequest + * @returns ConversationProfile */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.GetConversationDatasetRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ConversationProfile; /** - * Creates a plain object from a GetConversationDatasetRequest message. Also converts values to other types if specified. - * @param message GetConversationDatasetRequest + * Creates a plain object from a ConversationProfile message. Also converts values to other types if specified. + * @param message ConversationProfile * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.GetConversationDatasetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.ConversationProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetConversationDatasetRequest to JSON. + * Converts this ConversationProfile to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetConversationDatasetRequest + * Gets the default type url for ConversationProfile * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListConversationDatasetsRequest. */ - interface IListConversationDatasetsRequest { + /** Properties of a ListConversationProfilesRequest. */ + interface IListConversationProfilesRequest { - /** ListConversationDatasetsRequest parent */ + /** ListConversationProfilesRequest parent */ parent?: (string|null); - /** ListConversationDatasetsRequest pageSize */ + /** ListConversationProfilesRequest pageSize */ pageSize?: (number|null); - /** ListConversationDatasetsRequest pageToken */ + /** ListConversationProfilesRequest pageToken */ pageToken?: (string|null); } - /** Represents a ListConversationDatasetsRequest. */ - class ListConversationDatasetsRequest implements IListConversationDatasetsRequest { + /** Represents a ListConversationProfilesRequest. */ + class ListConversationProfilesRequest implements IListConversationProfilesRequest { /** - * Constructs a new ListConversationDatasetsRequest. + * Constructs a new ListConversationProfilesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.IListConversationDatasetsRequest); + constructor(properties?: google.cloud.dialogflow.v2.IListConversationProfilesRequest); - /** ListConversationDatasetsRequest parent. */ + /** ListConversationProfilesRequest parent. */ public parent: string; - /** ListConversationDatasetsRequest pageSize. */ + /** ListConversationProfilesRequest pageSize. */ public pageSize: number; - /** ListConversationDatasetsRequest pageToken. */ + /** ListConversationProfilesRequest pageToken. */ public pageToken: string; /** - * Creates a new ListConversationDatasetsRequest instance using the specified properties. + * Creates a new ListConversationProfilesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListConversationDatasetsRequest instance + * @returns ListConversationProfilesRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2.IListConversationDatasetsRequest): google.cloud.dialogflow.v2.ListConversationDatasetsRequest; + public static create(properties?: google.cloud.dialogflow.v2.IListConversationProfilesRequest): google.cloud.dialogflow.v2.ListConversationProfilesRequest; /** - * Encodes the specified ListConversationDatasetsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationDatasetsRequest.verify|verify} messages. - * @param message ListConversationDatasetsRequest message or plain object to encode + * Encodes the specified ListConversationProfilesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationProfilesRequest.verify|verify} messages. + * @param message ListConversationProfilesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.IListConversationDatasetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.IListConversationProfilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListConversationDatasetsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationDatasetsRequest.verify|verify} messages. - * @param message ListConversationDatasetsRequest message or plain object to encode + * Encodes the specified ListConversationProfilesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationProfilesRequest.verify|verify} messages. + * @param message ListConversationProfilesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IListConversationDatasetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.IListConversationProfilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListConversationDatasetsRequest message from the specified reader or buffer. + * Decodes a ListConversationProfilesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListConversationDatasetsRequest + * @returns ListConversationProfilesRequest * @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.dialogflow.v2.ListConversationDatasetsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.ListConversationProfilesRequest; /** - * Decodes a ListConversationDatasetsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListConversationProfilesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListConversationDatasetsRequest + * @returns ListConversationProfilesRequest * @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.dialogflow.v2.ListConversationDatasetsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.ListConversationProfilesRequest; /** - * Verifies a ListConversationDatasetsRequest message. + * Verifies a ListConversationProfilesRequest 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 ListConversationDatasetsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListConversationProfilesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListConversationDatasetsRequest + * @returns ListConversationProfilesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ListConversationDatasetsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ListConversationProfilesRequest; /** - * Creates a plain object from a ListConversationDatasetsRequest message. Also converts values to other types if specified. - * @param message ListConversationDatasetsRequest + * Creates a plain object from a ListConversationProfilesRequest message. Also converts values to other types if specified. + * @param message ListConversationProfilesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.ListConversationDatasetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.ListConversationProfilesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListConversationDatasetsRequest to JSON. + * Converts this ListConversationProfilesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListConversationDatasetsRequest + * Gets the default type url for ListConversationProfilesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListConversationDatasetsResponse. */ - interface IListConversationDatasetsResponse { + /** Properties of a ListConversationProfilesResponse. */ + interface IListConversationProfilesResponse { - /** ListConversationDatasetsResponse conversationDatasets */ - conversationDatasets?: (google.cloud.dialogflow.v2.IConversationDataset[]|null); + /** ListConversationProfilesResponse conversationProfiles */ + conversationProfiles?: (google.cloud.dialogflow.v2.IConversationProfile[]|null); - /** ListConversationDatasetsResponse nextPageToken */ + /** ListConversationProfilesResponse nextPageToken */ nextPageToken?: (string|null); } - /** Represents a ListConversationDatasetsResponse. */ - class ListConversationDatasetsResponse implements IListConversationDatasetsResponse { + /** Represents a ListConversationProfilesResponse. */ + class ListConversationProfilesResponse implements IListConversationProfilesResponse { /** - * Constructs a new ListConversationDatasetsResponse. + * Constructs a new ListConversationProfilesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.IListConversationDatasetsResponse); + constructor(properties?: google.cloud.dialogflow.v2.IListConversationProfilesResponse); - /** ListConversationDatasetsResponse conversationDatasets. */ - public conversationDatasets: google.cloud.dialogflow.v2.IConversationDataset[]; + /** ListConversationProfilesResponse conversationProfiles. */ + public conversationProfiles: google.cloud.dialogflow.v2.IConversationProfile[]; - /** ListConversationDatasetsResponse nextPageToken. */ + /** ListConversationProfilesResponse nextPageToken. */ public nextPageToken: string; /** - * Creates a new ListConversationDatasetsResponse instance using the specified properties. + * Creates a new ListConversationProfilesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListConversationDatasetsResponse instance + * @returns ListConversationProfilesResponse instance */ - public static create(properties?: google.cloud.dialogflow.v2.IListConversationDatasetsResponse): google.cloud.dialogflow.v2.ListConversationDatasetsResponse; + public static create(properties?: google.cloud.dialogflow.v2.IListConversationProfilesResponse): google.cloud.dialogflow.v2.ListConversationProfilesResponse; /** - * Encodes the specified ListConversationDatasetsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationDatasetsResponse.verify|verify} messages. - * @param message ListConversationDatasetsResponse message or plain object to encode + * Encodes the specified ListConversationProfilesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationProfilesResponse.verify|verify} messages. + * @param message ListConversationProfilesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.IListConversationDatasetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.IListConversationProfilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListConversationDatasetsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationDatasetsResponse.verify|verify} messages. - * @param message ListConversationDatasetsResponse message or plain object to encode + * Encodes the specified ListConversationProfilesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationProfilesResponse.verify|verify} messages. + * @param message ListConversationProfilesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IListConversationDatasetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.IListConversationProfilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListConversationDatasetsResponse message from the specified reader or buffer. + * Decodes a ListConversationProfilesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListConversationDatasetsResponse + * @returns ListConversationProfilesResponse * @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.dialogflow.v2.ListConversationDatasetsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.ListConversationProfilesResponse; /** - * Decodes a ListConversationDatasetsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListConversationProfilesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListConversationDatasetsResponse + * @returns ListConversationProfilesResponse * @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.dialogflow.v2.ListConversationDatasetsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.ListConversationProfilesResponse; /** - * Verifies a ListConversationDatasetsResponse message. + * Verifies a ListConversationProfilesResponse 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 ListConversationDatasetsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListConversationProfilesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListConversationDatasetsResponse + * @returns ListConversationProfilesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ListConversationDatasetsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ListConversationProfilesResponse; /** - * Creates a plain object from a ListConversationDatasetsResponse message. Also converts values to other types if specified. - * @param message ListConversationDatasetsResponse + * Creates a plain object from a ListConversationProfilesResponse message. Also converts values to other types if specified. + * @param message ListConversationProfilesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.ListConversationDatasetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.ListConversationProfilesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListConversationDatasetsResponse to JSON. + * Converts this ListConversationProfilesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListConversationDatasetsResponse + * Gets the default type url for ListConversationProfilesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteConversationDatasetRequest. */ - interface IDeleteConversationDatasetRequest { + /** Properties of a GetConversationProfileRequest. */ + interface IGetConversationProfileRequest { - /** DeleteConversationDatasetRequest name */ + /** GetConversationProfileRequest name */ name?: (string|null); } - /** Represents a DeleteConversationDatasetRequest. */ - class DeleteConversationDatasetRequest implements IDeleteConversationDatasetRequest { + /** Represents a GetConversationProfileRequest. */ + class GetConversationProfileRequest implements IGetConversationProfileRequest { /** - * Constructs a new DeleteConversationDatasetRequest. + * Constructs a new GetConversationProfileRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.IDeleteConversationDatasetRequest); + constructor(properties?: google.cloud.dialogflow.v2.IGetConversationProfileRequest); - /** DeleteConversationDatasetRequest name. */ + /** GetConversationProfileRequest name. */ public name: string; /** - * Creates a new DeleteConversationDatasetRequest instance using the specified properties. + * Creates a new GetConversationProfileRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteConversationDatasetRequest instance + * @returns GetConversationProfileRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2.IDeleteConversationDatasetRequest): google.cloud.dialogflow.v2.DeleteConversationDatasetRequest; + public static create(properties?: google.cloud.dialogflow.v2.IGetConversationProfileRequest): google.cloud.dialogflow.v2.GetConversationProfileRequest; /** - * Encodes the specified DeleteConversationDatasetRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationDatasetRequest.verify|verify} messages. - * @param message DeleteConversationDatasetRequest message or plain object to encode + * Encodes the specified GetConversationProfileRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.GetConversationProfileRequest.verify|verify} messages. + * @param message GetConversationProfileRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.IDeleteConversationDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.IGetConversationProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteConversationDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationDatasetRequest.verify|verify} messages. - * @param message DeleteConversationDatasetRequest message or plain object to encode + * Encodes the specified GetConversationProfileRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.GetConversationProfileRequest.verify|verify} messages. + * @param message GetConversationProfileRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IDeleteConversationDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.IGetConversationProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteConversationDatasetRequest message from the specified reader or buffer. + * Decodes a GetConversationProfileRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteConversationDatasetRequest + * @returns GetConversationProfileRequest * @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.dialogflow.v2.DeleteConversationDatasetRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.GetConversationProfileRequest; /** - * Decodes a DeleteConversationDatasetRequest message from the specified reader or buffer, length delimited. + * Decodes a GetConversationProfileRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteConversationDatasetRequest + * @returns GetConversationProfileRequest * @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.dialogflow.v2.DeleteConversationDatasetRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.GetConversationProfileRequest; /** - * Verifies a DeleteConversationDatasetRequest message. + * Verifies a GetConversationProfileRequest 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 DeleteConversationDatasetRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetConversationProfileRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteConversationDatasetRequest + * @returns GetConversationProfileRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.DeleteConversationDatasetRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.GetConversationProfileRequest; /** - * Creates a plain object from a DeleteConversationDatasetRequest message. Also converts values to other types if specified. - * @param message DeleteConversationDatasetRequest + * Creates a plain object from a GetConversationProfileRequest message. Also converts values to other types if specified. + * @param message GetConversationProfileRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.DeleteConversationDatasetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.GetConversationProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteConversationDatasetRequest to JSON. + * Converts this GetConversationProfileRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteConversationDatasetRequest + * Gets the default type url for GetConversationProfileRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ImportConversationDataRequest. */ - interface IImportConversationDataRequest { + /** Properties of a CreateConversationProfileRequest. */ + interface ICreateConversationProfileRequest { - /** ImportConversationDataRequest name */ - name?: (string|null); + /** CreateConversationProfileRequest parent */ + parent?: (string|null); - /** ImportConversationDataRequest inputConfig */ - inputConfig?: (google.cloud.dialogflow.v2.IInputConfig|null); + /** CreateConversationProfileRequest conversationProfile */ + conversationProfile?: (google.cloud.dialogflow.v2.IConversationProfile|null); } - /** Represents an ImportConversationDataRequest. */ - class ImportConversationDataRequest implements IImportConversationDataRequest { + /** Represents a CreateConversationProfileRequest. */ + class CreateConversationProfileRequest implements ICreateConversationProfileRequest { /** - * Constructs a new ImportConversationDataRequest. + * Constructs a new CreateConversationProfileRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.IImportConversationDataRequest); + constructor(properties?: google.cloud.dialogflow.v2.ICreateConversationProfileRequest); - /** ImportConversationDataRequest name. */ - public name: string; + /** CreateConversationProfileRequest parent. */ + public parent: string; - /** ImportConversationDataRequest inputConfig. */ - public inputConfig?: (google.cloud.dialogflow.v2.IInputConfig|null); + /** CreateConversationProfileRequest conversationProfile. */ + public conversationProfile?: (google.cloud.dialogflow.v2.IConversationProfile|null); /** - * Creates a new ImportConversationDataRequest instance using the specified properties. + * Creates a new CreateConversationProfileRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ImportConversationDataRequest instance + * @returns CreateConversationProfileRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2.IImportConversationDataRequest): google.cloud.dialogflow.v2.ImportConversationDataRequest; + public static create(properties?: google.cloud.dialogflow.v2.ICreateConversationProfileRequest): google.cloud.dialogflow.v2.CreateConversationProfileRequest; /** - * Encodes the specified ImportConversationDataRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.ImportConversationDataRequest.verify|verify} messages. - * @param message ImportConversationDataRequest message or plain object to encode + * Encodes the specified CreateConversationProfileRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationProfileRequest.verify|verify} messages. + * @param message CreateConversationProfileRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.IImportConversationDataRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.ICreateConversationProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportConversationDataRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ImportConversationDataRequest.verify|verify} messages. - * @param message ImportConversationDataRequest message or plain object to encode + * Encodes the specified CreateConversationProfileRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationProfileRequest.verify|verify} messages. + * @param message CreateConversationProfileRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IImportConversationDataRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.ICreateConversationProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportConversationDataRequest message from the specified reader or buffer. + * Decodes a CreateConversationProfileRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportConversationDataRequest + * @returns CreateConversationProfileRequest * @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.dialogflow.v2.ImportConversationDataRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.CreateConversationProfileRequest; /** - * Decodes an ImportConversationDataRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateConversationProfileRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportConversationDataRequest + * @returns CreateConversationProfileRequest * @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.dialogflow.v2.ImportConversationDataRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.CreateConversationProfileRequest; /** - * Verifies an ImportConversationDataRequest message. + * Verifies a CreateConversationProfileRequest 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 ImportConversationDataRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateConversationProfileRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportConversationDataRequest + * @returns CreateConversationProfileRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ImportConversationDataRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.CreateConversationProfileRequest; /** - * Creates a plain object from an ImportConversationDataRequest message. Also converts values to other types if specified. - * @param message ImportConversationDataRequest + * Creates a plain object from a CreateConversationProfileRequest message. Also converts values to other types if specified. + * @param message CreateConversationProfileRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.ImportConversationDataRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.CreateConversationProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportConversationDataRequest to JSON. + * Converts this CreateConversationProfileRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ImportConversationDataRequest + * Gets the default type url for CreateConversationProfileRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ImportConversationDataOperationMetadata. */ - interface IImportConversationDataOperationMetadata { - - /** ImportConversationDataOperationMetadata conversationDataset */ - conversationDataset?: (string|null); + /** Properties of an UpdateConversationProfileRequest. */ + interface IUpdateConversationProfileRequest { - /** ImportConversationDataOperationMetadata partialFailures */ - partialFailures?: (google.rpc.IStatus[]|null); + /** UpdateConversationProfileRequest conversationProfile */ + conversationProfile?: (google.cloud.dialogflow.v2.IConversationProfile|null); - /** ImportConversationDataOperationMetadata createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** UpdateConversationProfileRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents an ImportConversationDataOperationMetadata. */ - class ImportConversationDataOperationMetadata implements IImportConversationDataOperationMetadata { + /** Represents an UpdateConversationProfileRequest. */ + class UpdateConversationProfileRequest implements IUpdateConversationProfileRequest { /** - * Constructs a new ImportConversationDataOperationMetadata. + * Constructs a new UpdateConversationProfileRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.IImportConversationDataOperationMetadata); - - /** ImportConversationDataOperationMetadata conversationDataset. */ - public conversationDataset: string; + constructor(properties?: google.cloud.dialogflow.v2.IUpdateConversationProfileRequest); - /** ImportConversationDataOperationMetadata partialFailures. */ - public partialFailures: google.rpc.IStatus[]; + /** UpdateConversationProfileRequest conversationProfile. */ + public conversationProfile?: (google.cloud.dialogflow.v2.IConversationProfile|null); - /** ImportConversationDataOperationMetadata createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** UpdateConversationProfileRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new ImportConversationDataOperationMetadata instance using the specified properties. + * Creates a new UpdateConversationProfileRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ImportConversationDataOperationMetadata instance + * @returns UpdateConversationProfileRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2.IImportConversationDataOperationMetadata): google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata; + public static create(properties?: google.cloud.dialogflow.v2.IUpdateConversationProfileRequest): google.cloud.dialogflow.v2.UpdateConversationProfileRequest; /** - * Encodes the specified ImportConversationDataOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata.verify|verify} messages. - * @param message ImportConversationDataOperationMetadata message or plain object to encode + * Encodes the specified UpdateConversationProfileRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.UpdateConversationProfileRequest.verify|verify} messages. + * @param message UpdateConversationProfileRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.IImportConversationDataOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.IUpdateConversationProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportConversationDataOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata.verify|verify} messages. - * @param message ImportConversationDataOperationMetadata message or plain object to encode + * Encodes the specified UpdateConversationProfileRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.UpdateConversationProfileRequest.verify|verify} messages. + * @param message UpdateConversationProfileRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IImportConversationDataOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.IUpdateConversationProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportConversationDataOperationMetadata message from the specified reader or buffer. + * Decodes an UpdateConversationProfileRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportConversationDataOperationMetadata + * @returns UpdateConversationProfileRequest * @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.dialogflow.v2.ImportConversationDataOperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.UpdateConversationProfileRequest; /** - * Decodes an ImportConversationDataOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes an UpdateConversationProfileRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportConversationDataOperationMetadata + * @returns UpdateConversationProfileRequest * @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.dialogflow.v2.ImportConversationDataOperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.UpdateConversationProfileRequest; /** - * Verifies an ImportConversationDataOperationMetadata message. + * Verifies an UpdateConversationProfileRequest 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 ImportConversationDataOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateConversationProfileRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportConversationDataOperationMetadata + * @returns UpdateConversationProfileRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.UpdateConversationProfileRequest; /** - * Creates a plain object from an ImportConversationDataOperationMetadata message. Also converts values to other types if specified. - * @param message ImportConversationDataOperationMetadata + * Creates a plain object from an UpdateConversationProfileRequest message. Also converts values to other types if specified. + * @param message UpdateConversationProfileRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.UpdateConversationProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportConversationDataOperationMetadata to JSON. + * Converts this UpdateConversationProfileRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ImportConversationDataOperationMetadata + * Gets the default type url for UpdateConversationProfileRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ImportConversationDataOperationResponse. */ - interface IImportConversationDataOperationResponse { - - /** ImportConversationDataOperationResponse conversationDataset */ - conversationDataset?: (string|null); + /** Properties of a DeleteConversationProfileRequest. */ + interface IDeleteConversationProfileRequest { - /** ImportConversationDataOperationResponse importCount */ - importCount?: (number|null); + /** DeleteConversationProfileRequest name */ + name?: (string|null); } - /** Represents an ImportConversationDataOperationResponse. */ - class ImportConversationDataOperationResponse implements IImportConversationDataOperationResponse { + /** Represents a DeleteConversationProfileRequest. */ + class DeleteConversationProfileRequest implements IDeleteConversationProfileRequest { /** - * Constructs a new ImportConversationDataOperationResponse. + * Constructs a new DeleteConversationProfileRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.IImportConversationDataOperationResponse); - - /** ImportConversationDataOperationResponse conversationDataset. */ - public conversationDataset: string; + constructor(properties?: google.cloud.dialogflow.v2.IDeleteConversationProfileRequest); - /** ImportConversationDataOperationResponse importCount. */ - public importCount: number; + /** DeleteConversationProfileRequest name. */ + public name: string; /** - * Creates a new ImportConversationDataOperationResponse instance using the specified properties. + * Creates a new DeleteConversationProfileRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ImportConversationDataOperationResponse instance + * @returns DeleteConversationProfileRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2.IImportConversationDataOperationResponse): google.cloud.dialogflow.v2.ImportConversationDataOperationResponse; + public static create(properties?: google.cloud.dialogflow.v2.IDeleteConversationProfileRequest): google.cloud.dialogflow.v2.DeleteConversationProfileRequest; /** - * Encodes the specified ImportConversationDataOperationResponse message. Does not implicitly {@link google.cloud.dialogflow.v2.ImportConversationDataOperationResponse.verify|verify} messages. - * @param message ImportConversationDataOperationResponse message or plain object to encode + * Encodes the specified DeleteConversationProfileRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationProfileRequest.verify|verify} messages. + * @param message DeleteConversationProfileRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.IImportConversationDataOperationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.IDeleteConversationProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportConversationDataOperationResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ImportConversationDataOperationResponse.verify|verify} messages. - * @param message ImportConversationDataOperationResponse message or plain object to encode + * Encodes the specified DeleteConversationProfileRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationProfileRequest.verify|verify} messages. + * @param message DeleteConversationProfileRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IImportConversationDataOperationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.IDeleteConversationProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportConversationDataOperationResponse message from the specified reader or buffer. + * Decodes a DeleteConversationProfileRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportConversationDataOperationResponse + * @returns DeleteConversationProfileRequest * @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.dialogflow.v2.ImportConversationDataOperationResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.DeleteConversationProfileRequest; /** - * Decodes an ImportConversationDataOperationResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteConversationProfileRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportConversationDataOperationResponse + * @returns DeleteConversationProfileRequest * @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.dialogflow.v2.ImportConversationDataOperationResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.DeleteConversationProfileRequest; /** - * Verifies an ImportConversationDataOperationResponse message. + * Verifies a DeleteConversationProfileRequest 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 ImportConversationDataOperationResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteConversationProfileRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportConversationDataOperationResponse + * @returns DeleteConversationProfileRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ImportConversationDataOperationResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.DeleteConversationProfileRequest; /** - * Creates a plain object from an ImportConversationDataOperationResponse message. Also converts values to other types if specified. - * @param message ImportConversationDataOperationResponse + * Creates a plain object from a DeleteConversationProfileRequest message. Also converts values to other types if specified. + * @param message DeleteConversationProfileRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.ImportConversationDataOperationResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.DeleteConversationProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportConversationDataOperationResponse to JSON. + * Converts this DeleteConversationProfileRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ImportConversationDataOperationResponse + * Gets the default type url for DeleteConversationProfileRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateConversationDatasetOperationMetadata. */ - interface ICreateConversationDatasetOperationMetadata { + /** Properties of an AutomatedAgentConfig. */ + interface IAutomatedAgentConfig { - /** CreateConversationDatasetOperationMetadata conversationDataset */ - conversationDataset?: (string|null); + /** AutomatedAgentConfig agent */ + agent?: (string|null); } - /** Represents a CreateConversationDatasetOperationMetadata. */ - class CreateConversationDatasetOperationMetadata implements ICreateConversationDatasetOperationMetadata { + /** Represents an AutomatedAgentConfig. */ + class AutomatedAgentConfig implements IAutomatedAgentConfig { /** - * Constructs a new CreateConversationDatasetOperationMetadata. + * Constructs a new AutomatedAgentConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.ICreateConversationDatasetOperationMetadata); + constructor(properties?: google.cloud.dialogflow.v2.IAutomatedAgentConfig); - /** CreateConversationDatasetOperationMetadata conversationDataset. */ - public conversationDataset: string; + /** AutomatedAgentConfig agent. */ + public agent: string; /** - * Creates a new CreateConversationDatasetOperationMetadata instance using the specified properties. + * Creates a new AutomatedAgentConfig instance using the specified properties. * @param [properties] Properties to set - * @returns CreateConversationDatasetOperationMetadata instance + * @returns AutomatedAgentConfig instance */ - public static create(properties?: google.cloud.dialogflow.v2.ICreateConversationDatasetOperationMetadata): google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata; + public static create(properties?: google.cloud.dialogflow.v2.IAutomatedAgentConfig): google.cloud.dialogflow.v2.AutomatedAgentConfig; /** - * Encodes the specified CreateConversationDatasetOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata.verify|verify} messages. - * @param message CreateConversationDatasetOperationMetadata message or plain object to encode + * Encodes the specified AutomatedAgentConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.AutomatedAgentConfig.verify|verify} messages. + * @param message AutomatedAgentConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.ICreateConversationDatasetOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.IAutomatedAgentConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateConversationDatasetOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata.verify|verify} messages. - * @param message CreateConversationDatasetOperationMetadata message or plain object to encode + * Encodes the specified AutomatedAgentConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.AutomatedAgentConfig.verify|verify} messages. + * @param message AutomatedAgentConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.ICreateConversationDatasetOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.IAutomatedAgentConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateConversationDatasetOperationMetadata message from the specified reader or buffer. + * Decodes an AutomatedAgentConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateConversationDatasetOperationMetadata + * @returns AutomatedAgentConfig * @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.dialogflow.v2.CreateConversationDatasetOperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.AutomatedAgentConfig; /** - * Decodes a CreateConversationDatasetOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes an AutomatedAgentConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateConversationDatasetOperationMetadata + * @returns AutomatedAgentConfig * @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.dialogflow.v2.CreateConversationDatasetOperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.AutomatedAgentConfig; /** - * Verifies a CreateConversationDatasetOperationMetadata message. + * Verifies an AutomatedAgentConfig 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 CreateConversationDatasetOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an AutomatedAgentConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateConversationDatasetOperationMetadata + * @returns AutomatedAgentConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.AutomatedAgentConfig; /** - * Creates a plain object from a CreateConversationDatasetOperationMetadata message. Also converts values to other types if specified. - * @param message CreateConversationDatasetOperationMetadata + * Creates a plain object from an AutomatedAgentConfig message. Also converts values to other types if specified. + * @param message AutomatedAgentConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.AutomatedAgentConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateConversationDatasetOperationMetadata to JSON. + * Converts this AutomatedAgentConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateConversationDatasetOperationMetadata + * Gets the default type url for AutomatedAgentConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteConversationDatasetOperationMetadata. */ - interface IDeleteConversationDatasetOperationMetadata { + /** Properties of a HumanAgentAssistantConfig. */ + interface IHumanAgentAssistantConfig { + + /** HumanAgentAssistantConfig notificationConfig */ + notificationConfig?: (google.cloud.dialogflow.v2.INotificationConfig|null); + + /** HumanAgentAssistantConfig humanAgentSuggestionConfig */ + humanAgentSuggestionConfig?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionConfig|null); + + /** HumanAgentAssistantConfig endUserSuggestionConfig */ + endUserSuggestionConfig?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionConfig|null); + + /** HumanAgentAssistantConfig messageAnalysisConfig */ + messageAnalysisConfig?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IMessageAnalysisConfig|null); } - /** Represents a DeleteConversationDatasetOperationMetadata. */ - class DeleteConversationDatasetOperationMetadata implements IDeleteConversationDatasetOperationMetadata { + /** Represents a HumanAgentAssistantConfig. */ + class HumanAgentAssistantConfig implements IHumanAgentAssistantConfig { /** - * Constructs a new DeleteConversationDatasetOperationMetadata. + * Constructs a new HumanAgentAssistantConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.IDeleteConversationDatasetOperationMetadata); + constructor(properties?: google.cloud.dialogflow.v2.IHumanAgentAssistantConfig); + + /** HumanAgentAssistantConfig notificationConfig. */ + public notificationConfig?: (google.cloud.dialogflow.v2.INotificationConfig|null); + + /** HumanAgentAssistantConfig humanAgentSuggestionConfig. */ + public humanAgentSuggestionConfig?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionConfig|null); + + /** HumanAgentAssistantConfig endUserSuggestionConfig. */ + public endUserSuggestionConfig?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionConfig|null); + + /** HumanAgentAssistantConfig messageAnalysisConfig. */ + public messageAnalysisConfig?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IMessageAnalysisConfig|null); /** - * Creates a new DeleteConversationDatasetOperationMetadata instance using the specified properties. + * Creates a new HumanAgentAssistantConfig instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteConversationDatasetOperationMetadata instance + * @returns HumanAgentAssistantConfig instance */ - public static create(properties?: google.cloud.dialogflow.v2.IDeleteConversationDatasetOperationMetadata): google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata; + public static create(properties?: google.cloud.dialogflow.v2.IHumanAgentAssistantConfig): google.cloud.dialogflow.v2.HumanAgentAssistantConfig; /** - * Encodes the specified DeleteConversationDatasetOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata.verify|verify} messages. - * @param message DeleteConversationDatasetOperationMetadata message or plain object to encode + * Encodes the specified HumanAgentAssistantConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.verify|verify} messages. + * @param message HumanAgentAssistantConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.IDeleteConversationDatasetOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.IHumanAgentAssistantConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteConversationDatasetOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata.verify|verify} messages. - * @param message DeleteConversationDatasetOperationMetadata message or plain object to encode + * Encodes the specified HumanAgentAssistantConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.verify|verify} messages. + * @param message HumanAgentAssistantConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IDeleteConversationDatasetOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.IHumanAgentAssistantConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteConversationDatasetOperationMetadata message from the specified reader or buffer. + * Decodes a HumanAgentAssistantConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteConversationDatasetOperationMetadata + * @returns HumanAgentAssistantConfig * @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.dialogflow.v2.DeleteConversationDatasetOperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.HumanAgentAssistantConfig; /** - * Decodes a DeleteConversationDatasetOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a HumanAgentAssistantConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteConversationDatasetOperationMetadata + * @returns HumanAgentAssistantConfig * @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.dialogflow.v2.DeleteConversationDatasetOperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.HumanAgentAssistantConfig; /** - * Verifies a DeleteConversationDatasetOperationMetadata message. + * Verifies a HumanAgentAssistantConfig 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 DeleteConversationDatasetOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a HumanAgentAssistantConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteConversationDatasetOperationMetadata + * @returns HumanAgentAssistantConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.HumanAgentAssistantConfig; /** - * Creates a plain object from a DeleteConversationDatasetOperationMetadata message. Also converts values to other types if specified. - * @param message DeleteConversationDatasetOperationMetadata + * Creates a plain object from a HumanAgentAssistantConfig message. Also converts values to other types if specified. + * @param message HumanAgentAssistantConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteConversationDatasetOperationMetadata to JSON. + * Converts this HumanAgentAssistantConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteConversationDatasetOperationMetadata + * Gets the default type url for HumanAgentAssistantConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GcsSources. */ - interface IGcsSources { + namespace HumanAgentAssistantConfig { - /** GcsSources uris */ - uris?: (string[]|null); - } + /** Properties of a SuggestionTriggerSettings. */ + interface ISuggestionTriggerSettings { - /** Represents a GcsSources. */ - class GcsSources implements IGcsSources { + /** SuggestionTriggerSettings noSmalltalk */ + noSmalltalk?: (boolean|null); - /** - * Constructs a new GcsSources. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2.IGcsSources); + /** SuggestionTriggerSettings onlyEndUser */ + onlyEndUser?: (boolean|null); + } - /** GcsSources uris. */ - public uris: string[]; + /** Represents a SuggestionTriggerSettings. */ + class SuggestionTriggerSettings implements ISuggestionTriggerSettings { - /** - * Creates a new GcsSources instance using the specified properties. - * @param [properties] Properties to set - * @returns GcsSources instance - */ - public static create(properties?: google.cloud.dialogflow.v2.IGcsSources): google.cloud.dialogflow.v2.GcsSources; + /** + * Constructs a new SuggestionTriggerSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionTriggerSettings); - /** - * Encodes the specified GcsSources message. Does not implicitly {@link google.cloud.dialogflow.v2.GcsSources.verify|verify} messages. - * @param message GcsSources message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2.IGcsSources, writer?: $protobuf.Writer): $protobuf.Writer; + /** SuggestionTriggerSettings noSmalltalk. */ + public noSmalltalk: boolean; - /** - * Encodes the specified GcsSources message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.GcsSources.verify|verify} messages. - * @param message GcsSources message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IGcsSources, writer?: $protobuf.Writer): $protobuf.Writer; + /** SuggestionTriggerSettings onlyEndUser. */ + public onlyEndUser: boolean; - /** - * Decodes a GcsSources message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GcsSources - * @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.dialogflow.v2.GcsSources; + /** + * Creates a new SuggestionTriggerSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns SuggestionTriggerSettings instance + */ + public static create(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionTriggerSettings): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings; - /** - * Decodes a GcsSources message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GcsSources - * @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.dialogflow.v2.GcsSources; + /** + * Encodes the specified SuggestionTriggerSettings message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings.verify|verify} messages. + * @param message SuggestionTriggerSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionTriggerSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a GcsSources 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); + /** + * Encodes the specified SuggestionTriggerSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings.verify|verify} messages. + * @param message SuggestionTriggerSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionTriggerSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a GcsSources message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GcsSources - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.GcsSources; + /** + * Decodes a SuggestionTriggerSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SuggestionTriggerSettings + * @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.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings; - /** - * Creates a plain object from a GcsSources message. Also converts values to other types if specified. - * @param message GcsSources - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2.GcsSources, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a SuggestionTriggerSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SuggestionTriggerSettings + * @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.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings; - /** - * Converts this GcsSources to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Verifies a SuggestionTriggerSettings 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); - /** - * Gets the default type url for GcsSources - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a SuggestionTriggerSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SuggestionTriggerSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings; - /** Properties of a GcsDestination. */ - interface IGcsDestination { + /** + * Creates a plain object from a SuggestionTriggerSettings message. Also converts values to other types if specified. + * @param message SuggestionTriggerSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** GcsDestination uri */ - uri?: (string|null); - } + /** + * Converts this SuggestionTriggerSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Represents a GcsDestination. */ - class GcsDestination implements IGcsDestination { + /** + * Gets the default type url for SuggestionTriggerSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Constructs a new GcsDestination. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2.IGcsDestination); + /** Properties of a SuggestionFeatureConfig. */ + interface ISuggestionFeatureConfig { - /** GcsDestination uri. */ - public uri: string; + /** SuggestionFeatureConfig suggestionFeature */ + suggestionFeature?: (google.cloud.dialogflow.v2.ISuggestionFeature|null); - /** - * Creates a new GcsDestination instance using the specified properties. - * @param [properties] Properties to set - * @returns GcsDestination instance - */ - public static create(properties?: google.cloud.dialogflow.v2.IGcsDestination): google.cloud.dialogflow.v2.GcsDestination; + /** SuggestionFeatureConfig enableEventBasedSuggestion */ + enableEventBasedSuggestion?: (boolean|null); - /** - * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.dialogflow.v2.GcsDestination.verify|verify} messages. - * @param message GcsDestination message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; + /** SuggestionFeatureConfig suggestionTriggerSettings */ + suggestionTriggerSettings?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionTriggerSettings|null); - /** - * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.GcsDestination.verify|verify} messages. - * @param message GcsDestination message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; + /** SuggestionFeatureConfig queryConfig */ + queryConfig?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionQueryConfig|null); - /** - * Decodes a GcsDestination message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GcsDestination - * @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.dialogflow.v2.GcsDestination; + /** SuggestionFeatureConfig conversationModelConfig */ + conversationModelConfig?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationModelConfig|null); - /** - * Decodes a GcsDestination message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GcsDestination - * @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.dialogflow.v2.GcsDestination; + /** SuggestionFeatureConfig conversationProcessConfig */ + conversationProcessConfig?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationProcessConfig|null); + } - /** - * Verifies a GcsDestination 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); + /** Represents a SuggestionFeatureConfig. */ + class SuggestionFeatureConfig implements ISuggestionFeatureConfig { - /** - * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GcsDestination - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.GcsDestination; + /** + * Constructs a new SuggestionFeatureConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionFeatureConfig); - /** - * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. - * @param message GcsDestination - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2.GcsDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** SuggestionFeatureConfig suggestionFeature. */ + public suggestionFeature?: (google.cloud.dialogflow.v2.ISuggestionFeature|null); - /** - * Converts this GcsDestination to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** SuggestionFeatureConfig enableEventBasedSuggestion. */ + public enableEventBasedSuggestion: boolean; - /** - * Gets the default type url for GcsDestination - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** SuggestionFeatureConfig suggestionTriggerSettings. */ + public suggestionTriggerSettings?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionTriggerSettings|null); - /** Properties of a ConversationEvent. */ - interface IConversationEvent { + /** SuggestionFeatureConfig queryConfig. */ + public queryConfig?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionQueryConfig|null); - /** ConversationEvent conversation */ - conversation?: (string|null); + /** SuggestionFeatureConfig conversationModelConfig. */ + public conversationModelConfig?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationModelConfig|null); - /** ConversationEvent type */ - type?: (google.cloud.dialogflow.v2.ConversationEvent.Type|keyof typeof google.cloud.dialogflow.v2.ConversationEvent.Type|null); + /** SuggestionFeatureConfig conversationProcessConfig. */ + public conversationProcessConfig?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationProcessConfig|null); - /** ConversationEvent errorStatus */ - errorStatus?: (google.rpc.IStatus|null); + /** + * Creates a new SuggestionFeatureConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SuggestionFeatureConfig instance + */ + public static create(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionFeatureConfig): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig; - /** ConversationEvent newMessagePayload */ - newMessagePayload?: (google.cloud.dialogflow.v2.IMessage|null); - } + /** + * Encodes the specified SuggestionFeatureConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.verify|verify} messages. + * @param message SuggestionFeatureConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionFeatureConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a ConversationEvent. */ - class ConversationEvent implements IConversationEvent { + /** + * Encodes the specified SuggestionFeatureConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.verify|verify} messages. + * @param message SuggestionFeatureConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionFeatureConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new ConversationEvent. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2.IConversationEvent); + /** + * Decodes a SuggestionFeatureConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SuggestionFeatureConfig + * @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.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig; - /** ConversationEvent conversation. */ - public conversation: string; + /** + * Decodes a SuggestionFeatureConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SuggestionFeatureConfig + * @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.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig; - /** ConversationEvent type. */ - public type: (google.cloud.dialogflow.v2.ConversationEvent.Type|keyof typeof google.cloud.dialogflow.v2.ConversationEvent.Type); + /** + * Verifies a SuggestionFeatureConfig 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); - /** ConversationEvent errorStatus. */ - public errorStatus?: (google.rpc.IStatus|null); + /** + * Creates a SuggestionFeatureConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SuggestionFeatureConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig; - /** ConversationEvent newMessagePayload. */ - public newMessagePayload?: (google.cloud.dialogflow.v2.IMessage|null); + /** + * Creates a plain object from a SuggestionFeatureConfig message. Also converts values to other types if specified. + * @param message SuggestionFeatureConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ConversationEvent payload. */ - public payload?: "newMessagePayload"; + /** + * Converts this SuggestionFeatureConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a new ConversationEvent instance using the specified properties. - * @param [properties] Properties to set - * @returns ConversationEvent instance - */ - public static create(properties?: google.cloud.dialogflow.v2.IConversationEvent): google.cloud.dialogflow.v2.ConversationEvent; + /** + * Gets the default type url for SuggestionFeatureConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Encodes the specified ConversationEvent message. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationEvent.verify|verify} messages. - * @param message ConversationEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2.IConversationEvent, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of a SuggestionConfig. */ + interface ISuggestionConfig { - /** - * Encodes the specified ConversationEvent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationEvent.verify|verify} messages. - * @param message ConversationEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IConversationEvent, writer?: $protobuf.Writer): $protobuf.Writer; + /** SuggestionConfig featureConfigs */ + featureConfigs?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionFeatureConfig[]|null); - /** - * Decodes a ConversationEvent message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConversationEvent - * @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.dialogflow.v2.ConversationEvent; + /** SuggestionConfig groupSuggestionResponses */ + groupSuggestionResponses?: (boolean|null); + } - /** - * Decodes a ConversationEvent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConversationEvent - * @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.dialogflow.v2.ConversationEvent; + /** Represents a SuggestionConfig. */ + class SuggestionConfig implements ISuggestionConfig { - /** - * Verifies a ConversationEvent 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); + /** + * Constructs a new SuggestionConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionConfig); - /** - * Creates a ConversationEvent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConversationEvent - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ConversationEvent; + /** SuggestionConfig featureConfigs. */ + public featureConfigs: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionFeatureConfig[]; - /** - * Creates a plain object from a ConversationEvent message. Also converts values to other types if specified. - * @param message ConversationEvent - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2.ConversationEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** SuggestionConfig groupSuggestionResponses. */ + public groupSuggestionResponses: boolean; - /** - * Converts this ConversationEvent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a new SuggestionConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SuggestionConfig instance + */ + public static create(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionConfig): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig; - /** - * Gets the default type url for ConversationEvent - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Encodes the specified SuggestionConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.verify|verify} messages. + * @param message SuggestionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionConfig, writer?: $protobuf.Writer): $protobuf.Writer; - namespace ConversationEvent { + /** + * Encodes the specified SuggestionConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.verify|verify} messages. + * @param message SuggestionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - CONVERSATION_STARTED = 1, - CONVERSATION_FINISHED = 2, - HUMAN_INTERVENTION_NEEDED = 3, - NEW_MESSAGE = 5, - UNRECOVERABLE_ERROR = 4 - } - } + /** + * Decodes a SuggestionConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SuggestionConfig + * @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.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig; - /** Represents a ConversationModels */ - class ConversationModels extends $protobuf.rpc.Service { + /** + * Decodes a SuggestionConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SuggestionConfig + * @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.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig; - /** - * Constructs a new ConversationModels 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); + /** + * Verifies a SuggestionConfig 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 new ConversationModels 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): ConversationModels; + /** + * Creates a SuggestionConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SuggestionConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig; - /** - * Calls CreateConversationModel. - * @param request CreateConversationModelRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createConversationModel(request: google.cloud.dialogflow.v2.ICreateConversationModelRequest, callback: google.cloud.dialogflow.v2.ConversationModels.CreateConversationModelCallback): void; + /** + * Creates a plain object from a SuggestionConfig message. Also converts values to other types if specified. + * @param message SuggestionConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Calls CreateConversationModel. - * @param request CreateConversationModelRequest message or plain object - * @returns Promise - */ - public createConversationModel(request: google.cloud.dialogflow.v2.ICreateConversationModelRequest): Promise; + /** + * Converts this SuggestionConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Calls GetConversationModel. - * @param request GetConversationModelRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ConversationModel - */ - public getConversationModel(request: google.cloud.dialogflow.v2.IGetConversationModelRequest, callback: google.cloud.dialogflow.v2.ConversationModels.GetConversationModelCallback): void; + /** + * Gets the default type url for SuggestionConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Calls GetConversationModel. - * @param request GetConversationModelRequest message or plain object - * @returns Promise - */ - public getConversationModel(request: google.cloud.dialogflow.v2.IGetConversationModelRequest): Promise; + /** Properties of a SuggestionQueryConfig. */ + interface ISuggestionQueryConfig { - /** - * Calls ListConversationModels. - * @param request ListConversationModelsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListConversationModelsResponse - */ - public listConversationModels(request: google.cloud.dialogflow.v2.IListConversationModelsRequest, callback: google.cloud.dialogflow.v2.ConversationModels.ListConversationModelsCallback): void; + /** SuggestionQueryConfig knowledgeBaseQuerySource */ + knowledgeBaseQuerySource?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource|null); - /** - * Calls ListConversationModels. - * @param request ListConversationModelsRequest message or plain object - * @returns Promise - */ - public listConversationModels(request: google.cloud.dialogflow.v2.IListConversationModelsRequest): Promise; + /** SuggestionQueryConfig documentQuerySource */ + documentQuerySource?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource|null); - /** - * Calls DeleteConversationModel. - * @param request DeleteConversationModelRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteConversationModel(request: google.cloud.dialogflow.v2.IDeleteConversationModelRequest, callback: google.cloud.dialogflow.v2.ConversationModels.DeleteConversationModelCallback): void; + /** SuggestionQueryConfig dialogflowQuerySource */ + dialogflowQuerySource?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource|null); - /** - * Calls DeleteConversationModel. - * @param request DeleteConversationModelRequest message or plain object - * @returns Promise - */ - public deleteConversationModel(request: google.cloud.dialogflow.v2.IDeleteConversationModelRequest): Promise; + /** SuggestionQueryConfig maxResults */ + maxResults?: (number|null); - /** - * Calls DeployConversationModel. - * @param request DeployConversationModelRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deployConversationModel(request: google.cloud.dialogflow.v2.IDeployConversationModelRequest, callback: google.cloud.dialogflow.v2.ConversationModels.DeployConversationModelCallback): void; + /** SuggestionQueryConfig confidenceThreshold */ + confidenceThreshold?: (number|null); - /** - * Calls DeployConversationModel. - * @param request DeployConversationModelRequest message or plain object - * @returns Promise - */ - public deployConversationModel(request: google.cloud.dialogflow.v2.IDeployConversationModelRequest): Promise; + /** SuggestionQueryConfig contextFilterSettings */ + contextFilterSettings?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings|null); + } - /** - * Calls UndeployConversationModel. - * @param request UndeployConversationModelRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public undeployConversationModel(request: google.cloud.dialogflow.v2.IUndeployConversationModelRequest, callback: google.cloud.dialogflow.v2.ConversationModels.UndeployConversationModelCallback): void; + /** Represents a SuggestionQueryConfig. */ + class SuggestionQueryConfig implements ISuggestionQueryConfig { - /** - * Calls UndeployConversationModel. - * @param request UndeployConversationModelRequest message or plain object - * @returns Promise - */ - public undeployConversationModel(request: google.cloud.dialogflow.v2.IUndeployConversationModelRequest): Promise; + /** + * Constructs a new SuggestionQueryConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionQueryConfig); - /** - * Calls GetConversationModelEvaluation. - * @param request GetConversationModelEvaluationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ConversationModelEvaluation - */ - public getConversationModelEvaluation(request: google.cloud.dialogflow.v2.IGetConversationModelEvaluationRequest, callback: google.cloud.dialogflow.v2.ConversationModels.GetConversationModelEvaluationCallback): void; + /** SuggestionQueryConfig knowledgeBaseQuerySource. */ + public knowledgeBaseQuerySource?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource|null); - /** - * Calls GetConversationModelEvaluation. - * @param request GetConversationModelEvaluationRequest message or plain object - * @returns Promise - */ - public getConversationModelEvaluation(request: google.cloud.dialogflow.v2.IGetConversationModelEvaluationRequest): Promise; + /** SuggestionQueryConfig documentQuerySource. */ + public documentQuerySource?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource|null); - /** - * Calls ListConversationModelEvaluations. - * @param request ListConversationModelEvaluationsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListConversationModelEvaluationsResponse - */ - public listConversationModelEvaluations(request: google.cloud.dialogflow.v2.IListConversationModelEvaluationsRequest, callback: google.cloud.dialogflow.v2.ConversationModels.ListConversationModelEvaluationsCallback): void; + /** SuggestionQueryConfig dialogflowQuerySource. */ + public dialogflowQuerySource?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource|null); - /** - * Calls ListConversationModelEvaluations. - * @param request ListConversationModelEvaluationsRequest message or plain object - * @returns Promise - */ - public listConversationModelEvaluations(request: google.cloud.dialogflow.v2.IListConversationModelEvaluationsRequest): Promise; + /** SuggestionQueryConfig maxResults. */ + public maxResults: number; - /** - * Calls CreateConversationModelEvaluation. - * @param request CreateConversationModelEvaluationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createConversationModelEvaluation(request: google.cloud.dialogflow.v2.ICreateConversationModelEvaluationRequest, callback: google.cloud.dialogflow.v2.ConversationModels.CreateConversationModelEvaluationCallback): void; + /** SuggestionQueryConfig confidenceThreshold. */ + public confidenceThreshold: number; - /** - * Calls CreateConversationModelEvaluation. - * @param request CreateConversationModelEvaluationRequest message or plain object - * @returns Promise - */ - public createConversationModelEvaluation(request: google.cloud.dialogflow.v2.ICreateConversationModelEvaluationRequest): Promise; - } + /** SuggestionQueryConfig contextFilterSettings. */ + public contextFilterSettings?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings|null); - namespace ConversationModels { + /** SuggestionQueryConfig querySource. */ + public querySource?: ("knowledgeBaseQuerySource"|"documentQuerySource"|"dialogflowQuerySource"); - /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|createConversationModel}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateConversationModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** + * Creates a new SuggestionQueryConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SuggestionQueryConfig instance + */ + public static create(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionQueryConfig): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig; - /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|getConversationModel}. - * @param error Error, if any - * @param [response] ConversationModel - */ - type GetConversationModelCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2.ConversationModel) => void; + /** + * Encodes the specified SuggestionQueryConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.verify|verify} messages. + * @param message SuggestionQueryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionQueryConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|listConversationModels}. - * @param error Error, if any - * @param [response] ListConversationModelsResponse - */ - type ListConversationModelsCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2.ListConversationModelsResponse) => void; + /** + * Encodes the specified SuggestionQueryConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.verify|verify} messages. + * @param message SuggestionQueryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionQueryConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|deleteConversationModel}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteConversationModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** + * Decodes a SuggestionQueryConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SuggestionQueryConfig + * @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.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig; - /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|deployConversationModel}. - * @param error Error, if any - * @param [response] Operation - */ - type DeployConversationModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** + * Decodes a SuggestionQueryConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SuggestionQueryConfig + * @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.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig; - /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|undeployConversationModel}. - * @param error Error, if any - * @param [response] Operation - */ - type UndeployConversationModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** + * Verifies a SuggestionQueryConfig 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); - /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|getConversationModelEvaluation}. - * @param error Error, if any - * @param [response] ConversationModelEvaluation - */ - type GetConversationModelEvaluationCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2.ConversationModelEvaluation) => void; + /** + * Creates a SuggestionQueryConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SuggestionQueryConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig; - /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|listConversationModelEvaluations}. - * @param error Error, if any - * @param [response] ListConversationModelEvaluationsResponse - */ - type ListConversationModelEvaluationsCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse) => void; + /** + * Creates a plain object from a SuggestionQueryConfig message. Also converts values to other types if specified. + * @param message SuggestionQueryConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|createConversationModelEvaluation}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateConversationModelEvaluationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - } + /** + * Converts this SuggestionQueryConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Properties of a ConversationModel. */ - interface IConversationModel { + /** + * Gets the default type url for SuggestionQueryConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** ConversationModel name */ - name?: (string|null); + namespace SuggestionQueryConfig { - /** ConversationModel displayName */ - displayName?: (string|null); + /** Properties of a KnowledgeBaseQuerySource. */ + interface IKnowledgeBaseQuerySource { - /** ConversationModel createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** KnowledgeBaseQuerySource knowledgeBases */ + knowledgeBases?: (string[]|null); + } - /** ConversationModel datasets */ - datasets?: (google.cloud.dialogflow.v2.IInputDataset[]|null); + /** Represents a KnowledgeBaseQuerySource. */ + class KnowledgeBaseQuerySource implements IKnowledgeBaseQuerySource { - /** ConversationModel state */ - state?: (google.cloud.dialogflow.v2.ConversationModel.State|keyof typeof google.cloud.dialogflow.v2.ConversationModel.State|null); + /** + * Constructs a new KnowledgeBaseQuerySource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource); - /** ConversationModel languageCode */ - languageCode?: (string|null); + /** KnowledgeBaseQuerySource knowledgeBases. */ + public knowledgeBases: string[]; - /** ConversationModel articleSuggestionModelMetadata */ - articleSuggestionModelMetadata?: (google.cloud.dialogflow.v2.IArticleSuggestionModelMetadata|null); + /** + * Creates a new KnowledgeBaseQuerySource instance using the specified properties. + * @param [properties] Properties to set + * @returns KnowledgeBaseQuerySource instance + */ + public static create(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource; - /** ConversationModel smartReplyModelMetadata */ - smartReplyModelMetadata?: (google.cloud.dialogflow.v2.ISmartReplyModelMetadata|null); - } + /** + * Encodes the specified KnowledgeBaseQuerySource message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.verify|verify} messages. + * @param message KnowledgeBaseQuerySource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a ConversationModel. */ - class ConversationModel implements IConversationModel { + /** + * Encodes the specified KnowledgeBaseQuerySource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.verify|verify} messages. + * @param message KnowledgeBaseQuerySource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new ConversationModel. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2.IConversationModel); + /** + * Decodes a KnowledgeBaseQuerySource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KnowledgeBaseQuerySource + * @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.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource; - /** ConversationModel name. */ - public name: string; + /** + * Decodes a KnowledgeBaseQuerySource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KnowledgeBaseQuerySource + * @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.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource; - /** ConversationModel displayName. */ - public displayName: string; + /** + * Verifies a KnowledgeBaseQuerySource 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); - /** ConversationModel createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** + * Creates a KnowledgeBaseQuerySource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KnowledgeBaseQuerySource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource; - /** ConversationModel datasets. */ - public datasets: google.cloud.dialogflow.v2.IInputDataset[]; + /** + * Creates a plain object from a KnowledgeBaseQuerySource message. Also converts values to other types if specified. + * @param message KnowledgeBaseQuerySource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ConversationModel state. */ - public state: (google.cloud.dialogflow.v2.ConversationModel.State|keyof typeof google.cloud.dialogflow.v2.ConversationModel.State); + /** + * Converts this KnowledgeBaseQuerySource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** ConversationModel languageCode. */ - public languageCode: string; + /** + * Gets the default type url for KnowledgeBaseQuerySource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** ConversationModel articleSuggestionModelMetadata. */ - public articleSuggestionModelMetadata?: (google.cloud.dialogflow.v2.IArticleSuggestionModelMetadata|null); + /** Properties of a DocumentQuerySource. */ + interface IDocumentQuerySource { - /** ConversationModel smartReplyModelMetadata. */ - public smartReplyModelMetadata?: (google.cloud.dialogflow.v2.ISmartReplyModelMetadata|null); + /** DocumentQuerySource documents */ + documents?: (string[]|null); + } - /** ConversationModel modelMetadata. */ - public modelMetadata?: ("articleSuggestionModelMetadata"|"smartReplyModelMetadata"); + /** Represents a DocumentQuerySource. */ + class DocumentQuerySource implements IDocumentQuerySource { - /** - * Creates a new ConversationModel instance using the specified properties. - * @param [properties] Properties to set - * @returns ConversationModel instance - */ - public static create(properties?: google.cloud.dialogflow.v2.IConversationModel): google.cloud.dialogflow.v2.ConversationModel; + /** + * Constructs a new DocumentQuerySource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource); - /** - * Encodes the specified ConversationModel message. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationModel.verify|verify} messages. - * @param message ConversationModel message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2.IConversationModel, writer?: $protobuf.Writer): $protobuf.Writer; + /** DocumentQuerySource documents. */ + public documents: string[]; - /** - * Encodes the specified ConversationModel message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationModel.verify|verify} messages. - * @param message ConversationModel message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IConversationModel, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new DocumentQuerySource instance using the specified properties. + * @param [properties] Properties to set + * @returns DocumentQuerySource instance + */ + public static create(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource; - /** - * Decodes a ConversationModel message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConversationModel - * @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.dialogflow.v2.ConversationModel; + /** + * Encodes the specified DocumentQuerySource message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.verify|verify} messages. + * @param message DocumentQuerySource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a ConversationModel message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConversationModel - * @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.dialogflow.v2.ConversationModel; + /** + * Encodes the specified DocumentQuerySource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.verify|verify} messages. + * @param message DocumentQuerySource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a ConversationModel 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); + /** + * Decodes a DocumentQuerySource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DocumentQuerySource + * @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.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource; - /** - * Creates a ConversationModel message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConversationModel - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ConversationModel; - - /** - * Creates a plain object from a ConversationModel message. Also converts values to other types if specified. - * @param message ConversationModel - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2.ConversationModel, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConversationModel to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ConversationModel - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ConversationModel { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - UNDEPLOYED = 2, - DEPLOYING = 3, - DEPLOYED = 4, - UNDEPLOYING = 5, - DELETING = 6, - FAILED = 7, - PENDING = 8 - } - - /** ModelType enum. */ - enum ModelType { - MODEL_TYPE_UNSPECIFIED = 0, - SMART_REPLY_DUAL_ENCODER_MODEL = 2, - SMART_REPLY_BERT_MODEL = 6 - } - } - - /** Properties of a ConversationModelEvaluation. */ - interface IConversationModelEvaluation { - - /** ConversationModelEvaluation name */ - name?: (string|null); - - /** ConversationModelEvaluation displayName */ - displayName?: (string|null); - - /** ConversationModelEvaluation evaluationConfig */ - evaluationConfig?: (google.cloud.dialogflow.v2.IEvaluationConfig|null); - - /** ConversationModelEvaluation createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** ConversationModelEvaluation smartReplyMetrics */ - smartReplyMetrics?: (google.cloud.dialogflow.v2.ISmartReplyMetrics|null); - - /** ConversationModelEvaluation rawHumanEvalTemplateCsv */ - rawHumanEvalTemplateCsv?: (string|null); - } - - /** Represents a ConversationModelEvaluation. */ - class ConversationModelEvaluation implements IConversationModelEvaluation { + /** + * Decodes a DocumentQuerySource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DocumentQuerySource + * @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.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource; - /** - * Constructs a new ConversationModelEvaluation. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2.IConversationModelEvaluation); + /** + * Verifies a DocumentQuerySource 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); - /** ConversationModelEvaluation name. */ - public name: string; + /** + * Creates a DocumentQuerySource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DocumentQuerySource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource; - /** ConversationModelEvaluation displayName. */ - public displayName: string; + /** + * Creates a plain object from a DocumentQuerySource message. Also converts values to other types if specified. + * @param message DocumentQuerySource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ConversationModelEvaluation evaluationConfig. */ - public evaluationConfig?: (google.cloud.dialogflow.v2.IEvaluationConfig|null); + /** + * Converts this DocumentQuerySource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** ConversationModelEvaluation createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** + * Gets the default type url for DocumentQuerySource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** ConversationModelEvaluation smartReplyMetrics. */ - public smartReplyMetrics?: (google.cloud.dialogflow.v2.ISmartReplyMetrics|null); + /** Properties of a DialogflowQuerySource. */ + interface IDialogflowQuerySource { - /** ConversationModelEvaluation rawHumanEvalTemplateCsv. */ - public rawHumanEvalTemplateCsv: string; + /** DialogflowQuerySource agent */ + agent?: (string|null); + } - /** ConversationModelEvaluation metrics. */ - public metrics?: "smartReplyMetrics"; + /** Represents a DialogflowQuerySource. */ + class DialogflowQuerySource implements IDialogflowQuerySource { - /** - * Creates a new ConversationModelEvaluation instance using the specified properties. - * @param [properties] Properties to set - * @returns ConversationModelEvaluation instance - */ - public static create(properties?: google.cloud.dialogflow.v2.IConversationModelEvaluation): google.cloud.dialogflow.v2.ConversationModelEvaluation; + /** + * Constructs a new DialogflowQuerySource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource); - /** - * Encodes the specified ConversationModelEvaluation message. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationModelEvaluation.verify|verify} messages. - * @param message ConversationModelEvaluation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2.IConversationModelEvaluation, writer?: $protobuf.Writer): $protobuf.Writer; + /** DialogflowQuerySource agent. */ + public agent: string; - /** - * Encodes the specified ConversationModelEvaluation message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationModelEvaluation.verify|verify} messages. - * @param message ConversationModelEvaluation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IConversationModelEvaluation, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new DialogflowQuerySource instance using the specified properties. + * @param [properties] Properties to set + * @returns DialogflowQuerySource instance + */ + public static create(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource; - /** - * Decodes a ConversationModelEvaluation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConversationModelEvaluation - * @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.dialogflow.v2.ConversationModelEvaluation; + /** + * Encodes the specified DialogflowQuerySource message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.verify|verify} messages. + * @param message DialogflowQuerySource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a ConversationModelEvaluation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConversationModelEvaluation - * @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.dialogflow.v2.ConversationModelEvaluation; + /** + * Encodes the specified DialogflowQuerySource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.verify|verify} messages. + * @param message DialogflowQuerySource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a ConversationModelEvaluation 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); + /** + * Decodes a DialogflowQuerySource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DialogflowQuerySource + * @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.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource; - /** - * Creates a ConversationModelEvaluation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConversationModelEvaluation - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ConversationModelEvaluation; + /** + * Decodes a DialogflowQuerySource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DialogflowQuerySource + * @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.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource; - /** - * Creates a plain object from a ConversationModelEvaluation message. Also converts values to other types if specified. - * @param message ConversationModelEvaluation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2.ConversationModelEvaluation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a DialogflowQuerySource 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); - /** - * Converts this ConversationModelEvaluation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a DialogflowQuerySource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DialogflowQuerySource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource; - /** - * Gets the default type url for ConversationModelEvaluation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a plain object from a DialogflowQuerySource message. Also converts values to other types if specified. + * @param message DialogflowQuerySource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of an EvaluationConfig. */ - interface IEvaluationConfig { + /** + * Converts this DialogflowQuerySource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** EvaluationConfig datasets */ - datasets?: (google.cloud.dialogflow.v2.IInputDataset[]|null); + /** + * Gets the default type url for DialogflowQuerySource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** EvaluationConfig smartReplyConfig */ - smartReplyConfig?: (google.cloud.dialogflow.v2.EvaluationConfig.ISmartReplyConfig|null); + /** Properties of a ContextFilterSettings. */ + interface IContextFilterSettings { - /** EvaluationConfig smartComposeConfig */ - smartComposeConfig?: (google.cloud.dialogflow.v2.EvaluationConfig.ISmartComposeConfig|null); - } + /** ContextFilterSettings dropHandoffMessages */ + dropHandoffMessages?: (boolean|null); - /** Represents an EvaluationConfig. */ - class EvaluationConfig implements IEvaluationConfig { + /** ContextFilterSettings dropVirtualAgentMessages */ + dropVirtualAgentMessages?: (boolean|null); - /** - * Constructs a new EvaluationConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2.IEvaluationConfig); + /** ContextFilterSettings dropIvrMessages */ + dropIvrMessages?: (boolean|null); + } - /** EvaluationConfig datasets. */ - public datasets: google.cloud.dialogflow.v2.IInputDataset[]; + /** Represents a ContextFilterSettings. */ + class ContextFilterSettings implements IContextFilterSettings { - /** EvaluationConfig smartReplyConfig. */ - public smartReplyConfig?: (google.cloud.dialogflow.v2.EvaluationConfig.ISmartReplyConfig|null); + /** + * Constructs a new ContextFilterSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings); - /** EvaluationConfig smartComposeConfig. */ - public smartComposeConfig?: (google.cloud.dialogflow.v2.EvaluationConfig.ISmartComposeConfig|null); + /** ContextFilterSettings dropHandoffMessages. */ + public dropHandoffMessages: boolean; - /** EvaluationConfig modelSpecificConfig. */ - public modelSpecificConfig?: ("smartReplyConfig"|"smartComposeConfig"); + /** ContextFilterSettings dropVirtualAgentMessages. */ + public dropVirtualAgentMessages: boolean; - /** - * Creates a new EvaluationConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns EvaluationConfig instance - */ - public static create(properties?: google.cloud.dialogflow.v2.IEvaluationConfig): google.cloud.dialogflow.v2.EvaluationConfig; + /** ContextFilterSettings dropIvrMessages. */ + public dropIvrMessages: boolean; - /** - * Encodes the specified EvaluationConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.EvaluationConfig.verify|verify} messages. - * @param message EvaluationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2.IEvaluationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new ContextFilterSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ContextFilterSettings instance + */ + public static create(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings; - /** - * Encodes the specified EvaluationConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.EvaluationConfig.verify|verify} messages. - * @param message EvaluationConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IEvaluationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ContextFilterSettings message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.verify|verify} messages. + * @param message ContextFilterSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an EvaluationConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EvaluationConfig - * @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.dialogflow.v2.EvaluationConfig; + /** + * Encodes the specified ContextFilterSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.verify|verify} messages. + * @param message ContextFilterSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an EvaluationConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EvaluationConfig - * @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.dialogflow.v2.EvaluationConfig; + /** + * Decodes a ContextFilterSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ContextFilterSettings + * @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.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings; - /** - * Verifies an EvaluationConfig 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); + /** + * Decodes a ContextFilterSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ContextFilterSettings + * @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.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings; - /** - * Creates an EvaluationConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EvaluationConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.EvaluationConfig; + /** + * Verifies a ContextFilterSettings 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 plain object from an EvaluationConfig message. Also converts values to other types if specified. - * @param message EvaluationConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2.EvaluationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a ContextFilterSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContextFilterSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings; - /** - * Converts this EvaluationConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a plain object from a ContextFilterSettings message. Also converts values to other types if specified. + * @param message ContextFilterSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Gets the default type url for EvaluationConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Converts this ContextFilterSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - namespace EvaluationConfig { + /** + * Gets the default type url for ContextFilterSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } - /** Properties of a SmartReplyConfig. */ - interface ISmartReplyConfig { + /** Properties of a ConversationModelConfig. */ + interface IConversationModelConfig { - /** SmartReplyConfig allowlistDocument */ - allowlistDocument?: (string|null); + /** ConversationModelConfig model */ + model?: (string|null); - /** SmartReplyConfig maxResultCount */ - maxResultCount?: (number|null); + /** ConversationModelConfig baselineModelVersion */ + baselineModelVersion?: (string|null); } - /** Represents a SmartReplyConfig. */ - class SmartReplyConfig implements ISmartReplyConfig { + /** Represents a ConversationModelConfig. */ + class ConversationModelConfig implements IConversationModelConfig { /** - * Constructs a new SmartReplyConfig. + * Constructs a new ConversationModelConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.EvaluationConfig.ISmartReplyConfig); + constructor(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationModelConfig); - /** SmartReplyConfig allowlistDocument. */ - public allowlistDocument: string; + /** ConversationModelConfig model. */ + public model: string; - /** SmartReplyConfig maxResultCount. */ - public maxResultCount: number; + /** ConversationModelConfig baselineModelVersion. */ + public baselineModelVersion: string; /** - * Creates a new SmartReplyConfig instance using the specified properties. + * Creates a new ConversationModelConfig instance using the specified properties. * @param [properties] Properties to set - * @returns SmartReplyConfig instance + * @returns ConversationModelConfig instance */ - public static create(properties?: google.cloud.dialogflow.v2.EvaluationConfig.ISmartReplyConfig): google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig; + public static create(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationModelConfig): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig; /** - * Encodes the specified SmartReplyConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig.verify|verify} messages. - * @param message SmartReplyConfig message or plain object to encode + * Encodes the specified ConversationModelConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig.verify|verify} messages. + * @param message ConversationModelConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.EvaluationConfig.ISmartReplyConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationModelConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SmartReplyConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig.verify|verify} messages. - * @param message SmartReplyConfig message or plain object to encode + * Encodes the specified ConversationModelConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig.verify|verify} messages. + * @param message ConversationModelConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.EvaluationConfig.ISmartReplyConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationModelConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SmartReplyConfig message from the specified reader or buffer. + * Decodes a ConversationModelConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SmartReplyConfig + * @returns ConversationModelConfig * @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.dialogflow.v2.EvaluationConfig.SmartReplyConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig; /** - * Decodes a SmartReplyConfig message from the specified reader or buffer, length delimited. + * Decodes a ConversationModelConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SmartReplyConfig + * @returns ConversationModelConfig * @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.dialogflow.v2.EvaluationConfig.SmartReplyConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig; /** - * Verifies a SmartReplyConfig message. + * Verifies a ConversationModelConfig 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 SmartReplyConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ConversationModelConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SmartReplyConfig + * @returns ConversationModelConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig; /** - * Creates a plain object from a SmartReplyConfig message. Also converts values to other types if specified. - * @param message SmartReplyConfig + * Creates a plain object from a ConversationModelConfig message. Also converts values to other types if specified. + * @param message ConversationModelConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SmartReplyConfig to JSON. + * Converts this ConversationModelConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SmartReplyConfig + * Gets the default type url for ConversationModelConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SmartComposeConfig. */ - interface ISmartComposeConfig { - - /** SmartComposeConfig allowlistDocument */ - allowlistDocument?: (string|null); + /** Properties of a ConversationProcessConfig. */ + interface IConversationProcessConfig { - /** SmartComposeConfig maxResultCount */ - maxResultCount?: (number|null); + /** ConversationProcessConfig recentSentencesCount */ + recentSentencesCount?: (number|null); } - /** Represents a SmartComposeConfig. */ - class SmartComposeConfig implements ISmartComposeConfig { + /** Represents a ConversationProcessConfig. */ + class ConversationProcessConfig implements IConversationProcessConfig { /** - * Constructs a new SmartComposeConfig. + * Constructs a new ConversationProcessConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.EvaluationConfig.ISmartComposeConfig); - - /** SmartComposeConfig allowlistDocument. */ - public allowlistDocument: string; + constructor(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationProcessConfig); - /** SmartComposeConfig maxResultCount. */ - public maxResultCount: number; + /** ConversationProcessConfig recentSentencesCount. */ + public recentSentencesCount: number; /** - * Creates a new SmartComposeConfig instance using the specified properties. + * Creates a new ConversationProcessConfig instance using the specified properties. * @param [properties] Properties to set - * @returns SmartComposeConfig instance + * @returns ConversationProcessConfig instance */ - public static create(properties?: google.cloud.dialogflow.v2.EvaluationConfig.ISmartComposeConfig): google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig; + public static create(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationProcessConfig): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig; /** - * Encodes the specified SmartComposeConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig.verify|verify} messages. - * @param message SmartComposeConfig message or plain object to encode + * Encodes the specified ConversationProcessConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig.verify|verify} messages. + * @param message ConversationProcessConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.EvaluationConfig.ISmartComposeConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationProcessConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SmartComposeConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig.verify|verify} messages. - * @param message SmartComposeConfig message or plain object to encode + * Encodes the specified ConversationProcessConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig.verify|verify} messages. + * @param message ConversationProcessConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.EvaluationConfig.ISmartComposeConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationProcessConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SmartComposeConfig message from the specified reader or buffer. + * Decodes a ConversationProcessConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SmartComposeConfig + * @returns ConversationProcessConfig * @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.dialogflow.v2.EvaluationConfig.SmartComposeConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig; /** - * Decodes a SmartComposeConfig message from the specified reader or buffer, length delimited. + * Decodes a ConversationProcessConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SmartComposeConfig + * @returns ConversationProcessConfig * @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.dialogflow.v2.EvaluationConfig.SmartComposeConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig; /** - * Verifies a SmartComposeConfig message. + * Verifies a ConversationProcessConfig 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 SmartComposeConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ConversationProcessConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SmartComposeConfig + * @returns ConversationProcessConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig; /** - * Creates a plain object from a SmartComposeConfig message. Also converts values to other types if specified. - * @param message SmartComposeConfig + * Creates a plain object from a ConversationProcessConfig message. Also converts values to other types if specified. + * @param message ConversationProcessConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SmartComposeConfig to JSON. + * Converts this ConversationProcessConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SmartComposeConfig + * Gets the default type url for ConversationProcessConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - } - /** Properties of an InputDataset. */ - interface IInputDataset { + /** Properties of a MessageAnalysisConfig. */ + interface IMessageAnalysisConfig { - /** InputDataset dataset */ - dataset?: (string|null); - } + /** MessageAnalysisConfig enableEntityExtraction */ + enableEntityExtraction?: (boolean|null); - /** Represents an InputDataset. */ - class InputDataset implements IInputDataset { + /** MessageAnalysisConfig enableSentimentAnalysis */ + enableSentimentAnalysis?: (boolean|null); + } - /** - * Constructs a new InputDataset. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2.IInputDataset); + /** Represents a MessageAnalysisConfig. */ + class MessageAnalysisConfig implements IMessageAnalysisConfig { - /** InputDataset dataset. */ - public dataset: string; + /** + * Constructs a new MessageAnalysisConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IMessageAnalysisConfig); - /** - * Creates a new InputDataset instance using the specified properties. - * @param [properties] Properties to set - * @returns InputDataset instance - */ - public static create(properties?: google.cloud.dialogflow.v2.IInputDataset): google.cloud.dialogflow.v2.InputDataset; + /** MessageAnalysisConfig enableEntityExtraction. */ + public enableEntityExtraction: boolean; - /** - * Encodes the specified InputDataset message. Does not implicitly {@link google.cloud.dialogflow.v2.InputDataset.verify|verify} messages. - * @param message InputDataset message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2.IInputDataset, writer?: $protobuf.Writer): $protobuf.Writer; + /** MessageAnalysisConfig enableSentimentAnalysis. */ + public enableSentimentAnalysis: boolean; - /** - * Encodes the specified InputDataset message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.InputDataset.verify|verify} messages. - * @param message InputDataset message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IInputDataset, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new MessageAnalysisConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageAnalysisConfig instance + */ + public static create(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IMessageAnalysisConfig): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig; - /** - * Decodes an InputDataset message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InputDataset - * @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.dialogflow.v2.InputDataset; + /** + * Encodes the specified MessageAnalysisConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig.verify|verify} messages. + * @param message MessageAnalysisConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IMessageAnalysisConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an InputDataset message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InputDataset - * @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.dialogflow.v2.InputDataset; + /** + * Encodes the specified MessageAnalysisConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig.verify|verify} messages. + * @param message MessageAnalysisConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IMessageAnalysisConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies an InputDataset 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); + /** + * Decodes a MessageAnalysisConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageAnalysisConfig + * @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.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig; - /** - * Creates an InputDataset message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InputDataset - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.InputDataset; + /** + * Decodes a MessageAnalysisConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageAnalysisConfig + * @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.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig; - /** - * Creates a plain object from an InputDataset message. Also converts values to other types if specified. - * @param message InputDataset - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2.InputDataset, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a MessageAnalysisConfig 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); - /** - * Converts this InputDataset to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a MessageAnalysisConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageAnalysisConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig; - /** - * Gets the default type url for InputDataset - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** + * Creates a plain object from a MessageAnalysisConfig message. Also converts values to other types if specified. + * @param message MessageAnalysisConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageAnalysisConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageAnalysisConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } - /** Properties of an ArticleSuggestionModelMetadata. */ - interface IArticleSuggestionModelMetadata { + /** Properties of a HumanAgentHandoffConfig. */ + interface IHumanAgentHandoffConfig { - /** ArticleSuggestionModelMetadata trainingModelType */ - trainingModelType?: (google.cloud.dialogflow.v2.ConversationModel.ModelType|keyof typeof google.cloud.dialogflow.v2.ConversationModel.ModelType|null); + /** HumanAgentHandoffConfig livePersonConfig */ + livePersonConfig?: (google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ILivePersonConfig|null); + + /** HumanAgentHandoffConfig salesforceLiveAgentConfig */ + salesforceLiveAgentConfig?: (google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig|null); } - /** Represents an ArticleSuggestionModelMetadata. */ - class ArticleSuggestionModelMetadata implements IArticleSuggestionModelMetadata { + /** Represents a HumanAgentHandoffConfig. */ + class HumanAgentHandoffConfig implements IHumanAgentHandoffConfig { /** - * Constructs a new ArticleSuggestionModelMetadata. + * Constructs a new HumanAgentHandoffConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.IArticleSuggestionModelMetadata); + constructor(properties?: google.cloud.dialogflow.v2.IHumanAgentHandoffConfig); - /** ArticleSuggestionModelMetadata trainingModelType. */ - public trainingModelType: (google.cloud.dialogflow.v2.ConversationModel.ModelType|keyof typeof google.cloud.dialogflow.v2.ConversationModel.ModelType); + /** HumanAgentHandoffConfig livePersonConfig. */ + public livePersonConfig?: (google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ILivePersonConfig|null); + + /** HumanAgentHandoffConfig salesforceLiveAgentConfig. */ + public salesforceLiveAgentConfig?: (google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig|null); + + /** HumanAgentHandoffConfig agentService. */ + public agentService?: ("livePersonConfig"|"salesforceLiveAgentConfig"); /** - * Creates a new ArticleSuggestionModelMetadata instance using the specified properties. + * Creates a new HumanAgentHandoffConfig instance using the specified properties. * @param [properties] Properties to set - * @returns ArticleSuggestionModelMetadata instance + * @returns HumanAgentHandoffConfig instance */ - public static create(properties?: google.cloud.dialogflow.v2.IArticleSuggestionModelMetadata): google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata; + public static create(properties?: google.cloud.dialogflow.v2.IHumanAgentHandoffConfig): google.cloud.dialogflow.v2.HumanAgentHandoffConfig; /** - * Encodes the specified ArticleSuggestionModelMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata.verify|verify} messages. - * @param message ArticleSuggestionModelMetadata message or plain object to encode + * Encodes the specified HumanAgentHandoffConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentHandoffConfig.verify|verify} messages. + * @param message HumanAgentHandoffConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.IArticleSuggestionModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.IHumanAgentHandoffConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ArticleSuggestionModelMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata.verify|verify} messages. - * @param message ArticleSuggestionModelMetadata message or plain object to encode + * Encodes the specified HumanAgentHandoffConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentHandoffConfig.verify|verify} messages. + * @param message HumanAgentHandoffConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IArticleSuggestionModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.IHumanAgentHandoffConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ArticleSuggestionModelMetadata message from the specified reader or buffer. + * Decodes a HumanAgentHandoffConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ArticleSuggestionModelMetadata + * @returns HumanAgentHandoffConfig * @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.dialogflow.v2.ArticleSuggestionModelMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.HumanAgentHandoffConfig; /** - * Decodes an ArticleSuggestionModelMetadata message from the specified reader or buffer, length delimited. + * Decodes a HumanAgentHandoffConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ArticleSuggestionModelMetadata + * @returns HumanAgentHandoffConfig * @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.dialogflow.v2.ArticleSuggestionModelMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.HumanAgentHandoffConfig; /** - * Verifies an ArticleSuggestionModelMetadata message. + * Verifies a HumanAgentHandoffConfig 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 ArticleSuggestionModelMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a HumanAgentHandoffConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ArticleSuggestionModelMetadata + * @returns HumanAgentHandoffConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.HumanAgentHandoffConfig; /** - * Creates a plain object from an ArticleSuggestionModelMetadata message. Also converts values to other types if specified. - * @param message ArticleSuggestionModelMetadata + * Creates a plain object from a HumanAgentHandoffConfig message. Also converts values to other types if specified. + * @param message HumanAgentHandoffConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.HumanAgentHandoffConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ArticleSuggestionModelMetadata to JSON. + * Converts this HumanAgentHandoffConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ArticleSuggestionModelMetadata + * Gets the default type url for HumanAgentHandoffConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SmartReplyModelMetadata. */ - interface ISmartReplyModelMetadata { - - /** SmartReplyModelMetadata trainingModelType */ - trainingModelType?: (google.cloud.dialogflow.v2.ConversationModel.ModelType|keyof typeof google.cloud.dialogflow.v2.ConversationModel.ModelType|null); - } + namespace HumanAgentHandoffConfig { - /** Represents a SmartReplyModelMetadata. */ - class SmartReplyModelMetadata implements ISmartReplyModelMetadata { + /** Properties of a LivePersonConfig. */ + interface ILivePersonConfig { - /** - * Constructs a new SmartReplyModelMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2.ISmartReplyModelMetadata); + /** LivePersonConfig accountNumber */ + accountNumber?: (string|null); + } - /** SmartReplyModelMetadata trainingModelType. */ - public trainingModelType: (google.cloud.dialogflow.v2.ConversationModel.ModelType|keyof typeof google.cloud.dialogflow.v2.ConversationModel.ModelType); + /** Represents a LivePersonConfig. */ + class LivePersonConfig implements ILivePersonConfig { - /** - * Creates a new SmartReplyModelMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns SmartReplyModelMetadata instance - */ - public static create(properties?: google.cloud.dialogflow.v2.ISmartReplyModelMetadata): google.cloud.dialogflow.v2.SmartReplyModelMetadata; + /** + * Constructs a new LivePersonConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ILivePersonConfig); - /** - * Encodes the specified SmartReplyModelMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.SmartReplyModelMetadata.verify|verify} messages. - * @param message SmartReplyModelMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2.ISmartReplyModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + /** LivePersonConfig accountNumber. */ + public accountNumber: string; - /** - * Encodes the specified SmartReplyModelMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.SmartReplyModelMetadata.verify|verify} messages. - * @param message SmartReplyModelMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.ISmartReplyModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new LivePersonConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns LivePersonConfig instance + */ + public static create(properties?: google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ILivePersonConfig): google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig; - /** - * Decodes a SmartReplyModelMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SmartReplyModelMetadata - * @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.dialogflow.v2.SmartReplyModelMetadata; + /** + * Encodes the specified LivePersonConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig.verify|verify} messages. + * @param message LivePersonConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ILivePersonConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a SmartReplyModelMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SmartReplyModelMetadata - * @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.dialogflow.v2.SmartReplyModelMetadata; + /** + * Encodes the specified LivePersonConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig.verify|verify} messages. + * @param message LivePersonConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ILivePersonConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a SmartReplyModelMetadata 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); + /** + * Decodes a LivePersonConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LivePersonConfig + * @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.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig; - /** - * Creates a SmartReplyModelMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SmartReplyModelMetadata - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.SmartReplyModelMetadata; + /** + * Decodes a LivePersonConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LivePersonConfig + * @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.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig; - /** - * Creates a plain object from a SmartReplyModelMetadata message. Also converts values to other types if specified. - * @param message SmartReplyModelMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2.SmartReplyModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a LivePersonConfig 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); - /** - * Converts this SmartReplyModelMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a LivePersonConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LivePersonConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig; - /** - * Gets the default type url for SmartReplyModelMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a plain object from a LivePersonConfig message. Also converts values to other types if specified. + * @param message LivePersonConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of a SmartReplyMetrics. */ - interface ISmartReplyMetrics { + /** + * Converts this LivePersonConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** SmartReplyMetrics allowlistCoverage */ - allowlistCoverage?: (number|null); - - /** SmartReplyMetrics topNMetrics */ - topNMetrics?: (google.cloud.dialogflow.v2.SmartReplyMetrics.ITopNMetrics[]|null); - - /** SmartReplyMetrics conversationCount */ - conversationCount?: (number|Long|string|null); - } - - /** Represents a SmartReplyMetrics. */ - class SmartReplyMetrics implements ISmartReplyMetrics { - - /** - * Constructs a new SmartReplyMetrics. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2.ISmartReplyMetrics); - - /** SmartReplyMetrics allowlistCoverage. */ - public allowlistCoverage: number; - - /** SmartReplyMetrics topNMetrics. */ - public topNMetrics: google.cloud.dialogflow.v2.SmartReplyMetrics.ITopNMetrics[]; - - /** SmartReplyMetrics conversationCount. */ - public conversationCount: (number|Long|string); - - /** - * Creates a new SmartReplyMetrics instance using the specified properties. - * @param [properties] Properties to set - * @returns SmartReplyMetrics instance - */ - public static create(properties?: google.cloud.dialogflow.v2.ISmartReplyMetrics): google.cloud.dialogflow.v2.SmartReplyMetrics; - - /** - * Encodes the specified SmartReplyMetrics message. Does not implicitly {@link google.cloud.dialogflow.v2.SmartReplyMetrics.verify|verify} messages. - * @param message SmartReplyMetrics message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2.ISmartReplyMetrics, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SmartReplyMetrics message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.SmartReplyMetrics.verify|verify} messages. - * @param message SmartReplyMetrics message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.ISmartReplyMetrics, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SmartReplyMetrics message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SmartReplyMetrics - * @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.dialogflow.v2.SmartReplyMetrics; - - /** - * Decodes a SmartReplyMetrics message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SmartReplyMetrics - * @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.dialogflow.v2.SmartReplyMetrics; - - /** - * Verifies a SmartReplyMetrics 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 SmartReplyMetrics message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SmartReplyMetrics - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.SmartReplyMetrics; - - /** - * Creates a plain object from a SmartReplyMetrics message. Also converts values to other types if specified. - * @param message SmartReplyMetrics - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2.SmartReplyMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SmartReplyMetrics to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Gets the default type url for LivePersonConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Gets the default type url for SmartReplyMetrics - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Properties of a SalesforceLiveAgentConfig. */ + interface ISalesforceLiveAgentConfig { - namespace SmartReplyMetrics { + /** SalesforceLiveAgentConfig organizationId */ + organizationId?: (string|null); - /** Properties of a TopNMetrics. */ - interface ITopNMetrics { + /** SalesforceLiveAgentConfig deploymentId */ + deploymentId?: (string|null); - /** TopNMetrics n */ - n?: (number|null); + /** SalesforceLiveAgentConfig buttonId */ + buttonId?: (string|null); - /** TopNMetrics recall */ - recall?: (number|null); + /** SalesforceLiveAgentConfig endpointDomain */ + endpointDomain?: (string|null); } - /** Represents a TopNMetrics. */ - class TopNMetrics implements ITopNMetrics { + /** Represents a SalesforceLiveAgentConfig. */ + class SalesforceLiveAgentConfig implements ISalesforceLiveAgentConfig { /** - * Constructs a new TopNMetrics. + * Constructs a new SalesforceLiveAgentConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.SmartReplyMetrics.ITopNMetrics); + constructor(properties?: google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig); - /** TopNMetrics n. */ - public n: number; + /** SalesforceLiveAgentConfig organizationId. */ + public organizationId: string; - /** TopNMetrics recall. */ - public recall: number; + /** SalesforceLiveAgentConfig deploymentId. */ + public deploymentId: string; + + /** SalesforceLiveAgentConfig buttonId. */ + public buttonId: string; + + /** SalesforceLiveAgentConfig endpointDomain. */ + public endpointDomain: string; /** - * Creates a new TopNMetrics instance using the specified properties. + * Creates a new SalesforceLiveAgentConfig instance using the specified properties. * @param [properties] Properties to set - * @returns TopNMetrics instance + * @returns SalesforceLiveAgentConfig instance */ - public static create(properties?: google.cloud.dialogflow.v2.SmartReplyMetrics.ITopNMetrics): google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics; + public static create(properties?: google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig): google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig; /** - * Encodes the specified TopNMetrics message. Does not implicitly {@link google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics.verify|verify} messages. - * @param message TopNMetrics message or plain object to encode + * Encodes the specified SalesforceLiveAgentConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.verify|verify} messages. + * @param message SalesforceLiveAgentConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.SmartReplyMetrics.ITopNMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TopNMetrics message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics.verify|verify} messages. - * @param message TopNMetrics message or plain object to encode + * Encodes the specified SalesforceLiveAgentConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.verify|verify} messages. + * @param message SalesforceLiveAgentConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.SmartReplyMetrics.ITopNMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TopNMetrics message from the specified reader or buffer. + * Decodes a SalesforceLiveAgentConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TopNMetrics + * @returns SalesforceLiveAgentConfig * @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.dialogflow.v2.SmartReplyMetrics.TopNMetrics; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig; /** - * Decodes a TopNMetrics message from the specified reader or buffer, length delimited. + * Decodes a SalesforceLiveAgentConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TopNMetrics + * @returns SalesforceLiveAgentConfig * @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.dialogflow.v2.SmartReplyMetrics.TopNMetrics; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig; /** - * Verifies a TopNMetrics message. + * Verifies a SalesforceLiveAgentConfig 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 TopNMetrics message from a plain object. Also converts values to their respective internal types. + * Creates a SalesforceLiveAgentConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TopNMetrics + * @returns SalesforceLiveAgentConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig; /** - * Creates a plain object from a TopNMetrics message. Also converts values to other types if specified. - * @param message TopNMetrics + * Creates a plain object from a SalesforceLiveAgentConfig message. Also converts values to other types if specified. + * @param message SalesforceLiveAgentConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TopNMetrics to JSON. + * Converts this SalesforceLiveAgentConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for TopNMetrics + * Gets the default type url for SalesforceLiveAgentConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -22271,5110 +22489,5578 @@ export namespace google { } } - /** Properties of a CreateConversationModelRequest. */ - interface ICreateConversationModelRequest { + /** Properties of a NotificationConfig. */ + interface INotificationConfig { - /** CreateConversationModelRequest parent */ - parent?: (string|null); + /** NotificationConfig topic */ + topic?: (string|null); - /** CreateConversationModelRequest conversationModel */ - conversationModel?: (google.cloud.dialogflow.v2.IConversationModel|null); + /** NotificationConfig messageFormat */ + messageFormat?: (google.cloud.dialogflow.v2.NotificationConfig.MessageFormat|keyof typeof google.cloud.dialogflow.v2.NotificationConfig.MessageFormat|null); } - /** Represents a CreateConversationModelRequest. */ - class CreateConversationModelRequest implements ICreateConversationModelRequest { + /** Represents a NotificationConfig. */ + class NotificationConfig implements INotificationConfig { /** - * Constructs a new CreateConversationModelRequest. + * Constructs a new NotificationConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.ICreateConversationModelRequest); + constructor(properties?: google.cloud.dialogflow.v2.INotificationConfig); - /** CreateConversationModelRequest parent. */ - public parent: string; + /** NotificationConfig topic. */ + public topic: string; - /** CreateConversationModelRequest conversationModel. */ - public conversationModel?: (google.cloud.dialogflow.v2.IConversationModel|null); + /** NotificationConfig messageFormat. */ + public messageFormat: (google.cloud.dialogflow.v2.NotificationConfig.MessageFormat|keyof typeof google.cloud.dialogflow.v2.NotificationConfig.MessageFormat); /** - * Creates a new CreateConversationModelRequest instance using the specified properties. + * Creates a new NotificationConfig instance using the specified properties. * @param [properties] Properties to set - * @returns CreateConversationModelRequest instance + * @returns NotificationConfig instance */ - public static create(properties?: google.cloud.dialogflow.v2.ICreateConversationModelRequest): google.cloud.dialogflow.v2.CreateConversationModelRequest; + public static create(properties?: google.cloud.dialogflow.v2.INotificationConfig): google.cloud.dialogflow.v2.NotificationConfig; /** - * Encodes the specified CreateConversationModelRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationModelRequest.verify|verify} messages. - * @param message CreateConversationModelRequest message or plain object to encode + * Encodes the specified NotificationConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.NotificationConfig.verify|verify} messages. + * @param message NotificationConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.ICreateConversationModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.INotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateConversationModelRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationModelRequest.verify|verify} messages. - * @param message CreateConversationModelRequest message or plain object to encode + * Encodes the specified NotificationConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.NotificationConfig.verify|verify} messages. + * @param message NotificationConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.ICreateConversationModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.INotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateConversationModelRequest message from the specified reader or buffer. + * Decodes a NotificationConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateConversationModelRequest + * @returns NotificationConfig * @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.dialogflow.v2.CreateConversationModelRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.NotificationConfig; /** - * Decodes a CreateConversationModelRequest message from the specified reader or buffer, length delimited. + * Decodes a NotificationConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateConversationModelRequest + * @returns NotificationConfig * @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.dialogflow.v2.CreateConversationModelRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.NotificationConfig; /** - * Verifies a CreateConversationModelRequest message. + * Verifies a NotificationConfig 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 CreateConversationModelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a NotificationConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateConversationModelRequest + * @returns NotificationConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.CreateConversationModelRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.NotificationConfig; /** - * Creates a plain object from a CreateConversationModelRequest message. Also converts values to other types if specified. - * @param message CreateConversationModelRequest + * Creates a plain object from a NotificationConfig message. Also converts values to other types if specified. + * @param message NotificationConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.CreateConversationModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.NotificationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateConversationModelRequest to JSON. + * Converts this NotificationConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateConversationModelRequest + * Gets the default type url for NotificationConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetConversationModelRequest. */ - interface IGetConversationModelRequest { + namespace NotificationConfig { - /** GetConversationModelRequest name */ - name?: (string|null); + /** MessageFormat enum. */ + enum MessageFormat { + MESSAGE_FORMAT_UNSPECIFIED = 0, + PROTO = 1, + JSON = 2 + } } - /** Represents a GetConversationModelRequest. */ - class GetConversationModelRequest implements IGetConversationModelRequest { + /** Properties of a LoggingConfig. */ + interface ILoggingConfig { + + /** LoggingConfig enableStackdriverLogging */ + enableStackdriverLogging?: (boolean|null); + } + + /** Represents a LoggingConfig. */ + class LoggingConfig implements ILoggingConfig { /** - * Constructs a new GetConversationModelRequest. + * Constructs a new LoggingConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.IGetConversationModelRequest); + constructor(properties?: google.cloud.dialogflow.v2.ILoggingConfig); - /** GetConversationModelRequest name. */ - public name: string; + /** LoggingConfig enableStackdriverLogging. */ + public enableStackdriverLogging: boolean; /** - * Creates a new GetConversationModelRequest instance using the specified properties. + * Creates a new LoggingConfig instance using the specified properties. * @param [properties] Properties to set - * @returns GetConversationModelRequest instance + * @returns LoggingConfig instance */ - public static create(properties?: google.cloud.dialogflow.v2.IGetConversationModelRequest): google.cloud.dialogflow.v2.GetConversationModelRequest; + public static create(properties?: google.cloud.dialogflow.v2.ILoggingConfig): google.cloud.dialogflow.v2.LoggingConfig; /** - * Encodes the specified GetConversationModelRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.GetConversationModelRequest.verify|verify} messages. - * @param message GetConversationModelRequest message or plain object to encode + * Encodes the specified LoggingConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.LoggingConfig.verify|verify} messages. + * @param message LoggingConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.IGetConversationModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.ILoggingConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetConversationModelRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.GetConversationModelRequest.verify|verify} messages. - * @param message GetConversationModelRequest message or plain object to encode + * Encodes the specified LoggingConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.LoggingConfig.verify|verify} messages. + * @param message LoggingConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IGetConversationModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.ILoggingConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetConversationModelRequest message from the specified reader or buffer. + * Decodes a LoggingConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetConversationModelRequest + * @returns LoggingConfig * @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.dialogflow.v2.GetConversationModelRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.LoggingConfig; /** - * Decodes a GetConversationModelRequest message from the specified reader or buffer, length delimited. + * Decodes a LoggingConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetConversationModelRequest + * @returns LoggingConfig * @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.dialogflow.v2.GetConversationModelRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.LoggingConfig; /** - * Verifies a GetConversationModelRequest message. + * Verifies a LoggingConfig 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 GetConversationModelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LoggingConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetConversationModelRequest + * @returns LoggingConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.GetConversationModelRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.LoggingConfig; /** - * Creates a plain object from a GetConversationModelRequest message. Also converts values to other types if specified. - * @param message GetConversationModelRequest + * Creates a plain object from a LoggingConfig message. Also converts values to other types if specified. + * @param message LoggingConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.GetConversationModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.LoggingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetConversationModelRequest to JSON. + * Converts this LoggingConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetConversationModelRequest + * Gets the default type url for LoggingConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListConversationModelsRequest. */ - interface IListConversationModelsRequest { - - /** ListConversationModelsRequest parent */ - parent?: (string|null); - - /** ListConversationModelsRequest pageSize */ - pageSize?: (number|null); + /** Properties of a SuggestionFeature. */ + interface ISuggestionFeature { - /** ListConversationModelsRequest pageToken */ - pageToken?: (string|null); + /** SuggestionFeature type */ + type?: (google.cloud.dialogflow.v2.SuggestionFeature.Type|keyof typeof google.cloud.dialogflow.v2.SuggestionFeature.Type|null); } - /** Represents a ListConversationModelsRequest. */ - class ListConversationModelsRequest implements IListConversationModelsRequest { + /** Represents a SuggestionFeature. */ + class SuggestionFeature implements ISuggestionFeature { /** - * Constructs a new ListConversationModelsRequest. + * Constructs a new SuggestionFeature. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.IListConversationModelsRequest); - - /** ListConversationModelsRequest parent. */ - public parent: string; - - /** ListConversationModelsRequest pageSize. */ - public pageSize: number; + constructor(properties?: google.cloud.dialogflow.v2.ISuggestionFeature); - /** ListConversationModelsRequest pageToken. */ - public pageToken: string; + /** SuggestionFeature type. */ + public type: (google.cloud.dialogflow.v2.SuggestionFeature.Type|keyof typeof google.cloud.dialogflow.v2.SuggestionFeature.Type); /** - * Creates a new ListConversationModelsRequest instance using the specified properties. + * Creates a new SuggestionFeature instance using the specified properties. * @param [properties] Properties to set - * @returns ListConversationModelsRequest instance + * @returns SuggestionFeature instance */ - public static create(properties?: google.cloud.dialogflow.v2.IListConversationModelsRequest): google.cloud.dialogflow.v2.ListConversationModelsRequest; + public static create(properties?: google.cloud.dialogflow.v2.ISuggestionFeature): google.cloud.dialogflow.v2.SuggestionFeature; /** - * Encodes the specified ListConversationModelsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationModelsRequest.verify|verify} messages. - * @param message ListConversationModelsRequest message or plain object to encode + * Encodes the specified SuggestionFeature message. Does not implicitly {@link google.cloud.dialogflow.v2.SuggestionFeature.verify|verify} messages. + * @param message SuggestionFeature message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.IListConversationModelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.ISuggestionFeature, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListConversationModelsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationModelsRequest.verify|verify} messages. - * @param message ListConversationModelsRequest message or plain object to encode + * Encodes the specified SuggestionFeature message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.SuggestionFeature.verify|verify} messages. + * @param message SuggestionFeature message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IListConversationModelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.ISuggestionFeature, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListConversationModelsRequest message from the specified reader or buffer. + * Decodes a SuggestionFeature message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListConversationModelsRequest + * @returns SuggestionFeature * @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.dialogflow.v2.ListConversationModelsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.SuggestionFeature; /** - * Decodes a ListConversationModelsRequest message from the specified reader or buffer, length delimited. + * Decodes a SuggestionFeature message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListConversationModelsRequest + * @returns SuggestionFeature * @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.dialogflow.v2.ListConversationModelsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.SuggestionFeature; /** - * Verifies a ListConversationModelsRequest message. + * Verifies a SuggestionFeature 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 ListConversationModelsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SuggestionFeature message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListConversationModelsRequest + * @returns SuggestionFeature */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ListConversationModelsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.SuggestionFeature; /** - * Creates a plain object from a ListConversationModelsRequest message. Also converts values to other types if specified. - * @param message ListConversationModelsRequest + * Creates a plain object from a SuggestionFeature message. Also converts values to other types if specified. + * @param message SuggestionFeature * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.ListConversationModelsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.SuggestionFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListConversationModelsRequest to JSON. + * Converts this SuggestionFeature to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListConversationModelsRequest + * Gets the default type url for SuggestionFeature * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListConversationModelsResponse. */ - interface IListConversationModelsResponse { + namespace SuggestionFeature { - /** ListConversationModelsResponse conversationModels */ - conversationModels?: (google.cloud.dialogflow.v2.IConversationModel[]|null); + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + ARTICLE_SUGGESTION = 1, + FAQ = 2, + SMART_REPLY = 3 + } + } - /** ListConversationModelsResponse nextPageToken */ - nextPageToken?: (string|null); + /** Properties of a SetSuggestionFeatureConfigRequest. */ + interface ISetSuggestionFeatureConfigRequest { + + /** SetSuggestionFeatureConfigRequest conversationProfile */ + conversationProfile?: (string|null); + + /** SetSuggestionFeatureConfigRequest participantRole */ + participantRole?: (google.cloud.dialogflow.v2.Participant.Role|keyof typeof google.cloud.dialogflow.v2.Participant.Role|null); + + /** SetSuggestionFeatureConfigRequest suggestionFeatureConfig */ + suggestionFeatureConfig?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionFeatureConfig|null); } - /** Represents a ListConversationModelsResponse. */ - class ListConversationModelsResponse implements IListConversationModelsResponse { + /** Represents a SetSuggestionFeatureConfigRequest. */ + class SetSuggestionFeatureConfigRequest implements ISetSuggestionFeatureConfigRequest { /** - * Constructs a new ListConversationModelsResponse. + * Constructs a new SetSuggestionFeatureConfigRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.IListConversationModelsResponse); + constructor(properties?: google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigRequest); - /** ListConversationModelsResponse conversationModels. */ - public conversationModels: google.cloud.dialogflow.v2.IConversationModel[]; + /** SetSuggestionFeatureConfigRequest conversationProfile. */ + public conversationProfile: string; - /** ListConversationModelsResponse nextPageToken. */ - public nextPageToken: string; + /** SetSuggestionFeatureConfigRequest participantRole. */ + public participantRole: (google.cloud.dialogflow.v2.Participant.Role|keyof typeof google.cloud.dialogflow.v2.Participant.Role); + + /** SetSuggestionFeatureConfigRequest suggestionFeatureConfig. */ + public suggestionFeatureConfig?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionFeatureConfig|null); /** - * Creates a new ListConversationModelsResponse instance using the specified properties. + * Creates a new SetSuggestionFeatureConfigRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListConversationModelsResponse instance + * @returns SetSuggestionFeatureConfigRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2.IListConversationModelsResponse): google.cloud.dialogflow.v2.ListConversationModelsResponse; + public static create(properties?: google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigRequest): google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest; /** - * Encodes the specified ListConversationModelsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationModelsResponse.verify|verify} messages. - * @param message ListConversationModelsResponse message or plain object to encode + * Encodes the specified SetSuggestionFeatureConfigRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest.verify|verify} messages. + * @param message SetSuggestionFeatureConfigRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.IListConversationModelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListConversationModelsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationModelsResponse.verify|verify} messages. - * @param message ListConversationModelsResponse message or plain object to encode + * Encodes the specified SetSuggestionFeatureConfigRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest.verify|verify} messages. + * @param message SetSuggestionFeatureConfigRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IListConversationModelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListConversationModelsResponse message from the specified reader or buffer. + * Decodes a SetSuggestionFeatureConfigRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListConversationModelsResponse + * @returns SetSuggestionFeatureConfigRequest * @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.dialogflow.v2.ListConversationModelsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest; /** - * Decodes a ListConversationModelsResponse message from the specified reader or buffer, length delimited. + * Decodes a SetSuggestionFeatureConfigRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListConversationModelsResponse + * @returns SetSuggestionFeatureConfigRequest * @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.dialogflow.v2.ListConversationModelsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest; /** - * Verifies a ListConversationModelsResponse message. + * Verifies a SetSuggestionFeatureConfigRequest 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 ListConversationModelsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SetSuggestionFeatureConfigRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListConversationModelsResponse + * @returns SetSuggestionFeatureConfigRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ListConversationModelsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest; /** - * Creates a plain object from a ListConversationModelsResponse message. Also converts values to other types if specified. - * @param message ListConversationModelsResponse + * Creates a plain object from a SetSuggestionFeatureConfigRequest message. Also converts values to other types if specified. + * @param message SetSuggestionFeatureConfigRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.ListConversationModelsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListConversationModelsResponse to JSON. + * Converts this SetSuggestionFeatureConfigRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListConversationModelsResponse + * Gets the default type url for SetSuggestionFeatureConfigRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteConversationModelRequest. */ - interface IDeleteConversationModelRequest { + /** Properties of a ClearSuggestionFeatureConfigRequest. */ + interface IClearSuggestionFeatureConfigRequest { - /** DeleteConversationModelRequest name */ - name?: (string|null); + /** ClearSuggestionFeatureConfigRequest conversationProfile */ + conversationProfile?: (string|null); + + /** ClearSuggestionFeatureConfigRequest participantRole */ + participantRole?: (google.cloud.dialogflow.v2.Participant.Role|keyof typeof google.cloud.dialogflow.v2.Participant.Role|null); + + /** ClearSuggestionFeatureConfigRequest suggestionFeatureType */ + suggestionFeatureType?: (google.cloud.dialogflow.v2.SuggestionFeature.Type|keyof typeof google.cloud.dialogflow.v2.SuggestionFeature.Type|null); } - /** Represents a DeleteConversationModelRequest. */ - class DeleteConversationModelRequest implements IDeleteConversationModelRequest { + /** Represents a ClearSuggestionFeatureConfigRequest. */ + class ClearSuggestionFeatureConfigRequest implements IClearSuggestionFeatureConfigRequest { /** - * Constructs a new DeleteConversationModelRequest. + * Constructs a new ClearSuggestionFeatureConfigRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.IDeleteConversationModelRequest); + constructor(properties?: google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigRequest); - /** DeleteConversationModelRequest name. */ - public name: string; + /** ClearSuggestionFeatureConfigRequest conversationProfile. */ + public conversationProfile: string; + + /** ClearSuggestionFeatureConfigRequest participantRole. */ + public participantRole: (google.cloud.dialogflow.v2.Participant.Role|keyof typeof google.cloud.dialogflow.v2.Participant.Role); + + /** ClearSuggestionFeatureConfigRequest suggestionFeatureType. */ + public suggestionFeatureType: (google.cloud.dialogflow.v2.SuggestionFeature.Type|keyof typeof google.cloud.dialogflow.v2.SuggestionFeature.Type); /** - * Creates a new DeleteConversationModelRequest instance using the specified properties. + * Creates a new ClearSuggestionFeatureConfigRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteConversationModelRequest instance + * @returns ClearSuggestionFeatureConfigRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2.IDeleteConversationModelRequest): google.cloud.dialogflow.v2.DeleteConversationModelRequest; + public static create(properties?: google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigRequest): google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest; /** - * Encodes the specified DeleteConversationModelRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationModelRequest.verify|verify} messages. - * @param message DeleteConversationModelRequest message or plain object to encode + * Encodes the specified ClearSuggestionFeatureConfigRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest.verify|verify} messages. + * @param message ClearSuggestionFeatureConfigRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.IDeleteConversationModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteConversationModelRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationModelRequest.verify|verify} messages. - * @param message DeleteConversationModelRequest message or plain object to encode + * Encodes the specified ClearSuggestionFeatureConfigRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest.verify|verify} messages. + * @param message ClearSuggestionFeatureConfigRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IDeleteConversationModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteConversationModelRequest message from the specified reader or buffer. + * Decodes a ClearSuggestionFeatureConfigRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteConversationModelRequest + * @returns ClearSuggestionFeatureConfigRequest * @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.dialogflow.v2.DeleteConversationModelRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest; /** - * Decodes a DeleteConversationModelRequest message from the specified reader or buffer, length delimited. + * Decodes a ClearSuggestionFeatureConfigRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteConversationModelRequest + * @returns ClearSuggestionFeatureConfigRequest * @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.dialogflow.v2.DeleteConversationModelRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest; /** - * Verifies a DeleteConversationModelRequest message. + * Verifies a ClearSuggestionFeatureConfigRequest 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 DeleteConversationModelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ClearSuggestionFeatureConfigRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteConversationModelRequest + * @returns ClearSuggestionFeatureConfigRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.DeleteConversationModelRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest; /** - * Creates a plain object from a DeleteConversationModelRequest message. Also converts values to other types if specified. - * @param message DeleteConversationModelRequest + * Creates a plain object from a ClearSuggestionFeatureConfigRequest message. Also converts values to other types if specified. + * @param message ClearSuggestionFeatureConfigRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.DeleteConversationModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteConversationModelRequest to JSON. + * Converts this ClearSuggestionFeatureConfigRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteConversationModelRequest + * Gets the default type url for ClearSuggestionFeatureConfigRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeployConversationModelRequest. */ - interface IDeployConversationModelRequest { + /** Properties of a SetSuggestionFeatureConfigOperationMetadata. */ + interface ISetSuggestionFeatureConfigOperationMetadata { - /** DeployConversationModelRequest name */ - name?: (string|null); + /** SetSuggestionFeatureConfigOperationMetadata conversationProfile */ + conversationProfile?: (string|null); + + /** SetSuggestionFeatureConfigOperationMetadata participantRole */ + participantRole?: (google.cloud.dialogflow.v2.Participant.Role|keyof typeof google.cloud.dialogflow.v2.Participant.Role|null); + + /** SetSuggestionFeatureConfigOperationMetadata suggestionFeatureType */ + suggestionFeatureType?: (google.cloud.dialogflow.v2.SuggestionFeature.Type|keyof typeof google.cloud.dialogflow.v2.SuggestionFeature.Type|null); + + /** SetSuggestionFeatureConfigOperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); } - /** Represents a DeployConversationModelRequest. */ - class DeployConversationModelRequest implements IDeployConversationModelRequest { + /** Represents a SetSuggestionFeatureConfigOperationMetadata. */ + class SetSuggestionFeatureConfigOperationMetadata implements ISetSuggestionFeatureConfigOperationMetadata { /** - * Constructs a new DeployConversationModelRequest. + * Constructs a new SetSuggestionFeatureConfigOperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.IDeployConversationModelRequest); + constructor(properties?: google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigOperationMetadata); - /** DeployConversationModelRequest name. */ - public name: string; + /** SetSuggestionFeatureConfigOperationMetadata conversationProfile. */ + public conversationProfile: string; + + /** SetSuggestionFeatureConfigOperationMetadata participantRole. */ + public participantRole: (google.cloud.dialogflow.v2.Participant.Role|keyof typeof google.cloud.dialogflow.v2.Participant.Role); + + /** SetSuggestionFeatureConfigOperationMetadata suggestionFeatureType. */ + public suggestionFeatureType: (google.cloud.dialogflow.v2.SuggestionFeature.Type|keyof typeof google.cloud.dialogflow.v2.SuggestionFeature.Type); + + /** SetSuggestionFeatureConfigOperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new DeployConversationModelRequest instance using the specified properties. + * Creates a new SetSuggestionFeatureConfigOperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns DeployConversationModelRequest instance + * @returns SetSuggestionFeatureConfigOperationMetadata instance */ - public static create(properties?: google.cloud.dialogflow.v2.IDeployConversationModelRequest): google.cloud.dialogflow.v2.DeployConversationModelRequest; + public static create(properties?: google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigOperationMetadata): google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata; /** - * Encodes the specified DeployConversationModelRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.DeployConversationModelRequest.verify|verify} messages. - * @param message DeployConversationModelRequest message or plain object to encode + * Encodes the specified SetSuggestionFeatureConfigOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata.verify|verify} messages. + * @param message SetSuggestionFeatureConfigOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.IDeployConversationModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeployConversationModelRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.DeployConversationModelRequest.verify|verify} messages. - * @param message DeployConversationModelRequest message or plain object to encode + * Encodes the specified SetSuggestionFeatureConfigOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata.verify|verify} messages. + * @param message SetSuggestionFeatureConfigOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IDeployConversationModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeployConversationModelRequest message from the specified reader or buffer. + * Decodes a SetSuggestionFeatureConfigOperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeployConversationModelRequest + * @returns SetSuggestionFeatureConfigOperationMetadata * @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.dialogflow.v2.DeployConversationModelRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata; /** - * Decodes a DeployConversationModelRequest message from the specified reader or buffer, length delimited. + * Decodes a SetSuggestionFeatureConfigOperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeployConversationModelRequest + * @returns SetSuggestionFeatureConfigOperationMetadata * @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.dialogflow.v2.DeployConversationModelRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata; /** - * Verifies a DeployConversationModelRequest message. + * Verifies a SetSuggestionFeatureConfigOperationMetadata 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 DeployConversationModelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SetSuggestionFeatureConfigOperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeployConversationModelRequest + * @returns SetSuggestionFeatureConfigOperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.DeployConversationModelRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata; /** - * Creates a plain object from a DeployConversationModelRequest message. Also converts values to other types if specified. - * @param message DeployConversationModelRequest + * Creates a plain object from a SetSuggestionFeatureConfigOperationMetadata message. Also converts values to other types if specified. + * @param message SetSuggestionFeatureConfigOperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.DeployConversationModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeployConversationModelRequest to JSON. + * Converts this SetSuggestionFeatureConfigOperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeployConversationModelRequest + * Gets the default type url for SetSuggestionFeatureConfigOperationMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UndeployConversationModelRequest. */ - interface IUndeployConversationModelRequest { + /** Properties of a ClearSuggestionFeatureConfigOperationMetadata. */ + interface IClearSuggestionFeatureConfigOperationMetadata { - /** UndeployConversationModelRequest name */ - name?: (string|null); + /** ClearSuggestionFeatureConfigOperationMetadata conversationProfile */ + conversationProfile?: (string|null); + + /** ClearSuggestionFeatureConfigOperationMetadata participantRole */ + participantRole?: (google.cloud.dialogflow.v2.Participant.Role|keyof typeof google.cloud.dialogflow.v2.Participant.Role|null); + + /** ClearSuggestionFeatureConfigOperationMetadata suggestionFeatureType */ + suggestionFeatureType?: (google.cloud.dialogflow.v2.SuggestionFeature.Type|keyof typeof google.cloud.dialogflow.v2.SuggestionFeature.Type|null); + + /** ClearSuggestionFeatureConfigOperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); } - /** Represents an UndeployConversationModelRequest. */ - class UndeployConversationModelRequest implements IUndeployConversationModelRequest { + /** Represents a ClearSuggestionFeatureConfigOperationMetadata. */ + class ClearSuggestionFeatureConfigOperationMetadata implements IClearSuggestionFeatureConfigOperationMetadata { /** - * Constructs a new UndeployConversationModelRequest. + * Constructs a new ClearSuggestionFeatureConfigOperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.IUndeployConversationModelRequest); + constructor(properties?: google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigOperationMetadata); - /** UndeployConversationModelRequest name. */ - public name: string; + /** ClearSuggestionFeatureConfigOperationMetadata conversationProfile. */ + public conversationProfile: string; + + /** ClearSuggestionFeatureConfigOperationMetadata participantRole. */ + public participantRole: (google.cloud.dialogflow.v2.Participant.Role|keyof typeof google.cloud.dialogflow.v2.Participant.Role); + + /** ClearSuggestionFeatureConfigOperationMetadata suggestionFeatureType. */ + public suggestionFeatureType: (google.cloud.dialogflow.v2.SuggestionFeature.Type|keyof typeof google.cloud.dialogflow.v2.SuggestionFeature.Type); + + /** ClearSuggestionFeatureConfigOperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new UndeployConversationModelRequest instance using the specified properties. + * Creates a new ClearSuggestionFeatureConfigOperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns UndeployConversationModelRequest instance + * @returns ClearSuggestionFeatureConfigOperationMetadata instance */ - public static create(properties?: google.cloud.dialogflow.v2.IUndeployConversationModelRequest): google.cloud.dialogflow.v2.UndeployConversationModelRequest; + public static create(properties?: google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigOperationMetadata): google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata; /** - * Encodes the specified UndeployConversationModelRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.UndeployConversationModelRequest.verify|verify} messages. - * @param message UndeployConversationModelRequest message or plain object to encode + * Encodes the specified ClearSuggestionFeatureConfigOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata.verify|verify} messages. + * @param message ClearSuggestionFeatureConfigOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.IUndeployConversationModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UndeployConversationModelRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.UndeployConversationModelRequest.verify|verify} messages. - * @param message UndeployConversationModelRequest message or plain object to encode + * Encodes the specified ClearSuggestionFeatureConfigOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata.verify|verify} messages. + * @param message ClearSuggestionFeatureConfigOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IUndeployConversationModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UndeployConversationModelRequest message from the specified reader or buffer. + * Decodes a ClearSuggestionFeatureConfigOperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UndeployConversationModelRequest + * @returns ClearSuggestionFeatureConfigOperationMetadata * @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.dialogflow.v2.UndeployConversationModelRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata; /** - * Decodes an UndeployConversationModelRequest message from the specified reader or buffer, length delimited. + * Decodes a ClearSuggestionFeatureConfigOperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UndeployConversationModelRequest + * @returns ClearSuggestionFeatureConfigOperationMetadata * @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.dialogflow.v2.UndeployConversationModelRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata; /** - * Verifies an UndeployConversationModelRequest message. + * Verifies a ClearSuggestionFeatureConfigOperationMetadata 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 UndeployConversationModelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ClearSuggestionFeatureConfigOperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UndeployConversationModelRequest + * @returns ClearSuggestionFeatureConfigOperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.UndeployConversationModelRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata; /** - * Creates a plain object from an UndeployConversationModelRequest message. Also converts values to other types if specified. - * @param message UndeployConversationModelRequest + * Creates a plain object from a ClearSuggestionFeatureConfigOperationMetadata message. Also converts values to other types if specified. + * @param message ClearSuggestionFeatureConfigOperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.UndeployConversationModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UndeployConversationModelRequest to JSON. + * Converts this ClearSuggestionFeatureConfigOperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UndeployConversationModelRequest + * Gets the default type url for ClearSuggestionFeatureConfigOperationMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetConversationModelEvaluationRequest. */ - interface IGetConversationModelEvaluationRequest { + /** Represents a ConversationDatasets */ + class ConversationDatasets extends $protobuf.rpc.Service { - /** GetConversationModelEvaluationRequest name */ - name?: (string|null); - } + /** + * Constructs a new ConversationDatasets 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); - /** Represents a GetConversationModelEvaluationRequest. */ - class GetConversationModelEvaluationRequest implements IGetConversationModelEvaluationRequest { + /** + * Creates new ConversationDatasets 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): ConversationDatasets; /** - * Constructs a new GetConversationModelEvaluationRequest. - * @param [properties] Properties to set + * Calls CreateConversationDataset. + * @param request CreateConversationDatasetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - constructor(properties?: google.cloud.dialogflow.v2.IGetConversationModelEvaluationRequest); + public createConversationDataset(request: google.cloud.dialogflow.v2.ICreateConversationDatasetRequest, callback: google.cloud.dialogflow.v2.ConversationDatasets.CreateConversationDatasetCallback): void; - /** GetConversationModelEvaluationRequest name. */ - public name: string; + /** + * Calls CreateConversationDataset. + * @param request CreateConversationDatasetRequest message or plain object + * @returns Promise + */ + public createConversationDataset(request: google.cloud.dialogflow.v2.ICreateConversationDatasetRequest): Promise; /** - * Creates a new GetConversationModelEvaluationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetConversationModelEvaluationRequest instance + * Calls GetConversationDataset. + * @param request GetConversationDatasetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ConversationDataset */ - public static create(properties?: google.cloud.dialogflow.v2.IGetConversationModelEvaluationRequest): google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest; + public getConversationDataset(request: google.cloud.dialogflow.v2.IGetConversationDatasetRequest, callback: google.cloud.dialogflow.v2.ConversationDatasets.GetConversationDatasetCallback): void; /** - * Encodes the specified GetConversationModelEvaluationRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest.verify|verify} messages. - * @param message GetConversationModelEvaluationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetConversationDataset. + * @param request GetConversationDatasetRequest message or plain object + * @returns Promise */ - public static encode(message: google.cloud.dialogflow.v2.IGetConversationModelEvaluationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public getConversationDataset(request: google.cloud.dialogflow.v2.IGetConversationDatasetRequest): Promise; /** - * Encodes the specified GetConversationModelEvaluationRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest.verify|verify} messages. - * @param message GetConversationModelEvaluationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListConversationDatasets. + * @param request ListConversationDatasetsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListConversationDatasetsResponse */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IGetConversationModelEvaluationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public listConversationDatasets(request: google.cloud.dialogflow.v2.IListConversationDatasetsRequest, callback: google.cloud.dialogflow.v2.ConversationDatasets.ListConversationDatasetsCallback): void; /** - * Decodes a GetConversationModelEvaluationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetConversationModelEvaluationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListConversationDatasets. + * @param request ListConversationDatasetsRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest; + public listConversationDatasets(request: google.cloud.dialogflow.v2.IListConversationDatasetsRequest): Promise; /** - * Decodes a GetConversationModelEvaluationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetConversationModelEvaluationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteConversationDataset. + * @param request DeleteConversationDatasetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest; + public deleteConversationDataset(request: google.cloud.dialogflow.v2.IDeleteConversationDatasetRequest, callback: google.cloud.dialogflow.v2.ConversationDatasets.DeleteConversationDatasetCallback): void; /** - * Verifies a GetConversationModelEvaluationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls DeleteConversationDataset. + * @param request DeleteConversationDatasetRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public deleteConversationDataset(request: google.cloud.dialogflow.v2.IDeleteConversationDatasetRequest): Promise; /** - * Creates a GetConversationModelEvaluationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetConversationModelEvaluationRequest + * Calls ImportConversationData. + * @param request ImportConversationDataRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest; + public importConversationData(request: google.cloud.dialogflow.v2.IImportConversationDataRequest, callback: google.cloud.dialogflow.v2.ConversationDatasets.ImportConversationDataCallback): void; /** - * Creates a plain object from a GetConversationModelEvaluationRequest message. Also converts values to other types if specified. - * @param message GetConversationModelEvaluationRequest - * @param [options] Conversion options - * @returns Plain object + * Calls ImportConversationData. + * @param request ImportConversationDataRequest message or plain object + * @returns Promise */ - public static toObject(message: google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public importConversationData(request: google.cloud.dialogflow.v2.IImportConversationDataRequest): Promise; + } + + namespace ConversationDatasets { /** - * Converts this GetConversationModelEvaluationRequest to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationDatasets|createConversationDataset}. + * @param error Error, if any + * @param [response] Operation */ - public toJSON(): { [k: string]: any }; + type CreateConversationDatasetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Gets the default type url for GetConversationModelEvaluationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationDatasets|getConversationDataset}. + * @param error Error, if any + * @param [response] ConversationDataset */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + type GetConversationDatasetCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2.ConversationDataset) => void; - /** Properties of a ListConversationModelEvaluationsRequest. */ - interface IListConversationModelEvaluationsRequest { + /** + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationDatasets|listConversationDatasets}. + * @param error Error, if any + * @param [response] ListConversationDatasetsResponse + */ + type ListConversationDatasetsCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2.ListConversationDatasetsResponse) => void; - /** ListConversationModelEvaluationsRequest parent */ - parent?: (string|null); + /** + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationDatasets|deleteConversationDataset}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteConversationDatasetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** ListConversationModelEvaluationsRequest pageSize */ - pageSize?: (number|null); + /** + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationDatasets|importConversationData}. + * @param error Error, if any + * @param [response] Operation + */ + type ImportConversationDataCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } - /** ListConversationModelEvaluationsRequest pageToken */ - pageToken?: (string|null); + /** Properties of a ConversationInfo. */ + interface IConversationInfo { + + /** ConversationInfo languageCode */ + languageCode?: (string|null); } - /** Represents a ListConversationModelEvaluationsRequest. */ - class ListConversationModelEvaluationsRequest implements IListConversationModelEvaluationsRequest { + /** Represents a ConversationInfo. */ + class ConversationInfo implements IConversationInfo { /** - * Constructs a new ListConversationModelEvaluationsRequest. + * Constructs a new ConversationInfo. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.IListConversationModelEvaluationsRequest); - - /** ListConversationModelEvaluationsRequest parent. */ - public parent: string; - - /** ListConversationModelEvaluationsRequest pageSize. */ - public pageSize: number; + constructor(properties?: google.cloud.dialogflow.v2.IConversationInfo); - /** ListConversationModelEvaluationsRequest pageToken. */ - public pageToken: string; + /** ConversationInfo languageCode. */ + public languageCode: string; /** - * Creates a new ListConversationModelEvaluationsRequest instance using the specified properties. + * Creates a new ConversationInfo instance using the specified properties. * @param [properties] Properties to set - * @returns ListConversationModelEvaluationsRequest instance + * @returns ConversationInfo instance */ - public static create(properties?: google.cloud.dialogflow.v2.IListConversationModelEvaluationsRequest): google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest; + public static create(properties?: google.cloud.dialogflow.v2.IConversationInfo): google.cloud.dialogflow.v2.ConversationInfo; /** - * Encodes the specified ListConversationModelEvaluationsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest.verify|verify} messages. - * @param message ListConversationModelEvaluationsRequest message or plain object to encode + * Encodes the specified ConversationInfo message. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationInfo.verify|verify} messages. + * @param message ConversationInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.IListConversationModelEvaluationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.IConversationInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListConversationModelEvaluationsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest.verify|verify} messages. - * @param message ListConversationModelEvaluationsRequest message or plain object to encode + * Encodes the specified ConversationInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationInfo.verify|verify} messages. + * @param message ConversationInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IListConversationModelEvaluationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.IConversationInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListConversationModelEvaluationsRequest message from the specified reader or buffer. + * Decodes a ConversationInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListConversationModelEvaluationsRequest + * @returns ConversationInfo * @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.dialogflow.v2.ListConversationModelEvaluationsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.ConversationInfo; /** - * Decodes a ListConversationModelEvaluationsRequest message from the specified reader or buffer, length delimited. + * Decodes a ConversationInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListConversationModelEvaluationsRequest + * @returns ConversationInfo * @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.dialogflow.v2.ListConversationModelEvaluationsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.ConversationInfo; /** - * Verifies a ListConversationModelEvaluationsRequest message. + * Verifies a ConversationInfo 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 ListConversationModelEvaluationsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ConversationInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListConversationModelEvaluationsRequest + * @returns ConversationInfo */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ConversationInfo; /** - * Creates a plain object from a ListConversationModelEvaluationsRequest message. Also converts values to other types if specified. - * @param message ListConversationModelEvaluationsRequest + * Creates a plain object from a ConversationInfo message. Also converts values to other types if specified. + * @param message ConversationInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.ConversationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListConversationModelEvaluationsRequest to JSON. + * Converts this ConversationInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListConversationModelEvaluationsRequest + * Gets the default type url for ConversationInfo * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListConversationModelEvaluationsResponse. */ - interface IListConversationModelEvaluationsResponse { - - /** ListConversationModelEvaluationsResponse conversationModelEvaluations */ - conversationModelEvaluations?: (google.cloud.dialogflow.v2.IConversationModelEvaluation[]|null); + /** Properties of an InputConfig. */ + interface IInputConfig { - /** ListConversationModelEvaluationsResponse nextPageToken */ - nextPageToken?: (string|null); + /** InputConfig gcsSource */ + gcsSource?: (google.cloud.dialogflow.v2.IGcsSources|null); } - /** Represents a ListConversationModelEvaluationsResponse. */ - class ListConversationModelEvaluationsResponse implements IListConversationModelEvaluationsResponse { + /** Represents an InputConfig. */ + class InputConfig implements IInputConfig { /** - * Constructs a new ListConversationModelEvaluationsResponse. + * Constructs a new InputConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.IListConversationModelEvaluationsResponse); + constructor(properties?: google.cloud.dialogflow.v2.IInputConfig); - /** ListConversationModelEvaluationsResponse conversationModelEvaluations. */ - public conversationModelEvaluations: google.cloud.dialogflow.v2.IConversationModelEvaluation[]; + /** InputConfig gcsSource. */ + public gcsSource?: (google.cloud.dialogflow.v2.IGcsSources|null); - /** ListConversationModelEvaluationsResponse nextPageToken. */ - public nextPageToken: string; + /** InputConfig source. */ + public source?: "gcsSource"; /** - * Creates a new ListConversationModelEvaluationsResponse instance using the specified properties. + * Creates a new InputConfig instance using the specified properties. * @param [properties] Properties to set - * @returns ListConversationModelEvaluationsResponse instance + * @returns InputConfig instance */ - public static create(properties?: google.cloud.dialogflow.v2.IListConversationModelEvaluationsResponse): google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse; + public static create(properties?: google.cloud.dialogflow.v2.IInputConfig): google.cloud.dialogflow.v2.InputConfig; /** - * Encodes the specified ListConversationModelEvaluationsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse.verify|verify} messages. - * @param message ListConversationModelEvaluationsResponse message or plain object to encode + * Encodes the specified InputConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.InputConfig.verify|verify} messages. + * @param message InputConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.IListConversationModelEvaluationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.IInputConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListConversationModelEvaluationsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse.verify|verify} messages. - * @param message ListConversationModelEvaluationsResponse message or plain object to encode + * Encodes the specified InputConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.InputConfig.verify|verify} messages. + * @param message InputConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IListConversationModelEvaluationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.IInputConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListConversationModelEvaluationsResponse message from the specified reader or buffer. + * Decodes an InputConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListConversationModelEvaluationsResponse + * @returns InputConfig * @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.dialogflow.v2.ListConversationModelEvaluationsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.InputConfig; /** - * Decodes a ListConversationModelEvaluationsResponse message from the specified reader or buffer, length delimited. + * Decodes an InputConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListConversationModelEvaluationsResponse + * @returns InputConfig * @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.dialogflow.v2.ListConversationModelEvaluationsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.InputConfig; /** - * Verifies a ListConversationModelEvaluationsResponse message. + * Verifies an InputConfig 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 ListConversationModelEvaluationsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an InputConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListConversationModelEvaluationsResponse + * @returns InputConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.InputConfig; /** - * Creates a plain object from a ListConversationModelEvaluationsResponse message. Also converts values to other types if specified. - * @param message ListConversationModelEvaluationsResponse + * Creates a plain object from an InputConfig message. Also converts values to other types if specified. + * @param message InputConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.InputConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListConversationModelEvaluationsResponse to JSON. + * Converts this InputConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListConversationModelEvaluationsResponse + * Gets the default type url for InputConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateConversationModelEvaluationRequest. */ - interface ICreateConversationModelEvaluationRequest { + /** Properties of a ConversationDataset. */ + interface IConversationDataset { - /** CreateConversationModelEvaluationRequest parent */ - parent?: (string|null); + /** ConversationDataset name */ + name?: (string|null); - /** CreateConversationModelEvaluationRequest conversationModelEvaluation */ - conversationModelEvaluation?: (google.cloud.dialogflow.v2.IConversationModelEvaluation|null); + /** ConversationDataset displayName */ + displayName?: (string|null); + + /** ConversationDataset description */ + description?: (string|null); + + /** ConversationDataset createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** ConversationDataset inputConfig */ + inputConfig?: (google.cloud.dialogflow.v2.IInputConfig|null); + + /** ConversationDataset conversationInfo */ + conversationInfo?: (google.cloud.dialogflow.v2.IConversationInfo|null); + + /** ConversationDataset conversationCount */ + conversationCount?: (number|Long|string|null); } - /** Represents a CreateConversationModelEvaluationRequest. */ - class CreateConversationModelEvaluationRequest implements ICreateConversationModelEvaluationRequest { + /** Represents a ConversationDataset. */ + class ConversationDataset implements IConversationDataset { /** - * Constructs a new CreateConversationModelEvaluationRequest. + * Constructs a new ConversationDataset. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.ICreateConversationModelEvaluationRequest); + constructor(properties?: google.cloud.dialogflow.v2.IConversationDataset); - /** CreateConversationModelEvaluationRequest parent. */ - public parent: string; + /** ConversationDataset name. */ + public name: string; - /** CreateConversationModelEvaluationRequest conversationModelEvaluation. */ - public conversationModelEvaluation?: (google.cloud.dialogflow.v2.IConversationModelEvaluation|null); + /** ConversationDataset displayName. */ + public displayName: string; + + /** ConversationDataset description. */ + public description: string; + + /** ConversationDataset createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** ConversationDataset inputConfig. */ + public inputConfig?: (google.cloud.dialogflow.v2.IInputConfig|null); + + /** ConversationDataset conversationInfo. */ + public conversationInfo?: (google.cloud.dialogflow.v2.IConversationInfo|null); + + /** ConversationDataset conversationCount. */ + public conversationCount: (number|Long|string); /** - * Creates a new CreateConversationModelEvaluationRequest instance using the specified properties. + * Creates a new ConversationDataset instance using the specified properties. * @param [properties] Properties to set - * @returns CreateConversationModelEvaluationRequest instance + * @returns ConversationDataset instance */ - public static create(properties?: google.cloud.dialogflow.v2.ICreateConversationModelEvaluationRequest): google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest; + public static create(properties?: google.cloud.dialogflow.v2.IConversationDataset): google.cloud.dialogflow.v2.ConversationDataset; /** - * Encodes the specified CreateConversationModelEvaluationRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest.verify|verify} messages. - * @param message CreateConversationModelEvaluationRequest message or plain object to encode + * Encodes the specified ConversationDataset message. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationDataset.verify|verify} messages. + * @param message ConversationDataset message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.ICreateConversationModelEvaluationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.IConversationDataset, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateConversationModelEvaluationRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest.verify|verify} messages. - * @param message CreateConversationModelEvaluationRequest message or plain object to encode + * Encodes the specified ConversationDataset message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationDataset.verify|verify} messages. + * @param message ConversationDataset message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.ICreateConversationModelEvaluationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.IConversationDataset, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateConversationModelEvaluationRequest message from the specified reader or buffer. + * Decodes a ConversationDataset message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateConversationModelEvaluationRequest + * @returns ConversationDataset * @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.dialogflow.v2.CreateConversationModelEvaluationRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.ConversationDataset; /** - * Decodes a CreateConversationModelEvaluationRequest message from the specified reader or buffer, length delimited. + * Decodes a ConversationDataset message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateConversationModelEvaluationRequest + * @returns ConversationDataset * @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.dialogflow.v2.CreateConversationModelEvaluationRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.ConversationDataset; /** - * Verifies a CreateConversationModelEvaluationRequest message. + * Verifies a ConversationDataset 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 CreateConversationModelEvaluationRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ConversationDataset message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateConversationModelEvaluationRequest + * @returns ConversationDataset */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ConversationDataset; /** - * Creates a plain object from a CreateConversationModelEvaluationRequest message. Also converts values to other types if specified. - * @param message CreateConversationModelEvaluationRequest + * Creates a plain object from a ConversationDataset message. Also converts values to other types if specified. + * @param message ConversationDataset * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.ConversationDataset, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateConversationModelEvaluationRequest to JSON. + * Converts this ConversationDataset to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateConversationModelEvaluationRequest + * Gets the default type url for ConversationDataset * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateConversationModelOperationMetadata. */ - interface ICreateConversationModelOperationMetadata { - - /** CreateConversationModelOperationMetadata conversationModel */ - conversationModel?: (string|null); + /** Properties of a CreateConversationDatasetRequest. */ + interface ICreateConversationDatasetRequest { - /** CreateConversationModelOperationMetadata state */ - state?: (google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.State|keyof typeof google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.State|null); + /** CreateConversationDatasetRequest parent */ + parent?: (string|null); - /** CreateConversationModelOperationMetadata createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** CreateConversationDatasetRequest conversationDataset */ + conversationDataset?: (google.cloud.dialogflow.v2.IConversationDataset|null); } - /** Represents a CreateConversationModelOperationMetadata. */ - class CreateConversationModelOperationMetadata implements ICreateConversationModelOperationMetadata { + /** Represents a CreateConversationDatasetRequest. */ + class CreateConversationDatasetRequest implements ICreateConversationDatasetRequest { /** - * Constructs a new CreateConversationModelOperationMetadata. + * Constructs a new CreateConversationDatasetRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.ICreateConversationModelOperationMetadata); - - /** CreateConversationModelOperationMetadata conversationModel. */ - public conversationModel: string; + constructor(properties?: google.cloud.dialogflow.v2.ICreateConversationDatasetRequest); - /** CreateConversationModelOperationMetadata state. */ - public state: (google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.State|keyof typeof google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.State); + /** CreateConversationDatasetRequest parent. */ + public parent: string; - /** CreateConversationModelOperationMetadata createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** CreateConversationDatasetRequest conversationDataset. */ + public conversationDataset?: (google.cloud.dialogflow.v2.IConversationDataset|null); /** - * Creates a new CreateConversationModelOperationMetadata instance using the specified properties. + * Creates a new CreateConversationDatasetRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateConversationModelOperationMetadata instance + * @returns CreateConversationDatasetRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2.ICreateConversationModelOperationMetadata): google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata; + public static create(properties?: google.cloud.dialogflow.v2.ICreateConversationDatasetRequest): google.cloud.dialogflow.v2.CreateConversationDatasetRequest; /** - * Encodes the specified CreateConversationModelOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.verify|verify} messages. - * @param message CreateConversationModelOperationMetadata message or plain object to encode + * Encodes the specified CreateConversationDatasetRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationDatasetRequest.verify|verify} messages. + * @param message CreateConversationDatasetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.ICreateConversationModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.ICreateConversationDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateConversationModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.verify|verify} messages. - * @param message CreateConversationModelOperationMetadata message or plain object to encode + * Encodes the specified CreateConversationDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationDatasetRequest.verify|verify} messages. + * @param message CreateConversationDatasetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.ICreateConversationModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.ICreateConversationDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateConversationModelOperationMetadata message from the specified reader or buffer. + * Decodes a CreateConversationDatasetRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateConversationModelOperationMetadata + * @returns CreateConversationDatasetRequest * @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.dialogflow.v2.CreateConversationModelOperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.CreateConversationDatasetRequest; /** - * Decodes a CreateConversationModelOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a CreateConversationDatasetRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateConversationModelOperationMetadata + * @returns CreateConversationDatasetRequest * @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.dialogflow.v2.CreateConversationModelOperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.CreateConversationDatasetRequest; /** - * Verifies a CreateConversationModelOperationMetadata message. + * Verifies a CreateConversationDatasetRequest 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 CreateConversationModelOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a CreateConversationDatasetRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateConversationModelOperationMetadata + * @returns CreateConversationDatasetRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.CreateConversationDatasetRequest; /** - * Creates a plain object from a CreateConversationModelOperationMetadata message. Also converts values to other types if specified. - * @param message CreateConversationModelOperationMetadata + * Creates a plain object from a CreateConversationDatasetRequest message. Also converts values to other types if specified. + * @param message CreateConversationDatasetRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.CreateConversationDatasetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateConversationModelOperationMetadata to JSON. + * Converts this CreateConversationDatasetRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateConversationModelOperationMetadata + * Gets the default type url for CreateConversationDatasetRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace CreateConversationModelOperationMetadata { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - PENDING = 1, - SUCCEEDED = 2, - FAILED = 3, - CANCELLED = 4, - CANCELLING = 5, - TRAINING = 6 - } - } - - /** Properties of a DeployConversationModelOperationMetadata. */ - interface IDeployConversationModelOperationMetadata { - - /** DeployConversationModelOperationMetadata conversationModel */ - conversationModel?: (string|null); + /** Properties of a GetConversationDatasetRequest. */ + interface IGetConversationDatasetRequest { - /** DeployConversationModelOperationMetadata createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** GetConversationDatasetRequest name */ + name?: (string|null); } - /** Represents a DeployConversationModelOperationMetadata. */ - class DeployConversationModelOperationMetadata implements IDeployConversationModelOperationMetadata { + /** Represents a GetConversationDatasetRequest. */ + class GetConversationDatasetRequest implements IGetConversationDatasetRequest { /** - * Constructs a new DeployConversationModelOperationMetadata. + * Constructs a new GetConversationDatasetRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.IDeployConversationModelOperationMetadata); - - /** DeployConversationModelOperationMetadata conversationModel. */ - public conversationModel: string; + constructor(properties?: google.cloud.dialogflow.v2.IGetConversationDatasetRequest); - /** DeployConversationModelOperationMetadata createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** GetConversationDatasetRequest name. */ + public name: string; /** - * Creates a new DeployConversationModelOperationMetadata instance using the specified properties. + * Creates a new GetConversationDatasetRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeployConversationModelOperationMetadata instance + * @returns GetConversationDatasetRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2.IDeployConversationModelOperationMetadata): google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata; + public static create(properties?: google.cloud.dialogflow.v2.IGetConversationDatasetRequest): google.cloud.dialogflow.v2.GetConversationDatasetRequest; /** - * Encodes the specified DeployConversationModelOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata.verify|verify} messages. - * @param message DeployConversationModelOperationMetadata message or plain object to encode + * Encodes the specified GetConversationDatasetRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.GetConversationDatasetRequest.verify|verify} messages. + * @param message GetConversationDatasetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.IDeployConversationModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.IGetConversationDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeployConversationModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata.verify|verify} messages. - * @param message DeployConversationModelOperationMetadata message or plain object to encode + * Encodes the specified GetConversationDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.GetConversationDatasetRequest.verify|verify} messages. + * @param message GetConversationDatasetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IDeployConversationModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.IGetConversationDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeployConversationModelOperationMetadata message from the specified reader or buffer. + * Decodes a GetConversationDatasetRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeployConversationModelOperationMetadata + * @returns GetConversationDatasetRequest * @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.dialogflow.v2.DeployConversationModelOperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.GetConversationDatasetRequest; /** - * Decodes a DeployConversationModelOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a GetConversationDatasetRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeployConversationModelOperationMetadata + * @returns GetConversationDatasetRequest * @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.dialogflow.v2.DeployConversationModelOperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.GetConversationDatasetRequest; /** - * Verifies a DeployConversationModelOperationMetadata message. + * Verifies a GetConversationDatasetRequest 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 DeployConversationModelOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a GetConversationDatasetRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeployConversationModelOperationMetadata + * @returns GetConversationDatasetRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.GetConversationDatasetRequest; /** - * Creates a plain object from a DeployConversationModelOperationMetadata message. Also converts values to other types if specified. - * @param message DeployConversationModelOperationMetadata + * Creates a plain object from a GetConversationDatasetRequest message. Also converts values to other types if specified. + * @param message GetConversationDatasetRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.GetConversationDatasetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeployConversationModelOperationMetadata to JSON. + * Converts this GetConversationDatasetRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeployConversationModelOperationMetadata + * Gets the default type url for GetConversationDatasetRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UndeployConversationModelOperationMetadata. */ - interface IUndeployConversationModelOperationMetadata { + /** Properties of a ListConversationDatasetsRequest. */ + interface IListConversationDatasetsRequest { - /** UndeployConversationModelOperationMetadata conversationModel */ - conversationModel?: (string|null); + /** ListConversationDatasetsRequest parent */ + parent?: (string|null); - /** UndeployConversationModelOperationMetadata createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** ListConversationDatasetsRequest pageSize */ + pageSize?: (number|null); + + /** ListConversationDatasetsRequest pageToken */ + pageToken?: (string|null); } - /** Represents an UndeployConversationModelOperationMetadata. */ - class UndeployConversationModelOperationMetadata implements IUndeployConversationModelOperationMetadata { + /** Represents a ListConversationDatasetsRequest. */ + class ListConversationDatasetsRequest implements IListConversationDatasetsRequest { /** - * Constructs a new UndeployConversationModelOperationMetadata. + * Constructs a new ListConversationDatasetsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.IUndeployConversationModelOperationMetadata); + constructor(properties?: google.cloud.dialogflow.v2.IListConversationDatasetsRequest); - /** UndeployConversationModelOperationMetadata conversationModel. */ - public conversationModel: string; + /** ListConversationDatasetsRequest parent. */ + public parent: string; - /** UndeployConversationModelOperationMetadata createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** ListConversationDatasetsRequest pageSize. */ + public pageSize: number; + + /** ListConversationDatasetsRequest pageToken. */ + public pageToken: string; /** - * Creates a new UndeployConversationModelOperationMetadata instance using the specified properties. + * Creates a new ListConversationDatasetsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UndeployConversationModelOperationMetadata instance + * @returns ListConversationDatasetsRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2.IUndeployConversationModelOperationMetadata): google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata; + public static create(properties?: google.cloud.dialogflow.v2.IListConversationDatasetsRequest): google.cloud.dialogflow.v2.ListConversationDatasetsRequest; /** - * Encodes the specified UndeployConversationModelOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata.verify|verify} messages. - * @param message UndeployConversationModelOperationMetadata message or plain object to encode + * Encodes the specified ListConversationDatasetsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationDatasetsRequest.verify|verify} messages. + * @param message ListConversationDatasetsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.IUndeployConversationModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.IListConversationDatasetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UndeployConversationModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata.verify|verify} messages. - * @param message UndeployConversationModelOperationMetadata message or plain object to encode + * Encodes the specified ListConversationDatasetsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationDatasetsRequest.verify|verify} messages. + * @param message ListConversationDatasetsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IUndeployConversationModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.IListConversationDatasetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UndeployConversationModelOperationMetadata message from the specified reader or buffer. + * Decodes a ListConversationDatasetsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UndeployConversationModelOperationMetadata + * @returns ListConversationDatasetsRequest * @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.dialogflow.v2.UndeployConversationModelOperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.ListConversationDatasetsRequest; /** - * Decodes an UndeployConversationModelOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a ListConversationDatasetsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UndeployConversationModelOperationMetadata + * @returns ListConversationDatasetsRequest * @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.dialogflow.v2.UndeployConversationModelOperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.ListConversationDatasetsRequest; /** - * Verifies an UndeployConversationModelOperationMetadata message. + * Verifies a ListConversationDatasetsRequest 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 UndeployConversationModelOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a ListConversationDatasetsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UndeployConversationModelOperationMetadata + * @returns ListConversationDatasetsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ListConversationDatasetsRequest; /** - * Creates a plain object from an UndeployConversationModelOperationMetadata message. Also converts values to other types if specified. - * @param message UndeployConversationModelOperationMetadata + * Creates a plain object from a ListConversationDatasetsRequest message. Also converts values to other types if specified. + * @param message ListConversationDatasetsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.ListConversationDatasetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UndeployConversationModelOperationMetadata to JSON. + * Converts this ListConversationDatasetsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UndeployConversationModelOperationMetadata + * Gets the default type url for ListConversationDatasetsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteConversationModelOperationMetadata. */ - interface IDeleteConversationModelOperationMetadata { + /** Properties of a ListConversationDatasetsResponse. */ + interface IListConversationDatasetsResponse { - /** DeleteConversationModelOperationMetadata conversationModel */ - conversationModel?: (string|null); + /** ListConversationDatasetsResponse conversationDatasets */ + conversationDatasets?: (google.cloud.dialogflow.v2.IConversationDataset[]|null); - /** DeleteConversationModelOperationMetadata createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** ListConversationDatasetsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a DeleteConversationModelOperationMetadata. */ - class DeleteConversationModelOperationMetadata implements IDeleteConversationModelOperationMetadata { + /** Represents a ListConversationDatasetsResponse. */ + class ListConversationDatasetsResponse implements IListConversationDatasetsResponse { /** - * Constructs a new DeleteConversationModelOperationMetadata. + * Constructs a new ListConversationDatasetsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.IDeleteConversationModelOperationMetadata); + constructor(properties?: google.cloud.dialogflow.v2.IListConversationDatasetsResponse); - /** DeleteConversationModelOperationMetadata conversationModel. */ - public conversationModel: string; + /** ListConversationDatasetsResponse conversationDatasets. */ + public conversationDatasets: google.cloud.dialogflow.v2.IConversationDataset[]; - /** DeleteConversationModelOperationMetadata createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** ListConversationDatasetsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new DeleteConversationModelOperationMetadata instance using the specified properties. + * Creates a new ListConversationDatasetsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteConversationModelOperationMetadata instance + * @returns ListConversationDatasetsResponse instance */ - public static create(properties?: google.cloud.dialogflow.v2.IDeleteConversationModelOperationMetadata): google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata; + public static create(properties?: google.cloud.dialogflow.v2.IListConversationDatasetsResponse): google.cloud.dialogflow.v2.ListConversationDatasetsResponse; /** - * Encodes the specified DeleteConversationModelOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata.verify|verify} messages. - * @param message DeleteConversationModelOperationMetadata message or plain object to encode + * Encodes the specified ListConversationDatasetsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationDatasetsResponse.verify|verify} messages. + * @param message ListConversationDatasetsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.IDeleteConversationModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.IListConversationDatasetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteConversationModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata.verify|verify} messages. - * @param message DeleteConversationModelOperationMetadata message or plain object to encode + * Encodes the specified ListConversationDatasetsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationDatasetsResponse.verify|verify} messages. + * @param message ListConversationDatasetsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IDeleteConversationModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.IListConversationDatasetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteConversationModelOperationMetadata message from the specified reader or buffer. + * Decodes a ListConversationDatasetsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteConversationModelOperationMetadata + * @returns ListConversationDatasetsResponse * @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.dialogflow.v2.DeleteConversationModelOperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.ListConversationDatasetsResponse; /** - * Decodes a DeleteConversationModelOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a ListConversationDatasetsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteConversationModelOperationMetadata + * @returns ListConversationDatasetsResponse * @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.dialogflow.v2.DeleteConversationModelOperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.ListConversationDatasetsResponse; /** - * Verifies a DeleteConversationModelOperationMetadata message. + * Verifies a ListConversationDatasetsResponse 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 DeleteConversationModelOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a ListConversationDatasetsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteConversationModelOperationMetadata + * @returns ListConversationDatasetsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ListConversationDatasetsResponse; /** - * Creates a plain object from a DeleteConversationModelOperationMetadata message. Also converts values to other types if specified. - * @param message DeleteConversationModelOperationMetadata + * Creates a plain object from a ListConversationDatasetsResponse message. Also converts values to other types if specified. + * @param message ListConversationDatasetsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.ListConversationDatasetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteConversationModelOperationMetadata to JSON. + * Converts this ListConversationDatasetsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteConversationModelOperationMetadata + * Gets the default type url for ListConversationDatasetsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateConversationModelEvaluationOperationMetadata. */ - interface ICreateConversationModelEvaluationOperationMetadata { - - /** CreateConversationModelEvaluationOperationMetadata conversationModelEvaluation */ - conversationModelEvaluation?: (string|null); - - /** CreateConversationModelEvaluationOperationMetadata conversationModel */ - conversationModel?: (string|null); - - /** CreateConversationModelEvaluationOperationMetadata state */ - state?: (google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.State|keyof typeof google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.State|null); + /** Properties of a DeleteConversationDatasetRequest. */ + interface IDeleteConversationDatasetRequest { - /** CreateConversationModelEvaluationOperationMetadata createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** DeleteConversationDatasetRequest name */ + name?: (string|null); } - /** Represents a CreateConversationModelEvaluationOperationMetadata. */ - class CreateConversationModelEvaluationOperationMetadata implements ICreateConversationModelEvaluationOperationMetadata { + /** Represents a DeleteConversationDatasetRequest. */ + class DeleteConversationDatasetRequest implements IDeleteConversationDatasetRequest { /** - * Constructs a new CreateConversationModelEvaluationOperationMetadata. + * Constructs a new DeleteConversationDatasetRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.ICreateConversationModelEvaluationOperationMetadata); - - /** CreateConversationModelEvaluationOperationMetadata conversationModelEvaluation. */ - public conversationModelEvaluation: string; - - /** CreateConversationModelEvaluationOperationMetadata conversationModel. */ - public conversationModel: string; - - /** CreateConversationModelEvaluationOperationMetadata state. */ - public state: (google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.State|keyof typeof google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.State); + constructor(properties?: google.cloud.dialogflow.v2.IDeleteConversationDatasetRequest); - /** CreateConversationModelEvaluationOperationMetadata createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** DeleteConversationDatasetRequest name. */ + public name: string; /** - * Creates a new CreateConversationModelEvaluationOperationMetadata instance using the specified properties. + * Creates a new DeleteConversationDatasetRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateConversationModelEvaluationOperationMetadata instance + * @returns DeleteConversationDatasetRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2.ICreateConversationModelEvaluationOperationMetadata): google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata; + public static create(properties?: google.cloud.dialogflow.v2.IDeleteConversationDatasetRequest): google.cloud.dialogflow.v2.DeleteConversationDatasetRequest; /** - * Encodes the specified CreateConversationModelEvaluationOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.verify|verify} messages. - * @param message CreateConversationModelEvaluationOperationMetadata message or plain object to encode + * Encodes the specified DeleteConversationDatasetRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationDatasetRequest.verify|verify} messages. + * @param message DeleteConversationDatasetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.ICreateConversationModelEvaluationOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.IDeleteConversationDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateConversationModelEvaluationOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.verify|verify} messages. - * @param message CreateConversationModelEvaluationOperationMetadata message or plain object to encode + * Encodes the specified DeleteConversationDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationDatasetRequest.verify|verify} messages. + * @param message DeleteConversationDatasetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.ICreateConversationModelEvaluationOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.IDeleteConversationDatasetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateConversationModelEvaluationOperationMetadata message from the specified reader or buffer. + * Decodes a DeleteConversationDatasetRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateConversationModelEvaluationOperationMetadata + * @returns DeleteConversationDatasetRequest * @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.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.DeleteConversationDatasetRequest; /** - * Decodes a CreateConversationModelEvaluationOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a DeleteConversationDatasetRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateConversationModelEvaluationOperationMetadata + * @returns DeleteConversationDatasetRequest * @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.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.DeleteConversationDatasetRequest; /** - * Verifies a CreateConversationModelEvaluationOperationMetadata message. + * Verifies a DeleteConversationDatasetRequest 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 CreateConversationModelEvaluationOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteConversationDatasetRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateConversationModelEvaluationOperationMetadata + * @returns DeleteConversationDatasetRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.DeleteConversationDatasetRequest; /** - * Creates a plain object from a CreateConversationModelEvaluationOperationMetadata message. Also converts values to other types if specified. - * @param message CreateConversationModelEvaluationOperationMetadata + * Creates a plain object from a DeleteConversationDatasetRequest message. Also converts values to other types if specified. + * @param message DeleteConversationDatasetRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.DeleteConversationDatasetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateConversationModelEvaluationOperationMetadata to JSON. + * Converts this DeleteConversationDatasetRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateConversationModelEvaluationOperationMetadata + * Gets the default type url for DeleteConversationDatasetRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace CreateConversationModelEvaluationOperationMetadata { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - INITIALIZING = 1, - RUNNING = 2, - CANCELLED = 3, - SUCCEEDED = 4, - FAILED = 5 - } - } - - /** Represents a ConversationProfiles */ - class ConversationProfiles extends $protobuf.rpc.Service { - - /** - * Constructs a new ConversationProfiles 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 ConversationProfiles 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): ConversationProfiles; - - /** - * Calls ListConversationProfiles. - * @param request ListConversationProfilesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListConversationProfilesResponse - */ - public listConversationProfiles(request: google.cloud.dialogflow.v2.IListConversationProfilesRequest, callback: google.cloud.dialogflow.v2.ConversationProfiles.ListConversationProfilesCallback): void; - - /** - * Calls ListConversationProfiles. - * @param request ListConversationProfilesRequest message or plain object - * @returns Promise - */ - public listConversationProfiles(request: google.cloud.dialogflow.v2.IListConversationProfilesRequest): Promise; - - /** - * Calls GetConversationProfile. - * @param request GetConversationProfileRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ConversationProfile - */ - public getConversationProfile(request: google.cloud.dialogflow.v2.IGetConversationProfileRequest, callback: google.cloud.dialogflow.v2.ConversationProfiles.GetConversationProfileCallback): void; - - /** - * Calls GetConversationProfile. - * @param request GetConversationProfileRequest message or plain object - * @returns Promise - */ - public getConversationProfile(request: google.cloud.dialogflow.v2.IGetConversationProfileRequest): Promise; - - /** - * Calls CreateConversationProfile. - * @param request CreateConversationProfileRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ConversationProfile - */ - public createConversationProfile(request: google.cloud.dialogflow.v2.ICreateConversationProfileRequest, callback: google.cloud.dialogflow.v2.ConversationProfiles.CreateConversationProfileCallback): void; + /** Properties of an ImportConversationDataRequest. */ + interface IImportConversationDataRequest { - /** - * Calls CreateConversationProfile. - * @param request CreateConversationProfileRequest message or plain object - * @returns Promise - */ - public createConversationProfile(request: google.cloud.dialogflow.v2.ICreateConversationProfileRequest): Promise; + /** ImportConversationDataRequest name */ + name?: (string|null); - /** - * Calls UpdateConversationProfile. - * @param request UpdateConversationProfileRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ConversationProfile - */ - public updateConversationProfile(request: google.cloud.dialogflow.v2.IUpdateConversationProfileRequest, callback: google.cloud.dialogflow.v2.ConversationProfiles.UpdateConversationProfileCallback): void; + /** ImportConversationDataRequest inputConfig */ + inputConfig?: (google.cloud.dialogflow.v2.IInputConfig|null); + } - /** - * Calls UpdateConversationProfile. - * @param request UpdateConversationProfileRequest message or plain object - * @returns Promise - */ - public updateConversationProfile(request: google.cloud.dialogflow.v2.IUpdateConversationProfileRequest): Promise; + /** Represents an ImportConversationDataRequest. */ + class ImportConversationDataRequest implements IImportConversationDataRequest { /** - * Calls DeleteConversationProfile. - * @param request DeleteConversationProfileRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Constructs a new ImportConversationDataRequest. + * @param [properties] Properties to set */ - public deleteConversationProfile(request: google.cloud.dialogflow.v2.IDeleteConversationProfileRequest, callback: google.cloud.dialogflow.v2.ConversationProfiles.DeleteConversationProfileCallback): void; + constructor(properties?: google.cloud.dialogflow.v2.IImportConversationDataRequest); - /** - * Calls DeleteConversationProfile. - * @param request DeleteConversationProfileRequest message or plain object - * @returns Promise - */ - public deleteConversationProfile(request: google.cloud.dialogflow.v2.IDeleteConversationProfileRequest): Promise; + /** ImportConversationDataRequest name. */ + public name: string; - /** - * Calls SetSuggestionFeatureConfig. - * @param request SetSuggestionFeatureConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public setSuggestionFeatureConfig(request: google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigRequest, callback: google.cloud.dialogflow.v2.ConversationProfiles.SetSuggestionFeatureConfigCallback): void; + /** ImportConversationDataRequest inputConfig. */ + public inputConfig?: (google.cloud.dialogflow.v2.IInputConfig|null); /** - * Calls SetSuggestionFeatureConfig. - * @param request SetSuggestionFeatureConfigRequest message or plain object - * @returns Promise + * Creates a new ImportConversationDataRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ImportConversationDataRequest instance */ - public setSuggestionFeatureConfig(request: google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigRequest): Promise; + public static create(properties?: google.cloud.dialogflow.v2.IImportConversationDataRequest): google.cloud.dialogflow.v2.ImportConversationDataRequest; /** - * Calls ClearSuggestionFeatureConfig. - * @param request ClearSuggestionFeatureConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Encodes the specified ImportConversationDataRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.ImportConversationDataRequest.verify|verify} messages. + * @param message ImportConversationDataRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public clearSuggestionFeatureConfig(request: google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigRequest, callback: google.cloud.dialogflow.v2.ConversationProfiles.ClearSuggestionFeatureConfigCallback): void; + public static encode(message: google.cloud.dialogflow.v2.IImportConversationDataRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ClearSuggestionFeatureConfig. - * @param request ClearSuggestionFeatureConfigRequest message or plain object - * @returns Promise + * Encodes the specified ImportConversationDataRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ImportConversationDataRequest.verify|verify} messages. + * @param message ImportConversationDataRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public clearSuggestionFeatureConfig(request: google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigRequest): Promise; - } - - namespace ConversationProfiles { + public static encodeDelimited(message: google.cloud.dialogflow.v2.IImportConversationDataRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationProfiles|listConversationProfiles}. - * @param error Error, if any - * @param [response] ListConversationProfilesResponse + * Decodes an ImportConversationDataRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImportConversationDataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type ListConversationProfilesCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2.ListConversationProfilesResponse) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.ImportConversationDataRequest; /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationProfiles|getConversationProfile}. - * @param error Error, if any - * @param [response] ConversationProfile + * Decodes an ImportConversationDataRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImportConversationDataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type GetConversationProfileCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2.ConversationProfile) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.ImportConversationDataRequest; /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationProfiles|createConversationProfile}. - * @param error Error, if any - * @param [response] ConversationProfile + * Verifies an ImportConversationDataRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type CreateConversationProfileCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2.ConversationProfile) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationProfiles|updateConversationProfile}. - * @param error Error, if any - * @param [response] ConversationProfile + * Creates an ImportConversationDataRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportConversationDataRequest */ - type UpdateConversationProfileCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2.ConversationProfile) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ImportConversationDataRequest; /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationProfiles|deleteConversationProfile}. - * @param error Error, if any - * @param [response] Empty + * Creates a plain object from an ImportConversationDataRequest message. Also converts values to other types if specified. + * @param message ImportConversationDataRequest + * @param [options] Conversion options + * @returns Plain object */ - type DeleteConversationProfileCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + public static toObject(message: google.cloud.dialogflow.v2.ImportConversationDataRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationProfiles|setSuggestionFeatureConfig}. - * @param error Error, if any - * @param [response] Operation + * Converts this ImportConversationDataRequest to JSON. + * @returns JSON object */ - type SetSuggestionFeatureConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public toJSON(): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationProfiles|clearSuggestionFeatureConfig}. - * @param error Error, if any - * @param [response] Operation + * Gets the default type url for ImportConversationDataRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - type ClearSuggestionFeatureConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ConversationProfile. */ - interface IConversationProfile { + /** Properties of an ImportConversationDataOperationMetadata. */ + interface IImportConversationDataOperationMetadata { - /** ConversationProfile name */ - name?: (string|null); + /** ImportConversationDataOperationMetadata conversationDataset */ + conversationDataset?: (string|null); - /** ConversationProfile displayName */ - displayName?: (string|null); + /** ImportConversationDataOperationMetadata partialFailures */ + partialFailures?: (google.rpc.IStatus[]|null); - /** ConversationProfile createTime */ + /** ImportConversationDataOperationMetadata createTime */ createTime?: (google.protobuf.ITimestamp|null); - - /** ConversationProfile updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** ConversationProfile automatedAgentConfig */ - automatedAgentConfig?: (google.cloud.dialogflow.v2.IAutomatedAgentConfig|null); - - /** ConversationProfile humanAgentAssistantConfig */ - humanAgentAssistantConfig?: (google.cloud.dialogflow.v2.IHumanAgentAssistantConfig|null); - - /** ConversationProfile humanAgentHandoffConfig */ - humanAgentHandoffConfig?: (google.cloud.dialogflow.v2.IHumanAgentHandoffConfig|null); - - /** ConversationProfile notificationConfig */ - notificationConfig?: (google.cloud.dialogflow.v2.INotificationConfig|null); - - /** ConversationProfile loggingConfig */ - loggingConfig?: (google.cloud.dialogflow.v2.ILoggingConfig|null); - - /** ConversationProfile newMessageEventNotificationConfig */ - newMessageEventNotificationConfig?: (google.cloud.dialogflow.v2.INotificationConfig|null); - - /** ConversationProfile sttConfig */ - sttConfig?: (google.cloud.dialogflow.v2.ISpeechToTextConfig|null); - - /** ConversationProfile languageCode */ - languageCode?: (string|null); - - /** ConversationProfile timeZone */ - timeZone?: (string|null); - - /** ConversationProfile securitySettings */ - securitySettings?: (string|null); - - /** ConversationProfile ttsConfig */ - ttsConfig?: (google.cloud.dialogflow.v2.ISynthesizeSpeechConfig|null); } - /** Represents a ConversationProfile. */ - class ConversationProfile implements IConversationProfile { + /** Represents an ImportConversationDataOperationMetadata. */ + class ImportConversationDataOperationMetadata implements IImportConversationDataOperationMetadata { /** - * Constructs a new ConversationProfile. + * Constructs a new ImportConversationDataOperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.IConversationProfile); + constructor(properties?: google.cloud.dialogflow.v2.IImportConversationDataOperationMetadata); - /** ConversationProfile name. */ - public name: string; + /** ImportConversationDataOperationMetadata conversationDataset. */ + public conversationDataset: string; - /** ConversationProfile displayName. */ - public displayName: string; + /** ImportConversationDataOperationMetadata partialFailures. */ + public partialFailures: google.rpc.IStatus[]; - /** ConversationProfile createTime. */ + /** ImportConversationDataOperationMetadata createTime. */ public createTime?: (google.protobuf.ITimestamp|null); - /** ConversationProfile updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** ConversationProfile automatedAgentConfig. */ - public automatedAgentConfig?: (google.cloud.dialogflow.v2.IAutomatedAgentConfig|null); - - /** ConversationProfile humanAgentAssistantConfig. */ - public humanAgentAssistantConfig?: (google.cloud.dialogflow.v2.IHumanAgentAssistantConfig|null); - - /** ConversationProfile humanAgentHandoffConfig. */ - public humanAgentHandoffConfig?: (google.cloud.dialogflow.v2.IHumanAgentHandoffConfig|null); - - /** ConversationProfile notificationConfig. */ - public notificationConfig?: (google.cloud.dialogflow.v2.INotificationConfig|null); - - /** ConversationProfile loggingConfig. */ - public loggingConfig?: (google.cloud.dialogflow.v2.ILoggingConfig|null); - - /** ConversationProfile newMessageEventNotificationConfig. */ - public newMessageEventNotificationConfig?: (google.cloud.dialogflow.v2.INotificationConfig|null); - - /** ConversationProfile sttConfig. */ - public sttConfig?: (google.cloud.dialogflow.v2.ISpeechToTextConfig|null); - - /** ConversationProfile languageCode. */ - public languageCode: string; - - /** ConversationProfile timeZone. */ - public timeZone: string; - - /** ConversationProfile securitySettings. */ - public securitySettings: string; - - /** ConversationProfile ttsConfig. */ - public ttsConfig?: (google.cloud.dialogflow.v2.ISynthesizeSpeechConfig|null); - /** - * Creates a new ConversationProfile instance using the specified properties. + * Creates a new ImportConversationDataOperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns ConversationProfile instance + * @returns ImportConversationDataOperationMetadata instance */ - public static create(properties?: google.cloud.dialogflow.v2.IConversationProfile): google.cloud.dialogflow.v2.ConversationProfile; + public static create(properties?: google.cloud.dialogflow.v2.IImportConversationDataOperationMetadata): google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata; /** - * Encodes the specified ConversationProfile message. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationProfile.verify|verify} messages. - * @param message ConversationProfile message or plain object to encode + * Encodes the specified ImportConversationDataOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata.verify|verify} messages. + * @param message ImportConversationDataOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.IConversationProfile, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.IImportConversationDataOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ConversationProfile message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationProfile.verify|verify} messages. - * @param message ConversationProfile message or plain object to encode + * Encodes the specified ImportConversationDataOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata.verify|verify} messages. + * @param message ImportConversationDataOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IConversationProfile, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.IImportConversationDataOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ConversationProfile message from the specified reader or buffer. + * Decodes an ImportConversationDataOperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ConversationProfile + * @returns ImportConversationDataOperationMetadata * @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.dialogflow.v2.ConversationProfile; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata; /** - * Decodes a ConversationProfile message from the specified reader or buffer, length delimited. + * Decodes an ImportConversationDataOperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ConversationProfile + * @returns ImportConversationDataOperationMetadata * @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.dialogflow.v2.ConversationProfile; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata; /** - * Verifies a ConversationProfile message. + * Verifies an ImportConversationDataOperationMetadata 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 ConversationProfile message from a plain object. Also converts values to their respective internal types. + * Creates an ImportConversationDataOperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ConversationProfile + * @returns ImportConversationDataOperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ConversationProfile; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata; /** - * Creates a plain object from a ConversationProfile message. Also converts values to other types if specified. - * @param message ConversationProfile + * Creates a plain object from an ImportConversationDataOperationMetadata message. Also converts values to other types if specified. + * @param message ImportConversationDataOperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.ConversationProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ConversationProfile to JSON. + * Converts this ImportConversationDataOperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ConversationProfile + * Gets the default type url for ImportConversationDataOperationMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListConversationProfilesRequest. */ - interface IListConversationProfilesRequest { - - /** ListConversationProfilesRequest parent */ - parent?: (string|null); + /** Properties of an ImportConversationDataOperationResponse. */ + interface IImportConversationDataOperationResponse { - /** ListConversationProfilesRequest pageSize */ - pageSize?: (number|null); + /** ImportConversationDataOperationResponse conversationDataset */ + conversationDataset?: (string|null); - /** ListConversationProfilesRequest pageToken */ - pageToken?: (string|null); + /** ImportConversationDataOperationResponse importCount */ + importCount?: (number|null); } - /** Represents a ListConversationProfilesRequest. */ - class ListConversationProfilesRequest implements IListConversationProfilesRequest { + /** Represents an ImportConversationDataOperationResponse. */ + class ImportConversationDataOperationResponse implements IImportConversationDataOperationResponse { /** - * Constructs a new ListConversationProfilesRequest. + * Constructs a new ImportConversationDataOperationResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.IListConversationProfilesRequest); - - /** ListConversationProfilesRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.dialogflow.v2.IImportConversationDataOperationResponse); - /** ListConversationProfilesRequest pageSize. */ - public pageSize: number; + /** ImportConversationDataOperationResponse conversationDataset. */ + public conversationDataset: string; - /** ListConversationProfilesRequest pageToken. */ - public pageToken: string; + /** ImportConversationDataOperationResponse importCount. */ + public importCount: number; /** - * Creates a new ListConversationProfilesRequest instance using the specified properties. + * Creates a new ImportConversationDataOperationResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListConversationProfilesRequest instance + * @returns ImportConversationDataOperationResponse instance */ - public static create(properties?: google.cloud.dialogflow.v2.IListConversationProfilesRequest): google.cloud.dialogflow.v2.ListConversationProfilesRequest; + public static create(properties?: google.cloud.dialogflow.v2.IImportConversationDataOperationResponse): google.cloud.dialogflow.v2.ImportConversationDataOperationResponse; /** - * Encodes the specified ListConversationProfilesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationProfilesRequest.verify|verify} messages. - * @param message ListConversationProfilesRequest message or plain object to encode + * Encodes the specified ImportConversationDataOperationResponse message. Does not implicitly {@link google.cloud.dialogflow.v2.ImportConversationDataOperationResponse.verify|verify} messages. + * @param message ImportConversationDataOperationResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.IListConversationProfilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.IImportConversationDataOperationResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListConversationProfilesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationProfilesRequest.verify|verify} messages. - * @param message ListConversationProfilesRequest message or plain object to encode + * Encodes the specified ImportConversationDataOperationResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ImportConversationDataOperationResponse.verify|verify} messages. + * @param message ImportConversationDataOperationResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IListConversationProfilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.IImportConversationDataOperationResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListConversationProfilesRequest message from the specified reader or buffer. + * Decodes an ImportConversationDataOperationResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListConversationProfilesRequest + * @returns ImportConversationDataOperationResponse * @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.dialogflow.v2.ListConversationProfilesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.ImportConversationDataOperationResponse; /** - * Decodes a ListConversationProfilesRequest message from the specified reader or buffer, length delimited. + * Decodes an ImportConversationDataOperationResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListConversationProfilesRequest + * @returns ImportConversationDataOperationResponse * @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.dialogflow.v2.ListConversationProfilesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.ImportConversationDataOperationResponse; /** - * Verifies a ListConversationProfilesRequest message. + * Verifies an ImportConversationDataOperationResponse 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 ListConversationProfilesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImportConversationDataOperationResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListConversationProfilesRequest + * @returns ImportConversationDataOperationResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ListConversationProfilesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ImportConversationDataOperationResponse; /** - * Creates a plain object from a ListConversationProfilesRequest message. Also converts values to other types if specified. - * @param message ListConversationProfilesRequest + * Creates a plain object from an ImportConversationDataOperationResponse message. Also converts values to other types if specified. + * @param message ImportConversationDataOperationResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.ListConversationProfilesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.ImportConversationDataOperationResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListConversationProfilesRequest to JSON. + * Converts this ImportConversationDataOperationResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListConversationProfilesRequest + * Gets the default type url for ImportConversationDataOperationResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListConversationProfilesResponse. */ - interface IListConversationProfilesResponse { + /** Properties of a CreateConversationDatasetOperationMetadata. */ + interface ICreateConversationDatasetOperationMetadata { - /** ListConversationProfilesResponse conversationProfiles */ - conversationProfiles?: (google.cloud.dialogflow.v2.IConversationProfile[]|null); + /** CreateConversationDatasetOperationMetadata conversationDataset */ + conversationDataset?: (string|null); + } - /** ListConversationProfilesResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListConversationProfilesResponse. */ - class ListConversationProfilesResponse implements IListConversationProfilesResponse { + /** Represents a CreateConversationDatasetOperationMetadata. */ + class CreateConversationDatasetOperationMetadata implements ICreateConversationDatasetOperationMetadata { /** - * Constructs a new ListConversationProfilesResponse. + * Constructs a new CreateConversationDatasetOperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.IListConversationProfilesResponse); - - /** ListConversationProfilesResponse conversationProfiles. */ - public conversationProfiles: google.cloud.dialogflow.v2.IConversationProfile[]; + constructor(properties?: google.cloud.dialogflow.v2.ICreateConversationDatasetOperationMetadata); - /** ListConversationProfilesResponse nextPageToken. */ - public nextPageToken: string; + /** CreateConversationDatasetOperationMetadata conversationDataset. */ + public conversationDataset: string; /** - * Creates a new ListConversationProfilesResponse instance using the specified properties. + * Creates a new CreateConversationDatasetOperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns ListConversationProfilesResponse instance + * @returns CreateConversationDatasetOperationMetadata instance */ - public static create(properties?: google.cloud.dialogflow.v2.IListConversationProfilesResponse): google.cloud.dialogflow.v2.ListConversationProfilesResponse; + public static create(properties?: google.cloud.dialogflow.v2.ICreateConversationDatasetOperationMetadata): google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata; /** - * Encodes the specified ListConversationProfilesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationProfilesResponse.verify|verify} messages. - * @param message ListConversationProfilesResponse message or plain object to encode + * Encodes the specified CreateConversationDatasetOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata.verify|verify} messages. + * @param message CreateConversationDatasetOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.IListConversationProfilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.ICreateConversationDatasetOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListConversationProfilesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationProfilesResponse.verify|verify} messages. - * @param message ListConversationProfilesResponse message or plain object to encode + * Encodes the specified CreateConversationDatasetOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata.verify|verify} messages. + * @param message CreateConversationDatasetOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IListConversationProfilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.ICreateConversationDatasetOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListConversationProfilesResponse message from the specified reader or buffer. + * Decodes a CreateConversationDatasetOperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListConversationProfilesResponse + * @returns CreateConversationDatasetOperationMetadata * @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.dialogflow.v2.ListConversationProfilesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata; /** - * Decodes a ListConversationProfilesResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateConversationDatasetOperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListConversationProfilesResponse + * @returns CreateConversationDatasetOperationMetadata * @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.dialogflow.v2.ListConversationProfilesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata; /** - * Verifies a ListConversationProfilesResponse message. + * Verifies a CreateConversationDatasetOperationMetadata 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 ListConversationProfilesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateConversationDatasetOperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListConversationProfilesResponse + * @returns CreateConversationDatasetOperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ListConversationProfilesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata; /** - * Creates a plain object from a ListConversationProfilesResponse message. Also converts values to other types if specified. - * @param message ListConversationProfilesResponse + * Creates a plain object from a CreateConversationDatasetOperationMetadata message. Also converts values to other types if specified. + * @param message CreateConversationDatasetOperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.ListConversationProfilesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListConversationProfilesResponse to JSON. + * Converts this CreateConversationDatasetOperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListConversationProfilesResponse + * Gets the default type url for CreateConversationDatasetOperationMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetConversationProfileRequest. */ - interface IGetConversationProfileRequest { - - /** GetConversationProfileRequest name */ - name?: (string|null); + /** Properties of a DeleteConversationDatasetOperationMetadata. */ + interface IDeleteConversationDatasetOperationMetadata { } - /** Represents a GetConversationProfileRequest. */ - class GetConversationProfileRequest implements IGetConversationProfileRequest { + /** Represents a DeleteConversationDatasetOperationMetadata. */ + class DeleteConversationDatasetOperationMetadata implements IDeleteConversationDatasetOperationMetadata { /** - * Constructs a new GetConversationProfileRequest. + * Constructs a new DeleteConversationDatasetOperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.IGetConversationProfileRequest); - - /** GetConversationProfileRequest name. */ - public name: string; + constructor(properties?: google.cloud.dialogflow.v2.IDeleteConversationDatasetOperationMetadata); /** - * Creates a new GetConversationProfileRequest instance using the specified properties. + * Creates a new DeleteConversationDatasetOperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns GetConversationProfileRequest instance + * @returns DeleteConversationDatasetOperationMetadata instance */ - public static create(properties?: google.cloud.dialogflow.v2.IGetConversationProfileRequest): google.cloud.dialogflow.v2.GetConversationProfileRequest; + public static create(properties?: google.cloud.dialogflow.v2.IDeleteConversationDatasetOperationMetadata): google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata; /** - * Encodes the specified GetConversationProfileRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.GetConversationProfileRequest.verify|verify} messages. - * @param message GetConversationProfileRequest message or plain object to encode + * Encodes the specified DeleteConversationDatasetOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata.verify|verify} messages. + * @param message DeleteConversationDatasetOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.IGetConversationProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.IDeleteConversationDatasetOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetConversationProfileRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.GetConversationProfileRequest.verify|verify} messages. - * @param message GetConversationProfileRequest message or plain object to encode + * Encodes the specified DeleteConversationDatasetOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata.verify|verify} messages. + * @param message DeleteConversationDatasetOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IGetConversationProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.IDeleteConversationDatasetOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetConversationProfileRequest message from the specified reader or buffer. + * Decodes a DeleteConversationDatasetOperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetConversationProfileRequest + * @returns DeleteConversationDatasetOperationMetadata * @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.dialogflow.v2.GetConversationProfileRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata; /** - * Decodes a GetConversationProfileRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteConversationDatasetOperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetConversationProfileRequest + * @returns DeleteConversationDatasetOperationMetadata * @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.dialogflow.v2.GetConversationProfileRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata; /** - * Verifies a GetConversationProfileRequest message. + * Verifies a DeleteConversationDatasetOperationMetadata 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 GetConversationProfileRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteConversationDatasetOperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetConversationProfileRequest + * @returns DeleteConversationDatasetOperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.GetConversationProfileRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata; /** - * Creates a plain object from a GetConversationProfileRequest message. Also converts values to other types if specified. - * @param message GetConversationProfileRequest + * Creates a plain object from a DeleteConversationDatasetOperationMetadata message. Also converts values to other types if specified. + * @param message DeleteConversationDatasetOperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.GetConversationProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetConversationProfileRequest to JSON. + * Converts this DeleteConversationDatasetOperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetConversationProfileRequest + * Gets the default type url for DeleteConversationDatasetOperationMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateConversationProfileRequest. */ - interface ICreateConversationProfileRequest { - - /** CreateConversationProfileRequest parent */ - parent?: (string|null); + /** Properties of a GcsSources. */ + interface IGcsSources { - /** CreateConversationProfileRequest conversationProfile */ - conversationProfile?: (google.cloud.dialogflow.v2.IConversationProfile|null); + /** GcsSources uris */ + uris?: (string[]|null); } - /** Represents a CreateConversationProfileRequest. */ - class CreateConversationProfileRequest implements ICreateConversationProfileRequest { + /** Represents a GcsSources. */ + class GcsSources implements IGcsSources { /** - * Constructs a new CreateConversationProfileRequest. + * Constructs a new GcsSources. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.ICreateConversationProfileRequest); - - /** CreateConversationProfileRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.dialogflow.v2.IGcsSources); - /** CreateConversationProfileRequest conversationProfile. */ - public conversationProfile?: (google.cloud.dialogflow.v2.IConversationProfile|null); + /** GcsSources uris. */ + public uris: string[]; /** - * Creates a new CreateConversationProfileRequest instance using the specified properties. + * Creates a new GcsSources instance using the specified properties. * @param [properties] Properties to set - * @returns CreateConversationProfileRequest instance + * @returns GcsSources instance */ - public static create(properties?: google.cloud.dialogflow.v2.ICreateConversationProfileRequest): google.cloud.dialogflow.v2.CreateConversationProfileRequest; + public static create(properties?: google.cloud.dialogflow.v2.IGcsSources): google.cloud.dialogflow.v2.GcsSources; /** - * Encodes the specified CreateConversationProfileRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationProfileRequest.verify|verify} messages. - * @param message CreateConversationProfileRequest message or plain object to encode + * Encodes the specified GcsSources message. Does not implicitly {@link google.cloud.dialogflow.v2.GcsSources.verify|verify} messages. + * @param message GcsSources message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.ICreateConversationProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.IGcsSources, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateConversationProfileRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationProfileRequest.verify|verify} messages. - * @param message CreateConversationProfileRequest message or plain object to encode + * Encodes the specified GcsSources message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.GcsSources.verify|verify} messages. + * @param message GcsSources message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.ICreateConversationProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.IGcsSources, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateConversationProfileRequest message from the specified reader or buffer. + * Decodes a GcsSources message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateConversationProfileRequest + * @returns GcsSources * @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.dialogflow.v2.CreateConversationProfileRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.GcsSources; /** - * Decodes a CreateConversationProfileRequest message from the specified reader or buffer, length delimited. + * Decodes a GcsSources message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateConversationProfileRequest + * @returns GcsSources * @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.dialogflow.v2.CreateConversationProfileRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.GcsSources; /** - * Verifies a CreateConversationProfileRequest message. + * Verifies a GcsSources 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 CreateConversationProfileRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GcsSources message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateConversationProfileRequest + * @returns GcsSources */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.CreateConversationProfileRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.GcsSources; /** - * Creates a plain object from a CreateConversationProfileRequest message. Also converts values to other types if specified. - * @param message CreateConversationProfileRequest + * Creates a plain object from a GcsSources message. Also converts values to other types if specified. + * @param message GcsSources * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.CreateConversationProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.GcsSources, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateConversationProfileRequest to JSON. + * Converts this GcsSources to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateConversationProfileRequest + * Gets the default type url for GcsSources * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateConversationProfileRequest. */ - interface IUpdateConversationProfileRequest { - - /** UpdateConversationProfileRequest conversationProfile */ - conversationProfile?: (google.cloud.dialogflow.v2.IConversationProfile|null); + /** Properties of a GcsDestination. */ + interface IGcsDestination { - /** UpdateConversationProfileRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** GcsDestination uri */ + uri?: (string|null); } - /** Represents an UpdateConversationProfileRequest. */ - class UpdateConversationProfileRequest implements IUpdateConversationProfileRequest { + /** Represents a GcsDestination. */ + class GcsDestination implements IGcsDestination { /** - * Constructs a new UpdateConversationProfileRequest. + * Constructs a new GcsDestination. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.IUpdateConversationProfileRequest); - - /** UpdateConversationProfileRequest conversationProfile. */ - public conversationProfile?: (google.cloud.dialogflow.v2.IConversationProfile|null); + constructor(properties?: google.cloud.dialogflow.v2.IGcsDestination); - /** UpdateConversationProfileRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** GcsDestination uri. */ + public uri: string; /** - * Creates a new UpdateConversationProfileRequest instance using the specified properties. + * Creates a new GcsDestination instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateConversationProfileRequest instance + * @returns GcsDestination instance */ - public static create(properties?: google.cloud.dialogflow.v2.IUpdateConversationProfileRequest): google.cloud.dialogflow.v2.UpdateConversationProfileRequest; + public static create(properties?: google.cloud.dialogflow.v2.IGcsDestination): google.cloud.dialogflow.v2.GcsDestination; /** - * Encodes the specified UpdateConversationProfileRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.UpdateConversationProfileRequest.verify|verify} messages. - * @param message UpdateConversationProfileRequest message or plain object to encode + * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.dialogflow.v2.GcsDestination.verify|verify} messages. + * @param message GcsDestination message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.IUpdateConversationProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateConversationProfileRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.UpdateConversationProfileRequest.verify|verify} messages. - * @param message UpdateConversationProfileRequest message or plain object to encode + * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.GcsDestination.verify|verify} messages. + * @param message GcsDestination message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IUpdateConversationProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateConversationProfileRequest message from the specified reader or buffer. + * Decodes a GcsDestination message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateConversationProfileRequest + * @returns GcsDestination * @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.dialogflow.v2.UpdateConversationProfileRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.GcsDestination; /** - * Decodes an UpdateConversationProfileRequest message from the specified reader or buffer, length delimited. + * Decodes a GcsDestination message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateConversationProfileRequest + * @returns GcsDestination * @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.dialogflow.v2.UpdateConversationProfileRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.GcsDestination; /** - * Verifies an UpdateConversationProfileRequest message. + * Verifies a GcsDestination 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 UpdateConversationProfileRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateConversationProfileRequest + * @returns GcsDestination */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.UpdateConversationProfileRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.GcsDestination; /** - * Creates a plain object from an UpdateConversationProfileRequest message. Also converts values to other types if specified. - * @param message UpdateConversationProfileRequest + * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. + * @param message GcsDestination * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.UpdateConversationProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.GcsDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateConversationProfileRequest to JSON. + * Converts this GcsDestination to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateConversationProfileRequest + * Gets the default type url for GcsDestination * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteConversationProfileRequest. */ - interface IDeleteConversationProfileRequest { + /** Properties of a ConversationEvent. */ + interface IConversationEvent { - /** DeleteConversationProfileRequest name */ - name?: (string|null); + /** ConversationEvent conversation */ + conversation?: (string|null); + + /** ConversationEvent type */ + type?: (google.cloud.dialogflow.v2.ConversationEvent.Type|keyof typeof google.cloud.dialogflow.v2.ConversationEvent.Type|null); + + /** ConversationEvent errorStatus */ + errorStatus?: (google.rpc.IStatus|null); + + /** ConversationEvent newMessagePayload */ + newMessagePayload?: (google.cloud.dialogflow.v2.IMessage|null); } - /** Represents a DeleteConversationProfileRequest. */ - class DeleteConversationProfileRequest implements IDeleteConversationProfileRequest { + /** Represents a ConversationEvent. */ + class ConversationEvent implements IConversationEvent { /** - * Constructs a new DeleteConversationProfileRequest. + * Constructs a new ConversationEvent. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.IDeleteConversationProfileRequest); + constructor(properties?: google.cloud.dialogflow.v2.IConversationEvent); - /** DeleteConversationProfileRequest name. */ - public name: string; + /** ConversationEvent conversation. */ + public conversation: string; + + /** ConversationEvent type. */ + public type: (google.cloud.dialogflow.v2.ConversationEvent.Type|keyof typeof google.cloud.dialogflow.v2.ConversationEvent.Type); + + /** ConversationEvent errorStatus. */ + public errorStatus?: (google.rpc.IStatus|null); + + /** ConversationEvent newMessagePayload. */ + public newMessagePayload?: (google.cloud.dialogflow.v2.IMessage|null); + + /** ConversationEvent payload. */ + public payload?: "newMessagePayload"; /** - * Creates a new DeleteConversationProfileRequest instance using the specified properties. + * Creates a new ConversationEvent instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteConversationProfileRequest instance + * @returns ConversationEvent instance */ - public static create(properties?: google.cloud.dialogflow.v2.IDeleteConversationProfileRequest): google.cloud.dialogflow.v2.DeleteConversationProfileRequest; + public static create(properties?: google.cloud.dialogflow.v2.IConversationEvent): google.cloud.dialogflow.v2.ConversationEvent; /** - * Encodes the specified DeleteConversationProfileRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationProfileRequest.verify|verify} messages. - * @param message DeleteConversationProfileRequest message or plain object to encode + * Encodes the specified ConversationEvent message. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationEvent.verify|verify} messages. + * @param message ConversationEvent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.IDeleteConversationProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.IConversationEvent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteConversationProfileRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationProfileRequest.verify|verify} messages. - * @param message DeleteConversationProfileRequest message or plain object to encode + * Encodes the specified ConversationEvent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationEvent.verify|verify} messages. + * @param message ConversationEvent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IDeleteConversationProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.IConversationEvent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteConversationProfileRequest message from the specified reader or buffer. + * Decodes a ConversationEvent message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteConversationProfileRequest + * @returns ConversationEvent * @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.dialogflow.v2.DeleteConversationProfileRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.ConversationEvent; /** - * Decodes a DeleteConversationProfileRequest message from the specified reader or buffer, length delimited. + * Decodes a ConversationEvent message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteConversationProfileRequest + * @returns ConversationEvent * @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.dialogflow.v2.DeleteConversationProfileRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.ConversationEvent; /** - * Verifies a DeleteConversationProfileRequest message. + * Verifies a ConversationEvent 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 DeleteConversationProfileRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ConversationEvent message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteConversationProfileRequest + * @returns ConversationEvent */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.DeleteConversationProfileRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ConversationEvent; /** - * Creates a plain object from a DeleteConversationProfileRequest message. Also converts values to other types if specified. - * @param message DeleteConversationProfileRequest + * Creates a plain object from a ConversationEvent message. Also converts values to other types if specified. + * @param message ConversationEvent * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.DeleteConversationProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.ConversationEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteConversationProfileRequest to JSON. + * Converts this ConversationEvent to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteConversationProfileRequest + * Gets the default type url for ConversationEvent * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AutomatedAgentConfig. */ - interface IAutomatedAgentConfig { + namespace ConversationEvent { - /** AutomatedAgentConfig agent */ - agent?: (string|null); + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + CONVERSATION_STARTED = 1, + CONVERSATION_FINISHED = 2, + HUMAN_INTERVENTION_NEEDED = 3, + NEW_MESSAGE = 5, + UNRECOVERABLE_ERROR = 4 + } } - /** Represents an AutomatedAgentConfig. */ - class AutomatedAgentConfig implements IAutomatedAgentConfig { + /** Represents a ConversationModels */ + class ConversationModels extends $protobuf.rpc.Service { /** - * Constructs a new AutomatedAgentConfig. - * @param [properties] Properties to set + * Constructs a new ConversationModels service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - constructor(properties?: google.cloud.dialogflow.v2.IAutomatedAgentConfig); + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - /** AutomatedAgentConfig agent. */ - public agent: string; + /** + * Creates new ConversationModels 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): ConversationModels; /** - * Creates a new AutomatedAgentConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AutomatedAgentConfig instance + * Calls CreateConversationModel. + * @param request CreateConversationModelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static create(properties?: google.cloud.dialogflow.v2.IAutomatedAgentConfig): google.cloud.dialogflow.v2.AutomatedAgentConfig; + public createConversationModel(request: google.cloud.dialogflow.v2.ICreateConversationModelRequest, callback: google.cloud.dialogflow.v2.ConversationModels.CreateConversationModelCallback): void; /** - * Encodes the specified AutomatedAgentConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.AutomatedAgentConfig.verify|verify} messages. - * @param message AutomatedAgentConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls CreateConversationModel. + * @param request CreateConversationModelRequest message or plain object + * @returns Promise */ - public static encode(message: google.cloud.dialogflow.v2.IAutomatedAgentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public createConversationModel(request: google.cloud.dialogflow.v2.ICreateConversationModelRequest): Promise; /** - * Encodes the specified AutomatedAgentConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.AutomatedAgentConfig.verify|verify} messages. - * @param message AutomatedAgentConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetConversationModel. + * @param request GetConversationModelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ConversationModel */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IAutomatedAgentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public getConversationModel(request: google.cloud.dialogflow.v2.IGetConversationModelRequest, callback: google.cloud.dialogflow.v2.ConversationModels.GetConversationModelCallback): void; /** - * Decodes an AutomatedAgentConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AutomatedAgentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetConversationModel. + * @param request GetConversationModelRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.AutomatedAgentConfig; + public getConversationModel(request: google.cloud.dialogflow.v2.IGetConversationModelRequest): Promise; /** - * Decodes an AutomatedAgentConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AutomatedAgentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListConversationModels. + * @param request ListConversationModelsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListConversationModelsResponse */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.AutomatedAgentConfig; + public listConversationModels(request: google.cloud.dialogflow.v2.IListConversationModelsRequest, callback: google.cloud.dialogflow.v2.ConversationModels.ListConversationModelsCallback): void; /** - * Verifies an AutomatedAgentConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls ListConversationModels. + * @param request ListConversationModelsRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public listConversationModels(request: google.cloud.dialogflow.v2.IListConversationModelsRequest): Promise; /** - * Creates an AutomatedAgentConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AutomatedAgentConfig + * Calls DeleteConversationModel. + * @param request DeleteConversationModelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.AutomatedAgentConfig; + public deleteConversationModel(request: google.cloud.dialogflow.v2.IDeleteConversationModelRequest, callback: google.cloud.dialogflow.v2.ConversationModels.DeleteConversationModelCallback): void; /** - * Creates a plain object from an AutomatedAgentConfig message. Also converts values to other types if specified. - * @param message AutomatedAgentConfig - * @param [options] Conversion options - * @returns Plain object + * Calls DeleteConversationModel. + * @param request DeleteConversationModelRequest message or plain object + * @returns Promise */ - public static toObject(message: google.cloud.dialogflow.v2.AutomatedAgentConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public deleteConversationModel(request: google.cloud.dialogflow.v2.IDeleteConversationModelRequest): Promise; /** - * Converts this AutomatedAgentConfig to JSON. - * @returns JSON object + * Calls DeployConversationModel. + * @param request DeployConversationModelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public toJSON(): { [k: string]: any }; + public deployConversationModel(request: google.cloud.dialogflow.v2.IDeployConversationModelRequest, callback: google.cloud.dialogflow.v2.ConversationModels.DeployConversationModelCallback): void; /** - * Gets the default type url for AutomatedAgentConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Calls DeployConversationModel. + * @param request DeployConversationModelRequest message or plain object + * @returns Promise */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + public deployConversationModel(request: google.cloud.dialogflow.v2.IDeployConversationModelRequest): Promise; - /** Properties of a HumanAgentAssistantConfig. */ - interface IHumanAgentAssistantConfig { + /** + * Calls UndeployConversationModel. + * @param request UndeployConversationModelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public undeployConversationModel(request: google.cloud.dialogflow.v2.IUndeployConversationModelRequest, callback: google.cloud.dialogflow.v2.ConversationModels.UndeployConversationModelCallback): void; - /** HumanAgentAssistantConfig notificationConfig */ - notificationConfig?: (google.cloud.dialogflow.v2.INotificationConfig|null); + /** + * Calls UndeployConversationModel. + * @param request UndeployConversationModelRequest message or plain object + * @returns Promise + */ + public undeployConversationModel(request: google.cloud.dialogflow.v2.IUndeployConversationModelRequest): Promise; - /** HumanAgentAssistantConfig humanAgentSuggestionConfig */ - humanAgentSuggestionConfig?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionConfig|null); + /** + * Calls GetConversationModelEvaluation. + * @param request GetConversationModelEvaluationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ConversationModelEvaluation + */ + public getConversationModelEvaluation(request: google.cloud.dialogflow.v2.IGetConversationModelEvaluationRequest, callback: google.cloud.dialogflow.v2.ConversationModels.GetConversationModelEvaluationCallback): void; - /** HumanAgentAssistantConfig endUserSuggestionConfig */ - endUserSuggestionConfig?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionConfig|null); + /** + * Calls GetConversationModelEvaluation. + * @param request GetConversationModelEvaluationRequest message or plain object + * @returns Promise + */ + public getConversationModelEvaluation(request: google.cloud.dialogflow.v2.IGetConversationModelEvaluationRequest): Promise; - /** HumanAgentAssistantConfig messageAnalysisConfig */ - messageAnalysisConfig?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IMessageAnalysisConfig|null); + /** + * Calls ListConversationModelEvaluations. + * @param request ListConversationModelEvaluationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListConversationModelEvaluationsResponse + */ + public listConversationModelEvaluations(request: google.cloud.dialogflow.v2.IListConversationModelEvaluationsRequest, callback: google.cloud.dialogflow.v2.ConversationModels.ListConversationModelEvaluationsCallback): void; + + /** + * Calls ListConversationModelEvaluations. + * @param request ListConversationModelEvaluationsRequest message or plain object + * @returns Promise + */ + public listConversationModelEvaluations(request: google.cloud.dialogflow.v2.IListConversationModelEvaluationsRequest): Promise; + + /** + * Calls CreateConversationModelEvaluation. + * @param request CreateConversationModelEvaluationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createConversationModelEvaluation(request: google.cloud.dialogflow.v2.ICreateConversationModelEvaluationRequest, callback: google.cloud.dialogflow.v2.ConversationModels.CreateConversationModelEvaluationCallback): void; + + /** + * Calls CreateConversationModelEvaluation. + * @param request CreateConversationModelEvaluationRequest message or plain object + * @returns Promise + */ + public createConversationModelEvaluation(request: google.cloud.dialogflow.v2.ICreateConversationModelEvaluationRequest): Promise; } - /** Represents a HumanAgentAssistantConfig. */ - class HumanAgentAssistantConfig implements IHumanAgentAssistantConfig { + namespace ConversationModels { /** - * Constructs a new HumanAgentAssistantConfig. + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|createConversationModel}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateConversationModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|getConversationModel}. + * @param error Error, if any + * @param [response] ConversationModel + */ + type GetConversationModelCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2.ConversationModel) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|listConversationModels}. + * @param error Error, if any + * @param [response] ListConversationModelsResponse + */ + type ListConversationModelsCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2.ListConversationModelsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|deleteConversationModel}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteConversationModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|deployConversationModel}. + * @param error Error, if any + * @param [response] Operation + */ + type DeployConversationModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|undeployConversationModel}. + * @param error Error, if any + * @param [response] Operation + */ + type UndeployConversationModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|getConversationModelEvaluation}. + * @param error Error, if any + * @param [response] ConversationModelEvaluation + */ + type GetConversationModelEvaluationCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2.ConversationModelEvaluation) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|listConversationModelEvaluations}. + * @param error Error, if any + * @param [response] ListConversationModelEvaluationsResponse + */ + type ListConversationModelEvaluationsCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|createConversationModelEvaluation}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateConversationModelEvaluationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of a ConversationModel. */ + interface IConversationModel { + + /** ConversationModel name */ + name?: (string|null); + + /** ConversationModel displayName */ + displayName?: (string|null); + + /** ConversationModel createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** ConversationModel datasets */ + datasets?: (google.cloud.dialogflow.v2.IInputDataset[]|null); + + /** ConversationModel state */ + state?: (google.cloud.dialogflow.v2.ConversationModel.State|keyof typeof google.cloud.dialogflow.v2.ConversationModel.State|null); + + /** ConversationModel languageCode */ + languageCode?: (string|null); + + /** ConversationModel articleSuggestionModelMetadata */ + articleSuggestionModelMetadata?: (google.cloud.dialogflow.v2.IArticleSuggestionModelMetadata|null); + + /** ConversationModel smartReplyModelMetadata */ + smartReplyModelMetadata?: (google.cloud.dialogflow.v2.ISmartReplyModelMetadata|null); + } + + /** Represents a ConversationModel. */ + class ConversationModel implements IConversationModel { + + /** + * Constructs a new ConversationModel. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.IHumanAgentAssistantConfig); + constructor(properties?: google.cloud.dialogflow.v2.IConversationModel); - /** HumanAgentAssistantConfig notificationConfig. */ - public notificationConfig?: (google.cloud.dialogflow.v2.INotificationConfig|null); + /** ConversationModel name. */ + public name: string; - /** HumanAgentAssistantConfig humanAgentSuggestionConfig. */ - public humanAgentSuggestionConfig?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionConfig|null); + /** ConversationModel displayName. */ + public displayName: string; - /** HumanAgentAssistantConfig endUserSuggestionConfig. */ - public endUserSuggestionConfig?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionConfig|null); + /** ConversationModel createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** HumanAgentAssistantConfig messageAnalysisConfig. */ - public messageAnalysisConfig?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IMessageAnalysisConfig|null); + /** ConversationModel datasets. */ + public datasets: google.cloud.dialogflow.v2.IInputDataset[]; + + /** ConversationModel state. */ + public state: (google.cloud.dialogflow.v2.ConversationModel.State|keyof typeof google.cloud.dialogflow.v2.ConversationModel.State); + + /** ConversationModel languageCode. */ + public languageCode: string; + + /** ConversationModel articleSuggestionModelMetadata. */ + public articleSuggestionModelMetadata?: (google.cloud.dialogflow.v2.IArticleSuggestionModelMetadata|null); + + /** ConversationModel smartReplyModelMetadata. */ + public smartReplyModelMetadata?: (google.cloud.dialogflow.v2.ISmartReplyModelMetadata|null); + + /** ConversationModel modelMetadata. */ + public modelMetadata?: ("articleSuggestionModelMetadata"|"smartReplyModelMetadata"); /** - * Creates a new HumanAgentAssistantConfig instance using the specified properties. + * Creates a new ConversationModel instance using the specified properties. * @param [properties] Properties to set - * @returns HumanAgentAssistantConfig instance + * @returns ConversationModel instance */ - public static create(properties?: google.cloud.dialogflow.v2.IHumanAgentAssistantConfig): google.cloud.dialogflow.v2.HumanAgentAssistantConfig; + public static create(properties?: google.cloud.dialogflow.v2.IConversationModel): google.cloud.dialogflow.v2.ConversationModel; /** - * Encodes the specified HumanAgentAssistantConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.verify|verify} messages. - * @param message HumanAgentAssistantConfig message or plain object to encode + * Encodes the specified ConversationModel message. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationModel.verify|verify} messages. + * @param message ConversationModel message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.IHumanAgentAssistantConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.IConversationModel, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified HumanAgentAssistantConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.verify|verify} messages. - * @param message HumanAgentAssistantConfig message or plain object to encode + * Encodes the specified ConversationModel message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationModel.verify|verify} messages. + * @param message ConversationModel message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IHumanAgentAssistantConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.IConversationModel, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a HumanAgentAssistantConfig message from the specified reader or buffer. + * Decodes a ConversationModel message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns HumanAgentAssistantConfig + * @returns ConversationModel * @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.dialogflow.v2.HumanAgentAssistantConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.ConversationModel; /** - * Decodes a HumanAgentAssistantConfig message from the specified reader or buffer, length delimited. + * Decodes a ConversationModel message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns HumanAgentAssistantConfig + * @returns ConversationModel * @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.dialogflow.v2.HumanAgentAssistantConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.ConversationModel; /** - * Verifies a HumanAgentAssistantConfig message. + * Verifies a ConversationModel 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 HumanAgentAssistantConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ConversationModel message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns HumanAgentAssistantConfig + * @returns ConversationModel */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.HumanAgentAssistantConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ConversationModel; /** - * Creates a plain object from a HumanAgentAssistantConfig message. Also converts values to other types if specified. - * @param message HumanAgentAssistantConfig + * Creates a plain object from a ConversationModel message. Also converts values to other types if specified. + * @param message ConversationModel * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.ConversationModel, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this HumanAgentAssistantConfig to JSON. + * Converts this ConversationModel to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for HumanAgentAssistantConfig + * Gets the default type url for ConversationModel * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace HumanAgentAssistantConfig { - - /** Properties of a SuggestionTriggerSettings. */ - interface ISuggestionTriggerSettings { + namespace ConversationModel { - /** SuggestionTriggerSettings noSmalltalk */ - noSmalltalk?: (boolean|null); + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + UNDEPLOYED = 2, + DEPLOYING = 3, + DEPLOYED = 4, + UNDEPLOYING = 5, + DELETING = 6, + FAILED = 7, + PENDING = 8 + } - /** SuggestionTriggerSettings onlyEndUser */ - onlyEndUser?: (boolean|null); + /** ModelType enum. */ + enum ModelType { + MODEL_TYPE_UNSPECIFIED = 0, + SMART_REPLY_DUAL_ENCODER_MODEL = 2, + SMART_REPLY_BERT_MODEL = 6 } + } - /** Represents a SuggestionTriggerSettings. */ - class SuggestionTriggerSettings implements ISuggestionTriggerSettings { + /** Properties of a ConversationModelEvaluation. */ + interface IConversationModelEvaluation { - /** - * Constructs a new SuggestionTriggerSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionTriggerSettings); + /** ConversationModelEvaluation name */ + name?: (string|null); - /** SuggestionTriggerSettings noSmalltalk. */ - public noSmalltalk: boolean; + /** ConversationModelEvaluation displayName */ + displayName?: (string|null); - /** SuggestionTriggerSettings onlyEndUser. */ - public onlyEndUser: boolean; + /** ConversationModelEvaluation evaluationConfig */ + evaluationConfig?: (google.cloud.dialogflow.v2.IEvaluationConfig|null); - /** - * Creates a new SuggestionTriggerSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns SuggestionTriggerSettings instance - */ - public static create(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionTriggerSettings): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings; + /** ConversationModelEvaluation createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** - * Encodes the specified SuggestionTriggerSettings message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings.verify|verify} messages. - * @param message SuggestionTriggerSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionTriggerSettings, writer?: $protobuf.Writer): $protobuf.Writer; + /** ConversationModelEvaluation smartReplyMetrics */ + smartReplyMetrics?: (google.cloud.dialogflow.v2.ISmartReplyMetrics|null); - /** - * Encodes the specified SuggestionTriggerSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings.verify|verify} messages. - * @param message SuggestionTriggerSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionTriggerSettings, writer?: $protobuf.Writer): $protobuf.Writer; + /** ConversationModelEvaluation rawHumanEvalTemplateCsv */ + rawHumanEvalTemplateCsv?: (string|null); + } - /** - * Decodes a SuggestionTriggerSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SuggestionTriggerSettings - * @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.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings; + /** Represents a ConversationModelEvaluation. */ + class ConversationModelEvaluation implements IConversationModelEvaluation { - /** - * Decodes a SuggestionTriggerSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SuggestionTriggerSettings - * @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.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings; + /** + * Constructs a new ConversationModelEvaluation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2.IConversationModelEvaluation); - /** - * Verifies a SuggestionTriggerSettings 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); + /** ConversationModelEvaluation name. */ + public name: string; - /** - * Creates a SuggestionTriggerSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SuggestionTriggerSettings - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings; + /** ConversationModelEvaluation displayName. */ + public displayName: string; - /** - * Creates a plain object from a SuggestionTriggerSettings message. Also converts values to other types if specified. - * @param message SuggestionTriggerSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ConversationModelEvaluation evaluationConfig. */ + public evaluationConfig?: (google.cloud.dialogflow.v2.IEvaluationConfig|null); - /** - * Converts this SuggestionTriggerSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** ConversationModelEvaluation createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** - * Gets the default type url for SuggestionTriggerSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** ConversationModelEvaluation smartReplyMetrics. */ + public smartReplyMetrics?: (google.cloud.dialogflow.v2.ISmartReplyMetrics|null); - /** Properties of a SuggestionFeatureConfig. */ - interface ISuggestionFeatureConfig { + /** ConversationModelEvaluation rawHumanEvalTemplateCsv. */ + public rawHumanEvalTemplateCsv: string; - /** SuggestionFeatureConfig suggestionFeature */ - suggestionFeature?: (google.cloud.dialogflow.v2.ISuggestionFeature|null); + /** ConversationModelEvaluation metrics. */ + public metrics?: "smartReplyMetrics"; - /** SuggestionFeatureConfig enableEventBasedSuggestion */ - enableEventBasedSuggestion?: (boolean|null); + /** + * Creates a new ConversationModelEvaluation instance using the specified properties. + * @param [properties] Properties to set + * @returns ConversationModelEvaluation instance + */ + public static create(properties?: google.cloud.dialogflow.v2.IConversationModelEvaluation): google.cloud.dialogflow.v2.ConversationModelEvaluation; - /** SuggestionFeatureConfig suggestionTriggerSettings */ - suggestionTriggerSettings?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionTriggerSettings|null); + /** + * Encodes the specified ConversationModelEvaluation message. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationModelEvaluation.verify|verify} messages. + * @param message ConversationModelEvaluation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2.IConversationModelEvaluation, writer?: $protobuf.Writer): $protobuf.Writer; - /** SuggestionFeatureConfig queryConfig */ - queryConfig?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionQueryConfig|null); + /** + * Encodes the specified ConversationModelEvaluation message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationModelEvaluation.verify|verify} messages. + * @param message ConversationModelEvaluation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2.IConversationModelEvaluation, writer?: $protobuf.Writer): $protobuf.Writer; - /** SuggestionFeatureConfig conversationModelConfig */ - conversationModelConfig?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationModelConfig|null); + /** + * Decodes a ConversationModelEvaluation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConversationModelEvaluation + * @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.dialogflow.v2.ConversationModelEvaluation; - /** SuggestionFeatureConfig conversationProcessConfig */ - conversationProcessConfig?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationProcessConfig|null); - } + /** + * Decodes a ConversationModelEvaluation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConversationModelEvaluation + * @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.dialogflow.v2.ConversationModelEvaluation; - /** Represents a SuggestionFeatureConfig. */ - class SuggestionFeatureConfig implements ISuggestionFeatureConfig { + /** + * Verifies a ConversationModelEvaluation 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); - /** - * Constructs a new SuggestionFeatureConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionFeatureConfig); + /** + * Creates a ConversationModelEvaluation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConversationModelEvaluation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ConversationModelEvaluation; - /** SuggestionFeatureConfig suggestionFeature. */ - public suggestionFeature?: (google.cloud.dialogflow.v2.ISuggestionFeature|null); + /** + * Creates a plain object from a ConversationModelEvaluation message. Also converts values to other types if specified. + * @param message ConversationModelEvaluation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2.ConversationModelEvaluation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** SuggestionFeatureConfig enableEventBasedSuggestion. */ - public enableEventBasedSuggestion: boolean; + /** + * Converts this ConversationModelEvaluation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** SuggestionFeatureConfig suggestionTriggerSettings. */ - public suggestionTriggerSettings?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionTriggerSettings|null); + /** + * Gets the default type url for ConversationModelEvaluation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** SuggestionFeatureConfig queryConfig. */ - public queryConfig?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionQueryConfig|null); + /** Properties of an EvaluationConfig. */ + interface IEvaluationConfig { - /** SuggestionFeatureConfig conversationModelConfig. */ - public conversationModelConfig?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationModelConfig|null); + /** EvaluationConfig datasets */ + datasets?: (google.cloud.dialogflow.v2.IInputDataset[]|null); - /** SuggestionFeatureConfig conversationProcessConfig. */ - public conversationProcessConfig?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationProcessConfig|null); + /** EvaluationConfig smartReplyConfig */ + smartReplyConfig?: (google.cloud.dialogflow.v2.EvaluationConfig.ISmartReplyConfig|null); - /** - * Creates a new SuggestionFeatureConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns SuggestionFeatureConfig instance - */ - public static create(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionFeatureConfig): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig; + /** EvaluationConfig smartComposeConfig */ + smartComposeConfig?: (google.cloud.dialogflow.v2.EvaluationConfig.ISmartComposeConfig|null); + } - /** - * Encodes the specified SuggestionFeatureConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.verify|verify} messages. - * @param message SuggestionFeatureConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionFeatureConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents an EvaluationConfig. */ + class EvaluationConfig implements IEvaluationConfig { - /** - * Encodes the specified SuggestionFeatureConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.verify|verify} messages. - * @param message SuggestionFeatureConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionFeatureConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new EvaluationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2.IEvaluationConfig); - /** - * Decodes a SuggestionFeatureConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SuggestionFeatureConfig - * @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.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig; + /** EvaluationConfig datasets. */ + public datasets: google.cloud.dialogflow.v2.IInputDataset[]; - /** - * Decodes a SuggestionFeatureConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SuggestionFeatureConfig - * @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.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig; + /** EvaluationConfig smartReplyConfig. */ + public smartReplyConfig?: (google.cloud.dialogflow.v2.EvaluationConfig.ISmartReplyConfig|null); - /** - * Verifies a SuggestionFeatureConfig 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); + /** EvaluationConfig smartComposeConfig. */ + public smartComposeConfig?: (google.cloud.dialogflow.v2.EvaluationConfig.ISmartComposeConfig|null); - /** - * Creates a SuggestionFeatureConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SuggestionFeatureConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig; + /** EvaluationConfig modelSpecificConfig. */ + public modelSpecificConfig?: ("smartReplyConfig"|"smartComposeConfig"); - /** - * Creates a plain object from a SuggestionFeatureConfig message. Also converts values to other types if specified. - * @param message SuggestionFeatureConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a new EvaluationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns EvaluationConfig instance + */ + public static create(properties?: google.cloud.dialogflow.v2.IEvaluationConfig): google.cloud.dialogflow.v2.EvaluationConfig; - /** - * Converts this SuggestionFeatureConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Encodes the specified EvaluationConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.EvaluationConfig.verify|verify} messages. + * @param message EvaluationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2.IEvaluationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Gets the default type url for SuggestionFeatureConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Encodes the specified EvaluationConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.EvaluationConfig.verify|verify} messages. + * @param message EvaluationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2.IEvaluationConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a SuggestionConfig. */ - interface ISuggestionConfig { + /** + * Decodes an EvaluationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EvaluationConfig + * @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.dialogflow.v2.EvaluationConfig; - /** SuggestionConfig featureConfigs */ - featureConfigs?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionFeatureConfig[]|null); + /** + * Decodes an EvaluationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EvaluationConfig + * @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.dialogflow.v2.EvaluationConfig; - /** SuggestionConfig groupSuggestionResponses */ - groupSuggestionResponses?: (boolean|null); + /** + * Verifies an EvaluationConfig 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 EvaluationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EvaluationConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.EvaluationConfig; + + /** + * Creates a plain object from an EvaluationConfig message. Also converts values to other types if specified. + * @param message EvaluationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2.EvaluationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EvaluationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EvaluationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EvaluationConfig { + + /** Properties of a SmartReplyConfig. */ + interface ISmartReplyConfig { + + /** SmartReplyConfig allowlistDocument */ + allowlistDocument?: (string|null); + + /** SmartReplyConfig maxResultCount */ + maxResultCount?: (number|null); } - /** Represents a SuggestionConfig. */ - class SuggestionConfig implements ISuggestionConfig { + /** Represents a SmartReplyConfig. */ + class SmartReplyConfig implements ISmartReplyConfig { /** - * Constructs a new SuggestionConfig. + * Constructs a new SmartReplyConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionConfig); + constructor(properties?: google.cloud.dialogflow.v2.EvaluationConfig.ISmartReplyConfig); - /** SuggestionConfig featureConfigs. */ - public featureConfigs: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionFeatureConfig[]; + /** SmartReplyConfig allowlistDocument. */ + public allowlistDocument: string; - /** SuggestionConfig groupSuggestionResponses. */ - public groupSuggestionResponses: boolean; + /** SmartReplyConfig maxResultCount. */ + public maxResultCount: number; /** - * Creates a new SuggestionConfig instance using the specified properties. + * Creates a new SmartReplyConfig instance using the specified properties. * @param [properties] Properties to set - * @returns SuggestionConfig instance + * @returns SmartReplyConfig instance */ - public static create(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionConfig): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig; + public static create(properties?: google.cloud.dialogflow.v2.EvaluationConfig.ISmartReplyConfig): google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig; /** - * Encodes the specified SuggestionConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.verify|verify} messages. - * @param message SuggestionConfig message or plain object to encode + * Encodes the specified SmartReplyConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig.verify|verify} messages. + * @param message SmartReplyConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.EvaluationConfig.ISmartReplyConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SuggestionConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.verify|verify} messages. - * @param message SuggestionConfig message or plain object to encode + * Encodes the specified SmartReplyConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig.verify|verify} messages. + * @param message SmartReplyConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.EvaluationConfig.ISmartReplyConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SuggestionConfig message from the specified reader or buffer. + * Decodes a SmartReplyConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SuggestionConfig + * @returns SmartReplyConfig * @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.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig; /** - * Decodes a SuggestionConfig message from the specified reader or buffer, length delimited. + * Decodes a SmartReplyConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SuggestionConfig + * @returns SmartReplyConfig * @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.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig; /** - * Verifies a SuggestionConfig message. + * Verifies a SmartReplyConfig 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 SuggestionConfig message from a plain object. Also converts values to their respective internal types. + * Creates a SmartReplyConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SuggestionConfig + * @returns SmartReplyConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig; /** - * Creates a plain object from a SuggestionConfig message. Also converts values to other types if specified. - * @param message SuggestionConfig + * Creates a plain object from a SmartReplyConfig message. Also converts values to other types if specified. + * @param message SmartReplyConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SuggestionConfig to JSON. + * Converts this SmartReplyConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SuggestionConfig + * Gets the default type url for SmartReplyConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SuggestionQueryConfig. */ - interface ISuggestionQueryConfig { - - /** SuggestionQueryConfig knowledgeBaseQuerySource */ - knowledgeBaseQuerySource?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource|null); - - /** SuggestionQueryConfig documentQuerySource */ - documentQuerySource?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource|null); - - /** SuggestionQueryConfig dialogflowQuerySource */ - dialogflowQuerySource?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource|null); - - /** SuggestionQueryConfig maxResults */ - maxResults?: (number|null); + /** Properties of a SmartComposeConfig. */ + interface ISmartComposeConfig { - /** SuggestionQueryConfig confidenceThreshold */ - confidenceThreshold?: (number|null); + /** SmartComposeConfig allowlistDocument */ + allowlistDocument?: (string|null); - /** SuggestionQueryConfig contextFilterSettings */ - contextFilterSettings?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings|null); + /** SmartComposeConfig maxResultCount */ + maxResultCount?: (number|null); } - /** Represents a SuggestionQueryConfig. */ - class SuggestionQueryConfig implements ISuggestionQueryConfig { + /** Represents a SmartComposeConfig. */ + class SmartComposeConfig implements ISmartComposeConfig { /** - * Constructs a new SuggestionQueryConfig. + * Constructs a new SmartComposeConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionQueryConfig); - - /** SuggestionQueryConfig knowledgeBaseQuerySource. */ - public knowledgeBaseQuerySource?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource|null); - - /** SuggestionQueryConfig documentQuerySource. */ - public documentQuerySource?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource|null); - - /** SuggestionQueryConfig dialogflowQuerySource. */ - public dialogflowQuerySource?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource|null); - - /** SuggestionQueryConfig maxResults. */ - public maxResults: number; - - /** SuggestionQueryConfig confidenceThreshold. */ - public confidenceThreshold: number; + constructor(properties?: google.cloud.dialogflow.v2.EvaluationConfig.ISmartComposeConfig); - /** SuggestionQueryConfig contextFilterSettings. */ - public contextFilterSettings?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings|null); + /** SmartComposeConfig allowlistDocument. */ + public allowlistDocument: string; - /** SuggestionQueryConfig querySource. */ - public querySource?: ("knowledgeBaseQuerySource"|"documentQuerySource"|"dialogflowQuerySource"); + /** SmartComposeConfig maxResultCount. */ + public maxResultCount: number; /** - * Creates a new SuggestionQueryConfig instance using the specified properties. + * Creates a new SmartComposeConfig instance using the specified properties. * @param [properties] Properties to set - * @returns SuggestionQueryConfig instance + * @returns SmartComposeConfig instance */ - public static create(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionQueryConfig): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig; + public static create(properties?: google.cloud.dialogflow.v2.EvaluationConfig.ISmartComposeConfig): google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig; /** - * Encodes the specified SuggestionQueryConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.verify|verify} messages. - * @param message SuggestionQueryConfig message or plain object to encode + * Encodes the specified SmartComposeConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig.verify|verify} messages. + * @param message SmartComposeConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionQueryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.EvaluationConfig.ISmartComposeConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SuggestionQueryConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.verify|verify} messages. - * @param message SuggestionQueryConfig message or plain object to encode + * Encodes the specified SmartComposeConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig.verify|verify} messages. + * @param message SmartComposeConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionQueryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.EvaluationConfig.ISmartComposeConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SuggestionQueryConfig message from the specified reader or buffer. + * Decodes a SmartComposeConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SuggestionQueryConfig + * @returns SmartComposeConfig * @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.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig; /** - * Decodes a SuggestionQueryConfig message from the specified reader or buffer, length delimited. + * Decodes a SmartComposeConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SuggestionQueryConfig + * @returns SmartComposeConfig * @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.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig; /** - * Verifies a SuggestionQueryConfig message. + * Verifies a SmartComposeConfig 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 SuggestionQueryConfig message from a plain object. Also converts values to their respective internal types. + * Creates a SmartComposeConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SuggestionQueryConfig + * @returns SmartComposeConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig; /** - * Creates a plain object from a SuggestionQueryConfig message. Also converts values to other types if specified. - * @param message SuggestionQueryConfig + * Creates a plain object from a SmartComposeConfig message. Also converts values to other types if specified. + * @param message SmartComposeConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SuggestionQueryConfig to JSON. + * Converts this SmartComposeConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SuggestionQueryConfig + * Gets the default type url for SmartComposeConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } + } - namespace SuggestionQueryConfig { - - /** Properties of a KnowledgeBaseQuerySource. */ - interface IKnowledgeBaseQuerySource { + /** Properties of an InputDataset. */ + interface IInputDataset { - /** KnowledgeBaseQuerySource knowledgeBases */ - knowledgeBases?: (string[]|null); - } + /** InputDataset dataset */ + dataset?: (string|null); + } - /** Represents a KnowledgeBaseQuerySource. */ - class KnowledgeBaseQuerySource implements IKnowledgeBaseQuerySource { + /** Represents an InputDataset. */ + class InputDataset implements IInputDataset { - /** - * Constructs a new KnowledgeBaseQuerySource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource); + /** + * Constructs a new InputDataset. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2.IInputDataset); - /** KnowledgeBaseQuerySource knowledgeBases. */ - public knowledgeBases: string[]; + /** InputDataset dataset. */ + public dataset: string; - /** - * Creates a new KnowledgeBaseQuerySource instance using the specified properties. - * @param [properties] Properties to set - * @returns KnowledgeBaseQuerySource instance - */ - public static create(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource; + /** + * Creates a new InputDataset instance using the specified properties. + * @param [properties] Properties to set + * @returns InputDataset instance + */ + public static create(properties?: google.cloud.dialogflow.v2.IInputDataset): google.cloud.dialogflow.v2.InputDataset; - /** - * Encodes the specified KnowledgeBaseQuerySource message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.verify|verify} messages. - * @param message KnowledgeBaseQuerySource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified InputDataset message. Does not implicitly {@link google.cloud.dialogflow.v2.InputDataset.verify|verify} messages. + * @param message InputDataset message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2.IInputDataset, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified KnowledgeBaseQuerySource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.verify|verify} messages. - * @param message KnowledgeBaseQuerySource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified InputDataset message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.InputDataset.verify|verify} messages. + * @param message InputDataset message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2.IInputDataset, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a KnowledgeBaseQuerySource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns KnowledgeBaseQuerySource - * @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.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource; + /** + * Decodes an InputDataset message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InputDataset + * @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.dialogflow.v2.InputDataset; - /** - * Decodes a KnowledgeBaseQuerySource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns KnowledgeBaseQuerySource - * @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.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource; + /** + * Decodes an InputDataset message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InputDataset + * @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.dialogflow.v2.InputDataset; - /** - * Verifies a KnowledgeBaseQuerySource 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); + /** + * Verifies an InputDataset 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 KnowledgeBaseQuerySource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns KnowledgeBaseQuerySource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource; + /** + * Creates an InputDataset message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InputDataset + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.InputDataset; - /** - * Creates a plain object from a KnowledgeBaseQuerySource message. Also converts values to other types if specified. - * @param message KnowledgeBaseQuerySource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from an InputDataset message. Also converts values to other types if specified. + * @param message InputDataset + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2.InputDataset, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this KnowledgeBaseQuerySource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this InputDataset to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for KnowledgeBaseQuerySource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Gets the default type url for InputDataset + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Properties of a DocumentQuerySource. */ - interface IDocumentQuerySource { + /** Properties of an ArticleSuggestionModelMetadata. */ + interface IArticleSuggestionModelMetadata { - /** DocumentQuerySource documents */ - documents?: (string[]|null); - } + /** ArticleSuggestionModelMetadata trainingModelType */ + trainingModelType?: (google.cloud.dialogflow.v2.ConversationModel.ModelType|keyof typeof google.cloud.dialogflow.v2.ConversationModel.ModelType|null); + } - /** Represents a DocumentQuerySource. */ - class DocumentQuerySource implements IDocumentQuerySource { + /** Represents an ArticleSuggestionModelMetadata. */ + class ArticleSuggestionModelMetadata implements IArticleSuggestionModelMetadata { - /** - * Constructs a new DocumentQuerySource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource); + /** + * Constructs a new ArticleSuggestionModelMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2.IArticleSuggestionModelMetadata); - /** DocumentQuerySource documents. */ - public documents: string[]; + /** ArticleSuggestionModelMetadata trainingModelType. */ + public trainingModelType: (google.cloud.dialogflow.v2.ConversationModel.ModelType|keyof typeof google.cloud.dialogflow.v2.ConversationModel.ModelType); - /** - * Creates a new DocumentQuerySource instance using the specified properties. - * @param [properties] Properties to set - * @returns DocumentQuerySource instance - */ - public static create(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource; + /** + * Creates a new ArticleSuggestionModelMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns ArticleSuggestionModelMetadata instance + */ + public static create(properties?: google.cloud.dialogflow.v2.IArticleSuggestionModelMetadata): google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata; - /** - * Encodes the specified DocumentQuerySource message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.verify|verify} messages. - * @param message DocumentQuerySource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ArticleSuggestionModelMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata.verify|verify} messages. + * @param message ArticleSuggestionModelMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2.IArticleSuggestionModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified DocumentQuerySource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.verify|verify} messages. - * @param message DocumentQuerySource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ArticleSuggestionModelMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata.verify|verify} messages. + * @param message ArticleSuggestionModelMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2.IArticleSuggestionModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a DocumentQuerySource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DocumentQuerySource - * @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.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource; + /** + * Decodes an ArticleSuggestionModelMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ArticleSuggestionModelMetadata + * @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.dialogflow.v2.ArticleSuggestionModelMetadata; - /** - * Decodes a DocumentQuerySource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DocumentQuerySource - * @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.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource; + /** + * Decodes an ArticleSuggestionModelMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ArticleSuggestionModelMetadata + * @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.dialogflow.v2.ArticleSuggestionModelMetadata; - /** - * Verifies a DocumentQuerySource 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); + /** + * Verifies an ArticleSuggestionModelMetadata 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 DocumentQuerySource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DocumentQuerySource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource; + /** + * Creates an ArticleSuggestionModelMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ArticleSuggestionModelMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata; - /** - * Creates a plain object from a DocumentQuerySource message. Also converts values to other types if specified. - * @param message DocumentQuerySource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from an ArticleSuggestionModelMetadata message. Also converts values to other types if specified. + * @param message ArticleSuggestionModelMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this DocumentQuerySource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this ArticleSuggestionModelMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for DocumentQuerySource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Gets the default type url for ArticleSuggestionModelMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Properties of a DialogflowQuerySource. */ - interface IDialogflowQuerySource { + /** Properties of a SmartReplyModelMetadata. */ + interface ISmartReplyModelMetadata { - /** DialogflowQuerySource agent */ - agent?: (string|null); - } + /** SmartReplyModelMetadata trainingModelType */ + trainingModelType?: (google.cloud.dialogflow.v2.ConversationModel.ModelType|keyof typeof google.cloud.dialogflow.v2.ConversationModel.ModelType|null); + } - /** Represents a DialogflowQuerySource. */ - class DialogflowQuerySource implements IDialogflowQuerySource { + /** Represents a SmartReplyModelMetadata. */ + class SmartReplyModelMetadata implements ISmartReplyModelMetadata { - /** - * Constructs a new DialogflowQuerySource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource); + /** + * Constructs a new SmartReplyModelMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2.ISmartReplyModelMetadata); - /** DialogflowQuerySource agent. */ - public agent: string; + /** SmartReplyModelMetadata trainingModelType. */ + public trainingModelType: (google.cloud.dialogflow.v2.ConversationModel.ModelType|keyof typeof google.cloud.dialogflow.v2.ConversationModel.ModelType); - /** - * Creates a new DialogflowQuerySource instance using the specified properties. - * @param [properties] Properties to set - * @returns DialogflowQuerySource instance - */ - public static create(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource; + /** + * Creates a new SmartReplyModelMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns SmartReplyModelMetadata instance + */ + public static create(properties?: google.cloud.dialogflow.v2.ISmartReplyModelMetadata): google.cloud.dialogflow.v2.SmartReplyModelMetadata; - /** - * Encodes the specified DialogflowQuerySource message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.verify|verify} messages. - * @param message DialogflowQuerySource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified SmartReplyModelMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.SmartReplyModelMetadata.verify|verify} messages. + * @param message SmartReplyModelMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2.ISmartReplyModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified DialogflowQuerySource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.verify|verify} messages. - * @param message DialogflowQuerySource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified SmartReplyModelMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.SmartReplyModelMetadata.verify|verify} messages. + * @param message SmartReplyModelMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2.ISmartReplyModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a DialogflowQuerySource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DialogflowQuerySource - * @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.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource; + /** + * Decodes a SmartReplyModelMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SmartReplyModelMetadata + * @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.dialogflow.v2.SmartReplyModelMetadata; - /** - * Decodes a DialogflowQuerySource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DialogflowQuerySource - * @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.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource; + /** + * Decodes a SmartReplyModelMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SmartReplyModelMetadata + * @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.dialogflow.v2.SmartReplyModelMetadata; - /** - * Verifies a DialogflowQuerySource 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); + /** + * Verifies a SmartReplyModelMetadata 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 DialogflowQuerySource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DialogflowQuerySource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource; + /** + * Creates a SmartReplyModelMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SmartReplyModelMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.SmartReplyModelMetadata; - /** - * Creates a plain object from a DialogflowQuerySource message. Also converts values to other types if specified. - * @param message DialogflowQuerySource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a SmartReplyModelMetadata message. Also converts values to other types if specified. + * @param message SmartReplyModelMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2.SmartReplyModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this DialogflowQuerySource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this SmartReplyModelMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for DialogflowQuerySource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Gets the default type url for SmartReplyModelMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Properties of a ContextFilterSettings. */ - interface IContextFilterSettings { + /** Properties of a SmartReplyMetrics. */ + interface ISmartReplyMetrics { - /** ContextFilterSettings dropHandoffMessages */ - dropHandoffMessages?: (boolean|null); + /** SmartReplyMetrics allowlistCoverage */ + allowlistCoverage?: (number|null); - /** ContextFilterSettings dropVirtualAgentMessages */ - dropVirtualAgentMessages?: (boolean|null); + /** SmartReplyMetrics topNMetrics */ + topNMetrics?: (google.cloud.dialogflow.v2.SmartReplyMetrics.ITopNMetrics[]|null); - /** ContextFilterSettings dropIvrMessages */ - dropIvrMessages?: (boolean|null); - } + /** SmartReplyMetrics conversationCount */ + conversationCount?: (number|Long|string|null); + } - /** Represents a ContextFilterSettings. */ - class ContextFilterSettings implements IContextFilterSettings { + /** Represents a SmartReplyMetrics. */ + class SmartReplyMetrics implements ISmartReplyMetrics { - /** - * Constructs a new ContextFilterSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings); + /** + * Constructs a new SmartReplyMetrics. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2.ISmartReplyMetrics); - /** ContextFilterSettings dropHandoffMessages. */ - public dropHandoffMessages: boolean; + /** SmartReplyMetrics allowlistCoverage. */ + public allowlistCoverage: number; - /** ContextFilterSettings dropVirtualAgentMessages. */ - public dropVirtualAgentMessages: boolean; + /** SmartReplyMetrics topNMetrics. */ + public topNMetrics: google.cloud.dialogflow.v2.SmartReplyMetrics.ITopNMetrics[]; - /** ContextFilterSettings dropIvrMessages. */ - public dropIvrMessages: boolean; + /** SmartReplyMetrics conversationCount. */ + public conversationCount: (number|Long|string); - /** - * Creates a new ContextFilterSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns ContextFilterSettings instance - */ - public static create(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings; + /** + * Creates a new SmartReplyMetrics instance using the specified properties. + * @param [properties] Properties to set + * @returns SmartReplyMetrics instance + */ + public static create(properties?: google.cloud.dialogflow.v2.ISmartReplyMetrics): google.cloud.dialogflow.v2.SmartReplyMetrics; - /** - * Encodes the specified ContextFilterSettings message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.verify|verify} messages. - * @param message ContextFilterSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified SmartReplyMetrics message. Does not implicitly {@link google.cloud.dialogflow.v2.SmartReplyMetrics.verify|verify} messages. + * @param message SmartReplyMetrics message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2.ISmartReplyMetrics, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ContextFilterSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.verify|verify} messages. - * @param message ContextFilterSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified SmartReplyMetrics message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.SmartReplyMetrics.verify|verify} messages. + * @param message SmartReplyMetrics message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2.ISmartReplyMetrics, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a ContextFilterSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ContextFilterSettings - * @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.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings; + /** + * Decodes a SmartReplyMetrics message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SmartReplyMetrics + * @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.dialogflow.v2.SmartReplyMetrics; - /** - * Decodes a ContextFilterSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ContextFilterSettings - * @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.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings; + /** + * Decodes a SmartReplyMetrics message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SmartReplyMetrics + * @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.dialogflow.v2.SmartReplyMetrics; - /** - * Verifies a ContextFilterSettings 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); + /** + * Verifies a SmartReplyMetrics 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 ContextFilterSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ContextFilterSettings - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings; + /** + * Creates a SmartReplyMetrics message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SmartReplyMetrics + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.SmartReplyMetrics; - /** - * Creates a plain object from a ContextFilterSettings message. Also converts values to other types if specified. - * @param message ContextFilterSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a SmartReplyMetrics message. Also converts values to other types if specified. + * @param message SmartReplyMetrics + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2.SmartReplyMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this ContextFilterSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this SmartReplyMetrics to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for ContextFilterSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** + * Gets the default type url for SmartReplyMetrics + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Properties of a ConversationModelConfig. */ - interface IConversationModelConfig { + namespace SmartReplyMetrics { - /** ConversationModelConfig model */ - model?: (string|null); + /** Properties of a TopNMetrics. */ + interface ITopNMetrics { + + /** TopNMetrics n */ + n?: (number|null); + + /** TopNMetrics recall */ + recall?: (number|null); } - /** Represents a ConversationModelConfig. */ - class ConversationModelConfig implements IConversationModelConfig { + /** Represents a TopNMetrics. */ + class TopNMetrics implements ITopNMetrics { /** - * Constructs a new ConversationModelConfig. + * Constructs a new TopNMetrics. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationModelConfig); + constructor(properties?: google.cloud.dialogflow.v2.SmartReplyMetrics.ITopNMetrics); - /** ConversationModelConfig model. */ - public model: string; + /** TopNMetrics n. */ + public n: number; + + /** TopNMetrics recall. */ + public recall: number; /** - * Creates a new ConversationModelConfig instance using the specified properties. + * Creates a new TopNMetrics instance using the specified properties. * @param [properties] Properties to set - * @returns ConversationModelConfig instance + * @returns TopNMetrics instance */ - public static create(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationModelConfig): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig; + public static create(properties?: google.cloud.dialogflow.v2.SmartReplyMetrics.ITopNMetrics): google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics; /** - * Encodes the specified ConversationModelConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig.verify|verify} messages. - * @param message ConversationModelConfig message or plain object to encode + * Encodes the specified TopNMetrics message. Does not implicitly {@link google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics.verify|verify} messages. + * @param message TopNMetrics message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationModelConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.SmartReplyMetrics.ITopNMetrics, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ConversationModelConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig.verify|verify} messages. - * @param message ConversationModelConfig message or plain object to encode + * Encodes the specified TopNMetrics message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics.verify|verify} messages. + * @param message TopNMetrics message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationModelConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.SmartReplyMetrics.ITopNMetrics, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ConversationModelConfig message from the specified reader or buffer. + * Decodes a TopNMetrics message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ConversationModelConfig + * @returns TopNMetrics * @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.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics; /** - * Decodes a ConversationModelConfig message from the specified reader or buffer, length delimited. + * Decodes a TopNMetrics message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ConversationModelConfig + * @returns TopNMetrics * @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.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics; /** - * Verifies a ConversationModelConfig message. + * Verifies a TopNMetrics 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 ConversationModelConfig message from a plain object. Also converts values to their respective internal types. + * Creates a TopNMetrics message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ConversationModelConfig + * @returns TopNMetrics */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics; /** - * Creates a plain object from a ConversationModelConfig message. Also converts values to other types if specified. - * @param message ConversationModelConfig + * Creates a plain object from a TopNMetrics message. Also converts values to other types if specified. + * @param message TopNMetrics * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ConversationModelConfig to JSON. + * Converts this TopNMetrics to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ConversationModelConfig + * Gets the default type url for TopNMetrics * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } + } - /** Properties of a ConversationProcessConfig. */ - interface IConversationProcessConfig { + /** Properties of a CreateConversationModelRequest. */ + interface ICreateConversationModelRequest { - /** ConversationProcessConfig recentSentencesCount */ - recentSentencesCount?: (number|null); - } + /** CreateConversationModelRequest parent */ + parent?: (string|null); - /** Represents a ConversationProcessConfig. */ - class ConversationProcessConfig implements IConversationProcessConfig { + /** CreateConversationModelRequest conversationModel */ + conversationModel?: (google.cloud.dialogflow.v2.IConversationModel|null); + } - /** - * Constructs a new ConversationProcessConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationProcessConfig); + /** Represents a CreateConversationModelRequest. */ + class CreateConversationModelRequest implements ICreateConversationModelRequest { - /** ConversationProcessConfig recentSentencesCount. */ - public recentSentencesCount: number; + /** + * Constructs a new CreateConversationModelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2.ICreateConversationModelRequest); - /** - * Creates a new ConversationProcessConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ConversationProcessConfig instance - */ - public static create(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationProcessConfig): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig; + /** CreateConversationModelRequest parent. */ + public parent: string; - /** - * Encodes the specified ConversationProcessConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig.verify|verify} messages. - * @param message ConversationProcessConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationProcessConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** CreateConversationModelRequest conversationModel. */ + public conversationModel?: (google.cloud.dialogflow.v2.IConversationModel|null); - /** - * Encodes the specified ConversationProcessConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig.verify|verify} messages. - * @param message ConversationProcessConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationProcessConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new CreateConversationModelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateConversationModelRequest instance + */ + public static create(properties?: google.cloud.dialogflow.v2.ICreateConversationModelRequest): google.cloud.dialogflow.v2.CreateConversationModelRequest; - /** - * Decodes a ConversationProcessConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConversationProcessConfig - * @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.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig; + /** + * Encodes the specified CreateConversationModelRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationModelRequest.verify|verify} messages. + * @param message CreateConversationModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2.ICreateConversationModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a ConversationProcessConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConversationProcessConfig - * @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.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig; + /** + * Encodes the specified CreateConversationModelRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationModelRequest.verify|verify} messages. + * @param message CreateConversationModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2.ICreateConversationModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a ConversationProcessConfig 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); + /** + * Decodes a CreateConversationModelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateConversationModelRequest + * @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.dialogflow.v2.CreateConversationModelRequest; - /** - * Creates a ConversationProcessConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConversationProcessConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig; + /** + * Decodes a CreateConversationModelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateConversationModelRequest + * @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.dialogflow.v2.CreateConversationModelRequest; - /** - * Creates a plain object from a ConversationProcessConfig message. Also converts values to other types if specified. - * @param message ConversationProcessConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a CreateConversationModelRequest 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); - /** - * Converts this ConversationProcessConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a CreateConversationModelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateConversationModelRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.CreateConversationModelRequest; - /** - * Gets the default type url for ConversationProcessConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a plain object from a CreateConversationModelRequest message. Also converts values to other types if specified. + * @param message CreateConversationModelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2.CreateConversationModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of a MessageAnalysisConfig. */ - interface IMessageAnalysisConfig { + /** + * Converts this CreateConversationModelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** MessageAnalysisConfig enableEntityExtraction */ - enableEntityExtraction?: (boolean|null); + /** + * Gets the default type url for CreateConversationModelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** MessageAnalysisConfig enableSentimentAnalysis */ - enableSentimentAnalysis?: (boolean|null); - } + /** Properties of a GetConversationModelRequest. */ + interface IGetConversationModelRequest { - /** Represents a MessageAnalysisConfig. */ - class MessageAnalysisConfig implements IMessageAnalysisConfig { + /** GetConversationModelRequest name */ + name?: (string|null); + } - /** - * Constructs a new MessageAnalysisConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IMessageAnalysisConfig); + /** Represents a GetConversationModelRequest. */ + class GetConversationModelRequest implements IGetConversationModelRequest { - /** MessageAnalysisConfig enableEntityExtraction. */ - public enableEntityExtraction: boolean; + /** + * Constructs a new GetConversationModelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2.IGetConversationModelRequest); - /** MessageAnalysisConfig enableSentimentAnalysis. */ - public enableSentimentAnalysis: boolean; + /** GetConversationModelRequest name. */ + public name: string; - /** - * Creates a new MessageAnalysisConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageAnalysisConfig instance - */ - public static create(properties?: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IMessageAnalysisConfig): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig; + /** + * Creates a new GetConversationModelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetConversationModelRequest instance + */ + public static create(properties?: google.cloud.dialogflow.v2.IGetConversationModelRequest): google.cloud.dialogflow.v2.GetConversationModelRequest; - /** - * Encodes the specified MessageAnalysisConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig.verify|verify} messages. - * @param message MessageAnalysisConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IMessageAnalysisConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified GetConversationModelRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.GetConversationModelRequest.verify|verify} messages. + * @param message GetConversationModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2.IGetConversationModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified MessageAnalysisConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig.verify|verify} messages. - * @param message MessageAnalysisConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IMessageAnalysisConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified GetConversationModelRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.GetConversationModelRequest.verify|verify} messages. + * @param message GetConversationModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2.IGetConversationModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a MessageAnalysisConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MessageAnalysisConfig - * @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.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig; + /** + * Decodes a GetConversationModelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetConversationModelRequest + * @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.dialogflow.v2.GetConversationModelRequest; - /** - * Decodes a MessageAnalysisConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageAnalysisConfig - * @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.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig; + /** + * Decodes a GetConversationModelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetConversationModelRequest + * @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.dialogflow.v2.GetConversationModelRequest; - /** - * Verifies a MessageAnalysisConfig 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); + /** + * Verifies a GetConversationModelRequest 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 MessageAnalysisConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageAnalysisConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig; + /** + * Creates a GetConversationModelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetConversationModelRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.GetConversationModelRequest; - /** - * Creates a plain object from a MessageAnalysisConfig message. Also converts values to other types if specified. - * @param message MessageAnalysisConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a GetConversationModelRequest message. Also converts values to other types if specified. + * @param message GetConversationModelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2.GetConversationModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this MessageAnalysisConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this GetConversationModelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for MessageAnalysisConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Gets the default type url for GetConversationModelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListConversationModelsRequest. */ + interface IListConversationModelsRequest { + + /** ListConversationModelsRequest parent */ + parent?: (string|null); + + /** ListConversationModelsRequest pageSize */ + pageSize?: (number|null); + + /** ListConversationModelsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListConversationModelsRequest. */ + class ListConversationModelsRequest implements IListConversationModelsRequest { + + /** + * Constructs a new ListConversationModelsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2.IListConversationModelsRequest); + + /** ListConversationModelsRequest parent. */ + public parent: string; + + /** ListConversationModelsRequest pageSize. */ + public pageSize: number; + + /** ListConversationModelsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListConversationModelsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListConversationModelsRequest instance + */ + public static create(properties?: google.cloud.dialogflow.v2.IListConversationModelsRequest): google.cloud.dialogflow.v2.ListConversationModelsRequest; + + /** + * Encodes the specified ListConversationModelsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationModelsRequest.verify|verify} messages. + * @param message ListConversationModelsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2.IListConversationModelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListConversationModelsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationModelsRequest.verify|verify} messages. + * @param message ListConversationModelsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2.IListConversationModelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListConversationModelsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListConversationModelsRequest + * @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.dialogflow.v2.ListConversationModelsRequest; + + /** + * Decodes a ListConversationModelsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListConversationModelsRequest + * @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.dialogflow.v2.ListConversationModelsRequest; + + /** + * Verifies a ListConversationModelsRequest 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 ListConversationModelsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListConversationModelsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ListConversationModelsRequest; + + /** + * Creates a plain object from a ListConversationModelsRequest message. Also converts values to other types if specified. + * @param message ListConversationModelsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2.ListConversationModelsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListConversationModelsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListConversationModelsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListConversationModelsResponse. */ + interface IListConversationModelsResponse { + + /** ListConversationModelsResponse conversationModels */ + conversationModels?: (google.cloud.dialogflow.v2.IConversationModel[]|null); + + /** ListConversationModelsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListConversationModelsResponse. */ + class ListConversationModelsResponse implements IListConversationModelsResponse { + + /** + * Constructs a new ListConversationModelsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2.IListConversationModelsResponse); + + /** ListConversationModelsResponse conversationModels. */ + public conversationModels: google.cloud.dialogflow.v2.IConversationModel[]; + + /** ListConversationModelsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListConversationModelsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListConversationModelsResponse instance + */ + public static create(properties?: google.cloud.dialogflow.v2.IListConversationModelsResponse): google.cloud.dialogflow.v2.ListConversationModelsResponse; + + /** + * Encodes the specified ListConversationModelsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationModelsResponse.verify|verify} messages. + * @param message ListConversationModelsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2.IListConversationModelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListConversationModelsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationModelsResponse.verify|verify} messages. + * @param message ListConversationModelsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2.IListConversationModelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListConversationModelsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListConversationModelsResponse + * @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.dialogflow.v2.ListConversationModelsResponse; + + /** + * Decodes a ListConversationModelsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListConversationModelsResponse + * @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.dialogflow.v2.ListConversationModelsResponse; + + /** + * Verifies a ListConversationModelsResponse 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 ListConversationModelsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListConversationModelsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ListConversationModelsResponse; + + /** + * Creates a plain object from a ListConversationModelsResponse message. Also converts values to other types if specified. + * @param message ListConversationModelsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2.ListConversationModelsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListConversationModelsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListConversationModelsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteConversationModelRequest. */ + interface IDeleteConversationModelRequest { + + /** DeleteConversationModelRequest name */ + name?: (string|null); + } + + /** Represents a DeleteConversationModelRequest. */ + class DeleteConversationModelRequest implements IDeleteConversationModelRequest { + + /** + * Constructs a new DeleteConversationModelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2.IDeleteConversationModelRequest); + + /** DeleteConversationModelRequest name. */ + public name: string; + + /** + * Creates a new DeleteConversationModelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteConversationModelRequest instance + */ + public static create(properties?: google.cloud.dialogflow.v2.IDeleteConversationModelRequest): google.cloud.dialogflow.v2.DeleteConversationModelRequest; + + /** + * Encodes the specified DeleteConversationModelRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationModelRequest.verify|verify} messages. + * @param message DeleteConversationModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2.IDeleteConversationModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteConversationModelRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationModelRequest.verify|verify} messages. + * @param message DeleteConversationModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2.IDeleteConversationModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteConversationModelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteConversationModelRequest + * @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.dialogflow.v2.DeleteConversationModelRequest; + + /** + * Decodes a DeleteConversationModelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteConversationModelRequest + * @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.dialogflow.v2.DeleteConversationModelRequest; + + /** + * Verifies a DeleteConversationModelRequest 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 DeleteConversationModelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteConversationModelRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.DeleteConversationModelRequest; + + /** + * Creates a plain object from a DeleteConversationModelRequest message. Also converts values to other types if specified. + * @param message DeleteConversationModelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2.DeleteConversationModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteConversationModelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteConversationModelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeployConversationModelRequest. */ + interface IDeployConversationModelRequest { + + /** DeployConversationModelRequest name */ + name?: (string|null); + } + + /** Represents a DeployConversationModelRequest. */ + class DeployConversationModelRequest implements IDeployConversationModelRequest { + + /** + * Constructs a new DeployConversationModelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2.IDeployConversationModelRequest); + + /** DeployConversationModelRequest name. */ + public name: string; + + /** + * Creates a new DeployConversationModelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeployConversationModelRequest instance + */ + public static create(properties?: google.cloud.dialogflow.v2.IDeployConversationModelRequest): google.cloud.dialogflow.v2.DeployConversationModelRequest; + + /** + * Encodes the specified DeployConversationModelRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.DeployConversationModelRequest.verify|verify} messages. + * @param message DeployConversationModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2.IDeployConversationModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeployConversationModelRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.DeployConversationModelRequest.verify|verify} messages. + * @param message DeployConversationModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2.IDeployConversationModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeployConversationModelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeployConversationModelRequest + * @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.dialogflow.v2.DeployConversationModelRequest; + + /** + * Decodes a DeployConversationModelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeployConversationModelRequest + * @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.dialogflow.v2.DeployConversationModelRequest; + + /** + * Verifies a DeployConversationModelRequest 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 DeployConversationModelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeployConversationModelRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.DeployConversationModelRequest; + + /** + * Creates a plain object from a DeployConversationModelRequest message. Also converts values to other types if specified. + * @param message DeployConversationModelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2.DeployConversationModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeployConversationModelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeployConversationModelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UndeployConversationModelRequest. */ + interface IUndeployConversationModelRequest { + + /** UndeployConversationModelRequest name */ + name?: (string|null); + } + + /** Represents an UndeployConversationModelRequest. */ + class UndeployConversationModelRequest implements IUndeployConversationModelRequest { + + /** + * Constructs a new UndeployConversationModelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2.IUndeployConversationModelRequest); + + /** UndeployConversationModelRequest name. */ + public name: string; + + /** + * Creates a new UndeployConversationModelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UndeployConversationModelRequest instance + */ + public static create(properties?: google.cloud.dialogflow.v2.IUndeployConversationModelRequest): google.cloud.dialogflow.v2.UndeployConversationModelRequest; + + /** + * Encodes the specified UndeployConversationModelRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.UndeployConversationModelRequest.verify|verify} messages. + * @param message UndeployConversationModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2.IUndeployConversationModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UndeployConversationModelRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.UndeployConversationModelRequest.verify|verify} messages. + * @param message UndeployConversationModelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2.IUndeployConversationModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UndeployConversationModelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UndeployConversationModelRequest + * @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.dialogflow.v2.UndeployConversationModelRequest; + + /** + * Decodes an UndeployConversationModelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UndeployConversationModelRequest + * @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.dialogflow.v2.UndeployConversationModelRequest; + + /** + * Verifies an UndeployConversationModelRequest 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 UndeployConversationModelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UndeployConversationModelRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.UndeployConversationModelRequest; + + /** + * Creates a plain object from an UndeployConversationModelRequest message. Also converts values to other types if specified. + * @param message UndeployConversationModelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2.UndeployConversationModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UndeployConversationModelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UndeployConversationModelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetConversationModelEvaluationRequest. */ + interface IGetConversationModelEvaluationRequest { + + /** GetConversationModelEvaluationRequest name */ + name?: (string|null); + } + + /** Represents a GetConversationModelEvaluationRequest. */ + class GetConversationModelEvaluationRequest implements IGetConversationModelEvaluationRequest { + + /** + * Constructs a new GetConversationModelEvaluationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2.IGetConversationModelEvaluationRequest); + + /** GetConversationModelEvaluationRequest name. */ + public name: string; + + /** + * Creates a new GetConversationModelEvaluationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetConversationModelEvaluationRequest instance + */ + public static create(properties?: google.cloud.dialogflow.v2.IGetConversationModelEvaluationRequest): google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest; + + /** + * Encodes the specified GetConversationModelEvaluationRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest.verify|verify} messages. + * @param message GetConversationModelEvaluationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2.IGetConversationModelEvaluationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetConversationModelEvaluationRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest.verify|verify} messages. + * @param message GetConversationModelEvaluationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2.IGetConversationModelEvaluationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetConversationModelEvaluationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetConversationModelEvaluationRequest + * @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.dialogflow.v2.GetConversationModelEvaluationRequest; + + /** + * Decodes a GetConversationModelEvaluationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetConversationModelEvaluationRequest + * @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.dialogflow.v2.GetConversationModelEvaluationRequest; + + /** + * Verifies a GetConversationModelEvaluationRequest 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 GetConversationModelEvaluationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetConversationModelEvaluationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest; + + /** + * Creates a plain object from a GetConversationModelEvaluationRequest message. Also converts values to other types if specified. + * @param message GetConversationModelEvaluationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetConversationModelEvaluationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetConversationModelEvaluationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a HumanAgentHandoffConfig. */ - interface IHumanAgentHandoffConfig { + /** Properties of a ListConversationModelEvaluationsRequest. */ + interface IListConversationModelEvaluationsRequest { - /** HumanAgentHandoffConfig livePersonConfig */ - livePersonConfig?: (google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ILivePersonConfig|null); + /** ListConversationModelEvaluationsRequest parent */ + parent?: (string|null); - /** HumanAgentHandoffConfig salesforceLiveAgentConfig */ - salesforceLiveAgentConfig?: (google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig|null); + /** ListConversationModelEvaluationsRequest pageSize */ + pageSize?: (number|null); + + /** ListConversationModelEvaluationsRequest pageToken */ + pageToken?: (string|null); } - /** Represents a HumanAgentHandoffConfig. */ - class HumanAgentHandoffConfig implements IHumanAgentHandoffConfig { + /** Represents a ListConversationModelEvaluationsRequest. */ + class ListConversationModelEvaluationsRequest implements IListConversationModelEvaluationsRequest { /** - * Constructs a new HumanAgentHandoffConfig. + * Constructs a new ListConversationModelEvaluationsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.IHumanAgentHandoffConfig); + constructor(properties?: google.cloud.dialogflow.v2.IListConversationModelEvaluationsRequest); - /** HumanAgentHandoffConfig livePersonConfig. */ - public livePersonConfig?: (google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ILivePersonConfig|null); + /** ListConversationModelEvaluationsRequest parent. */ + public parent: string; - /** HumanAgentHandoffConfig salesforceLiveAgentConfig. */ - public salesforceLiveAgentConfig?: (google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig|null); + /** ListConversationModelEvaluationsRequest pageSize. */ + public pageSize: number; - /** HumanAgentHandoffConfig agentService. */ - public agentService?: ("livePersonConfig"|"salesforceLiveAgentConfig"); + /** ListConversationModelEvaluationsRequest pageToken. */ + public pageToken: string; /** - * Creates a new HumanAgentHandoffConfig instance using the specified properties. + * Creates a new ListConversationModelEvaluationsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns HumanAgentHandoffConfig instance + * @returns ListConversationModelEvaluationsRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2.IHumanAgentHandoffConfig): google.cloud.dialogflow.v2.HumanAgentHandoffConfig; + public static create(properties?: google.cloud.dialogflow.v2.IListConversationModelEvaluationsRequest): google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest; /** - * Encodes the specified HumanAgentHandoffConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentHandoffConfig.verify|verify} messages. - * @param message HumanAgentHandoffConfig message or plain object to encode + * Encodes the specified ListConversationModelEvaluationsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest.verify|verify} messages. + * @param message ListConversationModelEvaluationsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.IHumanAgentHandoffConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.IListConversationModelEvaluationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified HumanAgentHandoffConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentHandoffConfig.verify|verify} messages. - * @param message HumanAgentHandoffConfig message or plain object to encode + * Encodes the specified ListConversationModelEvaluationsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest.verify|verify} messages. + * @param message ListConversationModelEvaluationsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IHumanAgentHandoffConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.IListConversationModelEvaluationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a HumanAgentHandoffConfig message from the specified reader or buffer. + * Decodes a ListConversationModelEvaluationsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns HumanAgentHandoffConfig + * @returns ListConversationModelEvaluationsRequest * @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.dialogflow.v2.HumanAgentHandoffConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest; /** - * Decodes a HumanAgentHandoffConfig message from the specified reader or buffer, length delimited. + * Decodes a ListConversationModelEvaluationsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns HumanAgentHandoffConfig + * @returns ListConversationModelEvaluationsRequest * @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.dialogflow.v2.HumanAgentHandoffConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest; /** - * Verifies a HumanAgentHandoffConfig message. + * Verifies a ListConversationModelEvaluationsRequest 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 HumanAgentHandoffConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ListConversationModelEvaluationsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns HumanAgentHandoffConfig + * @returns ListConversationModelEvaluationsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.HumanAgentHandoffConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest; /** - * Creates a plain object from a HumanAgentHandoffConfig message. Also converts values to other types if specified. - * @param message HumanAgentHandoffConfig + * Creates a plain object from a ListConversationModelEvaluationsRequest message. Also converts values to other types if specified. + * @param message ListConversationModelEvaluationsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.HumanAgentHandoffConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this HumanAgentHandoffConfig to JSON. + * Converts this ListConversationModelEvaluationsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for HumanAgentHandoffConfig + * Gets the default type url for ListConversationModelEvaluationsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace HumanAgentHandoffConfig { - - /** Properties of a LivePersonConfig. */ - interface ILivePersonConfig { - - /** LivePersonConfig accountNumber */ - accountNumber?: (string|null); - } - - /** Represents a LivePersonConfig. */ - class LivePersonConfig implements ILivePersonConfig { - - /** - * Constructs a new LivePersonConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ILivePersonConfig); - - /** LivePersonConfig accountNumber. */ - public accountNumber: string; - - /** - * Creates a new LivePersonConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns LivePersonConfig instance - */ - public static create(properties?: google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ILivePersonConfig): google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig; - - /** - * Encodes the specified LivePersonConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig.verify|verify} messages. - * @param message LivePersonConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ILivePersonConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LivePersonConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig.verify|verify} messages. - * @param message LivePersonConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ILivePersonConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LivePersonConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LivePersonConfig - * @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.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig; - - /** - * Decodes a LivePersonConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LivePersonConfig - * @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.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig; - - /** - * Verifies a LivePersonConfig 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 LivePersonConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LivePersonConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig; - - /** - * Creates a plain object from a LivePersonConfig message. Also converts values to other types if specified. - * @param message LivePersonConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LivePersonConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LivePersonConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SalesforceLiveAgentConfig. */ - interface ISalesforceLiveAgentConfig { - - /** SalesforceLiveAgentConfig organizationId */ - organizationId?: (string|null); - - /** SalesforceLiveAgentConfig deploymentId */ - deploymentId?: (string|null); - - /** SalesforceLiveAgentConfig buttonId */ - buttonId?: (string|null); - - /** SalesforceLiveAgentConfig endpointDomain */ - endpointDomain?: (string|null); - } - - /** Represents a SalesforceLiveAgentConfig. */ - class SalesforceLiveAgentConfig implements ISalesforceLiveAgentConfig { - - /** - * Constructs a new SalesforceLiveAgentConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig); - - /** SalesforceLiveAgentConfig organizationId. */ - public organizationId: string; - - /** SalesforceLiveAgentConfig deploymentId. */ - public deploymentId: string; - - /** SalesforceLiveAgentConfig buttonId. */ - public buttonId: string; - - /** SalesforceLiveAgentConfig endpointDomain. */ - public endpointDomain: string; - - /** - * Creates a new SalesforceLiveAgentConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns SalesforceLiveAgentConfig instance - */ - public static create(properties?: google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig): google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig; - - /** - * Encodes the specified SalesforceLiveAgentConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.verify|verify} messages. - * @param message SalesforceLiveAgentConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SalesforceLiveAgentConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.verify|verify} messages. - * @param message SalesforceLiveAgentConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SalesforceLiveAgentConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SalesforceLiveAgentConfig - * @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.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig; - - /** - * Decodes a SalesforceLiveAgentConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SalesforceLiveAgentConfig - * @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.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig; - - /** - * Verifies a SalesforceLiveAgentConfig 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 SalesforceLiveAgentConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SalesforceLiveAgentConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig; - - /** - * Creates a plain object from a SalesforceLiveAgentConfig message. Also converts values to other types if specified. - * @param message SalesforceLiveAgentConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SalesforceLiveAgentConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SalesforceLiveAgentConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a NotificationConfig. */ - interface INotificationConfig { + /** Properties of a ListConversationModelEvaluationsResponse. */ + interface IListConversationModelEvaluationsResponse { - /** NotificationConfig topic */ - topic?: (string|null); + /** ListConversationModelEvaluationsResponse conversationModelEvaluations */ + conversationModelEvaluations?: (google.cloud.dialogflow.v2.IConversationModelEvaluation[]|null); - /** NotificationConfig messageFormat */ - messageFormat?: (google.cloud.dialogflow.v2.NotificationConfig.MessageFormat|keyof typeof google.cloud.dialogflow.v2.NotificationConfig.MessageFormat|null); + /** ListConversationModelEvaluationsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a NotificationConfig. */ - class NotificationConfig implements INotificationConfig { + /** Represents a ListConversationModelEvaluationsResponse. */ + class ListConversationModelEvaluationsResponse implements IListConversationModelEvaluationsResponse { /** - * Constructs a new NotificationConfig. + * Constructs a new ListConversationModelEvaluationsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.INotificationConfig); + constructor(properties?: google.cloud.dialogflow.v2.IListConversationModelEvaluationsResponse); - /** NotificationConfig topic. */ - public topic: string; + /** ListConversationModelEvaluationsResponse conversationModelEvaluations. */ + public conversationModelEvaluations: google.cloud.dialogflow.v2.IConversationModelEvaluation[]; - /** NotificationConfig messageFormat. */ - public messageFormat: (google.cloud.dialogflow.v2.NotificationConfig.MessageFormat|keyof typeof google.cloud.dialogflow.v2.NotificationConfig.MessageFormat); + /** ListConversationModelEvaluationsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new NotificationConfig instance using the specified properties. + * Creates a new ListConversationModelEvaluationsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns NotificationConfig instance + * @returns ListConversationModelEvaluationsResponse instance */ - public static create(properties?: google.cloud.dialogflow.v2.INotificationConfig): google.cloud.dialogflow.v2.NotificationConfig; + public static create(properties?: google.cloud.dialogflow.v2.IListConversationModelEvaluationsResponse): google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse; /** - * Encodes the specified NotificationConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.NotificationConfig.verify|verify} messages. - * @param message NotificationConfig message or plain object to encode + * Encodes the specified ListConversationModelEvaluationsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse.verify|verify} messages. + * @param message ListConversationModelEvaluationsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.INotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.IListConversationModelEvaluationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified NotificationConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.NotificationConfig.verify|verify} messages. - * @param message NotificationConfig message or plain object to encode + * Encodes the specified ListConversationModelEvaluationsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse.verify|verify} messages. + * @param message ListConversationModelEvaluationsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.INotificationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.IListConversationModelEvaluationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NotificationConfig message from the specified reader or buffer. + * Decodes a ListConversationModelEvaluationsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NotificationConfig + * @returns ListConversationModelEvaluationsResponse * @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.dialogflow.v2.NotificationConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse; /** - * Decodes a NotificationConfig message from the specified reader or buffer, length delimited. + * Decodes a ListConversationModelEvaluationsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NotificationConfig + * @returns ListConversationModelEvaluationsResponse * @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.dialogflow.v2.NotificationConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse; /** - * Verifies a NotificationConfig message. + * Verifies a ListConversationModelEvaluationsResponse 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 NotificationConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ListConversationModelEvaluationsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NotificationConfig + * @returns ListConversationModelEvaluationsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.NotificationConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse; /** - * Creates a plain object from a NotificationConfig message. Also converts values to other types if specified. - * @param message NotificationConfig + * Creates a plain object from a ListConversationModelEvaluationsResponse message. Also converts values to other types if specified. + * @param message ListConversationModelEvaluationsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.NotificationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NotificationConfig to JSON. + * Converts this ListConversationModelEvaluationsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for NotificationConfig + * Gets the default type url for ListConversationModelEvaluationsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace NotificationConfig { - - /** MessageFormat enum. */ - enum MessageFormat { - MESSAGE_FORMAT_UNSPECIFIED = 0, - PROTO = 1, - JSON = 2 - } - } + /** Properties of a CreateConversationModelEvaluationRequest. */ + interface ICreateConversationModelEvaluationRequest { - /** Properties of a LoggingConfig. */ - interface ILoggingConfig { + /** CreateConversationModelEvaluationRequest parent */ + parent?: (string|null); - /** LoggingConfig enableStackdriverLogging */ - enableStackdriverLogging?: (boolean|null); + /** CreateConversationModelEvaluationRequest conversationModelEvaluation */ + conversationModelEvaluation?: (google.cloud.dialogflow.v2.IConversationModelEvaluation|null); } - /** Represents a LoggingConfig. */ - class LoggingConfig implements ILoggingConfig { + /** Represents a CreateConversationModelEvaluationRequest. */ + class CreateConversationModelEvaluationRequest implements ICreateConversationModelEvaluationRequest { /** - * Constructs a new LoggingConfig. + * Constructs a new CreateConversationModelEvaluationRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.ILoggingConfig); + constructor(properties?: google.cloud.dialogflow.v2.ICreateConversationModelEvaluationRequest); - /** LoggingConfig enableStackdriverLogging. */ - public enableStackdriverLogging: boolean; + /** CreateConversationModelEvaluationRequest parent. */ + public parent: string; + + /** CreateConversationModelEvaluationRequest conversationModelEvaluation. */ + public conversationModelEvaluation?: (google.cloud.dialogflow.v2.IConversationModelEvaluation|null); /** - * Creates a new LoggingConfig instance using the specified properties. + * Creates a new CreateConversationModelEvaluationRequest instance using the specified properties. * @param [properties] Properties to set - * @returns LoggingConfig instance + * @returns CreateConversationModelEvaluationRequest instance */ - public static create(properties?: google.cloud.dialogflow.v2.ILoggingConfig): google.cloud.dialogflow.v2.LoggingConfig; + public static create(properties?: google.cloud.dialogflow.v2.ICreateConversationModelEvaluationRequest): google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest; /** - * Encodes the specified LoggingConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.LoggingConfig.verify|verify} messages. - * @param message LoggingConfig message or plain object to encode + * Encodes the specified CreateConversationModelEvaluationRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest.verify|verify} messages. + * @param message CreateConversationModelEvaluationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.ILoggingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.ICreateConversationModelEvaluationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LoggingConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.LoggingConfig.verify|verify} messages. - * @param message LoggingConfig message or plain object to encode + * Encodes the specified CreateConversationModelEvaluationRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest.verify|verify} messages. + * @param message CreateConversationModelEvaluationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.ILoggingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.ICreateConversationModelEvaluationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LoggingConfig message from the specified reader or buffer. + * Decodes a CreateConversationModelEvaluationRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LoggingConfig + * @returns CreateConversationModelEvaluationRequest * @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.dialogflow.v2.LoggingConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest; /** - * Decodes a LoggingConfig message from the specified reader or buffer, length delimited. + * Decodes a CreateConversationModelEvaluationRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LoggingConfig + * @returns CreateConversationModelEvaluationRequest * @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.dialogflow.v2.LoggingConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest; /** - * Verifies a LoggingConfig message. + * Verifies a CreateConversationModelEvaluationRequest 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 LoggingConfig message from a plain object. Also converts values to their respective internal types. + * Creates a CreateConversationModelEvaluationRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LoggingConfig + * @returns CreateConversationModelEvaluationRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.LoggingConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest; /** - * Creates a plain object from a LoggingConfig message. Also converts values to other types if specified. - * @param message LoggingConfig + * Creates a plain object from a CreateConversationModelEvaluationRequest message. Also converts values to other types if specified. + * @param message CreateConversationModelEvaluationRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.LoggingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LoggingConfig to JSON. + * Converts this CreateConversationModelEvaluationRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for LoggingConfig + * Gets the default type url for CreateConversationModelEvaluationRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SuggestionFeature. */ - interface ISuggestionFeature { + /** Properties of a CreateConversationModelOperationMetadata. */ + interface ICreateConversationModelOperationMetadata { - /** SuggestionFeature type */ - type?: (google.cloud.dialogflow.v2.SuggestionFeature.Type|keyof typeof google.cloud.dialogflow.v2.SuggestionFeature.Type|null); + /** CreateConversationModelOperationMetadata conversationModel */ + conversationModel?: (string|null); + + /** CreateConversationModelOperationMetadata state */ + state?: (google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.State|keyof typeof google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.State|null); + + /** CreateConversationModelOperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); } - /** Represents a SuggestionFeature. */ - class SuggestionFeature implements ISuggestionFeature { + /** Represents a CreateConversationModelOperationMetadata. */ + class CreateConversationModelOperationMetadata implements ICreateConversationModelOperationMetadata { /** - * Constructs a new SuggestionFeature. + * Constructs a new CreateConversationModelOperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.ISuggestionFeature); + constructor(properties?: google.cloud.dialogflow.v2.ICreateConversationModelOperationMetadata); - /** SuggestionFeature type. */ - public type: (google.cloud.dialogflow.v2.SuggestionFeature.Type|keyof typeof google.cloud.dialogflow.v2.SuggestionFeature.Type); + /** CreateConversationModelOperationMetadata conversationModel. */ + public conversationModel: string; + + /** CreateConversationModelOperationMetadata state. */ + public state: (google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.State|keyof typeof google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.State); + + /** CreateConversationModelOperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new SuggestionFeature instance using the specified properties. + * Creates a new CreateConversationModelOperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns SuggestionFeature instance + * @returns CreateConversationModelOperationMetadata instance */ - public static create(properties?: google.cloud.dialogflow.v2.ISuggestionFeature): google.cloud.dialogflow.v2.SuggestionFeature; + public static create(properties?: google.cloud.dialogflow.v2.ICreateConversationModelOperationMetadata): google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata; /** - * Encodes the specified SuggestionFeature message. Does not implicitly {@link google.cloud.dialogflow.v2.SuggestionFeature.verify|verify} messages. - * @param message SuggestionFeature message or plain object to encode + * Encodes the specified CreateConversationModelOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.verify|verify} messages. + * @param message CreateConversationModelOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.ISuggestionFeature, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.ICreateConversationModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SuggestionFeature message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.SuggestionFeature.verify|verify} messages. - * @param message SuggestionFeature message or plain object to encode + * Encodes the specified CreateConversationModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.verify|verify} messages. + * @param message CreateConversationModelOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.ISuggestionFeature, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.ICreateConversationModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SuggestionFeature message from the specified reader or buffer. + * Decodes a CreateConversationModelOperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SuggestionFeature + * @returns CreateConversationModelOperationMetadata * @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.dialogflow.v2.SuggestionFeature; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata; /** - * Decodes a SuggestionFeature message from the specified reader or buffer, length delimited. + * Decodes a CreateConversationModelOperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SuggestionFeature + * @returns CreateConversationModelOperationMetadata * @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.dialogflow.v2.SuggestionFeature; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata; /** - * Verifies a SuggestionFeature message. + * Verifies a CreateConversationModelOperationMetadata 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 SuggestionFeature message from a plain object. Also converts values to their respective internal types. + * Creates a CreateConversationModelOperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SuggestionFeature + * @returns CreateConversationModelOperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.SuggestionFeature; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata; /** - * Creates a plain object from a SuggestionFeature message. Also converts values to other types if specified. - * @param message SuggestionFeature + * Creates a plain object from a CreateConversationModelOperationMetadata message. Also converts values to other types if specified. + * @param message CreateConversationModelOperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.SuggestionFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SuggestionFeature to JSON. + * Converts this CreateConversationModelOperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SuggestionFeature + * Gets the default type url for CreateConversationModelOperationMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace SuggestionFeature { + namespace CreateConversationModelOperationMetadata { - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - ARTICLE_SUGGESTION = 1, - FAQ = 2, - SMART_REPLY = 3 + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + PENDING = 1, + SUCCEEDED = 2, + FAILED = 3, + CANCELLED = 4, + CANCELLING = 5, + TRAINING = 6 } } - /** Properties of a SetSuggestionFeatureConfigRequest. */ - interface ISetSuggestionFeatureConfigRequest { - - /** SetSuggestionFeatureConfigRequest conversationProfile */ - conversationProfile?: (string|null); + /** Properties of a DeployConversationModelOperationMetadata. */ + interface IDeployConversationModelOperationMetadata { - /** SetSuggestionFeatureConfigRequest participantRole */ - participantRole?: (google.cloud.dialogflow.v2.Participant.Role|keyof typeof google.cloud.dialogflow.v2.Participant.Role|null); + /** DeployConversationModelOperationMetadata conversationModel */ + conversationModel?: (string|null); - /** SetSuggestionFeatureConfigRequest suggestionFeatureConfig */ - suggestionFeatureConfig?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionFeatureConfig|null); + /** DeployConversationModelOperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); } - /** Represents a SetSuggestionFeatureConfigRequest. */ - class SetSuggestionFeatureConfigRequest implements ISetSuggestionFeatureConfigRequest { + /** Represents a DeployConversationModelOperationMetadata. */ + class DeployConversationModelOperationMetadata implements IDeployConversationModelOperationMetadata { /** - * Constructs a new SetSuggestionFeatureConfigRequest. + * Constructs a new DeployConversationModelOperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigRequest); - - /** SetSuggestionFeatureConfigRequest conversationProfile. */ - public conversationProfile: string; + constructor(properties?: google.cloud.dialogflow.v2.IDeployConversationModelOperationMetadata); - /** SetSuggestionFeatureConfigRequest participantRole. */ - public participantRole: (google.cloud.dialogflow.v2.Participant.Role|keyof typeof google.cloud.dialogflow.v2.Participant.Role); + /** DeployConversationModelOperationMetadata conversationModel. */ + public conversationModel: string; - /** SetSuggestionFeatureConfigRequest suggestionFeatureConfig. */ - public suggestionFeatureConfig?: (google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionFeatureConfig|null); + /** DeployConversationModelOperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new SetSuggestionFeatureConfigRequest instance using the specified properties. + * Creates a new DeployConversationModelOperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns SetSuggestionFeatureConfigRequest instance + * @returns DeployConversationModelOperationMetadata instance */ - public static create(properties?: google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigRequest): google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest; + public static create(properties?: google.cloud.dialogflow.v2.IDeployConversationModelOperationMetadata): google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata; /** - * Encodes the specified SetSuggestionFeatureConfigRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest.verify|verify} messages. - * @param message SetSuggestionFeatureConfigRequest message or plain object to encode + * Encodes the specified DeployConversationModelOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata.verify|verify} messages. + * @param message DeployConversationModelOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.IDeployConversationModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SetSuggestionFeatureConfigRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest.verify|verify} messages. - * @param message SetSuggestionFeatureConfigRequest message or plain object to encode + * Encodes the specified DeployConversationModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata.verify|verify} messages. + * @param message DeployConversationModelOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.IDeployConversationModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SetSuggestionFeatureConfigRequest message from the specified reader or buffer. + * Decodes a DeployConversationModelOperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SetSuggestionFeatureConfigRequest + * @returns DeployConversationModelOperationMetadata * @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.dialogflow.v2.SetSuggestionFeatureConfigRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata; /** - * Decodes a SetSuggestionFeatureConfigRequest message from the specified reader or buffer, length delimited. + * Decodes a DeployConversationModelOperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SetSuggestionFeatureConfigRequest + * @returns DeployConversationModelOperationMetadata * @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.dialogflow.v2.SetSuggestionFeatureConfigRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata; /** - * Verifies a SetSuggestionFeatureConfigRequest message. + * Verifies a DeployConversationModelOperationMetadata 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 SetSuggestionFeatureConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeployConversationModelOperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SetSuggestionFeatureConfigRequest + * @returns DeployConversationModelOperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata; /** - * Creates a plain object from a SetSuggestionFeatureConfigRequest message. Also converts values to other types if specified. - * @param message SetSuggestionFeatureConfigRequest + * Creates a plain object from a DeployConversationModelOperationMetadata message. Also converts values to other types if specified. + * @param message DeployConversationModelOperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SetSuggestionFeatureConfigRequest to JSON. + * Converts this DeployConversationModelOperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SetSuggestionFeatureConfigRequest + * Gets the default type url for DeployConversationModelOperationMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ClearSuggestionFeatureConfigRequest. */ - interface IClearSuggestionFeatureConfigRequest { - - /** ClearSuggestionFeatureConfigRequest conversationProfile */ - conversationProfile?: (string|null); + /** Properties of an UndeployConversationModelOperationMetadata. */ + interface IUndeployConversationModelOperationMetadata { - /** ClearSuggestionFeatureConfigRequest participantRole */ - participantRole?: (google.cloud.dialogflow.v2.Participant.Role|keyof typeof google.cloud.dialogflow.v2.Participant.Role|null); + /** UndeployConversationModelOperationMetadata conversationModel */ + conversationModel?: (string|null); - /** ClearSuggestionFeatureConfigRequest suggestionFeatureType */ - suggestionFeatureType?: (google.cloud.dialogflow.v2.SuggestionFeature.Type|keyof typeof google.cloud.dialogflow.v2.SuggestionFeature.Type|null); + /** UndeployConversationModelOperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); } - /** Represents a ClearSuggestionFeatureConfigRequest. */ - class ClearSuggestionFeatureConfigRequest implements IClearSuggestionFeatureConfigRequest { + /** Represents an UndeployConversationModelOperationMetadata. */ + class UndeployConversationModelOperationMetadata implements IUndeployConversationModelOperationMetadata { /** - * Constructs a new ClearSuggestionFeatureConfigRequest. + * Constructs a new UndeployConversationModelOperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigRequest); - - /** ClearSuggestionFeatureConfigRequest conversationProfile. */ - public conversationProfile: string; + constructor(properties?: google.cloud.dialogflow.v2.IUndeployConversationModelOperationMetadata); - /** ClearSuggestionFeatureConfigRequest participantRole. */ - public participantRole: (google.cloud.dialogflow.v2.Participant.Role|keyof typeof google.cloud.dialogflow.v2.Participant.Role); + /** UndeployConversationModelOperationMetadata conversationModel. */ + public conversationModel: string; - /** ClearSuggestionFeatureConfigRequest suggestionFeatureType. */ - public suggestionFeatureType: (google.cloud.dialogflow.v2.SuggestionFeature.Type|keyof typeof google.cloud.dialogflow.v2.SuggestionFeature.Type); + /** UndeployConversationModelOperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new ClearSuggestionFeatureConfigRequest instance using the specified properties. + * Creates a new UndeployConversationModelOperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns ClearSuggestionFeatureConfigRequest instance + * @returns UndeployConversationModelOperationMetadata instance */ - public static create(properties?: google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigRequest): google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest; + public static create(properties?: google.cloud.dialogflow.v2.IUndeployConversationModelOperationMetadata): google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata; /** - * Encodes the specified ClearSuggestionFeatureConfigRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest.verify|verify} messages. - * @param message ClearSuggestionFeatureConfigRequest message or plain object to encode + * Encodes the specified UndeployConversationModelOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata.verify|verify} messages. + * @param message UndeployConversationModelOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.IUndeployConversationModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ClearSuggestionFeatureConfigRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest.verify|verify} messages. - * @param message ClearSuggestionFeatureConfigRequest message or plain object to encode + * Encodes the specified UndeployConversationModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata.verify|verify} messages. + * @param message UndeployConversationModelOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.IUndeployConversationModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ClearSuggestionFeatureConfigRequest message from the specified reader or buffer. + * Decodes an UndeployConversationModelOperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ClearSuggestionFeatureConfigRequest + * @returns UndeployConversationModelOperationMetadata * @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.dialogflow.v2.ClearSuggestionFeatureConfigRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata; /** - * Decodes a ClearSuggestionFeatureConfigRequest message from the specified reader or buffer, length delimited. + * Decodes an UndeployConversationModelOperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ClearSuggestionFeatureConfigRequest + * @returns UndeployConversationModelOperationMetadata * @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.dialogflow.v2.ClearSuggestionFeatureConfigRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata; /** - * Verifies a ClearSuggestionFeatureConfigRequest message. + * Verifies an UndeployConversationModelOperationMetadata 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 ClearSuggestionFeatureConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UndeployConversationModelOperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ClearSuggestionFeatureConfigRequest + * @returns UndeployConversationModelOperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata; /** - * Creates a plain object from a ClearSuggestionFeatureConfigRequest message. Also converts values to other types if specified. - * @param message ClearSuggestionFeatureConfigRequest + * Creates a plain object from an UndeployConversationModelOperationMetadata message. Also converts values to other types if specified. + * @param message UndeployConversationModelOperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ClearSuggestionFeatureConfigRequest to JSON. + * Converts this UndeployConversationModelOperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ClearSuggestionFeatureConfigRequest + * Gets the default type url for UndeployConversationModelOperationMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SetSuggestionFeatureConfigOperationMetadata. */ - interface ISetSuggestionFeatureConfigOperationMetadata { - - /** SetSuggestionFeatureConfigOperationMetadata conversationProfile */ - conversationProfile?: (string|null); - - /** SetSuggestionFeatureConfigOperationMetadata participantRole */ - participantRole?: (google.cloud.dialogflow.v2.Participant.Role|keyof typeof google.cloud.dialogflow.v2.Participant.Role|null); + /** Properties of a DeleteConversationModelOperationMetadata. */ + interface IDeleteConversationModelOperationMetadata { - /** SetSuggestionFeatureConfigOperationMetadata suggestionFeatureType */ - suggestionFeatureType?: (google.cloud.dialogflow.v2.SuggestionFeature.Type|keyof typeof google.cloud.dialogflow.v2.SuggestionFeature.Type|null); + /** DeleteConversationModelOperationMetadata conversationModel */ + conversationModel?: (string|null); - /** SetSuggestionFeatureConfigOperationMetadata createTime */ + /** DeleteConversationModelOperationMetadata createTime */ createTime?: (google.protobuf.ITimestamp|null); } - /** Represents a SetSuggestionFeatureConfigOperationMetadata. */ - class SetSuggestionFeatureConfigOperationMetadata implements ISetSuggestionFeatureConfigOperationMetadata { + /** Represents a DeleteConversationModelOperationMetadata. */ + class DeleteConversationModelOperationMetadata implements IDeleteConversationModelOperationMetadata { /** - * Constructs a new SetSuggestionFeatureConfigOperationMetadata. + * Constructs a new DeleteConversationModelOperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigOperationMetadata); - - /** SetSuggestionFeatureConfigOperationMetadata conversationProfile. */ - public conversationProfile: string; - - /** SetSuggestionFeatureConfigOperationMetadata participantRole. */ - public participantRole: (google.cloud.dialogflow.v2.Participant.Role|keyof typeof google.cloud.dialogflow.v2.Participant.Role); + constructor(properties?: google.cloud.dialogflow.v2.IDeleteConversationModelOperationMetadata); - /** SetSuggestionFeatureConfigOperationMetadata suggestionFeatureType. */ - public suggestionFeatureType: (google.cloud.dialogflow.v2.SuggestionFeature.Type|keyof typeof google.cloud.dialogflow.v2.SuggestionFeature.Type); + /** DeleteConversationModelOperationMetadata conversationModel. */ + public conversationModel: string; - /** SetSuggestionFeatureConfigOperationMetadata createTime. */ + /** DeleteConversationModelOperationMetadata createTime. */ public createTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new SetSuggestionFeatureConfigOperationMetadata instance using the specified properties. + * Creates a new DeleteConversationModelOperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns SetSuggestionFeatureConfigOperationMetadata instance + * @returns DeleteConversationModelOperationMetadata instance */ - public static create(properties?: google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigOperationMetadata): google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata; + public static create(properties?: google.cloud.dialogflow.v2.IDeleteConversationModelOperationMetadata): google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata; /** - * Encodes the specified SetSuggestionFeatureConfigOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata.verify|verify} messages. - * @param message SetSuggestionFeatureConfigOperationMetadata message or plain object to encode + * Encodes the specified DeleteConversationModelOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata.verify|verify} messages. + * @param message DeleteConversationModelOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.IDeleteConversationModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SetSuggestionFeatureConfigOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata.verify|verify} messages. - * @param message SetSuggestionFeatureConfigOperationMetadata message or plain object to encode + * Encodes the specified DeleteConversationModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata.verify|verify} messages. + * @param message DeleteConversationModelOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.IDeleteConversationModelOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SetSuggestionFeatureConfigOperationMetadata message from the specified reader or buffer. + * Decodes a DeleteConversationModelOperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SetSuggestionFeatureConfigOperationMetadata + * @returns DeleteConversationModelOperationMetadata * @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.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata; /** - * Decodes a SetSuggestionFeatureConfigOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a DeleteConversationModelOperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SetSuggestionFeatureConfigOperationMetadata + * @returns DeleteConversationModelOperationMetadata * @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.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata; /** - * Verifies a SetSuggestionFeatureConfigOperationMetadata message. + * Verifies a DeleteConversationModelOperationMetadata 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 SetSuggestionFeatureConfigOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteConversationModelOperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SetSuggestionFeatureConfigOperationMetadata + * @returns DeleteConversationModelOperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata; /** - * Creates a plain object from a SetSuggestionFeatureConfigOperationMetadata message. Also converts values to other types if specified. - * @param message SetSuggestionFeatureConfigOperationMetadata + * Creates a plain object from a DeleteConversationModelOperationMetadata message. Also converts values to other types if specified. + * @param message DeleteConversationModelOperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SetSuggestionFeatureConfigOperationMetadata to JSON. + * Converts this DeleteConversationModelOperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SetSuggestionFeatureConfigOperationMetadata + * Gets the default type url for DeleteConversationModelOperationMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ClearSuggestionFeatureConfigOperationMetadata. */ - interface IClearSuggestionFeatureConfigOperationMetadata { + /** Properties of a CreateConversationModelEvaluationOperationMetadata. */ + interface ICreateConversationModelEvaluationOperationMetadata { - /** ClearSuggestionFeatureConfigOperationMetadata conversationProfile */ - conversationProfile?: (string|null); + /** CreateConversationModelEvaluationOperationMetadata conversationModelEvaluation */ + conversationModelEvaluation?: (string|null); - /** ClearSuggestionFeatureConfigOperationMetadata participantRole */ - participantRole?: (google.cloud.dialogflow.v2.Participant.Role|keyof typeof google.cloud.dialogflow.v2.Participant.Role|null); + /** CreateConversationModelEvaluationOperationMetadata conversationModel */ + conversationModel?: (string|null); - /** ClearSuggestionFeatureConfigOperationMetadata suggestionFeatureType */ - suggestionFeatureType?: (google.cloud.dialogflow.v2.SuggestionFeature.Type|keyof typeof google.cloud.dialogflow.v2.SuggestionFeature.Type|null); + /** CreateConversationModelEvaluationOperationMetadata state */ + state?: (google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.State|keyof typeof google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.State|null); - /** ClearSuggestionFeatureConfigOperationMetadata createTime */ + /** CreateConversationModelEvaluationOperationMetadata createTime */ createTime?: (google.protobuf.ITimestamp|null); } - /** Represents a ClearSuggestionFeatureConfigOperationMetadata. */ - class ClearSuggestionFeatureConfigOperationMetadata implements IClearSuggestionFeatureConfigOperationMetadata { + /** Represents a CreateConversationModelEvaluationOperationMetadata. */ + class CreateConversationModelEvaluationOperationMetadata implements ICreateConversationModelEvaluationOperationMetadata { /** - * Constructs a new ClearSuggestionFeatureConfigOperationMetadata. + * Constructs a new CreateConversationModelEvaluationOperationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigOperationMetadata); + constructor(properties?: google.cloud.dialogflow.v2.ICreateConversationModelEvaluationOperationMetadata); - /** ClearSuggestionFeatureConfigOperationMetadata conversationProfile. */ - public conversationProfile: string; + /** CreateConversationModelEvaluationOperationMetadata conversationModelEvaluation. */ + public conversationModelEvaluation: string; - /** ClearSuggestionFeatureConfigOperationMetadata participantRole. */ - public participantRole: (google.cloud.dialogflow.v2.Participant.Role|keyof typeof google.cloud.dialogflow.v2.Participant.Role); + /** CreateConversationModelEvaluationOperationMetadata conversationModel. */ + public conversationModel: string; - /** ClearSuggestionFeatureConfigOperationMetadata suggestionFeatureType. */ - public suggestionFeatureType: (google.cloud.dialogflow.v2.SuggestionFeature.Type|keyof typeof google.cloud.dialogflow.v2.SuggestionFeature.Type); + /** CreateConversationModelEvaluationOperationMetadata state. */ + public state: (google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.State|keyof typeof google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.State); - /** ClearSuggestionFeatureConfigOperationMetadata createTime. */ + /** CreateConversationModelEvaluationOperationMetadata createTime. */ public createTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new ClearSuggestionFeatureConfigOperationMetadata instance using the specified properties. + * Creates a new CreateConversationModelEvaluationOperationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns ClearSuggestionFeatureConfigOperationMetadata instance + * @returns CreateConversationModelEvaluationOperationMetadata instance */ - public static create(properties?: google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigOperationMetadata): google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata; + public static create(properties?: google.cloud.dialogflow.v2.ICreateConversationModelEvaluationOperationMetadata): google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata; /** - * Encodes the specified ClearSuggestionFeatureConfigOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata.verify|verify} messages. - * @param message ClearSuggestionFeatureConfigOperationMetadata message or plain object to encode + * Encodes the specified CreateConversationModelEvaluationOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.verify|verify} messages. + * @param message CreateConversationModelEvaluationOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2.ICreateConversationModelEvaluationOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ClearSuggestionFeatureConfigOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata.verify|verify} messages. - * @param message ClearSuggestionFeatureConfigOperationMetadata message or plain object to encode + * Encodes the specified CreateConversationModelEvaluationOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.verify|verify} messages. + * @param message CreateConversationModelEvaluationOperationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2.ICreateConversationModelEvaluationOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ClearSuggestionFeatureConfigOperationMetadata message from the specified reader or buffer. + * Decodes a CreateConversationModelEvaluationOperationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ClearSuggestionFeatureConfigOperationMetadata + * @returns CreateConversationModelEvaluationOperationMetadata * @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.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata; /** - * Decodes a ClearSuggestionFeatureConfigOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a CreateConversationModelEvaluationOperationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ClearSuggestionFeatureConfigOperationMetadata + * @returns CreateConversationModelEvaluationOperationMetadata * @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.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata; /** - * Verifies a ClearSuggestionFeatureConfigOperationMetadata message. + * Verifies a CreateConversationModelEvaluationOperationMetadata 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 ClearSuggestionFeatureConfigOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a CreateConversationModelEvaluationOperationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ClearSuggestionFeatureConfigOperationMetadata + * @returns CreateConversationModelEvaluationOperationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata; /** - * Creates a plain object from a ClearSuggestionFeatureConfigOperationMetadata message. Also converts values to other types if specified. - * @param message ClearSuggestionFeatureConfigOperationMetadata + * Creates a plain object from a CreateConversationModelEvaluationOperationMetadata message. Also converts values to other types if specified. + * @param message CreateConversationModelEvaluationOperationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ClearSuggestionFeatureConfigOperationMetadata to JSON. + * Converts this CreateConversationModelEvaluationOperationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ClearSuggestionFeatureConfigOperationMetadata + * Gets the default type url for CreateConversationModelEvaluationOperationMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace CreateConversationModelEvaluationOperationMetadata { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + INITIALIZING = 1, + RUNNING = 2, + CANCELLED = 3, + SUCCEEDED = 4, + FAILED = 5 + } + } + /** Represents a Documents */ class Documents extends $protobuf.rpc.Service { @@ -38554,6 +39240,9 @@ export namespace google { /** StreamingAnalyzeContentRequest enablePartialAutomatedAgentReply */ enablePartialAutomatedAgentReply?: (boolean|null); + + /** StreamingAnalyzeContentRequest enableDebuggingInfo */ + enableDebuggingInfo?: (boolean|null); } /** Represents a StreamingAnalyzeContentRequest. */ @@ -38601,6 +39290,9 @@ export namespace google { /** StreamingAnalyzeContentRequest enablePartialAutomatedAgentReply. */ public enablePartialAutomatedAgentReply: boolean; + /** StreamingAnalyzeContentRequest enableDebuggingInfo. */ + public enableDebuggingInfo: boolean; + /** StreamingAnalyzeContentRequest config. */ public config?: ("audioConfig"|"textConfig"); @@ -38711,6 +39403,9 @@ export namespace google { /** StreamingAnalyzeContentResponse dtmfParameters */ dtmfParameters?: (google.cloud.dialogflow.v2beta1.IDtmfParameters|null); + + /** StreamingAnalyzeContentResponse debuggingInfo */ + debuggingInfo?: (google.cloud.dialogflow.v2beta1.ICloudConversationDebuggingInfo|null); } /** Represents a StreamingAnalyzeContentResponse. */ @@ -38746,6 +39441,9 @@ export namespace google { /** StreamingAnalyzeContentResponse dtmfParameters. */ public dtmfParameters?: (google.cloud.dialogflow.v2beta1.IDtmfParameters|null); + /** StreamingAnalyzeContentResponse debuggingInfo. */ + public debuggingInfo?: (google.cloud.dialogflow.v2beta1.ICloudConversationDebuggingInfo|null); + /** * Creates a new StreamingAnalyzeContentResponse instance using the specified properties. * @param [properties] Properties to set @@ -42103,6 +42801,9 @@ export namespace google { /** InputAudioConfig bargeInConfig */ bargeInConfig?: (google.cloud.dialogflow.v2beta1.IBargeInConfig|null); + + /** InputAudioConfig enableAutomaticPunctuation */ + enableAutomaticPunctuation?: (boolean|null); } /** Represents an InputAudioConfig. */ @@ -42147,6 +42848,9 @@ export namespace google { /** InputAudioConfig bargeInConfig. */ public bargeInConfig?: (google.cloud.dialogflow.v2beta1.IBargeInConfig|null); + /** InputAudioConfig enableAutomaticPunctuation. */ + public enableAutomaticPunctuation: boolean; + /** * Creates a new InputAudioConfig instance using the specified properties. * @param [properties] Properties to set @@ -43834,6 +44538,9 @@ export namespace google { /** StreamingDetectIntentRequest inputAudio */ inputAudio?: (Uint8Array|string|null); + + /** StreamingDetectIntentRequest enableDebuggingInfo */ + enableDebuggingInfo?: (boolean|null); } /** Represents a StreamingDetectIntentRequest. */ @@ -43866,6 +44573,9 @@ export namespace google { /** StreamingDetectIntentRequest inputAudio. */ public inputAudio: (Uint8Array|string); + /** StreamingDetectIntentRequest enableDebuggingInfo. */ + public enableDebuggingInfo: boolean; + /** * Creates a new StreamingDetectIntentRequest instance using the specified properties. * @param [properties] Properties to set @@ -43944,6 +44654,199 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a CloudConversationDebuggingInfo. */ + interface ICloudConversationDebuggingInfo { + + /** CloudConversationDebuggingInfo audioDataChunks */ + audioDataChunks?: (number|null); + + /** CloudConversationDebuggingInfo resultEndTimeOffset */ + resultEndTimeOffset?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo firstAudioDuration */ + firstAudioDuration?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo singleUtterance */ + singleUtterance?: (boolean|null); + + /** CloudConversationDebuggingInfo speechPartialResultsEndTimes */ + speechPartialResultsEndTimes?: (google.protobuf.IDuration[]|null); + + /** CloudConversationDebuggingInfo speechFinalResultsEndTimes */ + speechFinalResultsEndTimes?: (google.protobuf.IDuration[]|null); + + /** CloudConversationDebuggingInfo partialResponses */ + partialResponses?: (number|null); + + /** CloudConversationDebuggingInfo speakerIdPassiveLatencyMsOffset */ + speakerIdPassiveLatencyMsOffset?: (number|null); + + /** CloudConversationDebuggingInfo bargeinEventTriggered */ + bargeinEventTriggered?: (boolean|null); + + /** CloudConversationDebuggingInfo speechSingleUtterance */ + speechSingleUtterance?: (boolean|null); + + /** CloudConversationDebuggingInfo dtmfPartialResultsTimes */ + dtmfPartialResultsTimes?: (google.protobuf.IDuration[]|null); + + /** CloudConversationDebuggingInfo dtmfFinalResultsTimes */ + dtmfFinalResultsTimes?: (google.protobuf.IDuration[]|null); + + /** CloudConversationDebuggingInfo singleUtteranceEndTimeOffset */ + singleUtteranceEndTimeOffset?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo noSpeechTimeout */ + noSpeechTimeout?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo isInputText */ + isInputText?: (boolean|null); + + /** CloudConversationDebuggingInfo clientHalfCloseTimeOffset */ + clientHalfCloseTimeOffset?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo clientHalfCloseStreamingTimeOffset */ + clientHalfCloseStreamingTimeOffset?: (google.protobuf.IDuration|null); + } + + /** Represents a CloudConversationDebuggingInfo. */ + class CloudConversationDebuggingInfo implements ICloudConversationDebuggingInfo { + + /** + * Constructs a new CloudConversationDebuggingInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.ICloudConversationDebuggingInfo); + + /** CloudConversationDebuggingInfo audioDataChunks. */ + public audioDataChunks: number; + + /** CloudConversationDebuggingInfo resultEndTimeOffset. */ + public resultEndTimeOffset?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo firstAudioDuration. */ + public firstAudioDuration?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo singleUtterance. */ + public singleUtterance: boolean; + + /** CloudConversationDebuggingInfo speechPartialResultsEndTimes. */ + public speechPartialResultsEndTimes: google.protobuf.IDuration[]; + + /** CloudConversationDebuggingInfo speechFinalResultsEndTimes. */ + public speechFinalResultsEndTimes: google.protobuf.IDuration[]; + + /** CloudConversationDebuggingInfo partialResponses. */ + public partialResponses: number; + + /** CloudConversationDebuggingInfo speakerIdPassiveLatencyMsOffset. */ + public speakerIdPassiveLatencyMsOffset: number; + + /** CloudConversationDebuggingInfo bargeinEventTriggered. */ + public bargeinEventTriggered: boolean; + + /** CloudConversationDebuggingInfo speechSingleUtterance. */ + public speechSingleUtterance: boolean; + + /** CloudConversationDebuggingInfo dtmfPartialResultsTimes. */ + public dtmfPartialResultsTimes: google.protobuf.IDuration[]; + + /** CloudConversationDebuggingInfo dtmfFinalResultsTimes. */ + public dtmfFinalResultsTimes: google.protobuf.IDuration[]; + + /** CloudConversationDebuggingInfo singleUtteranceEndTimeOffset. */ + public singleUtteranceEndTimeOffset?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo noSpeechTimeout. */ + public noSpeechTimeout?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo isInputText. */ + public isInputText: boolean; + + /** CloudConversationDebuggingInfo clientHalfCloseTimeOffset. */ + public clientHalfCloseTimeOffset?: (google.protobuf.IDuration|null); + + /** CloudConversationDebuggingInfo clientHalfCloseStreamingTimeOffset. */ + public clientHalfCloseStreamingTimeOffset?: (google.protobuf.IDuration|null); + + /** + * Creates a new CloudConversationDebuggingInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudConversationDebuggingInfo instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.ICloudConversationDebuggingInfo): google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo; + + /** + * Encodes the specified CloudConversationDebuggingInfo message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo.verify|verify} messages. + * @param message CloudConversationDebuggingInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.ICloudConversationDebuggingInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudConversationDebuggingInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo.verify|verify} messages. + * @param message CloudConversationDebuggingInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.ICloudConversationDebuggingInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudConversationDebuggingInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudConversationDebuggingInfo + * @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.dialogflow.v2beta1.CloudConversationDebuggingInfo; + + /** + * Decodes a CloudConversationDebuggingInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudConversationDebuggingInfo + * @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.dialogflow.v2beta1.CloudConversationDebuggingInfo; + + /** + * Verifies a CloudConversationDebuggingInfo 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 CloudConversationDebuggingInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudConversationDebuggingInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo; + + /** + * Creates a plain object from a CloudConversationDebuggingInfo message. Also converts values to other types if specified. + * @param message CloudConversationDebuggingInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudConversationDebuggingInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudConversationDebuggingInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a StreamingDetectIntentResponse. */ interface IStreamingDetectIntentResponse { @@ -43967,6 +44870,9 @@ export namespace google { /** StreamingDetectIntentResponse outputAudioConfig */ outputAudioConfig?: (google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null); + + /** StreamingDetectIntentResponse debuggingInfo */ + debuggingInfo?: (google.cloud.dialogflow.v2beta1.ICloudConversationDebuggingInfo|null); } /** Represents a StreamingDetectIntentResponse. */ @@ -43999,6 +44905,9 @@ export namespace google { /** StreamingDetectIntentResponse outputAudioConfig. */ public outputAudioConfig?: (google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null); + /** StreamingDetectIntentResponse debuggingInfo. */ + public debuggingInfo?: (google.cloud.dialogflow.v2beta1.ICloudConversationDebuggingInfo|null); + /** * Creates a new StreamingDetectIntentResponse instance using the specified properties. * @param [properties] Properties to set @@ -55199,6 +56108,20 @@ export namespace google { * @returns Promise */ public suggestConversationSummary(request: google.cloud.dialogflow.v2beta1.ISuggestConversationSummaryRequest): Promise; + + /** + * Calls GenerateStatelessSummary. + * @param request GenerateStatelessSummaryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GenerateStatelessSummaryResponse + */ + public generateStatelessSummary(request: google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryRequest, callback: google.cloud.dialogflow.v2beta1.Conversations.GenerateStatelessSummaryCallback): void; + + /** + * Calls GenerateStatelessSummary. + * @param request GenerateStatelessSummaryRequest message or plain object + * @returns Promise + */ + public generateStatelessSummary(request: google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryRequest): Promise; } namespace Conversations { @@ -55251,6 +56174,13 @@ export namespace google { * @param [response] SuggestConversationSummaryResponse */ type SuggestConversationSummaryCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse) => void; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Conversations|generateStatelessSummary}. + * @param error Error, if any + * @param [response] GenerateStatelessSummaryResponse + */ + type GenerateStatelessSummaryCallback = (error: (Error|null), response?: google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse) => void; } /** Properties of a Conversation. */ @@ -56878,134 +57808,439 @@ export namespace google { } } - /** Properties of a ConversationEvent. */ - interface IConversationEvent { + /** Properties of a GenerateStatelessSummaryRequest. */ + interface IGenerateStatelessSummaryRequest { - /** ConversationEvent conversation */ - conversation?: (string|null); + /** GenerateStatelessSummaryRequest statelessConversation */ + statelessConversation?: (google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.IMinimalConversation|null); - /** ConversationEvent type */ - type?: (google.cloud.dialogflow.v2beta1.ConversationEvent.Type|keyof typeof google.cloud.dialogflow.v2beta1.ConversationEvent.Type|null); + /** GenerateStatelessSummaryRequest conversationProfile */ + conversationProfile?: (google.cloud.dialogflow.v2beta1.IConversationProfile|null); - /** ConversationEvent errorStatus */ - errorStatus?: (google.rpc.IStatus|null); + /** GenerateStatelessSummaryRequest latestMessage */ + latestMessage?: (string|null); - /** ConversationEvent newMessagePayload */ - newMessagePayload?: (google.cloud.dialogflow.v2beta1.IMessage|null); + /** GenerateStatelessSummaryRequest maxContextSize */ + maxContextSize?: (number|null); } - /** Represents a ConversationEvent. */ - class ConversationEvent implements IConversationEvent { + /** Represents a GenerateStatelessSummaryRequest. */ + class GenerateStatelessSummaryRequest implements IGenerateStatelessSummaryRequest { /** - * Constructs a new ConversationEvent. + * Constructs a new GenerateStatelessSummaryRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.dialogflow.v2beta1.IConversationEvent); + constructor(properties?: google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryRequest); - /** ConversationEvent conversation. */ - public conversation: string; + /** GenerateStatelessSummaryRequest statelessConversation. */ + public statelessConversation?: (google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.IMinimalConversation|null); - /** ConversationEvent type. */ - public type: (google.cloud.dialogflow.v2beta1.ConversationEvent.Type|keyof typeof google.cloud.dialogflow.v2beta1.ConversationEvent.Type); + /** GenerateStatelessSummaryRequest conversationProfile. */ + public conversationProfile?: (google.cloud.dialogflow.v2beta1.IConversationProfile|null); - /** ConversationEvent errorStatus. */ - public errorStatus?: (google.rpc.IStatus|null); + /** GenerateStatelessSummaryRequest latestMessage. */ + public latestMessage: string; - /** ConversationEvent newMessagePayload. */ - public newMessagePayload?: (google.cloud.dialogflow.v2beta1.IMessage|null); + /** GenerateStatelessSummaryRequest maxContextSize. */ + public maxContextSize: number; - /** ConversationEvent payload. */ - public payload?: "newMessagePayload"; + /** + * Creates a new GenerateStatelessSummaryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GenerateStatelessSummaryRequest instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryRequest): google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest; /** - * Creates a new ConversationEvent instance using the specified properties. + * Encodes the specified GenerateStatelessSummaryRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.verify|verify} messages. + * @param message GenerateStatelessSummaryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GenerateStatelessSummaryRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.verify|verify} messages. + * @param message GenerateStatelessSummaryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GenerateStatelessSummaryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GenerateStatelessSummaryRequest + * @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.dialogflow.v2beta1.GenerateStatelessSummaryRequest; + + /** + * Decodes a GenerateStatelessSummaryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GenerateStatelessSummaryRequest + * @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.dialogflow.v2beta1.GenerateStatelessSummaryRequest; + + /** + * Verifies a GenerateStatelessSummaryRequest 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 GenerateStatelessSummaryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GenerateStatelessSummaryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest; + + /** + * Creates a plain object from a GenerateStatelessSummaryRequest message. Also converts values to other types if specified. + * @param message GenerateStatelessSummaryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GenerateStatelessSummaryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GenerateStatelessSummaryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GenerateStatelessSummaryRequest { + + /** Properties of a MinimalConversation. */ + interface IMinimalConversation { + + /** MinimalConversation messages */ + messages?: (google.cloud.dialogflow.v2beta1.IMessage[]|null); + + /** MinimalConversation parent */ + parent?: (string|null); + } + + /** Represents a MinimalConversation. */ + class MinimalConversation implements IMinimalConversation { + + /** + * Constructs a new MinimalConversation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.IMinimalConversation); + + /** MinimalConversation messages. */ + public messages: google.cloud.dialogflow.v2beta1.IMessage[]; + + /** MinimalConversation parent. */ + public parent: string; + + /** + * Creates a new MinimalConversation instance using the specified properties. + * @param [properties] Properties to set + * @returns MinimalConversation instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.IMinimalConversation): google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation; + + /** + * Encodes the specified MinimalConversation message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation.verify|verify} messages. + * @param message MinimalConversation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.IMinimalConversation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MinimalConversation message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation.verify|verify} messages. + * @param message MinimalConversation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.IMinimalConversation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MinimalConversation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MinimalConversation + * @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.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation; + + /** + * Decodes a MinimalConversation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MinimalConversation + * @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.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation; + + /** + * Verifies a MinimalConversation 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 MinimalConversation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MinimalConversation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation; + + /** + * Creates a plain object from a MinimalConversation message. Also converts values to other types if specified. + * @param message MinimalConversation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MinimalConversation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MinimalConversation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GenerateStatelessSummaryResponse. */ + interface IGenerateStatelessSummaryResponse { + + /** GenerateStatelessSummaryResponse summary */ + summary?: (google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.ISummary|null); + + /** GenerateStatelessSummaryResponse latestMessage */ + latestMessage?: (string|null); + + /** GenerateStatelessSummaryResponse contextSize */ + contextSize?: (number|null); + } + + /** Represents a GenerateStatelessSummaryResponse. */ + class GenerateStatelessSummaryResponse implements IGenerateStatelessSummaryResponse { + + /** + * Constructs a new GenerateStatelessSummaryResponse. * @param [properties] Properties to set - * @returns ConversationEvent instance */ - public static create(properties?: google.cloud.dialogflow.v2beta1.IConversationEvent): google.cloud.dialogflow.v2beta1.ConversationEvent; + constructor(properties?: google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryResponse); + + /** GenerateStatelessSummaryResponse summary. */ + public summary?: (google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.ISummary|null); + + /** GenerateStatelessSummaryResponse latestMessage. */ + public latestMessage: string; + + /** GenerateStatelessSummaryResponse contextSize. */ + public contextSize: number; /** - * Encodes the specified ConversationEvent message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ConversationEvent.verify|verify} messages. - * @param message ConversationEvent message or plain object to encode + * Creates a new GenerateStatelessSummaryResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GenerateStatelessSummaryResponse instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryResponse): google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse; + + /** + * Encodes the specified GenerateStatelessSummaryResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.verify|verify} messages. + * @param message GenerateStatelessSummaryResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.dialogflow.v2beta1.IConversationEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ConversationEvent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ConversationEvent.verify|verify} messages. - * @param message ConversationEvent message or plain object to encode + * Encodes the specified GenerateStatelessSummaryResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.verify|verify} messages. + * @param message GenerateStatelessSummaryResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IConversationEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ConversationEvent message from the specified reader or buffer. + * Decodes a GenerateStatelessSummaryResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ConversationEvent + * @returns GenerateStatelessSummaryResponse * @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.dialogflow.v2beta1.ConversationEvent; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse; /** - * Decodes a ConversationEvent message from the specified reader or buffer, length delimited. + * Decodes a GenerateStatelessSummaryResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ConversationEvent + * @returns GenerateStatelessSummaryResponse * @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.dialogflow.v2beta1.ConversationEvent; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse; /** - * Verifies a ConversationEvent message. + * Verifies a GenerateStatelessSummaryResponse 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 ConversationEvent message from a plain object. Also converts values to their respective internal types. + * Creates a GenerateStatelessSummaryResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ConversationEvent + * @returns GenerateStatelessSummaryResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ConversationEvent; + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse; /** - * Creates a plain object from a ConversationEvent message. Also converts values to other types if specified. - * @param message ConversationEvent + * Creates a plain object from a GenerateStatelessSummaryResponse message. Also converts values to other types if specified. + * @param message GenerateStatelessSummaryResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.dialogflow.v2beta1.ConversationEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ConversationEvent to JSON. + * Converts this GenerateStatelessSummaryResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ConversationEvent + * Gets the default type url for GenerateStatelessSummaryResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace ConversationEvent { + namespace GenerateStatelessSummaryResponse { - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - CONVERSATION_STARTED = 1, - CONVERSATION_FINISHED = 2, - HUMAN_INTERVENTION_NEEDED = 3, - NEW_MESSAGE = 5, - UNRECOVERABLE_ERROR = 4 + /** Properties of a Summary. */ + interface ISummary { + + /** Summary text */ + text?: (string|null); + + /** Summary textSections */ + textSections?: ({ [k: string]: string }|null); + } + + /** Represents a Summary. */ + class Summary implements ISummary { + + /** + * Constructs a new Summary. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.ISummary); + + /** Summary text. */ + public text: string; + + /** Summary textSections. */ + public textSections: { [k: string]: string }; + + /** + * Creates a new Summary instance using the specified properties. + * @param [properties] Properties to set + * @returns Summary instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.ISummary): google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary; + + /** + * Encodes the specified Summary message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary.verify|verify} messages. + * @param message Summary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.ISummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Summary message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary.verify|verify} messages. + * @param message Summary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.ISummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Summary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Summary + * @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.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary; + + /** + * Decodes a Summary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Summary + * @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.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary; + + /** + * Verifies a Summary 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 Summary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Summary + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary; + + /** + * Creates a plain object from a Summary message. Also converts values to other types if specified. + * @param message Summary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Summary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Summary + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -58446,6 +59681,9 @@ export namespace google { /** ConversationModelConfig model */ model?: (string|null); + + /** ConversationModelConfig baselineModelVersion */ + baselineModelVersion?: (string|null); } /** Represents a ConversationModelConfig. */ @@ -58460,6 +59698,9 @@ export namespace google { /** ConversationModelConfig model. */ public model: string; + /** ConversationModelConfig baselineModelVersion. */ + public baselineModelVersion: string; + /** * Creates a new ConversationModelConfig instance using the specified properties. * @param [properties] Properties to set @@ -60330,6 +61571,137 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a ConversationEvent. */ + interface IConversationEvent { + + /** ConversationEvent conversation */ + conversation?: (string|null); + + /** ConversationEvent type */ + type?: (google.cloud.dialogflow.v2beta1.ConversationEvent.Type|keyof typeof google.cloud.dialogflow.v2beta1.ConversationEvent.Type|null); + + /** ConversationEvent errorStatus */ + errorStatus?: (google.rpc.IStatus|null); + + /** ConversationEvent newMessagePayload */ + newMessagePayload?: (google.cloud.dialogflow.v2beta1.IMessage|null); + } + + /** Represents a ConversationEvent. */ + class ConversationEvent implements IConversationEvent { + + /** + * Constructs a new ConversationEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.v2beta1.IConversationEvent); + + /** ConversationEvent conversation. */ + public conversation: string; + + /** ConversationEvent type. */ + public type: (google.cloud.dialogflow.v2beta1.ConversationEvent.Type|keyof typeof google.cloud.dialogflow.v2beta1.ConversationEvent.Type); + + /** ConversationEvent errorStatus. */ + public errorStatus?: (google.rpc.IStatus|null); + + /** ConversationEvent newMessagePayload. */ + public newMessagePayload?: (google.cloud.dialogflow.v2beta1.IMessage|null); + + /** ConversationEvent payload. */ + public payload?: "newMessagePayload"; + + /** + * Creates a new ConversationEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns ConversationEvent instance + */ + public static create(properties?: google.cloud.dialogflow.v2beta1.IConversationEvent): google.cloud.dialogflow.v2beta1.ConversationEvent; + + /** + * Encodes the specified ConversationEvent message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ConversationEvent.verify|verify} messages. + * @param message ConversationEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.v2beta1.IConversationEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConversationEvent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ConversationEvent.verify|verify} messages. + * @param message ConversationEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.v2beta1.IConversationEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConversationEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConversationEvent + * @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.dialogflow.v2beta1.ConversationEvent; + + /** + * Decodes a ConversationEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConversationEvent + * @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.dialogflow.v2beta1.ConversationEvent; + + /** + * Verifies a ConversationEvent 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 ConversationEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConversationEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.v2beta1.ConversationEvent; + + /** + * Creates a plain object from a ConversationEvent message. Also converts values to other types if specified. + * @param message ConversationEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.v2beta1.ConversationEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConversationEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConversationEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ConversationEvent { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + CONVERSATION_STARTED = 1, + CONVERSATION_FINISHED = 2, + HUMAN_INTERVENTION_NEEDED = 3, + NEW_MESSAGE = 5, + UNRECOVERABLE_ERROR = 4 + } + } + /** Represents a Documents */ class Documents extends $protobuf.rpc.Service { diff --git a/packages/google-cloud-dialogflow/protos/protos.js b/packages/google-cloud-dialogflow/protos/protos.js index 6ffa990049f..35a31450be1 100644 --- a/packages/google-cloud-dialogflow/protos/protos.js +++ b/packages/google-cloud-dialogflow/protos/protos.js @@ -9982,6 +9982,7 @@ * @property {google.cloud.dialogflow.v2.IAssistQueryParameters|null} [assistQueryParams] StreamingAnalyzeContentRequest assistQueryParams * @property {google.protobuf.IStruct|null} [cxParameters] StreamingAnalyzeContentRequest cxParameters * @property {boolean|null} [enablePartialAutomatedAgentReply] StreamingAnalyzeContentRequest enablePartialAutomatedAgentReply + * @property {boolean|null} [enableDebuggingInfo] StreamingAnalyzeContentRequest enableDebuggingInfo */ /** @@ -10087,6 +10088,14 @@ */ StreamingAnalyzeContentRequest.prototype.enablePartialAutomatedAgentReply = false; + /** + * StreamingAnalyzeContentRequest enableDebuggingInfo. + * @member {boolean} enableDebuggingInfo + * @memberof google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest + * @instance + */ + StreamingAnalyzeContentRequest.prototype.enableDebuggingInfo = false; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -10158,6 +10167,8 @@ writer.uint32(/* id 12, wireType 0 =*/96).bool(message.enablePartialAutomatedAgentReply); if (message.cxParameters != null && Object.hasOwnProperty.call(message, "cxParameters")) $root.google.protobuf.Struct.encode(message.cxParameters, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.enableDebuggingInfo != null && Object.hasOwnProperty.call(message, "enableDebuggingInfo")) + writer.uint32(/* id 19, wireType 0 =*/152).bool(message.enableDebuggingInfo); return writer; }; @@ -10236,6 +10247,10 @@ message.enablePartialAutomatedAgentReply = reader.bool(); break; } + case 19: { + message.enableDebuggingInfo = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -10338,6 +10353,9 @@ if (message.enablePartialAutomatedAgentReply != null && message.hasOwnProperty("enablePartialAutomatedAgentReply")) if (typeof message.enablePartialAutomatedAgentReply !== "boolean") return "enablePartialAutomatedAgentReply: boolean expected"; + if (message.enableDebuggingInfo != null && message.hasOwnProperty("enableDebuggingInfo")) + if (typeof message.enableDebuggingInfo !== "boolean") + return "enableDebuggingInfo: boolean expected"; return null; }; @@ -10399,6 +10417,8 @@ } if (object.enablePartialAutomatedAgentReply != null) message.enablePartialAutomatedAgentReply = Boolean(object.enablePartialAutomatedAgentReply); + if (object.enableDebuggingInfo != null) + message.enableDebuggingInfo = Boolean(object.enableDebuggingInfo); return message; }; @@ -10422,6 +10442,7 @@ object.assistQueryParams = null; object.enablePartialAutomatedAgentReply = false; object.cxParameters = null; + object.enableDebuggingInfo = false; } if (message.participant != null && message.hasOwnProperty("participant")) object.participant = message.participant; @@ -10460,6 +10481,8 @@ object.enablePartialAutomatedAgentReply = message.enablePartialAutomatedAgentReply; if (message.cxParameters != null && message.hasOwnProperty("cxParameters")) object.cxParameters = $root.google.protobuf.Struct.toObject(message.cxParameters, options); + if (message.enableDebuggingInfo != null && message.hasOwnProperty("enableDebuggingInfo")) + object.enableDebuggingInfo = message.enableDebuggingInfo; return object; }; @@ -10506,6 +10529,7 @@ * @property {Array.|null} [humanAgentSuggestionResults] StreamingAnalyzeContentResponse humanAgentSuggestionResults * @property {Array.|null} [endUserSuggestionResults] StreamingAnalyzeContentResponse endUserSuggestionResults * @property {google.cloud.dialogflow.v2.IDtmfParameters|null} [dtmfParameters] StreamingAnalyzeContentResponse dtmfParameters + * @property {google.cloud.dialogflow.v2.ICloudConversationDebuggingInfo|null} [debuggingInfo] StreamingAnalyzeContentResponse debuggingInfo */ /** @@ -10589,6 +10613,14 @@ */ StreamingAnalyzeContentResponse.prototype.dtmfParameters = null; + /** + * StreamingAnalyzeContentResponse debuggingInfo. + * @member {google.cloud.dialogflow.v2.ICloudConversationDebuggingInfo|null|undefined} debuggingInfo + * @memberof google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse + * @instance + */ + StreamingAnalyzeContentResponse.prototype.debuggingInfo = null; + /** * Creates a new StreamingAnalyzeContentResponse instance using the specified properties. * @function create @@ -10631,6 +10663,8 @@ $root.google.cloud.dialogflow.v2.SuggestionResult.encode(message.endUserSuggestionResults[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.dtmfParameters != null && Object.hasOwnProperty.call(message, "dtmfParameters")) $root.google.cloud.dialogflow.v2.DtmfParameters.encode(message.dtmfParameters, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.debuggingInfo != null && Object.hasOwnProperty.call(message, "debuggingInfo")) + $root.google.cloud.dialogflow.v2.CloudConversationDebuggingInfo.encode(message.debuggingInfo, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); return writer; }; @@ -10701,6 +10735,10 @@ message.dtmfParameters = $root.google.cloud.dialogflow.v2.DtmfParameters.decode(reader, reader.uint32()); break; } + case 11: { + message.debuggingInfo = $root.google.cloud.dialogflow.v2.CloudConversationDebuggingInfo.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -10782,6 +10820,11 @@ if (error) return "dtmfParameters." + error; } + if (message.debuggingInfo != null && message.hasOwnProperty("debuggingInfo")) { + var error = $root.google.cloud.dialogflow.v2.CloudConversationDebuggingInfo.verify(message.debuggingInfo); + if (error) + return "debuggingInfo." + error; + } return null; }; @@ -10844,6 +10887,11 @@ throw TypeError(".google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.dtmfParameters: object expected"); message.dtmfParameters = $root.google.cloud.dialogflow.v2.DtmfParameters.fromObject(object.dtmfParameters); } + if (object.debuggingInfo != null) { + if (typeof object.debuggingInfo !== "object") + throw TypeError(".google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.debuggingInfo: object expected"); + message.debuggingInfo = $root.google.cloud.dialogflow.v2.CloudConversationDebuggingInfo.fromObject(object.debuggingInfo); + } return message; }; @@ -10871,6 +10919,7 @@ object.automatedAgentReply = null; object.message = null; object.dtmfParameters = null; + object.debuggingInfo = null; } if (message.recognitionResult != null && message.hasOwnProperty("recognitionResult")) object.recognitionResult = $root.google.cloud.dialogflow.v2.StreamingRecognitionResult.toObject(message.recognitionResult, options); @@ -10894,6 +10943,8 @@ } if (message.dtmfParameters != null && message.hasOwnProperty("dtmfParameters")) object.dtmfParameters = $root.google.cloud.dialogflow.v2.DtmfParameters.toObject(message.dtmfParameters, options); + if (message.debuggingInfo != null && message.hasOwnProperty("debuggingInfo")) + object.debuggingInfo = $root.google.cloud.dialogflow.v2.CloudConversationDebuggingInfo.toObject(message.debuggingInfo, options); return object; }; @@ -15974,6 +16025,7 @@ * @property {google.cloud.dialogflow.v2.SpeechModelVariant|null} [modelVariant] InputAudioConfig modelVariant * @property {boolean|null} [singleUtterance] InputAudioConfig singleUtterance * @property {boolean|null} [disableNoSpeechRecognizedEvent] InputAudioConfig disableNoSpeechRecognizedEvent + * @property {boolean|null} [enableAutomaticPunctuation] InputAudioConfig enableAutomaticPunctuation */ /** @@ -16073,6 +16125,14 @@ */ InputAudioConfig.prototype.disableNoSpeechRecognizedEvent = false; + /** + * InputAudioConfig enableAutomaticPunctuation. + * @member {boolean} enableAutomaticPunctuation + * @memberof google.cloud.dialogflow.v2.InputAudioConfig + * @instance + */ + InputAudioConfig.prototype.enableAutomaticPunctuation = false; + /** * Creates a new InputAudioConfig instance using the specified properties. * @function create @@ -16119,6 +16179,8 @@ writer.uint32(/* id 13, wireType 0 =*/104).bool(message.enableWordInfo); if (message.disableNoSpeechRecognizedEvent != null && Object.hasOwnProperty.call(message, "disableNoSpeechRecognizedEvent")) writer.uint32(/* id 14, wireType 0 =*/112).bool(message.disableNoSpeechRecognizedEvent); + if (message.enableAutomaticPunctuation != null && Object.hasOwnProperty.call(message, "enableAutomaticPunctuation")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.enableAutomaticPunctuation); return writer; }; @@ -16197,6 +16259,10 @@ message.disableNoSpeechRecognizedEvent = reader.bool(); break; } + case 17: { + message.enableAutomaticPunctuation = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -16290,6 +16356,9 @@ if (message.disableNoSpeechRecognizedEvent != null && message.hasOwnProperty("disableNoSpeechRecognizedEvent")) if (typeof message.disableNoSpeechRecognizedEvent !== "boolean") return "disableNoSpeechRecognizedEvent: boolean expected"; + if (message.enableAutomaticPunctuation != null && message.hasOwnProperty("enableAutomaticPunctuation")) + if (typeof message.enableAutomaticPunctuation !== "boolean") + return "enableAutomaticPunctuation: boolean expected"; return null; }; @@ -16398,6 +16467,8 @@ message.singleUtterance = Boolean(object.singleUtterance); if (object.disableNoSpeechRecognizedEvent != null) message.disableNoSpeechRecognizedEvent = Boolean(object.disableNoSpeechRecognizedEvent); + if (object.enableAutomaticPunctuation != null) + message.enableAutomaticPunctuation = Boolean(object.enableAutomaticPunctuation); return message; }; @@ -16427,6 +16498,7 @@ object.modelVariant = options.enums === String ? "SPEECH_MODEL_VARIANT_UNSPECIFIED" : 0; object.enableWordInfo = false; object.disableNoSpeechRecognizedEvent = false; + object.enableAutomaticPunctuation = false; } if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.v2.AudioEncoding[message.audioEncoding] === undefined ? message.audioEncoding : $root.google.cloud.dialogflow.v2.AudioEncoding[message.audioEncoding] : message.audioEncoding; @@ -16454,6 +16526,8 @@ object.enableWordInfo = message.enableWordInfo; if (message.disableNoSpeechRecognizedEvent != null && message.hasOwnProperty("disableNoSpeechRecognizedEvent")) object.disableNoSpeechRecognizedEvent = message.disableNoSpeechRecognizedEvent; + if (message.enableAutomaticPunctuation != null && message.hasOwnProperty("enableAutomaticPunctuation")) + object.enableAutomaticPunctuation = message.enableAutomaticPunctuation; return object; }; @@ -20172,6 +20246,7 @@ * @property {google.cloud.dialogflow.v2.IOutputAudioConfig|null} [outputAudioConfig] StreamingDetectIntentRequest outputAudioConfig * @property {google.protobuf.IFieldMask|null} [outputAudioConfigMask] StreamingDetectIntentRequest outputAudioConfigMask * @property {Uint8Array|null} [inputAudio] StreamingDetectIntentRequest inputAudio + * @property {boolean|null} [enableDebuggingInfo] StreamingDetectIntentRequest enableDebuggingInfo */ /** @@ -20245,6 +20320,14 @@ */ StreamingDetectIntentRequest.prototype.inputAudio = $util.newBuffer([]); + /** + * StreamingDetectIntentRequest enableDebuggingInfo. + * @member {boolean} enableDebuggingInfo + * @memberof google.cloud.dialogflow.v2.StreamingDetectIntentRequest + * @instance + */ + StreamingDetectIntentRequest.prototype.enableDebuggingInfo = false; + /** * Creates a new StreamingDetectIntentRequest instance using the specified properties. * @function create @@ -20283,6 +20366,8 @@ writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.inputAudio); if (message.outputAudioConfigMask != null && Object.hasOwnProperty.call(message, "outputAudioConfigMask")) $root.google.protobuf.FieldMask.encode(message.outputAudioConfigMask, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.enableDebuggingInfo != null && Object.hasOwnProperty.call(message, "enableDebuggingInfo")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.enableDebuggingInfo); return writer; }; @@ -20345,6 +20430,10 @@ message.inputAudio = reader.bytes(); break; } + case 8: { + message.enableDebuggingInfo = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -20409,6 +20498,9 @@ if (message.inputAudio != null && message.hasOwnProperty("inputAudio")) if (!(message.inputAudio && typeof message.inputAudio.length === "number" || $util.isString(message.inputAudio))) return "inputAudio: buffer expected"; + if (message.enableDebuggingInfo != null && message.hasOwnProperty("enableDebuggingInfo")) + if (typeof message.enableDebuggingInfo !== "boolean") + return "enableDebuggingInfo: boolean expected"; return null; }; @@ -20453,6 +20545,8 @@ $util.base64.decode(object.inputAudio, message.inputAudio = $util.newBuffer($util.base64.length(object.inputAudio)), 0); else if (object.inputAudio.length >= 0) message.inputAudio = object.inputAudio; + if (object.enableDebuggingInfo != null) + message.enableDebuggingInfo = Boolean(object.enableDebuggingInfo); return message; }; @@ -20483,6 +20577,7 @@ object.inputAudio = $util.newBuffer(object.inputAudio); } object.outputAudioConfigMask = null; + object.enableDebuggingInfo = false; } if (message.session != null && message.hasOwnProperty("session")) object.session = message.session; @@ -20498,6 +20593,8 @@ object.inputAudio = options.bytes === String ? $util.base64.encode(message.inputAudio, 0, message.inputAudio.length) : options.bytes === Array ? Array.prototype.slice.call(message.inputAudio) : message.inputAudio; if (message.outputAudioConfigMask != null && message.hasOwnProperty("outputAudioConfigMask")) object.outputAudioConfigMask = $root.google.protobuf.FieldMask.toObject(message.outputAudioConfigMask, options); + if (message.enableDebuggingInfo != null && message.hasOwnProperty("enableDebuggingInfo")) + object.enableDebuggingInfo = message.enableDebuggingInfo; return object; }; @@ -20530,6 +20627,694 @@ return StreamingDetectIntentRequest; })(); + v2.CloudConversationDebuggingInfo = (function() { + + /** + * Properties of a CloudConversationDebuggingInfo. + * @memberof google.cloud.dialogflow.v2 + * @interface ICloudConversationDebuggingInfo + * @property {number|null} [audioDataChunks] CloudConversationDebuggingInfo audioDataChunks + * @property {google.protobuf.IDuration|null} [resultEndTimeOffset] CloudConversationDebuggingInfo resultEndTimeOffset + * @property {google.protobuf.IDuration|null} [firstAudioDuration] CloudConversationDebuggingInfo firstAudioDuration + * @property {boolean|null} [singleUtterance] CloudConversationDebuggingInfo singleUtterance + * @property {Array.|null} [speechPartialResultsEndTimes] CloudConversationDebuggingInfo speechPartialResultsEndTimes + * @property {Array.|null} [speechFinalResultsEndTimes] CloudConversationDebuggingInfo speechFinalResultsEndTimes + * @property {number|null} [partialResponses] CloudConversationDebuggingInfo partialResponses + * @property {number|null} [speakerIdPassiveLatencyMsOffset] CloudConversationDebuggingInfo speakerIdPassiveLatencyMsOffset + * @property {boolean|null} [bargeinEventTriggered] CloudConversationDebuggingInfo bargeinEventTriggered + * @property {boolean|null} [speechSingleUtterance] CloudConversationDebuggingInfo speechSingleUtterance + * @property {Array.|null} [dtmfPartialResultsTimes] CloudConversationDebuggingInfo dtmfPartialResultsTimes + * @property {Array.|null} [dtmfFinalResultsTimes] CloudConversationDebuggingInfo dtmfFinalResultsTimes + * @property {google.protobuf.IDuration|null} [singleUtteranceEndTimeOffset] CloudConversationDebuggingInfo singleUtteranceEndTimeOffset + * @property {google.protobuf.IDuration|null} [noSpeechTimeout] CloudConversationDebuggingInfo noSpeechTimeout + * @property {boolean|null} [isInputText] CloudConversationDebuggingInfo isInputText + * @property {google.protobuf.IDuration|null} [clientHalfCloseTimeOffset] CloudConversationDebuggingInfo clientHalfCloseTimeOffset + * @property {google.protobuf.IDuration|null} [clientHalfCloseStreamingTimeOffset] CloudConversationDebuggingInfo clientHalfCloseStreamingTimeOffset + */ + + /** + * Constructs a new CloudConversationDebuggingInfo. + * @memberof google.cloud.dialogflow.v2 + * @classdesc Represents a CloudConversationDebuggingInfo. + * @implements ICloudConversationDebuggingInfo + * @constructor + * @param {google.cloud.dialogflow.v2.ICloudConversationDebuggingInfo=} [properties] Properties to set + */ + function CloudConversationDebuggingInfo(properties) { + this.speechPartialResultsEndTimes = []; + this.speechFinalResultsEndTimes = []; + this.dtmfPartialResultsTimes = []; + this.dtmfFinalResultsTimes = []; + 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]]; + } + + /** + * CloudConversationDebuggingInfo audioDataChunks. + * @member {number} audioDataChunks + * @memberof google.cloud.dialogflow.v2.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.audioDataChunks = 0; + + /** + * CloudConversationDebuggingInfo resultEndTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} resultEndTimeOffset + * @memberof google.cloud.dialogflow.v2.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.resultEndTimeOffset = null; + + /** + * CloudConversationDebuggingInfo firstAudioDuration. + * @member {google.protobuf.IDuration|null|undefined} firstAudioDuration + * @memberof google.cloud.dialogflow.v2.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.firstAudioDuration = null; + + /** + * CloudConversationDebuggingInfo singleUtterance. + * @member {boolean} singleUtterance + * @memberof google.cloud.dialogflow.v2.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.singleUtterance = false; + + /** + * CloudConversationDebuggingInfo speechPartialResultsEndTimes. + * @member {Array.} speechPartialResultsEndTimes + * @memberof google.cloud.dialogflow.v2.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.speechPartialResultsEndTimes = $util.emptyArray; + + /** + * CloudConversationDebuggingInfo speechFinalResultsEndTimes. + * @member {Array.} speechFinalResultsEndTimes + * @memberof google.cloud.dialogflow.v2.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.speechFinalResultsEndTimes = $util.emptyArray; + + /** + * CloudConversationDebuggingInfo partialResponses. + * @member {number} partialResponses + * @memberof google.cloud.dialogflow.v2.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.partialResponses = 0; + + /** + * CloudConversationDebuggingInfo speakerIdPassiveLatencyMsOffset. + * @member {number} speakerIdPassiveLatencyMsOffset + * @memberof google.cloud.dialogflow.v2.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.speakerIdPassiveLatencyMsOffset = 0; + + /** + * CloudConversationDebuggingInfo bargeinEventTriggered. + * @member {boolean} bargeinEventTriggered + * @memberof google.cloud.dialogflow.v2.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.bargeinEventTriggered = false; + + /** + * CloudConversationDebuggingInfo speechSingleUtterance. + * @member {boolean} speechSingleUtterance + * @memberof google.cloud.dialogflow.v2.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.speechSingleUtterance = false; + + /** + * CloudConversationDebuggingInfo dtmfPartialResultsTimes. + * @member {Array.} dtmfPartialResultsTimes + * @memberof google.cloud.dialogflow.v2.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.dtmfPartialResultsTimes = $util.emptyArray; + + /** + * CloudConversationDebuggingInfo dtmfFinalResultsTimes. + * @member {Array.} dtmfFinalResultsTimes + * @memberof google.cloud.dialogflow.v2.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.dtmfFinalResultsTimes = $util.emptyArray; + + /** + * CloudConversationDebuggingInfo singleUtteranceEndTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} singleUtteranceEndTimeOffset + * @memberof google.cloud.dialogflow.v2.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.singleUtteranceEndTimeOffset = null; + + /** + * CloudConversationDebuggingInfo noSpeechTimeout. + * @member {google.protobuf.IDuration|null|undefined} noSpeechTimeout + * @memberof google.cloud.dialogflow.v2.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.noSpeechTimeout = null; + + /** + * CloudConversationDebuggingInfo isInputText. + * @member {boolean} isInputText + * @memberof google.cloud.dialogflow.v2.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.isInputText = false; + + /** + * CloudConversationDebuggingInfo clientHalfCloseTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} clientHalfCloseTimeOffset + * @memberof google.cloud.dialogflow.v2.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.clientHalfCloseTimeOffset = null; + + /** + * CloudConversationDebuggingInfo clientHalfCloseStreamingTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} clientHalfCloseStreamingTimeOffset + * @memberof google.cloud.dialogflow.v2.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.clientHalfCloseStreamingTimeOffset = null; + + /** + * Creates a new CloudConversationDebuggingInfo instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2.CloudConversationDebuggingInfo + * @static + * @param {google.cloud.dialogflow.v2.ICloudConversationDebuggingInfo=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.CloudConversationDebuggingInfo} CloudConversationDebuggingInfo instance + */ + CloudConversationDebuggingInfo.create = function create(properties) { + return new CloudConversationDebuggingInfo(properties); + }; + + /** + * Encodes the specified CloudConversationDebuggingInfo message. Does not implicitly {@link google.cloud.dialogflow.v2.CloudConversationDebuggingInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2.CloudConversationDebuggingInfo + * @static + * @param {google.cloud.dialogflow.v2.ICloudConversationDebuggingInfo} message CloudConversationDebuggingInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudConversationDebuggingInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.audioDataChunks != null && Object.hasOwnProperty.call(message, "audioDataChunks")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.audioDataChunks); + if (message.resultEndTimeOffset != null && Object.hasOwnProperty.call(message, "resultEndTimeOffset")) + $root.google.protobuf.Duration.encode(message.resultEndTimeOffset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.firstAudioDuration != null && Object.hasOwnProperty.call(message, "firstAudioDuration")) + $root.google.protobuf.Duration.encode(message.firstAudioDuration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.singleUtterance != null && Object.hasOwnProperty.call(message, "singleUtterance")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.singleUtterance); + if (message.speechPartialResultsEndTimes != null && message.speechPartialResultsEndTimes.length) + for (var i = 0; i < message.speechPartialResultsEndTimes.length; ++i) + $root.google.protobuf.Duration.encode(message.speechPartialResultsEndTimes[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.speechFinalResultsEndTimes != null && message.speechFinalResultsEndTimes.length) + for (var i = 0; i < message.speechFinalResultsEndTimes.length; ++i) + $root.google.protobuf.Duration.encode(message.speechFinalResultsEndTimes[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.partialResponses != null && Object.hasOwnProperty.call(message, "partialResponses")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.partialResponses); + if (message.speakerIdPassiveLatencyMsOffset != null && Object.hasOwnProperty.call(message, "speakerIdPassiveLatencyMsOffset")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.speakerIdPassiveLatencyMsOffset); + if (message.bargeinEventTriggered != null && Object.hasOwnProperty.call(message, "bargeinEventTriggered")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.bargeinEventTriggered); + if (message.speechSingleUtterance != null && Object.hasOwnProperty.call(message, "speechSingleUtterance")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.speechSingleUtterance); + if (message.dtmfPartialResultsTimes != null && message.dtmfPartialResultsTimes.length) + for (var i = 0; i < message.dtmfPartialResultsTimes.length; ++i) + $root.google.protobuf.Duration.encode(message.dtmfPartialResultsTimes[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.dtmfFinalResultsTimes != null && message.dtmfFinalResultsTimes.length) + for (var i = 0; i < message.dtmfFinalResultsTimes.length; ++i) + $root.google.protobuf.Duration.encode(message.dtmfFinalResultsTimes[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.singleUtteranceEndTimeOffset != null && Object.hasOwnProperty.call(message, "singleUtteranceEndTimeOffset")) + $root.google.protobuf.Duration.encode(message.singleUtteranceEndTimeOffset, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.noSpeechTimeout != null && Object.hasOwnProperty.call(message, "noSpeechTimeout")) + $root.google.protobuf.Duration.encode(message.noSpeechTimeout, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.isInputText != null && Object.hasOwnProperty.call(message, "isInputText")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.isInputText); + if (message.clientHalfCloseTimeOffset != null && Object.hasOwnProperty.call(message, "clientHalfCloseTimeOffset")) + $root.google.protobuf.Duration.encode(message.clientHalfCloseTimeOffset, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.clientHalfCloseStreamingTimeOffset != null && Object.hasOwnProperty.call(message, "clientHalfCloseStreamingTimeOffset")) + $root.google.protobuf.Duration.encode(message.clientHalfCloseStreamingTimeOffset, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CloudConversationDebuggingInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.CloudConversationDebuggingInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2.CloudConversationDebuggingInfo + * @static + * @param {google.cloud.dialogflow.v2.ICloudConversationDebuggingInfo} message CloudConversationDebuggingInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudConversationDebuggingInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudConversationDebuggingInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2.CloudConversationDebuggingInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2.CloudConversationDebuggingInfo} CloudConversationDebuggingInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudConversationDebuggingInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.CloudConversationDebuggingInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.audioDataChunks = reader.int32(); + break; + } + case 2: { + message.resultEndTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 3: { + message.firstAudioDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 5: { + message.singleUtterance = reader.bool(); + break; + } + case 6: { + if (!(message.speechPartialResultsEndTimes && message.speechPartialResultsEndTimes.length)) + message.speechPartialResultsEndTimes = []; + message.speechPartialResultsEndTimes.push($root.google.protobuf.Duration.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.speechFinalResultsEndTimes && message.speechFinalResultsEndTimes.length)) + message.speechFinalResultsEndTimes = []; + message.speechFinalResultsEndTimes.push($root.google.protobuf.Duration.decode(reader, reader.uint32())); + break; + } + case 8: { + message.partialResponses = reader.int32(); + break; + } + case 9: { + message.speakerIdPassiveLatencyMsOffset = reader.int32(); + break; + } + case 10: { + message.bargeinEventTriggered = reader.bool(); + break; + } + case 11: { + message.speechSingleUtterance = reader.bool(); + break; + } + case 12: { + if (!(message.dtmfPartialResultsTimes && message.dtmfPartialResultsTimes.length)) + message.dtmfPartialResultsTimes = []; + message.dtmfPartialResultsTimes.push($root.google.protobuf.Duration.decode(reader, reader.uint32())); + break; + } + case 13: { + if (!(message.dtmfFinalResultsTimes && message.dtmfFinalResultsTimes.length)) + message.dtmfFinalResultsTimes = []; + message.dtmfFinalResultsTimes.push($root.google.protobuf.Duration.decode(reader, reader.uint32())); + break; + } + case 14: { + message.singleUtteranceEndTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 15: { + message.noSpeechTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 16: { + message.isInputText = reader.bool(); + break; + } + case 17: { + message.clientHalfCloseTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 18: { + message.clientHalfCloseStreamingTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudConversationDebuggingInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2.CloudConversationDebuggingInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2.CloudConversationDebuggingInfo} CloudConversationDebuggingInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudConversationDebuggingInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudConversationDebuggingInfo message. + * @function verify + * @memberof google.cloud.dialogflow.v2.CloudConversationDebuggingInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudConversationDebuggingInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.audioDataChunks != null && message.hasOwnProperty("audioDataChunks")) + if (!$util.isInteger(message.audioDataChunks)) + return "audioDataChunks: integer expected"; + if (message.resultEndTimeOffset != null && message.hasOwnProperty("resultEndTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.resultEndTimeOffset); + if (error) + return "resultEndTimeOffset." + error; + } + if (message.firstAudioDuration != null && message.hasOwnProperty("firstAudioDuration")) { + var error = $root.google.protobuf.Duration.verify(message.firstAudioDuration); + if (error) + return "firstAudioDuration." + error; + } + if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) + if (typeof message.singleUtterance !== "boolean") + return "singleUtterance: boolean expected"; + if (message.speechPartialResultsEndTimes != null && message.hasOwnProperty("speechPartialResultsEndTimes")) { + if (!Array.isArray(message.speechPartialResultsEndTimes)) + return "speechPartialResultsEndTimes: array expected"; + for (var i = 0; i < message.speechPartialResultsEndTimes.length; ++i) { + var error = $root.google.protobuf.Duration.verify(message.speechPartialResultsEndTimes[i]); + if (error) + return "speechPartialResultsEndTimes." + error; + } + } + if (message.speechFinalResultsEndTimes != null && message.hasOwnProperty("speechFinalResultsEndTimes")) { + if (!Array.isArray(message.speechFinalResultsEndTimes)) + return "speechFinalResultsEndTimes: array expected"; + for (var i = 0; i < message.speechFinalResultsEndTimes.length; ++i) { + var error = $root.google.protobuf.Duration.verify(message.speechFinalResultsEndTimes[i]); + if (error) + return "speechFinalResultsEndTimes." + error; + } + } + if (message.partialResponses != null && message.hasOwnProperty("partialResponses")) + if (!$util.isInteger(message.partialResponses)) + return "partialResponses: integer expected"; + if (message.speakerIdPassiveLatencyMsOffset != null && message.hasOwnProperty("speakerIdPassiveLatencyMsOffset")) + if (!$util.isInteger(message.speakerIdPassiveLatencyMsOffset)) + return "speakerIdPassiveLatencyMsOffset: integer expected"; + if (message.bargeinEventTriggered != null && message.hasOwnProperty("bargeinEventTriggered")) + if (typeof message.bargeinEventTriggered !== "boolean") + return "bargeinEventTriggered: boolean expected"; + if (message.speechSingleUtterance != null && message.hasOwnProperty("speechSingleUtterance")) + if (typeof message.speechSingleUtterance !== "boolean") + return "speechSingleUtterance: boolean expected"; + if (message.dtmfPartialResultsTimes != null && message.hasOwnProperty("dtmfPartialResultsTimes")) { + if (!Array.isArray(message.dtmfPartialResultsTimes)) + return "dtmfPartialResultsTimes: array expected"; + for (var i = 0; i < message.dtmfPartialResultsTimes.length; ++i) { + var error = $root.google.protobuf.Duration.verify(message.dtmfPartialResultsTimes[i]); + if (error) + return "dtmfPartialResultsTimes." + error; + } + } + if (message.dtmfFinalResultsTimes != null && message.hasOwnProperty("dtmfFinalResultsTimes")) { + if (!Array.isArray(message.dtmfFinalResultsTimes)) + return "dtmfFinalResultsTimes: array expected"; + for (var i = 0; i < message.dtmfFinalResultsTimes.length; ++i) { + var error = $root.google.protobuf.Duration.verify(message.dtmfFinalResultsTimes[i]); + if (error) + return "dtmfFinalResultsTimes." + error; + } + } + if (message.singleUtteranceEndTimeOffset != null && message.hasOwnProperty("singleUtteranceEndTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.singleUtteranceEndTimeOffset); + if (error) + return "singleUtteranceEndTimeOffset." + error; + } + if (message.noSpeechTimeout != null && message.hasOwnProperty("noSpeechTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.noSpeechTimeout); + if (error) + return "noSpeechTimeout." + error; + } + if (message.isInputText != null && message.hasOwnProperty("isInputText")) + if (typeof message.isInputText !== "boolean") + return "isInputText: boolean expected"; + if (message.clientHalfCloseTimeOffset != null && message.hasOwnProperty("clientHalfCloseTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.clientHalfCloseTimeOffset); + if (error) + return "clientHalfCloseTimeOffset." + error; + } + if (message.clientHalfCloseStreamingTimeOffset != null && message.hasOwnProperty("clientHalfCloseStreamingTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.clientHalfCloseStreamingTimeOffset); + if (error) + return "clientHalfCloseStreamingTimeOffset." + error; + } + return null; + }; + + /** + * Creates a CloudConversationDebuggingInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2.CloudConversationDebuggingInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2.CloudConversationDebuggingInfo} CloudConversationDebuggingInfo + */ + CloudConversationDebuggingInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.CloudConversationDebuggingInfo) + return object; + var message = new $root.google.cloud.dialogflow.v2.CloudConversationDebuggingInfo(); + if (object.audioDataChunks != null) + message.audioDataChunks = object.audioDataChunks | 0; + if (object.resultEndTimeOffset != null) { + if (typeof object.resultEndTimeOffset !== "object") + throw TypeError(".google.cloud.dialogflow.v2.CloudConversationDebuggingInfo.resultEndTimeOffset: object expected"); + message.resultEndTimeOffset = $root.google.protobuf.Duration.fromObject(object.resultEndTimeOffset); + } + if (object.firstAudioDuration != null) { + if (typeof object.firstAudioDuration !== "object") + throw TypeError(".google.cloud.dialogflow.v2.CloudConversationDebuggingInfo.firstAudioDuration: object expected"); + message.firstAudioDuration = $root.google.protobuf.Duration.fromObject(object.firstAudioDuration); + } + if (object.singleUtterance != null) + message.singleUtterance = Boolean(object.singleUtterance); + if (object.speechPartialResultsEndTimes) { + if (!Array.isArray(object.speechPartialResultsEndTimes)) + throw TypeError(".google.cloud.dialogflow.v2.CloudConversationDebuggingInfo.speechPartialResultsEndTimes: array expected"); + message.speechPartialResultsEndTimes = []; + for (var i = 0; i < object.speechPartialResultsEndTimes.length; ++i) { + if (typeof object.speechPartialResultsEndTimes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2.CloudConversationDebuggingInfo.speechPartialResultsEndTimes: object expected"); + message.speechPartialResultsEndTimes[i] = $root.google.protobuf.Duration.fromObject(object.speechPartialResultsEndTimes[i]); + } + } + if (object.speechFinalResultsEndTimes) { + if (!Array.isArray(object.speechFinalResultsEndTimes)) + throw TypeError(".google.cloud.dialogflow.v2.CloudConversationDebuggingInfo.speechFinalResultsEndTimes: array expected"); + message.speechFinalResultsEndTimes = []; + for (var i = 0; i < object.speechFinalResultsEndTimes.length; ++i) { + if (typeof object.speechFinalResultsEndTimes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2.CloudConversationDebuggingInfo.speechFinalResultsEndTimes: object expected"); + message.speechFinalResultsEndTimes[i] = $root.google.protobuf.Duration.fromObject(object.speechFinalResultsEndTimes[i]); + } + } + if (object.partialResponses != null) + message.partialResponses = object.partialResponses | 0; + if (object.speakerIdPassiveLatencyMsOffset != null) + message.speakerIdPassiveLatencyMsOffset = object.speakerIdPassiveLatencyMsOffset | 0; + if (object.bargeinEventTriggered != null) + message.bargeinEventTriggered = Boolean(object.bargeinEventTriggered); + if (object.speechSingleUtterance != null) + message.speechSingleUtterance = Boolean(object.speechSingleUtterance); + if (object.dtmfPartialResultsTimes) { + if (!Array.isArray(object.dtmfPartialResultsTimes)) + throw TypeError(".google.cloud.dialogflow.v2.CloudConversationDebuggingInfo.dtmfPartialResultsTimes: array expected"); + message.dtmfPartialResultsTimes = []; + for (var i = 0; i < object.dtmfPartialResultsTimes.length; ++i) { + if (typeof object.dtmfPartialResultsTimes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2.CloudConversationDebuggingInfo.dtmfPartialResultsTimes: object expected"); + message.dtmfPartialResultsTimes[i] = $root.google.protobuf.Duration.fromObject(object.dtmfPartialResultsTimes[i]); + } + } + if (object.dtmfFinalResultsTimes) { + if (!Array.isArray(object.dtmfFinalResultsTimes)) + throw TypeError(".google.cloud.dialogflow.v2.CloudConversationDebuggingInfo.dtmfFinalResultsTimes: array expected"); + message.dtmfFinalResultsTimes = []; + for (var i = 0; i < object.dtmfFinalResultsTimes.length; ++i) { + if (typeof object.dtmfFinalResultsTimes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2.CloudConversationDebuggingInfo.dtmfFinalResultsTimes: object expected"); + message.dtmfFinalResultsTimes[i] = $root.google.protobuf.Duration.fromObject(object.dtmfFinalResultsTimes[i]); + } + } + if (object.singleUtteranceEndTimeOffset != null) { + if (typeof object.singleUtteranceEndTimeOffset !== "object") + throw TypeError(".google.cloud.dialogflow.v2.CloudConversationDebuggingInfo.singleUtteranceEndTimeOffset: object expected"); + message.singleUtteranceEndTimeOffset = $root.google.protobuf.Duration.fromObject(object.singleUtteranceEndTimeOffset); + } + if (object.noSpeechTimeout != null) { + if (typeof object.noSpeechTimeout !== "object") + throw TypeError(".google.cloud.dialogflow.v2.CloudConversationDebuggingInfo.noSpeechTimeout: object expected"); + message.noSpeechTimeout = $root.google.protobuf.Duration.fromObject(object.noSpeechTimeout); + } + if (object.isInputText != null) + message.isInputText = Boolean(object.isInputText); + if (object.clientHalfCloseTimeOffset != null) { + if (typeof object.clientHalfCloseTimeOffset !== "object") + throw TypeError(".google.cloud.dialogflow.v2.CloudConversationDebuggingInfo.clientHalfCloseTimeOffset: object expected"); + message.clientHalfCloseTimeOffset = $root.google.protobuf.Duration.fromObject(object.clientHalfCloseTimeOffset); + } + if (object.clientHalfCloseStreamingTimeOffset != null) { + if (typeof object.clientHalfCloseStreamingTimeOffset !== "object") + throw TypeError(".google.cloud.dialogflow.v2.CloudConversationDebuggingInfo.clientHalfCloseStreamingTimeOffset: object expected"); + message.clientHalfCloseStreamingTimeOffset = $root.google.protobuf.Duration.fromObject(object.clientHalfCloseStreamingTimeOffset); + } + return message; + }; + + /** + * Creates a plain object from a CloudConversationDebuggingInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2.CloudConversationDebuggingInfo + * @static + * @param {google.cloud.dialogflow.v2.CloudConversationDebuggingInfo} message CloudConversationDebuggingInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudConversationDebuggingInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.speechPartialResultsEndTimes = []; + object.speechFinalResultsEndTimes = []; + object.dtmfPartialResultsTimes = []; + object.dtmfFinalResultsTimes = []; + } + if (options.defaults) { + object.audioDataChunks = 0; + object.resultEndTimeOffset = null; + object.firstAudioDuration = null; + object.singleUtterance = false; + object.partialResponses = 0; + object.speakerIdPassiveLatencyMsOffset = 0; + object.bargeinEventTriggered = false; + object.speechSingleUtterance = false; + object.singleUtteranceEndTimeOffset = null; + object.noSpeechTimeout = null; + object.isInputText = false; + object.clientHalfCloseTimeOffset = null; + object.clientHalfCloseStreamingTimeOffset = null; + } + if (message.audioDataChunks != null && message.hasOwnProperty("audioDataChunks")) + object.audioDataChunks = message.audioDataChunks; + if (message.resultEndTimeOffset != null && message.hasOwnProperty("resultEndTimeOffset")) + object.resultEndTimeOffset = $root.google.protobuf.Duration.toObject(message.resultEndTimeOffset, options); + if (message.firstAudioDuration != null && message.hasOwnProperty("firstAudioDuration")) + object.firstAudioDuration = $root.google.protobuf.Duration.toObject(message.firstAudioDuration, options); + if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) + object.singleUtterance = message.singleUtterance; + if (message.speechPartialResultsEndTimes && message.speechPartialResultsEndTimes.length) { + object.speechPartialResultsEndTimes = []; + for (var j = 0; j < message.speechPartialResultsEndTimes.length; ++j) + object.speechPartialResultsEndTimes[j] = $root.google.protobuf.Duration.toObject(message.speechPartialResultsEndTimes[j], options); + } + if (message.speechFinalResultsEndTimes && message.speechFinalResultsEndTimes.length) { + object.speechFinalResultsEndTimes = []; + for (var j = 0; j < message.speechFinalResultsEndTimes.length; ++j) + object.speechFinalResultsEndTimes[j] = $root.google.protobuf.Duration.toObject(message.speechFinalResultsEndTimes[j], options); + } + if (message.partialResponses != null && message.hasOwnProperty("partialResponses")) + object.partialResponses = message.partialResponses; + if (message.speakerIdPassiveLatencyMsOffset != null && message.hasOwnProperty("speakerIdPassiveLatencyMsOffset")) + object.speakerIdPassiveLatencyMsOffset = message.speakerIdPassiveLatencyMsOffset; + if (message.bargeinEventTriggered != null && message.hasOwnProperty("bargeinEventTriggered")) + object.bargeinEventTriggered = message.bargeinEventTriggered; + if (message.speechSingleUtterance != null && message.hasOwnProperty("speechSingleUtterance")) + object.speechSingleUtterance = message.speechSingleUtterance; + if (message.dtmfPartialResultsTimes && message.dtmfPartialResultsTimes.length) { + object.dtmfPartialResultsTimes = []; + for (var j = 0; j < message.dtmfPartialResultsTimes.length; ++j) + object.dtmfPartialResultsTimes[j] = $root.google.protobuf.Duration.toObject(message.dtmfPartialResultsTimes[j], options); + } + if (message.dtmfFinalResultsTimes && message.dtmfFinalResultsTimes.length) { + object.dtmfFinalResultsTimes = []; + for (var j = 0; j < message.dtmfFinalResultsTimes.length; ++j) + object.dtmfFinalResultsTimes[j] = $root.google.protobuf.Duration.toObject(message.dtmfFinalResultsTimes[j], options); + } + if (message.singleUtteranceEndTimeOffset != null && message.hasOwnProperty("singleUtteranceEndTimeOffset")) + object.singleUtteranceEndTimeOffset = $root.google.protobuf.Duration.toObject(message.singleUtteranceEndTimeOffset, options); + if (message.noSpeechTimeout != null && message.hasOwnProperty("noSpeechTimeout")) + object.noSpeechTimeout = $root.google.protobuf.Duration.toObject(message.noSpeechTimeout, options); + if (message.isInputText != null && message.hasOwnProperty("isInputText")) + object.isInputText = message.isInputText; + if (message.clientHalfCloseTimeOffset != null && message.hasOwnProperty("clientHalfCloseTimeOffset")) + object.clientHalfCloseTimeOffset = $root.google.protobuf.Duration.toObject(message.clientHalfCloseTimeOffset, options); + if (message.clientHalfCloseStreamingTimeOffset != null && message.hasOwnProperty("clientHalfCloseStreamingTimeOffset")) + object.clientHalfCloseStreamingTimeOffset = $root.google.protobuf.Duration.toObject(message.clientHalfCloseStreamingTimeOffset, options); + return object; + }; + + /** + * Converts this CloudConversationDebuggingInfo to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2.CloudConversationDebuggingInfo + * @instance + * @returns {Object.} JSON object + */ + CloudConversationDebuggingInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudConversationDebuggingInfo + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2.CloudConversationDebuggingInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudConversationDebuggingInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.v2.CloudConversationDebuggingInfo"; + }; + + return CloudConversationDebuggingInfo; + })(); + v2.StreamingDetectIntentResponse = (function() { /** @@ -20542,6 +21327,7 @@ * @property {google.rpc.IStatus|null} [webhookStatus] StreamingDetectIntentResponse webhookStatus * @property {Uint8Array|null} [outputAudio] StreamingDetectIntentResponse outputAudio * @property {google.cloud.dialogflow.v2.IOutputAudioConfig|null} [outputAudioConfig] StreamingDetectIntentResponse outputAudioConfig + * @property {google.cloud.dialogflow.v2.ICloudConversationDebuggingInfo|null} [debuggingInfo] StreamingDetectIntentResponse debuggingInfo */ /** @@ -20607,6 +21393,14 @@ */ StreamingDetectIntentResponse.prototype.outputAudioConfig = null; + /** + * StreamingDetectIntentResponse debuggingInfo. + * @member {google.cloud.dialogflow.v2.ICloudConversationDebuggingInfo|null|undefined} debuggingInfo + * @memberof google.cloud.dialogflow.v2.StreamingDetectIntentResponse + * @instance + */ + StreamingDetectIntentResponse.prototype.debuggingInfo = null; + /** * Creates a new StreamingDetectIntentResponse instance using the specified properties. * @function create @@ -20643,6 +21437,8 @@ writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.outputAudio); if (message.outputAudioConfig != null && Object.hasOwnProperty.call(message, "outputAudioConfig")) $root.google.cloud.dialogflow.v2.OutputAudioConfig.encode(message.outputAudioConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.debuggingInfo != null && Object.hasOwnProperty.call(message, "debuggingInfo")) + $root.google.cloud.dialogflow.v2.CloudConversationDebuggingInfo.encode(message.debuggingInfo, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; @@ -20701,6 +21497,10 @@ message.outputAudioConfig = $root.google.cloud.dialogflow.v2.OutputAudioConfig.decode(reader, reader.uint32()); break; } + case 8: { + message.debuggingInfo = $root.google.cloud.dialogflow.v2.CloudConversationDebuggingInfo.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -20762,6 +21562,11 @@ if (error) return "outputAudioConfig." + error; } + if (message.debuggingInfo != null && message.hasOwnProperty("debuggingInfo")) { + var error = $root.google.cloud.dialogflow.v2.CloudConversationDebuggingInfo.verify(message.debuggingInfo); + if (error) + return "debuggingInfo." + error; + } return null; }; @@ -20804,6 +21609,11 @@ throw TypeError(".google.cloud.dialogflow.v2.StreamingDetectIntentResponse.outputAudioConfig: object expected"); message.outputAudioConfig = $root.google.cloud.dialogflow.v2.OutputAudioConfig.fromObject(object.outputAudioConfig); } + if (object.debuggingInfo != null) { + if (typeof object.debuggingInfo !== "object") + throw TypeError(".google.cloud.dialogflow.v2.StreamingDetectIntentResponse.debuggingInfo: object expected"); + message.debuggingInfo = $root.google.cloud.dialogflow.v2.CloudConversationDebuggingInfo.fromObject(object.debuggingInfo); + } return message; }; @@ -20833,6 +21643,7 @@ object.outputAudio = $util.newBuffer(object.outputAudio); } object.outputAudioConfig = null; + object.debuggingInfo = null; } if (message.responseId != null && message.hasOwnProperty("responseId")) object.responseId = message.responseId; @@ -20846,6 +21657,8 @@ object.outputAudio = options.bytes === String ? $util.base64.encode(message.outputAudio, 0, message.outputAudio.length) : options.bytes === Array ? Array.prototype.slice.call(message.outputAudio) : message.outputAudio; if (message.outputAudioConfig != null && message.hasOwnProperty("outputAudioConfig")) object.outputAudioConfig = $root.google.cloud.dialogflow.v2.OutputAudioConfig.toObject(message.outputAudioConfig, options); + if (message.debuggingInfo != null && message.hasOwnProperty("debuggingInfo")) + object.debuggingInfo = $root.google.cloud.dialogflow.v2.CloudConversationDebuggingInfo.toObject(message.debuggingInfo, options); return object; }; @@ -43847,6 +44660,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.dialogflow.v2.Conversations|generateStatelessSummary}. + * @memberof google.cloud.dialogflow.v2.Conversations + * @typedef GenerateStatelessSummaryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse} [response] GenerateStatelessSummaryResponse + */ + + /** + * Calls GenerateStatelessSummary. + * @function generateStatelessSummary + * @memberof google.cloud.dialogflow.v2.Conversations + * @instance + * @param {google.cloud.dialogflow.v2.IGenerateStatelessSummaryRequest} request GenerateStatelessSummaryRequest message or plain object + * @param {google.cloud.dialogflow.v2.Conversations.GenerateStatelessSummaryCallback} callback Node-style callback called with the error, if any, and GenerateStatelessSummaryResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Conversations.prototype.generateStatelessSummary = function generateStatelessSummary(request, callback) { + return this.rpcCall(generateStatelessSummary, $root.google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest, $root.google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse, request, callback); + }, "name", { value: "GenerateStatelessSummary" }); + + /** + * Calls GenerateStatelessSummary. + * @function generateStatelessSummary + * @memberof google.cloud.dialogflow.v2.Conversations + * @instance + * @param {google.cloud.dialogflow.v2.IGenerateStatelessSummaryRequest} request GenerateStatelessSummaryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return Conversations; })(); @@ -47012,300 +47858,145 @@ return SuggestConversationSummaryResponse; })(); - v2.ConversationDatasets = (function() { + v2.GenerateStatelessSummaryRequest = (function() { /** - * Constructs a new ConversationDatasets service. + * Properties of a GenerateStatelessSummaryRequest. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a ConversationDatasets - * @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 ConversationDatasets(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (ConversationDatasets.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ConversationDatasets; - - /** - * Creates new ConversationDatasets service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.v2.ConversationDatasets - * @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 {ConversationDatasets} RPC service. Useful where requests and/or responses are streamed. - */ - ConversationDatasets.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationDatasets|createConversationDataset}. - * @memberof google.cloud.dialogflow.v2.ConversationDatasets - * @typedef CreateConversationDatasetCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateConversationDataset. - * @function createConversationDataset - * @memberof google.cloud.dialogflow.v2.ConversationDatasets - * @instance - * @param {google.cloud.dialogflow.v2.ICreateConversationDatasetRequest} request CreateConversationDatasetRequest message or plain object - * @param {google.cloud.dialogflow.v2.ConversationDatasets.CreateConversationDatasetCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConversationDatasets.prototype.createConversationDataset = function createConversationDataset(request, callback) { - return this.rpcCall(createConversationDataset, $root.google.cloud.dialogflow.v2.CreateConversationDatasetRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateConversationDataset" }); - - /** - * Calls CreateConversationDataset. - * @function createConversationDataset - * @memberof google.cloud.dialogflow.v2.ConversationDatasets - * @instance - * @param {google.cloud.dialogflow.v2.ICreateConversationDatasetRequest} request CreateConversationDatasetRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationDatasets|getConversationDataset}. - * @memberof google.cloud.dialogflow.v2.ConversationDatasets - * @typedef GetConversationDatasetCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2.ConversationDataset} [response] ConversationDataset - */ - - /** - * Calls GetConversationDataset. - * @function getConversationDataset - * @memberof google.cloud.dialogflow.v2.ConversationDatasets - * @instance - * @param {google.cloud.dialogflow.v2.IGetConversationDatasetRequest} request GetConversationDatasetRequest message or plain object - * @param {google.cloud.dialogflow.v2.ConversationDatasets.GetConversationDatasetCallback} callback Node-style callback called with the error, if any, and ConversationDataset - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConversationDatasets.prototype.getConversationDataset = function getConversationDataset(request, callback) { - return this.rpcCall(getConversationDataset, $root.google.cloud.dialogflow.v2.GetConversationDatasetRequest, $root.google.cloud.dialogflow.v2.ConversationDataset, request, callback); - }, "name", { value: "GetConversationDataset" }); - - /** - * Calls GetConversationDataset. - * @function getConversationDataset - * @memberof google.cloud.dialogflow.v2.ConversationDatasets - * @instance - * @param {google.cloud.dialogflow.v2.IGetConversationDatasetRequest} request GetConversationDatasetRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationDatasets|listConversationDatasets}. - * @memberof google.cloud.dialogflow.v2.ConversationDatasets - * @typedef ListConversationDatasetsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2.ListConversationDatasetsResponse} [response] ListConversationDatasetsResponse - */ - - /** - * Calls ListConversationDatasets. - * @function listConversationDatasets - * @memberof google.cloud.dialogflow.v2.ConversationDatasets - * @instance - * @param {google.cloud.dialogflow.v2.IListConversationDatasetsRequest} request ListConversationDatasetsRequest message or plain object - * @param {google.cloud.dialogflow.v2.ConversationDatasets.ListConversationDatasetsCallback} callback Node-style callback called with the error, if any, and ListConversationDatasetsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConversationDatasets.prototype.listConversationDatasets = function listConversationDatasets(request, callback) { - return this.rpcCall(listConversationDatasets, $root.google.cloud.dialogflow.v2.ListConversationDatasetsRequest, $root.google.cloud.dialogflow.v2.ListConversationDatasetsResponse, request, callback); - }, "name", { value: "ListConversationDatasets" }); - - /** - * Calls ListConversationDatasets. - * @function listConversationDatasets - * @memberof google.cloud.dialogflow.v2.ConversationDatasets - * @instance - * @param {google.cloud.dialogflow.v2.IListConversationDatasetsRequest} request ListConversationDatasetsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationDatasets|deleteConversationDataset}. - * @memberof google.cloud.dialogflow.v2.ConversationDatasets - * @typedef DeleteConversationDatasetCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * @interface IGenerateStatelessSummaryRequest + * @property {google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.IMinimalConversation|null} [statelessConversation] GenerateStatelessSummaryRequest statelessConversation + * @property {google.cloud.dialogflow.v2.IConversationProfile|null} [conversationProfile] GenerateStatelessSummaryRequest conversationProfile + * @property {string|null} [latestMessage] GenerateStatelessSummaryRequest latestMessage + * @property {number|null} [maxContextSize] GenerateStatelessSummaryRequest maxContextSize */ /** - * Calls DeleteConversationDataset. - * @function deleteConversationDataset - * @memberof google.cloud.dialogflow.v2.ConversationDatasets - * @instance - * @param {google.cloud.dialogflow.v2.IDeleteConversationDatasetRequest} request DeleteConversationDatasetRequest message or plain object - * @param {google.cloud.dialogflow.v2.ConversationDatasets.DeleteConversationDatasetCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Constructs a new GenerateStatelessSummaryRequest. + * @memberof google.cloud.dialogflow.v2 + * @classdesc Represents a GenerateStatelessSummaryRequest. + * @implements IGenerateStatelessSummaryRequest + * @constructor + * @param {google.cloud.dialogflow.v2.IGenerateStatelessSummaryRequest=} [properties] Properties to set */ - Object.defineProperty(ConversationDatasets.prototype.deleteConversationDataset = function deleteConversationDataset(request, callback) { - return this.rpcCall(deleteConversationDataset, $root.google.cloud.dialogflow.v2.DeleteConversationDatasetRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteConversationDataset" }); + function GenerateStatelessSummaryRequest(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]]; + } /** - * Calls DeleteConversationDataset. - * @function deleteConversationDataset - * @memberof google.cloud.dialogflow.v2.ConversationDatasets + * GenerateStatelessSummaryRequest statelessConversation. + * @member {google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.IMinimalConversation|null|undefined} statelessConversation + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest * @instance - * @param {google.cloud.dialogflow.v2.IDeleteConversationDatasetRequest} request DeleteConversationDatasetRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationDatasets|importConversationData}. - * @memberof google.cloud.dialogflow.v2.ConversationDatasets - * @typedef ImportConversationDataCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation */ + GenerateStatelessSummaryRequest.prototype.statelessConversation = null; /** - * Calls ImportConversationData. - * @function importConversationData - * @memberof google.cloud.dialogflow.v2.ConversationDatasets + * GenerateStatelessSummaryRequest conversationProfile. + * @member {google.cloud.dialogflow.v2.IConversationProfile|null|undefined} conversationProfile + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest * @instance - * @param {google.cloud.dialogflow.v2.IImportConversationDataRequest} request ImportConversationDataRequest message or plain object - * @param {google.cloud.dialogflow.v2.ConversationDatasets.ImportConversationDataCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(ConversationDatasets.prototype.importConversationData = function importConversationData(request, callback) { - return this.rpcCall(importConversationData, $root.google.cloud.dialogflow.v2.ImportConversationDataRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ImportConversationData" }); + GenerateStatelessSummaryRequest.prototype.conversationProfile = null; /** - * Calls ImportConversationData. - * @function importConversationData - * @memberof google.cloud.dialogflow.v2.ConversationDatasets + * GenerateStatelessSummaryRequest latestMessage. + * @member {string} latestMessage + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest * @instance - * @param {google.cloud.dialogflow.v2.IImportConversationDataRequest} request ImportConversationDataRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return ConversationDatasets; - })(); - - v2.ConversationInfo = (function() { - - /** - * Properties of a ConversationInfo. - * @memberof google.cloud.dialogflow.v2 - * @interface IConversationInfo - * @property {string|null} [languageCode] ConversationInfo languageCode - */ - - /** - * Constructs a new ConversationInfo. - * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a ConversationInfo. - * @implements IConversationInfo - * @constructor - * @param {google.cloud.dialogflow.v2.IConversationInfo=} [properties] Properties to set */ - function ConversationInfo(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]]; - } + GenerateStatelessSummaryRequest.prototype.latestMessage = ""; /** - * ConversationInfo languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.v2.ConversationInfo + * GenerateStatelessSummaryRequest maxContextSize. + * @member {number} maxContextSize + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest * @instance */ - ConversationInfo.prototype.languageCode = ""; + GenerateStatelessSummaryRequest.prototype.maxContextSize = 0; /** - * Creates a new ConversationInfo instance using the specified properties. + * Creates a new GenerateStatelessSummaryRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.ConversationInfo + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest * @static - * @param {google.cloud.dialogflow.v2.IConversationInfo=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.ConversationInfo} ConversationInfo instance + * @param {google.cloud.dialogflow.v2.IGenerateStatelessSummaryRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest} GenerateStatelessSummaryRequest instance */ - ConversationInfo.create = function create(properties) { - return new ConversationInfo(properties); + GenerateStatelessSummaryRequest.create = function create(properties) { + return new GenerateStatelessSummaryRequest(properties); }; /** - * Encodes the specified ConversationInfo message. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationInfo.verify|verify} messages. + * Encodes the specified GenerateStatelessSummaryRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.ConversationInfo + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest * @static - * @param {google.cloud.dialogflow.v2.IConversationInfo} message ConversationInfo message or plain object to encode + * @param {google.cloud.dialogflow.v2.IGenerateStatelessSummaryRequest} message GenerateStatelessSummaryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConversationInfo.encode = function encode(message, writer) { + GenerateStatelessSummaryRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.languageCode); + if (message.statelessConversation != null && Object.hasOwnProperty.call(message, "statelessConversation")) + $root.google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation.encode(message.statelessConversation, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.conversationProfile != null && Object.hasOwnProperty.call(message, "conversationProfile")) + $root.google.cloud.dialogflow.v2.ConversationProfile.encode(message.conversationProfile, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.latestMessage != null && Object.hasOwnProperty.call(message, "latestMessage")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.latestMessage); + if (message.maxContextSize != null && Object.hasOwnProperty.call(message, "maxContextSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.maxContextSize); return writer; }; /** - * Encodes the specified ConversationInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationInfo.verify|verify} messages. + * Encodes the specified GenerateStatelessSummaryRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.ConversationInfo + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest * @static - * @param {google.cloud.dialogflow.v2.IConversationInfo} message ConversationInfo message or plain object to encode + * @param {google.cloud.dialogflow.v2.IGenerateStatelessSummaryRequest} message GenerateStatelessSummaryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConversationInfo.encodeDelimited = function encodeDelimited(message, writer) { + GenerateStatelessSummaryRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ConversationInfo message from the specified reader or buffer. + * Decodes a GenerateStatelessSummaryRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.ConversationInfo + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.ConversationInfo} ConversationInfo + * @returns {google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest} GenerateStatelessSummaryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConversationInfo.decode = function decode(reader, length) { + GenerateStatelessSummaryRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ConversationInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.languageCode = reader.string(); + message.statelessConversation = $root.google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation.decode(reader, reader.uint32()); + break; + } + case 2: { + message.conversationProfile = $root.google.cloud.dialogflow.v2.ConversationProfile.decode(reader, reader.uint32()); + break; + } + case 3: { + message.latestMessage = reader.string(); + break; + } + case 4: { + message.maxContextSize = reader.int32(); break; } default: @@ -47317,122 +48008,407 @@ }; /** - * Decodes a ConversationInfo message from the specified reader or buffer, length delimited. + * Decodes a GenerateStatelessSummaryRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.ConversationInfo + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.ConversationInfo} ConversationInfo + * @returns {google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest} GenerateStatelessSummaryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConversationInfo.decodeDelimited = function decodeDelimited(reader) { + GenerateStatelessSummaryRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ConversationInfo message. + * Verifies a GenerateStatelessSummaryRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2.ConversationInfo + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ConversationInfo.verify = function verify(message) { + GenerateStatelessSummaryRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; + if (message.statelessConversation != null && message.hasOwnProperty("statelessConversation")) { + var error = $root.google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation.verify(message.statelessConversation); + if (error) + return "statelessConversation." + error; + } + if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) { + var error = $root.google.cloud.dialogflow.v2.ConversationProfile.verify(message.conversationProfile); + if (error) + return "conversationProfile." + error; + } + if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) + if (!$util.isString(message.latestMessage)) + return "latestMessage: string expected"; + if (message.maxContextSize != null && message.hasOwnProperty("maxContextSize")) + if (!$util.isInteger(message.maxContextSize)) + return "maxContextSize: integer expected"; return null; }; /** - * Creates a ConversationInfo message from a plain object. Also converts values to their respective internal types. + * Creates a GenerateStatelessSummaryRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.ConversationInfo + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.ConversationInfo} ConversationInfo + * @returns {google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest} GenerateStatelessSummaryRequest */ - ConversationInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.ConversationInfo) + GenerateStatelessSummaryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest) return object; - var message = new $root.google.cloud.dialogflow.v2.ConversationInfo(); - if (object.languageCode != null) - message.languageCode = String(object.languageCode); + var message = new $root.google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest(); + if (object.statelessConversation != null) { + if (typeof object.statelessConversation !== "object") + throw TypeError(".google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.statelessConversation: object expected"); + message.statelessConversation = $root.google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation.fromObject(object.statelessConversation); + } + if (object.conversationProfile != null) { + if (typeof object.conversationProfile !== "object") + throw TypeError(".google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.conversationProfile: object expected"); + message.conversationProfile = $root.google.cloud.dialogflow.v2.ConversationProfile.fromObject(object.conversationProfile); + } + if (object.latestMessage != null) + message.latestMessage = String(object.latestMessage); + if (object.maxContextSize != null) + message.maxContextSize = object.maxContextSize | 0; return message; }; /** - * Creates a plain object from a ConversationInfo message. Also converts values to other types if specified. + * Creates a plain object from a GenerateStatelessSummaryRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.ConversationInfo + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest * @static - * @param {google.cloud.dialogflow.v2.ConversationInfo} message ConversationInfo + * @param {google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest} message GenerateStatelessSummaryRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ConversationInfo.toObject = function toObject(message, options) { + GenerateStatelessSummaryRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.languageCode = ""; - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; + if (options.defaults) { + object.statelessConversation = null; + object.conversationProfile = null; + object.latestMessage = ""; + object.maxContextSize = 0; + } + if (message.statelessConversation != null && message.hasOwnProperty("statelessConversation")) + object.statelessConversation = $root.google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation.toObject(message.statelessConversation, options); + if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) + object.conversationProfile = $root.google.cloud.dialogflow.v2.ConversationProfile.toObject(message.conversationProfile, options); + if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) + object.latestMessage = message.latestMessage; + if (message.maxContextSize != null && message.hasOwnProperty("maxContextSize")) + object.maxContextSize = message.maxContextSize; return object; }; /** - * Converts this ConversationInfo to JSON. + * Converts this GenerateStatelessSummaryRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.ConversationInfo + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest * @instance * @returns {Object.} JSON object */ - ConversationInfo.prototype.toJSON = function toJSON() { + GenerateStatelessSummaryRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ConversationInfo + * Gets the default type url for GenerateStatelessSummaryRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.ConversationInfo + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ConversationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GenerateStatelessSummaryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.ConversationInfo"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest"; }; - return ConversationInfo; + GenerateStatelessSummaryRequest.MinimalConversation = (function() { + + /** + * Properties of a MinimalConversation. + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest + * @interface IMinimalConversation + * @property {Array.|null} [messages] MinimalConversation messages + * @property {string|null} [parent] MinimalConversation parent + */ + + /** + * Constructs a new MinimalConversation. + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest + * @classdesc Represents a MinimalConversation. + * @implements IMinimalConversation + * @constructor + * @param {google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.IMinimalConversation=} [properties] Properties to set + */ + function MinimalConversation(properties) { + this.messages = []; + 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]]; + } + + /** + * MinimalConversation messages. + * @member {Array.} messages + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation + * @instance + */ + MinimalConversation.prototype.messages = $util.emptyArray; + + /** + * MinimalConversation parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation + * @instance + */ + MinimalConversation.prototype.parent = ""; + + /** + * Creates a new MinimalConversation instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation + * @static + * @param {google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.IMinimalConversation=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation} MinimalConversation instance + */ + MinimalConversation.create = function create(properties) { + return new MinimalConversation(properties); + }; + + /** + * Encodes the specified MinimalConversation message. Does not implicitly {@link google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation + * @static + * @param {google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.IMinimalConversation} message MinimalConversation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MinimalConversation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messages != null && message.messages.length) + for (var i = 0; i < message.messages.length; ++i) + $root.google.cloud.dialogflow.v2.Message.encode(message.messages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.parent); + return writer; + }; + + /** + * Encodes the specified MinimalConversation message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation + * @static + * @param {google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.IMinimalConversation} message MinimalConversation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MinimalConversation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MinimalConversation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation} MinimalConversation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MinimalConversation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.messages && message.messages.length)) + message.messages = []; + message.messages.push($root.google.cloud.dialogflow.v2.Message.decode(reader, reader.uint32())); + break; + } + case 2: { + message.parent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MinimalConversation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation} MinimalConversation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MinimalConversation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MinimalConversation message. + * @function verify + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MinimalConversation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messages != null && message.hasOwnProperty("messages")) { + if (!Array.isArray(message.messages)) + return "messages: array expected"; + for (var i = 0; i < message.messages.length; ++i) { + var error = $root.google.cloud.dialogflow.v2.Message.verify(message.messages[i]); + if (error) + return "messages." + error; + } + } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + return null; + }; + + /** + * Creates a MinimalConversation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation} MinimalConversation + */ + MinimalConversation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation) + return object; + var message = new $root.google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation(); + if (object.messages) { + if (!Array.isArray(object.messages)) + throw TypeError(".google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation.messages: array expected"); + message.messages = []; + for (var i = 0; i < object.messages.length; ++i) { + if (typeof object.messages[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation.messages: object expected"); + message.messages[i] = $root.google.cloud.dialogflow.v2.Message.fromObject(object.messages[i]); + } + } + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from a MinimalConversation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation + * @static + * @param {google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation} message MinimalConversation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MinimalConversation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.messages = []; + if (options.defaults) + object.parent = ""; + if (message.messages && message.messages.length) { + object.messages = []; + for (var j = 0; j < message.messages.length; ++j) + object.messages[j] = $root.google.cloud.dialogflow.v2.Message.toObject(message.messages[j], options); + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + return object; + }; + + /** + * Converts this MinimalConversation to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation + * @instance + * @returns {Object.} JSON object + */ + MinimalConversation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MinimalConversation + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MinimalConversation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation"; + }; + + return MinimalConversation; + })(); + + return GenerateStatelessSummaryRequest; })(); - v2.InputConfig = (function() { + v2.GenerateStatelessSummaryResponse = (function() { /** - * Properties of an InputConfig. + * Properties of a GenerateStatelessSummaryResponse. * @memberof google.cloud.dialogflow.v2 - * @interface IInputConfig - * @property {google.cloud.dialogflow.v2.IGcsSources|null} [gcsSource] InputConfig gcsSource + * @interface IGenerateStatelessSummaryResponse + * @property {google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.ISummary|null} [summary] GenerateStatelessSummaryResponse summary + * @property {string|null} [latestMessage] GenerateStatelessSummaryResponse latestMessage + * @property {number|null} [contextSize] GenerateStatelessSummaryResponse contextSize */ /** - * Constructs a new InputConfig. + * Constructs a new GenerateStatelessSummaryResponse. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents an InputConfig. - * @implements IInputConfig + * @classdesc Represents a GenerateStatelessSummaryResponse. + * @implements IGenerateStatelessSummaryResponse * @constructor - * @param {google.cloud.dialogflow.v2.IInputConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.IGenerateStatelessSummaryResponse=} [properties] Properties to set */ - function InputConfig(properties) { + function GenerateStatelessSummaryResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -47440,89 +48416,103 @@ } /** - * InputConfig gcsSource. - * @member {google.cloud.dialogflow.v2.IGcsSources|null|undefined} gcsSource - * @memberof google.cloud.dialogflow.v2.InputConfig + * GenerateStatelessSummaryResponse summary. + * @member {google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.ISummary|null|undefined} summary + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse * @instance */ - InputConfig.prototype.gcsSource = null; + GenerateStatelessSummaryResponse.prototype.summary = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * GenerateStatelessSummaryResponse latestMessage. + * @member {string} latestMessage + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse + * @instance + */ + GenerateStatelessSummaryResponse.prototype.latestMessage = ""; /** - * InputConfig source. - * @member {"gcsSource"|undefined} source - * @memberof google.cloud.dialogflow.v2.InputConfig + * GenerateStatelessSummaryResponse contextSize. + * @member {number} contextSize + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse * @instance */ - Object.defineProperty(InputConfig.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["gcsSource"]), - set: $util.oneOfSetter($oneOfFields) - }); + GenerateStatelessSummaryResponse.prototype.contextSize = 0; /** - * Creates a new InputConfig instance using the specified properties. + * Creates a new GenerateStatelessSummaryResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.InputConfig + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse * @static - * @param {google.cloud.dialogflow.v2.IInputConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.InputConfig} InputConfig instance + * @param {google.cloud.dialogflow.v2.IGenerateStatelessSummaryResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse} GenerateStatelessSummaryResponse instance */ - InputConfig.create = function create(properties) { - return new InputConfig(properties); + GenerateStatelessSummaryResponse.create = function create(properties) { + return new GenerateStatelessSummaryResponse(properties); }; /** - * Encodes the specified InputConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.InputConfig.verify|verify} messages. + * Encodes the specified GenerateStatelessSummaryResponse message. Does not implicitly {@link google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.InputConfig + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse * @static - * @param {google.cloud.dialogflow.v2.IInputConfig} message InputConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2.IGenerateStatelessSummaryResponse} message GenerateStatelessSummaryResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InputConfig.encode = function encode(message, writer) { + GenerateStatelessSummaryResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) - $root.google.cloud.dialogflow.v2.GcsSources.encode(message.gcsSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.summary != null && Object.hasOwnProperty.call(message, "summary")) + $root.google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary.encode(message.summary, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.latestMessage != null && Object.hasOwnProperty.call(message, "latestMessage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.latestMessage); + if (message.contextSize != null && Object.hasOwnProperty.call(message, "contextSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.contextSize); return writer; }; /** - * Encodes the specified InputConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.InputConfig.verify|verify} messages. + * Encodes the specified GenerateStatelessSummaryResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.InputConfig + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse * @static - * @param {google.cloud.dialogflow.v2.IInputConfig} message InputConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2.IGenerateStatelessSummaryResponse} message GenerateStatelessSummaryResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InputConfig.encodeDelimited = function encodeDelimited(message, writer) { + GenerateStatelessSummaryResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an InputConfig message from the specified reader or buffer. + * Decodes a GenerateStatelessSummaryResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.InputConfig + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.InputConfig} InputConfig + * @returns {google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse} GenerateStatelessSummaryResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InputConfig.decode = function decode(reader, length) { + GenerateStatelessSummaryResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.InputConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.gcsSource = $root.google.cloud.dialogflow.v2.GcsSources.decode(reader, reader.uint32()); + message.summary = $root.google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary.decode(reader, reader.uint32()); + break; + } + case 2: { + message.latestMessage = reader.string(); + break; + } + case 3: { + message.contextSize = reader.int32(); break; } default: @@ -47534,269 +48524,897 @@ }; /** - * Decodes an InputConfig message from the specified reader or buffer, length delimited. + * Decodes a GenerateStatelessSummaryResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.InputConfig + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.InputConfig} InputConfig + * @returns {google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse} GenerateStatelessSummaryResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InputConfig.decodeDelimited = function decodeDelimited(reader) { + GenerateStatelessSummaryResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an InputConfig message. + * Verifies a GenerateStatelessSummaryResponse message. * @function verify - * @memberof google.cloud.dialogflow.v2.InputConfig + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - InputConfig.verify = function verify(message) { + GenerateStatelessSummaryResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - properties.source = 1; - { - var error = $root.google.cloud.dialogflow.v2.GcsSources.verify(message.gcsSource); - if (error) - return "gcsSource." + error; - } + if (message.summary != null && message.hasOwnProperty("summary")) { + var error = $root.google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary.verify(message.summary); + if (error) + return "summary." + error; } + if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) + if (!$util.isString(message.latestMessage)) + return "latestMessage: string expected"; + if (message.contextSize != null && message.hasOwnProperty("contextSize")) + if (!$util.isInteger(message.contextSize)) + return "contextSize: integer expected"; return null; }; /** - * Creates an InputConfig message from a plain object. Also converts values to their respective internal types. + * Creates a GenerateStatelessSummaryResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.InputConfig + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.InputConfig} InputConfig + * @returns {google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse} GenerateStatelessSummaryResponse */ - InputConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.InputConfig) + GenerateStatelessSummaryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse) return object; - var message = new $root.google.cloud.dialogflow.v2.InputConfig(); - if (object.gcsSource != null) { - if (typeof object.gcsSource !== "object") - throw TypeError(".google.cloud.dialogflow.v2.InputConfig.gcsSource: object expected"); - message.gcsSource = $root.google.cloud.dialogflow.v2.GcsSources.fromObject(object.gcsSource); + var message = new $root.google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse(); + if (object.summary != null) { + if (typeof object.summary !== "object") + throw TypeError(".google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.summary: object expected"); + message.summary = $root.google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary.fromObject(object.summary); } + if (object.latestMessage != null) + message.latestMessage = String(object.latestMessage); + if (object.contextSize != null) + message.contextSize = object.contextSize | 0; return message; }; /** - * Creates a plain object from an InputConfig message. Also converts values to other types if specified. + * Creates a plain object from a GenerateStatelessSummaryResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.InputConfig + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse * @static - * @param {google.cloud.dialogflow.v2.InputConfig} message InputConfig + * @param {google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse} message GenerateStatelessSummaryResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - InputConfig.toObject = function toObject(message, options) { + GenerateStatelessSummaryResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - object.gcsSource = $root.google.cloud.dialogflow.v2.GcsSources.toObject(message.gcsSource, options); - if (options.oneofs) - object.source = "gcsSource"; + if (options.defaults) { + object.summary = null; + object.latestMessage = ""; + object.contextSize = 0; } + if (message.summary != null && message.hasOwnProperty("summary")) + object.summary = $root.google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary.toObject(message.summary, options); + if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) + object.latestMessage = message.latestMessage; + if (message.contextSize != null && message.hasOwnProperty("contextSize")) + object.contextSize = message.contextSize; return object; }; /** - * Converts this InputConfig to JSON. + * Converts this GenerateStatelessSummaryResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.InputConfig + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse * @instance * @returns {Object.} JSON object */ - InputConfig.prototype.toJSON = function toJSON() { + GenerateStatelessSummaryResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for InputConfig + * Gets the default type url for GenerateStatelessSummaryResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.InputConfig + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - InputConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GenerateStatelessSummaryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.InputConfig"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse"; }; - return InputConfig; + GenerateStatelessSummaryResponse.Summary = (function() { + + /** + * Properties of a Summary. + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse + * @interface ISummary + * @property {string|null} [text] Summary text + * @property {Object.|null} [textSections] Summary textSections + */ + + /** + * Constructs a new Summary. + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse + * @classdesc Represents a Summary. + * @implements ISummary + * @constructor + * @param {google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.ISummary=} [properties] Properties to set + */ + function Summary(properties) { + this.textSections = {}; + 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]]; + } + + /** + * Summary text. + * @member {string} text + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary + * @instance + */ + Summary.prototype.text = ""; + + /** + * Summary textSections. + * @member {Object.} textSections + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary + * @instance + */ + Summary.prototype.textSections = $util.emptyObject; + + /** + * Creates a new Summary instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary + * @static + * @param {google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.ISummary=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary} Summary instance + */ + Summary.create = function create(properties) { + return new Summary(properties); + }; + + /** + * Encodes the specified Summary message. Does not implicitly {@link google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary + * @static + * @param {google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.ISummary} message Summary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Summary.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.textSections != null && Object.hasOwnProperty.call(message, "textSections")) + for (var keys = Object.keys(message.textSections), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.textSections[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified Summary message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary + * @static + * @param {google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.ISummary} message Summary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Summary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Summary message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary} Summary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Summary.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.text = reader.string(); + break; + } + case 2: { + if (message.textSections === $util.emptyObject) + message.textSections = {}; + 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.textSections[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Summary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary} Summary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Summary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Summary message. + * @function verify + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Summary.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + if (message.textSections != null && message.hasOwnProperty("textSections")) { + if (!$util.isObject(message.textSections)) + return "textSections: object expected"; + var key = Object.keys(message.textSections); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.textSections[key[i]])) + return "textSections: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a Summary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary} Summary + */ + Summary.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary) + return object; + var message = new $root.google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary(); + if (object.text != null) + message.text = String(object.text); + if (object.textSections) { + if (typeof object.textSections !== "object") + throw TypeError(".google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary.textSections: object expected"); + message.textSections = {}; + for (var keys = Object.keys(object.textSections), i = 0; i < keys.length; ++i) + message.textSections[keys[i]] = String(object.textSections[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a Summary message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary + * @static + * @param {google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary} message Summary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Summary.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.textSections = {}; + if (options.defaults) + object.text = ""; + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + var keys2; + if (message.textSections && (keys2 = Object.keys(message.textSections)).length) { + object.textSections = {}; + for (var j = 0; j < keys2.length; ++j) + object.textSections[keys2[j]] = message.textSections[keys2[j]]; + } + return object; + }; + + /** + * Converts this Summary to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary + * @instance + * @returns {Object.} JSON object + */ + Summary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Summary + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Summary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse.Summary"; + }; + + return Summary; + })(); + + return GenerateStatelessSummaryResponse; })(); - v2.ConversationDataset = (function() { + v2.ConversationProfiles = (function() { /** - * Properties of a ConversationDataset. + * Constructs a new ConversationProfiles service. * @memberof google.cloud.dialogflow.v2 - * @interface IConversationDataset - * @property {string|null} [name] ConversationDataset name - * @property {string|null} [displayName] ConversationDataset displayName - * @property {string|null} [description] ConversationDataset description - * @property {google.protobuf.ITimestamp|null} [createTime] ConversationDataset createTime - * @property {google.cloud.dialogflow.v2.IInputConfig|null} [inputConfig] ConversationDataset inputConfig - * @property {google.cloud.dialogflow.v2.IConversationInfo|null} [conversationInfo] ConversationDataset conversationInfo - * @property {number|Long|null} [conversationCount] ConversationDataset conversationCount + * @classdesc Represents a ConversationProfiles + * @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 ConversationProfiles(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ConversationProfiles.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ConversationProfiles; /** - * Constructs a new ConversationDataset. - * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a ConversationDataset. - * @implements IConversationDataset - * @constructor - * @param {google.cloud.dialogflow.v2.IConversationDataset=} [properties] Properties to set + * Creates new ConversationProfiles service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.v2.ConversationProfiles + * @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 {ConversationProfiles} RPC service. Useful where requests and/or responses are streamed. */ - function ConversationDataset(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]]; - } + ConversationProfiles.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * ConversationDataset name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2.ConversationDataset - * @instance + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationProfiles|listConversationProfiles}. + * @memberof google.cloud.dialogflow.v2.ConversationProfiles + * @typedef ListConversationProfilesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2.ListConversationProfilesResponse} [response] ListConversationProfilesResponse */ - ConversationDataset.prototype.name = ""; /** - * ConversationDataset displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.v2.ConversationDataset + * Calls ListConversationProfiles. + * @function listConversationProfiles + * @memberof google.cloud.dialogflow.v2.ConversationProfiles * @instance + * @param {google.cloud.dialogflow.v2.IListConversationProfilesRequest} request ListConversationProfilesRequest message or plain object + * @param {google.cloud.dialogflow.v2.ConversationProfiles.ListConversationProfilesCallback} callback Node-style callback called with the error, if any, and ListConversationProfilesResponse + * @returns {undefined} + * @variation 1 */ - ConversationDataset.prototype.displayName = ""; + Object.defineProperty(ConversationProfiles.prototype.listConversationProfiles = function listConversationProfiles(request, callback) { + return this.rpcCall(listConversationProfiles, $root.google.cloud.dialogflow.v2.ListConversationProfilesRequest, $root.google.cloud.dialogflow.v2.ListConversationProfilesResponse, request, callback); + }, "name", { value: "ListConversationProfiles" }); /** - * ConversationDataset description. - * @member {string} description - * @memberof google.cloud.dialogflow.v2.ConversationDataset + * Calls ListConversationProfiles. + * @function listConversationProfiles + * @memberof google.cloud.dialogflow.v2.ConversationProfiles * @instance + * @param {google.cloud.dialogflow.v2.IListConversationProfilesRequest} request ListConversationProfilesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ConversationDataset.prototype.description = ""; /** - * ConversationDataset createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dialogflow.v2.ConversationDataset - * @instance + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationProfiles|getConversationProfile}. + * @memberof google.cloud.dialogflow.v2.ConversationProfiles + * @typedef GetConversationProfileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2.ConversationProfile} [response] ConversationProfile */ - ConversationDataset.prototype.createTime = null; /** - * ConversationDataset inputConfig. - * @member {google.cloud.dialogflow.v2.IInputConfig|null|undefined} inputConfig - * @memberof google.cloud.dialogflow.v2.ConversationDataset + * Calls GetConversationProfile. + * @function getConversationProfile + * @memberof google.cloud.dialogflow.v2.ConversationProfiles * @instance + * @param {google.cloud.dialogflow.v2.IGetConversationProfileRequest} request GetConversationProfileRequest message or plain object + * @param {google.cloud.dialogflow.v2.ConversationProfiles.GetConversationProfileCallback} callback Node-style callback called with the error, if any, and ConversationProfile + * @returns {undefined} + * @variation 1 */ - ConversationDataset.prototype.inputConfig = null; + Object.defineProperty(ConversationProfiles.prototype.getConversationProfile = function getConversationProfile(request, callback) { + return this.rpcCall(getConversationProfile, $root.google.cloud.dialogflow.v2.GetConversationProfileRequest, $root.google.cloud.dialogflow.v2.ConversationProfile, request, callback); + }, "name", { value: "GetConversationProfile" }); /** - * ConversationDataset conversationInfo. - * @member {google.cloud.dialogflow.v2.IConversationInfo|null|undefined} conversationInfo - * @memberof google.cloud.dialogflow.v2.ConversationDataset + * Calls GetConversationProfile. + * @function getConversationProfile + * @memberof google.cloud.dialogflow.v2.ConversationProfiles * @instance + * @param {google.cloud.dialogflow.v2.IGetConversationProfileRequest} request GetConversationProfileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ConversationDataset.prototype.conversationInfo = null; /** - * ConversationDataset conversationCount. - * @member {number|Long} conversationCount - * @memberof google.cloud.dialogflow.v2.ConversationDataset - * @instance + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationProfiles|createConversationProfile}. + * @memberof google.cloud.dialogflow.v2.ConversationProfiles + * @typedef CreateConversationProfileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2.ConversationProfile} [response] ConversationProfile */ - ConversationDataset.prototype.conversationCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new ConversationDataset instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2.ConversationDataset - * @static - * @param {google.cloud.dialogflow.v2.IConversationDataset=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.ConversationDataset} ConversationDataset instance + * Calls CreateConversationProfile. + * @function createConversationProfile + * @memberof google.cloud.dialogflow.v2.ConversationProfiles + * @instance + * @param {google.cloud.dialogflow.v2.ICreateConversationProfileRequest} request CreateConversationProfileRequest message or plain object + * @param {google.cloud.dialogflow.v2.ConversationProfiles.CreateConversationProfileCallback} callback Node-style callback called with the error, if any, and ConversationProfile + * @returns {undefined} + * @variation 1 */ - ConversationDataset.create = function create(properties) { - return new ConversationDataset(properties); - }; + Object.defineProperty(ConversationProfiles.prototype.createConversationProfile = function createConversationProfile(request, callback) { + return this.rpcCall(createConversationProfile, $root.google.cloud.dialogflow.v2.CreateConversationProfileRequest, $root.google.cloud.dialogflow.v2.ConversationProfile, request, callback); + }, "name", { value: "CreateConversationProfile" }); /** - * Encodes the specified ConversationDataset message. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationDataset.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2.ConversationDataset - * @static - * @param {google.cloud.dialogflow.v2.IConversationDataset} message ConversationDataset message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls CreateConversationProfile. + * @function createConversationProfile + * @memberof google.cloud.dialogflow.v2.ConversationProfiles + * @instance + * @param {google.cloud.dialogflow.v2.ICreateConversationProfileRequest} request CreateConversationProfileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ConversationDataset.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.inputConfig != null && Object.hasOwnProperty.call(message, "inputConfig")) - $root.google.cloud.dialogflow.v2.InputConfig.encode(message.inputConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.conversationInfo != null && Object.hasOwnProperty.call(message, "conversationInfo")) - $root.google.cloud.dialogflow.v2.ConversationInfo.encode(message.conversationInfo, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.conversationCount != null && Object.hasOwnProperty.call(message, "conversationCount")) - writer.uint32(/* id 7, wireType 0 =*/56).int64(message.conversationCount); - return writer; - }; /** - * Encodes the specified ConversationDataset message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationDataset.verify|verify} messages. + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationProfiles|updateConversationProfile}. + * @memberof google.cloud.dialogflow.v2.ConversationProfiles + * @typedef UpdateConversationProfileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2.ConversationProfile} [response] ConversationProfile + */ + + /** + * Calls UpdateConversationProfile. + * @function updateConversationProfile + * @memberof google.cloud.dialogflow.v2.ConversationProfiles + * @instance + * @param {google.cloud.dialogflow.v2.IUpdateConversationProfileRequest} request UpdateConversationProfileRequest message or plain object + * @param {google.cloud.dialogflow.v2.ConversationProfiles.UpdateConversationProfileCallback} callback Node-style callback called with the error, if any, and ConversationProfile + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConversationProfiles.prototype.updateConversationProfile = function updateConversationProfile(request, callback) { + return this.rpcCall(updateConversationProfile, $root.google.cloud.dialogflow.v2.UpdateConversationProfileRequest, $root.google.cloud.dialogflow.v2.ConversationProfile, request, callback); + }, "name", { value: "UpdateConversationProfile" }); + + /** + * Calls UpdateConversationProfile. + * @function updateConversationProfile + * @memberof google.cloud.dialogflow.v2.ConversationProfiles + * @instance + * @param {google.cloud.dialogflow.v2.IUpdateConversationProfileRequest} request UpdateConversationProfileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationProfiles|deleteConversationProfile}. + * @memberof google.cloud.dialogflow.v2.ConversationProfiles + * @typedef DeleteConversationProfileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteConversationProfile. + * @function deleteConversationProfile + * @memberof google.cloud.dialogflow.v2.ConversationProfiles + * @instance + * @param {google.cloud.dialogflow.v2.IDeleteConversationProfileRequest} request DeleteConversationProfileRequest message or plain object + * @param {google.cloud.dialogflow.v2.ConversationProfiles.DeleteConversationProfileCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConversationProfiles.prototype.deleteConversationProfile = function deleteConversationProfile(request, callback) { + return this.rpcCall(deleteConversationProfile, $root.google.cloud.dialogflow.v2.DeleteConversationProfileRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteConversationProfile" }); + + /** + * Calls DeleteConversationProfile. + * @function deleteConversationProfile + * @memberof google.cloud.dialogflow.v2.ConversationProfiles + * @instance + * @param {google.cloud.dialogflow.v2.IDeleteConversationProfileRequest} request DeleteConversationProfileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationProfiles|setSuggestionFeatureConfig}. + * @memberof google.cloud.dialogflow.v2.ConversationProfiles + * @typedef SetSuggestionFeatureConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls SetSuggestionFeatureConfig. + * @function setSuggestionFeatureConfig + * @memberof google.cloud.dialogflow.v2.ConversationProfiles + * @instance + * @param {google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigRequest} request SetSuggestionFeatureConfigRequest message or plain object + * @param {google.cloud.dialogflow.v2.ConversationProfiles.SetSuggestionFeatureConfigCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConversationProfiles.prototype.setSuggestionFeatureConfig = function setSuggestionFeatureConfig(request, callback) { + return this.rpcCall(setSuggestionFeatureConfig, $root.google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "SetSuggestionFeatureConfig" }); + + /** + * Calls SetSuggestionFeatureConfig. + * @function setSuggestionFeatureConfig + * @memberof google.cloud.dialogflow.v2.ConversationProfiles + * @instance + * @param {google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigRequest} request SetSuggestionFeatureConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationProfiles|clearSuggestionFeatureConfig}. + * @memberof google.cloud.dialogflow.v2.ConversationProfiles + * @typedef ClearSuggestionFeatureConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ClearSuggestionFeatureConfig. + * @function clearSuggestionFeatureConfig + * @memberof google.cloud.dialogflow.v2.ConversationProfiles + * @instance + * @param {google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigRequest} request ClearSuggestionFeatureConfigRequest message or plain object + * @param {google.cloud.dialogflow.v2.ConversationProfiles.ClearSuggestionFeatureConfigCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConversationProfiles.prototype.clearSuggestionFeatureConfig = function clearSuggestionFeatureConfig(request, callback) { + return this.rpcCall(clearSuggestionFeatureConfig, $root.google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ClearSuggestionFeatureConfig" }); + + /** + * Calls ClearSuggestionFeatureConfig. + * @function clearSuggestionFeatureConfig + * @memberof google.cloud.dialogflow.v2.ConversationProfiles + * @instance + * @param {google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigRequest} request ClearSuggestionFeatureConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ConversationProfiles; + })(); + + v2.ConversationProfile = (function() { + + /** + * Properties of a ConversationProfile. + * @memberof google.cloud.dialogflow.v2 + * @interface IConversationProfile + * @property {string|null} [name] ConversationProfile name + * @property {string|null} [displayName] ConversationProfile displayName + * @property {google.protobuf.ITimestamp|null} [createTime] ConversationProfile createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] ConversationProfile updateTime + * @property {google.cloud.dialogflow.v2.IAutomatedAgentConfig|null} [automatedAgentConfig] ConversationProfile automatedAgentConfig + * @property {google.cloud.dialogflow.v2.IHumanAgentAssistantConfig|null} [humanAgentAssistantConfig] ConversationProfile humanAgentAssistantConfig + * @property {google.cloud.dialogflow.v2.IHumanAgentHandoffConfig|null} [humanAgentHandoffConfig] ConversationProfile humanAgentHandoffConfig + * @property {google.cloud.dialogflow.v2.INotificationConfig|null} [notificationConfig] ConversationProfile notificationConfig + * @property {google.cloud.dialogflow.v2.ILoggingConfig|null} [loggingConfig] ConversationProfile loggingConfig + * @property {google.cloud.dialogflow.v2.INotificationConfig|null} [newMessageEventNotificationConfig] ConversationProfile newMessageEventNotificationConfig + * @property {google.cloud.dialogflow.v2.ISpeechToTextConfig|null} [sttConfig] ConversationProfile sttConfig + * @property {string|null} [languageCode] ConversationProfile languageCode + * @property {string|null} [timeZone] ConversationProfile timeZone + * @property {string|null} [securitySettings] ConversationProfile securitySettings + * @property {google.cloud.dialogflow.v2.ISynthesizeSpeechConfig|null} [ttsConfig] ConversationProfile ttsConfig + */ + + /** + * Constructs a new ConversationProfile. + * @memberof google.cloud.dialogflow.v2 + * @classdesc Represents a ConversationProfile. + * @implements IConversationProfile + * @constructor + * @param {google.cloud.dialogflow.v2.IConversationProfile=} [properties] Properties to set + */ + function ConversationProfile(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]]; + } + + /** + * ConversationProfile name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2.ConversationProfile + * @instance + */ + ConversationProfile.prototype.name = ""; + + /** + * ConversationProfile displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.v2.ConversationProfile + * @instance + */ + ConversationProfile.prototype.displayName = ""; + + /** + * ConversationProfile createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dialogflow.v2.ConversationProfile + * @instance + */ + ConversationProfile.prototype.createTime = null; + + /** + * ConversationProfile updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.dialogflow.v2.ConversationProfile + * @instance + */ + ConversationProfile.prototype.updateTime = null; + + /** + * ConversationProfile automatedAgentConfig. + * @member {google.cloud.dialogflow.v2.IAutomatedAgentConfig|null|undefined} automatedAgentConfig + * @memberof google.cloud.dialogflow.v2.ConversationProfile + * @instance + */ + ConversationProfile.prototype.automatedAgentConfig = null; + + /** + * ConversationProfile humanAgentAssistantConfig. + * @member {google.cloud.dialogflow.v2.IHumanAgentAssistantConfig|null|undefined} humanAgentAssistantConfig + * @memberof google.cloud.dialogflow.v2.ConversationProfile + * @instance + */ + ConversationProfile.prototype.humanAgentAssistantConfig = null; + + /** + * ConversationProfile humanAgentHandoffConfig. + * @member {google.cloud.dialogflow.v2.IHumanAgentHandoffConfig|null|undefined} humanAgentHandoffConfig + * @memberof google.cloud.dialogflow.v2.ConversationProfile + * @instance + */ + ConversationProfile.prototype.humanAgentHandoffConfig = null; + + /** + * ConversationProfile notificationConfig. + * @member {google.cloud.dialogflow.v2.INotificationConfig|null|undefined} notificationConfig + * @memberof google.cloud.dialogflow.v2.ConversationProfile + * @instance + */ + ConversationProfile.prototype.notificationConfig = null; + + /** + * ConversationProfile loggingConfig. + * @member {google.cloud.dialogflow.v2.ILoggingConfig|null|undefined} loggingConfig + * @memberof google.cloud.dialogflow.v2.ConversationProfile + * @instance + */ + ConversationProfile.prototype.loggingConfig = null; + + /** + * ConversationProfile newMessageEventNotificationConfig. + * @member {google.cloud.dialogflow.v2.INotificationConfig|null|undefined} newMessageEventNotificationConfig + * @memberof google.cloud.dialogflow.v2.ConversationProfile + * @instance + */ + ConversationProfile.prototype.newMessageEventNotificationConfig = null; + + /** + * ConversationProfile sttConfig. + * @member {google.cloud.dialogflow.v2.ISpeechToTextConfig|null|undefined} sttConfig + * @memberof google.cloud.dialogflow.v2.ConversationProfile + * @instance + */ + ConversationProfile.prototype.sttConfig = null; + + /** + * ConversationProfile languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.v2.ConversationProfile + * @instance + */ + ConversationProfile.prototype.languageCode = ""; + + /** + * ConversationProfile timeZone. + * @member {string} timeZone + * @memberof google.cloud.dialogflow.v2.ConversationProfile + * @instance + */ + ConversationProfile.prototype.timeZone = ""; + + /** + * ConversationProfile securitySettings. + * @member {string} securitySettings + * @memberof google.cloud.dialogflow.v2.ConversationProfile + * @instance + */ + ConversationProfile.prototype.securitySettings = ""; + + /** + * ConversationProfile ttsConfig. + * @member {google.cloud.dialogflow.v2.ISynthesizeSpeechConfig|null|undefined} ttsConfig + * @memberof google.cloud.dialogflow.v2.ConversationProfile + * @instance + */ + ConversationProfile.prototype.ttsConfig = null; + + /** + * Creates a new ConversationProfile instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2.ConversationProfile + * @static + * @param {google.cloud.dialogflow.v2.IConversationProfile=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.ConversationProfile} ConversationProfile instance + */ + ConversationProfile.create = function create(properties) { + return new ConversationProfile(properties); + }; + + /** + * Encodes the specified ConversationProfile message. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationProfile.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2.ConversationProfile + * @static + * @param {google.cloud.dialogflow.v2.IConversationProfile} message ConversationProfile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationProfile.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.automatedAgentConfig != null && Object.hasOwnProperty.call(message, "automatedAgentConfig")) + $root.google.cloud.dialogflow.v2.AutomatedAgentConfig.encode(message.automatedAgentConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.humanAgentAssistantConfig != null && Object.hasOwnProperty.call(message, "humanAgentAssistantConfig")) + $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.encode(message.humanAgentAssistantConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.humanAgentHandoffConfig != null && Object.hasOwnProperty.call(message, "humanAgentHandoffConfig")) + $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.encode(message.humanAgentHandoffConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.notificationConfig != null && Object.hasOwnProperty.call(message, "notificationConfig")) + $root.google.cloud.dialogflow.v2.NotificationConfig.encode(message.notificationConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.loggingConfig != null && Object.hasOwnProperty.call(message, "loggingConfig")) + $root.google.cloud.dialogflow.v2.LoggingConfig.encode(message.loggingConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.newMessageEventNotificationConfig != null && Object.hasOwnProperty.call(message, "newMessageEventNotificationConfig")) + $root.google.cloud.dialogflow.v2.NotificationConfig.encode(message.newMessageEventNotificationConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sttConfig != null && Object.hasOwnProperty.call(message, "sttConfig")) + $root.google.cloud.dialogflow.v2.SpeechToTextConfig.encode(message.sttConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.languageCode); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.securitySettings != null && Object.hasOwnProperty.call(message, "securitySettings")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.securitySettings); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.timeZone); + if (message.ttsConfig != null && Object.hasOwnProperty.call(message, "ttsConfig")) + $root.google.cloud.dialogflow.v2.SynthesizeSpeechConfig.encode(message.ttsConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConversationProfile message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationProfile.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.ConversationDataset + * @memberof google.cloud.dialogflow.v2.ConversationProfile * @static - * @param {google.cloud.dialogflow.v2.IConversationDataset} message ConversationDataset message or plain object to encode + * @param {google.cloud.dialogflow.v2.IConversationProfile} message ConversationProfile message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConversationDataset.encodeDelimited = function encodeDelimited(message, writer) { + ConversationProfile.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ConversationDataset message from the specified reader or buffer. + * Decodes a ConversationProfile message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.ConversationDataset + * @memberof google.cloud.dialogflow.v2.ConversationProfile * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.ConversationDataset} ConversationDataset + * @returns {google.cloud.dialogflow.v2.ConversationProfile} ConversationProfile * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConversationDataset.decode = function decode(reader, length) { + ConversationProfile.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ConversationDataset(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ConversationProfile(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -47808,24 +49426,56 @@ message.displayName = reader.string(); break; } + case 11: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 12: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } case 3: { - message.description = reader.string(); + message.automatedAgentConfig = $root.google.cloud.dialogflow.v2.AutomatedAgentConfig.decode(reader, reader.uint32()); break; } case 4: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.humanAgentAssistantConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.decode(reader, reader.uint32()); break; } case 5: { - message.inputConfig = $root.google.cloud.dialogflow.v2.InputConfig.decode(reader, reader.uint32()); + message.humanAgentHandoffConfig = $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.decode(reader, reader.uint32()); break; } case 6: { - message.conversationInfo = $root.google.cloud.dialogflow.v2.ConversationInfo.decode(reader, reader.uint32()); + message.notificationConfig = $root.google.cloud.dialogflow.v2.NotificationConfig.decode(reader, reader.uint32()); break; } case 7: { - message.conversationCount = reader.int64(); + message.loggingConfig = $root.google.cloud.dialogflow.v2.LoggingConfig.decode(reader, reader.uint32()); + break; + } + case 8: { + message.newMessageEventNotificationConfig = $root.google.cloud.dialogflow.v2.NotificationConfig.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sttConfig = $root.google.cloud.dialogflow.v2.SpeechToTextConfig.decode(reader, reader.uint32()); + break; + } + case 10: { + message.languageCode = reader.string(); + break; + } + case 14: { + message.timeZone = reader.string(); + break; + } + case 13: { + message.securitySettings = reader.string(); + break; + } + case 18: { + message.ttsConfig = $root.google.cloud.dialogflow.v2.SynthesizeSpeechConfig.decode(reader, reader.uint32()); break; } default: @@ -47837,30 +49487,30 @@ }; /** - * Decodes a ConversationDataset message from the specified reader or buffer, length delimited. + * Decodes a ConversationProfile message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.ConversationDataset + * @memberof google.cloud.dialogflow.v2.ConversationProfile * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.ConversationDataset} ConversationDataset + * @returns {google.cloud.dialogflow.v2.ConversationProfile} ConversationProfile * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConversationDataset.decodeDelimited = function decodeDelimited(reader) { + ConversationProfile.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ConversationDataset message. + * Verifies a ConversationProfile message. * @function verify - * @memberof google.cloud.dialogflow.v2.ConversationDataset + * @memberof google.cloud.dialogflow.v2.ConversationProfile * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ConversationDataset.verify = function verify(message) { + ConversationProfile.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -47869,169 +49519,255 @@ 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.inputConfig != null && message.hasOwnProperty("inputConfig")) { - var error = $root.google.cloud.dialogflow.v2.InputConfig.verify(message.inputConfig); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); if (error) - return "inputConfig." + error; + return "updateTime." + error; } - if (message.conversationInfo != null && message.hasOwnProperty("conversationInfo")) { - var error = $root.google.cloud.dialogflow.v2.ConversationInfo.verify(message.conversationInfo); + if (message.automatedAgentConfig != null && message.hasOwnProperty("automatedAgentConfig")) { + var error = $root.google.cloud.dialogflow.v2.AutomatedAgentConfig.verify(message.automatedAgentConfig); if (error) - return "conversationInfo." + error; + return "automatedAgentConfig." + error; + } + if (message.humanAgentAssistantConfig != null && message.hasOwnProperty("humanAgentAssistantConfig")) { + var error = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.verify(message.humanAgentAssistantConfig); + if (error) + return "humanAgentAssistantConfig." + error; + } + if (message.humanAgentHandoffConfig != null && message.hasOwnProperty("humanAgentHandoffConfig")) { + var error = $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.verify(message.humanAgentHandoffConfig); + if (error) + return "humanAgentHandoffConfig." + error; + } + if (message.notificationConfig != null && message.hasOwnProperty("notificationConfig")) { + var error = $root.google.cloud.dialogflow.v2.NotificationConfig.verify(message.notificationConfig); + if (error) + return "notificationConfig." + error; + } + if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) { + var error = $root.google.cloud.dialogflow.v2.LoggingConfig.verify(message.loggingConfig); + if (error) + return "loggingConfig." + error; + } + if (message.newMessageEventNotificationConfig != null && message.hasOwnProperty("newMessageEventNotificationConfig")) { + var error = $root.google.cloud.dialogflow.v2.NotificationConfig.verify(message.newMessageEventNotificationConfig); + if (error) + return "newMessageEventNotificationConfig." + error; + } + if (message.sttConfig != null && message.hasOwnProperty("sttConfig")) { + var error = $root.google.cloud.dialogflow.v2.SpeechToTextConfig.verify(message.sttConfig); + if (error) + return "sttConfig." + error; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + if (!$util.isString(message.timeZone)) + return "timeZone: string expected"; + if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) + if (!$util.isString(message.securitySettings)) + return "securitySettings: string expected"; + if (message.ttsConfig != null && message.hasOwnProperty("ttsConfig")) { + var error = $root.google.cloud.dialogflow.v2.SynthesizeSpeechConfig.verify(message.ttsConfig); + if (error) + return "ttsConfig." + error; } - if (message.conversationCount != null && message.hasOwnProperty("conversationCount")) - if (!$util.isInteger(message.conversationCount) && !(message.conversationCount && $util.isInteger(message.conversationCount.low) && $util.isInteger(message.conversationCount.high))) - return "conversationCount: integer|Long expected"; return null; }; /** - * Creates a ConversationDataset message from a plain object. Also converts values to their respective internal types. + * Creates a ConversationProfile message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.ConversationDataset + * @memberof google.cloud.dialogflow.v2.ConversationProfile * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.ConversationDataset} ConversationDataset + * @returns {google.cloud.dialogflow.v2.ConversationProfile} ConversationProfile */ - ConversationDataset.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.ConversationDataset) + ConversationProfile.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.ConversationProfile) return object; - var message = new $root.google.cloud.dialogflow.v2.ConversationDataset(); + var message = new $root.google.cloud.dialogflow.v2.ConversationProfile(); 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.dialogflow.v2.ConversationDataset.createTime: object expected"); + throw TypeError(".google.cloud.dialogflow.v2.ConversationProfile.createTime: object expected"); message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - if (object.inputConfig != null) { - if (typeof object.inputConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2.ConversationDataset.inputConfig: object expected"); - message.inputConfig = $root.google.cloud.dialogflow.v2.InputConfig.fromObject(object.inputConfig); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.dialogflow.v2.ConversationProfile.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } - if (object.conversationInfo != null) { - if (typeof object.conversationInfo !== "object") - throw TypeError(".google.cloud.dialogflow.v2.ConversationDataset.conversationInfo: object expected"); - message.conversationInfo = $root.google.cloud.dialogflow.v2.ConversationInfo.fromObject(object.conversationInfo); + if (object.automatedAgentConfig != null) { + if (typeof object.automatedAgentConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2.ConversationProfile.automatedAgentConfig: object expected"); + message.automatedAgentConfig = $root.google.cloud.dialogflow.v2.AutomatedAgentConfig.fromObject(object.automatedAgentConfig); + } + if (object.humanAgentAssistantConfig != null) { + if (typeof object.humanAgentAssistantConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2.ConversationProfile.humanAgentAssistantConfig: object expected"); + message.humanAgentAssistantConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.fromObject(object.humanAgentAssistantConfig); + } + if (object.humanAgentHandoffConfig != null) { + if (typeof object.humanAgentHandoffConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2.ConversationProfile.humanAgentHandoffConfig: object expected"); + message.humanAgentHandoffConfig = $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.fromObject(object.humanAgentHandoffConfig); + } + if (object.notificationConfig != null) { + if (typeof object.notificationConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2.ConversationProfile.notificationConfig: object expected"); + message.notificationConfig = $root.google.cloud.dialogflow.v2.NotificationConfig.fromObject(object.notificationConfig); + } + if (object.loggingConfig != null) { + if (typeof object.loggingConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2.ConversationProfile.loggingConfig: object expected"); + message.loggingConfig = $root.google.cloud.dialogflow.v2.LoggingConfig.fromObject(object.loggingConfig); + } + if (object.newMessageEventNotificationConfig != null) { + if (typeof object.newMessageEventNotificationConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2.ConversationProfile.newMessageEventNotificationConfig: object expected"); + message.newMessageEventNotificationConfig = $root.google.cloud.dialogflow.v2.NotificationConfig.fromObject(object.newMessageEventNotificationConfig); + } + if (object.sttConfig != null) { + if (typeof object.sttConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2.ConversationProfile.sttConfig: object expected"); + message.sttConfig = $root.google.cloud.dialogflow.v2.SpeechToTextConfig.fromObject(object.sttConfig); + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.timeZone != null) + message.timeZone = String(object.timeZone); + if (object.securitySettings != null) + message.securitySettings = String(object.securitySettings); + if (object.ttsConfig != null) { + if (typeof object.ttsConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2.ConversationProfile.ttsConfig: object expected"); + message.ttsConfig = $root.google.cloud.dialogflow.v2.SynthesizeSpeechConfig.fromObject(object.ttsConfig); } - if (object.conversationCount != null) - if ($util.Long) - (message.conversationCount = $util.Long.fromValue(object.conversationCount)).unsigned = false; - else if (typeof object.conversationCount === "string") - message.conversationCount = parseInt(object.conversationCount, 10); - else if (typeof object.conversationCount === "number") - message.conversationCount = object.conversationCount; - else if (typeof object.conversationCount === "object") - message.conversationCount = new $util.LongBits(object.conversationCount.low >>> 0, object.conversationCount.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a ConversationDataset message. Also converts values to other types if specified. + * Creates a plain object from a ConversationProfile message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.ConversationDataset + * @memberof google.cloud.dialogflow.v2.ConversationProfile * @static - * @param {google.cloud.dialogflow.v2.ConversationDataset} message ConversationDataset + * @param {google.cloud.dialogflow.v2.ConversationProfile} message ConversationProfile * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ConversationDataset.toObject = function toObject(message, options) { + ConversationProfile.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.name = ""; object.displayName = ""; - object.description = ""; + object.automatedAgentConfig = null; + object.humanAgentAssistantConfig = null; + object.humanAgentHandoffConfig = null; + object.notificationConfig = null; + object.loggingConfig = null; + object.newMessageEventNotificationConfig = null; + object.sttConfig = null; + object.languageCode = ""; object.createTime = null; - object.inputConfig = null; - object.conversationInfo = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.conversationCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.conversationCount = options.longs === String ? "0" : 0; + object.updateTime = null; + object.securitySettings = ""; + object.timeZone = ""; + object.ttsConfig = 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.automatedAgentConfig != null && message.hasOwnProperty("automatedAgentConfig")) + object.automatedAgentConfig = $root.google.cloud.dialogflow.v2.AutomatedAgentConfig.toObject(message.automatedAgentConfig, options); + if (message.humanAgentAssistantConfig != null && message.hasOwnProperty("humanAgentAssistantConfig")) + object.humanAgentAssistantConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.toObject(message.humanAgentAssistantConfig, options); + if (message.humanAgentHandoffConfig != null && message.hasOwnProperty("humanAgentHandoffConfig")) + object.humanAgentHandoffConfig = $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.toObject(message.humanAgentHandoffConfig, options); + if (message.notificationConfig != null && message.hasOwnProperty("notificationConfig")) + object.notificationConfig = $root.google.cloud.dialogflow.v2.NotificationConfig.toObject(message.notificationConfig, options); + if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) + object.loggingConfig = $root.google.cloud.dialogflow.v2.LoggingConfig.toObject(message.loggingConfig, options); + if (message.newMessageEventNotificationConfig != null && message.hasOwnProperty("newMessageEventNotificationConfig")) + object.newMessageEventNotificationConfig = $root.google.cloud.dialogflow.v2.NotificationConfig.toObject(message.newMessageEventNotificationConfig, options); + if (message.sttConfig != null && message.hasOwnProperty("sttConfig")) + object.sttConfig = $root.google.cloud.dialogflow.v2.SpeechToTextConfig.toObject(message.sttConfig, options); + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) - object.inputConfig = $root.google.cloud.dialogflow.v2.InputConfig.toObject(message.inputConfig, options); - if (message.conversationInfo != null && message.hasOwnProperty("conversationInfo")) - object.conversationInfo = $root.google.cloud.dialogflow.v2.ConversationInfo.toObject(message.conversationInfo, options); - if (message.conversationCount != null && message.hasOwnProperty("conversationCount")) - if (typeof message.conversationCount === "number") - object.conversationCount = options.longs === String ? String(message.conversationCount) : message.conversationCount; - else - object.conversationCount = options.longs === String ? $util.Long.prototype.toString.call(message.conversationCount) : options.longs === Number ? new $util.LongBits(message.conversationCount.low >>> 0, message.conversationCount.high >>> 0).toNumber() : message.conversationCount; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) + object.securitySettings = message.securitySettings; + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + object.timeZone = message.timeZone; + if (message.ttsConfig != null && message.hasOwnProperty("ttsConfig")) + object.ttsConfig = $root.google.cloud.dialogflow.v2.SynthesizeSpeechConfig.toObject(message.ttsConfig, options); return object; }; /** - * Converts this ConversationDataset to JSON. + * Converts this ConversationProfile to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.ConversationDataset + * @memberof google.cloud.dialogflow.v2.ConversationProfile * @instance * @returns {Object.} JSON object */ - ConversationDataset.prototype.toJSON = function toJSON() { + ConversationProfile.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ConversationDataset + * Gets the default type url for ConversationProfile * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.ConversationDataset + * @memberof google.cloud.dialogflow.v2.ConversationProfile * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ConversationDataset.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ConversationProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.ConversationDataset"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.ConversationProfile"; }; - return ConversationDataset; + return ConversationProfile; })(); - v2.CreateConversationDatasetRequest = (function() { + v2.ListConversationProfilesRequest = (function() { /** - * Properties of a CreateConversationDatasetRequest. + * Properties of a ListConversationProfilesRequest. * @memberof google.cloud.dialogflow.v2 - * @interface ICreateConversationDatasetRequest - * @property {string|null} [parent] CreateConversationDatasetRequest parent - * @property {google.cloud.dialogflow.v2.IConversationDataset|null} [conversationDataset] CreateConversationDatasetRequest conversationDataset + * @interface IListConversationProfilesRequest + * @property {string|null} [parent] ListConversationProfilesRequest parent + * @property {number|null} [pageSize] ListConversationProfilesRequest pageSize + * @property {string|null} [pageToken] ListConversationProfilesRequest pageToken */ /** - * Constructs a new CreateConversationDatasetRequest. + * Constructs a new ListConversationProfilesRequest. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a CreateConversationDatasetRequest. - * @implements ICreateConversationDatasetRequest + * @classdesc Represents a ListConversationProfilesRequest. + * @implements IListConversationProfilesRequest * @constructor - * @param {google.cloud.dialogflow.v2.ICreateConversationDatasetRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.IListConversationProfilesRequest=} [properties] Properties to set */ - function CreateConversationDatasetRequest(properties) { + function ListConversationProfilesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -48039,80 +49775,90 @@ } /** - * CreateConversationDatasetRequest parent. + * ListConversationProfilesRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetRequest + * @memberof google.cloud.dialogflow.v2.ListConversationProfilesRequest * @instance */ - CreateConversationDatasetRequest.prototype.parent = ""; + ListConversationProfilesRequest.prototype.parent = ""; /** - * CreateConversationDatasetRequest conversationDataset. - * @member {google.cloud.dialogflow.v2.IConversationDataset|null|undefined} conversationDataset - * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetRequest + * ListConversationProfilesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.v2.ListConversationProfilesRequest * @instance */ - CreateConversationDatasetRequest.prototype.conversationDataset = null; + ListConversationProfilesRequest.prototype.pageSize = 0; /** - * Creates a new CreateConversationDatasetRequest instance using the specified properties. + * ListConversationProfilesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.v2.ListConversationProfilesRequest + * @instance + */ + ListConversationProfilesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListConversationProfilesRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetRequest + * @memberof google.cloud.dialogflow.v2.ListConversationProfilesRequest * @static - * @param {google.cloud.dialogflow.v2.ICreateConversationDatasetRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.CreateConversationDatasetRequest} CreateConversationDatasetRequest instance + * @param {google.cloud.dialogflow.v2.IListConversationProfilesRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.ListConversationProfilesRequest} ListConversationProfilesRequest instance */ - CreateConversationDatasetRequest.create = function create(properties) { - return new CreateConversationDatasetRequest(properties); + ListConversationProfilesRequest.create = function create(properties) { + return new ListConversationProfilesRequest(properties); }; /** - * Encodes the specified CreateConversationDatasetRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationDatasetRequest.verify|verify} messages. + * Encodes the specified ListConversationProfilesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationProfilesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetRequest + * @memberof google.cloud.dialogflow.v2.ListConversationProfilesRequest * @static - * @param {google.cloud.dialogflow.v2.ICreateConversationDatasetRequest} message CreateConversationDatasetRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IListConversationProfilesRequest} message ListConversationProfilesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateConversationDatasetRequest.encode = function encode(message, writer) { + ListConversationProfilesRequest.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.conversationDataset != null && Object.hasOwnProperty.call(message, "conversationDataset")) - $root.google.cloud.dialogflow.v2.ConversationDataset.encode(message.conversationDataset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + 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); return writer; }; /** - * Encodes the specified CreateConversationDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationDatasetRequest.verify|verify} messages. + * Encodes the specified ListConversationProfilesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationProfilesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetRequest + * @memberof google.cloud.dialogflow.v2.ListConversationProfilesRequest * @static - * @param {google.cloud.dialogflow.v2.ICreateConversationDatasetRequest} message CreateConversationDatasetRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IListConversationProfilesRequest} message ListConversationProfilesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateConversationDatasetRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListConversationProfilesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateConversationDatasetRequest message from the specified reader or buffer. + * Decodes a ListConversationProfilesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetRequest + * @memberof google.cloud.dialogflow.v2.ListConversationProfilesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.CreateConversationDatasetRequest} CreateConversationDatasetRequest + * @returns {google.cloud.dialogflow.v2.ListConversationProfilesRequest} ListConversationProfilesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateConversationDatasetRequest.decode = function decode(reader, length) { + ListConversationProfilesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.CreateConversationDatasetRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ListConversationProfilesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -48121,7 +49867,11 @@ break; } case 2: { - message.conversationDataset = $root.google.cloud.dialogflow.v2.ConversationDataset.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); break; } default: @@ -48133,136 +49883,141 @@ }; /** - * Decodes a CreateConversationDatasetRequest message from the specified reader or buffer, length delimited. + * Decodes a ListConversationProfilesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetRequest + * @memberof google.cloud.dialogflow.v2.ListConversationProfilesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.CreateConversationDatasetRequest} CreateConversationDatasetRequest + * @returns {google.cloud.dialogflow.v2.ListConversationProfilesRequest} ListConversationProfilesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateConversationDatasetRequest.decodeDelimited = function decodeDelimited(reader) { + ListConversationProfilesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateConversationDatasetRequest message. + * Verifies a ListConversationProfilesRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetRequest + * @memberof google.cloud.dialogflow.v2.ListConversationProfilesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateConversationDatasetRequest.verify = function verify(message) { + ListConversationProfilesRequest.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.conversationDataset != null && message.hasOwnProperty("conversationDataset")) { - var error = $root.google.cloud.dialogflow.v2.ConversationDataset.verify(message.conversationDataset); - if (error) - return "conversationDataset." + error; - } + 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"; return null; }; /** - * Creates a CreateConversationDatasetRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListConversationProfilesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetRequest + * @memberof google.cloud.dialogflow.v2.ListConversationProfilesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.CreateConversationDatasetRequest} CreateConversationDatasetRequest + * @returns {google.cloud.dialogflow.v2.ListConversationProfilesRequest} ListConversationProfilesRequest */ - CreateConversationDatasetRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.CreateConversationDatasetRequest) + ListConversationProfilesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.ListConversationProfilesRequest) return object; - var message = new $root.google.cloud.dialogflow.v2.CreateConversationDatasetRequest(); + var message = new $root.google.cloud.dialogflow.v2.ListConversationProfilesRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.conversationDataset != null) { - if (typeof object.conversationDataset !== "object") - throw TypeError(".google.cloud.dialogflow.v2.CreateConversationDatasetRequest.conversationDataset: object expected"); - message.conversationDataset = $root.google.cloud.dialogflow.v2.ConversationDataset.fromObject(object.conversationDataset); - } + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a CreateConversationDatasetRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListConversationProfilesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetRequest + * @memberof google.cloud.dialogflow.v2.ListConversationProfilesRequest * @static - * @param {google.cloud.dialogflow.v2.CreateConversationDatasetRequest} message CreateConversationDatasetRequest + * @param {google.cloud.dialogflow.v2.ListConversationProfilesRequest} message ListConversationProfilesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateConversationDatasetRequest.toObject = function toObject(message, options) { + ListConversationProfilesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.conversationDataset = null; + object.pageSize = 0; + object.pageToken = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.conversationDataset != null && message.hasOwnProperty("conversationDataset")) - object.conversationDataset = $root.google.cloud.dialogflow.v2.ConversationDataset.toObject(message.conversationDataset, options); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this CreateConversationDatasetRequest to JSON. + * Converts this ListConversationProfilesRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetRequest + * @memberof google.cloud.dialogflow.v2.ListConversationProfilesRequest * @instance * @returns {Object.} JSON object */ - CreateConversationDatasetRequest.prototype.toJSON = function toJSON() { + ListConversationProfilesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateConversationDatasetRequest + * Gets the default type url for ListConversationProfilesRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetRequest + * @memberof google.cloud.dialogflow.v2.ListConversationProfilesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateConversationDatasetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListConversationProfilesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.CreateConversationDatasetRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.ListConversationProfilesRequest"; }; - return CreateConversationDatasetRequest; + return ListConversationProfilesRequest; })(); - v2.GetConversationDatasetRequest = (function() { + v2.ListConversationProfilesResponse = (function() { /** - * Properties of a GetConversationDatasetRequest. + * Properties of a ListConversationProfilesResponse. * @memberof google.cloud.dialogflow.v2 - * @interface IGetConversationDatasetRequest - * @property {string|null} [name] GetConversationDatasetRequest name + * @interface IListConversationProfilesResponse + * @property {Array.|null} [conversationProfiles] ListConversationProfilesResponse conversationProfiles + * @property {string|null} [nextPageToken] ListConversationProfilesResponse nextPageToken */ /** - * Constructs a new GetConversationDatasetRequest. + * Constructs a new ListConversationProfilesResponse. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a GetConversationDatasetRequest. - * @implements IGetConversationDatasetRequest + * @classdesc Represents a ListConversationProfilesResponse. + * @implements IListConversationProfilesResponse * @constructor - * @param {google.cloud.dialogflow.v2.IGetConversationDatasetRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.IListConversationProfilesResponse=} [properties] Properties to set */ - function GetConversationDatasetRequest(properties) { + function ListConversationProfilesResponse(properties) { + this.conversationProfiles = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -48270,75 +50025,92 @@ } /** - * GetConversationDatasetRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2.GetConversationDatasetRequest + * ListConversationProfilesResponse conversationProfiles. + * @member {Array.} conversationProfiles + * @memberof google.cloud.dialogflow.v2.ListConversationProfilesResponse * @instance */ - GetConversationDatasetRequest.prototype.name = ""; + ListConversationProfilesResponse.prototype.conversationProfiles = $util.emptyArray; /** - * Creates a new GetConversationDatasetRequest instance using the specified properties. + * ListConversationProfilesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.v2.ListConversationProfilesResponse + * @instance + */ + ListConversationProfilesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListConversationProfilesResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.GetConversationDatasetRequest + * @memberof google.cloud.dialogflow.v2.ListConversationProfilesResponse * @static - * @param {google.cloud.dialogflow.v2.IGetConversationDatasetRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.GetConversationDatasetRequest} GetConversationDatasetRequest instance + * @param {google.cloud.dialogflow.v2.IListConversationProfilesResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.ListConversationProfilesResponse} ListConversationProfilesResponse instance */ - GetConversationDatasetRequest.create = function create(properties) { - return new GetConversationDatasetRequest(properties); + ListConversationProfilesResponse.create = function create(properties) { + return new ListConversationProfilesResponse(properties); }; /** - * Encodes the specified GetConversationDatasetRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.GetConversationDatasetRequest.verify|verify} messages. + * Encodes the specified ListConversationProfilesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationProfilesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.GetConversationDatasetRequest + * @memberof google.cloud.dialogflow.v2.ListConversationProfilesResponse * @static - * @param {google.cloud.dialogflow.v2.IGetConversationDatasetRequest} message GetConversationDatasetRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IListConversationProfilesResponse} message ListConversationProfilesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetConversationDatasetRequest.encode = function encode(message, writer) { + ListConversationProfilesResponse.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.conversationProfiles != null && message.conversationProfiles.length) + for (var i = 0; i < message.conversationProfiles.length; ++i) + $root.google.cloud.dialogflow.v2.ConversationProfile.encode(message.conversationProfiles[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 GetConversationDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.GetConversationDatasetRequest.verify|verify} messages. + * Encodes the specified ListConversationProfilesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationProfilesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.GetConversationDatasetRequest + * @memberof google.cloud.dialogflow.v2.ListConversationProfilesResponse * @static - * @param {google.cloud.dialogflow.v2.IGetConversationDatasetRequest} message GetConversationDatasetRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IListConversationProfilesResponse} message ListConversationProfilesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetConversationDatasetRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListConversationProfilesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetConversationDatasetRequest message from the specified reader or buffer. + * Decodes a ListConversationProfilesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.GetConversationDatasetRequest + * @memberof google.cloud.dialogflow.v2.ListConversationProfilesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.GetConversationDatasetRequest} GetConversationDatasetRequest + * @returns {google.cloud.dialogflow.v2.ListConversationProfilesResponse} ListConversationProfilesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetConversationDatasetRequest.decode = function decode(reader, length) { + ListConversationProfilesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.GetConversationDatasetRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ListConversationProfilesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.conversationProfiles && message.conversationProfiles.length)) + message.conversationProfiles = []; + message.conversationProfiles.push($root.google.cloud.dialogflow.v2.ConversationProfile.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); break; } default: @@ -48350,124 +50122,148 @@ }; /** - * Decodes a GetConversationDatasetRequest message from the specified reader or buffer, length delimited. + * Decodes a ListConversationProfilesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.GetConversationDatasetRequest + * @memberof google.cloud.dialogflow.v2.ListConversationProfilesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.GetConversationDatasetRequest} GetConversationDatasetRequest + * @returns {google.cloud.dialogflow.v2.ListConversationProfilesResponse} ListConversationProfilesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetConversationDatasetRequest.decodeDelimited = function decodeDelimited(reader) { + ListConversationProfilesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetConversationDatasetRequest message. + * Verifies a ListConversationProfilesResponse message. * @function verify - * @memberof google.cloud.dialogflow.v2.GetConversationDatasetRequest + * @memberof google.cloud.dialogflow.v2.ListConversationProfilesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetConversationDatasetRequest.verify = function verify(message) { + ListConversationProfilesResponse.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.conversationProfiles != null && message.hasOwnProperty("conversationProfiles")) { + if (!Array.isArray(message.conversationProfiles)) + return "conversationProfiles: array expected"; + for (var i = 0; i < message.conversationProfiles.length; ++i) { + var error = $root.google.cloud.dialogflow.v2.ConversationProfile.verify(message.conversationProfiles[i]); + if (error) + return "conversationProfiles." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a GetConversationDatasetRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListConversationProfilesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.GetConversationDatasetRequest + * @memberof google.cloud.dialogflow.v2.ListConversationProfilesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.GetConversationDatasetRequest} GetConversationDatasetRequest + * @returns {google.cloud.dialogflow.v2.ListConversationProfilesResponse} ListConversationProfilesResponse */ - GetConversationDatasetRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.GetConversationDatasetRequest) + ListConversationProfilesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.ListConversationProfilesResponse) return object; - var message = new $root.google.cloud.dialogflow.v2.GetConversationDatasetRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.v2.ListConversationProfilesResponse(); + if (object.conversationProfiles) { + if (!Array.isArray(object.conversationProfiles)) + throw TypeError(".google.cloud.dialogflow.v2.ListConversationProfilesResponse.conversationProfiles: array expected"); + message.conversationProfiles = []; + for (var i = 0; i < object.conversationProfiles.length; ++i) { + if (typeof object.conversationProfiles[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2.ListConversationProfilesResponse.conversationProfiles: object expected"); + message.conversationProfiles[i] = $root.google.cloud.dialogflow.v2.ConversationProfile.fromObject(object.conversationProfiles[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a GetConversationDatasetRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListConversationProfilesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.GetConversationDatasetRequest + * @memberof google.cloud.dialogflow.v2.ListConversationProfilesResponse * @static - * @param {google.cloud.dialogflow.v2.GetConversationDatasetRequest} message GetConversationDatasetRequest + * @param {google.cloud.dialogflow.v2.ListConversationProfilesResponse} message ListConversationProfilesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetConversationDatasetRequest.toObject = function toObject(message, options) { + ListConversationProfilesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.conversationProfiles = []; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.nextPageToken = ""; + if (message.conversationProfiles && message.conversationProfiles.length) { + object.conversationProfiles = []; + for (var j = 0; j < message.conversationProfiles.length; ++j) + object.conversationProfiles[j] = $root.google.cloud.dialogflow.v2.ConversationProfile.toObject(message.conversationProfiles[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this GetConversationDatasetRequest to JSON. + * Converts this ListConversationProfilesResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.GetConversationDatasetRequest + * @memberof google.cloud.dialogflow.v2.ListConversationProfilesResponse * @instance * @returns {Object.} JSON object */ - GetConversationDatasetRequest.prototype.toJSON = function toJSON() { + ListConversationProfilesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetConversationDatasetRequest + * Gets the default type url for ListConversationProfilesResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.GetConversationDatasetRequest + * @memberof google.cloud.dialogflow.v2.ListConversationProfilesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetConversationDatasetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListConversationProfilesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.GetConversationDatasetRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.ListConversationProfilesResponse"; }; - return GetConversationDatasetRequest; + return ListConversationProfilesResponse; })(); - v2.ListConversationDatasetsRequest = (function() { + v2.GetConversationProfileRequest = (function() { /** - * Properties of a ListConversationDatasetsRequest. + * Properties of a GetConversationProfileRequest. * @memberof google.cloud.dialogflow.v2 - * @interface IListConversationDatasetsRequest - * @property {string|null} [parent] ListConversationDatasetsRequest parent - * @property {number|null} [pageSize] ListConversationDatasetsRequest pageSize - * @property {string|null} [pageToken] ListConversationDatasetsRequest pageToken + * @interface IGetConversationProfileRequest + * @property {string|null} [name] GetConversationProfileRequest name */ /** - * Constructs a new ListConversationDatasetsRequest. + * Constructs a new GetConversationProfileRequest. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a ListConversationDatasetsRequest. - * @implements IListConversationDatasetsRequest + * @classdesc Represents a GetConversationProfileRequest. + * @implements IGetConversationProfileRequest * @constructor - * @param {google.cloud.dialogflow.v2.IListConversationDatasetsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.IGetConversationProfileRequest=} [properties] Properties to set */ - function ListConversationDatasetsRequest(properties) { + function GetConversationProfileRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -48475,103 +50271,75 @@ } /** - * ListConversationDatasetsRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsRequest - * @instance - */ - ListConversationDatasetsRequest.prototype.parent = ""; - - /** - * ListConversationDatasetsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsRequest - * @instance - */ - ListConversationDatasetsRequest.prototype.pageSize = 0; - - /** - * ListConversationDatasetsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsRequest + * GetConversationProfileRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2.GetConversationProfileRequest * @instance */ - ListConversationDatasetsRequest.prototype.pageToken = ""; + GetConversationProfileRequest.prototype.name = ""; /** - * Creates a new ListConversationDatasetsRequest instance using the specified properties. + * Creates a new GetConversationProfileRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsRequest + * @memberof google.cloud.dialogflow.v2.GetConversationProfileRequest * @static - * @param {google.cloud.dialogflow.v2.IListConversationDatasetsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.ListConversationDatasetsRequest} ListConversationDatasetsRequest instance + * @param {google.cloud.dialogflow.v2.IGetConversationProfileRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.GetConversationProfileRequest} GetConversationProfileRequest instance */ - ListConversationDatasetsRequest.create = function create(properties) { - return new ListConversationDatasetsRequest(properties); + GetConversationProfileRequest.create = function create(properties) { + return new GetConversationProfileRequest(properties); }; /** - * Encodes the specified ListConversationDatasetsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationDatasetsRequest.verify|verify} messages. + * Encodes the specified GetConversationProfileRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.GetConversationProfileRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsRequest + * @memberof google.cloud.dialogflow.v2.GetConversationProfileRequest * @static - * @param {google.cloud.dialogflow.v2.IListConversationDatasetsRequest} message ListConversationDatasetsRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IGetConversationProfileRequest} message GetConversationProfileRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListConversationDatasetsRequest.encode = function encode(message, writer) { + GetConversationProfileRequest.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.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListConversationDatasetsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationDatasetsRequest.verify|verify} messages. + * Encodes the specified GetConversationProfileRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.GetConversationProfileRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsRequest + * @memberof google.cloud.dialogflow.v2.GetConversationProfileRequest * @static - * @param {google.cloud.dialogflow.v2.IListConversationDatasetsRequest} message ListConversationDatasetsRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IGetConversationProfileRequest} message GetConversationProfileRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListConversationDatasetsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetConversationProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListConversationDatasetsRequest message from the specified reader or buffer. + * Decodes a GetConversationProfileRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsRequest + * @memberof google.cloud.dialogflow.v2.GetConversationProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.ListConversationDatasetsRequest} ListConversationDatasetsRequest + * @returns {google.cloud.dialogflow.v2.GetConversationProfileRequest} GetConversationProfileRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListConversationDatasetsRequest.decode = function decode(reader, length) { + GetConversationProfileRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ListConversationDatasetsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.GetConversationProfileRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); + message.name = reader.string(); break; } default: @@ -48583,141 +50351,123 @@ }; /** - * Decodes a ListConversationDatasetsRequest message from the specified reader or buffer, length delimited. + * Decodes a GetConversationProfileRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsRequest + * @memberof google.cloud.dialogflow.v2.GetConversationProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.ListConversationDatasetsRequest} ListConversationDatasetsRequest + * @returns {google.cloud.dialogflow.v2.GetConversationProfileRequest} GetConversationProfileRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListConversationDatasetsRequest.decodeDelimited = function decodeDelimited(reader) { + GetConversationProfileRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListConversationDatasetsRequest message. + * Verifies a GetConversationProfileRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsRequest + * @memberof google.cloud.dialogflow.v2.GetConversationProfileRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListConversationDatasetsRequest.verify = function verify(message) { + GetConversationProfileRequest.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.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListConversationDatasetsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetConversationProfileRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsRequest + * @memberof google.cloud.dialogflow.v2.GetConversationProfileRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.ListConversationDatasetsRequest} ListConversationDatasetsRequest + * @returns {google.cloud.dialogflow.v2.GetConversationProfileRequest} GetConversationProfileRequest */ - ListConversationDatasetsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.ListConversationDatasetsRequest) + GetConversationProfileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.GetConversationProfileRequest) return object; - var message = new $root.google.cloud.dialogflow.v2.ListConversationDatasetsRequest(); - 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); + var message = new $root.google.cloud.dialogflow.v2.GetConversationProfileRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListConversationDatasetsRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetConversationProfileRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsRequest + * @memberof google.cloud.dialogflow.v2.GetConversationProfileRequest * @static - * @param {google.cloud.dialogflow.v2.ListConversationDatasetsRequest} message ListConversationDatasetsRequest + * @param {google.cloud.dialogflow.v2.GetConversationProfileRequest} message GetConversationProfileRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListConversationDatasetsRequest.toObject = function toObject(message, options) { + GetConversationProfileRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - 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 (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListConversationDatasetsRequest to JSON. + * Converts this GetConversationProfileRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsRequest + * @memberof google.cloud.dialogflow.v2.GetConversationProfileRequest * @instance * @returns {Object.} JSON object */ - ListConversationDatasetsRequest.prototype.toJSON = function toJSON() { + GetConversationProfileRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListConversationDatasetsRequest + * Gets the default type url for GetConversationProfileRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsRequest + * @memberof google.cloud.dialogflow.v2.GetConversationProfileRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListConversationDatasetsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetConversationProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.ListConversationDatasetsRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.GetConversationProfileRequest"; }; - return ListConversationDatasetsRequest; + return GetConversationProfileRequest; })(); - v2.ListConversationDatasetsResponse = (function() { + v2.CreateConversationProfileRequest = (function() { /** - * Properties of a ListConversationDatasetsResponse. + * Properties of a CreateConversationProfileRequest. * @memberof google.cloud.dialogflow.v2 - * @interface IListConversationDatasetsResponse - * @property {Array.|null} [conversationDatasets] ListConversationDatasetsResponse conversationDatasets - * @property {string|null} [nextPageToken] ListConversationDatasetsResponse nextPageToken + * @interface ICreateConversationProfileRequest + * @property {string|null} [parent] CreateConversationProfileRequest parent + * @property {google.cloud.dialogflow.v2.IConversationProfile|null} [conversationProfile] CreateConversationProfileRequest conversationProfile */ /** - * Constructs a new ListConversationDatasetsResponse. + * Constructs a new CreateConversationProfileRequest. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a ListConversationDatasetsResponse. - * @implements IListConversationDatasetsResponse + * @classdesc Represents a CreateConversationProfileRequest. + * @implements ICreateConversationProfileRequest * @constructor - * @param {google.cloud.dialogflow.v2.IListConversationDatasetsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.ICreateConversationProfileRequest=} [properties] Properties to set */ - function ListConversationDatasetsResponse(properties) { - this.conversationDatasets = []; + function CreateConversationProfileRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -48725,92 +50475,89 @@ } /** - * ListConversationDatasetsResponse conversationDatasets. - * @member {Array.} conversationDatasets - * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsResponse + * CreateConversationProfileRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2.CreateConversationProfileRequest * @instance */ - ListConversationDatasetsResponse.prototype.conversationDatasets = $util.emptyArray; + CreateConversationProfileRequest.prototype.parent = ""; /** - * ListConversationDatasetsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsResponse + * CreateConversationProfileRequest conversationProfile. + * @member {google.cloud.dialogflow.v2.IConversationProfile|null|undefined} conversationProfile + * @memberof google.cloud.dialogflow.v2.CreateConversationProfileRequest * @instance */ - ListConversationDatasetsResponse.prototype.nextPageToken = ""; + CreateConversationProfileRequest.prototype.conversationProfile = null; /** - * Creates a new ListConversationDatasetsResponse instance using the specified properties. + * Creates a new CreateConversationProfileRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsResponse + * @memberof google.cloud.dialogflow.v2.CreateConversationProfileRequest * @static - * @param {google.cloud.dialogflow.v2.IListConversationDatasetsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.ListConversationDatasetsResponse} ListConversationDatasetsResponse instance + * @param {google.cloud.dialogflow.v2.ICreateConversationProfileRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.CreateConversationProfileRequest} CreateConversationProfileRequest instance */ - ListConversationDatasetsResponse.create = function create(properties) { - return new ListConversationDatasetsResponse(properties); + CreateConversationProfileRequest.create = function create(properties) { + return new CreateConversationProfileRequest(properties); }; /** - * Encodes the specified ListConversationDatasetsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationDatasetsResponse.verify|verify} messages. + * Encodes the specified CreateConversationProfileRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationProfileRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsResponse + * @memberof google.cloud.dialogflow.v2.CreateConversationProfileRequest * @static - * @param {google.cloud.dialogflow.v2.IListConversationDatasetsResponse} message ListConversationDatasetsResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2.ICreateConversationProfileRequest} message CreateConversationProfileRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListConversationDatasetsResponse.encode = function encode(message, writer) { + CreateConversationProfileRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.conversationDatasets != null && message.conversationDatasets.length) - for (var i = 0; i < message.conversationDatasets.length; ++i) - $root.google.cloud.dialogflow.v2.ConversationDataset.encode(message.conversationDatasets[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); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.conversationProfile != null && Object.hasOwnProperty.call(message, "conversationProfile")) + $root.google.cloud.dialogflow.v2.ConversationProfile.encode(message.conversationProfile, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListConversationDatasetsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationDatasetsResponse.verify|verify} messages. + * Encodes the specified CreateConversationProfileRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationProfileRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsResponse + * @memberof google.cloud.dialogflow.v2.CreateConversationProfileRequest * @static - * @param {google.cloud.dialogflow.v2.IListConversationDatasetsResponse} message ListConversationDatasetsResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2.ICreateConversationProfileRequest} message CreateConversationProfileRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListConversationDatasetsResponse.encodeDelimited = function encodeDelimited(message, writer) { + CreateConversationProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListConversationDatasetsResponse message from the specified reader or buffer. + * Decodes a CreateConversationProfileRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsResponse + * @memberof google.cloud.dialogflow.v2.CreateConversationProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.ListConversationDatasetsResponse} ListConversationDatasetsResponse + * @returns {google.cloud.dialogflow.v2.CreateConversationProfileRequest} CreateConversationProfileRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListConversationDatasetsResponse.decode = function decode(reader, length) { + CreateConversationProfileRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ListConversationDatasetsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.CreateConversationProfileRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.conversationDatasets && message.conversationDatasets.length)) - message.conversationDatasets = []; - message.conversationDatasets.push($root.google.cloud.dialogflow.v2.ConversationDataset.decode(reader, reader.uint32())); + message.parent = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); + message.conversationProfile = $root.google.cloud.dialogflow.v2.ConversationProfile.decode(reader, reader.uint32()); break; } default: @@ -48822,148 +50569,137 @@ }; /** - * Decodes a ListConversationDatasetsResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateConversationProfileRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsResponse + * @memberof google.cloud.dialogflow.v2.CreateConversationProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.ListConversationDatasetsResponse} ListConversationDatasetsResponse + * @returns {google.cloud.dialogflow.v2.CreateConversationProfileRequest} CreateConversationProfileRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListConversationDatasetsResponse.decodeDelimited = function decodeDelimited(reader) { + CreateConversationProfileRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListConversationDatasetsResponse message. + * Verifies a CreateConversationProfileRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsResponse + * @memberof google.cloud.dialogflow.v2.CreateConversationProfileRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListConversationDatasetsResponse.verify = function verify(message) { + CreateConversationProfileRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.conversationDatasets != null && message.hasOwnProperty("conversationDatasets")) { - if (!Array.isArray(message.conversationDatasets)) - return "conversationDatasets: array expected"; - for (var i = 0; i < message.conversationDatasets.length; ++i) { - var error = $root.google.cloud.dialogflow.v2.ConversationDataset.verify(message.conversationDatasets[i]); - if (error) - return "conversationDatasets." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) { + var error = $root.google.cloud.dialogflow.v2.ConversationProfile.verify(message.conversationProfile); + if (error) + return "conversationProfile." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListConversationDatasetsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateConversationProfileRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsResponse + * @memberof google.cloud.dialogflow.v2.CreateConversationProfileRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.ListConversationDatasetsResponse} ListConversationDatasetsResponse + * @returns {google.cloud.dialogflow.v2.CreateConversationProfileRequest} CreateConversationProfileRequest */ - ListConversationDatasetsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.ListConversationDatasetsResponse) + CreateConversationProfileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.CreateConversationProfileRequest) return object; - var message = new $root.google.cloud.dialogflow.v2.ListConversationDatasetsResponse(); - if (object.conversationDatasets) { - if (!Array.isArray(object.conversationDatasets)) - throw TypeError(".google.cloud.dialogflow.v2.ListConversationDatasetsResponse.conversationDatasets: array expected"); - message.conversationDatasets = []; - for (var i = 0; i < object.conversationDatasets.length; ++i) { - if (typeof object.conversationDatasets[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2.ListConversationDatasetsResponse.conversationDatasets: object expected"); - message.conversationDatasets[i] = $root.google.cloud.dialogflow.v2.ConversationDataset.fromObject(object.conversationDatasets[i]); - } + var message = new $root.google.cloud.dialogflow.v2.CreateConversationProfileRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.conversationProfile != null) { + if (typeof object.conversationProfile !== "object") + throw TypeError(".google.cloud.dialogflow.v2.CreateConversationProfileRequest.conversationProfile: object expected"); + message.conversationProfile = $root.google.cloud.dialogflow.v2.ConversationProfile.fromObject(object.conversationProfile); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListConversationDatasetsResponse message. Also converts values to other types if specified. + * Creates a plain object from a CreateConversationProfileRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsResponse + * @memberof google.cloud.dialogflow.v2.CreateConversationProfileRequest * @static - * @param {google.cloud.dialogflow.v2.ListConversationDatasetsResponse} message ListConversationDatasetsResponse + * @param {google.cloud.dialogflow.v2.CreateConversationProfileRequest} message CreateConversationProfileRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListConversationDatasetsResponse.toObject = function toObject(message, options) { + CreateConversationProfileRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.conversationDatasets = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.conversationDatasets && message.conversationDatasets.length) { - object.conversationDatasets = []; - for (var j = 0; j < message.conversationDatasets.length; ++j) - object.conversationDatasets[j] = $root.google.cloud.dialogflow.v2.ConversationDataset.toObject(message.conversationDatasets[j], options); + if (options.defaults) { + object.parent = ""; + object.conversationProfile = null; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) + object.conversationProfile = $root.google.cloud.dialogflow.v2.ConversationProfile.toObject(message.conversationProfile, options); return object; }; /** - * Converts this ListConversationDatasetsResponse to JSON. + * Converts this CreateConversationProfileRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsResponse + * @memberof google.cloud.dialogflow.v2.CreateConversationProfileRequest * @instance * @returns {Object.} JSON object */ - ListConversationDatasetsResponse.prototype.toJSON = function toJSON() { + CreateConversationProfileRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListConversationDatasetsResponse + * Gets the default type url for CreateConversationProfileRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsResponse + * @memberof google.cloud.dialogflow.v2.CreateConversationProfileRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListConversationDatasetsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateConversationProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.ListConversationDatasetsResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.CreateConversationProfileRequest"; }; - return ListConversationDatasetsResponse; + return CreateConversationProfileRequest; })(); - v2.DeleteConversationDatasetRequest = (function() { + v2.UpdateConversationProfileRequest = (function() { /** - * Properties of a DeleteConversationDatasetRequest. + * Properties of an UpdateConversationProfileRequest. * @memberof google.cloud.dialogflow.v2 - * @interface IDeleteConversationDatasetRequest - * @property {string|null} [name] DeleteConversationDatasetRequest name + * @interface IUpdateConversationProfileRequest + * @property {google.cloud.dialogflow.v2.IConversationProfile|null} [conversationProfile] UpdateConversationProfileRequest conversationProfile + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateConversationProfileRequest updateMask */ /** - * Constructs a new DeleteConversationDatasetRequest. + * Constructs a new UpdateConversationProfileRequest. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a DeleteConversationDatasetRequest. - * @implements IDeleteConversationDatasetRequest + * @classdesc Represents an UpdateConversationProfileRequest. + * @implements IUpdateConversationProfileRequest * @constructor - * @param {google.cloud.dialogflow.v2.IDeleteConversationDatasetRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.IUpdateConversationProfileRequest=} [properties] Properties to set */ - function DeleteConversationDatasetRequest(properties) { + function UpdateConversationProfileRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -48971,75 +50707,89 @@ } /** - * DeleteConversationDatasetRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetRequest + * UpdateConversationProfileRequest conversationProfile. + * @member {google.cloud.dialogflow.v2.IConversationProfile|null|undefined} conversationProfile + * @memberof google.cloud.dialogflow.v2.UpdateConversationProfileRequest * @instance */ - DeleteConversationDatasetRequest.prototype.name = ""; + UpdateConversationProfileRequest.prototype.conversationProfile = null; /** - * Creates a new DeleteConversationDatasetRequest instance using the specified properties. + * UpdateConversationProfileRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.dialogflow.v2.UpdateConversationProfileRequest + * @instance + */ + UpdateConversationProfileRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateConversationProfileRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetRequest + * @memberof google.cloud.dialogflow.v2.UpdateConversationProfileRequest * @static - * @param {google.cloud.dialogflow.v2.IDeleteConversationDatasetRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.DeleteConversationDatasetRequest} DeleteConversationDatasetRequest instance + * @param {google.cloud.dialogflow.v2.IUpdateConversationProfileRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.UpdateConversationProfileRequest} UpdateConversationProfileRequest instance */ - DeleteConversationDatasetRequest.create = function create(properties) { - return new DeleteConversationDatasetRequest(properties); + UpdateConversationProfileRequest.create = function create(properties) { + return new UpdateConversationProfileRequest(properties); }; /** - * Encodes the specified DeleteConversationDatasetRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationDatasetRequest.verify|verify} messages. + * Encodes the specified UpdateConversationProfileRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.UpdateConversationProfileRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetRequest + * @memberof google.cloud.dialogflow.v2.UpdateConversationProfileRequest * @static - * @param {google.cloud.dialogflow.v2.IDeleteConversationDatasetRequest} message DeleteConversationDatasetRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IUpdateConversationProfileRequest} message UpdateConversationProfileRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteConversationDatasetRequest.encode = function encode(message, writer) { + UpdateConversationProfileRequest.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.conversationProfile != null && Object.hasOwnProperty.call(message, "conversationProfile")) + $root.google.cloud.dialogflow.v2.ConversationProfile.encode(message.conversationProfile, 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 DeleteConversationDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationDatasetRequest.verify|verify} messages. + * Encodes the specified UpdateConversationProfileRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.UpdateConversationProfileRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetRequest + * @memberof google.cloud.dialogflow.v2.UpdateConversationProfileRequest * @static - * @param {google.cloud.dialogflow.v2.IDeleteConversationDatasetRequest} message DeleteConversationDatasetRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IUpdateConversationProfileRequest} message UpdateConversationProfileRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteConversationDatasetRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateConversationProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteConversationDatasetRequest message from the specified reader or buffer. + * Decodes an UpdateConversationProfileRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetRequest + * @memberof google.cloud.dialogflow.v2.UpdateConversationProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.DeleteConversationDatasetRequest} DeleteConversationDatasetRequest + * @returns {google.cloud.dialogflow.v2.UpdateConversationProfileRequest} UpdateConversationProfileRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteConversationDatasetRequest.decode = function decode(reader, length) { + UpdateConversationProfileRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.DeleteConversationDatasetRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.UpdateConversationProfileRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.conversationProfile = $root.google.cloud.dialogflow.v2.ConversationProfile.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } default: @@ -49051,123 +50801,141 @@ }; /** - * Decodes a DeleteConversationDatasetRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateConversationProfileRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetRequest + * @memberof google.cloud.dialogflow.v2.UpdateConversationProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.DeleteConversationDatasetRequest} DeleteConversationDatasetRequest + * @returns {google.cloud.dialogflow.v2.UpdateConversationProfileRequest} UpdateConversationProfileRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteConversationDatasetRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateConversationProfileRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteConversationDatasetRequest message. + * Verifies an UpdateConversationProfileRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetRequest + * @memberof google.cloud.dialogflow.v2.UpdateConversationProfileRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteConversationDatasetRequest.verify = function verify(message) { + UpdateConversationProfileRequest.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.conversationProfile != null && message.hasOwnProperty("conversationProfile")) { + var error = $root.google.cloud.dialogflow.v2.ConversationProfile.verify(message.conversationProfile); + if (error) + return "conversationProfile." + 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 a DeleteConversationDatasetRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateConversationProfileRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetRequest + * @memberof google.cloud.dialogflow.v2.UpdateConversationProfileRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.DeleteConversationDatasetRequest} DeleteConversationDatasetRequest + * @returns {google.cloud.dialogflow.v2.UpdateConversationProfileRequest} UpdateConversationProfileRequest */ - DeleteConversationDatasetRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.DeleteConversationDatasetRequest) + UpdateConversationProfileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.UpdateConversationProfileRequest) return object; - var message = new $root.google.cloud.dialogflow.v2.DeleteConversationDatasetRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.v2.UpdateConversationProfileRequest(); + if (object.conversationProfile != null) { + if (typeof object.conversationProfile !== "object") + throw TypeError(".google.cloud.dialogflow.v2.UpdateConversationProfileRequest.conversationProfile: object expected"); + message.conversationProfile = $root.google.cloud.dialogflow.v2.ConversationProfile.fromObject(object.conversationProfile); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.dialogflow.v2.UpdateConversationProfileRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } return message; }; /** - * Creates a plain object from a DeleteConversationDatasetRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateConversationProfileRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetRequest + * @memberof google.cloud.dialogflow.v2.UpdateConversationProfileRequest * @static - * @param {google.cloud.dialogflow.v2.DeleteConversationDatasetRequest} message DeleteConversationDatasetRequest + * @param {google.cloud.dialogflow.v2.UpdateConversationProfileRequest} message UpdateConversationProfileRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteConversationDatasetRequest.toObject = function toObject(message, options) { + UpdateConversationProfileRequest.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; + if (options.defaults) { + object.conversationProfile = null; + object.updateMask = null; + } + if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) + object.conversationProfile = $root.google.cloud.dialogflow.v2.ConversationProfile.toObject(message.conversationProfile, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this DeleteConversationDatasetRequest to JSON. + * Converts this UpdateConversationProfileRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetRequest + * @memberof google.cloud.dialogflow.v2.UpdateConversationProfileRequest * @instance * @returns {Object.} JSON object */ - DeleteConversationDatasetRequest.prototype.toJSON = function toJSON() { + UpdateConversationProfileRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteConversationDatasetRequest + * Gets the default type url for UpdateConversationProfileRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetRequest + * @memberof google.cloud.dialogflow.v2.UpdateConversationProfileRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteConversationDatasetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateConversationProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.DeleteConversationDatasetRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.UpdateConversationProfileRequest"; }; - return DeleteConversationDatasetRequest; + return UpdateConversationProfileRequest; })(); - v2.ImportConversationDataRequest = (function() { + v2.DeleteConversationProfileRequest = (function() { /** - * Properties of an ImportConversationDataRequest. + * Properties of a DeleteConversationProfileRequest. * @memberof google.cloud.dialogflow.v2 - * @interface IImportConversationDataRequest - * @property {string|null} [name] ImportConversationDataRequest name - * @property {google.cloud.dialogflow.v2.IInputConfig|null} [inputConfig] ImportConversationDataRequest inputConfig + * @interface IDeleteConversationProfileRequest + * @property {string|null} [name] DeleteConversationProfileRequest name */ /** - * Constructs a new ImportConversationDataRequest. + * Constructs a new DeleteConversationProfileRequest. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents an ImportConversationDataRequest. - * @implements IImportConversationDataRequest + * @classdesc Represents a DeleteConversationProfileRequest. + * @implements IDeleteConversationProfileRequest * @constructor - * @param {google.cloud.dialogflow.v2.IImportConversationDataRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.IDeleteConversationProfileRequest=} [properties] Properties to set */ - function ImportConversationDataRequest(properties) { + function DeleteConversationProfileRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -49175,80 +50943,70 @@ } /** - * ImportConversationDataRequest name. + * DeleteConversationProfileRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.v2.ImportConversationDataRequest - * @instance - */ - ImportConversationDataRequest.prototype.name = ""; - - /** - * ImportConversationDataRequest inputConfig. - * @member {google.cloud.dialogflow.v2.IInputConfig|null|undefined} inputConfig - * @memberof google.cloud.dialogflow.v2.ImportConversationDataRequest + * @memberof google.cloud.dialogflow.v2.DeleteConversationProfileRequest * @instance */ - ImportConversationDataRequest.prototype.inputConfig = null; + DeleteConversationProfileRequest.prototype.name = ""; /** - * Creates a new ImportConversationDataRequest instance using the specified properties. + * Creates a new DeleteConversationProfileRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.ImportConversationDataRequest + * @memberof google.cloud.dialogflow.v2.DeleteConversationProfileRequest * @static - * @param {google.cloud.dialogflow.v2.IImportConversationDataRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.ImportConversationDataRequest} ImportConversationDataRequest instance + * @param {google.cloud.dialogflow.v2.IDeleteConversationProfileRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.DeleteConversationProfileRequest} DeleteConversationProfileRequest instance */ - ImportConversationDataRequest.create = function create(properties) { - return new ImportConversationDataRequest(properties); + DeleteConversationProfileRequest.create = function create(properties) { + return new DeleteConversationProfileRequest(properties); }; /** - * Encodes the specified ImportConversationDataRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.ImportConversationDataRequest.verify|verify} messages. + * Encodes the specified DeleteConversationProfileRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationProfileRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.ImportConversationDataRequest + * @memberof google.cloud.dialogflow.v2.DeleteConversationProfileRequest * @static - * @param {google.cloud.dialogflow.v2.IImportConversationDataRequest} message ImportConversationDataRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IDeleteConversationProfileRequest} message DeleteConversationProfileRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportConversationDataRequest.encode = function encode(message, writer) { + DeleteConversationProfileRequest.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.inputConfig != null && Object.hasOwnProperty.call(message, "inputConfig")) - $root.google.cloud.dialogflow.v2.InputConfig.encode(message.inputConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ImportConversationDataRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ImportConversationDataRequest.verify|verify} messages. + * Encodes the specified DeleteConversationProfileRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationProfileRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.ImportConversationDataRequest + * @memberof google.cloud.dialogflow.v2.DeleteConversationProfileRequest * @static - * @param {google.cloud.dialogflow.v2.IImportConversationDataRequest} message ImportConversationDataRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IDeleteConversationProfileRequest} message DeleteConversationProfileRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportConversationDataRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteConversationProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportConversationDataRequest message from the specified reader or buffer. + * Decodes a DeleteConversationProfileRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.ImportConversationDataRequest + * @memberof google.cloud.dialogflow.v2.DeleteConversationProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.ImportConversationDataRequest} ImportConversationDataRequest + * @returns {google.cloud.dialogflow.v2.DeleteConversationProfileRequest} DeleteConversationProfileRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportConversationDataRequest.decode = function decode(reader, length) { + DeleteConversationProfileRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ImportConversationDataRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.DeleteConversationProfileRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -49256,10 +51014,6 @@ message.name = reader.string(); break; } - case 2: { - message.inputConfig = $root.google.cloud.dialogflow.v2.InputConfig.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -49269,139 +51023,122 @@ }; /** - * Decodes an ImportConversationDataRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteConversationProfileRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.ImportConversationDataRequest + * @memberof google.cloud.dialogflow.v2.DeleteConversationProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.ImportConversationDataRequest} ImportConversationDataRequest + * @returns {google.cloud.dialogflow.v2.DeleteConversationProfileRequest} DeleteConversationProfileRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportConversationDataRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteConversationProfileRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportConversationDataRequest message. + * Verifies a DeleteConversationProfileRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2.ImportConversationDataRequest + * @memberof google.cloud.dialogflow.v2.DeleteConversationProfileRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportConversationDataRequest.verify = function verify(message) { + DeleteConversationProfileRequest.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.inputConfig != null && message.hasOwnProperty("inputConfig")) { - var error = $root.google.cloud.dialogflow.v2.InputConfig.verify(message.inputConfig); - if (error) - return "inputConfig." + error; - } return null; }; /** - * Creates an ImportConversationDataRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteConversationProfileRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.ImportConversationDataRequest + * @memberof google.cloud.dialogflow.v2.DeleteConversationProfileRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.ImportConversationDataRequest} ImportConversationDataRequest + * @returns {google.cloud.dialogflow.v2.DeleteConversationProfileRequest} DeleteConversationProfileRequest */ - ImportConversationDataRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.ImportConversationDataRequest) + DeleteConversationProfileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.DeleteConversationProfileRequest) return object; - var message = new $root.google.cloud.dialogflow.v2.ImportConversationDataRequest(); + var message = new $root.google.cloud.dialogflow.v2.DeleteConversationProfileRequest(); if (object.name != null) message.name = String(object.name); - if (object.inputConfig != null) { - if (typeof object.inputConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2.ImportConversationDataRequest.inputConfig: object expected"); - message.inputConfig = $root.google.cloud.dialogflow.v2.InputConfig.fromObject(object.inputConfig); - } return message; }; /** - * Creates a plain object from an ImportConversationDataRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteConversationProfileRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.ImportConversationDataRequest + * @memberof google.cloud.dialogflow.v2.DeleteConversationProfileRequest * @static - * @param {google.cloud.dialogflow.v2.ImportConversationDataRequest} message ImportConversationDataRequest + * @param {google.cloud.dialogflow.v2.DeleteConversationProfileRequest} message DeleteConversationProfileRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportConversationDataRequest.toObject = function toObject(message, options) { + DeleteConversationProfileRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.name = ""; - object.inputConfig = null; - } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) - object.inputConfig = $root.google.cloud.dialogflow.v2.InputConfig.toObject(message.inputConfig, options); return object; }; /** - * Converts this ImportConversationDataRequest to JSON. + * Converts this DeleteConversationProfileRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.ImportConversationDataRequest + * @memberof google.cloud.dialogflow.v2.DeleteConversationProfileRequest * @instance * @returns {Object.} JSON object */ - ImportConversationDataRequest.prototype.toJSON = function toJSON() { + DeleteConversationProfileRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportConversationDataRequest + * Gets the default type url for DeleteConversationProfileRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.ImportConversationDataRequest + * @memberof google.cloud.dialogflow.v2.DeleteConversationProfileRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportConversationDataRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteConversationProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.ImportConversationDataRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.DeleteConversationProfileRequest"; }; - return ImportConversationDataRequest; + return DeleteConversationProfileRequest; })(); - v2.ImportConversationDataOperationMetadata = (function() { + v2.AutomatedAgentConfig = (function() { /** - * Properties of an ImportConversationDataOperationMetadata. + * Properties of an AutomatedAgentConfig. * @memberof google.cloud.dialogflow.v2 - * @interface IImportConversationDataOperationMetadata - * @property {string|null} [conversationDataset] ImportConversationDataOperationMetadata conversationDataset - * @property {Array.|null} [partialFailures] ImportConversationDataOperationMetadata partialFailures - * @property {google.protobuf.ITimestamp|null} [createTime] ImportConversationDataOperationMetadata createTime + * @interface IAutomatedAgentConfig + * @property {string|null} [agent] AutomatedAgentConfig agent */ /** - * Constructs a new ImportConversationDataOperationMetadata. + * Constructs a new AutomatedAgentConfig. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents an ImportConversationDataOperationMetadata. - * @implements IImportConversationDataOperationMetadata + * @classdesc Represents an AutomatedAgentConfig. + * @implements IAutomatedAgentConfig * @constructor - * @param {google.cloud.dialogflow.v2.IImportConversationDataOperationMetadata=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.IAutomatedAgentConfig=} [properties] Properties to set */ - function ImportConversationDataOperationMetadata(properties) { - this.partialFailures = []; + function AutomatedAgentConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -49409,106 +51146,75 @@ } /** - * ImportConversationDataOperationMetadata conversationDataset. - * @member {string} conversationDataset - * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata - * @instance - */ - ImportConversationDataOperationMetadata.prototype.conversationDataset = ""; - - /** - * ImportConversationDataOperationMetadata partialFailures. - * @member {Array.} partialFailures - * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata - * @instance - */ - ImportConversationDataOperationMetadata.prototype.partialFailures = $util.emptyArray; - - /** - * ImportConversationDataOperationMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata + * AutomatedAgentConfig agent. + * @member {string} agent + * @memberof google.cloud.dialogflow.v2.AutomatedAgentConfig * @instance */ - ImportConversationDataOperationMetadata.prototype.createTime = null; + AutomatedAgentConfig.prototype.agent = ""; /** - * Creates a new ImportConversationDataOperationMetadata instance using the specified properties. + * Creates a new AutomatedAgentConfig instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata + * @memberof google.cloud.dialogflow.v2.AutomatedAgentConfig * @static - * @param {google.cloud.dialogflow.v2.IImportConversationDataOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata} ImportConversationDataOperationMetadata instance + * @param {google.cloud.dialogflow.v2.IAutomatedAgentConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.AutomatedAgentConfig} AutomatedAgentConfig instance */ - ImportConversationDataOperationMetadata.create = function create(properties) { - return new ImportConversationDataOperationMetadata(properties); + AutomatedAgentConfig.create = function create(properties) { + return new AutomatedAgentConfig(properties); }; /** - * Encodes the specified ImportConversationDataOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata.verify|verify} messages. + * Encodes the specified AutomatedAgentConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.AutomatedAgentConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata + * @memberof google.cloud.dialogflow.v2.AutomatedAgentConfig * @static - * @param {google.cloud.dialogflow.v2.IImportConversationDataOperationMetadata} message ImportConversationDataOperationMetadata message or plain object to encode + * @param {google.cloud.dialogflow.v2.IAutomatedAgentConfig} message AutomatedAgentConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportConversationDataOperationMetadata.encode = function encode(message, writer) { + AutomatedAgentConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.conversationDataset != null && Object.hasOwnProperty.call(message, "conversationDataset")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversationDataset); - if (message.partialFailures != null && message.partialFailures.length) - for (var i = 0; i < message.partialFailures.length; ++i) - $root.google.rpc.Status.encode(message.partialFailures[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - 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.agent != null && Object.hasOwnProperty.call(message, "agent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.agent); return writer; }; /** - * Encodes the specified ImportConversationDataOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata.verify|verify} messages. + * Encodes the specified AutomatedAgentConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.AutomatedAgentConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata + * @memberof google.cloud.dialogflow.v2.AutomatedAgentConfig * @static - * @param {google.cloud.dialogflow.v2.IImportConversationDataOperationMetadata} message ImportConversationDataOperationMetadata message or plain object to encode + * @param {google.cloud.dialogflow.v2.IAutomatedAgentConfig} message AutomatedAgentConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportConversationDataOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + AutomatedAgentConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportConversationDataOperationMetadata message from the specified reader or buffer. + * Decodes an AutomatedAgentConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata + * @memberof google.cloud.dialogflow.v2.AutomatedAgentConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata} ImportConversationDataOperationMetadata + * @returns {google.cloud.dialogflow.v2.AutomatedAgentConfig} AutomatedAgentConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportConversationDataOperationMetadata.decode = function decode(reader, length) { + AutomatedAgentConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.AutomatedAgentConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.conversationDataset = reader.string(); - break; - } - case 2: { - if (!(message.partialFailures && message.partialFailures.length)) - message.partialFailures = []; - message.partialFailures.push($root.google.rpc.Status.decode(reader, reader.uint32())); - break; - } - case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.agent = reader.string(); break; } default: @@ -49520,163 +51226,125 @@ }; /** - * Decodes an ImportConversationDataOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes an AutomatedAgentConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata + * @memberof google.cloud.dialogflow.v2.AutomatedAgentConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata} ImportConversationDataOperationMetadata + * @returns {google.cloud.dialogflow.v2.AutomatedAgentConfig} AutomatedAgentConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportConversationDataOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + AutomatedAgentConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportConversationDataOperationMetadata message. + * Verifies an AutomatedAgentConfig message. * @function verify - * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata + * @memberof google.cloud.dialogflow.v2.AutomatedAgentConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportConversationDataOperationMetadata.verify = function verify(message) { + AutomatedAgentConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.conversationDataset != null && message.hasOwnProperty("conversationDataset")) - if (!$util.isString(message.conversationDataset)) - return "conversationDataset: string expected"; - if (message.partialFailures != null && message.hasOwnProperty("partialFailures")) { - if (!Array.isArray(message.partialFailures)) - return "partialFailures: array expected"; - for (var i = 0; i < message.partialFailures.length; ++i) { - var error = $root.google.rpc.Status.verify(message.partialFailures[i]); - if (error) - return "partialFailures." + error; - } - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } + if (message.agent != null && message.hasOwnProperty("agent")) + if (!$util.isString(message.agent)) + return "agent: string expected"; return null; }; /** - * Creates an ImportConversationDataOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an AutomatedAgentConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata + * @memberof google.cloud.dialogflow.v2.AutomatedAgentConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata} ImportConversationDataOperationMetadata + * @returns {google.cloud.dialogflow.v2.AutomatedAgentConfig} AutomatedAgentConfig */ - ImportConversationDataOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata) + AutomatedAgentConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.AutomatedAgentConfig) return object; - var message = new $root.google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata(); - if (object.conversationDataset != null) - message.conversationDataset = String(object.conversationDataset); - if (object.partialFailures) { - if (!Array.isArray(object.partialFailures)) - throw TypeError(".google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata.partialFailures: array expected"); - message.partialFailures = []; - for (var i = 0; i < object.partialFailures.length; ++i) { - if (typeof object.partialFailures[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata.partialFailures: object expected"); - message.partialFailures[i] = $root.google.rpc.Status.fromObject(object.partialFailures[i]); - } - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } + var message = new $root.google.cloud.dialogflow.v2.AutomatedAgentConfig(); + if (object.agent != null) + message.agent = String(object.agent); return message; }; /** - * Creates a plain object from an ImportConversationDataOperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from an AutomatedAgentConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata + * @memberof google.cloud.dialogflow.v2.AutomatedAgentConfig * @static - * @param {google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata} message ImportConversationDataOperationMetadata + * @param {google.cloud.dialogflow.v2.AutomatedAgentConfig} message AutomatedAgentConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportConversationDataOperationMetadata.toObject = function toObject(message, options) { + AutomatedAgentConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.partialFailures = []; - if (options.defaults) { - object.conversationDataset = ""; - object.createTime = null; - } - if (message.conversationDataset != null && message.hasOwnProperty("conversationDataset")) - object.conversationDataset = message.conversationDataset; - if (message.partialFailures && message.partialFailures.length) { - object.partialFailures = []; - for (var j = 0; j < message.partialFailures.length; ++j) - object.partialFailures[j] = $root.google.rpc.Status.toObject(message.partialFailures[j], options); - } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (options.defaults) + object.agent = ""; + if (message.agent != null && message.hasOwnProperty("agent")) + object.agent = message.agent; return object; }; /** - * Converts this ImportConversationDataOperationMetadata to JSON. + * Converts this AutomatedAgentConfig to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata + * @memberof google.cloud.dialogflow.v2.AutomatedAgentConfig * @instance * @returns {Object.} JSON object */ - ImportConversationDataOperationMetadata.prototype.toJSON = function toJSON() { + AutomatedAgentConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportConversationDataOperationMetadata + * Gets the default type url for AutomatedAgentConfig * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata + * @memberof google.cloud.dialogflow.v2.AutomatedAgentConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportConversationDataOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AutomatedAgentConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.AutomatedAgentConfig"; }; - return ImportConversationDataOperationMetadata; + return AutomatedAgentConfig; })(); - v2.ImportConversationDataOperationResponse = (function() { + v2.HumanAgentAssistantConfig = (function() { /** - * Properties of an ImportConversationDataOperationResponse. + * Properties of a HumanAgentAssistantConfig. * @memberof google.cloud.dialogflow.v2 - * @interface IImportConversationDataOperationResponse - * @property {string|null} [conversationDataset] ImportConversationDataOperationResponse conversationDataset - * @property {number|null} [importCount] ImportConversationDataOperationResponse importCount + * @interface IHumanAgentAssistantConfig + * @property {google.cloud.dialogflow.v2.INotificationConfig|null} [notificationConfig] HumanAgentAssistantConfig notificationConfig + * @property {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionConfig|null} [humanAgentSuggestionConfig] HumanAgentAssistantConfig humanAgentSuggestionConfig + * @property {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionConfig|null} [endUserSuggestionConfig] HumanAgentAssistantConfig endUserSuggestionConfig + * @property {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IMessageAnalysisConfig|null} [messageAnalysisConfig] HumanAgentAssistantConfig messageAnalysisConfig */ /** - * Constructs a new ImportConversationDataOperationResponse. + * Constructs a new HumanAgentAssistantConfig. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents an ImportConversationDataOperationResponse. - * @implements IImportConversationDataOperationResponse + * @classdesc Represents a HumanAgentAssistantConfig. + * @implements IHumanAgentAssistantConfig * @constructor - * @param {google.cloud.dialogflow.v2.IImportConversationDataOperationResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.IHumanAgentAssistantConfig=} [properties] Properties to set */ - function ImportConversationDataOperationResponse(properties) { + function HumanAgentAssistantConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -49684,89 +51352,117 @@ } /** - * ImportConversationDataOperationResponse conversationDataset. - * @member {string} conversationDataset - * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationResponse + * HumanAgentAssistantConfig notificationConfig. + * @member {google.cloud.dialogflow.v2.INotificationConfig|null|undefined} notificationConfig + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig * @instance */ - ImportConversationDataOperationResponse.prototype.conversationDataset = ""; + HumanAgentAssistantConfig.prototype.notificationConfig = null; /** - * ImportConversationDataOperationResponse importCount. - * @member {number} importCount - * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationResponse + * HumanAgentAssistantConfig humanAgentSuggestionConfig. + * @member {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionConfig|null|undefined} humanAgentSuggestionConfig + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig * @instance */ - ImportConversationDataOperationResponse.prototype.importCount = 0; + HumanAgentAssistantConfig.prototype.humanAgentSuggestionConfig = null; /** - * Creates a new ImportConversationDataOperationResponse instance using the specified properties. + * HumanAgentAssistantConfig endUserSuggestionConfig. + * @member {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionConfig|null|undefined} endUserSuggestionConfig + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig + * @instance + */ + HumanAgentAssistantConfig.prototype.endUserSuggestionConfig = null; + + /** + * HumanAgentAssistantConfig messageAnalysisConfig. + * @member {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IMessageAnalysisConfig|null|undefined} messageAnalysisConfig + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig + * @instance + */ + HumanAgentAssistantConfig.prototype.messageAnalysisConfig = null; + + /** + * Creates a new HumanAgentAssistantConfig instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationResponse + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig * @static - * @param {google.cloud.dialogflow.v2.IImportConversationDataOperationResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.ImportConversationDataOperationResponse} ImportConversationDataOperationResponse instance + * @param {google.cloud.dialogflow.v2.IHumanAgentAssistantConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig} HumanAgentAssistantConfig instance */ - ImportConversationDataOperationResponse.create = function create(properties) { - return new ImportConversationDataOperationResponse(properties); + HumanAgentAssistantConfig.create = function create(properties) { + return new HumanAgentAssistantConfig(properties); }; /** - * Encodes the specified ImportConversationDataOperationResponse message. Does not implicitly {@link google.cloud.dialogflow.v2.ImportConversationDataOperationResponse.verify|verify} messages. + * Encodes the specified HumanAgentAssistantConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationResponse + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig * @static - * @param {google.cloud.dialogflow.v2.IImportConversationDataOperationResponse} message ImportConversationDataOperationResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2.IHumanAgentAssistantConfig} message HumanAgentAssistantConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportConversationDataOperationResponse.encode = function encode(message, writer) { + HumanAgentAssistantConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.conversationDataset != null && Object.hasOwnProperty.call(message, "conversationDataset")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversationDataset); - if (message.importCount != null && Object.hasOwnProperty.call(message, "importCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.importCount); + if (message.notificationConfig != null && Object.hasOwnProperty.call(message, "notificationConfig")) + $root.google.cloud.dialogflow.v2.NotificationConfig.encode(message.notificationConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.humanAgentSuggestionConfig != null && Object.hasOwnProperty.call(message, "humanAgentSuggestionConfig")) + $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.encode(message.humanAgentSuggestionConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endUserSuggestionConfig != null && Object.hasOwnProperty.call(message, "endUserSuggestionConfig")) + $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.encode(message.endUserSuggestionConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.messageAnalysisConfig != null && Object.hasOwnProperty.call(message, "messageAnalysisConfig")) + $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig.encode(message.messageAnalysisConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified ImportConversationDataOperationResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ImportConversationDataOperationResponse.verify|verify} messages. + * Encodes the specified HumanAgentAssistantConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationResponse + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig * @static - * @param {google.cloud.dialogflow.v2.IImportConversationDataOperationResponse} message ImportConversationDataOperationResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2.IHumanAgentAssistantConfig} message HumanAgentAssistantConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportConversationDataOperationResponse.encodeDelimited = function encodeDelimited(message, writer) { + HumanAgentAssistantConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportConversationDataOperationResponse message from the specified reader or buffer. + * Decodes a HumanAgentAssistantConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationResponse + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.ImportConversationDataOperationResponse} ImportConversationDataOperationResponse + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig} HumanAgentAssistantConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportConversationDataOperationResponse.decode = function decode(reader, length) { + HumanAgentAssistantConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ImportConversationDataOperationResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.conversationDataset = reader.string(); + case 2: { + message.notificationConfig = $root.google.cloud.dialogflow.v2.NotificationConfig.decode(reader, reader.uint32()); break; } case 3: { - message.importCount = reader.int32(); + message.humanAgentSuggestionConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.decode(reader, reader.uint32()); + break; + } + case 4: { + message.endUserSuggestionConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.decode(reader, reader.uint32()); + break; + } + case 5: { + message.messageAnalysisConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig.decode(reader, reader.uint32()); break; } default: @@ -49778,2511 +51474,2908 @@ }; /** - * Decodes an ImportConversationDataOperationResponse message from the specified reader or buffer, length delimited. + * Decodes a HumanAgentAssistantConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationResponse + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.ImportConversationDataOperationResponse} ImportConversationDataOperationResponse + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig} HumanAgentAssistantConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportConversationDataOperationResponse.decodeDelimited = function decodeDelimited(reader) { + HumanAgentAssistantConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportConversationDataOperationResponse message. + * Verifies a HumanAgentAssistantConfig message. * @function verify - * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationResponse + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportConversationDataOperationResponse.verify = function verify(message) { + HumanAgentAssistantConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.conversationDataset != null && message.hasOwnProperty("conversationDataset")) - if (!$util.isString(message.conversationDataset)) - return "conversationDataset: string expected"; - if (message.importCount != null && message.hasOwnProperty("importCount")) - if (!$util.isInteger(message.importCount)) - return "importCount: integer expected"; - return null; - }; - - /** - * Creates an ImportConversationDataOperationResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationResponse + if (message.notificationConfig != null && message.hasOwnProperty("notificationConfig")) { + var error = $root.google.cloud.dialogflow.v2.NotificationConfig.verify(message.notificationConfig); + if (error) + return "notificationConfig." + error; + } + if (message.humanAgentSuggestionConfig != null && message.hasOwnProperty("humanAgentSuggestionConfig")) { + var error = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.verify(message.humanAgentSuggestionConfig); + if (error) + return "humanAgentSuggestionConfig." + error; + } + if (message.endUserSuggestionConfig != null && message.hasOwnProperty("endUserSuggestionConfig")) { + var error = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.verify(message.endUserSuggestionConfig); + if (error) + return "endUserSuggestionConfig." + error; + } + if (message.messageAnalysisConfig != null && message.hasOwnProperty("messageAnalysisConfig")) { + var error = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig.verify(message.messageAnalysisConfig); + if (error) + return "messageAnalysisConfig." + error; + } + return null; + }; + + /** + * Creates a HumanAgentAssistantConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.ImportConversationDataOperationResponse} ImportConversationDataOperationResponse + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig} HumanAgentAssistantConfig */ - ImportConversationDataOperationResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.ImportConversationDataOperationResponse) + HumanAgentAssistantConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig) return object; - var message = new $root.google.cloud.dialogflow.v2.ImportConversationDataOperationResponse(); - if (object.conversationDataset != null) - message.conversationDataset = String(object.conversationDataset); - if (object.importCount != null) - message.importCount = object.importCount | 0; + var message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig(); + if (object.notificationConfig != null) { + if (typeof object.notificationConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2.HumanAgentAssistantConfig.notificationConfig: object expected"); + message.notificationConfig = $root.google.cloud.dialogflow.v2.NotificationConfig.fromObject(object.notificationConfig); + } + if (object.humanAgentSuggestionConfig != null) { + if (typeof object.humanAgentSuggestionConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2.HumanAgentAssistantConfig.humanAgentSuggestionConfig: object expected"); + message.humanAgentSuggestionConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.fromObject(object.humanAgentSuggestionConfig); + } + if (object.endUserSuggestionConfig != null) { + if (typeof object.endUserSuggestionConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2.HumanAgentAssistantConfig.endUserSuggestionConfig: object expected"); + message.endUserSuggestionConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.fromObject(object.endUserSuggestionConfig); + } + if (object.messageAnalysisConfig != null) { + if (typeof object.messageAnalysisConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2.HumanAgentAssistantConfig.messageAnalysisConfig: object expected"); + message.messageAnalysisConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig.fromObject(object.messageAnalysisConfig); + } return message; }; /** - * Creates a plain object from an ImportConversationDataOperationResponse message. Also converts values to other types if specified. + * Creates a plain object from a HumanAgentAssistantConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationResponse + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig * @static - * @param {google.cloud.dialogflow.v2.ImportConversationDataOperationResponse} message ImportConversationDataOperationResponse + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig} message HumanAgentAssistantConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportConversationDataOperationResponse.toObject = function toObject(message, options) { + HumanAgentAssistantConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.conversationDataset = ""; - object.importCount = 0; + object.notificationConfig = null; + object.humanAgentSuggestionConfig = null; + object.endUserSuggestionConfig = null; + object.messageAnalysisConfig = null; } - if (message.conversationDataset != null && message.hasOwnProperty("conversationDataset")) - object.conversationDataset = message.conversationDataset; - if (message.importCount != null && message.hasOwnProperty("importCount")) - object.importCount = message.importCount; + if (message.notificationConfig != null && message.hasOwnProperty("notificationConfig")) + object.notificationConfig = $root.google.cloud.dialogflow.v2.NotificationConfig.toObject(message.notificationConfig, options); + if (message.humanAgentSuggestionConfig != null && message.hasOwnProperty("humanAgentSuggestionConfig")) + object.humanAgentSuggestionConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.toObject(message.humanAgentSuggestionConfig, options); + if (message.endUserSuggestionConfig != null && message.hasOwnProperty("endUserSuggestionConfig")) + object.endUserSuggestionConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.toObject(message.endUserSuggestionConfig, options); + if (message.messageAnalysisConfig != null && message.hasOwnProperty("messageAnalysisConfig")) + object.messageAnalysisConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig.toObject(message.messageAnalysisConfig, options); return object; }; /** - * Converts this ImportConversationDataOperationResponse to JSON. + * Converts this HumanAgentAssistantConfig to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationResponse + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig * @instance * @returns {Object.} JSON object */ - ImportConversationDataOperationResponse.prototype.toJSON = function toJSON() { + HumanAgentAssistantConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportConversationDataOperationResponse + * Gets the default type url for HumanAgentAssistantConfig * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationResponse + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportConversationDataOperationResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + HumanAgentAssistantConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.ImportConversationDataOperationResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.HumanAgentAssistantConfig"; }; - return ImportConversationDataOperationResponse; - })(); + HumanAgentAssistantConfig.SuggestionTriggerSettings = (function() { - v2.CreateConversationDatasetOperationMetadata = (function() { + /** + * Properties of a SuggestionTriggerSettings. + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig + * @interface ISuggestionTriggerSettings + * @property {boolean|null} [noSmalltalk] SuggestionTriggerSettings noSmalltalk + * @property {boolean|null} [onlyEndUser] SuggestionTriggerSettings onlyEndUser + */ - /** - * Properties of a CreateConversationDatasetOperationMetadata. - * @memberof google.cloud.dialogflow.v2 - * @interface ICreateConversationDatasetOperationMetadata - * @property {string|null} [conversationDataset] CreateConversationDatasetOperationMetadata conversationDataset - */ + /** + * Constructs a new SuggestionTriggerSettings. + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig + * @classdesc Represents a SuggestionTriggerSettings. + * @implements ISuggestionTriggerSettings + * @constructor + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionTriggerSettings=} [properties] Properties to set + */ + function SuggestionTriggerSettings(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]]; + } - /** - * Constructs a new CreateConversationDatasetOperationMetadata. - * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a CreateConversationDatasetOperationMetadata. - * @implements ICreateConversationDatasetOperationMetadata - * @constructor - * @param {google.cloud.dialogflow.v2.ICreateConversationDatasetOperationMetadata=} [properties] Properties to set - */ - function CreateConversationDatasetOperationMetadata(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]]; - } + /** + * SuggestionTriggerSettings noSmalltalk. + * @member {boolean} noSmalltalk + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings + * @instance + */ + SuggestionTriggerSettings.prototype.noSmalltalk = false; - /** - * CreateConversationDatasetOperationMetadata conversationDataset. - * @member {string} conversationDataset - * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata - * @instance - */ - CreateConversationDatasetOperationMetadata.prototype.conversationDataset = ""; + /** + * SuggestionTriggerSettings onlyEndUser. + * @member {boolean} onlyEndUser + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings + * @instance + */ + SuggestionTriggerSettings.prototype.onlyEndUser = false; - /** - * Creates a new CreateConversationDatasetOperationMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata - * @static - * @param {google.cloud.dialogflow.v2.ICreateConversationDatasetOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata} CreateConversationDatasetOperationMetadata instance - */ - CreateConversationDatasetOperationMetadata.create = function create(properties) { - return new CreateConversationDatasetOperationMetadata(properties); - }; + /** + * Creates a new SuggestionTriggerSettings instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionTriggerSettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings} SuggestionTriggerSettings instance + */ + SuggestionTriggerSettings.create = function create(properties) { + return new SuggestionTriggerSettings(properties); + }; - /** - * Encodes the specified CreateConversationDatasetOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata - * @static - * @param {google.cloud.dialogflow.v2.ICreateConversationDatasetOperationMetadata} message CreateConversationDatasetOperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateConversationDatasetOperationMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.conversationDataset != null && Object.hasOwnProperty.call(message, "conversationDataset")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversationDataset); - return writer; - }; + /** + * Encodes the specified SuggestionTriggerSettings message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionTriggerSettings} message SuggestionTriggerSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SuggestionTriggerSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.noSmalltalk != null && Object.hasOwnProperty.call(message, "noSmalltalk")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.noSmalltalk); + if (message.onlyEndUser != null && Object.hasOwnProperty.call(message, "onlyEndUser")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.onlyEndUser); + return writer; + }; - /** - * Encodes the specified CreateConversationDatasetOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata - * @static - * @param {google.cloud.dialogflow.v2.ICreateConversationDatasetOperationMetadata} message CreateConversationDatasetOperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateConversationDatasetOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified SuggestionTriggerSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionTriggerSettings} message SuggestionTriggerSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SuggestionTriggerSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a CreateConversationDatasetOperationMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata} CreateConversationDatasetOperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateConversationDatasetOperationMetadata.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.conversationDataset = reader.string(); + /** + * Decodes a SuggestionTriggerSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings} SuggestionTriggerSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SuggestionTriggerSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.noSmalltalk = reader.bool(); + break; + } + case 2: { + message.onlyEndUser = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a CreateConversationDatasetOperationMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata} CreateConversationDatasetOperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateConversationDatasetOperationMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a SuggestionTriggerSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings} SuggestionTriggerSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SuggestionTriggerSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a CreateConversationDatasetOperationMetadata message. - * @function verify - * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateConversationDatasetOperationMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.conversationDataset != null && message.hasOwnProperty("conversationDataset")) - if (!$util.isString(message.conversationDataset)) - return "conversationDataset: string expected"; - return null; - }; + /** + * Verifies a SuggestionTriggerSettings message. + * @function verify + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SuggestionTriggerSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.noSmalltalk != null && message.hasOwnProperty("noSmalltalk")) + if (typeof message.noSmalltalk !== "boolean") + return "noSmalltalk: boolean expected"; + if (message.onlyEndUser != null && message.hasOwnProperty("onlyEndUser")) + if (typeof message.onlyEndUser !== "boolean") + return "onlyEndUser: boolean expected"; + return null; + }; - /** - * Creates a CreateConversationDatasetOperationMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata} CreateConversationDatasetOperationMetadata - */ - CreateConversationDatasetOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata) + /** + * Creates a SuggestionTriggerSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings} SuggestionTriggerSettings + */ + SuggestionTriggerSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings) + return object; + var message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings(); + if (object.noSmalltalk != null) + message.noSmalltalk = Boolean(object.noSmalltalk); + if (object.onlyEndUser != null) + message.onlyEndUser = Boolean(object.onlyEndUser); + return message; + }; + + /** + * Creates a plain object from a SuggestionTriggerSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings} message SuggestionTriggerSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SuggestionTriggerSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.noSmalltalk = false; + object.onlyEndUser = false; + } + if (message.noSmalltalk != null && message.hasOwnProperty("noSmalltalk")) + object.noSmalltalk = message.noSmalltalk; + if (message.onlyEndUser != null && message.hasOwnProperty("onlyEndUser")) + object.onlyEndUser = message.onlyEndUser; return object; - var message = new $root.google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata(); - if (object.conversationDataset != null) - message.conversationDataset = String(object.conversationDataset); - return message; - }; + }; - /** - * Creates a plain object from a CreateConversationDatasetOperationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata - * @static - * @param {google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata} message CreateConversationDatasetOperationMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateConversationDatasetOperationMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.conversationDataset = ""; - if (message.conversationDataset != null && message.hasOwnProperty("conversationDataset")) - object.conversationDataset = message.conversationDataset; - return object; - }; + /** + * Converts this SuggestionTriggerSettings to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings + * @instance + * @returns {Object.} JSON object + */ + SuggestionTriggerSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this CreateConversationDatasetOperationMetadata to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata - * @instance - * @returns {Object.} JSON object - */ - CreateConversationDatasetOperationMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for SuggestionTriggerSettings + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SuggestionTriggerSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings"; + }; - /** - * Gets the default type url for CreateConversationDatasetOperationMetadata - * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateConversationDatasetOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata"; - }; + return SuggestionTriggerSettings; + })(); - return CreateConversationDatasetOperationMetadata; - })(); + HumanAgentAssistantConfig.SuggestionFeatureConfig = (function() { - v2.DeleteConversationDatasetOperationMetadata = (function() { + /** + * Properties of a SuggestionFeatureConfig. + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig + * @interface ISuggestionFeatureConfig + * @property {google.cloud.dialogflow.v2.ISuggestionFeature|null} [suggestionFeature] SuggestionFeatureConfig suggestionFeature + * @property {boolean|null} [enableEventBasedSuggestion] SuggestionFeatureConfig enableEventBasedSuggestion + * @property {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionTriggerSettings|null} [suggestionTriggerSettings] SuggestionFeatureConfig suggestionTriggerSettings + * @property {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionQueryConfig|null} [queryConfig] SuggestionFeatureConfig queryConfig + * @property {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationModelConfig|null} [conversationModelConfig] SuggestionFeatureConfig conversationModelConfig + * @property {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationProcessConfig|null} [conversationProcessConfig] SuggestionFeatureConfig conversationProcessConfig + */ - /** - * Properties of a DeleteConversationDatasetOperationMetadata. - * @memberof google.cloud.dialogflow.v2 - * @interface IDeleteConversationDatasetOperationMetadata - */ + /** + * Constructs a new SuggestionFeatureConfig. + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig + * @classdesc Represents a SuggestionFeatureConfig. + * @implements ISuggestionFeatureConfig + * @constructor + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionFeatureConfig=} [properties] Properties to set + */ + function SuggestionFeatureConfig(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]]; + } - /** - * Constructs a new DeleteConversationDatasetOperationMetadata. - * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a DeleteConversationDatasetOperationMetadata. - * @implements IDeleteConversationDatasetOperationMetadata - * @constructor - * @param {google.cloud.dialogflow.v2.IDeleteConversationDatasetOperationMetadata=} [properties] Properties to set - */ - function DeleteConversationDatasetOperationMetadata(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]]; - } + /** + * SuggestionFeatureConfig suggestionFeature. + * @member {google.cloud.dialogflow.v2.ISuggestionFeature|null|undefined} suggestionFeature + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig + * @instance + */ + SuggestionFeatureConfig.prototype.suggestionFeature = null; - /** - * Creates a new DeleteConversationDatasetOperationMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata - * @static - * @param {google.cloud.dialogflow.v2.IDeleteConversationDatasetOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata} DeleteConversationDatasetOperationMetadata instance - */ - DeleteConversationDatasetOperationMetadata.create = function create(properties) { - return new DeleteConversationDatasetOperationMetadata(properties); - }; + /** + * SuggestionFeatureConfig enableEventBasedSuggestion. + * @member {boolean} enableEventBasedSuggestion + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig + * @instance + */ + SuggestionFeatureConfig.prototype.enableEventBasedSuggestion = false; - /** - * Encodes the specified DeleteConversationDatasetOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata - * @static - * @param {google.cloud.dialogflow.v2.IDeleteConversationDatasetOperationMetadata} message DeleteConversationDatasetOperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteConversationDatasetOperationMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; + /** + * SuggestionFeatureConfig suggestionTriggerSettings. + * @member {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionTriggerSettings|null|undefined} suggestionTriggerSettings + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig + * @instance + */ + SuggestionFeatureConfig.prototype.suggestionTriggerSettings = null; - /** - * Encodes the specified DeleteConversationDatasetOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata - * @static - * @param {google.cloud.dialogflow.v2.IDeleteConversationDatasetOperationMetadata} message DeleteConversationDatasetOperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteConversationDatasetOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * SuggestionFeatureConfig queryConfig. + * @member {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionQueryConfig|null|undefined} queryConfig + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig + * @instance + */ + SuggestionFeatureConfig.prototype.queryConfig = null; - /** - * Decodes a DeleteConversationDatasetOperationMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata} DeleteConversationDatasetOperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteConversationDatasetOperationMetadata.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * SuggestionFeatureConfig conversationModelConfig. + * @member {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationModelConfig|null|undefined} conversationModelConfig + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig + * @instance + */ + SuggestionFeatureConfig.prototype.conversationModelConfig = null; - /** - * Decodes a DeleteConversationDatasetOperationMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata} DeleteConversationDatasetOperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteConversationDatasetOperationMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * SuggestionFeatureConfig conversationProcessConfig. + * @member {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationProcessConfig|null|undefined} conversationProcessConfig + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig + * @instance + */ + SuggestionFeatureConfig.prototype.conversationProcessConfig = null; - /** - * Verifies a DeleteConversationDatasetOperationMetadata message. - * @function verify - * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteConversationDatasetOperationMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; + /** + * Creates a new SuggestionFeatureConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionFeatureConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig} SuggestionFeatureConfig instance + */ + SuggestionFeatureConfig.create = function create(properties) { + return new SuggestionFeatureConfig(properties); + }; - /** - * Creates a DeleteConversationDatasetOperationMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata} DeleteConversationDatasetOperationMetadata - */ - DeleteConversationDatasetOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata) - return object; - return new $root.google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata(); - }; + /** + * Encodes the specified SuggestionFeatureConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionFeatureConfig} message SuggestionFeatureConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SuggestionFeatureConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableEventBasedSuggestion != null && Object.hasOwnProperty.call(message, "enableEventBasedSuggestion")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.enableEventBasedSuggestion); + if (message.suggestionFeature != null && Object.hasOwnProperty.call(message, "suggestionFeature")) + $root.google.cloud.dialogflow.v2.SuggestionFeature.encode(message.suggestionFeature, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.queryConfig != null && Object.hasOwnProperty.call(message, "queryConfig")) + $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.encode(message.queryConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.conversationModelConfig != null && Object.hasOwnProperty.call(message, "conversationModelConfig")) + $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig.encode(message.conversationModelConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.conversationProcessConfig != null && Object.hasOwnProperty.call(message, "conversationProcessConfig")) + $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig.encode(message.conversationProcessConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.suggestionTriggerSettings != null && Object.hasOwnProperty.call(message, "suggestionTriggerSettings")) + $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings.encode(message.suggestionTriggerSettings, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; - /** - * Creates a plain object from a DeleteConversationDatasetOperationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata - * @static - * @param {google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata} message DeleteConversationDatasetOperationMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteConversationDatasetOperationMetadata.toObject = function toObject() { - return {}; - }; + /** + * Encodes the specified SuggestionFeatureConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionFeatureConfig} message SuggestionFeatureConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SuggestionFeatureConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Converts this DeleteConversationDatasetOperationMetadata to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata - * @instance - * @returns {Object.} JSON object - */ - DeleteConversationDatasetOperationMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a SuggestionFeatureConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig} SuggestionFeatureConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SuggestionFeatureConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 5: { + message.suggestionFeature = $root.google.cloud.dialogflow.v2.SuggestionFeature.decode(reader, reader.uint32()); + break; + } + case 3: { + message.enableEventBasedSuggestion = reader.bool(); + break; + } + case 10: { + message.suggestionTriggerSettings = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings.decode(reader, reader.uint32()); + break; + } + case 6: { + message.queryConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.decode(reader, reader.uint32()); + break; + } + case 7: { + message.conversationModelConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig.decode(reader, reader.uint32()); + break; + } + case 8: { + message.conversationProcessConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Gets the default type url for DeleteConversationDatasetOperationMetadata - * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteConversationDatasetOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata"; - }; + /** + * Decodes a SuggestionFeatureConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig} SuggestionFeatureConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SuggestionFeatureConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - return DeleteConversationDatasetOperationMetadata; - })(); + /** + * Verifies a SuggestionFeatureConfig message. + * @function verify + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SuggestionFeatureConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.suggestionFeature != null && message.hasOwnProperty("suggestionFeature")) { + var error = $root.google.cloud.dialogflow.v2.SuggestionFeature.verify(message.suggestionFeature); + if (error) + return "suggestionFeature." + error; + } + if (message.enableEventBasedSuggestion != null && message.hasOwnProperty("enableEventBasedSuggestion")) + if (typeof message.enableEventBasedSuggestion !== "boolean") + return "enableEventBasedSuggestion: boolean expected"; + if (message.suggestionTriggerSettings != null && message.hasOwnProperty("suggestionTriggerSettings")) { + var error = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings.verify(message.suggestionTriggerSettings); + if (error) + return "suggestionTriggerSettings." + error; + } + if (message.queryConfig != null && message.hasOwnProperty("queryConfig")) { + var error = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.verify(message.queryConfig); + if (error) + return "queryConfig." + error; + } + if (message.conversationModelConfig != null && message.hasOwnProperty("conversationModelConfig")) { + var error = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig.verify(message.conversationModelConfig); + if (error) + return "conversationModelConfig." + error; + } + if (message.conversationProcessConfig != null && message.hasOwnProperty("conversationProcessConfig")) { + var error = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig.verify(message.conversationProcessConfig); + if (error) + return "conversationProcessConfig." + error; + } + return null; + }; - v2.GcsSources = (function() { + /** + * Creates a SuggestionFeatureConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig} SuggestionFeatureConfig + */ + SuggestionFeatureConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig) + return object; + var message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig(); + if (object.suggestionFeature != null) { + if (typeof object.suggestionFeature !== "object") + throw TypeError(".google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.suggestionFeature: object expected"); + message.suggestionFeature = $root.google.cloud.dialogflow.v2.SuggestionFeature.fromObject(object.suggestionFeature); + } + if (object.enableEventBasedSuggestion != null) + message.enableEventBasedSuggestion = Boolean(object.enableEventBasedSuggestion); + if (object.suggestionTriggerSettings != null) { + if (typeof object.suggestionTriggerSettings !== "object") + throw TypeError(".google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.suggestionTriggerSettings: object expected"); + message.suggestionTriggerSettings = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings.fromObject(object.suggestionTriggerSettings); + } + if (object.queryConfig != null) { + if (typeof object.queryConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.queryConfig: object expected"); + message.queryConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.fromObject(object.queryConfig); + } + if (object.conversationModelConfig != null) { + if (typeof object.conversationModelConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.conversationModelConfig: object expected"); + message.conversationModelConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig.fromObject(object.conversationModelConfig); + } + if (object.conversationProcessConfig != null) { + if (typeof object.conversationProcessConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.conversationProcessConfig: object expected"); + message.conversationProcessConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig.fromObject(object.conversationProcessConfig); + } + return message; + }; - /** - * Properties of a GcsSources. - * @memberof google.cloud.dialogflow.v2 - * @interface IGcsSources - * @property {Array.|null} [uris] GcsSources uris - */ + /** + * Creates a plain object from a SuggestionFeatureConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig} message SuggestionFeatureConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SuggestionFeatureConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enableEventBasedSuggestion = false; + object.suggestionFeature = null; + object.queryConfig = null; + object.conversationModelConfig = null; + object.conversationProcessConfig = null; + object.suggestionTriggerSettings = null; + } + if (message.enableEventBasedSuggestion != null && message.hasOwnProperty("enableEventBasedSuggestion")) + object.enableEventBasedSuggestion = message.enableEventBasedSuggestion; + if (message.suggestionFeature != null && message.hasOwnProperty("suggestionFeature")) + object.suggestionFeature = $root.google.cloud.dialogflow.v2.SuggestionFeature.toObject(message.suggestionFeature, options); + if (message.queryConfig != null && message.hasOwnProperty("queryConfig")) + object.queryConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.toObject(message.queryConfig, options); + if (message.conversationModelConfig != null && message.hasOwnProperty("conversationModelConfig")) + object.conversationModelConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig.toObject(message.conversationModelConfig, options); + if (message.conversationProcessConfig != null && message.hasOwnProperty("conversationProcessConfig")) + object.conversationProcessConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig.toObject(message.conversationProcessConfig, options); + if (message.suggestionTriggerSettings != null && message.hasOwnProperty("suggestionTriggerSettings")) + object.suggestionTriggerSettings = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings.toObject(message.suggestionTriggerSettings, options); + return object; + }; - /** - * Constructs a new GcsSources. - * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a GcsSources. - * @implements IGcsSources - * @constructor - * @param {google.cloud.dialogflow.v2.IGcsSources=} [properties] Properties to set - */ - function GcsSources(properties) { - this.uris = []; - 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]]; - } + /** + * Converts this SuggestionFeatureConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig + * @instance + * @returns {Object.} JSON object + */ + SuggestionFeatureConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * GcsSources uris. - * @member {Array.} uris - * @memberof google.cloud.dialogflow.v2.GcsSources - * @instance - */ - GcsSources.prototype.uris = $util.emptyArray; + /** + * Gets the default type url for SuggestionFeatureConfig + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SuggestionFeatureConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig"; + }; - /** - * Creates a new GcsSources instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2.GcsSources - * @static - * @param {google.cloud.dialogflow.v2.IGcsSources=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.GcsSources} GcsSources instance - */ - GcsSources.create = function create(properties) { - return new GcsSources(properties); - }; + return SuggestionFeatureConfig; + })(); - /** - * Encodes the specified GcsSources message. Does not implicitly {@link google.cloud.dialogflow.v2.GcsSources.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2.GcsSources - * @static - * @param {google.cloud.dialogflow.v2.IGcsSources} message GcsSources message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcsSources.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uris != null && message.uris.length) - for (var i = 0; i < message.uris.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uris[i]); - return writer; - }; - - /** - * Encodes the specified GcsSources message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.GcsSources.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.GcsSources - * @static - * @param {google.cloud.dialogflow.v2.IGcsSources} message GcsSources message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcsSources.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GcsSources message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2.GcsSources - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.GcsSources} GcsSources - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcsSources.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.GcsSources(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - if (!(message.uris && message.uris.length)) - message.uris = []; - message.uris.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GcsSources message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.GcsSources - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.GcsSources} GcsSources - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcsSources.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GcsSources message. - * @function verify - * @memberof google.cloud.dialogflow.v2.GcsSources - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GcsSources.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uris != null && message.hasOwnProperty("uris")) { - if (!Array.isArray(message.uris)) - return "uris: array expected"; - for (var i = 0; i < message.uris.length; ++i) - if (!$util.isString(message.uris[i])) - return "uris: string[] expected"; - } - return null; - }; - - /** - * Creates a GcsSources message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2.GcsSources - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.GcsSources} GcsSources - */ - GcsSources.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.GcsSources) - return object; - var message = new $root.google.cloud.dialogflow.v2.GcsSources(); - if (object.uris) { - if (!Array.isArray(object.uris)) - throw TypeError(".google.cloud.dialogflow.v2.GcsSources.uris: array expected"); - message.uris = []; - for (var i = 0; i < object.uris.length; ++i) - message.uris[i] = String(object.uris[i]); - } - return message; - }; - - /** - * Creates a plain object from a GcsSources message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2.GcsSources - * @static - * @param {google.cloud.dialogflow.v2.GcsSources} message GcsSources - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GcsSources.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uris = []; - if (message.uris && message.uris.length) { - object.uris = []; - for (var j = 0; j < message.uris.length; ++j) - object.uris[j] = message.uris[j]; - } - return object; - }; + HumanAgentAssistantConfig.SuggestionConfig = (function() { - /** - * Converts this GcsSources to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2.GcsSources - * @instance - * @returns {Object.} JSON object - */ - GcsSources.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Properties of a SuggestionConfig. + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig + * @interface ISuggestionConfig + * @property {Array.|null} [featureConfigs] SuggestionConfig featureConfigs + * @property {boolean|null} [groupSuggestionResponses] SuggestionConfig groupSuggestionResponses + */ - /** - * Gets the default type url for GcsSources - * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.GcsSources - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GcsSources.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + /** + * Constructs a new SuggestionConfig. + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig + * @classdesc Represents a SuggestionConfig. + * @implements ISuggestionConfig + * @constructor + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionConfig=} [properties] Properties to set + */ + function SuggestionConfig(properties) { + this.featureConfigs = []; + 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]]; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.GcsSources"; - }; - - return GcsSources; - })(); - - v2.GcsDestination = (function() { - - /** - * Properties of a GcsDestination. - * @memberof google.cloud.dialogflow.v2 - * @interface IGcsDestination - * @property {string|null} [uri] GcsDestination uri - */ - /** - * Constructs a new GcsDestination. - * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a GcsDestination. - * @implements IGcsDestination - * @constructor - * @param {google.cloud.dialogflow.v2.IGcsDestination=} [properties] Properties to set - */ - function GcsDestination(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]]; - } + /** + * SuggestionConfig featureConfigs. + * @member {Array.} featureConfigs + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig + * @instance + */ + SuggestionConfig.prototype.featureConfigs = $util.emptyArray; - /** - * GcsDestination uri. - * @member {string} uri - * @memberof google.cloud.dialogflow.v2.GcsDestination - * @instance - */ - GcsDestination.prototype.uri = ""; + /** + * SuggestionConfig groupSuggestionResponses. + * @member {boolean} groupSuggestionResponses + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig + * @instance + */ + SuggestionConfig.prototype.groupSuggestionResponses = false; - /** - * Creates a new GcsDestination instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2.GcsDestination - * @static - * @param {google.cloud.dialogflow.v2.IGcsDestination=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.GcsDestination} GcsDestination instance - */ - GcsDestination.create = function create(properties) { - return new GcsDestination(properties); - }; + /** + * Creates a new SuggestionConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig} SuggestionConfig instance + */ + SuggestionConfig.create = function create(properties) { + return new SuggestionConfig(properties); + }; - /** - * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.dialogflow.v2.GcsDestination.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2.GcsDestination - * @static - * @param {google.cloud.dialogflow.v2.IGcsDestination} message GcsDestination message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcsDestination.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); - return writer; - }; + /** + * Encodes the specified SuggestionConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionConfig} message SuggestionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SuggestionConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.featureConfigs != null && message.featureConfigs.length) + for (var i = 0; i < message.featureConfigs.length; ++i) + $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.encode(message.featureConfigs[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.groupSuggestionResponses != null && Object.hasOwnProperty.call(message, "groupSuggestionResponses")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.groupSuggestionResponses); + return writer; + }; - /** - * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.GcsDestination.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.GcsDestination - * @static - * @param {google.cloud.dialogflow.v2.IGcsDestination} message GcsDestination message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcsDestination.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified SuggestionConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionConfig} message SuggestionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SuggestionConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a GcsDestination message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2.GcsDestination - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.GcsDestination} GcsDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcsDestination.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.GcsDestination(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.uri = reader.string(); + /** + * Decodes a SuggestionConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig} SuggestionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SuggestionConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.featureConfigs && message.featureConfigs.length)) + message.featureConfigs = []; + message.featureConfigs.push($root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.decode(reader, reader.uint32())); + break; + } + case 3: { + message.groupSuggestionResponses = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a GcsDestination message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.GcsDestination - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.GcsDestination} GcsDestination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcsDestination.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a SuggestionConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig} SuggestionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SuggestionConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a GcsDestination message. - * @function verify - * @memberof google.cloud.dialogflow.v2.GcsDestination - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GcsDestination.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - return null; - }; + /** + * Verifies a SuggestionConfig message. + * @function verify + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SuggestionConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.featureConfigs != null && message.hasOwnProperty("featureConfigs")) { + if (!Array.isArray(message.featureConfigs)) + return "featureConfigs: array expected"; + for (var i = 0; i < message.featureConfigs.length; ++i) { + var error = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.verify(message.featureConfigs[i]); + if (error) + return "featureConfigs." + error; + } + } + if (message.groupSuggestionResponses != null && message.hasOwnProperty("groupSuggestionResponses")) + if (typeof message.groupSuggestionResponses !== "boolean") + return "groupSuggestionResponses: boolean expected"; + return null; + }; - /** - * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2.GcsDestination - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.GcsDestination} GcsDestination - */ - GcsDestination.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.GcsDestination) + /** + * Creates a SuggestionConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig} SuggestionConfig + */ + SuggestionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig) + return object; + var message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig(); + if (object.featureConfigs) { + if (!Array.isArray(object.featureConfigs)) + throw TypeError(".google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.featureConfigs: array expected"); + message.featureConfigs = []; + for (var i = 0; i < object.featureConfigs.length; ++i) { + if (typeof object.featureConfigs[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.featureConfigs: object expected"); + message.featureConfigs[i] = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.fromObject(object.featureConfigs[i]); + } + } + if (object.groupSuggestionResponses != null) + message.groupSuggestionResponses = Boolean(object.groupSuggestionResponses); + return message; + }; + + /** + * Creates a plain object from a SuggestionConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig} message SuggestionConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SuggestionConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.featureConfigs = []; + if (options.defaults) + object.groupSuggestionResponses = false; + if (message.featureConfigs && message.featureConfigs.length) { + object.featureConfigs = []; + for (var j = 0; j < message.featureConfigs.length; ++j) + object.featureConfigs[j] = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.toObject(message.featureConfigs[j], options); + } + if (message.groupSuggestionResponses != null && message.hasOwnProperty("groupSuggestionResponses")) + object.groupSuggestionResponses = message.groupSuggestionResponses; return object; - var message = new $root.google.cloud.dialogflow.v2.GcsDestination(); - if (object.uri != null) - message.uri = String(object.uri); - return message; - }; + }; - /** - * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2.GcsDestination - * @static - * @param {google.cloud.dialogflow.v2.GcsDestination} message GcsDestination - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GcsDestination.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.uri = ""; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - return object; - }; + /** + * Converts this SuggestionConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig + * @instance + * @returns {Object.} JSON object + */ + SuggestionConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this GcsDestination to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2.GcsDestination - * @instance - * @returns {Object.} JSON object - */ - GcsDestination.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for SuggestionConfig + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SuggestionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig"; + }; - /** - * Gets the default type url for GcsDestination - * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.GcsDestination - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GcsDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.GcsDestination"; - }; + return SuggestionConfig; + })(); - return GcsDestination; - })(); + HumanAgentAssistantConfig.SuggestionQueryConfig = (function() { - v2.ConversationEvent = (function() { + /** + * Properties of a SuggestionQueryConfig. + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig + * @interface ISuggestionQueryConfig + * @property {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource|null} [knowledgeBaseQuerySource] SuggestionQueryConfig knowledgeBaseQuerySource + * @property {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource|null} [documentQuerySource] SuggestionQueryConfig documentQuerySource + * @property {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource|null} [dialogflowQuerySource] SuggestionQueryConfig dialogflowQuerySource + * @property {number|null} [maxResults] SuggestionQueryConfig maxResults + * @property {number|null} [confidenceThreshold] SuggestionQueryConfig confidenceThreshold + * @property {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings|null} [contextFilterSettings] SuggestionQueryConfig contextFilterSettings + */ - /** - * Properties of a ConversationEvent. - * @memberof google.cloud.dialogflow.v2 - * @interface IConversationEvent - * @property {string|null} [conversation] ConversationEvent conversation - * @property {google.cloud.dialogflow.v2.ConversationEvent.Type|null} [type] ConversationEvent type - * @property {google.rpc.IStatus|null} [errorStatus] ConversationEvent errorStatus - * @property {google.cloud.dialogflow.v2.IMessage|null} [newMessagePayload] ConversationEvent newMessagePayload - */ + /** + * Constructs a new SuggestionQueryConfig. + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig + * @classdesc Represents a SuggestionQueryConfig. + * @implements ISuggestionQueryConfig + * @constructor + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionQueryConfig=} [properties] Properties to set + */ + function SuggestionQueryConfig(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]]; + } - /** - * Constructs a new ConversationEvent. - * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a ConversationEvent. - * @implements IConversationEvent - * @constructor - * @param {google.cloud.dialogflow.v2.IConversationEvent=} [properties] Properties to set - */ - function ConversationEvent(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]]; - } + /** + * SuggestionQueryConfig knowledgeBaseQuerySource. + * @member {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource|null|undefined} knowledgeBaseQuerySource + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + * @instance + */ + SuggestionQueryConfig.prototype.knowledgeBaseQuerySource = null; - /** - * ConversationEvent conversation. - * @member {string} conversation - * @memberof google.cloud.dialogflow.v2.ConversationEvent - * @instance - */ - ConversationEvent.prototype.conversation = ""; + /** + * SuggestionQueryConfig documentQuerySource. + * @member {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource|null|undefined} documentQuerySource + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + * @instance + */ + SuggestionQueryConfig.prototype.documentQuerySource = null; - /** - * ConversationEvent type. - * @member {google.cloud.dialogflow.v2.ConversationEvent.Type} type - * @memberof google.cloud.dialogflow.v2.ConversationEvent - * @instance - */ - ConversationEvent.prototype.type = 0; + /** + * SuggestionQueryConfig dialogflowQuerySource. + * @member {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource|null|undefined} dialogflowQuerySource + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + * @instance + */ + SuggestionQueryConfig.prototype.dialogflowQuerySource = null; - /** - * ConversationEvent errorStatus. - * @member {google.rpc.IStatus|null|undefined} errorStatus - * @memberof google.cloud.dialogflow.v2.ConversationEvent - * @instance - */ - ConversationEvent.prototype.errorStatus = null; + /** + * SuggestionQueryConfig maxResults. + * @member {number} maxResults + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + * @instance + */ + SuggestionQueryConfig.prototype.maxResults = 0; - /** - * ConversationEvent newMessagePayload. - * @member {google.cloud.dialogflow.v2.IMessage|null|undefined} newMessagePayload - * @memberof google.cloud.dialogflow.v2.ConversationEvent - * @instance - */ - ConversationEvent.prototype.newMessagePayload = null; + /** + * SuggestionQueryConfig confidenceThreshold. + * @member {number} confidenceThreshold + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + * @instance + */ + SuggestionQueryConfig.prototype.confidenceThreshold = 0; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * SuggestionQueryConfig contextFilterSettings. + * @member {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings|null|undefined} contextFilterSettings + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + * @instance + */ + SuggestionQueryConfig.prototype.contextFilterSettings = null; - /** - * ConversationEvent payload. - * @member {"newMessagePayload"|undefined} payload - * @memberof google.cloud.dialogflow.v2.ConversationEvent - * @instance - */ - Object.defineProperty(ConversationEvent.prototype, "payload", { - get: $util.oneOfGetter($oneOfFields = ["newMessagePayload"]), - set: $util.oneOfSetter($oneOfFields) - }); + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Creates a new ConversationEvent instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2.ConversationEvent - * @static - * @param {google.cloud.dialogflow.v2.IConversationEvent=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.ConversationEvent} ConversationEvent instance - */ - ConversationEvent.create = function create(properties) { - return new ConversationEvent(properties); - }; + /** + * SuggestionQueryConfig querySource. + * @member {"knowledgeBaseQuerySource"|"documentQuerySource"|"dialogflowQuerySource"|undefined} querySource + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + * @instance + */ + Object.defineProperty(SuggestionQueryConfig.prototype, "querySource", { + get: $util.oneOfGetter($oneOfFields = ["knowledgeBaseQuerySource", "documentQuerySource", "dialogflowQuerySource"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Encodes the specified ConversationEvent message. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationEvent.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2.ConversationEvent - * @static - * @param {google.cloud.dialogflow.v2.IConversationEvent} message ConversationEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConversationEvent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.conversation != null && Object.hasOwnProperty.call(message, "conversation")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversation); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - if (message.errorStatus != null && Object.hasOwnProperty.call(message, "errorStatus")) - $root.google.rpc.Status.encode(message.errorStatus, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.newMessagePayload != null && Object.hasOwnProperty.call(message, "newMessagePayload")) - $root.google.cloud.dialogflow.v2.Message.encode(message.newMessagePayload, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; + /** + * Creates a new SuggestionQueryConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionQueryConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig} SuggestionQueryConfig instance + */ + SuggestionQueryConfig.create = function create(properties) { + return new SuggestionQueryConfig(properties); + }; - /** - * Encodes the specified ConversationEvent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationEvent.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.ConversationEvent - * @static - * @param {google.cloud.dialogflow.v2.IConversationEvent} message ConversationEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConversationEvent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified SuggestionQueryConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionQueryConfig} message SuggestionQueryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SuggestionQueryConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.knowledgeBaseQuerySource != null && Object.hasOwnProperty.call(message, "knowledgeBaseQuerySource")) + $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.encode(message.knowledgeBaseQuerySource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.documentQuerySource != null && Object.hasOwnProperty.call(message, "documentQuerySource")) + $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.encode(message.documentQuerySource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.dialogflowQuerySource != null && Object.hasOwnProperty.call(message, "dialogflowQuerySource")) + $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.encode(message.dialogflowQuerySource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.maxResults != null && Object.hasOwnProperty.call(message, "maxResults")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.maxResults); + if (message.confidenceThreshold != null && Object.hasOwnProperty.call(message, "confidenceThreshold")) + writer.uint32(/* id 5, wireType 5 =*/45).float(message.confidenceThreshold); + if (message.contextFilterSettings != null && Object.hasOwnProperty.call(message, "contextFilterSettings")) + $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.encode(message.contextFilterSettings, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; - /** - * Decodes a ConversationEvent message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2.ConversationEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.ConversationEvent} ConversationEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConversationEvent.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ConversationEvent(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.conversation = reader.string(); - break; - } - case 2: { - message.type = reader.int32(); - break; - } - case 3: { - message.errorStatus = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - case 4: { - message.newMessagePayload = $root.google.cloud.dialogflow.v2.Message.decode(reader, reader.uint32()); + /** + * Encodes the specified SuggestionQueryConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionQueryConfig} message SuggestionQueryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SuggestionQueryConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SuggestionQueryConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig} SuggestionQueryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SuggestionQueryConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.knowledgeBaseQuerySource = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.decode(reader, reader.uint32()); + break; + } + case 2: { + message.documentQuerySource = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.decode(reader, reader.uint32()); + break; + } + case 3: { + message.dialogflowQuerySource = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.decode(reader, reader.uint32()); + break; + } + case 4: { + message.maxResults = reader.int32(); + break; + } + case 5: { + message.confidenceThreshold = reader.float(); + break; + } + case 7: { + message.contextFilterSettings = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a ConversationEvent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.ConversationEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.ConversationEvent} ConversationEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConversationEvent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a SuggestionQueryConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig} SuggestionQueryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SuggestionQueryConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a ConversationEvent message. - * @function verify - * @memberof google.cloud.dialogflow.v2.ConversationEvent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConversationEvent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.conversation != null && message.hasOwnProperty("conversation")) - if (!$util.isString(message.conversation)) - return "conversation: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 5: - case 4: - break; + /** + * Verifies a SuggestionQueryConfig message. + * @function verify + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SuggestionQueryConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.knowledgeBaseQuerySource != null && message.hasOwnProperty("knowledgeBaseQuerySource")) { + properties.querySource = 1; + { + var error = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.verify(message.knowledgeBaseQuerySource); + if (error) + return "knowledgeBaseQuerySource." + error; + } } - if (message.errorStatus != null && message.hasOwnProperty("errorStatus")) { - var error = $root.google.rpc.Status.verify(message.errorStatus); - if (error) - return "errorStatus." + error; - } - if (message.newMessagePayload != null && message.hasOwnProperty("newMessagePayload")) { - properties.payload = 1; - { - var error = $root.google.cloud.dialogflow.v2.Message.verify(message.newMessagePayload); + if (message.documentQuerySource != null && message.hasOwnProperty("documentQuerySource")) { + if (properties.querySource === 1) + return "querySource: multiple values"; + properties.querySource = 1; + { + var error = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.verify(message.documentQuerySource); + if (error) + return "documentQuerySource." + error; + } + } + if (message.dialogflowQuerySource != null && message.hasOwnProperty("dialogflowQuerySource")) { + if (properties.querySource === 1) + return "querySource: multiple values"; + properties.querySource = 1; + { + var error = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.verify(message.dialogflowQuerySource); + if (error) + return "dialogflowQuerySource." + error; + } + } + if (message.maxResults != null && message.hasOwnProperty("maxResults")) + if (!$util.isInteger(message.maxResults)) + return "maxResults: integer expected"; + if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) + if (typeof message.confidenceThreshold !== "number") + return "confidenceThreshold: number expected"; + if (message.contextFilterSettings != null && message.hasOwnProperty("contextFilterSettings")) { + var error = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.verify(message.contextFilterSettings); if (error) - return "newMessagePayload." + error; + return "contextFilterSettings." + error; } - } - return null; - }; + return null; + }; - /** - * Creates a ConversationEvent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2.ConversationEvent - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.ConversationEvent} ConversationEvent - */ - ConversationEvent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.ConversationEvent) - return object; - var message = new $root.google.cloud.dialogflow.v2.ConversationEvent(); - if (object.conversation != null) - message.conversation = String(object.conversation); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; + /** + * Creates a SuggestionQueryConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig} SuggestionQueryConfig + */ + SuggestionQueryConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig) + return object; + var message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig(); + if (object.knowledgeBaseQuerySource != null) { + if (typeof object.knowledgeBaseQuerySource !== "object") + throw TypeError(".google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.knowledgeBaseQuerySource: object expected"); + message.knowledgeBaseQuerySource = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.fromObject(object.knowledgeBaseQuerySource); } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "CONVERSATION_STARTED": - case 1: - message.type = 1; - break; - case "CONVERSATION_FINISHED": - case 2: - message.type = 2; - break; - case "HUMAN_INTERVENTION_NEEDED": - case 3: - message.type = 3; - break; - case "NEW_MESSAGE": - case 5: - message.type = 5; - break; - case "UNRECOVERABLE_ERROR": - case 4: - message.type = 4; - break; - } - if (object.errorStatus != null) { - if (typeof object.errorStatus !== "object") - throw TypeError(".google.cloud.dialogflow.v2.ConversationEvent.errorStatus: object expected"); - message.errorStatus = $root.google.rpc.Status.fromObject(object.errorStatus); - } - if (object.newMessagePayload != null) { - if (typeof object.newMessagePayload !== "object") - throw TypeError(".google.cloud.dialogflow.v2.ConversationEvent.newMessagePayload: object expected"); - message.newMessagePayload = $root.google.cloud.dialogflow.v2.Message.fromObject(object.newMessagePayload); - } - return message; - }; + if (object.documentQuerySource != null) { + if (typeof object.documentQuerySource !== "object") + throw TypeError(".google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.documentQuerySource: object expected"); + message.documentQuerySource = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.fromObject(object.documentQuerySource); + } + if (object.dialogflowQuerySource != null) { + if (typeof object.dialogflowQuerySource !== "object") + throw TypeError(".google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.dialogflowQuerySource: object expected"); + message.dialogflowQuerySource = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.fromObject(object.dialogflowQuerySource); + } + if (object.maxResults != null) + message.maxResults = object.maxResults | 0; + if (object.confidenceThreshold != null) + message.confidenceThreshold = Number(object.confidenceThreshold); + if (object.contextFilterSettings != null) { + if (typeof object.contextFilterSettings !== "object") + throw TypeError(".google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.contextFilterSettings: object expected"); + message.contextFilterSettings = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.fromObject(object.contextFilterSettings); + } + return message; + }; - /** - * Creates a plain object from a ConversationEvent message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2.ConversationEvent - * @static - * @param {google.cloud.dialogflow.v2.ConversationEvent} message ConversationEvent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConversationEvent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.conversation = ""; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.errorStatus = null; - } - if (message.conversation != null && message.hasOwnProperty("conversation")) - object.conversation = message.conversation; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dialogflow.v2.ConversationEvent.Type[message.type] === undefined ? message.type : $root.google.cloud.dialogflow.v2.ConversationEvent.Type[message.type] : message.type; - if (message.errorStatus != null && message.hasOwnProperty("errorStatus")) - object.errorStatus = $root.google.rpc.Status.toObject(message.errorStatus, options); - if (message.newMessagePayload != null && message.hasOwnProperty("newMessagePayload")) { - object.newMessagePayload = $root.google.cloud.dialogflow.v2.Message.toObject(message.newMessagePayload, options); - if (options.oneofs) - object.payload = "newMessagePayload"; - } - return object; - }; + /** + * Creates a plain object from a SuggestionQueryConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig} message SuggestionQueryConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SuggestionQueryConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.maxResults = 0; + object.confidenceThreshold = 0; + object.contextFilterSettings = null; + } + if (message.knowledgeBaseQuerySource != null && message.hasOwnProperty("knowledgeBaseQuerySource")) { + object.knowledgeBaseQuerySource = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.toObject(message.knowledgeBaseQuerySource, options); + if (options.oneofs) + object.querySource = "knowledgeBaseQuerySource"; + } + if (message.documentQuerySource != null && message.hasOwnProperty("documentQuerySource")) { + object.documentQuerySource = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.toObject(message.documentQuerySource, options); + if (options.oneofs) + object.querySource = "documentQuerySource"; + } + if (message.dialogflowQuerySource != null && message.hasOwnProperty("dialogflowQuerySource")) { + object.dialogflowQuerySource = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.toObject(message.dialogflowQuerySource, options); + if (options.oneofs) + object.querySource = "dialogflowQuerySource"; + } + if (message.maxResults != null && message.hasOwnProperty("maxResults")) + object.maxResults = message.maxResults; + if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) + object.confidenceThreshold = options.json && !isFinite(message.confidenceThreshold) ? String(message.confidenceThreshold) : message.confidenceThreshold; + if (message.contextFilterSettings != null && message.hasOwnProperty("contextFilterSettings")) + object.contextFilterSettings = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.toObject(message.contextFilterSettings, options); + return object; + }; - /** - * Converts this ConversationEvent to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2.ConversationEvent - * @instance - * @returns {Object.} JSON object - */ - ConversationEvent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this SuggestionQueryConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + * @instance + * @returns {Object.} JSON object + */ + SuggestionQueryConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for ConversationEvent - * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.ConversationEvent - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConversationEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.ConversationEvent"; - }; + /** + * Gets the default type url for SuggestionQueryConfig + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SuggestionQueryConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig"; + }; - /** - * Type enum. - * @name google.cloud.dialogflow.v2.ConversationEvent.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} CONVERSATION_STARTED=1 CONVERSATION_STARTED value - * @property {number} CONVERSATION_FINISHED=2 CONVERSATION_FINISHED value - * @property {number} HUMAN_INTERVENTION_NEEDED=3 HUMAN_INTERVENTION_NEEDED value - * @property {number} NEW_MESSAGE=5 NEW_MESSAGE value - * @property {number} UNRECOVERABLE_ERROR=4 UNRECOVERABLE_ERROR value - */ - ConversationEvent.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CONVERSATION_STARTED"] = 1; - values[valuesById[2] = "CONVERSATION_FINISHED"] = 2; - values[valuesById[3] = "HUMAN_INTERVENTION_NEEDED"] = 3; - values[valuesById[5] = "NEW_MESSAGE"] = 5; - values[valuesById[4] = "UNRECOVERABLE_ERROR"] = 4; - return values; - })(); + SuggestionQueryConfig.KnowledgeBaseQuerySource = (function() { - return ConversationEvent; - })(); + /** + * Properties of a KnowledgeBaseQuerySource. + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + * @interface IKnowledgeBaseQuerySource + * @property {Array.|null} [knowledgeBases] KnowledgeBaseQuerySource knowledgeBases + */ - v2.ConversationModels = (function() { + /** + * Constructs a new KnowledgeBaseQuerySource. + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + * @classdesc Represents a KnowledgeBaseQuerySource. + * @implements IKnowledgeBaseQuerySource + * @constructor + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource=} [properties] Properties to set + */ + function KnowledgeBaseQuerySource(properties) { + this.knowledgeBases = []; + 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]]; + } - /** - * Constructs a new ConversationModels service. - * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a ConversationModels - * @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 ConversationModels(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } + /** + * KnowledgeBaseQuerySource knowledgeBases. + * @member {Array.} knowledgeBases + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource + * @instance + */ + KnowledgeBaseQuerySource.prototype.knowledgeBases = $util.emptyArray; - (ConversationModels.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ConversationModels; + /** + * Creates a new KnowledgeBaseQuerySource instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource} KnowledgeBaseQuerySource instance + */ + KnowledgeBaseQuerySource.create = function create(properties) { + return new KnowledgeBaseQuerySource(properties); + }; - /** - * Creates new ConversationModels service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.v2.ConversationModels - * @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 {ConversationModels} RPC service. Useful where requests and/or responses are streamed. - */ - ConversationModels.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + /** + * Encodes the specified KnowledgeBaseQuerySource message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource} message KnowledgeBaseQuerySource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KnowledgeBaseQuerySource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.knowledgeBases != null && message.knowledgeBases.length) + for (var i = 0; i < message.knowledgeBases.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.knowledgeBases[i]); + return writer; + }; - /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|createConversationModel}. - * @memberof google.cloud.dialogflow.v2.ConversationModels - * @typedef CreateConversationModelCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ + /** + * Encodes the specified KnowledgeBaseQuerySource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource} message KnowledgeBaseQuerySource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KnowledgeBaseQuerySource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Calls CreateConversationModel. - * @function createConversationModel - * @memberof google.cloud.dialogflow.v2.ConversationModels - * @instance - * @param {google.cloud.dialogflow.v2.ICreateConversationModelRequest} request CreateConversationModelRequest message or plain object - * @param {google.cloud.dialogflow.v2.ConversationModels.CreateConversationModelCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConversationModels.prototype.createConversationModel = function createConversationModel(request, callback) { - return this.rpcCall(createConversationModel, $root.google.cloud.dialogflow.v2.CreateConversationModelRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateConversationModel" }); + /** + * Decodes a KnowledgeBaseQuerySource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource} KnowledgeBaseQuerySource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KnowledgeBaseQuerySource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.knowledgeBases && message.knowledgeBases.length)) + message.knowledgeBases = []; + message.knowledgeBases.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Calls CreateConversationModel. - * @function createConversationModel - * @memberof google.cloud.dialogflow.v2.ConversationModels - * @instance - * @param {google.cloud.dialogflow.v2.ICreateConversationModelRequest} request CreateConversationModelRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Decodes a KnowledgeBaseQuerySource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource} KnowledgeBaseQuerySource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KnowledgeBaseQuerySource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|getConversationModel}. - * @memberof google.cloud.dialogflow.v2.ConversationModels - * @typedef GetConversationModelCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2.ConversationModel} [response] ConversationModel - */ + /** + * Verifies a KnowledgeBaseQuerySource message. + * @function verify + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KnowledgeBaseQuerySource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.knowledgeBases != null && message.hasOwnProperty("knowledgeBases")) { + if (!Array.isArray(message.knowledgeBases)) + return "knowledgeBases: array expected"; + for (var i = 0; i < message.knowledgeBases.length; ++i) + if (!$util.isString(message.knowledgeBases[i])) + return "knowledgeBases: string[] expected"; + } + return null; + }; - /** - * Calls GetConversationModel. - * @function getConversationModel - * @memberof google.cloud.dialogflow.v2.ConversationModels - * @instance - * @param {google.cloud.dialogflow.v2.IGetConversationModelRequest} request GetConversationModelRequest message or plain object - * @param {google.cloud.dialogflow.v2.ConversationModels.GetConversationModelCallback} callback Node-style callback called with the error, if any, and ConversationModel - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConversationModels.prototype.getConversationModel = function getConversationModel(request, callback) { - return this.rpcCall(getConversationModel, $root.google.cloud.dialogflow.v2.GetConversationModelRequest, $root.google.cloud.dialogflow.v2.ConversationModel, request, callback); - }, "name", { value: "GetConversationModel" }); + /** + * Creates a KnowledgeBaseQuerySource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource} KnowledgeBaseQuerySource + */ + KnowledgeBaseQuerySource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource) + return object; + var message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource(); + if (object.knowledgeBases) { + if (!Array.isArray(object.knowledgeBases)) + throw TypeError(".google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.knowledgeBases: array expected"); + message.knowledgeBases = []; + for (var i = 0; i < object.knowledgeBases.length; ++i) + message.knowledgeBases[i] = String(object.knowledgeBases[i]); + } + return message; + }; - /** - * Calls GetConversationModel. - * @function getConversationModel - * @memberof google.cloud.dialogflow.v2.ConversationModels - * @instance - * @param {google.cloud.dialogflow.v2.IGetConversationModelRequest} request GetConversationModelRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Creates a plain object from a KnowledgeBaseQuerySource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource} message KnowledgeBaseQuerySource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KnowledgeBaseQuerySource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.knowledgeBases = []; + if (message.knowledgeBases && message.knowledgeBases.length) { + object.knowledgeBases = []; + for (var j = 0; j < message.knowledgeBases.length; ++j) + object.knowledgeBases[j] = message.knowledgeBases[j]; + } + return object; + }; - /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|listConversationModels}. - * @memberof google.cloud.dialogflow.v2.ConversationModels - * @typedef ListConversationModelsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2.ListConversationModelsResponse} [response] ListConversationModelsResponse - */ + /** + * Converts this KnowledgeBaseQuerySource to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource + * @instance + * @returns {Object.} JSON object + */ + KnowledgeBaseQuerySource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Calls ListConversationModels. - * @function listConversationModels - * @memberof google.cloud.dialogflow.v2.ConversationModels - * @instance - * @param {google.cloud.dialogflow.v2.IListConversationModelsRequest} request ListConversationModelsRequest message or plain object - * @param {google.cloud.dialogflow.v2.ConversationModels.ListConversationModelsCallback} callback Node-style callback called with the error, if any, and ListConversationModelsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConversationModels.prototype.listConversationModels = function listConversationModels(request, callback) { - return this.rpcCall(listConversationModels, $root.google.cloud.dialogflow.v2.ListConversationModelsRequest, $root.google.cloud.dialogflow.v2.ListConversationModelsResponse, request, callback); - }, "name", { value: "ListConversationModels" }); + /** + * Gets the default type url for KnowledgeBaseQuerySource + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KnowledgeBaseQuerySource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource"; + }; - /** - * Calls ListConversationModels. - * @function listConversationModels - * @memberof google.cloud.dialogflow.v2.ConversationModels - * @instance - * @param {google.cloud.dialogflow.v2.IListConversationModelsRequest} request ListConversationModelsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + return KnowledgeBaseQuerySource; + })(); - /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|deleteConversationModel}. - * @memberof google.cloud.dialogflow.v2.ConversationModels - * @typedef DeleteConversationModelCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ + SuggestionQueryConfig.DocumentQuerySource = (function() { - /** - * Calls DeleteConversationModel. - * @function deleteConversationModel - * @memberof google.cloud.dialogflow.v2.ConversationModels - * @instance - * @param {google.cloud.dialogflow.v2.IDeleteConversationModelRequest} request DeleteConversationModelRequest message or plain object - * @param {google.cloud.dialogflow.v2.ConversationModels.DeleteConversationModelCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConversationModels.prototype.deleteConversationModel = function deleteConversationModel(request, callback) { - return this.rpcCall(deleteConversationModel, $root.google.cloud.dialogflow.v2.DeleteConversationModelRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteConversationModel" }); + /** + * Properties of a DocumentQuerySource. + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + * @interface IDocumentQuerySource + * @property {Array.|null} [documents] DocumentQuerySource documents + */ - /** - * Calls DeleteConversationModel. - * @function deleteConversationModel - * @memberof google.cloud.dialogflow.v2.ConversationModels - * @instance - * @param {google.cloud.dialogflow.v2.IDeleteConversationModelRequest} request DeleteConversationModelRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Constructs a new DocumentQuerySource. + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + * @classdesc Represents a DocumentQuerySource. + * @implements IDocumentQuerySource + * @constructor + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource=} [properties] Properties to set + */ + function DocumentQuerySource(properties) { + this.documents = []; + 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]]; + } - /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|deployConversationModel}. - * @memberof google.cloud.dialogflow.v2.ConversationModels - * @typedef DeployConversationModelCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ + /** + * DocumentQuerySource documents. + * @member {Array.} documents + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource + * @instance + */ + DocumentQuerySource.prototype.documents = $util.emptyArray; - /** - * Calls DeployConversationModel. - * @function deployConversationModel - * @memberof google.cloud.dialogflow.v2.ConversationModels - * @instance - * @param {google.cloud.dialogflow.v2.IDeployConversationModelRequest} request DeployConversationModelRequest message or plain object - * @param {google.cloud.dialogflow.v2.ConversationModels.DeployConversationModelCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConversationModels.prototype.deployConversationModel = function deployConversationModel(request, callback) { - return this.rpcCall(deployConversationModel, $root.google.cloud.dialogflow.v2.DeployConversationModelRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeployConversationModel" }); + /** + * Creates a new DocumentQuerySource instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource} DocumentQuerySource instance + */ + DocumentQuerySource.create = function create(properties) { + return new DocumentQuerySource(properties); + }; - /** - * Calls DeployConversationModel. - * @function deployConversationModel - * @memberof google.cloud.dialogflow.v2.ConversationModels - * @instance - * @param {google.cloud.dialogflow.v2.IDeployConversationModelRequest} request DeployConversationModelRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Encodes the specified DocumentQuerySource message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource} message DocumentQuerySource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DocumentQuerySource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.documents != null && message.documents.length) + for (var i = 0; i < message.documents.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.documents[i]); + return writer; + }; - /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|undeployConversationModel}. - * @memberof google.cloud.dialogflow.v2.ConversationModels - * @typedef UndeployConversationModelCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ + /** + * Encodes the specified DocumentQuerySource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource} message DocumentQuerySource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DocumentQuerySource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Calls UndeployConversationModel. - * @function undeployConversationModel - * @memberof google.cloud.dialogflow.v2.ConversationModels - * @instance - * @param {google.cloud.dialogflow.v2.IUndeployConversationModelRequest} request UndeployConversationModelRequest message or plain object - * @param {google.cloud.dialogflow.v2.ConversationModels.UndeployConversationModelCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConversationModels.prototype.undeployConversationModel = function undeployConversationModel(request, callback) { - return this.rpcCall(undeployConversationModel, $root.google.cloud.dialogflow.v2.UndeployConversationModelRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UndeployConversationModel" }); + /** + * Decodes a DocumentQuerySource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource} DocumentQuerySource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DocumentQuerySource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.documents && message.documents.length)) + message.documents = []; + message.documents.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Calls UndeployConversationModel. - * @function undeployConversationModel - * @memberof google.cloud.dialogflow.v2.ConversationModels - * @instance - * @param {google.cloud.dialogflow.v2.IUndeployConversationModelRequest} request UndeployConversationModelRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Decodes a DocumentQuerySource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource} DocumentQuerySource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DocumentQuerySource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|getConversationModelEvaluation}. - * @memberof google.cloud.dialogflow.v2.ConversationModels - * @typedef GetConversationModelEvaluationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2.ConversationModelEvaluation} [response] ConversationModelEvaluation - */ + /** + * Verifies a DocumentQuerySource message. + * @function verify + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DocumentQuerySource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.documents != null && message.hasOwnProperty("documents")) { + if (!Array.isArray(message.documents)) + return "documents: array expected"; + for (var i = 0; i < message.documents.length; ++i) + if (!$util.isString(message.documents[i])) + return "documents: string[] expected"; + } + return null; + }; - /** - * Calls GetConversationModelEvaluation. - * @function getConversationModelEvaluation - * @memberof google.cloud.dialogflow.v2.ConversationModels - * @instance - * @param {google.cloud.dialogflow.v2.IGetConversationModelEvaluationRequest} request GetConversationModelEvaluationRequest message or plain object - * @param {google.cloud.dialogflow.v2.ConversationModels.GetConversationModelEvaluationCallback} callback Node-style callback called with the error, if any, and ConversationModelEvaluation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConversationModels.prototype.getConversationModelEvaluation = function getConversationModelEvaluation(request, callback) { - return this.rpcCall(getConversationModelEvaluation, $root.google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest, $root.google.cloud.dialogflow.v2.ConversationModelEvaluation, request, callback); - }, "name", { value: "GetConversationModelEvaluation" }); + /** + * Creates a DocumentQuerySource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource} DocumentQuerySource + */ + DocumentQuerySource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource) + return object; + var message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource(); + if (object.documents) { + if (!Array.isArray(object.documents)) + throw TypeError(".google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.documents: array expected"); + message.documents = []; + for (var i = 0; i < object.documents.length; ++i) + message.documents[i] = String(object.documents[i]); + } + return message; + }; - /** - * Calls GetConversationModelEvaluation. - * @function getConversationModelEvaluation - * @memberof google.cloud.dialogflow.v2.ConversationModels - * @instance - * @param {google.cloud.dialogflow.v2.IGetConversationModelEvaluationRequest} request GetConversationModelEvaluationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Creates a plain object from a DocumentQuerySource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource} message DocumentQuerySource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DocumentQuerySource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.documents = []; + if (message.documents && message.documents.length) { + object.documents = []; + for (var j = 0; j < message.documents.length; ++j) + object.documents[j] = message.documents[j]; + } + return object; + }; - /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|listConversationModelEvaluations}. - * @memberof google.cloud.dialogflow.v2.ConversationModels - * @typedef ListConversationModelEvaluationsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse} [response] ListConversationModelEvaluationsResponse - */ + /** + * Converts this DocumentQuerySource to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource + * @instance + * @returns {Object.} JSON object + */ + DocumentQuerySource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Calls ListConversationModelEvaluations. - * @function listConversationModelEvaluations - * @memberof google.cloud.dialogflow.v2.ConversationModels - * @instance - * @param {google.cloud.dialogflow.v2.IListConversationModelEvaluationsRequest} request ListConversationModelEvaluationsRequest message or plain object - * @param {google.cloud.dialogflow.v2.ConversationModels.ListConversationModelEvaluationsCallback} callback Node-style callback called with the error, if any, and ListConversationModelEvaluationsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConversationModels.prototype.listConversationModelEvaluations = function listConversationModelEvaluations(request, callback) { - return this.rpcCall(listConversationModelEvaluations, $root.google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest, $root.google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse, request, callback); - }, "name", { value: "ListConversationModelEvaluations" }); + /** + * Gets the default type url for DocumentQuerySource + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DocumentQuerySource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource"; + }; - /** - * Calls ListConversationModelEvaluations. - * @function listConversationModelEvaluations - * @memberof google.cloud.dialogflow.v2.ConversationModels - * @instance - * @param {google.cloud.dialogflow.v2.IListConversationModelEvaluationsRequest} request ListConversationModelEvaluationsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + return DocumentQuerySource; + })(); - /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|createConversationModelEvaluation}. - * @memberof google.cloud.dialogflow.v2.ConversationModels - * @typedef CreateConversationModelEvaluationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ + SuggestionQueryConfig.DialogflowQuerySource = (function() { - /** - * Calls CreateConversationModelEvaluation. - * @function createConversationModelEvaluation - * @memberof google.cloud.dialogflow.v2.ConversationModels - * @instance - * @param {google.cloud.dialogflow.v2.ICreateConversationModelEvaluationRequest} request CreateConversationModelEvaluationRequest message or plain object - * @param {google.cloud.dialogflow.v2.ConversationModels.CreateConversationModelEvaluationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConversationModels.prototype.createConversationModelEvaluation = function createConversationModelEvaluation(request, callback) { - return this.rpcCall(createConversationModelEvaluation, $root.google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateConversationModelEvaluation" }); + /** + * Properties of a DialogflowQuerySource. + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + * @interface IDialogflowQuerySource + * @property {string|null} [agent] DialogflowQuerySource agent + */ - /** - * Calls CreateConversationModelEvaluation. - * @function createConversationModelEvaluation - * @memberof google.cloud.dialogflow.v2.ConversationModels - * @instance - * @param {google.cloud.dialogflow.v2.ICreateConversationModelEvaluationRequest} request CreateConversationModelEvaluationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Constructs a new DialogflowQuerySource. + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + * @classdesc Represents a DialogflowQuerySource. + * @implements IDialogflowQuerySource + * @constructor + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource=} [properties] Properties to set + */ + function DialogflowQuerySource(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]]; + } - return ConversationModels; - })(); + /** + * DialogflowQuerySource agent. + * @member {string} agent + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource + * @instance + */ + DialogflowQuerySource.prototype.agent = ""; - v2.ConversationModel = (function() { + /** + * Creates a new DialogflowQuerySource instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource} DialogflowQuerySource instance + */ + DialogflowQuerySource.create = function create(properties) { + return new DialogflowQuerySource(properties); + }; - /** - * Properties of a ConversationModel. - * @memberof google.cloud.dialogflow.v2 - * @interface IConversationModel - * @property {string|null} [name] ConversationModel name - * @property {string|null} [displayName] ConversationModel displayName - * @property {google.protobuf.ITimestamp|null} [createTime] ConversationModel createTime - * @property {Array.|null} [datasets] ConversationModel datasets - * @property {google.cloud.dialogflow.v2.ConversationModel.State|null} [state] ConversationModel state - * @property {string|null} [languageCode] ConversationModel languageCode - * @property {google.cloud.dialogflow.v2.IArticleSuggestionModelMetadata|null} [articleSuggestionModelMetadata] ConversationModel articleSuggestionModelMetadata - * @property {google.cloud.dialogflow.v2.ISmartReplyModelMetadata|null} [smartReplyModelMetadata] ConversationModel smartReplyModelMetadata - */ + /** + * Encodes the specified DialogflowQuerySource message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource} message DialogflowQuerySource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DialogflowQuerySource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.agent != null && Object.hasOwnProperty.call(message, "agent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.agent); + return writer; + }; - /** - * Constructs a new ConversationModel. - * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a ConversationModel. - * @implements IConversationModel - * @constructor - * @param {google.cloud.dialogflow.v2.IConversationModel=} [properties] Properties to set - */ - function ConversationModel(properties) { - this.datasets = []; - 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]]; - } + /** + * Encodes the specified DialogflowQuerySource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource} message DialogflowQuerySource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DialogflowQuerySource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * ConversationModel name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2.ConversationModel - * @instance - */ - ConversationModel.prototype.name = ""; + /** + * Decodes a DialogflowQuerySource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource} DialogflowQuerySource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DialogflowQuerySource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.agent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * ConversationModel displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.v2.ConversationModel - * @instance - */ - ConversationModel.prototype.displayName = ""; + /** + * Decodes a DialogflowQuerySource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource} DialogflowQuerySource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DialogflowQuerySource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * ConversationModel createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dialogflow.v2.ConversationModel - * @instance - */ - ConversationModel.prototype.createTime = null; + /** + * Verifies a DialogflowQuerySource message. + * @function verify + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DialogflowQuerySource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.agent != null && message.hasOwnProperty("agent")) + if (!$util.isString(message.agent)) + return "agent: string expected"; + return null; + }; - /** - * ConversationModel datasets. - * @member {Array.} datasets - * @memberof google.cloud.dialogflow.v2.ConversationModel - * @instance - */ - ConversationModel.prototype.datasets = $util.emptyArray; + /** + * Creates a DialogflowQuerySource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource} DialogflowQuerySource + */ + DialogflowQuerySource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource) + return object; + var message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource(); + if (object.agent != null) + message.agent = String(object.agent); + return message; + }; - /** - * ConversationModel state. - * @member {google.cloud.dialogflow.v2.ConversationModel.State} state - * @memberof google.cloud.dialogflow.v2.ConversationModel - * @instance - */ - ConversationModel.prototype.state = 0; + /** + * Creates a plain object from a DialogflowQuerySource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource} message DialogflowQuerySource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DialogflowQuerySource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.agent = ""; + if (message.agent != null && message.hasOwnProperty("agent")) + object.agent = message.agent; + return object; + }; - /** - * ConversationModel languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.v2.ConversationModel - * @instance - */ - ConversationModel.prototype.languageCode = ""; + /** + * Converts this DialogflowQuerySource to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource + * @instance + * @returns {Object.} JSON object + */ + DialogflowQuerySource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * ConversationModel articleSuggestionModelMetadata. - * @member {google.cloud.dialogflow.v2.IArticleSuggestionModelMetadata|null|undefined} articleSuggestionModelMetadata - * @memberof google.cloud.dialogflow.v2.ConversationModel - * @instance - */ - ConversationModel.prototype.articleSuggestionModelMetadata = null; + /** + * Gets the default type url for DialogflowQuerySource + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DialogflowQuerySource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource"; + }; - /** - * ConversationModel smartReplyModelMetadata. - * @member {google.cloud.dialogflow.v2.ISmartReplyModelMetadata|null|undefined} smartReplyModelMetadata - * @memberof google.cloud.dialogflow.v2.ConversationModel - * @instance - */ - ConversationModel.prototype.smartReplyModelMetadata = null; + return DialogflowQuerySource; + })(); - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + SuggestionQueryConfig.ContextFilterSettings = (function() { - /** - * ConversationModel modelMetadata. - * @member {"articleSuggestionModelMetadata"|"smartReplyModelMetadata"|undefined} modelMetadata - * @memberof google.cloud.dialogflow.v2.ConversationModel - * @instance - */ - Object.defineProperty(ConversationModel.prototype, "modelMetadata", { - get: $util.oneOfGetter($oneOfFields = ["articleSuggestionModelMetadata", "smartReplyModelMetadata"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Properties of a ContextFilterSettings. + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + * @interface IContextFilterSettings + * @property {boolean|null} [dropHandoffMessages] ContextFilterSettings dropHandoffMessages + * @property {boolean|null} [dropVirtualAgentMessages] ContextFilterSettings dropVirtualAgentMessages + * @property {boolean|null} [dropIvrMessages] ContextFilterSettings dropIvrMessages + */ - /** - * Creates a new ConversationModel instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2.ConversationModel - * @static - * @param {google.cloud.dialogflow.v2.IConversationModel=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.ConversationModel} ConversationModel instance - */ - ConversationModel.create = function create(properties) { - return new ConversationModel(properties); - }; + /** + * Constructs a new ContextFilterSettings. + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + * @classdesc Represents a ContextFilterSettings. + * @implements IContextFilterSettings + * @constructor + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings=} [properties] Properties to set + */ + function ContextFilterSettings(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]]; + } - /** - * Encodes the specified ConversationModel message. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationModel.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2.ConversationModel - * @static - * @param {google.cloud.dialogflow.v2.IConversationModel} message ConversationModel message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConversationModel.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.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.datasets != null && message.datasets.length) - for (var i = 0; i < message.datasets.length; ++i) - $root.google.cloud.dialogflow.v2.InputDataset.encode(message.datasets[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); - if (message.articleSuggestionModelMetadata != null && Object.hasOwnProperty.call(message, "articleSuggestionModelMetadata")) - $root.google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata.encode(message.articleSuggestionModelMetadata, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.smartReplyModelMetadata != null && Object.hasOwnProperty.call(message, "smartReplyModelMetadata")) - $root.google.cloud.dialogflow.v2.SmartReplyModelMetadata.encode(message.smartReplyModelMetadata, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 19, wireType 2 =*/154).string(message.languageCode); - return writer; - }; + /** + * ContextFilterSettings dropHandoffMessages. + * @member {boolean} dropHandoffMessages + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings + * @instance + */ + ContextFilterSettings.prototype.dropHandoffMessages = false; - /** - * Encodes the specified ConversationModel message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationModel.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.ConversationModel - * @static - * @param {google.cloud.dialogflow.v2.IConversationModel} message ConversationModel message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConversationModel.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * ContextFilterSettings dropVirtualAgentMessages. + * @member {boolean} dropVirtualAgentMessages + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings + * @instance + */ + ContextFilterSettings.prototype.dropVirtualAgentMessages = false; - /** - * Decodes a ConversationModel message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2.ConversationModel - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.ConversationModel} ConversationModel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConversationModel.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ConversationModel(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.displayName = reader.string(); - break; - } - case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.datasets && message.datasets.length)) - message.datasets = []; - message.datasets.push($root.google.cloud.dialogflow.v2.InputDataset.decode(reader, reader.uint32())); - break; - } - case 7: { - message.state = reader.int32(); - break; + /** + * ContextFilterSettings dropIvrMessages. + * @member {boolean} dropIvrMessages + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings + * @instance + */ + ContextFilterSettings.prototype.dropIvrMessages = false; + + /** + * Creates a new ContextFilterSettings instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings} ContextFilterSettings instance + */ + ContextFilterSettings.create = function create(properties) { + return new ContextFilterSettings(properties); + }; + + /** + * Encodes the specified ContextFilterSettings message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings} message ContextFilterSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContextFilterSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dropHandoffMessages != null && Object.hasOwnProperty.call(message, "dropHandoffMessages")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.dropHandoffMessages); + if (message.dropVirtualAgentMessages != null && Object.hasOwnProperty.call(message, "dropVirtualAgentMessages")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.dropVirtualAgentMessages); + if (message.dropIvrMessages != null && Object.hasOwnProperty.call(message, "dropIvrMessages")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.dropIvrMessages); + return writer; + }; + + /** + * Encodes the specified ContextFilterSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings} message ContextFilterSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContextFilterSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ContextFilterSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings} ContextFilterSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContextFilterSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dropHandoffMessages = reader.bool(); + break; + } + case 2: { + message.dropVirtualAgentMessages = reader.bool(); + break; + } + case 3: { + message.dropIvrMessages = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } } - case 19: { - message.languageCode = reader.string(); - break; + return message; + }; + + /** + * Decodes a ContextFilterSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings} ContextFilterSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContextFilterSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ContextFilterSettings message. + * @function verify + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContextFilterSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dropHandoffMessages != null && message.hasOwnProperty("dropHandoffMessages")) + if (typeof message.dropHandoffMessages !== "boolean") + return "dropHandoffMessages: boolean expected"; + if (message.dropVirtualAgentMessages != null && message.hasOwnProperty("dropVirtualAgentMessages")) + if (typeof message.dropVirtualAgentMessages !== "boolean") + return "dropVirtualAgentMessages: boolean expected"; + if (message.dropIvrMessages != null && message.hasOwnProperty("dropIvrMessages")) + if (typeof message.dropIvrMessages !== "boolean") + return "dropIvrMessages: boolean expected"; + return null; + }; + + /** + * Creates a ContextFilterSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings} ContextFilterSettings + */ + ContextFilterSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings) + return object; + var message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings(); + if (object.dropHandoffMessages != null) + message.dropHandoffMessages = Boolean(object.dropHandoffMessages); + if (object.dropVirtualAgentMessages != null) + message.dropVirtualAgentMessages = Boolean(object.dropVirtualAgentMessages); + if (object.dropIvrMessages != null) + message.dropIvrMessages = Boolean(object.dropIvrMessages); + return message; + }; + + /** + * Creates a plain object from a ContextFilterSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings} message ContextFilterSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContextFilterSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dropHandoffMessages = false; + object.dropVirtualAgentMessages = false; + object.dropIvrMessages = false; } - case 8: { - message.articleSuggestionModelMetadata = $root.google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata.decode(reader, reader.uint32()); - break; + if (message.dropHandoffMessages != null && message.hasOwnProperty("dropHandoffMessages")) + object.dropHandoffMessages = message.dropHandoffMessages; + if (message.dropVirtualAgentMessages != null && message.hasOwnProperty("dropVirtualAgentMessages")) + object.dropVirtualAgentMessages = message.dropVirtualAgentMessages; + if (message.dropIvrMessages != null && message.hasOwnProperty("dropIvrMessages")) + object.dropIvrMessages = message.dropIvrMessages; + return object; + }; + + /** + * Converts this ContextFilterSettings to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings + * @instance + * @returns {Object.} JSON object + */ + ContextFilterSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ContextFilterSettings + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ContextFilterSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - case 9: { - message.smartReplyModelMetadata = $root.google.cloud.dialogflow.v2.SmartReplyModelMetadata.decode(reader, reader.uint32()); + return typeUrlPrefix + "/google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings"; + }; + + return ContextFilterSettings; + })(); + + return SuggestionQueryConfig; + })(); + + HumanAgentAssistantConfig.ConversationModelConfig = (function() { + + /** + * Properties of a ConversationModelConfig. + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig + * @interface IConversationModelConfig + * @property {string|null} [model] ConversationModelConfig model + * @property {string|null} [baselineModelVersion] ConversationModelConfig baselineModelVersion + */ + + /** + * Constructs a new ConversationModelConfig. + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig + * @classdesc Represents a ConversationModelConfig. + * @implements IConversationModelConfig + * @constructor + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationModelConfig=} [properties] Properties to set + */ + function ConversationModelConfig(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]]; + } + + /** + * ConversationModelConfig model. + * @member {string} model + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig + * @instance + */ + ConversationModelConfig.prototype.model = ""; + + /** + * ConversationModelConfig baselineModelVersion. + * @member {string} baselineModelVersion + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig + * @instance + */ + ConversationModelConfig.prototype.baselineModelVersion = ""; + + /** + * Creates a new ConversationModelConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationModelConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig} ConversationModelConfig instance + */ + ConversationModelConfig.create = function create(properties) { + return new ConversationModelConfig(properties); + }; + + /** + * Encodes the specified ConversationModelConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationModelConfig} message ConversationModelConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationModelConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.model != null && Object.hasOwnProperty.call(message, "model")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.model); + if (message.baselineModelVersion != null && Object.hasOwnProperty.call(message, "baselineModelVersion")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.baselineModelVersion); + return writer; + }; + + /** + * Encodes the specified ConversationModelConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationModelConfig} message ConversationModelConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationModelConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConversationModelConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig} ConversationModelConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationModelConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.model = reader.string(); + break; + } + case 8: { + message.baselineModelVersion = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a ConversationModel message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.ConversationModel - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.ConversationModel} ConversationModel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConversationModel.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a ConversationModelConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig} ConversationModelConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationModelConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a ConversationModel message. - * @function verify - * @memberof google.cloud.dialogflow.v2.ConversationModel - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConversationModel.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - 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.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.datasets != null && message.hasOwnProperty("datasets")) { - if (!Array.isArray(message.datasets)) - return "datasets: array expected"; - for (var i = 0; i < message.datasets.length; ++i) { - var error = $root.google.cloud.dialogflow.v2.InputDataset.verify(message.datasets[i]); - if (error) - return "datasets." + error; - } - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - if (message.articleSuggestionModelMetadata != null && message.hasOwnProperty("articleSuggestionModelMetadata")) { - properties.modelMetadata = 1; - { - var error = $root.google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata.verify(message.articleSuggestionModelMetadata); - if (error) - return "articleSuggestionModelMetadata." + error; - } - } - if (message.smartReplyModelMetadata != null && message.hasOwnProperty("smartReplyModelMetadata")) { - if (properties.modelMetadata === 1) - return "modelMetadata: multiple values"; - properties.modelMetadata = 1; - { - var error = $root.google.cloud.dialogflow.v2.SmartReplyModelMetadata.verify(message.smartReplyModelMetadata); - if (error) - return "smartReplyModelMetadata." + error; - } - } - return null; - }; + /** + * Verifies a ConversationModelConfig message. + * @function verify + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConversationModelConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.model != null && message.hasOwnProperty("model")) + if (!$util.isString(message.model)) + return "model: string expected"; + if (message.baselineModelVersion != null && message.hasOwnProperty("baselineModelVersion")) + if (!$util.isString(message.baselineModelVersion)) + return "baselineModelVersion: string expected"; + return null; + }; - /** - * Creates a ConversationModel message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2.ConversationModel - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.ConversationModel} ConversationModel - */ - ConversationModel.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.ConversationModel) - return object; - var message = new $root.google.cloud.dialogflow.v2.ConversationModel(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dialogflow.v2.ConversationModel.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.datasets) { - if (!Array.isArray(object.datasets)) - throw TypeError(".google.cloud.dialogflow.v2.ConversationModel.datasets: array expected"); - message.datasets = []; - for (var i = 0; i < object.datasets.length; ++i) { - if (typeof object.datasets[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2.ConversationModel.datasets: object expected"); - message.datasets[i] = $root.google.cloud.dialogflow.v2.InputDataset.fromObject(object.datasets[i]); + /** + * Creates a ConversationModelConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig} ConversationModelConfig + */ + ConversationModelConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig) + return object; + var message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig(); + if (object.model != null) + message.model = String(object.model); + if (object.baselineModelVersion != null) + message.baselineModelVersion = String(object.baselineModelVersion); + return message; + }; + + /** + * Creates a plain object from a ConversationModelConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig} message ConversationModelConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConversationModelConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.model = ""; + object.baselineModelVersion = ""; } - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; + if (message.model != null && message.hasOwnProperty("model")) + object.model = message.model; + if (message.baselineModelVersion != null && message.hasOwnProperty("baselineModelVersion")) + object.baselineModelVersion = message.baselineModelVersion; + return object; + }; + + /** + * Converts this ConversationModelConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig + * @instance + * @returns {Object.} JSON object + */ + ConversationModelConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConversationModelConfig + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConversationModelConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "CREATING": - case 1: - message.state = 1; - break; - case "UNDEPLOYED": - case 2: - message.state = 2; - break; - case "DEPLOYING": - case 3: - message.state = 3; - break; - case "DEPLOYED": - case 4: - message.state = 4; - break; - case "UNDEPLOYING": - case 5: - message.state = 5; - break; - case "DELETING": - case 6: - message.state = 6; - break; - case "FAILED": - case 7: - message.state = 7; - break; - case "PENDING": - case 8: - message.state = 8; - break; - } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.articleSuggestionModelMetadata != null) { - if (typeof object.articleSuggestionModelMetadata !== "object") - throw TypeError(".google.cloud.dialogflow.v2.ConversationModel.articleSuggestionModelMetadata: object expected"); - message.articleSuggestionModelMetadata = $root.google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata.fromObject(object.articleSuggestionModelMetadata); - } - if (object.smartReplyModelMetadata != null) { - if (typeof object.smartReplyModelMetadata !== "object") - throw TypeError(".google.cloud.dialogflow.v2.ConversationModel.smartReplyModelMetadata: object expected"); - message.smartReplyModelMetadata = $root.google.cloud.dialogflow.v2.SmartReplyModelMetadata.fromObject(object.smartReplyModelMetadata); - } - return message; - }; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig"; + }; - /** - * Creates a plain object from a ConversationModel message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2.ConversationModel - * @static - * @param {google.cloud.dialogflow.v2.ConversationModel} message ConversationModel - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConversationModel.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.datasets = []; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.createTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.languageCode = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.datasets && message.datasets.length) { - object.datasets = []; - for (var j = 0; j < message.datasets.length; ++j) - object.datasets[j] = $root.google.cloud.dialogflow.v2.InputDataset.toObject(message.datasets[j], options); - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dialogflow.v2.ConversationModel.State[message.state] === undefined ? message.state : $root.google.cloud.dialogflow.v2.ConversationModel.State[message.state] : message.state; - if (message.articleSuggestionModelMetadata != null && message.hasOwnProperty("articleSuggestionModelMetadata")) { - object.articleSuggestionModelMetadata = $root.google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata.toObject(message.articleSuggestionModelMetadata, options); - if (options.oneofs) - object.modelMetadata = "articleSuggestionModelMetadata"; - } - if (message.smartReplyModelMetadata != null && message.hasOwnProperty("smartReplyModelMetadata")) { - object.smartReplyModelMetadata = $root.google.cloud.dialogflow.v2.SmartReplyModelMetadata.toObject(message.smartReplyModelMetadata, options); - if (options.oneofs) - object.modelMetadata = "smartReplyModelMetadata"; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - return object; - }; + return ConversationModelConfig; + })(); - /** - * Converts this ConversationModel to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2.ConversationModel - * @instance - * @returns {Object.} JSON object - */ - ConversationModel.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + HumanAgentAssistantConfig.ConversationProcessConfig = (function() { - /** - * Gets the default type url for ConversationModel - * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.ConversationModel - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConversationModel.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + /** + * Properties of a ConversationProcessConfig. + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig + * @interface IConversationProcessConfig + * @property {number|null} [recentSentencesCount] ConversationProcessConfig recentSentencesCount + */ + + /** + * Constructs a new ConversationProcessConfig. + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig + * @classdesc Represents a ConversationProcessConfig. + * @implements IConversationProcessConfig + * @constructor + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationProcessConfig=} [properties] Properties to set + */ + function ConversationProcessConfig(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]]; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.ConversationModel"; - }; - /** - * State enum. - * @name google.cloud.dialogflow.v2.ConversationModel.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} UNDEPLOYED=2 UNDEPLOYED value - * @property {number} DEPLOYING=3 DEPLOYING value - * @property {number} DEPLOYED=4 DEPLOYED value - * @property {number} UNDEPLOYING=5 UNDEPLOYING value - * @property {number} DELETING=6 DELETING value - * @property {number} FAILED=7 FAILED value - * @property {number} PENDING=8 PENDING value - */ - ConversationModel.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "UNDEPLOYED"] = 2; - values[valuesById[3] = "DEPLOYING"] = 3; - values[valuesById[4] = "DEPLOYED"] = 4; - values[valuesById[5] = "UNDEPLOYING"] = 5; - values[valuesById[6] = "DELETING"] = 6; - values[valuesById[7] = "FAILED"] = 7; - values[valuesById[8] = "PENDING"] = 8; - return values; - })(); + /** + * ConversationProcessConfig recentSentencesCount. + * @member {number} recentSentencesCount + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig + * @instance + */ + ConversationProcessConfig.prototype.recentSentencesCount = 0; - /** - * ModelType enum. - * @name google.cloud.dialogflow.v2.ConversationModel.ModelType - * @enum {number} - * @property {number} MODEL_TYPE_UNSPECIFIED=0 MODEL_TYPE_UNSPECIFIED value - * @property {number} SMART_REPLY_DUAL_ENCODER_MODEL=2 SMART_REPLY_DUAL_ENCODER_MODEL value - * @property {number} SMART_REPLY_BERT_MODEL=6 SMART_REPLY_BERT_MODEL value - */ - ConversationModel.ModelType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODEL_TYPE_UNSPECIFIED"] = 0; - values[valuesById[2] = "SMART_REPLY_DUAL_ENCODER_MODEL"] = 2; - values[valuesById[6] = "SMART_REPLY_BERT_MODEL"] = 6; - return values; - })(); + /** + * Creates a new ConversationProcessConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationProcessConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig} ConversationProcessConfig instance + */ + ConversationProcessConfig.create = function create(properties) { + return new ConversationProcessConfig(properties); + }; - return ConversationModel; - })(); + /** + * Encodes the specified ConversationProcessConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationProcessConfig} message ConversationProcessConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationProcessConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.recentSentencesCount != null && Object.hasOwnProperty.call(message, "recentSentencesCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.recentSentencesCount); + return writer; + }; - v2.ConversationModelEvaluation = (function() { + /** + * Encodes the specified ConversationProcessConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationProcessConfig} message ConversationProcessConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationProcessConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Properties of a ConversationModelEvaluation. - * @memberof google.cloud.dialogflow.v2 - * @interface IConversationModelEvaluation - * @property {string|null} [name] ConversationModelEvaluation name - * @property {string|null} [displayName] ConversationModelEvaluation displayName - * @property {google.cloud.dialogflow.v2.IEvaluationConfig|null} [evaluationConfig] ConversationModelEvaluation evaluationConfig - * @property {google.protobuf.ITimestamp|null} [createTime] ConversationModelEvaluation createTime - * @property {google.cloud.dialogflow.v2.ISmartReplyMetrics|null} [smartReplyMetrics] ConversationModelEvaluation smartReplyMetrics - * @property {string|null} [rawHumanEvalTemplateCsv] ConversationModelEvaluation rawHumanEvalTemplateCsv - */ + /** + * Decodes a ConversationProcessConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig} ConversationProcessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationProcessConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.recentSentencesCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Constructs a new ConversationModelEvaluation. - * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a ConversationModelEvaluation. - * @implements IConversationModelEvaluation - * @constructor - * @param {google.cloud.dialogflow.v2.IConversationModelEvaluation=} [properties] Properties to set - */ - function ConversationModelEvaluation(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]]; - } + /** + * Decodes a ConversationProcessConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig} ConversationProcessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationProcessConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * ConversationModelEvaluation name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2.ConversationModelEvaluation - * @instance - */ - ConversationModelEvaluation.prototype.name = ""; + /** + * Verifies a ConversationProcessConfig message. + * @function verify + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConversationProcessConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.recentSentencesCount != null && message.hasOwnProperty("recentSentencesCount")) + if (!$util.isInteger(message.recentSentencesCount)) + return "recentSentencesCount: integer expected"; + return null; + }; - /** - * ConversationModelEvaluation displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.v2.ConversationModelEvaluation - * @instance - */ - ConversationModelEvaluation.prototype.displayName = ""; + /** + * Creates a ConversationProcessConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig} ConversationProcessConfig + */ + ConversationProcessConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig) + return object; + var message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig(); + if (object.recentSentencesCount != null) + message.recentSentencesCount = object.recentSentencesCount | 0; + return message; + }; - /** - * ConversationModelEvaluation evaluationConfig. - * @member {google.cloud.dialogflow.v2.IEvaluationConfig|null|undefined} evaluationConfig - * @memberof google.cloud.dialogflow.v2.ConversationModelEvaluation - * @instance - */ - ConversationModelEvaluation.prototype.evaluationConfig = null; + /** + * Creates a plain object from a ConversationProcessConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig} message ConversationProcessConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConversationProcessConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.recentSentencesCount = 0; + if (message.recentSentencesCount != null && message.hasOwnProperty("recentSentencesCount")) + object.recentSentencesCount = message.recentSentencesCount; + return object; + }; - /** - * ConversationModelEvaluation createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dialogflow.v2.ConversationModelEvaluation - * @instance - */ - ConversationModelEvaluation.prototype.createTime = null; + /** + * Converts this ConversationProcessConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig + * @instance + * @returns {Object.} JSON object + */ + ConversationProcessConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * ConversationModelEvaluation smartReplyMetrics. - * @member {google.cloud.dialogflow.v2.ISmartReplyMetrics|null|undefined} smartReplyMetrics - * @memberof google.cloud.dialogflow.v2.ConversationModelEvaluation - * @instance - */ - ConversationModelEvaluation.prototype.smartReplyMetrics = null; + /** + * Gets the default type url for ConversationProcessConfig + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConversationProcessConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig"; + }; - /** - * ConversationModelEvaluation rawHumanEvalTemplateCsv. - * @member {string} rawHumanEvalTemplateCsv - * @memberof google.cloud.dialogflow.v2.ConversationModelEvaluation - * @instance - */ - ConversationModelEvaluation.prototype.rawHumanEvalTemplateCsv = ""; + return ConversationProcessConfig; + })(); - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + HumanAgentAssistantConfig.MessageAnalysisConfig = (function() { - /** - * ConversationModelEvaluation metrics. - * @member {"smartReplyMetrics"|undefined} metrics - * @memberof google.cloud.dialogflow.v2.ConversationModelEvaluation - * @instance - */ - Object.defineProperty(ConversationModelEvaluation.prototype, "metrics", { - get: $util.oneOfGetter($oneOfFields = ["smartReplyMetrics"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Properties of a MessageAnalysisConfig. + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig + * @interface IMessageAnalysisConfig + * @property {boolean|null} [enableEntityExtraction] MessageAnalysisConfig enableEntityExtraction + * @property {boolean|null} [enableSentimentAnalysis] MessageAnalysisConfig enableSentimentAnalysis + */ - /** - * Creates a new ConversationModelEvaluation instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2.ConversationModelEvaluation - * @static - * @param {google.cloud.dialogflow.v2.IConversationModelEvaluation=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.ConversationModelEvaluation} ConversationModelEvaluation instance - */ - ConversationModelEvaluation.create = function create(properties) { - return new ConversationModelEvaluation(properties); - }; + /** + * Constructs a new MessageAnalysisConfig. + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig + * @classdesc Represents a MessageAnalysisConfig. + * @implements IMessageAnalysisConfig + * @constructor + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IMessageAnalysisConfig=} [properties] Properties to set + */ + function MessageAnalysisConfig(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]]; + } - /** - * Encodes the specified ConversationModelEvaluation message. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationModelEvaluation.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2.ConversationModelEvaluation - * @static - * @param {google.cloud.dialogflow.v2.IConversationModelEvaluation} message ConversationModelEvaluation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConversationModelEvaluation.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.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.smartReplyMetrics != null && Object.hasOwnProperty.call(message, "smartReplyMetrics")) - $root.google.cloud.dialogflow.v2.SmartReplyMetrics.encode(message.smartReplyMetrics, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.evaluationConfig != null && Object.hasOwnProperty.call(message, "evaluationConfig")) - $root.google.cloud.dialogflow.v2.EvaluationConfig.encode(message.evaluationConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.rawHumanEvalTemplateCsv != null && Object.hasOwnProperty.call(message, "rawHumanEvalTemplateCsv")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.rawHumanEvalTemplateCsv); - return writer; - }; + /** + * MessageAnalysisConfig enableEntityExtraction. + * @member {boolean} enableEntityExtraction + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig + * @instance + */ + MessageAnalysisConfig.prototype.enableEntityExtraction = false; - /** - * Encodes the specified ConversationModelEvaluation message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationModelEvaluation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.ConversationModelEvaluation - * @static - * @param {google.cloud.dialogflow.v2.IConversationModelEvaluation} message ConversationModelEvaluation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConversationModelEvaluation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * MessageAnalysisConfig enableSentimentAnalysis. + * @member {boolean} enableSentimentAnalysis + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig + * @instance + */ + MessageAnalysisConfig.prototype.enableSentimentAnalysis = false; - /** - * Decodes a ConversationModelEvaluation message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2.ConversationModelEvaluation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.ConversationModelEvaluation} ConversationModelEvaluation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConversationModelEvaluation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ConversationModelEvaluation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.displayName = reader.string(); - break; - } - case 6: { - message.evaluationConfig = $root.google.cloud.dialogflow.v2.EvaluationConfig.decode(reader, reader.uint32()); - break; - } - case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.smartReplyMetrics = $root.google.cloud.dialogflow.v2.SmartReplyMetrics.decode(reader, reader.uint32()); - break; - } - case 8: { - message.rawHumanEvalTemplateCsv = reader.string(); + /** + * Creates a new MessageAnalysisConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IMessageAnalysisConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig} MessageAnalysisConfig instance + */ + MessageAnalysisConfig.create = function create(properties) { + return new MessageAnalysisConfig(properties); + }; + + /** + * Encodes the specified MessageAnalysisConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IMessageAnalysisConfig} message MessageAnalysisConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageAnalysisConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableEntityExtraction != null && Object.hasOwnProperty.call(message, "enableEntityExtraction")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enableEntityExtraction); + if (message.enableSentimentAnalysis != null && Object.hasOwnProperty.call(message, "enableSentimentAnalysis")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.enableSentimentAnalysis); + return writer; + }; + + /** + * Encodes the specified MessageAnalysisConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IMessageAnalysisConfig} message MessageAnalysisConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageAnalysisConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageAnalysisConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig} MessageAnalysisConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageAnalysisConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.enableEntityExtraction = reader.bool(); + break; + } + case 3: { + message.enableSentimentAnalysis = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a ConversationModelEvaluation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.ConversationModelEvaluation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.ConversationModelEvaluation} ConversationModelEvaluation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConversationModelEvaluation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a MessageAnalysisConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig} MessageAnalysisConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageAnalysisConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a ConversationModelEvaluation message. - * @function verify - * @memberof google.cloud.dialogflow.v2.ConversationModelEvaluation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConversationModelEvaluation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - 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.evaluationConfig != null && message.hasOwnProperty("evaluationConfig")) { - var error = $root.google.cloud.dialogflow.v2.EvaluationConfig.verify(message.evaluationConfig); - if (error) - return "evaluationConfig." + error; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.smartReplyMetrics != null && message.hasOwnProperty("smartReplyMetrics")) { - properties.metrics = 1; - { - var error = $root.google.cloud.dialogflow.v2.SmartReplyMetrics.verify(message.smartReplyMetrics); - if (error) - return "smartReplyMetrics." + error; - } - } - if (message.rawHumanEvalTemplateCsv != null && message.hasOwnProperty("rawHumanEvalTemplateCsv")) - if (!$util.isString(message.rawHumanEvalTemplateCsv)) - return "rawHumanEvalTemplateCsv: string expected"; - return null; - }; + /** + * Verifies a MessageAnalysisConfig message. + * @function verify + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageAnalysisConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enableEntityExtraction != null && message.hasOwnProperty("enableEntityExtraction")) + if (typeof message.enableEntityExtraction !== "boolean") + return "enableEntityExtraction: boolean expected"; + if (message.enableSentimentAnalysis != null && message.hasOwnProperty("enableSentimentAnalysis")) + if (typeof message.enableSentimentAnalysis !== "boolean") + return "enableSentimentAnalysis: boolean expected"; + return null; + }; - /** - * Creates a ConversationModelEvaluation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2.ConversationModelEvaluation - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.ConversationModelEvaluation} ConversationModelEvaluation - */ - ConversationModelEvaluation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.ConversationModelEvaluation) + /** + * Creates a MessageAnalysisConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig} MessageAnalysisConfig + */ + MessageAnalysisConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig) + return object; + var message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig(); + if (object.enableEntityExtraction != null) + message.enableEntityExtraction = Boolean(object.enableEntityExtraction); + if (object.enableSentimentAnalysis != null) + message.enableSentimentAnalysis = Boolean(object.enableSentimentAnalysis); + return message; + }; + + /** + * Creates a plain object from a MessageAnalysisConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig} message MessageAnalysisConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageAnalysisConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enableEntityExtraction = false; + object.enableSentimentAnalysis = false; + } + if (message.enableEntityExtraction != null && message.hasOwnProperty("enableEntityExtraction")) + object.enableEntityExtraction = message.enableEntityExtraction; + if (message.enableSentimentAnalysis != null && message.hasOwnProperty("enableSentimentAnalysis")) + object.enableSentimentAnalysis = message.enableSentimentAnalysis; return object; - var message = new $root.google.cloud.dialogflow.v2.ConversationModelEvaluation(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.evaluationConfig != null) { - if (typeof object.evaluationConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2.ConversationModelEvaluation.evaluationConfig: object expected"); - message.evaluationConfig = $root.google.cloud.dialogflow.v2.EvaluationConfig.fromObject(object.evaluationConfig); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dialogflow.v2.ConversationModelEvaluation.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.smartReplyMetrics != null) { - if (typeof object.smartReplyMetrics !== "object") - throw TypeError(".google.cloud.dialogflow.v2.ConversationModelEvaluation.smartReplyMetrics: object expected"); - message.smartReplyMetrics = $root.google.cloud.dialogflow.v2.SmartReplyMetrics.fromObject(object.smartReplyMetrics); - } - if (object.rawHumanEvalTemplateCsv != null) - message.rawHumanEvalTemplateCsv = String(object.rawHumanEvalTemplateCsv); - return message; - }; + }; - /** - * Creates a plain object from a ConversationModelEvaluation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2.ConversationModelEvaluation - * @static - * @param {google.cloud.dialogflow.v2.ConversationModelEvaluation} message ConversationModelEvaluation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConversationModelEvaluation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.createTime = null; - object.evaluationConfig = null; - object.rawHumanEvalTemplateCsv = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.smartReplyMetrics != null && message.hasOwnProperty("smartReplyMetrics")) { - object.smartReplyMetrics = $root.google.cloud.dialogflow.v2.SmartReplyMetrics.toObject(message.smartReplyMetrics, options); - if (options.oneofs) - object.metrics = "smartReplyMetrics"; - } - if (message.evaluationConfig != null && message.hasOwnProperty("evaluationConfig")) - object.evaluationConfig = $root.google.cloud.dialogflow.v2.EvaluationConfig.toObject(message.evaluationConfig, options); - if (message.rawHumanEvalTemplateCsv != null && message.hasOwnProperty("rawHumanEvalTemplateCsv")) - object.rawHumanEvalTemplateCsv = message.rawHumanEvalTemplateCsv; - return object; - }; + /** + * Converts this MessageAnalysisConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig + * @instance + * @returns {Object.} JSON object + */ + MessageAnalysisConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this ConversationModelEvaluation to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2.ConversationModelEvaluation - * @instance - * @returns {Object.} JSON object - */ - ConversationModelEvaluation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for MessageAnalysisConfig + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageAnalysisConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig"; + }; - /** - * Gets the default type url for ConversationModelEvaluation - * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.ConversationModelEvaluation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConversationModelEvaluation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.ConversationModelEvaluation"; - }; + return MessageAnalysisConfig; + })(); - return ConversationModelEvaluation; + return HumanAgentAssistantConfig; })(); - v2.EvaluationConfig = (function() { + v2.HumanAgentHandoffConfig = (function() { /** - * Properties of an EvaluationConfig. + * Properties of a HumanAgentHandoffConfig. * @memberof google.cloud.dialogflow.v2 - * @interface IEvaluationConfig - * @property {Array.|null} [datasets] EvaluationConfig datasets - * @property {google.cloud.dialogflow.v2.EvaluationConfig.ISmartReplyConfig|null} [smartReplyConfig] EvaluationConfig smartReplyConfig - * @property {google.cloud.dialogflow.v2.EvaluationConfig.ISmartComposeConfig|null} [smartComposeConfig] EvaluationConfig smartComposeConfig + * @interface IHumanAgentHandoffConfig + * @property {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ILivePersonConfig|null} [livePersonConfig] HumanAgentHandoffConfig livePersonConfig + * @property {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig|null} [salesforceLiveAgentConfig] HumanAgentHandoffConfig salesforceLiveAgentConfig */ /** - * Constructs a new EvaluationConfig. + * Constructs a new HumanAgentHandoffConfig. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents an EvaluationConfig. - * @implements IEvaluationConfig + * @classdesc Represents a HumanAgentHandoffConfig. + * @implements IHumanAgentHandoffConfig * @constructor - * @param {google.cloud.dialogflow.v2.IEvaluationConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.IHumanAgentHandoffConfig=} [properties] Properties to set */ - function EvaluationConfig(properties) { - this.datasets = []; + function HumanAgentHandoffConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -52290,120 +54383,103 @@ } /** - * EvaluationConfig datasets. - * @member {Array.} datasets - * @memberof google.cloud.dialogflow.v2.EvaluationConfig - * @instance - */ - EvaluationConfig.prototype.datasets = $util.emptyArray; - - /** - * EvaluationConfig smartReplyConfig. - * @member {google.cloud.dialogflow.v2.EvaluationConfig.ISmartReplyConfig|null|undefined} smartReplyConfig - * @memberof google.cloud.dialogflow.v2.EvaluationConfig + * HumanAgentHandoffConfig livePersonConfig. + * @member {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ILivePersonConfig|null|undefined} livePersonConfig + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig * @instance */ - EvaluationConfig.prototype.smartReplyConfig = null; + HumanAgentHandoffConfig.prototype.livePersonConfig = null; /** - * EvaluationConfig smartComposeConfig. - * @member {google.cloud.dialogflow.v2.EvaluationConfig.ISmartComposeConfig|null|undefined} smartComposeConfig - * @memberof google.cloud.dialogflow.v2.EvaluationConfig + * HumanAgentHandoffConfig salesforceLiveAgentConfig. + * @member {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig|null|undefined} salesforceLiveAgentConfig + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig * @instance */ - EvaluationConfig.prototype.smartComposeConfig = null; + HumanAgentHandoffConfig.prototype.salesforceLiveAgentConfig = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * EvaluationConfig modelSpecificConfig. - * @member {"smartReplyConfig"|"smartComposeConfig"|undefined} modelSpecificConfig - * @memberof google.cloud.dialogflow.v2.EvaluationConfig + * HumanAgentHandoffConfig agentService. + * @member {"livePersonConfig"|"salesforceLiveAgentConfig"|undefined} agentService + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig * @instance */ - Object.defineProperty(EvaluationConfig.prototype, "modelSpecificConfig", { - get: $util.oneOfGetter($oneOfFields = ["smartReplyConfig", "smartComposeConfig"]), + Object.defineProperty(HumanAgentHandoffConfig.prototype, "agentService", { + get: $util.oneOfGetter($oneOfFields = ["livePersonConfig", "salesforceLiveAgentConfig"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new EvaluationConfig instance using the specified properties. + * Creates a new HumanAgentHandoffConfig instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.EvaluationConfig + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig * @static - * @param {google.cloud.dialogflow.v2.IEvaluationConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.EvaluationConfig} EvaluationConfig instance + * @param {google.cloud.dialogflow.v2.IHumanAgentHandoffConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.HumanAgentHandoffConfig} HumanAgentHandoffConfig instance */ - EvaluationConfig.create = function create(properties) { - return new EvaluationConfig(properties); + HumanAgentHandoffConfig.create = function create(properties) { + return new HumanAgentHandoffConfig(properties); }; /** - * Encodes the specified EvaluationConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.EvaluationConfig.verify|verify} messages. + * Encodes the specified HumanAgentHandoffConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentHandoffConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.EvaluationConfig + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig * @static - * @param {google.cloud.dialogflow.v2.IEvaluationConfig} message EvaluationConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2.IHumanAgentHandoffConfig} message HumanAgentHandoffConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EvaluationConfig.encode = function encode(message, writer) { + HumanAgentHandoffConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.smartReplyConfig != null && Object.hasOwnProperty.call(message, "smartReplyConfig")) - $root.google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig.encode(message.smartReplyConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.datasets != null && message.datasets.length) - for (var i = 0; i < message.datasets.length; ++i) - $root.google.cloud.dialogflow.v2.InputDataset.encode(message.datasets[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.smartComposeConfig != null && Object.hasOwnProperty.call(message, "smartComposeConfig")) - $root.google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig.encode(message.smartComposeConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.livePersonConfig != null && Object.hasOwnProperty.call(message, "livePersonConfig")) + $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig.encode(message.livePersonConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.salesforceLiveAgentConfig != null && Object.hasOwnProperty.call(message, "salesforceLiveAgentConfig")) + $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.encode(message.salesforceLiveAgentConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified EvaluationConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.EvaluationConfig.verify|verify} messages. + * Encodes the specified HumanAgentHandoffConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentHandoffConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.EvaluationConfig + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig * @static - * @param {google.cloud.dialogflow.v2.IEvaluationConfig} message EvaluationConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2.IHumanAgentHandoffConfig} message HumanAgentHandoffConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EvaluationConfig.encodeDelimited = function encodeDelimited(message, writer) { + HumanAgentHandoffConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EvaluationConfig message from the specified reader or buffer. + * Decodes a HumanAgentHandoffConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.EvaluationConfig + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.EvaluationConfig} EvaluationConfig + * @returns {google.cloud.dialogflow.v2.HumanAgentHandoffConfig} HumanAgentHandoffConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EvaluationConfig.decode = function decode(reader, length) { + HumanAgentHandoffConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.EvaluationConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: { - if (!(message.datasets && message.datasets.length)) - message.datasets = []; - message.datasets.push($root.google.cloud.dialogflow.v2.InputDataset.decode(reader, reader.uint32())); + case 1: { + message.livePersonConfig = $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig.decode(reader, reader.uint32()); break; } case 2: { - message.smartReplyConfig = $root.google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig.decode(reader, reader.uint32()); - break; - } - case 4: { - message.smartComposeConfig = $root.google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig.decode(reader, reader.uint32()); + message.salesforceLiveAgentConfig = $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.decode(reader, reader.uint32()); break; } default: @@ -52415,176 +54491,149 @@ }; /** - * Decodes an EvaluationConfig message from the specified reader or buffer, length delimited. + * Decodes a HumanAgentHandoffConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.EvaluationConfig + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.EvaluationConfig} EvaluationConfig + * @returns {google.cloud.dialogflow.v2.HumanAgentHandoffConfig} HumanAgentHandoffConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EvaluationConfig.decodeDelimited = function decodeDelimited(reader) { + HumanAgentHandoffConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EvaluationConfig message. + * Verifies a HumanAgentHandoffConfig message. * @function verify - * @memberof google.cloud.dialogflow.v2.EvaluationConfig + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EvaluationConfig.verify = function verify(message) { + HumanAgentHandoffConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.datasets != null && message.hasOwnProperty("datasets")) { - if (!Array.isArray(message.datasets)) - return "datasets: array expected"; - for (var i = 0; i < message.datasets.length; ++i) { - var error = $root.google.cloud.dialogflow.v2.InputDataset.verify(message.datasets[i]); - if (error) - return "datasets." + error; - } - } - if (message.smartReplyConfig != null && message.hasOwnProperty("smartReplyConfig")) { - properties.modelSpecificConfig = 1; + if (message.livePersonConfig != null && message.hasOwnProperty("livePersonConfig")) { + properties.agentService = 1; { - var error = $root.google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig.verify(message.smartReplyConfig); + var error = $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig.verify(message.livePersonConfig); if (error) - return "smartReplyConfig." + error; + return "livePersonConfig." + error; } } - if (message.smartComposeConfig != null && message.hasOwnProperty("smartComposeConfig")) { - if (properties.modelSpecificConfig === 1) - return "modelSpecificConfig: multiple values"; - properties.modelSpecificConfig = 1; + if (message.salesforceLiveAgentConfig != null && message.hasOwnProperty("salesforceLiveAgentConfig")) { + if (properties.agentService === 1) + return "agentService: multiple values"; + properties.agentService = 1; { - var error = $root.google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig.verify(message.smartComposeConfig); + var error = $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.verify(message.salesforceLiveAgentConfig); if (error) - return "smartComposeConfig." + error; + return "salesforceLiveAgentConfig." + error; } } return null; }; /** - * Creates an EvaluationConfig message from a plain object. Also converts values to their respective internal types. + * Creates a HumanAgentHandoffConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.EvaluationConfig + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.EvaluationConfig} EvaluationConfig + * @returns {google.cloud.dialogflow.v2.HumanAgentHandoffConfig} HumanAgentHandoffConfig */ - EvaluationConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.EvaluationConfig) + HumanAgentHandoffConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig) return object; - var message = new $root.google.cloud.dialogflow.v2.EvaluationConfig(); - if (object.datasets) { - if (!Array.isArray(object.datasets)) - throw TypeError(".google.cloud.dialogflow.v2.EvaluationConfig.datasets: array expected"); - message.datasets = []; - for (var i = 0; i < object.datasets.length; ++i) { - if (typeof object.datasets[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2.EvaluationConfig.datasets: object expected"); - message.datasets[i] = $root.google.cloud.dialogflow.v2.InputDataset.fromObject(object.datasets[i]); - } - } - if (object.smartReplyConfig != null) { - if (typeof object.smartReplyConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2.EvaluationConfig.smartReplyConfig: object expected"); - message.smartReplyConfig = $root.google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig.fromObject(object.smartReplyConfig); + var message = new $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig(); + if (object.livePersonConfig != null) { + if (typeof object.livePersonConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2.HumanAgentHandoffConfig.livePersonConfig: object expected"); + message.livePersonConfig = $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig.fromObject(object.livePersonConfig); } - if (object.smartComposeConfig != null) { - if (typeof object.smartComposeConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2.EvaluationConfig.smartComposeConfig: object expected"); - message.smartComposeConfig = $root.google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig.fromObject(object.smartComposeConfig); + if (object.salesforceLiveAgentConfig != null) { + if (typeof object.salesforceLiveAgentConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2.HumanAgentHandoffConfig.salesforceLiveAgentConfig: object expected"); + message.salesforceLiveAgentConfig = $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.fromObject(object.salesforceLiveAgentConfig); } return message; }; /** - * Creates a plain object from an EvaluationConfig message. Also converts values to other types if specified. + * Creates a plain object from a HumanAgentHandoffConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.EvaluationConfig + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig * @static - * @param {google.cloud.dialogflow.v2.EvaluationConfig} message EvaluationConfig + * @param {google.cloud.dialogflow.v2.HumanAgentHandoffConfig} message HumanAgentHandoffConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EvaluationConfig.toObject = function toObject(message, options) { + HumanAgentHandoffConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.datasets = []; - if (message.smartReplyConfig != null && message.hasOwnProperty("smartReplyConfig")) { - object.smartReplyConfig = $root.google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig.toObject(message.smartReplyConfig, options); + if (message.livePersonConfig != null && message.hasOwnProperty("livePersonConfig")) { + object.livePersonConfig = $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig.toObject(message.livePersonConfig, options); if (options.oneofs) - object.modelSpecificConfig = "smartReplyConfig"; - } - if (message.datasets && message.datasets.length) { - object.datasets = []; - for (var j = 0; j < message.datasets.length; ++j) - object.datasets[j] = $root.google.cloud.dialogflow.v2.InputDataset.toObject(message.datasets[j], options); + object.agentService = "livePersonConfig"; } - if (message.smartComposeConfig != null && message.hasOwnProperty("smartComposeConfig")) { - object.smartComposeConfig = $root.google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig.toObject(message.smartComposeConfig, options); + if (message.salesforceLiveAgentConfig != null && message.hasOwnProperty("salesforceLiveAgentConfig")) { + object.salesforceLiveAgentConfig = $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.toObject(message.salesforceLiveAgentConfig, options); if (options.oneofs) - object.modelSpecificConfig = "smartComposeConfig"; + object.agentService = "salesforceLiveAgentConfig"; } return object; }; /** - * Converts this EvaluationConfig to JSON. + * Converts this HumanAgentHandoffConfig to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.EvaluationConfig + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig * @instance * @returns {Object.} JSON object */ - EvaluationConfig.prototype.toJSON = function toJSON() { + HumanAgentHandoffConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EvaluationConfig + * Gets the default type url for HumanAgentHandoffConfig * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.EvaluationConfig + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EvaluationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + HumanAgentHandoffConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.EvaluationConfig"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.HumanAgentHandoffConfig"; }; - EvaluationConfig.SmartReplyConfig = (function() { + HumanAgentHandoffConfig.LivePersonConfig = (function() { /** - * Properties of a SmartReplyConfig. - * @memberof google.cloud.dialogflow.v2.EvaluationConfig - * @interface ISmartReplyConfig - * @property {string|null} [allowlistDocument] SmartReplyConfig allowlistDocument - * @property {number|null} [maxResultCount] SmartReplyConfig maxResultCount + * Properties of a LivePersonConfig. + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig + * @interface ILivePersonConfig + * @property {string|null} [accountNumber] LivePersonConfig accountNumber */ /** - * Constructs a new SmartReplyConfig. - * @memberof google.cloud.dialogflow.v2.EvaluationConfig - * @classdesc Represents a SmartReplyConfig. - * @implements ISmartReplyConfig + * Constructs a new LivePersonConfig. + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig + * @classdesc Represents a LivePersonConfig. + * @implements ILivePersonConfig * @constructor - * @param {google.cloud.dialogflow.v2.EvaluationConfig.ISmartReplyConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ILivePersonConfig=} [properties] Properties to set */ - function SmartReplyConfig(properties) { + function LivePersonConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -52592,89 +54641,75 @@ } /** - * SmartReplyConfig allowlistDocument. - * @member {string} allowlistDocument - * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig - * @instance - */ - SmartReplyConfig.prototype.allowlistDocument = ""; - - /** - * SmartReplyConfig maxResultCount. - * @member {number} maxResultCount - * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig + * LivePersonConfig accountNumber. + * @member {string} accountNumber + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig * @instance */ - SmartReplyConfig.prototype.maxResultCount = 0; + LivePersonConfig.prototype.accountNumber = ""; /** - * Creates a new SmartReplyConfig instance using the specified properties. + * Creates a new LivePersonConfig instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig * @static - * @param {google.cloud.dialogflow.v2.EvaluationConfig.ISmartReplyConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig} SmartReplyConfig instance + * @param {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ILivePersonConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig} LivePersonConfig instance */ - SmartReplyConfig.create = function create(properties) { - return new SmartReplyConfig(properties); + LivePersonConfig.create = function create(properties) { + return new LivePersonConfig(properties); }; /** - * Encodes the specified SmartReplyConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig.verify|verify} messages. + * Encodes the specified LivePersonConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig * @static - * @param {google.cloud.dialogflow.v2.EvaluationConfig.ISmartReplyConfig} message SmartReplyConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ILivePersonConfig} message LivePersonConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SmartReplyConfig.encode = function encode(message, writer) { + LivePersonConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.allowlistDocument != null && Object.hasOwnProperty.call(message, "allowlistDocument")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.allowlistDocument); - if (message.maxResultCount != null && Object.hasOwnProperty.call(message, "maxResultCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxResultCount); + if (message.accountNumber != null && Object.hasOwnProperty.call(message, "accountNumber")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.accountNumber); return writer; }; /** - * Encodes the specified SmartReplyConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig.verify|verify} messages. + * Encodes the specified LivePersonConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig * @static - * @param {google.cloud.dialogflow.v2.EvaluationConfig.ISmartReplyConfig} message SmartReplyConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ILivePersonConfig} message LivePersonConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SmartReplyConfig.encodeDelimited = function encodeDelimited(message, writer) { + LivePersonConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SmartReplyConfig message from the specified reader or buffer. + * Decodes a LivePersonConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig} SmartReplyConfig + * @returns {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig} LivePersonConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SmartReplyConfig.decode = function decode(reader, length) { + LivePersonConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.allowlistDocument = reader.string(); - break; - } - case 2: { - message.maxResultCount = reader.int32(); + message.accountNumber = reader.string(); break; } default: @@ -52686,132 +54721,125 @@ }; /** - * Decodes a SmartReplyConfig message from the specified reader or buffer, length delimited. + * Decodes a LivePersonConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig} SmartReplyConfig + * @returns {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig} LivePersonConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SmartReplyConfig.decodeDelimited = function decodeDelimited(reader) { + LivePersonConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SmartReplyConfig message. + * Verifies a LivePersonConfig message. * @function verify - * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SmartReplyConfig.verify = function verify(message) { + LivePersonConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.allowlistDocument != null && message.hasOwnProperty("allowlistDocument")) - if (!$util.isString(message.allowlistDocument)) - return "allowlistDocument: string expected"; - if (message.maxResultCount != null && message.hasOwnProperty("maxResultCount")) - if (!$util.isInteger(message.maxResultCount)) - return "maxResultCount: integer expected"; + if (message.accountNumber != null && message.hasOwnProperty("accountNumber")) + if (!$util.isString(message.accountNumber)) + return "accountNumber: string expected"; return null; }; /** - * Creates a SmartReplyConfig message from a plain object. Also converts values to their respective internal types. + * Creates a LivePersonConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig} SmartReplyConfig + * @returns {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig} LivePersonConfig */ - SmartReplyConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig) + LivePersonConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig) return object; - var message = new $root.google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig(); - if (object.allowlistDocument != null) - message.allowlistDocument = String(object.allowlistDocument); - if (object.maxResultCount != null) - message.maxResultCount = object.maxResultCount | 0; + var message = new $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig(); + if (object.accountNumber != null) + message.accountNumber = String(object.accountNumber); return message; }; /** - * Creates a plain object from a SmartReplyConfig message. Also converts values to other types if specified. + * Creates a plain object from a LivePersonConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig * @static - * @param {google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig} message SmartReplyConfig + * @param {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig} message LivePersonConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SmartReplyConfig.toObject = function toObject(message, options) { + LivePersonConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.allowlistDocument = ""; - object.maxResultCount = 0; - } - if (message.allowlistDocument != null && message.hasOwnProperty("allowlistDocument")) - object.allowlistDocument = message.allowlistDocument; - if (message.maxResultCount != null && message.hasOwnProperty("maxResultCount")) - object.maxResultCount = message.maxResultCount; + if (options.defaults) + object.accountNumber = ""; + if (message.accountNumber != null && message.hasOwnProperty("accountNumber")) + object.accountNumber = message.accountNumber; return object; }; /** - * Converts this SmartReplyConfig to JSON. + * Converts this LivePersonConfig to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig * @instance * @returns {Object.} JSON object */ - SmartReplyConfig.prototype.toJSON = function toJSON() { + LivePersonConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SmartReplyConfig + * Gets the default type url for LivePersonConfig * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SmartReplyConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + LivePersonConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig"; }; - return SmartReplyConfig; + return LivePersonConfig; })(); - EvaluationConfig.SmartComposeConfig = (function() { + HumanAgentHandoffConfig.SalesforceLiveAgentConfig = (function() { /** - * Properties of a SmartComposeConfig. - * @memberof google.cloud.dialogflow.v2.EvaluationConfig - * @interface ISmartComposeConfig - * @property {string|null} [allowlistDocument] SmartComposeConfig allowlistDocument - * @property {number|null} [maxResultCount] SmartComposeConfig maxResultCount + * Properties of a SalesforceLiveAgentConfig. + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig + * @interface ISalesforceLiveAgentConfig + * @property {string|null} [organizationId] SalesforceLiveAgentConfig organizationId + * @property {string|null} [deploymentId] SalesforceLiveAgentConfig deploymentId + * @property {string|null} [buttonId] SalesforceLiveAgentConfig buttonId + * @property {string|null} [endpointDomain] SalesforceLiveAgentConfig endpointDomain */ /** - * Constructs a new SmartComposeConfig. - * @memberof google.cloud.dialogflow.v2.EvaluationConfig - * @classdesc Represents a SmartComposeConfig. - * @implements ISmartComposeConfig + * Constructs a new SalesforceLiveAgentConfig. + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig + * @classdesc Represents a SalesforceLiveAgentConfig. + * @implements ISalesforceLiveAgentConfig * @constructor - * @param {google.cloud.dialogflow.v2.EvaluationConfig.ISmartComposeConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig=} [properties] Properties to set */ - function SmartComposeConfig(properties) { + function SalesforceLiveAgentConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -52819,228 +54847,742 @@ } /** - * SmartComposeConfig allowlistDocument. - * @member {string} allowlistDocument - * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig + * SalesforceLiveAgentConfig organizationId. + * @member {string} organizationId + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig * @instance */ - SmartComposeConfig.prototype.allowlistDocument = ""; + SalesforceLiveAgentConfig.prototype.organizationId = ""; /** - * SmartComposeConfig maxResultCount. - * @member {number} maxResultCount - * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig + * SalesforceLiveAgentConfig deploymentId. + * @member {string} deploymentId + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig * @instance */ - SmartComposeConfig.prototype.maxResultCount = 0; + SalesforceLiveAgentConfig.prototype.deploymentId = ""; + + /** + * SalesforceLiveAgentConfig buttonId. + * @member {string} buttonId + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig + * @instance + */ + SalesforceLiveAgentConfig.prototype.buttonId = ""; + + /** + * SalesforceLiveAgentConfig endpointDomain. + * @member {string} endpointDomain + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig + * @instance + */ + SalesforceLiveAgentConfig.prototype.endpointDomain = ""; + + /** + * Creates a new SalesforceLiveAgentConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig} SalesforceLiveAgentConfig instance + */ + SalesforceLiveAgentConfig.create = function create(properties) { + return new SalesforceLiveAgentConfig(properties); + }; + + /** + * Encodes the specified SalesforceLiveAgentConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig} message SalesforceLiveAgentConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SalesforceLiveAgentConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.organizationId != null && Object.hasOwnProperty.call(message, "organizationId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.organizationId); + if (message.deploymentId != null && Object.hasOwnProperty.call(message, "deploymentId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.deploymentId); + if (message.buttonId != null && Object.hasOwnProperty.call(message, "buttonId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.buttonId); + if (message.endpointDomain != null && Object.hasOwnProperty.call(message, "endpointDomain")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.endpointDomain); + return writer; + }; + + /** + * Encodes the specified SalesforceLiveAgentConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig} message SalesforceLiveAgentConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SalesforceLiveAgentConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SalesforceLiveAgentConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig} SalesforceLiveAgentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SalesforceLiveAgentConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.organizationId = reader.string(); + break; + } + case 2: { + message.deploymentId = reader.string(); + break; + } + case 3: { + message.buttonId = reader.string(); + break; + } + case 4: { + message.endpointDomain = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SalesforceLiveAgentConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig} SalesforceLiveAgentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SalesforceLiveAgentConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SalesforceLiveAgentConfig message. + * @function verify + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SalesforceLiveAgentConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.organizationId != null && message.hasOwnProperty("organizationId")) + if (!$util.isString(message.organizationId)) + return "organizationId: string expected"; + if (message.deploymentId != null && message.hasOwnProperty("deploymentId")) + if (!$util.isString(message.deploymentId)) + return "deploymentId: string expected"; + if (message.buttonId != null && message.hasOwnProperty("buttonId")) + if (!$util.isString(message.buttonId)) + return "buttonId: string expected"; + if (message.endpointDomain != null && message.hasOwnProperty("endpointDomain")) + if (!$util.isString(message.endpointDomain)) + return "endpointDomain: string expected"; + return null; + }; + + /** + * Creates a SalesforceLiveAgentConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig} SalesforceLiveAgentConfig + */ + SalesforceLiveAgentConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig) + return object; + var message = new $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig(); + if (object.organizationId != null) + message.organizationId = String(object.organizationId); + if (object.deploymentId != null) + message.deploymentId = String(object.deploymentId); + if (object.buttonId != null) + message.buttonId = String(object.buttonId); + if (object.endpointDomain != null) + message.endpointDomain = String(object.endpointDomain); + return message; + }; + + /** + * Creates a plain object from a SalesforceLiveAgentConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig + * @static + * @param {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig} message SalesforceLiveAgentConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SalesforceLiveAgentConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.organizationId = ""; + object.deploymentId = ""; + object.buttonId = ""; + object.endpointDomain = ""; + } + if (message.organizationId != null && message.hasOwnProperty("organizationId")) + object.organizationId = message.organizationId; + if (message.deploymentId != null && message.hasOwnProperty("deploymentId")) + object.deploymentId = message.deploymentId; + if (message.buttonId != null && message.hasOwnProperty("buttonId")) + object.buttonId = message.buttonId; + if (message.endpointDomain != null && message.hasOwnProperty("endpointDomain")) + object.endpointDomain = message.endpointDomain; + return object; + }; + + /** + * Converts this SalesforceLiveAgentConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig + * @instance + * @returns {Object.} JSON object + */ + SalesforceLiveAgentConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SalesforceLiveAgentConfig + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SalesforceLiveAgentConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig"; + }; + + return SalesforceLiveAgentConfig; + })(); + + return HumanAgentHandoffConfig; + })(); + + v2.NotificationConfig = (function() { + + /** + * Properties of a NotificationConfig. + * @memberof google.cloud.dialogflow.v2 + * @interface INotificationConfig + * @property {string|null} [topic] NotificationConfig topic + * @property {google.cloud.dialogflow.v2.NotificationConfig.MessageFormat|null} [messageFormat] NotificationConfig messageFormat + */ + + /** + * Constructs a new NotificationConfig. + * @memberof google.cloud.dialogflow.v2 + * @classdesc Represents a NotificationConfig. + * @implements INotificationConfig + * @constructor + * @param {google.cloud.dialogflow.v2.INotificationConfig=} [properties] Properties to set + */ + function NotificationConfig(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]]; + } + + /** + * NotificationConfig topic. + * @member {string} topic + * @memberof google.cloud.dialogflow.v2.NotificationConfig + * @instance + */ + NotificationConfig.prototype.topic = ""; + + /** + * NotificationConfig messageFormat. + * @member {google.cloud.dialogflow.v2.NotificationConfig.MessageFormat} messageFormat + * @memberof google.cloud.dialogflow.v2.NotificationConfig + * @instance + */ + NotificationConfig.prototype.messageFormat = 0; + + /** + * Creates a new NotificationConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2.NotificationConfig + * @static + * @param {google.cloud.dialogflow.v2.INotificationConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.NotificationConfig} NotificationConfig instance + */ + NotificationConfig.create = function create(properties) { + return new NotificationConfig(properties); + }; + + /** + * Encodes the specified NotificationConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.NotificationConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2.NotificationConfig + * @static + * @param {google.cloud.dialogflow.v2.INotificationConfig} message NotificationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NotificationConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.topic); + if (message.messageFormat != null && Object.hasOwnProperty.call(message, "messageFormat")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.messageFormat); + return writer; + }; + + /** + * Encodes the specified NotificationConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.NotificationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2.NotificationConfig + * @static + * @param {google.cloud.dialogflow.v2.INotificationConfig} message NotificationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NotificationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NotificationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2.NotificationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2.NotificationConfig} NotificationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NotificationConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.NotificationConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.topic = reader.string(); + break; + } + case 2: { + message.messageFormat = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NotificationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2.NotificationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2.NotificationConfig} NotificationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NotificationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NotificationConfig message. + * @function verify + * @memberof google.cloud.dialogflow.v2.NotificationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NotificationConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.topic != null && message.hasOwnProperty("topic")) + if (!$util.isString(message.topic)) + return "topic: string expected"; + if (message.messageFormat != null && message.hasOwnProperty("messageFormat")) + switch (message.messageFormat) { + default: + return "messageFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a NotificationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2.NotificationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2.NotificationConfig} NotificationConfig + */ + NotificationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.NotificationConfig) + return object; + var message = new $root.google.cloud.dialogflow.v2.NotificationConfig(); + if (object.topic != null) + message.topic = String(object.topic); + switch (object.messageFormat) { + default: + if (typeof object.messageFormat === "number") { + message.messageFormat = object.messageFormat; + break; + } + break; + case "MESSAGE_FORMAT_UNSPECIFIED": + case 0: + message.messageFormat = 0; + break; + case "PROTO": + case 1: + message.messageFormat = 1; + break; + case "JSON": + case 2: + message.messageFormat = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a NotificationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2.NotificationConfig + * @static + * @param {google.cloud.dialogflow.v2.NotificationConfig} message NotificationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NotificationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.topic = ""; + object.messageFormat = options.enums === String ? "MESSAGE_FORMAT_UNSPECIFIED" : 0; + } + if (message.topic != null && message.hasOwnProperty("topic")) + object.topic = message.topic; + if (message.messageFormat != null && message.hasOwnProperty("messageFormat")) + object.messageFormat = options.enums === String ? $root.google.cloud.dialogflow.v2.NotificationConfig.MessageFormat[message.messageFormat] === undefined ? message.messageFormat : $root.google.cloud.dialogflow.v2.NotificationConfig.MessageFormat[message.messageFormat] : message.messageFormat; + return object; + }; + + /** + * Converts this NotificationConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2.NotificationConfig + * @instance + * @returns {Object.} JSON object + */ + NotificationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NotificationConfig + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2.NotificationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NotificationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.v2.NotificationConfig"; + }; + + /** + * MessageFormat enum. + * @name google.cloud.dialogflow.v2.NotificationConfig.MessageFormat + * @enum {number} + * @property {number} MESSAGE_FORMAT_UNSPECIFIED=0 MESSAGE_FORMAT_UNSPECIFIED value + * @property {number} PROTO=1 PROTO value + * @property {number} JSON=2 JSON value + */ + NotificationConfig.MessageFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MESSAGE_FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "PROTO"] = 1; + values[valuesById[2] = "JSON"] = 2; + return values; + })(); + + return NotificationConfig; + })(); + + v2.LoggingConfig = (function() { + + /** + * Properties of a LoggingConfig. + * @memberof google.cloud.dialogflow.v2 + * @interface ILoggingConfig + * @property {boolean|null} [enableStackdriverLogging] LoggingConfig enableStackdriverLogging + */ + + /** + * Constructs a new LoggingConfig. + * @memberof google.cloud.dialogflow.v2 + * @classdesc Represents a LoggingConfig. + * @implements ILoggingConfig + * @constructor + * @param {google.cloud.dialogflow.v2.ILoggingConfig=} [properties] Properties to set + */ + function LoggingConfig(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]]; + } + + /** + * LoggingConfig enableStackdriverLogging. + * @member {boolean} enableStackdriverLogging + * @memberof google.cloud.dialogflow.v2.LoggingConfig + * @instance + */ + LoggingConfig.prototype.enableStackdriverLogging = false; - /** - * Creates a new SmartComposeConfig instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig - * @static - * @param {google.cloud.dialogflow.v2.EvaluationConfig.ISmartComposeConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig} SmartComposeConfig instance - */ - SmartComposeConfig.create = function create(properties) { - return new SmartComposeConfig(properties); - }; + /** + * Creates a new LoggingConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2.LoggingConfig + * @static + * @param {google.cloud.dialogflow.v2.ILoggingConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.LoggingConfig} LoggingConfig instance + */ + LoggingConfig.create = function create(properties) { + return new LoggingConfig(properties); + }; - /** - * Encodes the specified SmartComposeConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig - * @static - * @param {google.cloud.dialogflow.v2.EvaluationConfig.ISmartComposeConfig} message SmartComposeConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SmartComposeConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allowlistDocument != null && Object.hasOwnProperty.call(message, "allowlistDocument")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.allowlistDocument); - if (message.maxResultCount != null && Object.hasOwnProperty.call(message, "maxResultCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxResultCount); - return writer; - }; + /** + * Encodes the specified LoggingConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.LoggingConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2.LoggingConfig + * @static + * @param {google.cloud.dialogflow.v2.ILoggingConfig} message LoggingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoggingConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableStackdriverLogging != null && Object.hasOwnProperty.call(message, "enableStackdriverLogging")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.enableStackdriverLogging); + return writer; + }; - /** - * Encodes the specified SmartComposeConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig - * @static - * @param {google.cloud.dialogflow.v2.EvaluationConfig.ISmartComposeConfig} message SmartComposeConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SmartComposeConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified LoggingConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.LoggingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2.LoggingConfig + * @static + * @param {google.cloud.dialogflow.v2.ILoggingConfig} message LoggingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoggingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a SmartComposeConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig} SmartComposeConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SmartComposeConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.allowlistDocument = reader.string(); - break; - } - case 2: { - message.maxResultCount = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes a LoggingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2.LoggingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2.LoggingConfig} LoggingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoggingConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.LoggingConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.enableStackdriverLogging = reader.bool(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a SmartComposeConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig} SmartComposeConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SmartComposeConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a SmartComposeConfig message. - * @function verify - * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SmartComposeConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.allowlistDocument != null && message.hasOwnProperty("allowlistDocument")) - if (!$util.isString(message.allowlistDocument)) - return "allowlistDocument: string expected"; - if (message.maxResultCount != null && message.hasOwnProperty("maxResultCount")) - if (!$util.isInteger(message.maxResultCount)) - return "maxResultCount: integer expected"; - return null; - }; + /** + * Decodes a LoggingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2.LoggingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2.LoggingConfig} LoggingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoggingConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a SmartComposeConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig} SmartComposeConfig - */ - SmartComposeConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig) - return object; - var message = new $root.google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig(); - if (object.allowlistDocument != null) - message.allowlistDocument = String(object.allowlistDocument); - if (object.maxResultCount != null) - message.maxResultCount = object.maxResultCount | 0; - return message; - }; + /** + * Verifies a LoggingConfig message. + * @function verify + * @memberof google.cloud.dialogflow.v2.LoggingConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoggingConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enableStackdriverLogging != null && message.hasOwnProperty("enableStackdriverLogging")) + if (typeof message.enableStackdriverLogging !== "boolean") + return "enableStackdriverLogging: boolean expected"; + return null; + }; - /** - * Creates a plain object from a SmartComposeConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig - * @static - * @param {google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig} message SmartComposeConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SmartComposeConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.allowlistDocument = ""; - object.maxResultCount = 0; - } - if (message.allowlistDocument != null && message.hasOwnProperty("allowlistDocument")) - object.allowlistDocument = message.allowlistDocument; - if (message.maxResultCount != null && message.hasOwnProperty("maxResultCount")) - object.maxResultCount = message.maxResultCount; + /** + * Creates a LoggingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2.LoggingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2.LoggingConfig} LoggingConfig + */ + LoggingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.LoggingConfig) return object; - }; + var message = new $root.google.cloud.dialogflow.v2.LoggingConfig(); + if (object.enableStackdriverLogging != null) + message.enableStackdriverLogging = Boolean(object.enableStackdriverLogging); + return message; + }; - /** - * Converts this SmartComposeConfig to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig - * @instance - * @returns {Object.} JSON object - */ - SmartComposeConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a LoggingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2.LoggingConfig + * @static + * @param {google.cloud.dialogflow.v2.LoggingConfig} message LoggingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoggingConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enableStackdriverLogging = false; + if (message.enableStackdriverLogging != null && message.hasOwnProperty("enableStackdriverLogging")) + object.enableStackdriverLogging = message.enableStackdriverLogging; + return object; + }; - /** - * Gets the default type url for SmartComposeConfig - * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SmartComposeConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig"; - }; + /** + * Converts this LoggingConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2.LoggingConfig + * @instance + * @returns {Object.} JSON object + */ + LoggingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return SmartComposeConfig; - })(); + /** + * Gets the default type url for LoggingConfig + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2.LoggingConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoggingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.v2.LoggingConfig"; + }; - return EvaluationConfig; + return LoggingConfig; })(); - v2.InputDataset = (function() { + v2.SuggestionFeature = (function() { /** - * Properties of an InputDataset. + * Properties of a SuggestionFeature. * @memberof google.cloud.dialogflow.v2 - * @interface IInputDataset - * @property {string|null} [dataset] InputDataset dataset + * @interface ISuggestionFeature + * @property {google.cloud.dialogflow.v2.SuggestionFeature.Type|null} [type] SuggestionFeature type */ /** - * Constructs a new InputDataset. + * Constructs a new SuggestionFeature. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents an InputDataset. - * @implements IInputDataset + * @classdesc Represents a SuggestionFeature. + * @implements ISuggestionFeature * @constructor - * @param {google.cloud.dialogflow.v2.IInputDataset=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.ISuggestionFeature=} [properties] Properties to set */ - function InputDataset(properties) { + function SuggestionFeature(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -53048,75 +55590,75 @@ } /** - * InputDataset dataset. - * @member {string} dataset - * @memberof google.cloud.dialogflow.v2.InputDataset + * SuggestionFeature type. + * @member {google.cloud.dialogflow.v2.SuggestionFeature.Type} type + * @memberof google.cloud.dialogflow.v2.SuggestionFeature * @instance */ - InputDataset.prototype.dataset = ""; + SuggestionFeature.prototype.type = 0; /** - * Creates a new InputDataset instance using the specified properties. + * Creates a new SuggestionFeature instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.InputDataset + * @memberof google.cloud.dialogflow.v2.SuggestionFeature * @static - * @param {google.cloud.dialogflow.v2.IInputDataset=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.InputDataset} InputDataset instance + * @param {google.cloud.dialogflow.v2.ISuggestionFeature=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.SuggestionFeature} SuggestionFeature instance */ - InputDataset.create = function create(properties) { - return new InputDataset(properties); + SuggestionFeature.create = function create(properties) { + return new SuggestionFeature(properties); }; /** - * Encodes the specified InputDataset message. Does not implicitly {@link google.cloud.dialogflow.v2.InputDataset.verify|verify} messages. + * Encodes the specified SuggestionFeature message. Does not implicitly {@link google.cloud.dialogflow.v2.SuggestionFeature.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.InputDataset + * @memberof google.cloud.dialogflow.v2.SuggestionFeature * @static - * @param {google.cloud.dialogflow.v2.IInputDataset} message InputDataset message or plain object to encode + * @param {google.cloud.dialogflow.v2.ISuggestionFeature} message SuggestionFeature message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InputDataset.encode = function encode(message, writer) { + SuggestionFeature.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dataset != null && Object.hasOwnProperty.call(message, "dataset")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataset); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); return writer; }; /** - * Encodes the specified InputDataset message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.InputDataset.verify|verify} messages. + * Encodes the specified SuggestionFeature message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.SuggestionFeature.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.InputDataset + * @memberof google.cloud.dialogflow.v2.SuggestionFeature * @static - * @param {google.cloud.dialogflow.v2.IInputDataset} message InputDataset message or plain object to encode + * @param {google.cloud.dialogflow.v2.ISuggestionFeature} message SuggestionFeature message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InputDataset.encodeDelimited = function encodeDelimited(message, writer) { + SuggestionFeature.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an InputDataset message from the specified reader or buffer. + * Decodes a SuggestionFeature message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.InputDataset + * @memberof google.cloud.dialogflow.v2.SuggestionFeature * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.InputDataset} InputDataset + * @returns {google.cloud.dialogflow.v2.SuggestionFeature} SuggestionFeature * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InputDataset.decode = function decode(reader, length) { + SuggestionFeature.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.InputDataset(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.SuggestionFeature(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.dataset = reader.string(); + message.type = reader.int32(); break; } default: @@ -53128,122 +55670,171 @@ }; /** - * Decodes an InputDataset message from the specified reader or buffer, length delimited. + * Decodes a SuggestionFeature message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.InputDataset + * @memberof google.cloud.dialogflow.v2.SuggestionFeature * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.InputDataset} InputDataset + * @returns {google.cloud.dialogflow.v2.SuggestionFeature} SuggestionFeature * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InputDataset.decodeDelimited = function decodeDelimited(reader) { + SuggestionFeature.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an InputDataset message. + * Verifies a SuggestionFeature message. * @function verify - * @memberof google.cloud.dialogflow.v2.InputDataset + * @memberof google.cloud.dialogflow.v2.SuggestionFeature * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - InputDataset.verify = function verify(message) { + SuggestionFeature.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dataset != null && message.hasOwnProperty("dataset")) - if (!$util.isString(message.dataset)) - return "dataset: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } return null; }; /** - * Creates an InputDataset message from a plain object. Also converts values to their respective internal types. + * Creates a SuggestionFeature message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.InputDataset + * @memberof google.cloud.dialogflow.v2.SuggestionFeature * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.InputDataset} InputDataset + * @returns {google.cloud.dialogflow.v2.SuggestionFeature} SuggestionFeature */ - InputDataset.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.InputDataset) + SuggestionFeature.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.SuggestionFeature) return object; - var message = new $root.google.cloud.dialogflow.v2.InputDataset(); - if (object.dataset != null) - message.dataset = String(object.dataset); + var message = new $root.google.cloud.dialogflow.v2.SuggestionFeature(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "ARTICLE_SUGGESTION": + case 1: + message.type = 1; + break; + case "FAQ": + case 2: + message.type = 2; + break; + case "SMART_REPLY": + case 3: + message.type = 3; + break; + } return message; }; /** - * Creates a plain object from an InputDataset message. Also converts values to other types if specified. + * Creates a plain object from a SuggestionFeature message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.InputDataset + * @memberof google.cloud.dialogflow.v2.SuggestionFeature * @static - * @param {google.cloud.dialogflow.v2.InputDataset} message InputDataset + * @param {google.cloud.dialogflow.v2.SuggestionFeature} message SuggestionFeature * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - InputDataset.toObject = function toObject(message, options) { + SuggestionFeature.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.dataset = ""; - if (message.dataset != null && message.hasOwnProperty("dataset")) - object.dataset = message.dataset; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dialogflow.v2.SuggestionFeature.Type[message.type] === undefined ? message.type : $root.google.cloud.dialogflow.v2.SuggestionFeature.Type[message.type] : message.type; return object; }; /** - * Converts this InputDataset to JSON. + * Converts this SuggestionFeature to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.InputDataset + * @memberof google.cloud.dialogflow.v2.SuggestionFeature * @instance * @returns {Object.} JSON object */ - InputDataset.prototype.toJSON = function toJSON() { + SuggestionFeature.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for InputDataset + * Gets the default type url for SuggestionFeature * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.InputDataset + * @memberof google.cloud.dialogflow.v2.SuggestionFeature * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - InputDataset.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SuggestionFeature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.InputDataset"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.SuggestionFeature"; }; - return InputDataset; + /** + * Type enum. + * @name google.cloud.dialogflow.v2.SuggestionFeature.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} ARTICLE_SUGGESTION=1 ARTICLE_SUGGESTION value + * @property {number} FAQ=2 FAQ value + * @property {number} SMART_REPLY=3 SMART_REPLY value + */ + SuggestionFeature.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ARTICLE_SUGGESTION"] = 1; + values[valuesById[2] = "FAQ"] = 2; + values[valuesById[3] = "SMART_REPLY"] = 3; + return values; + })(); + + return SuggestionFeature; })(); - v2.ArticleSuggestionModelMetadata = (function() { + v2.SetSuggestionFeatureConfigRequest = (function() { /** - * Properties of an ArticleSuggestionModelMetadata. + * Properties of a SetSuggestionFeatureConfigRequest. * @memberof google.cloud.dialogflow.v2 - * @interface IArticleSuggestionModelMetadata - * @property {google.cloud.dialogflow.v2.ConversationModel.ModelType|null} [trainingModelType] ArticleSuggestionModelMetadata trainingModelType + * @interface ISetSuggestionFeatureConfigRequest + * @property {string|null} [conversationProfile] SetSuggestionFeatureConfigRequest conversationProfile + * @property {google.cloud.dialogflow.v2.Participant.Role|null} [participantRole] SetSuggestionFeatureConfigRequest participantRole + * @property {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionFeatureConfig|null} [suggestionFeatureConfig] SetSuggestionFeatureConfigRequest suggestionFeatureConfig */ /** - * Constructs a new ArticleSuggestionModelMetadata. + * Constructs a new SetSuggestionFeatureConfigRequest. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents an ArticleSuggestionModelMetadata. - * @implements IArticleSuggestionModelMetadata + * @classdesc Represents a SetSuggestionFeatureConfigRequest. + * @implements ISetSuggestionFeatureConfigRequest * @constructor - * @param {google.cloud.dialogflow.v2.IArticleSuggestionModelMetadata=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigRequest=} [properties] Properties to set */ - function ArticleSuggestionModelMetadata(properties) { + function SetSuggestionFeatureConfigRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -53251,75 +55842,103 @@ } /** - * ArticleSuggestionModelMetadata trainingModelType. - * @member {google.cloud.dialogflow.v2.ConversationModel.ModelType} trainingModelType - * @memberof google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata + * SetSuggestionFeatureConfigRequest conversationProfile. + * @member {string} conversationProfile + * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest * @instance */ - ArticleSuggestionModelMetadata.prototype.trainingModelType = 0; + SetSuggestionFeatureConfigRequest.prototype.conversationProfile = ""; /** - * Creates a new ArticleSuggestionModelMetadata instance using the specified properties. + * SetSuggestionFeatureConfigRequest participantRole. + * @member {google.cloud.dialogflow.v2.Participant.Role} participantRole + * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest + * @instance + */ + SetSuggestionFeatureConfigRequest.prototype.participantRole = 0; + + /** + * SetSuggestionFeatureConfigRequest suggestionFeatureConfig. + * @member {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionFeatureConfig|null|undefined} suggestionFeatureConfig + * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest + * @instance + */ + SetSuggestionFeatureConfigRequest.prototype.suggestionFeatureConfig = null; + + /** + * Creates a new SetSuggestionFeatureConfigRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata + * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest * @static - * @param {google.cloud.dialogflow.v2.IArticleSuggestionModelMetadata=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata} ArticleSuggestionModelMetadata instance + * @param {google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest} SetSuggestionFeatureConfigRequest instance */ - ArticleSuggestionModelMetadata.create = function create(properties) { - return new ArticleSuggestionModelMetadata(properties); + SetSuggestionFeatureConfigRequest.create = function create(properties) { + return new SetSuggestionFeatureConfigRequest(properties); }; /** - * Encodes the specified ArticleSuggestionModelMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata.verify|verify} messages. + * Encodes the specified SetSuggestionFeatureConfigRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata + * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest * @static - * @param {google.cloud.dialogflow.v2.IArticleSuggestionModelMetadata} message ArticleSuggestionModelMetadata message or plain object to encode + * @param {google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigRequest} message SetSuggestionFeatureConfigRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ArticleSuggestionModelMetadata.encode = function encode(message, writer) { + SetSuggestionFeatureConfigRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.trainingModelType != null && Object.hasOwnProperty.call(message, "trainingModelType")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.trainingModelType); + if (message.conversationProfile != null && Object.hasOwnProperty.call(message, "conversationProfile")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversationProfile); + if (message.participantRole != null && Object.hasOwnProperty.call(message, "participantRole")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.participantRole); + if (message.suggestionFeatureConfig != null && Object.hasOwnProperty.call(message, "suggestionFeatureConfig")) + $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.encode(message.suggestionFeatureConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ArticleSuggestionModelMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata.verify|verify} messages. + * Encodes the specified SetSuggestionFeatureConfigRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata + * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest * @static - * @param {google.cloud.dialogflow.v2.IArticleSuggestionModelMetadata} message ArticleSuggestionModelMetadata message or plain object to encode + * @param {google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigRequest} message SetSuggestionFeatureConfigRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ArticleSuggestionModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { + SetSuggestionFeatureConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ArticleSuggestionModelMetadata message from the specified reader or buffer. + * Decodes a SetSuggestionFeatureConfigRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata + * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata} ArticleSuggestionModelMetadata + * @returns {google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest} SetSuggestionFeatureConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ArticleSuggestionModelMetadata.decode = function decode(reader, length) { + SetSuggestionFeatureConfigRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.conversationProfile = reader.string(); + break; + } + case 2: { + message.participantRole = reader.int32(); + break; + } case 3: { - message.trainingModelType = reader.int32(); + message.suggestionFeatureConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.decode(reader, reader.uint32()); break; } default: @@ -53331,146 +55950,175 @@ }; /** - * Decodes an ArticleSuggestionModelMetadata message from the specified reader or buffer, length delimited. + * Decodes a SetSuggestionFeatureConfigRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata + * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata} ArticleSuggestionModelMetadata + * @returns {google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest} SetSuggestionFeatureConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ArticleSuggestionModelMetadata.decodeDelimited = function decodeDelimited(reader) { + SetSuggestionFeatureConfigRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ArticleSuggestionModelMetadata message. + * Verifies a SetSuggestionFeatureConfigRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata + * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ArticleSuggestionModelMetadata.verify = function verify(message) { + SetSuggestionFeatureConfigRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.trainingModelType != null && message.hasOwnProperty("trainingModelType")) - switch (message.trainingModelType) { + if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) + if (!$util.isString(message.conversationProfile)) + return "conversationProfile: string expected"; + if (message.participantRole != null && message.hasOwnProperty("participantRole")) + switch (message.participantRole) { default: - return "trainingModelType: enum value expected"; + return "participantRole: enum value expected"; case 0: + case 1: case 2: - case 6: + case 3: break; } + if (message.suggestionFeatureConfig != null && message.hasOwnProperty("suggestionFeatureConfig")) { + var error = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.verify(message.suggestionFeatureConfig); + if (error) + return "suggestionFeatureConfig." + error; + } return null; }; /** - * Creates an ArticleSuggestionModelMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a SetSuggestionFeatureConfigRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata + * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata} ArticleSuggestionModelMetadata + * @returns {google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest} SetSuggestionFeatureConfigRequest */ - ArticleSuggestionModelMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata) + SetSuggestionFeatureConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest) return object; - var message = new $root.google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata(); - switch (object.trainingModelType) { + var message = new $root.google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest(); + if (object.conversationProfile != null) + message.conversationProfile = String(object.conversationProfile); + switch (object.participantRole) { default: - if (typeof object.trainingModelType === "number") { - message.trainingModelType = object.trainingModelType; + if (typeof object.participantRole === "number") { + message.participantRole = object.participantRole; break; } break; - case "MODEL_TYPE_UNSPECIFIED": + case "ROLE_UNSPECIFIED": case 0: - message.trainingModelType = 0; + message.participantRole = 0; break; - case "SMART_REPLY_DUAL_ENCODER_MODEL": + case "HUMAN_AGENT": + case 1: + message.participantRole = 1; + break; + case "AUTOMATED_AGENT": case 2: - message.trainingModelType = 2; + message.participantRole = 2; break; - case "SMART_REPLY_BERT_MODEL": - case 6: - message.trainingModelType = 6; + case "END_USER": + case 3: + message.participantRole = 3; break; } + if (object.suggestionFeatureConfig != null) { + if (typeof object.suggestionFeatureConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest.suggestionFeatureConfig: object expected"); + message.suggestionFeatureConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.fromObject(object.suggestionFeatureConfig); + } return message; }; /** - * Creates a plain object from an ArticleSuggestionModelMetadata message. Also converts values to other types if specified. + * Creates a plain object from a SetSuggestionFeatureConfigRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata + * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest * @static - * @param {google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata} message ArticleSuggestionModelMetadata + * @param {google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest} message SetSuggestionFeatureConfigRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ArticleSuggestionModelMetadata.toObject = function toObject(message, options) { + SetSuggestionFeatureConfigRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.trainingModelType = options.enums === String ? "MODEL_TYPE_UNSPECIFIED" : 0; - if (message.trainingModelType != null && message.hasOwnProperty("trainingModelType")) - object.trainingModelType = options.enums === String ? $root.google.cloud.dialogflow.v2.ConversationModel.ModelType[message.trainingModelType] === undefined ? message.trainingModelType : $root.google.cloud.dialogflow.v2.ConversationModel.ModelType[message.trainingModelType] : message.trainingModelType; + if (options.defaults) { + object.conversationProfile = ""; + object.participantRole = options.enums === String ? "ROLE_UNSPECIFIED" : 0; + object.suggestionFeatureConfig = null; + } + if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) + object.conversationProfile = message.conversationProfile; + if (message.participantRole != null && message.hasOwnProperty("participantRole")) + object.participantRole = options.enums === String ? $root.google.cloud.dialogflow.v2.Participant.Role[message.participantRole] === undefined ? message.participantRole : $root.google.cloud.dialogflow.v2.Participant.Role[message.participantRole] : message.participantRole; + if (message.suggestionFeatureConfig != null && message.hasOwnProperty("suggestionFeatureConfig")) + object.suggestionFeatureConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.toObject(message.suggestionFeatureConfig, options); return object; }; /** - * Converts this ArticleSuggestionModelMetadata to JSON. + * Converts this SetSuggestionFeatureConfigRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata + * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest * @instance * @returns {Object.} JSON object */ - ArticleSuggestionModelMetadata.prototype.toJSON = function toJSON() { + SetSuggestionFeatureConfigRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ArticleSuggestionModelMetadata + * Gets the default type url for SetSuggestionFeatureConfigRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata + * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ArticleSuggestionModelMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SetSuggestionFeatureConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest"; }; - return ArticleSuggestionModelMetadata; + return SetSuggestionFeatureConfigRequest; })(); - v2.SmartReplyModelMetadata = (function() { + v2.ClearSuggestionFeatureConfigRequest = (function() { /** - * Properties of a SmartReplyModelMetadata. + * Properties of a ClearSuggestionFeatureConfigRequest. * @memberof google.cloud.dialogflow.v2 - * @interface ISmartReplyModelMetadata - * @property {google.cloud.dialogflow.v2.ConversationModel.ModelType|null} [trainingModelType] SmartReplyModelMetadata trainingModelType + * @interface IClearSuggestionFeatureConfigRequest + * @property {string|null} [conversationProfile] ClearSuggestionFeatureConfigRequest conversationProfile + * @property {google.cloud.dialogflow.v2.Participant.Role|null} [participantRole] ClearSuggestionFeatureConfigRequest participantRole + * @property {google.cloud.dialogflow.v2.SuggestionFeature.Type|null} [suggestionFeatureType] ClearSuggestionFeatureConfigRequest suggestionFeatureType */ /** - * Constructs a new SmartReplyModelMetadata. + * Constructs a new ClearSuggestionFeatureConfigRequest. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a SmartReplyModelMetadata. - * @implements ISmartReplyModelMetadata + * @classdesc Represents a ClearSuggestionFeatureConfigRequest. + * @implements IClearSuggestionFeatureConfigRequest * @constructor - * @param {google.cloud.dialogflow.v2.ISmartReplyModelMetadata=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigRequest=} [properties] Properties to set */ - function SmartReplyModelMetadata(properties) { + function ClearSuggestionFeatureConfigRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -53478,75 +56126,103 @@ } /** - * SmartReplyModelMetadata trainingModelType. - * @member {google.cloud.dialogflow.v2.ConversationModel.ModelType} trainingModelType - * @memberof google.cloud.dialogflow.v2.SmartReplyModelMetadata + * ClearSuggestionFeatureConfigRequest conversationProfile. + * @member {string} conversationProfile + * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest * @instance */ - SmartReplyModelMetadata.prototype.trainingModelType = 0; + ClearSuggestionFeatureConfigRequest.prototype.conversationProfile = ""; /** - * Creates a new SmartReplyModelMetadata instance using the specified properties. + * ClearSuggestionFeatureConfigRequest participantRole. + * @member {google.cloud.dialogflow.v2.Participant.Role} participantRole + * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest + * @instance + */ + ClearSuggestionFeatureConfigRequest.prototype.participantRole = 0; + + /** + * ClearSuggestionFeatureConfigRequest suggestionFeatureType. + * @member {google.cloud.dialogflow.v2.SuggestionFeature.Type} suggestionFeatureType + * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest + * @instance + */ + ClearSuggestionFeatureConfigRequest.prototype.suggestionFeatureType = 0; + + /** + * Creates a new ClearSuggestionFeatureConfigRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.SmartReplyModelMetadata + * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest * @static - * @param {google.cloud.dialogflow.v2.ISmartReplyModelMetadata=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.SmartReplyModelMetadata} SmartReplyModelMetadata instance + * @param {google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest} ClearSuggestionFeatureConfigRequest instance */ - SmartReplyModelMetadata.create = function create(properties) { - return new SmartReplyModelMetadata(properties); + ClearSuggestionFeatureConfigRequest.create = function create(properties) { + return new ClearSuggestionFeatureConfigRequest(properties); }; /** - * Encodes the specified SmartReplyModelMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.SmartReplyModelMetadata.verify|verify} messages. + * Encodes the specified ClearSuggestionFeatureConfigRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.SmartReplyModelMetadata + * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest * @static - * @param {google.cloud.dialogflow.v2.ISmartReplyModelMetadata} message SmartReplyModelMetadata message or plain object to encode + * @param {google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigRequest} message ClearSuggestionFeatureConfigRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SmartReplyModelMetadata.encode = function encode(message, writer) { + ClearSuggestionFeatureConfigRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.trainingModelType != null && Object.hasOwnProperty.call(message, "trainingModelType")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.trainingModelType); + if (message.conversationProfile != null && Object.hasOwnProperty.call(message, "conversationProfile")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversationProfile); + if (message.participantRole != null && Object.hasOwnProperty.call(message, "participantRole")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.participantRole); + if (message.suggestionFeatureType != null && Object.hasOwnProperty.call(message, "suggestionFeatureType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.suggestionFeatureType); return writer; }; /** - * Encodes the specified SmartReplyModelMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.SmartReplyModelMetadata.verify|verify} messages. + * Encodes the specified ClearSuggestionFeatureConfigRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.SmartReplyModelMetadata + * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest * @static - * @param {google.cloud.dialogflow.v2.ISmartReplyModelMetadata} message SmartReplyModelMetadata message or plain object to encode + * @param {google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigRequest} message ClearSuggestionFeatureConfigRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SmartReplyModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { + ClearSuggestionFeatureConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SmartReplyModelMetadata message from the specified reader or buffer. + * Decodes a ClearSuggestionFeatureConfigRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.SmartReplyModelMetadata + * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.SmartReplyModelMetadata} SmartReplyModelMetadata + * @returns {google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest} ClearSuggestionFeatureConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SmartReplyModelMetadata.decode = function decode(reader, length) { + ClearSuggestionFeatureConfigRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.SmartReplyModelMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 6: { - message.trainingModelType = reader.int32(); + case 1: { + message.conversationProfile = reader.string(); + break; + } + case 2: { + message.participantRole = reader.int32(); + break; + } + case 3: { + message.suggestionFeatureType = reader.int32(); break; } default: @@ -53558,149 +56234,200 @@ }; /** - * Decodes a SmartReplyModelMetadata message from the specified reader or buffer, length delimited. + * Decodes a ClearSuggestionFeatureConfigRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.SmartReplyModelMetadata + * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.SmartReplyModelMetadata} SmartReplyModelMetadata + * @returns {google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest} ClearSuggestionFeatureConfigRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SmartReplyModelMetadata.decodeDelimited = function decodeDelimited(reader) { + ClearSuggestionFeatureConfigRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SmartReplyModelMetadata message. + * Verifies a ClearSuggestionFeatureConfigRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2.SmartReplyModelMetadata + * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SmartReplyModelMetadata.verify = function verify(message) { + ClearSuggestionFeatureConfigRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.trainingModelType != null && message.hasOwnProperty("trainingModelType")) - switch (message.trainingModelType) { + if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) + if (!$util.isString(message.conversationProfile)) + return "conversationProfile: string expected"; + if (message.participantRole != null && message.hasOwnProperty("participantRole")) + switch (message.participantRole) { default: - return "trainingModelType: enum value expected"; + return "participantRole: enum value expected"; case 0: + case 1: case 2: - case 6: + case 3: + break; + } + if (message.suggestionFeatureType != null && message.hasOwnProperty("suggestionFeatureType")) + switch (message.suggestionFeatureType) { + default: + return "suggestionFeatureType: enum value expected"; + case 0: + case 1: + case 2: + case 3: break; } return null; }; /** - * Creates a SmartReplyModelMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a ClearSuggestionFeatureConfigRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.SmartReplyModelMetadata + * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.SmartReplyModelMetadata} SmartReplyModelMetadata + * @returns {google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest} ClearSuggestionFeatureConfigRequest */ - SmartReplyModelMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.SmartReplyModelMetadata) + ClearSuggestionFeatureConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest) return object; - var message = new $root.google.cloud.dialogflow.v2.SmartReplyModelMetadata(); - switch (object.trainingModelType) { + var message = new $root.google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest(); + if (object.conversationProfile != null) + message.conversationProfile = String(object.conversationProfile); + switch (object.participantRole) { default: - if (typeof object.trainingModelType === "number") { - message.trainingModelType = object.trainingModelType; + if (typeof object.participantRole === "number") { + message.participantRole = object.participantRole; break; } break; - case "MODEL_TYPE_UNSPECIFIED": + case "ROLE_UNSPECIFIED": case 0: - message.trainingModelType = 0; + message.participantRole = 0; break; - case "SMART_REPLY_DUAL_ENCODER_MODEL": + case "HUMAN_AGENT": + case 1: + message.participantRole = 1; + break; + case "AUTOMATED_AGENT": case 2: - message.trainingModelType = 2; + message.participantRole = 2; break; - case "SMART_REPLY_BERT_MODEL": - case 6: - message.trainingModelType = 6; + case "END_USER": + case 3: + message.participantRole = 3; + break; + } + switch (object.suggestionFeatureType) { + default: + if (typeof object.suggestionFeatureType === "number") { + message.suggestionFeatureType = object.suggestionFeatureType; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.suggestionFeatureType = 0; + break; + case "ARTICLE_SUGGESTION": + case 1: + message.suggestionFeatureType = 1; + break; + case "FAQ": + case 2: + message.suggestionFeatureType = 2; + break; + case "SMART_REPLY": + case 3: + message.suggestionFeatureType = 3; break; } return message; }; /** - * Creates a plain object from a SmartReplyModelMetadata message. Also converts values to other types if specified. + * Creates a plain object from a ClearSuggestionFeatureConfigRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.SmartReplyModelMetadata + * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest * @static - * @param {google.cloud.dialogflow.v2.SmartReplyModelMetadata} message SmartReplyModelMetadata + * @param {google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest} message ClearSuggestionFeatureConfigRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SmartReplyModelMetadata.toObject = function toObject(message, options) { + ClearSuggestionFeatureConfigRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.trainingModelType = options.enums === String ? "MODEL_TYPE_UNSPECIFIED" : 0; - if (message.trainingModelType != null && message.hasOwnProperty("trainingModelType")) - object.trainingModelType = options.enums === String ? $root.google.cloud.dialogflow.v2.ConversationModel.ModelType[message.trainingModelType] === undefined ? message.trainingModelType : $root.google.cloud.dialogflow.v2.ConversationModel.ModelType[message.trainingModelType] : message.trainingModelType; + if (options.defaults) { + object.conversationProfile = ""; + object.participantRole = options.enums === String ? "ROLE_UNSPECIFIED" : 0; + object.suggestionFeatureType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + } + if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) + object.conversationProfile = message.conversationProfile; + if (message.participantRole != null && message.hasOwnProperty("participantRole")) + object.participantRole = options.enums === String ? $root.google.cloud.dialogflow.v2.Participant.Role[message.participantRole] === undefined ? message.participantRole : $root.google.cloud.dialogflow.v2.Participant.Role[message.participantRole] : message.participantRole; + if (message.suggestionFeatureType != null && message.hasOwnProperty("suggestionFeatureType")) + object.suggestionFeatureType = options.enums === String ? $root.google.cloud.dialogflow.v2.SuggestionFeature.Type[message.suggestionFeatureType] === undefined ? message.suggestionFeatureType : $root.google.cloud.dialogflow.v2.SuggestionFeature.Type[message.suggestionFeatureType] : message.suggestionFeatureType; return object; }; /** - * Converts this SmartReplyModelMetadata to JSON. + * Converts this ClearSuggestionFeatureConfigRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.SmartReplyModelMetadata + * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest * @instance * @returns {Object.} JSON object */ - SmartReplyModelMetadata.prototype.toJSON = function toJSON() { + ClearSuggestionFeatureConfigRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SmartReplyModelMetadata + * Gets the default type url for ClearSuggestionFeatureConfigRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.SmartReplyModelMetadata + * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SmartReplyModelMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ClearSuggestionFeatureConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.SmartReplyModelMetadata"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest"; }; - return SmartReplyModelMetadata; + return ClearSuggestionFeatureConfigRequest; })(); - v2.SmartReplyMetrics = (function() { + v2.SetSuggestionFeatureConfigOperationMetadata = (function() { /** - * Properties of a SmartReplyMetrics. + * Properties of a SetSuggestionFeatureConfigOperationMetadata. * @memberof google.cloud.dialogflow.v2 - * @interface ISmartReplyMetrics - * @property {number|null} [allowlistCoverage] SmartReplyMetrics allowlistCoverage - * @property {Array.|null} [topNMetrics] SmartReplyMetrics topNMetrics - * @property {number|Long|null} [conversationCount] SmartReplyMetrics conversationCount + * @interface ISetSuggestionFeatureConfigOperationMetadata + * @property {string|null} [conversationProfile] SetSuggestionFeatureConfigOperationMetadata conversationProfile + * @property {google.cloud.dialogflow.v2.Participant.Role|null} [participantRole] SetSuggestionFeatureConfigOperationMetadata participantRole + * @property {google.cloud.dialogflow.v2.SuggestionFeature.Type|null} [suggestionFeatureType] SetSuggestionFeatureConfigOperationMetadata suggestionFeatureType + * @property {google.protobuf.ITimestamp|null} [createTime] SetSuggestionFeatureConfigOperationMetadata createTime */ /** - * Constructs a new SmartReplyMetrics. + * Constructs a new SetSuggestionFeatureConfigOperationMetadata. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a SmartReplyMetrics. - * @implements ISmartReplyMetrics + * @classdesc Represents a SetSuggestionFeatureConfigOperationMetadata. + * @implements ISetSuggestionFeatureConfigOperationMetadata * @constructor - * @param {google.cloud.dialogflow.v2.ISmartReplyMetrics=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigOperationMetadata=} [properties] Properties to set */ - function SmartReplyMetrics(properties) { - this.topNMetrics = []; + function SetSuggestionFeatureConfigOperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -53708,106 +56435,117 @@ } /** - * SmartReplyMetrics allowlistCoverage. - * @member {number} allowlistCoverage - * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics + * SetSuggestionFeatureConfigOperationMetadata conversationProfile. + * @member {string} conversationProfile + * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata * @instance */ - SmartReplyMetrics.prototype.allowlistCoverage = 0; + SetSuggestionFeatureConfigOperationMetadata.prototype.conversationProfile = ""; /** - * SmartReplyMetrics topNMetrics. - * @member {Array.} topNMetrics - * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics + * SetSuggestionFeatureConfigOperationMetadata participantRole. + * @member {google.cloud.dialogflow.v2.Participant.Role} participantRole + * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata * @instance */ - SmartReplyMetrics.prototype.topNMetrics = $util.emptyArray; + SetSuggestionFeatureConfigOperationMetadata.prototype.participantRole = 0; /** - * SmartReplyMetrics conversationCount. - * @member {number|Long} conversationCount - * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics + * SetSuggestionFeatureConfigOperationMetadata suggestionFeatureType. + * @member {google.cloud.dialogflow.v2.SuggestionFeature.Type} suggestionFeatureType + * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata + * @instance + */ + SetSuggestionFeatureConfigOperationMetadata.prototype.suggestionFeatureType = 0; + + /** + * SetSuggestionFeatureConfigOperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata * @instance */ - SmartReplyMetrics.prototype.conversationCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + SetSuggestionFeatureConfigOperationMetadata.prototype.createTime = null; /** - * Creates a new SmartReplyMetrics instance using the specified properties. + * Creates a new SetSuggestionFeatureConfigOperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics + * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.ISmartReplyMetrics=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.SmartReplyMetrics} SmartReplyMetrics instance + * @param {google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata} SetSuggestionFeatureConfigOperationMetadata instance */ - SmartReplyMetrics.create = function create(properties) { - return new SmartReplyMetrics(properties); + SetSuggestionFeatureConfigOperationMetadata.create = function create(properties) { + return new SetSuggestionFeatureConfigOperationMetadata(properties); }; /** - * Encodes the specified SmartReplyMetrics message. Does not implicitly {@link google.cloud.dialogflow.v2.SmartReplyMetrics.verify|verify} messages. + * Encodes the specified SetSuggestionFeatureConfigOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics + * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.ISmartReplyMetrics} message SmartReplyMetrics message or plain object to encode + * @param {google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigOperationMetadata} message SetSuggestionFeatureConfigOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SmartReplyMetrics.encode = function encode(message, writer) { + SetSuggestionFeatureConfigOperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.allowlistCoverage != null && Object.hasOwnProperty.call(message, "allowlistCoverage")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.allowlistCoverage); - if (message.topNMetrics != null && message.topNMetrics.length) - for (var i = 0; i < message.topNMetrics.length; ++i) - $root.google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics.encode(message.topNMetrics[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.conversationCount != null && Object.hasOwnProperty.call(message, "conversationCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.conversationCount); + if (message.conversationProfile != null && Object.hasOwnProperty.call(message, "conversationProfile")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversationProfile); + if (message.participantRole != null && Object.hasOwnProperty.call(message, "participantRole")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.participantRole); + if (message.suggestionFeatureType != null && Object.hasOwnProperty.call(message, "suggestionFeatureType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.suggestionFeatureType); + 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(); return writer; }; /** - * Encodes the specified SmartReplyMetrics message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.SmartReplyMetrics.verify|verify} messages. + * Encodes the specified SetSuggestionFeatureConfigOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics + * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.ISmartReplyMetrics} message SmartReplyMetrics message or plain object to encode + * @param {google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigOperationMetadata} message SetSuggestionFeatureConfigOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SmartReplyMetrics.encodeDelimited = function encodeDelimited(message, writer) { + SetSuggestionFeatureConfigOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SmartReplyMetrics message from the specified reader or buffer. + * Decodes a SetSuggestionFeatureConfigOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics + * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.SmartReplyMetrics} SmartReplyMetrics + * @returns {google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata} SetSuggestionFeatureConfigOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SmartReplyMetrics.decode = function decode(reader, length) { + SetSuggestionFeatureConfigOperationMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.SmartReplyMetrics(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.allowlistCoverage = reader.float(); + message.conversationProfile = reader.string(); break; } case 2: { - if (!(message.topNMetrics && message.topNMetrics.length)) - message.topNMetrics = []; - message.topNMetrics.push($root.google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics.decode(reader, reader.uint32())); + message.participantRole = reader.int32(); break; } case 3: { - message.conversationCount = reader.int64(); + message.suggestionFeatureType = reader.int32(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } default: @@ -53819,399 +56557,213 @@ }; /** - * Decodes a SmartReplyMetrics message from the specified reader or buffer, length delimited. + * Decodes a SetSuggestionFeatureConfigOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics + * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.SmartReplyMetrics} SmartReplyMetrics + * @returns {google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata} SetSuggestionFeatureConfigOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SmartReplyMetrics.decodeDelimited = function decodeDelimited(reader) { + SetSuggestionFeatureConfigOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SmartReplyMetrics message. + * Verifies a SetSuggestionFeatureConfigOperationMetadata message. * @function verify - * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics + * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SmartReplyMetrics.verify = function verify(message) { + SetSuggestionFeatureConfigOperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.allowlistCoverage != null && message.hasOwnProperty("allowlistCoverage")) - if (typeof message.allowlistCoverage !== "number") - return "allowlistCoverage: number expected"; - if (message.topNMetrics != null && message.hasOwnProperty("topNMetrics")) { - if (!Array.isArray(message.topNMetrics)) - return "topNMetrics: array expected"; - for (var i = 0; i < message.topNMetrics.length; ++i) { - var error = $root.google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics.verify(message.topNMetrics[i]); - if (error) - return "topNMetrics." + error; + if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) + if (!$util.isString(message.conversationProfile)) + return "conversationProfile: string expected"; + if (message.participantRole != null && message.hasOwnProperty("participantRole")) + switch (message.participantRole) { + default: + return "participantRole: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.suggestionFeatureType != null && message.hasOwnProperty("suggestionFeatureType")) + switch (message.suggestionFeatureType) { + default: + return "suggestionFeatureType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; } - if (message.conversationCount != null && message.hasOwnProperty("conversationCount")) - if (!$util.isInteger(message.conversationCount) && !(message.conversationCount && $util.isInteger(message.conversationCount.low) && $util.isInteger(message.conversationCount.high))) - return "conversationCount: integer|Long expected"; return null; }; /** - * Creates a SmartReplyMetrics message from a plain object. Also converts values to their respective internal types. + * Creates a SetSuggestionFeatureConfigOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics + * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.SmartReplyMetrics} SmartReplyMetrics + * @returns {google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata} SetSuggestionFeatureConfigOperationMetadata */ - SmartReplyMetrics.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.SmartReplyMetrics) + SetSuggestionFeatureConfigOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata) return object; - var message = new $root.google.cloud.dialogflow.v2.SmartReplyMetrics(); - if (object.allowlistCoverage != null) - message.allowlistCoverage = Number(object.allowlistCoverage); - if (object.topNMetrics) { - if (!Array.isArray(object.topNMetrics)) - throw TypeError(".google.cloud.dialogflow.v2.SmartReplyMetrics.topNMetrics: array expected"); - message.topNMetrics = []; - for (var i = 0; i < object.topNMetrics.length; ++i) { - if (typeof object.topNMetrics[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2.SmartReplyMetrics.topNMetrics: object expected"); - message.topNMetrics[i] = $root.google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics.fromObject(object.topNMetrics[i]); + var message = new $root.google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata(); + if (object.conversationProfile != null) + message.conversationProfile = String(object.conversationProfile); + switch (object.participantRole) { + default: + if (typeof object.participantRole === "number") { + message.participantRole = object.participantRole; + break; } + break; + case "ROLE_UNSPECIFIED": + case 0: + message.participantRole = 0; + break; + case "HUMAN_AGENT": + case 1: + message.participantRole = 1; + break; + case "AUTOMATED_AGENT": + case 2: + message.participantRole = 2; + break; + case "END_USER": + case 3: + message.participantRole = 3; + break; + } + switch (object.suggestionFeatureType) { + default: + if (typeof object.suggestionFeatureType === "number") { + message.suggestionFeatureType = object.suggestionFeatureType; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.suggestionFeatureType = 0; + break; + case "ARTICLE_SUGGESTION": + case 1: + message.suggestionFeatureType = 1; + break; + case "FAQ": + case 2: + message.suggestionFeatureType = 2; + break; + case "SMART_REPLY": + case 3: + message.suggestionFeatureType = 3; + break; + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - if (object.conversationCount != null) - if ($util.Long) - (message.conversationCount = $util.Long.fromValue(object.conversationCount)).unsigned = false; - else if (typeof object.conversationCount === "string") - message.conversationCount = parseInt(object.conversationCount, 10); - else if (typeof object.conversationCount === "number") - message.conversationCount = object.conversationCount; - else if (typeof object.conversationCount === "object") - message.conversationCount = new $util.LongBits(object.conversationCount.low >>> 0, object.conversationCount.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a SmartReplyMetrics message. Also converts values to other types if specified. + * Creates a plain object from a SetSuggestionFeatureConfigOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics + * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.SmartReplyMetrics} message SmartReplyMetrics + * @param {google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata} message SetSuggestionFeatureConfigOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SmartReplyMetrics.toObject = function toObject(message, options) { + SetSuggestionFeatureConfigOperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.topNMetrics = []; if (options.defaults) { - object.allowlistCoverage = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.conversationCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.conversationCount = options.longs === String ? "0" : 0; - } - if (message.allowlistCoverage != null && message.hasOwnProperty("allowlistCoverage")) - object.allowlistCoverage = options.json && !isFinite(message.allowlistCoverage) ? String(message.allowlistCoverage) : message.allowlistCoverage; - if (message.topNMetrics && message.topNMetrics.length) { - object.topNMetrics = []; - for (var j = 0; j < message.topNMetrics.length; ++j) - object.topNMetrics[j] = $root.google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics.toObject(message.topNMetrics[j], options); + object.conversationProfile = ""; + object.participantRole = options.enums === String ? "ROLE_UNSPECIFIED" : 0; + object.suggestionFeatureType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.createTime = null; } - if (message.conversationCount != null && message.hasOwnProperty("conversationCount")) - if (typeof message.conversationCount === "number") - object.conversationCount = options.longs === String ? String(message.conversationCount) : message.conversationCount; - else - object.conversationCount = options.longs === String ? $util.Long.prototype.toString.call(message.conversationCount) : options.longs === Number ? new $util.LongBits(message.conversationCount.low >>> 0, message.conversationCount.high >>> 0).toNumber() : message.conversationCount; + if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) + object.conversationProfile = message.conversationProfile; + if (message.participantRole != null && message.hasOwnProperty("participantRole")) + object.participantRole = options.enums === String ? $root.google.cloud.dialogflow.v2.Participant.Role[message.participantRole] === undefined ? message.participantRole : $root.google.cloud.dialogflow.v2.Participant.Role[message.participantRole] : message.participantRole; + if (message.suggestionFeatureType != null && message.hasOwnProperty("suggestionFeatureType")) + object.suggestionFeatureType = options.enums === String ? $root.google.cloud.dialogflow.v2.SuggestionFeature.Type[message.suggestionFeatureType] === undefined ? message.suggestionFeatureType : $root.google.cloud.dialogflow.v2.SuggestionFeature.Type[message.suggestionFeatureType] : message.suggestionFeatureType; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); return object; }; /** - * Converts this SmartReplyMetrics to JSON. + * Converts this SetSuggestionFeatureConfigOperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics + * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata * @instance * @returns {Object.} JSON object */ - SmartReplyMetrics.prototype.toJSON = function toJSON() { + SetSuggestionFeatureConfigOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SmartReplyMetrics + * Gets the default type url for SetSuggestionFeatureConfigOperationMetadata * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics + * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SmartReplyMetrics.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SetSuggestionFeatureConfigOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.SmartReplyMetrics"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata"; }; - SmartReplyMetrics.TopNMetrics = (function() { - - /** - * Properties of a TopNMetrics. - * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics - * @interface ITopNMetrics - * @property {number|null} [n] TopNMetrics n - * @property {number|null} [recall] TopNMetrics recall - */ - - /** - * Constructs a new TopNMetrics. - * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics - * @classdesc Represents a TopNMetrics. - * @implements ITopNMetrics - * @constructor - * @param {google.cloud.dialogflow.v2.SmartReplyMetrics.ITopNMetrics=} [properties] Properties to set - */ - function TopNMetrics(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]]; - } - - /** - * TopNMetrics n. - * @member {number} n - * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics - * @instance - */ - TopNMetrics.prototype.n = 0; - - /** - * TopNMetrics recall. - * @member {number} recall - * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics - * @instance - */ - TopNMetrics.prototype.recall = 0; - - /** - * Creates a new TopNMetrics instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics - * @static - * @param {google.cloud.dialogflow.v2.SmartReplyMetrics.ITopNMetrics=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics} TopNMetrics instance - */ - TopNMetrics.create = function create(properties) { - return new TopNMetrics(properties); - }; - - /** - * Encodes the specified TopNMetrics message. Does not implicitly {@link google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics - * @static - * @param {google.cloud.dialogflow.v2.SmartReplyMetrics.ITopNMetrics} message TopNMetrics message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TopNMetrics.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.n != null && Object.hasOwnProperty.call(message, "n")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.n); - if (message.recall != null && Object.hasOwnProperty.call(message, "recall")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.recall); - return writer; - }; - - /** - * Encodes the specified TopNMetrics message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics - * @static - * @param {google.cloud.dialogflow.v2.SmartReplyMetrics.ITopNMetrics} message TopNMetrics message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TopNMetrics.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TopNMetrics message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics} TopNMetrics - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TopNMetrics.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.n = reader.int32(); - break; - } - case 2: { - message.recall = reader.float(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TopNMetrics message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics} TopNMetrics - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TopNMetrics.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TopNMetrics message. - * @function verify - * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TopNMetrics.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.n != null && message.hasOwnProperty("n")) - if (!$util.isInteger(message.n)) - return "n: integer expected"; - if (message.recall != null && message.hasOwnProperty("recall")) - if (typeof message.recall !== "number") - return "recall: number expected"; - return null; - }; - - /** - * Creates a TopNMetrics message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics} TopNMetrics - */ - TopNMetrics.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics) - return object; - var message = new $root.google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics(); - if (object.n != null) - message.n = object.n | 0; - if (object.recall != null) - message.recall = Number(object.recall); - return message; - }; - - /** - * Creates a plain object from a TopNMetrics message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics - * @static - * @param {google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics} message TopNMetrics - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TopNMetrics.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.n = 0; - object.recall = 0; - } - if (message.n != null && message.hasOwnProperty("n")) - object.n = message.n; - if (message.recall != null && message.hasOwnProperty("recall")) - object.recall = options.json && !isFinite(message.recall) ? String(message.recall) : message.recall; - return object; - }; - - /** - * Converts this TopNMetrics to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics - * @instance - * @returns {Object.} JSON object - */ - TopNMetrics.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TopNMetrics - * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TopNMetrics.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics"; - }; - - return TopNMetrics; - })(); - - return SmartReplyMetrics; + return SetSuggestionFeatureConfigOperationMetadata; })(); - v2.CreateConversationModelRequest = (function() { + v2.ClearSuggestionFeatureConfigOperationMetadata = (function() { /** - * Properties of a CreateConversationModelRequest. + * Properties of a ClearSuggestionFeatureConfigOperationMetadata. * @memberof google.cloud.dialogflow.v2 - * @interface ICreateConversationModelRequest - * @property {string|null} [parent] CreateConversationModelRequest parent - * @property {google.cloud.dialogflow.v2.IConversationModel|null} [conversationModel] CreateConversationModelRequest conversationModel + * @interface IClearSuggestionFeatureConfigOperationMetadata + * @property {string|null} [conversationProfile] ClearSuggestionFeatureConfigOperationMetadata conversationProfile + * @property {google.cloud.dialogflow.v2.Participant.Role|null} [participantRole] ClearSuggestionFeatureConfigOperationMetadata participantRole + * @property {google.cloud.dialogflow.v2.SuggestionFeature.Type|null} [suggestionFeatureType] ClearSuggestionFeatureConfigOperationMetadata suggestionFeatureType + * @property {google.protobuf.ITimestamp|null} [createTime] ClearSuggestionFeatureConfigOperationMetadata createTime */ /** - * Constructs a new CreateConversationModelRequest. + * Constructs a new ClearSuggestionFeatureConfigOperationMetadata. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a CreateConversationModelRequest. - * @implements ICreateConversationModelRequest + * @classdesc Represents a ClearSuggestionFeatureConfigOperationMetadata. + * @implements IClearSuggestionFeatureConfigOperationMetadata * @constructor - * @param {google.cloud.dialogflow.v2.ICreateConversationModelRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigOperationMetadata=} [properties] Properties to set */ - function CreateConversationModelRequest(properties) { + function ClearSuggestionFeatureConfigOperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -54219,89 +56771,117 @@ } /** - * CreateConversationModelRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.v2.CreateConversationModelRequest + * ClearSuggestionFeatureConfigOperationMetadata conversationProfile. + * @member {string} conversationProfile + * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata * @instance */ - CreateConversationModelRequest.prototype.parent = ""; + ClearSuggestionFeatureConfigOperationMetadata.prototype.conversationProfile = ""; /** - * CreateConversationModelRequest conversationModel. - * @member {google.cloud.dialogflow.v2.IConversationModel|null|undefined} conversationModel - * @memberof google.cloud.dialogflow.v2.CreateConversationModelRequest + * ClearSuggestionFeatureConfigOperationMetadata participantRole. + * @member {google.cloud.dialogflow.v2.Participant.Role} participantRole + * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata * @instance */ - CreateConversationModelRequest.prototype.conversationModel = null; + ClearSuggestionFeatureConfigOperationMetadata.prototype.participantRole = 0; /** - * Creates a new CreateConversationModelRequest instance using the specified properties. + * ClearSuggestionFeatureConfigOperationMetadata suggestionFeatureType. + * @member {google.cloud.dialogflow.v2.SuggestionFeature.Type} suggestionFeatureType + * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata + * @instance + */ + ClearSuggestionFeatureConfigOperationMetadata.prototype.suggestionFeatureType = 0; + + /** + * ClearSuggestionFeatureConfigOperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata + * @instance + */ + ClearSuggestionFeatureConfigOperationMetadata.prototype.createTime = null; + + /** + * Creates a new ClearSuggestionFeatureConfigOperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.CreateConversationModelRequest + * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.ICreateConversationModelRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.CreateConversationModelRequest} CreateConversationModelRequest instance + * @param {google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata} ClearSuggestionFeatureConfigOperationMetadata instance */ - CreateConversationModelRequest.create = function create(properties) { - return new CreateConversationModelRequest(properties); + ClearSuggestionFeatureConfigOperationMetadata.create = function create(properties) { + return new ClearSuggestionFeatureConfigOperationMetadata(properties); }; /** - * Encodes the specified CreateConversationModelRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationModelRequest.verify|verify} messages. + * Encodes the specified ClearSuggestionFeatureConfigOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.CreateConversationModelRequest + * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.ICreateConversationModelRequest} message CreateConversationModelRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigOperationMetadata} message ClearSuggestionFeatureConfigOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateConversationModelRequest.encode = function encode(message, writer) { + ClearSuggestionFeatureConfigOperationMetadata.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.conversationModel != null && Object.hasOwnProperty.call(message, "conversationModel")) - $root.google.cloud.dialogflow.v2.ConversationModel.encode(message.conversationModel, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.conversationProfile != null && Object.hasOwnProperty.call(message, "conversationProfile")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversationProfile); + if (message.participantRole != null && Object.hasOwnProperty.call(message, "participantRole")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.participantRole); + if (message.suggestionFeatureType != null && Object.hasOwnProperty.call(message, "suggestionFeatureType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.suggestionFeatureType); + 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(); return writer; }; /** - * Encodes the specified CreateConversationModelRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationModelRequest.verify|verify} messages. + * Encodes the specified ClearSuggestionFeatureConfigOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.CreateConversationModelRequest + * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.ICreateConversationModelRequest} message CreateConversationModelRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigOperationMetadata} message ClearSuggestionFeatureConfigOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateConversationModelRequest.encodeDelimited = function encodeDelimited(message, writer) { + ClearSuggestionFeatureConfigOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateConversationModelRequest message from the specified reader or buffer. + * Decodes a ClearSuggestionFeatureConfigOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.CreateConversationModelRequest + * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.CreateConversationModelRequest} CreateConversationModelRequest + * @returns {google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata} ClearSuggestionFeatureConfigOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateConversationModelRequest.decode = function decode(reader, length) { + ClearSuggestionFeatureConfigOperationMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.CreateConversationModelRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.conversationProfile = reader.string(); break; } case 2: { - message.conversationModel = $root.google.cloud.dialogflow.v2.ConversationModel.decode(reader, reader.uint32()); + message.participantRole = reader.int32(); + break; + } + case 3: { + message.suggestionFeatureType = reader.int32(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } default: @@ -54313,341 +56893,410 @@ }; /** - * Decodes a CreateConversationModelRequest message from the specified reader or buffer, length delimited. + * Decodes a ClearSuggestionFeatureConfigOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.CreateConversationModelRequest + * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.CreateConversationModelRequest} CreateConversationModelRequest + * @returns {google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata} ClearSuggestionFeatureConfigOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateConversationModelRequest.decodeDelimited = function decodeDelimited(reader) { + ClearSuggestionFeatureConfigOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateConversationModelRequest message. + * Verifies a ClearSuggestionFeatureConfigOperationMetadata message. * @function verify - * @memberof google.cloud.dialogflow.v2.CreateConversationModelRequest + * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateConversationModelRequest.verify = function verify(message) { + ClearSuggestionFeatureConfigOperationMetadata.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.conversationModel != null && message.hasOwnProperty("conversationModel")) { - var error = $root.google.cloud.dialogflow.v2.ConversationModel.verify(message.conversationModel); + if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) + if (!$util.isString(message.conversationProfile)) + return "conversationProfile: string expected"; + if (message.participantRole != null && message.hasOwnProperty("participantRole")) + switch (message.participantRole) { + default: + return "participantRole: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.suggestionFeatureType != null && message.hasOwnProperty("suggestionFeatureType")) + switch (message.suggestionFeatureType) { + default: + return "suggestionFeatureType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) - return "conversationModel." + error; + return "createTime." + error; } return null; }; /** - * Creates a CreateConversationModelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ClearSuggestionFeatureConfigOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.CreateConversationModelRequest + * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.CreateConversationModelRequest} CreateConversationModelRequest + * @returns {google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata} ClearSuggestionFeatureConfigOperationMetadata */ - CreateConversationModelRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.CreateConversationModelRequest) + ClearSuggestionFeatureConfigOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata) return object; - var message = new $root.google.cloud.dialogflow.v2.CreateConversationModelRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.conversationModel != null) { - if (typeof object.conversationModel !== "object") - throw TypeError(".google.cloud.dialogflow.v2.CreateConversationModelRequest.conversationModel: object expected"); - message.conversationModel = $root.google.cloud.dialogflow.v2.ConversationModel.fromObject(object.conversationModel); + var message = new $root.google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata(); + if (object.conversationProfile != null) + message.conversationProfile = String(object.conversationProfile); + switch (object.participantRole) { + default: + if (typeof object.participantRole === "number") { + message.participantRole = object.participantRole; + break; + } + break; + case "ROLE_UNSPECIFIED": + case 0: + message.participantRole = 0; + break; + case "HUMAN_AGENT": + case 1: + message.participantRole = 1; + break; + case "AUTOMATED_AGENT": + case 2: + message.participantRole = 2; + break; + case "END_USER": + case 3: + message.participantRole = 3; + break; + } + switch (object.suggestionFeatureType) { + default: + if (typeof object.suggestionFeatureType === "number") { + message.suggestionFeatureType = object.suggestionFeatureType; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.suggestionFeatureType = 0; + break; + case "ARTICLE_SUGGESTION": + case 1: + message.suggestionFeatureType = 1; + break; + case "FAQ": + case 2: + message.suggestionFeatureType = 2; + break; + case "SMART_REPLY": + case 3: + message.suggestionFeatureType = 3; + break; + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } return message; }; /** - * Creates a plain object from a CreateConversationModelRequest message. Also converts values to other types if specified. + * Creates a plain object from a ClearSuggestionFeatureConfigOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.CreateConversationModelRequest + * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.CreateConversationModelRequest} message CreateConversationModelRequest + * @param {google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata} message ClearSuggestionFeatureConfigOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateConversationModelRequest.toObject = function toObject(message, options) { + ClearSuggestionFeatureConfigOperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.conversationModel = null; + object.conversationProfile = ""; + object.participantRole = options.enums === String ? "ROLE_UNSPECIFIED" : 0; + object.suggestionFeatureType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.createTime = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.conversationModel != null && message.hasOwnProperty("conversationModel")) - object.conversationModel = $root.google.cloud.dialogflow.v2.ConversationModel.toObject(message.conversationModel, options); + if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) + object.conversationProfile = message.conversationProfile; + if (message.participantRole != null && message.hasOwnProperty("participantRole")) + object.participantRole = options.enums === String ? $root.google.cloud.dialogflow.v2.Participant.Role[message.participantRole] === undefined ? message.participantRole : $root.google.cloud.dialogflow.v2.Participant.Role[message.participantRole] : message.participantRole; + if (message.suggestionFeatureType != null && message.hasOwnProperty("suggestionFeatureType")) + object.suggestionFeatureType = options.enums === String ? $root.google.cloud.dialogflow.v2.SuggestionFeature.Type[message.suggestionFeatureType] === undefined ? message.suggestionFeatureType : $root.google.cloud.dialogflow.v2.SuggestionFeature.Type[message.suggestionFeatureType] : message.suggestionFeatureType; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); return object; }; /** - * Converts this CreateConversationModelRequest to JSON. + * Converts this ClearSuggestionFeatureConfigOperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.CreateConversationModelRequest + * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata * @instance * @returns {Object.} JSON object */ - CreateConversationModelRequest.prototype.toJSON = function toJSON() { + ClearSuggestionFeatureConfigOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateConversationModelRequest + * Gets the default type url for ClearSuggestionFeatureConfigOperationMetadata * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.CreateConversationModelRequest + * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateConversationModelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ClearSuggestionFeatureConfigOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.CreateConversationModelRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata"; }; - return CreateConversationModelRequest; + return ClearSuggestionFeatureConfigOperationMetadata; })(); - v2.GetConversationModelRequest = (function() { + v2.ConversationDatasets = (function() { /** - * Properties of a GetConversationModelRequest. + * Constructs a new ConversationDatasets service. * @memberof google.cloud.dialogflow.v2 - * @interface IGetConversationModelRequest - * @property {string|null} [name] GetConversationModelRequest name + * @classdesc Represents a ConversationDatasets + * @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 ConversationDatasets(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ConversationDatasets.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ConversationDatasets; /** - * Constructs a new GetConversationModelRequest. - * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a GetConversationModelRequest. - * @implements IGetConversationModelRequest - * @constructor - * @param {google.cloud.dialogflow.v2.IGetConversationModelRequest=} [properties] Properties to set + * Creates new ConversationDatasets service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.v2.ConversationDatasets + * @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 {ConversationDatasets} RPC service. Useful where requests and/or responses are streamed. */ - function GetConversationModelRequest(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]]; - } + ConversationDatasets.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * GetConversationModelRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2.GetConversationModelRequest + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationDatasets|createConversationDataset}. + * @memberof google.cloud.dialogflow.v2.ConversationDatasets + * @typedef CreateConversationDatasetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateConversationDataset. + * @function createConversationDataset + * @memberof google.cloud.dialogflow.v2.ConversationDatasets * @instance + * @param {google.cloud.dialogflow.v2.ICreateConversationDatasetRequest} request CreateConversationDatasetRequest message or plain object + * @param {google.cloud.dialogflow.v2.ConversationDatasets.CreateConversationDatasetCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - GetConversationModelRequest.prototype.name = ""; + Object.defineProperty(ConversationDatasets.prototype.createConversationDataset = function createConversationDataset(request, callback) { + return this.rpcCall(createConversationDataset, $root.google.cloud.dialogflow.v2.CreateConversationDatasetRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateConversationDataset" }); /** - * Creates a new GetConversationModelRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2.GetConversationModelRequest - * @static - * @param {google.cloud.dialogflow.v2.IGetConversationModelRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.GetConversationModelRequest} GetConversationModelRequest instance + * Calls CreateConversationDataset. + * @function createConversationDataset + * @memberof google.cloud.dialogflow.v2.ConversationDatasets + * @instance + * @param {google.cloud.dialogflow.v2.ICreateConversationDatasetRequest} request CreateConversationDatasetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetConversationModelRequest.create = function create(properties) { - return new GetConversationModelRequest(properties); - }; /** - * Encodes the specified GetConversationModelRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.GetConversationModelRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2.GetConversationModelRequest - * @static - * @param {google.cloud.dialogflow.v2.IGetConversationModelRequest} message GetConversationModelRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationDatasets|getConversationDataset}. + * @memberof google.cloud.dialogflow.v2.ConversationDatasets + * @typedef GetConversationDatasetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2.ConversationDataset} [response] ConversationDataset */ - GetConversationModelRequest.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 GetConversationModelRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.GetConversationModelRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.GetConversationModelRequest - * @static - * @param {google.cloud.dialogflow.v2.IGetConversationModelRequest} message GetConversationModelRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetConversationDataset. + * @function getConversationDataset + * @memberof google.cloud.dialogflow.v2.ConversationDatasets + * @instance + * @param {google.cloud.dialogflow.v2.IGetConversationDatasetRequest} request GetConversationDatasetRequest message or plain object + * @param {google.cloud.dialogflow.v2.ConversationDatasets.GetConversationDatasetCallback} callback Node-style callback called with the error, if any, and ConversationDataset + * @returns {undefined} + * @variation 1 */ - GetConversationModelRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(ConversationDatasets.prototype.getConversationDataset = function getConversationDataset(request, callback) { + return this.rpcCall(getConversationDataset, $root.google.cloud.dialogflow.v2.GetConversationDatasetRequest, $root.google.cloud.dialogflow.v2.ConversationDataset, request, callback); + }, "name", { value: "GetConversationDataset" }); /** - * Decodes a GetConversationModelRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2.GetConversationModelRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.GetConversationModelRequest} GetConversationModelRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetConversationDataset. + * @function getConversationDataset + * @memberof google.cloud.dialogflow.v2.ConversationDatasets + * @instance + * @param {google.cloud.dialogflow.v2.IGetConversationDatasetRequest} request GetConversationDatasetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetConversationModelRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.GetConversationModelRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a GetConversationModelRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.GetConversationModelRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.GetConversationModelRequest} GetConversationModelRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationDatasets|listConversationDatasets}. + * @memberof google.cloud.dialogflow.v2.ConversationDatasets + * @typedef ListConversationDatasetsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2.ListConversationDatasetsResponse} [response] ListConversationDatasetsResponse */ - GetConversationModelRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a GetConversationModelRequest message. - * @function verify - * @memberof google.cloud.dialogflow.v2.GetConversationModelRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls ListConversationDatasets. + * @function listConversationDatasets + * @memberof google.cloud.dialogflow.v2.ConversationDatasets + * @instance + * @param {google.cloud.dialogflow.v2.IListConversationDatasetsRequest} request ListConversationDatasetsRequest message or plain object + * @param {google.cloud.dialogflow.v2.ConversationDatasets.ListConversationDatasetsCallback} callback Node-style callback called with the error, if any, and ListConversationDatasetsResponse + * @returns {undefined} + * @variation 1 */ - GetConversationModelRequest.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; - }; + Object.defineProperty(ConversationDatasets.prototype.listConversationDatasets = function listConversationDatasets(request, callback) { + return this.rpcCall(listConversationDatasets, $root.google.cloud.dialogflow.v2.ListConversationDatasetsRequest, $root.google.cloud.dialogflow.v2.ListConversationDatasetsResponse, request, callback); + }, "name", { value: "ListConversationDatasets" }); /** - * Creates a GetConversationModelRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2.GetConversationModelRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.GetConversationModelRequest} GetConversationModelRequest + * Calls ListConversationDatasets. + * @function listConversationDatasets + * @memberof google.cloud.dialogflow.v2.ConversationDatasets + * @instance + * @param {google.cloud.dialogflow.v2.IListConversationDatasetsRequest} request ListConversationDatasetsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetConversationModelRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.GetConversationModelRequest) - return object; - var message = new $root.google.cloud.dialogflow.v2.GetConversationModelRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; /** - * Creates a plain object from a GetConversationModelRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2.GetConversationModelRequest - * @static - * @param {google.cloud.dialogflow.v2.GetConversationModelRequest} message GetConversationModelRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationDatasets|deleteConversationDataset}. + * @memberof google.cloud.dialogflow.v2.ConversationDatasets + * @typedef DeleteConversationDatasetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteConversationDataset. + * @function deleteConversationDataset + * @memberof google.cloud.dialogflow.v2.ConversationDatasets + * @instance + * @param {google.cloud.dialogflow.v2.IDeleteConversationDatasetRequest} request DeleteConversationDatasetRequest message or plain object + * @param {google.cloud.dialogflow.v2.ConversationDatasets.DeleteConversationDatasetCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConversationDatasets.prototype.deleteConversationDataset = function deleteConversationDataset(request, callback) { + return this.rpcCall(deleteConversationDataset, $root.google.cloud.dialogflow.v2.DeleteConversationDatasetRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteConversationDataset" }); + + /** + * Calls DeleteConversationDataset. + * @function deleteConversationDataset + * @memberof google.cloud.dialogflow.v2.ConversationDatasets + * @instance + * @param {google.cloud.dialogflow.v2.IDeleteConversationDatasetRequest} request DeleteConversationDatasetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationDatasets|importConversationData}. + * @memberof google.cloud.dialogflow.v2.ConversationDatasets + * @typedef ImportConversationDataCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - GetConversationModelRequest.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 GetConversationModelRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2.GetConversationModelRequest + * Calls ImportConversationData. + * @function importConversationData + * @memberof google.cloud.dialogflow.v2.ConversationDatasets * @instance - * @returns {Object.} JSON object + * @param {google.cloud.dialogflow.v2.IImportConversationDataRequest} request ImportConversationDataRequest message or plain object + * @param {google.cloud.dialogflow.v2.ConversationDatasets.ImportConversationDataCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - GetConversationModelRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(ConversationDatasets.prototype.importConversationData = function importConversationData(request, callback) { + return this.rpcCall(importConversationData, $root.google.cloud.dialogflow.v2.ImportConversationDataRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ImportConversationData" }); /** - * Gets the default type url for GetConversationModelRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.GetConversationModelRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Calls ImportConversationData. + * @function importConversationData + * @memberof google.cloud.dialogflow.v2.ConversationDatasets + * @instance + * @param {google.cloud.dialogflow.v2.IImportConversationDataRequest} request ImportConversationDataRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - GetConversationModelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.GetConversationModelRequest"; - }; - return GetConversationModelRequest; + return ConversationDatasets; })(); - v2.ListConversationModelsRequest = (function() { + v2.ConversationInfo = (function() { /** - * Properties of a ListConversationModelsRequest. + * Properties of a ConversationInfo. * @memberof google.cloud.dialogflow.v2 - * @interface IListConversationModelsRequest - * @property {string|null} [parent] ListConversationModelsRequest parent - * @property {number|null} [pageSize] ListConversationModelsRequest pageSize - * @property {string|null} [pageToken] ListConversationModelsRequest pageToken + * @interface IConversationInfo + * @property {string|null} [languageCode] ConversationInfo languageCode */ /** - * Constructs a new ListConversationModelsRequest. + * Constructs a new ConversationInfo. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a ListConversationModelsRequest. - * @implements IListConversationModelsRequest + * @classdesc Represents a ConversationInfo. + * @implements IConversationInfo * @constructor - * @param {google.cloud.dialogflow.v2.IListConversationModelsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.IConversationInfo=} [properties] Properties to set */ - function ListConversationModelsRequest(properties) { + function ConversationInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -54655,103 +57304,75 @@ } /** - * ListConversationModelsRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.v2.ListConversationModelsRequest - * @instance - */ - ListConversationModelsRequest.prototype.parent = ""; - - /** - * ListConversationModelsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.v2.ListConversationModelsRequest - * @instance - */ - ListConversationModelsRequest.prototype.pageSize = 0; - - /** - * ListConversationModelsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.v2.ListConversationModelsRequest + * ConversationInfo languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.v2.ConversationInfo * @instance */ - ListConversationModelsRequest.prototype.pageToken = ""; + ConversationInfo.prototype.languageCode = ""; /** - * Creates a new ListConversationModelsRequest instance using the specified properties. + * Creates a new ConversationInfo instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.ListConversationModelsRequest + * @memberof google.cloud.dialogflow.v2.ConversationInfo * @static - * @param {google.cloud.dialogflow.v2.IListConversationModelsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.ListConversationModelsRequest} ListConversationModelsRequest instance + * @param {google.cloud.dialogflow.v2.IConversationInfo=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.ConversationInfo} ConversationInfo instance */ - ListConversationModelsRequest.create = function create(properties) { - return new ListConversationModelsRequest(properties); + ConversationInfo.create = function create(properties) { + return new ConversationInfo(properties); }; /** - * Encodes the specified ListConversationModelsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationModelsRequest.verify|verify} messages. + * Encodes the specified ConversationInfo message. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationInfo.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.ListConversationModelsRequest + * @memberof google.cloud.dialogflow.v2.ConversationInfo * @static - * @param {google.cloud.dialogflow.v2.IListConversationModelsRequest} message ListConversationModelsRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IConversationInfo} message ConversationInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListConversationModelsRequest.encode = function encode(message, writer) { + ConversationInfo.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.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.languageCode); return writer; }; /** - * Encodes the specified ListConversationModelsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationModelsRequest.verify|verify} messages. + * Encodes the specified ConversationInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.ListConversationModelsRequest + * @memberof google.cloud.dialogflow.v2.ConversationInfo * @static - * @param {google.cloud.dialogflow.v2.IListConversationModelsRequest} message ListConversationModelsRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IConversationInfo} message ConversationInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListConversationModelsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ConversationInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListConversationModelsRequest message from the specified reader or buffer. + * Decodes a ConversationInfo message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.ListConversationModelsRequest + * @memberof google.cloud.dialogflow.v2.ConversationInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.ListConversationModelsRequest} ListConversationModelsRequest + * @returns {google.cloud.dialogflow.v2.ConversationInfo} ConversationInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListConversationModelsRequest.decode = function decode(reader, length) { + ConversationInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ListConversationModelsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ConversationInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); + message.languageCode = reader.string(); break; } default: @@ -54763,141 +57384,122 @@ }; /** - * Decodes a ListConversationModelsRequest message from the specified reader or buffer, length delimited. + * Decodes a ConversationInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.ListConversationModelsRequest + * @memberof google.cloud.dialogflow.v2.ConversationInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.ListConversationModelsRequest} ListConversationModelsRequest + * @returns {google.cloud.dialogflow.v2.ConversationInfo} ConversationInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListConversationModelsRequest.decodeDelimited = function decodeDelimited(reader) { + ConversationInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListConversationModelsRequest message. + * Verifies a ConversationInfo message. * @function verify - * @memberof google.cloud.dialogflow.v2.ListConversationModelsRequest + * @memberof google.cloud.dialogflow.v2.ConversationInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListConversationModelsRequest.verify = function verify(message) { + ConversationInfo.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.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; return null; }; /** - * Creates a ListConversationModelsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ConversationInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.ListConversationModelsRequest + * @memberof google.cloud.dialogflow.v2.ConversationInfo * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.ListConversationModelsRequest} ListConversationModelsRequest + * @returns {google.cloud.dialogflow.v2.ConversationInfo} ConversationInfo */ - ListConversationModelsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.ListConversationModelsRequest) + ConversationInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.ConversationInfo) return object; - var message = new $root.google.cloud.dialogflow.v2.ListConversationModelsRequest(); - 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); + var message = new $root.google.cloud.dialogflow.v2.ConversationInfo(); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); return message; }; /** - * Creates a plain object from a ListConversationModelsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ConversationInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.ListConversationModelsRequest + * @memberof google.cloud.dialogflow.v2.ConversationInfo * @static - * @param {google.cloud.dialogflow.v2.ListConversationModelsRequest} message ListConversationModelsRequest + * @param {google.cloud.dialogflow.v2.ConversationInfo} message ConversationInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListConversationModelsRequest.toObject = function toObject(message, options) { + ConversationInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - 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 (options.defaults) + object.languageCode = ""; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this ListConversationModelsRequest to JSON. + * Converts this ConversationInfo to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.ListConversationModelsRequest + * @memberof google.cloud.dialogflow.v2.ConversationInfo * @instance * @returns {Object.} JSON object */ - ListConversationModelsRequest.prototype.toJSON = function toJSON() { + ConversationInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListConversationModelsRequest + * Gets the default type url for ConversationInfo * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.ListConversationModelsRequest + * @memberof google.cloud.dialogflow.v2.ConversationInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListConversationModelsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ConversationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.ListConversationModelsRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.ConversationInfo"; }; - return ListConversationModelsRequest; + return ConversationInfo; })(); - v2.ListConversationModelsResponse = (function() { + v2.InputConfig = (function() { /** - * Properties of a ListConversationModelsResponse. + * Properties of an InputConfig. * @memberof google.cloud.dialogflow.v2 - * @interface IListConversationModelsResponse - * @property {Array.|null} [conversationModels] ListConversationModelsResponse conversationModels - * @property {string|null} [nextPageToken] ListConversationModelsResponse nextPageToken + * @interface IInputConfig + * @property {google.cloud.dialogflow.v2.IGcsSources|null} [gcsSource] InputConfig gcsSource */ /** - * Constructs a new ListConversationModelsResponse. + * Constructs a new InputConfig. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a ListConversationModelsResponse. - * @implements IListConversationModelsResponse + * @classdesc Represents an InputConfig. + * @implements IInputConfig * @constructor - * @param {google.cloud.dialogflow.v2.IListConversationModelsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.IInputConfig=} [properties] Properties to set */ - function ListConversationModelsResponse(properties) { - this.conversationModels = []; + function InputConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -54905,92 +57507,89 @@ } /** - * ListConversationModelsResponse conversationModels. - * @member {Array.} conversationModels - * @memberof google.cloud.dialogflow.v2.ListConversationModelsResponse + * InputConfig gcsSource. + * @member {google.cloud.dialogflow.v2.IGcsSources|null|undefined} gcsSource + * @memberof google.cloud.dialogflow.v2.InputConfig * @instance */ - ListConversationModelsResponse.prototype.conversationModels = $util.emptyArray; + InputConfig.prototype.gcsSource = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ListConversationModelsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.v2.ListConversationModelsResponse + * InputConfig source. + * @member {"gcsSource"|undefined} source + * @memberof google.cloud.dialogflow.v2.InputConfig * @instance */ - ListConversationModelsResponse.prototype.nextPageToken = ""; + Object.defineProperty(InputConfig.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["gcsSource"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ListConversationModelsResponse instance using the specified properties. + * Creates a new InputConfig instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.ListConversationModelsResponse + * @memberof google.cloud.dialogflow.v2.InputConfig * @static - * @param {google.cloud.dialogflow.v2.IListConversationModelsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.ListConversationModelsResponse} ListConversationModelsResponse instance + * @param {google.cloud.dialogflow.v2.IInputConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.InputConfig} InputConfig instance */ - ListConversationModelsResponse.create = function create(properties) { - return new ListConversationModelsResponse(properties); + InputConfig.create = function create(properties) { + return new InputConfig(properties); }; /** - * Encodes the specified ListConversationModelsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationModelsResponse.verify|verify} messages. + * Encodes the specified InputConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.InputConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.ListConversationModelsResponse + * @memberof google.cloud.dialogflow.v2.InputConfig * @static - * @param {google.cloud.dialogflow.v2.IListConversationModelsResponse} message ListConversationModelsResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2.IInputConfig} message InputConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListConversationModelsResponse.encode = function encode(message, writer) { + InputConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.conversationModels != null && message.conversationModels.length) - for (var i = 0; i < message.conversationModels.length; ++i) - $root.google.cloud.dialogflow.v2.ConversationModel.encode(message.conversationModels[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); + if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) + $root.google.cloud.dialogflow.v2.GcsSources.encode(message.gcsSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListConversationModelsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationModelsResponse.verify|verify} messages. + * Encodes the specified InputConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.InputConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.ListConversationModelsResponse + * @memberof google.cloud.dialogflow.v2.InputConfig * @static - * @param {google.cloud.dialogflow.v2.IListConversationModelsResponse} message ListConversationModelsResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2.IInputConfig} message InputConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListConversationModelsResponse.encodeDelimited = function encodeDelimited(message, writer) { + InputConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListConversationModelsResponse message from the specified reader or buffer. + * Decodes an InputConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.ListConversationModelsResponse + * @memberof google.cloud.dialogflow.v2.InputConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.ListConversationModelsResponse} ListConversationModelsResponse + * @returns {google.cloud.dialogflow.v2.InputConfig} InputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListConversationModelsResponse.decode = function decode(reader, length) { + InputConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ListConversationModelsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.InputConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.conversationModels && message.conversationModels.length)) - message.conversationModels = []; - message.conversationModels.push($root.google.cloud.dialogflow.v2.ConversationModel.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); + message.gcsSource = $root.google.cloud.dialogflow.v2.GcsSources.decode(reader, reader.uint32()); break; } default: @@ -55002,148 +57601,138 @@ }; /** - * Decodes a ListConversationModelsResponse message from the specified reader or buffer, length delimited. + * Decodes an InputConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.ListConversationModelsResponse + * @memberof google.cloud.dialogflow.v2.InputConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.ListConversationModelsResponse} ListConversationModelsResponse + * @returns {google.cloud.dialogflow.v2.InputConfig} InputConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListConversationModelsResponse.decodeDelimited = function decodeDelimited(reader) { + InputConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListConversationModelsResponse message. + * Verifies an InputConfig message. * @function verify - * @memberof google.cloud.dialogflow.v2.ListConversationModelsResponse + * @memberof google.cloud.dialogflow.v2.InputConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListConversationModelsResponse.verify = function verify(message) { + InputConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.conversationModels != null && message.hasOwnProperty("conversationModels")) { - if (!Array.isArray(message.conversationModels)) - return "conversationModels: array expected"; - for (var i = 0; i < message.conversationModels.length; ++i) { - var error = $root.google.cloud.dialogflow.v2.ConversationModel.verify(message.conversationModels[i]); + var properties = {}; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + properties.source = 1; + { + var error = $root.google.cloud.dialogflow.v2.GcsSources.verify(message.gcsSource); if (error) - return "conversationModels." + error; + return "gcsSource." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListConversationModelsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an InputConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.ListConversationModelsResponse + * @memberof google.cloud.dialogflow.v2.InputConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.ListConversationModelsResponse} ListConversationModelsResponse + * @returns {google.cloud.dialogflow.v2.InputConfig} InputConfig */ - ListConversationModelsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.ListConversationModelsResponse) + InputConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.InputConfig) return object; - var message = new $root.google.cloud.dialogflow.v2.ListConversationModelsResponse(); - if (object.conversationModels) { - if (!Array.isArray(object.conversationModels)) - throw TypeError(".google.cloud.dialogflow.v2.ListConversationModelsResponse.conversationModels: array expected"); - message.conversationModels = []; - for (var i = 0; i < object.conversationModels.length; ++i) { - if (typeof object.conversationModels[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2.ListConversationModelsResponse.conversationModels: object expected"); - message.conversationModels[i] = $root.google.cloud.dialogflow.v2.ConversationModel.fromObject(object.conversationModels[i]); - } + var message = new $root.google.cloud.dialogflow.v2.InputConfig(); + if (object.gcsSource != null) { + if (typeof object.gcsSource !== "object") + throw TypeError(".google.cloud.dialogflow.v2.InputConfig.gcsSource: object expected"); + message.gcsSource = $root.google.cloud.dialogflow.v2.GcsSources.fromObject(object.gcsSource); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListConversationModelsResponse message. Also converts values to other types if specified. + * Creates a plain object from an InputConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.ListConversationModelsResponse + * @memberof google.cloud.dialogflow.v2.InputConfig * @static - * @param {google.cloud.dialogflow.v2.ListConversationModelsResponse} message ListConversationModelsResponse + * @param {google.cloud.dialogflow.v2.InputConfig} message InputConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListConversationModelsResponse.toObject = function toObject(message, options) { + InputConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.conversationModels = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.conversationModels && message.conversationModels.length) { - object.conversationModels = []; - for (var j = 0; j < message.conversationModels.length; ++j) - object.conversationModels[j] = $root.google.cloud.dialogflow.v2.ConversationModel.toObject(message.conversationModels[j], options); + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + object.gcsSource = $root.google.cloud.dialogflow.v2.GcsSources.toObject(message.gcsSource, options); + if (options.oneofs) + object.source = "gcsSource"; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ListConversationModelsResponse to JSON. + * Converts this InputConfig to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.ListConversationModelsResponse + * @memberof google.cloud.dialogflow.v2.InputConfig * @instance * @returns {Object.} JSON object */ - ListConversationModelsResponse.prototype.toJSON = function toJSON() { + InputConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListConversationModelsResponse + * Gets the default type url for InputConfig * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.ListConversationModelsResponse + * @memberof google.cloud.dialogflow.v2.InputConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListConversationModelsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + InputConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.ListConversationModelsResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.InputConfig"; }; - return ListConversationModelsResponse; + return InputConfig; })(); - v2.DeleteConversationModelRequest = (function() { + v2.ConversationDataset = (function() { /** - * Properties of a DeleteConversationModelRequest. + * Properties of a ConversationDataset. * @memberof google.cloud.dialogflow.v2 - * @interface IDeleteConversationModelRequest - * @property {string|null} [name] DeleteConversationModelRequest name + * @interface IConversationDataset + * @property {string|null} [name] ConversationDataset name + * @property {string|null} [displayName] ConversationDataset displayName + * @property {string|null} [description] ConversationDataset description + * @property {google.protobuf.ITimestamp|null} [createTime] ConversationDataset createTime + * @property {google.cloud.dialogflow.v2.IInputConfig|null} [inputConfig] ConversationDataset inputConfig + * @property {google.cloud.dialogflow.v2.IConversationInfo|null} [conversationInfo] ConversationDataset conversationInfo + * @property {number|Long|null} [conversationCount] ConversationDataset conversationCount */ /** - * Constructs a new DeleteConversationModelRequest. + * Constructs a new ConversationDataset. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a DeleteConversationModelRequest. - * @implements IDeleteConversationModelRequest + * @classdesc Represents a ConversationDataset. + * @implements IConversationDataset * @constructor - * @param {google.cloud.dialogflow.v2.IDeleteConversationModelRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.IConversationDataset=} [properties] Properties to set */ - function DeleteConversationModelRequest(properties) { + function ConversationDataset(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -55151,273 +57740,130 @@ } /** - * DeleteConversationModelRequest name. + * ConversationDataset name. * @member {string} name - * @memberof google.cloud.dialogflow.v2.DeleteConversationModelRequest + * @memberof google.cloud.dialogflow.v2.ConversationDataset * @instance */ - DeleteConversationModelRequest.prototype.name = ""; - - /** - * Creates a new DeleteConversationModelRequest instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2.DeleteConversationModelRequest - * @static - * @param {google.cloud.dialogflow.v2.IDeleteConversationModelRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.DeleteConversationModelRequest} DeleteConversationModelRequest instance - */ - DeleteConversationModelRequest.create = function create(properties) { - return new DeleteConversationModelRequest(properties); - }; - - /** - * Encodes the specified DeleteConversationModelRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationModelRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2.DeleteConversationModelRequest - * @static - * @param {google.cloud.dialogflow.v2.IDeleteConversationModelRequest} message DeleteConversationModelRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteConversationModelRequest.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 DeleteConversationModelRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationModelRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.DeleteConversationModelRequest - * @static - * @param {google.cloud.dialogflow.v2.IDeleteConversationModelRequest} message DeleteConversationModelRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteConversationModelRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteConversationModelRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2.DeleteConversationModelRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.DeleteConversationModelRequest} DeleteConversationModelRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteConversationModelRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.DeleteConversationModelRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteConversationModelRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.DeleteConversationModelRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.DeleteConversationModelRequest} DeleteConversationModelRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteConversationModelRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteConversationModelRequest message. - * @function verify - * @memberof google.cloud.dialogflow.v2.DeleteConversationModelRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteConversationModelRequest.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 DeleteConversationModelRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2.DeleteConversationModelRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.DeleteConversationModelRequest} DeleteConversationModelRequest - */ - DeleteConversationModelRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.DeleteConversationModelRequest) - return object; - var message = new $root.google.cloud.dialogflow.v2.DeleteConversationModelRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + ConversationDataset.prototype.name = ""; /** - * Creates a plain object from a DeleteConversationModelRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2.DeleteConversationModelRequest - * @static - * @param {google.cloud.dialogflow.v2.DeleteConversationModelRequest} message DeleteConversationModelRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * ConversationDataset displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.v2.ConversationDataset + * @instance */ - DeleteConversationModelRequest.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; - }; + ConversationDataset.prototype.displayName = ""; /** - * Converts this DeleteConversationModelRequest to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2.DeleteConversationModelRequest + * ConversationDataset description. + * @member {string} description + * @memberof google.cloud.dialogflow.v2.ConversationDataset * @instance - * @returns {Object.} JSON object */ - DeleteConversationModelRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + ConversationDataset.prototype.description = ""; /** - * Gets the default type url for DeleteConversationModelRequest - * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.DeleteConversationModelRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * ConversationDataset createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dialogflow.v2.ConversationDataset + * @instance */ - DeleteConversationModelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.DeleteConversationModelRequest"; - }; - - return DeleteConversationModelRequest; - })(); - - v2.DeployConversationModelRequest = (function() { + ConversationDataset.prototype.createTime = null; /** - * Properties of a DeployConversationModelRequest. - * @memberof google.cloud.dialogflow.v2 - * @interface IDeployConversationModelRequest - * @property {string|null} [name] DeployConversationModelRequest name + * ConversationDataset inputConfig. + * @member {google.cloud.dialogflow.v2.IInputConfig|null|undefined} inputConfig + * @memberof google.cloud.dialogflow.v2.ConversationDataset + * @instance */ + ConversationDataset.prototype.inputConfig = null; /** - * Constructs a new DeployConversationModelRequest. - * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a DeployConversationModelRequest. - * @implements IDeployConversationModelRequest - * @constructor - * @param {google.cloud.dialogflow.v2.IDeployConversationModelRequest=} [properties] Properties to set + * ConversationDataset conversationInfo. + * @member {google.cloud.dialogflow.v2.IConversationInfo|null|undefined} conversationInfo + * @memberof google.cloud.dialogflow.v2.ConversationDataset + * @instance */ - function DeployConversationModelRequest(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]]; - } + ConversationDataset.prototype.conversationInfo = null; /** - * DeployConversationModelRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2.DeployConversationModelRequest + * ConversationDataset conversationCount. + * @member {number|Long} conversationCount + * @memberof google.cloud.dialogflow.v2.ConversationDataset * @instance */ - DeployConversationModelRequest.prototype.name = ""; + ConversationDataset.prototype.conversationCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new DeployConversationModelRequest instance using the specified properties. + * Creates a new ConversationDataset instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.DeployConversationModelRequest + * @memberof google.cloud.dialogflow.v2.ConversationDataset * @static - * @param {google.cloud.dialogflow.v2.IDeployConversationModelRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.DeployConversationModelRequest} DeployConversationModelRequest instance + * @param {google.cloud.dialogflow.v2.IConversationDataset=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.ConversationDataset} ConversationDataset instance */ - DeployConversationModelRequest.create = function create(properties) { - return new DeployConversationModelRequest(properties); + ConversationDataset.create = function create(properties) { + return new ConversationDataset(properties); }; /** - * Encodes the specified DeployConversationModelRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.DeployConversationModelRequest.verify|verify} messages. + * Encodes the specified ConversationDataset message. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationDataset.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.DeployConversationModelRequest + * @memberof google.cloud.dialogflow.v2.ConversationDataset * @static - * @param {google.cloud.dialogflow.v2.IDeployConversationModelRequest} message DeployConversationModelRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IConversationDataset} message ConversationDataset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeployConversationModelRequest.encode = function encode(message, writer) { + ConversationDataset.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.inputConfig != null && Object.hasOwnProperty.call(message, "inputConfig")) + $root.google.cloud.dialogflow.v2.InputConfig.encode(message.inputConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.conversationInfo != null && Object.hasOwnProperty.call(message, "conversationInfo")) + $root.google.cloud.dialogflow.v2.ConversationInfo.encode(message.conversationInfo, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.conversationCount != null && Object.hasOwnProperty.call(message, "conversationCount")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.conversationCount); return writer; }; /** - * Encodes the specified DeployConversationModelRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.DeployConversationModelRequest.verify|verify} messages. + * Encodes the specified ConversationDataset message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationDataset.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.DeployConversationModelRequest + * @memberof google.cloud.dialogflow.v2.ConversationDataset * @static - * @param {google.cloud.dialogflow.v2.IDeployConversationModelRequest} message DeployConversationModelRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IConversationDataset} message ConversationDataset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeployConversationModelRequest.encodeDelimited = function encodeDelimited(message, writer) { + ConversationDataset.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeployConversationModelRequest message from the specified reader or buffer. + * Decodes a ConversationDataset message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.DeployConversationModelRequest + * @memberof google.cloud.dialogflow.v2.ConversationDataset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.DeployConversationModelRequest} DeployConversationModelRequest + * @returns {google.cloud.dialogflow.v2.ConversationDataset} ConversationDataset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeployConversationModelRequest.decode = function decode(reader, length) { + ConversationDataset.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.DeployConversationModelRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ConversationDataset(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -55425,6 +57871,30 @@ 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.inputConfig = $root.google.cloud.dialogflow.v2.InputConfig.decode(reader, reader.uint32()); + break; + } + case 6: { + message.conversationInfo = $root.google.cloud.dialogflow.v2.ConversationInfo.decode(reader, reader.uint32()); + break; + } + case 7: { + message.conversationCount = reader.int64(); + break; + } default: reader.skipType(tag & 7); break; @@ -55434,122 +57904,201 @@ }; /** - * Decodes a DeployConversationModelRequest message from the specified reader or buffer, length delimited. + * Decodes a ConversationDataset message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.DeployConversationModelRequest + * @memberof google.cloud.dialogflow.v2.ConversationDataset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.DeployConversationModelRequest} DeployConversationModelRequest + * @returns {google.cloud.dialogflow.v2.ConversationDataset} ConversationDataset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeployConversationModelRequest.decodeDelimited = function decodeDelimited(reader) { + ConversationDataset.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeployConversationModelRequest message. + * Verifies a ConversationDataset message. * @function verify - * @memberof google.cloud.dialogflow.v2.DeployConversationModelRequest + * @memberof google.cloud.dialogflow.v2.ConversationDataset * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeployConversationModelRequest.verify = function verify(message) { + ConversationDataset.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.inputConfig != null && message.hasOwnProperty("inputConfig")) { + var error = $root.google.cloud.dialogflow.v2.InputConfig.verify(message.inputConfig); + if (error) + return "inputConfig." + error; + } + if (message.conversationInfo != null && message.hasOwnProperty("conversationInfo")) { + var error = $root.google.cloud.dialogflow.v2.ConversationInfo.verify(message.conversationInfo); + if (error) + return "conversationInfo." + error; + } + if (message.conversationCount != null && message.hasOwnProperty("conversationCount")) + if (!$util.isInteger(message.conversationCount) && !(message.conversationCount && $util.isInteger(message.conversationCount.low) && $util.isInteger(message.conversationCount.high))) + return "conversationCount: integer|Long expected"; return null; }; /** - * Creates a DeployConversationModelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ConversationDataset message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.DeployConversationModelRequest + * @memberof google.cloud.dialogflow.v2.ConversationDataset * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.DeployConversationModelRequest} DeployConversationModelRequest + * @returns {google.cloud.dialogflow.v2.ConversationDataset} ConversationDataset */ - DeployConversationModelRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.DeployConversationModelRequest) + ConversationDataset.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.ConversationDataset) return object; - var message = new $root.google.cloud.dialogflow.v2.DeployConversationModelRequest(); + var message = new $root.google.cloud.dialogflow.v2.ConversationDataset(); 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.dialogflow.v2.ConversationDataset.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.inputConfig != null) { + if (typeof object.inputConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2.ConversationDataset.inputConfig: object expected"); + message.inputConfig = $root.google.cloud.dialogflow.v2.InputConfig.fromObject(object.inputConfig); + } + if (object.conversationInfo != null) { + if (typeof object.conversationInfo !== "object") + throw TypeError(".google.cloud.dialogflow.v2.ConversationDataset.conversationInfo: object expected"); + message.conversationInfo = $root.google.cloud.dialogflow.v2.ConversationInfo.fromObject(object.conversationInfo); + } + if (object.conversationCount != null) + if ($util.Long) + (message.conversationCount = $util.Long.fromValue(object.conversationCount)).unsigned = false; + else if (typeof object.conversationCount === "string") + message.conversationCount = parseInt(object.conversationCount, 10); + else if (typeof object.conversationCount === "number") + message.conversationCount = object.conversationCount; + else if (typeof object.conversationCount === "object") + message.conversationCount = new $util.LongBits(object.conversationCount.low >>> 0, object.conversationCount.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a DeployConversationModelRequest message. Also converts values to other types if specified. + * Creates a plain object from a ConversationDataset message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.DeployConversationModelRequest + * @memberof google.cloud.dialogflow.v2.ConversationDataset * @static - * @param {google.cloud.dialogflow.v2.DeployConversationModelRequest} message DeployConversationModelRequest + * @param {google.cloud.dialogflow.v2.ConversationDataset} message ConversationDataset * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeployConversationModelRequest.toObject = function toObject(message, options) { + ConversationDataset.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.name = ""; + object.displayName = ""; + object.description = ""; + object.createTime = null; + object.inputConfig = null; + object.conversationInfo = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.conversationCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.conversationCount = options.longs === String ? "0" : 0; + } 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.inputConfig != null && message.hasOwnProperty("inputConfig")) + object.inputConfig = $root.google.cloud.dialogflow.v2.InputConfig.toObject(message.inputConfig, options); + if (message.conversationInfo != null && message.hasOwnProperty("conversationInfo")) + object.conversationInfo = $root.google.cloud.dialogflow.v2.ConversationInfo.toObject(message.conversationInfo, options); + if (message.conversationCount != null && message.hasOwnProperty("conversationCount")) + if (typeof message.conversationCount === "number") + object.conversationCount = options.longs === String ? String(message.conversationCount) : message.conversationCount; + else + object.conversationCount = options.longs === String ? $util.Long.prototype.toString.call(message.conversationCount) : options.longs === Number ? new $util.LongBits(message.conversationCount.low >>> 0, message.conversationCount.high >>> 0).toNumber() : message.conversationCount; return object; }; /** - * Converts this DeployConversationModelRequest to JSON. + * Converts this ConversationDataset to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.DeployConversationModelRequest + * @memberof google.cloud.dialogflow.v2.ConversationDataset * @instance * @returns {Object.} JSON object */ - DeployConversationModelRequest.prototype.toJSON = function toJSON() { + ConversationDataset.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeployConversationModelRequest + * Gets the default type url for ConversationDataset * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.DeployConversationModelRequest + * @memberof google.cloud.dialogflow.v2.ConversationDataset * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeployConversationModelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ConversationDataset.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.DeployConversationModelRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.ConversationDataset"; }; - return DeployConversationModelRequest; + return ConversationDataset; })(); - v2.UndeployConversationModelRequest = (function() { + v2.CreateConversationDatasetRequest = (function() { /** - * Properties of an UndeployConversationModelRequest. + * Properties of a CreateConversationDatasetRequest. * @memberof google.cloud.dialogflow.v2 - * @interface IUndeployConversationModelRequest - * @property {string|null} [name] UndeployConversationModelRequest name + * @interface ICreateConversationDatasetRequest + * @property {string|null} [parent] CreateConversationDatasetRequest parent + * @property {google.cloud.dialogflow.v2.IConversationDataset|null} [conversationDataset] CreateConversationDatasetRequest conversationDataset */ /** - * Constructs a new UndeployConversationModelRequest. + * Constructs a new CreateConversationDatasetRequest. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents an UndeployConversationModelRequest. - * @implements IUndeployConversationModelRequest + * @classdesc Represents a CreateConversationDatasetRequest. + * @implements ICreateConversationDatasetRequest * @constructor - * @param {google.cloud.dialogflow.v2.IUndeployConversationModelRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.ICreateConversationDatasetRequest=} [properties] Properties to set */ - function UndeployConversationModelRequest(properties) { + function CreateConversationDatasetRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -55557,75 +58106,89 @@ } /** - * UndeployConversationModelRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2.UndeployConversationModelRequest + * CreateConversationDatasetRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetRequest * @instance */ - UndeployConversationModelRequest.prototype.name = ""; + CreateConversationDatasetRequest.prototype.parent = ""; /** - * Creates a new UndeployConversationModelRequest instance using the specified properties. + * CreateConversationDatasetRequest conversationDataset. + * @member {google.cloud.dialogflow.v2.IConversationDataset|null|undefined} conversationDataset + * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetRequest + * @instance + */ + CreateConversationDatasetRequest.prototype.conversationDataset = null; + + /** + * Creates a new CreateConversationDatasetRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.UndeployConversationModelRequest + * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetRequest * @static - * @param {google.cloud.dialogflow.v2.IUndeployConversationModelRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.UndeployConversationModelRequest} UndeployConversationModelRequest instance + * @param {google.cloud.dialogflow.v2.ICreateConversationDatasetRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.CreateConversationDatasetRequest} CreateConversationDatasetRequest instance */ - UndeployConversationModelRequest.create = function create(properties) { - return new UndeployConversationModelRequest(properties); + CreateConversationDatasetRequest.create = function create(properties) { + return new CreateConversationDatasetRequest(properties); }; /** - * Encodes the specified UndeployConversationModelRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.UndeployConversationModelRequest.verify|verify} messages. + * Encodes the specified CreateConversationDatasetRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationDatasetRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.UndeployConversationModelRequest + * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetRequest * @static - * @param {google.cloud.dialogflow.v2.IUndeployConversationModelRequest} message UndeployConversationModelRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.ICreateConversationDatasetRequest} message CreateConversationDatasetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UndeployConversationModelRequest.encode = function encode(message, writer) { + CreateConversationDatasetRequest.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.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.conversationDataset != null && Object.hasOwnProperty.call(message, "conversationDataset")) + $root.google.cloud.dialogflow.v2.ConversationDataset.encode(message.conversationDataset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified UndeployConversationModelRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.UndeployConversationModelRequest.verify|verify} messages. + * Encodes the specified CreateConversationDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationDatasetRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.UndeployConversationModelRequest + * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetRequest * @static - * @param {google.cloud.dialogflow.v2.IUndeployConversationModelRequest} message UndeployConversationModelRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.ICreateConversationDatasetRequest} message CreateConversationDatasetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UndeployConversationModelRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateConversationDatasetRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UndeployConversationModelRequest message from the specified reader or buffer. + * Decodes a CreateConversationDatasetRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.UndeployConversationModelRequest + * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.UndeployConversationModelRequest} UndeployConversationModelRequest + * @returns {google.cloud.dialogflow.v2.CreateConversationDatasetRequest} CreateConversationDatasetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UndeployConversationModelRequest.decode = function decode(reader, length) { + CreateConversationDatasetRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.UndeployConversationModelRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.CreateConversationDatasetRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); + break; + } + case 2: { + message.conversationDataset = $root.google.cloud.dialogflow.v2.ConversationDataset.decode(reader, reader.uint32()); break; } default: @@ -55637,122 +58200,136 @@ }; /** - * Decodes an UndeployConversationModelRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateConversationDatasetRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.UndeployConversationModelRequest + * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.UndeployConversationModelRequest} UndeployConversationModelRequest + * @returns {google.cloud.dialogflow.v2.CreateConversationDatasetRequest} CreateConversationDatasetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UndeployConversationModelRequest.decodeDelimited = function decodeDelimited(reader) { + CreateConversationDatasetRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UndeployConversationModelRequest message. + * Verifies a CreateConversationDatasetRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2.UndeployConversationModelRequest + * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UndeployConversationModelRequest.verify = function verify(message) { + CreateConversationDatasetRequest.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.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.conversationDataset != null && message.hasOwnProperty("conversationDataset")) { + var error = $root.google.cloud.dialogflow.v2.ConversationDataset.verify(message.conversationDataset); + if (error) + return "conversationDataset." + error; + } return null; }; /** - * Creates an UndeployConversationModelRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateConversationDatasetRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.UndeployConversationModelRequest + * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.UndeployConversationModelRequest} UndeployConversationModelRequest + * @returns {google.cloud.dialogflow.v2.CreateConversationDatasetRequest} CreateConversationDatasetRequest */ - UndeployConversationModelRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.UndeployConversationModelRequest) + CreateConversationDatasetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.CreateConversationDatasetRequest) return object; - var message = new $root.google.cloud.dialogflow.v2.UndeployConversationModelRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.v2.CreateConversationDatasetRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.conversationDataset != null) { + if (typeof object.conversationDataset !== "object") + throw TypeError(".google.cloud.dialogflow.v2.CreateConversationDatasetRequest.conversationDataset: object expected"); + message.conversationDataset = $root.google.cloud.dialogflow.v2.ConversationDataset.fromObject(object.conversationDataset); + } return message; }; /** - * Creates a plain object from an UndeployConversationModelRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateConversationDatasetRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.UndeployConversationModelRequest + * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetRequest * @static - * @param {google.cloud.dialogflow.v2.UndeployConversationModelRequest} message UndeployConversationModelRequest + * @param {google.cloud.dialogflow.v2.CreateConversationDatasetRequest} message CreateConversationDatasetRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UndeployConversationModelRequest.toObject = function toObject(message, options) { + CreateConversationDatasetRequest.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; + if (options.defaults) { + object.parent = ""; + object.conversationDataset = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.conversationDataset != null && message.hasOwnProperty("conversationDataset")) + object.conversationDataset = $root.google.cloud.dialogflow.v2.ConversationDataset.toObject(message.conversationDataset, options); return object; }; /** - * Converts this UndeployConversationModelRequest to JSON. + * Converts this CreateConversationDatasetRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.UndeployConversationModelRequest + * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetRequest * @instance * @returns {Object.} JSON object */ - UndeployConversationModelRequest.prototype.toJSON = function toJSON() { + CreateConversationDatasetRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UndeployConversationModelRequest + * Gets the default type url for CreateConversationDatasetRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.UndeployConversationModelRequest + * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UndeployConversationModelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateConversationDatasetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.UndeployConversationModelRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.CreateConversationDatasetRequest"; }; - return UndeployConversationModelRequest; + return CreateConversationDatasetRequest; })(); - v2.GetConversationModelEvaluationRequest = (function() { + v2.GetConversationDatasetRequest = (function() { /** - * Properties of a GetConversationModelEvaluationRequest. + * Properties of a GetConversationDatasetRequest. * @memberof google.cloud.dialogflow.v2 - * @interface IGetConversationModelEvaluationRequest - * @property {string|null} [name] GetConversationModelEvaluationRequest name + * @interface IGetConversationDatasetRequest + * @property {string|null} [name] GetConversationDatasetRequest name */ /** - * Constructs a new GetConversationModelEvaluationRequest. + * Constructs a new GetConversationDatasetRequest. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a GetConversationModelEvaluationRequest. - * @implements IGetConversationModelEvaluationRequest + * @classdesc Represents a GetConversationDatasetRequest. + * @implements IGetConversationDatasetRequest * @constructor - * @param {google.cloud.dialogflow.v2.IGetConversationModelEvaluationRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.IGetConversationDatasetRequest=} [properties] Properties to set */ - function GetConversationModelEvaluationRequest(properties) { + function GetConversationDatasetRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -55760,35 +58337,35 @@ } /** - * GetConversationModelEvaluationRequest name. + * GetConversationDatasetRequest name. * @member {string} name - * @memberof google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest + * @memberof google.cloud.dialogflow.v2.GetConversationDatasetRequest * @instance */ - GetConversationModelEvaluationRequest.prototype.name = ""; + GetConversationDatasetRequest.prototype.name = ""; /** - * Creates a new GetConversationModelEvaluationRequest instance using the specified properties. + * Creates a new GetConversationDatasetRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest + * @memberof google.cloud.dialogflow.v2.GetConversationDatasetRequest * @static - * @param {google.cloud.dialogflow.v2.IGetConversationModelEvaluationRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest} GetConversationModelEvaluationRequest instance + * @param {google.cloud.dialogflow.v2.IGetConversationDatasetRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.GetConversationDatasetRequest} GetConversationDatasetRequest instance */ - GetConversationModelEvaluationRequest.create = function create(properties) { - return new GetConversationModelEvaluationRequest(properties); + GetConversationDatasetRequest.create = function create(properties) { + return new GetConversationDatasetRequest(properties); }; /** - * Encodes the specified GetConversationModelEvaluationRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest.verify|verify} messages. + * Encodes the specified GetConversationDatasetRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.GetConversationDatasetRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest + * @memberof google.cloud.dialogflow.v2.GetConversationDatasetRequest * @static - * @param {google.cloud.dialogflow.v2.IGetConversationModelEvaluationRequest} message GetConversationModelEvaluationRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IGetConversationDatasetRequest} message GetConversationDatasetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetConversationModelEvaluationRequest.encode = function encode(message, writer) { + GetConversationDatasetRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -55797,33 +58374,33 @@ }; /** - * Encodes the specified GetConversationModelEvaluationRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest.verify|verify} messages. + * Encodes the specified GetConversationDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.GetConversationDatasetRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest + * @memberof google.cloud.dialogflow.v2.GetConversationDatasetRequest * @static - * @param {google.cloud.dialogflow.v2.IGetConversationModelEvaluationRequest} message GetConversationModelEvaluationRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IGetConversationDatasetRequest} message GetConversationDatasetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetConversationModelEvaluationRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetConversationDatasetRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetConversationModelEvaluationRequest message from the specified reader or buffer. + * Decodes a GetConversationDatasetRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest + * @memberof google.cloud.dialogflow.v2.GetConversationDatasetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest} GetConversationModelEvaluationRequest + * @returns {google.cloud.dialogflow.v2.GetConversationDatasetRequest} GetConversationDatasetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetConversationModelEvaluationRequest.decode = function decode(reader, length) { + GetConversationDatasetRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.GetConversationDatasetRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -55840,30 +58417,30 @@ }; /** - * Decodes a GetConversationModelEvaluationRequest message from the specified reader or buffer, length delimited. + * Decodes a GetConversationDatasetRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest + * @memberof google.cloud.dialogflow.v2.GetConversationDatasetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest} GetConversationModelEvaluationRequest + * @returns {google.cloud.dialogflow.v2.GetConversationDatasetRequest} GetConversationDatasetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetConversationModelEvaluationRequest.decodeDelimited = function decodeDelimited(reader) { + GetConversationDatasetRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetConversationModelEvaluationRequest message. + * Verifies a GetConversationDatasetRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest + * @memberof google.cloud.dialogflow.v2.GetConversationDatasetRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetConversationModelEvaluationRequest.verify = function verify(message) { + GetConversationDatasetRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -55873,32 +58450,32 @@ }; /** - * Creates a GetConversationModelEvaluationRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetConversationDatasetRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest + * @memberof google.cloud.dialogflow.v2.GetConversationDatasetRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest} GetConversationModelEvaluationRequest + * @returns {google.cloud.dialogflow.v2.GetConversationDatasetRequest} GetConversationDatasetRequest */ - GetConversationModelEvaluationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest) + GetConversationDatasetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.GetConversationDatasetRequest) return object; - var message = new $root.google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest(); + var message = new $root.google.cloud.dialogflow.v2.GetConversationDatasetRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetConversationModelEvaluationRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetConversationDatasetRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest + * @memberof google.cloud.dialogflow.v2.GetConversationDatasetRequest * @static - * @param {google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest} message GetConversationModelEvaluationRequest + * @param {google.cloud.dialogflow.v2.GetConversationDatasetRequest} message GetConversationDatasetRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetConversationModelEvaluationRequest.toObject = function toObject(message, options) { + GetConversationDatasetRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -55910,54 +58487,54 @@ }; /** - * Converts this GetConversationModelEvaluationRequest to JSON. + * Converts this GetConversationDatasetRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest + * @memberof google.cloud.dialogflow.v2.GetConversationDatasetRequest * @instance * @returns {Object.} JSON object */ - GetConversationModelEvaluationRequest.prototype.toJSON = function toJSON() { + GetConversationDatasetRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetConversationModelEvaluationRequest + * Gets the default type url for GetConversationDatasetRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest + * @memberof google.cloud.dialogflow.v2.GetConversationDatasetRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetConversationModelEvaluationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetConversationDatasetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.GetConversationDatasetRequest"; }; - return GetConversationModelEvaluationRequest; + return GetConversationDatasetRequest; })(); - v2.ListConversationModelEvaluationsRequest = (function() { + v2.ListConversationDatasetsRequest = (function() { /** - * Properties of a ListConversationModelEvaluationsRequest. + * Properties of a ListConversationDatasetsRequest. * @memberof google.cloud.dialogflow.v2 - * @interface IListConversationModelEvaluationsRequest - * @property {string|null} [parent] ListConversationModelEvaluationsRequest parent - * @property {number|null} [pageSize] ListConversationModelEvaluationsRequest pageSize - * @property {string|null} [pageToken] ListConversationModelEvaluationsRequest pageToken + * @interface IListConversationDatasetsRequest + * @property {string|null} [parent] ListConversationDatasetsRequest parent + * @property {number|null} [pageSize] ListConversationDatasetsRequest pageSize + * @property {string|null} [pageToken] ListConversationDatasetsRequest pageToken */ /** - * Constructs a new ListConversationModelEvaluationsRequest. + * Constructs a new ListConversationDatasetsRequest. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a ListConversationModelEvaluationsRequest. - * @implements IListConversationModelEvaluationsRequest + * @classdesc Represents a ListConversationDatasetsRequest. + * @implements IListConversationDatasetsRequest * @constructor - * @param {google.cloud.dialogflow.v2.IListConversationModelEvaluationsRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.IListConversationDatasetsRequest=} [properties] Properties to set */ - function ListConversationModelEvaluationsRequest(properties) { + function ListConversationDatasetsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -55965,51 +58542,51 @@ } /** - * ListConversationModelEvaluationsRequest parent. + * ListConversationDatasetsRequest parent. * @member {string} parent - * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest + * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsRequest * @instance */ - ListConversationModelEvaluationsRequest.prototype.parent = ""; + ListConversationDatasetsRequest.prototype.parent = ""; /** - * ListConversationModelEvaluationsRequest pageSize. + * ListConversationDatasetsRequest pageSize. * @member {number} pageSize - * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest + * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsRequest * @instance */ - ListConversationModelEvaluationsRequest.prototype.pageSize = 0; + ListConversationDatasetsRequest.prototype.pageSize = 0; /** - * ListConversationModelEvaluationsRequest pageToken. + * ListConversationDatasetsRequest pageToken. * @member {string} pageToken - * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest + * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsRequest * @instance */ - ListConversationModelEvaluationsRequest.prototype.pageToken = ""; + ListConversationDatasetsRequest.prototype.pageToken = ""; /** - * Creates a new ListConversationModelEvaluationsRequest instance using the specified properties. + * Creates a new ListConversationDatasetsRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest + * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsRequest * @static - * @param {google.cloud.dialogflow.v2.IListConversationModelEvaluationsRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest} ListConversationModelEvaluationsRequest instance + * @param {google.cloud.dialogflow.v2.IListConversationDatasetsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.ListConversationDatasetsRequest} ListConversationDatasetsRequest instance */ - ListConversationModelEvaluationsRequest.create = function create(properties) { - return new ListConversationModelEvaluationsRequest(properties); + ListConversationDatasetsRequest.create = function create(properties) { + return new ListConversationDatasetsRequest(properties); }; /** - * Encodes the specified ListConversationModelEvaluationsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest.verify|verify} messages. + * Encodes the specified ListConversationDatasetsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationDatasetsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest + * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsRequest * @static - * @param {google.cloud.dialogflow.v2.IListConversationModelEvaluationsRequest} message ListConversationModelEvaluationsRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IListConversationDatasetsRequest} message ListConversationDatasetsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListConversationModelEvaluationsRequest.encode = function encode(message, writer) { + ListConversationDatasetsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) @@ -56022,33 +58599,33 @@ }; /** - * Encodes the specified ListConversationModelEvaluationsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest.verify|verify} messages. + * Encodes the specified ListConversationDatasetsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationDatasetsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest + * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsRequest * @static - * @param {google.cloud.dialogflow.v2.IListConversationModelEvaluationsRequest} message ListConversationModelEvaluationsRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IListConversationDatasetsRequest} message ListConversationDatasetsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListConversationModelEvaluationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListConversationDatasetsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListConversationModelEvaluationsRequest message from the specified reader or buffer. + * Decodes a ListConversationDatasetsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest + * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest} ListConversationModelEvaluationsRequest + * @returns {google.cloud.dialogflow.v2.ListConversationDatasetsRequest} ListConversationDatasetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListConversationModelEvaluationsRequest.decode = function decode(reader, length) { + ListConversationDatasetsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ListConversationDatasetsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -56073,30 +58650,30 @@ }; /** - * Decodes a ListConversationModelEvaluationsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListConversationDatasetsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest + * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest} ListConversationModelEvaluationsRequest + * @returns {google.cloud.dialogflow.v2.ListConversationDatasetsRequest} ListConversationDatasetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListConversationModelEvaluationsRequest.decodeDelimited = function decodeDelimited(reader) { + ListConversationDatasetsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListConversationModelEvaluationsRequest message. + * Verifies a ListConversationDatasetsRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest + * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListConversationModelEvaluationsRequest.verify = function verify(message) { + ListConversationDatasetsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) @@ -56112,17 +58689,17 @@ }; /** - * Creates a ListConversationModelEvaluationsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListConversationDatasetsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest + * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest} ListConversationModelEvaluationsRequest + * @returns {google.cloud.dialogflow.v2.ListConversationDatasetsRequest} ListConversationDatasetsRequest */ - ListConversationModelEvaluationsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest) + ListConversationDatasetsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.ListConversationDatasetsRequest) return object; - var message = new $root.google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest(); + var message = new $root.google.cloud.dialogflow.v2.ListConversationDatasetsRequest(); if (object.parent != null) message.parent = String(object.parent); if (object.pageSize != null) @@ -56133,15 +58710,15 @@ }; /** - * Creates a plain object from a ListConversationModelEvaluationsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListConversationDatasetsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest + * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsRequest * @static - * @param {google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest} message ListConversationModelEvaluationsRequest + * @param {google.cloud.dialogflow.v2.ListConversationDatasetsRequest} message ListConversationDatasetsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListConversationModelEvaluationsRequest.toObject = function toObject(message, options) { + ListConversationDatasetsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -56160,54 +58737,54 @@ }; /** - * Converts this ListConversationModelEvaluationsRequest to JSON. + * Converts this ListConversationDatasetsRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest + * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsRequest * @instance * @returns {Object.} JSON object */ - ListConversationModelEvaluationsRequest.prototype.toJSON = function toJSON() { + ListConversationDatasetsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListConversationModelEvaluationsRequest + * Gets the default type url for ListConversationDatasetsRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest + * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListConversationModelEvaluationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListConversationDatasetsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.ListConversationDatasetsRequest"; }; - return ListConversationModelEvaluationsRequest; + return ListConversationDatasetsRequest; })(); - v2.ListConversationModelEvaluationsResponse = (function() { + v2.ListConversationDatasetsResponse = (function() { /** - * Properties of a ListConversationModelEvaluationsResponse. + * Properties of a ListConversationDatasetsResponse. * @memberof google.cloud.dialogflow.v2 - * @interface IListConversationModelEvaluationsResponse - * @property {Array.|null} [conversationModelEvaluations] ListConversationModelEvaluationsResponse conversationModelEvaluations - * @property {string|null} [nextPageToken] ListConversationModelEvaluationsResponse nextPageToken + * @interface IListConversationDatasetsResponse + * @property {Array.|null} [conversationDatasets] ListConversationDatasetsResponse conversationDatasets + * @property {string|null} [nextPageToken] ListConversationDatasetsResponse nextPageToken */ /** - * Constructs a new ListConversationModelEvaluationsResponse. + * Constructs a new ListConversationDatasetsResponse. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a ListConversationModelEvaluationsResponse. - * @implements IListConversationModelEvaluationsResponse + * @classdesc Represents a ListConversationDatasetsResponse. + * @implements IListConversationDatasetsResponse * @constructor - * @param {google.cloud.dialogflow.v2.IListConversationModelEvaluationsResponse=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.IListConversationDatasetsResponse=} [properties] Properties to set */ - function ListConversationModelEvaluationsResponse(properties) { - this.conversationModelEvaluations = []; + function ListConversationDatasetsResponse(properties) { + this.conversationDatasets = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -56215,88 +58792,88 @@ } /** - * ListConversationModelEvaluationsResponse conversationModelEvaluations. - * @member {Array.} conversationModelEvaluations - * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse + * ListConversationDatasetsResponse conversationDatasets. + * @member {Array.} conversationDatasets + * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsResponse * @instance */ - ListConversationModelEvaluationsResponse.prototype.conversationModelEvaluations = $util.emptyArray; + ListConversationDatasetsResponse.prototype.conversationDatasets = $util.emptyArray; /** - * ListConversationModelEvaluationsResponse nextPageToken. + * ListConversationDatasetsResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse + * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsResponse * @instance */ - ListConversationModelEvaluationsResponse.prototype.nextPageToken = ""; + ListConversationDatasetsResponse.prototype.nextPageToken = ""; /** - * Creates a new ListConversationModelEvaluationsResponse instance using the specified properties. + * Creates a new ListConversationDatasetsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse + * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsResponse * @static - * @param {google.cloud.dialogflow.v2.IListConversationModelEvaluationsResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse} ListConversationModelEvaluationsResponse instance + * @param {google.cloud.dialogflow.v2.IListConversationDatasetsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.ListConversationDatasetsResponse} ListConversationDatasetsResponse instance */ - ListConversationModelEvaluationsResponse.create = function create(properties) { - return new ListConversationModelEvaluationsResponse(properties); + ListConversationDatasetsResponse.create = function create(properties) { + return new ListConversationDatasetsResponse(properties); }; /** - * Encodes the specified ListConversationModelEvaluationsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse.verify|verify} messages. + * Encodes the specified ListConversationDatasetsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationDatasetsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse + * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsResponse * @static - * @param {google.cloud.dialogflow.v2.IListConversationModelEvaluationsResponse} message ListConversationModelEvaluationsResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2.IListConversationDatasetsResponse} message ListConversationDatasetsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListConversationModelEvaluationsResponse.encode = function encode(message, writer) { + ListConversationDatasetsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.conversationModelEvaluations != null && message.conversationModelEvaluations.length) - for (var i = 0; i < message.conversationModelEvaluations.length; ++i) - $root.google.cloud.dialogflow.v2.ConversationModelEvaluation.encode(message.conversationModelEvaluations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.conversationDatasets != null && message.conversationDatasets.length) + for (var i = 0; i < message.conversationDatasets.length; ++i) + $root.google.cloud.dialogflow.v2.ConversationDataset.encode(message.conversationDatasets[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 ListConversationModelEvaluationsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse.verify|verify} messages. + * Encodes the specified ListConversationDatasetsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationDatasetsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse + * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsResponse * @static - * @param {google.cloud.dialogflow.v2.IListConversationModelEvaluationsResponse} message ListConversationModelEvaluationsResponse message or plain object to encode + * @param {google.cloud.dialogflow.v2.IListConversationDatasetsResponse} message ListConversationDatasetsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListConversationModelEvaluationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListConversationDatasetsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListConversationModelEvaluationsResponse message from the specified reader or buffer. + * Decodes a ListConversationDatasetsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse + * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse} ListConversationModelEvaluationsResponse + * @returns {google.cloud.dialogflow.v2.ListConversationDatasetsResponse} ListConversationDatasetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListConversationModelEvaluationsResponse.decode = function decode(reader, length) { + ListConversationDatasetsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ListConversationDatasetsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.conversationModelEvaluations && message.conversationModelEvaluations.length)) - message.conversationModelEvaluations = []; - message.conversationModelEvaluations.push($root.google.cloud.dialogflow.v2.ConversationModelEvaluation.decode(reader, reader.uint32())); + if (!(message.conversationDatasets && message.conversationDatasets.length)) + message.conversationDatasets = []; + message.conversationDatasets.push($root.google.cloud.dialogflow.v2.ConversationDataset.decode(reader, reader.uint32())); break; } case 2: { @@ -56312,39 +58889,39 @@ }; /** - * Decodes a ListConversationModelEvaluationsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListConversationDatasetsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse + * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse} ListConversationModelEvaluationsResponse + * @returns {google.cloud.dialogflow.v2.ListConversationDatasetsResponse} ListConversationDatasetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListConversationModelEvaluationsResponse.decodeDelimited = function decodeDelimited(reader) { + ListConversationDatasetsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListConversationModelEvaluationsResponse message. + * Verifies a ListConversationDatasetsResponse message. * @function verify - * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse + * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListConversationModelEvaluationsResponse.verify = function verify(message) { + ListConversationDatasetsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.conversationModelEvaluations != null && message.hasOwnProperty("conversationModelEvaluations")) { - if (!Array.isArray(message.conversationModelEvaluations)) - return "conversationModelEvaluations: array expected"; - for (var i = 0; i < message.conversationModelEvaluations.length; ++i) { - var error = $root.google.cloud.dialogflow.v2.ConversationModelEvaluation.verify(message.conversationModelEvaluations[i]); + if (message.conversationDatasets != null && message.hasOwnProperty("conversationDatasets")) { + if (!Array.isArray(message.conversationDatasets)) + return "conversationDatasets: array expected"; + for (var i = 0; i < message.conversationDatasets.length; ++i) { + var error = $root.google.cloud.dialogflow.v2.ConversationDataset.verify(message.conversationDatasets[i]); if (error) - return "conversationModelEvaluations." + error; + return "conversationDatasets." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) @@ -56354,25 +58931,25 @@ }; /** - * Creates a ListConversationModelEvaluationsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListConversationDatasetsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse + * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse} ListConversationModelEvaluationsResponse + * @returns {google.cloud.dialogflow.v2.ListConversationDatasetsResponse} ListConversationDatasetsResponse */ - ListConversationModelEvaluationsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse) + ListConversationDatasetsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.ListConversationDatasetsResponse) return object; - var message = new $root.google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse(); - if (object.conversationModelEvaluations) { - if (!Array.isArray(object.conversationModelEvaluations)) - throw TypeError(".google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse.conversationModelEvaluations: array expected"); - message.conversationModelEvaluations = []; - for (var i = 0; i < object.conversationModelEvaluations.length; ++i) { - if (typeof object.conversationModelEvaluations[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse.conversationModelEvaluations: object expected"); - message.conversationModelEvaluations[i] = $root.google.cloud.dialogflow.v2.ConversationModelEvaluation.fromObject(object.conversationModelEvaluations[i]); + var message = new $root.google.cloud.dialogflow.v2.ListConversationDatasetsResponse(); + if (object.conversationDatasets) { + if (!Array.isArray(object.conversationDatasets)) + throw TypeError(".google.cloud.dialogflow.v2.ListConversationDatasetsResponse.conversationDatasets: array expected"); + message.conversationDatasets = []; + for (var i = 0; i < object.conversationDatasets.length; ++i) { + if (typeof object.conversationDatasets[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2.ListConversationDatasetsResponse.conversationDatasets: object expected"); + message.conversationDatasets[i] = $root.google.cloud.dialogflow.v2.ConversationDataset.fromObject(object.conversationDatasets[i]); } } if (object.nextPageToken != null) @@ -56381,26 +58958,26 @@ }; /** - * Creates a plain object from a ListConversationModelEvaluationsResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListConversationDatasetsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse + * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsResponse * @static - * @param {google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse} message ListConversationModelEvaluationsResponse + * @param {google.cloud.dialogflow.v2.ListConversationDatasetsResponse} message ListConversationDatasetsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListConversationModelEvaluationsResponse.toObject = function toObject(message, options) { + ListConversationDatasetsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.conversationModelEvaluations = []; + object.conversationDatasets = []; if (options.defaults) object.nextPageToken = ""; - if (message.conversationModelEvaluations && message.conversationModelEvaluations.length) { - object.conversationModelEvaluations = []; - for (var j = 0; j < message.conversationModelEvaluations.length; ++j) - object.conversationModelEvaluations[j] = $root.google.cloud.dialogflow.v2.ConversationModelEvaluation.toObject(message.conversationModelEvaluations[j], options); + if (message.conversationDatasets && message.conversationDatasets.length) { + object.conversationDatasets = []; + for (var j = 0; j < message.conversationDatasets.length; ++j) + object.conversationDatasets[j] = $root.google.cloud.dialogflow.v2.ConversationDataset.toObject(message.conversationDatasets[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; @@ -56408,53 +58985,52 @@ }; /** - * Converts this ListConversationModelEvaluationsResponse to JSON. + * Converts this ListConversationDatasetsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse + * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsResponse * @instance * @returns {Object.} JSON object */ - ListConversationModelEvaluationsResponse.prototype.toJSON = function toJSON() { + ListConversationDatasetsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListConversationModelEvaluationsResponse + * Gets the default type url for ListConversationDatasetsResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse + * @memberof google.cloud.dialogflow.v2.ListConversationDatasetsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListConversationModelEvaluationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListConversationDatasetsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.ListConversationDatasetsResponse"; }; - return ListConversationModelEvaluationsResponse; + return ListConversationDatasetsResponse; })(); - v2.CreateConversationModelEvaluationRequest = (function() { + v2.DeleteConversationDatasetRequest = (function() { /** - * Properties of a CreateConversationModelEvaluationRequest. + * Properties of a DeleteConversationDatasetRequest. * @memberof google.cloud.dialogflow.v2 - * @interface ICreateConversationModelEvaluationRequest - * @property {string|null} [parent] CreateConversationModelEvaluationRequest parent - * @property {google.cloud.dialogflow.v2.IConversationModelEvaluation|null} [conversationModelEvaluation] CreateConversationModelEvaluationRequest conversationModelEvaluation + * @interface IDeleteConversationDatasetRequest + * @property {string|null} [name] DeleteConversationDatasetRequest name */ /** - * Constructs a new CreateConversationModelEvaluationRequest. + * Constructs a new DeleteConversationDatasetRequest. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a CreateConversationModelEvaluationRequest. - * @implements ICreateConversationModelEvaluationRequest + * @classdesc Represents a DeleteConversationDatasetRequest. + * @implements IDeleteConversationDatasetRequest * @constructor - * @param {google.cloud.dialogflow.v2.ICreateConversationModelEvaluationRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.IDeleteConversationDatasetRequest=} [properties] Properties to set */ - function CreateConversationModelEvaluationRequest(properties) { + function DeleteConversationDatasetRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -56462,89 +59038,75 @@ } /** - * CreateConversationModelEvaluationRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest - * @instance - */ - CreateConversationModelEvaluationRequest.prototype.parent = ""; - - /** - * CreateConversationModelEvaluationRequest conversationModelEvaluation. - * @member {google.cloud.dialogflow.v2.IConversationModelEvaluation|null|undefined} conversationModelEvaluation - * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest + * DeleteConversationDatasetRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetRequest * @instance */ - CreateConversationModelEvaluationRequest.prototype.conversationModelEvaluation = null; + DeleteConversationDatasetRequest.prototype.name = ""; /** - * Creates a new CreateConversationModelEvaluationRequest instance using the specified properties. + * Creates a new DeleteConversationDatasetRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest + * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetRequest * @static - * @param {google.cloud.dialogflow.v2.ICreateConversationModelEvaluationRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest} CreateConversationModelEvaluationRequest instance + * @param {google.cloud.dialogflow.v2.IDeleteConversationDatasetRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.DeleteConversationDatasetRequest} DeleteConversationDatasetRequest instance */ - CreateConversationModelEvaluationRequest.create = function create(properties) { - return new CreateConversationModelEvaluationRequest(properties); + DeleteConversationDatasetRequest.create = function create(properties) { + return new DeleteConversationDatasetRequest(properties); }; /** - * Encodes the specified CreateConversationModelEvaluationRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest.verify|verify} messages. + * Encodes the specified DeleteConversationDatasetRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationDatasetRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest + * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetRequest * @static - * @param {google.cloud.dialogflow.v2.ICreateConversationModelEvaluationRequest} message CreateConversationModelEvaluationRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IDeleteConversationDatasetRequest} message DeleteConversationDatasetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateConversationModelEvaluationRequest.encode = function encode(message, writer) { + DeleteConversationDatasetRequest.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.conversationModelEvaluation != null && Object.hasOwnProperty.call(message, "conversationModelEvaluation")) - $root.google.cloud.dialogflow.v2.ConversationModelEvaluation.encode(message.conversationModelEvaluation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified CreateConversationModelEvaluationRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest.verify|verify} messages. + * Encodes the specified DeleteConversationDatasetRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationDatasetRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest + * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetRequest * @static - * @param {google.cloud.dialogflow.v2.ICreateConversationModelEvaluationRequest} message CreateConversationModelEvaluationRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IDeleteConversationDatasetRequest} message DeleteConversationDatasetRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateConversationModelEvaluationRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteConversationDatasetRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateConversationModelEvaluationRequest message from the specified reader or buffer. + * Decodes a DeleteConversationDatasetRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest + * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest} CreateConversationModelEvaluationRequest + * @returns {google.cloud.dialogflow.v2.DeleteConversationDatasetRequest} DeleteConversationDatasetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateConversationModelEvaluationRequest.decode = function decode(reader, length) { + DeleteConversationDatasetRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.DeleteConversationDatasetRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.conversationModelEvaluation = $root.google.cloud.dialogflow.v2.ConversationModelEvaluation.decode(reader, reader.uint32()); + message.name = reader.string(); break; } default: @@ -56556,138 +59118,123 @@ }; /** - * Decodes a CreateConversationModelEvaluationRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteConversationDatasetRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest + * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest} CreateConversationModelEvaluationRequest + * @returns {google.cloud.dialogflow.v2.DeleteConversationDatasetRequest} DeleteConversationDatasetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateConversationModelEvaluationRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteConversationDatasetRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateConversationModelEvaluationRequest message. + * Verifies a DeleteConversationDatasetRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest + * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateConversationModelEvaluationRequest.verify = function verify(message) { + DeleteConversationDatasetRequest.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.conversationModelEvaluation != null && message.hasOwnProperty("conversationModelEvaluation")) { - var error = $root.google.cloud.dialogflow.v2.ConversationModelEvaluation.verify(message.conversationModelEvaluation); - if (error) - return "conversationModelEvaluation." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a CreateConversationModelEvaluationRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteConversationDatasetRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest + * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest} CreateConversationModelEvaluationRequest + * @returns {google.cloud.dialogflow.v2.DeleteConversationDatasetRequest} DeleteConversationDatasetRequest */ - CreateConversationModelEvaluationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest) + DeleteConversationDatasetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.DeleteConversationDatasetRequest) return object; - var message = new $root.google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.conversationModelEvaluation != null) { - if (typeof object.conversationModelEvaluation !== "object") - throw TypeError(".google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest.conversationModelEvaluation: object expected"); - message.conversationModelEvaluation = $root.google.cloud.dialogflow.v2.ConversationModelEvaluation.fromObject(object.conversationModelEvaluation); - } + var message = new $root.google.cloud.dialogflow.v2.DeleteConversationDatasetRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a CreateConversationModelEvaluationRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteConversationDatasetRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest + * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetRequest * @static - * @param {google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest} message CreateConversationModelEvaluationRequest + * @param {google.cloud.dialogflow.v2.DeleteConversationDatasetRequest} message DeleteConversationDatasetRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateConversationModelEvaluationRequest.toObject = function toObject(message, options) { + DeleteConversationDatasetRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.conversationModelEvaluation = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.conversationModelEvaluation != null && message.hasOwnProperty("conversationModelEvaluation")) - object.conversationModelEvaluation = $root.google.cloud.dialogflow.v2.ConversationModelEvaluation.toObject(message.conversationModelEvaluation, options); + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this CreateConversationModelEvaluationRequest to JSON. + * Converts this DeleteConversationDatasetRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest + * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetRequest * @instance * @returns {Object.} JSON object */ - CreateConversationModelEvaluationRequest.prototype.toJSON = function toJSON() { + DeleteConversationDatasetRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateConversationModelEvaluationRequest + * Gets the default type url for DeleteConversationDatasetRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest + * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateConversationModelEvaluationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteConversationDatasetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.DeleteConversationDatasetRequest"; }; - return CreateConversationModelEvaluationRequest; + return DeleteConversationDatasetRequest; })(); - v2.CreateConversationModelOperationMetadata = (function() { + v2.ImportConversationDataRequest = (function() { /** - * Properties of a CreateConversationModelOperationMetadata. + * Properties of an ImportConversationDataRequest. * @memberof google.cloud.dialogflow.v2 - * @interface ICreateConversationModelOperationMetadata - * @property {string|null} [conversationModel] CreateConversationModelOperationMetadata conversationModel - * @property {google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.State|null} [state] CreateConversationModelOperationMetadata state - * @property {google.protobuf.ITimestamp|null} [createTime] CreateConversationModelOperationMetadata createTime + * @interface IImportConversationDataRequest + * @property {string|null} [name] ImportConversationDataRequest name + * @property {google.cloud.dialogflow.v2.IInputConfig|null} [inputConfig] ImportConversationDataRequest inputConfig */ /** - * Constructs a new CreateConversationModelOperationMetadata. + * Constructs a new ImportConversationDataRequest. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a CreateConversationModelOperationMetadata. - * @implements ICreateConversationModelOperationMetadata + * @classdesc Represents an ImportConversationDataRequest. + * @implements IImportConversationDataRequest * @constructor - * @param {google.cloud.dialogflow.v2.ICreateConversationModelOperationMetadata=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.IImportConversationDataRequest=} [properties] Properties to set */ - function CreateConversationModelOperationMetadata(properties) { + function ImportConversationDataRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -56695,103 +59242,89 @@ } /** - * CreateConversationModelOperationMetadata conversationModel. - * @member {string} conversationModel - * @memberof google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata - * @instance - */ - CreateConversationModelOperationMetadata.prototype.conversationModel = ""; - - /** - * CreateConversationModelOperationMetadata state. - * @member {google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.State} state - * @memberof google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata + * ImportConversationDataRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2.ImportConversationDataRequest * @instance */ - CreateConversationModelOperationMetadata.prototype.state = 0; + ImportConversationDataRequest.prototype.name = ""; /** - * CreateConversationModelOperationMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata + * ImportConversationDataRequest inputConfig. + * @member {google.cloud.dialogflow.v2.IInputConfig|null|undefined} inputConfig + * @memberof google.cloud.dialogflow.v2.ImportConversationDataRequest * @instance */ - CreateConversationModelOperationMetadata.prototype.createTime = null; + ImportConversationDataRequest.prototype.inputConfig = null; /** - * Creates a new CreateConversationModelOperationMetadata instance using the specified properties. + * Creates a new ImportConversationDataRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.ImportConversationDataRequest * @static - * @param {google.cloud.dialogflow.v2.ICreateConversationModelOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata} CreateConversationModelOperationMetadata instance + * @param {google.cloud.dialogflow.v2.IImportConversationDataRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.ImportConversationDataRequest} ImportConversationDataRequest instance */ - CreateConversationModelOperationMetadata.create = function create(properties) { - return new CreateConversationModelOperationMetadata(properties); + ImportConversationDataRequest.create = function create(properties) { + return new ImportConversationDataRequest(properties); }; /** - * Encodes the specified CreateConversationModelOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.verify|verify} messages. + * Encodes the specified ImportConversationDataRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.ImportConversationDataRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.ImportConversationDataRequest * @static - * @param {google.cloud.dialogflow.v2.ICreateConversationModelOperationMetadata} message CreateConversationModelOperationMetadata message or plain object to encode + * @param {google.cloud.dialogflow.v2.IImportConversationDataRequest} message ImportConversationDataRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateConversationModelOperationMetadata.encode = function encode(message, writer) { + ImportConversationDataRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.conversationModel != null && Object.hasOwnProperty.call(message, "conversationModel")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversationModel); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); - 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.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputConfig != null && Object.hasOwnProperty.call(message, "inputConfig")) + $root.google.cloud.dialogflow.v2.InputConfig.encode(message.inputConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateConversationModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.verify|verify} messages. + * Encodes the specified ImportConversationDataRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ImportConversationDataRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.ImportConversationDataRequest * @static - * @param {google.cloud.dialogflow.v2.ICreateConversationModelOperationMetadata} message CreateConversationModelOperationMetadata message or plain object to encode + * @param {google.cloud.dialogflow.v2.IImportConversationDataRequest} message ImportConversationDataRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateConversationModelOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + ImportConversationDataRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateConversationModelOperationMetadata message from the specified reader or buffer. + * Decodes an ImportConversationDataRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.ImportConversationDataRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata} CreateConversationModelOperationMetadata + * @returns {google.cloud.dialogflow.v2.ImportConversationDataRequest} ImportConversationDataRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateConversationModelOperationMetadata.decode = function decode(reader, length) { + ImportConversationDataRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ImportConversationDataRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.conversationModel = reader.string(); + message.name = reader.string(); break; } case 2: { - message.state = reader.int32(); - break; - } - case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.inputConfig = $root.google.cloud.dialogflow.v2.InputConfig.decode(reader, reader.uint32()); break; } default: @@ -56803,213 +59336,139 @@ }; /** - * Decodes a CreateConversationModelOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes an ImportConversationDataRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.ImportConversationDataRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata} CreateConversationModelOperationMetadata + * @returns {google.cloud.dialogflow.v2.ImportConversationDataRequest} ImportConversationDataRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateConversationModelOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + ImportConversationDataRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateConversationModelOperationMetadata message. + * Verifies an ImportConversationDataRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.ImportConversationDataRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateConversationModelOperationMetadata.verify = function verify(message) { + ImportConversationDataRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.conversationModel != null && message.hasOwnProperty("conversationModel")) - if (!$util.isString(message.conversationModel)) - return "conversationModel: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) { + var error = $root.google.cloud.dialogflow.v2.InputConfig.verify(message.inputConfig); if (error) - return "createTime." + error; + return "inputConfig." + error; } return null; }; /** - * Creates a CreateConversationModelOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an ImportConversationDataRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.ImportConversationDataRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata} CreateConversationModelOperationMetadata + * @returns {google.cloud.dialogflow.v2.ImportConversationDataRequest} ImportConversationDataRequest */ - CreateConversationModelOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata) + ImportConversationDataRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.ImportConversationDataRequest) return object; - var message = new $root.google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata(); - if (object.conversationModel != null) - message.conversationModel = String(object.conversationModel); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "PENDING": - case 1: - message.state = 1; - break; - case "SUCCEEDED": - case 2: - message.state = 2; - break; - case "FAILED": - case 3: - message.state = 3; - break; - case "CANCELLED": - case 4: - message.state = 4; - break; - case "CANCELLING": - case 5: - message.state = 5; - break; - case "TRAINING": - case 6: - message.state = 6; - break; - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + var message = new $root.google.cloud.dialogflow.v2.ImportConversationDataRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.inputConfig != null) { + if (typeof object.inputConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2.ImportConversationDataRequest.inputConfig: object expected"); + message.inputConfig = $root.google.cloud.dialogflow.v2.InputConfig.fromObject(object.inputConfig); } return message; }; /** - * Creates a plain object from a CreateConversationModelOperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from an ImportConversationDataRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.ImportConversationDataRequest * @static - * @param {google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata} message CreateConversationModelOperationMetadata + * @param {google.cloud.dialogflow.v2.ImportConversationDataRequest} message ImportConversationDataRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateConversationModelOperationMetadata.toObject = function toObject(message, options) { + ImportConversationDataRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.conversationModel = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.createTime = null; + object.name = ""; + object.inputConfig = null; } - if (message.conversationModel != null && message.hasOwnProperty("conversationModel")) - object.conversationModel = message.conversationModel; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.State[message.state] === undefined ? message.state : $root.google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.State[message.state] : message.state; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) + object.inputConfig = $root.google.cloud.dialogflow.v2.InputConfig.toObject(message.inputConfig, options); return object; }; /** - * Converts this CreateConversationModelOperationMetadata to JSON. + * Converts this ImportConversationDataRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.ImportConversationDataRequest * @instance * @returns {Object.} JSON object */ - CreateConversationModelOperationMetadata.prototype.toJSON = function toJSON() { + ImportConversationDataRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateConversationModelOperationMetadata + * Gets the default type url for ImportConversationDataRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.ImportConversationDataRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateConversationModelOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportConversationDataRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.ImportConversationDataRequest"; }; - /** - * State enum. - * @name google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} PENDING=1 PENDING value - * @property {number} SUCCEEDED=2 SUCCEEDED value - * @property {number} FAILED=3 FAILED value - * @property {number} CANCELLED=4 CANCELLED value - * @property {number} CANCELLING=5 CANCELLING value - * @property {number} TRAINING=6 TRAINING value - */ - CreateConversationModelOperationMetadata.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PENDING"] = 1; - values[valuesById[2] = "SUCCEEDED"] = 2; - values[valuesById[3] = "FAILED"] = 3; - values[valuesById[4] = "CANCELLED"] = 4; - values[valuesById[5] = "CANCELLING"] = 5; - values[valuesById[6] = "TRAINING"] = 6; - return values; - })(); - - return CreateConversationModelOperationMetadata; + return ImportConversationDataRequest; })(); - v2.DeployConversationModelOperationMetadata = (function() { + v2.ImportConversationDataOperationMetadata = (function() { /** - * Properties of a DeployConversationModelOperationMetadata. + * Properties of an ImportConversationDataOperationMetadata. * @memberof google.cloud.dialogflow.v2 - * @interface IDeployConversationModelOperationMetadata - * @property {string|null} [conversationModel] DeployConversationModelOperationMetadata conversationModel - * @property {google.protobuf.ITimestamp|null} [createTime] DeployConversationModelOperationMetadata createTime + * @interface IImportConversationDataOperationMetadata + * @property {string|null} [conversationDataset] ImportConversationDataOperationMetadata conversationDataset + * @property {Array.|null} [partialFailures] ImportConversationDataOperationMetadata partialFailures + * @property {google.protobuf.ITimestamp|null} [createTime] ImportConversationDataOperationMetadata createTime */ /** - * Constructs a new DeployConversationModelOperationMetadata. + * Constructs a new ImportConversationDataOperationMetadata. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a DeployConversationModelOperationMetadata. - * @implements IDeployConversationModelOperationMetadata + * @classdesc Represents an ImportConversationDataOperationMetadata. + * @implements IImportConversationDataOperationMetadata * @constructor - * @param {google.cloud.dialogflow.v2.IDeployConversationModelOperationMetadata=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.IImportConversationDataOperationMetadata=} [properties] Properties to set */ - function DeployConversationModelOperationMetadata(properties) { + function ImportConversationDataOperationMetadata(properties) { + this.partialFailures = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -57017,85 +59476,102 @@ } /** - * DeployConversationModelOperationMetadata conversationModel. - * @member {string} conversationModel - * @memberof google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata + * ImportConversationDataOperationMetadata conversationDataset. + * @member {string} conversationDataset + * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata * @instance */ - DeployConversationModelOperationMetadata.prototype.conversationModel = ""; + ImportConversationDataOperationMetadata.prototype.conversationDataset = ""; /** - * DeployConversationModelOperationMetadata createTime. + * ImportConversationDataOperationMetadata partialFailures. + * @member {Array.} partialFailures + * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata + * @instance + */ + ImportConversationDataOperationMetadata.prototype.partialFailures = $util.emptyArray; + + /** + * ImportConversationDataOperationMetadata createTime. * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata * @instance */ - DeployConversationModelOperationMetadata.prototype.createTime = null; + ImportConversationDataOperationMetadata.prototype.createTime = null; /** - * Creates a new DeployConversationModelOperationMetadata instance using the specified properties. + * Creates a new ImportConversationDataOperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.IDeployConversationModelOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata} DeployConversationModelOperationMetadata instance + * @param {google.cloud.dialogflow.v2.IImportConversationDataOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata} ImportConversationDataOperationMetadata instance */ - DeployConversationModelOperationMetadata.create = function create(properties) { - return new DeployConversationModelOperationMetadata(properties); + ImportConversationDataOperationMetadata.create = function create(properties) { + return new ImportConversationDataOperationMetadata(properties); }; /** - * Encodes the specified DeployConversationModelOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata.verify|verify} messages. + * Encodes the specified ImportConversationDataOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.IDeployConversationModelOperationMetadata} message DeployConversationModelOperationMetadata message or plain object to encode + * @param {google.cloud.dialogflow.v2.IImportConversationDataOperationMetadata} message ImportConversationDataOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeployConversationModelOperationMetadata.encode = function encode(message, writer) { + ImportConversationDataOperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.conversationModel != null && Object.hasOwnProperty.call(message, "conversationModel")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversationModel); + if (message.conversationDataset != null && Object.hasOwnProperty.call(message, "conversationDataset")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversationDataset); + if (message.partialFailures != null && message.partialFailures.length) + for (var i = 0; i < message.partialFailures.length; ++i) + $root.google.rpc.Status.encode(message.partialFailures[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); 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(); return writer; }; /** - * Encodes the specified DeployConversationModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata.verify|verify} messages. + * Encodes the specified ImportConversationDataOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.IDeployConversationModelOperationMetadata} message DeployConversationModelOperationMetadata message or plain object to encode + * @param {google.cloud.dialogflow.v2.IImportConversationDataOperationMetadata} message ImportConversationDataOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeployConversationModelOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + ImportConversationDataOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeployConversationModelOperationMetadata message from the specified reader or buffer. + * Decodes an ImportConversationDataOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata} DeployConversationModelOperationMetadata + * @returns {google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata} ImportConversationDataOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeployConversationModelOperationMetadata.decode = function decode(reader, length) { + ImportConversationDataOperationMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.conversationModel = reader.string(); + message.conversationDataset = reader.string(); + break; + } + case 2: { + if (!(message.partialFailures && message.partialFailures.length)) + message.partialFailures = []; + message.partialFailures.push($root.google.rpc.Status.decode(reader, reader.uint32())); break; } case 3: { @@ -57111,35 +59587,44 @@ }; /** - * Decodes a DeployConversationModelOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes an ImportConversationDataOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata} DeployConversationModelOperationMetadata + * @returns {google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata} ImportConversationDataOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeployConversationModelOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + ImportConversationDataOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeployConversationModelOperationMetadata message. + * Verifies an ImportConversationDataOperationMetadata message. * @function verify - * @memberof google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeployConversationModelOperationMetadata.verify = function verify(message) { + ImportConversationDataOperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.conversationModel != null && message.hasOwnProperty("conversationModel")) - if (!$util.isString(message.conversationModel)) - return "conversationModel: string expected"; + if (message.conversationDataset != null && message.hasOwnProperty("conversationDataset")) + if (!$util.isString(message.conversationDataset)) + return "conversationDataset: string expected"; + if (message.partialFailures != null && message.hasOwnProperty("partialFailures")) { + if (!Array.isArray(message.partialFailures)) + return "partialFailures: array expected"; + for (var i = 0; i < message.partialFailures.length; ++i) { + var error = $root.google.rpc.Status.verify(message.partialFailures[i]); + if (error) + return "partialFailures." + error; + } + } if (message.createTime != null && message.hasOwnProperty("createTime")) { var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) @@ -57149,99 +59634,116 @@ }; /** - * Creates a DeployConversationModelOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an ImportConversationDataOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata} DeployConversationModelOperationMetadata + * @returns {google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata} ImportConversationDataOperationMetadata */ - DeployConversationModelOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata) + ImportConversationDataOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata) return object; - var message = new $root.google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata(); - if (object.conversationModel != null) - message.conversationModel = String(object.conversationModel); + var message = new $root.google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata(); + if (object.conversationDataset != null) + message.conversationDataset = String(object.conversationDataset); + if (object.partialFailures) { + if (!Array.isArray(object.partialFailures)) + throw TypeError(".google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata.partialFailures: array expected"); + message.partialFailures = []; + for (var i = 0; i < object.partialFailures.length; ++i) { + if (typeof object.partialFailures[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata.partialFailures: object expected"); + message.partialFailures[i] = $root.google.rpc.Status.fromObject(object.partialFailures[i]); + } + } if (object.createTime != null) { if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata.createTime: object expected"); + throw TypeError(".google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata.createTime: object expected"); message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } return message; }; /** - * Creates a plain object from a DeployConversationModelOperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from an ImportConversationDataOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata} message DeployConversationModelOperationMetadata + * @param {google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata} message ImportConversationDataOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeployConversationModelOperationMetadata.toObject = function toObject(message, options) { + ImportConversationDataOperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.partialFailures = []; if (options.defaults) { - object.conversationModel = ""; + object.conversationDataset = ""; object.createTime = null; } - if (message.conversationModel != null && message.hasOwnProperty("conversationModel")) - object.conversationModel = message.conversationModel; + if (message.conversationDataset != null && message.hasOwnProperty("conversationDataset")) + object.conversationDataset = message.conversationDataset; + if (message.partialFailures && message.partialFailures.length) { + object.partialFailures = []; + for (var j = 0; j < message.partialFailures.length; ++j) + object.partialFailures[j] = $root.google.rpc.Status.toObject(message.partialFailures[j], options); + } if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); return object; }; /** - * Converts this DeployConversationModelOperationMetadata to JSON. + * Converts this ImportConversationDataOperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata * @instance * @returns {Object.} JSON object */ - DeployConversationModelOperationMetadata.prototype.toJSON = function toJSON() { + ImportConversationDataOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeployConversationModelOperationMetadata + * Gets the default type url for ImportConversationDataOperationMetadata * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeployConversationModelOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportConversationDataOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.ImportConversationDataOperationMetadata"; }; - return DeployConversationModelOperationMetadata; + return ImportConversationDataOperationMetadata; })(); - v2.UndeployConversationModelOperationMetadata = (function() { + v2.ImportConversationDataOperationResponse = (function() { /** - * Properties of an UndeployConversationModelOperationMetadata. + * Properties of an ImportConversationDataOperationResponse. * @memberof google.cloud.dialogflow.v2 - * @interface IUndeployConversationModelOperationMetadata - * @property {string|null} [conversationModel] UndeployConversationModelOperationMetadata conversationModel - * @property {google.protobuf.ITimestamp|null} [createTime] UndeployConversationModelOperationMetadata createTime + * @interface IImportConversationDataOperationResponse + * @property {string|null} [conversationDataset] ImportConversationDataOperationResponse conversationDataset + * @property {number|null} [importCount] ImportConversationDataOperationResponse importCount */ /** - * Constructs a new UndeployConversationModelOperationMetadata. + * Constructs a new ImportConversationDataOperationResponse. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents an UndeployConversationModelOperationMetadata. - * @implements IUndeployConversationModelOperationMetadata + * @classdesc Represents an ImportConversationDataOperationResponse. + * @implements IImportConversationDataOperationResponse * @constructor - * @param {google.cloud.dialogflow.v2.IUndeployConversationModelOperationMetadata=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.IImportConversationDataOperationResponse=} [properties] Properties to set */ - function UndeployConversationModelOperationMetadata(properties) { + function ImportConversationDataOperationResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -57249,89 +59751,89 @@ } /** - * UndeployConversationModelOperationMetadata conversationModel. - * @member {string} conversationModel - * @memberof google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata + * ImportConversationDataOperationResponse conversationDataset. + * @member {string} conversationDataset + * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationResponse * @instance */ - UndeployConversationModelOperationMetadata.prototype.conversationModel = ""; + ImportConversationDataOperationResponse.prototype.conversationDataset = ""; /** - * UndeployConversationModelOperationMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata + * ImportConversationDataOperationResponse importCount. + * @member {number} importCount + * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationResponse * @instance */ - UndeployConversationModelOperationMetadata.prototype.createTime = null; + ImportConversationDataOperationResponse.prototype.importCount = 0; /** - * Creates a new UndeployConversationModelOperationMetadata instance using the specified properties. + * Creates a new ImportConversationDataOperationResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationResponse * @static - * @param {google.cloud.dialogflow.v2.IUndeployConversationModelOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata} UndeployConversationModelOperationMetadata instance + * @param {google.cloud.dialogflow.v2.IImportConversationDataOperationResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.ImportConversationDataOperationResponse} ImportConversationDataOperationResponse instance */ - UndeployConversationModelOperationMetadata.create = function create(properties) { - return new UndeployConversationModelOperationMetadata(properties); + ImportConversationDataOperationResponse.create = function create(properties) { + return new ImportConversationDataOperationResponse(properties); }; /** - * Encodes the specified UndeployConversationModelOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata.verify|verify} messages. + * Encodes the specified ImportConversationDataOperationResponse message. Does not implicitly {@link google.cloud.dialogflow.v2.ImportConversationDataOperationResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationResponse * @static - * @param {google.cloud.dialogflow.v2.IUndeployConversationModelOperationMetadata} message UndeployConversationModelOperationMetadata message or plain object to encode + * @param {google.cloud.dialogflow.v2.IImportConversationDataOperationResponse} message ImportConversationDataOperationResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UndeployConversationModelOperationMetadata.encode = function encode(message, writer) { + ImportConversationDataOperationResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.conversationModel != null && Object.hasOwnProperty.call(message, "conversationModel")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversationModel); - 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.conversationDataset != null && Object.hasOwnProperty.call(message, "conversationDataset")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversationDataset); + if (message.importCount != null && Object.hasOwnProperty.call(message, "importCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.importCount); return writer; }; /** - * Encodes the specified UndeployConversationModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata.verify|verify} messages. + * Encodes the specified ImportConversationDataOperationResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ImportConversationDataOperationResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationResponse * @static - * @param {google.cloud.dialogflow.v2.IUndeployConversationModelOperationMetadata} message UndeployConversationModelOperationMetadata message or plain object to encode + * @param {google.cloud.dialogflow.v2.IImportConversationDataOperationResponse} message ImportConversationDataOperationResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UndeployConversationModelOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + ImportConversationDataOperationResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UndeployConversationModelOperationMetadata message from the specified reader or buffer. + * Decodes an ImportConversationDataOperationResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata} UndeployConversationModelOperationMetadata + * @returns {google.cloud.dialogflow.v2.ImportConversationDataOperationResponse} ImportConversationDataOperationResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UndeployConversationModelOperationMetadata.decode = function decode(reader, length) { + ImportConversationDataOperationResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ImportConversationDataOperationResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.conversationModel = reader.string(); + message.conversationDataset = reader.string(); break; } case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.importCount = reader.int32(); break; } default: @@ -57343,137 +59845,131 @@ }; /** - * Decodes an UndeployConversationModelOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes an ImportConversationDataOperationResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata} UndeployConversationModelOperationMetadata + * @returns {google.cloud.dialogflow.v2.ImportConversationDataOperationResponse} ImportConversationDataOperationResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UndeployConversationModelOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + ImportConversationDataOperationResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UndeployConversationModelOperationMetadata message. + * Verifies an ImportConversationDataOperationResponse message. * @function verify - * @memberof google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UndeployConversationModelOperationMetadata.verify = function verify(message) { + ImportConversationDataOperationResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.conversationModel != null && message.hasOwnProperty("conversationModel")) - if (!$util.isString(message.conversationModel)) - return "conversationModel: 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.conversationDataset != null && message.hasOwnProperty("conversationDataset")) + if (!$util.isString(message.conversationDataset)) + return "conversationDataset: string expected"; + if (message.importCount != null && message.hasOwnProperty("importCount")) + if (!$util.isInteger(message.importCount)) + return "importCount: integer expected"; return null; }; /** - * Creates an UndeployConversationModelOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an ImportConversationDataOperationResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata} UndeployConversationModelOperationMetadata + * @returns {google.cloud.dialogflow.v2.ImportConversationDataOperationResponse} ImportConversationDataOperationResponse */ - UndeployConversationModelOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata) + ImportConversationDataOperationResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.ImportConversationDataOperationResponse) return object; - var message = new $root.google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata(); - if (object.conversationModel != null) - message.conversationModel = String(object.conversationModel); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } + var message = new $root.google.cloud.dialogflow.v2.ImportConversationDataOperationResponse(); + if (object.conversationDataset != null) + message.conversationDataset = String(object.conversationDataset); + if (object.importCount != null) + message.importCount = object.importCount | 0; return message; }; /** - * Creates a plain object from an UndeployConversationModelOperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from an ImportConversationDataOperationResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationResponse * @static - * @param {google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata} message UndeployConversationModelOperationMetadata + * @param {google.cloud.dialogflow.v2.ImportConversationDataOperationResponse} message ImportConversationDataOperationResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UndeployConversationModelOperationMetadata.toObject = function toObject(message, options) { + ImportConversationDataOperationResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.conversationModel = ""; - object.createTime = null; + object.conversationDataset = ""; + object.importCount = 0; } - if (message.conversationModel != null && message.hasOwnProperty("conversationModel")) - object.conversationModel = message.conversationModel; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.conversationDataset != null && message.hasOwnProperty("conversationDataset")) + object.conversationDataset = message.conversationDataset; + if (message.importCount != null && message.hasOwnProperty("importCount")) + object.importCount = message.importCount; return object; }; /** - * Converts this UndeployConversationModelOperationMetadata to JSON. + * Converts this ImportConversationDataOperationResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationResponse * @instance * @returns {Object.} JSON object */ - UndeployConversationModelOperationMetadata.prototype.toJSON = function toJSON() { + ImportConversationDataOperationResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UndeployConversationModelOperationMetadata + * Gets the default type url for ImportConversationDataOperationResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.ImportConversationDataOperationResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UndeployConversationModelOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportConversationDataOperationResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.ImportConversationDataOperationResponse"; }; - return UndeployConversationModelOperationMetadata; + return ImportConversationDataOperationResponse; })(); - v2.DeleteConversationModelOperationMetadata = (function() { + v2.CreateConversationDatasetOperationMetadata = (function() { /** - * Properties of a DeleteConversationModelOperationMetadata. + * Properties of a CreateConversationDatasetOperationMetadata. * @memberof google.cloud.dialogflow.v2 - * @interface IDeleteConversationModelOperationMetadata - * @property {string|null} [conversationModel] DeleteConversationModelOperationMetadata conversationModel - * @property {google.protobuf.ITimestamp|null} [createTime] DeleteConversationModelOperationMetadata createTime + * @interface ICreateConversationDatasetOperationMetadata + * @property {string|null} [conversationDataset] CreateConversationDatasetOperationMetadata conversationDataset */ /** - * Constructs a new DeleteConversationModelOperationMetadata. + * Constructs a new CreateConversationDatasetOperationMetadata. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a DeleteConversationModelOperationMetadata. - * @implements IDeleteConversationModelOperationMetadata + * @classdesc Represents a CreateConversationDatasetOperationMetadata. + * @implements ICreateConversationDatasetOperationMetadata * @constructor - * @param {google.cloud.dialogflow.v2.IDeleteConversationModelOperationMetadata=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.ICreateConversationDatasetOperationMetadata=} [properties] Properties to set */ - function DeleteConversationModelOperationMetadata(properties) { + function CreateConversationDatasetOperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -57481,89 +59977,75 @@ } /** - * DeleteConversationModelOperationMetadata conversationModel. - * @member {string} conversationModel - * @memberof google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata - * @instance - */ - DeleteConversationModelOperationMetadata.prototype.conversationModel = ""; - - /** - * DeleteConversationModelOperationMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata + * CreateConversationDatasetOperationMetadata conversationDataset. + * @member {string} conversationDataset + * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata * @instance */ - DeleteConversationModelOperationMetadata.prototype.createTime = null; + CreateConversationDatasetOperationMetadata.prototype.conversationDataset = ""; /** - * Creates a new DeleteConversationModelOperationMetadata instance using the specified properties. + * Creates a new CreateConversationDatasetOperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.IDeleteConversationModelOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata} DeleteConversationModelOperationMetadata instance + * @param {google.cloud.dialogflow.v2.ICreateConversationDatasetOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata} CreateConversationDatasetOperationMetadata instance */ - DeleteConversationModelOperationMetadata.create = function create(properties) { - return new DeleteConversationModelOperationMetadata(properties); + CreateConversationDatasetOperationMetadata.create = function create(properties) { + return new CreateConversationDatasetOperationMetadata(properties); }; /** - * Encodes the specified DeleteConversationModelOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata.verify|verify} messages. + * Encodes the specified CreateConversationDatasetOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.IDeleteConversationModelOperationMetadata} message DeleteConversationModelOperationMetadata message or plain object to encode + * @param {google.cloud.dialogflow.v2.ICreateConversationDatasetOperationMetadata} message CreateConversationDatasetOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteConversationModelOperationMetadata.encode = function encode(message, writer) { + CreateConversationDatasetOperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.conversationModel != null && Object.hasOwnProperty.call(message, "conversationModel")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversationModel); - 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.conversationDataset != null && Object.hasOwnProperty.call(message, "conversationDataset")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversationDataset); return writer; }; /** - * Encodes the specified DeleteConversationModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata.verify|verify} messages. + * Encodes the specified CreateConversationDatasetOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.IDeleteConversationModelOperationMetadata} message DeleteConversationModelOperationMetadata message or plain object to encode + * @param {google.cloud.dialogflow.v2.ICreateConversationDatasetOperationMetadata} message CreateConversationDatasetOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteConversationModelOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + CreateConversationDatasetOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteConversationModelOperationMetadata message from the specified reader or buffer. + * Decodes a CreateConversationDatasetOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata} DeleteConversationModelOperationMetadata + * @returns {google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata} CreateConversationDatasetOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteConversationModelOperationMetadata.decode = function decode(reader, length) { + CreateConversationDatasetOperationMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.conversationModel = reader.string(); - break; - } - case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.conversationDataset = reader.string(); break; } default: @@ -57575,139 +60057,121 @@ }; /** - * Decodes a DeleteConversationModelOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a CreateConversationDatasetOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata} DeleteConversationModelOperationMetadata + * @returns {google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata} CreateConversationDatasetOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteConversationModelOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + CreateConversationDatasetOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteConversationModelOperationMetadata message. + * Verifies a CreateConversationDatasetOperationMetadata message. * @function verify - * @memberof google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteConversationModelOperationMetadata.verify = function verify(message) { + CreateConversationDatasetOperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.conversationModel != null && message.hasOwnProperty("conversationModel")) - if (!$util.isString(message.conversationModel)) - return "conversationModel: 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.conversationDataset != null && message.hasOwnProperty("conversationDataset")) + if (!$util.isString(message.conversationDataset)) + return "conversationDataset: string expected"; return null; }; /** - * Creates a DeleteConversationModelOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a CreateConversationDatasetOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata} DeleteConversationModelOperationMetadata + * @returns {google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata} CreateConversationDatasetOperationMetadata */ - DeleteConversationModelOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata) + CreateConversationDatasetOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata) return object; - var message = new $root.google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata(); - if (object.conversationModel != null) - message.conversationModel = String(object.conversationModel); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } + var message = new $root.google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata(); + if (object.conversationDataset != null) + message.conversationDataset = String(object.conversationDataset); return message; }; /** - * Creates a plain object from a DeleteConversationModelOperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from a CreateConversationDatasetOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata} message DeleteConversationModelOperationMetadata + * @param {google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata} message CreateConversationDatasetOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteConversationModelOperationMetadata.toObject = function toObject(message, options) { + CreateConversationDatasetOperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.conversationModel = ""; - object.createTime = null; - } - if (message.conversationModel != null && message.hasOwnProperty("conversationModel")) - object.conversationModel = message.conversationModel; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (options.defaults) + object.conversationDataset = ""; + if (message.conversationDataset != null && message.hasOwnProperty("conversationDataset")) + object.conversationDataset = message.conversationDataset; return object; }; /** - * Converts this DeleteConversationModelOperationMetadata to JSON. + * Converts this CreateConversationDatasetOperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata * @instance * @returns {Object.} JSON object */ - DeleteConversationModelOperationMetadata.prototype.toJSON = function toJSON() { + CreateConversationDatasetOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteConversationModelOperationMetadata + * Gets the default type url for CreateConversationDatasetOperationMetadata * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata + * @memberof google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteConversationModelOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateConversationDatasetOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata"; }; - return DeleteConversationModelOperationMetadata; + return CreateConversationDatasetOperationMetadata; })(); - v2.CreateConversationModelEvaluationOperationMetadata = (function() { + v2.DeleteConversationDatasetOperationMetadata = (function() { /** - * Properties of a CreateConversationModelEvaluationOperationMetadata. + * Properties of a DeleteConversationDatasetOperationMetadata. * @memberof google.cloud.dialogflow.v2 - * @interface ICreateConversationModelEvaluationOperationMetadata - * @property {string|null} [conversationModelEvaluation] CreateConversationModelEvaluationOperationMetadata conversationModelEvaluation - * @property {string|null} [conversationModel] CreateConversationModelEvaluationOperationMetadata conversationModel - * @property {google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.State|null} [state] CreateConversationModelEvaluationOperationMetadata state - * @property {google.protobuf.ITimestamp|null} [createTime] CreateConversationModelEvaluationOperationMetadata createTime + * @interface IDeleteConversationDatasetOperationMetadata */ /** - * Constructs a new CreateConversationModelEvaluationOperationMetadata. + * Constructs a new DeleteConversationDatasetOperationMetadata. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a CreateConversationModelEvaluationOperationMetadata. - * @implements ICreateConversationModelEvaluationOperationMetadata + * @classdesc Represents a DeleteConversationDatasetOperationMetadata. + * @implements IDeleteConversationDatasetOperationMetadata * @constructor - * @param {google.cloud.dialogflow.v2.ICreateConversationModelEvaluationOperationMetadata=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.IDeleteConversationDatasetOperationMetadata=} [properties] Properties to set */ - function CreateConversationModelEvaluationOperationMetadata(properties) { + function DeleteConversationDatasetOperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -57715,119 +60179,63 @@ } /** - * CreateConversationModelEvaluationOperationMetadata conversationModelEvaluation. - * @member {string} conversationModelEvaluation - * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata - * @instance - */ - CreateConversationModelEvaluationOperationMetadata.prototype.conversationModelEvaluation = ""; - - /** - * CreateConversationModelEvaluationOperationMetadata conversationModel. - * @member {string} conversationModel - * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata - * @instance - */ - CreateConversationModelEvaluationOperationMetadata.prototype.conversationModel = ""; - - /** - * CreateConversationModelEvaluationOperationMetadata state. - * @member {google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.State} state - * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata - * @instance - */ - CreateConversationModelEvaluationOperationMetadata.prototype.state = 0; - - /** - * CreateConversationModelEvaluationOperationMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata - * @instance - */ - CreateConversationModelEvaluationOperationMetadata.prototype.createTime = null; - - /** - * Creates a new CreateConversationModelEvaluationOperationMetadata instance using the specified properties. + * Creates a new DeleteConversationDatasetOperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata + * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.ICreateConversationModelEvaluationOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata} CreateConversationModelEvaluationOperationMetadata instance + * @param {google.cloud.dialogflow.v2.IDeleteConversationDatasetOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata} DeleteConversationDatasetOperationMetadata instance */ - CreateConversationModelEvaluationOperationMetadata.create = function create(properties) { - return new CreateConversationModelEvaluationOperationMetadata(properties); + DeleteConversationDatasetOperationMetadata.create = function create(properties) { + return new DeleteConversationDatasetOperationMetadata(properties); }; /** - * Encodes the specified CreateConversationModelEvaluationOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.verify|verify} messages. + * Encodes the specified DeleteConversationDatasetOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata + * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.ICreateConversationModelEvaluationOperationMetadata} message CreateConversationModelEvaluationOperationMetadata message or plain object to encode + * @param {google.cloud.dialogflow.v2.IDeleteConversationDatasetOperationMetadata} message DeleteConversationDatasetOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateConversationModelEvaluationOperationMetadata.encode = function encode(message, writer) { + DeleteConversationDatasetOperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.conversationModelEvaluation != null && Object.hasOwnProperty.call(message, "conversationModelEvaluation")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversationModelEvaluation); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); - 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.conversationModel != null && Object.hasOwnProperty.call(message, "conversationModel")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.conversationModel); return writer; }; /** - * Encodes the specified CreateConversationModelEvaluationOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.verify|verify} messages. + * Encodes the specified DeleteConversationDatasetOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata + * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.ICreateConversationModelEvaluationOperationMetadata} message CreateConversationModelEvaluationOperationMetadata message or plain object to encode + * @param {google.cloud.dialogflow.v2.IDeleteConversationDatasetOperationMetadata} message DeleteConversationDatasetOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateConversationModelEvaluationOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + DeleteConversationDatasetOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateConversationModelEvaluationOperationMetadata message from the specified reader or buffer. + * Decodes a DeleteConversationDatasetOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata + * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata} CreateConversationModelEvaluationOperationMetadata + * @returns {google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata} DeleteConversationDatasetOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateConversationModelEvaluationOperationMetadata.decode = function decode(reader, length) { + DeleteConversationDatasetOperationMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.conversationModelEvaluation = reader.string(); - break; - } - case 4: { - message.conversationModel = reader.string(); - break; - } - case 2: { - message.state = reader.int32(); - break; - } - case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -57837,493 +60245,110 @@ }; /** - * Decodes a CreateConversationModelEvaluationOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a DeleteConversationDatasetOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata + * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata} CreateConversationModelEvaluationOperationMetadata + * @returns {google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata} DeleteConversationDatasetOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateConversationModelEvaluationOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + DeleteConversationDatasetOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateConversationModelEvaluationOperationMetadata message. + * Verifies a DeleteConversationDatasetOperationMetadata message. * @function verify - * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata + * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateConversationModelEvaluationOperationMetadata.verify = function verify(message) { + DeleteConversationDatasetOperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.conversationModelEvaluation != null && message.hasOwnProperty("conversationModelEvaluation")) - if (!$util.isString(message.conversationModelEvaluation)) - return "conversationModelEvaluation: string expected"; - if (message.conversationModel != null && message.hasOwnProperty("conversationModel")) - if (!$util.isString(message.conversationModel)) - return "conversationModel: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } return null; }; /** - * Creates a CreateConversationModelEvaluationOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteConversationDatasetOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata + * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata} CreateConversationModelEvaluationOperationMetadata + * @returns {google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata} DeleteConversationDatasetOperationMetadata */ - CreateConversationModelEvaluationOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata) + DeleteConversationDatasetOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata) return object; - var message = new $root.google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata(); - if (object.conversationModelEvaluation != null) - message.conversationModelEvaluation = String(object.conversationModelEvaluation); - if (object.conversationModel != null) - message.conversationModel = String(object.conversationModel); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "INITIALIZING": - case 1: - message.state = 1; - break; - case "RUNNING": - case 2: - message.state = 2; - break; - case "CANCELLED": - case 3: - message.state = 3; - break; - case "SUCCEEDED": - case 4: - message.state = 4; - break; - case "FAILED": - case 5: - message.state = 5; - break; - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - return message; + return new $root.google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata(); }; /** - * Creates a plain object from a CreateConversationModelEvaluationOperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from a DeleteConversationDatasetOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata + * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata} message CreateConversationModelEvaluationOperationMetadata + * @param {google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata} message DeleteConversationDatasetOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateConversationModelEvaluationOperationMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.conversationModelEvaluation = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.createTime = null; - object.conversationModel = ""; - } - if (message.conversationModelEvaluation != null && message.hasOwnProperty("conversationModelEvaluation")) - object.conversationModelEvaluation = message.conversationModelEvaluation; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.State[message.state] === undefined ? message.state : $root.google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.State[message.state] : message.state; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.conversationModel != null && message.hasOwnProperty("conversationModel")) - object.conversationModel = message.conversationModel; - return object; + DeleteConversationDatasetOperationMetadata.toObject = function toObject() { + return {}; }; /** - * Converts this CreateConversationModelEvaluationOperationMetadata to JSON. + * Converts this DeleteConversationDatasetOperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata + * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata * @instance * @returns {Object.} JSON object */ - CreateConversationModelEvaluationOperationMetadata.prototype.toJSON = function toJSON() { + DeleteConversationDatasetOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateConversationModelEvaluationOperationMetadata + * Gets the default type url for DeleteConversationDatasetOperationMetadata * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata + * @memberof google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateConversationModelEvaluationOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteConversationDatasetOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata"; - }; - - /** - * State enum. - * @name google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} INITIALIZING=1 INITIALIZING value - * @property {number} RUNNING=2 RUNNING value - * @property {number} CANCELLED=3 CANCELLED value - * @property {number} SUCCEEDED=4 SUCCEEDED value - * @property {number} FAILED=5 FAILED value - */ - CreateConversationModelEvaluationOperationMetadata.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INITIALIZING"] = 1; - values[valuesById[2] = "RUNNING"] = 2; - values[valuesById[3] = "CANCELLED"] = 3; - values[valuesById[4] = "SUCCEEDED"] = 4; - values[valuesById[5] = "FAILED"] = 5; - return values; - })(); - - return CreateConversationModelEvaluationOperationMetadata; - })(); - - v2.ConversationProfiles = (function() { - - /** - * Constructs a new ConversationProfiles service. - * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a ConversationProfiles - * @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 ConversationProfiles(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (ConversationProfiles.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ConversationProfiles; - - /** - * Creates new ConversationProfiles service using the specified rpc implementation. - * @function create - * @memberof google.cloud.dialogflow.v2.ConversationProfiles - * @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 {ConversationProfiles} RPC service. Useful where requests and/or responses are streamed. - */ - ConversationProfiles.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); + return typeUrlPrefix + "/google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata"; }; - /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationProfiles|listConversationProfiles}. - * @memberof google.cloud.dialogflow.v2.ConversationProfiles - * @typedef ListConversationProfilesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2.ListConversationProfilesResponse} [response] ListConversationProfilesResponse - */ - - /** - * Calls ListConversationProfiles. - * @function listConversationProfiles - * @memberof google.cloud.dialogflow.v2.ConversationProfiles - * @instance - * @param {google.cloud.dialogflow.v2.IListConversationProfilesRequest} request ListConversationProfilesRequest message or plain object - * @param {google.cloud.dialogflow.v2.ConversationProfiles.ListConversationProfilesCallback} callback Node-style callback called with the error, if any, and ListConversationProfilesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConversationProfiles.prototype.listConversationProfiles = function listConversationProfiles(request, callback) { - return this.rpcCall(listConversationProfiles, $root.google.cloud.dialogflow.v2.ListConversationProfilesRequest, $root.google.cloud.dialogflow.v2.ListConversationProfilesResponse, request, callback); - }, "name", { value: "ListConversationProfiles" }); - - /** - * Calls ListConversationProfiles. - * @function listConversationProfiles - * @memberof google.cloud.dialogflow.v2.ConversationProfiles - * @instance - * @param {google.cloud.dialogflow.v2.IListConversationProfilesRequest} request ListConversationProfilesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationProfiles|getConversationProfile}. - * @memberof google.cloud.dialogflow.v2.ConversationProfiles - * @typedef GetConversationProfileCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2.ConversationProfile} [response] ConversationProfile - */ - - /** - * Calls GetConversationProfile. - * @function getConversationProfile - * @memberof google.cloud.dialogflow.v2.ConversationProfiles - * @instance - * @param {google.cloud.dialogflow.v2.IGetConversationProfileRequest} request GetConversationProfileRequest message or plain object - * @param {google.cloud.dialogflow.v2.ConversationProfiles.GetConversationProfileCallback} callback Node-style callback called with the error, if any, and ConversationProfile - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConversationProfiles.prototype.getConversationProfile = function getConversationProfile(request, callback) { - return this.rpcCall(getConversationProfile, $root.google.cloud.dialogflow.v2.GetConversationProfileRequest, $root.google.cloud.dialogflow.v2.ConversationProfile, request, callback); - }, "name", { value: "GetConversationProfile" }); - - /** - * Calls GetConversationProfile. - * @function getConversationProfile - * @memberof google.cloud.dialogflow.v2.ConversationProfiles - * @instance - * @param {google.cloud.dialogflow.v2.IGetConversationProfileRequest} request GetConversationProfileRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationProfiles|createConversationProfile}. - * @memberof google.cloud.dialogflow.v2.ConversationProfiles - * @typedef CreateConversationProfileCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2.ConversationProfile} [response] ConversationProfile - */ - - /** - * Calls CreateConversationProfile. - * @function createConversationProfile - * @memberof google.cloud.dialogflow.v2.ConversationProfiles - * @instance - * @param {google.cloud.dialogflow.v2.ICreateConversationProfileRequest} request CreateConversationProfileRequest message or plain object - * @param {google.cloud.dialogflow.v2.ConversationProfiles.CreateConversationProfileCallback} callback Node-style callback called with the error, if any, and ConversationProfile - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConversationProfiles.prototype.createConversationProfile = function createConversationProfile(request, callback) { - return this.rpcCall(createConversationProfile, $root.google.cloud.dialogflow.v2.CreateConversationProfileRequest, $root.google.cloud.dialogflow.v2.ConversationProfile, request, callback); - }, "name", { value: "CreateConversationProfile" }); - - /** - * Calls CreateConversationProfile. - * @function createConversationProfile - * @memberof google.cloud.dialogflow.v2.ConversationProfiles - * @instance - * @param {google.cloud.dialogflow.v2.ICreateConversationProfileRequest} request CreateConversationProfileRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationProfiles|updateConversationProfile}. - * @memberof google.cloud.dialogflow.v2.ConversationProfiles - * @typedef UpdateConversationProfileCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.dialogflow.v2.ConversationProfile} [response] ConversationProfile - */ - - /** - * Calls UpdateConversationProfile. - * @function updateConversationProfile - * @memberof google.cloud.dialogflow.v2.ConversationProfiles - * @instance - * @param {google.cloud.dialogflow.v2.IUpdateConversationProfileRequest} request UpdateConversationProfileRequest message or plain object - * @param {google.cloud.dialogflow.v2.ConversationProfiles.UpdateConversationProfileCallback} callback Node-style callback called with the error, if any, and ConversationProfile - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConversationProfiles.prototype.updateConversationProfile = function updateConversationProfile(request, callback) { - return this.rpcCall(updateConversationProfile, $root.google.cloud.dialogflow.v2.UpdateConversationProfileRequest, $root.google.cloud.dialogflow.v2.ConversationProfile, request, callback); - }, "name", { value: "UpdateConversationProfile" }); - - /** - * Calls UpdateConversationProfile. - * @function updateConversationProfile - * @memberof google.cloud.dialogflow.v2.ConversationProfiles - * @instance - * @param {google.cloud.dialogflow.v2.IUpdateConversationProfileRequest} request UpdateConversationProfileRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationProfiles|deleteConversationProfile}. - * @memberof google.cloud.dialogflow.v2.ConversationProfiles - * @typedef DeleteConversationProfileCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteConversationProfile. - * @function deleteConversationProfile - * @memberof google.cloud.dialogflow.v2.ConversationProfiles - * @instance - * @param {google.cloud.dialogflow.v2.IDeleteConversationProfileRequest} request DeleteConversationProfileRequest message or plain object - * @param {google.cloud.dialogflow.v2.ConversationProfiles.DeleteConversationProfileCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConversationProfiles.prototype.deleteConversationProfile = function deleteConversationProfile(request, callback) { - return this.rpcCall(deleteConversationProfile, $root.google.cloud.dialogflow.v2.DeleteConversationProfileRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteConversationProfile" }); - - /** - * Calls DeleteConversationProfile. - * @function deleteConversationProfile - * @memberof google.cloud.dialogflow.v2.ConversationProfiles - * @instance - * @param {google.cloud.dialogflow.v2.IDeleteConversationProfileRequest} request DeleteConversationProfileRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationProfiles|setSuggestionFeatureConfig}. - * @memberof google.cloud.dialogflow.v2.ConversationProfiles - * @typedef SetSuggestionFeatureConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls SetSuggestionFeatureConfig. - * @function setSuggestionFeatureConfig - * @memberof google.cloud.dialogflow.v2.ConversationProfiles - * @instance - * @param {google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigRequest} request SetSuggestionFeatureConfigRequest message or plain object - * @param {google.cloud.dialogflow.v2.ConversationProfiles.SetSuggestionFeatureConfigCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConversationProfiles.prototype.setSuggestionFeatureConfig = function setSuggestionFeatureConfig(request, callback) { - return this.rpcCall(setSuggestionFeatureConfig, $root.google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "SetSuggestionFeatureConfig" }); - - /** - * Calls SetSuggestionFeatureConfig. - * @function setSuggestionFeatureConfig - * @memberof google.cloud.dialogflow.v2.ConversationProfiles - * @instance - * @param {google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigRequest} request SetSuggestionFeatureConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.dialogflow.v2.ConversationProfiles|clearSuggestionFeatureConfig}. - * @memberof google.cloud.dialogflow.v2.ConversationProfiles - * @typedef ClearSuggestionFeatureConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls ClearSuggestionFeatureConfig. - * @function clearSuggestionFeatureConfig - * @memberof google.cloud.dialogflow.v2.ConversationProfiles - * @instance - * @param {google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigRequest} request ClearSuggestionFeatureConfigRequest message or plain object - * @param {google.cloud.dialogflow.v2.ConversationProfiles.ClearSuggestionFeatureConfigCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConversationProfiles.prototype.clearSuggestionFeatureConfig = function clearSuggestionFeatureConfig(request, callback) { - return this.rpcCall(clearSuggestionFeatureConfig, $root.google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ClearSuggestionFeatureConfig" }); - - /** - * Calls ClearSuggestionFeatureConfig. - * @function clearSuggestionFeatureConfig - * @memberof google.cloud.dialogflow.v2.ConversationProfiles - * @instance - * @param {google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigRequest} request ClearSuggestionFeatureConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return ConversationProfiles; + return DeleteConversationDatasetOperationMetadata; })(); - v2.ConversationProfile = (function() { + v2.GcsSources = (function() { /** - * Properties of a ConversationProfile. + * Properties of a GcsSources. * @memberof google.cloud.dialogflow.v2 - * @interface IConversationProfile - * @property {string|null} [name] ConversationProfile name - * @property {string|null} [displayName] ConversationProfile displayName - * @property {google.protobuf.ITimestamp|null} [createTime] ConversationProfile createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] ConversationProfile updateTime - * @property {google.cloud.dialogflow.v2.IAutomatedAgentConfig|null} [automatedAgentConfig] ConversationProfile automatedAgentConfig - * @property {google.cloud.dialogflow.v2.IHumanAgentAssistantConfig|null} [humanAgentAssistantConfig] ConversationProfile humanAgentAssistantConfig - * @property {google.cloud.dialogflow.v2.IHumanAgentHandoffConfig|null} [humanAgentHandoffConfig] ConversationProfile humanAgentHandoffConfig - * @property {google.cloud.dialogflow.v2.INotificationConfig|null} [notificationConfig] ConversationProfile notificationConfig - * @property {google.cloud.dialogflow.v2.ILoggingConfig|null} [loggingConfig] ConversationProfile loggingConfig - * @property {google.cloud.dialogflow.v2.INotificationConfig|null} [newMessageEventNotificationConfig] ConversationProfile newMessageEventNotificationConfig - * @property {google.cloud.dialogflow.v2.ISpeechToTextConfig|null} [sttConfig] ConversationProfile sttConfig - * @property {string|null} [languageCode] ConversationProfile languageCode - * @property {string|null} [timeZone] ConversationProfile timeZone - * @property {string|null} [securitySettings] ConversationProfile securitySettings - * @property {google.cloud.dialogflow.v2.ISynthesizeSpeechConfig|null} [ttsConfig] ConversationProfile ttsConfig + * @interface IGcsSources + * @property {Array.|null} [uris] GcsSources uris */ /** - * Constructs a new ConversationProfile. + * Constructs a new GcsSources. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a ConversationProfile. - * @implements IConversationProfile + * @classdesc Represents a GcsSources. + * @implements IGcsSources * @constructor - * @param {google.cloud.dialogflow.v2.IConversationProfile=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.IGcsSources=} [properties] Properties to set */ - function ConversationProfile(properties) { + function GcsSources(properties) { + this.uris = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -58331,271 +60356,293 @@ } /** - * ConversationProfile name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2.ConversationProfile + * GcsSources uris. + * @member {Array.} uris + * @memberof google.cloud.dialogflow.v2.GcsSources * @instance */ - ConversationProfile.prototype.name = ""; + GcsSources.prototype.uris = $util.emptyArray; /** - * ConversationProfile displayName. - * @member {string} displayName - * @memberof google.cloud.dialogflow.v2.ConversationProfile - * @instance + * Creates a new GcsSources instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2.GcsSources + * @static + * @param {google.cloud.dialogflow.v2.IGcsSources=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.GcsSources} GcsSources instance */ - ConversationProfile.prototype.displayName = ""; + GcsSources.create = function create(properties) { + return new GcsSources(properties); + }; /** - * ConversationProfile createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dialogflow.v2.ConversationProfile - * @instance + * Encodes the specified GcsSources message. Does not implicitly {@link google.cloud.dialogflow.v2.GcsSources.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2.GcsSources + * @static + * @param {google.cloud.dialogflow.v2.IGcsSources} message GcsSources message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - ConversationProfile.prototype.createTime = null; + GcsSources.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uris != null && message.uris.length) + for (var i = 0; i < message.uris.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uris[i]); + return writer; + }; /** - * ConversationProfile updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.dialogflow.v2.ConversationProfile - * @instance + * Encodes the specified GcsSources message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.GcsSources.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2.GcsSources + * @static + * @param {google.cloud.dialogflow.v2.IGcsSources} message GcsSources message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - ConversationProfile.prototype.updateTime = null; + GcsSources.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * ConversationProfile automatedAgentConfig. - * @member {google.cloud.dialogflow.v2.IAutomatedAgentConfig|null|undefined} automatedAgentConfig - * @memberof google.cloud.dialogflow.v2.ConversationProfile - * @instance + * Decodes a GcsSources message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2.GcsSources + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2.GcsSources} GcsSources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConversationProfile.prototype.automatedAgentConfig = null; + GcsSources.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.GcsSources(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.uris && message.uris.length)) + message.uris = []; + message.uris.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * ConversationProfile humanAgentAssistantConfig. - * @member {google.cloud.dialogflow.v2.IHumanAgentAssistantConfig|null|undefined} humanAgentAssistantConfig - * @memberof google.cloud.dialogflow.v2.ConversationProfile - * @instance + * Decodes a GcsSources message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2.GcsSources + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2.GcsSources} GcsSources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConversationProfile.prototype.humanAgentAssistantConfig = null; + GcsSources.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * ConversationProfile humanAgentHandoffConfig. - * @member {google.cloud.dialogflow.v2.IHumanAgentHandoffConfig|null|undefined} humanAgentHandoffConfig - * @memberof google.cloud.dialogflow.v2.ConversationProfile - * @instance + * Verifies a GcsSources message. + * @function verify + * @memberof google.cloud.dialogflow.v2.GcsSources + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ConversationProfile.prototype.humanAgentHandoffConfig = null; + GcsSources.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uris != null && message.hasOwnProperty("uris")) { + if (!Array.isArray(message.uris)) + return "uris: array expected"; + for (var i = 0; i < message.uris.length; ++i) + if (!$util.isString(message.uris[i])) + return "uris: string[] expected"; + } + return null; + }; /** - * ConversationProfile notificationConfig. - * @member {google.cloud.dialogflow.v2.INotificationConfig|null|undefined} notificationConfig - * @memberof google.cloud.dialogflow.v2.ConversationProfile - * @instance + * Creates a GcsSources message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2.GcsSources + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2.GcsSources} GcsSources */ - ConversationProfile.prototype.notificationConfig = null; + GcsSources.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.GcsSources) + return object; + var message = new $root.google.cloud.dialogflow.v2.GcsSources(); + if (object.uris) { + if (!Array.isArray(object.uris)) + throw TypeError(".google.cloud.dialogflow.v2.GcsSources.uris: array expected"); + message.uris = []; + for (var i = 0; i < object.uris.length; ++i) + message.uris[i] = String(object.uris[i]); + } + return message; + }; /** - * ConversationProfile loggingConfig. - * @member {google.cloud.dialogflow.v2.ILoggingConfig|null|undefined} loggingConfig - * @memberof google.cloud.dialogflow.v2.ConversationProfile - * @instance + * Creates a plain object from a GcsSources message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2.GcsSources + * @static + * @param {google.cloud.dialogflow.v2.GcsSources} message GcsSources + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - ConversationProfile.prototype.loggingConfig = null; + GcsSources.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uris = []; + if (message.uris && message.uris.length) { + object.uris = []; + for (var j = 0; j < message.uris.length; ++j) + object.uris[j] = message.uris[j]; + } + return object; + }; /** - * ConversationProfile newMessageEventNotificationConfig. - * @member {google.cloud.dialogflow.v2.INotificationConfig|null|undefined} newMessageEventNotificationConfig - * @memberof google.cloud.dialogflow.v2.ConversationProfile + * Converts this GcsSources to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2.GcsSources * @instance + * @returns {Object.} JSON object */ - ConversationProfile.prototype.newMessageEventNotificationConfig = null; + GcsSources.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * ConversationProfile sttConfig. - * @member {google.cloud.dialogflow.v2.ISpeechToTextConfig|null|undefined} sttConfig - * @memberof google.cloud.dialogflow.v2.ConversationProfile - * @instance + * Gets the default type url for GcsSources + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2.GcsSources + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - ConversationProfile.prototype.sttConfig = null; + GcsSources.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.v2.GcsSources"; + }; - /** - * ConversationProfile languageCode. - * @member {string} languageCode - * @memberof google.cloud.dialogflow.v2.ConversationProfile - * @instance - */ - ConversationProfile.prototype.languageCode = ""; + return GcsSources; + })(); + + v2.GcsDestination = (function() { /** - * ConversationProfile timeZone. - * @member {string} timeZone - * @memberof google.cloud.dialogflow.v2.ConversationProfile - * @instance + * Properties of a GcsDestination. + * @memberof google.cloud.dialogflow.v2 + * @interface IGcsDestination + * @property {string|null} [uri] GcsDestination uri */ - ConversationProfile.prototype.timeZone = ""; /** - * ConversationProfile securitySettings. - * @member {string} securitySettings - * @memberof google.cloud.dialogflow.v2.ConversationProfile - * @instance + * Constructs a new GcsDestination. + * @memberof google.cloud.dialogflow.v2 + * @classdesc Represents a GcsDestination. + * @implements IGcsDestination + * @constructor + * @param {google.cloud.dialogflow.v2.IGcsDestination=} [properties] Properties to set */ - ConversationProfile.prototype.securitySettings = ""; + function GcsDestination(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]]; + } /** - * ConversationProfile ttsConfig. - * @member {google.cloud.dialogflow.v2.ISynthesizeSpeechConfig|null|undefined} ttsConfig - * @memberof google.cloud.dialogflow.v2.ConversationProfile + * GcsDestination uri. + * @member {string} uri + * @memberof google.cloud.dialogflow.v2.GcsDestination * @instance */ - ConversationProfile.prototype.ttsConfig = null; + GcsDestination.prototype.uri = ""; /** - * Creates a new ConversationProfile instance using the specified properties. + * Creates a new GcsDestination instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.ConversationProfile + * @memberof google.cloud.dialogflow.v2.GcsDestination * @static - * @param {google.cloud.dialogflow.v2.IConversationProfile=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.ConversationProfile} ConversationProfile instance + * @param {google.cloud.dialogflow.v2.IGcsDestination=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.GcsDestination} GcsDestination instance */ - ConversationProfile.create = function create(properties) { - return new ConversationProfile(properties); + GcsDestination.create = function create(properties) { + return new GcsDestination(properties); }; /** - * Encodes the specified ConversationProfile message. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationProfile.verify|verify} messages. + * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.dialogflow.v2.GcsDestination.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.ConversationProfile + * @memberof google.cloud.dialogflow.v2.GcsDestination * @static - * @param {google.cloud.dialogflow.v2.IConversationProfile} message ConversationProfile message or plain object to encode + * @param {google.cloud.dialogflow.v2.IGcsDestination} message GcsDestination message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConversationProfile.encode = function encode(message, writer) { + GcsDestination.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.automatedAgentConfig != null && Object.hasOwnProperty.call(message, "automatedAgentConfig")) - $root.google.cloud.dialogflow.v2.AutomatedAgentConfig.encode(message.automatedAgentConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.humanAgentAssistantConfig != null && Object.hasOwnProperty.call(message, "humanAgentAssistantConfig")) - $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.encode(message.humanAgentAssistantConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.humanAgentHandoffConfig != null && Object.hasOwnProperty.call(message, "humanAgentHandoffConfig")) - $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.encode(message.humanAgentHandoffConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.notificationConfig != null && Object.hasOwnProperty.call(message, "notificationConfig")) - $root.google.cloud.dialogflow.v2.NotificationConfig.encode(message.notificationConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.loggingConfig != null && Object.hasOwnProperty.call(message, "loggingConfig")) - $root.google.cloud.dialogflow.v2.LoggingConfig.encode(message.loggingConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.newMessageEventNotificationConfig != null && Object.hasOwnProperty.call(message, "newMessageEventNotificationConfig")) - $root.google.cloud.dialogflow.v2.NotificationConfig.encode(message.newMessageEventNotificationConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sttConfig != null && Object.hasOwnProperty.call(message, "sttConfig")) - $root.google.cloud.dialogflow.v2.SpeechToTextConfig.encode(message.sttConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.languageCode); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.securitySettings != null && Object.hasOwnProperty.call(message, "securitySettings")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.securitySettings); - if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.timeZone); - if (message.ttsConfig != null && Object.hasOwnProperty.call(message, "ttsConfig")) - $root.google.cloud.dialogflow.v2.SynthesizeSpeechConfig.encode(message.ttsConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); return writer; }; /** - * Encodes the specified ConversationProfile message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationProfile.verify|verify} messages. + * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.GcsDestination.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.ConversationProfile + * @memberof google.cloud.dialogflow.v2.GcsDestination * @static - * @param {google.cloud.dialogflow.v2.IConversationProfile} message ConversationProfile message or plain object to encode + * @param {google.cloud.dialogflow.v2.IGcsDestination} message GcsDestination message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConversationProfile.encodeDelimited = function encodeDelimited(message, writer) { + GcsDestination.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ConversationProfile message from the specified reader or buffer. + * Decodes a GcsDestination message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.ConversationProfile + * @memberof google.cloud.dialogflow.v2.GcsDestination * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.ConversationProfile} ConversationProfile + * @returns {google.cloud.dialogflow.v2.GcsDestination} GcsDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConversationProfile.decode = function decode(reader, length) { + GcsDestination.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ConversationProfile(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.GcsDestination(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.displayName = reader.string(); - break; - } - case 11: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 12: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.automatedAgentConfig = $root.google.cloud.dialogflow.v2.AutomatedAgentConfig.decode(reader, reader.uint32()); - break; - } - case 4: { - message.humanAgentAssistantConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.decode(reader, reader.uint32()); - break; - } - case 5: { - message.humanAgentHandoffConfig = $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.decode(reader, reader.uint32()); - break; - } - case 6: { - message.notificationConfig = $root.google.cloud.dialogflow.v2.NotificationConfig.decode(reader, reader.uint32()); - break; - } - case 7: { - message.loggingConfig = $root.google.cloud.dialogflow.v2.LoggingConfig.decode(reader, reader.uint32()); - break; - } - case 8: { - message.newMessageEventNotificationConfig = $root.google.cloud.dialogflow.v2.NotificationConfig.decode(reader, reader.uint32()); - break; - } - case 9: { - message.sttConfig = $root.google.cloud.dialogflow.v2.SpeechToTextConfig.decode(reader, reader.uint32()); - break; - } - case 10: { - message.languageCode = reader.string(); - break; - } - case 14: { - message.timeZone = reader.string(); - break; - } - case 13: { - message.securitySettings = reader.string(); - break; - } - case 18: { - message.ttsConfig = $root.google.cloud.dialogflow.v2.SynthesizeSpeechConfig.decode(reader, reader.uint32()); + message.uri = reader.string(); break; } default: @@ -58607,287 +60654,125 @@ }; /** - * Decodes a ConversationProfile message from the specified reader or buffer, length delimited. + * Decodes a GcsDestination message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.ConversationProfile + * @memberof google.cloud.dialogflow.v2.GcsDestination * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.ConversationProfile} ConversationProfile + * @returns {google.cloud.dialogflow.v2.GcsDestination} GcsDestination * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConversationProfile.decodeDelimited = function decodeDelimited(reader) { + GcsDestination.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ConversationProfile message. + * Verifies a GcsDestination message. * @function verify - * @memberof google.cloud.dialogflow.v2.ConversationProfile + * @memberof google.cloud.dialogflow.v2.GcsDestination * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ConversationProfile.verify = function verify(message) { + GcsDestination.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.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.automatedAgentConfig != null && message.hasOwnProperty("automatedAgentConfig")) { - var error = $root.google.cloud.dialogflow.v2.AutomatedAgentConfig.verify(message.automatedAgentConfig); - if (error) - return "automatedAgentConfig." + error; - } - if (message.humanAgentAssistantConfig != null && message.hasOwnProperty("humanAgentAssistantConfig")) { - var error = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.verify(message.humanAgentAssistantConfig); - if (error) - return "humanAgentAssistantConfig." + error; - } - if (message.humanAgentHandoffConfig != null && message.hasOwnProperty("humanAgentHandoffConfig")) { - var error = $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.verify(message.humanAgentHandoffConfig); - if (error) - return "humanAgentHandoffConfig." + error; - } - if (message.notificationConfig != null && message.hasOwnProperty("notificationConfig")) { - var error = $root.google.cloud.dialogflow.v2.NotificationConfig.verify(message.notificationConfig); - if (error) - return "notificationConfig." + error; - } - if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) { - var error = $root.google.cloud.dialogflow.v2.LoggingConfig.verify(message.loggingConfig); - if (error) - return "loggingConfig." + error; - } - if (message.newMessageEventNotificationConfig != null && message.hasOwnProperty("newMessageEventNotificationConfig")) { - var error = $root.google.cloud.dialogflow.v2.NotificationConfig.verify(message.newMessageEventNotificationConfig); - if (error) - return "newMessageEventNotificationConfig." + error; - } - if (message.sttConfig != null && message.hasOwnProperty("sttConfig")) { - var error = $root.google.cloud.dialogflow.v2.SpeechToTextConfig.verify(message.sttConfig); - if (error) - return "sttConfig." + error; - } - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - if (!$util.isString(message.languageCode)) - return "languageCode: string expected"; - if (message.timeZone != null && message.hasOwnProperty("timeZone")) - if (!$util.isString(message.timeZone)) - return "timeZone: string expected"; - if (message.securitySettings != null && message.hasOwnProperty("securitySettings")) - if (!$util.isString(message.securitySettings)) - return "securitySettings: string expected"; - if (message.ttsConfig != null && message.hasOwnProperty("ttsConfig")) { - var error = $root.google.cloud.dialogflow.v2.SynthesizeSpeechConfig.verify(message.ttsConfig); - if (error) - return "ttsConfig." + error; - } + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; return null; }; /** - * Creates a ConversationProfile message from a plain object. Also converts values to their respective internal types. + * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.ConversationProfile + * @memberof google.cloud.dialogflow.v2.GcsDestination * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.ConversationProfile} ConversationProfile + * @returns {google.cloud.dialogflow.v2.GcsDestination} GcsDestination */ - ConversationProfile.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.ConversationProfile) + GcsDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.GcsDestination) return object; - var message = new $root.google.cloud.dialogflow.v2.ConversationProfile(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dialogflow.v2.ConversationProfile.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.dialogflow.v2.ConversationProfile.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.automatedAgentConfig != null) { - if (typeof object.automatedAgentConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2.ConversationProfile.automatedAgentConfig: object expected"); - message.automatedAgentConfig = $root.google.cloud.dialogflow.v2.AutomatedAgentConfig.fromObject(object.automatedAgentConfig); - } - if (object.humanAgentAssistantConfig != null) { - if (typeof object.humanAgentAssistantConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2.ConversationProfile.humanAgentAssistantConfig: object expected"); - message.humanAgentAssistantConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.fromObject(object.humanAgentAssistantConfig); - } - if (object.humanAgentHandoffConfig != null) { - if (typeof object.humanAgentHandoffConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2.ConversationProfile.humanAgentHandoffConfig: object expected"); - message.humanAgentHandoffConfig = $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.fromObject(object.humanAgentHandoffConfig); - } - if (object.notificationConfig != null) { - if (typeof object.notificationConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2.ConversationProfile.notificationConfig: object expected"); - message.notificationConfig = $root.google.cloud.dialogflow.v2.NotificationConfig.fromObject(object.notificationConfig); - } - if (object.loggingConfig != null) { - if (typeof object.loggingConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2.ConversationProfile.loggingConfig: object expected"); - message.loggingConfig = $root.google.cloud.dialogflow.v2.LoggingConfig.fromObject(object.loggingConfig); - } - if (object.newMessageEventNotificationConfig != null) { - if (typeof object.newMessageEventNotificationConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2.ConversationProfile.newMessageEventNotificationConfig: object expected"); - message.newMessageEventNotificationConfig = $root.google.cloud.dialogflow.v2.NotificationConfig.fromObject(object.newMessageEventNotificationConfig); - } - if (object.sttConfig != null) { - if (typeof object.sttConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2.ConversationProfile.sttConfig: object expected"); - message.sttConfig = $root.google.cloud.dialogflow.v2.SpeechToTextConfig.fromObject(object.sttConfig); - } - if (object.languageCode != null) - message.languageCode = String(object.languageCode); - if (object.timeZone != null) - message.timeZone = String(object.timeZone); - if (object.securitySettings != null) - message.securitySettings = String(object.securitySettings); - if (object.ttsConfig != null) { - if (typeof object.ttsConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2.ConversationProfile.ttsConfig: object expected"); - message.ttsConfig = $root.google.cloud.dialogflow.v2.SynthesizeSpeechConfig.fromObject(object.ttsConfig); - } + var message = new $root.google.cloud.dialogflow.v2.GcsDestination(); + if (object.uri != null) + message.uri = String(object.uri); return message; }; /** - * Creates a plain object from a ConversationProfile message. Also converts values to other types if specified. + * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.ConversationProfile + * @memberof google.cloud.dialogflow.v2.GcsDestination * @static - * @param {google.cloud.dialogflow.v2.ConversationProfile} message ConversationProfile + * @param {google.cloud.dialogflow.v2.GcsDestination} message GcsDestination * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ConversationProfile.toObject = function toObject(message, options) { + GcsDestination.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.automatedAgentConfig = null; - object.humanAgentAssistantConfig = null; - object.humanAgentHandoffConfig = null; - object.notificationConfig = null; - object.loggingConfig = null; - object.newMessageEventNotificationConfig = null; - object.sttConfig = null; - object.languageCode = ""; - object.createTime = null; - object.updateTime = null; - object.securitySettings = ""; - object.timeZone = ""; - object.ttsConfig = 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.automatedAgentConfig != null && message.hasOwnProperty("automatedAgentConfig")) - object.automatedAgentConfig = $root.google.cloud.dialogflow.v2.AutomatedAgentConfig.toObject(message.automatedAgentConfig, options); - if (message.humanAgentAssistantConfig != null && message.hasOwnProperty("humanAgentAssistantConfig")) - object.humanAgentAssistantConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.toObject(message.humanAgentAssistantConfig, options); - if (message.humanAgentHandoffConfig != null && message.hasOwnProperty("humanAgentHandoffConfig")) - object.humanAgentHandoffConfig = $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.toObject(message.humanAgentHandoffConfig, options); - if (message.notificationConfig != null && message.hasOwnProperty("notificationConfig")) - object.notificationConfig = $root.google.cloud.dialogflow.v2.NotificationConfig.toObject(message.notificationConfig, options); - if (message.loggingConfig != null && message.hasOwnProperty("loggingConfig")) - object.loggingConfig = $root.google.cloud.dialogflow.v2.LoggingConfig.toObject(message.loggingConfig, options); - if (message.newMessageEventNotificationConfig != null && message.hasOwnProperty("newMessageEventNotificationConfig")) - object.newMessageEventNotificationConfig = $root.google.cloud.dialogflow.v2.NotificationConfig.toObject(message.newMessageEventNotificationConfig, options); - if (message.sttConfig != null && message.hasOwnProperty("sttConfig")) - object.sttConfig = $root.google.cloud.dialogflow.v2.SpeechToTextConfig.toObject(message.sttConfig, options); - if (message.languageCode != null && message.hasOwnProperty("languageCode")) - object.languageCode = message.languageCode; - 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.securitySettings != null && message.hasOwnProperty("securitySettings")) - object.securitySettings = message.securitySettings; - if (message.timeZone != null && message.hasOwnProperty("timeZone")) - object.timeZone = message.timeZone; - if (message.ttsConfig != null && message.hasOwnProperty("ttsConfig")) - object.ttsConfig = $root.google.cloud.dialogflow.v2.SynthesizeSpeechConfig.toObject(message.ttsConfig, options); + if (options.defaults) + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; return object; }; /** - * Converts this ConversationProfile to JSON. + * Converts this GcsDestination to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.ConversationProfile + * @memberof google.cloud.dialogflow.v2.GcsDestination * @instance * @returns {Object.} JSON object */ - ConversationProfile.prototype.toJSON = function toJSON() { + GcsDestination.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ConversationProfile + * Gets the default type url for GcsDestination * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.ConversationProfile + * @memberof google.cloud.dialogflow.v2.GcsDestination * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ConversationProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GcsDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.ConversationProfile"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.GcsDestination"; }; - return ConversationProfile; + return GcsDestination; })(); - v2.ListConversationProfilesRequest = (function() { + v2.ConversationEvent = (function() { /** - * Properties of a ListConversationProfilesRequest. + * Properties of a ConversationEvent. * @memberof google.cloud.dialogflow.v2 - * @interface IListConversationProfilesRequest - * @property {string|null} [parent] ListConversationProfilesRequest parent - * @property {number|null} [pageSize] ListConversationProfilesRequest pageSize - * @property {string|null} [pageToken] ListConversationProfilesRequest pageToken + * @interface IConversationEvent + * @property {string|null} [conversation] ConversationEvent conversation + * @property {google.cloud.dialogflow.v2.ConversationEvent.Type|null} [type] ConversationEvent type + * @property {google.rpc.IStatus|null} [errorStatus] ConversationEvent errorStatus + * @property {google.cloud.dialogflow.v2.IMessage|null} [newMessagePayload] ConversationEvent newMessagePayload */ /** - * Constructs a new ListConversationProfilesRequest. + * Constructs a new ConversationEvent. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a ListConversationProfilesRequest. - * @implements IListConversationProfilesRequest + * @classdesc Represents a ConversationEvent. + * @implements IConversationEvent * @constructor - * @param {google.cloud.dialogflow.v2.IListConversationProfilesRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.IConversationEvent=} [properties] Properties to set */ - function ListConversationProfilesRequest(properties) { + function ConversationEvent(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -58895,103 +60780,131 @@ } /** - * ListConversationProfilesRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.v2.ListConversationProfilesRequest + * ConversationEvent conversation. + * @member {string} conversation + * @memberof google.cloud.dialogflow.v2.ConversationEvent * @instance */ - ListConversationProfilesRequest.prototype.parent = ""; + ConversationEvent.prototype.conversation = ""; /** - * ListConversationProfilesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.dialogflow.v2.ListConversationProfilesRequest + * ConversationEvent type. + * @member {google.cloud.dialogflow.v2.ConversationEvent.Type} type + * @memberof google.cloud.dialogflow.v2.ConversationEvent * @instance */ - ListConversationProfilesRequest.prototype.pageSize = 0; + ConversationEvent.prototype.type = 0; /** - * ListConversationProfilesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.dialogflow.v2.ListConversationProfilesRequest + * ConversationEvent errorStatus. + * @member {google.rpc.IStatus|null|undefined} errorStatus + * @memberof google.cloud.dialogflow.v2.ConversationEvent * @instance */ - ListConversationProfilesRequest.prototype.pageToken = ""; + ConversationEvent.prototype.errorStatus = null; /** - * Creates a new ListConversationProfilesRequest instance using the specified properties. + * ConversationEvent newMessagePayload. + * @member {google.cloud.dialogflow.v2.IMessage|null|undefined} newMessagePayload + * @memberof google.cloud.dialogflow.v2.ConversationEvent + * @instance + */ + ConversationEvent.prototype.newMessagePayload = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ConversationEvent payload. + * @member {"newMessagePayload"|undefined} payload + * @memberof google.cloud.dialogflow.v2.ConversationEvent + * @instance + */ + Object.defineProperty(ConversationEvent.prototype, "payload", { + get: $util.oneOfGetter($oneOfFields = ["newMessagePayload"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ConversationEvent instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.ListConversationProfilesRequest + * @memberof google.cloud.dialogflow.v2.ConversationEvent * @static - * @param {google.cloud.dialogflow.v2.IListConversationProfilesRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.ListConversationProfilesRequest} ListConversationProfilesRequest instance + * @param {google.cloud.dialogflow.v2.IConversationEvent=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.ConversationEvent} ConversationEvent instance */ - ListConversationProfilesRequest.create = function create(properties) { - return new ListConversationProfilesRequest(properties); + ConversationEvent.create = function create(properties) { + return new ConversationEvent(properties); }; /** - * Encodes the specified ListConversationProfilesRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationProfilesRequest.verify|verify} messages. + * Encodes the specified ConversationEvent message. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationEvent.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.ListConversationProfilesRequest + * @memberof google.cloud.dialogflow.v2.ConversationEvent * @static - * @param {google.cloud.dialogflow.v2.IListConversationProfilesRequest} message ListConversationProfilesRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IConversationEvent} message ConversationEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListConversationProfilesRequest.encode = function encode(message, writer) { + ConversationEvent.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.conversation != null && Object.hasOwnProperty.call(message, "conversation")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversation); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.errorStatus != null && Object.hasOwnProperty.call(message, "errorStatus")) + $root.google.rpc.Status.encode(message.errorStatus, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.newMessagePayload != null && Object.hasOwnProperty.call(message, "newMessagePayload")) + $root.google.cloud.dialogflow.v2.Message.encode(message.newMessagePayload, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListConversationProfilesRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationProfilesRequest.verify|verify} messages. + * Encodes the specified ConversationEvent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationEvent.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.ListConversationProfilesRequest + * @memberof google.cloud.dialogflow.v2.ConversationEvent * @static - * @param {google.cloud.dialogflow.v2.IListConversationProfilesRequest} message ListConversationProfilesRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IConversationEvent} message ConversationEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListConversationProfilesRequest.encodeDelimited = function encodeDelimited(message, writer) { + ConversationEvent.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListConversationProfilesRequest message from the specified reader or buffer. + * Decodes a ConversationEvent message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.ListConversationProfilesRequest + * @memberof google.cloud.dialogflow.v2.ConversationEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.ListConversationProfilesRequest} ListConversationProfilesRequest + * @returns {google.cloud.dialogflow.v2.ConversationEvent} ConversationEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListConversationProfilesRequest.decode = function decode(reader, length) { + ConversationEvent.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ListConversationProfilesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ConversationEvent(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.conversation = reader.string(); break; } case 2: { - message.pageSize = reader.int32(); + message.type = reader.int32(); break; } case 3: { - message.pageToken = reader.string(); + message.errorStatus = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 4: { + message.newMessagePayload = $root.google.cloud.dialogflow.v2.Message.decode(reader, reader.uint32()); break; } default: @@ -59003,387 +60916,564 @@ }; /** - * Decodes a ListConversationProfilesRequest message from the specified reader or buffer, length delimited. + * Decodes a ConversationEvent message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.ListConversationProfilesRequest + * @memberof google.cloud.dialogflow.v2.ConversationEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.ListConversationProfilesRequest} ListConversationProfilesRequest + * @returns {google.cloud.dialogflow.v2.ConversationEvent} ConversationEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListConversationProfilesRequest.decodeDelimited = function decodeDelimited(reader) { + ConversationEvent.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListConversationProfilesRequest message. + * Verifies a ConversationEvent message. * @function verify - * @memberof google.cloud.dialogflow.v2.ListConversationProfilesRequest + * @memberof google.cloud.dialogflow.v2.ConversationEvent * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListConversationProfilesRequest.verify = function verify(message) { + ConversationEvent.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"; + var properties = {}; + if (message.conversation != null && message.hasOwnProperty("conversation")) + if (!$util.isString(message.conversation)) + return "conversation: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 5: + case 4: + break; + } + if (message.errorStatus != null && message.hasOwnProperty("errorStatus")) { + var error = $root.google.rpc.Status.verify(message.errorStatus); + if (error) + return "errorStatus." + error; + } + if (message.newMessagePayload != null && message.hasOwnProperty("newMessagePayload")) { + properties.payload = 1; + { + var error = $root.google.cloud.dialogflow.v2.Message.verify(message.newMessagePayload); + if (error) + return "newMessagePayload." + error; + } + } return null; }; /** - * Creates a ListConversationProfilesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ConversationEvent message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.ListConversationProfilesRequest + * @memberof google.cloud.dialogflow.v2.ConversationEvent * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.ListConversationProfilesRequest} ListConversationProfilesRequest + * @returns {google.cloud.dialogflow.v2.ConversationEvent} ConversationEvent */ - ListConversationProfilesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.ListConversationProfilesRequest) + ConversationEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.ConversationEvent) return object; - var message = new $root.google.cloud.dialogflow.v2.ListConversationProfilesRequest(); - 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); + var message = new $root.google.cloud.dialogflow.v2.ConversationEvent(); + if (object.conversation != null) + message.conversation = String(object.conversation); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "CONVERSATION_STARTED": + case 1: + message.type = 1; + break; + case "CONVERSATION_FINISHED": + case 2: + message.type = 2; + break; + case "HUMAN_INTERVENTION_NEEDED": + case 3: + message.type = 3; + break; + case "NEW_MESSAGE": + case 5: + message.type = 5; + break; + case "UNRECOVERABLE_ERROR": + case 4: + message.type = 4; + break; + } + if (object.errorStatus != null) { + if (typeof object.errorStatus !== "object") + throw TypeError(".google.cloud.dialogflow.v2.ConversationEvent.errorStatus: object expected"); + message.errorStatus = $root.google.rpc.Status.fromObject(object.errorStatus); + } + if (object.newMessagePayload != null) { + if (typeof object.newMessagePayload !== "object") + throw TypeError(".google.cloud.dialogflow.v2.ConversationEvent.newMessagePayload: object expected"); + message.newMessagePayload = $root.google.cloud.dialogflow.v2.Message.fromObject(object.newMessagePayload); + } return message; }; /** - * Creates a plain object from a ListConversationProfilesRequest message. Also converts values to other types if specified. + * Creates a plain object from a ConversationEvent message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.ListConversationProfilesRequest + * @memberof google.cloud.dialogflow.v2.ConversationEvent * @static - * @param {google.cloud.dialogflow.v2.ListConversationProfilesRequest} message ListConversationProfilesRequest + * @param {google.cloud.dialogflow.v2.ConversationEvent} message ConversationEvent * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListConversationProfilesRequest.toObject = function toObject(message, options) { + ConversationEvent.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; + object.conversation = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.errorStatus = null; + } + if (message.conversation != null && message.hasOwnProperty("conversation")) + object.conversation = message.conversation; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dialogflow.v2.ConversationEvent.Type[message.type] === undefined ? message.type : $root.google.cloud.dialogflow.v2.ConversationEvent.Type[message.type] : message.type; + if (message.errorStatus != null && message.hasOwnProperty("errorStatus")) + object.errorStatus = $root.google.rpc.Status.toObject(message.errorStatus, options); + if (message.newMessagePayload != null && message.hasOwnProperty("newMessagePayload")) { + object.newMessagePayload = $root.google.cloud.dialogflow.v2.Message.toObject(message.newMessagePayload, options); + if (options.oneofs) + object.payload = "newMessagePayload"; } - 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; return object; }; /** - * Converts this ListConversationProfilesRequest to JSON. + * Converts this ConversationEvent to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.ListConversationProfilesRequest + * @memberof google.cloud.dialogflow.v2.ConversationEvent * @instance * @returns {Object.} JSON object */ - ListConversationProfilesRequest.prototype.toJSON = function toJSON() { + ConversationEvent.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListConversationProfilesRequest + * Gets the default type url for ConversationEvent * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.ListConversationProfilesRequest + * @memberof google.cloud.dialogflow.v2.ConversationEvent * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListConversationProfilesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ConversationEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.ListConversationProfilesRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.ConversationEvent"; }; - return ListConversationProfilesRequest; + /** + * Type enum. + * @name google.cloud.dialogflow.v2.ConversationEvent.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} CONVERSATION_STARTED=1 CONVERSATION_STARTED value + * @property {number} CONVERSATION_FINISHED=2 CONVERSATION_FINISHED value + * @property {number} HUMAN_INTERVENTION_NEEDED=3 HUMAN_INTERVENTION_NEEDED value + * @property {number} NEW_MESSAGE=5 NEW_MESSAGE value + * @property {number} UNRECOVERABLE_ERROR=4 UNRECOVERABLE_ERROR value + */ + ConversationEvent.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONVERSATION_STARTED"] = 1; + values[valuesById[2] = "CONVERSATION_FINISHED"] = 2; + values[valuesById[3] = "HUMAN_INTERVENTION_NEEDED"] = 3; + values[valuesById[5] = "NEW_MESSAGE"] = 5; + values[valuesById[4] = "UNRECOVERABLE_ERROR"] = 4; + return values; + })(); + + return ConversationEvent; })(); - v2.ListConversationProfilesResponse = (function() { + v2.ConversationModels = (function() { /** - * Properties of a ListConversationProfilesResponse. + * Constructs a new ConversationModels service. * @memberof google.cloud.dialogflow.v2 - * @interface IListConversationProfilesResponse - * @property {Array.|null} [conversationProfiles] ListConversationProfilesResponse conversationProfiles - * @property {string|null} [nextPageToken] ListConversationProfilesResponse nextPageToken + * @classdesc Represents a ConversationModels + * @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 ConversationModels(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ConversationModels.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ConversationModels; /** - * Constructs a new ListConversationProfilesResponse. - * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a ListConversationProfilesResponse. - * @implements IListConversationProfilesResponse - * @constructor - * @param {google.cloud.dialogflow.v2.IListConversationProfilesResponse=} [properties] Properties to set + * Creates new ConversationModels service using the specified rpc implementation. + * @function create + * @memberof google.cloud.dialogflow.v2.ConversationModels + * @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 {ConversationModels} RPC service. Useful where requests and/or responses are streamed. + */ + ConversationModels.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|createConversationModel}. + * @memberof google.cloud.dialogflow.v2.ConversationModels + * @typedef CreateConversationModelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateConversationModel. + * @function createConversationModel + * @memberof google.cloud.dialogflow.v2.ConversationModels + * @instance + * @param {google.cloud.dialogflow.v2.ICreateConversationModelRequest} request CreateConversationModelRequest message or plain object + * @param {google.cloud.dialogflow.v2.ConversationModels.CreateConversationModelCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConversationModels.prototype.createConversationModel = function createConversationModel(request, callback) { + return this.rpcCall(createConversationModel, $root.google.cloud.dialogflow.v2.CreateConversationModelRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateConversationModel" }); + + /** + * Calls CreateConversationModel. + * @function createConversationModel + * @memberof google.cloud.dialogflow.v2.ConversationModels + * @instance + * @param {google.cloud.dialogflow.v2.ICreateConversationModelRequest} request CreateConversationModelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|getConversationModel}. + * @memberof google.cloud.dialogflow.v2.ConversationModels + * @typedef GetConversationModelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2.ConversationModel} [response] ConversationModel + */ + + /** + * Calls GetConversationModel. + * @function getConversationModel + * @memberof google.cloud.dialogflow.v2.ConversationModels + * @instance + * @param {google.cloud.dialogflow.v2.IGetConversationModelRequest} request GetConversationModelRequest message or plain object + * @param {google.cloud.dialogflow.v2.ConversationModels.GetConversationModelCallback} callback Node-style callback called with the error, if any, and ConversationModel + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConversationModels.prototype.getConversationModel = function getConversationModel(request, callback) { + return this.rpcCall(getConversationModel, $root.google.cloud.dialogflow.v2.GetConversationModelRequest, $root.google.cloud.dialogflow.v2.ConversationModel, request, callback); + }, "name", { value: "GetConversationModel" }); + + /** + * Calls GetConversationModel. + * @function getConversationModel + * @memberof google.cloud.dialogflow.v2.ConversationModels + * @instance + * @param {google.cloud.dialogflow.v2.IGetConversationModelRequest} request GetConversationModelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|listConversationModels}. + * @memberof google.cloud.dialogflow.v2.ConversationModels + * @typedef ListConversationModelsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2.ListConversationModelsResponse} [response] ListConversationModelsResponse + */ + + /** + * Calls ListConversationModels. + * @function listConversationModels + * @memberof google.cloud.dialogflow.v2.ConversationModels + * @instance + * @param {google.cloud.dialogflow.v2.IListConversationModelsRequest} request ListConversationModelsRequest message or plain object + * @param {google.cloud.dialogflow.v2.ConversationModels.ListConversationModelsCallback} callback Node-style callback called with the error, if any, and ListConversationModelsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConversationModels.prototype.listConversationModels = function listConversationModels(request, callback) { + return this.rpcCall(listConversationModels, $root.google.cloud.dialogflow.v2.ListConversationModelsRequest, $root.google.cloud.dialogflow.v2.ListConversationModelsResponse, request, callback); + }, "name", { value: "ListConversationModels" }); + + /** + * Calls ListConversationModels. + * @function listConversationModels + * @memberof google.cloud.dialogflow.v2.ConversationModels + * @instance + * @param {google.cloud.dialogflow.v2.IListConversationModelsRequest} request ListConversationModelsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|deleteConversationModel}. + * @memberof google.cloud.dialogflow.v2.ConversationModels + * @typedef DeleteConversationModelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteConversationModel. + * @function deleteConversationModel + * @memberof google.cloud.dialogflow.v2.ConversationModels + * @instance + * @param {google.cloud.dialogflow.v2.IDeleteConversationModelRequest} request DeleteConversationModelRequest message or plain object + * @param {google.cloud.dialogflow.v2.ConversationModels.DeleteConversationModelCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConversationModels.prototype.deleteConversationModel = function deleteConversationModel(request, callback) { + return this.rpcCall(deleteConversationModel, $root.google.cloud.dialogflow.v2.DeleteConversationModelRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteConversationModel" }); + + /** + * Calls DeleteConversationModel. + * @function deleteConversationModel + * @memberof google.cloud.dialogflow.v2.ConversationModels + * @instance + * @param {google.cloud.dialogflow.v2.IDeleteConversationModelRequest} request DeleteConversationModelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|deployConversationModel}. + * @memberof google.cloud.dialogflow.v2.ConversationModels + * @typedef DeployConversationModelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeployConversationModel. + * @function deployConversationModel + * @memberof google.cloud.dialogflow.v2.ConversationModels + * @instance + * @param {google.cloud.dialogflow.v2.IDeployConversationModelRequest} request DeployConversationModelRequest message or plain object + * @param {google.cloud.dialogflow.v2.ConversationModels.DeployConversationModelCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - function ListConversationProfilesResponse(properties) { - this.conversationProfiles = []; - 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]]; - } + Object.defineProperty(ConversationModels.prototype.deployConversationModel = function deployConversationModel(request, callback) { + return this.rpcCall(deployConversationModel, $root.google.cloud.dialogflow.v2.DeployConversationModelRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeployConversationModel" }); /** - * ListConversationProfilesResponse conversationProfiles. - * @member {Array.} conversationProfiles - * @memberof google.cloud.dialogflow.v2.ListConversationProfilesResponse + * Calls DeployConversationModel. + * @function deployConversationModel + * @memberof google.cloud.dialogflow.v2.ConversationModels * @instance + * @param {google.cloud.dialogflow.v2.IDeployConversationModelRequest} request DeployConversationModelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListConversationProfilesResponse.prototype.conversationProfiles = $util.emptyArray; /** - * ListConversationProfilesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.dialogflow.v2.ListConversationProfilesResponse + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|undeployConversationModel}. + * @memberof google.cloud.dialogflow.v2.ConversationModels + * @typedef UndeployConversationModelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UndeployConversationModel. + * @function undeployConversationModel + * @memberof google.cloud.dialogflow.v2.ConversationModels * @instance + * @param {google.cloud.dialogflow.v2.IUndeployConversationModelRequest} request UndeployConversationModelRequest message or plain object + * @param {google.cloud.dialogflow.v2.ConversationModels.UndeployConversationModelCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - ListConversationProfilesResponse.prototype.nextPageToken = ""; + Object.defineProperty(ConversationModels.prototype.undeployConversationModel = function undeployConversationModel(request, callback) { + return this.rpcCall(undeployConversationModel, $root.google.cloud.dialogflow.v2.UndeployConversationModelRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UndeployConversationModel" }); /** - * Creates a new ListConversationProfilesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2.ListConversationProfilesResponse - * @static - * @param {google.cloud.dialogflow.v2.IListConversationProfilesResponse=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.ListConversationProfilesResponse} ListConversationProfilesResponse instance + * Calls UndeployConversationModel. + * @function undeployConversationModel + * @memberof google.cloud.dialogflow.v2.ConversationModels + * @instance + * @param {google.cloud.dialogflow.v2.IUndeployConversationModelRequest} request UndeployConversationModelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListConversationProfilesResponse.create = function create(properties) { - return new ListConversationProfilesResponse(properties); - }; /** - * Encodes the specified ListConversationProfilesResponse message. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationProfilesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2.ListConversationProfilesResponse - * @static - * @param {google.cloud.dialogflow.v2.IListConversationProfilesResponse} message ListConversationProfilesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|getConversationModelEvaluation}. + * @memberof google.cloud.dialogflow.v2.ConversationModels + * @typedef GetConversationModelEvaluationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2.ConversationModelEvaluation} [response] ConversationModelEvaluation */ - ListConversationProfilesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.conversationProfiles != null && message.conversationProfiles.length) - for (var i = 0; i < message.conversationProfiles.length; ++i) - $root.google.cloud.dialogflow.v2.ConversationProfile.encode(message.conversationProfiles[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 ListConversationProfilesResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationProfilesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.ListConversationProfilesResponse - * @static - * @param {google.cloud.dialogflow.v2.IListConversationProfilesResponse} message ListConversationProfilesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetConversationModelEvaluation. + * @function getConversationModelEvaluation + * @memberof google.cloud.dialogflow.v2.ConversationModels + * @instance + * @param {google.cloud.dialogflow.v2.IGetConversationModelEvaluationRequest} request GetConversationModelEvaluationRequest message or plain object + * @param {google.cloud.dialogflow.v2.ConversationModels.GetConversationModelEvaluationCallback} callback Node-style callback called with the error, if any, and ConversationModelEvaluation + * @returns {undefined} + * @variation 1 */ - ListConversationProfilesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(ConversationModels.prototype.getConversationModelEvaluation = function getConversationModelEvaluation(request, callback) { + return this.rpcCall(getConversationModelEvaluation, $root.google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest, $root.google.cloud.dialogflow.v2.ConversationModelEvaluation, request, callback); + }, "name", { value: "GetConversationModelEvaluation" }); /** - * Decodes a ListConversationProfilesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2.ListConversationProfilesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.ListConversationProfilesResponse} ListConversationProfilesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetConversationModelEvaluation. + * @function getConversationModelEvaluation + * @memberof google.cloud.dialogflow.v2.ConversationModels + * @instance + * @param {google.cloud.dialogflow.v2.IGetConversationModelEvaluationRequest} request GetConversationModelEvaluationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListConversationProfilesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ListConversationProfilesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.conversationProfiles && message.conversationProfiles.length)) - message.conversationProfiles = []; - message.conversationProfiles.push($root.google.cloud.dialogflow.v2.ConversationProfile.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a ListConversationProfilesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.ListConversationProfilesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.ListConversationProfilesResponse} ListConversationProfilesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|listConversationModelEvaluations}. + * @memberof google.cloud.dialogflow.v2.ConversationModels + * @typedef ListConversationModelEvaluationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse} [response] ListConversationModelEvaluationsResponse */ - ListConversationProfilesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a ListConversationProfilesResponse message. - * @function verify - * @memberof google.cloud.dialogflow.v2.ListConversationProfilesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls ListConversationModelEvaluations. + * @function listConversationModelEvaluations + * @memberof google.cloud.dialogflow.v2.ConversationModels + * @instance + * @param {google.cloud.dialogflow.v2.IListConversationModelEvaluationsRequest} request ListConversationModelEvaluationsRequest message or plain object + * @param {google.cloud.dialogflow.v2.ConversationModels.ListConversationModelEvaluationsCallback} callback Node-style callback called with the error, if any, and ListConversationModelEvaluationsResponse + * @returns {undefined} + * @variation 1 */ - ListConversationProfilesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.conversationProfiles != null && message.hasOwnProperty("conversationProfiles")) { - if (!Array.isArray(message.conversationProfiles)) - return "conversationProfiles: array expected"; - for (var i = 0; i < message.conversationProfiles.length; ++i) { - var error = $root.google.cloud.dialogflow.v2.ConversationProfile.verify(message.conversationProfiles[i]); - if (error) - return "conversationProfiles." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + Object.defineProperty(ConversationModels.prototype.listConversationModelEvaluations = function listConversationModelEvaluations(request, callback) { + return this.rpcCall(listConversationModelEvaluations, $root.google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest, $root.google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse, request, callback); + }, "name", { value: "ListConversationModelEvaluations" }); /** - * Creates a ListConversationProfilesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2.ListConversationProfilesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.ListConversationProfilesResponse} ListConversationProfilesResponse + * Calls ListConversationModelEvaluations. + * @function listConversationModelEvaluations + * @memberof google.cloud.dialogflow.v2.ConversationModels + * @instance + * @param {google.cloud.dialogflow.v2.IListConversationModelEvaluationsRequest} request ListConversationModelEvaluationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListConversationProfilesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.ListConversationProfilesResponse) - return object; - var message = new $root.google.cloud.dialogflow.v2.ListConversationProfilesResponse(); - if (object.conversationProfiles) { - if (!Array.isArray(object.conversationProfiles)) - throw TypeError(".google.cloud.dialogflow.v2.ListConversationProfilesResponse.conversationProfiles: array expected"); - message.conversationProfiles = []; - for (var i = 0; i < object.conversationProfiles.length; ++i) { - if (typeof object.conversationProfiles[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2.ListConversationProfilesResponse.conversationProfiles: object expected"); - message.conversationProfiles[i] = $root.google.cloud.dialogflow.v2.ConversationProfile.fromObject(object.conversationProfiles[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; /** - * Creates a plain object from a ListConversationProfilesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2.ListConversationProfilesResponse - * @static - * @param {google.cloud.dialogflow.v2.ListConversationProfilesResponse} message ListConversationProfilesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.dialogflow.v2.ConversationModels|createConversationModelEvaluation}. + * @memberof google.cloud.dialogflow.v2.ConversationModels + * @typedef CreateConversationModelEvaluationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - ListConversationProfilesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.conversationProfiles = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.conversationProfiles && message.conversationProfiles.length) { - object.conversationProfiles = []; - for (var j = 0; j < message.conversationProfiles.length; ++j) - object.conversationProfiles[j] = $root.google.cloud.dialogflow.v2.ConversationProfile.toObject(message.conversationProfiles[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; /** - * Converts this ListConversationProfilesResponse to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2.ListConversationProfilesResponse + * Calls CreateConversationModelEvaluation. + * @function createConversationModelEvaluation + * @memberof google.cloud.dialogflow.v2.ConversationModels * @instance - * @returns {Object.} JSON object + * @param {google.cloud.dialogflow.v2.ICreateConversationModelEvaluationRequest} request CreateConversationModelEvaluationRequest message or plain object + * @param {google.cloud.dialogflow.v2.ConversationModels.CreateConversationModelEvaluationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - ListConversationProfilesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(ConversationModels.prototype.createConversationModelEvaluation = function createConversationModelEvaluation(request, callback) { + return this.rpcCall(createConversationModelEvaluation, $root.google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateConversationModelEvaluation" }); /** - * Gets the default type url for ListConversationProfilesResponse - * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.ListConversationProfilesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Calls CreateConversationModelEvaluation. + * @function createConversationModelEvaluation + * @memberof google.cloud.dialogflow.v2.ConversationModels + * @instance + * @param {google.cloud.dialogflow.v2.ICreateConversationModelEvaluationRequest} request CreateConversationModelEvaluationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListConversationProfilesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.ListConversationProfilesResponse"; - }; - return ListConversationProfilesResponse; + return ConversationModels; })(); - v2.GetConversationProfileRequest = (function() { + v2.ConversationModel = (function() { /** - * Properties of a GetConversationProfileRequest. + * Properties of a ConversationModel. * @memberof google.cloud.dialogflow.v2 - * @interface IGetConversationProfileRequest - * @property {string|null} [name] GetConversationProfileRequest name + * @interface IConversationModel + * @property {string|null} [name] ConversationModel name + * @property {string|null} [displayName] ConversationModel displayName + * @property {google.protobuf.ITimestamp|null} [createTime] ConversationModel createTime + * @property {Array.|null} [datasets] ConversationModel datasets + * @property {google.cloud.dialogflow.v2.ConversationModel.State|null} [state] ConversationModel state + * @property {string|null} [languageCode] ConversationModel languageCode + * @property {google.cloud.dialogflow.v2.IArticleSuggestionModelMetadata|null} [articleSuggestionModelMetadata] ConversationModel articleSuggestionModelMetadata + * @property {google.cloud.dialogflow.v2.ISmartReplyModelMetadata|null} [smartReplyModelMetadata] ConversationModel smartReplyModelMetadata */ /** - * Constructs a new GetConversationProfileRequest. + * Constructs a new ConversationModel. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a GetConversationProfileRequest. - * @implements IGetConversationProfileRequest + * @classdesc Represents a ConversationModel. + * @implements IConversationModel * @constructor - * @param {google.cloud.dialogflow.v2.IGetConversationProfileRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.IConversationModel=} [properties] Properties to set */ - function GetConversationProfileRequest(properties) { + function ConversationModel(properties) { + this.datasets = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -59391,70 +61481,155 @@ } /** - * GetConversationProfileRequest name. + * ConversationModel name. * @member {string} name - * @memberof google.cloud.dialogflow.v2.GetConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.ConversationModel * @instance */ - GetConversationProfileRequest.prototype.name = ""; + ConversationModel.prototype.name = ""; /** - * Creates a new GetConversationProfileRequest instance using the specified properties. + * ConversationModel displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.v2.ConversationModel + * @instance + */ + ConversationModel.prototype.displayName = ""; + + /** + * ConversationModel createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dialogflow.v2.ConversationModel + * @instance + */ + ConversationModel.prototype.createTime = null; + + /** + * ConversationModel datasets. + * @member {Array.} datasets + * @memberof google.cloud.dialogflow.v2.ConversationModel + * @instance + */ + ConversationModel.prototype.datasets = $util.emptyArray; + + /** + * ConversationModel state. + * @member {google.cloud.dialogflow.v2.ConversationModel.State} state + * @memberof google.cloud.dialogflow.v2.ConversationModel + * @instance + */ + ConversationModel.prototype.state = 0; + + /** + * ConversationModel languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.v2.ConversationModel + * @instance + */ + ConversationModel.prototype.languageCode = ""; + + /** + * ConversationModel articleSuggestionModelMetadata. + * @member {google.cloud.dialogflow.v2.IArticleSuggestionModelMetadata|null|undefined} articleSuggestionModelMetadata + * @memberof google.cloud.dialogflow.v2.ConversationModel + * @instance + */ + ConversationModel.prototype.articleSuggestionModelMetadata = null; + + /** + * ConversationModel smartReplyModelMetadata. + * @member {google.cloud.dialogflow.v2.ISmartReplyModelMetadata|null|undefined} smartReplyModelMetadata + * @memberof google.cloud.dialogflow.v2.ConversationModel + * @instance + */ + ConversationModel.prototype.smartReplyModelMetadata = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ConversationModel modelMetadata. + * @member {"articleSuggestionModelMetadata"|"smartReplyModelMetadata"|undefined} modelMetadata + * @memberof google.cloud.dialogflow.v2.ConversationModel + * @instance + */ + Object.defineProperty(ConversationModel.prototype, "modelMetadata", { + get: $util.oneOfGetter($oneOfFields = ["articleSuggestionModelMetadata", "smartReplyModelMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ConversationModel instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.GetConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.ConversationModel * @static - * @param {google.cloud.dialogflow.v2.IGetConversationProfileRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.GetConversationProfileRequest} GetConversationProfileRequest instance + * @param {google.cloud.dialogflow.v2.IConversationModel=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.ConversationModel} ConversationModel instance */ - GetConversationProfileRequest.create = function create(properties) { - return new GetConversationProfileRequest(properties); + ConversationModel.create = function create(properties) { + return new ConversationModel(properties); }; /** - * Encodes the specified GetConversationProfileRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.GetConversationProfileRequest.verify|verify} messages. + * Encodes the specified ConversationModel message. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationModel.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.GetConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.ConversationModel * @static - * @param {google.cloud.dialogflow.v2.IGetConversationProfileRequest} message GetConversationProfileRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IConversationModel} message ConversationModel message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetConversationProfileRequest.encode = function encode(message, writer) { + ConversationModel.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.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.datasets != null && message.datasets.length) + for (var i = 0; i < message.datasets.length; ++i) + $root.google.cloud.dialogflow.v2.InputDataset.encode(message.datasets[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); + if (message.articleSuggestionModelMetadata != null && Object.hasOwnProperty.call(message, "articleSuggestionModelMetadata")) + $root.google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata.encode(message.articleSuggestionModelMetadata, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.smartReplyModelMetadata != null && Object.hasOwnProperty.call(message, "smartReplyModelMetadata")) + $root.google.cloud.dialogflow.v2.SmartReplyModelMetadata.encode(message.smartReplyModelMetadata, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.languageCode); return writer; }; /** - * Encodes the specified GetConversationProfileRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.GetConversationProfileRequest.verify|verify} messages. + * Encodes the specified ConversationModel message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationModel.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.GetConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.ConversationModel * @static - * @param {google.cloud.dialogflow.v2.IGetConversationProfileRequest} message GetConversationProfileRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IConversationModel} message ConversationModel message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetConversationProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { + ConversationModel.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetConversationProfileRequest message from the specified reader or buffer. + * Decodes a ConversationModel message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.GetConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.ConversationModel * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.GetConversationProfileRequest} GetConversationProfileRequest + * @returns {google.cloud.dialogflow.v2.ConversationModel} ConversationModel * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetConversationProfileRequest.decode = function decode(reader, length) { + ConversationModel.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.GetConversationProfileRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ConversationModel(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -59462,6 +61637,36 @@ message.name = reader.string(); break; } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.datasets && message.datasets.length)) + message.datasets = []; + message.datasets.push($root.google.cloud.dialogflow.v2.InputDataset.decode(reader, reader.uint32())); + break; + } + case 7: { + message.state = reader.int32(); + break; + } + case 19: { + message.languageCode = reader.string(); + break; + } + case 8: { + message.articleSuggestionModelMetadata = $root.google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata.decode(reader, reader.uint32()); + break; + } + case 9: { + message.smartReplyModelMetadata = $root.google.cloud.dialogflow.v2.SmartReplyModelMetadata.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -59471,123 +61676,328 @@ }; /** - * Decodes a GetConversationProfileRequest message from the specified reader or buffer, length delimited. + * Decodes a ConversationModel message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.GetConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.ConversationModel * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.GetConversationProfileRequest} GetConversationProfileRequest + * @returns {google.cloud.dialogflow.v2.ConversationModel} ConversationModel * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetConversationProfileRequest.decodeDelimited = function decodeDelimited(reader) { + ConversationModel.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetConversationProfileRequest message. + * Verifies a ConversationModel message. * @function verify - * @memberof google.cloud.dialogflow.v2.GetConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.ConversationModel * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetConversationProfileRequest.verify = function verify(message) { + ConversationModel.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; 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.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.datasets != null && message.hasOwnProperty("datasets")) { + if (!Array.isArray(message.datasets)) + return "datasets: array expected"; + for (var i = 0; i < message.datasets.length; ++i) { + var error = $root.google.cloud.dialogflow.v2.InputDataset.verify(message.datasets[i]); + if (error) + return "datasets." + error; + } + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.articleSuggestionModelMetadata != null && message.hasOwnProperty("articleSuggestionModelMetadata")) { + properties.modelMetadata = 1; + { + var error = $root.google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata.verify(message.articleSuggestionModelMetadata); + if (error) + return "articleSuggestionModelMetadata." + error; + } + } + if (message.smartReplyModelMetadata != null && message.hasOwnProperty("smartReplyModelMetadata")) { + if (properties.modelMetadata === 1) + return "modelMetadata: multiple values"; + properties.modelMetadata = 1; + { + var error = $root.google.cloud.dialogflow.v2.SmartReplyModelMetadata.verify(message.smartReplyModelMetadata); + if (error) + return "smartReplyModelMetadata." + error; + } + } return null; }; /** - * Creates a GetConversationProfileRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ConversationModel message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.GetConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.ConversationModel * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.GetConversationProfileRequest} GetConversationProfileRequest + * @returns {google.cloud.dialogflow.v2.ConversationModel} ConversationModel */ - GetConversationProfileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.GetConversationProfileRequest) + ConversationModel.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.ConversationModel) return object; - var message = new $root.google.cloud.dialogflow.v2.GetConversationProfileRequest(); + var message = new $root.google.cloud.dialogflow.v2.ConversationModel(); if (object.name != null) message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dialogflow.v2.ConversationModel.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.datasets) { + if (!Array.isArray(object.datasets)) + throw TypeError(".google.cloud.dialogflow.v2.ConversationModel.datasets: array expected"); + message.datasets = []; + for (var i = 0; i < object.datasets.length; ++i) { + if (typeof object.datasets[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2.ConversationModel.datasets: object expected"); + message.datasets[i] = $root.google.cloud.dialogflow.v2.InputDataset.fromObject(object.datasets[i]); + } + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "UNDEPLOYED": + case 2: + message.state = 2; + break; + case "DEPLOYING": + case 3: + message.state = 3; + break; + case "DEPLOYED": + case 4: + message.state = 4; + break; + case "UNDEPLOYING": + case 5: + message.state = 5; + break; + case "DELETING": + case 6: + message.state = 6; + break; + case "FAILED": + case 7: + message.state = 7; + break; + case "PENDING": + case 8: + message.state = 8; + break; + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.articleSuggestionModelMetadata != null) { + if (typeof object.articleSuggestionModelMetadata !== "object") + throw TypeError(".google.cloud.dialogflow.v2.ConversationModel.articleSuggestionModelMetadata: object expected"); + message.articleSuggestionModelMetadata = $root.google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata.fromObject(object.articleSuggestionModelMetadata); + } + if (object.smartReplyModelMetadata != null) { + if (typeof object.smartReplyModelMetadata !== "object") + throw TypeError(".google.cloud.dialogflow.v2.ConversationModel.smartReplyModelMetadata: object expected"); + message.smartReplyModelMetadata = $root.google.cloud.dialogflow.v2.SmartReplyModelMetadata.fromObject(object.smartReplyModelMetadata); + } return message; }; /** - * Creates a plain object from a GetConversationProfileRequest message. Also converts values to other types if specified. + * Creates a plain object from a ConversationModel message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.GetConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.ConversationModel * @static - * @param {google.cloud.dialogflow.v2.GetConversationProfileRequest} message GetConversationProfileRequest + * @param {google.cloud.dialogflow.v2.ConversationModel} message ConversationModel * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetConversationProfileRequest.toObject = function toObject(message, options) { + ConversationModel.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.arrays || options.defaults) + object.datasets = []; + if (options.defaults) { object.name = ""; + object.displayName = ""; + object.createTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.languageCode = ""; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.datasets && message.datasets.length) { + object.datasets = []; + for (var j = 0; j < message.datasets.length; ++j) + object.datasets[j] = $root.google.cloud.dialogflow.v2.InputDataset.toObject(message.datasets[j], options); + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dialogflow.v2.ConversationModel.State[message.state] === undefined ? message.state : $root.google.cloud.dialogflow.v2.ConversationModel.State[message.state] : message.state; + if (message.articleSuggestionModelMetadata != null && message.hasOwnProperty("articleSuggestionModelMetadata")) { + object.articleSuggestionModelMetadata = $root.google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata.toObject(message.articleSuggestionModelMetadata, options); + if (options.oneofs) + object.modelMetadata = "articleSuggestionModelMetadata"; + } + if (message.smartReplyModelMetadata != null && message.hasOwnProperty("smartReplyModelMetadata")) { + object.smartReplyModelMetadata = $root.google.cloud.dialogflow.v2.SmartReplyModelMetadata.toObject(message.smartReplyModelMetadata, options); + if (options.oneofs) + object.modelMetadata = "smartReplyModelMetadata"; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; /** - * Converts this GetConversationProfileRequest to JSON. + * Converts this ConversationModel to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.GetConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.ConversationModel * @instance * @returns {Object.} JSON object */ - GetConversationProfileRequest.prototype.toJSON = function toJSON() { + ConversationModel.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetConversationProfileRequest + * Gets the default type url for ConversationModel * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.GetConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.ConversationModel * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetConversationProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ConversationModel.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.GetConversationProfileRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.ConversationModel"; }; - return GetConversationProfileRequest; + /** + * State enum. + * @name google.cloud.dialogflow.v2.ConversationModel.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} UNDEPLOYED=2 UNDEPLOYED value + * @property {number} DEPLOYING=3 DEPLOYING value + * @property {number} DEPLOYED=4 DEPLOYED value + * @property {number} UNDEPLOYING=5 UNDEPLOYING value + * @property {number} DELETING=6 DELETING value + * @property {number} FAILED=7 FAILED value + * @property {number} PENDING=8 PENDING value + */ + ConversationModel.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "UNDEPLOYED"] = 2; + values[valuesById[3] = "DEPLOYING"] = 3; + values[valuesById[4] = "DEPLOYED"] = 4; + values[valuesById[5] = "UNDEPLOYING"] = 5; + values[valuesById[6] = "DELETING"] = 6; + values[valuesById[7] = "FAILED"] = 7; + values[valuesById[8] = "PENDING"] = 8; + return values; + })(); + + /** + * ModelType enum. + * @name google.cloud.dialogflow.v2.ConversationModel.ModelType + * @enum {number} + * @property {number} MODEL_TYPE_UNSPECIFIED=0 MODEL_TYPE_UNSPECIFIED value + * @property {number} SMART_REPLY_DUAL_ENCODER_MODEL=2 SMART_REPLY_DUAL_ENCODER_MODEL value + * @property {number} SMART_REPLY_BERT_MODEL=6 SMART_REPLY_BERT_MODEL value + */ + ConversationModel.ModelType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODEL_TYPE_UNSPECIFIED"] = 0; + values[valuesById[2] = "SMART_REPLY_DUAL_ENCODER_MODEL"] = 2; + values[valuesById[6] = "SMART_REPLY_BERT_MODEL"] = 6; + return values; + })(); + + return ConversationModel; })(); - v2.CreateConversationProfileRequest = (function() { + v2.ConversationModelEvaluation = (function() { /** - * Properties of a CreateConversationProfileRequest. + * Properties of a ConversationModelEvaluation. * @memberof google.cloud.dialogflow.v2 - * @interface ICreateConversationProfileRequest - * @property {string|null} [parent] CreateConversationProfileRequest parent - * @property {google.cloud.dialogflow.v2.IConversationProfile|null} [conversationProfile] CreateConversationProfileRequest conversationProfile + * @interface IConversationModelEvaluation + * @property {string|null} [name] ConversationModelEvaluation name + * @property {string|null} [displayName] ConversationModelEvaluation displayName + * @property {google.cloud.dialogflow.v2.IEvaluationConfig|null} [evaluationConfig] ConversationModelEvaluation evaluationConfig + * @property {google.protobuf.ITimestamp|null} [createTime] ConversationModelEvaluation createTime + * @property {google.cloud.dialogflow.v2.ISmartReplyMetrics|null} [smartReplyMetrics] ConversationModelEvaluation smartReplyMetrics + * @property {string|null} [rawHumanEvalTemplateCsv] ConversationModelEvaluation rawHumanEvalTemplateCsv */ /** - * Constructs a new CreateConversationProfileRequest. + * Constructs a new ConversationModelEvaluation. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a CreateConversationProfileRequest. - * @implements ICreateConversationProfileRequest + * @classdesc Represents a ConversationModelEvaluation. + * @implements IConversationModelEvaluation * @constructor - * @param {google.cloud.dialogflow.v2.ICreateConversationProfileRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.IConversationModelEvaluation=} [properties] Properties to set */ - function CreateConversationProfileRequest(properties) { + function ConversationModelEvaluation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -59595,89 +62005,159 @@ } /** - * CreateConversationProfileRequest parent. - * @member {string} parent - * @memberof google.cloud.dialogflow.v2.CreateConversationProfileRequest + * ConversationModelEvaluation name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2.ConversationModelEvaluation * @instance */ - CreateConversationProfileRequest.prototype.parent = ""; + ConversationModelEvaluation.prototype.name = ""; /** - * CreateConversationProfileRequest conversationProfile. - * @member {google.cloud.dialogflow.v2.IConversationProfile|null|undefined} conversationProfile - * @memberof google.cloud.dialogflow.v2.CreateConversationProfileRequest + * ConversationModelEvaluation displayName. + * @member {string} displayName + * @memberof google.cloud.dialogflow.v2.ConversationModelEvaluation * @instance */ - CreateConversationProfileRequest.prototype.conversationProfile = null; + ConversationModelEvaluation.prototype.displayName = ""; /** - * Creates a new CreateConversationProfileRequest instance using the specified properties. + * ConversationModelEvaluation evaluationConfig. + * @member {google.cloud.dialogflow.v2.IEvaluationConfig|null|undefined} evaluationConfig + * @memberof google.cloud.dialogflow.v2.ConversationModelEvaluation + * @instance + */ + ConversationModelEvaluation.prototype.evaluationConfig = null; + + /** + * ConversationModelEvaluation createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dialogflow.v2.ConversationModelEvaluation + * @instance + */ + ConversationModelEvaluation.prototype.createTime = null; + + /** + * ConversationModelEvaluation smartReplyMetrics. + * @member {google.cloud.dialogflow.v2.ISmartReplyMetrics|null|undefined} smartReplyMetrics + * @memberof google.cloud.dialogflow.v2.ConversationModelEvaluation + * @instance + */ + ConversationModelEvaluation.prototype.smartReplyMetrics = null; + + /** + * ConversationModelEvaluation rawHumanEvalTemplateCsv. + * @member {string} rawHumanEvalTemplateCsv + * @memberof google.cloud.dialogflow.v2.ConversationModelEvaluation + * @instance + */ + ConversationModelEvaluation.prototype.rawHumanEvalTemplateCsv = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ConversationModelEvaluation metrics. + * @member {"smartReplyMetrics"|undefined} metrics + * @memberof google.cloud.dialogflow.v2.ConversationModelEvaluation + * @instance + */ + Object.defineProperty(ConversationModelEvaluation.prototype, "metrics", { + get: $util.oneOfGetter($oneOfFields = ["smartReplyMetrics"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ConversationModelEvaluation instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.CreateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.ConversationModelEvaluation * @static - * @param {google.cloud.dialogflow.v2.ICreateConversationProfileRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.CreateConversationProfileRequest} CreateConversationProfileRequest instance + * @param {google.cloud.dialogflow.v2.IConversationModelEvaluation=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.ConversationModelEvaluation} ConversationModelEvaluation instance */ - CreateConversationProfileRequest.create = function create(properties) { - return new CreateConversationProfileRequest(properties); + ConversationModelEvaluation.create = function create(properties) { + return new ConversationModelEvaluation(properties); }; /** - * Encodes the specified CreateConversationProfileRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationProfileRequest.verify|verify} messages. + * Encodes the specified ConversationModelEvaluation message. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationModelEvaluation.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.CreateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.ConversationModelEvaluation * @static - * @param {google.cloud.dialogflow.v2.ICreateConversationProfileRequest} message CreateConversationProfileRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IConversationModelEvaluation} message ConversationModelEvaluation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateConversationProfileRequest.encode = function encode(message, writer) { + ConversationModelEvaluation.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.conversationProfile != null && Object.hasOwnProperty.call(message, "conversationProfile")) - $root.google.cloud.dialogflow.v2.ConversationProfile.encode(message.conversationProfile, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + 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.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.smartReplyMetrics != null && Object.hasOwnProperty.call(message, "smartReplyMetrics")) + $root.google.cloud.dialogflow.v2.SmartReplyMetrics.encode(message.smartReplyMetrics, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.evaluationConfig != null && Object.hasOwnProperty.call(message, "evaluationConfig")) + $root.google.cloud.dialogflow.v2.EvaluationConfig.encode(message.evaluationConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.rawHumanEvalTemplateCsv != null && Object.hasOwnProperty.call(message, "rawHumanEvalTemplateCsv")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.rawHumanEvalTemplateCsv); return writer; }; /** - * Encodes the specified CreateConversationProfileRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationProfileRequest.verify|verify} messages. + * Encodes the specified ConversationModelEvaluation message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ConversationModelEvaluation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.CreateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.ConversationModelEvaluation * @static - * @param {google.cloud.dialogflow.v2.ICreateConversationProfileRequest} message CreateConversationProfileRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IConversationModelEvaluation} message ConversationModelEvaluation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateConversationProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { + ConversationModelEvaluation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateConversationProfileRequest message from the specified reader or buffer. + * Decodes a ConversationModelEvaluation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.CreateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.ConversationModelEvaluation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.CreateConversationProfileRequest} CreateConversationProfileRequest + * @returns {google.cloud.dialogflow.v2.ConversationModelEvaluation} ConversationModelEvaluation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateConversationProfileRequest.decode = function decode(reader, length) { + ConversationModelEvaluation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.CreateConversationProfileRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ConversationModelEvaluation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.name = reader.string(); break; } case 2: { - message.conversationProfile = $root.google.cloud.dialogflow.v2.ConversationProfile.decode(reader, reader.uint32()); + message.displayName = reader.string(); + break; + } + case 6: { + message.evaluationConfig = $root.google.cloud.dialogflow.v2.EvaluationConfig.decode(reader, reader.uint32()); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.smartReplyMetrics = $root.google.cloud.dialogflow.v2.SmartReplyMetrics.decode(reader, reader.uint32()); + break; + } + case 8: { + message.rawHumanEvalTemplateCsv = reader.string(); break; } default: @@ -59689,137 +62169,187 @@ }; /** - * Decodes a CreateConversationProfileRequest message from the specified reader or buffer, length delimited. + * Decodes a ConversationModelEvaluation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.CreateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.ConversationModelEvaluation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.CreateConversationProfileRequest} CreateConversationProfileRequest + * @returns {google.cloud.dialogflow.v2.ConversationModelEvaluation} ConversationModelEvaluation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateConversationProfileRequest.decodeDelimited = function decodeDelimited(reader) { + ConversationModelEvaluation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateConversationProfileRequest message. + * Verifies a ConversationModelEvaluation message. * @function verify - * @memberof google.cloud.dialogflow.v2.CreateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.ConversationModelEvaluation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateConversationProfileRequest.verify = function verify(message) { + ConversationModelEvaluation.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.conversationProfile != null && message.hasOwnProperty("conversationProfile")) { - var error = $root.google.cloud.dialogflow.v2.ConversationProfile.verify(message.conversationProfile); + var properties = {}; + 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.evaluationConfig != null && message.hasOwnProperty("evaluationConfig")) { + var error = $root.google.cloud.dialogflow.v2.EvaluationConfig.verify(message.evaluationConfig); if (error) - return "conversationProfile." + error; + return "evaluationConfig." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; } + if (message.smartReplyMetrics != null && message.hasOwnProperty("smartReplyMetrics")) { + properties.metrics = 1; + { + var error = $root.google.cloud.dialogflow.v2.SmartReplyMetrics.verify(message.smartReplyMetrics); + if (error) + return "smartReplyMetrics." + error; + } + } + if (message.rawHumanEvalTemplateCsv != null && message.hasOwnProperty("rawHumanEvalTemplateCsv")) + if (!$util.isString(message.rawHumanEvalTemplateCsv)) + return "rawHumanEvalTemplateCsv: string expected"; return null; }; /** - * Creates a CreateConversationProfileRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ConversationModelEvaluation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.CreateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.ConversationModelEvaluation * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.CreateConversationProfileRequest} CreateConversationProfileRequest + * @returns {google.cloud.dialogflow.v2.ConversationModelEvaluation} ConversationModelEvaluation */ - CreateConversationProfileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.CreateConversationProfileRequest) + ConversationModelEvaluation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.ConversationModelEvaluation) return object; - var message = new $root.google.cloud.dialogflow.v2.CreateConversationProfileRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.conversationProfile != null) { - if (typeof object.conversationProfile !== "object") - throw TypeError(".google.cloud.dialogflow.v2.CreateConversationProfileRequest.conversationProfile: object expected"); - message.conversationProfile = $root.google.cloud.dialogflow.v2.ConversationProfile.fromObject(object.conversationProfile); + var message = new $root.google.cloud.dialogflow.v2.ConversationModelEvaluation(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.evaluationConfig != null) { + if (typeof object.evaluationConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2.ConversationModelEvaluation.evaluationConfig: object expected"); + message.evaluationConfig = $root.google.cloud.dialogflow.v2.EvaluationConfig.fromObject(object.evaluationConfig); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dialogflow.v2.ConversationModelEvaluation.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.smartReplyMetrics != null) { + if (typeof object.smartReplyMetrics !== "object") + throw TypeError(".google.cloud.dialogflow.v2.ConversationModelEvaluation.smartReplyMetrics: object expected"); + message.smartReplyMetrics = $root.google.cloud.dialogflow.v2.SmartReplyMetrics.fromObject(object.smartReplyMetrics); } + if (object.rawHumanEvalTemplateCsv != null) + message.rawHumanEvalTemplateCsv = String(object.rawHumanEvalTemplateCsv); return message; }; /** - * Creates a plain object from a CreateConversationProfileRequest message. Also converts values to other types if specified. + * Creates a plain object from a ConversationModelEvaluation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.CreateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.ConversationModelEvaluation * @static - * @param {google.cloud.dialogflow.v2.CreateConversationProfileRequest} message CreateConversationProfileRequest + * @param {google.cloud.dialogflow.v2.ConversationModelEvaluation} message ConversationModelEvaluation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateConversationProfileRequest.toObject = function toObject(message, options) { + ConversationModelEvaluation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.conversationProfile = null; + object.name = ""; + object.displayName = ""; + object.createTime = null; + object.evaluationConfig = null; + object.rawHumanEvalTemplateCsv = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) - object.conversationProfile = $root.google.cloud.dialogflow.v2.ConversationProfile.toObject(message.conversationProfile, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.smartReplyMetrics != null && message.hasOwnProperty("smartReplyMetrics")) { + object.smartReplyMetrics = $root.google.cloud.dialogflow.v2.SmartReplyMetrics.toObject(message.smartReplyMetrics, options); + if (options.oneofs) + object.metrics = "smartReplyMetrics"; + } + if (message.evaluationConfig != null && message.hasOwnProperty("evaluationConfig")) + object.evaluationConfig = $root.google.cloud.dialogflow.v2.EvaluationConfig.toObject(message.evaluationConfig, options); + if (message.rawHumanEvalTemplateCsv != null && message.hasOwnProperty("rawHumanEvalTemplateCsv")) + object.rawHumanEvalTemplateCsv = message.rawHumanEvalTemplateCsv; return object; }; /** - * Converts this CreateConversationProfileRequest to JSON. + * Converts this ConversationModelEvaluation to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.CreateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.ConversationModelEvaluation * @instance * @returns {Object.} JSON object */ - CreateConversationProfileRequest.prototype.toJSON = function toJSON() { + ConversationModelEvaluation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateConversationProfileRequest + * Gets the default type url for ConversationModelEvaluation * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.CreateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.ConversationModelEvaluation * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateConversationProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ConversationModelEvaluation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.CreateConversationProfileRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.ConversationModelEvaluation"; }; - return CreateConversationProfileRequest; + return ConversationModelEvaluation; })(); - v2.UpdateConversationProfileRequest = (function() { + v2.EvaluationConfig = (function() { /** - * Properties of an UpdateConversationProfileRequest. + * Properties of an EvaluationConfig. * @memberof google.cloud.dialogflow.v2 - * @interface IUpdateConversationProfileRequest - * @property {google.cloud.dialogflow.v2.IConversationProfile|null} [conversationProfile] UpdateConversationProfileRequest conversationProfile - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateConversationProfileRequest updateMask + * @interface IEvaluationConfig + * @property {Array.|null} [datasets] EvaluationConfig datasets + * @property {google.cloud.dialogflow.v2.EvaluationConfig.ISmartReplyConfig|null} [smartReplyConfig] EvaluationConfig smartReplyConfig + * @property {google.cloud.dialogflow.v2.EvaluationConfig.ISmartComposeConfig|null} [smartComposeConfig] EvaluationConfig smartComposeConfig */ /** - * Constructs a new UpdateConversationProfileRequest. + * Constructs a new EvaluationConfig. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents an UpdateConversationProfileRequest. - * @implements IUpdateConversationProfileRequest + * @classdesc Represents an EvaluationConfig. + * @implements IEvaluationConfig * @constructor - * @param {google.cloud.dialogflow.v2.IUpdateConversationProfileRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.IEvaluationConfig=} [properties] Properties to set */ - function UpdateConversationProfileRequest(properties) { + function EvaluationConfig(properties) { + this.datasets = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -59827,89 +62357,120 @@ } /** - * UpdateConversationProfileRequest conversationProfile. - * @member {google.cloud.dialogflow.v2.IConversationProfile|null|undefined} conversationProfile - * @memberof google.cloud.dialogflow.v2.UpdateConversationProfileRequest + * EvaluationConfig datasets. + * @member {Array.} datasets + * @memberof google.cloud.dialogflow.v2.EvaluationConfig * @instance */ - UpdateConversationProfileRequest.prototype.conversationProfile = null; + EvaluationConfig.prototype.datasets = $util.emptyArray; /** - * UpdateConversationProfileRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.dialogflow.v2.UpdateConversationProfileRequest + * EvaluationConfig smartReplyConfig. + * @member {google.cloud.dialogflow.v2.EvaluationConfig.ISmartReplyConfig|null|undefined} smartReplyConfig + * @memberof google.cloud.dialogflow.v2.EvaluationConfig * @instance */ - UpdateConversationProfileRequest.prototype.updateMask = null; + EvaluationConfig.prototype.smartReplyConfig = null; /** - * Creates a new UpdateConversationProfileRequest instance using the specified properties. + * EvaluationConfig smartComposeConfig. + * @member {google.cloud.dialogflow.v2.EvaluationConfig.ISmartComposeConfig|null|undefined} smartComposeConfig + * @memberof google.cloud.dialogflow.v2.EvaluationConfig + * @instance + */ + EvaluationConfig.prototype.smartComposeConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * EvaluationConfig modelSpecificConfig. + * @member {"smartReplyConfig"|"smartComposeConfig"|undefined} modelSpecificConfig + * @memberof google.cloud.dialogflow.v2.EvaluationConfig + * @instance + */ + Object.defineProperty(EvaluationConfig.prototype, "modelSpecificConfig", { + get: $util.oneOfGetter($oneOfFields = ["smartReplyConfig", "smartComposeConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new EvaluationConfig instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.UpdateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.EvaluationConfig * @static - * @param {google.cloud.dialogflow.v2.IUpdateConversationProfileRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.UpdateConversationProfileRequest} UpdateConversationProfileRequest instance + * @param {google.cloud.dialogflow.v2.IEvaluationConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.EvaluationConfig} EvaluationConfig instance */ - UpdateConversationProfileRequest.create = function create(properties) { - return new UpdateConversationProfileRequest(properties); + EvaluationConfig.create = function create(properties) { + return new EvaluationConfig(properties); }; /** - * Encodes the specified UpdateConversationProfileRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.UpdateConversationProfileRequest.verify|verify} messages. + * Encodes the specified EvaluationConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.EvaluationConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.UpdateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.EvaluationConfig * @static - * @param {google.cloud.dialogflow.v2.IUpdateConversationProfileRequest} message UpdateConversationProfileRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IEvaluationConfig} message EvaluationConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateConversationProfileRequest.encode = function encode(message, writer) { + EvaluationConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.conversationProfile != null && Object.hasOwnProperty.call(message, "conversationProfile")) - $root.google.cloud.dialogflow.v2.ConversationProfile.encode(message.conversationProfile, 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(); + if (message.smartReplyConfig != null && Object.hasOwnProperty.call(message, "smartReplyConfig")) + $root.google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig.encode(message.smartReplyConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.datasets != null && message.datasets.length) + for (var i = 0; i < message.datasets.length; ++i) + $root.google.cloud.dialogflow.v2.InputDataset.encode(message.datasets[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.smartComposeConfig != null && Object.hasOwnProperty.call(message, "smartComposeConfig")) + $root.google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig.encode(message.smartComposeConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified UpdateConversationProfileRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.UpdateConversationProfileRequest.verify|verify} messages. + * Encodes the specified EvaluationConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.EvaluationConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.UpdateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.EvaluationConfig * @static - * @param {google.cloud.dialogflow.v2.IUpdateConversationProfileRequest} message UpdateConversationProfileRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IEvaluationConfig} message EvaluationConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateConversationProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { + EvaluationConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateConversationProfileRequest message from the specified reader or buffer. + * Decodes an EvaluationConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.UpdateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.EvaluationConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.UpdateConversationProfileRequest} UpdateConversationProfileRequest + * @returns {google.cloud.dialogflow.v2.EvaluationConfig} EvaluationConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateConversationProfileRequest.decode = function decode(reader, length) { + EvaluationConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.UpdateConversationProfileRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.EvaluationConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.conversationProfile = $root.google.cloud.dialogflow.v2.ConversationProfile.decode(reader, reader.uint32()); + case 3: { + if (!(message.datasets && message.datasets.length)) + message.datasets = []; + message.datasets.push($root.google.cloud.dialogflow.v2.InputDataset.decode(reader, reader.uint32())); break; } case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.smartReplyConfig = $root.google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig.decode(reader, reader.uint32()); + break; + } + case 4: { + message.smartComposeConfig = $root.google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig.decode(reader, reader.uint32()); break; } default: @@ -59921,141 +62482,632 @@ }; /** - * Decodes an UpdateConversationProfileRequest message from the specified reader or buffer, length delimited. + * Decodes an EvaluationConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.UpdateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.EvaluationConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.UpdateConversationProfileRequest} UpdateConversationProfileRequest + * @returns {google.cloud.dialogflow.v2.EvaluationConfig} EvaluationConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateConversationProfileRequest.decodeDelimited = function decodeDelimited(reader) { + EvaluationConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateConversationProfileRequest message. + * Verifies an EvaluationConfig message. * @function verify - * @memberof google.cloud.dialogflow.v2.UpdateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.EvaluationConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateConversationProfileRequest.verify = function verify(message) { + EvaluationConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) { - var error = $root.google.cloud.dialogflow.v2.ConversationProfile.verify(message.conversationProfile); - if (error) - return "conversationProfile." + error; + var properties = {}; + if (message.datasets != null && message.hasOwnProperty("datasets")) { + if (!Array.isArray(message.datasets)) + return "datasets: array expected"; + for (var i = 0; i < message.datasets.length; ++i) { + var error = $root.google.cloud.dialogflow.v2.InputDataset.verify(message.datasets[i]); + if (error) + return "datasets." + error; + } } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + if (message.smartReplyConfig != null && message.hasOwnProperty("smartReplyConfig")) { + properties.modelSpecificConfig = 1; + { + var error = $root.google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig.verify(message.smartReplyConfig); + if (error) + return "smartReplyConfig." + error; + } + } + if (message.smartComposeConfig != null && message.hasOwnProperty("smartComposeConfig")) { + if (properties.modelSpecificConfig === 1) + return "modelSpecificConfig: multiple values"; + properties.modelSpecificConfig = 1; + { + var error = $root.google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig.verify(message.smartComposeConfig); + if (error) + return "smartComposeConfig." + error; + } } return null; }; /** - * Creates an UpdateConversationProfileRequest message from a plain object. Also converts values to their respective internal types. + * Creates an EvaluationConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.UpdateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.EvaluationConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.UpdateConversationProfileRequest} UpdateConversationProfileRequest + * @returns {google.cloud.dialogflow.v2.EvaluationConfig} EvaluationConfig */ - UpdateConversationProfileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.UpdateConversationProfileRequest) + EvaluationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.EvaluationConfig) return object; - var message = new $root.google.cloud.dialogflow.v2.UpdateConversationProfileRequest(); - if (object.conversationProfile != null) { - if (typeof object.conversationProfile !== "object") - throw TypeError(".google.cloud.dialogflow.v2.UpdateConversationProfileRequest.conversationProfile: object expected"); - message.conversationProfile = $root.google.cloud.dialogflow.v2.ConversationProfile.fromObject(object.conversationProfile); + var message = new $root.google.cloud.dialogflow.v2.EvaluationConfig(); + if (object.datasets) { + if (!Array.isArray(object.datasets)) + throw TypeError(".google.cloud.dialogflow.v2.EvaluationConfig.datasets: array expected"); + message.datasets = []; + for (var i = 0; i < object.datasets.length; ++i) { + if (typeof object.datasets[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2.EvaluationConfig.datasets: object expected"); + message.datasets[i] = $root.google.cloud.dialogflow.v2.InputDataset.fromObject(object.datasets[i]); + } } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.dialogflow.v2.UpdateConversationProfileRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + if (object.smartReplyConfig != null) { + if (typeof object.smartReplyConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2.EvaluationConfig.smartReplyConfig: object expected"); + message.smartReplyConfig = $root.google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig.fromObject(object.smartReplyConfig); + } + if (object.smartComposeConfig != null) { + if (typeof object.smartComposeConfig !== "object") + throw TypeError(".google.cloud.dialogflow.v2.EvaluationConfig.smartComposeConfig: object expected"); + message.smartComposeConfig = $root.google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig.fromObject(object.smartComposeConfig); } return message; }; /** - * Creates a plain object from an UpdateConversationProfileRequest message. Also converts values to other types if specified. + * Creates a plain object from an EvaluationConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.UpdateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.EvaluationConfig * @static - * @param {google.cloud.dialogflow.v2.UpdateConversationProfileRequest} message UpdateConversationProfileRequest + * @param {google.cloud.dialogflow.v2.EvaluationConfig} message EvaluationConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateConversationProfileRequest.toObject = function toObject(message, options) { + EvaluationConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.conversationProfile = null; - object.updateMask = null; + if (options.arrays || options.defaults) + object.datasets = []; + if (message.smartReplyConfig != null && message.hasOwnProperty("smartReplyConfig")) { + object.smartReplyConfig = $root.google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig.toObject(message.smartReplyConfig, options); + if (options.oneofs) + object.modelSpecificConfig = "smartReplyConfig"; + } + if (message.datasets && message.datasets.length) { + object.datasets = []; + for (var j = 0; j < message.datasets.length; ++j) + object.datasets[j] = $root.google.cloud.dialogflow.v2.InputDataset.toObject(message.datasets[j], options); + } + if (message.smartComposeConfig != null && message.hasOwnProperty("smartComposeConfig")) { + object.smartComposeConfig = $root.google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig.toObject(message.smartComposeConfig, options); + if (options.oneofs) + object.modelSpecificConfig = "smartComposeConfig"; } - if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) - object.conversationProfile = $root.google.cloud.dialogflow.v2.ConversationProfile.toObject(message.conversationProfile, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this UpdateConversationProfileRequest to JSON. + * Converts this EvaluationConfig to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.UpdateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.EvaluationConfig * @instance * @returns {Object.} JSON object */ - UpdateConversationProfileRequest.prototype.toJSON = function toJSON() { + EvaluationConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateConversationProfileRequest + * Gets the default type url for EvaluationConfig * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.UpdateConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.EvaluationConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateConversationProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EvaluationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.UpdateConversationProfileRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.EvaluationConfig"; }; - return UpdateConversationProfileRequest; + EvaluationConfig.SmartReplyConfig = (function() { + + /** + * Properties of a SmartReplyConfig. + * @memberof google.cloud.dialogflow.v2.EvaluationConfig + * @interface ISmartReplyConfig + * @property {string|null} [allowlistDocument] SmartReplyConfig allowlistDocument + * @property {number|null} [maxResultCount] SmartReplyConfig maxResultCount + */ + + /** + * Constructs a new SmartReplyConfig. + * @memberof google.cloud.dialogflow.v2.EvaluationConfig + * @classdesc Represents a SmartReplyConfig. + * @implements ISmartReplyConfig + * @constructor + * @param {google.cloud.dialogflow.v2.EvaluationConfig.ISmartReplyConfig=} [properties] Properties to set + */ + function SmartReplyConfig(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]]; + } + + /** + * SmartReplyConfig allowlistDocument. + * @member {string} allowlistDocument + * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig + * @instance + */ + SmartReplyConfig.prototype.allowlistDocument = ""; + + /** + * SmartReplyConfig maxResultCount. + * @member {number} maxResultCount + * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig + * @instance + */ + SmartReplyConfig.prototype.maxResultCount = 0; + + /** + * Creates a new SmartReplyConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig + * @static + * @param {google.cloud.dialogflow.v2.EvaluationConfig.ISmartReplyConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig} SmartReplyConfig instance + */ + SmartReplyConfig.create = function create(properties) { + return new SmartReplyConfig(properties); + }; + + /** + * Encodes the specified SmartReplyConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig + * @static + * @param {google.cloud.dialogflow.v2.EvaluationConfig.ISmartReplyConfig} message SmartReplyConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SmartReplyConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowlistDocument != null && Object.hasOwnProperty.call(message, "allowlistDocument")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.allowlistDocument); + if (message.maxResultCount != null && Object.hasOwnProperty.call(message, "maxResultCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxResultCount); + return writer; + }; + + /** + * Encodes the specified SmartReplyConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig + * @static + * @param {google.cloud.dialogflow.v2.EvaluationConfig.ISmartReplyConfig} message SmartReplyConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SmartReplyConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SmartReplyConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig} SmartReplyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SmartReplyConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.allowlistDocument = reader.string(); + break; + } + case 2: { + message.maxResultCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SmartReplyConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig} SmartReplyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SmartReplyConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SmartReplyConfig message. + * @function verify + * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SmartReplyConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowlistDocument != null && message.hasOwnProperty("allowlistDocument")) + if (!$util.isString(message.allowlistDocument)) + return "allowlistDocument: string expected"; + if (message.maxResultCount != null && message.hasOwnProperty("maxResultCount")) + if (!$util.isInteger(message.maxResultCount)) + return "maxResultCount: integer expected"; + return null; + }; + + /** + * Creates a SmartReplyConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig} SmartReplyConfig + */ + SmartReplyConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig) + return object; + var message = new $root.google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig(); + if (object.allowlistDocument != null) + message.allowlistDocument = String(object.allowlistDocument); + if (object.maxResultCount != null) + message.maxResultCount = object.maxResultCount | 0; + return message; + }; + + /** + * Creates a plain object from a SmartReplyConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig + * @static + * @param {google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig} message SmartReplyConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SmartReplyConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.allowlistDocument = ""; + object.maxResultCount = 0; + } + if (message.allowlistDocument != null && message.hasOwnProperty("allowlistDocument")) + object.allowlistDocument = message.allowlistDocument; + if (message.maxResultCount != null && message.hasOwnProperty("maxResultCount")) + object.maxResultCount = message.maxResultCount; + return object; + }; + + /** + * Converts this SmartReplyConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig + * @instance + * @returns {Object.} JSON object + */ + SmartReplyConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SmartReplyConfig + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SmartReplyConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.v2.EvaluationConfig.SmartReplyConfig"; + }; + + return SmartReplyConfig; + })(); + + EvaluationConfig.SmartComposeConfig = (function() { + + /** + * Properties of a SmartComposeConfig. + * @memberof google.cloud.dialogflow.v2.EvaluationConfig + * @interface ISmartComposeConfig + * @property {string|null} [allowlistDocument] SmartComposeConfig allowlistDocument + * @property {number|null} [maxResultCount] SmartComposeConfig maxResultCount + */ + + /** + * Constructs a new SmartComposeConfig. + * @memberof google.cloud.dialogflow.v2.EvaluationConfig + * @classdesc Represents a SmartComposeConfig. + * @implements ISmartComposeConfig + * @constructor + * @param {google.cloud.dialogflow.v2.EvaluationConfig.ISmartComposeConfig=} [properties] Properties to set + */ + function SmartComposeConfig(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]]; + } + + /** + * SmartComposeConfig allowlistDocument. + * @member {string} allowlistDocument + * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig + * @instance + */ + SmartComposeConfig.prototype.allowlistDocument = ""; + + /** + * SmartComposeConfig maxResultCount. + * @member {number} maxResultCount + * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig + * @instance + */ + SmartComposeConfig.prototype.maxResultCount = 0; + + /** + * Creates a new SmartComposeConfig instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig + * @static + * @param {google.cloud.dialogflow.v2.EvaluationConfig.ISmartComposeConfig=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig} SmartComposeConfig instance + */ + SmartComposeConfig.create = function create(properties) { + return new SmartComposeConfig(properties); + }; + + /** + * Encodes the specified SmartComposeConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig + * @static + * @param {google.cloud.dialogflow.v2.EvaluationConfig.ISmartComposeConfig} message SmartComposeConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SmartComposeConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowlistDocument != null && Object.hasOwnProperty.call(message, "allowlistDocument")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.allowlistDocument); + if (message.maxResultCount != null && Object.hasOwnProperty.call(message, "maxResultCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxResultCount); + return writer; + }; + + /** + * Encodes the specified SmartComposeConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig + * @static + * @param {google.cloud.dialogflow.v2.EvaluationConfig.ISmartComposeConfig} message SmartComposeConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SmartComposeConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SmartComposeConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig} SmartComposeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SmartComposeConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.allowlistDocument = reader.string(); + break; + } + case 2: { + message.maxResultCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SmartComposeConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig} SmartComposeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SmartComposeConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SmartComposeConfig message. + * @function verify + * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SmartComposeConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowlistDocument != null && message.hasOwnProperty("allowlistDocument")) + if (!$util.isString(message.allowlistDocument)) + return "allowlistDocument: string expected"; + if (message.maxResultCount != null && message.hasOwnProperty("maxResultCount")) + if (!$util.isInteger(message.maxResultCount)) + return "maxResultCount: integer expected"; + return null; + }; + + /** + * Creates a SmartComposeConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig} SmartComposeConfig + */ + SmartComposeConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig) + return object; + var message = new $root.google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig(); + if (object.allowlistDocument != null) + message.allowlistDocument = String(object.allowlistDocument); + if (object.maxResultCount != null) + message.maxResultCount = object.maxResultCount | 0; + return message; + }; + + /** + * Creates a plain object from a SmartComposeConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig + * @static + * @param {google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig} message SmartComposeConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SmartComposeConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.allowlistDocument = ""; + object.maxResultCount = 0; + } + if (message.allowlistDocument != null && message.hasOwnProperty("allowlistDocument")) + object.allowlistDocument = message.allowlistDocument; + if (message.maxResultCount != null && message.hasOwnProperty("maxResultCount")) + object.maxResultCount = message.maxResultCount; + return object; + }; + + /** + * Converts this SmartComposeConfig to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig + * @instance + * @returns {Object.} JSON object + */ + SmartComposeConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SmartComposeConfig + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SmartComposeConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.v2.EvaluationConfig.SmartComposeConfig"; + }; + + return SmartComposeConfig; + })(); + + return EvaluationConfig; })(); - v2.DeleteConversationProfileRequest = (function() { + v2.InputDataset = (function() { /** - * Properties of a DeleteConversationProfileRequest. + * Properties of an InputDataset. * @memberof google.cloud.dialogflow.v2 - * @interface IDeleteConversationProfileRequest - * @property {string|null} [name] DeleteConversationProfileRequest name + * @interface IInputDataset + * @property {string|null} [dataset] InputDataset dataset */ /** - * Constructs a new DeleteConversationProfileRequest. + * Constructs a new InputDataset. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a DeleteConversationProfileRequest. - * @implements IDeleteConversationProfileRequest + * @classdesc Represents an InputDataset. + * @implements IInputDataset * @constructor - * @param {google.cloud.dialogflow.v2.IDeleteConversationProfileRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.IInputDataset=} [properties] Properties to set */ - function DeleteConversationProfileRequest(properties) { + function InputDataset(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -60063,75 +63115,75 @@ } /** - * DeleteConversationProfileRequest name. - * @member {string} name - * @memberof google.cloud.dialogflow.v2.DeleteConversationProfileRequest + * InputDataset dataset. + * @member {string} dataset + * @memberof google.cloud.dialogflow.v2.InputDataset * @instance */ - DeleteConversationProfileRequest.prototype.name = ""; + InputDataset.prototype.dataset = ""; /** - * Creates a new DeleteConversationProfileRequest instance using the specified properties. + * Creates a new InputDataset instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.DeleteConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.InputDataset * @static - * @param {google.cloud.dialogflow.v2.IDeleteConversationProfileRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.DeleteConversationProfileRequest} DeleteConversationProfileRequest instance + * @param {google.cloud.dialogflow.v2.IInputDataset=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.InputDataset} InputDataset instance */ - DeleteConversationProfileRequest.create = function create(properties) { - return new DeleteConversationProfileRequest(properties); + InputDataset.create = function create(properties) { + return new InputDataset(properties); }; /** - * Encodes the specified DeleteConversationProfileRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationProfileRequest.verify|verify} messages. + * Encodes the specified InputDataset message. Does not implicitly {@link google.cloud.dialogflow.v2.InputDataset.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.DeleteConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.InputDataset * @static - * @param {google.cloud.dialogflow.v2.IDeleteConversationProfileRequest} message DeleteConversationProfileRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IInputDataset} message InputDataset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteConversationProfileRequest.encode = function encode(message, writer) { + InputDataset.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.dataset != null && Object.hasOwnProperty.call(message, "dataset")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataset); return writer; }; /** - * Encodes the specified DeleteConversationProfileRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationProfileRequest.verify|verify} messages. + * Encodes the specified InputDataset message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.InputDataset.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.DeleteConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.InputDataset * @static - * @param {google.cloud.dialogflow.v2.IDeleteConversationProfileRequest} message DeleteConversationProfileRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IInputDataset} message InputDataset message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteConversationProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { + InputDataset.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteConversationProfileRequest message from the specified reader or buffer. + * Decodes an InputDataset message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.DeleteConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.InputDataset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.DeleteConversationProfileRequest} DeleteConversationProfileRequest + * @returns {google.cloud.dialogflow.v2.InputDataset} InputDataset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteConversationProfileRequest.decode = function decode(reader, length) { + InputDataset.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.DeleteConversationProfileRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.InputDataset(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.dataset = reader.string(); break; } default: @@ -60143,122 +63195,122 @@ }; /** - * Decodes a DeleteConversationProfileRequest message from the specified reader or buffer, length delimited. + * Decodes an InputDataset message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.DeleteConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.InputDataset * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.DeleteConversationProfileRequest} DeleteConversationProfileRequest + * @returns {google.cloud.dialogflow.v2.InputDataset} InputDataset * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteConversationProfileRequest.decodeDelimited = function decodeDelimited(reader) { + InputDataset.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteConversationProfileRequest message. + * Verifies an InputDataset message. * @function verify - * @memberof google.cloud.dialogflow.v2.DeleteConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.InputDataset * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteConversationProfileRequest.verify = function verify(message) { + InputDataset.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.dataset != null && message.hasOwnProperty("dataset")) + if (!$util.isString(message.dataset)) + return "dataset: string expected"; return null; }; /** - * Creates a DeleteConversationProfileRequest message from a plain object. Also converts values to their respective internal types. + * Creates an InputDataset message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.DeleteConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.InputDataset * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.DeleteConversationProfileRequest} DeleteConversationProfileRequest + * @returns {google.cloud.dialogflow.v2.InputDataset} InputDataset */ - DeleteConversationProfileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.DeleteConversationProfileRequest) + InputDataset.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.InputDataset) return object; - var message = new $root.google.cloud.dialogflow.v2.DeleteConversationProfileRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.dialogflow.v2.InputDataset(); + if (object.dataset != null) + message.dataset = String(object.dataset); return message; }; /** - * Creates a plain object from a DeleteConversationProfileRequest message. Also converts values to other types if specified. + * Creates a plain object from an InputDataset message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.DeleteConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.InputDataset * @static - * @param {google.cloud.dialogflow.v2.DeleteConversationProfileRequest} message DeleteConversationProfileRequest + * @param {google.cloud.dialogflow.v2.InputDataset} message InputDataset * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteConversationProfileRequest.toObject = function toObject(message, options) { + InputDataset.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; + object.dataset = ""; + if (message.dataset != null && message.hasOwnProperty("dataset")) + object.dataset = message.dataset; return object; }; /** - * Converts this DeleteConversationProfileRequest to JSON. + * Converts this InputDataset to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.DeleteConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.InputDataset * @instance * @returns {Object.} JSON object */ - DeleteConversationProfileRequest.prototype.toJSON = function toJSON() { + InputDataset.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteConversationProfileRequest + * Gets the default type url for InputDataset * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.DeleteConversationProfileRequest + * @memberof google.cloud.dialogflow.v2.InputDataset * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteConversationProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + InputDataset.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.DeleteConversationProfileRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.InputDataset"; }; - return DeleteConversationProfileRequest; + return InputDataset; })(); - v2.AutomatedAgentConfig = (function() { + v2.ArticleSuggestionModelMetadata = (function() { /** - * Properties of an AutomatedAgentConfig. + * Properties of an ArticleSuggestionModelMetadata. * @memberof google.cloud.dialogflow.v2 - * @interface IAutomatedAgentConfig - * @property {string|null} [agent] AutomatedAgentConfig agent + * @interface IArticleSuggestionModelMetadata + * @property {google.cloud.dialogflow.v2.ConversationModel.ModelType|null} [trainingModelType] ArticleSuggestionModelMetadata trainingModelType */ /** - * Constructs a new AutomatedAgentConfig. + * Constructs a new ArticleSuggestionModelMetadata. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents an AutomatedAgentConfig. - * @implements IAutomatedAgentConfig + * @classdesc Represents an ArticleSuggestionModelMetadata. + * @implements IArticleSuggestionModelMetadata * @constructor - * @param {google.cloud.dialogflow.v2.IAutomatedAgentConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.IArticleSuggestionModelMetadata=} [properties] Properties to set */ - function AutomatedAgentConfig(properties) { + function ArticleSuggestionModelMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -60266,75 +63318,75 @@ } /** - * AutomatedAgentConfig agent. - * @member {string} agent - * @memberof google.cloud.dialogflow.v2.AutomatedAgentConfig + * ArticleSuggestionModelMetadata trainingModelType. + * @member {google.cloud.dialogflow.v2.ConversationModel.ModelType} trainingModelType + * @memberof google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata * @instance */ - AutomatedAgentConfig.prototype.agent = ""; + ArticleSuggestionModelMetadata.prototype.trainingModelType = 0; /** - * Creates a new AutomatedAgentConfig instance using the specified properties. + * Creates a new ArticleSuggestionModelMetadata instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.AutomatedAgentConfig + * @memberof google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata * @static - * @param {google.cloud.dialogflow.v2.IAutomatedAgentConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.AutomatedAgentConfig} AutomatedAgentConfig instance + * @param {google.cloud.dialogflow.v2.IArticleSuggestionModelMetadata=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata} ArticleSuggestionModelMetadata instance */ - AutomatedAgentConfig.create = function create(properties) { - return new AutomatedAgentConfig(properties); + ArticleSuggestionModelMetadata.create = function create(properties) { + return new ArticleSuggestionModelMetadata(properties); }; /** - * Encodes the specified AutomatedAgentConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.AutomatedAgentConfig.verify|verify} messages. + * Encodes the specified ArticleSuggestionModelMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.AutomatedAgentConfig + * @memberof google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata * @static - * @param {google.cloud.dialogflow.v2.IAutomatedAgentConfig} message AutomatedAgentConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2.IArticleSuggestionModelMetadata} message ArticleSuggestionModelMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AutomatedAgentConfig.encode = function encode(message, writer) { + ArticleSuggestionModelMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.agent != null && Object.hasOwnProperty.call(message, "agent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.agent); + if (message.trainingModelType != null && Object.hasOwnProperty.call(message, "trainingModelType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.trainingModelType); return writer; }; /** - * Encodes the specified AutomatedAgentConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.AutomatedAgentConfig.verify|verify} messages. + * Encodes the specified ArticleSuggestionModelMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.AutomatedAgentConfig + * @memberof google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata * @static - * @param {google.cloud.dialogflow.v2.IAutomatedAgentConfig} message AutomatedAgentConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2.IArticleSuggestionModelMetadata} message ArticleSuggestionModelMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AutomatedAgentConfig.encodeDelimited = function encodeDelimited(message, writer) { + ArticleSuggestionModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AutomatedAgentConfig message from the specified reader or buffer. + * Decodes an ArticleSuggestionModelMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.AutomatedAgentConfig + * @memberof google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.AutomatedAgentConfig} AutomatedAgentConfig + * @returns {google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata} ArticleSuggestionModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AutomatedAgentConfig.decode = function decode(reader, length) { + ArticleSuggestionModelMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.AutomatedAgentConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.agent = reader.string(); + case 3: { + message.trainingModelType = reader.int32(); break; } default: @@ -60346,125 +63398,146 @@ }; /** - * Decodes an AutomatedAgentConfig message from the specified reader or buffer, length delimited. + * Decodes an ArticleSuggestionModelMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.AutomatedAgentConfig + * @memberof google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.AutomatedAgentConfig} AutomatedAgentConfig + * @returns {google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata} ArticleSuggestionModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AutomatedAgentConfig.decodeDelimited = function decodeDelimited(reader) { + ArticleSuggestionModelMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AutomatedAgentConfig message. + * Verifies an ArticleSuggestionModelMetadata message. * @function verify - * @memberof google.cloud.dialogflow.v2.AutomatedAgentConfig + * @memberof google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AutomatedAgentConfig.verify = function verify(message) { + ArticleSuggestionModelMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.agent != null && message.hasOwnProperty("agent")) - if (!$util.isString(message.agent)) - return "agent: string expected"; + if (message.trainingModelType != null && message.hasOwnProperty("trainingModelType")) + switch (message.trainingModelType) { + default: + return "trainingModelType: enum value expected"; + case 0: + case 2: + case 6: + break; + } return null; }; /** - * Creates an AutomatedAgentConfig message from a plain object. Also converts values to their respective internal types. + * Creates an ArticleSuggestionModelMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.AutomatedAgentConfig + * @memberof google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.AutomatedAgentConfig} AutomatedAgentConfig + * @returns {google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata} ArticleSuggestionModelMetadata */ - AutomatedAgentConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.AutomatedAgentConfig) + ArticleSuggestionModelMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata) return object; - var message = new $root.google.cloud.dialogflow.v2.AutomatedAgentConfig(); - if (object.agent != null) - message.agent = String(object.agent); + var message = new $root.google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata(); + switch (object.trainingModelType) { + default: + if (typeof object.trainingModelType === "number") { + message.trainingModelType = object.trainingModelType; + break; + } + break; + case "MODEL_TYPE_UNSPECIFIED": + case 0: + message.trainingModelType = 0; + break; + case "SMART_REPLY_DUAL_ENCODER_MODEL": + case 2: + message.trainingModelType = 2; + break; + case "SMART_REPLY_BERT_MODEL": + case 6: + message.trainingModelType = 6; + break; + } return message; }; /** - * Creates a plain object from an AutomatedAgentConfig message. Also converts values to other types if specified. + * Creates a plain object from an ArticleSuggestionModelMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.AutomatedAgentConfig + * @memberof google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata * @static - * @param {google.cloud.dialogflow.v2.AutomatedAgentConfig} message AutomatedAgentConfig + * @param {google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata} message ArticleSuggestionModelMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AutomatedAgentConfig.toObject = function toObject(message, options) { + ArticleSuggestionModelMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.agent = ""; - if (message.agent != null && message.hasOwnProperty("agent")) - object.agent = message.agent; + object.trainingModelType = options.enums === String ? "MODEL_TYPE_UNSPECIFIED" : 0; + if (message.trainingModelType != null && message.hasOwnProperty("trainingModelType")) + object.trainingModelType = options.enums === String ? $root.google.cloud.dialogflow.v2.ConversationModel.ModelType[message.trainingModelType] === undefined ? message.trainingModelType : $root.google.cloud.dialogflow.v2.ConversationModel.ModelType[message.trainingModelType] : message.trainingModelType; return object; }; /** - * Converts this AutomatedAgentConfig to JSON. + * Converts this ArticleSuggestionModelMetadata to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.AutomatedAgentConfig + * @memberof google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata * @instance * @returns {Object.} JSON object */ - AutomatedAgentConfig.prototype.toJSON = function toJSON() { + ArticleSuggestionModelMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AutomatedAgentConfig + * Gets the default type url for ArticleSuggestionModelMetadata * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.AutomatedAgentConfig + * @memberof google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AutomatedAgentConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ArticleSuggestionModelMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.AutomatedAgentConfig"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata"; }; - return AutomatedAgentConfig; + return ArticleSuggestionModelMetadata; })(); - v2.HumanAgentAssistantConfig = (function() { + v2.SmartReplyModelMetadata = (function() { /** - * Properties of a HumanAgentAssistantConfig. + * Properties of a SmartReplyModelMetadata. * @memberof google.cloud.dialogflow.v2 - * @interface IHumanAgentAssistantConfig - * @property {google.cloud.dialogflow.v2.INotificationConfig|null} [notificationConfig] HumanAgentAssistantConfig notificationConfig - * @property {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionConfig|null} [humanAgentSuggestionConfig] HumanAgentAssistantConfig humanAgentSuggestionConfig - * @property {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionConfig|null} [endUserSuggestionConfig] HumanAgentAssistantConfig endUserSuggestionConfig - * @property {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IMessageAnalysisConfig|null} [messageAnalysisConfig] HumanAgentAssistantConfig messageAnalysisConfig + * @interface ISmartReplyModelMetadata + * @property {google.cloud.dialogflow.v2.ConversationModel.ModelType|null} [trainingModelType] SmartReplyModelMetadata trainingModelType */ /** - * Constructs a new HumanAgentAssistantConfig. + * Constructs a new SmartReplyModelMetadata. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a HumanAgentAssistantConfig. - * @implements IHumanAgentAssistantConfig + * @classdesc Represents a SmartReplyModelMetadata. + * @implements ISmartReplyModelMetadata * @constructor - * @param {google.cloud.dialogflow.v2.IHumanAgentAssistantConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.ISmartReplyModelMetadata=} [properties] Properties to set */ - function HumanAgentAssistantConfig(properties) { + function SmartReplyModelMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -60472,117 +63545,75 @@ } /** - * HumanAgentAssistantConfig notificationConfig. - * @member {google.cloud.dialogflow.v2.INotificationConfig|null|undefined} notificationConfig - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig - * @instance - */ - HumanAgentAssistantConfig.prototype.notificationConfig = null; - - /** - * HumanAgentAssistantConfig humanAgentSuggestionConfig. - * @member {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionConfig|null|undefined} humanAgentSuggestionConfig - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig - * @instance - */ - HumanAgentAssistantConfig.prototype.humanAgentSuggestionConfig = null; - - /** - * HumanAgentAssistantConfig endUserSuggestionConfig. - * @member {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionConfig|null|undefined} endUserSuggestionConfig - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig - * @instance - */ - HumanAgentAssistantConfig.prototype.endUserSuggestionConfig = null; - - /** - * HumanAgentAssistantConfig messageAnalysisConfig. - * @member {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IMessageAnalysisConfig|null|undefined} messageAnalysisConfig - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig + * SmartReplyModelMetadata trainingModelType. + * @member {google.cloud.dialogflow.v2.ConversationModel.ModelType} trainingModelType + * @memberof google.cloud.dialogflow.v2.SmartReplyModelMetadata * @instance */ - HumanAgentAssistantConfig.prototype.messageAnalysisConfig = null; + SmartReplyModelMetadata.prototype.trainingModelType = 0; /** - * Creates a new HumanAgentAssistantConfig instance using the specified properties. + * Creates a new SmartReplyModelMetadata instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig + * @memberof google.cloud.dialogflow.v2.SmartReplyModelMetadata * @static - * @param {google.cloud.dialogflow.v2.IHumanAgentAssistantConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig} HumanAgentAssistantConfig instance + * @param {google.cloud.dialogflow.v2.ISmartReplyModelMetadata=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.SmartReplyModelMetadata} SmartReplyModelMetadata instance */ - HumanAgentAssistantConfig.create = function create(properties) { - return new HumanAgentAssistantConfig(properties); + SmartReplyModelMetadata.create = function create(properties) { + return new SmartReplyModelMetadata(properties); }; /** - * Encodes the specified HumanAgentAssistantConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.verify|verify} messages. + * Encodes the specified SmartReplyModelMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.SmartReplyModelMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig + * @memberof google.cloud.dialogflow.v2.SmartReplyModelMetadata * @static - * @param {google.cloud.dialogflow.v2.IHumanAgentAssistantConfig} message HumanAgentAssistantConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2.ISmartReplyModelMetadata} message SmartReplyModelMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HumanAgentAssistantConfig.encode = function encode(message, writer) { + SmartReplyModelMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.notificationConfig != null && Object.hasOwnProperty.call(message, "notificationConfig")) - $root.google.cloud.dialogflow.v2.NotificationConfig.encode(message.notificationConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.humanAgentSuggestionConfig != null && Object.hasOwnProperty.call(message, "humanAgentSuggestionConfig")) - $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.encode(message.humanAgentSuggestionConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.endUserSuggestionConfig != null && Object.hasOwnProperty.call(message, "endUserSuggestionConfig")) - $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.encode(message.endUserSuggestionConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.messageAnalysisConfig != null && Object.hasOwnProperty.call(message, "messageAnalysisConfig")) - $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig.encode(message.messageAnalysisConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.trainingModelType != null && Object.hasOwnProperty.call(message, "trainingModelType")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.trainingModelType); return writer; }; /** - * Encodes the specified HumanAgentAssistantConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.verify|verify} messages. + * Encodes the specified SmartReplyModelMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.SmartReplyModelMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig + * @memberof google.cloud.dialogflow.v2.SmartReplyModelMetadata * @static - * @param {google.cloud.dialogflow.v2.IHumanAgentAssistantConfig} message HumanAgentAssistantConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2.ISmartReplyModelMetadata} message SmartReplyModelMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HumanAgentAssistantConfig.encodeDelimited = function encodeDelimited(message, writer) { + SmartReplyModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HumanAgentAssistantConfig message from the specified reader or buffer. + * Decodes a SmartReplyModelMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig + * @memberof google.cloud.dialogflow.v2.SmartReplyModelMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig} HumanAgentAssistantConfig + * @returns {google.cloud.dialogflow.v2.SmartReplyModelMetadata} SmartReplyModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HumanAgentAssistantConfig.decode = function decode(reader, length) { + SmartReplyModelMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.SmartReplyModelMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: { - message.notificationConfig = $root.google.cloud.dialogflow.v2.NotificationConfig.decode(reader, reader.uint32()); - break; - } - case 3: { - message.humanAgentSuggestionConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.decode(reader, reader.uint32()); - break; - } - case 4: { - message.endUserSuggestionConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.decode(reader, reader.uint32()); - break; - } - case 5: { - message.messageAnalysisConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig.decode(reader, reader.uint32()); + case 6: { + message.trainingModelType = reader.int32(); break; } default: @@ -60594,988 +63625,430 @@ }; /** - * Decodes a HumanAgentAssistantConfig message from the specified reader or buffer, length delimited. + * Decodes a SmartReplyModelMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig + * @memberof google.cloud.dialogflow.v2.SmartReplyModelMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig} HumanAgentAssistantConfig + * @returns {google.cloud.dialogflow.v2.SmartReplyModelMetadata} SmartReplyModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HumanAgentAssistantConfig.decodeDelimited = function decodeDelimited(reader) { + SmartReplyModelMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HumanAgentAssistantConfig message. + * Verifies a SmartReplyModelMetadata message. * @function verify - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig + * @memberof google.cloud.dialogflow.v2.SmartReplyModelMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - HumanAgentAssistantConfig.verify = function verify(message) { + SmartReplyModelMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.notificationConfig != null && message.hasOwnProperty("notificationConfig")) { - var error = $root.google.cloud.dialogflow.v2.NotificationConfig.verify(message.notificationConfig); - if (error) - return "notificationConfig." + error; - } - if (message.humanAgentSuggestionConfig != null && message.hasOwnProperty("humanAgentSuggestionConfig")) { - var error = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.verify(message.humanAgentSuggestionConfig); - if (error) - return "humanAgentSuggestionConfig." + error; - } - if (message.endUserSuggestionConfig != null && message.hasOwnProperty("endUserSuggestionConfig")) { - var error = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.verify(message.endUserSuggestionConfig); - if (error) - return "endUserSuggestionConfig." + error; - } - if (message.messageAnalysisConfig != null && message.hasOwnProperty("messageAnalysisConfig")) { - var error = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig.verify(message.messageAnalysisConfig); - if (error) - return "messageAnalysisConfig." + error; - } + if (message.trainingModelType != null && message.hasOwnProperty("trainingModelType")) + switch (message.trainingModelType) { + default: + return "trainingModelType: enum value expected"; + case 0: + case 2: + case 6: + break; + } return null; }; /** - * Creates a HumanAgentAssistantConfig message from a plain object. Also converts values to their respective internal types. + * Creates a SmartReplyModelMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig + * @memberof google.cloud.dialogflow.v2.SmartReplyModelMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig} HumanAgentAssistantConfig + * @returns {google.cloud.dialogflow.v2.SmartReplyModelMetadata} SmartReplyModelMetadata */ - HumanAgentAssistantConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig) + SmartReplyModelMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.SmartReplyModelMetadata) return object; - var message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig(); - if (object.notificationConfig != null) { - if (typeof object.notificationConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2.HumanAgentAssistantConfig.notificationConfig: object expected"); - message.notificationConfig = $root.google.cloud.dialogflow.v2.NotificationConfig.fromObject(object.notificationConfig); - } - if (object.humanAgentSuggestionConfig != null) { - if (typeof object.humanAgentSuggestionConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2.HumanAgentAssistantConfig.humanAgentSuggestionConfig: object expected"); - message.humanAgentSuggestionConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.fromObject(object.humanAgentSuggestionConfig); - } - if (object.endUserSuggestionConfig != null) { - if (typeof object.endUserSuggestionConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2.HumanAgentAssistantConfig.endUserSuggestionConfig: object expected"); - message.endUserSuggestionConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.fromObject(object.endUserSuggestionConfig); - } - if (object.messageAnalysisConfig != null) { - if (typeof object.messageAnalysisConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2.HumanAgentAssistantConfig.messageAnalysisConfig: object expected"); - message.messageAnalysisConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig.fromObject(object.messageAnalysisConfig); + var message = new $root.google.cloud.dialogflow.v2.SmartReplyModelMetadata(); + switch (object.trainingModelType) { + default: + if (typeof object.trainingModelType === "number") { + message.trainingModelType = object.trainingModelType; + break; + } + break; + case "MODEL_TYPE_UNSPECIFIED": + case 0: + message.trainingModelType = 0; + break; + case "SMART_REPLY_DUAL_ENCODER_MODEL": + case 2: + message.trainingModelType = 2; + break; + case "SMART_REPLY_BERT_MODEL": + case 6: + message.trainingModelType = 6; + break; } return message; }; /** - * Creates a plain object from a HumanAgentAssistantConfig message. Also converts values to other types if specified. + * Creates a plain object from a SmartReplyModelMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig + * @memberof google.cloud.dialogflow.v2.SmartReplyModelMetadata * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig} message HumanAgentAssistantConfig + * @param {google.cloud.dialogflow.v2.SmartReplyModelMetadata} message SmartReplyModelMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HumanAgentAssistantConfig.toObject = function toObject(message, options) { + SmartReplyModelMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.notificationConfig = null; - object.humanAgentSuggestionConfig = null; - object.endUserSuggestionConfig = null; - object.messageAnalysisConfig = null; - } - if (message.notificationConfig != null && message.hasOwnProperty("notificationConfig")) - object.notificationConfig = $root.google.cloud.dialogflow.v2.NotificationConfig.toObject(message.notificationConfig, options); - if (message.humanAgentSuggestionConfig != null && message.hasOwnProperty("humanAgentSuggestionConfig")) - object.humanAgentSuggestionConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.toObject(message.humanAgentSuggestionConfig, options); - if (message.endUserSuggestionConfig != null && message.hasOwnProperty("endUserSuggestionConfig")) - object.endUserSuggestionConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.toObject(message.endUserSuggestionConfig, options); - if (message.messageAnalysisConfig != null && message.hasOwnProperty("messageAnalysisConfig")) - object.messageAnalysisConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig.toObject(message.messageAnalysisConfig, options); + if (options.defaults) + object.trainingModelType = options.enums === String ? "MODEL_TYPE_UNSPECIFIED" : 0; + if (message.trainingModelType != null && message.hasOwnProperty("trainingModelType")) + object.trainingModelType = options.enums === String ? $root.google.cloud.dialogflow.v2.ConversationModel.ModelType[message.trainingModelType] === undefined ? message.trainingModelType : $root.google.cloud.dialogflow.v2.ConversationModel.ModelType[message.trainingModelType] : message.trainingModelType; return object; }; /** - * Converts this HumanAgentAssistantConfig to JSON. + * Converts this SmartReplyModelMetadata to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig + * @memberof google.cloud.dialogflow.v2.SmartReplyModelMetadata * @instance * @returns {Object.} JSON object */ - HumanAgentAssistantConfig.prototype.toJSON = function toJSON() { + SmartReplyModelMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for HumanAgentAssistantConfig + * Gets the default type url for SmartReplyModelMetadata * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig + * @memberof google.cloud.dialogflow.v2.SmartReplyModelMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - HumanAgentAssistantConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SmartReplyModelMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.HumanAgentAssistantConfig"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.SmartReplyModelMetadata"; }; - HumanAgentAssistantConfig.SuggestionTriggerSettings = (function() { - - /** - * Properties of a SuggestionTriggerSettings. - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig - * @interface ISuggestionTriggerSettings - * @property {boolean|null} [noSmalltalk] SuggestionTriggerSettings noSmalltalk - * @property {boolean|null} [onlyEndUser] SuggestionTriggerSettings onlyEndUser - */ - - /** - * Constructs a new SuggestionTriggerSettings. - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig - * @classdesc Represents a SuggestionTriggerSettings. - * @implements ISuggestionTriggerSettings - * @constructor - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionTriggerSettings=} [properties] Properties to set - */ - function SuggestionTriggerSettings(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]]; - } - - /** - * SuggestionTriggerSettings noSmalltalk. - * @member {boolean} noSmalltalk - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings - * @instance - */ - SuggestionTriggerSettings.prototype.noSmalltalk = false; - - /** - * SuggestionTriggerSettings onlyEndUser. - * @member {boolean} onlyEndUser - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings - * @instance - */ - SuggestionTriggerSettings.prototype.onlyEndUser = false; - - /** - * Creates a new SuggestionTriggerSettings instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionTriggerSettings=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings} SuggestionTriggerSettings instance - */ - SuggestionTriggerSettings.create = function create(properties) { - return new SuggestionTriggerSettings(properties); - }; - - /** - * Encodes the specified SuggestionTriggerSettings message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionTriggerSettings} message SuggestionTriggerSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SuggestionTriggerSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.noSmalltalk != null && Object.hasOwnProperty.call(message, "noSmalltalk")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.noSmalltalk); - if (message.onlyEndUser != null && Object.hasOwnProperty.call(message, "onlyEndUser")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.onlyEndUser); - return writer; - }; - - /** - * Encodes the specified SuggestionTriggerSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionTriggerSettings} message SuggestionTriggerSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SuggestionTriggerSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SuggestionTriggerSettings message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings} SuggestionTriggerSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SuggestionTriggerSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.noSmalltalk = reader.bool(); - break; - } - case 2: { - message.onlyEndUser = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SuggestionTriggerSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings} SuggestionTriggerSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SuggestionTriggerSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SuggestionTriggerSettings message. - * @function verify - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SuggestionTriggerSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.noSmalltalk != null && message.hasOwnProperty("noSmalltalk")) - if (typeof message.noSmalltalk !== "boolean") - return "noSmalltalk: boolean expected"; - if (message.onlyEndUser != null && message.hasOwnProperty("onlyEndUser")) - if (typeof message.onlyEndUser !== "boolean") - return "onlyEndUser: boolean expected"; - return null; - }; - - /** - * Creates a SuggestionTriggerSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings} SuggestionTriggerSettings - */ - SuggestionTriggerSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings) - return object; - var message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings(); - if (object.noSmalltalk != null) - message.noSmalltalk = Boolean(object.noSmalltalk); - if (object.onlyEndUser != null) - message.onlyEndUser = Boolean(object.onlyEndUser); - return message; - }; - - /** - * Creates a plain object from a SuggestionTriggerSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings} message SuggestionTriggerSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SuggestionTriggerSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.noSmalltalk = false; - object.onlyEndUser = false; - } - if (message.noSmalltalk != null && message.hasOwnProperty("noSmalltalk")) - object.noSmalltalk = message.noSmalltalk; - if (message.onlyEndUser != null && message.hasOwnProperty("onlyEndUser")) - object.onlyEndUser = message.onlyEndUser; - return object; - }; - - /** - * Converts this SuggestionTriggerSettings to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings - * @instance - * @returns {Object.} JSON object - */ - SuggestionTriggerSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SuggestionTriggerSettings - * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SuggestionTriggerSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings"; - }; - - return SuggestionTriggerSettings; - })(); - - HumanAgentAssistantConfig.SuggestionFeatureConfig = (function() { - - /** - * Properties of a SuggestionFeatureConfig. - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig - * @interface ISuggestionFeatureConfig - * @property {google.cloud.dialogflow.v2.ISuggestionFeature|null} [suggestionFeature] SuggestionFeatureConfig suggestionFeature - * @property {boolean|null} [enableEventBasedSuggestion] SuggestionFeatureConfig enableEventBasedSuggestion - * @property {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionTriggerSettings|null} [suggestionTriggerSettings] SuggestionFeatureConfig suggestionTriggerSettings - * @property {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionQueryConfig|null} [queryConfig] SuggestionFeatureConfig queryConfig - * @property {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationModelConfig|null} [conversationModelConfig] SuggestionFeatureConfig conversationModelConfig - * @property {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationProcessConfig|null} [conversationProcessConfig] SuggestionFeatureConfig conversationProcessConfig - */ - - /** - * Constructs a new SuggestionFeatureConfig. - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig - * @classdesc Represents a SuggestionFeatureConfig. - * @implements ISuggestionFeatureConfig - * @constructor - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionFeatureConfig=} [properties] Properties to set - */ - function SuggestionFeatureConfig(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]]; - } - - /** - * SuggestionFeatureConfig suggestionFeature. - * @member {google.cloud.dialogflow.v2.ISuggestionFeature|null|undefined} suggestionFeature - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig - * @instance - */ - SuggestionFeatureConfig.prototype.suggestionFeature = null; - - /** - * SuggestionFeatureConfig enableEventBasedSuggestion. - * @member {boolean} enableEventBasedSuggestion - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig - * @instance - */ - SuggestionFeatureConfig.prototype.enableEventBasedSuggestion = false; - - /** - * SuggestionFeatureConfig suggestionTriggerSettings. - * @member {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionTriggerSettings|null|undefined} suggestionTriggerSettings - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig - * @instance - */ - SuggestionFeatureConfig.prototype.suggestionTriggerSettings = null; - - /** - * SuggestionFeatureConfig queryConfig. - * @member {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionQueryConfig|null|undefined} queryConfig - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig - * @instance - */ - SuggestionFeatureConfig.prototype.queryConfig = null; - - /** - * SuggestionFeatureConfig conversationModelConfig. - * @member {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationModelConfig|null|undefined} conversationModelConfig - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig - * @instance - */ - SuggestionFeatureConfig.prototype.conversationModelConfig = null; - - /** - * SuggestionFeatureConfig conversationProcessConfig. - * @member {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationProcessConfig|null|undefined} conversationProcessConfig - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig - * @instance - */ - SuggestionFeatureConfig.prototype.conversationProcessConfig = null; - - /** - * Creates a new SuggestionFeatureConfig instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionFeatureConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig} SuggestionFeatureConfig instance - */ - SuggestionFeatureConfig.create = function create(properties) { - return new SuggestionFeatureConfig(properties); - }; - - /** - * Encodes the specified SuggestionFeatureConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionFeatureConfig} message SuggestionFeatureConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SuggestionFeatureConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enableEventBasedSuggestion != null && Object.hasOwnProperty.call(message, "enableEventBasedSuggestion")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.enableEventBasedSuggestion); - if (message.suggestionFeature != null && Object.hasOwnProperty.call(message, "suggestionFeature")) - $root.google.cloud.dialogflow.v2.SuggestionFeature.encode(message.suggestionFeature, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.queryConfig != null && Object.hasOwnProperty.call(message, "queryConfig")) - $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.encode(message.queryConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.conversationModelConfig != null && Object.hasOwnProperty.call(message, "conversationModelConfig")) - $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig.encode(message.conversationModelConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.conversationProcessConfig != null && Object.hasOwnProperty.call(message, "conversationProcessConfig")) - $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig.encode(message.conversationProcessConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.suggestionTriggerSettings != null && Object.hasOwnProperty.call(message, "suggestionTriggerSettings")) - $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings.encode(message.suggestionTriggerSettings, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SuggestionFeatureConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionFeatureConfig} message SuggestionFeatureConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SuggestionFeatureConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SuggestionFeatureConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig} SuggestionFeatureConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SuggestionFeatureConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 5: { - message.suggestionFeature = $root.google.cloud.dialogflow.v2.SuggestionFeature.decode(reader, reader.uint32()); - break; - } - case 3: { - message.enableEventBasedSuggestion = reader.bool(); - break; - } - case 10: { - message.suggestionTriggerSettings = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings.decode(reader, reader.uint32()); - break; - } - case 6: { - message.queryConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.decode(reader, reader.uint32()); - break; - } - case 7: { - message.conversationModelConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig.decode(reader, reader.uint32()); - break; - } - case 8: { - message.conversationProcessConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SuggestionFeatureConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig} SuggestionFeatureConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SuggestionFeatureConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SuggestionFeatureConfig message. - * @function verify - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SuggestionFeatureConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.suggestionFeature != null && message.hasOwnProperty("suggestionFeature")) { - var error = $root.google.cloud.dialogflow.v2.SuggestionFeature.verify(message.suggestionFeature); - if (error) - return "suggestionFeature." + error; - } - if (message.enableEventBasedSuggestion != null && message.hasOwnProperty("enableEventBasedSuggestion")) - if (typeof message.enableEventBasedSuggestion !== "boolean") - return "enableEventBasedSuggestion: boolean expected"; - if (message.suggestionTriggerSettings != null && message.hasOwnProperty("suggestionTriggerSettings")) { - var error = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings.verify(message.suggestionTriggerSettings); - if (error) - return "suggestionTriggerSettings." + error; - } - if (message.queryConfig != null && message.hasOwnProperty("queryConfig")) { - var error = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.verify(message.queryConfig); - if (error) - return "queryConfig." + error; - } - if (message.conversationModelConfig != null && message.hasOwnProperty("conversationModelConfig")) { - var error = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig.verify(message.conversationModelConfig); - if (error) - return "conversationModelConfig." + error; - } - if (message.conversationProcessConfig != null && message.hasOwnProperty("conversationProcessConfig")) { - var error = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig.verify(message.conversationProcessConfig); - if (error) - return "conversationProcessConfig." + error; - } - return null; - }; - - /** - * Creates a SuggestionFeatureConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig} SuggestionFeatureConfig - */ - SuggestionFeatureConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig) - return object; - var message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig(); - if (object.suggestionFeature != null) { - if (typeof object.suggestionFeature !== "object") - throw TypeError(".google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.suggestionFeature: object expected"); - message.suggestionFeature = $root.google.cloud.dialogflow.v2.SuggestionFeature.fromObject(object.suggestionFeature); - } - if (object.enableEventBasedSuggestion != null) - message.enableEventBasedSuggestion = Boolean(object.enableEventBasedSuggestion); - if (object.suggestionTriggerSettings != null) { - if (typeof object.suggestionTriggerSettings !== "object") - throw TypeError(".google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.suggestionTriggerSettings: object expected"); - message.suggestionTriggerSettings = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings.fromObject(object.suggestionTriggerSettings); - } - if (object.queryConfig != null) { - if (typeof object.queryConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.queryConfig: object expected"); - message.queryConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.fromObject(object.queryConfig); - } - if (object.conversationModelConfig != null) { - if (typeof object.conversationModelConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.conversationModelConfig: object expected"); - message.conversationModelConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig.fromObject(object.conversationModelConfig); - } - if (object.conversationProcessConfig != null) { - if (typeof object.conversationProcessConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.conversationProcessConfig: object expected"); - message.conversationProcessConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig.fromObject(object.conversationProcessConfig); - } - return message; - }; - - /** - * Creates a plain object from a SuggestionFeatureConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig} message SuggestionFeatureConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SuggestionFeatureConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.enableEventBasedSuggestion = false; - object.suggestionFeature = null; - object.queryConfig = null; - object.conversationModelConfig = null; - object.conversationProcessConfig = null; - object.suggestionTriggerSettings = null; - } - if (message.enableEventBasedSuggestion != null && message.hasOwnProperty("enableEventBasedSuggestion")) - object.enableEventBasedSuggestion = message.enableEventBasedSuggestion; - if (message.suggestionFeature != null && message.hasOwnProperty("suggestionFeature")) - object.suggestionFeature = $root.google.cloud.dialogflow.v2.SuggestionFeature.toObject(message.suggestionFeature, options); - if (message.queryConfig != null && message.hasOwnProperty("queryConfig")) - object.queryConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.toObject(message.queryConfig, options); - if (message.conversationModelConfig != null && message.hasOwnProperty("conversationModelConfig")) - object.conversationModelConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig.toObject(message.conversationModelConfig, options); - if (message.conversationProcessConfig != null && message.hasOwnProperty("conversationProcessConfig")) - object.conversationProcessConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig.toObject(message.conversationProcessConfig, options); - if (message.suggestionTriggerSettings != null && message.hasOwnProperty("suggestionTriggerSettings")) - object.suggestionTriggerSettings = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionTriggerSettings.toObject(message.suggestionTriggerSettings, options); - return object; - }; - - /** - * Converts this SuggestionFeatureConfig to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig - * @instance - * @returns {Object.} JSON object - */ - SuggestionFeatureConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SuggestionFeatureConfig - * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SuggestionFeatureConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig"; - }; + return SmartReplyModelMetadata; + })(); - return SuggestionFeatureConfig; - })(); + v2.SmartReplyMetrics = (function() { - HumanAgentAssistantConfig.SuggestionConfig = (function() { + /** + * Properties of a SmartReplyMetrics. + * @memberof google.cloud.dialogflow.v2 + * @interface ISmartReplyMetrics + * @property {number|null} [allowlistCoverage] SmartReplyMetrics allowlistCoverage + * @property {Array.|null} [topNMetrics] SmartReplyMetrics topNMetrics + * @property {number|Long|null} [conversationCount] SmartReplyMetrics conversationCount + */ - /** - * Properties of a SuggestionConfig. - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig - * @interface ISuggestionConfig - * @property {Array.|null} [featureConfigs] SuggestionConfig featureConfigs - * @property {boolean|null} [groupSuggestionResponses] SuggestionConfig groupSuggestionResponses - */ + /** + * Constructs a new SmartReplyMetrics. + * @memberof google.cloud.dialogflow.v2 + * @classdesc Represents a SmartReplyMetrics. + * @implements ISmartReplyMetrics + * @constructor + * @param {google.cloud.dialogflow.v2.ISmartReplyMetrics=} [properties] Properties to set + */ + function SmartReplyMetrics(properties) { + this.topNMetrics = []; + 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]]; + } - /** - * Constructs a new SuggestionConfig. - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig - * @classdesc Represents a SuggestionConfig. - * @implements ISuggestionConfig - * @constructor - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionConfig=} [properties] Properties to set - */ - function SuggestionConfig(properties) { - this.featureConfigs = []; - 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]]; - } + /** + * SmartReplyMetrics allowlistCoverage. + * @member {number} allowlistCoverage + * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics + * @instance + */ + SmartReplyMetrics.prototype.allowlistCoverage = 0; - /** - * SuggestionConfig featureConfigs. - * @member {Array.} featureConfigs - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig - * @instance - */ - SuggestionConfig.prototype.featureConfigs = $util.emptyArray; + /** + * SmartReplyMetrics topNMetrics. + * @member {Array.} topNMetrics + * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics + * @instance + */ + SmartReplyMetrics.prototype.topNMetrics = $util.emptyArray; - /** - * SuggestionConfig groupSuggestionResponses. - * @member {boolean} groupSuggestionResponses - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig - * @instance - */ - SuggestionConfig.prototype.groupSuggestionResponses = false; + /** + * SmartReplyMetrics conversationCount. + * @member {number|Long} conversationCount + * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics + * @instance + */ + SmartReplyMetrics.prototype.conversationCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Creates a new SuggestionConfig instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig} SuggestionConfig instance - */ - SuggestionConfig.create = function create(properties) { - return new SuggestionConfig(properties); - }; + /** + * Creates a new SmartReplyMetrics instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics + * @static + * @param {google.cloud.dialogflow.v2.ISmartReplyMetrics=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.SmartReplyMetrics} SmartReplyMetrics instance + */ + SmartReplyMetrics.create = function create(properties) { + return new SmartReplyMetrics(properties); + }; - /** - * Encodes the specified SuggestionConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionConfig} message SuggestionConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SuggestionConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.featureConfigs != null && message.featureConfigs.length) - for (var i = 0; i < message.featureConfigs.length; ++i) - $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.encode(message.featureConfigs[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.groupSuggestionResponses != null && Object.hasOwnProperty.call(message, "groupSuggestionResponses")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.groupSuggestionResponses); - return writer; - }; + /** + * Encodes the specified SmartReplyMetrics message. Does not implicitly {@link google.cloud.dialogflow.v2.SmartReplyMetrics.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics + * @static + * @param {google.cloud.dialogflow.v2.ISmartReplyMetrics} message SmartReplyMetrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SmartReplyMetrics.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowlistCoverage != null && Object.hasOwnProperty.call(message, "allowlistCoverage")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.allowlistCoverage); + if (message.topNMetrics != null && message.topNMetrics.length) + for (var i = 0; i < message.topNMetrics.length; ++i) + $root.google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics.encode(message.topNMetrics[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.conversationCount != null && Object.hasOwnProperty.call(message, "conversationCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.conversationCount); + return writer; + }; - /** - * Encodes the specified SuggestionConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionConfig} message SuggestionConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SuggestionConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified SmartReplyMetrics message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.SmartReplyMetrics.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics + * @static + * @param {google.cloud.dialogflow.v2.ISmartReplyMetrics} message SmartReplyMetrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SmartReplyMetrics.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a SuggestionConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig} SuggestionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SuggestionConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - if (!(message.featureConfigs && message.featureConfigs.length)) - message.featureConfigs = []; - message.featureConfigs.push($root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.decode(reader, reader.uint32())); - break; - } - case 3: { - message.groupSuggestionResponses = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes a SmartReplyMetrics message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2.SmartReplyMetrics} SmartReplyMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SmartReplyMetrics.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.SmartReplyMetrics(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.allowlistCoverage = reader.float(); break; } - } - return message; - }; - - /** - * Decodes a SuggestionConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig} SuggestionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SuggestionConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SuggestionConfig message. - * @function verify - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SuggestionConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.featureConfigs != null && message.hasOwnProperty("featureConfigs")) { - if (!Array.isArray(message.featureConfigs)) - return "featureConfigs: array expected"; - for (var i = 0; i < message.featureConfigs.length; ++i) { - var error = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.verify(message.featureConfigs[i]); - if (error) - return "featureConfigs." + error; + case 2: { + if (!(message.topNMetrics && message.topNMetrics.length)) + message.topNMetrics = []; + message.topNMetrics.push($root.google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics.decode(reader, reader.uint32())); + break; } - } - if (message.groupSuggestionResponses != null && message.hasOwnProperty("groupSuggestionResponses")) - if (typeof message.groupSuggestionResponses !== "boolean") - return "groupSuggestionResponses: boolean expected"; - return null; - }; - - /** - * Creates a SuggestionConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig} SuggestionConfig - */ - SuggestionConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig) - return object; - var message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig(); - if (object.featureConfigs) { - if (!Array.isArray(object.featureConfigs)) - throw TypeError(".google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.featureConfigs: array expected"); - message.featureConfigs = []; - for (var i = 0; i < object.featureConfigs.length; ++i) { - if (typeof object.featureConfigs[i] !== "object") - throw TypeError(".google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.featureConfigs: object expected"); - message.featureConfigs[i] = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.fromObject(object.featureConfigs[i]); + case 3: { + message.conversationCount = reader.int64(); + break; } + default: + reader.skipType(tag & 7); + break; } - if (object.groupSuggestionResponses != null) - message.groupSuggestionResponses = Boolean(object.groupSuggestionResponses); - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a SuggestionConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig} message SuggestionConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SuggestionConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.featureConfigs = []; - if (options.defaults) - object.groupSuggestionResponses = false; - if (message.featureConfigs && message.featureConfigs.length) { - object.featureConfigs = []; - for (var j = 0; j < message.featureConfigs.length; ++j) - object.featureConfigs[j] = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.toObject(message.featureConfigs[j], options); + /** + * Decodes a SmartReplyMetrics message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2.SmartReplyMetrics} SmartReplyMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SmartReplyMetrics.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SmartReplyMetrics message. + * @function verify + * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SmartReplyMetrics.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowlistCoverage != null && message.hasOwnProperty("allowlistCoverage")) + if (typeof message.allowlistCoverage !== "number") + return "allowlistCoverage: number expected"; + if (message.topNMetrics != null && message.hasOwnProperty("topNMetrics")) { + if (!Array.isArray(message.topNMetrics)) + return "topNMetrics: array expected"; + for (var i = 0; i < message.topNMetrics.length; ++i) { + var error = $root.google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics.verify(message.topNMetrics[i]); + if (error) + return "topNMetrics." + error; } - if (message.groupSuggestionResponses != null && message.hasOwnProperty("groupSuggestionResponses")) - object.groupSuggestionResponses = message.groupSuggestionResponses; + } + if (message.conversationCount != null && message.hasOwnProperty("conversationCount")) + if (!$util.isInteger(message.conversationCount) && !(message.conversationCount && $util.isInteger(message.conversationCount.low) && $util.isInteger(message.conversationCount.high))) + return "conversationCount: integer|Long expected"; + return null; + }; + + /** + * Creates a SmartReplyMetrics message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2.SmartReplyMetrics} SmartReplyMetrics + */ + SmartReplyMetrics.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.SmartReplyMetrics) return object; - }; + var message = new $root.google.cloud.dialogflow.v2.SmartReplyMetrics(); + if (object.allowlistCoverage != null) + message.allowlistCoverage = Number(object.allowlistCoverage); + if (object.topNMetrics) { + if (!Array.isArray(object.topNMetrics)) + throw TypeError(".google.cloud.dialogflow.v2.SmartReplyMetrics.topNMetrics: array expected"); + message.topNMetrics = []; + for (var i = 0; i < object.topNMetrics.length; ++i) { + if (typeof object.topNMetrics[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2.SmartReplyMetrics.topNMetrics: object expected"); + message.topNMetrics[i] = $root.google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics.fromObject(object.topNMetrics[i]); + } + } + if (object.conversationCount != null) + if ($util.Long) + (message.conversationCount = $util.Long.fromValue(object.conversationCount)).unsigned = false; + else if (typeof object.conversationCount === "string") + message.conversationCount = parseInt(object.conversationCount, 10); + else if (typeof object.conversationCount === "number") + message.conversationCount = object.conversationCount; + else if (typeof object.conversationCount === "object") + message.conversationCount = new $util.LongBits(object.conversationCount.low >>> 0, object.conversationCount.high >>> 0).toNumber(); + return message; + }; - /** - * Converts this SuggestionConfig to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig - * @instance - * @returns {Object.} JSON object - */ - SuggestionConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a SmartReplyMetrics message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics + * @static + * @param {google.cloud.dialogflow.v2.SmartReplyMetrics} message SmartReplyMetrics + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SmartReplyMetrics.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.topNMetrics = []; + if (options.defaults) { + object.allowlistCoverage = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.conversationCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.conversationCount = options.longs === String ? "0" : 0; + } + if (message.allowlistCoverage != null && message.hasOwnProperty("allowlistCoverage")) + object.allowlistCoverage = options.json && !isFinite(message.allowlistCoverage) ? String(message.allowlistCoverage) : message.allowlistCoverage; + if (message.topNMetrics && message.topNMetrics.length) { + object.topNMetrics = []; + for (var j = 0; j < message.topNMetrics.length; ++j) + object.topNMetrics[j] = $root.google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics.toObject(message.topNMetrics[j], options); + } + if (message.conversationCount != null && message.hasOwnProperty("conversationCount")) + if (typeof message.conversationCount === "number") + object.conversationCount = options.longs === String ? String(message.conversationCount) : message.conversationCount; + else + object.conversationCount = options.longs === String ? $util.Long.prototype.toString.call(message.conversationCount) : options.longs === Number ? new $util.LongBits(message.conversationCount.low >>> 0, message.conversationCount.high >>> 0).toNumber() : message.conversationCount; + return object; + }; - /** - * Gets the default type url for SuggestionConfig - * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SuggestionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig"; - }; + /** + * Converts this SmartReplyMetrics to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics + * @instance + * @returns {Object.} JSON object + */ + SmartReplyMetrics.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return SuggestionConfig; - })(); + /** + * Gets the default type url for SmartReplyMetrics + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SmartReplyMetrics.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.v2.SmartReplyMetrics"; + }; - HumanAgentAssistantConfig.SuggestionQueryConfig = (function() { + SmartReplyMetrics.TopNMetrics = (function() { /** - * Properties of a SuggestionQueryConfig. - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig - * @interface ISuggestionQueryConfig - * @property {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource|null} [knowledgeBaseQuerySource] SuggestionQueryConfig knowledgeBaseQuerySource - * @property {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource|null} [documentQuerySource] SuggestionQueryConfig documentQuerySource - * @property {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource|null} [dialogflowQuerySource] SuggestionQueryConfig dialogflowQuerySource - * @property {number|null} [maxResults] SuggestionQueryConfig maxResults - * @property {number|null} [confidenceThreshold] SuggestionQueryConfig confidenceThreshold - * @property {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings|null} [contextFilterSettings] SuggestionQueryConfig contextFilterSettings + * Properties of a TopNMetrics. + * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics + * @interface ITopNMetrics + * @property {number|null} [n] TopNMetrics n + * @property {number|null} [recall] TopNMetrics recall */ /** - * Constructs a new SuggestionQueryConfig. - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig - * @classdesc Represents a SuggestionQueryConfig. - * @implements ISuggestionQueryConfig + * Constructs a new TopNMetrics. + * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics + * @classdesc Represents a TopNMetrics. + * @implements ITopNMetrics * @constructor - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionQueryConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.SmartReplyMetrics.ITopNMetrics=} [properties] Properties to set */ - function SuggestionQueryConfig(properties) { + function TopNMetrics(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -61583,159 +64056,89 @@ } /** - * SuggestionQueryConfig knowledgeBaseQuerySource. - * @member {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource|null|undefined} knowledgeBaseQuerySource - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig - * @instance - */ - SuggestionQueryConfig.prototype.knowledgeBaseQuerySource = null; - - /** - * SuggestionQueryConfig documentQuerySource. - * @member {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource|null|undefined} documentQuerySource - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig - * @instance - */ - SuggestionQueryConfig.prototype.documentQuerySource = null; - - /** - * SuggestionQueryConfig dialogflowQuerySource. - * @member {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource|null|undefined} dialogflowQuerySource - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig - * @instance - */ - SuggestionQueryConfig.prototype.dialogflowQuerySource = null; - - /** - * SuggestionQueryConfig maxResults. - * @member {number} maxResults - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig - * @instance - */ - SuggestionQueryConfig.prototype.maxResults = 0; - - /** - * SuggestionQueryConfig confidenceThreshold. - * @member {number} confidenceThreshold - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig - * @instance - */ - SuggestionQueryConfig.prototype.confidenceThreshold = 0; - - /** - * SuggestionQueryConfig contextFilterSettings. - * @member {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings|null|undefined} contextFilterSettings - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + * TopNMetrics n. + * @member {number} n + * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics * @instance */ - SuggestionQueryConfig.prototype.contextFilterSettings = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + TopNMetrics.prototype.n = 0; /** - * SuggestionQueryConfig querySource. - * @member {"knowledgeBaseQuerySource"|"documentQuerySource"|"dialogflowQuerySource"|undefined} querySource - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + * TopNMetrics recall. + * @member {number} recall + * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics * @instance */ - Object.defineProperty(SuggestionQueryConfig.prototype, "querySource", { - get: $util.oneOfGetter($oneOfFields = ["knowledgeBaseQuerySource", "documentQuerySource", "dialogflowQuerySource"]), - set: $util.oneOfSetter($oneOfFields) - }); + TopNMetrics.prototype.recall = 0; /** - * Creates a new SuggestionQueryConfig instance using the specified properties. + * Creates a new TopNMetrics instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionQueryConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig} SuggestionQueryConfig instance + * @param {google.cloud.dialogflow.v2.SmartReplyMetrics.ITopNMetrics=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics} TopNMetrics instance */ - SuggestionQueryConfig.create = function create(properties) { - return new SuggestionQueryConfig(properties); + TopNMetrics.create = function create(properties) { + return new TopNMetrics(properties); }; /** - * Encodes the specified SuggestionQueryConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.verify|verify} messages. + * Encodes the specified TopNMetrics message. Does not implicitly {@link google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionQueryConfig} message SuggestionQueryConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2.SmartReplyMetrics.ITopNMetrics} message TopNMetrics message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SuggestionQueryConfig.encode = function encode(message, writer) { + TopNMetrics.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.knowledgeBaseQuerySource != null && Object.hasOwnProperty.call(message, "knowledgeBaseQuerySource")) - $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.encode(message.knowledgeBaseQuerySource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.documentQuerySource != null && Object.hasOwnProperty.call(message, "documentQuerySource")) - $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.encode(message.documentQuerySource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.dialogflowQuerySource != null && Object.hasOwnProperty.call(message, "dialogflowQuerySource")) - $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.encode(message.dialogflowQuerySource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.maxResults != null && Object.hasOwnProperty.call(message, "maxResults")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.maxResults); - if (message.confidenceThreshold != null && Object.hasOwnProperty.call(message, "confidenceThreshold")) - writer.uint32(/* id 5, wireType 5 =*/45).float(message.confidenceThreshold); - if (message.contextFilterSettings != null && Object.hasOwnProperty.call(message, "contextFilterSettings")) - $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.encode(message.contextFilterSettings, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.n != null && Object.hasOwnProperty.call(message, "n")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.n); + if (message.recall != null && Object.hasOwnProperty.call(message, "recall")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.recall); return writer; }; /** - * Encodes the specified SuggestionQueryConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.verify|verify} messages. + * Encodes the specified TopNMetrics message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionQueryConfig} message SuggestionQueryConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2.SmartReplyMetrics.ITopNMetrics} message TopNMetrics message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SuggestionQueryConfig.encodeDelimited = function encodeDelimited(message, writer) { + TopNMetrics.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SuggestionQueryConfig message from the specified reader or buffer. + * Decodes a TopNMetrics message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig + * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig} SuggestionQueryConfig + * @returns {google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics} TopNMetrics * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SuggestionQueryConfig.decode = function decode(reader, length) { + TopNMetrics.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.knowledgeBaseQuerySource = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.decode(reader, reader.uint32()); + message.n = reader.int32(); break; } case 2: { - message.documentQuerySource = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.decode(reader, reader.uint32()); - break; - } - case 3: { - message.dialogflowQuerySource = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.decode(reader, reader.uint32()); - break; - } - case 4: { - message.maxResults = reader.int32(); - break; - } - case 5: { - message.confidenceThreshold = reader.float(); - break; - } - case 7: { - message.contextFilterSettings = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.decode(reader, reader.uint32()); + message.recall = reader.float(); break; } default: @@ -61743,1735 +64146,1274 @@ break; } } - return message; - }; - - /** - * Decodes a SuggestionQueryConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig} SuggestionQueryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SuggestionQueryConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SuggestionQueryConfig message. - * @function verify - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SuggestionQueryConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.knowledgeBaseQuerySource != null && message.hasOwnProperty("knowledgeBaseQuerySource")) { - properties.querySource = 1; - { - var error = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.verify(message.knowledgeBaseQuerySource); - if (error) - return "knowledgeBaseQuerySource." + error; - } - } - if (message.documentQuerySource != null && message.hasOwnProperty("documentQuerySource")) { - if (properties.querySource === 1) - return "querySource: multiple values"; - properties.querySource = 1; - { - var error = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.verify(message.documentQuerySource); - if (error) - return "documentQuerySource." + error; - } - } - if (message.dialogflowQuerySource != null && message.hasOwnProperty("dialogflowQuerySource")) { - if (properties.querySource === 1) - return "querySource: multiple values"; - properties.querySource = 1; - { - var error = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.verify(message.dialogflowQuerySource); - if (error) - return "dialogflowQuerySource." + error; - } - } - if (message.maxResults != null && message.hasOwnProperty("maxResults")) - if (!$util.isInteger(message.maxResults)) - return "maxResults: integer expected"; - if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) - if (typeof message.confidenceThreshold !== "number") - return "confidenceThreshold: number expected"; - if (message.contextFilterSettings != null && message.hasOwnProperty("contextFilterSettings")) { - var error = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.verify(message.contextFilterSettings); - if (error) - return "contextFilterSettings." + error; - } - return null; - }; - - /** - * Creates a SuggestionQueryConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig} SuggestionQueryConfig - */ - SuggestionQueryConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig) - return object; - var message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig(); - if (object.knowledgeBaseQuerySource != null) { - if (typeof object.knowledgeBaseQuerySource !== "object") - throw TypeError(".google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.knowledgeBaseQuerySource: object expected"); - message.knowledgeBaseQuerySource = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.fromObject(object.knowledgeBaseQuerySource); - } - if (object.documentQuerySource != null) { - if (typeof object.documentQuerySource !== "object") - throw TypeError(".google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.documentQuerySource: object expected"); - message.documentQuerySource = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.fromObject(object.documentQuerySource); - } - if (object.dialogflowQuerySource != null) { - if (typeof object.dialogflowQuerySource !== "object") - throw TypeError(".google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.dialogflowQuerySource: object expected"); - message.dialogflowQuerySource = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.fromObject(object.dialogflowQuerySource); - } - if (object.maxResults != null) - message.maxResults = object.maxResults | 0; - if (object.confidenceThreshold != null) - message.confidenceThreshold = Number(object.confidenceThreshold); - if (object.contextFilterSettings != null) { - if (typeof object.contextFilterSettings !== "object") - throw TypeError(".google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.contextFilterSettings: object expected"); - message.contextFilterSettings = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.fromObject(object.contextFilterSettings); - } - return message; - }; - - /** - * Creates a plain object from a SuggestionQueryConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig} message SuggestionQueryConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SuggestionQueryConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.maxResults = 0; - object.confidenceThreshold = 0; - object.contextFilterSettings = null; - } - if (message.knowledgeBaseQuerySource != null && message.hasOwnProperty("knowledgeBaseQuerySource")) { - object.knowledgeBaseQuerySource = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.toObject(message.knowledgeBaseQuerySource, options); - if (options.oneofs) - object.querySource = "knowledgeBaseQuerySource"; - } - if (message.documentQuerySource != null && message.hasOwnProperty("documentQuerySource")) { - object.documentQuerySource = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.toObject(message.documentQuerySource, options); - if (options.oneofs) - object.querySource = "documentQuerySource"; - } - if (message.dialogflowQuerySource != null && message.hasOwnProperty("dialogflowQuerySource")) { - object.dialogflowQuerySource = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.toObject(message.dialogflowQuerySource, options); - if (options.oneofs) - object.querySource = "dialogflowQuerySource"; - } - if (message.maxResults != null && message.hasOwnProperty("maxResults")) - object.maxResults = message.maxResults; - if (message.confidenceThreshold != null && message.hasOwnProperty("confidenceThreshold")) - object.confidenceThreshold = options.json && !isFinite(message.confidenceThreshold) ? String(message.confidenceThreshold) : message.confidenceThreshold; - if (message.contextFilterSettings != null && message.hasOwnProperty("contextFilterSettings")) - object.contextFilterSettings = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.toObject(message.contextFilterSettings, options); - return object; - }; - - /** - * Converts this SuggestionQueryConfig to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig - * @instance - * @returns {Object.} JSON object - */ - SuggestionQueryConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SuggestionQueryConfig - * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SuggestionQueryConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig"; - }; - - SuggestionQueryConfig.KnowledgeBaseQuerySource = (function() { - - /** - * Properties of a KnowledgeBaseQuerySource. - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig - * @interface IKnowledgeBaseQuerySource - * @property {Array.|null} [knowledgeBases] KnowledgeBaseQuerySource knowledgeBases - */ - - /** - * Constructs a new KnowledgeBaseQuerySource. - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig - * @classdesc Represents a KnowledgeBaseQuerySource. - * @implements IKnowledgeBaseQuerySource - * @constructor - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource=} [properties] Properties to set - */ - function KnowledgeBaseQuerySource(properties) { - this.knowledgeBases = []; - 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]]; - } - - /** - * KnowledgeBaseQuerySource knowledgeBases. - * @member {Array.} knowledgeBases - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource - * @instance - */ - KnowledgeBaseQuerySource.prototype.knowledgeBases = $util.emptyArray; - - /** - * Creates a new KnowledgeBaseQuerySource instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource} KnowledgeBaseQuerySource instance - */ - KnowledgeBaseQuerySource.create = function create(properties) { - return new KnowledgeBaseQuerySource(properties); - }; - - /** - * Encodes the specified KnowledgeBaseQuerySource message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource} message KnowledgeBaseQuerySource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KnowledgeBaseQuerySource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.knowledgeBases != null && message.knowledgeBases.length) - for (var i = 0; i < message.knowledgeBases.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.knowledgeBases[i]); - return writer; - }; - - /** - * Encodes the specified KnowledgeBaseQuerySource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IKnowledgeBaseQuerySource} message KnowledgeBaseQuerySource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KnowledgeBaseQuerySource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a KnowledgeBaseQuerySource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource} KnowledgeBaseQuerySource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KnowledgeBaseQuerySource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.knowledgeBases && message.knowledgeBases.length)) - message.knowledgeBases = []; - message.knowledgeBases.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a KnowledgeBaseQuerySource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource} KnowledgeBaseQuerySource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KnowledgeBaseQuerySource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a KnowledgeBaseQuerySource message. - * @function verify - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - KnowledgeBaseQuerySource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.knowledgeBases != null && message.hasOwnProperty("knowledgeBases")) { - if (!Array.isArray(message.knowledgeBases)) - return "knowledgeBases: array expected"; - for (var i = 0; i < message.knowledgeBases.length; ++i) - if (!$util.isString(message.knowledgeBases[i])) - return "knowledgeBases: string[] expected"; - } - return null; - }; - - /** - * Creates a KnowledgeBaseQuerySource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource} KnowledgeBaseQuerySource - */ - KnowledgeBaseQuerySource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource) - return object; - var message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource(); - if (object.knowledgeBases) { - if (!Array.isArray(object.knowledgeBases)) - throw TypeError(".google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource.knowledgeBases: array expected"); - message.knowledgeBases = []; - for (var i = 0; i < object.knowledgeBases.length; ++i) - message.knowledgeBases[i] = String(object.knowledgeBases[i]); - } - return message; - }; - - /** - * Creates a plain object from a KnowledgeBaseQuerySource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource} message KnowledgeBaseQuerySource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - KnowledgeBaseQuerySource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.knowledgeBases = []; - if (message.knowledgeBases && message.knowledgeBases.length) { - object.knowledgeBases = []; - for (var j = 0; j < message.knowledgeBases.length; ++j) - object.knowledgeBases[j] = message.knowledgeBases[j]; - } - return object; - }; - - /** - * Converts this KnowledgeBaseQuerySource to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource - * @instance - * @returns {Object.} JSON object - */ - KnowledgeBaseQuerySource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for KnowledgeBaseQuerySource - * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - KnowledgeBaseQuerySource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.KnowledgeBaseQuerySource"; - }; - - return KnowledgeBaseQuerySource; - })(); - - SuggestionQueryConfig.DocumentQuerySource = (function() { - - /** - * Properties of a DocumentQuerySource. - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig - * @interface IDocumentQuerySource - * @property {Array.|null} [documents] DocumentQuerySource documents - */ - - /** - * Constructs a new DocumentQuerySource. - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig - * @classdesc Represents a DocumentQuerySource. - * @implements IDocumentQuerySource - * @constructor - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource=} [properties] Properties to set - */ - function DocumentQuerySource(properties) { - this.documents = []; - 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]]; - } - - /** - * DocumentQuerySource documents. - * @member {Array.} documents - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource - * @instance - */ - DocumentQuerySource.prototype.documents = $util.emptyArray; - - /** - * Creates a new DocumentQuerySource instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource} DocumentQuerySource instance - */ - DocumentQuerySource.create = function create(properties) { - return new DocumentQuerySource(properties); - }; - - /** - * Encodes the specified DocumentQuerySource message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource} message DocumentQuerySource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DocumentQuerySource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.documents != null && message.documents.length) - for (var i = 0; i < message.documents.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.documents[i]); - return writer; - }; - - /** - * Encodes the specified DocumentQuerySource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDocumentQuerySource} message DocumentQuerySource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DocumentQuerySource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DocumentQuerySource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource} DocumentQuerySource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DocumentQuerySource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.documents && message.documents.length)) - message.documents = []; - message.documents.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DocumentQuerySource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource} DocumentQuerySource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DocumentQuerySource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DocumentQuerySource message. - * @function verify - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DocumentQuerySource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.documents != null && message.hasOwnProperty("documents")) { - if (!Array.isArray(message.documents)) - return "documents: array expected"; - for (var i = 0; i < message.documents.length; ++i) - if (!$util.isString(message.documents[i])) - return "documents: string[] expected"; - } - return null; - }; - - /** - * Creates a DocumentQuerySource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource} DocumentQuerySource - */ - DocumentQuerySource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource) - return object; - var message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource(); - if (object.documents) { - if (!Array.isArray(object.documents)) - throw TypeError(".google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource.documents: array expected"); - message.documents = []; - for (var i = 0; i < object.documents.length; ++i) - message.documents[i] = String(object.documents[i]); - } - return message; - }; - - /** - * Creates a plain object from a DocumentQuerySource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource} message DocumentQuerySource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DocumentQuerySource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.documents = []; - if (message.documents && message.documents.length) { - object.documents = []; - for (var j = 0; j < message.documents.length; ++j) - object.documents[j] = message.documents[j]; - } - return object; - }; + return message; + }; - /** - * Converts this DocumentQuerySource to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource - * @instance - * @returns {Object.} JSON object - */ - DocumentQuerySource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a TopNMetrics message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics} TopNMetrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TopNMetrics.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Gets the default type url for DocumentQuerySource - * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DocumentQuerySource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DocumentQuerySource"; - }; + /** + * Verifies a TopNMetrics message. + * @function verify + * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TopNMetrics.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.n != null && message.hasOwnProperty("n")) + if (!$util.isInteger(message.n)) + return "n: integer expected"; + if (message.recall != null && message.hasOwnProperty("recall")) + if (typeof message.recall !== "number") + return "recall: number expected"; + return null; + }; - return DocumentQuerySource; - })(); + /** + * Creates a TopNMetrics message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics} TopNMetrics + */ + TopNMetrics.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics) + return object; + var message = new $root.google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics(); + if (object.n != null) + message.n = object.n | 0; + if (object.recall != null) + message.recall = Number(object.recall); + return message; + }; - SuggestionQueryConfig.DialogflowQuerySource = (function() { + /** + * Creates a plain object from a TopNMetrics message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics + * @static + * @param {google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics} message TopNMetrics + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TopNMetrics.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.n = 0; + object.recall = 0; + } + if (message.n != null && message.hasOwnProperty("n")) + object.n = message.n; + if (message.recall != null && message.hasOwnProperty("recall")) + object.recall = options.json && !isFinite(message.recall) ? String(message.recall) : message.recall; + return object; + }; - /** - * Properties of a DialogflowQuerySource. - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig - * @interface IDialogflowQuerySource - * @property {string|null} [agent] DialogflowQuerySource agent - */ + /** + * Converts this TopNMetrics to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics + * @instance + * @returns {Object.} JSON object + */ + TopNMetrics.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new DialogflowQuerySource. - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig - * @classdesc Represents a DialogflowQuerySource. - * @implements IDialogflowQuerySource - * @constructor - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource=} [properties] Properties to set - */ - function DialogflowQuerySource(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]]; + /** + * Gets the default type url for TopNMetrics + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TopNMetrics.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.cloud.dialogflow.v2.SmartReplyMetrics.TopNMetrics"; + }; - /** - * DialogflowQuerySource agent. - * @member {string} agent - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource - * @instance - */ - DialogflowQuerySource.prototype.agent = ""; + return TopNMetrics; + })(); - /** - * Creates a new DialogflowQuerySource instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource} DialogflowQuerySource instance - */ - DialogflowQuerySource.create = function create(properties) { - return new DialogflowQuerySource(properties); - }; + return SmartReplyMetrics; + })(); - /** - * Encodes the specified DialogflowQuerySource message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource} message DialogflowQuerySource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DialogflowQuerySource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.agent != null && Object.hasOwnProperty.call(message, "agent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.agent); - return writer; - }; + v2.CreateConversationModelRequest = (function() { - /** - * Encodes the specified DialogflowQuerySource message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IDialogflowQuerySource} message DialogflowQuerySource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DialogflowQuerySource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Properties of a CreateConversationModelRequest. + * @memberof google.cloud.dialogflow.v2 + * @interface ICreateConversationModelRequest + * @property {string|null} [parent] CreateConversationModelRequest parent + * @property {google.cloud.dialogflow.v2.IConversationModel|null} [conversationModel] CreateConversationModelRequest conversationModel + */ - /** - * Decodes a DialogflowQuerySource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource} DialogflowQuerySource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DialogflowQuerySource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.agent = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Constructs a new CreateConversationModelRequest. + * @memberof google.cloud.dialogflow.v2 + * @classdesc Represents a CreateConversationModelRequest. + * @implements ICreateConversationModelRequest + * @constructor + * @param {google.cloud.dialogflow.v2.ICreateConversationModelRequest=} [properties] Properties to set + */ + function CreateConversationModelRequest(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]]; + } - /** - * Decodes a DialogflowQuerySource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource} DialogflowQuerySource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DialogflowQuerySource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * CreateConversationModelRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2.CreateConversationModelRequest + * @instance + */ + CreateConversationModelRequest.prototype.parent = ""; - /** - * Verifies a DialogflowQuerySource message. - * @function verify - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DialogflowQuerySource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.agent != null && message.hasOwnProperty("agent")) - if (!$util.isString(message.agent)) - return "agent: string expected"; - return null; - }; + /** + * CreateConversationModelRequest conversationModel. + * @member {google.cloud.dialogflow.v2.IConversationModel|null|undefined} conversationModel + * @memberof google.cloud.dialogflow.v2.CreateConversationModelRequest + * @instance + */ + CreateConversationModelRequest.prototype.conversationModel = null; - /** - * Creates a DialogflowQuerySource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource} DialogflowQuerySource - */ - DialogflowQuerySource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource) - return object; - var message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource(); - if (object.agent != null) - message.agent = String(object.agent); - return message; - }; + /** + * Creates a new CreateConversationModelRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2.CreateConversationModelRequest + * @static + * @param {google.cloud.dialogflow.v2.ICreateConversationModelRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.CreateConversationModelRequest} CreateConversationModelRequest instance + */ + CreateConversationModelRequest.create = function create(properties) { + return new CreateConversationModelRequest(properties); + }; - /** - * Creates a plain object from a DialogflowQuerySource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource} message DialogflowQuerySource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DialogflowQuerySource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.agent = ""; - if (message.agent != null && message.hasOwnProperty("agent")) - object.agent = message.agent; - return object; - }; + /** + * Encodes the specified CreateConversationModelRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationModelRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2.CreateConversationModelRequest + * @static + * @param {google.cloud.dialogflow.v2.ICreateConversationModelRequest} message CreateConversationModelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateConversationModelRequest.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.conversationModel != null && Object.hasOwnProperty.call(message, "conversationModel")) + $root.google.cloud.dialogflow.v2.ConversationModel.encode(message.conversationModel, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Converts this DialogflowQuerySource to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource - * @instance - * @returns {Object.} JSON object - */ - DialogflowQuerySource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified CreateConversationModelRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationModelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2.CreateConversationModelRequest + * @static + * @param {google.cloud.dialogflow.v2.ICreateConversationModelRequest} message CreateConversationModelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateConversationModelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Gets the default type url for DialogflowQuerySource - * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DialogflowQuerySource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + /** + * Decodes a CreateConversationModelRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2.CreateConversationModelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2.CreateConversationModelRequest} CreateConversationModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateConversationModelRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.CreateConversationModelRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.DialogflowQuerySource"; - }; + case 2: { + message.conversationModel = $root.google.cloud.dialogflow.v2.ConversationModel.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - return DialogflowQuerySource; - })(); + /** + * Decodes a CreateConversationModelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2.CreateConversationModelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2.CreateConversationModelRequest} CreateConversationModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateConversationModelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - SuggestionQueryConfig.ContextFilterSettings = (function() { + /** + * Verifies a CreateConversationModelRequest message. + * @function verify + * @memberof google.cloud.dialogflow.v2.CreateConversationModelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateConversationModelRequest.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.conversationModel != null && message.hasOwnProperty("conversationModel")) { + var error = $root.google.cloud.dialogflow.v2.ConversationModel.verify(message.conversationModel); + if (error) + return "conversationModel." + error; + } + return null; + }; - /** - * Properties of a ContextFilterSettings. - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig - * @interface IContextFilterSettings - * @property {boolean|null} [dropHandoffMessages] ContextFilterSettings dropHandoffMessages - * @property {boolean|null} [dropVirtualAgentMessages] ContextFilterSettings dropVirtualAgentMessages - * @property {boolean|null} [dropIvrMessages] ContextFilterSettings dropIvrMessages - */ + /** + * Creates a CreateConversationModelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2.CreateConversationModelRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2.CreateConversationModelRequest} CreateConversationModelRequest + */ + CreateConversationModelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.CreateConversationModelRequest) + return object; + var message = new $root.google.cloud.dialogflow.v2.CreateConversationModelRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.conversationModel != null) { + if (typeof object.conversationModel !== "object") + throw TypeError(".google.cloud.dialogflow.v2.CreateConversationModelRequest.conversationModel: object expected"); + message.conversationModel = $root.google.cloud.dialogflow.v2.ConversationModel.fromObject(object.conversationModel); + } + return message; + }; - /** - * Constructs a new ContextFilterSettings. - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig - * @classdesc Represents a ContextFilterSettings. - * @implements IContextFilterSettings - * @constructor - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings=} [properties] Properties to set - */ - function ContextFilterSettings(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]]; - } + /** + * Creates a plain object from a CreateConversationModelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2.CreateConversationModelRequest + * @static + * @param {google.cloud.dialogflow.v2.CreateConversationModelRequest} message CreateConversationModelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateConversationModelRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.conversationModel = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.conversationModel != null && message.hasOwnProperty("conversationModel")) + object.conversationModel = $root.google.cloud.dialogflow.v2.ConversationModel.toObject(message.conversationModel, options); + return object; + }; - /** - * ContextFilterSettings dropHandoffMessages. - * @member {boolean} dropHandoffMessages - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings - * @instance - */ - ContextFilterSettings.prototype.dropHandoffMessages = false; + /** + * Converts this CreateConversationModelRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2.CreateConversationModelRequest + * @instance + * @returns {Object.} JSON object + */ + CreateConversationModelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * ContextFilterSettings dropVirtualAgentMessages. - * @member {boolean} dropVirtualAgentMessages - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings - * @instance - */ - ContextFilterSettings.prototype.dropVirtualAgentMessages = false; + /** + * Gets the default type url for CreateConversationModelRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2.CreateConversationModelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateConversationModelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.v2.CreateConversationModelRequest"; + }; - /** - * ContextFilterSettings dropIvrMessages. - * @member {boolean} dropIvrMessages - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings - * @instance - */ - ContextFilterSettings.prototype.dropIvrMessages = false; + return CreateConversationModelRequest; + })(); - /** - * Creates a new ContextFilterSettings instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings} ContextFilterSettings instance - */ - ContextFilterSettings.create = function create(properties) { - return new ContextFilterSettings(properties); - }; + v2.GetConversationModelRequest = (function() { - /** - * Encodes the specified ContextFilterSettings message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings} message ContextFilterSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContextFilterSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dropHandoffMessages != null && Object.hasOwnProperty.call(message, "dropHandoffMessages")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.dropHandoffMessages); - if (message.dropVirtualAgentMessages != null && Object.hasOwnProperty.call(message, "dropVirtualAgentMessages")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.dropVirtualAgentMessages); - if (message.dropIvrMessages != null && Object.hasOwnProperty.call(message, "dropIvrMessages")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.dropIvrMessages); - return writer; - }; + /** + * Properties of a GetConversationModelRequest. + * @memberof google.cloud.dialogflow.v2 + * @interface IGetConversationModelRequest + * @property {string|null} [name] GetConversationModelRequest name + */ - /** - * Encodes the specified ContextFilterSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.IContextFilterSettings} message ContextFilterSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContextFilterSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Constructs a new GetConversationModelRequest. + * @memberof google.cloud.dialogflow.v2 + * @classdesc Represents a GetConversationModelRequest. + * @implements IGetConversationModelRequest + * @constructor + * @param {google.cloud.dialogflow.v2.IGetConversationModelRequest=} [properties] Properties to set + */ + function GetConversationModelRequest(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]]; + } - /** - * Decodes a ContextFilterSettings message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings} ContextFilterSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContextFilterSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.dropHandoffMessages = reader.bool(); - break; - } - case 2: { - message.dropVirtualAgentMessages = reader.bool(); - break; - } - case 3: { - message.dropIvrMessages = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * GetConversationModelRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2.GetConversationModelRequest + * @instance + */ + GetConversationModelRequest.prototype.name = ""; - /** - * Decodes a ContextFilterSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings} ContextFilterSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContextFilterSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new GetConversationModelRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2.GetConversationModelRequest + * @static + * @param {google.cloud.dialogflow.v2.IGetConversationModelRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.GetConversationModelRequest} GetConversationModelRequest instance + */ + GetConversationModelRequest.create = function create(properties) { + return new GetConversationModelRequest(properties); + }; - /** - * Verifies a ContextFilterSettings message. - * @function verify - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ContextFilterSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dropHandoffMessages != null && message.hasOwnProperty("dropHandoffMessages")) - if (typeof message.dropHandoffMessages !== "boolean") - return "dropHandoffMessages: boolean expected"; - if (message.dropVirtualAgentMessages != null && message.hasOwnProperty("dropVirtualAgentMessages")) - if (typeof message.dropVirtualAgentMessages !== "boolean") - return "dropVirtualAgentMessages: boolean expected"; - if (message.dropIvrMessages != null && message.hasOwnProperty("dropIvrMessages")) - if (typeof message.dropIvrMessages !== "boolean") - return "dropIvrMessages: boolean expected"; - return null; - }; + /** + * Encodes the specified GetConversationModelRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.GetConversationModelRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2.GetConversationModelRequest + * @static + * @param {google.cloud.dialogflow.v2.IGetConversationModelRequest} message GetConversationModelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetConversationModelRequest.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; + }; - /** - * Creates a ContextFilterSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings} ContextFilterSettings - */ - ContextFilterSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings) - return object; - var message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings(); - if (object.dropHandoffMessages != null) - message.dropHandoffMessages = Boolean(object.dropHandoffMessages); - if (object.dropVirtualAgentMessages != null) - message.dropVirtualAgentMessages = Boolean(object.dropVirtualAgentMessages); - if (object.dropIvrMessages != null) - message.dropIvrMessages = Boolean(object.dropIvrMessages); - return message; - }; + /** + * Encodes the specified GetConversationModelRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.GetConversationModelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2.GetConversationModelRequest + * @static + * @param {google.cloud.dialogflow.v2.IGetConversationModelRequest} message GetConversationModelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetConversationModelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from a ContextFilterSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings} message ContextFilterSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ContextFilterSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.dropHandoffMessages = false; - object.dropVirtualAgentMessages = false; - object.dropIvrMessages = false; + /** + * Decodes a GetConversationModelRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2.GetConversationModelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2.GetConversationModelRequest} GetConversationModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetConversationModelRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.GetConversationModelRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; } - if (message.dropHandoffMessages != null && message.hasOwnProperty("dropHandoffMessages")) - object.dropHandoffMessages = message.dropHandoffMessages; - if (message.dropVirtualAgentMessages != null && message.hasOwnProperty("dropVirtualAgentMessages")) - object.dropVirtualAgentMessages = message.dropVirtualAgentMessages; - if (message.dropIvrMessages != null && message.hasOwnProperty("dropIvrMessages")) - object.dropIvrMessages = message.dropIvrMessages; - return object; - }; - - /** - * Converts this ContextFilterSettings to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings - * @instance - * @returns {Object.} JSON object - */ - ContextFilterSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Gets the default type url for ContextFilterSettings - * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ContextFilterSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionQueryConfig.ContextFilterSettings"; - }; + /** + * Decodes a GetConversationModelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2.GetConversationModelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2.GetConversationModelRequest} GetConversationModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetConversationModelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - return ContextFilterSettings; - })(); + /** + * Verifies a GetConversationModelRequest message. + * @function verify + * @memberof google.cloud.dialogflow.v2.GetConversationModelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetConversationModelRequest.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; + }; - return SuggestionQueryConfig; - })(); + /** + * Creates a GetConversationModelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2.GetConversationModelRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2.GetConversationModelRequest} GetConversationModelRequest + */ + GetConversationModelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.GetConversationModelRequest) + return object; + var message = new $root.google.cloud.dialogflow.v2.GetConversationModelRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - HumanAgentAssistantConfig.ConversationModelConfig = (function() { + /** + * Creates a plain object from a GetConversationModelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2.GetConversationModelRequest + * @static + * @param {google.cloud.dialogflow.v2.GetConversationModelRequest} message GetConversationModelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetConversationModelRequest.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; + }; - /** - * Properties of a ConversationModelConfig. - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig - * @interface IConversationModelConfig - * @property {string|null} [model] ConversationModelConfig model - */ + /** + * Converts this GetConversationModelRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2.GetConversationModelRequest + * @instance + * @returns {Object.} JSON object + */ + GetConversationModelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new ConversationModelConfig. - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig - * @classdesc Represents a ConversationModelConfig. - * @implements IConversationModelConfig - * @constructor - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationModelConfig=} [properties] Properties to set - */ - function ConversationModelConfig(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]]; + /** + * Gets the default type url for GetConversationModelRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2.GetConversationModelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetConversationModelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.cloud.dialogflow.v2.GetConversationModelRequest"; + }; - /** - * ConversationModelConfig model. - * @member {string} model - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig - * @instance - */ - ConversationModelConfig.prototype.model = ""; + return GetConversationModelRequest; + })(); + + v2.ListConversationModelsRequest = (function() { + + /** + * Properties of a ListConversationModelsRequest. + * @memberof google.cloud.dialogflow.v2 + * @interface IListConversationModelsRequest + * @property {string|null} [parent] ListConversationModelsRequest parent + * @property {number|null} [pageSize] ListConversationModelsRequest pageSize + * @property {string|null} [pageToken] ListConversationModelsRequest pageToken + */ + + /** + * Constructs a new ListConversationModelsRequest. + * @memberof google.cloud.dialogflow.v2 + * @classdesc Represents a ListConversationModelsRequest. + * @implements IListConversationModelsRequest + * @constructor + * @param {google.cloud.dialogflow.v2.IListConversationModelsRequest=} [properties] Properties to set + */ + function ListConversationModelsRequest(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]]; + } + + /** + * ListConversationModelsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2.ListConversationModelsRequest + * @instance + */ + ListConversationModelsRequest.prototype.parent = ""; + + /** + * ListConversationModelsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.v2.ListConversationModelsRequest + * @instance + */ + ListConversationModelsRequest.prototype.pageSize = 0; + + /** + * ListConversationModelsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.v2.ListConversationModelsRequest + * @instance + */ + ListConversationModelsRequest.prototype.pageToken = ""; - /** - * Creates a new ConversationModelConfig instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationModelConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig} ConversationModelConfig instance - */ - ConversationModelConfig.create = function create(properties) { - return new ConversationModelConfig(properties); - }; + /** + * Creates a new ListConversationModelsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2.ListConversationModelsRequest + * @static + * @param {google.cloud.dialogflow.v2.IListConversationModelsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.ListConversationModelsRequest} ListConversationModelsRequest instance + */ + ListConversationModelsRequest.create = function create(properties) { + return new ListConversationModelsRequest(properties); + }; - /** - * Encodes the specified ConversationModelConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationModelConfig} message ConversationModelConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConversationModelConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.model != null && Object.hasOwnProperty.call(message, "model")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.model); - return writer; - }; + /** + * Encodes the specified ListConversationModelsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationModelsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2.ListConversationModelsRequest + * @static + * @param {google.cloud.dialogflow.v2.IListConversationModelsRequest} message ListConversationModelsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConversationModelsRequest.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); + return writer; + }; - /** - * Encodes the specified ConversationModelConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationModelConfig} message ConversationModelConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConversationModelConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ListConversationModelsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationModelsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2.ListConversationModelsRequest + * @static + * @param {google.cloud.dialogflow.v2.IListConversationModelsRequest} message ListConversationModelsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConversationModelsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a ConversationModelConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig} ConversationModelConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConversationModelConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.model = reader.string(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes a ListConversationModelsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2.ListConversationModelsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2.ListConversationModelsRequest} ListConversationModelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConversationModelsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ListConversationModelsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a ConversationModelConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig} ConversationModelConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConversationModelConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a ConversationModelConfig message. - * @function verify - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConversationModelConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.model != null && message.hasOwnProperty("model")) - if (!$util.isString(message.model)) - return "model: string expected"; - return null; - }; + /** + * Decodes a ListConversationModelsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2.ListConversationModelsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2.ListConversationModelsRequest} ListConversationModelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConversationModelsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a ConversationModelConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig} ConversationModelConfig - */ - ConversationModelConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig) - return object; - var message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig(); - if (object.model != null) - message.model = String(object.model); - return message; - }; + /** + * Verifies a ListConversationModelsRequest message. + * @function verify + * @memberof google.cloud.dialogflow.v2.ListConversationModelsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListConversationModelsRequest.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"; + return null; + }; - /** - * Creates a plain object from a ConversationModelConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig} message ConversationModelConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConversationModelConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.model = ""; - if (message.model != null && message.hasOwnProperty("model")) - object.model = message.model; + /** + * Creates a ListConversationModelsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2.ListConversationModelsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2.ListConversationModelsRequest} ListConversationModelsRequest + */ + ListConversationModelsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.ListConversationModelsRequest) return object; - }; + var message = new $root.google.cloud.dialogflow.v2.ListConversationModelsRequest(); + 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); + return message; + }; - /** - * Converts this ConversationModelConfig to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig - * @instance - * @returns {Object.} JSON object - */ - ConversationModelConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a ListConversationModelsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2.ListConversationModelsRequest + * @static + * @param {google.cloud.dialogflow.v2.ListConversationModelsRequest} message ListConversationModelsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListConversationModelsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + 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; + return object; + }; - /** - * Gets the default type url for ConversationModelConfig - * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConversationModelConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig"; - }; + /** + * Converts this ListConversationModelsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2.ListConversationModelsRequest + * @instance + * @returns {Object.} JSON object + */ + ListConversationModelsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ConversationModelConfig; - })(); + /** + * Gets the default type url for ListConversationModelsRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2.ListConversationModelsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListConversationModelsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.v2.ListConversationModelsRequest"; + }; - HumanAgentAssistantConfig.ConversationProcessConfig = (function() { + return ListConversationModelsRequest; + })(); - /** - * Properties of a ConversationProcessConfig. - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig - * @interface IConversationProcessConfig - * @property {number|null} [recentSentencesCount] ConversationProcessConfig recentSentencesCount - */ + v2.ListConversationModelsResponse = (function() { - /** - * Constructs a new ConversationProcessConfig. - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig - * @classdesc Represents a ConversationProcessConfig. - * @implements IConversationProcessConfig - * @constructor - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationProcessConfig=} [properties] Properties to set - */ - function ConversationProcessConfig(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]]; - } + /** + * Properties of a ListConversationModelsResponse. + * @memberof google.cloud.dialogflow.v2 + * @interface IListConversationModelsResponse + * @property {Array.|null} [conversationModels] ListConversationModelsResponse conversationModels + * @property {string|null} [nextPageToken] ListConversationModelsResponse nextPageToken + */ - /** - * ConversationProcessConfig recentSentencesCount. - * @member {number} recentSentencesCount - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig - * @instance - */ - ConversationProcessConfig.prototype.recentSentencesCount = 0; + /** + * Constructs a new ListConversationModelsResponse. + * @memberof google.cloud.dialogflow.v2 + * @classdesc Represents a ListConversationModelsResponse. + * @implements IListConversationModelsResponse + * @constructor + * @param {google.cloud.dialogflow.v2.IListConversationModelsResponse=} [properties] Properties to set + */ + function ListConversationModelsResponse(properties) { + this.conversationModels = []; + 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]]; + } - /** - * Creates a new ConversationProcessConfig instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationProcessConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig} ConversationProcessConfig instance - */ - ConversationProcessConfig.create = function create(properties) { - return new ConversationProcessConfig(properties); - }; + /** + * ListConversationModelsResponse conversationModels. + * @member {Array.} conversationModels + * @memberof google.cloud.dialogflow.v2.ListConversationModelsResponse + * @instance + */ + ListConversationModelsResponse.prototype.conversationModels = $util.emptyArray; - /** - * Encodes the specified ConversationProcessConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationProcessConfig} message ConversationProcessConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConversationProcessConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.recentSentencesCount != null && Object.hasOwnProperty.call(message, "recentSentencesCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.recentSentencesCount); - return writer; - }; + /** + * ListConversationModelsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.v2.ListConversationModelsResponse + * @instance + */ + ListConversationModelsResponse.prototype.nextPageToken = ""; - /** - * Encodes the specified ConversationProcessConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IConversationProcessConfig} message ConversationProcessConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConversationProcessConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new ListConversationModelsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2.ListConversationModelsResponse + * @static + * @param {google.cloud.dialogflow.v2.IListConversationModelsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.ListConversationModelsResponse} ListConversationModelsResponse instance + */ + ListConversationModelsResponse.create = function create(properties) { + return new ListConversationModelsResponse(properties); + }; - /** - * Decodes a ConversationProcessConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig} ConversationProcessConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConversationProcessConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.recentSentencesCount = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Encodes the specified ListConversationModelsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationModelsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2.ListConversationModelsResponse + * @static + * @param {google.cloud.dialogflow.v2.IListConversationModelsResponse} message ListConversationModelsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConversationModelsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conversationModels != null && message.conversationModels.length) + for (var i = 0; i < message.conversationModels.length; ++i) + $root.google.cloud.dialogflow.v2.ConversationModel.encode(message.conversationModels[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 ListConversationModelsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationModelsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2.ListConversationModelsResponse + * @static + * @param {google.cloud.dialogflow.v2.IListConversationModelsResponse} message ListConversationModelsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConversationModelsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListConversationModelsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2.ListConversationModelsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2.ListConversationModelsResponse} ListConversationModelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConversationModelsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ListConversationModelsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.conversationModels && message.conversationModels.length)) + message.conversationModels = []; + message.conversationModels.push($root.google.cloud.dialogflow.v2.ConversationModel.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a ConversationProcessConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig} ConversationProcessConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConversationProcessConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a ConversationProcessConfig message. - * @function verify - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConversationProcessConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.recentSentencesCount != null && message.hasOwnProperty("recentSentencesCount")) - if (!$util.isInteger(message.recentSentencesCount)) - return "recentSentencesCount: integer expected"; - return null; - }; + /** + * Decodes a ListConversationModelsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2.ListConversationModelsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2.ListConversationModelsResponse} ListConversationModelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConversationModelsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a ConversationProcessConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig} ConversationProcessConfig - */ - ConversationProcessConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig) - return object; - var message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig(); - if (object.recentSentencesCount != null) - message.recentSentencesCount = object.recentSentencesCount | 0; - return message; - }; + /** + * Verifies a ListConversationModelsResponse message. + * @function verify + * @memberof google.cloud.dialogflow.v2.ListConversationModelsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListConversationModelsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.conversationModels != null && message.hasOwnProperty("conversationModels")) { + if (!Array.isArray(message.conversationModels)) + return "conversationModels: array expected"; + for (var i = 0; i < message.conversationModels.length; ++i) { + var error = $root.google.cloud.dialogflow.v2.ConversationModel.verify(message.conversationModels[i]); + if (error) + return "conversationModels." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; - /** - * Creates a plain object from a ConversationProcessConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig} message ConversationProcessConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConversationProcessConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.recentSentencesCount = 0; - if (message.recentSentencesCount != null && message.hasOwnProperty("recentSentencesCount")) - object.recentSentencesCount = message.recentSentencesCount; + /** + * Creates a ListConversationModelsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2.ListConversationModelsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2.ListConversationModelsResponse} ListConversationModelsResponse + */ + ListConversationModelsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.ListConversationModelsResponse) return object; - }; - - /** - * Converts this ConversationProcessConfig to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig - * @instance - * @returns {Object.} JSON object - */ - ConversationProcessConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ConversationProcessConfig - * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConversationProcessConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + var message = new $root.google.cloud.dialogflow.v2.ListConversationModelsResponse(); + if (object.conversationModels) { + if (!Array.isArray(object.conversationModels)) + throw TypeError(".google.cloud.dialogflow.v2.ListConversationModelsResponse.conversationModels: array expected"); + message.conversationModels = []; + for (var i = 0; i < object.conversationModels.length; ++i) { + if (typeof object.conversationModels[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2.ListConversationModelsResponse.conversationModels: object expected"); + message.conversationModels[i] = $root.google.cloud.dialogflow.v2.ConversationModel.fromObject(object.conversationModels[i]); } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig"; - }; - - return ConversationProcessConfig; - })(); + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - HumanAgentAssistantConfig.MessageAnalysisConfig = (function() { + /** + * Creates a plain object from a ListConversationModelsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2.ListConversationModelsResponse + * @static + * @param {google.cloud.dialogflow.v2.ListConversationModelsResponse} message ListConversationModelsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListConversationModelsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.conversationModels = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.conversationModels && message.conversationModels.length) { + object.conversationModels = []; + for (var j = 0; j < message.conversationModels.length; ++j) + object.conversationModels[j] = $root.google.cloud.dialogflow.v2.ConversationModel.toObject(message.conversationModels[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - /** - * Properties of a MessageAnalysisConfig. - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig - * @interface IMessageAnalysisConfig - * @property {boolean|null} [enableEntityExtraction] MessageAnalysisConfig enableEntityExtraction - * @property {boolean|null} [enableSentimentAnalysis] MessageAnalysisConfig enableSentimentAnalysis - */ + /** + * Converts this ListConversationModelsResponse to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2.ListConversationModelsResponse + * @instance + * @returns {Object.} JSON object + */ + ListConversationModelsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new MessageAnalysisConfig. - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig - * @classdesc Represents a MessageAnalysisConfig. - * @implements IMessageAnalysisConfig - * @constructor - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IMessageAnalysisConfig=} [properties] Properties to set - */ - function MessageAnalysisConfig(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]]; + /** + * Gets the default type url for ListConversationModelsResponse + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2.ListConversationModelsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListConversationModelsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.cloud.dialogflow.v2.ListConversationModelsResponse"; + }; - /** - * MessageAnalysisConfig enableEntityExtraction. - * @member {boolean} enableEntityExtraction - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig - * @instance - */ - MessageAnalysisConfig.prototype.enableEntityExtraction = false; - - /** - * MessageAnalysisConfig enableSentimentAnalysis. - * @member {boolean} enableSentimentAnalysis - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig - * @instance - */ - MessageAnalysisConfig.prototype.enableSentimentAnalysis = false; + return ListConversationModelsResponse; + })(); - /** - * Creates a new MessageAnalysisConfig instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IMessageAnalysisConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig} MessageAnalysisConfig instance - */ - MessageAnalysisConfig.create = function create(properties) { - return new MessageAnalysisConfig(properties); - }; + v2.DeleteConversationModelRequest = (function() { - /** - * Encodes the specified MessageAnalysisConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IMessageAnalysisConfig} message MessageAnalysisConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageAnalysisConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enableEntityExtraction != null && Object.hasOwnProperty.call(message, "enableEntityExtraction")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enableEntityExtraction); - if (message.enableSentimentAnalysis != null && Object.hasOwnProperty.call(message, "enableSentimentAnalysis")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.enableSentimentAnalysis); - return writer; - }; + /** + * Properties of a DeleteConversationModelRequest. + * @memberof google.cloud.dialogflow.v2 + * @interface IDeleteConversationModelRequest + * @property {string|null} [name] DeleteConversationModelRequest name + */ - /** - * Encodes the specified MessageAnalysisConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.IMessageAnalysisConfig} message MessageAnalysisConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageAnalysisConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Constructs a new DeleteConversationModelRequest. + * @memberof google.cloud.dialogflow.v2 + * @classdesc Represents a DeleteConversationModelRequest. + * @implements IDeleteConversationModelRequest + * @constructor + * @param {google.cloud.dialogflow.v2.IDeleteConversationModelRequest=} [properties] Properties to set + */ + function DeleteConversationModelRequest(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]]; + } - /** - * Decodes a MessageAnalysisConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig} MessageAnalysisConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageAnalysisConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.enableEntityExtraction = reader.bool(); - break; - } - case 3: { - message.enableSentimentAnalysis = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * DeleteConversationModelRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2.DeleteConversationModelRequest + * @instance + */ + DeleteConversationModelRequest.prototype.name = ""; - /** - * Decodes a MessageAnalysisConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig} MessageAnalysisConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageAnalysisConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new DeleteConversationModelRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2.DeleteConversationModelRequest + * @static + * @param {google.cloud.dialogflow.v2.IDeleteConversationModelRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.DeleteConversationModelRequest} DeleteConversationModelRequest instance + */ + DeleteConversationModelRequest.create = function create(properties) { + return new DeleteConversationModelRequest(properties); + }; - /** - * Verifies a MessageAnalysisConfig message. - * @function verify - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageAnalysisConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enableEntityExtraction != null && message.hasOwnProperty("enableEntityExtraction")) - if (typeof message.enableEntityExtraction !== "boolean") - return "enableEntityExtraction: boolean expected"; - if (message.enableSentimentAnalysis != null && message.hasOwnProperty("enableSentimentAnalysis")) - if (typeof message.enableSentimentAnalysis !== "boolean") - return "enableSentimentAnalysis: boolean expected"; - return null; - }; + /** + * Encodes the specified DeleteConversationModelRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationModelRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2.DeleteConversationModelRequest + * @static + * @param {google.cloud.dialogflow.v2.IDeleteConversationModelRequest} message DeleteConversationModelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteConversationModelRequest.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; + }; - /** - * Creates a MessageAnalysisConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig} MessageAnalysisConfig - */ - MessageAnalysisConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig) - return object; - var message = new $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig(); - if (object.enableEntityExtraction != null) - message.enableEntityExtraction = Boolean(object.enableEntityExtraction); - if (object.enableSentimentAnalysis != null) - message.enableSentimentAnalysis = Boolean(object.enableSentimentAnalysis); - return message; - }; + /** + * Encodes the specified DeleteConversationModelRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationModelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2.DeleteConversationModelRequest + * @static + * @param {google.cloud.dialogflow.v2.IDeleteConversationModelRequest} message DeleteConversationModelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteConversationModelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from a MessageAnalysisConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig} message MessageAnalysisConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageAnalysisConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.enableEntityExtraction = false; - object.enableSentimentAnalysis = false; + /** + * Decodes a DeleteConversationModelRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2.DeleteConversationModelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2.DeleteConversationModelRequest} DeleteConversationModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteConversationModelRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.DeleteConversationModelRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; } - if (message.enableEntityExtraction != null && message.hasOwnProperty("enableEntityExtraction")) - object.enableEntityExtraction = message.enableEntityExtraction; - if (message.enableSentimentAnalysis != null && message.hasOwnProperty("enableSentimentAnalysis")) - object.enableSentimentAnalysis = message.enableSentimentAnalysis; + } + return message; + }; + + /** + * Decodes a DeleteConversationModelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2.DeleteConversationModelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2.DeleteConversationModelRequest} DeleteConversationModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteConversationModelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteConversationModelRequest message. + * @function verify + * @memberof google.cloud.dialogflow.v2.DeleteConversationModelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteConversationModelRequest.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 DeleteConversationModelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2.DeleteConversationModelRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2.DeleteConversationModelRequest} DeleteConversationModelRequest + */ + DeleteConversationModelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.DeleteConversationModelRequest) return object; - }; + var message = new $root.google.cloud.dialogflow.v2.DeleteConversationModelRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Converts this MessageAnalysisConfig to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig - * @instance - * @returns {Object.} JSON object - */ - MessageAnalysisConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a DeleteConversationModelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2.DeleteConversationModelRequest + * @static + * @param {google.cloud.dialogflow.v2.DeleteConversationModelRequest} message DeleteConversationModelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteConversationModelRequest.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; + }; - /** - * Gets the default type url for MessageAnalysisConfig - * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MessageAnalysisConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.HumanAgentAssistantConfig.MessageAnalysisConfig"; - }; + /** + * Converts this DeleteConversationModelRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2.DeleteConversationModelRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteConversationModelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return MessageAnalysisConfig; - })(); + /** + * Gets the default type url for DeleteConversationModelRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2.DeleteConversationModelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteConversationModelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.v2.DeleteConversationModelRequest"; + }; - return HumanAgentAssistantConfig; + return DeleteConversationModelRequest; })(); - v2.HumanAgentHandoffConfig = (function() { + v2.DeployConversationModelRequest = (function() { /** - * Properties of a HumanAgentHandoffConfig. + * Properties of a DeployConversationModelRequest. * @memberof google.cloud.dialogflow.v2 - * @interface IHumanAgentHandoffConfig - * @property {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ILivePersonConfig|null} [livePersonConfig] HumanAgentHandoffConfig livePersonConfig - * @property {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig|null} [salesforceLiveAgentConfig] HumanAgentHandoffConfig salesforceLiveAgentConfig + * @interface IDeployConversationModelRequest + * @property {string|null} [name] DeployConversationModelRequest name */ /** - * Constructs a new HumanAgentHandoffConfig. + * Constructs a new DeployConversationModelRequest. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a HumanAgentHandoffConfig. - * @implements IHumanAgentHandoffConfig + * @classdesc Represents a DeployConversationModelRequest. + * @implements IDeployConversationModelRequest * @constructor - * @param {google.cloud.dialogflow.v2.IHumanAgentHandoffConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.IDeployConversationModelRequest=} [properties] Properties to set */ - function HumanAgentHandoffConfig(properties) { + function DeployConversationModelRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -63479,103 +65421,278 @@ } /** - * HumanAgentHandoffConfig livePersonConfig. - * @member {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ILivePersonConfig|null|undefined} livePersonConfig - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig + * DeployConversationModelRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2.DeployConversationModelRequest * @instance */ - HumanAgentHandoffConfig.prototype.livePersonConfig = null; + DeployConversationModelRequest.prototype.name = ""; /** - * HumanAgentHandoffConfig salesforceLiveAgentConfig. - * @member {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig|null|undefined} salesforceLiveAgentConfig - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig + * Creates a new DeployConversationModelRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2.DeployConversationModelRequest + * @static + * @param {google.cloud.dialogflow.v2.IDeployConversationModelRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.DeployConversationModelRequest} DeployConversationModelRequest instance + */ + DeployConversationModelRequest.create = function create(properties) { + return new DeployConversationModelRequest(properties); + }; + + /** + * Encodes the specified DeployConversationModelRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.DeployConversationModelRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2.DeployConversationModelRequest + * @static + * @param {google.cloud.dialogflow.v2.IDeployConversationModelRequest} message DeployConversationModelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployConversationModelRequest.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 DeployConversationModelRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.DeployConversationModelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2.DeployConversationModelRequest + * @static + * @param {google.cloud.dialogflow.v2.IDeployConversationModelRequest} message DeployConversationModelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeployConversationModelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeployConversationModelRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2.DeployConversationModelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2.DeployConversationModelRequest} DeployConversationModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeployConversationModelRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.DeployConversationModelRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeployConversationModelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2.DeployConversationModelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2.DeployConversationModelRequest} DeployConversationModelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeployConversationModelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeployConversationModelRequest message. + * @function verify + * @memberof google.cloud.dialogflow.v2.DeployConversationModelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeployConversationModelRequest.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 DeployConversationModelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2.DeployConversationModelRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2.DeployConversationModelRequest} DeployConversationModelRequest + */ + DeployConversationModelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.DeployConversationModelRequest) + return object; + var message = new $root.google.cloud.dialogflow.v2.DeployConversationModelRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeployConversationModelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2.DeployConversationModelRequest + * @static + * @param {google.cloud.dialogflow.v2.DeployConversationModelRequest} message DeployConversationModelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeployConversationModelRequest.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 DeployConversationModelRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2.DeployConversationModelRequest * @instance + * @returns {Object.} JSON object */ - HumanAgentHandoffConfig.prototype.salesforceLiveAgentConfig = null; + DeployConversationModelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Gets the default type url for DeployConversationModelRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2.DeployConversationModelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeployConversationModelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.v2.DeployConversationModelRequest"; + }; + + return DeployConversationModelRequest; + })(); + + v2.UndeployConversationModelRequest = (function() { /** - * HumanAgentHandoffConfig agentService. - * @member {"livePersonConfig"|"salesforceLiveAgentConfig"|undefined} agentService - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig + * Properties of an UndeployConversationModelRequest. + * @memberof google.cloud.dialogflow.v2 + * @interface IUndeployConversationModelRequest + * @property {string|null} [name] UndeployConversationModelRequest name + */ + + /** + * Constructs a new UndeployConversationModelRequest. + * @memberof google.cloud.dialogflow.v2 + * @classdesc Represents an UndeployConversationModelRequest. + * @implements IUndeployConversationModelRequest + * @constructor + * @param {google.cloud.dialogflow.v2.IUndeployConversationModelRequest=} [properties] Properties to set + */ + function UndeployConversationModelRequest(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]]; + } + + /** + * UndeployConversationModelRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2.UndeployConversationModelRequest * @instance */ - Object.defineProperty(HumanAgentHandoffConfig.prototype, "agentService", { - get: $util.oneOfGetter($oneOfFields = ["livePersonConfig", "salesforceLiveAgentConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); + UndeployConversationModelRequest.prototype.name = ""; /** - * Creates a new HumanAgentHandoffConfig instance using the specified properties. + * Creates a new UndeployConversationModelRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig + * @memberof google.cloud.dialogflow.v2.UndeployConversationModelRequest * @static - * @param {google.cloud.dialogflow.v2.IHumanAgentHandoffConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.HumanAgentHandoffConfig} HumanAgentHandoffConfig instance + * @param {google.cloud.dialogflow.v2.IUndeployConversationModelRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.UndeployConversationModelRequest} UndeployConversationModelRequest instance */ - HumanAgentHandoffConfig.create = function create(properties) { - return new HumanAgentHandoffConfig(properties); + UndeployConversationModelRequest.create = function create(properties) { + return new UndeployConversationModelRequest(properties); }; /** - * Encodes the specified HumanAgentHandoffConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentHandoffConfig.verify|verify} messages. + * Encodes the specified UndeployConversationModelRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.UndeployConversationModelRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig + * @memberof google.cloud.dialogflow.v2.UndeployConversationModelRequest * @static - * @param {google.cloud.dialogflow.v2.IHumanAgentHandoffConfig} message HumanAgentHandoffConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2.IUndeployConversationModelRequest} message UndeployConversationModelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HumanAgentHandoffConfig.encode = function encode(message, writer) { + UndeployConversationModelRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.livePersonConfig != null && Object.hasOwnProperty.call(message, "livePersonConfig")) - $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig.encode(message.livePersonConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.salesforceLiveAgentConfig != null && Object.hasOwnProperty.call(message, "salesforceLiveAgentConfig")) - $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.encode(message.salesforceLiveAgentConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified HumanAgentHandoffConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentHandoffConfig.verify|verify} messages. + * Encodes the specified UndeployConversationModelRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.UndeployConversationModelRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig + * @memberof google.cloud.dialogflow.v2.UndeployConversationModelRequest * @static - * @param {google.cloud.dialogflow.v2.IHumanAgentHandoffConfig} message HumanAgentHandoffConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2.IUndeployConversationModelRequest} message UndeployConversationModelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HumanAgentHandoffConfig.encodeDelimited = function encodeDelimited(message, writer) { + UndeployConversationModelRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HumanAgentHandoffConfig message from the specified reader or buffer. + * Decodes an UndeployConversationModelRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig + * @memberof google.cloud.dialogflow.v2.UndeployConversationModelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.HumanAgentHandoffConfig} HumanAgentHandoffConfig + * @returns {google.cloud.dialogflow.v2.UndeployConversationModelRequest} UndeployConversationModelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HumanAgentHandoffConfig.decode = function decode(reader, length) { + UndeployConversationModelRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.UndeployConversationModelRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.livePersonConfig = $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig.decode(reader, reader.uint32()); - break; - } - case 2: { - message.salesforceLiveAgentConfig = $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.decode(reader, reader.uint32()); + message.name = reader.string(); break; } default: @@ -63587,629 +65704,577 @@ }; /** - * Decodes a HumanAgentHandoffConfig message from the specified reader or buffer, length delimited. + * Decodes an UndeployConversationModelRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig + * @memberof google.cloud.dialogflow.v2.UndeployConversationModelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.HumanAgentHandoffConfig} HumanAgentHandoffConfig + * @returns {google.cloud.dialogflow.v2.UndeployConversationModelRequest} UndeployConversationModelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HumanAgentHandoffConfig.decodeDelimited = function decodeDelimited(reader) { + UndeployConversationModelRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HumanAgentHandoffConfig message. + * Verifies an UndeployConversationModelRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig + * @memberof google.cloud.dialogflow.v2.UndeployConversationModelRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - HumanAgentHandoffConfig.verify = function verify(message) { + UndeployConversationModelRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.livePersonConfig != null && message.hasOwnProperty("livePersonConfig")) { - properties.agentService = 1; - { - var error = $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig.verify(message.livePersonConfig); - if (error) - return "livePersonConfig." + error; - } - } - if (message.salesforceLiveAgentConfig != null && message.hasOwnProperty("salesforceLiveAgentConfig")) { - if (properties.agentService === 1) - return "agentService: multiple values"; - properties.agentService = 1; - { - var error = $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.verify(message.salesforceLiveAgentConfig); - if (error) - return "salesforceLiveAgentConfig." + error; - } - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a HumanAgentHandoffConfig message from a plain object. Also converts values to their respective internal types. + * Creates an UndeployConversationModelRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig + * @memberof google.cloud.dialogflow.v2.UndeployConversationModelRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.HumanAgentHandoffConfig} HumanAgentHandoffConfig + * @returns {google.cloud.dialogflow.v2.UndeployConversationModelRequest} UndeployConversationModelRequest */ - HumanAgentHandoffConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig) + UndeployConversationModelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.UndeployConversationModelRequest) return object; - var message = new $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig(); - if (object.livePersonConfig != null) { - if (typeof object.livePersonConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2.HumanAgentHandoffConfig.livePersonConfig: object expected"); - message.livePersonConfig = $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig.fromObject(object.livePersonConfig); - } - if (object.salesforceLiveAgentConfig != null) { - if (typeof object.salesforceLiveAgentConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2.HumanAgentHandoffConfig.salesforceLiveAgentConfig: object expected"); - message.salesforceLiveAgentConfig = $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.fromObject(object.salesforceLiveAgentConfig); - } + var message = new $root.google.cloud.dialogflow.v2.UndeployConversationModelRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a HumanAgentHandoffConfig message. Also converts values to other types if specified. + * Creates a plain object from an UndeployConversationModelRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig + * @memberof google.cloud.dialogflow.v2.UndeployConversationModelRequest * @static - * @param {google.cloud.dialogflow.v2.HumanAgentHandoffConfig} message HumanAgentHandoffConfig + * @param {google.cloud.dialogflow.v2.UndeployConversationModelRequest} message UndeployConversationModelRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HumanAgentHandoffConfig.toObject = function toObject(message, options) { + UndeployConversationModelRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.livePersonConfig != null && message.hasOwnProperty("livePersonConfig")) { - object.livePersonConfig = $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig.toObject(message.livePersonConfig, options); - if (options.oneofs) - object.agentService = "livePersonConfig"; - } - if (message.salesforceLiveAgentConfig != null && message.hasOwnProperty("salesforceLiveAgentConfig")) { - object.salesforceLiveAgentConfig = $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.toObject(message.salesforceLiveAgentConfig, options); - if (options.oneofs) - object.agentService = "salesforceLiveAgentConfig"; - } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this HumanAgentHandoffConfig to JSON. + * Converts this UndeployConversationModelRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig + * @memberof google.cloud.dialogflow.v2.UndeployConversationModelRequest * @instance * @returns {Object.} JSON object */ - HumanAgentHandoffConfig.prototype.toJSON = function toJSON() { + UndeployConversationModelRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for HumanAgentHandoffConfig + * Gets the default type url for UndeployConversationModelRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig + * @memberof google.cloud.dialogflow.v2.UndeployConversationModelRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - HumanAgentHandoffConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UndeployConversationModelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.HumanAgentHandoffConfig"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.UndeployConversationModelRequest"; }; - HumanAgentHandoffConfig.LivePersonConfig = (function() { + return UndeployConversationModelRequest; + })(); - /** - * Properties of a LivePersonConfig. - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig - * @interface ILivePersonConfig - * @property {string|null} [accountNumber] LivePersonConfig accountNumber - */ + v2.GetConversationModelEvaluationRequest = (function() { - /** - * Constructs a new LivePersonConfig. - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig - * @classdesc Represents a LivePersonConfig. - * @implements ILivePersonConfig - * @constructor - * @param {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ILivePersonConfig=} [properties] Properties to set - */ - function LivePersonConfig(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]]; - } + /** + * Properties of a GetConversationModelEvaluationRequest. + * @memberof google.cloud.dialogflow.v2 + * @interface IGetConversationModelEvaluationRequest + * @property {string|null} [name] GetConversationModelEvaluationRequest name + */ - /** - * LivePersonConfig accountNumber. - * @member {string} accountNumber - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig - * @instance - */ - LivePersonConfig.prototype.accountNumber = ""; + /** + * Constructs a new GetConversationModelEvaluationRequest. + * @memberof google.cloud.dialogflow.v2 + * @classdesc Represents a GetConversationModelEvaluationRequest. + * @implements IGetConversationModelEvaluationRequest + * @constructor + * @param {google.cloud.dialogflow.v2.IGetConversationModelEvaluationRequest=} [properties] Properties to set + */ + function GetConversationModelEvaluationRequest(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]]; + } - /** - * Creates a new LivePersonConfig instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ILivePersonConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig} LivePersonConfig instance - */ - LivePersonConfig.create = function create(properties) { - return new LivePersonConfig(properties); - }; + /** + * GetConversationModelEvaluationRequest name. + * @member {string} name + * @memberof google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest + * @instance + */ + GetConversationModelEvaluationRequest.prototype.name = ""; - /** - * Encodes the specified LivePersonConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ILivePersonConfig} message LivePersonConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LivePersonConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.accountNumber != null && Object.hasOwnProperty.call(message, "accountNumber")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.accountNumber); - return writer; - }; + /** + * Creates a new GetConversationModelEvaluationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest + * @static + * @param {google.cloud.dialogflow.v2.IGetConversationModelEvaluationRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest} GetConversationModelEvaluationRequest instance + */ + GetConversationModelEvaluationRequest.create = function create(properties) { + return new GetConversationModelEvaluationRequest(properties); + }; - /** - * Encodes the specified LivePersonConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ILivePersonConfig} message LivePersonConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LivePersonConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified GetConversationModelEvaluationRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest + * @static + * @param {google.cloud.dialogflow.v2.IGetConversationModelEvaluationRequest} message GetConversationModelEvaluationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetConversationModelEvaluationRequest.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; + }; - /** - * Decodes a LivePersonConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig} LivePersonConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LivePersonConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.accountNumber = reader.string(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Encodes the specified GetConversationModelEvaluationRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest + * @static + * @param {google.cloud.dialogflow.v2.IGetConversationModelEvaluationRequest} message GetConversationModelEvaluationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetConversationModelEvaluationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetConversationModelEvaluationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest} GetConversationModelEvaluationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetConversationModelEvaluationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a LivePersonConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig} LivePersonConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LivePersonConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a LivePersonConfig message. - * @function verify - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LivePersonConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.accountNumber != null && message.hasOwnProperty("accountNumber")) - if (!$util.isString(message.accountNumber)) - return "accountNumber: string expected"; - return null; - }; + /** + * Decodes a GetConversationModelEvaluationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest} GetConversationModelEvaluationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetConversationModelEvaluationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a LivePersonConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig} LivePersonConfig - */ - LivePersonConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig) - return object; - var message = new $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig(); - if (object.accountNumber != null) - message.accountNumber = String(object.accountNumber); - return message; - }; + /** + * Verifies a GetConversationModelEvaluationRequest message. + * @function verify + * @memberof google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetConversationModelEvaluationRequest.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 plain object from a LivePersonConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig} message LivePersonConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LivePersonConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.accountNumber = ""; - if (message.accountNumber != null && message.hasOwnProperty("accountNumber")) - object.accountNumber = message.accountNumber; + /** + * Creates a GetConversationModelEvaluationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest} GetConversationModelEvaluationRequest + */ + GetConversationModelEvaluationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest) return object; - }; - - /** - * Converts this LivePersonConfig to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig - * @instance - * @returns {Object.} JSON object - */ - LivePersonConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + var message = new $root.google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Gets the default type url for LivePersonConfig - * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LivePersonConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig"; - }; + /** + * Creates a plain object from a GetConversationModelEvaluationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest + * @static + * @param {google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest} message GetConversationModelEvaluationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetConversationModelEvaluationRequest.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; + }; - return LivePersonConfig; - })(); + /** + * Converts this GetConversationModelEvaluationRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest + * @instance + * @returns {Object.} JSON object + */ + GetConversationModelEvaluationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - HumanAgentHandoffConfig.SalesforceLiveAgentConfig = (function() { + /** + * Gets the default type url for GetConversationModelEvaluationRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetConversationModelEvaluationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.v2.GetConversationModelEvaluationRequest"; + }; - /** - * Properties of a SalesforceLiveAgentConfig. - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig - * @interface ISalesforceLiveAgentConfig - * @property {string|null} [organizationId] SalesforceLiveAgentConfig organizationId - * @property {string|null} [deploymentId] SalesforceLiveAgentConfig deploymentId - * @property {string|null} [buttonId] SalesforceLiveAgentConfig buttonId - * @property {string|null} [endpointDomain] SalesforceLiveAgentConfig endpointDomain - */ + return GetConversationModelEvaluationRequest; + })(); - /** - * Constructs a new SalesforceLiveAgentConfig. - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig - * @classdesc Represents a SalesforceLiveAgentConfig. - * @implements ISalesforceLiveAgentConfig - * @constructor - * @param {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig=} [properties] Properties to set - */ - function SalesforceLiveAgentConfig(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]]; - } + v2.ListConversationModelEvaluationsRequest = (function() { - /** - * SalesforceLiveAgentConfig organizationId. - * @member {string} organizationId - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig - * @instance - */ - SalesforceLiveAgentConfig.prototype.organizationId = ""; + /** + * Properties of a ListConversationModelEvaluationsRequest. + * @memberof google.cloud.dialogflow.v2 + * @interface IListConversationModelEvaluationsRequest + * @property {string|null} [parent] ListConversationModelEvaluationsRequest parent + * @property {number|null} [pageSize] ListConversationModelEvaluationsRequest pageSize + * @property {string|null} [pageToken] ListConversationModelEvaluationsRequest pageToken + */ - /** - * SalesforceLiveAgentConfig deploymentId. - * @member {string} deploymentId - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig - * @instance - */ - SalesforceLiveAgentConfig.prototype.deploymentId = ""; + /** + * Constructs a new ListConversationModelEvaluationsRequest. + * @memberof google.cloud.dialogflow.v2 + * @classdesc Represents a ListConversationModelEvaluationsRequest. + * @implements IListConversationModelEvaluationsRequest + * @constructor + * @param {google.cloud.dialogflow.v2.IListConversationModelEvaluationsRequest=} [properties] Properties to set + */ + function ListConversationModelEvaluationsRequest(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]]; + } - /** - * SalesforceLiveAgentConfig buttonId. - * @member {string} buttonId - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig - * @instance - */ - SalesforceLiveAgentConfig.prototype.buttonId = ""; + /** + * ListConversationModelEvaluationsRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest + * @instance + */ + ListConversationModelEvaluationsRequest.prototype.parent = ""; - /** - * SalesforceLiveAgentConfig endpointDomain. - * @member {string} endpointDomain - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig - * @instance - */ - SalesforceLiveAgentConfig.prototype.endpointDomain = ""; + /** + * ListConversationModelEvaluationsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest + * @instance + */ + ListConversationModelEvaluationsRequest.prototype.pageSize = 0; - /** - * Creates a new SalesforceLiveAgentConfig instance using the specified properties. - * @function create - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig} SalesforceLiveAgentConfig instance - */ - SalesforceLiveAgentConfig.create = function create(properties) { - return new SalesforceLiveAgentConfig(properties); - }; + /** + * ListConversationModelEvaluationsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest + * @instance + */ + ListConversationModelEvaluationsRequest.prototype.pageToken = ""; - /** - * Encodes the specified SalesforceLiveAgentConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig} message SalesforceLiveAgentConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SalesforceLiveAgentConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.organizationId != null && Object.hasOwnProperty.call(message, "organizationId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.organizationId); - if (message.deploymentId != null && Object.hasOwnProperty.call(message, "deploymentId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.deploymentId); - if (message.buttonId != null && Object.hasOwnProperty.call(message, "buttonId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.buttonId); - if (message.endpointDomain != null && Object.hasOwnProperty.call(message, "endpointDomain")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.endpointDomain); - return writer; - }; + /** + * Creates a new ListConversationModelEvaluationsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest + * @static + * @param {google.cloud.dialogflow.v2.IListConversationModelEvaluationsRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest} ListConversationModelEvaluationsRequest instance + */ + ListConversationModelEvaluationsRequest.create = function create(properties) { + return new ListConversationModelEvaluationsRequest(properties); + }; - /** - * Encodes the specified SalesforceLiveAgentConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.ISalesforceLiveAgentConfig} message SalesforceLiveAgentConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SalesforceLiveAgentConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ListConversationModelEvaluationsRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest + * @static + * @param {google.cloud.dialogflow.v2.IListConversationModelEvaluationsRequest} message ListConversationModelEvaluationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConversationModelEvaluationsRequest.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); + return writer; + }; - /** - * Decodes a SalesforceLiveAgentConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig} SalesforceLiveAgentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SalesforceLiveAgentConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.organizationId = reader.string(); - break; - } - case 2: { - message.deploymentId = reader.string(); - break; - } - case 3: { - message.buttonId = reader.string(); - break; - } - case 4: { - message.endpointDomain = reader.string(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Encodes the specified ListConversationModelEvaluationsRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest + * @static + * @param {google.cloud.dialogflow.v2.IListConversationModelEvaluationsRequest} message ListConversationModelEvaluationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConversationModelEvaluationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListConversationModelEvaluationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest} ListConversationModelEvaluationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConversationModelEvaluationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a SalesforceLiveAgentConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig} SalesforceLiveAgentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SalesforceLiveAgentConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a SalesforceLiveAgentConfig message. - * @function verify - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SalesforceLiveAgentConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.organizationId != null && message.hasOwnProperty("organizationId")) - if (!$util.isString(message.organizationId)) - return "organizationId: string expected"; - if (message.deploymentId != null && message.hasOwnProperty("deploymentId")) - if (!$util.isString(message.deploymentId)) - return "deploymentId: string expected"; - if (message.buttonId != null && message.hasOwnProperty("buttonId")) - if (!$util.isString(message.buttonId)) - return "buttonId: string expected"; - if (message.endpointDomain != null && message.hasOwnProperty("endpointDomain")) - if (!$util.isString(message.endpointDomain)) - return "endpointDomain: string expected"; - return null; - }; + /** + * Decodes a ListConversationModelEvaluationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest} ListConversationModelEvaluationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConversationModelEvaluationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a SalesforceLiveAgentConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig} SalesforceLiveAgentConfig - */ - SalesforceLiveAgentConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig) - return object; - var message = new $root.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig(); - if (object.organizationId != null) - message.organizationId = String(object.organizationId); - if (object.deploymentId != null) - message.deploymentId = String(object.deploymentId); - if (object.buttonId != null) - message.buttonId = String(object.buttonId); - if (object.endpointDomain != null) - message.endpointDomain = String(object.endpointDomain); - return message; - }; + /** + * Verifies a ListConversationModelEvaluationsRequest message. + * @function verify + * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListConversationModelEvaluationsRequest.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"; + return null; + }; - /** - * Creates a plain object from a SalesforceLiveAgentConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig - * @static - * @param {google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig} message SalesforceLiveAgentConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SalesforceLiveAgentConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.organizationId = ""; - object.deploymentId = ""; - object.buttonId = ""; - object.endpointDomain = ""; - } - if (message.organizationId != null && message.hasOwnProperty("organizationId")) - object.organizationId = message.organizationId; - if (message.deploymentId != null && message.hasOwnProperty("deploymentId")) - object.deploymentId = message.deploymentId; - if (message.buttonId != null && message.hasOwnProperty("buttonId")) - object.buttonId = message.buttonId; - if (message.endpointDomain != null && message.hasOwnProperty("endpointDomain")) - object.endpointDomain = message.endpointDomain; + /** + * Creates a ListConversationModelEvaluationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest} ListConversationModelEvaluationsRequest + */ + ListConversationModelEvaluationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest) return object; - }; + var message = new $root.google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest(); + 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); + return message; + }; - /** - * Converts this SalesforceLiveAgentConfig to JSON. - * @function toJSON - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig - * @instance - * @returns {Object.} JSON object - */ - SalesforceLiveAgentConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a ListConversationModelEvaluationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest + * @static + * @param {google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest} message ListConversationModelEvaluationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListConversationModelEvaluationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + 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; + return object; + }; - /** - * Gets the default type url for SalesforceLiveAgentConfig - * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SalesforceLiveAgentConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig"; - }; + /** + * Converts this ListConversationModelEvaluationsRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListConversationModelEvaluationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return SalesforceLiveAgentConfig; - })(); + /** + * Gets the default type url for ListConversationModelEvaluationsRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListConversationModelEvaluationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.v2.ListConversationModelEvaluationsRequest"; + }; - return HumanAgentHandoffConfig; + return ListConversationModelEvaluationsRequest; })(); - v2.NotificationConfig = (function() { + v2.ListConversationModelEvaluationsResponse = (function() { /** - * Properties of a NotificationConfig. + * Properties of a ListConversationModelEvaluationsResponse. * @memberof google.cloud.dialogflow.v2 - * @interface INotificationConfig - * @property {string|null} [topic] NotificationConfig topic - * @property {google.cloud.dialogflow.v2.NotificationConfig.MessageFormat|null} [messageFormat] NotificationConfig messageFormat + * @interface IListConversationModelEvaluationsResponse + * @property {Array.|null} [conversationModelEvaluations] ListConversationModelEvaluationsResponse conversationModelEvaluations + * @property {string|null} [nextPageToken] ListConversationModelEvaluationsResponse nextPageToken */ /** - * Constructs a new NotificationConfig. + * Constructs a new ListConversationModelEvaluationsResponse. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a NotificationConfig. - * @implements INotificationConfig + * @classdesc Represents a ListConversationModelEvaluationsResponse. + * @implements IListConversationModelEvaluationsResponse * @constructor - * @param {google.cloud.dialogflow.v2.INotificationConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.IListConversationModelEvaluationsResponse=} [properties] Properties to set */ - function NotificationConfig(properties) { + function ListConversationModelEvaluationsResponse(properties) { + this.conversationModelEvaluations = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -64217,89 +66282,92 @@ } /** - * NotificationConfig topic. - * @member {string} topic - * @memberof google.cloud.dialogflow.v2.NotificationConfig + * ListConversationModelEvaluationsResponse conversationModelEvaluations. + * @member {Array.} conversationModelEvaluations + * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse * @instance */ - NotificationConfig.prototype.topic = ""; + ListConversationModelEvaluationsResponse.prototype.conversationModelEvaluations = $util.emptyArray; /** - * NotificationConfig messageFormat. - * @member {google.cloud.dialogflow.v2.NotificationConfig.MessageFormat} messageFormat - * @memberof google.cloud.dialogflow.v2.NotificationConfig + * ListConversationModelEvaluationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse * @instance */ - NotificationConfig.prototype.messageFormat = 0; + ListConversationModelEvaluationsResponse.prototype.nextPageToken = ""; /** - * Creates a new NotificationConfig instance using the specified properties. + * Creates a new ListConversationModelEvaluationsResponse instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.NotificationConfig + * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse * @static - * @param {google.cloud.dialogflow.v2.INotificationConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.NotificationConfig} NotificationConfig instance + * @param {google.cloud.dialogflow.v2.IListConversationModelEvaluationsResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse} ListConversationModelEvaluationsResponse instance */ - NotificationConfig.create = function create(properties) { - return new NotificationConfig(properties); + ListConversationModelEvaluationsResponse.create = function create(properties) { + return new ListConversationModelEvaluationsResponse(properties); }; /** - * Encodes the specified NotificationConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.NotificationConfig.verify|verify} messages. + * Encodes the specified ListConversationModelEvaluationsResponse message. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.NotificationConfig + * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse * @static - * @param {google.cloud.dialogflow.v2.INotificationConfig} message NotificationConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2.IListConversationModelEvaluationsResponse} message ListConversationModelEvaluationsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NotificationConfig.encode = function encode(message, writer) { + ListConversationModelEvaluationsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.topic); - if (message.messageFormat != null && Object.hasOwnProperty.call(message, "messageFormat")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.messageFormat); + if (message.conversationModelEvaluations != null && message.conversationModelEvaluations.length) + for (var i = 0; i < message.conversationModelEvaluations.length; ++i) + $root.google.cloud.dialogflow.v2.ConversationModelEvaluation.encode(message.conversationModelEvaluations[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 NotificationConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.NotificationConfig.verify|verify} messages. + * Encodes the specified ListConversationModelEvaluationsResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.NotificationConfig + * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse * @static - * @param {google.cloud.dialogflow.v2.INotificationConfig} message NotificationConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2.IListConversationModelEvaluationsResponse} message ListConversationModelEvaluationsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NotificationConfig.encodeDelimited = function encodeDelimited(message, writer) { + ListConversationModelEvaluationsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NotificationConfig message from the specified reader or buffer. + * Decodes a ListConversationModelEvaluationsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.NotificationConfig + * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.NotificationConfig} NotificationConfig + * @returns {google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse} ListConversationModelEvaluationsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NotificationConfig.decode = function decode(reader, length) { + ListConversationModelEvaluationsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.NotificationConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.topic = reader.string(); + if (!(message.conversationModelEvaluations && message.conversationModelEvaluations.length)) + message.conversationModelEvaluations = []; + message.conversationModelEvaluations.push($root.google.cloud.dialogflow.v2.ConversationModelEvaluation.decode(reader, reader.uint32())); break; } case 2: { - message.messageFormat = reader.int32(); + message.nextPageToken = reader.string(); break; } default: @@ -64311,171 +66379,149 @@ }; /** - * Decodes a NotificationConfig message from the specified reader or buffer, length delimited. + * Decodes a ListConversationModelEvaluationsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.NotificationConfig + * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.NotificationConfig} NotificationConfig + * @returns {google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse} ListConversationModelEvaluationsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NotificationConfig.decodeDelimited = function decodeDelimited(reader) { + ListConversationModelEvaluationsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NotificationConfig message. + * Verifies a ListConversationModelEvaluationsResponse message. * @function verify - * @memberof google.cloud.dialogflow.v2.NotificationConfig + * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NotificationConfig.verify = function verify(message) { + ListConversationModelEvaluationsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.topic != null && message.hasOwnProperty("topic")) - if (!$util.isString(message.topic)) - return "topic: string expected"; - if (message.messageFormat != null && message.hasOwnProperty("messageFormat")) - switch (message.messageFormat) { - default: - return "messageFormat: enum value expected"; - case 0: - case 1: - case 2: - break; + if (message.conversationModelEvaluations != null && message.hasOwnProperty("conversationModelEvaluations")) { + if (!Array.isArray(message.conversationModelEvaluations)) + return "conversationModelEvaluations: array expected"; + for (var i = 0; i < message.conversationModelEvaluations.length; ++i) { + var error = $root.google.cloud.dialogflow.v2.ConversationModelEvaluation.verify(message.conversationModelEvaluations[i]); + if (error) + return "conversationModelEvaluations." + error; } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a NotificationConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ListConversationModelEvaluationsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.NotificationConfig + * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.NotificationConfig} NotificationConfig + * @returns {google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse} ListConversationModelEvaluationsResponse */ - NotificationConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.NotificationConfig) + ListConversationModelEvaluationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse) return object; - var message = new $root.google.cloud.dialogflow.v2.NotificationConfig(); - if (object.topic != null) - message.topic = String(object.topic); - switch (object.messageFormat) { - default: - if (typeof object.messageFormat === "number") { - message.messageFormat = object.messageFormat; - break; + var message = new $root.google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse(); + if (object.conversationModelEvaluations) { + if (!Array.isArray(object.conversationModelEvaluations)) + throw TypeError(".google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse.conversationModelEvaluations: array expected"); + message.conversationModelEvaluations = []; + for (var i = 0; i < object.conversationModelEvaluations.length; ++i) { + if (typeof object.conversationModelEvaluations[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse.conversationModelEvaluations: object expected"); + message.conversationModelEvaluations[i] = $root.google.cloud.dialogflow.v2.ConversationModelEvaluation.fromObject(object.conversationModelEvaluations[i]); } - break; - case "MESSAGE_FORMAT_UNSPECIFIED": - case 0: - message.messageFormat = 0; - break; - case "PROTO": - case 1: - message.messageFormat = 1; - break; - case "JSON": - case 2: - message.messageFormat = 2; - break; } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a NotificationConfig message. Also converts values to other types if specified. + * Creates a plain object from a ListConversationModelEvaluationsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.NotificationConfig + * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse * @static - * @param {google.cloud.dialogflow.v2.NotificationConfig} message NotificationConfig + * @param {google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse} message ListConversationModelEvaluationsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NotificationConfig.toObject = function toObject(message, options) { + ListConversationModelEvaluationsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.topic = ""; - object.messageFormat = options.enums === String ? "MESSAGE_FORMAT_UNSPECIFIED" : 0; + if (options.arrays || options.defaults) + object.conversationModelEvaluations = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.conversationModelEvaluations && message.conversationModelEvaluations.length) { + object.conversationModelEvaluations = []; + for (var j = 0; j < message.conversationModelEvaluations.length; ++j) + object.conversationModelEvaluations[j] = $root.google.cloud.dialogflow.v2.ConversationModelEvaluation.toObject(message.conversationModelEvaluations[j], options); } - if (message.topic != null && message.hasOwnProperty("topic")) - object.topic = message.topic; - if (message.messageFormat != null && message.hasOwnProperty("messageFormat")) - object.messageFormat = options.enums === String ? $root.google.cloud.dialogflow.v2.NotificationConfig.MessageFormat[message.messageFormat] === undefined ? message.messageFormat : $root.google.cloud.dialogflow.v2.NotificationConfig.MessageFormat[message.messageFormat] : message.messageFormat; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this NotificationConfig to JSON. + * Converts this ListConversationModelEvaluationsResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.NotificationConfig + * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse * @instance * @returns {Object.} JSON object */ - NotificationConfig.prototype.toJSON = function toJSON() { + ListConversationModelEvaluationsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for NotificationConfig + * Gets the default type url for ListConversationModelEvaluationsResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.NotificationConfig + * @memberof google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - NotificationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListConversationModelEvaluationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.NotificationConfig"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.ListConversationModelEvaluationsResponse"; }; - /** - * MessageFormat enum. - * @name google.cloud.dialogflow.v2.NotificationConfig.MessageFormat - * @enum {number} - * @property {number} MESSAGE_FORMAT_UNSPECIFIED=0 MESSAGE_FORMAT_UNSPECIFIED value - * @property {number} PROTO=1 PROTO value - * @property {number} JSON=2 JSON value - */ - NotificationConfig.MessageFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MESSAGE_FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "PROTO"] = 1; - values[valuesById[2] = "JSON"] = 2; - return values; - })(); - - return NotificationConfig; + return ListConversationModelEvaluationsResponse; })(); - v2.LoggingConfig = (function() { + v2.CreateConversationModelEvaluationRequest = (function() { /** - * Properties of a LoggingConfig. + * Properties of a CreateConversationModelEvaluationRequest. * @memberof google.cloud.dialogflow.v2 - * @interface ILoggingConfig - * @property {boolean|null} [enableStackdriverLogging] LoggingConfig enableStackdriverLogging + * @interface ICreateConversationModelEvaluationRequest + * @property {string|null} [parent] CreateConversationModelEvaluationRequest parent + * @property {google.cloud.dialogflow.v2.IConversationModelEvaluation|null} [conversationModelEvaluation] CreateConversationModelEvaluationRequest conversationModelEvaluation */ /** - * Constructs a new LoggingConfig. + * Constructs a new CreateConversationModelEvaluationRequest. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a LoggingConfig. - * @implements ILoggingConfig + * @classdesc Represents a CreateConversationModelEvaluationRequest. + * @implements ICreateConversationModelEvaluationRequest * @constructor - * @param {google.cloud.dialogflow.v2.ILoggingConfig=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.ICreateConversationModelEvaluationRequest=} [properties] Properties to set */ - function LoggingConfig(properties) { + function CreateConversationModelEvaluationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -64483,75 +66529,89 @@ } /** - * LoggingConfig enableStackdriverLogging. - * @member {boolean} enableStackdriverLogging - * @memberof google.cloud.dialogflow.v2.LoggingConfig + * CreateConversationModelEvaluationRequest parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest * @instance */ - LoggingConfig.prototype.enableStackdriverLogging = false; + CreateConversationModelEvaluationRequest.prototype.parent = ""; /** - * Creates a new LoggingConfig instance using the specified properties. + * CreateConversationModelEvaluationRequest conversationModelEvaluation. + * @member {google.cloud.dialogflow.v2.IConversationModelEvaluation|null|undefined} conversationModelEvaluation + * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest + * @instance + */ + CreateConversationModelEvaluationRequest.prototype.conversationModelEvaluation = null; + + /** + * Creates a new CreateConversationModelEvaluationRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.LoggingConfig + * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest * @static - * @param {google.cloud.dialogflow.v2.ILoggingConfig=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.LoggingConfig} LoggingConfig instance + * @param {google.cloud.dialogflow.v2.ICreateConversationModelEvaluationRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest} CreateConversationModelEvaluationRequest instance */ - LoggingConfig.create = function create(properties) { - return new LoggingConfig(properties); + CreateConversationModelEvaluationRequest.create = function create(properties) { + return new CreateConversationModelEvaluationRequest(properties); }; /** - * Encodes the specified LoggingConfig message. Does not implicitly {@link google.cloud.dialogflow.v2.LoggingConfig.verify|verify} messages. + * Encodes the specified CreateConversationModelEvaluationRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.LoggingConfig + * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest * @static - * @param {google.cloud.dialogflow.v2.ILoggingConfig} message LoggingConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2.ICreateConversationModelEvaluationRequest} message CreateConversationModelEvaluationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LoggingConfig.encode = function encode(message, writer) { + CreateConversationModelEvaluationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.enableStackdriverLogging != null && Object.hasOwnProperty.call(message, "enableStackdriverLogging")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.enableStackdriverLogging); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.conversationModelEvaluation != null && Object.hasOwnProperty.call(message, "conversationModelEvaluation")) + $root.google.cloud.dialogflow.v2.ConversationModelEvaluation.encode(message.conversationModelEvaluation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified LoggingConfig message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.LoggingConfig.verify|verify} messages. + * Encodes the specified CreateConversationModelEvaluationRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.LoggingConfig + * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest * @static - * @param {google.cloud.dialogflow.v2.ILoggingConfig} message LoggingConfig message or plain object to encode + * @param {google.cloud.dialogflow.v2.ICreateConversationModelEvaluationRequest} message CreateConversationModelEvaluationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LoggingConfig.encodeDelimited = function encodeDelimited(message, writer) { + CreateConversationModelEvaluationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LoggingConfig message from the specified reader or buffer. + * Decodes a CreateConversationModelEvaluationRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.LoggingConfig + * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.LoggingConfig} LoggingConfig + * @returns {google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest} CreateConversationModelEvaluationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LoggingConfig.decode = function decode(reader, length) { + CreateConversationModelEvaluationRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.LoggingConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: { - message.enableStackdriverLogging = reader.bool(); + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.conversationModelEvaluation = $root.google.cloud.dialogflow.v2.ConversationModelEvaluation.decode(reader, reader.uint32()); break; } default: @@ -64563,122 +66623,138 @@ }; /** - * Decodes a LoggingConfig message from the specified reader or buffer, length delimited. + * Decodes a CreateConversationModelEvaluationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.LoggingConfig + * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.LoggingConfig} LoggingConfig + * @returns {google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest} CreateConversationModelEvaluationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LoggingConfig.decodeDelimited = function decodeDelimited(reader) { + CreateConversationModelEvaluationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LoggingConfig message. + * Verifies a CreateConversationModelEvaluationRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2.LoggingConfig + * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LoggingConfig.verify = function verify(message) { + CreateConversationModelEvaluationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.enableStackdriverLogging != null && message.hasOwnProperty("enableStackdriverLogging")) - if (typeof message.enableStackdriverLogging !== "boolean") - return "enableStackdriverLogging: boolean expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.conversationModelEvaluation != null && message.hasOwnProperty("conversationModelEvaluation")) { + var error = $root.google.cloud.dialogflow.v2.ConversationModelEvaluation.verify(message.conversationModelEvaluation); + if (error) + return "conversationModelEvaluation." + error; + } return null; }; /** - * Creates a LoggingConfig message from a plain object. Also converts values to their respective internal types. + * Creates a CreateConversationModelEvaluationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.LoggingConfig + * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.LoggingConfig} LoggingConfig + * @returns {google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest} CreateConversationModelEvaluationRequest */ - LoggingConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.LoggingConfig) + CreateConversationModelEvaluationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest) return object; - var message = new $root.google.cloud.dialogflow.v2.LoggingConfig(); - if (object.enableStackdriverLogging != null) - message.enableStackdriverLogging = Boolean(object.enableStackdriverLogging); + var message = new $root.google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.conversationModelEvaluation != null) { + if (typeof object.conversationModelEvaluation !== "object") + throw TypeError(".google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest.conversationModelEvaluation: object expected"); + message.conversationModelEvaluation = $root.google.cloud.dialogflow.v2.ConversationModelEvaluation.fromObject(object.conversationModelEvaluation); + } return message; }; /** - * Creates a plain object from a LoggingConfig message. Also converts values to other types if specified. + * Creates a plain object from a CreateConversationModelEvaluationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.LoggingConfig + * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest * @static - * @param {google.cloud.dialogflow.v2.LoggingConfig} message LoggingConfig + * @param {google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest} message CreateConversationModelEvaluationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LoggingConfig.toObject = function toObject(message, options) { + CreateConversationModelEvaluationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.enableStackdriverLogging = false; - if (message.enableStackdriverLogging != null && message.hasOwnProperty("enableStackdriverLogging")) - object.enableStackdriverLogging = message.enableStackdriverLogging; + if (options.defaults) { + object.parent = ""; + object.conversationModelEvaluation = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.conversationModelEvaluation != null && message.hasOwnProperty("conversationModelEvaluation")) + object.conversationModelEvaluation = $root.google.cloud.dialogflow.v2.ConversationModelEvaluation.toObject(message.conversationModelEvaluation, options); return object; }; /** - * Converts this LoggingConfig to JSON. + * Converts this CreateConversationModelEvaluationRequest to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.LoggingConfig + * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest * @instance * @returns {Object.} JSON object */ - LoggingConfig.prototype.toJSON = function toJSON() { + CreateConversationModelEvaluationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for LoggingConfig + * Gets the default type url for CreateConversationModelEvaluationRequest * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.LoggingConfig + * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - LoggingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateConversationModelEvaluationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.LoggingConfig"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.CreateConversationModelEvaluationRequest"; }; - return LoggingConfig; + return CreateConversationModelEvaluationRequest; })(); - v2.SuggestionFeature = (function() { + v2.CreateConversationModelOperationMetadata = (function() { /** - * Properties of a SuggestionFeature. + * Properties of a CreateConversationModelOperationMetadata. * @memberof google.cloud.dialogflow.v2 - * @interface ISuggestionFeature - * @property {google.cloud.dialogflow.v2.SuggestionFeature.Type|null} [type] SuggestionFeature type + * @interface ICreateConversationModelOperationMetadata + * @property {string|null} [conversationModel] CreateConversationModelOperationMetadata conversationModel + * @property {google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.State|null} [state] CreateConversationModelOperationMetadata state + * @property {google.protobuf.ITimestamp|null} [createTime] CreateConversationModelOperationMetadata createTime */ /** - * Constructs a new SuggestionFeature. + * Constructs a new CreateConversationModelOperationMetadata. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a SuggestionFeature. - * @implements ISuggestionFeature + * @classdesc Represents a CreateConversationModelOperationMetadata. + * @implements ICreateConversationModelOperationMetadata * @constructor - * @param {google.cloud.dialogflow.v2.ISuggestionFeature=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.ICreateConversationModelOperationMetadata=} [properties] Properties to set */ - function SuggestionFeature(properties) { + function CreateConversationModelOperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -64686,75 +66762,103 @@ } /** - * SuggestionFeature type. - * @member {google.cloud.dialogflow.v2.SuggestionFeature.Type} type - * @memberof google.cloud.dialogflow.v2.SuggestionFeature + * CreateConversationModelOperationMetadata conversationModel. + * @member {string} conversationModel + * @memberof google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata * @instance */ - SuggestionFeature.prototype.type = 0; + CreateConversationModelOperationMetadata.prototype.conversationModel = ""; /** - * Creates a new SuggestionFeature instance using the specified properties. + * CreateConversationModelOperationMetadata state. + * @member {google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.State} state + * @memberof google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata + * @instance + */ + CreateConversationModelOperationMetadata.prototype.state = 0; + + /** + * CreateConversationModelOperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata + * @instance + */ + CreateConversationModelOperationMetadata.prototype.createTime = null; + + /** + * Creates a new CreateConversationModelOperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.SuggestionFeature + * @memberof google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.ISuggestionFeature=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.SuggestionFeature} SuggestionFeature instance + * @param {google.cloud.dialogflow.v2.ICreateConversationModelOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata} CreateConversationModelOperationMetadata instance */ - SuggestionFeature.create = function create(properties) { - return new SuggestionFeature(properties); + CreateConversationModelOperationMetadata.create = function create(properties) { + return new CreateConversationModelOperationMetadata(properties); }; /** - * Encodes the specified SuggestionFeature message. Does not implicitly {@link google.cloud.dialogflow.v2.SuggestionFeature.verify|verify} messages. + * Encodes the specified CreateConversationModelOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.SuggestionFeature + * @memberof google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.ISuggestionFeature} message SuggestionFeature message or plain object to encode + * @param {google.cloud.dialogflow.v2.ICreateConversationModelOperationMetadata} message CreateConversationModelOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SuggestionFeature.encode = function encode(message, writer) { + CreateConversationModelOperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.conversationModel != null && Object.hasOwnProperty.call(message, "conversationModel")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversationModel); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + 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(); return writer; }; /** - * Encodes the specified SuggestionFeature message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.SuggestionFeature.verify|verify} messages. + * Encodes the specified CreateConversationModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.SuggestionFeature + * @memberof google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.ISuggestionFeature} message SuggestionFeature message or plain object to encode + * @param {google.cloud.dialogflow.v2.ICreateConversationModelOperationMetadata} message CreateConversationModelOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SuggestionFeature.encodeDelimited = function encodeDelimited(message, writer) { + CreateConversationModelOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SuggestionFeature message from the specified reader or buffer. + * Decodes a CreateConversationModelOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.SuggestionFeature + * @memberof google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.SuggestionFeature} SuggestionFeature + * @returns {google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata} CreateConversationModelOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SuggestionFeature.decode = function decode(reader, length) { + CreateConversationModelOperationMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.SuggestionFeature(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.type = reader.int32(); + message.conversationModel = reader.string(); + break; + } + case 2: { + message.state = reader.int32(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } default: @@ -64766,171 +66870,213 @@ }; /** - * Decodes a SuggestionFeature message from the specified reader or buffer, length delimited. + * Decodes a CreateConversationModelOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.SuggestionFeature + * @memberof google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.SuggestionFeature} SuggestionFeature + * @returns {google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata} CreateConversationModelOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SuggestionFeature.decodeDelimited = function decodeDelimited(reader) { + CreateConversationModelOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SuggestionFeature message. + * Verifies a CreateConversationModelOperationMetadata message. * @function verify - * @memberof google.cloud.dialogflow.v2.SuggestionFeature + * @memberof google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SuggestionFeature.verify = function verify(message) { + CreateConversationModelOperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { + if (message.conversationModel != null && message.hasOwnProperty("conversationModel")) + if (!$util.isString(message.conversationModel)) + return "conversationModel: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { default: - return "type: enum value expected"; + return "state: enum value expected"; case 0: case 1: case 2: case 3: + case 4: + case 5: + case 6: break; } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } return null; }; /** - * Creates a SuggestionFeature message from a plain object. Also converts values to their respective internal types. + * Creates a CreateConversationModelOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.SuggestionFeature + * @memberof google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.SuggestionFeature} SuggestionFeature + * @returns {google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata} CreateConversationModelOperationMetadata */ - SuggestionFeature.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.SuggestionFeature) + CreateConversationModelOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata) return object; - var message = new $root.google.cloud.dialogflow.v2.SuggestionFeature(); - switch (object.type) { + var message = new $root.google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata(); + if (object.conversationModel != null) + message.conversationModel = String(object.conversationModel); + switch (object.state) { default: - if (typeof object.type === "number") { - message.type = object.type; + if (typeof object.state === "number") { + message.state = object.state; break; } break; - case "TYPE_UNSPECIFIED": + case "STATE_UNSPECIFIED": case 0: - message.type = 0; + message.state = 0; break; - case "ARTICLE_SUGGESTION": + case "PENDING": case 1: - message.type = 1; + message.state = 1; break; - case "FAQ": + case "SUCCEEDED": case 2: - message.type = 2; + message.state = 2; break; - case "SMART_REPLY": + case "FAILED": case 3: - message.type = 3; + message.state = 3; + break; + case "CANCELLED": + case 4: + message.state = 4; + break; + case "CANCELLING": + case 5: + message.state = 5; + break; + case "TRAINING": + case 6: + message.state = 6; break; } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } return message; }; /** - * Creates a plain object from a SuggestionFeature message. Also converts values to other types if specified. + * Creates a plain object from a CreateConversationModelOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.SuggestionFeature + * @memberof google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.SuggestionFeature} message SuggestionFeature + * @param {google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata} message CreateConversationModelOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SuggestionFeature.toObject = function toObject(message, options) { + CreateConversationModelOperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dialogflow.v2.SuggestionFeature.Type[message.type] === undefined ? message.type : $root.google.cloud.dialogflow.v2.SuggestionFeature.Type[message.type] : message.type; + if (options.defaults) { + object.conversationModel = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.createTime = null; + } + if (message.conversationModel != null && message.hasOwnProperty("conversationModel")) + object.conversationModel = message.conversationModel; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.State[message.state] === undefined ? message.state : $root.google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.State[message.state] : message.state; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); return object; }; /** - * Converts this SuggestionFeature to JSON. + * Converts this CreateConversationModelOperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.SuggestionFeature + * @memberof google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata * @instance * @returns {Object.} JSON object */ - SuggestionFeature.prototype.toJSON = function toJSON() { + CreateConversationModelOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SuggestionFeature + * Gets the default type url for CreateConversationModelOperationMetadata * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.SuggestionFeature + * @memberof google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SuggestionFeature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateConversationModelOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.SuggestionFeature"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata"; }; /** - * Type enum. - * @name google.cloud.dialogflow.v2.SuggestionFeature.Type + * State enum. + * @name google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.State * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} ARTICLE_SUGGESTION=1 ARTICLE_SUGGESTION value - * @property {number} FAQ=2 FAQ value - * @property {number} SMART_REPLY=3 SMART_REPLY value + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} PENDING=1 PENDING value + * @property {number} SUCCEEDED=2 SUCCEEDED value + * @property {number} FAILED=3 FAILED value + * @property {number} CANCELLED=4 CANCELLED value + * @property {number} CANCELLING=5 CANCELLING value + * @property {number} TRAINING=6 TRAINING value */ - SuggestionFeature.Type = (function() { + CreateConversationModelOperationMetadata.State = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ARTICLE_SUGGESTION"] = 1; - values[valuesById[2] = "FAQ"] = 2; - values[valuesById[3] = "SMART_REPLY"] = 3; + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PENDING"] = 1; + values[valuesById[2] = "SUCCEEDED"] = 2; + values[valuesById[3] = "FAILED"] = 3; + values[valuesById[4] = "CANCELLED"] = 4; + values[valuesById[5] = "CANCELLING"] = 5; + values[valuesById[6] = "TRAINING"] = 6; return values; })(); - return SuggestionFeature; + return CreateConversationModelOperationMetadata; })(); - v2.SetSuggestionFeatureConfigRequest = (function() { + v2.DeployConversationModelOperationMetadata = (function() { /** - * Properties of a SetSuggestionFeatureConfigRequest. + * Properties of a DeployConversationModelOperationMetadata. * @memberof google.cloud.dialogflow.v2 - * @interface ISetSuggestionFeatureConfigRequest - * @property {string|null} [conversationProfile] SetSuggestionFeatureConfigRequest conversationProfile - * @property {google.cloud.dialogflow.v2.Participant.Role|null} [participantRole] SetSuggestionFeatureConfigRequest participantRole - * @property {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionFeatureConfig|null} [suggestionFeatureConfig] SetSuggestionFeatureConfigRequest suggestionFeatureConfig + * @interface IDeployConversationModelOperationMetadata + * @property {string|null} [conversationModel] DeployConversationModelOperationMetadata conversationModel + * @property {google.protobuf.ITimestamp|null} [createTime] DeployConversationModelOperationMetadata createTime */ /** - * Constructs a new SetSuggestionFeatureConfigRequest. + * Constructs a new DeployConversationModelOperationMetadata. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a SetSuggestionFeatureConfigRequest. - * @implements ISetSuggestionFeatureConfigRequest + * @classdesc Represents a DeployConversationModelOperationMetadata. + * @implements IDeployConversationModelOperationMetadata * @constructor - * @param {google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.IDeployConversationModelOperationMetadata=} [properties] Properties to set */ - function SetSuggestionFeatureConfigRequest(properties) { + function DeployConversationModelOperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -64938,103 +67084,89 @@ } /** - * SetSuggestionFeatureConfigRequest conversationProfile. - * @member {string} conversationProfile - * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest - * @instance - */ - SetSuggestionFeatureConfigRequest.prototype.conversationProfile = ""; - - /** - * SetSuggestionFeatureConfigRequest participantRole. - * @member {google.cloud.dialogflow.v2.Participant.Role} participantRole - * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest + * DeployConversationModelOperationMetadata conversationModel. + * @member {string} conversationModel + * @memberof google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata * @instance */ - SetSuggestionFeatureConfigRequest.prototype.participantRole = 0; + DeployConversationModelOperationMetadata.prototype.conversationModel = ""; /** - * SetSuggestionFeatureConfigRequest suggestionFeatureConfig. - * @member {google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ISuggestionFeatureConfig|null|undefined} suggestionFeatureConfig - * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest + * DeployConversationModelOperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata * @instance */ - SetSuggestionFeatureConfigRequest.prototype.suggestionFeatureConfig = null; + DeployConversationModelOperationMetadata.prototype.createTime = null; /** - * Creates a new SetSuggestionFeatureConfigRequest instance using the specified properties. + * Creates a new DeployConversationModelOperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest + * @memberof google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest} SetSuggestionFeatureConfigRequest instance + * @param {google.cloud.dialogflow.v2.IDeployConversationModelOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata} DeployConversationModelOperationMetadata instance */ - SetSuggestionFeatureConfigRequest.create = function create(properties) { - return new SetSuggestionFeatureConfigRequest(properties); + DeployConversationModelOperationMetadata.create = function create(properties) { + return new DeployConversationModelOperationMetadata(properties); }; /** - * Encodes the specified SetSuggestionFeatureConfigRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest.verify|verify} messages. + * Encodes the specified DeployConversationModelOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest + * @memberof google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigRequest} message SetSuggestionFeatureConfigRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IDeployConversationModelOperationMetadata} message DeployConversationModelOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetSuggestionFeatureConfigRequest.encode = function encode(message, writer) { + DeployConversationModelOperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.conversationProfile != null && Object.hasOwnProperty.call(message, "conversationProfile")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversationProfile); - if (message.participantRole != null && Object.hasOwnProperty.call(message, "participantRole")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.participantRole); - if (message.suggestionFeatureConfig != null && Object.hasOwnProperty.call(message, "suggestionFeatureConfig")) - $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.encode(message.suggestionFeatureConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.conversationModel != null && Object.hasOwnProperty.call(message, "conversationModel")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversationModel); + 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(); return writer; }; /** - * Encodes the specified SetSuggestionFeatureConfigRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest.verify|verify} messages. + * Encodes the specified DeployConversationModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest + * @memberof google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigRequest} message SetSuggestionFeatureConfigRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IDeployConversationModelOperationMetadata} message DeployConversationModelOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetSuggestionFeatureConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeployConversationModelOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SetSuggestionFeatureConfigRequest message from the specified reader or buffer. + * Decodes a DeployConversationModelOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest + * @memberof google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest} SetSuggestionFeatureConfigRequest + * @returns {google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata} DeployConversationModelOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetSuggestionFeatureConfigRequest.decode = function decode(reader, length) { + DeployConversationModelOperationMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.conversationProfile = reader.string(); - break; - } - case 2: { - message.participantRole = reader.int32(); + message.conversationModel = reader.string(); break; } case 3: { - message.suggestionFeatureConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.decode(reader, reader.uint32()); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } default: @@ -65046,175 +67178,137 @@ }; /** - * Decodes a SetSuggestionFeatureConfigRequest message from the specified reader or buffer, length delimited. + * Decodes a DeployConversationModelOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest + * @memberof google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest} SetSuggestionFeatureConfigRequest + * @returns {google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata} DeployConversationModelOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetSuggestionFeatureConfigRequest.decodeDelimited = function decodeDelimited(reader) { + DeployConversationModelOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SetSuggestionFeatureConfigRequest message. + * Verifies a DeployConversationModelOperationMetadata message. * @function verify - * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest + * @memberof google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SetSuggestionFeatureConfigRequest.verify = function verify(message) { + DeployConversationModelOperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) - if (!$util.isString(message.conversationProfile)) - return "conversationProfile: string expected"; - if (message.participantRole != null && message.hasOwnProperty("participantRole")) - switch (message.participantRole) { - default: - return "participantRole: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.suggestionFeatureConfig != null && message.hasOwnProperty("suggestionFeatureConfig")) { - var error = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.verify(message.suggestionFeatureConfig); + if (message.conversationModel != null && message.hasOwnProperty("conversationModel")) + if (!$util.isString(message.conversationModel)) + return "conversationModel: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) - return "suggestionFeatureConfig." + error; + return "createTime." + error; } return null; }; /** - * Creates a SetSuggestionFeatureConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeployConversationModelOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest + * @memberof google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest} SetSuggestionFeatureConfigRequest + * @returns {google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata} DeployConversationModelOperationMetadata */ - SetSuggestionFeatureConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest) + DeployConversationModelOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata) return object; - var message = new $root.google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest(); - if (object.conversationProfile != null) - message.conversationProfile = String(object.conversationProfile); - switch (object.participantRole) { - default: - if (typeof object.participantRole === "number") { - message.participantRole = object.participantRole; - break; - } - break; - case "ROLE_UNSPECIFIED": - case 0: - message.participantRole = 0; - break; - case "HUMAN_AGENT": - case 1: - message.participantRole = 1; - break; - case "AUTOMATED_AGENT": - case 2: - message.participantRole = 2; - break; - case "END_USER": - case 3: - message.participantRole = 3; - break; - } - if (object.suggestionFeatureConfig != null) { - if (typeof object.suggestionFeatureConfig !== "object") - throw TypeError(".google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest.suggestionFeatureConfig: object expected"); - message.suggestionFeatureConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.fromObject(object.suggestionFeatureConfig); + var message = new $root.google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata(); + if (object.conversationModel != null) + message.conversationModel = String(object.conversationModel); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } return message; }; /** - * Creates a plain object from a SetSuggestionFeatureConfigRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeployConversationModelOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest + * @memberof google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest} message SetSuggestionFeatureConfigRequest + * @param {google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata} message DeployConversationModelOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SetSuggestionFeatureConfigRequest.toObject = function toObject(message, options) { + DeployConversationModelOperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.conversationProfile = ""; - object.participantRole = options.enums === String ? "ROLE_UNSPECIFIED" : 0; - object.suggestionFeatureConfig = null; + object.conversationModel = ""; + object.createTime = null; } - if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) - object.conversationProfile = message.conversationProfile; - if (message.participantRole != null && message.hasOwnProperty("participantRole")) - object.participantRole = options.enums === String ? $root.google.cloud.dialogflow.v2.Participant.Role[message.participantRole] === undefined ? message.participantRole : $root.google.cloud.dialogflow.v2.Participant.Role[message.participantRole] : message.participantRole; - if (message.suggestionFeatureConfig != null && message.hasOwnProperty("suggestionFeatureConfig")) - object.suggestionFeatureConfig = $root.google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionFeatureConfig.toObject(message.suggestionFeatureConfig, options); + if (message.conversationModel != null && message.hasOwnProperty("conversationModel")) + object.conversationModel = message.conversationModel; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); return object; }; /** - * Converts this SetSuggestionFeatureConfigRequest to JSON. + * Converts this DeployConversationModelOperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest + * @memberof google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata * @instance * @returns {Object.} JSON object */ - SetSuggestionFeatureConfigRequest.prototype.toJSON = function toJSON() { + DeployConversationModelOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SetSuggestionFeatureConfigRequest + * Gets the default type url for DeployConversationModelOperationMetadata * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest + * @memberof google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SetSuggestionFeatureConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeployConversationModelOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.SetSuggestionFeatureConfigRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata"; }; - return SetSuggestionFeatureConfigRequest; + return DeployConversationModelOperationMetadata; })(); - v2.ClearSuggestionFeatureConfigRequest = (function() { + v2.UndeployConversationModelOperationMetadata = (function() { /** - * Properties of a ClearSuggestionFeatureConfigRequest. + * Properties of an UndeployConversationModelOperationMetadata. * @memberof google.cloud.dialogflow.v2 - * @interface IClearSuggestionFeatureConfigRequest - * @property {string|null} [conversationProfile] ClearSuggestionFeatureConfigRequest conversationProfile - * @property {google.cloud.dialogflow.v2.Participant.Role|null} [participantRole] ClearSuggestionFeatureConfigRequest participantRole - * @property {google.cloud.dialogflow.v2.SuggestionFeature.Type|null} [suggestionFeatureType] ClearSuggestionFeatureConfigRequest suggestionFeatureType + * @interface IUndeployConversationModelOperationMetadata + * @property {string|null} [conversationModel] UndeployConversationModelOperationMetadata conversationModel + * @property {google.protobuf.ITimestamp|null} [createTime] UndeployConversationModelOperationMetadata createTime */ /** - * Constructs a new ClearSuggestionFeatureConfigRequest. + * Constructs a new UndeployConversationModelOperationMetadata. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a ClearSuggestionFeatureConfigRequest. - * @implements IClearSuggestionFeatureConfigRequest + * @classdesc Represents an UndeployConversationModelOperationMetadata. + * @implements IUndeployConversationModelOperationMetadata * @constructor - * @param {google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigRequest=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.IUndeployConversationModelOperationMetadata=} [properties] Properties to set */ - function ClearSuggestionFeatureConfigRequest(properties) { + function UndeployConversationModelOperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -65222,103 +67316,89 @@ } /** - * ClearSuggestionFeatureConfigRequest conversationProfile. - * @member {string} conversationProfile - * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest - * @instance - */ - ClearSuggestionFeatureConfigRequest.prototype.conversationProfile = ""; - - /** - * ClearSuggestionFeatureConfigRequest participantRole. - * @member {google.cloud.dialogflow.v2.Participant.Role} participantRole - * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest + * UndeployConversationModelOperationMetadata conversationModel. + * @member {string} conversationModel + * @memberof google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata * @instance */ - ClearSuggestionFeatureConfigRequest.prototype.participantRole = 0; + UndeployConversationModelOperationMetadata.prototype.conversationModel = ""; /** - * ClearSuggestionFeatureConfigRequest suggestionFeatureType. - * @member {google.cloud.dialogflow.v2.SuggestionFeature.Type} suggestionFeatureType - * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest + * UndeployConversationModelOperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata * @instance */ - ClearSuggestionFeatureConfigRequest.prototype.suggestionFeatureType = 0; + UndeployConversationModelOperationMetadata.prototype.createTime = null; /** - * Creates a new ClearSuggestionFeatureConfigRequest instance using the specified properties. + * Creates a new UndeployConversationModelOperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest + * @memberof google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigRequest=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest} ClearSuggestionFeatureConfigRequest instance + * @param {google.cloud.dialogflow.v2.IUndeployConversationModelOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata} UndeployConversationModelOperationMetadata instance */ - ClearSuggestionFeatureConfigRequest.create = function create(properties) { - return new ClearSuggestionFeatureConfigRequest(properties); + UndeployConversationModelOperationMetadata.create = function create(properties) { + return new UndeployConversationModelOperationMetadata(properties); }; /** - * Encodes the specified ClearSuggestionFeatureConfigRequest message. Does not implicitly {@link google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest.verify|verify} messages. + * Encodes the specified UndeployConversationModelOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest + * @memberof google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigRequest} message ClearSuggestionFeatureConfigRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IUndeployConversationModelOperationMetadata} message UndeployConversationModelOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClearSuggestionFeatureConfigRequest.encode = function encode(message, writer) { + UndeployConversationModelOperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.conversationProfile != null && Object.hasOwnProperty.call(message, "conversationProfile")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversationProfile); - if (message.participantRole != null && Object.hasOwnProperty.call(message, "participantRole")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.participantRole); - if (message.suggestionFeatureType != null && Object.hasOwnProperty.call(message, "suggestionFeatureType")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.suggestionFeatureType); + if (message.conversationModel != null && Object.hasOwnProperty.call(message, "conversationModel")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversationModel); + 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(); return writer; }; /** - * Encodes the specified ClearSuggestionFeatureConfigRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest.verify|verify} messages. + * Encodes the specified UndeployConversationModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest + * @memberof google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigRequest} message ClearSuggestionFeatureConfigRequest message or plain object to encode + * @param {google.cloud.dialogflow.v2.IUndeployConversationModelOperationMetadata} message UndeployConversationModelOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClearSuggestionFeatureConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + UndeployConversationModelOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ClearSuggestionFeatureConfigRequest message from the specified reader or buffer. + * Decodes an UndeployConversationModelOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest + * @memberof google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest} ClearSuggestionFeatureConfigRequest + * @returns {google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata} UndeployConversationModelOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ClearSuggestionFeatureConfigRequest.decode = function decode(reader, length) { + UndeployConversationModelOperationMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.conversationProfile = reader.string(); - break; - } - case 2: { - message.participantRole = reader.int32(); + message.conversationModel = reader.string(); break; } case 3: { - message.suggestionFeatureType = reader.int32(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } default: @@ -65330,200 +67410,137 @@ }; /** - * Decodes a ClearSuggestionFeatureConfigRequest message from the specified reader or buffer, length delimited. + * Decodes an UndeployConversationModelOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest + * @memberof google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest} ClearSuggestionFeatureConfigRequest + * @returns {google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata} UndeployConversationModelOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ClearSuggestionFeatureConfigRequest.decodeDelimited = function decodeDelimited(reader) { + UndeployConversationModelOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ClearSuggestionFeatureConfigRequest message. + * Verifies an UndeployConversationModelOperationMetadata message. * @function verify - * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest + * @memberof google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ClearSuggestionFeatureConfigRequest.verify = function verify(message) { + UndeployConversationModelOperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) - if (!$util.isString(message.conversationProfile)) - return "conversationProfile: string expected"; - if (message.participantRole != null && message.hasOwnProperty("participantRole")) - switch (message.participantRole) { - default: - return "participantRole: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.suggestionFeatureType != null && message.hasOwnProperty("suggestionFeatureType")) - switch (message.suggestionFeatureType) { - default: - return "suggestionFeatureType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } + if (message.conversationModel != null && message.hasOwnProperty("conversationModel")) + if (!$util.isString(message.conversationModel)) + return "conversationModel: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } return null; }; /** - * Creates a ClearSuggestionFeatureConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UndeployConversationModelOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest + * @memberof google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest} ClearSuggestionFeatureConfigRequest + * @returns {google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata} UndeployConversationModelOperationMetadata */ - ClearSuggestionFeatureConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest) + UndeployConversationModelOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata) return object; - var message = new $root.google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest(); - if (object.conversationProfile != null) - message.conversationProfile = String(object.conversationProfile); - switch (object.participantRole) { - default: - if (typeof object.participantRole === "number") { - message.participantRole = object.participantRole; - break; - } - break; - case "ROLE_UNSPECIFIED": - case 0: - message.participantRole = 0; - break; - case "HUMAN_AGENT": - case 1: - message.participantRole = 1; - break; - case "AUTOMATED_AGENT": - case 2: - message.participantRole = 2; - break; - case "END_USER": - case 3: - message.participantRole = 3; - break; - } - switch (object.suggestionFeatureType) { - default: - if (typeof object.suggestionFeatureType === "number") { - message.suggestionFeatureType = object.suggestionFeatureType; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.suggestionFeatureType = 0; - break; - case "ARTICLE_SUGGESTION": - case 1: - message.suggestionFeatureType = 1; - break; - case "FAQ": - case 2: - message.suggestionFeatureType = 2; - break; - case "SMART_REPLY": - case 3: - message.suggestionFeatureType = 3; - break; + var message = new $root.google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata(); + if (object.conversationModel != null) + message.conversationModel = String(object.conversationModel); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } return message; }; /** - * Creates a plain object from a ClearSuggestionFeatureConfigRequest message. Also converts values to other types if specified. + * Creates a plain object from an UndeployConversationModelOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest + * @memberof google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest} message ClearSuggestionFeatureConfigRequest + * @param {google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata} message UndeployConversationModelOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ClearSuggestionFeatureConfigRequest.toObject = function toObject(message, options) { + UndeployConversationModelOperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.conversationProfile = ""; - object.participantRole = options.enums === String ? "ROLE_UNSPECIFIED" : 0; - object.suggestionFeatureType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.conversationModel = ""; + object.createTime = null; } - if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) - object.conversationProfile = message.conversationProfile; - if (message.participantRole != null && message.hasOwnProperty("participantRole")) - object.participantRole = options.enums === String ? $root.google.cloud.dialogflow.v2.Participant.Role[message.participantRole] === undefined ? message.participantRole : $root.google.cloud.dialogflow.v2.Participant.Role[message.participantRole] : message.participantRole; - if (message.suggestionFeatureType != null && message.hasOwnProperty("suggestionFeatureType")) - object.suggestionFeatureType = options.enums === String ? $root.google.cloud.dialogflow.v2.SuggestionFeature.Type[message.suggestionFeatureType] === undefined ? message.suggestionFeatureType : $root.google.cloud.dialogflow.v2.SuggestionFeature.Type[message.suggestionFeatureType] : message.suggestionFeatureType; + if (message.conversationModel != null && message.hasOwnProperty("conversationModel")) + object.conversationModel = message.conversationModel; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); return object; }; /** - * Converts this ClearSuggestionFeatureConfigRequest to JSON. + * Converts this UndeployConversationModelOperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest + * @memberof google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata * @instance * @returns {Object.} JSON object */ - ClearSuggestionFeatureConfigRequest.prototype.toJSON = function toJSON() { + UndeployConversationModelOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ClearSuggestionFeatureConfigRequest + * Gets the default type url for UndeployConversationModelOperationMetadata * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest + * @memberof google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ClearSuggestionFeatureConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UndeployConversationModelOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigRequest"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata"; }; - return ClearSuggestionFeatureConfigRequest; + return UndeployConversationModelOperationMetadata; })(); - v2.SetSuggestionFeatureConfigOperationMetadata = (function() { + v2.DeleteConversationModelOperationMetadata = (function() { /** - * Properties of a SetSuggestionFeatureConfigOperationMetadata. + * Properties of a DeleteConversationModelOperationMetadata. * @memberof google.cloud.dialogflow.v2 - * @interface ISetSuggestionFeatureConfigOperationMetadata - * @property {string|null} [conversationProfile] SetSuggestionFeatureConfigOperationMetadata conversationProfile - * @property {google.cloud.dialogflow.v2.Participant.Role|null} [participantRole] SetSuggestionFeatureConfigOperationMetadata participantRole - * @property {google.cloud.dialogflow.v2.SuggestionFeature.Type|null} [suggestionFeatureType] SetSuggestionFeatureConfigOperationMetadata suggestionFeatureType - * @property {google.protobuf.ITimestamp|null} [createTime] SetSuggestionFeatureConfigOperationMetadata createTime + * @interface IDeleteConversationModelOperationMetadata + * @property {string|null} [conversationModel] DeleteConversationModelOperationMetadata conversationModel + * @property {google.protobuf.ITimestamp|null} [createTime] DeleteConversationModelOperationMetadata createTime */ /** - * Constructs a new SetSuggestionFeatureConfigOperationMetadata. + * Constructs a new DeleteConversationModelOperationMetadata. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a SetSuggestionFeatureConfigOperationMetadata. - * @implements ISetSuggestionFeatureConfigOperationMetadata + * @classdesc Represents a DeleteConversationModelOperationMetadata. + * @implements IDeleteConversationModelOperationMetadata * @constructor - * @param {google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigOperationMetadata=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.IDeleteConversationModelOperationMetadata=} [properties] Properties to set */ - function SetSuggestionFeatureConfigOperationMetadata(properties) { + function DeleteConversationModelOperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -65531,116 +67548,88 @@ } /** - * SetSuggestionFeatureConfigOperationMetadata conversationProfile. - * @member {string} conversationProfile - * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata - * @instance - */ - SetSuggestionFeatureConfigOperationMetadata.prototype.conversationProfile = ""; - - /** - * SetSuggestionFeatureConfigOperationMetadata participantRole. - * @member {google.cloud.dialogflow.v2.Participant.Role} participantRole - * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata - * @instance - */ - SetSuggestionFeatureConfigOperationMetadata.prototype.participantRole = 0; - - /** - * SetSuggestionFeatureConfigOperationMetadata suggestionFeatureType. - * @member {google.cloud.dialogflow.v2.SuggestionFeature.Type} suggestionFeatureType - * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata + * DeleteConversationModelOperationMetadata conversationModel. + * @member {string} conversationModel + * @memberof google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata * @instance */ - SetSuggestionFeatureConfigOperationMetadata.prototype.suggestionFeatureType = 0; + DeleteConversationModelOperationMetadata.prototype.conversationModel = ""; /** - * SetSuggestionFeatureConfigOperationMetadata createTime. + * DeleteConversationModelOperationMetadata createTime. * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata + * @memberof google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata * @instance */ - SetSuggestionFeatureConfigOperationMetadata.prototype.createTime = null; + DeleteConversationModelOperationMetadata.prototype.createTime = null; /** - * Creates a new SetSuggestionFeatureConfigOperationMetadata instance using the specified properties. + * Creates a new DeleteConversationModelOperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata + * @memberof google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata} SetSuggestionFeatureConfigOperationMetadata instance + * @param {google.cloud.dialogflow.v2.IDeleteConversationModelOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata} DeleteConversationModelOperationMetadata instance */ - SetSuggestionFeatureConfigOperationMetadata.create = function create(properties) { - return new SetSuggestionFeatureConfigOperationMetadata(properties); + DeleteConversationModelOperationMetadata.create = function create(properties) { + return new DeleteConversationModelOperationMetadata(properties); }; /** - * Encodes the specified SetSuggestionFeatureConfigOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata.verify|verify} messages. + * Encodes the specified DeleteConversationModelOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata + * @memberof google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigOperationMetadata} message SetSuggestionFeatureConfigOperationMetadata message or plain object to encode + * @param {google.cloud.dialogflow.v2.IDeleteConversationModelOperationMetadata} message DeleteConversationModelOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetSuggestionFeatureConfigOperationMetadata.encode = function encode(message, writer) { + DeleteConversationModelOperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.conversationProfile != null && Object.hasOwnProperty.call(message, "conversationProfile")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversationProfile); - if (message.participantRole != null && Object.hasOwnProperty.call(message, "participantRole")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.participantRole); - if (message.suggestionFeatureType != null && Object.hasOwnProperty.call(message, "suggestionFeatureType")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.suggestionFeatureType); + if (message.conversationModel != null && Object.hasOwnProperty.call(message, "conversationModel")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversationModel); 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(); + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified SetSuggestionFeatureConfigOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata.verify|verify} messages. + * Encodes the specified DeleteConversationModelOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata + * @memberof google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.ISetSuggestionFeatureConfigOperationMetadata} message SetSuggestionFeatureConfigOperationMetadata message or plain object to encode + * @param {google.cloud.dialogflow.v2.IDeleteConversationModelOperationMetadata} message DeleteConversationModelOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetSuggestionFeatureConfigOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + DeleteConversationModelOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SetSuggestionFeatureConfigOperationMetadata message from the specified reader or buffer. + * Decodes a DeleteConversationModelOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata + * @memberof google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata} SetSuggestionFeatureConfigOperationMetadata + * @returns {google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata} DeleteConversationModelOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetSuggestionFeatureConfigOperationMetadata.decode = function decode(reader, length) { + DeleteConversationModelOperationMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.conversationProfile = reader.string(); - break; - } - case 2: { - message.participantRole = reader.int32(); + message.conversationModel = reader.string(); break; } case 3: { - message.suggestionFeatureType = reader.int32(); - break; - } - case 4: { message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } @@ -65653,55 +67642,35 @@ }; /** - * Decodes a SetSuggestionFeatureConfigOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a DeleteConversationModelOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata + * @memberof google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata} SetSuggestionFeatureConfigOperationMetadata + * @returns {google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata} DeleteConversationModelOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetSuggestionFeatureConfigOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + DeleteConversationModelOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SetSuggestionFeatureConfigOperationMetadata message. + * Verifies a DeleteConversationModelOperationMetadata message. * @function verify - * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata + * @memberof google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SetSuggestionFeatureConfigOperationMetadata.verify = function verify(message) { + DeleteConversationModelOperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) - if (!$util.isString(message.conversationProfile)) - return "conversationProfile: string expected"; - if (message.participantRole != null && message.hasOwnProperty("participantRole")) - switch (message.participantRole) { - default: - return "participantRole: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.suggestionFeatureType != null && message.hasOwnProperty("suggestionFeatureType")) - switch (message.suggestionFeatureType) { - default: - return "suggestionFeatureType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } + if (message.conversationModel != null && message.hasOwnProperty("conversationModel")) + if (!$util.isString(message.conversationModel)) + return "conversationModel: string expected"; if (message.createTime != null && message.hasOwnProperty("createTime")) { var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) @@ -65711,155 +67680,101 @@ }; /** - * Creates a SetSuggestionFeatureConfigOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteConversationModelOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata + * @memberof google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata} SetSuggestionFeatureConfigOperationMetadata + * @returns {google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata} DeleteConversationModelOperationMetadata */ - SetSuggestionFeatureConfigOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata) + DeleteConversationModelOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata) return object; - var message = new $root.google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata(); - if (object.conversationProfile != null) - message.conversationProfile = String(object.conversationProfile); - switch (object.participantRole) { - default: - if (typeof object.participantRole === "number") { - message.participantRole = object.participantRole; - break; - } - break; - case "ROLE_UNSPECIFIED": - case 0: - message.participantRole = 0; - break; - case "HUMAN_AGENT": - case 1: - message.participantRole = 1; - break; - case "AUTOMATED_AGENT": - case 2: - message.participantRole = 2; - break; - case "END_USER": - case 3: - message.participantRole = 3; - break; - } - switch (object.suggestionFeatureType) { - default: - if (typeof object.suggestionFeatureType === "number") { - message.suggestionFeatureType = object.suggestionFeatureType; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.suggestionFeatureType = 0; - break; - case "ARTICLE_SUGGESTION": - case 1: - message.suggestionFeatureType = 1; - break; - case "FAQ": - case 2: - message.suggestionFeatureType = 2; - break; - case "SMART_REPLY": - case 3: - message.suggestionFeatureType = 3; - break; - } + var message = new $root.google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata(); + if (object.conversationModel != null) + message.conversationModel = String(object.conversationModel); if (object.createTime != null) { if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata.createTime: object expected"); + throw TypeError(".google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata.createTime: object expected"); message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } return message; }; /** - * Creates a plain object from a SetSuggestionFeatureConfigOperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from a DeleteConversationModelOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata + * @memberof google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata} message SetSuggestionFeatureConfigOperationMetadata + * @param {google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata} message DeleteConversationModelOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SetSuggestionFeatureConfigOperationMetadata.toObject = function toObject(message, options) { + DeleteConversationModelOperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.conversationProfile = ""; - object.participantRole = options.enums === String ? "ROLE_UNSPECIFIED" : 0; - object.suggestionFeatureType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.conversationModel = ""; object.createTime = null; } - if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) - object.conversationProfile = message.conversationProfile; - if (message.participantRole != null && message.hasOwnProperty("participantRole")) - object.participantRole = options.enums === String ? $root.google.cloud.dialogflow.v2.Participant.Role[message.participantRole] === undefined ? message.participantRole : $root.google.cloud.dialogflow.v2.Participant.Role[message.participantRole] : message.participantRole; - if (message.suggestionFeatureType != null && message.hasOwnProperty("suggestionFeatureType")) - object.suggestionFeatureType = options.enums === String ? $root.google.cloud.dialogflow.v2.SuggestionFeature.Type[message.suggestionFeatureType] === undefined ? message.suggestionFeatureType : $root.google.cloud.dialogflow.v2.SuggestionFeature.Type[message.suggestionFeatureType] : message.suggestionFeatureType; + if (message.conversationModel != null && message.hasOwnProperty("conversationModel")) + object.conversationModel = message.conversationModel; if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); return object; }; /** - * Converts this SetSuggestionFeatureConfigOperationMetadata to JSON. + * Converts this DeleteConversationModelOperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata + * @memberof google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata * @instance * @returns {Object.} JSON object */ - SetSuggestionFeatureConfigOperationMetadata.prototype.toJSON = function toJSON() { + DeleteConversationModelOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SetSuggestionFeatureConfigOperationMetadata + * Gets the default type url for DeleteConversationModelOperationMetadata * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata + * @memberof google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SetSuggestionFeatureConfigOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteConversationModelOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata"; }; - return SetSuggestionFeatureConfigOperationMetadata; + return DeleteConversationModelOperationMetadata; })(); - v2.ClearSuggestionFeatureConfigOperationMetadata = (function() { + v2.CreateConversationModelEvaluationOperationMetadata = (function() { /** - * Properties of a ClearSuggestionFeatureConfigOperationMetadata. + * Properties of a CreateConversationModelEvaluationOperationMetadata. * @memberof google.cloud.dialogflow.v2 - * @interface IClearSuggestionFeatureConfigOperationMetadata - * @property {string|null} [conversationProfile] ClearSuggestionFeatureConfigOperationMetadata conversationProfile - * @property {google.cloud.dialogflow.v2.Participant.Role|null} [participantRole] ClearSuggestionFeatureConfigOperationMetadata participantRole - * @property {google.cloud.dialogflow.v2.SuggestionFeature.Type|null} [suggestionFeatureType] ClearSuggestionFeatureConfigOperationMetadata suggestionFeatureType - * @property {google.protobuf.ITimestamp|null} [createTime] ClearSuggestionFeatureConfigOperationMetadata createTime + * @interface ICreateConversationModelEvaluationOperationMetadata + * @property {string|null} [conversationModelEvaluation] CreateConversationModelEvaluationOperationMetadata conversationModelEvaluation + * @property {string|null} [conversationModel] CreateConversationModelEvaluationOperationMetadata conversationModel + * @property {google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.State|null} [state] CreateConversationModelEvaluationOperationMetadata state + * @property {google.protobuf.ITimestamp|null} [createTime] CreateConversationModelEvaluationOperationMetadata createTime */ /** - * Constructs a new ClearSuggestionFeatureConfigOperationMetadata. + * Constructs a new CreateConversationModelEvaluationOperationMetadata. * @memberof google.cloud.dialogflow.v2 - * @classdesc Represents a ClearSuggestionFeatureConfigOperationMetadata. - * @implements IClearSuggestionFeatureConfigOperationMetadata + * @classdesc Represents a CreateConversationModelEvaluationOperationMetadata. + * @implements ICreateConversationModelEvaluationOperationMetadata * @constructor - * @param {google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigOperationMetadata=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2.ICreateConversationModelEvaluationOperationMetadata=} [properties] Properties to set */ - function ClearSuggestionFeatureConfigOperationMetadata(properties) { + function CreateConversationModelEvaluationOperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -65867,116 +67782,116 @@ } /** - * ClearSuggestionFeatureConfigOperationMetadata conversationProfile. - * @member {string} conversationProfile - * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata + * CreateConversationModelEvaluationOperationMetadata conversationModelEvaluation. + * @member {string} conversationModelEvaluation + * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata * @instance */ - ClearSuggestionFeatureConfigOperationMetadata.prototype.conversationProfile = ""; + CreateConversationModelEvaluationOperationMetadata.prototype.conversationModelEvaluation = ""; /** - * ClearSuggestionFeatureConfigOperationMetadata participantRole. - * @member {google.cloud.dialogflow.v2.Participant.Role} participantRole - * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata + * CreateConversationModelEvaluationOperationMetadata conversationModel. + * @member {string} conversationModel + * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata * @instance */ - ClearSuggestionFeatureConfigOperationMetadata.prototype.participantRole = 0; + CreateConversationModelEvaluationOperationMetadata.prototype.conversationModel = ""; /** - * ClearSuggestionFeatureConfigOperationMetadata suggestionFeatureType. - * @member {google.cloud.dialogflow.v2.SuggestionFeature.Type} suggestionFeatureType - * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata + * CreateConversationModelEvaluationOperationMetadata state. + * @member {google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.State} state + * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata * @instance */ - ClearSuggestionFeatureConfigOperationMetadata.prototype.suggestionFeatureType = 0; + CreateConversationModelEvaluationOperationMetadata.prototype.state = 0; /** - * ClearSuggestionFeatureConfigOperationMetadata createTime. + * CreateConversationModelEvaluationOperationMetadata createTime. * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata + * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata * @instance */ - ClearSuggestionFeatureConfigOperationMetadata.prototype.createTime = null; + CreateConversationModelEvaluationOperationMetadata.prototype.createTime = null; /** - * Creates a new ClearSuggestionFeatureConfigOperationMetadata instance using the specified properties. + * Creates a new CreateConversationModelEvaluationOperationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata + * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata} ClearSuggestionFeatureConfigOperationMetadata instance + * @param {google.cloud.dialogflow.v2.ICreateConversationModelEvaluationOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata} CreateConversationModelEvaluationOperationMetadata instance */ - ClearSuggestionFeatureConfigOperationMetadata.create = function create(properties) { - return new ClearSuggestionFeatureConfigOperationMetadata(properties); + CreateConversationModelEvaluationOperationMetadata.create = function create(properties) { + return new CreateConversationModelEvaluationOperationMetadata(properties); }; /** - * Encodes the specified ClearSuggestionFeatureConfigOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata.verify|verify} messages. + * Encodes the specified CreateConversationModelEvaluationOperationMetadata message. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata + * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigOperationMetadata} message ClearSuggestionFeatureConfigOperationMetadata message or plain object to encode + * @param {google.cloud.dialogflow.v2.ICreateConversationModelEvaluationOperationMetadata} message CreateConversationModelEvaluationOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClearSuggestionFeatureConfigOperationMetadata.encode = function encode(message, writer) { + CreateConversationModelEvaluationOperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.conversationProfile != null && Object.hasOwnProperty.call(message, "conversationProfile")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversationProfile); - if (message.participantRole != null && Object.hasOwnProperty.call(message, "participantRole")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.participantRole); - if (message.suggestionFeatureType != null && Object.hasOwnProperty.call(message, "suggestionFeatureType")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.suggestionFeatureType); + if (message.conversationModelEvaluation != null && Object.hasOwnProperty.call(message, "conversationModelEvaluation")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversationModelEvaluation); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); 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(); + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.conversationModel != null && Object.hasOwnProperty.call(message, "conversationModel")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.conversationModel); return writer; }; /** - * Encodes the specified ClearSuggestionFeatureConfigOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata.verify|verify} messages. + * Encodes the specified CreateConversationModelEvaluationOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata + * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.IClearSuggestionFeatureConfigOperationMetadata} message ClearSuggestionFeatureConfigOperationMetadata message or plain object to encode + * @param {google.cloud.dialogflow.v2.ICreateConversationModelEvaluationOperationMetadata} message CreateConversationModelEvaluationOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClearSuggestionFeatureConfigOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + CreateConversationModelEvaluationOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ClearSuggestionFeatureConfigOperationMetadata message from the specified reader or buffer. + * Decodes a CreateConversationModelEvaluationOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata + * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata} ClearSuggestionFeatureConfigOperationMetadata + * @returns {google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata} CreateConversationModelEvaluationOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ClearSuggestionFeatureConfigOperationMetadata.decode = function decode(reader, length) { + CreateConversationModelEvaluationOperationMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.conversationProfile = reader.string(); + message.conversationModelEvaluation = reader.string(); break; } - case 2: { - message.participantRole = reader.int32(); + case 4: { + message.conversationModel = reader.string(); break; } - case 3: { - message.suggestionFeatureType = reader.int32(); + case 2: { + message.state = reader.int32(); break; } - case 4: { + case 3: { message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } @@ -65989,53 +67904,48 @@ }; /** - * Decodes a ClearSuggestionFeatureConfigOperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a CreateConversationModelEvaluationOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata + * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata} ClearSuggestionFeatureConfigOperationMetadata + * @returns {google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata} CreateConversationModelEvaluationOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ClearSuggestionFeatureConfigOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + CreateConversationModelEvaluationOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ClearSuggestionFeatureConfigOperationMetadata message. + * Verifies a CreateConversationModelEvaluationOperationMetadata message. * @function verify - * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata + * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ClearSuggestionFeatureConfigOperationMetadata.verify = function verify(message) { + CreateConversationModelEvaluationOperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) - if (!$util.isString(message.conversationProfile)) - return "conversationProfile: string expected"; - if (message.participantRole != null && message.hasOwnProperty("participantRole")) - switch (message.participantRole) { - default: - return "participantRole: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.suggestionFeatureType != null && message.hasOwnProperty("suggestionFeatureType")) - switch (message.suggestionFeatureType) { + if (message.conversationModelEvaluation != null && message.hasOwnProperty("conversationModelEvaluation")) + if (!$util.isString(message.conversationModelEvaluation)) + return "conversationModelEvaluation: string expected"; + if (message.conversationModel != null && message.hasOwnProperty("conversationModel")) + if (!$util.isString(message.conversationModel)) + return "conversationModel: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { default: - return "suggestionFeatureType: enum value expected"; + return "state: enum value expected"; case 0: case 1: case 2: case 3: + case 4: + case 5: break; } if (message.createTime != null && message.hasOwnProperty("createTime")) { @@ -66047,132 +67957,140 @@ }; /** - * Creates a ClearSuggestionFeatureConfigOperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a CreateConversationModelEvaluationOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata + * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata} ClearSuggestionFeatureConfigOperationMetadata + * @returns {google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata} CreateConversationModelEvaluationOperationMetadata */ - ClearSuggestionFeatureConfigOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata) + CreateConversationModelEvaluationOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata) return object; - var message = new $root.google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata(); - if (object.conversationProfile != null) - message.conversationProfile = String(object.conversationProfile); - switch (object.participantRole) { + var message = new $root.google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata(); + if (object.conversationModelEvaluation != null) + message.conversationModelEvaluation = String(object.conversationModelEvaluation); + if (object.conversationModel != null) + message.conversationModel = String(object.conversationModel); + switch (object.state) { default: - if (typeof object.participantRole === "number") { - message.participantRole = object.participantRole; + if (typeof object.state === "number") { + message.state = object.state; break; } break; - case "ROLE_UNSPECIFIED": + case "STATE_UNSPECIFIED": case 0: - message.participantRole = 0; + message.state = 0; break; - case "HUMAN_AGENT": + case "INITIALIZING": case 1: - message.participantRole = 1; + message.state = 1; break; - case "AUTOMATED_AGENT": + case "RUNNING": case 2: - message.participantRole = 2; + message.state = 2; break; - case "END_USER": + case "CANCELLED": case 3: - message.participantRole = 3; - break; - } - switch (object.suggestionFeatureType) { - default: - if (typeof object.suggestionFeatureType === "number") { - message.suggestionFeatureType = object.suggestionFeatureType; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.suggestionFeatureType = 0; - break; - case "ARTICLE_SUGGESTION": - case 1: - message.suggestionFeatureType = 1; + message.state = 3; break; - case "FAQ": - case 2: - message.suggestionFeatureType = 2; + case "SUCCEEDED": + case 4: + message.state = 4; break; - case "SMART_REPLY": - case 3: - message.suggestionFeatureType = 3; + case "FAILED": + case 5: + message.state = 5; break; } if (object.createTime != null) { if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata.createTime: object expected"); + throw TypeError(".google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.createTime: object expected"); message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } return message; }; /** - * Creates a plain object from a ClearSuggestionFeatureConfigOperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from a CreateConversationModelEvaluationOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata + * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata * @static - * @param {google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata} message ClearSuggestionFeatureConfigOperationMetadata + * @param {google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata} message CreateConversationModelEvaluationOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ClearSuggestionFeatureConfigOperationMetadata.toObject = function toObject(message, options) { + CreateConversationModelEvaluationOperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.conversationProfile = ""; - object.participantRole = options.enums === String ? "ROLE_UNSPECIFIED" : 0; - object.suggestionFeatureType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.conversationModelEvaluation = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; object.createTime = null; + object.conversationModel = ""; } - if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) - object.conversationProfile = message.conversationProfile; - if (message.participantRole != null && message.hasOwnProperty("participantRole")) - object.participantRole = options.enums === String ? $root.google.cloud.dialogflow.v2.Participant.Role[message.participantRole] === undefined ? message.participantRole : $root.google.cloud.dialogflow.v2.Participant.Role[message.participantRole] : message.participantRole; - if (message.suggestionFeatureType != null && message.hasOwnProperty("suggestionFeatureType")) - object.suggestionFeatureType = options.enums === String ? $root.google.cloud.dialogflow.v2.SuggestionFeature.Type[message.suggestionFeatureType] === undefined ? message.suggestionFeatureType : $root.google.cloud.dialogflow.v2.SuggestionFeature.Type[message.suggestionFeatureType] : message.suggestionFeatureType; + if (message.conversationModelEvaluation != null && message.hasOwnProperty("conversationModelEvaluation")) + object.conversationModelEvaluation = message.conversationModelEvaluation; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.State[message.state] === undefined ? message.state : $root.google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.State[message.state] : message.state; if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.conversationModel != null && message.hasOwnProperty("conversationModel")) + object.conversationModel = message.conversationModel; return object; }; /** - * Converts this ClearSuggestionFeatureConfigOperationMetadata to JSON. + * Converts this CreateConversationModelEvaluationOperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata + * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata * @instance * @returns {Object.} JSON object */ - ClearSuggestionFeatureConfigOperationMetadata.prototype.toJSON = function toJSON() { + CreateConversationModelEvaluationOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ClearSuggestionFeatureConfigOperationMetadata + * Gets the default type url for CreateConversationModelEvaluationOperationMetadata * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata + * @memberof google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ClearSuggestionFeatureConfigOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateConversationModelEvaluationOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata"; }; - return ClearSuggestionFeatureConfigOperationMetadata; + /** + * State enum. + * @name google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} INITIALIZING=1 INITIALIZING value + * @property {number} RUNNING=2 RUNNING value + * @property {number} CANCELLED=3 CANCELLED value + * @property {number} SUCCEEDED=4 SUCCEEDED value + * @property {number} FAILED=5 FAILED value + */ + CreateConversationModelEvaluationOperationMetadata.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INITIALIZING"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "CANCELLED"] = 3; + values[valuesById[4] = "SUCCEEDED"] = 4; + values[valuesById[5] = "FAILED"] = 5; + return values; + })(); + + return CreateConversationModelEvaluationOperationMetadata; })(); v2.Documents = (function() { @@ -92606,6 +94524,7 @@ * @property {google.protobuf.IStruct|null} [cxParameters] StreamingAnalyzeContentRequest cxParameters * @property {string|null} [cxCurrentPage] StreamingAnalyzeContentRequest cxCurrentPage * @property {boolean|null} [enablePartialAutomatedAgentReply] StreamingAnalyzeContentRequest enablePartialAutomatedAgentReply + * @property {boolean|null} [enableDebuggingInfo] StreamingAnalyzeContentRequest enableDebuggingInfo */ /** @@ -92719,6 +94638,14 @@ */ StreamingAnalyzeContentRequest.prototype.enablePartialAutomatedAgentReply = false; + /** + * StreamingAnalyzeContentRequest enableDebuggingInfo. + * @member {boolean} enableDebuggingInfo + * @memberof google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest + * @instance + */ + StreamingAnalyzeContentRequest.prototype.enableDebuggingInfo = false; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -92792,6 +94719,8 @@ $root.google.protobuf.Struct.encode(message.cxParameters, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); if (message.cxCurrentPage != null && Object.hasOwnProperty.call(message, "cxCurrentPage")) writer.uint32(/* id 15, wireType 2 =*/122).string(message.cxCurrentPage); + if (message.enableDebuggingInfo != null && Object.hasOwnProperty.call(message, "enableDebuggingInfo")) + writer.uint32(/* id 19, wireType 0 =*/152).bool(message.enableDebuggingInfo); return writer; }; @@ -92874,6 +94803,10 @@ message.enablePartialAutomatedAgentReply = reader.bool(); break; } + case 19: { + message.enableDebuggingInfo = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -92979,6 +94912,9 @@ if (message.enablePartialAutomatedAgentReply != null && message.hasOwnProperty("enablePartialAutomatedAgentReply")) if (typeof message.enablePartialAutomatedAgentReply !== "boolean") return "enablePartialAutomatedAgentReply: boolean expected"; + if (message.enableDebuggingInfo != null && message.hasOwnProperty("enableDebuggingInfo")) + if (typeof message.enableDebuggingInfo !== "boolean") + return "enableDebuggingInfo: boolean expected"; return null; }; @@ -93042,6 +94978,8 @@ message.cxCurrentPage = String(object.cxCurrentPage); if (object.enablePartialAutomatedAgentReply != null) message.enablePartialAutomatedAgentReply = Boolean(object.enablePartialAutomatedAgentReply); + if (object.enableDebuggingInfo != null) + message.enableDebuggingInfo = Boolean(object.enableDebuggingInfo); return message; }; @@ -93066,6 +95004,7 @@ object.enablePartialAutomatedAgentReply = false; object.cxParameters = null; object.cxCurrentPage = ""; + object.enableDebuggingInfo = false; } if (message.participant != null && message.hasOwnProperty("participant")) object.participant = message.participant; @@ -93106,6 +95045,8 @@ object.cxParameters = $root.google.protobuf.Struct.toObject(message.cxParameters, options); if (message.cxCurrentPage != null && message.hasOwnProperty("cxCurrentPage")) object.cxCurrentPage = message.cxCurrentPage; + if (message.enableDebuggingInfo != null && message.hasOwnProperty("enableDebuggingInfo")) + object.enableDebuggingInfo = message.enableDebuggingInfo; return object; }; @@ -93152,6 +95093,7 @@ * @property {Array.|null} [humanAgentSuggestionResults] StreamingAnalyzeContentResponse humanAgentSuggestionResults * @property {Array.|null} [endUserSuggestionResults] StreamingAnalyzeContentResponse endUserSuggestionResults * @property {google.cloud.dialogflow.v2beta1.IDtmfParameters|null} [dtmfParameters] StreamingAnalyzeContentResponse dtmfParameters + * @property {google.cloud.dialogflow.v2beta1.ICloudConversationDebuggingInfo|null} [debuggingInfo] StreamingAnalyzeContentResponse debuggingInfo */ /** @@ -93235,6 +95177,14 @@ */ StreamingAnalyzeContentResponse.prototype.dtmfParameters = null; + /** + * StreamingAnalyzeContentResponse debuggingInfo. + * @member {google.cloud.dialogflow.v2beta1.ICloudConversationDebuggingInfo|null|undefined} debuggingInfo + * @memberof google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse + * @instance + */ + StreamingAnalyzeContentResponse.prototype.debuggingInfo = null; + /** * Creates a new StreamingAnalyzeContentResponse instance using the specified properties. * @function create @@ -93277,6 +95227,8 @@ $root.google.cloud.dialogflow.v2beta1.SuggestionResult.encode(message.endUserSuggestionResults[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.dtmfParameters != null && Object.hasOwnProperty.call(message, "dtmfParameters")) $root.google.cloud.dialogflow.v2beta1.DtmfParameters.encode(message.dtmfParameters, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.debuggingInfo != null && Object.hasOwnProperty.call(message, "debuggingInfo")) + $root.google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo.encode(message.debuggingInfo, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); return writer; }; @@ -93347,6 +95299,10 @@ message.dtmfParameters = $root.google.cloud.dialogflow.v2beta1.DtmfParameters.decode(reader, reader.uint32()); break; } + case 11: { + message.debuggingInfo = $root.google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -93428,6 +95384,11 @@ if (error) return "dtmfParameters." + error; } + if (message.debuggingInfo != null && message.hasOwnProperty("debuggingInfo")) { + var error = $root.google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo.verify(message.debuggingInfo); + if (error) + return "debuggingInfo." + error; + } return null; }; @@ -93490,6 +95451,11 @@ throw TypeError(".google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse.dtmfParameters: object expected"); message.dtmfParameters = $root.google.cloud.dialogflow.v2beta1.DtmfParameters.fromObject(object.dtmfParameters); } + if (object.debuggingInfo != null) { + if (typeof object.debuggingInfo !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse.debuggingInfo: object expected"); + message.debuggingInfo = $root.google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo.fromObject(object.debuggingInfo); + } return message; }; @@ -93517,6 +95483,7 @@ object.automatedAgentReply = null; object.message = null; object.dtmfParameters = null; + object.debuggingInfo = null; } if (message.recognitionResult != null && message.hasOwnProperty("recognitionResult")) object.recognitionResult = $root.google.cloud.dialogflow.v2beta1.StreamingRecognitionResult.toObject(message.recognitionResult, options); @@ -93540,6 +95507,8 @@ } if (message.dtmfParameters != null && message.hasOwnProperty("dtmfParameters")) object.dtmfParameters = $root.google.cloud.dialogflow.v2beta1.DtmfParameters.toObject(message.dtmfParameters, options); + if (message.debuggingInfo != null && message.hasOwnProperty("debuggingInfo")) + object.debuggingInfo = $root.google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo.toObject(message.debuggingInfo, options); return object; }; @@ -101665,6 +103634,7 @@ * @property {boolean|null} [singleUtterance] InputAudioConfig singleUtterance * @property {boolean|null} [disableNoSpeechRecognizedEvent] InputAudioConfig disableNoSpeechRecognizedEvent * @property {google.cloud.dialogflow.v2beta1.IBargeInConfig|null} [bargeInConfig] InputAudioConfig bargeInConfig + * @property {boolean|null} [enableAutomaticPunctuation] InputAudioConfig enableAutomaticPunctuation */ /** @@ -101772,6 +103742,14 @@ */ InputAudioConfig.prototype.bargeInConfig = null; + /** + * InputAudioConfig enableAutomaticPunctuation. + * @member {boolean} enableAutomaticPunctuation + * @memberof google.cloud.dialogflow.v2beta1.InputAudioConfig + * @instance + */ + InputAudioConfig.prototype.enableAutomaticPunctuation = false; + /** * Creates a new InputAudioConfig instance using the specified properties. * @function create @@ -101820,6 +103798,8 @@ writer.uint32(/* id 14, wireType 0 =*/112).bool(message.disableNoSpeechRecognizedEvent); if (message.bargeInConfig != null && Object.hasOwnProperty.call(message, "bargeInConfig")) $root.google.cloud.dialogflow.v2beta1.BargeInConfig.encode(message.bargeInConfig, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.enableAutomaticPunctuation != null && Object.hasOwnProperty.call(message, "enableAutomaticPunctuation")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.enableAutomaticPunctuation); return writer; }; @@ -101902,6 +103882,10 @@ message.bargeInConfig = $root.google.cloud.dialogflow.v2beta1.BargeInConfig.decode(reader, reader.uint32()); break; } + case 17: { + message.enableAutomaticPunctuation = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -102000,6 +103984,9 @@ if (error) return "bargeInConfig." + error; } + if (message.enableAutomaticPunctuation != null && message.hasOwnProperty("enableAutomaticPunctuation")) + if (typeof message.enableAutomaticPunctuation !== "boolean") + return "enableAutomaticPunctuation: boolean expected"; return null; }; @@ -102113,6 +104100,8 @@ throw TypeError(".google.cloud.dialogflow.v2beta1.InputAudioConfig.bargeInConfig: object expected"); message.bargeInConfig = $root.google.cloud.dialogflow.v2beta1.BargeInConfig.fromObject(object.bargeInConfig); } + if (object.enableAutomaticPunctuation != null) + message.enableAutomaticPunctuation = Boolean(object.enableAutomaticPunctuation); return message; }; @@ -102143,6 +104132,7 @@ object.enableWordInfo = false; object.disableNoSpeechRecognizedEvent = false; object.bargeInConfig = null; + object.enableAutomaticPunctuation = false; } if (message.audioEncoding != null && message.hasOwnProperty("audioEncoding")) object.audioEncoding = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.AudioEncoding[message.audioEncoding] === undefined ? message.audioEncoding : $root.google.cloud.dialogflow.v2beta1.AudioEncoding[message.audioEncoding] : message.audioEncoding; @@ -102172,6 +104162,8 @@ object.disableNoSpeechRecognizedEvent = message.disableNoSpeechRecognizedEvent; if (message.bargeInConfig != null && message.hasOwnProperty("bargeInConfig")) object.bargeInConfig = $root.google.cloud.dialogflow.v2beta1.BargeInConfig.toObject(message.bargeInConfig, options); + if (message.enableAutomaticPunctuation != null && message.hasOwnProperty("enableAutomaticPunctuation")) + object.enableAutomaticPunctuation = message.enableAutomaticPunctuation; return object; }; @@ -106648,6 +108640,7 @@ * @property {google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null} [outputAudioConfig] StreamingDetectIntentRequest outputAudioConfig * @property {google.protobuf.IFieldMask|null} [outputAudioConfigMask] StreamingDetectIntentRequest outputAudioConfigMask * @property {Uint8Array|null} [inputAudio] StreamingDetectIntentRequest inputAudio + * @property {boolean|null} [enableDebuggingInfo] StreamingDetectIntentRequest enableDebuggingInfo */ /** @@ -106721,6 +108714,14 @@ */ StreamingDetectIntentRequest.prototype.inputAudio = $util.newBuffer([]); + /** + * StreamingDetectIntentRequest enableDebuggingInfo. + * @member {boolean} enableDebuggingInfo + * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest + * @instance + */ + StreamingDetectIntentRequest.prototype.enableDebuggingInfo = false; + /** * Creates a new StreamingDetectIntentRequest instance using the specified properties. * @function create @@ -106759,6 +108760,8 @@ writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.inputAudio); if (message.outputAudioConfigMask != null && Object.hasOwnProperty.call(message, "outputAudioConfigMask")) $root.google.protobuf.FieldMask.encode(message.outputAudioConfigMask, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.enableDebuggingInfo != null && Object.hasOwnProperty.call(message, "enableDebuggingInfo")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.enableDebuggingInfo); return writer; }; @@ -106821,6 +108824,10 @@ message.inputAudio = reader.bytes(); break; } + case 8: { + message.enableDebuggingInfo = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -106885,6 +108892,9 @@ if (message.inputAudio != null && message.hasOwnProperty("inputAudio")) if (!(message.inputAudio && typeof message.inputAudio.length === "number" || $util.isString(message.inputAudio))) return "inputAudio: buffer expected"; + if (message.enableDebuggingInfo != null && message.hasOwnProperty("enableDebuggingInfo")) + if (typeof message.enableDebuggingInfo !== "boolean") + return "enableDebuggingInfo: boolean expected"; return null; }; @@ -106929,6 +108939,8 @@ $util.base64.decode(object.inputAudio, message.inputAudio = $util.newBuffer($util.base64.length(object.inputAudio)), 0); else if (object.inputAudio.length >= 0) message.inputAudio = object.inputAudio; + if (object.enableDebuggingInfo != null) + message.enableDebuggingInfo = Boolean(object.enableDebuggingInfo); return message; }; @@ -106959,6 +108971,7 @@ object.inputAudio = $util.newBuffer(object.inputAudio); } object.outputAudioConfigMask = null; + object.enableDebuggingInfo = false; } if (message.session != null && message.hasOwnProperty("session")) object.session = message.session; @@ -106974,6 +108987,8 @@ object.inputAudio = options.bytes === String ? $util.base64.encode(message.inputAudio, 0, message.inputAudio.length) : options.bytes === Array ? Array.prototype.slice.call(message.inputAudio) : message.inputAudio; if (message.outputAudioConfigMask != null && message.hasOwnProperty("outputAudioConfigMask")) object.outputAudioConfigMask = $root.google.protobuf.FieldMask.toObject(message.outputAudioConfigMask, options); + if (message.enableDebuggingInfo != null && message.hasOwnProperty("enableDebuggingInfo")) + object.enableDebuggingInfo = message.enableDebuggingInfo; return object; }; @@ -107006,6 +109021,694 @@ return StreamingDetectIntentRequest; })(); + v2beta1.CloudConversationDebuggingInfo = (function() { + + /** + * Properties of a CloudConversationDebuggingInfo. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface ICloudConversationDebuggingInfo + * @property {number|null} [audioDataChunks] CloudConversationDebuggingInfo audioDataChunks + * @property {google.protobuf.IDuration|null} [resultEndTimeOffset] CloudConversationDebuggingInfo resultEndTimeOffset + * @property {google.protobuf.IDuration|null} [firstAudioDuration] CloudConversationDebuggingInfo firstAudioDuration + * @property {boolean|null} [singleUtterance] CloudConversationDebuggingInfo singleUtterance + * @property {Array.|null} [speechPartialResultsEndTimes] CloudConversationDebuggingInfo speechPartialResultsEndTimes + * @property {Array.|null} [speechFinalResultsEndTimes] CloudConversationDebuggingInfo speechFinalResultsEndTimes + * @property {number|null} [partialResponses] CloudConversationDebuggingInfo partialResponses + * @property {number|null} [speakerIdPassiveLatencyMsOffset] CloudConversationDebuggingInfo speakerIdPassiveLatencyMsOffset + * @property {boolean|null} [bargeinEventTriggered] CloudConversationDebuggingInfo bargeinEventTriggered + * @property {boolean|null} [speechSingleUtterance] CloudConversationDebuggingInfo speechSingleUtterance + * @property {Array.|null} [dtmfPartialResultsTimes] CloudConversationDebuggingInfo dtmfPartialResultsTimes + * @property {Array.|null} [dtmfFinalResultsTimes] CloudConversationDebuggingInfo dtmfFinalResultsTimes + * @property {google.protobuf.IDuration|null} [singleUtteranceEndTimeOffset] CloudConversationDebuggingInfo singleUtteranceEndTimeOffset + * @property {google.protobuf.IDuration|null} [noSpeechTimeout] CloudConversationDebuggingInfo noSpeechTimeout + * @property {boolean|null} [isInputText] CloudConversationDebuggingInfo isInputText + * @property {google.protobuf.IDuration|null} [clientHalfCloseTimeOffset] CloudConversationDebuggingInfo clientHalfCloseTimeOffset + * @property {google.protobuf.IDuration|null} [clientHalfCloseStreamingTimeOffset] CloudConversationDebuggingInfo clientHalfCloseStreamingTimeOffset + */ + + /** + * Constructs a new CloudConversationDebuggingInfo. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a CloudConversationDebuggingInfo. + * @implements ICloudConversationDebuggingInfo + * @constructor + * @param {google.cloud.dialogflow.v2beta1.ICloudConversationDebuggingInfo=} [properties] Properties to set + */ + function CloudConversationDebuggingInfo(properties) { + this.speechPartialResultsEndTimes = []; + this.speechFinalResultsEndTimes = []; + this.dtmfPartialResultsTimes = []; + this.dtmfFinalResultsTimes = []; + 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]]; + } + + /** + * CloudConversationDebuggingInfo audioDataChunks. + * @member {number} audioDataChunks + * @memberof google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.audioDataChunks = 0; + + /** + * CloudConversationDebuggingInfo resultEndTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} resultEndTimeOffset + * @memberof google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.resultEndTimeOffset = null; + + /** + * CloudConversationDebuggingInfo firstAudioDuration. + * @member {google.protobuf.IDuration|null|undefined} firstAudioDuration + * @memberof google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.firstAudioDuration = null; + + /** + * CloudConversationDebuggingInfo singleUtterance. + * @member {boolean} singleUtterance + * @memberof google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.singleUtterance = false; + + /** + * CloudConversationDebuggingInfo speechPartialResultsEndTimes. + * @member {Array.} speechPartialResultsEndTimes + * @memberof google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.speechPartialResultsEndTimes = $util.emptyArray; + + /** + * CloudConversationDebuggingInfo speechFinalResultsEndTimes. + * @member {Array.} speechFinalResultsEndTimes + * @memberof google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.speechFinalResultsEndTimes = $util.emptyArray; + + /** + * CloudConversationDebuggingInfo partialResponses. + * @member {number} partialResponses + * @memberof google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.partialResponses = 0; + + /** + * CloudConversationDebuggingInfo speakerIdPassiveLatencyMsOffset. + * @member {number} speakerIdPassiveLatencyMsOffset + * @memberof google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.speakerIdPassiveLatencyMsOffset = 0; + + /** + * CloudConversationDebuggingInfo bargeinEventTriggered. + * @member {boolean} bargeinEventTriggered + * @memberof google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.bargeinEventTriggered = false; + + /** + * CloudConversationDebuggingInfo speechSingleUtterance. + * @member {boolean} speechSingleUtterance + * @memberof google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.speechSingleUtterance = false; + + /** + * CloudConversationDebuggingInfo dtmfPartialResultsTimes. + * @member {Array.} dtmfPartialResultsTimes + * @memberof google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.dtmfPartialResultsTimes = $util.emptyArray; + + /** + * CloudConversationDebuggingInfo dtmfFinalResultsTimes. + * @member {Array.} dtmfFinalResultsTimes + * @memberof google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.dtmfFinalResultsTimes = $util.emptyArray; + + /** + * CloudConversationDebuggingInfo singleUtteranceEndTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} singleUtteranceEndTimeOffset + * @memberof google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.singleUtteranceEndTimeOffset = null; + + /** + * CloudConversationDebuggingInfo noSpeechTimeout. + * @member {google.protobuf.IDuration|null|undefined} noSpeechTimeout + * @memberof google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.noSpeechTimeout = null; + + /** + * CloudConversationDebuggingInfo isInputText. + * @member {boolean} isInputText + * @memberof google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.isInputText = false; + + /** + * CloudConversationDebuggingInfo clientHalfCloseTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} clientHalfCloseTimeOffset + * @memberof google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.clientHalfCloseTimeOffset = null; + + /** + * CloudConversationDebuggingInfo clientHalfCloseStreamingTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} clientHalfCloseStreamingTimeOffset + * @memberof google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo + * @instance + */ + CloudConversationDebuggingInfo.prototype.clientHalfCloseStreamingTimeOffset = null; + + /** + * Creates a new CloudConversationDebuggingInfo instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo + * @static + * @param {google.cloud.dialogflow.v2beta1.ICloudConversationDebuggingInfo=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo} CloudConversationDebuggingInfo instance + */ + CloudConversationDebuggingInfo.create = function create(properties) { + return new CloudConversationDebuggingInfo(properties); + }; + + /** + * Encodes the specified CloudConversationDebuggingInfo message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo + * @static + * @param {google.cloud.dialogflow.v2beta1.ICloudConversationDebuggingInfo} message CloudConversationDebuggingInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudConversationDebuggingInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.audioDataChunks != null && Object.hasOwnProperty.call(message, "audioDataChunks")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.audioDataChunks); + if (message.resultEndTimeOffset != null && Object.hasOwnProperty.call(message, "resultEndTimeOffset")) + $root.google.protobuf.Duration.encode(message.resultEndTimeOffset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.firstAudioDuration != null && Object.hasOwnProperty.call(message, "firstAudioDuration")) + $root.google.protobuf.Duration.encode(message.firstAudioDuration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.singleUtterance != null && Object.hasOwnProperty.call(message, "singleUtterance")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.singleUtterance); + if (message.speechPartialResultsEndTimes != null && message.speechPartialResultsEndTimes.length) + for (var i = 0; i < message.speechPartialResultsEndTimes.length; ++i) + $root.google.protobuf.Duration.encode(message.speechPartialResultsEndTimes[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.speechFinalResultsEndTimes != null && message.speechFinalResultsEndTimes.length) + for (var i = 0; i < message.speechFinalResultsEndTimes.length; ++i) + $root.google.protobuf.Duration.encode(message.speechFinalResultsEndTimes[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.partialResponses != null && Object.hasOwnProperty.call(message, "partialResponses")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.partialResponses); + if (message.speakerIdPassiveLatencyMsOffset != null && Object.hasOwnProperty.call(message, "speakerIdPassiveLatencyMsOffset")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.speakerIdPassiveLatencyMsOffset); + if (message.bargeinEventTriggered != null && Object.hasOwnProperty.call(message, "bargeinEventTriggered")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.bargeinEventTriggered); + if (message.speechSingleUtterance != null && Object.hasOwnProperty.call(message, "speechSingleUtterance")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.speechSingleUtterance); + if (message.dtmfPartialResultsTimes != null && message.dtmfPartialResultsTimes.length) + for (var i = 0; i < message.dtmfPartialResultsTimes.length; ++i) + $root.google.protobuf.Duration.encode(message.dtmfPartialResultsTimes[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.dtmfFinalResultsTimes != null && message.dtmfFinalResultsTimes.length) + for (var i = 0; i < message.dtmfFinalResultsTimes.length; ++i) + $root.google.protobuf.Duration.encode(message.dtmfFinalResultsTimes[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.singleUtteranceEndTimeOffset != null && Object.hasOwnProperty.call(message, "singleUtteranceEndTimeOffset")) + $root.google.protobuf.Duration.encode(message.singleUtteranceEndTimeOffset, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.noSpeechTimeout != null && Object.hasOwnProperty.call(message, "noSpeechTimeout")) + $root.google.protobuf.Duration.encode(message.noSpeechTimeout, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.isInputText != null && Object.hasOwnProperty.call(message, "isInputText")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.isInputText); + if (message.clientHalfCloseTimeOffset != null && Object.hasOwnProperty.call(message, "clientHalfCloseTimeOffset")) + $root.google.protobuf.Duration.encode(message.clientHalfCloseTimeOffset, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.clientHalfCloseStreamingTimeOffset != null && Object.hasOwnProperty.call(message, "clientHalfCloseStreamingTimeOffset")) + $root.google.protobuf.Duration.encode(message.clientHalfCloseStreamingTimeOffset, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CloudConversationDebuggingInfo message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo + * @static + * @param {google.cloud.dialogflow.v2beta1.ICloudConversationDebuggingInfo} message CloudConversationDebuggingInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudConversationDebuggingInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudConversationDebuggingInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo} CloudConversationDebuggingInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudConversationDebuggingInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.audioDataChunks = reader.int32(); + break; + } + case 2: { + message.resultEndTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 3: { + message.firstAudioDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 5: { + message.singleUtterance = reader.bool(); + break; + } + case 6: { + if (!(message.speechPartialResultsEndTimes && message.speechPartialResultsEndTimes.length)) + message.speechPartialResultsEndTimes = []; + message.speechPartialResultsEndTimes.push($root.google.protobuf.Duration.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.speechFinalResultsEndTimes && message.speechFinalResultsEndTimes.length)) + message.speechFinalResultsEndTimes = []; + message.speechFinalResultsEndTimes.push($root.google.protobuf.Duration.decode(reader, reader.uint32())); + break; + } + case 8: { + message.partialResponses = reader.int32(); + break; + } + case 9: { + message.speakerIdPassiveLatencyMsOffset = reader.int32(); + break; + } + case 10: { + message.bargeinEventTriggered = reader.bool(); + break; + } + case 11: { + message.speechSingleUtterance = reader.bool(); + break; + } + case 12: { + if (!(message.dtmfPartialResultsTimes && message.dtmfPartialResultsTimes.length)) + message.dtmfPartialResultsTimes = []; + message.dtmfPartialResultsTimes.push($root.google.protobuf.Duration.decode(reader, reader.uint32())); + break; + } + case 13: { + if (!(message.dtmfFinalResultsTimes && message.dtmfFinalResultsTimes.length)) + message.dtmfFinalResultsTimes = []; + message.dtmfFinalResultsTimes.push($root.google.protobuf.Duration.decode(reader, reader.uint32())); + break; + } + case 14: { + message.singleUtteranceEndTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 15: { + message.noSpeechTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 16: { + message.isInputText = reader.bool(); + break; + } + case 17: { + message.clientHalfCloseTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 18: { + message.clientHalfCloseStreamingTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudConversationDebuggingInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo} CloudConversationDebuggingInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudConversationDebuggingInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudConversationDebuggingInfo message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudConversationDebuggingInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.audioDataChunks != null && message.hasOwnProperty("audioDataChunks")) + if (!$util.isInteger(message.audioDataChunks)) + return "audioDataChunks: integer expected"; + if (message.resultEndTimeOffset != null && message.hasOwnProperty("resultEndTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.resultEndTimeOffset); + if (error) + return "resultEndTimeOffset." + error; + } + if (message.firstAudioDuration != null && message.hasOwnProperty("firstAudioDuration")) { + var error = $root.google.protobuf.Duration.verify(message.firstAudioDuration); + if (error) + return "firstAudioDuration." + error; + } + if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) + if (typeof message.singleUtterance !== "boolean") + return "singleUtterance: boolean expected"; + if (message.speechPartialResultsEndTimes != null && message.hasOwnProperty("speechPartialResultsEndTimes")) { + if (!Array.isArray(message.speechPartialResultsEndTimes)) + return "speechPartialResultsEndTimes: array expected"; + for (var i = 0; i < message.speechPartialResultsEndTimes.length; ++i) { + var error = $root.google.protobuf.Duration.verify(message.speechPartialResultsEndTimes[i]); + if (error) + return "speechPartialResultsEndTimes." + error; + } + } + if (message.speechFinalResultsEndTimes != null && message.hasOwnProperty("speechFinalResultsEndTimes")) { + if (!Array.isArray(message.speechFinalResultsEndTimes)) + return "speechFinalResultsEndTimes: array expected"; + for (var i = 0; i < message.speechFinalResultsEndTimes.length; ++i) { + var error = $root.google.protobuf.Duration.verify(message.speechFinalResultsEndTimes[i]); + if (error) + return "speechFinalResultsEndTimes." + error; + } + } + if (message.partialResponses != null && message.hasOwnProperty("partialResponses")) + if (!$util.isInteger(message.partialResponses)) + return "partialResponses: integer expected"; + if (message.speakerIdPassiveLatencyMsOffset != null && message.hasOwnProperty("speakerIdPassiveLatencyMsOffset")) + if (!$util.isInteger(message.speakerIdPassiveLatencyMsOffset)) + return "speakerIdPassiveLatencyMsOffset: integer expected"; + if (message.bargeinEventTriggered != null && message.hasOwnProperty("bargeinEventTriggered")) + if (typeof message.bargeinEventTriggered !== "boolean") + return "bargeinEventTriggered: boolean expected"; + if (message.speechSingleUtterance != null && message.hasOwnProperty("speechSingleUtterance")) + if (typeof message.speechSingleUtterance !== "boolean") + return "speechSingleUtterance: boolean expected"; + if (message.dtmfPartialResultsTimes != null && message.hasOwnProperty("dtmfPartialResultsTimes")) { + if (!Array.isArray(message.dtmfPartialResultsTimes)) + return "dtmfPartialResultsTimes: array expected"; + for (var i = 0; i < message.dtmfPartialResultsTimes.length; ++i) { + var error = $root.google.protobuf.Duration.verify(message.dtmfPartialResultsTimes[i]); + if (error) + return "dtmfPartialResultsTimes." + error; + } + } + if (message.dtmfFinalResultsTimes != null && message.hasOwnProperty("dtmfFinalResultsTimes")) { + if (!Array.isArray(message.dtmfFinalResultsTimes)) + return "dtmfFinalResultsTimes: array expected"; + for (var i = 0; i < message.dtmfFinalResultsTimes.length; ++i) { + var error = $root.google.protobuf.Duration.verify(message.dtmfFinalResultsTimes[i]); + if (error) + return "dtmfFinalResultsTimes." + error; + } + } + if (message.singleUtteranceEndTimeOffset != null && message.hasOwnProperty("singleUtteranceEndTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.singleUtteranceEndTimeOffset); + if (error) + return "singleUtteranceEndTimeOffset." + error; + } + if (message.noSpeechTimeout != null && message.hasOwnProperty("noSpeechTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.noSpeechTimeout); + if (error) + return "noSpeechTimeout." + error; + } + if (message.isInputText != null && message.hasOwnProperty("isInputText")) + if (typeof message.isInputText !== "boolean") + return "isInputText: boolean expected"; + if (message.clientHalfCloseTimeOffset != null && message.hasOwnProperty("clientHalfCloseTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.clientHalfCloseTimeOffset); + if (error) + return "clientHalfCloseTimeOffset." + error; + } + if (message.clientHalfCloseStreamingTimeOffset != null && message.hasOwnProperty("clientHalfCloseStreamingTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.clientHalfCloseStreamingTimeOffset); + if (error) + return "clientHalfCloseStreamingTimeOffset." + error; + } + return null; + }; + + /** + * Creates a CloudConversationDebuggingInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo} CloudConversationDebuggingInfo + */ + CloudConversationDebuggingInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo(); + if (object.audioDataChunks != null) + message.audioDataChunks = object.audioDataChunks | 0; + if (object.resultEndTimeOffset != null) { + if (typeof object.resultEndTimeOffset !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo.resultEndTimeOffset: object expected"); + message.resultEndTimeOffset = $root.google.protobuf.Duration.fromObject(object.resultEndTimeOffset); + } + if (object.firstAudioDuration != null) { + if (typeof object.firstAudioDuration !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo.firstAudioDuration: object expected"); + message.firstAudioDuration = $root.google.protobuf.Duration.fromObject(object.firstAudioDuration); + } + if (object.singleUtterance != null) + message.singleUtterance = Boolean(object.singleUtterance); + if (object.speechPartialResultsEndTimes) { + if (!Array.isArray(object.speechPartialResultsEndTimes)) + throw TypeError(".google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo.speechPartialResultsEndTimes: array expected"); + message.speechPartialResultsEndTimes = []; + for (var i = 0; i < object.speechPartialResultsEndTimes.length; ++i) { + if (typeof object.speechPartialResultsEndTimes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo.speechPartialResultsEndTimes: object expected"); + message.speechPartialResultsEndTimes[i] = $root.google.protobuf.Duration.fromObject(object.speechPartialResultsEndTimes[i]); + } + } + if (object.speechFinalResultsEndTimes) { + if (!Array.isArray(object.speechFinalResultsEndTimes)) + throw TypeError(".google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo.speechFinalResultsEndTimes: array expected"); + message.speechFinalResultsEndTimes = []; + for (var i = 0; i < object.speechFinalResultsEndTimes.length; ++i) { + if (typeof object.speechFinalResultsEndTimes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo.speechFinalResultsEndTimes: object expected"); + message.speechFinalResultsEndTimes[i] = $root.google.protobuf.Duration.fromObject(object.speechFinalResultsEndTimes[i]); + } + } + if (object.partialResponses != null) + message.partialResponses = object.partialResponses | 0; + if (object.speakerIdPassiveLatencyMsOffset != null) + message.speakerIdPassiveLatencyMsOffset = object.speakerIdPassiveLatencyMsOffset | 0; + if (object.bargeinEventTriggered != null) + message.bargeinEventTriggered = Boolean(object.bargeinEventTriggered); + if (object.speechSingleUtterance != null) + message.speechSingleUtterance = Boolean(object.speechSingleUtterance); + if (object.dtmfPartialResultsTimes) { + if (!Array.isArray(object.dtmfPartialResultsTimes)) + throw TypeError(".google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo.dtmfPartialResultsTimes: array expected"); + message.dtmfPartialResultsTimes = []; + for (var i = 0; i < object.dtmfPartialResultsTimes.length; ++i) { + if (typeof object.dtmfPartialResultsTimes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo.dtmfPartialResultsTimes: object expected"); + message.dtmfPartialResultsTimes[i] = $root.google.protobuf.Duration.fromObject(object.dtmfPartialResultsTimes[i]); + } + } + if (object.dtmfFinalResultsTimes) { + if (!Array.isArray(object.dtmfFinalResultsTimes)) + throw TypeError(".google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo.dtmfFinalResultsTimes: array expected"); + message.dtmfFinalResultsTimes = []; + for (var i = 0; i < object.dtmfFinalResultsTimes.length; ++i) { + if (typeof object.dtmfFinalResultsTimes[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo.dtmfFinalResultsTimes: object expected"); + message.dtmfFinalResultsTimes[i] = $root.google.protobuf.Duration.fromObject(object.dtmfFinalResultsTimes[i]); + } + } + if (object.singleUtteranceEndTimeOffset != null) { + if (typeof object.singleUtteranceEndTimeOffset !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo.singleUtteranceEndTimeOffset: object expected"); + message.singleUtteranceEndTimeOffset = $root.google.protobuf.Duration.fromObject(object.singleUtteranceEndTimeOffset); + } + if (object.noSpeechTimeout != null) { + if (typeof object.noSpeechTimeout !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo.noSpeechTimeout: object expected"); + message.noSpeechTimeout = $root.google.protobuf.Duration.fromObject(object.noSpeechTimeout); + } + if (object.isInputText != null) + message.isInputText = Boolean(object.isInputText); + if (object.clientHalfCloseTimeOffset != null) { + if (typeof object.clientHalfCloseTimeOffset !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo.clientHalfCloseTimeOffset: object expected"); + message.clientHalfCloseTimeOffset = $root.google.protobuf.Duration.fromObject(object.clientHalfCloseTimeOffset); + } + if (object.clientHalfCloseStreamingTimeOffset != null) { + if (typeof object.clientHalfCloseStreamingTimeOffset !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo.clientHalfCloseStreamingTimeOffset: object expected"); + message.clientHalfCloseStreamingTimeOffset = $root.google.protobuf.Duration.fromObject(object.clientHalfCloseStreamingTimeOffset); + } + return message; + }; + + /** + * Creates a plain object from a CloudConversationDebuggingInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo + * @static + * @param {google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo} message CloudConversationDebuggingInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudConversationDebuggingInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.speechPartialResultsEndTimes = []; + object.speechFinalResultsEndTimes = []; + object.dtmfPartialResultsTimes = []; + object.dtmfFinalResultsTimes = []; + } + if (options.defaults) { + object.audioDataChunks = 0; + object.resultEndTimeOffset = null; + object.firstAudioDuration = null; + object.singleUtterance = false; + object.partialResponses = 0; + object.speakerIdPassiveLatencyMsOffset = 0; + object.bargeinEventTriggered = false; + object.speechSingleUtterance = false; + object.singleUtteranceEndTimeOffset = null; + object.noSpeechTimeout = null; + object.isInputText = false; + object.clientHalfCloseTimeOffset = null; + object.clientHalfCloseStreamingTimeOffset = null; + } + if (message.audioDataChunks != null && message.hasOwnProperty("audioDataChunks")) + object.audioDataChunks = message.audioDataChunks; + if (message.resultEndTimeOffset != null && message.hasOwnProperty("resultEndTimeOffset")) + object.resultEndTimeOffset = $root.google.protobuf.Duration.toObject(message.resultEndTimeOffset, options); + if (message.firstAudioDuration != null && message.hasOwnProperty("firstAudioDuration")) + object.firstAudioDuration = $root.google.protobuf.Duration.toObject(message.firstAudioDuration, options); + if (message.singleUtterance != null && message.hasOwnProperty("singleUtterance")) + object.singleUtterance = message.singleUtterance; + if (message.speechPartialResultsEndTimes && message.speechPartialResultsEndTimes.length) { + object.speechPartialResultsEndTimes = []; + for (var j = 0; j < message.speechPartialResultsEndTimes.length; ++j) + object.speechPartialResultsEndTimes[j] = $root.google.protobuf.Duration.toObject(message.speechPartialResultsEndTimes[j], options); + } + if (message.speechFinalResultsEndTimes && message.speechFinalResultsEndTimes.length) { + object.speechFinalResultsEndTimes = []; + for (var j = 0; j < message.speechFinalResultsEndTimes.length; ++j) + object.speechFinalResultsEndTimes[j] = $root.google.protobuf.Duration.toObject(message.speechFinalResultsEndTimes[j], options); + } + if (message.partialResponses != null && message.hasOwnProperty("partialResponses")) + object.partialResponses = message.partialResponses; + if (message.speakerIdPassiveLatencyMsOffset != null && message.hasOwnProperty("speakerIdPassiveLatencyMsOffset")) + object.speakerIdPassiveLatencyMsOffset = message.speakerIdPassiveLatencyMsOffset; + if (message.bargeinEventTriggered != null && message.hasOwnProperty("bargeinEventTriggered")) + object.bargeinEventTriggered = message.bargeinEventTriggered; + if (message.speechSingleUtterance != null && message.hasOwnProperty("speechSingleUtterance")) + object.speechSingleUtterance = message.speechSingleUtterance; + if (message.dtmfPartialResultsTimes && message.dtmfPartialResultsTimes.length) { + object.dtmfPartialResultsTimes = []; + for (var j = 0; j < message.dtmfPartialResultsTimes.length; ++j) + object.dtmfPartialResultsTimes[j] = $root.google.protobuf.Duration.toObject(message.dtmfPartialResultsTimes[j], options); + } + if (message.dtmfFinalResultsTimes && message.dtmfFinalResultsTimes.length) { + object.dtmfFinalResultsTimes = []; + for (var j = 0; j < message.dtmfFinalResultsTimes.length; ++j) + object.dtmfFinalResultsTimes[j] = $root.google.protobuf.Duration.toObject(message.dtmfFinalResultsTimes[j], options); + } + if (message.singleUtteranceEndTimeOffset != null && message.hasOwnProperty("singleUtteranceEndTimeOffset")) + object.singleUtteranceEndTimeOffset = $root.google.protobuf.Duration.toObject(message.singleUtteranceEndTimeOffset, options); + if (message.noSpeechTimeout != null && message.hasOwnProperty("noSpeechTimeout")) + object.noSpeechTimeout = $root.google.protobuf.Duration.toObject(message.noSpeechTimeout, options); + if (message.isInputText != null && message.hasOwnProperty("isInputText")) + object.isInputText = message.isInputText; + if (message.clientHalfCloseTimeOffset != null && message.hasOwnProperty("clientHalfCloseTimeOffset")) + object.clientHalfCloseTimeOffset = $root.google.protobuf.Duration.toObject(message.clientHalfCloseTimeOffset, options); + if (message.clientHalfCloseStreamingTimeOffset != null && message.hasOwnProperty("clientHalfCloseStreamingTimeOffset")) + object.clientHalfCloseStreamingTimeOffset = $root.google.protobuf.Duration.toObject(message.clientHalfCloseStreamingTimeOffset, options); + return object; + }; + + /** + * Converts this CloudConversationDebuggingInfo to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo + * @instance + * @returns {Object.} JSON object + */ + CloudConversationDebuggingInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudConversationDebuggingInfo + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudConversationDebuggingInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo"; + }; + + return CloudConversationDebuggingInfo; + })(); + v2beta1.StreamingDetectIntentResponse = (function() { /** @@ -107019,6 +109722,7 @@ * @property {google.rpc.IStatus|null} [webhookStatus] StreamingDetectIntentResponse webhookStatus * @property {Uint8Array|null} [outputAudio] StreamingDetectIntentResponse outputAudio * @property {google.cloud.dialogflow.v2beta1.IOutputAudioConfig|null} [outputAudioConfig] StreamingDetectIntentResponse outputAudioConfig + * @property {google.cloud.dialogflow.v2beta1.ICloudConversationDebuggingInfo|null} [debuggingInfo] StreamingDetectIntentResponse debuggingInfo */ /** @@ -107093,6 +109797,14 @@ */ StreamingDetectIntentResponse.prototype.outputAudioConfig = null; + /** + * StreamingDetectIntentResponse debuggingInfo. + * @member {google.cloud.dialogflow.v2beta1.ICloudConversationDebuggingInfo|null|undefined} debuggingInfo + * @memberof google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse + * @instance + */ + StreamingDetectIntentResponse.prototype.debuggingInfo = null; + /** * Creates a new StreamingDetectIntentResponse instance using the specified properties. * @function create @@ -107132,6 +109844,8 @@ if (message.alternativeQueryResults != null && message.alternativeQueryResults.length) for (var i = 0; i < message.alternativeQueryResults.length; ++i) $root.google.cloud.dialogflow.v2beta1.QueryResult.encode(message.alternativeQueryResults[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.debuggingInfo != null && Object.hasOwnProperty.call(message, "debuggingInfo")) + $root.google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo.encode(message.debuggingInfo, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; @@ -107196,6 +109910,10 @@ message.outputAudioConfig = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.decode(reader, reader.uint32()); break; } + case 8: { + message.debuggingInfo = $root.google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -107266,6 +109984,11 @@ if (error) return "outputAudioConfig." + error; } + if (message.debuggingInfo != null && message.hasOwnProperty("debuggingInfo")) { + var error = $root.google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo.verify(message.debuggingInfo); + if (error) + return "debuggingInfo." + error; + } return null; }; @@ -107318,6 +110041,11 @@ throw TypeError(".google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse.outputAudioConfig: object expected"); message.outputAudioConfig = $root.google.cloud.dialogflow.v2beta1.OutputAudioConfig.fromObject(object.outputAudioConfig); } + if (object.debuggingInfo != null) { + if (typeof object.debuggingInfo !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse.debuggingInfo: object expected"); + message.debuggingInfo = $root.google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo.fromObject(object.debuggingInfo); + } return message; }; @@ -107349,6 +110077,7 @@ object.outputAudio = $util.newBuffer(object.outputAudio); } object.outputAudioConfig = null; + object.debuggingInfo = null; } if (message.responseId != null && message.hasOwnProperty("responseId")) object.responseId = message.responseId; @@ -107367,6 +110096,8 @@ for (var j = 0; j < message.alternativeQueryResults.length; ++j) object.alternativeQueryResults[j] = $root.google.cloud.dialogflow.v2beta1.QueryResult.toObject(message.alternativeQueryResults[j], options); } + if (message.debuggingInfo != null && message.hasOwnProperty("debuggingInfo")) + object.debuggingInfo = $root.google.cloud.dialogflow.v2beta1.CloudConversationDebuggingInfo.toObject(message.debuggingInfo, options); return object; }; @@ -134250,6 +136981,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.dialogflow.v2beta1.Conversations|generateStatelessSummary}. + * @memberof google.cloud.dialogflow.v2beta1.Conversations + * @typedef GenerateStatelessSummaryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse} [response] GenerateStatelessSummaryResponse + */ + + /** + * Calls GenerateStatelessSummary. + * @function generateStatelessSummary + * @memberof google.cloud.dialogflow.v2beta1.Conversations + * @instance + * @param {google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryRequest} request GenerateStatelessSummaryRequest message or plain object + * @param {google.cloud.dialogflow.v2beta1.Conversations.GenerateStatelessSummaryCallback} callback Node-style callback called with the error, if any, and GenerateStatelessSummaryResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Conversations.prototype.generateStatelessSummary = function generateStatelessSummary(request, callback) { + return this.rpcCall(generateStatelessSummary, $root.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest, $root.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse, request, callback); + }, "name", { value: "GenerateStatelessSummary" }); + + /** + * Calls GenerateStatelessSummary. + * @function generateStatelessSummary + * @memberof google.cloud.dialogflow.v2beta1.Conversations + * @instance + * @param {google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryRequest} request GenerateStatelessSummaryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return Conversations; })(); @@ -138119,27 +140883,27 @@ return SuggestConversationSummaryResponse; })(); - v2beta1.ConversationEvent = (function() { + v2beta1.GenerateStatelessSummaryRequest = (function() { /** - * Properties of a ConversationEvent. + * Properties of a GenerateStatelessSummaryRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @interface IConversationEvent - * @property {string|null} [conversation] ConversationEvent conversation - * @property {google.cloud.dialogflow.v2beta1.ConversationEvent.Type|null} [type] ConversationEvent type - * @property {google.rpc.IStatus|null} [errorStatus] ConversationEvent errorStatus - * @property {google.cloud.dialogflow.v2beta1.IMessage|null} [newMessagePayload] ConversationEvent newMessagePayload + * @interface IGenerateStatelessSummaryRequest + * @property {google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.IMinimalConversation|null} [statelessConversation] GenerateStatelessSummaryRequest statelessConversation + * @property {google.cloud.dialogflow.v2beta1.IConversationProfile|null} [conversationProfile] GenerateStatelessSummaryRequest conversationProfile + * @property {string|null} [latestMessage] GenerateStatelessSummaryRequest latestMessage + * @property {number|null} [maxContextSize] GenerateStatelessSummaryRequest maxContextSize */ /** - * Constructs a new ConversationEvent. + * Constructs a new GenerateStatelessSummaryRequest. * @memberof google.cloud.dialogflow.v2beta1 - * @classdesc Represents a ConversationEvent. - * @implements IConversationEvent + * @classdesc Represents a GenerateStatelessSummaryRequest. + * @implements IGenerateStatelessSummaryRequest * @constructor - * @param {google.cloud.dialogflow.v2beta1.IConversationEvent=} [properties] Properties to set + * @param {google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryRequest=} [properties] Properties to set */ - function ConversationEvent(properties) { + function GenerateStatelessSummaryRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -138147,131 +140911,117 @@ } /** - * ConversationEvent conversation. - * @member {string} conversation - * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent - * @instance - */ - ConversationEvent.prototype.conversation = ""; - - /** - * ConversationEvent type. - * @member {google.cloud.dialogflow.v2beta1.ConversationEvent.Type} type - * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * GenerateStatelessSummaryRequest statelessConversation. + * @member {google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.IMinimalConversation|null|undefined} statelessConversation + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest * @instance */ - ConversationEvent.prototype.type = 0; + GenerateStatelessSummaryRequest.prototype.statelessConversation = null; /** - * ConversationEvent errorStatus. - * @member {google.rpc.IStatus|null|undefined} errorStatus - * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * GenerateStatelessSummaryRequest conversationProfile. + * @member {google.cloud.dialogflow.v2beta1.IConversationProfile|null|undefined} conversationProfile + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest * @instance */ - ConversationEvent.prototype.errorStatus = null; + GenerateStatelessSummaryRequest.prototype.conversationProfile = null; /** - * ConversationEvent newMessagePayload. - * @member {google.cloud.dialogflow.v2beta1.IMessage|null|undefined} newMessagePayload - * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * GenerateStatelessSummaryRequest latestMessage. + * @member {string} latestMessage + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest * @instance */ - ConversationEvent.prototype.newMessagePayload = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + GenerateStatelessSummaryRequest.prototype.latestMessage = ""; /** - * ConversationEvent payload. - * @member {"newMessagePayload"|undefined} payload - * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * GenerateStatelessSummaryRequest maxContextSize. + * @member {number} maxContextSize + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest * @instance */ - Object.defineProperty(ConversationEvent.prototype, "payload", { - get: $util.oneOfGetter($oneOfFields = ["newMessagePayload"]), - set: $util.oneOfSetter($oneOfFields) - }); + GenerateStatelessSummaryRequest.prototype.maxContextSize = 0; /** - * Creates a new ConversationEvent instance using the specified properties. + * Creates a new GenerateStatelessSummaryRequest instance using the specified properties. * @function create - * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IConversationEvent=} [properties] Properties to set - * @returns {google.cloud.dialogflow.v2beta1.ConversationEvent} ConversationEvent instance + * @param {google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryRequest=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest} GenerateStatelessSummaryRequest instance */ - ConversationEvent.create = function create(properties) { - return new ConversationEvent(properties); + GenerateStatelessSummaryRequest.create = function create(properties) { + return new GenerateStatelessSummaryRequest(properties); }; /** - * Encodes the specified ConversationEvent message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ConversationEvent.verify|verify} messages. + * Encodes the specified GenerateStatelessSummaryRequest message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IConversationEvent} message ConversationEvent message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryRequest} message GenerateStatelessSummaryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConversationEvent.encode = function encode(message, writer) { + GenerateStatelessSummaryRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.conversation != null && Object.hasOwnProperty.call(message, "conversation")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversation); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - if (message.errorStatus != null && Object.hasOwnProperty.call(message, "errorStatus")) - $root.google.rpc.Status.encode(message.errorStatus, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.newMessagePayload != null && Object.hasOwnProperty.call(message, "newMessagePayload")) - $root.google.cloud.dialogflow.v2beta1.Message.encode(message.newMessagePayload, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.statelessConversation != null && Object.hasOwnProperty.call(message, "statelessConversation")) + $root.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation.encode(message.statelessConversation, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.conversationProfile != null && Object.hasOwnProperty.call(message, "conversationProfile")) + $root.google.cloud.dialogflow.v2beta1.ConversationProfile.encode(message.conversationProfile, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.latestMessage != null && Object.hasOwnProperty.call(message, "latestMessage")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.latestMessage); + if (message.maxContextSize != null && Object.hasOwnProperty.call(message, "maxContextSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.maxContextSize); return writer; }; /** - * Encodes the specified ConversationEvent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ConversationEvent.verify|verify} messages. + * Encodes the specified GenerateStatelessSummaryRequest message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest * @static - * @param {google.cloud.dialogflow.v2beta1.IConversationEvent} message ConversationEvent message or plain object to encode + * @param {google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryRequest} message GenerateStatelessSummaryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConversationEvent.encodeDelimited = function encodeDelimited(message, writer) { + GenerateStatelessSummaryRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ConversationEvent message from the specified reader or buffer. + * Decodes a GenerateStatelessSummaryRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.dialogflow.v2beta1.ConversationEvent} ConversationEvent + * @returns {google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest} GenerateStatelessSummaryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConversationEvent.decode = function decode(reader, length) { + GenerateStatelessSummaryRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.ConversationEvent(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.conversation = reader.string(); + message.statelessConversation = $root.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation.decode(reader, reader.uint32()); break; } case 2: { - message.type = reader.int32(); + message.conversationProfile = $root.google.cloud.dialogflow.v2beta1.ConversationProfile.decode(reader, reader.uint32()); break; } case 3: { - message.errorStatus = $root.google.rpc.Status.decode(reader, reader.uint32()); + message.latestMessage = reader.string(); break; } case 4: { - message.newMessagePayload = $root.google.cloud.dialogflow.v2beta1.Message.decode(reader, reader.uint32()); + message.maxContextSize = reader.int32(); break; } default: @@ -138283,204 +141033,902 @@ }; /** - * Decodes a ConversationEvent message from the specified reader or buffer, length delimited. + * Decodes a GenerateStatelessSummaryRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.dialogflow.v2beta1.ConversationEvent} ConversationEvent + * @returns {google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest} GenerateStatelessSummaryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConversationEvent.decodeDelimited = function decodeDelimited(reader) { + GenerateStatelessSummaryRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ConversationEvent message. + * Verifies a GenerateStatelessSummaryRequest message. * @function verify - * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ConversationEvent.verify = function verify(message) { + GenerateStatelessSummaryRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.conversation != null && message.hasOwnProperty("conversation")) - if (!$util.isString(message.conversation)) - return "conversation: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 5: - case 4: - break; - } - if (message.errorStatus != null && message.hasOwnProperty("errorStatus")) { - var error = $root.google.rpc.Status.verify(message.errorStatus); + if (message.statelessConversation != null && message.hasOwnProperty("statelessConversation")) { + var error = $root.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation.verify(message.statelessConversation); if (error) - return "errorStatus." + error; + return "statelessConversation." + error; } - if (message.newMessagePayload != null && message.hasOwnProperty("newMessagePayload")) { - properties.payload = 1; - { - var error = $root.google.cloud.dialogflow.v2beta1.Message.verify(message.newMessagePayload); - if (error) - return "newMessagePayload." + error; - } + if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) { + var error = $root.google.cloud.dialogflow.v2beta1.ConversationProfile.verify(message.conversationProfile); + if (error) + return "conversationProfile." + error; } + if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) + if (!$util.isString(message.latestMessage)) + return "latestMessage: string expected"; + if (message.maxContextSize != null && message.hasOwnProperty("maxContextSize")) + if (!$util.isInteger(message.maxContextSize)) + return "maxContextSize: integer expected"; return null; }; /** - * Creates a ConversationEvent message from a plain object. Also converts values to their respective internal types. + * Creates a GenerateStatelessSummaryRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.dialogflow.v2beta1.ConversationEvent} ConversationEvent + * @returns {google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest} GenerateStatelessSummaryRequest */ - ConversationEvent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.dialogflow.v2beta1.ConversationEvent) + GenerateStatelessSummaryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest) return object; - var message = new $root.google.cloud.dialogflow.v2beta1.ConversationEvent(); - if (object.conversation != null) - message.conversation = String(object.conversation); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; + var message = new $root.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest(); + if (object.statelessConversation != null) { + if (typeof object.statelessConversation !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.statelessConversation: object expected"); + message.statelessConversation = $root.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation.fromObject(object.statelessConversation); + } + if (object.conversationProfile != null) { + if (typeof object.conversationProfile !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.conversationProfile: object expected"); + message.conversationProfile = $root.google.cloud.dialogflow.v2beta1.ConversationProfile.fromObject(object.conversationProfile); + } + if (object.latestMessage != null) + message.latestMessage = String(object.latestMessage); + if (object.maxContextSize != null) + message.maxContextSize = object.maxContextSize | 0; + return message; + }; + + /** + * Creates a plain object from a GenerateStatelessSummaryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest + * @static + * @param {google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest} message GenerateStatelessSummaryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenerateStatelessSummaryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.statelessConversation = null; + object.conversationProfile = null; + object.latestMessage = ""; + object.maxContextSize = 0; + } + if (message.statelessConversation != null && message.hasOwnProperty("statelessConversation")) + object.statelessConversation = $root.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation.toObject(message.statelessConversation, options); + if (message.conversationProfile != null && message.hasOwnProperty("conversationProfile")) + object.conversationProfile = $root.google.cloud.dialogflow.v2beta1.ConversationProfile.toObject(message.conversationProfile, options); + if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) + object.latestMessage = message.latestMessage; + if (message.maxContextSize != null && message.hasOwnProperty("maxContextSize")) + object.maxContextSize = message.maxContextSize; + return object; + }; + + /** + * Converts this GenerateStatelessSummaryRequest to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest + * @instance + * @returns {Object.} JSON object + */ + GenerateStatelessSummaryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GenerateStatelessSummaryRequest + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GenerateStatelessSummaryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest"; + }; + + GenerateStatelessSummaryRequest.MinimalConversation = (function() { + + /** + * Properties of a MinimalConversation. + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest + * @interface IMinimalConversation + * @property {Array.|null} [messages] MinimalConversation messages + * @property {string|null} [parent] MinimalConversation parent + */ + + /** + * Constructs a new MinimalConversation. + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest + * @classdesc Represents a MinimalConversation. + * @implements IMinimalConversation + * @constructor + * @param {google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.IMinimalConversation=} [properties] Properties to set + */ + function MinimalConversation(properties) { + this.messages = []; + 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]]; + } + + /** + * MinimalConversation messages. + * @member {Array.} messages + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation + * @instance + */ + MinimalConversation.prototype.messages = $util.emptyArray; + + /** + * MinimalConversation parent. + * @member {string} parent + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation + * @instance + */ + MinimalConversation.prototype.parent = ""; + + /** + * Creates a new MinimalConversation instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation + * @static + * @param {google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.IMinimalConversation=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation} MinimalConversation instance + */ + MinimalConversation.create = function create(properties) { + return new MinimalConversation(properties); + }; + + /** + * Encodes the specified MinimalConversation message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation + * @static + * @param {google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.IMinimalConversation} message MinimalConversation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MinimalConversation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messages != null && message.messages.length) + for (var i = 0; i < message.messages.length; ++i) + $root.google.cloud.dialogflow.v2beta1.Message.encode(message.messages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.parent); + return writer; + }; + + /** + * Encodes the specified MinimalConversation message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation + * @static + * @param {google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.IMinimalConversation} message MinimalConversation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MinimalConversation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MinimalConversation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation} MinimalConversation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MinimalConversation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.messages && message.messages.length)) + message.messages = []; + message.messages.push($root.google.cloud.dialogflow.v2beta1.Message.decode(reader, reader.uint32())); + break; + } + case 2: { + message.parent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MinimalConversation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation} MinimalConversation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MinimalConversation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MinimalConversation message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MinimalConversation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messages != null && message.hasOwnProperty("messages")) { + if (!Array.isArray(message.messages)) + return "messages: array expected"; + for (var i = 0; i < message.messages.length; ++i) { + var error = $root.google.cloud.dialogflow.v2beta1.Message.verify(message.messages[i]); + if (error) + return "messages." + error; + } + } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + return null; + }; + + /** + * Creates a MinimalConversation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation} MinimalConversation + */ + MinimalConversation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation(); + if (object.messages) { + if (!Array.isArray(object.messages)) + throw TypeError(".google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation.messages: array expected"); + message.messages = []; + for (var i = 0; i < object.messages.length; ++i) { + if (typeof object.messages[i] !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation.messages: object expected"); + message.messages[i] = $root.google.cloud.dialogflow.v2beta1.Message.fromObject(object.messages[i]); + } + } + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from a MinimalConversation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation + * @static + * @param {google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation} message MinimalConversation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MinimalConversation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.messages = []; + if (options.defaults) + object.parent = ""; + if (message.messages && message.messages.length) { + object.messages = []; + for (var j = 0; j < message.messages.length; ++j) + object.messages[j] = $root.google.cloud.dialogflow.v2beta1.Message.toObject(message.messages[j], options); + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + return object; + }; + + /** + * Converts this MinimalConversation to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation + * @instance + * @returns {Object.} JSON object + */ + MinimalConversation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MinimalConversation + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MinimalConversation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation"; + }; + + return MinimalConversation; + })(); + + return GenerateStatelessSummaryRequest; + })(); + + v2beta1.GenerateStatelessSummaryResponse = (function() { + + /** + * Properties of a GenerateStatelessSummaryResponse. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IGenerateStatelessSummaryResponse + * @property {google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.ISummary|null} [summary] GenerateStatelessSummaryResponse summary + * @property {string|null} [latestMessage] GenerateStatelessSummaryResponse latestMessage + * @property {number|null} [contextSize] GenerateStatelessSummaryResponse contextSize + */ + + /** + * Constructs a new GenerateStatelessSummaryResponse. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a GenerateStatelessSummaryResponse. + * @implements IGenerateStatelessSummaryResponse + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryResponse=} [properties] Properties to set + */ + function GenerateStatelessSummaryResponse(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]]; + } + + /** + * GenerateStatelessSummaryResponse summary. + * @member {google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.ISummary|null|undefined} summary + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse + * @instance + */ + GenerateStatelessSummaryResponse.prototype.summary = null; + + /** + * GenerateStatelessSummaryResponse latestMessage. + * @member {string} latestMessage + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse + * @instance + */ + GenerateStatelessSummaryResponse.prototype.latestMessage = ""; + + /** + * GenerateStatelessSummaryResponse contextSize. + * @member {number} contextSize + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse + * @instance + */ + GenerateStatelessSummaryResponse.prototype.contextSize = 0; + + /** + * Creates a new GenerateStatelessSummaryResponse instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryResponse=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse} GenerateStatelessSummaryResponse instance + */ + GenerateStatelessSummaryResponse.create = function create(properties) { + return new GenerateStatelessSummaryResponse(properties); + }; + + /** + * Encodes the specified GenerateStatelessSummaryResponse message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryResponse} message GenerateStatelessSummaryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateStatelessSummaryResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.summary != null && Object.hasOwnProperty.call(message, "summary")) + $root.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary.encode(message.summary, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.latestMessage != null && Object.hasOwnProperty.call(message, "latestMessage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.latestMessage); + if (message.contextSize != null && Object.hasOwnProperty.call(message, "contextSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.contextSize); + return writer; + }; + + /** + * Encodes the specified GenerateStatelessSummaryResponse message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse + * @static + * @param {google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryResponse} message GenerateStatelessSummaryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateStatelessSummaryResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenerateStatelessSummaryResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse} GenerateStatelessSummaryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateStatelessSummaryResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.summary = $root.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary.decode(reader, reader.uint32()); + break; + } + case 2: { + message.latestMessage = reader.string(); + break; + } + case 3: { + message.contextSize = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); break; } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "CONVERSATION_STARTED": - case 1: - message.type = 1; - break; - case "CONVERSATION_FINISHED": - case 2: - message.type = 2; - break; - case "HUMAN_INTERVENTION_NEEDED": - case 3: - message.type = 3; - break; - case "NEW_MESSAGE": - case 5: - message.type = 5; - break; - case "UNRECOVERABLE_ERROR": - case 4: - message.type = 4; - break; } - if (object.errorStatus != null) { - if (typeof object.errorStatus !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.ConversationEvent.errorStatus: object expected"); - message.errorStatus = $root.google.rpc.Status.fromObject(object.errorStatus); + return message; + }; + + /** + * Decodes a GenerateStatelessSummaryResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse} GenerateStatelessSummaryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateStatelessSummaryResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenerateStatelessSummaryResponse message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenerateStatelessSummaryResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.summary != null && message.hasOwnProperty("summary")) { + var error = $root.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary.verify(message.summary); + if (error) + return "summary." + error; } - if (object.newMessagePayload != null) { - if (typeof object.newMessagePayload !== "object") - throw TypeError(".google.cloud.dialogflow.v2beta1.ConversationEvent.newMessagePayload: object expected"); - message.newMessagePayload = $root.google.cloud.dialogflow.v2beta1.Message.fromObject(object.newMessagePayload); + if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) + if (!$util.isString(message.latestMessage)) + return "latestMessage: string expected"; + if (message.contextSize != null && message.hasOwnProperty("contextSize")) + if (!$util.isInteger(message.contextSize)) + return "contextSize: integer expected"; + return null; + }; + + /** + * Creates a GenerateStatelessSummaryResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse} GenerateStatelessSummaryResponse + */ + GenerateStatelessSummaryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse(); + if (object.summary != null) { + if (typeof object.summary !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.summary: object expected"); + message.summary = $root.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary.fromObject(object.summary); } + if (object.latestMessage != null) + message.latestMessage = String(object.latestMessage); + if (object.contextSize != null) + message.contextSize = object.contextSize | 0; return message; }; /** - * Creates a plain object from a ConversationEvent message. Also converts values to other types if specified. + * Creates a plain object from a GenerateStatelessSummaryResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse * @static - * @param {google.cloud.dialogflow.v2beta1.ConversationEvent} message ConversationEvent + * @param {google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse} message GenerateStatelessSummaryResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ConversationEvent.toObject = function toObject(message, options) { + GenerateStatelessSummaryResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.conversation = ""; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.errorStatus = null; - } - if (message.conversation != null && message.hasOwnProperty("conversation")) - object.conversation = message.conversation; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.ConversationEvent.Type[message.type] === undefined ? message.type : $root.google.cloud.dialogflow.v2beta1.ConversationEvent.Type[message.type] : message.type; - if (message.errorStatus != null && message.hasOwnProperty("errorStatus")) - object.errorStatus = $root.google.rpc.Status.toObject(message.errorStatus, options); - if (message.newMessagePayload != null && message.hasOwnProperty("newMessagePayload")) { - object.newMessagePayload = $root.google.cloud.dialogflow.v2beta1.Message.toObject(message.newMessagePayload, options); - if (options.oneofs) - object.payload = "newMessagePayload"; + object.summary = null; + object.latestMessage = ""; + object.contextSize = 0; } + if (message.summary != null && message.hasOwnProperty("summary")) + object.summary = $root.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary.toObject(message.summary, options); + if (message.latestMessage != null && message.hasOwnProperty("latestMessage")) + object.latestMessage = message.latestMessage; + if (message.contextSize != null && message.hasOwnProperty("contextSize")) + object.contextSize = message.contextSize; return object; }; /** - * Converts this ConversationEvent to JSON. + * Converts this GenerateStatelessSummaryResponse to JSON. * @function toJSON - * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse * @instance * @returns {Object.} JSON object */ - ConversationEvent.prototype.toJSON = function toJSON() { + GenerateStatelessSummaryResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ConversationEvent + * Gets the default type url for GenerateStatelessSummaryResponse * @function getTypeUrl - * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ConversationEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GenerateStatelessSummaryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.dialogflow.v2beta1.ConversationEvent"; + return typeUrlPrefix + "/google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse"; }; - /** - * Type enum. - * @name google.cloud.dialogflow.v2beta1.ConversationEvent.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} CONVERSATION_STARTED=1 CONVERSATION_STARTED value - * @property {number} CONVERSATION_FINISHED=2 CONVERSATION_FINISHED value - * @property {number} HUMAN_INTERVENTION_NEEDED=3 HUMAN_INTERVENTION_NEEDED value - * @property {number} NEW_MESSAGE=5 NEW_MESSAGE value - * @property {number} UNRECOVERABLE_ERROR=4 UNRECOVERABLE_ERROR value - */ - ConversationEvent.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CONVERSATION_STARTED"] = 1; - values[valuesById[2] = "CONVERSATION_FINISHED"] = 2; - values[valuesById[3] = "HUMAN_INTERVENTION_NEEDED"] = 3; - values[valuesById[5] = "NEW_MESSAGE"] = 5; - values[valuesById[4] = "UNRECOVERABLE_ERROR"] = 4; - return values; + GenerateStatelessSummaryResponse.Summary = (function() { + + /** + * Properties of a Summary. + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse + * @interface ISummary + * @property {string|null} [text] Summary text + * @property {Object.|null} [textSections] Summary textSections + */ + + /** + * Constructs a new Summary. + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse + * @classdesc Represents a Summary. + * @implements ISummary + * @constructor + * @param {google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.ISummary=} [properties] Properties to set + */ + function Summary(properties) { + this.textSections = {}; + 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]]; + } + + /** + * Summary text. + * @member {string} text + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary + * @instance + */ + Summary.prototype.text = ""; + + /** + * Summary textSections. + * @member {Object.} textSections + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary + * @instance + */ + Summary.prototype.textSections = $util.emptyObject; + + /** + * Creates a new Summary instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary + * @static + * @param {google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.ISummary=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary} Summary instance + */ + Summary.create = function create(properties) { + return new Summary(properties); + }; + + /** + * Encodes the specified Summary message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary + * @static + * @param {google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.ISummary} message Summary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Summary.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.textSections != null && Object.hasOwnProperty.call(message, "textSections")) + for (var keys = Object.keys(message.textSections), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.textSections[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified Summary message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary + * @static + * @param {google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.ISummary} message Summary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Summary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Summary message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary} Summary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Summary.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.text = reader.string(); + break; + } + case 2: { + if (message.textSections === $util.emptyObject) + message.textSections = {}; + 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.textSections[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Summary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary} Summary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Summary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Summary message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Summary.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + if (message.textSections != null && message.hasOwnProperty("textSections")) { + if (!$util.isObject(message.textSections)) + return "textSections: object expected"; + var key = Object.keys(message.textSections); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.textSections[key[i]])) + return "textSections: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a Summary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary} Summary + */ + Summary.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary(); + if (object.text != null) + message.text = String(object.text); + if (object.textSections) { + if (typeof object.textSections !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary.textSections: object expected"); + message.textSections = {}; + for (var keys = Object.keys(object.textSections), i = 0; i < keys.length; ++i) + message.textSections[keys[i]] = String(object.textSections[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a Summary message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary + * @static + * @param {google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary} message Summary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Summary.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.textSections = {}; + if (options.defaults) + object.text = ""; + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + var keys2; + if (message.textSections && (keys2 = Object.keys(message.textSections)).length) { + object.textSections = {}; + for (var j = 0; j < keys2.length; ++j) + object.textSections[keys2[j]] = message.textSections[keys2[j]]; + } + return object; + }; + + /** + * Converts this Summary to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary + * @instance + * @returns {Object.} JSON object + */ + Summary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Summary + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Summary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse.Summary"; + }; + + return Summary; })(); - return ConversationEvent; + return GenerateStatelessSummaryResponse; })(); v2beta1.ConversationProfiles = (function() { @@ -141908,6 +145356,7 @@ * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig * @interface IConversationModelConfig * @property {string|null} [model] ConversationModelConfig model + * @property {string|null} [baselineModelVersion] ConversationModelConfig baselineModelVersion */ /** @@ -141933,6 +145382,14 @@ */ ConversationModelConfig.prototype.model = ""; + /** + * ConversationModelConfig baselineModelVersion. + * @member {string} baselineModelVersion + * @memberof google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig + * @instance + */ + ConversationModelConfig.prototype.baselineModelVersion = ""; + /** * Creates a new ConversationModelConfig instance using the specified properties. * @function create @@ -141959,6 +145416,8 @@ writer = $Writer.create(); if (message.model != null && Object.hasOwnProperty.call(message, "model")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.model); + if (message.baselineModelVersion != null && Object.hasOwnProperty.call(message, "baselineModelVersion")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.baselineModelVersion); return writer; }; @@ -141997,6 +145456,10 @@ message.model = reader.string(); break; } + case 8: { + message.baselineModelVersion = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -142035,6 +145498,9 @@ if (message.model != null && message.hasOwnProperty("model")) if (!$util.isString(message.model)) return "model: string expected"; + if (message.baselineModelVersion != null && message.hasOwnProperty("baselineModelVersion")) + if (!$util.isString(message.baselineModelVersion)) + return "baselineModelVersion: string expected"; return null; }; @@ -142052,6 +145518,8 @@ var message = new $root.google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.ConversationModelConfig(); if (object.model != null) message.model = String(object.model); + if (object.baselineModelVersion != null) + message.baselineModelVersion = String(object.baselineModelVersion); return message; }; @@ -142068,10 +145536,14 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.model = ""; + object.baselineModelVersion = ""; + } if (message.model != null && message.hasOwnProperty("model")) object.model = message.model; + if (message.baselineModelVersion != null && message.hasOwnProperty("baselineModelVersion")) + object.baselineModelVersion = message.baselineModelVersion; return object; }; @@ -146397,6 +149869,370 @@ return ClearSuggestionFeatureConfigOperationMetadata; })(); + v2beta1.ConversationEvent = (function() { + + /** + * Properties of a ConversationEvent. + * @memberof google.cloud.dialogflow.v2beta1 + * @interface IConversationEvent + * @property {string|null} [conversation] ConversationEvent conversation + * @property {google.cloud.dialogflow.v2beta1.ConversationEvent.Type|null} [type] ConversationEvent type + * @property {google.rpc.IStatus|null} [errorStatus] ConversationEvent errorStatus + * @property {google.cloud.dialogflow.v2beta1.IMessage|null} [newMessagePayload] ConversationEvent newMessagePayload + */ + + /** + * Constructs a new ConversationEvent. + * @memberof google.cloud.dialogflow.v2beta1 + * @classdesc Represents a ConversationEvent. + * @implements IConversationEvent + * @constructor + * @param {google.cloud.dialogflow.v2beta1.IConversationEvent=} [properties] Properties to set + */ + function ConversationEvent(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]]; + } + + /** + * ConversationEvent conversation. + * @member {string} conversation + * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @instance + */ + ConversationEvent.prototype.conversation = ""; + + /** + * ConversationEvent type. + * @member {google.cloud.dialogflow.v2beta1.ConversationEvent.Type} type + * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @instance + */ + ConversationEvent.prototype.type = 0; + + /** + * ConversationEvent errorStatus. + * @member {google.rpc.IStatus|null|undefined} errorStatus + * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @instance + */ + ConversationEvent.prototype.errorStatus = null; + + /** + * ConversationEvent newMessagePayload. + * @member {google.cloud.dialogflow.v2beta1.IMessage|null|undefined} newMessagePayload + * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @instance + */ + ConversationEvent.prototype.newMessagePayload = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ConversationEvent payload. + * @member {"newMessagePayload"|undefined} payload + * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @instance + */ + Object.defineProperty(ConversationEvent.prototype, "payload", { + get: $util.oneOfGetter($oneOfFields = ["newMessagePayload"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ConversationEvent instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @static + * @param {google.cloud.dialogflow.v2beta1.IConversationEvent=} [properties] Properties to set + * @returns {google.cloud.dialogflow.v2beta1.ConversationEvent} ConversationEvent instance + */ + ConversationEvent.create = function create(properties) { + return new ConversationEvent(properties); + }; + + /** + * Encodes the specified ConversationEvent message. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ConversationEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @static + * @param {google.cloud.dialogflow.v2beta1.IConversationEvent} message ConversationEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conversation != null && Object.hasOwnProperty.call(message, "conversation")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversation); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.errorStatus != null && Object.hasOwnProperty.call(message, "errorStatus")) + $root.google.rpc.Status.encode(message.errorStatus, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.newMessagePayload != null && Object.hasOwnProperty.call(message, "newMessagePayload")) + $root.google.cloud.dialogflow.v2beta1.Message.encode(message.newMessagePayload, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConversationEvent message, length delimited. Does not implicitly {@link google.cloud.dialogflow.v2beta1.ConversationEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @static + * @param {google.cloud.dialogflow.v2beta1.IConversationEvent} message ConversationEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConversationEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.v2beta1.ConversationEvent} ConversationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.v2beta1.ConversationEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.conversation = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + case 3: { + message.errorStatus = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 4: { + message.newMessagePayload = $root.google.cloud.dialogflow.v2beta1.Message.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConversationEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.v2beta1.ConversationEvent} ConversationEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConversationEvent message. + * @function verify + * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConversationEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.conversation != null && message.hasOwnProperty("conversation")) + if (!$util.isString(message.conversation)) + return "conversation: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 5: + case 4: + break; + } + if (message.errorStatus != null && message.hasOwnProperty("errorStatus")) { + var error = $root.google.rpc.Status.verify(message.errorStatus); + if (error) + return "errorStatus." + error; + } + if (message.newMessagePayload != null && message.hasOwnProperty("newMessagePayload")) { + properties.payload = 1; + { + var error = $root.google.cloud.dialogflow.v2beta1.Message.verify(message.newMessagePayload); + if (error) + return "newMessagePayload." + error; + } + } + return null; + }; + + /** + * Creates a ConversationEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.v2beta1.ConversationEvent} ConversationEvent + */ + ConversationEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.v2beta1.ConversationEvent) + return object; + var message = new $root.google.cloud.dialogflow.v2beta1.ConversationEvent(); + if (object.conversation != null) + message.conversation = String(object.conversation); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "CONVERSATION_STARTED": + case 1: + message.type = 1; + break; + case "CONVERSATION_FINISHED": + case 2: + message.type = 2; + break; + case "HUMAN_INTERVENTION_NEEDED": + case 3: + message.type = 3; + break; + case "NEW_MESSAGE": + case 5: + message.type = 5; + break; + case "UNRECOVERABLE_ERROR": + case 4: + message.type = 4; + break; + } + if (object.errorStatus != null) { + if (typeof object.errorStatus !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ConversationEvent.errorStatus: object expected"); + message.errorStatus = $root.google.rpc.Status.fromObject(object.errorStatus); + } + if (object.newMessagePayload != null) { + if (typeof object.newMessagePayload !== "object") + throw TypeError(".google.cloud.dialogflow.v2beta1.ConversationEvent.newMessagePayload: object expected"); + message.newMessagePayload = $root.google.cloud.dialogflow.v2beta1.Message.fromObject(object.newMessagePayload); + } + return message; + }; + + /** + * Creates a plain object from a ConversationEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @static + * @param {google.cloud.dialogflow.v2beta1.ConversationEvent} message ConversationEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConversationEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.conversation = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.errorStatus = null; + } + if (message.conversation != null && message.hasOwnProperty("conversation")) + object.conversation = message.conversation; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.dialogflow.v2beta1.ConversationEvent.Type[message.type] === undefined ? message.type : $root.google.cloud.dialogflow.v2beta1.ConversationEvent.Type[message.type] : message.type; + if (message.errorStatus != null && message.hasOwnProperty("errorStatus")) + object.errorStatus = $root.google.rpc.Status.toObject(message.errorStatus, options); + if (message.newMessagePayload != null && message.hasOwnProperty("newMessagePayload")) { + object.newMessagePayload = $root.google.cloud.dialogflow.v2beta1.Message.toObject(message.newMessagePayload, options); + if (options.oneofs) + object.payload = "newMessagePayload"; + } + return object; + }; + + /** + * Converts this ConversationEvent to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @instance + * @returns {Object.} JSON object + */ + ConversationEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConversationEvent + * @function getTypeUrl + * @memberof google.cloud.dialogflow.v2beta1.ConversationEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConversationEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.v2beta1.ConversationEvent"; + }; + + /** + * Type enum. + * @name google.cloud.dialogflow.v2beta1.ConversationEvent.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} CONVERSATION_STARTED=1 CONVERSATION_STARTED value + * @property {number} CONVERSATION_FINISHED=2 CONVERSATION_FINISHED value + * @property {number} HUMAN_INTERVENTION_NEEDED=3 HUMAN_INTERVENTION_NEEDED value + * @property {number} NEW_MESSAGE=5 NEW_MESSAGE value + * @property {number} UNRECOVERABLE_ERROR=4 UNRECOVERABLE_ERROR value + */ + ConversationEvent.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONVERSATION_STARTED"] = 1; + values[valuesById[2] = "CONVERSATION_FINISHED"] = 2; + values[valuesById[3] = "HUMAN_INTERVENTION_NEEDED"] = 3; + values[valuesById[5] = "NEW_MESSAGE"] = 5; + values[valuesById[4] = "UNRECOVERABLE_ERROR"] = 4; + return values; + })(); + + return ConversationEvent; + })(); + v2beta1.Documents = (function() { /** diff --git a/packages/google-cloud-dialogflow/protos/protos.json b/packages/google-cloud-dialogflow/protos/protos.json index 64efec28a8f..5a06ffb8b76 100644 --- a/packages/google-cloud-dialogflow/protos/protos.json +++ b/packages/google-cloud-dialogflow/protos/protos.json @@ -1511,6 +1511,10 @@ "enablePartialAutomatedAgentReply": { "type": "bool", "id": 12 + }, + "enableDebuggingInfo": { + "type": "bool", + "id": 19 } } }, @@ -1549,6 +1553,10 @@ "dtmfParameters": { "type": "DtmfParameters", "id": 10 + }, + "debuggingInfo": { + "type": "CloudConversationDebuggingInfo", + "id": 11 } } }, @@ -1995,6 +2003,10 @@ "disableNoSpeechRecognizedEvent": { "type": "bool", "id": 14 + }, + "enableAutomaticPunctuation": { + "type": "bool", + "id": 17 } } }, @@ -2396,6 +2408,86 @@ "inputAudio": { "type": "bytes", "id": 6 + }, + "enableDebuggingInfo": { + "type": "bool", + "id": 8 + } + } + }, + "CloudConversationDebuggingInfo": { + "fields": { + "audioDataChunks": { + "type": "int32", + "id": 1 + }, + "resultEndTimeOffset": { + "type": "google.protobuf.Duration", + "id": 2 + }, + "firstAudioDuration": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "singleUtterance": { + "type": "bool", + "id": 5 + }, + "speechPartialResultsEndTimes": { + "rule": "repeated", + "type": "google.protobuf.Duration", + "id": 6 + }, + "speechFinalResultsEndTimes": { + "rule": "repeated", + "type": "google.protobuf.Duration", + "id": 7 + }, + "partialResponses": { + "type": "int32", + "id": 8 + }, + "speakerIdPassiveLatencyMsOffset": { + "type": "int32", + "id": 9 + }, + "bargeinEventTriggered": { + "type": "bool", + "id": 10 + }, + "speechSingleUtterance": { + "type": "bool", + "id": 11 + }, + "dtmfPartialResultsTimes": { + "rule": "repeated", + "type": "google.protobuf.Duration", + "id": 12 + }, + "dtmfFinalResultsTimes": { + "rule": "repeated", + "type": "google.protobuf.Duration", + "id": 13 + }, + "singleUtteranceEndTimeOffset": { + "type": "google.protobuf.Duration", + "id": 14 + }, + "noSpeechTimeout": { + "type": "google.protobuf.Duration", + "id": 15 + }, + "isInputText": { + "type": "bool", + "id": 16 + }, + "clientHalfCloseTimeOffset": { + "type": "google.protobuf.Duration", + "id": 17 + }, + "clientHalfCloseStreamingTimeOffset": { + "type": "google.protobuf.Duration", + "id": 18 } } }, @@ -2424,6 +2516,10 @@ "outputAudioConfig": { "type": "OutputAudioConfig", "id": 6 + }, + "debuggingInfo": { + "type": "CloudConversationDebuggingInfo", + "id": 8 } } }, @@ -5514,6 +5610,28 @@ "(google.api.method_signature)": "conversation" } ] + }, + "GenerateStatelessSummary": { + "requestType": "GenerateStatelessSummaryRequest", + "responseType": "GenerateStatelessSummaryResponse", + "options": { + "(google.api.http).post": "/v2/{stateless_conversation.parent=projects/*}/suggestions:generateStatelessSummary", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2/{stateless_conversation.parent=projects/*/locations/*}/suggestions:generateStatelessSummary", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{stateless_conversation.parent=projects/*}/suggestions:generateStatelessSummary", + "body": "*", + "additional_bindings": { + "post": "/v2/{stateless_conversation.parent=projects/*/locations/*}/suggestions:generateStatelessSummary", + "body": "*" + } + } + } + ] } } }, @@ -5806,54 +5924,133 @@ } } }, - "ConversationDatasets": { + "GenerateStatelessSummaryRequest": { + "fields": { + "statelessConversation": { + "type": "MinimalConversation", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "conversationProfile": { + "type": "ConversationProfile", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "latestMessage": { + "type": "string", + "id": 3, + "options": { + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Message" + } + }, + "maxContextSize": { + "type": "int32", + "id": 4 + } + }, + "nested": { + "MinimalConversation": { + "fields": { + "messages": { + "rule": "repeated", + "type": "Message", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "parent": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + } + } + } + } + }, + "GenerateStatelessSummaryResponse": { + "fields": { + "summary": { + "type": "Summary", + "id": 1 + }, + "latestMessage": { + "type": "string", + "id": 2, + "options": { + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Message" + } + }, + "contextSize": { + "type": "int32", + "id": 3 + } + }, + "nested": { + "Summary": { + "fields": { + "text": { + "type": "string", + "id": 1 + }, + "textSections": { + "keyType": "string", + "type": "string", + "id": 2 + } + } + } + } + }, + "ConversationProfiles": { "options": { "(google.api.default_host)": "dialogflow.googleapis.com", "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" }, "methods": { - "CreateConversationDataset": { - "requestType": "CreateConversationDatasetRequest", - "responseType": "google.longrunning.Operation", + "ListConversationProfiles": { + "requestType": "ListConversationProfilesRequest", + "responseType": "ListConversationProfilesResponse", "options": { - "(google.api.http).post": "/v2/{parent=projects/*/locations/*}/conversationDatasets", - "(google.api.http).body": "conversation_dataset", - "(google.api.method_signature)": "parent,conversation_dataset", - "(google.longrunning.operation_info).response_type": "ConversationDataset", - "(google.longrunning.operation_info).metadata_type": "CreateConversationDatasetOperationMetadata" + "(google.api.http).get": "/v2/{parent=projects/*}/conversationProfiles", + "(google.api.http).additional_bindings.get": "/v2/{parent=projects/*/locations/*}/conversationProfiles", + "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "post": "/v2/{parent=projects/*/locations/*}/conversationDatasets", - "body": "conversation_dataset" + "get": "/v2/{parent=projects/*}/conversationProfiles", + "additional_bindings": { + "get": "/v2/{parent=projects/*/locations/*}/conversationProfiles" + } } }, { - "(google.api.method_signature)": "parent,conversation_dataset" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "ConversationDataset", - "metadata_type": "CreateConversationDatasetOperationMetadata" - } + "(google.api.method_signature)": "parent" } ] }, - "GetConversationDataset": { - "requestType": "GetConversationDatasetRequest", - "responseType": "ConversationDataset", + "GetConversationProfile": { + "requestType": "GetConversationProfileRequest", + "responseType": "ConversationProfile", "options": { - "(google.api.http).get": "/v2/{name=projects/*/conversationDatasets/*}", - "(google.api.http).additional_bindings.get": "/v2/{name=projects/*/locations/*/conversationDatasets/*}", + "(google.api.http).get": "/v2/{name=projects/*/conversationProfiles/*}", + "(google.api.http).additional_bindings.get": "/v2/{name=projects/*/locations/*/conversationProfiles/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v2/{name=projects/*/conversationDatasets/*}", + "get": "/v2/{name=projects/*/conversationProfiles/*}", "additional_bindings": { - "get": "/v2/{name=projects/*/locations/*/conversationDatasets/*}" + "get": "/v2/{name=projects/*/locations/*/conversationProfiles/*}" } } }, @@ -5862,124 +6059,165 @@ } ] }, - "ListConversationDatasets": { - "requestType": "ListConversationDatasetsRequest", - "responseType": "ListConversationDatasetsResponse", + "CreateConversationProfile": { + "requestType": "CreateConversationProfileRequest", + "responseType": "ConversationProfile", "options": { - "(google.api.http).get": "/v2/{parent=projects/*}/conversationDatasets", - "(google.api.http).additional_bindings.get": "/v2/{parent=projects/*/locations/*}/conversationDatasets", - "(google.api.method_signature)": "parent" + "(google.api.http).post": "/v2/{parent=projects/*}/conversationProfiles", + "(google.api.http).body": "conversation_profile", + "(google.api.http).additional_bindings.post": "/v2/{parent=projects/*/locations/*}/conversationProfiles", + "(google.api.http).additional_bindings.body": "conversation_profile", + "(google.api.method_signature)": "parent,conversation_profile" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v2/{parent=projects/*}/conversationDatasets", + "post": "/v2/{parent=projects/*}/conversationProfiles", + "body": "conversation_profile", "additional_bindings": { - "get": "/v2/{parent=projects/*/locations/*}/conversationDatasets" + "post": "/v2/{parent=projects/*/locations/*}/conversationProfiles", + "body": "conversation_profile" } } }, { - "(google.api.method_signature)": "parent" + "(google.api.method_signature)": "parent,conversation_profile" } ] }, - "DeleteConversationDataset": { - "requestType": "DeleteConversationDatasetRequest", - "responseType": "google.longrunning.Operation", + "UpdateConversationProfile": { + "requestType": "UpdateConversationProfileRequest", + "responseType": "ConversationProfile", "options": { - "(google.api.http).delete": "/v2/{name=projects/*/locations/*/conversationDatasets/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "DeleteConversationDatasetOperationMetadata" + "(google.api.http).patch": "/v2/{conversation_profile.name=projects/*/conversationProfiles/*}", + "(google.api.http).body": "conversation_profile", + "(google.api.http).additional_bindings.patch": "/v2/{conversation_profile.name=projects/*/locations/*/conversationProfiles/*}", + "(google.api.http).additional_bindings.body": "conversation_profile", + "(google.api.method_signature)": "conversation_profile,update_mask" }, "parsedOptions": [ { "(google.api.http)": { - "delete": "/v2/{name=projects/*/locations/*/conversationDatasets/*}" + "patch": "/v2/{conversation_profile.name=projects/*/conversationProfiles/*}", + "body": "conversation_profile", + "additional_bindings": { + "patch": "/v2/{conversation_profile.name=projects/*/locations/*/conversationProfiles/*}", + "body": "conversation_profile" + } } }, { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "DeleteConversationDatasetOperationMetadata" - } + "(google.api.method_signature)": "conversation_profile,update_mask" } ] }, - "ImportConversationData": { - "requestType": "ImportConversationDataRequest", + "DeleteConversationProfile": { + "requestType": "DeleteConversationProfileRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{name=projects/*/conversationProfiles/*}", + "(google.api.http).additional_bindings.delete": "/v2/{name=projects/*/locations/*/conversationProfiles/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=projects/*/conversationProfiles/*}", + "additional_bindings": { + "delete": "/v2/{name=projects/*/locations/*/conversationProfiles/*}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "SetSuggestionFeatureConfig": { + "requestType": "SetSuggestionFeatureConfigRequest", "responseType": "google.longrunning.Operation", "options": { - "(google.api.http).post": "/v2/{name=projects/*/conversationDatasets/*}:importConversationData", + "(google.api.http).post": "/v2/{conversation_profile=projects/*/conversationProfiles/*}:setSuggestionFeatureConfig", "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v2/{name=projects/*/locations/*/conversationDatasets/*}:importConversationData", + "(google.api.http).additional_bindings.post": "/v2/{conversation_profile=projects/*/locations/*/conversationProfiles/*}:setSuggestionFeatureConfig", "(google.api.http).additional_bindings.body": "*", - "(google.longrunning.operation_info).response_type": "ImportConversationDataOperationResponse", - "(google.longrunning.operation_info).metadata_type": "ImportConversationDataOperationMetadata" + "(google.api.method_signature)": "conversation_profile,participant_role,suggestion_feature_config", + "(google.longrunning.operation_info).response_type": "ConversationProfile", + "(google.longrunning.operation_info).metadata_type": "SetSuggestionFeatureConfigOperationMetadata" }, "parsedOptions": [ { "(google.api.http)": { - "post": "/v2/{name=projects/*/conversationDatasets/*}:importConversationData", + "post": "/v2/{conversation_profile=projects/*/conversationProfiles/*}:setSuggestionFeatureConfig", "body": "*", "additional_bindings": { - "post": "/v2/{name=projects/*/locations/*/conversationDatasets/*}:importConversationData", + "post": "/v2/{conversation_profile=projects/*/locations/*/conversationProfiles/*}:setSuggestionFeatureConfig", "body": "*" } } }, + { + "(google.api.method_signature)": "conversation_profile" + }, + { + "(google.api.method_signature)": "conversation_profile,participant_role,suggestion_feature_config" + }, { "(google.longrunning.operation_info)": { - "response_type": "ImportConversationDataOperationResponse", - "metadata_type": "ImportConversationDataOperationMetadata" + "response_type": "ConversationProfile", + "metadata_type": "SetSuggestionFeatureConfigOperationMetadata" } } ] - } - } - }, - "ConversationInfo": { - "fields": { - "languageCode": { - "type": "string", - "id": 1, + }, + "ClearSuggestionFeatureConfig": { + "requestType": "ClearSuggestionFeatureConfigRequest", + "responseType": "google.longrunning.Operation", "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "InputConfig": { - "oneofs": { - "source": { - "oneof": [ - "gcsSource" + "(google.api.http).post": "/v2/{conversation_profile=projects/*/conversationProfiles/*}:clearSuggestionFeatureConfig", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2/{conversation_profile=projects/*/locations/*/conversationProfiles/*}:clearSuggestionFeatureConfig", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "conversation_profile,participant_role,suggestion_feature_type", + "(google.longrunning.operation_info).response_type": "ConversationProfile", + "(google.longrunning.operation_info).metadata_type": "ClearSuggestionFeatureConfigOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{conversation_profile=projects/*/conversationProfiles/*}:clearSuggestionFeatureConfig", + "body": "*", + "additional_bindings": { + "post": "/v2/{conversation_profile=projects/*/locations/*/conversationProfiles/*}:clearSuggestionFeatureConfig", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "conversation_profile" + }, + { + "(google.api.method_signature)": "conversation_profile,participant_role,suggestion_feature_type" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ConversationProfile", + "metadata_type": "ClearSuggestionFeatureConfigOperationMetadata" + } + } ] } - }, - "fields": { - "gcsSource": { - "type": "GcsSources", - "id": 1 - } } }, - "ConversationDataset": { + "ConversationProfile": { "options": { - "(google.api.resource).type": "dialogflow.googleapis.com/ConversationDataset", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/conversationDatasets/{conversation_dataset}" + "(google.api.resource).type": "dialogflow.googleapis.com/ConversationProfile", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/conversationProfiles/{conversation_profile}" }, "fields": { "name": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "id": 1 }, "displayName": { "type": "string", @@ -5988,104 +6226,94 @@ "(google.api.field_behavior)": "REQUIRED" } }, - "description": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, "createTime": { "type": "google.protobuf.Timestamp", - "id": 4, + "id": 11, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "inputConfig": { - "type": "InputConfig", - "id": 5, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 12, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "conversationInfo": { - "type": "ConversationInfo", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "automatedAgentConfig": { + "type": "AutomatedAgentConfig", + "id": 3 }, - "conversationCount": { - "type": "int64", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "CreateConversationDatasetRequest": { - "fields": { - "parent": { + "humanAgentAssistantConfig": { + "type": "HumanAgentAssistantConfig", + "id": 4 + }, + "humanAgentHandoffConfig": { + "type": "HumanAgentHandoffConfig", + "id": 5 + }, + "notificationConfig": { + "type": "NotificationConfig", + "id": 6 + }, + "loggingConfig": { + "type": "LoggingConfig", + "id": 7 + }, + "newMessageEventNotificationConfig": { + "type": "NotificationConfig", + "id": 8 + }, + "sttConfig": { + "type": "SpeechToTextConfig", + "id": 9 + }, + "languageCode": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "id": 10 }, - "conversationDataset": { - "type": "ConversationDataset", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "GetConversationDatasetRequest": { - "fields": { - "name": { + "timeZone": { "type": "string", - "id": 1, + "id": 14 + }, + "securitySettings": { + "type": "string", + "id": 13, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/ConversationDataset" + "(google.api.resource_reference).type": "dialogflow.googleapis.com/CXSecuritySettings" } + }, + "ttsConfig": { + "type": "SynthesizeSpeechConfig", + "id": 18 } } }, - "ListConversationDatasetsRequest": { + "ListConversationProfilesRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/ConversationDataset" + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/ConversationProfile" } }, "pageSize": { "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "id": 2 }, "pageToken": { "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "id": 3 } } }, - "ListConversationDatasetsResponse": { + "ListConversationProfilesResponse": { "fields": { - "conversationDatasets": { + "conversationProfiles": { "rule": "repeated", - "type": "ConversationDataset", + "type": "ConversationProfile", "id": 1 }, "nextPageToken": { @@ -6094,30 +6322,30 @@ } } }, - "DeleteConversationDatasetRequest": { + "GetConversationProfileRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/ConversationDataset" + "(google.api.resource_reference).type": "dialogflow.googleapis.com/ConversationProfile" } } } }, - "ImportConversationDataRequest": { + "CreateConversationProfileRequest": { "fields": { - "name": { + "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/ConversationDataset" + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/ConversationProfile" } }, - "inputConfig": { - "type": "InputConfig", + "conversationProfile": { + "type": "ConversationProfile", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" @@ -6125,934 +6353,513 @@ } } }, - "ImportConversationDataOperationMetadata": { + "UpdateConversationProfileRequest": { "fields": { - "conversationDataset": { - "type": "string", + "conversationProfile": { + "type": "ConversationProfile", "id": 1, "options": { - "(google.api.resource_reference).type": "dialogflow.googleapis.com/ConversationDataset" + "(google.api.field_behavior)": "REQUIRED" } }, - "partialFailures": { - "rule": "repeated", - "type": "google.rpc.Status", - "id": 2 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 3 - } - } - }, - "ImportConversationDataOperationResponse": { - "fields": { - "conversationDataset": { - "type": "string", - "id": 1, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, "options": { - "(google.api.resource_reference).type": "dialogflow.googleapis.com/ConversationDataset" + "(google.api.field_behavior)": "REQUIRED" } - }, - "importCount": { - "type": "int32", - "id": 3 } } }, - "CreateConversationDatasetOperationMetadata": { + "DeleteConversationProfileRequest": { "fields": { - "conversationDataset": { + "name": { "type": "string", "id": 1, "options": { - "(google.api.resource_reference).type": "dialogflow.googleapis.com/ConversationDataset" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/ConversationProfile" } } } }, - "DeleteConversationDatasetOperationMetadata": { - "fields": {} - }, - "GcsSources": { + "AutomatedAgentConfig": { "fields": { - "uris": { - "rule": "repeated", + "agent": { "type": "string", - "id": 2, + "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Agent" } } } }, - "GcsDestination": { - "fields": { - "uri": { - "type": "string", - "id": 1 - } - } - }, - "ConversationEvent": { - "oneofs": { - "payload": { - "oneof": [ - "newMessagePayload" - ] - } - }, + "HumanAgentAssistantConfig": { "fields": { - "conversation": { - "type": "string", - "id": 1 - }, - "type": { - "type": "Type", + "notificationConfig": { + "type": "NotificationConfig", "id": 2 }, - "errorStatus": { - "type": "google.rpc.Status", + "humanAgentSuggestionConfig": { + "type": "SuggestionConfig", "id": 3 }, - "newMessagePayload": { - "type": "Message", + "endUserSuggestionConfig": { + "type": "SuggestionConfig", "id": 4 + }, + "messageAnalysisConfig": { + "type": "MessageAnalysisConfig", + "id": 5 } }, "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "CONVERSATION_STARTED": 1, - "CONVERSATION_FINISHED": 2, - "HUMAN_INTERVENTION_NEEDED": 3, - "NEW_MESSAGE": 5, - "UNRECOVERABLE_ERROR": 4 - } - } - } - }, - "ConversationModels": { - "options": { - "(google.api.default_host)": "dialogflow.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" - }, - "methods": { - "CreateConversationModel": { - "requestType": "CreateConversationModelRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v2/{parent=projects/*}/conversationModels", - "(google.api.http).body": "conversation_model", - "(google.api.http).additional_bindings.post": "/v2/{parent=projects/*/locations/*}/conversationModels", - "(google.api.http).additional_bindings.body": "conversation_model", - "(google.api.method_signature)": "parent,conversation_model", - "(google.longrunning.operation_info).response_type": "ConversationModel", - "(google.longrunning.operation_info).metadata_type": "CreateConversationModelOperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v2/{parent=projects/*}/conversationModels", - "body": "conversation_model", - "additional_bindings": { - "post": "/v2/{parent=projects/*/locations/*}/conversationModels", - "body": "conversation_model" - } - } - }, - { - "(google.api.method_signature)": "parent,conversation_model" + "SuggestionTriggerSettings": { + "fields": { + "noSmalltalk": { + "type": "bool", + "id": 1 }, - { - "(google.longrunning.operation_info)": { - "response_type": "ConversationModel", - "metadata_type": "CreateConversationModelOperationMetadata" - } + "onlyEndUser": { + "type": "bool", + "id": 2 } - ] + } }, - "GetConversationModel": { - "requestType": "GetConversationModelRequest", - "responseType": "ConversationModel", - "options": { - "(google.api.http).get": "/v2/{name=projects/*/conversationModels/*}", - "(google.api.http).additional_bindings.get": "/v2/{name=projects/*/locations/*/conversationModels/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2/{name=projects/*/conversationModels/*}", - "additional_bindings": { - "get": "/v2/{name=projects/*/locations/*/conversationModels/*}" - } - } + "SuggestionFeatureConfig": { + "fields": { + "suggestionFeature": { + "type": "SuggestionFeature", + "id": 5 }, - { - "(google.api.method_signature)": "name" + "enableEventBasedSuggestion": { + "type": "bool", + "id": 3 + }, + "suggestionTriggerSettings": { + "type": "SuggestionTriggerSettings", + "id": 10 + }, + "queryConfig": { + "type": "SuggestionQueryConfig", + "id": 6 + }, + "conversationModelConfig": { + "type": "ConversationModelConfig", + "id": 7 + }, + "conversationProcessConfig": { + "type": "ConversationProcessConfig", + "id": 8 } - ] + } }, - "ListConversationModels": { - "requestType": "ListConversationModelsRequest", - "responseType": "ListConversationModelsResponse", - "options": { - "(google.api.http).get": "/v2/{parent=projects/*}/conversationModels", - "(google.api.http).additional_bindings.get": "/v2/{parent=projects/*/locations/*}/conversationModels", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2/{parent=projects/*}/conversationModels", - "additional_bindings": { - "get": "/v2/{parent=projects/*/locations/*}/conversationModels" - } - } + "SuggestionConfig": { + "fields": { + "featureConfigs": { + "rule": "repeated", + "type": "SuggestionFeatureConfig", + "id": 2 }, - { - "(google.api.method_signature)": "parent" + "groupSuggestionResponses": { + "type": "bool", + "id": 3 } - ] + } }, - "DeleteConversationModel": { - "requestType": "DeleteConversationModelRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v2/{name=projects/*/conversationModels/*}", - "(google.api.http).additional_bindings.delete": "/v2/{name=projects/*/locations/*/conversationModels/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "DeleteConversationModelOperationMetadata" + "SuggestionQueryConfig": { + "oneofs": { + "querySource": { + "oneof": [ + "knowledgeBaseQuerySource", + "documentQuerySource", + "dialogflowQuerySource" + ] + } }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v2/{name=projects/*/conversationModels/*}", - "additional_bindings": { - "delete": "/v2/{name=projects/*/locations/*/conversationModels/*}" - } - } + "fields": { + "knowledgeBaseQuerySource": { + "type": "KnowledgeBaseQuerySource", + "id": 1 }, - { - "(google.api.method_signature)": "name" + "documentQuerySource": { + "type": "DocumentQuerySource", + "id": 2 }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "DeleteConversationModelOperationMetadata" - } - } - ] - }, - "DeployConversationModel": { - "requestType": "DeployConversationModelRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v2/{name=projects/*/conversationModels/*}:deploy", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v2/{name=projects/*/locations/*/conversationModels/*}:deploy", - "(google.api.http).additional_bindings.body": "*", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "DeployConversationModelOperationMetadata" + "dialogflowQuerySource": { + "type": "DialogflowQuerySource", + "id": 3 + }, + "maxResults": { + "type": "int32", + "id": 4 + }, + "confidenceThreshold": { + "type": "float", + "id": 5 + }, + "contextFilterSettings": { + "type": "ContextFilterSettings", + "id": 7 + } }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v2/{name=projects/*/conversationModels/*}:deploy", - "body": "*", - "additional_bindings": { - "post": "/v2/{name=projects/*/locations/*/conversationModels/*}:deploy", - "body": "*" + "nested": { + "KnowledgeBaseQuerySource": { + "fields": { + "knowledgeBases": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/KnowledgeBase" + } } } }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "DeployConversationModelOperationMetadata" + "DocumentQuerySource": { + "fields": { + "documents": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Document" + } + } } - } - ] - }, - "UndeployConversationModel": { - "requestType": "UndeployConversationModelRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v2/{name=projects/*/conversationModels/*}:undeploy", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v2/{name=projects/*/locations/*/conversationModels/*}:undeploy", - "(google.api.http).additional_bindings.body": "*", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "UndeployConversationModelOperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v2/{name=projects/*/conversationModels/*}:undeploy", - "body": "*", - "additional_bindings": { - "post": "/v2/{name=projects/*/locations/*/conversationModels/*}:undeploy", - "body": "*" + }, + "DialogflowQuerySource": { + "fields": { + "agent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Agent" + } } } }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "UndeployConversationModelOperationMetadata" + "ContextFilterSettings": { + "fields": { + "dropHandoffMessages": { + "type": "bool", + "id": 1 + }, + "dropVirtualAgentMessages": { + "type": "bool", + "id": 2 + }, + "dropIvrMessages": { + "type": "bool", + "id": 3 + } } } - ] + } }, - "GetConversationModelEvaluation": { - "requestType": "GetConversationModelEvaluationRequest", - "responseType": "ConversationModelEvaluation", - "options": { - "(google.api.http).get": "/v2/{name=projects/*/conversationModels/*/evaluations/*}", - "(google.api.http).additional_bindings.get": "/v2/{name=projects/*/locations/*/conversationModels/*/evaluations/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2/{name=projects/*/conversationModels/*/evaluations/*}", - "additional_bindings": { - "get": "/v2/{name=projects/*/locations/*/conversationModels/*/evaluations/*}" - } + "ConversationModelConfig": { + "fields": { + "model": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "dialogflow.googleapis.com/ConversationModel" } }, - { - "(google.api.method_signature)": "name" + "baselineModelVersion": { + "type": "string", + "id": 8 } - ] + } }, - "ListConversationModelEvaluations": { - "requestType": "ListConversationModelEvaluationsRequest", - "responseType": "ListConversationModelEvaluationsResponse", - "options": { - "(google.api.http).get": "/v2/{parent=projects/*/conversationModels/*}/evaluations", - "(google.api.http).additional_bindings.get": "/v2/{parent=projects/*/locations/*/conversationModels/*}/evaluations", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2/{parent=projects/*/conversationModels/*}/evaluations", - "additional_bindings": { - "get": "/v2/{parent=projects/*/locations/*/conversationModels/*}/evaluations" - } - } - }, - { - "(google.api.method_signature)": "parent" + "ConversationProcessConfig": { + "fields": { + "recentSentencesCount": { + "type": "int32", + "id": 2 } - ] + } }, - "CreateConversationModelEvaluation": { - "requestType": "CreateConversationModelEvaluationRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v2/{parent=projects/*/locations/*/conversationModels/*}/evaluations", - "(google.api.http).body": "*", - "(google.api.method_signature)": "parent,conversation_model_evaluation", - "(google.longrunning.operation_info).response_type": "ConversationModelEvaluation", - "(google.longrunning.operation_info).metadata_type": "CreateConversationModelEvaluationOperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v2/{parent=projects/*/locations/*/conversationModels/*}/evaluations", - "body": "*" - } - }, - { - "(google.api.method_signature)": "parent,conversation_model_evaluation" + "MessageAnalysisConfig": { + "fields": { + "enableEntityExtraction": { + "type": "bool", + "id": 2 }, - { - "(google.longrunning.operation_info)": { - "response_type": "ConversationModelEvaluation", - "metadata_type": "CreateConversationModelEvaluationOperationMetadata" - } + "enableSentimentAnalysis": { + "type": "bool", + "id": 3 } - ] + } } } }, - "ConversationModel": { - "options": { - "(google.api.resource).type": "dialogflow.googleapis.com/ConversationModel", - "(google.api.resource).pattern": "projects/{project}/conversationModels/{conversation_model}" - }, + "HumanAgentHandoffConfig": { "oneofs": { - "modelMetadata": { + "agentService": { "oneof": [ - "articleSuggestionModelMetadata", - "smartReplyModelMetadata" + "livePersonConfig", + "salesforceLiveAgentConfig" ] } }, "fields": { - "name": { - "type": "string", + "livePersonConfig": { + "type": "LivePersonConfig", "id": 1 }, - "displayName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "datasets": { - "rule": "repeated", - "type": "InputDataset", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "state": { - "type": "State", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "languageCode": { - "type": "string", - "id": 19 - }, - "articleSuggestionModelMetadata": { - "type": "ArticleSuggestionModelMetadata", - "id": 8 - }, - "smartReplyModelMetadata": { - "type": "SmartReplyModelMetadata", - "id": 9 + "salesforceLiveAgentConfig": { + "type": "SalesforceLiveAgentConfig", + "id": 2 } }, "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "UNDEPLOYED": 2, - "DEPLOYING": 3, - "DEPLOYED": 4, - "UNDEPLOYING": 5, - "DELETING": 6, - "FAILED": 7, - "PENDING": 8 - } - }, - "ModelType": { - "values": { - "MODEL_TYPE_UNSPECIFIED": 0, - "SMART_REPLY_DUAL_ENCODER_MODEL": 2, - "SMART_REPLY_BERT_MODEL": 6 - } - } - } - }, - "ConversationModelEvaluation": { - "options": { - "(google.api.resource).type": "dialogflow.googleapis.com/ConversationModelEvaluation", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/conversationModels/{conversation_model}/evaluations/{evaluation}" - }, - "oneofs": { - "metrics": { - "oneof": [ - "smartReplyMetrics" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "displayName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "evaluationConfig": { - "type": "EvaluationConfig", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "smartReplyMetrics": { - "type": "SmartReplyMetrics", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "rawHumanEvalTemplateCsv": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "EvaluationConfig": { - "oneofs": { - "modelSpecificConfig": { - "oneof": [ - "smartReplyConfig", - "smartComposeConfig" - ] - } - }, - "fields": { - "datasets": { - "rule": "repeated", - "type": "InputDataset", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "smartReplyConfig": { - "type": "SmartReplyConfig", - "id": 2 - }, - "smartComposeConfig": { - "type": "SmartComposeConfig", - "id": 4 - } - }, - "nested": { - "SmartReplyConfig": { + "LivePersonConfig": { "fields": { - "allowlistDocument": { + "accountNumber": { "type": "string", "id": 1, - "options": { - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Document" - } - }, - "maxResultCount": { - "type": "int32", - "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } } } }, - "SmartComposeConfig": { + "SalesforceLiveAgentConfig": { "fields": { - "allowlistDocument": { + "organizationId": { "type": "string", "id": 1, "options": { - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Document" + "(google.api.field_behavior)": "REQUIRED" } }, - "maxResultCount": { - "type": "int32", + "deploymentId": { + "type": "string", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } + }, + "buttonId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "endpointDomain": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } } } }, - "InputDataset": { + "NotificationConfig": { "fields": { - "dataset": { + "topic": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/ConversationDataset" - } + "id": 1 + }, + "messageFormat": { + "type": "MessageFormat", + "id": 2 } - } - }, - "ArticleSuggestionModelMetadata": { - "fields": { - "trainingModelType": { - "type": "ConversationModel.ModelType", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" + }, + "nested": { + "MessageFormat": { + "values": { + "MESSAGE_FORMAT_UNSPECIFIED": 0, + "PROTO": 1, + "JSON": 2 } } } }, - "SmartReplyModelMetadata": { + "LoggingConfig": { "fields": { - "trainingModelType": { - "type": "ConversationModel.ModelType", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "enableStackdriverLogging": { + "type": "bool", + "id": 3 } } }, - "SmartReplyMetrics": { + "SuggestionFeature": { "fields": { - "allowlistCoverage": { - "type": "float", + "type": { + "type": "Type", "id": 1 - }, - "topNMetrics": { - "rule": "repeated", - "type": "TopNMetrics", - "id": 2 - }, - "conversationCount": { - "type": "int64", - "id": 3 } }, "nested": { - "TopNMetrics": { - "fields": { - "n": { - "type": "int32", - "id": 1 - }, - "recall": { - "type": "float", - "id": 2 - } + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "ARTICLE_SUGGESTION": 1, + "FAQ": 2, + "SMART_REPLY": 3 } } } }, - "CreateConversationModelRequest": { + "SetSuggestionFeatureConfigRequest": { "fields": { - "parent": { + "conversationProfile": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, - "conversationModel": { - "type": "ConversationModel", + "participantRole": { + "type": "Participant.Role", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } - } - } - }, - "GetConversationModelRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, + }, + "suggestionFeatureConfig": { + "type": "HumanAgentAssistantConfig.SuggestionFeatureConfig", + "id": 3, "options": { "(google.api.field_behavior)": "REQUIRED" } } } }, - "ListConversationModelsRequest": { + "ClearSuggestionFeatureConfigRequest": { "fields": { - "parent": { + "conversationProfile": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED" } }, - "pageSize": { - "type": "int32", + "participantRole": { + "type": "Participant.Role", "id": 2, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED" } }, - "pageToken": { - "type": "string", + "suggestionFeatureType": { + "type": "SuggestionFeature.Type", "id": 3, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED" } } } }, - "ListConversationModelsResponse": { + "SetSuggestionFeatureConfigOperationMetadata": { "fields": { - "conversationModels": { - "rule": "repeated", - "type": "ConversationModel", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "DeleteConversationModelRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "DeployConversationModelRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "UndeployConversationModelRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "GetConversationModelEvaluationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ListConversationModelEvaluationsRequest": { - "fields": { - "parent": { + "conversationProfile": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "id": 1 }, - "pageSize": { - "type": "int32", + "participantRole": { + "type": "Participant.Role", "id": 2, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED" } }, - "pageToken": { - "type": "string", + "suggestionFeatureType": { + "type": "SuggestionFeature.Type", "id": 3, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED" } - } - } - }, - "ListConversationModelEvaluationsResponse": { - "fields": { - "conversationModelEvaluations": { - "rule": "repeated", - "type": "ConversationModelEvaluation", - "id": 1 }, - "nextPageToken": { - "type": "string", - "id": 2 + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4 } } }, - "CreateConversationModelEvaluationRequest": { + "ClearSuggestionFeatureConfigOperationMetadata": { "fields": { - "parent": { + "conversationProfile": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/ConversationModelEvaluation" - } + "id": 1 }, - "conversationModelEvaluation": { - "type": "ConversationModelEvaluation", + "participantRole": { + "type": "Participant.Role", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } - } - } - }, - "CreateConversationModelOperationMetadata": { - "fields": { - "conversationModel": { - "type": "string", - "id": 1 - }, - "state": { - "type": "State", - "id": 2 }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 3 - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "PENDING": 1, - "SUCCEEDED": 2, - "FAILED": 3, - "CANCELLED": 4, - "CANCELLING": 5, - "TRAINING": 6 + "suggestionFeatureType": { + "type": "SuggestionFeature.Type", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" } - } - } - }, - "DeployConversationModelOperationMetadata": { - "fields": { - "conversationModel": { - "type": "string", - "id": 1 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 3 - } - } - }, - "UndeployConversationModelOperationMetadata": { - "fields": { - "conversationModel": { - "type": "string", - "id": 1 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 3 - } - } - }, - "DeleteConversationModelOperationMetadata": { - "fields": { - "conversationModel": { - "type": "string", - "id": 1 }, "createTime": { "type": "google.protobuf.Timestamp", - "id": 3 - } - } - }, - "CreateConversationModelEvaluationOperationMetadata": { - "fields": { - "conversationModelEvaluation": { - "type": "string", - "id": 1 - }, - "conversationModel": { - "type": "string", "id": 4 - }, - "state": { - "type": "State", - "id": 2 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 3 - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "INITIALIZING": 1, - "RUNNING": 2, - "CANCELLED": 3, - "SUCCEEDED": 4, - "FAILED": 5 - } } } }, - "ConversationProfiles": { + "ConversationDatasets": { "options": { "(google.api.default_host)": "dialogflow.googleapis.com", "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" }, "methods": { - "ListConversationProfiles": { - "requestType": "ListConversationProfilesRequest", - "responseType": "ListConversationProfilesResponse", + "CreateConversationDataset": { + "requestType": "CreateConversationDatasetRequest", + "responseType": "google.longrunning.Operation", "options": { - "(google.api.http).get": "/v2/{parent=projects/*}/conversationProfiles", - "(google.api.http).additional_bindings.get": "/v2/{parent=projects/*/locations/*}/conversationProfiles", - "(google.api.method_signature)": "parent" + "(google.api.http).post": "/v2/{parent=projects/*/locations/*}/conversationDatasets", + "(google.api.http).body": "conversation_dataset", + "(google.api.method_signature)": "parent,conversation_dataset", + "(google.longrunning.operation_info).response_type": "ConversationDataset", + "(google.longrunning.operation_info).metadata_type": "CreateConversationDatasetOperationMetadata" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v2/{parent=projects/*}/conversationProfiles", - "additional_bindings": { - "get": "/v2/{parent=projects/*/locations/*}/conversationProfiles" - } + "post": "/v2/{parent=projects/*/locations/*}/conversationDatasets", + "body": "conversation_dataset" } }, { - "(google.api.method_signature)": "parent" + "(google.api.method_signature)": "parent,conversation_dataset" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ConversationDataset", + "metadata_type": "CreateConversationDatasetOperationMetadata" + } } ] }, - "GetConversationProfile": { - "requestType": "GetConversationProfileRequest", - "responseType": "ConversationProfile", + "GetConversationDataset": { + "requestType": "GetConversationDatasetRequest", + "responseType": "ConversationDataset", "options": { - "(google.api.http).get": "/v2/{name=projects/*/conversationProfiles/*}", - "(google.api.http).additional_bindings.get": "/v2/{name=projects/*/locations/*/conversationProfiles/*}", + "(google.api.http).get": "/v2/{name=projects/*/conversationDatasets/*}", + "(google.api.http).additional_bindings.get": "/v2/{name=projects/*/locations/*/conversationDatasets/*}", "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v2/{name=projects/*/conversationProfiles/*}", + "get": "/v2/{name=projects/*/conversationDatasets/*}", "additional_bindings": { - "get": "/v2/{name=projects/*/locations/*/conversationProfiles/*}" + "get": "/v2/{name=projects/*/locations/*/conversationDatasets/*}" } } }, @@ -7061,165 +6868,124 @@ } ] }, - "CreateConversationProfile": { - "requestType": "CreateConversationProfileRequest", - "responseType": "ConversationProfile", + "ListConversationDatasets": { + "requestType": "ListConversationDatasetsRequest", + "responseType": "ListConversationDatasetsResponse", "options": { - "(google.api.http).post": "/v2/{parent=projects/*}/conversationProfiles", - "(google.api.http).body": "conversation_profile", - "(google.api.http).additional_bindings.post": "/v2/{parent=projects/*/locations/*}/conversationProfiles", - "(google.api.http).additional_bindings.body": "conversation_profile", - "(google.api.method_signature)": "parent,conversation_profile" + "(google.api.http).get": "/v2/{parent=projects/*}/conversationDatasets", + "(google.api.http).additional_bindings.get": "/v2/{parent=projects/*/locations/*}/conversationDatasets", + "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "post": "/v2/{parent=projects/*}/conversationProfiles", - "body": "conversation_profile", - "additional_bindings": { - "post": "/v2/{parent=projects/*/locations/*}/conversationProfiles", - "body": "conversation_profile" - } - } - }, - { - "(google.api.method_signature)": "parent,conversation_profile" - } - ] - }, - "UpdateConversationProfile": { - "requestType": "UpdateConversationProfileRequest", - "responseType": "ConversationProfile", - "options": { - "(google.api.http).patch": "/v2/{conversation_profile.name=projects/*/conversationProfiles/*}", - "(google.api.http).body": "conversation_profile", - "(google.api.http).additional_bindings.patch": "/v2/{conversation_profile.name=projects/*/locations/*/conversationProfiles/*}", - "(google.api.http).additional_bindings.body": "conversation_profile", - "(google.api.method_signature)": "conversation_profile,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v2/{conversation_profile.name=projects/*/conversationProfiles/*}", - "body": "conversation_profile", - "additional_bindings": { - "patch": "/v2/{conversation_profile.name=projects/*/locations/*/conversationProfiles/*}", - "body": "conversation_profile" - } - } - }, - { - "(google.api.method_signature)": "conversation_profile,update_mask" - } - ] - }, - "DeleteConversationProfile": { - "requestType": "DeleteConversationProfileRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v2/{name=projects/*/conversationProfiles/*}", - "(google.api.http).additional_bindings.delete": "/v2/{name=projects/*/locations/*/conversationProfiles/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v2/{name=projects/*/conversationProfiles/*}", + "get": "/v2/{parent=projects/*}/conversationDatasets", "additional_bindings": { - "delete": "/v2/{name=projects/*/locations/*/conversationProfiles/*}" + "get": "/v2/{parent=projects/*/locations/*}/conversationDatasets" } } }, { - "(google.api.method_signature)": "name" + "(google.api.method_signature)": "parent" } ] }, - "SetSuggestionFeatureConfig": { - "requestType": "SetSuggestionFeatureConfigRequest", + "DeleteConversationDataset": { + "requestType": "DeleteConversationDatasetRequest", "responseType": "google.longrunning.Operation", "options": { - "(google.api.http).post": "/v2/{conversation_profile=projects/*/conversationProfiles/*}:setSuggestionFeatureConfig", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v2/{conversation_profile=projects/*/locations/*/conversationProfiles/*}:setSuggestionFeatureConfig", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "conversation_profile,participant_role,suggestion_feature_config", - "(google.longrunning.operation_info).response_type": "ConversationProfile", - "(google.longrunning.operation_info).metadata_type": "SetSuggestionFeatureConfigOperationMetadata" + "(google.api.http).delete": "/v2/{name=projects/*/locations/*/conversationDatasets/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "DeleteConversationDatasetOperationMetadata" }, "parsedOptions": [ { "(google.api.http)": { - "post": "/v2/{conversation_profile=projects/*/conversationProfiles/*}:setSuggestionFeatureConfig", - "body": "*", - "additional_bindings": { - "post": "/v2/{conversation_profile=projects/*/locations/*/conversationProfiles/*}:setSuggestionFeatureConfig", - "body": "*" - } + "delete": "/v2/{name=projects/*/locations/*/conversationDatasets/*}" } }, { - "(google.api.method_signature)": "conversation_profile" - }, - { - "(google.api.method_signature)": "conversation_profile,participant_role,suggestion_feature_config" + "(google.api.method_signature)": "name" }, { "(google.longrunning.operation_info)": { - "response_type": "ConversationProfile", - "metadata_type": "SetSuggestionFeatureConfigOperationMetadata" + "response_type": "google.protobuf.Empty", + "metadata_type": "DeleteConversationDatasetOperationMetadata" } } ] }, - "ClearSuggestionFeatureConfig": { - "requestType": "ClearSuggestionFeatureConfigRequest", + "ImportConversationData": { + "requestType": "ImportConversationDataRequest", "responseType": "google.longrunning.Operation", "options": { - "(google.api.http).post": "/v2/{conversation_profile=projects/*/conversationProfiles/*}:clearSuggestionFeatureConfig", + "(google.api.http).post": "/v2/{name=projects/*/conversationDatasets/*}:importConversationData", "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v2/{conversation_profile=projects/*/locations/*/conversationProfiles/*}:clearSuggestionFeatureConfig", + "(google.api.http).additional_bindings.post": "/v2/{name=projects/*/locations/*/conversationDatasets/*}:importConversationData", "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "conversation_profile,participant_role,suggestion_feature_type", - "(google.longrunning.operation_info).response_type": "ConversationProfile", - "(google.longrunning.operation_info).metadata_type": "ClearSuggestionFeatureConfigOperationMetadata" + "(google.longrunning.operation_info).response_type": "ImportConversationDataOperationResponse", + "(google.longrunning.operation_info).metadata_type": "ImportConversationDataOperationMetadata" }, "parsedOptions": [ { "(google.api.http)": { - "post": "/v2/{conversation_profile=projects/*/conversationProfiles/*}:clearSuggestionFeatureConfig", + "post": "/v2/{name=projects/*/conversationDatasets/*}:importConversationData", "body": "*", "additional_bindings": { - "post": "/v2/{conversation_profile=projects/*/locations/*/conversationProfiles/*}:clearSuggestionFeatureConfig", + "post": "/v2/{name=projects/*/locations/*/conversationDatasets/*}:importConversationData", "body": "*" } } }, - { - "(google.api.method_signature)": "conversation_profile" - }, - { - "(google.api.method_signature)": "conversation_profile,participant_role,suggestion_feature_type" - }, { "(google.longrunning.operation_info)": { - "response_type": "ConversationProfile", - "metadata_type": "ClearSuggestionFeatureConfigOperationMetadata" + "response_type": "ImportConversationDataOperationResponse", + "metadata_type": "ImportConversationDataOperationMetadata" } } ] } } }, - "ConversationProfile": { + "ConversationInfo": { + "fields": { + "languageCode": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "InputConfig": { + "oneofs": { + "source": { + "oneof": [ + "gcsSource" + ] + } + }, + "fields": { + "gcsSource": { + "type": "GcsSources", + "id": 1 + } + } + }, + "ConversationDataset": { "options": { - "(google.api.resource).type": "dialogflow.googleapis.com/ConversationProfile", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/conversationProfiles/{conversation_profile}" + "(google.api.resource).type": "dialogflow.googleapis.com/ConversationDataset", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/conversationDatasets/{conversation_dataset}" }, "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "displayName": { "type": "string", @@ -7228,144 +6994,136 @@ "(google.api.field_behavior)": "REQUIRED" } }, + "description": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "createTime": { "type": "google.protobuf.Timestamp", - "id": 11, + "id": 4, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 12, + "inputConfig": { + "type": "InputConfig", + "id": 5, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "automatedAgentConfig": { - "type": "AutomatedAgentConfig", - "id": 3 - }, - "humanAgentAssistantConfig": { - "type": "HumanAgentAssistantConfig", - "id": 4 - }, - "humanAgentHandoffConfig": { - "type": "HumanAgentHandoffConfig", - "id": 5 - }, - "notificationConfig": { - "type": "NotificationConfig", - "id": 6 - }, - "loggingConfig": { - "type": "LoggingConfig", - "id": 7 - }, - "newMessageEventNotificationConfig": { - "type": "NotificationConfig", - "id": 8 - }, - "sttConfig": { - "type": "SpeechToTextConfig", - "id": 9 - }, - "languageCode": { - "type": "string", - "id": 10 - }, - "timeZone": { - "type": "string", - "id": 14 - }, - "securitySettings": { - "type": "string", - "id": 13, + "conversationInfo": { + "type": "ConversationInfo", + "id": 6, "options": { - "(google.api.resource_reference).type": "dialogflow.googleapis.com/CXSecuritySettings" + "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "ttsConfig": { - "type": "SynthesizeSpeechConfig", - "id": 18 + "conversationCount": { + "type": "int64", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, - "ListConversationProfilesRequest": { + "CreateConversationDatasetRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/ConversationProfile" + "(google.api.field_behavior)": "REQUIRED" } }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "ListConversationProfilesResponse": { - "fields": { - "conversationProfiles": { - "rule": "repeated", - "type": "ConversationProfile", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 + "conversationDataset": { + "type": "ConversationDataset", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, - "GetConversationProfileRequest": { + "GetConversationDatasetRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/ConversationProfile" + "(google.api.resource_reference).type": "dialogflow.googleapis.com/ConversationDataset" } } } }, - "CreateConversationProfileRequest": { + "ListConversationDatasetsRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/ConversationProfile" + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/ConversationDataset" } }, - "conversationProfile": { - "type": "ConversationProfile", + "pageSize": { + "type": "int32", "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "UpdateConversationProfileRequest": { + "ListConversationDatasetsResponse": { "fields": { - "conversationProfile": { - "type": "ConversationProfile", + "conversationDatasets": { + "rule": "repeated", + "type": "ConversationDataset", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "DeleteConversationDatasetRequest": { + "fields": { + "name": { + "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/ConversationDataset" + } + } + } + }, + "ImportConversationDataRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/ConversationDataset" } }, - "updateMask": { - "type": "google.protobuf.FieldMask", + "inputConfig": { + "type": "InputConfig", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" @@ -7373,440 +7131,889 @@ } } }, - "DeleteConversationProfileRequest": { + "ImportConversationDataOperationMetadata": { "fields": { - "name": { + "conversationDataset": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/ConversationProfile" + "(google.api.resource_reference).type": "dialogflow.googleapis.com/ConversationDataset" + } + }, + "partialFailures": { + "rule": "repeated", + "type": "google.rpc.Status", + "id": 2 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + } + }, + "ImportConversationDataOperationResponse": { + "fields": { + "conversationDataset": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "dialogflow.googleapis.com/ConversationDataset" } + }, + "importCount": { + "type": "int32", + "id": 3 } } }, - "AutomatedAgentConfig": { + "CreateConversationDatasetOperationMetadata": { "fields": { - "agent": { + "conversationDataset": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Agent" + "(google.api.resource_reference).type": "dialogflow.googleapis.com/ConversationDataset" } } } }, - "HumanAgentAssistantConfig": { + "DeleteConversationDatasetOperationMetadata": { + "fields": {} + }, + "GcsSources": { "fields": { - "notificationConfig": { - "type": "NotificationConfig", + "uris": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GcsDestination": { + "fields": { + "uri": { + "type": "string", + "id": 1 + } + } + }, + "ConversationEvent": { + "oneofs": { + "payload": { + "oneof": [ + "newMessagePayload" + ] + } + }, + "fields": { + "conversation": { + "type": "string", + "id": 1 + }, + "type": { + "type": "Type", "id": 2 }, - "humanAgentSuggestionConfig": { - "type": "SuggestionConfig", + "errorStatus": { + "type": "google.rpc.Status", "id": 3 }, - "endUserSuggestionConfig": { - "type": "SuggestionConfig", + "newMessagePayload": { + "type": "Message", "id": 4 - }, - "messageAnalysisConfig": { - "type": "MessageAnalysisConfig", - "id": 5 } }, "nested": { - "SuggestionTriggerSettings": { - "fields": { - "noSmalltalk": { - "type": "bool", - "id": 1 - }, - "onlyEndUser": { - "type": "bool", - "id": 2 - } + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "CONVERSATION_STARTED": 1, + "CONVERSATION_FINISHED": 2, + "HUMAN_INTERVENTION_NEEDED": 3, + "NEW_MESSAGE": 5, + "UNRECOVERABLE_ERROR": 4 } - }, - "SuggestionFeatureConfig": { - "fields": { - "suggestionFeature": { - "type": "SuggestionFeature", - "id": 5 - }, - "enableEventBasedSuggestion": { - "type": "bool", - "id": 3 - }, - "suggestionTriggerSettings": { - "type": "SuggestionTriggerSettings", - "id": 10 - }, - "queryConfig": { - "type": "SuggestionQueryConfig", - "id": 6 + } + } + }, + "ConversationModels": { + "options": { + "(google.api.default_host)": "dialogflow.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflow" + }, + "methods": { + "CreateConversationModel": { + "requestType": "CreateConversationModelRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v2/{parent=projects/*}/conversationModels", + "(google.api.http).body": "conversation_model", + "(google.api.http).additional_bindings.post": "/v2/{parent=projects/*/locations/*}/conversationModels", + "(google.api.http).additional_bindings.body": "conversation_model", + "(google.api.method_signature)": "parent,conversation_model", + "(google.longrunning.operation_info).response_type": "ConversationModel", + "(google.longrunning.operation_info).metadata_type": "CreateConversationModelOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*}/conversationModels", + "body": "conversation_model", + "additional_bindings": { + "post": "/v2/{parent=projects/*/locations/*}/conversationModels", + "body": "conversation_model" + } + } }, - "conversationModelConfig": { - "type": "ConversationModelConfig", - "id": 7 + { + "(google.api.method_signature)": "parent,conversation_model" }, - "conversationProcessConfig": { - "type": "ConversationProcessConfig", - "id": 8 + { + "(google.longrunning.operation_info)": { + "response_type": "ConversationModel", + "metadata_type": "CreateConversationModelOperationMetadata" + } } - } + ] }, - "SuggestionConfig": { - "fields": { - "featureConfigs": { - "rule": "repeated", - "type": "SuggestionFeatureConfig", - "id": 2 + "GetConversationModel": { + "requestType": "GetConversationModelRequest", + "responseType": "ConversationModel", + "options": { + "(google.api.http).get": "/v2/{name=projects/*/conversationModels/*}", + "(google.api.http).additional_bindings.get": "/v2/{name=projects/*/locations/*/conversationModels/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=projects/*/conversationModels/*}", + "additional_bindings": { + "get": "/v2/{name=projects/*/locations/*/conversationModels/*}" + } + } }, - "groupSuggestionResponses": { - "type": "bool", - "id": 3 + { + "(google.api.method_signature)": "name" } - } + ] }, - "SuggestionQueryConfig": { - "oneofs": { - "querySource": { - "oneof": [ - "knowledgeBaseQuerySource", - "documentQuerySource", - "dialogflowQuerySource" - ] - } + "ListConversationModels": { + "requestType": "ListConversationModelsRequest", + "responseType": "ListConversationModelsResponse", + "options": { + "(google.api.http).get": "/v2/{parent=projects/*}/conversationModels", + "(google.api.http).additional_bindings.get": "/v2/{parent=projects/*/locations/*}/conversationModels", + "(google.api.method_signature)": "parent" }, - "fields": { - "knowledgeBaseQuerySource": { - "type": "KnowledgeBaseQuerySource", - "id": 1 - }, - "documentQuerySource": { - "type": "DocumentQuerySource", - "id": 2 - }, - "dialogflowQuerySource": { - "type": "DialogflowQuerySource", - "id": 3 + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=projects/*}/conversationModels", + "additional_bindings": { + "get": "/v2/{parent=projects/*/locations/*}/conversationModels" + } + } }, - "maxResults": { - "type": "int32", - "id": 4 + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeleteConversationModel": { + "requestType": "DeleteConversationModelRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v2/{name=projects/*/conversationModels/*}", + "(google.api.http).additional_bindings.delete": "/v2/{name=projects/*/locations/*/conversationModels/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "DeleteConversationModelOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=projects/*/conversationModels/*}", + "additional_bindings": { + "delete": "/v2/{name=projects/*/locations/*/conversationModels/*}" + } + } }, - "confidenceThreshold": { - "type": "float", - "id": 5 + { + "(google.api.method_signature)": "name" }, - "contextFilterSettings": { - "type": "ContextFilterSettings", - "id": 7 + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "DeleteConversationModelOperationMetadata" + } } + ] + }, + "DeployConversationModel": { + "requestType": "DeployConversationModelRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v2/{name=projects/*/conversationModels/*}:deploy", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2/{name=projects/*/locations/*/conversationModels/*}:deploy", + "(google.api.http).additional_bindings.body": "*", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "DeployConversationModelOperationMetadata" }, - "nested": { - "KnowledgeBaseQuerySource": { - "fields": { - "knowledgeBases": { - "rule": "repeated", - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/KnowledgeBase" - } + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{name=projects/*/conversationModels/*}:deploy", + "body": "*", + "additional_bindings": { + "post": "/v2/{name=projects/*/locations/*/conversationModels/*}:deploy", + "body": "*" } } }, - "DocumentQuerySource": { - "fields": { - "documents": { - "rule": "repeated", - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Document" - } + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "DeployConversationModelOperationMetadata" + } + } + ] + }, + "UndeployConversationModel": { + "requestType": "UndeployConversationModelRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v2/{name=projects/*/conversationModels/*}:undeploy", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2/{name=projects/*/locations/*/conversationModels/*}:undeploy", + "(google.api.http).additional_bindings.body": "*", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "UndeployConversationModelOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{name=projects/*/conversationModels/*}:undeploy", + "body": "*", + "additional_bindings": { + "post": "/v2/{name=projects/*/locations/*/conversationModels/*}:undeploy", + "body": "*" } } }, - "DialogflowQuerySource": { - "fields": { - "agent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "dialogflow.googleapis.com/Agent" - } + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "UndeployConversationModelOperationMetadata" + } + } + ] + }, + "GetConversationModelEvaluation": { + "requestType": "GetConversationModelEvaluationRequest", + "responseType": "ConversationModelEvaluation", + "options": { + "(google.api.http).get": "/v2/{name=projects/*/conversationModels/*/evaluations/*}", + "(google.api.http).additional_bindings.get": "/v2/{name=projects/*/locations/*/conversationModels/*/evaluations/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=projects/*/conversationModels/*/evaluations/*}", + "additional_bindings": { + "get": "/v2/{name=projects/*/locations/*/conversationModels/*/evaluations/*}" } } }, - "ContextFilterSettings": { - "fields": { - "dropHandoffMessages": { - "type": "bool", - "id": 1 - }, - "dropVirtualAgentMessages": { - "type": "bool", - "id": 2 - }, - "dropIvrMessages": { - "type": "bool", - "id": 3 + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListConversationModelEvaluations": { + "requestType": "ListConversationModelEvaluationsRequest", + "responseType": "ListConversationModelEvaluationsResponse", + "options": { + "(google.api.http).get": "/v2/{parent=projects/*/conversationModels/*}/evaluations", + "(google.api.http).additional_bindings.get": "/v2/{parent=projects/*/locations/*/conversationModels/*}/evaluations", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=projects/*/conversationModels/*}/evaluations", + "additional_bindings": { + "get": "/v2/{parent=projects/*/locations/*/conversationModels/*}/evaluations" } } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateConversationModelEvaluation": { + "requestType": "CreateConversationModelEvaluationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v2/{parent=projects/*/locations/*/conversationModels/*}/evaluations", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,conversation_model_evaluation", + "(google.longrunning.operation_info).response_type": "ConversationModelEvaluation", + "(google.longrunning.operation_info).metadata_type": "CreateConversationModelEvaluationOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*/locations/*/conversationModels/*}/evaluations", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,conversation_model_evaluation" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ConversationModelEvaluation", + "metadata_type": "CreateConversationModelEvaluationOperationMetadata" + } } + ] + } + } + }, + "ConversationModel": { + "options": { + "(google.api.resource).type": "dialogflow.googleapis.com/ConversationModel", + "(google.api.resource).pattern": "projects/{project}/conversationModels/{conversation_model}" + }, + "oneofs": { + "modelMetadata": { + "oneof": [ + "articleSuggestionModelMetadata", + "smartReplyModelMetadata" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" } }, - "ConversationModelConfig": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "datasets": { + "rule": "repeated", + "type": "InputDataset", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "state": { + "type": "State", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "languageCode": { + "type": "string", + "id": 19 + }, + "articleSuggestionModelMetadata": { + "type": "ArticleSuggestionModelMetadata", + "id": 8 + }, + "smartReplyModelMetadata": { + "type": "SmartReplyModelMetadata", + "id": 9 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "UNDEPLOYED": 2, + "DEPLOYING": 3, + "DEPLOYED": 4, + "UNDEPLOYING": 5, + "DELETING": 6, + "FAILED": 7, + "PENDING": 8 + } + }, + "ModelType": { + "values": { + "MODEL_TYPE_UNSPECIFIED": 0, + "SMART_REPLY_DUAL_ENCODER_MODEL": 2, + "SMART_REPLY_BERT_MODEL": 6 + } + } + } + }, + "ConversationModelEvaluation": { + "options": { + "(google.api.resource).type": "dialogflow.googleapis.com/ConversationModelEvaluation", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/conversationModels/{conversation_model}/evaluations/{evaluation}" + }, + "oneofs": { + "metrics": { + "oneof": [ + "smartReplyMetrics" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "evaluationConfig": { + "type": "EvaluationConfig", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "smartReplyMetrics": { + "type": "SmartReplyMetrics", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "rawHumanEvalTemplateCsv": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "EvaluationConfig": { + "oneofs": { + "modelSpecificConfig": { + "oneof": [ + "smartReplyConfig", + "smartComposeConfig" + ] + } + }, + "fields": { + "datasets": { + "rule": "repeated", + "type": "InputDataset", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "smartReplyConfig": { + "type": "SmartReplyConfig", + "id": 2 + }, + "smartComposeConfig": { + "type": "SmartComposeConfig", + "id": 4 + } + }, + "nested": { + "SmartReplyConfig": { "fields": { - "model": { + "allowlistDocument": { "type": "string", "id": 1, "options": { - "(google.api.resource_reference).type": "dialogflow.googleapis.com/ConversationModel" + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Document" } - } - } - }, - "ConversationProcessConfig": { - "fields": { - "recentSentencesCount": { + }, + "maxResultCount": { "type": "int32", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, - "MessageAnalysisConfig": { + "SmartComposeConfig": { "fields": { - "enableEntityExtraction": { - "type": "bool", - "id": 2 + "allowlistDocument": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Document" + } }, - "enableSentimentAnalysis": { - "type": "bool", - "id": 3 + "maxResultCount": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } } } }, - "HumanAgentHandoffConfig": { - "oneofs": { - "agentService": { - "oneof": [ - "livePersonConfig", - "salesforceLiveAgentConfig" - ] + "InputDataset": { + "fields": { + "dataset": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/ConversationDataset" + } } - }, + } + }, + "ArticleSuggestionModelMetadata": { "fields": { - "livePersonConfig": { - "type": "LivePersonConfig", + "trainingModelType": { + "type": "ConversationModel.ModelType", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SmartReplyModelMetadata": { + "fields": { + "trainingModelType": { + "type": "ConversationModel.ModelType", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SmartReplyMetrics": { + "fields": { + "allowlistCoverage": { + "type": "float", "id": 1 }, - "salesforceLiveAgentConfig": { - "type": "SalesforceLiveAgentConfig", + "topNMetrics": { + "rule": "repeated", + "type": "TopNMetrics", "id": 2 + }, + "conversationCount": { + "type": "int64", + "id": 3 } }, "nested": { - "LivePersonConfig": { - "fields": { - "accountNumber": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "SalesforceLiveAgentConfig": { + "TopNMetrics": { "fields": { - "organizationId": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "deploymentId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "buttonId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "n": { + "type": "int32", + "id": 1 }, - "endpointDomain": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "recall": { + "type": "float", + "id": 2 } } } } }, - "NotificationConfig": { + "CreateConversationModelRequest": { "fields": { - "topic": { + "parent": { "type": "string", "id": 1 }, - "messageFormat": { - "type": "MessageFormat", - "id": 2 + "conversationModel": { + "type": "ConversationModel", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } - }, - "nested": { - "MessageFormat": { - "values": { - "MESSAGE_FORMAT_UNSPECIFIED": 0, - "PROTO": 1, - "JSON": 2 + } + }, + "GetConversationModelRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" } } } }, - "LoggingConfig": { + "ListConversationModelsRequest": { "fields": { - "enableStackdriverLogging": { - "type": "bool", - "id": 3 + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, - "SuggestionFeature": { + "ListConversationModelsResponse": { "fields": { - "type": { - "type": "Type", + "conversationModels": { + "rule": "repeated", + "type": "ConversationModel", "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 } - }, - "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "ARTICLE_SUGGESTION": 1, - "FAQ": 2, - "SMART_REPLY": 3 + } + }, + "DeleteConversationModelRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" } } } }, - "SetSuggestionFeatureConfigRequest": { + "DeployConversationModelRequest": { "fields": { - "conversationProfile": { + "name": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED" } - }, - "participantRole": { - "type": "Participant.Role", - "id": 2, + } + } + }, + "UndeployConversationModelRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED" } - }, - "suggestionFeatureConfig": { - "type": "HumanAgentAssistantConfig.SuggestionFeatureConfig", - "id": 3, + } + } + }, + "GetConversationModelEvaluationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED" } } } }, - "ClearSuggestionFeatureConfigRequest": { + "ListConversationModelEvaluationsRequest": { "fields": { - "conversationProfile": { + "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED" } }, - "participantRole": { - "type": "Participant.Role", + "pageSize": { + "type": "int32", "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } }, - "suggestionFeatureType": { - "type": "SuggestionFeature.Type", + "pageToken": { + "type": "string", "id": 3, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "SetSuggestionFeatureConfigOperationMetadata": { + "ListConversationModelEvaluationsResponse": { "fields": { - "conversationProfile": { - "type": "string", + "conversationModelEvaluations": { + "rule": "repeated", + "type": "ConversationModelEvaluation", "id": 1 }, - "participantRole": { - "type": "Participant.Role", - "id": 2, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CreateConversationModelEvaluationRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dialogflow.googleapis.com/ConversationModelEvaluation" } }, - "suggestionFeatureType": { - "type": "SuggestionFeature.Type", - "id": 3, + "conversationModelEvaluation": { + "type": "ConversationModelEvaluation", + "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } + } + } + }, + "CreateConversationModelOperationMetadata": { + "fields": { + "conversationModel": { + "type": "string", + "id": 1 + }, + "state": { + "type": "State", + "id": 2 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "PENDING": 1, + "SUCCEEDED": 2, + "FAILED": 3, + "CANCELLED": 4, + "CANCELLING": 5, + "TRAINING": 6 + } + } + } + }, + "DeployConversationModelOperationMetadata": { + "fields": { + "conversationModel": { + "type": "string", + "id": 1 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + } + }, + "UndeployConversationModelOperationMetadata": { + "fields": { + "conversationModel": { + "type": "string", + "id": 1 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + } + }, + "DeleteConversationModelOperationMetadata": { + "fields": { + "conversationModel": { + "type": "string", + "id": 1 }, "createTime": { "type": "google.protobuf.Timestamp", - "id": 4 + "id": 3 } } }, - "ClearSuggestionFeatureConfigOperationMetadata": { + "CreateConversationModelEvaluationOperationMetadata": { "fields": { - "conversationProfile": { + "conversationModelEvaluation": { "type": "string", "id": 1 }, - "participantRole": { - "type": "Participant.Role", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "conversationModel": { + "type": "string", + "id": 4 }, - "suggestionFeatureType": { - "type": "SuggestionFeature.Type", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "state": { + "type": "State", + "id": 2 }, "createTime": { "type": "google.protobuf.Timestamp", - "id": 4 + "id": 3 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "INITIALIZING": 1, + "RUNNING": 2, + "CANCELLED": 3, + "SUCCEEDED": 4, + "FAILED": 5 + } } } }, @@ -11401,6 +11608,10 @@ "enablePartialAutomatedAgentReply": { "type": "bool", "id": 12 + }, + "enableDebuggingInfo": { + "type": "bool", + "id": 19 } } }, @@ -11439,6 +11650,10 @@ "dtmfParameters": { "type": "DtmfParameters", "id": 10 + }, + "debuggingInfo": { + "type": "CloudConversationDebuggingInfo", + "id": 11 } } }, @@ -12119,6 +12334,10 @@ "bargeInConfig": { "type": "BargeInConfig", "id": 15 + }, + "enableAutomaticPunctuation": { + "type": "bool", + "id": 17 } } }, @@ -12592,6 +12811,86 @@ "inputAudio": { "type": "bytes", "id": 6 + }, + "enableDebuggingInfo": { + "type": "bool", + "id": 8 + } + } + }, + "CloudConversationDebuggingInfo": { + "fields": { + "audioDataChunks": { + "type": "int32", + "id": 1 + }, + "resultEndTimeOffset": { + "type": "google.protobuf.Duration", + "id": 2 + }, + "firstAudioDuration": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "singleUtterance": { + "type": "bool", + "id": 5 + }, + "speechPartialResultsEndTimes": { + "rule": "repeated", + "type": "google.protobuf.Duration", + "id": 6 + }, + "speechFinalResultsEndTimes": { + "rule": "repeated", + "type": "google.protobuf.Duration", + "id": 7 + }, + "partialResponses": { + "type": "int32", + "id": 8 + }, + "speakerIdPassiveLatencyMsOffset": { + "type": "int32", + "id": 9 + }, + "bargeinEventTriggered": { + "type": "bool", + "id": 10 + }, + "speechSingleUtterance": { + "type": "bool", + "id": 11 + }, + "dtmfPartialResultsTimes": { + "rule": "repeated", + "type": "google.protobuf.Duration", + "id": 12 + }, + "dtmfFinalResultsTimes": { + "rule": "repeated", + "type": "google.protobuf.Duration", + "id": 13 + }, + "singleUtteranceEndTimeOffset": { + "type": "google.protobuf.Duration", + "id": 14 + }, + "noSpeechTimeout": { + "type": "google.protobuf.Duration", + "id": 15 + }, + "isInputText": { + "type": "bool", + "id": 16 + }, + "clientHalfCloseTimeOffset": { + "type": "google.protobuf.Duration", + "id": 17 + }, + "clientHalfCloseStreamingTimeOffset": { + "type": "google.protobuf.Duration", + "id": 18 } } }, @@ -12625,6 +12924,10 @@ "outputAudioConfig": { "type": "OutputAudioConfig", "id": 6 + }, + "debuggingInfo": { + "type": "CloudConversationDebuggingInfo", + "id": 8 } } }, @@ -15779,6 +16082,28 @@ "(google.api.method_signature)": "conversation" } ] + }, + "GenerateStatelessSummary": { + "requestType": "GenerateStatelessSummaryRequest", + "responseType": "GenerateStatelessSummaryResponse", + "options": { + "(google.api.http).post": "/v2beta1/{stateless_conversation.parent=projects/*}/suggestions:generateStatelessSummary", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2beta1/{stateless_conversation.parent=projects/*/locations/*}/suggestions:generateStatelessSummary", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2beta1/{stateless_conversation.parent=projects/*}/suggestions:generateStatelessSummary", + "body": "*", + "additional_bindings": { + "post": "/v2beta1/{stateless_conversation.parent=projects/*/locations/*}/suggestions:generateStatelessSummary", + "body": "*" + } + } + } + ] } } }, @@ -16104,41 +16429,87 @@ } } }, - "ConversationEvent": { - "oneofs": { - "payload": { - "oneof": [ - "newMessagePayload" - ] + "GenerateStatelessSummaryRequest": { + "fields": { + "statelessConversation": { + "type": "MinimalConversation", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "conversationProfile": { + "type": "ConversationProfile", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "latestMessage": { + "type": "string", + "id": 3, + "options": { + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Message" + } + }, + "maxContextSize": { + "type": "int32", + "id": 4 } }, + "nested": { + "MinimalConversation": { + "fields": { + "messages": { + "rule": "repeated", + "type": "Message", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "parent": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + } + } + } + } + }, + "GenerateStatelessSummaryResponse": { "fields": { - "conversation": { - "type": "string", + "summary": { + "type": "Summary", "id": 1 }, - "type": { - "type": "Type", - "id": 2 + "latestMessage": { + "type": "string", + "id": 2, + "options": { + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Message" + } }, - "errorStatus": { - "type": "google.rpc.Status", + "contextSize": { + "type": "int32", "id": 3 - }, - "newMessagePayload": { - "type": "Message", - "id": 4 } }, "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "CONVERSATION_STARTED": 1, - "CONVERSATION_FINISHED": 2, - "HUMAN_INTERVENTION_NEEDED": 3, - "NEW_MESSAGE": 5, - "UNRECOVERABLE_ERROR": 4 + "Summary": { + "fields": { + "text": { + "type": "string", + "id": 1 + }, + "textSections": { + "keyType": "string", + "type": "string", + "id": 2 + } } } } @@ -16609,6 +16980,10 @@ "options": { "(google.api.resource_reference).type": "dialogflow.googleapis.com/ConversationModel" } + }, + "baselineModelVersion": { + "type": "string", + "id": 8 } } }, @@ -16924,6 +17299,45 @@ } } }, + "ConversationEvent": { + "oneofs": { + "payload": { + "oneof": [ + "newMessagePayload" + ] + } + }, + "fields": { + "conversation": { + "type": "string", + "id": 1 + }, + "type": { + "type": "Type", + "id": 2 + }, + "errorStatus": { + "type": "google.rpc.Status", + "id": 3 + }, + "newMessagePayload": { + "type": "Message", + "id": 4 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "CONVERSATION_STARTED": 1, + "CONVERSATION_FINISHED": 2, + "HUMAN_INTERVENTION_NEEDED": 3, + "NEW_MESSAGE": 5, + "UNRECOVERABLE_ERROR": 4 + } + } + } + }, "Documents": { "options": { "(google.api.default_host)": "dialogflow.googleapis.com", diff --git a/packages/google-cloud-dialogflow/samples/README.md b/packages/google-cloud-dialogflow/samples/README.md index cedbe02eab0..b7ec1b1afdb 100644 --- a/packages/google-cloud-dialogflow/samples/README.md +++ b/packages/google-cloud-dialogflow/samples/README.md @@ -52,6 +52,7 @@ * [Conversation_profiles.update_conversation_profile](#conversation_profiles.update_conversation_profile) * [Conversations.complete_conversation](#conversations.complete_conversation) * [Conversations.create_conversation](#conversations.create_conversation) + * [Conversations.generate_stateless_summary](#conversations.generate_stateless_summary) * [Conversations.get_conversation](#conversations.get_conversation) * [Conversations.list_conversations](#conversations.list_conversations) * [Conversations.list_messages](#conversations.list_messages) @@ -143,6 +144,7 @@ * [Conversations.batch_create_messages](#conversations.batch_create_messages) * [Conversations.complete_conversation](#conversations.complete_conversation) * [Conversations.create_conversation](#conversations.create_conversation) + * [Conversations.generate_stateless_summary](#conversations.generate_stateless_summary) * [Conversations.get_conversation](#conversations.get_conversation) * [Conversations.list_conversations](#conversations.list_conversations) * [Conversations.list_messages](#conversations.list_messages) @@ -208,7 +210,6 @@ * [Versions.list_versions](#versions.list_versions) * [Versions.update_version](#versions.update_version) * [Quickstart](#quickstart) - * [Quickstart.test](#quickstart.test) ## Before you begin @@ -905,6 +906,23 @@ __Usage:__ +### Conversations.generate_stateless_summary + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversations.generate_stateless_summary.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2/conversations.generate_stateless_summary.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dialogflow/samples/generated/v2/conversations.generate_stateless_summary.js` + + +----- + + + + ### Conversations.get_conversation View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2/conversations.get_conversation.js). @@ -2452,6 +2470,23 @@ __Usage:__ +### Conversations.generate_stateless_summary + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.generate_stateless_summary.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.generate_stateless_summary.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.generate_stateless_summary.js` + + +----- + + + + ### Conversations.get_conversation View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.get_conversation.js). @@ -3552,23 +3587,6 @@ __Usage:__ `node packages/google-cloud-dialogflow/samples/quickstart.js` ------ - - - - -### Quickstart.test - -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow/samples/test/quickstart.test.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow/samples/test/quickstart.test.js,samples/README.md) - -__Usage:__ - - -`node packages/google-cloud-dialogflow/samples/test/quickstart.test.js` - - diff --git a/packages/google-cloud-dialogflow/samples/generated/v2/conversations.generate_stateless_summary.js b/packages/google-cloud-dialogflow/samples/generated/v2/conversations.generate_stateless_summary.js new file mode 100644 index 00000000000..38c1e405392 --- /dev/null +++ b/packages/google-cloud-dialogflow/samples/generated/v2/conversations.generate_stateless_summary.js @@ -0,0 +1,82 @@ +// Copyright 2023 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(statelessConversation, conversationProfile) { + // [START dialogflow_v2_generated_Conversations_GenerateStatelessSummary_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 conversation to suggest a summary for. + */ + // const statelessConversation = {} + /** + * Required. A ConversationProfile containing information required for Summary + * generation. + * Required fields: {language_code, security_settings} + * Optional fields: {agent_assistant_config} + */ + // const conversationProfile = {} + /** + * The name of the latest conversation message used as context for + * generating a Summary. If empty, the latest message of the conversation will + * be used. The format is specific to the user and the names of the messages + * provided. + */ + // const latestMessage = 'abc123' + /** + * Max number of messages prior to and including + * latest_message to use as context when compiling the + * suggestion. By default 500 and at most 1000. + */ + // const maxContextSize = 1234 + + // Imports the Dialogflow library + const {ConversationsClient} = require('@google-cloud/dialogflow').v2; + + // Instantiates a client + const dialogflowClient = new ConversationsClient(); + + async function callGenerateStatelessSummary() { + // Construct request + const request = { + statelessConversation, + conversationProfile, + }; + + // Run request + const response = await dialogflowClient.generateStatelessSummary(request); + console.log(response); + } + + callGenerateStatelessSummary(); + // [END dialogflow_v2_generated_Conversations_GenerateStatelessSummary_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dialogflow/samples/generated/v2/participants.streaming_analyze_content.js b/packages/google-cloud-dialogflow/samples/generated/v2/participants.streaming_analyze_content.js index f496c75f7fc..130a333658a 100644 --- a/packages/google-cloud-dialogflow/samples/generated/v2/participants.streaming_analyze_content.js +++ b/packages/google-cloud-dialogflow/samples/generated/v2/participants.streaming_analyze_content.js @@ -92,6 +92,11 @@ function main(participant) { * partial responses. */ // const enablePartialAutomatedAgentReply = true + /** + * If true, `StreamingAnalyzeContentResponse.debugging_info` will get + * populated. + */ + // const enableDebuggingInfo = true // Imports the Dialogflow library const {ParticipantsClient} = require('@google-cloud/dialogflow').v2; diff --git a/packages/google-cloud-dialogflow/samples/generated/v2/sessions.streaming_detect_intent.js b/packages/google-cloud-dialogflow/samples/generated/v2/sessions.streaming_detect_intent.js index 74ab1732ee7..d2eba3d131a 100644 --- a/packages/google-cloud-dialogflow/samples/generated/v2/sessions.streaming_detect_intent.js +++ b/packages/google-cloud-dialogflow/samples/generated/v2/sessions.streaming_detect_intent.js @@ -92,6 +92,10 @@ function main(session, queryInput) { * over all streaming messages must not exceed 1 minute. */ // const inputAudio = 'Buffer.from('string')' + /** + * if true, `StreamingDetectIntentResponse.debugging_info` will get populated. + */ + // const enableDebuggingInfo = true // Imports the Dialogflow library const {SessionsClient} = require('@google-cloud/dialogflow').v2; diff --git a/packages/google-cloud-dialogflow/samples/generated/v2/snippet_metadata.google.cloud.dialogflow.v2.json b/packages/google-cloud-dialogflow/samples/generated/v2/snippet_metadata.google.cloud.dialogflow.v2.json index 14ca4d4c8d0..0e2e1345093 100644 --- a/packages/google-cloud-dialogflow/samples/generated/v2/snippet_metadata.google.cloud.dialogflow.v2.json +++ b/packages/google-cloud-dialogflow/samples/generated/v2/snippet_metadata.google.cloud.dialogflow.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dialogflow", - "version": "5.7.0", + "version": "5.8.0", "language": "TYPESCRIPT", "apis": [ { @@ -1955,6 +1955,58 @@ } } }, + { + "regionTag": "dialogflow_v2_generated_Conversations_GenerateStatelessSummary_async", + "title": "dialogflow generateStatelessSummary Sample", + "origin": "API_DEFINITION", + "description": " Generates and returns a summary for a conversation that does not have a resource created for it.", + "canonical": true, + "file": "conversations.generate_stateless_summary.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GenerateStatelessSummary", + "fullName": "google.cloud.dialogflow.v2.Conversations.GenerateStatelessSummary", + "async": true, + "parameters": [ + { + "name": "stateless_conversation", + "type": ".google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation" + }, + { + "name": "conversation_profile", + "type": ".google.cloud.dialogflow.v2.ConversationProfile" + }, + { + "name": "latest_message", + "type": "TYPE_STRING" + }, + { + "name": "max_context_size", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse", + "client": { + "shortName": "ConversationsClient", + "fullName": "google.cloud.dialogflow.v2.ConversationsClient" + }, + "method": { + "shortName": "GenerateStatelessSummary", + "fullName": "google.cloud.dialogflow.v2.Conversations.GenerateStatelessSummary", + "service": { + "shortName": "Conversations", + "fullName": "google.cloud.dialogflow.v2.Conversations" + } + } + } + }, { "regionTag": "dialogflow_v2_generated_Documents_ListDocuments_async", "title": "dialogflow listDocuments Sample", @@ -3998,7 +4050,7 @@ "segments": [ { "start": 25, - "end": 117, + "end": 122, "type": "FULL" } ], @@ -4050,6 +4102,10 @@ { "name": "enable_partial_automated_agent_reply", "type": "TYPE_BOOL" + }, + { + "name": "enable_debugging_info", + "type": "TYPE_BOOL" } ], "resultType": ".google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse", @@ -4510,7 +4566,7 @@ "segments": [ { "start": 25, - "end": 118, + "end": 122, "type": "FULL" } ], @@ -4546,6 +4602,10 @@ { "name": "input_audio", "type": "TYPE_BYTES" + }, + { + "name": "enable_debugging_info", + "type": "TYPE_BOOL" } ], "resultType": ".google.cloud.dialogflow.v2.StreamingDetectIntentResponse", diff --git a/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.generate_stateless_summary.js b/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.generate_stateless_summary.js new file mode 100644 index 00000000000..e6e67dd8aa4 --- /dev/null +++ b/packages/google-cloud-dialogflow/samples/generated/v2beta1/conversations.generate_stateless_summary.js @@ -0,0 +1,82 @@ +// Copyright 2023 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(statelessConversation, conversationProfile) { + // [START dialogflow_v2beta1_generated_Conversations_GenerateStatelessSummary_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 conversation to suggest a summary for. + */ + // const statelessConversation = {} + /** + * Required. A ConversationProfile containing information required for Summary + * generation. + * Required fields: {language_code, security_settings} + * Optional fields: {agent_assistant_config} + */ + // const conversationProfile = {} + /** + * The name of the latest conversation message used as context for + * generating a Summary. If empty, the latest message of the conversation will + * be used. The format is specific to the user and the names of the messages + * provided. + */ + // const latestMessage = 'abc123' + /** + * Max number of messages prior to and including + * latest_message to use as context when compiling the + * suggestion. By default 500 and at most 1000. + */ + // const maxContextSize = 1234 + + // Imports the Dialogflow library + const {ConversationsClient} = require('@google-cloud/dialogflow').v2beta1; + + // Instantiates a client + const dialogflowClient = new ConversationsClient(); + + async function callGenerateStatelessSummary() { + // Construct request + const request = { + statelessConversation, + conversationProfile, + }; + + // Run request + const response = await dialogflowClient.generateStatelessSummary(request); + console.log(response); + } + + callGenerateStatelessSummary(); + // [END dialogflow_v2beta1_generated_Conversations_GenerateStatelessSummary_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.streaming_analyze_content.js b/packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.streaming_analyze_content.js index 295b4df2808..e1f7041d529 100644 --- a/packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.streaming_analyze_content.js +++ b/packages/google-cloud-dialogflow/samples/generated/v2beta1/participants.streaming_analyze_content.js @@ -107,6 +107,11 @@ function main(participant) { * partial responses. */ // const enablePartialAutomatedAgentReply = true + /** + * if true, `StreamingAnalyzeContentResponse.debugging_info` will get + * populated. + */ + // const enableDebuggingInfo = true // Imports the Dialogflow library const {ParticipantsClient} = require('@google-cloud/dialogflow').v2beta1; diff --git a/packages/google-cloud-dialogflow/samples/generated/v2beta1/sessions.streaming_detect_intent.js b/packages/google-cloud-dialogflow/samples/generated/v2beta1/sessions.streaming_detect_intent.js index 567bba7487e..887be37026d 100644 --- a/packages/google-cloud-dialogflow/samples/generated/v2beta1/sessions.streaming_detect_intent.js +++ b/packages/google-cloud-dialogflow/samples/generated/v2beta1/sessions.streaming_detect_intent.js @@ -98,6 +98,10 @@ function main(session, queryInput) { * over all streaming messages must not exceed 1 minute. */ // const inputAudio = 'Buffer.from('string')' + /** + * If true, `StreamingDetectIntentResponse.debugging_info` will get populated. + */ + // const enableDebuggingInfo = true // Imports the Dialogflow library const {SessionsClient} = require('@google-cloud/dialogflow').v2beta1; diff --git a/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json b/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json index 8ac123150b1..fe6c877b42c 100644 --- a/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json +++ b/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dialogflow", - "version": "5.7.0", + "version": "5.8.0", "language": "TYPESCRIPT", "apis": [ { @@ -1439,6 +1439,58 @@ } } }, + { + "regionTag": "dialogflow_v2beta1_generated_Conversations_GenerateStatelessSummary_async", + "title": "dialogflow generateStatelessSummary Sample", + "origin": "API_DEFINITION", + "description": " Generates and returns a summary for a conversation that does not have a resource created for it.", + "canonical": true, + "file": "conversations.generate_stateless_summary.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GenerateStatelessSummary", + "fullName": "google.cloud.dialogflow.v2beta1.Conversations.GenerateStatelessSummary", + "async": true, + "parameters": [ + { + "name": "stateless_conversation", + "type": ".google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation" + }, + { + "name": "conversation_profile", + "type": ".google.cloud.dialogflow.v2beta1.ConversationProfile" + }, + { + "name": "latest_message", + "type": "TYPE_STRING" + }, + { + "name": "max_context_size", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse", + "client": { + "shortName": "ConversationsClient", + "fullName": "google.cloud.dialogflow.v2beta1.ConversationsClient" + }, + "method": { + "shortName": "GenerateStatelessSummary", + "fullName": "google.cloud.dialogflow.v2beta1.Conversations.GenerateStatelessSummary", + "service": { + "shortName": "Conversations", + "fullName": "google.cloud.dialogflow.v2beta1.Conversations" + } + } + } + }, { "regionTag": "dialogflow_v2beta1_generated_Documents_ListDocuments_async", "title": "dialogflow listDocuments Sample", @@ -3442,7 +3494,7 @@ "segments": [ { "start": 25, - "end": 132, + "end": 137, "type": "FULL" } ], @@ -3498,6 +3550,10 @@ { "name": "enable_partial_automated_agent_reply", "type": "TYPE_BOOL" + }, + { + "name": "enable_debugging_info", + "type": "TYPE_BOOL" } ], "resultType": ".google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse", @@ -4058,7 +4114,7 @@ "segments": [ { "start": 25, - "end": 124, + "end": 128, "type": "FULL" } ], @@ -4094,6 +4150,10 @@ { "name": "input_audio", "type": "TYPE_BYTES" + }, + { + "name": "enable_debugging_info", + "type": "TYPE_BOOL" } ], "resultType": ".google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse", diff --git a/packages/google-cloud-dialogflow/samples/package.json b/packages/google-cloud-dialogflow/samples/package.json index 88a5bf949ff..58b89db5cf5 100644 --- a/packages/google-cloud-dialogflow/samples/package.json +++ b/packages/google-cloud-dialogflow/samples/package.json @@ -15,7 +15,7 @@ "test": "mocha test --timeout=600000" }, "dependencies": { - "@google-cloud/dialogflow": "^5.7.1", + "@google-cloud/dialogflow": "^5.8.0", "pb-util": "^1.0.0", "uuid": "^9.0.0", "yargs": "^16.0.0" diff --git a/packages/google-cloud-dialogflow/src/v2/conversations_client.ts b/packages/google-cloud-dialogflow/src/v2/conversations_client.ts index 7478c0734a7..80e9201ddb1 100644 --- a/packages/google-cloud-dialogflow/src/v2/conversations_client.ts +++ b/packages/google-cloud-dialogflow/src/v2/conversations_client.ts @@ -400,6 +400,7 @@ export class ConversationsClient { 'completeConversation', 'listMessages', 'suggestConversationSummary', + 'generateStatelessSummary', ]; for (const methodName of conversationsStubMethods) { const callPromise = this.conversationsStub.then( @@ -922,6 +923,123 @@ export class ConversationsClient { callback ); } + /** + * Generates and returns a summary for a conversation that does not have a + * resource created for it. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest.MinimalConversation} request.statelessConversation + * Required. The conversation to suggest a summary for. + * @param {google.cloud.dialogflow.v2.ConversationProfile} request.conversationProfile + * Required. A ConversationProfile containing information required for Summary + * generation. + * Required fields: {language_code, security_settings} + * Optional fields: {agent_assistant_config} + * @param {string} request.latestMessage + * The name of the latest conversation message used as context for + * generating a Summary. If empty, the latest message of the conversation will + * be used. The format is specific to the user and the names of the messages + * provided. + * @param {number} request.maxContextSize + * Max number of messages prior to and including + * [latest_message] to use as context when compiling the + * suggestion. By default 500 and at most 1000. + * @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 google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse | GenerateStatelessSummaryResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2/conversations.generate_stateless_summary.js + * region_tag:dialogflow_v2_generated_Conversations_GenerateStatelessSummary_async + */ + generateStatelessSummary( + request?: protos.google.cloud.dialogflow.v2.IGenerateStatelessSummaryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dialogflow.v2.IGenerateStatelessSummaryResponse, + ( + | protos.google.cloud.dialogflow.v2.IGenerateStatelessSummaryRequest + | undefined + ), + {} | undefined + ] + >; + generateStatelessSummary( + request: protos.google.cloud.dialogflow.v2.IGenerateStatelessSummaryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.v2.IGenerateStatelessSummaryResponse, + | protos.google.cloud.dialogflow.v2.IGenerateStatelessSummaryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + generateStatelessSummary( + request: protos.google.cloud.dialogflow.v2.IGenerateStatelessSummaryRequest, + callback: Callback< + protos.google.cloud.dialogflow.v2.IGenerateStatelessSummaryResponse, + | protos.google.cloud.dialogflow.v2.IGenerateStatelessSummaryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + generateStatelessSummary( + request?: protos.google.cloud.dialogflow.v2.IGenerateStatelessSummaryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dialogflow.v2.IGenerateStatelessSummaryResponse, + | protos.google.cloud.dialogflow.v2.IGenerateStatelessSummaryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dialogflow.v2.IGenerateStatelessSummaryResponse, + | protos.google.cloud.dialogflow.v2.IGenerateStatelessSummaryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dialogflow.v2.IGenerateStatelessSummaryResponse, + ( + | protos.google.cloud.dialogflow.v2.IGenerateStatelessSummaryRequest + | 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({ + 'stateless_conversation.parent': + request.statelessConversation!.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.generateStatelessSummary( + request, + options, + callback + ); + } /** * Returns the list of all conversations in the specified project. diff --git a/packages/google-cloud-dialogflow/src/v2/conversations_client_config.json b/packages/google-cloud-dialogflow/src/v2/conversations_client_config.json index 110a0c116d1..bccc7888861 100644 --- a/packages/google-cloud-dialogflow/src/v2/conversations_client_config.json +++ b/packages/google-cloud-dialogflow/src/v2/conversations_client_config.json @@ -52,6 +52,11 @@ "timeout_millis": 60000, "retry_codes_name": "unavailable", "retry_params_name": "default" + }, + "GenerateStatelessSummary": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" } } } diff --git a/packages/google-cloud-dialogflow/src/v2/gapic_metadata.json b/packages/google-cloud-dialogflow/src/v2/gapic_metadata.json index 3fa6cefc794..6c9471d5473 100644 --- a/packages/google-cloud-dialogflow/src/v2/gapic_metadata.json +++ b/packages/google-cloud-dialogflow/src/v2/gapic_metadata.json @@ -522,6 +522,11 @@ "suggestConversationSummary" ] }, + "GenerateStatelessSummary": { + "methods": [ + "generateStatelessSummary" + ] + }, "ListConversations": { "methods": [ "listConversations", @@ -561,6 +566,11 @@ "suggestConversationSummary" ] }, + "GenerateStatelessSummary": { + "methods": [ + "generateStatelessSummary" + ] + }, "ListConversations": { "methods": [ "listConversations", diff --git a/packages/google-cloud-dialogflow/src/v2beta1/conversations_client.ts b/packages/google-cloud-dialogflow/src/v2beta1/conversations_client.ts index e10222bf4f9..54c808156ed 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/conversations_client.ts +++ b/packages/google-cloud-dialogflow/src/v2beta1/conversations_client.ts @@ -383,6 +383,7 @@ export class ConversationsClient { 'batchCreateMessages', 'listMessages', 'suggestConversationSummary', + 'generateStatelessSummary', ]; for (const methodName of conversationsStubMethods) { const callPromise = this.conversationsStub.then( @@ -1022,6 +1023,123 @@ export class ConversationsClient { callback ); } + /** + * Generates and returns a summary for a conversation that does not have a + * resource created for it. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest.MinimalConversation} request.statelessConversation + * Required. The conversation to suggest a summary for. + * @param {google.cloud.dialogflow.v2beta1.ConversationProfile} request.conversationProfile + * Required. A ConversationProfile containing information required for Summary + * generation. + * Required fields: {language_code, security_settings} + * Optional fields: {agent_assistant_config} + * @param {string} request.latestMessage + * The name of the latest conversation message used as context for + * generating a Summary. If empty, the latest message of the conversation will + * be used. The format is specific to the user and the names of the messages + * provided. + * @param {number} request.maxContextSize + * Max number of messages prior to and including + * [latest_message] to use as context when compiling the + * suggestion. By default 500 and at most 1000. + * @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 google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse | GenerateStatelessSummaryResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v2beta1/conversations.generate_stateless_summary.js + * region_tag:dialogflow_v2beta1_generated_Conversations_GenerateStatelessSummary_async + */ + generateStatelessSummary( + request?: protos.google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryResponse, + ( + | protos.google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryRequest + | undefined + ), + {} | undefined + ] + >; + generateStatelessSummary( + request: protos.google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryResponse, + | protos.google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + generateStatelessSummary( + request: protos.google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryRequest, + callback: Callback< + protos.google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryResponse, + | protos.google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + generateStatelessSummary( + request?: protos.google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryResponse, + | protos.google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryResponse, + | protos.google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryResponse, + ( + | protos.google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryRequest + | 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({ + 'stateless_conversation.parent': + request.statelessConversation!.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.generateStatelessSummary( + request, + options, + callback + ); + } /** * Returns the list of all conversations in the specified project. diff --git a/packages/google-cloud-dialogflow/src/v2beta1/conversations_client_config.json b/packages/google-cloud-dialogflow/src/v2beta1/conversations_client_config.json index 62968c0bd5e..bcec3fa8a8c 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/conversations_client_config.json +++ b/packages/google-cloud-dialogflow/src/v2beta1/conversations_client_config.json @@ -57,6 +57,11 @@ "timeout_millis": 60000, "retry_codes_name": "unavailable", "retry_params_name": "default" + }, + "GenerateStatelessSummary": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "default" } } } diff --git a/packages/google-cloud-dialogflow/src/v2beta1/gapic_metadata.json b/packages/google-cloud-dialogflow/src/v2beta1/gapic_metadata.json index 9e1a852b6ec..20ae412888d 100644 --- a/packages/google-cloud-dialogflow/src/v2beta1/gapic_metadata.json +++ b/packages/google-cloud-dialogflow/src/v2beta1/gapic_metadata.json @@ -357,6 +357,11 @@ "suggestConversationSummary" ] }, + "GenerateStatelessSummary": { + "methods": [ + "generateStatelessSummary" + ] + }, "ListConversations": { "methods": [ "listConversations", @@ -401,6 +406,11 @@ "suggestConversationSummary" ] }, + "GenerateStatelessSummary": { + "methods": [ + "generateStatelessSummary" + ] + }, "ListConversations": { "methods": [ "listConversations", diff --git a/packages/google-cloud-dialogflow/test/gapic_conversations_v2.ts b/packages/google-cloud-dialogflow/test/gapic_conversations_v2.ts index 0b9cd1d772d..ffe6e9f5f24 100644 --- a/packages/google-cloud-dialogflow/test/gapic_conversations_v2.ts +++ b/packages/google-cloud-dialogflow/test/gapic_conversations_v2.ts @@ -756,6 +756,147 @@ describe('v2.ConversationsClient', () => { }); }); + describe('generateStatelessSummary', () => { + it('invokes generateStatelessSummary without error', async () => { + const client = new conversationsModule.v2.ConversationsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest() + ); + request.statelessConversation ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest', + ['statelessConversation', 'parent'] + ); + request.statelessConversation.parent = defaultValue1; + const expectedHeaderRequestParams = `stateless_conversation.parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse() + ); + client.innerApiCalls.generateStatelessSummary = + stubSimpleCall(expectedResponse); + const [response] = await client.generateStatelessSummary(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.generateStatelessSummary as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.generateStatelessSummary as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateStatelessSummary without error using callback', async () => { + const client = new conversationsModule.v2.ConversationsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest() + ); + request.statelessConversation ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest', + ['statelessConversation', 'parent'] + ); + request.statelessConversation.parent = defaultValue1; + const expectedHeaderRequestParams = `stateless_conversation.parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.v2.GenerateStatelessSummaryResponse() + ); + client.innerApiCalls.generateStatelessSummary = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.generateStatelessSummary( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dialogflow.v2.IGenerateStatelessSummaryResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.generateStatelessSummary as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.generateStatelessSummary as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateStatelessSummary with error', async () => { + const client = new conversationsModule.v2.ConversationsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest() + ); + request.statelessConversation ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest', + ['statelessConversation', 'parent'] + ); + request.statelessConversation.parent = defaultValue1; + const expectedHeaderRequestParams = `stateless_conversation.parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.generateStatelessSummary = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.generateStatelessSummary(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.generateStatelessSummary as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.generateStatelessSummary as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateStatelessSummary with closed client', async () => { + const client = new conversationsModule.v2.ConversationsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest() + ); + request.statelessConversation ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.v2.GenerateStatelessSummaryRequest', + ['statelessConversation', 'parent'] + ); + request.statelessConversation.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.generateStatelessSummary(request), + expectedError + ); + }); + }); + describe('listConversations', () => { it('invokes listConversations without error', async () => { const client = new conversationsModule.v2.ConversationsClient({ diff --git a/packages/google-cloud-dialogflow/test/gapic_conversations_v2beta1.ts b/packages/google-cloud-dialogflow/test/gapic_conversations_v2beta1.ts index 3bded02e823..28809f2e7b2 100644 --- a/packages/google-cloud-dialogflow/test/gapic_conversations_v2beta1.ts +++ b/packages/google-cloud-dialogflow/test/gapic_conversations_v2beta1.ts @@ -887,6 +887,147 @@ describe('v2beta1.ConversationsClient', () => { }); }); + describe('generateStatelessSummary', () => { + it('invokes generateStatelessSummary without error', async () => { + const client = new conversationsModule.v2beta1.ConversationsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest() + ); + request.statelessConversation ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest', + ['statelessConversation', 'parent'] + ); + request.statelessConversation.parent = defaultValue1; + const expectedHeaderRequestParams = `stateless_conversation.parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse() + ); + client.innerApiCalls.generateStatelessSummary = + stubSimpleCall(expectedResponse); + const [response] = await client.generateStatelessSummary(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.generateStatelessSummary as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.generateStatelessSummary as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateStatelessSummary without error using callback', async () => { + const client = new conversationsModule.v2beta1.ConversationsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest() + ); + request.statelessConversation ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest', + ['statelessConversation', 'parent'] + ); + request.statelessConversation.parent = defaultValue1; + const expectedHeaderRequestParams = `stateless_conversation.parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryResponse() + ); + client.innerApiCalls.generateStatelessSummary = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.generateStatelessSummary( + request, + ( + err?: Error | null, + result?: protos.google.cloud.dialogflow.v2beta1.IGenerateStatelessSummaryResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.generateStatelessSummary as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.generateStatelessSummary as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateStatelessSummary with error', async () => { + const client = new conversationsModule.v2beta1.ConversationsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest() + ); + request.statelessConversation ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest', + ['statelessConversation', 'parent'] + ); + request.statelessConversation.parent = defaultValue1; + const expectedHeaderRequestParams = `stateless_conversation.parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.generateStatelessSummary = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.generateStatelessSummary(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.generateStatelessSummary as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.generateStatelessSummary as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generateStatelessSummary with closed client', async () => { + const client = new conversationsModule.v2beta1.ConversationsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest() + ); + request.statelessConversation ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.dialogflow.v2beta1.GenerateStatelessSummaryRequest', + ['statelessConversation', 'parent'] + ); + request.statelessConversation.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.generateStatelessSummary(request), + expectedError + ); + }); + }); + describe('listConversations', () => { it('invokes listConversations without error', async () => { const client = new conversationsModule.v2beta1.ConversationsClient({ diff --git a/packages/google-cloud-discoveryengine/CHANGELOG.md b/packages/google-cloud-discoveryengine/CHANGELOG.md index 8efd376f9c9..2f9d8291f2a 100644 --- a/packages/google-cloud-discoveryengine/CHANGELOG.md +++ b/packages/google-cloud-discoveryengine/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [0.6.0](https://github.com/googleapis/google-cloud-node/compare/discoveryengine-v0.5.0...discoveryengine-v0.6.0) (2023-05-04) + + +### Features + +* [discoveryengine] add document purge API ([#4219](https://github.com/googleapis/google-cloud-node/issues/4219)) ([454fa79](https://github.com/googleapis/google-cloud-node/commit/454fa7943ddf664bc54a67e654d7e8a39ea55fed)) + +## [0.5.0](https://github.com/googleapis/google-cloud-node/compare/discoveryengine-v0.4.1...discoveryengine-v0.5.0) (2023-04-24) + + +### Features + +* [discoveryengine] add search, autocomplete and schema services ([#4201](https://github.com/googleapis/google-cloud-node/issues/4201)) ([de00e1d](https://github.com/googleapis/google-cloud-node/commit/de00e1d88877dd674dfd20b78a3de4476d65eb29)) + ## [0.4.1](https://github.com/googleapis/google-cloud-node/compare/discoveryengine-v0.4.0...discoveryengine-v0.4.1) (2023-04-13) diff --git a/packages/google-cloud-discoveryengine/README.md b/packages/google-cloud-discoveryengine/README.md index 490aeca3b21..9e98b73b46c 100644 --- a/packages/google-cloud-discoveryengine/README.md +++ b/packages/google-cloud-discoveryengine/README.md @@ -125,13 +125,21 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | +| Completion_service.complete_query | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/completion_service.complete_query.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/completion_service.complete_query.js,samples/README.md) | | Document_service.create_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.create_document.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.create_document.js,samples/README.md) | | Document_service.delete_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.delete_document.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.delete_document.js,samples/README.md) | | Document_service.get_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.get_document.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.get_document.js,samples/README.md) | | Document_service.import_documents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.import_documents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.import_documents.js,samples/README.md) | | Document_service.list_documents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.list_documents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.list_documents.js,samples/README.md) | +| Document_service.purge_documents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.purge_documents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.purge_documents.js,samples/README.md) | | Document_service.update_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.update_document.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.update_document.js,samples/README.md) | | Recommendation_service.recommend | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/recommendation_service.recommend.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/recommendation_service.recommend.js,samples/README.md) | +| Schema_service.create_schema | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.create_schema.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.create_schema.js,samples/README.md) | +| Schema_service.delete_schema | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.delete_schema.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.delete_schema.js,samples/README.md) | +| Schema_service.get_schema | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.get_schema.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.get_schema.js,samples/README.md) | +| Schema_service.list_schemas | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.list_schemas.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.list_schemas.js,samples/README.md) | +| Schema_service.update_schema | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.update_schema.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.update_schema.js,samples/README.md) | +| Search_service.search | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/search_service.search.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/search_service.search.js,samples/README.md) | | User_event_service.collect_user_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/user_event_service.collect_user_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/user_event_service.collect_user_event.js,samples/README.md) | | User_event_service.import_user_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/user_event_service.import_user_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/user_event_service.import_user_events.js,samples/README.md) | | User_event_service.write_user_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/user_event_service.write_user_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/user_event_service.write_user_event.js,samples/README.md) | diff --git a/packages/google-cloud-discoveryengine/package.json b/packages/google-cloud-discoveryengine/package.json index 6c2d5ab22a8..76e6ea983de 100644 --- a/packages/google-cloud-discoveryengine/package.json +++ b/packages/google-cloud-discoveryengine/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/discoveryengine", - "version": "0.4.1", + "version": "0.6.0", "description": "Discovery Engine API client for Node.js", "repository": { "type": "git", @@ -31,7 +31,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -39,10 +39,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -57,6 +58,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/common.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/common.proto index 5a455cb0dd6..36a799a9b06 100644 --- a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/common.proto +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/common.proto @@ -42,28 +42,59 @@ option (google.api.resource_definition) = { pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}" }; +// A floating point interval. +message Interval { + // The lower bound of the interval. If neither of the min fields are + // set, then the lower bound is negative infinity. + // + // This field must be not larger than max. + // Otherwise, an `INVALID_ARGUMENT` error is returned. + oneof min { + // Inclusive lower bound. + double minimum = 1; + + // Exclusive lower bound. + double exclusive_minimum = 2; + } + + // The upper bound of the interval. If neither of the max fields are + // set, then the upper bound is positive infinity. + // + // This field must be not smaller than min. + // Otherwise, an `INVALID_ARGUMENT` error is returned. + oneof max { + // Inclusive upper bound. + double maximum = 3; + + // Exclusive upper bound. + double exclusive_maximum = 4; + } +} + // A custom attribute that is not explicitly modeled in a resource, e.g. // [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent]. message CustomAttribute { // The textual values of this custom attribute. For example, `["yellow", // "green"]` when the key is "color". // - // Empty string is not allowed. Otherwise, an INVALID_ARGUMENT error is + // Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is // returned. // // Exactly one of - // [text][google.cloud.discoveryengine.v1beta.CustomAttribute.text] or - // [numbers][google.cloud.discoveryengine.v1beta.CustomAttribute.numbers] - // should be set. Otherwise, an INVALID_ARGUMENT error is returned. + // [CustomAttribute.text][google.cloud.discoveryengine.v1beta.CustomAttribute.text] + // or + // [CustomAttribute.numbers][google.cloud.discoveryengine.v1beta.CustomAttribute.numbers] + // should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. repeated string text = 1; // The numerical values of this custom attribute. For example, `[2.3, 15.4]` // when the key is "lengths_cm". // // Exactly one of - // [text][google.cloud.discoveryengine.v1beta.CustomAttribute.text] or - // [numbers][google.cloud.discoveryengine.v1beta.CustomAttribute.numbers] - // should be set. Otherwise, an INVALID_ARGUMENT error is returned. + // [CustomAttribute.text][google.cloud.discoveryengine.v1beta.CustomAttribute.text] + // or + // [CustomAttribute.numbers][google.cloud.discoveryengine.v1beta.CustomAttribute.numbers] + // should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. repeated double numbers = 2; } @@ -79,18 +110,20 @@ message UserInfo { // model quality. // // The field must be a UTF-8 encoded string with a length limit of 128 - // characters. Otherwise, an INVALID_ARGUMENT error is returned. + // characters. Otherwise, an `INVALID_ARGUMENT` error is returned. string user_id = 1; // User agent as included in the HTTP header. Required for getting // [SearchResponse.sponsored_results][]. // // The field must be a UTF-8 encoded string with a length limit of 1,000 - // characters. Otherwise, an INVALID_ARGUMENT error is returned. + // characters. Otherwise, an `INVALID_ARGUMENT` error is returned. // // This should not be set when using the client side event reporting with // GTM or JavaScript tag in // [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1beta.UserEventService.CollectUserEvent] - // or if [direct_user_request][] is set. + // or if + // [UserEvent.direct_user_request][google.cloud.discoveryengine.v1beta.UserEvent.direct_user_request] + // is set. string user_agent = 2; } diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/completion_service.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/completion_service.proto new file mode 100644 index 00000000000..5a8ecd29acc --- /dev/null +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/completion_service.proto @@ -0,0 +1,116 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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.discoveryengine.v1beta; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "CompletionServiceProto"; +option java_package = "com.google.cloud.discoveryengine.v1beta"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; + +// Service for Auto-Completion. +service CompletionService { + option (google.api.default_host) = "discoveryengine.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Completes the specified user input with keyword suggestions. + rpc CompleteQuery(CompleteQueryRequest) returns (CompleteQueryResponse) { + option (google.api.http) = { + get: "/v1beta/{data_store=projects/*/locations/*/dataStores/*}:completeQuery" + additional_bindings { + get: "/v1beta/{data_store=projects/*/locations/*/collections/*/dataStores/*}:completeQuery" + } + }; + } +} + +// Request message for +// [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery] +// method. +message CompleteQueryRequest { + // Required. The parent data store resource name for which the completion is + // performed, such as + // `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. + string data_store = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/DataStore" + } + ]; + + // Required. The typeahead input used to fetch suggestions. Maximum length is + // 128 characters. + string query = 2 [(google.api.field_behavior) = REQUIRED]; + + // Selects data model of query suggestions for serving. Currently supported + // values: + // + // * `document` - Using suggestions generated from user-imported documents. + // * `search-history` - Using suggestions generated from the past history of + // [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + // API calls. Do not use it when there is no traffic for Search API. + // * `user-event` - Using suggestions generated from user-imported search + // events. + // + // Default values: + // + // * `document` is the default model for regular dataStores. + // * `search-history` is the default model for + // [IndustryVertical.SITE_SEARCH][google.cloud.discoveryengine.v1beta.IndustryVertical.SITE_SEARCH] + // dataStores. + string query_model = 3; + + // A unique identifier for tracking visitors. For example, this could be + // implemented with an HTTP cookie, which should be able to uniquely identify + // a visitor on a single device. This unique identifier should not change if + // the visitor logs in or out of the website. + // + // This field should NOT have a fixed value such as `unknown_visitor`. + // + // This should be the same identifier as + // [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] + // and + // [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id]. + // + // The field must be a UTF-8 encoded string with a length limit of 128 + // characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + string user_pseudo_id = 4; +} + +// Response message for +// [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery] +// method. +message CompleteQueryResponse { + // Suggestions as search queries. + message QuerySuggestion { + // The suggestion for the query. + string suggestion = 1; + } + + // Results of the matched query suggestions. The result list is ordered and + // the first result is a top suggestion. + repeated QuerySuggestion query_suggestions = 1; +} diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/document.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/document.proto index 69c264fb5e4..67e178c508f 100644 --- a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/document.proto +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/document.proto @@ -38,17 +38,49 @@ message Document { pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}" }; + // Unstructured data linked to this document. + message Content { + oneof content { + // The content represented as a stream of bytes. The maximum length is + // 1,000,000 bytes (1 MB / ~0.95 MiB). + // + // Note: As with all `bytes` fields, this field is represented as pure + // binary in Protocol Buffers and base64-encoded string in JSON. For + // example, `abc123!?$*&()'-=@~` should be represented as + // `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See + // https://developers.google.com/protocol-buffers/docs/proto3#json. + bytes raw_bytes = 2; + + // The URI of the content. Only Cloud Storage URIs (e.g. + // `gs://bucket-name/path/to/file`) are supported. The maximum file size + // is 100 MB. + string uri = 3; + } + + // The MIME type of the content. Supported types: + // + // * `application/pdf` (PDF) + // * `text/html` (HTML) + // + // See https://www.iana.org/assignments/media-types/media-types.xhtml. + string mime_type = 1; + } + // Data representation. One of // [struct_data][google.cloud.discoveryengine.v1beta.Document.struct_data] or // [json_data][google.cloud.discoveryengine.v1beta.Document.json_data] should - // be provided otherwise an INVALID_ARGUMENT error is thrown. + // be provided otherwise an `INVALID_ARGUMENT` error is thrown. oneof data { // The structured JSON data for the document. It should conform to the - // registered [schema][] or an INVALID_ARGUMENT error is thrown. + // registered + // [Schema.schema][google.cloud.discoveryengine.v1beta.Schema.schema] or an + // `INVALID_ARGUMENT` error is thrown. google.protobuf.Struct struct_data = 4; // The JSON string representation of the document. It should conform to the - // registered [schema][] or an INVALID_ARGUMENT error is thrown. + // registered + // [Schema.schema][google.cloud.discoveryengine.v1beta.Schema.schema] or an + // `INVALID_ARGUMENT` error is thrown. string json_data = 5; } @@ -69,10 +101,20 @@ message Document { // The identifier of the schema located in the same data store. string schema_id = 3; + // The unstructured data linked to this document. Content must be set if this + // document is under a + // `CONTENT_REQUIRED` data store. + Content content = 10; + // The identifier of the parent document. Currently supports at most two level // document hierarchy. // // Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) // standard with a length limit of 63 characters. string parent_document_id = 7; + + // Output only. This field is OUTPUT_ONLY. + // It contains derived data that are not in the original input document. + google.protobuf.Struct derived_struct_data = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/document_service.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/document_service.proto index a7bc39309d1..e76d7ce56ca 100644 --- a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/document_service.proto +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/document_service.proto @@ -22,6 +22,7 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/discoveryengine/v1beta/document.proto"; import "google/cloud/discoveryengine/v1beta/import_config.proto"; +import "google/cloud/discoveryengine/v1beta/purge_config.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; @@ -122,6 +123,39 @@ service DocumentService { metadata_type: "google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata" }; } + + // Permanently deletes all selected + // [Document][google.cloud.discoveryengine.v1beta.Document]s in a branch. + // + // This process is asynchronous. Depending on the number of + // [Document][google.cloud.discoveryengine.v1beta.Document]s to be deleted, + // this operation can take hours to complete. Before the delete operation + // completes, some [Document][google.cloud.discoveryengine.v1beta.Document]s + // might still be returned by + // [DocumentService.GetDocument][google.cloud.discoveryengine.v1beta.DocumentService.GetDocument] + // or + // [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments]. + // + // To get a list of the + // [Document][google.cloud.discoveryengine.v1beta.Document]s to be deleted, + // set + // [PurgeDocumentsRequest.force][google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest.force] + // to false. + rpc PurgeDocuments(PurgeDocumentsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:purge" + body: "*" + additional_bindings { + post: "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:purge" + body: "*" + } + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse" + metadata_type: "google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata" + }; + } } // Request message for @@ -134,10 +168,10 @@ message GetDocumentRequest { // // If the caller does not have permission to access the // [Document][google.cloud.discoveryengine.v1beta.Document], regardless of - // whether or not it exists, a PERMISSION_DENIED error is returned. + // whether or not it exists, a `PERMISSION_DENIED` error is returned. // // If the requested [Document][google.cloud.discoveryengine.v1beta.Document] - // does not exist, a NOT_FOUND error is returned. + // does not exist, a `NOT_FOUND` error is returned. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -157,7 +191,7 @@ message ListDocumentsRequest { // // If the caller does not have permission to list [Documents][]s under this // branch, regardless of whether or not this branch exists, a - // PERMISSION_DENIED error is returned. + // `PERMISSION_DENIED` error is returned. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -169,7 +203,7 @@ message ListDocumentsRequest { // to return. If unspecified, defaults to 100. The maximum allowed value is // 1000. Values above 1000 will be coerced to 1000. // - // If this field is negative, an INVALID_ARGUMENT error is returned. + // If this field is negative, an `INVALID_ARGUMENT` error is returned. int32 page_size = 2; // A page token @@ -181,7 +215,7 @@ message ListDocumentsRequest { // When paginating, all other parameters provided to // [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments] // must match the call that provided the page token. Otherwise, an - // INVALID_ARGUMENT error is returned. + // `INVALID_ARGUMENT` error is returned. string page_token = 3; } @@ -223,16 +257,16 @@ message CreateDocumentRequest { // // If the caller does not have permission to create the // [Document][google.cloud.discoveryengine.v1beta.Document], regardless of - // whether or not it exists, a PERMISSION_DENIED error is returned. + // whether or not it exists, a `PERMISSION_DENIED` error is returned. // // This field must be unique among all // [Document][google.cloud.discoveryengine.v1beta.Document]s with the same // [parent][google.cloud.discoveryengine.v1beta.CreateDocumentRequest.parent]. - // Otherwise, an ALREADY_EXISTS error is returned. + // Otherwise, an `ALREADY_EXISTS` error is returned. // // This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) // standard with a length limit of 63 characters. Otherwise, an - // INVALID_ARGUMENT error is returned. + // `INVALID_ARGUMENT` error is returned. string document_id = 3 [(google.api.field_behavior) = REQUIRED]; } @@ -244,12 +278,12 @@ message UpdateDocumentRequest { // // If the caller does not have permission to update the // [Document][google.cloud.discoveryengine.v1beta.Document], regardless of - // whether or not it exists, a PERMISSION_DENIED error is returned. + // whether or not it exists, a `PERMISSION_DENIED` error is returned. // // If the [Document][google.cloud.discoveryengine.v1beta.Document] to update // does not exist and // [allow_missing][google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.allow_missing] - // is not set, a NOT_FOUND error is returned. + // is not set, a `NOT_FOUND` error is returned. Document document = 1 [(google.api.field_behavior) = REQUIRED]; // If set to true, and the @@ -269,10 +303,10 @@ message DeleteDocumentRequest { // // If the caller does not have permission to delete the // [Document][google.cloud.discoveryengine.v1beta.Document], regardless of - // whether or not it exists, a PERMISSION_DENIED error is returned. + // whether or not it exists, a `PERMISSION_DENIED` error is returned. // // If the [Document][google.cloud.discoveryengine.v1beta.Document] to delete - // does not exist, a NOT_FOUND error is returned. + // does not exist, a `NOT_FOUND` error is returned. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/import_config.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/import_config.proto index e522420f87b..faf02e1d025 100644 --- a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/import_config.proto +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/import_config.proto @@ -38,8 +38,11 @@ message GcsSource { // Required. Cloud Storage URIs to input files. URI can be up to // 2000 characters long. URIs can match the full object path (for example, // `gs://bucket/directory/object.json`) or a pattern matching one or more - // files, such as `gs://bucket/directory/*.json`. A request can - // contain at most 100 files, and each file can be up to 2 GB. + // files, such as `gs://bucket/directory/*.json`. + // + // A request can contain at most 100 files (or 100,000 files if `data_schema` + // is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is + // `content`). repeated string input_uris = 1 [(google.api.field_behavior) = REQUIRED]; // The schema to use when parsing the data from the source. @@ -51,6 +54,12 @@ message GcsSource { // document must // have a valid // [Document.id][google.cloud.discoveryengine.v1beta.Document.id]. + // * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by + // `input_uris` will become a document, with the ID set to the first 128 + // bits of SHA256(URI) encoded as a hex string. + // * `custom`: One custom data JSON per row in arbitrary format that conforms + // the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of the + // data store. This can only be used by the GENERIC Data Store vertical. // // Supported values for user even imports: // @@ -88,14 +97,23 @@ message BigQuerySource { // The schema to use when parsing the data from the source. // - // Supported values for imports: + // Supported values for user event imports: // - // * `user_event` (default): One JSON - // [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] per line. + // * `user_event` (default): One + // [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] per row. // - // * `document` (default): One JSON - // [Document][google.cloud.discoveryengine.v1beta.Document] per line. Each - // document must have a valid [document.id][]. + // Supported values for document imports: + // + // * `document` (default): One + // [Document][google.cloud.discoveryengine.v1beta.Document] format per + // row. Each document must have a valid + // [Document.id][google.cloud.discoveryengine.v1beta.Document.id] and one of + // [Document.json_data][google.cloud.discoveryengine.v1beta.Document.json_data] + // or + // [Document.struct_data][google.cloud.discoveryengine.v1beta.Document.struct_data]. + // * `custom`: One custom data per row in arbitrary format that conforms the + // defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of the data + // store. This can only be used by the GENERIC Data Store vertical. string data_schema = 6; } diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/purge_config.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/purge_config.proto new file mode 100644 index 00000000000..559bc4a021c --- /dev/null +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/purge_config.proto @@ -0,0 +1,86 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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.discoveryengine.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "PurgeConfigProto"; +option java_package = "com.google.cloud.discoveryengine.v1beta"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; + +// Request message for +// [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1beta.DocumentService.PurgeDocuments] +// method. +message PurgeDocumentsRequest { + // Required. The parent resource name, such as + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Branch" + } + ]; + + // Required. Filter matching documents to purge. Only currently supported + // value is + // `*` (all items). + string filter = 2 [(google.api.field_behavior) = REQUIRED]; + + // Actually performs the purge. If `force` is set to false, return the + // expected purge count without deleting any documents. + bool force = 3; +} + +// Response message for +// [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1beta.DocumentService.PurgeDocuments] +// method. If the long running operation is successfully done, then this message +// is returned by the google.longrunning.Operations.response field. +message PurgeDocumentsResponse { + // The total count of documents purged as a result of the operation. + int64 purge_count = 1; + + // A sample of document names that will be deleted. Only populated if `force` + // is set to false. A max of 100 names will be returned and the names are + // chosen at random. + repeated string purge_sample = 2 [(google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Document" + }]; +} + +// Metadata related to the progress of the PurgeDocuments operation. +// This will be returned by the google.longrunning.Operation.metadata field. +message PurgeDocumentsMetadata { + // Operation create time. + google.protobuf.Timestamp create_time = 1; + + // Operation last update time. If the operation is done, this is also the + // finish time. + google.protobuf.Timestamp update_time = 2; + + // Count of entries that were deleted successfully. + int64 success_count = 3; + + // Count of entries that encountered errors while processing. + int64 failure_count = 4; +} diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/recommendation_service.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/recommendation_service.proto index 052d108a9a9..85eb652f205 100644 --- a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/recommendation_service.proto +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/recommendation_service.proto @@ -55,7 +55,7 @@ service RecommendationService { // Request message for Recommend method. message RecommendRequest { // Required. Full resource name of the format: - // projects/*/locations/global/collections/*/dataStores/*/servingConfigs/* + // `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` // // Before you can request recommendations from your model, you must create at // least one serving config for it. @@ -97,8 +97,8 @@ message RecommendRequest { // // Examples: // - // * (filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold")) - // * (filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green")) + // * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))` + // * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))` // // If your filter blocks all results, the API will return generic // (unfiltered) popular Documents. If you only want results strictly matching @@ -106,8 +106,9 @@ message RecommendRequest { // [RecommendRequest.params][google.cloud.discoveryengine.v1beta.RecommendRequest.params] // to receive empty results instead. // - // Note that the API will never return Documents with storageStatus of - // "EXPIRED" or "DELETED" regardless of filter choices. + // Note that the API will never return + // [Document][google.cloud.discoveryengine.v1beta.Document]s with + // `storageStatus` of `EXPIRED` or `DELETED` regardless of filter choices. string filter = 4; // Use validate only mode for this recommendation query. If set to true, a @@ -122,22 +123,22 @@ message RecommendRequest { // // * `returnDocument`: Boolean. If set to true, the associated Document // object will be returned in - // [RecommendResponse.results.document][RecommendationResult.document]. + // [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.document]. // * `returnScore`: Boolean. If set to true, the recommendation 'score' // corresponding to each returned Document will be set in - // [RecommendResponse.results.metadata][RecommendationResult.metadata]. The - // given 'score' indicates the probability of a Document conversion given - // the user's context and history. + // [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.metadata]. + // The given 'score' indicates the probability of a Document conversion + // given the user's context and history. // * `strictFiltering`: Boolean. True by default. If set to false, the service // will return generic (unfiltered) popular Documents instead of empty if // your filter blocks all recommendation results. // * `diversityLevel`: String. Default empty. If set to be non-empty, then // it needs to be one of: - // * 'no-diversity' - // * 'low-diversity' - // * 'medium-diversity' - // * 'high-diversity' - // * 'auto-diversity' + // * `no-diversity` + // * `low-diversity` + // * `medium-diversity` + // * `high-diversity` + // * `auto-diversity` // This gives request-level control and adjusts recommendation results // based on Document category. map params = 6; diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/schema.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/schema.proto new file mode 100644 index 00000000000..ffc58799108 --- /dev/null +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/schema.proto @@ -0,0 +1,58 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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.discoveryengine.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/struct.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "SchemaProto"; +option java_package = "com.google.cloud.discoveryengine.v1beta"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; + +// Defines the structure and layout of a type of document data. +message Schema { + option (google.api.resource) = { + type: "discoveryengine.googleapis.com/Schema" + pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}" + pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}" + }; + + // Schema representation. One of + // [struct_schema][google.cloud.discoveryengine.v1beta.Schema.struct_schema] + // or [json_schema][google.cloud.discoveryengine.v1beta.Schema.json_schema] + // should be provided otherwise an INVALID_ARGUMENT error is thrown. + oneof schema { + // The structured representation of the schema. + google.protobuf.Struct struct_schema = 2; + + // The JSON representation of the schema. + string json_schema = 3; + } + + // Immutable. The full resource name of the schema, in the format of + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + // + // This field must be a UTF-8 encoded string with a length limit of 1024 + // characters. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; +} diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/schema_service.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/schema_service.proto new file mode 100644 index 00000000000..bad4b913927 --- /dev/null +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/schema_service.proto @@ -0,0 +1,259 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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.discoveryengine.v1beta; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/discoveryengine/v1beta/schema.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "SchemaServiceProto"; +option java_package = "com.google.cloud.discoveryengine.v1beta"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; + +// Service for managing [Schema][google.cloud.discoveryengine.v1beta.Schema]s. +service SchemaService { + option (google.api.default_host) = "discoveryengine.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Gets a [Schema][google.cloud.discoveryengine.v1beta.Schema]. + rpc GetSchema(GetSchemaRequest) returns (Schema) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/dataStores/*/schemas/*}" + additional_bindings { + get: "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Gets a list of [Schema][google.cloud.discoveryengine.v1beta.Schema]s. + rpc ListSchemas(ListSchemasRequest) returns (ListSchemasResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*/dataStores/*}/schemas" + additional_bindings { + get: "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/schemas" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a [Schema][google.cloud.discoveryengine.v1beta.Schema]. + rpc CreateSchema(CreateSchemaRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*/dataStores/*}/schemas" + body: "schema" + additional_bindings { + post: "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/schemas" + body: "schema" + } + }; + option (google.api.method_signature) = "parent,schema,schema_id"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.discoveryengine.v1beta.Schema" + metadata_type: "google.cloud.discoveryengine.v1beta.CreateSchemaMetadata" + }; + } + + // Updates a [Schema][google.cloud.discoveryengine.v1beta.Schema]. + rpc UpdateSchema(UpdateSchemaRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta/{schema.name=projects/*/locations/*/dataStores/*/schemas/*}" + body: "schema" + additional_bindings { + patch: "/v1beta/{schema.name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}" + body: "schema" + } + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.discoveryengine.v1beta.Schema" + metadata_type: "google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata" + }; + } + + // Deletes a [Schema][google.cloud.discoveryengine.v1beta.Schema]. + rpc DeleteSchema(DeleteSchemaRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta/{name=projects/*/locations/*/dataStores/*/schemas/*}" + additional_bindings { + delete: "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}" + } + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata" + }; + } +} + +// Request message for +// [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema] +// method. +message GetSchemaRequest { + // Required. The full resource name of the schema, in the format of + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Schema" + } + ]; +} + +// Request message for +// [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas] +// method. +message ListSchemasRequest { + // Required. The parent data store resource name, in the format of + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/DataStore" + } + ]; + + // The maximum number of [Schema][google.cloud.discoveryengine.v1beta.Schema]s + // to return. The service may return fewer than this value. + // + // If unspecified, at most 100 + // [Schema][google.cloud.discoveryengine.v1beta.Schema]s will be returned. + // + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2; + + // A page token, received from a previous + // [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas] + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas] + // must match the call that provided the page token. + string page_token = 3; +} + +// Response message for +// [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas] +// method. +message ListSchemasResponse { + // The [Schema][google.cloud.discoveryengine.v1beta.Schema]s. + repeated Schema schemas = 1; + + // A token that can be sent as + // [ListSchemasRequest.page_token][google.cloud.discoveryengine.v1beta.ListSchemasRequest.page_token] + // to retrieve the next page. If this field is omitted, there are no + // subsequent pages. + string next_page_token = 2; +} + +// Request message for +// [SchemaService.CreateSchema][google.cloud.discoveryengine.v1beta.SchemaService.CreateSchema] +// method. +message CreateSchemaRequest { + // Required. The parent data store resource name, in the format of + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/DataStore" + } + ]; + + // Required. The [Schema][google.cloud.discoveryengine.v1beta.Schema] to + // create. + Schema schema = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the + // [Schema][google.cloud.discoveryengine.v1beta.Schema], which will become the + // final component of the + // [Schema.name][google.cloud.discoveryengine.v1beta.Schema.name]. + // + // This field should conform to + // [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length + // limit of 63 characters. + string schema_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [SchemaService.UpdateSchema][google.cloud.discoveryengine.v1beta.SchemaService.UpdateSchema] +// method. +message UpdateSchemaRequest { + // Required. The [Schema][google.cloud.discoveryengine.v1beta.Schema] to + // update. + Schema schema = 1 [(google.api.field_behavior) = REQUIRED]; + + // If set to true, and the + // [Schema][google.cloud.discoveryengine.v1beta.Schema] is not found, a new + // [Schema][google.cloud.discoveryengine.v1beta.Schema] will be created. In + // this situation, `update_mask` is ignored. + bool allow_missing = 3; +} + +// Request message for +// [SchemaService.DeleteSchema][google.cloud.discoveryengine.v1beta.SchemaService.DeleteSchema] +// method. +message DeleteSchemaRequest { + // Required. The full resource name of the schema, in the format of + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Schema" + } + ]; +} + +// Metadata for Create Schema LRO. +message CreateSchemaMetadata { + // Operation create time. + google.protobuf.Timestamp create_time = 1; + + // Operation last update time. If the operation is done, this is also the + // finish time. + google.protobuf.Timestamp update_time = 2; +} + +// Metadata for UpdateSchema LRO. +message UpdateSchemaMetadata { + // Operation create time. + google.protobuf.Timestamp create_time = 1; + + // Operation last update time. If the operation is done, this is also the + // finish time. + google.protobuf.Timestamp update_time = 2; +} + +// Metadata for DeleteSchema LRO. +message DeleteSchemaMetadata { + // Operation create time. + google.protobuf.Timestamp create_time = 1; + + // Operation last update time. If the operation is done, this is also the + // finish time. + google.protobuf.Timestamp update_time = 2; +} diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/search_service.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/search_service.proto new file mode 100644 index 00000000000..a6297393554 --- /dev/null +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/search_service.proto @@ -0,0 +1,546 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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.discoveryengine.v1beta; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/discoveryengine/v1beta/common.proto"; +import "google/cloud/discoveryengine/v1beta/document.proto"; +import "google/protobuf/struct.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "SearchServiceProto"; +option java_package = "com.google.cloud.discoveryengine.v1beta"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; + +// Service for search. +service SearchService { + option (google.api.default_host) = "discoveryengine.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Performs a search. + rpc Search(SearchRequest) returns (SearchResponse) { + option (google.api.http) = { + post: "/v1beta/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:search" + body: "*" + additional_bindings { + post: "/v1beta/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:search" + body: "*" + } + }; + } +} + +// Request message for +// [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] +// method. +message SearchRequest { + // A facet specification to perform faceted search. + message FacetSpec { + // Specifies how a facet is computed. + message FacetKey { + // Required. Supported textual and numerical facet keys in + // [Document][google.cloud.discoveryengine.v1beta.Document] object, over + // which the facet values are computed. Facet key is case-sensitive. + string key = 1 [(google.api.field_behavior) = REQUIRED]; + + // Set only if values should be bucketized into intervals. Must be set + // for facets with numerical values. Must not be set for facet with text + // values. Maximum number of intervals is 30. + repeated Interval intervals = 2; + + // Only get facet for the given restricted values. Only supported on + // textual fields. For example, suppose "category" has three values + // "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set + // "restricted_values" to "Action > 2022", the "category" facet will only + // contain "Action > 2022". Only supported on textual fields. Maximum + // is 10. + repeated string restricted_values = 3; + + // Only get facet values that start with the given string prefix. For + // example, suppose "category" has three values "Action > 2022", + // "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the + // "category" facet will only contain "Action > 2022" and "Action > 2021". + // Only supported on textual fields. Maximum is 10. + repeated string prefixes = 4; + + // Only get facet values that contains the given strings. For example, + // suppose "category" has three values "Action > 2022", + // "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the + // "category" facet will only contain "Action > 2022" and "Sci-Fi > 2022". + // Only supported on textual fields. Maximum is 10. + repeated string contains = 5; + + // True to make facet keys case insensitive when getting faceting + // values with prefixes or contains; false otherwise. + bool case_insensitive = 6; + + // The order in which documents are returned. + // + // Allowed values are: + // + // * "count desc", which means order by + // [SearchResponse.Facet.values.count][google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.count] + // descending. + // + // * "value desc", which means order by + // [SearchResponse.Facet.values.value][google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.value] + // descending. + // Only applies to textual facets. + // + // If not set, textual values are sorted in [natural + // order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical + // intervals are sorted in the order given by + // [FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.intervals]. + string order_by = 7; + } + + // Required. The facet key specification. + FacetKey facet_key = 1 [(google.api.field_behavior) = REQUIRED]; + + // Maximum of facet values that should be returned for this facet. If + // unspecified, defaults to 20. The maximum allowed value is 300. Values + // above 300 will be coerced to 300. + // + // If this field is negative, an `INVALID_ARGUMENT` is returned. + int32 limit = 2; + + // List of keys to exclude when faceting. + // + // + // By default, + // [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key] + // is not excluded from the filter unless it is listed in this field. + // + // Listing a facet key in this field allows its values to appear as facet + // results, even when they are filtered out of search results. Using this + // field does not affect what search results are returned. + // + // For example, suppose there are 100 documents with the color facet "Red" + // and 200 documents with the color facet "Blue". A query containing the + // filter "color:ANY("Red")" and having "color" as + // [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key] + // would by default return only "Red" documents in the search results, and + // also return "Red" with count 100 as the only color facet. Although there + // are also blue documents available, "Blue" would not be shown as an + // available facet value. + // + // If "color" is listed in "excludedFilterKeys", then the query returns the + // facet values "Red" with count 100 and "Blue" with count 200, because the + // "color" key is now excluded from the filter. Because this field doesn't + // affect search results, the search results are still correctly filtered to + // return only "Red" documents. + // + // A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` + // error is returned. + repeated string excluded_filter_keys = 3; + + // Enables dynamic position for this facet. If set to true, the position of + // this facet among all facets in the response is determined automatically. + // It will be ordered together with dynamic facets if dynamic + // facets is enabled. If set to false, the position of this facet in the + // response will be the same as in the request, and it will be ranked before + // the facets with dynamic position enable and all dynamic facets. + // + // For example, you may always want to have rating facet returned in + // the response, but it's not necessarily to always display the rating facet + // at the top. In that case, you can set enable_dynamic_position to true so + // that the position of rating facet in response will be determined + // automatically. + // + // Another example, assuming you have the following facets in the request: + // + // * "rating", enable_dynamic_position = true + // + // * "price", enable_dynamic_position = false + // + // * "brands", enable_dynamic_position = false + // + // And also you have a dynamic facets enable, which will generate a facet + // 'gender'. Then the final order of the facets in the response can be + // ("price", "brands", "rating", "gender") or ("price", "brands", "gender", + // "rating") depends on how API orders "gender" and "rating" facets. + // However, notice that "price" and "brands" will always be + // ranked at 1st and 2nd position since their enable_dynamic_position are + // false. + bool enable_dynamic_position = 4; + } + + // Boost specification to boost certain documents. + message BoostSpec { + // Boost applies to documents which match a condition. + message ConditionBoostSpec { + // An expression which specifies a boost condition. The syntax and + // supported fields are the same as a filter expression. See + // [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter] + // for detail syntax and limitations. + // + // Examples: + // + // * To boost documents with document ID "doc_1" or "doc_2", and + // color + // "Red" or "Blue": + // * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue")) + string condition = 1; + + // Strength of the condition boost, which should be in [-1, 1]. Negative + // boost means demotion. Default is 0.0. + // + // Setting to 1.0 gives the document a big promotion. However, it does not + // necessarily mean that the boosted document will be the top result at + // all times, nor that other documents will be excluded. Results could + // still be shown even when none of them matches the condition. And + // results that are significantly more relevant to the search query can + // still trump your heavily favored but irrelevant documents. + // + // Setting to -1.0 gives the document a big demotion. However, results + // that are deeply relevant might still be shown. The document will have + // an upstream battle to get a fairly high ranking, but it is not blocked + // out completely. + // + // Setting to 0.0 means no boost applied. The boosting condition is + // ignored. + float boost = 2; + } + + // Condition boost specifications. If a document matches multiple conditions + // in the specifictions, boost scores from these specifications are all + // applied and combined in a non-linear way. Maximum number of + // specifications is 20. + repeated ConditionBoostSpec condition_boost_specs = 1; + } + + // Specification to determine under which conditions query expansion should + // occur. + message QueryExpansionSpec { + // Enum describing under which condition query expansion should occur. + enum Condition { + // Unspecified query expansion condition. In this case, server behavior + // defaults to + // [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. + CONDITION_UNSPECIFIED = 0; + + // Disabled query expansion. Only the exact search query is used, even if + // [SearchResponse.total_size][google.cloud.discoveryengine.v1beta.SearchResponse.total_size] + // is zero. + DISABLED = 1; + + // Automatic query expansion built by the Search API. + AUTO = 2; + } + + // The condition under which query expansion should occur. Default to + // [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition.DISABLED]. + Condition condition = 1; + } + + // The specification for query spell correction. + message SpellCorrectionSpec { + // Enum describing under which mode spell correction should occur. + enum Mode { + // Unspecified spell correction mode. In this case, server behavior + // defaults to + // [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. + MODE_UNSPECIFIED = 0; + + // Search API will try to find a spell suggestion if there + // is any and put in the + // [SearchResponse.corrected_query][google.cloud.discoveryengine.v1beta.SearchResponse.corrected_query]. + // The spell suggestion will not be used as the search query. + SUGGESTION_ONLY = 1; + + // Automatic spell correction built by the Search API. Search will + // be based on the corrected query if found. + AUTO = 2; + } + + // The mode under which spell correction should take effect to + // replace the original search query. Default to + // [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode.AUTO]. + Mode mode = 1; + } + + // The specification that configs the desired behavior of the UCS content + // search. + message ContentSearchSpec { + // The specification that configs the snippet in the search results. + message SnippetSpec { + // Max number of snippets returned in each search result. + // If the matching snippets is less than the max_snippet_count, return all + // of the snippets; otherwise, return the max_snippet_count. + // + // At most 5 snippets will be returned for each SearchResult. + int32 max_snippet_count = 1; + + // if true, only snippet reference is returned. + bool reference_only = 2; + } + + // The specification that configs the summary in the search response. + message SummarySpec { + // The number of top results the summary should be generated from. + // If the number of returned results is less than summary_result_count, + // then the summary would be derived from all the results; otherwise, the + // summary would be derived from the top results. + // + // At most 5 results can be used for generating summary. + int32 summary_result_count = 1; + } + + // If there is no snippet spec provided, there will be no snippet in the + // search result. + SnippetSpec snippet_spec = 1; + + // If there is no summary spec provided, there will be no summary in the + // search response. + SummarySpec summary_spec = 2; + } + + // Required. The resource name of the Search serving config, such as + // `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. + // This field is used to identify the serving configuration name, set + // of models used to make the search. + string serving_config = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/ServingConfig" + } + ]; + + // The branch resource name, such as + // `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`. + // + // Use `default_branch` as the branch ID or leave this field empty, to search + // documents under the default branch. + string branch = 2 [(google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Branch" + }]; + + // Raw search query. + string query = 3; + + // Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s + // to return. If unspecified, defaults to a reasonable value. The maximum + // allowed value is 100. Values above 100 will be coerced to 100. + // + // If this field is negative, an `INVALID_ARGUMENT` is returned. + int32 page_size = 4; + + // A page token received from a previous + // [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] + // must match the call that provided the page token. Otherwise, an + // `INVALID_ARGUMENT` error is returned. + string page_token = 5; + + // A 0-indexed integer that specifies the current offset (that is, starting + // result location, amongst the + // [Document][google.cloud.discoveryengine.v1beta.Document]s deemed by the API + // as relevant) in search results. This field is only considered if + // [page_token][google.cloud.discoveryengine.v1beta.SearchRequest.page_token] + // is unset. + // + // If this field is negative, an `INVALID_ARGUMENT` is returned. + int32 offset = 6; + + // The filter syntax consists of an expression language for constructing a + // predicate from one or more fields of the documents being filtered. Filter + // expression is case-sensitive. + // + // If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + string filter = 7; + + // The order in which documents are returned. Document can be ordered by + // a field in an [Document][google.cloud.discoveryengine.v1beta.Document] + // object. Leave it unset if ordered by relevance. OrderBy expression is + // case-sensitive. + // + // If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + string order_by = 8; + + // Facet specifications for faceted search. If empty, no facets are returned. + // + // A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` + // error is returned. + repeated FacetSpec facet_specs = 9; + + // Boost specification to boost certain documents. + BoostSpec boost_spec = 10; + + // Additional search parameters. + // + // For + // [IndustryVertical.SITE_SEARCH][google.cloud.discoveryengine.v1beta.IndustryVertical.SITE_SEARCH] + // vertical, supported values are: + // + // * `user_country_code`: string. Default empty. If set to non-empty, results + // are restricted or boosted based on the location provided. + // * `search_type`: double. Default empty. Enables non-webpage searching + // depending on the value. The only valid non-default value is 1, + // which enables image searching. + // This field is ignored for other verticals. + map params = 11; + + // The query expansion specification that specifies the conditions under which + // query expansion will occur. + QueryExpansionSpec query_expansion_spec = 13; + + // The spell correction specification that specifies the mode under + // which spell correction will take effect. + SpellCorrectionSpec spell_correction_spec = 14; + + // A unique identifier for tracking visitors. For example, this could be + // implemented with an HTTP cookie, which should be able to uniquely identify + // a visitor on a single device. This unique identifier should not change if + // the visitor logs in or out of the website. + // + // This field should NOT have a fixed value such as `unknown_visitor`. + // + // This should be the same identifier as + // [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] + // and + // [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id] + // + // The field must be a UTF-8 encoded string with a length limit of 128 + // characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + string user_pseudo_id = 15; + + // The content search spec that configs the desired behavior of content + // search. + ContentSearchSpec content_search_spec = 24; +} + +// Response message for +// [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] +// method. +message SearchResponse { + // Represents the search results. + message SearchResult { + // [Document.id][google.cloud.discoveryengine.v1beta.Document.id] of the + // searched [Document][google.cloud.discoveryengine.v1beta.Document]. + string id = 1; + + // The document data snippet in the search response. Only fields that are + // marked as retrievable are populated. + Document document = 2; + } + + // A facet result. + message Facet { + // A facet value which contains value names and their count. + message FacetValue { + // A facet value which contains values. + oneof facet_value { + // Text value of a facet, such as "Black" for facet "colors". + string value = 1; + + // Interval value for a facet, such as [10, 20) for facet "price". It + // matches + // [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.intervals]. + Interval interval = 2; + } + + // Number of items that have this facet value. + int64 count = 3; + } + + // The key for this facet. E.g., "colors" or "price". It matches + // [SearchRequest.FacetSpec.FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key]. + string key = 1; + + // The facet values for this field. + repeated FacetValue values = 2; + + // Whether the facet is dynamically generated. + bool dynamic_facet = 3; + } + + // Guided search result. The guided search helps user to refine the search + // results and narrow down to the real needs from a broaded search results. + message GuidedSearchResult { + // Useful attribute for search result refinements. + message RefinementAttribute { + // Attribute key used to refine the results e.g. 'movie_type'. + string attribute_key = 1; + + // Attribute value used to refine the results e.g. 'drama'. + string attribute_value = 2; + } + + // A list of ranked refinement attributes. + repeated RefinementAttribute refinement_attributes = 1; + } + + // Summary of the top N search result specified by the summary spec. + message Summary { + // The summary content. + string summary_text = 1; + } + + // A list of matched documents. The order represents the ranking. + repeated SearchResult results = 1; + + // Results of facets requested by user. + repeated Facet facets = 2; + + // Guided search result. + GuidedSearchResult guided_search_result = 8; + + // The estimated total count of matched items irrespective of pagination. The + // count of + // [results][google.cloud.discoveryengine.v1beta.SearchResponse.results] + // returned by pagination may be less than the + // [total_size][google.cloud.discoveryengine.v1beta.SearchResponse.total_size] + // that matches. + int32 total_size = 3; + + // A unique search token. This should be included in the + // [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] logs resulting + // from this search, which enables accurate attribution of search model + // performance. + string attribution_token = 4; + + // A token that can be sent as + // [SearchRequest.page_token][google.cloud.discoveryengine.v1beta.SearchRequest.page_token] + // to retrieve the next page. If this field is omitted, there are no + // subsequent pages. + string next_page_token = 5; + + // Contains the spell corrected query, if found. If the spell correction type + // is AUTOMATIC, then the search results are based on corrected_query. + // Otherwise the original query is used for search. + string corrected_query = 7; + + // A summary as part of the search results. + // This field is only returned if + // [SearchRequest.ContentSearchSpec.summary_spec][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.summary_spec] + // is set. + Summary summary = 9; + + // Controls applied as part of the Control service. + repeated string applied_controls = 10; +} diff --git a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/user_event.proto b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/user_event.proto index 716c34849ec..4efcf7ca90e 100644 --- a/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/user_event.proto +++ b/packages/google-cloud-discoveryengine/protos/google/cloud/discoveryengine/v1beta/user_event.proto @@ -114,17 +114,19 @@ message UserEvent { // Token to attribute an API response to user action(s) to trigger the event. // // Highly recommended for user events that are the result of - // [PredictionService.Predict][]. This field enables accurate attribution of - // recommendation model performance. + // [RecommendationService.Recommend][google.cloud.discoveryengine.v1beta.RecommendationService.Recommend]. + // This field enables accurate attribution of recommendation model + // performance. // // The value must be one of: // // * [PredictResponse.attribution_token][] for events that are the result of - // [PredictionService.Predict][]. + // [RecommendationService.Recommend][google.cloud.discoveryengine.v1beta.RecommendationService.Recommend]. // * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1beta.SearchResponse.attribution_token] for events that are the result of - // [SearchService.Search][]. + // [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]. // * [CompleteQueryResponse.attribution_token][] for events that are the - // result of [SearchService.CompleteQuery][]. + // result of + // [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery]. // // This token enables us to accurately attribute page view or conversion // completion back to the event and the particular predict response containing @@ -138,14 +140,15 @@ message UserEvent { // predicate from one or more fields of the documents being filtered. // // One example is for `search` events, the associated - // [SearchService.SearchRequest][] may contain a filter expression in - // [SearchService.SearchRequest.filter][] conforming to - // https://google.aip.dev/160#filtering. + // [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] may + // contain a filter expression in + // [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter] + // conforming to https://google.aip.dev/160#filtering. // // Similarly, for `view-item-list` events that are generated from a - // [PredictionService.PredictRequest][], this field may be populated directly - // from [PredictionService.PredictRequest.filter][] conforming to - // https://google.aip.dev/160#filtering. + // [RecommendationService.RecommendRequest][], this field may be populated + // directly from [RecommendationService.RecommendRequest.filter][] conforming + // to https://google.aip.dev/160#filtering. // // The value must be a UTF-8 encoded string with a length limit of 1,000 // characters. Otherwise, an INVALID_ARGUMENT error is returned. @@ -207,8 +210,8 @@ message UserEvent { // those custom attributes when training models and serving predictions, which // helps improve recommendation quality. // - // This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT - // error is returned: + // This field needs to pass all below criteria, otherwise an + // `INVALID_ARGUMENT` error is returned: // // * The key must be a UTF-8 encoded string with a length limit of 5,000 // characters. @@ -218,7 +221,8 @@ message UserEvent { // * For number attributes, at most 400 values are allowed. // // For product recommendations, an example of extra user information is - // traffic_channel, which is how a user arrives at the site. Users can arrive + // ` traffic_channel`, which is how a user arrives at the site. Users can + // arrive // at the site by coming to the site directly, coming through Google // search, or in other ways. map attributes = 17; @@ -283,9 +287,10 @@ message SearchInfo { // // At least one of // [search_query][google.cloud.discoveryengine.v1beta.SearchInfo.search_query] - // or [page_categories][] is required for `search` events. Other event types - // should not set this field. Otherwise, an INVALID_ARGUMENT error is - // returned. + // or + // [PageInfo.page_category][google.cloud.discoveryengine.v1beta.PageInfo.page_category] + // is required for `search` events. Other event types should not set this + // field. Otherwise, an INVALID_ARGUMENT error is returned. string search_query = 1; // The order in which products are returned, if applicable. @@ -378,23 +383,24 @@ message TransactionInfo { // Detailed document information associated with a user event. message DocumentInfo { - // A required descriptor of the associated Document. + // A required descriptor of the associated + // [Document][google.cloud.discoveryengine.v1beta.Document]. // // * If [id][google.cloud.discoveryengine.v1beta.DocumentInfo.id] is - // specified, then the default values for {location}, {collection_id}, - // {data_store_id}, and {branch_id} are used when annotating with the stored - // Document. + // specified, then the default values for + // `{location}`, `{collection_id}`, `{data_store_id}`, and `{branch_id}` are + // used when annotating with the stored Document. // // * If [name][google.cloud.discoveryengine.v1beta.DocumentInfo.name] is // specified, then the provided values (default values allowed) for - // {location}, {collection_id}, {data_store_id}, and {branch_id} are used when - // annotating with the stored Document. + // `{location}`, `{collection_id}`, `{data_store_id}`, and + // `{branch_id}` are used when annotating with the stored Document. oneof document_descriptor { // Required. The Document resource ID. string id = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The Document resource full name, of the form: - // projects/{project\_id}/locations/{location}/collections/{collection\_id}/dataStores/{data\_store\_id}/branches/{branch\_id}/documents/{document\_id} + // `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}` string name = 2 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -451,7 +457,7 @@ message MediaInfo { // Media progress should be computed using only the media_progress_duration // relative to the media total length. // - // This value must be between [0, 1.0] inclusive. + // This value must be between `[0, 1.0]` inclusive. // // If this is not a playback or the progress cannot be computed (e.g. ongoing // livestream), this field should be unset. diff --git a/packages/google-cloud-discoveryengine/protos/protos.d.ts b/packages/google-cloud-discoveryengine/protos/protos.d.ts index fdf88529af9..ad0ff94c2a5 100644 --- a/packages/google-cloud-discoveryengine/protos/protos.d.ts +++ b/packages/google-cloud-discoveryengine/protos/protos.d.ts @@ -26,6 +26,127 @@ export namespace google { /** Namespace v1beta. */ namespace v1beta { + /** Properties of an Interval. */ + interface IInterval { + + /** Interval minimum */ + minimum?: (number|null); + + /** Interval exclusiveMinimum */ + exclusiveMinimum?: (number|null); + + /** Interval maximum */ + maximum?: (number|null); + + /** Interval exclusiveMaximum */ + exclusiveMaximum?: (number|null); + } + + /** Represents an Interval. */ + class Interval implements IInterval { + + /** + * Constructs a new Interval. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.IInterval); + + /** Interval minimum. */ + public minimum?: (number|null); + + /** Interval exclusiveMinimum. */ + public exclusiveMinimum?: (number|null); + + /** Interval maximum. */ + public maximum?: (number|null); + + /** Interval exclusiveMaximum. */ + public exclusiveMaximum?: (number|null); + + /** Interval min. */ + public min?: ("minimum"|"exclusiveMinimum"); + + /** Interval max. */ + public max?: ("maximum"|"exclusiveMaximum"); + + /** + * Creates a new Interval instance using the specified properties. + * @param [properties] Properties to set + * @returns Interval instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.IInterval): google.cloud.discoveryengine.v1beta.Interval; + + /** + * Encodes the specified Interval message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.Interval.verify|verify} messages. + * @param message Interval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.IInterval, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Interval message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.Interval.verify|verify} messages. + * @param message Interval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IInterval, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Interval message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Interval + * @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.discoveryengine.v1beta.Interval; + + /** + * Decodes an Interval message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Interval + * @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.discoveryengine.v1beta.Interval; + + /** + * Verifies an Interval 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 Interval message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Interval + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.Interval; + + /** + * Creates a plain object from an Interval message. Also converts values to other types if specified. + * @param message Interval + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.Interval, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Interval to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Interval + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a CustomAttribute. */ interface ICustomAttribute { @@ -232,1979 +353,1909 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Document. */ - interface IDocument { - - /** Document structData */ - structData?: (google.protobuf.IStruct|null); - - /** Document jsonData */ - jsonData?: (string|null); + /** Represents a CompletionService */ + class CompletionService extends $protobuf.rpc.Service { - /** Document name */ - name?: (string|null); + /** + * Constructs a new CompletionService 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); - /** Document id */ - id?: (string|null); + /** + * Creates new CompletionService 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): CompletionService; - /** Document schemaId */ - schemaId?: (string|null); + /** + * Calls CompleteQuery. + * @param request CompleteQueryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CompleteQueryResponse + */ + public completeQuery(request: google.cloud.discoveryengine.v1beta.ICompleteQueryRequest, callback: google.cloud.discoveryengine.v1beta.CompletionService.CompleteQueryCallback): void; - /** Document parentDocumentId */ - parentDocumentId?: (string|null); + /** + * Calls CompleteQuery. + * @param request CompleteQueryRequest message or plain object + * @returns Promise + */ + public completeQuery(request: google.cloud.discoveryengine.v1beta.ICompleteQueryRequest): Promise; } - /** Represents a Document. */ - class Document implements IDocument { + namespace CompletionService { /** - * Constructs a new Document. - * @param [properties] Properties to set + * Callback as used by {@link google.cloud.discoveryengine.v1beta.CompletionService|completeQuery}. + * @param error Error, if any + * @param [response] CompleteQueryResponse */ - constructor(properties?: google.cloud.discoveryengine.v1beta.IDocument); + type CompleteQueryCallback = (error: (Error|null), response?: google.cloud.discoveryengine.v1beta.CompleteQueryResponse) => void; + } - /** Document structData. */ - public structData?: (google.protobuf.IStruct|null); + /** Properties of a CompleteQueryRequest. */ + interface ICompleteQueryRequest { - /** Document jsonData. */ - public jsonData?: (string|null); + /** CompleteQueryRequest dataStore */ + dataStore?: (string|null); - /** Document name. */ - public name: string; + /** CompleteQueryRequest query */ + query?: (string|null); - /** Document id. */ - public id: string; + /** CompleteQueryRequest queryModel */ + queryModel?: (string|null); - /** Document schemaId. */ - public schemaId: string; + /** CompleteQueryRequest userPseudoId */ + userPseudoId?: (string|null); + } - /** Document parentDocumentId. */ - public parentDocumentId: string; + /** Represents a CompleteQueryRequest. */ + class CompleteQueryRequest implements ICompleteQueryRequest { - /** Document data. */ - public data?: ("structData"|"jsonData"); + /** + * Constructs a new CompleteQueryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.ICompleteQueryRequest); + + /** CompleteQueryRequest dataStore. */ + public dataStore: string; + + /** CompleteQueryRequest query. */ + public query: string; + + /** CompleteQueryRequest queryModel. */ + public queryModel: string; + + /** CompleteQueryRequest userPseudoId. */ + public userPseudoId: string; /** - * Creates a new Document instance using the specified properties. + * Creates a new CompleteQueryRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Document instance + * @returns CompleteQueryRequest instance */ - public static create(properties?: google.cloud.discoveryengine.v1beta.IDocument): google.cloud.discoveryengine.v1beta.Document; + public static create(properties?: google.cloud.discoveryengine.v1beta.ICompleteQueryRequest): google.cloud.discoveryengine.v1beta.CompleteQueryRequest; /** - * Encodes the specified Document message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.Document.verify|verify} messages. - * @param message Document message or plain object to encode + * Encodes the specified CompleteQueryRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CompleteQueryRequest.verify|verify} messages. + * @param message CompleteQueryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1beta.IDocument, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1beta.ICompleteQueryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Document message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.Document.verify|verify} messages. - * @param message Document message or plain object to encode + * Encodes the specified CompleteQueryRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CompleteQueryRequest.verify|verify} messages. + * @param message CompleteQueryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IDocument, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.ICompleteQueryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Document message from the specified reader or buffer. + * Decodes a CompleteQueryRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Document + * @returns CompleteQueryRequest * @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.discoveryengine.v1beta.Document; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1beta.CompleteQueryRequest; /** - * Decodes a Document message from the specified reader or buffer, length delimited. + * Decodes a CompleteQueryRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Document + * @returns CompleteQueryRequest * @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.discoveryengine.v1beta.Document; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1beta.CompleteQueryRequest; /** - * Verifies a Document message. + * Verifies a CompleteQueryRequest 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 Document message from a plain object. Also converts values to their respective internal types. + * Creates a CompleteQueryRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Document + * @returns CompleteQueryRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.Document; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.CompleteQueryRequest; /** - * Creates a plain object from a Document message. Also converts values to other types if specified. - * @param message Document + * Creates a plain object from a CompleteQueryRequest message. Also converts values to other types if specified. + * @param message CompleteQueryRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1beta.Document, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1beta.CompleteQueryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Document to JSON. + * Converts this CompleteQueryRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Document + * Gets the default type url for CompleteQueryRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a DocumentService */ - class DocumentService extends $protobuf.rpc.Service { + /** Properties of a CompleteQueryResponse. */ + interface ICompleteQueryResponse { - /** - * Constructs a new DocumentService 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); + /** CompleteQueryResponse querySuggestions */ + querySuggestions?: (google.cloud.discoveryengine.v1beta.CompleteQueryResponse.IQuerySuggestion[]|null); + } - /** - * Creates new DocumentService 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): DocumentService; + /** Represents a CompleteQueryResponse. */ + class CompleteQueryResponse implements ICompleteQueryResponse { /** - * Calls GetDocument. - * @param request GetDocumentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Document + * Constructs a new CompleteQueryResponse. + * @param [properties] Properties to set */ - public getDocument(request: google.cloud.discoveryengine.v1beta.IGetDocumentRequest, callback: google.cloud.discoveryengine.v1beta.DocumentService.GetDocumentCallback): void; + constructor(properties?: google.cloud.discoveryengine.v1beta.ICompleteQueryResponse); - /** - * Calls GetDocument. - * @param request GetDocumentRequest message or plain object - * @returns Promise - */ - public getDocument(request: google.cloud.discoveryengine.v1beta.IGetDocumentRequest): Promise; + /** CompleteQueryResponse querySuggestions. */ + public querySuggestions: google.cloud.discoveryengine.v1beta.CompleteQueryResponse.IQuerySuggestion[]; /** - * Calls ListDocuments. - * @param request ListDocumentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListDocumentsResponse + * Creates a new CompleteQueryResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CompleteQueryResponse instance */ - public listDocuments(request: google.cloud.discoveryengine.v1beta.IListDocumentsRequest, callback: google.cloud.discoveryengine.v1beta.DocumentService.ListDocumentsCallback): void; + public static create(properties?: google.cloud.discoveryengine.v1beta.ICompleteQueryResponse): google.cloud.discoveryengine.v1beta.CompleteQueryResponse; /** - * Calls ListDocuments. - * @param request ListDocumentsRequest message or plain object - * @returns Promise + * Encodes the specified CompleteQueryResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CompleteQueryResponse.verify|verify} messages. + * @param message CompleteQueryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listDocuments(request: google.cloud.discoveryengine.v1beta.IListDocumentsRequest): Promise; + public static encode(message: google.cloud.discoveryengine.v1beta.ICompleteQueryResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreateDocument. - * @param request CreateDocumentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Document + * Encodes the specified CompleteQueryResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CompleteQueryResponse.verify|verify} messages. + * @param message CompleteQueryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public createDocument(request: google.cloud.discoveryengine.v1beta.ICreateDocumentRequest, callback: google.cloud.discoveryengine.v1beta.DocumentService.CreateDocumentCallback): void; + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.ICompleteQueryResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls CreateDocument. - * @param request CreateDocumentRequest message or plain object - * @returns Promise + * Decodes a CompleteQueryResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompleteQueryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public createDocument(request: google.cloud.discoveryengine.v1beta.ICreateDocumentRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1beta.CompleteQueryResponse; /** - * Calls UpdateDocument. - * @param request UpdateDocumentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Document + * Decodes a CompleteQueryResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompleteQueryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public updateDocument(request: google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest, callback: google.cloud.discoveryengine.v1beta.DocumentService.UpdateDocumentCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1beta.CompleteQueryResponse; /** - * Calls UpdateDocument. - * @param request UpdateDocumentRequest message or plain object - * @returns Promise + * Verifies a CompleteQueryResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public updateDocument(request: google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls DeleteDocument. - * @param request DeleteDocumentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * Creates a CompleteQueryResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompleteQueryResponse */ - public deleteDocument(request: google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest, callback: google.cloud.discoveryengine.v1beta.DocumentService.DeleteDocumentCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.CompleteQueryResponse; /** - * Calls DeleteDocument. - * @param request DeleteDocumentRequest message or plain object - * @returns Promise + * Creates a plain object from a CompleteQueryResponse message. Also converts values to other types if specified. + * @param message CompleteQueryResponse + * @param [options] Conversion options + * @returns Plain object */ - public deleteDocument(request: google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest): Promise; + public static toObject(message: google.cloud.discoveryengine.v1beta.CompleteQueryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls ImportDocuments. - * @param request ImportDocumentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Converts this CompleteQueryResponse to JSON. + * @returns JSON object */ - public importDocuments(request: google.cloud.discoveryengine.v1beta.IImportDocumentsRequest, callback: google.cloud.discoveryengine.v1beta.DocumentService.ImportDocumentsCallback): void; + public toJSON(): { [k: string]: any }; /** - * Calls ImportDocuments. - * @param request ImportDocumentsRequest message or plain object - * @returns Promise + * Gets the default type url for CompleteQueryResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public importDocuments(request: google.cloud.discoveryengine.v1beta.IImportDocumentsRequest): Promise; + public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace DocumentService { + namespace CompleteQueryResponse { - /** - * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|getDocument}. - * @param error Error, if any - * @param [response] Document - */ - type GetDocumentCallback = (error: (Error|null), response?: google.cloud.discoveryengine.v1beta.Document) => void; + /** Properties of a QuerySuggestion. */ + interface IQuerySuggestion { - /** - * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|listDocuments}. - * @param error Error, if any - * @param [response] ListDocumentsResponse - */ - type ListDocumentsCallback = (error: (Error|null), response?: google.cloud.discoveryengine.v1beta.ListDocumentsResponse) => void; + /** QuerySuggestion suggestion */ + suggestion?: (string|null); + } - /** - * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|createDocument}. - * @param error Error, if any - * @param [response] Document - */ - type CreateDocumentCallback = (error: (Error|null), response?: google.cloud.discoveryengine.v1beta.Document) => void; + /** Represents a QuerySuggestion. */ + class QuerySuggestion implements IQuerySuggestion { - /** - * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|updateDocument}. - * @param error Error, if any - * @param [response] Document - */ - type UpdateDocumentCallback = (error: (Error|null), response?: google.cloud.discoveryengine.v1beta.Document) => void; + /** + * Constructs a new QuerySuggestion. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.CompleteQueryResponse.IQuerySuggestion); - /** - * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|deleteDocument}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteDocumentCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + /** QuerySuggestion suggestion. */ + public suggestion: string; - /** - * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|importDocuments}. - * @param error Error, if any - * @param [response] Operation - */ - type ImportDocumentsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** + * Creates a new QuerySuggestion instance using the specified properties. + * @param [properties] Properties to set + * @returns QuerySuggestion instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.CompleteQueryResponse.IQuerySuggestion): google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion; + + /** + * Encodes the specified QuerySuggestion message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.verify|verify} messages. + * @param message QuerySuggestion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.CompleteQueryResponse.IQuerySuggestion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuerySuggestion message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.verify|verify} messages. + * @param message QuerySuggestion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.CompleteQueryResponse.IQuerySuggestion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuerySuggestion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuerySuggestion + * @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.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion; + + /** + * Decodes a QuerySuggestion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuerySuggestion + * @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.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion; + + /** + * Verifies a QuerySuggestion 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 QuerySuggestion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuerySuggestion + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion; + + /** + * Creates a plain object from a QuerySuggestion message. Also converts values to other types if specified. + * @param message QuerySuggestion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuerySuggestion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QuerySuggestion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } - /** Properties of a GetDocumentRequest. */ - interface IGetDocumentRequest { + /** Properties of a Document. */ + interface IDocument { - /** GetDocumentRequest name */ + /** Document structData */ + structData?: (google.protobuf.IStruct|null); + + /** Document jsonData */ + jsonData?: (string|null); + + /** Document name */ name?: (string|null); + + /** Document id */ + id?: (string|null); + + /** Document schemaId */ + schemaId?: (string|null); + + /** Document content */ + content?: (google.cloud.discoveryengine.v1beta.Document.IContent|null); + + /** Document parentDocumentId */ + parentDocumentId?: (string|null); + + /** Document derivedStructData */ + derivedStructData?: (google.protobuf.IStruct|null); } - /** Represents a GetDocumentRequest. */ - class GetDocumentRequest implements IGetDocumentRequest { + /** Represents a Document. */ + class Document implements IDocument { /** - * Constructs a new GetDocumentRequest. + * Constructs a new Document. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1beta.IGetDocumentRequest); + constructor(properties?: google.cloud.discoveryengine.v1beta.IDocument); - /** GetDocumentRequest name. */ + /** Document structData. */ + public structData?: (google.protobuf.IStruct|null); + + /** Document jsonData. */ + public jsonData?: (string|null); + + /** Document name. */ public name: string; + /** Document id. */ + public id: string; + + /** Document schemaId. */ + public schemaId: string; + + /** Document content. */ + public content?: (google.cloud.discoveryengine.v1beta.Document.IContent|null); + + /** Document parentDocumentId. */ + public parentDocumentId: string; + + /** Document derivedStructData. */ + public derivedStructData?: (google.protobuf.IStruct|null); + + /** Document data. */ + public data?: ("structData"|"jsonData"); + /** - * Creates a new GetDocumentRequest instance using the specified properties. + * Creates a new Document instance using the specified properties. * @param [properties] Properties to set - * @returns GetDocumentRequest instance + * @returns Document instance */ - public static create(properties?: google.cloud.discoveryengine.v1beta.IGetDocumentRequest): google.cloud.discoveryengine.v1beta.GetDocumentRequest; + public static create(properties?: google.cloud.discoveryengine.v1beta.IDocument): google.cloud.discoveryengine.v1beta.Document; /** - * Encodes the specified GetDocumentRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.GetDocumentRequest.verify|verify} messages. - * @param message GetDocumentRequest message or plain object to encode + * Encodes the specified Document message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.Document.verify|verify} messages. + * @param message Document message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1beta.IGetDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1beta.IDocument, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.GetDocumentRequest.verify|verify} messages. - * @param message GetDocumentRequest message or plain object to encode + * Encodes the specified Document message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.Document.verify|verify} messages. + * @param message Document message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IGetDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IDocument, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetDocumentRequest message from the specified reader or buffer. + * Decodes a Document message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetDocumentRequest + * @returns Document * @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.discoveryengine.v1beta.GetDocumentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1beta.Document; /** - * Decodes a GetDocumentRequest message from the specified reader or buffer, length delimited. + * Decodes a Document message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetDocumentRequest + * @returns Document * @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.discoveryengine.v1beta.GetDocumentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1beta.Document; /** - * Verifies a GetDocumentRequest message. + * Verifies a Document 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 GetDocumentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Document message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetDocumentRequest + * @returns Document */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.GetDocumentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.Document; /** - * Creates a plain object from a GetDocumentRequest message. Also converts values to other types if specified. - * @param message GetDocumentRequest + * Creates a plain object from a Document message. Also converts values to other types if specified. + * @param message Document * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1beta.GetDocumentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1beta.Document, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetDocumentRequest to JSON. + * Converts this Document to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetDocumentRequest + * Gets the default type url for Document * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListDocumentsRequest. */ - interface IListDocumentsRequest { + namespace Document { - /** ListDocumentsRequest parent */ - parent?: (string|null); + /** Properties of a Content. */ + interface IContent { - /** ListDocumentsRequest pageSize */ - pageSize?: (number|null); + /** Content rawBytes */ + rawBytes?: (Uint8Array|string|null); - /** ListDocumentsRequest pageToken */ - pageToken?: (string|null); - } + /** Content uri */ + uri?: (string|null); - /** Represents a ListDocumentsRequest. */ - class ListDocumentsRequest implements IListDocumentsRequest { + /** Content mimeType */ + mimeType?: (string|null); + } - /** - * Constructs a new ListDocumentsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.discoveryengine.v1beta.IListDocumentsRequest); + /** Represents a Content. */ + class Content implements IContent { - /** ListDocumentsRequest parent. */ - public parent: string; + /** + * Constructs a new Content. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.Document.IContent); - /** ListDocumentsRequest pageSize. */ - public pageSize: number; + /** Content rawBytes. */ + public rawBytes?: (Uint8Array|string|null); - /** ListDocumentsRequest pageToken. */ - public pageToken: string; + /** Content uri. */ + public uri?: (string|null); - /** - * Creates a new ListDocumentsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDocumentsRequest instance - */ - public static create(properties?: google.cloud.discoveryengine.v1beta.IListDocumentsRequest): google.cloud.discoveryengine.v1beta.ListDocumentsRequest; + /** Content mimeType. */ + public mimeType: string; - /** - * Encodes the specified ListDocumentsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ListDocumentsRequest.verify|verify} messages. - * @param message ListDocumentsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.discoveryengine.v1beta.IListDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Content content. */ + public content?: ("rawBytes"|"uri"); - /** - * Encodes the specified ListDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ListDocumentsRequest.verify|verify} messages. - * @param message ListDocumentsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IListDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new Content instance using the specified properties. + * @param [properties] Properties to set + * @returns Content instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.Document.IContent): google.cloud.discoveryengine.v1beta.Document.Content; - /** - * Decodes a ListDocumentsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDocumentsRequest - * @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.discoveryengine.v1beta.ListDocumentsRequest; + /** + * Encodes the specified Content message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.Document.Content.verify|verify} messages. + * @param message Content message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.Document.IContent, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a ListDocumentsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDocumentsRequest - * @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.discoveryengine.v1beta.ListDocumentsRequest; + /** + * Encodes the specified Content message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.Document.Content.verify|verify} messages. + * @param message Content message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.Document.IContent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Content message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Content + * @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.discoveryengine.v1beta.Document.Content; + + /** + * Decodes a Content message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Content + * @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.discoveryengine.v1beta.Document.Content; + + /** + * Verifies a Content 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 Content message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Content + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.Document.Content; + + /** + * Creates a plain object from a Content message. Also converts values to other types if specified. + * @param message Content + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.Document.Content, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Content to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Content + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Represents a DocumentService */ + class DocumentService extends $protobuf.rpc.Service { /** - * Verifies a ListDocumentsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Constructs a new DocumentService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - public static verify(message: { [k: string]: any }): (string|null); + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Creates a ListDocumentsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDocumentsRequest + * Creates new DocumentService 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 fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ListDocumentsRequest; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): DocumentService; /** - * Creates a plain object from a ListDocumentsRequest message. Also converts values to other types if specified. - * @param message ListDocumentsRequest - * @param [options] Conversion options - * @returns Plain object + * Calls GetDocument. + * @param request GetDocumentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Document */ - public static toObject(message: google.cloud.discoveryengine.v1beta.ListDocumentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public getDocument(request: google.cloud.discoveryengine.v1beta.IGetDocumentRequest, callback: google.cloud.discoveryengine.v1beta.DocumentService.GetDocumentCallback): void; /** - * Converts this ListDocumentsRequest to JSON. - * @returns JSON object + * Calls GetDocument. + * @param request GetDocumentRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; + public getDocument(request: google.cloud.discoveryengine.v1beta.IGetDocumentRequest): Promise; /** - * Gets the default type url for ListDocumentsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Calls ListDocuments. + * @param request ListDocumentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDocumentsResponse */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListDocumentsResponse. */ - interface IListDocumentsResponse { - - /** ListDocumentsResponse documents */ - documents?: (google.cloud.discoveryengine.v1beta.IDocument[]|null); - - /** ListDocumentsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListDocumentsResponse. */ - class ListDocumentsResponse implements IListDocumentsResponse { + public listDocuments(request: google.cloud.discoveryengine.v1beta.IListDocumentsRequest, callback: google.cloud.discoveryengine.v1beta.DocumentService.ListDocumentsCallback): void; /** - * Constructs a new ListDocumentsResponse. - * @param [properties] Properties to set + * Calls ListDocuments. + * @param request ListDocumentsRequest message or plain object + * @returns Promise */ - constructor(properties?: google.cloud.discoveryengine.v1beta.IListDocumentsResponse); - - /** ListDocumentsResponse documents. */ - public documents: google.cloud.discoveryengine.v1beta.IDocument[]; - - /** ListDocumentsResponse nextPageToken. */ - public nextPageToken: string; + public listDocuments(request: google.cloud.discoveryengine.v1beta.IListDocumentsRequest): Promise; /** - * Creates a new ListDocumentsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDocumentsResponse instance + * Calls CreateDocument. + * @param request CreateDocumentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Document */ - public static create(properties?: google.cloud.discoveryengine.v1beta.IListDocumentsResponse): google.cloud.discoveryengine.v1beta.ListDocumentsResponse; + public createDocument(request: google.cloud.discoveryengine.v1beta.ICreateDocumentRequest, callback: google.cloud.discoveryengine.v1beta.DocumentService.CreateDocumentCallback): void; /** - * Encodes the specified ListDocumentsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ListDocumentsResponse.verify|verify} messages. - * @param message ListDocumentsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls CreateDocument. + * @param request CreateDocumentRequest message or plain object + * @returns Promise */ - public static encode(message: google.cloud.discoveryengine.v1beta.IListDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public createDocument(request: google.cloud.discoveryengine.v1beta.ICreateDocumentRequest): Promise; /** - * Encodes the specified ListDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ListDocumentsResponse.verify|verify} messages. - * @param message ListDocumentsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls UpdateDocument. + * @param request UpdateDocumentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Document */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IListDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public updateDocument(request: google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest, callback: google.cloud.discoveryengine.v1beta.DocumentService.UpdateDocumentCallback): void; /** - * Decodes a ListDocumentsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDocumentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateDocument. + * @param request UpdateDocumentRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1beta.ListDocumentsResponse; + public updateDocument(request: google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest): Promise; /** - * Decodes a ListDocumentsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDocumentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteDocument. + * @param request DeleteDocumentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1beta.ListDocumentsResponse; + public deleteDocument(request: google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest, callback: google.cloud.discoveryengine.v1beta.DocumentService.DeleteDocumentCallback): void; /** - * Verifies a ListDocumentsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls DeleteDocument. + * @param request DeleteDocumentRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public deleteDocument(request: google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest): Promise; /** - * Creates a ListDocumentsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDocumentsResponse + * Calls ImportDocuments. + * @param request ImportDocumentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ListDocumentsResponse; + public importDocuments(request: google.cloud.discoveryengine.v1beta.IImportDocumentsRequest, callback: google.cloud.discoveryengine.v1beta.DocumentService.ImportDocumentsCallback): void; /** - * Creates a plain object from a ListDocumentsResponse message. Also converts values to other types if specified. - * @param message ListDocumentsResponse - * @param [options] Conversion options - * @returns Plain object + * Calls ImportDocuments. + * @param request ImportDocumentsRequest message or plain object + * @returns Promise */ - public static toObject(message: google.cloud.discoveryengine.v1beta.ListDocumentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public importDocuments(request: google.cloud.discoveryengine.v1beta.IImportDocumentsRequest): Promise; /** - * Converts this ListDocumentsResponse to JSON. - * @returns JSON object + * Calls PurgeDocuments. + * @param request PurgeDocumentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public toJSON(): { [k: string]: any }; + public purgeDocuments(request: google.cloud.discoveryengine.v1beta.IPurgeDocumentsRequest, callback: google.cloud.discoveryengine.v1beta.DocumentService.PurgeDocumentsCallback): void; /** - * Gets the default type url for ListDocumentsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Calls PurgeDocuments. + * @param request PurgeDocumentsRequest message or plain object + * @returns Promise */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateDocumentRequest. */ - interface ICreateDocumentRequest { - - /** CreateDocumentRequest parent */ - parent?: (string|null); - - /** CreateDocumentRequest document */ - document?: (google.cloud.discoveryengine.v1beta.IDocument|null); - - /** CreateDocumentRequest documentId */ - documentId?: (string|null); + public purgeDocuments(request: google.cloud.discoveryengine.v1beta.IPurgeDocumentsRequest): Promise; } - /** Represents a CreateDocumentRequest. */ - class CreateDocumentRequest implements ICreateDocumentRequest { + namespace DocumentService { /** - * Constructs a new CreateDocumentRequest. - * @param [properties] Properties to set + * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|getDocument}. + * @param error Error, if any + * @param [response] Document */ - constructor(properties?: google.cloud.discoveryengine.v1beta.ICreateDocumentRequest); - - /** CreateDocumentRequest parent. */ - public parent: string; - - /** CreateDocumentRequest document. */ - public document?: (google.cloud.discoveryengine.v1beta.IDocument|null); - - /** CreateDocumentRequest documentId. */ - public documentId: string; + type GetDocumentCallback = (error: (Error|null), response?: google.cloud.discoveryengine.v1beta.Document) => void; /** - * Creates a new CreateDocumentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateDocumentRequest instance + * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|listDocuments}. + * @param error Error, if any + * @param [response] ListDocumentsResponse */ - public static create(properties?: google.cloud.discoveryengine.v1beta.ICreateDocumentRequest): google.cloud.discoveryengine.v1beta.CreateDocumentRequest; + type ListDocumentsCallback = (error: (Error|null), response?: google.cloud.discoveryengine.v1beta.ListDocumentsResponse) => void; /** - * Encodes the specified CreateDocumentRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CreateDocumentRequest.verify|verify} messages. - * @param message CreateDocumentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|createDocument}. + * @param error Error, if any + * @param [response] Document */ - public static encode(message: google.cloud.discoveryengine.v1beta.ICreateDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + type CreateDocumentCallback = (error: (Error|null), response?: google.cloud.discoveryengine.v1beta.Document) => void; /** - * Encodes the specified CreateDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CreateDocumentRequest.verify|verify} messages. - * @param message CreateDocumentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|updateDocument}. + * @param error Error, if any + * @param [response] Document */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.ICreateDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + type UpdateDocumentCallback = (error: (Error|null), response?: google.cloud.discoveryengine.v1beta.Document) => void; /** - * Decodes a CreateDocumentRequest message from the specified reader or buffer. + * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|deleteDocument}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteDocumentCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|importDocuments}. + * @param error Error, if any + * @param [response] Operation + */ + type ImportDocumentsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|purgeDocuments}. + * @param error Error, if any + * @param [response] Operation + */ + type PurgeDocumentsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of a GetDocumentRequest. */ + interface IGetDocumentRequest { + + /** GetDocumentRequest name */ + name?: (string|null); + } + + /** Represents a GetDocumentRequest. */ + class GetDocumentRequest implements IGetDocumentRequest { + + /** + * Constructs a new GetDocumentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.IGetDocumentRequest); + + /** GetDocumentRequest name. */ + public name: string; + + /** + * Creates a new GetDocumentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDocumentRequest instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.IGetDocumentRequest): google.cloud.discoveryengine.v1beta.GetDocumentRequest; + + /** + * Encodes the specified GetDocumentRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.GetDocumentRequest.verify|verify} messages. + * @param message GetDocumentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.IGetDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.GetDocumentRequest.verify|verify} messages. + * @param message GetDocumentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IGetDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDocumentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateDocumentRequest + * @returns GetDocumentRequest * @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.discoveryengine.v1beta.CreateDocumentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1beta.GetDocumentRequest; /** - * Decodes a CreateDocumentRequest message from the specified reader or buffer, length delimited. + * Decodes a GetDocumentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateDocumentRequest + * @returns GetDocumentRequest * @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.discoveryengine.v1beta.CreateDocumentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1beta.GetDocumentRequest; /** - * Verifies a CreateDocumentRequest message. + * Verifies a GetDocumentRequest 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 CreateDocumentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetDocumentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateDocumentRequest + * @returns GetDocumentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.CreateDocumentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.GetDocumentRequest; /** - * Creates a plain object from a CreateDocumentRequest message. Also converts values to other types if specified. - * @param message CreateDocumentRequest + * Creates a plain object from a GetDocumentRequest message. Also converts values to other types if specified. + * @param message GetDocumentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1beta.CreateDocumentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1beta.GetDocumentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateDocumentRequest to JSON. + * Converts this GetDocumentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateDocumentRequest + * Gets the default type url for GetDocumentRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateDocumentRequest. */ - interface IUpdateDocumentRequest { + /** Properties of a ListDocumentsRequest. */ + interface IListDocumentsRequest { - /** UpdateDocumentRequest document */ - document?: (google.cloud.discoveryengine.v1beta.IDocument|null); + /** ListDocumentsRequest parent */ + parent?: (string|null); - /** UpdateDocumentRequest allowMissing */ - allowMissing?: (boolean|null); + /** ListDocumentsRequest pageSize */ + pageSize?: (number|null); + + /** ListDocumentsRequest pageToken */ + pageToken?: (string|null); } - /** Represents an UpdateDocumentRequest. */ - class UpdateDocumentRequest implements IUpdateDocumentRequest { + /** Represents a ListDocumentsRequest. */ + class ListDocumentsRequest implements IListDocumentsRequest { /** - * Constructs a new UpdateDocumentRequest. + * Constructs a new ListDocumentsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest); + constructor(properties?: google.cloud.discoveryengine.v1beta.IListDocumentsRequest); - /** UpdateDocumentRequest document. */ - public document?: (google.cloud.discoveryengine.v1beta.IDocument|null); + /** ListDocumentsRequest parent. */ + public parent: string; - /** UpdateDocumentRequest allowMissing. */ - public allowMissing: boolean; + /** ListDocumentsRequest pageSize. */ + public pageSize: number; + + /** ListDocumentsRequest pageToken. */ + public pageToken: string; /** - * Creates a new UpdateDocumentRequest instance using the specified properties. + * Creates a new ListDocumentsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateDocumentRequest instance + * @returns ListDocumentsRequest instance */ - public static create(properties?: google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest): google.cloud.discoveryengine.v1beta.UpdateDocumentRequest; + public static create(properties?: google.cloud.discoveryengine.v1beta.IListDocumentsRequest): google.cloud.discoveryengine.v1beta.ListDocumentsRequest; /** - * Encodes the specified UpdateDocumentRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.verify|verify} messages. - * @param message UpdateDocumentRequest message or plain object to encode + * Encodes the specified ListDocumentsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ListDocumentsRequest.verify|verify} messages. + * @param message ListDocumentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1beta.IListDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.verify|verify} messages. - * @param message UpdateDocumentRequest message or plain object to encode + * Encodes the specified ListDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ListDocumentsRequest.verify|verify} messages. + * @param message ListDocumentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IListDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateDocumentRequest message from the specified reader or buffer. + * Decodes a ListDocumentsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateDocumentRequest + * @returns ListDocumentsRequest * @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.discoveryengine.v1beta.UpdateDocumentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1beta.ListDocumentsRequest; /** - * Decodes an UpdateDocumentRequest message from the specified reader or buffer, length delimited. + * Decodes a ListDocumentsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateDocumentRequest + * @returns ListDocumentsRequest * @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.discoveryengine.v1beta.UpdateDocumentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1beta.ListDocumentsRequest; /** - * Verifies an UpdateDocumentRequest message. + * Verifies a ListDocumentsRequest 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 UpdateDocumentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListDocumentsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateDocumentRequest + * @returns ListDocumentsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.UpdateDocumentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ListDocumentsRequest; /** - * Creates a plain object from an UpdateDocumentRequest message. Also converts values to other types if specified. - * @param message UpdateDocumentRequest + * Creates a plain object from a ListDocumentsRequest message. Also converts values to other types if specified. + * @param message ListDocumentsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1beta.UpdateDocumentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1beta.ListDocumentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateDocumentRequest to JSON. + * Converts this ListDocumentsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateDocumentRequest + * Gets the default type url for ListDocumentsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteDocumentRequest. */ - interface IDeleteDocumentRequest { + /** Properties of a ListDocumentsResponse. */ + interface IListDocumentsResponse { - /** DeleteDocumentRequest name */ - name?: (string|null); + /** ListDocumentsResponse documents */ + documents?: (google.cloud.discoveryengine.v1beta.IDocument[]|null); + + /** ListDocumentsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a DeleteDocumentRequest. */ - class DeleteDocumentRequest implements IDeleteDocumentRequest { + /** Represents a ListDocumentsResponse. */ + class ListDocumentsResponse implements IListDocumentsResponse { /** - * Constructs a new DeleteDocumentRequest. + * Constructs a new ListDocumentsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest); + constructor(properties?: google.cloud.discoveryengine.v1beta.IListDocumentsResponse); - /** DeleteDocumentRequest name. */ - public name: string; + /** ListDocumentsResponse documents. */ + public documents: google.cloud.discoveryengine.v1beta.IDocument[]; + + /** ListDocumentsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new DeleteDocumentRequest instance using the specified properties. + * Creates a new ListDocumentsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteDocumentRequest instance + * @returns ListDocumentsResponse instance */ - public static create(properties?: google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest): google.cloud.discoveryengine.v1beta.DeleteDocumentRequest; + public static create(properties?: google.cloud.discoveryengine.v1beta.IListDocumentsResponse): google.cloud.discoveryengine.v1beta.ListDocumentsResponse; /** - * Encodes the specified DeleteDocumentRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.DeleteDocumentRequest.verify|verify} messages. - * @param message DeleteDocumentRequest message or plain object to encode + * Encodes the specified ListDocumentsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ListDocumentsResponse.verify|verify} messages. + * @param message ListDocumentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1beta.IListDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.DeleteDocumentRequest.verify|verify} messages. - * @param message DeleteDocumentRequest message or plain object to encode + * Encodes the specified ListDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ListDocumentsResponse.verify|verify} messages. + * @param message ListDocumentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IListDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteDocumentRequest message from the specified reader or buffer. + * Decodes a ListDocumentsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteDocumentRequest + * @returns ListDocumentsResponse * @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.discoveryengine.v1beta.DeleteDocumentRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1beta.ListDocumentsResponse; /** - * Decodes a DeleteDocumentRequest message from the specified reader or buffer, length delimited. + * Decodes a ListDocumentsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteDocumentRequest + * @returns ListDocumentsResponse * @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.discoveryengine.v1beta.DeleteDocumentRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1beta.ListDocumentsResponse; /** - * Verifies a DeleteDocumentRequest message. + * Verifies a ListDocumentsResponse 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 DeleteDocumentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListDocumentsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteDocumentRequest + * @returns ListDocumentsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.DeleteDocumentRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ListDocumentsResponse; /** - * Creates a plain object from a DeleteDocumentRequest message. Also converts values to other types if specified. - * @param message DeleteDocumentRequest + * Creates a plain object from a ListDocumentsResponse message. Also converts values to other types if specified. + * @param message ListDocumentsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1beta.DeleteDocumentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1beta.ListDocumentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteDocumentRequest to JSON. + * Converts this ListDocumentsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteDocumentRequest + * Gets the default type url for ListDocumentsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GcsSource. */ - interface IGcsSource { - - /** GcsSource inputUris */ - inputUris?: (string[]|null); + /** Properties of a CreateDocumentRequest. */ + interface ICreateDocumentRequest { - /** GcsSource dataSchema */ - dataSchema?: (string|null); + /** CreateDocumentRequest parent */ + parent?: (string|null); + + /** CreateDocumentRequest document */ + document?: (google.cloud.discoveryengine.v1beta.IDocument|null); + + /** CreateDocumentRequest documentId */ + documentId?: (string|null); } - /** Represents a GcsSource. */ - class GcsSource implements IGcsSource { + /** Represents a CreateDocumentRequest. */ + class CreateDocumentRequest implements ICreateDocumentRequest { /** - * Constructs a new GcsSource. + * Constructs a new CreateDocumentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1beta.IGcsSource); + constructor(properties?: google.cloud.discoveryengine.v1beta.ICreateDocumentRequest); - /** GcsSource inputUris. */ - public inputUris: string[]; + /** CreateDocumentRequest parent. */ + public parent: string; - /** GcsSource dataSchema. */ - public dataSchema: string; + /** CreateDocumentRequest document. */ + public document?: (google.cloud.discoveryengine.v1beta.IDocument|null); + + /** CreateDocumentRequest documentId. */ + public documentId: string; /** - * Creates a new GcsSource instance using the specified properties. + * Creates a new CreateDocumentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GcsSource instance + * @returns CreateDocumentRequest instance */ - public static create(properties?: google.cloud.discoveryengine.v1beta.IGcsSource): google.cloud.discoveryengine.v1beta.GcsSource; + public static create(properties?: google.cloud.discoveryengine.v1beta.ICreateDocumentRequest): google.cloud.discoveryengine.v1beta.CreateDocumentRequest; /** - * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.GcsSource.verify|verify} messages. - * @param message GcsSource message or plain object to encode + * Encodes the specified CreateDocumentRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CreateDocumentRequest.verify|verify} messages. + * @param message CreateDocumentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1beta.IGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1beta.ICreateDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.GcsSource.verify|verify} messages. - * @param message GcsSource message or plain object to encode + * Encodes the specified CreateDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CreateDocumentRequest.verify|verify} messages. + * @param message CreateDocumentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.ICreateDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GcsSource message from the specified reader or buffer. + * Decodes a CreateDocumentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GcsSource + * @returns CreateDocumentRequest * @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.discoveryengine.v1beta.GcsSource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1beta.CreateDocumentRequest; /** - * Decodes a GcsSource message from the specified reader or buffer, length delimited. + * Decodes a CreateDocumentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GcsSource + * @returns CreateDocumentRequest * @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.discoveryengine.v1beta.GcsSource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1beta.CreateDocumentRequest; /** - * Verifies a GcsSource message. + * Verifies a CreateDocumentRequest 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 GcsSource message from a plain object. Also converts values to their respective internal types. + * Creates a CreateDocumentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GcsSource + * @returns CreateDocumentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.GcsSource; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.CreateDocumentRequest; /** - * Creates a plain object from a GcsSource message. Also converts values to other types if specified. - * @param message GcsSource + * Creates a plain object from a CreateDocumentRequest message. Also converts values to other types if specified. + * @param message CreateDocumentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1beta.GcsSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1beta.CreateDocumentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GcsSource to JSON. + * Converts this CreateDocumentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GcsSource + * Gets the default type url for CreateDocumentRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a BigQuerySource. */ - interface IBigQuerySource { - - /** BigQuerySource partitionDate */ - partitionDate?: (google.type.IDate|null); - - /** BigQuerySource projectId */ - projectId?: (string|null); - - /** BigQuerySource datasetId */ - datasetId?: (string|null); - - /** BigQuerySource tableId */ - tableId?: (string|null); + /** Properties of an UpdateDocumentRequest. */ + interface IUpdateDocumentRequest { - /** BigQuerySource gcsStagingDir */ - gcsStagingDir?: (string|null); + /** UpdateDocumentRequest document */ + document?: (google.cloud.discoveryengine.v1beta.IDocument|null); - /** BigQuerySource dataSchema */ - dataSchema?: (string|null); + /** UpdateDocumentRequest allowMissing */ + allowMissing?: (boolean|null); } - /** Represents a BigQuerySource. */ - class BigQuerySource implements IBigQuerySource { + /** Represents an UpdateDocumentRequest. */ + class UpdateDocumentRequest implements IUpdateDocumentRequest { /** - * Constructs a new BigQuerySource. + * Constructs a new UpdateDocumentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1beta.IBigQuerySource); - - /** BigQuerySource partitionDate. */ - public partitionDate?: (google.type.IDate|null); - - /** BigQuerySource projectId. */ - public projectId: string; - - /** BigQuerySource datasetId. */ - public datasetId: string; - - /** BigQuerySource tableId. */ - public tableId: string; - - /** BigQuerySource gcsStagingDir. */ - public gcsStagingDir: string; + constructor(properties?: google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest); - /** BigQuerySource dataSchema. */ - public dataSchema: string; + /** UpdateDocumentRequest document. */ + public document?: (google.cloud.discoveryengine.v1beta.IDocument|null); - /** BigQuerySource partition. */ - public partition?: "partitionDate"; + /** UpdateDocumentRequest allowMissing. */ + public allowMissing: boolean; /** - * Creates a new BigQuerySource instance using the specified properties. + * Creates a new UpdateDocumentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns BigQuerySource instance + * @returns UpdateDocumentRequest instance */ - public static create(properties?: google.cloud.discoveryengine.v1beta.IBigQuerySource): google.cloud.discoveryengine.v1beta.BigQuerySource; + public static create(properties?: google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest): google.cloud.discoveryengine.v1beta.UpdateDocumentRequest; /** - * Encodes the specified BigQuerySource message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.BigQuerySource.verify|verify} messages. - * @param message BigQuerySource message or plain object to encode + * Encodes the specified UpdateDocumentRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.verify|verify} messages. + * @param message UpdateDocumentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1beta.IBigQuerySource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BigQuerySource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.BigQuerySource.verify|verify} messages. - * @param message BigQuerySource message or plain object to encode + * Encodes the specified UpdateDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.verify|verify} messages. + * @param message UpdateDocumentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IBigQuerySource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BigQuerySource message from the specified reader or buffer. + * Decodes an UpdateDocumentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BigQuerySource + * @returns UpdateDocumentRequest * @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.discoveryengine.v1beta.BigQuerySource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1beta.UpdateDocumentRequest; /** - * Decodes a BigQuerySource message from the specified reader or buffer, length delimited. + * Decodes an UpdateDocumentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BigQuerySource + * @returns UpdateDocumentRequest * @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.discoveryengine.v1beta.BigQuerySource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1beta.UpdateDocumentRequest; /** - * Verifies a BigQuerySource message. + * Verifies an UpdateDocumentRequest 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 BigQuerySource message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateDocumentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BigQuerySource + * @returns UpdateDocumentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.BigQuerySource; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.UpdateDocumentRequest; /** - * Creates a plain object from a BigQuerySource message. Also converts values to other types if specified. - * @param message BigQuerySource + * Creates a plain object from an UpdateDocumentRequest message. Also converts values to other types if specified. + * @param message UpdateDocumentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1beta.BigQuerySource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1beta.UpdateDocumentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BigQuerySource to JSON. + * Converts this UpdateDocumentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for BigQuerySource + * Gets the default type url for UpdateDocumentRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ImportErrorConfig. */ - interface IImportErrorConfig { + /** Properties of a DeleteDocumentRequest. */ + interface IDeleteDocumentRequest { - /** ImportErrorConfig gcsPrefix */ - gcsPrefix?: (string|null); + /** DeleteDocumentRequest name */ + name?: (string|null); } - /** Represents an ImportErrorConfig. */ - class ImportErrorConfig implements IImportErrorConfig { + /** Represents a DeleteDocumentRequest. */ + class DeleteDocumentRequest implements IDeleteDocumentRequest { /** - * Constructs a new ImportErrorConfig. + * Constructs a new DeleteDocumentRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1beta.IImportErrorConfig); - - /** ImportErrorConfig gcsPrefix. */ - public gcsPrefix?: (string|null); + constructor(properties?: google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest); - /** ImportErrorConfig destination. */ - public destination?: "gcsPrefix"; + /** DeleteDocumentRequest name. */ + public name: string; /** - * Creates a new ImportErrorConfig instance using the specified properties. + * Creates a new DeleteDocumentRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ImportErrorConfig instance + * @returns DeleteDocumentRequest instance */ - public static create(properties?: google.cloud.discoveryengine.v1beta.IImportErrorConfig): google.cloud.discoveryengine.v1beta.ImportErrorConfig; + public static create(properties?: google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest): google.cloud.discoveryengine.v1beta.DeleteDocumentRequest; /** - * Encodes the specified ImportErrorConfig message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportErrorConfig.verify|verify} messages. - * @param message ImportErrorConfig message or plain object to encode + * Encodes the specified DeleteDocumentRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.DeleteDocumentRequest.verify|verify} messages. + * @param message DeleteDocumentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1beta.IImportErrorConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportErrorConfig message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportErrorConfig.verify|verify} messages. - * @param message ImportErrorConfig message or plain object to encode + * Encodes the specified DeleteDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.DeleteDocumentRequest.verify|verify} messages. + * @param message DeleteDocumentRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IImportErrorConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportErrorConfig message from the specified reader or buffer. + * Decodes a DeleteDocumentRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportErrorConfig + * @returns DeleteDocumentRequest * @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.discoveryengine.v1beta.ImportErrorConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1beta.DeleteDocumentRequest; /** - * Decodes an ImportErrorConfig message from the specified reader or buffer, length delimited. + * Decodes a DeleteDocumentRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportErrorConfig + * @returns DeleteDocumentRequest * @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.discoveryengine.v1beta.ImportErrorConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1beta.DeleteDocumentRequest; /** - * Verifies an ImportErrorConfig message. + * Verifies a DeleteDocumentRequest 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 ImportErrorConfig message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteDocumentRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportErrorConfig + * @returns DeleteDocumentRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ImportErrorConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.DeleteDocumentRequest; /** - * Creates a plain object from an ImportErrorConfig message. Also converts values to other types if specified. - * @param message ImportErrorConfig + * Creates a plain object from a DeleteDocumentRequest message. Also converts values to other types if specified. + * @param message DeleteDocumentRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1beta.ImportErrorConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1beta.DeleteDocumentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportErrorConfig to JSON. + * Converts this DeleteDocumentRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ImportErrorConfig + * Gets the default type url for DeleteDocumentRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ImportUserEventsRequest. */ - interface IImportUserEventsRequest { - - /** ImportUserEventsRequest inlineSource */ - inlineSource?: (google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource|null); - - /** ImportUserEventsRequest gcsSource */ - gcsSource?: (google.cloud.discoveryengine.v1beta.IGcsSource|null); - - /** ImportUserEventsRequest bigquerySource */ - bigquerySource?: (google.cloud.discoveryengine.v1beta.IBigQuerySource|null); + /** Properties of a GcsSource. */ + interface IGcsSource { - /** ImportUserEventsRequest parent */ - parent?: (string|null); + /** GcsSource inputUris */ + inputUris?: (string[]|null); - /** ImportUserEventsRequest errorConfig */ - errorConfig?: (google.cloud.discoveryengine.v1beta.IImportErrorConfig|null); + /** GcsSource dataSchema */ + dataSchema?: (string|null); } - /** Represents an ImportUserEventsRequest. */ - class ImportUserEventsRequest implements IImportUserEventsRequest { + /** Represents a GcsSource. */ + class GcsSource implements IGcsSource { /** - * Constructs a new ImportUserEventsRequest. + * Constructs a new GcsSource. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1beta.IImportUserEventsRequest); - - /** ImportUserEventsRequest inlineSource. */ - public inlineSource?: (google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource|null); - - /** ImportUserEventsRequest gcsSource. */ - public gcsSource?: (google.cloud.discoveryengine.v1beta.IGcsSource|null); - - /** ImportUserEventsRequest bigquerySource. */ - public bigquerySource?: (google.cloud.discoveryengine.v1beta.IBigQuerySource|null); - - /** ImportUserEventsRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.discoveryengine.v1beta.IGcsSource); - /** ImportUserEventsRequest errorConfig. */ - public errorConfig?: (google.cloud.discoveryengine.v1beta.IImportErrorConfig|null); + /** GcsSource inputUris. */ + public inputUris: string[]; - /** ImportUserEventsRequest source. */ - public source?: ("inlineSource"|"gcsSource"|"bigquerySource"); + /** GcsSource dataSchema. */ + public dataSchema: string; /** - * Creates a new ImportUserEventsRequest instance using the specified properties. + * Creates a new GcsSource instance using the specified properties. * @param [properties] Properties to set - * @returns ImportUserEventsRequest instance + * @returns GcsSource instance */ - public static create(properties?: google.cloud.discoveryengine.v1beta.IImportUserEventsRequest): google.cloud.discoveryengine.v1beta.ImportUserEventsRequest; + public static create(properties?: google.cloud.discoveryengine.v1beta.IGcsSource): google.cloud.discoveryengine.v1beta.GcsSource; /** - * Encodes the specified ImportUserEventsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.verify|verify} messages. - * @param message ImportUserEventsRequest message or plain object to encode + * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.GcsSource.verify|verify} messages. + * @param message GcsSource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1beta.IImportUserEventsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1beta.IGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportUserEventsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.verify|verify} messages. - * @param message ImportUserEventsRequest message or plain object to encode + * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.GcsSource.verify|verify} messages. + * @param message GcsSource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IImportUserEventsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportUserEventsRequest message from the specified reader or buffer. + * Decodes a GcsSource message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportUserEventsRequest + * @returns GcsSource * @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.discoveryengine.v1beta.ImportUserEventsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1beta.GcsSource; /** - * Decodes an ImportUserEventsRequest message from the specified reader or buffer, length delimited. + * Decodes a GcsSource message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportUserEventsRequest + * @returns GcsSource * @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.discoveryengine.v1beta.ImportUserEventsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1beta.GcsSource; /** - * Verifies an ImportUserEventsRequest message. + * Verifies a GcsSource 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 ImportUserEventsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GcsSource message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportUserEventsRequest + * @returns GcsSource */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ImportUserEventsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.GcsSource; /** - * Creates a plain object from an ImportUserEventsRequest message. Also converts values to other types if specified. - * @param message ImportUserEventsRequest + * Creates a plain object from a GcsSource message. Also converts values to other types if specified. + * @param message GcsSource * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1beta.ImportUserEventsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1beta.GcsSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportUserEventsRequest to JSON. + * Converts this GcsSource to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ImportUserEventsRequest + * Gets the default type url for GcsSource * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace ImportUserEventsRequest { - - /** Properties of an InlineSource. */ - interface IInlineSource { - - /** InlineSource userEvents */ - userEvents?: (google.cloud.discoveryengine.v1beta.IUserEvent[]|null); - } - - /** Represents an InlineSource. */ - class InlineSource implements IInlineSource { - - /** - * Constructs a new InlineSource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource); - - /** InlineSource userEvents. */ - public userEvents: google.cloud.discoveryengine.v1beta.IUserEvent[]; - - /** - * Creates a new InlineSource instance using the specified properties. - * @param [properties] Properties to set - * @returns InlineSource instance - */ - public static create(properties?: google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource): google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource; + /** Properties of a BigQuerySource. */ + interface IBigQuerySource { - /** - * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.verify|verify} messages. - * @param message InlineSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; + /** BigQuerySource partitionDate */ + partitionDate?: (google.type.IDate|null); - /** - * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.verify|verify} messages. - * @param message InlineSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; + /** BigQuerySource projectId */ + projectId?: (string|null); - /** - * Decodes an InlineSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InlineSource - * @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.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource; + /** BigQuerySource datasetId */ + datasetId?: (string|null); - /** - * Decodes an InlineSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InlineSource - * @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.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource; + /** BigQuerySource tableId */ + tableId?: (string|null); - /** - * Verifies an InlineSource 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); + /** BigQuerySource gcsStagingDir */ + gcsStagingDir?: (string|null); - /** - * Creates an InlineSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InlineSource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource; + /** BigQuerySource dataSchema */ + dataSchema?: (string|null); + } - /** - * Creates a plain object from an InlineSource message. Also converts values to other types if specified. - * @param message InlineSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents a BigQuerySource. */ + class BigQuerySource implements IBigQuerySource { - /** - * Converts this InlineSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Constructs a new BigQuerySource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.IBigQuerySource); - /** - * Gets the default type url for InlineSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** BigQuerySource partitionDate. */ + public partitionDate?: (google.type.IDate|null); - /** Properties of an ImportUserEventsResponse. */ - interface IImportUserEventsResponse { + /** BigQuerySource projectId. */ + public projectId: string; - /** ImportUserEventsResponse errorSamples */ - errorSamples?: (google.rpc.IStatus[]|null); + /** BigQuerySource datasetId. */ + public datasetId: string; - /** ImportUserEventsResponse errorConfig */ - errorConfig?: (google.cloud.discoveryengine.v1beta.IImportErrorConfig|null); + /** BigQuerySource tableId. */ + public tableId: string; - /** ImportUserEventsResponse joinedEventsCount */ - joinedEventsCount?: (number|Long|string|null); + /** BigQuerySource gcsStagingDir. */ + public gcsStagingDir: string; - /** ImportUserEventsResponse unjoinedEventsCount */ - unjoinedEventsCount?: (number|Long|string|null); - } + /** BigQuerySource dataSchema. */ + public dataSchema: string; - /** Represents an ImportUserEventsResponse. */ - class ImportUserEventsResponse implements IImportUserEventsResponse { + /** BigQuerySource partition. */ + public partition?: "partitionDate"; /** - * Constructs a new ImportUserEventsResponse. + * Creates a new BigQuerySource instance using the specified properties. * @param [properties] Properties to set + * @returns BigQuerySource instance */ - constructor(properties?: google.cloud.discoveryengine.v1beta.IImportUserEventsResponse); - - /** ImportUserEventsResponse errorSamples. */ - public errorSamples: google.rpc.IStatus[]; - - /** ImportUserEventsResponse errorConfig. */ - public errorConfig?: (google.cloud.discoveryengine.v1beta.IImportErrorConfig|null); - - /** ImportUserEventsResponse joinedEventsCount. */ - public joinedEventsCount: (number|Long|string); - - /** ImportUserEventsResponse unjoinedEventsCount. */ - public unjoinedEventsCount: (number|Long|string); + public static create(properties?: google.cloud.discoveryengine.v1beta.IBigQuerySource): google.cloud.discoveryengine.v1beta.BigQuerySource; /** - * Creates a new ImportUserEventsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportUserEventsResponse instance - */ - public static create(properties?: google.cloud.discoveryengine.v1beta.IImportUserEventsResponse): google.cloud.discoveryengine.v1beta.ImportUserEventsResponse; - - /** - * Encodes the specified ImportUserEventsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsResponse.verify|verify} messages. - * @param message ImportUserEventsResponse message or plain object to encode + * Encodes the specified BigQuerySource message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.BigQuerySource.verify|verify} messages. + * @param message BigQuerySource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1beta.IImportUserEventsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1beta.IBigQuerySource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportUserEventsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsResponse.verify|verify} messages. - * @param message ImportUserEventsResponse message or plain object to encode + * Encodes the specified BigQuerySource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.BigQuerySource.verify|verify} messages. + * @param message BigQuerySource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IImportUserEventsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IBigQuerySource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportUserEventsResponse message from the specified reader or buffer. + * Decodes a BigQuerySource message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportUserEventsResponse + * @returns BigQuerySource * @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.discoveryengine.v1beta.ImportUserEventsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1beta.BigQuerySource; /** - * Decodes an ImportUserEventsResponse message from the specified reader or buffer, length delimited. + * Decodes a BigQuerySource message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportUserEventsResponse + * @returns BigQuerySource * @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.discoveryengine.v1beta.ImportUserEventsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1beta.BigQuerySource; /** - * Verifies an ImportUserEventsResponse message. + * Verifies a BigQuerySource 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 ImportUserEventsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a BigQuerySource message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportUserEventsResponse + * @returns BigQuerySource */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ImportUserEventsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.BigQuerySource; /** - * Creates a plain object from an ImportUserEventsResponse message. Also converts values to other types if specified. - * @param message ImportUserEventsResponse + * Creates a plain object from a BigQuerySource message. Also converts values to other types if specified. + * @param message BigQuerySource * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1beta.ImportUserEventsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1beta.BigQuerySource, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportUserEventsResponse to JSON. + * Converts this BigQuerySource to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ImportUserEventsResponse + * Gets the default type url for BigQuerySource * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ImportUserEventsMetadata. */ - interface IImportUserEventsMetadata { - - /** ImportUserEventsMetadata createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** ImportUserEventsMetadata updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** ImportUserEventsMetadata successCount */ - successCount?: (number|Long|string|null); + /** Properties of an ImportErrorConfig. */ + interface IImportErrorConfig { - /** ImportUserEventsMetadata failureCount */ - failureCount?: (number|Long|string|null); + /** ImportErrorConfig gcsPrefix */ + gcsPrefix?: (string|null); } - /** Represents an ImportUserEventsMetadata. */ - class ImportUserEventsMetadata implements IImportUserEventsMetadata { + /** Represents an ImportErrorConfig. */ + class ImportErrorConfig implements IImportErrorConfig { /** - * Constructs a new ImportUserEventsMetadata. + * Constructs a new ImportErrorConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1beta.IImportUserEventsMetadata); - - /** ImportUserEventsMetadata createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** ImportUserEventsMetadata updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + constructor(properties?: google.cloud.discoveryengine.v1beta.IImportErrorConfig); - /** ImportUserEventsMetadata successCount. */ - public successCount: (number|Long|string); + /** ImportErrorConfig gcsPrefix. */ + public gcsPrefix?: (string|null); - /** ImportUserEventsMetadata failureCount. */ - public failureCount: (number|Long|string); + /** ImportErrorConfig destination. */ + public destination?: "gcsPrefix"; /** - * Creates a new ImportUserEventsMetadata instance using the specified properties. + * Creates a new ImportErrorConfig instance using the specified properties. * @param [properties] Properties to set - * @returns ImportUserEventsMetadata instance + * @returns ImportErrorConfig instance */ - public static create(properties?: google.cloud.discoveryengine.v1beta.IImportUserEventsMetadata): google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata; + public static create(properties?: google.cloud.discoveryengine.v1beta.IImportErrorConfig): google.cloud.discoveryengine.v1beta.ImportErrorConfig; /** - * Encodes the specified ImportUserEventsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata.verify|verify} messages. - * @param message ImportUserEventsMetadata message or plain object to encode + * Encodes the specified ImportErrorConfig message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportErrorConfig.verify|verify} messages. + * @param message ImportErrorConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1beta.IImportUserEventsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1beta.IImportErrorConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportUserEventsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata.verify|verify} messages. - * @param message ImportUserEventsMetadata message or plain object to encode + * Encodes the specified ImportErrorConfig message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportErrorConfig.verify|verify} messages. + * @param message ImportErrorConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IImportUserEventsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IImportErrorConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportUserEventsMetadata message from the specified reader or buffer. + * Decodes an ImportErrorConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportUserEventsMetadata + * @returns ImportErrorConfig * @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.discoveryengine.v1beta.ImportUserEventsMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1beta.ImportErrorConfig; /** - * Decodes an ImportUserEventsMetadata message from the specified reader or buffer, length delimited. + * Decodes an ImportErrorConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportUserEventsMetadata + * @returns ImportErrorConfig * @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.discoveryengine.v1beta.ImportUserEventsMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1beta.ImportErrorConfig; /** - * Verifies an ImportUserEventsMetadata message. + * Verifies an ImportErrorConfig 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 ImportUserEventsMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an ImportErrorConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportUserEventsMetadata + * @returns ImportErrorConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ImportErrorConfig; /** - * Creates a plain object from an ImportUserEventsMetadata message. Also converts values to other types if specified. - * @param message ImportUserEventsMetadata + * Creates a plain object from an ImportErrorConfig message. Also converts values to other types if specified. + * @param message ImportErrorConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1beta.ImportErrorConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportUserEventsMetadata to JSON. + * Converts this ImportErrorConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ImportUserEventsMetadata + * Gets the default type url for ImportErrorConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ImportDocumentsMetadata. */ - interface IImportDocumentsMetadata { + /** Properties of an ImportUserEventsRequest. */ + interface IImportUserEventsRequest { - /** ImportDocumentsMetadata createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** ImportUserEventsRequest inlineSource */ + inlineSource?: (google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource|null); - /** ImportDocumentsMetadata updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** ImportUserEventsRequest gcsSource */ + gcsSource?: (google.cloud.discoveryengine.v1beta.IGcsSource|null); - /** ImportDocumentsMetadata successCount */ - successCount?: (number|Long|string|null); + /** ImportUserEventsRequest bigquerySource */ + bigquerySource?: (google.cloud.discoveryengine.v1beta.IBigQuerySource|null); - /** ImportDocumentsMetadata failureCount */ - failureCount?: (number|Long|string|null); + /** ImportUserEventsRequest parent */ + parent?: (string|null); + + /** ImportUserEventsRequest errorConfig */ + errorConfig?: (google.cloud.discoveryengine.v1beta.IImportErrorConfig|null); } - /** Represents an ImportDocumentsMetadata. */ - class ImportDocumentsMetadata implements IImportDocumentsMetadata { + /** Represents an ImportUserEventsRequest. */ + class ImportUserEventsRequest implements IImportUserEventsRequest { /** - * Constructs a new ImportDocumentsMetadata. + * Constructs a new ImportUserEventsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1beta.IImportDocumentsMetadata); + constructor(properties?: google.cloud.discoveryengine.v1beta.IImportUserEventsRequest); - /** ImportDocumentsMetadata createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** ImportUserEventsRequest inlineSource. */ + public inlineSource?: (google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource|null); - /** ImportDocumentsMetadata updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** ImportUserEventsRequest gcsSource. */ + public gcsSource?: (google.cloud.discoveryengine.v1beta.IGcsSource|null); - /** ImportDocumentsMetadata successCount. */ - public successCount: (number|Long|string); + /** ImportUserEventsRequest bigquerySource. */ + public bigquerySource?: (google.cloud.discoveryengine.v1beta.IBigQuerySource|null); - /** ImportDocumentsMetadata failureCount. */ - public failureCount: (number|Long|string); + /** ImportUserEventsRequest parent. */ + public parent: string; + + /** ImportUserEventsRequest errorConfig. */ + public errorConfig?: (google.cloud.discoveryengine.v1beta.IImportErrorConfig|null); + + /** ImportUserEventsRequest source. */ + public source?: ("inlineSource"|"gcsSource"|"bigquerySource"); /** - * Creates a new ImportDocumentsMetadata instance using the specified properties. + * Creates a new ImportUserEventsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ImportDocumentsMetadata instance + * @returns ImportUserEventsRequest instance */ - public static create(properties?: google.cloud.discoveryengine.v1beta.IImportDocumentsMetadata): google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata; + public static create(properties?: google.cloud.discoveryengine.v1beta.IImportUserEventsRequest): google.cloud.discoveryengine.v1beta.ImportUserEventsRequest; /** - * Encodes the specified ImportDocumentsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata.verify|verify} messages. - * @param message ImportDocumentsMetadata message or plain object to encode + * Encodes the specified ImportUserEventsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.verify|verify} messages. + * @param message ImportUserEventsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1beta.IImportDocumentsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1beta.IImportUserEventsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportDocumentsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata.verify|verify} messages. - * @param message ImportDocumentsMetadata message or plain object to encode + * Encodes the specified ImportUserEventsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.verify|verify} messages. + * @param message ImportUserEventsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IImportDocumentsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IImportUserEventsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportDocumentsMetadata message from the specified reader or buffer. + * Decodes an ImportUserEventsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportDocumentsMetadata + * @returns ImportUserEventsRequest * @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.discoveryengine.v1beta.ImportDocumentsMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1beta.ImportUserEventsRequest; /** - * Decodes an ImportDocumentsMetadata message from the specified reader or buffer, length delimited. + * Decodes an ImportUserEventsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportDocumentsMetadata + * @returns ImportUserEventsRequest * @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.discoveryengine.v1beta.ImportDocumentsMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1beta.ImportUserEventsRequest; /** - * Verifies an ImportDocumentsMetadata message. + * Verifies an ImportUserEventsRequest 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 ImportDocumentsMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an ImportUserEventsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportDocumentsMetadata + * @returns ImportUserEventsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ImportUserEventsRequest; /** - * Creates a plain object from an ImportDocumentsMetadata message. Also converts values to other types if specified. - * @param message ImportDocumentsMetadata + * Creates a plain object from an ImportUserEventsRequest message. Also converts values to other types if specified. + * @param message ImportUserEventsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1beta.ImportUserEventsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportDocumentsMetadata to JSON. + * Converts this ImportUserEventsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ImportDocumentsMetadata + * Gets the default type url for ImportUserEventsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ImportDocumentsRequest. */ - interface IImportDocumentsRequest { + namespace ImportUserEventsRequest { - /** ImportDocumentsRequest inlineSource */ - inlineSource?: (google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource|null); + /** Properties of an InlineSource. */ + interface IInlineSource { - /** ImportDocumentsRequest gcsSource */ - gcsSource?: (google.cloud.discoveryengine.v1beta.IGcsSource|null); + /** InlineSource userEvents */ + userEvents?: (google.cloud.discoveryengine.v1beta.IUserEvent[]|null); + } - /** ImportDocumentsRequest bigquerySource */ - bigquerySource?: (google.cloud.discoveryengine.v1beta.IBigQuerySource|null); + /** Represents an InlineSource. */ + class InlineSource implements IInlineSource { - /** ImportDocumentsRequest parent */ - parent?: (string|null); + /** + * Constructs a new InlineSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource); - /** ImportDocumentsRequest errorConfig */ - errorConfig?: (google.cloud.discoveryengine.v1beta.IImportErrorConfig|null); - - /** ImportDocumentsRequest reconciliationMode */ - reconciliationMode?: (google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode|keyof typeof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode|null); - } - - /** Represents an ImportDocumentsRequest. */ - class ImportDocumentsRequest implements IImportDocumentsRequest { - - /** - * Constructs a new ImportDocumentsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.discoveryengine.v1beta.IImportDocumentsRequest); - - /** ImportDocumentsRequest inlineSource. */ - public inlineSource?: (google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource|null); - - /** ImportDocumentsRequest gcsSource. */ - public gcsSource?: (google.cloud.discoveryengine.v1beta.IGcsSource|null); - - /** ImportDocumentsRequest bigquerySource. */ - public bigquerySource?: (google.cloud.discoveryengine.v1beta.IBigQuerySource|null); - - /** ImportDocumentsRequest parent. */ - public parent: string; - - /** ImportDocumentsRequest errorConfig. */ - public errorConfig?: (google.cloud.discoveryengine.v1beta.IImportErrorConfig|null); - - /** ImportDocumentsRequest reconciliationMode. */ - public reconciliationMode: (google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode|keyof typeof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode); - - /** ImportDocumentsRequest source. */ - public source?: ("inlineSource"|"gcsSource"|"bigquerySource"); - - /** - * Creates a new ImportDocumentsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ImportDocumentsRequest instance - */ - public static create(properties?: google.cloud.discoveryengine.v1beta.IImportDocumentsRequest): google.cloud.discoveryengine.v1beta.ImportDocumentsRequest; - - /** - * Encodes the specified ImportDocumentsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.verify|verify} messages. - * @param message ImportDocumentsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.discoveryengine.v1beta.IImportDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ImportDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.verify|verify} messages. - * @param message ImportDocumentsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IImportDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ImportDocumentsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ImportDocumentsRequest - * @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.discoveryengine.v1beta.ImportDocumentsRequest; - - /** - * Decodes an ImportDocumentsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImportDocumentsRequest - * @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.discoveryengine.v1beta.ImportDocumentsRequest; - - /** - * Verifies an ImportDocumentsRequest 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 ImportDocumentsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportDocumentsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ImportDocumentsRequest; - - /** - * Creates a plain object from an ImportDocumentsRequest message. Also converts values to other types if specified. - * @param message ImportDocumentsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.discoveryengine.v1beta.ImportDocumentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImportDocumentsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImportDocumentsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ImportDocumentsRequest { - - /** Properties of an InlineSource. */ - interface IInlineSource { - - /** InlineSource documents */ - documents?: (google.cloud.discoveryengine.v1beta.IDocument[]|null); - } - - /** Represents an InlineSource. */ - class InlineSource implements IInlineSource { - - /** - * Constructs a new InlineSource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource); - - /** InlineSource documents. */ - public documents: google.cloud.discoveryengine.v1beta.IDocument[]; + /** InlineSource userEvents. */ + public userEvents: google.cloud.discoveryengine.v1beta.IUserEvent[]; /** * Creates a new InlineSource instance using the specified properties. * @param [properties] Properties to set * @returns InlineSource instance */ - public static create(properties?: google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource): google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource; + public static create(properties?: google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource): google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource; /** - * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.verify|verify} messages. + * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.verify|verify} messages. * @param message InlineSource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.verify|verify} messages. + * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.verify|verify} messages. * @param message InlineSource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes an InlineSource message from the specified reader or buffer. @@ -2214,7 +2265,7 @@ export namespace google { * @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.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource; /** * Decodes an InlineSource message from the specified reader or buffer, length delimited. @@ -2223,7 +2274,7 @@ export namespace google { * @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.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource; /** * Verifies an InlineSource message. @@ -2237,7 +2288,7 @@ export namespace google { * @param object Plain object * @returns InlineSource */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource; /** * Creates a plain object from an InlineSource message. Also converts values to other types if specified. @@ -2245,7 +2296,7 @@ export namespace google { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this InlineSource to JSON. @@ -2260,1532 +2311,5580 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } - - /** ReconciliationMode enum. */ - enum ReconciliationMode { - RECONCILIATION_MODE_UNSPECIFIED = 0, - INCREMENTAL = 1, - FULL = 2 - } } - /** Properties of an ImportDocumentsResponse. */ - interface IImportDocumentsResponse { + /** Properties of an ImportUserEventsResponse. */ + interface IImportUserEventsResponse { - /** ImportDocumentsResponse errorSamples */ + /** ImportUserEventsResponse errorSamples */ errorSamples?: (google.rpc.IStatus[]|null); - /** ImportDocumentsResponse errorConfig */ + /** ImportUserEventsResponse errorConfig */ errorConfig?: (google.cloud.discoveryengine.v1beta.IImportErrorConfig|null); + + /** ImportUserEventsResponse joinedEventsCount */ + joinedEventsCount?: (number|Long|string|null); + + /** ImportUserEventsResponse unjoinedEventsCount */ + unjoinedEventsCount?: (number|Long|string|null); } - /** Represents an ImportDocumentsResponse. */ - class ImportDocumentsResponse implements IImportDocumentsResponse { + /** Represents an ImportUserEventsResponse. */ + class ImportUserEventsResponse implements IImportUserEventsResponse { /** - * Constructs a new ImportDocumentsResponse. + * Constructs a new ImportUserEventsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1beta.IImportDocumentsResponse); + constructor(properties?: google.cloud.discoveryengine.v1beta.IImportUserEventsResponse); - /** ImportDocumentsResponse errorSamples. */ + /** ImportUserEventsResponse errorSamples. */ public errorSamples: google.rpc.IStatus[]; - /** ImportDocumentsResponse errorConfig. */ + /** ImportUserEventsResponse errorConfig. */ public errorConfig?: (google.cloud.discoveryengine.v1beta.IImportErrorConfig|null); + /** ImportUserEventsResponse joinedEventsCount. */ + public joinedEventsCount: (number|Long|string); + + /** ImportUserEventsResponse unjoinedEventsCount. */ + public unjoinedEventsCount: (number|Long|string); + /** - * Creates a new ImportDocumentsResponse instance using the specified properties. + * Creates a new ImportUserEventsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ImportDocumentsResponse instance + * @returns ImportUserEventsResponse instance */ - public static create(properties?: google.cloud.discoveryengine.v1beta.IImportDocumentsResponse): google.cloud.discoveryengine.v1beta.ImportDocumentsResponse; + public static create(properties?: google.cloud.discoveryengine.v1beta.IImportUserEventsResponse): google.cloud.discoveryengine.v1beta.ImportUserEventsResponse; /** - * Encodes the specified ImportDocumentsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsResponse.verify|verify} messages. - * @param message ImportDocumentsResponse message or plain object to encode + * Encodes the specified ImportUserEventsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsResponse.verify|verify} messages. + * @param message ImportUserEventsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1beta.IImportDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1beta.IImportUserEventsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImportDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsResponse.verify|verify} messages. - * @param message ImportDocumentsResponse message or plain object to encode + * Encodes the specified ImportUserEventsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsResponse.verify|verify} messages. + * @param message ImportUserEventsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IImportDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IImportUserEventsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImportDocumentsResponse message from the specified reader or buffer. + * Decodes an ImportUserEventsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImportDocumentsResponse + * @returns ImportUserEventsResponse * @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.discoveryengine.v1beta.ImportDocumentsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1beta.ImportUserEventsResponse; /** - * Decodes an ImportDocumentsResponse message from the specified reader or buffer, length delimited. + * Decodes an ImportUserEventsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImportDocumentsResponse + * @returns ImportUserEventsResponse * @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.discoveryengine.v1beta.ImportDocumentsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1beta.ImportUserEventsResponse; /** - * Verifies an ImportDocumentsResponse message. + * Verifies an ImportUserEventsResponse 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 ImportDocumentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ImportUserEventsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImportDocumentsResponse + * @returns ImportUserEventsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ImportDocumentsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ImportUserEventsResponse; /** - * Creates a plain object from an ImportDocumentsResponse message. Also converts values to other types if specified. - * @param message ImportDocumentsResponse + * Creates a plain object from an ImportUserEventsResponse message. Also converts values to other types if specified. + * @param message ImportUserEventsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1beta.ImportDocumentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1beta.ImportUserEventsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImportDocumentsResponse to JSON. + * Converts this ImportUserEventsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ImportDocumentsResponse + * Gets the default type url for ImportUserEventsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a UserEvent. */ - interface IUserEvent { + /** Properties of an ImportUserEventsMetadata. */ + interface IImportUserEventsMetadata { - /** UserEvent eventType */ - eventType?: (string|null); + /** ImportUserEventsMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** UserEvent userPseudoId */ - userPseudoId?: (string|null); + /** ImportUserEventsMetadata updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** UserEvent eventTime */ - eventTime?: (google.protobuf.ITimestamp|null); - - /** UserEvent userInfo */ - userInfo?: (google.cloud.discoveryengine.v1beta.IUserInfo|null); - - /** UserEvent directUserRequest */ - directUserRequest?: (boolean|null); - - /** UserEvent sessionId */ - sessionId?: (string|null); - - /** UserEvent pageInfo */ - pageInfo?: (google.cloud.discoveryengine.v1beta.IPageInfo|null); - - /** UserEvent attributionToken */ - attributionToken?: (string|null); - - /** UserEvent filter */ - filter?: (string|null); - - /** UserEvent documents */ - documents?: (google.cloud.discoveryengine.v1beta.IDocumentInfo[]|null); - - /** UserEvent panel */ - panel?: (google.cloud.discoveryengine.v1beta.IPanelInfo|null); - - /** UserEvent searchInfo */ - searchInfo?: (google.cloud.discoveryengine.v1beta.ISearchInfo|null); - - /** UserEvent completionInfo */ - completionInfo?: (google.cloud.discoveryengine.v1beta.ICompletionInfo|null); - - /** UserEvent transactionInfo */ - transactionInfo?: (google.cloud.discoveryengine.v1beta.ITransactionInfo|null); - - /** UserEvent tagIds */ - tagIds?: (string[]|null); - - /** UserEvent promotionIds */ - promotionIds?: (string[]|null); - - /** UserEvent attributes */ - attributes?: ({ [k: string]: google.cloud.discoveryengine.v1beta.ICustomAttribute }|null); + /** ImportUserEventsMetadata successCount */ + successCount?: (number|Long|string|null); - /** UserEvent mediaInfo */ - mediaInfo?: (google.cloud.discoveryengine.v1beta.IMediaInfo|null); + /** ImportUserEventsMetadata failureCount */ + failureCount?: (number|Long|string|null); } - /** Represents a UserEvent. */ - class UserEvent implements IUserEvent { + /** Represents an ImportUserEventsMetadata. */ + class ImportUserEventsMetadata implements IImportUserEventsMetadata { /** - * Constructs a new UserEvent. + * Constructs a new ImportUserEventsMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1beta.IUserEvent); - - /** UserEvent eventType. */ - public eventType: string; - - /** UserEvent userPseudoId. */ - public userPseudoId: string; - - /** UserEvent eventTime. */ - public eventTime?: (google.protobuf.ITimestamp|null); - - /** UserEvent userInfo. */ - public userInfo?: (google.cloud.discoveryengine.v1beta.IUserInfo|null); - - /** UserEvent directUserRequest. */ - public directUserRequest: boolean; - - /** UserEvent sessionId. */ - public sessionId: string; - - /** UserEvent pageInfo. */ - public pageInfo?: (google.cloud.discoveryengine.v1beta.IPageInfo|null); - - /** UserEvent attributionToken. */ - public attributionToken: string; - - /** UserEvent filter. */ - public filter: string; - - /** UserEvent documents. */ - public documents: google.cloud.discoveryengine.v1beta.IDocumentInfo[]; - - /** UserEvent panel. */ - public panel?: (google.cloud.discoveryengine.v1beta.IPanelInfo|null); - - /** UserEvent searchInfo. */ - public searchInfo?: (google.cloud.discoveryengine.v1beta.ISearchInfo|null); - - /** UserEvent completionInfo. */ - public completionInfo?: (google.cloud.discoveryengine.v1beta.ICompletionInfo|null); - - /** UserEvent transactionInfo. */ - public transactionInfo?: (google.cloud.discoveryengine.v1beta.ITransactionInfo|null); + constructor(properties?: google.cloud.discoveryengine.v1beta.IImportUserEventsMetadata); - /** UserEvent tagIds. */ - public tagIds: string[]; + /** ImportUserEventsMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** UserEvent promotionIds. */ - public promotionIds: string[]; + /** ImportUserEventsMetadata updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** UserEvent attributes. */ - public attributes: { [k: string]: google.cloud.discoveryengine.v1beta.ICustomAttribute }; + /** ImportUserEventsMetadata successCount. */ + public successCount: (number|Long|string); - /** UserEvent mediaInfo. */ - public mediaInfo?: (google.cloud.discoveryengine.v1beta.IMediaInfo|null); + /** ImportUserEventsMetadata failureCount. */ + public failureCount: (number|Long|string); /** - * Creates a new UserEvent instance using the specified properties. + * Creates a new ImportUserEventsMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns UserEvent instance + * @returns ImportUserEventsMetadata instance */ - public static create(properties?: google.cloud.discoveryengine.v1beta.IUserEvent): google.cloud.discoveryengine.v1beta.UserEvent; + public static create(properties?: google.cloud.discoveryengine.v1beta.IImportUserEventsMetadata): google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata; /** - * Encodes the specified UserEvent message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UserEvent.verify|verify} messages. - * @param message UserEvent message or plain object to encode + * Encodes the specified ImportUserEventsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata.verify|verify} messages. + * @param message ImportUserEventsMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1beta.IUserEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1beta.IImportUserEventsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UserEvent message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UserEvent.verify|verify} messages. - * @param message UserEvent message or plain object to encode + * Encodes the specified ImportUserEventsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata.verify|verify} messages. + * @param message ImportUserEventsMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IUserEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IImportUserEventsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a UserEvent message from the specified reader or buffer. + * Decodes an ImportUserEventsMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UserEvent + * @returns ImportUserEventsMetadata * @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.discoveryengine.v1beta.UserEvent; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata; /** - * Decodes a UserEvent message from the specified reader or buffer, length delimited. + * Decodes an ImportUserEventsMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UserEvent + * @returns ImportUserEventsMetadata * @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.discoveryengine.v1beta.UserEvent; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata; /** - * Verifies a UserEvent message. + * Verifies an ImportUserEventsMetadata 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 UserEvent message from a plain object. Also converts values to their respective internal types. + * Creates an ImportUserEventsMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UserEvent + * @returns ImportUserEventsMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.UserEvent; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata; /** - * Creates a plain object from a UserEvent message. Also converts values to other types if specified. - * @param message UserEvent + * Creates a plain object from an ImportUserEventsMetadata message. Also converts values to other types if specified. + * @param message ImportUserEventsMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1beta.UserEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UserEvent to JSON. + * Converts this ImportUserEventsMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UserEvent + * Gets the default type url for ImportUserEventsMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PageInfo. */ - interface IPageInfo { + /** Properties of an ImportDocumentsMetadata. */ + interface IImportDocumentsMetadata { - /** PageInfo pageviewId */ - pageviewId?: (string|null); + /** ImportDocumentsMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** PageInfo pageCategory */ - pageCategory?: (string|null); + /** ImportDocumentsMetadata updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** PageInfo uri */ - uri?: (string|null); + /** ImportDocumentsMetadata successCount */ + successCount?: (number|Long|string|null); - /** PageInfo referrerUri */ - referrerUri?: (string|null); + /** ImportDocumentsMetadata failureCount */ + failureCount?: (number|Long|string|null); } - /** Represents a PageInfo. */ - class PageInfo implements IPageInfo { + /** Represents an ImportDocumentsMetadata. */ + class ImportDocumentsMetadata implements IImportDocumentsMetadata { /** - * Constructs a new PageInfo. + * Constructs a new ImportDocumentsMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1beta.IPageInfo); + constructor(properties?: google.cloud.discoveryengine.v1beta.IImportDocumentsMetadata); - /** PageInfo pageviewId. */ - public pageviewId: string; + /** ImportDocumentsMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** PageInfo pageCategory. */ - public pageCategory: string; + /** ImportDocumentsMetadata updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** PageInfo uri. */ - public uri: string; + /** ImportDocumentsMetadata successCount. */ + public successCount: (number|Long|string); - /** PageInfo referrerUri. */ - public referrerUri: string; + /** ImportDocumentsMetadata failureCount. */ + public failureCount: (number|Long|string); /** - * Creates a new PageInfo instance using the specified properties. + * Creates a new ImportDocumentsMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns PageInfo instance + * @returns ImportDocumentsMetadata instance */ - public static create(properties?: google.cloud.discoveryengine.v1beta.IPageInfo): google.cloud.discoveryengine.v1beta.PageInfo; + public static create(properties?: google.cloud.discoveryengine.v1beta.IImportDocumentsMetadata): google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata; /** - * Encodes the specified PageInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PageInfo.verify|verify} messages. - * @param message PageInfo message or plain object to encode + * Encodes the specified ImportDocumentsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata.verify|verify} messages. + * @param message ImportDocumentsMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1beta.IPageInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1beta.IImportDocumentsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PageInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PageInfo.verify|verify} messages. - * @param message PageInfo message or plain object to encode + * Encodes the specified ImportDocumentsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata.verify|verify} messages. + * @param message ImportDocumentsMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IPageInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IImportDocumentsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PageInfo message from the specified reader or buffer. + * Decodes an ImportDocumentsMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PageInfo + * @returns ImportDocumentsMetadata * @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.discoveryengine.v1beta.PageInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata; /** - * Decodes a PageInfo message from the specified reader or buffer, length delimited. + * Decodes an ImportDocumentsMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PageInfo + * @returns ImportDocumentsMetadata * @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.discoveryengine.v1beta.PageInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata; /** - * Verifies a PageInfo message. + * Verifies an ImportDocumentsMetadata 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 PageInfo message from a plain object. Also converts values to their respective internal types. + * Creates an ImportDocumentsMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PageInfo + * @returns ImportDocumentsMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.PageInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata; /** - * Creates a plain object from a PageInfo message. Also converts values to other types if specified. - * @param message PageInfo + * Creates a plain object from an ImportDocumentsMetadata message. Also converts values to other types if specified. + * @param message ImportDocumentsMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1beta.PageInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PageInfo to JSON. + * Converts this ImportDocumentsMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PageInfo + * Gets the default type url for ImportDocumentsMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SearchInfo. */ - interface ISearchInfo { + /** Properties of an ImportDocumentsRequest. */ + interface IImportDocumentsRequest { - /** SearchInfo searchQuery */ - searchQuery?: (string|null); + /** ImportDocumentsRequest inlineSource */ + inlineSource?: (google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource|null); - /** SearchInfo orderBy */ - orderBy?: (string|null); + /** ImportDocumentsRequest gcsSource */ + gcsSource?: (google.cloud.discoveryengine.v1beta.IGcsSource|null); - /** SearchInfo offset */ - offset?: (number|null); + /** ImportDocumentsRequest bigquerySource */ + bigquerySource?: (google.cloud.discoveryengine.v1beta.IBigQuerySource|null); + + /** ImportDocumentsRequest parent */ + parent?: (string|null); + + /** ImportDocumentsRequest errorConfig */ + errorConfig?: (google.cloud.discoveryengine.v1beta.IImportErrorConfig|null); + + /** ImportDocumentsRequest reconciliationMode */ + reconciliationMode?: (google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode|keyof typeof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode|null); } - /** Represents a SearchInfo. */ - class SearchInfo implements ISearchInfo { + /** Represents an ImportDocumentsRequest. */ + class ImportDocumentsRequest implements IImportDocumentsRequest { /** - * Constructs a new SearchInfo. + * Constructs a new ImportDocumentsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1beta.ISearchInfo); + constructor(properties?: google.cloud.discoveryengine.v1beta.IImportDocumentsRequest); - /** SearchInfo searchQuery. */ - public searchQuery: string; + /** ImportDocumentsRequest inlineSource. */ + public inlineSource?: (google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource|null); - /** SearchInfo orderBy. */ - public orderBy: string; + /** ImportDocumentsRequest gcsSource. */ + public gcsSource?: (google.cloud.discoveryengine.v1beta.IGcsSource|null); - /** SearchInfo offset. */ - public offset?: (number|null); + /** ImportDocumentsRequest bigquerySource. */ + public bigquerySource?: (google.cloud.discoveryengine.v1beta.IBigQuerySource|null); - /** SearchInfo _offset. */ - public _offset?: "offset"; + /** ImportDocumentsRequest parent. */ + public parent: string; + + /** ImportDocumentsRequest errorConfig. */ + public errorConfig?: (google.cloud.discoveryengine.v1beta.IImportErrorConfig|null); + + /** ImportDocumentsRequest reconciliationMode. */ + public reconciliationMode: (google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode|keyof typeof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode); + + /** ImportDocumentsRequest source. */ + public source?: ("inlineSource"|"gcsSource"|"bigquerySource"); /** - * Creates a new SearchInfo instance using the specified properties. + * Creates a new ImportDocumentsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SearchInfo instance + * @returns ImportDocumentsRequest instance */ - public static create(properties?: google.cloud.discoveryengine.v1beta.ISearchInfo): google.cloud.discoveryengine.v1beta.SearchInfo; + public static create(properties?: google.cloud.discoveryengine.v1beta.IImportDocumentsRequest): google.cloud.discoveryengine.v1beta.ImportDocumentsRequest; /** - * Encodes the specified SearchInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchInfo.verify|verify} messages. - * @param message SearchInfo message or plain object to encode + * Encodes the specified ImportDocumentsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.verify|verify} messages. + * @param message ImportDocumentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1beta.ISearchInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1beta.IImportDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SearchInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchInfo.verify|verify} messages. - * @param message SearchInfo message or plain object to encode + * Encodes the specified ImportDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.verify|verify} messages. + * @param message ImportDocumentsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.ISearchInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IImportDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SearchInfo message from the specified reader or buffer. + * Decodes an ImportDocumentsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SearchInfo + * @returns ImportDocumentsRequest * @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.discoveryengine.v1beta.SearchInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1beta.ImportDocumentsRequest; /** - * Decodes a SearchInfo message from the specified reader or buffer, length delimited. + * Decodes an ImportDocumentsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SearchInfo + * @returns ImportDocumentsRequest * @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.discoveryengine.v1beta.SearchInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1beta.ImportDocumentsRequest; /** - * Verifies a SearchInfo message. + * Verifies an ImportDocumentsRequest 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 SearchInfo message from a plain object. Also converts values to their respective internal types. + * Creates an ImportDocumentsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SearchInfo + * @returns ImportDocumentsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.SearchInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ImportDocumentsRequest; /** - * Creates a plain object from a SearchInfo message. Also converts values to other types if specified. - * @param message SearchInfo + * Creates a plain object from an ImportDocumentsRequest message. Also converts values to other types if specified. + * @param message ImportDocumentsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1beta.SearchInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1beta.ImportDocumentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SearchInfo to JSON. + * Converts this ImportDocumentsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SearchInfo + * Gets the default type url for ImportDocumentsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CompletionInfo. */ - interface ICompletionInfo { + namespace ImportDocumentsRequest { - /** CompletionInfo selectedSuggestion */ - selectedSuggestion?: (string|null); + /** Properties of an InlineSource. */ + interface IInlineSource { - /** CompletionInfo selectedPosition */ - selectedPosition?: (number|null); + /** InlineSource documents */ + documents?: (google.cloud.discoveryengine.v1beta.IDocument[]|null); + } + + /** Represents an InlineSource. */ + class InlineSource implements IInlineSource { + + /** + * Constructs a new InlineSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource); + + /** InlineSource documents. */ + public documents: google.cloud.discoveryengine.v1beta.IDocument[]; + + /** + * Creates a new InlineSource instance using the specified properties. + * @param [properties] Properties to set + * @returns InlineSource instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource): google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource; + + /** + * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.verify|verify} messages. + * @param message InlineSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.verify|verify} messages. + * @param message InlineSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InlineSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InlineSource + * @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.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource; + + /** + * Decodes an InlineSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InlineSource + * @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.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource; + + /** + * Verifies an InlineSource 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 InlineSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InlineSource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource; + + /** + * Creates a plain object from an InlineSource message. Also converts values to other types if specified. + * @param message InlineSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InlineSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InlineSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** ReconciliationMode enum. */ + enum ReconciliationMode { + RECONCILIATION_MODE_UNSPECIFIED = 0, + INCREMENTAL = 1, + FULL = 2 + } } - /** Represents a CompletionInfo. */ - class CompletionInfo implements ICompletionInfo { + /** Properties of an ImportDocumentsResponse. */ + interface IImportDocumentsResponse { + + /** ImportDocumentsResponse errorSamples */ + errorSamples?: (google.rpc.IStatus[]|null); + + /** ImportDocumentsResponse errorConfig */ + errorConfig?: (google.cloud.discoveryengine.v1beta.IImportErrorConfig|null); + } + + /** Represents an ImportDocumentsResponse. */ + class ImportDocumentsResponse implements IImportDocumentsResponse { /** - * Constructs a new CompletionInfo. + * Constructs a new ImportDocumentsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1beta.ICompletionInfo); + constructor(properties?: google.cloud.discoveryengine.v1beta.IImportDocumentsResponse); - /** CompletionInfo selectedSuggestion. */ - public selectedSuggestion: string; + /** ImportDocumentsResponse errorSamples. */ + public errorSamples: google.rpc.IStatus[]; - /** CompletionInfo selectedPosition. */ - public selectedPosition: number; + /** ImportDocumentsResponse errorConfig. */ + public errorConfig?: (google.cloud.discoveryengine.v1beta.IImportErrorConfig|null); /** - * Creates a new CompletionInfo instance using the specified properties. + * Creates a new ImportDocumentsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns CompletionInfo instance + * @returns ImportDocumentsResponse instance */ - public static create(properties?: google.cloud.discoveryengine.v1beta.ICompletionInfo): google.cloud.discoveryengine.v1beta.CompletionInfo; + public static create(properties?: google.cloud.discoveryengine.v1beta.IImportDocumentsResponse): google.cloud.discoveryengine.v1beta.ImportDocumentsResponse; /** - * Encodes the specified CompletionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CompletionInfo.verify|verify} messages. - * @param message CompletionInfo message or plain object to encode + * Encodes the specified ImportDocumentsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsResponse.verify|verify} messages. + * @param message ImportDocumentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1beta.ICompletionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1beta.IImportDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CompletionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CompletionInfo.verify|verify} messages. - * @param message CompletionInfo message or plain object to encode + * Encodes the specified ImportDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsResponse.verify|verify} messages. + * @param message ImportDocumentsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.ICompletionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IImportDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CompletionInfo message from the specified reader or buffer. + * Decodes an ImportDocumentsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CompletionInfo + * @returns ImportDocumentsResponse * @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.discoveryengine.v1beta.CompletionInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1beta.ImportDocumentsResponse; /** - * Decodes a CompletionInfo message from the specified reader or buffer, length delimited. + * Decodes an ImportDocumentsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CompletionInfo + * @returns ImportDocumentsResponse * @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.discoveryengine.v1beta.CompletionInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1beta.ImportDocumentsResponse; /** - * Verifies a CompletionInfo message. + * Verifies an ImportDocumentsResponse 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 CompletionInfo message from a plain object. Also converts values to their respective internal types. + * Creates an ImportDocumentsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CompletionInfo + * @returns ImportDocumentsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.CompletionInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ImportDocumentsResponse; /** - * Creates a plain object from a CompletionInfo message. Also converts values to other types if specified. - * @param message CompletionInfo + * Creates a plain object from an ImportDocumentsResponse message. Also converts values to other types if specified. + * @param message ImportDocumentsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1beta.CompletionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1beta.ImportDocumentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CompletionInfo to JSON. + * Converts this ImportDocumentsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CompletionInfo + * Gets the default type url for ImportDocumentsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a TransactionInfo. */ - interface ITransactionInfo { + /** Properties of a UserEvent. */ + interface IUserEvent { - /** TransactionInfo value */ - value?: (number|null); + /** UserEvent eventType */ + eventType?: (string|null); - /** TransactionInfo currency */ - currency?: (string|null); + /** UserEvent userPseudoId */ + userPseudoId?: (string|null); - /** TransactionInfo transactionId */ - transactionId?: (string|null); + /** UserEvent eventTime */ + eventTime?: (google.protobuf.ITimestamp|null); - /** TransactionInfo tax */ - tax?: (number|null); + /** UserEvent userInfo */ + userInfo?: (google.cloud.discoveryengine.v1beta.IUserInfo|null); - /** TransactionInfo cost */ - cost?: (number|null); + /** UserEvent directUserRequest */ + directUserRequest?: (boolean|null); - /** TransactionInfo discountValue */ - discountValue?: (number|null); + /** UserEvent sessionId */ + sessionId?: (string|null); + + /** UserEvent pageInfo */ + pageInfo?: (google.cloud.discoveryengine.v1beta.IPageInfo|null); + + /** UserEvent attributionToken */ + attributionToken?: (string|null); + + /** UserEvent filter */ + filter?: (string|null); + + /** UserEvent documents */ + documents?: (google.cloud.discoveryengine.v1beta.IDocumentInfo[]|null); + + /** UserEvent panel */ + panel?: (google.cloud.discoveryengine.v1beta.IPanelInfo|null); + + /** UserEvent searchInfo */ + searchInfo?: (google.cloud.discoveryengine.v1beta.ISearchInfo|null); + + /** UserEvent completionInfo */ + completionInfo?: (google.cloud.discoveryengine.v1beta.ICompletionInfo|null); + + /** UserEvent transactionInfo */ + transactionInfo?: (google.cloud.discoveryengine.v1beta.ITransactionInfo|null); + + /** UserEvent tagIds */ + tagIds?: (string[]|null); + + /** UserEvent promotionIds */ + promotionIds?: (string[]|null); + + /** UserEvent attributes */ + attributes?: ({ [k: string]: google.cloud.discoveryengine.v1beta.ICustomAttribute }|null); + + /** UserEvent mediaInfo */ + mediaInfo?: (google.cloud.discoveryengine.v1beta.IMediaInfo|null); } - /** Represents a TransactionInfo. */ - class TransactionInfo implements ITransactionInfo { + /** Represents a UserEvent. */ + class UserEvent implements IUserEvent { /** - * Constructs a new TransactionInfo. + * Constructs a new UserEvent. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1beta.ITransactionInfo); + constructor(properties?: google.cloud.discoveryengine.v1beta.IUserEvent); - /** TransactionInfo value. */ - public value?: (number|null); + /** UserEvent eventType. */ + public eventType: string; - /** TransactionInfo currency. */ - public currency: string; + /** UserEvent userPseudoId. */ + public userPseudoId: string; - /** TransactionInfo transactionId. */ - public transactionId: string; + /** UserEvent eventTime. */ + public eventTime?: (google.protobuf.ITimestamp|null); - /** TransactionInfo tax. */ - public tax?: (number|null); + /** UserEvent userInfo. */ + public userInfo?: (google.cloud.discoveryengine.v1beta.IUserInfo|null); - /** TransactionInfo cost. */ - public cost?: (number|null); + /** UserEvent directUserRequest. */ + public directUserRequest: boolean; - /** TransactionInfo discountValue. */ - public discountValue?: (number|null); + /** UserEvent sessionId. */ + public sessionId: string; - /** TransactionInfo _value. */ - public _value?: "value"; + /** UserEvent pageInfo. */ + public pageInfo?: (google.cloud.discoveryengine.v1beta.IPageInfo|null); - /** TransactionInfo _tax. */ - public _tax?: "tax"; + /** UserEvent attributionToken. */ + public attributionToken: string; - /** TransactionInfo _cost. */ - public _cost?: "cost"; + /** UserEvent filter. */ + public filter: string; - /** TransactionInfo _discountValue. */ - public _discountValue?: "discountValue"; + /** UserEvent documents. */ + public documents: google.cloud.discoveryengine.v1beta.IDocumentInfo[]; + + /** UserEvent panel. */ + public panel?: (google.cloud.discoveryengine.v1beta.IPanelInfo|null); + + /** UserEvent searchInfo. */ + public searchInfo?: (google.cloud.discoveryengine.v1beta.ISearchInfo|null); + + /** UserEvent completionInfo. */ + public completionInfo?: (google.cloud.discoveryengine.v1beta.ICompletionInfo|null); + + /** UserEvent transactionInfo. */ + public transactionInfo?: (google.cloud.discoveryengine.v1beta.ITransactionInfo|null); + + /** UserEvent tagIds. */ + public tagIds: string[]; + + /** UserEvent promotionIds. */ + public promotionIds: string[]; + + /** UserEvent attributes. */ + public attributes: { [k: string]: google.cloud.discoveryengine.v1beta.ICustomAttribute }; + + /** UserEvent mediaInfo. */ + public mediaInfo?: (google.cloud.discoveryengine.v1beta.IMediaInfo|null); /** - * Creates a new TransactionInfo instance using the specified properties. + * Creates a new UserEvent instance using the specified properties. * @param [properties] Properties to set - * @returns TransactionInfo instance + * @returns UserEvent instance */ - public static create(properties?: google.cloud.discoveryengine.v1beta.ITransactionInfo): google.cloud.discoveryengine.v1beta.TransactionInfo; + public static create(properties?: google.cloud.discoveryengine.v1beta.IUserEvent): google.cloud.discoveryengine.v1beta.UserEvent; /** - * Encodes the specified TransactionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.TransactionInfo.verify|verify} messages. - * @param message TransactionInfo message or plain object to encode + * Encodes the specified UserEvent message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UserEvent.verify|verify} messages. + * @param message UserEvent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1beta.ITransactionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1beta.IUserEvent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TransactionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.TransactionInfo.verify|verify} messages. - * @param message TransactionInfo message or plain object to encode + * Encodes the specified UserEvent message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UserEvent.verify|verify} messages. + * @param message UserEvent message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.ITransactionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IUserEvent, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TransactionInfo message from the specified reader or buffer. + * Decodes a UserEvent message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TransactionInfo + * @returns UserEvent * @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.discoveryengine.v1beta.TransactionInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1beta.UserEvent; /** - * Decodes a TransactionInfo message from the specified reader or buffer, length delimited. + * Decodes a UserEvent message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TransactionInfo + * @returns UserEvent * @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.discoveryengine.v1beta.TransactionInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1beta.UserEvent; /** - * Verifies a TransactionInfo message. + * Verifies a UserEvent 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 TransactionInfo message from a plain object. Also converts values to their respective internal types. + * Creates a UserEvent message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TransactionInfo + * @returns UserEvent */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.TransactionInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.UserEvent; /** - * Creates a plain object from a TransactionInfo message. Also converts values to other types if specified. - * @param message TransactionInfo + * Creates a plain object from a UserEvent message. Also converts values to other types if specified. + * @param message UserEvent * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1beta.TransactionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1beta.UserEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TransactionInfo to JSON. + * Converts this UserEvent to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for TransactionInfo + * Gets the default type url for UserEvent * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DocumentInfo. */ - interface IDocumentInfo { + /** Properties of a PageInfo. */ + interface IPageInfo { - /** DocumentInfo id */ - id?: (string|null); + /** PageInfo pageviewId */ + pageviewId?: (string|null); - /** DocumentInfo name */ - name?: (string|null); + /** PageInfo pageCategory */ + pageCategory?: (string|null); - /** DocumentInfo quantity */ - quantity?: (number|null); + /** PageInfo uri */ + uri?: (string|null); - /** DocumentInfo promotionIds */ - promotionIds?: (string[]|null); + /** PageInfo referrerUri */ + referrerUri?: (string|null); } - /** Represents a DocumentInfo. */ - class DocumentInfo implements IDocumentInfo { + /** Represents a PageInfo. */ + class PageInfo implements IPageInfo { /** - * Constructs a new DocumentInfo. + * Constructs a new PageInfo. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1beta.IDocumentInfo); + constructor(properties?: google.cloud.discoveryengine.v1beta.IPageInfo); - /** DocumentInfo id. */ - public id?: (string|null); + /** PageInfo pageviewId. */ + public pageviewId: string; - /** DocumentInfo name. */ - public name?: (string|null); + /** PageInfo pageCategory. */ + public pageCategory: string; - /** DocumentInfo quantity. */ - public quantity?: (number|null); + /** PageInfo uri. */ + public uri: string; - /** DocumentInfo promotionIds. */ - public promotionIds: string[]; - - /** DocumentInfo documentDescriptor. */ - public documentDescriptor?: ("id"|"name"); - - /** DocumentInfo _quantity. */ - public _quantity?: "quantity"; + /** PageInfo referrerUri. */ + public referrerUri: string; /** - * Creates a new DocumentInfo instance using the specified properties. + * Creates a new PageInfo instance using the specified properties. * @param [properties] Properties to set - * @returns DocumentInfo instance + * @returns PageInfo instance */ - public static create(properties?: google.cloud.discoveryengine.v1beta.IDocumentInfo): google.cloud.discoveryengine.v1beta.DocumentInfo; + public static create(properties?: google.cloud.discoveryengine.v1beta.IPageInfo): google.cloud.discoveryengine.v1beta.PageInfo; /** - * Encodes the specified DocumentInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.DocumentInfo.verify|verify} messages. - * @param message DocumentInfo message or plain object to encode + * Encodes the specified PageInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PageInfo.verify|verify} messages. + * @param message PageInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1beta.IDocumentInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1beta.IPageInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DocumentInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.DocumentInfo.verify|verify} messages. - * @param message DocumentInfo message or plain object to encode + * Encodes the specified PageInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PageInfo.verify|verify} messages. + * @param message PageInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IDocumentInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IPageInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DocumentInfo message from the specified reader or buffer. + * Decodes a PageInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DocumentInfo + * @returns PageInfo * @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.discoveryengine.v1beta.DocumentInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1beta.PageInfo; /** - * Decodes a DocumentInfo message from the specified reader or buffer, length delimited. + * Decodes a PageInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DocumentInfo + * @returns PageInfo * @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.discoveryengine.v1beta.DocumentInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1beta.PageInfo; /** - * Verifies a DocumentInfo message. + * Verifies a PageInfo 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 DocumentInfo message from a plain object. Also converts values to their respective internal types. + * Creates a PageInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DocumentInfo + * @returns PageInfo */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.DocumentInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.PageInfo; /** - * Creates a plain object from a DocumentInfo message. Also converts values to other types if specified. - * @param message DocumentInfo + * Creates a plain object from a PageInfo message. Also converts values to other types if specified. + * @param message PageInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1beta.DocumentInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1beta.PageInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DocumentInfo to JSON. + * Converts this PageInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DocumentInfo + * Gets the default type url for PageInfo * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PanelInfo. */ - interface IPanelInfo { - - /** PanelInfo panelId */ - panelId?: (string|null); + /** Properties of a SearchInfo. */ + interface ISearchInfo { - /** PanelInfo displayName */ - displayName?: (string|null); + /** SearchInfo searchQuery */ + searchQuery?: (string|null); - /** PanelInfo panelPosition */ - panelPosition?: (number|null); + /** SearchInfo orderBy */ + orderBy?: (string|null); - /** PanelInfo totalPanels */ - totalPanels?: (number|null); + /** SearchInfo offset */ + offset?: (number|null); } - /** Represents a PanelInfo. */ - class PanelInfo implements IPanelInfo { + /** Represents a SearchInfo. */ + class SearchInfo implements ISearchInfo { /** - * Constructs a new PanelInfo. + * Constructs a new SearchInfo. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1beta.IPanelInfo); + constructor(properties?: google.cloud.discoveryengine.v1beta.ISearchInfo); - /** PanelInfo panelId. */ - public panelId: string; + /** SearchInfo searchQuery. */ + public searchQuery: string; - /** PanelInfo displayName. */ - public displayName: string; + /** SearchInfo orderBy. */ + public orderBy: string; - /** PanelInfo panelPosition. */ - public panelPosition?: (number|null); + /** SearchInfo offset. */ + public offset?: (number|null); - /** PanelInfo totalPanels. */ - public totalPanels?: (number|null); + /** SearchInfo _offset. */ + public _offset?: "offset"; - /** PanelInfo _panelPosition. */ - public _panelPosition?: "panelPosition"; + /** + * Creates a new SearchInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchInfo instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.ISearchInfo): google.cloud.discoveryengine.v1beta.SearchInfo; - /** PanelInfo _totalPanels. */ - public _totalPanels?: "totalPanels"; + /** + * Encodes the specified SearchInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchInfo.verify|verify} messages. + * @param message SearchInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.ISearchInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Creates a new PanelInfo instance using the specified properties. + * Encodes the specified SearchInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchInfo.verify|verify} messages. + * @param message SearchInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.ISearchInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchInfo + * @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.discoveryengine.v1beta.SearchInfo; + + /** + * Decodes a SearchInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchInfo + * @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.discoveryengine.v1beta.SearchInfo; + + /** + * Verifies a SearchInfo 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 SearchInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.SearchInfo; + + /** + * Creates a plain object from a SearchInfo message. Also converts values to other types if specified. + * @param message SearchInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.SearchInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CompletionInfo. */ + interface ICompletionInfo { + + /** CompletionInfo selectedSuggestion */ + selectedSuggestion?: (string|null); + + /** CompletionInfo selectedPosition */ + selectedPosition?: (number|null); + } + + /** Represents a CompletionInfo. */ + class CompletionInfo implements ICompletionInfo { + + /** + * Constructs a new CompletionInfo. * @param [properties] Properties to set - * @returns PanelInfo instance */ - public static create(properties?: google.cloud.discoveryengine.v1beta.IPanelInfo): google.cloud.discoveryengine.v1beta.PanelInfo; + constructor(properties?: google.cloud.discoveryengine.v1beta.ICompletionInfo); + + /** CompletionInfo selectedSuggestion. */ + public selectedSuggestion: string; + + /** CompletionInfo selectedPosition. */ + public selectedPosition: number; /** - * Encodes the specified PanelInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PanelInfo.verify|verify} messages. - * @param message PanelInfo message or plain object to encode + * Creates a new CompletionInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns CompletionInfo instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.ICompletionInfo): google.cloud.discoveryengine.v1beta.CompletionInfo; + + /** + * Encodes the specified CompletionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CompletionInfo.verify|verify} messages. + * @param message CompletionInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1beta.IPanelInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1beta.ICompletionInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PanelInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PanelInfo.verify|verify} messages. - * @param message PanelInfo message or plain object to encode + * Encodes the specified CompletionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CompletionInfo.verify|verify} messages. + * @param message CompletionInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IPanelInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.ICompletionInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PanelInfo message from the specified reader or buffer. + * Decodes a CompletionInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PanelInfo + * @returns CompletionInfo * @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.discoveryengine.v1beta.PanelInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1beta.CompletionInfo; /** - * Decodes a PanelInfo message from the specified reader or buffer, length delimited. + * Decodes a CompletionInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PanelInfo + * @returns CompletionInfo * @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.discoveryengine.v1beta.PanelInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1beta.CompletionInfo; /** - * Verifies a PanelInfo message. + * Verifies a CompletionInfo 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 PanelInfo message from a plain object. Also converts values to their respective internal types. + * Creates a CompletionInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PanelInfo + * @returns CompletionInfo */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.PanelInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.CompletionInfo; /** - * Creates a plain object from a PanelInfo message. Also converts values to other types if specified. - * @param message PanelInfo + * Creates a plain object from a CompletionInfo message. Also converts values to other types if specified. + * @param message CompletionInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1beta.PanelInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1beta.CompletionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PanelInfo to JSON. + * Converts this CompletionInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PanelInfo + * Gets the default type url for CompletionInfo * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MediaInfo. */ - interface IMediaInfo { + /** Properties of a TransactionInfo. */ + interface ITransactionInfo { + + /** TransactionInfo value */ + value?: (number|null); + + /** TransactionInfo currency */ + currency?: (string|null); + + /** TransactionInfo transactionId */ + transactionId?: (string|null); + + /** TransactionInfo tax */ + tax?: (number|null); + + /** TransactionInfo cost */ + cost?: (number|null); + + /** TransactionInfo discountValue */ + discountValue?: (number|null); + } + + /** Represents a TransactionInfo. */ + class TransactionInfo implements ITransactionInfo { + + /** + * Constructs a new TransactionInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.ITransactionInfo); + + /** TransactionInfo value. */ + public value?: (number|null); + + /** TransactionInfo currency. */ + public currency: string; + + /** TransactionInfo transactionId. */ + public transactionId: string; + + /** TransactionInfo tax. */ + public tax?: (number|null); + + /** TransactionInfo cost. */ + public cost?: (number|null); + + /** TransactionInfo discountValue. */ + public discountValue?: (number|null); + + /** TransactionInfo _value. */ + public _value?: "value"; + + /** TransactionInfo _tax. */ + public _tax?: "tax"; + + /** TransactionInfo _cost. */ + public _cost?: "cost"; + + /** TransactionInfo _discountValue. */ + public _discountValue?: "discountValue"; + + /** + * Creates a new TransactionInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns TransactionInfo instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.ITransactionInfo): google.cloud.discoveryengine.v1beta.TransactionInfo; + + /** + * Encodes the specified TransactionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.TransactionInfo.verify|verify} messages. + * @param message TransactionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.ITransactionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TransactionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.TransactionInfo.verify|verify} messages. + * @param message TransactionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.ITransactionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TransactionInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TransactionInfo + * @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.discoveryengine.v1beta.TransactionInfo; + + /** + * Decodes a TransactionInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TransactionInfo + * @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.discoveryengine.v1beta.TransactionInfo; + + /** + * Verifies a TransactionInfo 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 TransactionInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TransactionInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.TransactionInfo; + + /** + * Creates a plain object from a TransactionInfo message. Also converts values to other types if specified. + * @param message TransactionInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.TransactionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TransactionInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TransactionInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DocumentInfo. */ + interface IDocumentInfo { + + /** DocumentInfo id */ + id?: (string|null); + + /** DocumentInfo name */ + name?: (string|null); + + /** DocumentInfo quantity */ + quantity?: (number|null); + + /** DocumentInfo promotionIds */ + promotionIds?: (string[]|null); + } + + /** Represents a DocumentInfo. */ + class DocumentInfo implements IDocumentInfo { + + /** + * Constructs a new DocumentInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.IDocumentInfo); + + /** DocumentInfo id. */ + public id?: (string|null); + + /** DocumentInfo name. */ + public name?: (string|null); + + /** DocumentInfo quantity. */ + public quantity?: (number|null); + + /** DocumentInfo promotionIds. */ + public promotionIds: string[]; + + /** DocumentInfo documentDescriptor. */ + public documentDescriptor?: ("id"|"name"); + + /** DocumentInfo _quantity. */ + public _quantity?: "quantity"; + + /** + * Creates a new DocumentInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns DocumentInfo instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.IDocumentInfo): google.cloud.discoveryengine.v1beta.DocumentInfo; + + /** + * Encodes the specified DocumentInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.DocumentInfo.verify|verify} messages. + * @param message DocumentInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.IDocumentInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DocumentInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.DocumentInfo.verify|verify} messages. + * @param message DocumentInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IDocumentInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DocumentInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DocumentInfo + * @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.discoveryengine.v1beta.DocumentInfo; + + /** + * Decodes a DocumentInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DocumentInfo + * @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.discoveryengine.v1beta.DocumentInfo; + + /** + * Verifies a DocumentInfo 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 DocumentInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DocumentInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.DocumentInfo; + + /** + * Creates a plain object from a DocumentInfo message. Also converts values to other types if specified. + * @param message DocumentInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.DocumentInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DocumentInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DocumentInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PanelInfo. */ + interface IPanelInfo { + + /** PanelInfo panelId */ + panelId?: (string|null); + + /** PanelInfo displayName */ + displayName?: (string|null); + + /** PanelInfo panelPosition */ + panelPosition?: (number|null); + + /** PanelInfo totalPanels */ + totalPanels?: (number|null); + } + + /** Represents a PanelInfo. */ + class PanelInfo implements IPanelInfo { + + /** + * Constructs a new PanelInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.IPanelInfo); + + /** PanelInfo panelId. */ + public panelId: string; + + /** PanelInfo displayName. */ + public displayName: string; + + /** PanelInfo panelPosition. */ + public panelPosition?: (number|null); + + /** PanelInfo totalPanels. */ + public totalPanels?: (number|null); + + /** PanelInfo _panelPosition. */ + public _panelPosition?: "panelPosition"; + + /** PanelInfo _totalPanels. */ + public _totalPanels?: "totalPanels"; + + /** + * Creates a new PanelInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns PanelInfo instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.IPanelInfo): google.cloud.discoveryengine.v1beta.PanelInfo; + + /** + * Encodes the specified PanelInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PanelInfo.verify|verify} messages. + * @param message PanelInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.IPanelInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PanelInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PanelInfo.verify|verify} messages. + * @param message PanelInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IPanelInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PanelInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PanelInfo + * @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.discoveryengine.v1beta.PanelInfo; + + /** + * Decodes a PanelInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PanelInfo + * @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.discoveryengine.v1beta.PanelInfo; + + /** + * Verifies a PanelInfo 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 PanelInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PanelInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.PanelInfo; + + /** + * Creates a plain object from a PanelInfo message. Also converts values to other types if specified. + * @param message PanelInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.PanelInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PanelInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PanelInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MediaInfo. */ + interface IMediaInfo { + + /** MediaInfo mediaProgressDuration */ + mediaProgressDuration?: (google.protobuf.IDuration|null); + + /** MediaInfo mediaProgressPercentage */ + mediaProgressPercentage?: (number|null); + } + + /** Represents a MediaInfo. */ + class MediaInfo implements IMediaInfo { + + /** + * Constructs a new MediaInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.IMediaInfo); + + /** MediaInfo mediaProgressDuration. */ + public mediaProgressDuration?: (google.protobuf.IDuration|null); + + /** MediaInfo mediaProgressPercentage. */ + public mediaProgressPercentage?: (number|null); + + /** MediaInfo _mediaProgressPercentage. */ + public _mediaProgressPercentage?: "mediaProgressPercentage"; + + /** + * Creates a new MediaInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns MediaInfo instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.IMediaInfo): google.cloud.discoveryengine.v1beta.MediaInfo; + + /** + * Encodes the specified MediaInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.MediaInfo.verify|verify} messages. + * @param message MediaInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.IMediaInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MediaInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.MediaInfo.verify|verify} messages. + * @param message MediaInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IMediaInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MediaInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MediaInfo + * @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.discoveryengine.v1beta.MediaInfo; + + /** + * Decodes a MediaInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MediaInfo + * @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.discoveryengine.v1beta.MediaInfo; + + /** + * Verifies a MediaInfo 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 MediaInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MediaInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.MediaInfo; + + /** + * Creates a plain object from a MediaInfo message. Also converts values to other types if specified. + * @param message MediaInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.MediaInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MediaInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MediaInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PurgeDocumentsRequest. */ + interface IPurgeDocumentsRequest { + + /** PurgeDocumentsRequest parent */ + parent?: (string|null); + + /** PurgeDocumentsRequest filter */ + filter?: (string|null); + + /** PurgeDocumentsRequest force */ + force?: (boolean|null); + } + + /** Represents a PurgeDocumentsRequest. */ + class PurgeDocumentsRequest implements IPurgeDocumentsRequest { + + /** + * Constructs a new PurgeDocumentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.IPurgeDocumentsRequest); + + /** PurgeDocumentsRequest parent. */ + public parent: string; + + /** PurgeDocumentsRequest filter. */ + public filter: string; + + /** PurgeDocumentsRequest force. */ + public force: boolean; + + /** + * Creates a new PurgeDocumentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns PurgeDocumentsRequest instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.IPurgeDocumentsRequest): google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest; + + /** + * Encodes the specified PurgeDocumentsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest.verify|verify} messages. + * @param message PurgeDocumentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.IPurgeDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PurgeDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest.verify|verify} messages. + * @param message PurgeDocumentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IPurgeDocumentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PurgeDocumentsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PurgeDocumentsRequest + * @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.discoveryengine.v1beta.PurgeDocumentsRequest; + + /** + * Decodes a PurgeDocumentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PurgeDocumentsRequest + * @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.discoveryengine.v1beta.PurgeDocumentsRequest; + + /** + * Verifies a PurgeDocumentsRequest 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 PurgeDocumentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PurgeDocumentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest; + + /** + * Creates a plain object from a PurgeDocumentsRequest message. Also converts values to other types if specified. + * @param message PurgeDocumentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PurgeDocumentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PurgeDocumentsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PurgeDocumentsResponse. */ + interface IPurgeDocumentsResponse { + + /** PurgeDocumentsResponse purgeCount */ + purgeCount?: (number|Long|string|null); + + /** PurgeDocumentsResponse purgeSample */ + purgeSample?: (string[]|null); + } + + /** Represents a PurgeDocumentsResponse. */ + class PurgeDocumentsResponse implements IPurgeDocumentsResponse { + + /** + * Constructs a new PurgeDocumentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.IPurgeDocumentsResponse); + + /** PurgeDocumentsResponse purgeCount. */ + public purgeCount: (number|Long|string); + + /** PurgeDocumentsResponse purgeSample. */ + public purgeSample: string[]; + + /** + * Creates a new PurgeDocumentsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns PurgeDocumentsResponse instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.IPurgeDocumentsResponse): google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse; + + /** + * Encodes the specified PurgeDocumentsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse.verify|verify} messages. + * @param message PurgeDocumentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.IPurgeDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PurgeDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse.verify|verify} messages. + * @param message PurgeDocumentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IPurgeDocumentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PurgeDocumentsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PurgeDocumentsResponse + * @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.discoveryengine.v1beta.PurgeDocumentsResponse; + + /** + * Decodes a PurgeDocumentsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PurgeDocumentsResponse + * @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.discoveryengine.v1beta.PurgeDocumentsResponse; + + /** + * Verifies a PurgeDocumentsResponse 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 PurgeDocumentsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PurgeDocumentsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse; + + /** + * Creates a plain object from a PurgeDocumentsResponse message. Also converts values to other types if specified. + * @param message PurgeDocumentsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PurgeDocumentsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PurgeDocumentsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PurgeDocumentsMetadata. */ + interface IPurgeDocumentsMetadata { + + /** PurgeDocumentsMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** PurgeDocumentsMetadata updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** PurgeDocumentsMetadata successCount */ + successCount?: (number|Long|string|null); + + /** PurgeDocumentsMetadata failureCount */ + failureCount?: (number|Long|string|null); + } + + /** Represents a PurgeDocumentsMetadata. */ + class PurgeDocumentsMetadata implements IPurgeDocumentsMetadata { + + /** + * Constructs a new PurgeDocumentsMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.IPurgeDocumentsMetadata); + + /** PurgeDocumentsMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** PurgeDocumentsMetadata updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** PurgeDocumentsMetadata successCount. */ + public successCount: (number|Long|string); + + /** PurgeDocumentsMetadata failureCount. */ + public failureCount: (number|Long|string); + + /** + * Creates a new PurgeDocumentsMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns PurgeDocumentsMetadata instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.IPurgeDocumentsMetadata): google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata; + + /** + * Encodes the specified PurgeDocumentsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata.verify|verify} messages. + * @param message PurgeDocumentsMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.IPurgeDocumentsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PurgeDocumentsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata.verify|verify} messages. + * @param message PurgeDocumentsMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IPurgeDocumentsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PurgeDocumentsMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PurgeDocumentsMetadata + * @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.discoveryengine.v1beta.PurgeDocumentsMetadata; + + /** + * Decodes a PurgeDocumentsMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PurgeDocumentsMetadata + * @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.discoveryengine.v1beta.PurgeDocumentsMetadata; + + /** + * Verifies a PurgeDocumentsMetadata 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 PurgeDocumentsMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PurgeDocumentsMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata; + + /** + * Creates a plain object from a PurgeDocumentsMetadata message. Also converts values to other types if specified. + * @param message PurgeDocumentsMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PurgeDocumentsMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PurgeDocumentsMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a RecommendationService */ + class RecommendationService extends $protobuf.rpc.Service { + + /** + * Constructs a new RecommendationService 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 RecommendationService 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): RecommendationService; + + /** + * Calls Recommend. + * @param request RecommendRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RecommendResponse + */ + public recommend(request: google.cloud.discoveryengine.v1beta.IRecommendRequest, callback: google.cloud.discoveryengine.v1beta.RecommendationService.RecommendCallback): void; + + /** + * Calls Recommend. + * @param request RecommendRequest message or plain object + * @returns Promise + */ + public recommend(request: google.cloud.discoveryengine.v1beta.IRecommendRequest): Promise; + } + + namespace RecommendationService { + + /** + * Callback as used by {@link google.cloud.discoveryengine.v1beta.RecommendationService|recommend}. + * @param error Error, if any + * @param [response] RecommendResponse + */ + type RecommendCallback = (error: (Error|null), response?: google.cloud.discoveryengine.v1beta.RecommendResponse) => void; + } + + /** Properties of a RecommendRequest. */ + interface IRecommendRequest { + + /** RecommendRequest servingConfig */ + servingConfig?: (string|null); + + /** RecommendRequest userEvent */ + userEvent?: (google.cloud.discoveryengine.v1beta.IUserEvent|null); + + /** RecommendRequest pageSize */ + pageSize?: (number|null); + + /** RecommendRequest filter */ + filter?: (string|null); + + /** RecommendRequest validateOnly */ + validateOnly?: (boolean|null); + + /** RecommendRequest params */ + params?: ({ [k: string]: google.protobuf.IValue }|null); + + /** RecommendRequest userLabels */ + userLabels?: ({ [k: string]: string }|null); + } + + /** Represents a RecommendRequest. */ + class RecommendRequest implements IRecommendRequest { + + /** + * Constructs a new RecommendRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.IRecommendRequest); + + /** RecommendRequest servingConfig. */ + public servingConfig: string; + + /** RecommendRequest userEvent. */ + public userEvent?: (google.cloud.discoveryengine.v1beta.IUserEvent|null); + + /** RecommendRequest pageSize. */ + public pageSize: number; + + /** RecommendRequest filter. */ + public filter: string; + + /** RecommendRequest validateOnly. */ + public validateOnly: boolean; + + /** RecommendRequest params. */ + public params: { [k: string]: google.protobuf.IValue }; + + /** RecommendRequest userLabels. */ + public userLabels: { [k: string]: string }; + + /** + * Creates a new RecommendRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RecommendRequest instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.IRecommendRequest): google.cloud.discoveryengine.v1beta.RecommendRequest; + + /** + * Encodes the specified RecommendRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendRequest.verify|verify} messages. + * @param message RecommendRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.IRecommendRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RecommendRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendRequest.verify|verify} messages. + * @param message RecommendRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IRecommendRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RecommendRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecommendRequest + * @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.discoveryengine.v1beta.RecommendRequest; + + /** + * Decodes a RecommendRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RecommendRequest + * @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.discoveryengine.v1beta.RecommendRequest; + + /** + * Verifies a RecommendRequest 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 RecommendRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecommendRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.RecommendRequest; + + /** + * Creates a plain object from a RecommendRequest message. Also converts values to other types if specified. + * @param message RecommendRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.RecommendRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RecommendRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RecommendRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RecommendResponse. */ + interface IRecommendResponse { + + /** RecommendResponse results */ + results?: (google.cloud.discoveryengine.v1beta.RecommendResponse.IRecommendationResult[]|null); + + /** RecommendResponse attributionToken */ + attributionToken?: (string|null); + + /** RecommendResponse missingIds */ + missingIds?: (string[]|null); + + /** RecommendResponse validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a RecommendResponse. */ + class RecommendResponse implements IRecommendResponse { + + /** + * Constructs a new RecommendResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.IRecommendResponse); + + /** RecommendResponse results. */ + public results: google.cloud.discoveryengine.v1beta.RecommendResponse.IRecommendationResult[]; + + /** RecommendResponse attributionToken. */ + public attributionToken: string; + + /** RecommendResponse missingIds. */ + public missingIds: string[]; + + /** RecommendResponse validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new RecommendResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RecommendResponse instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.IRecommendResponse): google.cloud.discoveryengine.v1beta.RecommendResponse; + + /** + * Encodes the specified RecommendResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendResponse.verify|verify} messages. + * @param message RecommendResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.IRecommendResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RecommendResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendResponse.verify|verify} messages. + * @param message RecommendResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IRecommendResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RecommendResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecommendResponse + * @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.discoveryengine.v1beta.RecommendResponse; + + /** + * Decodes a RecommendResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RecommendResponse + * @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.discoveryengine.v1beta.RecommendResponse; + + /** + * Verifies a RecommendResponse 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 RecommendResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecommendResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.RecommendResponse; + + /** + * Creates a plain object from a RecommendResponse message. Also converts values to other types if specified. + * @param message RecommendResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.RecommendResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RecommendResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RecommendResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace RecommendResponse { + + /** Properties of a RecommendationResult. */ + interface IRecommendationResult { + + /** RecommendationResult id */ + id?: (string|null); + + /** RecommendationResult document */ + document?: (google.cloud.discoveryengine.v1beta.IDocument|null); + + /** RecommendationResult metadata */ + metadata?: ({ [k: string]: google.protobuf.IValue }|null); + } + + /** Represents a RecommendationResult. */ + class RecommendationResult implements IRecommendationResult { + + /** + * Constructs a new RecommendationResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.RecommendResponse.IRecommendationResult); + + /** RecommendationResult id. */ + public id: string; + + /** RecommendationResult document. */ + public document?: (google.cloud.discoveryengine.v1beta.IDocument|null); + + /** RecommendationResult metadata. */ + public metadata: { [k: string]: google.protobuf.IValue }; + + /** + * Creates a new RecommendationResult instance using the specified properties. + * @param [properties] Properties to set + * @returns RecommendationResult instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.RecommendResponse.IRecommendationResult): google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult; + + /** + * Encodes the specified RecommendationResult message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.verify|verify} messages. + * @param message RecommendationResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.RecommendResponse.IRecommendationResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RecommendationResult message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.verify|verify} messages. + * @param message RecommendationResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.RecommendResponse.IRecommendationResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RecommendationResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecommendationResult + * @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.discoveryengine.v1beta.RecommendResponse.RecommendationResult; + + /** + * Decodes a RecommendationResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RecommendationResult + * @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.discoveryengine.v1beta.RecommendResponse.RecommendationResult; + + /** + * Verifies a RecommendationResult 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 RecommendationResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecommendationResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult; + + /** + * Creates a plain object from a RecommendationResult message. Also converts values to other types if specified. + * @param message RecommendationResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RecommendationResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RecommendationResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a Schema. */ + interface ISchema { + + /** Schema structSchema */ + structSchema?: (google.protobuf.IStruct|null); + + /** Schema jsonSchema */ + jsonSchema?: (string|null); + + /** Schema name */ + name?: (string|null); + } + + /** Represents a Schema. */ + class Schema implements ISchema { + + /** + * Constructs a new Schema. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.ISchema); + + /** Schema structSchema. */ + public structSchema?: (google.protobuf.IStruct|null); + + /** Schema jsonSchema. */ + public jsonSchema?: (string|null); + + /** Schema name. */ + public name: string; + + /** Schema schema. */ + public schema?: ("structSchema"|"jsonSchema"); + + /** + * Creates a new Schema instance using the specified properties. + * @param [properties] Properties to set + * @returns Schema instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.ISchema): google.cloud.discoveryengine.v1beta.Schema; + + /** + * Encodes the specified Schema message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.Schema.verify|verify} messages. + * @param message Schema message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.ISchema, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Schema message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.Schema.verify|verify} messages. + * @param message Schema message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.ISchema, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Schema message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Schema + * @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.discoveryengine.v1beta.Schema; + + /** + * Decodes a Schema message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Schema + * @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.discoveryengine.v1beta.Schema; + + /** + * Verifies a Schema 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 Schema message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Schema + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.Schema; + + /** + * Creates a plain object from a Schema message. Also converts values to other types if specified. + * @param message Schema + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.Schema, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Schema to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Schema + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a SchemaService */ + class SchemaService extends $protobuf.rpc.Service { + + /** + * Constructs a new SchemaService 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 SchemaService 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): SchemaService; + + /** + * Calls GetSchema. + * @param request GetSchemaRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Schema + */ + public getSchema(request: google.cloud.discoveryengine.v1beta.IGetSchemaRequest, callback: google.cloud.discoveryengine.v1beta.SchemaService.GetSchemaCallback): void; + + /** + * Calls GetSchema. + * @param request GetSchemaRequest message or plain object + * @returns Promise + */ + public getSchema(request: google.cloud.discoveryengine.v1beta.IGetSchemaRequest): Promise; + + /** + * Calls ListSchemas. + * @param request ListSchemasRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListSchemasResponse + */ + public listSchemas(request: google.cloud.discoveryengine.v1beta.IListSchemasRequest, callback: google.cloud.discoveryengine.v1beta.SchemaService.ListSchemasCallback): void; + + /** + * Calls ListSchemas. + * @param request ListSchemasRequest message or plain object + * @returns Promise + */ + public listSchemas(request: google.cloud.discoveryengine.v1beta.IListSchemasRequest): Promise; + + /** + * Calls CreateSchema. + * @param request CreateSchemaRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createSchema(request: google.cloud.discoveryengine.v1beta.ICreateSchemaRequest, callback: google.cloud.discoveryengine.v1beta.SchemaService.CreateSchemaCallback): void; + + /** + * Calls CreateSchema. + * @param request CreateSchemaRequest message or plain object + * @returns Promise + */ + public createSchema(request: google.cloud.discoveryengine.v1beta.ICreateSchemaRequest): Promise; + + /** + * Calls UpdateSchema. + * @param request UpdateSchemaRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateSchema(request: google.cloud.discoveryengine.v1beta.IUpdateSchemaRequest, callback: google.cloud.discoveryengine.v1beta.SchemaService.UpdateSchemaCallback): void; + + /** + * Calls UpdateSchema. + * @param request UpdateSchemaRequest message or plain object + * @returns Promise + */ + public updateSchema(request: google.cloud.discoveryengine.v1beta.IUpdateSchemaRequest): Promise; + + /** + * Calls DeleteSchema. + * @param request DeleteSchemaRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteSchema(request: google.cloud.discoveryengine.v1beta.IDeleteSchemaRequest, callback: google.cloud.discoveryengine.v1beta.SchemaService.DeleteSchemaCallback): void; + + /** + * Calls DeleteSchema. + * @param request DeleteSchemaRequest message or plain object + * @returns Promise + */ + public deleteSchema(request: google.cloud.discoveryengine.v1beta.IDeleteSchemaRequest): Promise; + } + + namespace SchemaService { + + /** + * Callback as used by {@link google.cloud.discoveryengine.v1beta.SchemaService|getSchema}. + * @param error Error, if any + * @param [response] Schema + */ + type GetSchemaCallback = (error: (Error|null), response?: google.cloud.discoveryengine.v1beta.Schema) => void; + + /** + * Callback as used by {@link google.cloud.discoveryengine.v1beta.SchemaService|listSchemas}. + * @param error Error, if any + * @param [response] ListSchemasResponse + */ + type ListSchemasCallback = (error: (Error|null), response?: google.cloud.discoveryengine.v1beta.ListSchemasResponse) => void; + + /** + * Callback as used by {@link google.cloud.discoveryengine.v1beta.SchemaService|createSchema}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateSchemaCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.discoveryengine.v1beta.SchemaService|updateSchema}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateSchemaCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.discoveryengine.v1beta.SchemaService|deleteSchema}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteSchemaCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of a GetSchemaRequest. */ + interface IGetSchemaRequest { + + /** GetSchemaRequest name */ + name?: (string|null); + } + + /** Represents a GetSchemaRequest. */ + class GetSchemaRequest implements IGetSchemaRequest { + + /** + * Constructs a new GetSchemaRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.IGetSchemaRequest); + + /** GetSchemaRequest name. */ + public name: string; + + /** + * Creates a new GetSchemaRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetSchemaRequest instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.IGetSchemaRequest): google.cloud.discoveryengine.v1beta.GetSchemaRequest; + + /** + * Encodes the specified GetSchemaRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.GetSchemaRequest.verify|verify} messages. + * @param message GetSchemaRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.IGetSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetSchemaRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.GetSchemaRequest.verify|verify} messages. + * @param message GetSchemaRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IGetSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetSchemaRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetSchemaRequest + * @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.discoveryengine.v1beta.GetSchemaRequest; + + /** + * Decodes a GetSchemaRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetSchemaRequest + * @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.discoveryengine.v1beta.GetSchemaRequest; + + /** + * Verifies a GetSchemaRequest 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 GetSchemaRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetSchemaRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.GetSchemaRequest; + + /** + * Creates a plain object from a GetSchemaRequest message. Also converts values to other types if specified. + * @param message GetSchemaRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.GetSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetSchemaRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetSchemaRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListSchemasRequest. */ + interface IListSchemasRequest { + + /** ListSchemasRequest parent */ + parent?: (string|null); + + /** ListSchemasRequest pageSize */ + pageSize?: (number|null); + + /** ListSchemasRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListSchemasRequest. */ + class ListSchemasRequest implements IListSchemasRequest { + + /** + * Constructs a new ListSchemasRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.IListSchemasRequest); + + /** ListSchemasRequest parent. */ + public parent: string; + + /** ListSchemasRequest pageSize. */ + public pageSize: number; + + /** ListSchemasRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListSchemasRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSchemasRequest instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.IListSchemasRequest): google.cloud.discoveryengine.v1beta.ListSchemasRequest; + + /** + * Encodes the specified ListSchemasRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ListSchemasRequest.verify|verify} messages. + * @param message ListSchemasRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.IListSchemasRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListSchemasRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ListSchemasRequest.verify|verify} messages. + * @param message ListSchemasRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IListSchemasRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListSchemasRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSchemasRequest + * @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.discoveryengine.v1beta.ListSchemasRequest; + + /** + * Decodes a ListSchemasRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSchemasRequest + * @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.discoveryengine.v1beta.ListSchemasRequest; + + /** + * Verifies a ListSchemasRequest 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 ListSchemasRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSchemasRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ListSchemasRequest; + + /** + * Creates a plain object from a ListSchemasRequest message. Also converts values to other types if specified. + * @param message ListSchemasRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.ListSchemasRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListSchemasRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListSchemasRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListSchemasResponse. */ + interface IListSchemasResponse { + + /** ListSchemasResponse schemas */ + schemas?: (google.cloud.discoveryengine.v1beta.ISchema[]|null); + + /** ListSchemasResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListSchemasResponse. */ + class ListSchemasResponse implements IListSchemasResponse { + + /** + * Constructs a new ListSchemasResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.IListSchemasResponse); + + /** ListSchemasResponse schemas. */ + public schemas: google.cloud.discoveryengine.v1beta.ISchema[]; + + /** ListSchemasResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListSchemasResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSchemasResponse instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.IListSchemasResponse): google.cloud.discoveryengine.v1beta.ListSchemasResponse; + + /** + * Encodes the specified ListSchemasResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ListSchemasResponse.verify|verify} messages. + * @param message ListSchemasResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.IListSchemasResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListSchemasResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ListSchemasResponse.verify|verify} messages. + * @param message ListSchemasResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IListSchemasResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListSchemasResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSchemasResponse + * @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.discoveryengine.v1beta.ListSchemasResponse; + + /** + * Decodes a ListSchemasResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSchemasResponse + * @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.discoveryengine.v1beta.ListSchemasResponse; + + /** + * Verifies a ListSchemasResponse 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 ListSchemasResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSchemasResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.ListSchemasResponse; + + /** + * Creates a plain object from a ListSchemasResponse message. Also converts values to other types if specified. + * @param message ListSchemasResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.ListSchemasResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListSchemasResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListSchemasResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateSchemaRequest. */ + interface ICreateSchemaRequest { + + /** CreateSchemaRequest parent */ + parent?: (string|null); + + /** CreateSchemaRequest schema */ + schema?: (google.cloud.discoveryengine.v1beta.ISchema|null); + + /** CreateSchemaRequest schemaId */ + schemaId?: (string|null); + } + + /** Represents a CreateSchemaRequest. */ + class CreateSchemaRequest implements ICreateSchemaRequest { + + /** + * Constructs a new CreateSchemaRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.ICreateSchemaRequest); + + /** CreateSchemaRequest parent. */ + public parent: string; + + /** CreateSchemaRequest schema. */ + public schema?: (google.cloud.discoveryengine.v1beta.ISchema|null); + + /** CreateSchemaRequest schemaId. */ + public schemaId: string; + + /** + * Creates a new CreateSchemaRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateSchemaRequest instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.ICreateSchemaRequest): google.cloud.discoveryengine.v1beta.CreateSchemaRequest; + + /** + * Encodes the specified CreateSchemaRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CreateSchemaRequest.verify|verify} messages. + * @param message CreateSchemaRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.ICreateSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateSchemaRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CreateSchemaRequest.verify|verify} messages. + * @param message CreateSchemaRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.ICreateSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateSchemaRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateSchemaRequest + * @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.discoveryengine.v1beta.CreateSchemaRequest; + + /** + * Decodes a CreateSchemaRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateSchemaRequest + * @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.discoveryengine.v1beta.CreateSchemaRequest; + + /** + * Verifies a CreateSchemaRequest 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 CreateSchemaRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateSchemaRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.CreateSchemaRequest; + + /** + * Creates a plain object from a CreateSchemaRequest message. Also converts values to other types if specified. + * @param message CreateSchemaRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.CreateSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateSchemaRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateSchemaRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateSchemaRequest. */ + interface IUpdateSchemaRequest { + + /** UpdateSchemaRequest schema */ + schema?: (google.cloud.discoveryengine.v1beta.ISchema|null); + + /** UpdateSchemaRequest allowMissing */ + allowMissing?: (boolean|null); + } + + /** Represents an UpdateSchemaRequest. */ + class UpdateSchemaRequest implements IUpdateSchemaRequest { + + /** + * Constructs a new UpdateSchemaRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.IUpdateSchemaRequest); + + /** UpdateSchemaRequest schema. */ + public schema?: (google.cloud.discoveryengine.v1beta.ISchema|null); + + /** UpdateSchemaRequest allowMissing. */ + public allowMissing: boolean; + + /** + * Creates a new UpdateSchemaRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateSchemaRequest instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.IUpdateSchemaRequest): google.cloud.discoveryengine.v1beta.UpdateSchemaRequest; + + /** + * Encodes the specified UpdateSchemaRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UpdateSchemaRequest.verify|verify} messages. + * @param message UpdateSchemaRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.IUpdateSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateSchemaRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UpdateSchemaRequest.verify|verify} messages. + * @param message UpdateSchemaRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IUpdateSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateSchemaRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateSchemaRequest + * @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.discoveryengine.v1beta.UpdateSchemaRequest; + + /** + * Decodes an UpdateSchemaRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateSchemaRequest + * @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.discoveryengine.v1beta.UpdateSchemaRequest; + + /** + * Verifies an UpdateSchemaRequest 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 UpdateSchemaRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateSchemaRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.UpdateSchemaRequest; + + /** + * Creates a plain object from an UpdateSchemaRequest message. Also converts values to other types if specified. + * @param message UpdateSchemaRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.UpdateSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateSchemaRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateSchemaRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteSchemaRequest. */ + interface IDeleteSchemaRequest { + + /** DeleteSchemaRequest name */ + name?: (string|null); + } + + /** Represents a DeleteSchemaRequest. */ + class DeleteSchemaRequest implements IDeleteSchemaRequest { + + /** + * Constructs a new DeleteSchemaRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.IDeleteSchemaRequest); + + /** DeleteSchemaRequest name. */ + public name: string; + + /** + * Creates a new DeleteSchemaRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteSchemaRequest instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.IDeleteSchemaRequest): google.cloud.discoveryengine.v1beta.DeleteSchemaRequest; + + /** + * Encodes the specified DeleteSchemaRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.DeleteSchemaRequest.verify|verify} messages. + * @param message DeleteSchemaRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.IDeleteSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteSchemaRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.DeleteSchemaRequest.verify|verify} messages. + * @param message DeleteSchemaRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IDeleteSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteSchemaRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteSchemaRequest + * @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.discoveryengine.v1beta.DeleteSchemaRequest; + + /** + * Decodes a DeleteSchemaRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteSchemaRequest + * @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.discoveryengine.v1beta.DeleteSchemaRequest; + + /** + * Verifies a DeleteSchemaRequest 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 DeleteSchemaRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteSchemaRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.DeleteSchemaRequest; + + /** + * Creates a plain object from a DeleteSchemaRequest message. Also converts values to other types if specified. + * @param message DeleteSchemaRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.DeleteSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteSchemaRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteSchemaRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateSchemaMetadata. */ + interface ICreateSchemaMetadata { + + /** CreateSchemaMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** CreateSchemaMetadata updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a CreateSchemaMetadata. */ + class CreateSchemaMetadata implements ICreateSchemaMetadata { + + /** + * Constructs a new CreateSchemaMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.ICreateSchemaMetadata); + + /** CreateSchemaMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** CreateSchemaMetadata updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new CreateSchemaMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateSchemaMetadata instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.ICreateSchemaMetadata): google.cloud.discoveryengine.v1beta.CreateSchemaMetadata; + + /** + * Encodes the specified CreateSchemaMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CreateSchemaMetadata.verify|verify} messages. + * @param message CreateSchemaMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.ICreateSchemaMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateSchemaMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CreateSchemaMetadata.verify|verify} messages. + * @param message CreateSchemaMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.ICreateSchemaMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateSchemaMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateSchemaMetadata + * @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.discoveryengine.v1beta.CreateSchemaMetadata; + + /** + * Decodes a CreateSchemaMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateSchemaMetadata + * @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.discoveryengine.v1beta.CreateSchemaMetadata; + + /** + * Verifies a CreateSchemaMetadata 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 CreateSchemaMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateSchemaMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.CreateSchemaMetadata; + + /** + * Creates a plain object from a CreateSchemaMetadata message. Also converts values to other types if specified. + * @param message CreateSchemaMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.CreateSchemaMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateSchemaMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateSchemaMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateSchemaMetadata. */ + interface IUpdateSchemaMetadata { + + /** UpdateSchemaMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** UpdateSchemaMetadata updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an UpdateSchemaMetadata. */ + class UpdateSchemaMetadata implements IUpdateSchemaMetadata { + + /** + * Constructs a new UpdateSchemaMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.IUpdateSchemaMetadata); + + /** UpdateSchemaMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** UpdateSchemaMetadata updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new UpdateSchemaMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateSchemaMetadata instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.IUpdateSchemaMetadata): google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata; + + /** + * Encodes the specified UpdateSchemaMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata.verify|verify} messages. + * @param message UpdateSchemaMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.IUpdateSchemaMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateSchemaMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata.verify|verify} messages. + * @param message UpdateSchemaMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IUpdateSchemaMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateSchemaMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateSchemaMetadata + * @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.discoveryengine.v1beta.UpdateSchemaMetadata; + + /** + * Decodes an UpdateSchemaMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateSchemaMetadata + * @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.discoveryengine.v1beta.UpdateSchemaMetadata; + + /** + * Verifies an UpdateSchemaMetadata 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 UpdateSchemaMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateSchemaMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata; + + /** + * Creates a plain object from an UpdateSchemaMetadata message. Also converts values to other types if specified. + * @param message UpdateSchemaMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateSchemaMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateSchemaMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteSchemaMetadata. */ + interface IDeleteSchemaMetadata { + + /** DeleteSchemaMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** DeleteSchemaMetadata updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a DeleteSchemaMetadata. */ + class DeleteSchemaMetadata implements IDeleteSchemaMetadata { + + /** + * Constructs a new DeleteSchemaMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.IDeleteSchemaMetadata); + + /** DeleteSchemaMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** DeleteSchemaMetadata updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new DeleteSchemaMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteSchemaMetadata instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.IDeleteSchemaMetadata): google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata; + + /** + * Encodes the specified DeleteSchemaMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata.verify|verify} messages. + * @param message DeleteSchemaMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.IDeleteSchemaMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteSchemaMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata.verify|verify} messages. + * @param message DeleteSchemaMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IDeleteSchemaMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteSchemaMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteSchemaMetadata + * @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.discoveryengine.v1beta.DeleteSchemaMetadata; + + /** + * Decodes a DeleteSchemaMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteSchemaMetadata + * @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.discoveryengine.v1beta.DeleteSchemaMetadata; + + /** + * Verifies a DeleteSchemaMetadata 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 DeleteSchemaMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteSchemaMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata; + + /** + * Creates a plain object from a DeleteSchemaMetadata message. Also converts values to other types if specified. + * @param message DeleteSchemaMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteSchemaMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteSchemaMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a SearchService */ + class SearchService extends $protobuf.rpc.Service { + + /** + * Constructs a new SearchService 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 SearchService 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): SearchService; + + /** + * Calls Search. + * @param request SearchRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SearchResponse + */ + public search(request: google.cloud.discoveryengine.v1beta.ISearchRequest, callback: google.cloud.discoveryengine.v1beta.SearchService.SearchCallback): void; + + /** + * Calls Search. + * @param request SearchRequest message or plain object + * @returns Promise + */ + public search(request: google.cloud.discoveryengine.v1beta.ISearchRequest): Promise; + } + + namespace SearchService { + + /** + * Callback as used by {@link google.cloud.discoveryengine.v1beta.SearchService|search}. + * @param error Error, if any + * @param [response] SearchResponse + */ + type SearchCallback = (error: (Error|null), response?: google.cloud.discoveryengine.v1beta.SearchResponse) => void; + } + + /** Properties of a SearchRequest. */ + interface ISearchRequest { + + /** SearchRequest servingConfig */ + servingConfig?: (string|null); + + /** SearchRequest branch */ + branch?: (string|null); + + /** SearchRequest query */ + query?: (string|null); + + /** SearchRequest pageSize */ + pageSize?: (number|null); + + /** SearchRequest pageToken */ + pageToken?: (string|null); + + /** SearchRequest offset */ + offset?: (number|null); + + /** SearchRequest filter */ + filter?: (string|null); + + /** SearchRequest orderBy */ + orderBy?: (string|null); + + /** SearchRequest facetSpecs */ + facetSpecs?: (google.cloud.discoveryengine.v1beta.SearchRequest.IFacetSpec[]|null); + + /** SearchRequest boostSpec */ + boostSpec?: (google.cloud.discoveryengine.v1beta.SearchRequest.IBoostSpec|null); + + /** SearchRequest params */ + params?: ({ [k: string]: google.protobuf.IValue }|null); + + /** SearchRequest queryExpansionSpec */ + queryExpansionSpec?: (google.cloud.discoveryengine.v1beta.SearchRequest.IQueryExpansionSpec|null); + + /** SearchRequest spellCorrectionSpec */ + spellCorrectionSpec?: (google.cloud.discoveryengine.v1beta.SearchRequest.ISpellCorrectionSpec|null); + + /** SearchRequest userPseudoId */ + userPseudoId?: (string|null); + + /** SearchRequest contentSearchSpec */ + contentSearchSpec?: (google.cloud.discoveryengine.v1beta.SearchRequest.IContentSearchSpec|null); + } + + /** Represents a SearchRequest. */ + class SearchRequest implements ISearchRequest { + + /** + * Constructs a new SearchRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.ISearchRequest); + + /** SearchRequest servingConfig. */ + public servingConfig: string; + + /** SearchRequest branch. */ + public branch: string; + + /** SearchRequest query. */ + public query: string; + + /** SearchRequest pageSize. */ + public pageSize: number; + + /** SearchRequest pageToken. */ + public pageToken: string; + + /** SearchRequest offset. */ + public offset: number; + + /** SearchRequest filter. */ + public filter: string; + + /** SearchRequest orderBy. */ + public orderBy: string; + + /** SearchRequest facetSpecs. */ + public facetSpecs: google.cloud.discoveryengine.v1beta.SearchRequest.IFacetSpec[]; + + /** SearchRequest boostSpec. */ + public boostSpec?: (google.cloud.discoveryengine.v1beta.SearchRequest.IBoostSpec|null); + + /** SearchRequest params. */ + public params: { [k: string]: google.protobuf.IValue }; + + /** SearchRequest queryExpansionSpec. */ + public queryExpansionSpec?: (google.cloud.discoveryengine.v1beta.SearchRequest.IQueryExpansionSpec|null); + + /** SearchRequest spellCorrectionSpec. */ + public spellCorrectionSpec?: (google.cloud.discoveryengine.v1beta.SearchRequest.ISpellCorrectionSpec|null); + + /** SearchRequest userPseudoId. */ + public userPseudoId: string; + + /** SearchRequest contentSearchSpec. */ + public contentSearchSpec?: (google.cloud.discoveryengine.v1beta.SearchRequest.IContentSearchSpec|null); + + /** + * Creates a new SearchRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchRequest instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.ISearchRequest): google.cloud.discoveryengine.v1beta.SearchRequest; + + /** + * Encodes the specified SearchRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.verify|verify} messages. + * @param message SearchRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.ISearchRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.verify|verify} messages. + * @param message SearchRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.ISearchRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchRequest + * @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.discoveryengine.v1beta.SearchRequest; + + /** + * Decodes a SearchRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchRequest + * @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.discoveryengine.v1beta.SearchRequest; + + /** + * Verifies a SearchRequest 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 SearchRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.SearchRequest; + + /** + * Creates a plain object from a SearchRequest message. Also converts values to other types if specified. + * @param message SearchRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.SearchRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SearchRequest { + + /** Properties of a FacetSpec. */ + interface IFacetSpec { + + /** FacetSpec facetKey */ + facetKey?: (google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.IFacetKey|null); + + /** FacetSpec limit */ + limit?: (number|null); + + /** FacetSpec excludedFilterKeys */ + excludedFilterKeys?: (string[]|null); + + /** FacetSpec enableDynamicPosition */ + enableDynamicPosition?: (boolean|null); + } + + /** Represents a FacetSpec. */ + class FacetSpec implements IFacetSpec { + + /** + * Constructs a new FacetSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.SearchRequest.IFacetSpec); + + /** FacetSpec facetKey. */ + public facetKey?: (google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.IFacetKey|null); + + /** FacetSpec limit. */ + public limit: number; + + /** FacetSpec excludedFilterKeys. */ + public excludedFilterKeys: string[]; + + /** FacetSpec enableDynamicPosition. */ + public enableDynamicPosition: boolean; + + /** + * Creates a new FacetSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns FacetSpec instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.SearchRequest.IFacetSpec): google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec; + + /** + * Encodes the specified FacetSpec message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.verify|verify} messages. + * @param message FacetSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.SearchRequest.IFacetSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FacetSpec message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.verify|verify} messages. + * @param message FacetSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.SearchRequest.IFacetSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FacetSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FacetSpec + * @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.discoveryengine.v1beta.SearchRequest.FacetSpec; + + /** + * Decodes a FacetSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FacetSpec + * @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.discoveryengine.v1beta.SearchRequest.FacetSpec; + + /** + * Verifies a FacetSpec 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 FacetSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FacetSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec; + + /** + * Creates a plain object from a FacetSpec message. Also converts values to other types if specified. + * @param message FacetSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FacetSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FacetSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FacetSpec { + + /** Properties of a FacetKey. */ + interface IFacetKey { + + /** FacetKey key */ + key?: (string|null); + + /** FacetKey intervals */ + intervals?: (google.cloud.discoveryengine.v1beta.IInterval[]|null); + + /** FacetKey restrictedValues */ + restrictedValues?: (string[]|null); + + /** FacetKey prefixes */ + prefixes?: (string[]|null); + + /** FacetKey contains */ + contains?: (string[]|null); + + /** FacetKey caseInsensitive */ + caseInsensitive?: (boolean|null); + + /** FacetKey orderBy */ + orderBy?: (string|null); + } + + /** Represents a FacetKey. */ + class FacetKey implements IFacetKey { + + /** + * Constructs a new FacetKey. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.IFacetKey); + + /** FacetKey key. */ + public key: string; + + /** FacetKey intervals. */ + public intervals: google.cloud.discoveryengine.v1beta.IInterval[]; + + /** FacetKey restrictedValues. */ + public restrictedValues: string[]; + + /** FacetKey prefixes. */ + public prefixes: string[]; + + /** FacetKey contains. */ + public contains: string[]; + + /** FacetKey caseInsensitive. */ + public caseInsensitive: boolean; + + /** FacetKey orderBy. */ + public orderBy: string; + + /** + * Creates a new FacetKey instance using the specified properties. + * @param [properties] Properties to set + * @returns FacetKey instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.IFacetKey): google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey; + + /** + * Encodes the specified FacetKey message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.verify|verify} messages. + * @param message FacetKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.IFacetKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FacetKey message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.verify|verify} messages. + * @param message FacetKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.IFacetKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FacetKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FacetKey + * @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.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey; + + /** + * Decodes a FacetKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FacetKey + * @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.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey; + + /** + * Verifies a FacetKey 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 FacetKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FacetKey + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey; + + /** + * Creates a plain object from a FacetKey message. Also converts values to other types if specified. + * @param message FacetKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FacetKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FacetKey + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a BoostSpec. */ + interface IBoostSpec { + + /** BoostSpec conditionBoostSpecs */ + conditionBoostSpecs?: (google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.IConditionBoostSpec[]|null); + } + + /** Represents a BoostSpec. */ + class BoostSpec implements IBoostSpec { + + /** + * Constructs a new BoostSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.SearchRequest.IBoostSpec); + + /** BoostSpec conditionBoostSpecs. */ + public conditionBoostSpecs: google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.IConditionBoostSpec[]; + + /** + * Creates a new BoostSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns BoostSpec instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.SearchRequest.IBoostSpec): google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec; + + /** + * Encodes the specified BoostSpec message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.verify|verify} messages. + * @param message BoostSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.SearchRequest.IBoostSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BoostSpec message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.verify|verify} messages. + * @param message BoostSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.SearchRequest.IBoostSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BoostSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BoostSpec + * @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.discoveryengine.v1beta.SearchRequest.BoostSpec; + + /** + * Decodes a BoostSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BoostSpec + * @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.discoveryengine.v1beta.SearchRequest.BoostSpec; + + /** + * Verifies a BoostSpec 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 BoostSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BoostSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec; + + /** + * Creates a plain object from a BoostSpec message. Also converts values to other types if specified. + * @param message BoostSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BoostSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BoostSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BoostSpec { + + /** Properties of a ConditionBoostSpec. */ + interface IConditionBoostSpec { + + /** ConditionBoostSpec condition */ + condition?: (string|null); + + /** ConditionBoostSpec boost */ + boost?: (number|null); + } + + /** Represents a ConditionBoostSpec. */ + class ConditionBoostSpec implements IConditionBoostSpec { + + /** + * Constructs a new ConditionBoostSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.IConditionBoostSpec); + + /** ConditionBoostSpec condition. */ + public condition: string; + + /** ConditionBoostSpec boost. */ + public boost: number; + + /** + * Creates a new ConditionBoostSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ConditionBoostSpec instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.IConditionBoostSpec): google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec; + + /** + * Encodes the specified ConditionBoostSpec message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.verify|verify} messages. + * @param message ConditionBoostSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.IConditionBoostSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConditionBoostSpec message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.verify|verify} messages. + * @param message ConditionBoostSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.IConditionBoostSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConditionBoostSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConditionBoostSpec + * @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.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec; + + /** + * Decodes a ConditionBoostSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConditionBoostSpec + * @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.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec; + + /** + * Verifies a ConditionBoostSpec 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 ConditionBoostSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConditionBoostSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec; + + /** + * Creates a plain object from a ConditionBoostSpec message. Also converts values to other types if specified. + * @param message ConditionBoostSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConditionBoostSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConditionBoostSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a QueryExpansionSpec. */ + interface IQueryExpansionSpec { + + /** QueryExpansionSpec condition */ + condition?: (google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition|keyof typeof google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition|null); + } + + /** Represents a QueryExpansionSpec. */ + class QueryExpansionSpec implements IQueryExpansionSpec { + + /** + * Constructs a new QueryExpansionSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.SearchRequest.IQueryExpansionSpec); + + /** QueryExpansionSpec condition. */ + public condition: (google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition|keyof typeof google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition); + + /** + * Creates a new QueryExpansionSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryExpansionSpec instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.SearchRequest.IQueryExpansionSpec): google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec; + + /** + * Encodes the specified QueryExpansionSpec message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.verify|verify} messages. + * @param message QueryExpansionSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.SearchRequest.IQueryExpansionSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryExpansionSpec message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.verify|verify} messages. + * @param message QueryExpansionSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.SearchRequest.IQueryExpansionSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryExpansionSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryExpansionSpec + * @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.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec; + + /** + * Decodes a QueryExpansionSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryExpansionSpec + * @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.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec; + + /** + * Verifies a QueryExpansionSpec 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 QueryExpansionSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryExpansionSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec; + + /** + * Creates a plain object from a QueryExpansionSpec message. Also converts values to other types if specified. + * @param message QueryExpansionSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryExpansionSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryExpansionSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace QueryExpansionSpec { + + /** Condition enum. */ + enum Condition { + CONDITION_UNSPECIFIED = 0, + DISABLED = 1, + AUTO = 2 + } + } + + /** Properties of a SpellCorrectionSpec. */ + interface ISpellCorrectionSpec { + + /** SpellCorrectionSpec mode */ + mode?: (google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode|keyof typeof google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode|null); + } + + /** Represents a SpellCorrectionSpec. */ + class SpellCorrectionSpec implements ISpellCorrectionSpec { + + /** + * Constructs a new SpellCorrectionSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.SearchRequest.ISpellCorrectionSpec); + + /** SpellCorrectionSpec mode. */ + public mode: (google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode|keyof typeof google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode); + + /** + * Creates a new SpellCorrectionSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns SpellCorrectionSpec instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.SearchRequest.ISpellCorrectionSpec): google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec; + + /** + * Encodes the specified SpellCorrectionSpec message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.verify|verify} messages. + * @param message SpellCorrectionSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.SearchRequest.ISpellCorrectionSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SpellCorrectionSpec message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.verify|verify} messages. + * @param message SpellCorrectionSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.SearchRequest.ISpellCorrectionSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SpellCorrectionSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SpellCorrectionSpec + * @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.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec; + + /** + * Decodes a SpellCorrectionSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SpellCorrectionSpec + * @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.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec; + + /** + * Verifies a SpellCorrectionSpec 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 SpellCorrectionSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SpellCorrectionSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec; + + /** + * Creates a plain object from a SpellCorrectionSpec message. Also converts values to other types if specified. + * @param message SpellCorrectionSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SpellCorrectionSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SpellCorrectionSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SpellCorrectionSpec { + + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + SUGGESTION_ONLY = 1, + AUTO = 2 + } + } + + /** Properties of a ContentSearchSpec. */ + interface IContentSearchSpec { + + /** ContentSearchSpec snippetSpec */ + snippetSpec?: (google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ISnippetSpec|null); + + /** ContentSearchSpec summarySpec */ + summarySpec?: (google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ISummarySpec|null); + } + + /** Represents a ContentSearchSpec. */ + class ContentSearchSpec implements IContentSearchSpec { + + /** + * Constructs a new ContentSearchSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.SearchRequest.IContentSearchSpec); + + /** ContentSearchSpec snippetSpec. */ + public snippetSpec?: (google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ISnippetSpec|null); + + /** ContentSearchSpec summarySpec. */ + public summarySpec?: (google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ISummarySpec|null); + + /** + * Creates a new ContentSearchSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ContentSearchSpec instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.SearchRequest.IContentSearchSpec): google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec; + + /** + * Encodes the specified ContentSearchSpec message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.verify|verify} messages. + * @param message ContentSearchSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.SearchRequest.IContentSearchSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ContentSearchSpec message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.verify|verify} messages. + * @param message ContentSearchSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.SearchRequest.IContentSearchSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ContentSearchSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ContentSearchSpec + * @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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec; + + /** + * Decodes a ContentSearchSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ContentSearchSpec + * @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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec; + + /** + * Verifies a ContentSearchSpec 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 ContentSearchSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContentSearchSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec; + + /** + * Creates a plain object from a ContentSearchSpec message. Also converts values to other types if specified. + * @param message ContentSearchSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ContentSearchSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ContentSearchSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ContentSearchSpec { + + /** Properties of a SnippetSpec. */ + interface ISnippetSpec { + + /** SnippetSpec maxSnippetCount */ + maxSnippetCount?: (number|null); + + /** SnippetSpec referenceOnly */ + referenceOnly?: (boolean|null); + } + + /** Represents a SnippetSpec. */ + class SnippetSpec implements ISnippetSpec { + + /** + * Constructs a new SnippetSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ISnippetSpec); + + /** SnippetSpec maxSnippetCount. */ + public maxSnippetCount: number; + + /** SnippetSpec referenceOnly. */ + public referenceOnly: boolean; + + /** + * Creates a new SnippetSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns SnippetSpec instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ISnippetSpec): google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec; + + /** + * Encodes the specified SnippetSpec message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec.verify|verify} messages. + * @param message SnippetSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ISnippetSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SnippetSpec message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec.verify|verify} messages. + * @param message SnippetSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ISnippetSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SnippetSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SnippetSpec + * @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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec; + + /** + * Decodes a SnippetSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SnippetSpec + * @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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec; + + /** + * Verifies a SnippetSpec 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 SnippetSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SnippetSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec; + + /** + * Creates a plain object from a SnippetSpec message. Also converts values to other types if specified. + * @param message SnippetSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SnippetSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SnippetSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SummarySpec. */ + interface ISummarySpec { + + /** SummarySpec summaryResultCount */ + summaryResultCount?: (number|null); + } + + /** Represents a SummarySpec. */ + class SummarySpec implements ISummarySpec { + + /** + * Constructs a new SummarySpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ISummarySpec); + + /** SummarySpec summaryResultCount. */ + public summaryResultCount: number; + + /** + * Creates a new SummarySpec instance using the specified properties. + * @param [properties] Properties to set + * @returns SummarySpec instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ISummarySpec): google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec; + + /** + * Encodes the specified SummarySpec message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.verify|verify} messages. + * @param message SummarySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ISummarySpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SummarySpec message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.verify|verify} messages. + * @param message SummarySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ISummarySpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SummarySpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SummarySpec + * @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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec; + + /** + * Decodes a SummarySpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SummarySpec + * @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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec; + + /** + * Verifies a SummarySpec 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 SummarySpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SummarySpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec; + + /** + * Creates a plain object from a SummarySpec message. Also converts values to other types if specified. + * @param message SummarySpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SummarySpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SummarySpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a SearchResponse. */ + interface ISearchResponse { + + /** SearchResponse results */ + results?: (google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult[]|null); + + /** SearchResponse facets */ + facets?: (google.cloud.discoveryengine.v1beta.SearchResponse.IFacet[]|null); + + /** SearchResponse guidedSearchResult */ + guidedSearchResult?: (google.cloud.discoveryengine.v1beta.SearchResponse.IGuidedSearchResult|null); + + /** SearchResponse totalSize */ + totalSize?: (number|null); + + /** SearchResponse attributionToken */ + attributionToken?: (string|null); + + /** SearchResponse nextPageToken */ + nextPageToken?: (string|null); - /** MediaInfo mediaProgressDuration */ - mediaProgressDuration?: (google.protobuf.IDuration|null); + /** SearchResponse correctedQuery */ + correctedQuery?: (string|null); - /** MediaInfo mediaProgressPercentage */ - mediaProgressPercentage?: (number|null); + /** SearchResponse summary */ + summary?: (google.cloud.discoveryengine.v1beta.SearchResponse.ISummary|null); + + /** SearchResponse appliedControls */ + appliedControls?: (string[]|null); } - /** Represents a MediaInfo. */ - class MediaInfo implements IMediaInfo { + /** Represents a SearchResponse. */ + class SearchResponse implements ISearchResponse { /** - * Constructs a new MediaInfo. + * Constructs a new SearchResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1beta.IMediaInfo); + constructor(properties?: google.cloud.discoveryengine.v1beta.ISearchResponse); - /** MediaInfo mediaProgressDuration. */ - public mediaProgressDuration?: (google.protobuf.IDuration|null); + /** SearchResponse results. */ + public results: google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult[]; - /** MediaInfo mediaProgressPercentage. */ - public mediaProgressPercentage?: (number|null); + /** SearchResponse facets. */ + public facets: google.cloud.discoveryengine.v1beta.SearchResponse.IFacet[]; - /** MediaInfo _mediaProgressPercentage. */ - public _mediaProgressPercentage?: "mediaProgressPercentage"; + /** SearchResponse guidedSearchResult. */ + public guidedSearchResult?: (google.cloud.discoveryengine.v1beta.SearchResponse.IGuidedSearchResult|null); + + /** SearchResponse totalSize. */ + public totalSize: number; + + /** SearchResponse attributionToken. */ + public attributionToken: string; + + /** SearchResponse nextPageToken. */ + public nextPageToken: string; + + /** SearchResponse correctedQuery. */ + public correctedQuery: string; + + /** SearchResponse summary. */ + public summary?: (google.cloud.discoveryengine.v1beta.SearchResponse.ISummary|null); + + /** SearchResponse appliedControls. */ + public appliedControls: string[]; /** - * Creates a new MediaInfo instance using the specified properties. + * Creates a new SearchResponse instance using the specified properties. * @param [properties] Properties to set - * @returns MediaInfo instance + * @returns SearchResponse instance */ - public static create(properties?: google.cloud.discoveryengine.v1beta.IMediaInfo): google.cloud.discoveryengine.v1beta.MediaInfo; + public static create(properties?: google.cloud.discoveryengine.v1beta.ISearchResponse): google.cloud.discoveryengine.v1beta.SearchResponse; /** - * Encodes the specified MediaInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.MediaInfo.verify|verify} messages. - * @param message MediaInfo message or plain object to encode + * Encodes the specified SearchResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchResponse.verify|verify} messages. + * @param message SearchResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1beta.IMediaInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1beta.ISearchResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MediaInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.MediaInfo.verify|verify} messages. - * @param message MediaInfo message or plain object to encode + * Encodes the specified SearchResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchResponse.verify|verify} messages. + * @param message SearchResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IMediaInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.ISearchResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MediaInfo message from the specified reader or buffer. + * Decodes a SearchResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MediaInfo + * @returns SearchResponse * @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.discoveryengine.v1beta.MediaInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1beta.SearchResponse; /** - * Decodes a MediaInfo message from the specified reader or buffer, length delimited. + * Decodes a SearchResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MediaInfo + * @returns SearchResponse * @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.discoveryengine.v1beta.MediaInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1beta.SearchResponse; /** - * Verifies a MediaInfo message. + * Verifies a SearchResponse 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 MediaInfo message from a plain object. Also converts values to their respective internal types. + * Creates a SearchResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MediaInfo + * @returns SearchResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.MediaInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.SearchResponse; /** - * Creates a plain object from a MediaInfo message. Also converts values to other types if specified. - * @param message MediaInfo + * Creates a plain object from a SearchResponse message. Also converts values to other types if specified. + * @param message SearchResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1beta.MediaInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1beta.SearchResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MediaInfo to JSON. + * Converts this SearchResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MediaInfo + * Gets the default type url for SearchResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a RecommendationService */ - class RecommendationService extends $protobuf.rpc.Service { - - /** - * Constructs a new RecommendationService 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 RecommendationService 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): RecommendationService; - - /** - * Calls Recommend. - * @param request RecommendRequest message or plain object - * @param callback Node-style callback called with the error, if any, and RecommendResponse - */ - public recommend(request: google.cloud.discoveryengine.v1beta.IRecommendRequest, callback: google.cloud.discoveryengine.v1beta.RecommendationService.RecommendCallback): void; - - /** - * Calls Recommend. - * @param request RecommendRequest message or plain object - * @returns Promise - */ - public recommend(request: google.cloud.discoveryengine.v1beta.IRecommendRequest): Promise; - } - - namespace RecommendationService { - - /** - * Callback as used by {@link google.cloud.discoveryengine.v1beta.RecommendationService|recommend}. - * @param error Error, if any - * @param [response] RecommendResponse - */ - type RecommendCallback = (error: (Error|null), response?: google.cloud.discoveryengine.v1beta.RecommendResponse) => void; - } + namespace SearchResponse { - /** Properties of a RecommendRequest. */ - interface IRecommendRequest { + /** Properties of a SearchResult. */ + interface ISearchResult { - /** RecommendRequest servingConfig */ - servingConfig?: (string|null); + /** SearchResult id */ + id?: (string|null); - /** RecommendRequest userEvent */ - userEvent?: (google.cloud.discoveryengine.v1beta.IUserEvent|null); + /** SearchResult document */ + document?: (google.cloud.discoveryengine.v1beta.IDocument|null); + } - /** RecommendRequest pageSize */ - pageSize?: (number|null); + /** Represents a SearchResult. */ + class SearchResult implements ISearchResult { - /** RecommendRequest filter */ - filter?: (string|null); + /** + * Constructs a new SearchResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult); - /** RecommendRequest validateOnly */ - validateOnly?: (boolean|null); + /** SearchResult id. */ + public id: string; - /** RecommendRequest params */ - params?: ({ [k: string]: google.protobuf.IValue }|null); + /** SearchResult document. */ + public document?: (google.cloud.discoveryengine.v1beta.IDocument|null); - /** RecommendRequest userLabels */ - userLabels?: ({ [k: string]: string }|null); - } + /** + * Creates a new SearchResult instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchResult instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult): google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult; - /** Represents a RecommendRequest. */ - class RecommendRequest implements IRecommendRequest { + /** + * Encodes the specified SearchResult message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult.verify|verify} messages. + * @param message SearchResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new RecommendRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.discoveryengine.v1beta.IRecommendRequest); + /** + * Encodes the specified SearchResult message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult.verify|verify} messages. + * @param message SearchResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult, writer?: $protobuf.Writer): $protobuf.Writer; - /** RecommendRequest servingConfig. */ - public servingConfig: string; + /** + * Decodes a SearchResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchResult + * @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.discoveryengine.v1beta.SearchResponse.SearchResult; - /** RecommendRequest userEvent. */ - public userEvent?: (google.cloud.discoveryengine.v1beta.IUserEvent|null); + /** + * Decodes a SearchResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchResult + * @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.discoveryengine.v1beta.SearchResponse.SearchResult; - /** RecommendRequest pageSize. */ - public pageSize: number; + /** + * Verifies a SearchResult 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); - /** RecommendRequest filter. */ - public filter: string; + /** + * Creates a SearchResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult; - /** RecommendRequest validateOnly. */ - public validateOnly: boolean; + /** + * Creates a plain object from a SearchResult message. Also converts values to other types if specified. + * @param message SearchResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** RecommendRequest params. */ - public params: { [k: string]: google.protobuf.IValue }; + /** + * Converts this SearchResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** RecommendRequest userLabels. */ - public userLabels: { [k: string]: string }; + /** + * Gets the default type url for SearchResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Creates a new RecommendRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RecommendRequest instance - */ - public static create(properties?: google.cloud.discoveryengine.v1beta.IRecommendRequest): google.cloud.discoveryengine.v1beta.RecommendRequest; + /** Properties of a Facet. */ + interface IFacet { - /** - * Encodes the specified RecommendRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendRequest.verify|verify} messages. - * @param message RecommendRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.discoveryengine.v1beta.IRecommendRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Facet key */ + key?: (string|null); - /** - * Encodes the specified RecommendRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendRequest.verify|verify} messages. - * @param message RecommendRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IRecommendRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Facet values */ + values?: (google.cloud.discoveryengine.v1beta.SearchResponse.Facet.IFacetValue[]|null); - /** - * Decodes a RecommendRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RecommendRequest - * @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.discoveryengine.v1beta.RecommendRequest; + /** Facet dynamicFacet */ + dynamicFacet?: (boolean|null); + } - /** - * Decodes a RecommendRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RecommendRequest - * @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.discoveryengine.v1beta.RecommendRequest; + /** Represents a Facet. */ + class Facet implements IFacet { - /** - * Verifies a RecommendRequest 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); + /** + * Constructs a new Facet. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.SearchResponse.IFacet); - /** - * Creates a RecommendRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RecommendRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.RecommendRequest; + /** Facet key. */ + public key: string; - /** - * Creates a plain object from a RecommendRequest message. Also converts values to other types if specified. - * @param message RecommendRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.discoveryengine.v1beta.RecommendRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Facet values. */ + public values: google.cloud.discoveryengine.v1beta.SearchResponse.Facet.IFacetValue[]; - /** - * Converts this RecommendRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Facet dynamicFacet. */ + public dynamicFacet: boolean; - /** - * Gets the default type url for RecommendRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a new Facet instance using the specified properties. + * @param [properties] Properties to set + * @returns Facet instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.SearchResponse.IFacet): google.cloud.discoveryengine.v1beta.SearchResponse.Facet; - /** Properties of a RecommendResponse. */ - interface IRecommendResponse { + /** + * Encodes the specified Facet message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchResponse.Facet.verify|verify} messages. + * @param message Facet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.SearchResponse.IFacet, writer?: $protobuf.Writer): $protobuf.Writer; - /** RecommendResponse results */ - results?: (google.cloud.discoveryengine.v1beta.RecommendResponse.IRecommendationResult[]|null); + /** + * Encodes the specified Facet message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchResponse.Facet.verify|verify} messages. + * @param message Facet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.SearchResponse.IFacet, writer?: $protobuf.Writer): $protobuf.Writer; - /** RecommendResponse attributionToken */ - attributionToken?: (string|null); + /** + * Decodes a Facet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Facet + * @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.discoveryengine.v1beta.SearchResponse.Facet; - /** RecommendResponse missingIds */ - missingIds?: (string[]|null); + /** + * Decodes a Facet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Facet + * @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.discoveryengine.v1beta.SearchResponse.Facet; - /** RecommendResponse validateOnly */ - validateOnly?: (boolean|null); - } + /** + * Verifies a Facet 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); - /** Represents a RecommendResponse. */ - class RecommendResponse implements IRecommendResponse { + /** + * Creates a Facet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Facet + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.SearchResponse.Facet; - /** - * Constructs a new RecommendResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.discoveryengine.v1beta.IRecommendResponse); + /** + * Creates a plain object from a Facet message. Also converts values to other types if specified. + * @param message Facet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.SearchResponse.Facet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** RecommendResponse results. */ - public results: google.cloud.discoveryengine.v1beta.RecommendResponse.IRecommendationResult[]; + /** + * Converts this Facet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** RecommendResponse attributionToken. */ - public attributionToken: string; + /** + * Gets the default type url for Facet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** RecommendResponse missingIds. */ - public missingIds: string[]; + namespace Facet { + + /** Properties of a FacetValue. */ + interface IFacetValue { + + /** FacetValue value */ + value?: (string|null); + + /** FacetValue interval */ + interval?: (google.cloud.discoveryengine.v1beta.IInterval|null); + + /** FacetValue count */ + count?: (number|Long|string|null); + } + + /** Represents a FacetValue. */ + class FacetValue implements IFacetValue { + + /** + * Constructs a new FacetValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.SearchResponse.Facet.IFacetValue); + + /** FacetValue value. */ + public value?: (string|null); + + /** FacetValue interval. */ + public interval?: (google.cloud.discoveryengine.v1beta.IInterval|null); + + /** FacetValue count. */ + public count: (number|Long|string); + + /** FacetValue facetValue. */ + public facetValue?: ("value"|"interval"); + + /** + * Creates a new FacetValue instance using the specified properties. + * @param [properties] Properties to set + * @returns FacetValue instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.SearchResponse.Facet.IFacetValue): google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue; + + /** + * Encodes the specified FacetValue message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.verify|verify} messages. + * @param message FacetValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.SearchResponse.Facet.IFacetValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FacetValue message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.verify|verify} messages. + * @param message FacetValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.SearchResponse.Facet.IFacetValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FacetValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FacetValue + * @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.discoveryengine.v1beta.SearchResponse.Facet.FacetValue; + + /** + * Decodes a FacetValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FacetValue + * @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.discoveryengine.v1beta.SearchResponse.Facet.FacetValue; + + /** + * Verifies a FacetValue 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 FacetValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FacetValue + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue; + + /** + * Creates a plain object from a FacetValue message. Also converts values to other types if specified. + * @param message FacetValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FacetValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FacetValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } - /** RecommendResponse validateOnly. */ - public validateOnly: boolean; + /** Properties of a GuidedSearchResult. */ + interface IGuidedSearchResult { - /** - * Creates a new RecommendResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RecommendResponse instance - */ - public static create(properties?: google.cloud.discoveryengine.v1beta.IRecommendResponse): google.cloud.discoveryengine.v1beta.RecommendResponse; + /** GuidedSearchResult refinementAttributes */ + refinementAttributes?: (google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.IRefinementAttribute[]|null); + } - /** - * Encodes the specified RecommendResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendResponse.verify|verify} messages. - * @param message RecommendResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.discoveryengine.v1beta.IRecommendResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a GuidedSearchResult. */ + class GuidedSearchResult implements IGuidedSearchResult { - /** - * Encodes the specified RecommendResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendResponse.verify|verify} messages. - * @param message RecommendResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.IRecommendResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new GuidedSearchResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.SearchResponse.IGuidedSearchResult); - /** - * Decodes a RecommendResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RecommendResponse - * @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.discoveryengine.v1beta.RecommendResponse; + /** GuidedSearchResult refinementAttributes. */ + public refinementAttributes: google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.IRefinementAttribute[]; - /** - * Decodes a RecommendResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RecommendResponse - * @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.discoveryengine.v1beta.RecommendResponse; + /** + * Creates a new GuidedSearchResult instance using the specified properties. + * @param [properties] Properties to set + * @returns GuidedSearchResult instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.SearchResponse.IGuidedSearchResult): google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult; - /** - * Verifies a RecommendResponse 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); + /** + * Encodes the specified GuidedSearchResult message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.verify|verify} messages. + * @param message GuidedSearchResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.SearchResponse.IGuidedSearchResult, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a RecommendResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RecommendResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.RecommendResponse; + /** + * Encodes the specified GuidedSearchResult message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.verify|verify} messages. + * @param message GuidedSearchResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.SearchResponse.IGuidedSearchResult, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a RecommendResponse message. Also converts values to other types if specified. - * @param message RecommendResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.discoveryengine.v1beta.RecommendResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a GuidedSearchResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GuidedSearchResult + * @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.discoveryengine.v1beta.SearchResponse.GuidedSearchResult; - /** - * Converts this RecommendResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Decodes a GuidedSearchResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GuidedSearchResult + * @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.discoveryengine.v1beta.SearchResponse.GuidedSearchResult; - /** - * Gets the default type url for RecommendResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Verifies a GuidedSearchResult 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); - namespace RecommendResponse { + /** + * Creates a GuidedSearchResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GuidedSearchResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult; - /** Properties of a RecommendationResult. */ - interface IRecommendationResult { + /** + * Creates a plain object from a GuidedSearchResult message. Also converts values to other types if specified. + * @param message GuidedSearchResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** RecommendationResult id */ - id?: (string|null); + /** + * Converts this GuidedSearchResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** RecommendationResult document */ - document?: (google.cloud.discoveryengine.v1beta.IDocument|null); + /** + * Gets the default type url for GuidedSearchResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** RecommendationResult metadata */ - metadata?: ({ [k: string]: google.protobuf.IValue }|null); + namespace GuidedSearchResult { + + /** Properties of a RefinementAttribute. */ + interface IRefinementAttribute { + + /** RefinementAttribute attributeKey */ + attributeKey?: (string|null); + + /** RefinementAttribute attributeValue */ + attributeValue?: (string|null); + } + + /** Represents a RefinementAttribute. */ + class RefinementAttribute implements IRefinementAttribute { + + /** + * Constructs a new RefinementAttribute. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.IRefinementAttribute); + + /** RefinementAttribute attributeKey. */ + public attributeKey: string; + + /** RefinementAttribute attributeValue. */ + public attributeValue: string; + + /** + * Creates a new RefinementAttribute instance using the specified properties. + * @param [properties] Properties to set + * @returns RefinementAttribute instance + */ + public static create(properties?: google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.IRefinementAttribute): google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute; + + /** + * Encodes the specified RefinementAttribute message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute.verify|verify} messages. + * @param message RefinementAttribute message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.IRefinementAttribute, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RefinementAttribute message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute.verify|verify} messages. + * @param message RefinementAttribute message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.IRefinementAttribute, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RefinementAttribute message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RefinementAttribute + * @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.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute; + + /** + * Decodes a RefinementAttribute message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RefinementAttribute + * @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.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute; + + /** + * Verifies a RefinementAttribute 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 RefinementAttribute message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RefinementAttribute + */ + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute; + + /** + * Creates a plain object from a RefinementAttribute message. Also converts values to other types if specified. + * @param message RefinementAttribute + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RefinementAttribute to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RefinementAttribute + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } - /** Represents a RecommendationResult. */ - class RecommendationResult implements IRecommendationResult { + /** Properties of a Summary. */ + interface ISummary { + + /** Summary summaryText */ + summaryText?: (string|null); + } + + /** Represents a Summary. */ + class Summary implements ISummary { /** - * Constructs a new RecommendationResult. + * Constructs a new Summary. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.discoveryengine.v1beta.RecommendResponse.IRecommendationResult); + constructor(properties?: google.cloud.discoveryengine.v1beta.SearchResponse.ISummary); - /** RecommendationResult id. */ - public id: string; - - /** RecommendationResult document. */ - public document?: (google.cloud.discoveryengine.v1beta.IDocument|null); - - /** RecommendationResult metadata. */ - public metadata: { [k: string]: google.protobuf.IValue }; + /** Summary summaryText. */ + public summaryText: string; /** - * Creates a new RecommendationResult instance using the specified properties. + * Creates a new Summary instance using the specified properties. * @param [properties] Properties to set - * @returns RecommendationResult instance + * @returns Summary instance */ - public static create(properties?: google.cloud.discoveryengine.v1beta.RecommendResponse.IRecommendationResult): google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult; + public static create(properties?: google.cloud.discoveryengine.v1beta.SearchResponse.ISummary): google.cloud.discoveryengine.v1beta.SearchResponse.Summary; /** - * Encodes the specified RecommendationResult message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.verify|verify} messages. - * @param message RecommendationResult message or plain object to encode + * Encodes the specified Summary message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchResponse.Summary.verify|verify} messages. + * @param message Summary message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.discoveryengine.v1beta.RecommendResponse.IRecommendationResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.discoveryengine.v1beta.SearchResponse.ISummary, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RecommendationResult message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.verify|verify} messages. - * @param message RecommendationResult message or plain object to encode + * Encodes the specified Summary message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchResponse.Summary.verify|verify} messages. + * @param message Summary message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.RecommendResponse.IRecommendationResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.discoveryengine.v1beta.SearchResponse.ISummary, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RecommendationResult message from the specified reader or buffer. + * Decodes a Summary message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RecommendationResult + * @returns Summary * @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.discoveryengine.v1beta.RecommendResponse.RecommendationResult; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.discoveryengine.v1beta.SearchResponse.Summary; /** - * Decodes a RecommendationResult message from the specified reader or buffer, length delimited. + * Decodes a Summary message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RecommendationResult + * @returns Summary * @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.discoveryengine.v1beta.RecommendResponse.RecommendationResult; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.discoveryengine.v1beta.SearchResponse.Summary; /** - * Verifies a RecommendationResult message. + * Verifies a Summary 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 RecommendationResult message from a plain object. Also converts values to their respective internal types. + * Creates a Summary message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RecommendationResult + * @returns Summary */ - public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult; + public static fromObject(object: { [k: string]: any }): google.cloud.discoveryengine.v1beta.SearchResponse.Summary; /** - * Creates a plain object from a RecommendationResult message. Also converts values to other types if specified. - * @param message RecommendationResult + * Creates a plain object from a Summary message. Also converts values to other types if specified. + * @param message Summary * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.discoveryengine.v1beta.SearchResponse.Summary, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RecommendationResult to JSON. + * Converts this Summary to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RecommendationResult + * Gets the default type url for Summary * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -4365,18 +8464,6 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6, - NON_EMPTY_DEFAULT = 7 - } - /** Properties of a Http. */ interface IHttp { @@ -4737,6 +8824,18 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7 + } + /** Properties of a HttpBody. */ interface IHttpBody { diff --git a/packages/google-cloud-discoveryengine/protos/protos.js b/packages/google-cloud-discoveryengine/protos/protos.js index c480619990d..429ecb93d6e 100644 --- a/packages/google-cloud-discoveryengine/protos/protos.js +++ b/packages/google-cloud-discoveryengine/protos/protos.js @@ -66,6 +66,323 @@ */ var v1beta = {}; + v1beta.Interval = (function() { + + /** + * Properties of an Interval. + * @memberof google.cloud.discoveryengine.v1beta + * @interface IInterval + * @property {number|null} [minimum] Interval minimum + * @property {number|null} [exclusiveMinimum] Interval exclusiveMinimum + * @property {number|null} [maximum] Interval maximum + * @property {number|null} [exclusiveMaximum] Interval exclusiveMaximum + */ + + /** + * Constructs a new Interval. + * @memberof google.cloud.discoveryengine.v1beta + * @classdesc Represents an Interval. + * @implements IInterval + * @constructor + * @param {google.cloud.discoveryengine.v1beta.IInterval=} [properties] Properties to set + */ + function Interval(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]]; + } + + /** + * Interval minimum. + * @member {number|null|undefined} minimum + * @memberof google.cloud.discoveryengine.v1beta.Interval + * @instance + */ + Interval.prototype.minimum = null; + + /** + * Interval exclusiveMinimum. + * @member {number|null|undefined} exclusiveMinimum + * @memberof google.cloud.discoveryengine.v1beta.Interval + * @instance + */ + Interval.prototype.exclusiveMinimum = null; + + /** + * Interval maximum. + * @member {number|null|undefined} maximum + * @memberof google.cloud.discoveryengine.v1beta.Interval + * @instance + */ + Interval.prototype.maximum = null; + + /** + * Interval exclusiveMaximum. + * @member {number|null|undefined} exclusiveMaximum + * @memberof google.cloud.discoveryengine.v1beta.Interval + * @instance + */ + Interval.prototype.exclusiveMaximum = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Interval min. + * @member {"minimum"|"exclusiveMinimum"|undefined} min + * @memberof google.cloud.discoveryengine.v1beta.Interval + * @instance + */ + Object.defineProperty(Interval.prototype, "min", { + get: $util.oneOfGetter($oneOfFields = ["minimum", "exclusiveMinimum"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Interval max. + * @member {"maximum"|"exclusiveMaximum"|undefined} max + * @memberof google.cloud.discoveryengine.v1beta.Interval + * @instance + */ + Object.defineProperty(Interval.prototype, "max", { + get: $util.oneOfGetter($oneOfFields = ["maximum", "exclusiveMaximum"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Interval instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.Interval + * @static + * @param {google.cloud.discoveryengine.v1beta.IInterval=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.Interval} Interval instance + */ + Interval.create = function create(properties) { + return new Interval(properties); + }; + + /** + * Encodes the specified Interval message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.Interval.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.Interval + * @static + * @param {google.cloud.discoveryengine.v1beta.IInterval} message Interval message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Interval.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.minimum != null && Object.hasOwnProperty.call(message, "minimum")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.minimum); + if (message.exclusiveMinimum != null && Object.hasOwnProperty.call(message, "exclusiveMinimum")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.exclusiveMinimum); + if (message.maximum != null && Object.hasOwnProperty.call(message, "maximum")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.maximum); + if (message.exclusiveMaximum != null && Object.hasOwnProperty.call(message, "exclusiveMaximum")) + writer.uint32(/* id 4, wireType 1 =*/33).double(message.exclusiveMaximum); + return writer; + }; + + /** + * Encodes the specified Interval message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.Interval.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.Interval + * @static + * @param {google.cloud.discoveryengine.v1beta.IInterval} message Interval message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Interval.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Interval message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.Interval + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.Interval} Interval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Interval.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.Interval(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.minimum = reader.double(); + break; + } + case 2: { + message.exclusiveMinimum = reader.double(); + break; + } + case 3: { + message.maximum = reader.double(); + break; + } + case 4: { + message.exclusiveMaximum = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Interval message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.Interval + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.Interval} Interval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Interval.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Interval message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.Interval + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Interval.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.minimum != null && message.hasOwnProperty("minimum")) { + properties.min = 1; + if (typeof message.minimum !== "number") + return "minimum: number expected"; + } + if (message.exclusiveMinimum != null && message.hasOwnProperty("exclusiveMinimum")) { + if (properties.min === 1) + return "min: multiple values"; + properties.min = 1; + if (typeof message.exclusiveMinimum !== "number") + return "exclusiveMinimum: number expected"; + } + if (message.maximum != null && message.hasOwnProperty("maximum")) { + properties.max = 1; + if (typeof message.maximum !== "number") + return "maximum: number expected"; + } + if (message.exclusiveMaximum != null && message.hasOwnProperty("exclusiveMaximum")) { + if (properties.max === 1) + return "max: multiple values"; + properties.max = 1; + if (typeof message.exclusiveMaximum !== "number") + return "exclusiveMaximum: number expected"; + } + return null; + }; + + /** + * Creates an Interval message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.Interval + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.Interval} Interval + */ + Interval.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.Interval) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.Interval(); + if (object.minimum != null) + message.minimum = Number(object.minimum); + if (object.exclusiveMinimum != null) + message.exclusiveMinimum = Number(object.exclusiveMinimum); + if (object.maximum != null) + message.maximum = Number(object.maximum); + if (object.exclusiveMaximum != null) + message.exclusiveMaximum = Number(object.exclusiveMaximum); + return message; + }; + + /** + * Creates a plain object from an Interval message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.Interval + * @static + * @param {google.cloud.discoveryengine.v1beta.Interval} message Interval + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Interval.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.minimum != null && message.hasOwnProperty("minimum")) { + object.minimum = options.json && !isFinite(message.minimum) ? String(message.minimum) : message.minimum; + if (options.oneofs) + object.min = "minimum"; + } + if (message.exclusiveMinimum != null && message.hasOwnProperty("exclusiveMinimum")) { + object.exclusiveMinimum = options.json && !isFinite(message.exclusiveMinimum) ? String(message.exclusiveMinimum) : message.exclusiveMinimum; + if (options.oneofs) + object.min = "exclusiveMinimum"; + } + if (message.maximum != null && message.hasOwnProperty("maximum")) { + object.maximum = options.json && !isFinite(message.maximum) ? String(message.maximum) : message.maximum; + if (options.oneofs) + object.max = "maximum"; + } + if (message.exclusiveMaximum != null && message.hasOwnProperty("exclusiveMaximum")) { + object.exclusiveMaximum = options.json && !isFinite(message.exclusiveMaximum) ? String(message.exclusiveMaximum) : message.exclusiveMaximum; + if (options.oneofs) + object.max = "exclusiveMaximum"; + } + return object; + }; + + /** + * Converts this Interval to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.Interval + * @instance + * @returns {Object.} JSON object + */ + Interval.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Interval + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.Interval + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Interval.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.Interval"; + }; + + return Interval; + })(); + v1beta.CustomAttribute = (function() { /** @@ -560,29 +877,95 @@ return UserInfo; })(); - v1beta.Document = (function() { + v1beta.CompletionService = (function() { /** - * Properties of a Document. + * Constructs a new CompletionService service. * @memberof google.cloud.discoveryengine.v1beta - * @interface IDocument - * @property {google.protobuf.IStruct|null} [structData] Document structData - * @property {string|null} [jsonData] Document jsonData - * @property {string|null} [name] Document name - * @property {string|null} [id] Document id - * @property {string|null} [schemaId] Document schemaId - * @property {string|null} [parentDocumentId] Document parentDocumentId + * @classdesc Represents a CompletionService + * @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 CompletionService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (CompletionService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = CompletionService; /** - * Constructs a new Document. + * Creates new CompletionService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.CompletionService + * @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 {CompletionService} RPC service. Useful where requests and/or responses are streamed. + */ + CompletionService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.discoveryengine.v1beta.CompletionService|completeQuery}. + * @memberof google.cloud.discoveryengine.v1beta.CompletionService + * @typedef CompleteQueryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.discoveryengine.v1beta.CompleteQueryResponse} [response] CompleteQueryResponse + */ + + /** + * Calls CompleteQuery. + * @function completeQuery + * @memberof google.cloud.discoveryengine.v1beta.CompletionService + * @instance + * @param {google.cloud.discoveryengine.v1beta.ICompleteQueryRequest} request CompleteQueryRequest message or plain object + * @param {google.cloud.discoveryengine.v1beta.CompletionService.CompleteQueryCallback} callback Node-style callback called with the error, if any, and CompleteQueryResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CompletionService.prototype.completeQuery = function completeQuery(request, callback) { + return this.rpcCall(completeQuery, $root.google.cloud.discoveryengine.v1beta.CompleteQueryRequest, $root.google.cloud.discoveryengine.v1beta.CompleteQueryResponse, request, callback); + }, "name", { value: "CompleteQuery" }); + + /** + * Calls CompleteQuery. + * @function completeQuery + * @memberof google.cloud.discoveryengine.v1beta.CompletionService + * @instance + * @param {google.cloud.discoveryengine.v1beta.ICompleteQueryRequest} request CompleteQueryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return CompletionService; + })(); + + v1beta.CompleteQueryRequest = (function() { + + /** + * Properties of a CompleteQueryRequest. * @memberof google.cloud.discoveryengine.v1beta - * @classdesc Represents a Document. - * @implements IDocument + * @interface ICompleteQueryRequest + * @property {string|null} [dataStore] CompleteQueryRequest dataStore + * @property {string|null} [query] CompleteQueryRequest query + * @property {string|null} [queryModel] CompleteQueryRequest queryModel + * @property {string|null} [userPseudoId] CompleteQueryRequest userPseudoId + */ + + /** + * Constructs a new CompleteQueryRequest. + * @memberof google.cloud.discoveryengine.v1beta + * @classdesc Represents a CompleteQueryRequest. + * @implements ICompleteQueryRequest * @constructor - * @param {google.cloud.discoveryengine.v1beta.IDocument=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1beta.ICompleteQueryRequest=} [properties] Properties to set */ - function Document(properties) { + function CompleteQueryRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -590,159 +973,117 @@ } /** - * Document structData. - * @member {google.protobuf.IStruct|null|undefined} structData - * @memberof google.cloud.discoveryengine.v1beta.Document + * CompleteQueryRequest dataStore. + * @member {string} dataStore + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryRequest * @instance */ - Document.prototype.structData = null; + CompleteQueryRequest.prototype.dataStore = ""; /** - * Document jsonData. - * @member {string|null|undefined} jsonData - * @memberof google.cloud.discoveryengine.v1beta.Document + * CompleteQueryRequest query. + * @member {string} query + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryRequest * @instance */ - Document.prototype.jsonData = null; + CompleteQueryRequest.prototype.query = ""; /** - * Document name. - * @member {string} name - * @memberof google.cloud.discoveryengine.v1beta.Document + * CompleteQueryRequest queryModel. + * @member {string} queryModel + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryRequest * @instance */ - Document.prototype.name = ""; + CompleteQueryRequest.prototype.queryModel = ""; /** - * Document id. - * @member {string} id - * @memberof google.cloud.discoveryengine.v1beta.Document + * CompleteQueryRequest userPseudoId. + * @member {string} userPseudoId + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryRequest * @instance */ - Document.prototype.id = ""; + CompleteQueryRequest.prototype.userPseudoId = ""; /** - * Document schemaId. - * @member {string} schemaId - * @memberof google.cloud.discoveryengine.v1beta.Document - * @instance - */ - Document.prototype.schemaId = ""; - - /** - * Document parentDocumentId. - * @member {string} parentDocumentId - * @memberof google.cloud.discoveryengine.v1beta.Document - * @instance - */ - Document.prototype.parentDocumentId = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Document data. - * @member {"structData"|"jsonData"|undefined} data - * @memberof google.cloud.discoveryengine.v1beta.Document - * @instance - */ - Object.defineProperty(Document.prototype, "data", { - get: $util.oneOfGetter($oneOfFields = ["structData", "jsonData"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Document instance using the specified properties. + * Creates a new CompleteQueryRequest instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1beta.Document + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryRequest * @static - * @param {google.cloud.discoveryengine.v1beta.IDocument=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1beta.Document} Document instance + * @param {google.cloud.discoveryengine.v1beta.ICompleteQueryRequest=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.CompleteQueryRequest} CompleteQueryRequest instance */ - Document.create = function create(properties) { - return new Document(properties); + CompleteQueryRequest.create = function create(properties) { + return new CompleteQueryRequest(properties); }; /** - * Encodes the specified Document message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.Document.verify|verify} messages. + * Encodes the specified CompleteQueryRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CompleteQueryRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1beta.Document + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryRequest * @static - * @param {google.cloud.discoveryengine.v1beta.IDocument} message Document message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.ICompleteQueryRequest} message CompleteQueryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Document.encode = function encode(message, writer) { + CompleteQueryRequest.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.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); - if (message.schemaId != null && Object.hasOwnProperty.call(message, "schemaId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.schemaId); - if (message.structData != null && Object.hasOwnProperty.call(message, "structData")) - $root.google.protobuf.Struct.encode(message.structData, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.jsonData != null && Object.hasOwnProperty.call(message, "jsonData")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.jsonData); - if (message.parentDocumentId != null && Object.hasOwnProperty.call(message, "parentDocumentId")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.parentDocumentId); + if (message.dataStore != null && Object.hasOwnProperty.call(message, "dataStore")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataStore); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.query); + if (message.queryModel != null && Object.hasOwnProperty.call(message, "queryModel")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.queryModel); + if (message.userPseudoId != null && Object.hasOwnProperty.call(message, "userPseudoId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.userPseudoId); return writer; }; /** - * Encodes the specified Document message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.Document.verify|verify} messages. + * Encodes the specified CompleteQueryRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CompleteQueryRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.Document + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryRequest * @static - * @param {google.cloud.discoveryengine.v1beta.IDocument} message Document message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.ICompleteQueryRequest} message CompleteQueryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Document.encodeDelimited = function encodeDelimited(message, writer) { + CompleteQueryRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Document message from the specified reader or buffer. + * Decodes a CompleteQueryRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1beta.Document + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1beta.Document} Document + * @returns {google.cloud.discoveryengine.v1beta.CompleteQueryRequest} CompleteQueryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Document.decode = function decode(reader, length) { + CompleteQueryRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.Document(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.CompleteQueryRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: { - message.structData = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - } - case 5: { - message.jsonData = reader.string(); - break; - } case 1: { - message.name = reader.string(); + message.dataStore = reader.string(); break; } case 2: { - message.id = reader.string(); + message.query = reader.string(); break; } case 3: { - message.schemaId = reader.string(); + message.queryModel = reader.string(); break; } - case 7: { - message.parentDocumentId = reader.string(); + case 4: { + message.userPseudoId = reader.string(); break; } default: @@ -754,489 +1095,227 @@ }; /** - * Decodes a Document message from the specified reader or buffer, length delimited. + * Decodes a CompleteQueryRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.Document + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1beta.Document} Document + * @returns {google.cloud.discoveryengine.v1beta.CompleteQueryRequest} CompleteQueryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Document.decodeDelimited = function decodeDelimited(reader) { + CompleteQueryRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Document message. + * Verifies a CompleteQueryRequest message. * @function verify - * @memberof google.cloud.discoveryengine.v1beta.Document + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Document.verify = function verify(message) { + CompleteQueryRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.structData != null && message.hasOwnProperty("structData")) { - properties.data = 1; - { - var error = $root.google.protobuf.Struct.verify(message.structData); - if (error) - return "structData." + error; - } - } - if (message.jsonData != null && message.hasOwnProperty("jsonData")) { - if (properties.data === 1) - return "data: multiple values"; - properties.data = 1; - if (!$util.isString(message.jsonData)) - return "jsonData: string expected"; - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.schemaId != null && message.hasOwnProperty("schemaId")) - if (!$util.isString(message.schemaId)) - return "schemaId: string expected"; - if (message.parentDocumentId != null && message.hasOwnProperty("parentDocumentId")) - if (!$util.isString(message.parentDocumentId)) - return "parentDocumentId: string expected"; + if (message.dataStore != null && message.hasOwnProperty("dataStore")) + if (!$util.isString(message.dataStore)) + return "dataStore: string expected"; + if (message.query != null && message.hasOwnProperty("query")) + if (!$util.isString(message.query)) + return "query: string expected"; + if (message.queryModel != null && message.hasOwnProperty("queryModel")) + if (!$util.isString(message.queryModel)) + return "queryModel: string expected"; + if (message.userPseudoId != null && message.hasOwnProperty("userPseudoId")) + if (!$util.isString(message.userPseudoId)) + return "userPseudoId: string expected"; return null; }; /** - * Creates a Document message from a plain object. Also converts values to their respective internal types. + * Creates a CompleteQueryRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1beta.Document + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1beta.Document} Document + * @returns {google.cloud.discoveryengine.v1beta.CompleteQueryRequest} CompleteQueryRequest */ - Document.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1beta.Document) + CompleteQueryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.CompleteQueryRequest) return object; - var message = new $root.google.cloud.discoveryengine.v1beta.Document(); - if (object.structData != null) { - if (typeof object.structData !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.Document.structData: object expected"); - message.structData = $root.google.protobuf.Struct.fromObject(object.structData); - } - if (object.jsonData != null) - message.jsonData = String(object.jsonData); - if (object.name != null) - message.name = String(object.name); - if (object.id != null) - message.id = String(object.id); - if (object.schemaId != null) - message.schemaId = String(object.schemaId); - if (object.parentDocumentId != null) - message.parentDocumentId = String(object.parentDocumentId); + var message = new $root.google.cloud.discoveryengine.v1beta.CompleteQueryRequest(); + if (object.dataStore != null) + message.dataStore = String(object.dataStore); + if (object.query != null) + message.query = String(object.query); + if (object.queryModel != null) + message.queryModel = String(object.queryModel); + if (object.userPseudoId != null) + message.userPseudoId = String(object.userPseudoId); return message; }; /** - * Creates a plain object from a Document message. Also converts values to other types if specified. + * Creates a plain object from a CompleteQueryRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1beta.Document + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryRequest * @static - * @param {google.cloud.discoveryengine.v1beta.Document} message Document + * @param {google.cloud.discoveryengine.v1beta.CompleteQueryRequest} message CompleteQueryRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Document.toObject = function toObject(message, options) { + CompleteQueryRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.id = ""; - object.schemaId = ""; - object.parentDocumentId = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.schemaId != null && message.hasOwnProperty("schemaId")) - object.schemaId = message.schemaId; - if (message.structData != null && message.hasOwnProperty("structData")) { - object.structData = $root.google.protobuf.Struct.toObject(message.structData, options); - if (options.oneofs) - object.data = "structData"; - } - if (message.jsonData != null && message.hasOwnProperty("jsonData")) { - object.jsonData = message.jsonData; - if (options.oneofs) - object.data = "jsonData"; + object.dataStore = ""; + object.query = ""; + object.queryModel = ""; + object.userPseudoId = ""; } - if (message.parentDocumentId != null && message.hasOwnProperty("parentDocumentId")) - object.parentDocumentId = message.parentDocumentId; + if (message.dataStore != null && message.hasOwnProperty("dataStore")) + object.dataStore = message.dataStore; + if (message.query != null && message.hasOwnProperty("query")) + object.query = message.query; + if (message.queryModel != null && message.hasOwnProperty("queryModel")) + object.queryModel = message.queryModel; + if (message.userPseudoId != null && message.hasOwnProperty("userPseudoId")) + object.userPseudoId = message.userPseudoId; return object; }; /** - * Converts this Document to JSON. + * Converts this CompleteQueryRequest to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1beta.Document + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryRequest * @instance * @returns {Object.} JSON object */ - Document.prototype.toJSON = function toJSON() { + CompleteQueryRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Document + * Gets the default type url for CompleteQueryRequest * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1beta.Document + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Document.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CompleteQueryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.Document"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.CompleteQueryRequest"; }; - return Document; + return CompleteQueryRequest; })(); - v1beta.DocumentService = (function() { + v1beta.CompleteQueryResponse = (function() { /** - * Constructs a new DocumentService service. + * Properties of a CompleteQueryResponse. * @memberof google.cloud.discoveryengine.v1beta - * @classdesc Represents a DocumentService - * @extends $protobuf.rpc.Service + * @interface ICompleteQueryResponse + * @property {Array.|null} [querySuggestions] CompleteQueryResponse querySuggestions + */ + + /** + * Constructs a new CompleteQueryResponse. + * @memberof google.cloud.discoveryengine.v1beta + * @classdesc Represents a CompleteQueryResponse. + * @implements ICompleteQueryResponse * @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 + * @param {google.cloud.discoveryengine.v1beta.ICompleteQueryResponse=} [properties] Properties to set */ - function DocumentService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + function CompleteQueryResponse(properties) { + this.querySuggestions = []; + 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]]; } - (DocumentService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DocumentService; + /** + * CompleteQueryResponse querySuggestions. + * @member {Array.} querySuggestions + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryResponse + * @instance + */ + CompleteQueryResponse.prototype.querySuggestions = $util.emptyArray; /** - * Creates new DocumentService service using the specified rpc implementation. + * Creates a new CompleteQueryResponse instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1beta.DocumentService + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryResponse * @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 {DocumentService} RPC service. Useful where requests and/or responses are streamed. + * @param {google.cloud.discoveryengine.v1beta.ICompleteQueryResponse=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.CompleteQueryResponse} CompleteQueryResponse instance */ - DocumentService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); + CompleteQueryResponse.create = function create(properties) { + return new CompleteQueryResponse(properties); }; /** - * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|getDocument}. - * @memberof google.cloud.discoveryengine.v1beta.DocumentService - * @typedef GetDocumentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.discoveryengine.v1beta.Document} [response] Document - */ - - /** - * Calls GetDocument. - * @function getDocument - * @memberof google.cloud.discoveryengine.v1beta.DocumentService - * @instance - * @param {google.cloud.discoveryengine.v1beta.IGetDocumentRequest} request GetDocumentRequest message or plain object - * @param {google.cloud.discoveryengine.v1beta.DocumentService.GetDocumentCallback} callback Node-style callback called with the error, if any, and Document - * @returns {undefined} - * @variation 1 + * Encodes the specified CompleteQueryResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CompleteQueryResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryResponse + * @static + * @param {google.cloud.discoveryengine.v1beta.ICompleteQueryResponse} message CompleteQueryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(DocumentService.prototype.getDocument = function getDocument(request, callback) { - return this.rpcCall(getDocument, $root.google.cloud.discoveryengine.v1beta.GetDocumentRequest, $root.google.cloud.discoveryengine.v1beta.Document, request, callback); - }, "name", { value: "GetDocument" }); + CompleteQueryResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.querySuggestions != null && message.querySuggestions.length) + for (var i = 0; i < message.querySuggestions.length; ++i) + $root.google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.encode(message.querySuggestions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; /** - * Calls GetDocument. - * @function getDocument - * @memberof google.cloud.discoveryengine.v1beta.DocumentService - * @instance - * @param {google.cloud.discoveryengine.v1beta.IGetDocumentRequest} request GetDocumentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified CompleteQueryResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CompleteQueryResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryResponse + * @static + * @param {google.cloud.discoveryengine.v1beta.ICompleteQueryResponse} message CompleteQueryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + CompleteQueryResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|listDocuments}. - * @memberof google.cloud.discoveryengine.v1beta.DocumentService - * @typedef ListDocumentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.discoveryengine.v1beta.ListDocumentsResponse} [response] ListDocumentsResponse + * Decodes a CompleteQueryResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.CompleteQueryResponse} CompleteQueryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - - /** - * Calls ListDocuments. - * @function listDocuments - * @memberof google.cloud.discoveryengine.v1beta.DocumentService - * @instance - * @param {google.cloud.discoveryengine.v1beta.IListDocumentsRequest} request ListDocumentsRequest message or plain object - * @param {google.cloud.discoveryengine.v1beta.DocumentService.ListDocumentsCallback} callback Node-style callback called with the error, if any, and ListDocumentsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DocumentService.prototype.listDocuments = function listDocuments(request, callback) { - return this.rpcCall(listDocuments, $root.google.cloud.discoveryengine.v1beta.ListDocumentsRequest, $root.google.cloud.discoveryengine.v1beta.ListDocumentsResponse, request, callback); - }, "name", { value: "ListDocuments" }); - - /** - * Calls ListDocuments. - * @function listDocuments - * @memberof google.cloud.discoveryengine.v1beta.DocumentService - * @instance - * @param {google.cloud.discoveryengine.v1beta.IListDocumentsRequest} request ListDocumentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|createDocument}. - * @memberof google.cloud.discoveryengine.v1beta.DocumentService - * @typedef CreateDocumentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.discoveryengine.v1beta.Document} [response] Document - */ - - /** - * Calls CreateDocument. - * @function createDocument - * @memberof google.cloud.discoveryengine.v1beta.DocumentService - * @instance - * @param {google.cloud.discoveryengine.v1beta.ICreateDocumentRequest} request CreateDocumentRequest message or plain object - * @param {google.cloud.discoveryengine.v1beta.DocumentService.CreateDocumentCallback} callback Node-style callback called with the error, if any, and Document - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DocumentService.prototype.createDocument = function createDocument(request, callback) { - return this.rpcCall(createDocument, $root.google.cloud.discoveryengine.v1beta.CreateDocumentRequest, $root.google.cloud.discoveryengine.v1beta.Document, request, callback); - }, "name", { value: "CreateDocument" }); - - /** - * Calls CreateDocument. - * @function createDocument - * @memberof google.cloud.discoveryengine.v1beta.DocumentService - * @instance - * @param {google.cloud.discoveryengine.v1beta.ICreateDocumentRequest} request CreateDocumentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|updateDocument}. - * @memberof google.cloud.discoveryengine.v1beta.DocumentService - * @typedef UpdateDocumentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.discoveryengine.v1beta.Document} [response] Document - */ - - /** - * Calls UpdateDocument. - * @function updateDocument - * @memberof google.cloud.discoveryengine.v1beta.DocumentService - * @instance - * @param {google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest} request UpdateDocumentRequest message or plain object - * @param {google.cloud.discoveryengine.v1beta.DocumentService.UpdateDocumentCallback} callback Node-style callback called with the error, if any, and Document - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DocumentService.prototype.updateDocument = function updateDocument(request, callback) { - return this.rpcCall(updateDocument, $root.google.cloud.discoveryengine.v1beta.UpdateDocumentRequest, $root.google.cloud.discoveryengine.v1beta.Document, request, callback); - }, "name", { value: "UpdateDocument" }); - - /** - * Calls UpdateDocument. - * @function updateDocument - * @memberof google.cloud.discoveryengine.v1beta.DocumentService - * @instance - * @param {google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest} request UpdateDocumentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|deleteDocument}. - * @memberof google.cloud.discoveryengine.v1beta.DocumentService - * @typedef DeleteDocumentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteDocument. - * @function deleteDocument - * @memberof google.cloud.discoveryengine.v1beta.DocumentService - * @instance - * @param {google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest} request DeleteDocumentRequest message or plain object - * @param {google.cloud.discoveryengine.v1beta.DocumentService.DeleteDocumentCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DocumentService.prototype.deleteDocument = function deleteDocument(request, callback) { - return this.rpcCall(deleteDocument, $root.google.cloud.discoveryengine.v1beta.DeleteDocumentRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteDocument" }); - - /** - * Calls DeleteDocument. - * @function deleteDocument - * @memberof google.cloud.discoveryengine.v1beta.DocumentService - * @instance - * @param {google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest} request DeleteDocumentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|importDocuments}. - * @memberof google.cloud.discoveryengine.v1beta.DocumentService - * @typedef ImportDocumentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls ImportDocuments. - * @function importDocuments - * @memberof google.cloud.discoveryengine.v1beta.DocumentService - * @instance - * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsRequest} request ImportDocumentsRequest message or plain object - * @param {google.cloud.discoveryengine.v1beta.DocumentService.ImportDocumentsCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(DocumentService.prototype.importDocuments = function importDocuments(request, callback) { - return this.rpcCall(importDocuments, $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ImportDocuments" }); - - /** - * Calls ImportDocuments. - * @function importDocuments - * @memberof google.cloud.discoveryengine.v1beta.DocumentService - * @instance - * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsRequest} request ImportDocumentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return DocumentService; - })(); - - v1beta.GetDocumentRequest = (function() { - - /** - * Properties of a GetDocumentRequest. - * @memberof google.cloud.discoveryengine.v1beta - * @interface IGetDocumentRequest - * @property {string|null} [name] GetDocumentRequest name - */ - - /** - * Constructs a new GetDocumentRequest. - * @memberof google.cloud.discoveryengine.v1beta - * @classdesc Represents a GetDocumentRequest. - * @implements IGetDocumentRequest - * @constructor - * @param {google.cloud.discoveryengine.v1beta.IGetDocumentRequest=} [properties] Properties to set - */ - function GetDocumentRequest(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]]; - } - - /** - * GetDocumentRequest name. - * @member {string} name - * @memberof google.cloud.discoveryengine.v1beta.GetDocumentRequest - * @instance - */ - GetDocumentRequest.prototype.name = ""; - - /** - * Creates a new GetDocumentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.discoveryengine.v1beta.GetDocumentRequest - * @static - * @param {google.cloud.discoveryengine.v1beta.IGetDocumentRequest=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1beta.GetDocumentRequest} GetDocumentRequest instance - */ - GetDocumentRequest.create = function create(properties) { - return new GetDocumentRequest(properties); - }; - - /** - * Encodes the specified GetDocumentRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.GetDocumentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.discoveryengine.v1beta.GetDocumentRequest - * @static - * @param {google.cloud.discoveryengine.v1beta.IGetDocumentRequest} message GetDocumentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetDocumentRequest.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 GetDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.GetDocumentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.GetDocumentRequest - * @static - * @param {google.cloud.discoveryengine.v1beta.IGetDocumentRequest} message GetDocumentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetDocumentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetDocumentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.discoveryengine.v1beta.GetDocumentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1beta.GetDocumentRequest} GetDocumentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetDocumentRequest.decode = function decode(reader, length) { + CompleteQueryResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.GetDocumentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.CompleteQueryResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.querySuggestions && message.querySuggestions.length)) + message.querySuggestions = []; + message.querySuggestions.push($root.google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.decode(reader, reader.uint32())); break; } default: @@ -1248,124 +1327,349 @@ }; /** - * Decodes a GetDocumentRequest message from the specified reader or buffer, length delimited. + * Decodes a CompleteQueryResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.GetDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1beta.GetDocumentRequest} GetDocumentRequest + * @returns {google.cloud.discoveryengine.v1beta.CompleteQueryResponse} CompleteQueryResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetDocumentRequest.decodeDelimited = function decodeDelimited(reader) { + CompleteQueryResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetDocumentRequest message. + * Verifies a CompleteQueryResponse message. * @function verify - * @memberof google.cloud.discoveryengine.v1beta.GetDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetDocumentRequest.verify = function verify(message) { + CompleteQueryResponse.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; + if (message.querySuggestions != null && message.hasOwnProperty("querySuggestions")) { + if (!Array.isArray(message.querySuggestions)) + return "querySuggestions: array expected"; + for (var i = 0; i < message.querySuggestions.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.verify(message.querySuggestions[i]); + if (error) + return "querySuggestions." + error; + } + } + return null; }; /** - * Creates a GetDocumentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CompleteQueryResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1beta.GetDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1beta.GetDocumentRequest} GetDocumentRequest + * @returns {google.cloud.discoveryengine.v1beta.CompleteQueryResponse} CompleteQueryResponse */ - GetDocumentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1beta.GetDocumentRequest) + CompleteQueryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.CompleteQueryResponse) return object; - var message = new $root.google.cloud.discoveryengine.v1beta.GetDocumentRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.discoveryengine.v1beta.CompleteQueryResponse(); + if (object.querySuggestions) { + if (!Array.isArray(object.querySuggestions)) + throw TypeError(".google.cloud.discoveryengine.v1beta.CompleteQueryResponse.querySuggestions: array expected"); + message.querySuggestions = []; + for (var i = 0; i < object.querySuggestions.length; ++i) { + if (typeof object.querySuggestions[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.CompleteQueryResponse.querySuggestions: object expected"); + message.querySuggestions[i] = $root.google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.fromObject(object.querySuggestions[i]); + } + } return message; }; /** - * Creates a plain object from a GetDocumentRequest message. Also converts values to other types if specified. + * Creates a plain object from a CompleteQueryResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1beta.GetDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryResponse * @static - * @param {google.cloud.discoveryengine.v1beta.GetDocumentRequest} message GetDocumentRequest + * @param {google.cloud.discoveryengine.v1beta.CompleteQueryResponse} message CompleteQueryResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetDocumentRequest.toObject = function toObject(message, options) { + CompleteQueryResponse.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; + if (options.arrays || options.defaults) + object.querySuggestions = []; + if (message.querySuggestions && message.querySuggestions.length) { + object.querySuggestions = []; + for (var j = 0; j < message.querySuggestions.length; ++j) + object.querySuggestions[j] = $root.google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.toObject(message.querySuggestions[j], options); + } return object; }; /** - * Converts this GetDocumentRequest to JSON. + * Converts this CompleteQueryResponse to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1beta.GetDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryResponse * @instance * @returns {Object.} JSON object */ - GetDocumentRequest.prototype.toJSON = function toJSON() { + CompleteQueryResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetDocumentRequest + * Gets the default type url for CompleteQueryResponse * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1beta.GetDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetDocumentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CompleteQueryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.GetDocumentRequest"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.CompleteQueryResponse"; }; - return GetDocumentRequest; + CompleteQueryResponse.QuerySuggestion = (function() { + + /** + * Properties of a QuerySuggestion. + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryResponse + * @interface IQuerySuggestion + * @property {string|null} [suggestion] QuerySuggestion suggestion + */ + + /** + * Constructs a new QuerySuggestion. + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryResponse + * @classdesc Represents a QuerySuggestion. + * @implements IQuerySuggestion + * @constructor + * @param {google.cloud.discoveryengine.v1beta.CompleteQueryResponse.IQuerySuggestion=} [properties] Properties to set + */ + function QuerySuggestion(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]]; + } + + /** + * QuerySuggestion suggestion. + * @member {string} suggestion + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion + * @instance + */ + QuerySuggestion.prototype.suggestion = ""; + + /** + * Creates a new QuerySuggestion instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion + * @static + * @param {google.cloud.discoveryengine.v1beta.CompleteQueryResponse.IQuerySuggestion=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion} QuerySuggestion instance + */ + QuerySuggestion.create = function create(properties) { + return new QuerySuggestion(properties); + }; + + /** + * Encodes the specified QuerySuggestion message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion + * @static + * @param {google.cloud.discoveryengine.v1beta.CompleteQueryResponse.IQuerySuggestion} message QuerySuggestion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuerySuggestion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.suggestion != null && Object.hasOwnProperty.call(message, "suggestion")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.suggestion); + return writer; + }; + + /** + * Encodes the specified QuerySuggestion message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion + * @static + * @param {google.cloud.discoveryengine.v1beta.CompleteQueryResponse.IQuerySuggestion} message QuerySuggestion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuerySuggestion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuerySuggestion message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion} QuerySuggestion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuerySuggestion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.suggestion = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuerySuggestion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion} QuerySuggestion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuerySuggestion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuerySuggestion message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuerySuggestion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.suggestion != null && message.hasOwnProperty("suggestion")) + if (!$util.isString(message.suggestion)) + return "suggestion: string expected"; + return null; + }; + + /** + * Creates a QuerySuggestion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion} QuerySuggestion + */ + QuerySuggestion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion(); + if (object.suggestion != null) + message.suggestion = String(object.suggestion); + return message; + }; + + /** + * Creates a plain object from a QuerySuggestion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion + * @static + * @param {google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion} message QuerySuggestion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuerySuggestion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.suggestion = ""; + if (message.suggestion != null && message.hasOwnProperty("suggestion")) + object.suggestion = message.suggestion; + return object; + }; + + /** + * Converts this QuerySuggestion to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion + * @instance + * @returns {Object.} JSON object + */ + QuerySuggestion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QuerySuggestion + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QuerySuggestion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion"; + }; + + return QuerySuggestion; + })(); + + return CompleteQueryResponse; })(); - v1beta.ListDocumentsRequest = (function() { + v1beta.Document = (function() { /** - * Properties of a ListDocumentsRequest. + * Properties of a Document. * @memberof google.cloud.discoveryengine.v1beta - * @interface IListDocumentsRequest - * @property {string|null} [parent] ListDocumentsRequest parent - * @property {number|null} [pageSize] ListDocumentsRequest pageSize - * @property {string|null} [pageToken] ListDocumentsRequest pageToken + * @interface IDocument + * @property {google.protobuf.IStruct|null} [structData] Document structData + * @property {string|null} [jsonData] Document jsonData + * @property {string|null} [name] Document name + * @property {string|null} [id] Document id + * @property {string|null} [schemaId] Document schemaId + * @property {google.cloud.discoveryengine.v1beta.Document.IContent|null} [content] Document content + * @property {string|null} [parentDocumentId] Document parentDocumentId + * @property {google.protobuf.IStruct|null} [derivedStructData] Document derivedStructData */ /** - * Constructs a new ListDocumentsRequest. + * Constructs a new Document. * @memberof google.cloud.discoveryengine.v1beta - * @classdesc Represents a ListDocumentsRequest. - * @implements IListDocumentsRequest + * @classdesc Represents a Document. + * @implements IDocument * @constructor - * @param {google.cloud.discoveryengine.v1beta.IListDocumentsRequest=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1beta.IDocument=} [properties] Properties to set */ - function ListDocumentsRequest(properties) { + function Document(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1373,103 +1677,187 @@ } /** - * ListDocumentsRequest parent. - * @member {string} parent - * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest + * Document structData. + * @member {google.protobuf.IStruct|null|undefined} structData + * @memberof google.cloud.discoveryengine.v1beta.Document * @instance */ - ListDocumentsRequest.prototype.parent = ""; + Document.prototype.structData = null; /** - * ListDocumentsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest + * Document jsonData. + * @member {string|null|undefined} jsonData + * @memberof google.cloud.discoveryengine.v1beta.Document * @instance */ - ListDocumentsRequest.prototype.pageSize = 0; + Document.prototype.jsonData = null; /** - * ListDocumentsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest + * Document name. + * @member {string} name + * @memberof google.cloud.discoveryengine.v1beta.Document * @instance */ - ListDocumentsRequest.prototype.pageToken = ""; + Document.prototype.name = ""; /** - * Creates a new ListDocumentsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest - * @static - * @param {google.cloud.discoveryengine.v1beta.IListDocumentsRequest=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1beta.ListDocumentsRequest} ListDocumentsRequest instance + * Document id. + * @member {string} id + * @memberof google.cloud.discoveryengine.v1beta.Document + * @instance */ - ListDocumentsRequest.create = function create(properties) { - return new ListDocumentsRequest(properties); - }; + Document.prototype.id = ""; /** - * Encodes the specified ListDocumentsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ListDocumentsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest - * @static - * @param {google.cloud.discoveryengine.v1beta.IListDocumentsRequest} message ListDocumentsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Document schemaId. + * @member {string} schemaId + * @memberof google.cloud.discoveryengine.v1beta.Document + * @instance */ - ListDocumentsRequest.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); - return writer; - }; + Document.prototype.schemaId = ""; /** - * Encodes the specified ListDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ListDocumentsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest - * @static - * @param {google.cloud.discoveryengine.v1beta.IListDocumentsRequest} message ListDocumentsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * Document content. + * @member {google.cloud.discoveryengine.v1beta.Document.IContent|null|undefined} content + * @memberof google.cloud.discoveryengine.v1beta.Document + * @instance + */ + Document.prototype.content = null; + + /** + * Document parentDocumentId. + * @member {string} parentDocumentId + * @memberof google.cloud.discoveryengine.v1beta.Document + * @instance + */ + Document.prototype.parentDocumentId = ""; + + /** + * Document derivedStructData. + * @member {google.protobuf.IStruct|null|undefined} derivedStructData + * @memberof google.cloud.discoveryengine.v1beta.Document + * @instance + */ + Document.prototype.derivedStructData = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Document data. + * @member {"structData"|"jsonData"|undefined} data + * @memberof google.cloud.discoveryengine.v1beta.Document + * @instance + */ + Object.defineProperty(Document.prototype, "data", { + get: $util.oneOfGetter($oneOfFields = ["structData", "jsonData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Document instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.Document + * @static + * @param {google.cloud.discoveryengine.v1beta.IDocument=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.Document} Document instance + */ + Document.create = function create(properties) { + return new Document(properties); + }; + + /** + * Encodes the specified Document message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.Document.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.Document + * @static + * @param {google.cloud.discoveryengine.v1beta.IDocument} message Document message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListDocumentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + Document.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.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); + if (message.schemaId != null && Object.hasOwnProperty.call(message, "schemaId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.schemaId); + if (message.structData != null && Object.hasOwnProperty.call(message, "structData")) + $root.google.protobuf.Struct.encode(message.structData, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.jsonData != null && Object.hasOwnProperty.call(message, "jsonData")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.jsonData); + if (message.derivedStructData != null && Object.hasOwnProperty.call(message, "derivedStructData")) + $root.google.protobuf.Struct.encode(message.derivedStructData, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.parentDocumentId != null && Object.hasOwnProperty.call(message, "parentDocumentId")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.parentDocumentId); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + $root.google.cloud.discoveryengine.v1beta.Document.Content.encode(message.content, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Document message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.Document.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.Document + * @static + * @param {google.cloud.discoveryengine.v1beta.IDocument} message Document message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Document.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListDocumentsRequest message from the specified reader or buffer. + * Decodes a Document message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest + * @memberof google.cloud.discoveryengine.v1beta.Document * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1beta.ListDocumentsRequest} ListDocumentsRequest + * @returns {google.cloud.discoveryengine.v1beta.Document} Document * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDocumentsRequest.decode = function decode(reader, length) { + Document.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.ListDocumentsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.Document(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 4: { + message.structData = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 5: { + message.jsonData = reader.string(); + break; + } case 1: { - message.parent = reader.string(); + message.name = reader.string(); break; } case 2: { - message.pageSize = reader.int32(); + message.id = reader.string(); break; } case 3: { - message.pageToken = reader.string(); + message.schemaId = reader.string(); + break; + } + case 10: { + message.content = $root.google.cloud.discoveryengine.v1beta.Document.Content.decode(reader, reader.uint32()); + break; + } + case 7: { + message.parentDocumentId = reader.string(); + break; + } + case 6: { + message.derivedStructData = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; } default: @@ -1481,493 +1869,825 @@ }; /** - * Decodes a ListDocumentsRequest message from the specified reader or buffer, length delimited. + * Decodes a Document message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest + * @memberof google.cloud.discoveryengine.v1beta.Document * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1beta.ListDocumentsRequest} ListDocumentsRequest + * @returns {google.cloud.discoveryengine.v1beta.Document} Document * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListDocumentsRequest.decodeDelimited = function decodeDelimited(reader) { + Document.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListDocumentsRequest message. + * Verifies a Document message. * @function verify - * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest + * @memberof google.cloud.discoveryengine.v1beta.Document * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListDocumentsRequest.verify = function verify(message) { + Document.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"; + var properties = {}; + if (message.structData != null && message.hasOwnProperty("structData")) { + properties.data = 1; + { + var error = $root.google.protobuf.Struct.verify(message.structData); + if (error) + return "structData." + error; + } + } + if (message.jsonData != null && message.hasOwnProperty("jsonData")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + if (!$util.isString(message.jsonData)) + return "jsonData: string expected"; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.schemaId != null && message.hasOwnProperty("schemaId")) + if (!$util.isString(message.schemaId)) + return "schemaId: string expected"; + if (message.content != null && message.hasOwnProperty("content")) { + var error = $root.google.cloud.discoveryengine.v1beta.Document.Content.verify(message.content); + if (error) + return "content." + error; + } + if (message.parentDocumentId != null && message.hasOwnProperty("parentDocumentId")) + if (!$util.isString(message.parentDocumentId)) + return "parentDocumentId: string expected"; + if (message.derivedStructData != null && message.hasOwnProperty("derivedStructData")) { + var error = $root.google.protobuf.Struct.verify(message.derivedStructData); + if (error) + return "derivedStructData." + error; + } return null; }; /** - * Creates a ListDocumentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Document message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest + * @memberof google.cloud.discoveryengine.v1beta.Document * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1beta.ListDocumentsRequest} ListDocumentsRequest + * @returns {google.cloud.discoveryengine.v1beta.Document} Document */ - ListDocumentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1beta.ListDocumentsRequest) + Document.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.Document) return object; - var message = new $root.google.cloud.discoveryengine.v1beta.ListDocumentsRequest(); - 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); + var message = new $root.google.cloud.discoveryengine.v1beta.Document(); + if (object.structData != null) { + if (typeof object.structData !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.Document.structData: object expected"); + message.structData = $root.google.protobuf.Struct.fromObject(object.structData); + } + if (object.jsonData != null) + message.jsonData = String(object.jsonData); + if (object.name != null) + message.name = String(object.name); + if (object.id != null) + message.id = String(object.id); + if (object.schemaId != null) + message.schemaId = String(object.schemaId); + if (object.content != null) { + if (typeof object.content !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.Document.content: object expected"); + message.content = $root.google.cloud.discoveryengine.v1beta.Document.Content.fromObject(object.content); + } + if (object.parentDocumentId != null) + message.parentDocumentId = String(object.parentDocumentId); + if (object.derivedStructData != null) { + if (typeof object.derivedStructData !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.Document.derivedStructData: object expected"); + message.derivedStructData = $root.google.protobuf.Struct.fromObject(object.derivedStructData); + } return message; }; /** - * Creates a plain object from a ListDocumentsRequest message. Also converts values to other types if specified. + * Creates a plain object from a Document message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest + * @memberof google.cloud.discoveryengine.v1beta.Document * @static - * @param {google.cloud.discoveryengine.v1beta.ListDocumentsRequest} message ListDocumentsRequest + * @param {google.cloud.discoveryengine.v1beta.Document} message Document * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDocumentsRequest.toObject = function toObject(message, options) { + Document.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; + object.name = ""; + object.id = ""; + object.schemaId = ""; + object.derivedStructData = null; + object.parentDocumentId = ""; + object.content = null; } - 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.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.schemaId != null && message.hasOwnProperty("schemaId")) + object.schemaId = message.schemaId; + if (message.structData != null && message.hasOwnProperty("structData")) { + object.structData = $root.google.protobuf.Struct.toObject(message.structData, options); + if (options.oneofs) + object.data = "structData"; + } + if (message.jsonData != null && message.hasOwnProperty("jsonData")) { + object.jsonData = message.jsonData; + if (options.oneofs) + object.data = "jsonData"; + } + if (message.derivedStructData != null && message.hasOwnProperty("derivedStructData")) + object.derivedStructData = $root.google.protobuf.Struct.toObject(message.derivedStructData, options); + if (message.parentDocumentId != null && message.hasOwnProperty("parentDocumentId")) + object.parentDocumentId = message.parentDocumentId; + if (message.content != null && message.hasOwnProperty("content")) + object.content = $root.google.cloud.discoveryengine.v1beta.Document.Content.toObject(message.content, options); return object; }; /** - * Converts this ListDocumentsRequest to JSON. + * Converts this Document to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest + * @memberof google.cloud.discoveryengine.v1beta.Document * @instance * @returns {Object.} JSON object */ - ListDocumentsRequest.prototype.toJSON = function toJSON() { + Document.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListDocumentsRequest + * Gets the default type url for Document * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest + * @memberof google.cloud.discoveryengine.v1beta.Document * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListDocumentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Document.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ListDocumentsRequest"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.Document"; }; - return ListDocumentsRequest; + Document.Content = (function() { + + /** + * Properties of a Content. + * @memberof google.cloud.discoveryengine.v1beta.Document + * @interface IContent + * @property {Uint8Array|null} [rawBytes] Content rawBytes + * @property {string|null} [uri] Content uri + * @property {string|null} [mimeType] Content mimeType + */ + + /** + * Constructs a new Content. + * @memberof google.cloud.discoveryengine.v1beta.Document + * @classdesc Represents a Content. + * @implements IContent + * @constructor + * @param {google.cloud.discoveryengine.v1beta.Document.IContent=} [properties] Properties to set + */ + function Content(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]]; + } + + /** + * Content rawBytes. + * @member {Uint8Array|null|undefined} rawBytes + * @memberof google.cloud.discoveryengine.v1beta.Document.Content + * @instance + */ + Content.prototype.rawBytes = null; + + /** + * Content uri. + * @member {string|null|undefined} uri + * @memberof google.cloud.discoveryengine.v1beta.Document.Content + * @instance + */ + Content.prototype.uri = null; + + /** + * Content mimeType. + * @member {string} mimeType + * @memberof google.cloud.discoveryengine.v1beta.Document.Content + * @instance + */ + Content.prototype.mimeType = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Content content. + * @member {"rawBytes"|"uri"|undefined} content + * @memberof google.cloud.discoveryengine.v1beta.Document.Content + * @instance + */ + Object.defineProperty(Content.prototype, "content", { + get: $util.oneOfGetter($oneOfFields = ["rawBytes", "uri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Content instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.Document.Content + * @static + * @param {google.cloud.discoveryengine.v1beta.Document.IContent=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.Document.Content} Content instance + */ + Content.create = function create(properties) { + return new Content(properties); + }; + + /** + * Encodes the specified Content message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.Document.Content.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.Document.Content + * @static + * @param {google.cloud.discoveryengine.v1beta.Document.IContent} message Content message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Content.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.mimeType); + if (message.rawBytes != null && Object.hasOwnProperty.call(message, "rawBytes")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.rawBytes); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.uri); + return writer; + }; + + /** + * Encodes the specified Content message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.Document.Content.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.Document.Content + * @static + * @param {google.cloud.discoveryengine.v1beta.Document.IContent} message Content message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Content.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Content message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.Document.Content + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.Document.Content} Content + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Content.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.Document.Content(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.rawBytes = reader.bytes(); + break; + } + case 3: { + message.uri = reader.string(); + break; + } + case 1: { + message.mimeType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Content message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.Document.Content + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.Document.Content} Content + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Content.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Content message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.Document.Content + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Content.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.rawBytes != null && message.hasOwnProperty("rawBytes")) { + properties.content = 1; + if (!(message.rawBytes && typeof message.rawBytes.length === "number" || $util.isString(message.rawBytes))) + return "rawBytes: buffer expected"; + } + if (message.uri != null && message.hasOwnProperty("uri")) { + if (properties.content === 1) + return "content: multiple values"; + properties.content = 1; + if (!$util.isString(message.uri)) + return "uri: string expected"; + } + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + if (!$util.isString(message.mimeType)) + return "mimeType: string expected"; + return null; + }; + + /** + * Creates a Content message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.Document.Content + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.Document.Content} Content + */ + Content.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.Document.Content) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.Document.Content(); + if (object.rawBytes != null) + if (typeof object.rawBytes === "string") + $util.base64.decode(object.rawBytes, message.rawBytes = $util.newBuffer($util.base64.length(object.rawBytes)), 0); + else if (object.rawBytes.length >= 0) + message.rawBytes = object.rawBytes; + if (object.uri != null) + message.uri = String(object.uri); + if (object.mimeType != null) + message.mimeType = String(object.mimeType); + return message; + }; + + /** + * Creates a plain object from a Content message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.Document.Content + * @static + * @param {google.cloud.discoveryengine.v1beta.Document.Content} message Content + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Content.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.mimeType = ""; + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + object.mimeType = message.mimeType; + if (message.rawBytes != null && message.hasOwnProperty("rawBytes")) { + object.rawBytes = options.bytes === String ? $util.base64.encode(message.rawBytes, 0, message.rawBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.rawBytes) : message.rawBytes; + if (options.oneofs) + object.content = "rawBytes"; + } + if (message.uri != null && message.hasOwnProperty("uri")) { + object.uri = message.uri; + if (options.oneofs) + object.content = "uri"; + } + return object; + }; + + /** + * Converts this Content to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.Document.Content + * @instance + * @returns {Object.} JSON object + */ + Content.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Content + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.Document.Content + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Content.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.Document.Content"; + }; + + return Content; + })(); + + return Document; })(); - v1beta.ListDocumentsResponse = (function() { + v1beta.DocumentService = (function() { /** - * Properties of a ListDocumentsResponse. + * Constructs a new DocumentService service. * @memberof google.cloud.discoveryengine.v1beta - * @interface IListDocumentsResponse - * @property {Array.|null} [documents] ListDocumentsResponse documents - * @property {string|null} [nextPageToken] ListDocumentsResponse nextPageToken + * @classdesc Represents a DocumentService + * @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 DocumentService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (DocumentService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DocumentService; /** - * Constructs a new ListDocumentsResponse. - * @memberof google.cloud.discoveryengine.v1beta - * @classdesc Represents a ListDocumentsResponse. - * @implements IListDocumentsResponse - * @constructor - * @param {google.cloud.discoveryengine.v1beta.IListDocumentsResponse=} [properties] Properties to set + * Creates new DocumentService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.DocumentService + * @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 {DocumentService} RPC service. Useful where requests and/or responses are streamed. */ - function ListDocumentsResponse(properties) { - this.documents = []; - 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]]; - } + DocumentService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * ListDocumentsResponse documents. - * @member {Array.} documents - * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse - * @instance + * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|getDocument}. + * @memberof google.cloud.discoveryengine.v1beta.DocumentService + * @typedef GetDocumentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.discoveryengine.v1beta.Document} [response] Document */ - ListDocumentsResponse.prototype.documents = $util.emptyArray; /** - * ListDocumentsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse + * Calls GetDocument. + * @function getDocument + * @memberof google.cloud.discoveryengine.v1beta.DocumentService * @instance + * @param {google.cloud.discoveryengine.v1beta.IGetDocumentRequest} request GetDocumentRequest message or plain object + * @param {google.cloud.discoveryengine.v1beta.DocumentService.GetDocumentCallback} callback Node-style callback called with the error, if any, and Document + * @returns {undefined} + * @variation 1 */ - ListDocumentsResponse.prototype.nextPageToken = ""; + Object.defineProperty(DocumentService.prototype.getDocument = function getDocument(request, callback) { + return this.rpcCall(getDocument, $root.google.cloud.discoveryengine.v1beta.GetDocumentRequest, $root.google.cloud.discoveryengine.v1beta.Document, request, callback); + }, "name", { value: "GetDocument" }); /** - * Creates a new ListDocumentsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse - * @static - * @param {google.cloud.discoveryengine.v1beta.IListDocumentsResponse=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1beta.ListDocumentsResponse} ListDocumentsResponse instance + * Calls GetDocument. + * @function getDocument + * @memberof google.cloud.discoveryengine.v1beta.DocumentService + * @instance + * @param {google.cloud.discoveryengine.v1beta.IGetDocumentRequest} request GetDocumentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListDocumentsResponse.create = function create(properties) { - return new ListDocumentsResponse(properties); - }; /** - * Encodes the specified ListDocumentsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ListDocumentsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse - * @static - * @param {google.cloud.discoveryengine.v1beta.IListDocumentsResponse} message ListDocumentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|listDocuments}. + * @memberof google.cloud.discoveryengine.v1beta.DocumentService + * @typedef ListDocumentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.discoveryengine.v1beta.ListDocumentsResponse} [response] ListDocumentsResponse */ - ListDocumentsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.documents != null && message.documents.length) - for (var i = 0; i < message.documents.length; ++i) - $root.google.cloud.discoveryengine.v1beta.Document.encode(message.documents[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 ListDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ListDocumentsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse - * @static - * @param {google.cloud.discoveryengine.v1beta.IListDocumentsResponse} message ListDocumentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListDocuments. + * @function listDocuments + * @memberof google.cloud.discoveryengine.v1beta.DocumentService + * @instance + * @param {google.cloud.discoveryengine.v1beta.IListDocumentsRequest} request ListDocumentsRequest message or plain object + * @param {google.cloud.discoveryengine.v1beta.DocumentService.ListDocumentsCallback} callback Node-style callback called with the error, if any, and ListDocumentsResponse + * @returns {undefined} + * @variation 1 */ - ListDocumentsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(DocumentService.prototype.listDocuments = function listDocuments(request, callback) { + return this.rpcCall(listDocuments, $root.google.cloud.discoveryengine.v1beta.ListDocumentsRequest, $root.google.cloud.discoveryengine.v1beta.ListDocumentsResponse, request, callback); + }, "name", { value: "ListDocuments" }); /** - * Decodes a ListDocumentsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1beta.ListDocumentsResponse} ListDocumentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListDocuments. + * @function listDocuments + * @memberof google.cloud.discoveryengine.v1beta.DocumentService + * @instance + * @param {google.cloud.discoveryengine.v1beta.IListDocumentsRequest} request ListDocumentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListDocumentsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.ListDocumentsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.documents && message.documents.length)) - message.documents = []; - message.documents.push($root.google.cloud.discoveryengine.v1beta.Document.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a ListDocumentsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1beta.ListDocumentsResponse} ListDocumentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|createDocument}. + * @memberof google.cloud.discoveryengine.v1beta.DocumentService + * @typedef CreateDocumentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.discoveryengine.v1beta.Document} [response] Document */ - ListDocumentsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a ListDocumentsResponse message. - * @function verify - * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls CreateDocument. + * @function createDocument + * @memberof google.cloud.discoveryengine.v1beta.DocumentService + * @instance + * @param {google.cloud.discoveryengine.v1beta.ICreateDocumentRequest} request CreateDocumentRequest message or plain object + * @param {google.cloud.discoveryengine.v1beta.DocumentService.CreateDocumentCallback} callback Node-style callback called with the error, if any, and Document + * @returns {undefined} + * @variation 1 */ - ListDocumentsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.documents != null && message.hasOwnProperty("documents")) { - if (!Array.isArray(message.documents)) - return "documents: array expected"; - for (var i = 0; i < message.documents.length; ++i) { - var error = $root.google.cloud.discoveryengine.v1beta.Document.verify(message.documents[i]); - if (error) - return "documents." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + Object.defineProperty(DocumentService.prototype.createDocument = function createDocument(request, callback) { + return this.rpcCall(createDocument, $root.google.cloud.discoveryengine.v1beta.CreateDocumentRequest, $root.google.cloud.discoveryengine.v1beta.Document, request, callback); + }, "name", { value: "CreateDocument" }); /** - * Creates a ListDocumentsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1beta.ListDocumentsResponse} ListDocumentsResponse + * Calls CreateDocument. + * @function createDocument + * @memberof google.cloud.discoveryengine.v1beta.DocumentService + * @instance + * @param {google.cloud.discoveryengine.v1beta.ICreateDocumentRequest} request CreateDocumentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListDocumentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1beta.ListDocumentsResponse) - return object; - var message = new $root.google.cloud.discoveryengine.v1beta.ListDocumentsResponse(); - if (object.documents) { - if (!Array.isArray(object.documents)) - throw TypeError(".google.cloud.discoveryengine.v1beta.ListDocumentsResponse.documents: array expected"); - message.documents = []; - for (var i = 0; i < object.documents.length; ++i) { - if (typeof object.documents[i] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.ListDocumentsResponse.documents: object expected"); - message.documents[i] = $root.google.cloud.discoveryengine.v1beta.Document.fromObject(object.documents[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; /** - * Creates a plain object from a ListDocumentsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse - * @static - * @param {google.cloud.discoveryengine.v1beta.ListDocumentsResponse} message ListDocumentsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|updateDocument}. + * @memberof google.cloud.discoveryengine.v1beta.DocumentService + * @typedef UpdateDocumentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.discoveryengine.v1beta.Document} [response] Document */ - ListDocumentsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.documents = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.documents && message.documents.length) { - object.documents = []; - for (var j = 0; j < message.documents.length; ++j) - object.documents[j] = $root.google.cloud.discoveryengine.v1beta.Document.toObject(message.documents[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; /** - * Converts this ListDocumentsResponse to JSON. - * @function toJSON - * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse + * Calls UpdateDocument. + * @function updateDocument + * @memberof google.cloud.discoveryengine.v1beta.DocumentService * @instance - * @returns {Object.} JSON object + * @param {google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest} request UpdateDocumentRequest message or plain object + * @param {google.cloud.discoveryengine.v1beta.DocumentService.UpdateDocumentCallback} callback Node-style callback called with the error, if any, and Document + * @returns {undefined} + * @variation 1 */ - ListDocumentsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(DocumentService.prototype.updateDocument = function updateDocument(request, callback) { + return this.rpcCall(updateDocument, $root.google.cloud.discoveryengine.v1beta.UpdateDocumentRequest, $root.google.cloud.discoveryengine.v1beta.Document, request, callback); + }, "name", { value: "UpdateDocument" }); /** - * Gets the default type url for ListDocumentsResponse - * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Calls UpdateDocument. + * @function updateDocument + * @memberof google.cloud.discoveryengine.v1beta.DocumentService + * @instance + * @param {google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest} request UpdateDocumentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListDocumentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ListDocumentsResponse"; - }; - return ListDocumentsResponse; - })(); + /** + * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|deleteDocument}. + * @memberof google.cloud.discoveryengine.v1beta.DocumentService + * @typedef DeleteDocumentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ - v1beta.CreateDocumentRequest = (function() { + /** + * Calls DeleteDocument. + * @function deleteDocument + * @memberof google.cloud.discoveryengine.v1beta.DocumentService + * @instance + * @param {google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest} request DeleteDocumentRequest message or plain object + * @param {google.cloud.discoveryengine.v1beta.DocumentService.DeleteDocumentCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DocumentService.prototype.deleteDocument = function deleteDocument(request, callback) { + return this.rpcCall(deleteDocument, $root.google.cloud.discoveryengine.v1beta.DeleteDocumentRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteDocument" }); /** - * Properties of a CreateDocumentRequest. - * @memberof google.cloud.discoveryengine.v1beta - * @interface ICreateDocumentRequest - * @property {string|null} [parent] CreateDocumentRequest parent - * @property {google.cloud.discoveryengine.v1beta.IDocument|null} [document] CreateDocumentRequest document - * @property {string|null} [documentId] CreateDocumentRequest documentId + * Calls DeleteDocument. + * @function deleteDocument + * @memberof google.cloud.discoveryengine.v1beta.DocumentService + * @instance + * @param {google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest} request DeleteDocumentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new CreateDocumentRequest. - * @memberof google.cloud.discoveryengine.v1beta - * @classdesc Represents a CreateDocumentRequest. - * @implements ICreateDocumentRequest - * @constructor - * @param {google.cloud.discoveryengine.v1beta.ICreateDocumentRequest=} [properties] Properties to set + * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|importDocuments}. + * @memberof google.cloud.discoveryengine.v1beta.DocumentService + * @typedef ImportDocumentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - function CreateDocumentRequest(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]]; - } /** - * CreateDocumentRequest parent. - * @member {string} parent - * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest + * Calls ImportDocuments. + * @function importDocuments + * @memberof google.cloud.discoveryengine.v1beta.DocumentService * @instance + * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsRequest} request ImportDocumentsRequest message or plain object + * @param {google.cloud.discoveryengine.v1beta.DocumentService.ImportDocumentsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - CreateDocumentRequest.prototype.parent = ""; + Object.defineProperty(DocumentService.prototype.importDocuments = function importDocuments(request, callback) { + return this.rpcCall(importDocuments, $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ImportDocuments" }); /** - * CreateDocumentRequest document. - * @member {google.cloud.discoveryengine.v1beta.IDocument|null|undefined} document - * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest + * Calls ImportDocuments. + * @function importDocuments + * @memberof google.cloud.discoveryengine.v1beta.DocumentService * @instance + * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsRequest} request ImportDocumentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - CreateDocumentRequest.prototype.document = null; /** - * CreateDocumentRequest documentId. - * @member {string} documentId - * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest + * Callback as used by {@link google.cloud.discoveryengine.v1beta.DocumentService|purgeDocuments}. + * @memberof google.cloud.discoveryengine.v1beta.DocumentService + * @typedef PurgeDocumentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls PurgeDocuments. + * @function purgeDocuments + * @memberof google.cloud.discoveryengine.v1beta.DocumentService * @instance + * @param {google.cloud.discoveryengine.v1beta.IPurgeDocumentsRequest} request PurgeDocumentsRequest message or plain object + * @param {google.cloud.discoveryengine.v1beta.DocumentService.PurgeDocumentsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - CreateDocumentRequest.prototype.documentId = ""; + Object.defineProperty(DocumentService.prototype.purgeDocuments = function purgeDocuments(request, callback) { + return this.rpcCall(purgeDocuments, $root.google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "PurgeDocuments" }); /** - * Creates a new CreateDocumentRequest instance using the specified properties. + * Calls PurgeDocuments. + * @function purgeDocuments + * @memberof google.cloud.discoveryengine.v1beta.DocumentService + * @instance + * @param {google.cloud.discoveryengine.v1beta.IPurgeDocumentsRequest} request PurgeDocumentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return DocumentService; + })(); + + v1beta.GetDocumentRequest = (function() { + + /** + * Properties of a GetDocumentRequest. + * @memberof google.cloud.discoveryengine.v1beta + * @interface IGetDocumentRequest + * @property {string|null} [name] GetDocumentRequest name + */ + + /** + * Constructs a new GetDocumentRequest. + * @memberof google.cloud.discoveryengine.v1beta + * @classdesc Represents a GetDocumentRequest. + * @implements IGetDocumentRequest + * @constructor + * @param {google.cloud.discoveryengine.v1beta.IGetDocumentRequest=} [properties] Properties to set + */ + function GetDocumentRequest(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]]; + } + + /** + * GetDocumentRequest name. + * @member {string} name + * @memberof google.cloud.discoveryengine.v1beta.GetDocumentRequest + * @instance + */ + GetDocumentRequest.prototype.name = ""; + + /** + * Creates a new GetDocumentRequest instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.GetDocumentRequest * @static - * @param {google.cloud.discoveryengine.v1beta.ICreateDocumentRequest=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1beta.CreateDocumentRequest} CreateDocumentRequest instance + * @param {google.cloud.discoveryengine.v1beta.IGetDocumentRequest=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.GetDocumentRequest} GetDocumentRequest instance */ - CreateDocumentRequest.create = function create(properties) { - return new CreateDocumentRequest(properties); + GetDocumentRequest.create = function create(properties) { + return new GetDocumentRequest(properties); }; /** - * Encodes the specified CreateDocumentRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CreateDocumentRequest.verify|verify} messages. + * Encodes the specified GetDocumentRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.GetDocumentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.GetDocumentRequest * @static - * @param {google.cloud.discoveryengine.v1beta.ICreateDocumentRequest} message CreateDocumentRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.IGetDocumentRequest} message GetDocumentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateDocumentRequest.encode = function encode(message, writer) { + GetDocumentRequest.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.document != null && Object.hasOwnProperty.call(message, "document")) - $root.google.cloud.discoveryengine.v1beta.Document.encode(message.document, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.documentId != null && Object.hasOwnProperty.call(message, "documentId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.documentId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified CreateDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CreateDocumentRequest.verify|verify} messages. + * Encodes the specified GetDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.GetDocumentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.GetDocumentRequest * @static - * @param {google.cloud.discoveryengine.v1beta.ICreateDocumentRequest} message CreateDocumentRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.IGetDocumentRequest} message GetDocumentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateDocumentRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetDocumentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateDocumentRequest message from the specified reader or buffer. + * Decodes a GetDocumentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.GetDocumentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1beta.CreateDocumentRequest} CreateDocumentRequest + * @returns {google.cloud.discoveryengine.v1beta.GetDocumentRequest} GetDocumentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateDocumentRequest.decode = function decode(reader, length) { + GetDocumentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.CreateDocumentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.GetDocumentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.document = $root.google.cloud.discoveryengine.v1beta.Document.decode(reader, reader.uint32()); - break; - } - case 3: { - message.documentId = reader.string(); + message.name = reader.string(); break; } default: @@ -1979,145 +2699,124 @@ }; /** - * Decodes a CreateDocumentRequest message from the specified reader or buffer, length delimited. + * Decodes a GetDocumentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.GetDocumentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1beta.CreateDocumentRequest} CreateDocumentRequest + * @returns {google.cloud.discoveryengine.v1beta.GetDocumentRequest} GetDocumentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateDocumentRequest.decodeDelimited = function decodeDelimited(reader) { + GetDocumentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateDocumentRequest message. + * Verifies a GetDocumentRequest message. * @function verify - * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.GetDocumentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateDocumentRequest.verify = function verify(message) { + GetDocumentRequest.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.document != null && message.hasOwnProperty("document")) { - var error = $root.google.cloud.discoveryengine.v1beta.Document.verify(message.document); - if (error) - return "document." + error; - } - if (message.documentId != null && message.hasOwnProperty("documentId")) - if (!$util.isString(message.documentId)) - return "documentId: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a CreateDocumentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetDocumentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.GetDocumentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1beta.CreateDocumentRequest} CreateDocumentRequest + * @returns {google.cloud.discoveryengine.v1beta.GetDocumentRequest} GetDocumentRequest */ - CreateDocumentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1beta.CreateDocumentRequest) + GetDocumentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.GetDocumentRequest) return object; - var message = new $root.google.cloud.discoveryengine.v1beta.CreateDocumentRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.document != null) { - if (typeof object.document !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.CreateDocumentRequest.document: object expected"); - message.document = $root.google.cloud.discoveryengine.v1beta.Document.fromObject(object.document); - } - if (object.documentId != null) - message.documentId = String(object.documentId); + var message = new $root.google.cloud.discoveryengine.v1beta.GetDocumentRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a CreateDocumentRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetDocumentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.GetDocumentRequest * @static - * @param {google.cloud.discoveryengine.v1beta.CreateDocumentRequest} message CreateDocumentRequest + * @param {google.cloud.discoveryengine.v1beta.GetDocumentRequest} message GetDocumentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateDocumentRequest.toObject = function toObject(message, options) { + GetDocumentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.document = null; - object.documentId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.document != null && message.hasOwnProperty("document")) - object.document = $root.google.cloud.discoveryengine.v1beta.Document.toObject(message.document, options); - if (message.documentId != null && message.hasOwnProperty("documentId")) - object.documentId = message.documentId; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this CreateDocumentRequest to JSON. + * Converts this GetDocumentRequest to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.GetDocumentRequest * @instance * @returns {Object.} JSON object */ - CreateDocumentRequest.prototype.toJSON = function toJSON() { + GetDocumentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateDocumentRequest + * Gets the default type url for GetDocumentRequest * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.GetDocumentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateDocumentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetDocumentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.CreateDocumentRequest"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.GetDocumentRequest"; }; - return CreateDocumentRequest; + return GetDocumentRequest; })(); - v1beta.UpdateDocumentRequest = (function() { + v1beta.ListDocumentsRequest = (function() { /** - * Properties of an UpdateDocumentRequest. + * Properties of a ListDocumentsRequest. * @memberof google.cloud.discoveryengine.v1beta - * @interface IUpdateDocumentRequest - * @property {google.cloud.discoveryengine.v1beta.IDocument|null} [document] UpdateDocumentRequest document - * @property {boolean|null} [allowMissing] UpdateDocumentRequest allowMissing + * @interface IListDocumentsRequest + * @property {string|null} [parent] ListDocumentsRequest parent + * @property {number|null} [pageSize] ListDocumentsRequest pageSize + * @property {string|null} [pageToken] ListDocumentsRequest pageToken */ /** - * Constructs a new UpdateDocumentRequest. + * Constructs a new ListDocumentsRequest. * @memberof google.cloud.discoveryengine.v1beta - * @classdesc Represents an UpdateDocumentRequest. - * @implements IUpdateDocumentRequest + * @classdesc Represents a ListDocumentsRequest. + * @implements IListDocumentsRequest * @constructor - * @param {google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1beta.IListDocumentsRequest=} [properties] Properties to set */ - function UpdateDocumentRequest(properties) { + function ListDocumentsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2125,89 +2824,103 @@ } /** - * UpdateDocumentRequest document. - * @member {google.cloud.discoveryengine.v1beta.IDocument|null|undefined} document - * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest + * ListDocumentsRequest parent. + * @member {string} parent + * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest * @instance */ - UpdateDocumentRequest.prototype.document = null; + ListDocumentsRequest.prototype.parent = ""; /** - * UpdateDocumentRequest allowMissing. - * @member {boolean} allowMissing - * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest + * ListDocumentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest * @instance */ - UpdateDocumentRequest.prototype.allowMissing = false; + ListDocumentsRequest.prototype.pageSize = 0; /** - * Creates a new UpdateDocumentRequest instance using the specified properties. + * ListDocumentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest + * @instance + */ + ListDocumentsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListDocumentsRequest instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest * @static - * @param {google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1beta.UpdateDocumentRequest} UpdateDocumentRequest instance + * @param {google.cloud.discoveryengine.v1beta.IListDocumentsRequest=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.ListDocumentsRequest} ListDocumentsRequest instance */ - UpdateDocumentRequest.create = function create(properties) { - return new UpdateDocumentRequest(properties); + ListDocumentsRequest.create = function create(properties) { + return new ListDocumentsRequest(properties); }; /** - * Encodes the specified UpdateDocumentRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.verify|verify} messages. + * Encodes the specified ListDocumentsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ListDocumentsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest * @static - * @param {google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest} message UpdateDocumentRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.IListDocumentsRequest} message ListDocumentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateDocumentRequest.encode = function encode(message, writer) { + ListDocumentsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.document != null && Object.hasOwnProperty.call(message, "document")) - $root.google.cloud.discoveryengine.v1beta.Document.encode(message.document, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowMissing); + 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); return writer; }; /** - * Encodes the specified UpdateDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.verify|verify} messages. + * Encodes the specified ListDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ListDocumentsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest * @static - * @param {google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest} message UpdateDocumentRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.IListDocumentsRequest} message ListDocumentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateDocumentRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListDocumentsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateDocumentRequest message from the specified reader or buffer. + * Decodes a ListDocumentsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1beta.UpdateDocumentRequest} UpdateDocumentRequest + * @returns {google.cloud.discoveryengine.v1beta.ListDocumentsRequest} ListDocumentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateDocumentRequest.decode = function decode(reader, length) { + ListDocumentsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.UpdateDocumentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.ListDocumentsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.document = $root.google.cloud.discoveryengine.v1beta.Document.decode(reader, reader.uint32()); + message.parent = reader.string(); break; } case 2: { - message.allowMissing = reader.bool(); + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); break; } default: @@ -2219,136 +2932,141 @@ }; /** - * Decodes an UpdateDocumentRequest message from the specified reader or buffer, length delimited. + * Decodes a ListDocumentsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1beta.UpdateDocumentRequest} UpdateDocumentRequest + * @returns {google.cloud.discoveryengine.v1beta.ListDocumentsRequest} ListDocumentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateDocumentRequest.decodeDelimited = function decodeDelimited(reader) { + ListDocumentsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateDocumentRequest message. + * Verifies a ListDocumentsRequest message. * @function verify - * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateDocumentRequest.verify = function verify(message) { + ListDocumentsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.document != null && message.hasOwnProperty("document")) { - var error = $root.google.cloud.discoveryengine.v1beta.Document.verify(message.document); - if (error) - return "document." + error; - } - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - if (typeof message.allowMissing !== "boolean") - return "allowMissing: boolean 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"; return null; }; /** - * Creates an UpdateDocumentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListDocumentsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1beta.UpdateDocumentRequest} UpdateDocumentRequest + * @returns {google.cloud.discoveryengine.v1beta.ListDocumentsRequest} ListDocumentsRequest */ - UpdateDocumentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1beta.UpdateDocumentRequest) + ListDocumentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.ListDocumentsRequest) return object; - var message = new $root.google.cloud.discoveryengine.v1beta.UpdateDocumentRequest(); - if (object.document != null) { - if (typeof object.document !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.document: object expected"); - message.document = $root.google.cloud.discoveryengine.v1beta.Document.fromObject(object.document); - } - if (object.allowMissing != null) - message.allowMissing = Boolean(object.allowMissing); + var message = new $root.google.cloud.discoveryengine.v1beta.ListDocumentsRequest(); + 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); return message; }; /** - * Creates a plain object from an UpdateDocumentRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListDocumentsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest * @static - * @param {google.cloud.discoveryengine.v1beta.UpdateDocumentRequest} message UpdateDocumentRequest + * @param {google.cloud.discoveryengine.v1beta.ListDocumentsRequest} message ListDocumentsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateDocumentRequest.toObject = function toObject(message, options) { + ListDocumentsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.document = null; - object.allowMissing = false; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; } - if (message.document != null && message.hasOwnProperty("document")) - object.document = $root.google.cloud.discoveryengine.v1beta.Document.toObject(message.document, options); - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - object.allowMissing = message.allowMissing; + 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; return object; }; /** - * Converts this UpdateDocumentRequest to JSON. + * Converts this ListDocumentsRequest to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest * @instance * @returns {Object.} JSON object */ - UpdateDocumentRequest.prototype.toJSON = function toJSON() { + ListDocumentsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateDocumentRequest + * Gets the default type url for ListDocumentsRequest * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateDocumentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListDocumentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.UpdateDocumentRequest"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ListDocumentsRequest"; }; - return UpdateDocumentRequest; + return ListDocumentsRequest; })(); - v1beta.DeleteDocumentRequest = (function() { + v1beta.ListDocumentsResponse = (function() { /** - * Properties of a DeleteDocumentRequest. + * Properties of a ListDocumentsResponse. * @memberof google.cloud.discoveryengine.v1beta - * @interface IDeleteDocumentRequest - * @property {string|null} [name] DeleteDocumentRequest name + * @interface IListDocumentsResponse + * @property {Array.|null} [documents] ListDocumentsResponse documents + * @property {string|null} [nextPageToken] ListDocumentsResponse nextPageToken */ /** - * Constructs a new DeleteDocumentRequest. + * Constructs a new ListDocumentsResponse. * @memberof google.cloud.discoveryengine.v1beta - * @classdesc Represents a DeleteDocumentRequest. - * @implements IDeleteDocumentRequest + * @classdesc Represents a ListDocumentsResponse. + * @implements IListDocumentsResponse * @constructor - * @param {google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1beta.IListDocumentsResponse=} [properties] Properties to set */ - function DeleteDocumentRequest(properties) { + function ListDocumentsResponse(properties) { + this.documents = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2356,75 +3074,92 @@ } /** - * DeleteDocumentRequest name. - * @member {string} name - * @memberof google.cloud.discoveryengine.v1beta.DeleteDocumentRequest + * ListDocumentsResponse documents. + * @member {Array.} documents + * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse * @instance */ - DeleteDocumentRequest.prototype.name = ""; + ListDocumentsResponse.prototype.documents = $util.emptyArray; /** - * Creates a new DeleteDocumentRequest instance using the specified properties. + * ListDocumentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse + * @instance + */ + ListDocumentsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListDocumentsResponse instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1beta.DeleteDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse * @static - * @param {google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1beta.DeleteDocumentRequest} DeleteDocumentRequest instance + * @param {google.cloud.discoveryengine.v1beta.IListDocumentsResponse=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.ListDocumentsResponse} ListDocumentsResponse instance */ - DeleteDocumentRequest.create = function create(properties) { - return new DeleteDocumentRequest(properties); + ListDocumentsResponse.create = function create(properties) { + return new ListDocumentsResponse(properties); }; /** - * Encodes the specified DeleteDocumentRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.DeleteDocumentRequest.verify|verify} messages. + * Encodes the specified ListDocumentsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ListDocumentsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1beta.DeleteDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse * @static - * @param {google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest} message DeleteDocumentRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.IListDocumentsResponse} message ListDocumentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteDocumentRequest.encode = function encode(message, writer) { + ListDocumentsResponse.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.documents != null && message.documents.length) + for (var i = 0; i < message.documents.length; ++i) + $root.google.cloud.discoveryengine.v1beta.Document.encode(message.documents[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 DeleteDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.DeleteDocumentRequest.verify|verify} messages. + * Encodes the specified ListDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ListDocumentsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.DeleteDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse * @static - * @param {google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest} message DeleteDocumentRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.IListDocumentsResponse} message ListDocumentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteDocumentRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListDocumentsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteDocumentRequest message from the specified reader or buffer. + * Decodes a ListDocumentsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1beta.DeleteDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1beta.DeleteDocumentRequest} DeleteDocumentRequest + * @returns {google.cloud.discoveryengine.v1beta.ListDocumentsResponse} ListDocumentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteDocumentRequest.decode = function decode(reader, length) { + ListDocumentsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.DeleteDocumentRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.ListDocumentsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.documents && message.documents.length)) + message.documents = []; + message.documents.push($root.google.cloud.discoveryengine.v1beta.Document.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); break; } default: @@ -2436,124 +3171,150 @@ }; /** - * Decodes a DeleteDocumentRequest message from the specified reader or buffer, length delimited. + * Decodes a ListDocumentsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.DeleteDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1beta.DeleteDocumentRequest} DeleteDocumentRequest + * @returns {google.cloud.discoveryengine.v1beta.ListDocumentsResponse} ListDocumentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteDocumentRequest.decodeDelimited = function decodeDelimited(reader) { + ListDocumentsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteDocumentRequest message. + * Verifies a ListDocumentsResponse message. * @function verify - * @memberof google.cloud.discoveryengine.v1beta.DeleteDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteDocumentRequest.verify = function verify(message) { + ListDocumentsResponse.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.documents != null && message.hasOwnProperty("documents")) { + if (!Array.isArray(message.documents)) + return "documents: array expected"; + for (var i = 0; i < message.documents.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1beta.Document.verify(message.documents[i]); + if (error) + return "documents." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a DeleteDocumentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListDocumentsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1beta.DeleteDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1beta.DeleteDocumentRequest} DeleteDocumentRequest + * @returns {google.cloud.discoveryengine.v1beta.ListDocumentsResponse} ListDocumentsResponse */ - DeleteDocumentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1beta.DeleteDocumentRequest) + ListDocumentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.ListDocumentsResponse) return object; - var message = new $root.google.cloud.discoveryengine.v1beta.DeleteDocumentRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.discoveryengine.v1beta.ListDocumentsResponse(); + if (object.documents) { + if (!Array.isArray(object.documents)) + throw TypeError(".google.cloud.discoveryengine.v1beta.ListDocumentsResponse.documents: array expected"); + message.documents = []; + for (var i = 0; i < object.documents.length; ++i) { + if (typeof object.documents[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.ListDocumentsResponse.documents: object expected"); + message.documents[i] = $root.google.cloud.discoveryengine.v1beta.Document.fromObject(object.documents[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a DeleteDocumentRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListDocumentsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1beta.DeleteDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse * @static - * @param {google.cloud.discoveryengine.v1beta.DeleteDocumentRequest} message DeleteDocumentRequest + * @param {google.cloud.discoveryengine.v1beta.ListDocumentsResponse} message ListDocumentsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteDocumentRequest.toObject = function toObject(message, options) { + ListDocumentsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.documents = []; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.nextPageToken = ""; + if (message.documents && message.documents.length) { + object.documents = []; + for (var j = 0; j < message.documents.length; ++j) + object.documents[j] = $root.google.cloud.discoveryengine.v1beta.Document.toObject(message.documents[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this DeleteDocumentRequest to JSON. + * Converts this ListDocumentsResponse to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1beta.DeleteDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse * @instance * @returns {Object.} JSON object */ - DeleteDocumentRequest.prototype.toJSON = function toJSON() { + ListDocumentsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteDocumentRequest + * Gets the default type url for ListDocumentsResponse * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1beta.DeleteDocumentRequest + * @memberof google.cloud.discoveryengine.v1beta.ListDocumentsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteDocumentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListDocumentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.DeleteDocumentRequest"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ListDocumentsResponse"; }; - return DeleteDocumentRequest; + return ListDocumentsResponse; })(); - v1beta.GcsSource = (function() { + v1beta.CreateDocumentRequest = (function() { /** - * Properties of a GcsSource. + * Properties of a CreateDocumentRequest. * @memberof google.cloud.discoveryengine.v1beta - * @interface IGcsSource - * @property {Array.|null} [inputUris] GcsSource inputUris - * @property {string|null} [dataSchema] GcsSource dataSchema + * @interface ICreateDocumentRequest + * @property {string|null} [parent] CreateDocumentRequest parent + * @property {google.cloud.discoveryengine.v1beta.IDocument|null} [document] CreateDocumentRequest document + * @property {string|null} [documentId] CreateDocumentRequest documentId */ /** - * Constructs a new GcsSource. + * Constructs a new CreateDocumentRequest. * @memberof google.cloud.discoveryengine.v1beta - * @classdesc Represents a GcsSource. - * @implements IGcsSource + * @classdesc Represents a CreateDocumentRequest. + * @implements ICreateDocumentRequest * @constructor - * @param {google.cloud.discoveryengine.v1beta.IGcsSource=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1beta.ICreateDocumentRequest=} [properties] Properties to set */ - function GcsSource(properties) { - this.inputUris = []; + function CreateDocumentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2561,92 +3322,103 @@ } /** - * GcsSource inputUris. - * @member {Array.} inputUris - * @memberof google.cloud.discoveryengine.v1beta.GcsSource + * CreateDocumentRequest parent. + * @member {string} parent + * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest * @instance */ - GcsSource.prototype.inputUris = $util.emptyArray; + CreateDocumentRequest.prototype.parent = ""; /** - * GcsSource dataSchema. - * @member {string} dataSchema - * @memberof google.cloud.discoveryengine.v1beta.GcsSource + * CreateDocumentRequest document. + * @member {google.cloud.discoveryengine.v1beta.IDocument|null|undefined} document + * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest * @instance */ - GcsSource.prototype.dataSchema = ""; + CreateDocumentRequest.prototype.document = null; /** - * Creates a new GcsSource instance using the specified properties. + * CreateDocumentRequest documentId. + * @member {string} documentId + * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest + * @instance + */ + CreateDocumentRequest.prototype.documentId = ""; + + /** + * Creates a new CreateDocumentRequest instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1beta.GcsSource + * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest * @static - * @param {google.cloud.discoveryengine.v1beta.IGcsSource=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1beta.GcsSource} GcsSource instance + * @param {google.cloud.discoveryengine.v1beta.ICreateDocumentRequest=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.CreateDocumentRequest} CreateDocumentRequest instance */ - GcsSource.create = function create(properties) { - return new GcsSource(properties); + CreateDocumentRequest.create = function create(properties) { + return new CreateDocumentRequest(properties); }; /** - * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.GcsSource.verify|verify} messages. + * Encodes the specified CreateDocumentRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CreateDocumentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1beta.GcsSource + * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest * @static - * @param {google.cloud.discoveryengine.v1beta.IGcsSource} message GcsSource message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.ICreateDocumentRequest} message CreateDocumentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcsSource.encode = function encode(message, writer) { + CreateDocumentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.inputUris != null && message.inputUris.length) - for (var i = 0; i < message.inputUris.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.inputUris[i]); - if (message.dataSchema != null && Object.hasOwnProperty.call(message, "dataSchema")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataSchema); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.document != null && Object.hasOwnProperty.call(message, "document")) + $root.google.cloud.discoveryengine.v1beta.Document.encode(message.document, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.documentId != null && Object.hasOwnProperty.call(message, "documentId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.documentId); return writer; }; /** - * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.GcsSource.verify|verify} messages. + * Encodes the specified CreateDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CreateDocumentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.GcsSource + * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest * @static - * @param {google.cloud.discoveryengine.v1beta.IGcsSource} message GcsSource message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.ICreateDocumentRequest} message CreateDocumentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcsSource.encodeDelimited = function encodeDelimited(message, writer) { + CreateDocumentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GcsSource message from the specified reader or buffer. + * Decodes a CreateDocumentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1beta.GcsSource + * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1beta.GcsSource} GcsSource + * @returns {google.cloud.discoveryengine.v1beta.CreateDocumentRequest} CreateDocumentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcsSource.decode = function decode(reader, length) { + CreateDocumentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.GcsSource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.CreateDocumentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.inputUris && message.inputUris.length)) - message.inputUris = []; - message.inputUris.push(reader.string()); + message.parent = reader.string(); break; } case 2: { - message.dataSchema = reader.string(); + message.document = $root.google.cloud.discoveryengine.v1beta.Document.decode(reader, reader.uint32()); + break; + } + case 3: { + message.documentId = reader.string(); break; } default: @@ -2658,148 +3430,145 @@ }; /** - * Decodes a GcsSource message from the specified reader or buffer, length delimited. + * Decodes a CreateDocumentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.GcsSource + * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1beta.GcsSource} GcsSource + * @returns {google.cloud.discoveryengine.v1beta.CreateDocumentRequest} CreateDocumentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcsSource.decodeDelimited = function decodeDelimited(reader) { + CreateDocumentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GcsSource message. + * Verifies a CreateDocumentRequest message. * @function verify - * @memberof google.cloud.discoveryengine.v1beta.GcsSource + * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GcsSource.verify = function verify(message) { + CreateDocumentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.inputUris != null && message.hasOwnProperty("inputUris")) { - if (!Array.isArray(message.inputUris)) - return "inputUris: array expected"; - for (var i = 0; i < message.inputUris.length; ++i) - if (!$util.isString(message.inputUris[i])) - return "inputUris: string[] expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.document != null && message.hasOwnProperty("document")) { + var error = $root.google.cloud.discoveryengine.v1beta.Document.verify(message.document); + if (error) + return "document." + error; } - if (message.dataSchema != null && message.hasOwnProperty("dataSchema")) - if (!$util.isString(message.dataSchema)) - return "dataSchema: string expected"; + if (message.documentId != null && message.hasOwnProperty("documentId")) + if (!$util.isString(message.documentId)) + return "documentId: string expected"; return null; }; /** - * Creates a GcsSource message from a plain object. Also converts values to their respective internal types. + * Creates a CreateDocumentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1beta.GcsSource + * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1beta.GcsSource} GcsSource + * @returns {google.cloud.discoveryengine.v1beta.CreateDocumentRequest} CreateDocumentRequest */ - GcsSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1beta.GcsSource) + CreateDocumentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.CreateDocumentRequest) return object; - var message = new $root.google.cloud.discoveryengine.v1beta.GcsSource(); - if (object.inputUris) { - if (!Array.isArray(object.inputUris)) - throw TypeError(".google.cloud.discoveryengine.v1beta.GcsSource.inputUris: array expected"); - message.inputUris = []; - for (var i = 0; i < object.inputUris.length; ++i) - message.inputUris[i] = String(object.inputUris[i]); + var message = new $root.google.cloud.discoveryengine.v1beta.CreateDocumentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.document != null) { + if (typeof object.document !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.CreateDocumentRequest.document: object expected"); + message.document = $root.google.cloud.discoveryengine.v1beta.Document.fromObject(object.document); } - if (object.dataSchema != null) - message.dataSchema = String(object.dataSchema); + if (object.documentId != null) + message.documentId = String(object.documentId); return message; }; /** - * Creates a plain object from a GcsSource message. Also converts values to other types if specified. + * Creates a plain object from a CreateDocumentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1beta.GcsSource + * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest * @static - * @param {google.cloud.discoveryengine.v1beta.GcsSource} message GcsSource + * @param {google.cloud.discoveryengine.v1beta.CreateDocumentRequest} message CreateDocumentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GcsSource.toObject = function toObject(message, options) { + CreateDocumentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.inputUris = []; - if (options.defaults) - object.dataSchema = ""; - if (message.inputUris && message.inputUris.length) { - object.inputUris = []; - for (var j = 0; j < message.inputUris.length; ++j) - object.inputUris[j] = message.inputUris[j]; + if (options.defaults) { + object.parent = ""; + object.document = null; + object.documentId = ""; } - if (message.dataSchema != null && message.hasOwnProperty("dataSchema")) - object.dataSchema = message.dataSchema; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.document != null && message.hasOwnProperty("document")) + object.document = $root.google.cloud.discoveryengine.v1beta.Document.toObject(message.document, options); + if (message.documentId != null && message.hasOwnProperty("documentId")) + object.documentId = message.documentId; return object; }; /** - * Converts this GcsSource to JSON. + * Converts this CreateDocumentRequest to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1beta.GcsSource + * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest * @instance * @returns {Object.} JSON object */ - GcsSource.prototype.toJSON = function toJSON() { + CreateDocumentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GcsSource + * Gets the default type url for CreateDocumentRequest * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1beta.GcsSource + * @memberof google.cloud.discoveryengine.v1beta.CreateDocumentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GcsSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateDocumentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.GcsSource"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.CreateDocumentRequest"; }; - return GcsSource; + return CreateDocumentRequest; })(); - v1beta.BigQuerySource = (function() { + v1beta.UpdateDocumentRequest = (function() { /** - * Properties of a BigQuerySource. + * Properties of an UpdateDocumentRequest. * @memberof google.cloud.discoveryengine.v1beta - * @interface IBigQuerySource - * @property {google.type.IDate|null} [partitionDate] BigQuerySource partitionDate - * @property {string|null} [projectId] BigQuerySource projectId - * @property {string|null} [datasetId] BigQuerySource datasetId - * @property {string|null} [tableId] BigQuerySource tableId - * @property {string|null} [gcsStagingDir] BigQuerySource gcsStagingDir - * @property {string|null} [dataSchema] BigQuerySource dataSchema + * @interface IUpdateDocumentRequest + * @property {google.cloud.discoveryengine.v1beta.IDocument|null} [document] UpdateDocumentRequest document + * @property {boolean|null} [allowMissing] UpdateDocumentRequest allowMissing */ /** - * Constructs a new BigQuerySource. + * Constructs a new UpdateDocumentRequest. * @memberof google.cloud.discoveryengine.v1beta - * @classdesc Represents a BigQuerySource. - * @implements IBigQuerySource + * @classdesc Represents an UpdateDocumentRequest. + * @implements IUpdateDocumentRequest * @constructor - * @param {google.cloud.discoveryengine.v1beta.IBigQuerySource=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest=} [properties] Properties to set */ - function BigQuerySource(properties) { + function UpdateDocumentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2807,159 +3576,89 @@ } /** - * BigQuerySource partitionDate. - * @member {google.type.IDate|null|undefined} partitionDate - * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource - * @instance - */ - BigQuerySource.prototype.partitionDate = null; - - /** - * BigQuerySource projectId. - * @member {string} projectId - * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource - * @instance - */ - BigQuerySource.prototype.projectId = ""; - - /** - * BigQuerySource datasetId. - * @member {string} datasetId - * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource - * @instance - */ - BigQuerySource.prototype.datasetId = ""; - - /** - * BigQuerySource tableId. - * @member {string} tableId - * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource - * @instance - */ - BigQuerySource.prototype.tableId = ""; - - /** - * BigQuerySource gcsStagingDir. - * @member {string} gcsStagingDir - * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource - * @instance - */ - BigQuerySource.prototype.gcsStagingDir = ""; - - /** - * BigQuerySource dataSchema. - * @member {string} dataSchema - * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource + * UpdateDocumentRequest document. + * @member {google.cloud.discoveryengine.v1beta.IDocument|null|undefined} document + * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest * @instance */ - BigQuerySource.prototype.dataSchema = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + UpdateDocumentRequest.prototype.document = null; /** - * BigQuerySource partition. - * @member {"partitionDate"|undefined} partition - * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource + * UpdateDocumentRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest * @instance */ - Object.defineProperty(BigQuerySource.prototype, "partition", { - get: $util.oneOfGetter($oneOfFields = ["partitionDate"]), - set: $util.oneOfSetter($oneOfFields) - }); + UpdateDocumentRequest.prototype.allowMissing = false; /** - * Creates a new BigQuerySource instance using the specified properties. + * Creates a new UpdateDocumentRequest instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource + * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest * @static - * @param {google.cloud.discoveryengine.v1beta.IBigQuerySource=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1beta.BigQuerySource} BigQuerySource instance + * @param {google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.UpdateDocumentRequest} UpdateDocumentRequest instance */ - BigQuerySource.create = function create(properties) { - return new BigQuerySource(properties); + UpdateDocumentRequest.create = function create(properties) { + return new UpdateDocumentRequest(properties); }; /** - * Encodes the specified BigQuerySource message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.BigQuerySource.verify|verify} messages. + * Encodes the specified UpdateDocumentRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource + * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest * @static - * @param {google.cloud.discoveryengine.v1beta.IBigQuerySource} message BigQuerySource message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest} message UpdateDocumentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQuerySource.encode = function encode(message, writer) { + UpdateDocumentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.datasetId != null && Object.hasOwnProperty.call(message, "datasetId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.datasetId); - if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.tableId); - if (message.gcsStagingDir != null && Object.hasOwnProperty.call(message, "gcsStagingDir")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.gcsStagingDir); - if (message.partitionDate != null && Object.hasOwnProperty.call(message, "partitionDate")) - $root.google.type.Date.encode(message.partitionDate, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.dataSchema != null && Object.hasOwnProperty.call(message, "dataSchema")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.dataSchema); + if (message.document != null && Object.hasOwnProperty.call(message, "document")) + $root.google.cloud.discoveryengine.v1beta.Document.encode(message.document, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowMissing); return writer; }; /** - * Encodes the specified BigQuerySource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.BigQuerySource.verify|verify} messages. + * Encodes the specified UpdateDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource + * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest * @static - * @param {google.cloud.discoveryengine.v1beta.IBigQuerySource} message BigQuerySource message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.IUpdateDocumentRequest} message UpdateDocumentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQuerySource.encodeDelimited = function encodeDelimited(message, writer) { + UpdateDocumentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BigQuerySource message from the specified reader or buffer. + * Decodes an UpdateDocumentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource + * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1beta.BigQuerySource} BigQuerySource + * @returns {google.cloud.discoveryengine.v1beta.UpdateDocumentRequest} UpdateDocumentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQuerySource.decode = function decode(reader, length) { + UpdateDocumentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.BigQuerySource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.UpdateDocumentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 5: { - message.partitionDate = $root.google.type.Date.decode(reader, reader.uint32()); - break; - } case 1: { - message.projectId = reader.string(); + message.document = $root.google.cloud.discoveryengine.v1beta.Document.decode(reader, reader.uint32()); break; } case 2: { - message.datasetId = reader.string(); - break; - } - case 3: { - message.tableId = reader.string(); - break; - } - case 4: { - message.gcsStagingDir = reader.string(); - break; - } - case 6: { - message.dataSchema = reader.string(); + message.allowMissing = reader.bool(); break; } default: @@ -2971,174 +3670,136 @@ }; /** - * Decodes a BigQuerySource message from the specified reader or buffer, length delimited. + * Decodes an UpdateDocumentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource + * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1beta.BigQuerySource} BigQuerySource + * @returns {google.cloud.discoveryengine.v1beta.UpdateDocumentRequest} UpdateDocumentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQuerySource.decodeDelimited = function decodeDelimited(reader) { + UpdateDocumentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BigQuerySource message. + * Verifies an UpdateDocumentRequest message. * @function verify - * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource + * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BigQuerySource.verify = function verify(message) { + UpdateDocumentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.partitionDate != null && message.hasOwnProperty("partitionDate")) { - properties.partition = 1; - { - var error = $root.google.type.Date.verify(message.partitionDate); - if (error) - return "partitionDate." + error; - } + if (message.document != null && message.hasOwnProperty("document")) { + var error = $root.google.cloud.discoveryengine.v1beta.Document.verify(message.document); + if (error) + return "document." + error; } - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.datasetId != null && message.hasOwnProperty("datasetId")) - if (!$util.isString(message.datasetId)) - return "datasetId: string expected"; - if (message.tableId != null && message.hasOwnProperty("tableId")) - if (!$util.isString(message.tableId)) - return "tableId: string expected"; - if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) - if (!$util.isString(message.gcsStagingDir)) - return "gcsStagingDir: string expected"; - if (message.dataSchema != null && message.hasOwnProperty("dataSchema")) - if (!$util.isString(message.dataSchema)) - return "dataSchema: string expected"; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; return null; }; /** - * Creates a BigQuerySource message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateDocumentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource + * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1beta.BigQuerySource} BigQuerySource + * @returns {google.cloud.discoveryengine.v1beta.UpdateDocumentRequest} UpdateDocumentRequest */ - BigQuerySource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1beta.BigQuerySource) + UpdateDocumentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.UpdateDocumentRequest) return object; - var message = new $root.google.cloud.discoveryengine.v1beta.BigQuerySource(); - if (object.partitionDate != null) { - if (typeof object.partitionDate !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.BigQuerySource.partitionDate: object expected"); - message.partitionDate = $root.google.type.Date.fromObject(object.partitionDate); + var message = new $root.google.cloud.discoveryengine.v1beta.UpdateDocumentRequest(); + if (object.document != null) { + if (typeof object.document !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.document: object expected"); + message.document = $root.google.cloud.discoveryengine.v1beta.Document.fromObject(object.document); } - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.datasetId != null) - message.datasetId = String(object.datasetId); - if (object.tableId != null) - message.tableId = String(object.tableId); - if (object.gcsStagingDir != null) - message.gcsStagingDir = String(object.gcsStagingDir); - if (object.dataSchema != null) - message.dataSchema = String(object.dataSchema); + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); return message; }; /** - * Creates a plain object from a BigQuerySource message. Also converts values to other types if specified. + * Creates a plain object from an UpdateDocumentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource + * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest * @static - * @param {google.cloud.discoveryengine.v1beta.BigQuerySource} message BigQuerySource + * @param {google.cloud.discoveryengine.v1beta.UpdateDocumentRequest} message UpdateDocumentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BigQuerySource.toObject = function toObject(message, options) { + UpdateDocumentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.projectId = ""; - object.datasetId = ""; - object.tableId = ""; - object.gcsStagingDir = ""; - object.dataSchema = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.datasetId != null && message.hasOwnProperty("datasetId")) - object.datasetId = message.datasetId; - if (message.tableId != null && message.hasOwnProperty("tableId")) - object.tableId = message.tableId; - if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) - object.gcsStagingDir = message.gcsStagingDir; - if (message.partitionDate != null && message.hasOwnProperty("partitionDate")) { - object.partitionDate = $root.google.type.Date.toObject(message.partitionDate, options); - if (options.oneofs) - object.partition = "partitionDate"; + object.document = null; + object.allowMissing = false; } - if (message.dataSchema != null && message.hasOwnProperty("dataSchema")) - object.dataSchema = message.dataSchema; + if (message.document != null && message.hasOwnProperty("document")) + object.document = $root.google.cloud.discoveryengine.v1beta.Document.toObject(message.document, options); + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; return object; }; /** - * Converts this BigQuerySource to JSON. + * Converts this UpdateDocumentRequest to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource + * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest * @instance * @returns {Object.} JSON object */ - BigQuerySource.prototype.toJSON = function toJSON() { + UpdateDocumentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BigQuerySource + * Gets the default type url for UpdateDocumentRequest * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource + * @memberof google.cloud.discoveryengine.v1beta.UpdateDocumentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BigQuerySource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateDocumentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.BigQuerySource"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.UpdateDocumentRequest"; }; - return BigQuerySource; + return UpdateDocumentRequest; })(); - v1beta.ImportErrorConfig = (function() { + v1beta.DeleteDocumentRequest = (function() { /** - * Properties of an ImportErrorConfig. + * Properties of a DeleteDocumentRequest. * @memberof google.cloud.discoveryengine.v1beta - * @interface IImportErrorConfig - * @property {string|null} [gcsPrefix] ImportErrorConfig gcsPrefix + * @interface IDeleteDocumentRequest + * @property {string|null} [name] DeleteDocumentRequest name */ /** - * Constructs a new ImportErrorConfig. + * Constructs a new DeleteDocumentRequest. * @memberof google.cloud.discoveryengine.v1beta - * @classdesc Represents an ImportErrorConfig. - * @implements IImportErrorConfig + * @classdesc Represents a DeleteDocumentRequest. + * @implements IDeleteDocumentRequest * @constructor - * @param {google.cloud.discoveryengine.v1beta.IImportErrorConfig=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest=} [properties] Properties to set */ - function ImportErrorConfig(properties) { + function DeleteDocumentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3146,89 +3807,75 @@ } /** - * ImportErrorConfig gcsPrefix. - * @member {string|null|undefined} gcsPrefix - * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig - * @instance - */ - ImportErrorConfig.prototype.gcsPrefix = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ImportErrorConfig destination. - * @member {"gcsPrefix"|undefined} destination - * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig + * DeleteDocumentRequest name. + * @member {string} name + * @memberof google.cloud.discoveryengine.v1beta.DeleteDocumentRequest * @instance */ - Object.defineProperty(ImportErrorConfig.prototype, "destination", { - get: $util.oneOfGetter($oneOfFields = ["gcsPrefix"]), - set: $util.oneOfSetter($oneOfFields) - }); + DeleteDocumentRequest.prototype.name = ""; /** - * Creates a new ImportErrorConfig instance using the specified properties. + * Creates a new DeleteDocumentRequest instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig + * @memberof google.cloud.discoveryengine.v1beta.DeleteDocumentRequest * @static - * @param {google.cloud.discoveryengine.v1beta.IImportErrorConfig=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1beta.ImportErrorConfig} ImportErrorConfig instance + * @param {google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.DeleteDocumentRequest} DeleteDocumentRequest instance */ - ImportErrorConfig.create = function create(properties) { - return new ImportErrorConfig(properties); + DeleteDocumentRequest.create = function create(properties) { + return new DeleteDocumentRequest(properties); }; /** - * Encodes the specified ImportErrorConfig message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportErrorConfig.verify|verify} messages. + * Encodes the specified DeleteDocumentRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.DeleteDocumentRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig + * @memberof google.cloud.discoveryengine.v1beta.DeleteDocumentRequest * @static - * @param {google.cloud.discoveryengine.v1beta.IImportErrorConfig} message ImportErrorConfig message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest} message DeleteDocumentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportErrorConfig.encode = function encode(message, writer) { + DeleteDocumentRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.gcsPrefix != null && Object.hasOwnProperty.call(message, "gcsPrefix")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsPrefix); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ImportErrorConfig message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportErrorConfig.verify|verify} messages. + * Encodes the specified DeleteDocumentRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.DeleteDocumentRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig + * @memberof google.cloud.discoveryengine.v1beta.DeleteDocumentRequest * @static - * @param {google.cloud.discoveryengine.v1beta.IImportErrorConfig} message ImportErrorConfig message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.IDeleteDocumentRequest} message DeleteDocumentRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportErrorConfig.encodeDelimited = function encodeDelimited(message, writer) { + DeleteDocumentRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportErrorConfig message from the specified reader or buffer. + * Decodes a DeleteDocumentRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig + * @memberof google.cloud.discoveryengine.v1beta.DeleteDocumentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1beta.ImportErrorConfig} ImportErrorConfig + * @returns {google.cloud.discoveryengine.v1beta.DeleteDocumentRequest} DeleteDocumentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportErrorConfig.decode = function decode(reader, length) { + DeleteDocumentRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.DeleteDocumentRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.gcsPrefix = reader.string(); + message.name = reader.string(); break; } default: @@ -3240,130 +3887,124 @@ }; /** - * Decodes an ImportErrorConfig message from the specified reader or buffer, length delimited. + * Decodes a DeleteDocumentRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig + * @memberof google.cloud.discoveryengine.v1beta.DeleteDocumentRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1beta.ImportErrorConfig} ImportErrorConfig + * @returns {google.cloud.discoveryengine.v1beta.DeleteDocumentRequest} DeleteDocumentRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportErrorConfig.decodeDelimited = function decodeDelimited(reader) { + DeleteDocumentRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportErrorConfig message. + * Verifies a DeleteDocumentRequest message. * @function verify - * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig + * @memberof google.cloud.discoveryengine.v1beta.DeleteDocumentRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportErrorConfig.verify = function verify(message) { + DeleteDocumentRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.gcsPrefix != null && message.hasOwnProperty("gcsPrefix")) { - properties.destination = 1; - if (!$util.isString(message.gcsPrefix)) - return "gcsPrefix: string expected"; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an ImportErrorConfig message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteDocumentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig + * @memberof google.cloud.discoveryengine.v1beta.DeleteDocumentRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1beta.ImportErrorConfig} ImportErrorConfig + * @returns {google.cloud.discoveryengine.v1beta.DeleteDocumentRequest} DeleteDocumentRequest */ - ImportErrorConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig) + DeleteDocumentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.DeleteDocumentRequest) return object; - var message = new $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig(); - if (object.gcsPrefix != null) - message.gcsPrefix = String(object.gcsPrefix); + var message = new $root.google.cloud.discoveryengine.v1beta.DeleteDocumentRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an ImportErrorConfig message. Also converts values to other types if specified. + * Creates a plain object from a DeleteDocumentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig + * @memberof google.cloud.discoveryengine.v1beta.DeleteDocumentRequest * @static - * @param {google.cloud.discoveryengine.v1beta.ImportErrorConfig} message ImportErrorConfig + * @param {google.cloud.discoveryengine.v1beta.DeleteDocumentRequest} message DeleteDocumentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportErrorConfig.toObject = function toObject(message, options) { + DeleteDocumentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.gcsPrefix != null && message.hasOwnProperty("gcsPrefix")) { - object.gcsPrefix = message.gcsPrefix; - if (options.oneofs) - object.destination = "gcsPrefix"; - } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ImportErrorConfig to JSON. + * Converts this DeleteDocumentRequest to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig + * @memberof google.cloud.discoveryengine.v1beta.DeleteDocumentRequest * @instance * @returns {Object.} JSON object */ - ImportErrorConfig.prototype.toJSON = function toJSON() { + DeleteDocumentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportErrorConfig + * Gets the default type url for DeleteDocumentRequest * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig + * @memberof google.cloud.discoveryengine.v1beta.DeleteDocumentRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportErrorConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteDocumentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ImportErrorConfig"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.DeleteDocumentRequest"; }; - return ImportErrorConfig; + return DeleteDocumentRequest; })(); - v1beta.ImportUserEventsRequest = (function() { + v1beta.GcsSource = (function() { /** - * Properties of an ImportUserEventsRequest. + * Properties of a GcsSource. * @memberof google.cloud.discoveryengine.v1beta - * @interface IImportUserEventsRequest - * @property {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource|null} [inlineSource] ImportUserEventsRequest inlineSource - * @property {google.cloud.discoveryengine.v1beta.IGcsSource|null} [gcsSource] ImportUserEventsRequest gcsSource - * @property {google.cloud.discoveryengine.v1beta.IBigQuerySource|null} [bigquerySource] ImportUserEventsRequest bigquerySource - * @property {string|null} [parent] ImportUserEventsRequest parent - * @property {google.cloud.discoveryengine.v1beta.IImportErrorConfig|null} [errorConfig] ImportUserEventsRequest errorConfig + * @interface IGcsSource + * @property {Array.|null} [inputUris] GcsSource inputUris + * @property {string|null} [dataSchema] GcsSource dataSchema */ /** - * Constructs a new ImportUserEventsRequest. + * Constructs a new GcsSource. * @memberof google.cloud.discoveryengine.v1beta - * @classdesc Represents an ImportUserEventsRequest. - * @implements IImportUserEventsRequest + * @classdesc Represents a GcsSource. + * @implements IGcsSource * @constructor - * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsRequest=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1beta.IGcsSource=} [properties] Properties to set */ - function ImportUserEventsRequest(properties) { + function GcsSource(properties) { + this.inputUris = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3371,145 +4012,92 @@ } /** - * ImportUserEventsRequest inlineSource. - * @member {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource|null|undefined} inlineSource - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest - * @instance - */ - ImportUserEventsRequest.prototype.inlineSource = null; - - /** - * ImportUserEventsRequest gcsSource. - * @member {google.cloud.discoveryengine.v1beta.IGcsSource|null|undefined} gcsSource - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest - * @instance - */ - ImportUserEventsRequest.prototype.gcsSource = null; - - /** - * ImportUserEventsRequest bigquerySource. - * @member {google.cloud.discoveryengine.v1beta.IBigQuerySource|null|undefined} bigquerySource - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest - * @instance - */ - ImportUserEventsRequest.prototype.bigquerySource = null; - - /** - * ImportUserEventsRequest parent. - * @member {string} parent - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest - * @instance - */ - ImportUserEventsRequest.prototype.parent = ""; - - /** - * ImportUserEventsRequest errorConfig. - * @member {google.cloud.discoveryengine.v1beta.IImportErrorConfig|null|undefined} errorConfig - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest + * GcsSource inputUris. + * @member {Array.} inputUris + * @memberof google.cloud.discoveryengine.v1beta.GcsSource * @instance */ - ImportUserEventsRequest.prototype.errorConfig = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + GcsSource.prototype.inputUris = $util.emptyArray; /** - * ImportUserEventsRequest source. - * @member {"inlineSource"|"gcsSource"|"bigquerySource"|undefined} source - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest + * GcsSource dataSchema. + * @member {string} dataSchema + * @memberof google.cloud.discoveryengine.v1beta.GcsSource * @instance */ - Object.defineProperty(ImportUserEventsRequest.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["inlineSource", "gcsSource", "bigquerySource"]), - set: $util.oneOfSetter($oneOfFields) - }); + GcsSource.prototype.dataSchema = ""; /** - * Creates a new ImportUserEventsRequest instance using the specified properties. + * Creates a new GcsSource instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest + * @memberof google.cloud.discoveryengine.v1beta.GcsSource * @static - * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsRequest=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest} ImportUserEventsRequest instance + * @param {google.cloud.discoveryengine.v1beta.IGcsSource=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.GcsSource} GcsSource instance */ - ImportUserEventsRequest.create = function create(properties) { - return new ImportUserEventsRequest(properties); + GcsSource.create = function create(properties) { + return new GcsSource(properties); }; /** - * Encodes the specified ImportUserEventsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.verify|verify} messages. + * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.GcsSource.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest + * @memberof google.cloud.discoveryengine.v1beta.GcsSource * @static - * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsRequest} message ImportUserEventsRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.IGcsSource} message GcsSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportUserEventsRequest.encode = function encode(message, writer) { + GcsSource.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.inlineSource != null && Object.hasOwnProperty.call(message, "inlineSource")) - $root.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.encode(message.inlineSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) - $root.google.cloud.discoveryengine.v1beta.GcsSource.encode(message.gcsSource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.bigquerySource != null && Object.hasOwnProperty.call(message, "bigquerySource")) - $root.google.cloud.discoveryengine.v1beta.BigQuerySource.encode(message.bigquerySource, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.errorConfig != null && Object.hasOwnProperty.call(message, "errorConfig")) - $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.encode(message.errorConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.inputUris != null && message.inputUris.length) + for (var i = 0; i < message.inputUris.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.inputUris[i]); + if (message.dataSchema != null && Object.hasOwnProperty.call(message, "dataSchema")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataSchema); return writer; }; /** - * Encodes the specified ImportUserEventsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.verify|verify} messages. + * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.GcsSource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest + * @memberof google.cloud.discoveryengine.v1beta.GcsSource * @static - * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsRequest} message ImportUserEventsRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.IGcsSource} message GcsSource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportUserEventsRequest.encodeDelimited = function encodeDelimited(message, writer) { + GcsSource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportUserEventsRequest message from the specified reader or buffer. + * Decodes a GcsSource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest + * @memberof google.cloud.discoveryengine.v1beta.GcsSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest} ImportUserEventsRequest + * @returns {google.cloud.discoveryengine.v1beta.GcsSource} GcsSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportUserEventsRequest.decode = function decode(reader, length) { + GcsSource.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.GcsSource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: { - message.inlineSource = $root.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.decode(reader, reader.uint32()); - break; - } - case 3: { - message.gcsSource = $root.google.cloud.discoveryengine.v1beta.GcsSource.decode(reader, reader.uint32()); - break; - } - case 4: { - message.bigquerySource = $root.google.cloud.discoveryengine.v1beta.BigQuerySource.decode(reader, reader.uint32()); - break; - } case 1: { - message.parent = reader.string(); + if (!(message.inputUris && message.inputUris.length)) + message.inputUris = []; + message.inputUris.push(reader.string()); break; } - case 5: { - message.errorConfig = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.decode(reader, reader.uint32()); + case 2: { + message.dataSchema = reader.string(); break; } default: @@ -3521,544 +4109,308 @@ }; /** - * Decodes an ImportUserEventsRequest message from the specified reader or buffer, length delimited. + * Decodes a GcsSource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest + * @memberof google.cloud.discoveryengine.v1beta.GcsSource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest} ImportUserEventsRequest + * @returns {google.cloud.discoveryengine.v1beta.GcsSource} GcsSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportUserEventsRequest.decodeDelimited = function decodeDelimited(reader) { + GcsSource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportUserEventsRequest message. + * Verifies a GcsSource message. * @function verify - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest + * @memberof google.cloud.discoveryengine.v1beta.GcsSource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportUserEventsRequest.verify = function verify(message) { + GcsSource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { - properties.source = 1; - { - var error = $root.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.verify(message.inlineSource); - if (error) - return "inlineSource." + error; - } - } - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - { - var error = $root.google.cloud.discoveryengine.v1beta.GcsSource.verify(message.gcsSource); - if (error) - return "gcsSource." + error; - } - } - if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - { - var error = $root.google.cloud.discoveryengine.v1beta.BigQuerySource.verify(message.bigquerySource); - if (error) - return "bigquerySource." + error; - } - } - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) { - var error = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.verify(message.errorConfig); - if (error) - return "errorConfig." + error; + if (message.inputUris != null && message.hasOwnProperty("inputUris")) { + if (!Array.isArray(message.inputUris)) + return "inputUris: array expected"; + for (var i = 0; i < message.inputUris.length; ++i) + if (!$util.isString(message.inputUris[i])) + return "inputUris: string[] expected"; } + if (message.dataSchema != null && message.hasOwnProperty("dataSchema")) + if (!$util.isString(message.dataSchema)) + return "dataSchema: string expected"; return null; }; /** - * Creates an ImportUserEventsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GcsSource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest + * @memberof google.cloud.discoveryengine.v1beta.GcsSource * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest} ImportUserEventsRequest + * @returns {google.cloud.discoveryengine.v1beta.GcsSource} GcsSource */ - ImportUserEventsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest) + GcsSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.GcsSource) return object; - var message = new $root.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest(); - if (object.inlineSource != null) { - if (typeof object.inlineSource !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.inlineSource: object expected"); - message.inlineSource = $root.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.fromObject(object.inlineSource); - } - if (object.gcsSource != null) { - if (typeof object.gcsSource !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.gcsSource: object expected"); - message.gcsSource = $root.google.cloud.discoveryengine.v1beta.GcsSource.fromObject(object.gcsSource); - } - if (object.bigquerySource != null) { - if (typeof object.bigquerySource !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.bigquerySource: object expected"); - message.bigquerySource = $root.google.cloud.discoveryengine.v1beta.BigQuerySource.fromObject(object.bigquerySource); - } - if (object.parent != null) - message.parent = String(object.parent); - if (object.errorConfig != null) { - if (typeof object.errorConfig !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.errorConfig: object expected"); - message.errorConfig = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.fromObject(object.errorConfig); + var message = new $root.google.cloud.discoveryengine.v1beta.GcsSource(); + if (object.inputUris) { + if (!Array.isArray(object.inputUris)) + throw TypeError(".google.cloud.discoveryengine.v1beta.GcsSource.inputUris: array expected"); + message.inputUris = []; + for (var i = 0; i < object.inputUris.length; ++i) + message.inputUris[i] = String(object.inputUris[i]); } + if (object.dataSchema != null) + message.dataSchema = String(object.dataSchema); return message; }; /** - * Creates a plain object from an ImportUserEventsRequest message. Also converts values to other types if specified. + * Creates a plain object from a GcsSource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest + * @memberof google.cloud.discoveryengine.v1beta.GcsSource * @static - * @param {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest} message ImportUserEventsRequest + * @param {google.cloud.discoveryengine.v1beta.GcsSource} message GcsSource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportUserEventsRequest.toObject = function toObject(message, options) { + GcsSource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.errorConfig = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { - object.inlineSource = $root.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.toObject(message.inlineSource, options); - if (options.oneofs) - object.source = "inlineSource"; - } - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - object.gcsSource = $root.google.cloud.discoveryengine.v1beta.GcsSource.toObject(message.gcsSource, options); - if (options.oneofs) - object.source = "gcsSource"; - } - if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { - object.bigquerySource = $root.google.cloud.discoveryengine.v1beta.BigQuerySource.toObject(message.bigquerySource, options); - if (options.oneofs) - object.source = "bigquerySource"; + if (options.arrays || options.defaults) + object.inputUris = []; + if (options.defaults) + object.dataSchema = ""; + if (message.inputUris && message.inputUris.length) { + object.inputUris = []; + for (var j = 0; j < message.inputUris.length; ++j) + object.inputUris[j] = message.inputUris[j]; } - if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) - object.errorConfig = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.toObject(message.errorConfig, options); + if (message.dataSchema != null && message.hasOwnProperty("dataSchema")) + object.dataSchema = message.dataSchema; return object; }; /** - * Converts this ImportUserEventsRequest to JSON. + * Converts this GcsSource to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest + * @memberof google.cloud.discoveryengine.v1beta.GcsSource * @instance * @returns {Object.} JSON object */ - ImportUserEventsRequest.prototype.toJSON = function toJSON() { + GcsSource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportUserEventsRequest + * Gets the default type url for GcsSource * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest + * @memberof google.cloud.discoveryengine.v1beta.GcsSource * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportUserEventsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GcsSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ImportUserEventsRequest"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.GcsSource"; }; - ImportUserEventsRequest.InlineSource = (function() { + return GcsSource; + })(); - /** - * Properties of an InlineSource. - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest - * @interface IInlineSource - * @property {Array.|null} [userEvents] InlineSource userEvents - */ + v1beta.BigQuerySource = (function() { - /** - * Constructs a new InlineSource. - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest - * @classdesc Represents an InlineSource. - * @implements IInlineSource - * @constructor - * @param {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource=} [properties] Properties to set - */ - function InlineSource(properties) { - this.userEvents = []; - 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]]; - } + /** + * Properties of a BigQuerySource. + * @memberof google.cloud.discoveryengine.v1beta + * @interface IBigQuerySource + * @property {google.type.IDate|null} [partitionDate] BigQuerySource partitionDate + * @property {string|null} [projectId] BigQuerySource projectId + * @property {string|null} [datasetId] BigQuerySource datasetId + * @property {string|null} [tableId] BigQuerySource tableId + * @property {string|null} [gcsStagingDir] BigQuerySource gcsStagingDir + * @property {string|null} [dataSchema] BigQuerySource dataSchema + */ - /** - * InlineSource userEvents. - * @member {Array.} userEvents - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource - * @instance - */ - InlineSource.prototype.userEvents = $util.emptyArray; + /** + * Constructs a new BigQuerySource. + * @memberof google.cloud.discoveryengine.v1beta + * @classdesc Represents a BigQuerySource. + * @implements IBigQuerySource + * @constructor + * @param {google.cloud.discoveryengine.v1beta.IBigQuerySource=} [properties] Properties to set + */ + function BigQuerySource(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]]; + } - /** - * Creates a new InlineSource instance using the specified properties. - * @function create - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource - * @static - * @param {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource} InlineSource instance - */ - InlineSource.create = function create(properties) { - return new InlineSource(properties); - }; + /** + * BigQuerySource partitionDate. + * @member {google.type.IDate|null|undefined} partitionDate + * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource + * @instance + */ + BigQuerySource.prototype.partitionDate = null; - /** - * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.verify|verify} messages. - * @function encode - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource - * @static - * @param {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource} message InlineSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InlineSource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.userEvents != null && message.userEvents.length) - for (var i = 0; i < message.userEvents.length; ++i) - $root.google.cloud.discoveryengine.v1beta.UserEvent.encode(message.userEvents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * BigQuerySource projectId. + * @member {string} projectId + * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource + * @instance + */ + BigQuerySource.prototype.projectId = ""; - /** - * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource - * @static - * @param {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource} message InlineSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InlineSource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * BigQuerySource datasetId. + * @member {string} datasetId + * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource + * @instance + */ + BigQuerySource.prototype.datasetId = ""; - /** - * Decodes an InlineSource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource} InlineSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InlineSource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.userEvents && message.userEvents.length)) - message.userEvents = []; - message.userEvents.push($root.google.cloud.discoveryengine.v1beta.UserEvent.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * BigQuerySource tableId. + * @member {string} tableId + * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource + * @instance + */ + BigQuerySource.prototype.tableId = ""; - /** - * Decodes an InlineSource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource} InlineSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InlineSource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * BigQuerySource gcsStagingDir. + * @member {string} gcsStagingDir + * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource + * @instance + */ + BigQuerySource.prototype.gcsStagingDir = ""; - /** - * Verifies an InlineSource message. - * @function verify - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InlineSource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.userEvents != null && message.hasOwnProperty("userEvents")) { - if (!Array.isArray(message.userEvents)) - return "userEvents: array expected"; - for (var i = 0; i < message.userEvents.length; ++i) { - var error = $root.google.cloud.discoveryengine.v1beta.UserEvent.verify(message.userEvents[i]); - if (error) - return "userEvents." + error; - } - } - return null; - }; + /** + * BigQuerySource dataSchema. + * @member {string} dataSchema + * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource + * @instance + */ + BigQuerySource.prototype.dataSchema = ""; - /** - * Creates an InlineSource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource} InlineSource - */ - InlineSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource) - return object; - var message = new $root.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource(); - if (object.userEvents) { - if (!Array.isArray(object.userEvents)) - throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.userEvents: array expected"); - message.userEvents = []; - for (var i = 0; i < object.userEvents.length; ++i) { - if (typeof object.userEvents[i] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.userEvents: object expected"); - message.userEvents[i] = $root.google.cloud.discoveryengine.v1beta.UserEvent.fromObject(object.userEvents[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an InlineSource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource - * @static - * @param {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource} message InlineSource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InlineSource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.userEvents = []; - if (message.userEvents && message.userEvents.length) { - object.userEvents = []; - for (var j = 0; j < message.userEvents.length; ++j) - object.userEvents[j] = $root.google.cloud.discoveryengine.v1beta.UserEvent.toObject(message.userEvents[j], options); - } - return object; - }; - - /** - * Converts this InlineSource to JSON. - * @function toJSON - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource - * @instance - * @returns {Object.} JSON object - */ - InlineSource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for InlineSource - * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InlineSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource"; - }; - - return InlineSource; - })(); - - return ImportUserEventsRequest; - })(); - - v1beta.ImportUserEventsResponse = (function() { - - /** - * Properties of an ImportUserEventsResponse. - * @memberof google.cloud.discoveryengine.v1beta - * @interface IImportUserEventsResponse - * @property {Array.|null} [errorSamples] ImportUserEventsResponse errorSamples - * @property {google.cloud.discoveryengine.v1beta.IImportErrorConfig|null} [errorConfig] ImportUserEventsResponse errorConfig - * @property {number|Long|null} [joinedEventsCount] ImportUserEventsResponse joinedEventsCount - * @property {number|Long|null} [unjoinedEventsCount] ImportUserEventsResponse unjoinedEventsCount - */ - - /** - * Constructs a new ImportUserEventsResponse. - * @memberof google.cloud.discoveryengine.v1beta - * @classdesc Represents an ImportUserEventsResponse. - * @implements IImportUserEventsResponse - * @constructor - * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsResponse=} [properties] Properties to set - */ - function ImportUserEventsResponse(properties) { - this.errorSamples = []; - 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]]; - } - - /** - * ImportUserEventsResponse errorSamples. - * @member {Array.} errorSamples - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse - * @instance - */ - ImportUserEventsResponse.prototype.errorSamples = $util.emptyArray; - - /** - * ImportUserEventsResponse errorConfig. - * @member {google.cloud.discoveryengine.v1beta.IImportErrorConfig|null|undefined} errorConfig - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse - * @instance - */ - ImportUserEventsResponse.prototype.errorConfig = null; - - /** - * ImportUserEventsResponse joinedEventsCount. - * @member {number|Long} joinedEventsCount - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse - * @instance - */ - ImportUserEventsResponse.prototype.joinedEventsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ImportUserEventsResponse unjoinedEventsCount. - * @member {number|Long} unjoinedEventsCount - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse + * BigQuerySource partition. + * @member {"partitionDate"|undefined} partition + * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource * @instance */ - ImportUserEventsResponse.prototype.unjoinedEventsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Object.defineProperty(BigQuerySource.prototype, "partition", { + get: $util.oneOfGetter($oneOfFields = ["partitionDate"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ImportUserEventsResponse instance using the specified properties. + * Creates a new BigQuerySource instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse + * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource * @static - * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsResponse=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsResponse} ImportUserEventsResponse instance + * @param {google.cloud.discoveryengine.v1beta.IBigQuerySource=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.BigQuerySource} BigQuerySource instance */ - ImportUserEventsResponse.create = function create(properties) { - return new ImportUserEventsResponse(properties); + BigQuerySource.create = function create(properties) { + return new BigQuerySource(properties); }; /** - * Encodes the specified ImportUserEventsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsResponse.verify|verify} messages. + * Encodes the specified BigQuerySource message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.BigQuerySource.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse + * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource * @static - * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsResponse} message ImportUserEventsResponse message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.IBigQuerySource} message BigQuerySource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportUserEventsResponse.encode = function encode(message, writer) { + BigQuerySource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.errorSamples != null && message.errorSamples.length) - for (var i = 0; i < message.errorSamples.length; ++i) - $root.google.rpc.Status.encode(message.errorSamples[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.errorConfig != null && Object.hasOwnProperty.call(message, "errorConfig")) - $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.encode(message.errorConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.joinedEventsCount != null && Object.hasOwnProperty.call(message, "joinedEventsCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.joinedEventsCount); - if (message.unjoinedEventsCount != null && Object.hasOwnProperty.call(message, "unjoinedEventsCount")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.unjoinedEventsCount); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.datasetId != null && Object.hasOwnProperty.call(message, "datasetId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.datasetId); + if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tableId); + if (message.gcsStagingDir != null && Object.hasOwnProperty.call(message, "gcsStagingDir")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.gcsStagingDir); + if (message.partitionDate != null && Object.hasOwnProperty.call(message, "partitionDate")) + $root.google.type.Date.encode(message.partitionDate, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.dataSchema != null && Object.hasOwnProperty.call(message, "dataSchema")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.dataSchema); return writer; }; /** - * Encodes the specified ImportUserEventsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsResponse.verify|verify} messages. + * Encodes the specified BigQuerySource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.BigQuerySource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse + * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource * @static - * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsResponse} message ImportUserEventsResponse message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.IBigQuerySource} message BigQuerySource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportUserEventsResponse.encodeDelimited = function encodeDelimited(message, writer) { + BigQuerySource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportUserEventsResponse message from the specified reader or buffer. + * Decodes a BigQuerySource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse + * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsResponse} ImportUserEventsResponse + * @returns {google.cloud.discoveryengine.v1beta.BigQuerySource} BigQuerySource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportUserEventsResponse.decode = function decode(reader, length) { + BigQuerySource.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.ImportUserEventsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.BigQuerySource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 5: { + message.partitionDate = $root.google.type.Date.decode(reader, reader.uint32()); + break; + } case 1: { - if (!(message.errorSamples && message.errorSamples.length)) - message.errorSamples = []; - message.errorSamples.push($root.google.rpc.Status.decode(reader, reader.uint32())); + message.projectId = reader.string(); break; } case 2: { - message.errorConfig = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.decode(reader, reader.uint32()); + message.datasetId = reader.string(); break; } case 3: { - message.joinedEventsCount = reader.int64(); + message.tableId = reader.string(); break; } case 4: { - message.unjoinedEventsCount = reader.int64(); + message.gcsStagingDir = reader.string(); + break; + } + case 6: { + message.dataSchema = reader.string(); break; } default: @@ -4070,201 +4422,174 @@ }; /** - * Decodes an ImportUserEventsResponse message from the specified reader or buffer, length delimited. + * Decodes a BigQuerySource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse + * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsResponse} ImportUserEventsResponse + * @returns {google.cloud.discoveryengine.v1beta.BigQuerySource} BigQuerySource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportUserEventsResponse.decodeDelimited = function decodeDelimited(reader) { + BigQuerySource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportUserEventsResponse message. + * Verifies a BigQuerySource message. * @function verify - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse + * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportUserEventsResponse.verify = function verify(message) { + BigQuerySource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.errorSamples != null && message.hasOwnProperty("errorSamples")) { - if (!Array.isArray(message.errorSamples)) - return "errorSamples: array expected"; - for (var i = 0; i < message.errorSamples.length; ++i) { - var error = $root.google.rpc.Status.verify(message.errorSamples[i]); + var properties = {}; + if (message.partitionDate != null && message.hasOwnProperty("partitionDate")) { + properties.partition = 1; + { + var error = $root.google.type.Date.verify(message.partitionDate); if (error) - return "errorSamples." + error; + return "partitionDate." + error; } } - if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) { - var error = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.verify(message.errorConfig); - if (error) - return "errorConfig." + error; - } - if (message.joinedEventsCount != null && message.hasOwnProperty("joinedEventsCount")) - if (!$util.isInteger(message.joinedEventsCount) && !(message.joinedEventsCount && $util.isInteger(message.joinedEventsCount.low) && $util.isInteger(message.joinedEventsCount.high))) - return "joinedEventsCount: integer|Long expected"; - if (message.unjoinedEventsCount != null && message.hasOwnProperty("unjoinedEventsCount")) - if (!$util.isInteger(message.unjoinedEventsCount) && !(message.unjoinedEventsCount && $util.isInteger(message.unjoinedEventsCount.low) && $util.isInteger(message.unjoinedEventsCount.high))) - return "unjoinedEventsCount: integer|Long expected"; - return null; - }; - - /** - * Creates an ImportUserEventsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.datasetId != null && message.hasOwnProperty("datasetId")) + if (!$util.isString(message.datasetId)) + return "datasetId: string expected"; + if (message.tableId != null && message.hasOwnProperty("tableId")) + if (!$util.isString(message.tableId)) + return "tableId: string expected"; + if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) + if (!$util.isString(message.gcsStagingDir)) + return "gcsStagingDir: string expected"; + if (message.dataSchema != null && message.hasOwnProperty("dataSchema")) + if (!$util.isString(message.dataSchema)) + return "dataSchema: string expected"; + return null; + }; + + /** + * Creates a BigQuerySource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsResponse} ImportUserEventsResponse + * @returns {google.cloud.discoveryengine.v1beta.BigQuerySource} BigQuerySource */ - ImportUserEventsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1beta.ImportUserEventsResponse) + BigQuerySource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.BigQuerySource) return object; - var message = new $root.google.cloud.discoveryengine.v1beta.ImportUserEventsResponse(); - if (object.errorSamples) { - if (!Array.isArray(object.errorSamples)) - throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsResponse.errorSamples: array expected"); - message.errorSamples = []; - for (var i = 0; i < object.errorSamples.length; ++i) { - if (typeof object.errorSamples[i] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsResponse.errorSamples: object expected"); - message.errorSamples[i] = $root.google.rpc.Status.fromObject(object.errorSamples[i]); - } - } - if (object.errorConfig != null) { - if (typeof object.errorConfig !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsResponse.errorConfig: object expected"); - message.errorConfig = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.fromObject(object.errorConfig); + var message = new $root.google.cloud.discoveryengine.v1beta.BigQuerySource(); + if (object.partitionDate != null) { + if (typeof object.partitionDate !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.BigQuerySource.partitionDate: object expected"); + message.partitionDate = $root.google.type.Date.fromObject(object.partitionDate); } - if (object.joinedEventsCount != null) - if ($util.Long) - (message.joinedEventsCount = $util.Long.fromValue(object.joinedEventsCount)).unsigned = false; - else if (typeof object.joinedEventsCount === "string") - message.joinedEventsCount = parseInt(object.joinedEventsCount, 10); - else if (typeof object.joinedEventsCount === "number") - message.joinedEventsCount = object.joinedEventsCount; - else if (typeof object.joinedEventsCount === "object") - message.joinedEventsCount = new $util.LongBits(object.joinedEventsCount.low >>> 0, object.joinedEventsCount.high >>> 0).toNumber(); - if (object.unjoinedEventsCount != null) - if ($util.Long) - (message.unjoinedEventsCount = $util.Long.fromValue(object.unjoinedEventsCount)).unsigned = false; - else if (typeof object.unjoinedEventsCount === "string") - message.unjoinedEventsCount = parseInt(object.unjoinedEventsCount, 10); - else if (typeof object.unjoinedEventsCount === "number") - message.unjoinedEventsCount = object.unjoinedEventsCount; - else if (typeof object.unjoinedEventsCount === "object") - message.unjoinedEventsCount = new $util.LongBits(object.unjoinedEventsCount.low >>> 0, object.unjoinedEventsCount.high >>> 0).toNumber(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.datasetId != null) + message.datasetId = String(object.datasetId); + if (object.tableId != null) + message.tableId = String(object.tableId); + if (object.gcsStagingDir != null) + message.gcsStagingDir = String(object.gcsStagingDir); + if (object.dataSchema != null) + message.dataSchema = String(object.dataSchema); return message; }; /** - * Creates a plain object from an ImportUserEventsResponse message. Also converts values to other types if specified. + * Creates a plain object from a BigQuerySource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse + * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource * @static - * @param {google.cloud.discoveryengine.v1beta.ImportUserEventsResponse} message ImportUserEventsResponse + * @param {google.cloud.discoveryengine.v1beta.BigQuerySource} message BigQuerySource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportUserEventsResponse.toObject = function toObject(message, options) { + BigQuerySource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.errorSamples = []; if (options.defaults) { - object.errorConfig = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.joinedEventsCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.joinedEventsCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.unjoinedEventsCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.unjoinedEventsCount = options.longs === String ? "0" : 0; + object.projectId = ""; + object.datasetId = ""; + object.tableId = ""; + object.gcsStagingDir = ""; + object.dataSchema = ""; } - if (message.errorSamples && message.errorSamples.length) { - object.errorSamples = []; - for (var j = 0; j < message.errorSamples.length; ++j) - object.errorSamples[j] = $root.google.rpc.Status.toObject(message.errorSamples[j], options); + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.datasetId != null && message.hasOwnProperty("datasetId")) + object.datasetId = message.datasetId; + if (message.tableId != null && message.hasOwnProperty("tableId")) + object.tableId = message.tableId; + if (message.gcsStagingDir != null && message.hasOwnProperty("gcsStagingDir")) + object.gcsStagingDir = message.gcsStagingDir; + if (message.partitionDate != null && message.hasOwnProperty("partitionDate")) { + object.partitionDate = $root.google.type.Date.toObject(message.partitionDate, options); + if (options.oneofs) + object.partition = "partitionDate"; } - if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) - object.errorConfig = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.toObject(message.errorConfig, options); - if (message.joinedEventsCount != null && message.hasOwnProperty("joinedEventsCount")) - if (typeof message.joinedEventsCount === "number") - object.joinedEventsCount = options.longs === String ? String(message.joinedEventsCount) : message.joinedEventsCount; - else - object.joinedEventsCount = options.longs === String ? $util.Long.prototype.toString.call(message.joinedEventsCount) : options.longs === Number ? new $util.LongBits(message.joinedEventsCount.low >>> 0, message.joinedEventsCount.high >>> 0).toNumber() : message.joinedEventsCount; - if (message.unjoinedEventsCount != null && message.hasOwnProperty("unjoinedEventsCount")) - if (typeof message.unjoinedEventsCount === "number") - object.unjoinedEventsCount = options.longs === String ? String(message.unjoinedEventsCount) : message.unjoinedEventsCount; - else - object.unjoinedEventsCount = options.longs === String ? $util.Long.prototype.toString.call(message.unjoinedEventsCount) : options.longs === Number ? new $util.LongBits(message.unjoinedEventsCount.low >>> 0, message.unjoinedEventsCount.high >>> 0).toNumber() : message.unjoinedEventsCount; + if (message.dataSchema != null && message.hasOwnProperty("dataSchema")) + object.dataSchema = message.dataSchema; return object; }; /** - * Converts this ImportUserEventsResponse to JSON. + * Converts this BigQuerySource to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse + * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource * @instance * @returns {Object.} JSON object */ - ImportUserEventsResponse.prototype.toJSON = function toJSON() { + BigQuerySource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportUserEventsResponse + * Gets the default type url for BigQuerySource * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse + * @memberof google.cloud.discoveryengine.v1beta.BigQuerySource * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportUserEventsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BigQuerySource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ImportUserEventsResponse"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.BigQuerySource"; }; - return ImportUserEventsResponse; + return BigQuerySource; })(); - v1beta.ImportUserEventsMetadata = (function() { + v1beta.ImportErrorConfig = (function() { /** - * Properties of an ImportUserEventsMetadata. + * Properties of an ImportErrorConfig. * @memberof google.cloud.discoveryengine.v1beta - * @interface IImportUserEventsMetadata - * @property {google.protobuf.ITimestamp|null} [createTime] ImportUserEventsMetadata createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] ImportUserEventsMetadata updateTime - * @property {number|Long|null} [successCount] ImportUserEventsMetadata successCount - * @property {number|Long|null} [failureCount] ImportUserEventsMetadata failureCount + * @interface IImportErrorConfig + * @property {string|null} [gcsPrefix] ImportErrorConfig gcsPrefix */ /** - * Constructs a new ImportUserEventsMetadata. + * Constructs a new ImportErrorConfig. * @memberof google.cloud.discoveryengine.v1beta - * @classdesc Represents an ImportUserEventsMetadata. - * @implements IImportUserEventsMetadata + * @classdesc Represents an ImportErrorConfig. + * @implements IImportErrorConfig * @constructor - * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsMetadata=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1beta.IImportErrorConfig=} [properties] Properties to set */ - function ImportUserEventsMetadata(properties) { + function ImportErrorConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4272,117 +4597,89 @@ } /** - * ImportUserEventsMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata - * @instance - */ - ImportUserEventsMetadata.prototype.createTime = null; - - /** - * ImportUserEventsMetadata updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata + * ImportErrorConfig gcsPrefix. + * @member {string|null|undefined} gcsPrefix + * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig * @instance */ - ImportUserEventsMetadata.prototype.updateTime = null; + ImportErrorConfig.prototype.gcsPrefix = null; - /** - * ImportUserEventsMetadata successCount. - * @member {number|Long} successCount - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata - * @instance - */ - ImportUserEventsMetadata.prototype.successCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ImportUserEventsMetadata failureCount. - * @member {number|Long} failureCount - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata + * ImportErrorConfig destination. + * @member {"gcsPrefix"|undefined} destination + * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig * @instance */ - ImportUserEventsMetadata.prototype.failureCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Object.defineProperty(ImportErrorConfig.prototype, "destination", { + get: $util.oneOfGetter($oneOfFields = ["gcsPrefix"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ImportUserEventsMetadata instance using the specified properties. + * Creates a new ImportErrorConfig instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata + * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig * @static - * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsMetadata=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata} ImportUserEventsMetadata instance + * @param {google.cloud.discoveryengine.v1beta.IImportErrorConfig=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.ImportErrorConfig} ImportErrorConfig instance */ - ImportUserEventsMetadata.create = function create(properties) { - return new ImportUserEventsMetadata(properties); + ImportErrorConfig.create = function create(properties) { + return new ImportErrorConfig(properties); }; /** - * Encodes the specified ImportUserEventsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata.verify|verify} messages. + * Encodes the specified ImportErrorConfig message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportErrorConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata + * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig * @static - * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsMetadata} message ImportUserEventsMetadata message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.IImportErrorConfig} message ImportErrorConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportUserEventsMetadata.encode = function encode(message, writer) { + ImportErrorConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.successCount != null && Object.hasOwnProperty.call(message, "successCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.successCount); - if (message.failureCount != null && Object.hasOwnProperty.call(message, "failureCount")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.failureCount); + if (message.gcsPrefix != null && Object.hasOwnProperty.call(message, "gcsPrefix")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsPrefix); return writer; }; /** - * Encodes the specified ImportUserEventsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata.verify|verify} messages. + * Encodes the specified ImportErrorConfig message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportErrorConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata + * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig * @static - * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsMetadata} message ImportUserEventsMetadata message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.IImportErrorConfig} message ImportErrorConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportUserEventsMetadata.encodeDelimited = function encodeDelimited(message, writer) { + ImportErrorConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportUserEventsMetadata message from the specified reader or buffer. + * Decodes an ImportErrorConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata + * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata} ImportUserEventsMetadata + * @returns {google.cloud.discoveryengine.v1beta.ImportErrorConfig} ImportErrorConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportUserEventsMetadata.decode = function decode(reader, length) { + ImportErrorConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.successCount = reader.int64(); - break; - } - case 4: { - message.failureCount = reader.int64(); + message.gcsPrefix = reader.string(); break; } default: @@ -4394,188 +4691,130 @@ }; /** - * Decodes an ImportUserEventsMetadata message from the specified reader or buffer, length delimited. + * Decodes an ImportErrorConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata + * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata} ImportUserEventsMetadata + * @returns {google.cloud.discoveryengine.v1beta.ImportErrorConfig} ImportErrorConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportUserEventsMetadata.decodeDelimited = function decodeDelimited(reader) { + ImportErrorConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportUserEventsMetadata message. + * Verifies an ImportErrorConfig message. * @function verify - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata + * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportUserEventsMetadata.verify = function verify(message) { + ImportErrorConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object 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; + var properties = {}; + if (message.gcsPrefix != null && message.hasOwnProperty("gcsPrefix")) { + properties.destination = 1; + if (!$util.isString(message.gcsPrefix)) + return "gcsPrefix: string expected"; } - if (message.successCount != null && message.hasOwnProperty("successCount")) - if (!$util.isInteger(message.successCount) && !(message.successCount && $util.isInteger(message.successCount.low) && $util.isInteger(message.successCount.high))) - return "successCount: integer|Long expected"; - if (message.failureCount != null && message.hasOwnProperty("failureCount")) - if (!$util.isInteger(message.failureCount) && !(message.failureCount && $util.isInteger(message.failureCount.low) && $util.isInteger(message.failureCount.high))) - return "failureCount: integer|Long expected"; return null; }; /** - * Creates an ImportUserEventsMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an ImportErrorConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata + * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata} ImportUserEventsMetadata + * @returns {google.cloud.discoveryengine.v1beta.ImportErrorConfig} ImportErrorConfig */ - ImportUserEventsMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata) + ImportErrorConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig) return object; - var message = new $root.google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata.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.discoveryengine.v1beta.ImportUserEventsMetadata.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.successCount != null) - if ($util.Long) - (message.successCount = $util.Long.fromValue(object.successCount)).unsigned = false; - else if (typeof object.successCount === "string") - message.successCount = parseInt(object.successCount, 10); - else if (typeof object.successCount === "number") - message.successCount = object.successCount; - else if (typeof object.successCount === "object") - message.successCount = new $util.LongBits(object.successCount.low >>> 0, object.successCount.high >>> 0).toNumber(); - if (object.failureCount != null) - if ($util.Long) - (message.failureCount = $util.Long.fromValue(object.failureCount)).unsigned = false; - else if (typeof object.failureCount === "string") - message.failureCount = parseInt(object.failureCount, 10); - else if (typeof object.failureCount === "number") - message.failureCount = object.failureCount; - else if (typeof object.failureCount === "object") - message.failureCount = new $util.LongBits(object.failureCount.low >>> 0, object.failureCount.high >>> 0).toNumber(); + var message = new $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig(); + if (object.gcsPrefix != null) + message.gcsPrefix = String(object.gcsPrefix); return message; }; /** - * Creates a plain object from an ImportUserEventsMetadata message. Also converts values to other types if specified. + * Creates a plain object from an ImportErrorConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata + * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig * @static - * @param {google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata} message ImportUserEventsMetadata + * @param {google.cloud.discoveryengine.v1beta.ImportErrorConfig} message ImportErrorConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportUserEventsMetadata.toObject = function toObject(message, options) { + ImportErrorConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.createTime = null; - object.updateTime = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.successCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.successCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.failureCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.failureCount = options.longs === String ? "0" : 0; + if (message.gcsPrefix != null && message.hasOwnProperty("gcsPrefix")) { + object.gcsPrefix = message.gcsPrefix; + if (options.oneofs) + object.destination = "gcsPrefix"; } - 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.successCount != null && message.hasOwnProperty("successCount")) - if (typeof message.successCount === "number") - object.successCount = options.longs === String ? String(message.successCount) : message.successCount; - else - object.successCount = options.longs === String ? $util.Long.prototype.toString.call(message.successCount) : options.longs === Number ? new $util.LongBits(message.successCount.low >>> 0, message.successCount.high >>> 0).toNumber() : message.successCount; - if (message.failureCount != null && message.hasOwnProperty("failureCount")) - if (typeof message.failureCount === "number") - object.failureCount = options.longs === String ? String(message.failureCount) : message.failureCount; - else - object.failureCount = options.longs === String ? $util.Long.prototype.toString.call(message.failureCount) : options.longs === Number ? new $util.LongBits(message.failureCount.low >>> 0, message.failureCount.high >>> 0).toNumber() : message.failureCount; return object; }; /** - * Converts this ImportUserEventsMetadata to JSON. + * Converts this ImportErrorConfig to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata + * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig * @instance * @returns {Object.} JSON object */ - ImportUserEventsMetadata.prototype.toJSON = function toJSON() { + ImportErrorConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportUserEventsMetadata + * Gets the default type url for ImportErrorConfig * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata + * @memberof google.cloud.discoveryengine.v1beta.ImportErrorConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportUserEventsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportErrorConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ImportErrorConfig"; }; - return ImportUserEventsMetadata; + return ImportErrorConfig; })(); - v1beta.ImportDocumentsMetadata = (function() { + v1beta.ImportUserEventsRequest = (function() { /** - * Properties of an ImportDocumentsMetadata. + * Properties of an ImportUserEventsRequest. * @memberof google.cloud.discoveryengine.v1beta - * @interface IImportDocumentsMetadata - * @property {google.protobuf.ITimestamp|null} [createTime] ImportDocumentsMetadata createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] ImportDocumentsMetadata updateTime - * @property {number|Long|null} [successCount] ImportDocumentsMetadata successCount - * @property {number|Long|null} [failureCount] ImportDocumentsMetadata failureCount + * @interface IImportUserEventsRequest + * @property {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource|null} [inlineSource] ImportUserEventsRequest inlineSource + * @property {google.cloud.discoveryengine.v1beta.IGcsSource|null} [gcsSource] ImportUserEventsRequest gcsSource + * @property {google.cloud.discoveryengine.v1beta.IBigQuerySource|null} [bigquerySource] ImportUserEventsRequest bigquerySource + * @property {string|null} [parent] ImportUserEventsRequest parent + * @property {google.cloud.discoveryengine.v1beta.IImportErrorConfig|null} [errorConfig] ImportUserEventsRequest errorConfig */ /** - * Constructs a new ImportDocumentsMetadata. + * Constructs a new ImportUserEventsRequest. * @memberof google.cloud.discoveryengine.v1beta - * @classdesc Represents an ImportDocumentsMetadata. - * @implements IImportDocumentsMetadata + * @classdesc Represents an ImportUserEventsRequest. + * @implements IImportUserEventsRequest * @constructor - * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsMetadata=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsRequest=} [properties] Properties to set */ - function ImportDocumentsMetadata(properties) { + function ImportUserEventsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4583,117 +4822,145 @@ } /** - * ImportDocumentsMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata + * ImportUserEventsRequest inlineSource. + * @member {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource|null|undefined} inlineSource + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest * @instance */ - ImportDocumentsMetadata.prototype.createTime = null; + ImportUserEventsRequest.prototype.inlineSource = null; /** - * ImportDocumentsMetadata updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata + * ImportUserEventsRequest gcsSource. + * @member {google.cloud.discoveryengine.v1beta.IGcsSource|null|undefined} gcsSource + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest * @instance */ - ImportDocumentsMetadata.prototype.updateTime = null; + ImportUserEventsRequest.prototype.gcsSource = null; /** - * ImportDocumentsMetadata successCount. - * @member {number|Long} successCount - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata + * ImportUserEventsRequest bigquerySource. + * @member {google.cloud.discoveryengine.v1beta.IBigQuerySource|null|undefined} bigquerySource + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest * @instance */ - ImportDocumentsMetadata.prototype.successCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ImportUserEventsRequest.prototype.bigquerySource = null; /** - * ImportDocumentsMetadata failureCount. - * @member {number|Long} failureCount - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata + * ImportUserEventsRequest parent. + * @member {string} parent + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest * @instance */ - ImportDocumentsMetadata.prototype.failureCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ImportUserEventsRequest.prototype.parent = ""; /** - * Creates a new ImportDocumentsMetadata instance using the specified properties. + * ImportUserEventsRequest errorConfig. + * @member {google.cloud.discoveryengine.v1beta.IImportErrorConfig|null|undefined} errorConfig + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest + * @instance + */ + ImportUserEventsRequest.prototype.errorConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ImportUserEventsRequest source. + * @member {"inlineSource"|"gcsSource"|"bigquerySource"|undefined} source + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest + * @instance + */ + Object.defineProperty(ImportUserEventsRequest.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["inlineSource", "gcsSource", "bigquerySource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ImportUserEventsRequest instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest * @static - * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsMetadata=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata} ImportDocumentsMetadata instance + * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsRequest=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest} ImportUserEventsRequest instance */ - ImportDocumentsMetadata.create = function create(properties) { - return new ImportDocumentsMetadata(properties); + ImportUserEventsRequest.create = function create(properties) { + return new ImportUserEventsRequest(properties); }; /** - * Encodes the specified ImportDocumentsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata.verify|verify} messages. + * Encodes the specified ImportUserEventsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest * @static - * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsMetadata} message ImportDocumentsMetadata message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsRequest} message ImportUserEventsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportDocumentsMetadata.encode = function encode(message, writer) { + ImportUserEventsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.successCount != null && Object.hasOwnProperty.call(message, "successCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.successCount); - if (message.failureCount != null && Object.hasOwnProperty.call(message, "failureCount")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.failureCount); - return writer; - }; - - /** - * Encodes the specified ImportDocumentsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.inlineSource != null && Object.hasOwnProperty.call(message, "inlineSource")) + $root.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.encode(message.inlineSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) + $root.google.cloud.discoveryengine.v1beta.GcsSource.encode(message.gcsSource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.bigquerySource != null && Object.hasOwnProperty.call(message, "bigquerySource")) + $root.google.cloud.discoveryengine.v1beta.BigQuerySource.encode(message.bigquerySource, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.errorConfig != null && Object.hasOwnProperty.call(message, "errorConfig")) + $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.encode(message.errorConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ImportUserEventsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest * @static - * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsMetadata} message ImportDocumentsMetadata message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsRequest} message ImportUserEventsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportDocumentsMetadata.encodeDelimited = function encodeDelimited(message, writer) { + ImportUserEventsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportDocumentsMetadata message from the specified reader or buffer. + * Decodes an ImportUserEventsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata} ImportDocumentsMetadata + * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest} ImportUserEventsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportDocumentsMetadata.decode = function decode(reader, length) { + ImportUserEventsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } case 2: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.inlineSource = $root.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.decode(reader, reader.uint32()); break; } case 3: { - message.successCount = reader.int64(); + message.gcsSource = $root.google.cloud.discoveryengine.v1beta.GcsSource.decode(reader, reader.uint32()); break; } case 4: { - message.failureCount = reader.int64(); + message.bigquerySource = $root.google.cloud.discoveryengine.v1beta.BigQuerySource.decode(reader, reader.uint32()); + break; + } + case 1: { + message.parent = reader.string(); + break; + } + case 5: { + message.errorConfig = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.decode(reader, reader.uint32()); break; } default: @@ -4705,190 +4972,423 @@ }; /** - * Decodes an ImportDocumentsMetadata message from the specified reader or buffer, length delimited. + * Decodes an ImportUserEventsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata} ImportDocumentsMetadata + * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest} ImportUserEventsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportDocumentsMetadata.decodeDelimited = function decodeDelimited(reader) { + ImportUserEventsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportDocumentsMetadata message. + * Verifies an ImportUserEventsRequest message. * @function verify - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportDocumentsMetadata.verify = function verify(message) { + ImportUserEventsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; + var properties = {}; + if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { + properties.source = 1; + { + var error = $root.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.verify(message.inlineSource); + if (error) + return "inlineSource." + error; + } } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.cloud.discoveryengine.v1beta.GcsSource.verify(message.gcsSource); + if (error) + return "gcsSource." + error; + } + } + if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.cloud.discoveryengine.v1beta.BigQuerySource.verify(message.bigquerySource); + if (error) + return "bigquerySource." + error; + } + } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) { + var error = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.verify(message.errorConfig); if (error) - return "updateTime." + error; + return "errorConfig." + error; } - if (message.successCount != null && message.hasOwnProperty("successCount")) - if (!$util.isInteger(message.successCount) && !(message.successCount && $util.isInteger(message.successCount.low) && $util.isInteger(message.successCount.high))) - return "successCount: integer|Long expected"; - if (message.failureCount != null && message.hasOwnProperty("failureCount")) - if (!$util.isInteger(message.failureCount) && !(message.failureCount && $util.isInteger(message.failureCount.low) && $util.isInteger(message.failureCount.high))) - return "failureCount: integer|Long expected"; return null; }; /** - * Creates an ImportDocumentsMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an ImportUserEventsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata} ImportDocumentsMetadata + * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest} ImportUserEventsRequest */ - ImportDocumentsMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata) + ImportUserEventsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest) return object; - var message = new $root.google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + var message = new $root.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest(); + if (object.inlineSource != null) { + if (typeof object.inlineSource !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.inlineSource: object expected"); + message.inlineSource = $root.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.fromObject(object.inlineSource); } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + if (object.gcsSource != null) { + if (typeof object.gcsSource !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.gcsSource: object expected"); + message.gcsSource = $root.google.cloud.discoveryengine.v1beta.GcsSource.fromObject(object.gcsSource); + } + if (object.bigquerySource != null) { + if (typeof object.bigquerySource !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.bigquerySource: object expected"); + message.bigquerySource = $root.google.cloud.discoveryengine.v1beta.BigQuerySource.fromObject(object.bigquerySource); + } + if (object.parent != null) + message.parent = String(object.parent); + if (object.errorConfig != null) { + if (typeof object.errorConfig !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.errorConfig: object expected"); + message.errorConfig = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.fromObject(object.errorConfig); } - if (object.successCount != null) - if ($util.Long) - (message.successCount = $util.Long.fromValue(object.successCount)).unsigned = false; - else if (typeof object.successCount === "string") - message.successCount = parseInt(object.successCount, 10); - else if (typeof object.successCount === "number") - message.successCount = object.successCount; - else if (typeof object.successCount === "object") - message.successCount = new $util.LongBits(object.successCount.low >>> 0, object.successCount.high >>> 0).toNumber(); - if (object.failureCount != null) - if ($util.Long) - (message.failureCount = $util.Long.fromValue(object.failureCount)).unsigned = false; - else if (typeof object.failureCount === "string") - message.failureCount = parseInt(object.failureCount, 10); - else if (typeof object.failureCount === "number") - message.failureCount = object.failureCount; - else if (typeof object.failureCount === "object") - message.failureCount = new $util.LongBits(object.failureCount.low >>> 0, object.failureCount.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from an ImportDocumentsMetadata message. Also converts values to other types if specified. + * Creates a plain object from an ImportUserEventsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest * @static - * @param {google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata} message ImportDocumentsMetadata + * @param {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest} message ImportUserEventsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportDocumentsMetadata.toObject = function toObject(message, options) { + ImportUserEventsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.createTime = null; - object.updateTime = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.successCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.successCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.failureCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.failureCount = options.longs === String ? "0" : 0; + object.parent = ""; + object.errorConfig = null; } - 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.successCount != null && message.hasOwnProperty("successCount")) - if (typeof message.successCount === "number") - object.successCount = options.longs === String ? String(message.successCount) : message.successCount; - else - object.successCount = options.longs === String ? $util.Long.prototype.toString.call(message.successCount) : options.longs === Number ? new $util.LongBits(message.successCount.low >>> 0, message.successCount.high >>> 0).toNumber() : message.successCount; - if (message.failureCount != null && message.hasOwnProperty("failureCount")) - if (typeof message.failureCount === "number") - object.failureCount = options.longs === String ? String(message.failureCount) : message.failureCount; - else - object.failureCount = options.longs === String ? $util.Long.prototype.toString.call(message.failureCount) : options.longs === Number ? new $util.LongBits(message.failureCount.low >>> 0, message.failureCount.high >>> 0).toNumber() : message.failureCount; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { + object.inlineSource = $root.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.toObject(message.inlineSource, options); + if (options.oneofs) + object.source = "inlineSource"; + } + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + object.gcsSource = $root.google.cloud.discoveryengine.v1beta.GcsSource.toObject(message.gcsSource, options); + if (options.oneofs) + object.source = "gcsSource"; + } + if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { + object.bigquerySource = $root.google.cloud.discoveryengine.v1beta.BigQuerySource.toObject(message.bigquerySource, options); + if (options.oneofs) + object.source = "bigquerySource"; + } + if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) + object.errorConfig = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.toObject(message.errorConfig, options); return object; }; /** - * Converts this ImportDocumentsMetadata to JSON. + * Converts this ImportUserEventsRequest to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest * @instance * @returns {Object.} JSON object */ - ImportDocumentsMetadata.prototype.toJSON = function toJSON() { + ImportUserEventsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportDocumentsMetadata + * Gets the default type url for ImportUserEventsRequest * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportDocumentsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportUserEventsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ImportUserEventsRequest"; }; - return ImportDocumentsMetadata; - })(); + ImportUserEventsRequest.InlineSource = (function() { - v1beta.ImportDocumentsRequest = (function() { + /** + * Properties of an InlineSource. + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest + * @interface IInlineSource + * @property {Array.|null} [userEvents] InlineSource userEvents + */ - /** - * Properties of an ImportDocumentsRequest. - * @memberof google.cloud.discoveryengine.v1beta - * @interface IImportDocumentsRequest - * @property {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource|null} [inlineSource] ImportDocumentsRequest inlineSource - * @property {google.cloud.discoveryengine.v1beta.IGcsSource|null} [gcsSource] ImportDocumentsRequest gcsSource - * @property {google.cloud.discoveryengine.v1beta.IBigQuerySource|null} [bigquerySource] ImportDocumentsRequest bigquerySource - * @property {string|null} [parent] ImportDocumentsRequest parent - * @property {google.cloud.discoveryengine.v1beta.IImportErrorConfig|null} [errorConfig] ImportDocumentsRequest errorConfig - * @property {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode|null} [reconciliationMode] ImportDocumentsRequest reconciliationMode + /** + * Constructs a new InlineSource. + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest + * @classdesc Represents an InlineSource. + * @implements IInlineSource + * @constructor + * @param {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource=} [properties] Properties to set + */ + function InlineSource(properties) { + this.userEvents = []; + 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]]; + } + + /** + * InlineSource userEvents. + * @member {Array.} userEvents + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource + * @instance + */ + InlineSource.prototype.userEvents = $util.emptyArray; + + /** + * Creates a new InlineSource instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource + * @static + * @param {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource} InlineSource instance + */ + InlineSource.create = function create(properties) { + return new InlineSource(properties); + }; + + /** + * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource + * @static + * @param {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource} message InlineSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InlineSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userEvents != null && message.userEvents.length) + for (var i = 0; i < message.userEvents.length; ++i) + $root.google.cloud.discoveryengine.v1beta.UserEvent.encode(message.userEvents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource + * @static + * @param {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.IInlineSource} message InlineSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InlineSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InlineSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource} InlineSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InlineSource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.userEvents && message.userEvents.length)) + message.userEvents = []; + message.userEvents.push($root.google.cloud.discoveryengine.v1beta.UserEvent.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InlineSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource} InlineSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InlineSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InlineSource message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InlineSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userEvents != null && message.hasOwnProperty("userEvents")) { + if (!Array.isArray(message.userEvents)) + return "userEvents: array expected"; + for (var i = 0; i < message.userEvents.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1beta.UserEvent.verify(message.userEvents[i]); + if (error) + return "userEvents." + error; + } + } + return null; + }; + + /** + * Creates an InlineSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource} InlineSource + */ + InlineSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource(); + if (object.userEvents) { + if (!Array.isArray(object.userEvents)) + throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.userEvents: array expected"); + message.userEvents = []; + for (var i = 0; i < object.userEvents.length; ++i) { + if (typeof object.userEvents[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.userEvents: object expected"); + message.userEvents[i] = $root.google.cloud.discoveryengine.v1beta.UserEvent.fromObject(object.userEvents[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an InlineSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource + * @static + * @param {google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource} message InlineSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InlineSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.userEvents = []; + if (message.userEvents && message.userEvents.length) { + object.userEvents = []; + for (var j = 0; j < message.userEvents.length; ++j) + object.userEvents[j] = $root.google.cloud.discoveryengine.v1beta.UserEvent.toObject(message.userEvents[j], options); + } + return object; + }; + + /** + * Converts this InlineSource to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource + * @instance + * @returns {Object.} JSON object + */ + InlineSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InlineSource + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InlineSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource"; + }; + + return InlineSource; + })(); + + return ImportUserEventsRequest; + })(); + + v1beta.ImportUserEventsResponse = (function() { + + /** + * Properties of an ImportUserEventsResponse. + * @memberof google.cloud.discoveryengine.v1beta + * @interface IImportUserEventsResponse + * @property {Array.|null} [errorSamples] ImportUserEventsResponse errorSamples + * @property {google.cloud.discoveryengine.v1beta.IImportErrorConfig|null} [errorConfig] ImportUserEventsResponse errorConfig + * @property {number|Long|null} [joinedEventsCount] ImportUserEventsResponse joinedEventsCount + * @property {number|Long|null} [unjoinedEventsCount] ImportUserEventsResponse unjoinedEventsCount */ /** - * Constructs a new ImportDocumentsRequest. + * Constructs a new ImportUserEventsResponse. * @memberof google.cloud.discoveryengine.v1beta - * @classdesc Represents an ImportDocumentsRequest. - * @implements IImportDocumentsRequest + * @classdesc Represents an ImportUserEventsResponse. + * @implements IImportUserEventsResponse * @constructor - * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsRequest=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsResponse=} [properties] Properties to set */ - function ImportDocumentsRequest(properties) { + function ImportUserEventsResponse(properties) { + this.errorSamples = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4896,159 +5396,120 @@ } /** - * ImportDocumentsRequest inlineSource. - * @member {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource|null|undefined} inlineSource - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest + * ImportUserEventsResponse errorSamples. + * @member {Array.} errorSamples + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse * @instance */ - ImportDocumentsRequest.prototype.inlineSource = null; + ImportUserEventsResponse.prototype.errorSamples = $util.emptyArray; /** - * ImportDocumentsRequest gcsSource. - * @member {google.cloud.discoveryengine.v1beta.IGcsSource|null|undefined} gcsSource - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest + * ImportUserEventsResponse errorConfig. + * @member {google.cloud.discoveryengine.v1beta.IImportErrorConfig|null|undefined} errorConfig + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse * @instance */ - ImportDocumentsRequest.prototype.gcsSource = null; - - /** - * ImportDocumentsRequest bigquerySource. - * @member {google.cloud.discoveryengine.v1beta.IBigQuerySource|null|undefined} bigquerySource - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest - * @instance - */ - ImportDocumentsRequest.prototype.bigquerySource = null; - - /** - * ImportDocumentsRequest parent. - * @member {string} parent - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest - * @instance - */ - ImportDocumentsRequest.prototype.parent = ""; - - /** - * ImportDocumentsRequest errorConfig. - * @member {google.cloud.discoveryengine.v1beta.IImportErrorConfig|null|undefined} errorConfig - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest - * @instance - */ - ImportDocumentsRequest.prototype.errorConfig = null; + ImportUserEventsResponse.prototype.errorConfig = null; /** - * ImportDocumentsRequest reconciliationMode. - * @member {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode} reconciliationMode - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest + * ImportUserEventsResponse joinedEventsCount. + * @member {number|Long} joinedEventsCount + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse * @instance */ - ImportDocumentsRequest.prototype.reconciliationMode = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ImportUserEventsResponse.prototype.joinedEventsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * ImportDocumentsRequest source. - * @member {"inlineSource"|"gcsSource"|"bigquerySource"|undefined} source - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest + * ImportUserEventsResponse unjoinedEventsCount. + * @member {number|Long} unjoinedEventsCount + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse * @instance */ - Object.defineProperty(ImportDocumentsRequest.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["inlineSource", "gcsSource", "bigquerySource"]), - set: $util.oneOfSetter($oneOfFields) - }); + ImportUserEventsResponse.prototype.unjoinedEventsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new ImportDocumentsRequest instance using the specified properties. + * Creates a new ImportUserEventsResponse instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse * @static - * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsRequest=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest} ImportDocumentsRequest instance + * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsResponse=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsResponse} ImportUserEventsResponse instance */ - ImportDocumentsRequest.create = function create(properties) { - return new ImportDocumentsRequest(properties); + ImportUserEventsResponse.create = function create(properties) { + return new ImportUserEventsResponse(properties); }; /** - * Encodes the specified ImportDocumentsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.verify|verify} messages. + * Encodes the specified ImportUserEventsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse * @static - * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsRequest} message ImportDocumentsRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsResponse} message ImportUserEventsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportDocumentsRequest.encode = function encode(message, writer) { + ImportUserEventsResponse.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.inlineSource != null && Object.hasOwnProperty.call(message, "inlineSource")) - $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.encode(message.inlineSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) - $root.google.cloud.discoveryengine.v1beta.GcsSource.encode(message.gcsSource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.bigquerySource != null && Object.hasOwnProperty.call(message, "bigquerySource")) - $root.google.cloud.discoveryengine.v1beta.BigQuerySource.encode(message.bigquerySource, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.errorSamples != null && message.errorSamples.length) + for (var i = 0; i < message.errorSamples.length; ++i) + $root.google.rpc.Status.encode(message.errorSamples[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.errorConfig != null && Object.hasOwnProperty.call(message, "errorConfig")) - $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.encode(message.errorConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.reconciliationMode != null && Object.hasOwnProperty.call(message, "reconciliationMode")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.reconciliationMode); + $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.encode(message.errorConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.joinedEventsCount != null && Object.hasOwnProperty.call(message, "joinedEventsCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.joinedEventsCount); + if (message.unjoinedEventsCount != null && Object.hasOwnProperty.call(message, "unjoinedEventsCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.unjoinedEventsCount); return writer; }; /** - * Encodes the specified ImportDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.verify|verify} messages. + * Encodes the specified ImportUserEventsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse * @static - * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsRequest} message ImportDocumentsRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsResponse} message ImportUserEventsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportDocumentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ImportUserEventsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportDocumentsRequest message from the specified reader or buffer. + * Decodes an ImportUserEventsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest} ImportDocumentsRequest + * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsResponse} ImportUserEventsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportDocumentsRequest.decode = function decode(reader, length) { + ImportUserEventsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.ImportUserEventsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + if (!(message.errorSamples && message.errorSamples.length)) + message.errorSamples = []; + message.errorSamples.push($root.google.rpc.Status.decode(reader, reader.uint32())); + break; + } case 2: { - message.inlineSource = $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.decode(reader, reader.uint32()); + message.errorConfig = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.decode(reader, reader.uint32()); break; } case 3: { - message.gcsSource = $root.google.cloud.discoveryengine.v1beta.GcsSource.decode(reader, reader.uint32()); + message.joinedEventsCount = reader.int64(); break; } case 4: { - message.bigquerySource = $root.google.cloud.discoveryengine.v1beta.BigQuerySource.decode(reader, reader.uint32()); - break; - } - case 1: { - message.parent = reader.string(); - break; - } - case 5: { - message.errorConfig = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.decode(reader, reader.uint32()); - break; - } - case 6: { - message.reconciliationMode = reader.int32(); + message.unjoinedEventsCount = reader.int64(); break; } default: @@ -5060,562 +5521,319 @@ }; /** - * Decodes an ImportDocumentsRequest message from the specified reader or buffer, length delimited. + * Decodes an ImportUserEventsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest} ImportDocumentsRequest + * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsResponse} ImportUserEventsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportDocumentsRequest.decodeDelimited = function decodeDelimited(reader) { + ImportUserEventsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportDocumentsRequest message. + * Verifies an ImportUserEventsResponse message. * @function verify - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportDocumentsRequest.verify = function verify(message) { + ImportUserEventsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { - properties.source = 1; - { - var error = $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.verify(message.inlineSource); - if (error) - return "inlineSource." + error; - } - } - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - { - var error = $root.google.cloud.discoveryengine.v1beta.GcsSource.verify(message.gcsSource); - if (error) - return "gcsSource." + error; - } - } - if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - { - var error = $root.google.cloud.discoveryengine.v1beta.BigQuerySource.verify(message.bigquerySource); + if (message.errorSamples != null && message.hasOwnProperty("errorSamples")) { + if (!Array.isArray(message.errorSamples)) + return "errorSamples: array expected"; + for (var i = 0; i < message.errorSamples.length; ++i) { + var error = $root.google.rpc.Status.verify(message.errorSamples[i]); if (error) - return "bigquerySource." + error; + return "errorSamples." + error; } } - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) { var error = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.verify(message.errorConfig); if (error) return "errorConfig." + error; } - if (message.reconciliationMode != null && message.hasOwnProperty("reconciliationMode")) - switch (message.reconciliationMode) { - default: - return "reconciliationMode: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.joinedEventsCount != null && message.hasOwnProperty("joinedEventsCount")) + if (!$util.isInteger(message.joinedEventsCount) && !(message.joinedEventsCount && $util.isInteger(message.joinedEventsCount.low) && $util.isInteger(message.joinedEventsCount.high))) + return "joinedEventsCount: integer|Long expected"; + if (message.unjoinedEventsCount != null && message.hasOwnProperty("unjoinedEventsCount")) + if (!$util.isInteger(message.unjoinedEventsCount) && !(message.unjoinedEventsCount && $util.isInteger(message.unjoinedEventsCount.low) && $util.isInteger(message.unjoinedEventsCount.high))) + return "unjoinedEventsCount: integer|Long expected"; return null; }; /** - * Creates an ImportDocumentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImportUserEventsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest} ImportDocumentsRequest + * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsResponse} ImportUserEventsResponse */ - ImportDocumentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest) + ImportUserEventsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.ImportUserEventsResponse) return object; - var message = new $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest(); - if (object.inlineSource != null) { - if (typeof object.inlineSource !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.inlineSource: object expected"); - message.inlineSource = $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.fromObject(object.inlineSource); - } - if (object.gcsSource != null) { - if (typeof object.gcsSource !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.gcsSource: object expected"); - message.gcsSource = $root.google.cloud.discoveryengine.v1beta.GcsSource.fromObject(object.gcsSource); - } - if (object.bigquerySource != null) { - if (typeof object.bigquerySource !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.bigquerySource: object expected"); - message.bigquerySource = $root.google.cloud.discoveryengine.v1beta.BigQuerySource.fromObject(object.bigquerySource); + var message = new $root.google.cloud.discoveryengine.v1beta.ImportUserEventsResponse(); + if (object.errorSamples) { + if (!Array.isArray(object.errorSamples)) + throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsResponse.errorSamples: array expected"); + message.errorSamples = []; + for (var i = 0; i < object.errorSamples.length; ++i) { + if (typeof object.errorSamples[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsResponse.errorSamples: object expected"); + message.errorSamples[i] = $root.google.rpc.Status.fromObject(object.errorSamples[i]); + } } - if (object.parent != null) - message.parent = String(object.parent); if (object.errorConfig != null) { if (typeof object.errorConfig !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.errorConfig: object expected"); + throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsResponse.errorConfig: object expected"); message.errorConfig = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.fromObject(object.errorConfig); } - switch (object.reconciliationMode) { - default: - if (typeof object.reconciliationMode === "number") { - message.reconciliationMode = object.reconciliationMode; - break; - } - break; - case "RECONCILIATION_MODE_UNSPECIFIED": - case 0: - message.reconciliationMode = 0; - break; - case "INCREMENTAL": - case 1: - message.reconciliationMode = 1; - break; - case "FULL": - case 2: - message.reconciliationMode = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an ImportDocumentsRequest message. Also converts values to other types if specified. + if (object.joinedEventsCount != null) + if ($util.Long) + (message.joinedEventsCount = $util.Long.fromValue(object.joinedEventsCount)).unsigned = false; + else if (typeof object.joinedEventsCount === "string") + message.joinedEventsCount = parseInt(object.joinedEventsCount, 10); + else if (typeof object.joinedEventsCount === "number") + message.joinedEventsCount = object.joinedEventsCount; + else if (typeof object.joinedEventsCount === "object") + message.joinedEventsCount = new $util.LongBits(object.joinedEventsCount.low >>> 0, object.joinedEventsCount.high >>> 0).toNumber(); + if (object.unjoinedEventsCount != null) + if ($util.Long) + (message.unjoinedEventsCount = $util.Long.fromValue(object.unjoinedEventsCount)).unsigned = false; + else if (typeof object.unjoinedEventsCount === "string") + message.unjoinedEventsCount = parseInt(object.unjoinedEventsCount, 10); + else if (typeof object.unjoinedEventsCount === "number") + message.unjoinedEventsCount = object.unjoinedEventsCount; + else if (typeof object.unjoinedEventsCount === "object") + message.unjoinedEventsCount = new $util.LongBits(object.unjoinedEventsCount.low >>> 0, object.unjoinedEventsCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an ImportUserEventsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse * @static - * @param {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest} message ImportDocumentsRequest + * @param {google.cloud.discoveryengine.v1beta.ImportUserEventsResponse} message ImportUserEventsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportDocumentsRequest.toObject = function toObject(message, options) { + ImportUserEventsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.errorSamples = []; if (options.defaults) { - object.parent = ""; object.errorConfig = null; - object.reconciliationMode = options.enums === String ? "RECONCILIATION_MODE_UNSPECIFIED" : 0; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { - object.inlineSource = $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.toObject(message.inlineSource, options); - if (options.oneofs) - object.source = "inlineSource"; - } - if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { - object.gcsSource = $root.google.cloud.discoveryengine.v1beta.GcsSource.toObject(message.gcsSource, options); - if (options.oneofs) - object.source = "gcsSource"; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.joinedEventsCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.joinedEventsCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.unjoinedEventsCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.unjoinedEventsCount = options.longs === String ? "0" : 0; } - if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { - object.bigquerySource = $root.google.cloud.discoveryengine.v1beta.BigQuerySource.toObject(message.bigquerySource, options); - if (options.oneofs) - object.source = "bigquerySource"; + if (message.errorSamples && message.errorSamples.length) { + object.errorSamples = []; + for (var j = 0; j < message.errorSamples.length; ++j) + object.errorSamples[j] = $root.google.rpc.Status.toObject(message.errorSamples[j], options); } if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) object.errorConfig = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.toObject(message.errorConfig, options); - if (message.reconciliationMode != null && message.hasOwnProperty("reconciliationMode")) - object.reconciliationMode = options.enums === String ? $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode[message.reconciliationMode] === undefined ? message.reconciliationMode : $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode[message.reconciliationMode] : message.reconciliationMode; + if (message.joinedEventsCount != null && message.hasOwnProperty("joinedEventsCount")) + if (typeof message.joinedEventsCount === "number") + object.joinedEventsCount = options.longs === String ? String(message.joinedEventsCount) : message.joinedEventsCount; + else + object.joinedEventsCount = options.longs === String ? $util.Long.prototype.toString.call(message.joinedEventsCount) : options.longs === Number ? new $util.LongBits(message.joinedEventsCount.low >>> 0, message.joinedEventsCount.high >>> 0).toNumber() : message.joinedEventsCount; + if (message.unjoinedEventsCount != null && message.hasOwnProperty("unjoinedEventsCount")) + if (typeof message.unjoinedEventsCount === "number") + object.unjoinedEventsCount = options.longs === String ? String(message.unjoinedEventsCount) : message.unjoinedEventsCount; + else + object.unjoinedEventsCount = options.longs === String ? $util.Long.prototype.toString.call(message.unjoinedEventsCount) : options.longs === Number ? new $util.LongBits(message.unjoinedEventsCount.low >>> 0, message.unjoinedEventsCount.high >>> 0).toNumber() : message.unjoinedEventsCount; return object; }; /** - * Converts this ImportDocumentsRequest to JSON. + * Converts this ImportUserEventsResponse to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse * @instance * @returns {Object.} JSON object */ - ImportDocumentsRequest.prototype.toJSON = function toJSON() { + ImportUserEventsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportDocumentsRequest + * Gets the default type url for ImportUserEventsResponse * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportDocumentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportUserEventsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ImportDocumentsRequest"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ImportUserEventsResponse"; }; - ImportDocumentsRequest.InlineSource = (function() { + return ImportUserEventsResponse; + })(); - /** - * Properties of an InlineSource. - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest - * @interface IInlineSource - * @property {Array.|null} [documents] InlineSource documents - */ + v1beta.ImportUserEventsMetadata = (function() { - /** - * Constructs a new InlineSource. - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest - * @classdesc Represents an InlineSource. - * @implements IInlineSource - * @constructor - * @param {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource=} [properties] Properties to set - */ - function InlineSource(properties) { - this.documents = []; - 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]]; - } + /** + * Properties of an ImportUserEventsMetadata. + * @memberof google.cloud.discoveryengine.v1beta + * @interface IImportUserEventsMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] ImportUserEventsMetadata createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] ImportUserEventsMetadata updateTime + * @property {number|Long|null} [successCount] ImportUserEventsMetadata successCount + * @property {number|Long|null} [failureCount] ImportUserEventsMetadata failureCount + */ - /** - * InlineSource documents. - * @member {Array.} documents - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource - * @instance - */ - InlineSource.prototype.documents = $util.emptyArray; + /** + * Constructs a new ImportUserEventsMetadata. + * @memberof google.cloud.discoveryengine.v1beta + * @classdesc Represents an ImportUserEventsMetadata. + * @implements IImportUserEventsMetadata + * @constructor + * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsMetadata=} [properties] Properties to set + */ + function ImportUserEventsMetadata(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]]; + } - /** - * Creates a new InlineSource instance using the specified properties. - * @function create - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource - * @static - * @param {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource} InlineSource instance - */ - InlineSource.create = function create(properties) { - return new InlineSource(properties); - }; + /** + * ImportUserEventsMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata + * @instance + */ + ImportUserEventsMetadata.prototype.createTime = null; - /** - * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.verify|verify} messages. - * @function encode - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource - * @static - * @param {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource} message InlineSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InlineSource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.documents != null && message.documents.length) - for (var i = 0; i < message.documents.length; ++i) - $root.google.cloud.discoveryengine.v1beta.Document.encode(message.documents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * ImportUserEventsMetadata updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata + * @instance + */ + ImportUserEventsMetadata.prototype.updateTime = null; - /** - * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource - * @static - * @param {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource} message InlineSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InlineSource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * ImportUserEventsMetadata successCount. + * @member {number|Long} successCount + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata + * @instance + */ + ImportUserEventsMetadata.prototype.successCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Decodes an InlineSource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource} InlineSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InlineSource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.documents && message.documents.length)) - message.documents = []; - message.documents.push($root.google.cloud.discoveryengine.v1beta.Document.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InlineSource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource} InlineSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InlineSource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InlineSource message. - * @function verify - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InlineSource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.documents != null && message.hasOwnProperty("documents")) { - if (!Array.isArray(message.documents)) - return "documents: array expected"; - for (var i = 0; i < message.documents.length; ++i) { - var error = $root.google.cloud.discoveryengine.v1beta.Document.verify(message.documents[i]); - if (error) - return "documents." + error; - } - } - return null; - }; - - /** - * Creates an InlineSource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource} InlineSource - */ - InlineSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource) - return object; - var message = new $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource(); - if (object.documents) { - if (!Array.isArray(object.documents)) - throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.documents: array expected"); - message.documents = []; - for (var i = 0; i < object.documents.length; ++i) { - if (typeof object.documents[i] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.documents: object expected"); - message.documents[i] = $root.google.cloud.discoveryengine.v1beta.Document.fromObject(object.documents[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an InlineSource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource - * @static - * @param {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource} message InlineSource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InlineSource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.documents = []; - if (message.documents && message.documents.length) { - object.documents = []; - for (var j = 0; j < message.documents.length; ++j) - object.documents[j] = $root.google.cloud.discoveryengine.v1beta.Document.toObject(message.documents[j], options); - } - return object; - }; - - /** - * Converts this InlineSource to JSON. - * @function toJSON - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource - * @instance - * @returns {Object.} JSON object - */ - InlineSource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for InlineSource - * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InlineSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource"; - }; - - return InlineSource; - })(); - - /** - * ReconciliationMode enum. - * @name google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode - * @enum {number} - * @property {number} RECONCILIATION_MODE_UNSPECIFIED=0 RECONCILIATION_MODE_UNSPECIFIED value - * @property {number} INCREMENTAL=1 INCREMENTAL value - * @property {number} FULL=2 FULL value - */ - ImportDocumentsRequest.ReconciliationMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RECONCILIATION_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INCREMENTAL"] = 1; - values[valuesById[2] = "FULL"] = 2; - return values; - })(); - - return ImportDocumentsRequest; - })(); - - v1beta.ImportDocumentsResponse = (function() { - - /** - * Properties of an ImportDocumentsResponse. - * @memberof google.cloud.discoveryengine.v1beta - * @interface IImportDocumentsResponse - * @property {Array.|null} [errorSamples] ImportDocumentsResponse errorSamples - * @property {google.cloud.discoveryengine.v1beta.IImportErrorConfig|null} [errorConfig] ImportDocumentsResponse errorConfig - */ - - /** - * Constructs a new ImportDocumentsResponse. - * @memberof google.cloud.discoveryengine.v1beta - * @classdesc Represents an ImportDocumentsResponse. - * @implements IImportDocumentsResponse - * @constructor - * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsResponse=} [properties] Properties to set - */ - function ImportDocumentsResponse(properties) { - this.errorSamples = []; - 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]]; - } - - /** - * ImportDocumentsResponse errorSamples. - * @member {Array.} errorSamples - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse - * @instance - */ - ImportDocumentsResponse.prototype.errorSamples = $util.emptyArray; - - /** - * ImportDocumentsResponse errorConfig. - * @member {google.cloud.discoveryengine.v1beta.IImportErrorConfig|null|undefined} errorConfig - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse - * @instance - */ - ImportDocumentsResponse.prototype.errorConfig = null; + /** + * ImportUserEventsMetadata failureCount. + * @member {number|Long} failureCount + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata + * @instance + */ + ImportUserEventsMetadata.prototype.failureCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new ImportDocumentsResponse instance using the specified properties. + * Creates a new ImportUserEventsMetadata instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata * @static - * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsResponse=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsResponse} ImportDocumentsResponse instance + * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsMetadata=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata} ImportUserEventsMetadata instance */ - ImportDocumentsResponse.create = function create(properties) { - return new ImportDocumentsResponse(properties); + ImportUserEventsMetadata.create = function create(properties) { + return new ImportUserEventsMetadata(properties); }; /** - * Encodes the specified ImportDocumentsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsResponse.verify|verify} messages. + * Encodes the specified ImportUserEventsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata * @static - * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsResponse} message ImportDocumentsResponse message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsMetadata} message ImportUserEventsMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportDocumentsResponse.encode = function encode(message, writer) { + ImportUserEventsMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.errorSamples != null && message.errorSamples.length) - for (var i = 0; i < message.errorSamples.length; ++i) - $root.google.rpc.Status.encode(message.errorSamples[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.errorConfig != null && Object.hasOwnProperty.call(message, "errorConfig")) - $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.encode(message.errorConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.successCount != null && Object.hasOwnProperty.call(message, "successCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.successCount); + if (message.failureCount != null && Object.hasOwnProperty.call(message, "failureCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.failureCount); return writer; }; /** - * Encodes the specified ImportDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsResponse.verify|verify} messages. + * Encodes the specified ImportUserEventsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata * @static - * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsResponse} message ImportDocumentsResponse message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.IImportUserEventsMetadata} message ImportUserEventsMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImportDocumentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + ImportUserEventsMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImportDocumentsResponse message from the specified reader or buffer. + * Decodes an ImportUserEventsMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsResponse} ImportDocumentsResponse + * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata} ImportUserEventsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportDocumentsResponse.decode = function decode(reader, length) { + ImportUserEventsMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.ImportDocumentsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.errorSamples && message.errorSamples.length)) - message.errorSamples = []; - message.errorSamples.push($root.google.rpc.Status.decode(reader, reader.uint32())); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 2: { - message.errorConfig = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.decode(reader, reader.uint32()); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.successCount = reader.int64(); + break; + } + case 4: { + message.failureCount = reader.int64(); break; } default: @@ -5627,174 +5845,188 @@ }; /** - * Decodes an ImportDocumentsResponse message from the specified reader or buffer, length delimited. + * Decodes an ImportUserEventsMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsResponse} ImportDocumentsResponse + * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata} ImportUserEventsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImportDocumentsResponse.decodeDelimited = function decodeDelimited(reader) { + ImportUserEventsMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImportDocumentsResponse message. + * Verifies an ImportUserEventsMetadata message. * @function verify - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImportDocumentsResponse.verify = function verify(message) { + ImportUserEventsMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.errorSamples != null && message.hasOwnProperty("errorSamples")) { - if (!Array.isArray(message.errorSamples)) - return "errorSamples: array expected"; - for (var i = 0; i < message.errorSamples.length; ++i) { - var error = $root.google.rpc.Status.verify(message.errorSamples[i]); - if (error) - return "errorSamples." + error; - } - } - if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) { - var error = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.verify(message.errorConfig); + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) - return "errorConfig." + 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.successCount != null && message.hasOwnProperty("successCount")) + if (!$util.isInteger(message.successCount) && !(message.successCount && $util.isInteger(message.successCount.low) && $util.isInteger(message.successCount.high))) + return "successCount: integer|Long expected"; + if (message.failureCount != null && message.hasOwnProperty("failureCount")) + if (!$util.isInteger(message.failureCount) && !(message.failureCount && $util.isInteger(message.failureCount.low) && $util.isInteger(message.failureCount.high))) + return "failureCount: integer|Long expected"; return null; }; /** - * Creates an ImportDocumentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ImportUserEventsMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsResponse} ImportDocumentsResponse + * @returns {google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata} ImportUserEventsMetadata */ - ImportDocumentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1beta.ImportDocumentsResponse) + ImportUserEventsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata) return object; - var message = new $root.google.cloud.discoveryengine.v1beta.ImportDocumentsResponse(); - if (object.errorSamples) { - if (!Array.isArray(object.errorSamples)) - throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsResponse.errorSamples: array expected"); - message.errorSamples = []; - for (var i = 0; i < object.errorSamples.length; ++i) { - if (typeof object.errorSamples[i] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsResponse.errorSamples: object expected"); - message.errorSamples[i] = $root.google.rpc.Status.fromObject(object.errorSamples[i]); - } + var message = new $root.google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - if (object.errorConfig != null) { - if (typeof object.errorConfig !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsResponse.errorConfig: object expected"); - message.errorConfig = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.fromObject(object.errorConfig); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } + if (object.successCount != null) + if ($util.Long) + (message.successCount = $util.Long.fromValue(object.successCount)).unsigned = false; + else if (typeof object.successCount === "string") + message.successCount = parseInt(object.successCount, 10); + else if (typeof object.successCount === "number") + message.successCount = object.successCount; + else if (typeof object.successCount === "object") + message.successCount = new $util.LongBits(object.successCount.low >>> 0, object.successCount.high >>> 0).toNumber(); + if (object.failureCount != null) + if ($util.Long) + (message.failureCount = $util.Long.fromValue(object.failureCount)).unsigned = false; + else if (typeof object.failureCount === "string") + message.failureCount = parseInt(object.failureCount, 10); + else if (typeof object.failureCount === "number") + message.failureCount = object.failureCount; + else if (typeof object.failureCount === "object") + message.failureCount = new $util.LongBits(object.failureCount.low >>> 0, object.failureCount.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from an ImportDocumentsResponse message. Also converts values to other types if specified. + * Creates a plain object from an ImportUserEventsMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata * @static - * @param {google.cloud.discoveryengine.v1beta.ImportDocumentsResponse} message ImportDocumentsResponse + * @param {google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata} message ImportUserEventsMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImportDocumentsResponse.toObject = function toObject(message, options) { + ImportUserEventsMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.errorSamples = []; - if (options.defaults) - object.errorConfig = null; - if (message.errorSamples && message.errorSamples.length) { - object.errorSamples = []; - for (var j = 0; j < message.errorSamples.length; ++j) - object.errorSamples[j] = $root.google.rpc.Status.toObject(message.errorSamples[j], options); + if (options.defaults) { + object.createTime = null; + object.updateTime = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.successCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.successCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.failureCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.failureCount = options.longs === String ? "0" : 0; } - if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) - object.errorConfig = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.toObject(message.errorConfig, options); + 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.successCount != null && message.hasOwnProperty("successCount")) + if (typeof message.successCount === "number") + object.successCount = options.longs === String ? String(message.successCount) : message.successCount; + else + object.successCount = options.longs === String ? $util.Long.prototype.toString.call(message.successCount) : options.longs === Number ? new $util.LongBits(message.successCount.low >>> 0, message.successCount.high >>> 0).toNumber() : message.successCount; + if (message.failureCount != null && message.hasOwnProperty("failureCount")) + if (typeof message.failureCount === "number") + object.failureCount = options.longs === String ? String(message.failureCount) : message.failureCount; + else + object.failureCount = options.longs === String ? $util.Long.prototype.toString.call(message.failureCount) : options.longs === Number ? new $util.LongBits(message.failureCount.low >>> 0, message.failureCount.high >>> 0).toNumber() : message.failureCount; return object; }; /** - * Converts this ImportDocumentsResponse to JSON. + * Converts this ImportUserEventsMetadata to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata * @instance * @returns {Object.} JSON object */ - ImportDocumentsResponse.prototype.toJSON = function toJSON() { + ImportUserEventsMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ImportDocumentsResponse + * Gets the default type url for ImportUserEventsMetadata * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse + * @memberof google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ImportDocumentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportUserEventsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ImportDocumentsResponse"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata"; }; - return ImportDocumentsResponse; + return ImportUserEventsMetadata; })(); - v1beta.UserEvent = (function() { + v1beta.ImportDocumentsMetadata = (function() { /** - * Properties of a UserEvent. + * Properties of an ImportDocumentsMetadata. * @memberof google.cloud.discoveryengine.v1beta - * @interface IUserEvent - * @property {string|null} [eventType] UserEvent eventType - * @property {string|null} [userPseudoId] UserEvent userPseudoId - * @property {google.protobuf.ITimestamp|null} [eventTime] UserEvent eventTime - * @property {google.cloud.discoveryengine.v1beta.IUserInfo|null} [userInfo] UserEvent userInfo - * @property {boolean|null} [directUserRequest] UserEvent directUserRequest - * @property {string|null} [sessionId] UserEvent sessionId - * @property {google.cloud.discoveryengine.v1beta.IPageInfo|null} [pageInfo] UserEvent pageInfo - * @property {string|null} [attributionToken] UserEvent attributionToken - * @property {string|null} [filter] UserEvent filter - * @property {Array.|null} [documents] UserEvent documents - * @property {google.cloud.discoveryengine.v1beta.IPanelInfo|null} [panel] UserEvent panel - * @property {google.cloud.discoveryengine.v1beta.ISearchInfo|null} [searchInfo] UserEvent searchInfo - * @property {google.cloud.discoveryengine.v1beta.ICompletionInfo|null} [completionInfo] UserEvent completionInfo - * @property {google.cloud.discoveryengine.v1beta.ITransactionInfo|null} [transactionInfo] UserEvent transactionInfo - * @property {Array.|null} [tagIds] UserEvent tagIds - * @property {Array.|null} [promotionIds] UserEvent promotionIds - * @property {Object.|null} [attributes] UserEvent attributes - * @property {google.cloud.discoveryengine.v1beta.IMediaInfo|null} [mediaInfo] UserEvent mediaInfo + * @interface IImportDocumentsMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] ImportDocumentsMetadata createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] ImportDocumentsMetadata updateTime + * @property {number|Long|null} [successCount] ImportDocumentsMetadata successCount + * @property {number|Long|null} [failureCount] ImportDocumentsMetadata failureCount */ /** - * Constructs a new UserEvent. + * Constructs a new ImportDocumentsMetadata. * @memberof google.cloud.discoveryengine.v1beta - * @classdesc Represents a UserEvent. - * @implements IUserEvent + * @classdesc Represents an ImportDocumentsMetadata. + * @implements IImportDocumentsMetadata * @constructor - * @param {google.cloud.discoveryengine.v1beta.IUserEvent=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsMetadata=} [properties] Properties to set */ - function UserEvent(properties) { - this.documents = []; - this.tagIds = []; - this.promotionIds = []; - this.attributes = {}; + function ImportDocumentsMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5802,344 +6034,472 @@ } /** - * UserEvent eventType. - * @member {string} eventType - * @memberof google.cloud.discoveryengine.v1beta.UserEvent + * ImportDocumentsMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata * @instance */ - UserEvent.prototype.eventType = ""; + ImportDocumentsMetadata.prototype.createTime = null; /** - * UserEvent userPseudoId. - * @member {string} userPseudoId - * @memberof google.cloud.discoveryengine.v1beta.UserEvent + * ImportDocumentsMetadata updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata * @instance */ - UserEvent.prototype.userPseudoId = ""; + ImportDocumentsMetadata.prototype.updateTime = null; /** - * UserEvent eventTime. - * @member {google.protobuf.ITimestamp|null|undefined} eventTime - * @memberof google.cloud.discoveryengine.v1beta.UserEvent + * ImportDocumentsMetadata successCount. + * @member {number|Long} successCount + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata * @instance */ - UserEvent.prototype.eventTime = null; + ImportDocumentsMetadata.prototype.successCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * UserEvent userInfo. - * @member {google.cloud.discoveryengine.v1beta.IUserInfo|null|undefined} userInfo - * @memberof google.cloud.discoveryengine.v1beta.UserEvent + * ImportDocumentsMetadata failureCount. + * @member {number|Long} failureCount + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata * @instance */ - UserEvent.prototype.userInfo = null; + ImportDocumentsMetadata.prototype.failureCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * UserEvent directUserRequest. - * @member {boolean} directUserRequest - * @memberof google.cloud.discoveryengine.v1beta.UserEvent - * @instance + * Creates a new ImportDocumentsMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata + * @static + * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsMetadata=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata} ImportDocumentsMetadata instance */ - UserEvent.prototype.directUserRequest = false; + ImportDocumentsMetadata.create = function create(properties) { + return new ImportDocumentsMetadata(properties); + }; /** - * UserEvent sessionId. - * @member {string} sessionId - * @memberof google.cloud.discoveryengine.v1beta.UserEvent - * @instance + * Encodes the specified ImportDocumentsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata + * @static + * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsMetadata} message ImportDocumentsMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - UserEvent.prototype.sessionId = ""; + ImportDocumentsMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.successCount != null && Object.hasOwnProperty.call(message, "successCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.successCount); + if (message.failureCount != null && Object.hasOwnProperty.call(message, "failureCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.failureCount); + return writer; + }; /** - * UserEvent pageInfo. - * @member {google.cloud.discoveryengine.v1beta.IPageInfo|null|undefined} pageInfo - * @memberof google.cloud.discoveryengine.v1beta.UserEvent - * @instance + * Encodes the specified ImportDocumentsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata + * @static + * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsMetadata} message ImportDocumentsMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - UserEvent.prototype.pageInfo = null; + ImportDocumentsMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * UserEvent attributionToken. - * @member {string} attributionToken - * @memberof google.cloud.discoveryengine.v1beta.UserEvent - * @instance + * Decodes an ImportDocumentsMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata} ImportDocumentsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserEvent.prototype.attributionToken = ""; + ImportDocumentsMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.successCount = reader.int64(); + break; + } + case 4: { + message.failureCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * UserEvent filter. - * @member {string} filter - * @memberof google.cloud.discoveryengine.v1beta.UserEvent - * @instance + * Decodes an ImportDocumentsMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata} ImportDocumentsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserEvent.prototype.filter = ""; + ImportDocumentsMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * UserEvent documents. - * @member {Array.} documents - * @memberof google.cloud.discoveryengine.v1beta.UserEvent - * @instance + * Verifies an ImportDocumentsMetadata message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UserEvent.prototype.documents = $util.emptyArray; + ImportDocumentsMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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.successCount != null && message.hasOwnProperty("successCount")) + if (!$util.isInteger(message.successCount) && !(message.successCount && $util.isInteger(message.successCount.low) && $util.isInteger(message.successCount.high))) + return "successCount: integer|Long expected"; + if (message.failureCount != null && message.hasOwnProperty("failureCount")) + if (!$util.isInteger(message.failureCount) && !(message.failureCount && $util.isInteger(message.failureCount.low) && $util.isInteger(message.failureCount.high))) + return "failureCount: integer|Long expected"; + return null; + }; /** - * UserEvent panel. - * @member {google.cloud.discoveryengine.v1beta.IPanelInfo|null|undefined} panel - * @memberof google.cloud.discoveryengine.v1beta.UserEvent - * @instance + * Creates an ImportDocumentsMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata} ImportDocumentsMetadata */ - UserEvent.prototype.panel = null; + ImportDocumentsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata.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.discoveryengine.v1beta.ImportDocumentsMetadata.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.successCount != null) + if ($util.Long) + (message.successCount = $util.Long.fromValue(object.successCount)).unsigned = false; + else if (typeof object.successCount === "string") + message.successCount = parseInt(object.successCount, 10); + else if (typeof object.successCount === "number") + message.successCount = object.successCount; + else if (typeof object.successCount === "object") + message.successCount = new $util.LongBits(object.successCount.low >>> 0, object.successCount.high >>> 0).toNumber(); + if (object.failureCount != null) + if ($util.Long) + (message.failureCount = $util.Long.fromValue(object.failureCount)).unsigned = false; + else if (typeof object.failureCount === "string") + message.failureCount = parseInt(object.failureCount, 10); + else if (typeof object.failureCount === "number") + message.failureCount = object.failureCount; + else if (typeof object.failureCount === "object") + message.failureCount = new $util.LongBits(object.failureCount.low >>> 0, object.failureCount.high >>> 0).toNumber(); + return message; + }; /** - * UserEvent searchInfo. - * @member {google.cloud.discoveryengine.v1beta.ISearchInfo|null|undefined} searchInfo - * @memberof google.cloud.discoveryengine.v1beta.UserEvent - * @instance + * Creates a plain object from an ImportDocumentsMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata + * @static + * @param {google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata} message ImportDocumentsMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - UserEvent.prototype.searchInfo = null; + ImportDocumentsMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.updateTime = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.successCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.successCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.failureCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.failureCount = options.longs === String ? "0" : 0; + } + 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.successCount != null && message.hasOwnProperty("successCount")) + if (typeof message.successCount === "number") + object.successCount = options.longs === String ? String(message.successCount) : message.successCount; + else + object.successCount = options.longs === String ? $util.Long.prototype.toString.call(message.successCount) : options.longs === Number ? new $util.LongBits(message.successCount.low >>> 0, message.successCount.high >>> 0).toNumber() : message.successCount; + if (message.failureCount != null && message.hasOwnProperty("failureCount")) + if (typeof message.failureCount === "number") + object.failureCount = options.longs === String ? String(message.failureCount) : message.failureCount; + else + object.failureCount = options.longs === String ? $util.Long.prototype.toString.call(message.failureCount) : options.longs === Number ? new $util.LongBits(message.failureCount.low >>> 0, message.failureCount.high >>> 0).toNumber() : message.failureCount; + return object; + }; /** - * UserEvent completionInfo. - * @member {google.cloud.discoveryengine.v1beta.ICompletionInfo|null|undefined} completionInfo - * @memberof google.cloud.discoveryengine.v1beta.UserEvent + * Converts this ImportDocumentsMetadata to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata * @instance + * @returns {Object.} JSON object */ - UserEvent.prototype.completionInfo = null; + ImportDocumentsMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * UserEvent transactionInfo. - * @member {google.cloud.discoveryengine.v1beta.ITransactionInfo|null|undefined} transactionInfo - * @memberof google.cloud.discoveryengine.v1beta.UserEvent - * @instance + * Gets the default type url for ImportDocumentsMetadata + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - UserEvent.prototype.transactionInfo = null; + ImportDocumentsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata"; + }; + + return ImportDocumentsMetadata; + })(); + + v1beta.ImportDocumentsRequest = (function() { /** - * UserEvent tagIds. - * @member {Array.} tagIds - * @memberof google.cloud.discoveryengine.v1beta.UserEvent - * @instance + * Properties of an ImportDocumentsRequest. + * @memberof google.cloud.discoveryengine.v1beta + * @interface IImportDocumentsRequest + * @property {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource|null} [inlineSource] ImportDocumentsRequest inlineSource + * @property {google.cloud.discoveryengine.v1beta.IGcsSource|null} [gcsSource] ImportDocumentsRequest gcsSource + * @property {google.cloud.discoveryengine.v1beta.IBigQuerySource|null} [bigquerySource] ImportDocumentsRequest bigquerySource + * @property {string|null} [parent] ImportDocumentsRequest parent + * @property {google.cloud.discoveryengine.v1beta.IImportErrorConfig|null} [errorConfig] ImportDocumentsRequest errorConfig + * @property {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode|null} [reconciliationMode] ImportDocumentsRequest reconciliationMode */ - UserEvent.prototype.tagIds = $util.emptyArray; /** - * UserEvent promotionIds. - * @member {Array.} promotionIds - * @memberof google.cloud.discoveryengine.v1beta.UserEvent - * @instance + * Constructs a new ImportDocumentsRequest. + * @memberof google.cloud.discoveryengine.v1beta + * @classdesc Represents an ImportDocumentsRequest. + * @implements IImportDocumentsRequest + * @constructor + * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsRequest=} [properties] Properties to set */ - UserEvent.prototype.promotionIds = $util.emptyArray; + function ImportDocumentsRequest(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]]; + } /** - * UserEvent attributes. - * @member {Object.} attributes - * @memberof google.cloud.discoveryengine.v1beta.UserEvent + * ImportDocumentsRequest inlineSource. + * @member {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource|null|undefined} inlineSource + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest * @instance */ - UserEvent.prototype.attributes = $util.emptyObject; + ImportDocumentsRequest.prototype.inlineSource = null; /** - * UserEvent mediaInfo. - * @member {google.cloud.discoveryengine.v1beta.IMediaInfo|null|undefined} mediaInfo - * @memberof google.cloud.discoveryengine.v1beta.UserEvent + * ImportDocumentsRequest gcsSource. + * @member {google.cloud.discoveryengine.v1beta.IGcsSource|null|undefined} gcsSource + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest * @instance */ - UserEvent.prototype.mediaInfo = null; + ImportDocumentsRequest.prototype.gcsSource = null; /** - * Creates a new UserEvent instance using the specified properties. + * ImportDocumentsRequest bigquerySource. + * @member {google.cloud.discoveryengine.v1beta.IBigQuerySource|null|undefined} bigquerySource + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest + * @instance + */ + ImportDocumentsRequest.prototype.bigquerySource = null; + + /** + * ImportDocumentsRequest parent. + * @member {string} parent + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest + * @instance + */ + ImportDocumentsRequest.prototype.parent = ""; + + /** + * ImportDocumentsRequest errorConfig. + * @member {google.cloud.discoveryengine.v1beta.IImportErrorConfig|null|undefined} errorConfig + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest + * @instance + */ + ImportDocumentsRequest.prototype.errorConfig = null; + + /** + * ImportDocumentsRequest reconciliationMode. + * @member {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode} reconciliationMode + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest + * @instance + */ + ImportDocumentsRequest.prototype.reconciliationMode = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ImportDocumentsRequest source. + * @member {"inlineSource"|"gcsSource"|"bigquerySource"|undefined} source + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest + * @instance + */ + Object.defineProperty(ImportDocumentsRequest.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["inlineSource", "gcsSource", "bigquerySource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ImportDocumentsRequest instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1beta.UserEvent + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest * @static - * @param {google.cloud.discoveryengine.v1beta.IUserEvent=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1beta.UserEvent} UserEvent instance + * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsRequest=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest} ImportDocumentsRequest instance */ - UserEvent.create = function create(properties) { - return new UserEvent(properties); + ImportDocumentsRequest.create = function create(properties) { + return new ImportDocumentsRequest(properties); }; /** - * Encodes the specified UserEvent message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UserEvent.verify|verify} messages. + * Encodes the specified ImportDocumentsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1beta.UserEvent + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest * @static - * @param {google.cloud.discoveryengine.v1beta.IUserEvent} message UserEvent message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsRequest} message ImportDocumentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UserEvent.encode = function encode(message, writer) { + ImportDocumentsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.eventType != null && Object.hasOwnProperty.call(message, "eventType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventType); - if (message.userPseudoId != null && Object.hasOwnProperty.call(message, "userPseudoId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.userPseudoId); - if (message.eventTime != null && Object.hasOwnProperty.call(message, "eventTime")) - $root.google.protobuf.Timestamp.encode(message.eventTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.userInfo != null && Object.hasOwnProperty.call(message, "userInfo")) - $root.google.cloud.discoveryengine.v1beta.UserInfo.encode(message.userInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.directUserRequest != null && Object.hasOwnProperty.call(message, "directUserRequest")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.directUserRequest); - if (message.sessionId != null && Object.hasOwnProperty.call(message, "sessionId")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.sessionId); - if (message.pageInfo != null && Object.hasOwnProperty.call(message, "pageInfo")) - $root.google.cloud.discoveryengine.v1beta.PageInfo.encode(message.pageInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.attributionToken != null && Object.hasOwnProperty.call(message, "attributionToken")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.attributionToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.filter); - if (message.documents != null && message.documents.length) - for (var i = 0; i < message.documents.length; ++i) - $root.google.cloud.discoveryengine.v1beta.DocumentInfo.encode(message.documents[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.panel != null && Object.hasOwnProperty.call(message, "panel")) - $root.google.cloud.discoveryengine.v1beta.PanelInfo.encode(message.panel, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.searchInfo != null && Object.hasOwnProperty.call(message, "searchInfo")) - $root.google.cloud.discoveryengine.v1beta.SearchInfo.encode(message.searchInfo, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.completionInfo != null && Object.hasOwnProperty.call(message, "completionInfo")) - $root.google.cloud.discoveryengine.v1beta.CompletionInfo.encode(message.completionInfo, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.transactionInfo != null && Object.hasOwnProperty.call(message, "transactionInfo")) - $root.google.cloud.discoveryengine.v1beta.TransactionInfo.encode(message.transactionInfo, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.tagIds != null && message.tagIds.length) - for (var i = 0; i < message.tagIds.length; ++i) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.tagIds[i]); - if (message.promotionIds != null && message.promotionIds.length) - for (var i = 0; i < message.promotionIds.length; ++i) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.promotionIds[i]); - if (message.attributes != null && Object.hasOwnProperty.call(message, "attributes")) - for (var keys = Object.keys(message.attributes), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 17, wireType 2 =*/138).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.discoveryengine.v1beta.CustomAttribute.encode(message.attributes[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.mediaInfo != null && Object.hasOwnProperty.call(message, "mediaInfo")) - $root.google.cloud.discoveryengine.v1beta.MediaInfo.encode(message.mediaInfo, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.inlineSource != null && Object.hasOwnProperty.call(message, "inlineSource")) + $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.encode(message.inlineSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) + $root.google.cloud.discoveryengine.v1beta.GcsSource.encode(message.gcsSource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.bigquerySource != null && Object.hasOwnProperty.call(message, "bigquerySource")) + $root.google.cloud.discoveryengine.v1beta.BigQuerySource.encode(message.bigquerySource, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.errorConfig != null && Object.hasOwnProperty.call(message, "errorConfig")) + $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.encode(message.errorConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.reconciliationMode != null && Object.hasOwnProperty.call(message, "reconciliationMode")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.reconciliationMode); return writer; }; /** - * Encodes the specified UserEvent message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UserEvent.verify|verify} messages. + * Encodes the specified ImportDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.UserEvent + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest * @static - * @param {google.cloud.discoveryengine.v1beta.IUserEvent} message UserEvent message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsRequest} message ImportDocumentsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UserEvent.encodeDelimited = function encodeDelimited(message, writer) { + ImportDocumentsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a UserEvent message from the specified reader or buffer. + * Decodes an ImportDocumentsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1beta.UserEvent + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1beta.UserEvent} UserEvent + * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest} ImportDocumentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserEvent.decode = function decode(reader, length) { + ImportDocumentsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.UserEvent(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.eventType = reader.string(); - break; - } case 2: { - message.userPseudoId = reader.string(); + message.inlineSource = $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.decode(reader, reader.uint32()); break; } case 3: { - message.eventTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.gcsSource = $root.google.cloud.discoveryengine.v1beta.GcsSource.decode(reader, reader.uint32()); break; } case 4: { - message.userInfo = $root.google.cloud.discoveryengine.v1beta.UserInfo.decode(reader, reader.uint32()); - break; - } - case 5: { - message.directUserRequest = reader.bool(); - break; - } - case 6: { - message.sessionId = reader.string(); - break; - } - case 7: { - message.pageInfo = $root.google.cloud.discoveryengine.v1beta.PageInfo.decode(reader, reader.uint32()); - break; - } - case 8: { - message.attributionToken = reader.string(); - break; - } - case 9: { - message.filter = reader.string(); - break; - } - case 10: { - if (!(message.documents && message.documents.length)) - message.documents = []; - message.documents.push($root.google.cloud.discoveryengine.v1beta.DocumentInfo.decode(reader, reader.uint32())); - break; - } - case 11: { - message.panel = $root.google.cloud.discoveryengine.v1beta.PanelInfo.decode(reader, reader.uint32()); - break; - } - case 12: { - message.searchInfo = $root.google.cloud.discoveryengine.v1beta.SearchInfo.decode(reader, reader.uint32()); - break; - } - case 13: { - message.completionInfo = $root.google.cloud.discoveryengine.v1beta.CompletionInfo.decode(reader, reader.uint32()); - break; - } - case 14: { - message.transactionInfo = $root.google.cloud.discoveryengine.v1beta.TransactionInfo.decode(reader, reader.uint32()); - break; - } - case 15: { - if (!(message.tagIds && message.tagIds.length)) - message.tagIds = []; - message.tagIds.push(reader.string()); + message.bigquerySource = $root.google.cloud.discoveryengine.v1beta.BigQuerySource.decode(reader, reader.uint32()); break; } - case 16: { - if (!(message.promotionIds && message.promotionIds.length)) - message.promotionIds = []; - message.promotionIds.push(reader.string()); + case 1: { + message.parent = reader.string(); break; } - case 17: { - if (message.attributes === $util.emptyObject) - message.attributes = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.discoveryengine.v1beta.CustomAttribute.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.attributes[key] = value; + case 5: { + message.errorConfig = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.decode(reader, reader.uint32()); break; } - case 18: { - message.mediaInfo = $root.google.cloud.discoveryengine.v1beta.MediaInfo.decode(reader, reader.uint32()); + case 6: { + message.reconciliationMode = reader.int32(); break; } default: @@ -6151,483 +6511,562 @@ }; /** - * Decodes a UserEvent message from the specified reader or buffer, length delimited. + * Decodes an ImportDocumentsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.UserEvent + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1beta.UserEvent} UserEvent + * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest} ImportDocumentsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserEvent.decodeDelimited = function decodeDelimited(reader) { + ImportDocumentsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a UserEvent message. + * Verifies an ImportDocumentsRequest message. * @function verify - * @memberof google.cloud.discoveryengine.v1beta.UserEvent + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UserEvent.verify = function verify(message) { + ImportDocumentsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eventType != null && message.hasOwnProperty("eventType")) - if (!$util.isString(message.eventType)) - return "eventType: string expected"; - if (message.userPseudoId != null && message.hasOwnProperty("userPseudoId")) - if (!$util.isString(message.userPseudoId)) - return "userPseudoId: string expected"; - if (message.eventTime != null && message.hasOwnProperty("eventTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.eventTime); - if (error) - return "eventTime." + error; - } - if (message.userInfo != null && message.hasOwnProperty("userInfo")) { - var error = $root.google.cloud.discoveryengine.v1beta.UserInfo.verify(message.userInfo); - if (error) - return "userInfo." + error; - } - if (message.directUserRequest != null && message.hasOwnProperty("directUserRequest")) - if (typeof message.directUserRequest !== "boolean") - return "directUserRequest: boolean expected"; - if (message.sessionId != null && message.hasOwnProperty("sessionId")) - if (!$util.isString(message.sessionId)) - return "sessionId: string expected"; - if (message.pageInfo != null && message.hasOwnProperty("pageInfo")) { - var error = $root.google.cloud.discoveryengine.v1beta.PageInfo.verify(message.pageInfo); - if (error) - return "pageInfo." + error; - } - if (message.attributionToken != null && message.hasOwnProperty("attributionToken")) - if (!$util.isString(message.attributionToken)) - return "attributionToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.documents != null && message.hasOwnProperty("documents")) { - if (!Array.isArray(message.documents)) - return "documents: array expected"; - for (var i = 0; i < message.documents.length; ++i) { - var error = $root.google.cloud.discoveryengine.v1beta.DocumentInfo.verify(message.documents[i]); + var properties = {}; + if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { + properties.source = 1; + { + var error = $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.verify(message.inlineSource); if (error) - return "documents." + error; + return "inlineSource." + error; } } - if (message.panel != null && message.hasOwnProperty("panel")) { - var error = $root.google.cloud.discoveryengine.v1beta.PanelInfo.verify(message.panel); - if (error) - return "panel." + error; - } - if (message.searchInfo != null && message.hasOwnProperty("searchInfo")) { - var error = $root.google.cloud.discoveryengine.v1beta.SearchInfo.verify(message.searchInfo); - if (error) - return "searchInfo." + error; - } - if (message.completionInfo != null && message.hasOwnProperty("completionInfo")) { - var error = $root.google.cloud.discoveryengine.v1beta.CompletionInfo.verify(message.completionInfo); - if (error) - return "completionInfo." + error; - } - if (message.transactionInfo != null && message.hasOwnProperty("transactionInfo")) { - var error = $root.google.cloud.discoveryengine.v1beta.TransactionInfo.verify(message.transactionInfo); - if (error) - return "transactionInfo." + error; - } - if (message.tagIds != null && message.hasOwnProperty("tagIds")) { - if (!Array.isArray(message.tagIds)) - return "tagIds: array expected"; - for (var i = 0; i < message.tagIds.length; ++i) - if (!$util.isString(message.tagIds[i])) - return "tagIds: string[] expected"; - } - if (message.promotionIds != null && message.hasOwnProperty("promotionIds")) { - if (!Array.isArray(message.promotionIds)) - return "promotionIds: array expected"; - for (var i = 0; i < message.promotionIds.length; ++i) - if (!$util.isString(message.promotionIds[i])) - return "promotionIds: string[] expected"; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.cloud.discoveryengine.v1beta.GcsSource.verify(message.gcsSource); + if (error) + return "gcsSource." + error; + } } - if (message.attributes != null && message.hasOwnProperty("attributes")) { - if (!$util.isObject(message.attributes)) - return "attributes: object expected"; - var key = Object.keys(message.attributes); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.discoveryengine.v1beta.CustomAttribute.verify(message.attributes[key[i]]); + if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.cloud.discoveryengine.v1beta.BigQuerySource.verify(message.bigquerySource); if (error) - return "attributes." + error; + return "bigquerySource." + error; } } - if (message.mediaInfo != null && message.hasOwnProperty("mediaInfo")) { - var error = $root.google.cloud.discoveryengine.v1beta.MediaInfo.verify(message.mediaInfo); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) { + var error = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.verify(message.errorConfig); if (error) - return "mediaInfo." + error; + return "errorConfig." + error; } + if (message.reconciliationMode != null && message.hasOwnProperty("reconciliationMode")) + switch (message.reconciliationMode) { + default: + return "reconciliationMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a UserEvent message from a plain object. Also converts values to their respective internal types. + * Creates an ImportDocumentsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1beta.UserEvent + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1beta.UserEvent} UserEvent + * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest} ImportDocumentsRequest */ - UserEvent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1beta.UserEvent) + ImportDocumentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest) return object; - var message = new $root.google.cloud.discoveryengine.v1beta.UserEvent(); - if (object.eventType != null) - message.eventType = String(object.eventType); - if (object.userPseudoId != null) - message.userPseudoId = String(object.userPseudoId); - if (object.eventTime != null) { - if (typeof object.eventTime !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.eventTime: object expected"); - message.eventTime = $root.google.protobuf.Timestamp.fromObject(object.eventTime); - } - if (object.userInfo != null) { - if (typeof object.userInfo !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.userInfo: object expected"); - message.userInfo = $root.google.cloud.discoveryengine.v1beta.UserInfo.fromObject(object.userInfo); - } - if (object.directUserRequest != null) - message.directUserRequest = Boolean(object.directUserRequest); - if (object.sessionId != null) - message.sessionId = String(object.sessionId); - if (object.pageInfo != null) { - if (typeof object.pageInfo !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.pageInfo: object expected"); - message.pageInfo = $root.google.cloud.discoveryengine.v1beta.PageInfo.fromObject(object.pageInfo); - } - if (object.attributionToken != null) - message.attributionToken = String(object.attributionToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.documents) { - if (!Array.isArray(object.documents)) - throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.documents: array expected"); - message.documents = []; - for (var i = 0; i < object.documents.length; ++i) { - if (typeof object.documents[i] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.documents: object expected"); - message.documents[i] = $root.google.cloud.discoveryengine.v1beta.DocumentInfo.fromObject(object.documents[i]); - } - } - if (object.panel != null) { - if (typeof object.panel !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.panel: object expected"); - message.panel = $root.google.cloud.discoveryengine.v1beta.PanelInfo.fromObject(object.panel); - } - if (object.searchInfo != null) { - if (typeof object.searchInfo !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.searchInfo: object expected"); - message.searchInfo = $root.google.cloud.discoveryengine.v1beta.SearchInfo.fromObject(object.searchInfo); - } - if (object.completionInfo != null) { - if (typeof object.completionInfo !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.completionInfo: object expected"); - message.completionInfo = $root.google.cloud.discoveryengine.v1beta.CompletionInfo.fromObject(object.completionInfo); + var message = new $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest(); + if (object.inlineSource != null) { + if (typeof object.inlineSource !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.inlineSource: object expected"); + message.inlineSource = $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.fromObject(object.inlineSource); } - if (object.transactionInfo != null) { - if (typeof object.transactionInfo !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.transactionInfo: object expected"); - message.transactionInfo = $root.google.cloud.discoveryengine.v1beta.TransactionInfo.fromObject(object.transactionInfo); + if (object.gcsSource != null) { + if (typeof object.gcsSource !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.gcsSource: object expected"); + message.gcsSource = $root.google.cloud.discoveryengine.v1beta.GcsSource.fromObject(object.gcsSource); } - if (object.tagIds) { - if (!Array.isArray(object.tagIds)) - throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.tagIds: array expected"); - message.tagIds = []; - for (var i = 0; i < object.tagIds.length; ++i) - message.tagIds[i] = String(object.tagIds[i]); + if (object.bigquerySource != null) { + if (typeof object.bigquerySource !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.bigquerySource: object expected"); + message.bigquerySource = $root.google.cloud.discoveryengine.v1beta.BigQuerySource.fromObject(object.bigquerySource); } - if (object.promotionIds) { - if (!Array.isArray(object.promotionIds)) - throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.promotionIds: array expected"); - message.promotionIds = []; - for (var i = 0; i < object.promotionIds.length; ++i) - message.promotionIds[i] = String(object.promotionIds[i]); + if (object.parent != null) + message.parent = String(object.parent); + if (object.errorConfig != null) { + if (typeof object.errorConfig !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.errorConfig: object expected"); + message.errorConfig = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.fromObject(object.errorConfig); } - if (object.attributes) { - if (typeof object.attributes !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.attributes: object expected"); - message.attributes = {}; - for (var keys = Object.keys(object.attributes), i = 0; i < keys.length; ++i) { - if (typeof object.attributes[keys[i]] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.attributes: object expected"); - message.attributes[keys[i]] = $root.google.cloud.discoveryengine.v1beta.CustomAttribute.fromObject(object.attributes[keys[i]]); + switch (object.reconciliationMode) { + default: + if (typeof object.reconciliationMode === "number") { + message.reconciliationMode = object.reconciliationMode; + break; } - } - if (object.mediaInfo != null) { - if (typeof object.mediaInfo !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.mediaInfo: object expected"); - message.mediaInfo = $root.google.cloud.discoveryengine.v1beta.MediaInfo.fromObject(object.mediaInfo); + break; + case "RECONCILIATION_MODE_UNSPECIFIED": + case 0: + message.reconciliationMode = 0; + break; + case "INCREMENTAL": + case 1: + message.reconciliationMode = 1; + break; + case "FULL": + case 2: + message.reconciliationMode = 2; + break; } return message; }; /** - * Creates a plain object from a UserEvent message. Also converts values to other types if specified. + * Creates a plain object from an ImportDocumentsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1beta.UserEvent + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest * @static - * @param {google.cloud.discoveryengine.v1beta.UserEvent} message UserEvent + * @param {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest} message ImportDocumentsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UserEvent.toObject = function toObject(message, options) { + ImportDocumentsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.documents = []; - object.tagIds = []; - object.promotionIds = []; - } - if (options.objects || options.defaults) - object.attributes = {}; if (options.defaults) { - object.eventType = ""; - object.userPseudoId = ""; - object.eventTime = null; - object.userInfo = null; - object.directUserRequest = false; - object.sessionId = ""; - object.pageInfo = null; - object.attributionToken = ""; - object.filter = ""; - object.panel = null; - object.searchInfo = null; - object.completionInfo = null; - object.transactionInfo = null; - object.mediaInfo = null; - } - if (message.eventType != null && message.hasOwnProperty("eventType")) - object.eventType = message.eventType; - if (message.userPseudoId != null && message.hasOwnProperty("userPseudoId")) - object.userPseudoId = message.userPseudoId; - if (message.eventTime != null && message.hasOwnProperty("eventTime")) - object.eventTime = $root.google.protobuf.Timestamp.toObject(message.eventTime, options); - if (message.userInfo != null && message.hasOwnProperty("userInfo")) - object.userInfo = $root.google.cloud.discoveryengine.v1beta.UserInfo.toObject(message.userInfo, options); - if (message.directUserRequest != null && message.hasOwnProperty("directUserRequest")) - object.directUserRequest = message.directUserRequest; - if (message.sessionId != null && message.hasOwnProperty("sessionId")) - object.sessionId = message.sessionId; - if (message.pageInfo != null && message.hasOwnProperty("pageInfo")) - object.pageInfo = $root.google.cloud.discoveryengine.v1beta.PageInfo.toObject(message.pageInfo, options); - if (message.attributionToken != null && message.hasOwnProperty("attributionToken")) - object.attributionToken = message.attributionToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.documents && message.documents.length) { - object.documents = []; - for (var j = 0; j < message.documents.length; ++j) - object.documents[j] = $root.google.cloud.discoveryengine.v1beta.DocumentInfo.toObject(message.documents[j], options); + object.parent = ""; + object.errorConfig = null; + object.reconciliationMode = options.enums === String ? "RECONCILIATION_MODE_UNSPECIFIED" : 0; } - if (message.panel != null && message.hasOwnProperty("panel")) - object.panel = $root.google.cloud.discoveryengine.v1beta.PanelInfo.toObject(message.panel, options); - if (message.searchInfo != null && message.hasOwnProperty("searchInfo")) - object.searchInfo = $root.google.cloud.discoveryengine.v1beta.SearchInfo.toObject(message.searchInfo, options); - if (message.completionInfo != null && message.hasOwnProperty("completionInfo")) - object.completionInfo = $root.google.cloud.discoveryengine.v1beta.CompletionInfo.toObject(message.completionInfo, options); - if (message.transactionInfo != null && message.hasOwnProperty("transactionInfo")) - object.transactionInfo = $root.google.cloud.discoveryengine.v1beta.TransactionInfo.toObject(message.transactionInfo, options); - if (message.tagIds && message.tagIds.length) { - object.tagIds = []; - for (var j = 0; j < message.tagIds.length; ++j) - object.tagIds[j] = message.tagIds[j]; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.inlineSource != null && message.hasOwnProperty("inlineSource")) { + object.inlineSource = $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.toObject(message.inlineSource, options); + if (options.oneofs) + object.source = "inlineSource"; } - if (message.promotionIds && message.promotionIds.length) { - object.promotionIds = []; - for (var j = 0; j < message.promotionIds.length; ++j) - object.promotionIds[j] = message.promotionIds[j]; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + object.gcsSource = $root.google.cloud.discoveryengine.v1beta.GcsSource.toObject(message.gcsSource, options); + if (options.oneofs) + object.source = "gcsSource"; } - var keys2; - if (message.attributes && (keys2 = Object.keys(message.attributes)).length) { - object.attributes = {}; - for (var j = 0; j < keys2.length; ++j) - object.attributes[keys2[j]] = $root.google.cloud.discoveryengine.v1beta.CustomAttribute.toObject(message.attributes[keys2[j]], options); + if (message.bigquerySource != null && message.hasOwnProperty("bigquerySource")) { + object.bigquerySource = $root.google.cloud.discoveryengine.v1beta.BigQuerySource.toObject(message.bigquerySource, options); + if (options.oneofs) + object.source = "bigquerySource"; } - if (message.mediaInfo != null && message.hasOwnProperty("mediaInfo")) - object.mediaInfo = $root.google.cloud.discoveryengine.v1beta.MediaInfo.toObject(message.mediaInfo, options); + if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) + object.errorConfig = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.toObject(message.errorConfig, options); + if (message.reconciliationMode != null && message.hasOwnProperty("reconciliationMode")) + object.reconciliationMode = options.enums === String ? $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode[message.reconciliationMode] === undefined ? message.reconciliationMode : $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode[message.reconciliationMode] : message.reconciliationMode; return object; }; /** - * Converts this UserEvent to JSON. + * Converts this ImportDocumentsRequest to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1beta.UserEvent + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest * @instance * @returns {Object.} JSON object */ - UserEvent.prototype.toJSON = function toJSON() { + ImportDocumentsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UserEvent + * Gets the default type url for ImportDocumentsRequest * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1beta.UserEvent + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UserEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportDocumentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.UserEvent"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ImportDocumentsRequest"; }; - return UserEvent; - })(); + ImportDocumentsRequest.InlineSource = (function() { - v1beta.PageInfo = (function() { + /** + * Properties of an InlineSource. + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest + * @interface IInlineSource + * @property {Array.|null} [documents] InlineSource documents + */ - /** - * Properties of a PageInfo. - * @memberof google.cloud.discoveryengine.v1beta - * @interface IPageInfo - * @property {string|null} [pageviewId] PageInfo pageviewId - * @property {string|null} [pageCategory] PageInfo pageCategory - * @property {string|null} [uri] PageInfo uri - * @property {string|null} [referrerUri] PageInfo referrerUri - */ + /** + * Constructs a new InlineSource. + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest + * @classdesc Represents an InlineSource. + * @implements IInlineSource + * @constructor + * @param {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource=} [properties] Properties to set + */ + function InlineSource(properties) { + this.documents = []; + 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]]; + } - /** - * Constructs a new PageInfo. - * @memberof google.cloud.discoveryengine.v1beta - * @classdesc Represents a PageInfo. - * @implements IPageInfo - * @constructor - * @param {google.cloud.discoveryengine.v1beta.IPageInfo=} [properties] Properties to set - */ - function PageInfo(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]]; - } + /** + * InlineSource documents. + * @member {Array.} documents + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource + * @instance + */ + InlineSource.prototype.documents = $util.emptyArray; - /** - * PageInfo pageviewId. - * @member {string} pageviewId - * @memberof google.cloud.discoveryengine.v1beta.PageInfo - * @instance - */ - PageInfo.prototype.pageviewId = ""; + /** + * Creates a new InlineSource instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource + * @static + * @param {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource} InlineSource instance + */ + InlineSource.create = function create(properties) { + return new InlineSource(properties); + }; - /** - * PageInfo pageCategory. - * @member {string} pageCategory - * @memberof google.cloud.discoveryengine.v1beta.PageInfo - * @instance - */ - PageInfo.prototype.pageCategory = ""; + /** + * Encodes the specified InlineSource message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource + * @static + * @param {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource} message InlineSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InlineSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.documents != null && message.documents.length) + for (var i = 0; i < message.documents.length; ++i) + $root.google.cloud.discoveryengine.v1beta.Document.encode(message.documents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * PageInfo uri. - * @member {string} uri - * @memberof google.cloud.discoveryengine.v1beta.PageInfo - * @instance - */ - PageInfo.prototype.uri = ""; + /** + * Encodes the specified InlineSource message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource + * @static + * @param {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.IInlineSource} message InlineSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InlineSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * PageInfo referrerUri. - * @member {string} referrerUri - * @memberof google.cloud.discoveryengine.v1beta.PageInfo - * @instance - */ - PageInfo.prototype.referrerUri = ""; + /** + * Decodes an InlineSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource} InlineSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InlineSource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.documents && message.documents.length)) + message.documents = []; + message.documents.push($root.google.cloud.discoveryengine.v1beta.Document.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a new PageInfo instance using the specified properties. - * @function create - * @memberof google.cloud.discoveryengine.v1beta.PageInfo - * @static - * @param {google.cloud.discoveryengine.v1beta.IPageInfo=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1beta.PageInfo} PageInfo instance - */ - PageInfo.create = function create(properties) { - return new PageInfo(properties); + /** + * Decodes an InlineSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource} InlineSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InlineSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InlineSource message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InlineSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.documents != null && message.hasOwnProperty("documents")) { + if (!Array.isArray(message.documents)) + return "documents: array expected"; + for (var i = 0; i < message.documents.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1beta.Document.verify(message.documents[i]); + if (error) + return "documents." + error; + } + } + return null; + }; + + /** + * Creates an InlineSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource} InlineSource + */ + InlineSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource(); + if (object.documents) { + if (!Array.isArray(object.documents)) + throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.documents: array expected"); + message.documents = []; + for (var i = 0; i < object.documents.length; ++i) { + if (typeof object.documents[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.documents: object expected"); + message.documents[i] = $root.google.cloud.discoveryengine.v1beta.Document.fromObject(object.documents[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an InlineSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource + * @static + * @param {google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource} message InlineSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InlineSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.documents = []; + if (message.documents && message.documents.length) { + object.documents = []; + for (var j = 0; j < message.documents.length; ++j) + object.documents[j] = $root.google.cloud.discoveryengine.v1beta.Document.toObject(message.documents[j], options); + } + return object; + }; + + /** + * Converts this InlineSource to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource + * @instance + * @returns {Object.} JSON object + */ + InlineSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InlineSource + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InlineSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource"; + }; + + return InlineSource; + })(); + + /** + * ReconciliationMode enum. + * @name google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode + * @enum {number} + * @property {number} RECONCILIATION_MODE_UNSPECIFIED=0 RECONCILIATION_MODE_UNSPECIFIED value + * @property {number} INCREMENTAL=1 INCREMENTAL value + * @property {number} FULL=2 FULL value + */ + ImportDocumentsRequest.ReconciliationMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RECONCILIATION_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INCREMENTAL"] = 1; + values[valuesById[2] = "FULL"] = 2; + return values; + })(); + + return ImportDocumentsRequest; + })(); + + v1beta.ImportDocumentsResponse = (function() { + + /** + * Properties of an ImportDocumentsResponse. + * @memberof google.cloud.discoveryengine.v1beta + * @interface IImportDocumentsResponse + * @property {Array.|null} [errorSamples] ImportDocumentsResponse errorSamples + * @property {google.cloud.discoveryengine.v1beta.IImportErrorConfig|null} [errorConfig] ImportDocumentsResponse errorConfig + */ + + /** + * Constructs a new ImportDocumentsResponse. + * @memberof google.cloud.discoveryengine.v1beta + * @classdesc Represents an ImportDocumentsResponse. + * @implements IImportDocumentsResponse + * @constructor + * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsResponse=} [properties] Properties to set + */ + function ImportDocumentsResponse(properties) { + this.errorSamples = []; + 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]]; + } + + /** + * ImportDocumentsResponse errorSamples. + * @member {Array.} errorSamples + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse + * @instance + */ + ImportDocumentsResponse.prototype.errorSamples = $util.emptyArray; + + /** + * ImportDocumentsResponse errorConfig. + * @member {google.cloud.discoveryengine.v1beta.IImportErrorConfig|null|undefined} errorConfig + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse + * @instance + */ + ImportDocumentsResponse.prototype.errorConfig = null; + + /** + * Creates a new ImportDocumentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse + * @static + * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsResponse=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsResponse} ImportDocumentsResponse instance + */ + ImportDocumentsResponse.create = function create(properties) { + return new ImportDocumentsResponse(properties); }; /** - * Encodes the specified PageInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PageInfo.verify|verify} messages. + * Encodes the specified ImportDocumentsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1beta.PageInfo + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse * @static - * @param {google.cloud.discoveryengine.v1beta.IPageInfo} message PageInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsResponse} message ImportDocumentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PageInfo.encode = function encode(message, writer) { + ImportDocumentsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.pageviewId != null && Object.hasOwnProperty.call(message, "pageviewId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.pageviewId); - if (message.pageCategory != null && Object.hasOwnProperty.call(message, "pageCategory")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageCategory); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.uri); - if (message.referrerUri != null && Object.hasOwnProperty.call(message, "referrerUri")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.referrerUri); + if (message.errorSamples != null && message.errorSamples.length) + for (var i = 0; i < message.errorSamples.length; ++i) + $root.google.rpc.Status.encode(message.errorSamples[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.errorConfig != null && Object.hasOwnProperty.call(message, "errorConfig")) + $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.encode(message.errorConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified PageInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PageInfo.verify|verify} messages. + * Encodes the specified ImportDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ImportDocumentsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.PageInfo + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse * @static - * @param {google.cloud.discoveryengine.v1beta.IPageInfo} message PageInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.IImportDocumentsResponse} message ImportDocumentsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PageInfo.encodeDelimited = function encodeDelimited(message, writer) { + ImportDocumentsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PageInfo message from the specified reader or buffer. + * Decodes an ImportDocumentsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1beta.PageInfo + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1beta.PageInfo} PageInfo + * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsResponse} ImportDocumentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PageInfo.decode = function decode(reader, length) { + ImportDocumentsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.PageInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.ImportDocumentsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.pageviewId = reader.string(); + if (!(message.errorSamples && message.errorSamples.length)) + message.errorSamples = []; + message.errorSamples.push($root.google.rpc.Status.decode(reader, reader.uint32())); break; } case 2: { - message.pageCategory = reader.string(); - break; - } - case 3: { - message.uri = reader.string(); - break; - } - case 4: { - message.referrerUri = reader.string(); + message.errorConfig = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.decode(reader, reader.uint32()); break; } default: @@ -6639,149 +7078,174 @@ }; /** - * Decodes a PageInfo message from the specified reader or buffer, length delimited. + * Decodes an ImportDocumentsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.PageInfo + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1beta.PageInfo} PageInfo + * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsResponse} ImportDocumentsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PageInfo.decodeDelimited = function decodeDelimited(reader) { + ImportDocumentsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PageInfo message. + * Verifies an ImportDocumentsResponse message. * @function verify - * @memberof google.cloud.discoveryengine.v1beta.PageInfo + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PageInfo.verify = function verify(message) { + ImportDocumentsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.pageviewId != null && message.hasOwnProperty("pageviewId")) - if (!$util.isString(message.pageviewId)) - return "pageviewId: string expected"; - if (message.pageCategory != null && message.hasOwnProperty("pageCategory")) - if (!$util.isString(message.pageCategory)) - return "pageCategory: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.referrerUri != null && message.hasOwnProperty("referrerUri")) - if (!$util.isString(message.referrerUri)) - return "referrerUri: string expected"; + if (message.errorSamples != null && message.hasOwnProperty("errorSamples")) { + if (!Array.isArray(message.errorSamples)) + return "errorSamples: array expected"; + for (var i = 0; i < message.errorSamples.length; ++i) { + var error = $root.google.rpc.Status.verify(message.errorSamples[i]); + if (error) + return "errorSamples." + error; + } + } + if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) { + var error = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.verify(message.errorConfig); + if (error) + return "errorConfig." + error; + } return null; }; /** - * Creates a PageInfo message from a plain object. Also converts values to their respective internal types. + * Creates an ImportDocumentsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1beta.PageInfo + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1beta.PageInfo} PageInfo + * @returns {google.cloud.discoveryengine.v1beta.ImportDocumentsResponse} ImportDocumentsResponse */ - PageInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1beta.PageInfo) + ImportDocumentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.ImportDocumentsResponse) return object; - var message = new $root.google.cloud.discoveryengine.v1beta.PageInfo(); - if (object.pageviewId != null) - message.pageviewId = String(object.pageviewId); - if (object.pageCategory != null) - message.pageCategory = String(object.pageCategory); - if (object.uri != null) - message.uri = String(object.uri); - if (object.referrerUri != null) - message.referrerUri = String(object.referrerUri); + var message = new $root.google.cloud.discoveryengine.v1beta.ImportDocumentsResponse(); + if (object.errorSamples) { + if (!Array.isArray(object.errorSamples)) + throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsResponse.errorSamples: array expected"); + message.errorSamples = []; + for (var i = 0; i < object.errorSamples.length; ++i) { + if (typeof object.errorSamples[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsResponse.errorSamples: object expected"); + message.errorSamples[i] = $root.google.rpc.Status.fromObject(object.errorSamples[i]); + } + } + if (object.errorConfig != null) { + if (typeof object.errorConfig !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsResponse.errorConfig: object expected"); + message.errorConfig = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.fromObject(object.errorConfig); + } return message; }; /** - * Creates a plain object from a PageInfo message. Also converts values to other types if specified. + * Creates a plain object from an ImportDocumentsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1beta.PageInfo + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse * @static - * @param {google.cloud.discoveryengine.v1beta.PageInfo} message PageInfo + * @param {google.cloud.discoveryengine.v1beta.ImportDocumentsResponse} message ImportDocumentsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PageInfo.toObject = function toObject(message, options) { + ImportDocumentsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.pageviewId = ""; - object.pageCategory = ""; - object.uri = ""; - object.referrerUri = ""; + if (options.arrays || options.defaults) + object.errorSamples = []; + if (options.defaults) + object.errorConfig = null; + if (message.errorSamples && message.errorSamples.length) { + object.errorSamples = []; + for (var j = 0; j < message.errorSamples.length; ++j) + object.errorSamples[j] = $root.google.rpc.Status.toObject(message.errorSamples[j], options); } - if (message.pageviewId != null && message.hasOwnProperty("pageviewId")) - object.pageviewId = message.pageviewId; - if (message.pageCategory != null && message.hasOwnProperty("pageCategory")) - object.pageCategory = message.pageCategory; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.referrerUri != null && message.hasOwnProperty("referrerUri")) - object.referrerUri = message.referrerUri; + if (message.errorConfig != null && message.hasOwnProperty("errorConfig")) + object.errorConfig = $root.google.cloud.discoveryengine.v1beta.ImportErrorConfig.toObject(message.errorConfig, options); return object; }; /** - * Converts this PageInfo to JSON. + * Converts this ImportDocumentsResponse to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1beta.PageInfo + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse * @instance * @returns {Object.} JSON object */ - PageInfo.prototype.toJSON = function toJSON() { + ImportDocumentsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PageInfo + * Gets the default type url for ImportDocumentsResponse * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1beta.PageInfo + * @memberof google.cloud.discoveryengine.v1beta.ImportDocumentsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PageInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportDocumentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.PageInfo"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ImportDocumentsResponse"; }; - return PageInfo; + return ImportDocumentsResponse; })(); - v1beta.SearchInfo = (function() { + v1beta.UserEvent = (function() { /** - * Properties of a SearchInfo. + * Properties of a UserEvent. * @memberof google.cloud.discoveryengine.v1beta - * @interface ISearchInfo - * @property {string|null} [searchQuery] SearchInfo searchQuery - * @property {string|null} [orderBy] SearchInfo orderBy - * @property {number|null} [offset] SearchInfo offset + * @interface IUserEvent + * @property {string|null} [eventType] UserEvent eventType + * @property {string|null} [userPseudoId] UserEvent userPseudoId + * @property {google.protobuf.ITimestamp|null} [eventTime] UserEvent eventTime + * @property {google.cloud.discoveryengine.v1beta.IUserInfo|null} [userInfo] UserEvent userInfo + * @property {boolean|null} [directUserRequest] UserEvent directUserRequest + * @property {string|null} [sessionId] UserEvent sessionId + * @property {google.cloud.discoveryengine.v1beta.IPageInfo|null} [pageInfo] UserEvent pageInfo + * @property {string|null} [attributionToken] UserEvent attributionToken + * @property {string|null} [filter] UserEvent filter + * @property {Array.|null} [documents] UserEvent documents + * @property {google.cloud.discoveryengine.v1beta.IPanelInfo|null} [panel] UserEvent panel + * @property {google.cloud.discoveryengine.v1beta.ISearchInfo|null} [searchInfo] UserEvent searchInfo + * @property {google.cloud.discoveryengine.v1beta.ICompletionInfo|null} [completionInfo] UserEvent completionInfo + * @property {google.cloud.discoveryengine.v1beta.ITransactionInfo|null} [transactionInfo] UserEvent transactionInfo + * @property {Array.|null} [tagIds] UserEvent tagIds + * @property {Array.|null} [promotionIds] UserEvent promotionIds + * @property {Object.|null} [attributes] UserEvent attributes + * @property {google.cloud.discoveryengine.v1beta.IMediaInfo|null} [mediaInfo] UserEvent mediaInfo */ /** - * Constructs a new SearchInfo. + * Constructs a new UserEvent. * @memberof google.cloud.discoveryengine.v1beta - * @classdesc Represents a SearchInfo. - * @implements ISearchInfo + * @classdesc Represents a UserEvent. + * @implements IUserEvent * @constructor - * @param {google.cloud.discoveryengine.v1beta.ISearchInfo=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1beta.IUserEvent=} [properties] Properties to set */ - function SearchInfo(properties) { + function UserEvent(properties) { + this.documents = []; + this.tagIds = []; + this.promotionIds = []; + this.attributes = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6789,357 +7253,344 @@ } /** - * SearchInfo searchQuery. - * @member {string} searchQuery - * @memberof google.cloud.discoveryengine.v1beta.SearchInfo + * UserEvent eventType. + * @member {string} eventType + * @memberof google.cloud.discoveryengine.v1beta.UserEvent * @instance */ - SearchInfo.prototype.searchQuery = ""; + UserEvent.prototype.eventType = ""; /** - * SearchInfo orderBy. - * @member {string} orderBy - * @memberof google.cloud.discoveryengine.v1beta.SearchInfo + * UserEvent userPseudoId. + * @member {string} userPseudoId + * @memberof google.cloud.discoveryengine.v1beta.UserEvent * @instance */ - SearchInfo.prototype.orderBy = ""; + UserEvent.prototype.userPseudoId = ""; /** - * SearchInfo offset. - * @member {number|null|undefined} offset - * @memberof google.cloud.discoveryengine.v1beta.SearchInfo + * UserEvent eventTime. + * @member {google.protobuf.ITimestamp|null|undefined} eventTime + * @memberof google.cloud.discoveryengine.v1beta.UserEvent * @instance */ - SearchInfo.prototype.offset = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + UserEvent.prototype.eventTime = null; /** - * SearchInfo _offset. - * @member {"offset"|undefined} _offset - * @memberof google.cloud.discoveryengine.v1beta.SearchInfo + * UserEvent userInfo. + * @member {google.cloud.discoveryengine.v1beta.IUserInfo|null|undefined} userInfo + * @memberof google.cloud.discoveryengine.v1beta.UserEvent * @instance */ - Object.defineProperty(SearchInfo.prototype, "_offset", { - get: $util.oneOfGetter($oneOfFields = ["offset"]), - set: $util.oneOfSetter($oneOfFields) - }); + UserEvent.prototype.userInfo = null; /** - * Creates a new SearchInfo instance using the specified properties. - * @function create - * @memberof google.cloud.discoveryengine.v1beta.SearchInfo - * @static - * @param {google.cloud.discoveryengine.v1beta.ISearchInfo=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1beta.SearchInfo} SearchInfo instance + * UserEvent directUserRequest. + * @member {boolean} directUserRequest + * @memberof google.cloud.discoveryengine.v1beta.UserEvent + * @instance */ - SearchInfo.create = function create(properties) { - return new SearchInfo(properties); - }; + UserEvent.prototype.directUserRequest = false; /** - * Encodes the specified SearchInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.discoveryengine.v1beta.SearchInfo - * @static - * @param {google.cloud.discoveryengine.v1beta.ISearchInfo} message SearchInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * UserEvent sessionId. + * @member {string} sessionId + * @memberof google.cloud.discoveryengine.v1beta.UserEvent + * @instance */ - SearchInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.searchQuery != null && Object.hasOwnProperty.call(message, "searchQuery")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.searchQuery); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.orderBy); - if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.offset); - return writer; - }; + UserEvent.prototype.sessionId = ""; /** - * Encodes the specified SearchInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.SearchInfo - * @static - * @param {google.cloud.discoveryengine.v1beta.ISearchInfo} message SearchInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * UserEvent pageInfo. + * @member {google.cloud.discoveryengine.v1beta.IPageInfo|null|undefined} pageInfo + * @memberof google.cloud.discoveryengine.v1beta.UserEvent + * @instance */ - SearchInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + UserEvent.prototype.pageInfo = null; /** - * Decodes a SearchInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.discoveryengine.v1beta.SearchInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1beta.SearchInfo} SearchInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * UserEvent attributionToken. + * @member {string} attributionToken + * @memberof google.cloud.discoveryengine.v1beta.UserEvent + * @instance */ - SearchInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.SearchInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.searchQuery = reader.string(); - break; - } - case 2: { - message.orderBy = reader.string(); - break; - } - case 3: { - message.offset = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + UserEvent.prototype.attributionToken = ""; /** - * Decodes a SearchInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.SearchInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1beta.SearchInfo} SearchInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * UserEvent filter. + * @member {string} filter + * @memberof google.cloud.discoveryengine.v1beta.UserEvent + * @instance */ - SearchInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + UserEvent.prototype.filter = ""; /** - * Verifies a SearchInfo message. - * @function verify - * @memberof google.cloud.discoveryengine.v1beta.SearchInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * UserEvent documents. + * @member {Array.} documents + * @memberof google.cloud.discoveryengine.v1beta.UserEvent + * @instance */ - SearchInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.searchQuery != null && message.hasOwnProperty("searchQuery")) - if (!$util.isString(message.searchQuery)) - return "searchQuery: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - if (message.offset != null && message.hasOwnProperty("offset")) { - properties._offset = 1; - if (!$util.isInteger(message.offset)) - return "offset: integer expected"; - } - return null; - }; + UserEvent.prototype.documents = $util.emptyArray; /** - * Creates a SearchInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.discoveryengine.v1beta.SearchInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1beta.SearchInfo} SearchInfo + * UserEvent panel. + * @member {google.cloud.discoveryengine.v1beta.IPanelInfo|null|undefined} panel + * @memberof google.cloud.discoveryengine.v1beta.UserEvent + * @instance */ - SearchInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1beta.SearchInfo) - return object; - var message = new $root.google.cloud.discoveryengine.v1beta.SearchInfo(); - if (object.searchQuery != null) - message.searchQuery = String(object.searchQuery); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); - if (object.offset != null) - message.offset = object.offset | 0; - return message; - }; + UserEvent.prototype.panel = null; /** - * Creates a plain object from a SearchInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.discoveryengine.v1beta.SearchInfo - * @static - * @param {google.cloud.discoveryengine.v1beta.SearchInfo} message SearchInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * UserEvent searchInfo. + * @member {google.cloud.discoveryengine.v1beta.ISearchInfo|null|undefined} searchInfo + * @memberof google.cloud.discoveryengine.v1beta.UserEvent + * @instance */ - SearchInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.searchQuery = ""; - object.orderBy = ""; - } - if (message.searchQuery != null && message.hasOwnProperty("searchQuery")) - object.searchQuery = message.searchQuery; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; - if (message.offset != null && message.hasOwnProperty("offset")) { - object.offset = message.offset; - if (options.oneofs) - object._offset = "offset"; - } - return object; - }; + UserEvent.prototype.searchInfo = null; /** - * Converts this SearchInfo to JSON. - * @function toJSON - * @memberof google.cloud.discoveryengine.v1beta.SearchInfo + * UserEvent completionInfo. + * @member {google.cloud.discoveryengine.v1beta.ICompletionInfo|null|undefined} completionInfo + * @memberof google.cloud.discoveryengine.v1beta.UserEvent * @instance - * @returns {Object.} JSON object */ - SearchInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + UserEvent.prototype.completionInfo = null; /** - * Gets the default type url for SearchInfo - * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1beta.SearchInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * UserEvent transactionInfo. + * @member {google.cloud.discoveryengine.v1beta.ITransactionInfo|null|undefined} transactionInfo + * @memberof google.cloud.discoveryengine.v1beta.UserEvent + * @instance */ - SearchInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.SearchInfo"; - }; - - return SearchInfo; - })(); - - v1beta.CompletionInfo = (function() { + UserEvent.prototype.transactionInfo = null; /** - * Properties of a CompletionInfo. - * @memberof google.cloud.discoveryengine.v1beta - * @interface ICompletionInfo - * @property {string|null} [selectedSuggestion] CompletionInfo selectedSuggestion - * @property {number|null} [selectedPosition] CompletionInfo selectedPosition + * UserEvent tagIds. + * @member {Array.} tagIds + * @memberof google.cloud.discoveryengine.v1beta.UserEvent + * @instance */ + UserEvent.prototype.tagIds = $util.emptyArray; /** - * Constructs a new CompletionInfo. - * @memberof google.cloud.discoveryengine.v1beta - * @classdesc Represents a CompletionInfo. - * @implements ICompletionInfo - * @constructor - * @param {google.cloud.discoveryengine.v1beta.ICompletionInfo=} [properties] Properties to set + * UserEvent promotionIds. + * @member {Array.} promotionIds + * @memberof google.cloud.discoveryengine.v1beta.UserEvent + * @instance */ - function CompletionInfo(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]]; - } + UserEvent.prototype.promotionIds = $util.emptyArray; /** - * CompletionInfo selectedSuggestion. - * @member {string} selectedSuggestion - * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo + * UserEvent attributes. + * @member {Object.} attributes + * @memberof google.cloud.discoveryengine.v1beta.UserEvent * @instance */ - CompletionInfo.prototype.selectedSuggestion = ""; + UserEvent.prototype.attributes = $util.emptyObject; /** - * CompletionInfo selectedPosition. - * @member {number} selectedPosition - * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo + * UserEvent mediaInfo. + * @member {google.cloud.discoveryengine.v1beta.IMediaInfo|null|undefined} mediaInfo + * @memberof google.cloud.discoveryengine.v1beta.UserEvent * @instance */ - CompletionInfo.prototype.selectedPosition = 0; + UserEvent.prototype.mediaInfo = null; /** - * Creates a new CompletionInfo instance using the specified properties. + * Creates a new UserEvent instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo + * @memberof google.cloud.discoveryengine.v1beta.UserEvent * @static - * @param {google.cloud.discoveryengine.v1beta.ICompletionInfo=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1beta.CompletionInfo} CompletionInfo instance + * @param {google.cloud.discoveryengine.v1beta.IUserEvent=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.UserEvent} UserEvent instance */ - CompletionInfo.create = function create(properties) { - return new CompletionInfo(properties); + UserEvent.create = function create(properties) { + return new UserEvent(properties); }; /** - * Encodes the specified CompletionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CompletionInfo.verify|verify} messages. + * Encodes the specified UserEvent message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UserEvent.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo + * @memberof google.cloud.discoveryengine.v1beta.UserEvent * @static - * @param {google.cloud.discoveryengine.v1beta.ICompletionInfo} message CompletionInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.IUserEvent} message UserEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CompletionInfo.encode = function encode(message, writer) { + UserEvent.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.selectedSuggestion != null && Object.hasOwnProperty.call(message, "selectedSuggestion")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selectedSuggestion); - if (message.selectedPosition != null && Object.hasOwnProperty.call(message, "selectedPosition")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.selectedPosition); - return writer; - }; - - /** - * Encodes the specified CompletionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CompletionInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo - * @static - * @param {google.cloud.discoveryengine.v1beta.ICompletionInfo} message CompletionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompletionInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CompletionInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1beta.CompletionInfo} CompletionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompletionInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.CompletionInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); + if (message.eventType != null && Object.hasOwnProperty.call(message, "eventType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventType); + if (message.userPseudoId != null && Object.hasOwnProperty.call(message, "userPseudoId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.userPseudoId); + if (message.eventTime != null && Object.hasOwnProperty.call(message, "eventTime")) + $root.google.protobuf.Timestamp.encode(message.eventTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.userInfo != null && Object.hasOwnProperty.call(message, "userInfo")) + $root.google.cloud.discoveryengine.v1beta.UserInfo.encode(message.userInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.directUserRequest != null && Object.hasOwnProperty.call(message, "directUserRequest")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.directUserRequest); + if (message.sessionId != null && Object.hasOwnProperty.call(message, "sessionId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.sessionId); + if (message.pageInfo != null && Object.hasOwnProperty.call(message, "pageInfo")) + $root.google.cloud.discoveryengine.v1beta.PageInfo.encode(message.pageInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.attributionToken != null && Object.hasOwnProperty.call(message, "attributionToken")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.attributionToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.filter); + if (message.documents != null && message.documents.length) + for (var i = 0; i < message.documents.length; ++i) + $root.google.cloud.discoveryengine.v1beta.DocumentInfo.encode(message.documents[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.panel != null && Object.hasOwnProperty.call(message, "panel")) + $root.google.cloud.discoveryengine.v1beta.PanelInfo.encode(message.panel, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.searchInfo != null && Object.hasOwnProperty.call(message, "searchInfo")) + $root.google.cloud.discoveryengine.v1beta.SearchInfo.encode(message.searchInfo, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.completionInfo != null && Object.hasOwnProperty.call(message, "completionInfo")) + $root.google.cloud.discoveryengine.v1beta.CompletionInfo.encode(message.completionInfo, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.transactionInfo != null && Object.hasOwnProperty.call(message, "transactionInfo")) + $root.google.cloud.discoveryengine.v1beta.TransactionInfo.encode(message.transactionInfo, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.tagIds != null && message.tagIds.length) + for (var i = 0; i < message.tagIds.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.tagIds[i]); + if (message.promotionIds != null && message.promotionIds.length) + for (var i = 0; i < message.promotionIds.length; ++i) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.promotionIds[i]); + if (message.attributes != null && Object.hasOwnProperty.call(message, "attributes")) + for (var keys = Object.keys(message.attributes), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 17, wireType 2 =*/138).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.discoveryengine.v1beta.CustomAttribute.encode(message.attributes[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.mediaInfo != null && Object.hasOwnProperty.call(message, "mediaInfo")) + $root.google.cloud.discoveryengine.v1beta.MediaInfo.encode(message.mediaInfo, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UserEvent message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UserEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.UserEvent + * @static + * @param {google.cloud.discoveryengine.v1beta.IUserEvent} message UserEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.UserEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.UserEvent} UserEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.UserEvent(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.selectedSuggestion = reader.string(); + message.eventType = reader.string(); break; } case 2: { - message.selectedPosition = reader.int32(); + message.userPseudoId = reader.string(); + break; + } + case 3: { + message.eventTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.userInfo = $root.google.cloud.discoveryengine.v1beta.UserInfo.decode(reader, reader.uint32()); + break; + } + case 5: { + message.directUserRequest = reader.bool(); + break; + } + case 6: { + message.sessionId = reader.string(); + break; + } + case 7: { + message.pageInfo = $root.google.cloud.discoveryengine.v1beta.PageInfo.decode(reader, reader.uint32()); + break; + } + case 8: { + message.attributionToken = reader.string(); + break; + } + case 9: { + message.filter = reader.string(); + break; + } + case 10: { + if (!(message.documents && message.documents.length)) + message.documents = []; + message.documents.push($root.google.cloud.discoveryengine.v1beta.DocumentInfo.decode(reader, reader.uint32())); + break; + } + case 11: { + message.panel = $root.google.cloud.discoveryengine.v1beta.PanelInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.searchInfo = $root.google.cloud.discoveryengine.v1beta.SearchInfo.decode(reader, reader.uint32()); + break; + } + case 13: { + message.completionInfo = $root.google.cloud.discoveryengine.v1beta.CompletionInfo.decode(reader, reader.uint32()); + break; + } + case 14: { + message.transactionInfo = $root.google.cloud.discoveryengine.v1beta.TransactionInfo.decode(reader, reader.uint32()); + break; + } + case 15: { + if (!(message.tagIds && message.tagIds.length)) + message.tagIds = []; + message.tagIds.push(reader.string()); + break; + } + case 16: { + if (!(message.promotionIds && message.promotionIds.length)) + message.promotionIds = []; + message.promotionIds.push(reader.string()); + break; + } + case 17: { + if (message.attributes === $util.emptyObject) + message.attributes = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.discoveryengine.v1beta.CustomAttribute.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.attributes[key] = value; + break; + } + case 18: { + message.mediaInfo = $root.google.cloud.discoveryengine.v1beta.MediaInfo.decode(reader, reader.uint32()); break; } default: @@ -7151,329 +7602,483 @@ }; /** - * Decodes a CompletionInfo message from the specified reader or buffer, length delimited. + * Decodes a UserEvent message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo + * @memberof google.cloud.discoveryengine.v1beta.UserEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1beta.CompletionInfo} CompletionInfo + * @returns {google.cloud.discoveryengine.v1beta.UserEvent} UserEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CompletionInfo.decodeDelimited = function decodeDelimited(reader) { + UserEvent.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CompletionInfo message. + * Verifies a UserEvent message. * @function verify - * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo + * @memberof google.cloud.discoveryengine.v1beta.UserEvent * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CompletionInfo.verify = function verify(message) { + UserEvent.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.selectedSuggestion != null && message.hasOwnProperty("selectedSuggestion")) - if (!$util.isString(message.selectedSuggestion)) - return "selectedSuggestion: string expected"; - if (message.selectedPosition != null && message.hasOwnProperty("selectedPosition")) - if (!$util.isInteger(message.selectedPosition)) - return "selectedPosition: integer expected"; - return null; - }; - - /** - * Creates a CompletionInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1beta.CompletionInfo} CompletionInfo - */ - CompletionInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1beta.CompletionInfo) - return object; - var message = new $root.google.cloud.discoveryengine.v1beta.CompletionInfo(); - if (object.selectedSuggestion != null) - message.selectedSuggestion = String(object.selectedSuggestion); - if (object.selectedPosition != null) - message.selectedPosition = object.selectedPosition | 0; - return message; - }; - - /** - * Creates a plain object from a CompletionInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo - * @static - * @param {google.cloud.discoveryengine.v1beta.CompletionInfo} message CompletionInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CompletionInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.selectedSuggestion = ""; - object.selectedPosition = 0; + if (message.eventType != null && message.hasOwnProperty("eventType")) + if (!$util.isString(message.eventType)) + return "eventType: string expected"; + if (message.userPseudoId != null && message.hasOwnProperty("userPseudoId")) + if (!$util.isString(message.userPseudoId)) + return "userPseudoId: string expected"; + if (message.eventTime != null && message.hasOwnProperty("eventTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.eventTime); + if (error) + return "eventTime." + error; } - if (message.selectedSuggestion != null && message.hasOwnProperty("selectedSuggestion")) - object.selectedSuggestion = message.selectedSuggestion; - if (message.selectedPosition != null && message.hasOwnProperty("selectedPosition")) - object.selectedPosition = message.selectedPosition; - return object; - }; - - /** - * Converts this CompletionInfo to JSON. - * @function toJSON - * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo - * @instance - * @returns {Object.} JSON object - */ - CompletionInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CompletionInfo - * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CompletionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + if (message.userInfo != null && message.hasOwnProperty("userInfo")) { + var error = $root.google.cloud.discoveryengine.v1beta.UserInfo.verify(message.userInfo); + if (error) + return "userInfo." + error; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.CompletionInfo"; + if (message.directUserRequest != null && message.hasOwnProperty("directUserRequest")) + if (typeof message.directUserRequest !== "boolean") + return "directUserRequest: boolean expected"; + if (message.sessionId != null && message.hasOwnProperty("sessionId")) + if (!$util.isString(message.sessionId)) + return "sessionId: string expected"; + if (message.pageInfo != null && message.hasOwnProperty("pageInfo")) { + var error = $root.google.cloud.discoveryengine.v1beta.PageInfo.verify(message.pageInfo); + if (error) + return "pageInfo." + error; + } + if (message.attributionToken != null && message.hasOwnProperty("attributionToken")) + if (!$util.isString(message.attributionToken)) + return "attributionToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.documents != null && message.hasOwnProperty("documents")) { + if (!Array.isArray(message.documents)) + return "documents: array expected"; + for (var i = 0; i < message.documents.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1beta.DocumentInfo.verify(message.documents[i]); + if (error) + return "documents." + error; + } + } + if (message.panel != null && message.hasOwnProperty("panel")) { + var error = $root.google.cloud.discoveryengine.v1beta.PanelInfo.verify(message.panel); + if (error) + return "panel." + error; + } + if (message.searchInfo != null && message.hasOwnProperty("searchInfo")) { + var error = $root.google.cloud.discoveryengine.v1beta.SearchInfo.verify(message.searchInfo); + if (error) + return "searchInfo." + error; + } + if (message.completionInfo != null && message.hasOwnProperty("completionInfo")) { + var error = $root.google.cloud.discoveryengine.v1beta.CompletionInfo.verify(message.completionInfo); + if (error) + return "completionInfo." + error; + } + if (message.transactionInfo != null && message.hasOwnProperty("transactionInfo")) { + var error = $root.google.cloud.discoveryengine.v1beta.TransactionInfo.verify(message.transactionInfo); + if (error) + return "transactionInfo." + error; + } + if (message.tagIds != null && message.hasOwnProperty("tagIds")) { + if (!Array.isArray(message.tagIds)) + return "tagIds: array expected"; + for (var i = 0; i < message.tagIds.length; ++i) + if (!$util.isString(message.tagIds[i])) + return "tagIds: string[] expected"; + } + if (message.promotionIds != null && message.hasOwnProperty("promotionIds")) { + if (!Array.isArray(message.promotionIds)) + return "promotionIds: array expected"; + for (var i = 0; i < message.promotionIds.length; ++i) + if (!$util.isString(message.promotionIds[i])) + return "promotionIds: string[] expected"; + } + if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (!$util.isObject(message.attributes)) + return "attributes: object expected"; + var key = Object.keys(message.attributes); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1beta.CustomAttribute.verify(message.attributes[key[i]]); + if (error) + return "attributes." + error; + } + } + if (message.mediaInfo != null && message.hasOwnProperty("mediaInfo")) { + var error = $root.google.cloud.discoveryengine.v1beta.MediaInfo.verify(message.mediaInfo); + if (error) + return "mediaInfo." + error; + } + return null; }; - return CompletionInfo; - })(); - - v1beta.TransactionInfo = (function() { - - /** - * Properties of a TransactionInfo. - * @memberof google.cloud.discoveryengine.v1beta - * @interface ITransactionInfo - * @property {number|null} [value] TransactionInfo value - * @property {string|null} [currency] TransactionInfo currency - * @property {string|null} [transactionId] TransactionInfo transactionId - * @property {number|null} [tax] TransactionInfo tax - * @property {number|null} [cost] TransactionInfo cost - * @property {number|null} [discountValue] TransactionInfo discountValue - */ - - /** - * Constructs a new TransactionInfo. - * @memberof google.cloud.discoveryengine.v1beta - * @classdesc Represents a TransactionInfo. - * @implements ITransactionInfo - * @constructor - * @param {google.cloud.discoveryengine.v1beta.ITransactionInfo=} [properties] Properties to set - */ - function TransactionInfo(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]]; - } - - /** - * TransactionInfo value. - * @member {number|null|undefined} value - * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo - * @instance - */ - TransactionInfo.prototype.value = null; - - /** - * TransactionInfo currency. - * @member {string} currency - * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo - * @instance - */ - TransactionInfo.prototype.currency = ""; - /** - * TransactionInfo transactionId. - * @member {string} transactionId - * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo - * @instance + * Creates a UserEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.UserEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.UserEvent} UserEvent */ - TransactionInfo.prototype.transactionId = ""; + UserEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.UserEvent) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.UserEvent(); + if (object.eventType != null) + message.eventType = String(object.eventType); + if (object.userPseudoId != null) + message.userPseudoId = String(object.userPseudoId); + if (object.eventTime != null) { + if (typeof object.eventTime !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.eventTime: object expected"); + message.eventTime = $root.google.protobuf.Timestamp.fromObject(object.eventTime); + } + if (object.userInfo != null) { + if (typeof object.userInfo !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.userInfo: object expected"); + message.userInfo = $root.google.cloud.discoveryengine.v1beta.UserInfo.fromObject(object.userInfo); + } + if (object.directUserRequest != null) + message.directUserRequest = Boolean(object.directUserRequest); + if (object.sessionId != null) + message.sessionId = String(object.sessionId); + if (object.pageInfo != null) { + if (typeof object.pageInfo !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.pageInfo: object expected"); + message.pageInfo = $root.google.cloud.discoveryengine.v1beta.PageInfo.fromObject(object.pageInfo); + } + if (object.attributionToken != null) + message.attributionToken = String(object.attributionToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.documents) { + if (!Array.isArray(object.documents)) + throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.documents: array expected"); + message.documents = []; + for (var i = 0; i < object.documents.length; ++i) { + if (typeof object.documents[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.documents: object expected"); + message.documents[i] = $root.google.cloud.discoveryengine.v1beta.DocumentInfo.fromObject(object.documents[i]); + } + } + if (object.panel != null) { + if (typeof object.panel !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.panel: object expected"); + message.panel = $root.google.cloud.discoveryengine.v1beta.PanelInfo.fromObject(object.panel); + } + if (object.searchInfo != null) { + if (typeof object.searchInfo !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.searchInfo: object expected"); + message.searchInfo = $root.google.cloud.discoveryengine.v1beta.SearchInfo.fromObject(object.searchInfo); + } + if (object.completionInfo != null) { + if (typeof object.completionInfo !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.completionInfo: object expected"); + message.completionInfo = $root.google.cloud.discoveryengine.v1beta.CompletionInfo.fromObject(object.completionInfo); + } + if (object.transactionInfo != null) { + if (typeof object.transactionInfo !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.transactionInfo: object expected"); + message.transactionInfo = $root.google.cloud.discoveryengine.v1beta.TransactionInfo.fromObject(object.transactionInfo); + } + if (object.tagIds) { + if (!Array.isArray(object.tagIds)) + throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.tagIds: array expected"); + message.tagIds = []; + for (var i = 0; i < object.tagIds.length; ++i) + message.tagIds[i] = String(object.tagIds[i]); + } + if (object.promotionIds) { + if (!Array.isArray(object.promotionIds)) + throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.promotionIds: array expected"); + message.promotionIds = []; + for (var i = 0; i < object.promotionIds.length; ++i) + message.promotionIds[i] = String(object.promotionIds[i]); + } + if (object.attributes) { + if (typeof object.attributes !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.attributes: object expected"); + message.attributes = {}; + for (var keys = Object.keys(object.attributes), i = 0; i < keys.length; ++i) { + if (typeof object.attributes[keys[i]] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.attributes: object expected"); + message.attributes[keys[i]] = $root.google.cloud.discoveryengine.v1beta.CustomAttribute.fromObject(object.attributes[keys[i]]); + } + } + if (object.mediaInfo != null) { + if (typeof object.mediaInfo !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.mediaInfo: object expected"); + message.mediaInfo = $root.google.cloud.discoveryengine.v1beta.MediaInfo.fromObject(object.mediaInfo); + } + return message; + }; /** - * TransactionInfo tax. - * @member {number|null|undefined} tax - * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo - * @instance + * Creates a plain object from a UserEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.UserEvent + * @static + * @param {google.cloud.discoveryengine.v1beta.UserEvent} message UserEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - TransactionInfo.prototype.tax = null; - - /** - * TransactionInfo cost. - * @member {number|null|undefined} cost - * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo + UserEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.documents = []; + object.tagIds = []; + object.promotionIds = []; + } + if (options.objects || options.defaults) + object.attributes = {}; + if (options.defaults) { + object.eventType = ""; + object.userPseudoId = ""; + object.eventTime = null; + object.userInfo = null; + object.directUserRequest = false; + object.sessionId = ""; + object.pageInfo = null; + object.attributionToken = ""; + object.filter = ""; + object.panel = null; + object.searchInfo = null; + object.completionInfo = null; + object.transactionInfo = null; + object.mediaInfo = null; + } + if (message.eventType != null && message.hasOwnProperty("eventType")) + object.eventType = message.eventType; + if (message.userPseudoId != null && message.hasOwnProperty("userPseudoId")) + object.userPseudoId = message.userPseudoId; + if (message.eventTime != null && message.hasOwnProperty("eventTime")) + object.eventTime = $root.google.protobuf.Timestamp.toObject(message.eventTime, options); + if (message.userInfo != null && message.hasOwnProperty("userInfo")) + object.userInfo = $root.google.cloud.discoveryengine.v1beta.UserInfo.toObject(message.userInfo, options); + if (message.directUserRequest != null && message.hasOwnProperty("directUserRequest")) + object.directUserRequest = message.directUserRequest; + if (message.sessionId != null && message.hasOwnProperty("sessionId")) + object.sessionId = message.sessionId; + if (message.pageInfo != null && message.hasOwnProperty("pageInfo")) + object.pageInfo = $root.google.cloud.discoveryengine.v1beta.PageInfo.toObject(message.pageInfo, options); + if (message.attributionToken != null && message.hasOwnProperty("attributionToken")) + object.attributionToken = message.attributionToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.documents && message.documents.length) { + object.documents = []; + for (var j = 0; j < message.documents.length; ++j) + object.documents[j] = $root.google.cloud.discoveryengine.v1beta.DocumentInfo.toObject(message.documents[j], options); + } + if (message.panel != null && message.hasOwnProperty("panel")) + object.panel = $root.google.cloud.discoveryengine.v1beta.PanelInfo.toObject(message.panel, options); + if (message.searchInfo != null && message.hasOwnProperty("searchInfo")) + object.searchInfo = $root.google.cloud.discoveryengine.v1beta.SearchInfo.toObject(message.searchInfo, options); + if (message.completionInfo != null && message.hasOwnProperty("completionInfo")) + object.completionInfo = $root.google.cloud.discoveryengine.v1beta.CompletionInfo.toObject(message.completionInfo, options); + if (message.transactionInfo != null && message.hasOwnProperty("transactionInfo")) + object.transactionInfo = $root.google.cloud.discoveryengine.v1beta.TransactionInfo.toObject(message.transactionInfo, options); + if (message.tagIds && message.tagIds.length) { + object.tagIds = []; + for (var j = 0; j < message.tagIds.length; ++j) + object.tagIds[j] = message.tagIds[j]; + } + if (message.promotionIds && message.promotionIds.length) { + object.promotionIds = []; + for (var j = 0; j < message.promotionIds.length; ++j) + object.promotionIds[j] = message.promotionIds[j]; + } + var keys2; + if (message.attributes && (keys2 = Object.keys(message.attributes)).length) { + object.attributes = {}; + for (var j = 0; j < keys2.length; ++j) + object.attributes[keys2[j]] = $root.google.cloud.discoveryengine.v1beta.CustomAttribute.toObject(message.attributes[keys2[j]], options); + } + if (message.mediaInfo != null && message.hasOwnProperty("mediaInfo")) + object.mediaInfo = $root.google.cloud.discoveryengine.v1beta.MediaInfo.toObject(message.mediaInfo, options); + return object; + }; + + /** + * Converts this UserEvent to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.UserEvent * @instance + * @returns {Object.} JSON object */ - TransactionInfo.prototype.cost = null; + UserEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * TransactionInfo discountValue. - * @member {number|null|undefined} discountValue - * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo - * @instance + * Gets the default type url for UserEvent + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.UserEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - TransactionInfo.prototype.discountValue = null; + UserEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.UserEvent"; + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + return UserEvent; + })(); + + v1beta.PageInfo = (function() { /** - * TransactionInfo _value. - * @member {"value"|undefined} _value - * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo + * Properties of a PageInfo. + * @memberof google.cloud.discoveryengine.v1beta + * @interface IPageInfo + * @property {string|null} [pageviewId] PageInfo pageviewId + * @property {string|null} [pageCategory] PageInfo pageCategory + * @property {string|null} [uri] PageInfo uri + * @property {string|null} [referrerUri] PageInfo referrerUri + */ + + /** + * Constructs a new PageInfo. + * @memberof google.cloud.discoveryengine.v1beta + * @classdesc Represents a PageInfo. + * @implements IPageInfo + * @constructor + * @param {google.cloud.discoveryengine.v1beta.IPageInfo=} [properties] Properties to set + */ + function PageInfo(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]]; + } + + /** + * PageInfo pageviewId. + * @member {string} pageviewId + * @memberof google.cloud.discoveryengine.v1beta.PageInfo * @instance */ - Object.defineProperty(TransactionInfo.prototype, "_value", { - get: $util.oneOfGetter($oneOfFields = ["value"]), - set: $util.oneOfSetter($oneOfFields) - }); + PageInfo.prototype.pageviewId = ""; /** - * TransactionInfo _tax. - * @member {"tax"|undefined} _tax - * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo + * PageInfo pageCategory. + * @member {string} pageCategory + * @memberof google.cloud.discoveryengine.v1beta.PageInfo * @instance */ - Object.defineProperty(TransactionInfo.prototype, "_tax", { - get: $util.oneOfGetter($oneOfFields = ["tax"]), - set: $util.oneOfSetter($oneOfFields) - }); + PageInfo.prototype.pageCategory = ""; /** - * TransactionInfo _cost. - * @member {"cost"|undefined} _cost - * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo + * PageInfo uri. + * @member {string} uri + * @memberof google.cloud.discoveryengine.v1beta.PageInfo * @instance */ - Object.defineProperty(TransactionInfo.prototype, "_cost", { - get: $util.oneOfGetter($oneOfFields = ["cost"]), - set: $util.oneOfSetter($oneOfFields) - }); + PageInfo.prototype.uri = ""; /** - * TransactionInfo _discountValue. - * @member {"discountValue"|undefined} _discountValue - * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo + * PageInfo referrerUri. + * @member {string} referrerUri + * @memberof google.cloud.discoveryengine.v1beta.PageInfo * @instance */ - Object.defineProperty(TransactionInfo.prototype, "_discountValue", { - get: $util.oneOfGetter($oneOfFields = ["discountValue"]), - set: $util.oneOfSetter($oneOfFields) - }); + PageInfo.prototype.referrerUri = ""; /** - * Creates a new TransactionInfo instance using the specified properties. + * Creates a new PageInfo instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo + * @memberof google.cloud.discoveryengine.v1beta.PageInfo * @static - * @param {google.cloud.discoveryengine.v1beta.ITransactionInfo=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1beta.TransactionInfo} TransactionInfo instance + * @param {google.cloud.discoveryengine.v1beta.IPageInfo=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.PageInfo} PageInfo instance */ - TransactionInfo.create = function create(properties) { - return new TransactionInfo(properties); + PageInfo.create = function create(properties) { + return new PageInfo(properties); }; /** - * Encodes the specified TransactionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.TransactionInfo.verify|verify} messages. + * Encodes the specified PageInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PageInfo.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo + * @memberof google.cloud.discoveryengine.v1beta.PageInfo * @static - * @param {google.cloud.discoveryengine.v1beta.ITransactionInfo} message TransactionInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.IPageInfo} message PageInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TransactionInfo.encode = function encode(message, writer) { + PageInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); - if (message.currency != null && Object.hasOwnProperty.call(message, "currency")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.currency); - if (message.transactionId != null && Object.hasOwnProperty.call(message, "transactionId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.transactionId); - if (message.tax != null && Object.hasOwnProperty.call(message, "tax")) - writer.uint32(/* id 4, wireType 5 =*/37).float(message.tax); - if (message.cost != null && Object.hasOwnProperty.call(message, "cost")) - writer.uint32(/* id 5, wireType 5 =*/45).float(message.cost); - if (message.discountValue != null && Object.hasOwnProperty.call(message, "discountValue")) - writer.uint32(/* id 6, wireType 5 =*/53).float(message.discountValue); + if (message.pageviewId != null && Object.hasOwnProperty.call(message, "pageviewId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pageviewId); + if (message.pageCategory != null && Object.hasOwnProperty.call(message, "pageCategory")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageCategory); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.uri); + if (message.referrerUri != null && Object.hasOwnProperty.call(message, "referrerUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.referrerUri); return writer; }; /** - * Encodes the specified TransactionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.TransactionInfo.verify|verify} messages. + * Encodes the specified PageInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PageInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo + * @memberof google.cloud.discoveryengine.v1beta.PageInfo * @static - * @param {google.cloud.discoveryengine.v1beta.ITransactionInfo} message TransactionInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.IPageInfo} message PageInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TransactionInfo.encodeDelimited = function encodeDelimited(message, writer) { + PageInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TransactionInfo message from the specified reader or buffer. + * Decodes a PageInfo message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo + * @memberof google.cloud.discoveryengine.v1beta.PageInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1beta.TransactionInfo} TransactionInfo + * @returns {google.cloud.discoveryengine.v1beta.PageInfo} PageInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TransactionInfo.decode = function decode(reader, length) { + PageInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.TransactionInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.PageInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.value = reader.float(); + message.pageviewId = reader.string(); break; } case 2: { - message.currency = reader.string(); + message.pageCategory = reader.string(); break; } case 3: { - message.transactionId = reader.string(); + message.uri = reader.string(); break; } case 4: { - message.tax = reader.float(); - break; - } - case 5: { - message.cost = reader.float(); - break; - } - case 6: { - message.discountValue = reader.float(); + message.referrerUri = reader.string(); break; } default: @@ -7485,184 +8090,149 @@ }; /** - * Decodes a TransactionInfo message from the specified reader or buffer, length delimited. + * Decodes a PageInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo + * @memberof google.cloud.discoveryengine.v1beta.PageInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1beta.TransactionInfo} TransactionInfo + * @returns {google.cloud.discoveryengine.v1beta.PageInfo} PageInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TransactionInfo.decodeDelimited = function decodeDelimited(reader) { + PageInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TransactionInfo message. + * Verifies a PageInfo message. * @function verify - * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo + * @memberof google.cloud.discoveryengine.v1beta.PageInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TransactionInfo.verify = function verify(message) { + PageInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.value != null && message.hasOwnProperty("value")) { - properties._value = 1; - if (typeof message.value !== "number") - return "value: number expected"; - } - if (message.currency != null && message.hasOwnProperty("currency")) - if (!$util.isString(message.currency)) - return "currency: string expected"; - if (message.transactionId != null && message.hasOwnProperty("transactionId")) - if (!$util.isString(message.transactionId)) - return "transactionId: string expected"; - if (message.tax != null && message.hasOwnProperty("tax")) { - properties._tax = 1; - if (typeof message.tax !== "number") - return "tax: number expected"; - } - if (message.cost != null && message.hasOwnProperty("cost")) { - properties._cost = 1; - if (typeof message.cost !== "number") - return "cost: number expected"; - } - if (message.discountValue != null && message.hasOwnProperty("discountValue")) { - properties._discountValue = 1; - if (typeof message.discountValue !== "number") - return "discountValue: number expected"; - } + if (message.pageviewId != null && message.hasOwnProperty("pageviewId")) + if (!$util.isString(message.pageviewId)) + return "pageviewId: string expected"; + if (message.pageCategory != null && message.hasOwnProperty("pageCategory")) + if (!$util.isString(message.pageCategory)) + return "pageCategory: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.referrerUri != null && message.hasOwnProperty("referrerUri")) + if (!$util.isString(message.referrerUri)) + return "referrerUri: string expected"; return null; }; /** - * Creates a TransactionInfo message from a plain object. Also converts values to their respective internal types. + * Creates a PageInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo + * @memberof google.cloud.discoveryengine.v1beta.PageInfo * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1beta.TransactionInfo} TransactionInfo + * @returns {google.cloud.discoveryengine.v1beta.PageInfo} PageInfo */ - TransactionInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1beta.TransactionInfo) + PageInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.PageInfo) return object; - var message = new $root.google.cloud.discoveryengine.v1beta.TransactionInfo(); - if (object.value != null) - message.value = Number(object.value); - if (object.currency != null) - message.currency = String(object.currency); - if (object.transactionId != null) - message.transactionId = String(object.transactionId); - if (object.tax != null) - message.tax = Number(object.tax); - if (object.cost != null) - message.cost = Number(object.cost); - if (object.discountValue != null) - message.discountValue = Number(object.discountValue); + var message = new $root.google.cloud.discoveryengine.v1beta.PageInfo(); + if (object.pageviewId != null) + message.pageviewId = String(object.pageviewId); + if (object.pageCategory != null) + message.pageCategory = String(object.pageCategory); + if (object.uri != null) + message.uri = String(object.uri); + if (object.referrerUri != null) + message.referrerUri = String(object.referrerUri); return message; }; /** - * Creates a plain object from a TransactionInfo message. Also converts values to other types if specified. + * Creates a plain object from a PageInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo + * @memberof google.cloud.discoveryengine.v1beta.PageInfo * @static - * @param {google.cloud.discoveryengine.v1beta.TransactionInfo} message TransactionInfo + * @param {google.cloud.discoveryengine.v1beta.PageInfo} message PageInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TransactionInfo.toObject = function toObject(message, options) { + PageInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.currency = ""; - object.transactionId = ""; - } - if (message.value != null && message.hasOwnProperty("value")) { - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - if (options.oneofs) - object._value = "value"; - } - if (message.currency != null && message.hasOwnProperty("currency")) - object.currency = message.currency; - if (message.transactionId != null && message.hasOwnProperty("transactionId")) - object.transactionId = message.transactionId; - if (message.tax != null && message.hasOwnProperty("tax")) { - object.tax = options.json && !isFinite(message.tax) ? String(message.tax) : message.tax; - if (options.oneofs) - object._tax = "tax"; - } - if (message.cost != null && message.hasOwnProperty("cost")) { - object.cost = options.json && !isFinite(message.cost) ? String(message.cost) : message.cost; - if (options.oneofs) - object._cost = "cost"; - } - if (message.discountValue != null && message.hasOwnProperty("discountValue")) { - object.discountValue = options.json && !isFinite(message.discountValue) ? String(message.discountValue) : message.discountValue; - if (options.oneofs) - object._discountValue = "discountValue"; + object.pageviewId = ""; + object.pageCategory = ""; + object.uri = ""; + object.referrerUri = ""; } + if (message.pageviewId != null && message.hasOwnProperty("pageviewId")) + object.pageviewId = message.pageviewId; + if (message.pageCategory != null && message.hasOwnProperty("pageCategory")) + object.pageCategory = message.pageCategory; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.referrerUri != null && message.hasOwnProperty("referrerUri")) + object.referrerUri = message.referrerUri; return object; }; /** - * Converts this TransactionInfo to JSON. + * Converts this PageInfo to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo + * @memberof google.cloud.discoveryengine.v1beta.PageInfo * @instance * @returns {Object.} JSON object */ - TransactionInfo.prototype.toJSON = function toJSON() { + PageInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TransactionInfo + * Gets the default type url for PageInfo * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo + * @memberof google.cloud.discoveryengine.v1beta.PageInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TransactionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PageInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.TransactionInfo"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.PageInfo"; }; - return TransactionInfo; + return PageInfo; })(); - v1beta.DocumentInfo = (function() { + v1beta.SearchInfo = (function() { /** - * Properties of a DocumentInfo. + * Properties of a SearchInfo. * @memberof google.cloud.discoveryengine.v1beta - * @interface IDocumentInfo - * @property {string|null} [id] DocumentInfo id - * @property {string|null} [name] DocumentInfo name - * @property {number|null} [quantity] DocumentInfo quantity - * @property {Array.|null} [promotionIds] DocumentInfo promotionIds + * @interface ISearchInfo + * @property {string|null} [searchQuery] SearchInfo searchQuery + * @property {string|null} [orderBy] SearchInfo orderBy + * @property {number|null} [offset] SearchInfo offset */ /** - * Constructs a new DocumentInfo. + * Constructs a new SearchInfo. * @memberof google.cloud.discoveryengine.v1beta - * @classdesc Represents a DocumentInfo. - * @implements IDocumentInfo + * @classdesc Represents a SearchInfo. + * @implements ISearchInfo * @constructor - * @param {google.cloud.discoveryengine.v1beta.IDocumentInfo=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1beta.ISearchInfo=} [properties] Properties to set */ - function DocumentInfo(properties) { - this.promotionIds = []; + function SearchInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7670,145 +8240,117 @@ } /** - * DocumentInfo id. - * @member {string|null|undefined} id - * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo - * @instance - */ - DocumentInfo.prototype.id = null; - - /** - * DocumentInfo name. - * @member {string|null|undefined} name - * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo + * SearchInfo searchQuery. + * @member {string} searchQuery + * @memberof google.cloud.discoveryengine.v1beta.SearchInfo * @instance */ - DocumentInfo.prototype.name = null; + SearchInfo.prototype.searchQuery = ""; /** - * DocumentInfo quantity. - * @member {number|null|undefined} quantity - * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo + * SearchInfo orderBy. + * @member {string} orderBy + * @memberof google.cloud.discoveryengine.v1beta.SearchInfo * @instance */ - DocumentInfo.prototype.quantity = null; + SearchInfo.prototype.orderBy = ""; /** - * DocumentInfo promotionIds. - * @member {Array.} promotionIds - * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo + * SearchInfo offset. + * @member {number|null|undefined} offset + * @memberof google.cloud.discoveryengine.v1beta.SearchInfo * @instance */ - DocumentInfo.prototype.promotionIds = $util.emptyArray; + SearchInfo.prototype.offset = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * DocumentInfo documentDescriptor. - * @member {"id"|"name"|undefined} documentDescriptor - * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo - * @instance - */ - Object.defineProperty(DocumentInfo.prototype, "documentDescriptor", { - get: $util.oneOfGetter($oneOfFields = ["id", "name"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * DocumentInfo _quantity. - * @member {"quantity"|undefined} _quantity - * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo + * SearchInfo _offset. + * @member {"offset"|undefined} _offset + * @memberof google.cloud.discoveryengine.v1beta.SearchInfo * @instance */ - Object.defineProperty(DocumentInfo.prototype, "_quantity", { - get: $util.oneOfGetter($oneOfFields = ["quantity"]), + Object.defineProperty(SearchInfo.prototype, "_offset", { + get: $util.oneOfGetter($oneOfFields = ["offset"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new DocumentInfo instance using the specified properties. + * Creates a new SearchInfo instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo + * @memberof google.cloud.discoveryengine.v1beta.SearchInfo * @static - * @param {google.cloud.discoveryengine.v1beta.IDocumentInfo=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1beta.DocumentInfo} DocumentInfo instance + * @param {google.cloud.discoveryengine.v1beta.ISearchInfo=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.SearchInfo} SearchInfo instance */ - DocumentInfo.create = function create(properties) { - return new DocumentInfo(properties); + SearchInfo.create = function create(properties) { + return new SearchInfo(properties); }; /** - * Encodes the specified DocumentInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.DocumentInfo.verify|verify} messages. + * Encodes the specified SearchInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchInfo.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo + * @memberof google.cloud.discoveryengine.v1beta.SearchInfo * @static - * @param {google.cloud.discoveryengine.v1beta.IDocumentInfo} message DocumentInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.ISearchInfo} message SearchInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DocumentInfo.encode = function encode(message, writer) { + SearchInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.quantity != null && Object.hasOwnProperty.call(message, "quantity")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.quantity); - if (message.promotionIds != null && message.promotionIds.length) - for (var i = 0; i < message.promotionIds.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.promotionIds[i]); - return writer; - }; - + if (message.searchQuery != null && Object.hasOwnProperty.call(message, "searchQuery")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.searchQuery); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.orderBy); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.offset); + return writer; + }; + /** - * Encodes the specified DocumentInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.DocumentInfo.verify|verify} messages. + * Encodes the specified SearchInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo + * @memberof google.cloud.discoveryengine.v1beta.SearchInfo * @static - * @param {google.cloud.discoveryengine.v1beta.IDocumentInfo} message DocumentInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.ISearchInfo} message SearchInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DocumentInfo.encodeDelimited = function encodeDelimited(message, writer) { + SearchInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DocumentInfo message from the specified reader or buffer. + * Decodes a SearchInfo message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo + * @memberof google.cloud.discoveryengine.v1beta.SearchInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1beta.DocumentInfo} DocumentInfo + * @returns {google.cloud.discoveryengine.v1beta.SearchInfo} SearchInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DocumentInfo.decode = function decode(reader, length) { + SearchInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.DocumentInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.SearchInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.id = reader.string(); + message.searchQuery = reader.string(); break; } case 2: { - message.name = reader.string(); + message.orderBy = reader.string(); break; } case 3: { - message.quantity = reader.int32(); - break; - } - case 4: { - if (!(message.promotionIds && message.promotionIds.length)) - message.promotionIds = []; - message.promotionIds.push(reader.string()); + message.offset = reader.int32(); break; } default: @@ -7820,176 +8362,145 @@ }; /** - * Decodes a DocumentInfo message from the specified reader or buffer, length delimited. + * Decodes a SearchInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo + * @memberof google.cloud.discoveryengine.v1beta.SearchInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1beta.DocumentInfo} DocumentInfo + * @returns {google.cloud.discoveryengine.v1beta.SearchInfo} SearchInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DocumentInfo.decodeDelimited = function decodeDelimited(reader) { + SearchInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DocumentInfo message. + * Verifies a SearchInfo message. * @function verify - * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo + * @memberof google.cloud.discoveryengine.v1beta.SearchInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DocumentInfo.verify = function verify(message) { + SearchInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.id != null && message.hasOwnProperty("id")) { - properties.documentDescriptor = 1; - if (!$util.isString(message.id)) - return "id: string expected"; - } - if (message.name != null && message.hasOwnProperty("name")) { - if (properties.documentDescriptor === 1) - return "documentDescriptor: multiple values"; - properties.documentDescriptor = 1; - if (!$util.isString(message.name)) - return "name: string expected"; - } - if (message.quantity != null && message.hasOwnProperty("quantity")) { - properties._quantity = 1; - if (!$util.isInteger(message.quantity)) - return "quantity: integer expected"; - } - if (message.promotionIds != null && message.hasOwnProperty("promotionIds")) { - if (!Array.isArray(message.promotionIds)) - return "promotionIds: array expected"; - for (var i = 0; i < message.promotionIds.length; ++i) - if (!$util.isString(message.promotionIds[i])) - return "promotionIds: string[] expected"; + if (message.searchQuery != null && message.hasOwnProperty("searchQuery")) + if (!$util.isString(message.searchQuery)) + return "searchQuery: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.offset != null && message.hasOwnProperty("offset")) { + properties._offset = 1; + if (!$util.isInteger(message.offset)) + return "offset: integer expected"; } return null; }; /** - * Creates a DocumentInfo message from a plain object. Also converts values to their respective internal types. + * Creates a SearchInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo + * @memberof google.cloud.discoveryengine.v1beta.SearchInfo * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1beta.DocumentInfo} DocumentInfo + * @returns {google.cloud.discoveryengine.v1beta.SearchInfo} SearchInfo */ - DocumentInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1beta.DocumentInfo) + SearchInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.SearchInfo) return object; - var message = new $root.google.cloud.discoveryengine.v1beta.DocumentInfo(); - if (object.id != null) - message.id = String(object.id); - if (object.name != null) - message.name = String(object.name); - if (object.quantity != null) - message.quantity = object.quantity | 0; - if (object.promotionIds) { - if (!Array.isArray(object.promotionIds)) - throw TypeError(".google.cloud.discoveryengine.v1beta.DocumentInfo.promotionIds: array expected"); - message.promotionIds = []; - for (var i = 0; i < object.promotionIds.length; ++i) - message.promotionIds[i] = String(object.promotionIds[i]); - } + var message = new $root.google.cloud.discoveryengine.v1beta.SearchInfo(); + if (object.searchQuery != null) + message.searchQuery = String(object.searchQuery); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.offset != null) + message.offset = object.offset | 0; return message; }; /** - * Creates a plain object from a DocumentInfo message. Also converts values to other types if specified. + * Creates a plain object from a SearchInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo + * @memberof google.cloud.discoveryengine.v1beta.SearchInfo * @static - * @param {google.cloud.discoveryengine.v1beta.DocumentInfo} message DocumentInfo + * @param {google.cloud.discoveryengine.v1beta.SearchInfo} message SearchInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DocumentInfo.toObject = function toObject(message, options) { + SearchInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.promotionIds = []; - if (message.id != null && message.hasOwnProperty("id")) { - object.id = message.id; - if (options.oneofs) - object.documentDescriptor = "id"; - } - if (message.name != null && message.hasOwnProperty("name")) { - object.name = message.name; - if (options.oneofs) - object.documentDescriptor = "name"; + if (options.defaults) { + object.searchQuery = ""; + object.orderBy = ""; } - if (message.quantity != null && message.hasOwnProperty("quantity")) { - object.quantity = message.quantity; + if (message.searchQuery != null && message.hasOwnProperty("searchQuery")) + object.searchQuery = message.searchQuery; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.offset != null && message.hasOwnProperty("offset")) { + object.offset = message.offset; if (options.oneofs) - object._quantity = "quantity"; - } - if (message.promotionIds && message.promotionIds.length) { - object.promotionIds = []; - for (var j = 0; j < message.promotionIds.length; ++j) - object.promotionIds[j] = message.promotionIds[j]; + object._offset = "offset"; } return object; }; /** - * Converts this DocumentInfo to JSON. + * Converts this SearchInfo to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo + * @memberof google.cloud.discoveryengine.v1beta.SearchInfo * @instance * @returns {Object.} JSON object */ - DocumentInfo.prototype.toJSON = function toJSON() { + SearchInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DocumentInfo + * Gets the default type url for SearchInfo * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo + * @memberof google.cloud.discoveryengine.v1beta.SearchInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DocumentInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SearchInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.DocumentInfo"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.SearchInfo"; }; - return DocumentInfo; + return SearchInfo; })(); - v1beta.PanelInfo = (function() { + v1beta.CompletionInfo = (function() { /** - * Properties of a PanelInfo. + * Properties of a CompletionInfo. * @memberof google.cloud.discoveryengine.v1beta - * @interface IPanelInfo - * @property {string|null} [panelId] PanelInfo panelId - * @property {string|null} [displayName] PanelInfo displayName - * @property {number|null} [panelPosition] PanelInfo panelPosition - * @property {number|null} [totalPanels] PanelInfo totalPanels + * @interface ICompletionInfo + * @property {string|null} [selectedSuggestion] CompletionInfo selectedSuggestion + * @property {number|null} [selectedPosition] CompletionInfo selectedPosition */ /** - * Constructs a new PanelInfo. + * Constructs a new CompletionInfo. * @memberof google.cloud.discoveryengine.v1beta - * @classdesc Represents a PanelInfo. - * @implements IPanelInfo + * @classdesc Represents a CompletionInfo. + * @implements ICompletionInfo * @constructor - * @param {google.cloud.discoveryengine.v1beta.IPanelInfo=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1beta.ICompletionInfo=} [properties] Properties to set */ - function PanelInfo(properties) { + function CompletionInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7997,142 +8508,89 @@ } /** - * PanelInfo panelId. - * @member {string} panelId - * @memberof google.cloud.discoveryengine.v1beta.PanelInfo + * CompletionInfo selectedSuggestion. + * @member {string} selectedSuggestion + * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo * @instance */ - PanelInfo.prototype.panelId = ""; + CompletionInfo.prototype.selectedSuggestion = ""; /** - * PanelInfo displayName. - * @member {string} displayName - * @memberof google.cloud.discoveryengine.v1beta.PanelInfo + * CompletionInfo selectedPosition. + * @member {number} selectedPosition + * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo * @instance */ - PanelInfo.prototype.displayName = ""; + CompletionInfo.prototype.selectedPosition = 0; /** - * PanelInfo panelPosition. - * @member {number|null|undefined} panelPosition - * @memberof google.cloud.discoveryengine.v1beta.PanelInfo - * @instance + * Creates a new CompletionInfo instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo + * @static + * @param {google.cloud.discoveryengine.v1beta.ICompletionInfo=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.CompletionInfo} CompletionInfo instance */ - PanelInfo.prototype.panelPosition = null; + CompletionInfo.create = function create(properties) { + return new CompletionInfo(properties); + }; /** - * PanelInfo totalPanels. - * @member {number|null|undefined} totalPanels - * @memberof google.cloud.discoveryengine.v1beta.PanelInfo - * @instance + * Encodes the specified CompletionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CompletionInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo + * @static + * @param {google.cloud.discoveryengine.v1beta.ICompletionInfo} message CompletionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - PanelInfo.prototype.totalPanels = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + CompletionInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selectedSuggestion != null && Object.hasOwnProperty.call(message, "selectedSuggestion")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selectedSuggestion); + if (message.selectedPosition != null && Object.hasOwnProperty.call(message, "selectedPosition")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.selectedPosition); + return writer; + }; /** - * PanelInfo _panelPosition. - * @member {"panelPosition"|undefined} _panelPosition - * @memberof google.cloud.discoveryengine.v1beta.PanelInfo - * @instance - */ - Object.defineProperty(PanelInfo.prototype, "_panelPosition", { - get: $util.oneOfGetter($oneOfFields = ["panelPosition"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * PanelInfo _totalPanels. - * @member {"totalPanels"|undefined} _totalPanels - * @memberof google.cloud.discoveryengine.v1beta.PanelInfo - * @instance - */ - Object.defineProperty(PanelInfo.prototype, "_totalPanels", { - get: $util.oneOfGetter($oneOfFields = ["totalPanels"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new PanelInfo instance using the specified properties. - * @function create - * @memberof google.cloud.discoveryengine.v1beta.PanelInfo - * @static - * @param {google.cloud.discoveryengine.v1beta.IPanelInfo=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1beta.PanelInfo} PanelInfo instance - */ - PanelInfo.create = function create(properties) { - return new PanelInfo(properties); - }; - - /** - * Encodes the specified PanelInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PanelInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.discoveryengine.v1beta.PanelInfo - * @static - * @param {google.cloud.discoveryengine.v1beta.IPanelInfo} message PanelInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PanelInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.panelId != null && Object.hasOwnProperty.call(message, "panelId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.panelId); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); - if (message.panelPosition != null && Object.hasOwnProperty.call(message, "panelPosition")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.panelPosition); - if (message.totalPanels != null && Object.hasOwnProperty.call(message, "totalPanels")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.totalPanels); - return writer; - }; - - /** - * Encodes the specified PanelInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PanelInfo.verify|verify} messages. + * Encodes the specified CompletionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CompletionInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.PanelInfo + * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo * @static - * @param {google.cloud.discoveryengine.v1beta.IPanelInfo} message PanelInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.ICompletionInfo} message CompletionInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PanelInfo.encodeDelimited = function encodeDelimited(message, writer) { + CompletionInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PanelInfo message from the specified reader or buffer. + * Decodes a CompletionInfo message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1beta.PanelInfo + * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1beta.PanelInfo} PanelInfo + * @returns {google.cloud.discoveryengine.v1beta.CompletionInfo} CompletionInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PanelInfo.decode = function decode(reader, length) { + CompletionInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.PanelInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.CompletionInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: { - message.panelId = reader.string(); - break; - } - case 3: { - message.displayName = reader.string(); - break; - } - case 4: { - message.panelPosition = reader.int32(); + case 1: { + message.selectedSuggestion = reader.string(); break; } - case 5: { - message.totalPanels = reader.int32(); + case 2: { + message.selectedPosition = reader.int32(); break; } default: @@ -8144,157 +8602,136 @@ }; /** - * Decodes a PanelInfo message from the specified reader or buffer, length delimited. + * Decodes a CompletionInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.PanelInfo + * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1beta.PanelInfo} PanelInfo + * @returns {google.cloud.discoveryengine.v1beta.CompletionInfo} CompletionInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PanelInfo.decodeDelimited = function decodeDelimited(reader) { + CompletionInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PanelInfo message. + * Verifies a CompletionInfo message. * @function verify - * @memberof google.cloud.discoveryengine.v1beta.PanelInfo + * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PanelInfo.verify = function verify(message) { + CompletionInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.panelId != null && message.hasOwnProperty("panelId")) - if (!$util.isString(message.panelId)) - return "panelId: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.panelPosition != null && message.hasOwnProperty("panelPosition")) { - properties._panelPosition = 1; - if (!$util.isInteger(message.panelPosition)) - return "panelPosition: integer expected"; - } - if (message.totalPanels != null && message.hasOwnProperty("totalPanels")) { - properties._totalPanels = 1; - if (!$util.isInteger(message.totalPanels)) - return "totalPanels: integer expected"; - } + if (message.selectedSuggestion != null && message.hasOwnProperty("selectedSuggestion")) + if (!$util.isString(message.selectedSuggestion)) + return "selectedSuggestion: string expected"; + if (message.selectedPosition != null && message.hasOwnProperty("selectedPosition")) + if (!$util.isInteger(message.selectedPosition)) + return "selectedPosition: integer expected"; return null; }; /** - * Creates a PanelInfo message from a plain object. Also converts values to their respective internal types. + * Creates a CompletionInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1beta.PanelInfo + * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1beta.PanelInfo} PanelInfo + * @returns {google.cloud.discoveryengine.v1beta.CompletionInfo} CompletionInfo */ - PanelInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1beta.PanelInfo) + CompletionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.CompletionInfo) return object; - var message = new $root.google.cloud.discoveryengine.v1beta.PanelInfo(); - if (object.panelId != null) - message.panelId = String(object.panelId); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.panelPosition != null) - message.panelPosition = object.panelPosition | 0; - if (object.totalPanels != null) - message.totalPanels = object.totalPanels | 0; + var message = new $root.google.cloud.discoveryengine.v1beta.CompletionInfo(); + if (object.selectedSuggestion != null) + message.selectedSuggestion = String(object.selectedSuggestion); + if (object.selectedPosition != null) + message.selectedPosition = object.selectedPosition | 0; return message; }; /** - * Creates a plain object from a PanelInfo message. Also converts values to other types if specified. + * Creates a plain object from a CompletionInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1beta.PanelInfo + * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo * @static - * @param {google.cloud.discoveryengine.v1beta.PanelInfo} message PanelInfo + * @param {google.cloud.discoveryengine.v1beta.CompletionInfo} message CompletionInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PanelInfo.toObject = function toObject(message, options) { + CompletionInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.panelId = ""; - object.displayName = ""; - } - if (message.panelId != null && message.hasOwnProperty("panelId")) - object.panelId = message.panelId; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.panelPosition != null && message.hasOwnProperty("panelPosition")) { - object.panelPosition = message.panelPosition; - if (options.oneofs) - object._panelPosition = "panelPosition"; - } - if (message.totalPanels != null && message.hasOwnProperty("totalPanels")) { - object.totalPanels = message.totalPanels; - if (options.oneofs) - object._totalPanels = "totalPanels"; + object.selectedSuggestion = ""; + object.selectedPosition = 0; } + if (message.selectedSuggestion != null && message.hasOwnProperty("selectedSuggestion")) + object.selectedSuggestion = message.selectedSuggestion; + if (message.selectedPosition != null && message.hasOwnProperty("selectedPosition")) + object.selectedPosition = message.selectedPosition; return object; }; /** - * Converts this PanelInfo to JSON. + * Converts this CompletionInfo to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1beta.PanelInfo + * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo * @instance * @returns {Object.} JSON object */ - PanelInfo.prototype.toJSON = function toJSON() { + CompletionInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PanelInfo + * Gets the default type url for CompletionInfo * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1beta.PanelInfo + * @memberof google.cloud.discoveryengine.v1beta.CompletionInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PanelInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CompletionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.PanelInfo"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.CompletionInfo"; }; - return PanelInfo; + return CompletionInfo; })(); - v1beta.MediaInfo = (function() { + v1beta.TransactionInfo = (function() { /** - * Properties of a MediaInfo. + * Properties of a TransactionInfo. * @memberof google.cloud.discoveryengine.v1beta - * @interface IMediaInfo - * @property {google.protobuf.IDuration|null} [mediaProgressDuration] MediaInfo mediaProgressDuration - * @property {number|null} [mediaProgressPercentage] MediaInfo mediaProgressPercentage + * @interface ITransactionInfo + * @property {number|null} [value] TransactionInfo value + * @property {string|null} [currency] TransactionInfo currency + * @property {string|null} [transactionId] TransactionInfo transactionId + * @property {number|null} [tax] TransactionInfo tax + * @property {number|null} [cost] TransactionInfo cost + * @property {number|null} [discountValue] TransactionInfo discountValue */ /** - * Constructs a new MediaInfo. + * Constructs a new TransactionInfo. * @memberof google.cloud.discoveryengine.v1beta - * @classdesc Represents a MediaInfo. - * @implements IMediaInfo + * @classdesc Represents a TransactionInfo. + * @implements ITransactionInfo * @constructor - * @param {google.cloud.discoveryengine.v1beta.IMediaInfo=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1beta.ITransactionInfo=} [properties] Properties to set */ - function MediaInfo(properties) { + function TransactionInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8302,103 +8739,192 @@ } /** - * MediaInfo mediaProgressDuration. - * @member {google.protobuf.IDuration|null|undefined} mediaProgressDuration - * @memberof google.cloud.discoveryengine.v1beta.MediaInfo + * TransactionInfo value. + * @member {number|null|undefined} value + * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo * @instance */ - MediaInfo.prototype.mediaProgressDuration = null; + TransactionInfo.prototype.value = null; /** - * MediaInfo mediaProgressPercentage. - * @member {number|null|undefined} mediaProgressPercentage - * @memberof google.cloud.discoveryengine.v1beta.MediaInfo + * TransactionInfo currency. + * @member {string} currency + * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo * @instance */ - MediaInfo.prototype.mediaProgressPercentage = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + TransactionInfo.prototype.currency = ""; /** - * MediaInfo _mediaProgressPercentage. - * @member {"mediaProgressPercentage"|undefined} _mediaProgressPercentage - * @memberof google.cloud.discoveryengine.v1beta.MediaInfo + * TransactionInfo transactionId. + * @member {string} transactionId + * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo * @instance */ - Object.defineProperty(MediaInfo.prototype, "_mediaProgressPercentage", { - get: $util.oneOfGetter($oneOfFields = ["mediaProgressPercentage"]), - set: $util.oneOfSetter($oneOfFields) - }); + TransactionInfo.prototype.transactionId = ""; /** - * Creates a new MediaInfo instance using the specified properties. - * @function create - * @memberof google.cloud.discoveryengine.v1beta.MediaInfo - * @static - * @param {google.cloud.discoveryengine.v1beta.IMediaInfo=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1beta.MediaInfo} MediaInfo instance + * TransactionInfo tax. + * @member {number|null|undefined} tax + * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo + * @instance */ - MediaInfo.create = function create(properties) { - return new MediaInfo(properties); - }; + TransactionInfo.prototype.tax = null; /** - * Encodes the specified MediaInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.MediaInfo.verify|verify} messages. + * TransactionInfo cost. + * @member {number|null|undefined} cost + * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo + * @instance + */ + TransactionInfo.prototype.cost = null; + + /** + * TransactionInfo discountValue. + * @member {number|null|undefined} discountValue + * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo + * @instance + */ + TransactionInfo.prototype.discountValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TransactionInfo _value. + * @member {"value"|undefined} _value + * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo + * @instance + */ + Object.defineProperty(TransactionInfo.prototype, "_value", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * TransactionInfo _tax. + * @member {"tax"|undefined} _tax + * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo + * @instance + */ + Object.defineProperty(TransactionInfo.prototype, "_tax", { + get: $util.oneOfGetter($oneOfFields = ["tax"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * TransactionInfo _cost. + * @member {"cost"|undefined} _cost + * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo + * @instance + */ + Object.defineProperty(TransactionInfo.prototype, "_cost", { + get: $util.oneOfGetter($oneOfFields = ["cost"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * TransactionInfo _discountValue. + * @member {"discountValue"|undefined} _discountValue + * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo + * @instance + */ + Object.defineProperty(TransactionInfo.prototype, "_discountValue", { + get: $util.oneOfGetter($oneOfFields = ["discountValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TransactionInfo instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo + * @static + * @param {google.cloud.discoveryengine.v1beta.ITransactionInfo=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.TransactionInfo} TransactionInfo instance + */ + TransactionInfo.create = function create(properties) { + return new TransactionInfo(properties); + }; + + /** + * Encodes the specified TransactionInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.TransactionInfo.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1beta.MediaInfo + * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo * @static - * @param {google.cloud.discoveryengine.v1beta.IMediaInfo} message MediaInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.ITransactionInfo} message TransactionInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MediaInfo.encode = function encode(message, writer) { + TransactionInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.mediaProgressDuration != null && Object.hasOwnProperty.call(message, "mediaProgressDuration")) - $root.google.protobuf.Duration.encode(message.mediaProgressDuration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.mediaProgressPercentage != null && Object.hasOwnProperty.call(message, "mediaProgressPercentage")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.mediaProgressPercentage); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); + if (message.currency != null && Object.hasOwnProperty.call(message, "currency")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.currency); + if (message.transactionId != null && Object.hasOwnProperty.call(message, "transactionId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.transactionId); + if (message.tax != null && Object.hasOwnProperty.call(message, "tax")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.tax); + if (message.cost != null && Object.hasOwnProperty.call(message, "cost")) + writer.uint32(/* id 5, wireType 5 =*/45).float(message.cost); + if (message.discountValue != null && Object.hasOwnProperty.call(message, "discountValue")) + writer.uint32(/* id 6, wireType 5 =*/53).float(message.discountValue); return writer; }; /** - * Encodes the specified MediaInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.MediaInfo.verify|verify} messages. + * Encodes the specified TransactionInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.TransactionInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.MediaInfo + * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo * @static - * @param {google.cloud.discoveryengine.v1beta.IMediaInfo} message MediaInfo message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.ITransactionInfo} message TransactionInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MediaInfo.encodeDelimited = function encodeDelimited(message, writer) { + TransactionInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MediaInfo message from the specified reader or buffer. + * Decodes a TransactionInfo message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1beta.MediaInfo + * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1beta.MediaInfo} MediaInfo + * @returns {google.cloud.discoveryengine.v1beta.TransactionInfo} TransactionInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MediaInfo.decode = function decode(reader, length) { + TransactionInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.MediaInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.TransactionInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.mediaProgressDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.value = reader.float(); break; } case 2: { - message.mediaProgressPercentage = reader.float(); + message.currency = reader.string(); + break; + } + case 3: { + message.transactionId = reader.string(); + break; + } + case 4: { + message.tax = reader.float(); + break; + } + case 5: { + message.cost = reader.float(); + break; + } + case 6: { + message.discountValue = reader.float(); break; } default: @@ -8410,216 +8936,184 @@ }; /** - * Decodes a MediaInfo message from the specified reader or buffer, length delimited. + * Decodes a TransactionInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.MediaInfo + * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1beta.MediaInfo} MediaInfo + * @returns {google.cloud.discoveryengine.v1beta.TransactionInfo} TransactionInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MediaInfo.decodeDelimited = function decodeDelimited(reader) { + TransactionInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MediaInfo message. + * Verifies a TransactionInfo message. * @function verify - * @memberof google.cloud.discoveryengine.v1beta.MediaInfo + * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MediaInfo.verify = function verify(message) { + TransactionInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.mediaProgressDuration != null && message.hasOwnProperty("mediaProgressDuration")) { - var error = $root.google.protobuf.Duration.verify(message.mediaProgressDuration); - if (error) - return "mediaProgressDuration." + error; + if (message.value != null && message.hasOwnProperty("value")) { + properties._value = 1; + if (typeof message.value !== "number") + return "value: number expected"; } - if (message.mediaProgressPercentage != null && message.hasOwnProperty("mediaProgressPercentage")) { - properties._mediaProgressPercentage = 1; - if (typeof message.mediaProgressPercentage !== "number") - return "mediaProgressPercentage: number expected"; + if (message.currency != null && message.hasOwnProperty("currency")) + if (!$util.isString(message.currency)) + return "currency: string expected"; + if (message.transactionId != null && message.hasOwnProperty("transactionId")) + if (!$util.isString(message.transactionId)) + return "transactionId: string expected"; + if (message.tax != null && message.hasOwnProperty("tax")) { + properties._tax = 1; + if (typeof message.tax !== "number") + return "tax: number expected"; + } + if (message.cost != null && message.hasOwnProperty("cost")) { + properties._cost = 1; + if (typeof message.cost !== "number") + return "cost: number expected"; + } + if (message.discountValue != null && message.hasOwnProperty("discountValue")) { + properties._discountValue = 1; + if (typeof message.discountValue !== "number") + return "discountValue: number expected"; } return null; }; /** - * Creates a MediaInfo message from a plain object. Also converts values to their respective internal types. + * Creates a TransactionInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1beta.MediaInfo + * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1beta.MediaInfo} MediaInfo + * @returns {google.cloud.discoveryengine.v1beta.TransactionInfo} TransactionInfo */ - MediaInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1beta.MediaInfo) + TransactionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.TransactionInfo) return object; - var message = new $root.google.cloud.discoveryengine.v1beta.MediaInfo(); - if (object.mediaProgressDuration != null) { - if (typeof object.mediaProgressDuration !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.MediaInfo.mediaProgressDuration: object expected"); - message.mediaProgressDuration = $root.google.protobuf.Duration.fromObject(object.mediaProgressDuration); - } - if (object.mediaProgressPercentage != null) - message.mediaProgressPercentage = Number(object.mediaProgressPercentage); + var message = new $root.google.cloud.discoveryengine.v1beta.TransactionInfo(); + if (object.value != null) + message.value = Number(object.value); + if (object.currency != null) + message.currency = String(object.currency); + if (object.transactionId != null) + message.transactionId = String(object.transactionId); + if (object.tax != null) + message.tax = Number(object.tax); + if (object.cost != null) + message.cost = Number(object.cost); + if (object.discountValue != null) + message.discountValue = Number(object.discountValue); return message; }; /** - * Creates a plain object from a MediaInfo message. Also converts values to other types if specified. + * Creates a plain object from a TransactionInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1beta.MediaInfo + * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo * @static - * @param {google.cloud.discoveryengine.v1beta.MediaInfo} message MediaInfo + * @param {google.cloud.discoveryengine.v1beta.TransactionInfo} message TransactionInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MediaInfo.toObject = function toObject(message, options) { + TransactionInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.mediaProgressDuration = null; - if (message.mediaProgressDuration != null && message.hasOwnProperty("mediaProgressDuration")) - object.mediaProgressDuration = $root.google.protobuf.Duration.toObject(message.mediaProgressDuration, options); - if (message.mediaProgressPercentage != null && message.hasOwnProperty("mediaProgressPercentage")) { - object.mediaProgressPercentage = options.json && !isFinite(message.mediaProgressPercentage) ? String(message.mediaProgressPercentage) : message.mediaProgressPercentage; + if (options.defaults) { + object.currency = ""; + object.transactionId = ""; + } + if (message.value != null && message.hasOwnProperty("value")) { + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; if (options.oneofs) - object._mediaProgressPercentage = "mediaProgressPercentage"; + object._value = "value"; + } + if (message.currency != null && message.hasOwnProperty("currency")) + object.currency = message.currency; + if (message.transactionId != null && message.hasOwnProperty("transactionId")) + object.transactionId = message.transactionId; + if (message.tax != null && message.hasOwnProperty("tax")) { + object.tax = options.json && !isFinite(message.tax) ? String(message.tax) : message.tax; + if (options.oneofs) + object._tax = "tax"; + } + if (message.cost != null && message.hasOwnProperty("cost")) { + object.cost = options.json && !isFinite(message.cost) ? String(message.cost) : message.cost; + if (options.oneofs) + object._cost = "cost"; + } + if (message.discountValue != null && message.hasOwnProperty("discountValue")) { + object.discountValue = options.json && !isFinite(message.discountValue) ? String(message.discountValue) : message.discountValue; + if (options.oneofs) + object._discountValue = "discountValue"; } return object; }; /** - * Converts this MediaInfo to JSON. + * Converts this TransactionInfo to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1beta.MediaInfo + * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo * @instance * @returns {Object.} JSON object */ - MediaInfo.prototype.toJSON = function toJSON() { + TransactionInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MediaInfo + * Gets the default type url for TransactionInfo * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1beta.MediaInfo + * @memberof google.cloud.discoveryengine.v1beta.TransactionInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MediaInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TransactionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.MediaInfo"; - }; - - return MediaInfo; - })(); - - v1beta.RecommendationService = (function() { - - /** - * Constructs a new RecommendationService service. - * @memberof google.cloud.discoveryengine.v1beta - * @classdesc Represents a RecommendationService - * @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 RecommendationService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (RecommendationService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = RecommendationService; - - /** - * Creates new RecommendationService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.discoveryengine.v1beta.RecommendationService - * @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 {RecommendationService} RPC service. Useful where requests and/or responses are streamed. - */ - RecommendationService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.TransactionInfo"; }; - /** - * Callback as used by {@link google.cloud.discoveryengine.v1beta.RecommendationService|recommend}. - * @memberof google.cloud.discoveryengine.v1beta.RecommendationService - * @typedef RecommendCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.discoveryengine.v1beta.RecommendResponse} [response] RecommendResponse - */ - - /** - * Calls Recommend. - * @function recommend - * @memberof google.cloud.discoveryengine.v1beta.RecommendationService - * @instance - * @param {google.cloud.discoveryengine.v1beta.IRecommendRequest} request RecommendRequest message or plain object - * @param {google.cloud.discoveryengine.v1beta.RecommendationService.RecommendCallback} callback Node-style callback called with the error, if any, and RecommendResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(RecommendationService.prototype.recommend = function recommend(request, callback) { - return this.rpcCall(recommend, $root.google.cloud.discoveryengine.v1beta.RecommendRequest, $root.google.cloud.discoveryengine.v1beta.RecommendResponse, request, callback); - }, "name", { value: "Recommend" }); - - /** - * Calls Recommend. - * @function recommend - * @memberof google.cloud.discoveryengine.v1beta.RecommendationService - * @instance - * @param {google.cloud.discoveryengine.v1beta.IRecommendRequest} request RecommendRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return RecommendationService; + return TransactionInfo; })(); - v1beta.RecommendRequest = (function() { + v1beta.DocumentInfo = (function() { /** - * Properties of a RecommendRequest. + * Properties of a DocumentInfo. * @memberof google.cloud.discoveryengine.v1beta - * @interface IRecommendRequest - * @property {string|null} [servingConfig] RecommendRequest servingConfig - * @property {google.cloud.discoveryengine.v1beta.IUserEvent|null} [userEvent] RecommendRequest userEvent - * @property {number|null} [pageSize] RecommendRequest pageSize - * @property {string|null} [filter] RecommendRequest filter - * @property {boolean|null} [validateOnly] RecommendRequest validateOnly - * @property {Object.|null} [params] RecommendRequest params - * @property {Object.|null} [userLabels] RecommendRequest userLabels + * @interface IDocumentInfo + * @property {string|null} [id] DocumentInfo id + * @property {string|null} [name] DocumentInfo name + * @property {number|null} [quantity] DocumentInfo quantity + * @property {Array.|null} [promotionIds] DocumentInfo promotionIds */ /** - * Constructs a new RecommendRequest. + * Constructs a new DocumentInfo. * @memberof google.cloud.discoveryengine.v1beta - * @classdesc Represents a RecommendRequest. - * @implements IRecommendRequest + * @classdesc Represents a DocumentInfo. + * @implements IDocumentInfo * @constructor - * @param {google.cloud.discoveryengine.v1beta.IRecommendRequest=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1beta.IDocumentInfo=} [properties] Properties to set */ - function RecommendRequest(properties) { - this.params = {}; - this.userLabels = {}; + function DocumentInfo(properties) { + this.promotionIds = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8627,201 +9121,145 @@ } /** - * RecommendRequest servingConfig. - * @member {string} servingConfig - * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest + * DocumentInfo id. + * @member {string|null|undefined} id + * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo * @instance */ - RecommendRequest.prototype.servingConfig = ""; + DocumentInfo.prototype.id = null; /** - * RecommendRequest userEvent. - * @member {google.cloud.discoveryengine.v1beta.IUserEvent|null|undefined} userEvent - * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest + * DocumentInfo name. + * @member {string|null|undefined} name + * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo * @instance */ - RecommendRequest.prototype.userEvent = null; + DocumentInfo.prototype.name = null; /** - * RecommendRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest + * DocumentInfo quantity. + * @member {number|null|undefined} quantity + * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo * @instance */ - RecommendRequest.prototype.pageSize = 0; + DocumentInfo.prototype.quantity = null; /** - * RecommendRequest filter. - * @member {string} filter - * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest + * DocumentInfo promotionIds. + * @member {Array.} promotionIds + * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo * @instance */ - RecommendRequest.prototype.filter = ""; + DocumentInfo.prototype.promotionIds = $util.emptyArray; - /** - * RecommendRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest - * @instance - */ - RecommendRequest.prototype.validateOnly = false; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * RecommendRequest params. - * @member {Object.} params - * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest + * DocumentInfo documentDescriptor. + * @member {"id"|"name"|undefined} documentDescriptor + * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo * @instance */ - RecommendRequest.prototype.params = $util.emptyObject; + Object.defineProperty(DocumentInfo.prototype, "documentDescriptor", { + get: $util.oneOfGetter($oneOfFields = ["id", "name"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * RecommendRequest userLabels. - * @member {Object.} userLabels - * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest + * DocumentInfo _quantity. + * @member {"quantity"|undefined} _quantity + * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo * @instance */ - RecommendRequest.prototype.userLabels = $util.emptyObject; + Object.defineProperty(DocumentInfo.prototype, "_quantity", { + get: $util.oneOfGetter($oneOfFields = ["quantity"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new RecommendRequest instance using the specified properties. + * Creates a new DocumentInfo instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest + * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo * @static - * @param {google.cloud.discoveryengine.v1beta.IRecommendRequest=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1beta.RecommendRequest} RecommendRequest instance + * @param {google.cloud.discoveryengine.v1beta.IDocumentInfo=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.DocumentInfo} DocumentInfo instance */ - RecommendRequest.create = function create(properties) { - return new RecommendRequest(properties); + DocumentInfo.create = function create(properties) { + return new DocumentInfo(properties); }; /** - * Encodes the specified RecommendRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendRequest.verify|verify} messages. + * Encodes the specified DocumentInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.DocumentInfo.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest + * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo * @static - * @param {google.cloud.discoveryengine.v1beta.IRecommendRequest} message RecommendRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.IDocumentInfo} message DocumentInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecommendRequest.encode = function encode(message, writer) { + DocumentInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.servingConfig != null && Object.hasOwnProperty.call(message, "servingConfig")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.servingConfig); - if (message.userEvent != null && Object.hasOwnProperty.call(message, "userEvent")) - $root.google.cloud.discoveryengine.v1beta.UserEvent.encode(message.userEvent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - for (var keys = Object.keys(message.params), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.protobuf.Value.encode(message.params[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.userLabels != null && Object.hasOwnProperty.call(message, "userLabels")) - for (var keys = Object.keys(message.userLabels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.quantity != null && Object.hasOwnProperty.call(message, "quantity")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.quantity); + if (message.promotionIds != null && message.promotionIds.length) + for (var i = 0; i < message.promotionIds.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.promotionIds[i]); return writer; }; /** - * Encodes the specified RecommendRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendRequest.verify|verify} messages. + * Encodes the specified DocumentInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.DocumentInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest + * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo * @static - * @param {google.cloud.discoveryengine.v1beta.IRecommendRequest} message RecommendRequest message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.IDocumentInfo} message DocumentInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecommendRequest.encodeDelimited = function encodeDelimited(message, writer) { + DocumentInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RecommendRequest message from the specified reader or buffer. + * Decodes a DocumentInfo message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest + * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1beta.RecommendRequest} RecommendRequest + * @returns {google.cloud.discoveryengine.v1beta.DocumentInfo} DocumentInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RecommendRequest.decode = function decode(reader, length) { + DocumentInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.RecommendRequest(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.DocumentInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.servingConfig = reader.string(); + message.id = reader.string(); break; } case 2: { - message.userEvent = $root.google.cloud.discoveryengine.v1beta.UserEvent.decode(reader, reader.uint32()); + message.name = reader.string(); break; } case 3: { - message.pageSize = reader.int32(); + message.quantity = reader.int32(); break; } case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.validateOnly = reader.bool(); - break; - } - case 6: { - if (message.params === $util.emptyObject) - message.params = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.params[key] = value; - break; - } - case 8: { - if (message.userLabels === $util.emptyObject) - message.userLabels = {}; - 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.userLabels[key] = value; + if (!(message.promotionIds && message.promotionIds.length)) + message.promotionIds = []; + message.promotionIds.push(reader.string()); break; } default: @@ -8833,522 +9271,9928 @@ }; /** - * Decodes a RecommendRequest message from the specified reader or buffer, length delimited. + * Decodes a DocumentInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest + * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1beta.RecommendRequest} RecommendRequest + * @returns {google.cloud.discoveryengine.v1beta.DocumentInfo} DocumentInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RecommendRequest.decodeDelimited = function decodeDelimited(reader) { + DocumentInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RecommendRequest message. + * Verifies a DocumentInfo message. * @function verify - * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest + * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RecommendRequest.verify = function verify(message) { + DocumentInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.servingConfig != null && message.hasOwnProperty("servingConfig")) - if (!$util.isString(message.servingConfig)) - return "servingConfig: string expected"; - if (message.userEvent != null && message.hasOwnProperty("userEvent")) { - var error = $root.google.cloud.discoveryengine.v1beta.UserEvent.verify(message.userEvent); - if (error) - return "userEvent." + error; + var properties = {}; + if (message.id != null && message.hasOwnProperty("id")) { + properties.documentDescriptor = 1; + if (!$util.isString(message.id)) + return "id: string expected"; } - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - if (message.params != null && message.hasOwnProperty("params")) { - if (!$util.isObject(message.params)) - return "params: object expected"; - var key = Object.keys(message.params); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.params[key[i]]); - if (error) - return "params." + error; - } + if (message.name != null && message.hasOwnProperty("name")) { + if (properties.documentDescriptor === 1) + return "documentDescriptor: multiple values"; + properties.documentDescriptor = 1; + if (!$util.isString(message.name)) + return "name: string expected"; } - if (message.userLabels != null && message.hasOwnProperty("userLabels")) { - if (!$util.isObject(message.userLabels)) - return "userLabels: object expected"; - var key = Object.keys(message.userLabels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.userLabels[key[i]])) - return "userLabels: string{k:string} expected"; + if (message.quantity != null && message.hasOwnProperty("quantity")) { + properties._quantity = 1; + if (!$util.isInteger(message.quantity)) + return "quantity: integer expected"; + } + if (message.promotionIds != null && message.hasOwnProperty("promotionIds")) { + if (!Array.isArray(message.promotionIds)) + return "promotionIds: array expected"; + for (var i = 0; i < message.promotionIds.length; ++i) + if (!$util.isString(message.promotionIds[i])) + return "promotionIds: string[] expected"; } return null; }; /** - * Creates a RecommendRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DocumentInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest + * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1beta.RecommendRequest} RecommendRequest + * @returns {google.cloud.discoveryengine.v1beta.DocumentInfo} DocumentInfo */ - RecommendRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1beta.RecommendRequest) + DocumentInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.DocumentInfo) return object; - var message = new $root.google.cloud.discoveryengine.v1beta.RecommendRequest(); - if (object.servingConfig != null) - message.servingConfig = String(object.servingConfig); - if (object.userEvent != null) { - if (typeof object.userEvent !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendRequest.userEvent: object expected"); - message.userEvent = $root.google.cloud.discoveryengine.v1beta.UserEvent.fromObject(object.userEvent); - } - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.filter != null) - message.filter = String(object.filter); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - if (object.params) { - if (typeof object.params !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendRequest.params: object expected"); - message.params = {}; - for (var keys = Object.keys(object.params), i = 0; i < keys.length; ++i) { - if (typeof object.params[keys[i]] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendRequest.params: object expected"); - message.params[keys[i]] = $root.google.protobuf.Value.fromObject(object.params[keys[i]]); - } - } - if (object.userLabels) { - if (typeof object.userLabels !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendRequest.userLabels: object expected"); - message.userLabels = {}; - for (var keys = Object.keys(object.userLabels), i = 0; i < keys.length; ++i) - message.userLabels[keys[i]] = String(object.userLabels[keys[i]]); + var message = new $root.google.cloud.discoveryengine.v1beta.DocumentInfo(); + if (object.id != null) + message.id = String(object.id); + if (object.name != null) + message.name = String(object.name); + if (object.quantity != null) + message.quantity = object.quantity | 0; + if (object.promotionIds) { + if (!Array.isArray(object.promotionIds)) + throw TypeError(".google.cloud.discoveryengine.v1beta.DocumentInfo.promotionIds: array expected"); + message.promotionIds = []; + for (var i = 0; i < object.promotionIds.length; ++i) + message.promotionIds[i] = String(object.promotionIds[i]); } return message; }; /** - * Creates a plain object from a RecommendRequest message. Also converts values to other types if specified. + * Creates a plain object from a DocumentInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest + * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo * @static - * @param {google.cloud.discoveryengine.v1beta.RecommendRequest} message RecommendRequest + * @param {google.cloud.discoveryengine.v1beta.DocumentInfo} message DocumentInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecommendRequest.toObject = function toObject(message, options) { + DocumentInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) { - object.params = {}; - object.userLabels = {}; + if (options.arrays || options.defaults) + object.promotionIds = []; + if (message.id != null && message.hasOwnProperty("id")) { + object.id = message.id; + if (options.oneofs) + object.documentDescriptor = "id"; } - if (options.defaults) { - object.servingConfig = ""; - object.userEvent = null; - object.pageSize = 0; - object.filter = ""; - object.validateOnly = false; + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object.documentDescriptor = "name"; } - if (message.servingConfig != null && message.hasOwnProperty("servingConfig")) - object.servingConfig = message.servingConfig; - if (message.userEvent != null && message.hasOwnProperty("userEvent")) - object.userEvent = $root.google.cloud.discoveryengine.v1beta.UserEvent.toObject(message.userEvent, options); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - var keys2; - if (message.params && (keys2 = Object.keys(message.params)).length) { - object.params = {}; - for (var j = 0; j < keys2.length; ++j) - object.params[keys2[j]] = $root.google.protobuf.Value.toObject(message.params[keys2[j]], options); + if (message.quantity != null && message.hasOwnProperty("quantity")) { + object.quantity = message.quantity; + if (options.oneofs) + object._quantity = "quantity"; } - if (message.userLabels && (keys2 = Object.keys(message.userLabels)).length) { - object.userLabels = {}; - for (var j = 0; j < keys2.length; ++j) - object.userLabels[keys2[j]] = message.userLabels[keys2[j]]; + if (message.promotionIds && message.promotionIds.length) { + object.promotionIds = []; + for (var j = 0; j < message.promotionIds.length; ++j) + object.promotionIds[j] = message.promotionIds[j]; } return object; }; - /** - * Converts this RecommendRequest to JSON. - * @function toJSON - * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest - * @instance - * @returns {Object.} JSON object - */ - RecommendRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this DocumentInfo to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo + * @instance + * @returns {Object.} JSON object + */ + DocumentInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DocumentInfo + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.DocumentInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DocumentInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.DocumentInfo"; + }; + + return DocumentInfo; + })(); + + v1beta.PanelInfo = (function() { + + /** + * Properties of a PanelInfo. + * @memberof google.cloud.discoveryengine.v1beta + * @interface IPanelInfo + * @property {string|null} [panelId] PanelInfo panelId + * @property {string|null} [displayName] PanelInfo displayName + * @property {number|null} [panelPosition] PanelInfo panelPosition + * @property {number|null} [totalPanels] PanelInfo totalPanels + */ + + /** + * Constructs a new PanelInfo. + * @memberof google.cloud.discoveryengine.v1beta + * @classdesc Represents a PanelInfo. + * @implements IPanelInfo + * @constructor + * @param {google.cloud.discoveryengine.v1beta.IPanelInfo=} [properties] Properties to set + */ + function PanelInfo(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]]; + } + + /** + * PanelInfo panelId. + * @member {string} panelId + * @memberof google.cloud.discoveryengine.v1beta.PanelInfo + * @instance + */ + PanelInfo.prototype.panelId = ""; + + /** + * PanelInfo displayName. + * @member {string} displayName + * @memberof google.cloud.discoveryengine.v1beta.PanelInfo + * @instance + */ + PanelInfo.prototype.displayName = ""; + + /** + * PanelInfo panelPosition. + * @member {number|null|undefined} panelPosition + * @memberof google.cloud.discoveryengine.v1beta.PanelInfo + * @instance + */ + PanelInfo.prototype.panelPosition = null; + + /** + * PanelInfo totalPanels. + * @member {number|null|undefined} totalPanels + * @memberof google.cloud.discoveryengine.v1beta.PanelInfo + * @instance + */ + PanelInfo.prototype.totalPanels = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PanelInfo _panelPosition. + * @member {"panelPosition"|undefined} _panelPosition + * @memberof google.cloud.discoveryengine.v1beta.PanelInfo + * @instance + */ + Object.defineProperty(PanelInfo.prototype, "_panelPosition", { + get: $util.oneOfGetter($oneOfFields = ["panelPosition"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * PanelInfo _totalPanels. + * @member {"totalPanels"|undefined} _totalPanels + * @memberof google.cloud.discoveryengine.v1beta.PanelInfo + * @instance + */ + Object.defineProperty(PanelInfo.prototype, "_totalPanels", { + get: $util.oneOfGetter($oneOfFields = ["totalPanels"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PanelInfo instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.PanelInfo + * @static + * @param {google.cloud.discoveryengine.v1beta.IPanelInfo=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.PanelInfo} PanelInfo instance + */ + PanelInfo.create = function create(properties) { + return new PanelInfo(properties); + }; + + /** + * Encodes the specified PanelInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PanelInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.PanelInfo + * @static + * @param {google.cloud.discoveryengine.v1beta.IPanelInfo} message PanelInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PanelInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.panelId != null && Object.hasOwnProperty.call(message, "panelId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.panelId); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.panelPosition != null && Object.hasOwnProperty.call(message, "panelPosition")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.panelPosition); + if (message.totalPanels != null && Object.hasOwnProperty.call(message, "totalPanels")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.totalPanels); + return writer; + }; + + /** + * Encodes the specified PanelInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PanelInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.PanelInfo + * @static + * @param {google.cloud.discoveryengine.v1beta.IPanelInfo} message PanelInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PanelInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PanelInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.PanelInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.PanelInfo} PanelInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PanelInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.PanelInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.panelId = reader.string(); + break; + } + case 3: { + message.displayName = reader.string(); + break; + } + case 4: { + message.panelPosition = reader.int32(); + break; + } + case 5: { + message.totalPanels = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PanelInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.PanelInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.PanelInfo} PanelInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PanelInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PanelInfo message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.PanelInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PanelInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.panelId != null && message.hasOwnProperty("panelId")) + if (!$util.isString(message.panelId)) + return "panelId: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.panelPosition != null && message.hasOwnProperty("panelPosition")) { + properties._panelPosition = 1; + if (!$util.isInteger(message.panelPosition)) + return "panelPosition: integer expected"; + } + if (message.totalPanels != null && message.hasOwnProperty("totalPanels")) { + properties._totalPanels = 1; + if (!$util.isInteger(message.totalPanels)) + return "totalPanels: integer expected"; + } + return null; + }; + + /** + * Creates a PanelInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.PanelInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.PanelInfo} PanelInfo + */ + PanelInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.PanelInfo) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.PanelInfo(); + if (object.panelId != null) + message.panelId = String(object.panelId); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.panelPosition != null) + message.panelPosition = object.panelPosition | 0; + if (object.totalPanels != null) + message.totalPanels = object.totalPanels | 0; + return message; + }; + + /** + * Creates a plain object from a PanelInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.PanelInfo + * @static + * @param {google.cloud.discoveryengine.v1beta.PanelInfo} message PanelInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PanelInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.panelId = ""; + object.displayName = ""; + } + if (message.panelId != null && message.hasOwnProperty("panelId")) + object.panelId = message.panelId; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.panelPosition != null && message.hasOwnProperty("panelPosition")) { + object.panelPosition = message.panelPosition; + if (options.oneofs) + object._panelPosition = "panelPosition"; + } + if (message.totalPanels != null && message.hasOwnProperty("totalPanels")) { + object.totalPanels = message.totalPanels; + if (options.oneofs) + object._totalPanels = "totalPanels"; + } + return object; + }; + + /** + * Converts this PanelInfo to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.PanelInfo + * @instance + * @returns {Object.} JSON object + */ + PanelInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PanelInfo + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.PanelInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PanelInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.PanelInfo"; + }; + + return PanelInfo; + })(); + + v1beta.MediaInfo = (function() { + + /** + * Properties of a MediaInfo. + * @memberof google.cloud.discoveryengine.v1beta + * @interface IMediaInfo + * @property {google.protobuf.IDuration|null} [mediaProgressDuration] MediaInfo mediaProgressDuration + * @property {number|null} [mediaProgressPercentage] MediaInfo mediaProgressPercentage + */ + + /** + * Constructs a new MediaInfo. + * @memberof google.cloud.discoveryengine.v1beta + * @classdesc Represents a MediaInfo. + * @implements IMediaInfo + * @constructor + * @param {google.cloud.discoveryengine.v1beta.IMediaInfo=} [properties] Properties to set + */ + function MediaInfo(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]]; + } + + /** + * MediaInfo mediaProgressDuration. + * @member {google.protobuf.IDuration|null|undefined} mediaProgressDuration + * @memberof google.cloud.discoveryengine.v1beta.MediaInfo + * @instance + */ + MediaInfo.prototype.mediaProgressDuration = null; + + /** + * MediaInfo mediaProgressPercentage. + * @member {number|null|undefined} mediaProgressPercentage + * @memberof google.cloud.discoveryengine.v1beta.MediaInfo + * @instance + */ + MediaInfo.prototype.mediaProgressPercentage = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MediaInfo _mediaProgressPercentage. + * @member {"mediaProgressPercentage"|undefined} _mediaProgressPercentage + * @memberof google.cloud.discoveryengine.v1beta.MediaInfo + * @instance + */ + Object.defineProperty(MediaInfo.prototype, "_mediaProgressPercentage", { + get: $util.oneOfGetter($oneOfFields = ["mediaProgressPercentage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MediaInfo instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.MediaInfo + * @static + * @param {google.cloud.discoveryengine.v1beta.IMediaInfo=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.MediaInfo} MediaInfo instance + */ + MediaInfo.create = function create(properties) { + return new MediaInfo(properties); + }; + + /** + * Encodes the specified MediaInfo message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.MediaInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.MediaInfo + * @static + * @param {google.cloud.discoveryengine.v1beta.IMediaInfo} message MediaInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MediaInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mediaProgressDuration != null && Object.hasOwnProperty.call(message, "mediaProgressDuration")) + $root.google.protobuf.Duration.encode(message.mediaProgressDuration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.mediaProgressPercentage != null && Object.hasOwnProperty.call(message, "mediaProgressPercentage")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.mediaProgressPercentage); + return writer; + }; + + /** + * Encodes the specified MediaInfo message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.MediaInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.MediaInfo + * @static + * @param {google.cloud.discoveryengine.v1beta.IMediaInfo} message MediaInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MediaInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MediaInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.MediaInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.MediaInfo} MediaInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MediaInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.MediaInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.mediaProgressDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.mediaProgressPercentage = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MediaInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.MediaInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.MediaInfo} MediaInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MediaInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MediaInfo message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.MediaInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MediaInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.mediaProgressDuration != null && message.hasOwnProperty("mediaProgressDuration")) { + var error = $root.google.protobuf.Duration.verify(message.mediaProgressDuration); + if (error) + return "mediaProgressDuration." + error; + } + if (message.mediaProgressPercentage != null && message.hasOwnProperty("mediaProgressPercentage")) { + properties._mediaProgressPercentage = 1; + if (typeof message.mediaProgressPercentage !== "number") + return "mediaProgressPercentage: number expected"; + } + return null; + }; + + /** + * Creates a MediaInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.MediaInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.MediaInfo} MediaInfo + */ + MediaInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.MediaInfo) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.MediaInfo(); + if (object.mediaProgressDuration != null) { + if (typeof object.mediaProgressDuration !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.MediaInfo.mediaProgressDuration: object expected"); + message.mediaProgressDuration = $root.google.protobuf.Duration.fromObject(object.mediaProgressDuration); + } + if (object.mediaProgressPercentage != null) + message.mediaProgressPercentage = Number(object.mediaProgressPercentage); + return message; + }; + + /** + * Creates a plain object from a MediaInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.MediaInfo + * @static + * @param {google.cloud.discoveryengine.v1beta.MediaInfo} message MediaInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MediaInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.mediaProgressDuration = null; + if (message.mediaProgressDuration != null && message.hasOwnProperty("mediaProgressDuration")) + object.mediaProgressDuration = $root.google.protobuf.Duration.toObject(message.mediaProgressDuration, options); + if (message.mediaProgressPercentage != null && message.hasOwnProperty("mediaProgressPercentage")) { + object.mediaProgressPercentage = options.json && !isFinite(message.mediaProgressPercentage) ? String(message.mediaProgressPercentage) : message.mediaProgressPercentage; + if (options.oneofs) + object._mediaProgressPercentage = "mediaProgressPercentage"; + } + return object; + }; + + /** + * Converts this MediaInfo to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.MediaInfo + * @instance + * @returns {Object.} JSON object + */ + MediaInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MediaInfo + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.MediaInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MediaInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.MediaInfo"; + }; + + return MediaInfo; + })(); + + v1beta.PurgeDocumentsRequest = (function() { + + /** + * Properties of a PurgeDocumentsRequest. + * @memberof google.cloud.discoveryengine.v1beta + * @interface IPurgeDocumentsRequest + * @property {string|null} [parent] PurgeDocumentsRequest parent + * @property {string|null} [filter] PurgeDocumentsRequest filter + * @property {boolean|null} [force] PurgeDocumentsRequest force + */ + + /** + * Constructs a new PurgeDocumentsRequest. + * @memberof google.cloud.discoveryengine.v1beta + * @classdesc Represents a PurgeDocumentsRequest. + * @implements IPurgeDocumentsRequest + * @constructor + * @param {google.cloud.discoveryengine.v1beta.IPurgeDocumentsRequest=} [properties] Properties to set + */ + function PurgeDocumentsRequest(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]]; + } + + /** + * PurgeDocumentsRequest parent. + * @member {string} parent + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest + * @instance + */ + PurgeDocumentsRequest.prototype.parent = ""; + + /** + * PurgeDocumentsRequest filter. + * @member {string} filter + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest + * @instance + */ + PurgeDocumentsRequest.prototype.filter = ""; + + /** + * PurgeDocumentsRequest force. + * @member {boolean} force + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest + * @instance + */ + PurgeDocumentsRequest.prototype.force = false; + + /** + * Creates a new PurgeDocumentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest + * @static + * @param {google.cloud.discoveryengine.v1beta.IPurgeDocumentsRequest=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest} PurgeDocumentsRequest instance + */ + PurgeDocumentsRequest.create = function create(properties) { + return new PurgeDocumentsRequest(properties); + }; + + /** + * Encodes the specified PurgeDocumentsRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest + * @static + * @param {google.cloud.discoveryengine.v1beta.IPurgeDocumentsRequest} message PurgeDocumentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PurgeDocumentsRequest.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.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); + return writer; + }; + + /** + * Encodes the specified PurgeDocumentsRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest + * @static + * @param {google.cloud.discoveryengine.v1beta.IPurgeDocumentsRequest} message PurgeDocumentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PurgeDocumentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PurgeDocumentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest} PurgeDocumentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PurgeDocumentsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.filter = reader.string(); + break; + } + case 3: { + message.force = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PurgeDocumentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest} PurgeDocumentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PurgeDocumentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PurgeDocumentsRequest message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PurgeDocumentsRequest.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.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + return null; + }; + + /** + * Creates a PurgeDocumentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest} PurgeDocumentsRequest + */ + PurgeDocumentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + if (object.force != null) + message.force = Boolean(object.force); + return message; + }; + + /** + * Creates a plain object from a PurgeDocumentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest + * @static + * @param {google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest} message PurgeDocumentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PurgeDocumentsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.force = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + return object; + }; + + /** + * Converts this PurgeDocumentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest + * @instance + * @returns {Object.} JSON object + */ + PurgeDocumentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PurgeDocumentsRequest + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PurgeDocumentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest"; + }; + + return PurgeDocumentsRequest; + })(); + + v1beta.PurgeDocumentsResponse = (function() { + + /** + * Properties of a PurgeDocumentsResponse. + * @memberof google.cloud.discoveryengine.v1beta + * @interface IPurgeDocumentsResponse + * @property {number|Long|null} [purgeCount] PurgeDocumentsResponse purgeCount + * @property {Array.|null} [purgeSample] PurgeDocumentsResponse purgeSample + */ + + /** + * Constructs a new PurgeDocumentsResponse. + * @memberof google.cloud.discoveryengine.v1beta + * @classdesc Represents a PurgeDocumentsResponse. + * @implements IPurgeDocumentsResponse + * @constructor + * @param {google.cloud.discoveryengine.v1beta.IPurgeDocumentsResponse=} [properties] Properties to set + */ + function PurgeDocumentsResponse(properties) { + this.purgeSample = []; + 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]]; + } + + /** + * PurgeDocumentsResponse purgeCount. + * @member {number|Long} purgeCount + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse + * @instance + */ + PurgeDocumentsResponse.prototype.purgeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * PurgeDocumentsResponse purgeSample. + * @member {Array.} purgeSample + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse + * @instance + */ + PurgeDocumentsResponse.prototype.purgeSample = $util.emptyArray; + + /** + * Creates a new PurgeDocumentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse + * @static + * @param {google.cloud.discoveryengine.v1beta.IPurgeDocumentsResponse=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse} PurgeDocumentsResponse instance + */ + PurgeDocumentsResponse.create = function create(properties) { + return new PurgeDocumentsResponse(properties); + }; + + /** + * Encodes the specified PurgeDocumentsResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse + * @static + * @param {google.cloud.discoveryengine.v1beta.IPurgeDocumentsResponse} message PurgeDocumentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PurgeDocumentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.purgeCount != null && Object.hasOwnProperty.call(message, "purgeCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.purgeCount); + if (message.purgeSample != null && message.purgeSample.length) + for (var i = 0; i < message.purgeSample.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.purgeSample[i]); + return writer; + }; + + /** + * Encodes the specified PurgeDocumentsResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse + * @static + * @param {google.cloud.discoveryengine.v1beta.IPurgeDocumentsResponse} message PurgeDocumentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PurgeDocumentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PurgeDocumentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse} PurgeDocumentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PurgeDocumentsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.purgeCount = reader.int64(); + break; + } + case 2: { + if (!(message.purgeSample && message.purgeSample.length)) + message.purgeSample = []; + message.purgeSample.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PurgeDocumentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse} PurgeDocumentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PurgeDocumentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PurgeDocumentsResponse message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PurgeDocumentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.purgeCount != null && message.hasOwnProperty("purgeCount")) + if (!$util.isInteger(message.purgeCount) && !(message.purgeCount && $util.isInteger(message.purgeCount.low) && $util.isInteger(message.purgeCount.high))) + return "purgeCount: integer|Long expected"; + if (message.purgeSample != null && message.hasOwnProperty("purgeSample")) { + if (!Array.isArray(message.purgeSample)) + return "purgeSample: array expected"; + for (var i = 0; i < message.purgeSample.length; ++i) + if (!$util.isString(message.purgeSample[i])) + return "purgeSample: string[] expected"; + } + return null; + }; + + /** + * Creates a PurgeDocumentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse} PurgeDocumentsResponse + */ + PurgeDocumentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse(); + if (object.purgeCount != null) + if ($util.Long) + (message.purgeCount = $util.Long.fromValue(object.purgeCount)).unsigned = false; + else if (typeof object.purgeCount === "string") + message.purgeCount = parseInt(object.purgeCount, 10); + else if (typeof object.purgeCount === "number") + message.purgeCount = object.purgeCount; + else if (typeof object.purgeCount === "object") + message.purgeCount = new $util.LongBits(object.purgeCount.low >>> 0, object.purgeCount.high >>> 0).toNumber(); + if (object.purgeSample) { + if (!Array.isArray(object.purgeSample)) + throw TypeError(".google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse.purgeSample: array expected"); + message.purgeSample = []; + for (var i = 0; i < object.purgeSample.length; ++i) + message.purgeSample[i] = String(object.purgeSample[i]); + } + return message; + }; + + /** + * Creates a plain object from a PurgeDocumentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse + * @static + * @param {google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse} message PurgeDocumentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PurgeDocumentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.purgeSample = []; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.purgeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.purgeCount = options.longs === String ? "0" : 0; + if (message.purgeCount != null && message.hasOwnProperty("purgeCount")) + if (typeof message.purgeCount === "number") + object.purgeCount = options.longs === String ? String(message.purgeCount) : message.purgeCount; + else + object.purgeCount = options.longs === String ? $util.Long.prototype.toString.call(message.purgeCount) : options.longs === Number ? new $util.LongBits(message.purgeCount.low >>> 0, message.purgeCount.high >>> 0).toNumber() : message.purgeCount; + if (message.purgeSample && message.purgeSample.length) { + object.purgeSample = []; + for (var j = 0; j < message.purgeSample.length; ++j) + object.purgeSample[j] = message.purgeSample[j]; + } + return object; + }; + + /** + * Converts this PurgeDocumentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse + * @instance + * @returns {Object.} JSON object + */ + PurgeDocumentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PurgeDocumentsResponse + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PurgeDocumentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse"; + }; + + return PurgeDocumentsResponse; + })(); + + v1beta.PurgeDocumentsMetadata = (function() { + + /** + * Properties of a PurgeDocumentsMetadata. + * @memberof google.cloud.discoveryengine.v1beta + * @interface IPurgeDocumentsMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] PurgeDocumentsMetadata createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] PurgeDocumentsMetadata updateTime + * @property {number|Long|null} [successCount] PurgeDocumentsMetadata successCount + * @property {number|Long|null} [failureCount] PurgeDocumentsMetadata failureCount + */ + + /** + * Constructs a new PurgeDocumentsMetadata. + * @memberof google.cloud.discoveryengine.v1beta + * @classdesc Represents a PurgeDocumentsMetadata. + * @implements IPurgeDocumentsMetadata + * @constructor + * @param {google.cloud.discoveryengine.v1beta.IPurgeDocumentsMetadata=} [properties] Properties to set + */ + function PurgeDocumentsMetadata(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]]; + } + + /** + * PurgeDocumentsMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata + * @instance + */ + PurgeDocumentsMetadata.prototype.createTime = null; + + /** + * PurgeDocumentsMetadata updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata + * @instance + */ + PurgeDocumentsMetadata.prototype.updateTime = null; + + /** + * PurgeDocumentsMetadata successCount. + * @member {number|Long} successCount + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata + * @instance + */ + PurgeDocumentsMetadata.prototype.successCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * PurgeDocumentsMetadata failureCount. + * @member {number|Long} failureCount + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata + * @instance + */ + PurgeDocumentsMetadata.prototype.failureCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new PurgeDocumentsMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata + * @static + * @param {google.cloud.discoveryengine.v1beta.IPurgeDocumentsMetadata=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata} PurgeDocumentsMetadata instance + */ + PurgeDocumentsMetadata.create = function create(properties) { + return new PurgeDocumentsMetadata(properties); + }; + + /** + * Encodes the specified PurgeDocumentsMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata + * @static + * @param {google.cloud.discoveryengine.v1beta.IPurgeDocumentsMetadata} message PurgeDocumentsMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PurgeDocumentsMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.successCount != null && Object.hasOwnProperty.call(message, "successCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.successCount); + if (message.failureCount != null && Object.hasOwnProperty.call(message, "failureCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.failureCount); + return writer; + }; + + /** + * Encodes the specified PurgeDocumentsMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata + * @static + * @param {google.cloud.discoveryengine.v1beta.IPurgeDocumentsMetadata} message PurgeDocumentsMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PurgeDocumentsMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PurgeDocumentsMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata} PurgeDocumentsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PurgeDocumentsMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.successCount = reader.int64(); + break; + } + case 4: { + message.failureCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PurgeDocumentsMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata} PurgeDocumentsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PurgeDocumentsMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PurgeDocumentsMetadata message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PurgeDocumentsMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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.successCount != null && message.hasOwnProperty("successCount")) + if (!$util.isInteger(message.successCount) && !(message.successCount && $util.isInteger(message.successCount.low) && $util.isInteger(message.successCount.high))) + return "successCount: integer|Long expected"; + if (message.failureCount != null && message.hasOwnProperty("failureCount")) + if (!$util.isInteger(message.failureCount) && !(message.failureCount && $util.isInteger(message.failureCount.low) && $util.isInteger(message.failureCount.high))) + return "failureCount: integer|Long expected"; + return null; + }; + + /** + * Creates a PurgeDocumentsMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata} PurgeDocumentsMetadata + */ + PurgeDocumentsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata.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.discoveryengine.v1beta.PurgeDocumentsMetadata.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.successCount != null) + if ($util.Long) + (message.successCount = $util.Long.fromValue(object.successCount)).unsigned = false; + else if (typeof object.successCount === "string") + message.successCount = parseInt(object.successCount, 10); + else if (typeof object.successCount === "number") + message.successCount = object.successCount; + else if (typeof object.successCount === "object") + message.successCount = new $util.LongBits(object.successCount.low >>> 0, object.successCount.high >>> 0).toNumber(); + if (object.failureCount != null) + if ($util.Long) + (message.failureCount = $util.Long.fromValue(object.failureCount)).unsigned = false; + else if (typeof object.failureCount === "string") + message.failureCount = parseInt(object.failureCount, 10); + else if (typeof object.failureCount === "number") + message.failureCount = object.failureCount; + else if (typeof object.failureCount === "object") + message.failureCount = new $util.LongBits(object.failureCount.low >>> 0, object.failureCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a PurgeDocumentsMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata + * @static + * @param {google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata} message PurgeDocumentsMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PurgeDocumentsMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.updateTime = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.successCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.successCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.failureCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.failureCount = options.longs === String ? "0" : 0; + } + 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.successCount != null && message.hasOwnProperty("successCount")) + if (typeof message.successCount === "number") + object.successCount = options.longs === String ? String(message.successCount) : message.successCount; + else + object.successCount = options.longs === String ? $util.Long.prototype.toString.call(message.successCount) : options.longs === Number ? new $util.LongBits(message.successCount.low >>> 0, message.successCount.high >>> 0).toNumber() : message.successCount; + if (message.failureCount != null && message.hasOwnProperty("failureCount")) + if (typeof message.failureCount === "number") + object.failureCount = options.longs === String ? String(message.failureCount) : message.failureCount; + else + object.failureCount = options.longs === String ? $util.Long.prototype.toString.call(message.failureCount) : options.longs === Number ? new $util.LongBits(message.failureCount.low >>> 0, message.failureCount.high >>> 0).toNumber() : message.failureCount; + return object; + }; + + /** + * Converts this PurgeDocumentsMetadata to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata + * @instance + * @returns {Object.} JSON object + */ + PurgeDocumentsMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PurgeDocumentsMetadata + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PurgeDocumentsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata"; + }; + + return PurgeDocumentsMetadata; + })(); + + v1beta.RecommendationService = (function() { + + /** + * Constructs a new RecommendationService service. + * @memberof google.cloud.discoveryengine.v1beta + * @classdesc Represents a RecommendationService + * @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 RecommendationService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (RecommendationService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = RecommendationService; + + /** + * Creates new RecommendationService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.RecommendationService + * @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 {RecommendationService} RPC service. Useful where requests and/or responses are streamed. + */ + RecommendationService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.discoveryengine.v1beta.RecommendationService|recommend}. + * @memberof google.cloud.discoveryengine.v1beta.RecommendationService + * @typedef RecommendCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.discoveryengine.v1beta.RecommendResponse} [response] RecommendResponse + */ + + /** + * Calls Recommend. + * @function recommend + * @memberof google.cloud.discoveryengine.v1beta.RecommendationService + * @instance + * @param {google.cloud.discoveryengine.v1beta.IRecommendRequest} request RecommendRequest message or plain object + * @param {google.cloud.discoveryengine.v1beta.RecommendationService.RecommendCallback} callback Node-style callback called with the error, if any, and RecommendResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(RecommendationService.prototype.recommend = function recommend(request, callback) { + return this.rpcCall(recommend, $root.google.cloud.discoveryengine.v1beta.RecommendRequest, $root.google.cloud.discoveryengine.v1beta.RecommendResponse, request, callback); + }, "name", { value: "Recommend" }); + + /** + * Calls Recommend. + * @function recommend + * @memberof google.cloud.discoveryengine.v1beta.RecommendationService + * @instance + * @param {google.cloud.discoveryengine.v1beta.IRecommendRequest} request RecommendRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return RecommendationService; + })(); + + v1beta.RecommendRequest = (function() { + + /** + * Properties of a RecommendRequest. + * @memberof google.cloud.discoveryengine.v1beta + * @interface IRecommendRequest + * @property {string|null} [servingConfig] RecommendRequest servingConfig + * @property {google.cloud.discoveryengine.v1beta.IUserEvent|null} [userEvent] RecommendRequest userEvent + * @property {number|null} [pageSize] RecommendRequest pageSize + * @property {string|null} [filter] RecommendRequest filter + * @property {boolean|null} [validateOnly] RecommendRequest validateOnly + * @property {Object.|null} [params] RecommendRequest params + * @property {Object.|null} [userLabels] RecommendRequest userLabels + */ + + /** + * Constructs a new RecommendRequest. + * @memberof google.cloud.discoveryengine.v1beta + * @classdesc Represents a RecommendRequest. + * @implements IRecommendRequest + * @constructor + * @param {google.cloud.discoveryengine.v1beta.IRecommendRequest=} [properties] Properties to set + */ + function RecommendRequest(properties) { + this.params = {}; + this.userLabels = {}; + 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]]; + } + + /** + * RecommendRequest servingConfig. + * @member {string} servingConfig + * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest + * @instance + */ + RecommendRequest.prototype.servingConfig = ""; + + /** + * RecommendRequest userEvent. + * @member {google.cloud.discoveryengine.v1beta.IUserEvent|null|undefined} userEvent + * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest + * @instance + */ + RecommendRequest.prototype.userEvent = null; + + /** + * RecommendRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest + * @instance + */ + RecommendRequest.prototype.pageSize = 0; + + /** + * RecommendRequest filter. + * @member {string} filter + * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest + * @instance + */ + RecommendRequest.prototype.filter = ""; + + /** + * RecommendRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest + * @instance + */ + RecommendRequest.prototype.validateOnly = false; + + /** + * RecommendRequest params. + * @member {Object.} params + * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest + * @instance + */ + RecommendRequest.prototype.params = $util.emptyObject; + + /** + * RecommendRequest userLabels. + * @member {Object.} userLabels + * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest + * @instance + */ + RecommendRequest.prototype.userLabels = $util.emptyObject; + + /** + * Creates a new RecommendRequest instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest + * @static + * @param {google.cloud.discoveryengine.v1beta.IRecommendRequest=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.RecommendRequest} RecommendRequest instance + */ + RecommendRequest.create = function create(properties) { + return new RecommendRequest(properties); + }; + + /** + * Encodes the specified RecommendRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest + * @static + * @param {google.cloud.discoveryengine.v1beta.IRecommendRequest} message RecommendRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecommendRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.servingConfig != null && Object.hasOwnProperty.call(message, "servingConfig")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.servingConfig); + if (message.userEvent != null && Object.hasOwnProperty.call(message, "userEvent")) + $root.google.cloud.discoveryengine.v1beta.UserEvent.encode(message.userEvent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); + if (message.params != null && Object.hasOwnProperty.call(message, "params")) + for (var keys = Object.keys(message.params), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.params[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.userLabels != null && Object.hasOwnProperty.call(message, "userLabels")) + for (var keys = Object.keys(message.userLabels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.userLabels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified RecommendRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest + * @static + * @param {google.cloud.discoveryengine.v1beta.IRecommendRequest} message RecommendRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecommendRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RecommendRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.RecommendRequest} RecommendRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecommendRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.RecommendRequest(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.servingConfig = reader.string(); + break; + } + case 2: { + message.userEvent = $root.google.cloud.discoveryengine.v1beta.UserEvent.decode(reader, reader.uint32()); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.validateOnly = reader.bool(); + break; + } + case 6: { + if (message.params === $util.emptyObject) + message.params = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.params[key] = value; + break; + } + case 8: { + if (message.userLabels === $util.emptyObject) + message.userLabels = {}; + 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.userLabels[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RecommendRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.RecommendRequest} RecommendRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecommendRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RecommendRequest message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RecommendRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.servingConfig != null && message.hasOwnProperty("servingConfig")) + if (!$util.isString(message.servingConfig)) + return "servingConfig: string expected"; + if (message.userEvent != null && message.hasOwnProperty("userEvent")) { + var error = $root.google.cloud.discoveryengine.v1beta.UserEvent.verify(message.userEvent); + if (error) + return "userEvent." + error; + } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + if (message.params != null && message.hasOwnProperty("params")) { + if (!$util.isObject(message.params)) + return "params: object expected"; + var key = Object.keys(message.params); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.params[key[i]]); + if (error) + return "params." + error; + } + } + if (message.userLabels != null && message.hasOwnProperty("userLabels")) { + if (!$util.isObject(message.userLabels)) + return "userLabels: object expected"; + var key = Object.keys(message.userLabels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.userLabels[key[i]])) + return "userLabels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a RecommendRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.RecommendRequest} RecommendRequest + */ + RecommendRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.RecommendRequest) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.RecommendRequest(); + if (object.servingConfig != null) + message.servingConfig = String(object.servingConfig); + if (object.userEvent != null) { + if (typeof object.userEvent !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendRequest.userEvent: object expected"); + message.userEvent = $root.google.cloud.discoveryengine.v1beta.UserEvent.fromObject(object.userEvent); + } + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.filter != null) + message.filter = String(object.filter); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + if (object.params) { + if (typeof object.params !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendRequest.params: object expected"); + message.params = {}; + for (var keys = Object.keys(object.params), i = 0; i < keys.length; ++i) { + if (typeof object.params[keys[i]] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendRequest.params: object expected"); + message.params[keys[i]] = $root.google.protobuf.Value.fromObject(object.params[keys[i]]); + } + } + if (object.userLabels) { + if (typeof object.userLabels !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendRequest.userLabels: object expected"); + message.userLabels = {}; + for (var keys = Object.keys(object.userLabels), i = 0; i < keys.length; ++i) + message.userLabels[keys[i]] = String(object.userLabels[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a RecommendRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest + * @static + * @param {google.cloud.discoveryengine.v1beta.RecommendRequest} message RecommendRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecommendRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) { + object.params = {}; + object.userLabels = {}; + } + if (options.defaults) { + object.servingConfig = ""; + object.userEvent = null; + object.pageSize = 0; + object.filter = ""; + object.validateOnly = false; + } + if (message.servingConfig != null && message.hasOwnProperty("servingConfig")) + object.servingConfig = message.servingConfig; + if (message.userEvent != null && message.hasOwnProperty("userEvent")) + object.userEvent = $root.google.cloud.discoveryengine.v1beta.UserEvent.toObject(message.userEvent, options); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + var keys2; + if (message.params && (keys2 = Object.keys(message.params)).length) { + object.params = {}; + for (var j = 0; j < keys2.length; ++j) + object.params[keys2[j]] = $root.google.protobuf.Value.toObject(message.params[keys2[j]], options); + } + if (message.userLabels && (keys2 = Object.keys(message.userLabels)).length) { + object.userLabels = {}; + for (var j = 0; j < keys2.length; ++j) + object.userLabels[keys2[j]] = message.userLabels[keys2[j]]; + } + return object; + }; + + /** + * Converts this RecommendRequest to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest + * @instance + * @returns {Object.} JSON object + */ + RecommendRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RecommendRequest + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RecommendRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.RecommendRequest"; + }; + + return RecommendRequest; + })(); + + v1beta.RecommendResponse = (function() { + + /** + * Properties of a RecommendResponse. + * @memberof google.cloud.discoveryengine.v1beta + * @interface IRecommendResponse + * @property {Array.|null} [results] RecommendResponse results + * @property {string|null} [attributionToken] RecommendResponse attributionToken + * @property {Array.|null} [missingIds] RecommendResponse missingIds + * @property {boolean|null} [validateOnly] RecommendResponse validateOnly + */ + + /** + * Constructs a new RecommendResponse. + * @memberof google.cloud.discoveryengine.v1beta + * @classdesc Represents a RecommendResponse. + * @implements IRecommendResponse + * @constructor + * @param {google.cloud.discoveryengine.v1beta.IRecommendResponse=} [properties] Properties to set + */ + function RecommendResponse(properties) { + this.results = []; + this.missingIds = []; + 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]]; + } + + /** + * RecommendResponse results. + * @member {Array.} results + * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse + * @instance + */ + RecommendResponse.prototype.results = $util.emptyArray; + + /** + * RecommendResponse attributionToken. + * @member {string} attributionToken + * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse + * @instance + */ + RecommendResponse.prototype.attributionToken = ""; + + /** + * RecommendResponse missingIds. + * @member {Array.} missingIds + * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse + * @instance + */ + RecommendResponse.prototype.missingIds = $util.emptyArray; + + /** + * RecommendResponse validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse + * @instance + */ + RecommendResponse.prototype.validateOnly = false; + + /** + * Creates a new RecommendResponse instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse + * @static + * @param {google.cloud.discoveryengine.v1beta.IRecommendResponse=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.RecommendResponse} RecommendResponse instance + */ + RecommendResponse.create = function create(properties) { + return new RecommendResponse(properties); + }; + + /** + * Encodes the specified RecommendResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse + * @static + * @param {google.cloud.discoveryengine.v1beta.IRecommendResponse} message RecommendResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecommendResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.results != null && message.results.length) + for (var i = 0; i < message.results.length; ++i) + $root.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.encode(message.results[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.attributionToken != null && Object.hasOwnProperty.call(message, "attributionToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.attributionToken); + if (message.missingIds != null && message.missingIds.length) + for (var i = 0; i < message.missingIds.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.missingIds[i]); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified RecommendResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse + * @static + * @param {google.cloud.discoveryengine.v1beta.IRecommendResponse} message RecommendResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecommendResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RecommendResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.RecommendResponse} RecommendResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecommendResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.RecommendResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.results && message.results.length)) + message.results = []; + message.results.push($root.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.decode(reader, reader.uint32())); + break; + } + case 2: { + message.attributionToken = reader.string(); + break; + } + case 3: { + if (!(message.missingIds && message.missingIds.length)) + message.missingIds = []; + message.missingIds.push(reader.string()); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RecommendResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.RecommendResponse} RecommendResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecommendResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RecommendResponse message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RecommendResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.results != null && message.hasOwnProperty("results")) { + if (!Array.isArray(message.results)) + return "results: array expected"; + for (var i = 0; i < message.results.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.verify(message.results[i]); + if (error) + return "results." + error; + } + } + if (message.attributionToken != null && message.hasOwnProperty("attributionToken")) + if (!$util.isString(message.attributionToken)) + return "attributionToken: string expected"; + if (message.missingIds != null && message.hasOwnProperty("missingIds")) { + if (!Array.isArray(message.missingIds)) + return "missingIds: array expected"; + for (var i = 0; i < message.missingIds.length; ++i) + if (!$util.isString(message.missingIds[i])) + return "missingIds: string[] expected"; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a RecommendResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.RecommendResponse} RecommendResponse + */ + RecommendResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.RecommendResponse) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.RecommendResponse(); + if (object.results) { + if (!Array.isArray(object.results)) + throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendResponse.results: array expected"); + message.results = []; + for (var i = 0; i < object.results.length; ++i) { + if (typeof object.results[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendResponse.results: object expected"); + message.results[i] = $root.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.fromObject(object.results[i]); + } + } + if (object.attributionToken != null) + message.attributionToken = String(object.attributionToken); + if (object.missingIds) { + if (!Array.isArray(object.missingIds)) + throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendResponse.missingIds: array expected"); + message.missingIds = []; + for (var i = 0; i < object.missingIds.length; ++i) + message.missingIds[i] = String(object.missingIds[i]); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a RecommendResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse + * @static + * @param {google.cloud.discoveryengine.v1beta.RecommendResponse} message RecommendResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecommendResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.results = []; + object.missingIds = []; + } + if (options.defaults) { + object.attributionToken = ""; + object.validateOnly = false; + } + if (message.results && message.results.length) { + object.results = []; + for (var j = 0; j < message.results.length; ++j) + object.results[j] = $root.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.toObject(message.results[j], options); + } + if (message.attributionToken != null && message.hasOwnProperty("attributionToken")) + object.attributionToken = message.attributionToken; + if (message.missingIds && message.missingIds.length) { + object.missingIds = []; + for (var j = 0; j < message.missingIds.length; ++j) + object.missingIds[j] = message.missingIds[j]; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this RecommendResponse to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse + * @instance + * @returns {Object.} JSON object + */ + RecommendResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RecommendResponse + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RecommendResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.RecommendResponse"; + }; + + RecommendResponse.RecommendationResult = (function() { + + /** + * Properties of a RecommendationResult. + * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse + * @interface IRecommendationResult + * @property {string|null} [id] RecommendationResult id + * @property {google.cloud.discoveryengine.v1beta.IDocument|null} [document] RecommendationResult document + * @property {Object.|null} [metadata] RecommendationResult metadata + */ + + /** + * Constructs a new RecommendationResult. + * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse + * @classdesc Represents a RecommendationResult. + * @implements IRecommendationResult + * @constructor + * @param {google.cloud.discoveryengine.v1beta.RecommendResponse.IRecommendationResult=} [properties] Properties to set + */ + function RecommendationResult(properties) { + this.metadata = {}; + 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]]; + } + + /** + * RecommendationResult id. + * @member {string} id + * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult + * @instance + */ + RecommendationResult.prototype.id = ""; + + /** + * RecommendationResult document. + * @member {google.cloud.discoveryengine.v1beta.IDocument|null|undefined} document + * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult + * @instance + */ + RecommendationResult.prototype.document = null; + + /** + * RecommendationResult metadata. + * @member {Object.} metadata + * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult + * @instance + */ + RecommendationResult.prototype.metadata = $util.emptyObject; + + /** + * Creates a new RecommendationResult instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult + * @static + * @param {google.cloud.discoveryengine.v1beta.RecommendResponse.IRecommendationResult=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult} RecommendationResult instance + */ + RecommendationResult.create = function create(properties) { + return new RecommendationResult(properties); + }; + + /** + * Encodes the specified RecommendationResult message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult + * @static + * @param {google.cloud.discoveryengine.v1beta.RecommendResponse.IRecommendationResult} message RecommendationResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecommendationResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.document != null && Object.hasOwnProperty.call(message, "document")) + $root.google.cloud.discoveryengine.v1beta.Document.encode(message.document, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.metadata[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified RecommendationResult message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult + * @static + * @param {google.cloud.discoveryengine.v1beta.RecommendResponse.IRecommendationResult} message RecommendationResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecommendationResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RecommendationResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult} RecommendationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecommendationResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.document = $root.google.cloud.discoveryengine.v1beta.Document.decode(reader, reader.uint32()); + break; + } + case 3: { + if (message.metadata === $util.emptyObject) + message.metadata = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.metadata[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RecommendationResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult} RecommendationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecommendationResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RecommendationResult message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RecommendationResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.document != null && message.hasOwnProperty("document")) { + var error = $root.google.cloud.discoveryengine.v1beta.Document.verify(message.document); + if (error) + return "document." + error; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (!$util.isObject(message.metadata)) + return "metadata: object expected"; + var key = Object.keys(message.metadata); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.metadata[key[i]]); + if (error) + return "metadata." + error; + } + } + return null; + }; + + /** + * Creates a RecommendationResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult} RecommendationResult + */ + RecommendationResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult(); + if (object.id != null) + message.id = String(object.id); + if (object.document != null) { + if (typeof object.document !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.document: object expected"); + message.document = $root.google.cloud.discoveryengine.v1beta.Document.fromObject(object.document); + } + if (object.metadata) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.metadata: object expected"); + message.metadata = {}; + for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) { + if (typeof object.metadata[keys[i]] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.metadata: object expected"); + message.metadata[keys[i]] = $root.google.protobuf.Value.fromObject(object.metadata[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a RecommendationResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult + * @static + * @param {google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult} message RecommendationResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecommendationResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.metadata = {}; + if (options.defaults) { + object.id = ""; + object.document = null; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.document != null && message.hasOwnProperty("document")) + object.document = $root.google.cloud.discoveryengine.v1beta.Document.toObject(message.document, options); + var keys2; + if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { + object.metadata = {}; + for (var j = 0; j < keys2.length; ++j) + object.metadata[keys2[j]] = $root.google.protobuf.Value.toObject(message.metadata[keys2[j]], options); + } + return object; + }; + + /** + * Converts this RecommendationResult to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult + * @instance + * @returns {Object.} JSON object + */ + RecommendationResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RecommendationResult + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RecommendationResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult"; + }; + + return RecommendationResult; + })(); + + return RecommendResponse; + })(); + + v1beta.Schema = (function() { + + /** + * Properties of a Schema. + * @memberof google.cloud.discoveryengine.v1beta + * @interface ISchema + * @property {google.protobuf.IStruct|null} [structSchema] Schema structSchema + * @property {string|null} [jsonSchema] Schema jsonSchema + * @property {string|null} [name] Schema name + */ + + /** + * Constructs a new Schema. + * @memberof google.cloud.discoveryengine.v1beta + * @classdesc Represents a Schema. + * @implements ISchema + * @constructor + * @param {google.cloud.discoveryengine.v1beta.ISchema=} [properties] Properties to set + */ + function Schema(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]]; + } + + /** + * Schema structSchema. + * @member {google.protobuf.IStruct|null|undefined} structSchema + * @memberof google.cloud.discoveryengine.v1beta.Schema + * @instance + */ + Schema.prototype.structSchema = null; + + /** + * Schema jsonSchema. + * @member {string|null|undefined} jsonSchema + * @memberof google.cloud.discoveryengine.v1beta.Schema + * @instance + */ + Schema.prototype.jsonSchema = null; + + /** + * Schema name. + * @member {string} name + * @memberof google.cloud.discoveryengine.v1beta.Schema + * @instance + */ + Schema.prototype.name = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Schema schema. + * @member {"structSchema"|"jsonSchema"|undefined} schema + * @memberof google.cloud.discoveryengine.v1beta.Schema + * @instance + */ + Object.defineProperty(Schema.prototype, "schema", { + get: $util.oneOfGetter($oneOfFields = ["structSchema", "jsonSchema"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Schema instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.Schema + * @static + * @param {google.cloud.discoveryengine.v1beta.ISchema=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.Schema} Schema instance + */ + Schema.create = function create(properties) { + return new Schema(properties); + }; + + /** + * Encodes the specified Schema message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.Schema.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.Schema + * @static + * @param {google.cloud.discoveryengine.v1beta.ISchema} message Schema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Schema.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.structSchema != null && Object.hasOwnProperty.call(message, "structSchema")) + $root.google.protobuf.Struct.encode(message.structSchema, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.jsonSchema != null && Object.hasOwnProperty.call(message, "jsonSchema")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.jsonSchema); + return writer; + }; + + /** + * Encodes the specified Schema message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.Schema.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.Schema + * @static + * @param {google.cloud.discoveryengine.v1beta.ISchema} message Schema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Schema.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Schema message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.Schema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.Schema} Schema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Schema.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.Schema(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.structSchema = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 3: { + message.jsonSchema = reader.string(); + break; + } + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Schema message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.Schema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.Schema} Schema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Schema.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Schema message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.Schema + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Schema.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.structSchema != null && message.hasOwnProperty("structSchema")) { + properties.schema = 1; + { + var error = $root.google.protobuf.Struct.verify(message.structSchema); + if (error) + return "structSchema." + error; + } + } + if (message.jsonSchema != null && message.hasOwnProperty("jsonSchema")) { + if (properties.schema === 1) + return "schema: multiple values"; + properties.schema = 1; + if (!$util.isString(message.jsonSchema)) + return "jsonSchema: string expected"; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a Schema message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.Schema + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.Schema} Schema + */ + Schema.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.Schema) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.Schema(); + if (object.structSchema != null) { + if (typeof object.structSchema !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.Schema.structSchema: object expected"); + message.structSchema = $root.google.protobuf.Struct.fromObject(object.structSchema); + } + if (object.jsonSchema != null) + message.jsonSchema = String(object.jsonSchema); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a Schema message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.Schema + * @static + * @param {google.cloud.discoveryengine.v1beta.Schema} message Schema + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Schema.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; + if (message.structSchema != null && message.hasOwnProperty("structSchema")) { + object.structSchema = $root.google.protobuf.Struct.toObject(message.structSchema, options); + if (options.oneofs) + object.schema = "structSchema"; + } + if (message.jsonSchema != null && message.hasOwnProperty("jsonSchema")) { + object.jsonSchema = message.jsonSchema; + if (options.oneofs) + object.schema = "jsonSchema"; + } + return object; + }; + + /** + * Converts this Schema to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.Schema + * @instance + * @returns {Object.} JSON object + */ + Schema.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Schema + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.Schema + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Schema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.Schema"; + }; + + return Schema; + })(); + + v1beta.SchemaService = (function() { + + /** + * Constructs a new SchemaService service. + * @memberof google.cloud.discoveryengine.v1beta + * @classdesc Represents a SchemaService + * @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 SchemaService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (SchemaService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SchemaService; + + /** + * Creates new SchemaService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.SchemaService + * @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 {SchemaService} RPC service. Useful where requests and/or responses are streamed. + */ + SchemaService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.discoveryengine.v1beta.SchemaService|getSchema}. + * @memberof google.cloud.discoveryengine.v1beta.SchemaService + * @typedef GetSchemaCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.discoveryengine.v1beta.Schema} [response] Schema + */ + + /** + * Calls GetSchema. + * @function getSchema + * @memberof google.cloud.discoveryengine.v1beta.SchemaService + * @instance + * @param {google.cloud.discoveryengine.v1beta.IGetSchemaRequest} request GetSchemaRequest message or plain object + * @param {google.cloud.discoveryengine.v1beta.SchemaService.GetSchemaCallback} callback Node-style callback called with the error, if any, and Schema + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SchemaService.prototype.getSchema = function getSchema(request, callback) { + return this.rpcCall(getSchema, $root.google.cloud.discoveryengine.v1beta.GetSchemaRequest, $root.google.cloud.discoveryengine.v1beta.Schema, request, callback); + }, "name", { value: "GetSchema" }); + + /** + * Calls GetSchema. + * @function getSchema + * @memberof google.cloud.discoveryengine.v1beta.SchemaService + * @instance + * @param {google.cloud.discoveryengine.v1beta.IGetSchemaRequest} request GetSchemaRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.discoveryengine.v1beta.SchemaService|listSchemas}. + * @memberof google.cloud.discoveryengine.v1beta.SchemaService + * @typedef ListSchemasCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.discoveryengine.v1beta.ListSchemasResponse} [response] ListSchemasResponse + */ + + /** + * Calls ListSchemas. + * @function listSchemas + * @memberof google.cloud.discoveryengine.v1beta.SchemaService + * @instance + * @param {google.cloud.discoveryengine.v1beta.IListSchemasRequest} request ListSchemasRequest message or plain object + * @param {google.cloud.discoveryengine.v1beta.SchemaService.ListSchemasCallback} callback Node-style callback called with the error, if any, and ListSchemasResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SchemaService.prototype.listSchemas = function listSchemas(request, callback) { + return this.rpcCall(listSchemas, $root.google.cloud.discoveryengine.v1beta.ListSchemasRequest, $root.google.cloud.discoveryengine.v1beta.ListSchemasResponse, request, callback); + }, "name", { value: "ListSchemas" }); + + /** + * Calls ListSchemas. + * @function listSchemas + * @memberof google.cloud.discoveryengine.v1beta.SchemaService + * @instance + * @param {google.cloud.discoveryengine.v1beta.IListSchemasRequest} request ListSchemasRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.discoveryengine.v1beta.SchemaService|createSchema}. + * @memberof google.cloud.discoveryengine.v1beta.SchemaService + * @typedef CreateSchemaCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateSchema. + * @function createSchema + * @memberof google.cloud.discoveryengine.v1beta.SchemaService + * @instance + * @param {google.cloud.discoveryengine.v1beta.ICreateSchemaRequest} request CreateSchemaRequest message or plain object + * @param {google.cloud.discoveryengine.v1beta.SchemaService.CreateSchemaCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SchemaService.prototype.createSchema = function createSchema(request, callback) { + return this.rpcCall(createSchema, $root.google.cloud.discoveryengine.v1beta.CreateSchemaRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateSchema" }); + + /** + * Calls CreateSchema. + * @function createSchema + * @memberof google.cloud.discoveryengine.v1beta.SchemaService + * @instance + * @param {google.cloud.discoveryengine.v1beta.ICreateSchemaRequest} request CreateSchemaRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.discoveryengine.v1beta.SchemaService|updateSchema}. + * @memberof google.cloud.discoveryengine.v1beta.SchemaService + * @typedef UpdateSchemaCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateSchema. + * @function updateSchema + * @memberof google.cloud.discoveryengine.v1beta.SchemaService + * @instance + * @param {google.cloud.discoveryengine.v1beta.IUpdateSchemaRequest} request UpdateSchemaRequest message or plain object + * @param {google.cloud.discoveryengine.v1beta.SchemaService.UpdateSchemaCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SchemaService.prototype.updateSchema = function updateSchema(request, callback) { + return this.rpcCall(updateSchema, $root.google.cloud.discoveryengine.v1beta.UpdateSchemaRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateSchema" }); + + /** + * Calls UpdateSchema. + * @function updateSchema + * @memberof google.cloud.discoveryengine.v1beta.SchemaService + * @instance + * @param {google.cloud.discoveryengine.v1beta.IUpdateSchemaRequest} request UpdateSchemaRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.discoveryengine.v1beta.SchemaService|deleteSchema}. + * @memberof google.cloud.discoveryengine.v1beta.SchemaService + * @typedef DeleteSchemaCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteSchema. + * @function deleteSchema + * @memberof google.cloud.discoveryengine.v1beta.SchemaService + * @instance + * @param {google.cloud.discoveryengine.v1beta.IDeleteSchemaRequest} request DeleteSchemaRequest message or plain object + * @param {google.cloud.discoveryengine.v1beta.SchemaService.DeleteSchemaCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SchemaService.prototype.deleteSchema = function deleteSchema(request, callback) { + return this.rpcCall(deleteSchema, $root.google.cloud.discoveryengine.v1beta.DeleteSchemaRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteSchema" }); + + /** + * Calls DeleteSchema. + * @function deleteSchema + * @memberof google.cloud.discoveryengine.v1beta.SchemaService + * @instance + * @param {google.cloud.discoveryengine.v1beta.IDeleteSchemaRequest} request DeleteSchemaRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return SchemaService; + })(); + + v1beta.GetSchemaRequest = (function() { + + /** + * Properties of a GetSchemaRequest. + * @memberof google.cloud.discoveryengine.v1beta + * @interface IGetSchemaRequest + * @property {string|null} [name] GetSchemaRequest name + */ + + /** + * Constructs a new GetSchemaRequest. + * @memberof google.cloud.discoveryengine.v1beta + * @classdesc Represents a GetSchemaRequest. + * @implements IGetSchemaRequest + * @constructor + * @param {google.cloud.discoveryengine.v1beta.IGetSchemaRequest=} [properties] Properties to set + */ + function GetSchemaRequest(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]]; + } + + /** + * GetSchemaRequest name. + * @member {string} name + * @memberof google.cloud.discoveryengine.v1beta.GetSchemaRequest + * @instance + */ + GetSchemaRequest.prototype.name = ""; + + /** + * Creates a new GetSchemaRequest instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.GetSchemaRequest + * @static + * @param {google.cloud.discoveryengine.v1beta.IGetSchemaRequest=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.GetSchemaRequest} GetSchemaRequest instance + */ + GetSchemaRequest.create = function create(properties) { + return new GetSchemaRequest(properties); + }; + + /** + * Encodes the specified GetSchemaRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.GetSchemaRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.GetSchemaRequest + * @static + * @param {google.cloud.discoveryengine.v1beta.IGetSchemaRequest} message GetSchemaRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSchemaRequest.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 GetSchemaRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.GetSchemaRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.GetSchemaRequest + * @static + * @param {google.cloud.discoveryengine.v1beta.IGetSchemaRequest} message GetSchemaRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetSchemaRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.GetSchemaRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.GetSchemaRequest} GetSchemaRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSchemaRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.GetSchemaRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetSchemaRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.GetSchemaRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.GetSchemaRequest} GetSchemaRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSchemaRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetSchemaRequest message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.GetSchemaRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetSchemaRequest.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 GetSchemaRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.GetSchemaRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.GetSchemaRequest} GetSchemaRequest + */ + GetSchemaRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.GetSchemaRequest) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.GetSchemaRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetSchemaRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.GetSchemaRequest + * @static + * @param {google.cloud.discoveryengine.v1beta.GetSchemaRequest} message GetSchemaRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetSchemaRequest.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 GetSchemaRequest to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.GetSchemaRequest + * @instance + * @returns {Object.} JSON object + */ + GetSchemaRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetSchemaRequest + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.GetSchemaRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetSchemaRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.GetSchemaRequest"; + }; + + return GetSchemaRequest; + })(); + + v1beta.ListSchemasRequest = (function() { + + /** + * Properties of a ListSchemasRequest. + * @memberof google.cloud.discoveryengine.v1beta + * @interface IListSchemasRequest + * @property {string|null} [parent] ListSchemasRequest parent + * @property {number|null} [pageSize] ListSchemasRequest pageSize + * @property {string|null} [pageToken] ListSchemasRequest pageToken + */ + + /** + * Constructs a new ListSchemasRequest. + * @memberof google.cloud.discoveryengine.v1beta + * @classdesc Represents a ListSchemasRequest. + * @implements IListSchemasRequest + * @constructor + * @param {google.cloud.discoveryengine.v1beta.IListSchemasRequest=} [properties] Properties to set + */ + function ListSchemasRequest(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]]; + } + + /** + * ListSchemasRequest parent. + * @member {string} parent + * @memberof google.cloud.discoveryengine.v1beta.ListSchemasRequest + * @instance + */ + ListSchemasRequest.prototype.parent = ""; + + /** + * ListSchemasRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.discoveryengine.v1beta.ListSchemasRequest + * @instance + */ + ListSchemasRequest.prototype.pageSize = 0; + + /** + * ListSchemasRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.discoveryengine.v1beta.ListSchemasRequest + * @instance + */ + ListSchemasRequest.prototype.pageToken = ""; + + /** + * Creates a new ListSchemasRequest instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.ListSchemasRequest + * @static + * @param {google.cloud.discoveryengine.v1beta.IListSchemasRequest=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.ListSchemasRequest} ListSchemasRequest instance + */ + ListSchemasRequest.create = function create(properties) { + return new ListSchemasRequest(properties); + }; + + /** + * Encodes the specified ListSchemasRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ListSchemasRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.ListSchemasRequest + * @static + * @param {google.cloud.discoveryengine.v1beta.IListSchemasRequest} message ListSchemasRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSchemasRequest.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); + return writer; + }; + + /** + * Encodes the specified ListSchemasRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ListSchemasRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.ListSchemasRequest + * @static + * @param {google.cloud.discoveryengine.v1beta.IListSchemasRequest} message ListSchemasRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSchemasRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListSchemasRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.ListSchemasRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.ListSchemasRequest} ListSchemasRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSchemasRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.ListSchemasRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListSchemasRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.ListSchemasRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.ListSchemasRequest} ListSchemasRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSchemasRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListSchemasRequest message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.ListSchemasRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSchemasRequest.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"; + return null; + }; + + /** + * Creates a ListSchemasRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.ListSchemasRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.ListSchemasRequest} ListSchemasRequest + */ + ListSchemasRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.ListSchemasRequest) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.ListSchemasRequest(); + 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); + return message; + }; + + /** + * Creates a plain object from a ListSchemasRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.ListSchemasRequest + * @static + * @param {google.cloud.discoveryengine.v1beta.ListSchemasRequest} message ListSchemasRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSchemasRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + 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; + return object; + }; + + /** + * Converts this ListSchemasRequest to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.ListSchemasRequest + * @instance + * @returns {Object.} JSON object + */ + ListSchemasRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListSchemasRequest + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.ListSchemasRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSchemasRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ListSchemasRequest"; + }; + + return ListSchemasRequest; + })(); + + v1beta.ListSchemasResponse = (function() { + + /** + * Properties of a ListSchemasResponse. + * @memberof google.cloud.discoveryengine.v1beta + * @interface IListSchemasResponse + * @property {Array.|null} [schemas] ListSchemasResponse schemas + * @property {string|null} [nextPageToken] ListSchemasResponse nextPageToken + */ + + /** + * Constructs a new ListSchemasResponse. + * @memberof google.cloud.discoveryengine.v1beta + * @classdesc Represents a ListSchemasResponse. + * @implements IListSchemasResponse + * @constructor + * @param {google.cloud.discoveryengine.v1beta.IListSchemasResponse=} [properties] Properties to set + */ + function ListSchemasResponse(properties) { + this.schemas = []; + 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]]; + } + + /** + * ListSchemasResponse schemas. + * @member {Array.} schemas + * @memberof google.cloud.discoveryengine.v1beta.ListSchemasResponse + * @instance + */ + ListSchemasResponse.prototype.schemas = $util.emptyArray; + + /** + * ListSchemasResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.discoveryengine.v1beta.ListSchemasResponse + * @instance + */ + ListSchemasResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListSchemasResponse instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.ListSchemasResponse + * @static + * @param {google.cloud.discoveryengine.v1beta.IListSchemasResponse=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.ListSchemasResponse} ListSchemasResponse instance + */ + ListSchemasResponse.create = function create(properties) { + return new ListSchemasResponse(properties); + }; + + /** + * Encodes the specified ListSchemasResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ListSchemasResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.ListSchemasResponse + * @static + * @param {google.cloud.discoveryengine.v1beta.IListSchemasResponse} message ListSchemasResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSchemasResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.schemas != null && message.schemas.length) + for (var i = 0; i < message.schemas.length; ++i) + $root.google.cloud.discoveryengine.v1beta.Schema.encode(message.schemas[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 ListSchemasResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.ListSchemasResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.ListSchemasResponse + * @static + * @param {google.cloud.discoveryengine.v1beta.IListSchemasResponse} message ListSchemasResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSchemasResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListSchemasResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.ListSchemasResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.ListSchemasResponse} ListSchemasResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSchemasResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.ListSchemasResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.schemas && message.schemas.length)) + message.schemas = []; + message.schemas.push($root.google.cloud.discoveryengine.v1beta.Schema.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListSchemasResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.ListSchemasResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.ListSchemasResponse} ListSchemasResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSchemasResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListSchemasResponse message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.ListSchemasResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSchemasResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.schemas != null && message.hasOwnProperty("schemas")) { + if (!Array.isArray(message.schemas)) + return "schemas: array expected"; + for (var i = 0; i < message.schemas.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1beta.Schema.verify(message.schemas[i]); + if (error) + return "schemas." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListSchemasResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.ListSchemasResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.ListSchemasResponse} ListSchemasResponse + */ + ListSchemasResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.ListSchemasResponse) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.ListSchemasResponse(); + if (object.schemas) { + if (!Array.isArray(object.schemas)) + throw TypeError(".google.cloud.discoveryengine.v1beta.ListSchemasResponse.schemas: array expected"); + message.schemas = []; + for (var i = 0; i < object.schemas.length; ++i) { + if (typeof object.schemas[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.ListSchemasResponse.schemas: object expected"); + message.schemas[i] = $root.google.cloud.discoveryengine.v1beta.Schema.fromObject(object.schemas[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListSchemasResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.ListSchemasResponse + * @static + * @param {google.cloud.discoveryengine.v1beta.ListSchemasResponse} message ListSchemasResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSchemasResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.schemas = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.schemas && message.schemas.length) { + object.schemas = []; + for (var j = 0; j < message.schemas.length; ++j) + object.schemas[j] = $root.google.cloud.discoveryengine.v1beta.Schema.toObject(message.schemas[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListSchemasResponse to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.ListSchemasResponse + * @instance + * @returns {Object.} JSON object + */ + ListSchemasResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListSchemasResponse + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.ListSchemasResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSchemasResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.ListSchemasResponse"; + }; + + return ListSchemasResponse; + })(); + + v1beta.CreateSchemaRequest = (function() { + + /** + * Properties of a CreateSchemaRequest. + * @memberof google.cloud.discoveryengine.v1beta + * @interface ICreateSchemaRequest + * @property {string|null} [parent] CreateSchemaRequest parent + * @property {google.cloud.discoveryengine.v1beta.ISchema|null} [schema] CreateSchemaRequest schema + * @property {string|null} [schemaId] CreateSchemaRequest schemaId + */ + + /** + * Constructs a new CreateSchemaRequest. + * @memberof google.cloud.discoveryengine.v1beta + * @classdesc Represents a CreateSchemaRequest. + * @implements ICreateSchemaRequest + * @constructor + * @param {google.cloud.discoveryengine.v1beta.ICreateSchemaRequest=} [properties] Properties to set + */ + function CreateSchemaRequest(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]]; + } + + /** + * CreateSchemaRequest parent. + * @member {string} parent + * @memberof google.cloud.discoveryengine.v1beta.CreateSchemaRequest + * @instance + */ + CreateSchemaRequest.prototype.parent = ""; + + /** + * CreateSchemaRequest schema. + * @member {google.cloud.discoveryengine.v1beta.ISchema|null|undefined} schema + * @memberof google.cloud.discoveryengine.v1beta.CreateSchemaRequest + * @instance + */ + CreateSchemaRequest.prototype.schema = null; + + /** + * CreateSchemaRequest schemaId. + * @member {string} schemaId + * @memberof google.cloud.discoveryengine.v1beta.CreateSchemaRequest + * @instance + */ + CreateSchemaRequest.prototype.schemaId = ""; + + /** + * Creates a new CreateSchemaRequest instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.CreateSchemaRequest + * @static + * @param {google.cloud.discoveryengine.v1beta.ICreateSchemaRequest=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.CreateSchemaRequest} CreateSchemaRequest instance + */ + CreateSchemaRequest.create = function create(properties) { + return new CreateSchemaRequest(properties); + }; + + /** + * Encodes the specified CreateSchemaRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CreateSchemaRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.CreateSchemaRequest + * @static + * @param {google.cloud.discoveryengine.v1beta.ICreateSchemaRequest} message CreateSchemaRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateSchemaRequest.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.schema != null && Object.hasOwnProperty.call(message, "schema")) + $root.google.cloud.discoveryengine.v1beta.Schema.encode(message.schema, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.schemaId != null && Object.hasOwnProperty.call(message, "schemaId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.schemaId); + return writer; + }; + + /** + * Encodes the specified CreateSchemaRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CreateSchemaRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.CreateSchemaRequest + * @static + * @param {google.cloud.discoveryengine.v1beta.ICreateSchemaRequest} message CreateSchemaRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateSchemaRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.CreateSchemaRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.CreateSchemaRequest} CreateSchemaRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateSchemaRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.CreateSchemaRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.schema = $root.google.cloud.discoveryengine.v1beta.Schema.decode(reader, reader.uint32()); + break; + } + case 3: { + message.schemaId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateSchemaRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.CreateSchemaRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.CreateSchemaRequest} CreateSchemaRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateSchemaRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateSchemaRequest message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.CreateSchemaRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateSchemaRequest.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.schema != null && message.hasOwnProperty("schema")) { + var error = $root.google.cloud.discoveryengine.v1beta.Schema.verify(message.schema); + if (error) + return "schema." + error; + } + if (message.schemaId != null && message.hasOwnProperty("schemaId")) + if (!$util.isString(message.schemaId)) + return "schemaId: string expected"; + return null; + }; + + /** + * Creates a CreateSchemaRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.CreateSchemaRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.CreateSchemaRequest} CreateSchemaRequest + */ + CreateSchemaRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.CreateSchemaRequest) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.CreateSchemaRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.schema != null) { + if (typeof object.schema !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.CreateSchemaRequest.schema: object expected"); + message.schema = $root.google.cloud.discoveryengine.v1beta.Schema.fromObject(object.schema); + } + if (object.schemaId != null) + message.schemaId = String(object.schemaId); + return message; + }; + + /** + * Creates a plain object from a CreateSchemaRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.CreateSchemaRequest + * @static + * @param {google.cloud.discoveryengine.v1beta.CreateSchemaRequest} message CreateSchemaRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateSchemaRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.schema = null; + object.schemaId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = $root.google.cloud.discoveryengine.v1beta.Schema.toObject(message.schema, options); + if (message.schemaId != null && message.hasOwnProperty("schemaId")) + object.schemaId = message.schemaId; + return object; + }; + + /** + * Converts this CreateSchemaRequest to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.CreateSchemaRequest + * @instance + * @returns {Object.} JSON object + */ + CreateSchemaRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateSchemaRequest + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.CreateSchemaRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateSchemaRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.CreateSchemaRequest"; + }; + + return CreateSchemaRequest; + })(); + + v1beta.UpdateSchemaRequest = (function() { + + /** + * Properties of an UpdateSchemaRequest. + * @memberof google.cloud.discoveryengine.v1beta + * @interface IUpdateSchemaRequest + * @property {google.cloud.discoveryengine.v1beta.ISchema|null} [schema] UpdateSchemaRequest schema + * @property {boolean|null} [allowMissing] UpdateSchemaRequest allowMissing + */ + + /** + * Constructs a new UpdateSchemaRequest. + * @memberof google.cloud.discoveryengine.v1beta + * @classdesc Represents an UpdateSchemaRequest. + * @implements IUpdateSchemaRequest + * @constructor + * @param {google.cloud.discoveryengine.v1beta.IUpdateSchemaRequest=} [properties] Properties to set + */ + function UpdateSchemaRequest(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]]; + } + + /** + * UpdateSchemaRequest schema. + * @member {google.cloud.discoveryengine.v1beta.ISchema|null|undefined} schema + * @memberof google.cloud.discoveryengine.v1beta.UpdateSchemaRequest + * @instance + */ + UpdateSchemaRequest.prototype.schema = null; + + /** + * UpdateSchemaRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.discoveryengine.v1beta.UpdateSchemaRequest + * @instance + */ + UpdateSchemaRequest.prototype.allowMissing = false; + + /** + * Creates a new UpdateSchemaRequest instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.UpdateSchemaRequest + * @static + * @param {google.cloud.discoveryengine.v1beta.IUpdateSchemaRequest=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.UpdateSchemaRequest} UpdateSchemaRequest instance + */ + UpdateSchemaRequest.create = function create(properties) { + return new UpdateSchemaRequest(properties); + }; + + /** + * Encodes the specified UpdateSchemaRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UpdateSchemaRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.UpdateSchemaRequest + * @static + * @param {google.cloud.discoveryengine.v1beta.IUpdateSchemaRequest} message UpdateSchemaRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSchemaRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + $root.google.cloud.discoveryengine.v1beta.Schema.encode(message.schema, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowMissing); + return writer; + }; + + /** + * Encodes the specified UpdateSchemaRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UpdateSchemaRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.UpdateSchemaRequest + * @static + * @param {google.cloud.discoveryengine.v1beta.IUpdateSchemaRequest} message UpdateSchemaRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateSchemaRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.UpdateSchemaRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.UpdateSchemaRequest} UpdateSchemaRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSchemaRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.UpdateSchemaRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.schema = $root.google.cloud.discoveryengine.v1beta.Schema.decode(reader, reader.uint32()); + break; + } + case 3: { + message.allowMissing = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateSchemaRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.UpdateSchemaRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.UpdateSchemaRequest} UpdateSchemaRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSchemaRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateSchemaRequest message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.UpdateSchemaRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateSchemaRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.schema != null && message.hasOwnProperty("schema")) { + var error = $root.google.cloud.discoveryengine.v1beta.Schema.verify(message.schema); + if (error) + return "schema." + error; + } + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + return null; + }; + + /** + * Creates an UpdateSchemaRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.UpdateSchemaRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.UpdateSchemaRequest} UpdateSchemaRequest + */ + UpdateSchemaRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.UpdateSchemaRequest) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.UpdateSchemaRequest(); + if (object.schema != null) { + if (typeof object.schema !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.UpdateSchemaRequest.schema: object expected"); + message.schema = $root.google.cloud.discoveryengine.v1beta.Schema.fromObject(object.schema); + } + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + return message; + }; + + /** + * Creates a plain object from an UpdateSchemaRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.UpdateSchemaRequest + * @static + * @param {google.cloud.discoveryengine.v1beta.UpdateSchemaRequest} message UpdateSchemaRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateSchemaRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.schema = null; + object.allowMissing = false; + } + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = $root.google.cloud.discoveryengine.v1beta.Schema.toObject(message.schema, options); + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + return object; + }; + + /** + * Converts this UpdateSchemaRequest to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.UpdateSchemaRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateSchemaRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateSchemaRequest + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.UpdateSchemaRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateSchemaRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.UpdateSchemaRequest"; + }; + + return UpdateSchemaRequest; + })(); + + v1beta.DeleteSchemaRequest = (function() { + + /** + * Properties of a DeleteSchemaRequest. + * @memberof google.cloud.discoveryengine.v1beta + * @interface IDeleteSchemaRequest + * @property {string|null} [name] DeleteSchemaRequest name + */ + + /** + * Constructs a new DeleteSchemaRequest. + * @memberof google.cloud.discoveryengine.v1beta + * @classdesc Represents a DeleteSchemaRequest. + * @implements IDeleteSchemaRequest + * @constructor + * @param {google.cloud.discoveryengine.v1beta.IDeleteSchemaRequest=} [properties] Properties to set + */ + function DeleteSchemaRequest(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]]; + } + + /** + * DeleteSchemaRequest name. + * @member {string} name + * @memberof google.cloud.discoveryengine.v1beta.DeleteSchemaRequest + * @instance + */ + DeleteSchemaRequest.prototype.name = ""; + + /** + * Creates a new DeleteSchemaRequest instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.DeleteSchemaRequest + * @static + * @param {google.cloud.discoveryengine.v1beta.IDeleteSchemaRequest=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.DeleteSchemaRequest} DeleteSchemaRequest instance + */ + DeleteSchemaRequest.create = function create(properties) { + return new DeleteSchemaRequest(properties); + }; + + /** + * Encodes the specified DeleteSchemaRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.DeleteSchemaRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.DeleteSchemaRequest + * @static + * @param {google.cloud.discoveryengine.v1beta.IDeleteSchemaRequest} message DeleteSchemaRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSchemaRequest.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 DeleteSchemaRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.DeleteSchemaRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.DeleteSchemaRequest + * @static + * @param {google.cloud.discoveryengine.v1beta.IDeleteSchemaRequest} message DeleteSchemaRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteSchemaRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.DeleteSchemaRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.DeleteSchemaRequest} DeleteSchemaRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSchemaRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.DeleteSchemaRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteSchemaRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.DeleteSchemaRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.DeleteSchemaRequest} DeleteSchemaRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSchemaRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteSchemaRequest message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.DeleteSchemaRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteSchemaRequest.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 DeleteSchemaRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.DeleteSchemaRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.DeleteSchemaRequest} DeleteSchemaRequest + */ + DeleteSchemaRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.DeleteSchemaRequest) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.DeleteSchemaRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteSchemaRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.DeleteSchemaRequest + * @static + * @param {google.cloud.discoveryengine.v1beta.DeleteSchemaRequest} message DeleteSchemaRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteSchemaRequest.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 DeleteSchemaRequest to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.DeleteSchemaRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteSchemaRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteSchemaRequest + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.DeleteSchemaRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteSchemaRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.DeleteSchemaRequest"; + }; + + return DeleteSchemaRequest; + })(); + + v1beta.CreateSchemaMetadata = (function() { + + /** + * Properties of a CreateSchemaMetadata. + * @memberof google.cloud.discoveryengine.v1beta + * @interface ICreateSchemaMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] CreateSchemaMetadata createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] CreateSchemaMetadata updateTime + */ + + /** + * Constructs a new CreateSchemaMetadata. + * @memberof google.cloud.discoveryengine.v1beta + * @classdesc Represents a CreateSchemaMetadata. + * @implements ICreateSchemaMetadata + * @constructor + * @param {google.cloud.discoveryengine.v1beta.ICreateSchemaMetadata=} [properties] Properties to set + */ + function CreateSchemaMetadata(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]]; + } + + /** + * CreateSchemaMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.discoveryengine.v1beta.CreateSchemaMetadata + * @instance + */ + CreateSchemaMetadata.prototype.createTime = null; + + /** + * CreateSchemaMetadata updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.discoveryengine.v1beta.CreateSchemaMetadata + * @instance + */ + CreateSchemaMetadata.prototype.updateTime = null; + + /** + * Creates a new CreateSchemaMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.CreateSchemaMetadata + * @static + * @param {google.cloud.discoveryengine.v1beta.ICreateSchemaMetadata=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.CreateSchemaMetadata} CreateSchemaMetadata instance + */ + CreateSchemaMetadata.create = function create(properties) { + return new CreateSchemaMetadata(properties); + }; + + /** + * Encodes the specified CreateSchemaMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CreateSchemaMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.CreateSchemaMetadata + * @static + * @param {google.cloud.discoveryengine.v1beta.ICreateSchemaMetadata} message CreateSchemaMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateSchemaMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateSchemaMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.CreateSchemaMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.CreateSchemaMetadata + * @static + * @param {google.cloud.discoveryengine.v1beta.ICreateSchemaMetadata} message CreateSchemaMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateSchemaMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateSchemaMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.CreateSchemaMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.CreateSchemaMetadata} CreateSchemaMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateSchemaMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.CreateSchemaMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateSchemaMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.CreateSchemaMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.CreateSchemaMetadata} CreateSchemaMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateSchemaMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateSchemaMetadata message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.CreateSchemaMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateSchemaMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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; + } + return null; + }; + + /** + * Creates a CreateSchemaMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.CreateSchemaMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.CreateSchemaMetadata} CreateSchemaMetadata + */ + CreateSchemaMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.CreateSchemaMetadata) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.CreateSchemaMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.CreateSchemaMetadata.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.discoveryengine.v1beta.CreateSchemaMetadata.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a CreateSchemaMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.CreateSchemaMetadata + * @static + * @param {google.cloud.discoveryengine.v1beta.CreateSchemaMetadata} message CreateSchemaMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateSchemaMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.updateTime = null; + } + 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); + return object; + }; + + /** + * Converts this CreateSchemaMetadata to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.CreateSchemaMetadata + * @instance + * @returns {Object.} JSON object + */ + CreateSchemaMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateSchemaMetadata + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.CreateSchemaMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateSchemaMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.CreateSchemaMetadata"; + }; + + return CreateSchemaMetadata; + })(); + + v1beta.UpdateSchemaMetadata = (function() { + + /** + * Properties of an UpdateSchemaMetadata. + * @memberof google.cloud.discoveryengine.v1beta + * @interface IUpdateSchemaMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] UpdateSchemaMetadata createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] UpdateSchemaMetadata updateTime + */ + + /** + * Constructs a new UpdateSchemaMetadata. + * @memberof google.cloud.discoveryengine.v1beta + * @classdesc Represents an UpdateSchemaMetadata. + * @implements IUpdateSchemaMetadata + * @constructor + * @param {google.cloud.discoveryengine.v1beta.IUpdateSchemaMetadata=} [properties] Properties to set + */ + function UpdateSchemaMetadata(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]]; + } + + /** + * UpdateSchemaMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata + * @instance + */ + UpdateSchemaMetadata.prototype.createTime = null; + + /** + * UpdateSchemaMetadata updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata + * @instance + */ + UpdateSchemaMetadata.prototype.updateTime = null; + + /** + * Creates a new UpdateSchemaMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata + * @static + * @param {google.cloud.discoveryengine.v1beta.IUpdateSchemaMetadata=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata} UpdateSchemaMetadata instance + */ + UpdateSchemaMetadata.create = function create(properties) { + return new UpdateSchemaMetadata(properties); + }; + + /** + * Encodes the specified UpdateSchemaMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata + * @static + * @param {google.cloud.discoveryengine.v1beta.IUpdateSchemaMetadata} message UpdateSchemaMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSchemaMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateSchemaMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata + * @static + * @param {google.cloud.discoveryengine.v1beta.IUpdateSchemaMetadata} message UpdateSchemaMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSchemaMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateSchemaMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata} UpdateSchemaMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSchemaMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateSchemaMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata} UpdateSchemaMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSchemaMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateSchemaMetadata message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateSchemaMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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; + } + return null; + }; + + /** + * Creates an UpdateSchemaMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata} UpdateSchemaMetadata + */ + UpdateSchemaMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata.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.discoveryengine.v1beta.UpdateSchemaMetadata.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from an UpdateSchemaMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata + * @static + * @param {google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata} message UpdateSchemaMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateSchemaMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.updateTime = null; + } + 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); + return object; + }; + + /** + * Converts this UpdateSchemaMetadata to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata + * @instance + * @returns {Object.} JSON object + */ + UpdateSchemaMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateSchemaMetadata + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateSchemaMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata"; + }; + + return UpdateSchemaMetadata; + })(); + + v1beta.DeleteSchemaMetadata = (function() { + + /** + * Properties of a DeleteSchemaMetadata. + * @memberof google.cloud.discoveryengine.v1beta + * @interface IDeleteSchemaMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] DeleteSchemaMetadata createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] DeleteSchemaMetadata updateTime + */ + + /** + * Constructs a new DeleteSchemaMetadata. + * @memberof google.cloud.discoveryengine.v1beta + * @classdesc Represents a DeleteSchemaMetadata. + * @implements IDeleteSchemaMetadata + * @constructor + * @param {google.cloud.discoveryengine.v1beta.IDeleteSchemaMetadata=} [properties] Properties to set + */ + function DeleteSchemaMetadata(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]]; + } + + /** + * DeleteSchemaMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata + * @instance + */ + DeleteSchemaMetadata.prototype.createTime = null; + + /** + * DeleteSchemaMetadata updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata + * @instance + */ + DeleteSchemaMetadata.prototype.updateTime = null; + + /** + * Creates a new DeleteSchemaMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata + * @static + * @param {google.cloud.discoveryengine.v1beta.IDeleteSchemaMetadata=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata} DeleteSchemaMetadata instance + */ + DeleteSchemaMetadata.create = function create(properties) { + return new DeleteSchemaMetadata(properties); + }; + + /** + * Encodes the specified DeleteSchemaMetadata message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata + * @static + * @param {google.cloud.discoveryengine.v1beta.IDeleteSchemaMetadata} message DeleteSchemaMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSchemaMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DeleteSchemaMetadata message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata + * @static + * @param {google.cloud.discoveryengine.v1beta.IDeleteSchemaMetadata} message DeleteSchemaMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSchemaMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteSchemaMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata} DeleteSchemaMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSchemaMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteSchemaMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata} DeleteSchemaMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSchemaMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteSchemaMetadata message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteSchemaMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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; + } + return null; + }; + + /** + * Creates a DeleteSchemaMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata} DeleteSchemaMetadata + */ + DeleteSchemaMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata.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.discoveryengine.v1beta.DeleteSchemaMetadata.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a DeleteSchemaMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata + * @static + * @param {google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata} message DeleteSchemaMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteSchemaMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.updateTime = null; + } + 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); + return object; + }; + + /** + * Converts this DeleteSchemaMetadata to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata + * @instance + * @returns {Object.} JSON object + */ + DeleteSchemaMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteSchemaMetadata + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteSchemaMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata"; + }; + + return DeleteSchemaMetadata; + })(); + + v1beta.SearchService = (function() { + + /** + * Constructs a new SearchService service. + * @memberof google.cloud.discoveryengine.v1beta + * @classdesc Represents a SearchService + * @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 SearchService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (SearchService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SearchService; + + /** + * Creates new SearchService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.SearchService + * @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 {SearchService} RPC service. Useful where requests and/or responses are streamed. + */ + SearchService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.discoveryengine.v1beta.SearchService|search}. + * @memberof google.cloud.discoveryengine.v1beta.SearchService + * @typedef SearchCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.discoveryengine.v1beta.SearchResponse} [response] SearchResponse + */ + + /** + * Calls Search. + * @function search + * @memberof google.cloud.discoveryengine.v1beta.SearchService + * @instance + * @param {google.cloud.discoveryengine.v1beta.ISearchRequest} request SearchRequest message or plain object + * @param {google.cloud.discoveryengine.v1beta.SearchService.SearchCallback} callback Node-style callback called with the error, if any, and SearchResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SearchService.prototype.search = function search(request, callback) { + return this.rpcCall(search, $root.google.cloud.discoveryengine.v1beta.SearchRequest, $root.google.cloud.discoveryengine.v1beta.SearchResponse, request, callback); + }, "name", { value: "Search" }); + + /** + * Calls Search. + * @function search + * @memberof google.cloud.discoveryengine.v1beta.SearchService + * @instance + * @param {google.cloud.discoveryengine.v1beta.ISearchRequest} request SearchRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return SearchService; + })(); + + v1beta.SearchRequest = (function() { + + /** + * Properties of a SearchRequest. + * @memberof google.cloud.discoveryengine.v1beta + * @interface ISearchRequest + * @property {string|null} [servingConfig] SearchRequest servingConfig + * @property {string|null} [branch] SearchRequest branch + * @property {string|null} [query] SearchRequest query + * @property {number|null} [pageSize] SearchRequest pageSize + * @property {string|null} [pageToken] SearchRequest pageToken + * @property {number|null} [offset] SearchRequest offset + * @property {string|null} [filter] SearchRequest filter + * @property {string|null} [orderBy] SearchRequest orderBy + * @property {Array.|null} [facetSpecs] SearchRequest facetSpecs + * @property {google.cloud.discoveryengine.v1beta.SearchRequest.IBoostSpec|null} [boostSpec] SearchRequest boostSpec + * @property {Object.|null} [params] SearchRequest params + * @property {google.cloud.discoveryengine.v1beta.SearchRequest.IQueryExpansionSpec|null} [queryExpansionSpec] SearchRequest queryExpansionSpec + * @property {google.cloud.discoveryengine.v1beta.SearchRequest.ISpellCorrectionSpec|null} [spellCorrectionSpec] SearchRequest spellCorrectionSpec + * @property {string|null} [userPseudoId] SearchRequest userPseudoId + * @property {google.cloud.discoveryengine.v1beta.SearchRequest.IContentSearchSpec|null} [contentSearchSpec] SearchRequest contentSearchSpec + */ + + /** + * Constructs a new SearchRequest. + * @memberof google.cloud.discoveryengine.v1beta + * @classdesc Represents a SearchRequest. + * @implements ISearchRequest + * @constructor + * @param {google.cloud.discoveryengine.v1beta.ISearchRequest=} [properties] Properties to set + */ + function SearchRequest(properties) { + this.facetSpecs = []; + this.params = {}; + 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]]; + } + + /** + * SearchRequest servingConfig. + * @member {string} servingConfig + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @instance + */ + SearchRequest.prototype.servingConfig = ""; + + /** + * SearchRequest branch. + * @member {string} branch + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @instance + */ + SearchRequest.prototype.branch = ""; + + /** + * SearchRequest query. + * @member {string} query + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @instance + */ + SearchRequest.prototype.query = ""; + + /** + * SearchRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @instance + */ + SearchRequest.prototype.pageSize = 0; + + /** + * SearchRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @instance + */ + SearchRequest.prototype.pageToken = ""; + + /** + * SearchRequest offset. + * @member {number} offset + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @instance + */ + SearchRequest.prototype.offset = 0; + + /** + * SearchRequest filter. + * @member {string} filter + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @instance + */ + SearchRequest.prototype.filter = ""; + + /** + * SearchRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @instance + */ + SearchRequest.prototype.orderBy = ""; + + /** + * SearchRequest facetSpecs. + * @member {Array.} facetSpecs + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @instance + */ + SearchRequest.prototype.facetSpecs = $util.emptyArray; + + /** + * SearchRequest boostSpec. + * @member {google.cloud.discoveryengine.v1beta.SearchRequest.IBoostSpec|null|undefined} boostSpec + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @instance + */ + SearchRequest.prototype.boostSpec = null; + + /** + * SearchRequest params. + * @member {Object.} params + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @instance + */ + SearchRequest.prototype.params = $util.emptyObject; + + /** + * SearchRequest queryExpansionSpec. + * @member {google.cloud.discoveryengine.v1beta.SearchRequest.IQueryExpansionSpec|null|undefined} queryExpansionSpec + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @instance + */ + SearchRequest.prototype.queryExpansionSpec = null; + + /** + * SearchRequest spellCorrectionSpec. + * @member {google.cloud.discoveryengine.v1beta.SearchRequest.ISpellCorrectionSpec|null|undefined} spellCorrectionSpec + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @instance + */ + SearchRequest.prototype.spellCorrectionSpec = null; + + /** + * SearchRequest userPseudoId. + * @member {string} userPseudoId + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @instance + */ + SearchRequest.prototype.userPseudoId = ""; + + /** + * SearchRequest contentSearchSpec. + * @member {google.cloud.discoveryengine.v1beta.SearchRequest.IContentSearchSpec|null|undefined} contentSearchSpec + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @instance + */ + SearchRequest.prototype.contentSearchSpec = null; + + /** + * Creates a new SearchRequest instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @static + * @param {google.cloud.discoveryengine.v1beta.ISearchRequest=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest} SearchRequest instance + */ + SearchRequest.create = function create(properties) { + return new SearchRequest(properties); + }; + + /** + * Encodes the specified SearchRequest message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @static + * @param {google.cloud.discoveryengine.v1beta.ISearchRequest} message SearchRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.servingConfig != null && Object.hasOwnProperty.call(message, "servingConfig")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.servingConfig); + if (message.branch != null && Object.hasOwnProperty.call(message, "branch")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.branch); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.query); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.pageToken); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.offset); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.orderBy); + if (message.facetSpecs != null && message.facetSpecs.length) + for (var i = 0; i < message.facetSpecs.length; ++i) + $root.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.encode(message.facetSpecs[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.boostSpec != null && Object.hasOwnProperty.call(message, "boostSpec")) + $root.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.encode(message.boostSpec, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.params != null && Object.hasOwnProperty.call(message, "params")) + for (var keys = Object.keys(message.params), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 11, wireType 2 =*/90).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.params[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.queryExpansionSpec != null && Object.hasOwnProperty.call(message, "queryExpansionSpec")) + $root.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.encode(message.queryExpansionSpec, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.spellCorrectionSpec != null && Object.hasOwnProperty.call(message, "spellCorrectionSpec")) + $root.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.encode(message.spellCorrectionSpec, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.userPseudoId != null && Object.hasOwnProperty.call(message, "userPseudoId")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.userPseudoId); + if (message.contentSearchSpec != null && Object.hasOwnProperty.call(message, "contentSearchSpec")) + $root.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.encode(message.contentSearchSpec, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SearchRequest message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @static + * @param {google.cloud.discoveryengine.v1beta.ISearchRequest} message SearchRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest} SearchRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.SearchRequest(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.servingConfig = reader.string(); + break; + } + case 2: { + message.branch = reader.string(); + break; + } + case 3: { + message.query = reader.string(); + break; + } + case 4: { + message.pageSize = reader.int32(); + break; + } + case 5: { + message.pageToken = reader.string(); + break; + } + case 6: { + message.offset = reader.int32(); + break; + } + case 7: { + message.filter = reader.string(); + break; + } + case 8: { + message.orderBy = reader.string(); + break; + } + case 9: { + if (!(message.facetSpecs && message.facetSpecs.length)) + message.facetSpecs = []; + message.facetSpecs.push($root.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.decode(reader, reader.uint32())); + break; + } + case 10: { + message.boostSpec = $root.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.decode(reader, reader.uint32()); + break; + } + case 11: { + if (message.params === $util.emptyObject) + message.params = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.params[key] = value; + break; + } + case 13: { + message.queryExpansionSpec = $root.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.decode(reader, reader.uint32()); + break; + } + case 14: { + message.spellCorrectionSpec = $root.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.decode(reader, reader.uint32()); + break; + } + case 15: { + message.userPseudoId = reader.string(); + break; + } + case 24: { + message.contentSearchSpec = $root.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest} SearchRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchRequest message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.servingConfig != null && message.hasOwnProperty("servingConfig")) + if (!$util.isString(message.servingConfig)) + return "servingConfig: string expected"; + if (message.branch != null && message.hasOwnProperty("branch")) + if (!$util.isString(message.branch)) + return "branch: string expected"; + if (message.query != null && message.hasOwnProperty("query")) + if (!$util.isString(message.query)) + return "query: 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.offset != null && message.hasOwnProperty("offset")) + if (!$util.isInteger(message.offset)) + return "offset: integer expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.facetSpecs != null && message.hasOwnProperty("facetSpecs")) { + if (!Array.isArray(message.facetSpecs)) + return "facetSpecs: array expected"; + for (var i = 0; i < message.facetSpecs.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.verify(message.facetSpecs[i]); + if (error) + return "facetSpecs." + error; + } + } + if (message.boostSpec != null && message.hasOwnProperty("boostSpec")) { + var error = $root.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.verify(message.boostSpec); + if (error) + return "boostSpec." + error; + } + if (message.params != null && message.hasOwnProperty("params")) { + if (!$util.isObject(message.params)) + return "params: object expected"; + var key = Object.keys(message.params); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.params[key[i]]); + if (error) + return "params." + error; + } + } + if (message.queryExpansionSpec != null && message.hasOwnProperty("queryExpansionSpec")) { + var error = $root.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.verify(message.queryExpansionSpec); + if (error) + return "queryExpansionSpec." + error; + } + if (message.spellCorrectionSpec != null && message.hasOwnProperty("spellCorrectionSpec")) { + var error = $root.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.verify(message.spellCorrectionSpec); + if (error) + return "spellCorrectionSpec." + error; + } + if (message.userPseudoId != null && message.hasOwnProperty("userPseudoId")) + if (!$util.isString(message.userPseudoId)) + return "userPseudoId: string expected"; + if (message.contentSearchSpec != null && message.hasOwnProperty("contentSearchSpec")) { + var error = $root.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.verify(message.contentSearchSpec); + if (error) + return "contentSearchSpec." + error; + } + return null; + }; + + /** + * Creates a SearchRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest} SearchRequest + */ + SearchRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.SearchRequest) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.SearchRequest(); + if (object.servingConfig != null) + message.servingConfig = String(object.servingConfig); + if (object.branch != null) + message.branch = String(object.branch); + if (object.query != null) + message.query = String(object.query); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.offset != null) + message.offset = object.offset | 0; + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.facetSpecs) { + if (!Array.isArray(object.facetSpecs)) + throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.facetSpecs: array expected"); + message.facetSpecs = []; + for (var i = 0; i < object.facetSpecs.length; ++i) { + if (typeof object.facetSpecs[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.facetSpecs: object expected"); + message.facetSpecs[i] = $root.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.fromObject(object.facetSpecs[i]); + } + } + if (object.boostSpec != null) { + if (typeof object.boostSpec !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.boostSpec: object expected"); + message.boostSpec = $root.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.fromObject(object.boostSpec); + } + if (object.params) { + if (typeof object.params !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.params: object expected"); + message.params = {}; + for (var keys = Object.keys(object.params), i = 0; i < keys.length; ++i) { + if (typeof object.params[keys[i]] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.params: object expected"); + message.params[keys[i]] = $root.google.protobuf.Value.fromObject(object.params[keys[i]]); + } + } + if (object.queryExpansionSpec != null) { + if (typeof object.queryExpansionSpec !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.queryExpansionSpec: object expected"); + message.queryExpansionSpec = $root.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.fromObject(object.queryExpansionSpec); + } + if (object.spellCorrectionSpec != null) { + if (typeof object.spellCorrectionSpec !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.spellCorrectionSpec: object expected"); + message.spellCorrectionSpec = $root.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.fromObject(object.spellCorrectionSpec); + } + if (object.userPseudoId != null) + message.userPseudoId = String(object.userPseudoId); + if (object.contentSearchSpec != null) { + if (typeof object.contentSearchSpec !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.contentSearchSpec: object expected"); + message.contentSearchSpec = $root.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.fromObject(object.contentSearchSpec); + } + return message; + }; + + /** + * Creates a plain object from a SearchRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest} message SearchRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.facetSpecs = []; + if (options.objects || options.defaults) + object.params = {}; + if (options.defaults) { + object.servingConfig = ""; + object.branch = ""; + object.query = ""; + object.pageSize = 0; + object.pageToken = ""; + object.offset = 0; + object.filter = ""; + object.orderBy = ""; + object.boostSpec = null; + object.queryExpansionSpec = null; + object.spellCorrectionSpec = null; + object.userPseudoId = ""; + object.contentSearchSpec = null; + } + if (message.servingConfig != null && message.hasOwnProperty("servingConfig")) + object.servingConfig = message.servingConfig; + if (message.branch != null && message.hasOwnProperty("branch")) + object.branch = message.branch; + if (message.query != null && message.hasOwnProperty("query")) + object.query = message.query; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.offset != null && message.hasOwnProperty("offset")) + object.offset = message.offset; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.facetSpecs && message.facetSpecs.length) { + object.facetSpecs = []; + for (var j = 0; j < message.facetSpecs.length; ++j) + object.facetSpecs[j] = $root.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.toObject(message.facetSpecs[j], options); + } + if (message.boostSpec != null && message.hasOwnProperty("boostSpec")) + object.boostSpec = $root.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.toObject(message.boostSpec, options); + var keys2; + if (message.params && (keys2 = Object.keys(message.params)).length) { + object.params = {}; + for (var j = 0; j < keys2.length; ++j) + object.params[keys2[j]] = $root.google.protobuf.Value.toObject(message.params[keys2[j]], options); + } + if (message.queryExpansionSpec != null && message.hasOwnProperty("queryExpansionSpec")) + object.queryExpansionSpec = $root.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.toObject(message.queryExpansionSpec, options); + if (message.spellCorrectionSpec != null && message.hasOwnProperty("spellCorrectionSpec")) + object.spellCorrectionSpec = $root.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.toObject(message.spellCorrectionSpec, options); + if (message.userPseudoId != null && message.hasOwnProperty("userPseudoId")) + object.userPseudoId = message.userPseudoId; + if (message.contentSearchSpec != null && message.hasOwnProperty("contentSearchSpec")) + object.contentSearchSpec = $root.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.toObject(message.contentSearchSpec, options); + return object; + }; + + /** + * Converts this SearchRequest to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @instance + * @returns {Object.} JSON object + */ + SearchRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchRequest + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.SearchRequest"; + }; + + SearchRequest.FacetSpec = (function() { + + /** + * Properties of a FacetSpec. + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @interface IFacetSpec + * @property {google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.IFacetKey|null} [facetKey] FacetSpec facetKey + * @property {number|null} [limit] FacetSpec limit + * @property {Array.|null} [excludedFilterKeys] FacetSpec excludedFilterKeys + * @property {boolean|null} [enableDynamicPosition] FacetSpec enableDynamicPosition + */ + + /** + * Constructs a new FacetSpec. + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @classdesc Represents a FacetSpec. + * @implements IFacetSpec + * @constructor + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.IFacetSpec=} [properties] Properties to set + */ + function FacetSpec(properties) { + this.excludedFilterKeys = []; + 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]]; + } + + /** + * FacetSpec facetKey. + * @member {google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.IFacetKey|null|undefined} facetKey + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec + * @instance + */ + FacetSpec.prototype.facetKey = null; + + /** + * FacetSpec limit. + * @member {number} limit + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec + * @instance + */ + FacetSpec.prototype.limit = 0; + + /** + * FacetSpec excludedFilterKeys. + * @member {Array.} excludedFilterKeys + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec + * @instance + */ + FacetSpec.prototype.excludedFilterKeys = $util.emptyArray; + + /** + * FacetSpec enableDynamicPosition. + * @member {boolean} enableDynamicPosition + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec + * @instance + */ + FacetSpec.prototype.enableDynamicPosition = false; + + /** + * Creates a new FacetSpec instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.IFacetSpec=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec} FacetSpec instance + */ + FacetSpec.create = function create(properties) { + return new FacetSpec(properties); + }; + + /** + * Encodes the specified FacetSpec message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.IFacetSpec} message FacetSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FacetSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.facetKey != null && Object.hasOwnProperty.call(message, "facetKey")) + $root.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.encode(message.facetKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.limit); + if (message.excludedFilterKeys != null && message.excludedFilterKeys.length) + for (var i = 0; i < message.excludedFilterKeys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.excludedFilterKeys[i]); + if (message.enableDynamicPosition != null && Object.hasOwnProperty.call(message, "enableDynamicPosition")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.enableDynamicPosition); + return writer; + }; + + /** + * Encodes the specified FacetSpec message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.IFacetSpec} message FacetSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FacetSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FacetSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec} FacetSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FacetSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.facetKey = $root.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.decode(reader, reader.uint32()); + break; + } + case 2: { + message.limit = reader.int32(); + break; + } + case 3: { + if (!(message.excludedFilterKeys && message.excludedFilterKeys.length)) + message.excludedFilterKeys = []; + message.excludedFilterKeys.push(reader.string()); + break; + } + case 4: { + message.enableDynamicPosition = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FacetSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec} FacetSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FacetSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FacetSpec message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FacetSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.facetKey != null && message.hasOwnProperty("facetKey")) { + var error = $root.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.verify(message.facetKey); + if (error) + return "facetKey." + error; + } + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit)) + return "limit: integer expected"; + if (message.excludedFilterKeys != null && message.hasOwnProperty("excludedFilterKeys")) { + if (!Array.isArray(message.excludedFilterKeys)) + return "excludedFilterKeys: array expected"; + for (var i = 0; i < message.excludedFilterKeys.length; ++i) + if (!$util.isString(message.excludedFilterKeys[i])) + return "excludedFilterKeys: string[] expected"; + } + if (message.enableDynamicPosition != null && message.hasOwnProperty("enableDynamicPosition")) + if (typeof message.enableDynamicPosition !== "boolean") + return "enableDynamicPosition: boolean expected"; + return null; + }; + + /** + * Creates a FacetSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec} FacetSpec + */ + FacetSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec(); + if (object.facetKey != null) { + if (typeof object.facetKey !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.facetKey: object expected"); + message.facetKey = $root.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.fromObject(object.facetKey); + } + if (object.limit != null) + message.limit = object.limit | 0; + if (object.excludedFilterKeys) { + if (!Array.isArray(object.excludedFilterKeys)) + throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.excludedFilterKeys: array expected"); + message.excludedFilterKeys = []; + for (var i = 0; i < object.excludedFilterKeys.length; ++i) + message.excludedFilterKeys[i] = String(object.excludedFilterKeys[i]); + } + if (object.enableDynamicPosition != null) + message.enableDynamicPosition = Boolean(object.enableDynamicPosition); + return message; + }; + + /** + * Creates a plain object from a FacetSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec} message FacetSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FacetSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.excludedFilterKeys = []; + if (options.defaults) { + object.facetKey = null; + object.limit = 0; + object.enableDynamicPosition = false; + } + if (message.facetKey != null && message.hasOwnProperty("facetKey")) + object.facetKey = $root.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.toObject(message.facetKey, options); + if (message.limit != null && message.hasOwnProperty("limit")) + object.limit = message.limit; + if (message.excludedFilterKeys && message.excludedFilterKeys.length) { + object.excludedFilterKeys = []; + for (var j = 0; j < message.excludedFilterKeys.length; ++j) + object.excludedFilterKeys[j] = message.excludedFilterKeys[j]; + } + if (message.enableDynamicPosition != null && message.hasOwnProperty("enableDynamicPosition")) + object.enableDynamicPosition = message.enableDynamicPosition; + return object; + }; + + /** + * Converts this FacetSpec to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec + * @instance + * @returns {Object.} JSON object + */ + FacetSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FacetSpec + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FacetSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec"; + }; + + FacetSpec.FacetKey = (function() { + + /** + * Properties of a FacetKey. + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec + * @interface IFacetKey + * @property {string|null} [key] FacetKey key + * @property {Array.|null} [intervals] FacetKey intervals + * @property {Array.|null} [restrictedValues] FacetKey restrictedValues + * @property {Array.|null} [prefixes] FacetKey prefixes + * @property {Array.|null} [contains] FacetKey contains + * @property {boolean|null} [caseInsensitive] FacetKey caseInsensitive + * @property {string|null} [orderBy] FacetKey orderBy + */ + + /** + * Constructs a new FacetKey. + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec + * @classdesc Represents a FacetKey. + * @implements IFacetKey + * @constructor + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.IFacetKey=} [properties] Properties to set + */ + function FacetKey(properties) { + this.intervals = []; + this.restrictedValues = []; + this.prefixes = []; + this.contains = []; + 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]]; + } + + /** + * FacetKey key. + * @member {string} key + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey + * @instance + */ + FacetKey.prototype.key = ""; + + /** + * FacetKey intervals. + * @member {Array.} intervals + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey + * @instance + */ + FacetKey.prototype.intervals = $util.emptyArray; + + /** + * FacetKey restrictedValues. + * @member {Array.} restrictedValues + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey + * @instance + */ + FacetKey.prototype.restrictedValues = $util.emptyArray; + + /** + * FacetKey prefixes. + * @member {Array.} prefixes + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey + * @instance + */ + FacetKey.prototype.prefixes = $util.emptyArray; + + /** + * FacetKey contains. + * @member {Array.} contains + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey + * @instance + */ + FacetKey.prototype.contains = $util.emptyArray; + + /** + * FacetKey caseInsensitive. + * @member {boolean} caseInsensitive + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey + * @instance + */ + FacetKey.prototype.caseInsensitive = false; + + /** + * FacetKey orderBy. + * @member {string} orderBy + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey + * @instance + */ + FacetKey.prototype.orderBy = ""; + + /** + * Creates a new FacetKey instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.IFacetKey=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey} FacetKey instance + */ + FacetKey.create = function create(properties) { + return new FacetKey(properties); + }; + + /** + * Encodes the specified FacetKey message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.IFacetKey} message FacetKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FacetKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.intervals != null && message.intervals.length) + for (var i = 0; i < message.intervals.length; ++i) + $root.google.cloud.discoveryengine.v1beta.Interval.encode(message.intervals[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.restrictedValues != null && message.restrictedValues.length) + for (var i = 0; i < message.restrictedValues.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.restrictedValues[i]); + if (message.prefixes != null && message.prefixes.length) + for (var i = 0; i < message.prefixes.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.prefixes[i]); + if (message.contains != null && message.contains.length) + for (var i = 0; i < message.contains.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.contains[i]); + if (message.caseInsensitive != null && Object.hasOwnProperty.call(message, "caseInsensitive")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.caseInsensitive); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified FacetKey message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.IFacetKey} message FacetKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FacetKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FacetKey message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey} FacetKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FacetKey.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.key = reader.string(); + break; + } + case 2: { + if (!(message.intervals && message.intervals.length)) + message.intervals = []; + message.intervals.push($root.google.cloud.discoveryengine.v1beta.Interval.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.restrictedValues && message.restrictedValues.length)) + message.restrictedValues = []; + message.restrictedValues.push(reader.string()); + break; + } + case 4: { + if (!(message.prefixes && message.prefixes.length)) + message.prefixes = []; + message.prefixes.push(reader.string()); + break; + } + case 5: { + if (!(message.contains && message.contains.length)) + message.contains = []; + message.contains.push(reader.string()); + break; + } + case 6: { + message.caseInsensitive = reader.bool(); + break; + } + case 7: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FacetKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey} FacetKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FacetKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FacetKey message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FacetKey.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.intervals != null && message.hasOwnProperty("intervals")) { + if (!Array.isArray(message.intervals)) + return "intervals: array expected"; + for (var i = 0; i < message.intervals.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1beta.Interval.verify(message.intervals[i]); + if (error) + return "intervals." + error; + } + } + if (message.restrictedValues != null && message.hasOwnProperty("restrictedValues")) { + if (!Array.isArray(message.restrictedValues)) + return "restrictedValues: array expected"; + for (var i = 0; i < message.restrictedValues.length; ++i) + if (!$util.isString(message.restrictedValues[i])) + return "restrictedValues: string[] expected"; + } + if (message.prefixes != null && message.hasOwnProperty("prefixes")) { + if (!Array.isArray(message.prefixes)) + return "prefixes: array expected"; + for (var i = 0; i < message.prefixes.length; ++i) + if (!$util.isString(message.prefixes[i])) + return "prefixes: string[] expected"; + } + if (message.contains != null && message.hasOwnProperty("contains")) { + if (!Array.isArray(message.contains)) + return "contains: array expected"; + for (var i = 0; i < message.contains.length; ++i) + if (!$util.isString(message.contains[i])) + return "contains: string[] expected"; + } + if (message.caseInsensitive != null && message.hasOwnProperty("caseInsensitive")) + if (typeof message.caseInsensitive !== "boolean") + return "caseInsensitive: boolean expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a FacetKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey} FacetKey + */ + FacetKey.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey(); + if (object.key != null) + message.key = String(object.key); + if (object.intervals) { + if (!Array.isArray(object.intervals)) + throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.intervals: array expected"); + message.intervals = []; + for (var i = 0; i < object.intervals.length; ++i) { + if (typeof object.intervals[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.intervals: object expected"); + message.intervals[i] = $root.google.cloud.discoveryengine.v1beta.Interval.fromObject(object.intervals[i]); + } + } + if (object.restrictedValues) { + if (!Array.isArray(object.restrictedValues)) + throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.restrictedValues: array expected"); + message.restrictedValues = []; + for (var i = 0; i < object.restrictedValues.length; ++i) + message.restrictedValues[i] = String(object.restrictedValues[i]); + } + if (object.prefixes) { + if (!Array.isArray(object.prefixes)) + throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.prefixes: array expected"); + message.prefixes = []; + for (var i = 0; i < object.prefixes.length; ++i) + message.prefixes[i] = String(object.prefixes[i]); + } + if (object.contains) { + if (!Array.isArray(object.contains)) + throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.contains: array expected"); + message.contains = []; + for (var i = 0; i < object.contains.length; ++i) + message.contains[i] = String(object.contains[i]); + } + if (object.caseInsensitive != null) + message.caseInsensitive = Boolean(object.caseInsensitive); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a FacetKey message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey} message FacetKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FacetKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.intervals = []; + object.restrictedValues = []; + object.prefixes = []; + object.contains = []; + } + if (options.defaults) { + object.key = ""; + object.caseInsensitive = false; + object.orderBy = ""; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.intervals && message.intervals.length) { + object.intervals = []; + for (var j = 0; j < message.intervals.length; ++j) + object.intervals[j] = $root.google.cloud.discoveryengine.v1beta.Interval.toObject(message.intervals[j], options); + } + if (message.restrictedValues && message.restrictedValues.length) { + object.restrictedValues = []; + for (var j = 0; j < message.restrictedValues.length; ++j) + object.restrictedValues[j] = message.restrictedValues[j]; + } + if (message.prefixes && message.prefixes.length) { + object.prefixes = []; + for (var j = 0; j < message.prefixes.length; ++j) + object.prefixes[j] = message.prefixes[j]; + } + if (message.contains && message.contains.length) { + object.contains = []; + for (var j = 0; j < message.contains.length; ++j) + object.contains[j] = message.contains[j]; + } + if (message.caseInsensitive != null && message.hasOwnProperty("caseInsensitive")) + object.caseInsensitive = message.caseInsensitive; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this FacetKey to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey + * @instance + * @returns {Object.} JSON object + */ + FacetKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FacetKey + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FacetKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey"; + }; + + return FacetKey; + })(); + + return FacetSpec; + })(); + + SearchRequest.BoostSpec = (function() { + + /** + * Properties of a BoostSpec. + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @interface IBoostSpec + * @property {Array.|null} [conditionBoostSpecs] BoostSpec conditionBoostSpecs + */ + + /** + * Constructs a new BoostSpec. + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @classdesc Represents a BoostSpec. + * @implements IBoostSpec + * @constructor + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.IBoostSpec=} [properties] Properties to set + */ + function BoostSpec(properties) { + this.conditionBoostSpecs = []; + 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]]; + } + + /** + * BoostSpec conditionBoostSpecs. + * @member {Array.} conditionBoostSpecs + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec + * @instance + */ + BoostSpec.prototype.conditionBoostSpecs = $util.emptyArray; + + /** + * Creates a new BoostSpec instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.IBoostSpec=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec} BoostSpec instance + */ + BoostSpec.create = function create(properties) { + return new BoostSpec(properties); + }; + + /** + * Encodes the specified BoostSpec message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.IBoostSpec} message BoostSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoostSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conditionBoostSpecs != null && message.conditionBoostSpecs.length) + for (var i = 0; i < message.conditionBoostSpecs.length; ++i) + $root.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.encode(message.conditionBoostSpecs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BoostSpec message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.IBoostSpec} message BoostSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoostSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BoostSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec} BoostSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoostSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.conditionBoostSpecs && message.conditionBoostSpecs.length)) + message.conditionBoostSpecs = []; + message.conditionBoostSpecs.push($root.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BoostSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec} BoostSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoostSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BoostSpec message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BoostSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.conditionBoostSpecs != null && message.hasOwnProperty("conditionBoostSpecs")) { + if (!Array.isArray(message.conditionBoostSpecs)) + return "conditionBoostSpecs: array expected"; + for (var i = 0; i < message.conditionBoostSpecs.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.verify(message.conditionBoostSpecs[i]); + if (error) + return "conditionBoostSpecs." + error; + } + } + return null; + }; + + /** + * Creates a BoostSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec} BoostSpec + */ + BoostSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec(); + if (object.conditionBoostSpecs) { + if (!Array.isArray(object.conditionBoostSpecs)) + throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.conditionBoostSpecs: array expected"); + message.conditionBoostSpecs = []; + for (var i = 0; i < object.conditionBoostSpecs.length; ++i) { + if (typeof object.conditionBoostSpecs[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.conditionBoostSpecs: object expected"); + message.conditionBoostSpecs[i] = $root.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.fromObject(object.conditionBoostSpecs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BoostSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec} message BoostSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BoostSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.conditionBoostSpecs = []; + if (message.conditionBoostSpecs && message.conditionBoostSpecs.length) { + object.conditionBoostSpecs = []; + for (var j = 0; j < message.conditionBoostSpecs.length; ++j) + object.conditionBoostSpecs[j] = $root.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.toObject(message.conditionBoostSpecs[j], options); + } + return object; + }; + + /** + * Converts this BoostSpec to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec + * @instance + * @returns {Object.} JSON object + */ + BoostSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BoostSpec + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BoostSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec"; + }; + + BoostSpec.ConditionBoostSpec = (function() { + + /** + * Properties of a ConditionBoostSpec. + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec + * @interface IConditionBoostSpec + * @property {string|null} [condition] ConditionBoostSpec condition + * @property {number|null} [boost] ConditionBoostSpec boost + */ + + /** + * Constructs a new ConditionBoostSpec. + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec + * @classdesc Represents a ConditionBoostSpec. + * @implements IConditionBoostSpec + * @constructor + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.IConditionBoostSpec=} [properties] Properties to set + */ + function ConditionBoostSpec(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]]; + } + + /** + * ConditionBoostSpec condition. + * @member {string} condition + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec + * @instance + */ + ConditionBoostSpec.prototype.condition = ""; + + /** + * ConditionBoostSpec boost. + * @member {number} boost + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec + * @instance + */ + ConditionBoostSpec.prototype.boost = 0; + + /** + * Creates a new ConditionBoostSpec instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.IConditionBoostSpec=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec} ConditionBoostSpec instance + */ + ConditionBoostSpec.create = function create(properties) { + return new ConditionBoostSpec(properties); + }; + + /** + * Encodes the specified ConditionBoostSpec message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.IConditionBoostSpec} message ConditionBoostSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConditionBoostSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.condition); + if (message.boost != null && Object.hasOwnProperty.call(message, "boost")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.boost); + return writer; + }; + + /** + * Encodes the specified ConditionBoostSpec message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.IConditionBoostSpec} message ConditionBoostSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConditionBoostSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConditionBoostSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec} ConditionBoostSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConditionBoostSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.condition = reader.string(); + break; + } + case 2: { + message.boost = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConditionBoostSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec} ConditionBoostSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConditionBoostSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConditionBoostSpec message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConditionBoostSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.condition != null && message.hasOwnProperty("condition")) + if (!$util.isString(message.condition)) + return "condition: string expected"; + if (message.boost != null && message.hasOwnProperty("boost")) + if (typeof message.boost !== "number") + return "boost: number expected"; + return null; + }; + + /** + * Creates a ConditionBoostSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec} ConditionBoostSpec + */ + ConditionBoostSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec(); + if (object.condition != null) + message.condition = String(object.condition); + if (object.boost != null) + message.boost = Number(object.boost); + return message; + }; + + /** + * Creates a plain object from a ConditionBoostSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec} message ConditionBoostSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConditionBoostSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.condition = ""; + object.boost = 0; + } + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = message.condition; + if (message.boost != null && message.hasOwnProperty("boost")) + object.boost = options.json && !isFinite(message.boost) ? String(message.boost) : message.boost; + return object; + }; + + /** + * Converts this ConditionBoostSpec to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec + * @instance + * @returns {Object.} JSON object + */ + ConditionBoostSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConditionBoostSpec + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConditionBoostSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec"; + }; + + return ConditionBoostSpec; + })(); + + return BoostSpec; + })(); + + SearchRequest.QueryExpansionSpec = (function() { + + /** + * Properties of a QueryExpansionSpec. + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @interface IQueryExpansionSpec + * @property {google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition|null} [condition] QueryExpansionSpec condition + */ + + /** + * Constructs a new QueryExpansionSpec. + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @classdesc Represents a QueryExpansionSpec. + * @implements IQueryExpansionSpec + * @constructor + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.IQueryExpansionSpec=} [properties] Properties to set + */ + function QueryExpansionSpec(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]]; + } + + /** + * QueryExpansionSpec condition. + * @member {google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition} condition + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec + * @instance + */ + QueryExpansionSpec.prototype.condition = 0; + + /** + * Creates a new QueryExpansionSpec instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.IQueryExpansionSpec=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec} QueryExpansionSpec instance + */ + QueryExpansionSpec.create = function create(properties) { + return new QueryExpansionSpec(properties); + }; + + /** + * Encodes the specified QueryExpansionSpec message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.IQueryExpansionSpec} message QueryExpansionSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryExpansionSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.condition); + return writer; + }; + + /** + * Encodes the specified QueryExpansionSpec message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.IQueryExpansionSpec} message QueryExpansionSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryExpansionSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryExpansionSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec} QueryExpansionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryExpansionSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.condition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryExpansionSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec} QueryExpansionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryExpansionSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryExpansionSpec message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryExpansionSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.condition != null && message.hasOwnProperty("condition")) + switch (message.condition) { + default: + return "condition: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a QueryExpansionSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec} QueryExpansionSpec + */ + QueryExpansionSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec(); + switch (object.condition) { + default: + if (typeof object.condition === "number") { + message.condition = object.condition; + break; + } + break; + case "CONDITION_UNSPECIFIED": + case 0: + message.condition = 0; + break; + case "DISABLED": + case 1: + message.condition = 1; + break; + case "AUTO": + case 2: + message.condition = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a QueryExpansionSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec} message QueryExpansionSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryExpansionSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.condition = options.enums === String ? "CONDITION_UNSPECIFIED" : 0; + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = options.enums === String ? $root.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition[message.condition] === undefined ? message.condition : $root.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition[message.condition] : message.condition; + return object; + }; + + /** + * Converts this QueryExpansionSpec to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec + * @instance + * @returns {Object.} JSON object + */ + QueryExpansionSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryExpansionSpec + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryExpansionSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec"; + }; + + /** + * Condition enum. + * @name google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition + * @enum {number} + * @property {number} CONDITION_UNSPECIFIED=0 CONDITION_UNSPECIFIED value + * @property {number} DISABLED=1 DISABLED value + * @property {number} AUTO=2 AUTO value + */ + QueryExpansionSpec.Condition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONDITION_UNSPECIFIED"] = 0; + values[valuesById[1] = "DISABLED"] = 1; + values[valuesById[2] = "AUTO"] = 2; + return values; + })(); + + return QueryExpansionSpec; + })(); + + SearchRequest.SpellCorrectionSpec = (function() { + + /** + * Properties of a SpellCorrectionSpec. + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @interface ISpellCorrectionSpec + * @property {google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode|null} [mode] SpellCorrectionSpec mode + */ + + /** + * Constructs a new SpellCorrectionSpec. + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @classdesc Represents a SpellCorrectionSpec. + * @implements ISpellCorrectionSpec + * @constructor + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.ISpellCorrectionSpec=} [properties] Properties to set + */ + function SpellCorrectionSpec(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]]; + } + + /** + * SpellCorrectionSpec mode. + * @member {google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode} mode + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec + * @instance + */ + SpellCorrectionSpec.prototype.mode = 0; + + /** + * Creates a new SpellCorrectionSpec instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.ISpellCorrectionSpec=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec} SpellCorrectionSpec instance + */ + SpellCorrectionSpec.create = function create(properties) { + return new SpellCorrectionSpec(properties); + }; + + /** + * Encodes the specified SpellCorrectionSpec message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.ISpellCorrectionSpec} message SpellCorrectionSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SpellCorrectionSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); + return writer; + }; + + /** + * Encodes the specified SpellCorrectionSpec message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.ISpellCorrectionSpec} message SpellCorrectionSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SpellCorrectionSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SpellCorrectionSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec} SpellCorrectionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SpellCorrectionSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.mode = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SpellCorrectionSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec} SpellCorrectionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SpellCorrectionSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SpellCorrectionSpec message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SpellCorrectionSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a SpellCorrectionSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec} SpellCorrectionSpec + */ + SpellCorrectionSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec(); + switch (object.mode) { + default: + if (typeof object.mode === "number") { + message.mode = object.mode; + break; + } + break; + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "SUGGESTION_ONLY": + case 1: + message.mode = 1; + break; + case "AUTO": + case 2: + message.mode = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a SpellCorrectionSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec} message SpellCorrectionSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SpellCorrectionSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode[message.mode] === undefined ? message.mode : $root.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode[message.mode] : message.mode; + return object; + }; + + /** + * Converts this SpellCorrectionSpec to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec + * @instance + * @returns {Object.} JSON object + */ + SpellCorrectionSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SpellCorrectionSpec + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SpellCorrectionSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec"; + }; + + /** + * Mode enum. + * @name google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} SUGGESTION_ONLY=1 SUGGESTION_ONLY value + * @property {number} AUTO=2 AUTO value + */ + SpellCorrectionSpec.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SUGGESTION_ONLY"] = 1; + values[valuesById[2] = "AUTO"] = 2; + return values; + })(); + + return SpellCorrectionSpec; + })(); + + SearchRequest.ContentSearchSpec = (function() { + + /** + * Properties of a ContentSearchSpec. + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @interface IContentSearchSpec + * @property {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ISnippetSpec|null} [snippetSpec] ContentSearchSpec snippetSpec + * @property {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ISummarySpec|null} [summarySpec] ContentSearchSpec summarySpec + */ + + /** + * Constructs a new ContentSearchSpec. + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest + * @classdesc Represents a ContentSearchSpec. + * @implements IContentSearchSpec + * @constructor + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.IContentSearchSpec=} [properties] Properties to set + */ + function ContentSearchSpec(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]]; + } + + /** + * ContentSearchSpec snippetSpec. + * @member {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ISnippetSpec|null|undefined} snippetSpec + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + * @instance + */ + ContentSearchSpec.prototype.snippetSpec = null; + + /** + * ContentSearchSpec summarySpec. + * @member {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ISummarySpec|null|undefined} summarySpec + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + * @instance + */ + ContentSearchSpec.prototype.summarySpec = null; + + /** + * Creates a new ContentSearchSpec instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.IContentSearchSpec=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec} ContentSearchSpec instance + */ + ContentSearchSpec.create = function create(properties) { + return new ContentSearchSpec(properties); + }; + + /** + * Encodes the specified ContentSearchSpec message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.IContentSearchSpec} message ContentSearchSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContentSearchSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.snippetSpec != null && Object.hasOwnProperty.call(message, "snippetSpec")) + $root.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec.encode(message.snippetSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.summarySpec != null && Object.hasOwnProperty.call(message, "summarySpec")) + $root.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.encode(message.summarySpec, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ContentSearchSpec message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.IContentSearchSpec} message ContentSearchSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContentSearchSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ContentSearchSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec} ContentSearchSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContentSearchSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.snippetSpec = $root.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec.decode(reader, reader.uint32()); + break; + } + case 2: { + message.summarySpec = $root.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ContentSearchSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec} ContentSearchSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContentSearchSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ContentSearchSpec message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContentSearchSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.snippetSpec != null && message.hasOwnProperty("snippetSpec")) { + var error = $root.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec.verify(message.snippetSpec); + if (error) + return "snippetSpec." + error; + } + if (message.summarySpec != null && message.hasOwnProperty("summarySpec")) { + var error = $root.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.verify(message.summarySpec); + if (error) + return "summarySpec." + error; + } + return null; + }; + + /** + * Creates a ContentSearchSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec} ContentSearchSpec + */ + ContentSearchSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec(); + if (object.snippetSpec != null) { + if (typeof object.snippetSpec !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.snippetSpec: object expected"); + message.snippetSpec = $root.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec.fromObject(object.snippetSpec); + } + if (object.summarySpec != null) { + if (typeof object.summarySpec !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.summarySpec: object expected"); + message.summarySpec = $root.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.fromObject(object.summarySpec); + } + return message; + }; + + /** + * Creates a plain object from a ContentSearchSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec} message ContentSearchSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContentSearchSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.snippetSpec = null; + object.summarySpec = null; + } + if (message.snippetSpec != null && message.hasOwnProperty("snippetSpec")) + object.snippetSpec = $root.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec.toObject(message.snippetSpec, options); + if (message.summarySpec != null && message.hasOwnProperty("summarySpec")) + object.summarySpec = $root.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.toObject(message.summarySpec, options); + return object; + }; + + /** + * Converts this ContentSearchSpec to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + * @instance + * @returns {Object.} JSON object + */ + ContentSearchSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ContentSearchSpec + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ContentSearchSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec"; + }; + + ContentSearchSpec.SnippetSpec = (function() { + + /** + * Properties of a SnippetSpec. + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + * @interface ISnippetSpec + * @property {number|null} [maxSnippetCount] SnippetSpec maxSnippetCount + * @property {boolean|null} [referenceOnly] SnippetSpec referenceOnly + */ + + /** + * Constructs a new SnippetSpec. + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + * @classdesc Represents a SnippetSpec. + * @implements ISnippetSpec + * @constructor + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ISnippetSpec=} [properties] Properties to set + */ + function SnippetSpec(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]]; + } + + /** + * SnippetSpec maxSnippetCount. + * @member {number} maxSnippetCount + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec + * @instance + */ + SnippetSpec.prototype.maxSnippetCount = 0; + + /** + * SnippetSpec referenceOnly. + * @member {boolean} referenceOnly + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec + * @instance + */ + SnippetSpec.prototype.referenceOnly = false; + + /** + * Creates a new SnippetSpec instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ISnippetSpec=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec} SnippetSpec instance + */ + SnippetSpec.create = function create(properties) { + return new SnippetSpec(properties); + }; + + /** + * Encodes the specified SnippetSpec message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ISnippetSpec} message SnippetSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SnippetSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.maxSnippetCount != null && Object.hasOwnProperty.call(message, "maxSnippetCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.maxSnippetCount); + if (message.referenceOnly != null && Object.hasOwnProperty.call(message, "referenceOnly")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.referenceOnly); + return writer; + }; + + /** + * Encodes the specified SnippetSpec message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ISnippetSpec} message SnippetSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SnippetSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SnippetSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec} SnippetSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SnippetSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.maxSnippetCount = reader.int32(); + break; + } + case 2: { + message.referenceOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SnippetSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec} SnippetSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SnippetSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SnippetSpec message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SnippetSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.maxSnippetCount != null && message.hasOwnProperty("maxSnippetCount")) + if (!$util.isInteger(message.maxSnippetCount)) + return "maxSnippetCount: integer expected"; + if (message.referenceOnly != null && message.hasOwnProperty("referenceOnly")) + if (typeof message.referenceOnly !== "boolean") + return "referenceOnly: boolean expected"; + return null; + }; + + /** + * Creates a SnippetSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec} SnippetSpec + */ + SnippetSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec(); + if (object.maxSnippetCount != null) + message.maxSnippetCount = object.maxSnippetCount | 0; + if (object.referenceOnly != null) + message.referenceOnly = Boolean(object.referenceOnly); + return message; + }; + + /** + * Creates a plain object from a SnippetSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec} message SnippetSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SnippetSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.maxSnippetCount = 0; + object.referenceOnly = false; + } + if (message.maxSnippetCount != null && message.hasOwnProperty("maxSnippetCount")) + object.maxSnippetCount = message.maxSnippetCount; + if (message.referenceOnly != null && message.hasOwnProperty("referenceOnly")) + object.referenceOnly = message.referenceOnly; + return object; + }; + + /** + * Converts this SnippetSpec to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec + * @instance + * @returns {Object.} JSON object + */ + SnippetSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SnippetSpec + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SnippetSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec"; + }; + + return SnippetSpec; + })(); + + ContentSearchSpec.SummarySpec = (function() { + + /** + * Properties of a SummarySpec. + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + * @interface ISummarySpec + * @property {number|null} [summaryResultCount] SummarySpec summaryResultCount + */ + + /** + * Constructs a new SummarySpec. + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + * @classdesc Represents a SummarySpec. + * @implements ISummarySpec + * @constructor + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ISummarySpec=} [properties] Properties to set + */ + function SummarySpec(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]]; + } + + /** + * SummarySpec summaryResultCount. + * @member {number} summaryResultCount + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + * @instance + */ + SummarySpec.prototype.summaryResultCount = 0; + + /** + * Creates a new SummarySpec instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ISummarySpec=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec} SummarySpec instance + */ + SummarySpec.create = function create(properties) { + return new SummarySpec(properties); + }; + + /** + * Encodes the specified SummarySpec message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ISummarySpec} message SummarySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummarySpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.summaryResultCount != null && Object.hasOwnProperty.call(message, "summaryResultCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.summaryResultCount); + return writer; + }; + + /** + * Encodes the specified SummarySpec message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ISummarySpec} message SummarySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummarySpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SummarySpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec} SummarySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummarySpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.summaryResultCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SummarySpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec} SummarySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummarySpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SummarySpec message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SummarySpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.summaryResultCount != null && message.hasOwnProperty("summaryResultCount")) + if (!$util.isInteger(message.summaryResultCount)) + return "summaryResultCount: integer expected"; + return null; + }; + + /** + * Creates a SummarySpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec} SummarySpec + */ + SummarySpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec(); + if (object.summaryResultCount != null) + message.summaryResultCount = object.summaryResultCount | 0; + return message; + }; + + /** + * Creates a plain object from a SummarySpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec} message SummarySpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SummarySpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.summaryResultCount = 0; + if (message.summaryResultCount != null && message.hasOwnProperty("summaryResultCount")) + object.summaryResultCount = message.summaryResultCount; + return object; + }; + + /** + * Converts this SummarySpec to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + * @instance + * @returns {Object.} JSON object + */ + SummarySpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SummarySpec + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SummarySpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec"; + }; + + return SummarySpec; + })(); + + return ContentSearchSpec; + })(); + + return SearchRequest; + })(); + + v1beta.SearchResponse = (function() { + + /** + * Properties of a SearchResponse. + * @memberof google.cloud.discoveryengine.v1beta + * @interface ISearchResponse + * @property {Array.|null} [results] SearchResponse results + * @property {Array.|null} [facets] SearchResponse facets + * @property {google.cloud.discoveryengine.v1beta.SearchResponse.IGuidedSearchResult|null} [guidedSearchResult] SearchResponse guidedSearchResult + * @property {number|null} [totalSize] SearchResponse totalSize + * @property {string|null} [attributionToken] SearchResponse attributionToken + * @property {string|null} [nextPageToken] SearchResponse nextPageToken + * @property {string|null} [correctedQuery] SearchResponse correctedQuery + * @property {google.cloud.discoveryengine.v1beta.SearchResponse.ISummary|null} [summary] SearchResponse summary + * @property {Array.|null} [appliedControls] SearchResponse appliedControls + */ + + /** + * Constructs a new SearchResponse. + * @memberof google.cloud.discoveryengine.v1beta + * @classdesc Represents a SearchResponse. + * @implements ISearchResponse + * @constructor + * @param {google.cloud.discoveryengine.v1beta.ISearchResponse=} [properties] Properties to set + */ + function SearchResponse(properties) { + this.results = []; + this.facets = []; + this.appliedControls = []; + 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]]; + } + + /** + * SearchResponse results. + * @member {Array.} results + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse + * @instance + */ + SearchResponse.prototype.results = $util.emptyArray; + + /** + * SearchResponse facets. + * @member {Array.} facets + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse + * @instance + */ + SearchResponse.prototype.facets = $util.emptyArray; + + /** + * SearchResponse guidedSearchResult. + * @member {google.cloud.discoveryengine.v1beta.SearchResponse.IGuidedSearchResult|null|undefined} guidedSearchResult + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse + * @instance + */ + SearchResponse.prototype.guidedSearchResult = null; + + /** + * SearchResponse totalSize. + * @member {number} totalSize + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse + * @instance + */ + SearchResponse.prototype.totalSize = 0; + + /** + * SearchResponse attributionToken. + * @member {string} attributionToken + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse + * @instance + */ + SearchResponse.prototype.attributionToken = ""; + + /** + * SearchResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse + * @instance + */ + SearchResponse.prototype.nextPageToken = ""; + + /** + * SearchResponse correctedQuery. + * @member {string} correctedQuery + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse + * @instance + */ + SearchResponse.prototype.correctedQuery = ""; + + /** + * SearchResponse summary. + * @member {google.cloud.discoveryengine.v1beta.SearchResponse.ISummary|null|undefined} summary + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse + * @instance + */ + SearchResponse.prototype.summary = null; + + /** + * SearchResponse appliedControls. + * @member {Array.} appliedControls + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse + * @instance + */ + SearchResponse.prototype.appliedControls = $util.emptyArray; + + /** + * Creates a new SearchResponse instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse + * @static + * @param {google.cloud.discoveryengine.v1beta.ISearchResponse=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.SearchResponse} SearchResponse instance + */ + SearchResponse.create = function create(properties) { + return new SearchResponse(properties); + }; + + /** + * Encodes the specified SearchResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse + * @static + * @param {google.cloud.discoveryengine.v1beta.ISearchResponse} message SearchResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.results != null && message.results.length) + for (var i = 0; i < message.results.length; ++i) + $root.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult.encode(message.results[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.facets != null && message.facets.length) + for (var i = 0; i < message.facets.length; ++i) + $root.google.cloud.discoveryengine.v1beta.SearchResponse.Facet.encode(message.facets[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.totalSize != null && Object.hasOwnProperty.call(message, "totalSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalSize); + if (message.attributionToken != null && Object.hasOwnProperty.call(message, "attributionToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.attributionToken); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.nextPageToken); + if (message.correctedQuery != null && Object.hasOwnProperty.call(message, "correctedQuery")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.correctedQuery); + if (message.guidedSearchResult != null && Object.hasOwnProperty.call(message, "guidedSearchResult")) + $root.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.encode(message.guidedSearchResult, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.summary != null && Object.hasOwnProperty.call(message, "summary")) + $root.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.encode(message.summary, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.appliedControls != null && message.appliedControls.length) + for (var i = 0; i < message.appliedControls.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.appliedControls[i]); + return writer; + }; + + /** + * Encodes the specified SearchResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse + * @static + * @param {google.cloud.discoveryengine.v1beta.ISearchResponse} message SearchResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.SearchResponse} SearchResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.SearchResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.results && message.results.length)) + message.results = []; + message.results.push($root.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.facets && message.facets.length)) + message.facets = []; + message.facets.push($root.google.cloud.discoveryengine.v1beta.SearchResponse.Facet.decode(reader, reader.uint32())); + break; + } + case 8: { + message.guidedSearchResult = $root.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.decode(reader, reader.uint32()); + break; + } + case 3: { + message.totalSize = reader.int32(); + break; + } + case 4: { + message.attributionToken = reader.string(); + break; + } + case 5: { + message.nextPageToken = reader.string(); + break; + } + case 7: { + message.correctedQuery = reader.string(); + break; + } + case 9: { + message.summary = $root.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.decode(reader, reader.uint32()); + break; + } + case 10: { + if (!(message.appliedControls && message.appliedControls.length)) + message.appliedControls = []; + message.appliedControls.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.SearchResponse} SearchResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchResponse message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.results != null && message.hasOwnProperty("results")) { + if (!Array.isArray(message.results)) + return "results: array expected"; + for (var i = 0; i < message.results.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult.verify(message.results[i]); + if (error) + return "results." + error; + } + } + if (message.facets != null && message.hasOwnProperty("facets")) { + if (!Array.isArray(message.facets)) + return "facets: array expected"; + for (var i = 0; i < message.facets.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1beta.SearchResponse.Facet.verify(message.facets[i]); + if (error) + return "facets." + error; + } + } + if (message.guidedSearchResult != null && message.hasOwnProperty("guidedSearchResult")) { + var error = $root.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.verify(message.guidedSearchResult); + if (error) + return "guidedSearchResult." + error; + } + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + if (!$util.isInteger(message.totalSize)) + return "totalSize: integer expected"; + if (message.attributionToken != null && message.hasOwnProperty("attributionToken")) + if (!$util.isString(message.attributionToken)) + return "attributionToken: string expected"; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.correctedQuery != null && message.hasOwnProperty("correctedQuery")) + if (!$util.isString(message.correctedQuery)) + return "correctedQuery: string expected"; + if (message.summary != null && message.hasOwnProperty("summary")) { + var error = $root.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.verify(message.summary); + if (error) + return "summary." + error; + } + if (message.appliedControls != null && message.hasOwnProperty("appliedControls")) { + if (!Array.isArray(message.appliedControls)) + return "appliedControls: array expected"; + for (var i = 0; i < message.appliedControls.length; ++i) + if (!$util.isString(message.appliedControls[i])) + return "appliedControls: string[] expected"; + } + return null; + }; + + /** + * Creates a SearchResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.SearchResponse} SearchResponse + */ + SearchResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.SearchResponse) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.SearchResponse(); + if (object.results) { + if (!Array.isArray(object.results)) + throw TypeError(".google.cloud.discoveryengine.v1beta.SearchResponse.results: array expected"); + message.results = []; + for (var i = 0; i < object.results.length; ++i) { + if (typeof object.results[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.SearchResponse.results: object expected"); + message.results[i] = $root.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult.fromObject(object.results[i]); + } + } + if (object.facets) { + if (!Array.isArray(object.facets)) + throw TypeError(".google.cloud.discoveryengine.v1beta.SearchResponse.facets: array expected"); + message.facets = []; + for (var i = 0; i < object.facets.length; ++i) { + if (typeof object.facets[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.SearchResponse.facets: object expected"); + message.facets[i] = $root.google.cloud.discoveryengine.v1beta.SearchResponse.Facet.fromObject(object.facets[i]); + } + } + if (object.guidedSearchResult != null) { + if (typeof object.guidedSearchResult !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.SearchResponse.guidedSearchResult: object expected"); + message.guidedSearchResult = $root.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.fromObject(object.guidedSearchResult); + } + if (object.totalSize != null) + message.totalSize = object.totalSize | 0; + if (object.attributionToken != null) + message.attributionToken = String(object.attributionToken); + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.correctedQuery != null) + message.correctedQuery = String(object.correctedQuery); + if (object.summary != null) { + if (typeof object.summary !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.SearchResponse.summary: object expected"); + message.summary = $root.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.fromObject(object.summary); + } + if (object.appliedControls) { + if (!Array.isArray(object.appliedControls)) + throw TypeError(".google.cloud.discoveryengine.v1beta.SearchResponse.appliedControls: array expected"); + message.appliedControls = []; + for (var i = 0; i < object.appliedControls.length; ++i) + message.appliedControls[i] = String(object.appliedControls[i]); + } + return message; + }; + + /** + * Creates a plain object from a SearchResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchResponse} message SearchResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.results = []; + object.facets = []; + object.appliedControls = []; + } + if (options.defaults) { + object.totalSize = 0; + object.attributionToken = ""; + object.nextPageToken = ""; + object.correctedQuery = ""; + object.guidedSearchResult = null; + object.summary = null; + } + if (message.results && message.results.length) { + object.results = []; + for (var j = 0; j < message.results.length; ++j) + object.results[j] = $root.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult.toObject(message.results[j], options); + } + if (message.facets && message.facets.length) { + object.facets = []; + for (var j = 0; j < message.facets.length; ++j) + object.facets[j] = $root.google.cloud.discoveryengine.v1beta.SearchResponse.Facet.toObject(message.facets[j], options); + } + if (message.totalSize != null && message.hasOwnProperty("totalSize")) + object.totalSize = message.totalSize; + if (message.attributionToken != null && message.hasOwnProperty("attributionToken")) + object.attributionToken = message.attributionToken; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.correctedQuery != null && message.hasOwnProperty("correctedQuery")) + object.correctedQuery = message.correctedQuery; + if (message.guidedSearchResult != null && message.hasOwnProperty("guidedSearchResult")) + object.guidedSearchResult = $root.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.toObject(message.guidedSearchResult, options); + if (message.summary != null && message.hasOwnProperty("summary")) + object.summary = $root.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.toObject(message.summary, options); + if (message.appliedControls && message.appliedControls.length) { + object.appliedControls = []; + for (var j = 0; j < message.appliedControls.length; ++j) + object.appliedControls[j] = message.appliedControls[j]; + } + return object; + }; + + /** + * Converts this SearchResponse to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse + * @instance + * @returns {Object.} JSON object + */ + SearchResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchResponse + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.SearchResponse"; + }; + + SearchResponse.SearchResult = (function() { + + /** + * Properties of a SearchResult. + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse + * @interface ISearchResult + * @property {string|null} [id] SearchResult id + * @property {google.cloud.discoveryengine.v1beta.IDocument|null} [document] SearchResult document + */ + + /** + * Constructs a new SearchResult. + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse + * @classdesc Represents a SearchResult. + * @implements ISearchResult + * @constructor + * @param {google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult=} [properties] Properties to set + */ + function SearchResult(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]]; + } + + /** + * SearchResult id. + * @member {string} id + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult + * @instance + */ + SearchResult.prototype.id = ""; + + /** + * SearchResult document. + * @member {google.cloud.discoveryengine.v1beta.IDocument|null|undefined} document + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult + * @instance + */ + SearchResult.prototype.document = null; + + /** + * Creates a new SearchResult instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult} SearchResult instance + */ + SearchResult.create = function create(properties) { + return new SearchResult(properties); + }; + + /** + * Encodes the specified SearchResult message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult} message SearchResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.document != null && Object.hasOwnProperty.call(message, "document")) + $root.google.cloud.discoveryengine.v1beta.Document.encode(message.document, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SearchResult message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult} message SearchResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult} SearchResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.document = $root.google.cloud.discoveryengine.v1beta.Document.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult} SearchResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchResult message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.document != null && message.hasOwnProperty("document")) { + var error = $root.google.cloud.discoveryengine.v1beta.Document.verify(message.document); + if (error) + return "document." + error; + } + return null; + }; + + /** + * Creates a SearchResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult} SearchResult + */ + SearchResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult(); + if (object.id != null) + message.id = String(object.id); + if (object.document != null) { + if (typeof object.document !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult.document: object expected"); + message.document = $root.google.cloud.discoveryengine.v1beta.Document.fromObject(object.document); + } + return message; + }; + + /** + * Creates a plain object from a SearchResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult} message SearchResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.document = null; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.document != null && message.hasOwnProperty("document")) + object.document = $root.google.cloud.discoveryengine.v1beta.Document.toObject(message.document, options); + return object; + }; + + /** + * Converts this SearchResult to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult + * @instance + * @returns {Object.} JSON object + */ + SearchResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchResult + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult"; + }; + + return SearchResult; + })(); + + SearchResponse.Facet = (function() { + + /** + * Properties of a Facet. + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse + * @interface IFacet + * @property {string|null} [key] Facet key + * @property {Array.|null} [values] Facet values + * @property {boolean|null} [dynamicFacet] Facet dynamicFacet + */ + + /** + * Constructs a new Facet. + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse + * @classdesc Represents a Facet. + * @implements IFacet + * @constructor + * @param {google.cloud.discoveryengine.v1beta.SearchResponse.IFacet=} [properties] Properties to set + */ + function Facet(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]]; + } + + /** + * Facet key. + * @member {string} key + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Facet + * @instance + */ + Facet.prototype.key = ""; + + /** + * Facet values. + * @member {Array.} values + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Facet + * @instance + */ + Facet.prototype.values = $util.emptyArray; + + /** + * Facet dynamicFacet. + * @member {boolean} dynamicFacet + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Facet + * @instance + */ + Facet.prototype.dynamicFacet = false; + + /** + * Creates a new Facet instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Facet + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchResponse.IFacet=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.SearchResponse.Facet} Facet instance + */ + Facet.create = function create(properties) { + return new Facet(properties); + }; + + /** + * Encodes the specified Facet message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchResponse.Facet.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Facet + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchResponse.IFacet} message Facet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Facet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.encode(message.values[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.dynamicFacet != null && Object.hasOwnProperty.call(message, "dynamicFacet")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.dynamicFacet); + return writer; + }; + + /** + * Encodes the specified Facet message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchResponse.Facet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Facet + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchResponse.IFacet} message Facet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Facet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Facet message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Facet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.SearchResponse.Facet} Facet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Facet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.SearchResponse.Facet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.key = reader.string(); + break; + } + case 2: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.decode(reader, reader.uint32())); + break; + } + case 3: { + message.dynamicFacet = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Facet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Facet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.SearchResponse.Facet} Facet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Facet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Gets the default type url for RecommendRequest - * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1beta.RecommendRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RecommendRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.RecommendRequest"; - }; + /** + * Verifies a Facet message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Facet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Facet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: 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) { + var error = $root.google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.verify(message.values[i]); + if (error) + return "values." + error; + } + } + if (message.dynamicFacet != null && message.hasOwnProperty("dynamicFacet")) + if (typeof message.dynamicFacet !== "boolean") + return "dynamicFacet: boolean expected"; + return null; + }; - return RecommendRequest; - })(); + /** + * Creates a Facet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Facet + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.SearchResponse.Facet} Facet + */ + Facet.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.SearchResponse.Facet) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.SearchResponse.Facet(); + if (object.key != null) + message.key = String(object.key); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.cloud.discoveryengine.v1beta.SearchResponse.Facet.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.SearchResponse.Facet.values: object expected"); + message.values[i] = $root.google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.fromObject(object.values[i]); + } + } + if (object.dynamicFacet != null) + message.dynamicFacet = Boolean(object.dynamicFacet); + return message; + }; - v1beta.RecommendResponse = (function() { + /** + * Creates a plain object from a Facet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Facet + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchResponse.Facet} message Facet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Facet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (options.defaults) { + object.key = ""; + object.dynamicFacet = false; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.toObject(message.values[j], options); + } + if (message.dynamicFacet != null && message.hasOwnProperty("dynamicFacet")) + object.dynamicFacet = message.dynamicFacet; + return object; + }; - /** - * Properties of a RecommendResponse. - * @memberof google.cloud.discoveryengine.v1beta - * @interface IRecommendResponse - * @property {Array.|null} [results] RecommendResponse results - * @property {string|null} [attributionToken] RecommendResponse attributionToken - * @property {Array.|null} [missingIds] RecommendResponse missingIds - * @property {boolean|null} [validateOnly] RecommendResponse validateOnly - */ + /** + * Converts this Facet to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Facet + * @instance + * @returns {Object.} JSON object + */ + Facet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new RecommendResponse. - * @memberof google.cloud.discoveryengine.v1beta - * @classdesc Represents a RecommendResponse. - * @implements IRecommendResponse - * @constructor - * @param {google.cloud.discoveryengine.v1beta.IRecommendResponse=} [properties] Properties to set - */ - function RecommendResponse(properties) { - this.results = []; - this.missingIds = []; - 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]]; - } + /** + * Gets the default type url for Facet + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Facet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Facet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.SearchResponse.Facet"; + }; - /** - * RecommendResponse results. - * @member {Array.} results - * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse - * @instance - */ - RecommendResponse.prototype.results = $util.emptyArray; + Facet.FacetValue = (function() { + + /** + * Properties of a FacetValue. + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Facet + * @interface IFacetValue + * @property {string|null} [value] FacetValue value + * @property {google.cloud.discoveryengine.v1beta.IInterval|null} [interval] FacetValue interval + * @property {number|Long|null} [count] FacetValue count + */ + + /** + * Constructs a new FacetValue. + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Facet + * @classdesc Represents a FacetValue. + * @implements IFacetValue + * @constructor + * @param {google.cloud.discoveryengine.v1beta.SearchResponse.Facet.IFacetValue=} [properties] Properties to set + */ + function FacetValue(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]]; + } - /** - * RecommendResponse attributionToken. - * @member {string} attributionToken - * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse - * @instance - */ - RecommendResponse.prototype.attributionToken = ""; + /** + * FacetValue value. + * @member {string|null|undefined} value + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue + * @instance + */ + FacetValue.prototype.value = null; + + /** + * FacetValue interval. + * @member {google.cloud.discoveryengine.v1beta.IInterval|null|undefined} interval + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue + * @instance + */ + FacetValue.prototype.interval = null; + + /** + * FacetValue count. + * @member {number|Long} count + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue + * @instance + */ + FacetValue.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FacetValue facetValue. + * @member {"value"|"interval"|undefined} facetValue + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue + * @instance + */ + Object.defineProperty(FacetValue.prototype, "facetValue", { + get: $util.oneOfGetter($oneOfFields = ["value", "interval"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FacetValue instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchResponse.Facet.IFacetValue=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue} FacetValue instance + */ + FacetValue.create = function create(properties) { + return new FacetValue(properties); + }; + + /** + * Encodes the specified FacetValue message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchResponse.Facet.IFacetValue} message FacetValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FacetValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + if (message.interval != null && Object.hasOwnProperty.call(message, "interval")) + $root.google.cloud.discoveryengine.v1beta.Interval.encode(message.interval, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.count); + return writer; + }; + + /** + * Encodes the specified FacetValue message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchResponse.Facet.IFacetValue} message FacetValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FacetValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FacetValue message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue} FacetValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FacetValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; + } + case 2: { + message.interval = $root.google.cloud.discoveryengine.v1beta.Interval.decode(reader, reader.uint32()); + break; + } + case 3: { + message.count = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FacetValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue} FacetValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FacetValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FacetValue message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FacetValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.value != null && message.hasOwnProperty("value")) { + properties.facetValue = 1; + if (!$util.isString(message.value)) + return "value: string expected"; + } + if (message.interval != null && message.hasOwnProperty("interval")) { + if (properties.facetValue === 1) + return "facetValue: multiple values"; + properties.facetValue = 1; + { + var error = $root.google.cloud.discoveryengine.v1beta.Interval.verify(message.interval); + if (error) + return "interval." + error; + } + } + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + return null; + }; + + /** + * Creates a FacetValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue} FacetValue + */ + FacetValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue(); + if (object.value != null) + message.value = String(object.value); + if (object.interval != null) { + if (typeof object.interval !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.interval: object expected"); + message.interval = $root.google.cloud.discoveryengine.v1beta.Interval.fromObject(object.interval); + } + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = false; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a FacetValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue} message FacetValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FacetValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.count = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) { + object.value = message.value; + if (options.oneofs) + object.facetValue = "value"; + } + if (message.interval != null && message.hasOwnProperty("interval")) { + object.interval = $root.google.cloud.discoveryengine.v1beta.Interval.toObject(message.interval, options); + if (options.oneofs) + object.facetValue = "interval"; + } + if (message.count != null && message.hasOwnProperty("count")) + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; + return object; + }; + + /** + * Converts this FacetValue to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue + * @instance + * @returns {Object.} JSON object + */ + FacetValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FacetValue + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FacetValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue"; + }; - /** - * RecommendResponse missingIds. - * @member {Array.} missingIds - * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse - * @instance - */ - RecommendResponse.prototype.missingIds = $util.emptyArray; + return FacetValue; + })(); - /** - * RecommendResponse validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse - * @instance - */ - RecommendResponse.prototype.validateOnly = false; + return Facet; + })(); - /** - * Creates a new RecommendResponse instance using the specified properties. - * @function create - * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse - * @static - * @param {google.cloud.discoveryengine.v1beta.IRecommendResponse=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1beta.RecommendResponse} RecommendResponse instance - */ - RecommendResponse.create = function create(properties) { - return new RecommendResponse(properties); - }; + SearchResponse.GuidedSearchResult = (function() { - /** - * Encodes the specified RecommendResponse message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse - * @static - * @param {google.cloud.discoveryengine.v1beta.IRecommendResponse} message RecommendResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RecommendResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.results != null && message.results.length) - for (var i = 0; i < message.results.length; ++i) - $root.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.encode(message.results[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.attributionToken != null && Object.hasOwnProperty.call(message, "attributionToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.attributionToken); - if (message.missingIds != null && message.missingIds.length) - for (var i = 0; i < message.missingIds.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.missingIds[i]); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); - return writer; - }; + /** + * Properties of a GuidedSearchResult. + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse + * @interface IGuidedSearchResult + * @property {Array.|null} [refinementAttributes] GuidedSearchResult refinementAttributes + */ - /** - * Encodes the specified RecommendResponse message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse - * @static - * @param {google.cloud.discoveryengine.v1beta.IRecommendResponse} message RecommendResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RecommendResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Constructs a new GuidedSearchResult. + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse + * @classdesc Represents a GuidedSearchResult. + * @implements IGuidedSearchResult + * @constructor + * @param {google.cloud.discoveryengine.v1beta.SearchResponse.IGuidedSearchResult=} [properties] Properties to set + */ + function GuidedSearchResult(properties) { + this.refinementAttributes = []; + 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]]; + } + + /** + * GuidedSearchResult refinementAttributes. + * @member {Array.} refinementAttributes + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult + * @instance + */ + GuidedSearchResult.prototype.refinementAttributes = $util.emptyArray; + + /** + * Creates a new GuidedSearchResult instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchResponse.IGuidedSearchResult=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult} GuidedSearchResult instance + */ + GuidedSearchResult.create = function create(properties) { + return new GuidedSearchResult(properties); + }; + + /** + * Encodes the specified GuidedSearchResult message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchResponse.IGuidedSearchResult} message GuidedSearchResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GuidedSearchResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.refinementAttributes != null && message.refinementAttributes.length) + for (var i = 0; i < message.refinementAttributes.length; ++i) + $root.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute.encode(message.refinementAttributes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * Decodes a RecommendResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1beta.RecommendResponse} RecommendResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RecommendResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.RecommendResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.results && message.results.length)) - message.results = []; - message.results.push($root.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.decode(reader, reader.uint32())); - break; - } - case 2: { - message.attributionToken = reader.string(); - break; - } - case 3: { - if (!(message.missingIds && message.missingIds.length)) - message.missingIds = []; - message.missingIds.push(reader.string()); - break; - } - case 4: { - message.validateOnly = reader.bool(); + /** + * Encodes the specified GuidedSearchResult message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchResponse.IGuidedSearchResult} message GuidedSearchResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GuidedSearchResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GuidedSearchResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult} GuidedSearchResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GuidedSearchResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.refinementAttributes && message.refinementAttributes.length)) + message.refinementAttributes = []; + message.refinementAttributes.push($root.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a RecommendResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1beta.RecommendResponse} RecommendResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RecommendResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a GuidedSearchResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult} GuidedSearchResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GuidedSearchResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a RecommendResponse message. - * @function verify - * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RecommendResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.results != null && message.hasOwnProperty("results")) { - if (!Array.isArray(message.results)) - return "results: array expected"; - for (var i = 0; i < message.results.length; ++i) { - var error = $root.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.verify(message.results[i]); - if (error) - return "results." + error; + /** + * Verifies a GuidedSearchResult message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GuidedSearchResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.refinementAttributes != null && message.hasOwnProperty("refinementAttributes")) { + if (!Array.isArray(message.refinementAttributes)) + return "refinementAttributes: array expected"; + for (var i = 0; i < message.refinementAttributes.length; ++i) { + var error = $root.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute.verify(message.refinementAttributes[i]); + if (error) + return "refinementAttributes." + error; + } } - } - if (message.attributionToken != null && message.hasOwnProperty("attributionToken")) - if (!$util.isString(message.attributionToken)) - return "attributionToken: string expected"; - if (message.missingIds != null && message.hasOwnProperty("missingIds")) { - if (!Array.isArray(message.missingIds)) - return "missingIds: array expected"; - for (var i = 0; i < message.missingIds.length; ++i) - if (!$util.isString(message.missingIds[i])) - return "missingIds: string[] expected"; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; + return null; + }; - /** - * Creates a RecommendResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1beta.RecommendResponse} RecommendResponse - */ - RecommendResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1beta.RecommendResponse) + /** + * Creates a GuidedSearchResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult} GuidedSearchResult + */ + GuidedSearchResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult(); + if (object.refinementAttributes) { + if (!Array.isArray(object.refinementAttributes)) + throw TypeError(".google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.refinementAttributes: array expected"); + message.refinementAttributes = []; + for (var i = 0; i < object.refinementAttributes.length; ++i) { + if (typeof object.refinementAttributes[i] !== "object") + throw TypeError(".google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.refinementAttributes: object expected"); + message.refinementAttributes[i] = $root.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute.fromObject(object.refinementAttributes[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GuidedSearchResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult} message GuidedSearchResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GuidedSearchResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.refinementAttributes = []; + if (message.refinementAttributes && message.refinementAttributes.length) { + object.refinementAttributes = []; + for (var j = 0; j < message.refinementAttributes.length; ++j) + object.refinementAttributes[j] = $root.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute.toObject(message.refinementAttributes[j], options); + } return object; - var message = new $root.google.cloud.discoveryengine.v1beta.RecommendResponse(); - if (object.results) { - if (!Array.isArray(object.results)) - throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendResponse.results: array expected"); - message.results = []; - for (var i = 0; i < object.results.length; ++i) { - if (typeof object.results[i] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendResponse.results: object expected"); - message.results[i] = $root.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.fromObject(object.results[i]); + }; + + /** + * Converts this GuidedSearchResult to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult + * @instance + * @returns {Object.} JSON object + */ + GuidedSearchResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GuidedSearchResult + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GuidedSearchResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - } - if (object.attributionToken != null) - message.attributionToken = String(object.attributionToken); - if (object.missingIds) { - if (!Array.isArray(object.missingIds)) - throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendResponse.missingIds: array expected"); - message.missingIds = []; - for (var i = 0; i < object.missingIds.length; ++i) - message.missingIds[i] = String(object.missingIds[i]); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult"; + }; - /** - * Creates a plain object from a RecommendResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse - * @static - * @param {google.cloud.discoveryengine.v1beta.RecommendResponse} message RecommendResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RecommendResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.results = []; - object.missingIds = []; - } - if (options.defaults) { - object.attributionToken = ""; - object.validateOnly = false; - } - if (message.results && message.results.length) { - object.results = []; - for (var j = 0; j < message.results.length; ++j) - object.results[j] = $root.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.toObject(message.results[j], options); - } - if (message.attributionToken != null && message.hasOwnProperty("attributionToken")) - object.attributionToken = message.attributionToken; - if (message.missingIds && message.missingIds.length) { - object.missingIds = []; - for (var j = 0; j < message.missingIds.length; ++j) - object.missingIds[j] = message.missingIds[j]; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; + GuidedSearchResult.RefinementAttribute = (function() { + + /** + * Properties of a RefinementAttribute. + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult + * @interface IRefinementAttribute + * @property {string|null} [attributeKey] RefinementAttribute attributeKey + * @property {string|null} [attributeValue] RefinementAttribute attributeValue + */ + + /** + * Constructs a new RefinementAttribute. + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult + * @classdesc Represents a RefinementAttribute. + * @implements IRefinementAttribute + * @constructor + * @param {google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.IRefinementAttribute=} [properties] Properties to set + */ + function RefinementAttribute(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]]; + } - /** - * Converts this RecommendResponse to JSON. - * @function toJSON - * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse - * @instance - * @returns {Object.} JSON object - */ - RecommendResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * RefinementAttribute attributeKey. + * @member {string} attributeKey + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute + * @instance + */ + RefinementAttribute.prototype.attributeKey = ""; + + /** + * RefinementAttribute attributeValue. + * @member {string} attributeValue + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute + * @instance + */ + RefinementAttribute.prototype.attributeValue = ""; + + /** + * Creates a new RefinementAttribute instance using the specified properties. + * @function create + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.IRefinementAttribute=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute} RefinementAttribute instance + */ + RefinementAttribute.create = function create(properties) { + return new RefinementAttribute(properties); + }; + + /** + * Encodes the specified RefinementAttribute message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute.verify|verify} messages. + * @function encode + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.IRefinementAttribute} message RefinementAttribute message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RefinementAttribute.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.attributeKey != null && Object.hasOwnProperty.call(message, "attributeKey")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.attributeKey); + if (message.attributeValue != null && Object.hasOwnProperty.call(message, "attributeValue")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.attributeValue); + return writer; + }; + + /** + * Encodes the specified RefinementAttribute message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.IRefinementAttribute} message RefinementAttribute message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RefinementAttribute.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RefinementAttribute message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute} RefinementAttribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RefinementAttribute.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.attributeKey = reader.string(); + break; + } + case 2: { + message.attributeValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RefinementAttribute message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute} RefinementAttribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RefinementAttribute.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RefinementAttribute message. + * @function verify + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RefinementAttribute.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.attributeKey != null && message.hasOwnProperty("attributeKey")) + if (!$util.isString(message.attributeKey)) + return "attributeKey: string expected"; + if (message.attributeValue != null && message.hasOwnProperty("attributeValue")) + if (!$util.isString(message.attributeValue)) + return "attributeValue: string expected"; + return null; + }; + + /** + * Creates a RefinementAttribute message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute} RefinementAttribute + */ + RefinementAttribute.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute) + return object; + var message = new $root.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute(); + if (object.attributeKey != null) + message.attributeKey = String(object.attributeKey); + if (object.attributeValue != null) + message.attributeValue = String(object.attributeValue); + return message; + }; + + /** + * Creates a plain object from a RefinementAttribute message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute + * @static + * @param {google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute} message RefinementAttribute + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RefinementAttribute.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.attributeKey = ""; + object.attributeValue = ""; + } + if (message.attributeKey != null && message.hasOwnProperty("attributeKey")) + object.attributeKey = message.attributeKey; + if (message.attributeValue != null && message.hasOwnProperty("attributeValue")) + object.attributeValue = message.attributeValue; + return object; + }; + + /** + * Converts this RefinementAttribute to JSON. + * @function toJSON + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute + * @instance + * @returns {Object.} JSON object + */ + RefinementAttribute.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RefinementAttribute + * @function getTypeUrl + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RefinementAttribute.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute"; + }; - /** - * Gets the default type url for RecommendResponse - * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RecommendResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.RecommendResponse"; - }; + return RefinementAttribute; + })(); - RecommendResponse.RecommendationResult = (function() { + return GuidedSearchResult; + })(); + + SearchResponse.Summary = (function() { /** - * Properties of a RecommendationResult. - * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse - * @interface IRecommendationResult - * @property {string|null} [id] RecommendationResult id - * @property {google.cloud.discoveryengine.v1beta.IDocument|null} [document] RecommendationResult document - * @property {Object.|null} [metadata] RecommendationResult metadata + * Properties of a Summary. + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse + * @interface ISummary + * @property {string|null} [summaryText] Summary summaryText */ /** - * Constructs a new RecommendationResult. - * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse - * @classdesc Represents a RecommendationResult. - * @implements IRecommendationResult + * Constructs a new Summary. + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse + * @classdesc Represents a Summary. + * @implements ISummary * @constructor - * @param {google.cloud.discoveryengine.v1beta.RecommendResponse.IRecommendationResult=} [properties] Properties to set + * @param {google.cloud.discoveryengine.v1beta.SearchResponse.ISummary=} [properties] Properties to set */ - function RecommendationResult(properties) { - this.metadata = {}; + function Summary(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9356,125 +19200,75 @@ } /** - * RecommendationResult id. - * @member {string} id - * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult - * @instance - */ - RecommendationResult.prototype.id = ""; - - /** - * RecommendationResult document. - * @member {google.cloud.discoveryengine.v1beta.IDocument|null|undefined} document - * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult - * @instance - */ - RecommendationResult.prototype.document = null; - - /** - * RecommendationResult metadata. - * @member {Object.} metadata - * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult + * Summary summaryText. + * @member {string} summaryText + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Summary * @instance */ - RecommendationResult.prototype.metadata = $util.emptyObject; + Summary.prototype.summaryText = ""; /** - * Creates a new RecommendationResult instance using the specified properties. + * Creates a new Summary instance using the specified properties. * @function create - * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Summary * @static - * @param {google.cloud.discoveryengine.v1beta.RecommendResponse.IRecommendationResult=} [properties] Properties to set - * @returns {google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult} RecommendationResult instance + * @param {google.cloud.discoveryengine.v1beta.SearchResponse.ISummary=} [properties] Properties to set + * @returns {google.cloud.discoveryengine.v1beta.SearchResponse.Summary} Summary instance */ - RecommendationResult.create = function create(properties) { - return new RecommendationResult(properties); + Summary.create = function create(properties) { + return new Summary(properties); }; /** - * Encodes the specified RecommendationResult message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.verify|verify} messages. + * Encodes the specified Summary message. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchResponse.Summary.verify|verify} messages. * @function encode - * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Summary * @static - * @param {google.cloud.discoveryengine.v1beta.RecommendResponse.IRecommendationResult} message RecommendationResult message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.SearchResponse.ISummary} message Summary message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecommendationResult.encode = function encode(message, writer) { + Summary.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.document != null && Object.hasOwnProperty.call(message, "document")) - $root.google.cloud.discoveryengine.v1beta.Document.encode(message.document, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.protobuf.Value.encode(message.metadata[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.summaryText != null && Object.hasOwnProperty.call(message, "summaryText")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.summaryText); return writer; }; /** - * Encodes the specified RecommendationResult message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.verify|verify} messages. + * Encodes the specified Summary message, length delimited. Does not implicitly {@link google.cloud.discoveryengine.v1beta.SearchResponse.Summary.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Summary * @static - * @param {google.cloud.discoveryengine.v1beta.RecommendResponse.IRecommendationResult} message RecommendationResult message or plain object to encode + * @param {google.cloud.discoveryengine.v1beta.SearchResponse.ISummary} message Summary message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RecommendationResult.encodeDelimited = function encodeDelimited(message, writer) { + Summary.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RecommendationResult message from the specified reader or buffer. + * Decodes a Summary message from the specified reader or buffer. * @function decode - * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Summary * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult} RecommendationResult + * @returns {google.cloud.discoveryengine.v1beta.SearchResponse.Summary} Summary * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RecommendationResult.decode = function decode(reader, length) { + Summary.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.discoveryengine.v1beta.SearchResponse.Summary(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.id = reader.string(); - break; - } - case 2: { - message.document = $root.google.cloud.discoveryengine.v1beta.Document.decode(reader, reader.uint32()); - break; - } - case 3: { - if (message.metadata === $util.emptyObject) - message.metadata = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.metadata[key] = value; + message.summaryText = reader.string(); break; } default: @@ -9486,147 +19280,105 @@ }; /** - * Decodes a RecommendationResult message from the specified reader or buffer, length delimited. + * Decodes a Summary message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Summary * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult} RecommendationResult + * @returns {google.cloud.discoveryengine.v1beta.SearchResponse.Summary} Summary * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RecommendationResult.decodeDelimited = function decodeDelimited(reader) { + Summary.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RecommendationResult message. + * Verifies a Summary message. * @function verify - * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Summary * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RecommendationResult.verify = function verify(message) { + Summary.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.document != null && message.hasOwnProperty("document")) { - var error = $root.google.cloud.discoveryengine.v1beta.Document.verify(message.document); - if (error) - return "document." + error; - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - if (!$util.isObject(message.metadata)) - return "metadata: object expected"; - var key = Object.keys(message.metadata); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.metadata[key[i]]); - if (error) - return "metadata." + error; - } - } + if (message.summaryText != null && message.hasOwnProperty("summaryText")) + if (!$util.isString(message.summaryText)) + return "summaryText: string expected"; return null; }; /** - * Creates a RecommendationResult message from a plain object. Also converts values to their respective internal types. + * Creates a Summary message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Summary * @static * @param {Object.} object Plain object - * @returns {google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult} RecommendationResult + * @returns {google.cloud.discoveryengine.v1beta.SearchResponse.Summary} Summary */ - RecommendationResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult) + Summary.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.discoveryengine.v1beta.SearchResponse.Summary) return object; - var message = new $root.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult(); - if (object.id != null) - message.id = String(object.id); - if (object.document != null) { - if (typeof object.document !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.document: object expected"); - message.document = $root.google.cloud.discoveryengine.v1beta.Document.fromObject(object.document); - } - if (object.metadata) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.metadata: object expected"); - message.metadata = {}; - for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) { - if (typeof object.metadata[keys[i]] !== "object") - throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.metadata: object expected"); - message.metadata[keys[i]] = $root.google.protobuf.Value.fromObject(object.metadata[keys[i]]); - } - } + var message = new $root.google.cloud.discoveryengine.v1beta.SearchResponse.Summary(); + if (object.summaryText != null) + message.summaryText = String(object.summaryText); return message; }; /** - * Creates a plain object from a RecommendationResult message. Also converts values to other types if specified. + * Creates a plain object from a Summary message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Summary * @static - * @param {google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult} message RecommendationResult + * @param {google.cloud.discoveryengine.v1beta.SearchResponse.Summary} message Summary * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RecommendationResult.toObject = function toObject(message, options) { + Summary.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.metadata = {}; - if (options.defaults) { - object.id = ""; - object.document = null; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.document != null && message.hasOwnProperty("document")) - object.document = $root.google.cloud.discoveryengine.v1beta.Document.toObject(message.document, options); - var keys2; - if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { - object.metadata = {}; - for (var j = 0; j < keys2.length; ++j) - object.metadata[keys2[j]] = $root.google.protobuf.Value.toObject(message.metadata[keys2[j]], options); - } + if (options.defaults) + object.summaryText = ""; + if (message.summaryText != null && message.hasOwnProperty("summaryText")) + object.summaryText = message.summaryText; return object; }; /** - * Converts this RecommendationResult to JSON. + * Converts this Summary to JSON. * @function toJSON - * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Summary * @instance * @returns {Object.} JSON object */ - RecommendationResult.prototype.toJSON = function toJSON() { + Summary.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RecommendationResult + * Gets the default type url for Summary * @function getTypeUrl - * @memberof google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult + * @memberof google.cloud.discoveryengine.v1beta.SearchResponse.Summary * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RecommendationResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Summary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult"; + return typeUrlPrefix + "/google.cloud.discoveryengine.v1beta.SearchResponse.Summary"; }; - return RecommendationResult; + return Summary; })(); - return RecommendResponse; + return SearchResponse; })(); v1beta.UserEventService = (function() { @@ -11033,32 +20785,6 @@ return ResourceReference; })(); - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; - return values; - })(); - api.Http = (function() { /** @@ -12022,6 +21748,32 @@ return CustomHttpPattern; })(); + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + return values; + })(); + api.HttpBody = (function() { /** diff --git a/packages/google-cloud-discoveryengine/protos/protos.json b/packages/google-cloud-discoveryengine/protos/protos.json index 2b1f5890018..bf20098fccc 100644 --- a/packages/google-cloud-discoveryengine/protos/protos.json +++ b/packages/google-cloud-discoveryengine/protos/protos.json @@ -20,6 +20,40 @@ "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}" }, "nested": { + "Interval": { + "oneofs": { + "min": { + "oneof": [ + "minimum", + "exclusiveMinimum" + ] + }, + "max": { + "oneof": [ + "maximum", + "exclusiveMaximum" + ] + } + }, + "fields": { + "minimum": { + "type": "double", + "id": 1 + }, + "exclusiveMinimum": { + "type": "double", + "id": 2 + }, + "maximum": { + "type": "double", + "id": 3 + }, + "exclusiveMaximum": { + "type": "double", + "id": 4 + } + } + }, "CustomAttribute": { "fields": { "text": { @@ -46,6 +80,78 @@ } } }, + "CompletionService": { + "options": { + "(google.api.default_host)": "discoveryengine.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CompleteQuery": { + "requestType": "CompleteQueryRequest", + "responseType": "CompleteQueryResponse", + "options": { + "(google.api.http).get": "/v1beta/{data_store=projects/*/locations/*/dataStores/*}:completeQuery", + "(google.api.http).additional_bindings.get": "/v1beta/{data_store=projects/*/locations/*/collections/*/dataStores/*}:completeQuery" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{data_store=projects/*/locations/*/dataStores/*}:completeQuery", + "additional_bindings": { + "get": "/v1beta/{data_store=projects/*/locations/*/collections/*/dataStores/*}:completeQuery" + } + } + } + ] + } + } + }, + "CompleteQueryRequest": { + "fields": { + "dataStore": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "discoveryengine.googleapis.com/DataStore" + } + }, + "query": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "queryModel": { + "type": "string", + "id": 3 + }, + "userPseudoId": { + "type": "string", + "id": 4 + } + } + }, + "CompleteQueryResponse": { + "fields": { + "querySuggestions": { + "rule": "repeated", + "type": "QuerySuggestion", + "id": 1 + } + }, + "nested": { + "QuerySuggestion": { + "fields": { + "suggestion": { + "type": "string", + "id": 1 + } + } + } + } + }, "Document": { "options": { "(google.api.resource).type": "discoveryengine.googleapis.com/Document", @@ -86,9 +192,46 @@ "type": "string", "id": 3 }, + "content": { + "type": "Content", + "id": 10 + }, "parentDocumentId": { "type": "string", "id": 7 + }, + "derivedStructData": { + "type": "google.protobuf.Struct", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Content": { + "oneofs": { + "content": { + "oneof": [ + "rawBytes", + "uri" + ] + } + }, + "fields": { + "rawBytes": { + "type": "bytes", + "id": 2 + }, + "uri": { + "type": "string", + "id": 3 + }, + "mimeType": { + "type": "string", + "id": 1 + } + } } } }, @@ -241,6 +384,36 @@ } } ] + }, + "PurgeDocuments": { + "requestType": "PurgeDocumentsRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:purge", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:purge", + "(google.api.http).additional_bindings.body": "*", + "(google.longrunning.operation_info).response_type": "google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse", + "(google.longrunning.operation_info).metadata_type": "google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:purge", + "body": "*", + "additional_bindings": { + "post": "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:purge", + "body": "*" + } + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse", + "metadata_type": "google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata" + } + } + ] } } }, @@ -927,6 +1100,65 @@ } } }, + "PurgeDocumentsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "discoveryengine.googleapis.com/Branch" + } + }, + "filter": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "force": { + "type": "bool", + "id": 3 + } + } + }, + "PurgeDocumentsResponse": { + "fields": { + "purgeCount": { + "type": "int64", + "id": 1 + }, + "purgeSample": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.resource_reference).type": "discoveryengine.googleapis.com/Document" + } + } + } + }, + "PurgeDocumentsMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "successCount": { + "type": "int64", + "id": 3 + }, + "failureCount": { + "type": "int64", + "id": 4 + } + } + }, "RecommendationService": { "options": { "(google.api.default_host)": "discoveryengine.googleapis.com", @@ -1039,96 +1271,799 @@ } } }, - "UserEventService": { + "Schema": { + "options": { + "(google.api.resource).type": "discoveryengine.googleapis.com/Schema", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}" + }, + "oneofs": { + "schema": { + "oneof": [ + "structSchema", + "jsonSchema" + ] + } + }, + "fields": { + "structSchema": { + "type": "google.protobuf.Struct", + "id": 2 + }, + "jsonSchema": { + "type": "string", + "id": 3 + }, + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + } + }, + "SchemaService": { "options": { "(google.api.default_host)": "discoveryengine.googleapis.com", "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" }, "methods": { - "WriteUserEvent": { - "requestType": "WriteUserEventRequest", - "responseType": "UserEvent", + "GetSchema": { + "requestType": "GetSchemaRequest", + "responseType": "Schema", "options": { - "(google.api.http).post": "/v1beta/{parent=projects/*/locations/*/dataStores/*}/userEvents:write", - "(google.api.http).body": "user_event", - "(google.api.http).additional_bindings.post": "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:write", - "(google.api.http).additional_bindings.body": "user_event" + "(google.api.http).get": "/v1beta/{name=projects/*/locations/*/dataStores/*/schemas/*}", + "(google.api.http).additional_bindings.get": "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}", + "(google.api.method_signature)": "name" }, "parsedOptions": [ { "(google.api.http)": { - "post": "/v1beta/{parent=projects/*/locations/*/dataStores/*}/userEvents:write", - "body": "user_event", + "get": "/v1beta/{name=projects/*/locations/*/dataStores/*/schemas/*}", "additional_bindings": { - "post": "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:write", - "body": "user_event" + "get": "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}" } } + }, + { + "(google.api.method_signature)": "name" } ] }, - "CollectUserEvent": { - "requestType": "CollectUserEventRequest", - "responseType": "google.api.HttpBody", + "ListSchemas": { + "requestType": "ListSchemasRequest", + "responseType": "ListSchemasResponse", "options": { - "(google.api.http).get": "/v1beta/{parent=projects/*/locations/*/dataStores/*}/userEvents:collect", - "(google.api.http).additional_bindings.get": "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:collect" + "(google.api.http).get": "/v1beta/{parent=projects/*/locations/*/dataStores/*}/schemas", + "(google.api.http).additional_bindings.get": "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/schemas", + "(google.api.method_signature)": "parent" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1beta/{parent=projects/*/locations/*/dataStores/*}/userEvents:collect", + "get": "/v1beta/{parent=projects/*/locations/*/dataStores/*}/schemas", "additional_bindings": { - "get": "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:collect" + "get": "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/schemas" } } + }, + { + "(google.api.method_signature)": "parent" } ] }, - "ImportUserEvents": { - "requestType": "ImportUserEventsRequest", + "CreateSchema": { + "requestType": "CreateSchemaRequest", "responseType": "google.longrunning.Operation", "options": { - "(google.api.http).post": "/v1beta/{parent=projects/*/locations/*/dataStores/*}/userEvents:import", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:import", - "(google.api.http).additional_bindings.body": "*", - "(google.longrunning.operation_info).response_type": "google.cloud.discoveryengine.v1beta.ImportUserEventsResponse", - "(google.longrunning.operation_info).metadata_type": "google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata" + "(google.api.http).post": "/v1beta/{parent=projects/*/locations/*/dataStores/*}/schemas", + "(google.api.http).body": "schema", + "(google.api.http).additional_bindings.post": "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/schemas", + "(google.api.http).additional_bindings.body": "schema", + "(google.api.method_signature)": "parent,schema,schema_id", + "(google.longrunning.operation_info).response_type": "google.cloud.discoveryengine.v1beta.Schema", + "(google.longrunning.operation_info).metadata_type": "google.cloud.discoveryengine.v1beta.CreateSchemaMetadata" }, "parsedOptions": [ { "(google.api.http)": { - "post": "/v1beta/{parent=projects/*/locations/*/dataStores/*}/userEvents:import", - "body": "*", + "post": "/v1beta/{parent=projects/*/locations/*/dataStores/*}/schemas", + "body": "schema", "additional_bindings": { - "post": "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:import", - "body": "*" + "post": "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/schemas", + "body": "schema" } } }, + { + "(google.api.method_signature)": "parent,schema,schema_id" + }, { "(google.longrunning.operation_info)": { - "response_type": "google.cloud.discoveryengine.v1beta.ImportUserEventsResponse", - "metadata_type": "google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata" + "response_type": "google.cloud.discoveryengine.v1beta.Schema", + "metadata_type": "google.cloud.discoveryengine.v1beta.CreateSchemaMetadata" } } ] - } - } - }, - "WriteUserEventRequest": { - "oneofs": { - "_userEvent": { - "oneof": [ - "userEvent" - ] - } - }, - "fields": { - "parent": { - "type": "string", - "id": 1, + }, + "UpdateSchema": { + "requestType": "UpdateSchemaRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1beta/{schema.name=projects/*/locations/*/dataStores/*/schemas/*}", + "(google.api.http).body": "schema", + "(google.api.http).additional_bindings.patch": "/v1beta/{schema.name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}", + "(google.api.http).additional_bindings.body": "schema", + "(google.longrunning.operation_info).response_type": "google.cloud.discoveryengine.v1beta.Schema", + "(google.longrunning.operation_info).metadata_type": "google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta/{schema.name=projects/*/locations/*/dataStores/*/schemas/*}", + "body": "schema", + "additional_bindings": { + "patch": "/v1beta/{schema.name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}", + "body": "schema" + } + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.cloud.discoveryengine.v1beta.Schema", + "metadata_type": "google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata" + } + } + ] + }, + "DeleteSchema": { + "requestType": "DeleteSchemaRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1beta/{name=projects/*/locations/*/dataStores/*/schemas/*}", + "(google.api.http).additional_bindings.delete": "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta/{name=projects/*/locations/*/dataStores/*/schemas/*}", + "additional_bindings": { + "delete": "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}" + } + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata" + } + } + ] + } + } + }, + "GetSchemaRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "discoveryengine.googleapis.com/Schema" + } + } + } + }, + "ListSchemasRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "discoveryengine.googleapis.com/DataStore" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListSchemasResponse": { + "fields": { + "schemas": { + "rule": "repeated", + "type": "Schema", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CreateSchemaRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "discoveryengine.googleapis.com/DataStore" + } + }, + "schema": { + "type": "Schema", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "schemaId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateSchemaRequest": { + "fields": { + "schema": { + "type": "Schema", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "allowMissing": { + "type": "bool", + "id": 3 + } + } + }, + "DeleteSchemaRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "discoveryengine.googleapis.com/Schema" + } + } + } + }, + "CreateSchemaMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + } + } + }, + "UpdateSchemaMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + } + } + }, + "DeleteSchemaMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + } + } + }, + "SearchService": { + "options": { + "(google.api.default_host)": "discoveryengine.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "Search": { + "requestType": "SearchRequest", + "responseType": "SearchResponse", + "options": { + "(google.api.http).post": "/v1beta/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:search", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1beta/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:search", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:search", + "body": "*", + "additional_bindings": { + "post": "/v1beta/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:search", + "body": "*" + } + } + } + ] + } + } + }, + "SearchRequest": { + "fields": { + "servingConfig": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "discoveryengine.googleapis.com/ServingConfig" + } + }, + "branch": { + "type": "string", + "id": 2, + "options": { + "(google.api.resource_reference).type": "discoveryengine.googleapis.com/Branch" + } + }, + "query": { + "type": "string", + "id": 3 + }, + "pageSize": { + "type": "int32", + "id": 4 + }, + "pageToken": { + "type": "string", + "id": 5 + }, + "offset": { + "type": "int32", + "id": 6 + }, + "filter": { + "type": "string", + "id": 7 + }, + "orderBy": { + "type": "string", + "id": 8 + }, + "facetSpecs": { + "rule": "repeated", + "type": "FacetSpec", + "id": 9 + }, + "boostSpec": { + "type": "BoostSpec", + "id": 10 + }, + "params": { + "keyType": "string", + "type": "google.protobuf.Value", + "id": 11 + }, + "queryExpansionSpec": { + "type": "QueryExpansionSpec", + "id": 13 + }, + "spellCorrectionSpec": { + "type": "SpellCorrectionSpec", + "id": 14 + }, + "userPseudoId": { + "type": "string", + "id": 15 + }, + "contentSearchSpec": { + "type": "ContentSearchSpec", + "id": 24 + } + }, + "nested": { + "FacetSpec": { + "fields": { + "facetKey": { + "type": "FacetKey", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "limit": { + "type": "int32", + "id": 2 + }, + "excludedFilterKeys": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "enableDynamicPosition": { + "type": "bool", + "id": 4 + } + }, + "nested": { + "FacetKey": { + "fields": { + "key": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "intervals": { + "rule": "repeated", + "type": "Interval", + "id": 2 + }, + "restrictedValues": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "prefixes": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "contains": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "caseInsensitive": { + "type": "bool", + "id": 6 + }, + "orderBy": { + "type": "string", + "id": 7 + } + } + } + } + }, + "BoostSpec": { + "fields": { + "conditionBoostSpecs": { + "rule": "repeated", + "type": "ConditionBoostSpec", + "id": 1 + } + }, + "nested": { + "ConditionBoostSpec": { + "fields": { + "condition": { + "type": "string", + "id": 1 + }, + "boost": { + "type": "float", + "id": 2 + } + } + } + } + }, + "QueryExpansionSpec": { + "fields": { + "condition": { + "type": "Condition", + "id": 1 + } + }, + "nested": { + "Condition": { + "values": { + "CONDITION_UNSPECIFIED": 0, + "DISABLED": 1, + "AUTO": 2 + } + } + } + }, + "SpellCorrectionSpec": { + "fields": { + "mode": { + "type": "Mode", + "id": 1 + } + }, + "nested": { + "Mode": { + "values": { + "MODE_UNSPECIFIED": 0, + "SUGGESTION_ONLY": 1, + "AUTO": 2 + } + } + } + }, + "ContentSearchSpec": { + "fields": { + "snippetSpec": { + "type": "SnippetSpec", + "id": 1 + }, + "summarySpec": { + "type": "SummarySpec", + "id": 2 + } + }, + "nested": { + "SnippetSpec": { + "fields": { + "maxSnippetCount": { + "type": "int32", + "id": 1 + }, + "referenceOnly": { + "type": "bool", + "id": 2 + } + } + }, + "SummarySpec": { + "fields": { + "summaryResultCount": { + "type": "int32", + "id": 1 + } + } + } + } + } + } + }, + "SearchResponse": { + "fields": { + "results": { + "rule": "repeated", + "type": "SearchResult", + "id": 1 + }, + "facets": { + "rule": "repeated", + "type": "Facet", + "id": 2 + }, + "guidedSearchResult": { + "type": "GuidedSearchResult", + "id": 8 + }, + "totalSize": { + "type": "int32", + "id": 3 + }, + "attributionToken": { + "type": "string", + "id": 4 + }, + "nextPageToken": { + "type": "string", + "id": 5 + }, + "correctedQuery": { + "type": "string", + "id": 7 + }, + "summary": { + "type": "Summary", + "id": 9 + }, + "appliedControls": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "SearchResult": { + "fields": { + "id": { + "type": "string", + "id": 1 + }, + "document": { + "type": "Document", + "id": 2 + } + } + }, + "Facet": { + "fields": { + "key": { + "type": "string", + "id": 1 + }, + "values": { + "rule": "repeated", + "type": "FacetValue", + "id": 2 + }, + "dynamicFacet": { + "type": "bool", + "id": 3 + } + }, + "nested": { + "FacetValue": { + "oneofs": { + "facetValue": { + "oneof": [ + "value", + "interval" + ] + } + }, + "fields": { + "value": { + "type": "string", + "id": 1 + }, + "interval": { + "type": "Interval", + "id": 2 + }, + "count": { + "type": "int64", + "id": 3 + } + } + } + } + }, + "GuidedSearchResult": { + "fields": { + "refinementAttributes": { + "rule": "repeated", + "type": "RefinementAttribute", + "id": 1 + } + }, + "nested": { + "RefinementAttribute": { + "fields": { + "attributeKey": { + "type": "string", + "id": 1 + }, + "attributeValue": { + "type": "string", + "id": 2 + } + } + } + } + }, + "Summary": { + "fields": { + "summaryText": { + "type": "string", + "id": 1 + } + } + } + } + }, + "UserEventService": { + "options": { + "(google.api.default_host)": "discoveryengine.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "WriteUserEvent": { + "requestType": "WriteUserEventRequest", + "responseType": "UserEvent", + "options": { + "(google.api.http).post": "/v1beta/{parent=projects/*/locations/*/dataStores/*}/userEvents:write", + "(google.api.http).body": "user_event", + "(google.api.http).additional_bindings.post": "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:write", + "(google.api.http).additional_bindings.body": "user_event" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{parent=projects/*/locations/*/dataStores/*}/userEvents:write", + "body": "user_event", + "additional_bindings": { + "post": "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:write", + "body": "user_event" + } + } + } + ] + }, + "CollectUserEvent": { + "requestType": "CollectUserEventRequest", + "responseType": "google.api.HttpBody", + "options": { + "(google.api.http).get": "/v1beta/{parent=projects/*/locations/*/dataStores/*}/userEvents:collect", + "(google.api.http).additional_bindings.get": "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:collect" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=projects/*/locations/*/dataStores/*}/userEvents:collect", + "additional_bindings": { + "get": "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:collect" + } + } + } + ] + }, + "ImportUserEvents": { + "requestType": "ImportUserEventsRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta/{parent=projects/*/locations/*/dataStores/*}/userEvents:import", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:import", + "(google.api.http).additional_bindings.body": "*", + "(google.longrunning.operation_info).response_type": "google.cloud.discoveryengine.v1beta.ImportUserEventsResponse", + "(google.longrunning.operation_info).metadata_type": "google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{parent=projects/*/locations/*/dataStores/*}/userEvents:import", + "body": "*", + "additional_bindings": { + "post": "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:import", + "body": "*" + } + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.cloud.discoveryengine.v1beta.ImportUserEventsResponse", + "metadata_type": "google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata" + } + } + ] + } + } + }, + "WriteUserEventRequest": { + "oneofs": { + "_userEvent": { + "oneof": [ + "userEvent" + ] + } + }, + "fields": { + "parent": { + "type": "string", + "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", "(google.api.resource_reference).type": "discoveryengine.googleapis.com/DataStore" @@ -1282,24 +2217,6 @@ } } }, - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions" - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6, - "NON_EMPTY_DEFAULT": 7 - } - }, "http": { "type": "HttpRule", "id": 72295728, @@ -1403,6 +2320,24 @@ "id": 1050, "extend": "google.protobuf.ServiceOptions" }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7 + } + }, "HttpBody": { "fields": { "contentType": { diff --git a/packages/google-cloud-discoveryengine/samples/README.md b/packages/google-cloud-discoveryengine/samples/README.md index cb3e8e74353..c0fff948a8b 100644 --- a/packages/google-cloud-discoveryengine/samples/README.md +++ b/packages/google-cloud-discoveryengine/samples/README.md @@ -12,13 +12,21 @@ * [Before you begin](#before-you-begin) * [Samples](#samples) + * [Completion_service.complete_query](#completion_service.complete_query) * [Document_service.create_document](#document_service.create_document) * [Document_service.delete_document](#document_service.delete_document) * [Document_service.get_document](#document_service.get_document) * [Document_service.import_documents](#document_service.import_documents) * [Document_service.list_documents](#document_service.list_documents) + * [Document_service.purge_documents](#document_service.purge_documents) * [Document_service.update_document](#document_service.update_document) * [Recommendation_service.recommend](#recommendation_service.recommend) + * [Schema_service.create_schema](#schema_service.create_schema) + * [Schema_service.delete_schema](#schema_service.delete_schema) + * [Schema_service.get_schema](#schema_service.get_schema) + * [Schema_service.list_schemas](#schema_service.list_schemas) + * [Schema_service.update_schema](#schema_service.update_schema) + * [Search_service.search](#search_service.search) * [User_event_service.collect_user_event](#user_event_service.collect_user_event) * [User_event_service.import_user_events](#user_event_service.import_user_events) * [User_event_service.write_user_event](#user_event_service.write_user_event) @@ -40,6 +48,23 @@ Before running the samples, make sure you've followed the steps outlined in +### Completion_service.complete_query + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/completion_service.complete_query.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/completion_service.complete_query.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-discoveryengine/samples/generated/v1beta/completion_service.complete_query.js` + + +----- + + + + ### Document_service.create_document View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.create_document.js). @@ -125,6 +150,23 @@ __Usage:__ +### Document_service.purge_documents + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.purge_documents.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.purge_documents.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.purge_documents.js` + + +----- + + + + ### Document_service.update_document View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.update_document.js). @@ -159,6 +201,108 @@ __Usage:__ +### Schema_service.create_schema + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.create_schema.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.create_schema.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.create_schema.js` + + +----- + + + + +### Schema_service.delete_schema + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.delete_schema.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.delete_schema.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.delete_schema.js` + + +----- + + + + +### Schema_service.get_schema + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.get_schema.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.get_schema.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.get_schema.js` + + +----- + + + + +### Schema_service.list_schemas + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.list_schemas.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.list_schemas.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.list_schemas.js` + + +----- + + + + +### Schema_service.update_schema + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.update_schema.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.update_schema.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.update_schema.js` + + +----- + + + + +### Search_service.search + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/search_service.search.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/search_service.search.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-discoveryengine/samples/generated/v1beta/search_service.search.js` + + +----- + + + + ### User_event_service.collect_user_event View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/user_event_service.collect_user_event.js). diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1beta/completion_service.complete_query.js b/packages/google-cloud-discoveryengine/samples/generated/v1beta/completion_service.complete_query.js new file mode 100644 index 00000000000..995d079ea2f --- /dev/null +++ b/packages/google-cloud-discoveryengine/samples/generated/v1beta/completion_service.complete_query.js @@ -0,0 +1,99 @@ +// Copyright 2023 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(dataStore, query) { + // [START discoveryengine_v1beta_generated_CompletionService_CompleteQuery_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 data store resource name for which the completion is + * performed, such as + * `projects/* /locations/global/collections/default_collection/dataStores/default_data_store`. + */ + // const dataStore = 'abc123' + /** + * Required. The typeahead input used to fetch suggestions. Maximum length is + * 128 characters. + */ + // const query = 'abc123' + /** + * Selects data model of query suggestions for serving. Currently supported + * values: + * * `document` - Using suggestions generated from user-imported documents. + * * `search-history` - Using suggestions generated from the past history of + * SearchService.Search google.cloud.discoveryengine.v1beta.SearchService.Search + * API calls. Do not use it when there is no traffic for Search API. + * * `user-event` - Using suggestions generated from user-imported search + * events. + * Default values: + * * `document` is the default model for regular dataStores. + * * `search-history` is the default model for + * IndustryVertical.SITE_SEARCH google.cloud.discoveryengine.v1beta.IndustryVertical.SITE_SEARCH + * dataStores. + */ + // const queryModel = 'abc123' + /** + * A unique identifier for tracking visitors. For example, this could be + * implemented with an HTTP cookie, which should be able to uniquely identify + * a visitor on a single device. This unique identifier should not change if + * the visitor logs in or out of the website. + * This field should NOT have a fixed value such as `unknown_visitor`. + * This should be the same identifier as + * UserEvent.user_pseudo_id google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id + * and + * SearchRequest.user_pseudo_id google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id. + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + */ + // const userPseudoId = 'abc123' + + // Imports the Discoveryengine library + const {CompletionServiceClient} = require('@google-cloud/discoveryengine').v1beta; + + // Instantiates a client + const discoveryengineClient = new CompletionServiceClient(); + + async function callCompleteQuery() { + // Construct request + const request = { + dataStore, + query, + }; + + // Run request + const response = await discoveryengineClient.completeQuery(request); + console.log(response); + } + + callCompleteQuery(); + // [END discoveryengine_v1beta_generated_CompletionService_CompleteQuery_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.create_document.js b/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.create_document.js index bb35ea1d817..e0c966b4a4a 100644 --- a/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.create_document.js +++ b/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.create_document.js @@ -45,14 +45,14 @@ function main(parent, document, documentId) { * Document.name google.cloud.discoveryengine.v1beta.Document.name. * If the caller does not have permission to create the * Document google.cloud.discoveryengine.v1beta.Document, regardless of - * whether or not it exists, a PERMISSION_DENIED error is returned. + * whether or not it exists, a `PERMISSION_DENIED` error is returned. * This field must be unique among all * Document google.cloud.discoveryengine.v1beta.Document s with the same * parent google.cloud.discoveryengine.v1beta.CreateDocumentRequest.parent. - * Otherwise, an ALREADY_EXISTS error is returned. + * Otherwise, an `ALREADY_EXISTS` error is returned. * This field must conform to RFC-1034 (https://tools.ietf.org/html/rfc1034) * standard with a length limit of 63 characters. Otherwise, an - * INVALID_ARGUMENT error is returned. + * `INVALID_ARGUMENT` error is returned. */ // const documentId = 'abc123' diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.delete_document.js b/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.delete_document.js index 273e48ccf3e..e51c6883909 100644 --- a/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.delete_document.js +++ b/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.delete_document.js @@ -34,9 +34,9 @@ function main(name) { * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. * If the caller does not have permission to delete the * Document google.cloud.discoveryengine.v1beta.Document, regardless of - * whether or not it exists, a PERMISSION_DENIED error is returned. + * whether or not it exists, a `PERMISSION_DENIED` error is returned. * If the Document google.cloud.discoveryengine.v1beta.Document to delete - * does not exist, a NOT_FOUND error is returned. + * does not exist, a `NOT_FOUND` error is returned. */ // const name = 'abc123' diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.get_document.js b/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.get_document.js index e6c3cad9470..2cfdd06e7c3 100644 --- a/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.get_document.js +++ b/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.get_document.js @@ -34,9 +34,9 @@ function main(name) { * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. * If the caller does not have permission to access the * Document google.cloud.discoveryengine.v1beta.Document, regardless of - * whether or not it exists, a PERMISSION_DENIED error is returned. + * whether or not it exists, a `PERMISSION_DENIED` error is returned. * If the requested Document google.cloud.discoveryengine.v1beta.Document - * does not exist, a NOT_FOUND error is returned. + * does not exist, a `NOT_FOUND` error is returned. */ // const name = 'abc123' diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.list_documents.js b/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.list_documents.js index a800c687df3..8df3c1c231a 100644 --- a/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.list_documents.js +++ b/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.list_documents.js @@ -35,14 +35,14 @@ function main(parent) { * branch. * If the caller does not have permission to list Documents s under this * branch, regardless of whether or not this branch exists, a - * PERMISSION_DENIED error is returned. + * `PERMISSION_DENIED` error is returned. */ // const parent = 'abc123' /** * Maximum number of Document google.cloud.discoveryengine.v1beta.Document s * to return. If unspecified, defaults to 100. The maximum allowed value is * 1000. Values above 1000 will be coerced to 1000. - * If this field is negative, an INVALID_ARGUMENT error is returned. + * If this field is negative, an `INVALID_ARGUMENT` error is returned. */ // const pageSize = 1234 /** @@ -54,7 +54,7 @@ function main(parent) { * When paginating, all other parameters provided to * DocumentService.ListDocuments google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments * must match the call that provided the page token. Otherwise, an - * INVALID_ARGUMENT error is returned. + * `INVALID_ARGUMENT` error is returned. */ // const pageToken = 'abc123' diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.purge_documents.js b/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.purge_documents.js new file mode 100644 index 00000000000..401b9486ac5 --- /dev/null +++ b/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.purge_documents.js @@ -0,0 +1,75 @@ +// Copyright 2023 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, filter) { + // [START discoveryengine_v1beta_generated_DocumentService_PurgeDocuments_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 name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + */ + // const parent = 'abc123' + /** + * Required. Filter matching documents to purge. Only currently supported + * value is + * `*` (all items). + */ + // const filter = 'abc123' + /** + * Actually performs the purge. If `force` is set to false, return the + * expected purge count without deleting any documents. + */ + // const force = true + + // Imports the Discoveryengine library + const {DocumentServiceClient} = require('@google-cloud/discoveryengine').v1beta; + + // Instantiates a client + const discoveryengineClient = new DocumentServiceClient(); + + async function callPurgeDocuments() { + // Construct request + const request = { + parent, + filter, + }; + + // Run request + const [operation] = await discoveryengineClient.purgeDocuments(request); + const [response] = await operation.promise(); + console.log(response); + } + + callPurgeDocuments(); + // [END discoveryengine_v1beta_generated_DocumentService_PurgeDocuments_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.update_document.js b/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.update_document.js index e6a628c2a81..30d95c05426 100644 --- a/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.update_document.js +++ b/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.update_document.js @@ -32,11 +32,11 @@ function main(document) { * Required. The document to update/create. * If the caller does not have permission to update the * Document google.cloud.discoveryengine.v1beta.Document, regardless of - * whether or not it exists, a PERMISSION_DENIED error is returned. + * whether or not it exists, a `PERMISSION_DENIED` error is returned. * If the Document google.cloud.discoveryengine.v1beta.Document to update * does not exist and * allow_missing google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.allow_missing - * is not set, a NOT_FOUND error is returned. + * is not set, a `NOT_FOUND` error is returned. */ // const document = {} /** diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1beta/recommendation_service.recommend.js b/packages/google-cloud-discoveryengine/samples/generated/v1beta/recommendation_service.recommend.js index b1ee2240765..334741b9a48 100644 --- a/packages/google-cloud-discoveryengine/samples/generated/v1beta/recommendation_service.recommend.js +++ b/packages/google-cloud-discoveryengine/samples/generated/v1beta/recommendation_service.recommend.js @@ -30,7 +30,7 @@ function main(servingConfig, userEvent) { */ /** * Required. Full resource name of the format: - * projects/* /locations/global/collections/* /dataStores/* /servingConfigs/* + * `projects/* /locations/global/collections/* /dataStores/* /servingConfigs/*` * Before you can request recommendations from your model, you must create at * least one serving config for it. */ @@ -65,15 +65,16 @@ function main(servingConfig, userEvent) { * characters. Currently, only filter expressions on the `filter_tags` * attribute is supported. * Examples: - * * (filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold")) - * * (filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green")) + * * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))` + * * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))` * If your filter blocks all results, the API will return generic * (unfiltered) popular Documents. If you only want results strictly matching * the filters, set `strictFiltering` to True in * RecommendRequest.params google.cloud.discoveryengine.v1beta.RecommendRequest.params * to receive empty results instead. - * Note that the API will never return Documents with storageStatus of - * "EXPIRED" or "DELETED" regardless of filter choices. + * Note that the API will never return + * Document google.cloud.discoveryengine.v1beta.Document s with + * `storageStatus` of `EXPIRED` or `DELETED` regardless of filter choices. */ // const filter = 'abc123' /** @@ -88,22 +89,22 @@ function main(servingConfig, userEvent) { * Allowed values: * * `returnDocument`: Boolean. If set to true, the associated Document * object will be returned in - * RecommendResponse.results.document RecommendationResult.document. + * RecommendResponse.RecommendationResult.document google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.document. * * `returnScore`: Boolean. If set to true, the recommendation 'score' * corresponding to each returned Document will be set in - * RecommendResponse.results.metadata RecommendationResult.metadata. The - * given 'score' indicates the probability of a Document conversion given - * the user's context and history. + * RecommendResponse.RecommendationResult.metadata google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.metadata. + * The given 'score' indicates the probability of a Document conversion + * given the user's context and history. * * `strictFiltering`: Boolean. True by default. If set to false, the service * will return generic (unfiltered) popular Documents instead of empty if * your filter blocks all recommendation results. * * `diversityLevel`: String. Default empty. If set to be non-empty, then * it needs to be one of: - * * 'no-diversity' - * * 'low-diversity' - * * 'medium-diversity' - * * 'high-diversity' - * * 'auto-diversity' + * * `no-diversity` + * * `low-diversity` + * * `medium-diversity` + * * `high-diversity` + * * `auto-diversity` * This gives request-level control and adjusts recommendation results * based on Document category. */ diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.create_schema.js b/packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.create_schema.js new file mode 100644 index 00000000000..0454db4f0eb --- /dev/null +++ b/packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.create_schema.js @@ -0,0 +1,80 @@ +// Copyright 2023 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, schema, schemaId) { + // [START discoveryengine_v1beta_generated_SchemaService_CreateSchema_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 data store resource name, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + */ + // const parent = 'abc123' + /** + * Required. The Schema google.cloud.discoveryengine.v1beta.Schema to + * create. + */ + // const schema = {} + /** + * Required. The ID to use for the + * Schema google.cloud.discoveryengine.v1beta.Schema, which will become the + * final component of the + * Schema.name google.cloud.discoveryengine.v1beta.Schema.name. + * This field should conform to + * RFC-1034 (https://tools.ietf.org/html/rfc1034) standard with a length + * limit of 63 characters. + */ + // const schemaId = 'abc123' + + // Imports the Discoveryengine library + const {SchemaServiceClient} = require('@google-cloud/discoveryengine').v1beta; + + // Instantiates a client + const discoveryengineClient = new SchemaServiceClient(); + + async function callCreateSchema() { + // Construct request + const request = { + parent, + schema, + schemaId, + }; + + // Run request + const [operation] = await discoveryengineClient.createSchema(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateSchema(); + // [END discoveryengine_v1beta_generated_SchemaService_CreateSchema_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.delete_schema.js b/packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.delete_schema.js new file mode 100644 index 00000000000..01e8dcd4bb6 --- /dev/null +++ b/packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.delete_schema.js @@ -0,0 +1,63 @@ +// Copyright 2023 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 discoveryengine_v1beta_generated_SchemaService_DeleteSchema_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 full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + */ + // const name = 'abc123' + + // Imports the Discoveryengine library + const {SchemaServiceClient} = require('@google-cloud/discoveryengine').v1beta; + + // Instantiates a client + const discoveryengineClient = new SchemaServiceClient(); + + async function callDeleteSchema() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await discoveryengineClient.deleteSchema(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteSchema(); + // [END discoveryengine_v1beta_generated_SchemaService_DeleteSchema_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.get_schema.js b/packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.get_schema.js new file mode 100644 index 00000000000..d537a5aa94d --- /dev/null +++ b/packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.get_schema.js @@ -0,0 +1,62 @@ +// Copyright 2023 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 discoveryengine_v1beta_generated_SchemaService_GetSchema_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 full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + */ + // const name = 'abc123' + + // Imports the Discoveryengine library + const {SchemaServiceClient} = require('@google-cloud/discoveryengine').v1beta; + + // Instantiates a client + const discoveryengineClient = new SchemaServiceClient(); + + async function callGetSchema() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await discoveryengineClient.getSchema(request); + console.log(response); + } + + callGetSchema(); + // [END discoveryengine_v1beta_generated_SchemaService_GetSchema_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.list_schemas.js b/packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.list_schemas.js new file mode 100644 index 00000000000..6c9338fc60e --- /dev/null +++ b/packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.list_schemas.js @@ -0,0 +1,81 @@ +// Copyright 2023 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 discoveryengine_v1beta_generated_SchemaService_ListSchemas_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 data store resource name, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + */ + // const parent = 'abc123' + /** + * The maximum number of Schema google.cloud.discoveryengine.v1beta.Schema s + * to return. The service may return fewer than this value. + * If unspecified, at most 100 + * Schema google.cloud.discoveryengine.v1beta.Schema s will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * A page token, received from a previous + * SchemaService.ListSchemas google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * SchemaService.ListSchemas google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Discoveryengine library + const {SchemaServiceClient} = require('@google-cloud/discoveryengine').v1beta; + + // Instantiates a client + const discoveryengineClient = new SchemaServiceClient(); + + async function callListSchemas() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await discoveryengineClient.listSchemasAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListSchemas(); + // [END discoveryengine_v1beta_generated_SchemaService_ListSchemas_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.update_schema.js b/packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.update_schema.js new file mode 100644 index 00000000000..54343865e4a --- /dev/null +++ b/packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.update_schema.js @@ -0,0 +1,70 @@ +// Copyright 2023 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(schema) { + // [START discoveryengine_v1beta_generated_SchemaService_UpdateSchema_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 Schema google.cloud.discoveryengine.v1beta.Schema to + * update. + */ + // const schema = {} + /** + * If set to true, and the + * Schema google.cloud.discoveryengine.v1beta.Schema is not found, a new + * Schema google.cloud.discoveryengine.v1beta.Schema will be created. In + * this situation, `update_mask` is ignored. + */ + // const allowMissing = true + + // Imports the Discoveryengine library + const {SchemaServiceClient} = require('@google-cloud/discoveryengine').v1beta; + + // Instantiates a client + const discoveryengineClient = new SchemaServiceClient(); + + async function callUpdateSchema() { + // Construct request + const request = { + schema, + }; + + // Run request + const [operation] = await discoveryengineClient.updateSchema(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateSchema(); + // [END discoveryengine_v1beta_generated_SchemaService_UpdateSchema_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1beta/search_service.search.js b/packages/google-cloud-discoveryengine/samples/generated/v1beta/search_service.search.js new file mode 100644 index 00000000000..1656df41e47 --- /dev/null +++ b/packages/google-cloud-discoveryengine/samples/generated/v1beta/search_service.search.js @@ -0,0 +1,171 @@ +// Copyright 2023 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(servingConfig) { + // [START discoveryengine_v1beta_generated_SearchService_Search_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 Search serving config, such as + * `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. + * This field is used to identify the serving configuration name, set + * of models used to make the search. + */ + // const servingConfig = 'abc123' + /** + * The branch resource name, such as + * `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/branches/0`. + * Use `default_branch` as the branch ID or leave this field empty, to search + * documents under the default branch. + */ + // const branch = 'abc123' + /** + * Raw search query. + */ + // const query = 'abc123' + /** + * Maximum number of Document google.cloud.discoveryengine.v1beta.Document s + * to return. If unspecified, defaults to a reasonable value. The maximum + * allowed value is 100. Values above 100 will be coerced to 100. + * If this field is negative, an `INVALID_ARGUMENT` is returned. + */ + // const pageSize = 1234 + /** + * A page token received from a previous + * SearchService.Search google.cloud.discoveryengine.v1beta.SearchService.Search + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * SearchService.Search google.cloud.discoveryengine.v1beta.SearchService.Search + * must match the call that provided the page token. Otherwise, an + * `INVALID_ARGUMENT` error is returned. + */ + // const pageToken = 'abc123' + /** + * A 0-indexed integer that specifies the current offset (that is, starting + * result location, amongst the + * Document google.cloud.discoveryengine.v1beta.Document s deemed by the API + * as relevant) in search results. This field is only considered if + * page_token google.cloud.discoveryengine.v1beta.SearchRequest.page_token + * is unset. + * If this field is negative, an `INVALID_ARGUMENT` is returned. + */ + // const offset = 1234 + /** + * The filter syntax consists of an expression language for constructing a + * predicate from one or more fields of the documents being filtered. Filter + * expression is case-sensitive. + * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + */ + // const filter = 'abc123' + /** + * The order in which documents are returned. Document can be ordered by + * a field in an Document google.cloud.discoveryengine.v1beta.Document + * object. Leave it unset if ordered by relevance. OrderBy expression is + * case-sensitive. + * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + */ + // const orderBy = 'abc123' + /** + * Facet specifications for faceted search. If empty, no facets are returned. + * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` + * error is returned. + */ + // const facetSpecs = 1234 + /** + * Boost specification to boost certain documents. + */ + // const boostSpec = {} + /** + * Additional search parameters. + * For + * IndustryVertical.SITE_SEARCH google.cloud.discoveryengine.v1beta.IndustryVertical.SITE_SEARCH + * vertical, supported values are: + * * `user_country_code`: string. Default empty. If set to non-empty, results + * are restricted or boosted based on the location provided. + * * `search_type`: double. Default empty. Enables non-webpage searching + * depending on the value. The only valid non-default value is 1, + * which enables image searching. + * This field is ignored for other verticals. + */ + // const params = 1234 + /** + * The query expansion specification that specifies the conditions under which + * query expansion will occur. + */ + // const queryExpansionSpec = {} + /** + * The spell correction specification that specifies the mode under + * which spell correction will take effect. + */ + // const spellCorrectionSpec = {} + /** + * A unique identifier for tracking visitors. For example, this could be + * implemented with an HTTP cookie, which should be able to uniquely identify + * a visitor on a single device. This unique identifier should not change if + * the visitor logs in or out of the website. + * This field should NOT have a fixed value such as `unknown_visitor`. + * This should be the same identifier as + * UserEvent.user_pseudo_id google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id + * and + * CompleteQueryRequest.user_pseudo_id google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + */ + // const userPseudoId = 'abc123' + /** + * The content search spec that configs the desired behavior of content + * search. + */ + // const contentSearchSpec = {} + + // Imports the Discoveryengine library + const {SearchServiceClient} = require('@google-cloud/discoveryengine').v1beta; + + // Instantiates a client + const discoveryengineClient = new SearchServiceClient(); + + async function callSearch() { + // Construct request + const request = { + servingConfig, + }; + + // Run request + const iterable = await discoveryengineClient.searchAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callSearch(); + // [END discoveryengine_v1beta_generated_SearchService_Search_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-discoveryengine/samples/generated/v1beta/snippet_metadata.google.cloud.discoveryengine.v1beta.json b/packages/google-cloud-discoveryengine/samples/generated/v1beta/snippet_metadata.google.cloud.discoveryengine.v1beta.json index 24622a35314..35e9bcf924f 100644 --- a/packages/google-cloud-discoveryengine/samples/generated/v1beta/snippet_metadata.google.cloud.discoveryengine.v1beta.json +++ b/packages/google-cloud-discoveryengine/samples/generated/v1beta/snippet_metadata.google.cloud.discoveryengine.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-discoveryengine", - "version": "0.4.0", + "version": "0.6.0", "language": "TYPESCRIPT", "apis": [ { @@ -11,9 +11,61 @@ ] }, "snippets": [ + { + "regionTag": "discoveryengine_v1beta_generated_CompletionService_CompleteQuery_async", + "title": "CompletionService completeQuery Sample", + "origin": "API_DEFINITION", + "description": " Completes the specified user input with keyword suggestions.", + "canonical": true, + "file": "completion_service.complete_query.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 91, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CompleteQuery", + "fullName": "google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery", + "async": true, + "parameters": [ + { + "name": "data_store", + "type": "TYPE_STRING" + }, + { + "name": "query", + "type": "TYPE_STRING" + }, + { + "name": "query_model", + "type": "TYPE_STRING" + }, + { + "name": "user_pseudo_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.discoveryengine.v1beta.CompleteQueryResponse", + "client": { + "shortName": "CompletionServiceClient", + "fullName": "google.cloud.discoveryengine.v1beta.CompletionServiceClient" + }, + "method": { + "shortName": "CompleteQuery", + "fullName": "google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery", + "service": { + "shortName": "CompletionService", + "fullName": "google.cloud.discoveryengine.v1beta.CompletionService" + } + } + } + }, { "regionTag": "discoveryengine_v1beta_generated_DocumentService_GetDocument_async", - "title": "DocumentService getDocument Sample", + "title": "CompletionService getDocument Sample", "origin": "API_DEFINITION", "description": " Gets a [Document][google.cloud.discoveryengine.v1beta.Document].", "canonical": true, @@ -53,7 +105,7 @@ }, { "regionTag": "discoveryengine_v1beta_generated_DocumentService_ListDocuments_async", - "title": "DocumentService listDocuments Sample", + "title": "CompletionService listDocuments Sample", "origin": "API_DEFINITION", "description": " Gets a list of [Document][google.cloud.discoveryengine.v1beta.Document]s.", "canonical": true, @@ -101,7 +153,7 @@ }, { "regionTag": "discoveryengine_v1beta_generated_DocumentService_CreateDocument_async", - "title": "DocumentService createDocument Sample", + "title": "CompletionService createDocument Sample", "origin": "API_DEFINITION", "description": " Creates a [Document][google.cloud.discoveryengine.v1beta.Document].", "canonical": true, @@ -149,7 +201,7 @@ }, { "regionTag": "discoveryengine_v1beta_generated_DocumentService_UpdateDocument_async", - "title": "DocumentService updateDocument Sample", + "title": "CompletionService updateDocument Sample", "origin": "API_DEFINITION", "description": " Updates a [Document][google.cloud.discoveryengine.v1beta.Document].", "canonical": true, @@ -193,7 +245,7 @@ }, { "regionTag": "discoveryengine_v1beta_generated_DocumentService_DeleteDocument_async", - "title": "DocumentService deleteDocument Sample", + "title": "CompletionService deleteDocument Sample", "origin": "API_DEFINITION", "description": " Deletes a [Document][google.cloud.discoveryengine.v1beta.Document].", "canonical": true, @@ -233,7 +285,7 @@ }, { "regionTag": "discoveryengine_v1beta_generated_DocumentService_ImportDocuments_async", - "title": "DocumentService importDocuments Sample", + "title": "CompletionService importDocuments Sample", "origin": "API_DEFINITION", "description": " Bulk import of multiple [Document][google.cloud.discoveryengine.v1beta.Document]s. Request processing may be synchronous. Non-existing items will be created. Note: It is possible for a subset of the [Document][google.cloud.discoveryengine.v1beta.Document]s to be successfully updated.", "canonical": true, @@ -291,9 +343,57 @@ } } }, + { + "regionTag": "discoveryengine_v1beta_generated_DocumentService_PurgeDocuments_async", + "title": "CompletionService purgeDocuments Sample", + "origin": "API_DEFINITION", + "description": " Permanently deletes all selected [Document][google.cloud.discoveryengine.v1beta.Document]s in a branch. This process is asynchronous. Depending on the number of [Document][google.cloud.discoveryengine.v1beta.Document]s to be deleted, this operation can take hours to complete. Before the delete operation completes, some [Document][google.cloud.discoveryengine.v1beta.Document]s might still be returned by [DocumentService.GetDocument][google.cloud.discoveryengine.v1beta.DocumentService.GetDocument] or [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments]. To get a list of the [Document][google.cloud.discoveryengine.v1beta.Document]s to be deleted, set [PurgeDocumentsRequest.force][google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest.force] to false.", + "canonical": true, + "file": "document_service.purge_documents.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "PurgeDocuments", + "fullName": "google.cloud.discoveryengine.v1beta.DocumentService.PurgeDocuments", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "DocumentServiceClient", + "fullName": "google.cloud.discoveryengine.v1beta.DocumentServiceClient" + }, + "method": { + "shortName": "PurgeDocuments", + "fullName": "google.cloud.discoveryengine.v1beta.DocumentService.PurgeDocuments", + "service": { + "shortName": "DocumentService", + "fullName": "google.cloud.discoveryengine.v1beta.DocumentService" + } + } + } + }, { "regionTag": "discoveryengine_v1beta_generated_RecommendationService_Recommend_async", - "title": "DocumentService recommend Sample", + "title": "CompletionService recommend Sample", "origin": "API_DEFINITION", "description": " Makes a recommendation, which requires a contextual user event.", "canonical": true, @@ -302,7 +402,7 @@ "segments": [ { "start": 25, - "end": 148, + "end": 149, "type": "FULL" } ], @@ -355,9 +455,325 @@ } } }, + { + "regionTag": "discoveryengine_v1beta_generated_SchemaService_GetSchema_async", + "title": "CompletionService getSchema Sample", + "origin": "API_DEFINITION", + "description": " Gets a [Schema][google.cloud.discoveryengine.v1beta.Schema].", + "canonical": true, + "file": "schema_service.get_schema.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetSchema", + "fullName": "google.cloud.discoveryengine.v1beta.SchemaService.GetSchema", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.discoveryengine.v1beta.Schema", + "client": { + "shortName": "SchemaServiceClient", + "fullName": "google.cloud.discoveryengine.v1beta.SchemaServiceClient" + }, + "method": { + "shortName": "GetSchema", + "fullName": "google.cloud.discoveryengine.v1beta.SchemaService.GetSchema", + "service": { + "shortName": "SchemaService", + "fullName": "google.cloud.discoveryengine.v1beta.SchemaService" + } + } + } + }, + { + "regionTag": "discoveryengine_v1beta_generated_SchemaService_ListSchemas_async", + "title": "CompletionService listSchemas Sample", + "origin": "API_DEFINITION", + "description": " Gets a list of [Schema][google.cloud.discoveryengine.v1beta.Schema]s.", + "canonical": true, + "file": "schema_service.list_schemas.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 73, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListSchemas", + "fullName": "google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.discoveryengine.v1beta.ListSchemasResponse", + "client": { + "shortName": "SchemaServiceClient", + "fullName": "google.cloud.discoveryengine.v1beta.SchemaServiceClient" + }, + "method": { + "shortName": "ListSchemas", + "fullName": "google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas", + "service": { + "shortName": "SchemaService", + "fullName": "google.cloud.discoveryengine.v1beta.SchemaService" + } + } + } + }, + { + "regionTag": "discoveryengine_v1beta_generated_SchemaService_CreateSchema_async", + "title": "CompletionService createSchema Sample", + "origin": "API_DEFINITION", + "description": " Creates a [Schema][google.cloud.discoveryengine.v1beta.Schema].", + "canonical": true, + "file": "schema_service.create_schema.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateSchema", + "fullName": "google.cloud.discoveryengine.v1beta.SchemaService.CreateSchema", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "schema", + "type": ".google.cloud.discoveryengine.v1beta.Schema" + }, + { + "name": "schema_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "SchemaServiceClient", + "fullName": "google.cloud.discoveryengine.v1beta.SchemaServiceClient" + }, + "method": { + "shortName": "CreateSchema", + "fullName": "google.cloud.discoveryengine.v1beta.SchemaService.CreateSchema", + "service": { + "shortName": "SchemaService", + "fullName": "google.cloud.discoveryengine.v1beta.SchemaService" + } + } + } + }, + { + "regionTag": "discoveryengine_v1beta_generated_SchemaService_UpdateSchema_async", + "title": "CompletionService updateSchema Sample", + "origin": "API_DEFINITION", + "description": " Updates a [Schema][google.cloud.discoveryengine.v1beta.Schema].", + "canonical": true, + "file": "schema_service.update_schema.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateSchema", + "fullName": "google.cloud.discoveryengine.v1beta.SchemaService.UpdateSchema", + "async": true, + "parameters": [ + { + "name": "schema", + "type": ".google.cloud.discoveryengine.v1beta.Schema" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "SchemaServiceClient", + "fullName": "google.cloud.discoveryengine.v1beta.SchemaServiceClient" + }, + "method": { + "shortName": "UpdateSchema", + "fullName": "google.cloud.discoveryengine.v1beta.SchemaService.UpdateSchema", + "service": { + "shortName": "SchemaService", + "fullName": "google.cloud.discoveryengine.v1beta.SchemaService" + } + } + } + }, + { + "regionTag": "discoveryengine_v1beta_generated_SchemaService_DeleteSchema_async", + "title": "CompletionService deleteSchema Sample", + "origin": "API_DEFINITION", + "description": " Deletes a [Schema][google.cloud.discoveryengine.v1beta.Schema].", + "canonical": true, + "file": "schema_service.delete_schema.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteSchema", + "fullName": "google.cloud.discoveryengine.v1beta.SchemaService.DeleteSchema", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "SchemaServiceClient", + "fullName": "google.cloud.discoveryengine.v1beta.SchemaServiceClient" + }, + "method": { + "shortName": "DeleteSchema", + "fullName": "google.cloud.discoveryengine.v1beta.SchemaService.DeleteSchema", + "service": { + "shortName": "SchemaService", + "fullName": "google.cloud.discoveryengine.v1beta.SchemaService" + } + } + } + }, + { + "regionTag": "discoveryengine_v1beta_generated_SearchService_Search_async", + "title": "CompletionService search Sample", + "origin": "API_DEFINITION", + "description": " Performs a search.", + "canonical": true, + "file": "search_service.search.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 163, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "Search", + "fullName": "google.cloud.discoveryengine.v1beta.SearchService.Search", + "async": true, + "parameters": [ + { + "name": "serving_config", + "type": "TYPE_STRING" + }, + { + "name": "branch", + "type": "TYPE_STRING" + }, + { + "name": "query", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "offset", + "type": "TYPE_INT32" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "facet_specs", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "boost_spec", + "type": ".google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec" + }, + { + "name": "params", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "query_expansion_spec", + "type": ".google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec" + }, + { + "name": "spell_correction_spec", + "type": ".google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec" + }, + { + "name": "user_pseudo_id", + "type": "TYPE_STRING" + }, + { + "name": "content_search_spec", + "type": ".google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec" + } + ], + "resultType": ".google.cloud.discoveryengine.v1beta.SearchResponse", + "client": { + "shortName": "SearchServiceClient", + "fullName": "google.cloud.discoveryengine.v1beta.SearchServiceClient" + }, + "method": { + "shortName": "Search", + "fullName": "google.cloud.discoveryengine.v1beta.SearchService.Search", + "service": { + "shortName": "SearchService", + "fullName": "google.cloud.discoveryengine.v1beta.SearchService" + } + } + } + }, { "regionTag": "discoveryengine_v1beta_generated_UserEventService_WriteUserEvent_async", - "title": "DocumentService writeUserEvent Sample", + "title": "CompletionService writeUserEvent Sample", "origin": "API_DEFINITION", "description": " Writes a single user event.", "canonical": true, @@ -401,7 +817,7 @@ }, { "regionTag": "discoveryengine_v1beta_generated_UserEventService_CollectUserEvent_async", - "title": "DocumentService collectUserEvent Sample", + "title": "CompletionService collectUserEvent Sample", "origin": "API_DEFINITION", "description": " Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a 3rd party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly.", "canonical": true, @@ -453,7 +869,7 @@ }, { "regionTag": "discoveryengine_v1beta_generated_UserEventService_ImportUserEvents_async", - "title": "DocumentService importUserEvents Sample", + "title": "CompletionService importUserEvents Sample", "origin": "API_DEFINITION", "description": " Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted. Operation.metadata is of type ImportMetadata.", "canonical": true, diff --git a/packages/google-cloud-discoveryengine/samples/package.json b/packages/google-cloud-discoveryengine/samples/package.json index cc989d58524..1fed6dae5d8 100644 --- a/packages/google-cloud-discoveryengine/samples/package.json +++ b/packages/google-cloud-discoveryengine/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/discoveryengine": "^0.4.1" + "@google-cloud/discoveryengine": "^0.6.0" }, "devDependencies": { "c8": "^7.1.0", diff --git a/packages/google-cloud-discoveryengine/src/index.ts b/packages/google-cloud-discoveryengine/src/index.ts index a01ba4b4d3f..0a2d2bbdd80 100644 --- a/packages/google-cloud-discoveryengine/src/index.ts +++ b/packages/google-cloud-discoveryengine/src/index.ts @@ -18,23 +18,35 @@ import * as v1beta from './v1beta'; +const CompletionServiceClient = v1beta.CompletionServiceClient; +type CompletionServiceClient = v1beta.CompletionServiceClient; const DocumentServiceClient = v1beta.DocumentServiceClient; type DocumentServiceClient = v1beta.DocumentServiceClient; const RecommendationServiceClient = v1beta.RecommendationServiceClient; type RecommendationServiceClient = v1beta.RecommendationServiceClient; +const SchemaServiceClient = v1beta.SchemaServiceClient; +type SchemaServiceClient = v1beta.SchemaServiceClient; +const SearchServiceClient = v1beta.SearchServiceClient; +type SearchServiceClient = v1beta.SearchServiceClient; const UserEventServiceClient = v1beta.UserEventServiceClient; type UserEventServiceClient = v1beta.UserEventServiceClient; export { v1beta, + CompletionServiceClient, DocumentServiceClient, RecommendationServiceClient, + SchemaServiceClient, + SearchServiceClient, UserEventServiceClient, }; export default { v1beta, + CompletionServiceClient, DocumentServiceClient, RecommendationServiceClient, + SchemaServiceClient, + SearchServiceClient, UserEventServiceClient, }; import * as protos from '../protos/protos'; diff --git a/packages/google-cloud-discoveryengine/src/v1beta/completion_service_client.ts b/packages/google-cloud-discoveryengine/src/v1beta/completion_service_client.ts new file mode 100644 index 00000000000..433e2409707 --- /dev/null +++ b/packages/google-cloud-discoveryengine/src/v1beta/completion_service_client.ts @@ -0,0 +1,1053 @@ +// Copyright 2023 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, +} from 'google-gax'; + +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1beta/completion_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './completion_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service for Auto-Completion. + * @class + * @memberof v1beta + */ +export class CompletionServiceClient { + 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}; + 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}; + completionServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of CompletionServiceClient. + * + * @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://developers.google.com/identity/protocols/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 | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * 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 CompletionServiceClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof CompletionServiceClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.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 !== staticMembers.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 = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && '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 if (opts.fallback === 'rest') { + 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 = { + projectLocationCollectionDataStorePathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}' + ), + projectLocationCollectionDataStoreBranchDocumentPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}' + ), + projectLocationCollectionDataStoreSchemaPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}' + ), + projectLocationDataStorePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}' + ), + projectLocationDataStoreBranchDocumentPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}' + ), + projectLocationDataStoreSchemaPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.discoveryengine.v1beta.CompletionService', + 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.completionServiceStub) { + return this.completionServiceStub; + } + + // Put together the "service stub" for + // google.cloud.discoveryengine.v1beta.CompletionService. + this.completionServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.discoveryengine.v1beta.CompletionService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.discoveryengine.v1beta + .CompletionService, + 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 completionServiceStubMethods = ['completeQuery']; + for (const methodName of completionServiceStubMethods) { + const callPromise = this.completionServiceStub.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 = undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.completionServiceStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'discoveryengine.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'discoveryengine.googleapis.com'; + } + + /** + * 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/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 -- + // ------------------- + /** + * Completes the specified user input with keyword suggestions. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.dataStore + * Required. The parent data store resource name for which the completion is + * performed, such as + * `projects/* /locations/global/collections/default_collection/dataStores/default_data_store`. + * @param {string} request.query + * Required. The typeahead input used to fetch suggestions. Maximum length is + * 128 characters. + * @param {string} request.queryModel + * Selects data model of query suggestions for serving. Currently supported + * values: + * + * * `document` - Using suggestions generated from user-imported documents. + * * `search-history` - Using suggestions generated from the past history of + * {@link google.cloud.discoveryengine.v1beta.SearchService.Search|SearchService.Search} + * API calls. Do not use it when there is no traffic for Search API. + * * `user-event` - Using suggestions generated from user-imported search + * events. + * + * Default values: + * + * * `document` is the default model for regular dataStores. + * * `search-history` is the default model for + * {@link google.cloud.discoveryengine.v1beta.IndustryVertical.SITE_SEARCH|IndustryVertical.SITE_SEARCH} + * dataStores. + * @param {string} request.userPseudoId + * A unique identifier for tracking visitors. For example, this could be + * implemented with an HTTP cookie, which should be able to uniquely identify + * a visitor on a single device. This unique identifier should not change if + * the visitor logs in or out of the website. + * + * This field should NOT have a fixed value such as `unknown_visitor`. + * + * This should be the same identifier as + * {@link google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id|UserEvent.user_pseudo_id} + * and + * {@link google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id|SearchRequest.user_pseudo_id}. + * + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * @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 google.cloud.discoveryengine.v1beta.CompleteQueryResponse | CompleteQueryResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/completion_service.complete_query.js + * region_tag:discoveryengine_v1beta_generated_CompletionService_CompleteQuery_async + */ + completeQuery( + request?: protos.google.cloud.discoveryengine.v1beta.ICompleteQueryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.discoveryengine.v1beta.ICompleteQueryResponse, + ( + | protos.google.cloud.discoveryengine.v1beta.ICompleteQueryRequest + | undefined + ), + {} | undefined + ] + >; + completeQuery( + request: protos.google.cloud.discoveryengine.v1beta.ICompleteQueryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.discoveryengine.v1beta.ICompleteQueryResponse, + | protos.google.cloud.discoveryengine.v1beta.ICompleteQueryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + completeQuery( + request: protos.google.cloud.discoveryengine.v1beta.ICompleteQueryRequest, + callback: Callback< + protos.google.cloud.discoveryengine.v1beta.ICompleteQueryResponse, + | protos.google.cloud.discoveryengine.v1beta.ICompleteQueryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + completeQuery( + request?: protos.google.cloud.discoveryengine.v1beta.ICompleteQueryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.discoveryengine.v1beta.ICompleteQueryResponse, + | protos.google.cloud.discoveryengine.v1beta.ICompleteQueryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.discoveryengine.v1beta.ICompleteQueryResponse, + | protos.google.cloud.discoveryengine.v1beta.ICompleteQueryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.discoveryengine.v1beta.ICompleteQueryResponse, + ( + | protos.google.cloud.discoveryengine.v1beta.ICompleteQueryRequest + | 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_store: request.dataStore ?? '', + }); + this.initialize(); + return this.innerApiCalls.completeQuery(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified projectLocationCollectionDataStore resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStorePath( + project: string, + location: string, + collection: string, + dataStore: string + ) { + return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStore resource. + * + * @param {string} projectLocationCollectionDataStoreName + * A fully-qualified path representing project_location_collection_data_store resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreName( + projectLocationCollectionDataStoreName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match( + projectLocationCollectionDataStoreName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStore resource. + * + * @param {string} projectLocationCollectionDataStoreName + * A fully-qualified path representing project_location_collection_data_store resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreName( + projectLocationCollectionDataStoreName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match( + projectLocationCollectionDataStoreName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStore resource. + * + * @param {string} projectLocationCollectionDataStoreName + * A fully-qualified path representing project_location_collection_data_store resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreName( + projectLocationCollectionDataStoreName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match( + projectLocationCollectionDataStoreName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStore resource. + * + * @param {string} projectLocationCollectionDataStoreName + * A fully-qualified path representing project_location_collection_data_store resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreName( + projectLocationCollectionDataStoreName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match( + projectLocationCollectionDataStoreName + ).data_store; + } + + /** + * Return a fully-qualified projectLocationCollectionDataStoreBranchDocument resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreBranchDocumentPath( + project: string, + location: string, + collection: string, + dataStore: string, + branch: string, + document: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + branch: branch, + document: document, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreBranchDocument resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentName + * A fully-qualified path representing project_location_collection_data_store_branch_document resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreBranchDocumentName( + projectLocationCollectionDataStoreBranchDocumentName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreBranchDocument resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentName + * A fully-qualified path representing project_location_collection_data_store_branch_document resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreBranchDocumentName( + projectLocationCollectionDataStoreBranchDocumentName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreBranchDocument resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentName + * A fully-qualified path representing project_location_collection_data_store_branch_document resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentName( + projectLocationCollectionDataStoreBranchDocumentName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocument resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentName + * A fully-qualified path representing project_location_collection_data_store_branch_document resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentName( + projectLocationCollectionDataStoreBranchDocumentName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationCollectionDataStoreBranchDocument resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentName + * A fully-qualified path representing project_location_collection_data_store_branch_document resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationCollectionDataStoreBranchDocumentName( + projectLocationCollectionDataStoreBranchDocumentName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentName + ).branch; + } + + /** + * Parse the document from ProjectLocationCollectionDataStoreBranchDocument resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentName + * A fully-qualified path representing project_location_collection_data_store_branch_document resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName( + projectLocationCollectionDataStoreBranchDocumentName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentName + ).document; + } + + /** + * Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} schema + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreSchemaPath( + project: string, + location: string, + collection: string, + dataStore: string, + schema: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + schema: schema, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreSchema resource. + * + * @param {string} projectLocationCollectionDataStoreSchemaName + * A fully-qualified path representing project_location_collection_data_store_schema resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreSchemaName( + projectLocationCollectionDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match( + projectLocationCollectionDataStoreSchemaName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreSchema resource. + * + * @param {string} projectLocationCollectionDataStoreSchemaName + * A fully-qualified path representing project_location_collection_data_store_schema resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreSchemaName( + projectLocationCollectionDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match( + projectLocationCollectionDataStoreSchemaName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreSchema resource. + * + * @param {string} projectLocationCollectionDataStoreSchemaName + * A fully-qualified path representing project_location_collection_data_store_schema resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreSchemaName( + projectLocationCollectionDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match( + projectLocationCollectionDataStoreSchemaName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreSchema resource. + * + * @param {string} projectLocationCollectionDataStoreSchemaName + * A fully-qualified path representing project_location_collection_data_store_schema resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreSchemaName( + projectLocationCollectionDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match( + projectLocationCollectionDataStoreSchemaName + ).data_store; + } + + /** + * Parse the schema from ProjectLocationCollectionDataStoreSchema resource. + * + * @param {string} projectLocationCollectionDataStoreSchemaName + * A fully-qualified path representing project_location_collection_data_store_schema resource. + * @returns {string} A string representing the schema. + */ + matchSchemaFromProjectLocationCollectionDataStoreSchemaName( + projectLocationCollectionDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match( + projectLocationCollectionDataStoreSchemaName + ).schema; + } + + /** + * Return a fully-qualified projectLocationDataStore resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @returns {string} Resource name string. + */ + projectLocationDataStorePath( + project: string, + location: string, + dataStore: string + ) { + return this.pathTemplates.projectLocationDataStorePathTemplate.render({ + project: project, + location: location, + data_store: dataStore, + }); + } + + /** + * Parse the project from ProjectLocationDataStore resource. + * + * @param {string} projectLocationDataStoreName + * A fully-qualified path representing project_location_data_store resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreName( + projectLocationDataStoreName: string + ) { + return this.pathTemplates.projectLocationDataStorePathTemplate.match( + projectLocationDataStoreName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStore resource. + * + * @param {string} projectLocationDataStoreName + * A fully-qualified path representing project_location_data_store resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreName( + projectLocationDataStoreName: string + ) { + return this.pathTemplates.projectLocationDataStorePathTemplate.match( + projectLocationDataStoreName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStore resource. + * + * @param {string} projectLocationDataStoreName + * A fully-qualified path representing project_location_data_store resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreName( + projectLocationDataStoreName: string + ) { + return this.pathTemplates.projectLocationDataStorePathTemplate.match( + projectLocationDataStoreName + ).data_store; + } + + /** + * Return a fully-qualified projectLocationDataStoreBranchDocument resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @returns {string} Resource name string. + */ + projectLocationDataStoreBranchDocumentPath( + project: string, + location: string, + dataStore: string, + branch: string, + document: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + branch: branch, + document: document, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreBranchDocument resource. + * + * @param {string} projectLocationDataStoreBranchDocumentName + * A fully-qualified path representing project_location_data_store_branch_document resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreBranchDocumentName( + projectLocationDataStoreBranchDocumentName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match( + projectLocationDataStoreBranchDocumentName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreBranchDocument resource. + * + * @param {string} projectLocationDataStoreBranchDocumentName + * A fully-qualified path representing project_location_data_store_branch_document resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreBranchDocumentName( + projectLocationDataStoreBranchDocumentName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match( + projectLocationDataStoreBranchDocumentName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreBranchDocument resource. + * + * @param {string} projectLocationDataStoreBranchDocumentName + * A fully-qualified path representing project_location_data_store_branch_document resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreBranchDocumentName( + projectLocationDataStoreBranchDocumentName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match( + projectLocationDataStoreBranchDocumentName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationDataStoreBranchDocument resource. + * + * @param {string} projectLocationDataStoreBranchDocumentName + * A fully-qualified path representing project_location_data_store_branch_document resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationDataStoreBranchDocumentName( + projectLocationDataStoreBranchDocumentName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match( + projectLocationDataStoreBranchDocumentName + ).branch; + } + + /** + * Parse the document from ProjectLocationDataStoreBranchDocument resource. + * + * @param {string} projectLocationDataStoreBranchDocumentName + * A fully-qualified path representing project_location_data_store_branch_document resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationDataStoreBranchDocumentName( + projectLocationDataStoreBranchDocumentName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match( + projectLocationDataStoreBranchDocumentName + ).document; + } + + /** + * Return a fully-qualified projectLocationDataStoreSchema resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} schema + * @returns {string} Resource name string. + */ + projectLocationDataStoreSchemaPath( + project: string, + location: string, + dataStore: string, + schema: string + ) { + return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + schema: schema, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreSchema resource. + * + * @param {string} projectLocationDataStoreSchemaName + * A fully-qualified path representing project_location_data_store_schema resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreSchemaName( + projectLocationDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match( + projectLocationDataStoreSchemaName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreSchema resource. + * + * @param {string} projectLocationDataStoreSchemaName + * A fully-qualified path representing project_location_data_store_schema resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreSchemaName( + projectLocationDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match( + projectLocationDataStoreSchemaName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreSchema resource. + * + * @param {string} projectLocationDataStoreSchemaName + * A fully-qualified path representing project_location_data_store_schema resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreSchemaName( + projectLocationDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match( + projectLocationDataStoreSchemaName + ).data_store; + } + + /** + * Parse the schema from ProjectLocationDataStoreSchema resource. + * + * @param {string} projectLocationDataStoreSchemaName + * A fully-qualified path representing project_location_data_store_schema resource. + * @returns {string} A string representing the schema. + */ + matchSchemaFromProjectLocationDataStoreSchemaName( + projectLocationDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match( + projectLocationDataStoreSchemaName + ).schema; + } + + /** + * 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.completionServiceStub && !this._terminated) { + return this.completionServiceStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-discoveryengine/src/v1beta/completion_service_client_config.json b/packages/google-cloud-discoveryengine/src/v1beta/completion_service_client_config.json new file mode 100644 index 00000000000..9839a098d04 --- /dev/null +++ b/packages/google-cloud-discoveryengine/src/v1beta/completion_service_client_config.json @@ -0,0 +1,43 @@ +{ + "interfaces": { + "google.cloud.discoveryengine.v1beta.CompletionService": { + "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 + }, + "319f27672a8be83550d842a373549dd84649a57e": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 5000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CompleteQuery": { + "timeout_millis": 5000, + "retry_codes_name": "unavailable", + "retry_params_name": "319f27672a8be83550d842a373549dd84649a57e" + } + } + } + } +} diff --git a/packages/google-cloud-discoveryengine/src/v1beta/completion_service_proto_list.json b/packages/google-cloud-discoveryengine/src/v1beta/completion_service_proto_list.json new file mode 100644 index 00000000000..c90e69baf40 --- /dev/null +++ b/packages/google-cloud-discoveryengine/src/v1beta/completion_service_proto_list.json @@ -0,0 +1,14 @@ +[ + "../../protos/google/cloud/discoveryengine/v1beta/common.proto", + "../../protos/google/cloud/discoveryengine/v1beta/completion_service.proto", + "../../protos/google/cloud/discoveryengine/v1beta/document.proto", + "../../protos/google/cloud/discoveryengine/v1beta/document_service.proto", + "../../protos/google/cloud/discoveryengine/v1beta/import_config.proto", + "../../protos/google/cloud/discoveryengine/v1beta/purge_config.proto", + "../../protos/google/cloud/discoveryengine/v1beta/recommendation_service.proto", + "../../protos/google/cloud/discoveryengine/v1beta/schema.proto", + "../../protos/google/cloud/discoveryengine/v1beta/schema_service.proto", + "../../protos/google/cloud/discoveryengine/v1beta/search_service.proto", + "../../protos/google/cloud/discoveryengine/v1beta/user_event.proto", + "../../protos/google/cloud/discoveryengine/v1beta/user_event_service.proto" +] diff --git a/packages/google-cloud-discoveryengine/src/v1beta/document_service_client.ts b/packages/google-cloud-discoveryengine/src/v1beta/document_service_client.ts index b0f61cefaf5..ddbb791dd44 100644 --- a/packages/google-cloud-discoveryengine/src/v1beta/document_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1beta/document_service_client.ts @@ -191,6 +191,10 @@ export class DocumentServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationCollectionDataStoreSchemaPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}' + ), projectLocationDataStoreBranchPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}' @@ -199,6 +203,10 @@ export class DocumentServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationDataStoreSchemaPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}' + ), }; // Some of the methods on this service return "paged" results, @@ -286,6 +294,12 @@ export class DocumentServiceClient { const importDocumentsMetadata = protoFilesRoot.lookup( '.google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata' ) as gax.protobuf.Type; + const purgeDocumentsResponse = protoFilesRoot.lookup( + '.google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse' + ) as gax.protobuf.Type; + const purgeDocumentsMetadata = protoFilesRoot.lookup( + '.google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata' + ) as gax.protobuf.Type; this.descriptors.longrunning = { importDocuments: new this._gaxModule.LongrunningDescriptor( @@ -293,6 +307,11 @@ export class DocumentServiceClient { importDocumentsResponse.decode.bind(importDocumentsResponse), importDocumentsMetadata.decode.bind(importDocumentsMetadata) ), + purgeDocuments: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + purgeDocumentsResponse.decode.bind(purgeDocumentsResponse), + purgeDocumentsMetadata.decode.bind(purgeDocumentsMetadata) + ), }; // Put together the default options sent with requests. @@ -352,6 +371,7 @@ export class DocumentServiceClient { 'updateDocument', 'deleteDocument', 'importDocuments', + 'purgeDocuments', ]; for (const methodName of documentServiceStubMethods) { const callPromise = this.documentServiceStub.then( @@ -450,10 +470,10 @@ export class DocumentServiceClient { * * If the caller does not have permission to access the * {@link google.cloud.discoveryengine.v1beta.Document|Document}, regardless of - * whether or not it exists, a PERMISSION_DENIED error is returned. + * whether or not it exists, a `PERMISSION_DENIED` error is returned. * * If the requested {@link google.cloud.discoveryengine.v1beta.Document|Document} - * does not exist, a NOT_FOUND error is returned. + * does not exist, a `NOT_FOUND` error is returned. * @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. @@ -563,16 +583,16 @@ export class DocumentServiceClient { * * If the caller does not have permission to create the * {@link google.cloud.discoveryengine.v1beta.Document|Document}, regardless of - * whether or not it exists, a PERMISSION_DENIED error is returned. + * whether or not it exists, a `PERMISSION_DENIED` error is returned. * * This field must be unique among all * {@link google.cloud.discoveryengine.v1beta.Document|Document}s with the same * {@link google.cloud.discoveryengine.v1beta.CreateDocumentRequest.parent|parent}. - * Otherwise, an ALREADY_EXISTS error is returned. + * Otherwise, an `ALREADY_EXISTS` error is returned. * * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) * standard with a length limit of 63 characters. Otherwise, an - * INVALID_ARGUMENT error is returned. + * `INVALID_ARGUMENT` error is returned. * @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. @@ -673,12 +693,12 @@ export class DocumentServiceClient { * * If the caller does not have permission to update the * {@link google.cloud.discoveryengine.v1beta.Document|Document}, regardless of - * whether or not it exists, a PERMISSION_DENIED error is returned. + * whether or not it exists, a `PERMISSION_DENIED` error is returned. * * If the {@link google.cloud.discoveryengine.v1beta.Document|Document} to update * does not exist and * {@link google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.allow_missing|allow_missing} - * is not set, a NOT_FOUND error is returned. + * is not set, a `NOT_FOUND` error is returned. * @param {boolean} request.allowMissing * If set to true, and the * {@link google.cloud.discoveryengine.v1beta.Document|Document} is not found, a @@ -786,10 +806,10 @@ export class DocumentServiceClient { * * If the caller does not have permission to delete the * {@link google.cloud.discoveryengine.v1beta.Document|Document}, regardless of - * whether or not it exists, a PERMISSION_DENIED error is returned. + * whether or not it exists, a `PERMISSION_DENIED` error is returned. * * If the {@link google.cloud.discoveryengine.v1beta.Document|Document} to delete - * does not exist, a NOT_FOUND error is returned. + * does not exist, a `NOT_FOUND` error is returned. * @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. @@ -1039,6 +1059,168 @@ export class DocumentServiceClient { protos.google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata >; } + /** + * Permanently deletes all selected + * {@link google.cloud.discoveryengine.v1beta.Document|Document}s in a branch. + * + * This process is asynchronous. Depending on the number of + * {@link google.cloud.discoveryengine.v1beta.Document|Document}s to be deleted, + * this operation can take hours to complete. Before the delete operation + * completes, some {@link google.cloud.discoveryengine.v1beta.Document|Document}s + * might still be returned by + * {@link google.cloud.discoveryengine.v1beta.DocumentService.GetDocument|DocumentService.GetDocument} + * or + * {@link google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments|DocumentService.ListDocuments}. + * + * To get a list of the + * {@link google.cloud.discoveryengine.v1beta.Document|Document}s to be deleted, + * set + * {@link google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest.force|PurgeDocumentsRequest.force} + * to false. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource name, such as + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. + * @param {string} request.filter + * Required. Filter matching documents to purge. Only currently supported + * value is + * `*` (all items). + * @param {boolean} request.force + * Actually performs the purge. If `force` is set to false, return the + * expected purge count without deleting any documents. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta/document_service.purge_documents.js + * region_tag:discoveryengine_v1beta_generated_DocumentService_PurgeDocuments_async + */ + purgeDocuments( + request?: protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsResponse, + protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + purgeDocuments( + request: protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsResponse, + protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + purgeDocuments( + request: protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsRequest, + callback: Callback< + LROperation< + protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsResponse, + protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + purgeDocuments( + request?: protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsResponse, + protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsResponse, + protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsResponse, + protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsMetadata + >, + 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(); + return this.innerApiCalls.purgeDocuments(request, options, callback); + } + /** + * Check the status of the long running operation returned by `purgeDocuments()`. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta/document_service.purge_documents.js + * region_tag:discoveryengine_v1beta_generated_DocumentService_PurgeDocuments_async + */ + async checkPurgeDocumentsProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse, + protos.google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata + > + > { + 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.purgeDocuments, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse, + protos.google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata + >; + } /** * Gets a list of {@link google.cloud.discoveryengine.v1beta.Document|Document}s. * @@ -1052,13 +1234,13 @@ export class DocumentServiceClient { * * If the caller does not have permission to list {@link |Documents}s under this * branch, regardless of whether or not this branch exists, a - * PERMISSION_DENIED error is returned. + * `PERMISSION_DENIED` error is returned. * @param {number} request.pageSize * Maximum number of {@link google.cloud.discoveryengine.v1beta.Document|Document}s * to return. If unspecified, defaults to 100. The maximum allowed value is * 1000. Values above 1000 will be coerced to 1000. * - * If this field is negative, an INVALID_ARGUMENT error is returned. + * If this field is negative, an `INVALID_ARGUMENT` error is returned. * @param {string} request.pageToken * A page token * {@link google.cloud.discoveryengine.v1beta.ListDocumentsResponse.next_page_token|ListDocumentsResponse.next_page_token}, @@ -1069,7 +1251,7 @@ export class DocumentServiceClient { * When paginating, all other parameters provided to * {@link google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments|DocumentService.ListDocuments} * must match the call that provided the page token. Otherwise, an - * INVALID_ARGUMENT error is returned. + * `INVALID_ARGUMENT` error is returned. * @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. @@ -1170,13 +1352,13 @@ export class DocumentServiceClient { * * If the caller does not have permission to list {@link |Documents}s under this * branch, regardless of whether or not this branch exists, a - * PERMISSION_DENIED error is returned. + * `PERMISSION_DENIED` error is returned. * @param {number} request.pageSize * Maximum number of {@link google.cloud.discoveryengine.v1beta.Document|Document}s * to return. If unspecified, defaults to 100. The maximum allowed value is * 1000. Values above 1000 will be coerced to 1000. * - * If this field is negative, an INVALID_ARGUMENT error is returned. + * If this field is negative, an `INVALID_ARGUMENT` error is returned. * @param {string} request.pageToken * A page token * {@link google.cloud.discoveryengine.v1beta.ListDocumentsResponse.next_page_token|ListDocumentsResponse.next_page_token}, @@ -1187,7 +1369,7 @@ export class DocumentServiceClient { * When paginating, all other parameters provided to * {@link google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments|DocumentService.ListDocuments} * must match the call that provided the page token. Otherwise, an - * INVALID_ARGUMENT error is returned. + * `INVALID_ARGUMENT` error is returned. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -1236,13 +1418,13 @@ export class DocumentServiceClient { * * If the caller does not have permission to list {@link |Documents}s under this * branch, regardless of whether or not this branch exists, a - * PERMISSION_DENIED error is returned. + * `PERMISSION_DENIED` error is returned. * @param {number} request.pageSize * Maximum number of {@link google.cloud.discoveryengine.v1beta.Document|Document}s * to return. If unspecified, defaults to 100. The maximum allowed value is * 1000. Values above 1000 will be coerced to 1000. * - * If this field is negative, an INVALID_ARGUMENT error is returned. + * If this field is negative, an `INVALID_ARGUMENT` error is returned. * @param {string} request.pageToken * A page token * {@link google.cloud.discoveryengine.v1beta.ListDocumentsResponse.next_page_token|ListDocumentsResponse.next_page_token}, @@ -1253,7 +1435,7 @@ export class DocumentServiceClient { * When paginating, all other parameters provided to * {@link google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments|DocumentService.ListDocuments} * must match the call that provided the page token. Otherwise, an - * INVALID_ARGUMENT error is returned. + * `INVALID_ARGUMENT` error is returned. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -1691,6 +1873,109 @@ export class DocumentServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} schema + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreSchemaPath( + project: string, + location: string, + collection: string, + dataStore: string, + schema: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + schema: schema, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreSchema resource. + * + * @param {string} projectLocationCollectionDataStoreSchemaName + * A fully-qualified path representing project_location_collection_data_store_schema resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreSchemaName( + projectLocationCollectionDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match( + projectLocationCollectionDataStoreSchemaName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreSchema resource. + * + * @param {string} projectLocationCollectionDataStoreSchemaName + * A fully-qualified path representing project_location_collection_data_store_schema resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreSchemaName( + projectLocationCollectionDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match( + projectLocationCollectionDataStoreSchemaName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreSchema resource. + * + * @param {string} projectLocationCollectionDataStoreSchemaName + * A fully-qualified path representing project_location_collection_data_store_schema resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreSchemaName( + projectLocationCollectionDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match( + projectLocationCollectionDataStoreSchemaName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreSchema resource. + * + * @param {string} projectLocationCollectionDataStoreSchemaName + * A fully-qualified path representing project_location_collection_data_store_schema resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreSchemaName( + projectLocationCollectionDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match( + projectLocationCollectionDataStoreSchemaName + ).data_store; + } + + /** + * Parse the schema from ProjectLocationCollectionDataStoreSchema resource. + * + * @param {string} projectLocationCollectionDataStoreSchemaName + * A fully-qualified path representing project_location_collection_data_store_schema resource. + * @returns {string} A string representing the schema. + */ + matchSchemaFromProjectLocationCollectionDataStoreSchemaName( + projectLocationCollectionDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match( + projectLocationCollectionDataStoreSchemaName + ).schema; + } + /** * Return a fully-qualified projectLocationDataStoreBranch resource name string. * @@ -1879,6 +2164,91 @@ export class DocumentServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationDataStoreSchema resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} schema + * @returns {string} Resource name string. + */ + projectLocationDataStoreSchemaPath( + project: string, + location: string, + dataStore: string, + schema: string + ) { + return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + schema: schema, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreSchema resource. + * + * @param {string} projectLocationDataStoreSchemaName + * A fully-qualified path representing project_location_data_store_schema resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreSchemaName( + projectLocationDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match( + projectLocationDataStoreSchemaName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreSchema resource. + * + * @param {string} projectLocationDataStoreSchemaName + * A fully-qualified path representing project_location_data_store_schema resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreSchemaName( + projectLocationDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match( + projectLocationDataStoreSchemaName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreSchema resource. + * + * @param {string} projectLocationDataStoreSchemaName + * A fully-qualified path representing project_location_data_store_schema resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreSchemaName( + projectLocationDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match( + projectLocationDataStoreSchemaName + ).data_store; + } + + /** + * Parse the schema from ProjectLocationDataStoreSchema resource. + * + * @param {string} projectLocationDataStoreSchemaName + * A fully-qualified path representing project_location_data_store_schema resource. + * @returns {string} A string representing the schema. + */ + matchSchemaFromProjectLocationDataStoreSchemaName( + projectLocationDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match( + projectLocationDataStoreSchemaName + ).schema; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-cloud-discoveryengine/src/v1beta/document_service_client_config.json b/packages/google-cloud-discoveryengine/src/v1beta/document_service_client_config.json index 7dcd0f44161..386e18b5201 100644 --- a/packages/google-cloud-discoveryengine/src/v1beta/document_service_client_config.json +++ b/packages/google-cloud-discoveryengine/src/v1beta/document_service_client_config.json @@ -70,6 +70,11 @@ "timeout_millis": 300000, "retry_codes_name": "unavailable", "retry_params_name": "e6a9f61a856ca7c2128ab9550ca4fb9e97c77876" + }, + "PurgeDocuments": { + "timeout_millis": 30000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" } } } diff --git a/packages/google-cloud-discoveryengine/src/v1beta/document_service_proto_list.json b/packages/google-cloud-discoveryengine/src/v1beta/document_service_proto_list.json index 22c1ffca3d1..c90e69baf40 100644 --- a/packages/google-cloud-discoveryengine/src/v1beta/document_service_proto_list.json +++ b/packages/google-cloud-discoveryengine/src/v1beta/document_service_proto_list.json @@ -1,9 +1,14 @@ [ "../../protos/google/cloud/discoveryengine/v1beta/common.proto", + "../../protos/google/cloud/discoveryengine/v1beta/completion_service.proto", "../../protos/google/cloud/discoveryengine/v1beta/document.proto", "../../protos/google/cloud/discoveryengine/v1beta/document_service.proto", "../../protos/google/cloud/discoveryengine/v1beta/import_config.proto", + "../../protos/google/cloud/discoveryengine/v1beta/purge_config.proto", "../../protos/google/cloud/discoveryengine/v1beta/recommendation_service.proto", + "../../protos/google/cloud/discoveryengine/v1beta/schema.proto", + "../../protos/google/cloud/discoveryengine/v1beta/schema_service.proto", + "../../protos/google/cloud/discoveryengine/v1beta/search_service.proto", "../../protos/google/cloud/discoveryengine/v1beta/user_event.proto", "../../protos/google/cloud/discoveryengine/v1beta/user_event_service.proto" ] diff --git a/packages/google-cloud-discoveryengine/src/v1beta/gapic_metadata.json b/packages/google-cloud-discoveryengine/src/v1beta/gapic_metadata.json index 27549162455..e5bab29651f 100644 --- a/packages/google-cloud-discoveryengine/src/v1beta/gapic_metadata.json +++ b/packages/google-cloud-discoveryengine/src/v1beta/gapic_metadata.json @@ -5,6 +5,30 @@ "protoPackage": "google.cloud.discoveryengine.v1beta", "libraryPackage": "@google-cloud/discoveryengine", "services": { + "CompletionService": { + "clients": { + "grpc": { + "libraryClient": "CompletionServiceClient", + "rpcs": { + "CompleteQuery": { + "methods": [ + "completeQuery" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "CompletionServiceClient", + "rpcs": { + "CompleteQuery": { + "methods": [ + "completeQuery" + ] + } + } + } + } + }, "DocumentService": { "clients": { "grpc": { @@ -35,6 +59,11 @@ "importDocuments" ] }, + "PurgeDocuments": { + "methods": [ + "purgeDocuments" + ] + }, "ListDocuments": { "methods": [ "listDocuments", @@ -72,6 +101,11 @@ "importDocuments" ] }, + "PurgeDocuments": { + "methods": [ + "purgeDocuments" + ] + }, "ListDocuments": { "methods": [ "listDocuments", @@ -107,6 +141,102 @@ } } }, + "SchemaService": { + "clients": { + "grpc": { + "libraryClient": "SchemaServiceClient", + "rpcs": { + "GetSchema": { + "methods": [ + "getSchema" + ] + }, + "CreateSchema": { + "methods": [ + "createSchema" + ] + }, + "UpdateSchema": { + "methods": [ + "updateSchema" + ] + }, + "DeleteSchema": { + "methods": [ + "deleteSchema" + ] + }, + "ListSchemas": { + "methods": [ + "listSchemas", + "listSchemasStream", + "listSchemasAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "SchemaServiceClient", + "rpcs": { + "GetSchema": { + "methods": [ + "getSchema" + ] + }, + "CreateSchema": { + "methods": [ + "createSchema" + ] + }, + "UpdateSchema": { + "methods": [ + "updateSchema" + ] + }, + "DeleteSchema": { + "methods": [ + "deleteSchema" + ] + }, + "ListSchemas": { + "methods": [ + "listSchemas", + "listSchemasStream", + "listSchemasAsync" + ] + } + } + } + } + }, + "SearchService": { + "clients": { + "grpc": { + "libraryClient": "SearchServiceClient", + "rpcs": { + "Search": { + "methods": [ + "search", + "searchStream", + "searchAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "SearchServiceClient", + "rpcs": { + "Search": { + "methods": [ + "search", + "searchStream", + "searchAsync" + ] + } + } + } + } + }, "UserEventService": { "clients": { "grpc": { diff --git a/packages/google-cloud-discoveryengine/src/v1beta/index.ts b/packages/google-cloud-discoveryengine/src/v1beta/index.ts index 08844ff4da8..5f42e7b32db 100644 --- a/packages/google-cloud-discoveryengine/src/v1beta/index.ts +++ b/packages/google-cloud-discoveryengine/src/v1beta/index.ts @@ -16,6 +16,9 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** +export {CompletionServiceClient} from './completion_service_client'; export {DocumentServiceClient} from './document_service_client'; export {RecommendationServiceClient} from './recommendation_service_client'; +export {SchemaServiceClient} from './schema_service_client'; +export {SearchServiceClient} from './search_service_client'; export {UserEventServiceClient} from './user_event_service_client'; diff --git a/packages/google-cloud-discoveryengine/src/v1beta/recommendation_service_client.ts b/packages/google-cloud-discoveryengine/src/v1beta/recommendation_service_client.ts index 60683ceec67..7a1e861c567 100644 --- a/packages/google-cloud-discoveryengine/src/v1beta/recommendation_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1beta/recommendation_service_client.ts @@ -181,6 +181,10 @@ export class RecommendationServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationCollectionDataStoreSchemaPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}' + ), projectLocationCollectionDataStoreServingConfigPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}' @@ -189,6 +193,10 @@ export class RecommendationServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationDataStoreSchemaPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}' + ), projectLocationDataStoreServingConfigPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}' @@ -335,7 +343,7 @@ export class RecommendationServiceClient { * The request object that will be sent. * @param {string} request.servingConfig * Required. Full resource name of the format: - * projects/* /locations/global/collections/* /dataStores/* /servingConfigs/* + * `projects/* /locations/global/collections/* /dataStores/* /servingConfigs/*` * * Before you can request recommendations from your model, you must create at * least one serving config for it. @@ -369,8 +377,8 @@ export class RecommendationServiceClient { * * Examples: * - * * (filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold")) - * * (filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green")) + * * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))` + * * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))` * * If your filter blocks all results, the API will return generic * (unfiltered) popular Documents. If you only want results strictly matching @@ -378,8 +386,9 @@ export class RecommendationServiceClient { * {@link google.cloud.discoveryengine.v1beta.RecommendRequest.params|RecommendRequest.params} * to receive empty results instead. * - * Note that the API will never return Documents with storageStatus of - * "EXPIRED" or "DELETED" regardless of filter choices. + * Note that the API will never return + * {@link google.cloud.discoveryengine.v1beta.Document|Document}s with + * `storageStatus` of `EXPIRED` or `DELETED` regardless of filter choices. * @param {boolean} request.validateOnly * Use validate only mode for this recommendation query. If set to true, a * fake model will be used that returns arbitrary Document IDs. @@ -392,22 +401,22 @@ export class RecommendationServiceClient { * * * `returnDocument`: Boolean. If set to true, the associated Document * object will be returned in - * {@link RecommendationResult.document|RecommendResponse.results.document}. + * {@link google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.document|RecommendResponse.RecommendationResult.document}. * * `returnScore`: Boolean. If set to true, the recommendation 'score' * corresponding to each returned Document will be set in - * {@link RecommendationResult.metadata|RecommendResponse.results.metadata}. The - * given 'score' indicates the probability of a Document conversion given - * the user's context and history. + * {@link google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.metadata|RecommendResponse.RecommendationResult.metadata}. + * The given 'score' indicates the probability of a Document conversion + * given the user's context and history. * * `strictFiltering`: Boolean. True by default. If set to false, the service * will return generic (unfiltered) popular Documents instead of empty if * your filter blocks all recommendation results. * * `diversityLevel`: String. Default empty. If set to be non-empty, then * it needs to be one of: - * * 'no-diversity' - * * 'low-diversity' - * * 'medium-diversity' - * * 'high-diversity' - * * 'auto-diversity' + * * `no-diversity` + * * `low-diversity` + * * `medium-diversity` + * * `high-diversity` + * * `auto-diversity` * This gives request-level control and adjusts recommendation results * based on Document category. * @param {number[]} request.userLabels @@ -638,6 +647,109 @@ export class RecommendationServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} schema + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreSchemaPath( + project: string, + location: string, + collection: string, + dataStore: string, + schema: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + schema: schema, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreSchema resource. + * + * @param {string} projectLocationCollectionDataStoreSchemaName + * A fully-qualified path representing project_location_collection_data_store_schema resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreSchemaName( + projectLocationCollectionDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match( + projectLocationCollectionDataStoreSchemaName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreSchema resource. + * + * @param {string} projectLocationCollectionDataStoreSchemaName + * A fully-qualified path representing project_location_collection_data_store_schema resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreSchemaName( + projectLocationCollectionDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match( + projectLocationCollectionDataStoreSchemaName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreSchema resource. + * + * @param {string} projectLocationCollectionDataStoreSchemaName + * A fully-qualified path representing project_location_collection_data_store_schema resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreSchemaName( + projectLocationCollectionDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match( + projectLocationCollectionDataStoreSchemaName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreSchema resource. + * + * @param {string} projectLocationCollectionDataStoreSchemaName + * A fully-qualified path representing project_location_collection_data_store_schema resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreSchemaName( + projectLocationCollectionDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match( + projectLocationCollectionDataStoreSchemaName + ).data_store; + } + + /** + * Parse the schema from ProjectLocationCollectionDataStoreSchema resource. + * + * @param {string} projectLocationCollectionDataStoreSchemaName + * A fully-qualified path representing project_location_collection_data_store_schema resource. + * @returns {string} A string representing the schema. + */ + matchSchemaFromProjectLocationCollectionDataStoreSchemaName( + projectLocationCollectionDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match( + projectLocationCollectionDataStoreSchemaName + ).schema; + } + /** * Return a fully-qualified projectLocationCollectionDataStoreServingConfig resource name string. * @@ -844,6 +956,91 @@ export class RecommendationServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationDataStoreSchema resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} schema + * @returns {string} Resource name string. + */ + projectLocationDataStoreSchemaPath( + project: string, + location: string, + dataStore: string, + schema: string + ) { + return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + schema: schema, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreSchema resource. + * + * @param {string} projectLocationDataStoreSchemaName + * A fully-qualified path representing project_location_data_store_schema resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreSchemaName( + projectLocationDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match( + projectLocationDataStoreSchemaName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreSchema resource. + * + * @param {string} projectLocationDataStoreSchemaName + * A fully-qualified path representing project_location_data_store_schema resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreSchemaName( + projectLocationDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match( + projectLocationDataStoreSchemaName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreSchema resource. + * + * @param {string} projectLocationDataStoreSchemaName + * A fully-qualified path representing project_location_data_store_schema resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreSchemaName( + projectLocationDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match( + projectLocationDataStoreSchemaName + ).data_store; + } + + /** + * Parse the schema from ProjectLocationDataStoreSchema resource. + * + * @param {string} projectLocationDataStoreSchemaName + * A fully-qualified path representing project_location_data_store_schema resource. + * @returns {string} A string representing the schema. + */ + matchSchemaFromProjectLocationDataStoreSchemaName( + projectLocationDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match( + projectLocationDataStoreSchemaName + ).schema; + } + /** * Return a fully-qualified projectLocationDataStoreServingConfig resource name string. * diff --git a/packages/google-cloud-discoveryengine/src/v1beta/recommendation_service_proto_list.json b/packages/google-cloud-discoveryengine/src/v1beta/recommendation_service_proto_list.json index 22c1ffca3d1..c90e69baf40 100644 --- a/packages/google-cloud-discoveryengine/src/v1beta/recommendation_service_proto_list.json +++ b/packages/google-cloud-discoveryengine/src/v1beta/recommendation_service_proto_list.json @@ -1,9 +1,14 @@ [ "../../protos/google/cloud/discoveryengine/v1beta/common.proto", + "../../protos/google/cloud/discoveryengine/v1beta/completion_service.proto", "../../protos/google/cloud/discoveryengine/v1beta/document.proto", "../../protos/google/cloud/discoveryengine/v1beta/document_service.proto", "../../protos/google/cloud/discoveryengine/v1beta/import_config.proto", + "../../protos/google/cloud/discoveryengine/v1beta/purge_config.proto", "../../protos/google/cloud/discoveryengine/v1beta/recommendation_service.proto", + "../../protos/google/cloud/discoveryengine/v1beta/schema.proto", + "../../protos/google/cloud/discoveryengine/v1beta/schema_service.proto", + "../../protos/google/cloud/discoveryengine/v1beta/search_service.proto", "../../protos/google/cloud/discoveryengine/v1beta/user_event.proto", "../../protos/google/cloud/discoveryengine/v1beta/user_event_service.proto" ] diff --git a/packages/google-cloud-discoveryengine/src/v1beta/schema_service_client.ts b/packages/google-cloud-discoveryengine/src/v1beta/schema_service_client.ts new file mode 100644 index 00000000000..fccc470ac43 --- /dev/null +++ b/packages/google-cloud-discoveryengine/src/v1beta/schema_service_client.ts @@ -0,0 +1,1979 @@ +// Copyright 2023 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, + GrpcClientOptions, + LROperation, + PaginationCallback, + GaxCall, +} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1beta/schema_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './schema_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service for managing {@link google.cloud.discoveryengine.v1beta.Schema|Schema}s. + * @class + * @memberof v1beta + */ +export class SchemaServiceClient { + 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}; + 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}; + operationsClient: gax.OperationsClient; + schemaServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of SchemaServiceClient. + * + * @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://developers.google.com/identity/protocols/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 | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * 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 SchemaServiceClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof SchemaServiceClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.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 !== staticMembers.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 = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && '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 if (opts.fallback === 'rest') { + 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 = { + projectLocationCollectionDataStorePathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}' + ), + projectLocationCollectionDataStoreBranchDocumentPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}' + ), + projectLocationCollectionDataStoreSchemaPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}' + ), + projectLocationDataStorePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}' + ), + projectLocationDataStoreBranchDocumentPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}' + ), + projectLocationDataStoreSchemaPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}' + ), + }; + + // 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 = { + listSchemas: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'schemas' + ), + }; + + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }; + if (opts.fallback === 'rest') { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [ + { + selector: 'google.longrunning.Operations.GetOperation', + get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', + additional_bindings: [ + { + get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', + }, + { + get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', + }, + { + get: '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}', + }, + { + get: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', + }, + { + get: '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', + }, + { + get: '/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}', + }, + {get: '/v1beta/{name=projects/*/locations/*/operations/*}'}, + {get: '/v1beta/{name=projects/*/operations/*}'}, + ], + }, + { + selector: 'google.longrunning.Operations.ListOperations', + get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', + additional_bindings: [ + { + get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', + }, + { + get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', + }, + { + get: '/v1beta/{name=projects/*/locations/*/collections/*}/operations', + }, + { + get: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', + }, + { + get: '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations', + }, + { + get: '/v1beta/{name=projects/*/locations/*/dataStores/*}/operations', + }, + {get: '/v1beta/{name=projects/*/locations/*}/operations'}, + {get: '/v1beta/{name=projects/*}/operations'}, + ], + }, + ]; + } + this.operationsClient = this._gaxModule + .lro(lroOptions) + .operationsClient(opts); + const createSchemaResponse = protoFilesRoot.lookup( + '.google.cloud.discoveryengine.v1beta.Schema' + ) as gax.protobuf.Type; + const createSchemaMetadata = protoFilesRoot.lookup( + '.google.cloud.discoveryengine.v1beta.CreateSchemaMetadata' + ) as gax.protobuf.Type; + const updateSchemaResponse = protoFilesRoot.lookup( + '.google.cloud.discoveryengine.v1beta.Schema' + ) as gax.protobuf.Type; + const updateSchemaMetadata = protoFilesRoot.lookup( + '.google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata' + ) as gax.protobuf.Type; + const deleteSchemaResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteSchemaMetadata = protoFilesRoot.lookup( + '.google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata' + ) as gax.protobuf.Type; + + this.descriptors.longrunning = { + createSchema: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createSchemaResponse.decode.bind(createSchemaResponse), + createSchemaMetadata.decode.bind(createSchemaMetadata) + ), + updateSchema: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateSchemaResponse.decode.bind(updateSchemaResponse), + updateSchemaMetadata.decode.bind(updateSchemaMetadata) + ), + deleteSchema: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteSchemaResponse.decode.bind(deleteSchemaResponse), + deleteSchemaMetadata.decode.bind(deleteSchemaMetadata) + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.discoveryengine.v1beta.SchemaService', + 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.schemaServiceStub) { + return this.schemaServiceStub; + } + + // Put together the "service stub" for + // google.cloud.discoveryengine.v1beta.SchemaService. + this.schemaServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.discoveryengine.v1beta.SchemaService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.discoveryengine.v1beta + .SchemaService, + 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 schemaServiceStubMethods = [ + 'getSchema', + 'listSchemas', + 'createSchema', + 'updateSchema', + 'deleteSchema', + ]; + for (const methodName of schemaServiceStubMethods) { + const callPromise = this.schemaServiceStub.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] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.schemaServiceStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'discoveryengine.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'discoveryengine.googleapis.com'; + } + + /** + * 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/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 -- + // ------------------- + /** + * Gets a {@link google.cloud.discoveryengine.v1beta.Schema|Schema}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + * @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 google.cloud.discoveryengine.v1beta.Schema | Schema}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/schema_service.get_schema.js + * region_tag:discoveryengine_v1beta_generated_SchemaService_GetSchema_async + */ + getSchema( + request?: protos.google.cloud.discoveryengine.v1beta.IGetSchemaRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.discoveryengine.v1beta.ISchema, + protos.google.cloud.discoveryengine.v1beta.IGetSchemaRequest | undefined, + {} | undefined + ] + >; + getSchema( + request: protos.google.cloud.discoveryengine.v1beta.IGetSchemaRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.discoveryengine.v1beta.ISchema, + | protos.google.cloud.discoveryengine.v1beta.IGetSchemaRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getSchema( + request: protos.google.cloud.discoveryengine.v1beta.IGetSchemaRequest, + callback: Callback< + protos.google.cloud.discoveryengine.v1beta.ISchema, + | protos.google.cloud.discoveryengine.v1beta.IGetSchemaRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getSchema( + request?: protos.google.cloud.discoveryengine.v1beta.IGetSchemaRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.discoveryengine.v1beta.ISchema, + | protos.google.cloud.discoveryengine.v1beta.IGetSchemaRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.discoveryengine.v1beta.ISchema, + | protos.google.cloud.discoveryengine.v1beta.IGetSchemaRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.discoveryengine.v1beta.ISchema, + protos.google.cloud.discoveryengine.v1beta.IGetSchemaRequest | 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(); + return this.innerApiCalls.getSchema(request, options, callback); + } + + /** + * Creates a {@link google.cloud.discoveryengine.v1beta.Schema|Schema}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent data store resource name, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * @param {google.cloud.discoveryengine.v1beta.Schema} request.schema + * Required. The {@link google.cloud.discoveryengine.v1beta.Schema|Schema} to + * create. + * @param {string} request.schemaId + * Required. The ID to use for the + * {@link google.cloud.discoveryengine.v1beta.Schema|Schema}, which will become the + * final component of the + * {@link google.cloud.discoveryengine.v1beta.Schema.name|Schema.name}. + * + * This field should conform to + * [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length + * limit of 63 characters. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta/schema_service.create_schema.js + * region_tag:discoveryengine_v1beta_generated_SchemaService_CreateSchema_async + */ + createSchema( + request?: protos.google.cloud.discoveryengine.v1beta.ICreateSchemaRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.discoveryengine.v1beta.ISchema, + protos.google.cloud.discoveryengine.v1beta.ICreateSchemaMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createSchema( + request: protos.google.cloud.discoveryengine.v1beta.ICreateSchemaRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.discoveryengine.v1beta.ISchema, + protos.google.cloud.discoveryengine.v1beta.ICreateSchemaMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createSchema( + request: protos.google.cloud.discoveryengine.v1beta.ICreateSchemaRequest, + callback: Callback< + LROperation< + protos.google.cloud.discoveryengine.v1beta.ISchema, + protos.google.cloud.discoveryengine.v1beta.ICreateSchemaMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createSchema( + request?: protos.google.cloud.discoveryengine.v1beta.ICreateSchemaRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.discoveryengine.v1beta.ISchema, + protos.google.cloud.discoveryengine.v1beta.ICreateSchemaMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.discoveryengine.v1beta.ISchema, + protos.google.cloud.discoveryengine.v1beta.ICreateSchemaMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.discoveryengine.v1beta.ISchema, + protos.google.cloud.discoveryengine.v1beta.ICreateSchemaMetadata + >, + 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(); + return this.innerApiCalls.createSchema(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createSchema()`. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta/schema_service.create_schema.js + * region_tag:discoveryengine_v1beta_generated_SchemaService_CreateSchema_async + */ + async checkCreateSchemaProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.discoveryengine.v1beta.Schema, + protos.google.cloud.discoveryengine.v1beta.CreateSchemaMetadata + > + > { + 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.createSchema, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.discoveryengine.v1beta.Schema, + protos.google.cloud.discoveryengine.v1beta.CreateSchemaMetadata + >; + } + /** + * Updates a {@link google.cloud.discoveryengine.v1beta.Schema|Schema}. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.discoveryengine.v1beta.Schema} request.schema + * Required. The {@link google.cloud.discoveryengine.v1beta.Schema|Schema} to + * update. + * @param {boolean} request.allowMissing + * If set to true, and the + * {@link google.cloud.discoveryengine.v1beta.Schema|Schema} is not found, a new + * {@link google.cloud.discoveryengine.v1beta.Schema|Schema} will be created. In + * this situation, `update_mask` is ignored. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta/schema_service.update_schema.js + * region_tag:discoveryengine_v1beta_generated_SchemaService_UpdateSchema_async + */ + updateSchema( + request?: protos.google.cloud.discoveryengine.v1beta.IUpdateSchemaRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.discoveryengine.v1beta.ISchema, + protos.google.cloud.discoveryengine.v1beta.IUpdateSchemaMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateSchema( + request: protos.google.cloud.discoveryengine.v1beta.IUpdateSchemaRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.discoveryengine.v1beta.ISchema, + protos.google.cloud.discoveryengine.v1beta.IUpdateSchemaMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateSchema( + request: protos.google.cloud.discoveryengine.v1beta.IUpdateSchemaRequest, + callback: Callback< + LROperation< + protos.google.cloud.discoveryengine.v1beta.ISchema, + protos.google.cloud.discoveryengine.v1beta.IUpdateSchemaMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateSchema( + request?: protos.google.cloud.discoveryengine.v1beta.IUpdateSchemaRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.discoveryengine.v1beta.ISchema, + protos.google.cloud.discoveryengine.v1beta.IUpdateSchemaMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.discoveryengine.v1beta.ISchema, + protos.google.cloud.discoveryengine.v1beta.IUpdateSchemaMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.discoveryengine.v1beta.ISchema, + protos.google.cloud.discoveryengine.v1beta.IUpdateSchemaMetadata + >, + 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({ + 'schema.name': request.schema!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateSchema(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateSchema()`. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta/schema_service.update_schema.js + * region_tag:discoveryengine_v1beta_generated_SchemaService_UpdateSchema_async + */ + async checkUpdateSchemaProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.discoveryengine.v1beta.Schema, + protos.google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata + > + > { + 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.updateSchema, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.discoveryengine.v1beta.Schema, + protos.google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata + >; + } + /** + * Deletes a {@link google.cloud.discoveryengine.v1beta.Schema|Schema}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The full resource name of the schema, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta/schema_service.delete_schema.js + * region_tag:discoveryengine_v1beta_generated_SchemaService_DeleteSchema_async + */ + deleteSchema( + request?: protos.google.cloud.discoveryengine.v1beta.IDeleteSchemaRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.discoveryengine.v1beta.IDeleteSchemaMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteSchema( + request: protos.google.cloud.discoveryengine.v1beta.IDeleteSchemaRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.discoveryengine.v1beta.IDeleteSchemaMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteSchema( + request: protos.google.cloud.discoveryengine.v1beta.IDeleteSchemaRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.discoveryengine.v1beta.IDeleteSchemaMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteSchema( + request?: protos.google.cloud.discoveryengine.v1beta.IDeleteSchemaRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.discoveryengine.v1beta.IDeleteSchemaMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.discoveryengine.v1beta.IDeleteSchemaMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.discoveryengine.v1beta.IDeleteSchemaMetadata + >, + 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({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteSchema(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteSchema()`. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta/schema_service.delete_schema.js + * region_tag:discoveryengine_v1beta_generated_SchemaService_DeleteSchema_async + */ + async checkDeleteSchemaProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata + > + > { + 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.deleteSchema, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata + >; + } + /** + * Gets a list of {@link google.cloud.discoveryengine.v1beta.Schema|Schema}s. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent data store resource name, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * @param {number} request.pageSize + * The maximum number of {@link google.cloud.discoveryengine.v1beta.Schema|Schema}s + * to return. The service may return fewer than this value. + * + * If unspecified, at most 100 + * {@link google.cloud.discoveryengine.v1beta.Schema|Schema}s will be returned. + * + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} request.pageToken + * A page token, received from a previous + * {@link google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas|SchemaService.ListSchemas} + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * {@link google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas|SchemaService.ListSchemas} + * 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. + * The first element of the array is Array of {@link google.cloud.discoveryengine.v1beta.Schema | Schema}. + * 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 `listSchemasAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listSchemas( + request?: protos.google.cloud.discoveryengine.v1beta.IListSchemasRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.discoveryengine.v1beta.ISchema[], + protos.google.cloud.discoveryengine.v1beta.IListSchemasRequest | null, + protos.google.cloud.discoveryengine.v1beta.IListSchemasResponse + ] + >; + listSchemas( + request: protos.google.cloud.discoveryengine.v1beta.IListSchemasRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.discoveryengine.v1beta.IListSchemasRequest, + | protos.google.cloud.discoveryengine.v1beta.IListSchemasResponse + | null + | undefined, + protos.google.cloud.discoveryengine.v1beta.ISchema + > + ): void; + listSchemas( + request: protos.google.cloud.discoveryengine.v1beta.IListSchemasRequest, + callback: PaginationCallback< + protos.google.cloud.discoveryengine.v1beta.IListSchemasRequest, + | protos.google.cloud.discoveryengine.v1beta.IListSchemasResponse + | null + | undefined, + protos.google.cloud.discoveryengine.v1beta.ISchema + > + ): void; + listSchemas( + request?: protos.google.cloud.discoveryengine.v1beta.IListSchemasRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.discoveryengine.v1beta.IListSchemasRequest, + | protos.google.cloud.discoveryengine.v1beta.IListSchemasResponse + | null + | undefined, + protos.google.cloud.discoveryengine.v1beta.ISchema + >, + callback?: PaginationCallback< + protos.google.cloud.discoveryengine.v1beta.IListSchemasRequest, + | protos.google.cloud.discoveryengine.v1beta.IListSchemasResponse + | null + | undefined, + protos.google.cloud.discoveryengine.v1beta.ISchema + > + ): Promise< + [ + protos.google.cloud.discoveryengine.v1beta.ISchema[], + protos.google.cloud.discoveryengine.v1beta.IListSchemasRequest | null, + protos.google.cloud.discoveryengine.v1beta.IListSchemasResponse + ] + > | 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(); + return this.innerApiCalls.listSchemas(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent data store resource name, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * @param {number} request.pageSize + * The maximum number of {@link google.cloud.discoveryengine.v1beta.Schema|Schema}s + * to return. The service may return fewer than this value. + * + * If unspecified, at most 100 + * {@link google.cloud.discoveryengine.v1beta.Schema|Schema}s will be returned. + * + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} request.pageToken + * A page token, received from a previous + * {@link google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas|SchemaService.ListSchemas} + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * {@link google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas|SchemaService.ListSchemas} + * 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} + * An object stream which emits an object representing {@link google.cloud.discoveryengine.v1beta.Schema | Schema} 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 `listSchemasAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listSchemasStream( + request?: protos.google.cloud.discoveryengine.v1beta.IListSchemasRequest, + 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['listSchemas']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listSchemas.createStream( + this.innerApiCalls.listSchemas as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listSchemas`, 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 data store resource name, in the format of + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * @param {number} request.pageSize + * The maximum number of {@link google.cloud.discoveryengine.v1beta.Schema|Schema}s + * to return. The service may return fewer than this value. + * + * If unspecified, at most 100 + * {@link google.cloud.discoveryengine.v1beta.Schema|Schema}s will be returned. + * + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} request.pageToken + * A page token, received from a previous + * {@link google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas|SchemaService.ListSchemas} + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * {@link google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas|SchemaService.ListSchemas} + * 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} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.discoveryengine.v1beta.Schema | Schema}. 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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta/schema_service.list_schemas.js + * region_tag:discoveryengine_v1beta_generated_SchemaService_ListSchemas_async + */ + listSchemasAsync( + request?: protos.google.cloud.discoveryengine.v1beta.IListSchemasRequest, + 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['listSchemas']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listSchemas.asyncIterate( + this.innerApiCalls['listSchemas'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified projectLocationCollectionDataStore resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStorePath( + project: string, + location: string, + collection: string, + dataStore: string + ) { + return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStore resource. + * + * @param {string} projectLocationCollectionDataStoreName + * A fully-qualified path representing project_location_collection_data_store resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreName( + projectLocationCollectionDataStoreName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match( + projectLocationCollectionDataStoreName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStore resource. + * + * @param {string} projectLocationCollectionDataStoreName + * A fully-qualified path representing project_location_collection_data_store resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreName( + projectLocationCollectionDataStoreName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match( + projectLocationCollectionDataStoreName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStore resource. + * + * @param {string} projectLocationCollectionDataStoreName + * A fully-qualified path representing project_location_collection_data_store resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreName( + projectLocationCollectionDataStoreName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match( + projectLocationCollectionDataStoreName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStore resource. + * + * @param {string} projectLocationCollectionDataStoreName + * A fully-qualified path representing project_location_collection_data_store resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreName( + projectLocationCollectionDataStoreName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match( + projectLocationCollectionDataStoreName + ).data_store; + } + + /** + * Return a fully-qualified projectLocationCollectionDataStoreBranchDocument resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreBranchDocumentPath( + project: string, + location: string, + collection: string, + dataStore: string, + branch: string, + document: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + branch: branch, + document: document, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreBranchDocument resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentName + * A fully-qualified path representing project_location_collection_data_store_branch_document resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreBranchDocumentName( + projectLocationCollectionDataStoreBranchDocumentName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreBranchDocument resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentName + * A fully-qualified path representing project_location_collection_data_store_branch_document resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreBranchDocumentName( + projectLocationCollectionDataStoreBranchDocumentName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreBranchDocument resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentName + * A fully-qualified path representing project_location_collection_data_store_branch_document resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentName( + projectLocationCollectionDataStoreBranchDocumentName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocument resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentName + * A fully-qualified path representing project_location_collection_data_store_branch_document resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentName( + projectLocationCollectionDataStoreBranchDocumentName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationCollectionDataStoreBranchDocument resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentName + * A fully-qualified path representing project_location_collection_data_store_branch_document resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationCollectionDataStoreBranchDocumentName( + projectLocationCollectionDataStoreBranchDocumentName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentName + ).branch; + } + + /** + * Parse the document from ProjectLocationCollectionDataStoreBranchDocument resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentName + * A fully-qualified path representing project_location_collection_data_store_branch_document resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName( + projectLocationCollectionDataStoreBranchDocumentName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentName + ).document; + } + + /** + * Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} schema + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreSchemaPath( + project: string, + location: string, + collection: string, + dataStore: string, + schema: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + schema: schema, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreSchema resource. + * + * @param {string} projectLocationCollectionDataStoreSchemaName + * A fully-qualified path representing project_location_collection_data_store_schema resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreSchemaName( + projectLocationCollectionDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match( + projectLocationCollectionDataStoreSchemaName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreSchema resource. + * + * @param {string} projectLocationCollectionDataStoreSchemaName + * A fully-qualified path representing project_location_collection_data_store_schema resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreSchemaName( + projectLocationCollectionDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match( + projectLocationCollectionDataStoreSchemaName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreSchema resource. + * + * @param {string} projectLocationCollectionDataStoreSchemaName + * A fully-qualified path representing project_location_collection_data_store_schema resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreSchemaName( + projectLocationCollectionDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match( + projectLocationCollectionDataStoreSchemaName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreSchema resource. + * + * @param {string} projectLocationCollectionDataStoreSchemaName + * A fully-qualified path representing project_location_collection_data_store_schema resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreSchemaName( + projectLocationCollectionDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match( + projectLocationCollectionDataStoreSchemaName + ).data_store; + } + + /** + * Parse the schema from ProjectLocationCollectionDataStoreSchema resource. + * + * @param {string} projectLocationCollectionDataStoreSchemaName + * A fully-qualified path representing project_location_collection_data_store_schema resource. + * @returns {string} A string representing the schema. + */ + matchSchemaFromProjectLocationCollectionDataStoreSchemaName( + projectLocationCollectionDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match( + projectLocationCollectionDataStoreSchemaName + ).schema; + } + + /** + * Return a fully-qualified projectLocationDataStore resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @returns {string} Resource name string. + */ + projectLocationDataStorePath( + project: string, + location: string, + dataStore: string + ) { + return this.pathTemplates.projectLocationDataStorePathTemplate.render({ + project: project, + location: location, + data_store: dataStore, + }); + } + + /** + * Parse the project from ProjectLocationDataStore resource. + * + * @param {string} projectLocationDataStoreName + * A fully-qualified path representing project_location_data_store resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreName( + projectLocationDataStoreName: string + ) { + return this.pathTemplates.projectLocationDataStorePathTemplate.match( + projectLocationDataStoreName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStore resource. + * + * @param {string} projectLocationDataStoreName + * A fully-qualified path representing project_location_data_store resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreName( + projectLocationDataStoreName: string + ) { + return this.pathTemplates.projectLocationDataStorePathTemplate.match( + projectLocationDataStoreName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStore resource. + * + * @param {string} projectLocationDataStoreName + * A fully-qualified path representing project_location_data_store resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreName( + projectLocationDataStoreName: string + ) { + return this.pathTemplates.projectLocationDataStorePathTemplate.match( + projectLocationDataStoreName + ).data_store; + } + + /** + * Return a fully-qualified projectLocationDataStoreBranchDocument resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @returns {string} Resource name string. + */ + projectLocationDataStoreBranchDocumentPath( + project: string, + location: string, + dataStore: string, + branch: string, + document: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + branch: branch, + document: document, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreBranchDocument resource. + * + * @param {string} projectLocationDataStoreBranchDocumentName + * A fully-qualified path representing project_location_data_store_branch_document resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreBranchDocumentName( + projectLocationDataStoreBranchDocumentName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match( + projectLocationDataStoreBranchDocumentName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreBranchDocument resource. + * + * @param {string} projectLocationDataStoreBranchDocumentName + * A fully-qualified path representing project_location_data_store_branch_document resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreBranchDocumentName( + projectLocationDataStoreBranchDocumentName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match( + projectLocationDataStoreBranchDocumentName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreBranchDocument resource. + * + * @param {string} projectLocationDataStoreBranchDocumentName + * A fully-qualified path representing project_location_data_store_branch_document resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreBranchDocumentName( + projectLocationDataStoreBranchDocumentName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match( + projectLocationDataStoreBranchDocumentName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationDataStoreBranchDocument resource. + * + * @param {string} projectLocationDataStoreBranchDocumentName + * A fully-qualified path representing project_location_data_store_branch_document resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationDataStoreBranchDocumentName( + projectLocationDataStoreBranchDocumentName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match( + projectLocationDataStoreBranchDocumentName + ).branch; + } + + /** + * Parse the document from ProjectLocationDataStoreBranchDocument resource. + * + * @param {string} projectLocationDataStoreBranchDocumentName + * A fully-qualified path representing project_location_data_store_branch_document resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationDataStoreBranchDocumentName( + projectLocationDataStoreBranchDocumentName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match( + projectLocationDataStoreBranchDocumentName + ).document; + } + + /** + * Return a fully-qualified projectLocationDataStoreSchema resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} schema + * @returns {string} Resource name string. + */ + projectLocationDataStoreSchemaPath( + project: string, + location: string, + dataStore: string, + schema: string + ) { + return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + schema: schema, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreSchema resource. + * + * @param {string} projectLocationDataStoreSchemaName + * A fully-qualified path representing project_location_data_store_schema resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreSchemaName( + projectLocationDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match( + projectLocationDataStoreSchemaName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreSchema resource. + * + * @param {string} projectLocationDataStoreSchemaName + * A fully-qualified path representing project_location_data_store_schema resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreSchemaName( + projectLocationDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match( + projectLocationDataStoreSchemaName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreSchema resource. + * + * @param {string} projectLocationDataStoreSchemaName + * A fully-qualified path representing project_location_data_store_schema resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreSchemaName( + projectLocationDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match( + projectLocationDataStoreSchemaName + ).data_store; + } + + /** + * Parse the schema from ProjectLocationDataStoreSchema resource. + * + * @param {string} projectLocationDataStoreSchemaName + * A fully-qualified path representing project_location_data_store_schema resource. + * @returns {string} A string representing the schema. + */ + matchSchemaFromProjectLocationDataStoreSchemaName( + projectLocationDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match( + projectLocationDataStoreSchemaName + ).schema; + } + + /** + * 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.schemaServiceStub && !this._terminated) { + return this.schemaServiceStub.then(stub => { + this._terminated = true; + stub.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-discoveryengine/src/v1beta/schema_service_client_config.json b/packages/google-cloud-discoveryengine/src/v1beta/schema_service_client_config.json new file mode 100644 index 00000000000..2c22818266f --- /dev/null +++ b/packages/google-cloud-discoveryengine/src/v1beta/schema_service_client_config.json @@ -0,0 +1,63 @@ +{ + "interfaces": { + "google.cloud.discoveryengine.v1beta.SchemaService": { + "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 + }, + "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetSchema": { + "timeout_millis": 30000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListSchemas": { + "timeout_millis": 30000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateSchema": { + "timeout_millis": 30000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateSchema": { + "timeout_millis": 30000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeleteSchema": { + "timeout_millis": 30000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + } + } + } + } +} diff --git a/packages/google-cloud-discoveryengine/src/v1beta/schema_service_proto_list.json b/packages/google-cloud-discoveryengine/src/v1beta/schema_service_proto_list.json new file mode 100644 index 00000000000..c90e69baf40 --- /dev/null +++ b/packages/google-cloud-discoveryengine/src/v1beta/schema_service_proto_list.json @@ -0,0 +1,14 @@ +[ + "../../protos/google/cloud/discoveryengine/v1beta/common.proto", + "../../protos/google/cloud/discoveryengine/v1beta/completion_service.proto", + "../../protos/google/cloud/discoveryengine/v1beta/document.proto", + "../../protos/google/cloud/discoveryengine/v1beta/document_service.proto", + "../../protos/google/cloud/discoveryengine/v1beta/import_config.proto", + "../../protos/google/cloud/discoveryengine/v1beta/purge_config.proto", + "../../protos/google/cloud/discoveryengine/v1beta/recommendation_service.proto", + "../../protos/google/cloud/discoveryengine/v1beta/schema.proto", + "../../protos/google/cloud/discoveryengine/v1beta/schema_service.proto", + "../../protos/google/cloud/discoveryengine/v1beta/search_service.proto", + "../../protos/google/cloud/discoveryengine/v1beta/user_event.proto", + "../../protos/google/cloud/discoveryengine/v1beta/user_event_service.proto" +] diff --git a/packages/google-cloud-discoveryengine/src/v1beta/search_service_client.ts b/packages/google-cloud-discoveryengine/src/v1beta/search_service_client.ts new file mode 100644 index 00000000000..04018fad33d --- /dev/null +++ b/packages/google-cloud-discoveryengine/src/v1beta/search_service_client.ts @@ -0,0 +1,1620 @@ +// Copyright 2023 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'); +/** + * Client JSON configuration object, loaded from + * `src/v1beta/search_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './search_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service for search. + * @class + * @memberof v1beta + */ +export class SearchServiceClient { + 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}; + 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}; + searchServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of SearchServiceClient. + * + * @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://developers.google.com/identity/protocols/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 | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * 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 SearchServiceClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof SearchServiceClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.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 !== staticMembers.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 = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && '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 if (opts.fallback === 'rest') { + 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 = { + projectLocationCollectionDataStoreBranchPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}' + ), + projectLocationCollectionDataStoreBranchDocumentPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}' + ), + projectLocationCollectionDataStoreSchemaPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}' + ), + projectLocationCollectionDataStoreServingConfigPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}' + ), + projectLocationDataStoreBranchPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}' + ), + projectLocationDataStoreBranchDocumentPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}' + ), + projectLocationDataStoreSchemaPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}' + ), + projectLocationDataStoreServingConfigPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}' + ), + }; + + // 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 = { + search: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'results' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.discoveryengine.v1beta.SearchService', + 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.searchServiceStub) { + return this.searchServiceStub; + } + + // Put together the "service stub" for + // google.cloud.discoveryengine.v1beta.SearchService. + this.searchServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.discoveryengine.v1beta.SearchService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.discoveryengine.v1beta + .SearchService, + 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 searchServiceStubMethods = ['search']; + for (const methodName of searchServiceStubMethods) { + const callPromise = this.searchServiceStub.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.searchServiceStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'discoveryengine.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'discoveryengine.googleapis.com'; + } + + /** + * 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/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 -- + // ------------------- + + /** + * Performs a search. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.servingConfig + * Required. The resource name of the Search serving config, such as + * `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. + * This field is used to identify the serving configuration name, set + * of models used to make the search. + * @param {string} request.branch + * The branch resource name, such as + * `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/branches/0`. + * + * Use `default_branch` as the branch ID or leave this field empty, to search + * documents under the default branch. + * @param {string} request.query + * Raw search query. + * @param {number} request.pageSize + * Maximum number of {@link google.cloud.discoveryengine.v1beta.Document|Document}s + * to return. If unspecified, defaults to a reasonable value. The maximum + * allowed value is 100. Values above 100 will be coerced to 100. + * + * If this field is negative, an `INVALID_ARGUMENT` is returned. + * @param {string} request.pageToken + * A page token received from a previous + * {@link google.cloud.discoveryengine.v1beta.SearchService.Search|SearchService.Search} + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * {@link google.cloud.discoveryengine.v1beta.SearchService.Search|SearchService.Search} + * must match the call that provided the page token. Otherwise, an + * `INVALID_ARGUMENT` error is returned. + * @param {number} request.offset + * A 0-indexed integer that specifies the current offset (that is, starting + * result location, amongst the + * {@link google.cloud.discoveryengine.v1beta.Document|Document}s deemed by the API + * as relevant) in search results. This field is only considered if + * {@link google.cloud.discoveryengine.v1beta.SearchRequest.page_token|page_token} + * is unset. + * + * If this field is negative, an `INVALID_ARGUMENT` is returned. + * @param {string} request.filter + * The filter syntax consists of an expression language for constructing a + * predicate from one or more fields of the documents being filtered. Filter + * expression is case-sensitive. + * + * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + * @param {string} request.orderBy + * The order in which documents are returned. Document can be ordered by + * a field in an {@link google.cloud.discoveryengine.v1beta.Document|Document} + * object. Leave it unset if ordered by relevance. OrderBy expression is + * case-sensitive. + * + * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + * @param {number[]} request.facetSpecs + * Facet specifications for faceted search. If empty, no facets are returned. + * + * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` + * error is returned. + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec} request.boostSpec + * Boost specification to boost certain documents. + * @param {number[]} request.params + * Additional search parameters. + * + * For + * {@link google.cloud.discoveryengine.v1beta.IndustryVertical.SITE_SEARCH|IndustryVertical.SITE_SEARCH} + * vertical, supported values are: + * + * * `user_country_code`: string. Default empty. If set to non-empty, results + * are restricted or boosted based on the location provided. + * * `search_type`: double. Default empty. Enables non-webpage searching + * depending on the value. The only valid non-default value is 1, + * which enables image searching. + * This field is ignored for other verticals. + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec} request.queryExpansionSpec + * The query expansion specification that specifies the conditions under which + * query expansion will occur. + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec} request.spellCorrectionSpec + * The spell correction specification that specifies the mode under + * which spell correction will take effect. + * @param {string} request.userPseudoId + * A unique identifier for tracking visitors. For example, this could be + * implemented with an HTTP cookie, which should be able to uniquely identify + * a visitor on a single device. This unique identifier should not change if + * the visitor logs in or out of the website. + * + * This field should NOT have a fixed value such as `unknown_visitor`. + * + * This should be the same identifier as + * {@link google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id|UserEvent.user_pseudo_id} + * and + * {@link google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id|CompleteQueryRequest.user_pseudo_id} + * + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec} request.contentSearchSpec + * The content search spec that configs the desired behavior of content + * search. + * @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 google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult | SearchResult}. + * 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 `searchAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + search( + request?: protos.google.cloud.discoveryengine.v1beta.ISearchRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult[], + protos.google.cloud.discoveryengine.v1beta.ISearchRequest | null, + protos.google.cloud.discoveryengine.v1beta.ISearchResponse + ] + >; + search( + request: protos.google.cloud.discoveryengine.v1beta.ISearchRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.discoveryengine.v1beta.ISearchRequest, + | protos.google.cloud.discoveryengine.v1beta.ISearchResponse + | null + | undefined, + protos.google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult + > + ): void; + search( + request: protos.google.cloud.discoveryengine.v1beta.ISearchRequest, + callback: PaginationCallback< + protos.google.cloud.discoveryengine.v1beta.ISearchRequest, + | protos.google.cloud.discoveryengine.v1beta.ISearchResponse + | null + | undefined, + protos.google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult + > + ): void; + search( + request?: protos.google.cloud.discoveryengine.v1beta.ISearchRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.discoveryengine.v1beta.ISearchRequest, + | protos.google.cloud.discoveryengine.v1beta.ISearchResponse + | null + | undefined, + protos.google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult + >, + callback?: PaginationCallback< + protos.google.cloud.discoveryengine.v1beta.ISearchRequest, + | protos.google.cloud.discoveryengine.v1beta.ISearchResponse + | null + | undefined, + protos.google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult + > + ): Promise< + [ + protos.google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult[], + protos.google.cloud.discoveryengine.v1beta.ISearchRequest | null, + protos.google.cloud.discoveryengine.v1beta.ISearchResponse + ] + > | 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({ + serving_config: request.servingConfig ?? '', + }); + this.initialize(); + return this.innerApiCalls.search(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.servingConfig + * Required. The resource name of the Search serving config, such as + * `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. + * This field is used to identify the serving configuration name, set + * of models used to make the search. + * @param {string} request.branch + * The branch resource name, such as + * `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/branches/0`. + * + * Use `default_branch` as the branch ID or leave this field empty, to search + * documents under the default branch. + * @param {string} request.query + * Raw search query. + * @param {number} request.pageSize + * Maximum number of {@link google.cloud.discoveryengine.v1beta.Document|Document}s + * to return. If unspecified, defaults to a reasonable value. The maximum + * allowed value is 100. Values above 100 will be coerced to 100. + * + * If this field is negative, an `INVALID_ARGUMENT` is returned. + * @param {string} request.pageToken + * A page token received from a previous + * {@link google.cloud.discoveryengine.v1beta.SearchService.Search|SearchService.Search} + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * {@link google.cloud.discoveryengine.v1beta.SearchService.Search|SearchService.Search} + * must match the call that provided the page token. Otherwise, an + * `INVALID_ARGUMENT` error is returned. + * @param {number} request.offset + * A 0-indexed integer that specifies the current offset (that is, starting + * result location, amongst the + * {@link google.cloud.discoveryengine.v1beta.Document|Document}s deemed by the API + * as relevant) in search results. This field is only considered if + * {@link google.cloud.discoveryengine.v1beta.SearchRequest.page_token|page_token} + * is unset. + * + * If this field is negative, an `INVALID_ARGUMENT` is returned. + * @param {string} request.filter + * The filter syntax consists of an expression language for constructing a + * predicate from one or more fields of the documents being filtered. Filter + * expression is case-sensitive. + * + * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + * @param {string} request.orderBy + * The order in which documents are returned. Document can be ordered by + * a field in an {@link google.cloud.discoveryengine.v1beta.Document|Document} + * object. Leave it unset if ordered by relevance. OrderBy expression is + * case-sensitive. + * + * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + * @param {number[]} request.facetSpecs + * Facet specifications for faceted search. If empty, no facets are returned. + * + * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` + * error is returned. + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec} request.boostSpec + * Boost specification to boost certain documents. + * @param {number[]} request.params + * Additional search parameters. + * + * For + * {@link google.cloud.discoveryengine.v1beta.IndustryVertical.SITE_SEARCH|IndustryVertical.SITE_SEARCH} + * vertical, supported values are: + * + * * `user_country_code`: string. Default empty. If set to non-empty, results + * are restricted or boosted based on the location provided. + * * `search_type`: double. Default empty. Enables non-webpage searching + * depending on the value. The only valid non-default value is 1, + * which enables image searching. + * This field is ignored for other verticals. + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec} request.queryExpansionSpec + * The query expansion specification that specifies the conditions under which + * query expansion will occur. + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec} request.spellCorrectionSpec + * The spell correction specification that specifies the mode under + * which spell correction will take effect. + * @param {string} request.userPseudoId + * A unique identifier for tracking visitors. For example, this could be + * implemented with an HTTP cookie, which should be able to uniquely identify + * a visitor on a single device. This unique identifier should not change if + * the visitor logs in or out of the website. + * + * This field should NOT have a fixed value such as `unknown_visitor`. + * + * This should be the same identifier as + * {@link google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id|UserEvent.user_pseudo_id} + * and + * {@link google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id|CompleteQueryRequest.user_pseudo_id} + * + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec} request.contentSearchSpec + * The content search spec that configs the desired behavior of content + * search. + * @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 google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult | SearchResult} 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 `searchAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + searchStream( + request?: protos.google.cloud.discoveryengine.v1beta.ISearchRequest, + 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({ + serving_config: request.servingConfig ?? '', + }); + const defaultCallSettings = this._defaults['search']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.search.createStream( + this.innerApiCalls.search as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `search`, 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.servingConfig + * Required. The resource name of the Search serving config, such as + * `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. + * This field is used to identify the serving configuration name, set + * of models used to make the search. + * @param {string} request.branch + * The branch resource name, such as + * `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/branches/0`. + * + * Use `default_branch` as the branch ID or leave this field empty, to search + * documents under the default branch. + * @param {string} request.query + * Raw search query. + * @param {number} request.pageSize + * Maximum number of {@link google.cloud.discoveryengine.v1beta.Document|Document}s + * to return. If unspecified, defaults to a reasonable value. The maximum + * allowed value is 100. Values above 100 will be coerced to 100. + * + * If this field is negative, an `INVALID_ARGUMENT` is returned. + * @param {string} request.pageToken + * A page token received from a previous + * {@link google.cloud.discoveryengine.v1beta.SearchService.Search|SearchService.Search} + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * {@link google.cloud.discoveryengine.v1beta.SearchService.Search|SearchService.Search} + * must match the call that provided the page token. Otherwise, an + * `INVALID_ARGUMENT` error is returned. + * @param {number} request.offset + * A 0-indexed integer that specifies the current offset (that is, starting + * result location, amongst the + * {@link google.cloud.discoveryengine.v1beta.Document|Document}s deemed by the API + * as relevant) in search results. This field is only considered if + * {@link google.cloud.discoveryengine.v1beta.SearchRequest.page_token|page_token} + * is unset. + * + * If this field is negative, an `INVALID_ARGUMENT` is returned. + * @param {string} request.filter + * The filter syntax consists of an expression language for constructing a + * predicate from one or more fields of the documents being filtered. Filter + * expression is case-sensitive. + * + * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + * @param {string} request.orderBy + * The order in which documents are returned. Document can be ordered by + * a field in an {@link google.cloud.discoveryengine.v1beta.Document|Document} + * object. Leave it unset if ordered by relevance. OrderBy expression is + * case-sensitive. + * + * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + * @param {number[]} request.facetSpecs + * Facet specifications for faceted search. If empty, no facets are returned. + * + * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` + * error is returned. + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec} request.boostSpec + * Boost specification to boost certain documents. + * @param {number[]} request.params + * Additional search parameters. + * + * For + * {@link google.cloud.discoveryengine.v1beta.IndustryVertical.SITE_SEARCH|IndustryVertical.SITE_SEARCH} + * vertical, supported values are: + * + * * `user_country_code`: string. Default empty. If set to non-empty, results + * are restricted or boosted based on the location provided. + * * `search_type`: double. Default empty. Enables non-webpage searching + * depending on the value. The only valid non-default value is 1, + * which enables image searching. + * This field is ignored for other verticals. + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec} request.queryExpansionSpec + * The query expansion specification that specifies the conditions under which + * query expansion will occur. + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec} request.spellCorrectionSpec + * The spell correction specification that specifies the mode under + * which spell correction will take effect. + * @param {string} request.userPseudoId + * A unique identifier for tracking visitors. For example, this could be + * implemented with an HTTP cookie, which should be able to uniquely identify + * a visitor on a single device. This unique identifier should not change if + * the visitor logs in or out of the website. + * + * This field should NOT have a fixed value such as `unknown_visitor`. + * + * This should be the same identifier as + * {@link google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id|UserEvent.user_pseudo_id} + * and + * {@link google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id|CompleteQueryRequest.user_pseudo_id} + * + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * @param {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec} request.contentSearchSpec + * The content search spec that configs the desired behavior of content + * search. + * @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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult | SearchResult}. 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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta/search_service.search.js + * region_tag:discoveryengine_v1beta_generated_SearchService_Search_async + */ + searchAsync( + request?: protos.google.cloud.discoveryengine.v1beta.ISearchRequest, + 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({ + serving_config: request.servingConfig ?? '', + }); + const defaultCallSettings = this._defaults['search']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.search.asyncIterate( + this.innerApiCalls['search'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified projectLocationCollectionDataStoreBranch resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} branch + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreBranchPath( + project: string, + location: string, + collection: string, + dataStore: string, + branch: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + branch: branch, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreBranch resource. + * + * @param {string} projectLocationCollectionDataStoreBranchName + * A fully-qualified path representing project_location_collection_data_store_branch resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreBranchName( + projectLocationCollectionDataStoreBranchName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchPathTemplate.match( + projectLocationCollectionDataStoreBranchName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreBranch resource. + * + * @param {string} projectLocationCollectionDataStoreBranchName + * A fully-qualified path representing project_location_collection_data_store_branch resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreBranchName( + projectLocationCollectionDataStoreBranchName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchPathTemplate.match( + projectLocationCollectionDataStoreBranchName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreBranch resource. + * + * @param {string} projectLocationCollectionDataStoreBranchName + * A fully-qualified path representing project_location_collection_data_store_branch resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreBranchName( + projectLocationCollectionDataStoreBranchName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchPathTemplate.match( + projectLocationCollectionDataStoreBranchName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreBranch resource. + * + * @param {string} projectLocationCollectionDataStoreBranchName + * A fully-qualified path representing project_location_collection_data_store_branch resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreBranchName( + projectLocationCollectionDataStoreBranchName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchPathTemplate.match( + projectLocationCollectionDataStoreBranchName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationCollectionDataStoreBranch resource. + * + * @param {string} projectLocationCollectionDataStoreBranchName + * A fully-qualified path representing project_location_collection_data_store_branch resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationCollectionDataStoreBranchName( + projectLocationCollectionDataStoreBranchName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchPathTemplate.match( + projectLocationCollectionDataStoreBranchName + ).branch; + } + + /** + * Return a fully-qualified projectLocationCollectionDataStoreBranchDocument resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreBranchDocumentPath( + project: string, + location: string, + collection: string, + dataStore: string, + branch: string, + document: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + branch: branch, + document: document, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreBranchDocument resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentName + * A fully-qualified path representing project_location_collection_data_store_branch_document resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreBranchDocumentName( + projectLocationCollectionDataStoreBranchDocumentName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreBranchDocument resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentName + * A fully-qualified path representing project_location_collection_data_store_branch_document resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreBranchDocumentName( + projectLocationCollectionDataStoreBranchDocumentName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreBranchDocument resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentName + * A fully-qualified path representing project_location_collection_data_store_branch_document resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentName( + projectLocationCollectionDataStoreBranchDocumentName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocument resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentName + * A fully-qualified path representing project_location_collection_data_store_branch_document resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentName( + projectLocationCollectionDataStoreBranchDocumentName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationCollectionDataStoreBranchDocument resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentName + * A fully-qualified path representing project_location_collection_data_store_branch_document resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationCollectionDataStoreBranchDocumentName( + projectLocationCollectionDataStoreBranchDocumentName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentName + ).branch; + } + + /** + * Parse the document from ProjectLocationCollectionDataStoreBranchDocument resource. + * + * @param {string} projectLocationCollectionDataStoreBranchDocumentName + * A fully-qualified path representing project_location_collection_data_store_branch_document resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName( + projectLocationCollectionDataStoreBranchDocumentName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match( + projectLocationCollectionDataStoreBranchDocumentName + ).document; + } + + /** + * Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} schema + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreSchemaPath( + project: string, + location: string, + collection: string, + dataStore: string, + schema: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + schema: schema, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreSchema resource. + * + * @param {string} projectLocationCollectionDataStoreSchemaName + * A fully-qualified path representing project_location_collection_data_store_schema resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreSchemaName( + projectLocationCollectionDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match( + projectLocationCollectionDataStoreSchemaName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreSchema resource. + * + * @param {string} projectLocationCollectionDataStoreSchemaName + * A fully-qualified path representing project_location_collection_data_store_schema resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreSchemaName( + projectLocationCollectionDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match( + projectLocationCollectionDataStoreSchemaName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreSchema resource. + * + * @param {string} projectLocationCollectionDataStoreSchemaName + * A fully-qualified path representing project_location_collection_data_store_schema resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreSchemaName( + projectLocationCollectionDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match( + projectLocationCollectionDataStoreSchemaName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreSchema resource. + * + * @param {string} projectLocationCollectionDataStoreSchemaName + * A fully-qualified path representing project_location_collection_data_store_schema resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreSchemaName( + projectLocationCollectionDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match( + projectLocationCollectionDataStoreSchemaName + ).data_store; + } + + /** + * Parse the schema from ProjectLocationCollectionDataStoreSchema resource. + * + * @param {string} projectLocationCollectionDataStoreSchemaName + * A fully-qualified path representing project_location_collection_data_store_schema resource. + * @returns {string} A string representing the schema. + */ + matchSchemaFromProjectLocationCollectionDataStoreSchemaName( + projectLocationCollectionDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match( + projectLocationCollectionDataStoreSchemaName + ).schema; + } + + /** + * Return a fully-qualified projectLocationCollectionDataStoreServingConfig resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} serving_config + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreServingConfigPath( + project: string, + location: string, + collection: string, + dataStore: string, + servingConfig: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + serving_config: servingConfig, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreServingConfig resource. + * + * @param {string} projectLocationCollectionDataStoreServingConfigName + * A fully-qualified path representing project_location_collection_data_store_serving_config resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreServingConfigName( + projectLocationCollectionDataStoreServingConfigName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match( + projectLocationCollectionDataStoreServingConfigName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreServingConfig resource. + * + * @param {string} projectLocationCollectionDataStoreServingConfigName + * A fully-qualified path representing project_location_collection_data_store_serving_config resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreServingConfigName( + projectLocationCollectionDataStoreServingConfigName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match( + projectLocationCollectionDataStoreServingConfigName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreServingConfig resource. + * + * @param {string} projectLocationCollectionDataStoreServingConfigName + * A fully-qualified path representing project_location_collection_data_store_serving_config resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreServingConfigName( + projectLocationCollectionDataStoreServingConfigName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match( + projectLocationCollectionDataStoreServingConfigName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreServingConfig resource. + * + * @param {string} projectLocationCollectionDataStoreServingConfigName + * A fully-qualified path representing project_location_collection_data_store_serving_config resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreServingConfigName( + projectLocationCollectionDataStoreServingConfigName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match( + projectLocationCollectionDataStoreServingConfigName + ).data_store; + } + + /** + * Parse the serving_config from ProjectLocationCollectionDataStoreServingConfig resource. + * + * @param {string} projectLocationCollectionDataStoreServingConfigName + * A fully-qualified path representing project_location_collection_data_store_serving_config resource. + * @returns {string} A string representing the serving_config. + */ + matchServingConfigFromProjectLocationCollectionDataStoreServingConfigName( + projectLocationCollectionDataStoreServingConfigName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match( + projectLocationCollectionDataStoreServingConfigName + ).serving_config; + } + + /** + * Return a fully-qualified projectLocationDataStoreBranch resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} branch + * @returns {string} Resource name string. + */ + projectLocationDataStoreBranchPath( + project: string, + location: string, + dataStore: string, + branch: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + branch: branch, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreBranch resource. + * + * @param {string} projectLocationDataStoreBranchName + * A fully-qualified path representing project_location_data_store_branch resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreBranchName( + projectLocationDataStoreBranchName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchPathTemplate.match( + projectLocationDataStoreBranchName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreBranch resource. + * + * @param {string} projectLocationDataStoreBranchName + * A fully-qualified path representing project_location_data_store_branch resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreBranchName( + projectLocationDataStoreBranchName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchPathTemplate.match( + projectLocationDataStoreBranchName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreBranch resource. + * + * @param {string} projectLocationDataStoreBranchName + * A fully-qualified path representing project_location_data_store_branch resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreBranchName( + projectLocationDataStoreBranchName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchPathTemplate.match( + projectLocationDataStoreBranchName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationDataStoreBranch resource. + * + * @param {string} projectLocationDataStoreBranchName + * A fully-qualified path representing project_location_data_store_branch resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationDataStoreBranchName( + projectLocationDataStoreBranchName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchPathTemplate.match( + projectLocationDataStoreBranchName + ).branch; + } + + /** + * Return a fully-qualified projectLocationDataStoreBranchDocument resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} branch + * @param {string} document + * @returns {string} Resource name string. + */ + projectLocationDataStoreBranchDocumentPath( + project: string, + location: string, + dataStore: string, + branch: string, + document: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + branch: branch, + document: document, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreBranchDocument resource. + * + * @param {string} projectLocationDataStoreBranchDocumentName + * A fully-qualified path representing project_location_data_store_branch_document resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreBranchDocumentName( + projectLocationDataStoreBranchDocumentName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match( + projectLocationDataStoreBranchDocumentName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreBranchDocument resource. + * + * @param {string} projectLocationDataStoreBranchDocumentName + * A fully-qualified path representing project_location_data_store_branch_document resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreBranchDocumentName( + projectLocationDataStoreBranchDocumentName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match( + projectLocationDataStoreBranchDocumentName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreBranchDocument resource. + * + * @param {string} projectLocationDataStoreBranchDocumentName + * A fully-qualified path representing project_location_data_store_branch_document resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreBranchDocumentName( + projectLocationDataStoreBranchDocumentName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match( + projectLocationDataStoreBranchDocumentName + ).data_store; + } + + /** + * Parse the branch from ProjectLocationDataStoreBranchDocument resource. + * + * @param {string} projectLocationDataStoreBranchDocumentName + * A fully-qualified path representing project_location_data_store_branch_document resource. + * @returns {string} A string representing the branch. + */ + matchBranchFromProjectLocationDataStoreBranchDocumentName( + projectLocationDataStoreBranchDocumentName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match( + projectLocationDataStoreBranchDocumentName + ).branch; + } + + /** + * Parse the document from ProjectLocationDataStoreBranchDocument resource. + * + * @param {string} projectLocationDataStoreBranchDocumentName + * A fully-qualified path representing project_location_data_store_branch_document resource. + * @returns {string} A string representing the document. + */ + matchDocumentFromProjectLocationDataStoreBranchDocumentName( + projectLocationDataStoreBranchDocumentName: string + ) { + return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match( + projectLocationDataStoreBranchDocumentName + ).document; + } + + /** + * Return a fully-qualified projectLocationDataStoreSchema resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} schema + * @returns {string} Resource name string. + */ + projectLocationDataStoreSchemaPath( + project: string, + location: string, + dataStore: string, + schema: string + ) { + return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + schema: schema, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreSchema resource. + * + * @param {string} projectLocationDataStoreSchemaName + * A fully-qualified path representing project_location_data_store_schema resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreSchemaName( + projectLocationDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match( + projectLocationDataStoreSchemaName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreSchema resource. + * + * @param {string} projectLocationDataStoreSchemaName + * A fully-qualified path representing project_location_data_store_schema resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreSchemaName( + projectLocationDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match( + projectLocationDataStoreSchemaName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreSchema resource. + * + * @param {string} projectLocationDataStoreSchemaName + * A fully-qualified path representing project_location_data_store_schema resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreSchemaName( + projectLocationDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match( + projectLocationDataStoreSchemaName + ).data_store; + } + + /** + * Parse the schema from ProjectLocationDataStoreSchema resource. + * + * @param {string} projectLocationDataStoreSchemaName + * A fully-qualified path representing project_location_data_store_schema resource. + * @returns {string} A string representing the schema. + */ + matchSchemaFromProjectLocationDataStoreSchemaName( + projectLocationDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match( + projectLocationDataStoreSchemaName + ).schema; + } + + /** + * Return a fully-qualified projectLocationDataStoreServingConfig resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} serving_config + * @returns {string} Resource name string. + */ + projectLocationDataStoreServingConfigPath( + project: string, + location: string, + dataStore: string, + servingConfig: string + ) { + return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + serving_config: servingConfig, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreServingConfig resource. + * + * @param {string} projectLocationDataStoreServingConfigName + * A fully-qualified path representing project_location_data_store_serving_config resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreServingConfigName( + projectLocationDataStoreServingConfigName: string + ) { + return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match( + projectLocationDataStoreServingConfigName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreServingConfig resource. + * + * @param {string} projectLocationDataStoreServingConfigName + * A fully-qualified path representing project_location_data_store_serving_config resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreServingConfigName( + projectLocationDataStoreServingConfigName: string + ) { + return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match( + projectLocationDataStoreServingConfigName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreServingConfig resource. + * + * @param {string} projectLocationDataStoreServingConfigName + * A fully-qualified path representing project_location_data_store_serving_config resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreServingConfigName( + projectLocationDataStoreServingConfigName: string + ) { + return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match( + projectLocationDataStoreServingConfigName + ).data_store; + } + + /** + * Parse the serving_config from ProjectLocationDataStoreServingConfig resource. + * + * @param {string} projectLocationDataStoreServingConfigName + * A fully-qualified path representing project_location_data_store_serving_config resource. + * @returns {string} A string representing the serving_config. + */ + matchServingConfigFromProjectLocationDataStoreServingConfigName( + projectLocationDataStoreServingConfigName: string + ) { + return this.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match( + projectLocationDataStoreServingConfigName + ).serving_config; + } + + /** + * 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.searchServiceStub && !this._terminated) { + return this.searchServiceStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-discoveryengine/src/v1beta/search_service_client_config.json b/packages/google-cloud-discoveryengine/src/v1beta/search_service_client_config.json new file mode 100644 index 00000000000..5efbd6c02f2 --- /dev/null +++ b/packages/google-cloud-discoveryengine/src/v1beta/search_service_client_config.json @@ -0,0 +1,43 @@ +{ + "interfaces": { + "google.cloud.discoveryengine.v1beta.SearchService": { + "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 + }, + "319f27672a8be83550d842a373549dd84649a57e": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 5000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "Search": { + "timeout_millis": 5000, + "retry_codes_name": "unavailable", + "retry_params_name": "319f27672a8be83550d842a373549dd84649a57e" + } + } + } + } +} diff --git a/packages/google-cloud-discoveryengine/src/v1beta/search_service_proto_list.json b/packages/google-cloud-discoveryengine/src/v1beta/search_service_proto_list.json new file mode 100644 index 00000000000..c90e69baf40 --- /dev/null +++ b/packages/google-cloud-discoveryengine/src/v1beta/search_service_proto_list.json @@ -0,0 +1,14 @@ +[ + "../../protos/google/cloud/discoveryengine/v1beta/common.proto", + "../../protos/google/cloud/discoveryengine/v1beta/completion_service.proto", + "../../protos/google/cloud/discoveryengine/v1beta/document.proto", + "../../protos/google/cloud/discoveryengine/v1beta/document_service.proto", + "../../protos/google/cloud/discoveryengine/v1beta/import_config.proto", + "../../protos/google/cloud/discoveryengine/v1beta/purge_config.proto", + "../../protos/google/cloud/discoveryengine/v1beta/recommendation_service.proto", + "../../protos/google/cloud/discoveryengine/v1beta/schema.proto", + "../../protos/google/cloud/discoveryengine/v1beta/schema_service.proto", + "../../protos/google/cloud/discoveryengine/v1beta/search_service.proto", + "../../protos/google/cloud/discoveryengine/v1beta/user_event.proto", + "../../protos/google/cloud/discoveryengine/v1beta/user_event_service.proto" +] diff --git a/packages/google-cloud-discoveryengine/src/v1beta/user_event_service_client.ts b/packages/google-cloud-discoveryengine/src/v1beta/user_event_service_client.ts index 649a7ea155e..b5a76e4f3fc 100644 --- a/packages/google-cloud-discoveryengine/src/v1beta/user_event_service_client.ts +++ b/packages/google-cloud-discoveryengine/src/v1beta/user_event_service_client.ts @@ -187,6 +187,10 @@ export class UserEventServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationCollectionDataStoreSchemaPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}' + ), projectLocationDataStorePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}' ), @@ -194,6 +198,10 @@ export class UserEventServiceClient { new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}' ), + projectLocationDataStoreSchemaPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}' + ), }; const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); @@ -1170,6 +1178,109 @@ export class UserEventServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} collection + * @param {string} data_store + * @param {string} schema + * @returns {string} Resource name string. + */ + projectLocationCollectionDataStoreSchemaPath( + project: string, + location: string, + collection: string, + dataStore: string, + schema: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render( + { + project: project, + location: location, + collection: collection, + data_store: dataStore, + schema: schema, + } + ); + } + + /** + * Parse the project from ProjectLocationCollectionDataStoreSchema resource. + * + * @param {string} projectLocationCollectionDataStoreSchemaName + * A fully-qualified path representing project_location_collection_data_store_schema resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationCollectionDataStoreSchemaName( + projectLocationCollectionDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match( + projectLocationCollectionDataStoreSchemaName + ).project; + } + + /** + * Parse the location from ProjectLocationCollectionDataStoreSchema resource. + * + * @param {string} projectLocationCollectionDataStoreSchemaName + * A fully-qualified path representing project_location_collection_data_store_schema resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationCollectionDataStoreSchemaName( + projectLocationCollectionDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match( + projectLocationCollectionDataStoreSchemaName + ).location; + } + + /** + * Parse the collection from ProjectLocationCollectionDataStoreSchema resource. + * + * @param {string} projectLocationCollectionDataStoreSchemaName + * A fully-qualified path representing project_location_collection_data_store_schema resource. + * @returns {string} A string representing the collection. + */ + matchCollectionFromProjectLocationCollectionDataStoreSchemaName( + projectLocationCollectionDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match( + projectLocationCollectionDataStoreSchemaName + ).collection; + } + + /** + * Parse the data_store from ProjectLocationCollectionDataStoreSchema resource. + * + * @param {string} projectLocationCollectionDataStoreSchemaName + * A fully-qualified path representing project_location_collection_data_store_schema resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationCollectionDataStoreSchemaName( + projectLocationCollectionDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match( + projectLocationCollectionDataStoreSchemaName + ).data_store; + } + + /** + * Parse the schema from ProjectLocationCollectionDataStoreSchema resource. + * + * @param {string} projectLocationCollectionDataStoreSchemaName + * A fully-qualified path representing project_location_collection_data_store_schema resource. + * @returns {string} A string representing the schema. + */ + matchSchemaFromProjectLocationCollectionDataStoreSchemaName( + projectLocationCollectionDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match( + projectLocationCollectionDataStoreSchemaName + ).schema; + } + /** * Return a fully-qualified projectLocationDataStore resource name string. * @@ -1338,6 +1449,91 @@ export class UserEventServiceClient { ).document; } + /** + * Return a fully-qualified projectLocationDataStoreSchema resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_store + * @param {string} schema + * @returns {string} Resource name string. + */ + projectLocationDataStoreSchemaPath( + project: string, + location: string, + dataStore: string, + schema: string + ) { + return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render( + { + project: project, + location: location, + data_store: dataStore, + schema: schema, + } + ); + } + + /** + * Parse the project from ProjectLocationDataStoreSchema resource. + * + * @param {string} projectLocationDataStoreSchemaName + * A fully-qualified path representing project_location_data_store_schema resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDataStoreSchemaName( + projectLocationDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match( + projectLocationDataStoreSchemaName + ).project; + } + + /** + * Parse the location from ProjectLocationDataStoreSchema resource. + * + * @param {string} projectLocationDataStoreSchemaName + * A fully-qualified path representing project_location_data_store_schema resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDataStoreSchemaName( + projectLocationDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match( + projectLocationDataStoreSchemaName + ).location; + } + + /** + * Parse the data_store from ProjectLocationDataStoreSchema resource. + * + * @param {string} projectLocationDataStoreSchemaName + * A fully-qualified path representing project_location_data_store_schema resource. + * @returns {string} A string representing the data_store. + */ + matchDataStoreFromProjectLocationDataStoreSchemaName( + projectLocationDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match( + projectLocationDataStoreSchemaName + ).data_store; + } + + /** + * Parse the schema from ProjectLocationDataStoreSchema resource. + * + * @param {string} projectLocationDataStoreSchemaName + * A fully-qualified path representing project_location_data_store_schema resource. + * @returns {string} A string representing the schema. + */ + matchSchemaFromProjectLocationDataStoreSchemaName( + projectLocationDataStoreSchemaName: string + ) { + return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match( + projectLocationDataStoreSchemaName + ).schema; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-cloud-discoveryengine/src/v1beta/user_event_service_proto_list.json b/packages/google-cloud-discoveryengine/src/v1beta/user_event_service_proto_list.json index 22c1ffca3d1..c90e69baf40 100644 --- a/packages/google-cloud-discoveryengine/src/v1beta/user_event_service_proto_list.json +++ b/packages/google-cloud-discoveryengine/src/v1beta/user_event_service_proto_list.json @@ -1,9 +1,14 @@ [ "../../protos/google/cloud/discoveryengine/v1beta/common.proto", + "../../protos/google/cloud/discoveryengine/v1beta/completion_service.proto", "../../protos/google/cloud/discoveryengine/v1beta/document.proto", "../../protos/google/cloud/discoveryengine/v1beta/document_service.proto", "../../protos/google/cloud/discoveryengine/v1beta/import_config.proto", + "../../protos/google/cloud/discoveryengine/v1beta/purge_config.proto", "../../protos/google/cloud/discoveryengine/v1beta/recommendation_service.proto", + "../../protos/google/cloud/discoveryengine/v1beta/schema.proto", + "../../protos/google/cloud/discoveryengine/v1beta/schema_service.proto", + "../../protos/google/cloud/discoveryengine/v1beta/search_service.proto", "../../protos/google/cloud/discoveryengine/v1beta/user_event.proto", "../../protos/google/cloud/discoveryengine/v1beta/user_event_service.proto" ] diff --git a/packages/google-cloud-discoveryengine/system-test/fixtures/sample/src/index.js b/packages/google-cloud-discoveryengine/system-test/fixtures/sample/src/index.js index d045bbdb610..c179b77c997 100644 --- a/packages/google-cloud-discoveryengine/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-discoveryengine/system-test/fixtures/sample/src/index.js @@ -20,9 +20,12 @@ const discoveryengine = require('@google-cloud/discoveryengine'); function main() { + const completionServiceClient = new discoveryengine.CompletionServiceClient(); const documentServiceClient = new discoveryengine.DocumentServiceClient(); const recommendationServiceClient = new discoveryengine.RecommendationServiceClient(); + const schemaServiceClient = new discoveryengine.SchemaServiceClient(); + const searchServiceClient = new discoveryengine.SearchServiceClient(); const userEventServiceClient = new discoveryengine.UserEventServiceClient(); } diff --git a/packages/google-cloud-discoveryengine/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-discoveryengine/system-test/fixtures/sample/src/index.ts index b27701c3fb4..ae43429f8f4 100644 --- a/packages/google-cloud-discoveryengine/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-discoveryengine/system-test/fixtures/sample/src/index.ts @@ -17,12 +17,18 @@ // ** All changes to this file may be overwritten. ** import { + CompletionServiceClient, DocumentServiceClient, RecommendationServiceClient, + SchemaServiceClient, + SearchServiceClient, UserEventServiceClient, } from '@google-cloud/discoveryengine'; // check that the client class type name can be used +function doStuffWithCompletionServiceClient(client: CompletionServiceClient) { + client.close(); +} function doStuffWithDocumentServiceClient(client: DocumentServiceClient) { client.close(); } @@ -31,11 +37,20 @@ function doStuffWithRecommendationServiceClient( ) { client.close(); } +function doStuffWithSchemaServiceClient(client: SchemaServiceClient) { + client.close(); +} +function doStuffWithSearchServiceClient(client: SearchServiceClient) { + client.close(); +} function doStuffWithUserEventServiceClient(client: UserEventServiceClient) { client.close(); } function main() { + // check that the client instance can be created + const completionServiceClient = new CompletionServiceClient(); + doStuffWithCompletionServiceClient(completionServiceClient); // check that the client instance can be created const documentServiceClient = new DocumentServiceClient(); doStuffWithDocumentServiceClient(documentServiceClient); @@ -43,6 +58,12 @@ function main() { const recommendationServiceClient = new RecommendationServiceClient(); doStuffWithRecommendationServiceClient(recommendationServiceClient); // check that the client instance can be created + const schemaServiceClient = new SchemaServiceClient(); + doStuffWithSchemaServiceClient(schemaServiceClient); + // check that the client instance can be created + const searchServiceClient = new SearchServiceClient(); + doStuffWithSearchServiceClient(searchServiceClient); + // check that the client instance can be created const userEventServiceClient = new UserEventServiceClient(); doStuffWithUserEventServiceClient(userEventServiceClient); } diff --git a/packages/google-cloud-discoveryengine/test/gapic_completion_service_v1beta.ts b/packages/google-cloud-discoveryengine/test/gapic_completion_service_v1beta.ts new file mode 100644 index 00000000000..d821111947a --- /dev/null +++ b/packages/google-cloud-discoveryengine/test/gapic_completion_service_v1beta.ts @@ -0,0 +1,1001 @@ +// Copyright 2023 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 completionserviceModule from '../src'; + +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); +} + +describe('v1beta.CompletionServiceClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + completionserviceModule.v1beta.CompletionServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + completionserviceModule.v1beta.CompletionServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = completionserviceModule.v1beta.CompletionServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = + new completionserviceModule.v1beta.CompletionServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new completionserviceModule.v1beta.CompletionServiceClient( + { + fallback: true, + } + ); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new completionserviceModule.v1beta.CompletionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.completionServiceStub, undefined); + await client.initialize(); + assert(client.completionServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new completionserviceModule.v1beta.CompletionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + assert(client.completionServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new completionserviceModule.v1beta.CompletionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.completionServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new completionserviceModule.v1beta.CompletionServiceClient( + { + 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 completionserviceModule.v1beta.CompletionServiceClient( + { + 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('completeQuery', () => { + it('invokes completeQuery without error', async () => { + const client = new completionserviceModule.v1beta.CompletionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.CompleteQueryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.CompleteQueryRequest', + ['dataStore'] + ); + request.dataStore = defaultValue1; + const expectedHeaderRequestParams = `data_store=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.CompleteQueryResponse() + ); + client.innerApiCalls.completeQuery = stubSimpleCall(expectedResponse); + const [response] = await client.completeQuery(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.completeQuery as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.completeQuery as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes completeQuery without error using callback', async () => { + const client = new completionserviceModule.v1beta.CompletionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.CompleteQueryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.CompleteQueryRequest', + ['dataStore'] + ); + request.dataStore = defaultValue1; + const expectedHeaderRequestParams = `data_store=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.CompleteQueryResponse() + ); + client.innerApiCalls.completeQuery = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.completeQuery( + request, + ( + err?: Error | null, + result?: protos.google.cloud.discoveryengine.v1beta.ICompleteQueryResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.completeQuery as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.completeQuery as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes completeQuery with error', async () => { + const client = new completionserviceModule.v1beta.CompletionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.CompleteQueryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.CompleteQueryRequest', + ['dataStore'] + ); + request.dataStore = defaultValue1; + const expectedHeaderRequestParams = `data_store=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.completeQuery = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.completeQuery(request), expectedError); + const actualRequest = ( + client.innerApiCalls.completeQuery as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.completeQuery as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes completeQuery with closed client', async () => { + const client = new completionserviceModule.v1beta.CompletionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.CompleteQueryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.CompleteQueryRequest', + ['dataStore'] + ); + request.dataStore = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.completeQuery(request), expectedError); + }); + }); + + describe('Path templates', () => { + describe('projectLocationCollectionDataStore', () => { + const fakePath = '/rendered/path/projectLocationCollectionDataStore'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + }; + const client = new completionserviceModule.v1beta.CompletionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStorePath', () => { + const result = client.projectLocationCollectionDataStorePath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationCollectionDataStorePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationCollectionDataStorePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationCollectionDataStorePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates.projectLocationCollectionDataStorePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates.projectLocationCollectionDataStorePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationCollectionDataStoreBranchDocument', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + }; + const client = new completionserviceModule.v1beta.CompletionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreBranchDocumentPath', () => { + const result = + client.projectLocationCollectionDataStoreBranchDocumentPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'branchValue', + 'documentValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreBranchDocumentName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreBranchDocumentName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreBranchDocumentName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreBranchDocumentName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationCollectionDataStoreBranchDocumentName', () => { + const result = + client.matchBranchFromProjectLocationCollectionDataStoreBranchDocumentName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName', () => { + const result = + client.matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationCollectionDataStoreSchema', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreSchema'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + schema: 'schemaValue', + }; + const client = new completionserviceModule.v1beta.CompletionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreSchemaPath', () => { + const result = client.projectLocationCollectionDataStoreSchemaPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'schemaValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreSchemaName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreSchemaName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreSchemaName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreSchemaName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreSchemaName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreSchemaName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreSchemaName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreSchemaName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSchemaFromProjectLocationCollectionDataStoreSchemaName', () => { + const result = + client.matchSchemaFromProjectLocationCollectionDataStoreSchemaName( + fakePath + ); + assert.strictEqual(result, 'schemaValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationDataStore', () => { + const fakePath = '/rendered/path/projectLocationDataStore'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + }; + const client = new completionserviceModule.v1beta.CompletionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationDataStorePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationDataStorePath', () => { + const result = client.projectLocationDataStorePath( + 'projectValue', + 'locationValue', + 'dataStoreValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationDataStorePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationDataStorePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationDataStorePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreName(fakePath); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates.projectLocationDataStorePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationDataStoreBranchDocument', () => { + const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + }; + const client = new completionserviceModule.v1beta.CompletionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreBranchDocumentPath', () => { + const result = client.projectLocationDataStoreBranchDocumentPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'branchValue', + 'documentValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreBranchDocumentName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreBranchDocumentName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreBranchDocumentName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreBranchDocumentName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreBranchDocumentName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreBranchDocumentName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationDataStoreBranchDocumentName', () => { + const result = + client.matchBranchFromProjectLocationDataStoreBranchDocumentName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationDataStoreBranchDocumentName', () => { + const result = + client.matchDocumentFromProjectLocationDataStoreBranchDocumentName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationDataStoreSchema', () => { + const fakePath = '/rendered/path/projectLocationDataStoreSchema'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + schema: 'schemaValue', + }; + const client = new completionserviceModule.v1beta.CompletionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreSchemaPath', () => { + const result = client.projectLocationDataStoreSchemaPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'schemaValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreSchemaName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreSchemaName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreSchemaName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreSchemaName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreSchemaName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreSchemaName(fakePath); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSchemaFromProjectLocationDataStoreSchemaName', () => { + const result = + client.matchSchemaFromProjectLocationDataStoreSchemaName(fakePath); + assert.strictEqual(result, 'schemaValue'); + assert( + ( + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-discoveryengine/test/gapic_document_service_v1beta.ts b/packages/google-cloud-discoveryengine/test/gapic_document_service_v1beta.ts index bce8b3e8557..7853bdc7ca5 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_document_service_v1beta.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_document_service_v1beta.ts @@ -977,6 +977,200 @@ describe('v1beta.DocumentServiceClient', () => { }); }); + describe('purgeDocuments', () => { + it('invokes purgeDocuments without error', async () => { + const client = new documentserviceModule.v1beta.DocumentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.purgeDocuments = + stubLongRunningCall(expectedResponse); + const [operation] = await client.purgeDocuments(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.purgeDocuments as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.purgeDocuments as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes purgeDocuments without error using callback', async () => { + const client = new documentserviceModule.v1beta.DocumentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.purgeDocuments = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.purgeDocuments( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsResponse, + protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsResponse, + protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.purgeDocuments as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.purgeDocuments as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes purgeDocuments with call error', async () => { + const client = new documentserviceModule.v1beta.DocumentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.purgeDocuments = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.purgeDocuments(request), expectedError); + const actualRequest = ( + client.innerApiCalls.purgeDocuments as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.purgeDocuments as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes purgeDocuments with LRO error', async () => { + const client = new documentserviceModule.v1beta.DocumentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.purgeDocuments = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.purgeDocuments(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.purgeDocuments as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.purgeDocuments as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkPurgeDocumentsProgress without error', async () => { + const client = new documentserviceModule.v1beta.DocumentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkPurgeDocumentsProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkPurgeDocumentsProgress with error', async () => { + const client = new documentserviceModule.v1beta.DocumentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkPurgeDocumentsProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + describe('listDocuments', () => { it('invokes listDocuments without error', async () => { const client = new documentserviceModule.v1beta.DocumentServiceClient({ @@ -1886,6 +2080,132 @@ describe('v1beta.DocumentServiceClient', () => { }); }); + describe('projectLocationCollectionDataStoreSchema', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreSchema'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + schema: 'schemaValue', + }; + const client = new documentserviceModule.v1beta.DocumentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreSchemaPath', () => { + const result = client.projectLocationCollectionDataStoreSchemaPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'schemaValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreSchemaName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreSchemaName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreSchemaName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreSchemaName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreSchemaName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreSchemaName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreSchemaName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreSchemaName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSchemaFromProjectLocationCollectionDataStoreSchemaName', () => { + const result = + client.matchSchemaFromProjectLocationCollectionDataStoreSchemaName( + fakePath + ); + assert.strictEqual(result, 'schemaValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationDataStoreBranch', () => { const fakePath = '/rendered/path/projectLocationDataStoreBranch'; const expectedParameters = { @@ -2103,5 +2423,98 @@ describe('v1beta.DocumentServiceClient', () => { ); }); }); + + describe('projectLocationDataStoreSchema', () => { + const fakePath = '/rendered/path/projectLocationDataStoreSchema'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + schema: 'schemaValue', + }; + const client = new documentserviceModule.v1beta.DocumentServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreSchemaPath', () => { + const result = client.projectLocationDataStoreSchemaPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'schemaValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreSchemaName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreSchemaName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreSchemaName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreSchemaName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreSchemaName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreSchemaName(fakePath); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSchemaFromProjectLocationDataStoreSchemaName', () => { + const result = + client.matchSchemaFromProjectLocationDataStoreSchemaName(fakePath); + assert.strictEqual(result, 'schemaValue'); + assert( + ( + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); }); }); diff --git a/packages/google-cloud-discoveryengine/test/gapic_recommendation_service_v1beta.ts b/packages/google-cloud-discoveryengine/test/gapic_recommendation_service_v1beta.ts index 94cc4c59f33..3006ed598f1 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_recommendation_service_v1beta.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_recommendation_service_v1beta.ts @@ -453,6 +453,133 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); + describe('projectLocationCollectionDataStoreSchema', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreSchema'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + schema: 'schemaValue', + }; + const client = + new recommendationserviceModule.v1beta.RecommendationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreSchemaPath', () => { + const result = client.projectLocationCollectionDataStoreSchemaPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'schemaValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreSchemaName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreSchemaName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreSchemaName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreSchemaName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreSchemaName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreSchemaName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreSchemaName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreSchemaName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSchemaFromProjectLocationCollectionDataStoreSchemaName', () => { + const result = + client.matchSchemaFromProjectLocationCollectionDataStoreSchemaName( + fakePath + ); + assert.strictEqual(result, 'schemaValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationCollectionDataStoreServingConfig', () => { const fakePath = '/rendered/path/projectLocationCollectionDataStoreServingConfig'; @@ -707,6 +834,100 @@ describe('v1beta.RecommendationServiceClient', () => { }); }); + describe('projectLocationDataStoreSchema', () => { + const fakePath = '/rendered/path/projectLocationDataStoreSchema'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + schema: 'schemaValue', + }; + const client = + new recommendationserviceModule.v1beta.RecommendationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreSchemaPath', () => { + const result = client.projectLocationDataStoreSchemaPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'schemaValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreSchemaName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreSchemaName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreSchemaName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreSchemaName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreSchemaName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreSchemaName(fakePath); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSchemaFromProjectLocationDataStoreSchemaName', () => { + const result = + client.matchSchemaFromProjectLocationDataStoreSchemaName(fakePath); + assert.strictEqual(result, 'schemaValue'); + assert( + ( + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationDataStoreServingConfig', () => { const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; const expectedParameters = { diff --git a/packages/google-cloud-discoveryengine/test/gapic_schema_service_v1beta.ts b/packages/google-cloud-discoveryengine/test/gapic_schema_service_v1beta.ts new file mode 100644 index 00000000000..ad1d866986d --- /dev/null +++ b/packages/google-cloud-discoveryengine/test/gapic_schema_service_v1beta.ts @@ -0,0 +1,2272 @@ +// Copyright 2023 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 schemaserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos} 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 stubLongRunningCall( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().rejects(callError) + : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().callsArgWith(2, callError) + : sinon.stub().callsArgWith(2, null, mockOperation); +} + +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('v1beta.SchemaServiceClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + schemaserviceModule.v1beta.SchemaServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + schemaserviceModule.v1beta.SchemaServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = schemaserviceModule.v1beta.SchemaServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.schemaServiceStub, undefined); + await client.initialize(); + assert(client.schemaServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.schemaServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.schemaServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + 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 schemaserviceModule.v1beta.SchemaServiceClient({ + 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('getSchema', () => { + it('invokes getSchema without error', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.GetSchemaRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.GetSchemaRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.Schema() + ); + client.innerApiCalls.getSchema = stubSimpleCall(expectedResponse); + const [response] = await client.getSchema(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getSchema as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getSchema as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSchema without error using callback', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.GetSchemaRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.GetSchemaRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.Schema() + ); + client.innerApiCalls.getSchema = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getSchema( + request, + ( + err?: Error | null, + result?: protos.google.cloud.discoveryengine.v1beta.ISchema | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getSchema as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getSchema as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSchema with error', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.GetSchemaRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.GetSchemaRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getSchema = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getSchema(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getSchema as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getSchema as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSchema with closed client', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.GetSchemaRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.GetSchemaRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getSchema(request), expectedError); + }); + }); + + describe('createSchema', () => { + it('invokes createSchema without error', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.CreateSchemaRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.CreateSchemaRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createSchema = stubLongRunningCall(expectedResponse); + const [operation] = await client.createSchema(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createSchema as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createSchema as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createSchema without error using callback', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.CreateSchemaRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.CreateSchemaRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createSchema = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createSchema( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.discoveryengine.v1beta.ISchema, + protos.google.cloud.discoveryengine.v1beta.ICreateSchemaMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.discoveryengine.v1beta.ISchema, + protos.google.cloud.discoveryengine.v1beta.ICreateSchemaMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createSchema as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createSchema as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createSchema with call error', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.CreateSchemaRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.CreateSchemaRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createSchema = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createSchema(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createSchema as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createSchema as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createSchema with LRO error', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.CreateSchemaRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.CreateSchemaRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createSchema = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createSchema(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createSchema as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createSchema as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateSchemaProgress without error', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkCreateSchemaProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateSchemaProgress with error', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkCreateSchemaProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateSchema', () => { + it('invokes updateSchema without error', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.UpdateSchemaRequest() + ); + request.schema ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.UpdateSchemaRequest', + ['schema', 'name'] + ); + request.schema.name = defaultValue1; + const expectedHeaderRequestParams = `schema.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateSchema = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateSchema(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateSchema as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateSchema as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSchema without error using callback', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.UpdateSchemaRequest() + ); + request.schema ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.UpdateSchemaRequest', + ['schema', 'name'] + ); + request.schema.name = defaultValue1; + const expectedHeaderRequestParams = `schema.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateSchema = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateSchema( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.discoveryengine.v1beta.ISchema, + protos.google.cloud.discoveryengine.v1beta.IUpdateSchemaMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.discoveryengine.v1beta.ISchema, + protos.google.cloud.discoveryengine.v1beta.IUpdateSchemaMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateSchema as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateSchema as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSchema with call error', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.UpdateSchemaRequest() + ); + request.schema ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.UpdateSchemaRequest', + ['schema', 'name'] + ); + request.schema.name = defaultValue1; + const expectedHeaderRequestParams = `schema.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateSchema = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateSchema(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateSchema as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateSchema as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSchema with LRO error', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.UpdateSchemaRequest() + ); + request.schema ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.UpdateSchemaRequest', + ['schema', 'name'] + ); + request.schema.name = defaultValue1; + const expectedHeaderRequestParams = `schema.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateSchema = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateSchema(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateSchema as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateSchema as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateSchemaProgress without error', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkUpdateSchemaProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateSchemaProgress with error', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkUpdateSchemaProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteSchema', () => { + it('invokes deleteSchema without error', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.DeleteSchemaRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.DeleteSchemaRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteSchema = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteSchema(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteSchema as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteSchema as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSchema without error using callback', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.DeleteSchemaRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.DeleteSchemaRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteSchema = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteSchema( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.discoveryengine.v1beta.IDeleteSchemaMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.discoveryengine.v1beta.IDeleteSchemaMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteSchema as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteSchema as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSchema with call error', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.DeleteSchemaRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.DeleteSchemaRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteSchema = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteSchema(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteSchema as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteSchema as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSchema with LRO error', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.DeleteSchemaRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.DeleteSchemaRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteSchema = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteSchema(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteSchema as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteSchema as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteSchemaProgress without error', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkDeleteSchemaProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteSchemaProgress with error', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkDeleteSchemaProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listSchemas', () => { + it('invokes listSchemas without error', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.ListSchemasRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.ListSchemasRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.Schema() + ), + generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.Schema() + ), + generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.Schema() + ), + ]; + client.innerApiCalls.listSchemas = stubSimpleCall(expectedResponse); + const [response] = await client.listSchemas(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listSchemas as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listSchemas as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSchemas without error using callback', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.ListSchemasRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.ListSchemasRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.Schema() + ), + generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.Schema() + ), + generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.Schema() + ), + ]; + client.innerApiCalls.listSchemas = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listSchemas( + request, + ( + err?: Error | null, + result?: protos.google.cloud.discoveryengine.v1beta.ISchema[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listSchemas as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listSchemas as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSchemas with error', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.ListSchemasRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.ListSchemasRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listSchemas = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listSchemas(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listSchemas as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listSchemas as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSchemasStream without error', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.ListSchemasRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.ListSchemasRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.Schema() + ), + generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.Schema() + ), + generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.Schema() + ), + ]; + client.descriptors.page.listSchemas.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listSchemasStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.discoveryengine.v1beta.Schema[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.discoveryengine.v1beta.Schema) => { + 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.listSchemas.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listSchemas, request) + ); + assert( + (client.descriptors.page.listSchemas.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listSchemasStream with error', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.ListSchemasRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.ListSchemasRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listSchemas.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listSchemasStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.discoveryengine.v1beta.Schema[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.discoveryengine.v1beta.Schema) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listSchemas.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listSchemas, request) + ); + assert( + (client.descriptors.page.listSchemas.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listSchemas without error', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.ListSchemasRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.ListSchemasRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.Schema() + ), + generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.Schema() + ), + generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.Schema() + ), + ]; + client.descriptors.page.listSchemas.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.discoveryengine.v1beta.ISchema[] = + []; + const iterable = client.listSchemasAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listSchemas.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert( + (client.descriptors.page.listSchemas.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listSchemas with error', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.ListSchemasRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.ListSchemasRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listSchemas.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listSchemasAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.discoveryengine.v1beta.ISchema[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listSchemas.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert( + (client.descriptors.page.listSchemas.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.getOperation(request); + }, expectedError); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.cancelOperation(request); + }, expectedError); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.deleteOperation(request); + }, expectedError); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); + + describe('Path templates', () => { + describe('projectLocationCollectionDataStore', () => { + const fakePath = '/rendered/path/projectLocationCollectionDataStore'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + }; + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStorePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStorePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStorePath', () => { + const result = client.projectLocationCollectionDataStorePath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationCollectionDataStorePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationCollectionDataStorePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationCollectionDataStorePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates.projectLocationCollectionDataStorePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates.projectLocationCollectionDataStorePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationCollectionDataStoreBranchDocument', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + }; + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreBranchDocumentPath', () => { + const result = + client.projectLocationCollectionDataStoreBranchDocumentPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'branchValue', + 'documentValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreBranchDocumentName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreBranchDocumentName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreBranchDocumentName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreBranchDocumentName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationCollectionDataStoreBranchDocumentName', () => { + const result = + client.matchBranchFromProjectLocationCollectionDataStoreBranchDocumentName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName', () => { + const result = + client.matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationCollectionDataStoreSchema', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreSchema'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + schema: 'schemaValue', + }; + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreSchemaPath', () => { + const result = client.projectLocationCollectionDataStoreSchemaPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'schemaValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreSchemaName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreSchemaName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreSchemaName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreSchemaName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreSchemaName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreSchemaName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreSchemaName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreSchemaName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSchemaFromProjectLocationCollectionDataStoreSchemaName', () => { + const result = + client.matchSchemaFromProjectLocationCollectionDataStoreSchemaName( + fakePath + ); + assert.strictEqual(result, 'schemaValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationDataStore', () => { + const fakePath = '/rendered/path/projectLocationDataStore'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + }; + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStorePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationDataStorePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationDataStorePath', () => { + const result = client.projectLocationDataStorePath( + 'projectValue', + 'locationValue', + 'dataStoreValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationDataStorePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationDataStorePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationDataStorePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreName(fakePath); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates.projectLocationDataStorePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationDataStoreBranchDocument', () => { + const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + }; + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreBranchDocumentPath', () => { + const result = client.projectLocationDataStoreBranchDocumentPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'branchValue', + 'documentValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreBranchDocumentName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreBranchDocumentName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreBranchDocumentName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreBranchDocumentName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreBranchDocumentName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreBranchDocumentName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationDataStoreBranchDocumentName', () => { + const result = + client.matchBranchFromProjectLocationDataStoreBranchDocumentName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationDataStoreBranchDocumentName', () => { + const result = + client.matchDocumentFromProjectLocationDataStoreBranchDocumentName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationDataStoreSchema', () => { + const fakePath = '/rendered/path/projectLocationDataStoreSchema'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + schema: 'schemaValue', + }; + const client = new schemaserviceModule.v1beta.SchemaServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreSchemaPath', () => { + const result = client.projectLocationDataStoreSchemaPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'schemaValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreSchemaName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreSchemaName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreSchemaName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreSchemaName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreSchemaName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreSchemaName(fakePath); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSchemaFromProjectLocationDataStoreSchemaName', () => { + const result = + client.matchSchemaFromProjectLocationDataStoreSchemaName(fakePath); + assert.strictEqual(result, 'schemaValue'); + assert( + ( + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-discoveryengine/test/gapic_search_service_v1beta.ts b/packages/google-cloud-discoveryengine/test/gapic_search_service_v1beta.ts new file mode 100644 index 00000000000..c9726568740 --- /dev/null +++ b/packages/google-cloud-discoveryengine/test/gapic_search_service_v1beta.ts @@ -0,0 +1,1507 @@ +// Copyright 2023 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 searchserviceModule 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('v1beta.SearchServiceClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + searchserviceModule.v1beta.SearchServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + searchserviceModule.v1beta.SearchServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = searchserviceModule.v1beta.SearchServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new searchserviceModule.v1beta.SearchServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new searchserviceModule.v1beta.SearchServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new searchserviceModule.v1beta.SearchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.searchServiceStub, undefined); + await client.initialize(); + assert(client.searchServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new searchserviceModule.v1beta.SearchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.searchServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new searchserviceModule.v1beta.SearchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.searchServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new searchserviceModule.v1beta.SearchServiceClient({ + 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 searchserviceModule.v1beta.SearchServiceClient({ + 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('search', () => { + it('invokes search without error', async () => { + const client = new searchserviceModule.v1beta.SearchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.SearchRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.SearchRequest', + ['servingConfig'] + ); + request.servingConfig = defaultValue1; + const expectedHeaderRequestParams = `serving_config=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult() + ), + generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult() + ), + generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult() + ), + ]; + client.innerApiCalls.search = stubSimpleCall(expectedResponse); + const [response] = await client.search(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.search as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.search as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes search without error using callback', async () => { + const client = new searchserviceModule.v1beta.SearchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.SearchRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.SearchRequest', + ['servingConfig'] + ); + request.servingConfig = defaultValue1; + const expectedHeaderRequestParams = `serving_config=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult() + ), + generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult() + ), + generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult() + ), + ]; + client.innerApiCalls.search = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.search( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.search as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.search as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes search with error', async () => { + const client = new searchserviceModule.v1beta.SearchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.SearchRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.SearchRequest', + ['servingConfig'] + ); + request.servingConfig = defaultValue1; + const expectedHeaderRequestParams = `serving_config=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.search = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.search(request), expectedError); + const actualRequest = (client.innerApiCalls.search as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.search as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes searchStream without error', async () => { + const client = new searchserviceModule.v1beta.SearchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.SearchRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.SearchRequest', + ['servingConfig'] + ); + request.servingConfig = defaultValue1; + const expectedHeaderRequestParams = `serving_config=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult() + ), + generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult() + ), + generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult() + ), + ]; + client.descriptors.page.search.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.searchStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult + ) => { + 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.search.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.search, request) + ); + assert( + (client.descriptors.page.search.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes searchStream with error', async () => { + const client = new searchserviceModule.v1beta.SearchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.SearchRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.SearchRequest', + ['servingConfig'] + ); + request.servingConfig = defaultValue1; + const expectedHeaderRequestParams = `serving_config=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.search.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.searchStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.search.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.search, request) + ); + assert( + (client.descriptors.page.search.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with search without error', async () => { + const client = new searchserviceModule.v1beta.SearchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.SearchRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.SearchRequest', + ['servingConfig'] + ); + request.servingConfig = defaultValue1; + const expectedHeaderRequestParams = `serving_config=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult() + ), + generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult() + ), + generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult() + ), + ]; + client.descriptors.page.search.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult[] = + []; + const iterable = client.searchAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.search.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert( + (client.descriptors.page.search.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with search with error', async () => { + const client = new searchserviceModule.v1beta.SearchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.discoveryengine.v1beta.SearchRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.discoveryengine.v1beta.SearchRequest', + ['servingConfig'] + ); + request.servingConfig = defaultValue1; + const expectedHeaderRequestParams = `serving_config=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.search.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.searchAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.search.asyncIterate as SinonStub).getCall(0) + .args[1], + request + ); + assert( + (client.descriptors.page.search.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + describe('projectLocationCollectionDataStoreBranch', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreBranch'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + }; + const client = new searchserviceModule.v1beta.SearchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreBranchPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreBranchPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreBranchPath', () => { + const result = client.projectLocationCollectionDataStoreBranchPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'branchValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreBranchName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreBranchName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreBranchName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreBranchName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreBranchName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreBranchName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreBranchName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreBranchName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationCollectionDataStoreBranchName', () => { + const result = + client.matchBranchFromProjectLocationCollectionDataStoreBranchName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationCollectionDataStoreBranchDocument', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreBranchDocument'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + }; + const client = new searchserviceModule.v1beta.SearchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreBranchDocumentPath', () => { + const result = + client.projectLocationCollectionDataStoreBranchDocumentPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'branchValue', + 'documentValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreBranchDocumentName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreBranchDocumentName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreBranchDocumentName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreBranchDocumentName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationCollectionDataStoreBranchDocumentName', () => { + const result = + client.matchBranchFromProjectLocationCollectionDataStoreBranchDocumentName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName', () => { + const result = + client.matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreBranchDocumentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationCollectionDataStoreSchema', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreSchema'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + schema: 'schemaValue', + }; + const client = new searchserviceModule.v1beta.SearchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreSchemaPath', () => { + const result = client.projectLocationCollectionDataStoreSchemaPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'schemaValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreSchemaName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreSchemaName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreSchemaName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreSchemaName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreSchemaName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreSchemaName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreSchemaName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreSchemaName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSchemaFromProjectLocationCollectionDataStoreSchemaName', () => { + const result = + client.matchSchemaFromProjectLocationCollectionDataStoreSchemaName( + fakePath + ); + assert.strictEqual(result, 'schemaValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationCollectionDataStoreServingConfig', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreServingConfig'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + serving_config: 'servingConfigValue', + }; + const client = new searchserviceModule.v1beta.SearchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreServingConfigPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreServingConfigPath', () => { + const result = + client.projectLocationCollectionDataStoreServingConfigPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'servingConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreServingConfigPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreServingConfigName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreServingConfigName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreServingConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreServingConfigName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreServingConfigName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreServingConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreServingConfigName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreServingConfigName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreServingConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreServingConfigName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreServingConfigName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreServingConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServingConfigFromProjectLocationCollectionDataStoreServingConfigName', () => { + const result = + client.matchServingConfigFromProjectLocationCollectionDataStoreServingConfigName( + fakePath + ); + assert.strictEqual(result, 'servingConfigValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreServingConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationDataStoreBranch', () => { + const fakePath = '/rendered/path/projectLocationDataStoreBranch'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + }; + const client = new searchserviceModule.v1beta.SearchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreBranchPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreBranchPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreBranchPath', () => { + const result = client.projectLocationDataStoreBranchPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'branchValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationDataStoreBranchPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreBranchName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreBranchName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationDataStoreBranchPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreBranchName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreBranchName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationDataStoreBranchPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreBranchName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreBranchName(fakePath); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates.projectLocationDataStoreBranchPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationDataStoreBranchName', () => { + const result = + client.matchBranchFromProjectLocationDataStoreBranchName(fakePath); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates.projectLocationDataStoreBranchPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationDataStoreBranchDocument', () => { + const fakePath = '/rendered/path/projectLocationDataStoreBranchDocument'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + branch: 'branchValue', + document: 'documentValue', + }; + const client = new searchserviceModule.v1beta.SearchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreBranchDocumentPath', () => { + const result = client.projectLocationDataStoreBranchDocumentPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'branchValue', + 'documentValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreBranchDocumentName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreBranchDocumentName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreBranchDocumentName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreBranchDocumentName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreBranchDocumentName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreBranchDocumentName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBranchFromProjectLocationDataStoreBranchDocumentName', () => { + const result = + client.matchBranchFromProjectLocationDataStoreBranchDocumentName( + fakePath + ); + assert.strictEqual(result, 'branchValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDocumentFromProjectLocationDataStoreBranchDocumentName', () => { + const result = + client.matchDocumentFromProjectLocationDataStoreBranchDocumentName( + fakePath + ); + assert.strictEqual(result, 'documentValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreBranchDocumentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationDataStoreSchema', () => { + const fakePath = '/rendered/path/projectLocationDataStoreSchema'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + schema: 'schemaValue', + }; + const client = new searchserviceModule.v1beta.SearchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreSchemaPath', () => { + const result = client.projectLocationDataStoreSchemaPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'schemaValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreSchemaName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreSchemaName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreSchemaName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreSchemaName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreSchemaName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreSchemaName(fakePath); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSchemaFromProjectLocationDataStoreSchemaName', () => { + const result = + client.matchSchemaFromProjectLocationDataStoreSchemaName(fakePath); + assert.strictEqual(result, 'schemaValue'); + assert( + ( + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationDataStoreServingConfig', () => { + const fakePath = '/rendered/path/projectLocationDataStoreServingConfig'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + serving_config: 'servingConfigValue', + }; + const client = new searchserviceModule.v1beta.SearchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreServingConfigPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreServingConfigPath', () => { + const result = client.projectLocationDataStoreServingConfigPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'servingConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationDataStoreServingConfigPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreServingConfigName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreServingConfigName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreServingConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreServingConfigName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreServingConfigName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreServingConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreServingConfigName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreServingConfigName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreServingConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServingConfigFromProjectLocationDataStoreServingConfigName', () => { + const result = + client.matchServingConfigFromProjectLocationDataStoreServingConfigName( + fakePath + ); + assert.strictEqual(result, 'servingConfigValue'); + assert( + ( + client.pathTemplates + .projectLocationDataStoreServingConfigPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-discoveryengine/test/gapic_user_event_service_v1beta.ts b/packages/google-cloud-discoveryengine/test/gapic_user_event_service_v1beta.ts index d5b94aefc7a..666c8096876 100644 --- a/packages/google-cloud-discoveryengine/test/gapic_user_event_service_v1beta.ts +++ b/packages/google-cloud-discoveryengine/test/gapic_user_event_service_v1beta.ts @@ -1223,6 +1223,132 @@ describe('v1beta.UserEventServiceClient', () => { }); }); + describe('projectLocationCollectionDataStoreSchema', () => { + const fakePath = + '/rendered/path/projectLocationCollectionDataStoreSchema'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + collection: 'collectionValue', + data_store: 'dataStoreValue', + schema: 'schemaValue', + }; + const client = new usereventserviceModule.v1beta.UserEventServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationCollectionDataStoreSchemaPath', () => { + const result = client.projectLocationCollectionDataStoreSchemaPath( + 'projectValue', + 'locationValue', + 'collectionValue', + 'dataStoreValue', + 'schemaValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationCollectionDataStoreSchemaName', () => { + const result = + client.matchProjectFromProjectLocationCollectionDataStoreSchemaName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationCollectionDataStoreSchemaName', () => { + const result = + client.matchLocationFromProjectLocationCollectionDataStoreSchemaName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCollectionFromProjectLocationCollectionDataStoreSchemaName', () => { + const result = + client.matchCollectionFromProjectLocationCollectionDataStoreSchemaName( + fakePath + ); + assert.strictEqual(result, 'collectionValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationCollectionDataStoreSchemaName', () => { + const result = + client.matchDataStoreFromProjectLocationCollectionDataStoreSchemaName( + fakePath + ); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSchemaFromProjectLocationCollectionDataStoreSchemaName', () => { + const result = + client.matchSchemaFromProjectLocationCollectionDataStoreSchemaName( + fakePath + ); + assert.strictEqual(result, 'schemaValue'); + assert( + ( + client.pathTemplates + .projectLocationCollectionDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('projectLocationDataStore', () => { const fakePath = '/rendered/path/projectLocationDataStore'; const expectedParameters = { @@ -1426,5 +1552,98 @@ describe('v1beta.UserEventServiceClient', () => { ); }); }); + + describe('projectLocationDataStoreSchema', () => { + const fakePath = '/rendered/path/projectLocationDataStoreSchema'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + data_store: 'dataStoreValue', + schema: 'schemaValue', + }; + const client = new usereventserviceModule.v1beta.UserEventServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDataStoreSchemaPath', () => { + const result = client.projectLocationDataStoreSchemaPath( + 'projectValue', + 'locationValue', + 'dataStoreValue', + 'schemaValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationDataStoreSchemaName', () => { + const result = + client.matchProjectFromProjectLocationDataStoreSchemaName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationDataStoreSchemaName', () => { + const result = + client.matchLocationFromProjectLocationDataStoreSchemaName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStoreFromProjectLocationDataStoreSchemaName', () => { + const result = + client.matchDataStoreFromProjectLocationDataStoreSchemaName(fakePath); + assert.strictEqual(result, 'dataStoreValue'); + assert( + ( + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSchemaFromProjectLocationDataStoreSchemaName', () => { + const result = + client.matchSchemaFromProjectLocationDataStoreSchemaName(fakePath); + assert.strictEqual(result, 'schemaValue'); + assert( + ( + client.pathTemplates.projectLocationDataStoreSchemaPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); }); }); diff --git a/packages/google-cloud-discoveryengine/webpack.config.js b/packages/google-cloud-discoveryengine/webpack.config.js index 4de86cbcce5..497fb41473f 100644 --- a/packages/google-cloud-discoveryengine/webpack.config.js +++ b/packages/google-cloud-discoveryengine/webpack.config.js @@ -17,8 +17,8 @@ const path = require('path'); module.exports = { entry: './src/index.ts', output: { - library: 'DocumentService', - filename: './document-service.js', + library: 'CompletionService', + filename: './completion-service.js', }, node: { child_process: 'empty', diff --git a/packages/google-cloud-documentai/package.json b/packages/google-cloud-documentai/package.json index fc83ef0e3ea..d02fa9d4534 100644 --- a/packages/google-cloud-documentai/package.json +++ b/packages/google-cloud-documentai/package.json @@ -17,19 +17,19 @@ "main": "build/src/index.js", "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", "docs-test": "linkinator docs", "fix": "gts fix", "lint": "gts check", - "prelint": "cd samples; npm link ../; npm install", - "predocs-test": "npm run docs", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "test": "c8 mocha build/test", - "precompile": "gts clean" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -45,6 +45,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -58,5 +59,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-documentai" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-domains/package.json b/packages/google-cloud-domains/package.json index 7f255af2b59..6027d0aa558 100644 --- a/packages/google-cloud-domains/package.json +++ b/packages/google-cloud-domains/package.json @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-domains" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-essentialcontacts/package.json b/packages/google-cloud-essentialcontacts/package.json index 063992833cd..4d32cace755 100644 --- a/packages/google-cloud-essentialcontacts/package.json +++ b/packages/google-cloud-essentialcontacts/package.json @@ -30,17 +30,18 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i", "predocs-test": "npm run docs", "docs-test": "linkinator docs", "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", "test": "c8 mocha build/test" }, "dependencies": { @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-essentialcontacts" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-eventarc-publishing/package.json b/packages/google-cloud-eventarc-publishing/package.json index 45a6a8a42cd..4226a31b10c 100644 --- a/packages/google-cloud-eventarc-publishing/package.json +++ b/packages/google-cloud-eventarc-publishing/package.json @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-eventarc-publishing" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-eventarc/package.json b/packages/google-cloud-eventarc/package.json index cbe27d230fb..5046454a185 100644 --- a/packages/google-cloud-eventarc/package.json +++ b/packages/google-cloud-eventarc/package.json @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-eventarc" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-filestore/package.json b/packages/google-cloud-filestore/package.json index ca74d6c92d9..61daafbc403 100644 --- a/packages/google-cloud-filestore/package.json +++ b/packages/google-cloud-filestore/package.json @@ -30,17 +30,18 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", "docs-test": "linkinator docs", "fix": "gts fix", - "prelint": "cd samples; npm link ../; npm install", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", "test": "c8 mocha build/test" }, "dependencies": { @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-filestore" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-functions/package.json b/packages/google-cloud-functions/package.json index fdb14cdbca9..3b1b7cb9665 100644 --- a/packages/google-cloud-functions/package.json +++ b/packages/google-cloud-functions/package.json @@ -30,17 +30,18 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", "docs-test": "linkinator docs", "fix": "gts fix", - "prelint": "cd samples; npm link ../; npm i", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "system-test": "npm run compile && c8 mocha build/system-test", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", "test": "c8 mocha build/test" }, "dependencies": { @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-functions" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-gaming/package.json b/packages/google-cloud-gaming/package.json index e904a52e59b..8ab2015ccaf 100644 --- a/packages/google-cloud-gaming/package.json +++ b/packages/google-cloud-gaming/package.json @@ -17,19 +17,19 @@ "main": "build/src/index.js", "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", "docs-test": "linkinator docs", "fix": "gts fix", "lint": "gts check", - "predocs-test": "npm run docs", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "test": "c8 mocha build/test", - "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -44,6 +44,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -57,5 +58,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-gaming" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-gkebackup/package.json b/packages/google-cloud-gkebackup/package.json index 951cb2095b8..4a70363e391 100644 --- a/packages/google-cloud-gkebackup/package.json +++ b/packages/google-cloud-gkebackup/package.json @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^10.0.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=v12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-gkebackup" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-gkeconnect-gateway/package.json b/packages/google-cloud-gkeconnect-gateway/package.json index a3f29eb3fd4..3b2fad9e5b5 100644 --- a/packages/google-cloud-gkeconnect-gateway/package.json +++ b/packages/google-cloud-gkeconnect-gateway/package.json @@ -31,7 +31,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -39,10 +39,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -57,6 +58,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-gkehub/CHANGELOG.md b/packages/google-cloud-gkehub/CHANGELOG.md index f7c0df0d7de..20f0ac624cb 100644 --- a/packages/google-cloud-gkehub/CHANGELOG.md +++ b/packages/google-cloud-gkehub/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [3.4.0](https://github.com/googleapis/google-cloud-node/compare/gke-hub-v3.3.2...gke-hub-v3.4.0) (2023-04-24) + + +### Features + +* [gkehub] add `monitoring_config` field ([#4194](https://github.com/googleapis/google-cloud-node/issues/4194)) ([86f1174](https://github.com/googleapis/google-cloud-node/commit/86f1174537a80f807bdaf405e7af301a08ce40ce)) +* [gkehub] add `monitoring_config` field ([#4197](https://github.com/googleapis/google-cloud-node/issues/4197)) ([32e9389](https://github.com/googleapis/google-cloud-node/commit/32e9389cdd555738855cc226a7c88a6f883a8da9)) + ## [3.3.2](https://github.com/googleapis/google-cloud-node/compare/gke-hub-v3.3.1...gke-hub-v3.3.2) (2023-04-13) diff --git a/packages/google-cloud-gkehub/package.json b/packages/google-cloud-gkehub/package.json index 184aac3009d..8efcc7cc5ff 100644 --- a/packages/google-cloud-gkehub/package.json +++ b/packages/google-cloud-gkehub/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/gke-hub", - "version": "3.3.2", + "version": "3.4.0", "description": "Gkehub client for Node.js", "repository": { "type": "git", @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-gkehub" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-gkehub/protos/google/cloud/gkehub/v1/membership.proto b/packages/google-cloud-gkehub/protos/google/cloud/gkehub/v1/membership.proto index 3133403d72f..ae4337cc26e 100644 --- a/packages/google-cloud-gkehub/protos/google/cloud/gkehub/v1/membership.proto +++ b/packages/google-cloud-gkehub/protos/google/cloud/gkehub/v1/membership.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -41,8 +41,9 @@ message Membership { MembershipEndpoint endpoint = 4 [(google.api.field_behavior) = OPTIONAL]; } - // Output only. The full, unique name of this Membership resource in the format - // `projects/*/locations/*/memberships/{membership_id}`, set during creation. + // Output only. The full, unique name of this Membership resource in the + // format `projects/*/locations/*/memberships/{membership_id}`, set during + // creation. // // `membership_id` must be a valid RFC 1123 compliant DNS label: // @@ -54,7 +55,7 @@ message Membership { // with a maximum length of 63 characters. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. GCP labels for this membership. + // Optional. Labels for this membership. map labels = 2 [(google.api.field_behavior) = OPTIONAL]; // Output only. Description of this membership, limited to 63 characters. @@ -67,16 +68,19 @@ message Membership { MembershipState state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. When the Membership was created. - google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. When the Membership was last updated. - google.protobuf.Timestamp update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. When the Membership was deleted. - google.protobuf.Timestamp delete_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp delete_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. An externally-generated and managed ID for this Membership. This ID may - // be modified after creation, but this is not recommended. + // Optional. An externally-generated and managed ID for this Membership. This + // ID may be modified after creation, but this is not recommended. // // The ID must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.]*` // @@ -84,14 +88,16 @@ message Membership { // set to the UID of the `kube-system` namespace object. string external_id = 9 [(google.api.field_behavior) = OPTIONAL]; - // Output only. For clusters using Connect, the timestamp of the most recent connection - // established with Google Cloud. This time is updated every several minutes, - // not continuously. For clusters that do not use GKE Connect, or that have - // never connected successfully, this field will be unset. - google.protobuf.Timestamp last_connection_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. For clusters using Connect, the timestamp of the most recent + // connection established with Google Cloud. This time is updated every + // several minutes, not continuously. For clusters that do not use GKE + // Connect, or that have never connected successfully, this field will be + // unset. + google.protobuf.Timestamp last_connection_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Google-generated UUID for this resource. This is unique across all - // Membership resources. If a Membership resource is deleted and another + // Output only. Google-generated UUID for this resource. This is unique across + // all Membership resources. If a Membership resource is deleted and another // resource with the same name is created, it gets a different unique_id. string unique_id = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -99,34 +105,44 @@ message Membership { // See the documentation on Workload Identity for more details: // https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity Authority authority = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The monitoring config information for this membership. + MonitoringConfig monitoring_config = 14 + [(google.api.field_behavior) = OPTIONAL]; } // MembershipEndpoint contains information needed to contact a Kubernetes API, // endpoint and any additional Kubernetes metadata. message MembershipEndpoint { // Optional. GKE-specific information. Only present if this Membership is a GKE cluster. - GkeCluster gke_cluster = 1 [(google.api.field_behavior) = OPTIONAL]; + GkeCluster gke_cluster = 1 [(google.api.field_behavior) = OPTIONAL]; // Output only. Useful Kubernetes-specific metadata. - KubernetesMetadata kubernetes_metadata = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + KubernetesMetadata kubernetes_metadata = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. The in-cluster Kubernetes Resources that should be applied for a correctly - // registered cluster, in the steady state. These resources: + // Optional. The in-cluster Kubernetes Resources that should be applied for a + // correctly registered cluster, in the steady state. These resources: // // * Ensure that the cluster is exclusively registered to one and only one // Hub Membership. // * Propagate Workload Pool Information available in the Membership // Authority field. // * Ensure proper initial configuration of default Hub Features. - KubernetesResource kubernetes_resource = 3 [(google.api.field_behavior) = OPTIONAL]; + KubernetesResource kubernetes_resource = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Whether the lifecycle of this membership is managed by a + // google cluster platform service. + bool google_managed = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; } // KubernetesResource contains the YAML manifests and configuration for // Membership Kubernetes resources in the cluster. After CreateMembership or // UpdateMembership, these resources should be re-applied in the cluster. message KubernetesResource { - // Input only. The YAML representation of the Membership CR. This field is ignored for GKE - // clusters where Hub can read the CR directly. + // Input only. The YAML representation of the Membership CR. This field is + // ignored for GKE clusters where Hub can read the CR directly. // // Callers should provide the CR that is currently present in the cluster // during CreateMembership or UpdateMembership, or leave this field empty if @@ -134,15 +150,16 @@ message KubernetesResource { // registered with another Membership. string membership_cr_manifest = 1 [(google.api.field_behavior) = INPUT_ONLY]; - // Output only. Additional Kubernetes resources that need to be applied to the cluster - // after Membership creation, and after every update. + // Output only. Additional Kubernetes resources that need to be applied to the + // cluster after Membership creation, and after every update. // // This field is only populated in the Membership returned from a successful // long-running operation from CreateMembership or UpdateMembership. It is not // populated during normal GetMembership or ListMemberships requests. To get // the resource manifest after the initial registration, the caller should // make a UpdateMembership call with an empty field mask. - repeated ResourceManifest membership_resources = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated ResourceManifest membership_resources = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The Kubernetes resources for installing the GKE Connect agent // @@ -151,7 +168,8 @@ message KubernetesResource { // populated during normal GetMembership or ListMemberships requests. To get // the resource manifest after the initial registration, the caller should // make a UpdateMembership call with an empty field mask. - repeated ResourceManifest connect_resources = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated ResourceManifest connect_resources = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. Options for Kubernetes resource generation. ResourceOptions resource_options = 4 [(google.api.field_behavior) = OPTIONAL]; @@ -159,9 +177,9 @@ message KubernetesResource { // ResourceOptions represent options for Kubernetes resource generation. message ResourceOptions { - // Optional. The Connect agent version to use for connect_resources. Defaults to the - // latest GKE Connect version. The version must be a currently supported - // version, obsolete versions will be rejected. + // Optional. The Connect agent version to use for connect_resources. Defaults + // to the latest GKE Connect version. The version must be a currently + // supported version, obsolete versions will be rejected. string connect_version = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. Use `apiextensions/v1beta1` instead of `apiextensions/v1` for @@ -170,8 +188,8 @@ message ResourceOptions { // <1.16. bool v1beta1_crd = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Major version of the Kubernetes cluster. This is only used to determine - // which version to use for the CustomResourceDefinition resources, + // Optional. Major version of the Kubernetes cluster. This is only used to + // determine which version to use for the CustomResourceDefinition resources, // `apiextensions/v1beta1` or`apiextensions/v1`. string k8s_version = 3 [(google.api.field_behavior) = OPTIONAL]; } @@ -192,23 +210,30 @@ message ResourceManifest { // GkeCluster contains information specific to GKE clusters. message GkeCluster { - // Immutable. Self-link of the GCP resource for the GKE cluster. For example: + // Immutable. Self-link of the Google Cloud resource for the GKE cluster. For + // example: // // //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster // // Zonal clusters are also supported. string resource_link = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. If cluster_missing is set then it denotes that the GKE cluster + // no longer exists in the GKE Control Plane. + bool cluster_missing = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // KubernetesMetadata provides informational metadata for Memberships // representing Kubernetes clusters. message KubernetesMetadata { - // Output only. Kubernetes API server version string as reported by `/version`. - string kubernetes_api_server_version = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Node providerID as reported by the first node in the list of nodes on - // the Kubernetes endpoint. On Kubernetes platforms that support zero-node - // clusters (like GKE-on-GCP), the node_count will be zero and the + // Output only. Kubernetes API server version string as reported by + // `/version`. + string kubernetes_api_server_version = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Node providerID as reported by the first node in the list of + // nodes on the Kubernetes endpoint. On Kubernetes platforms that support + // zero-node clusters (like GKE-on-GCP), the node_count will be zero and the // node_provider_id will be empty. string node_provider_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -218,14 +243,44 @@ message KubernetesMetadata { // Output only. vCPU count as reported by Kubernetes nodes resources. int32 vcpu_count = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The total memory capacity as reported by the sum of all Kubernetes nodes - // resources, defined in MB. + // Output only. The total memory capacity as reported by the sum of all + // Kubernetes nodes resources, defined in MB. int32 memory_mb = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The time at which these details were last updated. This update_time is - // different from the Membership-level update_time since EndpointDetails are - // updated internally for API consumers. - google.protobuf.Timestamp update_time = 100 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The time at which these details were last updated. This + // update_time is different from the Membership-level update_time since + // EndpointDetails are updated internally for API consumers. + google.protobuf.Timestamp update_time = 100 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// This field informs Fleet-based applications/services/UIs with the necessary +// information for where each underlying Cluster reports its metrics. +message MonitoringConfig { + // Immutable. Project used to report Metrics + string project_id = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Location used to report Metrics + string location = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Cluster name used to report metrics. + // For Anthos on VMWare/Baremetal, it would be in format + // `memberClusters/cluster_name`; And for Anthos on MultiCloud, it would be in + // format + // `{azureClusters, awsClusters}/cluster_name`. + string cluster = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // Kubernetes system metrics, if available, are written to this prefix. + // This defaults to kubernetes.io for GKE, and kubernetes.io/anthos for Anthos + // eventually. Noted: Anthos MultiCloud will have kubernetes.io prefix today + // but will migration to be under kubernetes.io/anthos + string kubernetes_metrics_prefix = 4; + + // Immutable. Cluster hash, this is a unique string generated by google code, + // which does not contain any PII, which we can use to reference the cluster. + // This is expected to be created by the monitoring stack and persisted into + // the Cluster object as well as to GKE-Hub. + string cluster_hash = 5 [(google.api.field_behavior) = IMMUTABLE]; } // MembershipState describes the state of a Membership resource. @@ -259,8 +314,8 @@ message MembershipState { // See the workload identity documentation for more details: // https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity message Authority { - // Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with `https://` and - // be a valid URL with length <2000 characters. + // Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with + // `https://` and be a valid URL with length <2000 characters. // // If set, then Google will allow valid OIDC tokens from this issuer to // authenticate within the workload_identity_pool. OIDC discovery will be @@ -271,8 +326,8 @@ message Authority { // a new issuer (and re-enabling Workload Identity). string issuer = 1 [(google.api.field_behavior) = OPTIONAL]; - // Output only. The name of the workload identity pool in which `issuer` will be - // recognized. + // Output only. The name of the workload identity pool in which `issuer` will + // be recognized. // // There is a single Workload Identity Pool per Hub that is shared // between all Memberships that belong to that Hub. For a Hub hosted in @@ -280,11 +335,12 @@ message Authority { // although this is subject to change in newer versions of this API. string workload_identity_pool = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. An identity provider that reflects the `issuer` in the workload identity - // pool. + // Output only. An identity provider that reflects the `issuer` in the + // workload identity pool. string identity_provider = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. OIDC verification keys for this Membership in JWKS format (RFC 7517). + // Optional. OIDC verification keys for this Membership in JWKS format (RFC + // 7517). // // When this field is set, OIDC discovery will NOT be performed on `issuer`, // and instead OIDC tokens will be validated using this field. diff --git a/packages/google-cloud-gkehub/protos/google/cloud/gkehub/v1/service.proto b/packages/google-cloud-gkehub/protos/google/cloud/gkehub/v1/service.proto index 612f079d5d3..cecf242e41a 100644 --- a/packages/google-cloud-gkehub/protos/google/cloud/gkehub/v1/service.proto +++ b/packages/google-cloud-gkehub/protos/google/cloud/gkehub/v1/service.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -23,6 +23,7 @@ import "google/api/resource.proto"; import "google/cloud/gkehub/v1/feature.proto"; import "google/cloud/gkehub/v1/membership.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; @@ -43,17 +44,22 @@ option ruby_package = "Google::Cloud::GkeHub::V1"; // * [Membership][google.cloud.gkehub.v1.Membership] // * [Feature][google.cloud.gkehub.v1.Feature] // -// GKE Hub is currently only available in the global region. +// GKE Hub is currently available in the global region and all regions in +// https://cloud.google.com/compute/docs/regions-zones. Feature is only +// available in global region while membership is global region and all the +// regions. // // **Membership management may be non-trivial:** it is recommended to use one // of the Google-provided client libraries or tools where possible when working // with Membership resources. service GkeHub { option (google.api.default_host) = "gkehub.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Lists Memberships in a given project and location. - rpc ListMemberships(ListMembershipsRequest) returns (ListMembershipsResponse) { + rpc ListMemberships(ListMembershipsRequest) + returns (ListMembershipsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/memberships" }; @@ -89,7 +95,8 @@ service GkeHub { // **This is currently only supported for GKE clusters on Google Cloud**. // To register other clusters, follow the instructions at // https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster. - rpc CreateMembership(CreateMembershipRequest) returns (google.longrunning.Operation) { + rpc CreateMembership(CreateMembershipRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/memberships" body: "resource" @@ -102,7 +109,8 @@ service GkeHub { } // Adds a new Feature. - rpc CreateFeature(CreateFeatureRequest) returns (google.longrunning.Operation) { + rpc CreateFeature(CreateFeatureRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/features" body: "resource" @@ -119,7 +127,8 @@ service GkeHub { // **This is currently only supported for GKE clusters on Google Cloud**. // To unregister other clusters, follow the instructions at // https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster. - rpc DeleteMembership(DeleteMembershipRequest) returns (google.longrunning.Operation) { + rpc DeleteMembership(DeleteMembershipRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/memberships/*}" }; @@ -131,7 +140,8 @@ service GkeHub { } // Removes a Feature. - rpc DeleteFeature(DeleteFeatureRequest) returns (google.longrunning.Operation) { + rpc DeleteFeature(DeleteFeatureRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/features/*}" }; @@ -143,7 +153,8 @@ service GkeHub { } // Updates an existing Membership. - rpc UpdateMembership(UpdateMembershipRequest) returns (google.longrunning.Operation) { + rpc UpdateMembership(UpdateMembershipRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1/{name=projects/*/locations/*/memberships/*}" body: "resource" @@ -156,7 +167,8 @@ service GkeHub { } // Updates an existing Feature. - rpc UpdateFeature(UpdateFeatureRequest) returns (google.longrunning.Operation) { + rpc UpdateFeature(UpdateFeatureRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1/{name=projects/*/locations/*/features/*}" body: "resource" @@ -172,7 +184,8 @@ service GkeHub { // // **This method is used internally by Google-provided libraries.** // Most clients should not need to call this method directly. - rpc GenerateConnectManifest(GenerateConnectManifestRequest) returns (GenerateConnectManifestResponse) { + rpc GenerateConnectManifest(GenerateConnectManifestRequest) + returns (GenerateConnectManifestResponse) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/memberships/*}:generateConnectManifest" }; @@ -181,8 +194,9 @@ service GkeHub { // Request message for `GkeHub.ListMemberships` method. message ListMembershipsRequest { - // Required. The parent (project and location) where the Memberships will be listed. - // Specified in the format `projects/*/locations/*`. + // Required. The parent (project and location) where the Memberships will be + // listed. Specified in the format `projects/*/locations/*`. + // `projects/*/locations/-` list memberships in all the regions. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -190,9 +204,9 @@ message ListMembershipsRequest { } ]; - // Optional. When requesting a 'page' of resources, `page_size` specifies number of - // resources to return. If unspecified or set to 0, all resources will - // be returned. + // Optional. When requesting a 'page' of resources, `page_size` specifies + // number of resources to return. If unspecified or set to 0, all resources + // will be returned. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Token returned by previous call to `ListMemberships` which @@ -200,8 +214,8 @@ message ListMembershipsRequest { // resources. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Lists Memberships that match the filter expression, following the syntax - // outlined in https://google.aip.dev/160. + // Optional. Lists Memberships that match the filter expression, following the + // syntax outlined in https://google.aip.dev/160. // // Examples: // @@ -255,8 +269,8 @@ message GetMembershipRequest { // Request message for the `GkeHub.CreateMembership` method. message CreateMembershipRequest { - // Required. The parent (project and location) where the Memberships will be created. - // Specified in the format `projects/*/locations/*`. + // Required. The parent (project and location) where the Memberships will be + // created. Specified in the format `projects/*/locations/*`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -264,8 +278,8 @@ message CreateMembershipRequest { } ]; - // Required. Client chosen ID for the membership. `membership_id` must be a valid RFC - // 1123 compliant DNS label: + // Required. Client chosen ID for the membership. `membership_id` must be a + // valid RFC 1123 compliant DNS label: // // 1. At most 63 characters in length // 2. It must consist of lower case alphanumeric characters or `-` @@ -319,6 +333,11 @@ message DeleteMembershipRequest { // The request ID must be a valid UUID with the exception that zero UUID is // not supported (00000000-0000-0000-0000-000000000000). string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, any subresource from this Membership will also be + // deleted. Otherwise, the request will only work if the Membership has no + // subresource. + bool force = 3 [(google.api.field_behavior) = OPTIONAL]; } // Request message for `GkeHub.UpdateMembership` method. @@ -333,7 +352,8 @@ message UpdateMembershipRequest { ]; // Required. Mask of fields to update. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; // Required. Only fields specified in update_mask are updated. // If you specify a field in the update_mask but don't specify its value here @@ -365,8 +385,8 @@ message UpdateMembershipRequest { // method. // . message GenerateConnectManifestRequest { - // Required. The Membership resource name the Agent will associate with, in the format - // `projects/*/locations/*/memberships/*`. + // Required. The Membership resource name the Agent will associate with, in + // the format `projects/*/locations/*/memberships/*`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -374,21 +394,23 @@ message GenerateConnectManifestRequest { } ]; - // Optional. Namespace for GKE Connect agent resources. Defaults to `gke-connect`. + // Optional. Namespace for GKE Connect agent resources. Defaults to + // `gke-connect`. // // The Connect Agent is authorized automatically when run in the default // namespace. Otherwise, explicit authorization must be granted with an // additional IAM binding. string namespace = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. URI of a proxy if connectivity from the agent to gkeconnect.googleapis.com - // requires the use of a proxy. Format must be in the form - // `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol + // Optional. URI of a proxy if connectivity from the agent to + // gkeconnect.googleapis.com requires the use of a proxy. Format must be in + // the form `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol // supported by the proxy. This will direct the connect agent's outbound // traffic through a HTTP(S) proxy. bytes proxy = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The Connect agent version to use. Defaults to the most current version. + // Optional. The Connect agent version to use. Defaults to the most current + // version. string version = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. If true, generate the resources for upgrade only. Some resources diff --git a/packages/google-cloud-gkehub/protos/google/cloud/gkehub/v1beta1/membership.proto b/packages/google-cloud-gkehub/protos/google/cloud/gkehub/v1beta1/membership.proto index fadedf5b2d5..020ae85c3b8 100644 --- a/packages/google-cloud-gkehub/protos/google/cloud/gkehub/v1beta1/membership.proto +++ b/packages/google-cloud-gkehub/protos/google/cloud/gkehub/v1beta1/membership.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; @@ -33,19 +34,23 @@ option php_namespace = "Google\\Cloud\\GkeHub\\V1beta1"; option ruby_package = "Google::Cloud::GkeHub::V1beta1"; // The GKE Hub MembershipService handles the registration of many Kubernetes -// clusters to Google Cloud, represented with the [Membership][google.cloud.gkehub.v1beta1.Membership] resource. +// clusters to Google Cloud, represented with the +// [Membership][google.cloud.gkehub.v1beta1.Membership] resource. // -// GKE Hub is currently only available in the global region. +// GKE Hub is currently available in the global region and all regions in +// https://cloud.google.com/compute/docs/regions-zones. // // **Membership management may be non-trivial:** it is recommended to use one // of the Google-provided client libraries or tools where possible when working // with Membership resources. service GkeHubMembershipService { option (google.api.default_host) = "gkehub.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Lists Memberships in a given project and location. - rpc ListMemberships(ListMembershipsRequest) returns (ListMembershipsResponse) { + rpc ListMemberships(ListMembershipsRequest) + returns (ListMembershipsResponse) { option (google.api.http) = { get: "/v1beta1/{parent=projects/*/locations/*}/memberships" }; @@ -65,7 +70,8 @@ service GkeHubMembershipService { // **This is currently only supported for GKE clusters on Google Cloud**. // To register other clusters, follow the instructions at // https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster. - rpc CreateMembership(CreateMembershipRequest) returns (google.longrunning.Operation) { + rpc CreateMembership(CreateMembershipRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1beta1/{parent=projects/*/locations/*}/memberships" body: "resource" @@ -82,7 +88,8 @@ service GkeHubMembershipService { // **This is currently only supported for GKE clusters on Google Cloud**. // To unregister other clusters, follow the instructions at // https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster. - rpc DeleteMembership(DeleteMembershipRequest) returns (google.longrunning.Operation) { + rpc DeleteMembership(DeleteMembershipRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1beta1/{name=projects/*/locations/*/memberships/*}" }; @@ -94,7 +101,8 @@ service GkeHubMembershipService { } // Updates an existing Membership. - rpc UpdateMembership(UpdateMembershipRequest) returns (google.longrunning.Operation) { + rpc UpdateMembership(UpdateMembershipRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1beta1/{name=projects/*/locations/*/memberships/*}" body: "resource" @@ -110,7 +118,8 @@ service GkeHubMembershipService { // // **This method is used internally by Google-provided libraries.** // Most clients should not need to call this method directly. - rpc GenerateConnectManifest(GenerateConnectManifestRequest) returns (GenerateConnectManifestResponse) { + rpc GenerateConnectManifest(GenerateConnectManifestRequest) + returns (GenerateConnectManifestResponse) { option (google.api.http) = { get: "/v1beta1/{name=projects/*/locations/*/memberships/*}:generateConnectManifest" }; @@ -118,7 +127,8 @@ service GkeHubMembershipService { // ValidateExclusivity validates the state of exclusivity in the cluster. // The validation does not depend on an existing Hub membership resource. - rpc ValidateExclusivity(ValidateExclusivityRequest) returns (ValidateExclusivityResponse) { + rpc ValidateExclusivity(ValidateExclusivityRequest) + returns (ValidateExclusivityResponse) { option (google.api.http) = { get: "/v1beta1/{parent=projects/*/locations/*}/memberships:validateExclusivity" }; @@ -136,7 +146,8 @@ service GkeHubMembershipService { // Hub API server begins serving a newer version of the CRD and // corresponding CR. The response will be the converted CRD and CR if there // are any differences between the versions. - rpc GenerateExclusivityManifest(GenerateExclusivityManifestRequest) returns (GenerateExclusivityManifestResponse) { + rpc GenerateExclusivityManifest(GenerateExclusivityManifestRequest) + returns (GenerateExclusivityManifestResponse) { option (google.api.http) = { get: "/v1beta1/{name=projects/*/locations/*/memberships/*}:generateExclusivityManifest" }; @@ -169,8 +180,9 @@ message Membership { MULTI_CLOUD = 2; } - // Output only. The full, unique name of this Membership resource in the format - // `projects/*/locations/*/memberships/{membership_id}`, set during creation. + // Output only. The full, unique name of this Membership resource in the + // format `projects/*/locations/*/memberships/{membership_id}`, set during + // creation. // // `membership_id` must be a valid RFC 1123 compliant DNS label: // @@ -204,17 +216,21 @@ message Membership { Authority authority = 9 [(google.api.field_behavior) = OPTIONAL]; // Output only. When the Membership was created. - google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. When the Membership was last updated. - google.protobuf.Timestamp update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. When the Membership was deleted. - google.protobuf.Timestamp delete_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp delete_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. An externally-generated and managed ID for this Membership. This ID may - // be modified after creation, but this is not recommended. For GKE clusters, - // external_id is managed by the Hub API and updates will be ignored. + // Optional. An externally-generated and managed ID for this Membership. This + // ID may be modified after creation, but this is not recommended. For GKE + // clusters, external_id is managed by the Hub API and updates will be + // ignored. // // The ID must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.]*` // @@ -222,19 +238,26 @@ message Membership { // set to the UID of the `kube-system` namespace object. string external_id = 10 [(google.api.field_behavior) = OPTIONAL]; - // Output only. For clusters using Connect, the timestamp of the most recent connection - // established with Google Cloud. This time is updated every several minutes, - // not continuously. For clusters that do not use GKE Connect, or that have - // never connected successfully, this field will be unset. - google.protobuf.Timestamp last_connection_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. For clusters using Connect, the timestamp of the most recent + // connection established with Google Cloud. This time is updated every + // several minutes, not continuously. For clusters that do not use GKE + // Connect, or that have never connected successfully, this field will be + // unset. + google.protobuf.Timestamp last_connection_time = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Google-generated UUID for this resource. This is unique across all - // Membership resources. If a Membership resource is deleted and another + // Output only. Google-generated UUID for this resource. This is unique across + // all Membership resources. If a Membership resource is deleted and another // resource with the same name is created, it gets a different unique_id. string unique_id = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. The infrastructure type this Membership is running on. - InfrastructureType infrastructure_type = 13 [(google.api.field_behavior) = OPTIONAL]; + InfrastructureType infrastructure_type = 13 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The monitoring config information for this membership. + MonitoringConfig monitoring_config = 14 + [(google.api.field_behavior) = OPTIONAL]; } // MembershipEndpoint contains information needed to contact a Kubernetes API, @@ -245,41 +268,45 @@ message MembershipEndpoint { // Optional. Specific information for a GKE-on-GCP cluster. GkeCluster gke_cluster = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Specific information for a GKE On-Prem cluster. An onprem user-cluster - // who has no resourceLink is not allowed to use this field, it should have - // a nil "type" instead. + // Optional. Specific information for a GKE On-Prem cluster. An onprem + // user-cluster who has no resourceLink is not allowed to use this field, it + // should have a nil "type" instead. OnPremCluster on_prem_cluster = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. Specific information for a GKE Multi-Cloud cluster. - MultiCloudCluster multi_cloud_cluster = 8 [(google.api.field_behavior) = OPTIONAL]; + MultiCloudCluster multi_cloud_cluster = 8 + [(google.api.field_behavior) = OPTIONAL]; // Optional. Specific information for a Google Edge cluster. EdgeCluster edge_cluster = 9 [(google.api.field_behavior) = OPTIONAL]; // Optional. Specific information for a GDC Edge Appliance cluster. - ApplianceCluster appliance_cluster = 10 [(google.api.field_behavior) = OPTIONAL]; + ApplianceCluster appliance_cluster = 10 + [(google.api.field_behavior) = OPTIONAL]; } // Output only. Useful Kubernetes-specific metadata. - KubernetesMetadata kubernetes_metadata = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + KubernetesMetadata kubernetes_metadata = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. The in-cluster Kubernetes Resources that should be applied for a correctly - // registered cluster, in the steady state. These resources: + // Optional. The in-cluster Kubernetes Resources that should be applied for a + // correctly registered cluster, in the steady state. These resources: // // * Ensure that the cluster is exclusively registered to one and only one // Hub Membership. // * Propagate Workload Pool Information available in the Membership // Authority field. // * Ensure proper initial configuration of default Hub Features. - KubernetesResource kubernetes_resource = 6 [(google.api.field_behavior) = OPTIONAL]; + KubernetesResource kubernetes_resource = 6 + [(google.api.field_behavior) = OPTIONAL]; } // KubernetesResource contains the YAML manifests and configuration for // Membership Kubernetes resources in the cluster. After CreateMembership or // UpdateMembership, these resources should be re-applied in the cluster. message KubernetesResource { - // Input only. The YAML representation of the Membership CR. This field is ignored for GKE - // clusters where Hub can read the CR directly. + // Input only. The YAML representation of the Membership CR. This field is + // ignored for GKE clusters where Hub can read the CR directly. // // Callers should provide the CR that is currently present in the cluster // during CreateMembership or UpdateMembership, or leave this field empty if @@ -287,15 +314,16 @@ message KubernetesResource { // registered with another Membership. string membership_cr_manifest = 1 [(google.api.field_behavior) = INPUT_ONLY]; - // Output only. Additional Kubernetes resources that need to be applied to the cluster - // after Membership creation, and after every update. + // Output only. Additional Kubernetes resources that need to be applied to the + // cluster after Membership creation, and after every update. // // This field is only populated in the Membership returned from a successful // long-running operation from CreateMembership or UpdateMembership. It is not // populated during normal GetMembership or ListMemberships requests. To get // the resource manifest after the initial registration, the caller should // make a UpdateMembership call with an empty field mask. - repeated ResourceManifest membership_resources = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated ResourceManifest membership_resources = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The Kubernetes resources for installing the GKE Connect agent // @@ -304,7 +332,8 @@ message KubernetesResource { // populated during normal GetMembership or ListMemberships requests. To get // the resource manifest after the initial registration, the caller should // make a UpdateMembership call with an empty field mask. - repeated ResourceManifest connect_resources = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated ResourceManifest connect_resources = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. Options for Kubernetes resource generation. ResourceOptions resource_options = 4 [(google.api.field_behavior) = OPTIONAL]; @@ -312,9 +341,9 @@ message KubernetesResource { // ResourceOptions represent options for Kubernetes resource generation. message ResourceOptions { - // Optional. The Connect agent version to use for connect_resources. Defaults to the - // latest GKE Connect version. The version must be a currently supported - // version, obsolete versions will be rejected. + // Optional. The Connect agent version to use for connect_resources. Defaults + // to the latest GKE Connect version. The version must be a currently + // supported version, obsolete versions will be rejected. string connect_version = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. Use `apiextensions/v1beta1` instead of `apiextensions/v1` for @@ -323,8 +352,8 @@ message ResourceOptions { // <1.16. bool v1beta1_crd = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Major version of the Kubernetes cluster. This is only used to determine - // which version to use for the CustomResourceDefinition resources, + // Optional. Major version of the Kubernetes cluster. This is only used to + // determine which version to use for the CustomResourceDefinition resources, // `apiextensions/v1beta1` or`apiextensions/v1`. string k8s_version = 3 [(google.api.field_behavior) = OPTIONAL]; } @@ -352,8 +381,8 @@ message GkeCluster { // Zonal clusters are also supported. string resource_link = 1 [(google.api.field_behavior) = IMMUTABLE]; - // Output only. If cluster_missing is set then it denotes that the GKE cluster no longer - // exists in the GKE Control Plane. + // Output only. If cluster_missing is set then it denotes that the GKE cluster + // no longer exists in the GKE Control Plane. bool cluster_missing = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } @@ -377,7 +406,8 @@ message OnPremCluster { USER = 4; } - // Immutable. Self-link of the GCP resource for the GKE On-Prem cluster. For example: + // Immutable. Self-link of the GCP resource for the GKE On-Prem cluster. For + // example: // // //gkeonprem.googleapis.com/projects/my-project/locations/us-west1-a/vmwareClusters/my-cluster // //gkeonprem.googleapis.com/projects/my-project/locations/us-west1-a/bareMetalClusters/my-cluster @@ -397,11 +427,12 @@ message OnPremCluster { // MultiCloudCluster contains information specific to GKE Multi-Cloud clusters. message MultiCloudCluster { - // Immutable. Self-link of the GCP resource for the GKE Multi-Cloud cluster. For - // example: + // Immutable. Self-link of the GCP resource for the GKE Multi-Cloud cluster. + // For example: // // //gkemulticloud.googleapis.com/projects/my-project/locations/us-west1-a/awsClusters/my-cluster // //gkemulticloud.googleapis.com/projects/my-project/locations/us-west1-a/azureClusters/my-cluster + // //gkemulticloud.googleapis.com/projects/my-project/locations/us-west1-a/attachedClusters/my-cluster string resource_link = 1 [(google.api.field_behavior) = IMMUTABLE]; // Output only. If cluster_missing is set then it denotes that @@ -432,12 +463,14 @@ message ApplianceCluster { // KubernetesMetadata provides informational metadata for Memberships // representing Kubernetes clusters. message KubernetesMetadata { - // Output only. Kubernetes API server version string as reported by '/version'. - string kubernetes_api_server_version = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Node providerID as reported by the first node in the list of nodes on - // the Kubernetes endpoint. On Kubernetes platforms that support zero-node - // clusters (like GKE-on-GCP), the node_count will be zero and the + // Output only. Kubernetes API server version string as reported by + // '/version'. + string kubernetes_api_server_version = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Node providerID as reported by the first node in the list of + // nodes on the Kubernetes endpoint. On Kubernetes platforms that support + // zero-node clusters (like GKE-on-GCP), the node_count will be zero and the // node_provider_id will be empty. string node_provider_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -447,22 +480,23 @@ message KubernetesMetadata { // Output only. vCPU count as reported by Kubernetes nodes resources. int32 vcpu_count = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The total memory capacity as reported by the sum of all Kubernetes nodes - // resources, defined in MB. + // Output only. The total memory capacity as reported by the sum of all + // Kubernetes nodes resources, defined in MB. int32 memory_mb = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The time at which these details were last updated. This update_time is - // different from the Membership-level update_time since EndpointDetails are - // updated internally for API consumers. - google.protobuf.Timestamp update_time = 100 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The time at which these details were last updated. This + // update_time is different from the Membership-level update_time since + // EndpointDetails are updated internally for API consumers. + google.protobuf.Timestamp update_time = 100 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Authority encodes how Google will recognize identities from this Membership. // See the workload identity documentation for more details: // https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity message Authority { - // Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with `https://` and - // be a valid URL with length <2000 characters. + // Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with + // `https://` and be a valid URL with length <2000 characters. // // If set, then Google will allow valid OIDC tokens from this issuer to // authenticate within the workload_identity_pool. OIDC discovery will be @@ -473,8 +507,8 @@ message Authority { // a new issuer (and re-enabling Workload Identity). string issuer = 1 [(google.api.field_behavior) = OPTIONAL]; - // Output only. The name of the workload identity pool in which `issuer` will be - // recognized. + // Output only. The name of the workload identity pool in which `issuer` will + // be recognized. // // There is a single Workload Identity Pool per Hub that is shared // between all Memberships that belong to that Hub. For a Hub hosted in @@ -482,17 +516,47 @@ message Authority { // although this is subject to change in newer versions of this API. string workload_identity_pool = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. An identity provider that reflects the `issuer` in the workload identity - // pool. + // Output only. An identity provider that reflects the `issuer` in the + // workload identity pool. string identity_provider = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. OIDC verification keys for this Membership in JWKS format (RFC 7517). + // Optional. OIDC verification keys for this Membership in JWKS format (RFC + // 7517). // // When this field is set, OIDC discovery will NOT be performed on `issuer`, // and instead OIDC tokens will be validated using this field. bytes oidc_jwks = 4 [(google.api.field_behavior) = OPTIONAL]; } +// This field informs Fleet-based applications/services/UIs with the necessary +// information for where each underlying Cluster reports its metrics. +message MonitoringConfig { + // Immutable. Project used to report Metrics + string project_id = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Location used to report Metrics + string location = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Cluster name used to report metrics. + // For Anthos on VMWare/Baremetal, it would be in format + // `memberClusters/cluster_name`; And for Anthos on MultiCloud, it would be in + // format + // `{azureClusters, awsClusters}/cluster_name`. + string cluster = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // Kubernetes system metrics, if available, are written to this prefix. + // This defaults to kubernetes.io for GKE, and kubernetes.io/anthos for Anthos + // eventually. Noted: Anthos MultiCloud will have kubernetes.io prefix today + // but will migration to be under kubernetes.io/anthos + string kubernetes_metrics_prefix = 4; + + // Immutable. Cluster hash, this is a unique string generated by google code, + // which does not contain any PII, which we can use to reference the cluster. + // This is expected to be created by the monitoring stack and persisted into + // the Cluster object as well as to GKE-Hub. + string cluster_hash = 5 [(google.api.field_behavior) = IMMUTABLE]; +} + // State of the Membership resource. message MembershipState { // Code describes the state of a Membership resource. @@ -528,8 +592,9 @@ message MembershipState { // Request message for `GkeHubMembershipService.ListMemberships` method. message ListMembershipsRequest { - // Required. The parent (project and location) where the Memberships will be listed. - // Specified in the format `projects/*/locations/*`. + // Required. The parent (project and location) where the Memberships will be + // listed. Specified in the format `projects/*/locations/*`. + // `projects/*/locations/-` list memberships in all the regions. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -537,9 +602,9 @@ message ListMembershipsRequest { } ]; - // Optional. When requesting a 'page' of resources, `page_size` specifies number of - // resources to return. If unspecified or set to 0, all resources will - // be returned. + // Optional. When requesting a 'page' of resources, `page_size` specifies + // number of resources to return. If unspecified or set to 0, all resources + // will be returned. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Token returned by previous call to `ListMemberships` which @@ -547,8 +612,8 @@ message ListMembershipsRequest { // resources. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Lists Memberships that match the filter expression, following the syntax - // outlined in https://google.aip.dev/160. + // Optional. Lists Memberships that match the filter expression, following the + // syntax outlined in https://google.aip.dev/160. // // Examples: // @@ -602,8 +667,8 @@ message GetMembershipRequest { // Request message for the `GkeHubMembershipService.CreateMembership` method. message CreateMembershipRequest { - // Required. The parent (project and location) where the Memberships will be created. - // Specified in the format `projects/*/locations/*`. + // Required. The parent (project and location) where the Memberships will be + // created. Specified in the format `projects/*/locations/*`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -611,8 +676,8 @@ message CreateMembershipRequest { } ]; - // Required. Client chosen ID for the membership. `membership_id` must be a valid RFC - // 1123 compliant DNS label: + // Required. Client chosen ID for the membership. `membership_id` must be a + // valid RFC 1123 compliant DNS label: // // 1. At most 63 characters in length // 2. It must consist of lower case alphanumeric characters or `-` @@ -666,6 +731,11 @@ message DeleteMembershipRequest { // The request ID must be a valid UUID with the exception that zero UUID is // not supported (00000000-0000-0000-0000-000000000000). string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, any subresource from this Membership will also be + // deleted. Otherwise, the request will only work if the Membership has no + // subresource. + bool force = 5 [(google.api.field_behavior) = OPTIONAL]; } // Request message for `GkeHubMembershipService.UpdateMembership` method. @@ -679,9 +749,10 @@ message UpdateMembershipRequest { } ]; - // Required. Mask of fields to update. At least one field path must be specified in this - // mask. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; + // Required. Mask of fields to update. At least one field path must be + // specified in this mask. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; // Required. Only fields specified in update_mask are updated. // If you specify a field in the update_mask but don't specify its value here @@ -711,10 +782,9 @@ message UpdateMembershipRequest { // Request message for `GkeHubMembershipService.GenerateConnectManifest` // method. -// . message GenerateConnectManifestRequest { - // Required. The Membership resource name the Agent will associate with, in the format - // `projects/*/locations/*/memberships/*`. + // Required. The Membership resource name the Agent will associate with, in + // the format `projects/*/locations/*/memberships/*`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -725,7 +795,8 @@ message GenerateConnectManifestRequest { // Optional. The connect agent to generate manifest for. ConnectAgent connect_agent = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The Connect agent version to use. Defaults to the most current version. + // Optional. The Connect agent version to use. Defaults to the most current + // version. string version = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. If true, generate the resources for upgrade only. Some resources @@ -773,14 +844,15 @@ message ConnectAgent { // Do not set. string name = 1 [deprecated = true]; - // Optional. URI of a proxy if connectivity from the agent to gkeconnect.googleapis.com - // requires the use of a proxy. Format must be in the form - // `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol + // Optional. URI of a proxy if connectivity from the agent to + // gkeconnect.googleapis.com requires the use of a proxy. Format must be in + // the form `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol // supported by the proxy. This will direct the connect agent's outbound // traffic through a HTTP(S) proxy. bytes proxy = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Namespace for GKE Connect agent resources. Defaults to `gke-connect`. + // Optional. Namespace for GKE Connect agent resources. Defaults to + // `gke-connect`. // // The Connect Agent is authorized automatically when run in the default // namespace. Otherwise, explicit authorization must be granted with an @@ -791,8 +863,8 @@ message ConnectAgent { // The request to validate the existing state of the membership CR in the // cluster. message ValidateExclusivityRequest { - // Required. The parent (project and location) where the Memberships will be created. - // Specified in the format `projects/*/locations/*`. + // Required. The parent (project and location) where the Memberships will be + // created. Specified in the format `projects/*/locations/*`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -800,12 +872,13 @@ message ValidateExclusivityRequest { } ]; - // Optional. The YAML of the membership CR in the cluster. Empty if the membership - // CR does not exist. + // Optional. The YAML of the membership CR in the cluster. Empty if the + // membership CR does not exist. string cr_manifest = 2 [(google.api.field_behavior) = OPTIONAL]; - // Required. The intended membership name under the `parent`. This method only does - // validation in anticipation of a CreateMembership call with the same name. + // Required. The intended membership name under the `parent`. This method only + // does validation in anticipation of a CreateMembership call with the same + // name. string intended_membership = 3 [(google.api.field_behavior) = REQUIRED]; } @@ -856,10 +929,12 @@ message GenerateExclusivityManifestResponse { // Represents the metadata of the long-running operation. message OperationMetadata { // Output only. The time the operation was created. - google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time the operation finished running. - google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Server-defined resource path for the target of the operation. string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -872,8 +947,9 @@ message OperationMetadata { // Output only. Identifies whether the user has requested cancellation // of the operation. Operations that have successfully been cancelled - // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - // corresponding to `Code.CANCELLED`. + // have [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. bool cancel_requested = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. API version used to start the operation. diff --git a/packages/google-cloud-gkehub/protos/protos.d.ts b/packages/google-cloud-gkehub/protos/protos.d.ts index 001d641e820..04695253d85 100644 --- a/packages/google-cloud-gkehub/protos/protos.d.ts +++ b/packages/google-cloud-gkehub/protos/protos.d.ts @@ -12858,6 +12858,9 @@ export namespace google { /** Membership authority */ authority?: (google.cloud.gkehub.v1.IAuthority|null); + + /** Membership monitoringConfig */ + monitoringConfig?: (google.cloud.gkehub.v1.IMonitoringConfig|null); } /** Represents a Membership. */ @@ -12905,6 +12908,9 @@ export namespace google { /** Membership authority. */ public authority?: (google.cloud.gkehub.v1.IAuthority|null); + /** Membership monitoringConfig. */ + public monitoringConfig?: (google.cloud.gkehub.v1.IMonitoringConfig|null); + /** Membership type. */ public type?: "endpoint"; @@ -12997,6 +13003,9 @@ export namespace google { /** MembershipEndpoint kubernetesResource */ kubernetesResource?: (google.cloud.gkehub.v1.IKubernetesResource|null); + + /** MembershipEndpoint googleManaged */ + googleManaged?: (boolean|null); } /** Represents a MembershipEndpoint. */ @@ -13017,6 +13026,9 @@ export namespace google { /** MembershipEndpoint kubernetesResource. */ public kubernetesResource?: (google.cloud.gkehub.v1.IKubernetesResource|null); + /** MembershipEndpoint googleManaged. */ + public googleManaged: boolean; + /** * Creates a new MembershipEndpoint instance using the specified properties. * @param [properties] Properties to set @@ -13427,6 +13439,9 @@ export namespace google { /** GkeCluster resourceLink */ resourceLink?: (string|null); + + /** GkeCluster clusterMissing */ + clusterMissing?: (boolean|null); } /** Represents a GkeCluster. */ @@ -13441,6 +13456,9 @@ export namespace google { /** GkeCluster resourceLink. */ public resourceLink: string; + /** GkeCluster clusterMissing. */ + public clusterMissing: boolean; + /** * Creates a new GkeCluster instance using the specified properties. * @param [properties] Properties to set @@ -13646,6 +13664,127 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a MonitoringConfig. */ + interface IMonitoringConfig { + + /** MonitoringConfig projectId */ + projectId?: (string|null); + + /** MonitoringConfig location */ + location?: (string|null); + + /** MonitoringConfig cluster */ + cluster?: (string|null); + + /** MonitoringConfig kubernetesMetricsPrefix */ + kubernetesMetricsPrefix?: (string|null); + + /** MonitoringConfig clusterHash */ + clusterHash?: (string|null); + } + + /** Represents a MonitoringConfig. */ + class MonitoringConfig implements IMonitoringConfig { + + /** + * Constructs a new MonitoringConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IMonitoringConfig); + + /** MonitoringConfig projectId. */ + public projectId: string; + + /** MonitoringConfig location. */ + public location: string; + + /** MonitoringConfig cluster. */ + public cluster: string; + + /** MonitoringConfig kubernetesMetricsPrefix. */ + public kubernetesMetricsPrefix: string; + + /** MonitoringConfig clusterHash. */ + public clusterHash: string; + + /** + * Creates a new MonitoringConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns MonitoringConfig instance + */ + public static create(properties?: google.cloud.gkehub.v1.IMonitoringConfig): google.cloud.gkehub.v1.MonitoringConfig; + + /** + * Encodes the specified MonitoringConfig message. Does not implicitly {@link google.cloud.gkehub.v1.MonitoringConfig.verify|verify} messages. + * @param message MonitoringConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IMonitoringConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MonitoringConfig message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.MonitoringConfig.verify|verify} messages. + * @param message MonitoringConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IMonitoringConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MonitoringConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MonitoringConfig + * @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.gkehub.v1.MonitoringConfig; + + /** + * Decodes a MonitoringConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MonitoringConfig + * @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.gkehub.v1.MonitoringConfig; + + /** + * Verifies a MonitoringConfig 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 MonitoringConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MonitoringConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.MonitoringConfig; + + /** + * Creates a plain object from a MonitoringConfig message. Also converts values to other types if specified. + * @param message MonitoringConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.MonitoringConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MonitoringConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MonitoringConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a MembershipState. */ interface IMembershipState { @@ -14576,6 +14715,9 @@ export namespace google { /** DeleteMembershipRequest requestId */ requestId?: (string|null); + + /** DeleteMembershipRequest force */ + force?: (boolean|null); } /** Represents a DeleteMembershipRequest. */ @@ -14593,6 +14735,9 @@ export namespace google { /** DeleteMembershipRequest requestId. */ public requestId: string; + /** DeleteMembershipRequest force. */ + public force: boolean; + /** * Creates a new DeleteMembershipRequest instance using the specified properties. * @param [properties] Properties to set @@ -23787,6 +23932,9 @@ export namespace google { /** Membership infrastructureType */ infrastructureType?: (google.cloud.gkehub.v1beta1.Membership.InfrastructureType|keyof typeof google.cloud.gkehub.v1beta1.Membership.InfrastructureType|null); + + /** Membership monitoringConfig */ + monitoringConfig?: (google.cloud.gkehub.v1beta1.IMonitoringConfig|null); } /** Represents a Membership. */ @@ -23837,6 +23985,9 @@ export namespace google { /** Membership infrastructureType. */ public infrastructureType: (google.cloud.gkehub.v1beta1.Membership.InfrastructureType|keyof typeof google.cloud.gkehub.v1beta1.Membership.InfrastructureType); + /** Membership monitoringConfig. */ + public monitoringConfig?: (google.cloud.gkehub.v1beta1.IMonitoringConfig|null); + /** Membership type. */ public type?: "endpoint"; @@ -25160,6 +25311,127 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a MonitoringConfig. */ + interface IMonitoringConfig { + + /** MonitoringConfig projectId */ + projectId?: (string|null); + + /** MonitoringConfig location */ + location?: (string|null); + + /** MonitoringConfig cluster */ + cluster?: (string|null); + + /** MonitoringConfig kubernetesMetricsPrefix */ + kubernetesMetricsPrefix?: (string|null); + + /** MonitoringConfig clusterHash */ + clusterHash?: (string|null); + } + + /** Represents a MonitoringConfig. */ + class MonitoringConfig implements IMonitoringConfig { + + /** + * Constructs a new MonitoringConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1beta1.IMonitoringConfig); + + /** MonitoringConfig projectId. */ + public projectId: string; + + /** MonitoringConfig location. */ + public location: string; + + /** MonitoringConfig cluster. */ + public cluster: string; + + /** MonitoringConfig kubernetesMetricsPrefix. */ + public kubernetesMetricsPrefix: string; + + /** MonitoringConfig clusterHash. */ + public clusterHash: string; + + /** + * Creates a new MonitoringConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns MonitoringConfig instance + */ + public static create(properties?: google.cloud.gkehub.v1beta1.IMonitoringConfig): google.cloud.gkehub.v1beta1.MonitoringConfig; + + /** + * Encodes the specified MonitoringConfig message. Does not implicitly {@link google.cloud.gkehub.v1beta1.MonitoringConfig.verify|verify} messages. + * @param message MonitoringConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1beta1.IMonitoringConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MonitoringConfig message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1beta1.MonitoringConfig.verify|verify} messages. + * @param message MonitoringConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1beta1.IMonitoringConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MonitoringConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MonitoringConfig + * @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.gkehub.v1beta1.MonitoringConfig; + + /** + * Decodes a MonitoringConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MonitoringConfig + * @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.gkehub.v1beta1.MonitoringConfig; + + /** + * Verifies a MonitoringConfig 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 MonitoringConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MonitoringConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1beta1.MonitoringConfig; + + /** + * Creates a plain object from a MonitoringConfig message. Also converts values to other types if specified. + * @param message MonitoringConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1beta1.MonitoringConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MonitoringConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MonitoringConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a MembershipState. */ interface IMembershipState { @@ -25732,6 +26004,9 @@ export namespace google { /** DeleteMembershipRequest requestId */ requestId?: (string|null); + + /** DeleteMembershipRequest force */ + force?: (boolean|null); } /** Represents a DeleteMembershipRequest. */ @@ -25749,6 +26024,9 @@ export namespace google { /** DeleteMembershipRequest requestId. */ public requestId: string; + /** DeleteMembershipRequest force. */ + public force: boolean; + /** * Creates a new DeleteMembershipRequest instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-gkehub/protos/protos.js b/packages/google-cloud-gkehub/protos/protos.js index 1660dff634c..0098bb826f2 100644 --- a/packages/google-cloud-gkehub/protos/protos.js +++ b/packages/google-cloud-gkehub/protos/protos.js @@ -33664,6 +33664,7 @@ * @property {google.protobuf.ITimestamp|null} [lastConnectionTime] Membership lastConnectionTime * @property {string|null} [uniqueId] Membership uniqueId * @property {google.cloud.gkehub.v1.IAuthority|null} [authority] Membership authority + * @property {google.cloud.gkehub.v1.IMonitoringConfig|null} [monitoringConfig] Membership monitoringConfig */ /** @@ -33778,6 +33779,14 @@ */ Membership.prototype.authority = null; + /** + * Membership monitoringConfig. + * @member {google.cloud.gkehub.v1.IMonitoringConfig|null|undefined} monitoringConfig + * @memberof google.cloud.gkehub.v1.Membership + * @instance + */ + Membership.prototype.monitoringConfig = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -33841,6 +33850,8 @@ writer.uint32(/* id 11, wireType 2 =*/90).string(message.uniqueId); if (message.authority != null && Object.hasOwnProperty.call(message, "authority")) $root.google.cloud.gkehub.v1.Authority.encode(message.authority, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.monitoringConfig != null && Object.hasOwnProperty.call(message, "monitoringConfig")) + $root.google.cloud.gkehub.v1.MonitoringConfig.encode(message.monitoringConfig, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); return writer; }; @@ -33942,6 +33953,10 @@ message.authority = $root.google.cloud.gkehub.v1.Authority.decode(reader, reader.uint32()); break; } + case 14: { + message.monitoringConfig = $root.google.cloud.gkehub.v1.MonitoringConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -34036,6 +34051,11 @@ if (error) return "authority." + error; } + if (message.monitoringConfig != null && message.hasOwnProperty("monitoringConfig")) { + var error = $root.google.cloud.gkehub.v1.MonitoringConfig.verify(message.monitoringConfig); + if (error) + return "monitoringConfig." + error; + } return null; }; @@ -34101,6 +34121,11 @@ throw TypeError(".google.cloud.gkehub.v1.Membership.authority: object expected"); message.authority = $root.google.cloud.gkehub.v1.Authority.fromObject(object.authority); } + if (object.monitoringConfig != null) { + if (typeof object.monitoringConfig !== "object") + throw TypeError(".google.cloud.gkehub.v1.Membership.monitoringConfig: object expected"); + message.monitoringConfig = $root.google.cloud.gkehub.v1.MonitoringConfig.fromObject(object.monitoringConfig); + } return message; }; @@ -34130,6 +34155,7 @@ object.lastConnectionTime = null; object.uniqueId = ""; object.authority = null; + object.monitoringConfig = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -34162,6 +34188,8 @@ object.uniqueId = message.uniqueId; if (message.authority != null && message.hasOwnProperty("authority")) object.authority = $root.google.cloud.gkehub.v1.Authority.toObject(message.authority, options); + if (message.monitoringConfig != null && message.hasOwnProperty("monitoringConfig")) + object.monitoringConfig = $root.google.cloud.gkehub.v1.MonitoringConfig.toObject(message.monitoringConfig, options); return object; }; @@ -34203,6 +34231,7 @@ * @property {google.cloud.gkehub.v1.IGkeCluster|null} [gkeCluster] MembershipEndpoint gkeCluster * @property {google.cloud.gkehub.v1.IKubernetesMetadata|null} [kubernetesMetadata] MembershipEndpoint kubernetesMetadata * @property {google.cloud.gkehub.v1.IKubernetesResource|null} [kubernetesResource] MembershipEndpoint kubernetesResource + * @property {boolean|null} [googleManaged] MembershipEndpoint googleManaged */ /** @@ -34244,6 +34273,14 @@ */ MembershipEndpoint.prototype.kubernetesResource = null; + /** + * MembershipEndpoint googleManaged. + * @member {boolean} googleManaged + * @memberof google.cloud.gkehub.v1.MembershipEndpoint + * @instance + */ + MembershipEndpoint.prototype.googleManaged = false; + /** * Creates a new MembershipEndpoint instance using the specified properties. * @function create @@ -34274,6 +34311,8 @@ $root.google.cloud.gkehub.v1.KubernetesMetadata.encode(message.kubernetesMetadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.kubernetesResource != null && Object.hasOwnProperty.call(message, "kubernetesResource")) $root.google.cloud.gkehub.v1.KubernetesResource.encode(message.kubernetesResource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.googleManaged != null && Object.hasOwnProperty.call(message, "googleManaged")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.googleManaged); return writer; }; @@ -34320,6 +34359,10 @@ message.kubernetesResource = $root.google.cloud.gkehub.v1.KubernetesResource.decode(reader, reader.uint32()); break; } + case 8: { + message.googleManaged = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -34370,6 +34413,9 @@ if (error) return "kubernetesResource." + error; } + if (message.googleManaged != null && message.hasOwnProperty("googleManaged")) + if (typeof message.googleManaged !== "boolean") + return "googleManaged: boolean expected"; return null; }; @@ -34400,6 +34446,8 @@ throw TypeError(".google.cloud.gkehub.v1.MembershipEndpoint.kubernetesResource: object expected"); message.kubernetesResource = $root.google.cloud.gkehub.v1.KubernetesResource.fromObject(object.kubernetesResource); } + if (object.googleManaged != null) + message.googleManaged = Boolean(object.googleManaged); return message; }; @@ -34420,6 +34468,7 @@ object.gkeCluster = null; object.kubernetesMetadata = null; object.kubernetesResource = null; + object.googleManaged = false; } if (message.gkeCluster != null && message.hasOwnProperty("gkeCluster")) object.gkeCluster = $root.google.cloud.gkehub.v1.GkeCluster.toObject(message.gkeCluster, options); @@ -34427,6 +34476,8 @@ object.kubernetesMetadata = $root.google.cloud.gkehub.v1.KubernetesMetadata.toObject(message.kubernetesMetadata, options); if (message.kubernetesResource != null && message.hasOwnProperty("kubernetesResource")) object.kubernetesResource = $root.google.cloud.gkehub.v1.KubernetesResource.toObject(message.kubernetesResource, options); + if (message.googleManaged != null && message.hasOwnProperty("googleManaged")) + object.googleManaged = message.googleManaged; return object; }; @@ -35265,6 +35316,7 @@ * @memberof google.cloud.gkehub.v1 * @interface IGkeCluster * @property {string|null} [resourceLink] GkeCluster resourceLink + * @property {boolean|null} [clusterMissing] GkeCluster clusterMissing */ /** @@ -35290,6 +35342,14 @@ */ GkeCluster.prototype.resourceLink = ""; + /** + * GkeCluster clusterMissing. + * @member {boolean} clusterMissing + * @memberof google.cloud.gkehub.v1.GkeCluster + * @instance + */ + GkeCluster.prototype.clusterMissing = false; + /** * Creates a new GkeCluster instance using the specified properties. * @function create @@ -35316,6 +35376,8 @@ writer = $Writer.create(); if (message.resourceLink != null && Object.hasOwnProperty.call(message, "resourceLink")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceLink); + if (message.clusterMissing != null && Object.hasOwnProperty.call(message, "clusterMissing")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.clusterMissing); return writer; }; @@ -35354,6 +35416,10 @@ message.resourceLink = reader.string(); break; } + case 2: { + message.clusterMissing = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -35392,6 +35458,9 @@ if (message.resourceLink != null && message.hasOwnProperty("resourceLink")) if (!$util.isString(message.resourceLink)) return "resourceLink: string expected"; + if (message.clusterMissing != null && message.hasOwnProperty("clusterMissing")) + if (typeof message.clusterMissing !== "boolean") + return "clusterMissing: boolean expected"; return null; }; @@ -35409,6 +35478,8 @@ var message = new $root.google.cloud.gkehub.v1.GkeCluster(); if (object.resourceLink != null) message.resourceLink = String(object.resourceLink); + if (object.clusterMissing != null) + message.clusterMissing = Boolean(object.clusterMissing); return message; }; @@ -35425,10 +35496,14 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.resourceLink = ""; + object.clusterMissing = false; + } if (message.resourceLink != null && message.hasOwnProperty("resourceLink")) object.resourceLink = message.resourceLink; + if (message.clusterMissing != null && message.hasOwnProperty("clusterMissing")) + object.clusterMissing = message.clusterMissing; return object; }; @@ -35785,6 +35860,302 @@ return KubernetesMetadata; })(); + v1.MonitoringConfig = (function() { + + /** + * Properties of a MonitoringConfig. + * @memberof google.cloud.gkehub.v1 + * @interface IMonitoringConfig + * @property {string|null} [projectId] MonitoringConfig projectId + * @property {string|null} [location] MonitoringConfig location + * @property {string|null} [cluster] MonitoringConfig cluster + * @property {string|null} [kubernetesMetricsPrefix] MonitoringConfig kubernetesMetricsPrefix + * @property {string|null} [clusterHash] MonitoringConfig clusterHash + */ + + /** + * Constructs a new MonitoringConfig. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a MonitoringConfig. + * @implements IMonitoringConfig + * @constructor + * @param {google.cloud.gkehub.v1.IMonitoringConfig=} [properties] Properties to set + */ + function MonitoringConfig(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]]; + } + + /** + * MonitoringConfig projectId. + * @member {string} projectId + * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @instance + */ + MonitoringConfig.prototype.projectId = ""; + + /** + * MonitoringConfig location. + * @member {string} location + * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @instance + */ + MonitoringConfig.prototype.location = ""; + + /** + * MonitoringConfig cluster. + * @member {string} cluster + * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @instance + */ + MonitoringConfig.prototype.cluster = ""; + + /** + * MonitoringConfig kubernetesMetricsPrefix. + * @member {string} kubernetesMetricsPrefix + * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @instance + */ + MonitoringConfig.prototype.kubernetesMetricsPrefix = ""; + + /** + * MonitoringConfig clusterHash. + * @member {string} clusterHash + * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @instance + */ + MonitoringConfig.prototype.clusterHash = ""; + + /** + * Creates a new MonitoringConfig instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @static + * @param {google.cloud.gkehub.v1.IMonitoringConfig=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.MonitoringConfig} MonitoringConfig instance + */ + MonitoringConfig.create = function create(properties) { + return new MonitoringConfig(properties); + }; + + /** + * Encodes the specified MonitoringConfig message. Does not implicitly {@link google.cloud.gkehub.v1.MonitoringConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @static + * @param {google.cloud.gkehub.v1.IMonitoringConfig} message MonitoringConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoringConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); + if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.cluster); + if (message.kubernetesMetricsPrefix != null && Object.hasOwnProperty.call(message, "kubernetesMetricsPrefix")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.kubernetesMetricsPrefix); + if (message.clusterHash != null && Object.hasOwnProperty.call(message, "clusterHash")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.clusterHash); + return writer; + }; + + /** + * Encodes the specified MonitoringConfig message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.MonitoringConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @static + * @param {google.cloud.gkehub.v1.IMonitoringConfig} message MonitoringConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoringConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MonitoringConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.MonitoringConfig} MonitoringConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoringConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.MonitoringConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.location = reader.string(); + break; + } + case 3: { + message.cluster = reader.string(); + break; + } + case 4: { + message.kubernetesMetricsPrefix = reader.string(); + break; + } + case 5: { + message.clusterHash = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MonitoringConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.MonitoringConfig} MonitoringConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoringConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MonitoringConfig message. + * @function verify + * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MonitoringConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.cluster != null && message.hasOwnProperty("cluster")) + if (!$util.isString(message.cluster)) + return "cluster: string expected"; + if (message.kubernetesMetricsPrefix != null && message.hasOwnProperty("kubernetesMetricsPrefix")) + if (!$util.isString(message.kubernetesMetricsPrefix)) + return "kubernetesMetricsPrefix: string expected"; + if (message.clusterHash != null && message.hasOwnProperty("clusterHash")) + if (!$util.isString(message.clusterHash)) + return "clusterHash: string expected"; + return null; + }; + + /** + * Creates a MonitoringConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.MonitoringConfig} MonitoringConfig + */ + MonitoringConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.MonitoringConfig) + return object; + var message = new $root.google.cloud.gkehub.v1.MonitoringConfig(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.location != null) + message.location = String(object.location); + if (object.cluster != null) + message.cluster = String(object.cluster); + if (object.kubernetesMetricsPrefix != null) + message.kubernetesMetricsPrefix = String(object.kubernetesMetricsPrefix); + if (object.clusterHash != null) + message.clusterHash = String(object.clusterHash); + return message; + }; + + /** + * Creates a plain object from a MonitoringConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @static + * @param {google.cloud.gkehub.v1.MonitoringConfig} message MonitoringConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MonitoringConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.location = ""; + object.cluster = ""; + object.kubernetesMetricsPrefix = ""; + object.clusterHash = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.cluster != null && message.hasOwnProperty("cluster")) + object.cluster = message.cluster; + if (message.kubernetesMetricsPrefix != null && message.hasOwnProperty("kubernetesMetricsPrefix")) + object.kubernetesMetricsPrefix = message.kubernetesMetricsPrefix; + if (message.clusterHash != null && message.hasOwnProperty("clusterHash")) + object.clusterHash = message.clusterHash; + return object; + }; + + /** + * Converts this MonitoringConfig to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @instance + * @returns {Object.} JSON object + */ + MonitoringConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MonitoringConfig + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MonitoringConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.MonitoringConfig"; + }; + + return MonitoringConfig; + })(); + v1.MembershipState = (function() { /** @@ -37802,6 +38173,7 @@ * @interface IDeleteMembershipRequest * @property {string|null} [name] DeleteMembershipRequest name * @property {string|null} [requestId] DeleteMembershipRequest requestId + * @property {boolean|null} [force] DeleteMembershipRequest force */ /** @@ -37835,6 +38207,14 @@ */ DeleteMembershipRequest.prototype.requestId = ""; + /** + * DeleteMembershipRequest force. + * @member {boolean} force + * @memberof google.cloud.gkehub.v1.DeleteMembershipRequest + * @instance + */ + DeleteMembershipRequest.prototype.force = false; + /** * Creates a new DeleteMembershipRequest instance using the specified properties. * @function create @@ -37863,6 +38243,8 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); return writer; }; @@ -37905,6 +38287,10 @@ message.requestId = reader.string(); break; } + case 3: { + message.force = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -37946,6 +38332,9 @@ if (message.requestId != null && message.hasOwnProperty("requestId")) if (!$util.isString(message.requestId)) return "requestId: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; return null; }; @@ -37965,6 +38354,8 @@ message.name = String(object.name); if (object.requestId != null) message.requestId = String(object.requestId); + if (object.force != null) + message.force = Boolean(object.force); return message; }; @@ -37984,11 +38375,14 @@ if (options.defaults) { object.name = ""; object.requestId = ""; + object.force = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.requestId != null && message.hasOwnProperty("requestId")) object.requestId = message.requestId; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; return object; }; @@ -59883,6 +60277,7 @@ * @property {google.protobuf.ITimestamp|null} [lastConnectionTime] Membership lastConnectionTime * @property {string|null} [uniqueId] Membership uniqueId * @property {google.cloud.gkehub.v1beta1.Membership.InfrastructureType|null} [infrastructureType] Membership infrastructureType + * @property {google.cloud.gkehub.v1beta1.IMonitoringConfig|null} [monitoringConfig] Membership monitoringConfig */ /** @@ -60005,6 +60400,14 @@ */ Membership.prototype.infrastructureType = 0; + /** + * Membership monitoringConfig. + * @member {google.cloud.gkehub.v1beta1.IMonitoringConfig|null|undefined} monitoringConfig + * @memberof google.cloud.gkehub.v1beta1.Membership + * @instance + */ + Membership.prototype.monitoringConfig = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -60070,6 +60473,8 @@ writer.uint32(/* id 12, wireType 2 =*/98).string(message.uniqueId); if (message.infrastructureType != null && Object.hasOwnProperty.call(message, "infrastructureType")) writer.uint32(/* id 13, wireType 0 =*/104).int32(message.infrastructureType); + if (message.monitoringConfig != null && Object.hasOwnProperty.call(message, "monitoringConfig")) + $root.google.cloud.gkehub.v1beta1.MonitoringConfig.encode(message.monitoringConfig, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); return writer; }; @@ -60175,6 +60580,10 @@ message.infrastructureType = reader.int32(); break; } + case 14: { + message.monitoringConfig = $root.google.cloud.gkehub.v1beta1.MonitoringConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -60278,6 +60687,11 @@ case 2: break; } + if (message.monitoringConfig != null && message.hasOwnProperty("monitoringConfig")) { + var error = $root.google.cloud.gkehub.v1beta1.MonitoringConfig.verify(message.monitoringConfig); + if (error) + return "monitoringConfig." + error; + } return null; }; @@ -60363,6 +60777,11 @@ message.infrastructureType = 2; break; } + if (object.monitoringConfig != null) { + if (typeof object.monitoringConfig !== "object") + throw TypeError(".google.cloud.gkehub.v1beta1.Membership.monitoringConfig: object expected"); + message.monitoringConfig = $root.google.cloud.gkehub.v1beta1.MonitoringConfig.fromObject(object.monitoringConfig); + } return message; }; @@ -60393,6 +60812,7 @@ object.lastConnectionTime = null; object.uniqueId = ""; object.infrastructureType = options.enums === String ? "INFRASTRUCTURE_TYPE_UNSPECIFIED" : 0; + object.monitoringConfig = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -60427,6 +60847,8 @@ object.uniqueId = message.uniqueId; if (message.infrastructureType != null && message.hasOwnProperty("infrastructureType")) object.infrastructureType = options.enums === String ? $root.google.cloud.gkehub.v1beta1.Membership.InfrastructureType[message.infrastructureType] === undefined ? message.infrastructureType : $root.google.cloud.gkehub.v1beta1.Membership.InfrastructureType[message.infrastructureType] : message.infrastructureType; + if (message.monitoringConfig != null && message.hasOwnProperty("monitoringConfig")) + object.monitoringConfig = $root.google.cloud.gkehub.v1beta1.MonitoringConfig.toObject(message.monitoringConfig, options); return object; }; @@ -63492,6 +63914,302 @@ return Authority; })(); + v1beta1.MonitoringConfig = (function() { + + /** + * Properties of a MonitoringConfig. + * @memberof google.cloud.gkehub.v1beta1 + * @interface IMonitoringConfig + * @property {string|null} [projectId] MonitoringConfig projectId + * @property {string|null} [location] MonitoringConfig location + * @property {string|null} [cluster] MonitoringConfig cluster + * @property {string|null} [kubernetesMetricsPrefix] MonitoringConfig kubernetesMetricsPrefix + * @property {string|null} [clusterHash] MonitoringConfig clusterHash + */ + + /** + * Constructs a new MonitoringConfig. + * @memberof google.cloud.gkehub.v1beta1 + * @classdesc Represents a MonitoringConfig. + * @implements IMonitoringConfig + * @constructor + * @param {google.cloud.gkehub.v1beta1.IMonitoringConfig=} [properties] Properties to set + */ + function MonitoringConfig(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]]; + } + + /** + * MonitoringConfig projectId. + * @member {string} projectId + * @memberof google.cloud.gkehub.v1beta1.MonitoringConfig + * @instance + */ + MonitoringConfig.prototype.projectId = ""; + + /** + * MonitoringConfig location. + * @member {string} location + * @memberof google.cloud.gkehub.v1beta1.MonitoringConfig + * @instance + */ + MonitoringConfig.prototype.location = ""; + + /** + * MonitoringConfig cluster. + * @member {string} cluster + * @memberof google.cloud.gkehub.v1beta1.MonitoringConfig + * @instance + */ + MonitoringConfig.prototype.cluster = ""; + + /** + * MonitoringConfig kubernetesMetricsPrefix. + * @member {string} kubernetesMetricsPrefix + * @memberof google.cloud.gkehub.v1beta1.MonitoringConfig + * @instance + */ + MonitoringConfig.prototype.kubernetesMetricsPrefix = ""; + + /** + * MonitoringConfig clusterHash. + * @member {string} clusterHash + * @memberof google.cloud.gkehub.v1beta1.MonitoringConfig + * @instance + */ + MonitoringConfig.prototype.clusterHash = ""; + + /** + * Creates a new MonitoringConfig instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1beta1.MonitoringConfig + * @static + * @param {google.cloud.gkehub.v1beta1.IMonitoringConfig=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1beta1.MonitoringConfig} MonitoringConfig instance + */ + MonitoringConfig.create = function create(properties) { + return new MonitoringConfig(properties); + }; + + /** + * Encodes the specified MonitoringConfig message. Does not implicitly {@link google.cloud.gkehub.v1beta1.MonitoringConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1beta1.MonitoringConfig + * @static + * @param {google.cloud.gkehub.v1beta1.IMonitoringConfig} message MonitoringConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoringConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); + if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.cluster); + if (message.kubernetesMetricsPrefix != null && Object.hasOwnProperty.call(message, "kubernetesMetricsPrefix")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.kubernetesMetricsPrefix); + if (message.clusterHash != null && Object.hasOwnProperty.call(message, "clusterHash")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.clusterHash); + return writer; + }; + + /** + * Encodes the specified MonitoringConfig message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1beta1.MonitoringConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1beta1.MonitoringConfig + * @static + * @param {google.cloud.gkehub.v1beta1.IMonitoringConfig} message MonitoringConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoringConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MonitoringConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1beta1.MonitoringConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1beta1.MonitoringConfig} MonitoringConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoringConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1beta1.MonitoringConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.location = reader.string(); + break; + } + case 3: { + message.cluster = reader.string(); + break; + } + case 4: { + message.kubernetesMetricsPrefix = reader.string(); + break; + } + case 5: { + message.clusterHash = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MonitoringConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1beta1.MonitoringConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1beta1.MonitoringConfig} MonitoringConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MonitoringConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MonitoringConfig message. + * @function verify + * @memberof google.cloud.gkehub.v1beta1.MonitoringConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MonitoringConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.cluster != null && message.hasOwnProperty("cluster")) + if (!$util.isString(message.cluster)) + return "cluster: string expected"; + if (message.kubernetesMetricsPrefix != null && message.hasOwnProperty("kubernetesMetricsPrefix")) + if (!$util.isString(message.kubernetesMetricsPrefix)) + return "kubernetesMetricsPrefix: string expected"; + if (message.clusterHash != null && message.hasOwnProperty("clusterHash")) + if (!$util.isString(message.clusterHash)) + return "clusterHash: string expected"; + return null; + }; + + /** + * Creates a MonitoringConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1beta1.MonitoringConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1beta1.MonitoringConfig} MonitoringConfig + */ + MonitoringConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1beta1.MonitoringConfig) + return object; + var message = new $root.google.cloud.gkehub.v1beta1.MonitoringConfig(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.location != null) + message.location = String(object.location); + if (object.cluster != null) + message.cluster = String(object.cluster); + if (object.kubernetesMetricsPrefix != null) + message.kubernetesMetricsPrefix = String(object.kubernetesMetricsPrefix); + if (object.clusterHash != null) + message.clusterHash = String(object.clusterHash); + return message; + }; + + /** + * Creates a plain object from a MonitoringConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1beta1.MonitoringConfig + * @static + * @param {google.cloud.gkehub.v1beta1.MonitoringConfig} message MonitoringConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MonitoringConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.location = ""; + object.cluster = ""; + object.kubernetesMetricsPrefix = ""; + object.clusterHash = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.cluster != null && message.hasOwnProperty("cluster")) + object.cluster = message.cluster; + if (message.kubernetesMetricsPrefix != null && message.hasOwnProperty("kubernetesMetricsPrefix")) + object.kubernetesMetricsPrefix = message.kubernetesMetricsPrefix; + if (message.clusterHash != null && message.hasOwnProperty("clusterHash")) + object.clusterHash = message.clusterHash; + return object; + }; + + /** + * Converts this MonitoringConfig to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1beta1.MonitoringConfig + * @instance + * @returns {Object.} JSON object + */ + MonitoringConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MonitoringConfig + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1beta1.MonitoringConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MonitoringConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1beta1.MonitoringConfig"; + }; + + return MonitoringConfig; + })(); + v1beta1.MembershipState = (function() { /** @@ -64881,6 +65599,7 @@ * @interface IDeleteMembershipRequest * @property {string|null} [name] DeleteMembershipRequest name * @property {string|null} [requestId] DeleteMembershipRequest requestId + * @property {boolean|null} [force] DeleteMembershipRequest force */ /** @@ -64914,6 +65633,14 @@ */ DeleteMembershipRequest.prototype.requestId = ""; + /** + * DeleteMembershipRequest force. + * @member {boolean} force + * @memberof google.cloud.gkehub.v1beta1.DeleteMembershipRequest + * @instance + */ + DeleteMembershipRequest.prototype.force = false; + /** * Creates a new DeleteMembershipRequest instance using the specified properties. * @function create @@ -64942,6 +65669,8 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.force); return writer; }; @@ -64984,6 +65713,10 @@ message.requestId = reader.string(); break; } + case 5: { + message.force = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -65025,6 +65758,9 @@ if (message.requestId != null && message.hasOwnProperty("requestId")) if (!$util.isString(message.requestId)) return "requestId: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; return null; }; @@ -65044,6 +65780,8 @@ message.name = String(object.name); if (object.requestId != null) message.requestId = String(object.requestId); + if (object.force != null) + message.force = Boolean(object.force); return message; }; @@ -65063,11 +65801,14 @@ if (options.defaults) { object.name = ""; object.requestId = ""; + object.force = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.requestId != null && message.hasOwnProperty("requestId")) object.requestId = message.requestId; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; return object; }; diff --git a/packages/google-cloud-gkehub/protos/protos.json b/packages/google-cloud-gkehub/protos/protos.json index b1086a6a31d..dbcf8bc6364 100644 --- a/packages/google-cloud-gkehub/protos/protos.json +++ b/packages/google-cloud-gkehub/protos/protos.json @@ -2770,6 +2770,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "monitoringConfig": { + "type": "MonitoringConfig", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -2795,6 +2802,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "googleManaged": { + "type": "bool", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, @@ -2877,6 +2891,13 @@ "options": { "(google.api.field_behavior)": "IMMUTABLE" } + }, + "clusterMissing": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, @@ -2926,6 +2947,42 @@ } } }, + "MonitoringConfig": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "location": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "cluster": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "kubernetesMetricsPrefix": { + "type": "string", + "id": 4 + }, + "clusterHash": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + } + }, "MembershipState": { "fields": { "code": { @@ -3358,6 +3415,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "force": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -6070,6 +6134,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "monitoringConfig": { + "type": "MonitoringConfig", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -6396,6 +6467,42 @@ } } }, + "MonitoringConfig": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "location": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "cluster": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "kubernetesMetricsPrefix": { + "type": "string", + "id": 4 + }, + "clusterHash": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + } + }, "MembershipState": { "fields": { "code": { @@ -6552,6 +6659,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "force": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_membership.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_membership.js index c06b552f780..62b23a56aa5 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_membership.js +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_membership.js @@ -29,13 +29,13 @@ function main(parent, membershipId, resource) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The parent (project and location) where the Memberships will be created. - * Specified in the format `projects/* /locations/*`. + * Required. The parent (project and location) where the Memberships will be + * created. Specified in the format `projects/* /locations/*`. */ // const parent = 'abc123' /** - * Required. Client chosen ID for the membership. `membership_id` must be a valid RFC - * 1123 compliant DNS label: + * Required. Client chosen ID for the membership. `membership_id` must be a + * valid RFC 1123 compliant DNS label: * 1. At most 63 characters in length * 2. It must consist of lower case alphanumeric characters or `-` * 3. It must start and end with an alphanumeric character diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.delete_membership.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.delete_membership.js index 10d0545e57c..a0a28853539 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.delete_membership.js +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.delete_membership.js @@ -47,6 +47,12 @@ function main(name) { * not supported (00000000-0000-0000-0000-000000000000). */ // const requestId = 'abc123' + /** + * Optional. If set to true, any subresource from this Membership will also be + * deleted. Otherwise, the request will only work if the Membership has no + * subresource. + */ + // const force = true // Imports the Gkehub library const {GkeHubClient} = require('@google-cloud/gke-hub').v1; diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.generate_connect_manifest.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.generate_connect_manifest.js index e3c44b19b76..2e8977a4515 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.generate_connect_manifest.js +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.generate_connect_manifest.js @@ -29,27 +29,29 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The Membership resource name the Agent will associate with, in the format - * `projects/* /locations/* /memberships/*`. + * Required. The Membership resource name the Agent will associate with, in + * the format `projects/* /locations/* /memberships/*`. */ // const name = 'abc123' /** - * Optional. Namespace for GKE Connect agent resources. Defaults to `gke-connect`. + * Optional. Namespace for GKE Connect agent resources. Defaults to + * `gke-connect`. * The Connect Agent is authorized automatically when run in the default * namespace. Otherwise, explicit authorization must be granted with an * additional IAM binding. */ // const namespace = 'abc123' /** - * Optional. URI of a proxy if connectivity from the agent to gkeconnect.googleapis.com - * requires the use of a proxy. Format must be in the form - * `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol + * Optional. URI of a proxy if connectivity from the agent to + * gkeconnect.googleapis.com requires the use of a proxy. Format must be in + * the form `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol * supported by the proxy. This will direct the connect agent's outbound * traffic through a HTTP(S) proxy. */ // const proxy = 'Buffer.from('string')' /** - * Optional. The Connect agent version to use. Defaults to the most current version. + * Optional. The Connect agent version to use. Defaults to the most current + * version. */ // const version = 'abc123' /** diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_memberships.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_memberships.js index 1dc36bd8135..cde7e9d0e3f 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_memberships.js +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_memberships.js @@ -29,14 +29,15 @@ function main(parent) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The parent (project and location) where the Memberships will be listed. - * Specified in the format `projects/* /locations/*`. + * Required. The parent (project and location) where the Memberships will be + * listed. Specified in the format `projects/* /locations/*`. + * `projects/* /locations/-` list memberships in all the regions. */ // const parent = 'abc123' /** - * Optional. When requesting a 'page' of resources, `page_size` specifies number of - * resources to return. If unspecified or set to 0, all resources will - * be returned. + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. */ // const pageSize = 1234 /** @@ -46,8 +47,8 @@ function main(parent) { */ // const pageToken = 'abc123' /** - * Optional. Lists Memberships that match the filter expression, following the syntax - * outlined in https://google.aip.dev/160. + * Optional. Lists Memberships that match the filter expression, following the + * syntax outlined in https://google.aip.dev/160. * Examples: * - Name is `bar` in project `foo-proj` and location `global`: * name = "projects/foo-proj/locations/global/membership/bar" diff --git a/packages/google-cloud-gkehub/samples/generated/v1/snippet_metadata.google.cloud.gkehub.v1.json b/packages/google-cloud-gkehub/samples/generated/v1/snippet_metadata.google.cloud.gkehub.v1.json index f28452467e7..d9485c854d3 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1/snippet_metadata.google.cloud.gkehub.v1.json +++ b/packages/google-cloud-gkehub/samples/generated/v1/snippet_metadata.google.cloud.gkehub.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gkehub", - "version": "3.3.0", + "version": "3.4.0", "language": "TYPESCRIPT", "apis": [ { @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 87, + "end": 88, "type": "FULL" } ], @@ -318,7 +318,7 @@ "segments": [ { "start": 25, - "end": 69, + "end": 75, "type": "FULL" } ], @@ -334,6 +334,10 @@ { "name": "request_id", "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" } ], "resultType": ".google.longrunning.Operation", @@ -514,7 +518,7 @@ "segments": [ { "start": 25, - "end": 87, + "end": 89, "type": "FULL" } ], diff --git a/packages/google-cloud-gkehub/samples/generated/v1alpha/snippet_metadata.google.cloud.gkehub.v1alpha.json b/packages/google-cloud-gkehub/samples/generated/v1alpha/snippet_metadata.google.cloud.gkehub.v1alpha.json index 11fede053ec..a405fd3c285 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1alpha/snippet_metadata.google.cloud.gkehub.v1alpha.json +++ b/packages/google-cloud-gkehub/samples/generated/v1alpha/snippet_metadata.google.cloud.gkehub.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gkehub", - "version": "3.3.0", + "version": "3.4.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-gkehub/samples/generated/v1alpha2/snippet_metadata.google.cloud.gkehub.v1alpha2.json b/packages/google-cloud-gkehub/samples/generated/v1alpha2/snippet_metadata.google.cloud.gkehub.v1alpha2.json index 001758fd8ed..6998304667d 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1alpha2/snippet_metadata.google.cloud.gkehub.v1alpha2.json +++ b/packages/google-cloud-gkehub/samples/generated/v1alpha2/snippet_metadata.google.cloud.gkehub.v1alpha2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gkehub", - "version": "3.3.0", + "version": "3.4.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-gkehub/samples/generated/v1beta/snippet_metadata.google.cloud.gkehub.v1beta.json b/packages/google-cloud-gkehub/samples/generated/v1beta/snippet_metadata.google.cloud.gkehub.v1beta.json index 75072722bb3..0b83ca25f11 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1beta/snippet_metadata.google.cloud.gkehub.v1beta.json +++ b/packages/google-cloud-gkehub/samples/generated/v1beta/snippet_metadata.google.cloud.gkehub.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gkehub", - "version": "3.3.0", + "version": "3.4.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-gkehub/samples/generated/v1beta1/gke_hub_membership_service.create_membership.js b/packages/google-cloud-gkehub/samples/generated/v1beta1/gke_hub_membership_service.create_membership.js index d6da96ba65e..eb27b631c61 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1beta1/gke_hub_membership_service.create_membership.js +++ b/packages/google-cloud-gkehub/samples/generated/v1beta1/gke_hub_membership_service.create_membership.js @@ -29,13 +29,13 @@ function main(parent, membershipId, resource) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The parent (project and location) where the Memberships will be created. - * Specified in the format `projects/* /locations/*`. + * Required. The parent (project and location) where the Memberships will be + * created. Specified in the format `projects/* /locations/*`. */ // const parent = 'abc123' /** - * Required. Client chosen ID for the membership. `membership_id` must be a valid RFC - * 1123 compliant DNS label: + * Required. Client chosen ID for the membership. `membership_id` must be a + * valid RFC 1123 compliant DNS label: * 1. At most 63 characters in length * 2. It must consist of lower case alphanumeric characters or `-` * 3. It must start and end with an alphanumeric character diff --git a/packages/google-cloud-gkehub/samples/generated/v1beta1/gke_hub_membership_service.delete_membership.js b/packages/google-cloud-gkehub/samples/generated/v1beta1/gke_hub_membership_service.delete_membership.js index bfabba6f808..b2130d83ad8 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1beta1/gke_hub_membership_service.delete_membership.js +++ b/packages/google-cloud-gkehub/samples/generated/v1beta1/gke_hub_membership_service.delete_membership.js @@ -47,6 +47,12 @@ function main(name) { * not supported (00000000-0000-0000-0000-000000000000). */ // const requestId = 'abc123' + /** + * Optional. If set to true, any subresource from this Membership will also be + * deleted. Otherwise, the request will only work if the Membership has no + * subresource. + */ + // const force = true // Imports the Gkehub library const {GkeHubMembershipServiceClient} = require('@google-cloud/gke-hub').v1beta1; diff --git a/packages/google-cloud-gkehub/samples/generated/v1beta1/gke_hub_membership_service.generate_connect_manifest.js b/packages/google-cloud-gkehub/samples/generated/v1beta1/gke_hub_membership_service.generate_connect_manifest.js index daa897476cf..8ee358f8f40 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1beta1/gke_hub_membership_service.generate_connect_manifest.js +++ b/packages/google-cloud-gkehub/samples/generated/v1beta1/gke_hub_membership_service.generate_connect_manifest.js @@ -29,8 +29,8 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The Membership resource name the Agent will associate with, in the format - * `projects/* /locations/* /memberships/*`. + * Required. The Membership resource name the Agent will associate with, in + * the format `projects/* /locations/* /memberships/*`. */ // const name = 'abc123' /** @@ -38,7 +38,8 @@ function main(name) { */ // const connectAgent = {} /** - * Optional. The Connect agent version to use. Defaults to the most current version. + * Optional. The Connect agent version to use. Defaults to the most current + * version. */ // const version = 'abc123' /** diff --git a/packages/google-cloud-gkehub/samples/generated/v1beta1/gke_hub_membership_service.list_memberships.js b/packages/google-cloud-gkehub/samples/generated/v1beta1/gke_hub_membership_service.list_memberships.js index d6ad45f47bc..12583756216 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1beta1/gke_hub_membership_service.list_memberships.js +++ b/packages/google-cloud-gkehub/samples/generated/v1beta1/gke_hub_membership_service.list_memberships.js @@ -29,14 +29,15 @@ function main(parent) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The parent (project and location) where the Memberships will be listed. - * Specified in the format `projects/* /locations/*`. + * Required. The parent (project and location) where the Memberships will be + * listed. Specified in the format `projects/* /locations/*`. + * `projects/* /locations/-` list memberships in all the regions. */ // const parent = 'abc123' /** - * Optional. When requesting a 'page' of resources, `page_size` specifies number of - * resources to return. If unspecified or set to 0, all resources will - * be returned. + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. */ // const pageSize = 1234 /** @@ -46,8 +47,8 @@ function main(parent) { */ // const pageToken = 'abc123' /** - * Optional. Lists Memberships that match the filter expression, following the syntax - * outlined in https://google.aip.dev/160. + * Optional. Lists Memberships that match the filter expression, following the + * syntax outlined in https://google.aip.dev/160. * Examples: * - Name is `bar` in project `foo-proj` and location `global`: * name = "projects/foo-proj/locations/global/membership/bar" diff --git a/packages/google-cloud-gkehub/samples/generated/v1beta1/gke_hub_membership_service.update_membership.js b/packages/google-cloud-gkehub/samples/generated/v1beta1/gke_hub_membership_service.update_membership.js index ed04753aa5c..31bdd476985 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1beta1/gke_hub_membership_service.update_membership.js +++ b/packages/google-cloud-gkehub/samples/generated/v1beta1/gke_hub_membership_service.update_membership.js @@ -34,8 +34,8 @@ function main(name, updateMask, resource) { */ // const name = 'abc123' /** - * Required. Mask of fields to update. At least one field path must be specified in this - * mask. + * Required. Mask of fields to update. At least one field path must be + * specified in this mask. */ // const updateMask = {} /** diff --git a/packages/google-cloud-gkehub/samples/generated/v1beta1/gke_hub_membership_service.validate_exclusivity.js b/packages/google-cloud-gkehub/samples/generated/v1beta1/gke_hub_membership_service.validate_exclusivity.js index f9e2a0a627d..9246cbeddb0 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1beta1/gke_hub_membership_service.validate_exclusivity.js +++ b/packages/google-cloud-gkehub/samples/generated/v1beta1/gke_hub_membership_service.validate_exclusivity.js @@ -29,18 +29,19 @@ function main(parent, intendedMembership) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The parent (project and location) where the Memberships will be created. - * Specified in the format `projects/* /locations/*`. + * Required. The parent (project and location) where the Memberships will be + * created. Specified in the format `projects/* /locations/*`. */ // const parent = 'abc123' /** - * Optional. The YAML of the membership CR in the cluster. Empty if the membership - * CR does not exist. + * Optional. The YAML of the membership CR in the cluster. Empty if the + * membership CR does not exist. */ // const crManifest = 'abc123' /** - * Required. The intended membership name under the `parent`. This method only does - * validation in anticipation of a CreateMembership call with the same name. + * Required. The intended membership name under the `parent`. This method only + * does validation in anticipation of a CreateMembership call with the same + * name. */ // const intendedMembership = 'abc123' diff --git a/packages/google-cloud-gkehub/samples/generated/v1beta1/snippet_metadata.google.cloud.gkehub.v1beta1.json b/packages/google-cloud-gkehub/samples/generated/v1beta1/snippet_metadata.google.cloud.gkehub.v1beta1.json index ccb12ad6c83..fcac001f113 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1beta1/snippet_metadata.google.cloud.gkehub.v1beta1.json +++ b/packages/google-cloud-gkehub/samples/generated/v1beta1/snippet_metadata.google.cloud.gkehub.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gkehub", - "version": "3.3.0", + "version": "3.4.0", "language": "TYPESCRIPT", "apis": [ { @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 87, + "end": 88, "type": "FULL" } ], @@ -170,7 +170,7 @@ "segments": [ { "start": 25, - "end": 69, + "end": 75, "type": "FULL" } ], @@ -186,6 +186,10 @@ { "name": "request_id", "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" } ], "resultType": ".google.longrunning.Operation", @@ -266,7 +270,7 @@ "segments": [ { "start": 25, - "end": 76, + "end": 77, "type": "FULL" } ], @@ -326,7 +330,7 @@ "segments": [ { "start": 25, - "end": 65, + "end": 66, "type": "FULL" } ], diff --git a/packages/google-cloud-gkehub/samples/package.json b/packages/google-cloud-gkehub/samples/package.json index b50055a8ca6..aedfbc989ee 100644 --- a/packages/google-cloud-gkehub/samples/package.json +++ b/packages/google-cloud-gkehub/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/gke-hub": "^3.3.2" + "@google-cloud/gke-hub": "^3.4.0" }, "devDependencies": { "c8": "^7.1.0", diff --git a/packages/google-cloud-gkehub/src/v1/gke_hub_client.ts b/packages/google-cloud-gkehub/src/v1/gke_hub_client.ts index e06e1cfe9c0..7f1f5df93c8 100644 --- a/packages/google-cloud-gkehub/src/v1/gke_hub_client.ts +++ b/packages/google-cloud-gkehub/src/v1/gke_hub_client.ts @@ -49,7 +49,10 @@ const version = require('../../../package.json').version; * * {@link google.cloud.gkehub.v1.Membership|Membership} * * {@link google.cloud.gkehub.v1.Feature|Feature} * - * GKE Hub is currently only available in the global region. + * GKE Hub is currently available in the global region and all regions in + * https://cloud.google.com/compute/docs/regions-zones. Feature is only + * available in global region while membership is global region and all the + * regions. * * **Membership management may be non-trivial:** it is recommended to use one * of the Google-provided client libraries or tools where possible when working @@ -692,22 +695,24 @@ export class GkeHubClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The Membership resource name the Agent will associate with, in the format - * `projects/* /locations/* /memberships/*`. + * Required. The Membership resource name the Agent will associate with, in + * the format `projects/* /locations/* /memberships/*`. * @param {string} [request.namespace] - * Optional. Namespace for GKE Connect agent resources. Defaults to `gke-connect`. + * Optional. Namespace for GKE Connect agent resources. Defaults to + * `gke-connect`. * * The Connect Agent is authorized automatically when run in the default * namespace. Otherwise, explicit authorization must be granted with an * additional IAM binding. * @param {Buffer} [request.proxy] - * Optional. URI of a proxy if connectivity from the agent to gkeconnect.googleapis.com - * requires the use of a proxy. Format must be in the form - * `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol + * Optional. URI of a proxy if connectivity from the agent to + * gkeconnect.googleapis.com requires the use of a proxy. Format must be in + * the form `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol * supported by the proxy. This will direct the connect agent's outbound * traffic through a HTTP(S) proxy. * @param {string} [request.version] - * Optional. The Connect agent version to use. Defaults to the most current version. + * Optional. The Connect agent version to use. Defaults to the most current + * version. * @param {boolean} [request.isUpgrade] * Optional. If true, generate the resources for upgrade only. Some resources * generated only for installation (e.g. secrets) will be excluded. @@ -815,11 +820,11 @@ export class GkeHubClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent (project and location) where the Memberships will be created. - * Specified in the format `projects/* /locations/*`. + * Required. The parent (project and location) where the Memberships will be + * created. Specified in the format `projects/* /locations/*`. * @param {string} request.membershipId - * Required. Client chosen ID for the membership. `membership_id` must be a valid RFC - * 1123 compliant DNS label: + * Required. Client chosen ID for the membership. `membership_id` must be a + * valid RFC 1123 compliant DNS label: * * 1. At most 63 characters in length * 2. It must consist of lower case alphanumeric characters or `-` @@ -1157,6 +1162,10 @@ export class GkeHubClient { * * The request ID must be a valid UUID with the exception that zero UUID is * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.force] + * Optional. If set to true, any subresource from this Membership will also be + * deleted. Otherwise, the request will only work if the Membership has no + * subresource. * @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. @@ -1779,19 +1788,20 @@ export class GkeHubClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent (project and location) where the Memberships will be listed. - * Specified in the format `projects/* /locations/*`. + * Required. The parent (project and location) where the Memberships will be + * listed. Specified in the format `projects/* /locations/*`. + * `projects/* /locations/-` list memberships in all the regions. * @param {number} [request.pageSize] - * Optional. When requesting a 'page' of resources, `page_size` specifies number of - * resources to return. If unspecified or set to 0, all resources will - * be returned. + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. * @param {string} [request.pageToken] * Optional. Token returned by previous call to `ListMemberships` which * specifies the position in the list from where to continue listing the * resources. * @param {string} [request.filter] - * Optional. Lists Memberships that match the filter expression, following the syntax - * outlined in https://google.aip.dev/160. + * Optional. Lists Memberships that match the filter expression, following the + * syntax outlined in https://google.aip.dev/160. * * Examples: * @@ -1900,19 +1910,20 @@ export class GkeHubClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent (project and location) where the Memberships will be listed. - * Specified in the format `projects/* /locations/*`. + * Required. The parent (project and location) where the Memberships will be + * listed. Specified in the format `projects/* /locations/*`. + * `projects/* /locations/-` list memberships in all the regions. * @param {number} [request.pageSize] - * Optional. When requesting a 'page' of resources, `page_size` specifies number of - * resources to return. If unspecified or set to 0, all resources will - * be returned. + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. * @param {string} [request.pageToken] * Optional. Token returned by previous call to `ListMemberships` which * specifies the position in the list from where to continue listing the * resources. * @param {string} [request.filter] - * Optional. Lists Memberships that match the filter expression, following the syntax - * outlined in https://google.aip.dev/160. + * Optional. Lists Memberships that match the filter expression, following the + * syntax outlined in https://google.aip.dev/160. * * Examples: * @@ -1975,19 +1986,20 @@ export class GkeHubClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent (project and location) where the Memberships will be listed. - * Specified in the format `projects/* /locations/*`. + * Required. The parent (project and location) where the Memberships will be + * listed. Specified in the format `projects/* /locations/*`. + * `projects/* /locations/-` list memberships in all the regions. * @param {number} [request.pageSize] - * Optional. When requesting a 'page' of resources, `page_size` specifies number of - * resources to return. If unspecified or set to 0, all resources will - * be returned. + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. * @param {string} [request.pageToken] * Optional. Token returned by previous call to `ListMemberships` which * specifies the position in the list from where to continue listing the * resources. * @param {string} [request.filter] - * Optional. Lists Memberships that match the filter expression, following the syntax - * outlined in https://google.aip.dev/160. + * Optional. Lists Memberships that match the filter expression, following the + * syntax outlined in https://google.aip.dev/160. * * Examples: * diff --git a/packages/google-cloud-gkehub/src/v1beta1/gke_hub_membership_service_client.ts b/packages/google-cloud-gkehub/src/v1beta1/gke_hub_membership_service_client.ts index b23f6357555..b0f423c7bd4 100644 --- a/packages/google-cloud-gkehub/src/v1beta1/gke_hub_membership_service_client.ts +++ b/packages/google-cloud-gkehub/src/v1beta1/gke_hub_membership_service_client.ts @@ -45,9 +45,11 @@ const version = require('../../../package.json').version; /** * The GKE Hub MembershipService handles the registration of many Kubernetes - * clusters to Google Cloud, represented with the {@link google.cloud.gkehub.v1beta1.Membership|Membership} resource. + * clusters to Google Cloud, represented with the + * {@link google.cloud.gkehub.v1beta1.Membership|Membership} resource. * - * GKE Hub is currently only available in the global region. + * GKE Hub is currently available in the global region and all regions in + * https://cloud.google.com/compute/docs/regions-zones. * * **Membership management may be non-trivial:** it is recommended to use one * of the Google-provided client libraries or tools where possible when working @@ -561,12 +563,13 @@ export class GkeHubMembershipServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The Membership resource name the Agent will associate with, in the format - * `projects/* /locations/* /memberships/*`. + * Required. The Membership resource name the Agent will associate with, in + * the format `projects/* /locations/* /memberships/*`. * @param {google.cloud.gkehub.v1beta1.ConnectAgent} [request.connectAgent] * Optional. The connect agent to generate manifest for. * @param {string} [request.version] - * Optional. The Connect agent version to use. Defaults to the most current version. + * Optional. The Connect agent version to use. Defaults to the most current + * version. * @param {boolean} [request.isUpgrade] * Optional. If true, generate the resources for upgrade only. Some resources * generated only for installation (e.g. secrets) will be excluded. @@ -676,14 +679,15 @@ export class GkeHubMembershipServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent (project and location) where the Memberships will be created. - * Specified in the format `projects/* /locations/*`. + * Required. The parent (project and location) where the Memberships will be + * created. Specified in the format `projects/* /locations/*`. * @param {string} [request.crManifest] - * Optional. The YAML of the membership CR in the cluster. Empty if the membership - * CR does not exist. + * Optional. The YAML of the membership CR in the cluster. Empty if the + * membership CR does not exist. * @param {string} request.intendedMembership - * Required. The intended membership name under the `parent`. This method only does - * validation in anticipation of a CreateMembership call with the same name. + * Required. The intended membership name under the `parent`. This method only + * does validation in anticipation of a CreateMembership call with the same + * name. * @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. @@ -906,11 +910,11 @@ export class GkeHubMembershipServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent (project and location) where the Memberships will be created. - * Specified in the format `projects/* /locations/*`. + * Required. The parent (project and location) where the Memberships will be + * created. Specified in the format `projects/* /locations/*`. * @param {string} request.membershipId - * Required. Client chosen ID for the membership. `membership_id` must be a valid RFC - * 1123 compliant DNS label: + * Required. Client chosen ID for the membership. `membership_id` must be a + * valid RFC 1123 compliant DNS label: * * 1. At most 63 characters in length * 2. It must consist of lower case alphanumeric characters or `-` @@ -1091,6 +1095,10 @@ export class GkeHubMembershipServiceClient { * * The request ID must be a valid UUID with the exception that zero UUID is * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.force] + * Optional. If set to true, any subresource from this Membership will also be + * deleted. Otherwise, the request will only work if the Membership has no + * subresource. * @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. @@ -1231,8 +1239,8 @@ export class GkeHubMembershipServiceClient { * Required. The membership resource name in the format: * `projects/[project_id]/locations/global/memberships/[membership_id]` * @param {google.protobuf.FieldMask} request.updateMask - * Required. Mask of fields to update. At least one field path must be specified in this - * mask. + * Required. Mask of fields to update. At least one field path must be + * specified in this mask. * @param {google.cloud.gkehub.v1beta1.Membership} request.resource * Required. Only fields specified in update_mask are updated. * If you specify a field in the update_mask but don't specify its value here @@ -1393,19 +1401,20 @@ export class GkeHubMembershipServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent (project and location) where the Memberships will be listed. - * Specified in the format `projects/* /locations/*`. + * Required. The parent (project and location) where the Memberships will be + * listed. Specified in the format `projects/* /locations/*`. + * `projects/* /locations/-` list memberships in all the regions. * @param {number} [request.pageSize] - * Optional. When requesting a 'page' of resources, `page_size` specifies number of - * resources to return. If unspecified or set to 0, all resources will - * be returned. + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. * @param {string} [request.pageToken] * Optional. Token returned by previous call to `ListMemberships` which * specifies the position in the list from where to continue listing the * resources. * @param {string} [request.filter] - * Optional. Lists Memberships that match the filter expression, following the syntax - * outlined in https://google.aip.dev/160. + * Optional. Lists Memberships that match the filter expression, following the + * syntax outlined in https://google.aip.dev/160. * * Examples: * @@ -1520,19 +1529,20 @@ export class GkeHubMembershipServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent (project and location) where the Memberships will be listed. - * Specified in the format `projects/* /locations/*`. + * Required. The parent (project and location) where the Memberships will be + * listed. Specified in the format `projects/* /locations/*`. + * `projects/* /locations/-` list memberships in all the regions. * @param {number} [request.pageSize] - * Optional. When requesting a 'page' of resources, `page_size` specifies number of - * resources to return. If unspecified or set to 0, all resources will - * be returned. + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. * @param {string} [request.pageToken] * Optional. Token returned by previous call to `ListMemberships` which * specifies the position in the list from where to continue listing the * resources. * @param {string} [request.filter] - * Optional. Lists Memberships that match the filter expression, following the syntax - * outlined in https://google.aip.dev/160. + * Optional. Lists Memberships that match the filter expression, following the + * syntax outlined in https://google.aip.dev/160. * * Examples: * @@ -1595,19 +1605,20 @@ export class GkeHubMembershipServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent (project and location) where the Memberships will be listed. - * Specified in the format `projects/* /locations/*`. + * Required. The parent (project and location) where the Memberships will be + * listed. Specified in the format `projects/* /locations/*`. + * `projects/* /locations/-` list memberships in all the regions. * @param {number} [request.pageSize] - * Optional. When requesting a 'page' of resources, `page_size` specifies number of - * resources to return. If unspecified or set to 0, all resources will - * be returned. + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. * @param {string} [request.pageToken] * Optional. Token returned by previous call to `ListMemberships` which * specifies the position in the list from where to continue listing the * resources. * @param {string} [request.filter] - * Optional. Lists Memberships that match the filter expression, following the syntax - * outlined in https://google.aip.dev/160. + * Optional. Lists Memberships that match the filter expression, following the + * syntax outlined in https://google.aip.dev/160. * * Examples: * diff --git a/packages/google-cloud-gkemulticloud/package.json b/packages/google-cloud-gkemulticloud/package.json index a0c39d2fe63..e8cbba02735 100644 --- a/packages/google-cloud-gkemulticloud/package.json +++ b/packages/google-cloud-gkemulticloud/package.json @@ -31,7 +31,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -39,10 +39,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -57,6 +58,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-gsuiteaddons/package.json b/packages/google-cloud-gsuiteaddons/package.json index 9048efeaf68..71ff51acb38 100644 --- a/packages/google-cloud-gsuiteaddons/package.json +++ b/packages/google-cloud-gsuiteaddons/package.json @@ -31,7 +31,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -39,10 +39,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -57,6 +58,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-iap/package.json b/packages/google-cloud-iap/package.json index 8a25b9423be..6b0f2745926 100644 --- a/packages/google-cloud-iap/package.json +++ b/packages/google-cloud-iap/package.json @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-iap" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-ids/package.json b/packages/google-cloud-ids/package.json index fa39815c6c8..80176d06bc5 100644 --- a/packages/google-cloud-ids/package.json +++ b/packages/google-cloud-ids/package.json @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-ids" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-iot/package.json b/packages/google-cloud-iot/package.json index 5f1418bdac6..0905755ab88 100644 --- a/packages/google-cloud-iot/package.json +++ b/packages/google-cloud-iot/package.json @@ -32,20 +32,20 @@ "Cloud IoT API" ], "scripts": { - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "lint": "gts check", - "docs": "jsdoc -c .jsdoc.js", - "system-test": "npm run compile && c8 mocha build/system-test", - "fix": "gts fix", - "docs-test": "linkinator docs", - "predocs-test": "npm run docs", "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -60,6 +60,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -70,5 +71,4 @@ "webpack-cli": "^5.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-iot" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-kms-inventory/package.json b/packages/google-cloud-kms-inventory/package.json index f3b99e14455..4578332c589 100644 --- a/packages/google-cloud-kms-inventory/package.json +++ b/packages/google-cloud-kms-inventory/package.json @@ -31,18 +31,18 @@ ], "scripts": { "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", - "docs-test": "linkinator docs", "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", "fix": "gts fix", "lint": "gts check", - "precompile": "gts clean", - "predocs-test": "npm run docs", - "prelint": "cd samples; npm link ../; npm install", "prepare": "npm run compile-protos && npm run compile", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "system-test": "npm run compile && c8 mocha build/system-test", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", "test": "c8 mocha build/test" }, "dependencies": { @@ -58,6 +58,7 @@ "jsdoc-fresh": "^2.0.1", "jsdoc-region-tag": "^2.0.1", "linkinator": "^4.1.2", + "long": "^5.2.3", "mocha": "^10.2.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -71,5 +72,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-kms-inventory" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-kms/CHANGELOG.md b/packages/google-cloud-kms/CHANGELOG.md index 2b38b014573..cbfcffeb3ec 100644 --- a/packages/google-cloud-kms/CHANGELOG.md +++ b/packages/google-cloud-kms/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/kms?activeTab=versions +## [3.6.0](https://github.com/googleapis/google-cloud-node/compare/kms-v3.5.1...kms-v3.6.0) (2023-05-20) + + +### Features + +* [kms] added VerifyConnectivity RPC ([#4274](https://github.com/googleapis/google-cloud-node/issues/4274)) ([bf56319](https://github.com/googleapis/google-cloud-node/commit/bf5631932cd0f2f52c23caaba235b04222a1a609)) + ## [3.5.1](https://github.com/googleapis/google-cloud-node/compare/kms-v3.5.0...kms-v3.5.1) (2023-04-13) diff --git a/packages/google-cloud-kms/README.md b/packages/google-cloud-kms/README.md index bbc177b40bc..60ae79116d5 100644 --- a/packages/google-cloud-kms/README.md +++ b/packages/google-cloud-kms/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Google Cloud Key Management Service: Node.js Client](https://github.com/googleapis/google-cloud-node) +# [Google Cloud Key Management Service: Node.js Client](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-kms) [![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/kms.svg)](https://www.npmjs.org/package/@google-cloud/kms) @@ -92,44 +92,44 @@ return listKeyRings(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-kms/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Ekm_service.create_ekm_connection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/ekm_service.create_ekm_connection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/ekm_service.create_ekm_connection.js,samples/README.md) | -| Ekm_service.get_ekm_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/ekm_service.get_ekm_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/ekm_service.get_ekm_config.js,samples/README.md) | -| Ekm_service.get_ekm_connection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/ekm_service.get_ekm_connection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/ekm_service.get_ekm_connection.js,samples/README.md) | -| Ekm_service.list_ekm_connections | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/ekm_service.list_ekm_connections.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/ekm_service.list_ekm_connections.js,samples/README.md) | -| Ekm_service.update_ekm_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/ekm_service.update_ekm_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/ekm_service.update_ekm_config.js,samples/README.md) | -| Ekm_service.update_ekm_connection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/ekm_service.update_ekm_connection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/ekm_service.update_ekm_connection.js,samples/README.md) | -| Key_management_service.asymmetric_decrypt | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.asymmetric_decrypt.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.asymmetric_decrypt.js,samples/README.md) | -| Key_management_service.asymmetric_sign | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.asymmetric_sign.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.asymmetric_sign.js,samples/README.md) | -| Key_management_service.create_crypto_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.create_crypto_key.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.create_crypto_key.js,samples/README.md) | -| Key_management_service.create_crypto_key_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.create_crypto_key_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.create_crypto_key_version.js,samples/README.md) | -| Key_management_service.create_import_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.create_import_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.create_import_job.js,samples/README.md) | -| Key_management_service.create_key_ring | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.create_key_ring.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.create_key_ring.js,samples/README.md) | -| Key_management_service.decrypt | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.decrypt.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.decrypt.js,samples/README.md) | -| Key_management_service.destroy_crypto_key_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.destroy_crypto_key_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.destroy_crypto_key_version.js,samples/README.md) | -| Key_management_service.encrypt | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.encrypt.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.encrypt.js,samples/README.md) | -| Key_management_service.generate_random_bytes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.generate_random_bytes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.generate_random_bytes.js,samples/README.md) | -| Key_management_service.get_crypto_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_crypto_key.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.get_crypto_key.js,samples/README.md) | -| Key_management_service.get_crypto_key_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_crypto_key_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.get_crypto_key_version.js,samples/README.md) | -| Key_management_service.get_import_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_import_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.get_import_job.js,samples/README.md) | -| Key_management_service.get_key_ring | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_key_ring.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.get_key_ring.js,samples/README.md) | -| Key_management_service.get_public_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_public_key.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.get_public_key.js,samples/README.md) | -| Key_management_service.import_crypto_key_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.import_crypto_key_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.import_crypto_key_version.js,samples/README.md) | -| Key_management_service.list_crypto_key_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.list_crypto_key_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.list_crypto_key_versions.js,samples/README.md) | -| Key_management_service.list_crypto_keys | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.list_crypto_keys.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.list_crypto_keys.js,samples/README.md) | -| Key_management_service.list_import_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.list_import_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.list_import_jobs.js,samples/README.md) | -| Key_management_service.list_key_rings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.list_key_rings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.list_key_rings.js,samples/README.md) | -| Key_management_service.mac_sign | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.mac_sign.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.mac_sign.js,samples/README.md) | -| Key_management_service.mac_verify | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.mac_verify.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.mac_verify.js,samples/README.md) | -| Key_management_service.restore_crypto_key_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.restore_crypto_key_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.restore_crypto_key_version.js,samples/README.md) | -| Key_management_service.update_crypto_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.update_crypto_key.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.update_crypto_key.js,samples/README.md) | -| Key_management_service.update_crypto_key_primary_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.update_crypto_key_primary_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.update_crypto_key_primary_version.js,samples/README.md) | -| Key_management_service.update_crypto_key_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.update_crypto_key_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.update_crypto_key_version.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/quickstart.js,samples/README.md) | -| Quickstart.test | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/test/quickstart.test.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/test/quickstart.test.js,samples/README.md) | +| Ekm_service.create_ekm_connection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/ekm_service.create_ekm_connection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/ekm_service.create_ekm_connection.js,packages/google-cloud-kms/samples/README.md) | +| Ekm_service.get_ekm_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/ekm_service.get_ekm_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/ekm_service.get_ekm_config.js,packages/google-cloud-kms/samples/README.md) | +| Ekm_service.get_ekm_connection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/ekm_service.get_ekm_connection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/ekm_service.get_ekm_connection.js,packages/google-cloud-kms/samples/README.md) | +| Ekm_service.list_ekm_connections | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/ekm_service.list_ekm_connections.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/ekm_service.list_ekm_connections.js,packages/google-cloud-kms/samples/README.md) | +| Ekm_service.update_ekm_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/ekm_service.update_ekm_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/ekm_service.update_ekm_config.js,packages/google-cloud-kms/samples/README.md) | +| Ekm_service.update_ekm_connection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/ekm_service.update_ekm_connection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/ekm_service.update_ekm_connection.js,packages/google-cloud-kms/samples/README.md) | +| Ekm_service.verify_connectivity | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/ekm_service.verify_connectivity.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/ekm_service.verify_connectivity.js,packages/google-cloud-kms/samples/README.md) | +| Key_management_service.asymmetric_decrypt | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.asymmetric_decrypt.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.asymmetric_decrypt.js,packages/google-cloud-kms/samples/README.md) | +| Key_management_service.asymmetric_sign | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.asymmetric_sign.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.asymmetric_sign.js,packages/google-cloud-kms/samples/README.md) | +| Key_management_service.create_crypto_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.create_crypto_key.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.create_crypto_key.js,packages/google-cloud-kms/samples/README.md) | +| Key_management_service.create_crypto_key_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.create_crypto_key_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.create_crypto_key_version.js,packages/google-cloud-kms/samples/README.md) | +| Key_management_service.create_import_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.create_import_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.create_import_job.js,packages/google-cloud-kms/samples/README.md) | +| Key_management_service.create_key_ring | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.create_key_ring.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.create_key_ring.js,packages/google-cloud-kms/samples/README.md) | +| Key_management_service.decrypt | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.decrypt.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.decrypt.js,packages/google-cloud-kms/samples/README.md) | +| Key_management_service.destroy_crypto_key_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.destroy_crypto_key_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.destroy_crypto_key_version.js,packages/google-cloud-kms/samples/README.md) | +| Key_management_service.encrypt | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.encrypt.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.encrypt.js,packages/google-cloud-kms/samples/README.md) | +| Key_management_service.generate_random_bytes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.generate_random_bytes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.generate_random_bytes.js,packages/google-cloud-kms/samples/README.md) | +| Key_management_service.get_crypto_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_crypto_key.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.get_crypto_key.js,packages/google-cloud-kms/samples/README.md) | +| Key_management_service.get_crypto_key_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_crypto_key_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.get_crypto_key_version.js,packages/google-cloud-kms/samples/README.md) | +| Key_management_service.get_import_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_import_job.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.get_import_job.js,packages/google-cloud-kms/samples/README.md) | +| Key_management_service.get_key_ring | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_key_ring.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.get_key_ring.js,packages/google-cloud-kms/samples/README.md) | +| Key_management_service.get_public_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.get_public_key.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.get_public_key.js,packages/google-cloud-kms/samples/README.md) | +| Key_management_service.import_crypto_key_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.import_crypto_key_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.import_crypto_key_version.js,packages/google-cloud-kms/samples/README.md) | +| Key_management_service.list_crypto_key_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.list_crypto_key_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.list_crypto_key_versions.js,packages/google-cloud-kms/samples/README.md) | +| Key_management_service.list_crypto_keys | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.list_crypto_keys.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.list_crypto_keys.js,packages/google-cloud-kms/samples/README.md) | +| Key_management_service.list_import_jobs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.list_import_jobs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.list_import_jobs.js,packages/google-cloud-kms/samples/README.md) | +| Key_management_service.list_key_rings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.list_key_rings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.list_key_rings.js,packages/google-cloud-kms/samples/README.md) | +| Key_management_service.mac_sign | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.mac_sign.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.mac_sign.js,packages/google-cloud-kms/samples/README.md) | +| Key_management_service.mac_verify | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.mac_verify.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.mac_verify.js,packages/google-cloud-kms/samples/README.md) | +| Key_management_service.restore_crypto_key_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.restore_crypto_key_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.restore_crypto_key_version.js,packages/google-cloud-kms/samples/README.md) | +| Key_management_service.update_crypto_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.update_crypto_key.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.update_crypto_key.js,packages/google-cloud-kms/samples/README.md) | +| Key_management_service.update_crypto_key_primary_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.update_crypto_key_primary_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.update_crypto_key_primary_version.js,packages/google-cloud-kms/samples/README.md) | +| Key_management_service.update_crypto_key_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.update_crypto_key_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/key_management_service.update_crypto_key_version.js,packages/google-cloud-kms/samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/quickstart.js,packages/google-cloud-kms/samples/README.md) | diff --git a/packages/google-cloud-kms/package.json b/packages/google-cloud-kms/package.json index 55ab32a073c..ac0a3fc5ea4 100644 --- a/packages/google-cloud-kms/package.json +++ b/packages/google-cloud-kms/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/kms", "description": "Google Cloud Key Management Service (KMS) API client for Node.js", - "version": "3.5.1", + "version": "3.6.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { @@ -33,18 +33,18 @@ ], "scripts": { "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", - "docs-test": "linkinator docs", "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", "fix": "gts fix", "lint": "gts check", - "precompile": "gts clean", - "predocs-test": "npm run docs", - "prelint": "cd samples; npm link ../; npm install", "prepare": "npm run compile-protos && npm run compile", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "system-test": "npm run compile && c8 mocha build/system-test", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", "test": "c8 mocha build/test" }, "dependencies": { @@ -60,6 +60,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -70,5 +71,4 @@ "webpack-cli": "^5.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-kms" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-kms/protos/google/cloud/kms/v1/ekm_service.proto b/packages/google-cloud-kms/protos/google/cloud/kms/v1/ekm_service.proto index b63b55ec72e..51e2fceecc8 100644 --- a/packages/google-cloud-kms/protos/google/cloud/kms/v1/ekm_service.proto +++ b/packages/google-cloud-kms/protos/google/cloud/kms/v1/ekm_service.proto @@ -102,6 +102,19 @@ service EkmService { }; option (google.api.method_signature) = "ekm_config,update_mask"; } + + // Verifies that Cloud KMS can successfully connect to the external key + // manager specified by an [EkmConnection][google.cloud.kms.v1.EkmConnection]. + // If there is an error connecting to the EKM, this method returns a + // FAILED_PRECONDITION status containing structured information as described + // at https://cloud.google.com/kms/docs/reference/ekm_errors. + rpc VerifyConnectivity(VerifyConnectivityRequest) + returns (VerifyConnectivityResponse) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/ekmConnections/*}:verifyConnectivity" + }; + option (google.api.method_signature) = "name"; + } } // Request message for @@ -419,3 +432,20 @@ message EkmConfig { } ]; } + +// Request message for +// [EkmService.VerifyConnectivity][google.cloud.kms.v1.EkmService.VerifyConnectivity]. +message VerifyConnectivityRequest { + // Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the + // [EkmConnection][google.cloud.kms.v1.EkmConnection] to verify. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudkms.googleapis.com/EkmConnection" + } + ]; +} + +// Response message for +// [EkmService.VerifyConnectivity][google.cloud.kms.v1.EkmService.VerifyConnectivity]. +message VerifyConnectivityResponse {} \ No newline at end of file diff --git a/packages/google-cloud-kms/protos/protos.d.ts b/packages/google-cloud-kms/protos/protos.d.ts index 949eeb93678..8960a333faf 100644 --- a/packages/google-cloud-kms/protos/protos.d.ts +++ b/packages/google-cloud-kms/protos/protos.d.ts @@ -129,6 +129,20 @@ export namespace google { * @returns Promise */ public updateEkmConfig(request: google.cloud.kms.v1.IUpdateEkmConfigRequest): Promise; + + /** + * Calls VerifyConnectivity. + * @param request VerifyConnectivityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and VerifyConnectivityResponse + */ + public verifyConnectivity(request: google.cloud.kms.v1.IVerifyConnectivityRequest, callback: google.cloud.kms.v1.EkmService.VerifyConnectivityCallback): void; + + /** + * Calls VerifyConnectivity. + * @param request VerifyConnectivityRequest message or plain object + * @returns Promise + */ + public verifyConnectivity(request: google.cloud.kms.v1.IVerifyConnectivityRequest): Promise; } namespace EkmService { @@ -174,6 +188,13 @@ export namespace google { * @param [response] EkmConfig */ type UpdateEkmConfigCallback = (error: (Error|null), response?: google.cloud.kms.v1.EkmConfig) => void; + + /** + * Callback as used by {@link google.cloud.kms.v1.EkmService|verifyConnectivity}. + * @param error Error, if any + * @param [response] VerifyConnectivityResponse + */ + type VerifyConnectivityCallback = (error: (Error|null), response?: google.cloud.kms.v1.VerifyConnectivityResponse) => void; } /** Properties of a ListEkmConnectionsRequest. */ @@ -1415,6 +1436,194 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a VerifyConnectivityRequest. */ + interface IVerifyConnectivityRequest { + + /** VerifyConnectivityRequest name */ + name?: (string|null); + } + + /** Represents a VerifyConnectivityRequest. */ + class VerifyConnectivityRequest implements IVerifyConnectivityRequest { + + /** + * Constructs a new VerifyConnectivityRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.kms.v1.IVerifyConnectivityRequest); + + /** VerifyConnectivityRequest name. */ + public name: string; + + /** + * Creates a new VerifyConnectivityRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns VerifyConnectivityRequest instance + */ + public static create(properties?: google.cloud.kms.v1.IVerifyConnectivityRequest): google.cloud.kms.v1.VerifyConnectivityRequest; + + /** + * Encodes the specified VerifyConnectivityRequest message. Does not implicitly {@link google.cloud.kms.v1.VerifyConnectivityRequest.verify|verify} messages. + * @param message VerifyConnectivityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.kms.v1.IVerifyConnectivityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VerifyConnectivityRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.VerifyConnectivityRequest.verify|verify} messages. + * @param message VerifyConnectivityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.kms.v1.IVerifyConnectivityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VerifyConnectivityRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VerifyConnectivityRequest + * @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.kms.v1.VerifyConnectivityRequest; + + /** + * Decodes a VerifyConnectivityRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VerifyConnectivityRequest + * @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.kms.v1.VerifyConnectivityRequest; + + /** + * Verifies a VerifyConnectivityRequest 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 VerifyConnectivityRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VerifyConnectivityRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.VerifyConnectivityRequest; + + /** + * Creates a plain object from a VerifyConnectivityRequest message. Also converts values to other types if specified. + * @param message VerifyConnectivityRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.kms.v1.VerifyConnectivityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VerifyConnectivityRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VerifyConnectivityRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VerifyConnectivityResponse. */ + interface IVerifyConnectivityResponse { + } + + /** Represents a VerifyConnectivityResponse. */ + class VerifyConnectivityResponse implements IVerifyConnectivityResponse { + + /** + * Constructs a new VerifyConnectivityResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.kms.v1.IVerifyConnectivityResponse); + + /** + * Creates a new VerifyConnectivityResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns VerifyConnectivityResponse instance + */ + public static create(properties?: google.cloud.kms.v1.IVerifyConnectivityResponse): google.cloud.kms.v1.VerifyConnectivityResponse; + + /** + * Encodes the specified VerifyConnectivityResponse message. Does not implicitly {@link google.cloud.kms.v1.VerifyConnectivityResponse.verify|verify} messages. + * @param message VerifyConnectivityResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.kms.v1.IVerifyConnectivityResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VerifyConnectivityResponse message, length delimited. Does not implicitly {@link google.cloud.kms.v1.VerifyConnectivityResponse.verify|verify} messages. + * @param message VerifyConnectivityResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.kms.v1.IVerifyConnectivityResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VerifyConnectivityResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VerifyConnectivityResponse + * @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.kms.v1.VerifyConnectivityResponse; + + /** + * Decodes a VerifyConnectivityResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VerifyConnectivityResponse + * @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.kms.v1.VerifyConnectivityResponse; + + /** + * Verifies a VerifyConnectivityResponse 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 VerifyConnectivityResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VerifyConnectivityResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.kms.v1.VerifyConnectivityResponse; + + /** + * Creates a plain object from a VerifyConnectivityResponse message. Also converts values to other types if specified. + * @param message VerifyConnectivityResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.kms.v1.VerifyConnectivityResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VerifyConnectivityResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VerifyConnectivityResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a KeyRing. */ interface IKeyRing { diff --git a/packages/google-cloud-kms/protos/protos.js b/packages/google-cloud-kms/protos/protos.js index da1e3741c07..edef078f928 100644 --- a/packages/google-cloud-kms/protos/protos.js +++ b/packages/google-cloud-kms/protos/protos.js @@ -296,6 +296,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.kms.v1.EkmService|verifyConnectivity}. + * @memberof google.cloud.kms.v1.EkmService + * @typedef VerifyConnectivityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.kms.v1.VerifyConnectivityResponse} [response] VerifyConnectivityResponse + */ + + /** + * Calls VerifyConnectivity. + * @function verifyConnectivity + * @memberof google.cloud.kms.v1.EkmService + * @instance + * @param {google.cloud.kms.v1.IVerifyConnectivityRequest} request VerifyConnectivityRequest message or plain object + * @param {google.cloud.kms.v1.EkmService.VerifyConnectivityCallback} callback Node-style callback called with the error, if any, and VerifyConnectivityResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(EkmService.prototype.verifyConnectivity = function verifyConnectivity(request, callback) { + return this.rpcCall(verifyConnectivity, $root.google.cloud.kms.v1.VerifyConnectivityRequest, $root.google.cloud.kms.v1.VerifyConnectivityResponse, request, callback); + }, "name", { value: "VerifyConnectivity" }); + + /** + * Calls VerifyConnectivity. + * @function verifyConnectivity + * @memberof google.cloud.kms.v1.EkmService + * @instance + * @param {google.cloud.kms.v1.IVerifyConnectivityRequest} request VerifyConnectivityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return EkmService; })(); @@ -3334,6 +3367,384 @@ return EkmConfig; })(); + v1.VerifyConnectivityRequest = (function() { + + /** + * Properties of a VerifyConnectivityRequest. + * @memberof google.cloud.kms.v1 + * @interface IVerifyConnectivityRequest + * @property {string|null} [name] VerifyConnectivityRequest name + */ + + /** + * Constructs a new VerifyConnectivityRequest. + * @memberof google.cloud.kms.v1 + * @classdesc Represents a VerifyConnectivityRequest. + * @implements IVerifyConnectivityRequest + * @constructor + * @param {google.cloud.kms.v1.IVerifyConnectivityRequest=} [properties] Properties to set + */ + function VerifyConnectivityRequest(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]]; + } + + /** + * VerifyConnectivityRequest name. + * @member {string} name + * @memberof google.cloud.kms.v1.VerifyConnectivityRequest + * @instance + */ + VerifyConnectivityRequest.prototype.name = ""; + + /** + * Creates a new VerifyConnectivityRequest instance using the specified properties. + * @function create + * @memberof google.cloud.kms.v1.VerifyConnectivityRequest + * @static + * @param {google.cloud.kms.v1.IVerifyConnectivityRequest=} [properties] Properties to set + * @returns {google.cloud.kms.v1.VerifyConnectivityRequest} VerifyConnectivityRequest instance + */ + VerifyConnectivityRequest.create = function create(properties) { + return new VerifyConnectivityRequest(properties); + }; + + /** + * Encodes the specified VerifyConnectivityRequest message. Does not implicitly {@link google.cloud.kms.v1.VerifyConnectivityRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.kms.v1.VerifyConnectivityRequest + * @static + * @param {google.cloud.kms.v1.IVerifyConnectivityRequest} message VerifyConnectivityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerifyConnectivityRequest.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 VerifyConnectivityRequest message, length delimited. Does not implicitly {@link google.cloud.kms.v1.VerifyConnectivityRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.kms.v1.VerifyConnectivityRequest + * @static + * @param {google.cloud.kms.v1.IVerifyConnectivityRequest} message VerifyConnectivityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerifyConnectivityRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VerifyConnectivityRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.kms.v1.VerifyConnectivityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.kms.v1.VerifyConnectivityRequest} VerifyConnectivityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifyConnectivityRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.VerifyConnectivityRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VerifyConnectivityRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.kms.v1.VerifyConnectivityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.kms.v1.VerifyConnectivityRequest} VerifyConnectivityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifyConnectivityRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VerifyConnectivityRequest message. + * @function verify + * @memberof google.cloud.kms.v1.VerifyConnectivityRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VerifyConnectivityRequest.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 VerifyConnectivityRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.kms.v1.VerifyConnectivityRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.kms.v1.VerifyConnectivityRequest} VerifyConnectivityRequest + */ + VerifyConnectivityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.kms.v1.VerifyConnectivityRequest) + return object; + var message = new $root.google.cloud.kms.v1.VerifyConnectivityRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a VerifyConnectivityRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.kms.v1.VerifyConnectivityRequest + * @static + * @param {google.cloud.kms.v1.VerifyConnectivityRequest} message VerifyConnectivityRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VerifyConnectivityRequest.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 VerifyConnectivityRequest to JSON. + * @function toJSON + * @memberof google.cloud.kms.v1.VerifyConnectivityRequest + * @instance + * @returns {Object.} JSON object + */ + VerifyConnectivityRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VerifyConnectivityRequest + * @function getTypeUrl + * @memberof google.cloud.kms.v1.VerifyConnectivityRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VerifyConnectivityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.kms.v1.VerifyConnectivityRequest"; + }; + + return VerifyConnectivityRequest; + })(); + + v1.VerifyConnectivityResponse = (function() { + + /** + * Properties of a VerifyConnectivityResponse. + * @memberof google.cloud.kms.v1 + * @interface IVerifyConnectivityResponse + */ + + /** + * Constructs a new VerifyConnectivityResponse. + * @memberof google.cloud.kms.v1 + * @classdesc Represents a VerifyConnectivityResponse. + * @implements IVerifyConnectivityResponse + * @constructor + * @param {google.cloud.kms.v1.IVerifyConnectivityResponse=} [properties] Properties to set + */ + function VerifyConnectivityResponse(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]]; + } + + /** + * Creates a new VerifyConnectivityResponse instance using the specified properties. + * @function create + * @memberof google.cloud.kms.v1.VerifyConnectivityResponse + * @static + * @param {google.cloud.kms.v1.IVerifyConnectivityResponse=} [properties] Properties to set + * @returns {google.cloud.kms.v1.VerifyConnectivityResponse} VerifyConnectivityResponse instance + */ + VerifyConnectivityResponse.create = function create(properties) { + return new VerifyConnectivityResponse(properties); + }; + + /** + * Encodes the specified VerifyConnectivityResponse message. Does not implicitly {@link google.cloud.kms.v1.VerifyConnectivityResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.kms.v1.VerifyConnectivityResponse + * @static + * @param {google.cloud.kms.v1.IVerifyConnectivityResponse} message VerifyConnectivityResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerifyConnectivityResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified VerifyConnectivityResponse message, length delimited. Does not implicitly {@link google.cloud.kms.v1.VerifyConnectivityResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.kms.v1.VerifyConnectivityResponse + * @static + * @param {google.cloud.kms.v1.IVerifyConnectivityResponse} message VerifyConnectivityResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VerifyConnectivityResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VerifyConnectivityResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.kms.v1.VerifyConnectivityResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.kms.v1.VerifyConnectivityResponse} VerifyConnectivityResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifyConnectivityResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.kms.v1.VerifyConnectivityResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VerifyConnectivityResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.kms.v1.VerifyConnectivityResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.kms.v1.VerifyConnectivityResponse} VerifyConnectivityResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VerifyConnectivityResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VerifyConnectivityResponse message. + * @function verify + * @memberof google.cloud.kms.v1.VerifyConnectivityResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VerifyConnectivityResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a VerifyConnectivityResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.kms.v1.VerifyConnectivityResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.kms.v1.VerifyConnectivityResponse} VerifyConnectivityResponse + */ + VerifyConnectivityResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.kms.v1.VerifyConnectivityResponse) + return object; + return new $root.google.cloud.kms.v1.VerifyConnectivityResponse(); + }; + + /** + * Creates a plain object from a VerifyConnectivityResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.kms.v1.VerifyConnectivityResponse + * @static + * @param {google.cloud.kms.v1.VerifyConnectivityResponse} message VerifyConnectivityResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VerifyConnectivityResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this VerifyConnectivityResponse to JSON. + * @function toJSON + * @memberof google.cloud.kms.v1.VerifyConnectivityResponse + * @instance + * @returns {Object.} JSON object + */ + VerifyConnectivityResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VerifyConnectivityResponse + * @function getTypeUrl + * @memberof google.cloud.kms.v1.VerifyConnectivityResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VerifyConnectivityResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.kms.v1.VerifyConnectivityResponse"; + }; + + return VerifyConnectivityResponse; + })(); + v1.KeyRing = (function() { /** diff --git a/packages/google-cloud-kms/protos/protos.json b/packages/google-cloud-kms/protos/protos.json index ab899061bd4..a879672c3d3 100644 --- a/packages/google-cloud-kms/protos/protos.json +++ b/packages/google-cloud-kms/protos/protos.json @@ -138,6 +138,24 @@ "(google.api.method_signature)": "ekm_config,update_mask" } ] + }, + "VerifyConnectivity": { + "requestType": "VerifyConnectivityRequest", + "responseType": "VerifyConnectivityResponse", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/ekmConnections/*}:verifyConnectivity", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/ekmConnections/*}:verifyConnectivity" + } + }, + { + "(google.api.method_signature)": "name" + } + ] } } }, @@ -466,6 +484,21 @@ } } }, + "VerifyConnectivityRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudkms.googleapis.com/EkmConnection" + } + } + } + }, + "VerifyConnectivityResponse": { + "fields": {} + }, "KeyRing": { "options": { "(google.api.resource).type": "cloudkms.googleapis.com/KeyRing", diff --git a/packages/google-cloud-kms/samples/README.md b/packages/google-cloud-kms/samples/README.md index 15aadb58ca4..2defd54272e 100644 --- a/packages/google-cloud-kms/samples/README.md +++ b/packages/google-cloud-kms/samples/README.md @@ -18,6 +18,7 @@ * [Ekm_service.list_ekm_connections](#ekm_service.list_ekm_connections) * [Ekm_service.update_ekm_config](#ekm_service.update_ekm_config) * [Ekm_service.update_ekm_connection](#ekm_service.update_ekm_connection) + * [Ekm_service.verify_connectivity](#ekm_service.verify_connectivity) * [Key_management_service.asymmetric_decrypt](#key_management_service.asymmetric_decrypt) * [Key_management_service.asymmetric_sign](#key_management_service.asymmetric_sign) * [Key_management_service.create_crypto_key](#key_management_service.create_crypto_key) @@ -45,7 +46,6 @@ * [Key_management_service.update_crypto_key_primary_version](#key_management_service.update_crypto_key_primary_version) * [Key_management_service.update_crypto_key_version](#key_management_service.update_crypto_key_version) * [Quickstart](#quickstart) - * [Quickstart.test](#quickstart.test) ## Before you begin @@ -164,6 +164,23 @@ __Usage:__ +### Ekm_service.verify_connectivity + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/ekm_service.verify_connectivity.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/generated/v1/ekm_service.verify_connectivity.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-kms/samples/generated/v1/ekm_service.verify_connectivity.js` + + +----- + + + + ### Key_management_service.asymmetric_decrypt View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/generated/v1/key_management_service.asymmetric_decrypt.js). @@ -618,23 +635,6 @@ __Usage:__ `node packages/google-cloud-kms/samples/quickstart.js` ------ - - - - -### Quickstart.test - -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-kms/samples/test/quickstart.test.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-kms/samples/test/quickstart.test.js,samples/README.md) - -__Usage:__ - - -`node packages/google-cloud-kms/samples/test/quickstart.test.js` - - diff --git a/packages/google-cloud-kms/samples/generated/v1/ekm_service.verify_connectivity.js b/packages/google-cloud-kms/samples/generated/v1/ekm_service.verify_connectivity.js new file mode 100644 index 00000000000..84e5eeaa873 --- /dev/null +++ b/packages/google-cloud-kms/samples/generated/v1/ekm_service.verify_connectivity.js @@ -0,0 +1,62 @@ +// Copyright 2023 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 cloudkms_v1_generated_EkmService_VerifyConnectivity_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 google.cloud.kms.v1.EkmConnection.name of the + * EkmConnection google.cloud.kms.v1.EkmConnection to verify. + */ + // const name = 'abc123' + + // Imports the Kms library + const {EkmServiceClient} = require('@google-cloud/kms').v1; + + // Instantiates a client + const kmsClient = new EkmServiceClient(); + + async function callVerifyConnectivity() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await kmsClient.verifyConnectivity(request); + console.log(response); + } + + callVerifyConnectivity(); + // [END cloudkms_v1_generated_EkmService_VerifyConnectivity_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-kms/samples/generated/v1/snippet_metadata.google.cloud.kms.v1.json b/packages/google-cloud-kms/samples/generated/v1/snippet_metadata.google.cloud.kms.v1.json index 38fa7fdd3bd..8e8f2fc6df9 100644 --- a/packages/google-cloud-kms/samples/generated/v1/snippet_metadata.google.cloud.kms.v1.json +++ b/packages/google-cloud-kms/samples/generated/v1/snippet_metadata.google.cloud.kms.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-kms", - "version": "3.5.0", + "version": "3.6.0", "language": "TYPESCRIPT", "apis": [ { @@ -283,6 +283,46 @@ } } }, + { + "regionTag": "cloudkms_v1_generated_EkmService_VerifyConnectivity_async", + "title": "EkmService verifyConnectivity Sample", + "origin": "API_DEFINITION", + "description": " Verifies that Cloud KMS can successfully connect to the external key manager specified by an [EkmConnection][google.cloud.kms.v1.EkmConnection]. If there is an error connecting to the EKM, this method returns a FAILED_PRECONDITION status containing structured information as described at https://cloud.google.com/kms/docs/reference/ekm_errors.", + "canonical": true, + "file": "ekm_service.verify_connectivity.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "VerifyConnectivity", + "fullName": "google.cloud.kms.v1.EkmService.VerifyConnectivity", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.kms.v1.VerifyConnectivityResponse", + "client": { + "shortName": "EkmServiceClient", + "fullName": "google.cloud.kms.v1.EkmServiceClient" + }, + "method": { + "shortName": "VerifyConnectivity", + "fullName": "google.cloud.kms.v1.EkmService.VerifyConnectivity", + "service": { + "shortName": "EkmService", + "fullName": "google.cloud.kms.v1.EkmService" + } + } + } + }, { "regionTag": "cloudkms_v1_generated_KeyManagementService_ListKeyRings_async", "title": "EkmService listKeyRings Sample", diff --git a/packages/google-cloud-kms/samples/package.json b/packages/google-cloud-kms/samples/package.json index 8809eed3f3e..b60e237d7b1 100644 --- a/packages/google-cloud-kms/samples/package.json +++ b/packages/google-cloud-kms/samples/package.json @@ -14,7 +14,7 @@ "test": "c8 mocha --recursive test/ --timeout=800000" }, "dependencies": { - "@google-cloud/kms": "^3.5.1", + "@google-cloud/kms": "^3.6.0", "fast-crc32c": "^2.0.0", "jslint": "^0.12.1" }, diff --git a/packages/google-cloud-kms/src/v1/ekm_service_client.ts b/packages/google-cloud-kms/src/v1/ekm_service_client.ts index 6301a34a7b1..a3388519067 100644 --- a/packages/google-cloud-kms/src/v1/ekm_service_client.ts +++ b/packages/google-cloud-kms/src/v1/ekm_service_client.ts @@ -287,6 +287,7 @@ export class EkmServiceClient { 'updateEkmConnection', 'getEkmConfig', 'updateEkmConfig', + 'verifyConnectivity', ]; for (const methodName of ekmServiceStubMethods) { const callPromise = this.ekmServiceStub.then( @@ -813,6 +814,96 @@ export class EkmServiceClient { this.initialize(); return this.innerApiCalls.updateEkmConfig(request, options, callback); } + /** + * Verifies that Cloud KMS can successfully connect to the external key + * manager specified by an {@link google.cloud.kms.v1.EkmConnection|EkmConnection}. + * If there is an error connecting to the EKM, this method returns a + * FAILED_PRECONDITION status containing structured information as described + * at https://cloud.google.com/kms/docs/reference/ekm_errors. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The {@link google.cloud.kms.v1.EkmConnection.name|name} of the + * {@link google.cloud.kms.v1.EkmConnection|EkmConnection} to verify. + * @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 google.cloud.kms.v1.VerifyConnectivityResponse | VerifyConnectivityResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/ekm_service.verify_connectivity.js + * region_tag:cloudkms_v1_generated_EkmService_VerifyConnectivity_async + */ + verifyConnectivity( + request?: protos.google.cloud.kms.v1.IVerifyConnectivityRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.kms.v1.IVerifyConnectivityResponse, + protos.google.cloud.kms.v1.IVerifyConnectivityRequest | undefined, + {} | undefined + ] + >; + verifyConnectivity( + request: protos.google.cloud.kms.v1.IVerifyConnectivityRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.kms.v1.IVerifyConnectivityResponse, + protos.google.cloud.kms.v1.IVerifyConnectivityRequest | null | undefined, + {} | null | undefined + > + ): void; + verifyConnectivity( + request: protos.google.cloud.kms.v1.IVerifyConnectivityRequest, + callback: Callback< + protos.google.cloud.kms.v1.IVerifyConnectivityResponse, + protos.google.cloud.kms.v1.IVerifyConnectivityRequest | null | undefined, + {} | null | undefined + > + ): void; + verifyConnectivity( + request?: protos.google.cloud.kms.v1.IVerifyConnectivityRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.kms.v1.IVerifyConnectivityResponse, + | protos.google.cloud.kms.v1.IVerifyConnectivityRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.kms.v1.IVerifyConnectivityResponse, + protos.google.cloud.kms.v1.IVerifyConnectivityRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.kms.v1.IVerifyConnectivityResponse, + protos.google.cloud.kms.v1.IVerifyConnectivityRequest | 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(); + return this.innerApiCalls.verifyConnectivity(request, options, callback); + } /** * Lists {@link google.cloud.kms.v1.EkmConnection|EkmConnections}. diff --git a/packages/google-cloud-kms/src/v1/ekm_service_client_config.json b/packages/google-cloud-kms/src/v1/ekm_service_client_config.json index 3e97e7e12e9..b4ef489d214 100644 --- a/packages/google-cloud-kms/src/v1/ekm_service_client_config.json +++ b/packages/google-cloud-kms/src/v1/ekm_service_client_config.json @@ -47,6 +47,10 @@ "UpdateEkmConfig": { "retry_codes_name": "non_idempotent", "retry_params_name": "default" + }, + "VerifyConnectivity": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" } } } diff --git a/packages/google-cloud-kms/src/v1/gapic_metadata.json b/packages/google-cloud-kms/src/v1/gapic_metadata.json index 449ae15ed7e..f7f8fcf538a 100644 --- a/packages/google-cloud-kms/src/v1/gapic_metadata.json +++ b/packages/google-cloud-kms/src/v1/gapic_metadata.json @@ -35,6 +35,11 @@ "updateEkmConfig" ] }, + "VerifyConnectivity": { + "methods": [ + "verifyConnectivity" + ] + }, "ListEkmConnections": { "methods": [ "listEkmConnections", @@ -72,6 +77,11 @@ "updateEkmConfig" ] }, + "VerifyConnectivity": { + "methods": [ + "verifyConnectivity" + ] + }, "ListEkmConnections": { "methods": [ "listEkmConnections", diff --git a/packages/google-cloud-kms/test/gapic_ekm_service_v1.ts b/packages/google-cloud-kms/test/gapic_ekm_service_v1.ts index 83433e03521..5e8390ccff5 100644 --- a/packages/google-cloud-kms/test/gapic_ekm_service_v1.ts +++ b/packages/google-cloud-kms/test/gapic_ekm_service_v1.ts @@ -885,6 +885,137 @@ describe('v1.EkmServiceClient', () => { }); }); + describe('verifyConnectivity', () => { + it('invokes verifyConnectivity without error', async () => { + const client = new ekmserviceModule.v1.EkmServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.kms.v1.VerifyConnectivityRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.kms.v1.VerifyConnectivityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.kms.v1.VerifyConnectivityResponse() + ); + client.innerApiCalls.verifyConnectivity = + stubSimpleCall(expectedResponse); + const [response] = await client.verifyConnectivity(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.verifyConnectivity as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.verifyConnectivity as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes verifyConnectivity without error using callback', async () => { + const client = new ekmserviceModule.v1.EkmServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.kms.v1.VerifyConnectivityRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.kms.v1.VerifyConnectivityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.kms.v1.VerifyConnectivityResponse() + ); + client.innerApiCalls.verifyConnectivity = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.verifyConnectivity( + request, + ( + err?: Error | null, + result?: protos.google.cloud.kms.v1.IVerifyConnectivityResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.verifyConnectivity as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.verifyConnectivity as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes verifyConnectivity with error', async () => { + const client = new ekmserviceModule.v1.EkmServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.kms.v1.VerifyConnectivityRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.kms.v1.VerifyConnectivityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.verifyConnectivity = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.verifyConnectivity(request), expectedError); + const actualRequest = ( + client.innerApiCalls.verifyConnectivity as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.verifyConnectivity as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes verifyConnectivity with closed client', async () => { + const client = new ekmserviceModule.v1.EkmServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.kms.v1.VerifyConnectivityRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.kms.v1.VerifyConnectivityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.verifyConnectivity(request), expectedError); + }); + }); + describe('listEkmConnections', () => { it('invokes listEkmConnections without error', async () => { const client = new ekmserviceModule.v1.EkmServiceClient({ diff --git a/packages/google-cloud-language/package.json b/packages/google-cloud-language/package.json index 715f375cfce..bc5376529d2 100644 --- a/packages/google-cloud-language/package.json +++ b/packages/google-cloud-language/package.json @@ -36,20 +36,20 @@ "Google Cloud Natural Language API" ], "scripts": { - "docs": "jsdoc -c .jsdoc.js", - "lint": "gts check", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "fix": "gts fix", - "docs-test": "linkinator docs", "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", - "prepare": "npm run compile", - "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean" + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -65,6 +65,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -74,5 +75,4 @@ "webpack": "^5.0.0", "webpack-cli": "^5.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto b/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto index 991ccabb01e..361a024ca07 100644 --- a/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto +++ b/packages/google-cloud-language/protos/google/cloud/language/v1/language_service.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -34,7 +34,8 @@ service LanguageService { "https://www.googleapis.com/auth/cloud-platform"; // Analyzes the sentiment of the provided text. - rpc AnalyzeSentiment(AnalyzeSentimentRequest) returns (AnalyzeSentimentResponse) { + rpc AnalyzeSentiment(AnalyzeSentimentRequest) + returns (AnalyzeSentimentResponse) { option (google.api.http) = { post: "/v1/documents:analyzeSentiment" body: "*" @@ -46,7 +47,8 @@ service LanguageService { // Finds named entities (currently proper names and common nouns) in the text // along with entity types, salience, mentions for each entity, and // other properties. - rpc AnalyzeEntities(AnalyzeEntitiesRequest) returns (AnalyzeEntitiesResponse) { + rpc AnalyzeEntities(AnalyzeEntitiesRequest) + returns (AnalyzeEntitiesResponse) { option (google.api.http) = { post: "/v1/documents:analyzeEntities" body: "*" @@ -55,9 +57,12 @@ service LanguageService { option (google.api.method_signature) = "document"; } - // Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities] in the text and analyzes - // sentiment associated with each entity and its mentions. - rpc AnalyzeEntitySentiment(AnalyzeEntitySentimentRequest) returns (AnalyzeEntitySentimentResponse) { + // Finds entities, similar to + // [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities] + // in the text and analyzes sentiment associated with each entity and its + // mentions. + rpc AnalyzeEntitySentiment(AnalyzeEntitySentimentRequest) + returns (AnalyzeEntitySentimentResponse) { option (google.api.http) = { post: "/v1/documents:analyzeEntitySentiment" body: "*" @@ -148,8 +153,8 @@ message Sentence { TextSpan text = 1; // For calls to [AnalyzeSentiment][] or if - // [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to - // true, this field will contain the sentiment for the sentence. + // [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] + // is set to true, this field will contain the sentiment for the sentence. Sentiment sentiment = 2; } @@ -288,9 +293,9 @@ message Entity { repeated EntityMention mentions = 5; // For calls to [AnalyzeEntitySentiment][] or if - // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to - // true, this field will contain the aggregate sentiment expressed for this - // entity in the provided document. + // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] + // is set to true, this field will contain the aggregate sentiment expressed + // for this entity in the provided document. Sentiment sentiment = 6; } @@ -941,9 +946,9 @@ message EntityMention { Type type = 2; // For calls to [AnalyzeEntitySentiment][] or if - // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to - // true, this field will contain the sentiment expressed for this mention of - // the entity in the provided document. + // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] + // is set to true, this field will contain the sentiment expressed for this + // mention of the entity in the provided document. Sentiment sentiment = 3; } @@ -953,7 +958,9 @@ message TextSpan { string content = 1; // The API calculates the beginning offset of the content in the original - // document according to the [EncodingType][google.cloud.language.v1.EncodingType] specified in the API request. + // document according to the + // [EncodingType][google.cloud.language.v1.EncodingType] specified in the API + // request. int32 begin_offset = 2; } @@ -971,9 +978,7 @@ message ClassificationCategory { // Model options available for classification requests. message ClassificationModelOptions { // Options for the V1 model. - message V1Model { - - } + message V1Model {} // Options for the V2 model. message V2Model { @@ -1023,7 +1028,8 @@ message AnalyzeSentimentResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1.Document.language] field for more details. + // See [Document.language][google.cloud.language.v1.Document.language] field + // for more details. string language = 2; // The sentiment for all the sentences in the document. @@ -1046,7 +1052,8 @@ message AnalyzeEntitySentimentResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1.Document.language] field for more details. + // See [Document.language][google.cloud.language.v1.Document.language] field + // for more details. string language = 2; } @@ -1066,7 +1073,8 @@ message AnalyzeEntitiesResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1.Document.language] field for more details. + // See [Document.language][google.cloud.language.v1.Document.language] field + // for more details. string language = 2; } @@ -1089,7 +1097,8 @@ message AnalyzeSyntaxResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1.Document.language] field for more details. + // See [Document.language][google.cloud.language.v1.Document.language] field + // for more details. string language = 3; } @@ -1167,7 +1176,8 @@ message AnnotateTextResponse { // The language of the text, which will be the same as the language specified // in the request or, if not specified, the automatically-detected language. - // See [Document.language][google.cloud.language.v1.Document.language] field for more details. + // See [Document.language][google.cloud.language.v1.Document.language] field + // for more details. string language = 5; // Categories identified in the input document. diff --git a/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json b/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json index 204134e6f7b..ec92dcf12e5 100644 --- a/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json +++ b/packages/google-cloud-language/samples/generated/v1/snippet_metadata.google.cloud.language.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-language", - "version": "5.2.0", + "version": "5.2.2", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json b/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json index 580ae89533a..3aac28464a3 100644 --- a/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json +++ b/packages/google-cloud-language/samples/generated/v1beta2/snippet_metadata.google.cloud.language.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-language", - "version": "5.2.0", + "version": "5.2.2", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-language/src/v1/language_service_client.ts b/packages/google-cloud-language/src/v1/language_service_client.ts index 73d4ea75f80..0eecb84ca50 100644 --- a/packages/google-cloud-language/src/v1/language_service_client.ts +++ b/packages/google-cloud-language/src/v1/language_service_client.ts @@ -495,8 +495,10 @@ export class LanguageServiceClient { return this.innerApiCalls.analyzeEntities(request, options, callback); } /** - * Finds entities, similar to {@link google.cloud.language.v1.LanguageService.AnalyzeEntities|AnalyzeEntities} in the text and analyzes - * sentiment associated with each entity and its mentions. + * Finds entities, similar to + * {@link google.cloud.language.v1.LanguageService.AnalyzeEntities|AnalyzeEntities} + * in the text and analyzes sentiment associated with each entity and its + * mentions. * * @param {Object} request * The request object that will be sent. diff --git a/packages/google-cloud-lifesciences/package.json b/packages/google-cloud-lifesciences/package.json index f8e32bcd96f..4121bcabd58 100644 --- a/packages/google-cloud-lifesciences/package.json +++ b/packages/google-cloud-lifesciences/package.json @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-lifesciences" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-managedidentities/package.json b/packages/google-cloud-managedidentities/package.json index 8ebbba6ebc5..8b02d977357 100644 --- a/packages/google-cloud-managedidentities/package.json +++ b/packages/google-cloud-managedidentities/package.json @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-managedidentities" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-mediatranslation/package.json b/packages/google-cloud-mediatranslation/package.json index 87fcf0e3c7d..67c220a14bf 100644 --- a/packages/google-cloud-mediatranslation/package.json +++ b/packages/google-cloud-mediatranslation/package.json @@ -18,19 +18,19 @@ "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-mediatranslation", "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", - "docs-test": "linkinator docs", "predocs-test": "npm run docs", - "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", + "docs-test": "linkinator docs", "fix": "gts fix", "lint": "gts check", - "prelint": "cd samples; npm link ../; npm install", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test && cd ../", - "precompile": "gts clean" + "prepare": "npm run compile-protos && npm run compile", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -45,6 +45,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -57,5 +58,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-memcache/package.json b/packages/google-cloud-memcache/package.json index a269c532f7f..2e7fbe48383 100644 --- a/packages/google-cloud-memcache/package.json +++ b/packages/google-cloud-memcache/package.json @@ -18,19 +18,19 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", "docs-test": "linkinator docs", "fix": "gts fix", "lint": "gts check", - "prelint": "cd samples; npm link ../; npm install", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "test": "c8 mocha build/test", - "precompile": "gts clean" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -45,6 +45,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -57,5 +58,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-metastore/CHANGELOG.md b/packages/google-cloud-metastore/CHANGELOG.md index 78c06f0d997..70e189eccfe 100644 --- a/packages/google-cloud-metastore/CHANGELOG.md +++ b/packages/google-cloud-metastore/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [3.5.0](https://github.com/googleapis/google-cloud-node/compare/dataproc-metastore-v3.4.2...dataproc-metastore-v3.5.0) (2023-04-24) + + +### Features + +* [metastore] added ScalingConfig (v1) ([#4176](https://github.com/googleapis/google-cloud-node/issues/4176)) ([ff093a9](https://github.com/googleapis/google-cloud-node/commit/ff093a9ab1b79c1863e25ffa71e1fdcbf32faa2d)) + ## [3.4.2](https://github.com/googleapis/google-cloud-node/compare/dataproc-metastore-v3.4.1...dataproc-metastore-v3.4.2) (2023-04-13) diff --git a/packages/google-cloud-metastore/package.json b/packages/google-cloud-metastore/package.json index 4a5703af18f..a07d65867fd 100644 --- a/packages/google-cloud-metastore/package.json +++ b/packages/google-cloud-metastore/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/dataproc-metastore", - "version": "3.4.2", + "version": "3.5.0", "description": "Metastore client for Node.js", "repository": { "type": "git", @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-metastore" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-metastore/protos/google/cloud/metastore/v1/metastore.proto b/packages/google-cloud-metastore/protos/google/cloud/metastore/v1/metastore.proto index 8b4020c98da..70353815588 100644 --- a/packages/google-cloud-metastore/protos/google/cloud/metastore/v1/metastore.proto +++ b/packages/google-cloud-metastore/protos/google/cloud/metastore/v1/metastore.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; @@ -39,6 +40,10 @@ option (google.api.resource_definition) = { type: "compute.googleapis.com/Subnetwork" pattern: "projects/{project}/regions/{region}/subnetworks/{subnetwork}" }; +option (google.api.resource_definition) = { + type: "dataplex.googleapis.com/Lake" + pattern: "projects/{project}/locations/{location}/lakes/{lake}" +}; // Configures and manages metastore services. // Metastore services are fully managed, highly available, autoscaled, @@ -59,7 +64,8 @@ option (google.api.resource_definition) = { // `/projects/{project_number}/locations/{location_id}/services/{service_id}`. service DataprocMetastore { option (google.api.default_host) = "metastore.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Lists services in a project and location. rpc ListServices(ListServicesRequest) returns (ListServicesResponse) { @@ -78,7 +84,8 @@ service DataprocMetastore { } // Creates a metastore service in a project and location. - rpc CreateService(CreateServiceRequest) returns (google.longrunning.Operation) { + rpc CreateService(CreateServiceRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/services" body: "service" @@ -91,7 +98,8 @@ service DataprocMetastore { } // Updates the parameters of a single service. - rpc UpdateService(UpdateServiceRequest) returns (google.longrunning.Operation) { + rpc UpdateService(UpdateServiceRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1/{service.name=projects/*/locations/*/services/*}" body: "service" @@ -104,7 +112,8 @@ service DataprocMetastore { } // Deletes a single service. - rpc DeleteService(DeleteServiceRequest) returns (google.longrunning.Operation) { + rpc DeleteService(DeleteServiceRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/services/*}" }; @@ -116,7 +125,8 @@ service DataprocMetastore { } // Lists imports in a service. - rpc ListMetadataImports(ListMetadataImportsRequest) returns (ListMetadataImportsResponse) { + rpc ListMetadataImports(ListMetadataImportsRequest) + returns (ListMetadataImportsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*/services/*}/metadataImports" }; @@ -132,12 +142,14 @@ service DataprocMetastore { } // Creates a new MetadataImport in a given project and location. - rpc CreateMetadataImport(CreateMetadataImportRequest) returns (google.longrunning.Operation) { + rpc CreateMetadataImport(CreateMetadataImportRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*/services/*}/metadataImports" body: "metadata_import" }; - option (google.api.method_signature) = "parent,metadata_import,metadata_import_id"; + option (google.api.method_signature) = + "parent,metadata_import,metadata_import_id"; option (google.longrunning.operation_info) = { response_type: "MetadataImport" metadata_type: "google.cloud.metastore.v1.OperationMetadata" @@ -146,7 +158,8 @@ service DataprocMetastore { // Updates a single import. // Only the description field of MetadataImport is supported to be updated. - rpc UpdateMetadataImport(UpdateMetadataImportRequest) returns (google.longrunning.Operation) { + rpc UpdateMetadataImport(UpdateMetadataImportRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1/{metadata_import.name=projects/*/locations/*/services/*/metadataImports/*}" body: "metadata_import" @@ -159,7 +172,8 @@ service DataprocMetastore { } // Exports metadata from a service. - rpc ExportMetadata(ExportMetadataRequest) returns (google.longrunning.Operation) { + rpc ExportMetadata(ExportMetadataRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{service=projects/*/locations/*/services/*}:exportMetadata" body: "*" @@ -171,7 +185,8 @@ service DataprocMetastore { } // Restores a service from a backup. - rpc RestoreService(RestoreServiceRequest) returns (google.longrunning.Operation) { + rpc RestoreService(RestoreServiceRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{service=projects/*/locations/*/services/*}:restore" body: "*" @@ -313,30 +328,30 @@ message Service { HiveMetastoreConfig hive_metastore_config = 5; } - // Immutable. The relative resource name of the metastore service, in the following - // format: + // Immutable. The relative resource name of the metastore service, in the + // following format: // // `projects/{project_number}/locations/{location_id}/services/{service_id}`. string name = 1 [(google.api.field_behavior) = IMMUTABLE]; // Output only. The time when the metastore service was created. - google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time when the metastore service was last updated. - google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // User-defined labels for the metastore service. map labels = 4; - // Immutable. The relative resource name of the VPC network on which the instance can be - // accessed. It is specified in the following form: + // Immutable. The relative resource name of the VPC network on which the + // instance can be accessed. It is specified in the following form: // // `projects/{project_number}/global/networks/{network_id}`. string network = 7 [ (google.api.field_behavior) = IMMUTABLE, - (google.api.resource_reference) = { - type: "compute.googleapis.com/Network" - } + (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } ]; // Output only. The URI of the endpoint used to access the metastore service. @@ -348,12 +363,12 @@ message Service { // Output only. The current state of the metastore service. State state = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Additional information about the current state of the metastore service, if - // available. + // Output only. Additional information about the current state of the + // metastore service, if available. string state_message = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. A Cloud Storage URI (starting with `gs://`) that specifies where artifacts - // related to the metastore service are stored. + // Output only. A Cloud Storage URI (starting with `gs://`) that specifies + // where artifacts related to the metastore service are stored. string artifact_gcs_uri = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; // The tier of the service. @@ -365,19 +380,22 @@ message Service { // database type. MaintenanceWindow maintenance_window = 15; - // Output only. The globally unique resource identifier of the metastore service. + // Output only. The globally unique resource identifier of the metastore + // service. string uid = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The metadata management activities of the metastore service. - MetadataManagementActivity metadata_management_activity = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; + MetadataManagementActivity metadata_management_activity = 17 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Immutable. The release channel of the service. // If unspecified, defaults to `STABLE`. ReleaseChannel release_channel = 19 [(google.api.field_behavior) = IMMUTABLE]; - // Immutable. Information used to configure the Dataproc Metastore service to encrypt - // customer data at rest. Cannot be updated. - EncryptionConfig encryption_config = 20 [(google.api.field_behavior) = IMMUTABLE]; + // Immutable. Information used to configure the Dataproc Metastore service to + // encrypt customer data at rest. Cannot be updated. + EncryptionConfig encryption_config = 20 + [(google.api.field_behavior) = IMMUTABLE]; // The configuration specifying the network settings for the // Dataproc Metastore service. @@ -389,6 +407,9 @@ message Service { // The configuration specifying telemetry settings for the Dataproc Metastore // service. If unspecified defaults to `JSON`. TelemetryConfig telemetry_config = 23; + + // Scaling configuration of the metastore service. + ScalingConfig scaling_config = 24; } // Maintenance window. This specifies when Dataproc Metastore @@ -420,6 +441,16 @@ message HiveMetastoreConfig { // (`hive_metastore_config.kerberos_config`) in the request's `update_mask` // while omitting this field from the request's `service`. KerberosConfig kerberos_config = 3; + + // A mapping of Hive metastore version to the auxiliary version + // configuration. When specified, a secondary Hive metastore service is + // created along with the primary service. All auxiliary versions must be less + // than the service's primary version. The key is the auxiliary service name + // and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This + // means that the first character must be a lowercase letter, and all the + // following characters must be hyphens, lowercase letters, or digits, except + // the last character, which cannot be a hyphen. + map auxiliary_versions = 5; } // Configuration information for a Kerberos principal. @@ -459,13 +490,31 @@ message EncryptionConfig { string kms_key = 1; } +// Configuration information for the auxiliary service versions. +message AuxiliaryVersionConfig { + // The Hive metastore version of the auxiliary service. It must be less + // than the primary Hive metastore service's version. + string version = 1; + + // A mapping of Hive metastore configuration key-value pairs to apply to the + // auxiliary Hive metastore (configured in `hive-site.xml`) in addition to + // the primary version's overrides. If keys are present in both the auxiliary + // version's overrides and the primary version's overrides, the value from + // the auxiliary version's overrides takes precedence. + map config_overrides = 2; + + // Output only. The network configuration contains the endpoint URI(s) of the + // auxiliary Hive metastore service. + NetworkConfig network_config = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + // Network configuration for the Dataproc Metastore service. message NetworkConfig { // Contains information of the customer's network configurations. message Consumer { oneof vpc_resource { - // Immutable. The subnetwork of the customer project from which an IP address is - // reserved and used as the Dataproc Metastore service's + // Immutable. The subnetwork of the customer project from which an IP + // address is reserved and used as the Dataproc Metastore service's // endpoint. It is accessible to hosts in the subnet and to all // hosts in a subnet in the same region and same network. There must // be at least one IP address available in the subnet's primary range. The @@ -480,12 +529,13 @@ message NetworkConfig { ]; } - // Output only. The URI of the endpoint used to access the metastore service. + // Output only. The URI of the endpoint used to access the metastore + // service. string endpoint_uri = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } - // Immutable. The consumer-side network configuration for the Dataproc Metastore - // instance. + // Immutable. The consumer-side network configuration for the Dataproc + // Metastore instance. repeated Consumer consumers = 1 [(google.api.field_behavior) = IMMUTABLE]; } @@ -509,7 +559,8 @@ message TelemetryConfig { // The metadata management activities of the metastore service. message MetadataManagementActivity { // Output only. The latest metadata exports of the metastore service. - repeated MetadataExport metadata_exports = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated MetadataExport metadata_exports = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The latest restores of the metastore service. repeated Restore restores = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -525,7 +576,6 @@ message MetadataImport { // A specification of the location of and metadata about a database dump from // a relational database management system. message DatabaseDump { - // The type of the database. enum DatabaseType { // The type of the source database is unknown. @@ -542,7 +592,8 @@ message MetadataImport { // to import metadata. It must begin with `gs://`. string gcs_uri = 2; - // Optional. The type of the database dump. If unspecified, defaults to `MYSQL`. + // Optional. The type of the database dump. If unspecified, defaults to + // `MYSQL`. DatabaseDumpSpec.Type type = 4 [(google.api.field_behavior) = OPTIONAL]; } @@ -580,13 +631,16 @@ message MetadataImport { string description = 2; // Output only. The time when the metadata import was started. - google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time when the metadata import was last updated. - google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time when the metadata import finished. - google.protobuf.Timestamp end_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp end_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The current state of the metadata import. State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -613,23 +667,27 @@ message MetadataExport { } oneof destination { - // Output only. A Cloud Storage URI of a folder that metadata are exported to, in the - // form of `gs:////`, where + // Output only. A Cloud Storage URI of a folder that metadata are exported + // to, in the form of + // `gs:////`, where // `` is automatically generated. string destination_gcs_uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Output only. The time when the export started. - google.protobuf.Timestamp start_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp start_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time when the export ended. - google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The current state of the export. State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The type of the database dump. - DatabaseDumpSpec.Type database_dump_type = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + DatabaseDumpSpec.Type database_dump_type = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // The details of a backup resource. @@ -666,10 +724,12 @@ message Backup { string name = 1 [(google.api.field_behavior) = IMMUTABLE]; // Output only. The time when the backup was started. - google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time when the backup finished creating. - google.protobuf.Timestamp end_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp end_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The current state of the backup. State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -681,7 +741,8 @@ message Backup { string description = 6; // Output only. Services that are restoring from the backup. - repeated string restoring_services = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated string restoring_services = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // The details of a metadata restore operation. @@ -717,16 +778,18 @@ message Restore { } // Output only. The time when the restore started. - google.protobuf.Timestamp start_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp start_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time when the restore ended. - google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The current state of the restore. State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The relative resource name of the metastore service backup to restore - // from, in the following form: + // Output only. The relative resource name of the metastore service backup to + // restore from, in the following form: // // `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`. string backup = 4 [ @@ -739,15 +802,52 @@ message Restore { // Output only. The type of restore. RestoreType type = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The restore details containing the revision of the service to be restored - // to, in format of JSON. + // Output only. The restore details containing the revision of the service to + // be restored to, in format of JSON. string details = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; } -// Request message for [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]. +// Represents the scaling configuration of a metastore service. +message ScalingConfig { + // Metastore instance sizes. + enum InstanceSize { + // Unspecified instance size + INSTANCE_SIZE_UNSPECIFIED = 0; + + // Extra small instance size, maps to a scaling factor of 0.1. + EXTRA_SMALL = 1; + + // Small instance size, maps to a scaling factor of 0.5. + SMALL = 2; + + // Medium instance size, maps to a scaling factor of 1.0. + MEDIUM = 3; + + // Large instance size, maps to a scaling factor of 3.0. + LARGE = 4; + + // Extra large instance size, maps to a scaling factor of 6.0. + EXTRA_LARGE = 5; + } + + // Represents either a predetermined instance size or a numeric + // scaling factor. + oneof scaling_model { + // An enum of readable instance sizes, with each instance size mapping to a + // float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1)) + InstanceSize instance_size = 1; + + // Scaling factor, increments of 0.1 for values less than 1.0, and + // increments of 1.0 for values greater than 1.0. + float scaling_factor = 2; + } +} + +// Request message for +// [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]. message ListServicesRequest { - // Required. The relative resource name of the location of metastore services to - // list, in the following form: + // Required. The relative resource name of the location of metastore services + // to list, in the following form: // // `projects/{project_number}/locations/{location_id}`. string parent = 1 [ @@ -757,19 +857,21 @@ message ListServicesRequest { } ]; - // Optional. The maximum number of services to return. The response may contain less - // than the maximum number. If unspecified, no more than 500 services are - // returned. The maximum value is 1000; values above 1000 are changed to 1000. + // Optional. The maximum number of services to return. The response may + // contain less than the maximum number. If unspecified, no more than 500 + // services are returned. The maximum value is 1000; values above 1000 are + // changed to 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A page token, received from a previous [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] + // Optional. A page token, received from a previous + // [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] // call. Provide this token to retrieve the subsequent page. // // To retrieve the first page, supply an empty page token. // // When paginating, other parameters provided to - // [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] must match the call that provided the - // page token. + // [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] + // must match the call that provided the page token. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The filter to apply to list results. @@ -781,7 +883,8 @@ message ListServicesRequest { string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; } -// Response message for [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]. +// Response message for +// [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]. message ListServicesResponse { // The services in the specified location. repeated Service services = 1; @@ -794,10 +897,11 @@ message ListServicesResponse { repeated string unreachable = 3; } -// Request message for [DataprocMetastore.GetService][google.cloud.metastore.v1.DataprocMetastore.GetService]. +// Request message for +// [DataprocMetastore.GetService][google.cloud.metastore.v1.DataprocMetastore.GetService]. message GetServiceRequest { - // Required. The relative resource name of the metastore service to retrieve, in the - // following form: + // Required. The relative resource name of the metastore service to retrieve, + // in the following form: // // `projects/{project_number}/locations/{location_id}/services/{service_id}`. string name = 1 [ @@ -808,10 +912,11 @@ message GetServiceRequest { ]; } -// Request message for [DataprocMetastore.CreateService][google.cloud.metastore.v1.DataprocMetastore.CreateService]. +// Request message for +// [DataprocMetastore.CreateService][google.cloud.metastore.v1.DataprocMetastore.CreateService]. message CreateServiceRequest { - // Required. The relative resource name of the location in which to create a metastore - // service, in the following form: + // Required. The relative resource name of the location in which to create a + // metastore service, in the following form: // // `projects/{project_number}/locations/{location_id}`. string parent = 1 [ @@ -834,10 +939,10 @@ message CreateServiceRequest { // the request's `service_id` field. Service service = 3 [(google.api.field_behavior) = REQUIRED]; - // Optional. A request ID. Specify a unique request ID to allow the server to ignore the - // request if it has completed. The server will ignore subsequent requests - // that provide a duplicate request ID for at least 60 minutes after the first - // request. + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. // // For example, if an initial request times out, followed by another request // with the same request ID, the server ignores the second request to prevent @@ -849,13 +954,15 @@ message CreateServiceRequest { string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; } -// Request message for [DataprocMetastore.UpdateService][google.cloud.metastore.v1.DataprocMetastore.UpdateService]. +// Request message for +// [DataprocMetastore.UpdateService][google.cloud.metastore.v1.DataprocMetastore.UpdateService]. message UpdateServiceRequest { // Required. A field mask used to specify the fields to be overwritten in the // metastore service resource by the update. // Fields specified in the `update_mask` are relative to the resource (not // to the full request). A field is overwritten if it is in the mask. - google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; // Required. The metastore service to update. The server only merges fields // in the service if they are specified in `update_mask`. @@ -864,10 +971,10 @@ message UpdateServiceRequest { // service to be updated. Service service = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. A request ID. Specify a unique request ID to allow the server to ignore the - // request if it has completed. The server will ignore subsequent requests - // that provide a duplicate request ID for at least 60 minutes after the first - // request. + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. // // For example, if an initial request times out, followed by another request // with the same request ID, the server ignores the second request to prevent @@ -879,10 +986,11 @@ message UpdateServiceRequest { string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; } -// Request message for [DataprocMetastore.DeleteService][google.cloud.metastore.v1.DataprocMetastore.DeleteService]. +// Request message for +// [DataprocMetastore.DeleteService][google.cloud.metastore.v1.DataprocMetastore.DeleteService]. message DeleteServiceRequest { - // Required. The relative resource name of the metastore service to delete, in the - // following form: + // Required. The relative resource name of the metastore service to delete, in + // the following form: // // `projects/{project_number}/locations/{location_id}/services/{service_id}`. string name = 1 [ @@ -892,10 +1000,10 @@ message DeleteServiceRequest { } ]; - // Optional. A request ID. Specify a unique request ID to allow the server to ignore the - // request if it has completed. The server will ignore subsequent requests - // that provide a duplicate request ID for at least 60 minutes after the first - // request. + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. // // For example, if an initial request times out, followed by another request // with the same request ID, the server ignores the second request to prevent @@ -907,10 +1015,11 @@ message DeleteServiceRequest { string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; } -// Request message for [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1.DataprocMetastore.ListMetadataImports]. +// Request message for +// [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1.DataprocMetastore.ListMetadataImports]. message ListMetadataImportsRequest { - // Required. The relative resource name of the service whose metadata imports to - // list, in the following form: + // Required. The relative resource name of the service whose metadata imports + // to list, in the following form: // // `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`. string parent = 1 [ @@ -920,19 +1029,20 @@ message ListMetadataImportsRequest { } ]; - // Optional. The maximum number of imports to return. The response may contain less - // than the maximum number. If unspecified, no more than 500 imports are + // Optional. The maximum number of imports to return. The response may contain + // less than the maximum number. If unspecified, no more than 500 imports are // returned. The maximum value is 1000; values above 1000 are changed to 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A page token, received from a previous [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] + // Optional. A page token, received from a previous + // [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] // call. Provide this token to retrieve the subsequent page. // // To retrieve the first page, supply an empty page token. // // When paginating, other parameters provided to - // [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] must match the call that provided the - // page token. + // [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] + // must match the call that provided the page token. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The filter to apply to list results. @@ -944,7 +1054,8 @@ message ListMetadataImportsRequest { string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; } -// Response message for [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1.DataprocMetastore.ListMetadataImports]. +// Response message for +// [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1.DataprocMetastore.ListMetadataImports]. message ListMetadataImportsResponse { // The imports in the specified service. repeated MetadataImport metadata_imports = 1; @@ -957,10 +1068,11 @@ message ListMetadataImportsResponse { repeated string unreachable = 3; } -// Request message for [DataprocMetastore.GetMetadataImport][google.cloud.metastore.v1.DataprocMetastore.GetMetadataImport]. +// Request message for +// [DataprocMetastore.GetMetadataImport][google.cloud.metastore.v1.DataprocMetastore.GetMetadataImport]. message GetMetadataImportRequest { - // Required. The relative resource name of the metadata import to retrieve, in the - // following form: + // Required. The relative resource name of the metadata import to retrieve, in + // the following form: // // `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`. string name = 1 [ @@ -971,10 +1083,11 @@ message GetMetadataImportRequest { ]; } -// Request message for [DataprocMetastore.CreateMetadataImport][google.cloud.metastore.v1.DataprocMetastore.CreateMetadataImport]. +// Request message for +// [DataprocMetastore.CreateMetadataImport][google.cloud.metastore.v1.DataprocMetastore.CreateMetadataImport]. message CreateMetadataImportRequest { - // Required. The relative resource name of the service in which to create a metastore - // import, in the following form: + // Required. The relative resource name of the service in which to create a + // metastore import, in the following form: // // `projects/{project_number}/locations/{location_id}/services/{service_id}`. string parent = 1 [ @@ -984,23 +1097,23 @@ message CreateMetadataImportRequest { } ]; - // Required. The ID of the metadata import, which is used as the final component of the - // metadata import's name. + // Required. The ID of the metadata import, which is used as the final + // component of the metadata import's name. // // This value must be between 1 and 64 characters long, begin with a letter, // end with a letter or number, and consist of alpha-numeric ASCII characters // or hyphens. string metadata_import_id = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. The metadata import to create. The `name` field is ignored. The ID of the - // created metadata import must be provided in the request's + // Required. The metadata import to create. The `name` field is ignored. The + // ID of the created metadata import must be provided in the request's // `metadata_import_id` field. MetadataImport metadata_import = 3 [(google.api.field_behavior) = REQUIRED]; - // Optional. A request ID. Specify a unique request ID to allow the server to ignore the - // request if it has completed. The server will ignore subsequent requests - // that provide a duplicate request ID for at least 60 minutes after the first - // request. + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. // // For example, if an initial request times out, followed by another request // with the same request ID, the server ignores the second request to prevent @@ -1012,13 +1125,15 @@ message CreateMetadataImportRequest { string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; } -// Request message for [DataprocMetastore.UpdateMetadataImport][google.cloud.metastore.v1.DataprocMetastore.UpdateMetadataImport]. +// Request message for +// [DataprocMetastore.UpdateMetadataImport][google.cloud.metastore.v1.DataprocMetastore.UpdateMetadataImport]. message UpdateMetadataImportRequest { // Required. A field mask used to specify the fields to be overwritten in the // metadata import resource by the update. // Fields specified in the `update_mask` are relative to the resource (not // to the full request). A field is overwritten if it is in the mask. - google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; // Required. The metadata import to update. The server only merges fields // in the import if they are specified in `update_mask`. @@ -1027,10 +1142,10 @@ message UpdateMetadataImportRequest { // import to be updated. MetadataImport metadata_import = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. A request ID. Specify a unique request ID to allow the server to ignore the - // request if it has completed. The server will ignore subsequent requests - // that provide a duplicate request ID for at least 60 minutes after the first - // request. + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. // // For example, if an initial request times out, followed by another request // with the same request ID, the server ignores the second request to prevent @@ -1042,7 +1157,8 @@ message UpdateMetadataImportRequest { string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; } -// Request message for [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]. +// Request message for +// [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]. message ListBackupsRequest { // Required. The relative resource name of the service whose backups to // list, in the following form: @@ -1055,19 +1171,20 @@ message ListBackupsRequest { } ]; - // Optional. The maximum number of backups to return. The response may contain less - // than the maximum number. If unspecified, no more than 500 backups are + // Optional. The maximum number of backups to return. The response may contain + // less than the maximum number. If unspecified, no more than 500 backups are // returned. The maximum value is 1000; values above 1000 are changed to 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A page token, received from a previous [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups] + // Optional. A page token, received from a previous + // [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups] // call. Provide this token to retrieve the subsequent page. // // To retrieve the first page, supply an empty page token. // // When paginating, other parameters provided to - // [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups] must match the call that provided the - // page token. + // [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups] + // must match the call that provided the page token. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The filter to apply to list results. @@ -1079,7 +1196,8 @@ message ListBackupsRequest { string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; } -// Response message for [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]. +// Response message for +// [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]. message ListBackupsResponse { // The backups of the specified service. repeated Backup backups = 1; @@ -1092,7 +1210,8 @@ message ListBackupsResponse { repeated string unreachable = 3; } -// Request message for [DataprocMetastore.GetBackup][google.cloud.metastore.v1.DataprocMetastore.GetBackup]. +// Request message for +// [DataprocMetastore.GetBackup][google.cloud.metastore.v1.DataprocMetastore.GetBackup]. message GetBackupRequest { // Required. The relative resource name of the backup to retrieve, in the // following form: @@ -1106,10 +1225,11 @@ message GetBackupRequest { ]; } -// Request message for [DataprocMetastore.CreateBackup][google.cloud.metastore.v1.DataprocMetastore.CreateBackup]. +// Request message for +// [DataprocMetastore.CreateBackup][google.cloud.metastore.v1.DataprocMetastore.CreateBackup]. message CreateBackupRequest { - // Required. The relative resource name of the service in which to create a backup - // of the following form: + // Required. The relative resource name of the service in which to create a + // backup of the following form: // // `projects/{project_number}/locations/{location_id}/services/{service_id}`. string parent = 1 [ @@ -1127,14 +1247,14 @@ message CreateBackupRequest { // or hyphens. string backup_id = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. The backup to create. The `name` field is ignored. The ID of the created - // backup must be provided in the request's `backup_id` field. + // Required. The backup to create. The `name` field is ignored. The ID of the + // created backup must be provided in the request's `backup_id` field. Backup backup = 3 [(google.api.field_behavior) = REQUIRED]; - // Optional. A request ID. Specify a unique request ID to allow the server to ignore the - // request if it has completed. The server will ignore subsequent requests - // that provide a duplicate request ID for at least 60 minutes after the first - // request. + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. // // For example, if an initial request times out, followed by another request // with the same request ID, the server ignores the second request to prevent @@ -1146,7 +1266,8 @@ message CreateBackupRequest { string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; } -// Request message for [DataprocMetastore.DeleteBackup][google.cloud.metastore.v1.DataprocMetastore.DeleteBackup]. +// Request message for +// [DataprocMetastore.DeleteBackup][google.cloud.metastore.v1.DataprocMetastore.DeleteBackup]. message DeleteBackupRequest { // Required. The relative resource name of the backup to delete, in the // following form: @@ -1159,10 +1280,10 @@ message DeleteBackupRequest { } ]; - // Optional. A request ID. Specify a unique request ID to allow the server to ignore the - // request if it has completed. The server will ignore subsequent requests - // that provide a duplicate request ID for at least 60 minutes after the first - // request. + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. // // For example, if an initial request times out, followed by another request // with the same request ID, the server ignores the second request to prevent @@ -1174,7 +1295,8 @@ message DeleteBackupRequest { string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; } -// Request message for [DataprocMetastore.ExportMetadata][google.cloud.metastore.v1.DataprocMetastore.ExportMetadata]. +// Request message for +// [DataprocMetastore.ExportMetadata][google.cloud.metastore.v1.DataprocMetastore.ExportMetadata]. message ExportMetadataRequest { // Required. Destination that metadata is exported to. oneof destination { @@ -1184,8 +1306,8 @@ message ExportMetadataRequest { string destination_gcs_folder = 2; } - // Required. The relative resource name of the metastore service to run export, in the - // following form: + // Required. The relative resource name of the metastore service to run + // export, in the following form: // // `projects/{project_id}/locations/{location_id}/services/{service_id}`. string service = 1 [ @@ -1195,10 +1317,10 @@ message ExportMetadataRequest { } ]; - // Optional. A request ID. Specify a unique request ID to allow the server to ignore the - // request if it has completed. The server will ignore subsequent requests - // that provide a duplicate request ID for at least 60 minutes after the first - // request. + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. // // For example, if an initial request times out, followed by another request // with the same request ID, the server ignores the second request to prevent @@ -1209,14 +1331,16 @@ message ExportMetadataRequest { // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The type of the database dump. If unspecified, defaults to `MYSQL`. - DatabaseDumpSpec.Type database_dump_type = 4 [(google.api.field_behavior) = OPTIONAL]; + // Optional. The type of the database dump. If unspecified, defaults to + // `MYSQL`. + DatabaseDumpSpec.Type database_dump_type = 4 + [(google.api.field_behavior) = OPTIONAL]; } // Request message for [DataprocMetastore.Restore][]. message RestoreServiceRequest { - // Required. The relative resource name of the metastore service to run restore, in the - // following form: + // Required. The relative resource name of the metastore service to run + // restore, in the following form: // // `projects/{project_id}/locations/{location_id}/services/{service_id}`. string service = 1 [ @@ -1226,8 +1350,8 @@ message RestoreServiceRequest { } ]; - // Required. The relative resource name of the metastore service backup to restore - // from, in the following form: + // Required. The relative resource name of the metastore service backup to + // restore from, in the following form: // // `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`. string backup = 2 [ @@ -1240,10 +1364,10 @@ message RestoreServiceRequest { // Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`. Restore.RestoreType restore_type = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A request ID. Specify a unique request ID to allow the server to ignore the - // request if it has completed. The server will ignore subsequent requests - // that provide a duplicate request ID for at least 60 minutes after the first - // request. + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. // // For example, if an initial request times out, followed by another request // with the same request ID, the server ignores the second request to prevent @@ -1258,10 +1382,12 @@ message RestoreServiceRequest { // Represents the metadata of a long-running operation. message OperationMetadata { // Output only. The time the operation was created. - google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time the operation finished running. - google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Server-defined resource path for the target of the operation. string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -1274,8 +1400,9 @@ message OperationMetadata { // Output only. Identifies whether the caller has requested cancellation // of the operation. Operations that have successfully been cancelled - // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - // corresponding to `Code.CANCELLED`. + // have [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. API version used to start the operation. diff --git a/packages/google-cloud-metastore/protos/google/cloud/metastore/v1/metastore_federation.proto b/packages/google-cloud-metastore/protos/google/cloud/metastore/v1/metastore_federation.proto index 19fdce46ec5..c9b6ec6a23c 100644 --- a/packages/google-cloud-metastore/protos/google/cloud/metastore/v1/metastore_federation.proto +++ b/packages/google-cloud-metastore/protos/google/cloud/metastore/v1/metastore_federation.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -20,7 +20,9 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/metastore/v1/metastore.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; @@ -44,10 +46,12 @@ option java_package = "com.google.cloud.metastore.v1"; // `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. service DataprocMetastoreFederation { option (google.api.default_host) = "metastore.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Lists federations in a project and location. - rpc ListFederations(ListFederationsRequest) returns (ListFederationsResponse) { + rpc ListFederations(ListFederationsRequest) + returns (ListFederationsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/federations" }; @@ -63,7 +67,8 @@ service DataprocMetastoreFederation { } // Creates a metastore federation in a project and location. - rpc CreateFederation(CreateFederationRequest) returns (google.longrunning.Operation) { + rpc CreateFederation(CreateFederationRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/federations" body: "federation" @@ -76,7 +81,8 @@ service DataprocMetastoreFederation { } // Updates the fields of a federation. - rpc UpdateFederation(UpdateFederationRequest) returns (google.longrunning.Operation) { + rpc UpdateFederation(UpdateFederationRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1/{federation.name=projects/*/locations/*/federations/*}" body: "federation" @@ -89,7 +95,8 @@ service DataprocMetastoreFederation { } // Deletes a single federation. - rpc DeleteFederation(DeleteFederationRequest) returns (google.longrunning.Operation) { + rpc DeleteFederation(DeleteFederationRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/federations/*}" }; @@ -137,16 +144,18 @@ message Federation { string name = 1 [(google.api.field_behavior) = IMMUTABLE]; // Output only. The time when the metastore federation was created. - google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time when the metastore federation was last updated. - google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // User-defined labels for the metastore federation. map labels = 4; - // Immutable. The Apache Hive metastore version of the federation. All backend metastore - // versions must be compatible with the federation version. + // Immutable. The Apache Hive metastore version of the federation. All backend + // metastore versions must be compatible with the federation version. string version = 5 [(google.api.field_behavior) = IMMUTABLE]; // A map from `BackendMetastore` rank to `BackendMetastore`s from which the @@ -163,11 +172,12 @@ message Federation { // Output only. The current state of the federation. State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Additional information about the current state of the metastore federation, - // if available. + // Output only. Additional information about the current state of the + // metastore federation, if available. string state_message = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The globally unique resource identifier of the metastore federation. + // Output only. The globally unique resource identifier of the metastore + // federation. string uid = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; } @@ -186,12 +196,10 @@ message BackendMetastore { // The formats of the relative resource names for the currently supported // metastores are listed below: // - // * Dataplex - // * `projects/{project_id}/locations/{location}/lakes/{lake_id}` // * BigQuery - // * `projects/{project_id}` + // * `projects/{project_id}` // * Dataproc Metastore - // * `projects/{project_id}/locations/{location}/services/{service_id}` + // * `projects/{project_id}/locations/{location}/services/{service_id}` string name = 1; // The type of the backend metastore. @@ -200,8 +208,8 @@ message BackendMetastore { // Request message for ListFederations. message ListFederationsRequest { - // Required. The relative resource name of the location of metastore federations - // to list, in the following form: + // Required. The relative resource name of the location of metastore + // federations to list, in the following form: // `projects/{project_number}/locations/{location_id}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, @@ -210,9 +218,10 @@ message ListFederationsRequest { } ]; - // Optional. The maximum number of federations to return. The response may contain less - // than the maximum number. If unspecified, no more than 500 services are - // returned. The maximum value is 1000; values above 1000 are changed to 1000. + // Optional. The maximum number of federations to return. The response may + // contain less than the maximum number. If unspecified, no more than 500 + // services are returned. The maximum value is 1000; values above 1000 are + // changed to 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. A page token, received from a previous ListFederationServices @@ -249,8 +258,8 @@ message ListFederationsResponse { // Request message for GetFederation. message GetFederationRequest { - // Required. The relative resource name of the metastore federation to retrieve, - // in the following form: + // Required. The relative resource name of the metastore federation to + // retrieve, in the following form: // // `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. string name = 1 [ @@ -263,8 +272,8 @@ message GetFederationRequest { // Request message for CreateFederation. message CreateFederationRequest { - // Required. The relative resource name of the location in which to create a federation - // service, in the following form: + // Required. The relative resource name of the location in which to create a + // federation service, in the following form: // // `projects/{project_number}/locations/{location_id}`. string parent = 1 [ @@ -287,10 +296,10 @@ message CreateFederationRequest { // provided in the request's `federation_id` field. Federation federation = 3 [(google.api.field_behavior) = REQUIRED]; - // Optional. A request ID. Specify a unique request ID to allow the server to ignore the - // request if it has completed. The server will ignore subsequent requests - // that provide a duplicate request ID for at least 60 minutes after the first - // request. + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. // // For example, if an initial request times out, followed by another request // with the same request ID, the server ignores the second request to prevent @@ -308,7 +317,8 @@ message UpdateFederationRequest { // metastore federation resource by the update. // Fields specified in the `update_mask` are relative to the resource (not // to the full request). A field is overwritten if it is in the mask. - google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; // Required. The metastore federation to update. The server only merges fields // in the service if they are specified in `update_mask`. @@ -317,10 +327,10 @@ message UpdateFederationRequest { // metastore service to be updated. Federation federation = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. A request ID. Specify a unique request ID to allow the server to ignore the - // request if it has completed. The server will ignore subsequent requests - // that provide a duplicate request ID for at least 60 minutes after the first - // request. + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. // // For example, if an initial request times out, followed by another request // with the same request ID, the server ignores the second request to prevent @@ -345,10 +355,10 @@ message DeleteFederationRequest { } ]; - // Optional. A request ID. Specify a unique request ID to allow the server to ignore the - // request if it has completed. The server will ignore subsequent requests - // that provide a duplicate request ID for at least 60 minutes after the first - // request. + // Optional. A request ID. Specify a unique request ID to allow the server to + // ignore the request if it has completed. The server will ignore subsequent + // requests that provide a duplicate request ID for at least 60 minutes after + // the first request. // // For example, if an initial request times out, followed by another request // with the same request ID, the server ignores the second request to prevent diff --git a/packages/google-cloud-metastore/protos/google/cloud/metastore/v1alpha/metastore.proto b/packages/google-cloud-metastore/protos/google/cloud/metastore/v1alpha/metastore.proto index 05621431edc..714280ceffd 100644 --- a/packages/google-cloud-metastore/protos/google/cloud/metastore/v1alpha/metastore.proto +++ b/packages/google-cloud-metastore/protos/google/cloud/metastore/v1alpha/metastore.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; @@ -461,6 +462,9 @@ message Service { // The configuration specifying telemetry settings for the Dataproc Metastore // service. If unspecified defaults to `JSON`. TelemetryConfig telemetry_config = 23; + + // Scaling configuration of the metastore service. + ScalingConfig scaling_config = 24; } // Specifies how metastore metadata should be integrated with external services. @@ -640,6 +644,10 @@ message NetworkConfig { // Immutable. The consumer-side network configuration for the Dataproc // Metastore instance. repeated Consumer consumers = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Enables custom routes to be imported and exported for the Dataproc + // Metastore service's peered VPC network. + bool custom_routes_enabled = 2; } // Telemetry Configuration for the Dataproc Metastore service. @@ -913,6 +921,42 @@ message Restore { string details = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; } +// Represents the scaling configuration of a metastore service. +message ScalingConfig { + // Metastore instance sizes. + enum InstanceSize { + // Unspecified instance size + INSTANCE_SIZE_UNSPECIFIED = 0; + + // Extra small instance size, maps to a scaling factor of 0.1. + EXTRA_SMALL = 1; + + // Small instance size, maps to a scaling factor of 0.5. + SMALL = 2; + + // Medium instance size, maps to a scaling factor of 1.0. + MEDIUM = 3; + + // Large instance size, maps to a scaling factor of 3.0. + LARGE = 4; + + // Extra large instance size, maps to a scaling factor of 6.0. + EXTRA_LARGE = 5; + } + + // Represents either a predetermined instance size or a numeric + // scaling factor. + oneof scaling_model { + // An enum of readable instance sizes, with each instance size mapping to a + // float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1)) + InstanceSize instance_size = 1; + + // Scaling factor, increments of 0.1 for values less than 1.0, and + // increments of 1.0 for values greater than 1.0. + float scaling_factor = 2; + } +} + // Request message for // [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]. message ListServicesRequest { diff --git a/packages/google-cloud-metastore/protos/google/cloud/metastore/v1alpha/metastore_federation.proto b/packages/google-cloud-metastore/protos/google/cloud/metastore/v1alpha/metastore_federation.proto index 7ad2f9c1872..bdb1ecb3783 100644 --- a/packages/google-cloud-metastore/protos/google/cloud/metastore/v1alpha/metastore_federation.proto +++ b/packages/google-cloud-metastore/protos/google/cloud/metastore/v1alpha/metastore_federation.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -20,7 +20,9 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/metastore/v1alpha/metastore.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; @@ -186,6 +188,9 @@ message BackendMetastore { // The metastore type is not set. METASTORE_TYPE_UNSPECIFIED = 0; + // The backend metastore is Dataplex. + DATAPLEX = 1; + // The backend metastore is BigQuery. BIGQUERY = 2; @@ -197,12 +202,10 @@ message BackendMetastore { // The formats of the relative resource names for the currently supported // metastores are listed below: // - // * Dataplex - // * `projects/{project_id}/locations/{location}/lakes/{lake_id}` // * BigQuery - // * `projects/{project_id}` + // * `projects/{project_id}` // * Dataproc Metastore - // * `projects/{project_id}/locations/{location}/services/{service_id}` + // * `projects/{project_id}/locations/{location}/services/{service_id}` string name = 1; // The type of the backend metastore. diff --git a/packages/google-cloud-metastore/protos/google/cloud/metastore/v1beta/metastore.proto b/packages/google-cloud-metastore/protos/google/cloud/metastore/v1beta/metastore.proto index 0cb4edd95bc..b7c73b4f2b1 100644 --- a/packages/google-cloud-metastore/protos/google/cloud/metastore/v1beta/metastore.proto +++ b/packages/google-cloud-metastore/protos/google/cloud/metastore/v1beta/metastore.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; @@ -461,6 +462,9 @@ message Service { // The configuration specifying telemetry settings for the Dataproc Metastore // service. If unspecified defaults to `JSON`. TelemetryConfig telemetry_config = 23; + + // Scaling configuration of the metastore service. + ScalingConfig scaling_config = 24; } // Specifies how metastore metadata should be integrated with external services. @@ -640,6 +644,10 @@ message NetworkConfig { // Immutable. The consumer-side network configuration for the Dataproc // Metastore instance. repeated Consumer consumers = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Enables custom routes to be imported and exported for the Dataproc + // Metastore service's peered VPC network. + bool custom_routes_enabled = 2; } // Telemetry Configuration for the Dataproc Metastore service. @@ -913,6 +921,42 @@ message Restore { string details = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; } +// Represents the scaling configuration of a metastore service. +message ScalingConfig { + // Metastore instance sizes. + enum InstanceSize { + // Unspecified instance size + INSTANCE_SIZE_UNSPECIFIED = 0; + + // Extra small instance size, maps to a scaling factor of 0.1. + EXTRA_SMALL = 1; + + // Small instance size, maps to a scaling factor of 0.5. + SMALL = 2; + + // Medium instance size, maps to a scaling factor of 1.0. + MEDIUM = 3; + + // Large instance size, maps to a scaling factor of 3.0. + LARGE = 4; + + // Extra large instance size, maps to a scaling factor of 6.0. + EXTRA_LARGE = 5; + } + + // Represents either a predetermined instance size or a numeric + // scaling factor. + oneof scaling_model { + // An enum of readable instance sizes, with each instance size mapping to a + // float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1)) + InstanceSize instance_size = 1; + + // Scaling factor, increments of 0.1 for values less than 1.0, and + // increments of 1.0 for values greater than 1.0. + float scaling_factor = 2; + } +} + // Request message for // [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]. message ListServicesRequest { diff --git a/packages/google-cloud-metastore/protos/google/cloud/metastore/v1beta/metastore_federation.proto b/packages/google-cloud-metastore/protos/google/cloud/metastore/v1beta/metastore_federation.proto index 5929dd0b6d3..26bc70e7c4b 100644 --- a/packages/google-cloud-metastore/protos/google/cloud/metastore/v1beta/metastore_federation.proto +++ b/packages/google-cloud-metastore/protos/google/cloud/metastore/v1beta/metastore_federation.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -20,7 +20,9 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/metastore/v1beta/metastore.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; @@ -186,6 +188,9 @@ message BackendMetastore { // The metastore type is not set. METASTORE_TYPE_UNSPECIFIED = 0; + // The backend metastore is Dataplex. + DATAPLEX = 1; + // The backend metastore is BigQuery. BIGQUERY = 2; @@ -197,12 +202,10 @@ message BackendMetastore { // The formats of the relative resource names for the currently supported // metastores are listed below: // - // * Dataplex - // * `projects/{project_id}/locations/{location}/lakes/{lake_id}` // * BigQuery - // * `projects/{project_id}` + // * `projects/{project_id}` // * Dataproc Metastore - // * `projects/{project_id}/locations/{location}/services/{service_id}` + // * `projects/{project_id}/locations/{location}/services/{service_id}` string name = 1; // The type of the backend metastore. diff --git a/packages/google-cloud-metastore/protos/protos.d.ts b/packages/google-cloud-metastore/protos/protos.d.ts index ebb01f9ba09..5ea64554b89 100644 --- a/packages/google-cloud-metastore/protos/protos.d.ts +++ b/packages/google-cloud-metastore/protos/protos.d.ts @@ -427,6 +427,9 @@ export namespace google { /** Service telemetryConfig */ telemetryConfig?: (google.cloud.metastore.v1.ITelemetryConfig|null); + + /** Service scalingConfig */ + scalingConfig?: (google.cloud.metastore.v1.IScalingConfig|null); } /** Represents a Service. */ @@ -498,6 +501,9 @@ export namespace google { /** Service telemetryConfig. */ public telemetryConfig?: (google.cloud.metastore.v1.ITelemetryConfig|null); + /** Service scalingConfig. */ + public scalingConfig?: (google.cloud.metastore.v1.IScalingConfig|null); + /** Service metastoreConfig. */ public metastoreConfig?: "hiveMetastoreConfig"; @@ -729,6 +735,9 @@ export namespace google { /** HiveMetastoreConfig kerberosConfig */ kerberosConfig?: (google.cloud.metastore.v1.IKerberosConfig|null); + + /** HiveMetastoreConfig auxiliaryVersions */ + auxiliaryVersions?: ({ [k: string]: google.cloud.metastore.v1.IAuxiliaryVersionConfig }|null); } /** Represents a HiveMetastoreConfig. */ @@ -749,6 +758,9 @@ export namespace google { /** HiveMetastoreConfig kerberosConfig. */ public kerberosConfig?: (google.cloud.metastore.v1.IKerberosConfig|null); + /** HiveMetastoreConfig auxiliaryVersions. */ + public auxiliaryVersions: { [k: string]: google.cloud.metastore.v1.IAuxiliaryVersionConfig }; + /** * Creates a new HiveMetastoreConfig instance using the specified properties. * @param [properties] Properties to set @@ -1133,6 +1145,115 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an AuxiliaryVersionConfig. */ + interface IAuxiliaryVersionConfig { + + /** AuxiliaryVersionConfig version */ + version?: (string|null); + + /** AuxiliaryVersionConfig configOverrides */ + configOverrides?: ({ [k: string]: string }|null); + + /** AuxiliaryVersionConfig networkConfig */ + networkConfig?: (google.cloud.metastore.v1.INetworkConfig|null); + } + + /** Represents an AuxiliaryVersionConfig. */ + class AuxiliaryVersionConfig implements IAuxiliaryVersionConfig { + + /** + * Constructs a new AuxiliaryVersionConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1.IAuxiliaryVersionConfig); + + /** AuxiliaryVersionConfig version. */ + public version: string; + + /** AuxiliaryVersionConfig configOverrides. */ + public configOverrides: { [k: string]: string }; + + /** AuxiliaryVersionConfig networkConfig. */ + public networkConfig?: (google.cloud.metastore.v1.INetworkConfig|null); + + /** + * Creates a new AuxiliaryVersionConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AuxiliaryVersionConfig instance + */ + public static create(properties?: google.cloud.metastore.v1.IAuxiliaryVersionConfig): google.cloud.metastore.v1.AuxiliaryVersionConfig; + + /** + * Encodes the specified AuxiliaryVersionConfig message. Does not implicitly {@link google.cloud.metastore.v1.AuxiliaryVersionConfig.verify|verify} messages. + * @param message AuxiliaryVersionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1.IAuxiliaryVersionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuxiliaryVersionConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.AuxiliaryVersionConfig.verify|verify} messages. + * @param message AuxiliaryVersionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1.IAuxiliaryVersionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuxiliaryVersionConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuxiliaryVersionConfig + * @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.metastore.v1.AuxiliaryVersionConfig; + + /** + * Decodes an AuxiliaryVersionConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuxiliaryVersionConfig + * @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.metastore.v1.AuxiliaryVersionConfig; + + /** + * Verifies an AuxiliaryVersionConfig 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 AuxiliaryVersionConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuxiliaryVersionConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.AuxiliaryVersionConfig; + + /** + * Creates a plain object from an AuxiliaryVersionConfig message. Also converts values to other types if specified. + * @param message AuxiliaryVersionConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1.AuxiliaryVersionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuxiliaryVersionConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuxiliaryVersionConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a NetworkConfig. */ interface INetworkConfig { @@ -2243,6 +2364,125 @@ export namespace google { } } + /** Properties of a ScalingConfig. */ + interface IScalingConfig { + + /** ScalingConfig instanceSize */ + instanceSize?: (google.cloud.metastore.v1.ScalingConfig.InstanceSize|keyof typeof google.cloud.metastore.v1.ScalingConfig.InstanceSize|null); + + /** ScalingConfig scalingFactor */ + scalingFactor?: (number|null); + } + + /** Represents a ScalingConfig. */ + class ScalingConfig implements IScalingConfig { + + /** + * Constructs a new ScalingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1.IScalingConfig); + + /** ScalingConfig instanceSize. */ + public instanceSize?: (google.cloud.metastore.v1.ScalingConfig.InstanceSize|keyof typeof google.cloud.metastore.v1.ScalingConfig.InstanceSize|null); + + /** ScalingConfig scalingFactor. */ + public scalingFactor?: (number|null); + + /** ScalingConfig scalingModel. */ + public scalingModel?: ("instanceSize"|"scalingFactor"); + + /** + * Creates a new ScalingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ScalingConfig instance + */ + public static create(properties?: google.cloud.metastore.v1.IScalingConfig): google.cloud.metastore.v1.ScalingConfig; + + /** + * Encodes the specified ScalingConfig message. Does not implicitly {@link google.cloud.metastore.v1.ScalingConfig.verify|verify} messages. + * @param message ScalingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1.IScalingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ScalingConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.ScalingConfig.verify|verify} messages. + * @param message ScalingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1.IScalingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ScalingConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ScalingConfig + * @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.metastore.v1.ScalingConfig; + + /** + * Decodes a ScalingConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ScalingConfig + * @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.metastore.v1.ScalingConfig; + + /** + * Verifies a ScalingConfig 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 ScalingConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ScalingConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1.ScalingConfig; + + /** + * Creates a plain object from a ScalingConfig message. Also converts values to other types if specified. + * @param message ScalingConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1.ScalingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ScalingConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ScalingConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ScalingConfig { + + /** InstanceSize enum. */ + enum InstanceSize { + INSTANCE_SIZE_UNSPECIFIED = 0, + EXTRA_SMALL = 1, + SMALL = 2, + MEDIUM = 3, + LARGE = 4, + EXTRA_LARGE = 5 + } + } + /** Properties of a ListServicesRequest. */ interface IListServicesRequest { @@ -6214,6 +6454,9 @@ export namespace google { /** Service telemetryConfig */ telemetryConfig?: (google.cloud.metastore.v1alpha.ITelemetryConfig|null); + + /** Service scalingConfig */ + scalingConfig?: (google.cloud.metastore.v1alpha.IScalingConfig|null); } /** Represents a Service. */ @@ -6288,6 +6531,9 @@ export namespace google { /** Service telemetryConfig. */ public telemetryConfig?: (google.cloud.metastore.v1alpha.ITelemetryConfig|null); + /** Service scalingConfig. */ + public scalingConfig?: (google.cloud.metastore.v1alpha.IScalingConfig|null); + /** Service metastoreConfig. */ public metastoreConfig?: "hiveMetastoreConfig"; @@ -7453,6 +7699,9 @@ export namespace google { /** NetworkConfig consumers */ consumers?: (google.cloud.metastore.v1alpha.NetworkConfig.IConsumer[]|null); + + /** NetworkConfig customRoutesEnabled */ + customRoutesEnabled?: (boolean|null); } /** Represents a NetworkConfig. */ @@ -7467,6 +7716,9 @@ export namespace google { /** NetworkConfig consumers. */ public consumers: google.cloud.metastore.v1alpha.NetworkConfig.IConsumer[]; + /** NetworkConfig customRoutesEnabled. */ + public customRoutesEnabled: boolean; + /** * Creates a new NetworkConfig instance using the specified properties. * @param [properties] Properties to set @@ -8564,6 +8816,125 @@ export namespace google { } } + /** Properties of a ScalingConfig. */ + interface IScalingConfig { + + /** ScalingConfig instanceSize */ + instanceSize?: (google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize|keyof typeof google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize|null); + + /** ScalingConfig scalingFactor */ + scalingFactor?: (number|null); + } + + /** Represents a ScalingConfig. */ + class ScalingConfig implements IScalingConfig { + + /** + * Constructs a new ScalingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1alpha.IScalingConfig); + + /** ScalingConfig instanceSize. */ + public instanceSize?: (google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize|keyof typeof google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize|null); + + /** ScalingConfig scalingFactor. */ + public scalingFactor?: (number|null); + + /** ScalingConfig scalingModel. */ + public scalingModel?: ("instanceSize"|"scalingFactor"); + + /** + * Creates a new ScalingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ScalingConfig instance + */ + public static create(properties?: google.cloud.metastore.v1alpha.IScalingConfig): google.cloud.metastore.v1alpha.ScalingConfig; + + /** + * Encodes the specified ScalingConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.ScalingConfig.verify|verify} messages. + * @param message ScalingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1alpha.IScalingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ScalingConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.ScalingConfig.verify|verify} messages. + * @param message ScalingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1alpha.IScalingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ScalingConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ScalingConfig + * @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.metastore.v1alpha.ScalingConfig; + + /** + * Decodes a ScalingConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ScalingConfig + * @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.metastore.v1alpha.ScalingConfig; + + /** + * Verifies a ScalingConfig 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 ScalingConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ScalingConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1alpha.ScalingConfig; + + /** + * Creates a plain object from a ScalingConfig message. Also converts values to other types if specified. + * @param message ScalingConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1alpha.ScalingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ScalingConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ScalingConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ScalingConfig { + + /** InstanceSize enum. */ + enum InstanceSize { + INSTANCE_SIZE_UNSPECIFIED = 0, + EXTRA_SMALL = 1, + SMALL = 2, + MEDIUM = 3, + LARGE = 4, + EXTRA_LARGE = 5 + } + } + /** Properties of a ListServicesRequest. */ interface IListServicesRequest { @@ -12191,6 +12562,7 @@ export namespace google { /** MetastoreType enum. */ enum MetastoreType { METASTORE_TYPE_UNSPECIFIED = 0, + DATAPLEX = 1, BIGQUERY = 2, DATAPROC_METASTORE = 3 } @@ -13342,6 +13714,9 @@ export namespace google { /** Service telemetryConfig */ telemetryConfig?: (google.cloud.metastore.v1beta.ITelemetryConfig|null); + + /** Service scalingConfig */ + scalingConfig?: (google.cloud.metastore.v1beta.IScalingConfig|null); } /** Represents a Service. */ @@ -13416,6 +13791,9 @@ export namespace google { /** Service telemetryConfig. */ public telemetryConfig?: (google.cloud.metastore.v1beta.ITelemetryConfig|null); + /** Service scalingConfig. */ + public scalingConfig?: (google.cloud.metastore.v1beta.IScalingConfig|null); + /** Service metastoreConfig. */ public metastoreConfig?: "hiveMetastoreConfig"; @@ -14581,6 +14959,9 @@ export namespace google { /** NetworkConfig consumers */ consumers?: (google.cloud.metastore.v1beta.NetworkConfig.IConsumer[]|null); + + /** NetworkConfig customRoutesEnabled */ + customRoutesEnabled?: (boolean|null); } /** Represents a NetworkConfig. */ @@ -14595,6 +14976,9 @@ export namespace google { /** NetworkConfig consumers. */ public consumers: google.cloud.metastore.v1beta.NetworkConfig.IConsumer[]; + /** NetworkConfig customRoutesEnabled. */ + public customRoutesEnabled: boolean; + /** * Creates a new NetworkConfig instance using the specified properties. * @param [properties] Properties to set @@ -15692,6 +16076,125 @@ export namespace google { } } + /** Properties of a ScalingConfig. */ + interface IScalingConfig { + + /** ScalingConfig instanceSize */ + instanceSize?: (google.cloud.metastore.v1beta.ScalingConfig.InstanceSize|keyof typeof google.cloud.metastore.v1beta.ScalingConfig.InstanceSize|null); + + /** ScalingConfig scalingFactor */ + scalingFactor?: (number|null); + } + + /** Represents a ScalingConfig. */ + class ScalingConfig implements IScalingConfig { + + /** + * Constructs a new ScalingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.metastore.v1beta.IScalingConfig); + + /** ScalingConfig instanceSize. */ + public instanceSize?: (google.cloud.metastore.v1beta.ScalingConfig.InstanceSize|keyof typeof google.cloud.metastore.v1beta.ScalingConfig.InstanceSize|null); + + /** ScalingConfig scalingFactor. */ + public scalingFactor?: (number|null); + + /** ScalingConfig scalingModel. */ + public scalingModel?: ("instanceSize"|"scalingFactor"); + + /** + * Creates a new ScalingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ScalingConfig instance + */ + public static create(properties?: google.cloud.metastore.v1beta.IScalingConfig): google.cloud.metastore.v1beta.ScalingConfig; + + /** + * Encodes the specified ScalingConfig message. Does not implicitly {@link google.cloud.metastore.v1beta.ScalingConfig.verify|verify} messages. + * @param message ScalingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.metastore.v1beta.IScalingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ScalingConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.ScalingConfig.verify|verify} messages. + * @param message ScalingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.metastore.v1beta.IScalingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ScalingConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ScalingConfig + * @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.metastore.v1beta.ScalingConfig; + + /** + * Decodes a ScalingConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ScalingConfig + * @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.metastore.v1beta.ScalingConfig; + + /** + * Verifies a ScalingConfig 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 ScalingConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ScalingConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.metastore.v1beta.ScalingConfig; + + /** + * Creates a plain object from a ScalingConfig message. Also converts values to other types if specified. + * @param message ScalingConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.metastore.v1beta.ScalingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ScalingConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ScalingConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ScalingConfig { + + /** InstanceSize enum. */ + enum InstanceSize { + INSTANCE_SIZE_UNSPECIFIED = 0, + EXTRA_SMALL = 1, + SMALL = 2, + MEDIUM = 3, + LARGE = 4, + EXTRA_LARGE = 5 + } + } + /** Properties of a ListServicesRequest. */ interface IListServicesRequest { @@ -19319,6 +19822,7 @@ export namespace google { /** MetastoreType enum. */ enum MetastoreType { METASTORE_TYPE_UNSPECIFIED = 0, + DATAPLEX = 1, BIGQUERY = 2, DATAPROC_METASTORE = 3 } diff --git a/packages/google-cloud-metastore/protos/protos.js b/packages/google-cloud-metastore/protos/protos.js index ddb73b6952e..170f7a887de 100644 --- a/packages/google-cloud-metastore/protos/protos.js +++ b/packages/google-cloud-metastore/protos/protos.js @@ -622,6 +622,7 @@ * @property {google.cloud.metastore.v1.INetworkConfig|null} [networkConfig] Service networkConfig * @property {google.cloud.metastore.v1.Service.DatabaseType|null} [databaseType] Service databaseType * @property {google.cloud.metastore.v1.ITelemetryConfig|null} [telemetryConfig] Service telemetryConfig + * @property {google.cloud.metastore.v1.IScalingConfig|null} [scalingConfig] Service scalingConfig */ /** @@ -800,6 +801,14 @@ */ Service.prototype.telemetryConfig = null; + /** + * Service scalingConfig. + * @member {google.cloud.metastore.v1.IScalingConfig|null|undefined} scalingConfig + * @memberof google.cloud.metastore.v1.Service + * @instance + */ + Service.prototype.scalingConfig = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -879,6 +888,8 @@ writer.uint32(/* id 22, wireType 0 =*/176).int32(message.databaseType); if (message.telemetryConfig != null && Object.hasOwnProperty.call(message, "telemetryConfig")) $root.google.cloud.metastore.v1.TelemetryConfig.encode(message.telemetryConfig, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.scalingConfig != null && Object.hasOwnProperty.call(message, "scalingConfig")) + $root.google.cloud.metastore.v1.ScalingConfig.encode(message.scalingConfig, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); return writer; }; @@ -1012,6 +1023,10 @@ message.telemetryConfig = $root.google.cloud.metastore.v1.TelemetryConfig.decode(reader, reader.uint32()); break; } + case 24: { + message.scalingConfig = $root.google.cloud.metastore.v1.ScalingConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -1161,6 +1176,11 @@ if (error) return "telemetryConfig." + error; } + if (message.scalingConfig != null && message.hasOwnProperty("scalingConfig")) { + var error = $root.google.cloud.metastore.v1.ScalingConfig.verify(message.scalingConfig); + if (error) + return "scalingConfig." + error; + } return null; }; @@ -1337,6 +1357,11 @@ throw TypeError(".google.cloud.metastore.v1.Service.telemetryConfig: object expected"); message.telemetryConfig = $root.google.cloud.metastore.v1.TelemetryConfig.fromObject(object.telemetryConfig); } + if (object.scalingConfig != null) { + if (typeof object.scalingConfig !== "object") + throw TypeError(".google.cloud.metastore.v1.Service.scalingConfig: object expected"); + message.scalingConfig = $root.google.cloud.metastore.v1.ScalingConfig.fromObject(object.scalingConfig); + } return message; }; @@ -1374,6 +1399,7 @@ object.networkConfig = null; object.databaseType = options.enums === String ? "DATABASE_TYPE_UNSPECIFIED" : 0; object.telemetryConfig = null; + object.scalingConfig = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -1422,6 +1448,8 @@ object.databaseType = options.enums === String ? $root.google.cloud.metastore.v1.Service.DatabaseType[message.databaseType] === undefined ? message.databaseType : $root.google.cloud.metastore.v1.Service.DatabaseType[message.databaseType] : message.databaseType; if (message.telemetryConfig != null && message.hasOwnProperty("telemetryConfig")) object.telemetryConfig = $root.google.cloud.metastore.v1.TelemetryConfig.toObject(message.telemetryConfig, options); + if (message.scalingConfig != null && message.hasOwnProperty("scalingConfig")) + object.scalingConfig = $root.google.cloud.metastore.v1.ScalingConfig.toObject(message.scalingConfig, options); return object; }; @@ -1818,6 +1846,7 @@ * @property {string|null} [version] HiveMetastoreConfig version * @property {Object.|null} [configOverrides] HiveMetastoreConfig configOverrides * @property {google.cloud.metastore.v1.IKerberosConfig|null} [kerberosConfig] HiveMetastoreConfig kerberosConfig + * @property {Object.|null} [auxiliaryVersions] HiveMetastoreConfig auxiliaryVersions */ /** @@ -1830,6 +1859,7 @@ */ function HiveMetastoreConfig(properties) { this.configOverrides = {}; + this.auxiliaryVersions = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1860,6 +1890,14 @@ */ HiveMetastoreConfig.prototype.kerberosConfig = null; + /** + * HiveMetastoreConfig auxiliaryVersions. + * @member {Object.} auxiliaryVersions + * @memberof google.cloud.metastore.v1.HiveMetastoreConfig + * @instance + */ + HiveMetastoreConfig.prototype.auxiliaryVersions = $util.emptyObject; + /** * Creates a new HiveMetastoreConfig instance using the specified properties. * @function create @@ -1891,6 +1929,11 @@ writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.configOverrides[keys[i]]).ldelim(); if (message.kerberosConfig != null && Object.hasOwnProperty.call(message, "kerberosConfig")) $root.google.cloud.metastore.v1.KerberosConfig.encode(message.kerberosConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.auxiliaryVersions != null && Object.hasOwnProperty.call(message, "auxiliaryVersions")) + for (var keys = Object.keys(message.auxiliaryVersions), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.metastore.v1.AuxiliaryVersionConfig.encode(message.auxiliaryVersions[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } return writer; }; @@ -1956,6 +1999,29 @@ message.kerberosConfig = $root.google.cloud.metastore.v1.KerberosConfig.decode(reader, reader.uint32()); break; } + case 5: { + if (message.auxiliaryVersions === $util.emptyObject) + message.auxiliaryVersions = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.metastore.v1.AuxiliaryVersionConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.auxiliaryVersions[key] = value; + break; + } default: reader.skipType(tag & 7); break; @@ -2007,6 +2073,16 @@ if (error) return "kerberosConfig." + error; } + if (message.auxiliaryVersions != null && message.hasOwnProperty("auxiliaryVersions")) { + if (!$util.isObject(message.auxiliaryVersions)) + return "auxiliaryVersions: object expected"; + var key = Object.keys(message.auxiliaryVersions); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.metastore.v1.AuxiliaryVersionConfig.verify(message.auxiliaryVersions[key[i]]); + if (error) + return "auxiliaryVersions." + error; + } + } return null; }; @@ -2036,6 +2112,16 @@ throw TypeError(".google.cloud.metastore.v1.HiveMetastoreConfig.kerberosConfig: object expected"); message.kerberosConfig = $root.google.cloud.metastore.v1.KerberosConfig.fromObject(object.kerberosConfig); } + if (object.auxiliaryVersions) { + if (typeof object.auxiliaryVersions !== "object") + throw TypeError(".google.cloud.metastore.v1.HiveMetastoreConfig.auxiliaryVersions: object expected"); + message.auxiliaryVersions = {}; + for (var keys = Object.keys(object.auxiliaryVersions), i = 0; i < keys.length; ++i) { + if (typeof object.auxiliaryVersions[keys[i]] !== "object") + throw TypeError(".google.cloud.metastore.v1.HiveMetastoreConfig.auxiliaryVersions: object expected"); + message.auxiliaryVersions[keys[i]] = $root.google.cloud.metastore.v1.AuxiliaryVersionConfig.fromObject(object.auxiliaryVersions[keys[i]]); + } + } return message; }; @@ -2052,8 +2138,10 @@ if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) + if (options.objects || options.defaults) { object.configOverrides = {}; + object.auxiliaryVersions = {}; + } if (options.defaults) { object.version = ""; object.kerberosConfig = null; @@ -2068,6 +2156,11 @@ } if (message.kerberosConfig != null && message.hasOwnProperty("kerberosConfig")) object.kerberosConfig = $root.google.cloud.metastore.v1.KerberosConfig.toObject(message.kerberosConfig, options); + if (message.auxiliaryVersions && (keys2 = Object.keys(message.auxiliaryVersions)).length) { + object.auxiliaryVersions = {}; + for (var j = 0; j < keys2.length; ++j) + object.auxiliaryVersions[keys2[j]] = $root.google.cloud.metastore.v1.AuxiliaryVersionConfig.toObject(message.auxiliaryVersions[keys2[j]], options); + } return object; }; @@ -2779,6 +2872,297 @@ return EncryptionConfig; })(); + v1.AuxiliaryVersionConfig = (function() { + + /** + * Properties of an AuxiliaryVersionConfig. + * @memberof google.cloud.metastore.v1 + * @interface IAuxiliaryVersionConfig + * @property {string|null} [version] AuxiliaryVersionConfig version + * @property {Object.|null} [configOverrides] AuxiliaryVersionConfig configOverrides + * @property {google.cloud.metastore.v1.INetworkConfig|null} [networkConfig] AuxiliaryVersionConfig networkConfig + */ + + /** + * Constructs a new AuxiliaryVersionConfig. + * @memberof google.cloud.metastore.v1 + * @classdesc Represents an AuxiliaryVersionConfig. + * @implements IAuxiliaryVersionConfig + * @constructor + * @param {google.cloud.metastore.v1.IAuxiliaryVersionConfig=} [properties] Properties to set + */ + function AuxiliaryVersionConfig(properties) { + this.configOverrides = {}; + 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]]; + } + + /** + * AuxiliaryVersionConfig version. + * @member {string} version + * @memberof google.cloud.metastore.v1.AuxiliaryVersionConfig + * @instance + */ + AuxiliaryVersionConfig.prototype.version = ""; + + /** + * AuxiliaryVersionConfig configOverrides. + * @member {Object.} configOverrides + * @memberof google.cloud.metastore.v1.AuxiliaryVersionConfig + * @instance + */ + AuxiliaryVersionConfig.prototype.configOverrides = $util.emptyObject; + + /** + * AuxiliaryVersionConfig networkConfig. + * @member {google.cloud.metastore.v1.INetworkConfig|null|undefined} networkConfig + * @memberof google.cloud.metastore.v1.AuxiliaryVersionConfig + * @instance + */ + AuxiliaryVersionConfig.prototype.networkConfig = null; + + /** + * Creates a new AuxiliaryVersionConfig instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1.AuxiliaryVersionConfig + * @static + * @param {google.cloud.metastore.v1.IAuxiliaryVersionConfig=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.AuxiliaryVersionConfig} AuxiliaryVersionConfig instance + */ + AuxiliaryVersionConfig.create = function create(properties) { + return new AuxiliaryVersionConfig(properties); + }; + + /** + * Encodes the specified AuxiliaryVersionConfig message. Does not implicitly {@link google.cloud.metastore.v1.AuxiliaryVersionConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1.AuxiliaryVersionConfig + * @static + * @param {google.cloud.metastore.v1.IAuxiliaryVersionConfig} message AuxiliaryVersionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuxiliaryVersionConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.configOverrides != null && Object.hasOwnProperty.call(message, "configOverrides")) + for (var keys = Object.keys(message.configOverrides), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.configOverrides[keys[i]]).ldelim(); + if (message.networkConfig != null && Object.hasOwnProperty.call(message, "networkConfig")) + $root.google.cloud.metastore.v1.NetworkConfig.encode(message.networkConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AuxiliaryVersionConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.AuxiliaryVersionConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1.AuxiliaryVersionConfig + * @static + * @param {google.cloud.metastore.v1.IAuxiliaryVersionConfig} message AuxiliaryVersionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuxiliaryVersionConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuxiliaryVersionConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1.AuxiliaryVersionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1.AuxiliaryVersionConfig} AuxiliaryVersionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuxiliaryVersionConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.AuxiliaryVersionConfig(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + if (message.configOverrides === $util.emptyObject) + message.configOverrides = {}; + 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.configOverrides[key] = value; + break; + } + case 3: { + message.networkConfig = $root.google.cloud.metastore.v1.NetworkConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuxiliaryVersionConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1.AuxiliaryVersionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1.AuxiliaryVersionConfig} AuxiliaryVersionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuxiliaryVersionConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuxiliaryVersionConfig message. + * @function verify + * @memberof google.cloud.metastore.v1.AuxiliaryVersionConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuxiliaryVersionConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.configOverrides != null && message.hasOwnProperty("configOverrides")) { + if (!$util.isObject(message.configOverrides)) + return "configOverrides: object expected"; + var key = Object.keys(message.configOverrides); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.configOverrides[key[i]])) + return "configOverrides: string{k:string} expected"; + } + if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) { + var error = $root.google.cloud.metastore.v1.NetworkConfig.verify(message.networkConfig); + if (error) + return "networkConfig." + error; + } + return null; + }; + + /** + * Creates an AuxiliaryVersionConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1.AuxiliaryVersionConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1.AuxiliaryVersionConfig} AuxiliaryVersionConfig + */ + AuxiliaryVersionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.AuxiliaryVersionConfig) + return object; + var message = new $root.google.cloud.metastore.v1.AuxiliaryVersionConfig(); + if (object.version != null) + message.version = String(object.version); + if (object.configOverrides) { + if (typeof object.configOverrides !== "object") + throw TypeError(".google.cloud.metastore.v1.AuxiliaryVersionConfig.configOverrides: object expected"); + message.configOverrides = {}; + for (var keys = Object.keys(object.configOverrides), i = 0; i < keys.length; ++i) + message.configOverrides[keys[i]] = String(object.configOverrides[keys[i]]); + } + if (object.networkConfig != null) { + if (typeof object.networkConfig !== "object") + throw TypeError(".google.cloud.metastore.v1.AuxiliaryVersionConfig.networkConfig: object expected"); + message.networkConfig = $root.google.cloud.metastore.v1.NetworkConfig.fromObject(object.networkConfig); + } + return message; + }; + + /** + * Creates a plain object from an AuxiliaryVersionConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1.AuxiliaryVersionConfig + * @static + * @param {google.cloud.metastore.v1.AuxiliaryVersionConfig} message AuxiliaryVersionConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuxiliaryVersionConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.configOverrides = {}; + if (options.defaults) { + object.version = ""; + object.networkConfig = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + var keys2; + if (message.configOverrides && (keys2 = Object.keys(message.configOverrides)).length) { + object.configOverrides = {}; + for (var j = 0; j < keys2.length; ++j) + object.configOverrides[keys2[j]] = message.configOverrides[keys2[j]]; + } + if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) + object.networkConfig = $root.google.cloud.metastore.v1.NetworkConfig.toObject(message.networkConfig, options); + return object; + }; + + /** + * Converts this AuxiliaryVersionConfig to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1.AuxiliaryVersionConfig + * @instance + * @returns {Object.} JSON object + */ + AuxiliaryVersionConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuxiliaryVersionConfig + * @function getTypeUrl + * @memberof google.cloud.metastore.v1.AuxiliaryVersionConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuxiliaryVersionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1.AuxiliaryVersionConfig"; + }; + + return AuxiliaryVersionConfig; + })(); + v1.NetworkConfig = (function() { /** @@ -5764,6 +6148,317 @@ return Restore; })(); + v1.ScalingConfig = (function() { + + /** + * Properties of a ScalingConfig. + * @memberof google.cloud.metastore.v1 + * @interface IScalingConfig + * @property {google.cloud.metastore.v1.ScalingConfig.InstanceSize|null} [instanceSize] ScalingConfig instanceSize + * @property {number|null} [scalingFactor] ScalingConfig scalingFactor + */ + + /** + * Constructs a new ScalingConfig. + * @memberof google.cloud.metastore.v1 + * @classdesc Represents a ScalingConfig. + * @implements IScalingConfig + * @constructor + * @param {google.cloud.metastore.v1.IScalingConfig=} [properties] Properties to set + */ + function ScalingConfig(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]]; + } + + /** + * ScalingConfig instanceSize. + * @member {google.cloud.metastore.v1.ScalingConfig.InstanceSize|null|undefined} instanceSize + * @memberof google.cloud.metastore.v1.ScalingConfig + * @instance + */ + ScalingConfig.prototype.instanceSize = null; + + /** + * ScalingConfig scalingFactor. + * @member {number|null|undefined} scalingFactor + * @memberof google.cloud.metastore.v1.ScalingConfig + * @instance + */ + ScalingConfig.prototype.scalingFactor = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ScalingConfig scalingModel. + * @member {"instanceSize"|"scalingFactor"|undefined} scalingModel + * @memberof google.cloud.metastore.v1.ScalingConfig + * @instance + */ + Object.defineProperty(ScalingConfig.prototype, "scalingModel", { + get: $util.oneOfGetter($oneOfFields = ["instanceSize", "scalingFactor"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ScalingConfig instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1.ScalingConfig + * @static + * @param {google.cloud.metastore.v1.IScalingConfig=} [properties] Properties to set + * @returns {google.cloud.metastore.v1.ScalingConfig} ScalingConfig instance + */ + ScalingConfig.create = function create(properties) { + return new ScalingConfig(properties); + }; + + /** + * Encodes the specified ScalingConfig message. Does not implicitly {@link google.cloud.metastore.v1.ScalingConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1.ScalingConfig + * @static + * @param {google.cloud.metastore.v1.IScalingConfig} message ScalingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScalingConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.instanceSize != null && Object.hasOwnProperty.call(message, "instanceSize")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.instanceSize); + if (message.scalingFactor != null && Object.hasOwnProperty.call(message, "scalingFactor")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.scalingFactor); + return writer; + }; + + /** + * Encodes the specified ScalingConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1.ScalingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1.ScalingConfig + * @static + * @param {google.cloud.metastore.v1.IScalingConfig} message ScalingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScalingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ScalingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1.ScalingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1.ScalingConfig} ScalingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScalingConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1.ScalingConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.instanceSize = reader.int32(); + break; + } + case 2: { + message.scalingFactor = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ScalingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1.ScalingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1.ScalingConfig} ScalingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScalingConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ScalingConfig message. + * @function verify + * @memberof google.cloud.metastore.v1.ScalingConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ScalingConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.instanceSize != null && message.hasOwnProperty("instanceSize")) { + properties.scalingModel = 1; + switch (message.instanceSize) { + default: + return "instanceSize: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + } + if (message.scalingFactor != null && message.hasOwnProperty("scalingFactor")) { + if (properties.scalingModel === 1) + return "scalingModel: multiple values"; + properties.scalingModel = 1; + if (typeof message.scalingFactor !== "number") + return "scalingFactor: number expected"; + } + return null; + }; + + /** + * Creates a ScalingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1.ScalingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1.ScalingConfig} ScalingConfig + */ + ScalingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1.ScalingConfig) + return object; + var message = new $root.google.cloud.metastore.v1.ScalingConfig(); + switch (object.instanceSize) { + default: + if (typeof object.instanceSize === "number") { + message.instanceSize = object.instanceSize; + break; + } + break; + case "INSTANCE_SIZE_UNSPECIFIED": + case 0: + message.instanceSize = 0; + break; + case "EXTRA_SMALL": + case 1: + message.instanceSize = 1; + break; + case "SMALL": + case 2: + message.instanceSize = 2; + break; + case "MEDIUM": + case 3: + message.instanceSize = 3; + break; + case "LARGE": + case 4: + message.instanceSize = 4; + break; + case "EXTRA_LARGE": + case 5: + message.instanceSize = 5; + break; + } + if (object.scalingFactor != null) + message.scalingFactor = Number(object.scalingFactor); + return message; + }; + + /** + * Creates a plain object from a ScalingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1.ScalingConfig + * @static + * @param {google.cloud.metastore.v1.ScalingConfig} message ScalingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ScalingConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.instanceSize != null && message.hasOwnProperty("instanceSize")) { + object.instanceSize = options.enums === String ? $root.google.cloud.metastore.v1.ScalingConfig.InstanceSize[message.instanceSize] === undefined ? message.instanceSize : $root.google.cloud.metastore.v1.ScalingConfig.InstanceSize[message.instanceSize] : message.instanceSize; + if (options.oneofs) + object.scalingModel = "instanceSize"; + } + if (message.scalingFactor != null && message.hasOwnProperty("scalingFactor")) { + object.scalingFactor = options.json && !isFinite(message.scalingFactor) ? String(message.scalingFactor) : message.scalingFactor; + if (options.oneofs) + object.scalingModel = "scalingFactor"; + } + return object; + }; + + /** + * Converts this ScalingConfig to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1.ScalingConfig + * @instance + * @returns {Object.} JSON object + */ + ScalingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ScalingConfig + * @function getTypeUrl + * @memberof google.cloud.metastore.v1.ScalingConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ScalingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1.ScalingConfig"; + }; + + /** + * InstanceSize enum. + * @name google.cloud.metastore.v1.ScalingConfig.InstanceSize + * @enum {number} + * @property {number} INSTANCE_SIZE_UNSPECIFIED=0 INSTANCE_SIZE_UNSPECIFIED value + * @property {number} EXTRA_SMALL=1 EXTRA_SMALL value + * @property {number} SMALL=2 SMALL value + * @property {number} MEDIUM=3 MEDIUM value + * @property {number} LARGE=4 LARGE value + * @property {number} EXTRA_LARGE=5 EXTRA_LARGE value + */ + ScalingConfig.InstanceSize = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INSTANCE_SIZE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EXTRA_SMALL"] = 1; + values[valuesById[2] = "SMALL"] = 2; + values[valuesById[3] = "MEDIUM"] = 3; + values[valuesById[4] = "LARGE"] = 4; + values[valuesById[5] = "EXTRA_LARGE"] = 5; + return values; + })(); + + return ScalingConfig; + })(); + v1.ListServicesRequest = (function() { /** @@ -14817,6 +15512,7 @@ * @property {google.cloud.metastore.v1alpha.INetworkConfig|null} [networkConfig] Service networkConfig * @property {google.cloud.metastore.v1alpha.Service.DatabaseType|null} [databaseType] Service databaseType * @property {google.cloud.metastore.v1alpha.ITelemetryConfig|null} [telemetryConfig] Service telemetryConfig + * @property {google.cloud.metastore.v1alpha.IScalingConfig|null} [scalingConfig] Service scalingConfig */ /** @@ -15003,6 +15699,14 @@ */ Service.prototype.telemetryConfig = null; + /** + * Service scalingConfig. + * @member {google.cloud.metastore.v1alpha.IScalingConfig|null|undefined} scalingConfig + * @memberof google.cloud.metastore.v1alpha.Service + * @instance + */ + Service.prototype.scalingConfig = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -15084,6 +15788,8 @@ writer.uint32(/* id 22, wireType 0 =*/176).int32(message.databaseType); if (message.telemetryConfig != null && Object.hasOwnProperty.call(message, "telemetryConfig")) $root.google.cloud.metastore.v1alpha.TelemetryConfig.encode(message.telemetryConfig, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.scalingConfig != null && Object.hasOwnProperty.call(message, "scalingConfig")) + $root.google.cloud.metastore.v1alpha.ScalingConfig.encode(message.scalingConfig, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); return writer; }; @@ -15221,6 +15927,10 @@ message.telemetryConfig = $root.google.cloud.metastore.v1alpha.TelemetryConfig.decode(reader, reader.uint32()); break; } + case 24: { + message.scalingConfig = $root.google.cloud.metastore.v1alpha.ScalingConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -15375,6 +16085,11 @@ if (error) return "telemetryConfig." + error; } + if (message.scalingConfig != null && message.hasOwnProperty("scalingConfig")) { + var error = $root.google.cloud.metastore.v1alpha.ScalingConfig.verify(message.scalingConfig); + if (error) + return "scalingConfig." + error; + } return null; }; @@ -15556,6 +16271,11 @@ throw TypeError(".google.cloud.metastore.v1alpha.Service.telemetryConfig: object expected"); message.telemetryConfig = $root.google.cloud.metastore.v1alpha.TelemetryConfig.fromObject(object.telemetryConfig); } + if (object.scalingConfig != null) { + if (typeof object.scalingConfig !== "object") + throw TypeError(".google.cloud.metastore.v1alpha.Service.scalingConfig: object expected"); + message.scalingConfig = $root.google.cloud.metastore.v1alpha.ScalingConfig.fromObject(object.scalingConfig); + } return message; }; @@ -15594,6 +16314,7 @@ object.networkConfig = null; object.databaseType = options.enums === String ? "DATABASE_TYPE_UNSPECIFIED" : 0; object.telemetryConfig = null; + object.scalingConfig = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -15644,6 +16365,8 @@ object.databaseType = options.enums === String ? $root.google.cloud.metastore.v1alpha.Service.DatabaseType[message.databaseType] === undefined ? message.databaseType : $root.google.cloud.metastore.v1alpha.Service.DatabaseType[message.databaseType] : message.databaseType; if (message.telemetryConfig != null && message.hasOwnProperty("telemetryConfig")) object.telemetryConfig = $root.google.cloud.metastore.v1alpha.TelemetryConfig.toObject(message.telemetryConfig, options); + if (message.scalingConfig != null && message.hasOwnProperty("scalingConfig")) + object.scalingConfig = $root.google.cloud.metastore.v1alpha.ScalingConfig.toObject(message.scalingConfig, options); return object; }; @@ -18315,6 +19038,7 @@ * @memberof google.cloud.metastore.v1alpha * @interface INetworkConfig * @property {Array.|null} [consumers] NetworkConfig consumers + * @property {boolean|null} [customRoutesEnabled] NetworkConfig customRoutesEnabled */ /** @@ -18341,6 +19065,14 @@ */ NetworkConfig.prototype.consumers = $util.emptyArray; + /** + * NetworkConfig customRoutesEnabled. + * @member {boolean} customRoutesEnabled + * @memberof google.cloud.metastore.v1alpha.NetworkConfig + * @instance + */ + NetworkConfig.prototype.customRoutesEnabled = false; + /** * Creates a new NetworkConfig instance using the specified properties. * @function create @@ -18368,6 +19100,8 @@ if (message.consumers != null && message.consumers.length) for (var i = 0; i < message.consumers.length; ++i) $root.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.encode(message.consumers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.customRoutesEnabled != null && Object.hasOwnProperty.call(message, "customRoutesEnabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.customRoutesEnabled); return writer; }; @@ -18408,6 +19142,10 @@ message.consumers.push($root.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.decode(reader, reader.uint32())); break; } + case 2: { + message.customRoutesEnabled = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -18452,6 +19190,9 @@ return "consumers." + error; } } + if (message.customRoutesEnabled != null && message.hasOwnProperty("customRoutesEnabled")) + if (typeof message.customRoutesEnabled !== "boolean") + return "customRoutesEnabled: boolean expected"; return null; }; @@ -18477,6 +19218,8 @@ message.consumers[i] = $root.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.fromObject(object.consumers[i]); } } + if (object.customRoutesEnabled != null) + message.customRoutesEnabled = Boolean(object.customRoutesEnabled); return message; }; @@ -18495,11 +19238,15 @@ var object = {}; if (options.arrays || options.defaults) object.consumers = []; + if (options.defaults) + object.customRoutesEnabled = false; if (message.consumers && message.consumers.length) { object.consumers = []; for (var j = 0; j < message.consumers.length; ++j) object.consumers[j] = $root.google.cloud.metastore.v1alpha.NetworkConfig.Consumer.toObject(message.consumers[j], options); } + if (message.customRoutesEnabled != null && message.hasOwnProperty("customRoutesEnabled")) + object.customRoutesEnabled = message.customRoutesEnabled; return object; }; @@ -21316,6 +22063,317 @@ return Restore; })(); + v1alpha.ScalingConfig = (function() { + + /** + * Properties of a ScalingConfig. + * @memberof google.cloud.metastore.v1alpha + * @interface IScalingConfig + * @property {google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize|null} [instanceSize] ScalingConfig instanceSize + * @property {number|null} [scalingFactor] ScalingConfig scalingFactor + */ + + /** + * Constructs a new ScalingConfig. + * @memberof google.cloud.metastore.v1alpha + * @classdesc Represents a ScalingConfig. + * @implements IScalingConfig + * @constructor + * @param {google.cloud.metastore.v1alpha.IScalingConfig=} [properties] Properties to set + */ + function ScalingConfig(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]]; + } + + /** + * ScalingConfig instanceSize. + * @member {google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize|null|undefined} instanceSize + * @memberof google.cloud.metastore.v1alpha.ScalingConfig + * @instance + */ + ScalingConfig.prototype.instanceSize = null; + + /** + * ScalingConfig scalingFactor. + * @member {number|null|undefined} scalingFactor + * @memberof google.cloud.metastore.v1alpha.ScalingConfig + * @instance + */ + ScalingConfig.prototype.scalingFactor = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ScalingConfig scalingModel. + * @member {"instanceSize"|"scalingFactor"|undefined} scalingModel + * @memberof google.cloud.metastore.v1alpha.ScalingConfig + * @instance + */ + Object.defineProperty(ScalingConfig.prototype, "scalingModel", { + get: $util.oneOfGetter($oneOfFields = ["instanceSize", "scalingFactor"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ScalingConfig instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1alpha.ScalingConfig + * @static + * @param {google.cloud.metastore.v1alpha.IScalingConfig=} [properties] Properties to set + * @returns {google.cloud.metastore.v1alpha.ScalingConfig} ScalingConfig instance + */ + ScalingConfig.create = function create(properties) { + return new ScalingConfig(properties); + }; + + /** + * Encodes the specified ScalingConfig message. Does not implicitly {@link google.cloud.metastore.v1alpha.ScalingConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1alpha.ScalingConfig + * @static + * @param {google.cloud.metastore.v1alpha.IScalingConfig} message ScalingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScalingConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.instanceSize != null && Object.hasOwnProperty.call(message, "instanceSize")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.instanceSize); + if (message.scalingFactor != null && Object.hasOwnProperty.call(message, "scalingFactor")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.scalingFactor); + return writer; + }; + + /** + * Encodes the specified ScalingConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1alpha.ScalingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1alpha.ScalingConfig + * @static + * @param {google.cloud.metastore.v1alpha.IScalingConfig} message ScalingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScalingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ScalingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1alpha.ScalingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1alpha.ScalingConfig} ScalingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScalingConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1alpha.ScalingConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.instanceSize = reader.int32(); + break; + } + case 2: { + message.scalingFactor = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ScalingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1alpha.ScalingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1alpha.ScalingConfig} ScalingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScalingConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ScalingConfig message. + * @function verify + * @memberof google.cloud.metastore.v1alpha.ScalingConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ScalingConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.instanceSize != null && message.hasOwnProperty("instanceSize")) { + properties.scalingModel = 1; + switch (message.instanceSize) { + default: + return "instanceSize: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + } + if (message.scalingFactor != null && message.hasOwnProperty("scalingFactor")) { + if (properties.scalingModel === 1) + return "scalingModel: multiple values"; + properties.scalingModel = 1; + if (typeof message.scalingFactor !== "number") + return "scalingFactor: number expected"; + } + return null; + }; + + /** + * Creates a ScalingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1alpha.ScalingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1alpha.ScalingConfig} ScalingConfig + */ + ScalingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1alpha.ScalingConfig) + return object; + var message = new $root.google.cloud.metastore.v1alpha.ScalingConfig(); + switch (object.instanceSize) { + default: + if (typeof object.instanceSize === "number") { + message.instanceSize = object.instanceSize; + break; + } + break; + case "INSTANCE_SIZE_UNSPECIFIED": + case 0: + message.instanceSize = 0; + break; + case "EXTRA_SMALL": + case 1: + message.instanceSize = 1; + break; + case "SMALL": + case 2: + message.instanceSize = 2; + break; + case "MEDIUM": + case 3: + message.instanceSize = 3; + break; + case "LARGE": + case 4: + message.instanceSize = 4; + break; + case "EXTRA_LARGE": + case 5: + message.instanceSize = 5; + break; + } + if (object.scalingFactor != null) + message.scalingFactor = Number(object.scalingFactor); + return message; + }; + + /** + * Creates a plain object from a ScalingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1alpha.ScalingConfig + * @static + * @param {google.cloud.metastore.v1alpha.ScalingConfig} message ScalingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ScalingConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.instanceSize != null && message.hasOwnProperty("instanceSize")) { + object.instanceSize = options.enums === String ? $root.google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize[message.instanceSize] === undefined ? message.instanceSize : $root.google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize[message.instanceSize] : message.instanceSize; + if (options.oneofs) + object.scalingModel = "instanceSize"; + } + if (message.scalingFactor != null && message.hasOwnProperty("scalingFactor")) { + object.scalingFactor = options.json && !isFinite(message.scalingFactor) ? String(message.scalingFactor) : message.scalingFactor; + if (options.oneofs) + object.scalingModel = "scalingFactor"; + } + return object; + }; + + /** + * Converts this ScalingConfig to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1alpha.ScalingConfig + * @instance + * @returns {Object.} JSON object + */ + ScalingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ScalingConfig + * @function getTypeUrl + * @memberof google.cloud.metastore.v1alpha.ScalingConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ScalingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1alpha.ScalingConfig"; + }; + + /** + * InstanceSize enum. + * @name google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize + * @enum {number} + * @property {number} INSTANCE_SIZE_UNSPECIFIED=0 INSTANCE_SIZE_UNSPECIFIED value + * @property {number} EXTRA_SMALL=1 EXTRA_SMALL value + * @property {number} SMALL=2 SMALL value + * @property {number} MEDIUM=3 MEDIUM value + * @property {number} LARGE=4 LARGE value + * @property {number} EXTRA_LARGE=5 EXTRA_LARGE value + */ + ScalingConfig.InstanceSize = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INSTANCE_SIZE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EXTRA_SMALL"] = 1; + values[valuesById[2] = "SMALL"] = 2; + values[valuesById[3] = "MEDIUM"] = 3; + values[valuesById[4] = "LARGE"] = 4; + values[valuesById[5] = "EXTRA_LARGE"] = 5; + return values; + })(); + + return ScalingConfig; + })(); + v1alpha.ListServicesRequest = (function() { /** @@ -29743,6 +30801,7 @@ default: return "metastoreType: enum value expected"; case 0: + case 1: case 2: case 3: break; @@ -29775,6 +30834,10 @@ case 0: message.metastoreType = 0; break; + case "DATAPLEX": + case 1: + message.metastoreType = 1; + break; case "BIGQUERY": case 2: message.metastoreType = 2; @@ -29842,12 +30905,14 @@ * @name google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType * @enum {number} * @property {number} METASTORE_TYPE_UNSPECIFIED=0 METASTORE_TYPE_UNSPECIFIED value + * @property {number} DATAPLEX=1 DATAPLEX value * @property {number} BIGQUERY=2 BIGQUERY value * @property {number} DATAPROC_METASTORE=3 DATAPROC_METASTORE value */ BackendMetastore.MetastoreType = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "METASTORE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DATAPLEX"] = 1; values[valuesById[2] = "BIGQUERY"] = 2; values[valuesById[3] = "DATAPROC_METASTORE"] = 3; return values; @@ -32109,6 +33174,7 @@ * @property {google.cloud.metastore.v1beta.INetworkConfig|null} [networkConfig] Service networkConfig * @property {google.cloud.metastore.v1beta.Service.DatabaseType|null} [databaseType] Service databaseType * @property {google.cloud.metastore.v1beta.ITelemetryConfig|null} [telemetryConfig] Service telemetryConfig + * @property {google.cloud.metastore.v1beta.IScalingConfig|null} [scalingConfig] Service scalingConfig */ /** @@ -32295,6 +33361,14 @@ */ Service.prototype.telemetryConfig = null; + /** + * Service scalingConfig. + * @member {google.cloud.metastore.v1beta.IScalingConfig|null|undefined} scalingConfig + * @memberof google.cloud.metastore.v1beta.Service + * @instance + */ + Service.prototype.scalingConfig = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -32376,6 +33450,8 @@ writer.uint32(/* id 22, wireType 0 =*/176).int32(message.databaseType); if (message.telemetryConfig != null && Object.hasOwnProperty.call(message, "telemetryConfig")) $root.google.cloud.metastore.v1beta.TelemetryConfig.encode(message.telemetryConfig, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.scalingConfig != null && Object.hasOwnProperty.call(message, "scalingConfig")) + $root.google.cloud.metastore.v1beta.ScalingConfig.encode(message.scalingConfig, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); return writer; }; @@ -32513,6 +33589,10 @@ message.telemetryConfig = $root.google.cloud.metastore.v1beta.TelemetryConfig.decode(reader, reader.uint32()); break; } + case 24: { + message.scalingConfig = $root.google.cloud.metastore.v1beta.ScalingConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -32667,6 +33747,11 @@ if (error) return "telemetryConfig." + error; } + if (message.scalingConfig != null && message.hasOwnProperty("scalingConfig")) { + var error = $root.google.cloud.metastore.v1beta.ScalingConfig.verify(message.scalingConfig); + if (error) + return "scalingConfig." + error; + } return null; }; @@ -32848,6 +33933,11 @@ throw TypeError(".google.cloud.metastore.v1beta.Service.telemetryConfig: object expected"); message.telemetryConfig = $root.google.cloud.metastore.v1beta.TelemetryConfig.fromObject(object.telemetryConfig); } + if (object.scalingConfig != null) { + if (typeof object.scalingConfig !== "object") + throw TypeError(".google.cloud.metastore.v1beta.Service.scalingConfig: object expected"); + message.scalingConfig = $root.google.cloud.metastore.v1beta.ScalingConfig.fromObject(object.scalingConfig); + } return message; }; @@ -32886,6 +33976,7 @@ object.networkConfig = null; object.databaseType = options.enums === String ? "DATABASE_TYPE_UNSPECIFIED" : 0; object.telemetryConfig = null; + object.scalingConfig = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -32936,6 +34027,8 @@ object.databaseType = options.enums === String ? $root.google.cloud.metastore.v1beta.Service.DatabaseType[message.databaseType] === undefined ? message.databaseType : $root.google.cloud.metastore.v1beta.Service.DatabaseType[message.databaseType] : message.databaseType; if (message.telemetryConfig != null && message.hasOwnProperty("telemetryConfig")) object.telemetryConfig = $root.google.cloud.metastore.v1beta.TelemetryConfig.toObject(message.telemetryConfig, options); + if (message.scalingConfig != null && message.hasOwnProperty("scalingConfig")) + object.scalingConfig = $root.google.cloud.metastore.v1beta.ScalingConfig.toObject(message.scalingConfig, options); return object; }; @@ -35607,6 +36700,7 @@ * @memberof google.cloud.metastore.v1beta * @interface INetworkConfig * @property {Array.|null} [consumers] NetworkConfig consumers + * @property {boolean|null} [customRoutesEnabled] NetworkConfig customRoutesEnabled */ /** @@ -35633,6 +36727,14 @@ */ NetworkConfig.prototype.consumers = $util.emptyArray; + /** + * NetworkConfig customRoutesEnabled. + * @member {boolean} customRoutesEnabled + * @memberof google.cloud.metastore.v1beta.NetworkConfig + * @instance + */ + NetworkConfig.prototype.customRoutesEnabled = false; + /** * Creates a new NetworkConfig instance using the specified properties. * @function create @@ -35660,6 +36762,8 @@ if (message.consumers != null && message.consumers.length) for (var i = 0; i < message.consumers.length; ++i) $root.google.cloud.metastore.v1beta.NetworkConfig.Consumer.encode(message.consumers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.customRoutesEnabled != null && Object.hasOwnProperty.call(message, "customRoutesEnabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.customRoutesEnabled); return writer; }; @@ -35700,6 +36804,10 @@ message.consumers.push($root.google.cloud.metastore.v1beta.NetworkConfig.Consumer.decode(reader, reader.uint32())); break; } + case 2: { + message.customRoutesEnabled = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -35744,6 +36852,9 @@ return "consumers." + error; } } + if (message.customRoutesEnabled != null && message.hasOwnProperty("customRoutesEnabled")) + if (typeof message.customRoutesEnabled !== "boolean") + return "customRoutesEnabled: boolean expected"; return null; }; @@ -35769,6 +36880,8 @@ message.consumers[i] = $root.google.cloud.metastore.v1beta.NetworkConfig.Consumer.fromObject(object.consumers[i]); } } + if (object.customRoutesEnabled != null) + message.customRoutesEnabled = Boolean(object.customRoutesEnabled); return message; }; @@ -35787,11 +36900,15 @@ var object = {}; if (options.arrays || options.defaults) object.consumers = []; + if (options.defaults) + object.customRoutesEnabled = false; if (message.consumers && message.consumers.length) { object.consumers = []; for (var j = 0; j < message.consumers.length; ++j) object.consumers[j] = $root.google.cloud.metastore.v1beta.NetworkConfig.Consumer.toObject(message.consumers[j], options); } + if (message.customRoutesEnabled != null && message.hasOwnProperty("customRoutesEnabled")) + object.customRoutesEnabled = message.customRoutesEnabled; return object; }; @@ -38608,6 +39725,317 @@ return Restore; })(); + v1beta.ScalingConfig = (function() { + + /** + * Properties of a ScalingConfig. + * @memberof google.cloud.metastore.v1beta + * @interface IScalingConfig + * @property {google.cloud.metastore.v1beta.ScalingConfig.InstanceSize|null} [instanceSize] ScalingConfig instanceSize + * @property {number|null} [scalingFactor] ScalingConfig scalingFactor + */ + + /** + * Constructs a new ScalingConfig. + * @memberof google.cloud.metastore.v1beta + * @classdesc Represents a ScalingConfig. + * @implements IScalingConfig + * @constructor + * @param {google.cloud.metastore.v1beta.IScalingConfig=} [properties] Properties to set + */ + function ScalingConfig(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]]; + } + + /** + * ScalingConfig instanceSize. + * @member {google.cloud.metastore.v1beta.ScalingConfig.InstanceSize|null|undefined} instanceSize + * @memberof google.cloud.metastore.v1beta.ScalingConfig + * @instance + */ + ScalingConfig.prototype.instanceSize = null; + + /** + * ScalingConfig scalingFactor. + * @member {number|null|undefined} scalingFactor + * @memberof google.cloud.metastore.v1beta.ScalingConfig + * @instance + */ + ScalingConfig.prototype.scalingFactor = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ScalingConfig scalingModel. + * @member {"instanceSize"|"scalingFactor"|undefined} scalingModel + * @memberof google.cloud.metastore.v1beta.ScalingConfig + * @instance + */ + Object.defineProperty(ScalingConfig.prototype, "scalingModel", { + get: $util.oneOfGetter($oneOfFields = ["instanceSize", "scalingFactor"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ScalingConfig instance using the specified properties. + * @function create + * @memberof google.cloud.metastore.v1beta.ScalingConfig + * @static + * @param {google.cloud.metastore.v1beta.IScalingConfig=} [properties] Properties to set + * @returns {google.cloud.metastore.v1beta.ScalingConfig} ScalingConfig instance + */ + ScalingConfig.create = function create(properties) { + return new ScalingConfig(properties); + }; + + /** + * Encodes the specified ScalingConfig message. Does not implicitly {@link google.cloud.metastore.v1beta.ScalingConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.metastore.v1beta.ScalingConfig + * @static + * @param {google.cloud.metastore.v1beta.IScalingConfig} message ScalingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScalingConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.instanceSize != null && Object.hasOwnProperty.call(message, "instanceSize")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.instanceSize); + if (message.scalingFactor != null && Object.hasOwnProperty.call(message, "scalingFactor")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.scalingFactor); + return writer; + }; + + /** + * Encodes the specified ScalingConfig message, length delimited. Does not implicitly {@link google.cloud.metastore.v1beta.ScalingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.metastore.v1beta.ScalingConfig + * @static + * @param {google.cloud.metastore.v1beta.IScalingConfig} message ScalingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScalingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ScalingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.metastore.v1beta.ScalingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.metastore.v1beta.ScalingConfig} ScalingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScalingConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.metastore.v1beta.ScalingConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.instanceSize = reader.int32(); + break; + } + case 2: { + message.scalingFactor = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ScalingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.metastore.v1beta.ScalingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.metastore.v1beta.ScalingConfig} ScalingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScalingConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ScalingConfig message. + * @function verify + * @memberof google.cloud.metastore.v1beta.ScalingConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ScalingConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.instanceSize != null && message.hasOwnProperty("instanceSize")) { + properties.scalingModel = 1; + switch (message.instanceSize) { + default: + return "instanceSize: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + } + if (message.scalingFactor != null && message.hasOwnProperty("scalingFactor")) { + if (properties.scalingModel === 1) + return "scalingModel: multiple values"; + properties.scalingModel = 1; + if (typeof message.scalingFactor !== "number") + return "scalingFactor: number expected"; + } + return null; + }; + + /** + * Creates a ScalingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.metastore.v1beta.ScalingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.metastore.v1beta.ScalingConfig} ScalingConfig + */ + ScalingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.metastore.v1beta.ScalingConfig) + return object; + var message = new $root.google.cloud.metastore.v1beta.ScalingConfig(); + switch (object.instanceSize) { + default: + if (typeof object.instanceSize === "number") { + message.instanceSize = object.instanceSize; + break; + } + break; + case "INSTANCE_SIZE_UNSPECIFIED": + case 0: + message.instanceSize = 0; + break; + case "EXTRA_SMALL": + case 1: + message.instanceSize = 1; + break; + case "SMALL": + case 2: + message.instanceSize = 2; + break; + case "MEDIUM": + case 3: + message.instanceSize = 3; + break; + case "LARGE": + case 4: + message.instanceSize = 4; + break; + case "EXTRA_LARGE": + case 5: + message.instanceSize = 5; + break; + } + if (object.scalingFactor != null) + message.scalingFactor = Number(object.scalingFactor); + return message; + }; + + /** + * Creates a plain object from a ScalingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.metastore.v1beta.ScalingConfig + * @static + * @param {google.cloud.metastore.v1beta.ScalingConfig} message ScalingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ScalingConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.instanceSize != null && message.hasOwnProperty("instanceSize")) { + object.instanceSize = options.enums === String ? $root.google.cloud.metastore.v1beta.ScalingConfig.InstanceSize[message.instanceSize] === undefined ? message.instanceSize : $root.google.cloud.metastore.v1beta.ScalingConfig.InstanceSize[message.instanceSize] : message.instanceSize; + if (options.oneofs) + object.scalingModel = "instanceSize"; + } + if (message.scalingFactor != null && message.hasOwnProperty("scalingFactor")) { + object.scalingFactor = options.json && !isFinite(message.scalingFactor) ? String(message.scalingFactor) : message.scalingFactor; + if (options.oneofs) + object.scalingModel = "scalingFactor"; + } + return object; + }; + + /** + * Converts this ScalingConfig to JSON. + * @function toJSON + * @memberof google.cloud.metastore.v1beta.ScalingConfig + * @instance + * @returns {Object.} JSON object + */ + ScalingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ScalingConfig + * @function getTypeUrl + * @memberof google.cloud.metastore.v1beta.ScalingConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ScalingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.metastore.v1beta.ScalingConfig"; + }; + + /** + * InstanceSize enum. + * @name google.cloud.metastore.v1beta.ScalingConfig.InstanceSize + * @enum {number} + * @property {number} INSTANCE_SIZE_UNSPECIFIED=0 INSTANCE_SIZE_UNSPECIFIED value + * @property {number} EXTRA_SMALL=1 EXTRA_SMALL value + * @property {number} SMALL=2 SMALL value + * @property {number} MEDIUM=3 MEDIUM value + * @property {number} LARGE=4 LARGE value + * @property {number} EXTRA_LARGE=5 EXTRA_LARGE value + */ + ScalingConfig.InstanceSize = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INSTANCE_SIZE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EXTRA_SMALL"] = 1; + values[valuesById[2] = "SMALL"] = 2; + values[valuesById[3] = "MEDIUM"] = 3; + values[valuesById[4] = "LARGE"] = 4; + values[valuesById[5] = "EXTRA_LARGE"] = 5; + return values; + })(); + + return ScalingConfig; + })(); + v1beta.ListServicesRequest = (function() { /** @@ -47035,6 +48463,7 @@ default: return "metastoreType: enum value expected"; case 0: + case 1: case 2: case 3: break; @@ -47067,6 +48496,10 @@ case 0: message.metastoreType = 0; break; + case "DATAPLEX": + case 1: + message.metastoreType = 1; + break; case "BIGQUERY": case 2: message.metastoreType = 2; @@ -47134,12 +48567,14 @@ * @name google.cloud.metastore.v1beta.BackendMetastore.MetastoreType * @enum {number} * @property {number} METASTORE_TYPE_UNSPECIFIED=0 METASTORE_TYPE_UNSPECIFIED value + * @property {number} DATAPLEX=1 DATAPLEX value * @property {number} BIGQUERY=2 BIGQUERY value * @property {number} DATAPROC_METASTORE=3 DATAPROC_METASTORE value */ BackendMetastore.MetastoreType = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "METASTORE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DATAPLEX"] = 1; values[valuesById[2] = "BIGQUERY"] = 2; values[valuesById[3] = "DATAPROC_METASTORE"] = 3; return values; diff --git a/packages/google-cloud-metastore/protos/protos.json b/packages/google-cloud-metastore/protos/protos.json index 7dd7fd31065..133d330e288 100644 --- a/packages/google-cloud-metastore/protos/protos.json +++ b/packages/google-cloud-metastore/protos/protos.json @@ -13,8 +13,8 @@ "java_outer_classname": "MetastoreFederationProto", "java_package": "com.google.cloud.metastore.v1", "php_namespace": "Google\\Cloud\\Metastore\\V1", - "(google.api.resource_definition).type": "compute.googleapis.com/Subnetwork", - "(google.api.resource_definition).pattern": "projects/{project}/regions/{region}/subnetworks/{subnetwork}" + "(google.api.resource_definition).type": "dataplex.googleapis.com/Lake", + "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/lakes/{lake}" }, "nested": { "DataprocMetastore": { @@ -510,6 +510,10 @@ "telemetryConfig": { "type": "TelemetryConfig", "id": 23 + }, + "scalingConfig": { + "type": "ScalingConfig", + "id": 24 } }, "nested": { @@ -577,6 +581,11 @@ "kerberosConfig": { "type": "KerberosConfig", "id": 3 + }, + "auxiliaryVersions": { + "keyType": "string", + "type": "AuxiliaryVersionConfig", + "id": 5 } } }, @@ -619,6 +628,26 @@ } } }, + "AuxiliaryVersionConfig": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "configOverrides": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "networkConfig": { + "type": "NetworkConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, "NetworkConfig": { "fields": { "consumers": { @@ -987,6 +1016,38 @@ } } }, + "ScalingConfig": { + "oneofs": { + "scalingModel": { + "oneof": [ + "instanceSize", + "scalingFactor" + ] + } + }, + "fields": { + "instanceSize": { + "type": "InstanceSize", + "id": 1 + }, + "scalingFactor": { + "type": "float", + "id": 2 + } + }, + "nested": { + "InstanceSize": { + "values": { + "INSTANCE_SIZE_UNSPECIFIED": 0, + "EXTRA_SMALL": 1, + "SMALL": 2, + "MEDIUM": 3, + "LARGE": 4, + "EXTRA_LARGE": 5 + } + } + } + }, "ListServicesRequest": { "fields": { "parent": { @@ -2520,6 +2581,10 @@ "telemetryConfig": { "type": "TelemetryConfig", "id": 23 + }, + "scalingConfig": { + "type": "ScalingConfig", + "id": 24 } }, "nested": { @@ -2716,6 +2781,10 @@ "options": { "(google.api.field_behavior)": "IMMUTABLE" } + }, + "customRoutesEnabled": { + "type": "bool", + "id": 2 } }, "nested": { @@ -3082,6 +3151,38 @@ } } }, + "ScalingConfig": { + "oneofs": { + "scalingModel": { + "oneof": [ + "instanceSize", + "scalingFactor" + ] + } + }, + "fields": { + "instanceSize": { + "type": "InstanceSize", + "id": 1 + }, + "scalingFactor": { + "type": "float", + "id": 2 + } + }, + "nested": { + "InstanceSize": { + "values": { + "INSTANCE_SIZE_UNSPECIFIED": 0, + "EXTRA_SMALL": 1, + "SMALL": 2, + "MEDIUM": 3, + "LARGE": 4, + "EXTRA_LARGE": 5 + } + } + } + }, "ListServicesRequest": { "fields": { "parent": { @@ -3984,6 +4085,7 @@ "MetastoreType": { "values": { "METASTORE_TYPE_UNSPECIFIED": 0, + "DATAPLEX": 1, "BIGQUERY": 2, "DATAPROC_METASTORE": 3 } @@ -4735,6 +4837,10 @@ "telemetryConfig": { "type": "TelemetryConfig", "id": 23 + }, + "scalingConfig": { + "type": "ScalingConfig", + "id": 24 } }, "nested": { @@ -4931,6 +5037,10 @@ "options": { "(google.api.field_behavior)": "IMMUTABLE" } + }, + "customRoutesEnabled": { + "type": "bool", + "id": 2 } }, "nested": { @@ -5297,6 +5407,38 @@ } } }, + "ScalingConfig": { + "oneofs": { + "scalingModel": { + "oneof": [ + "instanceSize", + "scalingFactor" + ] + } + }, + "fields": { + "instanceSize": { + "type": "InstanceSize", + "id": 1 + }, + "scalingFactor": { + "type": "float", + "id": 2 + } + }, + "nested": { + "InstanceSize": { + "values": { + "INSTANCE_SIZE_UNSPECIFIED": 0, + "EXTRA_SMALL": 1, + "SMALL": 2, + "MEDIUM": 3, + "LARGE": 4, + "EXTRA_LARGE": 5 + } + } + } + }, "ListServicesRequest": { "fields": { "parent": { @@ -6199,6 +6341,7 @@ "MetastoreType": { "values": { "METASTORE_TYPE_UNSPECIFIED": 0, + "DATAPLEX": 1, "BIGQUERY": 2, "DATAPROC_METASTORE": 3 } diff --git a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.create_backup.js b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.create_backup.js index 2e2bf52560f..b5125a4e358 100644 --- a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.create_backup.js +++ b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.create_backup.js @@ -29,8 +29,8 @@ function main(parent, backupId, backup) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The relative resource name of the service in which to create a backup - * of the following form: + * Required. The relative resource name of the service in which to create a + * backup of the following form: * `projects/{project_number}/locations/{location_id}/services/{service_id}`. */ // const parent = 'abc123' @@ -43,15 +43,15 @@ function main(parent, backupId, backup) { */ // const backupId = 'abc123' /** - * Required. The backup to create. The `name` field is ignored. The ID of the created - * backup must be provided in the request's `backup_id` field. + * Required. The backup to create. The `name` field is ignored. The ID of the + * created backup must be provided in the request's `backup_id` field. */ // const backup = {} /** - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent * the creation of duplicate commitments. diff --git a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.create_metadata_import.js b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.create_metadata_import.js index a8047c70ca4..1ffe0918b16 100644 --- a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.create_metadata_import.js +++ b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.create_metadata_import.js @@ -29,30 +29,30 @@ function main(parent, metadataImportId, metadataImport) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The relative resource name of the service in which to create a metastore - * import, in the following form: + * Required. The relative resource name of the service in which to create a + * metastore import, in the following form: * `projects/{project_number}/locations/{location_id}/services/{service_id}`. */ // const parent = 'abc123' /** - * Required. The ID of the metadata import, which is used as the final component of the - * metadata import's name. + * Required. The ID of the metadata import, which is used as the final + * component of the metadata import's name. * This value must be between 1 and 64 characters long, begin with a letter, * end with a letter or number, and consist of alpha-numeric ASCII characters * or hyphens. */ // const metadataImportId = 'abc123' /** - * Required. The metadata import to create. The `name` field is ignored. The ID of the - * created metadata import must be provided in the request's + * Required. The metadata import to create. The `name` field is ignored. The + * ID of the created metadata import must be provided in the request's * `metadata_import_id` field. */ // const metadataImport = {} /** - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent * the creation of duplicate commitments. diff --git a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.create_service.js b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.create_service.js index 7be69c25d8b..b78b1404bc9 100644 --- a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.create_service.js +++ b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.create_service.js @@ -29,8 +29,8 @@ function main(parent, serviceId, service) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The relative resource name of the location in which to create a metastore - * service, in the following form: + * Required. The relative resource name of the location in which to create a + * metastore service, in the following form: * `projects/{project_number}/locations/{location_id}`. */ // const parent = 'abc123' @@ -49,10 +49,10 @@ function main(parent, serviceId, service) { */ // const service = {} /** - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent * the creation of duplicate commitments. diff --git a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.delete_backup.js b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.delete_backup.js index 252965ee4a4..6dca464ce9f 100644 --- a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.delete_backup.js +++ b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.delete_backup.js @@ -35,10 +35,10 @@ function main(name) { */ // const name = 'abc123' /** - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent * the creation of duplicate commitments. diff --git a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.delete_service.js b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.delete_service.js index c2306c8c6fd..af62ce30ef0 100644 --- a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.delete_service.js +++ b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.delete_service.js @@ -29,16 +29,16 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The relative resource name of the metastore service to delete, in the - * following form: + * Required. The relative resource name of the metastore service to delete, in + * the following form: * `projects/{project_number}/locations/{location_id}/services/{service_id}`. */ // const name = 'abc123' /** - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent * the creation of duplicate commitments. diff --git a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.export_metadata.js b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.export_metadata.js index 8863fbc3419..7b4a90f37ac 100644 --- a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.export_metadata.js +++ b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.export_metadata.js @@ -35,16 +35,16 @@ function main(service) { */ // const destinationGcsFolder = 'abc123' /** - * Required. The relative resource name of the metastore service to run export, in the - * following form: + * Required. The relative resource name of the metastore service to run + * export, in the following form: * `projects/{project_id}/locations/{location_id}/services/{service_id}`. */ // const service = 'abc123' /** - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent * the creation of duplicate commitments. @@ -54,7 +54,8 @@ function main(service) { */ // const requestId = 'abc123' /** - * Optional. The type of the database dump. If unspecified, defaults to `MYSQL`. + * Optional. The type of the database dump. If unspecified, defaults to + * `MYSQL`. */ // const databaseDumpType = {} diff --git a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.get_metadata_import.js b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.get_metadata_import.js index 769085039dc..95024e88fbb 100644 --- a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.get_metadata_import.js +++ b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.get_metadata_import.js @@ -29,8 +29,8 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The relative resource name of the metadata import to retrieve, in the - * following form: + * Required. The relative resource name of the metadata import to retrieve, in + * the following form: * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`. */ // const name = 'abc123' diff --git a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.get_service.js b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.get_service.js index ee3d0eb6bb0..d3aa046e1d2 100644 --- a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.get_service.js +++ b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.get_service.js @@ -29,8 +29,8 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The relative resource name of the metastore service to retrieve, in the - * following form: + * Required. The relative resource name of the metastore service to retrieve, + * in the following form: * `projects/{project_number}/locations/{location_id}/services/{service_id}`. */ // const name = 'abc123' diff --git a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.list_backups.js b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.list_backups.js index 9b411341f58..e3863fb2b47 100644 --- a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.list_backups.js +++ b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.list_backups.js @@ -35,18 +35,19 @@ function main(parent) { */ // const parent = 'abc123' /** - * Optional. The maximum number of backups to return. The response may contain less - * than the maximum number. If unspecified, no more than 500 backups are + * Optional. The maximum number of backups to return. The response may contain + * less than the maximum number. If unspecified, no more than 500 backups are * returned. The maximum value is 1000; values above 1000 are changed to 1000. */ // const pageSize = 1234 /** - * Optional. A page token, received from a previous DataprocMetastore.ListBackups google.cloud.metastore.v1.DataprocMetastore.ListBackups + * Optional. A page token, received from a previous + * DataprocMetastore.ListBackups google.cloud.metastore.v1.DataprocMetastore.ListBackups * call. Provide this token to retrieve the subsequent page. * To retrieve the first page, supply an empty page token. * When paginating, other parameters provided to - * DataprocMetastore.ListBackups google.cloud.metastore.v1.DataprocMetastore.ListBackups must match the call that provided the - * page token. + * DataprocMetastore.ListBackups google.cloud.metastore.v1.DataprocMetastore.ListBackups + * must match the call that provided the page token. */ // const pageToken = 'abc123' /** diff --git a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.list_metadata_imports.js b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.list_metadata_imports.js index 47351d68cec..dcddf3121f9 100644 --- a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.list_metadata_imports.js +++ b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.list_metadata_imports.js @@ -29,24 +29,25 @@ function main(parent) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The relative resource name of the service whose metadata imports to - * list, in the following form: + * Required. The relative resource name of the service whose metadata imports + * to list, in the following form: * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`. */ // const parent = 'abc123' /** - * Optional. The maximum number of imports to return. The response may contain less - * than the maximum number. If unspecified, no more than 500 imports are + * Optional. The maximum number of imports to return. The response may contain + * less than the maximum number. If unspecified, no more than 500 imports are * returned. The maximum value is 1000; values above 1000 are changed to 1000. */ // const pageSize = 1234 /** - * Optional. A page token, received from a previous DataprocMetastore.ListServices google.cloud.metastore.v1.DataprocMetastore.ListServices + * Optional. A page token, received from a previous + * DataprocMetastore.ListServices google.cloud.metastore.v1.DataprocMetastore.ListServices * call. Provide this token to retrieve the subsequent page. * To retrieve the first page, supply an empty page token. * When paginating, other parameters provided to - * DataprocMetastore.ListServices google.cloud.metastore.v1.DataprocMetastore.ListServices must match the call that provided the - * page token. + * DataprocMetastore.ListServices google.cloud.metastore.v1.DataprocMetastore.ListServices + * must match the call that provided the page token. */ // const pageToken = 'abc123' /** diff --git a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.list_services.js b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.list_services.js index 08d1944da49..7d49b03464b 100644 --- a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.list_services.js +++ b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.list_services.js @@ -29,24 +29,26 @@ function main(parent) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The relative resource name of the location of metastore services to - * list, in the following form: + * Required. The relative resource name of the location of metastore services + * to list, in the following form: * `projects/{project_number}/locations/{location_id}`. */ // const parent = 'abc123' /** - * Optional. The maximum number of services to return. The response may contain less - * than the maximum number. If unspecified, no more than 500 services are - * returned. The maximum value is 1000; values above 1000 are changed to 1000. + * Optional. The maximum number of services to return. The response may + * contain less than the maximum number. If unspecified, no more than 500 + * services are returned. The maximum value is 1000; values above 1000 are + * changed to 1000. */ // const pageSize = 1234 /** - * Optional. A page token, received from a previous DataprocMetastore.ListServices google.cloud.metastore.v1.DataprocMetastore.ListServices + * Optional. A page token, received from a previous + * DataprocMetastore.ListServices google.cloud.metastore.v1.DataprocMetastore.ListServices * call. Provide this token to retrieve the subsequent page. * To retrieve the first page, supply an empty page token. * When paginating, other parameters provided to - * DataprocMetastore.ListServices google.cloud.metastore.v1.DataprocMetastore.ListServices must match the call that provided the - * page token. + * DataprocMetastore.ListServices google.cloud.metastore.v1.DataprocMetastore.ListServices + * must match the call that provided the page token. */ // const pageToken = 'abc123' /** diff --git a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.restore_service.js b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.restore_service.js index 2ea8f741616..10e3459c45f 100644 --- a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.restore_service.js +++ b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.restore_service.js @@ -29,14 +29,14 @@ function main(service, backup) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The relative resource name of the metastore service to run restore, in the - * following form: + * Required. The relative resource name of the metastore service to run + * restore, in the following form: * `projects/{project_id}/locations/{location_id}/services/{service_id}`. */ // const service = 'abc123' /** - * Required. The relative resource name of the metastore service backup to restore - * from, in the following form: + * Required. The relative resource name of the metastore service backup to + * restore from, in the following form: * `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`. */ // const backup = 'abc123' @@ -45,10 +45,10 @@ function main(service, backup) { */ // const restoreType = {} /** - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent * the creation of duplicate commitments. diff --git a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.update_metadata_import.js b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.update_metadata_import.js index 05240c4340e..4e8c75e9ea5 100644 --- a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.update_metadata_import.js +++ b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.update_metadata_import.js @@ -43,10 +43,10 @@ function main(updateMask, metadataImport) { */ // const metadataImport = {} /** - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent * the creation of duplicate commitments. diff --git a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.update_service.js b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.update_service.js index e5e9466c30b..8ea20cde6f8 100644 --- a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.update_service.js +++ b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore.update_service.js @@ -43,10 +43,10 @@ function main(updateMask, service) { */ // const service = {} /** - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent * the creation of duplicate commitments. diff --git a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.create_federation.js b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.create_federation.js index 4c8c219bee6..6c5a670a8c2 100644 --- a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.create_federation.js +++ b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.create_federation.js @@ -29,8 +29,8 @@ function main(parent, federationId, federation) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The relative resource name of the location in which to create a federation - * service, in the following form: + * Required. The relative resource name of the location in which to create a + * federation service, in the following form: * `projects/{project_number}/locations/{location_id}`. */ // const parent = 'abc123' @@ -49,10 +49,10 @@ function main(parent, federationId, federation) { */ // const federation = {} /** - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent * the creation of duplicate commitments. diff --git a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.delete_federation.js b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.delete_federation.js index f2e37946f06..43dd7799202 100644 --- a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.delete_federation.js +++ b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.delete_federation.js @@ -35,10 +35,10 @@ function main(name) { */ // const name = 'abc123' /** - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent * the creation of duplicate commitments. diff --git a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.get_federation.js b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.get_federation.js index ff4b69aee23..0dad1bb458a 100644 --- a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.get_federation.js +++ b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.get_federation.js @@ -29,8 +29,8 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The relative resource name of the metastore federation to retrieve, - * in the following form: + * Required. The relative resource name of the metastore federation to + * retrieve, in the following form: * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. */ // const name = 'abc123' diff --git a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.list_federations.js b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.list_federations.js index 8f1cc6bd7ad..5d4161729e9 100644 --- a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.list_federations.js +++ b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.list_federations.js @@ -29,15 +29,16 @@ function main(parent) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The relative resource name of the location of metastore federations - * to list, in the following form: + * Required. The relative resource name of the location of metastore + * federations to list, in the following form: * `projects/{project_number}/locations/{location_id}`. */ // const parent = 'abc123' /** - * Optional. The maximum number of federations to return. The response may contain less - * than the maximum number. If unspecified, no more than 500 services are - * returned. The maximum value is 1000; values above 1000 are changed to 1000. + * Optional. The maximum number of federations to return. The response may + * contain less than the maximum number. If unspecified, no more than 500 + * services are returned. The maximum value is 1000; values above 1000 are + * changed to 1000. */ // const pageSize = 1234 /** diff --git a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.update_federation.js b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.update_federation.js index 0ecf7791d53..05989a1af86 100644 --- a/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.update_federation.js +++ b/packages/google-cloud-metastore/samples/generated/v1/dataproc_metastore_federation.update_federation.js @@ -43,10 +43,10 @@ function main(updateMask, federation) { */ // const federation = {} /** - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent * the creation of duplicate commitments. diff --git a/packages/google-cloud-metastore/samples/generated/v1/snippet_metadata.google.cloud.metastore.v1.json b/packages/google-cloud-metastore/samples/generated/v1/snippet_metadata.google.cloud.metastore.v1.json index b3c9d83d7b6..8d2cc2e7890 100644 --- a/packages/google-cloud-metastore/samples/generated/v1/snippet_metadata.google.cloud.metastore.v1.json +++ b/packages/google-cloud-metastore/samples/generated/v1/snippet_metadata.google.cloud.metastore.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-metastore", - "version": "3.4.0", + "version": "3.5.0", "language": "TYPESCRIPT", "apis": [ { @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 82, + "end": 84, "type": "FULL" } ], @@ -262,7 +262,7 @@ "segments": [ { "start": 25, - "end": 82, + "end": 83, "type": "FULL" } ], @@ -458,7 +458,7 @@ "segments": [ { "start": 25, - "end": 79, + "end": 80, "type": "FULL" } ], @@ -562,7 +562,7 @@ "segments": [ { "start": 25, - "end": 82, + "end": 83, "type": "FULL" } ], @@ -754,7 +754,7 @@ "segments": [ { "start": 25, - "end": 82, + "end": 83, "type": "FULL" } ], diff --git a/packages/google-cloud-metastore/samples/generated/v1alpha/snippet_metadata.google.cloud.metastore.v1alpha.json b/packages/google-cloud-metastore/samples/generated/v1alpha/snippet_metadata.google.cloud.metastore.v1alpha.json index 345ef38c68c..9d476593d4c 100644 --- a/packages/google-cloud-metastore/samples/generated/v1alpha/snippet_metadata.google.cloud.metastore.v1alpha.json +++ b/packages/google-cloud-metastore/samples/generated/v1alpha/snippet_metadata.google.cloud.metastore.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-metastore", - "version": "3.4.0", + "version": "3.5.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-metastore/samples/generated/v1beta/snippet_metadata.google.cloud.metastore.v1beta.json b/packages/google-cloud-metastore/samples/generated/v1beta/snippet_metadata.google.cloud.metastore.v1beta.json index 4efaf4dca83..fc1a0393399 100644 --- a/packages/google-cloud-metastore/samples/generated/v1beta/snippet_metadata.google.cloud.metastore.v1beta.json +++ b/packages/google-cloud-metastore/samples/generated/v1beta/snippet_metadata.google.cloud.metastore.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-metastore", - "version": "3.4.0", + "version": "3.5.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-metastore/samples/package.json b/packages/google-cloud-metastore/samples/package.json index 08f6ed114d7..3659c51fd41 100644 --- a/packages/google-cloud-metastore/samples/package.json +++ b/packages/google-cloud-metastore/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/dataproc-metastore": "^3.4.2" + "@google-cloud/dataproc-metastore": "^3.5.0" }, "devDependencies": { "c8": "^7.1.0", diff --git a/packages/google-cloud-metastore/src/v1/dataproc_metastore_client.ts b/packages/google-cloud-metastore/src/v1/dataproc_metastore_client.ts index 6a8a4741615..865f3fabb69 100644 --- a/packages/google-cloud-metastore/src/v1/dataproc_metastore_client.ts +++ b/packages/google-cloud-metastore/src/v1/dataproc_metastore_client.ts @@ -310,6 +310,11 @@ export class DataprocMetastoreClient { }, ], }, + { + selector: 'google.longrunning.Operations.CancelOperation', + post: '/v1/{name=projects/*/locations/*/operations/*}:cancel', + body: '*', + }, { selector: 'google.longrunning.Operations.DeleteOperation', delete: '/v1/{name=projects/*/locations/*/operations/*}', @@ -587,8 +592,8 @@ export class DataprocMetastoreClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The relative resource name of the metastore service to retrieve, in the - * following form: + * Required. The relative resource name of the metastore service to retrieve, + * in the following form: * * `projects/{project_number}/locations/{location_id}/services/{service_id}`. * @param {object} [options] @@ -675,8 +680,8 @@ export class DataprocMetastoreClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The relative resource name of the metadata import to retrieve, in the - * following form: + * Required. The relative resource name of the metadata import to retrieve, in + * the following form: * * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`. * @param {object} [options] @@ -856,8 +861,8 @@ export class DataprocMetastoreClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The relative resource name of the location in which to create a metastore - * service, in the following form: + * Required. The relative resource name of the location in which to create a + * metastore service, in the following form: * * `projects/{project_number}/locations/{location_id}`. * @param {string} request.serviceId @@ -872,10 +877,10 @@ export class DataprocMetastoreClient { * ignored. The ID of the created metastore service must be provided in * the request's `service_id` field. * @param {string} [request.requestId] - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent @@ -1032,10 +1037,10 @@ export class DataprocMetastoreClient { * The metastore service's `name` field is used to identify the metastore * service to be updated. * @param {string} [request.requestId] - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent @@ -1181,15 +1186,15 @@ export class DataprocMetastoreClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The relative resource name of the metastore service to delete, in the - * following form: + * Required. The relative resource name of the metastore service to delete, in + * the following form: * * `projects/{project_number}/locations/{location_id}/services/{service_id}`. * @param {string} [request.requestId] - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent @@ -1335,26 +1340,26 @@ export class DataprocMetastoreClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The relative resource name of the service in which to create a metastore - * import, in the following form: + * Required. The relative resource name of the service in which to create a + * metastore import, in the following form: * * `projects/{project_number}/locations/{location_id}/services/{service_id}`. * @param {string} request.metadataImportId - * Required. The ID of the metadata import, which is used as the final component of the - * metadata import's name. + * Required. The ID of the metadata import, which is used as the final + * component of the metadata import's name. * * This value must be between 1 and 64 characters long, begin with a letter, * end with a letter or number, and consist of alpha-numeric ASCII characters * or hyphens. * @param {google.cloud.metastore.v1.MetadataImport} request.metadataImport - * Required. The metadata import to create. The `name` field is ignored. The ID of the - * created metadata import must be provided in the request's + * Required. The metadata import to create. The `name` field is ignored. The + * ID of the created metadata import must be provided in the request's * `metadata_import_id` field. * @param {string} [request.requestId] - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent @@ -1512,10 +1517,10 @@ export class DataprocMetastoreClient { * The metadata import's `name` field is used to identify the metastore * import to be updated. * @param {string} [request.requestId] - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent @@ -1665,15 +1670,15 @@ export class DataprocMetastoreClient { * `gs:///`. A sub-folder * `` containing exported files will be created below it. * @param {string} request.service - * Required. The relative resource name of the metastore service to run export, in the - * following form: + * Required. The relative resource name of the metastore service to run + * export, in the following form: * * `projects/{project_id}/locations/{location_id}/services/{service_id}`. * @param {string} [request.requestId] - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent @@ -1683,7 +1688,8 @@ export class DataprocMetastoreClient { * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. * @param {google.cloud.metastore.v1.DatabaseDumpSpec.Type} [request.databaseDumpType] - * Optional. The type of the database dump. If unspecified, defaults to `MYSQL`. + * Optional. The type of the database dump. If unspecified, defaults to + * `MYSQL`. * @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. @@ -1821,22 +1827,22 @@ export class DataprocMetastoreClient { * @param {Object} request * The request object that will be sent. * @param {string} request.service - * Required. The relative resource name of the metastore service to run restore, in the - * following form: + * Required. The relative resource name of the metastore service to run + * restore, in the following form: * * `projects/{project_id}/locations/{location_id}/services/{service_id}`. * @param {string} request.backup - * Required. The relative resource name of the metastore service backup to restore - * from, in the following form: + * Required. The relative resource name of the metastore service backup to + * restore from, in the following form: * * `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`. * @param {google.cloud.metastore.v1.Restore.RestoreType} [request.restoreType] * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`. * @param {string} [request.requestId] - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent @@ -1982,8 +1988,8 @@ export class DataprocMetastoreClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The relative resource name of the service in which to create a backup - * of the following form: + * Required. The relative resource name of the service in which to create a + * backup of the following form: * * `projects/{project_number}/locations/{location_id}/services/{service_id}`. * @param {string} request.backupId @@ -1994,13 +2000,13 @@ export class DataprocMetastoreClient { * end with a letter or number, and consist of alpha-numeric ASCII characters * or hyphens. * @param {google.cloud.metastore.v1.Backup} request.backup - * Required. The backup to create. The `name` field is ignored. The ID of the created - * backup must be provided in the request's `backup_id` field. + * Required. The backup to create. The `name` field is ignored. The ID of the + * created backup must be provided in the request's `backup_id` field. * @param {string} [request.requestId] - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent @@ -2151,10 +2157,10 @@ export class DataprocMetastoreClient { * * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`. * @param {string} [request.requestId] - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent @@ -2300,23 +2306,25 @@ export class DataprocMetastoreClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The relative resource name of the location of metastore services to - * list, in the following form: + * Required. The relative resource name of the location of metastore services + * to list, in the following form: * * `projects/{project_number}/locations/{location_id}`. * @param {number} [request.pageSize] - * Optional. The maximum number of services to return. The response may contain less - * than the maximum number. If unspecified, no more than 500 services are - * returned. The maximum value is 1000; values above 1000 are changed to 1000. + * Optional. The maximum number of services to return. The response may + * contain less than the maximum number. If unspecified, no more than 500 + * services are returned. The maximum value is 1000; values above 1000 are + * changed to 1000. * @param {string} [request.pageToken] - * Optional. A page token, received from a previous {@link google.cloud.metastore.v1.DataprocMetastore.ListServices|DataprocMetastore.ListServices} + * Optional. A page token, received from a previous + * {@link google.cloud.metastore.v1.DataprocMetastore.ListServices|DataprocMetastore.ListServices} * call. Provide this token to retrieve the subsequent page. * * To retrieve the first page, supply an empty page token. * * When paginating, other parameters provided to - * {@link google.cloud.metastore.v1.DataprocMetastore.ListServices|DataprocMetastore.ListServices} must match the call that provided the - * page token. + * {@link google.cloud.metastore.v1.DataprocMetastore.ListServices|DataprocMetastore.ListServices} + * must match the call that provided the page token. * @param {string} [request.filter] * Optional. The filter to apply to list results. * @param {string} [request.orderBy] @@ -2410,23 +2418,25 @@ export class DataprocMetastoreClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The relative resource name of the location of metastore services to - * list, in the following form: + * Required. The relative resource name of the location of metastore services + * to list, in the following form: * * `projects/{project_number}/locations/{location_id}`. * @param {number} [request.pageSize] - * Optional. The maximum number of services to return. The response may contain less - * than the maximum number. If unspecified, no more than 500 services are - * returned. The maximum value is 1000; values above 1000 are changed to 1000. + * Optional. The maximum number of services to return. The response may + * contain less than the maximum number. If unspecified, no more than 500 + * services are returned. The maximum value is 1000; values above 1000 are + * changed to 1000. * @param {string} [request.pageToken] - * Optional. A page token, received from a previous {@link google.cloud.metastore.v1.DataprocMetastore.ListServices|DataprocMetastore.ListServices} + * Optional. A page token, received from a previous + * {@link google.cloud.metastore.v1.DataprocMetastore.ListServices|DataprocMetastore.ListServices} * call. Provide this token to retrieve the subsequent page. * * To retrieve the first page, supply an empty page token. * * When paginating, other parameters provided to - * {@link google.cloud.metastore.v1.DataprocMetastore.ListServices|DataprocMetastore.ListServices} must match the call that provided the - * page token. + * {@link google.cloud.metastore.v1.DataprocMetastore.ListServices|DataprocMetastore.ListServices} + * must match the call that provided the page token. * @param {string} [request.filter] * Optional. The filter to apply to list results. * @param {string} [request.orderBy] @@ -2474,23 +2484,25 @@ export class DataprocMetastoreClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The relative resource name of the location of metastore services to - * list, in the following form: + * Required. The relative resource name of the location of metastore services + * to list, in the following form: * * `projects/{project_number}/locations/{location_id}`. * @param {number} [request.pageSize] - * Optional. The maximum number of services to return. The response may contain less - * than the maximum number. If unspecified, no more than 500 services are - * returned. The maximum value is 1000; values above 1000 are changed to 1000. + * Optional. The maximum number of services to return. The response may + * contain less than the maximum number. If unspecified, no more than 500 + * services are returned. The maximum value is 1000; values above 1000 are + * changed to 1000. * @param {string} [request.pageToken] - * Optional. A page token, received from a previous {@link google.cloud.metastore.v1.DataprocMetastore.ListServices|DataprocMetastore.ListServices} + * Optional. A page token, received from a previous + * {@link google.cloud.metastore.v1.DataprocMetastore.ListServices|DataprocMetastore.ListServices} * call. Provide this token to retrieve the subsequent page. * * To retrieve the first page, supply an empty page token. * * When paginating, other parameters provided to - * {@link google.cloud.metastore.v1.DataprocMetastore.ListServices|DataprocMetastore.ListServices} must match the call that provided the - * page token. + * {@link google.cloud.metastore.v1.DataprocMetastore.ListServices|DataprocMetastore.ListServices} + * must match the call that provided the page token. * @param {string} [request.filter] * Optional. The filter to apply to list results. * @param {string} [request.orderBy] @@ -2537,23 +2549,24 @@ export class DataprocMetastoreClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The relative resource name of the service whose metadata imports to - * list, in the following form: + * Required. The relative resource name of the service whose metadata imports + * to list, in the following form: * * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`. * @param {number} [request.pageSize] - * Optional. The maximum number of imports to return. The response may contain less - * than the maximum number. If unspecified, no more than 500 imports are + * Optional. The maximum number of imports to return. The response may contain + * less than the maximum number. If unspecified, no more than 500 imports are * returned. The maximum value is 1000; values above 1000 are changed to 1000. * @param {string} [request.pageToken] - * Optional. A page token, received from a previous {@link google.cloud.metastore.v1.DataprocMetastore.ListServices|DataprocMetastore.ListServices} + * Optional. A page token, received from a previous + * {@link google.cloud.metastore.v1.DataprocMetastore.ListServices|DataprocMetastore.ListServices} * call. Provide this token to retrieve the subsequent page. * * To retrieve the first page, supply an empty page token. * * When paginating, other parameters provided to - * {@link google.cloud.metastore.v1.DataprocMetastore.ListServices|DataprocMetastore.ListServices} must match the call that provided the - * page token. + * {@link google.cloud.metastore.v1.DataprocMetastore.ListServices|DataprocMetastore.ListServices} + * must match the call that provided the page token. * @param {string} [request.filter] * Optional. The filter to apply to list results. * @param {string} [request.orderBy] @@ -2653,23 +2666,24 @@ export class DataprocMetastoreClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The relative resource name of the service whose metadata imports to - * list, in the following form: + * Required. The relative resource name of the service whose metadata imports + * to list, in the following form: * * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`. * @param {number} [request.pageSize] - * Optional. The maximum number of imports to return. The response may contain less - * than the maximum number. If unspecified, no more than 500 imports are + * Optional. The maximum number of imports to return. The response may contain + * less than the maximum number. If unspecified, no more than 500 imports are * returned. The maximum value is 1000; values above 1000 are changed to 1000. * @param {string} [request.pageToken] - * Optional. A page token, received from a previous {@link google.cloud.metastore.v1.DataprocMetastore.ListServices|DataprocMetastore.ListServices} + * Optional. A page token, received from a previous + * {@link google.cloud.metastore.v1.DataprocMetastore.ListServices|DataprocMetastore.ListServices} * call. Provide this token to retrieve the subsequent page. * * To retrieve the first page, supply an empty page token. * * When paginating, other parameters provided to - * {@link google.cloud.metastore.v1.DataprocMetastore.ListServices|DataprocMetastore.ListServices} must match the call that provided the - * page token. + * {@link google.cloud.metastore.v1.DataprocMetastore.ListServices|DataprocMetastore.ListServices} + * must match the call that provided the page token. * @param {string} [request.filter] * Optional. The filter to apply to list results. * @param {string} [request.orderBy] @@ -2717,23 +2731,24 @@ export class DataprocMetastoreClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The relative resource name of the service whose metadata imports to - * list, in the following form: + * Required. The relative resource name of the service whose metadata imports + * to list, in the following form: * * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`. * @param {number} [request.pageSize] - * Optional. The maximum number of imports to return. The response may contain less - * than the maximum number. If unspecified, no more than 500 imports are + * Optional. The maximum number of imports to return. The response may contain + * less than the maximum number. If unspecified, no more than 500 imports are * returned. The maximum value is 1000; values above 1000 are changed to 1000. * @param {string} [request.pageToken] - * Optional. A page token, received from a previous {@link google.cloud.metastore.v1.DataprocMetastore.ListServices|DataprocMetastore.ListServices} + * Optional. A page token, received from a previous + * {@link google.cloud.metastore.v1.DataprocMetastore.ListServices|DataprocMetastore.ListServices} * call. Provide this token to retrieve the subsequent page. * * To retrieve the first page, supply an empty page token. * * When paginating, other parameters provided to - * {@link google.cloud.metastore.v1.DataprocMetastore.ListServices|DataprocMetastore.ListServices} must match the call that provided the - * page token. + * {@link google.cloud.metastore.v1.DataprocMetastore.ListServices|DataprocMetastore.ListServices} + * must match the call that provided the page token. * @param {string} [request.filter] * Optional. The filter to apply to list results. * @param {string} [request.orderBy] @@ -2785,18 +2800,19 @@ export class DataprocMetastoreClient { * * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`. * @param {number} [request.pageSize] - * Optional. The maximum number of backups to return. The response may contain less - * than the maximum number. If unspecified, no more than 500 backups are + * Optional. The maximum number of backups to return. The response may contain + * less than the maximum number. If unspecified, no more than 500 backups are * returned. The maximum value is 1000; values above 1000 are changed to 1000. * @param {string} [request.pageToken] - * Optional. A page token, received from a previous {@link google.cloud.metastore.v1.DataprocMetastore.ListBackups|DataprocMetastore.ListBackups} + * Optional. A page token, received from a previous + * {@link google.cloud.metastore.v1.DataprocMetastore.ListBackups|DataprocMetastore.ListBackups} * call. Provide this token to retrieve the subsequent page. * * To retrieve the first page, supply an empty page token. * * When paginating, other parameters provided to - * {@link google.cloud.metastore.v1.DataprocMetastore.ListBackups|DataprocMetastore.ListBackups} must match the call that provided the - * page token. + * {@link google.cloud.metastore.v1.DataprocMetastore.ListBackups|DataprocMetastore.ListBackups} + * must match the call that provided the page token. * @param {string} [request.filter] * Optional. The filter to apply to list results. * @param {string} [request.orderBy] @@ -2895,18 +2911,19 @@ export class DataprocMetastoreClient { * * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`. * @param {number} [request.pageSize] - * Optional. The maximum number of backups to return. The response may contain less - * than the maximum number. If unspecified, no more than 500 backups are + * Optional. The maximum number of backups to return. The response may contain + * less than the maximum number. If unspecified, no more than 500 backups are * returned. The maximum value is 1000; values above 1000 are changed to 1000. * @param {string} [request.pageToken] - * Optional. A page token, received from a previous {@link google.cloud.metastore.v1.DataprocMetastore.ListBackups|DataprocMetastore.ListBackups} + * Optional. A page token, received from a previous + * {@link google.cloud.metastore.v1.DataprocMetastore.ListBackups|DataprocMetastore.ListBackups} * call. Provide this token to retrieve the subsequent page. * * To retrieve the first page, supply an empty page token. * * When paginating, other parameters provided to - * {@link google.cloud.metastore.v1.DataprocMetastore.ListBackups|DataprocMetastore.ListBackups} must match the call that provided the - * page token. + * {@link google.cloud.metastore.v1.DataprocMetastore.ListBackups|DataprocMetastore.ListBackups} + * must match the call that provided the page token. * @param {string} [request.filter] * Optional. The filter to apply to list results. * @param {string} [request.orderBy] @@ -2959,18 +2976,19 @@ export class DataprocMetastoreClient { * * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`. * @param {number} [request.pageSize] - * Optional. The maximum number of backups to return. The response may contain less - * than the maximum number. If unspecified, no more than 500 backups are + * Optional. The maximum number of backups to return. The response may contain + * less than the maximum number. If unspecified, no more than 500 backups are * returned. The maximum value is 1000; values above 1000 are changed to 1000. * @param {string} [request.pageToken] - * Optional. A page token, received from a previous {@link google.cloud.metastore.v1.DataprocMetastore.ListBackups|DataprocMetastore.ListBackups} + * Optional. A page token, received from a previous + * {@link google.cloud.metastore.v1.DataprocMetastore.ListBackups|DataprocMetastore.ListBackups} * call. Provide this token to retrieve the subsequent page. * * To retrieve the first page, supply an empty page token. * * When paginating, other parameters provided to - * {@link google.cloud.metastore.v1.DataprocMetastore.ListBackups|DataprocMetastore.ListBackups} must match the call that provided the - * page token. + * {@link google.cloud.metastore.v1.DataprocMetastore.ListBackups|DataprocMetastore.ListBackups} + * must match the call that provided the page token. * @param {string} [request.filter] * Optional. The filter to apply to list results. * @param {string} [request.orderBy] diff --git a/packages/google-cloud-metastore/src/v1/dataproc_metastore_federation_client.ts b/packages/google-cloud-metastore/src/v1/dataproc_metastore_federation_client.ts index 3f8f109599d..b76d663a67b 100644 --- a/packages/google-cloud-metastore/src/v1/dataproc_metastore_federation_client.ts +++ b/packages/google-cloud-metastore/src/v1/dataproc_metastore_federation_client.ts @@ -294,6 +294,11 @@ export class DataprocMetastoreFederationClient { }, ], }, + { + selector: 'google.longrunning.Operations.CancelOperation', + post: '/v1/{name=projects/*/locations/*/operations/*}:cancel', + body: '*', + }, { selector: 'google.longrunning.Operations.DeleteOperation', delete: '/v1/{name=projects/*/locations/*/operations/*}', @@ -496,8 +501,8 @@ export class DataprocMetastoreFederationClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The relative resource name of the metastore federation to retrieve, - * in the following form: + * Required. The relative resource name of the metastore federation to + * retrieve, in the following form: * * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. * @param {object} [options] @@ -585,8 +590,8 @@ export class DataprocMetastoreFederationClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The relative resource name of the location in which to create a federation - * service, in the following form: + * Required. The relative resource name of the location in which to create a + * federation service, in the following form: * * `projects/{project_number}/locations/{location_id}`. * @param {string} request.federationId @@ -601,10 +606,10 @@ export class DataprocMetastoreFederationClient { * ignored. The ID of the created metastore federation must be * provided in the request's `federation_id` field. * @param {string} [request.requestId] - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent @@ -761,10 +766,10 @@ export class DataprocMetastoreFederationClient { * The metastore federation's `name` field is used to identify the * metastore service to be updated. * @param {string} [request.requestId] - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent @@ -915,10 +920,10 @@ export class DataprocMetastoreFederationClient { * * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`. * @param {string} [request.requestId] - * Optional. A request ID. Specify a unique request ID to allow the server to ignore the - * request if it has completed. The server will ignore subsequent requests - * that provide a duplicate request ID for at least 60 minutes after the first - * request. + * Optional. A request ID. Specify a unique request ID to allow the server to + * ignore the request if it has completed. The server will ignore subsequent + * requests that provide a duplicate request ID for at least 60 minutes after + * the first request. * * For example, if an initial request times out, followed by another request * with the same request ID, the server ignores the second request to prevent @@ -1064,13 +1069,14 @@ export class DataprocMetastoreFederationClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The relative resource name of the location of metastore federations - * to list, in the following form: + * Required. The relative resource name of the location of metastore + * federations to list, in the following form: * `projects/{project_number}/locations/{location_id}`. * @param {number} [request.pageSize] - * Optional. The maximum number of federations to return. The response may contain less - * than the maximum number. If unspecified, no more than 500 services are - * returned. The maximum value is 1000; values above 1000 are changed to 1000. + * Optional. The maximum number of federations to return. The response may + * contain less than the maximum number. If unspecified, no more than 500 + * services are returned. The maximum value is 1000; values above 1000 are + * changed to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous ListFederationServices * call. Provide this token to retrieve the subsequent page. @@ -1179,13 +1185,14 @@ export class DataprocMetastoreFederationClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The relative resource name of the location of metastore federations - * to list, in the following form: + * Required. The relative resource name of the location of metastore + * federations to list, in the following form: * `projects/{project_number}/locations/{location_id}`. * @param {number} [request.pageSize] - * Optional. The maximum number of federations to return. The response may contain less - * than the maximum number. If unspecified, no more than 500 services are - * returned. The maximum value is 1000; values above 1000 are changed to 1000. + * Optional. The maximum number of federations to return. The response may + * contain less than the maximum number. If unspecified, no more than 500 + * services are returned. The maximum value is 1000; values above 1000 are + * changed to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous ListFederationServices * call. Provide this token to retrieve the subsequent page. @@ -1242,13 +1249,14 @@ export class DataprocMetastoreFederationClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The relative resource name of the location of metastore federations - * to list, in the following form: + * Required. The relative resource name of the location of metastore + * federations to list, in the following form: * `projects/{project_number}/locations/{location_id}`. * @param {number} [request.pageSize] - * Optional. The maximum number of federations to return. The response may contain less - * than the maximum number. If unspecified, no more than 500 services are - * returned. The maximum value is 1000; values above 1000 are changed to 1000. + * Optional. The maximum number of federations to return. The response may + * contain less than the maximum number. If unspecified, no more than 500 + * services are returned. The maximum value is 1000; values above 1000 are + * changed to 1000. * @param {string} [request.pageToken] * Optional. A page token, received from a previous ListFederationServices * call. Provide this token to retrieve the subsequent page. diff --git a/packages/google-cloud-metastore/src/v1alpha/dataproc_metastore_client.ts b/packages/google-cloud-metastore/src/v1alpha/dataproc_metastore_client.ts index 0a5cf547778..864607a8bbf 100644 --- a/packages/google-cloud-metastore/src/v1alpha/dataproc_metastore_client.ts +++ b/packages/google-cloud-metastore/src/v1alpha/dataproc_metastore_client.ts @@ -339,6 +339,11 @@ export class DataprocMetastoreClient { }, ], }, + { + selector: 'google.longrunning.Operations.CancelOperation', + post: '/v1alpha/{name=projects/*/locations/*/operations/*}:cancel', + body: '*', + }, { selector: 'google.longrunning.Operations.DeleteOperation', delete: '/v1alpha/{name=projects/*/locations/*/operations/*}', diff --git a/packages/google-cloud-metastore/src/v1alpha/dataproc_metastore_federation_client.ts b/packages/google-cloud-metastore/src/v1alpha/dataproc_metastore_federation_client.ts index eee8dca4e1d..ae50ae27466 100644 --- a/packages/google-cloud-metastore/src/v1alpha/dataproc_metastore_federation_client.ts +++ b/packages/google-cloud-metastore/src/v1alpha/dataproc_metastore_federation_client.ts @@ -320,6 +320,11 @@ export class DataprocMetastoreFederationClient { }, ], }, + { + selector: 'google.longrunning.Operations.CancelOperation', + post: '/v1alpha/{name=projects/*/locations/*/operations/*}:cancel', + body: '*', + }, { selector: 'google.longrunning.Operations.DeleteOperation', delete: '/v1alpha/{name=projects/*/locations/*/operations/*}', diff --git a/packages/google-cloud-metastore/src/v1beta/dataproc_metastore_client.ts b/packages/google-cloud-metastore/src/v1beta/dataproc_metastore_client.ts index 8859b526df2..74e93ba5733 100644 --- a/packages/google-cloud-metastore/src/v1beta/dataproc_metastore_client.ts +++ b/packages/google-cloud-metastore/src/v1beta/dataproc_metastore_client.ts @@ -339,6 +339,11 @@ export class DataprocMetastoreClient { }, ], }, + { + selector: 'google.longrunning.Operations.CancelOperation', + post: '/v1beta/{name=projects/*/locations/*/operations/*}:cancel', + body: '*', + }, { selector: 'google.longrunning.Operations.DeleteOperation', delete: '/v1beta/{name=projects/*/locations/*/operations/*}', diff --git a/packages/google-cloud-metastore/src/v1beta/dataproc_metastore_federation_client.ts b/packages/google-cloud-metastore/src/v1beta/dataproc_metastore_federation_client.ts index 52bb261742d..44c25315625 100644 --- a/packages/google-cloud-metastore/src/v1beta/dataproc_metastore_federation_client.ts +++ b/packages/google-cloud-metastore/src/v1beta/dataproc_metastore_federation_client.ts @@ -320,6 +320,11 @@ export class DataprocMetastoreFederationClient { }, ], }, + { + selector: 'google.longrunning.Operations.CancelOperation', + post: '/v1beta/{name=projects/*/locations/*/operations/*}:cancel', + body: '*', + }, { selector: 'google.longrunning.Operations.DeleteOperation', delete: '/v1beta/{name=projects/*/locations/*/operations/*}', diff --git a/packages/google-cloud-monitoring/package.json b/packages/google-cloud-monitoring/package.json index 9162a26764f..c3fc258943f 100644 --- a/packages/google-cloud-monitoring/package.json +++ b/packages/google-cloud-monitoring/package.json @@ -32,20 +32,20 @@ "Stackdriver Monitoring API" ], "scripts": { - "docs": "jsdoc -c .jsdoc.js", - "lint": "gts check", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "fix": "gts fix", - "docs-test": "linkinator docs", - "predocs-test": "npm run docs", - "prelint": "cd samples; npm link ../; npm install", "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", - "prepare": "npm run compile", - "precompile": "gts clean" + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -61,6 +61,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -71,5 +72,4 @@ "webpack-cli": "^5.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-monitoring" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-networkconnectivity/package.json b/packages/google-cloud-networkconnectivity/package.json index e0dacd0dc58..f21443afdf2 100644 --- a/packages/google-cloud-networkconnectivity/package.json +++ b/packages/google-cloud-networkconnectivity/package.json @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-networkconnectivity" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-networkmanagement/package.json b/packages/google-cloud-networkmanagement/package.json index ef127cf30da..57718e6fe47 100644 --- a/packages/google-cloud-networkmanagement/package.json +++ b/packages/google-cloud-networkmanagement/package.json @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-networkmanagement" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-networkmanagement/protos/google/cloud/networkmanagement/v1/connectivity_test.proto b/packages/google-cloud-networkmanagement/protos/google/cloud/networkmanagement/v1/connectivity_test.proto index 78685ba735e..30fdfc0b9ef 100644 --- a/packages/google-cloud-networkmanagement/protos/google/cloud/networkmanagement/v1/connectivity_test.proto +++ b/packages/google-cloud-networkmanagement/protos/google/cloud/networkmanagement/v1/connectivity_test.proto @@ -103,15 +103,18 @@ message ConnectivityTest { map labels = 8; // Output only. The time the test was created. - google.protobuf.Timestamp create_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time the test's configuration was updated. - google.protobuf.Timestamp update_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The reachability details of this test from the latest run. // The details are updated when creating a new test, updating an // existing test, or triggering a one-time rerun of an existing test. - ReachabilityDetails reachability_details = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + ReachabilityDetails reachability_details = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Source or destination of the Connectivity Test. @@ -122,12 +125,12 @@ message Endpoint { // Default type if unspecified. NETWORK_TYPE_UNSPECIFIED = 0; - // A network hosted within Google Cloud Platform. + // A network hosted within Google Cloud. // To receive more detailed output, specify the URI for the source or // destination network. GCP_NETWORK = 1; - // A network hosted outside of Google Cloud Platform. + // A network hosted outside of Google Cloud. // This can be an on-premises network, or a network hosted by another cloud // provider. NON_GCP_NETWORK = 2; @@ -164,8 +167,8 @@ message Endpoint { // The Project ID can be derived from the URI if you provide a VM instance or // network URI. // The following are two cases where you must provide the project ID: - // 1. Only the IP address is specified, and the IP address is within a GCP - // project. + // 1. Only the IP address is specified, and the IP address is within a Google + // Cloud project. // 2. When you are using Shared VPC and the IP address that you provide is // from the service project. In this case, the network that the IP address // resides in is defined in the host project. diff --git a/packages/google-cloud-networkmanagement/protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto b/packages/google-cloud-networkmanagement/protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto index cfbae11c164..c4fa6ca14ac 100644 --- a/packages/google-cloud-networkmanagement/protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto +++ b/packages/google-cloud-networkmanagement/protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto @@ -132,12 +132,12 @@ message Endpoint { // Default type if unspecified. NETWORK_TYPE_UNSPECIFIED = 0; - // A network hosted within Google Cloud Platform. + // A network hosted within Google Cloud. // To receive more detailed output, specify the URI for the source or // destination network. GCP_NETWORK = 1; - // A network hosted outside of Google Cloud Platform. + // A network hosted outside of Google Cloud. // This can be an on-premises network, or a network hosted by another cloud // provider. NON_GCP_NETWORK = 2; @@ -184,8 +184,8 @@ message Endpoint { // The Project ID can be derived from the URI if you provide a VM instance or // network URI. // The following are two cases where you must provide the project ID: - // 1. Only the IP address is specified, and the IP address is within a GCP - // project. + // 1. Only the IP address is specified, and the IP address is within a Google + // Cloud project. // 2. When you are using Shared VPC and the IP address that you provide is // from the service project. In this case, the network that the IP address // resides in is defined in the host project. diff --git a/packages/google-cloud-networkmanagement/samples/generated/v1/snippet_metadata.google.cloud.networkmanagement.v1.json b/packages/google-cloud-networkmanagement/samples/generated/v1/snippet_metadata.google.cloud.networkmanagement.v1.json index dc02d0d1c1c..1d7e2f13d69 100644 --- a/packages/google-cloud-networkmanagement/samples/generated/v1/snippet_metadata.google.cloud.networkmanagement.v1.json +++ b/packages/google-cloud-networkmanagement/samples/generated/v1/snippet_metadata.google.cloud.networkmanagement.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-networkmanagement", - "version": "2.4.0", + "version": "2.4.2", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-networkmanagement/samples/generated/v1beta1/snippet_metadata.google.cloud.networkmanagement.v1beta1.json b/packages/google-cloud-networkmanagement/samples/generated/v1beta1/snippet_metadata.google.cloud.networkmanagement.v1beta1.json index 6583e9dc84d..a8775974498 100644 --- a/packages/google-cloud-networkmanagement/samples/generated/v1beta1/snippet_metadata.google.cloud.networkmanagement.v1beta1.json +++ b/packages/google-cloud-networkmanagement/samples/generated/v1beta1/snippet_metadata.google.cloud.networkmanagement.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-networkmanagement", - "version": "2.4.0", + "version": "2.4.2", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-networksecurity/package.json b/packages/google-cloud-networksecurity/package.json index 040ca2987fd..70951492308 100644 --- a/packages/google-cloud-networksecurity/package.json +++ b/packages/google-cloud-networksecurity/package.json @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-networksecurity" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-notebooks/package.json b/packages/google-cloud-notebooks/package.json index 681d1fb0c2a..3f6ebac5812 100644 --- a/packages/google-cloud-notebooks/package.json +++ b/packages/google-cloud-notebooks/package.json @@ -30,17 +30,18 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", "docs-test": "linkinator docs", "fix": "gts fix", - "prelint": "cd samples; npm link ../; npm i", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "system-test": "npm run compile && c8 mocha build/system-test", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", "test": "c8 mocha build/test" }, "dependencies": { @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-notebooks" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-optimization/package.json b/packages/google-cloud-optimization/package.json index fe2662dddfe..f05dee98235 100644 --- a/packages/google-cloud-optimization/package.json +++ b/packages/google-cloud-optimization/package.json @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-optimization" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-orchestration-airflow-service/CHANGELOG.md b/packages/google-cloud-orchestration-airflow-service/CHANGELOG.md index 17b553ac71a..749222da717 100644 --- a/packages/google-cloud-orchestration-airflow-service/CHANGELOG.md +++ b/packages/google-cloud-orchestration-airflow-service/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.4.0](https://github.com/googleapis/google-cloud-node/compare/orchestration-airflow-v2.3.2...orchestration-airflow-v2.4.0) (2023-05-02) + + +### Features + +* [orchestration] add airflow_byoid_uri field to Cloud Composer API ([#4210](https://github.com/googleapis/google-cloud-node/issues/4210)) ([dc2e138](https://github.com/googleapis/google-cloud-node/commit/dc2e138872f7fd7dab8c3e626452b15e20459bd4)) + ## [2.3.2](https://github.com/googleapis/google-cloud-node/compare/orchestration-airflow-v2.3.1...orchestration-airflow-v2.3.2) (2023-04-13) diff --git a/packages/google-cloud-orchestration-airflow-service/package.json b/packages/google-cloud-orchestration-airflow-service/package.json index cc1eca80e9d..f053ebf991c 100644 --- a/packages/google-cloud-orchestration-airflow-service/package.json +++ b/packages/google-cloud-orchestration-airflow-service/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/orchestration-airflow", - "version": "2.3.2", + "version": "2.4.0", "description": "orchestration-airflow client for Node.js", "repository": { "type": "git", @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-orchestration-airflow-service" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1/environments.proto b/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1/environments.proto index 113eadb7d70..22d7af74711 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1/environments.proto +++ b/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1/environments.proto @@ -458,6 +458,13 @@ message EnvironmentConfig { // interface](/composer/docs/how-to/accessing/airflow-web-interface)). string airflow_uri = 6; + // Output only. The 'bring your own identity' variant of the URI of the Apache + // Airflow Web UI hosted within this environment, to be accessed with external + // identities using workforce identity federation (see [Access environments + // with workforce identity + // federation](/composer/docs/composer-2/access-environments-with-workforce-identity-federation)). + string airflow_byoid_uri = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Optional. The configuration options for GKE cluster master authorized // networks. By default master authorized networks feature is: // - in case of private environment: enabled with no external networks diff --git a/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto b/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto index 6f49606d18b..a47958ad8b0 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto +++ b/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto @@ -526,6 +526,13 @@ message EnvironmentConfig { // interface](/composer/docs/how-to/accessing/airflow-web-interface)). string airflow_uri = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The 'bring your own identity' variant of the URI of the Apache + // Airflow Web UI hosted within this environment, to be accessed with external + // identities using workforce identity federation (see [Access environments + // with workforce identity + // federation](/composer/docs/composer-2/access-environments-with-workforce-identity-federation)). + string airflow_byoid_uri = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Optional. The encryption options for the Cloud Composer environment and its // dependencies. Cannot be updated. EncryptionConfig encryption_config = 12 diff --git a/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts b/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts index dc2cf980111..de0726df8b4 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts +++ b/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts @@ -1284,6 +1284,9 @@ export namespace google { /** EnvironmentConfig airflowUri */ airflowUri?: (string|null); + /** EnvironmentConfig airflowByoidUri */ + airflowByoidUri?: (string|null); + /** EnvironmentConfig masterAuthorizedNetworksConfig */ masterAuthorizedNetworksConfig?: (google.cloud.orchestration.airflow.service.v1.IMasterAuthorizedNetworksConfig|null); @@ -1342,6 +1345,9 @@ export namespace google { /** EnvironmentConfig airflowUri. */ public airflowUri: string; + /** EnvironmentConfig airflowByoidUri. */ + public airflowByoidUri: string; + /** EnvironmentConfig masterAuthorizedNetworksConfig. */ public masterAuthorizedNetworksConfig?: (google.cloud.orchestration.airflow.service.v1.IMasterAuthorizedNetworksConfig|null); @@ -6324,6 +6330,9 @@ export namespace google { /** EnvironmentConfig airflowUri */ airflowUri?: (string|null); + /** EnvironmentConfig airflowByoidUri */ + airflowByoidUri?: (string|null); + /** EnvironmentConfig encryptionConfig */ encryptionConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig|null); @@ -6382,6 +6391,9 @@ export namespace google { /** EnvironmentConfig airflowUri. */ public airflowUri: string; + /** EnvironmentConfig airflowByoidUri. */ + public airflowByoidUri: string; + /** EnvironmentConfig encryptionConfig. */ public encryptionConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig|null); diff --git a/packages/google-cloud-orchestration-airflow-service/protos/protos.js b/packages/google-cloud-orchestration-airflow-service/protos/protos.js index ebc1d788713..12ba35d2b5c 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/protos.js +++ b/packages/google-cloud-orchestration-airflow-service/protos/protos.js @@ -2690,6 +2690,7 @@ * @property {google.cloud.orchestration.airflow.service.v1.IWorkloadsConfig|null} [workloadsConfig] EnvironmentConfig workloadsConfig * @property {google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.EnvironmentSize|null} [environmentSize] EnvironmentConfig environmentSize * @property {string|null} [airflowUri] EnvironmentConfig airflowUri + * @property {string|null} [airflowByoidUri] EnvironmentConfig airflowByoidUri * @property {google.cloud.orchestration.airflow.service.v1.IMasterAuthorizedNetworksConfig|null} [masterAuthorizedNetworksConfig] EnvironmentConfig masterAuthorizedNetworksConfig * @property {google.cloud.orchestration.airflow.service.v1.IRecoveryConfig|null} [recoveryConfig] EnvironmentConfig recoveryConfig */ @@ -2821,6 +2822,14 @@ */ EnvironmentConfig.prototype.airflowUri = ""; + /** + * EnvironmentConfig airflowByoidUri. + * @member {string} airflowByoidUri + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.airflowByoidUri = ""; + /** * EnvironmentConfig masterAuthorizedNetworksConfig. * @member {google.cloud.orchestration.airflow.service.v1.IMasterAuthorizedNetworksConfig|null|undefined} masterAuthorizedNetworksConfig @@ -2893,6 +2902,8 @@ $root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.encode(message.masterAuthorizedNetworksConfig, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); if (message.recoveryConfig != null && Object.hasOwnProperty.call(message, "recoveryConfig")) $root.google.cloud.orchestration.airflow.service.v1.RecoveryConfig.encode(message.recoveryConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.airflowByoidUri != null && Object.hasOwnProperty.call(message, "airflowByoidUri")) + writer.uint32(/* id 20, wireType 2 =*/162).string(message.airflowByoidUri); return writer; }; @@ -2983,6 +2994,10 @@ message.airflowUri = reader.string(); break; } + case 20: { + message.airflowByoidUri = reader.string(); + break; + } case 17: { message.masterAuthorizedNetworksConfig = $root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.decode(reader, reader.uint32()); break; @@ -3093,6 +3108,9 @@ if (message.airflowUri != null && message.hasOwnProperty("airflowUri")) if (!$util.isString(message.airflowUri)) return "airflowUri: string expected"; + if (message.airflowByoidUri != null && message.hasOwnProperty("airflowByoidUri")) + if (!$util.isString(message.airflowByoidUri)) + return "airflowByoidUri: string expected"; if (message.masterAuthorizedNetworksConfig != null && message.hasOwnProperty("masterAuthorizedNetworksConfig")) { var error = $root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.verify(message.masterAuthorizedNetworksConfig); if (error) @@ -3195,6 +3213,8 @@ } if (object.airflowUri != null) message.airflowUri = String(object.airflowUri); + if (object.airflowByoidUri != null) + message.airflowByoidUri = String(object.airflowByoidUri); if (object.masterAuthorizedNetworksConfig != null) { if (typeof object.masterAuthorizedNetworksConfig !== "object") throw TypeError(".google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.masterAuthorizedNetworksConfig: object expected"); @@ -3238,6 +3258,7 @@ object.environmentSize = options.enums === String ? "ENVIRONMENT_SIZE_UNSPECIFIED" : 0; object.masterAuthorizedNetworksConfig = null; object.recoveryConfig = null; + object.airflowByoidUri = ""; } if (message.gkeCluster != null && message.hasOwnProperty("gkeCluster")) object.gkeCluster = message.gkeCluster; @@ -3271,6 +3292,8 @@ object.masterAuthorizedNetworksConfig = $root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.toObject(message.masterAuthorizedNetworksConfig, options); if (message.recoveryConfig != null && message.hasOwnProperty("recoveryConfig")) object.recoveryConfig = $root.google.cloud.orchestration.airflow.service.v1.RecoveryConfig.toObject(message.recoveryConfig, options); + if (message.airflowByoidUri != null && message.hasOwnProperty("airflowByoidUri")) + object.airflowByoidUri = message.airflowByoidUri; return object; }; @@ -14911,6 +14934,7 @@ * @property {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig|null} [databaseConfig] EnvironmentConfig databaseConfig * @property {google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig|null} [webServerConfig] EnvironmentConfig webServerConfig * @property {string|null} [airflowUri] EnvironmentConfig airflowUri + * @property {string|null} [airflowByoidUri] EnvironmentConfig airflowByoidUri * @property {google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig|null} [encryptionConfig] EnvironmentConfig encryptionConfig * @property {google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow|null} [maintenanceWindow] EnvironmentConfig maintenanceWindow * @property {google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig|null} [workloadsConfig] EnvironmentConfig workloadsConfig @@ -15014,6 +15038,14 @@ */ EnvironmentConfig.prototype.airflowUri = ""; + /** + * EnvironmentConfig airflowByoidUri. + * @member {string} airflowByoidUri + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.airflowByoidUri = ""; + /** * EnvironmentConfig encryptionConfig. * @member {google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig|null|undefined} encryptionConfig @@ -15118,6 +15150,8 @@ $root.google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.encode(message.masterAuthorizedNetworksConfig, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); if (message.recoveryConfig != null && Object.hasOwnProperty.call(message, "recoveryConfig")) $root.google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig.encode(message.recoveryConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.airflowByoidUri != null && Object.hasOwnProperty.call(message, "airflowByoidUri")) + writer.uint32(/* id 21, wireType 2 =*/170).string(message.airflowByoidUri); return writer; }; @@ -15192,6 +15226,10 @@ message.airflowUri = reader.string(); break; } + case 21: { + message.airflowByoidUri = reader.string(); + break; + } case 12: { message.encryptionConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.decode(reader, reader.uint32()); break; @@ -15293,6 +15331,9 @@ if (message.airflowUri != null && message.hasOwnProperty("airflowUri")) if (!$util.isString(message.airflowUri)) return "airflowUri: string expected"; + if (message.airflowByoidUri != null && message.hasOwnProperty("airflowByoidUri")) + if (!$util.isString(message.airflowByoidUri)) + return "airflowByoidUri: string expected"; if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) { var error = $root.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.verify(message.encryptionConfig); if (error) @@ -15381,6 +15422,8 @@ } if (object.airflowUri != null) message.airflowUri = String(object.airflowUri); + if (object.airflowByoidUri != null) + message.airflowByoidUri = String(object.airflowByoidUri); if (object.encryptionConfig != null) { if (typeof object.encryptionConfig !== "object") throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.encryptionConfig: object expected"); @@ -15463,6 +15506,7 @@ object.environmentSize = options.enums === String ? "ENVIRONMENT_SIZE_UNSPECIFIED" : 0; object.masterAuthorizedNetworksConfig = null; object.recoveryConfig = null; + object.airflowByoidUri = ""; } if (message.gkeCluster != null && message.hasOwnProperty("gkeCluster")) object.gkeCluster = message.gkeCluster; @@ -15496,6 +15540,8 @@ object.masterAuthorizedNetworksConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.toObject(message.masterAuthorizedNetworksConfig, options); if (message.recoveryConfig != null && message.hasOwnProperty("recoveryConfig")) object.recoveryConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig.toObject(message.recoveryConfig, options); + if (message.airflowByoidUri != null && message.hasOwnProperty("airflowByoidUri")) + object.airflowByoidUri = message.airflowByoidUri; return object; }; diff --git a/packages/google-cloud-orchestration-airflow-service/protos/protos.json b/packages/google-cloud-orchestration-airflow-service/protos/protos.json index 0e965de82de..9d1141b4745 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/protos.json +++ b/packages/google-cloud-orchestration-airflow-service/protos/protos.json @@ -395,6 +395,13 @@ "type": "string", "id": 6 }, + "airflowByoidUri": { + "type": "string", + "id": 20, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "masterAuthorizedNetworksConfig": { "type": "MasterAuthorizedNetworksConfig", "id": 17, @@ -1680,6 +1687,13 @@ "(google.api.field_behavior)": "OUTPUT_ONLY" } }, + "airflowByoidUri": { + "type": "string", + "id": 21, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "encryptionConfig": { "type": "EncryptionConfig", "id": 12, diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json index 4e56b2ac6f0..2574653386d 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1/snippet_metadata.google.cloud.orchestration.airflow.service.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-service", - "version": "2.3.1", + "version": "2.4.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json index e18cc8bb8c7..94d4af18016 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json +++ b/packages/google-cloud-orchestration-airflow-service/samples/generated/v1beta1/snippet_metadata.google.cloud.orchestration.airflow.service.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-service", - "version": "2.3.1", + "version": "2.4.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-orchestration-airflow-service/samples/package.json b/packages/google-cloud-orchestration-airflow-service/samples/package.json index 4b70776c09d..596f1b687f7 100644 --- a/packages/google-cloud-orchestration-airflow-service/samples/package.json +++ b/packages/google-cloud-orchestration-airflow-service/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/orchestration-airflow": "^2.3.2" + "@google-cloud/orchestration-airflow": "^2.4.0" }, "devDependencies": { "c8": "^7.1.0", diff --git a/packages/google-cloud-orgpolicy/package.json b/packages/google-cloud-orgpolicy/package.json index 3db73254fd2..5558560bac5 100644 --- a/packages/google-cloud-orgpolicy/package.json +++ b/packages/google-cloud-orgpolicy/package.json @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-orgpolicy" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-osconfig/package.json b/packages/google-cloud-osconfig/package.json index 0128522247d..0315391e192 100644 --- a/packages/google-cloud-osconfig/package.json +++ b/packages/google-cloud-osconfig/package.json @@ -17,18 +17,18 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", "docs-test": "linkinator docs", "fix": "gts fix", - "prefix": "cd samples; npm link ../; npm install", "lint": "gts check", - "prelint": "cd samples; npm link ../; npm install", "prepare": "npm run compile-protos && npm run compile", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "system-test": "npm run compile && c8 mocha build/system-test", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", "test": "c8 mocha build/test" }, "dependencies": { @@ -44,6 +44,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -55,5 +56,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-osconfig" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-oslogin/package.json b/packages/google-cloud-oslogin/package.json index ded1d601631..7c62cff5d39 100644 --- a/packages/google-cloud-oslogin/package.json +++ b/packages/google-cloud-oslogin/package.json @@ -35,20 +35,20 @@ "Google Cloud OS Login API" ], "scripts": { - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "system-test": "npm run compile && c8 mocha build/system-test", - "lint": "gts check", - "fix": "gts fix", - "docs": "jsdoc -c .jsdoc.js", - "docs-test": "linkinator docs", - "predocs-test": "npm run docs", "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", - "prepare": "npm run compile", - "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean" + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -63,6 +63,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -72,5 +73,4 @@ "webpack": "^5.0.0", "webpack-cli": "^5.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-phishingprotection/package.json b/packages/google-cloud-phishingprotection/package.json index 24d84ba0d29..830d71a10cc 100644 --- a/packages/google-cloud-phishingprotection/package.json +++ b/packages/google-cloud-phishingprotection/package.json @@ -42,6 +42,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -52,24 +53,23 @@ "webpack-cli": "^5.0.0" }, "scripts": { - "test": "c8 mocha build/test", + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", - "lint": "gts check", - "fix": "gts fix", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "system-test": "npm run compile && c8 mocha build/system-test", "predocs-test": "npm run docs", "docs-test": "linkinator docs", - "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", - "compile-protos": "compileProtos src", - "prepare": "npm run compile", - "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean" + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "license": "Apache-2.0", "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-policytroubleshooter/package.json b/packages/google-cloud-policytroubleshooter/package.json index 13b578ce871..c53ffb97b4d 100644 --- a/packages/google-cloud-policytroubleshooter/package.json +++ b/packages/google-cloud-policytroubleshooter/package.json @@ -31,7 +31,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -39,10 +39,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -57,6 +58,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-privatecatalog/package.json b/packages/google-cloud-privatecatalog/package.json index a256679d955..8573dc76ef7 100644 --- a/packages/google-cloud-privatecatalog/package.json +++ b/packages/google-cloud-privatecatalog/package.json @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-privatecatalog" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-recaptchaenterprise/package.json b/packages/google-cloud-recaptchaenterprise/package.json index eeedfbee66f..64c33a7958b 100644 --- a/packages/google-cloud-recaptchaenterprise/package.json +++ b/packages/google-cloud-recaptchaenterprise/package.json @@ -42,6 +42,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -52,25 +53,24 @@ "webpack-cli": "^5.0.0" }, "scripts": { - "lint": "gts check", - "fix": "gts fix", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "system-test": "npm run compile && c8 mocha build/system-test", - "docs": "jsdoc -c .jsdoc.js", - "test": "c8 mocha build/test", - "docs-test": "linkinator docs", "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", - "prepare": "npm run compile", - "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean" + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "license": "Apache-2.0", "engines": { "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-recaptchaenterprise" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-recaptchaenterprise/protos/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto b/packages/google-cloud-recaptchaenterprise/protos/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto index c77eef437b2..e73de0c97e0 100644 --- a/packages/google-cloud-recaptchaenterprise/protos/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto +++ b/packages/google-cloud-recaptchaenterprise/protos/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto @@ -25,7 +25,7 @@ import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.RecaptchaEnterprise.V1"; -option go_package = "cloud.google.com/go/recaptchaenterprise/apiv1/recaptchaenterprisepb;recaptchaenterprisepb"; +option go_package = "cloud.google.com/go/recaptchaenterprise/v2/apiv1/recaptchaenterprisepb;recaptchaenterprisepb"; option java_multiple_files = true; option java_outer_classname = "RecaptchaEnterpriseProto"; option java_package = "com.google.recaptchaenterprise.v1"; diff --git a/packages/google-cloud-recaptchaenterprise/protos/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto b/packages/google-cloud-recaptchaenterprise/protos/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto index f2d83af2391..8d44b92e411 100644 --- a/packages/google-cloud-recaptchaenterprise/protos/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto +++ b/packages/google-cloud-recaptchaenterprise/protos/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto @@ -23,7 +23,7 @@ import "google/api/resource.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.RecaptchaEnterprise.V1Beta1"; -option go_package = "cloud.google.com/go/recaptchaenterprise/apiv1beta1/recaptchaenterprisepb;recaptchaenterprisepb"; +option go_package = "cloud.google.com/go/recaptchaenterprise/v2/apiv1beta1/recaptchaenterprisepb;recaptchaenterprisepb"; option java_multiple_files = true; option java_outer_classname = "RecaptchaEnterpriseProto"; option java_package = "com.google.recaptchaenterprise.v1beta1"; diff --git a/packages/google-cloud-recaptchaenterprise/protos/protos.json b/packages/google-cloud-recaptchaenterprise/protos/protos.json index 7e1017f82b1..4cdec6f9133 100644 --- a/packages/google-cloud-recaptchaenterprise/protos/protos.json +++ b/packages/google-cloud-recaptchaenterprise/protos/protos.json @@ -9,7 +9,7 @@ "v1": { "options": { "csharp_namespace": "Google.Cloud.RecaptchaEnterprise.V1", - "go_package": "cloud.google.com/go/recaptchaenterprise/apiv1/recaptchaenterprisepb;recaptchaenterprisepb", + "go_package": "cloud.google.com/go/recaptchaenterprise/v2/apiv1/recaptchaenterprisepb;recaptchaenterprisepb", "java_multiple_files": true, "java_outer_classname": "RecaptchaEnterpriseProto", "java_package": "com.google.recaptchaenterprise.v1", @@ -1502,7 +1502,7 @@ "v1beta1": { "options": { "csharp_namespace": "Google.Cloud.RecaptchaEnterprise.V1Beta1", - "go_package": "cloud.google.com/go/recaptchaenterprise/apiv1beta1/recaptchaenterprisepb;recaptchaenterprisepb", + "go_package": "cloud.google.com/go/recaptchaenterprise/v2/apiv1beta1/recaptchaenterprisepb;recaptchaenterprisepb", "java_multiple_files": true, "java_outer_classname": "RecaptchaEnterpriseProto", "java_package": "com.google.recaptchaenterprise.v1beta1", diff --git a/packages/google-cloud-recaptchaenterprise/samples/generated/v1/snippet_metadata.google.cloud.recaptchaenterprise.v1.json b/packages/google-cloud-recaptchaenterprise/samples/generated/v1/snippet_metadata.google.cloud.recaptchaenterprise.v1.json index 45072f04706..898bd3e2326 100644 --- a/packages/google-cloud-recaptchaenterprise/samples/generated/v1/snippet_metadata.google.cloud.recaptchaenterprise.v1.json +++ b/packages/google-cloud-recaptchaenterprise/samples/generated/v1/snippet_metadata.google.cloud.recaptchaenterprise.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-recaptchaenterprise", - "version": "3.4.0", + "version": "3.4.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-recaptchaenterprise/samples/generated/v1beta1/snippet_metadata.google.cloud.recaptchaenterprise.v1beta1.json b/packages/google-cloud-recaptchaenterprise/samples/generated/v1beta1/snippet_metadata.google.cloud.recaptchaenterprise.v1beta1.json index b0b0a1beeab..e424bed0f44 100644 --- a/packages/google-cloud-recaptchaenterprise/samples/generated/v1beta1/snippet_metadata.google.cloud.recaptchaenterprise.v1beta1.json +++ b/packages/google-cloud-recaptchaenterprise/samples/generated/v1beta1/snippet_metadata.google.cloud.recaptchaenterprise.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-recaptchaenterprise", - "version": "3.4.0", + "version": "3.4.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-recommender/package.json b/packages/google-cloud-recommender/package.json index a7885abfdb6..91c3e39410d 100644 --- a/packages/google-cloud-recommender/package.json +++ b/packages/google-cloud-recommender/package.json @@ -18,19 +18,19 @@ "main": "build/src/index.js", "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", "docs-test": "linkinator docs", "fix": "gts fix", "lint": "gts check", - "predocs-test": "npm run docs", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "test": "c8 mocha build/test", - "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -45,6 +45,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -57,5 +58,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-redis/CHANGELOG.md b/packages/google-cloud-redis/CHANGELOG.md index 36407613166..92fb3369678 100644 --- a/packages/google-cloud-redis/CHANGELOG.md +++ b/packages/google-cloud-redis/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-redis?activeTab=versions +## [3.3.0](https://github.com/googleapis/google-cloud-node/compare/redis-v3.2.2...redis-v3.3.0) (2023-05-09) + + +### Features + +* [redis] [Cloud Memorystore for Redis] Add CMEK key field ([#4251](https://github.com/googleapis/google-cloud-node/issues/4251)) ([1427b2b](https://github.com/googleapis/google-cloud-node/commit/1427b2bf0cac31a3fbd10f607b2a5d9803f3a18f)) + ## [3.2.2](https://github.com/googleapis/google-cloud-node/compare/redis-v3.2.1...redis-v3.2.2) (2023-04-13) diff --git a/packages/google-cloud-redis/README.md b/packages/google-cloud-redis/README.md index 3716d5bfc62..acfcbffadb9 100644 --- a/packages/google-cloud-redis/README.md +++ b/packages/google-cloud-redis/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Cloud Redis: Node.js Client](https://github.com/googleapis/google-cloud-node) +# [Cloud Redis: Node.js Client](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-redis) [![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/redis.svg)](https://www.npmjs.org/package/@google-cloud/redis) @@ -79,34 +79,33 @@ async function main(projectId, location) { ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-redis/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Cloud_redis.create_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1/cloud_redis.create_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1/cloud_redis.create_instance.js,samples/README.md) | -| Cloud_redis.delete_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1/cloud_redis.delete_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1/cloud_redis.delete_instance.js,samples/README.md) | -| Cloud_redis.export_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1/cloud_redis.export_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1/cloud_redis.export_instance.js,samples/README.md) | -| Cloud_redis.failover_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1/cloud_redis.failover_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1/cloud_redis.failover_instance.js,samples/README.md) | -| Cloud_redis.get_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1/cloud_redis.get_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1/cloud_redis.get_instance.js,samples/README.md) | -| Cloud_redis.get_instance_auth_string | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1/cloud_redis.get_instance_auth_string.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1/cloud_redis.get_instance_auth_string.js,samples/README.md) | -| Cloud_redis.import_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1/cloud_redis.import_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1/cloud_redis.import_instance.js,samples/README.md) | -| Cloud_redis.list_instances | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1/cloud_redis.list_instances.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1/cloud_redis.list_instances.js,samples/README.md) | -| Cloud_redis.reschedule_maintenance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1/cloud_redis.reschedule_maintenance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1/cloud_redis.reschedule_maintenance.js,samples/README.md) | -| Cloud_redis.update_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1/cloud_redis.update_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1/cloud_redis.update_instance.js,samples/README.md) | -| Cloud_redis.upgrade_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1/cloud_redis.upgrade_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1/cloud_redis.upgrade_instance.js,samples/README.md) | -| Cloud_redis.create_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.create_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.create_instance.js,samples/README.md) | -| Cloud_redis.delete_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.delete_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.delete_instance.js,samples/README.md) | -| Cloud_redis.export_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.export_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.export_instance.js,samples/README.md) | -| Cloud_redis.failover_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.failover_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.failover_instance.js,samples/README.md) | -| Cloud_redis.get_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.get_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.get_instance.js,samples/README.md) | -| Cloud_redis.get_instance_auth_string | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.get_instance_auth_string.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.get_instance_auth_string.js,samples/README.md) | -| Cloud_redis.import_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.import_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.import_instance.js,samples/README.md) | -| Cloud_redis.list_instances | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.list_instances.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.list_instances.js,samples/README.md) | -| Cloud_redis.reschedule_maintenance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.reschedule_maintenance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.reschedule_maintenance.js,samples/README.md) | -| Cloud_redis.update_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.update_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.update_instance.js,samples/README.md) | -| Cloud_redis.upgrade_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.upgrade_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.upgrade_instance.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/quickstart.js,samples/README.md) | -| Redis | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/system-test/redis.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/system-test/redis.js,samples/README.md) | +| Cloud_redis.create_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1/cloud_redis.create_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1/cloud_redis.create_instance.js,packages/google-cloud-redis/samples/README.md) | +| Cloud_redis.delete_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1/cloud_redis.delete_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1/cloud_redis.delete_instance.js,packages/google-cloud-redis/samples/README.md) | +| Cloud_redis.export_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1/cloud_redis.export_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1/cloud_redis.export_instance.js,packages/google-cloud-redis/samples/README.md) | +| Cloud_redis.failover_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1/cloud_redis.failover_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1/cloud_redis.failover_instance.js,packages/google-cloud-redis/samples/README.md) | +| Cloud_redis.get_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1/cloud_redis.get_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1/cloud_redis.get_instance.js,packages/google-cloud-redis/samples/README.md) | +| Cloud_redis.get_instance_auth_string | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1/cloud_redis.get_instance_auth_string.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1/cloud_redis.get_instance_auth_string.js,packages/google-cloud-redis/samples/README.md) | +| Cloud_redis.import_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1/cloud_redis.import_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1/cloud_redis.import_instance.js,packages/google-cloud-redis/samples/README.md) | +| Cloud_redis.list_instances | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1/cloud_redis.list_instances.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1/cloud_redis.list_instances.js,packages/google-cloud-redis/samples/README.md) | +| Cloud_redis.reschedule_maintenance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1/cloud_redis.reschedule_maintenance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1/cloud_redis.reschedule_maintenance.js,packages/google-cloud-redis/samples/README.md) | +| Cloud_redis.update_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1/cloud_redis.update_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1/cloud_redis.update_instance.js,packages/google-cloud-redis/samples/README.md) | +| Cloud_redis.upgrade_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1/cloud_redis.upgrade_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1/cloud_redis.upgrade_instance.js,packages/google-cloud-redis/samples/README.md) | +| Cloud_redis.create_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.create_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.create_instance.js,packages/google-cloud-redis/samples/README.md) | +| Cloud_redis.delete_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.delete_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.delete_instance.js,packages/google-cloud-redis/samples/README.md) | +| Cloud_redis.export_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.export_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.export_instance.js,packages/google-cloud-redis/samples/README.md) | +| Cloud_redis.failover_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.failover_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.failover_instance.js,packages/google-cloud-redis/samples/README.md) | +| Cloud_redis.get_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.get_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.get_instance.js,packages/google-cloud-redis/samples/README.md) | +| Cloud_redis.get_instance_auth_string | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.get_instance_auth_string.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.get_instance_auth_string.js,packages/google-cloud-redis/samples/README.md) | +| Cloud_redis.import_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.import_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.import_instance.js,packages/google-cloud-redis/samples/README.md) | +| Cloud_redis.list_instances | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.list_instances.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.list_instances.js,packages/google-cloud-redis/samples/README.md) | +| Cloud_redis.reschedule_maintenance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.reschedule_maintenance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.reschedule_maintenance.js,packages/google-cloud-redis/samples/README.md) | +| Cloud_redis.update_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.update_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.update_instance.js,packages/google-cloud-redis/samples/README.md) | +| Cloud_redis.upgrade_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.upgrade_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/generated/v1beta1/cloud_redis.upgrade_instance.js,packages/google-cloud-redis/samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/quickstart.js,packages/google-cloud-redis/samples/README.md) | diff --git a/packages/google-cloud-redis/package.json b/packages/google-cloud-redis/package.json index 764f7ec2dc6..46058977e5a 100644 --- a/packages/google-cloud-redis/package.json +++ b/packages/google-cloud-redis/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/redis", "description": "Google Cloud Memorystore for Redis API client for Node.js", - "version": "3.2.2", + "version": "3.3.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { @@ -33,21 +33,20 @@ "Google Cloud Memorystore for Redis API" ], "scripts": { - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "system-test": "npm run compile && c8 mocha build/system-test", - "docs": "jsdoc -c .jsdoc.js", - "lint": "gts check", - "fix": "gts fix", - "docs-test": "linkinator docs", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "pretest": "npm run compile", - "prelint": "cd samples; npm link ../; npm install", - "clean": "gts clean", - "precompile": "gts clean" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -63,6 +62,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -72,5 +72,4 @@ "webpack": "^5.0.0", "webpack-cli": "^5.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-redis/protos/google/cloud/redis/v1/cloud_redis.proto b/packages/google-cloud-redis/protos/google/cloud/redis/v1/cloud_redis.proto index 51659ed119f..5ff9e9c8b4d 100644 --- a/packages/google-cloud-redis/protos/google/cloud/redis/v1/cloud_redis.proto +++ b/packages/google-cloud-redis/protos/google/cloud/redis/v1/cloud_redis.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -22,6 +22,7 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/duration.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/type/dayofweek.proto"; @@ -49,7 +50,8 @@ option java_package = "com.google.cloud.redis.v1"; // * `projects/redpepper-1290/locations/us-central1/instances/my-redis` service CloudRedis { option (google.api.default_host) = "redis.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Lists all Redis instances owned by a project in either the specified // location (region) or all locations. @@ -78,7 +80,8 @@ service CloudRedis { // Gets the AUTH string for a Redis instance. If AUTH is not enabled for the // instance the response will be empty. This information is not included in // the details returned to GetInstance. - rpc GetInstanceAuthString(GetInstanceAuthStringRequest) returns (InstanceAuthString) { + rpc GetInstanceAuthString(GetInstanceAuthStringRequest) + returns (InstanceAuthString) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/instances/*}/authString" }; @@ -97,7 +100,8 @@ service CloudRedis { // // The returned operation is automatically deleted after a few hours, so there // is no need to call DeleteOperation. - rpc CreateInstance(CreateInstanceRequest) returns (google.longrunning.Operation) { + rpc CreateInstance(CreateInstanceRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/instances" body: "instance" @@ -114,7 +118,8 @@ service CloudRedis { // Completed longrunning.Operation will contain the new instance object // in the response field. The returned operation is automatically deleted // after a few hours, so there is no need to call DeleteOperation. - rpc UpdateInstance(UpdateInstanceRequest) returns (google.longrunning.Operation) { + rpc UpdateInstance(UpdateInstanceRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1/{instance.name=projects/*/locations/*/instances/*}" body: "instance" @@ -128,7 +133,8 @@ service CloudRedis { // Upgrades Redis instance to the newer Redis version specified in the // request. - rpc UpgradeInstance(UpgradeInstanceRequest) returns (google.longrunning.Operation) { + rpc UpgradeInstance(UpgradeInstanceRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/instances/*}:upgrade" body: "*" @@ -148,7 +154,8 @@ service CloudRedis { // // The returned operation is automatically deleted after a few hours, so // there is no need to call DeleteOperation. - rpc ImportInstance(ImportInstanceRequest) returns (google.longrunning.Operation) { + rpc ImportInstance(ImportInstanceRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/instances/*}:import" body: "*" @@ -166,7 +173,8 @@ service CloudRedis { // // The returned operation is automatically deleted after a few hours, so // there is no need to call DeleteOperation. - rpc ExportInstance(ExportInstanceRequest) returns (google.longrunning.Operation) { + rpc ExportInstance(ExportInstanceRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/instances/*}:export" body: "*" @@ -180,7 +188,8 @@ service CloudRedis { // Initiates a failover of the primary node to current replica node for a // specific STANDARD tier Cloud Memorystore for Redis instance. - rpc FailoverInstance(FailoverInstanceRequest) returns (google.longrunning.Operation) { + rpc FailoverInstance(FailoverInstanceRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/instances/*}:failover" body: "*" @@ -194,7 +203,8 @@ service CloudRedis { // Deletes a specific Redis instance. Instance stops serving and data is // deleted. - rpc DeleteInstance(DeleteInstanceRequest) returns (google.longrunning.Operation) { + rpc DeleteInstance(DeleteInstanceRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/instances/*}" }; @@ -207,12 +217,14 @@ service CloudRedis { // Reschedule maintenance for a given instance in a given project and // location. - rpc RescheduleMaintenance(RescheduleMaintenanceRequest) returns (google.longrunning.Operation) { + rpc RescheduleMaintenance(RescheduleMaintenanceRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/instances/*}:rescheduleMaintenance" body: "*" }; - option (google.api.method_signature) = "name, reschedule_type, schedule_time"; + option (google.api.method_signature) = + "name, reschedule_type, schedule_time"; option (google.longrunning.operation_info) = { response_type: "google.cloud.redis.v1.Instance" metadata_type: "google.cloud.redis.v1.OperationMetadata" @@ -321,6 +333,15 @@ message Instance { READ_REPLICAS_ENABLED = 2; } + // Possible reasons for the instance to be in a "SUSPENDED" state. + enum SuspensionReason { + // Not set. + SUSPENSION_REASON_UNSPECIFIED = 0; + + // Something wrong with the CMEK key provided by customer. + CUSTOMER_MANAGED_KEY_ISSUE = 1; + } + // Required. Unique name of the resource in this scope including project and // location using the form: // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` @@ -328,8 +349,10 @@ message Instance { // Note: Redis instances are managed and addressed at regional level so // location_id here refers to a GCP region; however, users may choose which // specific zone (or collection of zones for cross-zone instances) an instance - // should be provisioned in. Refer to [location_id][google.cloud.redis.v1.Instance.location_id] and - // [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] fields for more details. + // should be provisioned in. Refer to + // [location_id][google.cloud.redis.v1.Instance.location_id] and + // [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id] + // fields for more details. string name = 1 [(google.api.field_behavior) = REQUIRED]; // An arbitrary and optional user-provided name for the instance. @@ -372,11 +395,11 @@ message Instance { // the default block size is /28. string reserved_ip_range = 9 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Additional IP range for node placement. Required when enabling read - // replicas on an existing instance. For DIRECT_PEERING mode value must be a - // CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode value - // must be the name of an allocated address range associated with the private - // service access connection, or "auto". + // Optional. Additional IP range for node placement. Required when enabling + // read replicas on an existing instance. For DIRECT_PEERING mode value must + // be a CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode + // value must be the name of an allocated address range associated with the + // private service access connection, or "auto". string secondary_ip_range = 30 [(google.api.field_behavior) = OPTIONAL]; // Output only. Hostname or IP address of the exposed Redis endpoint used by @@ -392,7 +415,8 @@ message Instance { string current_location_id = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time the instance was created. - google.protobuf.Timestamp create_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The current state of this instance. State state = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -421,7 +445,8 @@ message Instance { // // * stream-node-max-bytes // * stream-node-max-entries - map redis_configs = 16 [(google.api.field_behavior) = OPTIONAL]; + map redis_configs = 16 + [(google.api.field_behavior) = OPTIONAL]; // Required. The service tier of the instance. Tier tier = 17 [(google.api.field_behavior) = REQUIRED]; @@ -440,43 +465,42 @@ message Instance { // "serviceAccount:". The value may change over time // for a given instance so should be checked before each import/export // operation. - string persistence_iam_identity = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + string persistence_iam_identity = 21 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. The network connect mode of the Redis instance. // If not provided, the connect mode defaults to DIRECT_PEERING. ConnectMode connect_mode = 22 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If set to - // "true" AUTH is enabled on the instance. Default value is "false" meaning - // AUTH is disabled. + // Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If + // set to "true" AUTH is enabled on the instance. Default value is "false" + // meaning AUTH is disabled. bool auth_enabled = 23 [(google.api.field_behavior) = OPTIONAL]; // Output only. List of server CA certificates for the instance. - repeated TlsCertificate server_ca_certs = 25 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated TlsCertificate server_ca_certs = 25 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. The TLS mode of the Redis instance. // If not provided, TLS is disabled for the instance. - TransitEncryptionMode transit_encryption_mode = 26 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The number of replica nodes. The valid range for the Standard Tier with - // read replicas enabled is [1-5] and defaults to 2. If read replicas are not - // enabled for a Standard Tier instance, the only valid value is 1 and the - // default is 1. The valid value for basic tier is 0 and the default is also - // 0. + TransitEncryptionMode transit_encryption_mode = 26 + [(google.api.field_behavior) = OPTIONAL]; // Optional. The maintenance policy for the instance. If not provided, // maintenance events can be performed at any time. - MaintenancePolicy maintenance_policy = 27 [(google.api.field_behavior) = OPTIONAL]; + MaintenancePolicy maintenance_policy = 27 + [(google.api.field_behavior) = OPTIONAL]; // Output only. Date and time of upcoming maintenance events which have been // scheduled. - MaintenanceSchedule maintenance_schedule = 28 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The number of replica nodes. The valid range for the Standard Tier with - // read replicas enabled is [1-5] and defaults to 2. If read replicas are not - // enabled for a Standard Tier instance, the only valid value is 1 and the - // default is 1. The valid value for basic tier is 0 and the default is also - // 0. + MaintenanceSchedule maintenance_schedule = 28 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The number of replica nodes. The valid range for the Standard + // Tier with read replicas enabled is [1-5] and defaults to 2. If read + // replicas are not enabled for a Standard Tier instance, the only valid value + // is 1 and the default is 1. The valid value for basic tier is 0 and the + // default is also 0. int32 replica_count = 31 [(google.api.field_behavior) = OPTIONAL]; // Output only. Info per node. @@ -492,11 +516,92 @@ message Instance { // endpoint. Standard tier only. Write requests should target 'port'. int32 read_endpoint_port = 34 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. Read replicas mode for the instance. Defaults to READ_REPLICAS_DISABLED. - ReadReplicasMode read_replicas_mode = 35 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Read replicas mode for the instance. Defaults to + // READ_REPLICAS_DISABLED. + ReadReplicasMode read_replicas_mode = 35 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The KMS key reference that the customer provides when trying to + // create the instance. + string customer_managed_key = 36 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Persistence configuration parameters + PersistenceConfig persistence_config = 37 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. reasons that causes instance in "SUSPENDED" state. + repeated SuspensionReason suspension_reasons = 38 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The self service update maintenance version. + // The version is date based such as "20210712_00_00". + string maintenance_version = 39 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The available maintenance versions that an instance could update + // to. + repeated string available_maintenance_versions = 40 + [(google.api.field_behavior) = OPTIONAL]; } -// Request for [RescheduleMaintenance][google.cloud.redis.v1.CloudRedis.RescheduleMaintenance]. +// Configuration of the persistence functionality. +message PersistenceConfig { + // Available Persistence modes. + enum PersistenceMode { + // Not set. + PERSISTENCE_MODE_UNSPECIFIED = 0; + + // Persistence is disabled for the instance, + // and any existing snapshots are deleted. + DISABLED = 1; + + // RDB based Persistence is enabled. + RDB = 2; + } + + // Available snapshot periods for scheduling. + enum SnapshotPeriod { + // Not set. + SNAPSHOT_PERIOD_UNSPECIFIED = 0; + + // Snapshot every 1 hour. + ONE_HOUR = 3; + + // Snapshot every 6 hours. + SIX_HOURS = 4; + + // Snapshot every 12 hours. + TWELVE_HOURS = 5; + + // Snapshot every 24 hours. + TWENTY_FOUR_HOURS = 6; + } + + // Optional. Controls whether Persistence features are enabled. + // If not provided, the existing value will be used. + PersistenceMode persistence_mode = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Period between RDB snapshots. Snapshots will be attempted every + // period starting from the provided snapshot start time. For example, a start + // time of 01/01/2033 06:45 and SIX_HOURS snapshot period will do nothing + // until 01/01/2033, and then trigger snapshots every day at 06:45, 12:45, + // 18:45, and 00:45 the next day, and so on. If not provided, + // TWENTY_FOUR_HOURS will be used as default. + SnapshotPeriod rdb_snapshot_period = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The next time that a snapshot attempt is scheduled to occur. + google.protobuf.Timestamp rdb_next_snapshot_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Date and time that the first snapshot was/will be attempted, and + // to which future snapshots will be aligned. If not provided, the current + // time will be used. + google.protobuf.Timestamp rdb_snapshot_start_time = 5 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for +// [RescheduleMaintenance][google.cloud.redis.v1.CloudRedis.RescheduleMaintenance]. message RescheduleMaintenanceRequest { // Reschedule options. enum RescheduleType { @@ -519,27 +624,29 @@ message RescheduleMaintenanceRequest { // where `location_id` refers to a GCP region. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "redis.googleapis.com/Instance" - } + (google.api.resource_reference) = { type: "redis.googleapis.com/Instance" } ]; - // Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well. + // Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as + // well. RescheduleType reschedule_type = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. Timestamp when the maintenance shall be rescheduled to if // reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for // example `2012-11-15T16:19:00.094Z`. - google.protobuf.Timestamp schedule_time = 3 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.Timestamp schedule_time = 3 + [(google.api.field_behavior) = OPTIONAL]; } // Maintenance policy for an instance. message MaintenancePolicy { // Output only. The time when the policy was created. - google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time when the policy was last updated. - google.protobuf.Timestamp update_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. Description of what this policy is for. Create/Update methods // return INVALID_ARGUMENT if the length is greater than 512. @@ -548,7 +655,8 @@ message MaintenancePolicy { // Optional. Maintenance window that is applied to resources covered by this // policy. Minimum 1. For the current version, the maximum number of // weekly_window is expected to be one. - repeated WeeklyMaintenanceWindow weekly_maintenance_window = 4 [(google.api.field_behavior) = OPTIONAL]; + repeated WeeklyMaintenanceWindow weekly_maintenance_window = 4 + [(google.api.field_behavior) = OPTIONAL]; } // Time window in which disruptive maintenance updates occur. Non-disruptive @@ -560,25 +668,32 @@ message WeeklyMaintenanceWindow { // Required. Start time of the window in UTC time. google.type.TimeOfDay start_time = 2 [(google.api.field_behavior) = REQUIRED]; - // Output only. Duration of the maintenance window. The current window is fixed at 1 hour. - google.protobuf.Duration duration = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Duration of the maintenance window. The current window is + // fixed at 1 hour. + google.protobuf.Duration duration = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Upcoming maintenance schedule. If no maintenance is scheduled, fields are not // populated. message MaintenanceSchedule { - // Output only. The start time of any upcoming scheduled maintenance for this instance. - google.protobuf.Timestamp start_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The start time of any upcoming scheduled maintenance for this + // instance. + google.protobuf.Timestamp start_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The end time of any upcoming scheduled maintenance for this instance. - google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The end time of any upcoming scheduled maintenance for this + // instance. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // If the scheduled maintenance can be rescheduled, default is true. bool can_reschedule = 3 [deprecated = true]; - // Output only. The deadline that the maintenance schedule start time can not go beyond, - // including reschedule. - google.protobuf.Timestamp schedule_deadline_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The deadline that the maintenance schedule start time can not + // go beyond, including reschedule. + google.protobuf.Timestamp schedule_deadline_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Request for [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances]. @@ -603,7 +718,8 @@ message ListInstancesRequest { int32 page_size = 2; // The `next_page_token` value returned from a previous - // [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if any. + // [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if + // any. string page_token = 3; } @@ -637,22 +753,19 @@ message GetInstanceRequest { // where `location_id` refers to a GCP region. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "redis.googleapis.com/Instance" - } + (google.api.resource_reference) = { type: "redis.googleapis.com/Instance" } ]; } -// Request for [GetInstanceAuthString][google.cloud.redis.v1.CloudRedis.GetInstanceAuthString]. +// Request for +// [GetInstanceAuthString][google.cloud.redis.v1.CloudRedis.GetInstanceAuthString]. message GetInstanceAuthStringRequest { // Required. Redis instance resource name using the form: // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` // where `location_id` refers to a GCP region. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "redis.googleapis.com/Instance" - } + (google.api.resource_reference) = { type: "redis.googleapis.com/Instance" } ]; } @@ -662,7 +775,8 @@ message InstanceAuthString { string auth_string = 1; } -// Request for [CreateInstance][google.cloud.redis.v1.CloudRedis.CreateInstance]. +// Request for +// [CreateInstance][google.cloud.redis.v1.CloudRedis.CreateInstance]. message CreateInstanceRequest { // Required. The resource name of the instance location using the form: // `projects/{project_id}/locations/{location_id}` @@ -688,7 +802,8 @@ message CreateInstanceRequest { Instance instance = 3 [(google.api.field_behavior) = REQUIRED]; } -// Request for [UpdateInstance][google.cloud.redis.v1.CloudRedis.UpdateInstance]. +// Request for +// [UpdateInstance][google.cloud.redis.v1.CloudRedis.UpdateInstance]. message UpdateInstanceRequest { // Required. Mask of fields to update. At least one path must be supplied in // this field. The elements of the repeated paths field may only include these @@ -699,39 +814,38 @@ message UpdateInstanceRequest { // * `memorySizeGb` // * `redisConfig` // * `replica_count` - google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; // Required. Update description. // Only fields specified in update_mask are updated. Instance instance = 2 [(google.api.field_behavior) = REQUIRED]; } -// Request for [UpgradeInstance][google.cloud.redis.v1.CloudRedis.UpgradeInstance]. +// Request for +// [UpgradeInstance][google.cloud.redis.v1.CloudRedis.UpgradeInstance]. message UpgradeInstanceRequest { // Required. Redis instance resource name using the form: // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` // where `location_id` refers to a GCP region. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "redis.googleapis.com/Instance" - } + (google.api.resource_reference) = { type: "redis.googleapis.com/Instance" } ]; // Required. Specifies the target version of Redis software to upgrade to. string redis_version = 2 [(google.api.field_behavior) = REQUIRED]; } -// Request for [DeleteInstance][google.cloud.redis.v1.CloudRedis.DeleteInstance]. +// Request for +// [DeleteInstance][google.cloud.redis.v1.CloudRedis.DeleteInstance]. message DeleteInstanceRequest { // Required. Redis instance resource name using the form: // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` // where `location_id` refers to a GCP region. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "redis.googleapis.com/Instance" - } + (google.api.resource_reference) = { type: "redis.googleapis.com/Instance" } ]; } @@ -811,14 +925,13 @@ message FailoverInstanceRequest { // where `location_id` refers to a GCP region. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "redis.googleapis.com/Instance" - } + (google.api.resource_reference) = { type: "redis.googleapis.com/Instance" } ]; // Optional. Available data protection modes that the user can choose. If it's // unspecified, data protection mode will be LIMITED_DATA_LOSS by default. - DataProtectionMode data_protection_mode = 2 [(google.api.field_behavior) = OPTIONAL]; + DataProtectionMode data_protection_mode = 2 + [(google.api.field_behavior) = OPTIONAL]; } // Represents the v1 metadata of the long-running operation. @@ -854,14 +967,13 @@ message LocationMetadata { // by the lowercase ID of each zone, as defined by GCE. These keys can be // specified in `location_id` or `alternative_location_id` fields when // creating a Redis instance. - map available_zones = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + map available_zones = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Defines specific information for a particular zone. Currently empty and // reserved for future use only. -message ZoneMetadata { - -} +message ZoneMetadata {} // TlsCertificate Resource message TlsCertificate { @@ -874,12 +986,14 @@ message TlsCertificate { // Output only. The time when the certificate was created in [RFC // 3339](https://tools.ietf.org/html/rfc3339) format, for example // `2020-05-18T00:00:00.094Z`. - google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time when the certificate expires in [RFC // 3339](https://tools.ietf.org/html/rfc3339) format, for example // `2020-05-18T00:00:00.094Z`. - google.protobuf.Timestamp expire_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp expire_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Sha1 Fingerprint of the certificate. string sha1_fingerprint = 5; diff --git a/packages/google-cloud-redis/protos/protos.d.ts b/packages/google-cloud-redis/protos/protos.d.ts index 875bf53d121..fb850b39cb3 100644 --- a/packages/google-cloud-redis/protos/protos.d.ts +++ b/packages/google-cloud-redis/protos/protos.d.ts @@ -476,6 +476,21 @@ export namespace google { /** Instance readReplicasMode */ readReplicasMode?: (google.cloud.redis.v1.Instance.ReadReplicasMode|keyof typeof google.cloud.redis.v1.Instance.ReadReplicasMode|null); + + /** Instance customerManagedKey */ + customerManagedKey?: (string|null); + + /** Instance persistenceConfig */ + persistenceConfig?: (google.cloud.redis.v1.IPersistenceConfig|null); + + /** Instance suspensionReasons */ + suspensionReasons?: (google.cloud.redis.v1.Instance.SuspensionReason[]|null); + + /** Instance maintenanceVersion */ + maintenanceVersion?: (string|null); + + /** Instance availableMaintenanceVersions */ + availableMaintenanceVersions?: (string[]|null); } /** Represents an Instance. */ @@ -577,6 +592,21 @@ export namespace google { /** Instance readReplicasMode. */ public readReplicasMode: (google.cloud.redis.v1.Instance.ReadReplicasMode|keyof typeof google.cloud.redis.v1.Instance.ReadReplicasMode); + /** Instance customerManagedKey. */ + public customerManagedKey: string; + + /** Instance persistenceConfig. */ + public persistenceConfig?: (google.cloud.redis.v1.IPersistenceConfig|null); + + /** Instance suspensionReasons. */ + public suspensionReasons: google.cloud.redis.v1.Instance.SuspensionReason[]; + + /** Instance maintenanceVersion. */ + public maintenanceVersion: string; + + /** Instance availableMaintenanceVersions. */ + public availableMaintenanceVersions: string[]; + /** * Creates a new Instance instance using the specified properties. * @param [properties] Properties to set @@ -697,6 +727,146 @@ export namespace google { READ_REPLICAS_DISABLED = 1, READ_REPLICAS_ENABLED = 2 } + + /** SuspensionReason enum. */ + enum SuspensionReason { + SUSPENSION_REASON_UNSPECIFIED = 0, + CUSTOMER_MANAGED_KEY_ISSUE = 1 + } + } + + /** Properties of a PersistenceConfig. */ + interface IPersistenceConfig { + + /** PersistenceConfig persistenceMode */ + persistenceMode?: (google.cloud.redis.v1.PersistenceConfig.PersistenceMode|keyof typeof google.cloud.redis.v1.PersistenceConfig.PersistenceMode|null); + + /** PersistenceConfig rdbSnapshotPeriod */ + rdbSnapshotPeriod?: (google.cloud.redis.v1.PersistenceConfig.SnapshotPeriod|keyof typeof google.cloud.redis.v1.PersistenceConfig.SnapshotPeriod|null); + + /** PersistenceConfig rdbNextSnapshotTime */ + rdbNextSnapshotTime?: (google.protobuf.ITimestamp|null); + + /** PersistenceConfig rdbSnapshotStartTime */ + rdbSnapshotStartTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a PersistenceConfig. */ + class PersistenceConfig implements IPersistenceConfig { + + /** + * Constructs a new PersistenceConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.redis.v1.IPersistenceConfig); + + /** PersistenceConfig persistenceMode. */ + public persistenceMode: (google.cloud.redis.v1.PersistenceConfig.PersistenceMode|keyof typeof google.cloud.redis.v1.PersistenceConfig.PersistenceMode); + + /** PersistenceConfig rdbSnapshotPeriod. */ + public rdbSnapshotPeriod: (google.cloud.redis.v1.PersistenceConfig.SnapshotPeriod|keyof typeof google.cloud.redis.v1.PersistenceConfig.SnapshotPeriod); + + /** PersistenceConfig rdbNextSnapshotTime. */ + public rdbNextSnapshotTime?: (google.protobuf.ITimestamp|null); + + /** PersistenceConfig rdbSnapshotStartTime. */ + public rdbSnapshotStartTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new PersistenceConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns PersistenceConfig instance + */ + public static create(properties?: google.cloud.redis.v1.IPersistenceConfig): google.cloud.redis.v1.PersistenceConfig; + + /** + * Encodes the specified PersistenceConfig message. Does not implicitly {@link google.cloud.redis.v1.PersistenceConfig.verify|verify} messages. + * @param message PersistenceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.redis.v1.IPersistenceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PersistenceConfig message, length delimited. Does not implicitly {@link google.cloud.redis.v1.PersistenceConfig.verify|verify} messages. + * @param message PersistenceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.redis.v1.IPersistenceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PersistenceConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PersistenceConfig + * @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.redis.v1.PersistenceConfig; + + /** + * Decodes a PersistenceConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PersistenceConfig + * @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.redis.v1.PersistenceConfig; + + /** + * Verifies a PersistenceConfig 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 PersistenceConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PersistenceConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.redis.v1.PersistenceConfig; + + /** + * Creates a plain object from a PersistenceConfig message. Also converts values to other types if specified. + * @param message PersistenceConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.redis.v1.PersistenceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PersistenceConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PersistenceConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PersistenceConfig { + + /** PersistenceMode enum. */ + enum PersistenceMode { + PERSISTENCE_MODE_UNSPECIFIED = 0, + DISABLED = 1, + RDB = 2 + } + + /** SnapshotPeriod enum. */ + enum SnapshotPeriod { + SNAPSHOT_PERIOD_UNSPECIFIED = 0, + ONE_HOUR = 3, + SIX_HOURS = 4, + TWELVE_HOURS = 5, + TWENTY_FOUR_HOURS = 6 + } } /** Properties of a RescheduleMaintenanceRequest. */ diff --git a/packages/google-cloud-redis/protos/protos.js b/packages/google-cloud-redis/protos/protos.js index 8fafd837d4c..a8f61da5d04 100644 --- a/packages/google-cloud-redis/protos/protos.js +++ b/packages/google-cloud-redis/protos/protos.js @@ -727,6 +727,11 @@ * @property {string|null} [readEndpoint] Instance readEndpoint * @property {number|null} [readEndpointPort] Instance readEndpointPort * @property {google.cloud.redis.v1.Instance.ReadReplicasMode|null} [readReplicasMode] Instance readReplicasMode + * @property {string|null} [customerManagedKey] Instance customerManagedKey + * @property {google.cloud.redis.v1.IPersistenceConfig|null} [persistenceConfig] Instance persistenceConfig + * @property {Array.|null} [suspensionReasons] Instance suspensionReasons + * @property {string|null} [maintenanceVersion] Instance maintenanceVersion + * @property {Array.|null} [availableMaintenanceVersions] Instance availableMaintenanceVersions */ /** @@ -742,6 +747,8 @@ this.redisConfigs = {}; this.serverCaCerts = []; this.nodes = []; + this.suspensionReasons = []; + this.availableMaintenanceVersions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -988,6 +995,46 @@ */ Instance.prototype.readReplicasMode = 0; + /** + * Instance customerManagedKey. + * @member {string} customerManagedKey + * @memberof google.cloud.redis.v1.Instance + * @instance + */ + Instance.prototype.customerManagedKey = ""; + + /** + * Instance persistenceConfig. + * @member {google.cloud.redis.v1.IPersistenceConfig|null|undefined} persistenceConfig + * @memberof google.cloud.redis.v1.Instance + * @instance + */ + Instance.prototype.persistenceConfig = null; + + /** + * Instance suspensionReasons. + * @member {Array.} suspensionReasons + * @memberof google.cloud.redis.v1.Instance + * @instance + */ + Instance.prototype.suspensionReasons = $util.emptyArray; + + /** + * Instance maintenanceVersion. + * @member {string} maintenanceVersion + * @memberof google.cloud.redis.v1.Instance + * @instance + */ + Instance.prototype.maintenanceVersion = ""; + + /** + * Instance availableMaintenanceVersions. + * @member {Array.} availableMaintenanceVersions + * @memberof google.cloud.redis.v1.Instance + * @instance + */ + Instance.prototype.availableMaintenanceVersions = $util.emptyArray; + /** * Creates a new Instance instance using the specified properties. * @function create @@ -1076,6 +1123,21 @@ writer.uint32(/* id 34, wireType 0 =*/272).int32(message.readEndpointPort); if (message.readReplicasMode != null && Object.hasOwnProperty.call(message, "readReplicasMode")) writer.uint32(/* id 35, wireType 0 =*/280).int32(message.readReplicasMode); + if (message.customerManagedKey != null && Object.hasOwnProperty.call(message, "customerManagedKey")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.customerManagedKey); + if (message.persistenceConfig != null && Object.hasOwnProperty.call(message, "persistenceConfig")) + $root.google.cloud.redis.v1.PersistenceConfig.encode(message.persistenceConfig, writer.uint32(/* id 37, wireType 2 =*/298).fork()).ldelim(); + if (message.suspensionReasons != null && message.suspensionReasons.length) { + writer.uint32(/* id 38, wireType 2 =*/306).fork(); + for (var i = 0; i < message.suspensionReasons.length; ++i) + writer.int32(message.suspensionReasons[i]); + writer.ldelim(); + } + if (message.maintenanceVersion != null && Object.hasOwnProperty.call(message, "maintenanceVersion")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.maintenanceVersion); + if (message.availableMaintenanceVersions != null && message.availableMaintenanceVersions.length) + for (var i = 0; i < message.availableMaintenanceVersions.length; ++i) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.availableMaintenanceVersions[i]); return writer; }; @@ -1272,6 +1334,35 @@ message.readReplicasMode = reader.int32(); break; } + case 36: { + message.customerManagedKey = reader.string(); + break; + } + case 37: { + message.persistenceConfig = $root.google.cloud.redis.v1.PersistenceConfig.decode(reader, reader.uint32()); + break; + } + case 38: { + if (!(message.suspensionReasons && message.suspensionReasons.length)) + message.suspensionReasons = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.suspensionReasons.push(reader.int32()); + } else + message.suspensionReasons.push(reader.int32()); + break; + } + case 39: { + message.maintenanceVersion = reader.string(); + break; + } + case 40: { + if (!(message.availableMaintenanceVersions && message.availableMaintenanceVersions.length)) + message.availableMaintenanceVersions = []; + message.availableMaintenanceVersions.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -1461,6 +1552,36 @@ case 2: break; } + if (message.customerManagedKey != null && message.hasOwnProperty("customerManagedKey")) + if (!$util.isString(message.customerManagedKey)) + return "customerManagedKey: string expected"; + if (message.persistenceConfig != null && message.hasOwnProperty("persistenceConfig")) { + var error = $root.google.cloud.redis.v1.PersistenceConfig.verify(message.persistenceConfig); + if (error) + return "persistenceConfig." + error; + } + if (message.suspensionReasons != null && message.hasOwnProperty("suspensionReasons")) { + if (!Array.isArray(message.suspensionReasons)) + return "suspensionReasons: array expected"; + for (var i = 0; i < message.suspensionReasons.length; ++i) + switch (message.suspensionReasons[i]) { + default: + return "suspensionReasons: enum value[] expected"; + case 0: + case 1: + break; + } + } + if (message.maintenanceVersion != null && message.hasOwnProperty("maintenanceVersion")) + if (!$util.isString(message.maintenanceVersion)) + return "maintenanceVersion: string expected"; + if (message.availableMaintenanceVersions != null && message.hasOwnProperty("availableMaintenanceVersions")) { + if (!Array.isArray(message.availableMaintenanceVersions)) + return "availableMaintenanceVersions: array expected"; + for (var i = 0; i < message.availableMaintenanceVersions.length; ++i) + if (!$util.isString(message.availableMaintenanceVersions[i])) + return "availableMaintenanceVersions: string[] expected"; + } return null; }; @@ -1685,6 +1806,43 @@ message.readReplicasMode = 2; break; } + if (object.customerManagedKey != null) + message.customerManagedKey = String(object.customerManagedKey); + if (object.persistenceConfig != null) { + if (typeof object.persistenceConfig !== "object") + throw TypeError(".google.cloud.redis.v1.Instance.persistenceConfig: object expected"); + message.persistenceConfig = $root.google.cloud.redis.v1.PersistenceConfig.fromObject(object.persistenceConfig); + } + if (object.suspensionReasons) { + if (!Array.isArray(object.suspensionReasons)) + throw TypeError(".google.cloud.redis.v1.Instance.suspensionReasons: array expected"); + message.suspensionReasons = []; + for (var i = 0; i < object.suspensionReasons.length; ++i) + switch (object.suspensionReasons[i]) { + default: + if (typeof object.suspensionReasons[i] === "number") { + message.suspensionReasons[i] = object.suspensionReasons[i]; + break; + } + case "SUSPENSION_REASON_UNSPECIFIED": + case 0: + message.suspensionReasons[i] = 0; + break; + case "CUSTOMER_MANAGED_KEY_ISSUE": + case 1: + message.suspensionReasons[i] = 1; + break; + } + } + if (object.maintenanceVersion != null) + message.maintenanceVersion = String(object.maintenanceVersion); + if (object.availableMaintenanceVersions) { + if (!Array.isArray(object.availableMaintenanceVersions)) + throw TypeError(".google.cloud.redis.v1.Instance.availableMaintenanceVersions: array expected"); + message.availableMaintenanceVersions = []; + for (var i = 0; i < object.availableMaintenanceVersions.length; ++i) + message.availableMaintenanceVersions[i] = String(object.availableMaintenanceVersions[i]); + } return message; }; @@ -1704,6 +1862,8 @@ if (options.arrays || options.defaults) { object.serverCaCerts = []; object.nodes = []; + object.suspensionReasons = []; + object.availableMaintenanceVersions = []; } if (options.objects || options.defaults) { object.labels = {}; @@ -1736,6 +1896,9 @@ object.readEndpoint = ""; object.readEndpointPort = 0; object.readReplicasMode = options.enums === String ? "READ_REPLICAS_MODE_UNSPECIFIED" : 0; + object.customerManagedKey = ""; + object.persistenceConfig = null; + object.maintenanceVersion = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -1810,6 +1973,22 @@ object.readEndpointPort = message.readEndpointPort; if (message.readReplicasMode != null && message.hasOwnProperty("readReplicasMode")) object.readReplicasMode = options.enums === String ? $root.google.cloud.redis.v1.Instance.ReadReplicasMode[message.readReplicasMode] === undefined ? message.readReplicasMode : $root.google.cloud.redis.v1.Instance.ReadReplicasMode[message.readReplicasMode] : message.readReplicasMode; + if (message.customerManagedKey != null && message.hasOwnProperty("customerManagedKey")) + object.customerManagedKey = message.customerManagedKey; + if (message.persistenceConfig != null && message.hasOwnProperty("persistenceConfig")) + object.persistenceConfig = $root.google.cloud.redis.v1.PersistenceConfig.toObject(message.persistenceConfig, options); + if (message.suspensionReasons && message.suspensionReasons.length) { + object.suspensionReasons = []; + for (var j = 0; j < message.suspensionReasons.length; ++j) + object.suspensionReasons[j] = options.enums === String ? $root.google.cloud.redis.v1.Instance.SuspensionReason[message.suspensionReasons[j]] === undefined ? message.suspensionReasons[j] : $root.google.cloud.redis.v1.Instance.SuspensionReason[message.suspensionReasons[j]] : message.suspensionReasons[j]; + } + if (message.maintenanceVersion != null && message.hasOwnProperty("maintenanceVersion")) + object.maintenanceVersion = message.maintenanceVersion; + if (message.availableMaintenanceVersions && message.availableMaintenanceVersions.length) { + object.availableMaintenanceVersions = []; + for (var j = 0; j < message.availableMaintenanceVersions.length; ++j) + object.availableMaintenanceVersions[j] = message.availableMaintenanceVersions[j]; + } return object; }; @@ -1931,9 +2110,400 @@ return values; })(); + /** + * SuspensionReason enum. + * @name google.cloud.redis.v1.Instance.SuspensionReason + * @enum {number} + * @property {number} SUSPENSION_REASON_UNSPECIFIED=0 SUSPENSION_REASON_UNSPECIFIED value + * @property {number} CUSTOMER_MANAGED_KEY_ISSUE=1 CUSTOMER_MANAGED_KEY_ISSUE value + */ + Instance.SuspensionReason = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SUSPENSION_REASON_UNSPECIFIED"] = 0; + values[valuesById[1] = "CUSTOMER_MANAGED_KEY_ISSUE"] = 1; + return values; + })(); + return Instance; })(); + v1.PersistenceConfig = (function() { + + /** + * Properties of a PersistenceConfig. + * @memberof google.cloud.redis.v1 + * @interface IPersistenceConfig + * @property {google.cloud.redis.v1.PersistenceConfig.PersistenceMode|null} [persistenceMode] PersistenceConfig persistenceMode + * @property {google.cloud.redis.v1.PersistenceConfig.SnapshotPeriod|null} [rdbSnapshotPeriod] PersistenceConfig rdbSnapshotPeriod + * @property {google.protobuf.ITimestamp|null} [rdbNextSnapshotTime] PersistenceConfig rdbNextSnapshotTime + * @property {google.protobuf.ITimestamp|null} [rdbSnapshotStartTime] PersistenceConfig rdbSnapshotStartTime + */ + + /** + * Constructs a new PersistenceConfig. + * @memberof google.cloud.redis.v1 + * @classdesc Represents a PersistenceConfig. + * @implements IPersistenceConfig + * @constructor + * @param {google.cloud.redis.v1.IPersistenceConfig=} [properties] Properties to set + */ + function PersistenceConfig(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]]; + } + + /** + * PersistenceConfig persistenceMode. + * @member {google.cloud.redis.v1.PersistenceConfig.PersistenceMode} persistenceMode + * @memberof google.cloud.redis.v1.PersistenceConfig + * @instance + */ + PersistenceConfig.prototype.persistenceMode = 0; + + /** + * PersistenceConfig rdbSnapshotPeriod. + * @member {google.cloud.redis.v1.PersistenceConfig.SnapshotPeriod} rdbSnapshotPeriod + * @memberof google.cloud.redis.v1.PersistenceConfig + * @instance + */ + PersistenceConfig.prototype.rdbSnapshotPeriod = 0; + + /** + * PersistenceConfig rdbNextSnapshotTime. + * @member {google.protobuf.ITimestamp|null|undefined} rdbNextSnapshotTime + * @memberof google.cloud.redis.v1.PersistenceConfig + * @instance + */ + PersistenceConfig.prototype.rdbNextSnapshotTime = null; + + /** + * PersistenceConfig rdbSnapshotStartTime. + * @member {google.protobuf.ITimestamp|null|undefined} rdbSnapshotStartTime + * @memberof google.cloud.redis.v1.PersistenceConfig + * @instance + */ + PersistenceConfig.prototype.rdbSnapshotStartTime = null; + + /** + * Creates a new PersistenceConfig instance using the specified properties. + * @function create + * @memberof google.cloud.redis.v1.PersistenceConfig + * @static + * @param {google.cloud.redis.v1.IPersistenceConfig=} [properties] Properties to set + * @returns {google.cloud.redis.v1.PersistenceConfig} PersistenceConfig instance + */ + PersistenceConfig.create = function create(properties) { + return new PersistenceConfig(properties); + }; + + /** + * Encodes the specified PersistenceConfig message. Does not implicitly {@link google.cloud.redis.v1.PersistenceConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.redis.v1.PersistenceConfig + * @static + * @param {google.cloud.redis.v1.IPersistenceConfig} message PersistenceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PersistenceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.persistenceMode != null && Object.hasOwnProperty.call(message, "persistenceMode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.persistenceMode); + if (message.rdbSnapshotPeriod != null && Object.hasOwnProperty.call(message, "rdbSnapshotPeriod")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.rdbSnapshotPeriod); + if (message.rdbNextSnapshotTime != null && Object.hasOwnProperty.call(message, "rdbNextSnapshotTime")) + $root.google.protobuf.Timestamp.encode(message.rdbNextSnapshotTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.rdbSnapshotStartTime != null && Object.hasOwnProperty.call(message, "rdbSnapshotStartTime")) + $root.google.protobuf.Timestamp.encode(message.rdbSnapshotStartTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PersistenceConfig message, length delimited. Does not implicitly {@link google.cloud.redis.v1.PersistenceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.redis.v1.PersistenceConfig + * @static + * @param {google.cloud.redis.v1.IPersistenceConfig} message PersistenceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PersistenceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PersistenceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.redis.v1.PersistenceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.redis.v1.PersistenceConfig} PersistenceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PersistenceConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.redis.v1.PersistenceConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.persistenceMode = reader.int32(); + break; + } + case 2: { + message.rdbSnapshotPeriod = reader.int32(); + break; + } + case 4: { + message.rdbNextSnapshotTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.rdbSnapshotStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PersistenceConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.redis.v1.PersistenceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.redis.v1.PersistenceConfig} PersistenceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PersistenceConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PersistenceConfig message. + * @function verify + * @memberof google.cloud.redis.v1.PersistenceConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PersistenceConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.persistenceMode != null && message.hasOwnProperty("persistenceMode")) + switch (message.persistenceMode) { + default: + return "persistenceMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.rdbSnapshotPeriod != null && message.hasOwnProperty("rdbSnapshotPeriod")) + switch (message.rdbSnapshotPeriod) { + default: + return "rdbSnapshotPeriod: enum value expected"; + case 0: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.rdbNextSnapshotTime != null && message.hasOwnProperty("rdbNextSnapshotTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.rdbNextSnapshotTime); + if (error) + return "rdbNextSnapshotTime." + error; + } + if (message.rdbSnapshotStartTime != null && message.hasOwnProperty("rdbSnapshotStartTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.rdbSnapshotStartTime); + if (error) + return "rdbSnapshotStartTime." + error; + } + return null; + }; + + /** + * Creates a PersistenceConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.redis.v1.PersistenceConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.redis.v1.PersistenceConfig} PersistenceConfig + */ + PersistenceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.redis.v1.PersistenceConfig) + return object; + var message = new $root.google.cloud.redis.v1.PersistenceConfig(); + switch (object.persistenceMode) { + default: + if (typeof object.persistenceMode === "number") { + message.persistenceMode = object.persistenceMode; + break; + } + break; + case "PERSISTENCE_MODE_UNSPECIFIED": + case 0: + message.persistenceMode = 0; + break; + case "DISABLED": + case 1: + message.persistenceMode = 1; + break; + case "RDB": + case 2: + message.persistenceMode = 2; + break; + } + switch (object.rdbSnapshotPeriod) { + default: + if (typeof object.rdbSnapshotPeriod === "number") { + message.rdbSnapshotPeriod = object.rdbSnapshotPeriod; + break; + } + break; + case "SNAPSHOT_PERIOD_UNSPECIFIED": + case 0: + message.rdbSnapshotPeriod = 0; + break; + case "ONE_HOUR": + case 3: + message.rdbSnapshotPeriod = 3; + break; + case "SIX_HOURS": + case 4: + message.rdbSnapshotPeriod = 4; + break; + case "TWELVE_HOURS": + case 5: + message.rdbSnapshotPeriod = 5; + break; + case "TWENTY_FOUR_HOURS": + case 6: + message.rdbSnapshotPeriod = 6; + break; + } + if (object.rdbNextSnapshotTime != null) { + if (typeof object.rdbNextSnapshotTime !== "object") + throw TypeError(".google.cloud.redis.v1.PersistenceConfig.rdbNextSnapshotTime: object expected"); + message.rdbNextSnapshotTime = $root.google.protobuf.Timestamp.fromObject(object.rdbNextSnapshotTime); + } + if (object.rdbSnapshotStartTime != null) { + if (typeof object.rdbSnapshotStartTime !== "object") + throw TypeError(".google.cloud.redis.v1.PersistenceConfig.rdbSnapshotStartTime: object expected"); + message.rdbSnapshotStartTime = $root.google.protobuf.Timestamp.fromObject(object.rdbSnapshotStartTime); + } + return message; + }; + + /** + * Creates a plain object from a PersistenceConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.redis.v1.PersistenceConfig + * @static + * @param {google.cloud.redis.v1.PersistenceConfig} message PersistenceConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PersistenceConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.persistenceMode = options.enums === String ? "PERSISTENCE_MODE_UNSPECIFIED" : 0; + object.rdbSnapshotPeriod = options.enums === String ? "SNAPSHOT_PERIOD_UNSPECIFIED" : 0; + object.rdbNextSnapshotTime = null; + object.rdbSnapshotStartTime = null; + } + if (message.persistenceMode != null && message.hasOwnProperty("persistenceMode")) + object.persistenceMode = options.enums === String ? $root.google.cloud.redis.v1.PersistenceConfig.PersistenceMode[message.persistenceMode] === undefined ? message.persistenceMode : $root.google.cloud.redis.v1.PersistenceConfig.PersistenceMode[message.persistenceMode] : message.persistenceMode; + if (message.rdbSnapshotPeriod != null && message.hasOwnProperty("rdbSnapshotPeriod")) + object.rdbSnapshotPeriod = options.enums === String ? $root.google.cloud.redis.v1.PersistenceConfig.SnapshotPeriod[message.rdbSnapshotPeriod] === undefined ? message.rdbSnapshotPeriod : $root.google.cloud.redis.v1.PersistenceConfig.SnapshotPeriod[message.rdbSnapshotPeriod] : message.rdbSnapshotPeriod; + if (message.rdbNextSnapshotTime != null && message.hasOwnProperty("rdbNextSnapshotTime")) + object.rdbNextSnapshotTime = $root.google.protobuf.Timestamp.toObject(message.rdbNextSnapshotTime, options); + if (message.rdbSnapshotStartTime != null && message.hasOwnProperty("rdbSnapshotStartTime")) + object.rdbSnapshotStartTime = $root.google.protobuf.Timestamp.toObject(message.rdbSnapshotStartTime, options); + return object; + }; + + /** + * Converts this PersistenceConfig to JSON. + * @function toJSON + * @memberof google.cloud.redis.v1.PersistenceConfig + * @instance + * @returns {Object.} JSON object + */ + PersistenceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PersistenceConfig + * @function getTypeUrl + * @memberof google.cloud.redis.v1.PersistenceConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PersistenceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.redis.v1.PersistenceConfig"; + }; + + /** + * PersistenceMode enum. + * @name google.cloud.redis.v1.PersistenceConfig.PersistenceMode + * @enum {number} + * @property {number} PERSISTENCE_MODE_UNSPECIFIED=0 PERSISTENCE_MODE_UNSPECIFIED value + * @property {number} DISABLED=1 DISABLED value + * @property {number} RDB=2 RDB value + */ + PersistenceConfig.PersistenceMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PERSISTENCE_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DISABLED"] = 1; + values[valuesById[2] = "RDB"] = 2; + return values; + })(); + + /** + * SnapshotPeriod enum. + * @name google.cloud.redis.v1.PersistenceConfig.SnapshotPeriod + * @enum {number} + * @property {number} SNAPSHOT_PERIOD_UNSPECIFIED=0 SNAPSHOT_PERIOD_UNSPECIFIED value + * @property {number} ONE_HOUR=3 ONE_HOUR value + * @property {number} SIX_HOURS=4 SIX_HOURS value + * @property {number} TWELVE_HOURS=5 TWELVE_HOURS value + * @property {number} TWENTY_FOUR_HOURS=6 TWENTY_FOUR_HOURS value + */ + PersistenceConfig.SnapshotPeriod = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SNAPSHOT_PERIOD_UNSPECIFIED"] = 0; + values[valuesById[3] = "ONE_HOUR"] = 3; + values[valuesById[4] = "SIX_HOURS"] = 4; + values[valuesById[5] = "TWELVE_HOURS"] = 5; + values[valuesById[6] = "TWENTY_FOUR_HOURS"] = 6; + return values; + })(); + + return PersistenceConfig; + })(); + v1.RescheduleMaintenanceRequest = (function() { /** diff --git a/packages/google-cloud-redis/protos/protos.json b/packages/google-cloud-redis/protos/protos.json index 4cfb4f1c9e4..558fd7d20b5 100644 --- a/packages/google-cloud-redis/protos/protos.json +++ b/packages/google-cloud-redis/protos/protos.json @@ -529,6 +529,43 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "customerManagedKey": { + "type": "string", + "id": 36, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "persistenceConfig": { + "type": "PersistenceConfig", + "id": 37, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "suspensionReasons": { + "rule": "repeated", + "type": "SuspensionReason", + "id": 38, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maintenanceVersion": { + "type": "string", + "id": 39, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "availableMaintenanceVersions": { + "rule": "repeated", + "type": "string", + "id": 40, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -572,6 +609,62 @@ "READ_REPLICAS_DISABLED": 1, "READ_REPLICAS_ENABLED": 2 } + }, + "SuspensionReason": { + "values": { + "SUSPENSION_REASON_UNSPECIFIED": 0, + "CUSTOMER_MANAGED_KEY_ISSUE": 1 + } + } + } + }, + "PersistenceConfig": { + "fields": { + "persistenceMode": { + "type": "PersistenceMode", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "rdbSnapshotPeriod": { + "type": "SnapshotPeriod", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "rdbNextSnapshotTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "rdbSnapshotStartTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "PersistenceMode": { + "values": { + "PERSISTENCE_MODE_UNSPECIFIED": 0, + "DISABLED": 1, + "RDB": 2 + } + }, + "SnapshotPeriod": { + "values": { + "SNAPSHOT_PERIOD_UNSPECIFIED": 0, + "ONE_HOUR": 3, + "SIX_HOURS": 4, + "TWELVE_HOURS": 5, + "TWENTY_FOUR_HOURS": 6 + } } } }, diff --git a/packages/google-cloud-redis/samples/README.md b/packages/google-cloud-redis/samples/README.md index feda8df34c1..1473f7d506c 100644 --- a/packages/google-cloud-redis/samples/README.md +++ b/packages/google-cloud-redis/samples/README.md @@ -35,7 +35,6 @@ * [Cloud_redis.update_instance](#cloud_redis.update_instance) * [Cloud_redis.upgrade_instance](#cloud_redis.upgrade_instance) * [Quickstart](#quickstart) - * [Redis](#redis) ## Before you begin @@ -438,23 +437,6 @@ __Usage:__ `node packages/google-cloud-redis/samples/quickstart.js` ------ - - - - -### Redis - -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-redis/samples/system-test/redis.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-redis/samples/system-test/redis.js,samples/README.md) - -__Usage:__ - - -`node packages/google-cloud-redis/samples/system-test/redis.js` - - diff --git a/packages/google-cloud-redis/samples/generated/v1/cloud_redis.list_instances.js b/packages/google-cloud-redis/samples/generated/v1/cloud_redis.list_instances.js index 682704849b0..03d418c4679 100644 --- a/packages/google-cloud-redis/samples/generated/v1/cloud_redis.list_instances.js +++ b/packages/google-cloud-redis/samples/generated/v1/cloud_redis.list_instances.js @@ -45,7 +45,8 @@ function main(parent) { // const pageSize = 1234 /** * The `next_page_token` value returned from a previous - * ListInstances google.cloud.redis.v1.CloudRedis.ListInstances request, if any. + * ListInstances google.cloud.redis.v1.CloudRedis.ListInstances request, if + * any. */ // const pageToken = 'abc123' diff --git a/packages/google-cloud-redis/samples/generated/v1/cloud_redis.reschedule_maintenance.js b/packages/google-cloud-redis/samples/generated/v1/cloud_redis.reschedule_maintenance.js index 6fddb1907bd..99f271bcea7 100644 --- a/packages/google-cloud-redis/samples/generated/v1/cloud_redis.reschedule_maintenance.js +++ b/packages/google-cloud-redis/samples/generated/v1/cloud_redis.reschedule_maintenance.js @@ -35,7 +35,8 @@ function main(name, rescheduleType) { */ // const name = 'abc123' /** - * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well. + * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as + * well. */ // const rescheduleType = {} /** diff --git a/packages/google-cloud-redis/samples/generated/v1/snippet_metadata.google.cloud.redis.v1.json b/packages/google-cloud-redis/samples/generated/v1/snippet_metadata.google.cloud.redis.v1.json index 0006739984d..98ccd1c345b 100644 --- a/packages/google-cloud-redis/samples/generated/v1/snippet_metadata.google.cloud.redis.v1.json +++ b/packages/google-cloud-redis/samples/generated/v1/snippet_metadata.google.cloud.redis.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-redis", - "version": "3.2.0", + "version": "3.3.0", "language": "TYPESCRIPT", "apis": [ { @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 71, + "end": 72, "type": "FULL" } ], @@ -458,7 +458,7 @@ "segments": [ { "start": 25, - "end": 67, + "end": 68, "type": "FULL" } ], diff --git a/packages/google-cloud-redis/samples/generated/v1beta1/snippet_metadata.google.cloud.redis.v1beta1.json b/packages/google-cloud-redis/samples/generated/v1beta1/snippet_metadata.google.cloud.redis.v1beta1.json index 8a471cba894..8514ada5920 100644 --- a/packages/google-cloud-redis/samples/generated/v1beta1/snippet_metadata.google.cloud.redis.v1beta1.json +++ b/packages/google-cloud-redis/samples/generated/v1beta1/snippet_metadata.google.cloud.redis.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-redis", - "version": "3.2.0", + "version": "3.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-redis/samples/package.json b/packages/google-cloud-redis/samples/package.json index 250d44a117a..4a42ea74621 100644 --- a/packages/google-cloud-redis/samples/package.json +++ b/packages/google-cloud-redis/samples/package.json @@ -11,7 +11,7 @@ "test": "c8 mocha system-test" }, "dependencies": { - "@google-cloud/redis": "^3.2.2" + "@google-cloud/redis": "^3.3.0" }, "devDependencies": { "c8": "^7.0.0", diff --git a/packages/google-cloud-redis/src/v1/cloud_redis_client.ts b/packages/google-cloud-redis/src/v1/cloud_redis_client.ts index 35f7f931f5c..0be0cfdbcb9 100644 --- a/packages/google-cloud-redis/src/v1/cloud_redis_client.ts +++ b/packages/google-cloud-redis/src/v1/cloud_redis_client.ts @@ -27,6 +27,8 @@ import type { LROperation, PaginationCallback, GaxCall, + LocationsClient, + LocationProtos, } from 'google-gax'; import {Transform} from 'stream'; import * as protos from '../../protos/protos'; @@ -75,6 +77,7 @@ export class CloudRedisClient { }; warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; + locationsClient: LocationsClient; pathTemplates: {[name: string]: gax.PathTemplate}; operationsClient: gax.OperationsClient; cloudRedisStub?: Promise<{[name: string]: Function}>; @@ -172,6 +175,10 @@ export class CloudRedisClient { if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; } + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); // Determine the client header string. const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; @@ -1726,7 +1733,8 @@ export class CloudRedisClient { * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` * where `location_id` refers to a GCP region. * @param {google.cloud.redis.v1.RescheduleMaintenanceRequest.RescheduleType} request.rescheduleType - * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well. + * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as + * well. * @param {google.protobuf.Timestamp} [request.scheduleTime] * Optional. Timestamp when the maintenance shall be rescheduled to if * reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for @@ -1889,7 +1897,8 @@ export class CloudRedisClient { * to determine if there are more instances left to be queried. * @param {string} request.pageToken * The `next_page_token` value returned from a previous - * {@link google.cloud.redis.v1.CloudRedis.ListInstances|ListInstances} request, if any. + * {@link google.cloud.redis.v1.CloudRedis.ListInstances|ListInstances} request, if + * any. * @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. @@ -1990,7 +1999,8 @@ export class CloudRedisClient { * to determine if there are more instances left to be queried. * @param {string} request.pageToken * The `next_page_token` value returned from a previous - * {@link google.cloud.redis.v1.CloudRedis.ListInstances|ListInstances} request, if any. + * {@link google.cloud.redis.v1.CloudRedis.ListInstances|ListInstances} request, if + * any. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -2045,7 +2055,8 @@ export class CloudRedisClient { * to determine if there are more instances left to be queried. * @param {string} request.pageToken * The `next_page_token` value returned from a previous - * {@link google.cloud.redis.v1.CloudRedis.ListInstances|ListInstances} request, if any. + * {@link google.cloud.redis.v1.CloudRedis.ListInstances|ListInstances} request, if + * any. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -2080,6 +2091,261 @@ export class CloudRedisClient { callSettings ) as AsyncIterable; } + /** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @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 google.cloud.location.Location | Location}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + + /** + * Lists information about the supported locations for this service. 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.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list 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} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.Location | Location}. 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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + // -------------------- // -- Path templates -- // -------------------- @@ -2180,6 +2446,7 @@ export class CloudRedisClient { return this.cloudRedisStub.then(stub => { this._terminated = true; stub.close(); + this.locationsClient.close(); this.operationsClient.close(); }); } diff --git a/packages/google-cloud-redis/test/gapic_cloud_redis_v1.ts b/packages/google-cloud-redis/test/gapic_cloud_redis_v1.ts index 344ead6c8f5..3edf4e42a17 100644 --- a/packages/google-cloud-redis/test/gapic_cloud_redis_v1.ts +++ b/packages/google-cloud-redis/test/gapic_cloud_redis_v1.ts @@ -25,7 +25,12 @@ import * as cloudredisModule from '../src'; import {PassThrough} from 'stream'; -import {protobuf, LROperation, operationsProtos} from 'google-gax'; +import { + protobuf, + LROperation, + operationsProtos, + LocationProtos, +} from 'google-gax'; // Dynamically loaded proto JSON is needed to get the type information // to fill in default values for request objects @@ -2377,6 +2382,509 @@ describe('v1.CloudRedisClient', () => { ); }); }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new cloudredisModule.v1.CloudRedisClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getLocation without error using callback', async () => { + const client = new cloudredisModule.v1.CloudRedisClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub).getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new cloudredisModule.v1.CloudRedisClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getLocation(request, expectedOptions), + expectedError + ); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new cloudredisModule.v1.CloudRedisClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new cloudredisModule.v1.CloudRedisClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new cloudredisModule.v1.CloudRedisClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new cloudredisModule.v1.CloudRedisClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new cloudredisModule.v1.CloudRedisClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.getOperation(request); + }, expectedError); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new cloudredisModule.v1.CloudRedisClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new cloudredisModule.v1.CloudRedisClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new cloudredisModule.v1.CloudRedisClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.cancelOperation(request); + }, expectedError); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new cloudredisModule.v1.CloudRedisClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new cloudredisModule.v1.CloudRedisClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new cloudredisModule.v1.CloudRedisClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.deleteOperation(request); + }, expectedError); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new cloudredisModule.v1.CloudRedisClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new cloudredisModule.v1.CloudRedisClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); describe('Path templates', () => { describe('instance', () => { diff --git a/packages/google-cloud-resourcemanager/CHANGELOG.md b/packages/google-cloud-resourcemanager/CHANGELOG.md index 26b711b802e..e8f2c7b5929 100644 --- a/packages/google-cloud-resourcemanager/CHANGELOG.md +++ b/packages/google-cloud-resourcemanager/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/resource-manager?activeTab=versions +## [4.3.0](https://github.com/googleapis/google-cloud-node/compare/resource-manager-v4.2.2...resource-manager-v4.3.0) (2023-04-24) + + +### Features + +* [resourcemanager] add TagHolds, GetNamespacedTagKey, and GetNamespacedTagValue APIs. Adds support for project parented tags ([#4191](https://github.com/googleapis/google-cloud-node/issues/4191)) ([a742949](https://github.com/googleapis/google-cloud-node/commit/a742949ff07268521d8901508b83413f6030fc33)) + ## [4.2.2](https://github.com/googleapis/google-cloud-node/compare/resource-manager-v4.2.1...resource-manager-v4.2.2) (2023-04-13) diff --git a/packages/google-cloud-resourcemanager/README.md b/packages/google-cloud-resourcemanager/README.md index ab42819b66e..b0426765133 100644 --- a/packages/google-cloud-resourcemanager/README.md +++ b/packages/google-cloud-resourcemanager/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Google Cloud Resource Manager API: Node.js Client](https://github.com/googleapis/google-cloud-node) +# [Google Cloud Resource Manager API: Node.js Client](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-resourcemanager) [![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/resource-manager.svg)](https://www.npmjs.org/package/@google-cloud/resource-manager) @@ -79,58 +79,63 @@ quickstart(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-resourcemanager/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Folders.create_folder | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/folders.create_folder.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/folders.create_folder.js,samples/README.md) | -| Folders.delete_folder | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/folders.delete_folder.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/folders.delete_folder.js,samples/README.md) | -| Folders.get_folder | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/folders.get_folder.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/folders.get_folder.js,samples/README.md) | -| Folders.get_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/folders.get_iam_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/folders.get_iam_policy.js,samples/README.md) | -| Folders.list_folders | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/folders.list_folders.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/folders.list_folders.js,samples/README.md) | -| Folders.move_folder | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/folders.move_folder.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/folders.move_folder.js,samples/README.md) | -| Folders.search_folders | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/folders.search_folders.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/folders.search_folders.js,samples/README.md) | -| Folders.set_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/folders.set_iam_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/folders.set_iam_policy.js,samples/README.md) | -| Folders.test_iam_permissions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/folders.test_iam_permissions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/folders.test_iam_permissions.js,samples/README.md) | -| Folders.undelete_folder | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/folders.undelete_folder.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/folders.undelete_folder.js,samples/README.md) | -| Folders.update_folder | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/folders.update_folder.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/folders.update_folder.js,samples/README.md) | -| Organizations.get_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/organizations.get_iam_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/organizations.get_iam_policy.js,samples/README.md) | -| Organizations.get_organization | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/organizations.get_organization.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/organizations.get_organization.js,samples/README.md) | -| Organizations.search_organizations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/organizations.search_organizations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/organizations.search_organizations.js,samples/README.md) | -| Organizations.set_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/organizations.set_iam_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/organizations.set_iam_policy.js,samples/README.md) | -| Organizations.test_iam_permissions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/organizations.test_iam_permissions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/organizations.test_iam_permissions.js,samples/README.md) | -| Projects.create_project | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/projects.create_project.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/projects.create_project.js,samples/README.md) | -| Projects.delete_project | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/projects.delete_project.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/projects.delete_project.js,samples/README.md) | -| Projects.get_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/projects.get_iam_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/projects.get_iam_policy.js,samples/README.md) | -| Projects.get_project | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/projects.get_project.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/projects.get_project.js,samples/README.md) | -| Projects.list_projects | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/projects.list_projects.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/projects.list_projects.js,samples/README.md) | -| Projects.move_project | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/projects.move_project.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/projects.move_project.js,samples/README.md) | -| Projects.search_projects | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/projects.search_projects.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/projects.search_projects.js,samples/README.md) | -| Projects.set_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/projects.set_iam_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/projects.set_iam_policy.js,samples/README.md) | -| Projects.test_iam_permissions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/projects.test_iam_permissions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/projects.test_iam_permissions.js,samples/README.md) | -| Projects.undelete_project | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/projects.undelete_project.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/projects.undelete_project.js,samples/README.md) | -| Projects.update_project | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/projects.update_project.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/projects.update_project.js,samples/README.md) | -| Tag_bindings.create_tag_binding | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_bindings.create_tag_binding.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_bindings.create_tag_binding.js,samples/README.md) | -| Tag_bindings.delete_tag_binding | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_bindings.delete_tag_binding.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_bindings.delete_tag_binding.js,samples/README.md) | -| Tag_bindings.list_tag_bindings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_bindings.list_tag_bindings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_bindings.list_tag_bindings.js,samples/README.md) | -| Tag_keys.create_tag_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.create_tag_key.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.create_tag_key.js,samples/README.md) | -| Tag_keys.delete_tag_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.delete_tag_key.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.delete_tag_key.js,samples/README.md) | -| Tag_keys.get_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.get_iam_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.get_iam_policy.js,samples/README.md) | -| Tag_keys.get_tag_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.get_tag_key.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.get_tag_key.js,samples/README.md) | -| Tag_keys.list_tag_keys | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.list_tag_keys.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.list_tag_keys.js,samples/README.md) | -| Tag_keys.set_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.set_iam_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.set_iam_policy.js,samples/README.md) | -| Tag_keys.test_iam_permissions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.test_iam_permissions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.test_iam_permissions.js,samples/README.md) | -| Tag_keys.update_tag_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.update_tag_key.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.update_tag_key.js,samples/README.md) | -| Tag_values.create_tag_value | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.create_tag_value.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.create_tag_value.js,samples/README.md) | -| Tag_values.delete_tag_value | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.delete_tag_value.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.delete_tag_value.js,samples/README.md) | -| Tag_values.get_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.get_iam_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.get_iam_policy.js,samples/README.md) | -| Tag_values.get_tag_value | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.get_tag_value.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.get_tag_value.js,samples/README.md) | -| Tag_values.list_tag_values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.list_tag_values.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.list_tag_values.js,samples/README.md) | -| Tag_values.set_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.set_iam_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.set_iam_policy.js,samples/README.md) | -| Tag_values.test_iam_permissions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.test_iam_permissions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.test_iam_permissions.js,samples/README.md) | -| Tag_values.update_tag_value | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.update_tag_value.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.update_tag_value.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/quickstart.js,samples/README.md) | -| Sample.test | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/test/sample.test.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/test/sample.test.js,samples/README.md) | +| Folders.create_folder | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/folders.create_folder.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/folders.create_folder.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Folders.delete_folder | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/folders.delete_folder.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/folders.delete_folder.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Folders.get_folder | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/folders.get_folder.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/folders.get_folder.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Folders.get_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/folders.get_iam_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/folders.get_iam_policy.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Folders.list_folders | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/folders.list_folders.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/folders.list_folders.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Folders.move_folder | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/folders.move_folder.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/folders.move_folder.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Folders.search_folders | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/folders.search_folders.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/folders.search_folders.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Folders.set_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/folders.set_iam_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/folders.set_iam_policy.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Folders.test_iam_permissions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/folders.test_iam_permissions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/folders.test_iam_permissions.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Folders.undelete_folder | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/folders.undelete_folder.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/folders.undelete_folder.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Folders.update_folder | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/folders.update_folder.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/folders.update_folder.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Organizations.get_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/organizations.get_iam_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/organizations.get_iam_policy.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Organizations.get_organization | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/organizations.get_organization.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/organizations.get_organization.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Organizations.search_organizations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/organizations.search_organizations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/organizations.search_organizations.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Organizations.set_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/organizations.set_iam_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/organizations.set_iam_policy.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Organizations.test_iam_permissions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/organizations.test_iam_permissions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/organizations.test_iam_permissions.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Projects.create_project | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/projects.create_project.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/projects.create_project.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Projects.delete_project | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/projects.delete_project.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/projects.delete_project.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Projects.get_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/projects.get_iam_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/projects.get_iam_policy.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Projects.get_project | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/projects.get_project.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/projects.get_project.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Projects.list_projects | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/projects.list_projects.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/projects.list_projects.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Projects.move_project | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/projects.move_project.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/projects.move_project.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Projects.search_projects | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/projects.search_projects.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/projects.search_projects.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Projects.set_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/projects.set_iam_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/projects.set_iam_policy.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Projects.test_iam_permissions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/projects.test_iam_permissions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/projects.test_iam_permissions.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Projects.undelete_project | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/projects.undelete_project.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/projects.undelete_project.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Projects.update_project | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/projects.update_project.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/projects.update_project.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Tag_bindings.create_tag_binding | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_bindings.create_tag_binding.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_bindings.create_tag_binding.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Tag_bindings.delete_tag_binding | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_bindings.delete_tag_binding.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_bindings.delete_tag_binding.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Tag_bindings.list_effective_tags | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_bindings.list_effective_tags.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_bindings.list_effective_tags.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Tag_bindings.list_tag_bindings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_bindings.list_tag_bindings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_bindings.list_tag_bindings.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Tag_holds.create_tag_hold | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_holds.create_tag_hold.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_holds.create_tag_hold.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Tag_holds.delete_tag_hold | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_holds.delete_tag_hold.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_holds.delete_tag_hold.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Tag_holds.list_tag_holds | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_holds.list_tag_holds.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_holds.list_tag_holds.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Tag_keys.create_tag_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.create_tag_key.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.create_tag_key.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Tag_keys.delete_tag_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.delete_tag_key.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.delete_tag_key.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Tag_keys.get_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.get_iam_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.get_iam_policy.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Tag_keys.get_namespaced_tag_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.get_namespaced_tag_key.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.get_namespaced_tag_key.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Tag_keys.get_tag_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.get_tag_key.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.get_tag_key.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Tag_keys.list_tag_keys | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.list_tag_keys.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.list_tag_keys.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Tag_keys.set_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.set_iam_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.set_iam_policy.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Tag_keys.test_iam_permissions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.test_iam_permissions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.test_iam_permissions.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Tag_keys.update_tag_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.update_tag_key.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.update_tag_key.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Tag_values.create_tag_value | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.create_tag_value.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.create_tag_value.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Tag_values.delete_tag_value | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.delete_tag_value.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.delete_tag_value.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Tag_values.get_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.get_iam_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.get_iam_policy.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Tag_values.get_namespaced_tag_value | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.get_namespaced_tag_value.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.get_namespaced_tag_value.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Tag_values.get_tag_value | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.get_tag_value.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.get_tag_value.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Tag_values.list_tag_values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.list_tag_values.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.list_tag_values.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Tag_values.set_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.set_iam_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.set_iam_policy.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Tag_values.test_iam_permissions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.test_iam_permissions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.test_iam_permissions.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Tag_values.update_tag_value | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.update_tag_value.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.update_tag_value.js,packages/google-cloud-resourcemanager/samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/quickstart.js,packages/google-cloud-resourcemanager/samples/README.md) | diff --git a/packages/google-cloud-resourcemanager/package.json b/packages/google-cloud-resourcemanager/package.json index b40e98db6b3..3439886a188 100644 --- a/packages/google-cloud-resourcemanager/package.json +++ b/packages/google-cloud-resourcemanager/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/resource-manager", "description": "Cloud Resource Manager Client Library for Node.js", - "version": "4.2.2", + "version": "4.3.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { @@ -34,7 +34,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -42,11 +42,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -61,6 +61,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -70,5 +71,4 @@ "webpack": "^5.0.0", "webpack-cli": "^5.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-resourcemanager/protos/google/cloud/resourcemanager/v3/folders.proto b/packages/google-cloud-resourcemanager/protos/google/cloud/resourcemanager/v3/folders.proto index 98568a26e65..036bf4e6daf 100644 --- a/packages/google-cloud-resourcemanager/protos/google/cloud/resourcemanager/v3/folders.proto +++ b/packages/google-cloud-resourcemanager/protos/google/cloud/resourcemanager/v3/folders.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -124,7 +124,9 @@ service Folders { // Updates a folder, changing its `display_name`. // Changes to the folder `display_name` will be rejected if they violate // either the `display_name` formatting rules or the naming constraints - // described in the [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] documentation. + // described in the + // [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] + // documentation. // // The folder's `display_name` must start and end with a letter or digit, // may contain letters, digits, spaces, hyphens and underscores and can be @@ -162,9 +164,9 @@ service Folders { // `FolderOperation` message as an aid to stateless clients. // Folder moves will be rejected if they violate either the naming, height, // or fanout constraints described in the - // [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] documentation. - // The caller must have `resourcemanager.folders.move` permission on the - // folder's current and proposed new parent. + // [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] + // documentation. The caller must have `resourcemanager.folders.move` + // permission on the folder's current and proposed new parent. rpc MoveFolder(MoveFolderRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v3/{name=folders/*}:move" @@ -178,11 +180,13 @@ service Folders { } // Requests deletion of a folder. The folder is moved into the - // [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED] state - // immediately, and is deleted approximately 30 days later. This method may - // only be called on an empty folder, where a folder is empty if it doesn't - // contain any folders or projects in the [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state. - // If called on a folder in [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED] + // [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED] + // state immediately, and is deleted approximately 30 days later. This method + // may only be called on an empty folder, where a folder is empty if it + // doesn't contain any folders or projects in the + // [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state. If + // called on a folder in + // [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED] // state the operation will result in a no-op success. // The caller must have `resourcemanager.folders.delete` permission on the // identified folder. @@ -198,15 +202,18 @@ service Folders { } // Cancels the deletion request for a folder. This method may be called on a - // folder in any state. If the folder is in the [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] - // state the result will be a no-op success. In order to succeed, the folder's - // parent must be in the [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state. In addition, - // reintroducing the folder into the tree must not violate folder naming, - // height, and fanout constraints described in the - // [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] documentation. - // The caller must have `resourcemanager.folders.undelete` permission on the - // identified folder. - rpc UndeleteFolder(UndeleteFolderRequest) returns (google.longrunning.Operation) { + // folder in any state. If the folder is in the + // [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state the + // result will be a no-op success. In order to succeed, the folder's parent + // must be in the + // [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state. In + // addition, reintroducing the folder into the tree must not violate folder + // naming, height, and fanout constraints described in the + // [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] + // documentation. The caller must have `resourcemanager.folders.undelete` + // permission on the identified folder. + rpc UndeleteFolder(UndeleteFolderRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v3/{name=folders/*}:undelete" body: "*" @@ -223,7 +230,8 @@ service Folders { // be the folder's resource name, for example: "folders/1234". // The caller must have `resourcemanager.folders.getIamPolicy` permission // on the identified folder. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v3/{resource=folders/*}:getIamPolicy" body: "*" @@ -236,7 +244,8 @@ service Folders { // "folders/1234". // The caller must have `resourcemanager.folders.setIamPolicy` permission // on the identified folder. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v3/{resource=folders/*}:setIamPolicy" body: "*" @@ -249,7 +258,8 @@ service Folders { // for example: "folders/1234". // // There are no permissions required for making this API call. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v3/{resource=folders/*}:testIamPermissions" body: "*" @@ -304,17 +314,20 @@ message Folder { State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Timestamp when the folder was created. - google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Timestamp when the folder was last modified. - google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Timestamp when the folder was requested to be deleted. - google.protobuf.Timestamp delete_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp delete_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. A checksum computed by the server based on the current value of the folder - // resource. This may be sent on update and delete requests to ensure the - // client has an up-to-date value before proceeding. + // Output only. A checksum computed by the server based on the current value + // of the folder resource. This may be sent on update and delete requests to + // ensure the client has an up-to-date value before proceeding. string etag = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; } @@ -332,20 +345,23 @@ message GetFolderRequest { // The ListFolders request message. message ListFoldersRequest { - // Required. The resource name of the organization or folder whose folders are - // being listed. - // Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. + // Required. The name of the parent resource whose folders are being listed. + // Only children of this parent resource are listed; descendants are not + // listed. + // + // If the parent is a folder, use the value `folders/{folder_id}`. If the + // parent is an organization, use the value `organizations/{org_id}`. + // // Access to this method is controlled by checking the // `resourcemanager.folders.list` permission on the `parent`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "*" - } + (google.api.resource_reference) = { child_type: "*" } ]; - // Optional. The maximum number of folders to return in the response. - // If unspecified, server picks an appropriate default. + // Optional. The maximum number of folders to return in the response. The + // server can return fewer folders than requested. If unspecified, server + // picks an appropriate default. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. A pagination token returned from a previous call to `ListFolders` @@ -371,12 +387,13 @@ message ListFoldersResponse { // The request message for searching folders. message SearchFoldersRequest { - // Optional. The maximum number of folders to return in the response. - // If unspecified, server picks an appropriate default. + // Optional. The maximum number of folders to return in the response. The + // server can return fewer folders than requested. If unspecified, server + // picks an appropriate default. int32 page_size = 1 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A pagination token returned from a previous call to `SearchFolders` - // that indicates from where search should continue. + // Optional. A pagination token returned from a previous call to + // `SearchFolders` that indicates from where search should continue. string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Search criteria used to select the folders to return. @@ -426,8 +443,8 @@ message SearchFoldersResponse { // The CreateFolder request message. message CreateFolderRequest { - // Required. The folder being created, only the display name and parent will be - // consulted. All other fields will be ignored. + // Required. The folder being created, only the display name and parent will + // be consulted. All other fields will be ignored. Folder folder = 2 [(google.api.field_behavior) = REQUIRED]; } @@ -450,20 +467,19 @@ message CreateFolderMetadata { // [MoveFolder][google.cloud.resourcemanager.v3.Folders.MoveFolder] method to // change the `parent` field. message UpdateFolderRequest { - // Required. The new definition of the Folder. It must include the `name` field, which - // cannot be changed. + // Required. The new definition of the Folder. It must include the `name` + // field, which cannot be changed. Folder folder = 1 [(google.api.field_behavior) = REQUIRED]; // Required. Fields to be updated. // Only the `display_name` can be updated. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; } // A status object which is used as the `metadata` field for the Operation // returned by UpdateFolder. -message UpdateFolderMetadata { - -} +message UpdateFolderMetadata {} // The MoveFolder request message. message MoveFolderRequest { @@ -476,14 +492,12 @@ message MoveFolderRequest { } ]; - // Required. The resource name of the folder or organization which should be the - // folder's new parent. - // Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. + // Required. The resource name of the folder or organization which should be + // the folder's new parent. Must be of the form `folders/{folder_id}` or + // `organizations/{org_id}`. string destination_parent = 2 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "*" - } + (google.api.resource_reference) = { child_type: "*" } ]; } @@ -513,9 +527,7 @@ message DeleteFolderRequest { // A status object which is used as the `metadata` field for the `Operation` // returned by `DeleteFolder`. -message DeleteFolderMetadata { - -} +message DeleteFolderMetadata {} // The UndeleteFolder request message. message UndeleteFolderRequest { @@ -531,6 +543,4 @@ message UndeleteFolderRequest { // A status object which is used as the `metadata` field for the `Operation` // returned by `UndeleteFolder`. -message UndeleteFolderMetadata { - -} +message UndeleteFolderMetadata {} diff --git a/packages/google-cloud-resourcemanager/protos/google/cloud/resourcemanager/v3/organizations.proto b/packages/google-cloud-resourcemanager/protos/google/cloud/resourcemanager/v3/organizations.proto index 8f8a6f34a53..7b0ed95a501 100644 --- a/packages/google-cloud-resourcemanager/protos/google/cloud/resourcemanager/v3/organizations.proto +++ b/packages/google-cloud-resourcemanager/protos/google/cloud/resourcemanager/v3/organizations.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -54,7 +54,8 @@ service Organizations { // // Search will only return organizations on which the user has the permission // `resourcemanager.organizations.get` - rpc SearchOrganizations(SearchOrganizationsRequest) returns (SearchOrganizationsResponse) { + rpc SearchOrganizations(SearchOrganizationsRequest) + returns (SearchOrganizationsResponse) { option (google.api.http) = { get: "/v3/organizations:search" }; @@ -67,7 +68,8 @@ service Organizations { // // Authorization requires the IAM permission // `resourcemanager.organizations.getIamPolicy` on the specified organization. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v3/{resource=organizations/*}:getIamPolicy" body: "*" @@ -81,7 +83,8 @@ service Organizations { // // Authorization requires the IAM permission // `resourcemanager.organizations.setIamPolicy` on the specified organization. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v3/{resource=organizations/*}:setIamPolicy" body: "*" @@ -94,7 +97,8 @@ service Organizations { // for example: "organizations/123". // // There are no permissions required for making this API call. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v3/{resource=organizations/*}:testIamPermissions" body: "*" @@ -150,26 +154,29 @@ message Organization { State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Timestamp when the Organization was created. - google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Timestamp when the Organization was last modified. - google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Timestamp when the Organization was requested for deletion. - google.protobuf.Timestamp delete_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp delete_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. A checksum computed by the server based on the current value of the - // Organization resource. This may be sent on update and delete requests to - // ensure the client has an up-to-date value before proceeding. + // Output only. A checksum computed by the server based on the current value + // of the Organization resource. This may be sent on update and delete + // requests to ensure the client has an up-to-date value before proceeding. string etag = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The request sent to the `GetOrganization` method. The `name` field is // required. `organization_id` is no longer accepted. message GetOrganizationRequest { - // Required. The resource name of the Organization to fetch. This is the organization's - // relative path in the API, formatted as "organizations/[organizationId]". - // For example, "organizations/1234". + // Required. The resource name of the Organization to fetch. This is the + // organization's relative path in the API, formatted as + // "organizations/[organizationId]". For example, "organizations/1234". string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -181,15 +188,17 @@ message GetOrganizationRequest { // The request sent to the `SearchOrganizations` method. message SearchOrganizationsRequest { // Optional. The maximum number of organizations to return in the response. - // If unspecified, server picks an appropriate default. + // The server can return fewer organizations than requested. If unspecified, + // server picks an appropriate default. int32 page_size = 1 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A pagination token returned from a previous call to `SearchOrganizations` - // that indicates from where listing should continue. + // Optional. A pagination token returned from a previous call to + // `SearchOrganizations` that indicates from where listing should continue. string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. An optional query string used to filter the Organizations to return in - // the response. Query rules are case-insensitive. + // Optional. An optional query string used to filter the Organizations to + // return in the response. Query rules are case-insensitive. + // // // ``` // | Field | Description | @@ -225,12 +234,8 @@ message SearchOrganizationsResponse { // A status object which is used as the `metadata` field for the operation // returned by DeleteOrganization. -message DeleteOrganizationMetadata { - -} +message DeleteOrganizationMetadata {} // A status object which is used as the `metadata` field for the Operation // returned by UndeleteOrganization. -message UndeleteOrganizationMetadata { - -} +message UndeleteOrganizationMetadata {} diff --git a/packages/google-cloud-resourcemanager/protos/google/cloud/resourcemanager/v3/projects.proto b/packages/google-cloud-resourcemanager/protos/google/cloud/resourcemanager/v3/projects.proto index 693e4609e96..5128147109a 100644 --- a/packages/google-cloud-resourcemanager/protos/google/cloud/resourcemanager/v3/projects.proto +++ b/packages/google-cloud-resourcemanager/protos/google/cloud/resourcemanager/v3/projects.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -88,7 +88,8 @@ service Projects { // seconds, but can sometimes take much longer. The tracking `Operation` is // automatically deleted after a few hours, so there is no need to call // `DeleteOperation`. - rpc CreateProject(CreateProjectRequest) returns (google.longrunning.Operation) { + rpc CreateProject(CreateProjectRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v3/projects" body: "project" @@ -106,7 +107,8 @@ service Projects { // // The caller must have `resourcemanager.projects.update` permission for this // project. - rpc UpdateProject(UpdateProjectRequest) returns (google.longrunning.Operation) { + rpc UpdateProject(UpdateProjectRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v3/{project.name=projects/*}" body: "project" @@ -126,9 +128,12 @@ service Projects { // Upon success, the `Operation.response` field will be populated with the // moved project. // - // The caller must have `resourcemanager.projects.update` permission on the - // project and have `resourcemanager.projects.move` permission on the - // project's current and proposed new parent. + // The caller must have `resourcemanager.projects.move` permission on the + // project, on the project's current and proposed new parent. + // + // If project has no current parent, or it currently does not have an + // associated organization resource, you will also need the + // `resourcemanager.projects.setIamPolicy` permission in the project. // // rpc MoveProject(MoveProjectRequest) returns (google.longrunning.Operation) { @@ -151,7 +156,8 @@ service Projects { // // This method changes the Project's lifecycle state from // [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE] - // to [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Project.State.DELETE_REQUESTED]. + // to + // [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Project.State.DELETE_REQUESTED]. // The deletion starts at an unspecified time, // at which point the Project is no longer accessible. // @@ -175,7 +181,8 @@ service Projects { // // The caller must have `resourcemanager.projects.delete` permissions for this // project. - rpc DeleteProject(DeleteProjectRequest) returns (google.longrunning.Operation) { + rpc DeleteProject(DeleteProjectRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v3/{name=projects/*}" }; @@ -195,7 +202,8 @@ service Projects { // // The caller must have `resourcemanager.projects.undelete` permission for // this project. - rpc UndeleteProject(UndeleteProjectRequest) returns (google.longrunning.Operation) { + rpc UndeleteProject(UndeleteProjectRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v3/{name=projects/*}:undelete" body: "*" @@ -207,9 +215,11 @@ service Projects { }; } - // Returns the IAM access control policy for the specified project. + // Returns the IAM access control policy for the specified project, in the + // format `projects/{ProjectIdOrNumber}` e.g. projects/123. // Permission is denied if the policy or the resource do not exist. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v3/{resource=projects/*}:getIamPolicy" body: "*" @@ -217,7 +227,8 @@ service Projects { option (google.api.method_signature) = "resource"; } - // Sets the IAM access control policy for the specified project. + // Sets the IAM access control policy for the specified project, in the + // format `projects/{ProjectIdOrNumber}` e.g. projects/123. // // CAUTION: This method will replace the existing policy, and cannot be used // to append additional IAM settings. @@ -249,19 +260,16 @@ service Projects { // `setIamPolicy()`; // they must be sent only using the Cloud Platform Console. // - // + Membership changes that leave the project without any owners that have - // accepted the Terms of Service (ToS) will be rejected. - // // + If the project is not part of an organization, there must be at least // one owner who has accepted the Terms of Service (ToS) agreement in the // policy. Calling `setIamPolicy()` to remove the last ToS-accepted owner // from the policy will fail. This restriction also applies to legacy // projects that no longer have owners who have accepted the ToS. Edits to // IAM policies will be rejected until the lack of a ToS-accepting owner is - // rectified. - // - // + Calling this method requires enabling the App Engine Admin API. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + // rectified. If the project is part of an organization, you can remove all + // owners, potentially making the organization inaccessible. + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v3/{resource=projects/*}:setIamPolicy" body: "*" @@ -269,8 +277,10 @@ service Projects { option (google.api.method_signature) = "resource, policy"; } - // Returns permissions that a caller has on the specified project. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + // Returns permissions that a caller has on the specified project, in the + // format `projects/{ProjectIdOrNumber}` e.g. projects/123.. + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v3/{resource=projects/*}:testIamPermissions" body: "*" @@ -307,8 +317,8 @@ message Project { DELETE_REQUESTED = 2; } - // Output only. The unique resource name of the project. It is an int64 generated number - // prefixed by "projects/". + // Output only. The unique resource name of the project. It is an int64 + // generated number prefixed by "projects/". // // Example: `projects/415104041262` string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -337,17 +347,20 @@ message Project { string display_name = 5 [(google.api.field_behavior) = OPTIONAL]; // Output only. Creation time. - google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The most recent time this resource was modified. - google.protobuf.Timestamp update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time at which this resource was requested for deletion. - google.protobuf.Timestamp delete_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp delete_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. A checksum computed by the server based on the current value of the Project - // resource. This may be sent on update and delete requests to ensure the - // client has an up-to-date value before proceeding. + // Output only. A checksum computed by the server based on the current value + // of the Project resource. This may be sent on update and delete requests to + // ensure the client has an up-to-date value before proceeding. string etag = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. The labels associated with this project. @@ -358,7 +371,7 @@ message Project { // Label values must be between 0 and 63 characters long and must conform // to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. // - // No more than 256 labels can be associated with a given resource. + // No more than 64 labels can be associated with a given resource. // // Clients should store labels in a representation such as JSON that does not // depend on specific characters being disallowed. @@ -384,20 +397,20 @@ message GetProjectRequest { // [ListProjects][google.cloud.resourcemanager.v3.Projects.ListProjects] // method. message ListProjectsRequest { - // Required. The name of the parent resource to list projects under. + // Required. The name of the parent resource whose projects are being listed. + // Only children of this parent resource are listed; descendants are not + // listed. // - // For example, setting this field to 'folders/1234' would list all projects - // directly under that folder. + // If the parent is a folder, use the value `folders/{folder_id}`. If the + // parent is an organization, use the value `organizations/{org_id}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "*" - } + (google.api.resource_reference) = { child_type: "*" } ]; - // Optional. A pagination token returned from a previous call to [ListProjects] - // [google.cloud.resourcemanager.v3.Projects.ListProjects] - // that indicates from where listing should continue. + // Optional. A pagination token returned from a previous call to + // [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects] that + // indicates from where listing should continue. string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The maximum number of projects to return in the response. @@ -405,8 +418,8 @@ message ListProjectsRequest { // If unspecified, server picks an appropriate default. int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Indicate that projects in the `DELETE_REQUESTED` state should also be - // returned. Normally only `ACTIVE` projects are returned. + // Optional. Indicate that projects in the `DELETE_REQUESTED` state should + // also be returned. Normally only `ACTIVE` projects are returned. bool show_deleted = 4 [(google.api.field_behavior) = OPTIONAL]; } @@ -444,48 +457,42 @@ message ListProjectsResponse { message SearchProjectsRequest { // Optional. A query string for searching for projects that the caller has // `resourcemanager.projects.get` permission to. If multiple fields are - // included in the query, the it will return results that match any of the + // included in the query, then it will return results that match any of the // fields. Some eligible fields are: // - // ``` - // | Field | Description | - // |-------------------------|----------------------------------------------| - // | displayName, name | Filters by displayName. | - // | parent | Project's parent. (for example: folders/123, - // organizations/*) Prefer parent field over parent.type and parent.id. | - // | parent.type | Parent's type: `folder` or `organization`. | - // | parent.id | Parent's id number (for example: 123) | - // | id, projectId | Filters by projectId. | - // | state, lifecycleState | Filters by state. | - // | labels | Filters by label name or value. | - // | labels. (where *key* is the name of a label) | Filters by label - // name. | - // ``` + // - **`displayName`, `name`**: Filters by displayName. + // - **`parent`**: Project's parent (for example: `folders/123`, + // `organizations/*`). Prefer `parent` field over `parent.type` and + // `parent.id`. + // - **`parent.type`**: Parent's type: `folder` or `organization`. + // - **`parent.id`**: Parent's id number (for example: `123`). + // - **`id`, `projectId`**: Filters by projectId. + // - **`state`, `lifecycleState`**: Filters by state. + // - **`labels`**: Filters by label name or value. + // - **`labels.` (where `` is the name of a label)**: Filters by label + // name. // // Search expressions are case insensitive. // // Some examples queries: // - // ``` - // | Query | Description | - // |------------------|-----------------------------------------------------| - // | name:how* | The project's name starts with "how". | - // | name:Howl | The project's name is `Howl` or `howl`. | - // | name:HOWL | Equivalent to above. | - // | NAME:howl | Equivalent to above. | - // | labels.color:* | The project has the label `color`. | - // | labels.color:red | The project's label `color` has the value `red`. | - // | labels.color:red labels.size:big | The project's label `color` has - // the value `red` and its label `size` has the value `big`. | - // ``` + // + // - **`name:how*`**: The project's name starts with "how". + // - **`name:Howl`**: The project's name is `Howl` or `howl`. + // - **`name:HOWL`**: Equivalent to above. + // - **`NAME:howl`**: Equivalent to above. + // - **`labels.color:*`**: The project has the label `color`. + // - **`labels.color:red`**: The project's label `color` has the value `red`. + // - **`labels.color:red labels.size:big`**: The project's label `color` has + // the value `red` or its label `size` has the value `big`. // // If no query is specified, the call will return projects for which the user // has the `resourcemanager.projects.get` permission. string query = 1 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A pagination token returned from a previous call to [ListProjects] - // [google.cloud.resourcemanager.v3.Projects.ListProjects] - // that indicates from where listing should continue. + // Optional. A pagination token returned from a previous call to + // [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects] that + // indicates from where listing should continue. string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The maximum number of projects to return in the response. @@ -531,7 +538,7 @@ message CreateProjectRequest { // // If the `parent` field is set, the `resourcemanager.projects.create` // permission is checked on the parent resource. If no parent is set and - // the authorization credentials belong to an Organziation, the parent + // the authorization credentials belong to an Organization, the parent // will be set to that Organization. Project project = 1 [(google.api.field_behavior) = REQUIRED]; } @@ -564,14 +571,13 @@ message UpdateProjectRequest { Project project = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. An update mask to selectively update fields. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; } // A status object which is used as the `metadata` field for the Operation // returned by UpdateProject. -message UpdateProjectMetadata { - -} +message UpdateProjectMetadata {} // The request sent to // [MoveProject][google.cloud.resourcemanager.v3.Projects.MoveProject] @@ -588,17 +594,13 @@ message MoveProjectRequest { // Required. The new parent to move the Project under. string destination_parent = 2 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "*" - } + (google.api.resource_reference) = { child_type: "*" } ]; } // A status object which is used as the `metadata` field for the Operation // returned by MoveProject. -message MoveProjectMetadata { - -} +message MoveProjectMetadata {} // [DeleteProject][google.cloud.resourcemanager.v3.Projects.DeleteProject] // method. @@ -614,9 +616,7 @@ message DeleteProjectRequest { // A status object which is used as the `metadata` field for the Operation // returned by `DeleteProject`. -message DeleteProjectMetadata { - -} +message DeleteProjectMetadata {} // The request sent to the [UndeleteProject] // [google.cloud.resourcemanager.v3.Projects.UndeleteProject] @@ -635,6 +635,4 @@ message UndeleteProjectRequest { // A status object which is used as the `metadata` field for the Operation // returned by `UndeleteProject`. -message UndeleteProjectMetadata { - -} +message UndeleteProjectMetadata {} diff --git a/packages/google-cloud-resourcemanager/protos/google/cloud/resourcemanager/v3/tag_bindings.proto b/packages/google-cloud-resourcemanager/protos/google/cloud/resourcemanager/v3/tag_bindings.proto index a9dbac3b06f..6e94b888459 100644 --- a/packages/google-cloud-resourcemanager/protos/google/cloud/resourcemanager/v3/tag_bindings.proto +++ b/packages/google-cloud-resourcemanager/protos/google/cloud/resourcemanager/v3/tag_bindings.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; option csharp_namespace = "Google.Cloud.ResourceManager.V3"; option go_package = "cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb;resourcemanagerpb"; @@ -31,28 +32,29 @@ option php_namespace = "Google\\Cloud\\ResourceManager\\V3"; option ruby_package = "Google::Cloud::ResourceManager::V3"; // Allow users to create and manage TagBindings between TagValues and -// different cloud resources throughout the GCP resource hierarchy. +// different Google Cloud resources throughout the GCP resource hierarchy. service TagBindings { option (google.api.default_host) = "cloudresourcemanager.googleapis.com"; option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform," "https://www.googleapis.com/auth/cloud-platform.read-only"; - // Lists the TagBindings for the given cloud resource, as specified with - // `parent`. + // Lists the TagBindings for the given Google Cloud resource, as specified + // with `parent`. // // NOTE: The `parent` field is expected to be a full resource name: // https://cloud.google.com/apis/design/resource_names#full_resource_name - rpc ListTagBindings(ListTagBindingsRequest) returns (ListTagBindingsResponse) { + rpc ListTagBindings(ListTagBindingsRequest) + returns (ListTagBindingsResponse) { option (google.api.http) = { get: "/v3/tagBindings" }; option (google.api.method_signature) = "parent"; } - // Creates a TagBinding between a TagValue and a cloud resource - // (currently project, folder, or organization). - rpc CreateTagBinding(CreateTagBindingRequest) returns (google.longrunning.Operation) { + // Creates a TagBinding between a TagValue and a Google Cloud resource. + rpc CreateTagBinding(CreateTagBindingRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v3/tagBindings" body: "tag_binding" @@ -65,7 +67,8 @@ service TagBindings { } // Deletes a TagBinding. - rpc DeleteTagBinding(DeleteTagBindingRequest) returns (google.longrunning.Operation) { + rpc DeleteTagBinding(DeleteTagBindingRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v3/{name=tagBindings/**}" }; @@ -75,12 +78,21 @@ service TagBindings { metadata_type: "DeleteTagBindingMetadata" }; } + + // Return a list of effective tags for the given Google Cloud resource, as + // specified in `parent`. + rpc ListEffectiveTags(ListEffectiveTagsRequest) + returns (ListEffectiveTagsResponse) { + option (google.api.http) = { + get: "/v3/effectiveTags" + }; + option (google.api.method_signature) = "parent"; + } } // A TagBinding represents a connection between a TagValue and a cloud -// resource (currently project, folder, or organization). Once a TagBinding is -// created, the TagValue is applied to all the descendants of the cloud -// resource. +// resource Once a TagBinding is created, the TagValue is applied to all the +// descendants of the Google Cloud resource. message TagBinding { option (google.api.resource) = { type: "cloudresourcemanager.googleapis.com/TagBinding" @@ -99,27 +111,32 @@ message TagBinding { // The TagValue of the TagBinding. // Must be of the form `tagValues/456`. string tag_value = 3; + + // The namespaced name for the TagValue of the TagBinding. + // Must be in the format + // `{parent_id}/{tag_key_short_name}/{short_name}`. + // + // For methods that support TagValue namespaced name, only one of + // tag_value_namespaced_name or tag_value may be filled. Requests with both + // fields will be rejected. + string tag_value_namespaced_name = 4; } // Runtime operation information for creating a TagValue. -message CreateTagBindingMetadata { - -} +message CreateTagBindingMetadata {} // The request message to create a TagBinding. message CreateTagBindingRequest { // Required. The TagBinding to be created. TagBinding tag_binding = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. Set to true to perform the validations necessary for creating the resource, - // but not actually perform the action. + // Optional. Set to true to perform the validations necessary for creating the + // resource, but not actually perform the action. bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL]; } // Runtime operation information for deleting a TagBinding. -message DeleteTagBindingMetadata { - -} +message DeleteTagBindingMetadata {} // The request message to delete a TagBinding. message DeleteTagBindingRequest { @@ -136,30 +153,27 @@ message DeleteTagBindingRequest { // The request message to list all TagBindings for a parent. message ListTagBindingsRequest { - // Required. The full resource name of a resource for which you want to list existing - // TagBindings. - // E.g. "//cloudresourcemanager.googleapis.com/projects/123" + // Required. The full resource name of a resource for which you want to list + // existing TagBindings. E.g. + // "//cloudresourcemanager.googleapis.com/projects/123" string parent = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "*" - } + (google.api.resource_reference) = { child_type: "*" } ]; - // Optional. The maximum number of TagBindings to return in the response. The server - // allows a maximum of 300 TagBindings to return. If unspecified, the server - // will use 100 as the default. + // Optional. The maximum number of TagBindings to return in the response. The + // server allows a maximum of 300 TagBindings to return. If unspecified, the + // server will use 100 as the default. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A pagination token returned from a previous call to `ListTagBindings` - // that indicates where this listing should continue from. + // Optional. A pagination token returned from a previous call to + // `ListTagBindings` that indicates where this listing should continue from. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } // The ListTagBindings response. message ListTagBindingsResponse { - // A possibly paginated list of TagBindings for the specified TagValue or - // resource. + // A possibly paginated list of TagBindings for the specified resource. repeated TagBinding tag_bindings = 1; // Pagination token. @@ -175,3 +189,80 @@ message ListTagBindingsResponse { // Pagination tokens have a limited lifetime. string next_page_token = 2; } + +// The request message to ListEffectiveTags +message ListEffectiveTagsRequest { + // Required. The full resource name of a resource for which you want to list + // the effective tags. E.g. + // "//cloudresourcemanager.googleapis.com/projects/123" + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The maximum number of effective tags to return in the response. + // The server allows a maximum of 300 effective tags to return in a single + // page. If unspecified, the server will use 100 as the default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A pagination token returned from a previous call to + // `ListEffectiveTags` that indicates from where this listing should continue. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response of ListEffectiveTags. +message ListEffectiveTagsResponse { + // A possibly paginated list of effective tags for the specified resource. + repeated EffectiveTag effective_tags = 1; + + // Pagination token. + // + // If the result set is too large to fit in a single response, this token + // is returned. It encodes the position of the current result cursor. + // Feeding this value into a new list request with the `page_token` parameter + // gives the next page of the results. + // + // When `next_page_token` is not filled in, there is no next page and + // the list returned is the last page in the result set. + // + // Pagination tokens have a limited lifetime. + string next_page_token = 2; +} + +// An EffectiveTag represents a tag that applies to a resource during policy +// evaluation. Tags can be either directly bound to a resource or inherited from +// its ancestor. EffectiveTag contains the name and +// namespaced_name of the tag value and tag key, with additional fields of +// `inherited` to indicate the inheritance status of the effective tag. +message EffectiveTag { + // Resource name for TagValue in the format `tagValues/456`. + string tag_value = 1 [(google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/TagValue" + }]; + + // The namespaced name of the TagValue. Can be in the form + // `{organization_id}/{tag_key_short_name}/{tag_value_short_name}` or + // `{project_id}/{tag_key_short_name}/{tag_value_short_name}` or + // `{project_number}/{tag_key_short_name}/{tag_value_short_name}`. + string namespaced_tag_value = 2; + + // The name of the TagKey, in the format `tagKeys/{id}`, such as + // `tagKeys/123`. + string tag_key = 3 [(google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/TagKey" + }]; + + // The namespaced name of the TagKey. Can be in the form + // `{organization_id}/{tag_key_short_name}` or + // `{project_id}/{tag_key_short_name}` or + // `{project_number}/{tag_key_short_name}`. + string namespaced_tag_key = 4; + + // The parent name of the tag key. + // Must be in the format `organizations/{organization_id}` or + // `projects/{project_number}` + string tag_key_parent_name = 6; + + // Indicates the inheritance status of a tag value + // attached to the given resource. If the tag value is inherited from one of + // the resource's ancestors, inherited will be true. If false, then the tag + // value is directly attached to the resource, inherited will be false. + bool inherited = 5; +} diff --git a/packages/google-cloud-resourcemanager/protos/google/cloud/resourcemanager/v3/tag_holds.proto b/packages/google-cloud-resourcemanager/protos/google/cloud/resourcemanager/v3/tag_holds.proto new file mode 100644 index 00000000000..15c446913f2 --- /dev/null +++ b/packages/google-cloud-resourcemanager/protos/google/cloud/resourcemanager/v3/tag_holds.proto @@ -0,0 +1,216 @@ +// Copyright 2023 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.resourcemanager.v3; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.ResourceManager.V3"; +option go_package = "cloud.google.com/go/resourcemanager/apiv3/resourcemanagerpb;resourcemanagerpb"; +option java_multiple_files = true; +option java_outer_classname = "TagHoldsProto"; +option java_package = "com.google.cloud.resourcemanager.v3"; +option php_namespace = "Google\\Cloud\\ResourceManager\\V3"; +option ruby_package = "Google::Cloud::ResourceManager::V3"; + +// Allow users to create and manage TagHolds for TagValues. TagHolds represent +// the use of a Tag Value that is not captured by TagBindings but +// should still block TagValue deletion (such as a reference in a policy +// condition). This service provides isolated failure domains by cloud location +// so that TagHolds can be managed in the same location as their usage. +service TagHolds { + option (google.api.default_host) = "cloudresourcemanager.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-platform.read-only"; + + // Creates a TagHold. Returns ALREADY_EXISTS if a TagHold with the same + // resource and origin exists under the same TagValue. + rpc CreateTagHold(CreateTagHoldRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3/{parent=tagValues/*}/tagHolds" + body: "tag_hold" + }; + option (google.api.method_signature) = "parent,tag_hold"; + option (google.longrunning.operation_info) = { + response_type: "TagHold" + metadata_type: "CreateTagHoldMetadata" + }; + } + + // Deletes a TagHold. + rpc DeleteTagHold(DeleteTagHoldRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v3/{name=tagValues/*/tagHolds/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "DeleteTagHoldMetadata" + }; + } + + // Lists TagHolds under a TagValue. + rpc ListTagHolds(ListTagHoldsRequest) returns (ListTagHoldsResponse) { + option (google.api.http) = { + get: "/v3/{parent=tagValues/*}/tagHolds" + }; + option (google.api.method_signature) = "parent"; + } +} + +// A TagHold represents the use of a TagValue that is not captured by +// TagBindings. If a TagValue has any TagHolds, deletion will be blocked. +// This resource is intended to be created in the same cloud location as the +// `holder`. +message TagHold { + option (google.api.resource) = { + type: "cloudresourcemanager.googleapis.com/TagHold" + pattern: "tagValues/{tag_value}/tagHolds/{tag_hold}" + }; + + // Output only. The resource name of a TagHold. This is a String of the form: + // `tagValues/{tag-value-id}/tagHolds/{tag-hold-id}` + // (e.g. `tagValues/123/tagHolds/456`). This resource name is generated by + // the server. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The name of the resource where the TagValue is being used. Must + // be less than 200 characters. E.g. + // `//compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group` + string holder = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional string representing the origin of this request. This + // field should include human-understandable information to distinguish + // origins from each other. Must be less than 200 characters. E.g. + // `migs-35678234` + string origin = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A URL where an end user can learn more about removing this hold. + // E.g. + // `https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing` + string help_link = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time this TagHold was created. + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request message to create a TagHold. +message CreateTagHoldRequest { + // Required. The resource name of the TagHold's parent TagValue. Must be of + // the form: `tagValues/{tag-value-id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudresourcemanager.googleapis.com/TagHold" + } + ]; + + // Required. The TagHold to be created. + TagHold tag_hold = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Set to true to perform the validations necessary for creating the + // resource, but not actually perform the action. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Runtime operation information for creating a TagHold. +// (-- The metadata is currently empty, but may include information in the +// future. --) +message CreateTagHoldMetadata {} + +// The request message to delete a TagHold. +message DeleteTagHoldRequest { + // Required. The resource name of the TagHold to delete. Must be of the form: + // `tagValues/{tag-value-id}/tagHolds/{tag-hold-id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/TagHold" + } + ]; + + // Optional. Set to true to perform the validations necessary for deleting the + // resource, but not actually perform the action. + bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Runtime operation information for deleting a TagHold. +// (-- The metadata is currently empty, but may include information in the +// future. --) +message DeleteTagHoldMetadata {} + +// The request message for listing the TagHolds under a TagValue. +message ListTagHoldsRequest { + // Required. The resource name of the parent TagValue. Must be of the form: + // `tagValues/{tag-value-id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudresourcemanager.googleapis.com/TagHold" + } + ]; + + // Optional. The maximum number of TagHolds to return in the response. The + // server allows a maximum of 300 TagHolds to return. If unspecified, the + // server will use 100 as the default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A pagination token returned from a previous call to + // `ListTagHolds` that indicates where this listing should continue from. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Criteria used to select a subset of TagHolds parented by the + // TagValue to return. This field follows the syntax defined by aip.dev/160; + // the `holder` and `origin` fields are supported for filtering. Currently + // only `AND` syntax is supported. Some example queries are: + // + // * `holder = + // //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group` + // * `origin = 35678234` + // * `holder = + // //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group + // AND origin = 35678234` + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The ListTagHolds response. +message ListTagHoldsResponse { + // A possibly paginated list of TagHolds. + repeated TagHold tag_holds = 1; + + // Pagination token. + // + // If the result set is too large to fit in a single response, this token + // is returned. It encodes the position of the current result cursor. + // Feeding this value into a new list request with the `page_token` parameter + // gives the next page of the results. + // + // When `next_page_token` is not filled in, there is no next page and + // the list returned is the last page in the result set. + // + // Pagination tokens have a limited lifetime. + string next_page_token = 2; +} diff --git a/packages/google-cloud-resourcemanager/protos/google/cloud/resourcemanager/v3/tag_keys.proto b/packages/google-cloud-resourcemanager/protos/google/cloud/resourcemanager/v3/tag_keys.proto index 3d0500141b1..72881b22659 100644 --- a/packages/google-cloud-resourcemanager/protos/google/cloud/resourcemanager/v3/tag_keys.proto +++ b/packages/google-cloud-resourcemanager/protos/google/cloud/resourcemanager/v3/tag_keys.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -58,10 +58,20 @@ service TagKeys { option (google.api.method_signature) = "name"; } + // Retrieves a TagKey by its namespaced name. + // This method will return `PERMISSION_DENIED` if the key does not exist + // or the user does not have permission to view it. + rpc GetNamespacedTagKey(GetNamespacedTagKeyRequest) returns (TagKey) { + option (google.api.http) = { + get: "/v3/tagKeys/namespaced" + }; + option (google.api.method_signature) = "name"; + } + // Creates a new TagKey. If another request with the same parameters is // sent while the original request is in process, the second request - // will receive an error. A maximum of 300 TagKeys can exist under a parent at - // any given time. + // will receive an error. A maximum of 1000 TagKeys can exist under a parent + // at any given time. rpc CreateTagKey(CreateTagKeyRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v3/tagKeys" @@ -106,7 +116,8 @@ service TagKeys { // The caller must have // `cloudresourcemanager.googleapis.com/tagKeys.getIamPolicy` permission on // the specified TagKey. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v3/{resource=tagKeys/*}:getIamPolicy" body: "*" @@ -119,7 +130,8 @@ service TagKeys { // For example, "tagKeys/1234". // The caller must have `resourcemanager.tagKeys.setIamPolicy` permission // on the identified tagValue. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v3/{resource=tagKeys/*}:setIamPolicy" body: "*" @@ -132,7 +144,8 @@ service TagKeys { // For example, "tagKeys/1234". // // There are no permissions required for making this API call. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v3/{resource=tagKeys/*}:testIamPermissions" body: "*" @@ -154,12 +167,15 @@ message TagKey { // the TagKey. string name = 1 [(google.api.field_behavior) = IMMUTABLE]; - // Immutable. The resource name of the new TagKey's parent. - // Must be of the form `organizations/{org_id}`. + // Immutable. The resource name of the TagKey's parent. A TagKey can be + // parented by an Organization or a Project. For a TagKey parented by an + // Organization, its parent must be in the form `organizations/{org_id}`. For + // a TagKey parented by a Project, its parent can be in the form + // `projects/{project_id}` or `projects/{project_number}`. string parent = 2 [(google.api.field_behavior) = IMMUTABLE]; - // Required. Immutable. The user friendly name for a TagKey. The short name should be - // unique for TagKeys within the same tag namespace. + // Required. Immutable. The user friendly name for a TagKey. The short name + // should be unique for TagKeys within the same tag namespace. // // The short name must be 1-63 characters, beginning and ending with // an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), @@ -175,36 +191,55 @@ message TagKey { (google.api.field_behavior) = IMMUTABLE ]; - // Optional. User-assigned description of the TagKey. Must not exceed 256 characters. + // Optional. User-assigned description of the TagKey. Must not exceed 256 + // characters. // // Read-write. string description = 5 [(google.api.field_behavior) = OPTIONAL]; // Output only. Creation time. - google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Update time. - google.protobuf.Timestamp update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. Entity tag which users can pass to prevent race conditions. This field is - // always set in server responses. See UpdateTagKeyRequest for details. + // Optional. Entity tag which users can pass to prevent race conditions. This + // field is always set in server responses. See UpdateTagKeyRequest for + // details. string etag = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A purpose denotes that this Tag is intended for use in policies + // of a specific policy engine, and will involve that policy engine in + // management operations involving this Tag. A purpose does not grant a + // policy engine exclusive rights to the Tag, and it may be referenced by + // other policy engines. + // + // A purpose cannot be changed once set. + Purpose purpose = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Purpose data corresponds to the policy system that the tag is + // intended for. See documentation for `Purpose` for formatting of this field. + // + // Purpose data cannot be changed once set. + map purpose_data = 12 + [(google.api.field_behavior) = OPTIONAL]; } // The request message for listing all TagKeys under a parent resource. message ListTagKeysRequest { - // Required. The resource name of the new TagKey's parent. - // Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. + // Required. The resource name of the TagKey's parent. + // Must be of the form `organizations/{org_id}` or `projects/{project_id}` or + // `projects/{project_number}` string parent = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "*" - } + (google.api.resource_reference) = { child_type: "*" } ]; - // Optional. The maximum number of TagKeys to return in the response. The server allows - // a maximum of 300 TagKeys to return. If unspecified, the server will use 100 - // as the default. + // Optional. The maximum number of TagKeys to return in the response. The + // server allows a maximum of 300 TagKeys to return. If unspecified, the + // server will use 100 as the default. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. A pagination token returned from a previous call to `ListTagKey` @@ -234,28 +269,40 @@ message GetTagKeyRequest { ]; } +// The request message for getting a TagKey by its namespaced name. +message GetNamespacedTagKeyRequest { + // Required. A namespaced tag key name in the format + // `{parentId}/{tagKeyShort}`, such as `42/foo` for a key with short name + // "foo" under the organization with ID 42 or `r2-d2/bar` for a key with short + // name "bar" under the project `r2-d2`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/TagKey" + } + ]; +} + // The request message for creating a TagKey. message CreateTagKeyRequest { - // Required. The TagKey to be created. Only fields `short_name`, `description`, - // and `parent` are considered during the creation request. + // Required. The TagKey to be created. Only fields `short_name`, + // `description`, and `parent` are considered during the creation request. TagKey tag_key = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. Set to true to perform validations necessary for creating the resource, but - // not actually perform the action. + // Optional. Set to true to perform validations necessary for creating the + // resource, but not actually perform the action. bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL]; } // Runtime operation information for creating a TagKey. -message CreateTagKeyMetadata { - -} +message CreateTagKeyMetadata {} // The request message for updating a TagKey. message UpdateTagKeyRequest { - // Required. The new definition of the TagKey. Only the `description` and `etag` fields - // can be updated by this request. If the `etag` field is not empty, it - // must match the `etag` field of the existing tag key. Otherwise, - // `FAILED_PRECONDITION` will be returned. + // Required. The new definition of the TagKey. Only the `description` and + // `etag` fields can be updated by this request. If the `etag` field is not + // empty, it must match the `etag` field of the existing tag key. Otherwise, + // `ABORTED` will be returned. TagKey tag_key = 1 [(google.api.field_behavior) = REQUIRED]; // Fields to be updated. The mask may only contain `description` or @@ -269,15 +316,13 @@ message UpdateTagKeyRequest { } // Runtime operation information for updating a TagKey. -message UpdateTagKeyMetadata { - -} +message UpdateTagKeyMetadata {} // The request message for deleting a TagKey. message DeleteTagKeyRequest { - // Required. The resource name of a TagKey to be deleted in the format `tagKeys/123`. - // The TagKey cannot be a parent of any existing TagValues or it will not be - // deleted successfully. + // Required. The resource name of a TagKey to be deleted in the format + // `tagKeys/123`. The TagKey cannot be a parent of any existing TagValues or + // it will not be deleted successfully. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -285,16 +330,38 @@ message DeleteTagKeyRequest { } ]; - // Optional. Set as true to perform validations necessary for deletion, but not actually - // perform the action. + // Optional. Set as true to perform validations necessary for deletion, but + // not actually perform the action. bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The etag known to the client for the expected state of the TagKey. This is - // to be used for optimistic concurrency. + // Optional. The etag known to the client for the expected state of the + // TagKey. This is to be used for optimistic concurrency. string etag = 3 [(google.api.field_behavior) = OPTIONAL]; } // Runtime operation information for deleting a TagKey. -message DeleteTagKeyMetadata { - +message DeleteTagKeyMetadata {} + +// A purpose for each policy engine requiring such an integration. A single +// policy engine may have multiple purposes defined, however a TagKey may only +// specify a single purpose. +enum Purpose { + // Unspecified purpose. + PURPOSE_UNSPECIFIED = 0; + + // Purpose for Compute Engine firewalls. + // A corresponding `purpose_data` should be set for the network the tag is + // intended for. The key should be `network` and the value should be in + // either of these two formats: + // + // - + // `https://www.googleapis.com/compute/{compute_version}/projects/{project_id}/global/networks/{network_id}` + // - `{project_id}/{network_name}` + // + // Examples: + // + // - + // `https://www.googleapis.com/compute/staging_v1/projects/fail-closed-load-testing/global/networks/6992953698831725600` + // - `fail-closed-load-testing/load-testing-network` + GCE_FIREWALL = 1; } diff --git a/packages/google-cloud-resourcemanager/protos/google/cloud/resourcemanager/v3/tag_values.proto b/packages/google-cloud-resourcemanager/protos/google/cloud/resourcemanager/v3/tag_values.proto index 7cace43097f..9a5bd7f1ffb 100644 --- a/packages/google-cloud-resourcemanager/protos/google/cloud/resourcemanager/v3/tag_values.proto +++ b/packages/google-cloud-resourcemanager/protos/google/cloud/resourcemanager/v3/tag_values.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -49,9 +49,8 @@ service TagValues { option (google.api.method_signature) = "parent"; } - // Retrieves TagValue. If the TagValue or namespaced name does not exist, or - // if the user does not have permission to view it, this method will return - // `PERMISSION_DENIED`. + // Retrieves a TagValue. This method will return `PERMISSION_DENIED` if the + // value does not exist or the user does not have permission to view it. rpc GetTagValue(GetTagValueRequest) returns (TagValue) { option (google.api.http) = { get: "/v3/{name=tagValues/*}" @@ -59,11 +58,22 @@ service TagValues { option (google.api.method_signature) = "name"; } + // Retrieves a TagValue by its namespaced name. + // This method will return `PERMISSION_DENIED` if the value does not exist + // or the user does not have permission to view it. + rpc GetNamespacedTagValue(GetNamespacedTagValueRequest) returns (TagValue) { + option (google.api.http) = { + get: "/v3/tagValues/namespaced" + }; + option (google.api.method_signature) = "name"; + } + // Creates a TagValue as a child of the specified TagKey. If a another // request with the same parameters is sent while the original request is in - // process the second request will receive an error. A maximum of 300 + // process the second request will receive an error. A maximum of 1000 // TagValues can exist under a TagKey at any given time. - rpc CreateTagValue(CreateTagValueRequest) returns (google.longrunning.Operation) { + rpc CreateTagValue(CreateTagValueRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v3/tagValues" body: "tag_value" @@ -76,7 +86,8 @@ service TagValues { } // Updates the attributes of the TagValue resource. - rpc UpdateTagValue(UpdateTagValueRequest) returns (google.longrunning.Operation) { + rpc UpdateTagValue(UpdateTagValueRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v3/{tag_value.name=tagValues/*}" body: "tag_value" @@ -90,7 +101,8 @@ service TagValues { // Deletes a TagValue. The TagValue cannot have any bindings when it is // deleted. - rpc DeleteTagValue(DeleteTagValueRequest) returns (google.longrunning.Operation) { + rpc DeleteTagValue(DeleteTagValueRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v3/{name=tagValues/*}" }; @@ -107,7 +119,8 @@ service TagValues { // The caller must have the // `cloudresourcemanager.googleapis.com/tagValues.getIamPolicy` permission on // the identified TagValue to get the access control policy. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v3/{resource=tagValues/*}:getIamPolicy" body: "*" @@ -120,7 +133,8 @@ service TagValues { // For example: `tagValues/1234`. // The caller must have `resourcemanager.tagValues.setIamPolicy` permission // on the identified tagValue. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v3/{resource=tagValues/*}:setIamPolicy" body: "*" @@ -133,7 +147,8 @@ service TagValues { // `tagValues/1234`. // // There are no permissions required for making this API call. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v3/{resource=tagValues/*}:testIamPermissions" body: "*" @@ -158,8 +173,8 @@ message TagValue { // Must be of the form `tagKeys/{tag_key_id}`. string parent = 2 [(google.api.field_behavior) = IMMUTABLE]; - // Required. Immutable. User-assigned short name for TagValue. The short name should be - // unique for TagValues within the same parent TagKey. + // Required. Immutable. User-assigned short name for TagValue. The short name + // should be unique for TagValues within the same parent TagKey. // // The short name must be 63 characters or less, beginning and ending with // an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), @@ -169,8 +184,10 @@ message TagValue { (google.api.field_behavior) = IMMUTABLE ]; - // Output only. Namespaced name of the TagValue. Must be in the format - // `{organization_id}/{tag_key_short_name}/{short_name}`. + // Output only. The namespaced name of the TagValue. Can be in the form + // `{organization_id}/{tag_key_short_name}/{tag_value_short_name}` or + // `{project_id}/{tag_key_short_name}/{tag_value_short_name}` or + // `{project_number}/{tag_key_short_name}/{tag_value_short_name}`. string namespaced_name = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. User-assigned description of the TagValue. @@ -180,34 +197,36 @@ message TagValue { string description = 5 [(google.api.field_behavior) = OPTIONAL]; // Output only. Creation time. - google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Update time. - google.protobuf.Timestamp update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. Entity tag which users can pass to prevent race conditions. This field is - // always set in server responses. See UpdateTagValueRequest for details. + // Optional. Entity tag which users can pass to prevent race conditions. This + // field is always set in server responses. See UpdateTagValueRequest for + // details. string etag = 8 [(google.api.field_behavior) = OPTIONAL]; } // The request message for listing TagValues for the specified TagKey. +// Resource name for TagKey, parent of the TagValues to be listed, +// in the format `tagKeys/123`. message ListTagValuesRequest { - // Required. Resource name for TagKey, parent of the TagValues to be listed, - // in the format `tagKeys/123`. + // Required. string parent = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "*" - } + (google.api.resource_reference) = { child_type: "*" } ]; - // Optional. The maximum number of TagValues to return in the response. The server - // allows a maximum of 300 TagValues to return. If unspecified, the server - // will use 100 as the default. + // Optional. The maximum number of TagValues to return in the response. The + // server allows a maximum of 300 TagValues to return. If unspecified, the + // server will use 100 as the default. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A pagination token returned from a previous call to `ListTagValues` - // that indicates where this listing should continue from. + // Optional. A pagination token returned from a previous call to + // `ListTagValues` that indicates where this listing should continue from. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } @@ -225,7 +244,27 @@ message ListTagValuesResponse { // The request message for getting a TagValue. message GetTagValueRequest { - // Required. Resource name for TagValue to be fetched in the format `tagValues/456`. + // Required. Resource name for TagValue to be fetched in the format + // `tagValues/456`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/TagValue" + } + ]; +} + +// The request message for getting a TagValue by its namespaced name. +message GetNamespacedTagValueRequest { + // Required. A namespaced tag value name in the following format: + // + // `{parentId}/{tagKeyShort}/{tagValueShort}` + // + // Examples: + // - `42/foo/abc` for a value with short name "abc" under the key with short + // name "foo" under the organization with ID 42 + // - `r2-d2/bar/xyz` for a value with short name "xyz" under the key with + // short name "bar" under the project with ID "r2-d2" string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -236,44 +275,42 @@ message GetTagValueRequest { // The request message for creating a TagValue. message CreateTagValueRequest { - // Required. The TagValue to be created. Only fields `short_name`, `description`, - // and `parent` are considered during the creation request. + // Required. The TagValue to be created. Only fields `short_name`, + // `description`, and `parent` are considered during the creation request. TagValue tag_value = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. Set as true to perform the validations necessary for creating the resource, - // but not actually perform the action. + // Optional. Set as true to perform the validations necessary for creating the + // resource, but not actually perform the action. bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL]; } // Runtime operation information for creating a TagValue. -message CreateTagValueMetadata { - -} +message CreateTagValueMetadata {} // The request message for updating a TagValue. message UpdateTagValueRequest { - // Required. The new definition of the TagValue. Only fields `description` and `etag` - // fields can be updated by this request. If the `etag` field is nonempty, it - // must match the `etag` field of the existing ControlGroup. Otherwise, - // `FAILED_PRECONDITION` will be returned. + // Required. The new definition of the TagValue. Only fields `description` and + // `etag` fields can be updated by this request. If the `etag` field is + // nonempty, it must match the `etag` field of the existing ControlGroup. + // Otherwise, `ABORTED` will be returned. TagValue tag_value = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. Fields to be updated. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; - // Optional. True to perform validations necessary for updating the resource, but not - // actually perform the action. + // Optional. True to perform validations necessary for updating the resource, + // but not actually perform the action. bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; } // Runtime operation information for updating a TagValue. -message UpdateTagValueMetadata { - -} +message UpdateTagValueMetadata {} // The request message for deleting a TagValue. message DeleteTagValueRequest { - // Required. Resource name for TagValue to be deleted in the format tagValues/456. + // Required. Resource name for TagValue to be deleted in the format + // tagValues/456. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -281,16 +318,14 @@ message DeleteTagValueRequest { } ]; - // Optional. Set as true to perform the validations necessary for deletion, but not - // actually perform the action. + // Optional. Set as true to perform the validations necessary for deletion, + // but not actually perform the action. bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The etag known to the client for the expected state of the TagValue. This - // is to be used for optimistic concurrency. + // Optional. The etag known to the client for the expected state of the + // TagValue. This is to be used for optimistic concurrency. string etag = 3 [(google.api.field_behavior) = OPTIONAL]; } // Runtime operation information for deleting a TagValue. -message DeleteTagValueMetadata { - -} +message DeleteTagValueMetadata {} diff --git a/packages/google-cloud-resourcemanager/protos/protos.d.ts b/packages/google-cloud-resourcemanager/protos/protos.d.ts index 16435fa8c8f..8cf4a116faf 100644 --- a/packages/google-cloud-resourcemanager/protos/protos.d.ts +++ b/packages/google-cloud-resourcemanager/protos/protos.d.ts @@ -4685,6 +4685,20 @@ export namespace google { * @returns Promise */ public deleteTagBinding(request: google.cloud.resourcemanager.v3.IDeleteTagBindingRequest): Promise; + + /** + * Calls ListEffectiveTags. + * @param request ListEffectiveTagsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListEffectiveTagsResponse + */ + public listEffectiveTags(request: google.cloud.resourcemanager.v3.IListEffectiveTagsRequest, callback: google.cloud.resourcemanager.v3.TagBindings.ListEffectiveTagsCallback): void; + + /** + * Calls ListEffectiveTags. + * @param request ListEffectiveTagsRequest message or plain object + * @returns Promise + */ + public listEffectiveTags(request: google.cloud.resourcemanager.v3.IListEffectiveTagsRequest): Promise; } namespace TagBindings { @@ -4709,6 +4723,13 @@ export namespace google { * @param [response] Operation */ type DeleteTagBindingCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.resourcemanager.v3.TagBindings|listEffectiveTags}. + * @param error Error, if any + * @param [response] ListEffectiveTagsResponse + */ + type ListEffectiveTagsCallback = (error: (Error|null), response?: google.cloud.resourcemanager.v3.ListEffectiveTagsResponse) => void; } /** Properties of a TagBinding. */ @@ -4722,6 +4743,9 @@ export namespace google { /** TagBinding tagValue */ tagValue?: (string|null); + + /** TagBinding tagValueNamespacedName */ + tagValueNamespacedName?: (string|null); } /** Represents a TagBinding. */ @@ -4742,6 +4766,9 @@ export namespace google { /** TagBinding tagValue. */ public tagValue: string; + /** TagBinding tagValueNamespacedName. */ + public tagValueNamespacedName: string; + /** * Creates a new TagBinding instance using the specified properties. * @param [properties] Properties to set @@ -5137,277 +5164,1436 @@ export namespace google { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.resourcemanager.v3.IDeleteTagBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.resourcemanager.v3.IDeleteTagBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteTagBindingRequest message, length delimited. Does not implicitly {@link google.cloud.resourcemanager.v3.DeleteTagBindingRequest.verify|verify} messages. + * @param message DeleteTagBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.resourcemanager.v3.IDeleteTagBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteTagBindingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteTagBindingRequest + * @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.resourcemanager.v3.DeleteTagBindingRequest; + + /** + * Decodes a DeleteTagBindingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteTagBindingRequest + * @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.resourcemanager.v3.DeleteTagBindingRequest; + + /** + * Verifies a DeleteTagBindingRequest 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 DeleteTagBindingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteTagBindingRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.resourcemanager.v3.DeleteTagBindingRequest; + + /** + * Creates a plain object from a DeleteTagBindingRequest message. Also converts values to other types if specified. + * @param message DeleteTagBindingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.resourcemanager.v3.DeleteTagBindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteTagBindingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteTagBindingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListTagBindingsRequest. */ + interface IListTagBindingsRequest { + + /** ListTagBindingsRequest parent */ + parent?: (string|null); + + /** ListTagBindingsRequest pageSize */ + pageSize?: (number|null); + + /** ListTagBindingsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListTagBindingsRequest. */ + class ListTagBindingsRequest implements IListTagBindingsRequest { + + /** + * Constructs a new ListTagBindingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.resourcemanager.v3.IListTagBindingsRequest); + + /** ListTagBindingsRequest parent. */ + public parent: string; + + /** ListTagBindingsRequest pageSize. */ + public pageSize: number; + + /** ListTagBindingsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListTagBindingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTagBindingsRequest instance + */ + public static create(properties?: google.cloud.resourcemanager.v3.IListTagBindingsRequest): google.cloud.resourcemanager.v3.ListTagBindingsRequest; + + /** + * Encodes the specified ListTagBindingsRequest message. Does not implicitly {@link google.cloud.resourcemanager.v3.ListTagBindingsRequest.verify|verify} messages. + * @param message ListTagBindingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.resourcemanager.v3.IListTagBindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTagBindingsRequest message, length delimited. Does not implicitly {@link google.cloud.resourcemanager.v3.ListTagBindingsRequest.verify|verify} messages. + * @param message ListTagBindingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.resourcemanager.v3.IListTagBindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTagBindingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTagBindingsRequest + * @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.resourcemanager.v3.ListTagBindingsRequest; + + /** + * Decodes a ListTagBindingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTagBindingsRequest + * @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.resourcemanager.v3.ListTagBindingsRequest; + + /** + * Verifies a ListTagBindingsRequest 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 ListTagBindingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTagBindingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.resourcemanager.v3.ListTagBindingsRequest; + + /** + * Creates a plain object from a ListTagBindingsRequest message. Also converts values to other types if specified. + * @param message ListTagBindingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.resourcemanager.v3.ListTagBindingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTagBindingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListTagBindingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListTagBindingsResponse. */ + interface IListTagBindingsResponse { + + /** ListTagBindingsResponse tagBindings */ + tagBindings?: (google.cloud.resourcemanager.v3.ITagBinding[]|null); + + /** ListTagBindingsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListTagBindingsResponse. */ + class ListTagBindingsResponse implements IListTagBindingsResponse { + + /** + * Constructs a new ListTagBindingsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.resourcemanager.v3.IListTagBindingsResponse); + + /** ListTagBindingsResponse tagBindings. */ + public tagBindings: google.cloud.resourcemanager.v3.ITagBinding[]; + + /** ListTagBindingsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListTagBindingsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTagBindingsResponse instance + */ + public static create(properties?: google.cloud.resourcemanager.v3.IListTagBindingsResponse): google.cloud.resourcemanager.v3.ListTagBindingsResponse; + + /** + * Encodes the specified ListTagBindingsResponse message. Does not implicitly {@link google.cloud.resourcemanager.v3.ListTagBindingsResponse.verify|verify} messages. + * @param message ListTagBindingsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.resourcemanager.v3.IListTagBindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTagBindingsResponse message, length delimited. Does not implicitly {@link google.cloud.resourcemanager.v3.ListTagBindingsResponse.verify|verify} messages. + * @param message ListTagBindingsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.resourcemanager.v3.IListTagBindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTagBindingsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTagBindingsResponse + * @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.resourcemanager.v3.ListTagBindingsResponse; + + /** + * Decodes a ListTagBindingsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTagBindingsResponse + * @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.resourcemanager.v3.ListTagBindingsResponse; + + /** + * Verifies a ListTagBindingsResponse 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 ListTagBindingsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTagBindingsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.resourcemanager.v3.ListTagBindingsResponse; + + /** + * Creates a plain object from a ListTagBindingsResponse message. Also converts values to other types if specified. + * @param message ListTagBindingsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.resourcemanager.v3.ListTagBindingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTagBindingsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListTagBindingsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListEffectiveTagsRequest. */ + interface IListEffectiveTagsRequest { + + /** ListEffectiveTagsRequest parent */ + parent?: (string|null); + + /** ListEffectiveTagsRequest pageSize */ + pageSize?: (number|null); + + /** ListEffectiveTagsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListEffectiveTagsRequest. */ + class ListEffectiveTagsRequest implements IListEffectiveTagsRequest { + + /** + * Constructs a new ListEffectiveTagsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.resourcemanager.v3.IListEffectiveTagsRequest); + + /** ListEffectiveTagsRequest parent. */ + public parent: string; + + /** ListEffectiveTagsRequest pageSize. */ + public pageSize: number; + + /** ListEffectiveTagsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListEffectiveTagsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEffectiveTagsRequest instance + */ + public static create(properties?: google.cloud.resourcemanager.v3.IListEffectiveTagsRequest): google.cloud.resourcemanager.v3.ListEffectiveTagsRequest; + + /** + * Encodes the specified ListEffectiveTagsRequest message. Does not implicitly {@link google.cloud.resourcemanager.v3.ListEffectiveTagsRequest.verify|verify} messages. + * @param message ListEffectiveTagsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.resourcemanager.v3.IListEffectiveTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEffectiveTagsRequest message, length delimited. Does not implicitly {@link google.cloud.resourcemanager.v3.ListEffectiveTagsRequest.verify|verify} messages. + * @param message ListEffectiveTagsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.resourcemanager.v3.IListEffectiveTagsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEffectiveTagsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEffectiveTagsRequest + * @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.resourcemanager.v3.ListEffectiveTagsRequest; + + /** + * Decodes a ListEffectiveTagsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEffectiveTagsRequest + * @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.resourcemanager.v3.ListEffectiveTagsRequest; + + /** + * Verifies a ListEffectiveTagsRequest 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 ListEffectiveTagsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEffectiveTagsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.resourcemanager.v3.ListEffectiveTagsRequest; + + /** + * Creates a plain object from a ListEffectiveTagsRequest message. Also converts values to other types if specified. + * @param message ListEffectiveTagsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.resourcemanager.v3.ListEffectiveTagsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEffectiveTagsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListEffectiveTagsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListEffectiveTagsResponse. */ + interface IListEffectiveTagsResponse { + + /** ListEffectiveTagsResponse effectiveTags */ + effectiveTags?: (google.cloud.resourcemanager.v3.IEffectiveTag[]|null); + + /** ListEffectiveTagsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListEffectiveTagsResponse. */ + class ListEffectiveTagsResponse implements IListEffectiveTagsResponse { + + /** + * Constructs a new ListEffectiveTagsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.resourcemanager.v3.IListEffectiveTagsResponse); + + /** ListEffectiveTagsResponse effectiveTags. */ + public effectiveTags: google.cloud.resourcemanager.v3.IEffectiveTag[]; + + /** ListEffectiveTagsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListEffectiveTagsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEffectiveTagsResponse instance + */ + public static create(properties?: google.cloud.resourcemanager.v3.IListEffectiveTagsResponse): google.cloud.resourcemanager.v3.ListEffectiveTagsResponse; + + /** + * Encodes the specified ListEffectiveTagsResponse message. Does not implicitly {@link google.cloud.resourcemanager.v3.ListEffectiveTagsResponse.verify|verify} messages. + * @param message ListEffectiveTagsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.resourcemanager.v3.IListEffectiveTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEffectiveTagsResponse message, length delimited. Does not implicitly {@link google.cloud.resourcemanager.v3.ListEffectiveTagsResponse.verify|verify} messages. + * @param message ListEffectiveTagsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.resourcemanager.v3.IListEffectiveTagsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEffectiveTagsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEffectiveTagsResponse + * @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.resourcemanager.v3.ListEffectiveTagsResponse; + + /** + * Decodes a ListEffectiveTagsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEffectiveTagsResponse + * @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.resourcemanager.v3.ListEffectiveTagsResponse; + + /** + * Verifies a ListEffectiveTagsResponse 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 ListEffectiveTagsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEffectiveTagsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.resourcemanager.v3.ListEffectiveTagsResponse; + + /** + * Creates a plain object from a ListEffectiveTagsResponse message. Also converts values to other types if specified. + * @param message ListEffectiveTagsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.resourcemanager.v3.ListEffectiveTagsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEffectiveTagsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListEffectiveTagsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EffectiveTag. */ + interface IEffectiveTag { + + /** EffectiveTag tagValue */ + tagValue?: (string|null); + + /** EffectiveTag namespacedTagValue */ + namespacedTagValue?: (string|null); + + /** EffectiveTag tagKey */ + tagKey?: (string|null); + + /** EffectiveTag namespacedTagKey */ + namespacedTagKey?: (string|null); + + /** EffectiveTag tagKeyParentName */ + tagKeyParentName?: (string|null); + + /** EffectiveTag inherited */ + inherited?: (boolean|null); + } + + /** Represents an EffectiveTag. */ + class EffectiveTag implements IEffectiveTag { + + /** + * Constructs a new EffectiveTag. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.resourcemanager.v3.IEffectiveTag); + + /** EffectiveTag tagValue. */ + public tagValue: string; + + /** EffectiveTag namespacedTagValue. */ + public namespacedTagValue: string; + + /** EffectiveTag tagKey. */ + public tagKey: string; + + /** EffectiveTag namespacedTagKey. */ + public namespacedTagKey: string; + + /** EffectiveTag tagKeyParentName. */ + public tagKeyParentName: string; + + /** EffectiveTag inherited. */ + public inherited: boolean; + + /** + * Creates a new EffectiveTag instance using the specified properties. + * @param [properties] Properties to set + * @returns EffectiveTag instance + */ + public static create(properties?: google.cloud.resourcemanager.v3.IEffectiveTag): google.cloud.resourcemanager.v3.EffectiveTag; + + /** + * Encodes the specified EffectiveTag message. Does not implicitly {@link google.cloud.resourcemanager.v3.EffectiveTag.verify|verify} messages. + * @param message EffectiveTag message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.resourcemanager.v3.IEffectiveTag, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EffectiveTag message, length delimited. Does not implicitly {@link google.cloud.resourcemanager.v3.EffectiveTag.verify|verify} messages. + * @param message EffectiveTag message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.resourcemanager.v3.IEffectiveTag, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EffectiveTag message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EffectiveTag + * @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.resourcemanager.v3.EffectiveTag; + + /** + * Decodes an EffectiveTag message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EffectiveTag + * @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.resourcemanager.v3.EffectiveTag; + + /** + * Verifies an EffectiveTag 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 EffectiveTag message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EffectiveTag + */ + public static fromObject(object: { [k: string]: any }): google.cloud.resourcemanager.v3.EffectiveTag; + + /** + * Creates a plain object from an EffectiveTag message. Also converts values to other types if specified. + * @param message EffectiveTag + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.resourcemanager.v3.EffectiveTag, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EffectiveTag to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EffectiveTag + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a TagHolds */ + class TagHolds extends $protobuf.rpc.Service { + + /** + * Constructs a new TagHolds 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 TagHolds 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): TagHolds; + + /** + * Calls CreateTagHold. + * @param request CreateTagHoldRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createTagHold(request: google.cloud.resourcemanager.v3.ICreateTagHoldRequest, callback: google.cloud.resourcemanager.v3.TagHolds.CreateTagHoldCallback): void; + + /** + * Calls CreateTagHold. + * @param request CreateTagHoldRequest message or plain object + * @returns Promise + */ + public createTagHold(request: google.cloud.resourcemanager.v3.ICreateTagHoldRequest): Promise; + + /** + * Calls DeleteTagHold. + * @param request DeleteTagHoldRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteTagHold(request: google.cloud.resourcemanager.v3.IDeleteTagHoldRequest, callback: google.cloud.resourcemanager.v3.TagHolds.DeleteTagHoldCallback): void; + + /** + * Calls DeleteTagHold. + * @param request DeleteTagHoldRequest message or plain object + * @returns Promise + */ + public deleteTagHold(request: google.cloud.resourcemanager.v3.IDeleteTagHoldRequest): Promise; + + /** + * Calls ListTagHolds. + * @param request ListTagHoldsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListTagHoldsResponse + */ + public listTagHolds(request: google.cloud.resourcemanager.v3.IListTagHoldsRequest, callback: google.cloud.resourcemanager.v3.TagHolds.ListTagHoldsCallback): void; + + /** + * Calls ListTagHolds. + * @param request ListTagHoldsRequest message or plain object + * @returns Promise + */ + public listTagHolds(request: google.cloud.resourcemanager.v3.IListTagHoldsRequest): Promise; + } + + namespace TagHolds { + + /** + * Callback as used by {@link google.cloud.resourcemanager.v3.TagHolds|createTagHold}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateTagHoldCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.resourcemanager.v3.TagHolds|deleteTagHold}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteTagHoldCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.resourcemanager.v3.TagHolds|listTagHolds}. + * @param error Error, if any + * @param [response] ListTagHoldsResponse + */ + type ListTagHoldsCallback = (error: (Error|null), response?: google.cloud.resourcemanager.v3.ListTagHoldsResponse) => void; + } + + /** Properties of a TagHold. */ + interface ITagHold { + + /** TagHold name */ + name?: (string|null); + + /** TagHold holder */ + holder?: (string|null); + + /** TagHold origin */ + origin?: (string|null); + + /** TagHold helpLink */ + helpLink?: (string|null); + + /** TagHold createTime */ + createTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a TagHold. */ + class TagHold implements ITagHold { + + /** + * Constructs a new TagHold. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.resourcemanager.v3.ITagHold); + + /** TagHold name. */ + public name: string; + + /** TagHold holder. */ + public holder: string; + + /** TagHold origin. */ + public origin: string; + + /** TagHold helpLink. */ + public helpLink: string; + + /** TagHold createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new TagHold instance using the specified properties. + * @param [properties] Properties to set + * @returns TagHold instance + */ + public static create(properties?: google.cloud.resourcemanager.v3.ITagHold): google.cloud.resourcemanager.v3.TagHold; + + /** + * Encodes the specified TagHold message. Does not implicitly {@link google.cloud.resourcemanager.v3.TagHold.verify|verify} messages. + * @param message TagHold message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.resourcemanager.v3.ITagHold, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TagHold message, length delimited. Does not implicitly {@link google.cloud.resourcemanager.v3.TagHold.verify|verify} messages. + * @param message TagHold message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.resourcemanager.v3.ITagHold, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TagHold message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TagHold + * @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.resourcemanager.v3.TagHold; + + /** + * Decodes a TagHold message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TagHold + * @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.resourcemanager.v3.TagHold; + + /** + * Verifies a TagHold 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 TagHold message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TagHold + */ + public static fromObject(object: { [k: string]: any }): google.cloud.resourcemanager.v3.TagHold; + + /** + * Creates a plain object from a TagHold message. Also converts values to other types if specified. + * @param message TagHold + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.resourcemanager.v3.TagHold, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TagHold to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TagHold + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateTagHoldRequest. */ + interface ICreateTagHoldRequest { + + /** CreateTagHoldRequest parent */ + parent?: (string|null); + + /** CreateTagHoldRequest tagHold */ + tagHold?: (google.cloud.resourcemanager.v3.ITagHold|null); + + /** CreateTagHoldRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateTagHoldRequest. */ + class CreateTagHoldRequest implements ICreateTagHoldRequest { + + /** + * Constructs a new CreateTagHoldRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.resourcemanager.v3.ICreateTagHoldRequest); + + /** CreateTagHoldRequest parent. */ + public parent: string; + + /** CreateTagHoldRequest tagHold. */ + public tagHold?: (google.cloud.resourcemanager.v3.ITagHold|null); + + /** CreateTagHoldRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateTagHoldRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateTagHoldRequest instance + */ + public static create(properties?: google.cloud.resourcemanager.v3.ICreateTagHoldRequest): google.cloud.resourcemanager.v3.CreateTagHoldRequest; + + /** + * Encodes the specified CreateTagHoldRequest message. Does not implicitly {@link google.cloud.resourcemanager.v3.CreateTagHoldRequest.verify|verify} messages. + * @param message CreateTagHoldRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.resourcemanager.v3.ICreateTagHoldRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateTagHoldRequest message, length delimited. Does not implicitly {@link google.cloud.resourcemanager.v3.CreateTagHoldRequest.verify|verify} messages. + * @param message CreateTagHoldRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.resourcemanager.v3.ICreateTagHoldRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateTagHoldRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateTagHoldRequest + * @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.resourcemanager.v3.CreateTagHoldRequest; + + /** + * Decodes a CreateTagHoldRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateTagHoldRequest + * @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.resourcemanager.v3.CreateTagHoldRequest; + + /** + * Verifies a CreateTagHoldRequest 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 CreateTagHoldRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateTagHoldRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.resourcemanager.v3.CreateTagHoldRequest; + + /** + * Creates a plain object from a CreateTagHoldRequest message. Also converts values to other types if specified. + * @param message CreateTagHoldRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.resourcemanager.v3.CreateTagHoldRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateTagHoldRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateTagHoldRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateTagHoldMetadata. */ + interface ICreateTagHoldMetadata { + } + + /** Represents a CreateTagHoldMetadata. */ + class CreateTagHoldMetadata implements ICreateTagHoldMetadata { + + /** + * Constructs a new CreateTagHoldMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.resourcemanager.v3.ICreateTagHoldMetadata); + + /** + * Creates a new CreateTagHoldMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateTagHoldMetadata instance + */ + public static create(properties?: google.cloud.resourcemanager.v3.ICreateTagHoldMetadata): google.cloud.resourcemanager.v3.CreateTagHoldMetadata; + + /** + * Encodes the specified CreateTagHoldMetadata message. Does not implicitly {@link google.cloud.resourcemanager.v3.CreateTagHoldMetadata.verify|verify} messages. + * @param message CreateTagHoldMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.resourcemanager.v3.ICreateTagHoldMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateTagHoldMetadata message, length delimited. Does not implicitly {@link google.cloud.resourcemanager.v3.CreateTagHoldMetadata.verify|verify} messages. + * @param message CreateTagHoldMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.resourcemanager.v3.ICreateTagHoldMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateTagHoldMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateTagHoldMetadata + * @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.resourcemanager.v3.CreateTagHoldMetadata; + + /** + * Decodes a CreateTagHoldMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateTagHoldMetadata + * @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.resourcemanager.v3.CreateTagHoldMetadata; + + /** + * Verifies a CreateTagHoldMetadata 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 CreateTagHoldMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateTagHoldMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.resourcemanager.v3.CreateTagHoldMetadata; + + /** + * Creates a plain object from a CreateTagHoldMetadata message. Also converts values to other types if specified. + * @param message CreateTagHoldMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.resourcemanager.v3.CreateTagHoldMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateTagHoldMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateTagHoldMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteTagHoldRequest. */ + interface IDeleteTagHoldRequest { + + /** DeleteTagHoldRequest name */ + name?: (string|null); + + /** DeleteTagHoldRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a DeleteTagHoldRequest. */ + class DeleteTagHoldRequest implements IDeleteTagHoldRequest { + + /** + * Constructs a new DeleteTagHoldRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.resourcemanager.v3.IDeleteTagHoldRequest); + + /** DeleteTagHoldRequest name. */ + public name: string; + + /** DeleteTagHoldRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new DeleteTagHoldRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteTagHoldRequest instance + */ + public static create(properties?: google.cloud.resourcemanager.v3.IDeleteTagHoldRequest): google.cloud.resourcemanager.v3.DeleteTagHoldRequest; + + /** + * Encodes the specified DeleteTagHoldRequest message. Does not implicitly {@link google.cloud.resourcemanager.v3.DeleteTagHoldRequest.verify|verify} messages. + * @param message DeleteTagHoldRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.resourcemanager.v3.IDeleteTagHoldRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteTagHoldRequest message, length delimited. Does not implicitly {@link google.cloud.resourcemanager.v3.DeleteTagHoldRequest.verify|verify} messages. + * @param message DeleteTagHoldRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.resourcemanager.v3.IDeleteTagHoldRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteTagHoldRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteTagHoldRequest + * @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.resourcemanager.v3.DeleteTagHoldRequest; + + /** + * Decodes a DeleteTagHoldRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteTagHoldRequest + * @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.resourcemanager.v3.DeleteTagHoldRequest; + + /** + * Verifies a DeleteTagHoldRequest 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 DeleteTagHoldRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteTagHoldRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.resourcemanager.v3.DeleteTagHoldRequest; + + /** + * Creates a plain object from a DeleteTagHoldRequest message. Also converts values to other types if specified. + * @param message DeleteTagHoldRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.resourcemanager.v3.DeleteTagHoldRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteTagHoldRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteTagHoldRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteTagHoldMetadata. */ + interface IDeleteTagHoldMetadata { + } + + /** Represents a DeleteTagHoldMetadata. */ + class DeleteTagHoldMetadata implements IDeleteTagHoldMetadata { + + /** + * Constructs a new DeleteTagHoldMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.resourcemanager.v3.IDeleteTagHoldMetadata); + + /** + * Creates a new DeleteTagHoldMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteTagHoldMetadata instance + */ + public static create(properties?: google.cloud.resourcemanager.v3.IDeleteTagHoldMetadata): google.cloud.resourcemanager.v3.DeleteTagHoldMetadata; + + /** + * Encodes the specified DeleteTagHoldMetadata message. Does not implicitly {@link google.cloud.resourcemanager.v3.DeleteTagHoldMetadata.verify|verify} messages. + * @param message DeleteTagHoldMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.resourcemanager.v3.IDeleteTagHoldMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteTagBindingRequest message, length delimited. Does not implicitly {@link google.cloud.resourcemanager.v3.DeleteTagBindingRequest.verify|verify} messages. - * @param message DeleteTagBindingRequest message or plain object to encode + * Encodes the specified DeleteTagHoldMetadata message, length delimited. Does not implicitly {@link google.cloud.resourcemanager.v3.DeleteTagHoldMetadata.verify|verify} messages. + * @param message DeleteTagHoldMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.resourcemanager.v3.IDeleteTagBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.resourcemanager.v3.IDeleteTagHoldMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteTagBindingRequest message from the specified reader or buffer. + * Decodes a DeleteTagHoldMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteTagBindingRequest + * @returns DeleteTagHoldMetadata * @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.resourcemanager.v3.DeleteTagBindingRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.resourcemanager.v3.DeleteTagHoldMetadata; /** - * Decodes a DeleteTagBindingRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteTagHoldMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteTagBindingRequest + * @returns DeleteTagHoldMetadata * @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.resourcemanager.v3.DeleteTagBindingRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.resourcemanager.v3.DeleteTagHoldMetadata; /** - * Verifies a DeleteTagBindingRequest message. + * Verifies a DeleteTagHoldMetadata 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 DeleteTagBindingRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteTagHoldMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteTagBindingRequest + * @returns DeleteTagHoldMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.resourcemanager.v3.DeleteTagBindingRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.resourcemanager.v3.DeleteTagHoldMetadata; /** - * Creates a plain object from a DeleteTagBindingRequest message. Also converts values to other types if specified. - * @param message DeleteTagBindingRequest + * Creates a plain object from a DeleteTagHoldMetadata message. Also converts values to other types if specified. + * @param message DeleteTagHoldMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.resourcemanager.v3.DeleteTagBindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.resourcemanager.v3.DeleteTagHoldMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteTagBindingRequest to JSON. + * Converts this DeleteTagHoldMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteTagBindingRequest + * Gets the default type url for DeleteTagHoldMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListTagBindingsRequest. */ - interface IListTagBindingsRequest { + /** Properties of a ListTagHoldsRequest. */ + interface IListTagHoldsRequest { - /** ListTagBindingsRequest parent */ + /** ListTagHoldsRequest parent */ parent?: (string|null); - /** ListTagBindingsRequest pageSize */ + /** ListTagHoldsRequest pageSize */ pageSize?: (number|null); - /** ListTagBindingsRequest pageToken */ + /** ListTagHoldsRequest pageToken */ pageToken?: (string|null); + + /** ListTagHoldsRequest filter */ + filter?: (string|null); } - /** Represents a ListTagBindingsRequest. */ - class ListTagBindingsRequest implements IListTagBindingsRequest { + /** Represents a ListTagHoldsRequest. */ + class ListTagHoldsRequest implements IListTagHoldsRequest { /** - * Constructs a new ListTagBindingsRequest. + * Constructs a new ListTagHoldsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.resourcemanager.v3.IListTagBindingsRequest); + constructor(properties?: google.cloud.resourcemanager.v3.IListTagHoldsRequest); - /** ListTagBindingsRequest parent. */ + /** ListTagHoldsRequest parent. */ public parent: string; - /** ListTagBindingsRequest pageSize. */ + /** ListTagHoldsRequest pageSize. */ public pageSize: number; - /** ListTagBindingsRequest pageToken. */ + /** ListTagHoldsRequest pageToken. */ public pageToken: string; + /** ListTagHoldsRequest filter. */ + public filter: string; + /** - * Creates a new ListTagBindingsRequest instance using the specified properties. + * Creates a new ListTagHoldsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListTagBindingsRequest instance + * @returns ListTagHoldsRequest instance */ - public static create(properties?: google.cloud.resourcemanager.v3.IListTagBindingsRequest): google.cloud.resourcemanager.v3.ListTagBindingsRequest; + public static create(properties?: google.cloud.resourcemanager.v3.IListTagHoldsRequest): google.cloud.resourcemanager.v3.ListTagHoldsRequest; /** - * Encodes the specified ListTagBindingsRequest message. Does not implicitly {@link google.cloud.resourcemanager.v3.ListTagBindingsRequest.verify|verify} messages. - * @param message ListTagBindingsRequest message or plain object to encode + * Encodes the specified ListTagHoldsRequest message. Does not implicitly {@link google.cloud.resourcemanager.v3.ListTagHoldsRequest.verify|verify} messages. + * @param message ListTagHoldsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.resourcemanager.v3.IListTagBindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.resourcemanager.v3.IListTagHoldsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListTagBindingsRequest message, length delimited. Does not implicitly {@link google.cloud.resourcemanager.v3.ListTagBindingsRequest.verify|verify} messages. - * @param message ListTagBindingsRequest message or plain object to encode + * Encodes the specified ListTagHoldsRequest message, length delimited. Does not implicitly {@link google.cloud.resourcemanager.v3.ListTagHoldsRequest.verify|verify} messages. + * @param message ListTagHoldsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.resourcemanager.v3.IListTagBindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.resourcemanager.v3.IListTagHoldsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListTagBindingsRequest message from the specified reader or buffer. + * Decodes a ListTagHoldsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListTagBindingsRequest + * @returns ListTagHoldsRequest * @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.resourcemanager.v3.ListTagBindingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.resourcemanager.v3.ListTagHoldsRequest; /** - * Decodes a ListTagBindingsRequest message from the specified reader or buffer, length delimited. + * Decodes a ListTagHoldsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListTagBindingsRequest + * @returns ListTagHoldsRequest * @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.resourcemanager.v3.ListTagBindingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.resourcemanager.v3.ListTagHoldsRequest; /** - * Verifies a ListTagBindingsRequest message. + * Verifies a ListTagHoldsRequest 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 ListTagBindingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListTagHoldsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListTagBindingsRequest + * @returns ListTagHoldsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.resourcemanager.v3.ListTagBindingsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.resourcemanager.v3.ListTagHoldsRequest; /** - * Creates a plain object from a ListTagBindingsRequest message. Also converts values to other types if specified. - * @param message ListTagBindingsRequest + * Creates a plain object from a ListTagHoldsRequest message. Also converts values to other types if specified. + * @param message ListTagHoldsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.resourcemanager.v3.ListTagBindingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.resourcemanager.v3.ListTagHoldsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListTagBindingsRequest to JSON. + * Converts this ListTagHoldsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListTagBindingsRequest + * Gets the default type url for ListTagHoldsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListTagBindingsResponse. */ - interface IListTagBindingsResponse { + /** Properties of a ListTagHoldsResponse. */ + interface IListTagHoldsResponse { - /** ListTagBindingsResponse tagBindings */ - tagBindings?: (google.cloud.resourcemanager.v3.ITagBinding[]|null); + /** ListTagHoldsResponse tagHolds */ + tagHolds?: (google.cloud.resourcemanager.v3.ITagHold[]|null); - /** ListTagBindingsResponse nextPageToken */ + /** ListTagHoldsResponse nextPageToken */ nextPageToken?: (string|null); } - /** Represents a ListTagBindingsResponse. */ - class ListTagBindingsResponse implements IListTagBindingsResponse { + /** Represents a ListTagHoldsResponse. */ + class ListTagHoldsResponse implements IListTagHoldsResponse { /** - * Constructs a new ListTagBindingsResponse. + * Constructs a new ListTagHoldsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.resourcemanager.v3.IListTagBindingsResponse); + constructor(properties?: google.cloud.resourcemanager.v3.IListTagHoldsResponse); - /** ListTagBindingsResponse tagBindings. */ - public tagBindings: google.cloud.resourcemanager.v3.ITagBinding[]; + /** ListTagHoldsResponse tagHolds. */ + public tagHolds: google.cloud.resourcemanager.v3.ITagHold[]; - /** ListTagBindingsResponse nextPageToken. */ + /** ListTagHoldsResponse nextPageToken. */ public nextPageToken: string; /** - * Creates a new ListTagBindingsResponse instance using the specified properties. + * Creates a new ListTagHoldsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListTagBindingsResponse instance + * @returns ListTagHoldsResponse instance */ - public static create(properties?: google.cloud.resourcemanager.v3.IListTagBindingsResponse): google.cloud.resourcemanager.v3.ListTagBindingsResponse; + public static create(properties?: google.cloud.resourcemanager.v3.IListTagHoldsResponse): google.cloud.resourcemanager.v3.ListTagHoldsResponse; /** - * Encodes the specified ListTagBindingsResponse message. Does not implicitly {@link google.cloud.resourcemanager.v3.ListTagBindingsResponse.verify|verify} messages. - * @param message ListTagBindingsResponse message or plain object to encode + * Encodes the specified ListTagHoldsResponse message. Does not implicitly {@link google.cloud.resourcemanager.v3.ListTagHoldsResponse.verify|verify} messages. + * @param message ListTagHoldsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.resourcemanager.v3.IListTagBindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.resourcemanager.v3.IListTagHoldsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListTagBindingsResponse message, length delimited. Does not implicitly {@link google.cloud.resourcemanager.v3.ListTagBindingsResponse.verify|verify} messages. - * @param message ListTagBindingsResponse message or plain object to encode + * Encodes the specified ListTagHoldsResponse message, length delimited. Does not implicitly {@link google.cloud.resourcemanager.v3.ListTagHoldsResponse.verify|verify} messages. + * @param message ListTagHoldsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.resourcemanager.v3.IListTagBindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.resourcemanager.v3.IListTagHoldsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListTagBindingsResponse message from the specified reader or buffer. + * Decodes a ListTagHoldsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListTagBindingsResponse + * @returns ListTagHoldsResponse * @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.resourcemanager.v3.ListTagBindingsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.resourcemanager.v3.ListTagHoldsResponse; /** - * Decodes a ListTagBindingsResponse message from the specified reader or buffer, length delimited. + * Decodes a ListTagHoldsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListTagBindingsResponse + * @returns ListTagHoldsResponse * @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.resourcemanager.v3.ListTagBindingsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.resourcemanager.v3.ListTagHoldsResponse; /** - * Verifies a ListTagBindingsResponse message. + * Verifies a ListTagHoldsResponse 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 ListTagBindingsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListTagHoldsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListTagBindingsResponse + * @returns ListTagHoldsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.resourcemanager.v3.ListTagBindingsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.resourcemanager.v3.ListTagHoldsResponse; /** - * Creates a plain object from a ListTagBindingsResponse message. Also converts values to other types if specified. - * @param message ListTagBindingsResponse + * Creates a plain object from a ListTagHoldsResponse message. Also converts values to other types if specified. + * @param message ListTagHoldsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.resourcemanager.v3.ListTagBindingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.resourcemanager.v3.ListTagHoldsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListTagBindingsResponse to JSON. + * Converts this ListTagHoldsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListTagBindingsResponse + * Gets the default type url for ListTagHoldsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -5462,6 +6648,20 @@ export namespace google { */ public getTagKey(request: google.cloud.resourcemanager.v3.IGetTagKeyRequest): Promise; + /** + * Calls GetNamespacedTagKey. + * @param request GetNamespacedTagKeyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TagKey + */ + public getNamespacedTagKey(request: google.cloud.resourcemanager.v3.IGetNamespacedTagKeyRequest, callback: google.cloud.resourcemanager.v3.TagKeys.GetNamespacedTagKeyCallback): void; + + /** + * Calls GetNamespacedTagKey. + * @param request GetNamespacedTagKeyRequest message or plain object + * @returns Promise + */ + public getNamespacedTagKey(request: google.cloud.resourcemanager.v3.IGetNamespacedTagKeyRequest): Promise; + /** * Calls CreateTagKey. * @param request CreateTagKeyRequest message or plain object @@ -5563,6 +6763,13 @@ export namespace google { */ type GetTagKeyCallback = (error: (Error|null), response?: google.cloud.resourcemanager.v3.TagKey) => void; + /** + * Callback as used by {@link google.cloud.resourcemanager.v3.TagKeys|getNamespacedTagKey}. + * @param error Error, if any + * @param [response] TagKey + */ + type GetNamespacedTagKeyCallback = (error: (Error|null), response?: google.cloud.resourcemanager.v3.TagKey) => void; + /** * Callback as used by {@link google.cloud.resourcemanager.v3.TagKeys|createTagKey}. * @param error Error, if any @@ -5632,6 +6839,12 @@ export namespace google { /** TagKey etag */ etag?: (string|null); + + /** TagKey purpose */ + purpose?: (google.cloud.resourcemanager.v3.Purpose|keyof typeof google.cloud.resourcemanager.v3.Purpose|null); + + /** TagKey purposeData */ + purposeData?: ({ [k: string]: string }|null); } /** Represents a TagKey. */ @@ -5667,6 +6880,12 @@ export namespace google { /** TagKey etag. */ public etag: string; + /** TagKey purpose. */ + public purpose: (google.cloud.resourcemanager.v3.Purpose|keyof typeof google.cloud.resourcemanager.v3.Purpose); + + /** TagKey purposeData. */ + public purposeData: { [k: string]: string }; + /** * Creates a new TagKey instance using the specified properties. * @param [properties] Properties to set @@ -6054,6 +7273,103 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a GetNamespacedTagKeyRequest. */ + interface IGetNamespacedTagKeyRequest { + + /** GetNamespacedTagKeyRequest name */ + name?: (string|null); + } + + /** Represents a GetNamespacedTagKeyRequest. */ + class GetNamespacedTagKeyRequest implements IGetNamespacedTagKeyRequest { + + /** + * Constructs a new GetNamespacedTagKeyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.resourcemanager.v3.IGetNamespacedTagKeyRequest); + + /** GetNamespacedTagKeyRequest name. */ + public name: string; + + /** + * Creates a new GetNamespacedTagKeyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetNamespacedTagKeyRequest instance + */ + public static create(properties?: google.cloud.resourcemanager.v3.IGetNamespacedTagKeyRequest): google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest; + + /** + * Encodes the specified GetNamespacedTagKeyRequest message. Does not implicitly {@link google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest.verify|verify} messages. + * @param message GetNamespacedTagKeyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.resourcemanager.v3.IGetNamespacedTagKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetNamespacedTagKeyRequest message, length delimited. Does not implicitly {@link google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest.verify|verify} messages. + * @param message GetNamespacedTagKeyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.resourcemanager.v3.IGetNamespacedTagKeyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetNamespacedTagKeyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetNamespacedTagKeyRequest + * @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.resourcemanager.v3.GetNamespacedTagKeyRequest; + + /** + * Decodes a GetNamespacedTagKeyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetNamespacedTagKeyRequest + * @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.resourcemanager.v3.GetNamespacedTagKeyRequest; + + /** + * Verifies a GetNamespacedTagKeyRequest 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 GetNamespacedTagKeyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetNamespacedTagKeyRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest; + + /** + * Creates a plain object from a GetNamespacedTagKeyRequest message. Also converts values to other types if specified. + * @param message GetNamespacedTagKeyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetNamespacedTagKeyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetNamespacedTagKeyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a CreateTagKeyRequest. */ interface ICreateTagKeyRequest { @@ -6648,6 +7964,12 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Purpose enum. */ + enum Purpose { + PURPOSE_UNSPECIFIED = 0, + GCE_FIREWALL = 1 + } + /** Represents a TagValues */ class TagValues extends $protobuf.rpc.Service { @@ -6696,6 +8018,20 @@ export namespace google { */ public getTagValue(request: google.cloud.resourcemanager.v3.IGetTagValueRequest): Promise; + /** + * Calls GetNamespacedTagValue. + * @param request GetNamespacedTagValueRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TagValue + */ + public getNamespacedTagValue(request: google.cloud.resourcemanager.v3.IGetNamespacedTagValueRequest, callback: google.cloud.resourcemanager.v3.TagValues.GetNamespacedTagValueCallback): void; + + /** + * Calls GetNamespacedTagValue. + * @param request GetNamespacedTagValueRequest message or plain object + * @returns Promise + */ + public getNamespacedTagValue(request: google.cloud.resourcemanager.v3.IGetNamespacedTagValueRequest): Promise; + /** * Calls CreateTagValue. * @param request CreateTagValueRequest message or plain object @@ -6797,6 +8133,13 @@ export namespace google { */ type GetTagValueCallback = (error: (Error|null), response?: google.cloud.resourcemanager.v3.TagValue) => void; + /** + * Callback as used by {@link google.cloud.resourcemanager.v3.TagValues|getNamespacedTagValue}. + * @param error Error, if any + * @param [response] TagValue + */ + type GetNamespacedTagValueCallback = (error: (Error|null), response?: google.cloud.resourcemanager.v3.TagValue) => void; + /** * Callback as used by {@link google.cloud.resourcemanager.v3.TagValues|createTagValue}. * @param error Error, if any @@ -7288,6 +8631,103 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a GetNamespacedTagValueRequest. */ + interface IGetNamespacedTagValueRequest { + + /** GetNamespacedTagValueRequest name */ + name?: (string|null); + } + + /** Represents a GetNamespacedTagValueRequest. */ + class GetNamespacedTagValueRequest implements IGetNamespacedTagValueRequest { + + /** + * Constructs a new GetNamespacedTagValueRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.resourcemanager.v3.IGetNamespacedTagValueRequest); + + /** GetNamespacedTagValueRequest name. */ + public name: string; + + /** + * Creates a new GetNamespacedTagValueRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetNamespacedTagValueRequest instance + */ + public static create(properties?: google.cloud.resourcemanager.v3.IGetNamespacedTagValueRequest): google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest; + + /** + * Encodes the specified GetNamespacedTagValueRequest message. Does not implicitly {@link google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest.verify|verify} messages. + * @param message GetNamespacedTagValueRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.resourcemanager.v3.IGetNamespacedTagValueRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetNamespacedTagValueRequest message, length delimited. Does not implicitly {@link google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest.verify|verify} messages. + * @param message GetNamespacedTagValueRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.resourcemanager.v3.IGetNamespacedTagValueRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetNamespacedTagValueRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetNamespacedTagValueRequest + * @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.resourcemanager.v3.GetNamespacedTagValueRequest; + + /** + * Decodes a GetNamespacedTagValueRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetNamespacedTagValueRequest + * @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.resourcemanager.v3.GetNamespacedTagValueRequest; + + /** + * Verifies a GetNamespacedTagValueRequest 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 GetNamespacedTagValueRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetNamespacedTagValueRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest; + + /** + * Creates a plain object from a GetNamespacedTagValueRequest message. Also converts values to other types if specified. + * @param message GetNamespacedTagValueRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetNamespacedTagValueRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetNamespacedTagValueRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a CreateTagValueRequest. */ interface ICreateTagValueRequest { diff --git a/packages/google-cloud-resourcemanager/protos/protos.js b/packages/google-cloud-resourcemanager/protos/protos.js index 400f0879504..3f7dc8b47d6 100644 --- a/packages/google-cloud-resourcemanager/protos/protos.js +++ b/packages/google-cloud-resourcemanager/protos/protos.js @@ -10162,6 +10162,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.resourcemanager.v3.TagBindings|listEffectiveTags}. + * @memberof google.cloud.resourcemanager.v3.TagBindings + * @typedef ListEffectiveTagsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.resourcemanager.v3.ListEffectiveTagsResponse} [response] ListEffectiveTagsResponse + */ + + /** + * Calls ListEffectiveTags. + * @function listEffectiveTags + * @memberof google.cloud.resourcemanager.v3.TagBindings + * @instance + * @param {google.cloud.resourcemanager.v3.IListEffectiveTagsRequest} request ListEffectiveTagsRequest message or plain object + * @param {google.cloud.resourcemanager.v3.TagBindings.ListEffectiveTagsCallback} callback Node-style callback called with the error, if any, and ListEffectiveTagsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TagBindings.prototype.listEffectiveTags = function listEffectiveTags(request, callback) { + return this.rpcCall(listEffectiveTags, $root.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest, $root.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse, request, callback); + }, "name", { value: "ListEffectiveTags" }); + + /** + * Calls ListEffectiveTags. + * @function listEffectiveTags + * @memberof google.cloud.resourcemanager.v3.TagBindings + * @instance + * @param {google.cloud.resourcemanager.v3.IListEffectiveTagsRequest} request ListEffectiveTagsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return TagBindings; })(); @@ -10174,6 +10207,7 @@ * @property {string|null} [name] TagBinding name * @property {string|null} [parent] TagBinding parent * @property {string|null} [tagValue] TagBinding tagValue + * @property {string|null} [tagValueNamespacedName] TagBinding tagValueNamespacedName */ /** @@ -10215,6 +10249,14 @@ */ TagBinding.prototype.tagValue = ""; + /** + * TagBinding tagValueNamespacedName. + * @member {string} tagValueNamespacedName + * @memberof google.cloud.resourcemanager.v3.TagBinding + * @instance + */ + TagBinding.prototype.tagValueNamespacedName = ""; + /** * Creates a new TagBinding instance using the specified properties. * @function create @@ -10245,6 +10287,8 @@ writer.uint32(/* id 2, wireType 2 =*/18).string(message.parent); if (message.tagValue != null && Object.hasOwnProperty.call(message, "tagValue")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.tagValue); + if (message.tagValueNamespacedName != null && Object.hasOwnProperty.call(message, "tagValueNamespacedName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.tagValueNamespacedName); return writer; }; @@ -10291,6 +10335,10 @@ message.tagValue = reader.string(); break; } + case 4: { + message.tagValueNamespacedName = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -10335,6 +10383,9 @@ if (message.tagValue != null && message.hasOwnProperty("tagValue")) if (!$util.isString(message.tagValue)) return "tagValue: string expected"; + if (message.tagValueNamespacedName != null && message.hasOwnProperty("tagValueNamespacedName")) + if (!$util.isString(message.tagValueNamespacedName)) + return "tagValueNamespacedName: string expected"; return null; }; @@ -10356,6 +10407,8 @@ message.parent = String(object.parent); if (object.tagValue != null) message.tagValue = String(object.tagValue); + if (object.tagValueNamespacedName != null) + message.tagValueNamespacedName = String(object.tagValueNamespacedName); return message; }; @@ -10376,6 +10429,7 @@ object.name = ""; object.parent = ""; object.tagValue = ""; + object.tagValueNamespacedName = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -10383,6 +10437,8 @@ object.parent = message.parent; if (message.tagValue != null && message.hasOwnProperty("tagValue")) object.tagValue = message.tagValue; + if (message.tagValueNamespacedName != null && message.hasOwnProperty("tagValueNamespacedName")) + object.tagValueNamespacedName = message.tagValueNamespacedName; return object; }; @@ -11698,153 +11754,2791 @@ return ListTagBindingsResponse; })(); - v3.TagKeys = (function() { + v3.ListEffectiveTagsRequest = (function() { /** - * Constructs a new TagKeys service. + * Properties of a ListEffectiveTagsRequest. * @memberof google.cloud.resourcemanager.v3 - * @classdesc Represents a TagKeys - * @extends $protobuf.rpc.Service + * @interface IListEffectiveTagsRequest + * @property {string|null} [parent] ListEffectiveTagsRequest parent + * @property {number|null} [pageSize] ListEffectiveTagsRequest pageSize + * @property {string|null} [pageToken] ListEffectiveTagsRequest pageToken + */ + + /** + * Constructs a new ListEffectiveTagsRequest. + * @memberof google.cloud.resourcemanager.v3 + * @classdesc Represents a ListEffectiveTagsRequest. + * @implements IListEffectiveTagsRequest * @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 + * @param {google.cloud.resourcemanager.v3.IListEffectiveTagsRequest=} [properties] Properties to set */ - function TagKeys(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + function ListEffectiveTagsRequest(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]]; } - (TagKeys.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = TagKeys; - /** - * Creates new TagKeys service using the specified rpc implementation. - * @function create - * @memberof google.cloud.resourcemanager.v3.TagKeys - * @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 {TagKeys} RPC service. Useful where requests and/or responses are streamed. + * ListEffectiveTagsRequest parent. + * @member {string} parent + * @memberof google.cloud.resourcemanager.v3.ListEffectiveTagsRequest + * @instance */ - TagKeys.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + ListEffectiveTagsRequest.prototype.parent = ""; /** - * Callback as used by {@link google.cloud.resourcemanager.v3.TagKeys|listTagKeys}. - * @memberof google.cloud.resourcemanager.v3.TagKeys - * @typedef ListTagKeysCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.resourcemanager.v3.ListTagKeysResponse} [response] ListTagKeysResponse + * ListEffectiveTagsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.resourcemanager.v3.ListEffectiveTagsRequest + * @instance */ + ListEffectiveTagsRequest.prototype.pageSize = 0; /** - * Calls ListTagKeys. - * @function listTagKeys - * @memberof google.cloud.resourcemanager.v3.TagKeys + * ListEffectiveTagsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.resourcemanager.v3.ListEffectiveTagsRequest * @instance - * @param {google.cloud.resourcemanager.v3.IListTagKeysRequest} request ListTagKeysRequest message or plain object - * @param {google.cloud.resourcemanager.v3.TagKeys.ListTagKeysCallback} callback Node-style callback called with the error, if any, and ListTagKeysResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(TagKeys.prototype.listTagKeys = function listTagKeys(request, callback) { - return this.rpcCall(listTagKeys, $root.google.cloud.resourcemanager.v3.ListTagKeysRequest, $root.google.cloud.resourcemanager.v3.ListTagKeysResponse, request, callback); - }, "name", { value: "ListTagKeys" }); + ListEffectiveTagsRequest.prototype.pageToken = ""; /** - * Calls ListTagKeys. - * @function listTagKeys - * @memberof google.cloud.resourcemanager.v3.TagKeys - * @instance - * @param {google.cloud.resourcemanager.v3.IListTagKeysRequest} request ListTagKeysRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new ListEffectiveTagsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.resourcemanager.v3.ListEffectiveTagsRequest + * @static + * @param {google.cloud.resourcemanager.v3.IListEffectiveTagsRequest=} [properties] Properties to set + * @returns {google.cloud.resourcemanager.v3.ListEffectiveTagsRequest} ListEffectiveTagsRequest instance */ + ListEffectiveTagsRequest.create = function create(properties) { + return new ListEffectiveTagsRequest(properties); + }; /** - * Callback as used by {@link google.cloud.resourcemanager.v3.TagKeys|getTagKey}. - * @memberof google.cloud.resourcemanager.v3.TagKeys - * @typedef GetTagKeyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.resourcemanager.v3.TagKey} [response] TagKey + * Encodes the specified ListEffectiveTagsRequest message. Does not implicitly {@link google.cloud.resourcemanager.v3.ListEffectiveTagsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.resourcemanager.v3.ListEffectiveTagsRequest + * @static + * @param {google.cloud.resourcemanager.v3.IListEffectiveTagsRequest} message ListEffectiveTagsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + ListEffectiveTagsRequest.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); + return writer; + }; /** - * Calls GetTagKey. - * @function getTagKey - * @memberof google.cloud.resourcemanager.v3.TagKeys - * @instance - * @param {google.cloud.resourcemanager.v3.IGetTagKeyRequest} request GetTagKeyRequest message or plain object - * @param {google.cloud.resourcemanager.v3.TagKeys.GetTagKeyCallback} callback Node-style callback called with the error, if any, and TagKey - * @returns {undefined} - * @variation 1 + * Encodes the specified ListEffectiveTagsRequest message, length delimited. Does not implicitly {@link google.cloud.resourcemanager.v3.ListEffectiveTagsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.resourcemanager.v3.ListEffectiveTagsRequest + * @static + * @param {google.cloud.resourcemanager.v3.IListEffectiveTagsRequest} message ListEffectiveTagsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(TagKeys.prototype.getTagKey = function getTagKey(request, callback) { - return this.rpcCall(getTagKey, $root.google.cloud.resourcemanager.v3.GetTagKeyRequest, $root.google.cloud.resourcemanager.v3.TagKey, request, callback); - }, "name", { value: "GetTagKey" }); + ListEffectiveTagsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls GetTagKey. - * @function getTagKey - * @memberof google.cloud.resourcemanager.v3.TagKeys - * @instance - * @param {google.cloud.resourcemanager.v3.IGetTagKeyRequest} request GetTagKeyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a ListEffectiveTagsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.resourcemanager.v3.ListEffectiveTagsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.resourcemanager.v3.ListEffectiveTagsRequest} ListEffectiveTagsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ListEffectiveTagsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.resourcemanager.v3.TagKeys|createTagKey}. - * @memberof google.cloud.resourcemanager.v3.TagKeys - * @typedef CreateTagKeyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Decodes a ListEffectiveTagsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.resourcemanager.v3.ListEffectiveTagsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.resourcemanager.v3.ListEffectiveTagsRequest} ListEffectiveTagsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + ListEffectiveTagsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls CreateTagKey. - * @function createTagKey - * @memberof google.cloud.resourcemanager.v3.TagKeys - * @instance - * @param {google.cloud.resourcemanager.v3.ICreateTagKeyRequest} request CreateTagKeyRequest message or plain object - * @param {google.cloud.resourcemanager.v3.TagKeys.CreateTagKeyCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Verifies a ListEffectiveTagsRequest message. + * @function verify + * @memberof google.cloud.resourcemanager.v3.ListEffectiveTagsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(TagKeys.prototype.createTagKey = function createTagKey(request, callback) { - return this.rpcCall(createTagKey, $root.google.cloud.resourcemanager.v3.CreateTagKeyRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateTagKey" }); + ListEffectiveTagsRequest.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"; + return null; + }; /** - * Calls CreateTagKey. - * @function createTagKey - * @memberof google.cloud.resourcemanager.v3.TagKeys - * @instance - * @param {google.cloud.resourcemanager.v3.ICreateTagKeyRequest} request CreateTagKeyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a ListEffectiveTagsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.resourcemanager.v3.ListEffectiveTagsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.resourcemanager.v3.ListEffectiveTagsRequest} ListEffectiveTagsRequest */ + ListEffectiveTagsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest) + return object; + var message = new $root.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest(); + 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); + return message; + }; /** - * Callback as used by {@link google.cloud.resourcemanager.v3.TagKeys|updateTagKey}. - * @memberof google.cloud.resourcemanager.v3.TagKeys - * @typedef UpdateTagKeyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates a plain object from a ListEffectiveTagsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.resourcemanager.v3.ListEffectiveTagsRequest + * @static + * @param {google.cloud.resourcemanager.v3.ListEffectiveTagsRequest} message ListEffectiveTagsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + ListEffectiveTagsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + 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; + return object; + }; /** - * Calls UpdateTagKey. - * @function updateTagKey - * @memberof google.cloud.resourcemanager.v3.TagKeys + * Converts this ListEffectiveTagsRequest to JSON. + * @function toJSON + * @memberof google.cloud.resourcemanager.v3.ListEffectiveTagsRequest * @instance - * @param {google.cloud.resourcemanager.v3.IUpdateTagKeyRequest} request UpdateTagKeyRequest message or plain object - * @param {google.cloud.resourcemanager.v3.TagKeys.UpdateTagKeyCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {Object.} JSON object + */ + ListEffectiveTagsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListEffectiveTagsRequest + * @function getTypeUrl + * @memberof google.cloud.resourcemanager.v3.ListEffectiveTagsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListEffectiveTagsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.resourcemanager.v3.ListEffectiveTagsRequest"; + }; + + return ListEffectiveTagsRequest; + })(); + + v3.ListEffectiveTagsResponse = (function() { + + /** + * Properties of a ListEffectiveTagsResponse. + * @memberof google.cloud.resourcemanager.v3 + * @interface IListEffectiveTagsResponse + * @property {Array.|null} [effectiveTags] ListEffectiveTagsResponse effectiveTags + * @property {string|null} [nextPageToken] ListEffectiveTagsResponse nextPageToken + */ + + /** + * Constructs a new ListEffectiveTagsResponse. + * @memberof google.cloud.resourcemanager.v3 + * @classdesc Represents a ListEffectiveTagsResponse. + * @implements IListEffectiveTagsResponse + * @constructor + * @param {google.cloud.resourcemanager.v3.IListEffectiveTagsResponse=} [properties] Properties to set + */ + function ListEffectiveTagsResponse(properties) { + this.effectiveTags = []; + 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]]; + } + + /** + * ListEffectiveTagsResponse effectiveTags. + * @member {Array.} effectiveTags + * @memberof google.cloud.resourcemanager.v3.ListEffectiveTagsResponse + * @instance + */ + ListEffectiveTagsResponse.prototype.effectiveTags = $util.emptyArray; + + /** + * ListEffectiveTagsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.resourcemanager.v3.ListEffectiveTagsResponse + * @instance + */ + ListEffectiveTagsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListEffectiveTagsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.resourcemanager.v3.ListEffectiveTagsResponse + * @static + * @param {google.cloud.resourcemanager.v3.IListEffectiveTagsResponse=} [properties] Properties to set + * @returns {google.cloud.resourcemanager.v3.ListEffectiveTagsResponse} ListEffectiveTagsResponse instance + */ + ListEffectiveTagsResponse.create = function create(properties) { + return new ListEffectiveTagsResponse(properties); + }; + + /** + * Encodes the specified ListEffectiveTagsResponse message. Does not implicitly {@link google.cloud.resourcemanager.v3.ListEffectiveTagsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.resourcemanager.v3.ListEffectiveTagsResponse + * @static + * @param {google.cloud.resourcemanager.v3.IListEffectiveTagsResponse} message ListEffectiveTagsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEffectiveTagsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.effectiveTags != null && message.effectiveTags.length) + for (var i = 0; i < message.effectiveTags.length; ++i) + $root.google.cloud.resourcemanager.v3.EffectiveTag.encode(message.effectiveTags[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 ListEffectiveTagsResponse message, length delimited. Does not implicitly {@link google.cloud.resourcemanager.v3.ListEffectiveTagsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.resourcemanager.v3.ListEffectiveTagsResponse + * @static + * @param {google.cloud.resourcemanager.v3.IListEffectiveTagsResponse} message ListEffectiveTagsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEffectiveTagsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEffectiveTagsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.resourcemanager.v3.ListEffectiveTagsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.resourcemanager.v3.ListEffectiveTagsResponse} ListEffectiveTagsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEffectiveTagsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.effectiveTags && message.effectiveTags.length)) + message.effectiveTags = []; + message.effectiveTags.push($root.google.cloud.resourcemanager.v3.EffectiveTag.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListEffectiveTagsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.resourcemanager.v3.ListEffectiveTagsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.resourcemanager.v3.ListEffectiveTagsResponse} ListEffectiveTagsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEffectiveTagsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListEffectiveTagsResponse message. + * @function verify + * @memberof google.cloud.resourcemanager.v3.ListEffectiveTagsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEffectiveTagsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.effectiveTags != null && message.hasOwnProperty("effectiveTags")) { + if (!Array.isArray(message.effectiveTags)) + return "effectiveTags: array expected"; + for (var i = 0; i < message.effectiveTags.length; ++i) { + var error = $root.google.cloud.resourcemanager.v3.EffectiveTag.verify(message.effectiveTags[i]); + if (error) + return "effectiveTags." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListEffectiveTagsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.resourcemanager.v3.ListEffectiveTagsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.resourcemanager.v3.ListEffectiveTagsResponse} ListEffectiveTagsResponse + */ + ListEffectiveTagsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse) + return object; + var message = new $root.google.cloud.resourcemanager.v3.ListEffectiveTagsResponse(); + if (object.effectiveTags) { + if (!Array.isArray(object.effectiveTags)) + throw TypeError(".google.cloud.resourcemanager.v3.ListEffectiveTagsResponse.effectiveTags: array expected"); + message.effectiveTags = []; + for (var i = 0; i < object.effectiveTags.length; ++i) { + if (typeof object.effectiveTags[i] !== "object") + throw TypeError(".google.cloud.resourcemanager.v3.ListEffectiveTagsResponse.effectiveTags: object expected"); + message.effectiveTags[i] = $root.google.cloud.resourcemanager.v3.EffectiveTag.fromObject(object.effectiveTags[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListEffectiveTagsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.resourcemanager.v3.ListEffectiveTagsResponse + * @static + * @param {google.cloud.resourcemanager.v3.ListEffectiveTagsResponse} message ListEffectiveTagsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEffectiveTagsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.effectiveTags = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.effectiveTags && message.effectiveTags.length) { + object.effectiveTags = []; + for (var j = 0; j < message.effectiveTags.length; ++j) + object.effectiveTags[j] = $root.google.cloud.resourcemanager.v3.EffectiveTag.toObject(message.effectiveTags[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListEffectiveTagsResponse to JSON. + * @function toJSON + * @memberof google.cloud.resourcemanager.v3.ListEffectiveTagsResponse + * @instance + * @returns {Object.} JSON object + */ + ListEffectiveTagsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListEffectiveTagsResponse + * @function getTypeUrl + * @memberof google.cloud.resourcemanager.v3.ListEffectiveTagsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListEffectiveTagsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.resourcemanager.v3.ListEffectiveTagsResponse"; + }; + + return ListEffectiveTagsResponse; + })(); + + v3.EffectiveTag = (function() { + + /** + * Properties of an EffectiveTag. + * @memberof google.cloud.resourcemanager.v3 + * @interface IEffectiveTag + * @property {string|null} [tagValue] EffectiveTag tagValue + * @property {string|null} [namespacedTagValue] EffectiveTag namespacedTagValue + * @property {string|null} [tagKey] EffectiveTag tagKey + * @property {string|null} [namespacedTagKey] EffectiveTag namespacedTagKey + * @property {string|null} [tagKeyParentName] EffectiveTag tagKeyParentName + * @property {boolean|null} [inherited] EffectiveTag inherited + */ + + /** + * Constructs a new EffectiveTag. + * @memberof google.cloud.resourcemanager.v3 + * @classdesc Represents an EffectiveTag. + * @implements IEffectiveTag + * @constructor + * @param {google.cloud.resourcemanager.v3.IEffectiveTag=} [properties] Properties to set + */ + function EffectiveTag(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]]; + } + + /** + * EffectiveTag tagValue. + * @member {string} tagValue + * @memberof google.cloud.resourcemanager.v3.EffectiveTag + * @instance + */ + EffectiveTag.prototype.tagValue = ""; + + /** + * EffectiveTag namespacedTagValue. + * @member {string} namespacedTagValue + * @memberof google.cloud.resourcemanager.v3.EffectiveTag + * @instance + */ + EffectiveTag.prototype.namespacedTagValue = ""; + + /** + * EffectiveTag tagKey. + * @member {string} tagKey + * @memberof google.cloud.resourcemanager.v3.EffectiveTag + * @instance + */ + EffectiveTag.prototype.tagKey = ""; + + /** + * EffectiveTag namespacedTagKey. + * @member {string} namespacedTagKey + * @memberof google.cloud.resourcemanager.v3.EffectiveTag + * @instance + */ + EffectiveTag.prototype.namespacedTagKey = ""; + + /** + * EffectiveTag tagKeyParentName. + * @member {string} tagKeyParentName + * @memberof google.cloud.resourcemanager.v3.EffectiveTag + * @instance + */ + EffectiveTag.prototype.tagKeyParentName = ""; + + /** + * EffectiveTag inherited. + * @member {boolean} inherited + * @memberof google.cloud.resourcemanager.v3.EffectiveTag + * @instance + */ + EffectiveTag.prototype.inherited = false; + + /** + * Creates a new EffectiveTag instance using the specified properties. + * @function create + * @memberof google.cloud.resourcemanager.v3.EffectiveTag + * @static + * @param {google.cloud.resourcemanager.v3.IEffectiveTag=} [properties] Properties to set + * @returns {google.cloud.resourcemanager.v3.EffectiveTag} EffectiveTag instance + */ + EffectiveTag.create = function create(properties) { + return new EffectiveTag(properties); + }; + + /** + * Encodes the specified EffectiveTag message. Does not implicitly {@link google.cloud.resourcemanager.v3.EffectiveTag.verify|verify} messages. + * @function encode + * @memberof google.cloud.resourcemanager.v3.EffectiveTag + * @static + * @param {google.cloud.resourcemanager.v3.IEffectiveTag} message EffectiveTag message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EffectiveTag.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tagValue != null && Object.hasOwnProperty.call(message, "tagValue")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.tagValue); + if (message.namespacedTagValue != null && Object.hasOwnProperty.call(message, "namespacedTagValue")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.namespacedTagValue); + if (message.tagKey != null && Object.hasOwnProperty.call(message, "tagKey")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tagKey); + if (message.namespacedTagKey != null && Object.hasOwnProperty.call(message, "namespacedTagKey")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.namespacedTagKey); + if (message.inherited != null && Object.hasOwnProperty.call(message, "inherited")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.inherited); + if (message.tagKeyParentName != null && Object.hasOwnProperty.call(message, "tagKeyParentName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.tagKeyParentName); + return writer; + }; + + /** + * Encodes the specified EffectiveTag message, length delimited. Does not implicitly {@link google.cloud.resourcemanager.v3.EffectiveTag.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.resourcemanager.v3.EffectiveTag + * @static + * @param {google.cloud.resourcemanager.v3.IEffectiveTag} message EffectiveTag message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EffectiveTag.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EffectiveTag message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.resourcemanager.v3.EffectiveTag + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.resourcemanager.v3.EffectiveTag} EffectiveTag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EffectiveTag.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.resourcemanager.v3.EffectiveTag(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tagValue = reader.string(); + break; + } + case 2: { + message.namespacedTagValue = reader.string(); + break; + } + case 3: { + message.tagKey = reader.string(); + break; + } + case 4: { + message.namespacedTagKey = reader.string(); + break; + } + case 6: { + message.tagKeyParentName = reader.string(); + break; + } + case 5: { + message.inherited = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EffectiveTag message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.resourcemanager.v3.EffectiveTag + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.resourcemanager.v3.EffectiveTag} EffectiveTag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EffectiveTag.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EffectiveTag message. + * @function verify + * @memberof google.cloud.resourcemanager.v3.EffectiveTag + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EffectiveTag.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tagValue != null && message.hasOwnProperty("tagValue")) + if (!$util.isString(message.tagValue)) + return "tagValue: string expected"; + if (message.namespacedTagValue != null && message.hasOwnProperty("namespacedTagValue")) + if (!$util.isString(message.namespacedTagValue)) + return "namespacedTagValue: string expected"; + if (message.tagKey != null && message.hasOwnProperty("tagKey")) + if (!$util.isString(message.tagKey)) + return "tagKey: string expected"; + if (message.namespacedTagKey != null && message.hasOwnProperty("namespacedTagKey")) + if (!$util.isString(message.namespacedTagKey)) + return "namespacedTagKey: string expected"; + if (message.tagKeyParentName != null && message.hasOwnProperty("tagKeyParentName")) + if (!$util.isString(message.tagKeyParentName)) + return "tagKeyParentName: string expected"; + if (message.inherited != null && message.hasOwnProperty("inherited")) + if (typeof message.inherited !== "boolean") + return "inherited: boolean expected"; + return null; + }; + + /** + * Creates an EffectiveTag message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.resourcemanager.v3.EffectiveTag + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.resourcemanager.v3.EffectiveTag} EffectiveTag + */ + EffectiveTag.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.resourcemanager.v3.EffectiveTag) + return object; + var message = new $root.google.cloud.resourcemanager.v3.EffectiveTag(); + if (object.tagValue != null) + message.tagValue = String(object.tagValue); + if (object.namespacedTagValue != null) + message.namespacedTagValue = String(object.namespacedTagValue); + if (object.tagKey != null) + message.tagKey = String(object.tagKey); + if (object.namespacedTagKey != null) + message.namespacedTagKey = String(object.namespacedTagKey); + if (object.tagKeyParentName != null) + message.tagKeyParentName = String(object.tagKeyParentName); + if (object.inherited != null) + message.inherited = Boolean(object.inherited); + return message; + }; + + /** + * Creates a plain object from an EffectiveTag message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.resourcemanager.v3.EffectiveTag + * @static + * @param {google.cloud.resourcemanager.v3.EffectiveTag} message EffectiveTag + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EffectiveTag.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.tagValue = ""; + object.namespacedTagValue = ""; + object.tagKey = ""; + object.namespacedTagKey = ""; + object.inherited = false; + object.tagKeyParentName = ""; + } + if (message.tagValue != null && message.hasOwnProperty("tagValue")) + object.tagValue = message.tagValue; + if (message.namespacedTagValue != null && message.hasOwnProperty("namespacedTagValue")) + object.namespacedTagValue = message.namespacedTagValue; + if (message.tagKey != null && message.hasOwnProperty("tagKey")) + object.tagKey = message.tagKey; + if (message.namespacedTagKey != null && message.hasOwnProperty("namespacedTagKey")) + object.namespacedTagKey = message.namespacedTagKey; + if (message.inherited != null && message.hasOwnProperty("inherited")) + object.inherited = message.inherited; + if (message.tagKeyParentName != null && message.hasOwnProperty("tagKeyParentName")) + object.tagKeyParentName = message.tagKeyParentName; + return object; + }; + + /** + * Converts this EffectiveTag to JSON. + * @function toJSON + * @memberof google.cloud.resourcemanager.v3.EffectiveTag + * @instance + * @returns {Object.} JSON object + */ + EffectiveTag.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EffectiveTag + * @function getTypeUrl + * @memberof google.cloud.resourcemanager.v3.EffectiveTag + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EffectiveTag.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.resourcemanager.v3.EffectiveTag"; + }; + + return EffectiveTag; + })(); + + v3.TagHolds = (function() { + + /** + * Constructs a new TagHolds service. + * @memberof google.cloud.resourcemanager.v3 + * @classdesc Represents a TagHolds + * @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 TagHolds(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (TagHolds.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = TagHolds; + + /** + * Creates new TagHolds service using the specified rpc implementation. + * @function create + * @memberof google.cloud.resourcemanager.v3.TagHolds + * @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 {TagHolds} RPC service. Useful where requests and/or responses are streamed. + */ + TagHolds.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.resourcemanager.v3.TagHolds|createTagHold}. + * @memberof google.cloud.resourcemanager.v3.TagHolds + * @typedef CreateTagHoldCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateTagHold. + * @function createTagHold + * @memberof google.cloud.resourcemanager.v3.TagHolds + * @instance + * @param {google.cloud.resourcemanager.v3.ICreateTagHoldRequest} request CreateTagHoldRequest message or plain object + * @param {google.cloud.resourcemanager.v3.TagHolds.CreateTagHoldCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TagHolds.prototype.createTagHold = function createTagHold(request, callback) { + return this.rpcCall(createTagHold, $root.google.cloud.resourcemanager.v3.CreateTagHoldRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateTagHold" }); + + /** + * Calls CreateTagHold. + * @function createTagHold + * @memberof google.cloud.resourcemanager.v3.TagHolds + * @instance + * @param {google.cloud.resourcemanager.v3.ICreateTagHoldRequest} request CreateTagHoldRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.resourcemanager.v3.TagHolds|deleteTagHold}. + * @memberof google.cloud.resourcemanager.v3.TagHolds + * @typedef DeleteTagHoldCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteTagHold. + * @function deleteTagHold + * @memberof google.cloud.resourcemanager.v3.TagHolds + * @instance + * @param {google.cloud.resourcemanager.v3.IDeleteTagHoldRequest} request DeleteTagHoldRequest message or plain object + * @param {google.cloud.resourcemanager.v3.TagHolds.DeleteTagHoldCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TagHolds.prototype.deleteTagHold = function deleteTagHold(request, callback) { + return this.rpcCall(deleteTagHold, $root.google.cloud.resourcemanager.v3.DeleteTagHoldRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteTagHold" }); + + /** + * Calls DeleteTagHold. + * @function deleteTagHold + * @memberof google.cloud.resourcemanager.v3.TagHolds + * @instance + * @param {google.cloud.resourcemanager.v3.IDeleteTagHoldRequest} request DeleteTagHoldRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.resourcemanager.v3.TagHolds|listTagHolds}. + * @memberof google.cloud.resourcemanager.v3.TagHolds + * @typedef ListTagHoldsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.resourcemanager.v3.ListTagHoldsResponse} [response] ListTagHoldsResponse + */ + + /** + * Calls ListTagHolds. + * @function listTagHolds + * @memberof google.cloud.resourcemanager.v3.TagHolds + * @instance + * @param {google.cloud.resourcemanager.v3.IListTagHoldsRequest} request ListTagHoldsRequest message or plain object + * @param {google.cloud.resourcemanager.v3.TagHolds.ListTagHoldsCallback} callback Node-style callback called with the error, if any, and ListTagHoldsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TagHolds.prototype.listTagHolds = function listTagHolds(request, callback) { + return this.rpcCall(listTagHolds, $root.google.cloud.resourcemanager.v3.ListTagHoldsRequest, $root.google.cloud.resourcemanager.v3.ListTagHoldsResponse, request, callback); + }, "name", { value: "ListTagHolds" }); + + /** + * Calls ListTagHolds. + * @function listTagHolds + * @memberof google.cloud.resourcemanager.v3.TagHolds + * @instance + * @param {google.cloud.resourcemanager.v3.IListTagHoldsRequest} request ListTagHoldsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return TagHolds; + })(); + + v3.TagHold = (function() { + + /** + * Properties of a TagHold. + * @memberof google.cloud.resourcemanager.v3 + * @interface ITagHold + * @property {string|null} [name] TagHold name + * @property {string|null} [holder] TagHold holder + * @property {string|null} [origin] TagHold origin + * @property {string|null} [helpLink] TagHold helpLink + * @property {google.protobuf.ITimestamp|null} [createTime] TagHold createTime + */ + + /** + * Constructs a new TagHold. + * @memberof google.cloud.resourcemanager.v3 + * @classdesc Represents a TagHold. + * @implements ITagHold + * @constructor + * @param {google.cloud.resourcemanager.v3.ITagHold=} [properties] Properties to set + */ + function TagHold(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]]; + } + + /** + * TagHold name. + * @member {string} name + * @memberof google.cloud.resourcemanager.v3.TagHold + * @instance + */ + TagHold.prototype.name = ""; + + /** + * TagHold holder. + * @member {string} holder + * @memberof google.cloud.resourcemanager.v3.TagHold + * @instance + */ + TagHold.prototype.holder = ""; + + /** + * TagHold origin. + * @member {string} origin + * @memberof google.cloud.resourcemanager.v3.TagHold + * @instance + */ + TagHold.prototype.origin = ""; + + /** + * TagHold helpLink. + * @member {string} helpLink + * @memberof google.cloud.resourcemanager.v3.TagHold + * @instance + */ + TagHold.prototype.helpLink = ""; + + /** + * TagHold createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.resourcemanager.v3.TagHold + * @instance + */ + TagHold.prototype.createTime = null; + + /** + * Creates a new TagHold instance using the specified properties. + * @function create + * @memberof google.cloud.resourcemanager.v3.TagHold + * @static + * @param {google.cloud.resourcemanager.v3.ITagHold=} [properties] Properties to set + * @returns {google.cloud.resourcemanager.v3.TagHold} TagHold instance + */ + TagHold.create = function create(properties) { + return new TagHold(properties); + }; + + /** + * Encodes the specified TagHold message. Does not implicitly {@link google.cloud.resourcemanager.v3.TagHold.verify|verify} messages. + * @function encode + * @memberof google.cloud.resourcemanager.v3.TagHold + * @static + * @param {google.cloud.resourcemanager.v3.ITagHold} message TagHold message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TagHold.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.holder != null && Object.hasOwnProperty.call(message, "holder")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.holder); + if (message.origin != null && Object.hasOwnProperty.call(message, "origin")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.origin); + if (message.helpLink != null && Object.hasOwnProperty.call(message, "helpLink")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.helpLink); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TagHold message, length delimited. Does not implicitly {@link google.cloud.resourcemanager.v3.TagHold.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.resourcemanager.v3.TagHold + * @static + * @param {google.cloud.resourcemanager.v3.ITagHold} message TagHold message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TagHold.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TagHold message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.resourcemanager.v3.TagHold + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.resourcemanager.v3.TagHold} TagHold + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TagHold.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.resourcemanager.v3.TagHold(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.holder = reader.string(); + break; + } + case 3: { + message.origin = reader.string(); + break; + } + case 4: { + message.helpLink = reader.string(); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TagHold message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.resourcemanager.v3.TagHold + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.resourcemanager.v3.TagHold} TagHold + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TagHold.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TagHold message. + * @function verify + * @memberof google.cloud.resourcemanager.v3.TagHold + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TagHold.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.holder != null && message.hasOwnProperty("holder")) + if (!$util.isString(message.holder)) + return "holder: string expected"; + if (message.origin != null && message.hasOwnProperty("origin")) + if (!$util.isString(message.origin)) + return "origin: string expected"; + if (message.helpLink != null && message.hasOwnProperty("helpLink")) + if (!$util.isString(message.helpLink)) + return "helpLink: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + return null; + }; + + /** + * Creates a TagHold message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.resourcemanager.v3.TagHold + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.resourcemanager.v3.TagHold} TagHold + */ + TagHold.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.resourcemanager.v3.TagHold) + return object; + var message = new $root.google.cloud.resourcemanager.v3.TagHold(); + if (object.name != null) + message.name = String(object.name); + if (object.holder != null) + message.holder = String(object.holder); + if (object.origin != null) + message.origin = String(object.origin); + if (object.helpLink != null) + message.helpLink = String(object.helpLink); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.resourcemanager.v3.TagHold.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + return message; + }; + + /** + * Creates a plain object from a TagHold message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.resourcemanager.v3.TagHold + * @static + * @param {google.cloud.resourcemanager.v3.TagHold} message TagHold + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TagHold.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.holder = ""; + object.origin = ""; + object.helpLink = ""; + object.createTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.holder != null && message.hasOwnProperty("holder")) + object.holder = message.holder; + if (message.origin != null && message.hasOwnProperty("origin")) + object.origin = message.origin; + if (message.helpLink != null && message.hasOwnProperty("helpLink")) + object.helpLink = message.helpLink; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + return object; + }; + + /** + * Converts this TagHold to JSON. + * @function toJSON + * @memberof google.cloud.resourcemanager.v3.TagHold + * @instance + * @returns {Object.} JSON object + */ + TagHold.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TagHold + * @function getTypeUrl + * @memberof google.cloud.resourcemanager.v3.TagHold + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TagHold.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.resourcemanager.v3.TagHold"; + }; + + return TagHold; + })(); + + v3.CreateTagHoldRequest = (function() { + + /** + * Properties of a CreateTagHoldRequest. + * @memberof google.cloud.resourcemanager.v3 + * @interface ICreateTagHoldRequest + * @property {string|null} [parent] CreateTagHoldRequest parent + * @property {google.cloud.resourcemanager.v3.ITagHold|null} [tagHold] CreateTagHoldRequest tagHold + * @property {boolean|null} [validateOnly] CreateTagHoldRequest validateOnly + */ + + /** + * Constructs a new CreateTagHoldRequest. + * @memberof google.cloud.resourcemanager.v3 + * @classdesc Represents a CreateTagHoldRequest. + * @implements ICreateTagHoldRequest + * @constructor + * @param {google.cloud.resourcemanager.v3.ICreateTagHoldRequest=} [properties] Properties to set + */ + function CreateTagHoldRequest(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]]; + } + + /** + * CreateTagHoldRequest parent. + * @member {string} parent + * @memberof google.cloud.resourcemanager.v3.CreateTagHoldRequest + * @instance + */ + CreateTagHoldRequest.prototype.parent = ""; + + /** + * CreateTagHoldRequest tagHold. + * @member {google.cloud.resourcemanager.v3.ITagHold|null|undefined} tagHold + * @memberof google.cloud.resourcemanager.v3.CreateTagHoldRequest + * @instance + */ + CreateTagHoldRequest.prototype.tagHold = null; + + /** + * CreateTagHoldRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.resourcemanager.v3.CreateTagHoldRequest + * @instance + */ + CreateTagHoldRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateTagHoldRequest instance using the specified properties. + * @function create + * @memberof google.cloud.resourcemanager.v3.CreateTagHoldRequest + * @static + * @param {google.cloud.resourcemanager.v3.ICreateTagHoldRequest=} [properties] Properties to set + * @returns {google.cloud.resourcemanager.v3.CreateTagHoldRequest} CreateTagHoldRequest instance + */ + CreateTagHoldRequest.create = function create(properties) { + return new CreateTagHoldRequest(properties); + }; + + /** + * Encodes the specified CreateTagHoldRequest message. Does not implicitly {@link google.cloud.resourcemanager.v3.CreateTagHoldRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.resourcemanager.v3.CreateTagHoldRequest + * @static + * @param {google.cloud.resourcemanager.v3.ICreateTagHoldRequest} message CreateTagHoldRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTagHoldRequest.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.tagHold != null && Object.hasOwnProperty.call(message, "tagHold")) + $root.google.cloud.resourcemanager.v3.TagHold.encode(message.tagHold, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateTagHoldRequest message, length delimited. Does not implicitly {@link google.cloud.resourcemanager.v3.CreateTagHoldRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.resourcemanager.v3.CreateTagHoldRequest + * @static + * @param {google.cloud.resourcemanager.v3.ICreateTagHoldRequest} message CreateTagHoldRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTagHoldRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateTagHoldRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.resourcemanager.v3.CreateTagHoldRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.resourcemanager.v3.CreateTagHoldRequest} CreateTagHoldRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTagHoldRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.resourcemanager.v3.CreateTagHoldRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.tagHold = $root.google.cloud.resourcemanager.v3.TagHold.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateTagHoldRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.resourcemanager.v3.CreateTagHoldRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.resourcemanager.v3.CreateTagHoldRequest} CreateTagHoldRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTagHoldRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateTagHoldRequest message. + * @function verify + * @memberof google.cloud.resourcemanager.v3.CreateTagHoldRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateTagHoldRequest.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.tagHold != null && message.hasOwnProperty("tagHold")) { + var error = $root.google.cloud.resourcemanager.v3.TagHold.verify(message.tagHold); + if (error) + return "tagHold." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateTagHoldRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.resourcemanager.v3.CreateTagHoldRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.resourcemanager.v3.CreateTagHoldRequest} CreateTagHoldRequest + */ + CreateTagHoldRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.resourcemanager.v3.CreateTagHoldRequest) + return object; + var message = new $root.google.cloud.resourcemanager.v3.CreateTagHoldRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.tagHold != null) { + if (typeof object.tagHold !== "object") + throw TypeError(".google.cloud.resourcemanager.v3.CreateTagHoldRequest.tagHold: object expected"); + message.tagHold = $root.google.cloud.resourcemanager.v3.TagHold.fromObject(object.tagHold); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateTagHoldRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.resourcemanager.v3.CreateTagHoldRequest + * @static + * @param {google.cloud.resourcemanager.v3.CreateTagHoldRequest} message CreateTagHoldRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateTagHoldRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.tagHold = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.tagHold != null && message.hasOwnProperty("tagHold")) + object.tagHold = $root.google.cloud.resourcemanager.v3.TagHold.toObject(message.tagHold, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateTagHoldRequest to JSON. + * @function toJSON + * @memberof google.cloud.resourcemanager.v3.CreateTagHoldRequest + * @instance + * @returns {Object.} JSON object + */ + CreateTagHoldRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateTagHoldRequest + * @function getTypeUrl + * @memberof google.cloud.resourcemanager.v3.CreateTagHoldRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateTagHoldRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.resourcemanager.v3.CreateTagHoldRequest"; + }; + + return CreateTagHoldRequest; + })(); + + v3.CreateTagHoldMetadata = (function() { + + /** + * Properties of a CreateTagHoldMetadata. + * @memberof google.cloud.resourcemanager.v3 + * @interface ICreateTagHoldMetadata + */ + + /** + * Constructs a new CreateTagHoldMetadata. + * @memberof google.cloud.resourcemanager.v3 + * @classdesc Represents a CreateTagHoldMetadata. + * @implements ICreateTagHoldMetadata + * @constructor + * @param {google.cloud.resourcemanager.v3.ICreateTagHoldMetadata=} [properties] Properties to set + */ + function CreateTagHoldMetadata(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]]; + } + + /** + * Creates a new CreateTagHoldMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.resourcemanager.v3.CreateTagHoldMetadata + * @static + * @param {google.cloud.resourcemanager.v3.ICreateTagHoldMetadata=} [properties] Properties to set + * @returns {google.cloud.resourcemanager.v3.CreateTagHoldMetadata} CreateTagHoldMetadata instance + */ + CreateTagHoldMetadata.create = function create(properties) { + return new CreateTagHoldMetadata(properties); + }; + + /** + * Encodes the specified CreateTagHoldMetadata message. Does not implicitly {@link google.cloud.resourcemanager.v3.CreateTagHoldMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.resourcemanager.v3.CreateTagHoldMetadata + * @static + * @param {google.cloud.resourcemanager.v3.ICreateTagHoldMetadata} message CreateTagHoldMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTagHoldMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified CreateTagHoldMetadata message, length delimited. Does not implicitly {@link google.cloud.resourcemanager.v3.CreateTagHoldMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.resourcemanager.v3.CreateTagHoldMetadata + * @static + * @param {google.cloud.resourcemanager.v3.ICreateTagHoldMetadata} message CreateTagHoldMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateTagHoldMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateTagHoldMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.resourcemanager.v3.CreateTagHoldMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.resourcemanager.v3.CreateTagHoldMetadata} CreateTagHoldMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTagHoldMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.resourcemanager.v3.CreateTagHoldMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateTagHoldMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.resourcemanager.v3.CreateTagHoldMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.resourcemanager.v3.CreateTagHoldMetadata} CreateTagHoldMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateTagHoldMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateTagHoldMetadata message. + * @function verify + * @memberof google.cloud.resourcemanager.v3.CreateTagHoldMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateTagHoldMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a CreateTagHoldMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.resourcemanager.v3.CreateTagHoldMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.resourcemanager.v3.CreateTagHoldMetadata} CreateTagHoldMetadata + */ + CreateTagHoldMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.resourcemanager.v3.CreateTagHoldMetadata) + return object; + return new $root.google.cloud.resourcemanager.v3.CreateTagHoldMetadata(); + }; + + /** + * Creates a plain object from a CreateTagHoldMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.resourcemanager.v3.CreateTagHoldMetadata + * @static + * @param {google.cloud.resourcemanager.v3.CreateTagHoldMetadata} message CreateTagHoldMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateTagHoldMetadata.toObject = function toObject() { + return {}; + }; + + /** + * Converts this CreateTagHoldMetadata to JSON. + * @function toJSON + * @memberof google.cloud.resourcemanager.v3.CreateTagHoldMetadata + * @instance + * @returns {Object.} JSON object + */ + CreateTagHoldMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateTagHoldMetadata + * @function getTypeUrl + * @memberof google.cloud.resourcemanager.v3.CreateTagHoldMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateTagHoldMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.resourcemanager.v3.CreateTagHoldMetadata"; + }; + + return CreateTagHoldMetadata; + })(); + + v3.DeleteTagHoldRequest = (function() { + + /** + * Properties of a DeleteTagHoldRequest. + * @memberof google.cloud.resourcemanager.v3 + * @interface IDeleteTagHoldRequest + * @property {string|null} [name] DeleteTagHoldRequest name + * @property {boolean|null} [validateOnly] DeleteTagHoldRequest validateOnly + */ + + /** + * Constructs a new DeleteTagHoldRequest. + * @memberof google.cloud.resourcemanager.v3 + * @classdesc Represents a DeleteTagHoldRequest. + * @implements IDeleteTagHoldRequest + * @constructor + * @param {google.cloud.resourcemanager.v3.IDeleteTagHoldRequest=} [properties] Properties to set + */ + function DeleteTagHoldRequest(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]]; + } + + /** + * DeleteTagHoldRequest name. + * @member {string} name + * @memberof google.cloud.resourcemanager.v3.DeleteTagHoldRequest + * @instance + */ + DeleteTagHoldRequest.prototype.name = ""; + + /** + * DeleteTagHoldRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.resourcemanager.v3.DeleteTagHoldRequest + * @instance + */ + DeleteTagHoldRequest.prototype.validateOnly = false; + + /** + * Creates a new DeleteTagHoldRequest instance using the specified properties. + * @function create + * @memberof google.cloud.resourcemanager.v3.DeleteTagHoldRequest + * @static + * @param {google.cloud.resourcemanager.v3.IDeleteTagHoldRequest=} [properties] Properties to set + * @returns {google.cloud.resourcemanager.v3.DeleteTagHoldRequest} DeleteTagHoldRequest instance + */ + DeleteTagHoldRequest.create = function create(properties) { + return new DeleteTagHoldRequest(properties); + }; + + /** + * Encodes the specified DeleteTagHoldRequest message. Does not implicitly {@link google.cloud.resourcemanager.v3.DeleteTagHoldRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.resourcemanager.v3.DeleteTagHoldRequest + * @static + * @param {google.cloud.resourcemanager.v3.IDeleteTagHoldRequest} message DeleteTagHoldRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteTagHoldRequest.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.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified DeleteTagHoldRequest message, length delimited. Does not implicitly {@link google.cloud.resourcemanager.v3.DeleteTagHoldRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.resourcemanager.v3.DeleteTagHoldRequest + * @static + * @param {google.cloud.resourcemanager.v3.IDeleteTagHoldRequest} message DeleteTagHoldRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteTagHoldRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteTagHoldRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.resourcemanager.v3.DeleteTagHoldRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.resourcemanager.v3.DeleteTagHoldRequest} DeleteTagHoldRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteTagHoldRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.resourcemanager.v3.DeleteTagHoldRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteTagHoldRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.resourcemanager.v3.DeleteTagHoldRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.resourcemanager.v3.DeleteTagHoldRequest} DeleteTagHoldRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteTagHoldRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteTagHoldRequest message. + * @function verify + * @memberof google.cloud.resourcemanager.v3.DeleteTagHoldRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteTagHoldRequest.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.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a DeleteTagHoldRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.resourcemanager.v3.DeleteTagHoldRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.resourcemanager.v3.DeleteTagHoldRequest} DeleteTagHoldRequest + */ + DeleteTagHoldRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.resourcemanager.v3.DeleteTagHoldRequest) + return object; + var message = new $root.google.cloud.resourcemanager.v3.DeleteTagHoldRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a DeleteTagHoldRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.resourcemanager.v3.DeleteTagHoldRequest + * @static + * @param {google.cloud.resourcemanager.v3.DeleteTagHoldRequest} message DeleteTagHoldRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteTagHoldRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.validateOnly = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this DeleteTagHoldRequest to JSON. + * @function toJSON + * @memberof google.cloud.resourcemanager.v3.DeleteTagHoldRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteTagHoldRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteTagHoldRequest + * @function getTypeUrl + * @memberof google.cloud.resourcemanager.v3.DeleteTagHoldRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteTagHoldRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.resourcemanager.v3.DeleteTagHoldRequest"; + }; + + return DeleteTagHoldRequest; + })(); + + v3.DeleteTagHoldMetadata = (function() { + + /** + * Properties of a DeleteTagHoldMetadata. + * @memberof google.cloud.resourcemanager.v3 + * @interface IDeleteTagHoldMetadata + */ + + /** + * Constructs a new DeleteTagHoldMetadata. + * @memberof google.cloud.resourcemanager.v3 + * @classdesc Represents a DeleteTagHoldMetadata. + * @implements IDeleteTagHoldMetadata + * @constructor + * @param {google.cloud.resourcemanager.v3.IDeleteTagHoldMetadata=} [properties] Properties to set + */ + function DeleteTagHoldMetadata(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]]; + } + + /** + * Creates a new DeleteTagHoldMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.resourcemanager.v3.DeleteTagHoldMetadata + * @static + * @param {google.cloud.resourcemanager.v3.IDeleteTagHoldMetadata=} [properties] Properties to set + * @returns {google.cloud.resourcemanager.v3.DeleteTagHoldMetadata} DeleteTagHoldMetadata instance + */ + DeleteTagHoldMetadata.create = function create(properties) { + return new DeleteTagHoldMetadata(properties); + }; + + /** + * Encodes the specified DeleteTagHoldMetadata message. Does not implicitly {@link google.cloud.resourcemanager.v3.DeleteTagHoldMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.resourcemanager.v3.DeleteTagHoldMetadata + * @static + * @param {google.cloud.resourcemanager.v3.IDeleteTagHoldMetadata} message DeleteTagHoldMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteTagHoldMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified DeleteTagHoldMetadata message, length delimited. Does not implicitly {@link google.cloud.resourcemanager.v3.DeleteTagHoldMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.resourcemanager.v3.DeleteTagHoldMetadata + * @static + * @param {google.cloud.resourcemanager.v3.IDeleteTagHoldMetadata} message DeleteTagHoldMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteTagHoldMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteTagHoldMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.resourcemanager.v3.DeleteTagHoldMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.resourcemanager.v3.DeleteTagHoldMetadata} DeleteTagHoldMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteTagHoldMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteTagHoldMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.resourcemanager.v3.DeleteTagHoldMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.resourcemanager.v3.DeleteTagHoldMetadata} DeleteTagHoldMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteTagHoldMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteTagHoldMetadata message. + * @function verify + * @memberof google.cloud.resourcemanager.v3.DeleteTagHoldMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteTagHoldMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a DeleteTagHoldMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.resourcemanager.v3.DeleteTagHoldMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.resourcemanager.v3.DeleteTagHoldMetadata} DeleteTagHoldMetadata + */ + DeleteTagHoldMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata) + return object; + return new $root.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata(); + }; + + /** + * Creates a plain object from a DeleteTagHoldMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.resourcemanager.v3.DeleteTagHoldMetadata + * @static + * @param {google.cloud.resourcemanager.v3.DeleteTagHoldMetadata} message DeleteTagHoldMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteTagHoldMetadata.toObject = function toObject() { + return {}; + }; + + /** + * Converts this DeleteTagHoldMetadata to JSON. + * @function toJSON + * @memberof google.cloud.resourcemanager.v3.DeleteTagHoldMetadata + * @instance + * @returns {Object.} JSON object + */ + DeleteTagHoldMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteTagHoldMetadata + * @function getTypeUrl + * @memberof google.cloud.resourcemanager.v3.DeleteTagHoldMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteTagHoldMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.resourcemanager.v3.DeleteTagHoldMetadata"; + }; + + return DeleteTagHoldMetadata; + })(); + + v3.ListTagHoldsRequest = (function() { + + /** + * Properties of a ListTagHoldsRequest. + * @memberof google.cloud.resourcemanager.v3 + * @interface IListTagHoldsRequest + * @property {string|null} [parent] ListTagHoldsRequest parent + * @property {number|null} [pageSize] ListTagHoldsRequest pageSize + * @property {string|null} [pageToken] ListTagHoldsRequest pageToken + * @property {string|null} [filter] ListTagHoldsRequest filter + */ + + /** + * Constructs a new ListTagHoldsRequest. + * @memberof google.cloud.resourcemanager.v3 + * @classdesc Represents a ListTagHoldsRequest. + * @implements IListTagHoldsRequest + * @constructor + * @param {google.cloud.resourcemanager.v3.IListTagHoldsRequest=} [properties] Properties to set + */ + function ListTagHoldsRequest(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]]; + } + + /** + * ListTagHoldsRequest parent. + * @member {string} parent + * @memberof google.cloud.resourcemanager.v3.ListTagHoldsRequest + * @instance + */ + ListTagHoldsRequest.prototype.parent = ""; + + /** + * ListTagHoldsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.resourcemanager.v3.ListTagHoldsRequest + * @instance + */ + ListTagHoldsRequest.prototype.pageSize = 0; + + /** + * ListTagHoldsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.resourcemanager.v3.ListTagHoldsRequest + * @instance + */ + ListTagHoldsRequest.prototype.pageToken = ""; + + /** + * ListTagHoldsRequest filter. + * @member {string} filter + * @memberof google.cloud.resourcemanager.v3.ListTagHoldsRequest + * @instance + */ + ListTagHoldsRequest.prototype.filter = ""; + + /** + * Creates a new ListTagHoldsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.resourcemanager.v3.ListTagHoldsRequest + * @static + * @param {google.cloud.resourcemanager.v3.IListTagHoldsRequest=} [properties] Properties to set + * @returns {google.cloud.resourcemanager.v3.ListTagHoldsRequest} ListTagHoldsRequest instance + */ + ListTagHoldsRequest.create = function create(properties) { + return new ListTagHoldsRequest(properties); + }; + + /** + * Encodes the specified ListTagHoldsRequest message. Does not implicitly {@link google.cloud.resourcemanager.v3.ListTagHoldsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.resourcemanager.v3.ListTagHoldsRequest + * @static + * @param {google.cloud.resourcemanager.v3.IListTagHoldsRequest} message ListTagHoldsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTagHoldsRequest.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.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListTagHoldsRequest message, length delimited. Does not implicitly {@link google.cloud.resourcemanager.v3.ListTagHoldsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.resourcemanager.v3.ListTagHoldsRequest + * @static + * @param {google.cloud.resourcemanager.v3.IListTagHoldsRequest} message ListTagHoldsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTagHoldsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTagHoldsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.resourcemanager.v3.ListTagHoldsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.resourcemanager.v3.ListTagHoldsRequest} ListTagHoldsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTagHoldsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.resourcemanager.v3.ListTagHoldsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListTagHoldsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.resourcemanager.v3.ListTagHoldsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.resourcemanager.v3.ListTagHoldsRequest} ListTagHoldsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTagHoldsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTagHoldsRequest message. + * @function verify + * @memberof google.cloud.resourcemanager.v3.ListTagHoldsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTagHoldsRequest.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.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListTagHoldsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.resourcemanager.v3.ListTagHoldsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.resourcemanager.v3.ListTagHoldsRequest} ListTagHoldsRequest + */ + ListTagHoldsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.resourcemanager.v3.ListTagHoldsRequest) + return object; + var message = new $root.google.cloud.resourcemanager.v3.ListTagHoldsRequest(); + 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.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListTagHoldsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.resourcemanager.v3.ListTagHoldsRequest + * @static + * @param {google.cloud.resourcemanager.v3.ListTagHoldsRequest} message ListTagHoldsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTagHoldsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + 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.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListTagHoldsRequest to JSON. + * @function toJSON + * @memberof google.cloud.resourcemanager.v3.ListTagHoldsRequest + * @instance + * @returns {Object.} JSON object + */ + ListTagHoldsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListTagHoldsRequest + * @function getTypeUrl + * @memberof google.cloud.resourcemanager.v3.ListTagHoldsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListTagHoldsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.resourcemanager.v3.ListTagHoldsRequest"; + }; + + return ListTagHoldsRequest; + })(); + + v3.ListTagHoldsResponse = (function() { + + /** + * Properties of a ListTagHoldsResponse. + * @memberof google.cloud.resourcemanager.v3 + * @interface IListTagHoldsResponse + * @property {Array.|null} [tagHolds] ListTagHoldsResponse tagHolds + * @property {string|null} [nextPageToken] ListTagHoldsResponse nextPageToken + */ + + /** + * Constructs a new ListTagHoldsResponse. + * @memberof google.cloud.resourcemanager.v3 + * @classdesc Represents a ListTagHoldsResponse. + * @implements IListTagHoldsResponse + * @constructor + * @param {google.cloud.resourcemanager.v3.IListTagHoldsResponse=} [properties] Properties to set + */ + function ListTagHoldsResponse(properties) { + this.tagHolds = []; + 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]]; + } + + /** + * ListTagHoldsResponse tagHolds. + * @member {Array.} tagHolds + * @memberof google.cloud.resourcemanager.v3.ListTagHoldsResponse + * @instance + */ + ListTagHoldsResponse.prototype.tagHolds = $util.emptyArray; + + /** + * ListTagHoldsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.resourcemanager.v3.ListTagHoldsResponse + * @instance + */ + ListTagHoldsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListTagHoldsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.resourcemanager.v3.ListTagHoldsResponse + * @static + * @param {google.cloud.resourcemanager.v3.IListTagHoldsResponse=} [properties] Properties to set + * @returns {google.cloud.resourcemanager.v3.ListTagHoldsResponse} ListTagHoldsResponse instance + */ + ListTagHoldsResponse.create = function create(properties) { + return new ListTagHoldsResponse(properties); + }; + + /** + * Encodes the specified ListTagHoldsResponse message. Does not implicitly {@link google.cloud.resourcemanager.v3.ListTagHoldsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.resourcemanager.v3.ListTagHoldsResponse + * @static + * @param {google.cloud.resourcemanager.v3.IListTagHoldsResponse} message ListTagHoldsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTagHoldsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tagHolds != null && message.tagHolds.length) + for (var i = 0; i < message.tagHolds.length; ++i) + $root.google.cloud.resourcemanager.v3.TagHold.encode(message.tagHolds[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 ListTagHoldsResponse message, length delimited. Does not implicitly {@link google.cloud.resourcemanager.v3.ListTagHoldsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.resourcemanager.v3.ListTagHoldsResponse + * @static + * @param {google.cloud.resourcemanager.v3.IListTagHoldsResponse} message ListTagHoldsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTagHoldsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTagHoldsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.resourcemanager.v3.ListTagHoldsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.resourcemanager.v3.ListTagHoldsResponse} ListTagHoldsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTagHoldsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.resourcemanager.v3.ListTagHoldsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.tagHolds && message.tagHolds.length)) + message.tagHolds = []; + message.tagHolds.push($root.google.cloud.resourcemanager.v3.TagHold.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListTagHoldsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.resourcemanager.v3.ListTagHoldsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.resourcemanager.v3.ListTagHoldsResponse} ListTagHoldsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTagHoldsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTagHoldsResponse message. + * @function verify + * @memberof google.cloud.resourcemanager.v3.ListTagHoldsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTagHoldsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tagHolds != null && message.hasOwnProperty("tagHolds")) { + if (!Array.isArray(message.tagHolds)) + return "tagHolds: array expected"; + for (var i = 0; i < message.tagHolds.length; ++i) { + var error = $root.google.cloud.resourcemanager.v3.TagHold.verify(message.tagHolds[i]); + if (error) + return "tagHolds." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListTagHoldsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.resourcemanager.v3.ListTagHoldsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.resourcemanager.v3.ListTagHoldsResponse} ListTagHoldsResponse + */ + ListTagHoldsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.resourcemanager.v3.ListTagHoldsResponse) + return object; + var message = new $root.google.cloud.resourcemanager.v3.ListTagHoldsResponse(); + if (object.tagHolds) { + if (!Array.isArray(object.tagHolds)) + throw TypeError(".google.cloud.resourcemanager.v3.ListTagHoldsResponse.tagHolds: array expected"); + message.tagHolds = []; + for (var i = 0; i < object.tagHolds.length; ++i) { + if (typeof object.tagHolds[i] !== "object") + throw TypeError(".google.cloud.resourcemanager.v3.ListTagHoldsResponse.tagHolds: object expected"); + message.tagHolds[i] = $root.google.cloud.resourcemanager.v3.TagHold.fromObject(object.tagHolds[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListTagHoldsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.resourcemanager.v3.ListTagHoldsResponse + * @static + * @param {google.cloud.resourcemanager.v3.ListTagHoldsResponse} message ListTagHoldsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTagHoldsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.tagHolds = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.tagHolds && message.tagHolds.length) { + object.tagHolds = []; + for (var j = 0; j < message.tagHolds.length; ++j) + object.tagHolds[j] = $root.google.cloud.resourcemanager.v3.TagHold.toObject(message.tagHolds[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListTagHoldsResponse to JSON. + * @function toJSON + * @memberof google.cloud.resourcemanager.v3.ListTagHoldsResponse + * @instance + * @returns {Object.} JSON object + */ + ListTagHoldsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListTagHoldsResponse + * @function getTypeUrl + * @memberof google.cloud.resourcemanager.v3.ListTagHoldsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListTagHoldsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.resourcemanager.v3.ListTagHoldsResponse"; + }; + + return ListTagHoldsResponse; + })(); + + v3.TagKeys = (function() { + + /** + * Constructs a new TagKeys service. + * @memberof google.cloud.resourcemanager.v3 + * @classdesc Represents a TagKeys + * @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 TagKeys(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (TagKeys.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = TagKeys; + + /** + * Creates new TagKeys service using the specified rpc implementation. + * @function create + * @memberof google.cloud.resourcemanager.v3.TagKeys + * @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 {TagKeys} RPC service. Useful where requests and/or responses are streamed. + */ + TagKeys.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.resourcemanager.v3.TagKeys|listTagKeys}. + * @memberof google.cloud.resourcemanager.v3.TagKeys + * @typedef ListTagKeysCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.resourcemanager.v3.ListTagKeysResponse} [response] ListTagKeysResponse + */ + + /** + * Calls ListTagKeys. + * @function listTagKeys + * @memberof google.cloud.resourcemanager.v3.TagKeys + * @instance + * @param {google.cloud.resourcemanager.v3.IListTagKeysRequest} request ListTagKeysRequest message or plain object + * @param {google.cloud.resourcemanager.v3.TagKeys.ListTagKeysCallback} callback Node-style callback called with the error, if any, and ListTagKeysResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TagKeys.prototype.listTagKeys = function listTagKeys(request, callback) { + return this.rpcCall(listTagKeys, $root.google.cloud.resourcemanager.v3.ListTagKeysRequest, $root.google.cloud.resourcemanager.v3.ListTagKeysResponse, request, callback); + }, "name", { value: "ListTagKeys" }); + + /** + * Calls ListTagKeys. + * @function listTagKeys + * @memberof google.cloud.resourcemanager.v3.TagKeys + * @instance + * @param {google.cloud.resourcemanager.v3.IListTagKeysRequest} request ListTagKeysRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.resourcemanager.v3.TagKeys|getTagKey}. + * @memberof google.cloud.resourcemanager.v3.TagKeys + * @typedef GetTagKeyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.resourcemanager.v3.TagKey} [response] TagKey + */ + + /** + * Calls GetTagKey. + * @function getTagKey + * @memberof google.cloud.resourcemanager.v3.TagKeys + * @instance + * @param {google.cloud.resourcemanager.v3.IGetTagKeyRequest} request GetTagKeyRequest message or plain object + * @param {google.cloud.resourcemanager.v3.TagKeys.GetTagKeyCallback} callback Node-style callback called with the error, if any, and TagKey + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TagKeys.prototype.getTagKey = function getTagKey(request, callback) { + return this.rpcCall(getTagKey, $root.google.cloud.resourcemanager.v3.GetTagKeyRequest, $root.google.cloud.resourcemanager.v3.TagKey, request, callback); + }, "name", { value: "GetTagKey" }); + + /** + * Calls GetTagKey. + * @function getTagKey + * @memberof google.cloud.resourcemanager.v3.TagKeys + * @instance + * @param {google.cloud.resourcemanager.v3.IGetTagKeyRequest} request GetTagKeyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.resourcemanager.v3.TagKeys|getNamespacedTagKey}. + * @memberof google.cloud.resourcemanager.v3.TagKeys + * @typedef GetNamespacedTagKeyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.resourcemanager.v3.TagKey} [response] TagKey + */ + + /** + * Calls GetNamespacedTagKey. + * @function getNamespacedTagKey + * @memberof google.cloud.resourcemanager.v3.TagKeys + * @instance + * @param {google.cloud.resourcemanager.v3.IGetNamespacedTagKeyRequest} request GetNamespacedTagKeyRequest message or plain object + * @param {google.cloud.resourcemanager.v3.TagKeys.GetNamespacedTagKeyCallback} callback Node-style callback called with the error, if any, and TagKey + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TagKeys.prototype.getNamespacedTagKey = function getNamespacedTagKey(request, callback) { + return this.rpcCall(getNamespacedTagKey, $root.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest, $root.google.cloud.resourcemanager.v3.TagKey, request, callback); + }, "name", { value: "GetNamespacedTagKey" }); + + /** + * Calls GetNamespacedTagKey. + * @function getNamespacedTagKey + * @memberof google.cloud.resourcemanager.v3.TagKeys + * @instance + * @param {google.cloud.resourcemanager.v3.IGetNamespacedTagKeyRequest} request GetNamespacedTagKeyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.resourcemanager.v3.TagKeys|createTagKey}. + * @memberof google.cloud.resourcemanager.v3.TagKeys + * @typedef CreateTagKeyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateTagKey. + * @function createTagKey + * @memberof google.cloud.resourcemanager.v3.TagKeys + * @instance + * @param {google.cloud.resourcemanager.v3.ICreateTagKeyRequest} request CreateTagKeyRequest message or plain object + * @param {google.cloud.resourcemanager.v3.TagKeys.CreateTagKeyCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TagKeys.prototype.createTagKey = function createTagKey(request, callback) { + return this.rpcCall(createTagKey, $root.google.cloud.resourcemanager.v3.CreateTagKeyRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateTagKey" }); + + /** + * Calls CreateTagKey. + * @function createTagKey + * @memberof google.cloud.resourcemanager.v3.TagKeys + * @instance + * @param {google.cloud.resourcemanager.v3.ICreateTagKeyRequest} request CreateTagKeyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.resourcemanager.v3.TagKeys|updateTagKey}. + * @memberof google.cloud.resourcemanager.v3.TagKeys + * @typedef UpdateTagKeyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateTagKey. + * @function updateTagKey + * @memberof google.cloud.resourcemanager.v3.TagKeys + * @instance + * @param {google.cloud.resourcemanager.v3.IUpdateTagKeyRequest} request UpdateTagKeyRequest message or plain object + * @param {google.cloud.resourcemanager.v3.TagKeys.UpdateTagKeyCallback} callback Node-style callback called with the error, if any, and Operation * @returns {undefined} * @variation 1 */ @@ -12011,6 +14705,8 @@ * @property {google.protobuf.ITimestamp|null} [createTime] TagKey createTime * @property {google.protobuf.ITimestamp|null} [updateTime] TagKey updateTime * @property {string|null} [etag] TagKey etag + * @property {google.cloud.resourcemanager.v3.Purpose|null} [purpose] TagKey purpose + * @property {Object.|null} [purposeData] TagKey purposeData */ /** @@ -12022,6 +14718,7 @@ * @param {google.cloud.resourcemanager.v3.ITagKey=} [properties] Properties to set */ function TagKey(properties) { + this.purposeData = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12092,6 +14789,22 @@ */ TagKey.prototype.etag = ""; + /** + * TagKey purpose. + * @member {google.cloud.resourcemanager.v3.Purpose} purpose + * @memberof google.cloud.resourcemanager.v3.TagKey + * @instance + */ + TagKey.prototype.purpose = 0; + + /** + * TagKey purposeData. + * @member {Object.} purposeData + * @memberof google.cloud.resourcemanager.v3.TagKey + * @instance + */ + TagKey.prototype.purposeData = $util.emptyObject; + /** * Creates a new TagKey instance using the specified properties. * @function create @@ -12132,6 +14845,11 @@ $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.etag); + if (message.purpose != null && Object.hasOwnProperty.call(message, "purpose")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.purpose); + if (message.purposeData != null && Object.hasOwnProperty.call(message, "purposeData")) + for (var keys = Object.keys(message.purposeData), i = 0; i < keys.length; ++i) + writer.uint32(/* id 12, wireType 2 =*/98).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.purposeData[keys[i]]).ldelim(); return writer; }; @@ -12162,7 +14880,7 @@ TagKey.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.resourcemanager.v3.TagKey(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.resourcemanager.v3.TagKey(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -12198,6 +14916,33 @@ message.etag = reader.string(); break; } + case 11: { + message.purpose = reader.int32(); + break; + } + case 12: { + if (message.purposeData === $util.emptyObject) + message.purposeData = {}; + 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.purposeData[key] = value; + break; + } default: reader.skipType(tag & 7); break; @@ -12261,6 +15006,22 @@ if (message.etag != null && message.hasOwnProperty("etag")) if (!$util.isString(message.etag)) return "etag: string expected"; + if (message.purpose != null && message.hasOwnProperty("purpose")) + switch (message.purpose) { + default: + return "purpose: enum value expected"; + case 0: + case 1: + break; + } + if (message.purposeData != null && message.hasOwnProperty("purposeData")) { + if (!$util.isObject(message.purposeData)) + return "purposeData: object expected"; + var key = Object.keys(message.purposeData); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.purposeData[key[i]])) + return "purposeData: string{k:string} expected"; + } return null; }; @@ -12298,6 +15059,29 @@ } if (object.etag != null) message.etag = String(object.etag); + switch (object.purpose) { + default: + if (typeof object.purpose === "number") { + message.purpose = object.purpose; + break; + } + break; + case "PURPOSE_UNSPECIFIED": + case 0: + message.purpose = 0; + break; + case "GCE_FIREWALL": + case 1: + message.purpose = 1; + break; + } + if (object.purposeData) { + if (typeof object.purposeData !== "object") + throw TypeError(".google.cloud.resourcemanager.v3.TagKey.purposeData: object expected"); + message.purposeData = {}; + for (var keys = Object.keys(object.purposeData), i = 0; i < keys.length; ++i) + message.purposeData[keys[i]] = String(object.purposeData[keys[i]]); + } return message; }; @@ -12314,6 +15098,8 @@ if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.purposeData = {}; if (options.defaults) { object.name = ""; object.parent = ""; @@ -12323,6 +15109,7 @@ object.createTime = null; object.updateTime = null; object.etag = ""; + object.purpose = options.enums === String ? "PURPOSE_UNSPECIFIED" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -12340,6 +15127,14 @@ object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); if (message.etag != null && message.hasOwnProperty("etag")) object.etag = message.etag; + if (message.purpose != null && message.hasOwnProperty("purpose")) + object.purpose = options.enums === String ? $root.google.cloud.resourcemanager.v3.Purpose[message.purpose] === undefined ? message.purpose : $root.google.cloud.resourcemanager.v3.Purpose[message.purpose] : message.purpose; + var keys2; + if (message.purposeData && (keys2 = Object.keys(message.purposeData)).length) { + object.purposeData = {}; + for (var j = 0; j < keys2.length; ++j) + object.purposeData[keys2[j]] = message.purposeData[keys2[j]]; + } return object; }; @@ -12842,52 +15637,255 @@ }; /** - * Converts this ListTagKeysResponse to JSON. + * Converts this ListTagKeysResponse to JSON. + * @function toJSON + * @memberof google.cloud.resourcemanager.v3.ListTagKeysResponse + * @instance + * @returns {Object.} JSON object + */ + ListTagKeysResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListTagKeysResponse + * @function getTypeUrl + * @memberof google.cloud.resourcemanager.v3.ListTagKeysResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListTagKeysResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.resourcemanager.v3.ListTagKeysResponse"; + }; + + return ListTagKeysResponse; + })(); + + v3.GetTagKeyRequest = (function() { + + /** + * Properties of a GetTagKeyRequest. + * @memberof google.cloud.resourcemanager.v3 + * @interface IGetTagKeyRequest + * @property {string|null} [name] GetTagKeyRequest name + */ + + /** + * Constructs a new GetTagKeyRequest. + * @memberof google.cloud.resourcemanager.v3 + * @classdesc Represents a GetTagKeyRequest. + * @implements IGetTagKeyRequest + * @constructor + * @param {google.cloud.resourcemanager.v3.IGetTagKeyRequest=} [properties] Properties to set + */ + function GetTagKeyRequest(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]]; + } + + /** + * GetTagKeyRequest name. + * @member {string} name + * @memberof google.cloud.resourcemanager.v3.GetTagKeyRequest + * @instance + */ + GetTagKeyRequest.prototype.name = ""; + + /** + * Creates a new GetTagKeyRequest instance using the specified properties. + * @function create + * @memberof google.cloud.resourcemanager.v3.GetTagKeyRequest + * @static + * @param {google.cloud.resourcemanager.v3.IGetTagKeyRequest=} [properties] Properties to set + * @returns {google.cloud.resourcemanager.v3.GetTagKeyRequest} GetTagKeyRequest instance + */ + GetTagKeyRequest.create = function create(properties) { + return new GetTagKeyRequest(properties); + }; + + /** + * Encodes the specified GetTagKeyRequest message. Does not implicitly {@link google.cloud.resourcemanager.v3.GetTagKeyRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.resourcemanager.v3.GetTagKeyRequest + * @static + * @param {google.cloud.resourcemanager.v3.IGetTagKeyRequest} message GetTagKeyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTagKeyRequest.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 GetTagKeyRequest message, length delimited. Does not implicitly {@link google.cloud.resourcemanager.v3.GetTagKeyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.resourcemanager.v3.GetTagKeyRequest + * @static + * @param {google.cloud.resourcemanager.v3.IGetTagKeyRequest} message GetTagKeyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTagKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetTagKeyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.resourcemanager.v3.GetTagKeyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.resourcemanager.v3.GetTagKeyRequest} GetTagKeyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTagKeyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.resourcemanager.v3.GetTagKeyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetTagKeyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.resourcemanager.v3.GetTagKeyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.resourcemanager.v3.GetTagKeyRequest} GetTagKeyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTagKeyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetTagKeyRequest message. + * @function verify + * @memberof google.cloud.resourcemanager.v3.GetTagKeyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetTagKeyRequest.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 GetTagKeyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.resourcemanager.v3.GetTagKeyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.resourcemanager.v3.GetTagKeyRequest} GetTagKeyRequest + */ + GetTagKeyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.resourcemanager.v3.GetTagKeyRequest) + return object; + var message = new $root.google.cloud.resourcemanager.v3.GetTagKeyRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetTagKeyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.resourcemanager.v3.GetTagKeyRequest + * @static + * @param {google.cloud.resourcemanager.v3.GetTagKeyRequest} message GetTagKeyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetTagKeyRequest.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 GetTagKeyRequest to JSON. * @function toJSON - * @memberof google.cloud.resourcemanager.v3.ListTagKeysResponse + * @memberof google.cloud.resourcemanager.v3.GetTagKeyRequest * @instance * @returns {Object.} JSON object */ - ListTagKeysResponse.prototype.toJSON = function toJSON() { + GetTagKeyRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListTagKeysResponse + * Gets the default type url for GetTagKeyRequest * @function getTypeUrl - * @memberof google.cloud.resourcemanager.v3.ListTagKeysResponse + * @memberof google.cloud.resourcemanager.v3.GetTagKeyRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListTagKeysResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetTagKeyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.resourcemanager.v3.ListTagKeysResponse"; + return typeUrlPrefix + "/google.cloud.resourcemanager.v3.GetTagKeyRequest"; }; - return ListTagKeysResponse; + return GetTagKeyRequest; })(); - v3.GetTagKeyRequest = (function() { + v3.GetNamespacedTagKeyRequest = (function() { /** - * Properties of a GetTagKeyRequest. + * Properties of a GetNamespacedTagKeyRequest. * @memberof google.cloud.resourcemanager.v3 - * @interface IGetTagKeyRequest - * @property {string|null} [name] GetTagKeyRequest name + * @interface IGetNamespacedTagKeyRequest + * @property {string|null} [name] GetNamespacedTagKeyRequest name */ /** - * Constructs a new GetTagKeyRequest. + * Constructs a new GetNamespacedTagKeyRequest. * @memberof google.cloud.resourcemanager.v3 - * @classdesc Represents a GetTagKeyRequest. - * @implements IGetTagKeyRequest + * @classdesc Represents a GetNamespacedTagKeyRequest. + * @implements IGetNamespacedTagKeyRequest * @constructor - * @param {google.cloud.resourcemanager.v3.IGetTagKeyRequest=} [properties] Properties to set + * @param {google.cloud.resourcemanager.v3.IGetNamespacedTagKeyRequest=} [properties] Properties to set */ - function GetTagKeyRequest(properties) { + function GetNamespacedTagKeyRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12895,35 +15893,35 @@ } /** - * GetTagKeyRequest name. + * GetNamespacedTagKeyRequest name. * @member {string} name - * @memberof google.cloud.resourcemanager.v3.GetTagKeyRequest + * @memberof google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest * @instance */ - GetTagKeyRequest.prototype.name = ""; + GetNamespacedTagKeyRequest.prototype.name = ""; /** - * Creates a new GetTagKeyRequest instance using the specified properties. + * Creates a new GetNamespacedTagKeyRequest instance using the specified properties. * @function create - * @memberof google.cloud.resourcemanager.v3.GetTagKeyRequest + * @memberof google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest * @static - * @param {google.cloud.resourcemanager.v3.IGetTagKeyRequest=} [properties] Properties to set - * @returns {google.cloud.resourcemanager.v3.GetTagKeyRequest} GetTagKeyRequest instance + * @param {google.cloud.resourcemanager.v3.IGetNamespacedTagKeyRequest=} [properties] Properties to set + * @returns {google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest} GetNamespacedTagKeyRequest instance */ - GetTagKeyRequest.create = function create(properties) { - return new GetTagKeyRequest(properties); + GetNamespacedTagKeyRequest.create = function create(properties) { + return new GetNamespacedTagKeyRequest(properties); }; /** - * Encodes the specified GetTagKeyRequest message. Does not implicitly {@link google.cloud.resourcemanager.v3.GetTagKeyRequest.verify|verify} messages. + * Encodes the specified GetNamespacedTagKeyRequest message. Does not implicitly {@link google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.resourcemanager.v3.GetTagKeyRequest + * @memberof google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest * @static - * @param {google.cloud.resourcemanager.v3.IGetTagKeyRequest} message GetTagKeyRequest message or plain object to encode + * @param {google.cloud.resourcemanager.v3.IGetNamespacedTagKeyRequest} message GetNamespacedTagKeyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTagKeyRequest.encode = function encode(message, writer) { + GetNamespacedTagKeyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -12932,33 +15930,33 @@ }; /** - * Encodes the specified GetTagKeyRequest message, length delimited. Does not implicitly {@link google.cloud.resourcemanager.v3.GetTagKeyRequest.verify|verify} messages. + * Encodes the specified GetNamespacedTagKeyRequest message, length delimited. Does not implicitly {@link google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.resourcemanager.v3.GetTagKeyRequest + * @memberof google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest * @static - * @param {google.cloud.resourcemanager.v3.IGetTagKeyRequest} message GetTagKeyRequest message or plain object to encode + * @param {google.cloud.resourcemanager.v3.IGetNamespacedTagKeyRequest} message GetNamespacedTagKeyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetTagKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetNamespacedTagKeyRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetTagKeyRequest message from the specified reader or buffer. + * Decodes a GetNamespacedTagKeyRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.resourcemanager.v3.GetTagKeyRequest + * @memberof google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.resourcemanager.v3.GetTagKeyRequest} GetTagKeyRequest + * @returns {google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest} GetNamespacedTagKeyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTagKeyRequest.decode = function decode(reader, length) { + GetNamespacedTagKeyRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.resourcemanager.v3.GetTagKeyRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -12975,30 +15973,30 @@ }; /** - * Decodes a GetTagKeyRequest message from the specified reader or buffer, length delimited. + * Decodes a GetNamespacedTagKeyRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.resourcemanager.v3.GetTagKeyRequest + * @memberof google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.resourcemanager.v3.GetTagKeyRequest} GetTagKeyRequest + * @returns {google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest} GetNamespacedTagKeyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetTagKeyRequest.decodeDelimited = function decodeDelimited(reader) { + GetNamespacedTagKeyRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetTagKeyRequest message. + * Verifies a GetNamespacedTagKeyRequest message. * @function verify - * @memberof google.cloud.resourcemanager.v3.GetTagKeyRequest + * @memberof google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetTagKeyRequest.verify = function verify(message) { + GetNamespacedTagKeyRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -13008,32 +16006,32 @@ }; /** - * Creates a GetTagKeyRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetNamespacedTagKeyRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.resourcemanager.v3.GetTagKeyRequest + * @memberof google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.resourcemanager.v3.GetTagKeyRequest} GetTagKeyRequest + * @returns {google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest} GetNamespacedTagKeyRequest */ - GetTagKeyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.resourcemanager.v3.GetTagKeyRequest) + GetNamespacedTagKeyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest) return object; - var message = new $root.google.cloud.resourcemanager.v3.GetTagKeyRequest(); + var message = new $root.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetTagKeyRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetNamespacedTagKeyRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.resourcemanager.v3.GetTagKeyRequest + * @memberof google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest * @static - * @param {google.cloud.resourcemanager.v3.GetTagKeyRequest} message GetTagKeyRequest + * @param {google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest} message GetNamespacedTagKeyRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetTagKeyRequest.toObject = function toObject(message, options) { + GetNamespacedTagKeyRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -13045,32 +16043,32 @@ }; /** - * Converts this GetTagKeyRequest to JSON. + * Converts this GetNamespacedTagKeyRequest to JSON. * @function toJSON - * @memberof google.cloud.resourcemanager.v3.GetTagKeyRequest + * @memberof google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest * @instance * @returns {Object.} JSON object */ - GetTagKeyRequest.prototype.toJSON = function toJSON() { + GetNamespacedTagKeyRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetTagKeyRequest + * Gets the default type url for GetNamespacedTagKeyRequest * @function getTypeUrl - * @memberof google.cloud.resourcemanager.v3.GetTagKeyRequest + * @memberof google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetTagKeyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetNamespacedTagKeyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.resourcemanager.v3.GetTagKeyRequest"; + return typeUrlPrefix + "/google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest"; }; - return GetTagKeyRequest; + return GetNamespacedTagKeyRequest; })(); v3.CreateTagKeyRequest = (function() { @@ -14340,6 +17338,20 @@ return DeleteTagKeyMetadata; })(); + /** + * Purpose enum. + * @name google.cloud.resourcemanager.v3.Purpose + * @enum {number} + * @property {number} PURPOSE_UNSPECIFIED=0 PURPOSE_UNSPECIFIED value + * @property {number} GCE_FIREWALL=1 GCE_FIREWALL value + */ + v3.Purpose = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PURPOSE_UNSPECIFIED"] = 0; + values[valuesById[1] = "GCE_FIREWALL"] = 1; + return values; + })(); + v3.TagValues = (function() { /** @@ -14438,6 +17450,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.resourcemanager.v3.TagValues|getNamespacedTagValue}. + * @memberof google.cloud.resourcemanager.v3.TagValues + * @typedef GetNamespacedTagValueCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.resourcemanager.v3.TagValue} [response] TagValue + */ + + /** + * Calls GetNamespacedTagValue. + * @function getNamespacedTagValue + * @memberof google.cloud.resourcemanager.v3.TagValues + * @instance + * @param {google.cloud.resourcemanager.v3.IGetNamespacedTagValueRequest} request GetNamespacedTagValueRequest message or plain object + * @param {google.cloud.resourcemanager.v3.TagValues.GetNamespacedTagValueCallback} callback Node-style callback called with the error, if any, and TagValue + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TagValues.prototype.getNamespacedTagValue = function getNamespacedTagValue(request, callback) { + return this.rpcCall(getNamespacedTagValue, $root.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest, $root.google.cloud.resourcemanager.v3.TagValue, request, callback); + }, "name", { value: "GetNamespacedTagValue" }); + + /** + * Calls GetNamespacedTagValue. + * @function getNamespacedTagValue + * @memberof google.cloud.resourcemanager.v3.TagValues + * @instance + * @param {google.cloud.resourcemanager.v3.IGetNamespacedTagValueRequest} request GetNamespacedTagValueRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.cloud.resourcemanager.v3.TagValues|createTagValue}. * @memberof google.cloud.resourcemanager.v3.TagValues @@ -15715,6 +18760,209 @@ return GetTagValueRequest; })(); + v3.GetNamespacedTagValueRequest = (function() { + + /** + * Properties of a GetNamespacedTagValueRequest. + * @memberof google.cloud.resourcemanager.v3 + * @interface IGetNamespacedTagValueRequest + * @property {string|null} [name] GetNamespacedTagValueRequest name + */ + + /** + * Constructs a new GetNamespacedTagValueRequest. + * @memberof google.cloud.resourcemanager.v3 + * @classdesc Represents a GetNamespacedTagValueRequest. + * @implements IGetNamespacedTagValueRequest + * @constructor + * @param {google.cloud.resourcemanager.v3.IGetNamespacedTagValueRequest=} [properties] Properties to set + */ + function GetNamespacedTagValueRequest(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]]; + } + + /** + * GetNamespacedTagValueRequest name. + * @member {string} name + * @memberof google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest + * @instance + */ + GetNamespacedTagValueRequest.prototype.name = ""; + + /** + * Creates a new GetNamespacedTagValueRequest instance using the specified properties. + * @function create + * @memberof google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest + * @static + * @param {google.cloud.resourcemanager.v3.IGetNamespacedTagValueRequest=} [properties] Properties to set + * @returns {google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest} GetNamespacedTagValueRequest instance + */ + GetNamespacedTagValueRequest.create = function create(properties) { + return new GetNamespacedTagValueRequest(properties); + }; + + /** + * Encodes the specified GetNamespacedTagValueRequest message. Does not implicitly {@link google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest + * @static + * @param {google.cloud.resourcemanager.v3.IGetNamespacedTagValueRequest} message GetNamespacedTagValueRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetNamespacedTagValueRequest.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 GetNamespacedTagValueRequest message, length delimited. Does not implicitly {@link google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest + * @static + * @param {google.cloud.resourcemanager.v3.IGetNamespacedTagValueRequest} message GetNamespacedTagValueRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetNamespacedTagValueRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetNamespacedTagValueRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest} GetNamespacedTagValueRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetNamespacedTagValueRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetNamespacedTagValueRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest} GetNamespacedTagValueRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetNamespacedTagValueRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetNamespacedTagValueRequest message. + * @function verify + * @memberof google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetNamespacedTagValueRequest.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 GetNamespacedTagValueRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest} GetNamespacedTagValueRequest + */ + GetNamespacedTagValueRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest) + return object; + var message = new $root.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetNamespacedTagValueRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest + * @static + * @param {google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest} message GetNamespacedTagValueRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetNamespacedTagValueRequest.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 GetNamespacedTagValueRequest to JSON. + * @function toJSON + * @memberof google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest + * @instance + * @returns {Object.} JSON object + */ + GetNamespacedTagValueRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetNamespacedTagValueRequest + * @function getTypeUrl + * @memberof google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetNamespacedTagValueRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest"; + }; + + return GetNamespacedTagValueRequest; + })(); + v3.CreateTagValueRequest = (function() { /** diff --git a/packages/google-cloud-resourcemanager/protos/protos.json b/packages/google-cloud-resourcemanager/protos/protos.json index 848c70cf61d..e1a26c3218d 100644 --- a/packages/google-cloud-resourcemanager/protos/protos.json +++ b/packages/google-cloud-resourcemanager/protos/protos.json @@ -1418,6 +1418,24 @@ } } ] + }, + "ListEffectiveTags": { + "requestType": "ListEffectiveTagsRequest", + "responseType": "ListEffectiveTagsResponse", + "options": { + "(google.api.http).get": "/v3/effectiveTags", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/effectiveTags" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] } } }, @@ -1441,6 +1459,10 @@ "tagValue": { "type": "string", "id": 3 + }, + "tagValueNamespacedName": { + "type": "string", + "id": 4 } } }, @@ -1519,6 +1541,298 @@ } } }, + "ListEffectiveTagsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListEffectiveTagsResponse": { + "fields": { + "effectiveTags": { + "rule": "repeated", + "type": "EffectiveTag", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "EffectiveTag": { + "fields": { + "tagValue": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/TagValue" + } + }, + "namespacedTagValue": { + "type": "string", + "id": 2 + }, + "tagKey": { + "type": "string", + "id": 3, + "options": { + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/TagKey" + } + }, + "namespacedTagKey": { + "type": "string", + "id": 4 + }, + "tagKeyParentName": { + "type": "string", + "id": 6 + }, + "inherited": { + "type": "bool", + "id": 5 + } + } + }, + "TagHolds": { + "options": { + "(google.api.default_host)": "cloudresourcemanager.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only" + }, + "methods": { + "CreateTagHold": { + "requestType": "CreateTagHoldRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v3/{parent=tagValues/*}/tagHolds", + "(google.api.http).body": "tag_hold", + "(google.api.method_signature)": "parent,tag_hold", + "(google.longrunning.operation_info).response_type": "TagHold", + "(google.longrunning.operation_info).metadata_type": "CreateTagHoldMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v3/{parent=tagValues/*}/tagHolds", + "body": "tag_hold" + } + }, + { + "(google.api.method_signature)": "parent,tag_hold" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "TagHold", + "metadata_type": "CreateTagHoldMetadata" + } + } + ] + }, + "DeleteTagHold": { + "requestType": "DeleteTagHoldRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v3/{name=tagValues/*/tagHolds/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "DeleteTagHoldMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v3/{name=tagValues/*/tagHolds/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "DeleteTagHoldMetadata" + } + } + ] + }, + "ListTagHolds": { + "requestType": "ListTagHoldsRequest", + "responseType": "ListTagHoldsResponse", + "options": { + "(google.api.http).get": "/v3/{parent=tagValues/*}/tagHolds", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/{parent=tagValues/*}/tagHolds" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "TagHold": { + "options": { + "(google.api.resource).type": "cloudresourcemanager.googleapis.com/TagHold", + "(google.api.resource).pattern": "tagValues/{tag_value}/tagHolds/{tag_hold}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "holder": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "origin": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "helpLink": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "CreateTagHoldRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "cloudresourcemanager.googleapis.com/TagHold" + } + }, + "tagHold": { + "type": "TagHold", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CreateTagHoldMetadata": { + "fields": {} + }, + "DeleteTagHoldRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/TagHold" + } + }, + "validateOnly": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteTagHoldMetadata": { + "fields": {} + }, + "ListTagHoldsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "cloudresourcemanager.googleapis.com/TagHold" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListTagHoldsResponse": { + "fields": { + "tagHolds": { + "rule": "repeated", + "type": "TagHold", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, "TagKeys": { "options": { "(google.api.default_host)": "cloudresourcemanager.googleapis.com", @@ -1561,6 +1875,24 @@ } ] }, + "GetNamespacedTagKey": { + "requestType": "GetNamespacedTagKeyRequest", + "responseType": "TagKey", + "options": { + "(google.api.http).get": "/v3/tagKeys/namespaced", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/tagKeys/namespaced" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, "CreateTagKey": { "requestType": "CreateTagKeyRequest", "responseType": "google.longrunning.Operation", @@ -1767,6 +2099,21 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "purpose": { + "type": "Purpose", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "purposeData": { + "keyType": "string", + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -1821,6 +2168,18 @@ } } }, + "GetNamespacedTagKeyRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/TagKey" + } + } + } + }, "CreateTagKeyRequest": { "fields": { "tagKey": { @@ -1893,6 +2252,12 @@ "DeleteTagKeyMetadata": { "fields": {} }, + "Purpose": { + "values": { + "PURPOSE_UNSPECIFIED": 0, + "GCE_FIREWALL": 1 + } + }, "TagValues": { "options": { "(google.api.default_host)": "cloudresourcemanager.googleapis.com", @@ -1935,6 +2300,24 @@ } ] }, + "GetNamespacedTagValue": { + "requestType": "GetNamespacedTagValueRequest", + "responseType": "TagValue", + "options": { + "(google.api.http).get": "/v3/tagValues/namespaced", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v3/tagValues/namespaced" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, "CreateTagValue": { "requestType": "CreateTagValueRequest", "responseType": "google.longrunning.Operation", @@ -2195,6 +2578,18 @@ } } }, + "GetNamespacedTagValueRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/TagValue" + } + } + } + }, "CreateTagValueRequest": { "fields": { "tagValue": { diff --git a/packages/google-cloud-resourcemanager/samples/README.md b/packages/google-cloud-resourcemanager/samples/README.md index 5caf0e4b025..5043680a4b0 100644 --- a/packages/google-cloud-resourcemanager/samples/README.md +++ b/packages/google-cloud-resourcemanager/samples/README.md @@ -41,10 +41,15 @@ * [Projects.update_project](#projects.update_project) * [Tag_bindings.create_tag_binding](#tag_bindings.create_tag_binding) * [Tag_bindings.delete_tag_binding](#tag_bindings.delete_tag_binding) + * [Tag_bindings.list_effective_tags](#tag_bindings.list_effective_tags) * [Tag_bindings.list_tag_bindings](#tag_bindings.list_tag_bindings) + * [Tag_holds.create_tag_hold](#tag_holds.create_tag_hold) + * [Tag_holds.delete_tag_hold](#tag_holds.delete_tag_hold) + * [Tag_holds.list_tag_holds](#tag_holds.list_tag_holds) * [Tag_keys.create_tag_key](#tag_keys.create_tag_key) * [Tag_keys.delete_tag_key](#tag_keys.delete_tag_key) * [Tag_keys.get_iam_policy](#tag_keys.get_iam_policy) + * [Tag_keys.get_namespaced_tag_key](#tag_keys.get_namespaced_tag_key) * [Tag_keys.get_tag_key](#tag_keys.get_tag_key) * [Tag_keys.list_tag_keys](#tag_keys.list_tag_keys) * [Tag_keys.set_iam_policy](#tag_keys.set_iam_policy) @@ -53,13 +58,13 @@ * [Tag_values.create_tag_value](#tag_values.create_tag_value) * [Tag_values.delete_tag_value](#tag_values.delete_tag_value) * [Tag_values.get_iam_policy](#tag_values.get_iam_policy) + * [Tag_values.get_namespaced_tag_value](#tag_values.get_namespaced_tag_value) * [Tag_values.get_tag_value](#tag_values.get_tag_value) * [Tag_values.list_tag_values](#tag_values.list_tag_values) * [Tag_values.set_iam_policy](#tag_values.set_iam_policy) * [Tag_values.test_iam_permissions](#tag_values.test_iam_permissions) * [Tag_values.update_tag_value](#tag_values.update_tag_value) * [Quickstart](#quickstart) - * [Sample.test](#sample.test) ## Before you begin @@ -569,6 +574,23 @@ __Usage:__ +### Tag_bindings.list_effective_tags + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_bindings.list_effective_tags.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_bindings.list_effective_tags.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-resourcemanager/samples/generated/v3/tag_bindings.list_effective_tags.js` + + +----- + + + + ### Tag_bindings.list_tag_bindings View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_bindings.list_tag_bindings.js). @@ -586,6 +608,57 @@ __Usage:__ +### Tag_holds.create_tag_hold + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_holds.create_tag_hold.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_holds.create_tag_hold.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-resourcemanager/samples/generated/v3/tag_holds.create_tag_hold.js` + + +----- + + + + +### Tag_holds.delete_tag_hold + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_holds.delete_tag_hold.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_holds.delete_tag_hold.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-resourcemanager/samples/generated/v3/tag_holds.delete_tag_hold.js` + + +----- + + + + +### Tag_holds.list_tag_holds + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_holds.list_tag_holds.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_holds.list_tag_holds.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-resourcemanager/samples/generated/v3/tag_holds.list_tag_holds.js` + + +----- + + + + ### Tag_keys.create_tag_key View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.create_tag_key.js). @@ -637,6 +710,23 @@ __Usage:__ +### Tag_keys.get_namespaced_tag_key + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.get_namespaced_tag_key.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.get_namespaced_tag_key.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.get_namespaced_tag_key.js` + + +----- + + + + ### Tag_keys.get_tag_key View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.get_tag_key.js). @@ -773,6 +863,23 @@ __Usage:__ +### Tag_values.get_namespaced_tag_value + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.get_namespaced_tag_value.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.get_namespaced_tag_value.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.get_namespaced_tag_value.js` + + +----- + + + + ### Tag_values.get_tag_value View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.get_tag_value.js). @@ -870,23 +977,6 @@ __Usage:__ `node packages/google-cloud-resourcemanager/samples/quickstart.js` ------ - - - - -### Sample.test - -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-resourcemanager/samples/test/sample.test.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-resourcemanager/samples/test/sample.test.js,samples/README.md) - -__Usage:__ - - -`node packages/google-cloud-resourcemanager/samples/test/sample.test.js` - - diff --git a/packages/google-cloud-resourcemanager/samples/generated/v3/folders.create_folder.js b/packages/google-cloud-resourcemanager/samples/generated/v3/folders.create_folder.js index 1ecff829632..8a5c3872277 100644 --- a/packages/google-cloud-resourcemanager/samples/generated/v3/folders.create_folder.js +++ b/packages/google-cloud-resourcemanager/samples/generated/v3/folders.create_folder.js @@ -29,8 +29,8 @@ function main(folder) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The folder being created, only the display name and parent will be - * consulted. All other fields will be ignored. + * Required. The folder being created, only the display name and parent will + * be consulted. All other fields will be ignored. */ // const folder = {} diff --git a/packages/google-cloud-resourcemanager/samples/generated/v3/folders.list_folders.js b/packages/google-cloud-resourcemanager/samples/generated/v3/folders.list_folders.js index 1a3769fad2f..ace19a6ceb7 100644 --- a/packages/google-cloud-resourcemanager/samples/generated/v3/folders.list_folders.js +++ b/packages/google-cloud-resourcemanager/samples/generated/v3/folders.list_folders.js @@ -29,16 +29,19 @@ function main(parent) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name of the organization or folder whose folders are - * being listed. - * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. + * Required. The name of the parent resource whose folders are being listed. + * Only children of this parent resource are listed; descendants are not + * listed. + * If the parent is a folder, use the value `folders/{folder_id}`. If the + * parent is an organization, use the value `organizations/{org_id}`. * Access to this method is controlled by checking the * `resourcemanager.folders.list` permission on the `parent`. */ // const parent = 'abc123' /** - * Optional. The maximum number of folders to return in the response. - * If unspecified, server picks an appropriate default. + * Optional. The maximum number of folders to return in the response. The + * server can return fewer folders than requested. If unspecified, server + * picks an appropriate default. */ // const pageSize = 1234 /** diff --git a/packages/google-cloud-resourcemanager/samples/generated/v3/folders.move_folder.js b/packages/google-cloud-resourcemanager/samples/generated/v3/folders.move_folder.js index 9560c8b691a..b279ea6393a 100644 --- a/packages/google-cloud-resourcemanager/samples/generated/v3/folders.move_folder.js +++ b/packages/google-cloud-resourcemanager/samples/generated/v3/folders.move_folder.js @@ -34,9 +34,9 @@ function main(name, destinationParent) { */ // const name = 'abc123' /** - * Required. The resource name of the folder or organization which should be the - * folder's new parent. - * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. + * Required. The resource name of the folder or organization which should be + * the folder's new parent. Must be of the form `folders/{folder_id}` or + * `organizations/{org_id}`. */ // const destinationParent = 'abc123' diff --git a/packages/google-cloud-resourcemanager/samples/generated/v3/folders.search_folders.js b/packages/google-cloud-resourcemanager/samples/generated/v3/folders.search_folders.js index e7d622ab05f..4cc9c93c7f3 100644 --- a/packages/google-cloud-resourcemanager/samples/generated/v3/folders.search_folders.js +++ b/packages/google-cloud-resourcemanager/samples/generated/v3/folders.search_folders.js @@ -29,13 +29,14 @@ function main() { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Optional. The maximum number of folders to return in the response. - * If unspecified, server picks an appropriate default. + * Optional. The maximum number of folders to return in the response. The + * server can return fewer folders than requested. If unspecified, server + * picks an appropriate default. */ // const pageSize = 1234 /** - * Optional. A pagination token returned from a previous call to `SearchFolders` - * that indicates from where search should continue. + * Optional. A pagination token returned from a previous call to + * `SearchFolders` that indicates from where search should continue. */ // const pageToken = 'abc123' /** diff --git a/packages/google-cloud-resourcemanager/samples/generated/v3/folders.update_folder.js b/packages/google-cloud-resourcemanager/samples/generated/v3/folders.update_folder.js index 5d0789d6486..40d265b5847 100644 --- a/packages/google-cloud-resourcemanager/samples/generated/v3/folders.update_folder.js +++ b/packages/google-cloud-resourcemanager/samples/generated/v3/folders.update_folder.js @@ -29,8 +29,8 @@ function main(folder, updateMask) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The new definition of the Folder. It must include the `name` field, which - * cannot be changed. + * Required. The new definition of the Folder. It must include the `name` + * field, which cannot be changed. */ // const folder = {} /** diff --git a/packages/google-cloud-resourcemanager/samples/generated/v3/organizations.get_organization.js b/packages/google-cloud-resourcemanager/samples/generated/v3/organizations.get_organization.js index 4dd10b25c69..674d25d155a 100644 --- a/packages/google-cloud-resourcemanager/samples/generated/v3/organizations.get_organization.js +++ b/packages/google-cloud-resourcemanager/samples/generated/v3/organizations.get_organization.js @@ -29,9 +29,9 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name of the Organization to fetch. This is the organization's - * relative path in the API, formatted as "organizations/[organizationId]". - * For example, "organizations/1234". + * Required. The resource name of the Organization to fetch. This is the + * organization's relative path in the API, formatted as + * "organizations/[organizationId]". For example, "organizations/1234". */ // const name = 'abc123' diff --git a/packages/google-cloud-resourcemanager/samples/generated/v3/organizations.search_organizations.js b/packages/google-cloud-resourcemanager/samples/generated/v3/organizations.search_organizations.js index 048ba0bec6b..25a484a1d21 100644 --- a/packages/google-cloud-resourcemanager/samples/generated/v3/organizations.search_organizations.js +++ b/packages/google-cloud-resourcemanager/samples/generated/v3/organizations.search_organizations.js @@ -30,17 +30,18 @@ function main() { */ /** * Optional. The maximum number of organizations to return in the response. - * If unspecified, server picks an appropriate default. + * The server can return fewer organizations than requested. If unspecified, + * server picks an appropriate default. */ // const pageSize = 1234 /** - * Optional. A pagination token returned from a previous call to `SearchOrganizations` - * that indicates from where listing should continue. + * Optional. A pagination token returned from a previous call to + * `SearchOrganizations` that indicates from where listing should continue. */ // const pageToken = 'abc123' /** - * Optional. An optional query string used to filter the Organizations to return in - * the response. Query rules are case-insensitive. + * Optional. An optional query string used to filter the Organizations to + * return in the response. Query rules are case-insensitive. * ``` * | Field | Description | * |------------------|--------------------------------------------| diff --git a/packages/google-cloud-resourcemanager/samples/generated/v3/projects.create_project.js b/packages/google-cloud-resourcemanager/samples/generated/v3/projects.create_project.js index ba2ee13cb4d..73a6f5a6e67 100644 --- a/packages/google-cloud-resourcemanager/samples/generated/v3/projects.create_project.js +++ b/packages/google-cloud-resourcemanager/samples/generated/v3/projects.create_project.js @@ -34,7 +34,7 @@ function main(project) { * fails. * If the `parent` field is set, the `resourcemanager.projects.create` * permission is checked on the parent resource. If no parent is set and - * the authorization credentials belong to an Organziation, the parent + * the authorization credentials belong to an Organization, the parent * will be set to that Organization. */ // const project = 'my-project' diff --git a/packages/google-cloud-resourcemanager/samples/generated/v3/projects.list_projects.js b/packages/google-cloud-resourcemanager/samples/generated/v3/projects.list_projects.js index 5febda736d2..826637d500b 100644 --- a/packages/google-cloud-resourcemanager/samples/generated/v3/projects.list_projects.js +++ b/packages/google-cloud-resourcemanager/samples/generated/v3/projects.list_projects.js @@ -29,15 +29,17 @@ function main(parent) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the parent resource to list projects under. - * For example, setting this field to 'folders/1234' would list all projects - * directly under that folder. + * Required. The name of the parent resource whose projects are being listed. + * Only children of this parent resource are listed; descendants are not + * listed. + * If the parent is a folder, use the value `folders/{folder_id}`. If the + * parent is an organization, use the value `organizations/{org_id}`. */ // const parent = 'abc123' /** - * Optional. A pagination token returned from a previous call to ListProjects - * google.cloud.resourcemanager.v3.Projects.ListProjects - * that indicates from where listing should continue. + * Optional. A pagination token returned from a previous call to + * ListProjects google.cloud.resourcemanager.v3.Projects.ListProjects that + * indicates from where listing should continue. */ // const pageToken = 'abc123' /** @@ -47,8 +49,8 @@ function main(parent) { */ // const pageSize = 1234 /** - * Optional. Indicate that projects in the `DELETE_REQUESTED` state should also be - * returned. Normally only `ACTIVE` projects are returned. + * Optional. Indicate that projects in the `DELETE_REQUESTED` state should + * also be returned. Normally only `ACTIVE` projects are returned. */ // const showDeleted = true diff --git a/packages/google-cloud-resourcemanager/samples/generated/v3/projects.search_projects.js b/packages/google-cloud-resourcemanager/samples/generated/v3/projects.search_projects.js index fe41471f53f..e6faf50a836 100644 --- a/packages/google-cloud-resourcemanager/samples/generated/v3/projects.search_projects.js +++ b/packages/google-cloud-resourcemanager/samples/generated/v3/projects.search_projects.js @@ -31,44 +31,37 @@ function main() { /** * Optional. A query string for searching for projects that the caller has * `resourcemanager.projects.get` permission to. If multiple fields are - * included in the query, the it will return results that match any of the + * included in the query, then it will return results that match any of the * fields. Some eligible fields are: - * ``` - * | Field | Description | - * |-------------------------|----------------------------------------------| - * | displayName, name | Filters by displayName. | - * | parent | Project's parent. (for example: folders/123, - * organizations/*) Prefer parent field over parent.type and parent.id. | - * | parent.type | Parent's type: `folder` or `organization`. | - * | parent.id | Parent's id number (for example: 123) | - * | id, projectId | Filters by projectId. | - * | state, lifecycleState | Filters by state. | - * | labels | Filters by label name or value. | - * | labels. (where *key* is the name of a label) | Filters by label - * name. | - * ``` + * - **`displayName`, `name`**: Filters by displayName. + * - **`parent`**: Project's parent (for example: `folders/123`, + * `organizations/*`). Prefer `parent` field over `parent.type` and + * `parent.id`. + * - **`parent.type`**: Parent's type: `folder` or `organization`. + * - **`parent.id`**: Parent's id number (for example: `123`). + * - **`id`, `projectId`**: Filters by projectId. + * - **`state`, `lifecycleState`**: Filters by state. + * - **`labels`**: Filters by label name or value. + * - **`labels.` (where `` is the name of a label)**: Filters by label + * name. * Search expressions are case insensitive. * Some examples queries: - * ``` - * | Query | Description | - * |------------------|-----------------------------------------------------| - * | name:how* | The project's name starts with "how". | - * | name:Howl | The project's name is `Howl` or `howl`. | - * | name:HOWL | Equivalent to above. | - * | NAME:howl | Equivalent to above. | - * | labels.color:* | The project has the label `color`. | - * | labels.color:red | The project's label `color` has the value `red`. | - * | labels.color:red labels.size:big | The project's label `color` has - * the value `red` and its label `size` has the value `big`. | - * ``` + * - **`name:how*`**: The project's name starts with "how". + * - **`name:Howl`**: The project's name is `Howl` or `howl`. + * - **`name:HOWL`**: Equivalent to above. + * - **`NAME:howl`**: Equivalent to above. + * - **`labels.color:*`**: The project has the label `color`. + * - **`labels.color:red`**: The project's label `color` has the value `red`. + * - **`labels.color:red labels.size:big`**: The project's label `color` has + * the value `red` or its label `size` has the value `big`. * If no query is specified, the call will return projects for which the user * has the `resourcemanager.projects.get` permission. */ // const query = 'abc123' /** - * Optional. A pagination token returned from a previous call to ListProjects - * google.cloud.resourcemanager.v3.Projects.ListProjects - * that indicates from where listing should continue. + * Optional. A pagination token returned from a previous call to + * ListProjects google.cloud.resourcemanager.v3.Projects.ListProjects that + * indicates from where listing should continue. */ // const pageToken = 'abc123' /** diff --git a/packages/google-cloud-resourcemanager/samples/generated/v3/snippet_metadata.google.cloud.resourcemanager.v3.json b/packages/google-cloud-resourcemanager/samples/generated/v3/snippet_metadata.google.cloud.resourcemanager.v3.json index b17c24b4965..a78e35a19e9 100644 --- a/packages/google-cloud-resourcemanager/samples/generated/v3/snippet_metadata.google.cloud.resourcemanager.v3.json +++ b/packages/google-cloud-resourcemanager/samples/generated/v3/snippet_metadata.google.cloud.resourcemanager.v3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-resourcemanager", - "version": "4.2.0", + "version": "4.3.0", "language": "TYPESCRIPT", "apis": [ { @@ -62,7 +62,7 @@ "segments": [ { "start": 25, - "end": 75, + "end": 78, "type": "FULL" } ], @@ -114,7 +114,7 @@ "segments": [ { "start": 25, - "end": 89, + "end": 90, "type": "FULL" } ], @@ -546,7 +546,7 @@ "segments": [ { "start": 25, - "end": 78, + "end": 79, "type": "FULL" } ], @@ -770,7 +770,7 @@ "segments": [ { "start": 25, - "end": 74, + "end": 76, "type": "FULL" } ], @@ -822,7 +822,7 @@ "segments": [ { "start": 25, - "end": 99, + "end": 92, "type": "FULL" } ], @@ -947,7 +947,7 @@ "regionTag": "cloudresourcemanager_v3_generated_Projects_MoveProject_async", "title": "Folders moveProject Sample", "origin": "API_DEFINITION", - "description": " Move a project to another place in your resource hierarchy, under a new resource parent. Returns an operation which can be used to track the process of the project move workflow. Upon success, the `Operation.response` field will be populated with the moved project. The caller must have `resourcemanager.projects.update` permission on the project and have `resourcemanager.projects.move` permission on the project's current and proposed new parent.", + "description": " Move a project to another place in your resource hierarchy, under a new resource parent. Returns an operation which can be used to track the process of the project move workflow. Upon success, the `Operation.response` field will be populated with the moved project. The caller must have `resourcemanager.projects.move` permission on the project, on the project's current and proposed new parent. If project has no current parent, or it currently does not have an associated organization resource, you will also need the `resourcemanager.projects.setIamPolicy` permission in the project.", "canonical": true, "file": "projects.move_project.js", "language": "JAVASCRIPT", @@ -1071,7 +1071,7 @@ "regionTag": "cloudresourcemanager_v3_generated_Projects_GetIamPolicy_async", "title": "Folders getIamPolicy Sample", "origin": "API_DEFINITION", - "description": " Returns the IAM access control policy for the specified project. Permission is denied if the policy or the resource do not exist.", + "description": " Returns the IAM access control policy for the specified project, in the format `projects/{ProjectIdOrNumber}` e.g. projects/123. Permission is denied if the policy or the resource do not exist.", "canonical": true, "file": "projects.get_iam_policy.js", "language": "JAVASCRIPT", @@ -1115,7 +1115,7 @@ "regionTag": "cloudresourcemanager_v3_generated_Projects_SetIamPolicy_async", "title": "Folders setIamPolicy Sample", "origin": "API_DEFINITION", - "description": " Sets the IAM access control policy for the specified project. CAUTION: This method will replace the existing policy, and cannot be used to append additional IAM settings. Note: Removing service accounts from policies or changing their roles can render services completely inoperable. It is important to understand how the service account is being used before removing or updating its roles. The following constraints apply when using `setIamPolicy()`: + Project does not support `allUsers` and `allAuthenticatedUsers` as `members` in a `Binding` of a `Policy`. + The owner role can be granted to a `user`, `serviceAccount`, or a group that is part of an organization. For example, group@myownpersonaldomain.com could be added as an owner to a project in the myownpersonaldomain.com organization, but not the examplepetstore.com organization. + Service accounts can be made owners of a project directly without any restrictions. However, to be added as an owner, a user must be invited using the Cloud Platform console and must accept the invitation. + A user cannot be granted the owner role using `setIamPolicy()`. The user must be granted the owner role using the Cloud Platform Console and must explicitly accept the invitation. + Invitations to grant the owner role cannot be sent using `setIamPolicy()`; they must be sent only using the Cloud Platform Console. + Membership changes that leave the project without any owners that have accepted the Terms of Service (ToS) will be rejected. + If the project is not part of an organization, there must be at least one owner who has accepted the Terms of Service (ToS) agreement in the policy. Calling `setIamPolicy()` to remove the last ToS-accepted owner from the policy will fail. This restriction also applies to legacy projects that no longer have owners who have accepted the ToS. Edits to IAM policies will be rejected until the lack of a ToS-accepting owner is rectified. + Calling this method requires enabling the App Engine Admin API.", + "description": " Sets the IAM access control policy for the specified project, in the format `projects/{ProjectIdOrNumber}` e.g. projects/123. CAUTION: This method will replace the existing policy, and cannot be used to append additional IAM settings. Note: Removing service accounts from policies or changing their roles can render services completely inoperable. It is important to understand how the service account is being used before removing or updating its roles. The following constraints apply when using `setIamPolicy()`: + Project does not support `allUsers` and `allAuthenticatedUsers` as `members` in a `Binding` of a `Policy`. + The owner role can be granted to a `user`, `serviceAccount`, or a group that is part of an organization. For example, group@myownpersonaldomain.com could be added as an owner to a project in the myownpersonaldomain.com organization, but not the examplepetstore.com organization. + Service accounts can be made owners of a project directly without any restrictions. However, to be added as an owner, a user must be invited using the Cloud Platform console and must accept the invitation. + A user cannot be granted the owner role using `setIamPolicy()`. The user must be granted the owner role using the Cloud Platform Console and must explicitly accept the invitation. + Invitations to grant the owner role cannot be sent using `setIamPolicy()`; they must be sent only using the Cloud Platform Console. + If the project is not part of an organization, there must be at least one owner who has accepted the Terms of Service (ToS) agreement in the policy. Calling `setIamPolicy()` to remove the last ToS-accepted owner from the policy will fail. This restriction also applies to legacy projects that no longer have owners who have accepted the ToS. Edits to IAM policies will be rejected until the lack of a ToS-accepting owner is rectified. If the project is part of an organization, you can remove all owners, potentially making the organization inaccessible.", "canonical": true, "file": "projects.set_iam_policy.js", "language": "JAVASCRIPT", @@ -1163,7 +1163,7 @@ "regionTag": "cloudresourcemanager_v3_generated_Projects_TestIamPermissions_async", "title": "Folders testIamPermissions Sample", "origin": "API_DEFINITION", - "description": " Returns permissions that a caller has on the specified project.", + "description": " Returns permissions that a caller has on the specified project, in the format `projects/{ProjectIdOrNumber}` e.g. projects/123..", "canonical": true, "file": "projects.test_iam_permissions.js", "language": "JAVASCRIPT", @@ -1207,7 +1207,7 @@ "regionTag": "cloudresourcemanager_v3_generated_TagBindings_ListTagBindings_async", "title": "Folders listTagBindings Sample", "origin": "API_DEFINITION", - "description": " Lists the TagBindings for the given cloud resource, as specified with `parent`. NOTE: The `parent` field is expected to be a full resource name: https://cloud.google.com/apis/design/resource_names#full_resource_name", + "description": " Lists the TagBindings for the given Google Cloud resource, as specified with `parent`. NOTE: The `parent` field is expected to be a full resource name: https://cloud.google.com/apis/design/resource_names#full_resource_name", "canonical": true, "file": "tag_bindings.list_tag_bindings.js", "language": "JAVASCRIPT", @@ -1255,7 +1255,7 @@ "regionTag": "cloudresourcemanager_v3_generated_TagBindings_CreateTagBinding_async", "title": "Folders createTagBinding Sample", "origin": "API_DEFINITION", - "description": " Creates a TagBinding between a TagValue and a cloud resource (currently project, folder, or organization).", + "description": " Creates a TagBinding between a TagValue and a Google Cloud resource.", "canonical": true, "file": "tag_bindings.create_tag_binding.js", "language": "JAVASCRIPT", @@ -1335,6 +1335,198 @@ } } }, + { + "regionTag": "cloudresourcemanager_v3_generated_TagBindings_ListEffectiveTags_async", + "title": "Folders listEffectiveTags Sample", + "origin": "API_DEFINITION", + "description": " Return a list of effective tags for the given Google Cloud resource, as specified in `parent`.", + "canonical": true, + "file": "tag_bindings.list_effective_tags.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListEffectiveTags", + "fullName": "google.cloud.resourcemanager.v3.TagBindings.ListEffectiveTags", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.resourcemanager.v3.ListEffectiveTagsResponse", + "client": { + "shortName": "TagBindingsClient", + "fullName": "google.cloud.resourcemanager.v3.TagBindingsClient" + }, + "method": { + "shortName": "ListEffectiveTags", + "fullName": "google.cloud.resourcemanager.v3.TagBindings.ListEffectiveTags", + "service": { + "shortName": "TagBindings", + "fullName": "google.cloud.resourcemanager.v3.TagBindings" + } + } + } + }, + { + "regionTag": "cloudresourcemanager_v3_generated_TagHolds_CreateTagHold_async", + "title": "Folders createTagHold Sample", + "origin": "API_DEFINITION", + "description": " Creates a TagHold. Returns ALREADY_EXISTS if a TagHold with the same resource and origin exists under the same TagValue.", + "canonical": true, + "file": "tag_holds.create_tag_hold.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateTagHold", + "fullName": "google.cloud.resourcemanager.v3.TagHolds.CreateTagHold", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "tag_hold", + "type": ".google.cloud.resourcemanager.v3.TagHold" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "TagHoldsClient", + "fullName": "google.cloud.resourcemanager.v3.TagHoldsClient" + }, + "method": { + "shortName": "CreateTagHold", + "fullName": "google.cloud.resourcemanager.v3.TagHolds.CreateTagHold", + "service": { + "shortName": "TagHolds", + "fullName": "google.cloud.resourcemanager.v3.TagHolds" + } + } + } + }, + { + "regionTag": "cloudresourcemanager_v3_generated_TagHolds_DeleteTagHold_async", + "title": "Folders deleteTagHold Sample", + "origin": "API_DEFINITION", + "description": " Deletes a TagHold.", + "canonical": true, + "file": "tag_holds.delete_tag_hold.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteTagHold", + "fullName": "google.cloud.resourcemanager.v3.TagHolds.DeleteTagHold", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "TagHoldsClient", + "fullName": "google.cloud.resourcemanager.v3.TagHoldsClient" + }, + "method": { + "shortName": "DeleteTagHold", + "fullName": "google.cloud.resourcemanager.v3.TagHolds.DeleteTagHold", + "service": { + "shortName": "TagHolds", + "fullName": "google.cloud.resourcemanager.v3.TagHolds" + } + } + } + }, + { + "regionTag": "cloudresourcemanager_v3_generated_TagHolds_ListTagHolds_async", + "title": "Folders listTagHolds Sample", + "origin": "API_DEFINITION", + "description": " Lists TagHolds under a TagValue.", + "canonical": true, + "file": "tag_holds.list_tag_holds.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 80, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListTagHolds", + "fullName": "google.cloud.resourcemanager.v3.TagHolds.ListTagHolds", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.resourcemanager.v3.ListTagHoldsResponse", + "client": { + "shortName": "TagHoldsClient", + "fullName": "google.cloud.resourcemanager.v3.TagHoldsClient" + }, + "method": { + "shortName": "ListTagHolds", + "fullName": "google.cloud.resourcemanager.v3.TagHolds.ListTagHolds", + "service": { + "shortName": "TagHolds", + "fullName": "google.cloud.resourcemanager.v3.TagHolds" + } + } + } + }, { "regionTag": "cloudresourcemanager_v3_generated_TagKeys_ListTagKeys_async", "title": "Folders listTagKeys Sample", @@ -1346,7 +1538,7 @@ "segments": [ { "start": 25, - "end": 67, + "end": 68, "type": "FULL" } ], @@ -1423,11 +1615,51 @@ } } }, + { + "regionTag": "cloudresourcemanager_v3_generated_TagKeys_GetNamespacedTagKey_async", + "title": "Folders getNamespacedTagKey Sample", + "origin": "API_DEFINITION", + "description": " Retrieves a TagKey by its namespaced name. This method will return `PERMISSION_DENIED` if the key does not exist or the user does not have permission to view it.", + "canonical": true, + "file": "tag_keys.get_namespaced_tag_key.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetNamespacedTagKey", + "fullName": "google.cloud.resourcemanager.v3.TagKeys.GetNamespacedTagKey", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.resourcemanager.v3.TagKey", + "client": { + "shortName": "TagKeysClient", + "fullName": "google.cloud.resourcemanager.v3.TagKeysClient" + }, + "method": { + "shortName": "GetNamespacedTagKey", + "fullName": "google.cloud.resourcemanager.v3.TagKeys.GetNamespacedTagKey", + "service": { + "shortName": "TagKeys", + "fullName": "google.cloud.resourcemanager.v3.TagKeys" + } + } + } + }, { "regionTag": "cloudresourcemanager_v3_generated_TagKeys_CreateTagKey_async", "title": "Folders createTagKey Sample", "origin": "API_DEFINITION", - "description": " Creates a new TagKey. If another request with the same parameters is sent while the original request is in process, the second request will receive an error. A maximum of 300 TagKeys can exist under a parent at any given time.", + "description": " Creates a new TagKey. If another request with the same parameters is sent while the original request is in process, the second request will receive an error. A maximum of 1000 TagKeys can exist under a parent at any given time.", "canonical": true, "file": "tag_keys.create_tag_key.js", "language": "JAVASCRIPT", @@ -1710,7 +1942,7 @@ "segments": [ { "start": 25, - "end": 67, + "end": 66, "type": "FULL" } ], @@ -1751,14 +1983,14 @@ "regionTag": "cloudresourcemanager_v3_generated_TagValues_GetTagValue_async", "title": "Folders getTagValue Sample", "origin": "API_DEFINITION", - "description": " Retrieves TagValue. If the TagValue or namespaced name does not exist, or if the user does not have permission to view it, this method will return `PERMISSION_DENIED`.", + "description": " Retrieves a TagValue. This method will return `PERMISSION_DENIED` if the value does not exist or the user does not have permission to view it.", "canonical": true, "file": "tag_values.get_tag_value.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 53, + "end": 54, "type": "FULL" } ], @@ -1787,11 +2019,51 @@ } } }, + { + "regionTag": "cloudresourcemanager_v3_generated_TagValues_GetNamespacedTagValue_async", + "title": "Folders getNamespacedTagValue Sample", + "origin": "API_DEFINITION", + "description": " Retrieves a TagValue by its namespaced name. This method will return `PERMISSION_DENIED` if the value does not exist or the user does not have permission to view it.", + "canonical": true, + "file": "tag_values.get_namespaced_tag_value.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetNamespacedTagValue", + "fullName": "google.cloud.resourcemanager.v3.TagValues.GetNamespacedTagValue", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.resourcemanager.v3.TagValue", + "client": { + "shortName": "TagValuesClient", + "fullName": "google.cloud.resourcemanager.v3.TagValuesClient" + }, + "method": { + "shortName": "GetNamespacedTagValue", + "fullName": "google.cloud.resourcemanager.v3.TagValues.GetNamespacedTagValue", + "service": { + "shortName": "TagValues", + "fullName": "google.cloud.resourcemanager.v3.TagValues" + } + } + } + }, { "regionTag": "cloudresourcemanager_v3_generated_TagValues_CreateTagValue_async", "title": "Folders createTagValue Sample", "origin": "API_DEFINITION", - "description": " Creates a TagValue as a child of the specified TagKey. If a another request with the same parameters is sent while the original request is in process the second request will receive an error. A maximum of 300 TagValues can exist under a TagKey at any given time.", + "description": " Creates a TagValue as a child of the specified TagKey. If a another request with the same parameters is sent while the original request is in process the second request will receive an error. A maximum of 1000 TagValues can exist under a TagKey at any given time.", "canonical": true, "file": "tag_values.create_tag_value.js", "language": "JAVASCRIPT", @@ -1890,7 +2162,7 @@ "segments": [ { "start": 25, - "end": 64, + "end": 65, "type": "FULL" } ], diff --git a/packages/google-cloud-resourcemanager/samples/generated/v3/tag_bindings.create_tag_binding.js b/packages/google-cloud-resourcemanager/samples/generated/v3/tag_bindings.create_tag_binding.js index 30499cdc8a9..ad6a2166043 100644 --- a/packages/google-cloud-resourcemanager/samples/generated/v3/tag_bindings.create_tag_binding.js +++ b/packages/google-cloud-resourcemanager/samples/generated/v3/tag_bindings.create_tag_binding.js @@ -33,8 +33,8 @@ function main(tagBinding) { */ // const tagBinding = {} /** - * Optional. Set to true to perform the validations necessary for creating the resource, - * but not actually perform the action. + * Optional. Set to true to perform the validations necessary for creating the + * resource, but not actually perform the action. */ // const validateOnly = true diff --git a/packages/google-cloud-resourcemanager/samples/generated/v3/tag_bindings.list_effective_tags.js b/packages/google-cloud-resourcemanager/samples/generated/v3/tag_bindings.list_effective_tags.js new file mode 100644 index 00000000000..fb1d0a24397 --- /dev/null +++ b/packages/google-cloud-resourcemanager/samples/generated/v3/tag_bindings.list_effective_tags.js @@ -0,0 +1,76 @@ +// Copyright 2023 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 cloudresourcemanager_v3_generated_TagBindings_ListEffectiveTags_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 full resource name of a resource for which you want to list + * the effective tags. E.g. + * "//cloudresourcemanager.googleapis.com/projects/123" + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of effective tags to return in the response. + * The server allows a maximum of 300 effective tags to return in a single + * page. If unspecified, the server will use 100 as the default. + */ + // const pageSize = 1234 + /** + * Optional. A pagination token returned from a previous call to + * `ListEffectiveTags` that indicates from where this listing should continue. + */ + // const pageToken = 'abc123' + + // Imports the Resourcemanager library + const {TagBindingsClient} = require('@google-cloud/resource-manager').v3; + + // Instantiates a client + const resourcemanagerClient = new TagBindingsClient(); + + async function callListEffectiveTags() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await resourcemanagerClient.listEffectiveTagsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListEffectiveTags(); + // [END cloudresourcemanager_v3_generated_TagBindings_ListEffectiveTags_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-resourcemanager/samples/generated/v3/tag_bindings.list_tag_bindings.js b/packages/google-cloud-resourcemanager/samples/generated/v3/tag_bindings.list_tag_bindings.js index 77b3d29da32..5858d932c6c 100644 --- a/packages/google-cloud-resourcemanager/samples/generated/v3/tag_bindings.list_tag_bindings.js +++ b/packages/google-cloud-resourcemanager/samples/generated/v3/tag_bindings.list_tag_bindings.js @@ -29,20 +29,20 @@ function main(parent) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The full resource name of a resource for which you want to list existing - * TagBindings. - * E.g. "//cloudresourcemanager.googleapis.com/projects/123" + * Required. The full resource name of a resource for which you want to list + * existing TagBindings. E.g. + * "//cloudresourcemanager.googleapis.com/projects/123" */ // const parent = 'abc123' /** - * Optional. The maximum number of TagBindings to return in the response. The server - * allows a maximum of 300 TagBindings to return. If unspecified, the server - * will use 100 as the default. + * Optional. The maximum number of TagBindings to return in the response. The + * server allows a maximum of 300 TagBindings to return. If unspecified, the + * server will use 100 as the default. */ // const pageSize = 1234 /** - * Optional. A pagination token returned from a previous call to `ListTagBindings` - * that indicates where this listing should continue from. + * Optional. A pagination token returned from a previous call to + * `ListTagBindings` that indicates where this listing should continue from. */ // const pageToken = 'abc123' diff --git a/packages/google-cloud-resourcemanager/samples/generated/v3/tag_holds.create_tag_hold.js b/packages/google-cloud-resourcemanager/samples/generated/v3/tag_holds.create_tag_hold.js new file mode 100644 index 00000000000..ff05a49aa50 --- /dev/null +++ b/packages/google-cloud-resourcemanager/samples/generated/v3/tag_holds.create_tag_hold.js @@ -0,0 +1,73 @@ +// Copyright 2023 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, tagHold) { + // [START cloudresourcemanager_v3_generated_TagHolds_CreateTagHold_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 TagHold's parent TagValue. Must be of + * the form: `tagValues/{tag-value-id}`. + */ + // const parent = 'abc123' + /** + * Required. The TagHold to be created. + */ + // const tagHold = {} + /** + * Optional. Set to true to perform the validations necessary for creating the + * resource, but not actually perform the action. + */ + // const validateOnly = true + + // Imports the Resourcemanager library + const {TagHoldsClient} = require('@google-cloud/resource-manager').v3; + + // Instantiates a client + const resourcemanagerClient = new TagHoldsClient(); + + async function callCreateTagHold() { + // Construct request + const request = { + parent, + tagHold, + }; + + // Run request + const [operation] = await resourcemanagerClient.createTagHold(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateTagHold(); + // [END cloudresourcemanager_v3_generated_TagHolds_CreateTagHold_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-resourcemanager/samples/generated/v3/tag_holds.delete_tag_hold.js b/packages/google-cloud-resourcemanager/samples/generated/v3/tag_holds.delete_tag_hold.js new file mode 100644 index 00000000000..4d6a10c5f97 --- /dev/null +++ b/packages/google-cloud-resourcemanager/samples/generated/v3/tag_holds.delete_tag_hold.js @@ -0,0 +1,68 @@ +// Copyright 2023 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 cloudresourcemanager_v3_generated_TagHolds_DeleteTagHold_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 TagHold to delete. Must be of the form: + * `tagValues/{tag-value-id}/tagHolds/{tag-hold-id}`. + */ + // const name = 'abc123' + /** + * Optional. Set to true to perform the validations necessary for deleting the + * resource, but not actually perform the action. + */ + // const validateOnly = true + + // Imports the Resourcemanager library + const {TagHoldsClient} = require('@google-cloud/resource-manager').v3; + + // Instantiates a client + const resourcemanagerClient = new TagHoldsClient(); + + async function callDeleteTagHold() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await resourcemanagerClient.deleteTagHold(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteTagHold(); + // [END cloudresourcemanager_v3_generated_TagHolds_DeleteTagHold_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-resourcemanager/samples/generated/v3/tag_holds.list_tag_holds.js b/packages/google-cloud-resourcemanager/samples/generated/v3/tag_holds.list_tag_holds.js new file mode 100644 index 00000000000..d40a1c095ce --- /dev/null +++ b/packages/google-cloud-resourcemanager/samples/generated/v3/tag_holds.list_tag_holds.js @@ -0,0 +1,88 @@ +// Copyright 2023 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 cloudresourcemanager_v3_generated_TagHolds_ListTagHolds_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 parent TagValue. Must be of the form: + * `tagValues/{tag-value-id}`. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of TagHolds to return in the response. The + * server allows a maximum of 300 TagHolds to return. If unspecified, the + * server will use 100 as the default. + */ + // const pageSize = 1234 + /** + * Optional. A pagination token returned from a previous call to + * `ListTagHolds` that indicates where this listing should continue from. + */ + // const pageToken = 'abc123' + /** + * Optional. Criteria used to select a subset of TagHolds parented by the + * TagValue to return. This field follows the syntax defined by aip.dev/160; + * the `holder` and `origin` fields are supported for filtering. Currently + * only `AND` syntax is supported. Some example queries are: + * * `holder = + * //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group` + * * `origin = 35678234` + * * `holder = + * //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group + * AND origin = 35678234` + */ + // const filter = 'abc123' + + // Imports the Resourcemanager library + const {TagHoldsClient} = require('@google-cloud/resource-manager').v3; + + // Instantiates a client + const resourcemanagerClient = new TagHoldsClient(); + + async function callListTagHolds() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await resourcemanagerClient.listTagHoldsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListTagHolds(); + // [END cloudresourcemanager_v3_generated_TagHolds_ListTagHolds_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.create_tag_key.js b/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.create_tag_key.js index 5b0ab9e3ccb..b54df253335 100644 --- a/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.create_tag_key.js +++ b/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.create_tag_key.js @@ -29,13 +29,13 @@ function main(tagKey) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The TagKey to be created. Only fields `short_name`, `description`, - * and `parent` are considered during the creation request. + * Required. The TagKey to be created. Only fields `short_name`, + * `description`, and `parent` are considered during the creation request. */ // const tagKey = {} /** - * Optional. Set to true to perform validations necessary for creating the resource, but - * not actually perform the action. + * Optional. Set to true to perform validations necessary for creating the + * resource, but not actually perform the action. */ // const validateOnly = true diff --git a/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.delete_tag_key.js b/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.delete_tag_key.js index c2647d6efae..d9b671be828 100644 --- a/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.delete_tag_key.js +++ b/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.delete_tag_key.js @@ -29,19 +29,19 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name of a TagKey to be deleted in the format `tagKeys/123`. - * The TagKey cannot be a parent of any existing TagValues or it will not be - * deleted successfully. + * Required. The resource name of a TagKey to be deleted in the format + * `tagKeys/123`. The TagKey cannot be a parent of any existing TagValues or + * it will not be deleted successfully. */ // const name = 'abc123' /** - * Optional. Set as true to perform validations necessary for deletion, but not actually - * perform the action. + * Optional. Set as true to perform validations necessary for deletion, but + * not actually perform the action. */ // const validateOnly = true /** - * Optional. The etag known to the client for the expected state of the TagKey. This is - * to be used for optimistic concurrency. + * Optional. The etag known to the client for the expected state of the + * TagKey. This is to be used for optimistic concurrency. */ // const etag = 'abc123' diff --git a/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.get_namespaced_tag_key.js b/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.get_namespaced_tag_key.js new file mode 100644 index 00000000000..7861fabb92b --- /dev/null +++ b/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.get_namespaced_tag_key.js @@ -0,0 +1,64 @@ +// Copyright 2023 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 cloudresourcemanager_v3_generated_TagKeys_GetNamespacedTagKey_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. A namespaced tag key name in the format + * `{parentId}/{tagKeyShort}`, such as `42/foo` for a key with short name + * "foo" under the organization with ID 42 or `r2-d2/bar` for a key with short + * name "bar" under the project `r2-d2`. + */ + // const name = 'abc123' + + // Imports the Resourcemanager library + const {TagKeysClient} = require('@google-cloud/resource-manager').v3; + + // Instantiates a client + const resourcemanagerClient = new TagKeysClient(); + + async function callGetNamespacedTagKey() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await resourcemanagerClient.getNamespacedTagKey(request); + console.log(response); + } + + callGetNamespacedTagKey(); + // [END cloudresourcemanager_v3_generated_TagKeys_GetNamespacedTagKey_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.list_tag_keys.js b/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.list_tag_keys.js index 96239d69a0b..d141a4cfa26 100644 --- a/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.list_tag_keys.js +++ b/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.list_tag_keys.js @@ -29,14 +29,15 @@ function main(parent) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name of the new TagKey's parent. - * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. + * Required. The resource name of the TagKey's parent. + * Must be of the form `organizations/{org_id}` or `projects/{project_id}` or + * `projects/{project_number}` */ // const parent = 'abc123' /** - * Optional. The maximum number of TagKeys to return in the response. The server allows - * a maximum of 300 TagKeys to return. If unspecified, the server will use 100 - * as the default. + * Optional. The maximum number of TagKeys to return in the response. The + * server allows a maximum of 300 TagKeys to return. If unspecified, the + * server will use 100 as the default. */ // const pageSize = 1234 /** diff --git a/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.update_tag_key.js b/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.update_tag_key.js index e38ee8dddfc..3c3eca4f3a7 100644 --- a/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.update_tag_key.js +++ b/packages/google-cloud-resourcemanager/samples/generated/v3/tag_keys.update_tag_key.js @@ -29,10 +29,10 @@ function main(tagKey) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The new definition of the TagKey. Only the `description` and `etag` fields - * can be updated by this request. If the `etag` field is not empty, it - * must match the `etag` field of the existing tag key. Otherwise, - * `FAILED_PRECONDITION` will be returned. + * Required. The new definition of the TagKey. Only the `description` and + * `etag` fields can be updated by this request. If the `etag` field is not + * empty, it must match the `etag` field of the existing tag key. Otherwise, + * `ABORTED` will be returned. */ // const tagKey = {} /** diff --git a/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.create_tag_value.js b/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.create_tag_value.js index b770acf3fa8..63f9675d3ef 100644 --- a/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.create_tag_value.js +++ b/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.create_tag_value.js @@ -29,13 +29,13 @@ function main(tagValue) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The TagValue to be created. Only fields `short_name`, `description`, - * and `parent` are considered during the creation request. + * Required. The TagValue to be created. Only fields `short_name`, + * `description`, and `parent` are considered during the creation request. */ // const tagValue = {} /** - * Optional. Set as true to perform the validations necessary for creating the resource, - * but not actually perform the action. + * Optional. Set as true to perform the validations necessary for creating the + * resource, but not actually perform the action. */ // const validateOnly = true diff --git a/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.delete_tag_value.js b/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.delete_tag_value.js index a6b6f270958..1f0b1b768ad 100644 --- a/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.delete_tag_value.js +++ b/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.delete_tag_value.js @@ -29,17 +29,18 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. Resource name for TagValue to be deleted in the format tagValues/456. + * Required. Resource name for TagValue to be deleted in the format + * tagValues/456. */ // const name = 'abc123' /** - * Optional. Set as true to perform the validations necessary for deletion, but not - * actually perform the action. + * Optional. Set as true to perform the validations necessary for deletion, + * but not actually perform the action. */ // const validateOnly = true /** - * Optional. The etag known to the client for the expected state of the TagValue. This - * is to be used for optimistic concurrency. + * Optional. The etag known to the client for the expected state of the + * TagValue. This is to be used for optimistic concurrency. */ // const etag = 'abc123' diff --git a/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.get_namespaced_tag_value.js b/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.get_namespaced_tag_value.js new file mode 100644 index 00000000000..019c16379c3 --- /dev/null +++ b/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.get_namespaced_tag_value.js @@ -0,0 +1,67 @@ +// Copyright 2023 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 cloudresourcemanager_v3_generated_TagValues_GetNamespacedTagValue_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. A namespaced tag value name in the following format: + * `{parentId}/{tagKeyShort}/{tagValueShort}` + * Examples: + * - `42/foo/abc` for a value with short name "abc" under the key with short + * name "foo" under the organization with ID 42 + * - `r2-d2/bar/xyz` for a value with short name "xyz" under the key with + * short name "bar" under the project with ID "r2-d2" + */ + // const name = 'abc123' + + // Imports the Resourcemanager library + const {TagValuesClient} = require('@google-cloud/resource-manager').v3; + + // Instantiates a client + const resourcemanagerClient = new TagValuesClient(); + + async function callGetNamespacedTagValue() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await resourcemanagerClient.getNamespacedTagValue(request); + console.log(response); + } + + callGetNamespacedTagValue(); + // [END cloudresourcemanager_v3_generated_TagValues_GetNamespacedTagValue_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.get_tag_value.js b/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.get_tag_value.js index 96dbe57f51f..42eedb7b807 100644 --- a/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.get_tag_value.js +++ b/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.get_tag_value.js @@ -29,7 +29,8 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. Resource name for TagValue to be fetched in the format `tagValues/456`. + * Required. Resource name for TagValue to be fetched in the format + * `tagValues/456`. */ // const name = 'abc123' diff --git a/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.list_tag_values.js b/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.list_tag_values.js index ca0b3c2387a..fef7f2b88b1 100644 --- a/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.list_tag_values.js +++ b/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.list_tag_values.js @@ -29,19 +29,18 @@ function main(parent) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. Resource name for TagKey, parent of the TagValues to be listed, - * in the format `tagKeys/123`. + * Required. */ // const parent = 'abc123' /** - * Optional. The maximum number of TagValues to return in the response. The server - * allows a maximum of 300 TagValues to return. If unspecified, the server - * will use 100 as the default. + * Optional. The maximum number of TagValues to return in the response. The + * server allows a maximum of 300 TagValues to return. If unspecified, the + * server will use 100 as the default. */ // const pageSize = 1234 /** - * Optional. A pagination token returned from a previous call to `ListTagValues` - * that indicates where this listing should continue from. + * Optional. A pagination token returned from a previous call to + * `ListTagValues` that indicates where this listing should continue from. */ // const pageToken = 'abc123' diff --git a/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.update_tag_value.js b/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.update_tag_value.js index b0381ff5f43..8bc38601371 100644 --- a/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.update_tag_value.js +++ b/packages/google-cloud-resourcemanager/samples/generated/v3/tag_values.update_tag_value.js @@ -29,10 +29,10 @@ function main(tagValue) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The new definition of the TagValue. Only fields `description` and `etag` - * fields can be updated by this request. If the `etag` field is nonempty, it - * must match the `etag` field of the existing ControlGroup. Otherwise, - * `FAILED_PRECONDITION` will be returned. + * Required. The new definition of the TagValue. Only fields `description` and + * `etag` fields can be updated by this request. If the `etag` field is + * nonempty, it must match the `etag` field of the existing ControlGroup. + * Otherwise, `ABORTED` will be returned. */ // const tagValue = {} /** @@ -40,8 +40,8 @@ function main(tagValue) { */ // const updateMask = {} /** - * Optional. True to perform validations necessary for updating the resource, but not - * actually perform the action. + * Optional. True to perform validations necessary for updating the resource, + * but not actually perform the action. */ // const validateOnly = true diff --git a/packages/google-cloud-resourcemanager/samples/package.json b/packages/google-cloud-resourcemanager/samples/package.json index 0ab1f378ffc..a80eb34c0d8 100644 --- a/packages/google-cloud-resourcemanager/samples/package.json +++ b/packages/google-cloud-resourcemanager/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout=600000" }, "dependencies": { - "@google-cloud/resource-manager": "^4.2.2" + "@google-cloud/resource-manager": "^4.3.0" }, "devDependencies": { "chai": "^4.2.0", diff --git a/packages/google-cloud-resourcemanager/src/index.ts b/packages/google-cloud-resourcemanager/src/index.ts index 1cd97dcedbf..916f62a0439 100644 --- a/packages/google-cloud-resourcemanager/src/index.ts +++ b/packages/google-cloud-resourcemanager/src/index.ts @@ -26,6 +26,8 @@ const ProjectsClient = v3.ProjectsClient; type ProjectsClient = v3.ProjectsClient; const TagBindingsClient = v3.TagBindingsClient; type TagBindingsClient = v3.TagBindingsClient; +const TagHoldsClient = v3.TagHoldsClient; +type TagHoldsClient = v3.TagHoldsClient; const TagKeysClient = v3.TagKeysClient; type TagKeysClient = v3.TagKeysClient; const TagValuesClient = v3.TagValuesClient; @@ -37,6 +39,7 @@ export { OrganizationsClient, ProjectsClient, TagBindingsClient, + TagHoldsClient, TagKeysClient, TagValuesClient, }; @@ -46,6 +49,7 @@ export default { OrganizationsClient, ProjectsClient, TagBindingsClient, + TagHoldsClient, TagKeysClient, TagValuesClient, }; diff --git a/packages/google-cloud-resourcemanager/src/v3/folders_client.ts b/packages/google-cloud-resourcemanager/src/v3/folders_client.ts index d79f6d6928d..6a1c6661899 100644 --- a/packages/google-cloud-resourcemanager/src/v3/folders_client.ts +++ b/packages/google-cloud-resourcemanager/src/v3/folders_client.ts @@ -193,6 +193,9 @@ export class FoldersClient { tagBindingPathTemplate: new this._gaxModule.PathTemplate( 'tagBindings/{tag_binding}' ), + tagHoldPathTemplate: new this._gaxModule.PathTemplate( + 'tagValues/{tag_value}/tagHolds/{tag_hold}' + ), tagKeyPathTemplate: new this._gaxModule.PathTemplate('tagKeys/{tag_key}'), tagValuePathTemplate: new this._gaxModule.PathTemplate( 'tagValues/{tag_value}' @@ -856,8 +859,8 @@ export class FoldersClient { * @param {Object} request * The request object that will be sent. * @param {google.cloud.resourcemanager.v3.Folder} request.folder - * Required. The folder being created, only the display name and parent will be - * consulted. All other fields will be ignored. + * Required. The folder being created, only the display name and parent will + * be consulted. All other fields will be ignored. * @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. @@ -989,7 +992,9 @@ export class FoldersClient { * Updates a folder, changing its `display_name`. * Changes to the folder `display_name` will be rejected if they violate * either the `display_name` formatting rules or the naming constraints - * described in the {@link google.cloud.resourcemanager.v3.Folders.CreateFolder|CreateFolder} documentation. + * described in the + * {@link google.cloud.resourcemanager.v3.Folders.CreateFolder|CreateFolder} + * documentation. * * The folder's `display_name` must start and end with a letter or digit, * may contain letters, digits, spaces, hyphens and underscores and can be @@ -1005,8 +1010,8 @@ export class FoldersClient { * @param {Object} request * The request object that will be sent. * @param {google.cloud.resourcemanager.v3.Folder} request.folder - * Required. The new definition of the Folder. It must include the `name` field, which - * cannot be changed. + * Required. The new definition of the Folder. It must include the `name` + * field, which cannot be changed. * @param {google.protobuf.FieldMask} request.updateMask * Required. Fields to be updated. * Only the `display_name` can be updated. @@ -1156,9 +1161,9 @@ export class FoldersClient { * `FolderOperation` message as an aid to stateless clients. * Folder moves will be rejected if they violate either the naming, height, * or fanout constraints described in the - * {@link google.cloud.resourcemanager.v3.Folders.CreateFolder|CreateFolder} documentation. - * The caller must have `resourcemanager.folders.move` permission on the - * folder's current and proposed new parent. + * {@link google.cloud.resourcemanager.v3.Folders.CreateFolder|CreateFolder} + * documentation. The caller must have `resourcemanager.folders.move` + * permission on the folder's current and proposed new parent. * * @param {Object} request * The request object that will be sent. @@ -1166,9 +1171,9 @@ export class FoldersClient { * Required. The resource name of the Folder to move. * Must be of the form folders/{folder_id} * @param {string} request.destinationParent - * Required. The resource name of the folder or organization which should be the - * folder's new parent. - * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. + * Required. The resource name of the folder or organization which should be + * the folder's new parent. Must be of the form `folders/{folder_id}` or + * `organizations/{org_id}`. * @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. @@ -1302,11 +1307,13 @@ export class FoldersClient { } /** * Requests deletion of a folder. The folder is moved into the - * {@link google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED|DELETE_REQUESTED} state - * immediately, and is deleted approximately 30 days later. This method may - * only be called on an empty folder, where a folder is empty if it doesn't - * contain any folders or projects in the {@link google.cloud.resourcemanager.v3.Folder.State.ACTIVE|ACTIVE} state. - * If called on a folder in {@link google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED|DELETE_REQUESTED} + * {@link google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED|DELETE_REQUESTED} + * state immediately, and is deleted approximately 30 days later. This method + * may only be called on an empty folder, where a folder is empty if it + * doesn't contain any folders or projects in the + * {@link google.cloud.resourcemanager.v3.Folder.State.ACTIVE|ACTIVE} state. If + * called on a folder in + * {@link google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED|DELETE_REQUESTED} * state the operation will result in a no-op success. * The caller must have `resourcemanager.folders.delete` permission on the * identified folder. @@ -1449,14 +1456,16 @@ export class FoldersClient { } /** * Cancels the deletion request for a folder. This method may be called on a - * folder in any state. If the folder is in the {@link google.cloud.resourcemanager.v3.Folder.State.ACTIVE|ACTIVE} - * state the result will be a no-op success. In order to succeed, the folder's - * parent must be in the {@link google.cloud.resourcemanager.v3.Folder.State.ACTIVE|ACTIVE} state. In addition, - * reintroducing the folder into the tree must not violate folder naming, - * height, and fanout constraints described in the - * {@link google.cloud.resourcemanager.v3.Folders.CreateFolder|CreateFolder} documentation. - * The caller must have `resourcemanager.folders.undelete` permission on the - * identified folder. + * folder in any state. If the folder is in the + * {@link google.cloud.resourcemanager.v3.Folder.State.ACTIVE|ACTIVE} state the + * result will be a no-op success. In order to succeed, the folder's parent + * must be in the + * {@link google.cloud.resourcemanager.v3.Folder.State.ACTIVE|ACTIVE} state. In + * addition, reintroducing the folder into the tree must not violate folder + * naming, height, and fanout constraints described in the + * {@link google.cloud.resourcemanager.v3.Folders.CreateFolder|CreateFolder} + * documentation. The caller must have `resourcemanager.folders.undelete` + * permission on the identified folder. * * @param {Object} request * The request object that will be sent. @@ -1606,14 +1615,19 @@ export class FoldersClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the organization or folder whose folders are - * being listed. - * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. + * Required. The name of the parent resource whose folders are being listed. + * Only children of this parent resource are listed; descendants are not + * listed. + * + * If the parent is a folder, use the value `folders/{folder_id}`. If the + * parent is an organization, use the value `organizations/{org_id}`. + * * Access to this method is controlled by checking the * `resourcemanager.folders.list` permission on the `parent`. * @param {number} [request.pageSize] - * Optional. The maximum number of folders to return in the response. - * If unspecified, server picks an appropriate default. + * Optional. The maximum number of folders to return in the response. The + * server can return fewer folders than requested. If unspecified, server + * picks an appropriate default. * @param {string} [request.pageToken] * Optional. A pagination token returned from a previous call to `ListFolders` * that indicates where this listing should continue from. @@ -1710,14 +1724,19 @@ export class FoldersClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the organization or folder whose folders are - * being listed. - * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. + * Required. The name of the parent resource whose folders are being listed. + * Only children of this parent resource are listed; descendants are not + * listed. + * + * If the parent is a folder, use the value `folders/{folder_id}`. If the + * parent is an organization, use the value `organizations/{org_id}`. + * * Access to this method is controlled by checking the * `resourcemanager.folders.list` permission on the `parent`. * @param {number} [request.pageSize] - * Optional. The maximum number of folders to return in the response. - * If unspecified, server picks an appropriate default. + * Optional. The maximum number of folders to return in the response. The + * server can return fewer folders than requested. If unspecified, server + * picks an appropriate default. * @param {string} [request.pageToken] * Optional. A pagination token returned from a previous call to `ListFolders` * that indicates where this listing should continue from. @@ -1762,14 +1781,19 @@ export class FoldersClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the organization or folder whose folders are - * being listed. - * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. + * Required. The name of the parent resource whose folders are being listed. + * Only children of this parent resource are listed; descendants are not + * listed. + * + * If the parent is a folder, use the value `folders/{folder_id}`. If the + * parent is an organization, use the value `organizations/{org_id}`. + * * Access to this method is controlled by checking the * `resourcemanager.folders.list` permission on the `parent`. * @param {number} [request.pageSize] - * Optional. The maximum number of folders to return in the response. - * If unspecified, server picks an appropriate default. + * Optional. The maximum number of folders to return in the response. The + * server can return fewer folders than requested. If unspecified, server + * picks an appropriate default. * @param {string} [request.pageToken] * Optional. A pagination token returned from a previous call to `ListFolders` * that indicates where this listing should continue from. @@ -1818,11 +1842,12 @@ export class FoldersClient { * @param {Object} request * The request object that will be sent. * @param {number} [request.pageSize] - * Optional. The maximum number of folders to return in the response. - * If unspecified, server picks an appropriate default. + * Optional. The maximum number of folders to return in the response. The + * server can return fewer folders than requested. If unspecified, server + * picks an appropriate default. * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous call to `SearchFolders` - * that indicates from where search should continue. + * Optional. A pagination token returned from a previous call to + * `SearchFolders` that indicates from where search should continue. * @param {string} [request.query] * Optional. Search criteria used to select the folders to return. * If no search criteria is specified then all accessible folders will be @@ -1944,11 +1969,12 @@ export class FoldersClient { * @param {Object} request * The request object that will be sent. * @param {number} [request.pageSize] - * Optional. The maximum number of folders to return in the response. - * If unspecified, server picks an appropriate default. + * Optional. The maximum number of folders to return in the response. The + * server can return fewer folders than requested. If unspecified, server + * picks an appropriate default. * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous call to `SearchFolders` - * that indicates from where search should continue. + * Optional. A pagination token returned from a previous call to + * `SearchFolders` that indicates from where search should continue. * @param {string} [request.query] * Optional. Search criteria used to select the folders to return. * If no search criteria is specified then all accessible folders will be @@ -2018,11 +2044,12 @@ export class FoldersClient { * @param {Object} request * The request object that will be sent. * @param {number} [request.pageSize] - * Optional. The maximum number of folders to return in the response. - * If unspecified, server picks an appropriate default. + * Optional. The maximum number of folders to return in the response. The + * server can return fewer folders than requested. If unspecified, server + * picks an appropriate default. * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous call to `SearchFolders` - * that indicates from where search should continue. + * Optional. A pagination token returned from a previous call to + * `SearchFolders` that indicates from where search should continue. * @param {string} [request.query] * Optional. Search criteria used to select the folders to return. * If no search criteria is specified then all accessible folders will be @@ -2085,6 +2112,181 @@ export class FoldersClient { callSettings ) as AsyncIterable; } + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + // -------------------- // -- Path templates -- // -------------------- @@ -2183,6 +2385,42 @@ export class FoldersClient { .tag_binding; } + /** + * Return a fully-qualified tagHold resource name string. + * + * @param {string} tag_value + * @param {string} tag_hold + * @returns {string} Resource name string. + */ + tagHoldPath(tagValue: string, tagHold: string) { + return this.pathTemplates.tagHoldPathTemplate.render({ + tag_value: tagValue, + tag_hold: tagHold, + }); + } + + /** + * Parse the tag_value from TagHold resource. + * + * @param {string} tagHoldName + * A fully-qualified path representing TagHold resource. + * @returns {string} A string representing the tag_value. + */ + matchTagValueFromTagHoldName(tagHoldName: string) { + return this.pathTemplates.tagHoldPathTemplate.match(tagHoldName).tag_value; + } + + /** + * Parse the tag_hold from TagHold resource. + * + * @param {string} tagHoldName + * A fully-qualified path representing TagHold resource. + * @returns {string} A string representing the tag_hold. + */ + matchTagHoldFromTagHoldName(tagHoldName: string) { + return this.pathTemplates.tagHoldPathTemplate.match(tagHoldName).tag_hold; + } + /** * Return a fully-qualified tagKey resource name string. * diff --git a/packages/google-cloud-resourcemanager/src/v3/folders_proto_list.json b/packages/google-cloud-resourcemanager/src/v3/folders_proto_list.json index 0c0066033c0..639794aadd4 100644 --- a/packages/google-cloud-resourcemanager/src/v3/folders_proto_list.json +++ b/packages/google-cloud-resourcemanager/src/v3/folders_proto_list.json @@ -3,6 +3,7 @@ "../../protos/google/cloud/resourcemanager/v3/organizations.proto", "../../protos/google/cloud/resourcemanager/v3/projects.proto", "../../protos/google/cloud/resourcemanager/v3/tag_bindings.proto", + "../../protos/google/cloud/resourcemanager/v3/tag_holds.proto", "../../protos/google/cloud/resourcemanager/v3/tag_keys.proto", "../../protos/google/cloud/resourcemanager/v3/tag_values.proto" ] diff --git a/packages/google-cloud-resourcemanager/src/v3/gapic_metadata.json b/packages/google-cloud-resourcemanager/src/v3/gapic_metadata.json index 066fbe71144..c68b1fa08e0 100644 --- a/packages/google-cloud-resourcemanager/src/v3/gapic_metadata.json +++ b/packages/google-cloud-resourcemanager/src/v3/gapic_metadata.json @@ -358,6 +358,13 @@ "listTagBindingsStream", "listTagBindingsAsync" ] + }, + "ListEffectiveTags": { + "methods": [ + "listEffectiveTags", + "listEffectiveTagsStream", + "listEffectiveTagsAsync" + ] } } }, @@ -380,6 +387,61 @@ "listTagBindingsStream", "listTagBindingsAsync" ] + }, + "ListEffectiveTags": { + "methods": [ + "listEffectiveTags", + "listEffectiveTagsStream", + "listEffectiveTagsAsync" + ] + } + } + } + } + }, + "TagHolds": { + "clients": { + "grpc": { + "libraryClient": "TagHoldsClient", + "rpcs": { + "CreateTagHold": { + "methods": [ + "createTagHold" + ] + }, + "DeleteTagHold": { + "methods": [ + "deleteTagHold" + ] + }, + "ListTagHolds": { + "methods": [ + "listTagHolds", + "listTagHoldsStream", + "listTagHoldsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "TagHoldsClient", + "rpcs": { + "CreateTagHold": { + "methods": [ + "createTagHold" + ] + }, + "DeleteTagHold": { + "methods": [ + "deleteTagHold" + ] + }, + "ListTagHolds": { + "methods": [ + "listTagHolds", + "listTagHoldsStream", + "listTagHoldsAsync" + ] } } } @@ -395,6 +457,11 @@ "getTagKey" ] }, + "GetNamespacedTagKey": { + "methods": [ + "getNamespacedTagKey" + ] + }, "GetIamPolicy": { "methods": [ "getIamPolicy" @@ -442,6 +509,11 @@ "getTagKey" ] }, + "GetNamespacedTagKey": { + "methods": [ + "getNamespacedTagKey" + ] + }, "GetIamPolicy": { "methods": [ "getIamPolicy" @@ -493,6 +565,11 @@ "getTagValue" ] }, + "GetNamespacedTagValue": { + "methods": [ + "getNamespacedTagValue" + ] + }, "GetIamPolicy": { "methods": [ "getIamPolicy" @@ -540,6 +617,11 @@ "getTagValue" ] }, + "GetNamespacedTagValue": { + "methods": [ + "getNamespacedTagValue" + ] + }, "GetIamPolicy": { "methods": [ "getIamPolicy" diff --git a/packages/google-cloud-resourcemanager/src/v3/index.ts b/packages/google-cloud-resourcemanager/src/v3/index.ts index 7eab65b2174..a6fde064886 100644 --- a/packages/google-cloud-resourcemanager/src/v3/index.ts +++ b/packages/google-cloud-resourcemanager/src/v3/index.ts @@ -20,5 +20,6 @@ export {FoldersClient} from './folders_client'; export {OrganizationsClient} from './organizations_client'; export {ProjectsClient} from './projects_client'; export {TagBindingsClient} from './tag_bindings_client'; +export {TagHoldsClient} from './tag_holds_client'; export {TagKeysClient} from './tag_keys_client'; export {TagValuesClient} from './tag_values_client'; diff --git a/packages/google-cloud-resourcemanager/src/v3/organizations_client.ts b/packages/google-cloud-resourcemanager/src/v3/organizations_client.ts index bd6c54cef13..bbd5dd1b185 100644 --- a/packages/google-cloud-resourcemanager/src/v3/organizations_client.ts +++ b/packages/google-cloud-resourcemanager/src/v3/organizations_client.ts @@ -188,6 +188,9 @@ export class OrganizationsClient { tagBindingPathTemplate: new this._gaxModule.PathTemplate( 'tagBindings/{tag_binding}' ), + tagHoldPathTemplate: new this._gaxModule.PathTemplate( + 'tagValues/{tag_value}/tagHolds/{tag_hold}' + ), tagKeyPathTemplate: new this._gaxModule.PathTemplate('tagKeys/{tag_key}'), tagValuePathTemplate: new this._gaxModule.PathTemplate( 'tagValues/{tag_value}' @@ -352,9 +355,9 @@ export class OrganizationsClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The resource name of the Organization to fetch. This is the organization's - * relative path in the API, formatted as "organizations/[organizationId]". - * For example, "organizations/1234". + * Required. The resource name of the Organization to fetch. This is the + * organization's relative path in the API, formatted as + * "organizations/[organizationId]". For example, "organizations/1234". * @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. @@ -744,13 +747,15 @@ export class OrganizationsClient { * The request object that will be sent. * @param {number} [request.pageSize] * Optional. The maximum number of organizations to return in the response. - * If unspecified, server picks an appropriate default. + * The server can return fewer organizations than requested. If unspecified, + * server picks an appropriate default. * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous call to `SearchOrganizations` - * that indicates from where listing should continue. + * Optional. A pagination token returned from a previous call to + * `SearchOrganizations` that indicates from where listing should continue. * @param {string} [request.query] - * Optional. An optional query string used to filter the Organizations to return in - * the response. Query rules are case-insensitive. + * Optional. An optional query string used to filter the Organizations to + * return in the response. Query rules are case-insensitive. + * * * ``` * | Field | Description | @@ -857,13 +862,15 @@ export class OrganizationsClient { * The request object that will be sent. * @param {number} [request.pageSize] * Optional. The maximum number of organizations to return in the response. - * If unspecified, server picks an appropriate default. + * The server can return fewer organizations than requested. If unspecified, + * server picks an appropriate default. * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous call to `SearchOrganizations` - * that indicates from where listing should continue. + * Optional. A pagination token returned from a previous call to + * `SearchOrganizations` that indicates from where listing should continue. * @param {string} [request.query] - * Optional. An optional query string used to filter the Organizations to return in - * the response. Query rules are case-insensitive. + * Optional. An optional query string used to filter the Organizations to + * return in the response. Query rules are case-insensitive. + * * * ``` * | Field | Description | @@ -918,13 +925,15 @@ export class OrganizationsClient { * The request object that will be sent. * @param {number} [request.pageSize] * Optional. The maximum number of organizations to return in the response. - * If unspecified, server picks an appropriate default. + * The server can return fewer organizations than requested. If unspecified, + * server picks an appropriate default. * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous call to `SearchOrganizations` - * that indicates from where listing should continue. + * Optional. A pagination token returned from a previous call to + * `SearchOrganizations` that indicates from where listing should continue. * @param {string} [request.query] - * Optional. An optional query string used to filter the Organizations to return in - * the response. Query rules are case-insensitive. + * Optional. An optional query string used to filter the Organizations to + * return in the response. Query rules are case-insensitive. + * * * ``` * | Field | Description | @@ -1069,6 +1078,42 @@ export class OrganizationsClient { .tag_binding; } + /** + * Return a fully-qualified tagHold resource name string. + * + * @param {string} tag_value + * @param {string} tag_hold + * @returns {string} Resource name string. + */ + tagHoldPath(tagValue: string, tagHold: string) { + return this.pathTemplates.tagHoldPathTemplate.render({ + tag_value: tagValue, + tag_hold: tagHold, + }); + } + + /** + * Parse the tag_value from TagHold resource. + * + * @param {string} tagHoldName + * A fully-qualified path representing TagHold resource. + * @returns {string} A string representing the tag_value. + */ + matchTagValueFromTagHoldName(tagHoldName: string) { + return this.pathTemplates.tagHoldPathTemplate.match(tagHoldName).tag_value; + } + + /** + * Parse the tag_hold from TagHold resource. + * + * @param {string} tagHoldName + * A fully-qualified path representing TagHold resource. + * @returns {string} A string representing the tag_hold. + */ + matchTagHoldFromTagHoldName(tagHoldName: string) { + return this.pathTemplates.tagHoldPathTemplate.match(tagHoldName).tag_hold; + } + /** * Return a fully-qualified tagKey resource name string. * diff --git a/packages/google-cloud-resourcemanager/src/v3/organizations_proto_list.json b/packages/google-cloud-resourcemanager/src/v3/organizations_proto_list.json index 0c0066033c0..639794aadd4 100644 --- a/packages/google-cloud-resourcemanager/src/v3/organizations_proto_list.json +++ b/packages/google-cloud-resourcemanager/src/v3/organizations_proto_list.json @@ -3,6 +3,7 @@ "../../protos/google/cloud/resourcemanager/v3/organizations.proto", "../../protos/google/cloud/resourcemanager/v3/projects.proto", "../../protos/google/cloud/resourcemanager/v3/tag_bindings.proto", + "../../protos/google/cloud/resourcemanager/v3/tag_holds.proto", "../../protos/google/cloud/resourcemanager/v3/tag_keys.proto", "../../protos/google/cloud/resourcemanager/v3/tag_values.proto" ] diff --git a/packages/google-cloud-resourcemanager/src/v3/projects_client.ts b/packages/google-cloud-resourcemanager/src/v3/projects_client.ts index 7a523088052..44cad90c312 100644 --- a/packages/google-cloud-resourcemanager/src/v3/projects_client.ts +++ b/packages/google-cloud-resourcemanager/src/v3/projects_client.ts @@ -191,6 +191,9 @@ export class ProjectsClient { tagBindingPathTemplate: new this._gaxModule.PathTemplate( 'tagBindings/{tag_binding}' ), + tagHoldPathTemplate: new this._gaxModule.PathTemplate( + 'tagValues/{tag_value}/tagHolds/{tag_hold}' + ), tagKeyPathTemplate: new this._gaxModule.PathTemplate('tagKeys/{tag_key}'), tagValuePathTemplate: new this._gaxModule.PathTemplate( 'tagValues/{tag_value}' @@ -538,7 +541,8 @@ export class ProjectsClient { return this.innerApiCalls.getProject(request, options, callback); } /** - * Returns the IAM access control policy for the specified project. + * Returns the IAM access control policy for the specified project, in the + * format `projects/{ProjectIdOrNumber}` e.g. projects/123. * Permission is denied if the policy or the resource do not exist. * * @param {Object} request @@ -626,7 +630,8 @@ export class ProjectsClient { return this.innerApiCalls.getIamPolicy(request, options, callback); } /** - * Sets the IAM access control policy for the specified project. + * Sets the IAM access control policy for the specified project, in the + * format `projects/{ProjectIdOrNumber}` e.g. projects/123. * * CAUTION: This method will replace the existing policy, and cannot be used * to append additional IAM settings. @@ -658,18 +663,14 @@ export class ProjectsClient { * `setIamPolicy()`; * they must be sent only using the Cloud Platform Console. * - * + Membership changes that leave the project without any owners that have - * accepted the Terms of Service (ToS) will be rejected. - * * + If the project is not part of an organization, there must be at least * one owner who has accepted the Terms of Service (ToS) agreement in the * policy. Calling `setIamPolicy()` to remove the last ToS-accepted owner * from the policy will fail. This restriction also applies to legacy * projects that no longer have owners who have accepted the ToS. Edits to * IAM policies will be rejected until the lack of a ToS-accepting owner is - * rectified. - * - * + Calling this method requires enabling the App Engine Admin API. + * rectified. If the project is part of an organization, you can remove all + * owners, potentially making the organization inaccessible. * * @param {Object} request * The request object that will be sent. @@ -764,7 +765,8 @@ export class ProjectsClient { return this.innerApiCalls.setIamPolicy(request, options, callback); } /** - * Returns permissions that a caller has on the specified project. + * Returns permissions that a caller has on the specified project, in the + * format `projects/{ProjectIdOrNumber}` e.g. projects/123.. * * @param {Object} request * The request object that will be sent. @@ -870,7 +872,7 @@ export class ProjectsClient { * * If the `parent` field is set, the `resourcemanager.projects.create` * permission is checked on the parent resource. If no parent is set and - * the authorization credentials belong to an Organziation, the parent + * the authorization credentials belong to an Organization, the parent * will be set to that Organization. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -1153,9 +1155,12 @@ export class ProjectsClient { * Upon success, the `Operation.response` field will be populated with the * moved project. * - * The caller must have `resourcemanager.projects.update` permission on the - * project and have `resourcemanager.projects.move` permission on the - * project's current and proposed new parent. + * The caller must have `resourcemanager.projects.move` permission on the + * project, on the project's current and proposed new parent. + * + * If project has no current parent, or it currently does not have an + * associated organization resource, you will also need the + * `resourcemanager.projects.setIamPolicy` permission in the project. * * * @@ -1305,7 +1310,8 @@ export class ProjectsClient { * * This method changes the Project's lifecycle state from * {@link google.cloud.resourcemanager.v3.Project.State.ACTIVE|ACTIVE} - * to {@link google.cloud.resourcemanager.v3.Project.State.DELETE_REQUESTED|DELETE_REQUESTED}. + * to + * {@link google.cloud.resourcemanager.v3.Project.State.DELETE_REQUESTED|DELETE_REQUESTED}. * The deletion starts at an unspecified time, * at which point the Project is no longer accessible. * @@ -1624,21 +1630,23 @@ export class ProjectsClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The name of the parent resource to list projects under. + * Required. The name of the parent resource whose projects are being listed. + * Only children of this parent resource are listed; descendants are not + * listed. * - * For example, setting this field to 'folders/1234' would list all projects - * directly under that folder. + * If the parent is a folder, use the value `folders/{folder_id}`. If the + * parent is an organization, use the value `organizations/{org_id}`. * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous call to [ListProjects] - * [google.cloud.resourcemanager.v3.Projects.ListProjects] - * that indicates from where listing should continue. + * Optional. A pagination token returned from a previous call to + * [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects] that + * indicates from where listing should continue. * @param {number} [request.pageSize] * Optional. The maximum number of projects to return in the response. * The server can return fewer projects than requested. * If unspecified, server picks an appropriate default. * @param {boolean} [request.showDeleted] - * Optional. Indicate that projects in the `DELETE_REQUESTED` state should also be - * returned. Normally only `ACTIVE` projects are returned. + * Optional. Indicate that projects in the `DELETE_REQUESTED` state should + * also be returned. Normally only `ACTIVE` projects are returned. * @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. @@ -1728,21 +1736,23 @@ export class ProjectsClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The name of the parent resource to list projects under. + * Required. The name of the parent resource whose projects are being listed. + * Only children of this parent resource are listed; descendants are not + * listed. * - * For example, setting this field to 'folders/1234' would list all projects - * directly under that folder. + * If the parent is a folder, use the value `folders/{folder_id}`. If the + * parent is an organization, use the value `organizations/{org_id}`. * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous call to [ListProjects] - * [google.cloud.resourcemanager.v3.Projects.ListProjects] - * that indicates from where listing should continue. + * Optional. A pagination token returned from a previous call to + * [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects] that + * indicates from where listing should continue. * @param {number} [request.pageSize] * Optional. The maximum number of projects to return in the response. * The server can return fewer projects than requested. * If unspecified, server picks an appropriate default. * @param {boolean} [request.showDeleted] - * Optional. Indicate that projects in the `DELETE_REQUESTED` state should also be - * returned. Normally only `ACTIVE` projects are returned. + * Optional. Indicate that projects in the `DELETE_REQUESTED` state should + * also be returned. Normally only `ACTIVE` projects are returned. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -1780,21 +1790,23 @@ export class ProjectsClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The name of the parent resource to list projects under. + * Required. The name of the parent resource whose projects are being listed. + * Only children of this parent resource are listed; descendants are not + * listed. * - * For example, setting this field to 'folders/1234' would list all projects - * directly under that folder. + * If the parent is a folder, use the value `folders/{folder_id}`. If the + * parent is an organization, use the value `organizations/{org_id}`. * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous call to [ListProjects] - * [google.cloud.resourcemanager.v3.Projects.ListProjects] - * that indicates from where listing should continue. + * Optional. A pagination token returned from a previous call to + * [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects] that + * indicates from where listing should continue. * @param {number} [request.pageSize] * Optional. The maximum number of projects to return in the response. * The server can return fewer projects than requested. * If unspecified, server picks an appropriate default. * @param {boolean} [request.showDeleted] - * Optional. Indicate that projects in the `DELETE_REQUESTED` state should also be - * returned. Normally only `ACTIVE` projects are returned. + * Optional. Indicate that projects in the `DELETE_REQUESTED` state should + * also be returned. Normally only `ACTIVE` projects are returned. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -1842,47 +1854,41 @@ export class ProjectsClient { * @param {string} [request.query] * Optional. A query string for searching for projects that the caller has * `resourcemanager.projects.get` permission to. If multiple fields are - * included in the query, the it will return results that match any of the + * included in the query, then it will return results that match any of the * fields. Some eligible fields are: * - * ``` - * | Field | Description | - * |-------------------------|----------------------------------------------| - * | displayName, name | Filters by displayName. | - * | parent | Project's parent. (for example: folders/123, - * organizations/*) Prefer parent field over parent.type and parent.id. | - * | parent.type | Parent's type: `folder` or `organization`. | - * | parent.id | Parent's id number (for example: 123) | - * | id, projectId | Filters by projectId. | - * | state, lifecycleState | Filters by state. | - * | labels | Filters by label name or value. | - * | labels. (where *key* is the name of a label) | Filters by label - * name. | - * ``` + * - **`displayName`, `name`**: Filters by displayName. + * - **`parent`**: Project's parent (for example: `folders/123`, + * `organizations/*`). Prefer `parent` field over `parent.type` and + * `parent.id`. + * - **`parent.type`**: Parent's type: `folder` or `organization`. + * - **`parent.id`**: Parent's id number (for example: `123`). + * - **`id`, `projectId`**: Filters by projectId. + * - **`state`, `lifecycleState`**: Filters by state. + * - **`labels`**: Filters by label name or value. + * - **`labels.` (where `` is the name of a label)**: Filters by label + * name. * * Search expressions are case insensitive. * * Some examples queries: * - * ``` - * | Query | Description | - * |------------------|-----------------------------------------------------| - * | name:how* | The project's name starts with "how". | - * | name:Howl | The project's name is `Howl` or `howl`. | - * | name:HOWL | Equivalent to above. | - * | NAME:howl | Equivalent to above. | - * | labels.color:* | The project has the label `color`. | - * | labels.color:red | The project's label `color` has the value `red`. | - * | labels.color:red labels.size:big | The project's label `color` has - * the value `red` and its label `size` has the value `big`. | - * ``` + * + * - **`name:how*`**: The project's name starts with "how". + * - **`name:Howl`**: The project's name is `Howl` or `howl`. + * - **`name:HOWL`**: Equivalent to above. + * - **`NAME:howl`**: Equivalent to above. + * - **`labels.color:*`**: The project has the label `color`. + * - **`labels.color:red`**: The project's label `color` has the value `red`. + * - **`labels.color:red labels.size:big`**: The project's label `color` has + * the value `red` or its label `size` has the value `big`. * * If no query is specified, the call will return projects for which the user * has the `resourcemanager.projects.get` permission. * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous call to [ListProjects] - * [google.cloud.resourcemanager.v3.Projects.ListProjects] - * that indicates from where listing should continue. + * Optional. A pagination token returned from a previous call to + * [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects] that + * indicates from where listing should continue. * @param {number} [request.pageSize] * Optional. The maximum number of projects to return in the response. * The server can return fewer projects than requested. @@ -1978,47 +1984,41 @@ export class ProjectsClient { * @param {string} [request.query] * Optional. A query string for searching for projects that the caller has * `resourcemanager.projects.get` permission to. If multiple fields are - * included in the query, the it will return results that match any of the + * included in the query, then it will return results that match any of the * fields. Some eligible fields are: * - * ``` - * | Field | Description | - * |-------------------------|----------------------------------------------| - * | displayName, name | Filters by displayName. | - * | parent | Project's parent. (for example: folders/123, - * organizations/*) Prefer parent field over parent.type and parent.id. | - * | parent.type | Parent's type: `folder` or `organization`. | - * | parent.id | Parent's id number (for example: 123) | - * | id, projectId | Filters by projectId. | - * | state, lifecycleState | Filters by state. | - * | labels | Filters by label name or value. | - * | labels. (where *key* is the name of a label) | Filters by label - * name. | - * ``` + * - **`displayName`, `name`**: Filters by displayName. + * - **`parent`**: Project's parent (for example: `folders/123`, + * `organizations/*`). Prefer `parent` field over `parent.type` and + * `parent.id`. + * - **`parent.type`**: Parent's type: `folder` or `organization`. + * - **`parent.id`**: Parent's id number (for example: `123`). + * - **`id`, `projectId`**: Filters by projectId. + * - **`state`, `lifecycleState`**: Filters by state. + * - **`labels`**: Filters by label name or value. + * - **`labels.` (where `` is the name of a label)**: Filters by label + * name. * * Search expressions are case insensitive. * * Some examples queries: * - * ``` - * | Query | Description | - * |------------------|-----------------------------------------------------| - * | name:how* | The project's name starts with "how". | - * | name:Howl | The project's name is `Howl` or `howl`. | - * | name:HOWL | Equivalent to above. | - * | NAME:howl | Equivalent to above. | - * | labels.color:* | The project has the label `color`. | - * | labels.color:red | The project's label `color` has the value `red`. | - * | labels.color:red labels.size:big | The project's label `color` has - * the value `red` and its label `size` has the value `big`. | - * ``` + * + * - **`name:how*`**: The project's name starts with "how". + * - **`name:Howl`**: The project's name is `Howl` or `howl`. + * - **`name:HOWL`**: Equivalent to above. + * - **`NAME:howl`**: Equivalent to above. + * - **`labels.color:*`**: The project has the label `color`. + * - **`labels.color:red`**: The project's label `color` has the value `red`. + * - **`labels.color:red labels.size:big`**: The project's label `color` has + * the value `red` or its label `size` has the value `big`. * * If no query is specified, the call will return projects for which the user * has the `resourcemanager.projects.get` permission. * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous call to [ListProjects] - * [google.cloud.resourcemanager.v3.Projects.ListProjects] - * that indicates from where listing should continue. + * Optional. A pagination token returned from a previous call to + * [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects] that + * indicates from where listing should continue. * @param {number} [request.pageSize] * Optional. The maximum number of projects to return in the response. * The server can return fewer projects than requested. @@ -2062,47 +2062,41 @@ export class ProjectsClient { * @param {string} [request.query] * Optional. A query string for searching for projects that the caller has * `resourcemanager.projects.get` permission to. If multiple fields are - * included in the query, the it will return results that match any of the + * included in the query, then it will return results that match any of the * fields. Some eligible fields are: * - * ``` - * | Field | Description | - * |-------------------------|----------------------------------------------| - * | displayName, name | Filters by displayName. | - * | parent | Project's parent. (for example: folders/123, - * organizations/*) Prefer parent field over parent.type and parent.id. | - * | parent.type | Parent's type: `folder` or `organization`. | - * | parent.id | Parent's id number (for example: 123) | - * | id, projectId | Filters by projectId. | - * | state, lifecycleState | Filters by state. | - * | labels | Filters by label name or value. | - * | labels. (where *key* is the name of a label) | Filters by label - * name. | - * ``` + * - **`displayName`, `name`**: Filters by displayName. + * - **`parent`**: Project's parent (for example: `folders/123`, + * `organizations/*`). Prefer `parent` field over `parent.type` and + * `parent.id`. + * - **`parent.type`**: Parent's type: `folder` or `organization`. + * - **`parent.id`**: Parent's id number (for example: `123`). + * - **`id`, `projectId`**: Filters by projectId. + * - **`state`, `lifecycleState`**: Filters by state. + * - **`labels`**: Filters by label name or value. + * - **`labels.` (where `` is the name of a label)**: Filters by label + * name. * * Search expressions are case insensitive. * * Some examples queries: * - * ``` - * | Query | Description | - * |------------------|-----------------------------------------------------| - * | name:how* | The project's name starts with "how". | - * | name:Howl | The project's name is `Howl` or `howl`. | - * | name:HOWL | Equivalent to above. | - * | NAME:howl | Equivalent to above. | - * | labels.color:* | The project has the label `color`. | - * | labels.color:red | The project's label `color` has the value `red`. | - * | labels.color:red labels.size:big | The project's label `color` has - * the value `red` and its label `size` has the value `big`. | - * ``` + * + * - **`name:how*`**: The project's name starts with "how". + * - **`name:Howl`**: The project's name is `Howl` or `howl`. + * - **`name:HOWL`**: Equivalent to above. + * - **`NAME:howl`**: Equivalent to above. + * - **`labels.color:*`**: The project has the label `color`. + * - **`labels.color:red`**: The project's label `color` has the value `red`. + * - **`labels.color:red labels.size:big`**: The project's label `color` has + * the value `red` or its label `size` has the value `big`. * * If no query is specified, the call will return projects for which the user * has the `resourcemanager.projects.get` permission. * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous call to [ListProjects] - * [google.cloud.resourcemanager.v3.Projects.ListProjects] - * that indicates from where listing should continue. + * Optional. A pagination token returned from a previous call to + * [ListProjects] [google.cloud.resourcemanager.v3.Projects.ListProjects] that + * indicates from where listing should continue. * @param {number} [request.pageSize] * Optional. The maximum number of projects to return in the response. * The server can return fewer projects than requested. @@ -2137,6 +2131,181 @@ export class ProjectsClient { callSettings ) as AsyncIterable; } + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + // -------------------- // -- Path templates -- // -------------------- @@ -2235,6 +2404,42 @@ export class ProjectsClient { .tag_binding; } + /** + * Return a fully-qualified tagHold resource name string. + * + * @param {string} tag_value + * @param {string} tag_hold + * @returns {string} Resource name string. + */ + tagHoldPath(tagValue: string, tagHold: string) { + return this.pathTemplates.tagHoldPathTemplate.render({ + tag_value: tagValue, + tag_hold: tagHold, + }); + } + + /** + * Parse the tag_value from TagHold resource. + * + * @param {string} tagHoldName + * A fully-qualified path representing TagHold resource. + * @returns {string} A string representing the tag_value. + */ + matchTagValueFromTagHoldName(tagHoldName: string) { + return this.pathTemplates.tagHoldPathTemplate.match(tagHoldName).tag_value; + } + + /** + * Parse the tag_hold from TagHold resource. + * + * @param {string} tagHoldName + * A fully-qualified path representing TagHold resource. + * @returns {string} A string representing the tag_hold. + */ + matchTagHoldFromTagHoldName(tagHoldName: string) { + return this.pathTemplates.tagHoldPathTemplate.match(tagHoldName).tag_hold; + } + /** * Return a fully-qualified tagKey resource name string. * diff --git a/packages/google-cloud-resourcemanager/src/v3/projects_proto_list.json b/packages/google-cloud-resourcemanager/src/v3/projects_proto_list.json index 0c0066033c0..639794aadd4 100644 --- a/packages/google-cloud-resourcemanager/src/v3/projects_proto_list.json +++ b/packages/google-cloud-resourcemanager/src/v3/projects_proto_list.json @@ -3,6 +3,7 @@ "../../protos/google/cloud/resourcemanager/v3/organizations.proto", "../../protos/google/cloud/resourcemanager/v3/projects.proto", "../../protos/google/cloud/resourcemanager/v3/tag_bindings.proto", + "../../protos/google/cloud/resourcemanager/v3/tag_holds.proto", "../../protos/google/cloud/resourcemanager/v3/tag_keys.proto", "../../protos/google/cloud/resourcemanager/v3/tag_values.proto" ] diff --git a/packages/google-cloud-resourcemanager/src/v3/tag_bindings_client.ts b/packages/google-cloud-resourcemanager/src/v3/tag_bindings_client.ts index d64ddc581ae..63fdcae175b 100644 --- a/packages/google-cloud-resourcemanager/src/v3/tag_bindings_client.ts +++ b/packages/google-cloud-resourcemanager/src/v3/tag_bindings_client.ts @@ -41,7 +41,7 @@ const version = require('../../../package.json').version; /** * Allow users to create and manage TagBindings between TagValues and - * different cloud resources throughout the GCP resource hierarchy. + * different Google Cloud resources throughout the GCP resource hierarchy. * @class * @memberof v3 */ @@ -192,6 +192,9 @@ export class TagBindingsClient { tagBindingPathTemplate: new this._gaxModule.PathTemplate( 'tagBindings/{tag_binding}' ), + tagHoldPathTemplate: new this._gaxModule.PathTemplate( + 'tagValues/{tag_value}/tagHolds/{tag_hold}' + ), tagKeyPathTemplate: new this._gaxModule.PathTemplate('tagKeys/{tag_key}'), tagValuePathTemplate: new this._gaxModule.PathTemplate( 'tagValues/{tag_value}' @@ -207,6 +210,11 @@ export class TagBindingsClient { 'nextPageToken', 'tagBindings' ), + listEffectiveTags: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'effectiveTags' + ), }; const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); @@ -308,6 +316,7 @@ export class TagBindingsClient { 'listTagBindings', 'createTagBinding', 'deleteTagBinding', + 'listEffectiveTags', ]; for (const methodName of tagBindingsStubMethods) { const callPromise = this.tagBindingsStub.then( @@ -399,16 +408,15 @@ export class TagBindingsClient { // ------------------- /** - * Creates a TagBinding between a TagValue and a cloud resource - * (currently project, folder, or organization). + * Creates a TagBinding between a TagValue and a Google Cloud resource. * * @param {Object} request * The request object that will be sent. * @param {google.cloud.resourcemanager.v3.TagBinding} request.tagBinding * Required. The TagBinding to be created. * @param {boolean} [request.validateOnly] - * Optional. Set to true to perform the validations necessary for creating the resource, - * but not actually perform the action. + * Optional. Set to true to perform the validations necessary for creating the + * resource, but not actually perform the action. * @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. @@ -677,8 +685,8 @@ export class TagBindingsClient { >; } /** - * Lists the TagBindings for the given cloud resource, as specified with - * `parent`. + * Lists the TagBindings for the given Google Cloud resource, as specified + * with `parent`. * * NOTE: The `parent` field is expected to be a full resource name: * https://cloud.google.com/apis/design/resource_names#full_resource_name @@ -686,16 +694,16 @@ export class TagBindingsClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The full resource name of a resource for which you want to list existing - * TagBindings. - * E.g. "//cloudresourcemanager.googleapis.com/projects/123" + * Required. The full resource name of a resource for which you want to list + * existing TagBindings. E.g. + * "//cloudresourcemanager.googleapis.com/projects/123" * @param {number} [request.pageSize] - * Optional. The maximum number of TagBindings to return in the response. The server - * allows a maximum of 300 TagBindings to return. If unspecified, the server - * will use 100 as the default. + * Optional. The maximum number of TagBindings to return in the response. The + * server allows a maximum of 300 TagBindings to return. If unspecified, the + * server will use 100 as the default. * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous call to `ListTagBindings` - * that indicates where this listing should continue from. + * Optional. A pagination token returned from a previous call to + * `ListTagBindings` that indicates where this listing should continue from. * @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. @@ -785,16 +793,16 @@ export class TagBindingsClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The full resource name of a resource for which you want to list existing - * TagBindings. - * E.g. "//cloudresourcemanager.googleapis.com/projects/123" + * Required. The full resource name of a resource for which you want to list + * existing TagBindings. E.g. + * "//cloudresourcemanager.googleapis.com/projects/123" * @param {number} [request.pageSize] - * Optional. The maximum number of TagBindings to return in the response. The server - * allows a maximum of 300 TagBindings to return. If unspecified, the server - * will use 100 as the default. + * Optional. The maximum number of TagBindings to return in the response. The + * server allows a maximum of 300 TagBindings to return. If unspecified, the + * server will use 100 as the default. * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous call to `ListTagBindings` - * that indicates where this listing should continue from. + * Optional. A pagination token returned from a previous call to + * `ListTagBindings` that indicates where this listing should continue from. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -832,16 +840,16 @@ export class TagBindingsClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The full resource name of a resource for which you want to list existing - * TagBindings. - * E.g. "//cloudresourcemanager.googleapis.com/projects/123" + * Required. The full resource name of a resource for which you want to list + * existing TagBindings. E.g. + * "//cloudresourcemanager.googleapis.com/projects/123" * @param {number} [request.pageSize] - * Optional. The maximum number of TagBindings to return in the response. The server - * allows a maximum of 300 TagBindings to return. If unspecified, the server - * will use 100 as the default. + * Optional. The maximum number of TagBindings to return in the response. The + * server allows a maximum of 300 TagBindings to return. If unspecified, the + * server will use 100 as the default. * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous call to `ListTagBindings` - * that indicates where this listing should continue from. + * Optional. A pagination token returned from a previous call to + * `ListTagBindings` that indicates where this listing should continue from. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -872,6 +880,374 @@ export class TagBindingsClient { callSettings ) as AsyncIterable; } + /** + * Return a list of effective tags for the given Google Cloud resource, as + * specified in `parent`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The full resource name of a resource for which you want to list + * the effective tags. E.g. + * "//cloudresourcemanager.googleapis.com/projects/123" + * @param {number} [request.pageSize] + * Optional. The maximum number of effective tags to return in the response. + * The server allows a maximum of 300 effective tags to return in a single + * page. If unspecified, the server will use 100 as the default. + * @param {string} [request.pageToken] + * Optional. A pagination token returned from a previous call to + * `ListEffectiveTags` that indicates from where this listing should continue. + * @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 google.cloud.resourcemanager.v3.EffectiveTag | EffectiveTag}. + * 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 `listEffectiveTagsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listEffectiveTags( + request?: protos.google.cloud.resourcemanager.v3.IListEffectiveTagsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.resourcemanager.v3.IEffectiveTag[], + protos.google.cloud.resourcemanager.v3.IListEffectiveTagsRequest | null, + protos.google.cloud.resourcemanager.v3.IListEffectiveTagsResponse + ] + >; + listEffectiveTags( + request: protos.google.cloud.resourcemanager.v3.IListEffectiveTagsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.resourcemanager.v3.IListEffectiveTagsRequest, + | protos.google.cloud.resourcemanager.v3.IListEffectiveTagsResponse + | null + | undefined, + protos.google.cloud.resourcemanager.v3.IEffectiveTag + > + ): void; + listEffectiveTags( + request: protos.google.cloud.resourcemanager.v3.IListEffectiveTagsRequest, + callback: PaginationCallback< + protos.google.cloud.resourcemanager.v3.IListEffectiveTagsRequest, + | protos.google.cloud.resourcemanager.v3.IListEffectiveTagsResponse + | null + | undefined, + protos.google.cloud.resourcemanager.v3.IEffectiveTag + > + ): void; + listEffectiveTags( + request?: protos.google.cloud.resourcemanager.v3.IListEffectiveTagsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.resourcemanager.v3.IListEffectiveTagsRequest, + | protos.google.cloud.resourcemanager.v3.IListEffectiveTagsResponse + | null + | undefined, + protos.google.cloud.resourcemanager.v3.IEffectiveTag + >, + callback?: PaginationCallback< + protos.google.cloud.resourcemanager.v3.IListEffectiveTagsRequest, + | protos.google.cloud.resourcemanager.v3.IListEffectiveTagsResponse + | null + | undefined, + protos.google.cloud.resourcemanager.v3.IEffectiveTag + > + ): Promise< + [ + protos.google.cloud.resourcemanager.v3.IEffectiveTag[], + protos.google.cloud.resourcemanager.v3.IListEffectiveTagsRequest | null, + protos.google.cloud.resourcemanager.v3.IListEffectiveTagsResponse + ] + > | 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 || {}; + this.initialize(); + return this.innerApiCalls.listEffectiveTags(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The full resource name of a resource for which you want to list + * the effective tags. E.g. + * "//cloudresourcemanager.googleapis.com/projects/123" + * @param {number} [request.pageSize] + * Optional. The maximum number of effective tags to return in the response. + * The server allows a maximum of 300 effective tags to return in a single + * page. If unspecified, the server will use 100 as the default. + * @param {string} [request.pageToken] + * Optional. A pagination token returned from a previous call to + * `ListEffectiveTags` that indicates from where this listing should continue. + * @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 google.cloud.resourcemanager.v3.EffectiveTag | EffectiveTag} 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 `listEffectiveTagsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listEffectiveTagsStream( + request?: protos.google.cloud.resourcemanager.v3.IListEffectiveTagsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + const defaultCallSettings = this._defaults['listEffectiveTags']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listEffectiveTags.createStream( + this.innerApiCalls.listEffectiveTags as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listEffectiveTags`, 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 full resource name of a resource for which you want to list + * the effective tags. E.g. + * "//cloudresourcemanager.googleapis.com/projects/123" + * @param {number} [request.pageSize] + * Optional. The maximum number of effective tags to return in the response. + * The server allows a maximum of 300 effective tags to return in a single + * page. If unspecified, the server will use 100 as the default. + * @param {string} [request.pageToken] + * Optional. A pagination token returned from a previous call to + * `ListEffectiveTags` that indicates from where this listing should continue. + * @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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.resourcemanager.v3.EffectiveTag | EffectiveTag}. 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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v3/tag_bindings.list_effective_tags.js + * region_tag:cloudresourcemanager_v3_generated_TagBindings_ListEffectiveTags_async + */ + listEffectiveTagsAsync( + request?: protos.google.cloud.resourcemanager.v3.IListEffectiveTagsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + const defaultCallSettings = this._defaults['listEffectiveTags']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listEffectiveTags.asyncIterate( + this.innerApiCalls['listEffectiveTags'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + // -------------------- // -- Path templates -- // -------------------- @@ -970,6 +1346,42 @@ export class TagBindingsClient { .tag_binding; } + /** + * Return a fully-qualified tagHold resource name string. + * + * @param {string} tag_value + * @param {string} tag_hold + * @returns {string} Resource name string. + */ + tagHoldPath(tagValue: string, tagHold: string) { + return this.pathTemplates.tagHoldPathTemplate.render({ + tag_value: tagValue, + tag_hold: tagHold, + }); + } + + /** + * Parse the tag_value from TagHold resource. + * + * @param {string} tagHoldName + * A fully-qualified path representing TagHold resource. + * @returns {string} A string representing the tag_value. + */ + matchTagValueFromTagHoldName(tagHoldName: string) { + return this.pathTemplates.tagHoldPathTemplate.match(tagHoldName).tag_value; + } + + /** + * Parse the tag_hold from TagHold resource. + * + * @param {string} tagHoldName + * A fully-qualified path representing TagHold resource. + * @returns {string} A string representing the tag_hold. + */ + matchTagHoldFromTagHoldName(tagHoldName: string) { + return this.pathTemplates.tagHoldPathTemplate.match(tagHoldName).tag_hold; + } + /** * Return a fully-qualified tagKey resource name string. * diff --git a/packages/google-cloud-resourcemanager/src/v3/tag_bindings_client_config.json b/packages/google-cloud-resourcemanager/src/v3/tag_bindings_client_config.json index 25129f4ee67..5a1182f0c9e 100644 --- a/packages/google-cloud-resourcemanager/src/v3/tag_bindings_client_config.json +++ b/packages/google-cloud-resourcemanager/src/v3/tag_bindings_client_config.json @@ -37,6 +37,10 @@ "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" + }, + "ListEffectiveTags": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" } } } diff --git a/packages/google-cloud-resourcemanager/src/v3/tag_bindings_proto_list.json b/packages/google-cloud-resourcemanager/src/v3/tag_bindings_proto_list.json index 0c0066033c0..639794aadd4 100644 --- a/packages/google-cloud-resourcemanager/src/v3/tag_bindings_proto_list.json +++ b/packages/google-cloud-resourcemanager/src/v3/tag_bindings_proto_list.json @@ -3,6 +3,7 @@ "../../protos/google/cloud/resourcemanager/v3/organizations.proto", "../../protos/google/cloud/resourcemanager/v3/projects.proto", "../../protos/google/cloud/resourcemanager/v3/tag_bindings.proto", + "../../protos/google/cloud/resourcemanager/v3/tag_holds.proto", "../../protos/google/cloud/resourcemanager/v3/tag_keys.proto", "../../protos/google/cloud/resourcemanager/v3/tag_values.proto" ] diff --git a/packages/google-cloud-resourcemanager/src/v3/tag_holds_client.ts b/packages/google-cloud-resourcemanager/src/v3/tag_holds_client.ts new file mode 100644 index 00000000000..bfa1a709468 --- /dev/null +++ b/packages/google-cloud-resourcemanager/src/v3/tag_holds_client.ts @@ -0,0 +1,1303 @@ +// Copyright 2023 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, + GrpcClientOptions, + LROperation, + PaginationCallback, + GaxCall, +} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v3/tag_holds_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './tag_holds_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Allow users to create and manage TagHolds for TagValues. TagHolds represent + * the use of a Tag Value that is not captured by TagBindings but + * should still block TagValue deletion (such as a reference in a policy + * condition). This service provides isolated failure domains by cloud location + * so that TagHolds can be managed in the same location as their usage. + * @class + * @memberof v3 + */ +export class TagHoldsClient { + 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}; + 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}; + operationsClient: gax.OperationsClient; + tagHoldsStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of TagHoldsClient. + * + * @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://developers.google.com/identity/protocols/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 | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * 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 TagHoldsClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof TagHoldsClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.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 !== staticMembers.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 = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && '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 if (opts.fallback === 'rest') { + 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 = { + folderPathTemplate: new this._gaxModule.PathTemplate('folders/{folder}'), + organizationPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + tagBindingPathTemplate: new this._gaxModule.PathTemplate( + 'tagBindings/{tag_binding}' + ), + tagHoldPathTemplate: new this._gaxModule.PathTemplate( + 'tagValues/{tag_value}/tagHolds/{tag_hold}' + ), + tagKeyPathTemplate: new this._gaxModule.PathTemplate('tagKeys/{tag_key}'), + tagValuePathTemplate: new this._gaxModule.PathTemplate( + 'tagValues/{tag_value}' + ), + }; + + // 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 = { + listTagHolds: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'tagHolds' + ), + }; + + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }; + if (opts.fallback === 'rest') { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [ + { + selector: 'google.longrunning.Operations.GetOperation', + get: '/v3/{name=operations/**}', + }, + ]; + } + this.operationsClient = this._gaxModule + .lro(lroOptions) + .operationsClient(opts); + const createTagHoldResponse = protoFilesRoot.lookup( + '.google.cloud.resourcemanager.v3.TagHold' + ) as gax.protobuf.Type; + const createTagHoldMetadata = protoFilesRoot.lookup( + '.google.cloud.resourcemanager.v3.CreateTagHoldMetadata' + ) as gax.protobuf.Type; + const deleteTagHoldResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteTagHoldMetadata = protoFilesRoot.lookup( + '.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata' + ) as gax.protobuf.Type; + + this.descriptors.longrunning = { + createTagHold: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createTagHoldResponse.decode.bind(createTagHoldResponse), + createTagHoldMetadata.decode.bind(createTagHoldMetadata) + ), + deleteTagHold: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteTagHoldResponse.decode.bind(deleteTagHoldResponse), + deleteTagHoldMetadata.decode.bind(deleteTagHoldMetadata) + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.resourcemanager.v3.TagHolds', + 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.tagHoldsStub) { + return this.tagHoldsStub; + } + + // Put together the "service stub" for + // google.cloud.resourcemanager.v3.TagHolds. + this.tagHoldsStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.resourcemanager.v3.TagHolds' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.resourcemanager.v3.TagHolds, + 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 tagHoldsStubMethods = [ + 'createTagHold', + 'deleteTagHold', + 'listTagHolds', + ]; + for (const methodName of tagHoldsStubMethods) { + const callPromise = this.tagHoldsStub.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] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.tagHoldsStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'cloudresourcemanager.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'cloudresourcemanager.googleapis.com'; + } + + /** + * 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/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only', + ]; + } + + 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 -- + // ------------------- + + /** + * Creates a TagHold. Returns ALREADY_EXISTS if a TagHold with the same + * resource and origin exists under the same TagValue. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the TagHold's parent TagValue. Must be of + * the form: `tagValues/{tag-value-id}`. + * @param {google.cloud.resourcemanager.v3.TagHold} request.tagHold + * Required. The TagHold to be created. + * @param {boolean} [request.validateOnly] + * Optional. Set to true to perform the validations necessary for creating the + * resource, but not actually perform the action. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v3/tag_holds.create_tag_hold.js + * region_tag:cloudresourcemanager_v3_generated_TagHolds_CreateTagHold_async + */ + createTagHold( + request?: protos.google.cloud.resourcemanager.v3.ICreateTagHoldRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.resourcemanager.v3.ITagHold, + protos.google.cloud.resourcemanager.v3.ICreateTagHoldMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createTagHold( + request: protos.google.cloud.resourcemanager.v3.ICreateTagHoldRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.resourcemanager.v3.ITagHold, + protos.google.cloud.resourcemanager.v3.ICreateTagHoldMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createTagHold( + request: protos.google.cloud.resourcemanager.v3.ICreateTagHoldRequest, + callback: Callback< + LROperation< + protos.google.cloud.resourcemanager.v3.ITagHold, + protos.google.cloud.resourcemanager.v3.ICreateTagHoldMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createTagHold( + request?: protos.google.cloud.resourcemanager.v3.ICreateTagHoldRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.resourcemanager.v3.ITagHold, + protos.google.cloud.resourcemanager.v3.ICreateTagHoldMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.resourcemanager.v3.ITagHold, + protos.google.cloud.resourcemanager.v3.ICreateTagHoldMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.resourcemanager.v3.ITagHold, + protos.google.cloud.resourcemanager.v3.ICreateTagHoldMetadata + >, + 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(); + return this.innerApiCalls.createTagHold(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createTagHold()`. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v3/tag_holds.create_tag_hold.js + * region_tag:cloudresourcemanager_v3_generated_TagHolds_CreateTagHold_async + */ + async checkCreateTagHoldProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.resourcemanager.v3.TagHold, + protos.google.cloud.resourcemanager.v3.CreateTagHoldMetadata + > + > { + 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.createTagHold, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.resourcemanager.v3.TagHold, + protos.google.cloud.resourcemanager.v3.CreateTagHoldMetadata + >; + } + /** + * Deletes a TagHold. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the TagHold to delete. Must be of the form: + * `tagValues/{tag-value-id}/tagHolds/{tag-hold-id}`. + * @param {boolean} [request.validateOnly] + * Optional. Set to true to perform the validations necessary for deleting the + * resource, but not actually perform the action. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v3/tag_holds.delete_tag_hold.js + * region_tag:cloudresourcemanager_v3_generated_TagHolds_DeleteTagHold_async + */ + deleteTagHold( + request?: protos.google.cloud.resourcemanager.v3.IDeleteTagHoldRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.resourcemanager.v3.IDeleteTagHoldMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteTagHold( + request: protos.google.cloud.resourcemanager.v3.IDeleteTagHoldRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.resourcemanager.v3.IDeleteTagHoldMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteTagHold( + request: protos.google.cloud.resourcemanager.v3.IDeleteTagHoldRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.resourcemanager.v3.IDeleteTagHoldMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteTagHold( + request?: protos.google.cloud.resourcemanager.v3.IDeleteTagHoldRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.resourcemanager.v3.IDeleteTagHoldMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.resourcemanager.v3.IDeleteTagHoldMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.resourcemanager.v3.IDeleteTagHoldMetadata + >, + 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({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteTagHold(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteTagHold()`. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v3/tag_holds.delete_tag_hold.js + * region_tag:cloudresourcemanager_v3_generated_TagHolds_DeleteTagHold_async + */ + async checkDeleteTagHoldProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata + > + > { + 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.deleteTagHold, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.resourcemanager.v3.DeleteTagHoldMetadata + >; + } + /** + * Lists TagHolds under a TagValue. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent TagValue. Must be of the form: + * `tagValues/{tag-value-id}`. + * @param {number} [request.pageSize] + * Optional. The maximum number of TagHolds to return in the response. The + * server allows a maximum of 300 TagHolds to return. If unspecified, the + * server will use 100 as the default. + * @param {string} [request.pageToken] + * Optional. A pagination token returned from a previous call to + * `ListTagHolds` that indicates where this listing should continue from. + * @param {string} [request.filter] + * Optional. Criteria used to select a subset of TagHolds parented by the + * TagValue to return. This field follows the syntax defined by aip.dev/160; + * the `holder` and `origin` fields are supported for filtering. Currently + * only `AND` syntax is supported. Some example queries are: + * + * * `holder = + * //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group` + * * `origin = 35678234` + * * `holder = + * //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group + * AND origin = 35678234` + * @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 google.cloud.resourcemanager.v3.TagHold | TagHold}. + * 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 `listTagHoldsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listTagHolds( + request?: protos.google.cloud.resourcemanager.v3.IListTagHoldsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.resourcemanager.v3.ITagHold[], + protos.google.cloud.resourcemanager.v3.IListTagHoldsRequest | null, + protos.google.cloud.resourcemanager.v3.IListTagHoldsResponse + ] + >; + listTagHolds( + request: protos.google.cloud.resourcemanager.v3.IListTagHoldsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.resourcemanager.v3.IListTagHoldsRequest, + | protos.google.cloud.resourcemanager.v3.IListTagHoldsResponse + | null + | undefined, + protos.google.cloud.resourcemanager.v3.ITagHold + > + ): void; + listTagHolds( + request: protos.google.cloud.resourcemanager.v3.IListTagHoldsRequest, + callback: PaginationCallback< + protos.google.cloud.resourcemanager.v3.IListTagHoldsRequest, + | protos.google.cloud.resourcemanager.v3.IListTagHoldsResponse + | null + | undefined, + protos.google.cloud.resourcemanager.v3.ITagHold + > + ): void; + listTagHolds( + request?: protos.google.cloud.resourcemanager.v3.IListTagHoldsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.resourcemanager.v3.IListTagHoldsRequest, + | protos.google.cloud.resourcemanager.v3.IListTagHoldsResponse + | null + | undefined, + protos.google.cloud.resourcemanager.v3.ITagHold + >, + callback?: PaginationCallback< + protos.google.cloud.resourcemanager.v3.IListTagHoldsRequest, + | protos.google.cloud.resourcemanager.v3.IListTagHoldsResponse + | null + | undefined, + protos.google.cloud.resourcemanager.v3.ITagHold + > + ): Promise< + [ + protos.google.cloud.resourcemanager.v3.ITagHold[], + protos.google.cloud.resourcemanager.v3.IListTagHoldsRequest | null, + protos.google.cloud.resourcemanager.v3.IListTagHoldsResponse + ] + > | 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(); + return this.innerApiCalls.listTagHolds(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent TagValue. Must be of the form: + * `tagValues/{tag-value-id}`. + * @param {number} [request.pageSize] + * Optional. The maximum number of TagHolds to return in the response. The + * server allows a maximum of 300 TagHolds to return. If unspecified, the + * server will use 100 as the default. + * @param {string} [request.pageToken] + * Optional. A pagination token returned from a previous call to + * `ListTagHolds` that indicates where this listing should continue from. + * @param {string} [request.filter] + * Optional. Criteria used to select a subset of TagHolds parented by the + * TagValue to return. This field follows the syntax defined by aip.dev/160; + * the `holder` and `origin` fields are supported for filtering. Currently + * only `AND` syntax is supported. Some example queries are: + * + * * `holder = + * //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group` + * * `origin = 35678234` + * * `holder = + * //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group + * AND origin = 35678234` + * @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 google.cloud.resourcemanager.v3.TagHold | TagHold} 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 `listTagHoldsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listTagHoldsStream( + request?: protos.google.cloud.resourcemanager.v3.IListTagHoldsRequest, + 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['listTagHolds']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listTagHolds.createStream( + this.innerApiCalls.listTagHolds as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listTagHolds`, 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 name of the parent TagValue. Must be of the form: + * `tagValues/{tag-value-id}`. + * @param {number} [request.pageSize] + * Optional. The maximum number of TagHolds to return in the response. The + * server allows a maximum of 300 TagHolds to return. If unspecified, the + * server will use 100 as the default. + * @param {string} [request.pageToken] + * Optional. A pagination token returned from a previous call to + * `ListTagHolds` that indicates where this listing should continue from. + * @param {string} [request.filter] + * Optional. Criteria used to select a subset of TagHolds parented by the + * TagValue to return. This field follows the syntax defined by aip.dev/160; + * the `holder` and `origin` fields are supported for filtering. Currently + * only `AND` syntax is supported. Some example queries are: + * + * * `holder = + * //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group` + * * `origin = 35678234` + * * `holder = + * //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group + * AND origin = 35678234` + * @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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.resourcemanager.v3.TagHold | TagHold}. 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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v3/tag_holds.list_tag_holds.js + * region_tag:cloudresourcemanager_v3_generated_TagHolds_ListTagHolds_async + */ + listTagHoldsAsync( + request?: protos.google.cloud.resourcemanager.v3.IListTagHoldsRequest, + 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['listTagHolds']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listTagHolds.asyncIterate( + this.innerApiCalls['listTagHolds'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified folder resource name string. + * + * @param {string} folder + * @returns {string} Resource name string. + */ + folderPath(folder: string) { + return this.pathTemplates.folderPathTemplate.render({ + folder: folder, + }); + } + + /** + * Parse the folder from Folder resource. + * + * @param {string} folderName + * A fully-qualified path representing Folder resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderName(folderName: string) { + return this.pathTemplates.folderPathTemplate.match(folderName).folder; + } + + /** + * Return a fully-qualified organization resource name string. + * + * @param {string} organization + * @returns {string} Resource name string. + */ + organizationPath(organization: string) { + return this.pathTemplates.organizationPathTemplate.render({ + organization: organization, + }); + } + + /** + * Parse the organization from Organization resource. + * + * @param {string} organizationName + * A fully-qualified path representing Organization resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationName(organizationName: string) { + return this.pathTemplates.organizationPathTemplate.match(organizationName) + .organization; + } + + /** + * 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 tagBinding resource name string. + * + * @param {string} tag_binding + * @returns {string} Resource name string. + */ + tagBindingPath(tagBinding: string) { + return this.pathTemplates.tagBindingPathTemplate.render({ + tag_binding: tagBinding, + }); + } + + /** + * Parse the tag_binding from TagBinding resource. + * + * @param {string} tagBindingName + * A fully-qualified path representing TagBinding resource. + * @returns {string} A string representing the tag_binding. + */ + matchTagBindingFromTagBindingName(tagBindingName: string) { + return this.pathTemplates.tagBindingPathTemplate.match(tagBindingName) + .tag_binding; + } + + /** + * Return a fully-qualified tagHold resource name string. + * + * @param {string} tag_value + * @param {string} tag_hold + * @returns {string} Resource name string. + */ + tagHoldPath(tagValue: string, tagHold: string) { + return this.pathTemplates.tagHoldPathTemplate.render({ + tag_value: tagValue, + tag_hold: tagHold, + }); + } + + /** + * Parse the tag_value from TagHold resource. + * + * @param {string} tagHoldName + * A fully-qualified path representing TagHold resource. + * @returns {string} A string representing the tag_value. + */ + matchTagValueFromTagHoldName(tagHoldName: string) { + return this.pathTemplates.tagHoldPathTemplate.match(tagHoldName).tag_value; + } + + /** + * Parse the tag_hold from TagHold resource. + * + * @param {string} tagHoldName + * A fully-qualified path representing TagHold resource. + * @returns {string} A string representing the tag_hold. + */ + matchTagHoldFromTagHoldName(tagHoldName: string) { + return this.pathTemplates.tagHoldPathTemplate.match(tagHoldName).tag_hold; + } + + /** + * Return a fully-qualified tagKey resource name string. + * + * @param {string} tag_key + * @returns {string} Resource name string. + */ + tagKeyPath(tagKey: string) { + return this.pathTemplates.tagKeyPathTemplate.render({ + tag_key: tagKey, + }); + } + + /** + * Parse the tag_key from TagKey resource. + * + * @param {string} tagKeyName + * A fully-qualified path representing TagKey resource. + * @returns {string} A string representing the tag_key. + */ + matchTagKeyFromTagKeyName(tagKeyName: string) { + return this.pathTemplates.tagKeyPathTemplate.match(tagKeyName).tag_key; + } + + /** + * Return a fully-qualified tagValue resource name string. + * + * @param {string} tag_value + * @returns {string} Resource name string. + */ + tagValuePath(tagValue: string) { + return this.pathTemplates.tagValuePathTemplate.render({ + tag_value: tagValue, + }); + } + + /** + * Parse the tag_value from TagValue resource. + * + * @param {string} tagValueName + * A fully-qualified path representing TagValue resource. + * @returns {string} A string representing the tag_value. + */ + matchTagValueFromTagValueName(tagValueName: string) { + return this.pathTemplates.tagValuePathTemplate.match(tagValueName) + .tag_value; + } + + /** + * 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.tagHoldsStub && !this._terminated) { + return this.tagHoldsStub.then(stub => { + this._terminated = true; + stub.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-resourcemanager/src/v3/tag_holds_client_config.json b/packages/google-cloud-resourcemanager/src/v3/tag_holds_client_config.json new file mode 100644 index 00000000000..5b42806f40b --- /dev/null +++ b/packages/google-cloud-resourcemanager/src/v3/tag_holds_client_config.json @@ -0,0 +1,38 @@ +{ + "interfaces": { + "google.cloud.resourcemanager.v3.TagHolds": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "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 + } + }, + "methods": { + "CreateTagHold": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteTagHold": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListTagHolds": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-resourcemanager/src/v3/tag_holds_proto_list.json b/packages/google-cloud-resourcemanager/src/v3/tag_holds_proto_list.json new file mode 100644 index 00000000000..639794aadd4 --- /dev/null +++ b/packages/google-cloud-resourcemanager/src/v3/tag_holds_proto_list.json @@ -0,0 +1,9 @@ +[ + "../../protos/google/cloud/resourcemanager/v3/folders.proto", + "../../protos/google/cloud/resourcemanager/v3/organizations.proto", + "../../protos/google/cloud/resourcemanager/v3/projects.proto", + "../../protos/google/cloud/resourcemanager/v3/tag_bindings.proto", + "../../protos/google/cloud/resourcemanager/v3/tag_holds.proto", + "../../protos/google/cloud/resourcemanager/v3/tag_keys.proto", + "../../protos/google/cloud/resourcemanager/v3/tag_values.proto" +] diff --git a/packages/google-cloud-resourcemanager/src/v3/tag_keys_client.ts b/packages/google-cloud-resourcemanager/src/v3/tag_keys_client.ts index 6173c6daf05..1bc43294e21 100644 --- a/packages/google-cloud-resourcemanager/src/v3/tag_keys_client.ts +++ b/packages/google-cloud-resourcemanager/src/v3/tag_keys_client.ts @@ -191,6 +191,9 @@ export class TagKeysClient { tagBindingPathTemplate: new this._gaxModule.PathTemplate( 'tagBindings/{tag_binding}' ), + tagHoldPathTemplate: new this._gaxModule.PathTemplate( + 'tagValues/{tag_value}/tagHolds/{tag_hold}' + ), tagKeyPathTemplate: new this._gaxModule.PathTemplate('tagKeys/{tag_key}'), tagValuePathTemplate: new this._gaxModule.PathTemplate( 'tagValues/{tag_value}' @@ -317,6 +320,7 @@ export class TagKeysClient { const tagKeysStubMethods = [ 'listTagKeys', 'getTagKey', + 'getNamespacedTagKey', 'createTagKey', 'updateTagKey', 'deleteTagKey', @@ -505,6 +509,104 @@ export class TagKeysClient { this.initialize(); return this.innerApiCalls.getTagKey(request, options, callback); } + /** + * Retrieves a TagKey by its namespaced name. + * This method will return `PERMISSION_DENIED` if the key does not exist + * or the user does not have permission to view it. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. A namespaced tag key name in the format + * `{parentId}/{tagKeyShort}`, such as `42/foo` for a key with short name + * "foo" under the organization with ID 42 or `r2-d2/bar` for a key with short + * name "bar" under the project `r2-d2`. + * @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 google.cloud.resourcemanager.v3.TagKey | TagKey}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v3/tag_keys.get_namespaced_tag_key.js + * region_tag:cloudresourcemanager_v3_generated_TagKeys_GetNamespacedTagKey_async + */ + getNamespacedTagKey( + request?: protos.google.cloud.resourcemanager.v3.IGetNamespacedTagKeyRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.resourcemanager.v3.ITagKey, + ( + | protos.google.cloud.resourcemanager.v3.IGetNamespacedTagKeyRequest + | undefined + ), + {} | undefined + ] + >; + getNamespacedTagKey( + request: protos.google.cloud.resourcemanager.v3.IGetNamespacedTagKeyRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.resourcemanager.v3.ITagKey, + | protos.google.cloud.resourcemanager.v3.IGetNamespacedTagKeyRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getNamespacedTagKey( + request: protos.google.cloud.resourcemanager.v3.IGetNamespacedTagKeyRequest, + callback: Callback< + protos.google.cloud.resourcemanager.v3.ITagKey, + | protos.google.cloud.resourcemanager.v3.IGetNamespacedTagKeyRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getNamespacedTagKey( + request?: protos.google.cloud.resourcemanager.v3.IGetNamespacedTagKeyRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.resourcemanager.v3.ITagKey, + | protos.google.cloud.resourcemanager.v3.IGetNamespacedTagKeyRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.resourcemanager.v3.ITagKey, + | protos.google.cloud.resourcemanager.v3.IGetNamespacedTagKeyRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.resourcemanager.v3.ITagKey, + ( + | protos.google.cloud.resourcemanager.v3.IGetNamespacedTagKeyRequest + | 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 || {}; + this.initialize(); + return this.innerApiCalls.getNamespacedTagKey(request, options, callback); + } /** * Gets the access control policy for a TagKey. The returned policy may be * empty if no such policy or resource exists. The `resource` field should @@ -793,17 +895,17 @@ export class TagKeysClient { /** * Creates a new TagKey. If another request with the same parameters is * sent while the original request is in process, the second request - * will receive an error. A maximum of 300 TagKeys can exist under a parent at - * any given time. + * will receive an error. A maximum of 1000 TagKeys can exist under a parent + * at any given time. * * @param {Object} request * The request object that will be sent. * @param {google.cloud.resourcemanager.v3.TagKey} request.tagKey - * Required. The TagKey to be created. Only fields `short_name`, `description`, - * and `parent` are considered during the creation request. + * Required. The TagKey to be created. Only fields `short_name`, + * `description`, and `parent` are considered during the creation request. * @param {boolean} [request.validateOnly] - * Optional. Set to true to perform validations necessary for creating the resource, but - * not actually perform the action. + * Optional. Set to true to perform validations necessary for creating the + * resource, but not actually perform the action. * @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. @@ -937,10 +1039,10 @@ export class TagKeysClient { * @param {Object} request * The request object that will be sent. * @param {google.cloud.resourcemanager.v3.TagKey} request.tagKey - * Required. The new definition of the TagKey. Only the `description` and `etag` fields - * can be updated by this request. If the `etag` field is not empty, it - * must match the `etag` field of the existing tag key. Otherwise, - * `FAILED_PRECONDITION` will be returned. + * Required. The new definition of the TagKey. Only the `description` and + * `etag` fields can be updated by this request. If the `etag` field is not + * empty, it must match the `etag` field of the existing tag key. Otherwise, + * `ABORTED` will be returned. * @param {google.protobuf.FieldMask} request.updateMask * Fields to be updated. The mask may only contain `description` or * `etag`. If omitted entirely, both `description` and `etag` are assumed to @@ -1086,15 +1188,15 @@ export class TagKeysClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The resource name of a TagKey to be deleted in the format `tagKeys/123`. - * The TagKey cannot be a parent of any existing TagValues or it will not be - * deleted successfully. + * Required. The resource name of a TagKey to be deleted in the format + * `tagKeys/123`. The TagKey cannot be a parent of any existing TagValues or + * it will not be deleted successfully. * @param {boolean} [request.validateOnly] - * Optional. Set as true to perform validations necessary for deletion, but not actually - * perform the action. + * Optional. Set as true to perform validations necessary for deletion, but + * not actually perform the action. * @param {string} [request.etag] - * Optional. The etag known to the client for the expected state of the TagKey. This is - * to be used for optimistic concurrency. + * Optional. The etag known to the client for the expected state of the + * TagKey. This is to be used for optimistic concurrency. * @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. @@ -1232,12 +1334,13 @@ export class TagKeysClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the new TagKey's parent. - * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. + * Required. The resource name of the TagKey's parent. + * Must be of the form `organizations/{org_id}` or `projects/{project_id}` or + * `projects/{project_number}` * @param {number} [request.pageSize] - * Optional. The maximum number of TagKeys to return in the response. The server allows - * a maximum of 300 TagKeys to return. If unspecified, the server will use 100 - * as the default. + * Optional. The maximum number of TagKeys to return in the response. The + * server allows a maximum of 300 TagKeys to return. If unspecified, the + * server will use 100 as the default. * @param {string} [request.pageToken] * Optional. A pagination token returned from a previous call to `ListTagKey` * that indicates where this listing should continue from. @@ -1330,12 +1433,13 @@ export class TagKeysClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the new TagKey's parent. - * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. + * Required. The resource name of the TagKey's parent. + * Must be of the form `organizations/{org_id}` or `projects/{project_id}` or + * `projects/{project_number}` * @param {number} [request.pageSize] - * Optional. The maximum number of TagKeys to return in the response. The server allows - * a maximum of 300 TagKeys to return. If unspecified, the server will use 100 - * as the default. + * Optional. The maximum number of TagKeys to return in the response. The + * server allows a maximum of 300 TagKeys to return. If unspecified, the + * server will use 100 as the default. * @param {string} [request.pageToken] * Optional. A pagination token returned from a previous call to `ListTagKey` * that indicates where this listing should continue from. @@ -1376,12 +1480,13 @@ export class TagKeysClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the new TagKey's parent. - * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. + * Required. The resource name of the TagKey's parent. + * Must be of the form `organizations/{org_id}` or `projects/{project_id}` or + * `projects/{project_number}` * @param {number} [request.pageSize] - * Optional. The maximum number of TagKeys to return in the response. The server allows - * a maximum of 300 TagKeys to return. If unspecified, the server will use 100 - * as the default. + * Optional. The maximum number of TagKeys to return in the response. The + * server allows a maximum of 300 TagKeys to return. If unspecified, the + * server will use 100 as the default. * @param {string} [request.pageToken] * Optional. A pagination token returned from a previous call to `ListTagKey` * that indicates where this listing should continue from. @@ -1415,6 +1520,181 @@ export class TagKeysClient { callSettings ) as AsyncIterable; } + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + // -------------------- // -- Path templates -- // -------------------- @@ -1513,6 +1793,42 @@ export class TagKeysClient { .tag_binding; } + /** + * Return a fully-qualified tagHold resource name string. + * + * @param {string} tag_value + * @param {string} tag_hold + * @returns {string} Resource name string. + */ + tagHoldPath(tagValue: string, tagHold: string) { + return this.pathTemplates.tagHoldPathTemplate.render({ + tag_value: tagValue, + tag_hold: tagHold, + }); + } + + /** + * Parse the tag_value from TagHold resource. + * + * @param {string} tagHoldName + * A fully-qualified path representing TagHold resource. + * @returns {string} A string representing the tag_value. + */ + matchTagValueFromTagHoldName(tagHoldName: string) { + return this.pathTemplates.tagHoldPathTemplate.match(tagHoldName).tag_value; + } + + /** + * Parse the tag_hold from TagHold resource. + * + * @param {string} tagHoldName + * A fully-qualified path representing TagHold resource. + * @returns {string} A string representing the tag_hold. + */ + matchTagHoldFromTagHoldName(tagHoldName: string) { + return this.pathTemplates.tagHoldPathTemplate.match(tagHoldName).tag_hold; + } + /** * Return a fully-qualified tagKey resource name string. * diff --git a/packages/google-cloud-resourcemanager/src/v3/tag_keys_client_config.json b/packages/google-cloud-resourcemanager/src/v3/tag_keys_client_config.json index b72c6518fd2..f1e7c83955d 100644 --- a/packages/google-cloud-resourcemanager/src/v3/tag_keys_client_config.json +++ b/packages/google-cloud-resourcemanager/src/v3/tag_keys_client_config.json @@ -33,6 +33,10 @@ "retry_codes_name": "unavailable", "retry_params_name": "default" }, + "GetNamespacedTagKey": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "CreateTagKey": { "timeout_millis": 60000, "retry_codes_name": "non_idempotent", diff --git a/packages/google-cloud-resourcemanager/src/v3/tag_keys_proto_list.json b/packages/google-cloud-resourcemanager/src/v3/tag_keys_proto_list.json index 0c0066033c0..639794aadd4 100644 --- a/packages/google-cloud-resourcemanager/src/v3/tag_keys_proto_list.json +++ b/packages/google-cloud-resourcemanager/src/v3/tag_keys_proto_list.json @@ -3,6 +3,7 @@ "../../protos/google/cloud/resourcemanager/v3/organizations.proto", "../../protos/google/cloud/resourcemanager/v3/projects.proto", "../../protos/google/cloud/resourcemanager/v3/tag_bindings.proto", + "../../protos/google/cloud/resourcemanager/v3/tag_holds.proto", "../../protos/google/cloud/resourcemanager/v3/tag_keys.proto", "../../protos/google/cloud/resourcemanager/v3/tag_values.proto" ] diff --git a/packages/google-cloud-resourcemanager/src/v3/tag_values_client.ts b/packages/google-cloud-resourcemanager/src/v3/tag_values_client.ts index a10dacc7c66..b4c922d7831 100644 --- a/packages/google-cloud-resourcemanager/src/v3/tag_values_client.ts +++ b/packages/google-cloud-resourcemanager/src/v3/tag_values_client.ts @@ -191,6 +191,9 @@ export class TagValuesClient { tagBindingPathTemplate: new this._gaxModule.PathTemplate( 'tagBindings/{tag_binding}' ), + tagHoldPathTemplate: new this._gaxModule.PathTemplate( + 'tagValues/{tag_value}/tagHolds/{tag_hold}' + ), tagKeyPathTemplate: new this._gaxModule.PathTemplate('tagKeys/{tag_key}'), tagValuePathTemplate: new this._gaxModule.PathTemplate( 'tagValues/{tag_value}' @@ -317,6 +320,7 @@ export class TagValuesClient { const tagValuesStubMethods = [ 'listTagValues', 'getTagValue', + 'getNamespacedTagValue', 'createTagValue', 'updateTagValue', 'deleteTagValue', @@ -413,14 +417,14 @@ export class TagValuesClient { // -- Service calls -- // ------------------- /** - * Retrieves TagValue. If the TagValue or namespaced name does not exist, or - * if the user does not have permission to view it, this method will return - * `PERMISSION_DENIED`. + * Retrieves a TagValue. This method will return `PERMISSION_DENIED` if the + * value does not exist or the user does not have permission to view it. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. Resource name for TagValue to be fetched in the format `tagValues/456`. + * Required. Resource name for TagValue to be fetched in the format + * `tagValues/456`. * @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. @@ -505,6 +509,109 @@ export class TagValuesClient { this.initialize(); return this.innerApiCalls.getTagValue(request, options, callback); } + /** + * Retrieves a TagValue by its namespaced name. + * This method will return `PERMISSION_DENIED` if the value does not exist + * or the user does not have permission to view it. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. A namespaced tag value name in the following format: + * + * `{parentId}/{tagKeyShort}/{tagValueShort}` + * + * Examples: + * - `42/foo/abc` for a value with short name "abc" under the key with short + * name "foo" under the organization with ID 42 + * - `r2-d2/bar/xyz` for a value with short name "xyz" under the key with + * short name "bar" under the project with ID "r2-d2" + * @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 google.cloud.resourcemanager.v3.TagValue | TagValue}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v3/tag_values.get_namespaced_tag_value.js + * region_tag:cloudresourcemanager_v3_generated_TagValues_GetNamespacedTagValue_async + */ + getNamespacedTagValue( + request?: protos.google.cloud.resourcemanager.v3.IGetNamespacedTagValueRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.resourcemanager.v3.ITagValue, + ( + | protos.google.cloud.resourcemanager.v3.IGetNamespacedTagValueRequest + | undefined + ), + {} | undefined + ] + >; + getNamespacedTagValue( + request: protos.google.cloud.resourcemanager.v3.IGetNamespacedTagValueRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.resourcemanager.v3.ITagValue, + | protos.google.cloud.resourcemanager.v3.IGetNamespacedTagValueRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getNamespacedTagValue( + request: protos.google.cloud.resourcemanager.v3.IGetNamespacedTagValueRequest, + callback: Callback< + protos.google.cloud.resourcemanager.v3.ITagValue, + | protos.google.cloud.resourcemanager.v3.IGetNamespacedTagValueRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getNamespacedTagValue( + request?: protos.google.cloud.resourcemanager.v3.IGetNamespacedTagValueRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.resourcemanager.v3.ITagValue, + | protos.google.cloud.resourcemanager.v3.IGetNamespacedTagValueRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.resourcemanager.v3.ITagValue, + | protos.google.cloud.resourcemanager.v3.IGetNamespacedTagValueRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.resourcemanager.v3.ITagValue, + ( + | protos.google.cloud.resourcemanager.v3.IGetNamespacedTagValueRequest + | 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 || {}; + this.initialize(); + return this.innerApiCalls.getNamespacedTagValue(request, options, callback); + } /** * Gets the access control policy for a TagValue. The returned policy may be * empty if no such policy or resource exists. The `resource` field should @@ -793,17 +900,17 @@ export class TagValuesClient { /** * Creates a TagValue as a child of the specified TagKey. If a another * request with the same parameters is sent while the original request is in - * process the second request will receive an error. A maximum of 300 + * process the second request will receive an error. A maximum of 1000 * TagValues can exist under a TagKey at any given time. * * @param {Object} request * The request object that will be sent. * @param {google.cloud.resourcemanager.v3.TagValue} request.tagValue - * Required. The TagValue to be created. Only fields `short_name`, `description`, - * and `parent` are considered during the creation request. + * Required. The TagValue to be created. Only fields `short_name`, + * `description`, and `parent` are considered during the creation request. * @param {boolean} [request.validateOnly] - * Optional. Set as true to perform the validations necessary for creating the resource, - * but not actually perform the action. + * Optional. Set as true to perform the validations necessary for creating the + * resource, but not actually perform the action. * @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. @@ -937,15 +1044,15 @@ export class TagValuesClient { * @param {Object} request * The request object that will be sent. * @param {google.cloud.resourcemanager.v3.TagValue} request.tagValue - * Required. The new definition of the TagValue. Only fields `description` and `etag` - * fields can be updated by this request. If the `etag` field is nonempty, it - * must match the `etag` field of the existing ControlGroup. Otherwise, - * `FAILED_PRECONDITION` will be returned. + * Required. The new definition of the TagValue. Only fields `description` and + * `etag` fields can be updated by this request. If the `etag` field is + * nonempty, it must match the `etag` field of the existing ControlGroup. + * Otherwise, `ABORTED` will be returned. * @param {google.protobuf.FieldMask} [request.updateMask] * Optional. Fields to be updated. * @param {boolean} [request.validateOnly] - * Optional. True to perform validations necessary for updating the resource, but not - * actually perform the action. + * Optional. True to perform validations necessary for updating the resource, + * but not actually perform the action. * @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. @@ -1084,13 +1191,14 @@ export class TagValuesClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. Resource name for TagValue to be deleted in the format tagValues/456. + * Required. Resource name for TagValue to be deleted in the format + * tagValues/456. * @param {boolean} [request.validateOnly] - * Optional. Set as true to perform the validations necessary for deletion, but not - * actually perform the action. + * Optional. Set as true to perform the validations necessary for deletion, + * but not actually perform the action. * @param {string} [request.etag] - * Optional. The etag known to the client for the expected state of the TagValue. This - * is to be used for optimistic concurrency. + * Optional. The etag known to the client for the expected state of the + * TagValue. This is to be used for optimistic concurrency. * @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. @@ -1228,15 +1336,14 @@ export class TagValuesClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Resource name for TagKey, parent of the TagValues to be listed, - * in the format `tagKeys/123`. + * Required. * @param {number} [request.pageSize] - * Optional. The maximum number of TagValues to return in the response. The server - * allows a maximum of 300 TagValues to return. If unspecified, the server - * will use 100 as the default. + * Optional. The maximum number of TagValues to return in the response. The + * server allows a maximum of 300 TagValues to return. If unspecified, the + * server will use 100 as the default. * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous call to `ListTagValues` - * that indicates where this listing should continue from. + * Optional. A pagination token returned from a previous call to + * `ListTagValues` that indicates where this listing should continue from. * @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. @@ -1326,15 +1433,14 @@ export class TagValuesClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Resource name for TagKey, parent of the TagValues to be listed, - * in the format `tagKeys/123`. + * Required. * @param {number} [request.pageSize] - * Optional. The maximum number of TagValues to return in the response. The server - * allows a maximum of 300 TagValues to return. If unspecified, the server - * will use 100 as the default. + * Optional. The maximum number of TagValues to return in the response. The + * server allows a maximum of 300 TagValues to return. If unspecified, the + * server will use 100 as the default. * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous call to `ListTagValues` - * that indicates where this listing should continue from. + * Optional. A pagination token returned from a previous call to + * `ListTagValues` that indicates where this listing should continue from. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -1372,15 +1478,14 @@ export class TagValuesClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Resource name for TagKey, parent of the TagValues to be listed, - * in the format `tagKeys/123`. + * Required. * @param {number} [request.pageSize] - * Optional. The maximum number of TagValues to return in the response. The server - * allows a maximum of 300 TagValues to return. If unspecified, the server - * will use 100 as the default. + * Optional. The maximum number of TagValues to return in the response. The + * server allows a maximum of 300 TagValues to return. If unspecified, the + * server will use 100 as the default. * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous call to `ListTagValues` - * that indicates where this listing should continue from. + * Optional. A pagination token returned from a previous call to + * `ListTagValues` that indicates where this listing should continue from. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -1411,6 +1516,181 @@ export class TagValuesClient { callSettings ) as AsyncIterable; } + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + // -------------------- // -- Path templates -- // -------------------- @@ -1509,6 +1789,42 @@ export class TagValuesClient { .tag_binding; } + /** + * Return a fully-qualified tagHold resource name string. + * + * @param {string} tag_value + * @param {string} tag_hold + * @returns {string} Resource name string. + */ + tagHoldPath(tagValue: string, tagHold: string) { + return this.pathTemplates.tagHoldPathTemplate.render({ + tag_value: tagValue, + tag_hold: tagHold, + }); + } + + /** + * Parse the tag_value from TagHold resource. + * + * @param {string} tagHoldName + * A fully-qualified path representing TagHold resource. + * @returns {string} A string representing the tag_value. + */ + matchTagValueFromTagHoldName(tagHoldName: string) { + return this.pathTemplates.tagHoldPathTemplate.match(tagHoldName).tag_value; + } + + /** + * Parse the tag_hold from TagHold resource. + * + * @param {string} tagHoldName + * A fully-qualified path representing TagHold resource. + * @returns {string} A string representing the tag_hold. + */ + matchTagHoldFromTagHoldName(tagHoldName: string) { + return this.pathTemplates.tagHoldPathTemplate.match(tagHoldName).tag_hold; + } + /** * Return a fully-qualified tagKey resource name string. * diff --git a/packages/google-cloud-resourcemanager/src/v3/tag_values_client_config.json b/packages/google-cloud-resourcemanager/src/v3/tag_values_client_config.json index 01ac77022d9..6ddb1d9c83a 100644 --- a/packages/google-cloud-resourcemanager/src/v3/tag_values_client_config.json +++ b/packages/google-cloud-resourcemanager/src/v3/tag_values_client_config.json @@ -33,6 +33,10 @@ "retry_codes_name": "unavailable", "retry_params_name": "default" }, + "GetNamespacedTagValue": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "CreateTagValue": { "timeout_millis": 60000, "retry_codes_name": "non_idempotent", diff --git a/packages/google-cloud-resourcemanager/src/v3/tag_values_proto_list.json b/packages/google-cloud-resourcemanager/src/v3/tag_values_proto_list.json index 0c0066033c0..639794aadd4 100644 --- a/packages/google-cloud-resourcemanager/src/v3/tag_values_proto_list.json +++ b/packages/google-cloud-resourcemanager/src/v3/tag_values_proto_list.json @@ -3,6 +3,7 @@ "../../protos/google/cloud/resourcemanager/v3/organizations.proto", "../../protos/google/cloud/resourcemanager/v3/projects.proto", "../../protos/google/cloud/resourcemanager/v3/tag_bindings.proto", + "../../protos/google/cloud/resourcemanager/v3/tag_holds.proto", "../../protos/google/cloud/resourcemanager/v3/tag_keys.proto", "../../protos/google/cloud/resourcemanager/v3/tag_values.proto" ] diff --git a/packages/google-cloud-resourcemanager/system-test/fixtures/sample/src/index.js b/packages/google-cloud-resourcemanager/system-test/fixtures/sample/src/index.js index 0bc9fa6016e..993e317bab6 100644 --- a/packages/google-cloud-resourcemanager/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-resourcemanager/system-test/fixtures/sample/src/index.js @@ -24,6 +24,7 @@ function main() { const organizationsClient = new resourcemanager.OrganizationsClient(); const projectsClient = new resourcemanager.ProjectsClient(); const tagBindingsClient = new resourcemanager.TagBindingsClient(); + const tagHoldsClient = new resourcemanager.TagHoldsClient(); const tagKeysClient = new resourcemanager.TagKeysClient(); const tagValuesClient = new resourcemanager.TagValuesClient(); } diff --git a/packages/google-cloud-resourcemanager/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-resourcemanager/system-test/fixtures/sample/src/index.ts index 8165d20384c..add7058c1bd 100644 --- a/packages/google-cloud-resourcemanager/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-resourcemanager/system-test/fixtures/sample/src/index.ts @@ -21,6 +21,7 @@ import { OrganizationsClient, ProjectsClient, TagBindingsClient, + TagHoldsClient, TagKeysClient, TagValuesClient, } from '@google-cloud/resource-manager'; @@ -38,6 +39,9 @@ function doStuffWithProjectsClient(client: ProjectsClient) { function doStuffWithTagBindingsClient(client: TagBindingsClient) { client.close(); } +function doStuffWithTagHoldsClient(client: TagHoldsClient) { + client.close(); +} function doStuffWithTagKeysClient(client: TagKeysClient) { client.close(); } @@ -59,6 +63,9 @@ function main() { const tagBindingsClient = new TagBindingsClient(); doStuffWithTagBindingsClient(tagBindingsClient); // check that the client instance can be created + const tagHoldsClient = new TagHoldsClient(); + doStuffWithTagHoldsClient(tagHoldsClient); + // check that the client instance can be created const tagKeysClient = new TagKeysClient(); doStuffWithTagKeysClient(tagKeysClient); // check that the client instance can be created diff --git a/packages/google-cloud-resourcemanager/test/gapic_folders_v3.ts b/packages/google-cloud-resourcemanager/test/gapic_folders_v3.ts index d8c845b60d2..f5025b7cb23 100644 --- a/packages/google-cloud-resourcemanager/test/gapic_folders_v3.ts +++ b/packages/google-cloud-resourcemanager/test/gapic_folders_v3.ts @@ -2142,6 +2142,311 @@ describe('v3.FoldersClient', () => { ); }); }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new foldersModule.v3.FoldersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new foldersModule.v3.FoldersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new foldersModule.v3.FoldersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.getOperation(request); + }, expectedError); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new foldersModule.v3.FoldersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new foldersModule.v3.FoldersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new foldersModule.v3.FoldersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.cancelOperation(request); + }, expectedError); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new foldersModule.v3.FoldersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new foldersModule.v3.FoldersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new foldersModule.v3.FoldersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.deleteOperation(request); + }, expectedError); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new foldersModule.v3.FoldersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new foldersModule.v3.FoldersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); describe('Path templates', () => { describe('folder', () => { @@ -2296,6 +2601,55 @@ describe('v3.FoldersClient', () => { }); }); + describe('tagHold', () => { + const fakePath = '/rendered/path/tagHold'; + const expectedParameters = { + tag_value: 'tagValueValue', + tag_hold: 'tagHoldValue', + }; + const client = new foldersModule.v3.FoldersClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.tagHoldPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.tagHoldPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('tagHoldPath', () => { + const result = client.tagHoldPath('tagValueValue', 'tagHoldValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.tagHoldPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchTagValueFromTagHoldName', () => { + const result = client.matchTagValueFromTagHoldName(fakePath); + assert.strictEqual(result, 'tagValueValue'); + assert( + (client.pathTemplates.tagHoldPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTagHoldFromTagHoldName', () => { + const result = client.matchTagHoldFromTagHoldName(fakePath); + assert.strictEqual(result, 'tagHoldValue'); + assert( + (client.pathTemplates.tagHoldPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('tagKey', () => { const fakePath = '/rendered/path/tagKey'; const expectedParameters = { diff --git a/packages/google-cloud-resourcemanager/test/gapic_organizations_v3.ts b/packages/google-cloud-resourcemanager/test/gapic_organizations_v3.ts index d6802172223..888779888ef 100644 --- a/packages/google-cloud-resourcemanager/test/gapic_organizations_v3.ts +++ b/packages/google-cloud-resourcemanager/test/gapic_organizations_v3.ts @@ -1139,6 +1139,55 @@ describe('v3.OrganizationsClient', () => { }); }); + describe('tagHold', () => { + const fakePath = '/rendered/path/tagHold'; + const expectedParameters = { + tag_value: 'tagValueValue', + tag_hold: 'tagHoldValue', + }; + const client = new organizationsModule.v3.OrganizationsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.tagHoldPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.tagHoldPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('tagHoldPath', () => { + const result = client.tagHoldPath('tagValueValue', 'tagHoldValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.tagHoldPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchTagValueFromTagHoldName', () => { + const result = client.matchTagValueFromTagHoldName(fakePath); + assert.strictEqual(result, 'tagValueValue'); + assert( + (client.pathTemplates.tagHoldPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTagHoldFromTagHoldName', () => { + const result = client.matchTagHoldFromTagHoldName(fakePath); + assert.strictEqual(result, 'tagHoldValue'); + assert( + (client.pathTemplates.tagHoldPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('tagKey', () => { const fakePath = '/rendered/path/tagKey'; const expectedParameters = { diff --git a/packages/google-cloud-resourcemanager/test/gapic_projects_v3.ts b/packages/google-cloud-resourcemanager/test/gapic_projects_v3.ts index 4db8a42075b..79c09a259d4 100644 --- a/packages/google-cloud-resourcemanager/test/gapic_projects_v3.ts +++ b/packages/google-cloud-resourcemanager/test/gapic_projects_v3.ts @@ -2155,6 +2155,311 @@ describe('v3.ProjectsClient', () => { ); }); }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new projectsModule.v3.ProjectsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new projectsModule.v3.ProjectsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new projectsModule.v3.ProjectsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.getOperation(request); + }, expectedError); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new projectsModule.v3.ProjectsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new projectsModule.v3.ProjectsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new projectsModule.v3.ProjectsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.cancelOperation(request); + }, expectedError); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new projectsModule.v3.ProjectsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new projectsModule.v3.ProjectsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new projectsModule.v3.ProjectsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.deleteOperation(request); + }, expectedError); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new projectsModule.v3.ProjectsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new projectsModule.v3.ProjectsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); describe('Path templates', () => { describe('folder', () => { @@ -2309,6 +2614,55 @@ describe('v3.ProjectsClient', () => { }); }); + describe('tagHold', () => { + const fakePath = '/rendered/path/tagHold'; + const expectedParameters = { + tag_value: 'tagValueValue', + tag_hold: 'tagHoldValue', + }; + const client = new projectsModule.v3.ProjectsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.tagHoldPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.tagHoldPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('tagHoldPath', () => { + const result = client.tagHoldPath('tagValueValue', 'tagHoldValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.tagHoldPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchTagValueFromTagHoldName', () => { + const result = client.matchTagValueFromTagHoldName(fakePath); + assert.strictEqual(result, 'tagValueValue'); + assert( + (client.pathTemplates.tagHoldPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTagHoldFromTagHoldName', () => { + const result = client.matchTagHoldFromTagHoldName(fakePath); + assert.strictEqual(result, 'tagHoldValue'); + assert( + (client.pathTemplates.tagHoldPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('tagKey', () => { const fakePath = '/rendered/path/tagKey'; const expectedParameters = { diff --git a/packages/google-cloud-resourcemanager/test/gapic_tag_bindings_v3.ts b/packages/google-cloud-resourcemanager/test/gapic_tag_bindings_v3.ts index 61aed3ec3ad..63ba88036b2 100644 --- a/packages/google-cloud-resourcemanager/test/gapic_tag_bindings_v3.ts +++ b/packages/google-cloud-resourcemanager/test/gapic_tag_bindings_v3.ts @@ -824,6 +824,548 @@ describe('v3.TagBindingsClient', () => { }); }); + describe('listEffectiveTags', () => { + it('invokes listEffectiveTags without error', async () => { + const client = new tagbindingsModule.v3.TagBindingsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.EffectiveTag() + ), + generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.EffectiveTag() + ), + generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.EffectiveTag() + ), + ]; + client.innerApiCalls.listEffectiveTags = stubSimpleCall(expectedResponse); + const [response] = await client.listEffectiveTags(request); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes listEffectiveTags without error using callback', async () => { + const client = new tagbindingsModule.v3.TagBindingsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.EffectiveTag() + ), + generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.EffectiveTag() + ), + generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.EffectiveTag() + ), + ]; + client.innerApiCalls.listEffectiveTags = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listEffectiveTags( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.resourcemanager.v3.IEffectiveTag[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes listEffectiveTags with error', async () => { + const client = new tagbindingsModule.v3.TagBindingsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.listEffectiveTags = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listEffectiveTags(request), expectedError); + }); + + it('invokes listEffectiveTagsStream without error', async () => { + const client = new tagbindingsModule.v3.TagBindingsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.EffectiveTag() + ), + generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.EffectiveTag() + ), + generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.EffectiveTag() + ), + ]; + client.descriptors.page.listEffectiveTags.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listEffectiveTagsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.resourcemanager.v3.EffectiveTag[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.resourcemanager.v3.EffectiveTag) => { + 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.listEffectiveTags.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listEffectiveTags, request) + ); + }); + + it('invokes listEffectiveTagsStream with error', async () => { + const client = new tagbindingsModule.v3.TagBindingsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listEffectiveTags.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listEffectiveTagsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.resourcemanager.v3.EffectiveTag[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.resourcemanager.v3.EffectiveTag) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listEffectiveTags.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listEffectiveTags, request) + ); + }); + + it('uses async iteration with listEffectiveTags without error', async () => { + const client = new tagbindingsModule.v3.TagBindingsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.EffectiveTag() + ), + generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.EffectiveTag() + ), + generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.EffectiveTag() + ), + ]; + client.descriptors.page.listEffectiveTags.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.resourcemanager.v3.IEffectiveTag[] = + []; + const iterable = client.listEffectiveTagsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listEffectiveTags.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + + it('uses async iteration with listEffectiveTags with error', async () => { + const client = new tagbindingsModule.v3.TagBindingsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.ListEffectiveTagsRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listEffectiveTags.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listEffectiveTagsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.resourcemanager.v3.IEffectiveTag[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listEffectiveTags.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new tagbindingsModule.v3.TagBindingsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new tagbindingsModule.v3.TagBindingsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new tagbindingsModule.v3.TagBindingsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.getOperation(request); + }, expectedError); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new tagbindingsModule.v3.TagBindingsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new tagbindingsModule.v3.TagBindingsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new tagbindingsModule.v3.TagBindingsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.cancelOperation(request); + }, expectedError); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new tagbindingsModule.v3.TagBindingsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new tagbindingsModule.v3.TagBindingsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new tagbindingsModule.v3.TagBindingsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.deleteOperation(request); + }, expectedError); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new tagbindingsModule.v3.TagBindingsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new tagbindingsModule.v3.TagBindingsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); + describe('Path templates', () => { describe('folder', () => { const fakePath = '/rendered/path/folder'; @@ -977,6 +1519,55 @@ describe('v3.TagBindingsClient', () => { }); }); + describe('tagHold', () => { + const fakePath = '/rendered/path/tagHold'; + const expectedParameters = { + tag_value: 'tagValueValue', + tag_hold: 'tagHoldValue', + }; + const client = new tagbindingsModule.v3.TagBindingsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.tagHoldPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.tagHoldPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('tagHoldPath', () => { + const result = client.tagHoldPath('tagValueValue', 'tagHoldValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.tagHoldPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchTagValueFromTagHoldName', () => { + const result = client.matchTagValueFromTagHoldName(fakePath); + assert.strictEqual(result, 'tagValueValue'); + assert( + (client.pathTemplates.tagHoldPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTagHoldFromTagHoldName', () => { + const result = client.matchTagHoldFromTagHoldName(fakePath); + assert.strictEqual(result, 'tagHoldValue'); + assert( + (client.pathTemplates.tagHoldPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('tagKey', () => { const fakePath = '/rendered/path/tagKey'; const expectedParameters = { diff --git a/packages/google-cloud-resourcemanager/test/gapic_tag_holds_v3.ts b/packages/google-cloud-resourcemanager/test/gapic_tag_holds_v3.ts new file mode 100644 index 00000000000..7c035766d91 --- /dev/null +++ b/packages/google-cloud-resourcemanager/test/gapic_tag_holds_v3.ts @@ -0,0 +1,1558 @@ +// Copyright 2023 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 tagholdsModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos} 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 stubLongRunningCall( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().rejects(callError) + : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().callsArgWith(2, callError) + : sinon.stub().callsArgWith(2, null, mockOperation); +} + +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('v3.TagHoldsClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = tagholdsModule.v3.TagHoldsClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = tagholdsModule.v3.TagHoldsClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = tagholdsModule.v3.TagHoldsClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new tagholdsModule.v3.TagHoldsClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new tagholdsModule.v3.TagHoldsClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.tagHoldsStub, undefined); + await client.initialize(); + assert(client.tagHoldsStub); + }); + + it('has close method for the initialized client', done => { + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.tagHoldsStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.tagHoldsStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new tagholdsModule.v3.TagHoldsClient({ + 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 tagholdsModule.v3.TagHoldsClient({ + 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('createTagHold', () => { + it('invokes createTagHold without error', async () => { + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.CreateTagHoldRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.resourcemanager.v3.CreateTagHoldRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createTagHold = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createTagHold(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createTagHold as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createTagHold as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createTagHold without error using callback', async () => { + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.CreateTagHoldRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.resourcemanager.v3.CreateTagHoldRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createTagHold = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createTagHold( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.resourcemanager.v3.ITagHold, + protos.google.cloud.resourcemanager.v3.ICreateTagHoldMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.resourcemanager.v3.ITagHold, + protos.google.cloud.resourcemanager.v3.ICreateTagHoldMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createTagHold as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createTagHold as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createTagHold with call error', async () => { + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.CreateTagHoldRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.resourcemanager.v3.CreateTagHoldRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createTagHold = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createTagHold(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createTagHold as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createTagHold as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createTagHold with LRO error', async () => { + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.CreateTagHoldRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.resourcemanager.v3.CreateTagHoldRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createTagHold = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createTagHold(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createTagHold as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createTagHold as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateTagHoldProgress without error', async () => { + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkCreateTagHoldProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateTagHoldProgress with error', async () => { + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkCreateTagHoldProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteTagHold', () => { + it('invokes deleteTagHold without error', async () => { + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.DeleteTagHoldRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.resourcemanager.v3.DeleteTagHoldRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteTagHold = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteTagHold(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteTagHold as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteTagHold as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteTagHold without error using callback', async () => { + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.DeleteTagHoldRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.resourcemanager.v3.DeleteTagHoldRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteTagHold = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteTagHold( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.resourcemanager.v3.IDeleteTagHoldMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.resourcemanager.v3.IDeleteTagHoldMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteTagHold as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteTagHold as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteTagHold with call error', async () => { + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.DeleteTagHoldRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.resourcemanager.v3.DeleteTagHoldRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteTagHold = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteTagHold(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteTagHold as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteTagHold as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteTagHold with LRO error', async () => { + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.DeleteTagHoldRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.resourcemanager.v3.DeleteTagHoldRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteTagHold = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteTagHold(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteTagHold as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteTagHold as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteTagHoldProgress without error', async () => { + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkDeleteTagHoldProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteTagHoldProgress with error', async () => { + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkDeleteTagHoldProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listTagHolds', () => { + it('invokes listTagHolds without error', async () => { + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.ListTagHoldsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.resourcemanager.v3.ListTagHoldsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.TagHold() + ), + generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.TagHold() + ), + generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.TagHold() + ), + ]; + client.innerApiCalls.listTagHolds = stubSimpleCall(expectedResponse); + const [response] = await client.listTagHolds(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listTagHolds as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listTagHolds as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTagHolds without error using callback', async () => { + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.ListTagHoldsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.resourcemanager.v3.ListTagHoldsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.TagHold() + ), + generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.TagHold() + ), + generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.TagHold() + ), + ]; + client.innerApiCalls.listTagHolds = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listTagHolds( + request, + ( + err?: Error | null, + result?: protos.google.cloud.resourcemanager.v3.ITagHold[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listTagHolds as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listTagHolds as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTagHolds with error', async () => { + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.ListTagHoldsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.resourcemanager.v3.ListTagHoldsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listTagHolds = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listTagHolds(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listTagHolds as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listTagHolds as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTagHoldsStream without error', async () => { + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.ListTagHoldsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.resourcemanager.v3.ListTagHoldsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.TagHold() + ), + generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.TagHold() + ), + generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.TagHold() + ), + ]; + client.descriptors.page.listTagHolds.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listTagHoldsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.resourcemanager.v3.TagHold[] = []; + stream.on( + 'data', + (response: protos.google.cloud.resourcemanager.v3.TagHold) => { + 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.listTagHolds.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listTagHolds, request) + ); + assert( + (client.descriptors.page.listTagHolds.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listTagHoldsStream with error', async () => { + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.ListTagHoldsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.resourcemanager.v3.ListTagHoldsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listTagHolds.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listTagHoldsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.resourcemanager.v3.TagHold[] = []; + stream.on( + 'data', + (response: protos.google.cloud.resourcemanager.v3.TagHold) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listTagHolds.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listTagHolds, request) + ); + assert( + (client.descriptors.page.listTagHolds.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listTagHolds without error', async () => { + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.ListTagHoldsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.resourcemanager.v3.ListTagHoldsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.TagHold() + ), + generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.TagHold() + ), + generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.TagHold() + ), + ]; + client.descriptors.page.listTagHolds.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.resourcemanager.v3.ITagHold[] = []; + const iterable = client.listTagHoldsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listTagHolds.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listTagHolds.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listTagHolds with error', async () => { + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.ListTagHoldsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.resourcemanager.v3.ListTagHoldsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listTagHolds.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listTagHoldsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.resourcemanager.v3.ITagHold[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listTagHolds.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listTagHolds.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.getOperation(request); + }, expectedError); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.cancelOperation(request); + }, expectedError); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.deleteOperation(request); + }, expectedError); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); + + describe('Path templates', () => { + describe('folder', () => { + const fakePath = '/rendered/path/folder'; + const expectedParameters = { + folder: 'folderValue', + }; + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.folderPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('folderPath', () => { + const result = client.folderPath('folderValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.folderPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchFolderFromFolderName', () => { + const result = client.matchFolderFromFolderName(fakePath); + assert.strictEqual(result, 'folderValue'); + assert( + (client.pathTemplates.folderPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organization', () => { + const fakePath = '/rendered/path/organization'; + const expectedParameters = { + organization: 'organizationValue', + }; + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationPath', () => { + const result = client.organizationPath('organizationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationName', () => { + const result = client.matchOrganizationFromOrganizationName(fakePath); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('project', () => { + const fakePath = '/rendered/path/project'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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('tagBinding', () => { + const fakePath = '/rendered/path/tagBinding'; + const expectedParameters = { + tag_binding: 'tagBindingValue', + }; + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.tagBindingPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.tagBindingPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('tagBindingPath', () => { + const result = client.tagBindingPath('tagBindingValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.tagBindingPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchTagBindingFromTagBindingName', () => { + const result = client.matchTagBindingFromTagBindingName(fakePath); + assert.strictEqual(result, 'tagBindingValue'); + assert( + (client.pathTemplates.tagBindingPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('tagHold', () => { + const fakePath = '/rendered/path/tagHold'; + const expectedParameters = { + tag_value: 'tagValueValue', + tag_hold: 'tagHoldValue', + }; + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.tagHoldPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.tagHoldPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('tagHoldPath', () => { + const result = client.tagHoldPath('tagValueValue', 'tagHoldValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.tagHoldPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchTagValueFromTagHoldName', () => { + const result = client.matchTagValueFromTagHoldName(fakePath); + assert.strictEqual(result, 'tagValueValue'); + assert( + (client.pathTemplates.tagHoldPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTagHoldFromTagHoldName', () => { + const result = client.matchTagHoldFromTagHoldName(fakePath); + assert.strictEqual(result, 'tagHoldValue'); + assert( + (client.pathTemplates.tagHoldPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('tagKey', () => { + const fakePath = '/rendered/path/tagKey'; + const expectedParameters = { + tag_key: 'tagKeyValue', + }; + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.tagKeyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.tagKeyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('tagKeyPath', () => { + const result = client.tagKeyPath('tagKeyValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.tagKeyPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchTagKeyFromTagKeyName', () => { + const result = client.matchTagKeyFromTagKeyName(fakePath); + assert.strictEqual(result, 'tagKeyValue'); + assert( + (client.pathTemplates.tagKeyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('tagValue', () => { + const fakePath = '/rendered/path/tagValue'; + const expectedParameters = { + tag_value: 'tagValueValue', + }; + const client = new tagholdsModule.v3.TagHoldsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.tagValuePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.tagValuePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('tagValuePath', () => { + const result = client.tagValuePath('tagValueValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.tagValuePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchTagValueFromTagValueName', () => { + const result = client.matchTagValueFromTagValueName(fakePath); + assert.strictEqual(result, 'tagValueValue'); + assert( + (client.pathTemplates.tagValuePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-resourcemanager/test/gapic_tag_keys_v3.ts b/packages/google-cloud-resourcemanager/test/gapic_tag_keys_v3.ts index d17d5c8fd6b..bc9ff20c9ba 100644 --- a/packages/google-cloud-resourcemanager/test/gapic_tag_keys_v3.ts +++ b/packages/google-cloud-resourcemanager/test/gapic_tag_keys_v3.ts @@ -384,6 +384,90 @@ describe('v3.TagKeysClient', () => { }); }); + describe('getNamespacedTagKey', () => { + it('invokes getNamespacedTagKey without error', async () => { + const client = new tagkeysModule.v3.TagKeysClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.TagKey() + ); + client.innerApiCalls.getNamespacedTagKey = + stubSimpleCall(expectedResponse); + const [response] = await client.getNamespacedTagKey(request); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes getNamespacedTagKey without error using callback', async () => { + const client = new tagkeysModule.v3.TagKeysClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.TagKey() + ); + client.innerApiCalls.getNamespacedTagKey = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getNamespacedTagKey( + request, + ( + err?: Error | null, + result?: protos.google.cloud.resourcemanager.v3.ITagKey | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes getNamespacedTagKey with error', async () => { + const client = new tagkeysModule.v3.TagKeysClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.getNamespacedTagKey = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getNamespacedTagKey(request), expectedError); + }); + + it('invokes getNamespacedTagKey with closed client', async () => { + const client = new tagkeysModule.v3.TagKeysClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.GetNamespacedTagKeyRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getNamespacedTagKey(request), expectedError); + }); + }); + describe('getIamPolicy', () => { it('invokes getIamPolicy without error', async () => { const client = new tagkeysModule.v3.TagKeysClient({ @@ -1527,6 +1611,311 @@ describe('v3.TagKeysClient', () => { ); }); }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new tagkeysModule.v3.TagKeysClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new tagkeysModule.v3.TagKeysClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new tagkeysModule.v3.TagKeysClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.getOperation(request); + }, expectedError); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new tagkeysModule.v3.TagKeysClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new tagkeysModule.v3.TagKeysClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new tagkeysModule.v3.TagKeysClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.cancelOperation(request); + }, expectedError); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new tagkeysModule.v3.TagKeysClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new tagkeysModule.v3.TagKeysClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new tagkeysModule.v3.TagKeysClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.deleteOperation(request); + }, expectedError); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new tagkeysModule.v3.TagKeysClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new tagkeysModule.v3.TagKeysClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); describe('Path templates', () => { describe('folder', () => { @@ -1681,6 +2070,55 @@ describe('v3.TagKeysClient', () => { }); }); + describe('tagHold', () => { + const fakePath = '/rendered/path/tagHold'; + const expectedParameters = { + tag_value: 'tagValueValue', + tag_hold: 'tagHoldValue', + }; + const client = new tagkeysModule.v3.TagKeysClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.tagHoldPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.tagHoldPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('tagHoldPath', () => { + const result = client.tagHoldPath('tagValueValue', 'tagHoldValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.tagHoldPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchTagValueFromTagHoldName', () => { + const result = client.matchTagValueFromTagHoldName(fakePath); + assert.strictEqual(result, 'tagValueValue'); + assert( + (client.pathTemplates.tagHoldPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTagHoldFromTagHoldName', () => { + const result = client.matchTagHoldFromTagHoldName(fakePath); + assert.strictEqual(result, 'tagHoldValue'); + assert( + (client.pathTemplates.tagHoldPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('tagKey', () => { const fakePath = '/rendered/path/tagKey'; const expectedParameters = { diff --git a/packages/google-cloud-resourcemanager/test/gapic_tag_values_v3.ts b/packages/google-cloud-resourcemanager/test/gapic_tag_values_v3.ts index 172a4c602e3..84ffe7a80c3 100644 --- a/packages/google-cloud-resourcemanager/test/gapic_tag_values_v3.ts +++ b/packages/google-cloud-resourcemanager/test/gapic_tag_values_v3.ts @@ -387,6 +387,96 @@ describe('v3.TagValuesClient', () => { }); }); + describe('getNamespacedTagValue', () => { + it('invokes getNamespacedTagValue without error', async () => { + const client = new tagvaluesModule.v3.TagValuesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.TagValue() + ); + client.innerApiCalls.getNamespacedTagValue = + stubSimpleCall(expectedResponse); + const [response] = await client.getNamespacedTagValue(request); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes getNamespacedTagValue without error using callback', async () => { + const client = new tagvaluesModule.v3.TagValuesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.TagValue() + ); + client.innerApiCalls.getNamespacedTagValue = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getNamespacedTagValue( + request, + ( + err?: Error | null, + result?: protos.google.cloud.resourcemanager.v3.ITagValue | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes getNamespacedTagValue with error', async () => { + const client = new tagvaluesModule.v3.TagValuesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.getNamespacedTagValue = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getNamespacedTagValue(request), + expectedError + ); + }); + + it('invokes getNamespacedTagValue with closed client', async () => { + const client = new tagvaluesModule.v3.TagValuesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.resourcemanager.v3.GetNamespacedTagValueRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getNamespacedTagValue(request), + expectedError + ); + }); + }); + describe('getIamPolicy', () => { it('invokes getIamPolicy without error', async () => { const client = new tagvaluesModule.v3.TagValuesClient({ @@ -1539,6 +1629,311 @@ describe('v3.TagValuesClient', () => { ); }); }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new tagvaluesModule.v3.TagValuesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new tagvaluesModule.v3.TagValuesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new tagvaluesModule.v3.TagValuesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.getOperation(request); + }, expectedError); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new tagvaluesModule.v3.TagValuesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new tagvaluesModule.v3.TagValuesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new tagvaluesModule.v3.TagValuesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.cancelOperation(request); + }, expectedError); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new tagvaluesModule.v3.TagValuesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new tagvaluesModule.v3.TagValuesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new tagvaluesModule.v3.TagValuesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.deleteOperation(request); + }, expectedError); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new tagvaluesModule.v3.TagValuesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new tagvaluesModule.v3.TagValuesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); describe('Path templates', () => { describe('folder', () => { @@ -1693,6 +2088,55 @@ describe('v3.TagValuesClient', () => { }); }); + describe('tagHold', () => { + const fakePath = '/rendered/path/tagHold'; + const expectedParameters = { + tag_value: 'tagValueValue', + tag_hold: 'tagHoldValue', + }; + const client = new tagvaluesModule.v3.TagValuesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.tagHoldPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.tagHoldPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('tagHoldPath', () => { + const result = client.tagHoldPath('tagValueValue', 'tagHoldValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.tagHoldPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchTagValueFromTagHoldName', () => { + const result = client.matchTagValueFromTagHoldName(fakePath); + assert.strictEqual(result, 'tagValueValue'); + assert( + (client.pathTemplates.tagHoldPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTagHoldFromTagHoldName', () => { + const result = client.matchTagHoldFromTagHoldName(fakePath); + assert.strictEqual(result, 'tagHoldValue'); + assert( + (client.pathTemplates.tagHoldPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('tagKey', () => { const fakePath = '/rendered/path/tagKey'; const expectedParameters = { diff --git a/packages/google-cloud-resourcesettings/package.json b/packages/google-cloud-resourcesettings/package.json index 62eda87ad89..b6c5663955f 100644 --- a/packages/google-cloud-resourcesettings/package.json +++ b/packages/google-cloud-resourcesettings/package.json @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-resourcesettings" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-retail/CHANGELOG.md b/packages/google-cloud-retail/CHANGELOG.md index a4b04e1d93c..eb989db6fa3 100644 --- a/packages/google-cloud-retail/CHANGELOG.md +++ b/packages/google-cloud-retail/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.4.1](https://github.com/googleapis/google-cloud-node/compare/retail-v2.4.0...retail-v2.4.1) (2023-04-24) + + +### Bug Fixes + +* [retail] fix the HTTP format for merchant center link service ([#4183](https://github.com/googleapis/google-cloud-node/issues/4183)) ([ad27ba7](https://github.com/googleapis/google-cloud-node/commit/ad27ba7ef7f23e90fdd8870f9b6b24fa25970f5d)) + ## [2.4.0](https://github.com/googleapis/google-cloud-node/compare/retail-v2.3.1...retail-v2.4.0) (2023-04-13) diff --git a/packages/google-cloud-retail/package.json b/packages/google-cloud-retail/package.json index 80828e1cbaa..d5fe081699f 100644 --- a/packages/google-cloud-retail/package.json +++ b/packages/google-cloud-retail/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/retail", - "version": "2.4.0", + "version": "2.4.1", "description": "Retail client for Node.js", "repository": { "type": "git", @@ -33,7 +33,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -41,10 +41,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -59,6 +60,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -72,5 +74,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-retail" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-retail/protos/google/cloud/retail/v2alpha/merchant_center_account_link_service.proto b/packages/google-cloud-retail/protos/google/cloud/retail/v2alpha/merchant_center_account_link_service.proto index 95e2129b6a5..93704f004c8 100644 --- a/packages/google-cloud-retail/protos/google/cloud/retail/v2alpha/merchant_center_account_link_service.proto +++ b/packages/google-cloud-retail/protos/google/cloud/retail/v2alpha/merchant_center_account_link_service.proto @@ -50,15 +50,12 @@ service MerchantCenterAccountLinkService { option (google.api.method_signature) = "parent"; } - // Creates a MerchantCenterAccountLink. - // - // [MerchantCenterAccountLink][google.cloud.retail.v2alpha.MerchantCenterAccountLink] - // cannot be set to a different oneof field, if so an INVALID_ARGUMENT is - // returned. + // Creates a + // [MerchantCenterAccountLink][google.cloud.retail.v2alpha.MerchantCenterAccountLink]. rpc CreateMerchantCenterAccountLink(CreateMerchantCenterAccountLinkRequest) returns (google.longrunning.Operation) { option (google.api.http) = { - post: "/v2alpha/{merchant_center_account_link.name=projects/*/locations/*/catalogs/*/merchantCenterAccountLinks/*}" + post: "/v2alpha/{parent=projects/*/locations/*/catalogs/*}/merchantCenterAccountLinks" body: "merchant_center_account_link" }; option (google.api.method_signature) = @@ -69,7 +66,8 @@ service MerchantCenterAccountLinkService { }; } - // Deletes a MerchantCenterAccountLink. + // Deletes a + // [MerchantCenterAccountLink][google.cloud.retail.v2alpha.MerchantCenterAccountLink]. // If the // [MerchantCenterAccountLink][google.cloud.retail.v2alpha.MerchantCenterAccountLink] // to delete does not exist, a NOT_FOUND error is returned. diff --git a/packages/google-cloud-retail/protos/protos.json b/packages/google-cloud-retail/protos/protos.json index ad19b97d091..7dd5a117101 100644 --- a/packages/google-cloud-retail/protos/protos.json +++ b/packages/google-cloud-retail/protos/protos.json @@ -7813,7 +7813,7 @@ "requestType": "CreateMerchantCenterAccountLinkRequest", "responseType": "google.longrunning.Operation", "options": { - "(google.api.http).post": "/v2alpha/{merchant_center_account_link.name=projects/*/locations/*/catalogs/*/merchantCenterAccountLinks/*}", + "(google.api.http).post": "/v2alpha/{parent=projects/*/locations/*/catalogs/*}/merchantCenterAccountLinks", "(google.api.http).body": "merchant_center_account_link", "(google.api.method_signature)": "parent,merchant_center_account_link", "(google.longrunning.operation_info).response_type": "google.cloud.retail.v2alpha.MerchantCenterAccountLink", @@ -7822,7 +7822,7 @@ "parsedOptions": [ { "(google.api.http)": { - "post": "/v2alpha/{merchant_center_account_link.name=projects/*/locations/*/catalogs/*/merchantCenterAccountLinks/*}", + "post": "/v2alpha/{parent=projects/*/locations/*/catalogs/*}/merchantCenterAccountLinks", "body": "merchant_center_account_link" } }, diff --git a/packages/google-cloud-retail/samples/generated/v2/snippet_metadata.google.cloud.retail.v2.json b/packages/google-cloud-retail/samples/generated/v2/snippet_metadata.google.cloud.retail.v2.json index e8cfada75d5..140c606fc83 100644 --- a/packages/google-cloud-retail/samples/generated/v2/snippet_metadata.google.cloud.retail.v2.json +++ b/packages/google-cloud-retail/samples/generated/v2/snippet_metadata.google.cloud.retail.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-retail", - "version": "2.3.1", + "version": "2.4.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-retail/samples/generated/v2alpha/snippet_metadata.google.cloud.retail.v2alpha.json b/packages/google-cloud-retail/samples/generated/v2alpha/snippet_metadata.google.cloud.retail.v2alpha.json index 16c1707767d..c3d4e8266c7 100644 --- a/packages/google-cloud-retail/samples/generated/v2alpha/snippet_metadata.google.cloud.retail.v2alpha.json +++ b/packages/google-cloud-retail/samples/generated/v2alpha/snippet_metadata.google.cloud.retail.v2alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-retail", - "version": "2.3.1", + "version": "2.4.1", "language": "TYPESCRIPT", "apis": [ { @@ -931,7 +931,7 @@ "regionTag": "retail_v2alpha_generated_MerchantCenterAccountLinkService_CreateMerchantCenterAccountLink_async", "title": "CatalogService createMerchantCenterAccountLink Sample", "origin": "API_DEFINITION", - "description": " Creates a MerchantCenterAccountLink. [MerchantCenterAccountLink][google.cloud.retail.v2alpha.MerchantCenterAccountLink] cannot be set to a different oneof field, if so an INVALID_ARGUMENT is returned.", + "description": " Creates a [MerchantCenterAccountLink][google.cloud.retail.v2alpha.MerchantCenterAccountLink].", "canonical": true, "file": "merchant_center_account_link_service.create_merchant_center_account_link.js", "language": "JAVASCRIPT", @@ -975,7 +975,7 @@ "regionTag": "retail_v2alpha_generated_MerchantCenterAccountLinkService_DeleteMerchantCenterAccountLink_async", "title": "CatalogService deleteMerchantCenterAccountLink Sample", "origin": "API_DEFINITION", - "description": " Deletes a MerchantCenterAccountLink. If the [MerchantCenterAccountLink][google.cloud.retail.v2alpha.MerchantCenterAccountLink] to delete does not exist, a NOT_FOUND error is returned.", + "description": " Deletes a [MerchantCenterAccountLink][google.cloud.retail.v2alpha.MerchantCenterAccountLink]. If the [MerchantCenterAccountLink][google.cloud.retail.v2alpha.MerchantCenterAccountLink] to delete does not exist, a NOT_FOUND error is returned.", "canonical": true, "file": "merchant_center_account_link_service.delete_merchant_center_account_link.js", "language": "JAVASCRIPT", diff --git a/packages/google-cloud-retail/samples/generated/v2beta/snippet_metadata.google.cloud.retail.v2beta.json b/packages/google-cloud-retail/samples/generated/v2beta/snippet_metadata.google.cloud.retail.v2beta.json index ca04e9dd44e..13785310bfc 100644 --- a/packages/google-cloud-retail/samples/generated/v2beta/snippet_metadata.google.cloud.retail.v2beta.json +++ b/packages/google-cloud-retail/samples/generated/v2beta/snippet_metadata.google.cloud.retail.v2beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-retail", - "version": "2.3.1", + "version": "2.4.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-retail/samples/package.json b/packages/google-cloud-retail/samples/package.json index a0e0569721e..9ec15d7efa1 100644 --- a/packages/google-cloud-retail/samples/package.json +++ b/packages/google-cloud-retail/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha" }, "dependencies": { - "@google-cloud/retail": "^2.4.0", + "@google-cloud/retail": "^2.4.1", "@google-cloud/bigquery": "^6.0.0", "@google-cloud/storage": "^6.0.0" }, diff --git a/packages/google-cloud-retail/src/v2alpha/merchant_center_account_link_service_client.ts b/packages/google-cloud-retail/src/v2alpha/merchant_center_account_link_service_client.ts index 8120cb5bc03..dd5e08c253a 100644 --- a/packages/google-cloud-retail/src/v2alpha/merchant_center_account_link_service_client.ts +++ b/packages/google-cloud-retail/src/v2alpha/merchant_center_account_link_service_client.ts @@ -514,7 +514,8 @@ export class MerchantCenterAccountLinkServiceClient { ); } /** - * Deletes a MerchantCenterAccountLink. + * Deletes a + * {@link google.cloud.retail.v2alpha.MerchantCenterAccountLink|MerchantCenterAccountLink}. * If the * {@link google.cloud.retail.v2alpha.MerchantCenterAccountLink|MerchantCenterAccountLink} * to delete does not exist, a NOT_FOUND error is returned. @@ -620,11 +621,8 @@ export class MerchantCenterAccountLinkServiceClient { } /** - * Creates a MerchantCenterAccountLink. - * - * {@link google.cloud.retail.v2alpha.MerchantCenterAccountLink|MerchantCenterAccountLink} - * cannot be set to a different oneof field, if so an INVALID_ARGUMENT is - * returned. + * Creates a + * {@link google.cloud.retail.v2alpha.MerchantCenterAccountLink|MerchantCenterAccountLink}. * * @param {Object} request * The request object that will be sent. @@ -732,8 +730,7 @@ export class MerchantCenterAccountLinkServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - 'merchant_center_account_link.name': - request.merchantCenterAccountLink!.name ?? '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createMerchantCenterAccountLink( diff --git a/packages/google-cloud-retail/test/gapic_merchant_center_account_link_service_v2alpha.ts b/packages/google-cloud-retail/test/gapic_merchant_center_account_link_service_v2alpha.ts index 189b19eee65..dac5ded8dd5 100644 --- a/packages/google-cloud-retail/test/gapic_merchant_center_account_link_service_v2alpha.ts +++ b/packages/google-cloud-retail/test/gapic_merchant_center_account_link_service_v2alpha.ts @@ -564,13 +564,12 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.CreateMerchantCenterAccountLinkRequest() ); - request.merchantCenterAccountLink ??= {}; const defaultValue1 = getTypeDefaultValue( '.google.cloud.retail.v2alpha.CreateMerchantCenterAccountLinkRequest', - ['merchantCenterAccountLink', 'name'] + ['parent'] ); - request.merchantCenterAccountLink.name = defaultValue1; - const expectedHeaderRequestParams = `merchant_center_account_link.name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -601,13 +600,12 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.CreateMerchantCenterAccountLinkRequest() ); - request.merchantCenterAccountLink ??= {}; const defaultValue1 = getTypeDefaultValue( '.google.cloud.retail.v2alpha.CreateMerchantCenterAccountLinkRequest', - ['merchantCenterAccountLink', 'name'] + ['parent'] ); - request.merchantCenterAccountLink.name = defaultValue1; - const expectedHeaderRequestParams = `merchant_center_account_link.name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -659,13 +657,12 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.CreateMerchantCenterAccountLinkRequest() ); - request.merchantCenterAccountLink ??= {}; const defaultValue1 = getTypeDefaultValue( '.google.cloud.retail.v2alpha.CreateMerchantCenterAccountLinkRequest', - ['merchantCenterAccountLink', 'name'] + ['parent'] ); - request.merchantCenterAccountLink.name = defaultValue1; - const expectedHeaderRequestParams = `merchant_center_account_link.name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createMerchantCenterAccountLink = stubLongRunningCall(undefined, expectedError); @@ -695,13 +692,12 @@ describe('v2alpha.MerchantCenterAccountLinkServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.retail.v2alpha.CreateMerchantCenterAccountLinkRequest() ); - request.merchantCenterAccountLink ??= {}; const defaultValue1 = getTypeDefaultValue( '.google.cloud.retail.v2alpha.CreateMerchantCenterAccountLinkRequest', - ['merchantCenterAccountLink', 'name'] + ['parent'] ); - request.merchantCenterAccountLink.name = defaultValue1; - const expectedHeaderRequestParams = `merchant_center_account_link.name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createMerchantCenterAccountLink = stubLongRunningCall(undefined, undefined, expectedError); diff --git a/packages/google-cloud-run/CHANGELOG.md b/packages/google-cloud-run/CHANGELOG.md index af994e108a1..d6f564b5d4b 100644 --- a/packages/google-cloud-run/CHANGELOG.md +++ b/packages/google-cloud-run/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.5.0](https://github.com/googleapis/google-cloud-node/compare/run-v0.4.2...run-v0.5.0) (2023-05-04) + + +### Features + +* [run] Adds support for Startup CPU Boost (GA) ([#4220](https://github.com/googleapis/google-cloud-node/issues/4220)) ([b1b4e29](https://github.com/googleapis/google-cloud-node/commit/b1b4e29f09759a8161c4e26473333ec729fa5165)) + ## [0.4.2](https://github.com/googleapis/google-cloud-node/compare/run-v0.4.1...run-v0.4.2) (2023-04-13) diff --git a/packages/google-cloud-run/package.json b/packages/google-cloud-run/package.json index 0aa9f376838..105820d63c0 100644 --- a/packages/google-cloud-run/package.json +++ b/packages/google-cloud-run/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/run", - "version": "0.4.2", + "version": "0.5.0", "description": "Cloud Run Admin API", "repository": { "type": "git", @@ -26,7 +26,7 @@ "main": "build/src/index.js", "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -34,11 +34,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -53,6 +53,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^10.0.0", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -66,5 +67,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-run" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-run/protos/google/cloud/run/v2/condition.proto b/packages/google-cloud-run/protos/google/cloud/run/v2/condition.proto index 1aaecc02c60..cb6680a61b5 100644 --- a/packages/google-cloud-run/protos/google/cloud/run/v2/condition.proto +++ b/packages/google-cloud-run/protos/google/cloud/run/v2/condition.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -169,6 +169,9 @@ message Condition { // The execution was cancelled by users. CANCELLED = 3; + + // The execution is in the process of being cancelled. + CANCELLING = 4; } // type is used to communicate the status of the reconciliation process. diff --git a/packages/google-cloud-run/protos/google/cloud/run/v2/execution.proto b/packages/google-cloud-run/protos/google/cloud/run/v2/execution.proto index 1c2cf832f8e..29b73a232fa 100644 --- a/packages/google-cloud-run/protos/google/cloud/run/v2/execution.proto +++ b/packages/google-cloud-run/protos/google/cloud/run/v2/execution.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -155,16 +155,20 @@ message Execution { // modifies the desired state. int64 generation = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // KRM-style labels for the resource. - // User-provided labels are shared with Google's billing system, so they can - // be used to filter, or break down billing charges by team, component, - // environment, state, etc. For more information, visit + // Output only. Unstructured key value map that can be used to organize and + // categorize objects. User-provided labels are shared with Google's billing + // system, so they can be used to filter, or break down billing charges by + // team, component, environment, state, etc. For more information, visit // https://cloud.google.com/resource-manager/docs/creating-managing-labels or // https://cloud.google.com/run/docs/configuring/labels - map labels = 4; + map labels = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // KRM-style annotations for the resource. - map annotations = 5; + // Output only. Unstructured key value map that may + // be set by external tools to store and arbitrary metadata. + // They are not queryable and should be preserved + // when modifying objects. + map annotations = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Represents time when the execution was acknowledged by the // execution controller. It is not guaranteed to be set in happens-before @@ -198,10 +202,14 @@ message Execution { google.protobuf.Timestamp expire_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Set the launch stage to a preview stage on write to allow use of preview - // features in that stage. On read, describes whether the resource uses - // preview features. Launch Stages are defined at [Google Cloud Platform - // Launch Stages](https://cloud.google.com/terms/launch-stages). + // The least stable launch stage needed to create this resource, as defined by + // [Google Cloud Platform Launch + // Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports + // `ALPHA`, `BETA`, and `GA`. + //

Note that this value might not be what was used + // as input. For example, if ALPHA was provided as input in the parent + // resource, but only BETA and GA-level features are were, this field will be + // BETA. google.api.LaunchStage launch_stage = 11; // Output only. The name of the parent Job. @@ -214,15 +222,12 @@ message Execution { // should run at any given time. Must be <= task_count. The actual number of // tasks running in steady state will be less than this number when // ((.spec.task_count - .status.successful) < .spec.parallelism), i.e. when - // the work left to do is less than max parallelism. More info: - // https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ + // the work left to do is less than max parallelism. int32 parallelism = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Specifies the desired number of tasks the execution should // run. Setting to 1 means that parallelism is limited to 1 and the success of // that task signals the success of the execution. - // More info: - // https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ int32 task_count = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The template used to create tasks for this execution. @@ -263,6 +268,9 @@ message Execution { // Console. string log_uri = 26 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Reserved for future use. + bool satisfies_pzs = 27 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. A system-generated fingerprint for this version of the // resource. May be used to detect modification conflict during updates. string etag = 99 [(google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/packages/google-cloud-run/protos/google/cloud/run/v2/execution_template.proto b/packages/google-cloud-run/protos/google/cloud/run/v2/execution_template.proto index 17e4a4439a1..55f465a5f43 100644 --- a/packages/google-cloud-run/protos/google/cloud/run/v2/execution_template.proto +++ b/packages/google-cloud-run/protos/google/cloud/run/v2/execution_template.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -27,7 +27,13 @@ option java_package = "com.google.cloud.run.v2"; // ExecutionTemplate describes the data an execution should have when created // from a template. message ExecutionTemplate { - // KRM-style labels for the resource. + // Unstructured key value map that can be used to organize and categorize + // objects. + // User-provided labels are shared with Google's billing system, so they can + // be used to filter, or break down billing charges by team, component, + // environment, state, etc. For more information, visit + // https://cloud.google.com/resource-manager/docs/creating-managing-labels or + // https://cloud.google.com/run/docs/configuring/labels. // //

Cloud Run API v2 does not support labels with `run.googleapis.com`, // `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` @@ -35,12 +41,17 @@ message ExecutionTemplate { // corresponding field in v2 ExecutionTemplate. map labels = 1; - // KRM-style annotations for the resource. + // Unstructured key value map that may be set by external tools to store and + // arbitrary metadata. They are not queryable and should be preserved + // when modifying objects. // //

Cloud Run API v2 does not support annotations with `run.googleapis.com`, // `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` // namespaces, and they will be rejected. All system annotations in v1 now // have a corresponding field in v2 ExecutionTemplate. + // + //

This field follows Kubernetes annotations' namespacing, limits, and + // rules. map annotations = 2; // Specifies the maximum desired number of tasks the execution should run at @@ -54,9 +65,7 @@ message ExecutionTemplate { // Specifies the desired number of tasks the execution should run. // Setting to 1 means that parallelism is limited to 1 and the success of - // that task signals the success of the execution. - // More info: - // https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ + // that task signals the success of the execution. Defaults to 1. int32 task_count = 4; // Required. Describes the task(s) that will be created when executing an diff --git a/packages/google-cloud-run/protos/google/cloud/run/v2/job.proto b/packages/google-cloud-run/protos/google/cloud/run/v2/job.proto index 5a04b531880..b180eb50610 100644 --- a/packages/google-cloud-run/protos/google/cloud/run/v2/job.proto +++ b/packages/google-cloud-run/protos/google/cloud/run/v2/job.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,14 +16,13 @@ syntax = "proto3"; package google.cloud.run.v2; -import public "google/cloud/run/v2/execution.proto"; - import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/launch_stage.proto"; import "google/api/resource.proto"; import "google/cloud/run/v2/condition.proto"; +import "google/cloud/run/v2/execution.proto"; import "google/cloud/run/v2/execution_template.proto"; import "google/cloud/run/v2/vendor_settings.proto"; import "google/iam/v1/iam_policy.proto"; @@ -281,12 +280,13 @@ message Job { // modifies the desired state. int64 generation = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // KRM-style labels for the resource. + // Unstructured key value map that can be used to organize and categorize + // objects. // User-provided labels are shared with Google's billing system, so they can // be used to filter, or break down billing charges by team, component, // environment, state, etc. For more information, visit // https://cloud.google.com/resource-manager/docs/creating-managing-labels or - // https://cloud.google.com/run/docs/configuring/labels + // https://cloud.google.com/run/docs/configuring/labels. // //

Cloud Run API v2 does not support labels with `run.googleapis.com`, // `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` @@ -294,18 +294,18 @@ message Job { // corresponding field in v2 Job. map labels = 4; - // KRM-style annotations for the resource. Unstructured key value map that may + // Unstructured key value map that may // be set by external tools to store and arbitrary metadata. // They are not queryable and should be preserved // when modifying objects. // //

Cloud Run API v2 does not support annotations with `run.googleapis.com`, // `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - // namespaces, and they will be rejected. All system annotations in v1 now - // have a corresponding field in v2 Job. + // namespaces, and they will be rejected on new resources. All system + // annotations in v1 now have a corresponding field in v2 Job. // //

This field follows Kubernetes annotations' namespacing, limits, and - // rules. More info: https://kubernetes.io/docs/user-guide/annotations + // rules. map annotations = 5; // Output only. The creation time. @@ -341,6 +341,12 @@ message Job { // Launch Stages](https://cloud.google.com/terms/launch-stages). // Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA // is assumed. + // Set the launch stage to a preview stage on input to allow use of preview + // features in that stage. On read (or output), describes whether the resource + // uses preview features. + //

+ // For example, if ALPHA is provided as input, but only BETA and GA-level + // features are used, this field will be BETA on output. google.api.LaunchStage launch_stage = 14; // Settings for the Binary Authorization feature. @@ -394,6 +400,9 @@ message Job { // failure can be found in `terminal_condition` and `conditions`. bool reconciling = 23 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Reserved for future use. + bool satisfies_pzs = 25 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. A system-generated fingerprint for this version of the // resource. May be used to detect modification conflict during updates. string etag = 99 [(google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/packages/google-cloud-run/protos/google/cloud/run/v2/k8s.min.proto b/packages/google-cloud-run/protos/google/cloud/run/v2/k8s.min.proto index b5b2353828e..1d66551ac39 100644 --- a/packages/google-cloud-run/protos/google/cloud/run/v2/k8s.min.proto +++ b/packages/google-cloud-run/protos/google/cloud/run/v2/k8s.min.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -51,38 +51,21 @@ message Container { // Required. Name of the container image in Dockerhub, Google Artifact // Registry, or Google Container Registry. If the host is not provided, - // Dockerhub is assumed. More info: - // https://kubernetes.io/docs/concepts/containers/images + // Dockerhub is assumed. string image = 2 [(google.api.field_behavior) = REQUIRED]; // Entrypoint array. Not executed within a shell. // The docker image's ENTRYPOINT is used if this is not provided. - // Variable references $(VAR_NAME) are expanded using the container's - // environment. If a variable cannot be resolved, the reference in the input - // string will be unchanged. The $(VAR_NAME) syntax can be escaped with a - // double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, - // regardless of whether the variable exists or not. - // More info: - // https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell repeated string command = 3; // Arguments to the entrypoint. // The docker image's CMD is used if this is not provided. - // Variable references $(VAR_NAME) are expanded using the container's - // environment. If a variable cannot be resolved, the reference in the input - // string will be unchanged. The $(VAR_NAME) syntax can be escaped with a - // double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, - // regardless of whether the variable exists or not. - // More info: - // https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell repeated string args = 4; // List of environment variables to set in the container. repeated EnvVar env = 5; // Compute Resource requirements by this container. - // More info: - // https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources ResourceRequirements resources = 6; // List of ports to expose from the container. Only a single port can be @@ -103,30 +86,34 @@ message Container { // Periodic probe of container liveness. // Container will be restarted if the probe fails. - // More info: - // https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes Probe liveness_probe = 10; // Startup probe of application within the container. // All other probes are disabled if a startup probe is provided, until it // succeeds. Container will not be added to service endpoints if the probe // fails. - // More info: - // https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes Probe startup_probe = 11; } // ResourceRequirements describes the compute resource requirements. message ResourceRequirements { - // Only memory and CPU are supported. Note: The only - // supported values for CPU are '1', '2', '4', and '8'. Setting 4 CPU - // requires at least 2Gi of memory. The values of the map is string form of - // the 'quantity' k8s type: - // https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go + // Only ´memory´ and 'cpu' are supported. + // + //

Notes: + // * The only supported values for CPU are '1', '2', '4', and '8'. Setting 4 + // CPU requires at least 2Gi of memory. For more information, go to + // https://cloud.google.com/run/docs/configuring/cpu. + // * For supported 'memory' values and syntax, go to + // https://cloud.google.com/run/docs/configuring/memory-limits map limits = 1; // Determines whether CPU should be throttled or not outside of requests. bool cpu_idle = 2; + + // Determines whether CPU should be boosted on startup of a new container + // instance above the requested CPU threshold, this can help reduce cold-start + // latency. + bool startup_cpu_boost = 3; } // EnvVar represents an environment variable present in a Container. @@ -209,7 +196,6 @@ message Volume { oneof volume_type { // Secret represents a secret that should populate this volume. - // More info: https://kubernetes.io/docs/concepts/storage/volumes#secret SecretVolumeSource secret = 2; // For Cloud SQL volumes, contains the specific instances that should be @@ -306,15 +292,11 @@ message Probe { // initiated. // Defaults to 0 seconds. Minimum value is 0. Maximum value for liveness probe // is 3600. Maximum value for startup probe is 240. - // More info: - // https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes int32 initial_delay_seconds = 1; // Number of seconds after which the probe times out. // Defaults to 1 second. Minimum value is 1. Maximum value is 3600. // Must be smaller than period_seconds. - // More info: - // https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes int32 timeout_seconds = 2; // How often (in seconds) to perform the probe. @@ -349,6 +331,11 @@ message HTTPGetAction { // Custom headers to set in the request. HTTP allows repeated headers. repeated HTTPHeader http_headers = 4; + + // Port number to access on the container. Must be in the range 1 to 65535. + // If not specified, defaults to the exposed port of the container, which is + // the value of container.ports[0].containerPort. + int32 port = 5; } // HTTPHeader describes a custom header to be used in HTTP probes @@ -363,14 +350,16 @@ message HTTPHeader { // TCPSocketAction describes an action based on opening a socket message TCPSocketAction { // Port number to access on the container. Must be in the range 1 to 65535. - // If not specified, defaults to 8080. + // If not specified, defaults to the exposed port of the container, which is + // the value of container.ports[0].containerPort. int32 port = 1; } // GRPCAction describes an action involving a GRPC port. message GRPCAction { // Port number of the gRPC service. Number must be in the range 1 to 65535. - // If not specified, defaults to 8080. + // If not specified, defaults to the exposed port of the container, which is + // the value of container.ports[0].containerPort. int32 port = 1; // Service is the name of the service to place in the gRPC HealthCheckRequest diff --git a/packages/google-cloud-run/protos/google/cloud/run/v2/revision.proto b/packages/google-cloud-run/protos/google/cloud/run/v2/revision.proto index 753776b47d1..bdaf9e73992 100644 --- a/packages/google-cloud-run/protos/google/cloud/run/v2/revision.proto +++ b/packages/google-cloud-run/protos/google/cloud/run/v2/revision.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -176,16 +176,20 @@ message Revision { // modifies the desired state. int64 generation = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // KRM-style labels for the resource. - // User-provided labels are shared with Google's billing system, so they can - // be used to filter, or break down billing charges by team, component, - // environment, state, etc. For more information, visit + // Output only. Unstructured key value map that can be used to organize and + // categorize objects. User-provided labels are shared with Google's billing + // system, so they can be used to filter, or break down billing charges by + // team, component, environment, state, etc. For more information, visit // https://cloud.google.com/resource-manager/docs/creating-managing-labels or - // https://cloud.google.com/run/docs/configuring/labels - map labels = 4; - - // KRM-style annotations for the resource. - map annotations = 5; + // https://cloud.google.com/run/docs/configuring/labels. + map labels = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Unstructured key value map that may + // be set by external tools to store and arbitrary metadata. + // They are not queryable and should be preserved + // when modifying objects. + map annotations = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The creation time. google.protobuf.Timestamp create_time = 6 @@ -206,10 +210,14 @@ message Revision { google.protobuf.Timestamp expire_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Set the launch stage to a preview stage on write to allow use of preview - // features in that stage. On read, describes whether the resource uses - // preview features. Launch Stages are defined at [Google Cloud Platform - // Launch Stages](https://cloud.google.com/terms/launch-stages). + // The least stable launch stage needed to create this resource, as defined by + // [Google Cloud Platform Launch + // Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports + // `ALPHA`, `BETA`, and `GA`. + //

Note that this value might not be what was used + // as input. For example, if ALPHA was provided as input in the parent + // resource, but only BETA and GA-level features are were, this field will be + // BETA. google.api.LaunchStage launch_stage = 10; // Output only. The name of the parent service. @@ -279,6 +287,12 @@ message Revision { // Output only. The Google Console URI to obtain logs for the Revision. string log_uri = 33 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Reserved for future use. + bool satisfies_pzs = 37 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Enable session affinity. + bool session_affinity = 38; + // Output only. A system-generated fingerprint for this version of the // resource. May be used to detect modification conflict during updates. string etag = 99 [(google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/packages/google-cloud-run/protos/google/cloud/run/v2/revision_template.proto b/packages/google-cloud-run/protos/google/cloud/run/v2/revision_template.proto index 7dd2b895d43..cc13e2d8509 100644 --- a/packages/google-cloud-run/protos/google/cloud/run/v2/revision_template.proto +++ b/packages/google-cloud-run/protos/google/cloud/run/v2/revision_template.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -35,7 +35,13 @@ message RevisionTemplate { (google.api.resource_reference) = { type: "run.googleapis.com/Revision" } ]; - // KRM-style labels for the resource. + // Unstructured key value map that can be used to organize and categorize + // objects. + // User-provided labels are shared with Google's billing system, so they can + // be used to filter, or break down billing charges by team, component, + // environment, state, etc. For more information, visit + // https://cloud.google.com/resource-manager/docs/creating-managing-labels or + // https://cloud.google.com/run/docs/configuring/labels. // //

Cloud Run API v2 does not support labels with `run.googleapis.com`, // `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` @@ -43,12 +49,17 @@ message RevisionTemplate { // corresponding field in v2 RevisionTemplate. map labels = 2; - // KRM-style annotations for the resource. + // Unstructured key value map that may be set by external tools to store and + // arbitrary metadata. They are not queryable and should be preserved + // when modifying objects. // //

Cloud Run API v2 does not support annotations with `run.googleapis.com`, // `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` // namespaces, and they will be rejected. All system annotations in v1 now // have a corresponding field in v2 RevisionTemplate. + // + //

This field follows Kubernetes annotations' namespacing, limits, and + // rules. map annotations = 3; // Scaling settings for this Revision. @@ -86,4 +97,7 @@ message RevisionTemplate { // Sets the maximum number of requests that each serving instance can receive. int32 max_instance_request_concurrency = 15; + + // Enable session affinity. + bool session_affinity = 19; } diff --git a/packages/google-cloud-run/protos/google/cloud/run/v2/service.proto b/packages/google-cloud-run/protos/google/cloud/run/v2/service.proto index 6620d79d2a5..3fee68d2bb7 100644 --- a/packages/google-cloud-run/protos/google/cloud/run/v2/service.proto +++ b/packages/google-cloud-run/protos/google/cloud/run/v2/service.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -197,8 +197,8 @@ message UpdateServiceRequest { bool validate_only = 3; // If set to true, and if the Service does not exist, it will create a new - // one. Caller must have both create and update permissions for this call if - // this is set to true. + // one. The caller must have 'run.services.create' permissions if this is set + // to true and the Service does not exist. bool allow_missing = 4; } @@ -301,13 +301,13 @@ message Service { // APIs, its JSON representation will be a `string` instead of an `integer`. int64 generation = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Map of string keys and values that can be used to organize and categorize + // Unstructured key value map that can be used to organize and categorize // objects. // User-provided labels are shared with Google's billing system, so they can // be used to filter, or break down billing charges by team, component, // environment, state, etc. For more information, visit // https://cloud.google.com/resource-manager/docs/creating-managing-labels or - // https://cloud.google.com/run/docs/configuring/labels + // https://cloud.google.com/run/docs/configuring/labels. // //

Cloud Run API v2 does not support labels with `run.googleapis.com`, // `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` @@ -321,12 +321,11 @@ message Service { // //

Cloud Run API v2 does not support annotations with `run.googleapis.com`, // `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` - // namespaces, and they will be rejected. All system annotations in v1 now - // have a corresponding field in v2 Service. + // namespaces, and they will be rejected in new resources. All system + // annotations in v1 now have a corresponding field in v2 Service. // //

This field follows Kubernetes - // annotations' namespacing, limits, and rules. More info: - // https://kubernetes.io/docs/user-guide/annotations + // annotations' namespacing, limits, and rules. map annotations = 6; // Output only. The creation time. @@ -367,6 +366,12 @@ message Service { // Launch Stages](https://cloud.google.com/terms/launch-stages). // Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA // is assumed. + // Set the launch stage to a preview stage on input to allow use of preview + // features in that stage. On read (or output), describes whether the resource + // uses preview features. + //

+ // For example, if ALPHA is provided as input, but only BETA and GA-level + // features are used, this field will be BETA on output. google.api.LaunchStage launch_stage = 16; // Settings for the Binary Authorization feature. @@ -425,6 +430,9 @@ message Service { // Output only. The main URI in which this Service is serving traffic. string uri = 36 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Reserved for future use. + bool satisfies_pzs = 38 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Returns true if the Service is currently being acted upon by // the system to bring it into the desired state. // diff --git a/packages/google-cloud-run/protos/google/cloud/run/v2/task.proto b/packages/google-cloud-run/protos/google/cloud/run/v2/task.proto index 45584e3ce20..7741c301617 100644 --- a/packages/google-cloud-run/protos/google/cloud/run/v2/task.proto +++ b/packages/google-cloud-run/protos/google/cloud/run/v2/task.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -118,16 +118,20 @@ message Task { // modifies the desired state. int64 generation = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // KRM-style labels for the resource. - // User-provided labels are shared with Google's billing system, so they can - // be used to filter, or break down billing charges by team, component, - // environment, state, etc. For more information, visit + // Output only. Unstructured key value map that can be used to organize and + // categorize objects. User-provided labels are shared with Google's billing + // system, so they can be used to filter, or break down billing charges by + // team, component, environment, state, etc. For more information, visit // https://cloud.google.com/resource-manager/docs/creating-managing-labels or // https://cloud.google.com/run/docs/configuring/labels - map labels = 4; + map labels = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // KRM-style annotations for the resource. - map annotations = 5; + // Output only. Unstructured key value map that may + // be set by external tools to store and arbitrary metadata. + // They are not queryable and should be preserved + // when modifying objects. + map annotations = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Represents time when the task was created by the job // controller. It is not guaranteed to be set in happens-before order across @@ -241,6 +245,9 @@ message Task { // Console. string log_uri = 32 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Reserved for future use. + bool satisfies_pzs = 33 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. A system-generated fingerprint for this version of the // resource. May be used to detect modification conflict during updates. string etag = 99 [(google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/packages/google-cloud-run/protos/google/cloud/run/v2/task_template.proto b/packages/google-cloud-run/protos/google/cloud/run/v2/task_template.proto index f19ee7960ce..586c4495627 100644 --- a/packages/google-cloud-run/protos/google/cloud/run/v2/task_template.proto +++ b/packages/google-cloud-run/protos/google/cloud/run/v2/task_template.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -38,12 +38,14 @@ message TaskTemplate { oneof retries { // Number of retries allowed per Task, before marking this Task failed. + // Defaults to 3. int32 max_retries = 3; } // Max allowed time duration the Task may be active before the system will // actively try to mark it failed and kill associated containers. This applies // per attempt of a task, meaning each retry can run for the full timeout. + // Defaults to 600 seconds. google.protobuf.Duration timeout = 4; // Email address of the IAM service account associated with the Task of a diff --git a/packages/google-cloud-run/protos/google/cloud/run/v2/traffic_target.proto b/packages/google-cloud-run/protos/google/cloud/run/v2/traffic_target.proto index b1836ad1460..adc7f05e2e8 100644 --- a/packages/google-cloud-run/protos/google/cloud/run/v2/traffic_target.proto +++ b/packages/google-cloud-run/protos/google/cloud/run/v2/traffic_target.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-run/protos/google/cloud/run/v2/vendor_settings.proto b/packages/google-cloud-run/protos/google/cloud/run/v2/vendor_settings.proto index 1b166ec62ca..389b6153229 100644 --- a/packages/google-cloud-run/protos/google/cloud/run/v2/vendor_settings.proto +++ b/packages/google-cloud-run/protos/google/cloud/run/v2/vendor_settings.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-cloud-run/protos/protos.d.ts b/packages/google-cloud-run/protos/protos.d.ts index 434fec60a93..9891869ca91 100644 --- a/packages/google-cloud-run/protos/protos.d.ts +++ b/packages/google-cloud-run/protos/protos.d.ts @@ -4078,7 +4078,8 @@ export namespace google { EXECUTION_REASON_UNDEFINED = 0, JOB_STATUS_SERVICE_POLLING_ERROR = 1, NON_ZERO_EXIT_CODE = 2, - CANCELLED = 3 + CANCELLED = 3, + CANCELLING = 4 } } @@ -4671,6 +4672,9 @@ export namespace google { /** Execution logUri */ logUri?: (string|null); + /** Execution satisfiesPzs */ + satisfiesPzs?: (boolean|null); + /** Execution etag */ etag?: (string|null); } @@ -4759,6 +4763,9 @@ export namespace google { /** Execution logUri. */ public logUri: string; + /** Execution satisfiesPzs. */ + public satisfiesPzs: boolean; + /** Execution etag. */ public etag: string; @@ -5147,6 +5154,9 @@ export namespace google { /** ResourceRequirements cpuIdle */ cpuIdle?: (boolean|null); + + /** ResourceRequirements startupCpuBoost */ + startupCpuBoost?: (boolean|null); } /** Represents a ResourceRequirements. */ @@ -5164,6 +5174,9 @@ export namespace google { /** ResourceRequirements cpuIdle. */ public cpuIdle: boolean; + /** ResourceRequirements startupCpuBoost. */ + public startupCpuBoost: boolean; + /** * Creates a new ResourceRequirements instance using the specified properties. * @param [properties] Properties to set @@ -6331,6 +6344,9 @@ export namespace google { /** HTTPGetAction httpHeaders */ httpHeaders?: (google.cloud.run.v2.IHTTPHeader[]|null); + + /** HTTPGetAction port */ + port?: (number|null); } /** Represents a HTTPGetAction. */ @@ -6348,6 +6364,9 @@ export namespace google { /** HTTPGetAction httpHeaders. */ public httpHeaders: google.cloud.run.v2.IHTTPHeader[]; + /** HTTPGetAction port. */ + public port: number; + /** * Creates a new HTTPGetAction instance using the specified properties. * @param [properties] Properties to set @@ -8233,6 +8252,9 @@ export namespace google { /** Job reconciling */ reconciling?: (boolean|null); + /** Job satisfiesPzs */ + satisfiesPzs?: (boolean|null); + /** Job etag */ etag?: (string|null); } @@ -8312,6 +8334,9 @@ export namespace google { /** Job reconciling. */ public reconciling: boolean; + /** Job satisfiesPzs. */ + public satisfiesPzs: boolean; + /** Job etag. */ public etag: string; @@ -9094,6 +9119,12 @@ export namespace google { /** Revision logUri */ logUri?: (string|null); + /** Revision satisfiesPzs */ + satisfiesPzs?: (boolean|null); + + /** Revision sessionAffinity */ + sessionAffinity?: (boolean|null); + /** Revision etag */ etag?: (string|null); } @@ -9185,6 +9216,12 @@ export namespace google { /** Revision logUri. */ public logUri: string; + /** Revision satisfiesPzs. */ + public satisfiesPzs: boolean; + + /** Revision sessionAffinity. */ + public sessionAffinity: boolean; + /** Revision etag. */ public etag: string; @@ -9304,6 +9341,9 @@ export namespace google { /** RevisionTemplate maxInstanceRequestConcurrency */ maxInstanceRequestConcurrency?: (number|null); + + /** RevisionTemplate sessionAffinity */ + sessionAffinity?: (boolean|null); } /** Represents a RevisionTemplate. */ @@ -9351,6 +9391,9 @@ export namespace google { /** RevisionTemplate maxInstanceRequestConcurrency. */ public maxInstanceRequestConcurrency: number; + /** RevisionTemplate sessionAffinity. */ + public sessionAffinity: boolean; + /** * Creates a new RevisionTemplate instance using the specified properties. * @param [properties] Properties to set @@ -10350,6 +10393,9 @@ export namespace google { /** Service uri */ uri?: (string|null); + /** Service satisfiesPzs */ + satisfiesPzs?: (boolean|null); + /** Service reconciling */ reconciling?: (boolean|null); @@ -10444,6 +10490,9 @@ export namespace google { /** Service uri. */ public uri: string; + /** Service satisfiesPzs. */ + public satisfiesPzs: boolean; + /** Service reconciling. */ public reconciling: boolean; @@ -11239,6 +11288,9 @@ export namespace google { /** Task logUri */ logUri?: (string|null); + /** Task satisfiesPzs */ + satisfiesPzs?: (boolean|null); + /** Task etag */ etag?: (string|null); } @@ -11336,6 +11388,9 @@ export namespace google { /** Task logUri. */ public logUri: string; + /** Task satisfiesPzs. */ + public satisfiesPzs: boolean; + /** Task etag. */ public etag: string; diff --git a/packages/google-cloud-run/protos/protos.js b/packages/google-cloud-run/protos/protos.js index 3c1afed78a4..2f060b1ad28 100644 --- a/packages/google-cloud-run/protos/protos.js +++ b/packages/google-cloud-run/protos/protos.js @@ -10958,6 +10958,7 @@ case 1: case 2: case 3: + case 4: break; } } @@ -11188,6 +11189,10 @@ case 3: message.executionReason = 3; break; + case "CANCELLING": + case 4: + message.executionReason = 4; + break; } return message; }; @@ -11388,6 +11393,7 @@ * @property {number} JOB_STATUS_SERVICE_POLLING_ERROR=1 JOB_STATUS_SERVICE_POLLING_ERROR value * @property {number} NON_ZERO_EXIT_CODE=2 NON_ZERO_EXIT_CODE value * @property {number} CANCELLED=3 CANCELLED value + * @property {number} CANCELLING=4 CANCELLING value */ Condition.ExecutionReason = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -11395,6 +11401,7 @@ values[valuesById[1] = "JOB_STATUS_SERVICE_POLLING_ERROR"] = 1; values[valuesById[2] = "NON_ZERO_EXIT_CODE"] = 2; values[valuesById[3] = "CANCELLED"] = 3; + values[valuesById[4] = "CANCELLING"] = 4; return values; })(); @@ -12540,6 +12547,7 @@ * @property {number|null} [cancelledCount] Execution cancelledCount * @property {number|null} [retriedCount] Execution retriedCount * @property {string|null} [logUri] Execution logUri + * @property {boolean|null} [satisfiesPzs] Execution satisfiesPzs * @property {string|null} [etag] Execution etag */ @@ -12761,6 +12769,14 @@ */ Execution.prototype.logUri = ""; + /** + * Execution satisfiesPzs. + * @member {boolean} satisfiesPzs + * @memberof google.cloud.run.v2.Execution + * @instance + */ + Execution.prototype.satisfiesPzs = false; + /** * Execution etag. * @member {string} etag @@ -12846,6 +12862,8 @@ writer.uint32(/* id 25, wireType 0 =*/200).int32(message.retriedCount); if (message.logUri != null && Object.hasOwnProperty.call(message, "logUri")) writer.uint32(/* id 26, wireType 2 =*/210).string(message.logUri); + if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.satisfiesPzs); if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) writer.uint32(/* id 99, wireType 2 =*/794).string(message.etag); return writer; @@ -13022,6 +13040,10 @@ message.logUri = reader.string(); break; } + case 27: { + message.satisfiesPzs = reader.bool(); + break; + } case 99: { message.etag = reader.string(); break; @@ -13177,6 +13199,9 @@ if (message.logUri != null && message.hasOwnProperty("logUri")) if (!$util.isString(message.logUri)) return "logUri: string expected"; + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) + if (typeof message.satisfiesPzs !== "boolean") + return "satisfiesPzs: boolean expected"; if (message.etag != null && message.hasOwnProperty("etag")) if (!$util.isString(message.etag)) return "etag: string expected"; @@ -13336,6 +13361,8 @@ message.retriedCount = object.retriedCount | 0; if (object.logUri != null) message.logUri = String(object.logUri); + if (object.satisfiesPzs != null) + message.satisfiesPzs = Boolean(object.satisfiesPzs); if (object.etag != null) message.etag = String(object.etag); return message; @@ -13391,6 +13418,7 @@ object.cancelledCount = 0; object.retriedCount = 0; object.logUri = ""; + object.satisfiesPzs = false; object.etag = ""; } if (message.name != null && message.hasOwnProperty("name")) @@ -13459,6 +13487,8 @@ object.retriedCount = message.retriedCount; if (message.logUri != null && message.hasOwnProperty("logUri")) object.logUri = message.logUri; + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) + object.satisfiesPzs = message.satisfiesPzs; if (message.etag != null && message.hasOwnProperty("etag")) object.etag = message.etag; return object; @@ -14509,6 +14539,7 @@ * @interface IResourceRequirements * @property {Object.|null} [limits] ResourceRequirements limits * @property {boolean|null} [cpuIdle] ResourceRequirements cpuIdle + * @property {boolean|null} [startupCpuBoost] ResourceRequirements startupCpuBoost */ /** @@ -14543,6 +14574,14 @@ */ ResourceRequirements.prototype.cpuIdle = false; + /** + * ResourceRequirements startupCpuBoost. + * @member {boolean} startupCpuBoost + * @memberof google.cloud.run.v2.ResourceRequirements + * @instance + */ + ResourceRequirements.prototype.startupCpuBoost = false; + /** * Creates a new ResourceRequirements instance using the specified properties. * @function create @@ -14572,6 +14611,8 @@ 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.limits[keys[i]]).ldelim(); if (message.cpuIdle != null && Object.hasOwnProperty.call(message, "cpuIdle")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.cpuIdle); + if (message.startupCpuBoost != null && Object.hasOwnProperty.call(message, "startupCpuBoost")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.startupCpuBoost); return writer; }; @@ -14633,6 +14674,10 @@ message.cpuIdle = reader.bool(); break; } + case 3: { + message.startupCpuBoost = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -14679,6 +14724,9 @@ if (message.cpuIdle != null && message.hasOwnProperty("cpuIdle")) if (typeof message.cpuIdle !== "boolean") return "cpuIdle: boolean expected"; + if (message.startupCpuBoost != null && message.hasOwnProperty("startupCpuBoost")) + if (typeof message.startupCpuBoost !== "boolean") + return "startupCpuBoost: boolean expected"; return null; }; @@ -14703,6 +14751,8 @@ } if (object.cpuIdle != null) message.cpuIdle = Boolean(object.cpuIdle); + if (object.startupCpuBoost != null) + message.startupCpuBoost = Boolean(object.startupCpuBoost); return message; }; @@ -14721,8 +14771,10 @@ var object = {}; if (options.objects || options.defaults) object.limits = {}; - if (options.defaults) + if (options.defaults) { object.cpuIdle = false; + object.startupCpuBoost = false; + } var keys2; if (message.limits && (keys2 = Object.keys(message.limits)).length) { object.limits = {}; @@ -14731,6 +14783,8 @@ } if (message.cpuIdle != null && message.hasOwnProperty("cpuIdle")) object.cpuIdle = message.cpuIdle; + if (message.startupCpuBoost != null && message.hasOwnProperty("startupCpuBoost")) + object.startupCpuBoost = message.startupCpuBoost; return object; }; @@ -17358,6 +17412,7 @@ * @interface IHTTPGetAction * @property {string|null} [path] HTTPGetAction path * @property {Array.|null} [httpHeaders] HTTPGetAction httpHeaders + * @property {number|null} [port] HTTPGetAction port */ /** @@ -17392,6 +17447,14 @@ */ HTTPGetAction.prototype.httpHeaders = $util.emptyArray; + /** + * HTTPGetAction port. + * @member {number} port + * @memberof google.cloud.run.v2.HTTPGetAction + * @instance + */ + HTTPGetAction.prototype.port = 0; + /** * Creates a new HTTPGetAction instance using the specified properties. * @function create @@ -17421,6 +17484,8 @@ if (message.httpHeaders != null && message.httpHeaders.length) for (var i = 0; i < message.httpHeaders.length; ++i) $root.google.cloud.run.v2.HTTPHeader.encode(message.httpHeaders[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.port != null && Object.hasOwnProperty.call(message, "port")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.port); return writer; }; @@ -17465,6 +17530,10 @@ message.httpHeaders.push($root.google.cloud.run.v2.HTTPHeader.decode(reader, reader.uint32())); break; } + case 5: { + message.port = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -17512,6 +17581,9 @@ return "httpHeaders." + error; } } + if (message.port != null && message.hasOwnProperty("port")) + if (!$util.isInteger(message.port)) + return "port: integer expected"; return null; }; @@ -17539,6 +17611,8 @@ message.httpHeaders[i] = $root.google.cloud.run.v2.HTTPHeader.fromObject(object.httpHeaders[i]); } } + if (object.port != null) + message.port = object.port | 0; return message; }; @@ -17557,8 +17631,10 @@ var object = {}; if (options.arrays || options.defaults) object.httpHeaders = []; - if (options.defaults) + if (options.defaults) { object.path = ""; + object.port = 0; + } if (message.path != null && message.hasOwnProperty("path")) object.path = message.path; if (message.httpHeaders && message.httpHeaders.length) { @@ -17566,6 +17642,8 @@ for (var j = 0; j < message.httpHeaders.length; ++j) object.httpHeaders[j] = $root.google.cloud.run.v2.HTTPHeader.toObject(message.httpHeaders[j], options); } + if (message.port != null && message.hasOwnProperty("port")) + object.port = message.port; return object; }; @@ -21533,6 +21611,7 @@ * @property {number|null} [executionCount] Job executionCount * @property {google.cloud.run.v2.IExecutionReference|null} [latestCreatedExecution] Job latestCreatedExecution * @property {boolean|null} [reconciling] Job reconciling + * @property {boolean|null} [satisfiesPzs] Job satisfiesPzs * @property {string|null} [etag] Job etag */ @@ -21730,6 +21809,14 @@ */ Job.prototype.reconciling = false; + /** + * Job satisfiesPzs. + * @member {boolean} satisfiesPzs + * @memberof google.cloud.run.v2.Job + * @instance + */ + Job.prototype.satisfiesPzs = false; + /** * Job etag. * @member {string} etag @@ -21809,6 +21896,8 @@ $root.google.cloud.run.v2.ExecutionReference.encode(message.latestCreatedExecution, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) writer.uint32(/* id 23, wireType 0 =*/184).bool(message.reconciling); + if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) + writer.uint32(/* id 25, wireType 0 =*/200).bool(message.satisfiesPzs); if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) writer.uint32(/* id 99, wireType 2 =*/794).string(message.etag); return writer; @@ -21973,6 +22062,10 @@ message.reconciling = reader.bool(); break; } + case 25: { + message.satisfiesPzs = reader.bool(); + break; + } case 99: { message.etag = reader.string(); break; @@ -22121,6 +22214,9 @@ if (message.reconciling != null && message.hasOwnProperty("reconciling")) if (typeof message.reconciling !== "boolean") return "reconciling: boolean expected"; + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) + if (typeof message.satisfiesPzs !== "boolean") + return "satisfiesPzs: boolean expected"; if (message.etag != null && message.hasOwnProperty("etag")) if (!$util.isString(message.etag)) return "etag: string expected"; @@ -22277,6 +22373,8 @@ } if (object.reconciling != null) message.reconciling = Boolean(object.reconciling); + if (object.satisfiesPzs != null) + message.satisfiesPzs = Boolean(object.satisfiesPzs); if (object.etag != null) message.etag = String(object.etag); return message; @@ -22329,6 +22427,7 @@ object.executionCount = 0; object.latestCreatedExecution = null; object.reconciling = false; + object.satisfiesPzs = false; object.etag = ""; } if (message.name != null && message.hasOwnProperty("name")) @@ -22391,6 +22490,8 @@ object.latestCreatedExecution = $root.google.cloud.run.v2.ExecutionReference.toObject(message.latestCreatedExecution, options); if (message.reconciling != null && message.hasOwnProperty("reconciling")) object.reconciling = message.reconciling; + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) + object.satisfiesPzs = message.satisfiesPzs; if (message.etag != null && message.hasOwnProperty("etag")) object.etag = message.etag; return object; @@ -23825,6 +23926,8 @@ * @property {Array.|null} [conditions] Revision conditions * @property {number|Long|null} [observedGeneration] Revision observedGeneration * @property {string|null} [logUri] Revision logUri + * @property {boolean|null} [satisfiesPzs] Revision satisfiesPzs + * @property {boolean|null} [sessionAffinity] Revision sessionAffinity * @property {string|null} [etag] Revision etag */ @@ -24056,6 +24159,22 @@ */ Revision.prototype.logUri = ""; + /** + * Revision satisfiesPzs. + * @member {boolean} satisfiesPzs + * @memberof google.cloud.run.v2.Revision + * @instance + */ + Revision.prototype.satisfiesPzs = false; + + /** + * Revision sessionAffinity. + * @member {boolean} sessionAffinity + * @memberof google.cloud.run.v2.Revision + * @instance + */ + Revision.prototype.sessionAffinity = false; + /** * Revision etag. * @member {string} etag @@ -24145,6 +24264,10 @@ writer.uint32(/* id 33, wireType 2 =*/266).string(message.logUri); if (message.maxInstanceRequestConcurrency != null && Object.hasOwnProperty.call(message, "maxInstanceRequestConcurrency")) writer.uint32(/* id 34, wireType 0 =*/272).int32(message.maxInstanceRequestConcurrency); + if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) + writer.uint32(/* id 37, wireType 0 =*/296).bool(message.satisfiesPzs); + if (message.sessionAffinity != null && Object.hasOwnProperty.call(message, "sessionAffinity")) + writer.uint32(/* id 38, wireType 0 =*/304).bool(message.sessionAffinity); if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) writer.uint32(/* id 99, wireType 2 =*/794).string(message.etag); return writer; @@ -24329,6 +24452,14 @@ message.logUri = reader.string(); break; } + case 37: { + message.satisfiesPzs = reader.bool(); + break; + } + case 38: { + message.sessionAffinity = reader.bool(); + break; + } case 99: { message.etag = reader.string(); break; @@ -24513,6 +24644,12 @@ if (message.logUri != null && message.hasOwnProperty("logUri")) if (!$util.isString(message.logUri)) return "logUri: string expected"; + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) + if (typeof message.satisfiesPzs !== "boolean") + return "satisfiesPzs: boolean expected"; + if (message.sessionAffinity != null && message.hasOwnProperty("sessionAffinity")) + if (typeof message.sessionAffinity !== "boolean") + return "sessionAffinity: boolean expected"; if (message.etag != null && message.hasOwnProperty("etag")) if (!$util.isString(message.etag)) return "etag: string expected"; @@ -24729,6 +24866,10 @@ message.observedGeneration = new $util.LongBits(object.observedGeneration.low >>> 0, object.observedGeneration.high >>> 0).toNumber(); if (object.logUri != null) message.logUri = String(object.logUri); + if (object.satisfiesPzs != null) + message.satisfiesPzs = Boolean(object.satisfiesPzs); + if (object.sessionAffinity != null) + message.sessionAffinity = Boolean(object.sessionAffinity); if (object.etag != null) message.etag = String(object.etag); return message; @@ -24786,6 +24927,8 @@ object.observedGeneration = options.longs === String ? "0" : 0; object.logUri = ""; object.maxInstanceRequestConcurrency = 0; + object.satisfiesPzs = false; + object.sessionAffinity = false; object.etag = ""; } if (message.name != null && message.hasOwnProperty("name")) @@ -24862,6 +25005,10 @@ object.logUri = message.logUri; if (message.maxInstanceRequestConcurrency != null && message.hasOwnProperty("maxInstanceRequestConcurrency")) object.maxInstanceRequestConcurrency = message.maxInstanceRequestConcurrency; + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) + object.satisfiesPzs = message.satisfiesPzs; + if (message.sessionAffinity != null && message.hasOwnProperty("sessionAffinity")) + object.sessionAffinity = message.sessionAffinity; if (message.etag != null && message.hasOwnProperty("etag")) object.etag = message.etag; return object; @@ -24914,6 +25061,7 @@ * @property {google.cloud.run.v2.ExecutionEnvironment|null} [executionEnvironment] RevisionTemplate executionEnvironment * @property {string|null} [encryptionKey] RevisionTemplate encryptionKey * @property {number|null} [maxInstanceRequestConcurrency] RevisionTemplate maxInstanceRequestConcurrency + * @property {boolean|null} [sessionAffinity] RevisionTemplate sessionAffinity */ /** @@ -25031,6 +25179,14 @@ */ RevisionTemplate.prototype.maxInstanceRequestConcurrency = 0; + /** + * RevisionTemplate sessionAffinity. + * @member {boolean} sessionAffinity + * @memberof google.cloud.run.v2.RevisionTemplate + * @instance + */ + RevisionTemplate.prototype.sessionAffinity = false; + /** * Creates a new RevisionTemplate instance using the specified properties. * @function create @@ -25083,6 +25239,8 @@ writer.uint32(/* id 14, wireType 2 =*/114).string(message.encryptionKey); if (message.maxInstanceRequestConcurrency != null && Object.hasOwnProperty.call(message, "maxInstanceRequestConcurrency")) writer.uint32(/* id 15, wireType 0 =*/120).int32(message.maxInstanceRequestConcurrency); + if (message.sessionAffinity != null && Object.hasOwnProperty.call(message, "sessionAffinity")) + writer.uint32(/* id 19, wireType 0 =*/152).bool(message.sessionAffinity); return writer; }; @@ -25207,6 +25365,10 @@ message.maxInstanceRequestConcurrency = reader.int32(); break; } + case 19: { + message.sessionAffinity = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -25312,6 +25474,9 @@ if (message.maxInstanceRequestConcurrency != null && message.hasOwnProperty("maxInstanceRequestConcurrency")) if (!$util.isInteger(message.maxInstanceRequestConcurrency)) return "maxInstanceRequestConcurrency: integer expected"; + if (message.sessionAffinity != null && message.hasOwnProperty("sessionAffinity")) + if (typeof message.sessionAffinity !== "boolean") + return "sessionAffinity: boolean expected"; return null; }; @@ -25404,6 +25569,8 @@ message.encryptionKey = String(object.encryptionKey); if (object.maxInstanceRequestConcurrency != null) message.maxInstanceRequestConcurrency = object.maxInstanceRequestConcurrency | 0; + if (object.sessionAffinity != null) + message.sessionAffinity = Boolean(object.sessionAffinity); return message; }; @@ -25437,6 +25604,7 @@ object.executionEnvironment = options.enums === String ? "EXECUTION_ENVIRONMENT_UNSPECIFIED" : 0; object.encryptionKey = ""; object.maxInstanceRequestConcurrency = 0; + object.sessionAffinity = false; } if (message.revision != null && message.hasOwnProperty("revision")) object.revision = message.revision; @@ -25475,6 +25643,8 @@ object.encryptionKey = message.encryptionKey; if (message.maxInstanceRequestConcurrency != null && message.hasOwnProperty("maxInstanceRequestConcurrency")) object.maxInstanceRequestConcurrency = message.maxInstanceRequestConcurrency; + if (message.sessionAffinity != null && message.hasOwnProperty("sessionAffinity")) + object.sessionAffinity = message.sessionAffinity; return object; }; @@ -27345,6 +27515,7 @@ * @property {string|null} [latestCreatedRevision] Service latestCreatedRevision * @property {Array.|null} [trafficStatuses] Service trafficStatuses * @property {string|null} [uri] Service uri + * @property {boolean|null} [satisfiesPzs] Service satisfiesPzs * @property {boolean|null} [reconciling] Service reconciling * @property {string|null} [etag] Service etag */ @@ -27577,6 +27748,14 @@ */ Service.prototype.uri = ""; + /** + * Service satisfiesPzs. + * @member {boolean} satisfiesPzs + * @memberof google.cloud.run.v2.Service + * @instance + */ + Service.prototype.satisfiesPzs = false; + /** * Service reconciling. * @member {boolean} reconciling @@ -27674,6 +27853,8 @@ $root.google.cloud.run.v2.TrafficTargetStatus.encode(message.trafficStatuses[i], writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) writer.uint32(/* id 36, wireType 2 =*/290).string(message.uri); + if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) + writer.uint32(/* id 38, wireType 0 =*/304).bool(message.satisfiesPzs); if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) writer.uint32(/* id 98, wireType 0 =*/784).bool(message.reconciling); if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) @@ -27860,6 +28041,10 @@ message.uri = reader.string(); break; } + case 38: { + message.satisfiesPzs = reader.bool(); + break; + } case 98: { message.reconciling = reader.bool(); break; @@ -28041,6 +28226,9 @@ if (message.uri != null && message.hasOwnProperty("uri")) if (!$util.isString(message.uri)) return "uri: string expected"; + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) + if (typeof message.satisfiesPzs !== "boolean") + return "satisfiesPzs: boolean expected"; if (message.reconciling != null && message.hasOwnProperty("reconciling")) if (typeof message.reconciling !== "boolean") return "reconciling: boolean expected"; @@ -28243,6 +28431,8 @@ } if (object.uri != null) message.uri = String(object.uri); + if (object.satisfiesPzs != null) + message.satisfiesPzs = Boolean(object.satisfiesPzs); if (object.reconciling != null) message.reconciling = Boolean(object.reconciling); if (object.etag != null) @@ -28302,6 +28492,7 @@ object.latestReadyRevision = ""; object.latestCreatedRevision = ""; object.uri = ""; + object.satisfiesPzs = false; object.reconciling = false; object.etag = ""; } @@ -28379,6 +28570,8 @@ } if (message.uri != null && message.hasOwnProperty("uri")) object.uri = message.uri; + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) + object.satisfiesPzs = message.satisfiesPzs; if (message.reconciling != null && message.hasOwnProperty("reconciling")) object.reconciling = message.reconciling; if (message.etag != null && message.hasOwnProperty("etag")) @@ -29907,6 +30100,7 @@ * @property {string|null} [encryptionKey] Task encryptionKey * @property {google.cloud.run.v2.IVpcAccess|null} [vpcAccess] Task vpcAccess * @property {string|null} [logUri] Task logUri + * @property {boolean|null} [satisfiesPzs] Task satisfiesPzs * @property {string|null} [etag] Task etag */ @@ -30154,6 +30348,14 @@ */ Task.prototype.logUri = ""; + /** + * Task satisfiesPzs. + * @member {boolean} satisfiesPzs + * @memberof google.cloud.run.v2.Task + * @instance + */ + Task.prototype.satisfiesPzs = false; + /** * Task etag. * @member {string} etag @@ -30247,6 +30449,8 @@ $root.google.cloud.run.v2.VpcAccess.encode(message.vpcAccess, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); if (message.logUri != null && Object.hasOwnProperty.call(message, "logUri")) writer.uint32(/* id 32, wireType 2 =*/258).string(message.logUri); + if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.satisfiesPzs); if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) writer.uint32(/* id 99, wireType 2 =*/794).string(message.etag); return writer; @@ -30439,6 +30643,10 @@ message.logUri = reader.string(); break; } + case 33: { + message.satisfiesPzs = reader.bool(); + break; + } case 99: { message.etag = reader.string(); break; @@ -30614,6 +30822,9 @@ if (message.logUri != null && message.hasOwnProperty("logUri")) if (!$util.isString(message.logUri)) return "logUri: string expected"; + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) + if (typeof message.satisfiesPzs !== "boolean") + return "satisfiesPzs: boolean expected"; if (message.etag != null && message.hasOwnProperty("etag")) if (!$util.isString(message.etag)) return "etag: string expected"; @@ -30781,6 +30992,8 @@ } if (object.logUri != null) message.logUri = String(object.logUri); + if (object.satisfiesPzs != null) + message.satisfiesPzs = Boolean(object.satisfiesPzs); if (object.etag != null) message.etag = String(object.etag); return message; @@ -30840,6 +31053,7 @@ object.encryptionKey = ""; object.vpcAccess = null; object.logUri = ""; + object.satisfiesPzs = false; object.etag = ""; } if (message.name != null && message.hasOwnProperty("name")) @@ -30920,6 +31134,8 @@ object.vpcAccess = $root.google.cloud.run.v2.VpcAccess.toObject(message.vpcAccess, options); if (message.logUri != null && message.hasOwnProperty("logUri")) object.logUri = message.logUri; + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) + object.satisfiesPzs = message.satisfiesPzs; if (message.etag != null && message.hasOwnProperty("etag")) object.etag = message.etag; return object; diff --git a/packages/google-cloud-run/protos/protos.json b/packages/google-cloud-run/protos/protos.json index 492935be2a5..d65b20b4e87 100644 --- a/packages/google-cloud-run/protos/protos.json +++ b/packages/google-cloud-run/protos/protos.json @@ -1100,7 +1100,8 @@ "EXECUTION_REASON_UNDEFINED": 0, "JOB_STATUS_SERVICE_POLLING_ERROR": 1, "NON_ZERO_EXIT_CODE": 2, - "CANCELLED": 3 + "CANCELLED": 3, + "CANCELLING": 4 } } } @@ -1275,12 +1276,18 @@ "labels": { "keyType": "string", "type": "string", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "annotations": { "keyType": "string", "type": "string", - "id": 5 + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "createTime": { "type": "google.protobuf.Timestamp", @@ -1421,6 +1428,13 @@ "(google.api.field_behavior)": "OUTPUT_ONLY" } }, + "satisfiesPzs": { + "type": "bool", + "id": 27, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "etag": { "type": "string", "id": 99, @@ -1544,6 +1558,10 @@ "cpuIdle": { "type": "bool", "id": 2 + }, + "startupCpuBoost": { + "type": "bool", + "id": 3 } } }, @@ -1757,6 +1775,10 @@ "rule": "repeated", "type": "HTTPHeader", "id": 4 + }, + "port": { + "type": "int32", + "id": 5 } } }, @@ -2382,6 +2404,13 @@ "(google.api.field_behavior)": "OUTPUT_ONLY" } }, + "satisfiesPzs": { + "type": "bool", + "id": 25, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "etag": { "type": "string", "id": 99, @@ -2610,12 +2639,18 @@ "labels": { "keyType": "string", "type": "string", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "annotations": { "keyType": "string", "type": "string", - "id": 5 + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "createTime": { "type": "google.protobuf.Timestamp", @@ -2735,6 +2770,17 @@ "(google.api.field_behavior)": "OUTPUT_ONLY" } }, + "satisfiesPzs": { + "type": "bool", + "id": 37, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "sessionAffinity": { + "type": "bool", + "id": 38 + }, "etag": { "type": "string", "id": 99, @@ -2803,6 +2849,10 @@ "maxInstanceRequestConcurrency": { "type": "int32", "id": 15 + }, + "sessionAffinity": { + "type": "bool", + "id": 19 } } }, @@ -3312,6 +3362,13 @@ "(google.api.field_behavior)": "OUTPUT_ONLY" } }, + "satisfiesPzs": { + "type": "bool", + "id": 38, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "reconciling": { "type": "bool", "id": 98, @@ -3509,12 +3566,18 @@ "labels": { "keyType": "string", "type": "string", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "annotations": { "keyType": "string", "type": "string", - "id": 5 + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "createTime": { "type": "google.protobuf.Timestamp", @@ -3665,6 +3728,13 @@ "(google.api.field_behavior)": "OUTPUT_ONLY" } }, + "satisfiesPzs": { + "type": "bool", + "id": 33, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "etag": { "type": "string", "id": 99, diff --git a/packages/google-cloud-run/samples/generated/v2/services.update_service.js b/packages/google-cloud-run/samples/generated/v2/services.update_service.js index 897d7a12223..e37f7604793 100644 --- a/packages/google-cloud-run/samples/generated/v2/services.update_service.js +++ b/packages/google-cloud-run/samples/generated/v2/services.update_service.js @@ -39,8 +39,8 @@ function main(service) { // const validateOnly = true /** * If set to true, and if the Service does not exist, it will create a new - * one. Caller must have both create and update permissions for this call if - * this is set to true. + * one. The caller must have 'run.services.create' permissions if this is set + * to true and the Service does not exist. */ // const allowMissing = true diff --git a/packages/google-cloud-run/samples/generated/v2/snippet_metadata.google.cloud.run.v2.json b/packages/google-cloud-run/samples/generated/v2/snippet_metadata.google.cloud.run.v2.json index e89379f66a4..570e9840288 100644 --- a/packages/google-cloud-run/samples/generated/v2/snippet_metadata.google.cloud.run.v2.json +++ b/packages/google-cloud-run/samples/generated/v2/snippet_metadata.google.cloud.run.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-run", - "version": "0.4.1", + "version": "0.5.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-run/samples/package.json b/packages/google-cloud-run/samples/package.json index b34a7841e7e..a297061b0fb 100644 --- a/packages/google-cloud-run/samples/package.json +++ b/packages/google-cloud-run/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/run": "^0.4.2" + "@google-cloud/run": "^0.5.0" }, "devDependencies": { "c8": "^7.1.0", diff --git a/packages/google-cloud-run/src/v2/services_client.ts b/packages/google-cloud-run/src/v2/services_client.ts index ddb25359a7c..3b18d32347e 100644 --- a/packages/google-cloud-run/src/v2/services_client.ts +++ b/packages/google-cloud-run/src/v2/services_client.ts @@ -980,8 +980,8 @@ export class ServicesClient { * populated, without persisting the request or updating any resources. * @param {boolean} request.allowMissing * If set to true, and if the Service does not exist, it will create a new - * one. Caller must have both create and update permissions for this call if - * this is set to true. + * one. The caller must have 'run.services.create' permissions if this is set + * to true and the Service does not exist. * @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-scheduler/package.json b/packages/google-cloud-scheduler/package.json index c7bf0363185..73a9e3bd8f0 100644 --- a/packages/google-cloud-scheduler/package.json +++ b/packages/google-cloud-scheduler/package.json @@ -29,21 +29,20 @@ "cloud" ], "scripts": { - "test": "c8 mocha build/test", - "docs": "jsdoc -c .jsdoc.js", - "lint": "gts check", - "fix": "gts fix", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "system-test": "npm run compile && c8 mocha build/system-test", - "docs-test": "linkinator docs", "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", - "prepare": "npm run compile", - "pretest": "npm run compile", - "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean" + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -58,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -66,5 +66,4 @@ "typescript": "^4.6.4" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-scheduler" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-secretmanager/package.json b/packages/google-cloud-secretmanager/package.json index 97c31c953c4..83d653e371a 100644 --- a/packages/google-cloud-secretmanager/package.json +++ b/packages/google-cloud-secretmanager/package.json @@ -26,7 +26,7 @@ "main": "build/src/index.js", "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -34,11 +34,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -53,6 +53,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -66,5 +67,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-secretmanager" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 49c56a507dc..89a502b81f6 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -30,17 +30,18 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", "docs-test": "linkinator docs", "fix": "gts fix", - "prelint": "cd samples; npm link ../; npm i", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "system-test": "npm run compile && c8 mocha build/system-test", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", "test": "c8 mocha build/test" }, "dependencies": { @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-security-privateca" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-security-publicca/package.json b/packages/google-cloud-security-publicca/package.json index f67d247b0cc..ccedcc277e0 100644 --- a/packages/google-cloud-security-publicca/package.json +++ b/packages/google-cloud-security-publicca/package.json @@ -31,7 +31,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -39,10 +39,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -57,6 +58,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-securitycenter/CHANGELOG.md b/packages/google-cloud-securitycenter/CHANGELOG.md index f6cacd3794d..eac8a0110a6 100644 --- a/packages/google-cloud-securitycenter/CHANGELOG.md +++ b/packages/google-cloud-securitycenter/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/security-center?activeTab=versions +## [7.4.0](https://github.com/googleapis/google-cloud-node/compare/security-center-v7.3.0...security-center-v7.4.0) (2023-04-24) + + +### Features + +* [securitycenter] add cloud_dlp_inspection and cloud_dlp_data_profile fields to finding's list of attributes ([#4198](https://github.com/googleapis/google-cloud-node/issues/4198)) ([3e1c467](https://github.com/googleapis/google-cloud-node/commit/3e1c4678dc20281eeaf30bf8cf64368e9110f307)) + ## [7.3.0](https://github.com/googleapis/google-cloud-node/compare/security-center-v7.2.1...security-center-v7.3.0) (2023-04-13) diff --git a/packages/google-cloud-securitycenter/package.json b/packages/google-cloud-securitycenter/package.json index bda3a2bd669..c838ffd0035 100644 --- a/packages/google-cloud-securitycenter/package.json +++ b/packages/google-cloud-securitycenter/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/security-center", "description": "Cloud Security Command Center API client for Node.js", - "version": "7.3.0", + "version": "7.4.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { @@ -20,18 +20,19 @@ "main": "build/src/index.js", "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", "docs-test": "linkinator docs", "fix": "gts fix", "lint": "gts check", - "predocs-test": "npm run docs", - "prepare": "npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean" + "prepare": "npm run compile-protos && npm run compile", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "keywords": [ "google apis client", @@ -59,6 +60,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -67,5 +69,4 @@ "typescript": "^4.6.4" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-securitycenter" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/access.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/access.proto index 55ff088de8b..d30e670f5a6 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/access.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/access.proto @@ -28,11 +28,11 @@ option ruby_package = "Google::Cloud::SecurityCenter::V1"; message Access { // Associated email, such as "foo@google.com". // - // The email address of the authenticated user (or service account on behalf - // of third party principal) making the request. For third party identity - // callers, the `principal_subject` field is populated instead of this field. - // For privacy reasons, the principal email address is sometimes redacted. - // For more information, see [Caller identities in audit + // The email address of the authenticated user or a service account acting on + // behalf of a third party principal making the request. For third party + // identity callers, the `principal_subject` field is populated instead of + // this field. For privacy reasons, the principal email address is sometimes + // redacted. For more information, see [Caller identities in audit // logs](https://cloud.google.com/logging/docs/audit#user-id). string principal_email = 1; @@ -42,8 +42,8 @@ message Access { // The caller IP's geolocation, which identifies where the call came from. Geolocation caller_ip_geo = 3; - // What kind of user agent is associated, for example operating system shells, - // embedded or stand-alone applications, etc. + // Type of user agent associated with the finding. For example, an operating + // system shell or an embedded or standalone application. string user_agent_family = 4; // This is the API service that the service account made a call to, e.g. @@ -53,37 +53,36 @@ message Access { // The method that the service account called, e.g. "SetIamPolicy". string method_name = 6; - // A string representing the principal_subject associated with the identity. - // As compared to `principal_email`, supports principals that aren't - // associated with email addresses, such as third party principals. For most - // identities, the format will be `principal://iam.googleapis.com/{identity - // pool name}/subjects/{subject}` except for some GKE identities - // (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy - // format `serviceAccount:{identity pool name}[{subject}]` + // A string that represents the principal_subject that is associated with the + // identity. Unlike `principal_email`, `principal_subject` supports principals + // that aren't associated with email addresses, such as third party + // principals. For most identities, the format is + // `principal://iam.googleapis.com/{identity pool name}/subject/{subject}`. + // Some GKE identities, such as GKE_WORKLOAD, FREEFORM, and GKE_HUB_WORKLOAD, + // still use the legacy format `serviceAccount:{identity pool + // name}[{subject}]`. string principal_subject = 7; - // The name of the service account key used to create or exchange - // credentials for authenticating the service account making the request. + // The name of the service account key that was used to create or exchange + // credentials when authenticating the service account that made the request. // This is a scheme-less URI full resource name. For example: // - // "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}" + // "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}". // string service_account_key_name = 8; - // Identity delegation history of an authenticated service account that makes - // the request. It contains information on the real authorities that try to - // access GCP resources by delegating on a service account. When multiple - // authorities are present, they are guaranteed to be sorted based on the - // original ordering of the identity delegation events. + // The identity delegation history of an authenticated service account that + // made the request. The `serviceAccountDelegationInfo[]` object contains + // information about the real authorities that try to access Google Cloud + // resources by delegating on a service account. When multiple authorities are + // present, they are guaranteed to be sorted based on the original ordering of + // the identity delegation events. repeated ServiceAccountDelegationInfo service_account_delegation_info = 9; - // A string that represents the username of a user, user account, or other - // entity involved in the access event. What the entity is and what its role - // in the access event is depends on the finding that this field appears in. - // The entity is likely not an IAM principal, but could be a user that is - // logged into an operating system, if the finding is VM-related, or a user - // that is logged into some type of application that is involved in the - // access event. + // A string that represents a username. The username provided depends on the + // type of the finding and is likely not an IAM principal. For example, this + // can be a system username if the finding is related to a virtual machine, or + // it can be an application login username. string user_name = 11; } diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/cloud_dlp_data_profile.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/cloud_dlp_data_profile.proto new file mode 100644 index 00000000000..2a513f1dc03 --- /dev/null +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/cloud_dlp_data_profile.proto @@ -0,0 +1,42 @@ +// Copyright 2023 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.securitycenter.v1; + +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; +option go_package = "cloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb"; +option java_multiple_files = true; +option java_outer_classname = "CloudDlpDataProfileProto"; +option java_package = "com.google.cloud.securitycenter.v1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1"; +option (google.api.resource_definition) = { + type: "dlp.googleapis.com/TableDataProfile" + pattern: "projects/{project}/tableProfiles/{table_profile}" + pattern: "projects/{project}/locations/{location}/tableProfiles/{table_profile}" +}; + +// The [data profile](https://cloud.google.com/dlp/docs/data-profiles) +// associated with the finding. +message CloudDlpDataProfile { + // Name of the data profile, for example, + // `projects/123/locations/europe/tableProfiles/8383929`. + string data_profile = 1 [(google.api.resource_reference) = { + type: "dlp.googleapis.com/TableDataProfile" + }]; +} diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/cloud_dlp_inspection.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/cloud_dlp_inspection.proto new file mode 100644 index 00000000000..5d76ee71ee9 --- /dev/null +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/cloud_dlp_inspection.proto @@ -0,0 +1,54 @@ +// Copyright 2023 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.securitycenter.v1; + +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; +option go_package = "cloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb"; +option java_multiple_files = true; +option java_outer_classname = "CloudDlpInspectionProto"; +option java_package = "com.google.cloud.securitycenter.v1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1"; +option (google.api.resource_definition) = { + type: "dlp.googleapis.com/DlpJob" + pattern: "projects/{project}/dlpJobs/{dlp_job}" + pattern: "projects/{project}/locations/{location}/dlpJobs/{dlp_job}" +}; + +// Details about the Cloud Data Loss Prevention (Cloud DLP) [inspection +// job](https://cloud.google.com/dlp/docs/concepts-job-triggers) that produced +// the finding. +message CloudDlpInspection { + // Name of the inspection job, for example, + // `projects/123/locations/europe/dlpJobs/i-8383929`. + string inspect_job = 1 + [(google.api.resource_reference) = { type: "dlp.googleapis.com/DlpJob" }]; + + // The [type of + // information](https://cloud.google.com/dlp/docs/infotypes-reference) found, + // for example, `EMAIL_ADDRESS` or `STREET_ADDRESS`. + string info_type = 2; + + // The number of times Cloud DLP found this infoType within this job + // and resource. + int64 info_type_count = 3; + + // Whether Cloud DLP scanned the complete resource or a sampled subset. + bool full_scan = 4; +} diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/finding.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/finding.proto index 5e2653c5e59..b57b7be4e7a 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/finding.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/finding.proto @@ -19,6 +19,8 @@ package google.cloud.securitycenter.v1; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/securitycenter/v1/access.proto"; +import "google/cloud/securitycenter/v1/cloud_dlp_data_profile.proto"; +import "google/cloud/securitycenter/v1/cloud_dlp_inspection.proto"; import "google/cloud/securitycenter/v1/compliance.proto"; import "google/cloud/securitycenter/v1/connection.proto"; import "google/cloud/securitycenter/v1/contact_details.proto"; @@ -84,7 +86,8 @@ message Finding { // exploitable, and results in the direct ability to execute arbitrary code, // exfiltrate data, and otherwise gain additional access and privileges to // cloud resources and workloads. Examples include publicly accessible - // unprotected user data, public SSH access with weak or no passwords, etc. + // unprotected user data and public SSH access with weak or no + // passwords. // // Threat: // Indicates a threat that is able to access, modify, or delete data or @@ -170,10 +173,12 @@ message Finding { SCC_ERROR = 5; } - // The relative resource name of this finding. See: - // https://cloud.google.com/apis/design/resource_names#relative_resource_name - // Example: - // "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}" + // The [relative resource + // name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + // of the finding. Example: + // "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", + // "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", + // "projects/{project_id}/sources/{source_id}/findings/{finding_id}". string name = 1; // The relative resource name of the source the finding belongs to. See: @@ -247,11 +252,11 @@ message Finding { // The class of the finding. FindingClass finding_class = 17; - // Represents what's commonly known as an Indicator of compromise (IoC) in + // Represents what's commonly known as an *indicator of compromise* (IoC) in // computer forensics. This is an artifact observed on a network or in an // operating system that, with high confidence, indicates a computer - // intrusion. - // Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise + // intrusion. For more information, see [Indicator of + // compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise). Indicator indicator = 18; // Represents vulnerability-specific fields like CVE and CVSS scores. @@ -272,17 +277,16 @@ message Finding { // See: https://attack.mitre.org MitreAttack mitre_attack = 25; - // Access details associated to the Finding, such as more information on the - // caller, which method was accessed, from where, etc. + // Access details associated with the finding, such as more information on the + // caller, which method was accessed, and from where. Access access = 26; // Contains information about the IP connection associated with the finding. repeated Connection connections = 31; - // First known as mute_annotation. Records additional information about the - // mute operation e.g. mute config that muted the finding, user who muted the - // finding, etc. Unlike other attributes of a finding, a finding provider - // shouldn't set the value of mute. + // Records additional information about the mute operation, for example, the + // [mute configuration](/security-command-center/docs/how-to-mute-findings) + // that muted the finding and the user who muted the finding. string mute_initiator = 28; // Represents operating system processes associated with the Finding. @@ -316,16 +320,16 @@ message Finding { // "Event Threat Detection" or "Security Health Analytics". string parent_display_name = 36 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Contains more detail about the finding. + // Contains more details about the finding. string description = 37; - // Represents exfiltration associated with the Finding. + // Represents exfiltrations associated with the finding. Exfiltration exfiltration = 38; - // Represents IAM bindings associated with the Finding. + // Represents IAM bindings associated with the finding. repeated IamBinding iam_bindings = 39; - // Next steps associate to the finding. + // Steps to address the finding. string next_steps = 40; // Unique identifier of the module which generated the finding. @@ -333,8 +337,8 @@ message Finding { // folders/598186756061/securityHealthAnalyticsSettings/customModules/56799441161885 string module_name = 41; - // Containers associated with the finding. containers provides information - // for both Kubernetes and non-Kubernetes containers. + // Containers associated with the finding. This field provides information for + // both Kubernetes and non-Kubernetes containers. repeated Container containers = 42; // Kubernetes resources associated with the finding. @@ -346,6 +350,13 @@ message Finding { // File associated with the finding. repeated File files = 46; - // Kernel Rootkit signature. + // Cloud Data Loss Prevention (Cloud DLP) inspection results that are + // associated with the finding. + CloudDlpInspection cloud_dlp_inspection = 48; + + // Cloud DLP data profile that is associated with the finding. + CloudDlpDataProfile cloud_dlp_data_profile = 49; + + // Signature of the kernel rootkit. KernelRootkit kernel_rootkit = 50; } diff --git a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/securitycenter_service.proto b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/securitycenter_service.proto index 42db34f29a0..052c9cebccb 100644 --- a/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/securitycenter_service.proto +++ b/packages/google-cloud-securitycenter/protos/google/cloud/securitycenter/v1/securitycenter_service.proto @@ -599,7 +599,7 @@ service SecurityCenter { // Updates the SecurityHealthAnalyticsCustomModule under the given name based // on the given update mask. Updating the enablement state is supported on // both resident and inherited modules (though resident modules cannot have an - // enablement state of “inherited”). Updating the display name and custom + // enablement state of "inherited"). Updating the display name and custom // config of a module is supported on resident modules only. rpc UpdateSecurityHealthAnalyticsCustomModule( UpdateSecurityHealthAnalyticsCustomModuleRequest) @@ -835,7 +835,7 @@ message CreateNotificationConfigRequest { [(google.api.field_behavior) = REQUIRED]; } -// Request message for creating security health analytics custom modules. +// Request message for creating Security Health Analytics custom modules. message CreateSecurityHealthAnalyticsCustomModuleRequest { // Required. Resource name of the new custom module's parent. Its format is // "organizations/{organization}/securityHealthAnalyticsSettings", @@ -899,7 +899,7 @@ message DeleteNotificationConfigRequest { ]; } -// Request message for deleting security health analytics custom modules. +// Request message for deleting Security Health Analytics custom modules. message DeleteSecurityHealthAnalyticsCustomModuleRequest { // Required. Name of the custom module to delete. Its format is // "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}", @@ -968,7 +968,7 @@ message GetOrganizationSettingsRequest { ]; } -// Request message for getting effective security health analytics custom +// Request message for getting effective Security Health Analytics custom // modules. message GetEffectiveSecurityHealthAnalyticsCustomModuleRequest { // Required. Name of the effective custom module to get. Its format is @@ -984,7 +984,7 @@ message GetEffectiveSecurityHealthAnalyticsCustomModuleRequest { ]; } -// Request message for getting security health analytics custom modules. +// Request message for getting Security Health Analytics custom modules. message GetSecurityHealthAnalyticsCustomModuleRequest { // Required. Name of the custom module to get. Its format is // "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}", @@ -1341,7 +1341,7 @@ message GroupResult { int64 count = 2; } -// Request message for listing descendant security health analytics custom +// Request message for listing descendant Security Health Analytics custom // modules. message ListDescendantSecurityHealthAnalyticsCustomModulesRequest { // Required. Name of parent to list descendant custom modules. Its format is @@ -1363,7 +1363,7 @@ message ListDescendantSecurityHealthAnalyticsCustomModulesRequest { string page_token = 3; } -// Response message for listing descendant security health analytics custom +// Response message for listing descendant Security Health Analytics custom // modules. message ListDescendantSecurityHealthAnalyticsCustomModulesResponse { // Custom modules belonging to the requested parent and its descendants. @@ -1444,7 +1444,7 @@ message ListNotificationConfigsResponse { string next_page_token = 2; } -// Request message for listing effective security health analytics custom +// Request message for listing effective Security Health Analytics custom // modules. message ListEffectiveSecurityHealthAnalyticsCustomModulesRequest { // Required. Name of parent to list effective custom modules. Its format is @@ -1466,7 +1466,7 @@ message ListEffectiveSecurityHealthAnalyticsCustomModulesRequest { string page_token = 3; } -// Response message for listing effective security health analytics custom +// Response message for listing effective Security Health Analytics custom // modules. message ListEffectiveSecurityHealthAnalyticsCustomModulesResponse { // Effective custom modules belonging to the requested parent. @@ -1478,7 +1478,7 @@ message ListEffectiveSecurityHealthAnalyticsCustomModulesResponse { string next_page_token = 2; } -// Request message for listing security health analytics custom modules. +// Request message for listing Security Health Analytics custom modules. message ListSecurityHealthAnalyticsCustomModulesRequest { // Required. Name of parent to list custom modules. Its format is // "organizations/{organization}/securityHealthAnalyticsSettings", @@ -1499,7 +1499,7 @@ message ListSecurityHealthAnalyticsCustomModulesRequest { string page_token = 3; } -// Response message for listing security health analytics custom modules. +// Response message for listing Security Health Analytics custom modules. message ListSecurityHealthAnalyticsCustomModulesResponse { // Custom modules belonging to the requested parent. repeated SecurityHealthAnalyticsCustomModule @@ -2092,7 +2092,7 @@ message UpdateOrganizationSettingsRequest { google.protobuf.FieldMask update_mask = 2; } -// Request message for updating security health analytics custom modules. +// Request message for updating Security Health Analytics custom modules. message UpdateSecurityHealthAnalyticsCustomModuleRequest { // Required. The SecurityHealthAnalytics custom module to update. SecurityHealthAnalyticsCustomModule security_health_analytics_custom_module = diff --git a/packages/google-cloud-securitycenter/protos/protos.d.ts b/packages/google-cloud-securitycenter/protos/protos.d.ts index 5707e51983b..5de8ed01e6a 100644 --- a/packages/google-cloud-securitycenter/protos/protos.d.ts +++ b/packages/google-cloud-securitycenter/protos/protos.d.ts @@ -1112,6 +1112,218 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a CloudDlpDataProfile. */ + interface ICloudDlpDataProfile { + + /** CloudDlpDataProfile dataProfile */ + dataProfile?: (string|null); + } + + /** Represents a CloudDlpDataProfile. */ + class CloudDlpDataProfile implements ICloudDlpDataProfile { + + /** + * Constructs a new CloudDlpDataProfile. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.ICloudDlpDataProfile); + + /** CloudDlpDataProfile dataProfile. */ + public dataProfile: string; + + /** + * Creates a new CloudDlpDataProfile instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudDlpDataProfile instance + */ + public static create(properties?: google.cloud.securitycenter.v1.ICloudDlpDataProfile): google.cloud.securitycenter.v1.CloudDlpDataProfile; + + /** + * Encodes the specified CloudDlpDataProfile message. Does not implicitly {@link google.cloud.securitycenter.v1.CloudDlpDataProfile.verify|verify} messages. + * @param message CloudDlpDataProfile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.ICloudDlpDataProfile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudDlpDataProfile message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CloudDlpDataProfile.verify|verify} messages. + * @param message CloudDlpDataProfile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.ICloudDlpDataProfile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudDlpDataProfile message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudDlpDataProfile + * @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.securitycenter.v1.CloudDlpDataProfile; + + /** + * Decodes a CloudDlpDataProfile message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudDlpDataProfile + * @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.securitycenter.v1.CloudDlpDataProfile; + + /** + * Verifies a CloudDlpDataProfile 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 CloudDlpDataProfile message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudDlpDataProfile + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CloudDlpDataProfile; + + /** + * Creates a plain object from a CloudDlpDataProfile message. Also converts values to other types if specified. + * @param message CloudDlpDataProfile + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.CloudDlpDataProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudDlpDataProfile to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudDlpDataProfile + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudDlpInspection. */ + interface ICloudDlpInspection { + + /** CloudDlpInspection inspectJob */ + inspectJob?: (string|null); + + /** CloudDlpInspection infoType */ + infoType?: (string|null); + + /** CloudDlpInspection infoTypeCount */ + infoTypeCount?: (number|Long|string|null); + + /** CloudDlpInspection fullScan */ + fullScan?: (boolean|null); + } + + /** Represents a CloudDlpInspection. */ + class CloudDlpInspection implements ICloudDlpInspection { + + /** + * Constructs a new CloudDlpInspection. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycenter.v1.ICloudDlpInspection); + + /** CloudDlpInspection inspectJob. */ + public inspectJob: string; + + /** CloudDlpInspection infoType. */ + public infoType: string; + + /** CloudDlpInspection infoTypeCount. */ + public infoTypeCount: (number|Long|string); + + /** CloudDlpInspection fullScan. */ + public fullScan: boolean; + + /** + * Creates a new CloudDlpInspection instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudDlpInspection instance + */ + public static create(properties?: google.cloud.securitycenter.v1.ICloudDlpInspection): google.cloud.securitycenter.v1.CloudDlpInspection; + + /** + * Encodes the specified CloudDlpInspection message. Does not implicitly {@link google.cloud.securitycenter.v1.CloudDlpInspection.verify|verify} messages. + * @param message CloudDlpInspection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycenter.v1.ICloudDlpInspection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudDlpInspection message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CloudDlpInspection.verify|verify} messages. + * @param message CloudDlpInspection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycenter.v1.ICloudDlpInspection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudDlpInspection message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudDlpInspection + * @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.securitycenter.v1.CloudDlpInspection; + + /** + * Decodes a CloudDlpInspection message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudDlpInspection + * @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.securitycenter.v1.CloudDlpInspection; + + /** + * Verifies a CloudDlpInspection 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 CloudDlpInspection message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudDlpInspection + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycenter.v1.CloudDlpInspection; + + /** + * Creates a plain object from a CloudDlpInspection message. Also converts values to other types if specified. + * @param message CloudDlpInspection + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycenter.v1.CloudDlpInspection, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudDlpInspection to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudDlpInspection + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a Compliance. */ interface ICompliance { @@ -3014,6 +3226,12 @@ export namespace google { /** Finding files */ files?: (google.cloud.securitycenter.v1.IFile[]|null); + /** Finding cloudDlpInspection */ + cloudDlpInspection?: (google.cloud.securitycenter.v1.ICloudDlpInspection|null); + + /** Finding cloudDlpDataProfile */ + cloudDlpDataProfile?: (google.cloud.securitycenter.v1.ICloudDlpDataProfile|null); + /** Finding kernelRootkit */ kernelRootkit?: (google.cloud.securitycenter.v1.IKernelRootkit|null); } @@ -3132,6 +3350,12 @@ export namespace google { /** Finding files. */ public files: google.cloud.securitycenter.v1.IFile[]; + /** Finding cloudDlpInspection. */ + public cloudDlpInspection?: (google.cloud.securitycenter.v1.ICloudDlpInspection|null); + + /** Finding cloudDlpDataProfile. */ + public cloudDlpDataProfile?: (google.cloud.securitycenter.v1.ICloudDlpDataProfile|null); + /** Finding kernelRootkit. */ public kernelRootkit?: (google.cloud.securitycenter.v1.IKernelRootkit|null); diff --git a/packages/google-cloud-securitycenter/protos/protos.js b/packages/google-cloud-securitycenter/protos/protos.js index 6b62f24f387..77ffcdf8905 100644 --- a/packages/google-cloud-securitycenter/protos/protos.js +++ b/packages/google-cloud-securitycenter/protos/protos.js @@ -2885,6 +2885,496 @@ return BigQueryExport; })(); + v1.CloudDlpDataProfile = (function() { + + /** + * Properties of a CloudDlpDataProfile. + * @memberof google.cloud.securitycenter.v1 + * @interface ICloudDlpDataProfile + * @property {string|null} [dataProfile] CloudDlpDataProfile dataProfile + */ + + /** + * Constructs a new CloudDlpDataProfile. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a CloudDlpDataProfile. + * @implements ICloudDlpDataProfile + * @constructor + * @param {google.cloud.securitycenter.v1.ICloudDlpDataProfile=} [properties] Properties to set + */ + function CloudDlpDataProfile(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]]; + } + + /** + * CloudDlpDataProfile dataProfile. + * @member {string} dataProfile + * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile + * @instance + */ + CloudDlpDataProfile.prototype.dataProfile = ""; + + /** + * Creates a new CloudDlpDataProfile instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile + * @static + * @param {google.cloud.securitycenter.v1.ICloudDlpDataProfile=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.CloudDlpDataProfile} CloudDlpDataProfile instance + */ + CloudDlpDataProfile.create = function create(properties) { + return new CloudDlpDataProfile(properties); + }; + + /** + * Encodes the specified CloudDlpDataProfile message. Does not implicitly {@link google.cloud.securitycenter.v1.CloudDlpDataProfile.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile + * @static + * @param {google.cloud.securitycenter.v1.ICloudDlpDataProfile} message CloudDlpDataProfile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudDlpDataProfile.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataProfile != null && Object.hasOwnProperty.call(message, "dataProfile")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataProfile); + return writer; + }; + + /** + * Encodes the specified CloudDlpDataProfile message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CloudDlpDataProfile.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile + * @static + * @param {google.cloud.securitycenter.v1.ICloudDlpDataProfile} message CloudDlpDataProfile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudDlpDataProfile.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudDlpDataProfile message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.CloudDlpDataProfile} CloudDlpDataProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudDlpDataProfile.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.CloudDlpDataProfile(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dataProfile = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudDlpDataProfile message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.CloudDlpDataProfile} CloudDlpDataProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudDlpDataProfile.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudDlpDataProfile message. + * @function verify + * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudDlpDataProfile.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataProfile != null && message.hasOwnProperty("dataProfile")) + if (!$util.isString(message.dataProfile)) + return "dataProfile: string expected"; + return null; + }; + + /** + * Creates a CloudDlpDataProfile message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.CloudDlpDataProfile} CloudDlpDataProfile + */ + CloudDlpDataProfile.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.CloudDlpDataProfile) + return object; + var message = new $root.google.cloud.securitycenter.v1.CloudDlpDataProfile(); + if (object.dataProfile != null) + message.dataProfile = String(object.dataProfile); + return message; + }; + + /** + * Creates a plain object from a CloudDlpDataProfile message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile + * @static + * @param {google.cloud.securitycenter.v1.CloudDlpDataProfile} message CloudDlpDataProfile + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudDlpDataProfile.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.dataProfile = ""; + if (message.dataProfile != null && message.hasOwnProperty("dataProfile")) + object.dataProfile = message.dataProfile; + return object; + }; + + /** + * Converts this CloudDlpDataProfile to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile + * @instance + * @returns {Object.} JSON object + */ + CloudDlpDataProfile.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudDlpDataProfile + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.CloudDlpDataProfile + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudDlpDataProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.CloudDlpDataProfile"; + }; + + return CloudDlpDataProfile; + })(); + + v1.CloudDlpInspection = (function() { + + /** + * Properties of a CloudDlpInspection. + * @memberof google.cloud.securitycenter.v1 + * @interface ICloudDlpInspection + * @property {string|null} [inspectJob] CloudDlpInspection inspectJob + * @property {string|null} [infoType] CloudDlpInspection infoType + * @property {number|Long|null} [infoTypeCount] CloudDlpInspection infoTypeCount + * @property {boolean|null} [fullScan] CloudDlpInspection fullScan + */ + + /** + * Constructs a new CloudDlpInspection. + * @memberof google.cloud.securitycenter.v1 + * @classdesc Represents a CloudDlpInspection. + * @implements ICloudDlpInspection + * @constructor + * @param {google.cloud.securitycenter.v1.ICloudDlpInspection=} [properties] Properties to set + */ + function CloudDlpInspection(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]]; + } + + /** + * CloudDlpInspection inspectJob. + * @member {string} inspectJob + * @memberof google.cloud.securitycenter.v1.CloudDlpInspection + * @instance + */ + CloudDlpInspection.prototype.inspectJob = ""; + + /** + * CloudDlpInspection infoType. + * @member {string} infoType + * @memberof google.cloud.securitycenter.v1.CloudDlpInspection + * @instance + */ + CloudDlpInspection.prototype.infoType = ""; + + /** + * CloudDlpInspection infoTypeCount. + * @member {number|Long} infoTypeCount + * @memberof google.cloud.securitycenter.v1.CloudDlpInspection + * @instance + */ + CloudDlpInspection.prototype.infoTypeCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * CloudDlpInspection fullScan. + * @member {boolean} fullScan + * @memberof google.cloud.securitycenter.v1.CloudDlpInspection + * @instance + */ + CloudDlpInspection.prototype.fullScan = false; + + /** + * Creates a new CloudDlpInspection instance using the specified properties. + * @function create + * @memberof google.cloud.securitycenter.v1.CloudDlpInspection + * @static + * @param {google.cloud.securitycenter.v1.ICloudDlpInspection=} [properties] Properties to set + * @returns {google.cloud.securitycenter.v1.CloudDlpInspection} CloudDlpInspection instance + */ + CloudDlpInspection.create = function create(properties) { + return new CloudDlpInspection(properties); + }; + + /** + * Encodes the specified CloudDlpInspection message. Does not implicitly {@link google.cloud.securitycenter.v1.CloudDlpInspection.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycenter.v1.CloudDlpInspection + * @static + * @param {google.cloud.securitycenter.v1.ICloudDlpInspection} message CloudDlpInspection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudDlpInspection.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inspectJob != null && Object.hasOwnProperty.call(message, "inspectJob")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.inspectJob); + if (message.infoType != null && Object.hasOwnProperty.call(message, "infoType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.infoType); + if (message.infoTypeCount != null && Object.hasOwnProperty.call(message, "infoTypeCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.infoTypeCount); + if (message.fullScan != null && Object.hasOwnProperty.call(message, "fullScan")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.fullScan); + return writer; + }; + + /** + * Encodes the specified CloudDlpInspection message, length delimited. Does not implicitly {@link google.cloud.securitycenter.v1.CloudDlpInspection.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycenter.v1.CloudDlpInspection + * @static + * @param {google.cloud.securitycenter.v1.ICloudDlpInspection} message CloudDlpInspection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudDlpInspection.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudDlpInspection message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycenter.v1.CloudDlpInspection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycenter.v1.CloudDlpInspection} CloudDlpInspection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudDlpInspection.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycenter.v1.CloudDlpInspection(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.inspectJob = reader.string(); + break; + } + case 2: { + message.infoType = reader.string(); + break; + } + case 3: { + message.infoTypeCount = reader.int64(); + break; + } + case 4: { + message.fullScan = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudDlpInspection message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycenter.v1.CloudDlpInspection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycenter.v1.CloudDlpInspection} CloudDlpInspection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudDlpInspection.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudDlpInspection message. + * @function verify + * @memberof google.cloud.securitycenter.v1.CloudDlpInspection + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudDlpInspection.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.inspectJob != null && message.hasOwnProperty("inspectJob")) + if (!$util.isString(message.inspectJob)) + return "inspectJob: string expected"; + if (message.infoType != null && message.hasOwnProperty("infoType")) + if (!$util.isString(message.infoType)) + return "infoType: string expected"; + if (message.infoTypeCount != null && message.hasOwnProperty("infoTypeCount")) + if (!$util.isInteger(message.infoTypeCount) && !(message.infoTypeCount && $util.isInteger(message.infoTypeCount.low) && $util.isInteger(message.infoTypeCount.high))) + return "infoTypeCount: integer|Long expected"; + if (message.fullScan != null && message.hasOwnProperty("fullScan")) + if (typeof message.fullScan !== "boolean") + return "fullScan: boolean expected"; + return null; + }; + + /** + * Creates a CloudDlpInspection message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycenter.v1.CloudDlpInspection + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycenter.v1.CloudDlpInspection} CloudDlpInspection + */ + CloudDlpInspection.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycenter.v1.CloudDlpInspection) + return object; + var message = new $root.google.cloud.securitycenter.v1.CloudDlpInspection(); + if (object.inspectJob != null) + message.inspectJob = String(object.inspectJob); + if (object.infoType != null) + message.infoType = String(object.infoType); + if (object.infoTypeCount != null) + if ($util.Long) + (message.infoTypeCount = $util.Long.fromValue(object.infoTypeCount)).unsigned = false; + else if (typeof object.infoTypeCount === "string") + message.infoTypeCount = parseInt(object.infoTypeCount, 10); + else if (typeof object.infoTypeCount === "number") + message.infoTypeCount = object.infoTypeCount; + else if (typeof object.infoTypeCount === "object") + message.infoTypeCount = new $util.LongBits(object.infoTypeCount.low >>> 0, object.infoTypeCount.high >>> 0).toNumber(); + if (object.fullScan != null) + message.fullScan = Boolean(object.fullScan); + return message; + }; + + /** + * Creates a plain object from a CloudDlpInspection message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycenter.v1.CloudDlpInspection + * @static + * @param {google.cloud.securitycenter.v1.CloudDlpInspection} message CloudDlpInspection + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudDlpInspection.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.inspectJob = ""; + object.infoType = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.infoTypeCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.infoTypeCount = options.longs === String ? "0" : 0; + object.fullScan = false; + } + if (message.inspectJob != null && message.hasOwnProperty("inspectJob")) + object.inspectJob = message.inspectJob; + if (message.infoType != null && message.hasOwnProperty("infoType")) + object.infoType = message.infoType; + if (message.infoTypeCount != null && message.hasOwnProperty("infoTypeCount")) + if (typeof message.infoTypeCount === "number") + object.infoTypeCount = options.longs === String ? String(message.infoTypeCount) : message.infoTypeCount; + else + object.infoTypeCount = options.longs === String ? $util.Long.prototype.toString.call(message.infoTypeCount) : options.longs === Number ? new $util.LongBits(message.infoTypeCount.low >>> 0, message.infoTypeCount.high >>> 0).toNumber() : message.infoTypeCount; + if (message.fullScan != null && message.hasOwnProperty("fullScan")) + object.fullScan = message.fullScan; + return object; + }; + + /** + * Converts this CloudDlpInspection to JSON. + * @function toJSON + * @memberof google.cloud.securitycenter.v1.CloudDlpInspection + * @instance + * @returns {Object.} JSON object + */ + CloudDlpInspection.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudDlpInspection + * @function getTypeUrl + * @memberof google.cloud.securitycenter.v1.CloudDlpInspection + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudDlpInspection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycenter.v1.CloudDlpInspection"; + }; + + return CloudDlpInspection; + })(); + v1.Compliance = (function() { /** @@ -7370,6 +7860,8 @@ * @property {google.cloud.securitycenter.v1.IKubernetes|null} [kubernetes] Finding kubernetes * @property {google.cloud.securitycenter.v1.IDatabase|null} [database] Finding database * @property {Array.|null} [files] Finding files + * @property {google.cloud.securitycenter.v1.ICloudDlpInspection|null} [cloudDlpInspection] Finding cloudDlpInspection + * @property {google.cloud.securitycenter.v1.ICloudDlpDataProfile|null} [cloudDlpDataProfile] Finding cloudDlpDataProfile * @property {google.cloud.securitycenter.v1.IKernelRootkit|null} [kernelRootkit] Finding kernelRootkit */ @@ -7677,6 +8169,22 @@ */ Finding.prototype.files = $util.emptyArray; + /** + * Finding cloudDlpInspection. + * @member {google.cloud.securitycenter.v1.ICloudDlpInspection|null|undefined} cloudDlpInspection + * @memberof google.cloud.securitycenter.v1.Finding + * @instance + */ + Finding.prototype.cloudDlpInspection = null; + + /** + * Finding cloudDlpDataProfile. + * @member {google.cloud.securitycenter.v1.ICloudDlpDataProfile|null|undefined} cloudDlpDataProfile + * @memberof google.cloud.securitycenter.v1.Finding + * @instance + */ + Finding.prototype.cloudDlpDataProfile = null; + /** * Finding kernelRootkit. * @member {google.cloud.securitycenter.v1.IKernelRootkit|null|undefined} kernelRootkit @@ -7794,6 +8302,10 @@ if (message.files != null && message.files.length) for (var i = 0; i < message.files.length; ++i) $root.google.cloud.securitycenter.v1.File.encode(message.files[i], writer.uint32(/* id 46, wireType 2 =*/370).fork()).ldelim(); + if (message.cloudDlpInspection != null && Object.hasOwnProperty.call(message, "cloudDlpInspection")) + $root.google.cloud.securitycenter.v1.CloudDlpInspection.encode(message.cloudDlpInspection, writer.uint32(/* id 48, wireType 2 =*/386).fork()).ldelim(); + if (message.cloudDlpDataProfile != null && Object.hasOwnProperty.call(message, "cloudDlpDataProfile")) + $root.google.cloud.securitycenter.v1.CloudDlpDataProfile.encode(message.cloudDlpDataProfile, writer.uint32(/* id 49, wireType 2 =*/394).fork()).ldelim(); if (message.kernelRootkit != null && Object.hasOwnProperty.call(message, "kernelRootkit")) $root.google.cloud.securitycenter.v1.KernelRootkit.encode(message.kernelRootkit, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); return writer; @@ -8039,6 +8551,14 @@ message.files.push($root.google.cloud.securitycenter.v1.File.decode(reader, reader.uint32())); break; } + case 48: { + message.cloudDlpInspection = $root.google.cloud.securitycenter.v1.CloudDlpInspection.decode(reader, reader.uint32()); + break; + } + case 49: { + message.cloudDlpDataProfile = $root.google.cloud.securitycenter.v1.CloudDlpDataProfile.decode(reader, reader.uint32()); + break; + } case 50: { message.kernelRootkit = $root.google.cloud.securitycenter.v1.KernelRootkit.decode(reader, reader.uint32()); break; @@ -8292,6 +8812,16 @@ return "files." + error; } } + if (message.cloudDlpInspection != null && message.hasOwnProperty("cloudDlpInspection")) { + var error = $root.google.cloud.securitycenter.v1.CloudDlpInspection.verify(message.cloudDlpInspection); + if (error) + return "cloudDlpInspection." + error; + } + if (message.cloudDlpDataProfile != null && message.hasOwnProperty("cloudDlpDataProfile")) { + var error = $root.google.cloud.securitycenter.v1.CloudDlpDataProfile.verify(message.cloudDlpDataProfile); + if (error) + return "cloudDlpDataProfile." + error; + } if (message.kernelRootkit != null && message.hasOwnProperty("kernelRootkit")) { var error = $root.google.cloud.securitycenter.v1.KernelRootkit.verify(message.kernelRootkit); if (error) @@ -8583,6 +9113,16 @@ message.files[i] = $root.google.cloud.securitycenter.v1.File.fromObject(object.files[i]); } } + if (object.cloudDlpInspection != null) { + if (typeof object.cloudDlpInspection !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.cloudDlpInspection: object expected"); + message.cloudDlpInspection = $root.google.cloud.securitycenter.v1.CloudDlpInspection.fromObject(object.cloudDlpInspection); + } + if (object.cloudDlpDataProfile != null) { + if (typeof object.cloudDlpDataProfile !== "object") + throw TypeError(".google.cloud.securitycenter.v1.Finding.cloudDlpDataProfile: object expected"); + message.cloudDlpDataProfile = $root.google.cloud.securitycenter.v1.CloudDlpDataProfile.fromObject(object.cloudDlpDataProfile); + } if (object.kernelRootkit != null) { if (typeof object.kernelRootkit !== "object") throw TypeError(".google.cloud.securitycenter.v1.Finding.kernelRootkit: object expected"); @@ -8644,6 +9184,8 @@ object.moduleName = ""; object.kubernetes = null; object.database = null; + object.cloudDlpInspection = null; + object.cloudDlpDataProfile = null; object.kernelRootkit = null; } if (message.name != null && message.hasOwnProperty("name")) @@ -8744,6 +9286,10 @@ for (var j = 0; j < message.files.length; ++j) object.files[j] = $root.google.cloud.securitycenter.v1.File.toObject(message.files[j], options); } + if (message.cloudDlpInspection != null && message.hasOwnProperty("cloudDlpInspection")) + object.cloudDlpInspection = $root.google.cloud.securitycenter.v1.CloudDlpInspection.toObject(message.cloudDlpInspection, options); + if (message.cloudDlpDataProfile != null && message.hasOwnProperty("cloudDlpDataProfile")) + object.cloudDlpDataProfile = $root.google.cloud.securitycenter.v1.CloudDlpDataProfile.toObject(message.cloudDlpDataProfile, options); if (message.kernelRootkit != null && message.hasOwnProperty("kernelRootkit")) object.kernelRootkit = $root.google.cloud.securitycenter.v1.KernelRootkit.toObject(message.kernelRootkit, options); return object; diff --git a/packages/google-cloud-securitycenter/protos/protos.json b/packages/google-cloud-securitycenter/protos/protos.json index cde52a46560..c60db2ca4ed 100644 --- a/packages/google-cloud-securitycenter/protos/protos.json +++ b/packages/google-cloud-securitycenter/protos/protos.json @@ -262,6 +262,40 @@ } } }, + "CloudDlpDataProfile": { + "fields": { + "dataProfile": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "dlp.googleapis.com/TableDataProfile" + } + } + } + }, + "CloudDlpInspection": { + "fields": { + "inspectJob": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "dlp.googleapis.com/DlpJob" + } + }, + "infoType": { + "type": "string", + "id": 2 + }, + "infoTypeCount": { + "type": "int64", + "id": 3 + }, + "fullScan": { + "type": "bool", + "id": 4 + } + } + }, "Compliance": { "fields": { "standard": { @@ -760,6 +794,14 @@ "type": "File", "id": 46 }, + "cloudDlpInspection": { + "type": "CloudDlpInspection", + "id": 48 + }, + "cloudDlpDataProfile": { + "type": "CloudDlpDataProfile", + "id": 49 + }, "kernelRootkit": { "type": "KernelRootkit", "id": 50 diff --git a/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata.google.cloud.securitycenter.v1.json b/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata.google.cloud.securitycenter.v1.json index be3fc9a3e1c..895ed0dbd35 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata.google.cloud.securitycenter.v1.json +++ b/packages/google-cloud-securitycenter/samples/generated/v1/snippet_metadata.google.cloud.securitycenter.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securitycenter", - "version": "7.2.1", + "version": "7.4.0", "language": "TYPESCRIPT", "apis": [ { @@ -1735,7 +1735,7 @@ "regionTag": "securitycenter_v1_generated_SecurityCenter_UpdateSecurityHealthAnalyticsCustomModule_async", "title": "SecurityCenter updateSecurityHealthAnalyticsCustomModule Sample", "origin": "API_DEFINITION", - "description": " Updates the SecurityHealthAnalyticsCustomModule under the given name based on the given update mask. Updating the enablement state is supported on both resident and inherited modules (though resident modules cannot have an enablement state of \u201cinherited\u201d). Updating the display name and custom config of a module is supported on resident modules only.", + "description": " Updates the SecurityHealthAnalyticsCustomModule under the given name based on the given update mask. Updating the enablement state is supported on both resident and inherited modules (though resident modules cannot have an enablement state of \"inherited\"). Updating the display name and custom config of a module is supported on resident modules only.", "canonical": true, "file": "security_center.update_security_health_analytics_custom_module.js", "language": "JAVASCRIPT", diff --git a/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata.google.cloud.securitycenter.v1beta1.json b/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata.google.cloud.securitycenter.v1beta1.json index 72b89e8887d..7d757e91e34 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata.google.cloud.securitycenter.v1beta1.json +++ b/packages/google-cloud-securitycenter/samples/generated/v1beta1/snippet_metadata.google.cloud.securitycenter.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securitycenter", - "version": "7.2.1", + "version": "7.4.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata.google.cloud.securitycenter.v1p1beta1.json b/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata.google.cloud.securitycenter.v1p1beta1.json index e86dad841f0..1c4161a72bc 100644 --- a/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata.google.cloud.securitycenter.v1p1beta1.json +++ b/packages/google-cloud-securitycenter/samples/generated/v1p1beta1/snippet_metadata.google.cloud.securitycenter.v1p1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-securitycenter", - "version": "7.2.1", + "version": "7.4.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-securitycenter/samples/package.json b/packages/google-cloud-securitycenter/samples/package.json index ae834ff5ccb..c07208d3594 100644 --- a/packages/google-cloud-securitycenter/samples/package.json +++ b/packages/google-cloud-securitycenter/samples/package.json @@ -14,7 +14,7 @@ "license": "Apache-2.0", "dependencies": { "@google-cloud/pubsub": "^3.0.0", - "@google-cloud/security-center": "^7.3.0" + "@google-cloud/security-center": "^7.4.0" }, "devDependencies": { "chai": "^4.2.0", diff --git a/packages/google-cloud-securitycenter/src/v1/security_center_client.ts b/packages/google-cloud-securitycenter/src/v1/security_center_client.ts index 1f7a46bb19b..398b70badfb 100644 --- a/packages/google-cloud-securitycenter/src/v1/security_center_client.ts +++ b/packages/google-cloud-securitycenter/src/v1/security_center_client.ts @@ -3126,7 +3126,7 @@ export class SecurityCenterClient { * Updates the SecurityHealthAnalyticsCustomModule under the given name based * on the given update mask. Updating the enablement state is supported on * both resident and inherited modules (though resident modules cannot have an - * enablement state of “inherited”). Updating the display name and custom + * enablement state of "inherited"). Updating the display name and custom * config of a module is supported on resident modules only. * * @param {Object} request diff --git a/packages/google-cloud-securitycenter/src/v1/security_center_proto_list.json b/packages/google-cloud-securitycenter/src/v1/security_center_proto_list.json index 7210315576c..445bd4476f4 100644 --- a/packages/google-cloud-securitycenter/src/v1/security_center_proto_list.json +++ b/packages/google-cloud-securitycenter/src/v1/security_center_proto_list.json @@ -2,6 +2,8 @@ "../../protos/google/cloud/securitycenter/v1/access.proto", "../../protos/google/cloud/securitycenter/v1/asset.proto", "../../protos/google/cloud/securitycenter/v1/bigquery_export.proto", + "../../protos/google/cloud/securitycenter/v1/cloud_dlp_data_profile.proto", + "../../protos/google/cloud/securitycenter/v1/cloud_dlp_inspection.proto", "../../protos/google/cloud/securitycenter/v1/compliance.proto", "../../protos/google/cloud/securitycenter/v1/connection.proto", "../../protos/google/cloud/securitycenter/v1/contact_details.proto", diff --git a/packages/google-cloud-servicedirectory/package.json b/packages/google-cloud-servicedirectory/package.json index 95a2cc71976..757f0499b19 100644 --- a/packages/google-cloud-servicedirectory/package.json +++ b/packages/google-cloud-servicedirectory/package.json @@ -17,19 +17,19 @@ "main": "build/src/index.js", "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", "docs-test": "linkinator docs", "fix": "gts fix", - "prelint": "cd samples; npm link ../; npm install", "lint": "gts check", - "predocs-test": "npm run docs", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "test": "c8 mocha build/test", - "precompile": "gts clean" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8", @@ -45,6 +45,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -56,5 +57,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-servicedirectory" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-shell/package-lock.json b/packages/google-cloud-shell/package-lock.json deleted file mode 100644 index 6e19bea78ef..00000000000 --- a/packages/google-cloud-shell/package-lock.json +++ /dev/null @@ -1,6053 +0,0 @@ -{ - "name": "@google-cloud/shell", - "version": "2.1.2", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", - "dev": true, - "requires": { - "@babel/highlight": "^7.10.4" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz", - "integrity": "sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A==", - "dev": true - }, - "@babel/highlight": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.0.tgz", - "integrity": "sha512-YSCOwxvTYEIMSGaBQb5kDDsCopDdiUGsqpatp3fOlI4+2HQSkTmEVWnVuySdAC5EWCqSWWTv0ib63RjR7dTBdg==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.14.0", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "@babel/parser": { - "version": "7.20.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.3.tgz", - "integrity": "sha512-OP/s5a94frIPXwjzEcv5S/tpQfc6XhxYUnmWpgdqMWGgYCuErA3SzozaRAMQgSZWKeTJxht9aWAkUY+0UzvOFg==", - "dev": true - }, - "@bcoe/v8-coverage": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true - }, - "@discoveryjs/json-ext": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", - "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", - "dev": true - }, - "@eslint/eslintrc": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", - "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", - "dev": true, - "requires": { - "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^13.9.0", - "ignore": "^4.0.6", - "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", - "strip-json-comments": "^3.1.1" - }, - "dependencies": { - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true - } - } - }, - "@grpc/grpc-js": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.7.3.tgz", - "integrity": "sha512-H9l79u4kJ2PVSxUNA08HMYAnUBLj9v6KjYQ7SQ71hOZcEXhShE/y5iQCesP8+6/Ik/7i2O0a10bPquIcYfufog==", - "requires": { - "@grpc/proto-loader": "^0.7.0", - "@types/node": ">=12.12.47" - } - }, - "@grpc/proto-loader": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.3.tgz", - "integrity": "sha512-5dAvoZwna2Py3Ef96Ux9jIkp3iZ62TUsV00p3wVBPNX5K178UbNi8Q7gQVqwXT1Yq9RejIGG9G2IPEo93T6RcA==", - "requires": { - "@types/long": "^4.0.1", - "lodash.camelcase": "^4.3.0", - "long": "^4.0.0", - "protobufjs": "^7.0.0", - "yargs": "^16.2.0" - } - }, - "@humanwhocodes/config-array": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", - "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", - "dev": true, - "requires": { - "@humanwhocodes/object-schema": "^1.2.0", - "debug": "^4.1.1", - "minimatch": "^3.0.4" - } - }, - "@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "dev": true - }, - "@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "dev": true - }, - "@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, - "requires": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - } - }, - "@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true - }, - "@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true - }, - "@jridgewell/source-map": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", - "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", - "dev": true, - "requires": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" - } - }, - "@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true - }, - "@jridgewell/trace-mapping": { - "version": "0.3.17", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", - "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", - "dev": true, - "requires": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" - } - }, - "@jsdoc/salty": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@jsdoc/salty/-/salty-0.2.1.tgz", - "integrity": "sha512-JXwylDNSHa549N9uceDYu8D4GMXwSo3H8CCPYEQqxhhHpxD28+lRl2b3bS/caaPj5w1YD3SWtrficJNTnUjGpg==", - "dev": true, - "requires": { - "lodash": "^4.17.21" - } - }, - "@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - } - }, - "@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true - }, - "@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "requires": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - } - }, - "@pnpm/network.ca-file": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@pnpm/network.ca-file/-/network.ca-file-1.0.1.tgz", - "integrity": "sha512-gkINruT2KUhZLTaiHxwCOh1O4NVnFT0wLjWFBHmTz9vpKag/C/noIMJXBxFe4F0mYpUVX2puLwAieLYFg2NvoA==", - "dev": true, - "requires": { - "graceful-fs": "4.2.10" - }, - "dependencies": { - "graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", - "dev": true - } - } - }, - "@pnpm/npm-conf": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-1.0.4.tgz", - "integrity": "sha512-o5YFq/+ksEJMbSzzkaQDHlp00aonLDU5xNPVTRL12hTWBbVSSeWXxPukq75h+mvXnoOWT95vV2u1HSTw2C4XOw==", - "dev": true, - "requires": { - "@pnpm/network.ca-file": "^1.0.1", - "config-chain": "^1.1.11" - } - }, - "@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" - }, - "@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" - }, - "@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" - }, - "@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" - }, - "@protobufjs/fetch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", - "requires": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" - } - }, - "@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" - }, - "@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" - }, - "@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" - }, - "@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" - }, - "@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" - }, - "@sindresorhus/is": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", - "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", - "dev": true - }, - "@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", - "dev": true, - "requires": { - "type-detect": "4.0.8" - } - }, - "@sinonjs/fake-timers": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-7.1.2.tgz", - "integrity": "sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.0" - } - }, - "@sinonjs/samsam": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-7.0.1.tgz", - "integrity": "sha512-zsAk2Jkiq89mhZovB2LLOdTCxJF4hqqTToGP0ASWlhp4I1hqOjcfmZGafXntCN7MDC6yySH0mFHrYtHceOeLmw==", - "dev": true, - "requires": { - "@sinonjs/commons": "^2.0.0", - "lodash.get": "^4.4.2", - "type-detect": "^4.0.8" - }, - "dependencies": { - "@sinonjs/commons": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", - "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", - "dev": true, - "requires": { - "type-detect": "4.0.8" - } - } - } - }, - "@sinonjs/text-encoding": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.2.tgz", - "integrity": "sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==", - "dev": true - }, - "@szmarczak/http-timer": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", - "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", - "dev": true, - "requires": { - "defer-to-connect": "^1.0.1" - } - }, - "@types/cacheable-request": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.2.tgz", - "integrity": "sha512-B3xVo+dlKM6nnKTcmm5ZtY/OL8bOAOd2Olee9M1zft65ox50OzjEHW91sDiU9j6cvW8Ejg1/Qkf4xd2kugApUA==", - "dev": true, - "requires": { - "@types/http-cache-semantics": "*", - "@types/keyv": "*", - "@types/node": "*", - "@types/responselike": "*" - } - }, - "@types/eslint": { - "version": "8.21.3", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.21.3.tgz", - "integrity": "sha512-fa7GkppZVEByMWGbTtE5MbmXWJTVbrjjaS8K6uQj+XtuuUv1fsuPAxhygfqLmsb/Ufb3CV8deFCpiMfAgi00Sw==", - "dev": true, - "requires": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "@types/eslint-scope": { - "version": "3.7.4", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz", - "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", - "dev": true, - "requires": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, - "@types/estree": { - "version": "0.0.51", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", - "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", - "dev": true - }, - "@types/http-cache-semantics": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", - "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==", - "dev": true - }, - "@types/istanbul-lib-coverage": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", - "integrity": "sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw==", - "dev": true - }, - "@types/json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha512-3YP80IxxFJB4b5tYC2SUPwkg0XQLiu0nWvhRgEatgjf+29IcWO9X1k8xRv5DGssJ/lCrjYTjQPcobJr2yWIVuQ==", - "dev": true - }, - "@types/json-schema": { - "version": "7.0.7", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz", - "integrity": "sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==", - "dev": true - }, - "@types/keyv": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", - "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/linkify-it": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-3.0.2.tgz", - "integrity": "sha512-HZQYqbiFVWufzCwexrvh694SOim8z2d+xJl5UNamcvQFejLY/2YUtzXHYi3cHdI7PMlS8ejH2slRAOJQ32aNbA==", - "dev": true - }, - "@types/long": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", - "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" - }, - "@types/markdown-it": { - "version": "12.2.3", - "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-12.2.3.tgz", - "integrity": "sha512-GKMHFfv3458yYy+v/N8gjufHO6MSZKCOXpZc5GXIWWy8uldwfmPn98vp81gZ5f9SVw8YYBctgfJ22a2d7AOMeQ==", - "dev": true, - "requires": { - "@types/linkify-it": "*", - "@types/mdurl": "*" - } - }, - "@types/mdurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-1.0.2.tgz", - "integrity": "sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA==", - "dev": true - }, - "@types/minimist": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.1.tgz", - "integrity": "sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg==", - "dev": true - }, - "@types/mocha": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.0.0.tgz", - "integrity": "sha512-scN0hAWyLVAvLR9AyW7HoFF5sJZglyBsbPuHO4fv7JRvfmPBMfp1ozWqOf/e4wwPNxezBZXRfWzMb6iFLgEVRA==", - "dev": true - }, - "@types/node": { - "version": "18.11.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz", - "integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==" - }, - "@types/normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==", - "dev": true - }, - "@types/responselike": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz", - "integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/sinon": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.1.tgz", - "integrity": "sha512-tZulsvuJwif5ddTBtscflI7gJcd+RpENcNZ7QCp0jKEl0bZY3Pu6PbJs4GR3SfQkGgsUa+FrlKsKQ0XyGNvDuA==", - "dev": true, - "requires": { - "@sinonjs/fake-timers": "^7.1.0" - } - }, - "@typescript-eslint/eslint-plugin": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.33.0.tgz", - "integrity": "sha512-aINiAxGVdOl1eJyVjaWn/YcVAq4Gi/Yo35qHGCnqbWVz61g39D0h23veY/MA0rFFGfxK7TySg2uwDeNv+JgVpg==", - "dev": true, - "requires": { - "@typescript-eslint/experimental-utils": "4.33.0", - "@typescript-eslint/scope-manager": "4.33.0", - "debug": "^4.3.1", - "functional-red-black-tree": "^1.0.1", - "ignore": "^5.1.8", - "regexpp": "^3.1.0", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/experimental-utils": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz", - "integrity": "sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.33.0", - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/typescript-estree": "4.33.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" - } - }, - "@typescript-eslint/parser": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.33.0.tgz", - "integrity": "sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA==", - "dev": true, - "requires": { - "@typescript-eslint/scope-manager": "4.33.0", - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/typescript-estree": "4.33.0", - "debug": "^4.3.1" - } - }, - "@typescript-eslint/scope-manager": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz", - "integrity": "sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ==", - "dev": true, - "requires": { - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/visitor-keys": "4.33.0" - } - }, - "@typescript-eslint/types": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.33.0.tgz", - "integrity": "sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz", - "integrity": "sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA==", - "dev": true, - "requires": { - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/visitor-keys": "4.33.0", - "debug": "^4.3.1", - "globby": "^11.0.3", - "is-glob": "^4.0.1", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz", - "integrity": "sha512-uqi/2aSz9g2ftcHWf8uLPJA70rUv6yuMW5Bohw+bwcuzaxQIHaKFZCKGoGXIrc9vkTJ3+0txM73K0Hq3d5wgIg==", - "dev": true, - "requires": { - "@typescript-eslint/types": "4.33.0", - "eslint-visitor-keys": "^2.0.0" - } - }, - "@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true - }, - "@webassemblyjs/ast": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", - "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", - "dev": true, - "requires": { - "@webassemblyjs/helper-numbers": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1" - } - }, - "@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", - "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==", - "dev": true - }, - "@webassemblyjs/helper-api-error": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", - "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==", - "dev": true - }, - "@webassemblyjs/helper-buffer": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", - "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==", - "dev": true - }, - "@webassemblyjs/helper-numbers": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", - "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", - "dev": true, - "requires": { - "@webassemblyjs/floating-point-hex-parser": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", - "@xtuc/long": "4.2.2" - } - }, - "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", - "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==", - "dev": true - }, - "@webassemblyjs/helper-wasm-section": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", - "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1" - } - }, - "@webassemblyjs/ieee754": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", - "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", - "dev": true, - "requires": { - "@xtuc/ieee754": "^1.2.0" - } - }, - "@webassemblyjs/leb128": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", - "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", - "dev": true, - "requires": { - "@xtuc/long": "4.2.2" - } - }, - "@webassemblyjs/utf8": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", - "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==", - "dev": true - }, - "@webassemblyjs/wasm-edit": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", - "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/helper-wasm-section": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-opt": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", - "@webassemblyjs/wast-printer": "1.11.1" - } - }, - "@webassemblyjs/wasm-gen": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", - "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" - } - }, - "@webassemblyjs/wasm-opt": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", - "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1" - } - }, - "@webassemblyjs/wasm-parser": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", - "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" - } - }, - "@webassemblyjs/wast-printer": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", - "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.11.1", - "@xtuc/long": "4.2.2" - } - }, - "@webpack-cli/configtest": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.0.1.tgz", - "integrity": "sha512-njsdJXJSiS2iNbQVS0eT8A/KPnmyH4pv1APj2K0d1wrZcBLw+yppxOy4CGqa0OxDJkzfL/XELDhD8rocnIwB5A==", - "dev": true - }, - "@webpack-cli/info": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.1.tgz", - "integrity": "sha512-fE1UEWTwsAxRhrJNikE7v4EotYflkEhBL7EbajfkPlf6E37/2QshOy/D48Mw8G5XMFlQtS6YV42vtbG9zBpIQA==", - "dev": true - }, - "@webpack-cli/serve": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.1.tgz", - "integrity": "sha512-0G7tNyS+yW8TdgHwZKlDWYXFA6OJQnoLCQvYKkQP0Q2X205PSQ6RNUj0M+1OB/9gRQaUZ/ccYfaxd0nhaWKfjw==", - "dev": true - }, - "@xtuc/ieee754": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true - }, - "@xtuc/long": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", - "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "dev": true - }, - "abort-controller": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", - "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", - "requires": { - "event-target-shim": "^5.0.0" - } - }, - "acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true - }, - "acorn-import-assertions": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", - "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", - "dev": true - }, - "acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==" - }, - "agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "requires": { - "debug": "4" - } - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true - }, - "ansi-align": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz", - "integrity": "sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw==", - "dev": true, - "requires": { - "string-width": "^3.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true - }, - "ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dev": true, - "requires": { - "type-fest": "^0.21.3" - }, - "dependencies": { - "type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true - } - } - }, - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" - } - }, - "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true - }, - "arrify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", - "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==" - }, - "astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" - }, - "big.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", - "dev": true - }, - "bignumber.js": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.0.tgz", - "integrity": "sha512-4LwHK4nfDOraBCtst+wOWIHbu1vhvAPJK8g8nROd4iuc3PSEjWif/qwbkh8jwCJz6yDBvtU4KPynETgrfh7y3A==" - }, - "binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true - }, - "bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true - }, - "boxen": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.0.1.tgz", - "integrity": "sha512-49VBlw+PrWEF51aCmy7QIteYPIFZxSpvqBdP/2itCPPlJ49kj9zg/XPRFrdkne2W+CfwXUls8exMvu1RysZpKA==", - "dev": true, - "requires": { - "ansi-align": "^3.0.0", - "camelcase": "^6.2.0", - "chalk": "^4.1.0", - "cli-boxes": "^2.2.1", - "string-width": "^4.2.0", - "type-fest": "^0.20.2", - "widest-line": "^3.1.0", - "wrap-ansi": "^7.0.0" - }, - "dependencies": { - "camelcase": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", - "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", - "dev": true - }, - "chalk": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", - "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - } - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "browserslist": { - "version": "4.21.5", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz", - "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001449", - "electron-to-chromium": "^1.4.284", - "node-releases": "^2.0.8", - "update-browserslist-db": "^1.0.10" - } - }, - "buffer-equal-constant-time": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" - }, - "buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "c8": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/c8/-/c8-7.7.2.tgz", - "integrity": "sha512-8AqNnUMxB3hsgYCYso2GJjlwnaNPlrEEbYbCQb7N76V1nrOgCKXiTcE3gXU18rIj0FeduPywROrIBMC7XAKApg==", - "dev": true, - "requires": { - "@bcoe/v8-coverage": "^0.2.3", - "@istanbuljs/schema": "^0.1.2", - "find-up": "^5.0.0", - "foreground-child": "^2.0.0", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-reports": "^3.0.2", - "rimraf": "^3.0.0", - "test-exclude": "^6.0.0", - "v8-to-istanbul": "^7.1.0", - "yargs": "^16.2.0", - "yargs-parser": "^20.2.7" - }, - "dependencies": { - "find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "requires": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "requires": { - "p-locate": "^5.0.0" - } - }, - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "requires": { - "yocto-queue": "^0.1.0" - } - }, - "p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "requires": { - "p-limit": "^3.0.2" - } - } - } - }, - "cacheable-lookup": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-6.0.4.tgz", - "integrity": "sha512-mbcDEZCkv2CZF4G01kr8eBd/5agkt9oCqz75tJMSIsquvRZ2sL6Hi5zGVKi/0OSC9oO1GHfJ2AV0ZIOY9vye0A==", - "dev": true - }, - "cacheable-request": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", - "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", - "dev": true, - "requires": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^3.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^4.1.0", - "responselike": "^1.0.2" - }, - "dependencies": { - "get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true - } - } - }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "camelcase-keys": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", - "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", - "dev": true, - "requires": { - "camelcase": "^5.3.1", - "map-obj": "^4.0.0", - "quick-lru": "^4.0.1" - } - }, - "caniuse-lite": { - "version": "1.0.30001470", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001470.tgz", - "integrity": "sha512-065uNwY6QtHCBOExzbV6m236DDhYCCtPmQUCoQtwkVqzud8v5QPidoMr6CoMkC2nfp6nksjttqWQRRh75LqUmA==", - "dev": true - }, - "catharsis": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.9.0.tgz", - "integrity": "sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A==", - "dev": true, - "requires": { - "lodash": "^4.17.15" - } - }, - "chalk": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz", - "integrity": "sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", - "dev": true - }, - "chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "requires": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "fsevents": "~2.3.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - } - }, - "chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "dev": true - }, - "chrome-trace-event": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", - "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", - "dev": true - }, - "ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", - "dev": true - }, - "cli-boxes": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", - "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", - "dev": true - }, - "cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "dev": true, - "requires": { - "restore-cursor": "^3.1.0" - } - }, - "cli-width": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", - "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", - "dev": true - }, - "cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "clone-deep": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", - "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.2", - "shallow-clone": "^3.0.0" - } - }, - "clone-response": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", - "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", - "dev": true, - "requires": { - "mimic-response": "^1.0.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "compress-brotli": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/compress-brotli/-/compress-brotli-1.3.8.tgz", - "integrity": "sha512-lVcQsjhxhIXsuupfy9fmZUFtAIdBmXA7EGY6GBdgZ++qkM9zG4YFT8iU7FoBxzryNDMOpD1HIFHUSX4D87oqhQ==", - "dev": true, - "requires": { - "@types/json-buffer": "~3.0.0", - "json-buffer": "~3.0.1" - }, - "dependencies": { - "json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true - } - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "config-chain": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", - "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", - "dev": true, - "requires": { - "ini": "^1.3.4", - "proto-list": "~1.2.1" - }, - "dependencies": { - "ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - } - } - }, - "configstore": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", - "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", - "dev": true, - "requires": { - "dot-prop": "^5.2.0", - "graceful-fs": "^4.1.2", - "make-dir": "^3.0.0", - "unique-string": "^2.0.0", - "write-file-atomic": "^3.0.0", - "xdg-basedir": "^4.0.0" - } - }, - "convert-source-map": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", - "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } - } - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "crypto-random-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", - "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", - "dev": true - }, - "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", - "requires": { - "ms": "2.1.2" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "decamelize-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", - "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", - "dev": true, - "requires": { - "decamelize": "^1.1.0", - "map-obj": "^1.0.0" - }, - "dependencies": { - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true - } - } - }, - "decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", - "dev": true, - "requires": { - "mimic-response": "^1.0.0" - } - }, - "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true - }, - "deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" - }, - "defer-to-connect": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", - "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", - "dev": true - }, - "diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", - "dev": true - }, - "dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "requires": { - "path-type": "^4.0.0" - } - }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "dom-serializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", - "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", - "dev": true, - "requires": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "entities": "^4.2.0" - }, - "dependencies": { - "entities": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.3.1.tgz", - "integrity": "sha512-o4q/dYJlmyjP2zfnaWDUC6A3BQFmVTX+tZPezK7k0GLSU9QYCauscf5Y+qcEPzKL+EixVouYDgLQK5H9GrLpkg==", - "dev": true - } - } - }, - "domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "dev": true - }, - "domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", - "dev": true, - "requires": { - "domelementtype": "^2.3.0" - } - }, - "domutils": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.0.1.tgz", - "integrity": "sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q==", - "dev": true, - "requires": { - "dom-serializer": "^2.0.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.1" - } - }, - "dot-prop": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", - "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", - "dev": true, - "requires": { - "is-obj": "^2.0.0" - } - }, - "duplexer3": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", - "dev": true - }, - "duplexify": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.2.tgz", - "integrity": "sha512-fz3OjcNCHmRP12MJoZMPglx8m4rrFP8rovnk4vT8Fs+aonZoCwGg10dSsQsfP/E62eZcPTMSMP6686fu9Qlqtw==", - "requires": { - "end-of-stream": "^1.4.1", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1", - "stream-shift": "^1.0.0" - } - }, - "eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true - }, - "ecdsa-sig-formatter": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", - "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "electron-to-chromium": { - "version": "1.4.341", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.341.tgz", - "integrity": "sha512-R4A8VfUBQY9WmAhuqY5tjHRf5fH2AAf6vqitBOE0y6u2PgHgqHSrhZmu78dIX3fVZtjqlwJNX1i2zwC3VpHtQQ==", - "dev": true - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "emojis-list": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", - "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", - "dev": true - }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "requires": { - "once": "^1.4.0" - } - }, - "enhanced-resolve": { - "version": "5.8.2", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.2.tgz", - "integrity": "sha512-F27oB3WuHDzvR2DOGNTaYy0D5o0cnrv8TeI482VM4kYgQd/FT9lUQwuNsJ0oOHtBUq7eiW5ytqzp7nBFknL+GA==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - } - }, - "enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "dev": true, - "requires": { - "ansi-colors": "^4.1.1" - } - }, - "entities": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", - "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", - "dev": true - }, - "envinfo": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", - "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", - "dev": true - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es-module-lexer": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", - "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", - "dev": true - }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" - }, - "escape-goat": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", - "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", - "dev": true - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "dev": true - }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true - }, - "escodegen": { - "version": "1.14.3", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz", - "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==", - "requires": { - "esprima": "^4.0.1", - "estraverse": "^4.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.6.1" - }, - "dependencies": { - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - } - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==" - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", - "requires": { - "prelude-ls": "~1.1.2" - } - } - } - }, - "eslint": { - "version": "7.32.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", - "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", - "dev": true, - "requires": { - "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.3", - "@humanwhocodes/config-array": "^0.5.0", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "enquirer": "^2.3.5", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.1.2", - "globals": "^13.6.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.0.4", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", - "strip-json-comments": "^3.1.0", - "table": "^6.0.9", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - }, - "dependencies": { - "eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - } - } - }, - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true - } - } - }, - "eslint-config-prettier": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-7.2.0.tgz", - "integrity": "sha512-rV4Qu0C3nfJKPOAhFujFxB7RMP+URFyQqqOZW9DMRD7ZDTFyjaIlETU3xzHELt++4ugC0+Jm084HQYkkJe+Ivg==", - "dev": true - }, - "eslint-plugin-es": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz", - "integrity": "sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==", - "dev": true, - "requires": { - "eslint-utils": "^2.0.0", - "regexpp": "^3.0.0" - }, - "dependencies": { - "eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - } - }, - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - } - } - }, - "eslint-plugin-node": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz", - "integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==", - "dev": true, - "requires": { - "eslint-plugin-es": "^3.0.0", - "eslint-utils": "^2.0.0", - "ignore": "^5.1.1", - "minimatch": "^3.0.4", - "resolve": "^1.10.1", - "semver": "^6.1.0" - }, - "dependencies": { - "eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - } - }, - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "eslint-plugin-prettier": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.1.tgz", - "integrity": "sha512-htg25EUYUeIhKHXjOinK4BgCcDwtLHjqaxCDsMy5nbnUMkKFvIhMVCp+5GFUXQ4Nr8lBsPqtGAqBenbpFqAA2g==", - "dev": true, - "requires": { - "prettier-linter-helpers": "^1.0.0" - } - }, - "eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "dependencies": { - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - } - } - }, - "eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^2.0.0" - } - }, - "eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true - }, - "espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", - "dev": true, - "requires": { - "acorn": "^7.4.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - } - } - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" - }, - "esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", - "dev": true, - "requires": { - "estraverse": "^5.1.0" - } - }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "requires": { - "estraverse": "^5.2.0" - }, - "dependencies": { - "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true - } - } - }, - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==" - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" - }, - "event-target-shim": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", - "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==" - }, - "events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true - }, - "execa": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.0.0.tgz", - "integrity": "sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" - }, - "external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", - "dev": true, - "requires": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - } - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "fast-diff": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", - "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", - "dev": true - }, - "fast-glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", - "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - } - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" - }, - "fast-text-encoding": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/fast-text-encoding/-/fast-text-encoding-1.0.6.tgz", - "integrity": "sha512-VhXlQgj9ioXCqGstD37E/HBeqEGV/qOD/kmbVG8h5xKBYvM1L3lR1Zn4555cQ8GkYbJa8aJSipLPndE1k6zK2w==" - }, - "fastest-levenshtein": { - "version": "1.0.16", - "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", - "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", - "dev": true - }, - "fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", - "dev": true, - "requires": { - "reusify": "^1.0.4" - } - }, - "figures": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", - "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - }, - "dependencies": { - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - } - } - }, - "file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "requires": { - "flat-cache": "^3.0.4" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true - }, - "flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, - "requires": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - } - }, - "flatted": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz", - "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", - "dev": true - }, - "foreground-child": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", - "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.0", - "signal-exit": "^3.0.2" - } - }, - "form-data-encoder": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-1.7.1.tgz", - "integrity": "sha512-EFRDrsMm/kyqbTQocNvRXMLjc7Es2Vk+IQFx/YW7hkUH1eBl4J1fqiP34l74Yt0pFLCNpc06fkbVk00008mzjg==", - "dev": true - }, - "fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "dev": true, - "requires": { - "minipass": "^3.0.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "optional": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, - "gaxios": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-5.0.2.tgz", - "integrity": "sha512-TjtV2AJOZoMQqRYoy5eM8cCQogYwazWNYLQ72QB0kwa6vHHruYkGmhhyrlzbmgNHK1dNnuP2WSH81urfzyN2Og==", - "requires": { - "extend": "^3.0.2", - "https-proxy-agent": "^5.0.0", - "is-stream": "^2.0.0", - "node-fetch": "^2.6.7" - } - }, - "gcp-metadata": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-5.0.1.tgz", - "integrity": "sha512-jiRJ+Fk7e8FH68Z6TLaqwea307OktJpDjmYnU7/li6ziwvVvU2RlrCyQo5vkdeP94chm0kcSCOOszvmuaioq3g==", - "requires": { - "gaxios": "^5.0.0", - "json-bigint": "^1.0.0" - } - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" - }, - "get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true - }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true - }, - "global-dirs": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", - "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", - "dev": true, - "requires": { - "ini": "2.0.0" - } - }, - "globals": { - "version": "13.15.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.15.0.tgz", - "integrity": "sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog==", - "dev": true, - "requires": { - "type-fest": "^0.20.2" - } - }, - "globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "requires": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - } - }, - "google-auth-library": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-8.7.0.tgz", - "integrity": "sha512-1M0NG5VDIvJZEnstHbRdckLZESoJwguinwN8Dhae0j2ZKIQFIV63zxm6Fo6nM4xkgqUr2bbMtV5Dgo+Hy6oo0Q==", - "requires": { - "arrify": "^2.0.0", - "base64-js": "^1.3.0", - "ecdsa-sig-formatter": "^1.0.11", - "fast-text-encoding": "^1.0.0", - "gaxios": "^5.0.0", - "gcp-metadata": "^5.0.0", - "gtoken": "^6.1.0", - "jws": "^4.0.0", - "lru-cache": "^6.0.0" - } - }, - "google-gax": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-3.5.2.tgz", - "integrity": "sha512-AyP53w0gHcWlzxm+jSgqCR3Xu4Ld7EpSjhtNBnNhzwwWaIUyphH9kBGNIEH+i4UGkTUXOY29K/Re8EiAvkBRGw==", - "requires": { - "@grpc/grpc-js": "~1.7.0", - "@grpc/proto-loader": "^0.7.0", - "@types/long": "^4.0.0", - "abort-controller": "^3.0.0", - "duplexify": "^4.0.0", - "fast-text-encoding": "^1.0.3", - "google-auth-library": "^8.0.2", - "is-stream-ended": "^0.1.4", - "node-fetch": "^2.6.1", - "object-hash": "^3.0.0", - "proto3-json-serializer": "^1.0.0", - "protobufjs": "7.1.2", - "protobufjs-cli": "1.0.2", - "retry-request": "^5.0.0" - } - }, - "google-p12-pem": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-4.0.1.tgz", - "integrity": "sha512-WPkN4yGtz05WZ5EhtlxNDWPhC4JIic6G8ePitwUWy4l+XPVYec+a0j0Ts47PDtW59y3RwAhUd9/h9ZZ63px6RQ==", - "requires": { - "node-forge": "^1.3.1" - } - }, - "got": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", - "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", - "dev": true, - "requires": { - "@sindresorhus/is": "^0.14.0", - "@szmarczak/http-timer": "^1.1.2", - "cacheable-request": "^6.0.0", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^4.1.0", - "lowercase-keys": "^1.0.1", - "mimic-response": "^1.0.1", - "p-cancelable": "^1.0.0", - "to-readable-stream": "^1.0.0", - "url-parse-lax": "^3.0.0" - }, - "dependencies": { - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - } - } - }, - "graceful-fs": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", - "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", - "dev": true - }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true - }, - "gtoken": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-6.1.2.tgz", - "integrity": "sha512-4ccGpzz7YAr7lxrT2neugmXQ3hP9ho2gcaityLVkiUecAiwiy60Ii8gRbZeOsXV19fYaRjgBSshs8kXw+NKCPQ==", - "requires": { - "gaxios": "^5.0.1", - "google-p12-pem": "^4.0.0", - "jws": "^4.0.0" - } - }, - "gts": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/gts/-/gts-3.1.0.tgz", - "integrity": "sha512-Pbj3ob1VR1IRlEVEBNtKoQ1wHOa8cZz62KEojK8Fn/qeS2ClWI4gLNfhek3lD68aZSmUEg8TFb6AHXIwUMgyqQ==", - "dev": true, - "requires": { - "@typescript-eslint/eslint-plugin": "^4.2.0", - "@typescript-eslint/parser": "^4.2.0", - "chalk": "^4.1.0", - "eslint": "^7.10.0", - "eslint-config-prettier": "^7.0.0", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.1.4", - "execa": "^5.0.0", - "inquirer": "^7.3.3", - "json5": "^2.1.3", - "meow": "^9.0.0", - "ncp": "^2.0.0", - "prettier": "^2.1.2", - "rimraf": "^3.0.2", - "update-notifier": "^5.0.0", - "write-file-atomic": "^3.0.3" - }, - "dependencies": { - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - } - } - }, - "hard-rejection": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", - "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", - "dev": true - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "has-yarn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", - "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", - "dev": true - }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true - }, - "hosted-git-info": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.0.2.tgz", - "integrity": "sha512-c9OGXbZ3guC/xOlCg1Ci/VgWlwsqDv1yMQL1CWqXDL0hDjXuNcq0zuR4xqPSuasI3kqFDhqSyTjREz5gzq0fXg==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true - }, - "htmlparser2": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.1.tgz", - "integrity": "sha512-4lVbmc1diZC7GUJQtRQ5yBAeUCL1exyMwmForWkRLnwyzWBFxN633SALPMGYaWZvKe9j1pRZJpauvmxENSp/EA==", - "dev": true, - "requires": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "domutils": "^3.0.1", - "entities": "^4.3.0" - }, - "dependencies": { - "entities": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.3.1.tgz", - "integrity": "sha512-o4q/dYJlmyjP2zfnaWDUC6A3BQFmVTX+tZPezK7k0GLSU9QYCauscf5Y+qcEPzKL+EixVouYDgLQK5H9GrLpkg==", - "dev": true - } - } - }, - "http-cache-semantics": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", - "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", - "dev": true - }, - "http2-wrapper": { - "version": "2.1.11", - "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.1.11.tgz", - "integrity": "sha512-aNAk5JzLturWEUiuhAN73Jcbq96R7rTitAoXV54FYMatvihnpD2+6PUgU4ce3D/m5VDbw+F5CsyKSF176ptitQ==", - "dev": true, - "requires": { - "quick-lru": "^5.1.1", - "resolve-alpn": "^1.2.0" - }, - "dependencies": { - "quick-lru": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", - "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", - "dev": true - } - } - }, - "https-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", - "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", - "requires": { - "agent-base": "6", - "debug": "4" - } - }, - "human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true - }, - "ignore-walk": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.4.tgz", - "integrity": "sha512-PY6Ii8o1jMRA1z4F2hRkH/xN59ox43DavKvD3oDpfurRlOJyAHpifIwpbdv1n4jt4ov0jSpw3kQ4GhJnpBL6WQ==", - "dev": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } - }, - "import-lazy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", - "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", - "dev": true - }, - "import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", - "dev": true, - "requires": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, - "indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "ini": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", - "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", - "dev": true - }, - "inquirer": { - "version": "7.3.3", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz", - "integrity": "sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==", - "dev": true, - "requires": { - "ansi-escapes": "^4.2.1", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-width": "^3.0.0", - "external-editor": "^3.0.3", - "figures": "^3.0.0", - "lodash": "^4.17.19", - "mute-stream": "0.0.8", - "run-async": "^2.4.0", - "rxjs": "^6.6.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0", - "through": "^2.3.6" - }, - "dependencies": { - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - } - } - }, - "interpret": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", - "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", - "dev": true - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-ci": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", - "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", - "dev": true, - "requires": { - "ci-info": "^2.0.0" - } - }, - "is-core-module": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.4.0.tgz", - "integrity": "sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-installed-globally": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", - "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", - "dev": true, - "requires": { - "global-dirs": "^3.0.0", - "is-path-inside": "^3.0.2" - } - }, - "is-npm": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz", - "integrity": "sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==", - "dev": true - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "is-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", - "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", - "dev": true - }, - "is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true - }, - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", - "dev": true - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==" - }, - "is-stream-ended": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-stream-ended/-/is-stream-ended-0.1.4.tgz", - "integrity": "sha512-xj0XPvmr7bQFTvirqnFr50o0hQIh6ZItDqloxt5aJrR4NQsYeSsyFQERYGCAzfindAcnKjINnwEEgLx4IqVzQw==" - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true - }, - "is-yarn-global": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", - "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", - "dev": true - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", - "dev": true - }, - "istanbul-lib-coverage": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", - "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", - "dev": true - }, - "istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", - "dev": true, - "requires": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", - "supports-color": "^7.1.0" - } - }, - "istanbul-reports": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", - "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", - "dev": true, - "requires": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - } - }, - "jest-worker": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", - "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", - "dev": true, - "requires": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "dependencies": { - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "js2xmlparser": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.2.tgz", - "integrity": "sha512-6n4D8gLlLf1n5mNLQPRfViYzu9RATblzPEtm1SthMX1Pjao0r9YI9nw7ZIfRxQMERS87mcswrg+r/OYrPRX6jA==", - "dev": true, - "requires": { - "xmlcreate": "^2.0.4" - } - }, - "jsdoc": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-4.0.0.tgz", - "integrity": "sha512-tzTgkklbWKrlaQL2+e3NNgLcZu3NaK2vsHRx7tyHQ+H5jcB9Gx0txSd2eJWlMC/xU1+7LQu4s58Ry0RkuaEQVg==", - "dev": true, - "requires": { - "@babel/parser": "^7.9.4", - "@jsdoc/salty": "^0.2.1", - "@types/markdown-it": "^12.2.3", - "bluebird": "^3.7.2", - "catharsis": "^0.9.0", - "escape-string-regexp": "^2.0.0", - "js2xmlparser": "^4.0.2", - "klaw": "^3.0.0", - "markdown-it": "^12.3.2", - "markdown-it-anchor": "^8.4.1", - "marked": "^4.0.10", - "mkdirp": "^1.0.4", - "requizzle": "^0.2.3", - "strip-json-comments": "^3.1.0", - "underscore": "~1.13.2" - }, - "dependencies": { - "escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true - } - } - }, - "jsdoc-fresh": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/jsdoc-fresh/-/jsdoc-fresh-2.0.0.tgz", - "integrity": "sha512-KNQ3gjqHP3AEctcwPBNNdeArkpvcR0i1d4DrpnzohK5EdOcCKzedBvt5kDjUPvaJ/oF+W5bey2IW+xpiS5nEfQ==", - "dev": true, - "requires": { - "taffydb": "^2.7.3" - }, - "dependencies": { - "taffydb": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.7.3.tgz", - "integrity": "sha1-KtNxaWKUmPylvIQkMJbTzeDsOjQ=", - "dev": true - } - } - }, - "jsdoc-region-tag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/jsdoc-region-tag/-/jsdoc-region-tag-2.0.0.tgz", - "integrity": "sha512-CwoEF5zALHVjhV5EtyH5QXhq+vblT6YOOatyBXug4fTwSgd9GyyKeUuBl6NJVpRFtIJ+/xS+X4vCnD5qsqgYZQ==", - "dev": true, - "requires": { - "glob": "^7.1.6" - } - }, - "json-bigint": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", - "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", - "requires": { - "bignumber.js": "^9.0.0" - } - }, - "json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", - "dev": true - }, - "json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true - }, - "json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "just-extend": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", - "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", - "dev": true - }, - "jwa": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz", - "integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==", - "requires": { - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" - } - }, - "jws": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", - "integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==", - "requires": { - "jwa": "^2.0.0", - "safe-buffer": "^5.0.1" - } - }, - "keyv": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", - "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", - "dev": true, - "requires": { - "json-buffer": "3.0.0" - } - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true - }, - "klaw": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz", - "integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.9" - } - }, - "latest-version": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", - "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", - "dev": true, - "requires": { - "package-json": "^6.3.0" - } - }, - "levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - } - }, - "lines-and-columns": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", - "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", - "dev": true - }, - "linkify-it": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz", - "integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==", - "dev": true, - "requires": { - "uc.micro": "^1.0.1" - } - }, - "linkinator": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/linkinator/-/linkinator-4.0.0.tgz", - "integrity": "sha512-NKJmdp90A8/UYiWy4f0FzcBFoA9ntfUPKrvDJqevos5Are9O9KgEGcZKARmN+ZYWsioySQFlS5ySiYxvDxNtQA==", - "dev": true, - "requires": { - "chalk": "^5.0.0", - "escape-html": "^1.0.3", - "gaxios": "^5.0.0", - "glob": "^8.0.1", - "htmlparser2": "^8.0.1", - "marked": "^4.0.3", - "meow": "^10.1.1", - "mime": "^3.0.0", - "server-destroy": "^1.0.1", - "update-notifier": "^6.0.0" - }, - "dependencies": { - "@sindresorhus/is": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", - "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", - "dev": true - }, - "@szmarczak/http-timer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz", - "integrity": "sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==", - "dev": true, - "requires": { - "defer-to-connect": "^2.0.1" - } - }, - "@types/minimist": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", - "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", - "dev": true - }, - "ansi-align": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", - "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", - "dev": true, - "requires": { - "string-width": "^4.1.0" - }, - "dependencies": { - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - } - } - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "ansi-styles": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.1.0.tgz", - "integrity": "sha512-VbqNsoz55SYGczauuup0MFUyXNQviSpFTj1RQtFzmQLk18qbVSpTFFGMT293rmDaQuKCT6InmbuEyUne4mTuxQ==", - "dev": true - }, - "boxen": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-7.0.0.tgz", - "integrity": "sha512-j//dBVuyacJbvW+tvZ9HuH03fZ46QcaKvvhZickZqtB271DxJ7SNRSNxrV/dZX0085m7hISRZWbzWlJvx/rHSg==", - "dev": true, - "requires": { - "ansi-align": "^3.0.1", - "camelcase": "^7.0.0", - "chalk": "^5.0.1", - "cli-boxes": "^3.0.0", - "string-width": "^5.1.2", - "type-fest": "^2.13.0", - "widest-line": "^4.0.1", - "wrap-ansi": "^8.0.1" - }, - "dependencies": { - "camelcase": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.0.tgz", - "integrity": "sha512-JToIvOmz6nhGsUhAYScbo2d6Py5wojjNfoxoc2mEVLUdJ70gJK2gnd+ABY1Tc3sVMyK7QDPtN0T/XdlCQWITyQ==", - "dev": true - }, - "type-fest": { - "version": "2.16.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.16.0.tgz", - "integrity": "sha512-qpaThT2HQkFb83gMOrdKVsfCN7LKxP26Yq+smPzY1FqoHRjqmjqHXA7n5Gkxi8efirtbeEUxzfEdePthQWCuHw==", - "dev": true - } - } - }, - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0" - } - }, - "cacheable-request": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz", - "integrity": "sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==", - "dev": true, - "requires": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^4.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^6.0.1", - "responselike": "^2.0.0" - }, - "dependencies": { - "get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true - } - } - }, - "camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true - }, - "camelcase-keys": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-7.0.2.tgz", - "integrity": "sha512-Rjs1H+A9R+Ig+4E/9oyB66UC5Mj9Xq3N//vcLf2WzgdTi/3gUu3Z9KoqmlrEG4VuuLK8wJHofxzdQXz/knhiYg==", - "dev": true, - "requires": { - "camelcase": "^6.3.0", - "map-obj": "^4.1.0", - "quick-lru": "^5.1.1", - "type-fest": "^1.2.1" - } - }, - "chalk": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.0.1.tgz", - "integrity": "sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w==", - "dev": true - }, - "ci-info": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.2.tgz", - "integrity": "sha512-xmDt/QIAdeZ9+nfdPsaBCpMvHNLFiLdjj59qjqn+6iPe6YmHGQ35sBnQ8uslRBXFmXkiZQOJRjvQeoGppoTjjg==", - "dev": true - }, - "cli-boxes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz", - "integrity": "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==", - "dev": true - }, - "configstore": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-6.0.0.tgz", - "integrity": "sha512-cD31W1v3GqUlQvbBCGcXmd2Nj9SvLDOP1oQ0YFuLETufzSPaKp11rYBsSOm7rCsW3OnIRAFM3OxRhceaXNYHkA==", - "dev": true, - "requires": { - "dot-prop": "^6.0.1", - "graceful-fs": "^4.2.6", - "unique-string": "^3.0.0", - "write-file-atomic": "^3.0.3", - "xdg-basedir": "^5.0.1" - } - }, - "crypto-random-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-4.0.0.tgz", - "integrity": "sha512-x8dy3RnvYdlUcPOjkEHqozhiwzKNSq7GcPuXFbnyMOCHxX8V3OgIg/pYuabl2sbUPfIJaeAQB7PMOK8DFIdoRA==", - "dev": true, - "requires": { - "type-fest": "^1.0.1" - } - }, - "decamelize": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-5.0.1.tgz", - "integrity": "sha512-VfxadyCECXgQlkoEAjeghAr5gY3Hf+IKjKb+X8tGVDtveCjN+USwprd2q3QXBR9T1+x2DG0XZF5/w+7HAtSaXA==", - "dev": true - }, - "decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", - "dev": true, - "requires": { - "mimic-response": "^3.1.0" - } - }, - "defer-to-connect": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", - "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", - "dev": true - }, - "dot-prop": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz", - "integrity": "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==", - "dev": true, - "requires": { - "is-obj": "^2.0.0" - } - }, - "escape-goat": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-4.0.0.tgz", - "integrity": "sha512-2Sd4ShcWxbx6OY1IHyla/CVNwvg7XwZVoXZHcSu9w9SReNP1EzzD5T8NWKIR38fIqEns9kDWKUQTXXAmlDrdPg==", - "dev": true - }, - "find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "requires": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - } - }, - "gaxios": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-5.0.1.tgz", - "integrity": "sha512-keK47BGKHyyOVQxgcUaSaFvr3ehZYAlvhvpHXy0YB2itzZef+GqZR8TBsfVRWghdwlKrYsn+8L8i3eblF7Oviw==", - "dev": true, - "requires": { - "extend": "^3.0.2", - "https-proxy-agent": "^5.0.0", - "is-stream": "^2.0.0", - "node-fetch": "^2.6.7" - } - }, - "glob": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", - "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - } - }, - "got": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/got/-/got-12.1.0.tgz", - "integrity": "sha512-hBv2ty9QN2RdbJJMK3hesmSkFTjVIHyIDDbssCKnSmq62edGgImJWD10Eb1k77TiV1bxloxqcFAVK8+9pkhOig==", - "dev": true, - "requires": { - "@sindresorhus/is": "^4.6.0", - "@szmarczak/http-timer": "^5.0.1", - "@types/cacheable-request": "^6.0.2", - "@types/responselike": "^1.0.0", - "cacheable-lookup": "^6.0.4", - "cacheable-request": "^7.0.2", - "decompress-response": "^6.0.0", - "form-data-encoder": "1.7.1", - "get-stream": "^6.0.1", - "http2-wrapper": "^2.1.10", - "lowercase-keys": "^3.0.0", - "p-cancelable": "^3.0.0", - "responselike": "^2.0.0" - } - }, - "has-yarn": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-3.0.0.tgz", - "integrity": "sha512-IrsVwUHhEULx3R8f/aA8AHuEzAorplsab/v8HBzEiIukwq5i/EC+xmOW+HfP1OaDP+2JkgT1yILHN2O3UFIbcA==", - "dev": true - }, - "import-lazy": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz", - "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==", - "dev": true - }, - "indent-string": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", - "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==", - "dev": true - }, - "is-ci": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", - "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", - "dev": true, - "requires": { - "ci-info": "^3.2.0" - } - }, - "is-npm": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-6.0.0.tgz", - "integrity": "sha512-JEjxbSmtPSt1c8XTkVrlujcXdKV1/tvuQ7GwKcAlyiVLeYFQ2VHat8xfrDJsIkhCdF/tZ7CiIR3sy141c6+gPQ==", - "dev": true - }, - "is-yarn-global": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.4.0.tgz", - "integrity": "sha512-HneQBCrXGBy15QnaDfcn6OLoU8AQPAa0Qn0IeJR/QCo4E8dNZaGGwxpCwWyEBQC5QvFonP8d6t60iGpAHVAfNA==", - "dev": true - }, - "json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true - }, - "keyv": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.3.2.tgz", - "integrity": "sha512-kn8WmodVBe12lmHpA6W8OY7SNh6wVR+Z+wZESF4iF5FCazaVXGWOtnbnvX0tMQ1bO+/TmOD9LziuYMvrIIs0xw==", - "dev": true, - "requires": { - "compress-brotli": "^1.3.8", - "json-buffer": "3.0.1" - } - }, - "latest-version": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-7.0.0.tgz", - "integrity": "sha512-KvNT4XqAMzdcL6ka6Tl3i2lYeFDgXNCuIX+xNx6ZMVR1dFq+idXd9FLKNMOIx0t9mJ9/HudyX4oZWXZQ0UJHeg==", - "dev": true, - "requires": { - "package-json": "^8.1.0" - } - }, - "locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "requires": { - "p-locate": "^5.0.0" - } - }, - "lowercase-keys": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz", - "integrity": "sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==", - "dev": true - }, - "marked": { - "version": "4.0.17", - "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.17.tgz", - "integrity": "sha512-Wfk0ATOK5iPxM4ptrORkFemqroz0ZDxp5MWfYA7H/F+wO17NRWV5Ypxi6p3g2Xmw2bKeiYOl6oVnLHKxBA0VhA==", - "dev": true - }, - "meow": { - "version": "10.1.3", - "resolved": "https://registry.npmjs.org/meow/-/meow-10.1.3.tgz", - "integrity": "sha512-0WL7RMCPPdUTE00+GxJjL4d5Dm6eUbmAzxlzywJWiRUKCW093owmZ7/q74tH9VI91vxw9KJJNxAcvdpxb2G4iA==", - "dev": true, - "requires": { - "@types/minimist": "^1.2.2", - "camelcase-keys": "^7.0.0", - "decamelize": "^5.0.0", - "decamelize-keys": "^1.1.0", - "hard-rejection": "^2.1.0", - "minimist-options": "4.1.0", - "normalize-package-data": "^3.0.2", - "read-pkg-up": "^8.0.0", - "redent": "^4.0.0", - "trim-newlines": "^4.0.2", - "type-fest": "^1.2.2", - "yargs-parser": "^20.2.9" - } - }, - "mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", - "dev": true - }, - "minimatch": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", - "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", - "dev": true, - "requires": { - "brace-expansion": "^2.0.1" - } - }, - "node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "dev": true, - "requires": { - "whatwg-url": "^5.0.0" - } - }, - "normalize-url": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", - "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", - "dev": true - }, - "p-cancelable": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-3.0.0.tgz", - "integrity": "sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==", - "dev": true - }, - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "requires": { - "yocto-queue": "^0.1.0" - } - }, - "p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "requires": { - "p-limit": "^3.0.2" - } - }, - "package-json": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-8.1.0.tgz", - "integrity": "sha512-hySwcV8RAWeAfPsXb9/HGSPn8lwDnv6fabH+obUZKX169QknRkRhPxd1yMubpKDskLFATkl3jHpNtVtDPFA0Wg==", - "dev": true, - "requires": { - "got": "^12.1.0", - "registry-auth-token": "^5.0.1", - "registry-url": "^6.0.0", - "semver": "^7.3.7" - } - }, - "pupa": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pupa/-/pupa-3.1.0.tgz", - "integrity": "sha512-FLpr4flz5xZTSJxSeaheeMKN/EDzMdK7b8PTOC6a5PYFKTucWbdqjgqaEyH0shFiSJrVB1+Qqi4Tk19ccU6Aug==", - "dev": true, - "requires": { - "escape-goat": "^4.0.0" - } - }, - "quick-lru": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", - "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", - "dev": true - }, - "read-pkg": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-6.0.0.tgz", - "integrity": "sha512-X1Fu3dPuk/8ZLsMhEj5f4wFAF0DWoK7qhGJvgaijocXxBmSToKfbFtqbxMO7bVjNA1dmE5huAzjXj/ey86iw9Q==", - "dev": true, - "requires": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^3.0.2", - "parse-json": "^5.2.0", - "type-fest": "^1.0.1" - } - }, - "read-pkg-up": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-8.0.0.tgz", - "integrity": "sha512-snVCqPczksT0HS2EC+SxUndvSzn6LRCwpfSvLrIfR5BKDQQZMaI6jPRC9dYvYFDRAuFEAnkwww8kBBNE/3VvzQ==", - "dev": true, - "requires": { - "find-up": "^5.0.0", - "read-pkg": "^6.0.0", - "type-fest": "^1.0.1" - } - }, - "redent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-4.0.0.tgz", - "integrity": "sha512-tYkDkVVtYkSVhuQ4zBgfvciymHaeuel+zFKXShfDnFP5SyVEP7qo70Rf1jTOTCx3vGNAbnEi/xFkcfQVMIBWag==", - "dev": true, - "requires": { - "indent-string": "^5.0.0", - "strip-indent": "^4.0.0" - } - }, - "registry-auth-token": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-5.0.1.tgz", - "integrity": "sha512-UfxVOj8seK1yaIOiieV4FIP01vfBDLsY0H9sQzi9EbbUdJiuuBjJgLa1DpImXMNPnVkBD4eVxTEXcrZA6kfpJA==", - "dev": true, - "requires": { - "@pnpm/npm-conf": "^1.0.4" - } - }, - "registry-url": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-6.0.1.tgz", - "integrity": "sha512-+crtS5QjFRqFCoQmvGduwYWEBng99ZvmFvF+cUJkGYF1L1BfU8C6Zp9T7f5vPAwyLkUExpvK+ANVZmGU49qi4Q==", - "dev": true, - "requires": { - "rc": "1.2.8" - } - }, - "responselike": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.0.tgz", - "integrity": "sha512-xH48u3FTB9VsZw7R+vvgaKeLKzT6jOogbQhEe/jewwnZgzPcnyWui2Av6JpoYZF/91uueC+lqhWqeURw5/qhCw==", - "dev": true, - "requires": { - "lowercase-keys": "^2.0.0" - }, - "dependencies": { - "lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true - } - } - }, - "semver-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-4.0.0.tgz", - "integrity": "sha512-0Ju4+6A8iOnpL/Thra7dZsSlOHYAHIeMxfhWQRI1/VLcT3WDBZKKtQt/QkBOsiIN9ZpuvHE6cGZ0x4glCMmfiA==", - "dev": true, - "requires": { - "semver": "^7.3.5" - } - }, - "string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "requires": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true - }, - "emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, - "strip-ansi": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", - "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", - "dev": true, - "requires": { - "ansi-regex": "^6.0.1" - } - } - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "strip-indent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-4.0.0.tgz", - "integrity": "sha512-mnVSV2l+Zv6BLpSD/8V87CW/y9EmmbYzGCIavsnsI6/nwn26DwffM/yztm30Z/I2DY9wdS3vXVCMnHDgZaVNoA==", - "dev": true, - "requires": { - "min-indent": "^1.0.1" - } - }, - "trim-newlines": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-4.0.2.tgz", - "integrity": "sha512-GJtWyq9InR/2HRiLZgpIKv+ufIKrVrvjQWEj7PxAXNc5dwbNJkqhAUoAGgzRmULAnoOM5EIpveYd3J2VeSAIew==", - "dev": true - }, - "type-fest": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", - "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", - "dev": true - }, - "unique-string": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-3.0.0.tgz", - "integrity": "sha512-VGXBUVwxKMBUznyffQweQABPRRW1vHZAbadFZud4pLFAqRGvv/96vafgjWFqzourzr8YonlQiPgH0YCJfawoGQ==", - "dev": true, - "requires": { - "crypto-random-string": "^4.0.0" - } - }, - "update-notifier": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-6.0.2.tgz", - "integrity": "sha512-EDxhTEVPZZRLWYcJ4ZXjGFN0oP7qYvbXWzEgRm/Yql4dHX5wDbvh89YHP6PK1lzZJYrMtXUuZZz8XGK+U6U1og==", - "dev": true, - "requires": { - "boxen": "^7.0.0", - "chalk": "^5.0.1", - "configstore": "^6.0.0", - "has-yarn": "^3.0.0", - "import-lazy": "^4.0.0", - "is-ci": "^3.0.1", - "is-installed-globally": "^0.4.0", - "is-npm": "^6.0.0", - "is-yarn-global": "^0.4.0", - "latest-version": "^7.0.0", - "pupa": "^3.1.0", - "semver": "^7.3.7", - "semver-diff": "^4.0.0", - "xdg-basedir": "^5.1.0" - } - }, - "widest-line": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz", - "integrity": "sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==", - "dev": true, - "requires": { - "string-width": "^5.0.1" - } - }, - "wrap-ansi": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.0.1.tgz", - "integrity": "sha512-QFF+ufAqhoYHvoHdajT/Po7KoXVBPXS2bgjIam5isfWJPfIOnQZ50JtUiVvCv/sjgacf3yRrt2ZKUZ/V4itN4g==", - "dev": true, - "requires": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true - }, - "strip-ansi": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", - "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", - "dev": true, - "requires": { - "ansi-regex": "^6.0.1" - } - } - } - }, - "xdg-basedir": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-5.1.0.tgz", - "integrity": "sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ==", - "dev": true - }, - "yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true - } - } - }, - "loader-runner": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", - "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", - "dev": true - }, - "loader-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", - "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", - "dev": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" - }, - "lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", - "dev": true - }, - "lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", - "dev": true - }, - "log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "requires": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "dependencies": { - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - } - } - }, - "long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" - }, - "lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", - "dev": true - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "requires": { - "yallist": "^4.0.0" - } - }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "requires": { - "semver": "^6.0.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "map-obj": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.2.1.tgz", - "integrity": "sha512-+WA2/1sPmDj1dlvvJmB5G6JKfY9dpn7EVBUL06+y6PoljPkh+6V1QihwxNkbcGxCRjt2b0F9K0taiCuo7MbdFQ==", - "dev": true - }, - "markdown-it": { - "version": "12.3.2", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz", - "integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==", - "dev": true, - "requires": { - "argparse": "^2.0.1", - "entities": "~2.1.0", - "linkify-it": "^3.0.1", - "mdurl": "^1.0.1", - "uc.micro": "^1.0.5" - }, - "dependencies": { - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - } - } - }, - "markdown-it-anchor": { - "version": "8.6.5", - "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-8.6.5.tgz", - "integrity": "sha512-PI1qEHHkTNWT+X6Ip9w+paonfIQ+QZP9sCeMYi47oqhH+EsW8CrJ8J7CzV19QVOj6il8ATGbK2nTECj22ZHGvQ==", - "dev": true - }, - "marked": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/marked/-/marked-4.2.2.tgz", - "integrity": "sha512-JjBTFTAvuTgANXx82a5vzK9JLSMoV6V3LBVn4Uhdso6t7vXrGx7g1Cd2r6NYSsxrYbQGFCMqBDhFHyK5q2UvcQ==", - "dev": true - }, - "mdurl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", - "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==", - "dev": true - }, - "meow": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-9.0.0.tgz", - "integrity": "sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==", - "dev": true, - "requires": { - "@types/minimist": "^1.2.0", - "camelcase-keys": "^6.2.2", - "decamelize": "^1.2.0", - "decamelize-keys": "^1.1.0", - "hard-rejection": "^2.1.0", - "minimist-options": "4.1.0", - "normalize-package-data": "^3.0.0", - "read-pkg-up": "^7.0.1", - "redent": "^3.0.0", - "trim-newlines": "^3.0.0", - "type-fest": "^0.18.0", - "yargs-parser": "^20.2.3" - }, - "dependencies": { - "type-fest": { - "version": "0.18.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", - "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", - "dev": true - } - } - }, - "merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true - }, - "micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", - "dev": true, - "requires": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" - } - }, - "mime": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", - "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", - "dev": true - }, - "mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true - }, - "mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, - "requires": { - "mime-db": "1.52.0" - } - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, - "mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", - "dev": true - }, - "min-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", - "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - }, - "minimist-options": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", - "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", - "dev": true, - "requires": { - "arrify": "^1.0.1", - "is-plain-obj": "^1.1.0", - "kind-of": "^6.0.3" - }, - "dependencies": { - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true - } - } - }, - "minipass": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.3.tgz", - "integrity": "sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "dev": true, - "requires": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" - } - }, - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true - }, - "mocha": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", - "integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==", - "dev": true, - "requires": { - "@ungap/promise-all-settled": "1.1.2", - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.3", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "4.2.1", - "ms": "2.1.3", - "nanoid": "3.3.1", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "which": "2.0.2", - "workerpool": "6.2.0", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "dependencies": { - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", - "dev": true, - "requires": { - "ms": "2.1.2" - }, - "dependencies": { - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } - } - }, - "find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "requires": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - } - }, - "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "dependencies": { - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - } - } - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - }, - "locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "requires": { - "p-locate": "^5.0.0" - } - }, - "minimatch": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz", - "integrity": "sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "requires": { - "yocto-queue": "^0.1.0" - } - }, - "p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "requires": { - "p-limit": "^3.0.2" - } - }, - "serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", - "dev": true, - "requires": { - "randombytes": "^2.1.0" - } - }, - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", - "dev": true - } - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "mute-stream": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", - "dev": true - }, - "nanoid": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", - "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", - "dev": true - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true - }, - "ncp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", - "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=", - "dev": true - }, - "neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true - }, - "nise": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.4.tgz", - "integrity": "sha512-8+Ib8rRJ4L0o3kfmyVCL7gzrohyDe0cMFTBa2d364yIrEGMEoetznKJx899YxjybU6bL9SQkYPSBBs1gyYs8Xg==", - "dev": true, - "requires": { - "@sinonjs/commons": "^2.0.0", - "@sinonjs/fake-timers": "^10.0.2", - "@sinonjs/text-encoding": "^0.7.1", - "just-extend": "^4.0.2", - "path-to-regexp": "^1.7.0" - }, - "dependencies": { - "@sinonjs/commons": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", - "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", - "dev": true, - "requires": { - "type-detect": "4.0.8" - } - }, - "@sinonjs/fake-timers": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.0.2.tgz", - "integrity": "sha512-SwUDyjWnah1AaNl7kxsa7cfLhlTYoiyhDAIgyh+El30YvXs/o7OLXpYH88Zdhyx9JExKrmHDJ+10bwIcY80Jmw==", - "dev": true, - "requires": { - "@sinonjs/commons": "^2.0.0" - } - } - } - }, - "node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "requires": { - "whatwg-url": "^5.0.0" - } - }, - "node-forge": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", - "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==" - }, - "node-releases": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz", - "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==", - "dev": true - }, - "normalize-package-data": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.2.tgz", - "integrity": "sha512-6CdZocmfGaKnIHPVFhJJZ3GuR8SsLKvDANFp47Jmy51aKIr8akjAWTSxtpI+MBgBFdSMRyo4hMpDlT6dTffgZg==", - "dev": true, - "requires": { - "hosted-git-info": "^4.0.1", - "resolve": "^1.20.0", - "semver": "^7.3.4", - "validate-npm-package-license": "^3.0.1" - }, - "dependencies": { - "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - } - } - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - }, - "normalize-url": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", - "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", - "dev": true - }, - "npm-bundled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.2.tgz", - "integrity": "sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ==", - "dev": true, - "requires": { - "npm-normalize-package-bin": "^1.0.1" - } - }, - "npm-normalize-package-bin": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", - "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", - "dev": true - }, - "npm-packlist": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-2.2.2.tgz", - "integrity": "sha512-Jt01acDvJRhJGthnUJVF/w6gumWOZxO7IkpY/lsX9//zqQgnF7OJaxgQXcerd4uQOLu7W5bkb4mChL9mdfm+Zg==", - "dev": true, - "requires": { - "glob": "^7.1.6", - "ignore-walk": "^3.0.3", - "npm-bundled": "^1.1.1", - "npm-normalize-package-bin": "^1.0.1" - } - }, - "npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "requires": { - "path-key": "^3.0.0" - } - }, - "null-loader": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/null-loader/-/null-loader-4.0.1.tgz", - "integrity": "sha512-pxqVbi4U6N26lq+LmgIbB5XATP0VdZKOG25DhHi8btMmJJefGArFyDg1yc4U3hWCJbMqSrw0qyrz1UQX+qYXqg==", - "dev": true, - "requires": { - "loader-utils": "^2.0.0", - "schema-utils": "^3.0.0" - } - }, - "object-hash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", - "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==" - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "requires": { - "mimic-fn": "^2.1.0" - } - }, - "optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", - "dev": true, - "requires": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - } - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true - }, - "p-cancelable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", - "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", - "dev": true - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "pack-n-play": { - "version": "1.0.0-2", - "resolved": "https://registry.npmjs.org/pack-n-play/-/pack-n-play-1.0.0-2.tgz", - "integrity": "sha512-AUCSyqk/UAD79KPSK678HrVyRGqYZrSeqpjXCwLujR11cW0R3mlc3uHrYrrMniTbfGPzkDXbW8HZj6lZm0KD5w==", - "dev": true, - "requires": { - "glob": "^7.1.2", - "npm-packlist": "^2.0.0", - "once": "^1.4.0", - "rimraf": "^3.0.0", - "tar": "^5.0.0", - "tmp": "0.1.0" - }, - "dependencies": { - "tmp": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.1.0.tgz", - "integrity": "sha512-J7Z2K08jbGcdA1kkQpJSqLF6T0tdQqpR2pnSUXsIchbPdTI9v3e85cLW0d6WDhwuAleOV71j2xWs8qMPfK7nKw==", - "dev": true, - "requires": { - "rimraf": "^2.6.3" - }, - "dependencies": { - "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - } - } - } - } - }, - "package-json": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", - "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", - "dev": true, - "requires": { - "got": "^9.6.0", - "registry-auth-token": "^4.0.0", - "registry-url": "^5.0.0", - "semver": "^6.2.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "requires": { - "callsites": "^3.0.0" - } - }, - "parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "path-to-regexp": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", - "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", - "dev": true, - "requires": { - "isarray": "0.0.1" - } - }, - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true - }, - "picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - }, - "picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", - "dev": true - }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "requires": { - "find-up": "^4.0.0" - } - }, - "prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true - }, - "prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", - "dev": true - }, - "prettier": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz", - "integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==", - "dev": true - }, - "prettier-linter-helpers": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", - "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", - "dev": true, - "requires": { - "fast-diff": "^1.1.2" - } - }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true - }, - "proto-list": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", - "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==", - "dev": true - }, - "proto3-json-serializer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proto3-json-serializer/-/proto3-json-serializer-1.1.0.tgz", - "integrity": "sha512-SjXwUWe/vANGs/mJJTbw5++7U67nwsymg7qsoPtw6GiXqw3kUy8ByojrlEdVE2efxAdKreX8WkDafxvYW95ZQg==", - "requires": { - "protobufjs": "^7.0.0" - } - }, - "protobufjs": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.1.2.tgz", - "integrity": "sha512-4ZPTPkXCdel3+L81yw3dG6+Kq3umdWKh7Dc7GW/CpNk4SX3hK58iPCWeCyhVTDrbkNeKrYNZ7EojM5WDaEWTLQ==", - "requires": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/node": ">=13.7.0", - "long": "^5.0.0" - }, - "dependencies": { - "long": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/long/-/long-5.2.1.tgz", - "integrity": "sha512-GKSNGeNAtw8IryjjkhZxuKB3JzlcLTwjtiQCHKvqQet81I93kXslhDQruGI/QsddO83mcDToBVy7GqGS/zYf/A==" - } - } - }, - "protobufjs-cli": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/protobufjs-cli/-/protobufjs-cli-1.0.2.tgz", - "integrity": "sha512-cz9Pq9p/Zs7okc6avH20W7QuyjTclwJPgqXG11jNaulfS3nbVisID8rC+prfgq0gbZE0w9LBFd1OKFF03kgFzg==", - "requires": { - "chalk": "^4.0.0", - "escodegen": "^1.13.0", - "espree": "^9.0.0", - "estraverse": "^5.1.0", - "glob": "^8.0.0", - "minimist": "^1.2.0", - "semver": "^7.1.2", - "tmp": "^0.2.1", - "uglify-js": "^3.7.7" - }, - "dependencies": { - "acorn": { - "version": "8.8.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", - "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==" - }, - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "requires": { - "balanced-match": "^1.0.0" - } - }, - "eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==" - }, - "espree": { - "version": "9.4.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz", - "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==", - "requires": { - "acorn": "^8.8.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" - } - }, - "glob": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", - "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - } - }, - "minimatch": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", - "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", - "requires": { - "brace-expansion": "^2.0.1" - } - }, - "tmp": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", - "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", - "requires": { - "rimraf": "^3.0.0" - } - } - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - }, - "pupa": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", - "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", - "dev": true, - "requires": { - "escape-goat": "^2.0.0" - } - }, - "queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true - }, - "quick-lru": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", - "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", - "dev": true - }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - } - } - }, - "read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "dev": true, - "requires": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "dependencies": { - "hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, - "type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true - } - } - }, - "read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "dev": true, - "requires": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - }, - "dependencies": { - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true - } - } - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "requires": { - "picomatch": "^2.2.1" - } - }, - "rechoir": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", - "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", - "dev": true, - "requires": { - "resolve": "^1.20.0" - } - }, - "redent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", - "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", - "dev": true, - "requires": { - "indent-string": "^4.0.0", - "strip-indent": "^3.0.0" - } - }, - "regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true - }, - "registry-auth-token": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", - "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", - "dev": true, - "requires": { - "rc": "^1.2.8" - } - }, - "registry-url": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", - "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", - "dev": true, - "requires": { - "rc": "^1.2.8" - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" - }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true - }, - "requizzle": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.3.tgz", - "integrity": "sha512-YanoyJjykPxGHii0fZP0uUPEXpvqfBDxWV7s6GKAiiOsiqhX6vHNyW3Qzdmqp/iq/ExbhaGbVrjB4ruEVSM4GQ==", - "dev": true, - "requires": { - "lodash": "^4.17.14" - } - }, - "resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", - "dev": true, - "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - } - }, - "resolve-alpn": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", - "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", - "dev": true - }, - "resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dev": true, - "requires": { - "resolve-from": "^5.0.0" - }, - "dependencies": { - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - } - } - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true - }, - "responselike": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", - "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", - "dev": true, - "requires": { - "lowercase-keys": "^1.0.0" - } - }, - "restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "dev": true, - "requires": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - } - }, - "retry-request": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-5.0.2.tgz", - "integrity": "sha512-wfI3pk7EE80lCIXprqh7ym48IHYdwmAAzESdbU8Q9l7pnRCk9LEhpbOTNKjz6FARLm/Bl5m+4F0ABxOkYUujSQ==", - "requires": { - "debug": "^4.1.1", - "extend": "^3.0.2" - } - }, - "reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "requires": { - "glob": "^7.1.3" - } - }, - "run-async": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", - "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", - "dev": true - }, - "run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "requires": { - "queue-microtask": "^1.2.2" - } - }, - "rxjs": { - "version": "6.6.7", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", - "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", - "dev": true, - "requires": { - "tslib": "^1.9.0" - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "schema-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", - "integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.6", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - } - }, - "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "requires": { - "lru-cache": "^6.0.0" - } - }, - "semver-diff": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", - "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", - "dev": true, - "requires": { - "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "serialize-javascript": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", - "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", - "dev": true, - "requires": { - "randombytes": "^2.1.0" - } - }, - "server-destroy": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/server-destroy/-/server-destroy-1.0.1.tgz", - "integrity": "sha512-rb+9B5YBIEzYcD6x2VKidaa+cqYBJQKnU4oe4E3ANwRRN56yk/ua1YCJT1n21NTS8w6CcOclAKNP3PhdCXKYtQ==", - "dev": true - }, - "shallow-clone": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", - "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", - "dev": true, - "requires": { - "kind-of": "^6.0.2" - } - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "signal-exit": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", - "dev": true - }, - "sinon": { - "version": "15.0.1", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-15.0.1.tgz", - "integrity": "sha512-PZXKc08f/wcA/BMRGBze2Wmw50CWPiAH3E21EOi4B49vJ616vW4DQh4fQrqsYox2aNR/N3kCqLuB0PwwOucQrg==", - "dev": true, - "requires": { - "@sinonjs/commons": "^2.0.0", - "@sinonjs/fake-timers": "10.0.2", - "@sinonjs/samsam": "^7.0.1", - "diff": "^5.0.0", - "nise": "^5.1.2", - "supports-color": "^7.2.0" - }, - "dependencies": { - "@sinonjs/commons": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", - "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", - "dev": true, - "requires": { - "type-detect": "4.0.8" - } - }, - "@sinonjs/fake-timers": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.0.2.tgz", - "integrity": "sha512-SwUDyjWnah1AaNl7kxsa7cfLhlTYoiyhDAIgyh+El30YvXs/o7OLXpYH88Zdhyx9JExKrmHDJ+10bwIcY80Jmw==", - "dev": true, - "requires": { - "@sinonjs/commons": "^2.0.0" - } - } - } - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, - "slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.9.tgz", - "integrity": "sha512-Ki212dKK4ogX+xDo4CtOZBVIwhsKBEfsEEcwmJfLQzirgc2jIWdzg40Unxz/HzEUqM1WFzVlQSMF9kZZ2HboLQ==", - "dev": true - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "stream-shift": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", - "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==" - }, - "string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "requires": { - "safe-buffer": "~5.2.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "requires": { - "ansi-regex": "^5.0.0" - } - }, - "strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true - }, - "strip-indent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", - "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", - "dev": true, - "requires": { - "min-indent": "^1.0.0" - } - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "requires": { - "has-flag": "^4.0.0" - } - }, - "table": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/table/-/table-6.8.0.tgz", - "integrity": "sha512-s/fitrbVeEyHKFa7mFdkuQMWlH1Wgw/yEXMt5xACT4ZpzWFluehAxRtUUQKPuWhaLAWhFcVx6w3oC8VKaUfPGA==", - "dev": true, - "requires": { - "ajv": "^8.0.1", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - }, - "dependencies": { - "ajv": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", - "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - } - } - }, - "tapable": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.0.tgz", - "integrity": "sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw==", - "dev": true - }, - "tar": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/tar/-/tar-5.0.5.tgz", - "integrity": "sha512-MNIgJddrV2TkuwChwcSNds/5E9VijOiw7kAc1y5hTNJoLDSuIyid2QtLYiCYNnICebpuvjhPQZsXwUL0O3l7OQ==", - "dev": true, - "requires": { - "chownr": "^1.1.3", - "fs-minipass": "^2.0.0", - "minipass": "^3.0.0", - "minizlib": "^2.1.0", - "mkdirp": "^0.5.0", - "yallist": "^4.0.0" - }, - "dependencies": { - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - } - } - }, - "terser": { - "version": "5.16.8", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.8.tgz", - "integrity": "sha512-QI5g1E/ef7d+PsDifb+a6nnVgC4F22Bg6T0xrBrz6iloVB4PUkkunp6V8nzoOOZJIzjWVdAGqCdlKlhLq/TbIA==", - "dev": true, - "requires": { - "@jridgewell/source-map": "^0.3.2", - "acorn": "^8.5.0", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" - }, - "dependencies": { - "acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", - "dev": true - } - } - }, - "terser-webpack-plugin": { - "version": "5.3.7", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.7.tgz", - "integrity": "sha512-AfKwIktyP7Cu50xNjXF/6Qb5lBNzYaWpU6YfoX3uZicTx0zTy0stDDCsvjDapKsSDvOeWo5MEq4TmdBy2cNoHw==", - "dev": true, - "requires": { - "@jridgewell/trace-mapping": "^0.3.17", - "jest-worker": "^27.4.5", - "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.1", - "terser": "^5.16.5" - }, - "dependencies": { - "@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", - "dev": true - }, - "schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - } - } - } - }, - "test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", - "dev": true, - "requires": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.2" - } - }, - "to-readable-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", - "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", - "dev": true - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } - }, - "tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" - }, - "trim-newlines": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", - "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", - "dev": true - }, - "ts-loader": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.2.2.tgz", - "integrity": "sha512-hNIhGTQHtNKjOzR2ZtQ2OSVbXPykOae+zostf1IlHCf61Mt41GMJurKNqrYUbzHgpmj6UWRu8eBfb7q0XliV0g==", - "dev": true, - "requires": { - "chalk": "^4.1.0", - "enhanced-resolve": "^5.0.0", - "micromatch": "^4.0.0", - "semver": "^7.3.4" - }, - "dependencies": { - "chalk": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", - "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - } - } - }, - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - }, - "type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1" - } - }, - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true - }, - "type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true - }, - "typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, - "requires": { - "is-typedarray": "^1.0.0" - } - }, - "typescript": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.4.tgz", - "integrity": "sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==", - "dev": true - }, - "uc.micro": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", - "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", - "dev": true - }, - "uglify-js": { - "version": "3.17.4", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", - "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==" - }, - "underscore": { - "version": "1.13.6", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", - "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", - "dev": true - }, - "unique-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", - "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", - "dev": true, - "requires": { - "crypto-random-string": "^2.0.0" - } - }, - "update-browserslist-db": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", - "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", - "dev": true, - "requires": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - } - }, - "update-notifier": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz", - "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==", - "dev": true, - "requires": { - "boxen": "^5.0.0", - "chalk": "^4.1.0", - "configstore": "^5.0.1", - "has-yarn": "^2.1.0", - "import-lazy": "^2.1.0", - "is-ci": "^2.0.0", - "is-installed-globally": "^0.4.0", - "is-npm": "^5.0.0", - "is-yarn-global": "^0.3.0", - "latest-version": "^5.1.0", - "pupa": "^2.1.1", - "semver": "^7.3.4", - "semver-diff": "^3.1.1", - "xdg-basedir": "^4.0.0" - }, - "dependencies": { - "chalk": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", - "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - } - } - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "url-parse-lax": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", - "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", - "dev": true, - "requires": { - "prepend-http": "^2.0.0" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" - }, - "v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, - "v8-to-istanbul": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-7.1.2.tgz", - "integrity": "sha512-TxNb7YEUwkLXCQYeudi6lgQ/SZrzNO4kMdlqVxaZPUIUjCv6iSSypUQX70kNBSERpQ8fk48+d61FXk+tgqcWow==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0", - "source-map": "^0.7.3" - }, - "dependencies": { - "source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", - "dev": true - } - } - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "watchpack": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", - "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", - "dev": true, - "requires": { - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.1.2" - } - }, - "webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" - }, - "webpack": { - "version": "5.76.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.0.tgz", - "integrity": "sha512-l5sOdYBDunyf72HW8dF23rFtWq/7Zgvt/9ftMof71E/yUb1YLOBmTgA2K4vQthB3kotMrSj609txVE0dnr2fjA==", - "dev": true, - "requires": { - "@types/eslint-scope": "^3.7.3", - "@types/estree": "^0.0.51", - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/wasm-edit": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", - "acorn": "^8.7.1", - "acorn-import-assertions": "^1.7.6", - "browserslist": "^4.14.5", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.10.0", - "es-module-lexer": "^0.9.0", - "eslint-scope": "5.1.1", - "events": "^3.2.0", - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.9", - "json-parse-even-better-errors": "^2.3.1", - "loader-runner": "^4.2.0", - "mime-types": "^2.1.27", - "neo-async": "^2.6.2", - "schema-utils": "^3.1.0", - "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.1.3", - "watchpack": "^2.4.0", - "webpack-sources": "^3.2.3" - }, - "dependencies": { - "@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", - "dev": true - }, - "acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", - "dev": true - }, - "enhanced-resolve": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz", - "integrity": "sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - } - }, - "graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true - }, - "schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - } - } - } - }, - "webpack-cli": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.0.1.tgz", - "integrity": "sha512-S3KVAyfwUqr0Mo/ur3NzIp6jnerNpo7GUO6so51mxLi1spqsA17YcMXy0WOIJtBSnj748lthxC6XLbNKh/ZC+A==", - "dev": true, - "requires": { - "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^2.0.1", - "@webpack-cli/info": "^2.0.1", - "@webpack-cli/serve": "^2.0.1", - "colorette": "^2.0.14", - "commander": "^9.4.1", - "cross-spawn": "^7.0.3", - "envinfo": "^7.7.3", - "fastest-levenshtein": "^1.0.12", - "import-local": "^3.0.2", - "interpret": "^3.1.1", - "rechoir": "^0.8.0", - "webpack-merge": "^5.7.3" - }, - "dependencies": { - "colorette": { - "version": "2.0.19", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", - "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", - "dev": true - }, - "commander": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", - "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", - "dev": true - } - } - }, - "webpack-merge": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz", - "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==", - "dev": true, - "requires": { - "clone-deep": "^4.0.1", - "wildcard": "^2.0.0" - } - }, - "webpack-sources": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", - "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", - "dev": true - }, - "whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", - "requires": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "widest-line": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", - "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", - "dev": true, - "requires": { - "string-width": "^4.0.0" - } - }, - "wildcard": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", - "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==", - "dev": true - }, - "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" - }, - "workerpool": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", - "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==", - "dev": true - }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, - "xdg-basedir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", - "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", - "dev": true - }, - "xmlcreate": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.4.tgz", - "integrity": "sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg==", - "dev": true - }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, - "yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "requires": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - } - }, - "yargs-parser": { - "version": "20.2.7", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.7.tgz", - "integrity": "sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw==" - }, - "yargs-unparser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", - "dev": true, - "requires": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "dependencies": { - "camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true - }, - "decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true - }, - "is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true - } - } - }, - "yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true - } - } -} diff --git a/packages/google-cloud-shell/package.json b/packages/google-cloud-shell/package.json index adb936841b3..3411da3320c 100644 --- a/packages/google-cloud-shell/package.json +++ b/packages/google-cloud-shell/package.json @@ -31,7 +31,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -39,10 +39,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -57,6 +58,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-speech/CHANGELOG.md b/packages/google-cloud-speech/CHANGELOG.md index bc45335d37b..21434b3825c 100644 --- a/packages/google-cloud-speech/CHANGELOG.md +++ b/packages/google-cloud-speech/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/speech?activeTab=versions +## [5.5.0](https://github.com/googleapis/google-cloud-node/compare/speech-v5.4.1...speech-v5.5.0) (2023-05-11) + + +### Features + +* Add processing strategy to batch recognition requests ([#4268](https://github.com/googleapis/google-cloud-node/issues/4268)) ([8b5caeb](https://github.com/googleapis/google-cloud-node/commit/8b5caebc2569c715a4fee03e6bcc5e5cd2ca5150)) + ## [5.4.1](https://github.com/googleapis/google-cloud-node/compare/speech-v5.4.0...speech-v5.4.1) (2023-04-13) diff --git a/packages/google-cloud-speech/README.md b/packages/google-cloud-speech/README.md index 62622b6fc6a..9e323a181de 100644 --- a/packages/google-cloud-speech/README.md +++ b/packages/google-cloud-speech/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Cloud Speech: Node.js Client](https://github.com/googleapis/google-cloud-node) +# [Cloud Speech: Node.js Client](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-speech) [![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/speech.svg)](https://www.npmjs.org/package/@google-cloud/speech) @@ -95,61 +95,60 @@ quickstart(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-speech/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Adaptation.create_custom_class | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1/adaptation.create_custom_class.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1/adaptation.create_custom_class.js,samples/README.md) | -| Adaptation.create_phrase_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1/adaptation.create_phrase_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1/adaptation.create_phrase_set.js,samples/README.md) | -| Adaptation.delete_custom_class | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1/adaptation.delete_custom_class.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1/adaptation.delete_custom_class.js,samples/README.md) | -| Adaptation.delete_phrase_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1/adaptation.delete_phrase_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1/adaptation.delete_phrase_set.js,samples/README.md) | -| Adaptation.get_custom_class | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1/adaptation.get_custom_class.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1/adaptation.get_custom_class.js,samples/README.md) | -| Adaptation.get_phrase_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1/adaptation.get_phrase_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1/adaptation.get_phrase_set.js,samples/README.md) | -| Adaptation.list_custom_classes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1/adaptation.list_custom_classes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1/adaptation.list_custom_classes.js,samples/README.md) | -| Adaptation.list_phrase_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1/adaptation.list_phrase_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1/adaptation.list_phrase_set.js,samples/README.md) | -| Adaptation.update_custom_class | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1/adaptation.update_custom_class.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1/adaptation.update_custom_class.js,samples/README.md) | -| Adaptation.update_phrase_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1/adaptation.update_phrase_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1/adaptation.update_phrase_set.js,samples/README.md) | -| Speech.long_running_recognize | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1/speech.long_running_recognize.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1/speech.long_running_recognize.js,samples/README.md) | -| Speech.recognize | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1/speech.recognize.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1/speech.recognize.js,samples/README.md) | -| Speech.streaming_recognize | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1/speech.streaming_recognize.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1/speech.streaming_recognize.js,samples/README.md) | -| Adaptation.create_custom_class | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.create_custom_class.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.create_custom_class.js,samples/README.md) | -| Adaptation.create_phrase_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.create_phrase_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.create_phrase_set.js,samples/README.md) | -| Adaptation.delete_custom_class | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.delete_custom_class.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.delete_custom_class.js,samples/README.md) | -| Adaptation.delete_phrase_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.delete_phrase_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.delete_phrase_set.js,samples/README.md) | -| Adaptation.get_custom_class | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.get_custom_class.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.get_custom_class.js,samples/README.md) | -| Adaptation.get_phrase_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.get_phrase_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.get_phrase_set.js,samples/README.md) | -| Adaptation.list_custom_classes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.list_custom_classes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.list_custom_classes.js,samples/README.md) | -| Adaptation.list_phrase_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.list_phrase_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.list_phrase_set.js,samples/README.md) | -| Adaptation.update_custom_class | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.update_custom_class.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.update_custom_class.js,samples/README.md) | -| Adaptation.update_phrase_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.update_phrase_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.update_phrase_set.js,samples/README.md) | -| Speech.long_running_recognize | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1p1beta1/speech.long_running_recognize.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1p1beta1/speech.long_running_recognize.js,samples/README.md) | -| Speech.recognize | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1p1beta1/speech.recognize.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1p1beta1/speech.recognize.js,samples/README.md) | -| Speech.streaming_recognize | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1p1beta1/speech.streaming_recognize.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1p1beta1/speech.streaming_recognize.js,samples/README.md) | -| Speech.batch_recognize | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.batch_recognize.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.batch_recognize.js,samples/README.md) | -| Speech.create_custom_class | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.create_custom_class.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.create_custom_class.js,samples/README.md) | -| Speech.create_phrase_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.create_phrase_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.create_phrase_set.js,samples/README.md) | -| Speech.create_recognizer | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.create_recognizer.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.create_recognizer.js,samples/README.md) | -| Speech.delete_custom_class | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.delete_custom_class.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.delete_custom_class.js,samples/README.md) | -| Speech.delete_phrase_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.delete_phrase_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.delete_phrase_set.js,samples/README.md) | -| Speech.delete_recognizer | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.delete_recognizer.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.delete_recognizer.js,samples/README.md) | -| Speech.get_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.get_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.get_config.js,samples/README.md) | -| Speech.get_custom_class | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.get_custom_class.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.get_custom_class.js,samples/README.md) | -| Speech.get_phrase_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.get_phrase_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.get_phrase_set.js,samples/README.md) | -| Speech.get_recognizer | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.get_recognizer.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.get_recognizer.js,samples/README.md) | -| Speech.list_custom_classes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.list_custom_classes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.list_custom_classes.js,samples/README.md) | -| Speech.list_phrase_sets | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.list_phrase_sets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.list_phrase_sets.js,samples/README.md) | -| Speech.list_recognizers | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.list_recognizers.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.list_recognizers.js,samples/README.md) | -| Speech.recognize | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.recognize.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.recognize.js,samples/README.md) | -| Speech.streaming_recognize | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.streaming_recognize.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.streaming_recognize.js,samples/README.md) | -| Speech.undelete_custom_class | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.undelete_custom_class.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.undelete_custom_class.js,samples/README.md) | -| Speech.undelete_phrase_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.undelete_phrase_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.undelete_phrase_set.js,samples/README.md) | -| Speech.undelete_recognizer | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.undelete_recognizer.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.undelete_recognizer.js,samples/README.md) | -| Speech.update_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.update_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.update_config.js,samples/README.md) | -| Speech.update_custom_class | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.update_custom_class.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.update_custom_class.js,samples/README.md) | -| Speech.update_phrase_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.update_phrase_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.update_phrase_set.js,samples/README.md) | -| Speech.update_recognizer | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.update_recognizer.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.update_recognizer.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/quickstart.js,samples/README.md) | -| Quickstart.test | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/test/quickstart.test.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/test/quickstart.test.js,samples/README.md) | +| Adaptation.create_custom_class | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1/adaptation.create_custom_class.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1/adaptation.create_custom_class.js,packages/google-cloud-speech/samples/README.md) | +| Adaptation.create_phrase_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1/adaptation.create_phrase_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1/adaptation.create_phrase_set.js,packages/google-cloud-speech/samples/README.md) | +| Adaptation.delete_custom_class | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1/adaptation.delete_custom_class.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1/adaptation.delete_custom_class.js,packages/google-cloud-speech/samples/README.md) | +| Adaptation.delete_phrase_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1/adaptation.delete_phrase_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1/adaptation.delete_phrase_set.js,packages/google-cloud-speech/samples/README.md) | +| Adaptation.get_custom_class | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1/adaptation.get_custom_class.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1/adaptation.get_custom_class.js,packages/google-cloud-speech/samples/README.md) | +| Adaptation.get_phrase_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1/adaptation.get_phrase_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1/adaptation.get_phrase_set.js,packages/google-cloud-speech/samples/README.md) | +| Adaptation.list_custom_classes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1/adaptation.list_custom_classes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1/adaptation.list_custom_classes.js,packages/google-cloud-speech/samples/README.md) | +| Adaptation.list_phrase_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1/adaptation.list_phrase_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1/adaptation.list_phrase_set.js,packages/google-cloud-speech/samples/README.md) | +| Adaptation.update_custom_class | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1/adaptation.update_custom_class.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1/adaptation.update_custom_class.js,packages/google-cloud-speech/samples/README.md) | +| Adaptation.update_phrase_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1/adaptation.update_phrase_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1/adaptation.update_phrase_set.js,packages/google-cloud-speech/samples/README.md) | +| Speech.long_running_recognize | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1/speech.long_running_recognize.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1/speech.long_running_recognize.js,packages/google-cloud-speech/samples/README.md) | +| Speech.recognize | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1/speech.recognize.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1/speech.recognize.js,packages/google-cloud-speech/samples/README.md) | +| Speech.streaming_recognize | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1/speech.streaming_recognize.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1/speech.streaming_recognize.js,packages/google-cloud-speech/samples/README.md) | +| Adaptation.create_custom_class | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.create_custom_class.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.create_custom_class.js,packages/google-cloud-speech/samples/README.md) | +| Adaptation.create_phrase_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.create_phrase_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.create_phrase_set.js,packages/google-cloud-speech/samples/README.md) | +| Adaptation.delete_custom_class | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.delete_custom_class.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.delete_custom_class.js,packages/google-cloud-speech/samples/README.md) | +| Adaptation.delete_phrase_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.delete_phrase_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.delete_phrase_set.js,packages/google-cloud-speech/samples/README.md) | +| Adaptation.get_custom_class | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.get_custom_class.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.get_custom_class.js,packages/google-cloud-speech/samples/README.md) | +| Adaptation.get_phrase_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.get_phrase_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.get_phrase_set.js,packages/google-cloud-speech/samples/README.md) | +| Adaptation.list_custom_classes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.list_custom_classes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.list_custom_classes.js,packages/google-cloud-speech/samples/README.md) | +| Adaptation.list_phrase_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.list_phrase_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.list_phrase_set.js,packages/google-cloud-speech/samples/README.md) | +| Adaptation.update_custom_class | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.update_custom_class.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.update_custom_class.js,packages/google-cloud-speech/samples/README.md) | +| Adaptation.update_phrase_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.update_phrase_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1p1beta1/adaptation.update_phrase_set.js,packages/google-cloud-speech/samples/README.md) | +| Speech.long_running_recognize | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1p1beta1/speech.long_running_recognize.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1p1beta1/speech.long_running_recognize.js,packages/google-cloud-speech/samples/README.md) | +| Speech.recognize | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1p1beta1/speech.recognize.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1p1beta1/speech.recognize.js,packages/google-cloud-speech/samples/README.md) | +| Speech.streaming_recognize | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v1p1beta1/speech.streaming_recognize.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v1p1beta1/speech.streaming_recognize.js,packages/google-cloud-speech/samples/README.md) | +| Speech.batch_recognize | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.batch_recognize.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.batch_recognize.js,packages/google-cloud-speech/samples/README.md) | +| Speech.create_custom_class | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.create_custom_class.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.create_custom_class.js,packages/google-cloud-speech/samples/README.md) | +| Speech.create_phrase_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.create_phrase_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.create_phrase_set.js,packages/google-cloud-speech/samples/README.md) | +| Speech.create_recognizer | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.create_recognizer.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.create_recognizer.js,packages/google-cloud-speech/samples/README.md) | +| Speech.delete_custom_class | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.delete_custom_class.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.delete_custom_class.js,packages/google-cloud-speech/samples/README.md) | +| Speech.delete_phrase_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.delete_phrase_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.delete_phrase_set.js,packages/google-cloud-speech/samples/README.md) | +| Speech.delete_recognizer | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.delete_recognizer.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.delete_recognizer.js,packages/google-cloud-speech/samples/README.md) | +| Speech.get_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.get_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.get_config.js,packages/google-cloud-speech/samples/README.md) | +| Speech.get_custom_class | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.get_custom_class.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.get_custom_class.js,packages/google-cloud-speech/samples/README.md) | +| Speech.get_phrase_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.get_phrase_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.get_phrase_set.js,packages/google-cloud-speech/samples/README.md) | +| Speech.get_recognizer | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.get_recognizer.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.get_recognizer.js,packages/google-cloud-speech/samples/README.md) | +| Speech.list_custom_classes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.list_custom_classes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.list_custom_classes.js,packages/google-cloud-speech/samples/README.md) | +| Speech.list_phrase_sets | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.list_phrase_sets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.list_phrase_sets.js,packages/google-cloud-speech/samples/README.md) | +| Speech.list_recognizers | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.list_recognizers.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.list_recognizers.js,packages/google-cloud-speech/samples/README.md) | +| Speech.recognize | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.recognize.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.recognize.js,packages/google-cloud-speech/samples/README.md) | +| Speech.streaming_recognize | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.streaming_recognize.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.streaming_recognize.js,packages/google-cloud-speech/samples/README.md) | +| Speech.undelete_custom_class | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.undelete_custom_class.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.undelete_custom_class.js,packages/google-cloud-speech/samples/README.md) | +| Speech.undelete_phrase_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.undelete_phrase_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.undelete_phrase_set.js,packages/google-cloud-speech/samples/README.md) | +| Speech.undelete_recognizer | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.undelete_recognizer.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.undelete_recognizer.js,packages/google-cloud-speech/samples/README.md) | +| Speech.update_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.update_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.update_config.js,packages/google-cloud-speech/samples/README.md) | +| Speech.update_custom_class | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.update_custom_class.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.update_custom_class.js,packages/google-cloud-speech/samples/README.md) | +| Speech.update_phrase_set | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.update_phrase_set.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.update_phrase_set.js,packages/google-cloud-speech/samples/README.md) | +| Speech.update_recognizer | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/generated/v2/speech.update_recognizer.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/generated/v2/speech.update_recognizer.js,packages/google-cloud-speech/samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/quickstart.js,packages/google-cloud-speech/samples/README.md) | diff --git a/packages/google-cloud-speech/package.json b/packages/google-cloud-speech/package.json index bde73ec7b8b..a3fa21c0933 100644 --- a/packages/google-cloud-speech/package.json +++ b/packages/google-cloud-speech/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/speech", "description": "Cloud Speech Client Library for Node.js", - "version": "5.4.1", + "version": "5.5.0", "license": "Apache-2.0", "author": "Google Inc.", "engines": { @@ -34,21 +34,20 @@ "Google Cloud Speech API" ], "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", - "lint": "gts check", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test/*.js", - "fix": "gts fix", - "docs-test": "linkinator docs", "predocs-test": "npm run docs", - "compile": "tsc -p . && cp system-test/*.js build/system-test/ && cp -r protos build/ && minifyProtoJson", - "compile-protos": "compileProtos src", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "pretest": "npm run compile", - "prelint": "cd samples; npm link ../; npm install", - "clean": "gts clean", - "precompile": "gts clean" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "@google-cloud/common": "^4.0.0", @@ -69,6 +68,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -79,5 +79,4 @@ "webpack-cli": "^5.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-speech" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-speech/protos/google/cloud/speech/v2/cloud_speech.proto b/packages/google-cloud-speech/protos/google/cloud/speech/v2/cloud_speech.proto index 2ad8e4e7918..490b46a127b 100644 --- a/packages/google-cloud-speech/protos/google/cloud/speech/v2/cloud_speech.proto +++ b/packages/google-cloud-speech/protos/google/cloud/speech/v2/cloud_speech.proto @@ -444,8 +444,8 @@ message ListRecognizersRequest { ]; // The maximum number of Recognizers to return. The service may return fewer - // than this value. If unspecified, at most 20 Recognizers will be returned. - // The maximum value is 20; values above 20 will be coerced to 20. + // than this value. If unspecified, at most 5 Recognizers will be returned. + // The maximum value is 100; values above 100 will be coerced to 100. int32 page_size = 2; // A page token, received from a previous @@ -588,56 +588,19 @@ message Recognizer { // Required. Which model to use for recognition requests. Select the model // best suited to your domain to get best results. // - // Supported models: - // - // - `latest_long` - // - // Best for long form content like media or conversation. - // - // - `latest_short` - // - // Best for short form content like commands or single shot directed speech. - // When using this model, the service will stop transcribing audio after the - // first utterance is detected and completed. - // - // When using this model, - // [SEPARATE_RECOGNITION_PER_CHANNEL][google.cloud.speech.v2.RecognitionFeatures.MultiChannelMode.SEPARATE_RECOGNITION_PER_CHANNEL] - // is not supported; multi-channel audio is accepted, but only the first - // channel will be processed and transcribed. - // - // - `telephony` - // - // Best for audio that originated from a phone call (typically recorded at - // an 8khz sampling rate). - // - // - `medical_conversation` - // - // For conversations between a medical provider—for example, a doctor or - // nurse—and a patient. Use this model when both a provider and a patient - // are speaking. Words uttered by each speaker are automatically detected - // and labeled in the returned transcript. - // - // For supported features please see [medical models - // documentation](https://cloud.google.com/speech-to-text/docs/medical-models). - // - // - `medical_dictation` - // - // For dictated notes spoken by a single medical provider—for example, a - // doctor dictating notes about a patient's blood test results. - // - // For supported features please see [medical models - // documentation](https://cloud.google.com/speech-to-text/docs/medical-models). - // - // - `usm` - // - // The next generation of Speech-to-Text models from Google. + // Guidance for choosing which model to use can be found in the [Transcription + // Models + // Documentation](https://cloud.google.com/speech-to-text/v2/docs/transcription-model) + // and the models supported in each region can be found in the [Table Of + // Supported + // Models](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages). string model = 4 [(google.api.field_behavior) = REQUIRED]; // Required. The language of the supplied audio as a // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. // - // Supported languages for each model are listed at: - // https://cloud.google.com/speech-to-text/docs/languages + // Supported languages for each model are listed in the [Table of Supported + // Models](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages). // // If additional languages are provided, recognition result will contain // recognition in the most likely language detected. The recognition result @@ -1178,6 +1141,17 @@ message StreamingRecognizeRequest { // [BatchRecognize][google.cloud.speech.v2.Speech.BatchRecognize] // method. message BatchRecognizeRequest { + // Possible processing strategies for batch requests. + enum ProcessingStrategy { + // Default value for the processing strategy. The request is processed as + // soon as its received. + PROCESSING_STRATEGY_UNSPECIFIED = 0; + + // If selected, processes the request during lower utilization periods for a + // price discount. The request is fulfilled within 24 hours. + DYNAMIC_BATCHING = 1; + } + // Required. Resource name of the recognizer to be used for ASR. string recognizer = 1 [ (google.api.field_behavior) = REQUIRED, @@ -1215,6 +1189,9 @@ message BatchRecognizeRequest { // Configuration options for where to output the transcripts of each file. RecognitionOutputConfig recognition_output_config = 6; + + // Processing strategy to use for this request. + ProcessingStrategy processing_strategy = 7; } // Output configurations for Cloud Storage. @@ -1793,10 +1770,10 @@ message ListCustomClassesRequest { } ]; - // Number of results per requests. A valid page_size ranges from 0 to 20 + // Number of results per requests. A valid page_size ranges from 0 to 100 // inclusive. If the page_size is zero or unspecified, a page size of 5 will - // be chosen. If the page size exceeds 20, it will be coerced down to 20. Note - // that a call might return fewer results than the requested page size. + // be chosen. If the page size exceeds 100, it will be coerced down to 100. + // Note that a call might return fewer results than the requested page size. int32 page_size = 2; // A page token, received from a previous @@ -1948,8 +1925,8 @@ message ListPhraseSetsRequest { ]; // The maximum number of PhraseSets to return. The service may return fewer - // than this value. If unspecified, at most 20 PhraseSets will be returned. - // The maximum value is 20; values above 20 will be coerced to 20. + // than this value. If unspecified, at most 5 PhraseSets will be returned. + // The maximum value is 100; values above 100 will be coerced to 100. int32 page_size = 2; // A page token, received from a previous diff --git a/packages/google-cloud-speech/protos/protos.d.ts b/packages/google-cloud-speech/protos/protos.d.ts index 1f7a8f011f5..cf3a47feb16 100644 --- a/packages/google-cloud-speech/protos/protos.d.ts +++ b/packages/google-cloud-speech/protos/protos.d.ts @@ -13178,6 +13178,9 @@ export namespace google { /** BatchRecognizeRequest recognitionOutputConfig */ recognitionOutputConfig?: (google.cloud.speech.v2.IRecognitionOutputConfig|null); + + /** BatchRecognizeRequest processingStrategy */ + processingStrategy?: (google.cloud.speech.v2.BatchRecognizeRequest.ProcessingStrategy|keyof typeof google.cloud.speech.v2.BatchRecognizeRequest.ProcessingStrategy|null); } /** Represents a BatchRecognizeRequest. */ @@ -13204,6 +13207,9 @@ export namespace google { /** BatchRecognizeRequest recognitionOutputConfig. */ public recognitionOutputConfig?: (google.cloud.speech.v2.IRecognitionOutputConfig|null); + /** BatchRecognizeRequest processingStrategy. */ + public processingStrategy: (google.cloud.speech.v2.BatchRecognizeRequest.ProcessingStrategy|keyof typeof google.cloud.speech.v2.BatchRecognizeRequest.ProcessingStrategy); + /** * Creates a new BatchRecognizeRequest instance using the specified properties. * @param [properties] Properties to set @@ -13282,6 +13288,15 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace BatchRecognizeRequest { + + /** ProcessingStrategy enum. */ + enum ProcessingStrategy { + PROCESSING_STRATEGY_UNSPECIFIED = 0, + DYNAMIC_BATCHING = 1 + } + } + /** Properties of a GcsOutputConfig. */ interface IGcsOutputConfig { diff --git a/packages/google-cloud-speech/protos/protos.js b/packages/google-cloud-speech/protos/protos.js index 92c39202f34..3f4ce320d44 100644 --- a/packages/google-cloud-speech/protos/protos.js +++ b/packages/google-cloud-speech/protos/protos.js @@ -32271,6 +32271,7 @@ * @property {google.protobuf.IFieldMask|null} [configMask] BatchRecognizeRequest configMask * @property {Array.|null} [files] BatchRecognizeRequest files * @property {google.cloud.speech.v2.IRecognitionOutputConfig|null} [recognitionOutputConfig] BatchRecognizeRequest recognitionOutputConfig + * @property {google.cloud.speech.v2.BatchRecognizeRequest.ProcessingStrategy|null} [processingStrategy] BatchRecognizeRequest processingStrategy */ /** @@ -32329,6 +32330,14 @@ */ BatchRecognizeRequest.prototype.recognitionOutputConfig = null; + /** + * BatchRecognizeRequest processingStrategy. + * @member {google.cloud.speech.v2.BatchRecognizeRequest.ProcessingStrategy} processingStrategy + * @memberof google.cloud.speech.v2.BatchRecognizeRequest + * @instance + */ + BatchRecognizeRequest.prototype.processingStrategy = 0; + /** * Creates a new BatchRecognizeRequest instance using the specified properties. * @function create @@ -32364,6 +32373,8 @@ $root.google.protobuf.FieldMask.encode(message.configMask, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.recognitionOutputConfig != null && Object.hasOwnProperty.call(message, "recognitionOutputConfig")) $root.google.cloud.speech.v2.RecognitionOutputConfig.encode(message.recognitionOutputConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.processingStrategy != null && Object.hasOwnProperty.call(message, "processingStrategy")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.processingStrategy); return writer; }; @@ -32420,6 +32431,10 @@ message.recognitionOutputConfig = $root.google.cloud.speech.v2.RecognitionOutputConfig.decode(reader, reader.uint32()); break; } + case 7: { + message.processingStrategy = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -32482,6 +32497,14 @@ if (error) return "recognitionOutputConfig." + error; } + if (message.processingStrategy != null && message.hasOwnProperty("processingStrategy")) + switch (message.processingStrategy) { + default: + return "processingStrategy: enum value expected"; + case 0: + case 1: + break; + } return null; }; @@ -32524,6 +32547,22 @@ throw TypeError(".google.cloud.speech.v2.BatchRecognizeRequest.recognitionOutputConfig: object expected"); message.recognitionOutputConfig = $root.google.cloud.speech.v2.RecognitionOutputConfig.fromObject(object.recognitionOutputConfig); } + switch (object.processingStrategy) { + default: + if (typeof object.processingStrategy === "number") { + message.processingStrategy = object.processingStrategy; + break; + } + break; + case "PROCESSING_STRATEGY_UNSPECIFIED": + case 0: + message.processingStrategy = 0; + break; + case "DYNAMIC_BATCHING": + case 1: + message.processingStrategy = 1; + break; + } return message; }; @@ -32547,6 +32586,7 @@ object.config = null; object.configMask = null; object.recognitionOutputConfig = null; + object.processingStrategy = options.enums === String ? "PROCESSING_STRATEGY_UNSPECIFIED" : 0; } if (message.recognizer != null && message.hasOwnProperty("recognizer")) object.recognizer = message.recognizer; @@ -32561,6 +32601,8 @@ object.configMask = $root.google.protobuf.FieldMask.toObject(message.configMask, options); if (message.recognitionOutputConfig != null && message.hasOwnProperty("recognitionOutputConfig")) object.recognitionOutputConfig = $root.google.cloud.speech.v2.RecognitionOutputConfig.toObject(message.recognitionOutputConfig, options); + if (message.processingStrategy != null && message.hasOwnProperty("processingStrategy")) + object.processingStrategy = options.enums === String ? $root.google.cloud.speech.v2.BatchRecognizeRequest.ProcessingStrategy[message.processingStrategy] === undefined ? message.processingStrategy : $root.google.cloud.speech.v2.BatchRecognizeRequest.ProcessingStrategy[message.processingStrategy] : message.processingStrategy; return object; }; @@ -32590,6 +32632,20 @@ return typeUrlPrefix + "/google.cloud.speech.v2.BatchRecognizeRequest"; }; + /** + * ProcessingStrategy enum. + * @name google.cloud.speech.v2.BatchRecognizeRequest.ProcessingStrategy + * @enum {number} + * @property {number} PROCESSING_STRATEGY_UNSPECIFIED=0 PROCESSING_STRATEGY_UNSPECIFIED value + * @property {number} DYNAMIC_BATCHING=1 DYNAMIC_BATCHING value + */ + BatchRecognizeRequest.ProcessingStrategy = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROCESSING_STRATEGY_UNSPECIFIED"] = 0; + values[valuesById[1] = "DYNAMIC_BATCHING"] = 1; + return values; + })(); + return BatchRecognizeRequest; })(); diff --git a/packages/google-cloud-speech/protos/protos.json b/packages/google-cloud-speech/protos/protos.json index 0432827eb58..4e684e4ec7a 100644 --- a/packages/google-cloud-speech/protos/protos.json +++ b/packages/google-cloud-speech/protos/protos.json @@ -3705,6 +3705,18 @@ "recognitionOutputConfig": { "type": "RecognitionOutputConfig", "id": 6 + }, + "processingStrategy": { + "type": "ProcessingStrategy", + "id": 7 + } + }, + "nested": { + "ProcessingStrategy": { + "values": { + "PROCESSING_STRATEGY_UNSPECIFIED": 0, + "DYNAMIC_BATCHING": 1 + } } } }, diff --git a/packages/google-cloud-speech/samples/README.md b/packages/google-cloud-speech/samples/README.md index 4733a180f41..6fc8c70e191 100644 --- a/packages/google-cloud-speech/samples/README.md +++ b/packages/google-cloud-speech/samples/README.md @@ -62,7 +62,6 @@ * [Speech.update_phrase_set](#speech.update_phrase_set) * [Speech.update_recognizer](#speech.update_recognizer) * [Quickstart](#quickstart) - * [Quickstart.test](#quickstart.test) ## Before you begin @@ -924,23 +923,6 @@ __Usage:__ `node packages/google-cloud-speech/samples/quickstart.js` ------ - - - - -### Quickstart.test - -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-speech/samples/test/quickstart.test.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-speech/samples/test/quickstart.test.js,samples/README.md) - -__Usage:__ - - -`node packages/google-cloud-speech/samples/test/quickstart.test.js` - - diff --git a/packages/google-cloud-speech/samples/generated/v1/snippet_metadata.google.cloud.speech.v1.json b/packages/google-cloud-speech/samples/generated/v1/snippet_metadata.google.cloud.speech.v1.json index c47bc924f18..bdc1891aa36 100644 --- a/packages/google-cloud-speech/samples/generated/v1/snippet_metadata.google.cloud.speech.v1.json +++ b/packages/google-cloud-speech/samples/generated/v1/snippet_metadata.google.cloud.speech.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-speech", - "version": "5.4.0", + "version": "5.5.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-speech/samples/generated/v1p1beta1/snippet_metadata.google.cloud.speech.v1p1beta1.json b/packages/google-cloud-speech/samples/generated/v1p1beta1/snippet_metadata.google.cloud.speech.v1p1beta1.json index 7f5bfded480..871fae9cd16 100644 --- a/packages/google-cloud-speech/samples/generated/v1p1beta1/snippet_metadata.google.cloud.speech.v1p1beta1.json +++ b/packages/google-cloud-speech/samples/generated/v1p1beta1/snippet_metadata.google.cloud.speech.v1p1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-speech", - "version": "5.4.0", + "version": "5.5.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-speech/samples/generated/v2/snippet_metadata.google.cloud.speech.v2.json b/packages/google-cloud-speech/samples/generated/v2/snippet_metadata.google.cloud.speech.v2.json index e03ec17438d..2b402a14e94 100644 --- a/packages/google-cloud-speech/samples/generated/v2/snippet_metadata.google.cloud.speech.v2.json +++ b/packages/google-cloud-speech/samples/generated/v2/snippet_metadata.google.cloud.speech.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-speech", - "version": "5.4.0", + "version": "5.5.0", "language": "TYPESCRIPT", "apis": [ { @@ -418,7 +418,7 @@ "segments": [ { "start": 25, - "end": 88, + "end": 92, "type": "FULL" } ], @@ -446,6 +446,10 @@ { "name": "recognition_output_config", "type": ".google.cloud.speech.v2.RecognitionOutputConfig" + }, + { + "name": "processing_strategy", + "type": ".google.cloud.speech.v2.BatchRecognizeRequest.ProcessingStrategy" } ], "resultType": ".google.longrunning.Operation", diff --git a/packages/google-cloud-speech/samples/generated/v2/speech.batch_recognize.js b/packages/google-cloud-speech/samples/generated/v2/speech.batch_recognize.js index 4c3e36d4b04..3b8deec0c54 100644 --- a/packages/google-cloud-speech/samples/generated/v2/speech.batch_recognize.js +++ b/packages/google-cloud-speech/samples/generated/v2/speech.batch_recognize.js @@ -66,6 +66,10 @@ function main(recognizer) { * Configuration options for where to output the transcripts of each file. */ // const recognitionOutputConfig = {} + /** + * Processing strategy to use for this request. + */ + // const processingStrategy = {} // Imports the Speech library const {SpeechClient} = require('@google-cloud/speech').v2; diff --git a/packages/google-cloud-speech/samples/generated/v2/speech.list_custom_classes.js b/packages/google-cloud-speech/samples/generated/v2/speech.list_custom_classes.js index 275b5920592..74298dc7804 100644 --- a/packages/google-cloud-speech/samples/generated/v2/speech.list_custom_classes.js +++ b/packages/google-cloud-speech/samples/generated/v2/speech.list_custom_classes.js @@ -34,10 +34,10 @@ function main(parent) { */ // const parent = 'abc123' /** - * Number of results per requests. A valid page_size ranges from 0 to 20 + * Number of results per requests. A valid page_size ranges from 0 to 100 * inclusive. If the page_size is zero or unspecified, a page size of 5 will - * be chosen. If the page size exceeds 20, it will be coerced down to 20. Note - * that a call might return fewer results than the requested page size. + * be chosen. If the page size exceeds 100, it will be coerced down to 100. + * Note that a call might return fewer results than the requested page size. */ // const pageSize = 1234 /** diff --git a/packages/google-cloud-speech/samples/generated/v2/speech.list_phrase_sets.js b/packages/google-cloud-speech/samples/generated/v2/speech.list_phrase_sets.js index e4f73a9e8cf..872d1627053 100644 --- a/packages/google-cloud-speech/samples/generated/v2/speech.list_phrase_sets.js +++ b/packages/google-cloud-speech/samples/generated/v2/speech.list_phrase_sets.js @@ -35,8 +35,8 @@ function main(parent) { // const parent = 'abc123' /** * The maximum number of PhraseSets to return. The service may return fewer - * than this value. If unspecified, at most 20 PhraseSets will be returned. - * The maximum value is 20; values above 20 will be coerced to 20. + * than this value. If unspecified, at most 5 PhraseSets will be returned. + * The maximum value is 100; values above 100 will be coerced to 100. */ // const pageSize = 1234 /** diff --git a/packages/google-cloud-speech/samples/generated/v2/speech.list_recognizers.js b/packages/google-cloud-speech/samples/generated/v2/speech.list_recognizers.js index 94b2123e8db..262fb293be5 100644 --- a/packages/google-cloud-speech/samples/generated/v2/speech.list_recognizers.js +++ b/packages/google-cloud-speech/samples/generated/v2/speech.list_recognizers.js @@ -35,8 +35,8 @@ function main(parent) { // const parent = 'abc123' /** * The maximum number of Recognizers to return. The service may return fewer - * than this value. If unspecified, at most 20 Recognizers will be returned. - * The maximum value is 20; values above 20 will be coerced to 20. + * than this value. If unspecified, at most 5 Recognizers will be returned. + * The maximum value is 100; values above 100 will be coerced to 100. */ // const pageSize = 1234 /** diff --git a/packages/google-cloud-speech/samples/package.json b/packages/google-cloud-speech/samples/package.json index 8ff76ba2cb4..d8836bd07fd 100644 --- a/packages/google-cloud-speech/samples/package.json +++ b/packages/google-cloud-speech/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha test --timeout 600000" }, "dependencies": { - "@google-cloud/speech": "^5.4.1", + "@google-cloud/speech": "^5.5.0", "@google-cloud/storage": "^6.0.0", "chalk": "^5.0.0", "fs.promises": "^0.1.2", diff --git a/packages/google-cloud-speech/src/v2/speech_client.ts b/packages/google-cloud-speech/src/v2/speech_client.ts index b4d9eb69f83..4564afac7e1 100644 --- a/packages/google-cloud-speech/src/v2/speech_client.ts +++ b/packages/google-cloud-speech/src/v2/speech_client.ts @@ -1808,6 +1808,8 @@ export class SpeechClient { * The maximum number of files allowed to be specified is 5. * @param {google.cloud.speech.v2.RecognitionOutputConfig} request.recognitionOutputConfig * Configuration options for where to output the transcripts of each file. + * @param {google.cloud.speech.v2.BatchRecognizeRequest.ProcessingStrategy} request.processingStrategy + * Processing strategy to use for this 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. @@ -3136,8 +3138,8 @@ export class SpeechClient { * format is `projects/{project}/locations/{location}`. * @param {number} request.pageSize * The maximum number of Recognizers to return. The service may return fewer - * than this value. If unspecified, at most 20 Recognizers will be returned. - * The maximum value is 20; values above 20 will be coerced to 20. + * than this value. If unspecified, at most 5 Recognizers will be returned. + * The maximum value is 100; values above 100 will be coerced to 100. * @param {string} request.pageToken * A page token, received from a previous * {@link google.cloud.speech.v2.Speech.ListRecognizers|ListRecognizers} call. @@ -3239,8 +3241,8 @@ export class SpeechClient { * format is `projects/{project}/locations/{location}`. * @param {number} request.pageSize * The maximum number of Recognizers to return. The service may return fewer - * than this value. If unspecified, at most 20 Recognizers will be returned. - * The maximum value is 20; values above 20 will be coerced to 20. + * than this value. If unspecified, at most 5 Recognizers will be returned. + * The maximum value is 100; values above 100 will be coerced to 100. * @param {string} request.pageToken * A page token, received from a previous * {@link google.cloud.speech.v2.Speech.ListRecognizers|ListRecognizers} call. @@ -3296,8 +3298,8 @@ export class SpeechClient { * format is `projects/{project}/locations/{location}`. * @param {number} request.pageSize * The maximum number of Recognizers to return. The service may return fewer - * than this value. If unspecified, at most 20 Recognizers will be returned. - * The maximum value is 20; values above 20 will be coerced to 20. + * than this value. If unspecified, at most 5 Recognizers will be returned. + * The maximum value is 100; values above 100 will be coerced to 100. * @param {string} request.pageToken * A page token, received from a previous * {@link google.cloud.speech.v2.Speech.ListRecognizers|ListRecognizers} call. @@ -3351,10 +3353,10 @@ export class SpeechClient { * Required. The project and location of CustomClass resources to list. The * expected format is `projects/{project}/locations/{location}`. * @param {number} request.pageSize - * Number of results per requests. A valid page_size ranges from 0 to 20 + * Number of results per requests. A valid page_size ranges from 0 to 100 * inclusive. If the page_size is zero or unspecified, a page size of 5 will - * be chosen. If the page size exceeds 20, it will be coerced down to 20. Note - * that a call might return fewer results than the requested page size. + * be chosen. If the page size exceeds 100, it will be coerced down to 100. + * Note that a call might return fewer results than the requested page size. * @param {string} request.pageToken * A page token, received from a previous * {@link google.cloud.speech.v2.Speech.ListCustomClasses|ListCustomClasses} call. @@ -3461,10 +3463,10 @@ export class SpeechClient { * Required. The project and location of CustomClass resources to list. The * expected format is `projects/{project}/locations/{location}`. * @param {number} request.pageSize - * Number of results per requests. A valid page_size ranges from 0 to 20 + * Number of results per requests. A valid page_size ranges from 0 to 100 * inclusive. If the page_size is zero or unspecified, a page size of 5 will - * be chosen. If the page size exceeds 20, it will be coerced down to 20. Note - * that a call might return fewer results than the requested page size. + * be chosen. If the page size exceeds 100, it will be coerced down to 100. + * Note that a call might return fewer results than the requested page size. * @param {string} request.pageToken * A page token, received from a previous * {@link google.cloud.speech.v2.Speech.ListCustomClasses|ListCustomClasses} call. @@ -3519,10 +3521,10 @@ export class SpeechClient { * Required. The project and location of CustomClass resources to list. The * expected format is `projects/{project}/locations/{location}`. * @param {number} request.pageSize - * Number of results per requests. A valid page_size ranges from 0 to 20 + * Number of results per requests. A valid page_size ranges from 0 to 100 * inclusive. If the page_size is zero or unspecified, a page size of 5 will - * be chosen. If the page size exceeds 20, it will be coerced down to 20. Note - * that a call might return fewer results than the requested page size. + * be chosen. If the page size exceeds 100, it will be coerced down to 100. + * Note that a call might return fewer results than the requested page size. * @param {string} request.pageToken * A page token, received from a previous * {@link google.cloud.speech.v2.Speech.ListCustomClasses|ListCustomClasses} call. @@ -3577,8 +3579,8 @@ export class SpeechClient { * expected format is `projects/{project}/locations/{location}`. * @param {number} request.pageSize * The maximum number of PhraseSets to return. The service may return fewer - * than this value. If unspecified, at most 20 PhraseSets will be returned. - * The maximum value is 20; values above 20 will be coerced to 20. + * than this value. If unspecified, at most 5 PhraseSets will be returned. + * The maximum value is 100; values above 100 will be coerced to 100. * @param {string} request.pageToken * A page token, received from a previous * {@link google.cloud.speech.v2.Speech.ListPhraseSets|ListPhraseSets} call. @@ -3680,8 +3682,8 @@ export class SpeechClient { * expected format is `projects/{project}/locations/{location}`. * @param {number} request.pageSize * The maximum number of PhraseSets to return. The service may return fewer - * than this value. If unspecified, at most 20 PhraseSets will be returned. - * The maximum value is 20; values above 20 will be coerced to 20. + * than this value. If unspecified, at most 5 PhraseSets will be returned. + * The maximum value is 100; values above 100 will be coerced to 100. * @param {string} request.pageToken * A page token, received from a previous * {@link google.cloud.speech.v2.Speech.ListPhraseSets|ListPhraseSets} call. @@ -3737,8 +3739,8 @@ export class SpeechClient { * expected format is `projects/{project}/locations/{location}`. * @param {number} request.pageSize * The maximum number of PhraseSets to return. The service may return fewer - * than this value. If unspecified, at most 20 PhraseSets will be returned. - * The maximum value is 20; values above 20 will be coerced to 20. + * than this value. If unspecified, at most 5 PhraseSets will be returned. + * The maximum value is 100; values above 100 will be coerced to 100. * @param {string} request.pageToken * A page token, received from a previous * {@link google.cloud.speech.v2.Speech.ListPhraseSets|ListPhraseSets} call. diff --git a/packages/google-cloud-storageinsights/.OwlBot.yaml b/packages/google-cloud-storageinsights/.OwlBot.yaml new file mode 100644 index 00000000000..a0309a68ec8 --- /dev/null +++ b/packages/google-cloud-storageinsights/.OwlBot.yaml @@ -0,0 +1,19 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# 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. + +deep-copy-regex: + - source: /google/cloud/storageinsights/(.*)/.*-nodejs + dest: /owl-bot-staging/google-cloud-storageinsights/$1 + +api-name: storageinsights \ No newline at end of file diff --git a/packages/google-cloud-storageinsights/.eslintignore b/packages/google-cloud-storageinsights/.eslintignore new file mode 100644 index 00000000000..ea5b04aebe6 --- /dev/null +++ b/packages/google-cloud-storageinsights/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ +samples/generated/ diff --git a/packages/google-cloud-storageinsights/.eslintrc.json b/packages/google-cloud-storageinsights/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/packages/google-cloud-storageinsights/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-cloud-storageinsights/.gitattributes b/packages/google-cloud-storageinsights/.gitattributes new file mode 100644 index 00000000000..33739cb74e4 --- /dev/null +++ b/packages/google-cloud-storageinsights/.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-storageinsights/.gitignore b/packages/google-cloud-storageinsights/.gitignore new file mode 100644 index 00000000000..d4f03a0df2e --- /dev/null +++ b/packages/google-cloud-storageinsights/.gitignore @@ -0,0 +1,14 @@ +**/*.log +**/node_modules +/.coverage +/coverage +/.nyc_output +/docs/ +/out/ +/build/ +system-test/secrets.js +system-test/*key.json +*.lock +.DS_Store +package-lock.json +__pycache__ diff --git a/packages/google-cloud-storageinsights/.jsdoc.js b/packages/google-cloud-storageinsights/.jsdoc.js new file mode 100644 index 00000000000..e3d959b9b37 --- /dev/null +++ b/packages/google-cloud-storageinsights/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2023 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'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/jsdoc-fresh', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown', + 'jsdoc-region-tag' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'build/src', + 'protos' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2023 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/storageinsights', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/google-cloud-storageinsights/.mocharc.js b/packages/google-cloud-storageinsights/.mocharc.js new file mode 100644 index 00000000000..49e7e228701 --- /dev/null +++ b/packages/google-cloud-storageinsights/.mocharc.js @@ -0,0 +1,29 @@ +// Copyright 2023 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. +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000, + "recursive": true +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/packages/google-cloud-storageinsights/.nycrc b/packages/google-cloud-storageinsights/.nycrc new file mode 100644 index 00000000000..b18d5472b62 --- /dev/null +++ b/packages/google-cloud-storageinsights/.nycrc @@ -0,0 +1,24 @@ +{ + "report-dir": "./.coverage", + "reporter": ["text", "lcov"], + "exclude": [ + "**/*-test", + "**/.coverage", + "**/apis", + "**/benchmark", + "**/conformance", + "**/docs", + "**/samples", + "**/scripts", + "**/protos", + "**/test", + "**/*.d.ts", + ".jsdoc.js", + "**/.jsdoc.js", + "karma.conf.js", + "webpack-tests.config.js", + "webpack.config.js" + ], + "exclude-after-remap": false, + "all": true +} diff --git a/packages/google-cloud-storageinsights/.prettierignore b/packages/google-cloud-storageinsights/.prettierignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/packages/google-cloud-storageinsights/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-storageinsights/.prettierrc.js b/packages/google-cloud-storageinsights/.prettierrc.js new file mode 100644 index 00000000000..1e6cec783e4 --- /dev/null +++ b/packages/google-cloud-storageinsights/.prettierrc.js @@ -0,0 +1,17 @@ +// Copyright 2023 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. + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/packages/google-cloud-storageinsights/.repo-metadata.json b/packages/google-cloud-storageinsights/.repo-metadata.json new file mode 100644 index 00000000000..4a5132639e2 --- /dev/null +++ b/packages/google-cloud-storageinsights/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "name": "storageinsights", + "name_pretty": "Storage Insights API", + "product_documentation": "https://cloud.google.com/storage/docs/insights/storage-insights", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/storageinsights/latest", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", + "release_level": "preview", + "language": "nodejs", + "repo": "googleapis/google-cloud-node", + "distribution_name": "@google-cloud/storageinsights", + "api_id": "storageinsights.googleapis.com", + "default_version": "v1", + "requires_billing": true, + "library_type": "GAPIC_AUTO", + "api_shortname": "storageinsights" +} + diff --git a/packages/google-cloud-storageinsights/CHANGELOG.md b/packages/google-cloud-storageinsights/CHANGELOG.md new file mode 100644 index 00000000000..6744852dfe5 --- /dev/null +++ b/packages/google-cloud-storageinsights/CHANGELOG.md @@ -0,0 +1,15 @@ +# Changelog + +## [0.1.1](https://github.com/googleapis/google-cloud-node/compare/storageinsights-v0.1.0...storageinsights-v0.1.1) (2023-05-09) + + +### Bug Fixes + +* **build:** Address typo in package.json ([405cbe2](https://github.com/googleapis/google-cloud-node/commit/405cbe236171808ca3b49faa933c2078bebd09d6)) + +## 0.1.0 (2023-05-09) + + +### Features + +* Add initial files for google.cloud.storageinsights.v1 ([#4243](https://github.com/googleapis/google-cloud-node/issues/4243)) ([871c86f](https://github.com/googleapis/google-cloud-node/commit/871c86f8524d9afc6aec29dbc00f2cd3eaf0445b)) diff --git a/packages/google-cloud-storageinsights/CODE_OF_CONDUCT.md b/packages/google-cloud-storageinsights/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..2add2547a81 --- /dev/null +++ b/packages/google-cloud-storageinsights/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-storageinsights/CONTRIBUTING.md b/packages/google-cloud-storageinsights/CONTRIBUTING.md new file mode 100644 index 00000000000..0cea51b6feb --- /dev/null +++ b/packages/google-cloud-storageinsights/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 Storage Insights API 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=storageinsights.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-storageinsights/LICENSE b/packages/google-cloud-storageinsights/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/packages/google-cloud-storageinsights/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-storageinsights/README.md b/packages/google-cloud-storageinsights/README.md new file mode 100644 index 00000000000..bd78c4d93a3 --- /dev/null +++ b/packages/google-cloud-storageinsights/README.md @@ -0,0 +1,197 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [Storage Insights API: Node.js Client](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-storageinsights) + +[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![npm version](https://img.shields.io/npm/v/@google-cloud/storageinsights.svg)](https://www.npmjs.org/package/@google-cloud/storageinsights) + + + + +Storage Insights API client for Node.js + + +A comprehensive list of changes in each version may be found in +[the CHANGELOG](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-storageinsights/CHANGELOG.md). + +* [Storage Insights API Node.js Client API Reference][client-docs] +* [Storage Insights API Documentation][product-docs] +* [github.com/googleapis/google-cloud-node/packages/google-cloud-storageinsights](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-storageinsights) + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + + +* [Quickstart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + * [Using the client library](#using-the-client-library) +* [Samples](#samples) +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Storage Insights API API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + +### Installing the client library + +```bash +npm install @google-cloud/storageinsights +``` + + +### Using the client library + +```javascript +/** + * 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. Parent value for ListReportConfigsRequest + */ +// const parent = 'abc123' +/** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + */ +// const pageSize = 1234 +/** + * A token identifying a page of results the server should return. + */ +// const pageToken = 'abc123' +/** + * Filtering results + */ +// const filter = 'abc123' +/** + * Hint for how to order the results + */ +// const orderBy = 'abc123' + +// Imports the Storageinsights library +const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1; + +// Instantiates a client +const storageinsightsClient = new StorageInsightsClient(); + +async function callListReportConfigs() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await storageinsightsClient.listReportConfigsAsync( + request + ); + for await (const response of iterable) { + console.log(response); + } +} + +callListReportConfigs(); + +``` + + + +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-storageinsights/samples) directory. Each sample's `README.md` has instructions for running its sample. + +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Storage_insights.create_report_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.create_report_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.create_report_config.js,packages/google-cloud-storageinsights/samples/README.md) | +| Storage_insights.delete_report_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.delete_report_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.delete_report_config.js,packages/google-cloud-storageinsights/samples/README.md) | +| Storage_insights.get_report_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.get_report_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.get_report_config.js,packages/google-cloud-storageinsights/samples/README.md) | +| Storage_insights.get_report_detail | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.get_report_detail.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.get_report_detail.js,packages/google-cloud-storageinsights/samples/README.md) | +| Storage_insights.list_report_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.list_report_configs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.list_report_configs.js,packages/google-cloud-storageinsights/samples/README.md) | +| Storage_insights.list_report_details | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.list_report_details.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.list_report_details.js,packages/google-cloud-storageinsights/samples/README.md) | +| Storage_insights.update_report_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.update_report_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.update_report_config.js,packages/google-cloud-storageinsights/samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-storageinsights/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-storageinsights/samples/quickstart.js,packages/google-cloud-storageinsights/samples/README.md) | + + + +The [Storage Insights API Node.js Client API Reference][client-docs] documentation +also contains samples. + +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. +If you are using an end-of-life version of Node.js, we recommend that you update +as soon as possible to an actively supported LTS version. + +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: + +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. + +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. +For example, `npm install @google-cloud/storageinsights@legacy-8` installs client libraries +for versions compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + + + + + + + +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. + + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md). + +Please note that this `README.md`, the `samples/README.md`, +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. To edit one of these files, make an edit +to its templates in +[directory](https://github.com/googleapis/synthtool). + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) + +[client-docs]: https://cloud.google.com/nodejs/docs/reference/storageinsights/latest +[product-docs]: https://cloud.google.com/storage/docs/insights/storage-insights +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[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=storageinsights.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started diff --git a/packages/google-cloud-storageinsights/linkinator.config.json b/packages/google-cloud-storageinsights/linkinator.config.json new file mode 100644 index 00000000000..befd23c8633 --- /dev/null +++ b/packages/google-cloud-storageinsights/linkinator.config.json @@ -0,0 +1,16 @@ +{ + "recurse": true, + "skip": [ + "https://codecov.io/gh/googleapis/", + "www.googleapis.com", + "img.shields.io", + "https://console.cloud.google.com/cloudshell", + "https://support.google.com" + ], + "silent": true, + "concurrency": 5, + "retry": true, + "retryErrors": true, + "retryErrorsCount": 5, + "retryErrorsJitter": 3000 +} diff --git a/packages/google-cloud-storageinsights/package.json b/packages/google-cloud-storageinsights/package.json new file mode 100644 index 00000000000..2c62dd2ab18 --- /dev/null +++ b/packages/google-cloud-storageinsights/package.json @@ -0,0 +1,73 @@ +{ + "name": "@google-cloud/storageinsights", + "version": "0.1.1", + "description": "Storage Insights API client for Node.js", + "repository": { + "type": "git", + "url": "https://github.com/googleapis/google-cloud-node.git", + "directory": "packages/google-cloud-storageinsights" + }, + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-storageinsights", + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google storageinsights", + "storageinsights", + "Storage Insights API" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "prelint": "cd samples; npm link ../; npm i" + }, + "dependencies": { + "google-gax": "^3.5.8" + }, + "devDependencies": { + "@types/mocha": "^9.0.0", + "@types/node": "^18.0.0", + "@types/sinon": "^10.0.0", + "c8": "^7.3.5", + "gts": "^3.1.0", + "jsdoc": "^4.0.0", + "jsdoc-fresh": "^2.0.0", + "jsdoc-region-tag": "^2.0.0", + "linkinator": "^4.0.0", + "long": "^5.2.3", + "mocha": "^9.2.2", + "null-loader": "^4.0.1", + "pack-n-play": "^1.0.0-2", + "sinon": "^15.0.0", + "ts-loader": "^9.0.0", + "typescript": "^4.6.4", + "webpack": "^5.9.0", + "webpack-cli": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } +} diff --git a/packages/google-cloud-storageinsights/protos/google/cloud/storageinsights/v1/storageinsights.proto b/packages/google-cloud-storageinsights/protos/google/cloud/storageinsights/v1/storageinsights.proto new file mode 100644 index 00000000000..c7d04dd6cb8 --- /dev/null +++ b/packages/google-cloud-storageinsights/protos/google/cloud/storageinsights/v1/storageinsights.proto @@ -0,0 +1,491 @@ +// Copyright 2023 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.storageinsights.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"; +import "google/type/date.proto"; +import "google/type/datetime.proto"; + +option csharp_namespace = "Google.Cloud.StorageInsights.V1"; +option go_package = "cloud.google.com/go/storageinsights/apiv1/storageinsightspb;storageinsightspb"; +option java_multiple_files = true; +option java_outer_classname = "V1Proto"; +option java_package = "com.google.cloud.storageinsights.v1"; +option php_namespace = "Google\\Cloud\\StorageInsights\\V1"; +option ruby_package = "Google::Cloud::StorageInsights::V1"; + +// Service describing handlers for resources +service StorageInsights { + option (google.api.default_host) = "storageinsights.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists ReportConfigs in a given project and location. + rpc ListReportConfigs(ListReportConfigsRequest) + returns (ListReportConfigsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/reportConfigs" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single ReportConfig. + rpc GetReportConfig(GetReportConfigRequest) returns (ReportConfig) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/reportConfigs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new ReportConfig in a given project and location. + rpc CreateReportConfig(CreateReportConfigRequest) returns (ReportConfig) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/reportConfigs" + body: "report_config" + }; + option (google.api.method_signature) = "parent,report_config"; + } + + // Updates the parameters of a single ReportConfig. + rpc UpdateReportConfig(UpdateReportConfigRequest) returns (ReportConfig) { + option (google.api.http) = { + patch: "/v1/{report_config.name=projects/*/locations/*/reportConfigs/*}" + body: "report_config" + }; + option (google.api.method_signature) = "report_config,update_mask"; + } + + // Deletes a single ReportConfig. + rpc DeleteReportConfig(DeleteReportConfigRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/reportConfigs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists ReportDetails in a given project and location. + rpc ListReportDetails(ListReportDetailsRequest) + returns (ListReportDetailsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/reportConfigs/*}/reportDetails" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single ReportDetail. + rpc GetReportDetail(GetReportDetailRequest) returns (ReportDetail) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/reportConfigs/*/reportDetails/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// Message for requesting list of ReportConfigs +message ListReportConfigsRequest { + // Required. Parent value for ListReportConfigsRequest + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "storageinsights.googleapis.com/ReportConfig" + } + ]; + + // Requested page size. Server may return fewer items than requested. + // If unspecified, server will pick an appropriate default. + int32 page_size = 2; + + // A token identifying a page of results the server should return. + string page_token = 3; + + // Filtering results + string filter = 4; + + // Hint for how to order the results + string order_by = 5; +} + +// Message for response to listing ReportConfigs +message ListReportConfigsResponse { + // The list of ReportConfig + repeated ReportConfig report_configs = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Message for getting a ReportConfig +message GetReportConfigRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "storageinsights.googleapis.com/ReportConfig" + } + ]; +} + +// Message for creating a ReportConfig +message CreateReportConfigRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "storageinsights.googleapis.com/ReportConfig" + } + ]; + + // Required. The resource being created + ReportConfig report_config = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for updating a ReportConfig +message UpdateReportConfigRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // ReportConfig resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being updated + ReportConfig report_config = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for deleting a ReportConfig +message DeleteReportConfigRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "storageinsights.googleapis.com/ReportConfig" + } + ]; + + // Optional. If set, all ReportDetails for this ReportConfig will be deleted. + bool force = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message describing ReportDetail object. ReportDetail represents metadata of +// generated reports for a ReportConfig. +// Next ID: 10 +message ReportDetail { + option (google.api.resource) = { + type: "storageinsights.googleapis.com/ReportDetail" + pattern: "projects/{project}/locations/{location}/reportConfigs/{report_config}/reportDetails/{report_detail}" + }; + + // Different metrics associated with the generated report. + message Metrics { + // Count of Cloud Storage objects which are part of the report. + int64 processed_records_count = 1; + } + + // Name of resource. It will be of form + // projects//locations//reportConfigs//reportDetails/. + string name = 1; + + // The snapshot time. + // All the report data is referenced at this point of time. + google.protobuf.Timestamp snapshot_time = 2; + + // Prefix of the object name of each report's shard. This will have full + // prefix except the "extension" and "shard_id". + // For example, if the `destination_path` is + // `{{report-config-id}}/dt={{datetime}}`, the shard object name would be + // `gs://my-insights/1A34-F2E456-12B456-1C3D/dt=2022-05-20T06:35/1A34-F2E456-12B456-1C3D_2022-05-20T06:35_5.csv` + // and the value of `report_path_prefix` field would be + // `gs://my-insights/1A34-F2E456-12B456-1C3D/dt=2022-05-20T06:35/1A34-F2E456-12B456-1C3D_2022-05-20T06:35_`. + string report_path_prefix = 8; + + // Total shards generated for the report. + int64 shards_count = 9; + + // Status of the ReportDetail. + google.rpc.Status status = 4; + + // Labels as key value pairs + map labels = 5; + + // The date for which report is generated. The time part of target_datetime + // will be zero till we support multiple reports per day. + google.type.DateTime target_datetime = 6; + + // Metrics of the report. + Metrics report_metrics = 7; +} + +// Message for requesting list of ReportDetails +message ListReportDetailsRequest { + // Required. Parent value for ListReportDetailsRequest + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "storageinsights.googleapis.com/ReportDetail" + } + ]; + + // Requested page size. Server may return fewer items than requested. + // If unspecified, server will pick an appropriate default. + int32 page_size = 2; + + // A token identifying a page of results the server should return. + string page_token = 3; + + // Filtering results + string filter = 4; + + // Hint for how to order the results + string order_by = 5; +} + +// Message for response to listing ReportDetails +message ListReportDetailsResponse { + // The list of ReportDetail + repeated ReportDetail report_details = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Message for getting a ReportDetail +message GetReportDetailRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "storageinsights.googleapis.com/ReportDetail" + } + ]; +} + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have been cancelled successfully + // have [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// ReportConfig Resource: +// +// Options to setup frequency of report generation. +message FrequencyOptions { + // This ENUM specifies possible frequencies of report generation. + enum Frequency { + // Unspecified. + FREQUENCY_UNSPECIFIED = 0; + + // Report will be generated daily. + DAILY = 1; + + // Report will be generated weekly. + WEEKLY = 2; + } + + // Frequency of report generation. + Frequency frequency = 1; + + // The date from which report generation should start. + // UTC time zone. + google.type.Date start_date = 2; + + // The date on which report generation should stop (Inclusive). + // UTC time zone. + google.type.Date end_date = 3; +} + +// Options to configure CSV formatted reports. +message CSVOptions { + // Record separator characters in CSV. + string record_separator = 1; + + // Delimiter characters in CSV. + string delimiter = 2; + + // If set, will include a header row in the CSV report. + bool header_required = 3; +} + +// Options to configure Parquet formatted reports. +message ParquetOptions {} + +// Options to filter data on storage systems. +// Next ID: 2 +message CloudStorageFilters { + // Bucket for which the report will be generated. + string bucket = 1; +} + +// Options to store reports in storage systems. +// Next ID: 3 +message CloudStorageDestinationOptions { + // Destination bucket. + string bucket = 1; + + // Destination path is the path in the bucket where the report should be + // generated. + string destination_path = 2; +} + +// Report specification for exporting object metadata. +// Next ID: 4 +message ObjectMetadataReportOptions { + // Metadata fields to be included in the report. + repeated string metadata_fields = 1; + + // Filter options for storage systems. + oneof filter { + // Cloud Storage as the storage system. + CloudStorageFilters storage_filters = 2; + } + + // Options on destination for storage systems. + oneof destination_options { + // Cloud Storage as the storage system. + CloudStorageDestinationOptions storage_destination_options = 3; + } +} + +// Message describing ReportConfig object. ReportConfig is the configuration to +// generate reports. +// Next ID: 12 +message ReportConfig { + option (google.api.resource) = { + type: "storageinsights.googleapis.com/ReportConfig" + pattern: "projects/{project}/locations/{location}/reportConfigs/{report_config}" + }; + + // name of resource. It will be of form + // projects//locations//reportConfigs/. + string name = 1; + + // Output only. [Output only] Create time stamp + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. [Output only] Update time stamp + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The frequency of report generation. + FrequencyOptions frequency_options = 5; + + // Format in which report will be published. + oneof report_format { + // Options for CSV formatted reports. + CSVOptions csv_options = 6; + + // Options for Parquet formatted reports. + ParquetOptions parquet_options = 7; + } + + // Configuration options for report contents. + oneof report_kind { + // Report for exporting object metadata. + ObjectMetadataReportOptions object_metadata_report_options = 8; + } + + // Labels as key value pairs + map labels = 10; + + // User provided display name which can be empty and limited to 256 characters + // that is editable. + string display_name = 11; +} diff --git a/packages/google-cloud-storageinsights/protos/protos.d.ts b/packages/google-cloud-storageinsights/protos/protos.d.ts new file mode 100644 index 00000000000..1b4a966e385 --- /dev/null +++ b/packages/google-cloud-storageinsights/protos/protos.d.ts @@ -0,0 +1,7289 @@ +// Copyright 2023 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. + +import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); +/** Namespace google. */ +export namespace google { + + /** Namespace cloud. */ + namespace cloud { + + /** Namespace storageinsights. */ + namespace storageinsights { + + /** Namespace v1. */ + namespace v1 { + + /** Represents a StorageInsights */ + class StorageInsights extends $protobuf.rpc.Service { + + /** + * Constructs a new StorageInsights 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 StorageInsights 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): StorageInsights; + + /** + * Calls ListReportConfigs. + * @param request ListReportConfigsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListReportConfigsResponse + */ + public listReportConfigs(request: google.cloud.storageinsights.v1.IListReportConfigsRequest, callback: google.cloud.storageinsights.v1.StorageInsights.ListReportConfigsCallback): void; + + /** + * Calls ListReportConfigs. + * @param request ListReportConfigsRequest message or plain object + * @returns Promise + */ + public listReportConfigs(request: google.cloud.storageinsights.v1.IListReportConfigsRequest): Promise; + + /** + * Calls GetReportConfig. + * @param request GetReportConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ReportConfig + */ + public getReportConfig(request: google.cloud.storageinsights.v1.IGetReportConfigRequest, callback: google.cloud.storageinsights.v1.StorageInsights.GetReportConfigCallback): void; + + /** + * Calls GetReportConfig. + * @param request GetReportConfigRequest message or plain object + * @returns Promise + */ + public getReportConfig(request: google.cloud.storageinsights.v1.IGetReportConfigRequest): Promise; + + /** + * Calls CreateReportConfig. + * @param request CreateReportConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ReportConfig + */ + public createReportConfig(request: google.cloud.storageinsights.v1.ICreateReportConfigRequest, callback: google.cloud.storageinsights.v1.StorageInsights.CreateReportConfigCallback): void; + + /** + * Calls CreateReportConfig. + * @param request CreateReportConfigRequest message or plain object + * @returns Promise + */ + public createReportConfig(request: google.cloud.storageinsights.v1.ICreateReportConfigRequest): Promise; + + /** + * Calls UpdateReportConfig. + * @param request UpdateReportConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ReportConfig + */ + public updateReportConfig(request: google.cloud.storageinsights.v1.IUpdateReportConfigRequest, callback: google.cloud.storageinsights.v1.StorageInsights.UpdateReportConfigCallback): void; + + /** + * Calls UpdateReportConfig. + * @param request UpdateReportConfigRequest message or plain object + * @returns Promise + */ + public updateReportConfig(request: google.cloud.storageinsights.v1.IUpdateReportConfigRequest): Promise; + + /** + * Calls DeleteReportConfig. + * @param request DeleteReportConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteReportConfig(request: google.cloud.storageinsights.v1.IDeleteReportConfigRequest, callback: google.cloud.storageinsights.v1.StorageInsights.DeleteReportConfigCallback): void; + + /** + * Calls DeleteReportConfig. + * @param request DeleteReportConfigRequest message or plain object + * @returns Promise + */ + public deleteReportConfig(request: google.cloud.storageinsights.v1.IDeleteReportConfigRequest): Promise; + + /** + * Calls ListReportDetails. + * @param request ListReportDetailsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListReportDetailsResponse + */ + public listReportDetails(request: google.cloud.storageinsights.v1.IListReportDetailsRequest, callback: google.cloud.storageinsights.v1.StorageInsights.ListReportDetailsCallback): void; + + /** + * Calls ListReportDetails. + * @param request ListReportDetailsRequest message or plain object + * @returns Promise + */ + public listReportDetails(request: google.cloud.storageinsights.v1.IListReportDetailsRequest): Promise; + + /** + * Calls GetReportDetail. + * @param request GetReportDetailRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ReportDetail + */ + public getReportDetail(request: google.cloud.storageinsights.v1.IGetReportDetailRequest, callback: google.cloud.storageinsights.v1.StorageInsights.GetReportDetailCallback): void; + + /** + * Calls GetReportDetail. + * @param request GetReportDetailRequest message or plain object + * @returns Promise + */ + public getReportDetail(request: google.cloud.storageinsights.v1.IGetReportDetailRequest): Promise; + } + + namespace StorageInsights { + + /** + * Callback as used by {@link google.cloud.storageinsights.v1.StorageInsights|listReportConfigs}. + * @param error Error, if any + * @param [response] ListReportConfigsResponse + */ + type ListReportConfigsCallback = (error: (Error|null), response?: google.cloud.storageinsights.v1.ListReportConfigsResponse) => void; + + /** + * Callback as used by {@link google.cloud.storageinsights.v1.StorageInsights|getReportConfig}. + * @param error Error, if any + * @param [response] ReportConfig + */ + type GetReportConfigCallback = (error: (Error|null), response?: google.cloud.storageinsights.v1.ReportConfig) => void; + + /** + * Callback as used by {@link google.cloud.storageinsights.v1.StorageInsights|createReportConfig}. + * @param error Error, if any + * @param [response] ReportConfig + */ + type CreateReportConfigCallback = (error: (Error|null), response?: google.cloud.storageinsights.v1.ReportConfig) => void; + + /** + * Callback as used by {@link google.cloud.storageinsights.v1.StorageInsights|updateReportConfig}. + * @param error Error, if any + * @param [response] ReportConfig + */ + type UpdateReportConfigCallback = (error: (Error|null), response?: google.cloud.storageinsights.v1.ReportConfig) => void; + + /** + * Callback as used by {@link google.cloud.storageinsights.v1.StorageInsights|deleteReportConfig}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteReportConfigCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.storageinsights.v1.StorageInsights|listReportDetails}. + * @param error Error, if any + * @param [response] ListReportDetailsResponse + */ + type ListReportDetailsCallback = (error: (Error|null), response?: google.cloud.storageinsights.v1.ListReportDetailsResponse) => void; + + /** + * Callback as used by {@link google.cloud.storageinsights.v1.StorageInsights|getReportDetail}. + * @param error Error, if any + * @param [response] ReportDetail + */ + type GetReportDetailCallback = (error: (Error|null), response?: google.cloud.storageinsights.v1.ReportDetail) => void; + } + + /** Properties of a ListReportConfigsRequest. */ + interface IListReportConfigsRequest { + + /** ListReportConfigsRequest parent */ + parent?: (string|null); + + /** ListReportConfigsRequest pageSize */ + pageSize?: (number|null); + + /** ListReportConfigsRequest pageToken */ + pageToken?: (string|null); + + /** ListReportConfigsRequest filter */ + filter?: (string|null); + + /** ListReportConfigsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListReportConfigsRequest. */ + class ListReportConfigsRequest implements IListReportConfigsRequest { + + /** + * Constructs a new ListReportConfigsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.storageinsights.v1.IListReportConfigsRequest); + + /** ListReportConfigsRequest parent. */ + public parent: string; + + /** ListReportConfigsRequest pageSize. */ + public pageSize: number; + + /** ListReportConfigsRequest pageToken. */ + public pageToken: string; + + /** ListReportConfigsRequest filter. */ + public filter: string; + + /** ListReportConfigsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListReportConfigsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListReportConfigsRequest instance + */ + public static create(properties?: google.cloud.storageinsights.v1.IListReportConfigsRequest): google.cloud.storageinsights.v1.ListReportConfigsRequest; + + /** + * Encodes the specified ListReportConfigsRequest message. Does not implicitly {@link google.cloud.storageinsights.v1.ListReportConfigsRequest.verify|verify} messages. + * @param message ListReportConfigsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.storageinsights.v1.IListReportConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListReportConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.ListReportConfigsRequest.verify|verify} messages. + * @param message ListReportConfigsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.storageinsights.v1.IListReportConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListReportConfigsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListReportConfigsRequest + * @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.storageinsights.v1.ListReportConfigsRequest; + + /** + * Decodes a ListReportConfigsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListReportConfigsRequest + * @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.storageinsights.v1.ListReportConfigsRequest; + + /** + * Verifies a ListReportConfigsRequest 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 ListReportConfigsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListReportConfigsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.storageinsights.v1.ListReportConfigsRequest; + + /** + * Creates a plain object from a ListReportConfigsRequest message. Also converts values to other types if specified. + * @param message ListReportConfigsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.storageinsights.v1.ListReportConfigsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListReportConfigsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListReportConfigsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListReportConfigsResponse. */ + interface IListReportConfigsResponse { + + /** ListReportConfigsResponse reportConfigs */ + reportConfigs?: (google.cloud.storageinsights.v1.IReportConfig[]|null); + + /** ListReportConfigsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListReportConfigsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListReportConfigsResponse. */ + class ListReportConfigsResponse implements IListReportConfigsResponse { + + /** + * Constructs a new ListReportConfigsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.storageinsights.v1.IListReportConfigsResponse); + + /** ListReportConfigsResponse reportConfigs. */ + public reportConfigs: google.cloud.storageinsights.v1.IReportConfig[]; + + /** ListReportConfigsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListReportConfigsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListReportConfigsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListReportConfigsResponse instance + */ + public static create(properties?: google.cloud.storageinsights.v1.IListReportConfigsResponse): google.cloud.storageinsights.v1.ListReportConfigsResponse; + + /** + * Encodes the specified ListReportConfigsResponse message. Does not implicitly {@link google.cloud.storageinsights.v1.ListReportConfigsResponse.verify|verify} messages. + * @param message ListReportConfigsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.storageinsights.v1.IListReportConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListReportConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.ListReportConfigsResponse.verify|verify} messages. + * @param message ListReportConfigsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.storageinsights.v1.IListReportConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListReportConfigsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListReportConfigsResponse + * @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.storageinsights.v1.ListReportConfigsResponse; + + /** + * Decodes a ListReportConfigsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListReportConfigsResponse + * @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.storageinsights.v1.ListReportConfigsResponse; + + /** + * Verifies a ListReportConfigsResponse 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 ListReportConfigsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListReportConfigsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.storageinsights.v1.ListReportConfigsResponse; + + /** + * Creates a plain object from a ListReportConfigsResponse message. Also converts values to other types if specified. + * @param message ListReportConfigsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.storageinsights.v1.ListReportConfigsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListReportConfigsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListReportConfigsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetReportConfigRequest. */ + interface IGetReportConfigRequest { + + /** GetReportConfigRequest name */ + name?: (string|null); + } + + /** Represents a GetReportConfigRequest. */ + class GetReportConfigRequest implements IGetReportConfigRequest { + + /** + * Constructs a new GetReportConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.storageinsights.v1.IGetReportConfigRequest); + + /** GetReportConfigRequest name. */ + public name: string; + + /** + * Creates a new GetReportConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetReportConfigRequest instance + */ + public static create(properties?: google.cloud.storageinsights.v1.IGetReportConfigRequest): google.cloud.storageinsights.v1.GetReportConfigRequest; + + /** + * Encodes the specified GetReportConfigRequest message. Does not implicitly {@link google.cloud.storageinsights.v1.GetReportConfigRequest.verify|verify} messages. + * @param message GetReportConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.storageinsights.v1.IGetReportConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetReportConfigRequest message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.GetReportConfigRequest.verify|verify} messages. + * @param message GetReportConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.storageinsights.v1.IGetReportConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetReportConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetReportConfigRequest + * @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.storageinsights.v1.GetReportConfigRequest; + + /** + * Decodes a GetReportConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetReportConfigRequest + * @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.storageinsights.v1.GetReportConfigRequest; + + /** + * Verifies a GetReportConfigRequest 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 GetReportConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetReportConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.storageinsights.v1.GetReportConfigRequest; + + /** + * Creates a plain object from a GetReportConfigRequest message. Also converts values to other types if specified. + * @param message GetReportConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.storageinsights.v1.GetReportConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetReportConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetReportConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateReportConfigRequest. */ + interface ICreateReportConfigRequest { + + /** CreateReportConfigRequest parent */ + parent?: (string|null); + + /** CreateReportConfigRequest reportConfig */ + reportConfig?: (google.cloud.storageinsights.v1.IReportConfig|null); + + /** CreateReportConfigRequest requestId */ + requestId?: (string|null); + } + + /** Represents a CreateReportConfigRequest. */ + class CreateReportConfigRequest implements ICreateReportConfigRequest { + + /** + * Constructs a new CreateReportConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.storageinsights.v1.ICreateReportConfigRequest); + + /** CreateReportConfigRequest parent. */ + public parent: string; + + /** CreateReportConfigRequest reportConfig. */ + public reportConfig?: (google.cloud.storageinsights.v1.IReportConfig|null); + + /** CreateReportConfigRequest requestId. */ + public requestId: string; + + /** + * Creates a new CreateReportConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateReportConfigRequest instance + */ + public static create(properties?: google.cloud.storageinsights.v1.ICreateReportConfigRequest): google.cloud.storageinsights.v1.CreateReportConfigRequest; + + /** + * Encodes the specified CreateReportConfigRequest message. Does not implicitly {@link google.cloud.storageinsights.v1.CreateReportConfigRequest.verify|verify} messages. + * @param message CreateReportConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.storageinsights.v1.ICreateReportConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateReportConfigRequest message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.CreateReportConfigRequest.verify|verify} messages. + * @param message CreateReportConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.storageinsights.v1.ICreateReportConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateReportConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateReportConfigRequest + * @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.storageinsights.v1.CreateReportConfigRequest; + + /** + * Decodes a CreateReportConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateReportConfigRequest + * @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.storageinsights.v1.CreateReportConfigRequest; + + /** + * Verifies a CreateReportConfigRequest 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 CreateReportConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateReportConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.storageinsights.v1.CreateReportConfigRequest; + + /** + * Creates a plain object from a CreateReportConfigRequest message. Also converts values to other types if specified. + * @param message CreateReportConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.storageinsights.v1.CreateReportConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateReportConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateReportConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateReportConfigRequest. */ + interface IUpdateReportConfigRequest { + + /** UpdateReportConfigRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateReportConfigRequest reportConfig */ + reportConfig?: (google.cloud.storageinsights.v1.IReportConfig|null); + + /** UpdateReportConfigRequest requestId */ + requestId?: (string|null); + } + + /** Represents an UpdateReportConfigRequest. */ + class UpdateReportConfigRequest implements IUpdateReportConfigRequest { + + /** + * Constructs a new UpdateReportConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.storageinsights.v1.IUpdateReportConfigRequest); + + /** UpdateReportConfigRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateReportConfigRequest reportConfig. */ + public reportConfig?: (google.cloud.storageinsights.v1.IReportConfig|null); + + /** UpdateReportConfigRequest requestId. */ + public requestId: string; + + /** + * Creates a new UpdateReportConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateReportConfigRequest instance + */ + public static create(properties?: google.cloud.storageinsights.v1.IUpdateReportConfigRequest): google.cloud.storageinsights.v1.UpdateReportConfigRequest; + + /** + * Encodes the specified UpdateReportConfigRequest message. Does not implicitly {@link google.cloud.storageinsights.v1.UpdateReportConfigRequest.verify|verify} messages. + * @param message UpdateReportConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.storageinsights.v1.IUpdateReportConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateReportConfigRequest message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.UpdateReportConfigRequest.verify|verify} messages. + * @param message UpdateReportConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.storageinsights.v1.IUpdateReportConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateReportConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateReportConfigRequest + * @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.storageinsights.v1.UpdateReportConfigRequest; + + /** + * Decodes an UpdateReportConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateReportConfigRequest + * @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.storageinsights.v1.UpdateReportConfigRequest; + + /** + * Verifies an UpdateReportConfigRequest 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 UpdateReportConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateReportConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.storageinsights.v1.UpdateReportConfigRequest; + + /** + * Creates a plain object from an UpdateReportConfigRequest message. Also converts values to other types if specified. + * @param message UpdateReportConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.storageinsights.v1.UpdateReportConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateReportConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateReportConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteReportConfigRequest. */ + interface IDeleteReportConfigRequest { + + /** DeleteReportConfigRequest name */ + name?: (string|null); + + /** DeleteReportConfigRequest force */ + force?: (boolean|null); + + /** DeleteReportConfigRequest requestId */ + requestId?: (string|null); + } + + /** Represents a DeleteReportConfigRequest. */ + class DeleteReportConfigRequest implements IDeleteReportConfigRequest { + + /** + * Constructs a new DeleteReportConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.storageinsights.v1.IDeleteReportConfigRequest); + + /** DeleteReportConfigRequest name. */ + public name: string; + + /** DeleteReportConfigRequest force. */ + public force: boolean; + + /** DeleteReportConfigRequest requestId. */ + public requestId: string; + + /** + * Creates a new DeleteReportConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteReportConfigRequest instance + */ + public static create(properties?: google.cloud.storageinsights.v1.IDeleteReportConfigRequest): google.cloud.storageinsights.v1.DeleteReportConfigRequest; + + /** + * Encodes the specified DeleteReportConfigRequest message. Does not implicitly {@link google.cloud.storageinsights.v1.DeleteReportConfigRequest.verify|verify} messages. + * @param message DeleteReportConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.storageinsights.v1.IDeleteReportConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteReportConfigRequest message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.DeleteReportConfigRequest.verify|verify} messages. + * @param message DeleteReportConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.storageinsights.v1.IDeleteReportConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteReportConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteReportConfigRequest + * @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.storageinsights.v1.DeleteReportConfigRequest; + + /** + * Decodes a DeleteReportConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteReportConfigRequest + * @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.storageinsights.v1.DeleteReportConfigRequest; + + /** + * Verifies a DeleteReportConfigRequest 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 DeleteReportConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteReportConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.storageinsights.v1.DeleteReportConfigRequest; + + /** + * Creates a plain object from a DeleteReportConfigRequest message. Also converts values to other types if specified. + * @param message DeleteReportConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.storageinsights.v1.DeleteReportConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteReportConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteReportConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReportDetail. */ + interface IReportDetail { + + /** ReportDetail name */ + name?: (string|null); + + /** ReportDetail snapshotTime */ + snapshotTime?: (google.protobuf.ITimestamp|null); + + /** ReportDetail reportPathPrefix */ + reportPathPrefix?: (string|null); + + /** ReportDetail shardsCount */ + shardsCount?: (number|Long|string|null); + + /** ReportDetail status */ + status?: (google.rpc.IStatus|null); + + /** ReportDetail labels */ + labels?: ({ [k: string]: string }|null); + + /** ReportDetail targetDatetime */ + targetDatetime?: (google.type.IDateTime|null); + + /** ReportDetail reportMetrics */ + reportMetrics?: (google.cloud.storageinsights.v1.ReportDetail.IMetrics|null); + } + + /** Represents a ReportDetail. */ + class ReportDetail implements IReportDetail { + + /** + * Constructs a new ReportDetail. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.storageinsights.v1.IReportDetail); + + /** ReportDetail name. */ + public name: string; + + /** ReportDetail snapshotTime. */ + public snapshotTime?: (google.protobuf.ITimestamp|null); + + /** ReportDetail reportPathPrefix. */ + public reportPathPrefix: string; + + /** ReportDetail shardsCount. */ + public shardsCount: (number|Long|string); + + /** ReportDetail status. */ + public status?: (google.rpc.IStatus|null); + + /** ReportDetail labels. */ + public labels: { [k: string]: string }; + + /** ReportDetail targetDatetime. */ + public targetDatetime?: (google.type.IDateTime|null); + + /** ReportDetail reportMetrics. */ + public reportMetrics?: (google.cloud.storageinsights.v1.ReportDetail.IMetrics|null); + + /** + * Creates a new ReportDetail instance using the specified properties. + * @param [properties] Properties to set + * @returns ReportDetail instance + */ + public static create(properties?: google.cloud.storageinsights.v1.IReportDetail): google.cloud.storageinsights.v1.ReportDetail; + + /** + * Encodes the specified ReportDetail message. Does not implicitly {@link google.cloud.storageinsights.v1.ReportDetail.verify|verify} messages. + * @param message ReportDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.storageinsights.v1.IReportDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReportDetail message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.ReportDetail.verify|verify} messages. + * @param message ReportDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.storageinsights.v1.IReportDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReportDetail message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReportDetail + * @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.storageinsights.v1.ReportDetail; + + /** + * Decodes a ReportDetail message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReportDetail + * @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.storageinsights.v1.ReportDetail; + + /** + * Verifies a ReportDetail 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 ReportDetail message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReportDetail + */ + public static fromObject(object: { [k: string]: any }): google.cloud.storageinsights.v1.ReportDetail; + + /** + * Creates a plain object from a ReportDetail message. Also converts values to other types if specified. + * @param message ReportDetail + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.storageinsights.v1.ReportDetail, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReportDetail to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReportDetail + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ReportDetail { + + /** Properties of a Metrics. */ + interface IMetrics { + + /** Metrics processedRecordsCount */ + processedRecordsCount?: (number|Long|string|null); + } + + /** Represents a Metrics. */ + class Metrics implements IMetrics { + + /** + * Constructs a new Metrics. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.storageinsights.v1.ReportDetail.IMetrics); + + /** Metrics processedRecordsCount. */ + public processedRecordsCount: (number|Long|string); + + /** + * Creates a new Metrics instance using the specified properties. + * @param [properties] Properties to set + * @returns Metrics instance + */ + public static create(properties?: google.cloud.storageinsights.v1.ReportDetail.IMetrics): google.cloud.storageinsights.v1.ReportDetail.Metrics; + + /** + * Encodes the specified Metrics message. Does not implicitly {@link google.cloud.storageinsights.v1.ReportDetail.Metrics.verify|verify} messages. + * @param message Metrics message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.storageinsights.v1.ReportDetail.IMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Metrics message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.ReportDetail.Metrics.verify|verify} messages. + * @param message Metrics message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.storageinsights.v1.ReportDetail.IMetrics, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metrics message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metrics + * @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.storageinsights.v1.ReportDetail.Metrics; + + /** + * Decodes a Metrics message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metrics + * @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.storageinsights.v1.ReportDetail.Metrics; + + /** + * Verifies a Metrics 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 Metrics message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metrics + */ + public static fromObject(object: { [k: string]: any }): google.cloud.storageinsights.v1.ReportDetail.Metrics; + + /** + * Creates a plain object from a Metrics message. Also converts values to other types if specified. + * @param message Metrics + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.storageinsights.v1.ReportDetail.Metrics, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metrics to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Metrics + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a ListReportDetailsRequest. */ + interface IListReportDetailsRequest { + + /** ListReportDetailsRequest parent */ + parent?: (string|null); + + /** ListReportDetailsRequest pageSize */ + pageSize?: (number|null); + + /** ListReportDetailsRequest pageToken */ + pageToken?: (string|null); + + /** ListReportDetailsRequest filter */ + filter?: (string|null); + + /** ListReportDetailsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListReportDetailsRequest. */ + class ListReportDetailsRequest implements IListReportDetailsRequest { + + /** + * Constructs a new ListReportDetailsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.storageinsights.v1.IListReportDetailsRequest); + + /** ListReportDetailsRequest parent. */ + public parent: string; + + /** ListReportDetailsRequest pageSize. */ + public pageSize: number; + + /** ListReportDetailsRequest pageToken. */ + public pageToken: string; + + /** ListReportDetailsRequest filter. */ + public filter: string; + + /** ListReportDetailsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListReportDetailsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListReportDetailsRequest instance + */ + public static create(properties?: google.cloud.storageinsights.v1.IListReportDetailsRequest): google.cloud.storageinsights.v1.ListReportDetailsRequest; + + /** + * Encodes the specified ListReportDetailsRequest message. Does not implicitly {@link google.cloud.storageinsights.v1.ListReportDetailsRequest.verify|verify} messages. + * @param message ListReportDetailsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.storageinsights.v1.IListReportDetailsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListReportDetailsRequest message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.ListReportDetailsRequest.verify|verify} messages. + * @param message ListReportDetailsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.storageinsights.v1.IListReportDetailsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListReportDetailsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListReportDetailsRequest + * @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.storageinsights.v1.ListReportDetailsRequest; + + /** + * Decodes a ListReportDetailsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListReportDetailsRequest + * @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.storageinsights.v1.ListReportDetailsRequest; + + /** + * Verifies a ListReportDetailsRequest 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 ListReportDetailsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListReportDetailsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.storageinsights.v1.ListReportDetailsRequest; + + /** + * Creates a plain object from a ListReportDetailsRequest message. Also converts values to other types if specified. + * @param message ListReportDetailsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.storageinsights.v1.ListReportDetailsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListReportDetailsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListReportDetailsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListReportDetailsResponse. */ + interface IListReportDetailsResponse { + + /** ListReportDetailsResponse reportDetails */ + reportDetails?: (google.cloud.storageinsights.v1.IReportDetail[]|null); + + /** ListReportDetailsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListReportDetailsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListReportDetailsResponse. */ + class ListReportDetailsResponse implements IListReportDetailsResponse { + + /** + * Constructs a new ListReportDetailsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.storageinsights.v1.IListReportDetailsResponse); + + /** ListReportDetailsResponse reportDetails. */ + public reportDetails: google.cloud.storageinsights.v1.IReportDetail[]; + + /** ListReportDetailsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListReportDetailsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListReportDetailsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListReportDetailsResponse instance + */ + public static create(properties?: google.cloud.storageinsights.v1.IListReportDetailsResponse): google.cloud.storageinsights.v1.ListReportDetailsResponse; + + /** + * Encodes the specified ListReportDetailsResponse message. Does not implicitly {@link google.cloud.storageinsights.v1.ListReportDetailsResponse.verify|verify} messages. + * @param message ListReportDetailsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.storageinsights.v1.IListReportDetailsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListReportDetailsResponse message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.ListReportDetailsResponse.verify|verify} messages. + * @param message ListReportDetailsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.storageinsights.v1.IListReportDetailsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListReportDetailsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListReportDetailsResponse + * @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.storageinsights.v1.ListReportDetailsResponse; + + /** + * Decodes a ListReportDetailsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListReportDetailsResponse + * @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.storageinsights.v1.ListReportDetailsResponse; + + /** + * Verifies a ListReportDetailsResponse 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 ListReportDetailsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListReportDetailsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.storageinsights.v1.ListReportDetailsResponse; + + /** + * Creates a plain object from a ListReportDetailsResponse message. Also converts values to other types if specified. + * @param message ListReportDetailsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.storageinsights.v1.ListReportDetailsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListReportDetailsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListReportDetailsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetReportDetailRequest. */ + interface IGetReportDetailRequest { + + /** GetReportDetailRequest name */ + name?: (string|null); + } + + /** Represents a GetReportDetailRequest. */ + class GetReportDetailRequest implements IGetReportDetailRequest { + + /** + * Constructs a new GetReportDetailRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.storageinsights.v1.IGetReportDetailRequest); + + /** GetReportDetailRequest name. */ + public name: string; + + /** + * Creates a new GetReportDetailRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetReportDetailRequest instance + */ + public static create(properties?: google.cloud.storageinsights.v1.IGetReportDetailRequest): google.cloud.storageinsights.v1.GetReportDetailRequest; + + /** + * Encodes the specified GetReportDetailRequest message. Does not implicitly {@link google.cloud.storageinsights.v1.GetReportDetailRequest.verify|verify} messages. + * @param message GetReportDetailRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.storageinsights.v1.IGetReportDetailRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetReportDetailRequest message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.GetReportDetailRequest.verify|verify} messages. + * @param message GetReportDetailRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.storageinsights.v1.IGetReportDetailRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetReportDetailRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetReportDetailRequest + * @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.storageinsights.v1.GetReportDetailRequest; + + /** + * Decodes a GetReportDetailRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetReportDetailRequest + * @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.storageinsights.v1.GetReportDetailRequest; + + /** + * Verifies a GetReportDetailRequest 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 GetReportDetailRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetReportDetailRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.storageinsights.v1.GetReportDetailRequest; + + /** + * Creates a plain object from a GetReportDetailRequest message. Also converts values to other types if specified. + * @param message GetReportDetailRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.storageinsights.v1.GetReportDetailRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetReportDetailRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetReportDetailRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OperationMetadata. */ + interface IOperationMetadata { + + /** OperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata target */ + target?: (string|null); + + /** OperationMetadata verb */ + verb?: (string|null); + + /** OperationMetadata statusMessage */ + statusMessage?: (string|null); + + /** OperationMetadata requestedCancellation */ + requestedCancellation?: (boolean|null); + + /** OperationMetadata apiVersion */ + apiVersion?: (string|null); + } + + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { + + /** + * Constructs a new OperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.storageinsights.v1.IOperationMetadata); + + /** OperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata target. */ + public target: string; + + /** OperationMetadata verb. */ + public verb: string; + + /** OperationMetadata statusMessage. */ + public statusMessage: string; + + /** OperationMetadata requestedCancellation. */ + public requestedCancellation: boolean; + + /** OperationMetadata apiVersion. */ + public apiVersion: string; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationMetadata instance + */ + public static create(properties?: google.cloud.storageinsights.v1.IOperationMetadata): google.cloud.storageinsights.v1.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.storageinsights.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.storageinsights.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.storageinsights.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationMetadata + * @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.storageinsights.v1.OperationMetadata; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationMetadata + * @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.storageinsights.v1.OperationMetadata; + + /** + * Verifies an OperationMetadata 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 OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.storageinsights.v1.OperationMetadata; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @param message OperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.storageinsights.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FrequencyOptions. */ + interface IFrequencyOptions { + + /** FrequencyOptions frequency */ + frequency?: (google.cloud.storageinsights.v1.FrequencyOptions.Frequency|keyof typeof google.cloud.storageinsights.v1.FrequencyOptions.Frequency|null); + + /** FrequencyOptions startDate */ + startDate?: (google.type.IDate|null); + + /** FrequencyOptions endDate */ + endDate?: (google.type.IDate|null); + } + + /** Represents a FrequencyOptions. */ + class FrequencyOptions implements IFrequencyOptions { + + /** + * Constructs a new FrequencyOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.storageinsights.v1.IFrequencyOptions); + + /** FrequencyOptions frequency. */ + public frequency: (google.cloud.storageinsights.v1.FrequencyOptions.Frequency|keyof typeof google.cloud.storageinsights.v1.FrequencyOptions.Frequency); + + /** FrequencyOptions startDate. */ + public startDate?: (google.type.IDate|null); + + /** FrequencyOptions endDate. */ + public endDate?: (google.type.IDate|null); + + /** + * Creates a new FrequencyOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FrequencyOptions instance + */ + public static create(properties?: google.cloud.storageinsights.v1.IFrequencyOptions): google.cloud.storageinsights.v1.FrequencyOptions; + + /** + * Encodes the specified FrequencyOptions message. Does not implicitly {@link google.cloud.storageinsights.v1.FrequencyOptions.verify|verify} messages. + * @param message FrequencyOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.storageinsights.v1.IFrequencyOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FrequencyOptions message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.FrequencyOptions.verify|verify} messages. + * @param message FrequencyOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.storageinsights.v1.IFrequencyOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FrequencyOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FrequencyOptions + * @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.storageinsights.v1.FrequencyOptions; + + /** + * Decodes a FrequencyOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FrequencyOptions + * @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.storageinsights.v1.FrequencyOptions; + + /** + * Verifies a FrequencyOptions 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 FrequencyOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FrequencyOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.storageinsights.v1.FrequencyOptions; + + /** + * Creates a plain object from a FrequencyOptions message. Also converts values to other types if specified. + * @param message FrequencyOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.storageinsights.v1.FrequencyOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FrequencyOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FrequencyOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FrequencyOptions { + + /** Frequency enum. */ + enum Frequency { + FREQUENCY_UNSPECIFIED = 0, + DAILY = 1, + WEEKLY = 2 + } + } + + /** Properties of a CSVOptions. */ + interface ICSVOptions { + + /** CSVOptions recordSeparator */ + recordSeparator?: (string|null); + + /** CSVOptions delimiter */ + delimiter?: (string|null); + + /** CSVOptions headerRequired */ + headerRequired?: (boolean|null); + } + + /** Represents a CSVOptions. */ + class CSVOptions implements ICSVOptions { + + /** + * Constructs a new CSVOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.storageinsights.v1.ICSVOptions); + + /** CSVOptions recordSeparator. */ + public recordSeparator: string; + + /** CSVOptions delimiter. */ + public delimiter: string; + + /** CSVOptions headerRequired. */ + public headerRequired: boolean; + + /** + * Creates a new CSVOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns CSVOptions instance + */ + public static create(properties?: google.cloud.storageinsights.v1.ICSVOptions): google.cloud.storageinsights.v1.CSVOptions; + + /** + * Encodes the specified CSVOptions message. Does not implicitly {@link google.cloud.storageinsights.v1.CSVOptions.verify|verify} messages. + * @param message CSVOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.storageinsights.v1.ICSVOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CSVOptions message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.CSVOptions.verify|verify} messages. + * @param message CSVOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.storageinsights.v1.ICSVOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CSVOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CSVOptions + * @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.storageinsights.v1.CSVOptions; + + /** + * Decodes a CSVOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CSVOptions + * @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.storageinsights.v1.CSVOptions; + + /** + * Verifies a CSVOptions 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 CSVOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CSVOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.storageinsights.v1.CSVOptions; + + /** + * Creates a plain object from a CSVOptions message. Also converts values to other types if specified. + * @param message CSVOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.storageinsights.v1.CSVOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CSVOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CSVOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ParquetOptions. */ + interface IParquetOptions { + } + + /** Represents a ParquetOptions. */ + class ParquetOptions implements IParquetOptions { + + /** + * Constructs a new ParquetOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.storageinsights.v1.IParquetOptions); + + /** + * Creates a new ParquetOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ParquetOptions instance + */ + public static create(properties?: google.cloud.storageinsights.v1.IParquetOptions): google.cloud.storageinsights.v1.ParquetOptions; + + /** + * Encodes the specified ParquetOptions message. Does not implicitly {@link google.cloud.storageinsights.v1.ParquetOptions.verify|verify} messages. + * @param message ParquetOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.storageinsights.v1.IParquetOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ParquetOptions message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.ParquetOptions.verify|verify} messages. + * @param message ParquetOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.storageinsights.v1.IParquetOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ParquetOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ParquetOptions + * @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.storageinsights.v1.ParquetOptions; + + /** + * Decodes a ParquetOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ParquetOptions + * @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.storageinsights.v1.ParquetOptions; + + /** + * Verifies a ParquetOptions 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 ParquetOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ParquetOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.storageinsights.v1.ParquetOptions; + + /** + * Creates a plain object from a ParquetOptions message. Also converts values to other types if specified. + * @param message ParquetOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.storageinsights.v1.ParquetOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ParquetOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ParquetOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudStorageFilters. */ + interface ICloudStorageFilters { + + /** CloudStorageFilters bucket */ + bucket?: (string|null); + } + + /** Represents a CloudStorageFilters. */ + class CloudStorageFilters implements ICloudStorageFilters { + + /** + * Constructs a new CloudStorageFilters. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.storageinsights.v1.ICloudStorageFilters); + + /** CloudStorageFilters bucket. */ + public bucket: string; + + /** + * Creates a new CloudStorageFilters instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudStorageFilters instance + */ + public static create(properties?: google.cloud.storageinsights.v1.ICloudStorageFilters): google.cloud.storageinsights.v1.CloudStorageFilters; + + /** + * Encodes the specified CloudStorageFilters message. Does not implicitly {@link google.cloud.storageinsights.v1.CloudStorageFilters.verify|verify} messages. + * @param message CloudStorageFilters message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.storageinsights.v1.ICloudStorageFilters, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudStorageFilters message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.CloudStorageFilters.verify|verify} messages. + * @param message CloudStorageFilters message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.storageinsights.v1.ICloudStorageFilters, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudStorageFilters message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudStorageFilters + * @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.storageinsights.v1.CloudStorageFilters; + + /** + * Decodes a CloudStorageFilters message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudStorageFilters + * @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.storageinsights.v1.CloudStorageFilters; + + /** + * Verifies a CloudStorageFilters 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 CloudStorageFilters message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudStorageFilters + */ + public static fromObject(object: { [k: string]: any }): google.cloud.storageinsights.v1.CloudStorageFilters; + + /** + * Creates a plain object from a CloudStorageFilters message. Also converts values to other types if specified. + * @param message CloudStorageFilters + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.storageinsights.v1.CloudStorageFilters, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudStorageFilters to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudStorageFilters + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudStorageDestinationOptions. */ + interface ICloudStorageDestinationOptions { + + /** CloudStorageDestinationOptions bucket */ + bucket?: (string|null); + + /** CloudStorageDestinationOptions destinationPath */ + destinationPath?: (string|null); + } + + /** Represents a CloudStorageDestinationOptions. */ + class CloudStorageDestinationOptions implements ICloudStorageDestinationOptions { + + /** + * Constructs a new CloudStorageDestinationOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.storageinsights.v1.ICloudStorageDestinationOptions); + + /** CloudStorageDestinationOptions bucket. */ + public bucket: string; + + /** CloudStorageDestinationOptions destinationPath. */ + public destinationPath: string; + + /** + * Creates a new CloudStorageDestinationOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudStorageDestinationOptions instance + */ + public static create(properties?: google.cloud.storageinsights.v1.ICloudStorageDestinationOptions): google.cloud.storageinsights.v1.CloudStorageDestinationOptions; + + /** + * Encodes the specified CloudStorageDestinationOptions message. Does not implicitly {@link google.cloud.storageinsights.v1.CloudStorageDestinationOptions.verify|verify} messages. + * @param message CloudStorageDestinationOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.storageinsights.v1.ICloudStorageDestinationOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudStorageDestinationOptions message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.CloudStorageDestinationOptions.verify|verify} messages. + * @param message CloudStorageDestinationOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.storageinsights.v1.ICloudStorageDestinationOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudStorageDestinationOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudStorageDestinationOptions + * @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.storageinsights.v1.CloudStorageDestinationOptions; + + /** + * Decodes a CloudStorageDestinationOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudStorageDestinationOptions + * @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.storageinsights.v1.CloudStorageDestinationOptions; + + /** + * Verifies a CloudStorageDestinationOptions 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 CloudStorageDestinationOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudStorageDestinationOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.storageinsights.v1.CloudStorageDestinationOptions; + + /** + * Creates a plain object from a CloudStorageDestinationOptions message. Also converts values to other types if specified. + * @param message CloudStorageDestinationOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.storageinsights.v1.CloudStorageDestinationOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudStorageDestinationOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudStorageDestinationOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ObjectMetadataReportOptions. */ + interface IObjectMetadataReportOptions { + + /** ObjectMetadataReportOptions metadataFields */ + metadataFields?: (string[]|null); + + /** ObjectMetadataReportOptions storageFilters */ + storageFilters?: (google.cloud.storageinsights.v1.ICloudStorageFilters|null); + + /** ObjectMetadataReportOptions storageDestinationOptions */ + storageDestinationOptions?: (google.cloud.storageinsights.v1.ICloudStorageDestinationOptions|null); + } + + /** Represents an ObjectMetadataReportOptions. */ + class ObjectMetadataReportOptions implements IObjectMetadataReportOptions { + + /** + * Constructs a new ObjectMetadataReportOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.storageinsights.v1.IObjectMetadataReportOptions); + + /** ObjectMetadataReportOptions metadataFields. */ + public metadataFields: string[]; + + /** ObjectMetadataReportOptions storageFilters. */ + public storageFilters?: (google.cloud.storageinsights.v1.ICloudStorageFilters|null); + + /** ObjectMetadataReportOptions storageDestinationOptions. */ + public storageDestinationOptions?: (google.cloud.storageinsights.v1.ICloudStorageDestinationOptions|null); + + /** ObjectMetadataReportOptions filter. */ + public filter?: "storageFilters"; + + /** ObjectMetadataReportOptions destinationOptions. */ + public destinationOptions?: "storageDestinationOptions"; + + /** + * Creates a new ObjectMetadataReportOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ObjectMetadataReportOptions instance + */ + public static create(properties?: google.cloud.storageinsights.v1.IObjectMetadataReportOptions): google.cloud.storageinsights.v1.ObjectMetadataReportOptions; + + /** + * Encodes the specified ObjectMetadataReportOptions message. Does not implicitly {@link google.cloud.storageinsights.v1.ObjectMetadataReportOptions.verify|verify} messages. + * @param message ObjectMetadataReportOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.storageinsights.v1.IObjectMetadataReportOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ObjectMetadataReportOptions message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.ObjectMetadataReportOptions.verify|verify} messages. + * @param message ObjectMetadataReportOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.storageinsights.v1.IObjectMetadataReportOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ObjectMetadataReportOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ObjectMetadataReportOptions + * @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.storageinsights.v1.ObjectMetadataReportOptions; + + /** + * Decodes an ObjectMetadataReportOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ObjectMetadataReportOptions + * @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.storageinsights.v1.ObjectMetadataReportOptions; + + /** + * Verifies an ObjectMetadataReportOptions 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 ObjectMetadataReportOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ObjectMetadataReportOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.storageinsights.v1.ObjectMetadataReportOptions; + + /** + * Creates a plain object from an ObjectMetadataReportOptions message. Also converts values to other types if specified. + * @param message ObjectMetadataReportOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.storageinsights.v1.ObjectMetadataReportOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ObjectMetadataReportOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ObjectMetadataReportOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReportConfig. */ + interface IReportConfig { + + /** ReportConfig name */ + name?: (string|null); + + /** ReportConfig createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** ReportConfig updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** ReportConfig frequencyOptions */ + frequencyOptions?: (google.cloud.storageinsights.v1.IFrequencyOptions|null); + + /** ReportConfig csvOptions */ + csvOptions?: (google.cloud.storageinsights.v1.ICSVOptions|null); + + /** ReportConfig parquetOptions */ + parquetOptions?: (google.cloud.storageinsights.v1.IParquetOptions|null); + + /** ReportConfig objectMetadataReportOptions */ + objectMetadataReportOptions?: (google.cloud.storageinsights.v1.IObjectMetadataReportOptions|null); + + /** ReportConfig labels */ + labels?: ({ [k: string]: string }|null); + + /** ReportConfig displayName */ + displayName?: (string|null); + } + + /** Represents a ReportConfig. */ + class ReportConfig implements IReportConfig { + + /** + * Constructs a new ReportConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.storageinsights.v1.IReportConfig); + + /** ReportConfig name. */ + public name: string; + + /** ReportConfig createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** ReportConfig updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** ReportConfig frequencyOptions. */ + public frequencyOptions?: (google.cloud.storageinsights.v1.IFrequencyOptions|null); + + /** ReportConfig csvOptions. */ + public csvOptions?: (google.cloud.storageinsights.v1.ICSVOptions|null); + + /** ReportConfig parquetOptions. */ + public parquetOptions?: (google.cloud.storageinsights.v1.IParquetOptions|null); + + /** ReportConfig objectMetadataReportOptions. */ + public objectMetadataReportOptions?: (google.cloud.storageinsights.v1.IObjectMetadataReportOptions|null); + + /** ReportConfig labels. */ + public labels: { [k: string]: string }; + + /** ReportConfig displayName. */ + public displayName: string; + + /** ReportConfig reportFormat. */ + public reportFormat?: ("csvOptions"|"parquetOptions"); + + /** ReportConfig reportKind. */ + public reportKind?: "objectMetadataReportOptions"; + + /** + * Creates a new ReportConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ReportConfig instance + */ + public static create(properties?: google.cloud.storageinsights.v1.IReportConfig): google.cloud.storageinsights.v1.ReportConfig; + + /** + * Encodes the specified ReportConfig message. Does not implicitly {@link google.cloud.storageinsights.v1.ReportConfig.verify|verify} messages. + * @param message ReportConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.storageinsights.v1.IReportConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReportConfig message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.ReportConfig.verify|verify} messages. + * @param message ReportConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.storageinsights.v1.IReportConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReportConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReportConfig + * @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.storageinsights.v1.ReportConfig; + + /** + * Decodes a ReportConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReportConfig + * @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.storageinsights.v1.ReportConfig; + + /** + * Verifies a ReportConfig 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 ReportConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReportConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.storageinsights.v1.ReportConfig; + + /** + * Creates a plain object from a ReportConfig message. Also converts values to other types if specified. + * @param message ReportConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.storageinsights.v1.ReportConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReportConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReportConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @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.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @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.api.Http; + + /** + * Verifies a Http 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 Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @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.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @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.api.HttpRule; + + /** + * Verifies a HttpRule 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 HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @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.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @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.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern 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 CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @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.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @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.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor 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 ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @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.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @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.api.ResourceReference; + + /** + * Verifies a ResourceReference 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 ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @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.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @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.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet 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 FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (string|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** FileDescriptorProto edition. */ + public edition: string; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @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.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @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.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto 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 FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @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.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @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.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto 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 DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @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.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @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.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange 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 ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @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.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @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.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange 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 ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @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.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @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.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions 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 ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @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.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @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.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto 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 FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @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.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @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.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto 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 OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @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.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @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.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto 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 EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @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.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @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.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange 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 EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @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.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @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.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto 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 EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @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.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @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.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto 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 ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @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.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @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.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto 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 MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @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.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @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.protobuf.FileOptions; + + /** + * Verifies a FileOptions 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 FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @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.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @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.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions 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 MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @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.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @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.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions 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 FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @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.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @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.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions 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 OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @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.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @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.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions 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 EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @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.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @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.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions 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 EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @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.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @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.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions 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 ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @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.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @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.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions 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 MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @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.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @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.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption 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 UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @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.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @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.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart 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 NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @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.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @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.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo 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 SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @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.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @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.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location 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 Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @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.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @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.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo 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 GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @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.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @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.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation 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 Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } + } + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @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.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @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.protobuf.Empty; + + /** + * Verifies an Empty 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 Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @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.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @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.protobuf.FieldMask; + + /** + * Verifies a FieldMask 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 FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @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.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @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.protobuf.Timestamp; + + /** + * Verifies a Timestamp 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 Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|string|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: (Uint8Array|string); + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Any + * @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.protobuf.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Any + * @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.protobuf.Any; + + /** + * Verifies an Any 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 Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Any + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @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.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @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.protobuf.Duration; + + /** + * Verifies a Duration 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 Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** 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 { + + /** Properties of a Date. */ + interface IDate { + + /** Date year */ + year?: (number|null); + + /** Date month */ + month?: (number|null); + + /** Date day */ + day?: (number|null); + } + + /** Represents a Date. */ + class Date implements IDate { + + /** + * Constructs a new Date. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.IDate); + + /** Date year. */ + public year: number; + + /** Date month. */ + public month: number; + + /** Date day. */ + public day: number; + + /** + * Creates a new Date instance using the specified properties. + * @param [properties] Properties to set + * @returns Date instance + */ + public static create(properties?: google.type.IDate): google.type.Date; + + /** + * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @param message Date message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @param message Date message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Date message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Date + * @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.type.Date; + + /** + * Decodes a Date message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Date + * @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.type.Date; + + /** + * Verifies a Date 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 Date message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Date + */ + public static fromObject(object: { [k: string]: any }): google.type.Date; + + /** + * Creates a plain object from a Date message. Also converts values to other types if specified. + * @param message Date + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.Date, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Date to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Date + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DateTime. */ + interface IDateTime { + + /** DateTime year */ + year?: (number|null); + + /** DateTime month */ + month?: (number|null); + + /** DateTime day */ + day?: (number|null); + + /** DateTime hours */ + hours?: (number|null); + + /** DateTime minutes */ + minutes?: (number|null); + + /** DateTime seconds */ + seconds?: (number|null); + + /** DateTime nanos */ + nanos?: (number|null); + + /** DateTime utcOffset */ + utcOffset?: (google.protobuf.IDuration|null); + + /** DateTime timeZone */ + timeZone?: (google.type.ITimeZone|null); + } + + /** Represents a DateTime. */ + class DateTime implements IDateTime { + + /** + * Constructs a new DateTime. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.IDateTime); + + /** DateTime year. */ + public year: number; + + /** DateTime month. */ + public month: number; + + /** DateTime day. */ + public day: number; + + /** DateTime hours. */ + public hours: number; + + /** DateTime minutes. */ + public minutes: number; + + /** DateTime seconds. */ + public seconds: number; + + /** DateTime nanos. */ + public nanos: number; + + /** DateTime utcOffset. */ + public utcOffset?: (google.protobuf.IDuration|null); + + /** DateTime timeZone. */ + public timeZone?: (google.type.ITimeZone|null); + + /** DateTime timeOffset. */ + public timeOffset?: ("utcOffset"|"timeZone"); + + /** + * Creates a new DateTime instance using the specified properties. + * @param [properties] Properties to set + * @returns DateTime instance + */ + public static create(properties?: google.type.IDateTime): google.type.DateTime; + + /** + * Encodes the specified DateTime message. Does not implicitly {@link google.type.DateTime.verify|verify} messages. + * @param message DateTime message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.IDateTime, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DateTime message, length delimited. Does not implicitly {@link google.type.DateTime.verify|verify} messages. + * @param message DateTime message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.IDateTime, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DateTime message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DateTime + * @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.type.DateTime; + + /** + * Decodes a DateTime message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DateTime + * @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.type.DateTime; + + /** + * Verifies a DateTime 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 DateTime message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DateTime + */ + public static fromObject(object: { [k: string]: any }): google.type.DateTime; + + /** + * Creates a plain object from a DateTime message. Also converts values to other types if specified. + * @param message DateTime + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.DateTime, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DateTime to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DateTime + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TimeZone. */ + interface ITimeZone { + + /** TimeZone id */ + id?: (string|null); + + /** TimeZone version */ + version?: (string|null); + } + + /** Represents a TimeZone. */ + class TimeZone implements ITimeZone { + + /** + * Constructs a new TimeZone. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.ITimeZone); + + /** TimeZone id. */ + public id: string; + + /** TimeZone version. */ + public version: string; + + /** + * Creates a new TimeZone instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeZone instance + */ + public static create(properties?: google.type.ITimeZone): google.type.TimeZone; + + /** + * Encodes the specified TimeZone message. Does not implicitly {@link google.type.TimeZone.verify|verify} messages. + * @param message TimeZone message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.ITimeZone, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeZone message, length delimited. Does not implicitly {@link google.type.TimeZone.verify|verify} messages. + * @param message TimeZone message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.ITimeZone, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeZone message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeZone + * @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.type.TimeZone; + + /** + * Decodes a TimeZone message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeZone + * @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.type.TimeZone; + + /** + * Verifies a TimeZone 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 TimeZone message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeZone + */ + public static fromObject(object: { [k: string]: any }): google.type.TimeZone; + + /** + * Creates a plain object from a TimeZone message. Also converts values to other types if specified. + * @param message TimeZone + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.TimeZone, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeZone to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeZone + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } +} diff --git a/packages/google-cloud-storageinsights/protos/protos.js b/packages/google-cloud-storageinsights/protos/protos.js new file mode 100644 index 00000000000..1141c6f0d24 --- /dev/null +++ b/packages/google-cloud-storageinsights/protos/protos.js @@ -0,0 +1,19033 @@ +// Copyright 2023 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. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._google_cloud_storageinsights_protos || ($protobuf.roots._google_cloud_storageinsights_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.storageinsights = (function() { + + /** + * Namespace storageinsights. + * @memberof google.cloud + * @namespace + */ + var storageinsights = {}; + + storageinsights.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.storageinsights + * @namespace + */ + var v1 = {}; + + v1.StorageInsights = (function() { + + /** + * Constructs a new StorageInsights service. + * @memberof google.cloud.storageinsights.v1 + * @classdesc Represents a StorageInsights + * @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 StorageInsights(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (StorageInsights.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = StorageInsights; + + /** + * Creates new StorageInsights service using the specified rpc implementation. + * @function create + * @memberof google.cloud.storageinsights.v1.StorageInsights + * @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 {StorageInsights} RPC service. Useful where requests and/or responses are streamed. + */ + StorageInsights.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.storageinsights.v1.StorageInsights|listReportConfigs}. + * @memberof google.cloud.storageinsights.v1.StorageInsights + * @typedef ListReportConfigsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.storageinsights.v1.ListReportConfigsResponse} [response] ListReportConfigsResponse + */ + + /** + * Calls ListReportConfigs. + * @function listReportConfigs + * @memberof google.cloud.storageinsights.v1.StorageInsights + * @instance + * @param {google.cloud.storageinsights.v1.IListReportConfigsRequest} request ListReportConfigsRequest message or plain object + * @param {google.cloud.storageinsights.v1.StorageInsights.ListReportConfigsCallback} callback Node-style callback called with the error, if any, and ListReportConfigsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(StorageInsights.prototype.listReportConfigs = function listReportConfigs(request, callback) { + return this.rpcCall(listReportConfigs, $root.google.cloud.storageinsights.v1.ListReportConfigsRequest, $root.google.cloud.storageinsights.v1.ListReportConfigsResponse, request, callback); + }, "name", { value: "ListReportConfigs" }); + + /** + * Calls ListReportConfigs. + * @function listReportConfigs + * @memberof google.cloud.storageinsights.v1.StorageInsights + * @instance + * @param {google.cloud.storageinsights.v1.IListReportConfigsRequest} request ListReportConfigsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.storageinsights.v1.StorageInsights|getReportConfig}. + * @memberof google.cloud.storageinsights.v1.StorageInsights + * @typedef GetReportConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.storageinsights.v1.ReportConfig} [response] ReportConfig + */ + + /** + * Calls GetReportConfig. + * @function getReportConfig + * @memberof google.cloud.storageinsights.v1.StorageInsights + * @instance + * @param {google.cloud.storageinsights.v1.IGetReportConfigRequest} request GetReportConfigRequest message or plain object + * @param {google.cloud.storageinsights.v1.StorageInsights.GetReportConfigCallback} callback Node-style callback called with the error, if any, and ReportConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(StorageInsights.prototype.getReportConfig = function getReportConfig(request, callback) { + return this.rpcCall(getReportConfig, $root.google.cloud.storageinsights.v1.GetReportConfigRequest, $root.google.cloud.storageinsights.v1.ReportConfig, request, callback); + }, "name", { value: "GetReportConfig" }); + + /** + * Calls GetReportConfig. + * @function getReportConfig + * @memberof google.cloud.storageinsights.v1.StorageInsights + * @instance + * @param {google.cloud.storageinsights.v1.IGetReportConfigRequest} request GetReportConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.storageinsights.v1.StorageInsights|createReportConfig}. + * @memberof google.cloud.storageinsights.v1.StorageInsights + * @typedef CreateReportConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.storageinsights.v1.ReportConfig} [response] ReportConfig + */ + + /** + * Calls CreateReportConfig. + * @function createReportConfig + * @memberof google.cloud.storageinsights.v1.StorageInsights + * @instance + * @param {google.cloud.storageinsights.v1.ICreateReportConfigRequest} request CreateReportConfigRequest message or plain object + * @param {google.cloud.storageinsights.v1.StorageInsights.CreateReportConfigCallback} callback Node-style callback called with the error, if any, and ReportConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(StorageInsights.prototype.createReportConfig = function createReportConfig(request, callback) { + return this.rpcCall(createReportConfig, $root.google.cloud.storageinsights.v1.CreateReportConfigRequest, $root.google.cloud.storageinsights.v1.ReportConfig, request, callback); + }, "name", { value: "CreateReportConfig" }); + + /** + * Calls CreateReportConfig. + * @function createReportConfig + * @memberof google.cloud.storageinsights.v1.StorageInsights + * @instance + * @param {google.cloud.storageinsights.v1.ICreateReportConfigRequest} request CreateReportConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.storageinsights.v1.StorageInsights|updateReportConfig}. + * @memberof google.cloud.storageinsights.v1.StorageInsights + * @typedef UpdateReportConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.storageinsights.v1.ReportConfig} [response] ReportConfig + */ + + /** + * Calls UpdateReportConfig. + * @function updateReportConfig + * @memberof google.cloud.storageinsights.v1.StorageInsights + * @instance + * @param {google.cloud.storageinsights.v1.IUpdateReportConfigRequest} request UpdateReportConfigRequest message or plain object + * @param {google.cloud.storageinsights.v1.StorageInsights.UpdateReportConfigCallback} callback Node-style callback called with the error, if any, and ReportConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(StorageInsights.prototype.updateReportConfig = function updateReportConfig(request, callback) { + return this.rpcCall(updateReportConfig, $root.google.cloud.storageinsights.v1.UpdateReportConfigRequest, $root.google.cloud.storageinsights.v1.ReportConfig, request, callback); + }, "name", { value: "UpdateReportConfig" }); + + /** + * Calls UpdateReportConfig. + * @function updateReportConfig + * @memberof google.cloud.storageinsights.v1.StorageInsights + * @instance + * @param {google.cloud.storageinsights.v1.IUpdateReportConfigRequest} request UpdateReportConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.storageinsights.v1.StorageInsights|deleteReportConfig}. + * @memberof google.cloud.storageinsights.v1.StorageInsights + * @typedef DeleteReportConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteReportConfig. + * @function deleteReportConfig + * @memberof google.cloud.storageinsights.v1.StorageInsights + * @instance + * @param {google.cloud.storageinsights.v1.IDeleteReportConfigRequest} request DeleteReportConfigRequest message or plain object + * @param {google.cloud.storageinsights.v1.StorageInsights.DeleteReportConfigCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(StorageInsights.prototype.deleteReportConfig = function deleteReportConfig(request, callback) { + return this.rpcCall(deleteReportConfig, $root.google.cloud.storageinsights.v1.DeleteReportConfigRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteReportConfig" }); + + /** + * Calls DeleteReportConfig. + * @function deleteReportConfig + * @memberof google.cloud.storageinsights.v1.StorageInsights + * @instance + * @param {google.cloud.storageinsights.v1.IDeleteReportConfigRequest} request DeleteReportConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.storageinsights.v1.StorageInsights|listReportDetails}. + * @memberof google.cloud.storageinsights.v1.StorageInsights + * @typedef ListReportDetailsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.storageinsights.v1.ListReportDetailsResponse} [response] ListReportDetailsResponse + */ + + /** + * Calls ListReportDetails. + * @function listReportDetails + * @memberof google.cloud.storageinsights.v1.StorageInsights + * @instance + * @param {google.cloud.storageinsights.v1.IListReportDetailsRequest} request ListReportDetailsRequest message or plain object + * @param {google.cloud.storageinsights.v1.StorageInsights.ListReportDetailsCallback} callback Node-style callback called with the error, if any, and ListReportDetailsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(StorageInsights.prototype.listReportDetails = function listReportDetails(request, callback) { + return this.rpcCall(listReportDetails, $root.google.cloud.storageinsights.v1.ListReportDetailsRequest, $root.google.cloud.storageinsights.v1.ListReportDetailsResponse, request, callback); + }, "name", { value: "ListReportDetails" }); + + /** + * Calls ListReportDetails. + * @function listReportDetails + * @memberof google.cloud.storageinsights.v1.StorageInsights + * @instance + * @param {google.cloud.storageinsights.v1.IListReportDetailsRequest} request ListReportDetailsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.storageinsights.v1.StorageInsights|getReportDetail}. + * @memberof google.cloud.storageinsights.v1.StorageInsights + * @typedef GetReportDetailCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.storageinsights.v1.ReportDetail} [response] ReportDetail + */ + + /** + * Calls GetReportDetail. + * @function getReportDetail + * @memberof google.cloud.storageinsights.v1.StorageInsights + * @instance + * @param {google.cloud.storageinsights.v1.IGetReportDetailRequest} request GetReportDetailRequest message or plain object + * @param {google.cloud.storageinsights.v1.StorageInsights.GetReportDetailCallback} callback Node-style callback called with the error, if any, and ReportDetail + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(StorageInsights.prototype.getReportDetail = function getReportDetail(request, callback) { + return this.rpcCall(getReportDetail, $root.google.cloud.storageinsights.v1.GetReportDetailRequest, $root.google.cloud.storageinsights.v1.ReportDetail, request, callback); + }, "name", { value: "GetReportDetail" }); + + /** + * Calls GetReportDetail. + * @function getReportDetail + * @memberof google.cloud.storageinsights.v1.StorageInsights + * @instance + * @param {google.cloud.storageinsights.v1.IGetReportDetailRequest} request GetReportDetailRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return StorageInsights; + })(); + + v1.ListReportConfigsRequest = (function() { + + /** + * Properties of a ListReportConfigsRequest. + * @memberof google.cloud.storageinsights.v1 + * @interface IListReportConfigsRequest + * @property {string|null} [parent] ListReportConfigsRequest parent + * @property {number|null} [pageSize] ListReportConfigsRequest pageSize + * @property {string|null} [pageToken] ListReportConfigsRequest pageToken + * @property {string|null} [filter] ListReportConfigsRequest filter + * @property {string|null} [orderBy] ListReportConfigsRequest orderBy + */ + + /** + * Constructs a new ListReportConfigsRequest. + * @memberof google.cloud.storageinsights.v1 + * @classdesc Represents a ListReportConfigsRequest. + * @implements IListReportConfigsRequest + * @constructor + * @param {google.cloud.storageinsights.v1.IListReportConfigsRequest=} [properties] Properties to set + */ + function ListReportConfigsRequest(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]]; + } + + /** + * ListReportConfigsRequest parent. + * @member {string} parent + * @memberof google.cloud.storageinsights.v1.ListReportConfigsRequest + * @instance + */ + ListReportConfigsRequest.prototype.parent = ""; + + /** + * ListReportConfigsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.storageinsights.v1.ListReportConfigsRequest + * @instance + */ + ListReportConfigsRequest.prototype.pageSize = 0; + + /** + * ListReportConfigsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.storageinsights.v1.ListReportConfigsRequest + * @instance + */ + ListReportConfigsRequest.prototype.pageToken = ""; + + /** + * ListReportConfigsRequest filter. + * @member {string} filter + * @memberof google.cloud.storageinsights.v1.ListReportConfigsRequest + * @instance + */ + ListReportConfigsRequest.prototype.filter = ""; + + /** + * ListReportConfigsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.storageinsights.v1.ListReportConfigsRequest + * @instance + */ + ListReportConfigsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListReportConfigsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.storageinsights.v1.ListReportConfigsRequest + * @static + * @param {google.cloud.storageinsights.v1.IListReportConfigsRequest=} [properties] Properties to set + * @returns {google.cloud.storageinsights.v1.ListReportConfigsRequest} ListReportConfigsRequest instance + */ + ListReportConfigsRequest.create = function create(properties) { + return new ListReportConfigsRequest(properties); + }; + + /** + * Encodes the specified ListReportConfigsRequest message. Does not implicitly {@link google.cloud.storageinsights.v1.ListReportConfigsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.storageinsights.v1.ListReportConfigsRequest + * @static + * @param {google.cloud.storageinsights.v1.IListReportConfigsRequest} message ListReportConfigsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReportConfigsRequest.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.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListReportConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.ListReportConfigsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.storageinsights.v1.ListReportConfigsRequest + * @static + * @param {google.cloud.storageinsights.v1.IListReportConfigsRequest} message ListReportConfigsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReportConfigsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListReportConfigsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.storageinsights.v1.ListReportConfigsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.storageinsights.v1.ListReportConfigsRequest} ListReportConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReportConfigsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.storageinsights.v1.ListReportConfigsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListReportConfigsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.storageinsights.v1.ListReportConfigsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.storageinsights.v1.ListReportConfigsRequest} ListReportConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReportConfigsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListReportConfigsRequest message. + * @function verify + * @memberof google.cloud.storageinsights.v1.ListReportConfigsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListReportConfigsRequest.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.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListReportConfigsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.storageinsights.v1.ListReportConfigsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.storageinsights.v1.ListReportConfigsRequest} ListReportConfigsRequest + */ + ListReportConfigsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.storageinsights.v1.ListReportConfigsRequest) + return object; + var message = new $root.google.cloud.storageinsights.v1.ListReportConfigsRequest(); + 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.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListReportConfigsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.storageinsights.v1.ListReportConfigsRequest + * @static + * @param {google.cloud.storageinsights.v1.ListReportConfigsRequest} message ListReportConfigsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListReportConfigsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + 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.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListReportConfigsRequest to JSON. + * @function toJSON + * @memberof google.cloud.storageinsights.v1.ListReportConfigsRequest + * @instance + * @returns {Object.} JSON object + */ + ListReportConfigsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListReportConfigsRequest + * @function getTypeUrl + * @memberof google.cloud.storageinsights.v1.ListReportConfigsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListReportConfigsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.storageinsights.v1.ListReportConfigsRequest"; + }; + + return ListReportConfigsRequest; + })(); + + v1.ListReportConfigsResponse = (function() { + + /** + * Properties of a ListReportConfigsResponse. + * @memberof google.cloud.storageinsights.v1 + * @interface IListReportConfigsResponse + * @property {Array.|null} [reportConfigs] ListReportConfigsResponse reportConfigs + * @property {string|null} [nextPageToken] ListReportConfigsResponse nextPageToken + * @property {Array.|null} [unreachable] ListReportConfigsResponse unreachable + */ + + /** + * Constructs a new ListReportConfigsResponse. + * @memberof google.cloud.storageinsights.v1 + * @classdesc Represents a ListReportConfigsResponse. + * @implements IListReportConfigsResponse + * @constructor + * @param {google.cloud.storageinsights.v1.IListReportConfigsResponse=} [properties] Properties to set + */ + function ListReportConfigsResponse(properties) { + this.reportConfigs = []; + this.unreachable = []; + 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]]; + } + + /** + * ListReportConfigsResponse reportConfigs. + * @member {Array.} reportConfigs + * @memberof google.cloud.storageinsights.v1.ListReportConfigsResponse + * @instance + */ + ListReportConfigsResponse.prototype.reportConfigs = $util.emptyArray; + + /** + * ListReportConfigsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.storageinsights.v1.ListReportConfigsResponse + * @instance + */ + ListReportConfigsResponse.prototype.nextPageToken = ""; + + /** + * ListReportConfigsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.storageinsights.v1.ListReportConfigsResponse + * @instance + */ + ListReportConfigsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListReportConfigsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.storageinsights.v1.ListReportConfigsResponse + * @static + * @param {google.cloud.storageinsights.v1.IListReportConfigsResponse=} [properties] Properties to set + * @returns {google.cloud.storageinsights.v1.ListReportConfigsResponse} ListReportConfigsResponse instance + */ + ListReportConfigsResponse.create = function create(properties) { + return new ListReportConfigsResponse(properties); + }; + + /** + * Encodes the specified ListReportConfigsResponse message. Does not implicitly {@link google.cloud.storageinsights.v1.ListReportConfigsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.storageinsights.v1.ListReportConfigsResponse + * @static + * @param {google.cloud.storageinsights.v1.IListReportConfigsResponse} message ListReportConfigsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReportConfigsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.reportConfigs != null && message.reportConfigs.length) + for (var i = 0; i < message.reportConfigs.length; ++i) + $root.google.cloud.storageinsights.v1.ReportConfig.encode(message.reportConfigs[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); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListReportConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.ListReportConfigsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.storageinsights.v1.ListReportConfigsResponse + * @static + * @param {google.cloud.storageinsights.v1.IListReportConfigsResponse} message ListReportConfigsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReportConfigsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListReportConfigsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.storageinsights.v1.ListReportConfigsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.storageinsights.v1.ListReportConfigsResponse} ListReportConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReportConfigsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.storageinsights.v1.ListReportConfigsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.reportConfigs && message.reportConfigs.length)) + message.reportConfigs = []; + message.reportConfigs.push($root.google.cloud.storageinsights.v1.ReportConfig.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListReportConfigsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.storageinsights.v1.ListReportConfigsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.storageinsights.v1.ListReportConfigsResponse} ListReportConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReportConfigsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListReportConfigsResponse message. + * @function verify + * @memberof google.cloud.storageinsights.v1.ListReportConfigsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListReportConfigsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.reportConfigs != null && message.hasOwnProperty("reportConfigs")) { + if (!Array.isArray(message.reportConfigs)) + return "reportConfigs: array expected"; + for (var i = 0; i < message.reportConfigs.length; ++i) { + var error = $root.google.cloud.storageinsights.v1.ReportConfig.verify(message.reportConfigs[i]); + if (error) + return "reportConfigs." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListReportConfigsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.storageinsights.v1.ListReportConfigsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.storageinsights.v1.ListReportConfigsResponse} ListReportConfigsResponse + */ + ListReportConfigsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.storageinsights.v1.ListReportConfigsResponse) + return object; + var message = new $root.google.cloud.storageinsights.v1.ListReportConfigsResponse(); + if (object.reportConfigs) { + if (!Array.isArray(object.reportConfigs)) + throw TypeError(".google.cloud.storageinsights.v1.ListReportConfigsResponse.reportConfigs: array expected"); + message.reportConfigs = []; + for (var i = 0; i < object.reportConfigs.length; ++i) { + if (typeof object.reportConfigs[i] !== "object") + throw TypeError(".google.cloud.storageinsights.v1.ListReportConfigsResponse.reportConfigs: object expected"); + message.reportConfigs[i] = $root.google.cloud.storageinsights.v1.ReportConfig.fromObject(object.reportConfigs[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.storageinsights.v1.ListReportConfigsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListReportConfigsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.storageinsights.v1.ListReportConfigsResponse + * @static + * @param {google.cloud.storageinsights.v1.ListReportConfigsResponse} message ListReportConfigsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListReportConfigsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.reportConfigs = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.reportConfigs && message.reportConfigs.length) { + object.reportConfigs = []; + for (var j = 0; j < message.reportConfigs.length; ++j) + object.reportConfigs[j] = $root.google.cloud.storageinsights.v1.ReportConfig.toObject(message.reportConfigs[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListReportConfigsResponse to JSON. + * @function toJSON + * @memberof google.cloud.storageinsights.v1.ListReportConfigsResponse + * @instance + * @returns {Object.} JSON object + */ + ListReportConfigsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListReportConfigsResponse + * @function getTypeUrl + * @memberof google.cloud.storageinsights.v1.ListReportConfigsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListReportConfigsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.storageinsights.v1.ListReportConfigsResponse"; + }; + + return ListReportConfigsResponse; + })(); + + v1.GetReportConfigRequest = (function() { + + /** + * Properties of a GetReportConfigRequest. + * @memberof google.cloud.storageinsights.v1 + * @interface IGetReportConfigRequest + * @property {string|null} [name] GetReportConfigRequest name + */ + + /** + * Constructs a new GetReportConfigRequest. + * @memberof google.cloud.storageinsights.v1 + * @classdesc Represents a GetReportConfigRequest. + * @implements IGetReportConfigRequest + * @constructor + * @param {google.cloud.storageinsights.v1.IGetReportConfigRequest=} [properties] Properties to set + */ + function GetReportConfigRequest(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]]; + } + + /** + * GetReportConfigRequest name. + * @member {string} name + * @memberof google.cloud.storageinsights.v1.GetReportConfigRequest + * @instance + */ + GetReportConfigRequest.prototype.name = ""; + + /** + * Creates a new GetReportConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.storageinsights.v1.GetReportConfigRequest + * @static + * @param {google.cloud.storageinsights.v1.IGetReportConfigRequest=} [properties] Properties to set + * @returns {google.cloud.storageinsights.v1.GetReportConfigRequest} GetReportConfigRequest instance + */ + GetReportConfigRequest.create = function create(properties) { + return new GetReportConfigRequest(properties); + }; + + /** + * Encodes the specified GetReportConfigRequest message. Does not implicitly {@link google.cloud.storageinsights.v1.GetReportConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.storageinsights.v1.GetReportConfigRequest + * @static + * @param {google.cloud.storageinsights.v1.IGetReportConfigRequest} message GetReportConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetReportConfigRequest.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 GetReportConfigRequest message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.GetReportConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.storageinsights.v1.GetReportConfigRequest + * @static + * @param {google.cloud.storageinsights.v1.IGetReportConfigRequest} message GetReportConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetReportConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetReportConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.storageinsights.v1.GetReportConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.storageinsights.v1.GetReportConfigRequest} GetReportConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetReportConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.storageinsights.v1.GetReportConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetReportConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.storageinsights.v1.GetReportConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.storageinsights.v1.GetReportConfigRequest} GetReportConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetReportConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetReportConfigRequest message. + * @function verify + * @memberof google.cloud.storageinsights.v1.GetReportConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetReportConfigRequest.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 GetReportConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.storageinsights.v1.GetReportConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.storageinsights.v1.GetReportConfigRequest} GetReportConfigRequest + */ + GetReportConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.storageinsights.v1.GetReportConfigRequest) + return object; + var message = new $root.google.cloud.storageinsights.v1.GetReportConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetReportConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.storageinsights.v1.GetReportConfigRequest + * @static + * @param {google.cloud.storageinsights.v1.GetReportConfigRequest} message GetReportConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetReportConfigRequest.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 GetReportConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.storageinsights.v1.GetReportConfigRequest + * @instance + * @returns {Object.} JSON object + */ + GetReportConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetReportConfigRequest + * @function getTypeUrl + * @memberof google.cloud.storageinsights.v1.GetReportConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetReportConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.storageinsights.v1.GetReportConfigRequest"; + }; + + return GetReportConfigRequest; + })(); + + v1.CreateReportConfigRequest = (function() { + + /** + * Properties of a CreateReportConfigRequest. + * @memberof google.cloud.storageinsights.v1 + * @interface ICreateReportConfigRequest + * @property {string|null} [parent] CreateReportConfigRequest parent + * @property {google.cloud.storageinsights.v1.IReportConfig|null} [reportConfig] CreateReportConfigRequest reportConfig + * @property {string|null} [requestId] CreateReportConfigRequest requestId + */ + + /** + * Constructs a new CreateReportConfigRequest. + * @memberof google.cloud.storageinsights.v1 + * @classdesc Represents a CreateReportConfigRequest. + * @implements ICreateReportConfigRequest + * @constructor + * @param {google.cloud.storageinsights.v1.ICreateReportConfigRequest=} [properties] Properties to set + */ + function CreateReportConfigRequest(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]]; + } + + /** + * CreateReportConfigRequest parent. + * @member {string} parent + * @memberof google.cloud.storageinsights.v1.CreateReportConfigRequest + * @instance + */ + CreateReportConfigRequest.prototype.parent = ""; + + /** + * CreateReportConfigRequest reportConfig. + * @member {google.cloud.storageinsights.v1.IReportConfig|null|undefined} reportConfig + * @memberof google.cloud.storageinsights.v1.CreateReportConfigRequest + * @instance + */ + CreateReportConfigRequest.prototype.reportConfig = null; + + /** + * CreateReportConfigRequest requestId. + * @member {string} requestId + * @memberof google.cloud.storageinsights.v1.CreateReportConfigRequest + * @instance + */ + CreateReportConfigRequest.prototype.requestId = ""; + + /** + * Creates a new CreateReportConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.storageinsights.v1.CreateReportConfigRequest + * @static + * @param {google.cloud.storageinsights.v1.ICreateReportConfigRequest=} [properties] Properties to set + * @returns {google.cloud.storageinsights.v1.CreateReportConfigRequest} CreateReportConfigRequest instance + */ + CreateReportConfigRequest.create = function create(properties) { + return new CreateReportConfigRequest(properties); + }; + + /** + * Encodes the specified CreateReportConfigRequest message. Does not implicitly {@link google.cloud.storageinsights.v1.CreateReportConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.storageinsights.v1.CreateReportConfigRequest + * @static + * @param {google.cloud.storageinsights.v1.ICreateReportConfigRequest} message CreateReportConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateReportConfigRequest.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.reportConfig != null && Object.hasOwnProperty.call(message, "reportConfig")) + $root.google.cloud.storageinsights.v1.ReportConfig.encode(message.reportConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified CreateReportConfigRequest message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.CreateReportConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.storageinsights.v1.CreateReportConfigRequest + * @static + * @param {google.cloud.storageinsights.v1.ICreateReportConfigRequest} message CreateReportConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateReportConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateReportConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.storageinsights.v1.CreateReportConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.storageinsights.v1.CreateReportConfigRequest} CreateReportConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateReportConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.storageinsights.v1.CreateReportConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 3: { + message.reportConfig = $root.google.cloud.storageinsights.v1.ReportConfig.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateReportConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.storageinsights.v1.CreateReportConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.storageinsights.v1.CreateReportConfigRequest} CreateReportConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateReportConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateReportConfigRequest message. + * @function verify + * @memberof google.cloud.storageinsights.v1.CreateReportConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateReportConfigRequest.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.reportConfig != null && message.hasOwnProperty("reportConfig")) { + var error = $root.google.cloud.storageinsights.v1.ReportConfig.verify(message.reportConfig); + if (error) + return "reportConfig." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a CreateReportConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.storageinsights.v1.CreateReportConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.storageinsights.v1.CreateReportConfigRequest} CreateReportConfigRequest + */ + CreateReportConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.storageinsights.v1.CreateReportConfigRequest) + return object; + var message = new $root.google.cloud.storageinsights.v1.CreateReportConfigRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.reportConfig != null) { + if (typeof object.reportConfig !== "object") + throw TypeError(".google.cloud.storageinsights.v1.CreateReportConfigRequest.reportConfig: object expected"); + message.reportConfig = $root.google.cloud.storageinsights.v1.ReportConfig.fromObject(object.reportConfig); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a CreateReportConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.storageinsights.v1.CreateReportConfigRequest + * @static + * @param {google.cloud.storageinsights.v1.CreateReportConfigRequest} message CreateReportConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateReportConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.reportConfig = null; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.reportConfig != null && message.hasOwnProperty("reportConfig")) + object.reportConfig = $root.google.cloud.storageinsights.v1.ReportConfig.toObject(message.reportConfig, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this CreateReportConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.storageinsights.v1.CreateReportConfigRequest + * @instance + * @returns {Object.} JSON object + */ + CreateReportConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateReportConfigRequest + * @function getTypeUrl + * @memberof google.cloud.storageinsights.v1.CreateReportConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateReportConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.storageinsights.v1.CreateReportConfigRequest"; + }; + + return CreateReportConfigRequest; + })(); + + v1.UpdateReportConfigRequest = (function() { + + /** + * Properties of an UpdateReportConfigRequest. + * @memberof google.cloud.storageinsights.v1 + * @interface IUpdateReportConfigRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateReportConfigRequest updateMask + * @property {google.cloud.storageinsights.v1.IReportConfig|null} [reportConfig] UpdateReportConfigRequest reportConfig + * @property {string|null} [requestId] UpdateReportConfigRequest requestId + */ + + /** + * Constructs a new UpdateReportConfigRequest. + * @memberof google.cloud.storageinsights.v1 + * @classdesc Represents an UpdateReportConfigRequest. + * @implements IUpdateReportConfigRequest + * @constructor + * @param {google.cloud.storageinsights.v1.IUpdateReportConfigRequest=} [properties] Properties to set + */ + function UpdateReportConfigRequest(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]]; + } + + /** + * UpdateReportConfigRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.storageinsights.v1.UpdateReportConfigRequest + * @instance + */ + UpdateReportConfigRequest.prototype.updateMask = null; + + /** + * UpdateReportConfigRequest reportConfig. + * @member {google.cloud.storageinsights.v1.IReportConfig|null|undefined} reportConfig + * @memberof google.cloud.storageinsights.v1.UpdateReportConfigRequest + * @instance + */ + UpdateReportConfigRequest.prototype.reportConfig = null; + + /** + * UpdateReportConfigRequest requestId. + * @member {string} requestId + * @memberof google.cloud.storageinsights.v1.UpdateReportConfigRequest + * @instance + */ + UpdateReportConfigRequest.prototype.requestId = ""; + + /** + * Creates a new UpdateReportConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.storageinsights.v1.UpdateReportConfigRequest + * @static + * @param {google.cloud.storageinsights.v1.IUpdateReportConfigRequest=} [properties] Properties to set + * @returns {google.cloud.storageinsights.v1.UpdateReportConfigRequest} UpdateReportConfigRequest instance + */ + UpdateReportConfigRequest.create = function create(properties) { + return new UpdateReportConfigRequest(properties); + }; + + /** + * Encodes the specified UpdateReportConfigRequest message. Does not implicitly {@link google.cloud.storageinsights.v1.UpdateReportConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.storageinsights.v1.UpdateReportConfigRequest + * @static + * @param {google.cloud.storageinsights.v1.IUpdateReportConfigRequest} message UpdateReportConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateReportConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.reportConfig != null && Object.hasOwnProperty.call(message, "reportConfig")) + $root.google.cloud.storageinsights.v1.ReportConfig.encode(message.reportConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified UpdateReportConfigRequest message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.UpdateReportConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.storageinsights.v1.UpdateReportConfigRequest + * @static + * @param {google.cloud.storageinsights.v1.IUpdateReportConfigRequest} message UpdateReportConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateReportConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateReportConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.storageinsights.v1.UpdateReportConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.storageinsights.v1.UpdateReportConfigRequest} UpdateReportConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateReportConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.storageinsights.v1.UpdateReportConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.reportConfig = $root.google.cloud.storageinsights.v1.ReportConfig.decode(reader, reader.uint32()); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateReportConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.storageinsights.v1.UpdateReportConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.storageinsights.v1.UpdateReportConfigRequest} UpdateReportConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateReportConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateReportConfigRequest message. + * @function verify + * @memberof google.cloud.storageinsights.v1.UpdateReportConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateReportConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.reportConfig != null && message.hasOwnProperty("reportConfig")) { + var error = $root.google.cloud.storageinsights.v1.ReportConfig.verify(message.reportConfig); + if (error) + return "reportConfig." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates an UpdateReportConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.storageinsights.v1.UpdateReportConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.storageinsights.v1.UpdateReportConfigRequest} UpdateReportConfigRequest + */ + UpdateReportConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.storageinsights.v1.UpdateReportConfigRequest) + return object; + var message = new $root.google.cloud.storageinsights.v1.UpdateReportConfigRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.storageinsights.v1.UpdateReportConfigRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.reportConfig != null) { + if (typeof object.reportConfig !== "object") + throw TypeError(".google.cloud.storageinsights.v1.UpdateReportConfigRequest.reportConfig: object expected"); + message.reportConfig = $root.google.cloud.storageinsights.v1.ReportConfig.fromObject(object.reportConfig); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from an UpdateReportConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.storageinsights.v1.UpdateReportConfigRequest + * @static + * @param {google.cloud.storageinsights.v1.UpdateReportConfigRequest} message UpdateReportConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateReportConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.reportConfig = null; + object.requestId = ""; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.reportConfig != null && message.hasOwnProperty("reportConfig")) + object.reportConfig = $root.google.cloud.storageinsights.v1.ReportConfig.toObject(message.reportConfig, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this UpdateReportConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.storageinsights.v1.UpdateReportConfigRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateReportConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateReportConfigRequest + * @function getTypeUrl + * @memberof google.cloud.storageinsights.v1.UpdateReportConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateReportConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.storageinsights.v1.UpdateReportConfigRequest"; + }; + + return UpdateReportConfigRequest; + })(); + + v1.DeleteReportConfigRequest = (function() { + + /** + * Properties of a DeleteReportConfigRequest. + * @memberof google.cloud.storageinsights.v1 + * @interface IDeleteReportConfigRequest + * @property {string|null} [name] DeleteReportConfigRequest name + * @property {boolean|null} [force] DeleteReportConfigRequest force + * @property {string|null} [requestId] DeleteReportConfigRequest requestId + */ + + /** + * Constructs a new DeleteReportConfigRequest. + * @memberof google.cloud.storageinsights.v1 + * @classdesc Represents a DeleteReportConfigRequest. + * @implements IDeleteReportConfigRequest + * @constructor + * @param {google.cloud.storageinsights.v1.IDeleteReportConfigRequest=} [properties] Properties to set + */ + function DeleteReportConfigRequest(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]]; + } + + /** + * DeleteReportConfigRequest name. + * @member {string} name + * @memberof google.cloud.storageinsights.v1.DeleteReportConfigRequest + * @instance + */ + DeleteReportConfigRequest.prototype.name = ""; + + /** + * DeleteReportConfigRequest force. + * @member {boolean} force + * @memberof google.cloud.storageinsights.v1.DeleteReportConfigRequest + * @instance + */ + DeleteReportConfigRequest.prototype.force = false; + + /** + * DeleteReportConfigRequest requestId. + * @member {string} requestId + * @memberof google.cloud.storageinsights.v1.DeleteReportConfigRequest + * @instance + */ + DeleteReportConfigRequest.prototype.requestId = ""; + + /** + * Creates a new DeleteReportConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.storageinsights.v1.DeleteReportConfigRequest + * @static + * @param {google.cloud.storageinsights.v1.IDeleteReportConfigRequest=} [properties] Properties to set + * @returns {google.cloud.storageinsights.v1.DeleteReportConfigRequest} DeleteReportConfigRequest instance + */ + DeleteReportConfigRequest.create = function create(properties) { + return new DeleteReportConfigRequest(properties); + }; + + /** + * Encodes the specified DeleteReportConfigRequest message. Does not implicitly {@link google.cloud.storageinsights.v1.DeleteReportConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.storageinsights.v1.DeleteReportConfigRequest + * @static + * @param {google.cloud.storageinsights.v1.IDeleteReportConfigRequest} message DeleteReportConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteReportConfigRequest.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); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified DeleteReportConfigRequest message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.DeleteReportConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.storageinsights.v1.DeleteReportConfigRequest + * @static + * @param {google.cloud.storageinsights.v1.IDeleteReportConfigRequest} message DeleteReportConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteReportConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteReportConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.storageinsights.v1.DeleteReportConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.storageinsights.v1.DeleteReportConfigRequest} DeleteReportConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteReportConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.storageinsights.v1.DeleteReportConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.force = reader.bool(); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteReportConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.storageinsights.v1.DeleteReportConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.storageinsights.v1.DeleteReportConfigRequest} DeleteReportConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteReportConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteReportConfigRequest message. + * @function verify + * @memberof google.cloud.storageinsights.v1.DeleteReportConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteReportConfigRequest.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"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a DeleteReportConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.storageinsights.v1.DeleteReportConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.storageinsights.v1.DeleteReportConfigRequest} DeleteReportConfigRequest + */ + DeleteReportConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.storageinsights.v1.DeleteReportConfigRequest) + return object; + var message = new $root.google.cloud.storageinsights.v1.DeleteReportConfigRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a DeleteReportConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.storageinsights.v1.DeleteReportConfigRequest + * @static + * @param {google.cloud.storageinsights.v1.DeleteReportConfigRequest} message DeleteReportConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteReportConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.force = false; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this DeleteReportConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.storageinsights.v1.DeleteReportConfigRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteReportConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteReportConfigRequest + * @function getTypeUrl + * @memberof google.cloud.storageinsights.v1.DeleteReportConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteReportConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.storageinsights.v1.DeleteReportConfigRequest"; + }; + + return DeleteReportConfigRequest; + })(); + + v1.ReportDetail = (function() { + + /** + * Properties of a ReportDetail. + * @memberof google.cloud.storageinsights.v1 + * @interface IReportDetail + * @property {string|null} [name] ReportDetail name + * @property {google.protobuf.ITimestamp|null} [snapshotTime] ReportDetail snapshotTime + * @property {string|null} [reportPathPrefix] ReportDetail reportPathPrefix + * @property {number|Long|null} [shardsCount] ReportDetail shardsCount + * @property {google.rpc.IStatus|null} [status] ReportDetail status + * @property {Object.|null} [labels] ReportDetail labels + * @property {google.type.IDateTime|null} [targetDatetime] ReportDetail targetDatetime + * @property {google.cloud.storageinsights.v1.ReportDetail.IMetrics|null} [reportMetrics] ReportDetail reportMetrics + */ + + /** + * Constructs a new ReportDetail. + * @memberof google.cloud.storageinsights.v1 + * @classdesc Represents a ReportDetail. + * @implements IReportDetail + * @constructor + * @param {google.cloud.storageinsights.v1.IReportDetail=} [properties] Properties to set + */ + function ReportDetail(properties) { + this.labels = {}; + 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]]; + } + + /** + * ReportDetail name. + * @member {string} name + * @memberof google.cloud.storageinsights.v1.ReportDetail + * @instance + */ + ReportDetail.prototype.name = ""; + + /** + * ReportDetail snapshotTime. + * @member {google.protobuf.ITimestamp|null|undefined} snapshotTime + * @memberof google.cloud.storageinsights.v1.ReportDetail + * @instance + */ + ReportDetail.prototype.snapshotTime = null; + + /** + * ReportDetail reportPathPrefix. + * @member {string} reportPathPrefix + * @memberof google.cloud.storageinsights.v1.ReportDetail + * @instance + */ + ReportDetail.prototype.reportPathPrefix = ""; + + /** + * ReportDetail shardsCount. + * @member {number|Long} shardsCount + * @memberof google.cloud.storageinsights.v1.ReportDetail + * @instance + */ + ReportDetail.prototype.shardsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ReportDetail status. + * @member {google.rpc.IStatus|null|undefined} status + * @memberof google.cloud.storageinsights.v1.ReportDetail + * @instance + */ + ReportDetail.prototype.status = null; + + /** + * ReportDetail labels. + * @member {Object.} labels + * @memberof google.cloud.storageinsights.v1.ReportDetail + * @instance + */ + ReportDetail.prototype.labels = $util.emptyObject; + + /** + * ReportDetail targetDatetime. + * @member {google.type.IDateTime|null|undefined} targetDatetime + * @memberof google.cloud.storageinsights.v1.ReportDetail + * @instance + */ + ReportDetail.prototype.targetDatetime = null; + + /** + * ReportDetail reportMetrics. + * @member {google.cloud.storageinsights.v1.ReportDetail.IMetrics|null|undefined} reportMetrics + * @memberof google.cloud.storageinsights.v1.ReportDetail + * @instance + */ + ReportDetail.prototype.reportMetrics = null; + + /** + * Creates a new ReportDetail instance using the specified properties. + * @function create + * @memberof google.cloud.storageinsights.v1.ReportDetail + * @static + * @param {google.cloud.storageinsights.v1.IReportDetail=} [properties] Properties to set + * @returns {google.cloud.storageinsights.v1.ReportDetail} ReportDetail instance + */ + ReportDetail.create = function create(properties) { + return new ReportDetail(properties); + }; + + /** + * Encodes the specified ReportDetail message. Does not implicitly {@link google.cloud.storageinsights.v1.ReportDetail.verify|verify} messages. + * @function encode + * @memberof google.cloud.storageinsights.v1.ReportDetail + * @static + * @param {google.cloud.storageinsights.v1.IReportDetail} message ReportDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportDetail.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.snapshotTime != null && Object.hasOwnProperty.call(message, "snapshotTime")) + $root.google.protobuf.Timestamp.encode(message.snapshotTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.targetDatetime != null && Object.hasOwnProperty.call(message, "targetDatetime")) + $root.google.type.DateTime.encode(message.targetDatetime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.reportMetrics != null && Object.hasOwnProperty.call(message, "reportMetrics")) + $root.google.cloud.storageinsights.v1.ReportDetail.Metrics.encode(message.reportMetrics, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.reportPathPrefix != null && Object.hasOwnProperty.call(message, "reportPathPrefix")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.reportPathPrefix); + if (message.shardsCount != null && Object.hasOwnProperty.call(message, "shardsCount")) + writer.uint32(/* id 9, wireType 0 =*/72).int64(message.shardsCount); + return writer; + }; + + /** + * Encodes the specified ReportDetail message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.ReportDetail.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.storageinsights.v1.ReportDetail + * @static + * @param {google.cloud.storageinsights.v1.IReportDetail} message ReportDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportDetail.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReportDetail message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.storageinsights.v1.ReportDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.storageinsights.v1.ReportDetail} ReportDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportDetail.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.storageinsights.v1.ReportDetail(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.snapshotTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.reportPathPrefix = reader.string(); + break; + } + case 9: { + message.shardsCount = reader.int64(); + break; + } + case 4: { + message.status = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 5: { + if (message.labels === $util.emptyObject) + message.labels = {}; + 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.labels[key] = value; + break; + } + case 6: { + message.targetDatetime = $root.google.type.DateTime.decode(reader, reader.uint32()); + break; + } + case 7: { + message.reportMetrics = $root.google.cloud.storageinsights.v1.ReportDetail.Metrics.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReportDetail message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.storageinsights.v1.ReportDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.storageinsights.v1.ReportDetail} ReportDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportDetail.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReportDetail message. + * @function verify + * @memberof google.cloud.storageinsights.v1.ReportDetail + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReportDetail.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.snapshotTime != null && message.hasOwnProperty("snapshotTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.snapshotTime); + if (error) + return "snapshotTime." + error; + } + if (message.reportPathPrefix != null && message.hasOwnProperty("reportPathPrefix")) + if (!$util.isString(message.reportPathPrefix)) + return "reportPathPrefix: string expected"; + if (message.shardsCount != null && message.hasOwnProperty("shardsCount")) + if (!$util.isInteger(message.shardsCount) && !(message.shardsCount && $util.isInteger(message.shardsCount.low) && $util.isInteger(message.shardsCount.high))) + return "shardsCount: integer|Long expected"; + if (message.status != null && message.hasOwnProperty("status")) { + var error = $root.google.rpc.Status.verify(message.status); + if (error) + return "status." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.targetDatetime != null && message.hasOwnProperty("targetDatetime")) { + var error = $root.google.type.DateTime.verify(message.targetDatetime); + if (error) + return "targetDatetime." + error; + } + if (message.reportMetrics != null && message.hasOwnProperty("reportMetrics")) { + var error = $root.google.cloud.storageinsights.v1.ReportDetail.Metrics.verify(message.reportMetrics); + if (error) + return "reportMetrics." + error; + } + return null; + }; + + /** + * Creates a ReportDetail message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.storageinsights.v1.ReportDetail + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.storageinsights.v1.ReportDetail} ReportDetail + */ + ReportDetail.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.storageinsights.v1.ReportDetail) + return object; + var message = new $root.google.cloud.storageinsights.v1.ReportDetail(); + if (object.name != null) + message.name = String(object.name); + if (object.snapshotTime != null) { + if (typeof object.snapshotTime !== "object") + throw TypeError(".google.cloud.storageinsights.v1.ReportDetail.snapshotTime: object expected"); + message.snapshotTime = $root.google.protobuf.Timestamp.fromObject(object.snapshotTime); + } + if (object.reportPathPrefix != null) + message.reportPathPrefix = String(object.reportPathPrefix); + if (object.shardsCount != null) + if ($util.Long) + (message.shardsCount = $util.Long.fromValue(object.shardsCount)).unsigned = false; + else if (typeof object.shardsCount === "string") + message.shardsCount = parseInt(object.shardsCount, 10); + else if (typeof object.shardsCount === "number") + message.shardsCount = object.shardsCount; + else if (typeof object.shardsCount === "object") + message.shardsCount = new $util.LongBits(object.shardsCount.low >>> 0, object.shardsCount.high >>> 0).toNumber(); + if (object.status != null) { + if (typeof object.status !== "object") + throw TypeError(".google.cloud.storageinsights.v1.ReportDetail.status: object expected"); + message.status = $root.google.rpc.Status.fromObject(object.status); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.storageinsights.v1.ReportDetail.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.targetDatetime != null) { + if (typeof object.targetDatetime !== "object") + throw TypeError(".google.cloud.storageinsights.v1.ReportDetail.targetDatetime: object expected"); + message.targetDatetime = $root.google.type.DateTime.fromObject(object.targetDatetime); + } + if (object.reportMetrics != null) { + if (typeof object.reportMetrics !== "object") + throw TypeError(".google.cloud.storageinsights.v1.ReportDetail.reportMetrics: object expected"); + message.reportMetrics = $root.google.cloud.storageinsights.v1.ReportDetail.Metrics.fromObject(object.reportMetrics); + } + return message; + }; + + /** + * Creates a plain object from a ReportDetail message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.storageinsights.v1.ReportDetail + * @static + * @param {google.cloud.storageinsights.v1.ReportDetail} message ReportDetail + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReportDetail.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.snapshotTime = null; + object.status = null; + object.targetDatetime = null; + object.reportMetrics = null; + object.reportPathPrefix = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.shardsCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.shardsCount = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.snapshotTime != null && message.hasOwnProperty("snapshotTime")) + object.snapshotTime = $root.google.protobuf.Timestamp.toObject(message.snapshotTime, options); + if (message.status != null && message.hasOwnProperty("status")) + object.status = $root.google.rpc.Status.toObject(message.status, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.targetDatetime != null && message.hasOwnProperty("targetDatetime")) + object.targetDatetime = $root.google.type.DateTime.toObject(message.targetDatetime, options); + if (message.reportMetrics != null && message.hasOwnProperty("reportMetrics")) + object.reportMetrics = $root.google.cloud.storageinsights.v1.ReportDetail.Metrics.toObject(message.reportMetrics, options); + if (message.reportPathPrefix != null && message.hasOwnProperty("reportPathPrefix")) + object.reportPathPrefix = message.reportPathPrefix; + if (message.shardsCount != null && message.hasOwnProperty("shardsCount")) + if (typeof message.shardsCount === "number") + object.shardsCount = options.longs === String ? String(message.shardsCount) : message.shardsCount; + else + object.shardsCount = options.longs === String ? $util.Long.prototype.toString.call(message.shardsCount) : options.longs === Number ? new $util.LongBits(message.shardsCount.low >>> 0, message.shardsCount.high >>> 0).toNumber() : message.shardsCount; + return object; + }; + + /** + * Converts this ReportDetail to JSON. + * @function toJSON + * @memberof google.cloud.storageinsights.v1.ReportDetail + * @instance + * @returns {Object.} JSON object + */ + ReportDetail.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReportDetail + * @function getTypeUrl + * @memberof google.cloud.storageinsights.v1.ReportDetail + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReportDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.storageinsights.v1.ReportDetail"; + }; + + ReportDetail.Metrics = (function() { + + /** + * Properties of a Metrics. + * @memberof google.cloud.storageinsights.v1.ReportDetail + * @interface IMetrics + * @property {number|Long|null} [processedRecordsCount] Metrics processedRecordsCount + */ + + /** + * Constructs a new Metrics. + * @memberof google.cloud.storageinsights.v1.ReportDetail + * @classdesc Represents a Metrics. + * @implements IMetrics + * @constructor + * @param {google.cloud.storageinsights.v1.ReportDetail.IMetrics=} [properties] Properties to set + */ + function Metrics(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]]; + } + + /** + * Metrics processedRecordsCount. + * @member {number|Long} processedRecordsCount + * @memberof google.cloud.storageinsights.v1.ReportDetail.Metrics + * @instance + */ + Metrics.prototype.processedRecordsCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Metrics instance using the specified properties. + * @function create + * @memberof google.cloud.storageinsights.v1.ReportDetail.Metrics + * @static + * @param {google.cloud.storageinsights.v1.ReportDetail.IMetrics=} [properties] Properties to set + * @returns {google.cloud.storageinsights.v1.ReportDetail.Metrics} Metrics instance + */ + Metrics.create = function create(properties) { + return new Metrics(properties); + }; + + /** + * Encodes the specified Metrics message. Does not implicitly {@link google.cloud.storageinsights.v1.ReportDetail.Metrics.verify|verify} messages. + * @function encode + * @memberof google.cloud.storageinsights.v1.ReportDetail.Metrics + * @static + * @param {google.cloud.storageinsights.v1.ReportDetail.IMetrics} message Metrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metrics.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.processedRecordsCount != null && Object.hasOwnProperty.call(message, "processedRecordsCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.processedRecordsCount); + return writer; + }; + + /** + * Encodes the specified Metrics message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.ReportDetail.Metrics.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.storageinsights.v1.ReportDetail.Metrics + * @static + * @param {google.cloud.storageinsights.v1.ReportDetail.IMetrics} message Metrics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metrics.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Metrics message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.storageinsights.v1.ReportDetail.Metrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.storageinsights.v1.ReportDetail.Metrics} Metrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metrics.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.storageinsights.v1.ReportDetail.Metrics(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.processedRecordsCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Metrics message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.storageinsights.v1.ReportDetail.Metrics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.storageinsights.v1.ReportDetail.Metrics} Metrics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metrics.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Metrics message. + * @function verify + * @memberof google.cloud.storageinsights.v1.ReportDetail.Metrics + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metrics.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.processedRecordsCount != null && message.hasOwnProperty("processedRecordsCount")) + if (!$util.isInteger(message.processedRecordsCount) && !(message.processedRecordsCount && $util.isInteger(message.processedRecordsCount.low) && $util.isInteger(message.processedRecordsCount.high))) + return "processedRecordsCount: integer|Long expected"; + return null; + }; + + /** + * Creates a Metrics message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.storageinsights.v1.ReportDetail.Metrics + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.storageinsights.v1.ReportDetail.Metrics} Metrics + */ + Metrics.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.storageinsights.v1.ReportDetail.Metrics) + return object; + var message = new $root.google.cloud.storageinsights.v1.ReportDetail.Metrics(); + if (object.processedRecordsCount != null) + if ($util.Long) + (message.processedRecordsCount = $util.Long.fromValue(object.processedRecordsCount)).unsigned = false; + else if (typeof object.processedRecordsCount === "string") + message.processedRecordsCount = parseInt(object.processedRecordsCount, 10); + else if (typeof object.processedRecordsCount === "number") + message.processedRecordsCount = object.processedRecordsCount; + else if (typeof object.processedRecordsCount === "object") + message.processedRecordsCount = new $util.LongBits(object.processedRecordsCount.low >>> 0, object.processedRecordsCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a Metrics message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.storageinsights.v1.ReportDetail.Metrics + * @static + * @param {google.cloud.storageinsights.v1.ReportDetail.Metrics} message Metrics + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metrics.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.processedRecordsCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.processedRecordsCount = options.longs === String ? "0" : 0; + if (message.processedRecordsCount != null && message.hasOwnProperty("processedRecordsCount")) + if (typeof message.processedRecordsCount === "number") + object.processedRecordsCount = options.longs === String ? String(message.processedRecordsCount) : message.processedRecordsCount; + else + object.processedRecordsCount = options.longs === String ? $util.Long.prototype.toString.call(message.processedRecordsCount) : options.longs === Number ? new $util.LongBits(message.processedRecordsCount.low >>> 0, message.processedRecordsCount.high >>> 0).toNumber() : message.processedRecordsCount; + return object; + }; + + /** + * Converts this Metrics to JSON. + * @function toJSON + * @memberof google.cloud.storageinsights.v1.ReportDetail.Metrics + * @instance + * @returns {Object.} JSON object + */ + Metrics.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Metrics + * @function getTypeUrl + * @memberof google.cloud.storageinsights.v1.ReportDetail.Metrics + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Metrics.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.storageinsights.v1.ReportDetail.Metrics"; + }; + + return Metrics; + })(); + + return ReportDetail; + })(); + + v1.ListReportDetailsRequest = (function() { + + /** + * Properties of a ListReportDetailsRequest. + * @memberof google.cloud.storageinsights.v1 + * @interface IListReportDetailsRequest + * @property {string|null} [parent] ListReportDetailsRequest parent + * @property {number|null} [pageSize] ListReportDetailsRequest pageSize + * @property {string|null} [pageToken] ListReportDetailsRequest pageToken + * @property {string|null} [filter] ListReportDetailsRequest filter + * @property {string|null} [orderBy] ListReportDetailsRequest orderBy + */ + + /** + * Constructs a new ListReportDetailsRequest. + * @memberof google.cloud.storageinsights.v1 + * @classdesc Represents a ListReportDetailsRequest. + * @implements IListReportDetailsRequest + * @constructor + * @param {google.cloud.storageinsights.v1.IListReportDetailsRequest=} [properties] Properties to set + */ + function ListReportDetailsRequest(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]]; + } + + /** + * ListReportDetailsRequest parent. + * @member {string} parent + * @memberof google.cloud.storageinsights.v1.ListReportDetailsRequest + * @instance + */ + ListReportDetailsRequest.prototype.parent = ""; + + /** + * ListReportDetailsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.storageinsights.v1.ListReportDetailsRequest + * @instance + */ + ListReportDetailsRequest.prototype.pageSize = 0; + + /** + * ListReportDetailsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.storageinsights.v1.ListReportDetailsRequest + * @instance + */ + ListReportDetailsRequest.prototype.pageToken = ""; + + /** + * ListReportDetailsRequest filter. + * @member {string} filter + * @memberof google.cloud.storageinsights.v1.ListReportDetailsRequest + * @instance + */ + ListReportDetailsRequest.prototype.filter = ""; + + /** + * ListReportDetailsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.storageinsights.v1.ListReportDetailsRequest + * @instance + */ + ListReportDetailsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListReportDetailsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.storageinsights.v1.ListReportDetailsRequest + * @static + * @param {google.cloud.storageinsights.v1.IListReportDetailsRequest=} [properties] Properties to set + * @returns {google.cloud.storageinsights.v1.ListReportDetailsRequest} ListReportDetailsRequest instance + */ + ListReportDetailsRequest.create = function create(properties) { + return new ListReportDetailsRequest(properties); + }; + + /** + * Encodes the specified ListReportDetailsRequest message. Does not implicitly {@link google.cloud.storageinsights.v1.ListReportDetailsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.storageinsights.v1.ListReportDetailsRequest + * @static + * @param {google.cloud.storageinsights.v1.IListReportDetailsRequest} message ListReportDetailsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReportDetailsRequest.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.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListReportDetailsRequest message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.ListReportDetailsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.storageinsights.v1.ListReportDetailsRequest + * @static + * @param {google.cloud.storageinsights.v1.IListReportDetailsRequest} message ListReportDetailsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReportDetailsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListReportDetailsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.storageinsights.v1.ListReportDetailsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.storageinsights.v1.ListReportDetailsRequest} ListReportDetailsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReportDetailsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.storageinsights.v1.ListReportDetailsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListReportDetailsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.storageinsights.v1.ListReportDetailsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.storageinsights.v1.ListReportDetailsRequest} ListReportDetailsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReportDetailsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListReportDetailsRequest message. + * @function verify + * @memberof google.cloud.storageinsights.v1.ListReportDetailsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListReportDetailsRequest.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.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListReportDetailsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.storageinsights.v1.ListReportDetailsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.storageinsights.v1.ListReportDetailsRequest} ListReportDetailsRequest + */ + ListReportDetailsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.storageinsights.v1.ListReportDetailsRequest) + return object; + var message = new $root.google.cloud.storageinsights.v1.ListReportDetailsRequest(); + 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.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListReportDetailsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.storageinsights.v1.ListReportDetailsRequest + * @static + * @param {google.cloud.storageinsights.v1.ListReportDetailsRequest} message ListReportDetailsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListReportDetailsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + 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.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListReportDetailsRequest to JSON. + * @function toJSON + * @memberof google.cloud.storageinsights.v1.ListReportDetailsRequest + * @instance + * @returns {Object.} JSON object + */ + ListReportDetailsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListReportDetailsRequest + * @function getTypeUrl + * @memberof google.cloud.storageinsights.v1.ListReportDetailsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListReportDetailsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.storageinsights.v1.ListReportDetailsRequest"; + }; + + return ListReportDetailsRequest; + })(); + + v1.ListReportDetailsResponse = (function() { + + /** + * Properties of a ListReportDetailsResponse. + * @memberof google.cloud.storageinsights.v1 + * @interface IListReportDetailsResponse + * @property {Array.|null} [reportDetails] ListReportDetailsResponse reportDetails + * @property {string|null} [nextPageToken] ListReportDetailsResponse nextPageToken + * @property {Array.|null} [unreachable] ListReportDetailsResponse unreachable + */ + + /** + * Constructs a new ListReportDetailsResponse. + * @memberof google.cloud.storageinsights.v1 + * @classdesc Represents a ListReportDetailsResponse. + * @implements IListReportDetailsResponse + * @constructor + * @param {google.cloud.storageinsights.v1.IListReportDetailsResponse=} [properties] Properties to set + */ + function ListReportDetailsResponse(properties) { + this.reportDetails = []; + this.unreachable = []; + 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]]; + } + + /** + * ListReportDetailsResponse reportDetails. + * @member {Array.} reportDetails + * @memberof google.cloud.storageinsights.v1.ListReportDetailsResponse + * @instance + */ + ListReportDetailsResponse.prototype.reportDetails = $util.emptyArray; + + /** + * ListReportDetailsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.storageinsights.v1.ListReportDetailsResponse + * @instance + */ + ListReportDetailsResponse.prototype.nextPageToken = ""; + + /** + * ListReportDetailsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.storageinsights.v1.ListReportDetailsResponse + * @instance + */ + ListReportDetailsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListReportDetailsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.storageinsights.v1.ListReportDetailsResponse + * @static + * @param {google.cloud.storageinsights.v1.IListReportDetailsResponse=} [properties] Properties to set + * @returns {google.cloud.storageinsights.v1.ListReportDetailsResponse} ListReportDetailsResponse instance + */ + ListReportDetailsResponse.create = function create(properties) { + return new ListReportDetailsResponse(properties); + }; + + /** + * Encodes the specified ListReportDetailsResponse message. Does not implicitly {@link google.cloud.storageinsights.v1.ListReportDetailsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.storageinsights.v1.ListReportDetailsResponse + * @static + * @param {google.cloud.storageinsights.v1.IListReportDetailsResponse} message ListReportDetailsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReportDetailsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.reportDetails != null && message.reportDetails.length) + for (var i = 0; i < message.reportDetails.length; ++i) + $root.google.cloud.storageinsights.v1.ReportDetail.encode(message.reportDetails[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); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListReportDetailsResponse message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.ListReportDetailsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.storageinsights.v1.ListReportDetailsResponse + * @static + * @param {google.cloud.storageinsights.v1.IListReportDetailsResponse} message ListReportDetailsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReportDetailsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListReportDetailsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.storageinsights.v1.ListReportDetailsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.storageinsights.v1.ListReportDetailsResponse} ListReportDetailsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReportDetailsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.storageinsights.v1.ListReportDetailsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.reportDetails && message.reportDetails.length)) + message.reportDetails = []; + message.reportDetails.push($root.google.cloud.storageinsights.v1.ReportDetail.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListReportDetailsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.storageinsights.v1.ListReportDetailsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.storageinsights.v1.ListReportDetailsResponse} ListReportDetailsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReportDetailsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListReportDetailsResponse message. + * @function verify + * @memberof google.cloud.storageinsights.v1.ListReportDetailsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListReportDetailsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.reportDetails != null && message.hasOwnProperty("reportDetails")) { + if (!Array.isArray(message.reportDetails)) + return "reportDetails: array expected"; + for (var i = 0; i < message.reportDetails.length; ++i) { + var error = $root.google.cloud.storageinsights.v1.ReportDetail.verify(message.reportDetails[i]); + if (error) + return "reportDetails." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListReportDetailsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.storageinsights.v1.ListReportDetailsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.storageinsights.v1.ListReportDetailsResponse} ListReportDetailsResponse + */ + ListReportDetailsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.storageinsights.v1.ListReportDetailsResponse) + return object; + var message = new $root.google.cloud.storageinsights.v1.ListReportDetailsResponse(); + if (object.reportDetails) { + if (!Array.isArray(object.reportDetails)) + throw TypeError(".google.cloud.storageinsights.v1.ListReportDetailsResponse.reportDetails: array expected"); + message.reportDetails = []; + for (var i = 0; i < object.reportDetails.length; ++i) { + if (typeof object.reportDetails[i] !== "object") + throw TypeError(".google.cloud.storageinsights.v1.ListReportDetailsResponse.reportDetails: object expected"); + message.reportDetails[i] = $root.google.cloud.storageinsights.v1.ReportDetail.fromObject(object.reportDetails[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.storageinsights.v1.ListReportDetailsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListReportDetailsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.storageinsights.v1.ListReportDetailsResponse + * @static + * @param {google.cloud.storageinsights.v1.ListReportDetailsResponse} message ListReportDetailsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListReportDetailsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.reportDetails = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.reportDetails && message.reportDetails.length) { + object.reportDetails = []; + for (var j = 0; j < message.reportDetails.length; ++j) + object.reportDetails[j] = $root.google.cloud.storageinsights.v1.ReportDetail.toObject(message.reportDetails[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListReportDetailsResponse to JSON. + * @function toJSON + * @memberof google.cloud.storageinsights.v1.ListReportDetailsResponse + * @instance + * @returns {Object.} JSON object + */ + ListReportDetailsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListReportDetailsResponse + * @function getTypeUrl + * @memberof google.cloud.storageinsights.v1.ListReportDetailsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListReportDetailsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.storageinsights.v1.ListReportDetailsResponse"; + }; + + return ListReportDetailsResponse; + })(); + + v1.GetReportDetailRequest = (function() { + + /** + * Properties of a GetReportDetailRequest. + * @memberof google.cloud.storageinsights.v1 + * @interface IGetReportDetailRequest + * @property {string|null} [name] GetReportDetailRequest name + */ + + /** + * Constructs a new GetReportDetailRequest. + * @memberof google.cloud.storageinsights.v1 + * @classdesc Represents a GetReportDetailRequest. + * @implements IGetReportDetailRequest + * @constructor + * @param {google.cloud.storageinsights.v1.IGetReportDetailRequest=} [properties] Properties to set + */ + function GetReportDetailRequest(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]]; + } + + /** + * GetReportDetailRequest name. + * @member {string} name + * @memberof google.cloud.storageinsights.v1.GetReportDetailRequest + * @instance + */ + GetReportDetailRequest.prototype.name = ""; + + /** + * Creates a new GetReportDetailRequest instance using the specified properties. + * @function create + * @memberof google.cloud.storageinsights.v1.GetReportDetailRequest + * @static + * @param {google.cloud.storageinsights.v1.IGetReportDetailRequest=} [properties] Properties to set + * @returns {google.cloud.storageinsights.v1.GetReportDetailRequest} GetReportDetailRequest instance + */ + GetReportDetailRequest.create = function create(properties) { + return new GetReportDetailRequest(properties); + }; + + /** + * Encodes the specified GetReportDetailRequest message. Does not implicitly {@link google.cloud.storageinsights.v1.GetReportDetailRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.storageinsights.v1.GetReportDetailRequest + * @static + * @param {google.cloud.storageinsights.v1.IGetReportDetailRequest} message GetReportDetailRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetReportDetailRequest.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 GetReportDetailRequest message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.GetReportDetailRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.storageinsights.v1.GetReportDetailRequest + * @static + * @param {google.cloud.storageinsights.v1.IGetReportDetailRequest} message GetReportDetailRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetReportDetailRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetReportDetailRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.storageinsights.v1.GetReportDetailRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.storageinsights.v1.GetReportDetailRequest} GetReportDetailRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetReportDetailRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.storageinsights.v1.GetReportDetailRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetReportDetailRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.storageinsights.v1.GetReportDetailRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.storageinsights.v1.GetReportDetailRequest} GetReportDetailRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetReportDetailRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetReportDetailRequest message. + * @function verify + * @memberof google.cloud.storageinsights.v1.GetReportDetailRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetReportDetailRequest.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 GetReportDetailRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.storageinsights.v1.GetReportDetailRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.storageinsights.v1.GetReportDetailRequest} GetReportDetailRequest + */ + GetReportDetailRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.storageinsights.v1.GetReportDetailRequest) + return object; + var message = new $root.google.cloud.storageinsights.v1.GetReportDetailRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetReportDetailRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.storageinsights.v1.GetReportDetailRequest + * @static + * @param {google.cloud.storageinsights.v1.GetReportDetailRequest} message GetReportDetailRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetReportDetailRequest.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 GetReportDetailRequest to JSON. + * @function toJSON + * @memberof google.cloud.storageinsights.v1.GetReportDetailRequest + * @instance + * @returns {Object.} JSON object + */ + GetReportDetailRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetReportDetailRequest + * @function getTypeUrl + * @memberof google.cloud.storageinsights.v1.GetReportDetailRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetReportDetailRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.storageinsights.v1.GetReportDetailRequest"; + }; + + return GetReportDetailRequest; + })(); + + v1.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.cloud.storageinsights.v1 + * @interface IOperationMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime + * @property {string|null} [target] OperationMetadata target + * @property {string|null} [verb] OperationMetadata verb + * @property {string|null} [statusMessage] OperationMetadata statusMessage + * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation + * @property {string|null} [apiVersion] OperationMetadata apiVersion + */ + + /** + * Constructs a new OperationMetadata. + * @memberof google.cloud.storageinsights.v1 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.cloud.storageinsights.v1.IOperationMetadata=} [properties] Properties to set + */ + function OperationMetadata(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]]; + } + + /** + * OperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.storageinsights.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createTime = null; + + /** + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.storageinsights.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.endTime = null; + + /** + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.storageinsights.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.target = ""; + + /** + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.storageinsights.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.verb = ""; + + /** + * OperationMetadata statusMessage. + * @member {string} statusMessage + * @memberof google.cloud.storageinsights.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.statusMessage = ""; + + /** + * OperationMetadata requestedCancellation. + * @member {boolean} requestedCancellation + * @memberof google.cloud.storageinsights.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.requestedCancellation = false; + + /** + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.storageinsights.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.apiVersion = ""; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.storageinsights.v1.OperationMetadata + * @static + * @param {google.cloud.storageinsights.v1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.storageinsights.v1.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.storageinsights.v1.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.storageinsights.v1.OperationMetadata + * @static + * @param {google.cloud.storageinsights.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); + if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); + if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); + if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); + if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); + return writer; + }; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.storageinsights.v1.OperationMetadata + * @static + * @param {google.cloud.storageinsights.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.storageinsights.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.storageinsights.v1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.storageinsights.v1.OperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.target = reader.string(); + break; + } + case 4: { + message.verb = reader.string(); + break; + } + case 5: { + message.statusMessage = reader.string(); + break; + } + case 6: { + message.requestedCancellation = reader.bool(); + break; + } + case 7: { + message.apiVersion = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.storageinsights.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.storageinsights.v1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationMetadata message. + * @function verify + * @memberof google.cloud.storageinsights.v1.OperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.verb != null && message.hasOwnProperty("verb")) + if (!$util.isString(message.verb)) + return "verb: string expected"; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + if (!$util.isString(message.statusMessage)) + return "statusMessage: string expected"; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + if (typeof message.requestedCancellation !== "boolean") + return "requestedCancellation: boolean expected"; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + if (!$util.isString(message.apiVersion)) + return "apiVersion: string expected"; + return null; + }; + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.storageinsights.v1.OperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.storageinsights.v1.OperationMetadata} OperationMetadata + */ + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.storageinsights.v1.OperationMetadata) + return object; + var message = new $root.google.cloud.storageinsights.v1.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.storageinsights.v1.OperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.storageinsights.v1.OperationMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.target != null) + message.target = String(object.target); + if (object.verb != null) + message.verb = String(object.verb); + if (object.statusMessage != null) + message.statusMessage = String(object.statusMessage); + if (object.requestedCancellation != null) + message.requestedCancellation = Boolean(object.requestedCancellation); + if (object.apiVersion != null) + message.apiVersion = String(object.apiVersion); + return message; + }; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.storageinsights.v1.OperationMetadata + * @static + * @param {google.cloud.storageinsights.v1.OperationMetadata} message OperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.target = ""; + object.verb = ""; + object.statusMessage = ""; + object.requestedCancellation = false; + object.apiVersion = ""; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = message.target; + if (message.verb != null && message.hasOwnProperty("verb")) + object.verb = message.verb; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + object.statusMessage = message.statusMessage; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + object.requestedCancellation = message.requestedCancellation; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + object.apiVersion = message.apiVersion; + return object; + }; + + /** + * Converts this OperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.storageinsights.v1.OperationMetadata + * @instance + * @returns {Object.} JSON object + */ + OperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperationMetadata + * @function getTypeUrl + * @memberof google.cloud.storageinsights.v1.OperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.storageinsights.v1.OperationMetadata"; + }; + + return OperationMetadata; + })(); + + v1.FrequencyOptions = (function() { + + /** + * Properties of a FrequencyOptions. + * @memberof google.cloud.storageinsights.v1 + * @interface IFrequencyOptions + * @property {google.cloud.storageinsights.v1.FrequencyOptions.Frequency|null} [frequency] FrequencyOptions frequency + * @property {google.type.IDate|null} [startDate] FrequencyOptions startDate + * @property {google.type.IDate|null} [endDate] FrequencyOptions endDate + */ + + /** + * Constructs a new FrequencyOptions. + * @memberof google.cloud.storageinsights.v1 + * @classdesc Represents a FrequencyOptions. + * @implements IFrequencyOptions + * @constructor + * @param {google.cloud.storageinsights.v1.IFrequencyOptions=} [properties] Properties to set + */ + function FrequencyOptions(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]]; + } + + /** + * FrequencyOptions frequency. + * @member {google.cloud.storageinsights.v1.FrequencyOptions.Frequency} frequency + * @memberof google.cloud.storageinsights.v1.FrequencyOptions + * @instance + */ + FrequencyOptions.prototype.frequency = 0; + + /** + * FrequencyOptions startDate. + * @member {google.type.IDate|null|undefined} startDate + * @memberof google.cloud.storageinsights.v1.FrequencyOptions + * @instance + */ + FrequencyOptions.prototype.startDate = null; + + /** + * FrequencyOptions endDate. + * @member {google.type.IDate|null|undefined} endDate + * @memberof google.cloud.storageinsights.v1.FrequencyOptions + * @instance + */ + FrequencyOptions.prototype.endDate = null; + + /** + * Creates a new FrequencyOptions instance using the specified properties. + * @function create + * @memberof google.cloud.storageinsights.v1.FrequencyOptions + * @static + * @param {google.cloud.storageinsights.v1.IFrequencyOptions=} [properties] Properties to set + * @returns {google.cloud.storageinsights.v1.FrequencyOptions} FrequencyOptions instance + */ + FrequencyOptions.create = function create(properties) { + return new FrequencyOptions(properties); + }; + + /** + * Encodes the specified FrequencyOptions message. Does not implicitly {@link google.cloud.storageinsights.v1.FrequencyOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.storageinsights.v1.FrequencyOptions + * @static + * @param {google.cloud.storageinsights.v1.IFrequencyOptions} message FrequencyOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FrequencyOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.frequency); + if (message.startDate != null && Object.hasOwnProperty.call(message, "startDate")) + $root.google.type.Date.encode(message.startDate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.endDate != null && Object.hasOwnProperty.call(message, "endDate")) + $root.google.type.Date.encode(message.endDate, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FrequencyOptions message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.FrequencyOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.storageinsights.v1.FrequencyOptions + * @static + * @param {google.cloud.storageinsights.v1.IFrequencyOptions} message FrequencyOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FrequencyOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FrequencyOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.storageinsights.v1.FrequencyOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.storageinsights.v1.FrequencyOptions} FrequencyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FrequencyOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.storageinsights.v1.FrequencyOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.frequency = reader.int32(); + break; + } + case 2: { + message.startDate = $root.google.type.Date.decode(reader, reader.uint32()); + break; + } + case 3: { + message.endDate = $root.google.type.Date.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FrequencyOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.storageinsights.v1.FrequencyOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.storageinsights.v1.FrequencyOptions} FrequencyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FrequencyOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FrequencyOptions message. + * @function verify + * @memberof google.cloud.storageinsights.v1.FrequencyOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FrequencyOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.frequency != null && message.hasOwnProperty("frequency")) + switch (message.frequency) { + default: + return "frequency: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.startDate != null && message.hasOwnProperty("startDate")) { + var error = $root.google.type.Date.verify(message.startDate); + if (error) + return "startDate." + error; + } + if (message.endDate != null && message.hasOwnProperty("endDate")) { + var error = $root.google.type.Date.verify(message.endDate); + if (error) + return "endDate." + error; + } + return null; + }; + + /** + * Creates a FrequencyOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.storageinsights.v1.FrequencyOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.storageinsights.v1.FrequencyOptions} FrequencyOptions + */ + FrequencyOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.storageinsights.v1.FrequencyOptions) + return object; + var message = new $root.google.cloud.storageinsights.v1.FrequencyOptions(); + switch (object.frequency) { + default: + if (typeof object.frequency === "number") { + message.frequency = object.frequency; + break; + } + break; + case "FREQUENCY_UNSPECIFIED": + case 0: + message.frequency = 0; + break; + case "DAILY": + case 1: + message.frequency = 1; + break; + case "WEEKLY": + case 2: + message.frequency = 2; + break; + } + if (object.startDate != null) { + if (typeof object.startDate !== "object") + throw TypeError(".google.cloud.storageinsights.v1.FrequencyOptions.startDate: object expected"); + message.startDate = $root.google.type.Date.fromObject(object.startDate); + } + if (object.endDate != null) { + if (typeof object.endDate !== "object") + throw TypeError(".google.cloud.storageinsights.v1.FrequencyOptions.endDate: object expected"); + message.endDate = $root.google.type.Date.fromObject(object.endDate); + } + return message; + }; + + /** + * Creates a plain object from a FrequencyOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.storageinsights.v1.FrequencyOptions + * @static + * @param {google.cloud.storageinsights.v1.FrequencyOptions} message FrequencyOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FrequencyOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.frequency = options.enums === String ? "FREQUENCY_UNSPECIFIED" : 0; + object.startDate = null; + object.endDate = null; + } + if (message.frequency != null && message.hasOwnProperty("frequency")) + object.frequency = options.enums === String ? $root.google.cloud.storageinsights.v1.FrequencyOptions.Frequency[message.frequency] === undefined ? message.frequency : $root.google.cloud.storageinsights.v1.FrequencyOptions.Frequency[message.frequency] : message.frequency; + if (message.startDate != null && message.hasOwnProperty("startDate")) + object.startDate = $root.google.type.Date.toObject(message.startDate, options); + if (message.endDate != null && message.hasOwnProperty("endDate")) + object.endDate = $root.google.type.Date.toObject(message.endDate, options); + return object; + }; + + /** + * Converts this FrequencyOptions to JSON. + * @function toJSON + * @memberof google.cloud.storageinsights.v1.FrequencyOptions + * @instance + * @returns {Object.} JSON object + */ + FrequencyOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FrequencyOptions + * @function getTypeUrl + * @memberof google.cloud.storageinsights.v1.FrequencyOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FrequencyOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.storageinsights.v1.FrequencyOptions"; + }; + + /** + * Frequency enum. + * @name google.cloud.storageinsights.v1.FrequencyOptions.Frequency + * @enum {number} + * @property {number} FREQUENCY_UNSPECIFIED=0 FREQUENCY_UNSPECIFIED value + * @property {number} DAILY=1 DAILY value + * @property {number} WEEKLY=2 WEEKLY value + */ + FrequencyOptions.Frequency = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FREQUENCY_UNSPECIFIED"] = 0; + values[valuesById[1] = "DAILY"] = 1; + values[valuesById[2] = "WEEKLY"] = 2; + return values; + })(); + + return FrequencyOptions; + })(); + + v1.CSVOptions = (function() { + + /** + * Properties of a CSVOptions. + * @memberof google.cloud.storageinsights.v1 + * @interface ICSVOptions + * @property {string|null} [recordSeparator] CSVOptions recordSeparator + * @property {string|null} [delimiter] CSVOptions delimiter + * @property {boolean|null} [headerRequired] CSVOptions headerRequired + */ + + /** + * Constructs a new CSVOptions. + * @memberof google.cloud.storageinsights.v1 + * @classdesc Represents a CSVOptions. + * @implements ICSVOptions + * @constructor + * @param {google.cloud.storageinsights.v1.ICSVOptions=} [properties] Properties to set + */ + function CSVOptions(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]]; + } + + /** + * CSVOptions recordSeparator. + * @member {string} recordSeparator + * @memberof google.cloud.storageinsights.v1.CSVOptions + * @instance + */ + CSVOptions.prototype.recordSeparator = ""; + + /** + * CSVOptions delimiter. + * @member {string} delimiter + * @memberof google.cloud.storageinsights.v1.CSVOptions + * @instance + */ + CSVOptions.prototype.delimiter = ""; + + /** + * CSVOptions headerRequired. + * @member {boolean} headerRequired + * @memberof google.cloud.storageinsights.v1.CSVOptions + * @instance + */ + CSVOptions.prototype.headerRequired = false; + + /** + * Creates a new CSVOptions instance using the specified properties. + * @function create + * @memberof google.cloud.storageinsights.v1.CSVOptions + * @static + * @param {google.cloud.storageinsights.v1.ICSVOptions=} [properties] Properties to set + * @returns {google.cloud.storageinsights.v1.CSVOptions} CSVOptions instance + */ + CSVOptions.create = function create(properties) { + return new CSVOptions(properties); + }; + + /** + * Encodes the specified CSVOptions message. Does not implicitly {@link google.cloud.storageinsights.v1.CSVOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.storageinsights.v1.CSVOptions + * @static + * @param {google.cloud.storageinsights.v1.ICSVOptions} message CSVOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CSVOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.recordSeparator != null && Object.hasOwnProperty.call(message, "recordSeparator")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.recordSeparator); + if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.delimiter); + if (message.headerRequired != null && Object.hasOwnProperty.call(message, "headerRequired")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.headerRequired); + return writer; + }; + + /** + * Encodes the specified CSVOptions message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.CSVOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.storageinsights.v1.CSVOptions + * @static + * @param {google.cloud.storageinsights.v1.ICSVOptions} message CSVOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CSVOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CSVOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.storageinsights.v1.CSVOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.storageinsights.v1.CSVOptions} CSVOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CSVOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.storageinsights.v1.CSVOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.recordSeparator = reader.string(); + break; + } + case 2: { + message.delimiter = reader.string(); + break; + } + case 3: { + message.headerRequired = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CSVOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.storageinsights.v1.CSVOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.storageinsights.v1.CSVOptions} CSVOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CSVOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CSVOptions message. + * @function verify + * @memberof google.cloud.storageinsights.v1.CSVOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CSVOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.recordSeparator != null && message.hasOwnProperty("recordSeparator")) + if (!$util.isString(message.recordSeparator)) + return "recordSeparator: string expected"; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + if (!$util.isString(message.delimiter)) + return "delimiter: string expected"; + if (message.headerRequired != null && message.hasOwnProperty("headerRequired")) + if (typeof message.headerRequired !== "boolean") + return "headerRequired: boolean expected"; + return null; + }; + + /** + * Creates a CSVOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.storageinsights.v1.CSVOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.storageinsights.v1.CSVOptions} CSVOptions + */ + CSVOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.storageinsights.v1.CSVOptions) + return object; + var message = new $root.google.cloud.storageinsights.v1.CSVOptions(); + if (object.recordSeparator != null) + message.recordSeparator = String(object.recordSeparator); + if (object.delimiter != null) + message.delimiter = String(object.delimiter); + if (object.headerRequired != null) + message.headerRequired = Boolean(object.headerRequired); + return message; + }; + + /** + * Creates a plain object from a CSVOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.storageinsights.v1.CSVOptions + * @static + * @param {google.cloud.storageinsights.v1.CSVOptions} message CSVOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CSVOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.recordSeparator = ""; + object.delimiter = ""; + object.headerRequired = false; + } + if (message.recordSeparator != null && message.hasOwnProperty("recordSeparator")) + object.recordSeparator = message.recordSeparator; + if (message.delimiter != null && message.hasOwnProperty("delimiter")) + object.delimiter = message.delimiter; + if (message.headerRequired != null && message.hasOwnProperty("headerRequired")) + object.headerRequired = message.headerRequired; + return object; + }; + + /** + * Converts this CSVOptions to JSON. + * @function toJSON + * @memberof google.cloud.storageinsights.v1.CSVOptions + * @instance + * @returns {Object.} JSON object + */ + CSVOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CSVOptions + * @function getTypeUrl + * @memberof google.cloud.storageinsights.v1.CSVOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CSVOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.storageinsights.v1.CSVOptions"; + }; + + return CSVOptions; + })(); + + v1.ParquetOptions = (function() { + + /** + * Properties of a ParquetOptions. + * @memberof google.cloud.storageinsights.v1 + * @interface IParquetOptions + */ + + /** + * Constructs a new ParquetOptions. + * @memberof google.cloud.storageinsights.v1 + * @classdesc Represents a ParquetOptions. + * @implements IParquetOptions + * @constructor + * @param {google.cloud.storageinsights.v1.IParquetOptions=} [properties] Properties to set + */ + function ParquetOptions(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]]; + } + + /** + * Creates a new ParquetOptions instance using the specified properties. + * @function create + * @memberof google.cloud.storageinsights.v1.ParquetOptions + * @static + * @param {google.cloud.storageinsights.v1.IParquetOptions=} [properties] Properties to set + * @returns {google.cloud.storageinsights.v1.ParquetOptions} ParquetOptions instance + */ + ParquetOptions.create = function create(properties) { + return new ParquetOptions(properties); + }; + + /** + * Encodes the specified ParquetOptions message. Does not implicitly {@link google.cloud.storageinsights.v1.ParquetOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.storageinsights.v1.ParquetOptions + * @static + * @param {google.cloud.storageinsights.v1.IParquetOptions} message ParquetOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParquetOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified ParquetOptions message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.ParquetOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.storageinsights.v1.ParquetOptions + * @static + * @param {google.cloud.storageinsights.v1.IParquetOptions} message ParquetOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParquetOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ParquetOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.storageinsights.v1.ParquetOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.storageinsights.v1.ParquetOptions} ParquetOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParquetOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.storageinsights.v1.ParquetOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ParquetOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.storageinsights.v1.ParquetOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.storageinsights.v1.ParquetOptions} ParquetOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParquetOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ParquetOptions message. + * @function verify + * @memberof google.cloud.storageinsights.v1.ParquetOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ParquetOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a ParquetOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.storageinsights.v1.ParquetOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.storageinsights.v1.ParquetOptions} ParquetOptions + */ + ParquetOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.storageinsights.v1.ParquetOptions) + return object; + return new $root.google.cloud.storageinsights.v1.ParquetOptions(); + }; + + /** + * Creates a plain object from a ParquetOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.storageinsights.v1.ParquetOptions + * @static + * @param {google.cloud.storageinsights.v1.ParquetOptions} message ParquetOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ParquetOptions.toObject = function toObject() { + return {}; + }; + + /** + * Converts this ParquetOptions to JSON. + * @function toJSON + * @memberof google.cloud.storageinsights.v1.ParquetOptions + * @instance + * @returns {Object.} JSON object + */ + ParquetOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ParquetOptions + * @function getTypeUrl + * @memberof google.cloud.storageinsights.v1.ParquetOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ParquetOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.storageinsights.v1.ParquetOptions"; + }; + + return ParquetOptions; + })(); + + v1.CloudStorageFilters = (function() { + + /** + * Properties of a CloudStorageFilters. + * @memberof google.cloud.storageinsights.v1 + * @interface ICloudStorageFilters + * @property {string|null} [bucket] CloudStorageFilters bucket + */ + + /** + * Constructs a new CloudStorageFilters. + * @memberof google.cloud.storageinsights.v1 + * @classdesc Represents a CloudStorageFilters. + * @implements ICloudStorageFilters + * @constructor + * @param {google.cloud.storageinsights.v1.ICloudStorageFilters=} [properties] Properties to set + */ + function CloudStorageFilters(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]]; + } + + /** + * CloudStorageFilters bucket. + * @member {string} bucket + * @memberof google.cloud.storageinsights.v1.CloudStorageFilters + * @instance + */ + CloudStorageFilters.prototype.bucket = ""; + + /** + * Creates a new CloudStorageFilters instance using the specified properties. + * @function create + * @memberof google.cloud.storageinsights.v1.CloudStorageFilters + * @static + * @param {google.cloud.storageinsights.v1.ICloudStorageFilters=} [properties] Properties to set + * @returns {google.cloud.storageinsights.v1.CloudStorageFilters} CloudStorageFilters instance + */ + CloudStorageFilters.create = function create(properties) { + return new CloudStorageFilters(properties); + }; + + /** + * Encodes the specified CloudStorageFilters message. Does not implicitly {@link google.cloud.storageinsights.v1.CloudStorageFilters.verify|verify} messages. + * @function encode + * @memberof google.cloud.storageinsights.v1.CloudStorageFilters + * @static + * @param {google.cloud.storageinsights.v1.ICloudStorageFilters} message CloudStorageFilters message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudStorageFilters.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket); + return writer; + }; + + /** + * Encodes the specified CloudStorageFilters message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.CloudStorageFilters.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.storageinsights.v1.CloudStorageFilters + * @static + * @param {google.cloud.storageinsights.v1.ICloudStorageFilters} message CloudStorageFilters message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudStorageFilters.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudStorageFilters message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.storageinsights.v1.CloudStorageFilters + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.storageinsights.v1.CloudStorageFilters} CloudStorageFilters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudStorageFilters.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.storageinsights.v1.CloudStorageFilters(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.bucket = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudStorageFilters message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.storageinsights.v1.CloudStorageFilters + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.storageinsights.v1.CloudStorageFilters} CloudStorageFilters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudStorageFilters.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudStorageFilters message. + * @function verify + * @memberof google.cloud.storageinsights.v1.CloudStorageFilters + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudStorageFilters.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bucket != null && message.hasOwnProperty("bucket")) + if (!$util.isString(message.bucket)) + return "bucket: string expected"; + return null; + }; + + /** + * Creates a CloudStorageFilters message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.storageinsights.v1.CloudStorageFilters + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.storageinsights.v1.CloudStorageFilters} CloudStorageFilters + */ + CloudStorageFilters.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.storageinsights.v1.CloudStorageFilters) + return object; + var message = new $root.google.cloud.storageinsights.v1.CloudStorageFilters(); + if (object.bucket != null) + message.bucket = String(object.bucket); + return message; + }; + + /** + * Creates a plain object from a CloudStorageFilters message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.storageinsights.v1.CloudStorageFilters + * @static + * @param {google.cloud.storageinsights.v1.CloudStorageFilters} message CloudStorageFilters + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudStorageFilters.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.bucket = ""; + if (message.bucket != null && message.hasOwnProperty("bucket")) + object.bucket = message.bucket; + return object; + }; + + /** + * Converts this CloudStorageFilters to JSON. + * @function toJSON + * @memberof google.cloud.storageinsights.v1.CloudStorageFilters + * @instance + * @returns {Object.} JSON object + */ + CloudStorageFilters.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudStorageFilters + * @function getTypeUrl + * @memberof google.cloud.storageinsights.v1.CloudStorageFilters + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudStorageFilters.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.storageinsights.v1.CloudStorageFilters"; + }; + + return CloudStorageFilters; + })(); + + v1.CloudStorageDestinationOptions = (function() { + + /** + * Properties of a CloudStorageDestinationOptions. + * @memberof google.cloud.storageinsights.v1 + * @interface ICloudStorageDestinationOptions + * @property {string|null} [bucket] CloudStorageDestinationOptions bucket + * @property {string|null} [destinationPath] CloudStorageDestinationOptions destinationPath + */ + + /** + * Constructs a new CloudStorageDestinationOptions. + * @memberof google.cloud.storageinsights.v1 + * @classdesc Represents a CloudStorageDestinationOptions. + * @implements ICloudStorageDestinationOptions + * @constructor + * @param {google.cloud.storageinsights.v1.ICloudStorageDestinationOptions=} [properties] Properties to set + */ + function CloudStorageDestinationOptions(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]]; + } + + /** + * CloudStorageDestinationOptions bucket. + * @member {string} bucket + * @memberof google.cloud.storageinsights.v1.CloudStorageDestinationOptions + * @instance + */ + CloudStorageDestinationOptions.prototype.bucket = ""; + + /** + * CloudStorageDestinationOptions destinationPath. + * @member {string} destinationPath + * @memberof google.cloud.storageinsights.v1.CloudStorageDestinationOptions + * @instance + */ + CloudStorageDestinationOptions.prototype.destinationPath = ""; + + /** + * Creates a new CloudStorageDestinationOptions instance using the specified properties. + * @function create + * @memberof google.cloud.storageinsights.v1.CloudStorageDestinationOptions + * @static + * @param {google.cloud.storageinsights.v1.ICloudStorageDestinationOptions=} [properties] Properties to set + * @returns {google.cloud.storageinsights.v1.CloudStorageDestinationOptions} CloudStorageDestinationOptions instance + */ + CloudStorageDestinationOptions.create = function create(properties) { + return new CloudStorageDestinationOptions(properties); + }; + + /** + * Encodes the specified CloudStorageDestinationOptions message. Does not implicitly {@link google.cloud.storageinsights.v1.CloudStorageDestinationOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.storageinsights.v1.CloudStorageDestinationOptions + * @static + * @param {google.cloud.storageinsights.v1.ICloudStorageDestinationOptions} message CloudStorageDestinationOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudStorageDestinationOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket); + if (message.destinationPath != null && Object.hasOwnProperty.call(message, "destinationPath")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.destinationPath); + return writer; + }; + + /** + * Encodes the specified CloudStorageDestinationOptions message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.CloudStorageDestinationOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.storageinsights.v1.CloudStorageDestinationOptions + * @static + * @param {google.cloud.storageinsights.v1.ICloudStorageDestinationOptions} message CloudStorageDestinationOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudStorageDestinationOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudStorageDestinationOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.storageinsights.v1.CloudStorageDestinationOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.storageinsights.v1.CloudStorageDestinationOptions} CloudStorageDestinationOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudStorageDestinationOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.storageinsights.v1.CloudStorageDestinationOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.bucket = reader.string(); + break; + } + case 2: { + message.destinationPath = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudStorageDestinationOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.storageinsights.v1.CloudStorageDestinationOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.storageinsights.v1.CloudStorageDestinationOptions} CloudStorageDestinationOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudStorageDestinationOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudStorageDestinationOptions message. + * @function verify + * @memberof google.cloud.storageinsights.v1.CloudStorageDestinationOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudStorageDestinationOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bucket != null && message.hasOwnProperty("bucket")) + if (!$util.isString(message.bucket)) + return "bucket: string expected"; + if (message.destinationPath != null && message.hasOwnProperty("destinationPath")) + if (!$util.isString(message.destinationPath)) + return "destinationPath: string expected"; + return null; + }; + + /** + * Creates a CloudStorageDestinationOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.storageinsights.v1.CloudStorageDestinationOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.storageinsights.v1.CloudStorageDestinationOptions} CloudStorageDestinationOptions + */ + CloudStorageDestinationOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.storageinsights.v1.CloudStorageDestinationOptions) + return object; + var message = new $root.google.cloud.storageinsights.v1.CloudStorageDestinationOptions(); + if (object.bucket != null) + message.bucket = String(object.bucket); + if (object.destinationPath != null) + message.destinationPath = String(object.destinationPath); + return message; + }; + + /** + * Creates a plain object from a CloudStorageDestinationOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.storageinsights.v1.CloudStorageDestinationOptions + * @static + * @param {google.cloud.storageinsights.v1.CloudStorageDestinationOptions} message CloudStorageDestinationOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudStorageDestinationOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.bucket = ""; + object.destinationPath = ""; + } + if (message.bucket != null && message.hasOwnProperty("bucket")) + object.bucket = message.bucket; + if (message.destinationPath != null && message.hasOwnProperty("destinationPath")) + object.destinationPath = message.destinationPath; + return object; + }; + + /** + * Converts this CloudStorageDestinationOptions to JSON. + * @function toJSON + * @memberof google.cloud.storageinsights.v1.CloudStorageDestinationOptions + * @instance + * @returns {Object.} JSON object + */ + CloudStorageDestinationOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudStorageDestinationOptions + * @function getTypeUrl + * @memberof google.cloud.storageinsights.v1.CloudStorageDestinationOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudStorageDestinationOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.storageinsights.v1.CloudStorageDestinationOptions"; + }; + + return CloudStorageDestinationOptions; + })(); + + v1.ObjectMetadataReportOptions = (function() { + + /** + * Properties of an ObjectMetadataReportOptions. + * @memberof google.cloud.storageinsights.v1 + * @interface IObjectMetadataReportOptions + * @property {Array.|null} [metadataFields] ObjectMetadataReportOptions metadataFields + * @property {google.cloud.storageinsights.v1.ICloudStorageFilters|null} [storageFilters] ObjectMetadataReportOptions storageFilters + * @property {google.cloud.storageinsights.v1.ICloudStorageDestinationOptions|null} [storageDestinationOptions] ObjectMetadataReportOptions storageDestinationOptions + */ + + /** + * Constructs a new ObjectMetadataReportOptions. + * @memberof google.cloud.storageinsights.v1 + * @classdesc Represents an ObjectMetadataReportOptions. + * @implements IObjectMetadataReportOptions + * @constructor + * @param {google.cloud.storageinsights.v1.IObjectMetadataReportOptions=} [properties] Properties to set + */ + function ObjectMetadataReportOptions(properties) { + this.metadataFields = []; + 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]]; + } + + /** + * ObjectMetadataReportOptions metadataFields. + * @member {Array.} metadataFields + * @memberof google.cloud.storageinsights.v1.ObjectMetadataReportOptions + * @instance + */ + ObjectMetadataReportOptions.prototype.metadataFields = $util.emptyArray; + + /** + * ObjectMetadataReportOptions storageFilters. + * @member {google.cloud.storageinsights.v1.ICloudStorageFilters|null|undefined} storageFilters + * @memberof google.cloud.storageinsights.v1.ObjectMetadataReportOptions + * @instance + */ + ObjectMetadataReportOptions.prototype.storageFilters = null; + + /** + * ObjectMetadataReportOptions storageDestinationOptions. + * @member {google.cloud.storageinsights.v1.ICloudStorageDestinationOptions|null|undefined} storageDestinationOptions + * @memberof google.cloud.storageinsights.v1.ObjectMetadataReportOptions + * @instance + */ + ObjectMetadataReportOptions.prototype.storageDestinationOptions = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ObjectMetadataReportOptions filter. + * @member {"storageFilters"|undefined} filter + * @memberof google.cloud.storageinsights.v1.ObjectMetadataReportOptions + * @instance + */ + Object.defineProperty(ObjectMetadataReportOptions.prototype, "filter", { + get: $util.oneOfGetter($oneOfFields = ["storageFilters"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ObjectMetadataReportOptions destinationOptions. + * @member {"storageDestinationOptions"|undefined} destinationOptions + * @memberof google.cloud.storageinsights.v1.ObjectMetadataReportOptions + * @instance + */ + Object.defineProperty(ObjectMetadataReportOptions.prototype, "destinationOptions", { + get: $util.oneOfGetter($oneOfFields = ["storageDestinationOptions"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ObjectMetadataReportOptions instance using the specified properties. + * @function create + * @memberof google.cloud.storageinsights.v1.ObjectMetadataReportOptions + * @static + * @param {google.cloud.storageinsights.v1.IObjectMetadataReportOptions=} [properties] Properties to set + * @returns {google.cloud.storageinsights.v1.ObjectMetadataReportOptions} ObjectMetadataReportOptions instance + */ + ObjectMetadataReportOptions.create = function create(properties) { + return new ObjectMetadataReportOptions(properties); + }; + + /** + * Encodes the specified ObjectMetadataReportOptions message. Does not implicitly {@link google.cloud.storageinsights.v1.ObjectMetadataReportOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.storageinsights.v1.ObjectMetadataReportOptions + * @static + * @param {google.cloud.storageinsights.v1.IObjectMetadataReportOptions} message ObjectMetadataReportOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ObjectMetadataReportOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metadataFields != null && message.metadataFields.length) + for (var i = 0; i < message.metadataFields.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metadataFields[i]); + if (message.storageFilters != null && Object.hasOwnProperty.call(message, "storageFilters")) + $root.google.cloud.storageinsights.v1.CloudStorageFilters.encode(message.storageFilters, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.storageDestinationOptions != null && Object.hasOwnProperty.call(message, "storageDestinationOptions")) + $root.google.cloud.storageinsights.v1.CloudStorageDestinationOptions.encode(message.storageDestinationOptions, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ObjectMetadataReportOptions message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.ObjectMetadataReportOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.storageinsights.v1.ObjectMetadataReportOptions + * @static + * @param {google.cloud.storageinsights.v1.IObjectMetadataReportOptions} message ObjectMetadataReportOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ObjectMetadataReportOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ObjectMetadataReportOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.storageinsights.v1.ObjectMetadataReportOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.storageinsights.v1.ObjectMetadataReportOptions} ObjectMetadataReportOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ObjectMetadataReportOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.storageinsights.v1.ObjectMetadataReportOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.metadataFields && message.metadataFields.length)) + message.metadataFields = []; + message.metadataFields.push(reader.string()); + break; + } + case 2: { + message.storageFilters = $root.google.cloud.storageinsights.v1.CloudStorageFilters.decode(reader, reader.uint32()); + break; + } + case 3: { + message.storageDestinationOptions = $root.google.cloud.storageinsights.v1.CloudStorageDestinationOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ObjectMetadataReportOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.storageinsights.v1.ObjectMetadataReportOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.storageinsights.v1.ObjectMetadataReportOptions} ObjectMetadataReportOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ObjectMetadataReportOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ObjectMetadataReportOptions message. + * @function verify + * @memberof google.cloud.storageinsights.v1.ObjectMetadataReportOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ObjectMetadataReportOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.metadataFields != null && message.hasOwnProperty("metadataFields")) { + if (!Array.isArray(message.metadataFields)) + return "metadataFields: array expected"; + for (var i = 0; i < message.metadataFields.length; ++i) + if (!$util.isString(message.metadataFields[i])) + return "metadataFields: string[] expected"; + } + if (message.storageFilters != null && message.hasOwnProperty("storageFilters")) { + properties.filter = 1; + { + var error = $root.google.cloud.storageinsights.v1.CloudStorageFilters.verify(message.storageFilters); + if (error) + return "storageFilters." + error; + } + } + if (message.storageDestinationOptions != null && message.hasOwnProperty("storageDestinationOptions")) { + properties.destinationOptions = 1; + { + var error = $root.google.cloud.storageinsights.v1.CloudStorageDestinationOptions.verify(message.storageDestinationOptions); + if (error) + return "storageDestinationOptions." + error; + } + } + return null; + }; + + /** + * Creates an ObjectMetadataReportOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.storageinsights.v1.ObjectMetadataReportOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.storageinsights.v1.ObjectMetadataReportOptions} ObjectMetadataReportOptions + */ + ObjectMetadataReportOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.storageinsights.v1.ObjectMetadataReportOptions) + return object; + var message = new $root.google.cloud.storageinsights.v1.ObjectMetadataReportOptions(); + if (object.metadataFields) { + if (!Array.isArray(object.metadataFields)) + throw TypeError(".google.cloud.storageinsights.v1.ObjectMetadataReportOptions.metadataFields: array expected"); + message.metadataFields = []; + for (var i = 0; i < object.metadataFields.length; ++i) + message.metadataFields[i] = String(object.metadataFields[i]); + } + if (object.storageFilters != null) { + if (typeof object.storageFilters !== "object") + throw TypeError(".google.cloud.storageinsights.v1.ObjectMetadataReportOptions.storageFilters: object expected"); + message.storageFilters = $root.google.cloud.storageinsights.v1.CloudStorageFilters.fromObject(object.storageFilters); + } + if (object.storageDestinationOptions != null) { + if (typeof object.storageDestinationOptions !== "object") + throw TypeError(".google.cloud.storageinsights.v1.ObjectMetadataReportOptions.storageDestinationOptions: object expected"); + message.storageDestinationOptions = $root.google.cloud.storageinsights.v1.CloudStorageDestinationOptions.fromObject(object.storageDestinationOptions); + } + return message; + }; + + /** + * Creates a plain object from an ObjectMetadataReportOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.storageinsights.v1.ObjectMetadataReportOptions + * @static + * @param {google.cloud.storageinsights.v1.ObjectMetadataReportOptions} message ObjectMetadataReportOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ObjectMetadataReportOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.metadataFields = []; + if (message.metadataFields && message.metadataFields.length) { + object.metadataFields = []; + for (var j = 0; j < message.metadataFields.length; ++j) + object.metadataFields[j] = message.metadataFields[j]; + } + if (message.storageFilters != null && message.hasOwnProperty("storageFilters")) { + object.storageFilters = $root.google.cloud.storageinsights.v1.CloudStorageFilters.toObject(message.storageFilters, options); + if (options.oneofs) + object.filter = "storageFilters"; + } + if (message.storageDestinationOptions != null && message.hasOwnProperty("storageDestinationOptions")) { + object.storageDestinationOptions = $root.google.cloud.storageinsights.v1.CloudStorageDestinationOptions.toObject(message.storageDestinationOptions, options); + if (options.oneofs) + object.destinationOptions = "storageDestinationOptions"; + } + return object; + }; + + /** + * Converts this ObjectMetadataReportOptions to JSON. + * @function toJSON + * @memberof google.cloud.storageinsights.v1.ObjectMetadataReportOptions + * @instance + * @returns {Object.} JSON object + */ + ObjectMetadataReportOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ObjectMetadataReportOptions + * @function getTypeUrl + * @memberof google.cloud.storageinsights.v1.ObjectMetadataReportOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ObjectMetadataReportOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.storageinsights.v1.ObjectMetadataReportOptions"; + }; + + return ObjectMetadataReportOptions; + })(); + + v1.ReportConfig = (function() { + + /** + * Properties of a ReportConfig. + * @memberof google.cloud.storageinsights.v1 + * @interface IReportConfig + * @property {string|null} [name] ReportConfig name + * @property {google.protobuf.ITimestamp|null} [createTime] ReportConfig createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] ReportConfig updateTime + * @property {google.cloud.storageinsights.v1.IFrequencyOptions|null} [frequencyOptions] ReportConfig frequencyOptions + * @property {google.cloud.storageinsights.v1.ICSVOptions|null} [csvOptions] ReportConfig csvOptions + * @property {google.cloud.storageinsights.v1.IParquetOptions|null} [parquetOptions] ReportConfig parquetOptions + * @property {google.cloud.storageinsights.v1.IObjectMetadataReportOptions|null} [objectMetadataReportOptions] ReportConfig objectMetadataReportOptions + * @property {Object.|null} [labels] ReportConfig labels + * @property {string|null} [displayName] ReportConfig displayName + */ + + /** + * Constructs a new ReportConfig. + * @memberof google.cloud.storageinsights.v1 + * @classdesc Represents a ReportConfig. + * @implements IReportConfig + * @constructor + * @param {google.cloud.storageinsights.v1.IReportConfig=} [properties] Properties to set + */ + function ReportConfig(properties) { + this.labels = {}; + 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]]; + } + + /** + * ReportConfig name. + * @member {string} name + * @memberof google.cloud.storageinsights.v1.ReportConfig + * @instance + */ + ReportConfig.prototype.name = ""; + + /** + * ReportConfig createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.storageinsights.v1.ReportConfig + * @instance + */ + ReportConfig.prototype.createTime = null; + + /** + * ReportConfig updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.storageinsights.v1.ReportConfig + * @instance + */ + ReportConfig.prototype.updateTime = null; + + /** + * ReportConfig frequencyOptions. + * @member {google.cloud.storageinsights.v1.IFrequencyOptions|null|undefined} frequencyOptions + * @memberof google.cloud.storageinsights.v1.ReportConfig + * @instance + */ + ReportConfig.prototype.frequencyOptions = null; + + /** + * ReportConfig csvOptions. + * @member {google.cloud.storageinsights.v1.ICSVOptions|null|undefined} csvOptions + * @memberof google.cloud.storageinsights.v1.ReportConfig + * @instance + */ + ReportConfig.prototype.csvOptions = null; + + /** + * ReportConfig parquetOptions. + * @member {google.cloud.storageinsights.v1.IParquetOptions|null|undefined} parquetOptions + * @memberof google.cloud.storageinsights.v1.ReportConfig + * @instance + */ + ReportConfig.prototype.parquetOptions = null; + + /** + * ReportConfig objectMetadataReportOptions. + * @member {google.cloud.storageinsights.v1.IObjectMetadataReportOptions|null|undefined} objectMetadataReportOptions + * @memberof google.cloud.storageinsights.v1.ReportConfig + * @instance + */ + ReportConfig.prototype.objectMetadataReportOptions = null; + + /** + * ReportConfig labels. + * @member {Object.} labels + * @memberof google.cloud.storageinsights.v1.ReportConfig + * @instance + */ + ReportConfig.prototype.labels = $util.emptyObject; + + /** + * ReportConfig displayName. + * @member {string} displayName + * @memberof google.cloud.storageinsights.v1.ReportConfig + * @instance + */ + ReportConfig.prototype.displayName = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ReportConfig reportFormat. + * @member {"csvOptions"|"parquetOptions"|undefined} reportFormat + * @memberof google.cloud.storageinsights.v1.ReportConfig + * @instance + */ + Object.defineProperty(ReportConfig.prototype, "reportFormat", { + get: $util.oneOfGetter($oneOfFields = ["csvOptions", "parquetOptions"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ReportConfig reportKind. + * @member {"objectMetadataReportOptions"|undefined} reportKind + * @memberof google.cloud.storageinsights.v1.ReportConfig + * @instance + */ + Object.defineProperty(ReportConfig.prototype, "reportKind", { + get: $util.oneOfGetter($oneOfFields = ["objectMetadataReportOptions"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ReportConfig instance using the specified properties. + * @function create + * @memberof google.cloud.storageinsights.v1.ReportConfig + * @static + * @param {google.cloud.storageinsights.v1.IReportConfig=} [properties] Properties to set + * @returns {google.cloud.storageinsights.v1.ReportConfig} ReportConfig instance + */ + ReportConfig.create = function create(properties) { + return new ReportConfig(properties); + }; + + /** + * Encodes the specified ReportConfig message. Does not implicitly {@link google.cloud.storageinsights.v1.ReportConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.storageinsights.v1.ReportConfig + * @static + * @param {google.cloud.storageinsights.v1.IReportConfig} message ReportConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportConfig.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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.frequencyOptions != null && Object.hasOwnProperty.call(message, "frequencyOptions")) + $root.google.cloud.storageinsights.v1.FrequencyOptions.encode(message.frequencyOptions, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.csvOptions != null && Object.hasOwnProperty.call(message, "csvOptions")) + $root.google.cloud.storageinsights.v1.CSVOptions.encode(message.csvOptions, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.parquetOptions != null && Object.hasOwnProperty.call(message, "parquetOptions")) + $root.google.cloud.storageinsights.v1.ParquetOptions.encode(message.parquetOptions, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.objectMetadataReportOptions != null && Object.hasOwnProperty.call(message, "objectMetadataReportOptions")) + $root.google.cloud.storageinsights.v1.ObjectMetadataReportOptions.encode(message.objectMetadataReportOptions, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified ReportConfig message, length delimited. Does not implicitly {@link google.cloud.storageinsights.v1.ReportConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.storageinsights.v1.ReportConfig + * @static + * @param {google.cloud.storageinsights.v1.IReportConfig} message ReportConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReportConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReportConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.storageinsights.v1.ReportConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.storageinsights.v1.ReportConfig} ReportConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.storageinsights.v1.ReportConfig(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.frequencyOptions = $root.google.cloud.storageinsights.v1.FrequencyOptions.decode(reader, reader.uint32()); + break; + } + case 6: { + message.csvOptions = $root.google.cloud.storageinsights.v1.CSVOptions.decode(reader, reader.uint32()); + break; + } + case 7: { + message.parquetOptions = $root.google.cloud.storageinsights.v1.ParquetOptions.decode(reader, reader.uint32()); + break; + } + case 8: { + message.objectMetadataReportOptions = $root.google.cloud.storageinsights.v1.ObjectMetadataReportOptions.decode(reader, reader.uint32()); + break; + } + case 10: { + if (message.labels === $util.emptyObject) + message.labels = {}; + 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.labels[key] = value; + break; + } + case 11: { + message.displayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReportConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.storageinsights.v1.ReportConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.storageinsights.v1.ReportConfig} ReportConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReportConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReportConfig message. + * @function verify + * @memberof google.cloud.storageinsights.v1.ReportConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReportConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: 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.frequencyOptions != null && message.hasOwnProperty("frequencyOptions")) { + var error = $root.google.cloud.storageinsights.v1.FrequencyOptions.verify(message.frequencyOptions); + if (error) + return "frequencyOptions." + error; + } + if (message.csvOptions != null && message.hasOwnProperty("csvOptions")) { + properties.reportFormat = 1; + { + var error = $root.google.cloud.storageinsights.v1.CSVOptions.verify(message.csvOptions); + if (error) + return "csvOptions." + error; + } + } + if (message.parquetOptions != null && message.hasOwnProperty("parquetOptions")) { + if (properties.reportFormat === 1) + return "reportFormat: multiple values"; + properties.reportFormat = 1; + { + var error = $root.google.cloud.storageinsights.v1.ParquetOptions.verify(message.parquetOptions); + if (error) + return "parquetOptions." + error; + } + } + if (message.objectMetadataReportOptions != null && message.hasOwnProperty("objectMetadataReportOptions")) { + properties.reportKind = 1; + { + var error = $root.google.cloud.storageinsights.v1.ObjectMetadataReportOptions.verify(message.objectMetadataReportOptions); + if (error) + return "objectMetadataReportOptions." + error; + } + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + return null; + }; + + /** + * Creates a ReportConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.storageinsights.v1.ReportConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.storageinsights.v1.ReportConfig} ReportConfig + */ + ReportConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.storageinsights.v1.ReportConfig) + return object; + var message = new $root.google.cloud.storageinsights.v1.ReportConfig(); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.storageinsights.v1.ReportConfig.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.storageinsights.v1.ReportConfig.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.frequencyOptions != null) { + if (typeof object.frequencyOptions !== "object") + throw TypeError(".google.cloud.storageinsights.v1.ReportConfig.frequencyOptions: object expected"); + message.frequencyOptions = $root.google.cloud.storageinsights.v1.FrequencyOptions.fromObject(object.frequencyOptions); + } + if (object.csvOptions != null) { + if (typeof object.csvOptions !== "object") + throw TypeError(".google.cloud.storageinsights.v1.ReportConfig.csvOptions: object expected"); + message.csvOptions = $root.google.cloud.storageinsights.v1.CSVOptions.fromObject(object.csvOptions); + } + if (object.parquetOptions != null) { + if (typeof object.parquetOptions !== "object") + throw TypeError(".google.cloud.storageinsights.v1.ReportConfig.parquetOptions: object expected"); + message.parquetOptions = $root.google.cloud.storageinsights.v1.ParquetOptions.fromObject(object.parquetOptions); + } + if (object.objectMetadataReportOptions != null) { + if (typeof object.objectMetadataReportOptions !== "object") + throw TypeError(".google.cloud.storageinsights.v1.ReportConfig.objectMetadataReportOptions: object expected"); + message.objectMetadataReportOptions = $root.google.cloud.storageinsights.v1.ObjectMetadataReportOptions.fromObject(object.objectMetadataReportOptions); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.storageinsights.v1.ReportConfig.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; + + /** + * Creates a plain object from a ReportConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.storageinsights.v1.ReportConfig + * @static + * @param {google.cloud.storageinsights.v1.ReportConfig} message ReportConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReportConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.updateTime = null; + object.frequencyOptions = null; + object.displayName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + 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.frequencyOptions != null && message.hasOwnProperty("frequencyOptions")) + object.frequencyOptions = $root.google.cloud.storageinsights.v1.FrequencyOptions.toObject(message.frequencyOptions, options); + if (message.csvOptions != null && message.hasOwnProperty("csvOptions")) { + object.csvOptions = $root.google.cloud.storageinsights.v1.CSVOptions.toObject(message.csvOptions, options); + if (options.oneofs) + object.reportFormat = "csvOptions"; + } + if (message.parquetOptions != null && message.hasOwnProperty("parquetOptions")) { + object.parquetOptions = $root.google.cloud.storageinsights.v1.ParquetOptions.toObject(message.parquetOptions, options); + if (options.oneofs) + object.reportFormat = "parquetOptions"; + } + if (message.objectMetadataReportOptions != null && message.hasOwnProperty("objectMetadataReportOptions")) { + object.objectMetadataReportOptions = $root.google.cloud.storageinsights.v1.ObjectMetadataReportOptions.toObject(message.objectMetadataReportOptions, options); + if (options.oneofs) + object.reportKind = "objectMetadataReportOptions"; + } + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this ReportConfig to JSON. + * @function toJSON + * @memberof google.cloud.storageinsights.v1.ReportConfig + * @instance + * @returns {Object.} JSON object + */ + ReportConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReportConfig + * @function getTypeUrl + * @memberof google.cloud.storageinsights.v1.ReportConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReportConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.storageinsights.v1.ReportConfig"; + }; + + return ReportConfig; + })(); + + return v1; + })(); + + return storageinsights; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + 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]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + 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]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(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]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + + return CustomHttpPattern; + })(); + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + 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]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(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]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + + return ResourceReference; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + 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]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {string|null} [edition] FileDescriptorProto edition + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + 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]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * FileDescriptorProto edition. + * @member {string} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = ""; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.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["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.edition); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 13: { + message.edition = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.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["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + if (!$util.isString(message.edition)) + return "edition: string expected"; + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + if (object.edition != null) + message.edition = String(object.edition); + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = message.edition; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + 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]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.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.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.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.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(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]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(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]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(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]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.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.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.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.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(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]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.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.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.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.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + 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]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.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.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.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.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(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]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(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]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.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.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.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.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + 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]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.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.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.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.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(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]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.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.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.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.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + 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]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions phpGenericServices. + * @member {boolean} phpGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) + writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 42: { + message.phpGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (typeof message.phpGenericServices !== "boolean") + return "phpGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.phpGenericServices != null) + message.phpGenericServices = Boolean(object.phpGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpGenericServices = false; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + object.phpGenericServices = message.phpGenericServices; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + 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]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { + writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.int32(message[".google.api.fieldBehavior"][i]); + writer.ldelim(); + } + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object.unverifiedLazy = false; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.deprecated = false; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + 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]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + 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]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length >= 0) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(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]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + 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]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + 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]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + 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]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + 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]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Empty = (function() { + + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(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]]; + } + + /** + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + + return Empty; + })(); + + protobuf.FieldMask = (function() { + + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + 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]]; + } + + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; + + /** + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance + */ + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; + + return FieldMask; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(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]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + + return Timestamp; + })(); + + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(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]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type_url = reader.string(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; + }; + + return Any; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(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]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); + + 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) { + 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(); + 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() { + + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; + + type.Date = (function() { + + /** + * Properties of a Date. + * @memberof google.type + * @interface IDate + * @property {number|null} [year] Date year + * @property {number|null} [month] Date month + * @property {number|null} [day] Date day + */ + + /** + * Constructs a new Date. + * @memberof google.type + * @classdesc Represents a Date. + * @implements IDate + * @constructor + * @param {google.type.IDate=} [properties] Properties to set + */ + function Date(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]]; + } + + /** + * Date year. + * @member {number} year + * @memberof google.type.Date + * @instance + */ + Date.prototype.year = 0; + + /** + * Date month. + * @member {number} month + * @memberof google.type.Date + * @instance + */ + Date.prototype.month = 0; + + /** + * Date day. + * @member {number} day + * @memberof google.type.Date + * @instance + */ + Date.prototype.day = 0; + + /** + * Creates a new Date instance using the specified properties. + * @function create + * @memberof google.type.Date + * @static + * @param {google.type.IDate=} [properties] Properties to set + * @returns {google.type.Date} Date instance + */ + Date.create = function create(properties) { + return new Date(properties); + }; + + /** + * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @function encode + * @memberof google.type.Date + * @static + * @param {google.type.IDate} message Date message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Date.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.year != null && Object.hasOwnProperty.call(message, "year")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.year); + if (message.month != null && Object.hasOwnProperty.call(message, "month")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.month); + if (message.day != null && Object.hasOwnProperty.call(message, "day")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.day); + return writer; + }; + + /** + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.Date + * @static + * @param {google.type.IDate} message Date message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Date.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Date message from the specified reader or buffer. + * @function decode + * @memberof google.type.Date + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.Date} Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Date.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Date(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.year = reader.int32(); + break; + } + case 2: { + message.month = reader.int32(); + break; + } + case 3: { + message.day = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Date message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.Date + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.Date} Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Date.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Date message. + * @function verify + * @memberof google.type.Date + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Date.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.year != null && message.hasOwnProperty("year")) + if (!$util.isInteger(message.year)) + return "year: integer expected"; + if (message.month != null && message.hasOwnProperty("month")) + if (!$util.isInteger(message.month)) + return "month: integer expected"; + if (message.day != null && message.hasOwnProperty("day")) + if (!$util.isInteger(message.day)) + return "day: integer expected"; + return null; + }; + + /** + * Creates a Date message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.Date + * @static + * @param {Object.} object Plain object + * @returns {google.type.Date} Date + */ + Date.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.Date) + return object; + var message = new $root.google.type.Date(); + if (object.year != null) + message.year = object.year | 0; + if (object.month != null) + message.month = object.month | 0; + if (object.day != null) + message.day = object.day | 0; + return message; + }; + + /** + * Creates a plain object from a Date message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.Date + * @static + * @param {google.type.Date} message Date + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Date.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.year = 0; + object.month = 0; + object.day = 0; + } + if (message.year != null && message.hasOwnProperty("year")) + object.year = message.year; + if (message.month != null && message.hasOwnProperty("month")) + object.month = message.month; + if (message.day != null && message.hasOwnProperty("day")) + object.day = message.day; + return object; + }; + + /** + * Converts this Date to JSON. + * @function toJSON + * @memberof google.type.Date + * @instance + * @returns {Object.} JSON object + */ + Date.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Date + * @function getTypeUrl + * @memberof google.type.Date + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Date.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.Date"; + }; + + return Date; + })(); + + type.DateTime = (function() { + + /** + * Properties of a DateTime. + * @memberof google.type + * @interface IDateTime + * @property {number|null} [year] DateTime year + * @property {number|null} [month] DateTime month + * @property {number|null} [day] DateTime day + * @property {number|null} [hours] DateTime hours + * @property {number|null} [minutes] DateTime minutes + * @property {number|null} [seconds] DateTime seconds + * @property {number|null} [nanos] DateTime nanos + * @property {google.protobuf.IDuration|null} [utcOffset] DateTime utcOffset + * @property {google.type.ITimeZone|null} [timeZone] DateTime timeZone + */ + + /** + * Constructs a new DateTime. + * @memberof google.type + * @classdesc Represents a DateTime. + * @implements IDateTime + * @constructor + * @param {google.type.IDateTime=} [properties] Properties to set + */ + function DateTime(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]]; + } + + /** + * DateTime year. + * @member {number} year + * @memberof google.type.DateTime + * @instance + */ + DateTime.prototype.year = 0; + + /** + * DateTime month. + * @member {number} month + * @memberof google.type.DateTime + * @instance + */ + DateTime.prototype.month = 0; + + /** + * DateTime day. + * @member {number} day + * @memberof google.type.DateTime + * @instance + */ + DateTime.prototype.day = 0; + + /** + * DateTime hours. + * @member {number} hours + * @memberof google.type.DateTime + * @instance + */ + DateTime.prototype.hours = 0; + + /** + * DateTime minutes. + * @member {number} minutes + * @memberof google.type.DateTime + * @instance + */ + DateTime.prototype.minutes = 0; + + /** + * DateTime seconds. + * @member {number} seconds + * @memberof google.type.DateTime + * @instance + */ + DateTime.prototype.seconds = 0; + + /** + * DateTime nanos. + * @member {number} nanos + * @memberof google.type.DateTime + * @instance + */ + DateTime.prototype.nanos = 0; + + /** + * DateTime utcOffset. + * @member {google.protobuf.IDuration|null|undefined} utcOffset + * @memberof google.type.DateTime + * @instance + */ + DateTime.prototype.utcOffset = null; + + /** + * DateTime timeZone. + * @member {google.type.ITimeZone|null|undefined} timeZone + * @memberof google.type.DateTime + * @instance + */ + DateTime.prototype.timeZone = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DateTime timeOffset. + * @member {"utcOffset"|"timeZone"|undefined} timeOffset + * @memberof google.type.DateTime + * @instance + */ + Object.defineProperty(DateTime.prototype, "timeOffset", { + get: $util.oneOfGetter($oneOfFields = ["utcOffset", "timeZone"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DateTime instance using the specified properties. + * @function create + * @memberof google.type.DateTime + * @static + * @param {google.type.IDateTime=} [properties] Properties to set + * @returns {google.type.DateTime} DateTime instance + */ + DateTime.create = function create(properties) { + return new DateTime(properties); + }; + + /** + * Encodes the specified DateTime message. Does not implicitly {@link google.type.DateTime.verify|verify} messages. + * @function encode + * @memberof google.type.DateTime + * @static + * @param {google.type.IDateTime} message DateTime message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DateTime.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.year != null && Object.hasOwnProperty.call(message, "year")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.year); + if (message.month != null && Object.hasOwnProperty.call(message, "month")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.month); + if (message.day != null && Object.hasOwnProperty.call(message, "day")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.day); + if (message.hours != null && Object.hasOwnProperty.call(message, "hours")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.hours); + if (message.minutes != null && Object.hasOwnProperty.call(message, "minutes")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.minutes); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.nanos); + if (message.utcOffset != null && Object.hasOwnProperty.call(message, "utcOffset")) + $root.google.protobuf.Duration.encode(message.utcOffset, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + $root.google.type.TimeZone.encode(message.timeZone, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DateTime message, length delimited. Does not implicitly {@link google.type.DateTime.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.DateTime + * @static + * @param {google.type.IDateTime} message DateTime message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DateTime.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DateTime message from the specified reader or buffer. + * @function decode + * @memberof google.type.DateTime + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.DateTime} DateTime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DateTime.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.DateTime(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.year = reader.int32(); + break; + } + case 2: { + message.month = reader.int32(); + break; + } + case 3: { + message.day = reader.int32(); + break; + } + case 4: { + message.hours = reader.int32(); + break; + } + case 5: { + message.minutes = reader.int32(); + break; + } + case 6: { + message.seconds = reader.int32(); + break; + } + case 7: { + message.nanos = reader.int32(); + break; + } + case 8: { + message.utcOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 9: { + message.timeZone = $root.google.type.TimeZone.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DateTime message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.DateTime + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.DateTime} DateTime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DateTime.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DateTime message. + * @function verify + * @memberof google.type.DateTime + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DateTime.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.year != null && message.hasOwnProperty("year")) + if (!$util.isInteger(message.year)) + return "year: integer expected"; + if (message.month != null && message.hasOwnProperty("month")) + if (!$util.isInteger(message.month)) + return "month: integer expected"; + if (message.day != null && message.hasOwnProperty("day")) + if (!$util.isInteger(message.day)) + return "day: integer expected"; + if (message.hours != null && message.hasOwnProperty("hours")) + if (!$util.isInteger(message.hours)) + return "hours: integer expected"; + if (message.minutes != null && message.hasOwnProperty("minutes")) + if (!$util.isInteger(message.minutes)) + return "minutes: integer expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds)) + return "seconds: integer expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + if (message.utcOffset != null && message.hasOwnProperty("utcOffset")) { + properties.timeOffset = 1; + { + var error = $root.google.protobuf.Duration.verify(message.utcOffset); + if (error) + return "utcOffset." + error; + } + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) { + if (properties.timeOffset === 1) + return "timeOffset: multiple values"; + properties.timeOffset = 1; + { + var error = $root.google.type.TimeZone.verify(message.timeZone); + if (error) + return "timeZone." + error; + } + } + return null; + }; + + /** + * Creates a DateTime message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.DateTime + * @static + * @param {Object.} object Plain object + * @returns {google.type.DateTime} DateTime + */ + DateTime.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.DateTime) + return object; + var message = new $root.google.type.DateTime(); + if (object.year != null) + message.year = object.year | 0; + if (object.month != null) + message.month = object.month | 0; + if (object.day != null) + message.day = object.day | 0; + if (object.hours != null) + message.hours = object.hours | 0; + if (object.minutes != null) + message.minutes = object.minutes | 0; + if (object.seconds != null) + message.seconds = object.seconds | 0; + if (object.nanos != null) + message.nanos = object.nanos | 0; + if (object.utcOffset != null) { + if (typeof object.utcOffset !== "object") + throw TypeError(".google.type.DateTime.utcOffset: object expected"); + message.utcOffset = $root.google.protobuf.Duration.fromObject(object.utcOffset); + } + if (object.timeZone != null) { + if (typeof object.timeZone !== "object") + throw TypeError(".google.type.DateTime.timeZone: object expected"); + message.timeZone = $root.google.type.TimeZone.fromObject(object.timeZone); + } + return message; + }; + + /** + * Creates a plain object from a DateTime message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.DateTime + * @static + * @param {google.type.DateTime} message DateTime + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DateTime.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.year = 0; + object.month = 0; + object.day = 0; + object.hours = 0; + object.minutes = 0; + object.seconds = 0; + object.nanos = 0; + } + if (message.year != null && message.hasOwnProperty("year")) + object.year = message.year; + if (message.month != null && message.hasOwnProperty("month")) + object.month = message.month; + if (message.day != null && message.hasOwnProperty("day")) + object.day = message.day; + if (message.hours != null && message.hasOwnProperty("hours")) + object.hours = message.hours; + if (message.minutes != null && message.hasOwnProperty("minutes")) + object.minutes = message.minutes; + if (message.seconds != null && message.hasOwnProperty("seconds")) + object.seconds = message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + if (message.utcOffset != null && message.hasOwnProperty("utcOffset")) { + object.utcOffset = $root.google.protobuf.Duration.toObject(message.utcOffset, options); + if (options.oneofs) + object.timeOffset = "utcOffset"; + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) { + object.timeZone = $root.google.type.TimeZone.toObject(message.timeZone, options); + if (options.oneofs) + object.timeOffset = "timeZone"; + } + return object; + }; + + /** + * Converts this DateTime to JSON. + * @function toJSON + * @memberof google.type.DateTime + * @instance + * @returns {Object.} JSON object + */ + DateTime.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DateTime + * @function getTypeUrl + * @memberof google.type.DateTime + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DateTime.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.DateTime"; + }; + + return DateTime; + })(); + + type.TimeZone = (function() { + + /** + * Properties of a TimeZone. + * @memberof google.type + * @interface ITimeZone + * @property {string|null} [id] TimeZone id + * @property {string|null} [version] TimeZone version + */ + + /** + * Constructs a new TimeZone. + * @memberof google.type + * @classdesc Represents a TimeZone. + * @implements ITimeZone + * @constructor + * @param {google.type.ITimeZone=} [properties] Properties to set + */ + function TimeZone(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]]; + } + + /** + * TimeZone id. + * @member {string} id + * @memberof google.type.TimeZone + * @instance + */ + TimeZone.prototype.id = ""; + + /** + * TimeZone version. + * @member {string} version + * @memberof google.type.TimeZone + * @instance + */ + TimeZone.prototype.version = ""; + + /** + * Creates a new TimeZone instance using the specified properties. + * @function create + * @memberof google.type.TimeZone + * @static + * @param {google.type.ITimeZone=} [properties] Properties to set + * @returns {google.type.TimeZone} TimeZone instance + */ + TimeZone.create = function create(properties) { + return new TimeZone(properties); + }; + + /** + * Encodes the specified TimeZone message. Does not implicitly {@link google.type.TimeZone.verify|verify} messages. + * @function encode + * @memberof google.type.TimeZone + * @static + * @param {google.type.ITimeZone} message TimeZone message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeZone.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); + return writer; + }; + + /** + * Encodes the specified TimeZone message, length delimited. Does not implicitly {@link google.type.TimeZone.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.TimeZone + * @static + * @param {google.type.ITimeZone} message TimeZone message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeZone.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeZone message from the specified reader or buffer. + * @function decode + * @memberof google.type.TimeZone + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.TimeZone} TimeZone + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeZone.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.TimeZone(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.version = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TimeZone message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.TimeZone + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.TimeZone} TimeZone + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeZone.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeZone message. + * @function verify + * @memberof google.type.TimeZone + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeZone.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + return null; + }; + + /** + * Creates a TimeZone message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.TimeZone + * @static + * @param {Object.} object Plain object + * @returns {google.type.TimeZone} TimeZone + */ + TimeZone.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.TimeZone) + return object; + var message = new $root.google.type.TimeZone(); + if (object.id != null) + message.id = String(object.id); + if (object.version != null) + message.version = String(object.version); + return message; + }; + + /** + * Creates a plain object from a TimeZone message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.TimeZone + * @static + * @param {google.type.TimeZone} message TimeZone + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeZone.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.version = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this TimeZone to JSON. + * @function toJSON + * @memberof google.type.TimeZone + * @instance + * @returns {Object.} JSON object + */ + TimeZone.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TimeZone + * @function getTypeUrl + * @memberof google.type.TimeZone + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeZone.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.TimeZone"; + }; + + return TimeZone; + })(); + + return type; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/google-cloud-storageinsights/protos/protos.json b/packages/google-cloud-storageinsights/protos/protos.json new file mode 100644 index 00000000000..497523b2c86 --- /dev/null +++ b/packages/google-cloud-storageinsights/protos/protos.json @@ -0,0 +1,1929 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "storageinsights": { + "nested": { + "v1": { + "options": { + "csharp_namespace": "Google.Cloud.StorageInsights.V1", + "go_package": "cloud.google.com/go/storageinsights/apiv1/storageinsightspb;storageinsightspb", + "java_multiple_files": true, + "java_outer_classname": "V1Proto", + "java_package": "com.google.cloud.storageinsights.v1", + "php_namespace": "Google\\Cloud\\StorageInsights\\V1", + "ruby_package": "Google::Cloud::StorageInsights::V1" + }, + "nested": { + "StorageInsights": { + "options": { + "(google.api.default_host)": "storageinsights.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListReportConfigs": { + "requestType": "ListReportConfigsRequest", + "responseType": "ListReportConfigsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/reportConfigs", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/reportConfigs" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetReportConfig": { + "requestType": "GetReportConfigRequest", + "responseType": "ReportConfig", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/reportConfigs/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/reportConfigs/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateReportConfig": { + "requestType": "CreateReportConfigRequest", + "responseType": "ReportConfig", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/reportConfigs", + "(google.api.http).body": "report_config", + "(google.api.method_signature)": "parent,report_config" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/reportConfigs", + "body": "report_config" + } + }, + { + "(google.api.method_signature)": "parent,report_config" + } + ] + }, + "UpdateReportConfig": { + "requestType": "UpdateReportConfigRequest", + "responseType": "ReportConfig", + "options": { + "(google.api.http).patch": "/v1/{report_config.name=projects/*/locations/*/reportConfigs/*}", + "(google.api.http).body": "report_config", + "(google.api.method_signature)": "report_config,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{report_config.name=projects/*/locations/*/reportConfigs/*}", + "body": "report_config" + } + }, + { + "(google.api.method_signature)": "report_config,update_mask" + } + ] + }, + "DeleteReportConfig": { + "requestType": "DeleteReportConfigRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/reportConfigs/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/reportConfigs/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListReportDetails": { + "requestType": "ListReportDetailsRequest", + "responseType": "ListReportDetailsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/reportConfigs/*}/reportDetails", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/reportConfigs/*}/reportDetails" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetReportDetail": { + "requestType": "GetReportDetailRequest", + "responseType": "ReportDetail", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/reportConfigs/*/reportDetails/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/reportConfigs/*/reportDetails/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "ListReportConfigsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "storageinsights.googleapis.com/ReportConfig" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + }, + "orderBy": { + "type": "string", + "id": 5 + } + } + }, + "ListReportConfigsResponse": { + "fields": { + "reportConfigs": { + "rule": "repeated", + "type": "ReportConfig", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetReportConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "storageinsights.googleapis.com/ReportConfig" + } + } + } + }, + "CreateReportConfigRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "storageinsights.googleapis.com/ReportConfig" + } + }, + "reportConfig": { + "type": "ReportConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateReportConfigRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "reportConfig": { + "type": "ReportConfig", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteReportConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "storageinsights.googleapis.com/ReportConfig" + } + }, + "force": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ReportDetail": { + "options": { + "(google.api.resource).type": "storageinsights.googleapis.com/ReportDetail", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/reportConfigs/{report_config}/reportDetails/{report_detail}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "snapshotTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "reportPathPrefix": { + "type": "string", + "id": 8 + }, + "shardsCount": { + "type": "int64", + "id": 9 + }, + "status": { + "type": "google.rpc.Status", + "id": 4 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 5 + }, + "targetDatetime": { + "type": "google.type.DateTime", + "id": 6 + }, + "reportMetrics": { + "type": "Metrics", + "id": 7 + } + }, + "nested": { + "Metrics": { + "fields": { + "processedRecordsCount": { + "type": "int64", + "id": 1 + } + } + } + } + }, + "ListReportDetailsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "storageinsights.googleapis.com/ReportDetail" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + }, + "orderBy": { + "type": "string", + "id": 5 + } + } + }, + "ListReportDetailsResponse": { + "fields": { + "reportDetails": { + "rule": "repeated", + "type": "ReportDetail", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetReportDetailRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "storageinsights.googleapis.com/ReportDetail" + } + } + } + }, + "OperationMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "target": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "verb": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "statusMessage": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "requestedCancellation": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "apiVersion": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "FrequencyOptions": { + "fields": { + "frequency": { + "type": "Frequency", + "id": 1 + }, + "startDate": { + "type": "google.type.Date", + "id": 2 + }, + "endDate": { + "type": "google.type.Date", + "id": 3 + } + }, + "nested": { + "Frequency": { + "values": { + "FREQUENCY_UNSPECIFIED": 0, + "DAILY": 1, + "WEEKLY": 2 + } + } + } + }, + "CSVOptions": { + "fields": { + "recordSeparator": { + "type": "string", + "id": 1 + }, + "delimiter": { + "type": "string", + "id": 2 + }, + "headerRequired": { + "type": "bool", + "id": 3 + } + } + }, + "ParquetOptions": { + "fields": {} + }, + "CloudStorageFilters": { + "fields": { + "bucket": { + "type": "string", + "id": 1 + } + } + }, + "CloudStorageDestinationOptions": { + "fields": { + "bucket": { + "type": "string", + "id": 1 + }, + "destinationPath": { + "type": "string", + "id": 2 + } + } + }, + "ObjectMetadataReportOptions": { + "oneofs": { + "filter": { + "oneof": [ + "storageFilters" + ] + }, + "destinationOptions": { + "oneof": [ + "storageDestinationOptions" + ] + } + }, + "fields": { + "metadataFields": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "storageFilters": { + "type": "CloudStorageFilters", + "id": 2 + }, + "storageDestinationOptions": { + "type": "CloudStorageDestinationOptions", + "id": 3 + } + } + }, + "ReportConfig": { + "options": { + "(google.api.resource).type": "storageinsights.googleapis.com/ReportConfig", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/reportConfigs/{report_config}" + }, + "oneofs": { + "reportFormat": { + "oneof": [ + "csvOptions", + "parquetOptions" + ] + }, + "reportKind": { + "oneof": [ + "objectMetadataReportOptions" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "frequencyOptions": { + "type": "FrequencyOptions", + "id": 5 + }, + "csvOptions": { + "type": "CSVOptions", + "id": 6 + }, + "parquetOptions": { + "type": "ParquetOptions", + "id": 7 + }, + "objectMetadataReportOptions": { + "type": "ObjectMetadataReportOptions", + "id": 8 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 10 + }, + "displayName": { + "type": "string", + "id": 11 + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ResourceProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + }, + "edition": { + "type": "string", + "id": 13 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REQUIRED": 2, + "LABEL_REPEATED": 3 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "phpGenericServices": { + "type": "bool", + "id": 42, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + } + } + }, + "OneofOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "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, + "go_package": "google.golang.org/genproto/googleapis/type/datetime;datetime", + "java_multiple_files": true, + "java_outer_classname": "DateTimeProto", + "java_package": "com.google.type", + "objc_class_prefix": "GTP" + }, + "nested": { + "Date": { + "fields": { + "year": { + "type": "int32", + "id": 1 + }, + "month": { + "type": "int32", + "id": 2 + }, + "day": { + "type": "int32", + "id": 3 + } + } + }, + "DateTime": { + "oneofs": { + "timeOffset": { + "oneof": [ + "utcOffset", + "timeZone" + ] + } + }, + "fields": { + "year": { + "type": "int32", + "id": 1 + }, + "month": { + "type": "int32", + "id": 2 + }, + "day": { + "type": "int32", + "id": 3 + }, + "hours": { + "type": "int32", + "id": 4 + }, + "minutes": { + "type": "int32", + "id": 5 + }, + "seconds": { + "type": "int32", + "id": 6 + }, + "nanos": { + "type": "int32", + "id": 7 + }, + "utcOffset": { + "type": "google.protobuf.Duration", + "id": 8 + }, + "timeZone": { + "type": "TimeZone", + "id": 9 + } + } + }, + "TimeZone": { + "fields": { + "id": { + "type": "string", + "id": 1 + }, + "version": { + "type": "string", + "id": 2 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/google-cloud-storageinsights/samples/README.md b/packages/google-cloud-storageinsights/samples/README.md new file mode 100644 index 00000000000..0233dcf8122 --- /dev/null +++ b/packages/google-cloud-storageinsights/samples/README.md @@ -0,0 +1,176 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [Storage Insights API: Node.js Samples](https://github.com/googleapis/google-cloud-node) + +[![Open in Cloud Shell][shell_img]][shell_link] + + + +## Table of Contents + +* [Before you begin](#before-you-begin) +* [Samples](#samples) + * [Storage_insights.create_report_config](#storage_insights.create_report_config) + * [Storage_insights.delete_report_config](#storage_insights.delete_report_config) + * [Storage_insights.get_report_config](#storage_insights.get_report_config) + * [Storage_insights.get_report_detail](#storage_insights.get_report_detail) + * [Storage_insights.list_report_configs](#storage_insights.list_report_configs) + * [Storage_insights.list_report_details](#storage_insights.list_report_details) + * [Storage_insights.update_report_config](#storage_insights.update_report_config) + * [Quickstart](#quickstart) + +## Before you begin + +Before running the samples, make sure you've followed the steps outlined in +[Using the client library](https://github.com/googleapis/google-cloud-node#using-the-client-library). + +`cd samples` + +`npm install` + +`cd ..` + +## Samples + + + +### Storage_insights.create_report_config + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.create_report_config.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.create_report_config.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.create_report_config.js` + + +----- + + + + +### Storage_insights.delete_report_config + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.delete_report_config.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.delete_report_config.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.delete_report_config.js` + + +----- + + + + +### Storage_insights.get_report_config + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.get_report_config.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.get_report_config.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.get_report_config.js` + + +----- + + + + +### Storage_insights.get_report_detail + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.get_report_detail.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.get_report_detail.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.get_report_detail.js` + + +----- + + + + +### Storage_insights.list_report_configs + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.list_report_configs.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.list_report_configs.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.list_report_configs.js` + + +----- + + + + +### Storage_insights.list_report_details + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.list_report_details.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.list_report_details.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.list_report_details.js` + + +----- + + + + +### Storage_insights.update_report_config + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.update_report_config.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.update_report_config.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.update_report_config.js` + + +----- + + + + +### Quickstart + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-storageinsights/samples/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-storageinsights/samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-storageinsights/samples/quickstart.js` + + + + + + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=samples/README.md +[product-docs]: https://cloud.google.com/storage/docs/insights/storage-insights diff --git a/packages/google-cloud-storageinsights/samples/generated/v1/snippet_metadata.google.cloud.storageinsights.v1.json b/packages/google-cloud-storageinsights/samples/generated/v1/snippet_metadata.google.cloud.storageinsights.v1.json new file mode 100644 index 00000000000..22bff0249bd --- /dev/null +++ b/packages/google-cloud-storageinsights/samples/generated/v1/snippet_metadata.google.cloud.storageinsights.v1.json @@ -0,0 +1,351 @@ +{ + "clientLibrary": { + "name": "nodejs-storageinsights", + "version": "0.1.1", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.storageinsights.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "storageinsights_v1_generated_StorageInsights_ListReportConfigs_async", + "title": "StorageInsights listReportConfigs Sample", + "origin": "API_DEFINITION", + "description": " Lists ReportConfigs in a given project and location.", + "canonical": true, + "file": "storage_insights.list_report_configs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListReportConfigs", + "fullName": "google.cloud.storageinsights.v1.StorageInsights.ListReportConfigs", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.storageinsights.v1.ListReportConfigsResponse", + "client": { + "shortName": "StorageInsightsClient", + "fullName": "google.cloud.storageinsights.v1.StorageInsightsClient" + }, + "method": { + "shortName": "ListReportConfigs", + "fullName": "google.cloud.storageinsights.v1.StorageInsights.ListReportConfigs", + "service": { + "shortName": "StorageInsights", + "fullName": "google.cloud.storageinsights.v1.StorageInsights" + } + } + } + }, + { + "regionTag": "storageinsights_v1_generated_StorageInsights_GetReportConfig_async", + "title": "StorageInsights getReportConfig Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single ReportConfig.", + "canonical": true, + "file": "storage_insights.get_report_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetReportConfig", + "fullName": "google.cloud.storageinsights.v1.StorageInsights.GetReportConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.storageinsights.v1.ReportConfig", + "client": { + "shortName": "StorageInsightsClient", + "fullName": "google.cloud.storageinsights.v1.StorageInsightsClient" + }, + "method": { + "shortName": "GetReportConfig", + "fullName": "google.cloud.storageinsights.v1.StorageInsights.GetReportConfig", + "service": { + "shortName": "StorageInsights", + "fullName": "google.cloud.storageinsights.v1.StorageInsights" + } + } + } + }, + { + "regionTag": "storageinsights_v1_generated_StorageInsights_CreateReportConfig_async", + "title": "StorageInsights createReportConfig Sample", + "origin": "API_DEFINITION", + "description": " Creates a new ReportConfig in a given project and location.", + "canonical": true, + "file": "storage_insights.create_report_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateReportConfig", + "fullName": "google.cloud.storageinsights.v1.StorageInsights.CreateReportConfig", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "report_config", + "type": ".google.cloud.storageinsights.v1.ReportConfig" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.storageinsights.v1.ReportConfig", + "client": { + "shortName": "StorageInsightsClient", + "fullName": "google.cloud.storageinsights.v1.StorageInsightsClient" + }, + "method": { + "shortName": "CreateReportConfig", + "fullName": "google.cloud.storageinsights.v1.StorageInsights.CreateReportConfig", + "service": { + "shortName": "StorageInsights", + "fullName": "google.cloud.storageinsights.v1.StorageInsights" + } + } + } + }, + { + "regionTag": "storageinsights_v1_generated_StorageInsights_UpdateReportConfig_async", + "title": "StorageInsights updateReportConfig Sample", + "origin": "API_DEFINITION", + "description": " Updates the parameters of a single ReportConfig.", + "canonical": true, + "file": "storage_insights.update_report_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateReportConfig", + "fullName": "google.cloud.storageinsights.v1.StorageInsights.UpdateReportConfig", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "report_config", + "type": ".google.cloud.storageinsights.v1.ReportConfig" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.storageinsights.v1.ReportConfig", + "client": { + "shortName": "StorageInsightsClient", + "fullName": "google.cloud.storageinsights.v1.StorageInsightsClient" + }, + "method": { + "shortName": "UpdateReportConfig", + "fullName": "google.cloud.storageinsights.v1.StorageInsights.UpdateReportConfig", + "service": { + "shortName": "StorageInsights", + "fullName": "google.cloud.storageinsights.v1.StorageInsights" + } + } + } + }, + { + "regionTag": "storageinsights_v1_generated_StorageInsights_DeleteReportConfig_async", + "title": "StorageInsights deleteReportConfig Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single ReportConfig.", + "canonical": true, + "file": "storage_insights.delete_report_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteReportConfig", + "fullName": "google.cloud.storageinsights.v1.StorageInsights.DeleteReportConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "StorageInsightsClient", + "fullName": "google.cloud.storageinsights.v1.StorageInsightsClient" + }, + "method": { + "shortName": "DeleteReportConfig", + "fullName": "google.cloud.storageinsights.v1.StorageInsights.DeleteReportConfig", + "service": { + "shortName": "StorageInsights", + "fullName": "google.cloud.storageinsights.v1.StorageInsights" + } + } + } + }, + { + "regionTag": "storageinsights_v1_generated_StorageInsights_ListReportDetails_async", + "title": "StorageInsights listReportDetails Sample", + "origin": "API_DEFINITION", + "description": " Lists ReportDetails in a given project and location.", + "canonical": true, + "file": "storage_insights.list_report_details.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListReportDetails", + "fullName": "google.cloud.storageinsights.v1.StorageInsights.ListReportDetails", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.storageinsights.v1.ListReportDetailsResponse", + "client": { + "shortName": "StorageInsightsClient", + "fullName": "google.cloud.storageinsights.v1.StorageInsightsClient" + }, + "method": { + "shortName": "ListReportDetails", + "fullName": "google.cloud.storageinsights.v1.StorageInsights.ListReportDetails", + "service": { + "shortName": "StorageInsights", + "fullName": "google.cloud.storageinsights.v1.StorageInsights" + } + } + } + }, + { + "regionTag": "storageinsights_v1_generated_StorageInsights_GetReportDetail_async", + "title": "StorageInsights getReportDetail Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single ReportDetail.", + "canonical": true, + "file": "storage_insights.get_report_detail.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetReportDetail", + "fullName": "google.cloud.storageinsights.v1.StorageInsights.GetReportDetail", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.storageinsights.v1.ReportDetail", + "client": { + "shortName": "StorageInsightsClient", + "fullName": "google.cloud.storageinsights.v1.StorageInsightsClient" + }, + "method": { + "shortName": "GetReportDetail", + "fullName": "google.cloud.storageinsights.v1.StorageInsights.GetReportDetail", + "service": { + "shortName": "StorageInsights", + "fullName": "google.cloud.storageinsights.v1.StorageInsights" + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.create_report_config.js b/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.create_report_config.js new file mode 100644 index 00000000000..a7552e690f4 --- /dev/null +++ b/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.create_report_config.js @@ -0,0 +1,80 @@ +// Copyright 2023 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, reportConfig) { + // [START storageinsights_v1_generated_StorageInsights_CreateReportConfig_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. Value for parent. + */ + // const parent = 'abc123' + /** + * Required. The resource being created + */ + // const reportConfig = {} + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Storageinsights library + const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1; + + // Instantiates a client + const storageinsightsClient = new StorageInsightsClient(); + + async function callCreateReportConfig() { + // Construct request + const request = { + parent, + reportConfig, + }; + + // Run request + const response = await storageinsightsClient.createReportConfig(request); + console.log(response); + } + + callCreateReportConfig(); + // [END storageinsights_v1_generated_StorageInsights_CreateReportConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.delete_report_config.js b/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.delete_report_config.js new file mode 100644 index 00000000000..a3f58e1c2e0 --- /dev/null +++ b/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.delete_report_config.js @@ -0,0 +1,79 @@ +// Copyright 2023 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 storageinsights_v1_generated_StorageInsights_DeleteReportConfig_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. Name of the resource + */ + // const name = 'abc123' + /** + * Optional. If set, all ReportDetails for this ReportConfig will be deleted. + */ + // const force = true + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Storageinsights library + const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1; + + // Instantiates a client + const storageinsightsClient = new StorageInsightsClient(); + + async function callDeleteReportConfig() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await storageinsightsClient.deleteReportConfig(request); + console.log(response); + } + + callDeleteReportConfig(); + // [END storageinsights_v1_generated_StorageInsights_DeleteReportConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.get_report_config.js b/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.get_report_config.js new file mode 100644 index 00000000000..7382b610354 --- /dev/null +++ b/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.get_report_config.js @@ -0,0 +1,61 @@ +// Copyright 2023 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 storageinsights_v1_generated_StorageInsights_GetReportConfig_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. Name of the resource + */ + // const name = 'abc123' + + // Imports the Storageinsights library + const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1; + + // Instantiates a client + const storageinsightsClient = new StorageInsightsClient(); + + async function callGetReportConfig() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await storageinsightsClient.getReportConfig(request); + console.log(response); + } + + callGetReportConfig(); + // [END storageinsights_v1_generated_StorageInsights_GetReportConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.get_report_detail.js b/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.get_report_detail.js new file mode 100644 index 00000000000..0a06ab614c2 --- /dev/null +++ b/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.get_report_detail.js @@ -0,0 +1,61 @@ +// Copyright 2023 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 storageinsights_v1_generated_StorageInsights_GetReportDetail_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. Name of the resource + */ + // const name = 'abc123' + + // Imports the Storageinsights library + const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1; + + // Instantiates a client + const storageinsightsClient = new StorageInsightsClient(); + + async function callGetReportDetail() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await storageinsightsClient.getReportDetail(request); + console.log(response); + } + + callGetReportDetail(); + // [END storageinsights_v1_generated_StorageInsights_GetReportDetail_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.list_report_configs.js b/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.list_report_configs.js new file mode 100644 index 00000000000..f2b91658576 --- /dev/null +++ b/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.list_report_configs.js @@ -0,0 +1,80 @@ +// Copyright 2023 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 storageinsights_v1_generated_StorageInsights_ListReportConfigs_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. Parent value for ListReportConfigsRequest + */ + // const parent = 'abc123' + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Filtering results + */ + // const filter = 'abc123' + /** + * Hint for how to order the results + */ + // const orderBy = 'abc123' + + // Imports the Storageinsights library + const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1; + + // Instantiates a client + const storageinsightsClient = new StorageInsightsClient(); + + async function callListReportConfigs() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await storageinsightsClient.listReportConfigsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListReportConfigs(); + // [END storageinsights_v1_generated_StorageInsights_ListReportConfigs_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.list_report_details.js b/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.list_report_details.js new file mode 100644 index 00000000000..3cd0547c493 --- /dev/null +++ b/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.list_report_details.js @@ -0,0 +1,80 @@ +// Copyright 2023 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 storageinsights_v1_generated_StorageInsights_ListReportDetails_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. Parent value for ListReportDetailsRequest + */ + // const parent = 'abc123' + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Filtering results + */ + // const filter = 'abc123' + /** + * Hint for how to order the results + */ + // const orderBy = 'abc123' + + // Imports the Storageinsights library + const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1; + + // Instantiates a client + const storageinsightsClient = new StorageInsightsClient(); + + async function callListReportDetails() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await storageinsightsClient.listReportDetailsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListReportDetails(); + // [END storageinsights_v1_generated_StorageInsights_ListReportDetails_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.update_report_config.js b/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.update_report_config.js new file mode 100644 index 00000000000..f1b1fb8d819 --- /dev/null +++ b/packages/google-cloud-storageinsights/samples/generated/v1/storage_insights.update_report_config.js @@ -0,0 +1,84 @@ +// Copyright 2023 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(updateMask, reportConfig) { + // [START storageinsights_v1_generated_StorageInsights_UpdateReportConfig_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. Field mask is used to specify the fields to be overwritten in the + * ReportConfig resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + */ + // const updateMask = {} + /** + * Required. The resource being updated + */ + // const reportConfig = {} + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Storageinsights library + const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1; + + // Instantiates a client + const storageinsightsClient = new StorageInsightsClient(); + + async function callUpdateReportConfig() { + // Construct request + const request = { + updateMask, + reportConfig, + }; + + // Run request + const response = await storageinsightsClient.updateReportConfig(request); + console.log(response); + } + + callUpdateReportConfig(); + // [END storageinsights_v1_generated_StorageInsights_UpdateReportConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-storageinsights/samples/package.json b/packages/google-cloud-storageinsights/samples/package.json new file mode 100644 index 00000000000..46c22572068 --- /dev/null +++ b/packages/google-cloud-storageinsights/samples/package.json @@ -0,0 +1,24 @@ +{ + "name": "storageinsights-samples", + "private": true, + "license": "Apache-2.0", + "author": "Google LLC", + "engines": { + "node": ">=12.0.0" + }, + "files": [ + "*.js" + ], + "scripts": { + "test": "c8 mocha --timeout 600000 test/*.js", + "publish": "echo 'sample test; do not publish'" + }, + "dependencies": { + "@google-cloud/storageinsights": "^0.1.1" + }, + "devDependencies": { + "c8": "^7.1.0", + "chai": "^4.2.0", + "mocha": "^8.0.0" + } +} diff --git a/packages/google-cloud-storageinsights/samples/quickstart.js b/packages/google-cloud-storageinsights/samples/quickstart.js new file mode 100644 index 00000000000..9e8745bcff0 --- /dev/null +++ b/packages/google-cloud-storageinsights/samples/quickstart.js @@ -0,0 +1,80 @@ +// Copyright 2023 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 storageinsights_quickstart] + /** + * 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. Parent value for ListReportConfigsRequest + */ + // const parent = 'abc123' + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Filtering results + */ + // const filter = 'abc123' + /** + * Hint for how to order the results + */ + // const orderBy = 'abc123' + + // Imports the Storageinsights library + const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1; + + // Instantiates a client + const storageinsightsClient = new StorageInsightsClient(); + + async function callListReportConfigs() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await storageinsightsClient.listReportConfigsAsync( + request + ); + for await (const response of iterable) { + console.log(response); + } + } + + callListReportConfigs(); + // [END storageinsights_quickstart] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-storageinsights/samples/test/quickstart.js b/packages/google-cloud-storageinsights/samples/test/quickstart.js new file mode 100644 index 00000000000..76394bcaf56 --- /dev/null +++ b/packages/google-cloud-storageinsights/samples/test/quickstart.js @@ -0,0 +1,42 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +const assert = require('assert'); +const path = require('path'); +const cp = require('child_process'); +const {describe, it, before} = require('mocha'); +const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1; +const storageinsightsClient = new StorageInsightsClient(); + +const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); + +const cwd = path.join(__dirname, '..'); + +describe('Quickstart', () => { + let projectId; + + before(async () => { + projectId = await storageinsightsClient.getProjectId(); + }); + + it('should run quickstart', async () => { + const output = execSync( + `node ./quickstart.js projects/${projectId}/locations/us-central1`, + {cwd} + ); + assert(output !== null); + }); +}); diff --git a/packages/google-cloud-storageinsights/src/index.ts b/packages/google-cloud-storageinsights/src/index.ts new file mode 100644 index 00000000000..fea82e12201 --- /dev/null +++ b/packages/google-cloud-storageinsights/src/index.ts @@ -0,0 +1,27 @@ +// Copyright 2023 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 synthtool. ** +// ** https://github.com/googleapis/synthtool ** +// ** All changes to this file may be overwritten. ** + +import * as v1 from './v1'; + +const StorageInsightsClient = v1.StorageInsightsClient; +type StorageInsightsClient = v1.StorageInsightsClient; + +export {v1, StorageInsightsClient}; +export default {v1, StorageInsightsClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/packages/google-cloud-storageinsights/src/v1/gapic_metadata.json b/packages/google-cloud-storageinsights/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..7c47b79cb35 --- /dev/null +++ b/packages/google-cloud-storageinsights/src/v1/gapic_metadata.json @@ -0,0 +1,101 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.storageinsights.v1", + "libraryPackage": "@google-cloud/storageinsights", + "services": { + "StorageInsights": { + "clients": { + "grpc": { + "libraryClient": "StorageInsightsClient", + "rpcs": { + "GetReportConfig": { + "methods": [ + "getReportConfig" + ] + }, + "CreateReportConfig": { + "methods": [ + "createReportConfig" + ] + }, + "UpdateReportConfig": { + "methods": [ + "updateReportConfig" + ] + }, + "DeleteReportConfig": { + "methods": [ + "deleteReportConfig" + ] + }, + "GetReportDetail": { + "methods": [ + "getReportDetail" + ] + }, + "ListReportConfigs": { + "methods": [ + "listReportConfigs", + "listReportConfigsStream", + "listReportConfigsAsync" + ] + }, + "ListReportDetails": { + "methods": [ + "listReportDetails", + "listReportDetailsStream", + "listReportDetailsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "StorageInsightsClient", + "rpcs": { + "GetReportConfig": { + "methods": [ + "getReportConfig" + ] + }, + "CreateReportConfig": { + "methods": [ + "createReportConfig" + ] + }, + "UpdateReportConfig": { + "methods": [ + "updateReportConfig" + ] + }, + "DeleteReportConfig": { + "methods": [ + "deleteReportConfig" + ] + }, + "GetReportDetail": { + "methods": [ + "getReportDetail" + ] + }, + "ListReportConfigs": { + "methods": [ + "listReportConfigs", + "listReportConfigsStream", + "listReportConfigsAsync" + ] + }, + "ListReportDetails": { + "methods": [ + "listReportDetails", + "listReportDetailsStream", + "listReportDetailsAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-storageinsights/src/v1/index.ts b/packages/google-cloud-storageinsights/src/v1/index.ts new file mode 100644 index 00000000000..5adccc5a240 --- /dev/null +++ b/packages/google-cloud-storageinsights/src/v1/index.ts @@ -0,0 +1,19 @@ +// Copyright 2023 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. ** + +export {StorageInsightsClient} from './storage_insights_client'; diff --git a/packages/google-cloud-storageinsights/src/v1/storage_insights_client.ts b/packages/google-cloud-storageinsights/src/v1/storage_insights_client.ts new file mode 100644 index 00000000000..add36db95eb --- /dev/null +++ b/packages/google-cloud-storageinsights/src/v1/storage_insights_client.ts @@ -0,0 +1,1586 @@ +// Copyright 2023 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, + LocationsClient, + LocationProtos, +} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1/storage_insights_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './storage_insights_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service describing handlers for resources + * @class + * @memberof v1 + */ +export class StorageInsightsClient { + 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}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + storageInsightsStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of StorageInsightsClient. + * + * @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://developers.google.com/identity/protocols/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 | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * 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 StorageInsightsClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof StorageInsightsClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.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 !== staticMembers.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 = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && '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 if (opts.fallback === 'rest') { + 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 = { + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + reportConfigPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/reportConfigs/{report_config}' + ), + reportDetailPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/reportConfigs/{report_config}/reportDetails/{report_detail}' + ), + }; + + // 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 = { + listReportConfigs: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'reportConfigs' + ), + listReportDetails: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'reportDetails' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.storageinsights.v1.StorageInsights', + 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.storageInsightsStub) { + return this.storageInsightsStub; + } + + // Put together the "service stub" for + // google.cloud.storageinsights.v1.StorageInsights. + this.storageInsightsStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.storageinsights.v1.StorageInsights' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.storageinsights.v1.StorageInsights, + 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 storageInsightsStubMethods = [ + 'listReportConfigs', + 'getReportConfig', + 'createReportConfig', + 'updateReportConfig', + 'deleteReportConfig', + 'listReportDetails', + 'getReportDetail', + ]; + for (const methodName of storageInsightsStubMethods) { + const callPromise = this.storageInsightsStub.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.storageInsightsStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'storageinsights.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'storageinsights.googleapis.com'; + } + + /** + * 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/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 -- + // ------------------- + /** + * Gets details of a single ReportConfig. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource + * @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 google.cloud.storageinsights.v1.ReportConfig | ReportConfig}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/storage_insights.get_report_config.js + * region_tag:storageinsights_v1_generated_StorageInsights_GetReportConfig_async + */ + getReportConfig( + request?: protos.google.cloud.storageinsights.v1.IGetReportConfigRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.storageinsights.v1.IReportConfig, + ( + | protos.google.cloud.storageinsights.v1.IGetReportConfigRequest + | undefined + ), + {} | undefined + ] + >; + getReportConfig( + request: protos.google.cloud.storageinsights.v1.IGetReportConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.storageinsights.v1.IReportConfig, + | protos.google.cloud.storageinsights.v1.IGetReportConfigRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getReportConfig( + request: protos.google.cloud.storageinsights.v1.IGetReportConfigRequest, + callback: Callback< + protos.google.cloud.storageinsights.v1.IReportConfig, + | protos.google.cloud.storageinsights.v1.IGetReportConfigRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getReportConfig( + request?: protos.google.cloud.storageinsights.v1.IGetReportConfigRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.storageinsights.v1.IReportConfig, + | protos.google.cloud.storageinsights.v1.IGetReportConfigRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.storageinsights.v1.IReportConfig, + | protos.google.cloud.storageinsights.v1.IGetReportConfigRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.storageinsights.v1.IReportConfig, + ( + | protos.google.cloud.storageinsights.v1.IGetReportConfigRequest + | 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(); + return this.innerApiCalls.getReportConfig(request, options, callback); + } + /** + * Creates a new ReportConfig in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Value for parent. + * @param {google.cloud.storageinsights.v1.ReportConfig} request.reportConfig + * Required. The resource being created + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 google.cloud.storageinsights.v1.ReportConfig | ReportConfig}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/storage_insights.create_report_config.js + * region_tag:storageinsights_v1_generated_StorageInsights_CreateReportConfig_async + */ + createReportConfig( + request?: protos.google.cloud.storageinsights.v1.ICreateReportConfigRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.storageinsights.v1.IReportConfig, + ( + | protos.google.cloud.storageinsights.v1.ICreateReportConfigRequest + | undefined + ), + {} | undefined + ] + >; + createReportConfig( + request: protos.google.cloud.storageinsights.v1.ICreateReportConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.storageinsights.v1.IReportConfig, + | protos.google.cloud.storageinsights.v1.ICreateReportConfigRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createReportConfig( + request: protos.google.cloud.storageinsights.v1.ICreateReportConfigRequest, + callback: Callback< + protos.google.cloud.storageinsights.v1.IReportConfig, + | protos.google.cloud.storageinsights.v1.ICreateReportConfigRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createReportConfig( + request?: protos.google.cloud.storageinsights.v1.ICreateReportConfigRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.storageinsights.v1.IReportConfig, + | protos.google.cloud.storageinsights.v1.ICreateReportConfigRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.storageinsights.v1.IReportConfig, + | protos.google.cloud.storageinsights.v1.ICreateReportConfigRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.storageinsights.v1.IReportConfig, + ( + | protos.google.cloud.storageinsights.v1.ICreateReportConfigRequest + | 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(); + return this.innerApiCalls.createReportConfig(request, options, callback); + } + /** + * Updates the parameters of a single ReportConfig. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask is used to specify the fields to be overwritten in the + * ReportConfig resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @param {google.cloud.storageinsights.v1.ReportConfig} request.reportConfig + * Required. The resource being updated + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 google.cloud.storageinsights.v1.ReportConfig | ReportConfig}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/storage_insights.update_report_config.js + * region_tag:storageinsights_v1_generated_StorageInsights_UpdateReportConfig_async + */ + updateReportConfig( + request?: protos.google.cloud.storageinsights.v1.IUpdateReportConfigRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.storageinsights.v1.IReportConfig, + ( + | protos.google.cloud.storageinsights.v1.IUpdateReportConfigRequest + | undefined + ), + {} | undefined + ] + >; + updateReportConfig( + request: protos.google.cloud.storageinsights.v1.IUpdateReportConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.storageinsights.v1.IReportConfig, + | protos.google.cloud.storageinsights.v1.IUpdateReportConfigRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateReportConfig( + request: protos.google.cloud.storageinsights.v1.IUpdateReportConfigRequest, + callback: Callback< + protos.google.cloud.storageinsights.v1.IReportConfig, + | protos.google.cloud.storageinsights.v1.IUpdateReportConfigRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateReportConfig( + request?: protos.google.cloud.storageinsights.v1.IUpdateReportConfigRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.storageinsights.v1.IReportConfig, + | protos.google.cloud.storageinsights.v1.IUpdateReportConfigRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.storageinsights.v1.IReportConfig, + | protos.google.cloud.storageinsights.v1.IUpdateReportConfigRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.storageinsights.v1.IReportConfig, + ( + | protos.google.cloud.storageinsights.v1.IUpdateReportConfigRequest + | 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({ + 'report_config.name': request.reportConfig!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateReportConfig(request, options, callback); + } + /** + * Deletes a single ReportConfig. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource + * @param {boolean} [request.force] + * Optional. If set, all ReportDetails for this ReportConfig will be deleted. + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 google.protobuf.Empty | Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/storage_insights.delete_report_config.js + * region_tag:storageinsights_v1_generated_StorageInsights_DeleteReportConfig_async + */ + deleteReportConfig( + request?: protos.google.cloud.storageinsights.v1.IDeleteReportConfigRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.storageinsights.v1.IDeleteReportConfigRequest + | undefined + ), + {} | undefined + ] + >; + deleteReportConfig( + request: protos.google.cloud.storageinsights.v1.IDeleteReportConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.storageinsights.v1.IDeleteReportConfigRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteReportConfig( + request: protos.google.cloud.storageinsights.v1.IDeleteReportConfigRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.storageinsights.v1.IDeleteReportConfigRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteReportConfig( + request?: protos.google.cloud.storageinsights.v1.IDeleteReportConfigRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.storageinsights.v1.IDeleteReportConfigRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.storageinsights.v1.IDeleteReportConfigRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.storageinsights.v1.IDeleteReportConfigRequest + | 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(); + return this.innerApiCalls.deleteReportConfig(request, options, callback); + } + /** + * Gets details of a single ReportDetail. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource + * @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 google.cloud.storageinsights.v1.ReportDetail | ReportDetail}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/storage_insights.get_report_detail.js + * region_tag:storageinsights_v1_generated_StorageInsights_GetReportDetail_async + */ + getReportDetail( + request?: protos.google.cloud.storageinsights.v1.IGetReportDetailRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.storageinsights.v1.IReportDetail, + ( + | protos.google.cloud.storageinsights.v1.IGetReportDetailRequest + | undefined + ), + {} | undefined + ] + >; + getReportDetail( + request: protos.google.cloud.storageinsights.v1.IGetReportDetailRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.storageinsights.v1.IReportDetail, + | protos.google.cloud.storageinsights.v1.IGetReportDetailRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getReportDetail( + request: protos.google.cloud.storageinsights.v1.IGetReportDetailRequest, + callback: Callback< + protos.google.cloud.storageinsights.v1.IReportDetail, + | protos.google.cloud.storageinsights.v1.IGetReportDetailRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getReportDetail( + request?: protos.google.cloud.storageinsights.v1.IGetReportDetailRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.storageinsights.v1.IReportDetail, + | protos.google.cloud.storageinsights.v1.IGetReportDetailRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.storageinsights.v1.IReportDetail, + | protos.google.cloud.storageinsights.v1.IGetReportDetailRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.storageinsights.v1.IReportDetail, + ( + | protos.google.cloud.storageinsights.v1.IGetReportDetailRequest + | 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(); + return this.innerApiCalls.getReportDetail(request, options, callback); + } + + /** + * Lists ReportConfigs in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListReportConfigsRequest + * @param {number} request.pageSize + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @param {string} request.pageToken + * A token identifying a page of results the server should return. + * @param {string} request.filter + * Filtering results + * @param {string} request.orderBy + * Hint for how to order the results + * @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 google.cloud.storageinsights.v1.ReportConfig | ReportConfig}. + * 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 `listReportConfigsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listReportConfigs( + request?: protos.google.cloud.storageinsights.v1.IListReportConfigsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.storageinsights.v1.IReportConfig[], + protos.google.cloud.storageinsights.v1.IListReportConfigsRequest | null, + protos.google.cloud.storageinsights.v1.IListReportConfigsResponse + ] + >; + listReportConfigs( + request: protos.google.cloud.storageinsights.v1.IListReportConfigsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.storageinsights.v1.IListReportConfigsRequest, + | protos.google.cloud.storageinsights.v1.IListReportConfigsResponse + | null + | undefined, + protos.google.cloud.storageinsights.v1.IReportConfig + > + ): void; + listReportConfigs( + request: protos.google.cloud.storageinsights.v1.IListReportConfigsRequest, + callback: PaginationCallback< + protos.google.cloud.storageinsights.v1.IListReportConfigsRequest, + | protos.google.cloud.storageinsights.v1.IListReportConfigsResponse + | null + | undefined, + protos.google.cloud.storageinsights.v1.IReportConfig + > + ): void; + listReportConfigs( + request?: protos.google.cloud.storageinsights.v1.IListReportConfigsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.storageinsights.v1.IListReportConfigsRequest, + | protos.google.cloud.storageinsights.v1.IListReportConfigsResponse + | null + | undefined, + protos.google.cloud.storageinsights.v1.IReportConfig + >, + callback?: PaginationCallback< + protos.google.cloud.storageinsights.v1.IListReportConfigsRequest, + | protos.google.cloud.storageinsights.v1.IListReportConfigsResponse + | null + | undefined, + protos.google.cloud.storageinsights.v1.IReportConfig + > + ): Promise< + [ + protos.google.cloud.storageinsights.v1.IReportConfig[], + protos.google.cloud.storageinsights.v1.IListReportConfigsRequest | null, + protos.google.cloud.storageinsights.v1.IListReportConfigsResponse + ] + > | 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(); + return this.innerApiCalls.listReportConfigs(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListReportConfigsRequest + * @param {number} request.pageSize + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @param {string} request.pageToken + * A token identifying a page of results the server should return. + * @param {string} request.filter + * Filtering results + * @param {string} request.orderBy + * Hint for how to order the results + * @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 google.cloud.storageinsights.v1.ReportConfig | ReportConfig} 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 `listReportConfigsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listReportConfigsStream( + request?: protos.google.cloud.storageinsights.v1.IListReportConfigsRequest, + 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['listReportConfigs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listReportConfigs.createStream( + this.innerApiCalls.listReportConfigs as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listReportConfigs`, 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. Parent value for ListReportConfigsRequest + * @param {number} request.pageSize + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @param {string} request.pageToken + * A token identifying a page of results the server should return. + * @param {string} request.filter + * Filtering results + * @param {string} request.orderBy + * Hint for how to order the results + * @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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.storageinsights.v1.ReportConfig | ReportConfig}. 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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/storage_insights.list_report_configs.js + * region_tag:storageinsights_v1_generated_StorageInsights_ListReportConfigs_async + */ + listReportConfigsAsync( + request?: protos.google.cloud.storageinsights.v1.IListReportConfigsRequest, + 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['listReportConfigs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listReportConfigs.asyncIterate( + this.innerApiCalls['listReportConfigs'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists ReportDetails in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListReportDetailsRequest + * @param {number} request.pageSize + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @param {string} request.pageToken + * A token identifying a page of results the server should return. + * @param {string} request.filter + * Filtering results + * @param {string} request.orderBy + * Hint for how to order the results + * @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 google.cloud.storageinsights.v1.ReportDetail | ReportDetail}. + * 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 `listReportDetailsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listReportDetails( + request?: protos.google.cloud.storageinsights.v1.IListReportDetailsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.storageinsights.v1.IReportDetail[], + protos.google.cloud.storageinsights.v1.IListReportDetailsRequest | null, + protos.google.cloud.storageinsights.v1.IListReportDetailsResponse + ] + >; + listReportDetails( + request: protos.google.cloud.storageinsights.v1.IListReportDetailsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.storageinsights.v1.IListReportDetailsRequest, + | protos.google.cloud.storageinsights.v1.IListReportDetailsResponse + | null + | undefined, + protos.google.cloud.storageinsights.v1.IReportDetail + > + ): void; + listReportDetails( + request: protos.google.cloud.storageinsights.v1.IListReportDetailsRequest, + callback: PaginationCallback< + protos.google.cloud.storageinsights.v1.IListReportDetailsRequest, + | protos.google.cloud.storageinsights.v1.IListReportDetailsResponse + | null + | undefined, + protos.google.cloud.storageinsights.v1.IReportDetail + > + ): void; + listReportDetails( + request?: protos.google.cloud.storageinsights.v1.IListReportDetailsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.storageinsights.v1.IListReportDetailsRequest, + | protos.google.cloud.storageinsights.v1.IListReportDetailsResponse + | null + | undefined, + protos.google.cloud.storageinsights.v1.IReportDetail + >, + callback?: PaginationCallback< + protos.google.cloud.storageinsights.v1.IListReportDetailsRequest, + | protos.google.cloud.storageinsights.v1.IListReportDetailsResponse + | null + | undefined, + protos.google.cloud.storageinsights.v1.IReportDetail + > + ): Promise< + [ + protos.google.cloud.storageinsights.v1.IReportDetail[], + protos.google.cloud.storageinsights.v1.IListReportDetailsRequest | null, + protos.google.cloud.storageinsights.v1.IListReportDetailsResponse + ] + > | 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(); + return this.innerApiCalls.listReportDetails(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListReportDetailsRequest + * @param {number} request.pageSize + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @param {string} request.pageToken + * A token identifying a page of results the server should return. + * @param {string} request.filter + * Filtering results + * @param {string} request.orderBy + * Hint for how to order the results + * @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 google.cloud.storageinsights.v1.ReportDetail | ReportDetail} 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 `listReportDetailsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listReportDetailsStream( + request?: protos.google.cloud.storageinsights.v1.IListReportDetailsRequest, + 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['listReportDetails']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listReportDetails.createStream( + this.innerApiCalls.listReportDetails as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listReportDetails`, 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. Parent value for ListReportDetailsRequest + * @param {number} request.pageSize + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @param {string} request.pageToken + * A token identifying a page of results the server should return. + * @param {string} request.filter + * Filtering results + * @param {string} request.orderBy + * Hint for how to order the results + * @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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.storageinsights.v1.ReportDetail | ReportDetail}. 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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1/storage_insights.list_report_details.js + * region_tag:storageinsights_v1_generated_StorageInsights_ListReportDetails_async + */ + listReportDetailsAsync( + request?: protos.google.cloud.storageinsights.v1.IListReportDetailsRequest, + 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['listReportDetails']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listReportDetails.asyncIterate( + this.innerApiCalls['listReportDetails'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @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 google.cloud.location.Location | Location}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + + /** + * Lists information about the supported locations for this service. 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.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list 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} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.Location | Location}. 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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * 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 reportConfig resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} report_config + * @returns {string} Resource name string. + */ + reportConfigPath(project: string, location: string, reportConfig: string) { + return this.pathTemplates.reportConfigPathTemplate.render({ + project: project, + location: location, + report_config: reportConfig, + }); + } + + /** + * Parse the project from ReportConfig resource. + * + * @param {string} reportConfigName + * A fully-qualified path representing ReportConfig resource. + * @returns {string} A string representing the project. + */ + matchProjectFromReportConfigName(reportConfigName: string) { + return this.pathTemplates.reportConfigPathTemplate.match(reportConfigName) + .project; + } + + /** + * Parse the location from ReportConfig resource. + * + * @param {string} reportConfigName + * A fully-qualified path representing ReportConfig resource. + * @returns {string} A string representing the location. + */ + matchLocationFromReportConfigName(reportConfigName: string) { + return this.pathTemplates.reportConfigPathTemplate.match(reportConfigName) + .location; + } + + /** + * Parse the report_config from ReportConfig resource. + * + * @param {string} reportConfigName + * A fully-qualified path representing ReportConfig resource. + * @returns {string} A string representing the report_config. + */ + matchReportConfigFromReportConfigName(reportConfigName: string) { + return this.pathTemplates.reportConfigPathTemplate.match(reportConfigName) + .report_config; + } + + /** + * Return a fully-qualified reportDetail resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} report_config + * @param {string} report_detail + * @returns {string} Resource name string. + */ + reportDetailPath( + project: string, + location: string, + reportConfig: string, + reportDetail: string + ) { + return this.pathTemplates.reportDetailPathTemplate.render({ + project: project, + location: location, + report_config: reportConfig, + report_detail: reportDetail, + }); + } + + /** + * Parse the project from ReportDetail resource. + * + * @param {string} reportDetailName + * A fully-qualified path representing ReportDetail resource. + * @returns {string} A string representing the project. + */ + matchProjectFromReportDetailName(reportDetailName: string) { + return this.pathTemplates.reportDetailPathTemplate.match(reportDetailName) + .project; + } + + /** + * Parse the location from ReportDetail resource. + * + * @param {string} reportDetailName + * A fully-qualified path representing ReportDetail resource. + * @returns {string} A string representing the location. + */ + matchLocationFromReportDetailName(reportDetailName: string) { + return this.pathTemplates.reportDetailPathTemplate.match(reportDetailName) + .location; + } + + /** + * Parse the report_config from ReportDetail resource. + * + * @param {string} reportDetailName + * A fully-qualified path representing ReportDetail resource. + * @returns {string} A string representing the report_config. + */ + matchReportConfigFromReportDetailName(reportDetailName: string) { + return this.pathTemplates.reportDetailPathTemplate.match(reportDetailName) + .report_config; + } + + /** + * Parse the report_detail from ReportDetail resource. + * + * @param {string} reportDetailName + * A fully-qualified path representing ReportDetail resource. + * @returns {string} A string representing the report_detail. + */ + matchReportDetailFromReportDetailName(reportDetailName: string) { + return this.pathTemplates.reportDetailPathTemplate.match(reportDetailName) + .report_detail; + } + + /** + * 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.storageInsightsStub && !this._terminated) { + return this.storageInsightsStub.then(stub => { + this._terminated = true; + stub.close(); + this.locationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-storageinsights/src/v1/storage_insights_client_config.json b/packages/google-cloud-storageinsights/src/v1/storage_insights_client_config.json new file mode 100644 index 00000000000..c46fa5920f0 --- /dev/null +++ b/packages/google-cloud-storageinsights/src/v1/storage_insights_client_config.json @@ -0,0 +1,73 @@ +{ + "interfaces": { + "google.cloud.storageinsights.v1.StorageInsights": { + "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": { + "ListReportConfigs": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetReportConfig": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateReportConfig": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateReportConfig": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteReportConfig": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListReportDetails": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetReportDetail": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + } + } + } + } +} diff --git a/packages/google-cloud-storageinsights/src/v1/storage_insights_proto_list.json b/packages/google-cloud-storageinsights/src/v1/storage_insights_proto_list.json new file mode 100644 index 00000000000..e04f64ac580 --- /dev/null +++ b/packages/google-cloud-storageinsights/src/v1/storage_insights_proto_list.json @@ -0,0 +1,3 @@ +[ + "../../protos/google/cloud/storageinsights/v1/storageinsights.proto" +] diff --git a/packages/google-cloud-storageinsights/system-test/fixtures/sample/src/index.js b/packages/google-cloud-storageinsights/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..949345e5c1a --- /dev/null +++ b/packages/google-cloud-storageinsights/system-test/fixtures/sample/src/index.js @@ -0,0 +1,26 @@ +// Copyright 2023 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. ** + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const storageinsights = require('@google-cloud/storageinsights'); + +function main() { + const storageInsightsClient = new storageinsights.StorageInsightsClient(); +} + +main(); diff --git a/packages/google-cloud-storageinsights/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-storageinsights/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..7b783317d5a --- /dev/null +++ b/packages/google-cloud-storageinsights/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,32 @@ +// Copyright 2023 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 {StorageInsightsClient} from '@google-cloud/storageinsights'; + +// check that the client class type name can be used +function doStuffWithStorageInsightsClient(client: StorageInsightsClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const storageInsightsClient = new StorageInsightsClient(); + doStuffWithStorageInsightsClient(storageInsightsClient); +} + +main(); diff --git a/packages/google-cloud-storageinsights/system-test/install.ts b/packages/google-cloud-storageinsights/system-test/install.ts new file mode 100644 index 00000000000..f61fe236476 --- /dev/null +++ b/packages/google-cloud-storageinsights/system-test/install.ts @@ -0,0 +1,51 @@ +// Copyright 2023 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 {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + it('TypeScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync( + './system-test/fixtures/sample/src/index.ts' + ).toString(), + }, + }; + await packNTest(options); + }); + + it('JavaScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync( + './system-test/fixtures/sample/src/index.js' + ).toString(), + }, + }; + await packNTest(options); + }); +}); diff --git a/packages/google-cloud-storageinsights/test/gapic_storage_insights_v1.ts b/packages/google-cloud-storageinsights/test/gapic_storage_insights_v1.ts new file mode 100644 index 00000000000..9b2ef7d7230 --- /dev/null +++ b/packages/google-cloud-storageinsights/test/gapic_storage_insights_v1.ts @@ -0,0 +1,1975 @@ +// Copyright 2023 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 storageinsightsModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LocationProtos} 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.StorageInsightsClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + storageinsightsModule.v1.StorageInsightsClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + storageinsightsModule.v1.StorageInsightsClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = storageinsightsModule.v1.StorageInsightsClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new storageinsightsModule.v1.StorageInsightsClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.storageInsightsStub, undefined); + await client.initialize(); + assert(client.storageInsightsStub); + }); + + it('has close method for the initialized client', done => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.storageInsightsStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.storageInsightsStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new storageinsightsModule.v1.StorageInsightsClient({ + 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 storageinsightsModule.v1.StorageInsightsClient({ + 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('getReportConfig', () => { + it('invokes getReportConfig without error', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.GetReportConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.storageinsights.v1.GetReportConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ReportConfig() + ); + client.innerApiCalls.getReportConfig = stubSimpleCall(expectedResponse); + const [response] = await client.getReportConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getReportConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getReportConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getReportConfig without error using callback', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.GetReportConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.storageinsights.v1.GetReportConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ReportConfig() + ); + client.innerApiCalls.getReportConfig = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getReportConfig( + request, + ( + err?: Error | null, + result?: protos.google.cloud.storageinsights.v1.IReportConfig | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getReportConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getReportConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getReportConfig with error', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.GetReportConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.storageinsights.v1.GetReportConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getReportConfig = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getReportConfig(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getReportConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getReportConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getReportConfig with closed client', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.GetReportConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.storageinsights.v1.GetReportConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getReportConfig(request), expectedError); + }); + }); + + describe('createReportConfig', () => { + it('invokes createReportConfig without error', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.CreateReportConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.storageinsights.v1.CreateReportConfigRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ReportConfig() + ); + client.innerApiCalls.createReportConfig = + stubSimpleCall(expectedResponse); + const [response] = await client.createReportConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createReportConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createReportConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createReportConfig without error using callback', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.CreateReportConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.storageinsights.v1.CreateReportConfigRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ReportConfig() + ); + client.innerApiCalls.createReportConfig = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createReportConfig( + request, + ( + err?: Error | null, + result?: protos.google.cloud.storageinsights.v1.IReportConfig | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createReportConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createReportConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createReportConfig with error', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.CreateReportConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.storageinsights.v1.CreateReportConfigRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createReportConfig = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createReportConfig(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createReportConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createReportConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createReportConfig with closed client', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.CreateReportConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.storageinsights.v1.CreateReportConfigRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createReportConfig(request), expectedError); + }); + }); + + describe('updateReportConfig', () => { + it('invokes updateReportConfig without error', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.UpdateReportConfigRequest() + ); + request.reportConfig ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.storageinsights.v1.UpdateReportConfigRequest', + ['reportConfig', 'name'] + ); + request.reportConfig.name = defaultValue1; + const expectedHeaderRequestParams = `report_config.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ReportConfig() + ); + client.innerApiCalls.updateReportConfig = + stubSimpleCall(expectedResponse); + const [response] = await client.updateReportConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateReportConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateReportConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateReportConfig without error using callback', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.UpdateReportConfigRequest() + ); + request.reportConfig ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.storageinsights.v1.UpdateReportConfigRequest', + ['reportConfig', 'name'] + ); + request.reportConfig.name = defaultValue1; + const expectedHeaderRequestParams = `report_config.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ReportConfig() + ); + client.innerApiCalls.updateReportConfig = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateReportConfig( + request, + ( + err?: Error | null, + result?: protos.google.cloud.storageinsights.v1.IReportConfig | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateReportConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateReportConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateReportConfig with error', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.UpdateReportConfigRequest() + ); + request.reportConfig ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.storageinsights.v1.UpdateReportConfigRequest', + ['reportConfig', 'name'] + ); + request.reportConfig.name = defaultValue1; + const expectedHeaderRequestParams = `report_config.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateReportConfig = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateReportConfig(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateReportConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateReportConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateReportConfig with closed client', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.UpdateReportConfigRequest() + ); + request.reportConfig ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.storageinsights.v1.UpdateReportConfigRequest', + ['reportConfig', 'name'] + ); + request.reportConfig.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateReportConfig(request), expectedError); + }); + }); + + describe('deleteReportConfig', () => { + it('invokes deleteReportConfig without error', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.DeleteReportConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.storageinsights.v1.DeleteReportConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteReportConfig = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteReportConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteReportConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteReportConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteReportConfig without error using callback', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.DeleteReportConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.storageinsights.v1.DeleteReportConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteReportConfig = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteReportConfig( + 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.deleteReportConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteReportConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteReportConfig with error', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.DeleteReportConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.storageinsights.v1.DeleteReportConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteReportConfig = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteReportConfig(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteReportConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteReportConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteReportConfig with closed client', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.DeleteReportConfigRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.storageinsights.v1.DeleteReportConfigRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteReportConfig(request), expectedError); + }); + }); + + describe('getReportDetail', () => { + it('invokes getReportDetail without error', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.GetReportDetailRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.storageinsights.v1.GetReportDetailRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ReportDetail() + ); + client.innerApiCalls.getReportDetail = stubSimpleCall(expectedResponse); + const [response] = await client.getReportDetail(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getReportDetail as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getReportDetail as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getReportDetail without error using callback', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.GetReportDetailRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.storageinsights.v1.GetReportDetailRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ReportDetail() + ); + client.innerApiCalls.getReportDetail = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getReportDetail( + request, + ( + err?: Error | null, + result?: protos.google.cloud.storageinsights.v1.IReportDetail | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getReportDetail as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getReportDetail as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getReportDetail with error', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.GetReportDetailRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.storageinsights.v1.GetReportDetailRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getReportDetail = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getReportDetail(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getReportDetail as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getReportDetail as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getReportDetail with closed client', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.GetReportDetailRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.storageinsights.v1.GetReportDetailRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getReportDetail(request), expectedError); + }); + }); + + describe('listReportConfigs', () => { + it('invokes listReportConfigs without error', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ListReportConfigsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.storageinsights.v1.ListReportConfigsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ReportConfig() + ), + generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ReportConfig() + ), + generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ReportConfig() + ), + ]; + client.innerApiCalls.listReportConfigs = stubSimpleCall(expectedResponse); + const [response] = await client.listReportConfigs(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listReportConfigs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listReportConfigs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listReportConfigs without error using callback', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ListReportConfigsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.storageinsights.v1.ListReportConfigsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ReportConfig() + ), + generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ReportConfig() + ), + generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ReportConfig() + ), + ]; + client.innerApiCalls.listReportConfigs = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listReportConfigs( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.storageinsights.v1.IReportConfig[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listReportConfigs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listReportConfigs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listReportConfigs with error', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ListReportConfigsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.storageinsights.v1.ListReportConfigsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listReportConfigs = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listReportConfigs(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listReportConfigs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listReportConfigs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listReportConfigsStream without error', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ListReportConfigsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.storageinsights.v1.ListReportConfigsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ReportConfig() + ), + generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ReportConfig() + ), + generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ReportConfig() + ), + ]; + client.descriptors.page.listReportConfigs.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listReportConfigsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.storageinsights.v1.ReportConfig[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.storageinsights.v1.ReportConfig) => { + 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.listReportConfigs.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listReportConfigs, request) + ); + assert( + (client.descriptors.page.listReportConfigs.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listReportConfigsStream with error', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ListReportConfigsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.storageinsights.v1.ListReportConfigsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listReportConfigs.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listReportConfigsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.storageinsights.v1.ReportConfig[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.storageinsights.v1.ReportConfig) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listReportConfigs.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listReportConfigs, request) + ); + assert( + (client.descriptors.page.listReportConfigs.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listReportConfigs without error', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ListReportConfigsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.storageinsights.v1.ListReportConfigsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ReportConfig() + ), + generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ReportConfig() + ), + generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ReportConfig() + ), + ]; + client.descriptors.page.listReportConfigs.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.storageinsights.v1.IReportConfig[] = + []; + const iterable = client.listReportConfigsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listReportConfigs.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listReportConfigs.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listReportConfigs with error', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ListReportConfigsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.storageinsights.v1.ListReportConfigsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listReportConfigs.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listReportConfigsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.storageinsights.v1.IReportConfig[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listReportConfigs.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listReportConfigs.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listReportDetails', () => { + it('invokes listReportDetails without error', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ListReportDetailsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.storageinsights.v1.ListReportDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ReportDetail() + ), + generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ReportDetail() + ), + generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ReportDetail() + ), + ]; + client.innerApiCalls.listReportDetails = stubSimpleCall(expectedResponse); + const [response] = await client.listReportDetails(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listReportDetails as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listReportDetails as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listReportDetails without error using callback', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ListReportDetailsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.storageinsights.v1.ListReportDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ReportDetail() + ), + generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ReportDetail() + ), + generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ReportDetail() + ), + ]; + client.innerApiCalls.listReportDetails = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listReportDetails( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.storageinsights.v1.IReportDetail[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listReportDetails as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listReportDetails as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listReportDetails with error', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ListReportDetailsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.storageinsights.v1.ListReportDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listReportDetails = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listReportDetails(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listReportDetails as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listReportDetails as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listReportDetailsStream without error', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ListReportDetailsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.storageinsights.v1.ListReportDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ReportDetail() + ), + generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ReportDetail() + ), + generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ReportDetail() + ), + ]; + client.descriptors.page.listReportDetails.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listReportDetailsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.storageinsights.v1.ReportDetail[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.storageinsights.v1.ReportDetail) => { + 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.listReportDetails.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listReportDetails, request) + ); + assert( + (client.descriptors.page.listReportDetails.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listReportDetailsStream with error', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ListReportDetailsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.storageinsights.v1.ListReportDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listReportDetails.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listReportDetailsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.storageinsights.v1.ReportDetail[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.storageinsights.v1.ReportDetail) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listReportDetails.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listReportDetails, request) + ); + assert( + (client.descriptors.page.listReportDetails.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listReportDetails without error', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ListReportDetailsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.storageinsights.v1.ListReportDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ReportDetail() + ), + generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ReportDetail() + ), + generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ReportDetail() + ), + ]; + client.descriptors.page.listReportDetails.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.storageinsights.v1.IReportDetail[] = + []; + const iterable = client.listReportDetailsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listReportDetails.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listReportDetails.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listReportDetails with error', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.storageinsights.v1.ListReportDetailsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.storageinsights.v1.ListReportDetailsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listReportDetails.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listReportDetailsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.storageinsights.v1.IReportDetail[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listReportDetails.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listReportDetails.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getLocation without error using callback', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub).getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getLocation(request, expectedOptions), + expectedError + ); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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', () => { + const fakePath = '/rendered/path/project'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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('reportConfig', () => { + const fakePath = '/rendered/path/reportConfig'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + report_config: 'reportConfigValue', + }; + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.reportConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.reportConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('reportConfigPath', () => { + const result = client.reportConfigPath( + 'projectValue', + 'locationValue', + 'reportConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.reportConfigPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromReportConfigName', () => { + const result = client.matchProjectFromReportConfigName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.reportConfigPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromReportConfigName', () => { + const result = client.matchLocationFromReportConfigName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.reportConfigPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReportConfigFromReportConfigName', () => { + const result = client.matchReportConfigFromReportConfigName(fakePath); + assert.strictEqual(result, 'reportConfigValue'); + assert( + (client.pathTemplates.reportConfigPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('reportDetail', () => { + const fakePath = '/rendered/path/reportDetail'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + report_config: 'reportConfigValue', + report_detail: 'reportDetailValue', + }; + const client = new storageinsightsModule.v1.StorageInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.reportDetailPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.reportDetailPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('reportDetailPath', () => { + const result = client.reportDetailPath( + 'projectValue', + 'locationValue', + 'reportConfigValue', + 'reportDetailValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.reportDetailPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromReportDetailName', () => { + const result = client.matchProjectFromReportDetailName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.reportDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromReportDetailName', () => { + const result = client.matchLocationFromReportDetailName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.reportDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReportConfigFromReportDetailName', () => { + const result = client.matchReportConfigFromReportDetailName(fakePath); + assert.strictEqual(result, 'reportConfigValue'); + assert( + (client.pathTemplates.reportDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReportDetailFromReportDetailName', () => { + const result = client.matchReportDetailFromReportDetailName(fakePath); + assert.strictEqual(result, 'reportDetailValue'); + assert( + (client.pathTemplates.reportDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-storageinsights/tsconfig.json b/packages/google-cloud-storageinsights/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/packages/google-cloud-storageinsights/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2018", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts" + ] +} diff --git a/packages/google-cloud-storageinsights/webpack.config.js b/packages/google-cloud-storageinsights/webpack.config.js new file mode 100644 index 00000000000..83fb240098b --- /dev/null +++ b/packages/google-cloud-storageinsights/webpack.config.js @@ -0,0 +1,64 @@ +// Copyright 2021 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. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: 'StorageInsights', + filename: './storage-insights.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/, + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader', + }, + ], + }, + mode: 'production', +}; diff --git a/packages/google-cloud-talent/CHANGELOG.md b/packages/google-cloud-talent/CHANGELOG.md index fbf9a2eecba..5e69253edd4 100644 --- a/packages/google-cloud-talent/CHANGELOG.md +++ b/packages/google-cloud-talent/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/talent?activeTab=versions +## [5.1.3](https://github.com/googleapis/google-cloud-node/compare/talent-v5.1.2...talent-v5.1.3) (2023-05-04) + + +### Bug Fixes + +* [talent] change timeout settings for SearchJobsForAlert ([#4227](https://github.com/googleapis/google-cloud-node/issues/4227)) ([cfaa053](https://github.com/googleapis/google-cloud-node/commit/cfaa0530fdb35bdbcd52a04b4b9fb30946572449)) + ## [5.1.2](https://github.com/googleapis/google-cloud-node/compare/talent-v5.1.1...talent-v5.1.2) (2023-04-13) diff --git a/packages/google-cloud-talent/package.json b/packages/google-cloud-talent/package.json index 573f5c0f1b9..58b4d268eab 100644 --- a/packages/google-cloud-talent/package.json +++ b/packages/google-cloud-talent/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/talent", "description": "Cloud Talent Solution API client for Node.js", - "version": "5.1.2", + "version": "5.1.3", "license": "Apache-2.0", "author": "Google LLC", "engines": { @@ -32,20 +32,20 @@ "Cloud Talent Solution API" ], "scripts": { - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "system-test": "npm run compile && c8 mocha build/system-test", - "lint": "gts check", - "fix": "gts fix", + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", "docs-test": "linkinator docs", - "prelint": "cd samples; npm link ../; npm install", - "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", - "compile-protos": "compileProtos src", + "fix": "gts fix", + "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "precompile": "gts clean" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -60,6 +60,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -70,5 +71,4 @@ "webpack-cli": "^5.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-talent" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-talent/samples/generated/v4/snippet_metadata.google.cloud.talent.v4.json b/packages/google-cloud-talent/samples/generated/v4/snippet_metadata.google.cloud.talent.v4.json index 1348dcb1cf2..3fee65b42bc 100644 --- a/packages/google-cloud-talent/samples/generated/v4/snippet_metadata.google.cloud.talent.v4.json +++ b/packages/google-cloud-talent/samples/generated/v4/snippet_metadata.google.cloud.talent.v4.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-talent", - "version": "5.1.1", + "version": "5.1.3", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-talent/samples/generated/v4beta1/snippet_metadata.google.cloud.talent.v4beta1.json b/packages/google-cloud-talent/samples/generated/v4beta1/snippet_metadata.google.cloud.talent.v4beta1.json index 15ef33c62f3..f03fa99f8e2 100644 --- a/packages/google-cloud-talent/samples/generated/v4beta1/snippet_metadata.google.cloud.talent.v4beta1.json +++ b/packages/google-cloud-talent/samples/generated/v4beta1/snippet_metadata.google.cloud.talent.v4beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-talent", - "version": "5.1.1", + "version": "5.1.3", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-talent/samples/package.json b/packages/google-cloud-talent/samples/package.json index da8c5759337..72e37da4243 100644 --- a/packages/google-cloud-talent/samples/package.json +++ b/packages/google-cloud-talent/samples/package.json @@ -17,7 +17,7 @@ "lint:fix": "npm run lint -- --fix" }, "dependencies": { - "@google-cloud/talent": "^5.1.2", + "@google-cloud/talent": "^5.1.3", "uuid": "^9.0.0", "yargs": "^16.0.3" }, diff --git a/packages/google-cloud-talent/src/v4/job_service_client_config.json b/packages/google-cloud-talent/src/v4/job_service_client_config.json index cf9e4788d65..f403ca6092d 100644 --- a/packages/google-cloud-talent/src/v4/job_service_client_config.json +++ b/packages/google-cloud-talent/src/v4/job_service_client_config.json @@ -66,7 +66,6 @@ "retry_params_name": "default" }, "SearchJobsForAlert": { - "timeout_millis": 30000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" } diff --git a/packages/google-cloud-tasks/package.json b/packages/google-cloud-tasks/package.json index 2b0a8c53ad3..ab0629f4c43 100644 --- a/packages/google-cloud-tasks/package.json +++ b/packages/google-cloud-tasks/package.json @@ -32,20 +32,20 @@ "Cloud Tasks API" ], "scripts": { - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "system-test": "npm run compile && c8 mocha build/system-test", - "lint": "gts check", - "fix": "gts fix", - "docs": "jsdoc -c .jsdoc.js", - "docs-test": "linkinator docs", "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", - "prepare": "npm run compile", - "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean" + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -61,6 +61,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -71,5 +72,4 @@ "webpack-cli": "^5.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-tasks" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-tasks/protos/google/cloud/tasks/v2/cloudtasks.proto b/packages/google-cloud-tasks/protos/google/cloud/tasks/v2/cloudtasks.proto index edc1cbdb44b..803b3214084 100644 --- a/packages/google-cloud-tasks/protos/google/cloud/tasks/v2/cloudtasks.proto +++ b/packages/google-cloud-tasks/protos/google/cloud/tasks/v2/cloudtasks.proto @@ -28,7 +28,7 @@ import "google/iam/v1/policy.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; -option go_package = "cloud.google.com/go/tasks/apiv2/taskspb;taskspb"; +option go_package = "cloud.google.com/go/cloudtasks/apiv2/cloudtaskspb;cloudtaskspb"; option java_multiple_files = true; option java_outer_classname = "CloudTasksProto"; option java_package = "com.google.cloud.tasks.v2"; diff --git a/packages/google-cloud-tasks/protos/google/cloud/tasks/v2/queue.proto b/packages/google-cloud-tasks/protos/google/cloud/tasks/v2/queue.proto index ff1cb2ae6a2..3a0828773f5 100644 --- a/packages/google-cloud-tasks/protos/google/cloud/tasks/v2/queue.proto +++ b/packages/google-cloud-tasks/protos/google/cloud/tasks/v2/queue.proto @@ -22,7 +22,7 @@ import "google/cloud/tasks/v2/target.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; -option go_package = "cloud.google.com/go/tasks/apiv2/taskspb;taskspb"; +option go_package = "cloud.google.com/go/cloudtasks/apiv2/cloudtaskspb;cloudtaskspb"; option java_multiple_files = true; option java_outer_classname = "QueueProto"; option java_package = "com.google.cloud.tasks.v2"; @@ -73,8 +73,9 @@ message Queue { DISABLED = 3; } - // Caller-specified and required in [CreateQueue][google.cloud.tasks.v2.CloudTasks.CreateQueue], - // after which it becomes output only. + // Caller-specified and required in + // [CreateQueue][google.cloud.tasks.v2.CloudTasks.CreateQueue], after which it + // becomes output only. // // The queue name. // @@ -95,36 +96,41 @@ message Queue { string name = 1; // Overrides for - // [task-level app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. + // [task-level + // app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. // These settings apply only to - // [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in this queue. - // [Http tasks][google.cloud.tasks.v2.HttpRequest] are not affected. + // [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in this + // queue. [Http tasks][google.cloud.tasks.v2.HttpRequest] are not affected. // // If set, `app_engine_routing_override` is used for all - // [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in the queue, no matter what the - // setting is for the - // [task-level app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. + // [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in the + // queue, no matter what the setting is for the [task-level + // app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. AppEngineRouting app_engine_routing_override = 2; // Rate limits for task dispatches. // - // [rate_limits][google.cloud.tasks.v2.Queue.rate_limits] and [retry_config][google.cloud.tasks.v2.Queue.retry_config] are - // related because they both control task attempts. However they control task - // attempts in different ways: + // [rate_limits][google.cloud.tasks.v2.Queue.rate_limits] and + // [retry_config][google.cloud.tasks.v2.Queue.retry_config] are related + // because they both control task attempts. However they control task attempts + // in different ways: // - // * [rate_limits][google.cloud.tasks.v2.Queue.rate_limits] controls the total rate of + // * [rate_limits][google.cloud.tasks.v2.Queue.rate_limits] controls the total + // rate of // dispatches from a queue (i.e. all traffic dispatched from the // queue, regardless of whether the dispatch is from a first // attempt or a retry). - // * [retry_config][google.cloud.tasks.v2.Queue.retry_config] controls what happens to + // * [retry_config][google.cloud.tasks.v2.Queue.retry_config] controls what + // happens to // particular a task after its first attempt fails. That is, - // [retry_config][google.cloud.tasks.v2.Queue.retry_config] controls task retries (the - // second attempt, third attempt, etc). + // [retry_config][google.cloud.tasks.v2.Queue.retry_config] controls task + // retries (the second attempt, third attempt, etc). // // The queue's actual dispatch rate is the result of: // // * Number of tasks in the queue - // * User-specified throttling: [rate_limits][google.cloud.tasks.v2.Queue.rate_limits], + // * User-specified throttling: + // [rate_limits][google.cloud.tasks.v2.Queue.rate_limits], // [retry_config][google.cloud.tasks.v2.Queue.retry_config], and the // [queue's state][google.cloud.tasks.v2.Queue.state]. // * System throttling due to `429` (Too Many Requests) or `503` (Service @@ -150,16 +156,18 @@ message Queue { // [PauseQueue][google.cloud.tasks.v2.CloudTasks.PauseQueue], // [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue], or uploading // [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). - // [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue] cannot be used to change `state`. + // [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue] cannot be used + // to change `state`. State state = 5; // Output only. The last time this queue was purged. // - // All tasks that were [created][google.cloud.tasks.v2.Task.create_time] before this time - // were purged. + // All tasks that were [created][google.cloud.tasks.v2.Task.create_time] + // before this time were purged. // - // A queue can be purged using [PurgeQueue][google.cloud.tasks.v2.CloudTasks.PurgeQueue], the - // [App Engine Task Queue SDK, or the Cloud + // A queue can be purged using + // [PurgeQueue][google.cloud.tasks.v2.CloudTasks.PurgeQueue], the [App Engine + // Task Queue SDK, or the Cloud // Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). // // Purge time will be truncated to the nearest microsecond. Purge @@ -177,8 +185,9 @@ message Queue { // This message determines the maximum rate that tasks can be dispatched by a // queue, regardless of whether the dispatch is a first task attempt or a retry. // -// Note: The debugging command, [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask], will run a task -// even if the queue has reached its [RateLimits][google.cloud.tasks.v2.RateLimits]. +// Note: The debugging command, +// [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask], will run a task even if +// the queue has reached its [RateLimits][google.cloud.tasks.v2.RateLimits]. message RateLimits { // The maximum rate at which tasks are dispatched from this queue. // @@ -218,9 +227,9 @@ message RateLimits { // `queue.yaml/xml`, `max_burst_size` is equal to // [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). // Since `max_burst_size` is output only, if - // [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue] is called on a queue - // created by `queue.yaml/xml`, `max_burst_size` will be reset based - // on the value of + // [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue] is called on a + // queue created by `queue.yaml/xml`, `max_burst_size` will be reset based on + // the value of // [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second], // regardless of whether // [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second] @@ -269,9 +278,9 @@ message RetryConfig { // If positive, `max_retry_duration` specifies the time limit for // retrying a failed task, measured from when the task was first // attempted. Once `max_retry_duration` time has passed *and* the - // task has been attempted [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] - // times, no further attempts will be made and the task will be - // deleted. + // task has been attempted + // [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times, no + // further attempts will be made and the task will be deleted. // // If zero, then the task age is unlimited. // @@ -286,11 +295,12 @@ message RetryConfig { // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). google.protobuf.Duration max_retry_duration = 2; - // A task will be [scheduled][google.cloud.tasks.v2.Task.schedule_time] for retry between - // [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] and - // [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] duration after it fails, - // if the queue's [RetryConfig][google.cloud.tasks.v2.RetryConfig] specifies that the task should be - // retried. + // A task will be [scheduled][google.cloud.tasks.v2.Task.schedule_time] for + // retry between [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] + // and [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] duration + // after it fails, if the queue's + // [RetryConfig][google.cloud.tasks.v2.RetryConfig] specifies that the task + // should be retried. // // If unspecified when the queue is created, Cloud Tasks will pick the // default. @@ -303,11 +313,12 @@ message RetryConfig { // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). google.protobuf.Duration min_backoff = 3; - // A task will be [scheduled][google.cloud.tasks.v2.Task.schedule_time] for retry between - // [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] and - // [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] duration after it fails, - // if the queue's [RetryConfig][google.cloud.tasks.v2.RetryConfig] specifies that the task should be - // retried. + // A task will be [scheduled][google.cloud.tasks.v2.Task.schedule_time] for + // retry between [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] + // and [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] duration + // after it fails, if the queue's + // [RetryConfig][google.cloud.tasks.v2.RetryConfig] specifies that the task + // should be retried. // // If unspecified when the queue is created, Cloud Tasks will pick the // default. @@ -329,15 +340,16 @@ message RetryConfig { // [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] up to // [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times. // - // For example, if [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] is 10s, + // For example, if + // [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] is 10s, // [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] is 300s, and // `max_doublings` is 3, then the a task will first be retried in // 10s. The retry interval will double three times, and then // increase linearly by 2^3 * 10s. Finally, the task will retry at - // intervals of [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] until the - // task has been attempted [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] - // times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, - // 240s, 300s, 300s, .... + // intervals of [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] + // until the task has been attempted + // [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times. Thus, + // the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, .... // // If unspecified when the queue is created, Cloud Tasks will pick the // default. diff --git a/packages/google-cloud-tasks/protos/google/cloud/tasks/v2/target.proto b/packages/google-cloud-tasks/protos/google/cloud/tasks/v2/target.proto index 5141d7fb6ab..0e1768b63ff 100644 --- a/packages/google-cloud-tasks/protos/google/cloud/tasks/v2/target.proto +++ b/packages/google-cloud-tasks/protos/google/cloud/tasks/v2/target.proto @@ -19,7 +19,7 @@ package google.cloud.tasks.v2; import "google/api/field_behavior.proto"; -option go_package = "cloud.google.com/go/tasks/apiv2/taskspb;taskspb"; +option go_package = "cloud.google.com/go/cloudtasks/apiv2/cloudtaskspb;cloudtaskspb"; option java_multiple_files = true; option java_outer_classname = "TargetProto"; option java_package = "com.google.cloud.tasks.v2"; @@ -32,8 +32,10 @@ option java_package = "com.google.cloud.tasks.v2"; // any other HTTP response code is returned or no response is received, the // task will be retried according to the following: // -// * User-specified throttling: [retry configuration][google.cloud.tasks.v2.Queue.retry_config], -// [rate limits][google.cloud.tasks.v2.Queue.rate_limits], and the [queue's state][google.cloud.tasks.v2.Queue.state]. +// * User-specified throttling: [retry +// configuration][google.cloud.tasks.v2.Queue.retry_config], +// [rate limits][google.cloud.tasks.v2.Queue.rate_limits], and the [queue's +// state][google.cloud.tasks.v2.Queue.state]. // // * System throttling: To prevent the worker from overloading, Cloud Tasks may // temporarily reduce the queue's effective rate. User-specified settings @@ -42,10 +44,11 @@ option java_package = "com.google.cloud.tasks.v2"; // System throttling happens because: // // * Cloud Tasks backs off on all errors. Normally the backoff specified in -// [rate limits][google.cloud.tasks.v2.Queue.rate_limits] will be used. But if the worker returns -// `429` (Too Many Requests), `503` (Service Unavailable), or the rate of -// errors is high, Cloud Tasks will use a higher backoff rate. The retry -// specified in the `Retry-After` HTTP response header is considered. +// [rate limits][google.cloud.tasks.v2.Queue.rate_limits] will be used. But +// if the worker returns `429` (Too Many Requests), `503` (Service +// Unavailable), or the rate of errors is high, Cloud Tasks will use a +// higher backoff rate. The retry specified in the `Retry-After` HTTP +// response header is considered. // // * To prevent traffic spikes and to smooth sudden increases in traffic, // dispatches ramp up slowly when the queue is newly created or idle and @@ -100,14 +103,16 @@ message HttpRequest { // HTTP request body. // // A request body is allowed only if the - // [HTTP method][google.cloud.tasks.v2.HttpRequest.http_method] is POST, PUT, or PATCH. It is an - // error to set body on a task with an incompatible [HttpMethod][google.cloud.tasks.v2.HttpMethod]. + // [HTTP method][google.cloud.tasks.v2.HttpRequest.http_method] is POST, PUT, + // or PATCH. It is an error to set body on a task with an incompatible + // [HttpMethod][google.cloud.tasks.v2.HttpMethod]. bytes body = 4; // The mode for generating an `Authorization` header for HTTP requests. // - // If specified, all `Authorization` headers in the [HttpRequest.headers][google.cloud.tasks.v2.HttpRequest.headers] - // field will be overridden. + // If specified, all `Authorization` headers in the + // [HttpRequest.headers][google.cloud.tasks.v2.HttpRequest.headers] field will + // be overridden. oneof authorization_header { // If specified, an // [OAuth token](https://developers.google.com/identity/protocols/OAuth2) @@ -135,7 +140,8 @@ message HttpRequest { // The message defines the HTTP request that is sent to an App Engine app when // the task is dispatched. // -// Using [AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest] requires +// Using [AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest] +// requires // [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) // Google IAM permission for the project // and the following scope: @@ -155,8 +161,9 @@ message HttpRequest { // The request to the handler, however, will appear to have used the HTTP // protocol. // -// The [AppEngineRouting][google.cloud.tasks.v2.AppEngineRouting] used to construct the URL that the task is -// delivered to can be set at the queue-level or task-level: +// The [AppEngineRouting][google.cloud.tasks.v2.AppEngineRouting] used to +// construct the URL that the task is delivered to can be set at the queue-level +// or task-level: // // * If [app_engine_routing_override is set on the // queue][Queue.app_engine_routing_override], this value is used for all @@ -182,14 +189,15 @@ message HttpRequest { // The task attempt has succeeded if the app's request handler returns an HTTP // response code in the range [`200` - `299`]. The task attempt has failed if // the app's handler returns a non-2xx response code or Cloud Tasks does -// not receive response before the [deadline][google.cloud.tasks.v2.Task.dispatch_deadline]. Failed -// tasks will be retried according to the -// [retry configuration][google.cloud.tasks.v2.Queue.retry_config]. `503` (Service Unavailable) is -// considered an App Engine system error instead of an application error and -// will cause Cloud Tasks' traffic congestion control to temporarily throttle -// the queue's dispatches. Unlike other types of task targets, a `429` (Too Many -// Requests) response from an app handler does not cause traffic congestion -// control to throttle the queue. +// not receive response before the +// [deadline][google.cloud.tasks.v2.Task.dispatch_deadline]. Failed tasks will +// be retried according to the [retry +// configuration][google.cloud.tasks.v2.Queue.retry_config]. `503` (Service +// Unavailable) is considered an App Engine system error instead of an +// application error and will cause Cloud Tasks' traffic congestion control to +// temporarily throttle the queue's dispatches. Unlike other types of task +// targets, a `429` (Too Many Requests) response from an app handler does not +// cause traffic congestion control to throttle the queue. message AppEngineHttpRequest { // The HTTP method to use for the request. The default is POST. // @@ -235,8 +243,8 @@ message AppEngineHttpRequest { // `"AppEngine-Google; (+http://code.google.com/appengine)"` to the // modified `User-Agent`. // - // If the task has a [body][google.cloud.tasks.v2.AppEngineHttpRequest.body], Cloud - // Tasks sets the following headers: + // If the task has a [body][google.cloud.tasks.v2.AppEngineHttpRequest.body], + // Cloud Tasks sets the following headers: // // * `Content-Type`: By default, the `Content-Type` header is set to // `"application/octet-stream"`. The default can be overridden by explicitly @@ -260,14 +268,16 @@ message AppEngineHttpRequest { // visible when the task is returned in a Cloud Tasks response. // // Although there is no specific limit for the maximum number of headers or - // the size, there is a limit on the maximum size of the [Task][google.cloud.tasks.v2.Task]. For more - // information, see the [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] documentation. + // the size, there is a limit on the maximum size of the + // [Task][google.cloud.tasks.v2.Task]. For more information, see the + // [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] documentation. map headers = 4; // HTTP request body. // // A request body is allowed only if the HTTP method is POST or PUT. It is - // an error to set a body on a task with an incompatible [HttpMethod][google.cloud.tasks.v2.HttpMethod]. + // an error to set a body on a task with an incompatible + // [HttpMethod][google.cloud.tasks.v2.HttpMethod]. bytes body = 5; } @@ -299,16 +309,17 @@ message AppEngineRouting { // service when the task is attempted. // // For some queues or tasks which were created using the App Engine - // Task Queue API, [host][google.cloud.tasks.v2.AppEngineRouting.host] is not parsable - // into [service][google.cloud.tasks.v2.AppEngineRouting.service], + // Task Queue API, [host][google.cloud.tasks.v2.AppEngineRouting.host] is not + // parsable into [service][google.cloud.tasks.v2.AppEngineRouting.service], // [version][google.cloud.tasks.v2.AppEngineRouting.version], and - // [instance][google.cloud.tasks.v2.AppEngineRouting.instance]. For example, some tasks - // which were created using the App Engine SDK use a custom domain + // [instance][google.cloud.tasks.v2.AppEngineRouting.instance]. For example, + // some tasks which were created using the App Engine SDK use a custom domain // name; custom domains are not parsed by Cloud Tasks. If // [host][google.cloud.tasks.v2.AppEngineRouting.host] is not parsable, then // [service][google.cloud.tasks.v2.AppEngineRouting.service], // [version][google.cloud.tasks.v2.AppEngineRouting.version], and - // [instance][google.cloud.tasks.v2.AppEngineRouting.instance] are the empty string. + // [instance][google.cloud.tasks.v2.AppEngineRouting.instance] are the empty + // string. string service = 1; // App version. @@ -317,16 +328,17 @@ message AppEngineRouting { // version when the task is attempted. // // For some queues or tasks which were created using the App Engine - // Task Queue API, [host][google.cloud.tasks.v2.AppEngineRouting.host] is not parsable - // into [service][google.cloud.tasks.v2.AppEngineRouting.service], + // Task Queue API, [host][google.cloud.tasks.v2.AppEngineRouting.host] is not + // parsable into [service][google.cloud.tasks.v2.AppEngineRouting.service], // [version][google.cloud.tasks.v2.AppEngineRouting.version], and - // [instance][google.cloud.tasks.v2.AppEngineRouting.instance]. For example, some tasks - // which were created using the App Engine SDK use a custom domain + // [instance][google.cloud.tasks.v2.AppEngineRouting.instance]. For example, + // some tasks which were created using the App Engine SDK use a custom domain // name; custom domains are not parsed by Cloud Tasks. If // [host][google.cloud.tasks.v2.AppEngineRouting.host] is not parsable, then // [service][google.cloud.tasks.v2.AppEngineRouting.service], // [version][google.cloud.tasks.v2.AppEngineRouting.version], and - // [instance][google.cloud.tasks.v2.AppEngineRouting.instance] are the empty string. + // [instance][google.cloud.tasks.v2.AppEngineRouting.instance] are the empty + // string. string version = 2; // App instance. @@ -348,9 +360,10 @@ message AppEngineRouting { // // The host is constructed from the domain name of the app associated with // the queue's project ID (for example .appspot.com), and the - // [service][google.cloud.tasks.v2.AppEngineRouting.service], [version][google.cloud.tasks.v2.AppEngineRouting.version], - // and [instance][google.cloud.tasks.v2.AppEngineRouting.instance]. Tasks which were created using - // the App Engine SDK might have a custom domain name. + // [service][google.cloud.tasks.v2.AppEngineRouting.service], + // [version][google.cloud.tasks.v2.AppEngineRouting.version], and + // [instance][google.cloud.tasks.v2.AppEngineRouting.instance]. Tasks which + // were created using the App Engine SDK might have a custom domain name. // // For more information, see // [How Requests are diff --git a/packages/google-cloud-tasks/protos/google/cloud/tasks/v2/task.proto b/packages/google-cloud-tasks/protos/google/cloud/tasks/v2/task.proto index b0efae63e3a..6616de29c3c 100644 --- a/packages/google-cloud-tasks/protos/google/cloud/tasks/v2/task.proto +++ b/packages/google-cloud-tasks/protos/google/cloud/tasks/v2/task.proto @@ -23,7 +23,7 @@ import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; -option go_package = "cloud.google.com/go/tasks/apiv2/taskspb;taskspb"; +option go_package = "cloud.google.com/go/cloudtasks/apiv2/cloudtaskspb;cloudtaskspb"; option java_multiple_files = true; option java_outer_classname = "TaskProto"; option java_package = "com.google.cloud.tasks.v2"; @@ -50,7 +50,8 @@ message Task { // sensitive data. // // This view does not include the - // [body in AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest.body]. + // [body in + // AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest.body]. // Bodies are desirable to return only when needed, because they // can be large and because of the sensitivity of the data that you // choose to store in it. @@ -64,7 +65,8 @@ message Task { FULL = 2; } - // Optionally caller-specified in [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask]. + // Optionally caller-specified in + // [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask]. // // The task name. // @@ -90,12 +92,14 @@ message Task { oneof message_type { // HTTP request that is sent to the App Engine app handler. // - // An App Engine task is a task that has [AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest] set. + // An App Engine task is a task that has + // [AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest] set. AppEngineHttpRequest app_engine_http_request = 2; // HTTP request that is sent to the worker. // - // An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2.HttpRequest] set. + // An HTTP task is a task that has + // [HttpRequest][google.cloud.tasks.v2.HttpRequest] set. HttpRequest http_request = 3; } @@ -121,10 +125,12 @@ message Task { // // The default and maximum values depend on the type of request: // - // * For [HTTP tasks][google.cloud.tasks.v2.HttpRequest], the default is 10 minutes. The deadline + // * For [HTTP tasks][google.cloud.tasks.v2.HttpRequest], the default is 10 + // minutes. The deadline // must be in the interval [15 seconds, 30 minutes]. // - // * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0 indicates that the + // * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0 + // indicates that the // request has the default deadline. The default deadline depends on the // [scaling // type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) @@ -153,15 +159,16 @@ message Task { // Output only. The status of the task's first attempt. // - // Only [dispatch_time][google.cloud.tasks.v2.Attempt.dispatch_time] will be set. - // The other [Attempt][google.cloud.tasks.v2.Attempt] information is not retained by Cloud Tasks. + // Only [dispatch_time][google.cloud.tasks.v2.Attempt.dispatch_time] will be + // set. The other [Attempt][google.cloud.tasks.v2.Attempt] information is not + // retained by Cloud Tasks. Attempt first_attempt = 9; // Output only. The status of the task's last attempt. Attempt last_attempt = 10; - // Output only. The view specifies which subset of the [Task][google.cloud.tasks.v2.Task] has - // been returned. + // Output only. The view specifies which subset of the + // [Task][google.cloud.tasks.v2.Task] has been returned. View view = 11; } diff --git a/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta2/cloudtasks.proto b/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta2/cloudtasks.proto index fea304c46f4..a0c27279a15 100644 --- a/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta2/cloudtasks.proto +++ b/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta2/cloudtasks.proto @@ -29,7 +29,7 @@ import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; -option go_package = "cloud.google.com/go/tasks/apiv2beta2/taskspb;taskspb"; +option go_package = "cloud.google.com/go/cloudtasks/apiv2beta2/cloudtaskspb;cloudtaskspb"; option java_multiple_files = true; option java_outer_classname = "CloudTasksProto"; option java_package = "com.google.cloud.tasks.v2beta2"; @@ -39,7 +39,8 @@ option objc_class_prefix = "TASKS"; // work in their applications. service CloudTasks { option (google.api.default_host) = "cloudtasks.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Lists queues. // @@ -62,8 +63,8 @@ service CloudTasks { // Creates a queue. // // Queues created with this method allow tasks to live for a maximum of 31 - // days. After a task is 31 days old, the task will be deleted regardless of whether - // it was dispatched or not. + // days. After a task is 31 days old, the task will be deleted regardless of + // whether it was dispatched or not. // // WARNING: Using this method may have unintended side effects if you are // using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. @@ -85,8 +86,8 @@ service CloudTasks { // the queue if it does exist. // // Queues created with this method allow tasks to live for a maximum of 31 - // days. After a task is 31 days old, the task will be deleted regardless of whether - // it was dispatched or not. + // days. After a task is 31 days old, the task will be deleted regardless of + // whether it was dispatched or not. // // WARNING: Using this method may have unintended side effects if you are // using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. @@ -140,9 +141,10 @@ service CloudTasks { // // If a queue is paused then the system will stop dispatching tasks // until the queue is resumed via - // [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. Tasks can still be added - // when the queue is paused. A queue is paused if its - // [state][google.cloud.tasks.v2beta2.Queue.state] is [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED]. + // [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. Tasks can + // still be added when the queue is paused. A queue is paused if its + // [state][google.cloud.tasks.v2beta2.Queue.state] is + // [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED]. rpc PauseQueue(PauseQueueRequest) returns (Queue) { option (google.api.http) = { post: "/v2beta2/{name=projects/*/locations/*/queues/*}:pause" @@ -155,9 +157,11 @@ service CloudTasks { // // This method resumes a queue after it has been // [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED] or - // [DISABLED][google.cloud.tasks.v2beta2.Queue.State.DISABLED]. The state of a queue is stored - // in the queue's [state][google.cloud.tasks.v2beta2.Queue.state]; after calling this method it - // will be set to [RUNNING][google.cloud.tasks.v2beta2.Queue.State.RUNNING]. + // [DISABLED][google.cloud.tasks.v2beta2.Queue.State.DISABLED]. The state of a + // queue is stored in the queue's + // [state][google.cloud.tasks.v2beta2.Queue.state]; after calling this method + // it will be set to + // [RUNNING][google.cloud.tasks.v2beta2.Queue.State.RUNNING]. // // WARNING: Resuming many high-QPS queues at the same time can // lead to target overloading. If you are resuming high-QPS @@ -172,16 +176,17 @@ service CloudTasks { option (google.api.method_signature) = "name"; } - // Gets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue]. - // Returns an empty policy if the resource exists and does not have a policy - // set. + // Gets the access control policy for a + // [Queue][google.cloud.tasks.v2beta2.Queue]. Returns an empty policy if the + // resource exists and does not have a policy set. // // Authorization requires the following // [Google IAM](https://cloud.google.com/iam) permission on the specified // resource parent: // // * `cloudtasks.queues.getIamPolicy` - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v2beta2/{resource=projects/*/locations/*/queues/*}:getIamPolicy" body: "*" @@ -189,8 +194,8 @@ service CloudTasks { option (google.api.method_signature) = "resource"; } - // Sets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue]. Replaces any existing - // policy. + // Sets the access control policy for a + // [Queue][google.cloud.tasks.v2beta2.Queue]. Replaces any existing policy. // // Note: The Cloud Console does not check queue-level IAM permissions yet. // Project-level permissions are required to use the Cloud Console. @@ -200,7 +205,8 @@ service CloudTasks { // resource parent: // // * `cloudtasks.queues.setIamPolicy` - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v2beta2/{resource=projects/*/locations/*/queues/*}:setIamPolicy" body: "*" @@ -208,14 +214,16 @@ service CloudTasks { option (google.api.method_signature) = "resource,policy"; } - // Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2beta2.Queue]. - // If the resource does not exist, this will return an empty set of - // permissions, not a [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. + // Returns permissions that a caller has on a + // [Queue][google.cloud.tasks.v2beta2.Queue]. If the resource does not exist, + // this will return an empty set of permissions, not a + // [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. // // Note: This operation is designed to be used for building permission-aware // UIs and command-line tools, not for authorization checking. This operation // may "fail open" without warning. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v2beta2/{resource=projects/*/locations/*/queues/*}:testIamPermissions" body: "*" @@ -225,10 +233,10 @@ service CloudTasks { // Lists the tasks in a queue. // - // By default, only the [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC] view is retrieved - // due to performance considerations; - // [response_view][google.cloud.tasks.v2beta2.ListTasksRequest.response_view] controls the - // subset of information which is returned. + // By default, only the [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC] + // view is retrieved due to performance considerations; + // [response_view][google.cloud.tasks.v2beta2.ListTasksRequest.response_view] + // controls the subset of information which is returned. // // The tasks may be returned in any order. The ordering may change at any // time. @@ -251,9 +259,11 @@ service CloudTasks { // // Tasks cannot be updated after creation; there is no UpdateTask command. // - // * For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], the maximum task size is + // * For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], + // the maximum task size is // 100KB. - // * For [pull queues][google.cloud.tasks.v2beta2.PullTarget], the maximum task size is 1MB. + // * For [pull queues][google.cloud.tasks.v2beta2.PullTarget], the maximum + // task size is 1MB. rpc CreateTask(CreateTaskRequest) returns (Task) { option (google.api.http) = { post: "/v2beta2/{parent=projects/*/locations/*/queues/*}/tasks" @@ -279,18 +289,19 @@ service CloudTasks { // // This method is invoked by the worker to obtain a lease. The // worker must acknowledge the task via - // [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] after they have - // performed the work associated with the task. - // - // The [payload][google.cloud.tasks.v2beta2.PullMessage.payload] is intended to store data that - // the worker needs to perform the work associated with the task. To - // return the payloads in the [response][google.cloud.tasks.v2beta2.LeaseTasksResponse], set - // [response_view][google.cloud.tasks.v2beta2.LeaseTasksRequest.response_view] to - // [FULL][google.cloud.tasks.v2beta2.Task.View.FULL]. - // - // A maximum of 10 qps of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] - // requests are allowed per - // queue. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] + // [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] + // after they have performed the work associated with the task. + // + // The [payload][google.cloud.tasks.v2beta2.PullMessage.payload] is intended + // to store data that the worker needs to perform the work associated with the + // task. To return the payloads in the + // [response][google.cloud.tasks.v2beta2.LeaseTasksResponse], set + // [response_view][google.cloud.tasks.v2beta2.LeaseTasksRequest.response_view] + // to [FULL][google.cloud.tasks.v2beta2.Task.View.FULL]. + // + // A maximum of 10 qps of + // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] requests are + // allowed per queue. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] // is returned when this limit is // exceeded. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] // is also returned when @@ -307,12 +318,13 @@ service CloudTasks { // Acknowledges a pull task. // // The worker, that is, the entity that - // [leased][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] this task must call this method - // to indicate that the work associated with the task has finished. + // [leased][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] this task must + // call this method to indicate that the work associated with the task has + // finished. // // The worker must acknowledge a task within the - // [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration] or the lease - // will expire and the task will become available to be leased + // [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration] + // or the lease will expire and the task will become available to be leased // again. After the task is acknowledged, it will not be returned // by a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks], // [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask], or @@ -329,7 +341,8 @@ service CloudTasks { // // The worker can use this method to extend the lease by a new // duration, starting from now. The new task lease will be - // returned in the task's [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. + // returned in the task's + // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. rpc RenewLease(RenewLeaseRequest) returns (Task) { option (google.api.http) = { post: "/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}:renewLease" @@ -341,9 +354,9 @@ service CloudTasks { // Cancel a pull task's lease. // // The worker can use this method to cancel a task's lease by - // setting its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] to now. This will - // make the task available to be leased to the next caller of - // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]. + // setting its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] + // to now. This will make the task available to be leased to the next caller + // of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]. rpc CancelLease(CancelLeaseRequest) returns (Task) { option (google.api.http) = { post: "/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}:cancelLease" @@ -355,30 +368,33 @@ service CloudTasks { // Forces a task to run now. // // When this method is called, Cloud Tasks will dispatch the task, even if - // the task is already running, the queue has reached its [RateLimits][google.cloud.tasks.v2beta2.RateLimits] or - // is [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED]. + // the task is already running, the queue has reached its + // [RateLimits][google.cloud.tasks.v2beta2.RateLimits] or is + // [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED]. // // This command is meant to be used for manual debugging. For - // example, [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] can be used to retry a failed - // task after a fix has been made or to manually force a task to be - // dispatched now. + // example, [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] can be + // used to retry a failed task after a fix has been made or to manually force + // a task to be dispatched now. // // The dispatched task is returned. That is, the task that is returned - // contains the [status][google.cloud.tasks.v2beta2.Task.status] after the task is dispatched but - // before the task is received by its target. + // contains the [status][google.cloud.tasks.v2beta2.Task.status] after the + // task is dispatched but before the task is received by its target. // // If Cloud Tasks receives a successful response from the task's // target, then the task will be deleted; otherwise the task's - // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be reset to the time that - // [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] was called plus the retry delay specified - // in the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig]. + // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be + // reset to the time that + // [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] was called plus + // the retry delay specified in the queue's + // [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig]. // // [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] returns // [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a // task that has already succeeded or permanently failed. // - // [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] cannot be called on a - // [pull task][google.cloud.tasks.v2beta2.PullMessage]. + // [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] cannot be called + // on a [pull task][google.cloud.tasks.v2beta2.PullMessage]. rpc RunTask(RunTaskRequest) returns (Task) { option (google.api.http) = { post: "/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}:run" @@ -388,7 +404,8 @@ service CloudTasks { } } -// Request message for [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues]. +// Request message for +// [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues]. message ListQueuesRequest { // Required. The location name. // For example: `projects/PROJECT_ID/locations/LOCATION_ID` @@ -399,11 +416,10 @@ message ListQueuesRequest { } ]; - // `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2beta2.Queue] - // field can be used as a filter and several operators as supported. - // For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as - // described in - // [Stackdriver's Advanced Logs + // `filter` can be used to specify a subset of queues. Any + // [Queue][google.cloud.tasks.v2beta2.Queue] field can be used as a filter and + // several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The + // filter syntax is the same as described in [Stackdriver's Advanced Logs // Filters](https://cloud.google.com/logging/docs/view/advanced_filters). // // Sample filter "app_engine_http_target: *". @@ -417,28 +433,32 @@ message ListQueuesRequest { // The maximum page size is 9800. If unspecified, the page size will // be the maximum. Fewer queues than requested might be returned, // even if more queues exist; use the - // [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] in the - // response to determine if more queues exist. + // [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] + // in the response to determine if more queues exist. int32 page_size = 3; // A token identifying the page of results to return. // // To request the first page results, page_token must be empty. To // request the next page of results, page_token must be the value of - // [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] returned - // from the previous call to [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] - // method. It is an error to switch the value of the - // [filter][google.cloud.tasks.v2beta2.ListQueuesRequest.filter] while iterating through pages. + // [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] + // returned from the previous call to + // [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] method. It + // is an error to switch the value of the + // [filter][google.cloud.tasks.v2beta2.ListQueuesRequest.filter] while + // iterating through pages. string page_token = 4; - // Optional. Read mask is used for a more granular control over what the API returns. - // If the mask is not present all fields will be returned except + // Optional. Read mask is used for a more granular control over what the API + // returns. If the mask is not present all fields will be returned except // [Queue.stats]. [Queue.stats] will be returned only if it was explicitly // specified in the mask. - google.protobuf.FieldMask read_mask = 5 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.FieldMask read_mask = 5 + [(google.api.field_behavior) = OPTIONAL]; } -// Response message for [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues]. +// Response message for +// [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues]. message ListQueuesResponse { // The list of queues. repeated Queue queues = 1; @@ -446,7 +466,8 @@ message ListQueuesResponse { // A token to retrieve next page of results. // // To return the next page of results, call - // [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] with this value as the + // [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] with this + // value as the // [page_token][google.cloud.tasks.v2beta2.ListQueuesRequest.page_token]. // // If the next_page_token is empty, there are no more results. @@ -455,7 +476,8 @@ message ListQueuesResponse { string next_page_token = 2; } -// Request message for [GetQueue][google.cloud.tasks.v2beta2.CloudTasks.GetQueue]. +// Request message for +// [GetQueue][google.cloud.tasks.v2beta2.CloudTasks.GetQueue]. message GetQueueRequest { // Required. The resource name of the queue. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` @@ -466,14 +488,16 @@ message GetQueueRequest { } ]; - // Optional. Read mask is used for a more granular control over what the API returns. - // If the mask is not present all fields will be returned except + // Optional. Read mask is used for a more granular control over what the API + // returns. If the mask is not present all fields will be returned except // [Queue.stats]. [Queue.stats] will be returned only if it was explicitly // specified in the mask. - google.protobuf.FieldMask read_mask = 2 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.FieldMask read_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; } -// Request message for [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue]. +// Request message for +// [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue]. message CreateQueueRequest { // Required. The location name in which the queue will be created. // For example: `projects/PROJECT_ID/locations/LOCATION_ID` @@ -490,19 +514,23 @@ message CreateQueueRequest { // Required. The queue to create. // - // [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as an existing queue. + // [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as + // an existing queue. Queue queue = 2 [(google.api.field_behavior) = REQUIRED]; } -// Request message for [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue]. +// Request message for +// [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue]. message UpdateQueueRequest { // Required. The queue to create or update. // - // The queue's [name][google.cloud.tasks.v2beta2.Queue.name] must be specified. + // The queue's [name][google.cloud.tasks.v2beta2.Queue.name] must be + // specified. // // Output only fields cannot be modified using UpdateQueue. // Any value specified for an output only field will be ignored. - // The queue's [name][google.cloud.tasks.v2beta2.Queue.name] cannot be changed. + // The queue's [name][google.cloud.tasks.v2beta2.Queue.name] cannot be + // changed. Queue queue = 1 [(google.api.field_behavior) = REQUIRED]; // A mask used to specify which fields of the queue are being updated. @@ -511,7 +539,8 @@ message UpdateQueueRequest { google.protobuf.FieldMask update_mask = 2; } -// Request message for [DeleteQueue][google.cloud.tasks.v2beta2.CloudTasks.DeleteQueue]. +// Request message for +// [DeleteQueue][google.cloud.tasks.v2beta2.CloudTasks.DeleteQueue]. message DeleteQueueRequest { // Required. The queue name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` @@ -523,7 +552,8 @@ message DeleteQueueRequest { ]; } -// Request message for [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue]. +// Request message for +// [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue]. message PurgeQueueRequest { // Required. The queue name. For example: // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` @@ -535,7 +565,8 @@ message PurgeQueueRequest { ]; } -// Request message for [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue]. +// Request message for +// [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue]. message PauseQueueRequest { // Required. The queue name. For example: // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` @@ -547,7 +578,8 @@ message PauseQueueRequest { ]; } -// Request message for [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. +// Request message for +// [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. message ResumeQueueRequest { // Required. The queue name. For example: // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` @@ -559,7 +591,8 @@ message ResumeQueueRequest { ]; } -// Request message for listing tasks using [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]. +// Request message for listing tasks using +// [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]. message ListTasksRequest { // Required. The queue name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` @@ -570,25 +603,26 @@ message ListTasksRequest { } ]; - // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be - // returned. + // The response_view specifies which subset of the + // [Task][google.cloud.tasks.v2beta2.Task] will be returned. // - // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all - // information is retrieved by default because some data, such as - // payloads, might be desirable to return only when needed because - // of its large size or because of the sensitivity of data that it - // contains. + // By default response_view is + // [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + // retrieved by default because some data, such as payloads, might be + // desirable to return only when needed because of its large size or because + // of the sensitivity of data that it contains. // - // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires - // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - // permission on the [Task][google.cloud.tasks.v2beta2.Task] resource. + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + // requires `cloudtasks.tasks.fullView` [Google + // IAM](https://cloud.google.com/iam/) permission on the + // [Task][google.cloud.tasks.v2beta2.Task] resource. Task.View response_view = 2; // Maximum page size. // // Fewer tasks than requested might be returned, even if more tasks exist; use - // [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] in the response to - // determine if more tasks exist. + // [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] + // in the response to determine if more tasks exist. // // The maximum page size is 1000. If unspecified, the page size will be the // maximum. @@ -598,15 +632,16 @@ message ListTasksRequest { // // To request the first page results, page_token must be empty. To // request the next page of results, page_token must be the value of - // [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] returned - // from the previous call to [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] - // method. + // [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] + // returned from the previous call to + // [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] method. // // The page token is valid for only 2 hours. string page_token = 5; } -// Response message for listing tasks using [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]. +// Response message for listing tasks using +// [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]. message ListTasksResponse { // The list of tasks. repeated Task tasks = 1; @@ -614,40 +649,42 @@ message ListTasksResponse { // A token to retrieve next page of results. // // To return the next page of results, call - // [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] with this value as the + // [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] with this + // value as the // [page_token][google.cloud.tasks.v2beta2.ListTasksRequest.page_token]. // // If the next_page_token is empty, there are no more results. string next_page_token = 2; } -// Request message for getting a task using [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask]. +// Request message for getting a task using +// [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask]. message GetTaskRequest { // Required. The task name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudtasks.googleapis.com/Task" - } + (google.api.resource_reference) = { type: "cloudtasks.googleapis.com/Task" } ]; - // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be - // returned. + // The response_view specifies which subset of the + // [Task][google.cloud.tasks.v2beta2.Task] will be returned. // - // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all - // information is retrieved by default because some data, such as - // payloads, might be desirable to return only when needed because - // of its large size or because of the sensitivity of data that it - // contains. + // By default response_view is + // [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + // retrieved by default because some data, such as payloads, might be + // desirable to return only when needed because of its large size or because + // of the sensitivity of data that it contains. // - // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires - // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - // permission on the [Task][google.cloud.tasks.v2beta2.Task] resource. + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + // requires `cloudtasks.tasks.fullView` [Google + // IAM](https://cloud.google.com/iam/) permission on the + // [Task][google.cloud.tasks.v2beta2.Task] resource. Task.View response_view = 2; } -// Request message for [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. +// Request message for +// [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. message CreateTaskRequest { // Required. The queue name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` @@ -664,13 +701,13 @@ message CreateTaskRequest { // // Task names have the following format: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - // The user can optionally specify a task [name][google.cloud.tasks.v2beta2.Task.name]. If a - // name is not specified then the system will generate a random - // unique task id, which will be set in the task returned in the - // [response][google.cloud.tasks.v2beta2.Task.name]. + // The user can optionally specify a task + // [name][google.cloud.tasks.v2beta2.Task.name]. If a name is not specified + // then the system will generate a random unique task id, which will be set in + // the task returned in the [response][google.cloud.tasks.v2beta2.Task.name]. // - // If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not set or is in the - // past then Cloud Tasks will set it to the current time. + // If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not + // set or is in the past then Cloud Tasks will set it to the current time. // // Task De-duplication: // @@ -685,28 +722,29 @@ message CreateTaskRequest { // for ~9days after the original task was deleted or completed. // // Because there is an extra lookup cost to identify duplicate task - // names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] calls have significantly - // increased latency. Using hashed strings for the task id or for - // the prefix of the task id is recommended. Choosing task ids that - // are sequential or have sequential prefixes, for example using a + // names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] + // calls have significantly increased latency. Using hashed strings for the + // task id or for the prefix of the task id is recommended. Choosing task ids + // that are sequential or have sequential prefixes, for example using a // timestamp, causes an increase in latency and error rates in all // task commands. The infrastructure relies on an approximately // uniform distribution of task ids to store and serve tasks // efficiently. Task task = 2 [(google.api.field_behavior) = REQUIRED]; - // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be - // returned. + // The response_view specifies which subset of the + // [Task][google.cloud.tasks.v2beta2.Task] will be returned. // - // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all - // information is retrieved by default because some data, such as - // payloads, might be desirable to return only when needed because - // of its large size or because of the sensitivity of data that it - // contains. + // By default response_view is + // [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + // retrieved by default because some data, such as payloads, might be + // desirable to return only when needed because of its large size or because + // of the sensitivity of data that it contains. // - // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires - // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - // permission on the [Task][google.cloud.tasks.v2beta2.Task] resource. + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + // requires `cloudtasks.tasks.fullView` [Google + // IAM](https://cloud.google.com/iam/) permission on the + // [Task][google.cloud.tasks.v2beta2.Task] resource. Task.View response_view = 3; } @@ -717,13 +755,12 @@ message DeleteTaskRequest { // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudtasks.googleapis.com/Task" - } + (google.api.resource_reference) = { type: "cloudtasks.googleapis.com/Task" } ]; } -// Request message for leasing tasks using [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]. +// Request message for leasing tasks using +// [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]. message LeaseTasksRequest { // Required. The queue name. For example: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` @@ -741,56 +778,63 @@ message LeaseTasksRequest { // // The largest that `max_tasks` can be is 1000. // - // The maximum total size of a [lease tasks response][google.cloud.tasks.v2beta2.LeaseTasksResponse] is - // 32 MB. If the sum of all task sizes requested reaches this limit, - // fewer tasks than requested are returned. + // The maximum total size of a [lease tasks + // response][google.cloud.tasks.v2beta2.LeaseTasksResponse] is 32 MB. If the + // sum of all task sizes requested reaches this limit, fewer tasks than + // requested are returned. int32 max_tasks = 2; // Required. The duration of the lease. // - // Each task returned in the [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will - // have its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] set to the current - // time plus the `lease_duration`. The task is leased until its - // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]; thus, the task will not be - // returned to another [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call - // before its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. + // Each task returned in the + // [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will have its + // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] set to the + // current time plus the `lease_duration`. The task is leased until its + // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]; thus, the + // task will not be returned to another + // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call before + // its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. // // // After the worker has successfully finished the work associated // with the task, the worker must call via - // [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] before the - // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. Otherwise the task will be - // returned to a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so - // that another worker can retry it. + // [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] + // before the [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. + // Otherwise the task will be returned to a later + // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so that + // another worker can retry it. // // The maximum lease duration is 1 week. // `lease_duration` will be truncated to the nearest second. - google.protobuf.Duration lease_duration = 3 [(google.api.field_behavior) = REQUIRED]; - - // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be - // returned. - // - // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all - // information is retrieved by default because some data, such as - // payloads, might be desirable to return only when needed because - // of its large size or because of the sensitivity of data that it - // contains. - // - // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires - // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - // permission on the [Task][google.cloud.tasks.v2beta2.Task] resource. + google.protobuf.Duration lease_duration = 3 + [(google.api.field_behavior) = REQUIRED]; + + // The response_view specifies which subset of the + // [Task][google.cloud.tasks.v2beta2.Task] will be returned. + // + // By default response_view is + // [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + // retrieved by default because some data, such as payloads, might be + // desirable to return only when needed because of its large size or because + // of the sensitivity of data that it contains. + // + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + // requires `cloudtasks.tasks.fullView` [Google + // IAM](https://cloud.google.com/iam/) permission on the + // [Task][google.cloud.tasks.v2beta2.Task] resource. Task.View response_view = 4; // `filter` can be used to specify a subset of tasks to lease. // // When `filter` is set to `tag=` then the - // [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will contain only tasks whose - // [tag][google.cloud.tasks.v2beta2.PullMessage.tag] is equal to ``. `` must be - // less than 500 characters. + // [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will contain only + // tasks whose [tag][google.cloud.tasks.v2beta2.PullMessage.tag] is equal to + // ``. `` must be less than 500 characters. // // When `filter` is set to `tag_function=oldest_tag()`, only tasks which have // the same tag as the task with the oldest - // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be returned. + // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be + // returned. // // Grammar Syntax: // @@ -808,12 +852,14 @@ message LeaseTasksRequest { // [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), // only UTF-8 encoded tags can be used in Cloud Tasks. Tag which // aren't UTF-8 encoded can't be used in the - // [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter] and the task's - // [tag][google.cloud.tasks.v2beta2.PullMessage.tag] will be displayed as empty in Cloud Tasks. + // [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter] and the + // task's [tag][google.cloud.tasks.v2beta2.PullMessage.tag] will be displayed + // as empty in Cloud Tasks. string filter = 5; } -// Response message for leasing tasks using [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]. +// Response message for leasing tasks using +// [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]. message LeaseTasksResponse { // The leased tasks. repeated Task tasks = 1; @@ -826,17 +872,16 @@ message AcknowledgeTaskRequest { // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudtasks.googleapis.com/Task" - } + (google.api.resource_reference) = { type: "cloudtasks.googleapis.com/Task" } ]; // Required. The task's current schedule time, available in the // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or - // [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is - // to ensure that your worker currently holds the lease. - google.protobuf.Timestamp schedule_time = 2 [(google.api.field_behavior) = REQUIRED]; + // [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. + // This restriction is to ensure that your worker currently holds the lease. + google.protobuf.Timestamp schedule_time = 2 + [(google.api.field_behavior) = REQUIRED]; } // Request message for renewing a lease using @@ -846,37 +891,38 @@ message RenewLeaseRequest { // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudtasks.googleapis.com/Task" - } + (google.api.resource_reference) = { type: "cloudtasks.googleapis.com/Task" } ]; // Required. The task's current schedule time, available in the // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or - // [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is - // to ensure that your worker currently holds the lease. - google.protobuf.Timestamp schedule_time = 2 [(google.api.field_behavior) = REQUIRED]; + // [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. + // This restriction is to ensure that your worker currently holds the lease. + google.protobuf.Timestamp schedule_time = 2 + [(google.api.field_behavior) = REQUIRED]; // Required. The desired new lease duration, starting from now. // // // The maximum lease duration is 1 week. // `lease_duration` will be truncated to the nearest second. - google.protobuf.Duration lease_duration = 3 [(google.api.field_behavior) = REQUIRED]; - - // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be - // returned. - // - // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all - // information is retrieved by default because some data, such as - // payloads, might be desirable to return only when needed because - // of its large size or because of the sensitivity of data that it - // contains. - // - // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires - // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - // permission on the [Task][google.cloud.tasks.v2beta2.Task] resource. + google.protobuf.Duration lease_duration = 3 + [(google.api.field_behavior) = REQUIRED]; + + // The response_view specifies which subset of the + // [Task][google.cloud.tasks.v2beta2.Task] will be returned. + // + // By default response_view is + // [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + // retrieved by default because some data, such as payloads, might be + // desirable to return only when needed because of its large size or because + // of the sensitivity of data that it contains. + // + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + // requires `cloudtasks.tasks.fullView` [Google + // IAM](https://cloud.google.com/iam/) permission on the + // [Task][google.cloud.tasks.v2beta2.Task] resource. Task.View response_view = 4; } @@ -887,30 +933,30 @@ message CancelLeaseRequest { // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudtasks.googleapis.com/Task" - } + (google.api.resource_reference) = { type: "cloudtasks.googleapis.com/Task" } ]; // Required. The task's current schedule time, available in the // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or - // [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is - // to ensure that your worker currently holds the lease. - google.protobuf.Timestamp schedule_time = 2 [(google.api.field_behavior) = REQUIRED]; - - // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be - // returned. - // - // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all - // information is retrieved by default because some data, such as - // payloads, might be desirable to return only when needed because - // of its large size or because of the sensitivity of data that it - // contains. - // - // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires - // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - // permission on the [Task][google.cloud.tasks.v2beta2.Task] resource. + // [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. + // This restriction is to ensure that your worker currently holds the lease. + google.protobuf.Timestamp schedule_time = 2 + [(google.api.field_behavior) = REQUIRED]; + + // The response_view specifies which subset of the + // [Task][google.cloud.tasks.v2beta2.Task] will be returned. + // + // By default response_view is + // [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + // retrieved by default because some data, such as payloads, might be + // desirable to return only when needed because of its large size or because + // of the sensitivity of data that it contains. + // + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + // requires `cloudtasks.tasks.fullView` [Google + // IAM](https://cloud.google.com/iam/) permission on the + // [Task][google.cloud.tasks.v2beta2.Task] resource. Task.View response_view = 3; } @@ -921,22 +967,21 @@ message RunTaskRequest { // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudtasks.googleapis.com/Task" - } + (google.api.resource_reference) = { type: "cloudtasks.googleapis.com/Task" } ]; - // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be - // returned. + // The response_view specifies which subset of the + // [Task][google.cloud.tasks.v2beta2.Task] will be returned. // - // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all - // information is retrieved by default because some data, such as - // payloads, might be desirable to return only when needed because - // of its large size or because of the sensitivity of data that it - // contains. + // By default response_view is + // [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + // retrieved by default because some data, such as payloads, might be + // desirable to return only when needed because of its large size or because + // of the sensitivity of data that it contains. // - // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires - // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - // permission on the [Task][google.cloud.tasks.v2beta2.Task] resource. + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + // requires `cloudtasks.tasks.fullView` [Google + // IAM](https://cloud.google.com/iam/) permission on the + // [Task][google.cloud.tasks.v2beta2.Task] resource. Task.View response_view = 2; } diff --git a/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta2/queue.proto b/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta2/queue.proto index 3c1c347574e..0872bff0379 100644 --- a/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta2/queue.proto +++ b/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta2/queue.proto @@ -22,7 +22,7 @@ import "google/cloud/tasks/v2beta2/target.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; -option go_package = "cloud.google.com/go/tasks/apiv2beta2/taskspb;taskspb"; +option go_package = "cloud.google.com/go/cloudtasks/apiv2beta2/cloudtaskspb;cloudtaskspb"; option java_multiple_files = true; option java_outer_classname = "QueueProto"; option java_package = "com.google.cloud.tasks.v2beta2"; @@ -54,8 +54,8 @@ message Queue { // Tasks are paused by the user. If the queue is paused then Cloud // Tasks will stop delivering tasks from it, but more tasks can // still be added to it by the user. When a pull queue is paused, - // all [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] calls will return a - // [FAILED_PRECONDITION][google.rpc.Code.FAILED_PRECONDITION]. + // all [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] calls + // will return a [FAILED_PRECONDITION][google.rpc.Code.FAILED_PRECONDITION]. PAUSED = 2; // The queue is disabled. @@ -69,16 +69,17 @@ message Queue { // // When a queue is disabled, tasks can still be added to a queue // but the tasks are not dispatched and - // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] calls return a - // `FAILED_PRECONDITION` error. + // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] calls + // return a `FAILED_PRECONDITION` error. // // To permanently delete this queue and all of its tasks, call // [DeleteQueue][google.cloud.tasks.v2beta2.CloudTasks.DeleteQueue]. DISABLED = 3; } - // Caller-specified and required in [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue], - // after which it becomes output only. + // Caller-specified and required in + // [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue], after + // which it becomes output only. // // The queue name. // @@ -98,9 +99,10 @@ message Queue { // hyphens (-). The maximum length is 100 characters. string name = 1; - // Caller-specified and required in [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue][], - // after which the queue config type becomes output only, though fields within - // the config are mutable. + // Caller-specified and required in + // [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue][], after + // which the queue config type becomes output only, though fields within the + // config are mutable. // // The queue's target. // @@ -108,30 +110,34 @@ message Queue { oneof target_type { // App Engine HTTP target. // - // An App Engine queue is a queue that has an [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget]. + // An App Engine queue is a queue that has an + // [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget]. AppEngineHttpTarget app_engine_http_target = 3; // Pull target. // - // A pull queue is a queue that has a [PullTarget][google.cloud.tasks.v2beta2.PullTarget]. + // A pull queue is a queue that has a + // [PullTarget][google.cloud.tasks.v2beta2.PullTarget]. PullTarget pull_target = 4; } // Rate limits for task dispatches. // // [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] and - // [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] are related because they both - // control task attempts however they control how tasks are + // [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] are related + // because they both control task attempts however they control how tasks are // attempted in different ways: // - // * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] controls the total rate of + // * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] controls the + // total rate of // dispatches from a queue (i.e. all traffic dispatched from the // queue, regardless of whether the dispatch is from a first // attempt or a retry). - // * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls what happens to + // * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls + // what happens to // particular a task after its first attempt fails. That is, - // [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls task retries (the - // second attempt, third attempt, etc). + // [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls + // task retries (the second attempt, third attempt, etc). RateLimits rate_limits = 5; // Settings that determine the retry behavior. @@ -150,18 +156,21 @@ message Queue { // // `state` can only be changed by calling // [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue], - // [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or uploading + // [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or + // uploading // [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). - // [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] cannot be used to change `state`. + // [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] cannot be + // used to change `state`. State state = 7; // Output only. The last time this queue was purged. // - // All tasks that were [created][google.cloud.tasks.v2beta2.Task.create_time] before this time - // were purged. + // All tasks that were [created][google.cloud.tasks.v2beta2.Task.create_time] + // before this time were purged. // - // A queue can be purged using [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue], the - // [App Engine Task Queue SDK, or the Cloud + // A queue can be purged using + // [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue], the [App + // Engine Task Queue SDK, or the Cloud // Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). // // Purge time will be truncated to the nearest microsecond. Purge @@ -205,19 +214,24 @@ message Queue { // This message determines the maximum rate that tasks can be dispatched by a // queue, regardless of whether the dispatch is a first task attempt or a retry. // -// Note: The debugging command, [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask], will run a task -// even if the queue has reached its [RateLimits][google.cloud.tasks.v2beta2.RateLimits]. +// Note: The debugging command, +// [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask], will run a task +// even if the queue has reached its +// [RateLimits][google.cloud.tasks.v2beta2.RateLimits]. message RateLimits { // The maximum rate at which tasks are dispatched from this queue. // // If unspecified when the queue is created, Cloud Tasks will pick the // default. // - // * For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], the maximum allowed value + // * For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], + // the maximum allowed value // is 500. - // * This field is output only for [pull queues][google.cloud.tasks.v2beta2.PullTarget]. In addition to the + // * This field is output only for [pull + // queues][google.cloud.tasks.v2beta2.PullTarget]. In addition to the // `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of - // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] requests are allowed per pull queue. + // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] requests + // are allowed per pull queue. // // // This field has the same meaning as @@ -252,11 +266,11 @@ message RateLimits { // `queue.yaml/xml`, `max_burst_size` is equal to // [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). // If - // [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called on a queue without - // explicitly setting a value for `max_burst_size`, + // [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called + // on a queue without explicitly setting a value for `max_burst_size`, // `max_burst_size` value will get updated if - // [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is updating - // [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. + // [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is + // updating [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. // int32 max_burst_size = 2; @@ -272,8 +286,9 @@ message RateLimits { // The maximum allowed value is 5,000. // // This field is output only for - // [pull queues][google.cloud.tasks.v2beta2.PullTarget] and always -1, which indicates no limit. No other - // queue types can have `max_concurrent_tasks` set to -1. + // [pull queues][google.cloud.tasks.v2beta2.PullTarget] and always -1, which + // indicates no limit. No other queue types can have `max_concurrent_tasks` + // set to -1. // // // This field has the same meaning as @@ -311,16 +326,17 @@ message RetryConfig { // If positive, `max_retry_duration` specifies the time limit for // retrying a failed task, measured from when the task was first // attempted. Once `max_retry_duration` time has passed *and* the - // task has been attempted [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] - // times, no further attempts will be made and the task will be - // deleted. + // task has been attempted + // [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times, + // no further attempts will be made and the task will be deleted. // // If zero, then the task age is unlimited. // // If unspecified when the queue is created, Cloud Tasks will pick the // default. // - // This field is output only for [pull queues][google.cloud.tasks.v2beta2.PullTarget]. + // This field is output only for [pull + // queues][google.cloud.tasks.v2beta2.PullTarget]. // // // `max_retry_duration` will be truncated to the nearest second. @@ -330,16 +346,19 @@ message RetryConfig { // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). google.protobuf.Duration max_retry_duration = 3; - // A task will be [scheduled][google.cloud.tasks.v2beta2.Task.schedule_time] for retry between + // A task will be [scheduled][google.cloud.tasks.v2beta2.Task.schedule_time] + // for retry between // [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and - // [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails, - // if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be - // retried. + // [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration + // after it fails, if the queue's + // [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the + // task should be retried. // // If unspecified when the queue is created, Cloud Tasks will pick the // default. // - // This field is output only for [pull queues][google.cloud.tasks.v2beta2.PullTarget]. + // This field is output only for [pull + // queues][google.cloud.tasks.v2beta2.PullTarget]. // // // `min_backoff` will be truncated to the nearest second. @@ -349,16 +368,19 @@ message RetryConfig { // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). google.protobuf.Duration min_backoff = 4; - // A task will be [scheduled][google.cloud.tasks.v2beta2.Task.schedule_time] for retry between + // A task will be [scheduled][google.cloud.tasks.v2beta2.Task.schedule_time] + // for retry between // [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and - // [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails, - // if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be - // retried. + // [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration + // after it fails, if the queue's + // [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the + // task should be retried. // // If unspecified when the queue is created, Cloud Tasks will pick the // default. // - // This field is output only for [pull queues][google.cloud.tasks.v2beta2.PullTarget]. + // This field is output only for [pull + // queues][google.cloud.tasks.v2beta2.PullTarget]. // // // `max_backoff` will be truncated to the nearest second. @@ -371,26 +393,29 @@ message RetryConfig { // The time between retries will double `max_doublings` times. // // A task's retry interval starts at - // [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff], then doubles - // `max_doublings` times, then increases linearly, and finally - // retries at intervals of + // [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff], then + // doubles `max_doublings` times, then increases linearly, and finally retries + // at intervals of // [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] up to // [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times. // - // For example, if [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] is 10s, - // [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] is 300s, and - // `max_doublings` is 3, then the a task will first be retried in - // 10s. The retry interval will double three times, and then - // increase linearly by 2^3 * 10s. Finally, the task will retry at - // intervals of [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] until the - // task has been attempted [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] - // times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, - // 240s, 300s, 300s, .... + // For example, if + // [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] is 10s, + // [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] is 300s, + // and `max_doublings` is 3, then the a task will first be retried in 10s. The + // retry interval will double three times, and then increase linearly by 2^3 * + // 10s. Finally, the task will retry at intervals of + // [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] until the + // task has been attempted + // [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times. + // Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, + // 300s, .... // // If unspecified when the queue is created, Cloud Tasks will pick the // default. // - // This field is output only for [pull queues][google.cloud.tasks.v2beta2.PullTarget]. + // This field is output only for [pull + // queues][google.cloud.tasks.v2beta2.PullTarget]. // // // This field has the same meaning as @@ -401,28 +426,32 @@ message RetryConfig { // Statistics for a queue. message QueueStats { - // Output only. An estimation of the number of tasks in the queue, that is, the tasks in - // the queue that haven't been executed, the tasks in the queue which the - // queue has dispatched but has not yet received a reply for, and the failed - // tasks that the queue is retrying. + // Output only. An estimation of the number of tasks in the queue, that is, + // the tasks in the queue that haven't been executed, the tasks in the queue + // which the queue has dispatched but has not yet received a reply for, and + // the failed tasks that the queue is retrying. int64 tasks_count = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. An estimation of the nearest time in the future where a task in the queue - // is scheduled to be executed. - google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The number of tasks that the queue has dispatched and received a reply for - // during the last minute. This variable counts both successful and - // non-successful executions. - int64 executed_last_minute_count = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The number of requests that the queue has dispatched but has not received - // a reply for yet. - int64 concurrent_dispatches_count = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The current maximum number of tasks per second executed by the queue. - // The maximum value of this variable is controlled by the RateLimits of the - // Queue. However, this value could be less to avoid overloading the endpoints - // tasks in the queue are targeting. - double effective_execution_rate = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. An estimation of the nearest time in the future where a task + // in the queue is scheduled to be executed. + google.protobuf.Timestamp oldest_estimated_arrival_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of tasks that the queue has dispatched and received + // a reply for during the last minute. This variable counts both successful + // and non-successful executions. + int64 executed_last_minute_count = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of requests that the queue has dispatched but has + // not received a reply for yet. + int64 concurrent_dispatches_count = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current maximum number of tasks per second executed by the + // queue. The maximum value of this variable is controlled by the RateLimits + // of the Queue. However, this value could be less to avoid overloading the + // endpoints tasks in the queue are targeting. + double effective_execution_rate = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta2/target.proto b/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta2/target.proto index e9fb4e5623f..b200f24410e 100644 --- a/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta2/target.proto +++ b/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta2/target.proto @@ -16,19 +16,17 @@ syntax = "proto3"; package google.cloud.tasks.v2beta2; - -option go_package = "cloud.google.com/go/tasks/apiv2beta2/taskspb;taskspb"; +option go_package = "cloud.google.com/go/cloudtasks/apiv2beta2/cloudtaskspb;cloudtaskspb"; option java_multiple_files = true; option java_outer_classname = "TargetProto"; option java_package = "com.google.cloud.tasks.v2beta2"; // Pull target. -message PullTarget { - -} +message PullTarget {} // The pull message contains data that can be used by the caller of -// [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process the task. +// [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process the +// task. // // This proto can only be used for tasks in a queue which has // [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] set. @@ -40,10 +38,11 @@ message PullMessage { // // Tags allow similar tasks to be processed in a batch. If you label // tasks with a tag, your worker can - // [lease tasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] with the same tag using - // [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter]. For example, if you want to - // aggregate the events associated with a specific user once a day, - // you could tag tasks with the user ID. + // [lease tasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] with the + // same tag using + // [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter]. For example, + // if you want to aggregate the events associated with a specific user once a + // day, you could tag tasks with the user ID. // // The task's tag can only be set when the // [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. @@ -61,11 +60,15 @@ message PullMessage { // App Engine HTTP target. // // The task will be delivered to the App Engine application hostname -// specified by its [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget] and [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest]. -// The documentation for [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] explains how the -// task's host URL is constructed. +// specified by its +// [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget] and +// [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest]. The +// documentation for +// [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] +// explains how the task's host URL is constructed. // -// Using [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget] requires +// Using [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget] +// requires // [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) // Google IAM permission for the project // and the following scope: @@ -73,11 +76,13 @@ message PullMessage { // `https://www.googleapis.com/auth/cloud-platform` message AppEngineHttpTarget { // Overrides for the - // [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. + // [task-level + // app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. // // If set, `app_engine_routing_override` is used for all tasks in // the queue, no matter what the setting is for the - // [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. + // [task-level + // app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. AppEngineRouting app_engine_routing_override = 1; } @@ -87,9 +92,11 @@ message AppEngineHttpTarget { // the task is dispatched. // // This proto can only be used for tasks in a queue which has -// [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] set. +// [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] +// set. // -// Using [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] requires +// Using [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] +// requires // [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) // Google IAM permission for the project // and the following scope: @@ -109,14 +116,16 @@ message AppEngineHttpTarget { // The request to the handler, however, will appear to have used the HTTP // protocol. // -// The [AppEngineRouting][google.cloud.tasks.v2beta2.AppEngineRouting] used to construct the URL that the task is -// delivered to can be set at the queue-level or task-level: +// The [AppEngineRouting][google.cloud.tasks.v2beta2.AppEngineRouting] used to +// construct the URL that the task is delivered to can be set at the queue-level +// or task-level: // // * If set, // [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override] // is used for all tasks in the queue, no matter what the setting // is for the -// [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. +// [task-level +// app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. // // // The `url` that the task will be sent to is: @@ -139,12 +148,12 @@ message AppEngineHttpTarget { // the app's handler returns a non-2xx response code or Cloud Tasks does // not receive response before the [deadline][Task.dispatch_deadline]. Failed // tasks will be retried according to the -// [retry configuration][google.cloud.tasks.v2beta2.Queue.retry_config]. `503` (Service Unavailable) is -// considered an App Engine system error instead of an application error and -// will cause Cloud Tasks' traffic congestion control to temporarily throttle -// the queue's dispatches. Unlike other types of task targets, a `429` (Too Many -// Requests) response from an app handler does not cause traffic congestion -// control to throttle the queue. +// [retry configuration][google.cloud.tasks.v2beta2.Queue.retry_config]. `503` +// (Service Unavailable) is considered an App Engine system error instead of an +// application error and will cause Cloud Tasks' traffic congestion control to +// temporarily throttle the queue's dispatches. Unlike other types of task +// targets, a `429` (Too Many Requests) response from an app handler does not +// cause traffic congestion control to throttle the queue. message AppEngineHttpRequest { // The HTTP method to use for the request. The default is POST. // @@ -161,7 +170,8 @@ message AppEngineHttpRequest { // If set, // [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override] // is used for all tasks in the queue, no matter what the setting is for the - // [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. + // [task-level + // app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. AppEngineRouting app_engine_routing = 2; // The relative URL. @@ -187,7 +197,8 @@ message AppEngineHttpRequest { // `"AppEngine-Google; (+http://code.google.com/appengine)"` to the // modified `User-Agent`. // - // If the task has a [payload][google.cloud.tasks.v2beta2.AppEngineHttpRequest.payload], Cloud + // If the task has a + // [payload][google.cloud.tasks.v2beta2.AppEngineHttpRequest.payload], Cloud // Tasks sets the following headers: // // * `Content-Type`: By default, the `Content-Type` header is set to @@ -212,8 +223,10 @@ message AppEngineHttpRequest { // visible when the task is returned in a Cloud Tasks response. // // Although there is no specific limit for the maximum number of headers or - // the size, there is a limit on the maximum size of the [Task][google.cloud.tasks.v2beta2.Task]. For more - // information, see the [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] documentation. + // the size, there is a limit on the maximum size of the + // [Task][google.cloud.tasks.v2beta2.Task]. For more information, see the + // [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] + // documentation. map headers = 4; // Payload. @@ -246,16 +259,18 @@ message AppEngineRouting { // service when the task is attempted. // // For some queues or tasks which were created using the App Engine - // Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable - // into [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], - // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and - // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For example, some tasks - // which were created using the App Engine SDK use a custom domain - // name; custom domains are not parsed by Cloud Tasks. If - // [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, then + // Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is + // not parsable into // [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and - // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the empty string. + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For + // example, some tasks which were created using the App Engine SDK use a + // custom domain name; custom domains are not parsed by Cloud Tasks. If + // [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, + // then [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the + // empty string. string service = 1; // App version. @@ -264,16 +279,18 @@ message AppEngineRouting { // version when the task is attempted. // // For some queues or tasks which were created using the App Engine - // Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable - // into [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], - // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and - // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For example, some tasks - // which were created using the App Engine SDK use a custom domain - // name; custom domains are not parsed by Cloud Tasks. If - // [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, then + // Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is + // not parsable into // [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and - // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the empty string. + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For + // example, some tasks which were created using the App Engine SDK use a + // custom domain name; custom domains are not parsed by Cloud Tasks. If + // [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, + // then [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the + // empty string. string version = 2; // App instance. @@ -314,44 +331,49 @@ message AppEngineRouting { // queue's project ID. Some tasks which were created using the App Engine // SDK use a custom domain name. // - // * `service =` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + // * `service =` + // [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] // - // * `version =` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] + // * `version =` + // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] // // * `version_dot_service =` // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +` // [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] // - // * `instance =` [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] + // * `instance =` + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] // // * `instance_dot_service =` - // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +` - // [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' + // +` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] // // * `instance_dot_version =` - // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +` - // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' + // +` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] // // * `instance_dot_version_dot_service =` - // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +` - // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +` - // [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' + // +` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' + // +` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] // - // If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] is empty, then the task will be sent - // to the service which is the default service when the task is attempted. + // If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] is empty, + // then the task will be sent to the service which is the default service when + // the task is attempted. // - // If [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] is empty, then the task will be sent - // to the version which is the default version when the task is attempted. + // If [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] is empty, + // then the task will be sent to the version which is the default version when + // the task is attempted. // - // If [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is empty, then the task - // will be sent to an instance which is available when the task is - // attempted. + // If [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is + // empty, then the task will be sent to an instance which is available when + // the task is attempted. // // If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], or - // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is invalid, then the task - // will be sent to the default version of the default service when - // the task is attempted. + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is + // invalid, then the task will be sent to the default version of the default + // service when the task is attempted. string host = 4; } diff --git a/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta2/task.proto b/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta2/task.proto index 6dc48cdb84d..7e68106bac6 100644 --- a/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta2/task.proto +++ b/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta2/task.proto @@ -21,7 +21,7 @@ import "google/cloud/tasks/v2beta2/target.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; -option go_package = "cloud.google.com/go/tasks/apiv2beta2/taskspb;taskspb"; +option go_package = "cloud.google.com/go/cloudtasks/apiv2beta2/cloudtaskspb;cloudtaskspb"; option java_multiple_files = true; option java_outer_classname = "TaskProto"; option java_package = "com.google.cloud.tasks.v2beta2"; @@ -33,7 +33,8 @@ message Task { pattern: "projects/{project}/locations/{location}/queues/{queue}/tasks/{task}" }; - // The view specifies a subset of [Task][google.cloud.tasks.v2beta2.Task] data. + // The view specifies a subset of [Task][google.cloud.tasks.v2beta2.Task] + // data. // // When a task is returned in a response, not all // information is retrieved by default because some data, such as @@ -48,22 +49,26 @@ message Task { // sensitive data. // // This view does not include the - // ([payload in AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] and - // [payload in PullMessage][google.cloud.tasks.v2beta2.PullMessage.payload]). These payloads are - // desirable to return only when needed, because they can be large - // and because of the sensitivity of the data that you choose to - // store in it. + // ([payload in + // AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] + // and [payload in + // PullMessage][google.cloud.tasks.v2beta2.PullMessage.payload]). These + // payloads are desirable to return only when needed, because they can be + // large and because of the sensitivity of the data that you choose to store + // in it. BASIC = 1; // All information is returned. // - // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires - // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - // permission on the [Queue][google.cloud.tasks.v2beta2.Queue] resource. + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + // requires `cloudtasks.tasks.fullView` [Google + // IAM](https://cloud.google.com/iam/) permission on the + // [Queue][google.cloud.tasks.v2beta2.Queue] resource. FULL = 2; } - // Optionally caller-specified in [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. + // Optionally caller-specified in + // [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. // // The task name. // @@ -92,16 +97,21 @@ message Task { oneof payload_type { // App Engine HTTP request that is sent to the task's target. Can // be set only if - // [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] is set - // on the queue. + // [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] + // is set on the queue. // - // An App Engine task is a task that has [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] set. + // An App Engine task is a task that has + // [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] + // set. AppEngineHttpRequest app_engine_http_request = 3; - // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process the task. Can be - // set only if [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] is set on the queue. + // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process + // the task. Can be set only if + // [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] is set on the + // queue. // - // A pull task is a task that has [PullMessage][google.cloud.tasks.v2beta2.PullMessage] set. + // A pull task is a task that has + // [PullMessage][google.cloud.tasks.v2beta2.PullMessage] set. PullMessage pull_message = 4; } @@ -112,7 +122,8 @@ message Task { // For pull queues, this is the time when the task is available to // be leased; if a task is currently leased, this is the time when // the current lease expires, that is, the time that the task was - // leased plus the [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration]. + // leased plus the + // [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration]. // // `schedule_time` will be truncated to the nearest microsecond. google.protobuf.Timestamp schedule_time = 5; @@ -125,8 +136,8 @@ message Task { // Output only. The task status. TaskStatus status = 7; - // Output only. The view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] has - // been returned. + // Output only. The view specifies which subset of the + // [Task][google.cloud.tasks.v2beta2.Task] has been returned. View view = 8; } @@ -140,20 +151,26 @@ message TaskStatus { // Output only. The number of attempts which have received a response. // - // This field is not calculated for [pull tasks][google.cloud.tasks.v2beta2.PullMessage]. + // This field is not calculated for [pull + // tasks][google.cloud.tasks.v2beta2.PullMessage]. int32 attempt_response_count = 2; // Output only. The status of the task's first attempt. // - // Only [dispatch_time][google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time] will be set. - // The other [AttemptStatus][google.cloud.tasks.v2beta2.AttemptStatus] information is not retained by Cloud Tasks. + // Only + // [dispatch_time][google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time] + // will be set. The other + // [AttemptStatus][google.cloud.tasks.v2beta2.AttemptStatus] information is + // not retained by Cloud Tasks. // - // This field is not calculated for [pull tasks][google.cloud.tasks.v2beta2.PullMessage]. + // This field is not calculated for [pull + // tasks][google.cloud.tasks.v2beta2.PullMessage]. AttemptStatus first_attempt_status = 3; // Output only. The status of the task's last attempt. // - // This field is not calculated for [pull tasks][google.cloud.tasks.v2beta2.PullMessage]. + // This field is not calculated for [pull + // tasks][google.cloud.tasks.v2beta2.PullMessage]. AttemptStatus last_attempt_status = 4; } diff --git a/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta3/cloudtasks.proto b/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta3/cloudtasks.proto index 80c8cf9db95..78605971bbb 100644 --- a/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta3/cloudtasks.proto +++ b/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta3/cloudtasks.proto @@ -27,7 +27,7 @@ import "google/iam/v1/policy.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; -option go_package = "cloud.google.com/go/tasks/apiv2beta3/taskspb;taskspb"; +option go_package = "cloud.google.com/go/cloudtasks/apiv2beta3/cloudtaskspb;cloudtaskspb"; option java_multiple_files = true; option java_outer_classname = "CloudTasksProto"; option java_package = "com.google.cloud.tasks.v2beta3"; diff --git a/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta3/queue.proto b/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta3/queue.proto index 1b0f5f63757..573d2ca2fe4 100644 --- a/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta3/queue.proto +++ b/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta3/queue.proto @@ -22,7 +22,7 @@ import "google/cloud/tasks/v2beta3/target.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; -option go_package = "cloud.google.com/go/tasks/apiv2beta3/taskspb;taskspb"; +option go_package = "cloud.google.com/go/cloudtasks/apiv2beta3/cloudtaskspb;cloudtaskspb"; option java_multiple_files = true; option java_outer_classname = "QueueProto"; option java_package = "com.google.cloud.tasks.v2beta3"; @@ -85,8 +85,9 @@ message Queue { PUSH = 2; } - // Caller-specified and required in [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue], - // after which it becomes output only. + // Caller-specified and required in + // [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue], after + // which it becomes output only. // // The queue name. // @@ -107,31 +108,37 @@ message Queue { string name = 1; oneof queue_type { - // [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] settings apply only to - // [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue. - // [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by this proto. + // [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] + // settings apply only to [App Engine + // tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue. + // [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by + // this proto. AppEngineHttpQueue app_engine_http_queue = 3; } // Rate limits for task dispatches. // - // [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] and [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] are - // related because they both control task attempts. However they control task - // attempts in different ways: + // [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] and + // [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] are related + // because they both control task attempts. However they control task attempts + // in different ways: // - // * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] controls the total rate of + // * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] controls the + // total rate of // dispatches from a queue (i.e. all traffic dispatched from the // queue, regardless of whether the dispatch is from a first // attempt or a retry). - // * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls what happens to + // * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls + // what happens to // particular a task after its first attempt fails. That is, - // [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls task retries (the - // second attempt, third attempt, etc). + // [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls + // task retries (the second attempt, third attempt, etc). // // The queue's actual dispatch rate is the result of: // // * Number of tasks in the queue - // * User-specified throttling: [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits], + // * User-specified throttling: + // [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits], // [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config], and the // [queue's state][google.cloud.tasks.v2beta3.Queue.state]. // * System throttling due to `429` (Too Many Requests) or `503` (Service @@ -155,18 +162,21 @@ message Queue { // // `state` can only be changed by calling // [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue], - // [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue], or uploading + // [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue], or + // uploading // [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). - // [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] cannot be used to change `state`. + // [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] cannot be + // used to change `state`. State state = 6; // Output only. The last time this queue was purged. // - // All tasks that were [created][google.cloud.tasks.v2beta3.Task.create_time] before this time - // were purged. + // All tasks that were [created][google.cloud.tasks.v2beta3.Task.create_time] + // before this time were purged. // - // A queue can be purged using [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue], the - // [App Engine Task Queue SDK, or the Cloud + // A queue can be purged using + // [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue], the [App + // Engine Task Queue SDK, or the Cloud // Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). // // Purge time will be truncated to the nearest microsecond. Purge @@ -222,15 +232,18 @@ message Queue { // This message determines the maximum rate that tasks can be dispatched by a // queue, regardless of whether the dispatch is a first task attempt or a retry. // -// Note: The debugging command, [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask], will run a task -// even if the queue has reached its [RateLimits][google.cloud.tasks.v2beta3.RateLimits]. +// Note: The debugging command, +// [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask], will run a task +// even if the queue has reached its +// [RateLimits][google.cloud.tasks.v2beta3.RateLimits]. message RateLimits { // The maximum rate at which tasks are dispatched from this queue. // // If unspecified when the queue is created, Cloud Tasks will pick the // default. // - // * For [App Engine queues][google.cloud.tasks.v2beta3.AppEngineHttpQueue], the maximum allowed value + // * For [App Engine queues][google.cloud.tasks.v2beta3.AppEngineHttpQueue], + // the maximum allowed value // is 500. // // @@ -266,10 +279,11 @@ message RateLimits { // `queue.yaml/xml`, `max_burst_size` is equal to // [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). // If - // [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is called on a queue without - // explicitly setting a value for `max_burst_size`, + // [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is called + // on a queue without explicitly setting a value for `max_burst_size`, // `max_burst_size` value will get updated if - // [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is updating + // [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is + // updating // [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]. // int32 max_burst_size = 2; @@ -315,9 +329,9 @@ message RetryConfig { // If positive, `max_retry_duration` specifies the time limit for // retrying a failed task, measured from when the task was first // attempted. Once `max_retry_duration` time has passed *and* the - // task has been attempted [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] - // times, no further attempts will be made and the task will be - // deleted. + // task has been attempted + // [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times, + // no further attempts will be made and the task will be deleted. // // If zero, then the task age is unlimited. // @@ -332,11 +346,13 @@ message RetryConfig { // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). google.protobuf.Duration max_retry_duration = 2; - // A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] for retry between + // A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] + // for retry between // [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and - // [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration after it fails, - // if the queue's [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the task should be - // retried. + // [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration + // after it fails, if the queue's + // [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the + // task should be retried. // // If unspecified when the queue is created, Cloud Tasks will pick the // default. @@ -349,11 +365,13 @@ message RetryConfig { // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). google.protobuf.Duration min_backoff = 3; - // A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] for retry between + // A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] + // for retry between // [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and - // [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration after it fails, - // if the queue's [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the task should be - // retried. + // [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration + // after it fails, if the queue's + // [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the + // task should be retried. // // If unspecified when the queue is created, Cloud Tasks will pick the // default. @@ -369,21 +387,23 @@ message RetryConfig { // The time between retries will double `max_doublings` times. // // A task's retry interval starts at - // [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff], then doubles - // `max_doublings` times, then increases linearly, and finally - // retries at intervals of + // [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff], then + // doubles `max_doublings` times, then increases linearly, and finally retries + // at intervals of // [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] up to // [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times. // - // For example, if [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] is 10s, - // [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] is 300s, and - // `max_doublings` is 3, then the a task will first be retried in - // 10s. The retry interval will double three times, and then - // increase linearly by 2^3 * 10s. Finally, the task will retry at - // intervals of [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] until the - // task has been attempted [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] - // times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, - // 240s, 300s, 300s, .... + // For example, if + // [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] is 10s, + // [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] is 300s, + // and `max_doublings` is 3, then the a task will first be retried in 10s. The + // retry interval will double three times, and then increase linearly by 2^3 * + // 10s. Finally, the task will retry at intervals of + // [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] until the + // task has been attempted + // [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times. + // Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, + // 300s, .... // // If unspecified when the queue is created, Cloud Tasks will pick the // default. @@ -407,28 +427,32 @@ message StackdriverLoggingConfig { // Statistics for a queue. message QueueStats { - // Output only. An estimation of the number of tasks in the queue, that is, the tasks in - // the queue that haven't been executed, the tasks in the queue which the - // queue has dispatched but has not yet received a reply for, and the failed - // tasks that the queue is retrying. + // Output only. An estimation of the number of tasks in the queue, that is, + // the tasks in the queue that haven't been executed, the tasks in the queue + // which the queue has dispatched but has not yet received a reply for, and + // the failed tasks that the queue is retrying. int64 tasks_count = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. An estimation of the nearest time in the future where a task in the queue - // is scheduled to be executed. - google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The number of tasks that the queue has dispatched and received a reply for - // during the last minute. This variable counts both successful and - // non-successful executions. - int64 executed_last_minute_count = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The number of requests that the queue has dispatched but has not received - // a reply for yet. - int64 concurrent_dispatches_count = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The current maximum number of tasks per second executed by the queue. - // The maximum value of this variable is controlled by the RateLimits of the - // Queue. However, this value could be less to avoid overloading the endpoints - // tasks in the queue are targeting. - double effective_execution_rate = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. An estimation of the nearest time in the future where a task + // in the queue is scheduled to be executed. + google.protobuf.Timestamp oldest_estimated_arrival_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of tasks that the queue has dispatched and received + // a reply for during the last minute. This variable counts both successful + // and non-successful executions. + int64 executed_last_minute_count = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of requests that the queue has dispatched but has + // not received a reply for yet. + int64 concurrent_dispatches_count = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current maximum number of tasks per second executed by the + // queue. The maximum value of this variable is controlled by the RateLimits + // of the Queue. However, this value could be less to avoid overloading the + // endpoints tasks in the queue are targeting. + double effective_execution_rate = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta3/target.proto b/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta3/target.proto index 05c5d7f6d84..18fd119d697 100644 --- a/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta3/target.proto +++ b/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta3/target.proto @@ -16,8 +16,7 @@ syntax = "proto3"; package google.cloud.tasks.v2beta3; - -option go_package = "cloud.google.com/go/tasks/apiv2beta3/taskspb;taskspb"; +option go_package = "cloud.google.com/go/cloudtasks/apiv2beta3/cloudtaskspb;cloudtaskspb"; option java_multiple_files = true; option java_outer_classname = "TargetProto"; option java_package = "com.google.cloud.tasks.v2beta3"; @@ -25,8 +24,9 @@ option java_package = "com.google.cloud.tasks.v2beta3"; // Pull Message. // // This proto can only be used for tasks in a queue which has -// [PULL][google.cloud.tasks.v2beta3.Queue.type] type. It currently exists for backwards compatibility with -// the App Engine Task Queue SDK. This message type maybe returned with methods +// [PULL][google.cloud.tasks.v2beta3.Queue.type] type. It currently exists for +// backwards compatibility with the App Engine Task Queue SDK. This message type +// maybe returned with methods // [list][google.cloud.tasks.v2beta3.CloudTask.ListTasks] and // [get][google.cloud.tasks.v2beta3.CloudTask.ListTasks], when the response view // is [FULL][google.cloud.tasks.v2beta3.Task.View.Full]. @@ -54,8 +54,10 @@ message PullMessage { // any other HTTP response code is returned or no response is received, the // task will be retried according to the following: // -// * User-specified throttling: [retry configuration][google.cloud.tasks.v2beta3.Queue.retry_config], -// [rate limits][google.cloud.tasks.v2beta3.Queue.rate_limits], and the [queue's state][google.cloud.tasks.v2beta3.Queue.state]. +// * User-specified throttling: [retry +// configuration][google.cloud.tasks.v2beta3.Queue.retry_config], +// [rate limits][google.cloud.tasks.v2beta3.Queue.rate_limits], and the +// [queue's state][google.cloud.tasks.v2beta3.Queue.state]. // // * System throttling: To prevent the worker from overloading, Cloud Tasks may // temporarily reduce the queue's effective rate. User-specified settings @@ -64,10 +66,11 @@ message PullMessage { // System throttling happens because: // // * Cloud Tasks backs off on all errors. Normally the backoff specified in -// [rate limits][google.cloud.tasks.v2beta3.Queue.rate_limits] will be used. But if the worker returns -// `429` (Too Many Requests), `503` (Service Unavailable), or the rate of -// errors is high, Cloud Tasks will use a higher backoff rate. The retry -// specified in the `Retry-After` HTTP response header is considered. +// [rate limits][google.cloud.tasks.v2beta3.Queue.rate_limits] will be used. +// But if the worker returns `429` (Too Many Requests), `503` (Service +// Unavailable), or the rate of errors is high, Cloud Tasks will use a +// higher backoff rate. The retry specified in the `Retry-After` HTTP +// response header is considered. // // * To prevent traffic spikes and to smooth sudden increases in traffic, // dispatches ramp up slowly when the queue is newly created or idle and @@ -122,14 +125,16 @@ message HttpRequest { // HTTP request body. // // A request body is allowed only if the - // [HTTP method][google.cloud.tasks.v2beta3.HttpRequest.http_method] is POST, PUT, or PATCH. It is an - // error to set body on a task with an incompatible [HttpMethod][google.cloud.tasks.v2beta3.HttpMethod]. + // [HTTP method][google.cloud.tasks.v2beta3.HttpRequest.http_method] is POST, + // PUT, or PATCH. It is an error to set body on a task with an incompatible + // [HttpMethod][google.cloud.tasks.v2beta3.HttpMethod]. bytes body = 4; // The mode for generating an `Authorization` header for HTTP requests. // - // If specified, all `Authorization` headers in the [HttpRequest.headers][google.cloud.tasks.v2beta3.HttpRequest.headers] - // field will be overridden. + // If specified, all `Authorization` headers in the + // [HttpRequest.headers][google.cloud.tasks.v2beta3.HttpRequest.headers] field + // will be overridden. oneof authorization_header { // If specified, an // [OAuth token](https://developers.google.com/identity/protocols/OAuth2) @@ -155,11 +160,15 @@ message HttpRequest { // App Engine HTTP queue. // // The task will be delivered to the App Engine application hostname -// specified by its [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] and [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest]. -// The documentation for [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest] explains how the -// task's host URL is constructed. +// specified by its +// [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] and +// [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest]. The +// documentation for +// [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest] +// explains how the task's host URL is constructed. // -// Using [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] requires +// Using [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] +// requires // [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) // Google IAM permission for the project // and the following scope: @@ -167,11 +176,13 @@ message HttpRequest { // `https://www.googleapis.com/auth/cloud-platform` message AppEngineHttpQueue { // Overrides for the - // [task-level app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. + // [task-level + // app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. // // If set, `app_engine_routing_override` is used for all tasks in // the queue, no matter what the setting is for the - // [task-level app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. + // [task-level + // app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. AppEngineRouting app_engine_routing_override = 1; } @@ -180,7 +191,8 @@ message AppEngineHttpQueue { // The message defines the HTTP request that is sent to an App Engine app when // the task is dispatched. // -// Using [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest] requires +// Using [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest] +// requires // [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) // Google IAM permission for the project // and the following scope: @@ -200,14 +212,16 @@ message AppEngineHttpQueue { // The request to the handler, however, will appear to have used the HTTP // protocol. // -// The [AppEngineRouting][google.cloud.tasks.v2beta3.AppEngineRouting] used to construct the URL that the task is -// delivered to can be set at the queue-level or task-level: +// The [AppEngineRouting][google.cloud.tasks.v2beta3.AppEngineRouting] used to +// construct the URL that the task is delivered to can be set at the queue-level +// or task-level: // // * If set, // [app_engine_routing_override][google.cloud.tasks.v2beta3.AppEngineHttpQueue.app_engine_routing_override] // is used for all tasks in the queue, no matter what the setting // is for the -// [task-level app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. +// [task-level +// app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. // // // The `url` that the task will be sent to is: @@ -228,14 +242,15 @@ message AppEngineHttpQueue { // The task attempt has succeeded if the app's request handler returns an HTTP // response code in the range [`200` - `299`]. The task attempt has failed if // the app's handler returns a non-2xx response code or Cloud Tasks does -// not receive response before the [deadline][google.cloud.tasks.v2beta3.Task.dispatch_deadline]. Failed -// tasks will be retried according to the -// [retry configuration][google.cloud.tasks.v2beta3.Queue.retry_config]. `503` (Service Unavailable) is -// considered an App Engine system error instead of an application error and -// will cause Cloud Tasks' traffic congestion control to temporarily throttle -// the queue's dispatches. Unlike other types of task targets, a `429` (Too Many -// Requests) response from an app handler does not cause traffic congestion -// control to throttle the queue. +// not receive response before the +// [deadline][google.cloud.tasks.v2beta3.Task.dispatch_deadline]. Failed tasks +// will be retried according to the [retry +// configuration][google.cloud.tasks.v2beta3.Queue.retry_config]. `503` (Service +// Unavailable) is considered an App Engine system error instead of an +// application error and will cause Cloud Tasks' traffic congestion control to +// temporarily throttle the queue's dispatches. Unlike other types of task +// targets, a `429` (Too Many Requests) response from an app handler does not +// cause traffic congestion control to throttle the queue. message AppEngineHttpRequest { // The HTTP method to use for the request. The default is POST. // @@ -252,7 +267,8 @@ message AppEngineHttpRequest { // If set, // [app_engine_routing_override][google.cloud.tasks.v2beta3.AppEngineHttpQueue.app_engine_routing_override] // is used for all tasks in the queue, no matter what the setting is for the - // [task-level app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. + // [task-level + // app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. AppEngineRouting app_engine_routing = 2; // The relative URI. @@ -278,8 +294,9 @@ message AppEngineHttpRequest { // `"AppEngine-Google; (+http://code.google.com/appengine)"` to the // modified `User-Agent`. // - // If the task has a [body][google.cloud.tasks.v2beta3.AppEngineHttpRequest.body], Cloud - // Tasks sets the following headers: + // If the task has a + // [body][google.cloud.tasks.v2beta3.AppEngineHttpRequest.body], Cloud Tasks + // sets the following headers: // // * `Content-Type`: By default, the `Content-Type` header is set to // `"application/octet-stream"`. The default can be overridden by explicitly @@ -303,14 +320,17 @@ message AppEngineHttpRequest { // visible when the task is returned in a Cloud Tasks response. // // Although there is no specific limit for the maximum number of headers or - // the size, there is a limit on the maximum size of the [Task][google.cloud.tasks.v2beta3.Task]. For more - // information, see the [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] documentation. + // the size, there is a limit on the maximum size of the + // [Task][google.cloud.tasks.v2beta3.Task]. For more information, see the + // [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] + // documentation. map headers = 4; // HTTP request body. // // A request body is allowed only if the HTTP method is POST or PUT. It is - // an error to set a body on a task with an incompatible [HttpMethod][google.cloud.tasks.v2beta3.HttpMethod]. + // an error to set a body on a task with an incompatible + // [HttpMethod][google.cloud.tasks.v2beta3.HttpMethod]. bytes body = 5; } @@ -335,16 +355,18 @@ message AppEngineRouting { // service when the task is attempted. // // For some queues or tasks which were created using the App Engine - // Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable - // into [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], - // [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and - // [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For example, some tasks - // which were created using the App Engine SDK use a custom domain - // name; custom domains are not parsed by Cloud Tasks. If - // [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, then + // Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is + // not parsable into // [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], // [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and - // [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the empty string. + // [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For + // example, some tasks which were created using the App Engine SDK use a + // custom domain name; custom domains are not parsed by Cloud Tasks. If + // [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, + // then [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], + // [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and + // [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the + // empty string. string service = 1; // App version. @@ -353,16 +375,18 @@ message AppEngineRouting { // version when the task is attempted. // // For some queues or tasks which were created using the App Engine - // Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable - // into [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], - // [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and - // [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For example, some tasks - // which were created using the App Engine SDK use a custom domain - // name; custom domains are not parsed by Cloud Tasks. If - // [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, then + // Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is + // not parsable into // [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], // [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and - // [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the empty string. + // [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For + // example, some tasks which were created using the App Engine SDK use a + // custom domain name; custom domains are not parsed by Cloud Tasks. If + // [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, + // then [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], + // [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and + // [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the + // empty string. string version = 2; // App instance. @@ -384,9 +408,11 @@ message AppEngineRouting { // // The host is constructed from the domain name of the app associated with // the queue's project ID (for example .appspot.com), and the - // [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], - // and [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. Tasks which were created using - // the App Engine SDK might have a custom domain name. + // [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], + // [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and + // [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. Tasks + // which were created using the App Engine SDK might have a custom domain + // name. // // For more information, see // [How Requests are diff --git a/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta3/task.proto b/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta3/task.proto index 69ffe26f760..ef32f9b18ec 100644 --- a/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta3/task.proto +++ b/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta3/task.proto @@ -22,7 +22,7 @@ import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; -option go_package = "cloud.google.com/go/tasks/apiv2beta3/taskspb;taskspb"; +option go_package = "cloud.google.com/go/cloudtasks/apiv2beta3/cloudtaskspb;cloudtaskspb"; option java_multiple_files = true; option java_outer_classname = "TaskProto"; option java_package = "com.google.cloud.tasks.v2beta3"; @@ -34,7 +34,8 @@ message Task { pattern: "projects/{project}/locations/{location}/queues/{queue}/tasks/{task}" }; - // The view specifies a subset of [Task][google.cloud.tasks.v2beta3.Task] data. + // The view specifies a subset of [Task][google.cloud.tasks.v2beta3.Task] + // data. // // When a task is returned in a response, not all // information is retrieved by default because some data, such as @@ -49,7 +50,8 @@ message Task { // sensitive data. // // This view does not include the - // [body in AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest.body]. + // [body in + // AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest.body]. // Bodies are desirable to return only when needed, because they // can be large and because of the sensitivity of the data that you // choose to store in it. @@ -57,13 +59,15 @@ message Task { // All information is returned. // - // Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires - // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - // permission on the [Queue][google.cloud.tasks.v2beta3.Queue] resource. + // Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] + // requires `cloudtasks.tasks.fullView` [Google + // IAM](https://cloud.google.com/iam/) permission on the + // [Queue][google.cloud.tasks.v2beta3.Queue] resource. FULL = 2; } - // Optionally caller-specified in [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + // Optionally caller-specified in + // [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. // // The task name. // @@ -89,18 +93,21 @@ message Task { oneof payload_type { // HTTP request that is sent to the App Engine app handler. // - // An App Engine task is a task that has [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest] set. + // An App Engine task is a task that has + // [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest] + // set. AppEngineHttpRequest app_engine_http_request = 3; // HTTP request that is sent to the task's target. // - // An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2beta3.HttpRequest] set. + // An HTTP task is a task that has + // [HttpRequest][google.cloud.tasks.v2beta3.HttpRequest] set. HttpRequest http_request = 11; - // Pull Message contained in a task in a [PULL][google.cloud.tasks.v2beta3.Queue.type] queue type. This - // payload type cannot be explicitly set through Cloud Tasks API. Its - // purpose, currently is to provide backward compatibility with App Engine - // Task Queue + // Pull Message contained in a task in a + // [PULL][google.cloud.tasks.v2beta3.Queue.type] queue type. This payload + // type cannot be explicitly set through Cloud Tasks API. Its purpose, + // currently is to provide backward compatibility with App Engine Task Queue // [pull](https://cloud.google.com/appengine/docs/standard/java/taskqueue/pull/) // queues to provide a way to inspect contents of pull tasks through the // [CloudTasks.GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask]. @@ -122,7 +129,8 @@ message Task { // The deadline for requests sent to the worker. If the worker does not // respond by this deadline then the request is cancelled and the attempt // is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the - // task according to the [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig]. + // task according to the + // [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig]. // // Note that when the request is cancelled, Cloud Tasks will stop listening // for the response, but whether the worker stops processing depends on the @@ -131,10 +139,12 @@ message Task { // // The default and maximum values depend on the type of request: // - // * For [HTTP tasks][google.cloud.tasks.v2beta3.HttpRequest], the default is 10 minutes. The deadline + // * For [HTTP tasks][google.cloud.tasks.v2beta3.HttpRequest], the default is + // 10 minutes. The deadline // must be in the interval [15 seconds, 30 minutes]. // - // * For [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest], 0 indicates that the + // * For [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest], + // 0 indicates that the // request has the default deadline. The default deadline depends on the // [scaling // type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) @@ -163,15 +173,16 @@ message Task { // Output only. The status of the task's first attempt. // - // Only [dispatch_time][google.cloud.tasks.v2beta3.Attempt.dispatch_time] will be set. - // The other [Attempt][google.cloud.tasks.v2beta3.Attempt] information is not retained by Cloud Tasks. + // Only [dispatch_time][google.cloud.tasks.v2beta3.Attempt.dispatch_time] will + // be set. The other [Attempt][google.cloud.tasks.v2beta3.Attempt] information + // is not retained by Cloud Tasks. Attempt first_attempt = 8; // Output only. The status of the task's last attempt. Attempt last_attempt = 9; - // Output only. The view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] has - // been returned. + // Output only. The view specifies which subset of the + // [Task][google.cloud.tasks.v2beta3.Task] has been returned. View view = 10; } diff --git a/packages/google-cloud-tasks/protos/protos.json b/packages/google-cloud-tasks/protos/protos.json index 8f514f8504e..d9c6f0dc899 100644 --- a/packages/google-cloud-tasks/protos/protos.json +++ b/packages/google-cloud-tasks/protos/protos.json @@ -8,7 +8,7 @@ "nested": { "v2": { "options": { - "go_package": "cloud.google.com/go/tasks/apiv2/taskspb;taskspb", + "go_package": "cloud.google.com/go/cloudtasks/apiv2/cloudtaskspb;cloudtaskspb", "java_multiple_files": true, "java_outer_classname": "TaskProto", "java_package": "com.google.cloud.tasks.v2", @@ -874,7 +874,7 @@ }, "v2beta2": { "options": { - "go_package": "cloud.google.com/go/tasks/apiv2beta2/taskspb;taskspb", + "go_package": "cloud.google.com/go/cloudtasks/apiv2beta2/cloudtaskspb;cloudtaskspb", "java_multiple_files": true, "java_outer_classname": "TaskProto", "java_package": "com.google.cloud.tasks.v2beta2", @@ -1973,7 +1973,7 @@ }, "v2beta3": { "options": { - "go_package": "cloud.google.com/go/tasks/apiv2beta3/taskspb;taskspb", + "go_package": "cloud.google.com/go/cloudtasks/apiv2beta3/cloudtaskspb;cloudtaskspb", "java_multiple_files": true, "java_outer_classname": "TaskProto", "java_package": "com.google.cloud.tasks.v2beta3", diff --git a/packages/google-cloud-tasks/samples/generated/v2/snippet_metadata.google.cloud.tasks.v2.json b/packages/google-cloud-tasks/samples/generated/v2/snippet_metadata.google.cloud.tasks.v2.json index f88dbeaacc1..505f127a5f7 100644 --- a/packages/google-cloud-tasks/samples/generated/v2/snippet_metadata.google.cloud.tasks.v2.json +++ b/packages/google-cloud-tasks/samples/generated/v2/snippet_metadata.google.cloud.tasks.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tasks", - "version": "3.1.0", + "version": "3.1.2", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.acknowledge_task.js b/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.acknowledge_task.js index 9f75c1015e0..0e1e2efa729 100644 --- a/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.acknowledge_task.js +++ b/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.acknowledge_task.js @@ -37,8 +37,8 @@ function main(name, scheduleTime) { * Required. The task's current schedule time, available in the * schedule_time google.cloud.tasks.v2beta2.Task.schedule_time returned by * LeaseTasks google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks response or - * RenewLease google.cloud.tasks.v2beta2.CloudTasks.RenewLease response. This restriction is - * to ensure that your worker currently holds the lease. + * RenewLease google.cloud.tasks.v2beta2.CloudTasks.RenewLease response. + * This restriction is to ensure that your worker currently holds the lease. */ // const scheduleTime = {} diff --git a/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.cancel_lease.js b/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.cancel_lease.js index ab4ef61b14e..0050f84b7d4 100644 --- a/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.cancel_lease.js +++ b/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.cancel_lease.js @@ -37,21 +37,22 @@ function main(name, scheduleTime) { * Required. The task's current schedule time, available in the * schedule_time google.cloud.tasks.v2beta2.Task.schedule_time returned by * LeaseTasks google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks response or - * RenewLease google.cloud.tasks.v2beta2.CloudTasks.RenewLease response. This restriction is - * to ensure that your worker currently holds the lease. + * RenewLease google.cloud.tasks.v2beta2.CloudTasks.RenewLease response. + * This restriction is to ensure that your worker currently holds the lease. */ // const scheduleTime = {} /** - * The response_view specifies which subset of the Task google.cloud.tasks.v2beta2.Task will be - * returned. - * By default response_view is BASIC google.cloud.tasks.v2beta2.Task.View.BASIC; not all - * information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * Authorization for FULL google.cloud.tasks.v2beta2.Task.View.FULL requires - * `cloudtasks.tasks.fullView` Google IAM (https://cloud.google.com/iam/) - * permission on the Task google.cloud.tasks.v2beta2.Task resource. + * The response_view specifies which subset of the + * Task google.cloud.tasks.v2beta2.Task will be returned. + * By default response_view is + * BASIC google.cloud.tasks.v2beta2.Task.View.BASIC; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for FULL google.cloud.tasks.v2beta2.Task.View.FULL + * requires `cloudtasks.tasks.fullView` Google + * IAM (https://cloud.google.com/iam/) permission on the + * Task google.cloud.tasks.v2beta2.Task resource. */ // const responseView = {} diff --git a/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.create_queue.js b/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.create_queue.js index 5e6fe64af09..9e1faad47d9 100644 --- a/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.create_queue.js +++ b/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.create_queue.js @@ -38,7 +38,8 @@ function main(parent, queue) { // const parent = 'abc123' /** * Required. The queue to create. - * Queue's name google.cloud.tasks.v2beta2.Queue.name cannot be the same as an existing queue. + * Queue's name google.cloud.tasks.v2beta2.Queue.name cannot be the same as + * an existing queue. */ // const queue = {} diff --git a/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.create_task.js b/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.create_task.js index 4ece2f4ac80..6ee528fec66 100644 --- a/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.create_task.js +++ b/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.create_task.js @@ -38,12 +38,12 @@ function main(parent, task) { * Required. The task to add. * Task names have the following format: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task name google.cloud.tasks.v2beta2.Task.name. If a - * name is not specified then the system will generate a random - * unique task id, which will be set in the task returned in the - * response google.cloud.tasks.v2beta2.Task.name. - * If schedule_time google.cloud.tasks.v2beta2.Task.schedule_time is not set or is in the - * past then Cloud Tasks will set it to the current time. + * The user can optionally specify a task + * name google.cloud.tasks.v2beta2.Task.name. If a name is not specified + * then the system will generate a random unique task id, which will be set in + * the task returned in the response google.cloud.tasks.v2beta2.Task.name. + * If schedule_time google.cloud.tasks.v2beta2.Task.schedule_time is not + * set or is in the past then Cloud Tasks will set it to the current time. * Task De-duplication: * Explicitly specifying a task ID enables task de-duplication. If * a task's ID is identical to that of an existing task or a task @@ -55,10 +55,10 @@ function main(parent, task) { * queue.xml, then another task with the same name can't be created * for ~9days after the original task was deleted or completed. * Because there is an extra lookup cost to identify duplicate task - * names, these CreateTask google.cloud.tasks.v2beta2.CloudTasks.CreateTask calls have significantly - * increased latency. Using hashed strings for the task id or for - * the prefix of the task id is recommended. Choosing task ids that - * are sequential or have sequential prefixes, for example using a + * names, these CreateTask google.cloud.tasks.v2beta2.CloudTasks.CreateTask + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a * timestamp, causes an increase in latency and error rates in all * task commands. The infrastructure relies on an approximately * uniform distribution of task ids to store and serve tasks @@ -66,16 +66,17 @@ function main(parent, task) { */ // const task = {} /** - * The response_view specifies which subset of the Task google.cloud.tasks.v2beta2.Task will be - * returned. - * By default response_view is BASIC google.cloud.tasks.v2beta2.Task.View.BASIC; not all - * information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * Authorization for FULL google.cloud.tasks.v2beta2.Task.View.FULL requires - * `cloudtasks.tasks.fullView` Google IAM (https://cloud.google.com/iam/) - * permission on the Task google.cloud.tasks.v2beta2.Task resource. + * The response_view specifies which subset of the + * Task google.cloud.tasks.v2beta2.Task will be returned. + * By default response_view is + * BASIC google.cloud.tasks.v2beta2.Task.View.BASIC; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for FULL google.cloud.tasks.v2beta2.Task.View.FULL + * requires `cloudtasks.tasks.fullView` Google + * IAM (https://cloud.google.com/iam/) permission on the + * Task google.cloud.tasks.v2beta2.Task resource. */ // const responseView = {} diff --git a/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.get_queue.js b/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.get_queue.js index d64904d8361..0c08324c68f 100644 --- a/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.get_queue.js +++ b/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.get_queue.js @@ -34,8 +34,8 @@ function main(name) { */ // const name = 'abc123' /** - * Optional. Read mask is used for a more granular control over what the API returns. - * If the mask is not present all fields will be returned except + * Optional. Read mask is used for a more granular control over what the API + * returns. If the mask is not present all fields will be returned except * Queue.stats. Queue.stats will be returned only if it was explicitly * specified in the mask. */ diff --git a/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.get_task.js b/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.get_task.js index d4ec729026b..ca66574ed0a 100644 --- a/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.get_task.js +++ b/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.get_task.js @@ -34,16 +34,17 @@ function main(name) { */ // const name = 'abc123' /** - * The response_view specifies which subset of the Task google.cloud.tasks.v2beta2.Task will be - * returned. - * By default response_view is BASIC google.cloud.tasks.v2beta2.Task.View.BASIC; not all - * information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * Authorization for FULL google.cloud.tasks.v2beta2.Task.View.FULL requires - * `cloudtasks.tasks.fullView` Google IAM (https://cloud.google.com/iam/) - * permission on the Task google.cloud.tasks.v2beta2.Task resource. + * The response_view specifies which subset of the + * Task google.cloud.tasks.v2beta2.Task will be returned. + * By default response_view is + * BASIC google.cloud.tasks.v2beta2.Task.View.BASIC; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for FULL google.cloud.tasks.v2beta2.Task.View.FULL + * requires `cloudtasks.tasks.fullView` Google + * IAM (https://cloud.google.com/iam/) permission on the + * Task google.cloud.tasks.v2beta2.Task resource. */ // const responseView = {} diff --git a/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.lease_tasks.js b/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.lease_tasks.js index b8e3b6572e4..a13c18f28a5 100644 --- a/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.lease_tasks.js +++ b/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.lease_tasks.js @@ -38,51 +38,57 @@ function main(parent, leaseDuration) { * The system will make a best effort to return as close to as * `max_tasks` as possible. * The largest that `max_tasks` can be is 1000. - * The maximum total size of a lease tasks response google.cloud.tasks.v2beta2.LeaseTasksResponse is - * 32 MB. If the sum of all task sizes requested reaches this limit, - * fewer tasks than requested are returned. + * The maximum total size of a lease tasks + * response google.cloud.tasks.v2beta2.LeaseTasksResponse is 32 MB. If the + * sum of all task sizes requested reaches this limit, fewer tasks than + * requested are returned. */ // const maxTasks = 1234 /** * Required. The duration of the lease. - * Each task returned in the response google.cloud.tasks.v2beta2.LeaseTasksResponse will - * have its schedule_time google.cloud.tasks.v2beta2.Task.schedule_time set to the current - * time plus the `lease_duration`. The task is leased until its - * schedule_time google.cloud.tasks.v2beta2.Task.schedule_time; thus, the task will not be - * returned to another LeaseTasks google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks call - * before its schedule_time google.cloud.tasks.v2beta2.Task.schedule_time. + * Each task returned in the + * response google.cloud.tasks.v2beta2.LeaseTasksResponse will have its + * schedule_time google.cloud.tasks.v2beta2.Task.schedule_time set to the + * current time plus the `lease_duration`. The task is leased until its + * schedule_time google.cloud.tasks.v2beta2.Task.schedule_time; thus, the + * task will not be returned to another + * LeaseTasks google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks call before + * its schedule_time google.cloud.tasks.v2beta2.Task.schedule_time. * After the worker has successfully finished the work associated * with the task, the worker must call via - * AcknowledgeTask google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask before the - * schedule_time google.cloud.tasks.v2beta2.Task.schedule_time. Otherwise the task will be - * returned to a later LeaseTasks google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks call so - * that another worker can retry it. + * AcknowledgeTask google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask + * before the schedule_time google.cloud.tasks.v2beta2.Task.schedule_time. + * Otherwise the task will be returned to a later + * LeaseTasks google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks call so that + * another worker can retry it. * The maximum lease duration is 1 week. * `lease_duration` will be truncated to the nearest second. */ // const leaseDuration = {} /** - * The response_view specifies which subset of the Task google.cloud.tasks.v2beta2.Task will be - * returned. - * By default response_view is BASIC google.cloud.tasks.v2beta2.Task.View.BASIC; not all - * information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * Authorization for FULL google.cloud.tasks.v2beta2.Task.View.FULL requires - * `cloudtasks.tasks.fullView` Google IAM (https://cloud.google.com/iam/) - * permission on the Task google.cloud.tasks.v2beta2.Task resource. + * The response_view specifies which subset of the + * Task google.cloud.tasks.v2beta2.Task will be returned. + * By default response_view is + * BASIC google.cloud.tasks.v2beta2.Task.View.BASIC; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for FULL google.cloud.tasks.v2beta2.Task.View.FULL + * requires `cloudtasks.tasks.fullView` Google + * IAM (https://cloud.google.com/iam/) permission on the + * Task google.cloud.tasks.v2beta2.Task resource. */ // const responseView = {} /** * `filter` can be used to specify a subset of tasks to lease. * When `filter` is set to `tag=` then the - * response google.cloud.tasks.v2beta2.LeaseTasksResponse will contain only tasks whose - * tag google.cloud.tasks.v2beta2.PullMessage.tag is equal to ``. `` must be - * less than 500 characters. + * response google.cloud.tasks.v2beta2.LeaseTasksResponse will contain only + * tasks whose tag google.cloud.tasks.v2beta2.PullMessage.tag is equal to + * ``. `` must be less than 500 characters. * When `filter` is set to `tag_function=oldest_tag()`, only tasks which have * the same tag as the task with the oldest - * schedule_time google.cloud.tasks.v2beta2.Task.schedule_time will be returned. + * schedule_time google.cloud.tasks.v2beta2.Task.schedule_time will be + * returned. * Grammar Syntax: * * `filter = "tag=" tag | "tag_function=" function` * * `tag = string` @@ -94,8 +100,9 @@ function main(parent, leaseDuration) { * bytes (https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), * only UTF-8 encoded tags can be used in Cloud Tasks. Tag which * aren't UTF-8 encoded can't be used in the - * filter google.cloud.tasks.v2beta2.LeaseTasksRequest.filter and the task's - * tag google.cloud.tasks.v2beta2.PullMessage.tag will be displayed as empty in Cloud Tasks. + * filter google.cloud.tasks.v2beta2.LeaseTasksRequest.filter and the + * task's tag google.cloud.tasks.v2beta2.PullMessage.tag will be displayed + * as empty in Cloud Tasks. */ // const filter = 'abc123' diff --git a/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.list_queues.js b/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.list_queues.js index 38adfe91cce..3cf1e542ab4 100644 --- a/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.list_queues.js +++ b/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.list_queues.js @@ -34,11 +34,10 @@ function main(parent) { */ // const parent = 'abc123' /** - * `filter` can be used to specify a subset of queues. Any Queue google.cloud.tasks.v2beta2.Queue - * field can be used as a filter and several operators as supported. - * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as - * described in - * Stackdriver's Advanced Logs + * `filter` can be used to specify a subset of queues. Any + * Queue google.cloud.tasks.v2beta2.Queue field can be used as a filter and + * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The + * filter syntax is the same as described in Stackdriver's Advanced Logs * Filters (https://cloud.google.com/logging/docs/view/advanced_filters). * Sample filter "app_engine_http_target: *". * Note that using filters might cause fewer queues than the @@ -50,23 +49,25 @@ function main(parent) { * The maximum page size is 9800. If unspecified, the page size will * be the maximum. Fewer queues than requested might be returned, * even if more queues exist; use the - * next_page_token google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token in the - * response to determine if more queues exist. + * next_page_token google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token + * in the response to determine if more queues exist. */ // const pageSize = 1234 /** * A token identifying the page of results to return. * To request the first page results, page_token must be empty. To * request the next page of results, page_token must be the value of - * next_page_token google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token returned - * from the previous call to ListQueues google.cloud.tasks.v2beta2.CloudTasks.ListQueues - * method. It is an error to switch the value of the - * filter google.cloud.tasks.v2beta2.ListQueuesRequest.filter while iterating through pages. + * next_page_token google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token + * returned from the previous call to + * ListQueues google.cloud.tasks.v2beta2.CloudTasks.ListQueues method. It + * is an error to switch the value of the + * filter google.cloud.tasks.v2beta2.ListQueuesRequest.filter while + * iterating through pages. */ // const pageToken = 'abc123' /** - * Optional. Read mask is used for a more granular control over what the API returns. - * If the mask is not present all fields will be returned except + * Optional. Read mask is used for a more granular control over what the API + * returns. If the mask is not present all fields will be returned except * Queue.stats. Queue.stats will be returned only if it was explicitly * specified in the mask. */ diff --git a/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.list_tasks.js b/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.list_tasks.js index c4014ba844d..08a62f503ad 100644 --- a/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.list_tasks.js +++ b/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.list_tasks.js @@ -34,23 +34,24 @@ function main(parent) { */ // const parent = 'abc123' /** - * The response_view specifies which subset of the Task google.cloud.tasks.v2beta2.Task will be - * returned. - * By default response_view is BASIC google.cloud.tasks.v2beta2.Task.View.BASIC; not all - * information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * Authorization for FULL google.cloud.tasks.v2beta2.Task.View.FULL requires - * `cloudtasks.tasks.fullView` Google IAM (https://cloud.google.com/iam/) - * permission on the Task google.cloud.tasks.v2beta2.Task resource. + * The response_view specifies which subset of the + * Task google.cloud.tasks.v2beta2.Task will be returned. + * By default response_view is + * BASIC google.cloud.tasks.v2beta2.Task.View.BASIC; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for FULL google.cloud.tasks.v2beta2.Task.View.FULL + * requires `cloudtasks.tasks.fullView` Google + * IAM (https://cloud.google.com/iam/) permission on the + * Task google.cloud.tasks.v2beta2.Task resource. */ // const responseView = {} /** * Maximum page size. * Fewer tasks than requested might be returned, even if more tasks exist; use - * next_page_token google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token in the response to - * determine if more tasks exist. + * next_page_token google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token + * in the response to determine if more tasks exist. * The maximum page size is 1000. If unspecified, the page size will be the * maximum. */ @@ -59,9 +60,9 @@ function main(parent) { * A token identifying the page of results to return. * To request the first page results, page_token must be empty. To * request the next page of results, page_token must be the value of - * next_page_token google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token returned - * from the previous call to ListTasks google.cloud.tasks.v2beta2.CloudTasks.ListTasks - * method. + * next_page_token google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token + * returned from the previous call to + * ListTasks google.cloud.tasks.v2beta2.CloudTasks.ListTasks method. * The page token is valid for only 2 hours. */ // const pageToken = 'abc123' diff --git a/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.renew_lease.js b/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.renew_lease.js index 5ba71b1998a..c223dad4c59 100644 --- a/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.renew_lease.js +++ b/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.renew_lease.js @@ -37,8 +37,8 @@ function main(name, scheduleTime, leaseDuration) { * Required. The task's current schedule time, available in the * schedule_time google.cloud.tasks.v2beta2.Task.schedule_time returned by * LeaseTasks google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks response or - * RenewLease google.cloud.tasks.v2beta2.CloudTasks.RenewLease response. This restriction is - * to ensure that your worker currently holds the lease. + * RenewLease google.cloud.tasks.v2beta2.CloudTasks.RenewLease response. + * This restriction is to ensure that your worker currently holds the lease. */ // const scheduleTime = {} /** @@ -48,16 +48,17 @@ function main(name, scheduleTime, leaseDuration) { */ // const leaseDuration = {} /** - * The response_view specifies which subset of the Task google.cloud.tasks.v2beta2.Task will be - * returned. - * By default response_view is BASIC google.cloud.tasks.v2beta2.Task.View.BASIC; not all - * information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * Authorization for FULL google.cloud.tasks.v2beta2.Task.View.FULL requires - * `cloudtasks.tasks.fullView` Google IAM (https://cloud.google.com/iam/) - * permission on the Task google.cloud.tasks.v2beta2.Task resource. + * The response_view specifies which subset of the + * Task google.cloud.tasks.v2beta2.Task will be returned. + * By default response_view is + * BASIC google.cloud.tasks.v2beta2.Task.View.BASIC; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for FULL google.cloud.tasks.v2beta2.Task.View.FULL + * requires `cloudtasks.tasks.fullView` Google + * IAM (https://cloud.google.com/iam/) permission on the + * Task google.cloud.tasks.v2beta2.Task resource. */ // const responseView = {} diff --git a/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.run_task.js b/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.run_task.js index 77afa48515e..5d258f663e3 100644 --- a/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.run_task.js +++ b/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.run_task.js @@ -34,16 +34,17 @@ function main(name) { */ // const name = 'abc123' /** - * The response_view specifies which subset of the Task google.cloud.tasks.v2beta2.Task will be - * returned. - * By default response_view is BASIC google.cloud.tasks.v2beta2.Task.View.BASIC; not all - * information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * Authorization for FULL google.cloud.tasks.v2beta2.Task.View.FULL requires - * `cloudtasks.tasks.fullView` Google IAM (https://cloud.google.com/iam/) - * permission on the Task google.cloud.tasks.v2beta2.Task resource. + * The response_view specifies which subset of the + * Task google.cloud.tasks.v2beta2.Task will be returned. + * By default response_view is + * BASIC google.cloud.tasks.v2beta2.Task.View.BASIC; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for FULL google.cloud.tasks.v2beta2.Task.View.FULL + * requires `cloudtasks.tasks.fullView` Google + * IAM (https://cloud.google.com/iam/) permission on the + * Task google.cloud.tasks.v2beta2.Task resource. */ // const responseView = {} diff --git a/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.update_queue.js b/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.update_queue.js index 0c264f743c7..547af1594b7 100644 --- a/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.update_queue.js +++ b/packages/google-cloud-tasks/samples/generated/v2beta2/cloud_tasks.update_queue.js @@ -30,10 +30,12 @@ function main(queue) { */ /** * Required. The queue to create or update. - * The queue's name google.cloud.tasks.v2beta2.Queue.name must be specified. + * The queue's name google.cloud.tasks.v2beta2.Queue.name must be + * specified. * Output only fields cannot be modified using UpdateQueue. * Any value specified for an output only field will be ignored. - * The queue's name google.cloud.tasks.v2beta2.Queue.name cannot be changed. + * The queue's name google.cloud.tasks.v2beta2.Queue.name cannot be + * changed. */ // const queue = {} /** diff --git a/packages/google-cloud-tasks/samples/generated/v2beta2/snippet_metadata.google.cloud.tasks.v2beta2.json b/packages/google-cloud-tasks/samples/generated/v2beta2/snippet_metadata.google.cloud.tasks.v2beta2.json index 6f74593d461..7456891a5ae 100644 --- a/packages/google-cloud-tasks/samples/generated/v2beta2/snippet_metadata.google.cloud.tasks.v2beta2.json +++ b/packages/google-cloud-tasks/samples/generated/v2beta2/snippet_metadata.google.cloud.tasks.v2beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tasks", - "version": "3.1.0", + "version": "3.1.2", "language": "TYPESCRIPT", "apis": [ { @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 94, + "end": 95, "type": "FULL" } ], @@ -122,7 +122,7 @@ "segments": [ { "start": 25, - "end": 63, + "end": 64, "type": "FULL" } ], @@ -166,7 +166,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 64, "type": "FULL" } ], @@ -506,7 +506,7 @@ "segments": [ { "start": 25, - "end": 88, + "end": 89, "type": "FULL" } ], @@ -558,7 +558,7 @@ "segments": [ { "start": 25, - "end": 67, + "end": 68, "type": "FULL" } ], @@ -602,7 +602,7 @@ "segments": [ { "start": 25, - "end": 100, + "end": 101, "type": "FULL" } ], @@ -690,7 +690,7 @@ "segments": [ { "start": 25, - "end": 120, + "end": 127, "type": "FULL" } ], @@ -790,7 +790,7 @@ "segments": [ { "start": 25, - "end": 83, + "end": 84, "type": "FULL" } ], @@ -842,7 +842,7 @@ "segments": [ { "start": 25, - "end": 76, + "end": 77, "type": "FULL" } ], @@ -890,7 +890,7 @@ "segments": [ { "start": 25, - "end": 67, + "end": 68, "type": "FULL" } ], diff --git a/packages/google-cloud-tasks/samples/generated/v2beta3/snippet_metadata.google.cloud.tasks.v2beta3.json b/packages/google-cloud-tasks/samples/generated/v2beta3/snippet_metadata.google.cloud.tasks.v2beta3.json index e1b77e1fcf8..cee4951504d 100644 --- a/packages/google-cloud-tasks/samples/generated/v2beta3/snippet_metadata.google.cloud.tasks.v2beta3.json +++ b/packages/google-cloud-tasks/samples/generated/v2beta3/snippet_metadata.google.cloud.tasks.v2beta3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tasks", - "version": "3.1.0", + "version": "3.1.2", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tasks/src/v2beta2/cloud_tasks_client.ts b/packages/google-cloud-tasks/src/v2beta2/cloud_tasks_client.ts index f5ea4e0edf0..def067a0487 100644 --- a/packages/google-cloud-tasks/src/v2beta2/cloud_tasks_client.ts +++ b/packages/google-cloud-tasks/src/v2beta2/cloud_tasks_client.ts @@ -371,8 +371,8 @@ export class CloudTasksClient { * Required. The resource name of the queue. For example: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` * @param {google.protobuf.FieldMask} [request.readMask] - * Optional. Read mask is used for a more granular control over what the API returns. - * If the mask is not present all fields will be returned except + * Optional. Read mask is used for a more granular control over what the API + * returns. If the mask is not present all fields will be returned except * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly * specified in the mask. * @param {object} [options] @@ -455,8 +455,8 @@ export class CloudTasksClient { * Creates a queue. * * Queues created with this method allow tasks to live for a maximum of 31 - * days. After a task is 31 days old, the task will be deleted regardless of whether - * it was dispatched or not. + * days. After a task is 31 days old, the task will be deleted regardless of + * whether it was dispatched or not. * * WARNING: Using this method may have unintended side effects if you are * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. @@ -477,7 +477,8 @@ export class CloudTasksClient { * @param {google.cloud.tasks.v2beta2.Queue} request.queue * Required. The queue to create. * - * {@link google.cloud.tasks.v2beta2.Queue.name|Queue's name} cannot be the same as an existing queue. + * {@link google.cloud.tasks.v2beta2.Queue.name|Queue's name} cannot be the same as + * an existing queue. * @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. @@ -563,8 +564,8 @@ export class CloudTasksClient { * the queue if it does exist. * * Queues created with this method allow tasks to live for a maximum of 31 - * days. After a task is 31 days old, the task will be deleted regardless of whether - * it was dispatched or not. + * days. After a task is 31 days old, the task will be deleted regardless of + * whether it was dispatched or not. * * WARNING: Using this method may have unintended side effects if you are * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. @@ -578,11 +579,13 @@ export class CloudTasksClient { * @param {google.cloud.tasks.v2beta2.Queue} request.queue * Required. The queue to create or update. * - * The queue's {@link google.cloud.tasks.v2beta2.Queue.name|name} must be specified. + * The queue's {@link google.cloud.tasks.v2beta2.Queue.name|name} must be + * specified. * * Output only fields cannot be modified using UpdateQueue. * Any value specified for an output only field will be ignored. - * The queue's {@link google.cloud.tasks.v2beta2.Queue.name|name} cannot be changed. + * The queue's {@link google.cloud.tasks.v2beta2.Queue.name|name} cannot be + * changed. * @param {google.protobuf.FieldMask} request.updateMask * A mask used to specify which fields of the queue are being updated. * @@ -859,9 +862,10 @@ export class CloudTasksClient { * * If a queue is paused then the system will stop dispatching tasks * until the queue is resumed via - * {@link google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue|ResumeQueue}. Tasks can still be added - * when the queue is paused. A queue is paused if its - * {@link google.cloud.tasks.v2beta2.Queue.state|state} is {@link google.cloud.tasks.v2beta2.Queue.State.PAUSED|PAUSED}. + * {@link google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue|ResumeQueue}. Tasks can + * still be added when the queue is paused. A queue is paused if its + * {@link google.cloud.tasks.v2beta2.Queue.state|state} is + * {@link google.cloud.tasks.v2beta2.Queue.State.PAUSED|PAUSED}. * * @param {Object} request * The request object that will be sent. @@ -951,9 +955,11 @@ export class CloudTasksClient { * * This method resumes a queue after it has been * {@link google.cloud.tasks.v2beta2.Queue.State.PAUSED|PAUSED} or - * {@link google.cloud.tasks.v2beta2.Queue.State.DISABLED|DISABLED}. The state of a queue is stored - * in the queue's {@link google.cloud.tasks.v2beta2.Queue.state|state}; after calling this method it - * will be set to {@link google.cloud.tasks.v2beta2.Queue.State.RUNNING|RUNNING}. + * {@link google.cloud.tasks.v2beta2.Queue.State.DISABLED|DISABLED}. The state of a + * queue is stored in the queue's + * {@link google.cloud.tasks.v2beta2.Queue.state|state}; after calling this method + * it will be set to + * {@link google.cloud.tasks.v2beta2.Queue.State.RUNNING|RUNNING}. * * WARNING: Resuming many high-QPS queues at the same time can * lead to target overloading. If you are resuming high-QPS @@ -1045,9 +1051,9 @@ export class CloudTasksClient { return this.innerApiCalls.resumeQueue(request, options, callback); } /** - * Gets the access control policy for a {@link google.cloud.tasks.v2beta2.Queue|Queue}. - * Returns an empty policy if the resource exists and does not have a policy - * set. + * Gets the access control policy for a + * {@link google.cloud.tasks.v2beta2.Queue|Queue}. Returns an empty policy if the + * resource exists and does not have a policy set. * * Authorization requires the following * [Google IAM](https://cloud.google.com/iam) permission on the specified @@ -1140,8 +1146,8 @@ export class CloudTasksClient { return this.innerApiCalls.getIamPolicy(request, options, callback); } /** - * Sets the access control policy for a {@link google.cloud.tasks.v2beta2.Queue|Queue}. Replaces any existing - * policy. + * Sets the access control policy for a + * {@link google.cloud.tasks.v2beta2.Queue|Queue}. Replaces any existing policy. * * Note: The Cloud Console does not check queue-level IAM permissions yet. * Project-level permissions are required to use the Cloud Console. @@ -1245,9 +1251,10 @@ export class CloudTasksClient { return this.innerApiCalls.setIamPolicy(request, options, callback); } /** - * Returns permissions that a caller has on a {@link google.cloud.tasks.v2beta2.Queue|Queue}. - * If the resource does not exist, this will return an empty set of - * permissions, not a {@link google.rpc.Code.NOT_FOUND|NOT_FOUND} error. + * Returns permissions that a caller has on a + * {@link google.cloud.tasks.v2beta2.Queue|Queue}. If the resource does not exist, + * this will return an empty set of permissions, not a + * {@link google.rpc.Code.NOT_FOUND|NOT_FOUND} error. * * Note: This operation is designed to be used for building permission-aware * UIs and command-line tools, not for authorization checking. This operation @@ -1348,18 +1355,19 @@ export class CloudTasksClient { * Required. The task name. For example: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` * @param {google.cloud.tasks.v2beta2.Task.View} request.responseView - * The response_view specifies which subset of the {@link google.cloud.tasks.v2beta2.Task|Task} will be - * returned. - * - * By default response_view is {@link google.cloud.tasks.v2beta2.Task.View.BASIC|BASIC}; not all - * information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * - * Authorization for {@link google.cloud.tasks.v2beta2.Task.View.FULL|FULL} requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the {@link google.cloud.tasks.v2beta2.Task|Task} resource. + * The response_view specifies which subset of the + * {@link google.cloud.tasks.v2beta2.Task|Task} will be returned. + * + * By default response_view is + * {@link google.cloud.tasks.v2beta2.Task.View.BASIC|BASIC}; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * + * Authorization for {@link google.cloud.tasks.v2beta2.Task.View.FULL|FULL} + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * {@link google.cloud.tasks.v2beta2.Task|Task} resource. * @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. @@ -1441,9 +1449,11 @@ export class CloudTasksClient { * * Tasks cannot be updated after creation; there is no UpdateTask command. * - * * For {@link google.cloud.tasks.v2beta2.AppEngineHttpTarget|App Engine queues}, the maximum task size is + * * For {@link google.cloud.tasks.v2beta2.AppEngineHttpTarget|App Engine queues}, + * the maximum task size is * 100KB. - * * For {@link google.cloud.tasks.v2beta2.PullTarget|pull queues}, the maximum task size is 1MB. + * * For {@link google.cloud.tasks.v2beta2.PullTarget|pull queues}, the maximum + * task size is 1MB. * * @param {Object} request * The request object that will be sent. @@ -1457,13 +1467,13 @@ export class CloudTasksClient { * * Task names have the following format: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task {@link google.cloud.tasks.v2beta2.Task.name|name}. If a - * name is not specified then the system will generate a random - * unique task id, which will be set in the task returned in the - * {@link google.cloud.tasks.v2beta2.Task.name|response}. + * The user can optionally specify a task + * {@link google.cloud.tasks.v2beta2.Task.name|name}. If a name is not specified + * then the system will generate a random unique task id, which will be set in + * the task returned in the {@link google.cloud.tasks.v2beta2.Task.name|response}. * - * If {@link google.cloud.tasks.v2beta2.Task.schedule_time|schedule_time} is not set or is in the - * past then Cloud Tasks will set it to the current time. + * If {@link google.cloud.tasks.v2beta2.Task.schedule_time|schedule_time} is not + * set or is in the past then Cloud Tasks will set it to the current time. * * Task De-duplication: * @@ -1478,27 +1488,28 @@ export class CloudTasksClient { * for ~9days after the original task was deleted or completed. * * Because there is an extra lookup cost to identify duplicate task - * names, these {@link google.cloud.tasks.v2beta2.CloudTasks.CreateTask|CreateTask} calls have significantly - * increased latency. Using hashed strings for the task id or for - * the prefix of the task id is recommended. Choosing task ids that - * are sequential or have sequential prefixes, for example using a + * names, these {@link google.cloud.tasks.v2beta2.CloudTasks.CreateTask|CreateTask} + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a * timestamp, causes an increase in latency and error rates in all * task commands. The infrastructure relies on an approximately * uniform distribution of task ids to store and serve tasks * efficiently. * @param {google.cloud.tasks.v2beta2.Task.View} request.responseView - * The response_view specifies which subset of the {@link google.cloud.tasks.v2beta2.Task|Task} will be - * returned. - * - * By default response_view is {@link google.cloud.tasks.v2beta2.Task.View.BASIC|BASIC}; not all - * information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * - * Authorization for {@link google.cloud.tasks.v2beta2.Task.View.FULL|FULL} requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the {@link google.cloud.tasks.v2beta2.Task|Task} resource. + * The response_view specifies which subset of the + * {@link google.cloud.tasks.v2beta2.Task|Task} will be returned. + * + * By default response_view is + * {@link google.cloud.tasks.v2beta2.Task.View.BASIC|BASIC}; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * + * Authorization for {@link google.cloud.tasks.v2beta2.Task.View.FULL|FULL} + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * {@link google.cloud.tasks.v2beta2.Task|Task} resource. * @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. @@ -1673,18 +1684,19 @@ export class CloudTasksClient { * * This method is invoked by the worker to obtain a lease. The * worker must acknowledge the task via - * {@link google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask|AcknowledgeTask} after they have - * performed the work associated with the task. - * - * The {@link google.cloud.tasks.v2beta2.PullMessage.payload|payload} is intended to store data that - * the worker needs to perform the work associated with the task. To - * return the payloads in the {@link google.cloud.tasks.v2beta2.LeaseTasksResponse|response}, set - * {@link google.cloud.tasks.v2beta2.LeaseTasksRequest.response_view|response_view} to - * {@link google.cloud.tasks.v2beta2.Task.View.FULL|FULL}. - * - * A maximum of 10 qps of {@link google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks|LeaseTasks} - * requests are allowed per - * queue. {@link google.rpc.Code.RESOURCE_EXHAUSTED|RESOURCE_EXHAUSTED} + * {@link google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask|AcknowledgeTask} + * after they have performed the work associated with the task. + * + * The {@link google.cloud.tasks.v2beta2.PullMessage.payload|payload} is intended + * to store data that the worker needs to perform the work associated with the + * task. To return the payloads in the + * {@link google.cloud.tasks.v2beta2.LeaseTasksResponse|response}, set + * {@link google.cloud.tasks.v2beta2.LeaseTasksRequest.response_view|response_view} + * to {@link google.cloud.tasks.v2beta2.Task.View.FULL|FULL}. + * + * A maximum of 10 qps of + * {@link google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks|LeaseTasks} requests are + * allowed per queue. {@link google.rpc.Code.RESOURCE_EXHAUSTED|RESOURCE_EXHAUSTED} * is returned when this limit is * exceeded. {@link google.rpc.Code.RESOURCE_EXHAUSTED|RESOURCE_EXHAUSTED} * is also returned when @@ -1704,53 +1716,59 @@ export class CloudTasksClient { * * The largest that `max_tasks` can be is 1000. * - * The maximum total size of a {@link google.cloud.tasks.v2beta2.LeaseTasksResponse|lease tasks response} is - * 32 MB. If the sum of all task sizes requested reaches this limit, - * fewer tasks than requested are returned. + * The maximum total size of a [lease tasks + * response][google.cloud.tasks.v2beta2.LeaseTasksResponse] is 32 MB. If the + * sum of all task sizes requested reaches this limit, fewer tasks than + * requested are returned. * @param {google.protobuf.Duration} request.leaseDuration * Required. The duration of the lease. * - * Each task returned in the {@link google.cloud.tasks.v2beta2.LeaseTasksResponse|response} will - * have its {@link google.cloud.tasks.v2beta2.Task.schedule_time|schedule_time} set to the current - * time plus the `lease_duration`. The task is leased until its - * {@link google.cloud.tasks.v2beta2.Task.schedule_time|schedule_time}; thus, the task will not be - * returned to another {@link google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks|LeaseTasks} call - * before its {@link google.cloud.tasks.v2beta2.Task.schedule_time|schedule_time}. + * Each task returned in the + * {@link google.cloud.tasks.v2beta2.LeaseTasksResponse|response} will have its + * {@link google.cloud.tasks.v2beta2.Task.schedule_time|schedule_time} set to the + * current time plus the `lease_duration`. The task is leased until its + * {@link google.cloud.tasks.v2beta2.Task.schedule_time|schedule_time}; thus, the + * task will not be returned to another + * {@link google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks|LeaseTasks} call before + * its {@link google.cloud.tasks.v2beta2.Task.schedule_time|schedule_time}. * * * After the worker has successfully finished the work associated * with the task, the worker must call via - * {@link google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask|AcknowledgeTask} before the - * {@link google.cloud.tasks.v2beta2.Task.schedule_time|schedule_time}. Otherwise the task will be - * returned to a later {@link google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks|LeaseTasks} call so - * that another worker can retry it. + * {@link google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask|AcknowledgeTask} + * before the {@link google.cloud.tasks.v2beta2.Task.schedule_time|schedule_time}. + * Otherwise the task will be returned to a later + * {@link google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks|LeaseTasks} call so that + * another worker can retry it. * * The maximum lease duration is 1 week. * `lease_duration` will be truncated to the nearest second. * @param {google.cloud.tasks.v2beta2.Task.View} request.responseView - * The response_view specifies which subset of the {@link google.cloud.tasks.v2beta2.Task|Task} will be - * returned. - * - * By default response_view is {@link google.cloud.tasks.v2beta2.Task.View.BASIC|BASIC}; not all - * information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * - * Authorization for {@link google.cloud.tasks.v2beta2.Task.View.FULL|FULL} requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the {@link google.cloud.tasks.v2beta2.Task|Task} resource. + * The response_view specifies which subset of the + * {@link google.cloud.tasks.v2beta2.Task|Task} will be returned. + * + * By default response_view is + * {@link google.cloud.tasks.v2beta2.Task.View.BASIC|BASIC}; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * + * Authorization for {@link google.cloud.tasks.v2beta2.Task.View.FULL|FULL} + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * {@link google.cloud.tasks.v2beta2.Task|Task} resource. * @param {string} request.filter * `filter` can be used to specify a subset of tasks to lease. * * When `filter` is set to `tag=` then the - * {@link google.cloud.tasks.v2beta2.LeaseTasksResponse|response} will contain only tasks whose - * {@link google.cloud.tasks.v2beta2.PullMessage.tag|tag} is equal to ``. `` must be - * less than 500 characters. + * {@link google.cloud.tasks.v2beta2.LeaseTasksResponse|response} will contain only + * tasks whose {@link google.cloud.tasks.v2beta2.PullMessage.tag|tag} is equal to + * ``. `` must be less than 500 characters. * * When `filter` is set to `tag_function=oldest_tag()`, only tasks which have * the same tag as the task with the oldest - * {@link google.cloud.tasks.v2beta2.Task.schedule_time|schedule_time} will be returned. + * {@link google.cloud.tasks.v2beta2.Task.schedule_time|schedule_time} will be + * returned. * * Grammar Syntax: * @@ -1768,8 +1786,9 @@ export class CloudTasksClient { * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), * only UTF-8 encoded tags can be used in Cloud Tasks. Tag which * aren't UTF-8 encoded can't be used in the - * {@link google.cloud.tasks.v2beta2.LeaseTasksRequest.filter|filter} and the task's - * {@link google.cloud.tasks.v2beta2.PullMessage.tag|tag} will be displayed as empty in Cloud Tasks. + * {@link google.cloud.tasks.v2beta2.LeaseTasksRequest.filter|filter} and the + * task's {@link google.cloud.tasks.v2beta2.PullMessage.tag|tag} will be displayed + * as empty in Cloud Tasks. * @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. @@ -1852,12 +1871,13 @@ export class CloudTasksClient { * Acknowledges a pull task. * * The worker, that is, the entity that - * {@link google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks|leased} this task must call this method - * to indicate that the work associated with the task has finished. + * {@link google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks|leased} this task must + * call this method to indicate that the work associated with the task has + * finished. * * The worker must acknowledge a task within the - * {@link google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration|lease_duration} or the lease - * will expire and the task will become available to be leased + * {@link google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration|lease_duration} + * or the lease will expire and the task will become available to be leased * again. After the task is acknowledged, it will not be returned * by a later {@link google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks|LeaseTasks}, * {@link google.cloud.tasks.v2beta2.CloudTasks.GetTask|GetTask}, or @@ -1872,8 +1892,8 @@ export class CloudTasksClient { * Required. The task's current schedule time, available in the * {@link google.cloud.tasks.v2beta2.Task.schedule_time|schedule_time} returned by * {@link google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks|LeaseTasks} response or - * {@link google.cloud.tasks.v2beta2.CloudTasks.RenewLease|RenewLease} response. This restriction is - * to ensure that your worker currently holds the lease. + * {@link google.cloud.tasks.v2beta2.CloudTasks.RenewLease|RenewLease} response. + * This restriction is to ensure that your worker currently holds the lease. * @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. @@ -1963,7 +1983,8 @@ export class CloudTasksClient { * * The worker can use this method to extend the lease by a new * duration, starting from now. The new task lease will be - * returned in the task's {@link google.cloud.tasks.v2beta2.Task.schedule_time|schedule_time}. + * returned in the task's + * {@link google.cloud.tasks.v2beta2.Task.schedule_time|schedule_time}. * * @param {Object} request * The request object that will be sent. @@ -1974,8 +1995,8 @@ export class CloudTasksClient { * Required. The task's current schedule time, available in the * {@link google.cloud.tasks.v2beta2.Task.schedule_time|schedule_time} returned by * {@link google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks|LeaseTasks} response or - * {@link google.cloud.tasks.v2beta2.CloudTasks.RenewLease|RenewLease} response. This restriction is - * to ensure that your worker currently holds the lease. + * {@link google.cloud.tasks.v2beta2.CloudTasks.RenewLease|RenewLease} response. + * This restriction is to ensure that your worker currently holds the lease. * @param {google.protobuf.Duration} request.leaseDuration * Required. The desired new lease duration, starting from now. * @@ -1983,18 +2004,19 @@ export class CloudTasksClient { * The maximum lease duration is 1 week. * `lease_duration` will be truncated to the nearest second. * @param {google.cloud.tasks.v2beta2.Task.View} request.responseView - * The response_view specifies which subset of the {@link google.cloud.tasks.v2beta2.Task|Task} will be - * returned. - * - * By default response_view is {@link google.cloud.tasks.v2beta2.Task.View.BASIC|BASIC}; not all - * information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * - * Authorization for {@link google.cloud.tasks.v2beta2.Task.View.FULL|FULL} requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the {@link google.cloud.tasks.v2beta2.Task|Task} resource. + * The response_view specifies which subset of the + * {@link google.cloud.tasks.v2beta2.Task|Task} will be returned. + * + * By default response_view is + * {@link google.cloud.tasks.v2beta2.Task.View.BASIC|BASIC}; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * + * Authorization for {@link google.cloud.tasks.v2beta2.Task.View.FULL|FULL} + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * {@link google.cloud.tasks.v2beta2.Task|Task} resource. * @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. @@ -2077,9 +2099,9 @@ export class CloudTasksClient { * Cancel a pull task's lease. * * The worker can use this method to cancel a task's lease by - * setting its {@link google.cloud.tasks.v2beta2.Task.schedule_time|schedule_time} to now. This will - * make the task available to be leased to the next caller of - * {@link google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks|LeaseTasks}. + * setting its {@link google.cloud.tasks.v2beta2.Task.schedule_time|schedule_time} + * to now. This will make the task available to be leased to the next caller + * of {@link google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks|LeaseTasks}. * * @param {Object} request * The request object that will be sent. @@ -2090,21 +2112,22 @@ export class CloudTasksClient { * Required. The task's current schedule time, available in the * {@link google.cloud.tasks.v2beta2.Task.schedule_time|schedule_time} returned by * {@link google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks|LeaseTasks} response or - * {@link google.cloud.tasks.v2beta2.CloudTasks.RenewLease|RenewLease} response. This restriction is - * to ensure that your worker currently holds the lease. + * {@link google.cloud.tasks.v2beta2.CloudTasks.RenewLease|RenewLease} response. + * This restriction is to ensure that your worker currently holds the lease. * @param {google.cloud.tasks.v2beta2.Task.View} request.responseView - * The response_view specifies which subset of the {@link google.cloud.tasks.v2beta2.Task|Task} will be - * returned. - * - * By default response_view is {@link google.cloud.tasks.v2beta2.Task.View.BASIC|BASIC}; not all - * information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * - * Authorization for {@link google.cloud.tasks.v2beta2.Task.View.FULL|FULL} requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the {@link google.cloud.tasks.v2beta2.Task|Task} resource. + * The response_view specifies which subset of the + * {@link google.cloud.tasks.v2beta2.Task|Task} will be returned. + * + * By default response_view is + * {@link google.cloud.tasks.v2beta2.Task.View.BASIC|BASIC}; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * + * Authorization for {@link google.cloud.tasks.v2beta2.Task.View.FULL|FULL} + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * {@link google.cloud.tasks.v2beta2.Task|Task} resource. * @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. @@ -2187,30 +2210,33 @@ export class CloudTasksClient { * Forces a task to run now. * * When this method is called, Cloud Tasks will dispatch the task, even if - * the task is already running, the queue has reached its {@link google.cloud.tasks.v2beta2.RateLimits|RateLimits} or - * is {@link google.cloud.tasks.v2beta2.Queue.State.PAUSED|PAUSED}. + * the task is already running, the queue has reached its + * {@link google.cloud.tasks.v2beta2.RateLimits|RateLimits} or is + * {@link google.cloud.tasks.v2beta2.Queue.State.PAUSED|PAUSED}. * * This command is meant to be used for manual debugging. For - * example, {@link google.cloud.tasks.v2beta2.CloudTasks.RunTask|RunTask} can be used to retry a failed - * task after a fix has been made or to manually force a task to be - * dispatched now. + * example, {@link google.cloud.tasks.v2beta2.CloudTasks.RunTask|RunTask} can be + * used to retry a failed task after a fix has been made or to manually force + * a task to be dispatched now. * * The dispatched task is returned. That is, the task that is returned - * contains the {@link google.cloud.tasks.v2beta2.Task.status|status} after the task is dispatched but - * before the task is received by its target. + * contains the {@link google.cloud.tasks.v2beta2.Task.status|status} after the + * task is dispatched but before the task is received by its target. * * If Cloud Tasks receives a successful response from the task's * target, then the task will be deleted; otherwise the task's - * {@link google.cloud.tasks.v2beta2.Task.schedule_time|schedule_time} will be reset to the time that - * {@link google.cloud.tasks.v2beta2.CloudTasks.RunTask|RunTask} was called plus the retry delay specified - * in the queue's {@link google.cloud.tasks.v2beta2.RetryConfig|RetryConfig}. + * {@link google.cloud.tasks.v2beta2.Task.schedule_time|schedule_time} will be + * reset to the time that + * {@link google.cloud.tasks.v2beta2.CloudTasks.RunTask|RunTask} was called plus + * the retry delay specified in the queue's + * {@link google.cloud.tasks.v2beta2.RetryConfig|RetryConfig}. * * {@link google.cloud.tasks.v2beta2.CloudTasks.RunTask|RunTask} returns * {@link google.rpc.Code.NOT_FOUND|NOT_FOUND} when it is called on a * task that has already succeeded or permanently failed. * - * {@link google.cloud.tasks.v2beta2.CloudTasks.RunTask|RunTask} cannot be called on a - * {@link google.cloud.tasks.v2beta2.PullMessage|pull task}. + * {@link google.cloud.tasks.v2beta2.CloudTasks.RunTask|RunTask} cannot be called + * on a {@link google.cloud.tasks.v2beta2.PullMessage|pull task}. * * @param {Object} request * The request object that will be sent. @@ -2218,18 +2244,19 @@ export class CloudTasksClient { * Required. The task name. For example: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` * @param {google.cloud.tasks.v2beta2.Task.View} request.responseView - * The response_view specifies which subset of the {@link google.cloud.tasks.v2beta2.Task|Task} will be - * returned. - * - * By default response_view is {@link google.cloud.tasks.v2beta2.Task.View.BASIC|BASIC}; not all - * information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * - * Authorization for {@link google.cloud.tasks.v2beta2.Task.View.FULL|FULL} requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the {@link google.cloud.tasks.v2beta2.Task|Task} resource. + * The response_view specifies which subset of the + * {@link google.cloud.tasks.v2beta2.Task|Task} will be returned. + * + * By default response_view is + * {@link google.cloud.tasks.v2beta2.Task.View.BASIC|BASIC}; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * + * Authorization for {@link google.cloud.tasks.v2beta2.Task.View.FULL|FULL} + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * {@link google.cloud.tasks.v2beta2.Task|Task} resource. * @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. @@ -2318,11 +2345,10 @@ export class CloudTasksClient { * Required. The location name. * For example: `projects/PROJECT_ID/locations/LOCATION_ID` * @param {string} request.filter - * `filter` can be used to specify a subset of queues. Any {@link google.cloud.tasks.v2beta2.Queue|Queue} - * field can be used as a filter and several operators as supported. - * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as - * described in - * [Stackdriver's Advanced Logs + * `filter` can be used to specify a subset of queues. Any + * {@link google.cloud.tasks.v2beta2.Queue|Queue} field can be used as a filter and + * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The + * filter syntax is the same as described in [Stackdriver's Advanced Logs * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). * * Sample filter "app_engine_http_target: *". @@ -2335,20 +2361,22 @@ export class CloudTasksClient { * The maximum page size is 9800. If unspecified, the page size will * be the maximum. Fewer queues than requested might be returned, * even if more queues exist; use the - * {@link google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token|next_page_token} in the - * response to determine if more queues exist. + * {@link google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token|next_page_token} + * in the response to determine if more queues exist. * @param {string} request.pageToken * A token identifying the page of results to return. * * To request the first page results, page_token must be empty. To * request the next page of results, page_token must be the value of - * {@link google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token|next_page_token} returned - * from the previous call to {@link google.cloud.tasks.v2beta2.CloudTasks.ListQueues|ListQueues} - * method. It is an error to switch the value of the - * {@link google.cloud.tasks.v2beta2.ListQueuesRequest.filter|filter} while iterating through pages. + * {@link google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token|next_page_token} + * returned from the previous call to + * {@link google.cloud.tasks.v2beta2.CloudTasks.ListQueues|ListQueues} method. It + * is an error to switch the value of the + * {@link google.cloud.tasks.v2beta2.ListQueuesRequest.filter|filter} while + * iterating through pages. * @param {google.protobuf.FieldMask} [request.readMask] - * Optional. Read mask is used for a more granular control over what the API returns. - * If the mask is not present all fields will be returned except + * Optional. Read mask is used for a more granular control over what the API + * returns. If the mask is not present all fields will be returned except * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly * specified in the mask. * @param {object} [options] @@ -2441,11 +2469,10 @@ export class CloudTasksClient { * Required. The location name. * For example: `projects/PROJECT_ID/locations/LOCATION_ID` * @param {string} request.filter - * `filter` can be used to specify a subset of queues. Any {@link google.cloud.tasks.v2beta2.Queue|Queue} - * field can be used as a filter and several operators as supported. - * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as - * described in - * [Stackdriver's Advanced Logs + * `filter` can be used to specify a subset of queues. Any + * {@link google.cloud.tasks.v2beta2.Queue|Queue} field can be used as a filter and + * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The + * filter syntax is the same as described in [Stackdriver's Advanced Logs * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). * * Sample filter "app_engine_http_target: *". @@ -2458,20 +2485,22 @@ export class CloudTasksClient { * The maximum page size is 9800. If unspecified, the page size will * be the maximum. Fewer queues than requested might be returned, * even if more queues exist; use the - * {@link google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token|next_page_token} in the - * response to determine if more queues exist. + * {@link google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token|next_page_token} + * in the response to determine if more queues exist. * @param {string} request.pageToken * A token identifying the page of results to return. * * To request the first page results, page_token must be empty. To * request the next page of results, page_token must be the value of - * {@link google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token|next_page_token} returned - * from the previous call to {@link google.cloud.tasks.v2beta2.CloudTasks.ListQueues|ListQueues} - * method. It is an error to switch the value of the - * {@link google.cloud.tasks.v2beta2.ListQueuesRequest.filter|filter} while iterating through pages. + * {@link google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token|next_page_token} + * returned from the previous call to + * {@link google.cloud.tasks.v2beta2.CloudTasks.ListQueues|ListQueues} method. It + * is an error to switch the value of the + * {@link google.cloud.tasks.v2beta2.ListQueuesRequest.filter|filter} while + * iterating through pages. * @param {google.protobuf.FieldMask} [request.readMask] - * Optional. Read mask is used for a more granular control over what the API returns. - * If the mask is not present all fields will be returned except + * Optional. Read mask is used for a more granular control over what the API + * returns. If the mask is not present all fields will be returned except * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly * specified in the mask. * @param {object} [options] @@ -2518,11 +2547,10 @@ export class CloudTasksClient { * Required. The location name. * For example: `projects/PROJECT_ID/locations/LOCATION_ID` * @param {string} request.filter - * `filter` can be used to specify a subset of queues. Any {@link google.cloud.tasks.v2beta2.Queue|Queue} - * field can be used as a filter and several operators as supported. - * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as - * described in - * [Stackdriver's Advanced Logs + * `filter` can be used to specify a subset of queues. Any + * {@link google.cloud.tasks.v2beta2.Queue|Queue} field can be used as a filter and + * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The + * filter syntax is the same as described in [Stackdriver's Advanced Logs * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). * * Sample filter "app_engine_http_target: *". @@ -2535,20 +2563,22 @@ export class CloudTasksClient { * The maximum page size is 9800. If unspecified, the page size will * be the maximum. Fewer queues than requested might be returned, * even if more queues exist; use the - * {@link google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token|next_page_token} in the - * response to determine if more queues exist. + * {@link google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token|next_page_token} + * in the response to determine if more queues exist. * @param {string} request.pageToken * A token identifying the page of results to return. * * To request the first page results, page_token must be empty. To * request the next page of results, page_token must be the value of - * {@link google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token|next_page_token} returned - * from the previous call to {@link google.cloud.tasks.v2beta2.CloudTasks.ListQueues|ListQueues} - * method. It is an error to switch the value of the - * {@link google.cloud.tasks.v2beta2.ListQueuesRequest.filter|filter} while iterating through pages. + * {@link google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token|next_page_token} + * returned from the previous call to + * {@link google.cloud.tasks.v2beta2.CloudTasks.ListQueues|ListQueues} method. It + * is an error to switch the value of the + * {@link google.cloud.tasks.v2beta2.ListQueuesRequest.filter|filter} while + * iterating through pages. * @param {google.protobuf.FieldMask} [request.readMask] - * Optional. Read mask is used for a more granular control over what the API returns. - * If the mask is not present all fields will be returned except + * Optional. Read mask is used for a more granular control over what the API + * returns. If the mask is not present all fields will be returned except * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly * specified in the mask. * @param {object} [options] @@ -2588,10 +2618,10 @@ export class CloudTasksClient { /** * Lists the tasks in a queue. * - * By default, only the {@link google.cloud.tasks.v2beta2.Task.View.BASIC|BASIC} view is retrieved - * due to performance considerations; - * {@link google.cloud.tasks.v2beta2.ListTasksRequest.response_view|response_view} controls the - * subset of information which is returned. + * By default, only the {@link google.cloud.tasks.v2beta2.Task.View.BASIC|BASIC} + * view is retrieved due to performance considerations; + * {@link google.cloud.tasks.v2beta2.ListTasksRequest.response_view|response_view} + * controls the subset of information which is returned. * * The tasks may be returned in any order. The ordering may change at any * time. @@ -2602,24 +2632,25 @@ export class CloudTasksClient { * Required. The queue name. For example: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` * @param {google.cloud.tasks.v2beta2.Task.View} request.responseView - * The response_view specifies which subset of the {@link google.cloud.tasks.v2beta2.Task|Task} will be - * returned. - * - * By default response_view is {@link google.cloud.tasks.v2beta2.Task.View.BASIC|BASIC}; not all - * information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * - * Authorization for {@link google.cloud.tasks.v2beta2.Task.View.FULL|FULL} requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the {@link google.cloud.tasks.v2beta2.Task|Task} resource. + * The response_view specifies which subset of the + * {@link google.cloud.tasks.v2beta2.Task|Task} will be returned. + * + * By default response_view is + * {@link google.cloud.tasks.v2beta2.Task.View.BASIC|BASIC}; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * + * Authorization for {@link google.cloud.tasks.v2beta2.Task.View.FULL|FULL} + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * {@link google.cloud.tasks.v2beta2.Task|Task} resource. * @param {number} request.pageSize * Maximum page size. * * Fewer tasks than requested might be returned, even if more tasks exist; use - * {@link google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token|next_page_token} in the response to - * determine if more tasks exist. + * {@link google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token|next_page_token} + * in the response to determine if more tasks exist. * * The maximum page size is 1000. If unspecified, the page size will be the * maximum. @@ -2628,9 +2659,9 @@ export class CloudTasksClient { * * To request the first page results, page_token must be empty. To * request the next page of results, page_token must be the value of - * {@link google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token|next_page_token} returned - * from the previous call to {@link google.cloud.tasks.v2beta2.CloudTasks.ListTasks|ListTasks} - * method. + * {@link google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token|next_page_token} + * returned from the previous call to + * {@link google.cloud.tasks.v2beta2.CloudTasks.ListTasks|ListTasks} method. * * The page token is valid for only 2 hours. * @param {object} [options] @@ -2723,24 +2754,25 @@ export class CloudTasksClient { * Required. The queue name. For example: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` * @param {google.cloud.tasks.v2beta2.Task.View} request.responseView - * The response_view specifies which subset of the {@link google.cloud.tasks.v2beta2.Task|Task} will be - * returned. - * - * By default response_view is {@link google.cloud.tasks.v2beta2.Task.View.BASIC|BASIC}; not all - * information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * - * Authorization for {@link google.cloud.tasks.v2beta2.Task.View.FULL|FULL} requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the {@link google.cloud.tasks.v2beta2.Task|Task} resource. + * The response_view specifies which subset of the + * {@link google.cloud.tasks.v2beta2.Task|Task} will be returned. + * + * By default response_view is + * {@link google.cloud.tasks.v2beta2.Task.View.BASIC|BASIC}; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * + * Authorization for {@link google.cloud.tasks.v2beta2.Task.View.FULL|FULL} + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * {@link google.cloud.tasks.v2beta2.Task|Task} resource. * @param {number} request.pageSize * Maximum page size. * * Fewer tasks than requested might be returned, even if more tasks exist; use - * {@link google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token|next_page_token} in the response to - * determine if more tasks exist. + * {@link google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token|next_page_token} + * in the response to determine if more tasks exist. * * The maximum page size is 1000. If unspecified, the page size will be the * maximum. @@ -2749,9 +2781,9 @@ export class CloudTasksClient { * * To request the first page results, page_token must be empty. To * request the next page of results, page_token must be the value of - * {@link google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token|next_page_token} returned - * from the previous call to {@link google.cloud.tasks.v2beta2.CloudTasks.ListTasks|ListTasks} - * method. + * {@link google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token|next_page_token} + * returned from the previous call to + * {@link google.cloud.tasks.v2beta2.CloudTasks.ListTasks|ListTasks} method. * * The page token is valid for only 2 hours. * @param {object} [options] @@ -2798,24 +2830,25 @@ export class CloudTasksClient { * Required. The queue name. For example: * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` * @param {google.cloud.tasks.v2beta2.Task.View} request.responseView - * The response_view specifies which subset of the {@link google.cloud.tasks.v2beta2.Task|Task} will be - * returned. - * - * By default response_view is {@link google.cloud.tasks.v2beta2.Task.View.BASIC|BASIC}; not all - * information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * - * Authorization for {@link google.cloud.tasks.v2beta2.Task.View.FULL|FULL} requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the {@link google.cloud.tasks.v2beta2.Task|Task} resource. + * The response_view specifies which subset of the + * {@link google.cloud.tasks.v2beta2.Task|Task} will be returned. + * + * By default response_view is + * {@link google.cloud.tasks.v2beta2.Task.View.BASIC|BASIC}; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * + * Authorization for {@link google.cloud.tasks.v2beta2.Task.View.FULL|FULL} + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * {@link google.cloud.tasks.v2beta2.Task|Task} resource. * @param {number} request.pageSize * Maximum page size. * * Fewer tasks than requested might be returned, even if more tasks exist; use - * {@link google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token|next_page_token} in the response to - * determine if more tasks exist. + * {@link google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token|next_page_token} + * in the response to determine if more tasks exist. * * The maximum page size is 1000. If unspecified, the page size will be the * maximum. @@ -2824,9 +2857,9 @@ export class CloudTasksClient { * * To request the first page results, page_token must be empty. To * request the next page of results, page_token must be the value of - * {@link google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token|next_page_token} returned - * from the previous call to {@link google.cloud.tasks.v2beta2.CloudTasks.ListTasks|ListTasks} - * method. + * {@link google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token|next_page_token} + * returned from the previous call to + * {@link google.cloud.tasks.v2beta2.CloudTasks.ListTasks|ListTasks} method. * * The page token is valid for only 2 hours. * @param {object} [options] diff --git a/packages/google-cloud-texttospeech/README.md b/packages/google-cloud-texttospeech/README.md index 9d07755752b..b33922d386c 100644 --- a/packages/google-cloud-texttospeech/README.md +++ b/packages/google-cloud-texttospeech/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Google Cloud Text-to-Speech: Node.js Client](https://github.com/googleapis/google-cloud-node) +# [Google Cloud Text-to-Speech: Node.js Client](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-texttospeech) [![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/text-to-speech.svg)](https://www.npmjs.org/package/@google-cloud/text-to-speech) @@ -93,18 +93,17 @@ quickStart(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-texttospeech/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Text_to_speech.list_voices | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-texttospeech/samples/generated/v1/text_to_speech.list_voices.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-texttospeech/samples/generated/v1/text_to_speech.list_voices.js,samples/README.md) | -| Text_to_speech.synthesize_speech | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-texttospeech/samples/generated/v1/text_to_speech.synthesize_speech.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-texttospeech/samples/generated/v1/text_to_speech.synthesize_speech.js,samples/README.md) | -| Text_to_speech_long_audio_synthesize.synthesize_long_audio | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-texttospeech/samples/generated/v1/text_to_speech_long_audio_synthesize.synthesize_long_audio.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-texttospeech/samples/generated/v1/text_to_speech_long_audio_synthesize.synthesize_long_audio.js,samples/README.md) | -| Text_to_speech.list_voices | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-texttospeech/samples/generated/v1beta1/text_to_speech.list_voices.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-texttospeech/samples/generated/v1beta1/text_to_speech.list_voices.js,samples/README.md) | -| Text_to_speech.synthesize_speech | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-texttospeech/samples/generated/v1beta1/text_to_speech.synthesize_speech.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-texttospeech/samples/generated/v1beta1/text_to_speech.synthesize_speech.js,samples/README.md) | -| Text_to_speech_long_audio_synthesize.synthesize_long_audio | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-texttospeech/samples/generated/v1beta1/text_to_speech_long_audio_synthesize.synthesize_long_audio.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-texttospeech/samples/generated/v1beta1/text_to_speech_long_audio_synthesize.synthesize_long_audio.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-texttospeech/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-texttospeech/samples/quickstart.js,samples/README.md) | -| Quickstart.test | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-texttospeech/samples/test/quickstart.test.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-texttospeech/samples/test/quickstart.test.js,samples/README.md) | +| Text_to_speech.list_voices | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-texttospeech/samples/generated/v1/text_to_speech.list_voices.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-texttospeech/samples/generated/v1/text_to_speech.list_voices.js,packages/google-cloud-texttospeech/samples/README.md) | +| Text_to_speech.synthesize_speech | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-texttospeech/samples/generated/v1/text_to_speech.synthesize_speech.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-texttospeech/samples/generated/v1/text_to_speech.synthesize_speech.js,packages/google-cloud-texttospeech/samples/README.md) | +| Text_to_speech_long_audio_synthesize.synthesize_long_audio | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-texttospeech/samples/generated/v1/text_to_speech_long_audio_synthesize.synthesize_long_audio.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-texttospeech/samples/generated/v1/text_to_speech_long_audio_synthesize.synthesize_long_audio.js,packages/google-cloud-texttospeech/samples/README.md) | +| Text_to_speech.list_voices | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-texttospeech/samples/generated/v1beta1/text_to_speech.list_voices.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-texttospeech/samples/generated/v1beta1/text_to_speech.list_voices.js,packages/google-cloud-texttospeech/samples/README.md) | +| Text_to_speech.synthesize_speech | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-texttospeech/samples/generated/v1beta1/text_to_speech.synthesize_speech.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-texttospeech/samples/generated/v1beta1/text_to_speech.synthesize_speech.js,packages/google-cloud-texttospeech/samples/README.md) | +| Text_to_speech_long_audio_synthesize.synthesize_long_audio | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-texttospeech/samples/generated/v1beta1/text_to_speech_long_audio_synthesize.synthesize_long_audio.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-texttospeech/samples/generated/v1beta1/text_to_speech_long_audio_synthesize.synthesize_long_audio.js,packages/google-cloud-texttospeech/samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-texttospeech/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-texttospeech/samples/quickstart.js,packages/google-cloud-texttospeech/samples/README.md) | diff --git a/packages/google-cloud-texttospeech/package.json b/packages/google-cloud-texttospeech/package.json index 5778480d45e..aa50938a828 100644 --- a/packages/google-cloud-texttospeech/package.json +++ b/packages/google-cloud-texttospeech/package.json @@ -32,20 +32,20 @@ "Cloud Text-to-Speech API" ], "scripts": { - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "system-test": "npm run compile && c8 mocha build/system-test", - "docs": "jsdoc -c .jsdoc.js", - "lint": "gts check", - "fix": "gts fix", - "docs-test": "linkinator docs", "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", - "prepare": "npm run compile", - "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean" + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -61,6 +61,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -71,5 +72,4 @@ "webpack-cli": "^5.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-texttospeech" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-texttospeech/protos/google/cloud/texttospeech/v1/cloud_tts_lrs.proto b/packages/google-cloud-texttospeech/protos/google/cloud/texttospeech/v1/cloud_tts_lrs.proto index 6f9662355f5..a903eb63f0a 100644 --- a/packages/google-cloud-texttospeech/protos/google/cloud/texttospeech/v1/cloud_tts_lrs.proto +++ b/packages/google-cloud-texttospeech/protos/google/cloud/texttospeech/v1/cloud_tts_lrs.proto @@ -56,22 +56,23 @@ service TextToSpeechLongAudioSynthesize { // `SynthesizeLongAudio` method. message SynthesizeLongAudioRequest { // The resource states of the request in the form of - // `projects/*/locations/*/voices/*`. + // `projects/*/locations/*`. string parent = 1; // Required. The Synthesizer requires either plain text or SSML as input. + // While Long Audio is in preview, SSML is temporarily unsupported. SynthesisInput input = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The configuration of the synthesized audio. AudioConfig audio_config = 3 [(google.api.field_behavior) = REQUIRED]; - // Specifies a Cloud Storage URI for the synthesis results. Must be + // Required. Specifies a Cloud Storage URI for the synthesis results. Must be // specified in the format: `gs://bucket_name/object_name`, and the bucket // must already exist. - string output_gcs_uri = 4; + string output_gcs_uri = 4 [(google.api.field_behavior) = REQUIRED]; - // The desired voice of the synthesized audio. - VoiceSelectionParams voice = 5; + // Required. The desired voice of the synthesized audio. + VoiceSelectionParams voice = 5 [(google.api.field_behavior) = REQUIRED]; } // The message returned to the client by the `SynthesizeLongAudio` method. diff --git a/packages/google-cloud-texttospeech/protos/google/cloud/texttospeech/v1beta1/cloud_tts_lrs.proto b/packages/google-cloud-texttospeech/protos/google/cloud/texttospeech/v1beta1/cloud_tts_lrs.proto index ecfecf0a46f..c68a1a2ac31 100644 --- a/packages/google-cloud-texttospeech/protos/google/cloud/texttospeech/v1beta1/cloud_tts_lrs.proto +++ b/packages/google-cloud-texttospeech/protos/google/cloud/texttospeech/v1beta1/cloud_tts_lrs.proto @@ -56,22 +56,23 @@ service TextToSpeechLongAudioSynthesize { // `SynthesizeLongAudio` method. message SynthesizeLongAudioRequest { // The resource states of the request in the form of - // `projects/*/locations/*/voices/*`. + // `projects/*/locations/*`. string parent = 1; // Required. The Synthesizer requires either plain text or SSML as input. + // While Long Audio is in preview, SSML is temporarily unsupported. SynthesisInput input = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The configuration of the synthesized audio. AudioConfig audio_config = 3 [(google.api.field_behavior) = REQUIRED]; - // Specifies a Cloud Storage URI for the synthesis results. Must be + // Required. Specifies a Cloud Storage URI for the synthesis results. Must be // specified in the format: `gs://bucket_name/object_name`, and the bucket // must already exist. - string output_gcs_uri = 4; + string output_gcs_uri = 4 [(google.api.field_behavior) = REQUIRED]; - // The desired voice of the synthesized audio. - VoiceSelectionParams voice = 5; + // Required. The desired voice of the synthesized audio. + VoiceSelectionParams voice = 5 [(google.api.field_behavior) = REQUIRED]; } // The message returned to the client by the `SynthesizeLongAudio` method. diff --git a/packages/google-cloud-texttospeech/protos/protos.json b/packages/google-cloud-texttospeech/protos/protos.json index f5059f81890..c8e7ade6fb1 100644 --- a/packages/google-cloud-texttospeech/protos/protos.json +++ b/packages/google-cloud-texttospeech/protos/protos.json @@ -330,11 +330,17 @@ }, "outputGcsUri": { "type": "string", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "voice": { "type": "VoiceSelectionParams", - "id": 5 + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, @@ -718,11 +724,17 @@ }, "outputGcsUri": { "type": "string", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "voice": { "type": "VoiceSelectionParams", - "id": 5 + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, diff --git a/packages/google-cloud-texttospeech/samples/README.md b/packages/google-cloud-texttospeech/samples/README.md index d858e17fd76..c9792ca9901 100644 --- a/packages/google-cloud-texttospeech/samples/README.md +++ b/packages/google-cloud-texttospeech/samples/README.md @@ -19,7 +19,6 @@ * [Text_to_speech.synthesize_speech](#text_to_speech.synthesize_speech) * [Text_to_speech_long_audio_synthesize.synthesize_long_audio](#text_to_speech_long_audio_synthesize.synthesize_long_audio) * [Quickstart](#quickstart) - * [Quickstart.test](#quickstart.test) ## Before you begin @@ -150,23 +149,6 @@ __Usage:__ `node packages/google-cloud-texttospeech/samples/quickstart.js` ------ - - - - -### Quickstart.test - -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-texttospeech/samples/test/quickstart.test.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-texttospeech/samples/test/quickstart.test.js,samples/README.md) - -__Usage:__ - - -`node packages/google-cloud-texttospeech/samples/test/quickstart.test.js` - - diff --git a/packages/google-cloud-texttospeech/samples/generated/v1/snippet_metadata.google.cloud.texttospeech.v1.json b/packages/google-cloud-texttospeech/samples/generated/v1/snippet_metadata.google.cloud.texttospeech.v1.json index da7c33be34b..8b0a33d5350 100644 --- a/packages/google-cloud-texttospeech/samples/generated/v1/snippet_metadata.google.cloud.texttospeech.v1.json +++ b/packages/google-cloud-texttospeech/samples/generated/v1/snippet_metadata.google.cloud.texttospeech.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-texttospeech", - "version": "4.2.0", + "version": "4.2.2", "language": "TYPESCRIPT", "apis": [ { @@ -110,7 +110,7 @@ "segments": [ { "start": 25, - "end": 74, + "end": 77, "type": "FULL" } ], diff --git a/packages/google-cloud-texttospeech/samples/generated/v1/text_to_speech_long_audio_synthesize.synthesize_long_audio.js b/packages/google-cloud-texttospeech/samples/generated/v1/text_to_speech_long_audio_synthesize.synthesize_long_audio.js index 63f5a78e9db..a10c4d590ac 100644 --- a/packages/google-cloud-texttospeech/samples/generated/v1/text_to_speech_long_audio_synthesize.synthesize_long_audio.js +++ b/packages/google-cloud-texttospeech/samples/generated/v1/text_to_speech_long_audio_synthesize.synthesize_long_audio.js @@ -20,7 +20,7 @@ 'use strict'; -function main(input, audioConfig) { +function main(input, audioConfig, outputGcsUri, voice) { // [START texttospeech_v1_generated_TextToSpeechLongAudioSynthesize_SynthesizeLongAudio_async] /** * This snippet has been automatically generated and should be regarded as a code template only. @@ -30,11 +30,12 @@ function main(input, audioConfig) { */ /** * The resource states of the request in the form of - * `projects/* /locations/* /voices/*`. + * `projects/* /locations/*`. */ // const parent = 'abc123' /** * Required. The Synthesizer requires either plain text or SSML as input. + * While Long Audio is in preview, SSML is temporarily unsupported. */ // const input = {} /** @@ -42,13 +43,13 @@ function main(input, audioConfig) { */ // const audioConfig = {} /** - * Specifies a Cloud Storage URI for the synthesis results. Must be + * Required. Specifies a Cloud Storage URI for the synthesis results. Must be * specified in the format: `gs://bucket_name/object_name`, and the bucket * must already exist. */ // const outputGcsUri = 'abc123' /** - * The desired voice of the synthesized audio. + * Required. The desired voice of the synthesized audio. */ // const voice = {} @@ -63,6 +64,8 @@ function main(input, audioConfig) { const request = { input, audioConfig, + outputGcsUri, + voice, }; // Run request diff --git a/packages/google-cloud-texttospeech/samples/generated/v1beta1/snippet_metadata.google.cloud.texttospeech.v1beta1.json b/packages/google-cloud-texttospeech/samples/generated/v1beta1/snippet_metadata.google.cloud.texttospeech.v1beta1.json index 09619b9c025..7c00fd7ba33 100644 --- a/packages/google-cloud-texttospeech/samples/generated/v1beta1/snippet_metadata.google.cloud.texttospeech.v1beta1.json +++ b/packages/google-cloud-texttospeech/samples/generated/v1beta1/snippet_metadata.google.cloud.texttospeech.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-texttospeech", - "version": "4.2.0", + "version": "4.2.2", "language": "TYPESCRIPT", "apis": [ { @@ -114,7 +114,7 @@ "segments": [ { "start": 25, - "end": 74, + "end": 77, "type": "FULL" } ], diff --git a/packages/google-cloud-texttospeech/samples/generated/v1beta1/text_to_speech_long_audio_synthesize.synthesize_long_audio.js b/packages/google-cloud-texttospeech/samples/generated/v1beta1/text_to_speech_long_audio_synthesize.synthesize_long_audio.js index ad16e93da88..f7409ad925d 100644 --- a/packages/google-cloud-texttospeech/samples/generated/v1beta1/text_to_speech_long_audio_synthesize.synthesize_long_audio.js +++ b/packages/google-cloud-texttospeech/samples/generated/v1beta1/text_to_speech_long_audio_synthesize.synthesize_long_audio.js @@ -20,7 +20,7 @@ 'use strict'; -function main(input, audioConfig) { +function main(input, audioConfig, outputGcsUri, voice) { // [START texttospeech_v1beta1_generated_TextToSpeechLongAudioSynthesize_SynthesizeLongAudio_async] /** * This snippet has been automatically generated and should be regarded as a code template only. @@ -30,11 +30,12 @@ function main(input, audioConfig) { */ /** * The resource states of the request in the form of - * `projects/* /locations/* /voices/*`. + * `projects/* /locations/*`. */ // const parent = 'abc123' /** * Required. The Synthesizer requires either plain text or SSML as input. + * While Long Audio is in preview, SSML is temporarily unsupported. */ // const input = {} /** @@ -42,13 +43,13 @@ function main(input, audioConfig) { */ // const audioConfig = {} /** - * Specifies a Cloud Storage URI for the synthesis results. Must be + * Required. Specifies a Cloud Storage URI for the synthesis results. Must be * specified in the format: `gs://bucket_name/object_name`, and the bucket * must already exist. */ // const outputGcsUri = 'abc123' /** - * The desired voice of the synthesized audio. + * Required. The desired voice of the synthesized audio. */ // const voice = {} @@ -63,6 +64,8 @@ function main(input, audioConfig) { const request = { input, audioConfig, + outputGcsUri, + voice, }; // Run request diff --git a/packages/google-cloud-texttospeech/src/v1/text_to_speech_long_audio_synthesize_client.ts b/packages/google-cloud-texttospeech/src/v1/text_to_speech_long_audio_synthesize_client.ts index 271d0df8389..2caa0c9440f 100644 --- a/packages/google-cloud-texttospeech/src/v1/text_to_speech_long_audio_synthesize_client.ts +++ b/packages/google-cloud-texttospeech/src/v1/text_to_speech_long_audio_synthesize_client.ts @@ -346,17 +346,18 @@ export class TextToSpeechLongAudioSynthesizeClient { * The request object that will be sent. * @param {string} request.parent * The resource states of the request in the form of - * `projects/* /locations/* /voices/*`. + * `projects/* /locations/*`. * @param {google.cloud.texttospeech.v1.SynthesisInput} request.input * Required. The Synthesizer requires either plain text or SSML as input. + * While Long Audio is in preview, SSML is temporarily unsupported. * @param {google.cloud.texttospeech.v1.AudioConfig} request.audioConfig * Required. The configuration of the synthesized audio. * @param {string} request.outputGcsUri - * Specifies a Cloud Storage URI for the synthesis results. Must be + * Required. Specifies a Cloud Storage URI for the synthesis results. Must be * specified in the format: `gs://bucket_name/object_name`, and the bucket * must already exist. * @param {google.cloud.texttospeech.v1.VoiceSelectionParams} request.voice - * The desired voice of the synthesized audio. + * Required. The desired voice of the synthesized audio. * @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-texttospeech/src/v1beta1/text_to_speech_long_audio_synthesize_client.ts b/packages/google-cloud-texttospeech/src/v1beta1/text_to_speech_long_audio_synthesize_client.ts index ebabeaa0df2..80779e636d5 100644 --- a/packages/google-cloud-texttospeech/src/v1beta1/text_to_speech_long_audio_synthesize_client.ts +++ b/packages/google-cloud-texttospeech/src/v1beta1/text_to_speech_long_audio_synthesize_client.ts @@ -346,17 +346,18 @@ export class TextToSpeechLongAudioSynthesizeClient { * The request object that will be sent. * @param {string} request.parent * The resource states of the request in the form of - * `projects/* /locations/* /voices/*`. + * `projects/* /locations/*`. * @param {google.cloud.texttospeech.v1beta1.SynthesisInput} request.input * Required. The Synthesizer requires either plain text or SSML as input. + * While Long Audio is in preview, SSML is temporarily unsupported. * @param {google.cloud.texttospeech.v1beta1.AudioConfig} request.audioConfig * Required. The configuration of the synthesized audio. * @param {string} request.outputGcsUri - * Specifies a Cloud Storage URI for the synthesis results. Must be + * Required. Specifies a Cloud Storage URI for the synthesis results. Must be * specified in the format: `gs://bucket_name/object_name`, and the bucket * must already exist. * @param {google.cloud.texttospeech.v1beta1.VoiceSelectionParams} request.voice - * The desired voice of the synthesized audio. + * Required. The desired voice of the synthesized audio. * @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-tpu/CHANGELOG.md b/packages/google-cloud-tpu/CHANGELOG.md index 34a839cd9d5..1075de1227e 100644 --- a/packages/google-cloud-tpu/CHANGELOG.md +++ b/packages/google-cloud-tpu/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [2.6.1](https://github.com/googleapis/google-cloud-node/compare/tpu-v2.6.0...tpu-v2.6.1) (2023-05-04) + + +### Bug Fixes + +* [tpu] restrict the visibility of an API ([#4234](https://github.com/googleapis/google-cloud-node/issues/4234)) ([2421e93](https://github.com/googleapis/google-cloud-node/commit/2421e933f19af7edd6d250a5e30f75b832029cd2)) + +## [2.6.0](https://github.com/googleapis/google-cloud-node/compare/tpu-v2.5.1...tpu-v2.6.0) (2023-04-24) + + +### Features + +* [tpu] make reservation_name parameter generally visible in QueuedResource message ([#4178](https://github.com/googleapis/google-cloud-node/issues/4178)) ([595ab28](https://github.com/googleapis/google-cloud-node/commit/595ab2845ac8a70fc2e94d7f69029396cb6414f0)) + ## [2.5.1](https://github.com/googleapis/google-cloud-node/compare/tpu-v2.5.0...tpu-v2.5.1) (2023-04-13) diff --git a/packages/google-cloud-tpu/README.md b/packages/google-cloud-tpu/README.md index ee2dfb3fde9..ac956bd77eb 100644 --- a/packages/google-cloud-tpu/README.md +++ b/packages/google-cloud-tpu/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Cloud TPU: Node.js Client](https://github.com/googleapis/google-cloud-node) +# [Cloud TPU: Node.js Client](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-tpu) [![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/tpu.svg)](https://www.npmjs.org/package/@google-cloud/tpu) @@ -83,54 +83,54 @@ listNodes(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-tpu/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Tpu.create_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v1/tpu.create_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v1/tpu.create_node.js,samples/README.md) | -| Tpu.delete_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v1/tpu.delete_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v1/tpu.delete_node.js,samples/README.md) | -| Tpu.get_accelerator_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v1/tpu.get_accelerator_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v1/tpu.get_accelerator_type.js,samples/README.md) | -| Tpu.get_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v1/tpu.get_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v1/tpu.get_node.js,samples/README.md) | -| Tpu.get_tensor_flow_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v1/tpu.get_tensor_flow_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v1/tpu.get_tensor_flow_version.js,samples/README.md) | -| Tpu.list_accelerator_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v1/tpu.list_accelerator_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v1/tpu.list_accelerator_types.js,samples/README.md) | -| Tpu.list_nodes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v1/tpu.list_nodes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v1/tpu.list_nodes.js,samples/README.md) | -| Tpu.list_tensor_flow_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v1/tpu.list_tensor_flow_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v1/tpu.list_tensor_flow_versions.js,samples/README.md) | -| Tpu.reimage_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v1/tpu.reimage_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v1/tpu.reimage_node.js,samples/README.md) | -| Tpu.start_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v1/tpu.start_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v1/tpu.start_node.js,samples/README.md) | -| Tpu.stop_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v1/tpu.stop_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v1/tpu.stop_node.js,samples/README.md) | -| Tpu.create_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2/tpu.create_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2/tpu.create_node.js,samples/README.md) | -| Tpu.delete_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2/tpu.delete_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2/tpu.delete_node.js,samples/README.md) | -| Tpu.generate_service_identity | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2/tpu.generate_service_identity.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2/tpu.generate_service_identity.js,samples/README.md) | -| Tpu.get_accelerator_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2/tpu.get_accelerator_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2/tpu.get_accelerator_type.js,samples/README.md) | -| Tpu.get_guest_attributes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2/tpu.get_guest_attributes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2/tpu.get_guest_attributes.js,samples/README.md) | -| Tpu.get_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2/tpu.get_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2/tpu.get_node.js,samples/README.md) | -| Tpu.get_runtime_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2/tpu.get_runtime_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2/tpu.get_runtime_version.js,samples/README.md) | -| Tpu.list_accelerator_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2/tpu.list_accelerator_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2/tpu.list_accelerator_types.js,samples/README.md) | -| Tpu.list_nodes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2/tpu.list_nodes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2/tpu.list_nodes.js,samples/README.md) | -| Tpu.list_runtime_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2/tpu.list_runtime_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2/tpu.list_runtime_versions.js,samples/README.md) | -| Tpu.start_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2/tpu.start_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2/tpu.start_node.js,samples/README.md) | -| Tpu.stop_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2/tpu.stop_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2/tpu.stop_node.js,samples/README.md) | -| Tpu.update_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2/tpu.update_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2/tpu.update_node.js,samples/README.md) | -| Tpu.create_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.create_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.create_node.js,samples/README.md) | -| Tpu.create_queued_resource | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.create_queued_resource.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.create_queued_resource.js,samples/README.md) | -| Tpu.delete_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.delete_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.delete_node.js,samples/README.md) | -| Tpu.delete_queued_resource | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.delete_queued_resource.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.delete_queued_resource.js,samples/README.md) | -| Tpu.generate_service_identity | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.generate_service_identity.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.generate_service_identity.js,samples/README.md) | -| Tpu.get_accelerator_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.get_accelerator_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.get_accelerator_type.js,samples/README.md) | -| Tpu.get_guest_attributes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.get_guest_attributes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.get_guest_attributes.js,samples/README.md) | -| Tpu.get_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.get_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.get_node.js,samples/README.md) | -| Tpu.get_queued_resource | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.get_queued_resource.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.get_queued_resource.js,samples/README.md) | -| Tpu.get_runtime_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.get_runtime_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.get_runtime_version.js,samples/README.md) | -| Tpu.list_accelerator_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.list_accelerator_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.list_accelerator_types.js,samples/README.md) | -| Tpu.list_nodes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.list_nodes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.list_nodes.js,samples/README.md) | -| Tpu.list_queued_resources | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.list_queued_resources.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.list_queued_resources.js,samples/README.md) | -| Tpu.list_runtime_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.list_runtime_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.list_runtime_versions.js,samples/README.md) | -| Tpu.simulate_maintenance_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.simulate_maintenance_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.simulate_maintenance_event.js,samples/README.md) | -| Tpu.start_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.start_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.start_node.js,samples/README.md) | -| Tpu.stop_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.stop_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.stop_node.js,samples/README.md) | -| Tpu.update_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.update_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.update_node.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/quickstart.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/test/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/test/quickstart.js,samples/README.md) | +| Tpu.create_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v1/tpu.create_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v1/tpu.create_node.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.delete_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v1/tpu.delete_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v1/tpu.delete_node.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.get_accelerator_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v1/tpu.get_accelerator_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v1/tpu.get_accelerator_type.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.get_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v1/tpu.get_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v1/tpu.get_node.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.get_tensor_flow_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v1/tpu.get_tensor_flow_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v1/tpu.get_tensor_flow_version.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.list_accelerator_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v1/tpu.list_accelerator_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v1/tpu.list_accelerator_types.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.list_nodes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v1/tpu.list_nodes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v1/tpu.list_nodes.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.list_tensor_flow_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v1/tpu.list_tensor_flow_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v1/tpu.list_tensor_flow_versions.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.reimage_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v1/tpu.reimage_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v1/tpu.reimage_node.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.start_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v1/tpu.start_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v1/tpu.start_node.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.stop_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v1/tpu.stop_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v1/tpu.stop_node.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.create_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2/tpu.create_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2/tpu.create_node.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.delete_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2/tpu.delete_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2/tpu.delete_node.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.generate_service_identity | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2/tpu.generate_service_identity.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2/tpu.generate_service_identity.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.get_accelerator_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2/tpu.get_accelerator_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2/tpu.get_accelerator_type.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.get_guest_attributes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2/tpu.get_guest_attributes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2/tpu.get_guest_attributes.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.get_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2/tpu.get_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2/tpu.get_node.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.get_runtime_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2/tpu.get_runtime_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2/tpu.get_runtime_version.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.list_accelerator_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2/tpu.list_accelerator_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2/tpu.list_accelerator_types.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.list_nodes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2/tpu.list_nodes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2/tpu.list_nodes.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.list_runtime_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2/tpu.list_runtime_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2/tpu.list_runtime_versions.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.start_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2/tpu.start_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2/tpu.start_node.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.stop_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2/tpu.stop_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2/tpu.stop_node.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.update_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2/tpu.update_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2/tpu.update_node.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.create_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.create_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.create_node.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.create_queued_resource | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.create_queued_resource.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.create_queued_resource.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.delete_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.delete_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.delete_node.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.delete_queued_resource | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.delete_queued_resource.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.delete_queued_resource.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.generate_service_identity | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.generate_service_identity.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.generate_service_identity.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.get_accelerator_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.get_accelerator_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.get_accelerator_type.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.get_guest_attributes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.get_guest_attributes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.get_guest_attributes.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.get_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.get_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.get_node.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.get_queued_resource | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.get_queued_resource.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.get_queued_resource.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.get_runtime_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.get_runtime_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.get_runtime_version.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.list_accelerator_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.list_accelerator_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.list_accelerator_types.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.list_nodes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.list_nodes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.list_nodes.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.list_queued_resources | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.list_queued_resources.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.list_queued_resources.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.list_runtime_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.list_runtime_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.list_runtime_versions.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.reset_queued_resource | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.reset_queued_resource.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.reset_queued_resource.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.simulate_maintenance_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.simulate_maintenance_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.simulate_maintenance_event.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.start_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.start_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.start_node.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.stop_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.stop_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.stop_node.js,packages/google-cloud-tpu/samples/README.md) | +| Tpu.update_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.update_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.update_node.js,packages/google-cloud-tpu/samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/quickstart.js,packages/google-cloud-tpu/samples/README.md) | diff --git a/packages/google-cloud-tpu/package.json b/packages/google-cloud-tpu/package.json index b0807874268..cba5e3ba430 100644 --- a/packages/google-cloud-tpu/package.json +++ b/packages/google-cloud-tpu/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/tpu", - "version": "2.5.1", + "version": "2.6.1", "description": "tpu client for Node.js", "repository": { "type": "git", @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-tpu" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-tpu/protos/google/cloud/tpu/v2alpha1/cloud_tpu.proto b/packages/google-cloud-tpu/protos/google/cloud/tpu/v2alpha1/cloud_tpu.proto index db6b9326a6e..54af5917063 100644 --- a/packages/google-cloud-tpu/protos/google/cloud/tpu/v2alpha1/cloud_tpu.proto +++ b/packages/google-cloud-tpu/protos/google/cloud/tpu/v2alpha1/cloud_tpu.proto @@ -629,6 +629,10 @@ message QueuedResource { // Output only. State of the QueuedResource request. QueuedResourceState state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Name of the reservation in which the resource should be provisioned. + // Format: projects/{project}/locations/{zone}/reservations/{reservation} + string reservation_name = 8; } // QueuedResourceState defines the details of the QueuedResource request. @@ -884,7 +888,7 @@ message CreateQueuedResourceRequest { } ]; - // The unqualified resource name. Should follow the ^[A-Za-z0-9_.~+%-]+$ + // The unqualified resource name. Should follow the `^[A-Za-z0-9_.~+%-]+$` // regex format. string queued_resource_id = 2; diff --git a/packages/google-cloud-tpu/protos/protos.d.ts b/packages/google-cloud-tpu/protos/protos.d.ts index 5ddbc79ca5c..7cb9444bdcd 100644 --- a/packages/google-cloud-tpu/protos/protos.d.ts +++ b/packages/google-cloud-tpu/protos/protos.d.ts @@ -8482,6 +8482,9 @@ export namespace google { /** QueuedResource state */ state?: (google.cloud.tpu.v2alpha1.IQueuedResourceState|null); + + /** QueuedResource reservationName */ + reservationName?: (string|null); } /** Represents a QueuedResource. */ @@ -8511,6 +8514,9 @@ export namespace google { /** QueuedResource state. */ public state?: (google.cloud.tpu.v2alpha1.IQueuedResourceState|null); + /** QueuedResource reservationName. */ + public reservationName: string; + /** QueuedResource resource. */ public resource?: "tpu"; diff --git a/packages/google-cloud-tpu/protos/protos.js b/packages/google-cloud-tpu/protos/protos.js index 53f01ac5efb..d495f92f735 100644 --- a/packages/google-cloud-tpu/protos/protos.js +++ b/packages/google-cloud-tpu/protos/protos.js @@ -20334,6 +20334,7 @@ * @property {google.cloud.tpu.v2alpha1.QueuedResource.IGuaranteed|null} [guaranteed] QueuedResource guaranteed * @property {google.cloud.tpu.v2alpha1.QueuedResource.IQueueingPolicy|null} [queueingPolicy] QueuedResource queueingPolicy * @property {google.cloud.tpu.v2alpha1.IQueuedResourceState|null} [state] QueuedResource state + * @property {string|null} [reservationName] QueuedResource reservationName */ /** @@ -20399,6 +20400,14 @@ */ QueuedResource.prototype.state = null; + /** + * QueuedResource reservationName. + * @member {string} reservationName + * @memberof google.cloud.tpu.v2alpha1.QueuedResource + * @instance + */ + QueuedResource.prototype.reservationName = ""; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -20460,6 +20469,8 @@ $root.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy.encode(message.queueingPolicy, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.state != null && Object.hasOwnProperty.call(message, "state")) $root.google.cloud.tpu.v2alpha1.QueuedResourceState.encode(message.state, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.reservationName != null && Object.hasOwnProperty.call(message, "reservationName")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.reservationName); return writer; }; @@ -20518,6 +20529,10 @@ message.state = $root.google.cloud.tpu.v2alpha1.QueuedResourceState.decode(reader, reader.uint32()); break; } + case 8: { + message.reservationName = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -20593,6 +20608,9 @@ if (error) return "state." + error; } + if (message.reservationName != null && message.hasOwnProperty("reservationName")) + if (!$util.isString(message.reservationName)) + return "reservationName: string expected"; return null; }; @@ -20635,6 +20653,8 @@ throw TypeError(".google.cloud.tpu.v2alpha1.QueuedResource.state: object expected"); message.state = $root.google.cloud.tpu.v2alpha1.QueuedResourceState.fromObject(object.state); } + if (object.reservationName != null) + message.reservationName = String(object.reservationName); return message; }; @@ -20655,6 +20675,7 @@ object.name = ""; object.queueingPolicy = null; object.state = null; + object.reservationName = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -20677,6 +20698,8 @@ object.queueingPolicy = $root.google.cloud.tpu.v2alpha1.QueuedResource.QueueingPolicy.toObject(message.queueingPolicy, options); if (message.state != null && message.hasOwnProperty("state")) object.state = $root.google.cloud.tpu.v2alpha1.QueuedResourceState.toObject(message.state, options); + if (message.reservationName != null && message.hasOwnProperty("reservationName")) + object.reservationName = message.reservationName; return object; }; diff --git a/packages/google-cloud-tpu/protos/protos.json b/packages/google-cloud-tpu/protos/protos.json index d090838e3d8..316ccc66a74 100644 --- a/packages/google-cloud-tpu/protos/protos.json +++ b/packages/google-cloud-tpu/protos/protos.json @@ -2550,6 +2550,10 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "reservationName": { + "type": "string", + "id": 8 } }, "nested": { diff --git a/packages/google-cloud-tpu/samples/README.md b/packages/google-cloud-tpu/samples/README.md index 5e078745dfd..8e2bef6b921 100644 --- a/packages/google-cloud-tpu/samples/README.md +++ b/packages/google-cloud-tpu/samples/README.md @@ -50,12 +50,12 @@ * [Tpu.list_nodes](#tpu.list_nodes) * [Tpu.list_queued_resources](#tpu.list_queued_resources) * [Tpu.list_runtime_versions](#tpu.list_runtime_versions) + * [Tpu.reset_queued_resource](#tpu.reset_queued_resource) * [Tpu.simulate_maintenance_event](#tpu.simulate_maintenance_event) * [Tpu.start_node](#tpu.start_node) * [Tpu.stop_node](#tpu.stop_node) * [Tpu.update_node](#tpu.update_node) * [Quickstart](#quickstart) - * [Quickstart](#quickstart) ## Before you begin @@ -718,6 +718,23 @@ __Usage:__ +### Tpu.reset_queued_resource + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.reset_queued_resource.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.reset_queued_resource.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.reset_queued_resource.js` + + +----- + + + + ### Tpu.simulate_maintenance_event View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.simulate_maintenance_event.js). @@ -798,23 +815,6 @@ __Usage:__ `node packages/google-cloud-tpu/samples/quickstart.js` ------ - - - - -### Quickstart - -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/test/quickstart.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/test/quickstart.js,samples/README.md) - -__Usage:__ - - -`node packages/google-cloud-tpu/samples/test/quickstart.js` - - diff --git a/packages/google-cloud-tpu/samples/generated/v1/snippet_metadata.google.cloud.tpu.v1.json b/packages/google-cloud-tpu/samples/generated/v1/snippet_metadata.google.cloud.tpu.v1.json index 8c2babe507d..5ba5fc2b04e 100644 --- a/packages/google-cloud-tpu/samples/generated/v1/snippet_metadata.google.cloud.tpu.v1.json +++ b/packages/google-cloud-tpu/samples/generated/v1/snippet_metadata.google.cloud.tpu.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tpu", - "version": "2.5.0", + "version": "2.6.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tpu/samples/generated/v2/snippet_metadata.google.cloud.tpu.v2.json b/packages/google-cloud-tpu/samples/generated/v2/snippet_metadata.google.cloud.tpu.v2.json index 1d5f52d9093..e308d01cecd 100644 --- a/packages/google-cloud-tpu/samples/generated/v2/snippet_metadata.google.cloud.tpu.v2.json +++ b/packages/google-cloud-tpu/samples/generated/v2/snippet_metadata.google.cloud.tpu.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tpu", - "version": "2.5.0", + "version": "2.6.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tpu/samples/generated/v2alpha1/snippet_metadata.google.cloud.tpu.v2alpha1.json b/packages/google-cloud-tpu/samples/generated/v2alpha1/snippet_metadata.google.cloud.tpu.v2alpha1.json index 1ccb3324309..df3b9520522 100644 --- a/packages/google-cloud-tpu/samples/generated/v2alpha1/snippet_metadata.google.cloud.tpu.v2alpha1.json +++ b/packages/google-cloud-tpu/samples/generated/v2alpha1/snippet_metadata.google.cloud.tpu.v2alpha1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tpu", - "version": "2.5.0", + "version": "2.6.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.create_queued_resource.js b/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.create_queued_resource.js index cb6dd204258..c28e8945ad3 100644 --- a/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.create_queued_resource.js +++ b/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.create_queued_resource.js @@ -33,7 +33,7 @@ function main(parent, queuedResource) { */ // const parent = 'abc123' /** - * The unqualified resource name. Should follow the ^[A-Za-z0-9_.~+%-]+$ + * The unqualified resource name. Should follow the `^[A-Za-z0-9_.~+%-]+$` * regex format. */ // const queuedResourceId = 'abc123' diff --git a/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.reset_queued_resource.js b/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.reset_queued_resource.js new file mode 100644 index 00000000000..a7a49d9aed0 --- /dev/null +++ b/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.reset_queued_resource.js @@ -0,0 +1,62 @@ +// Copyright 2023 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 tpu_v2alpha1_generated_Tpu_ResetQueuedResource_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 queued resource. + */ + // const name = 'abc123' + + // Imports the Tpu library + const {TpuClient} = require('@google-cloud/tpu').v2alpha1; + + // Instantiates a client + const tpuClient = new TpuClient(); + + async function callResetQueuedResource() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await tpuClient.resetQueuedResource(request); + const [response] = await operation.promise(); + console.log(response); + } + + callResetQueuedResource(); + // [END tpu_v2alpha1_generated_Tpu_ResetQueuedResource_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-tpu/samples/package.json b/packages/google-cloud-tpu/samples/package.json index 67be80dcefa..332cc0457bb 100644 --- a/packages/google-cloud-tpu/samples/package.json +++ b/packages/google-cloud-tpu/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/tpu": "^2.5.1" + "@google-cloud/tpu": "^2.6.1" }, "devDependencies": { "c8": "^7.1.0", diff --git a/packages/google-cloud-tpu/src/v2alpha1/tpu_client.ts b/packages/google-cloud-tpu/src/v2alpha1/tpu_client.ts index 58d4f771d0a..6bcf1a621de 100644 --- a/packages/google-cloud-tpu/src/v2alpha1/tpu_client.ts +++ b/packages/google-cloud-tpu/src/v2alpha1/tpu_client.ts @@ -1790,7 +1790,7 @@ export class TpuClient { * @param {string} request.parent * Required. The parent resource name. * @param {string} request.queuedResourceId - * The unqualified resource name. Should follow the ^[A-Za-z0-9_.~+%-]+$ + * The unqualified resource name. Should follow the `^[A-Za-z0-9_.~+%-]+$` * regex format. * @param {google.cloud.tpu.v2alpha1.QueuedResource} request.queuedResource * Required. The queued resource. diff --git a/packages/google-cloud-translate/package.json b/packages/google-cloud-translate/package.json index ec4a0fe1ff5..50e02a01909 100644 --- a/packages/google-cloud-translate/package.json +++ b/packages/google-cloud-translate/package.json @@ -33,23 +33,20 @@ "translate" ], "scripts": { - "docs": "jsdoc -c .jsdoc.js", - "predocs": "npm run compile", - "lint": "gts check", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", "fix": "gts fix", + "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "pretest": "npm run compile", - "presystem-test": "npm run compile", - "docs-test": "linkinator docs", - "predocs-test": "npm run docs", - "prelint": "cd samples; npm link ../; npm install", - "clean": "gts clean", - "precompile": "gts clean" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "@google-cloud/common": "^4.0.0", @@ -75,6 +72,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "pack-n-play": "^1.0.0-2", "proxyquire": "^2.0.1", @@ -82,5 +80,4 @@ "typescript": "^4.6.4" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-translate" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-translate/protos/google/cloud/translate/v3/translation_service.proto b/packages/google-cloud-translate/protos/google/cloud/translate/v3/translation_service.proto index d5e93176aa7..fab3467424f 100644 --- a/packages/google-cloud-translate/protos/google/cloud/translate/v3/translation_service.proto +++ b/packages/google-cloud-translate/protos/google/cloud/translate/v3/translation_service.proto @@ -25,7 +25,7 @@ import "google/protobuf/timestamp.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Translate.V3"; -option go_package = "cloud.google.com/go/translation/apiv3/translationpb;translationpb"; +option go_package = "cloud.google.com/go/translate/apiv3/translatepb;translatepb"; option java_multiple_files = true; option java_outer_classname = "TranslationServiceProto"; option java_package = "com.google.cloud.translate.v3"; diff --git a/packages/google-cloud-translate/protos/protos.json b/packages/google-cloud-translate/protos/protos.json index ca4d1231447..ea7755ff092 100644 --- a/packages/google-cloud-translate/protos/protos.json +++ b/packages/google-cloud-translate/protos/protos.json @@ -10,7 +10,7 @@ "options": { "cc_enable_arenas": true, "csharp_namespace": "Google.Cloud.Translate.V3", - "go_package": "cloud.google.com/go/translation/apiv3/translationpb;translationpb", + "go_package": "cloud.google.com/go/translate/apiv3/translatepb;translatepb", "java_multiple_files": true, "java_outer_classname": "TranslationServiceProto", "java_package": "com.google.cloud.translate.v3", diff --git a/packages/google-cloud-translate/samples/generated/v3/snippet_metadata.google.cloud.translation.v3.json b/packages/google-cloud-translate/samples/generated/v3/snippet_metadata.google.cloud.translation.v3.json index b7c5e765b16..40ca95d0f3a 100644 --- a/packages/google-cloud-translate/samples/generated/v3/snippet_metadata.google.cloud.translation.v3.json +++ b/packages/google-cloud-translate/samples/generated/v3/snippet_metadata.google.cloud.translation.v3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-translation", - "version": "7.2.0", + "version": "7.2.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-translate/samples/generated/v3beta1/snippet_metadata.google.cloud.translation.v3beta1.json b/packages/google-cloud-translate/samples/generated/v3beta1/snippet_metadata.google.cloud.translation.v3beta1.json index 8a2c6dbc95b..ced937ad8b8 100644 --- a/packages/google-cloud-translate/samples/generated/v3beta1/snippet_metadata.google.cloud.translation.v3beta1.json +++ b/packages/google-cloud-translate/samples/generated/v3beta1/snippet_metadata.google.cloud.translation.v3beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-translation", - "version": "7.2.0", + "version": "7.2.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-video-livestream/package.json b/packages/google-cloud-video-livestream/package.json index 4e3069f0bb5..c94c68e46b0 100644 --- a/packages/google-cloud-video-livestream/package.json +++ b/packages/google-cloud-video-livestream/package.json @@ -30,18 +30,19 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", "docs-test": "linkinator docs", "fix": "gts fix", "lint": "gts check", - "prelint": "cd samples; npm link ../; npm install", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-video-livestream" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-video-stitcher/package.json b/packages/google-cloud-video-stitcher/package.json index 37aedff8834..9545f168e9d 100644 --- a/packages/google-cloud-video-stitcher/package.json +++ b/packages/google-cloud-video-stitcher/package.json @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^8.4.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=v12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-video-stitcher" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-video-transcoder/package.json b/packages/google-cloud-video-transcoder/package.json index 74cec58ea7e..be6379515d5 100644 --- a/packages/google-cloud-video-transcoder/package.json +++ b/packages/google-cloud-video-transcoder/package.json @@ -30,17 +30,18 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", "docs-test": "linkinator docs", "fix": "gts fix", "lint": "gts check", - "prelint": "cd samples; npm link ../; npm i", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", "test": "c8 mocha build/test" }, "dependencies": { @@ -57,6 +58,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -68,5 +70,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-video-transcoder" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-videointelligence/package.json b/packages/google-cloud-videointelligence/package.json index 5cca78ab8c8..34793968153 100644 --- a/packages/google-cloud-videointelligence/package.json +++ b/packages/google-cloud-videointelligence/package.json @@ -33,20 +33,20 @@ "Google Cloud Video Intelligence API" ], "scripts": { - "docs": "jsdoc -c .jsdoc.js", - "lint": "gts check", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "fix": "gts fix", - "docs-test": "linkinator docs", - "predocs-test": "npm run docs", - "prelint": "cd samples; npm link ../; npm install", "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", - "prepare": "npm run compile", - "precompile": "gts clean" + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -62,6 +62,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -71,5 +72,4 @@ "typescript": "^4.6.4" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-videointelligence" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-vision/package.json b/packages/google-cloud-vision/package.json index 50368fefd9b..667d86623a5 100644 --- a/packages/google-cloud-vision/package.json +++ b/packages/google-cloud-vision/package.json @@ -33,21 +33,20 @@ "Google Cloud Vision API" ], "scripts": { - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "lint": "gts check", - "docs": "jsdoc -c .jsdoc.js", - "system-test": "npm run compile && c8 mocha build/system-test", - "fix": "gts fix", - "test-no-cover": "mocha test/*.js", - "docs-test": "linkinator docs", - "predocs-test": "npm run docs", - "prelint": "cd samples; npm link ../; npm install", "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", - "prepare": "npm run compile", - "precompile": "gts clean" + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "@google-cloud/promisify": "^3.0.0", @@ -68,6 +67,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^10.0.0", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -79,5 +79,4 @@ "webpack-cli": "^5.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-vision" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-vision/protos/google/cloud/vision/v1/geometry.proto b/packages/google-cloud-vision/protos/google/cloud/vision/v1/geometry.proto index 30aa355c7b4..0394bb54d4b 100644 --- a/packages/google-cloud-vision/protos/google/cloud/vision/v1/geometry.proto +++ b/packages/google-cloud-vision/protos/google/cloud/vision/v1/geometry.proto @@ -17,7 +17,7 @@ syntax = "proto3"; package google.cloud.vision.v1; option cc_enable_arenas = true; -option go_package = "cloud.google.com/go/vision/apiv1/visionpb;visionpb"; +option go_package = "cloud.google.com/go/vision/v2/apiv1/visionpb;visionpb"; option java_multiple_files = true; option java_outer_classname = "GeometryProto"; option java_package = "com.google.cloud.vision.v1"; diff --git a/packages/google-cloud-vision/protos/google/cloud/vision/v1/image_annotator.proto b/packages/google-cloud-vision/protos/google/cloud/vision/v1/image_annotator.proto index bb022ffc960..46953e6843a 100644 --- a/packages/google-cloud-vision/protos/google/cloud/vision/v1/image_annotator.proto +++ b/packages/google-cloud-vision/protos/google/cloud/vision/v1/image_annotator.proto @@ -30,7 +30,7 @@ import "google/type/color.proto"; import "google/type/latlng.proto"; option cc_enable_arenas = true; -option go_package = "cloud.google.com/go/vision/apiv1/visionpb;visionpb"; +option go_package = "cloud.google.com/go/vision/v2/apiv1/visionpb;visionpb"; option java_multiple_files = true; option java_outer_classname = "ImageAnnotatorProto"; option java_package = "com.google.cloud.vision.v1"; diff --git a/packages/google-cloud-vision/protos/google/cloud/vision/v1/product_search.proto b/packages/google-cloud-vision/protos/google/cloud/vision/v1/product_search.proto index b68f3fdc806..98ece54578b 100644 --- a/packages/google-cloud-vision/protos/google/cloud/vision/v1/product_search.proto +++ b/packages/google-cloud-vision/protos/google/cloud/vision/v1/product_search.proto @@ -22,7 +22,7 @@ import "google/cloud/vision/v1/product_search_service.proto"; import "google/protobuf/timestamp.proto"; option cc_enable_arenas = true; -option go_package = "cloud.google.com/go/vision/apiv1/visionpb;visionpb"; +option go_package = "cloud.google.com/go/vision/v2/apiv1/visionpb;visionpb"; option java_multiple_files = true; option java_outer_classname = "ProductSearchProto"; option java_package = "com.google.cloud.vision.v1"; diff --git a/packages/google-cloud-vision/protos/google/cloud/vision/v1/product_search_service.proto b/packages/google-cloud-vision/protos/google/cloud/vision/v1/product_search_service.proto index 02e367b0c31..f97b443ca23 100644 --- a/packages/google-cloud-vision/protos/google/cloud/vision/v1/product_search_service.proto +++ b/packages/google-cloud-vision/protos/google/cloud/vision/v1/product_search_service.proto @@ -28,7 +28,7 @@ import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; option cc_enable_arenas = true; -option go_package = "cloud.google.com/go/vision/apiv1/visionpb;visionpb"; +option go_package = "cloud.google.com/go/vision/v2/apiv1/visionpb;visionpb"; option java_multiple_files = true; option java_outer_classname = "ProductSearchServiceProto"; option java_package = "com.google.cloud.vision.v1"; diff --git a/packages/google-cloud-vision/protos/google/cloud/vision/v1/text_annotation.proto b/packages/google-cloud-vision/protos/google/cloud/vision/v1/text_annotation.proto index 303186088ba..e84a596a260 100644 --- a/packages/google-cloud-vision/protos/google/cloud/vision/v1/text_annotation.proto +++ b/packages/google-cloud-vision/protos/google/cloud/vision/v1/text_annotation.proto @@ -19,7 +19,7 @@ package google.cloud.vision.v1; import "google/cloud/vision/v1/geometry.proto"; option cc_enable_arenas = true; -option go_package = "cloud.google.com/go/vision/apiv1/visionpb;visionpb"; +option go_package = "cloud.google.com/go/vision/v2/apiv1/visionpb;visionpb"; option java_multiple_files = true; option java_outer_classname = "TextAnnotationProto"; option java_package = "com.google.cloud.vision.v1"; diff --git a/packages/google-cloud-vision/protos/google/cloud/vision/v1/web_detection.proto b/packages/google-cloud-vision/protos/google/cloud/vision/v1/web_detection.proto index 36d36b8b855..5f36bb7ace5 100644 --- a/packages/google-cloud-vision/protos/google/cloud/vision/v1/web_detection.proto +++ b/packages/google-cloud-vision/protos/google/cloud/vision/v1/web_detection.proto @@ -17,7 +17,7 @@ syntax = "proto3"; package google.cloud.vision.v1; option cc_enable_arenas = true; -option go_package = "cloud.google.com/go/vision/apiv1/visionpb;visionpb"; +option go_package = "cloud.google.com/go/vision/v2/apiv1/visionpb;visionpb"; option java_multiple_files = true; option java_outer_classname = "WebDetectionProto"; option java_package = "com.google.cloud.vision.v1"; diff --git a/packages/google-cloud-vision/protos/google/cloud/vision/v1p1beta1/geometry.proto b/packages/google-cloud-vision/protos/google/cloud/vision/v1p1beta1/geometry.proto index 2fcc14a4534..14febb0d414 100644 --- a/packages/google-cloud-vision/protos/google/cloud/vision/v1p1beta1/geometry.proto +++ b/packages/google-cloud-vision/protos/google/cloud/vision/v1p1beta1/geometry.proto @@ -17,7 +17,7 @@ syntax = "proto3"; package google.cloud.vision.v1p1beta1; option cc_enable_arenas = true; -option go_package = "cloud.google.com/go/vision/apiv1p1beta1/visionpb;visionpb"; +option go_package = "cloud.google.com/go/vision/v2/apiv1p1beta1/visionpb;visionpb"; option java_multiple_files = true; option java_outer_classname = "GeometryProto"; option java_package = "com.google.cloud.vision.v1p1beta1"; diff --git a/packages/google-cloud-vision/protos/google/cloud/vision/v1p1beta1/image_annotator.proto b/packages/google-cloud-vision/protos/google/cloud/vision/v1p1beta1/image_annotator.proto index a4d61039298..ac535380b83 100644 --- a/packages/google-cloud-vision/protos/google/cloud/vision/v1p1beta1/image_annotator.proto +++ b/packages/google-cloud-vision/protos/google/cloud/vision/v1p1beta1/image_annotator.proto @@ -28,7 +28,7 @@ import "google/type/color.proto"; import "google/type/latlng.proto"; option cc_enable_arenas = true; -option go_package = "cloud.google.com/go/vision/apiv1p1beta1/visionpb;visionpb"; +option go_package = "cloud.google.com/go/vision/v2/apiv1p1beta1/visionpb;visionpb"; option java_multiple_files = true; option java_outer_classname = "ImageAnnotatorProto"; option java_package = "com.google.cloud.vision.v1p1beta1"; diff --git a/packages/google-cloud-vision/protos/google/cloud/vision/v1p1beta1/text_annotation.proto b/packages/google-cloud-vision/protos/google/cloud/vision/v1p1beta1/text_annotation.proto index feca82bfd54..53488bfe40c 100644 --- a/packages/google-cloud-vision/protos/google/cloud/vision/v1p1beta1/text_annotation.proto +++ b/packages/google-cloud-vision/protos/google/cloud/vision/v1p1beta1/text_annotation.proto @@ -19,7 +19,7 @@ package google.cloud.vision.v1p1beta1; import "google/cloud/vision/v1p1beta1/geometry.proto"; option cc_enable_arenas = true; -option go_package = "cloud.google.com/go/vision/apiv1p1beta1/visionpb;visionpb"; +option go_package = "cloud.google.com/go/vision/v2/apiv1p1beta1/visionpb;visionpb"; option java_multiple_files = true; option java_outer_classname = "TextAnnotationProto"; option java_package = "com.google.cloud.vision.v1p1beta1"; diff --git a/packages/google-cloud-vision/protos/google/cloud/vision/v1p1beta1/web_detection.proto b/packages/google-cloud-vision/protos/google/cloud/vision/v1p1beta1/web_detection.proto index 13029cbbd17..ebff5a19121 100644 --- a/packages/google-cloud-vision/protos/google/cloud/vision/v1p1beta1/web_detection.proto +++ b/packages/google-cloud-vision/protos/google/cloud/vision/v1p1beta1/web_detection.proto @@ -18,7 +18,7 @@ package google.cloud.vision.v1p1beta1; option cc_enable_arenas = true; -option go_package = "cloud.google.com/go/vision/apiv1p1beta1/visionpb;visionpb"; +option go_package = "cloud.google.com/go/vision/v2/apiv1p1beta1/visionpb;visionpb"; option java_multiple_files = true; option java_outer_classname = "WebDetectionProto"; option java_package = "com.google.cloud.vision.v1p1beta1"; diff --git a/packages/google-cloud-vision/protos/protos.json b/packages/google-cloud-vision/protos/protos.json index 4062331e2dc..218b4527584 100644 --- a/packages/google-cloud-vision/protos/protos.json +++ b/packages/google-cloud-vision/protos/protos.json @@ -9,7 +9,7 @@ "v1": { "options": { "cc_enable_arenas": true, - "go_package": "cloud.google.com/go/vision/apiv1/visionpb;visionpb", + "go_package": "cloud.google.com/go/vision/v2/apiv1/visionpb;visionpb", "java_multiple_files": true, "java_outer_classname": "WebDetectionProto", "java_package": "com.google.cloud.vision.v1", @@ -2353,7 +2353,7 @@ "v1p1beta1": { "options": { "cc_enable_arenas": true, - "go_package": "cloud.google.com/go/vision/apiv1p1beta1/visionpb;visionpb", + "go_package": "cloud.google.com/go/vision/v2/apiv1p1beta1/visionpb;visionpb", "java_multiple_files": true, "java_outer_classname": "WebDetectionProto", "java_package": "com.google.cloud.vision.v1p1beta1" diff --git a/packages/google-cloud-vision/samples/generated/v1/snippet_metadata.google.cloud.vision.v1.json b/packages/google-cloud-vision/samples/generated/v1/snippet_metadata.google.cloud.vision.v1.json index ffd4c9fe1a4..6c33a3ddec5 100644 --- a/packages/google-cloud-vision/samples/generated/v1/snippet_metadata.google.cloud.vision.v1.json +++ b/packages/google-cloud-vision/samples/generated/v1/snippet_metadata.google.cloud.vision.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "3.1.2", + "version": "3.1.3", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata.google.cloud.vision.v1p1beta1.json b/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata.google.cloud.vision.v1p1beta1.json index 93dffaf4b3b..55f1d1e1d63 100644 --- a/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata.google.cloud.vision.v1p1beta1.json +++ b/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata.google.cloud.vision.v1p1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "3.1.2", + "version": "3.1.3", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata.google.cloud.vision.v1p2beta1.json b/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata.google.cloud.vision.v1p2beta1.json index ac133c08237..f7e9518b743 100644 --- a/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata.google.cloud.vision.v1p2beta1.json +++ b/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata.google.cloud.vision.v1p2beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "3.1.2", + "version": "3.1.3", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata.google.cloud.vision.v1p3beta1.json b/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata.google.cloud.vision.v1p3beta1.json index cf029705bee..62a5f137523 100644 --- a/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata.google.cloud.vision.v1p3beta1.json +++ b/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata.google.cloud.vision.v1p3beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "3.1.2", + "version": "3.1.3", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata.google.cloud.vision.v1p4beta1.json b/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata.google.cloud.vision.v1p4beta1.json index 68312f311cd..1f922b7bec6 100644 --- a/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata.google.cloud.vision.v1p4beta1.json +++ b/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata.google.cloud.vision.v1p4beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "3.1.2", + "version": "3.1.3", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vmmigration/package.json b/packages/google-cloud-vmmigration/package.json index 6460ef267e6..3f629d25fc2 100644 --- a/packages/google-cloud-vmmigration/package.json +++ b/packages/google-cloud-vmmigration/package.json @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,11 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -57,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -70,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-vmmigration" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-vmwareengine/package.json b/packages/google-cloud-vmwareengine/package.json index ccc710c9168..cbeb89fc8b0 100644 --- a/packages/google-cloud-vmwareengine/package.json +++ b/packages/google-cloud-vmwareengine/package.json @@ -31,7 +31,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -39,10 +39,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -57,6 +58,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-vpcaccess/package.json b/packages/google-cloud-vpcaccess/package.json index 1b07afe2fe4..89aef9f312b 100644 --- a/packages/google-cloud-vpcaccess/package.json +++ b/packages/google-cloud-vpcaccess/package.json @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-vpcaccess" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-webrisk/CHANGELOG.md b/packages/google-cloud-webrisk/CHANGELOG.md index 5483b6648da..a60c3f153a8 100644 --- a/packages/google-cloud-webrisk/CHANGELOG.md +++ b/packages/google-cloud-webrisk/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/web-risk?activeTab=versions +## [3.3.0](https://github.com/googleapis/google-cloud-node/compare/web-risk-v3.2.2...web-risk-v3.3.0) (2023-05-20) + + +### Features + +* [webrisk] add SubmitUri endpoint ([#4286](https://github.com/googleapis/google-cloud-node/issues/4286)) ([40edfc5](https://github.com/googleapis/google-cloud-node/commit/40edfc52a9894cf57b389c2744563bfa490102cb)) + ## [3.2.2](https://github.com/googleapis/google-cloud-node/compare/web-risk-v3.2.1...web-risk-v3.2.2) (2023-04-13) diff --git a/packages/google-cloud-webrisk/README.md b/packages/google-cloud-webrisk/README.md index 2522b208860..dba3567a3fc 100644 --- a/packages/google-cloud-webrisk/README.md +++ b/packages/google-cloud-webrisk/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Web Risk API: Node.js Client](https://github.com/googleapis/google-cloud-node) +# [Web Risk API: Node.js Client](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-webrisk) [![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/web-risk.svg)](https://www.npmjs.org/package/@google-cloud/web-risk) @@ -92,19 +92,19 @@ async function quickstart(uri) { ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-webrisk/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Web_risk_service.compute_threat_list_diff | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.compute_threat_list_diff.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.compute_threat_list_diff.js,samples/README.md) | -| Web_risk_service.create_submission | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.create_submission.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.create_submission.js,samples/README.md) | -| Web_risk_service.search_hashes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.search_hashes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.search_hashes.js,samples/README.md) | -| Web_risk_service.search_uris | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.search_uris.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.search_uris.js,samples/README.md) | -| Web_risk_service_v1_beta1.compute_threat_list_diff | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-webrisk/samples/generated/v1beta1/web_risk_service_v1_beta1.compute_threat_list_diff.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-webrisk/samples/generated/v1beta1/web_risk_service_v1_beta1.compute_threat_list_diff.js,samples/README.md) | -| Web_risk_service_v1_beta1.search_hashes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-webrisk/samples/generated/v1beta1/web_risk_service_v1_beta1.search_hashes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-webrisk/samples/generated/v1beta1/web_risk_service_v1_beta1.search_hashes.js,samples/README.md) | -| Web_risk_service_v1_beta1.search_uris | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-webrisk/samples/generated/v1beta1/web_risk_service_v1_beta1.search_uris.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-webrisk/samples/generated/v1beta1/web_risk_service_v1_beta1.search_uris.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-webrisk/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-webrisk/samples/quickstart.js,samples/README.md) | -| Quickstart.test | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-webrisk/samples/test/quickstart.test.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-webrisk/samples/test/quickstart.test.js,samples/README.md) | +| Web_risk_service.compute_threat_list_diff | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.compute_threat_list_diff.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.compute_threat_list_diff.js,packages/google-cloud-webrisk/samples/README.md) | +| Web_risk_service.create_submission | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.create_submission.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.create_submission.js,packages/google-cloud-webrisk/samples/README.md) | +| Web_risk_service.search_hashes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.search_hashes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.search_hashes.js,packages/google-cloud-webrisk/samples/README.md) | +| Web_risk_service.search_uris | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.search_uris.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.search_uris.js,packages/google-cloud-webrisk/samples/README.md) | +| Web_risk_service.submit_uri | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.submit_uri.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.submit_uri.js,packages/google-cloud-webrisk/samples/README.md) | +| Web_risk_service_v1_beta1.compute_threat_list_diff | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-webrisk/samples/generated/v1beta1/web_risk_service_v1_beta1.compute_threat_list_diff.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-webrisk/samples/generated/v1beta1/web_risk_service_v1_beta1.compute_threat_list_diff.js,packages/google-cloud-webrisk/samples/README.md) | +| Web_risk_service_v1_beta1.search_hashes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-webrisk/samples/generated/v1beta1/web_risk_service_v1_beta1.search_hashes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-webrisk/samples/generated/v1beta1/web_risk_service_v1_beta1.search_hashes.js,packages/google-cloud-webrisk/samples/README.md) | +| Web_risk_service_v1_beta1.search_uris | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-webrisk/samples/generated/v1beta1/web_risk_service_v1_beta1.search_uris.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-webrisk/samples/generated/v1beta1/web_risk_service_v1_beta1.search_uris.js,packages/google-cloud-webrisk/samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-webrisk/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-webrisk/samples/quickstart.js,packages/google-cloud-webrisk/samples/README.md) | diff --git a/packages/google-cloud-webrisk/package.json b/packages/google-cloud-webrisk/package.json index 617caf9c64b..aeaa5025ba6 100644 --- a/packages/google-cloud-webrisk/package.json +++ b/packages/google-cloud-webrisk/package.json @@ -5,7 +5,7 @@ "url": "https://github.com/googleapis/google-cloud-node.git" }, "name": "@google-cloud/web-risk", - "version": "3.2.2", + "version": "3.3.0", "author": "Google LLC", "description": "Web Risk API client for Node.js", "main": "build/src/index.js", @@ -43,6 +43,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -53,26 +54,24 @@ "webpack-cli": "^5.0.0" }, "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", - "fix": "gts fix", - "lint": "gts check", - "test": "c8 mocha build/test", "predocs-test": "npm run docs", "docs-test": "linkinator docs", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "system-test": "npm run compile && c8 mocha build/system-test", - "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", - "compile-protos": "compileProtos src", - "prepare": "npm run compile", - "pretest": "npm run compile", - "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean" + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "license": "Apache-2.0", "engines": { "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-webrisk" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-webrisk/protos/google/cloud/webrisk/v1/webrisk.proto b/packages/google-cloud-webrisk/protos/google/cloud/webrisk/v1/webrisk.proto index 47281fe7f18..5c5f63929d6 100644 --- a/packages/google-cloud-webrisk/protos/google/cloud/webrisk/v1/webrisk.proto +++ b/packages/google-cloud-webrisk/protos/google/cloud/webrisk/v1/webrisk.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/longrunning/operations.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.WebRisk.V1"; @@ -35,7 +36,8 @@ option ruby_package = "Google::Cloud::WebRisk::V1"; // website and in client applications. service WebRiskService { option (google.api.default_host) = "webrisk.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Gets the most recent threat list diffs. These diffs should be applied to // a local database of hashes to keep it up-to-date. If the local database is @@ -43,11 +45,13 @@ service WebRiskService { // be returned. This Method only updates a single ThreatList at a time. To // update multiple ThreatList databases, this method needs to be called once // for each list. - rpc ComputeThreatListDiff(ComputeThreatListDiffRequest) returns (ComputeThreatListDiffResponse) { + rpc ComputeThreatListDiff(ComputeThreatListDiffRequest) + returns (ComputeThreatListDiffResponse) { option (google.api.http) = { get: "/v1/threatLists:computeDiff" }; - option (google.api.method_signature) = "threat_type,version_token,constraints"; + option (google.api.method_signature) = + "threat_type,version_token,constraints"; } // This method is used to check whether a URI is on a given threatList. @@ -88,6 +92,27 @@ service WebRiskService { }; option (google.api.method_signature) = "parent,submission"; } + + // Submits a URI suspected of containing malicious content to be reviewed. + // Returns a google.longrunning.Operation which, once the review is complete, + // is updated with its result. You can use the [Pub/Sub API] + // (https://cloud.google.com/pubsub) to receive notifications for the returned + // Operation. If the result verifies the existence of malicious content, the + // site will be added to the [Google's Social Engineering lists] + // (https://support.google.com/webmasters/answer/6350487/) in order to + // protect users that could get exposed to this threat in the future. Only + // allowlisted projects can use this method during Early Access. Please reach + // out to Sales or your customer engineer to obtain access. + rpc SubmitUri(SubmitUriRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*}/uris:submit" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Submission" + metadata_type: "SubmitUriMetadata" + }; + } } // Describes an API diff request. @@ -108,9 +133,9 @@ message ComputeThreatListDiffRequest { repeated CompressionType supported_compressions = 3; } - // Required. The threat list to update. Only a single ThreatType should be specified - // per request. If you want to handle multiple ThreatTypes, you must make one - // request per ThreatType. + // Required. The threat list to update. Only a single ThreatType should be + // specified per request. If you want to handle multiple ThreatTypes, you must + // make one request per ThreatType. ThreatType threat_type = 1 [(google.api.field_behavior) = REQUIRED]; // The current version token of the client for the requested list (the @@ -180,7 +205,8 @@ message SearchUrisRequest { // Required. The URI to be checked for matches. string uri = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The ThreatLists to search in. Multiple ThreatLists may be specified. + // Required. The ThreatLists to search in. Multiple ThreatLists may be + // specified. repeated ThreatType threat_types = 2 [(google.api.field_behavior) = REQUIRED]; } @@ -207,7 +233,8 @@ message SearchHashesRequest { // the web safe base64 variant (RFC 4648). bytes hash_prefix = 1; - // Required. The ThreatLists to search in. Multiple ThreatLists may be specified. + // Required. The ThreatLists to search in. Multiple ThreatLists may be + // specified. repeated ThreatType threat_types = 2 [(google.api.field_behavior) = REQUIRED]; } @@ -342,14 +369,130 @@ message RiceDeltaEncoding { // Wraps a URI that might be displaying malicious content. message Submission { - // Required. The URI that is being reported for malicious content to be analyzed. + // Required. The URI that is being reported for malicious content to be + // analyzed. string uri = 1 [(google.api.field_behavior) = REQUIRED]; + + // Output only. ThreatTypes found to be associated with the submitted URI + // after reviewing it. This might be empty if the URI was not added to any + // list. + repeated ThreatType threat_types = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Context about the submission including the type of abuse found on the URI and +// supporting details. +// option (google.api.message_visibility).restriction = "TRUSTED_TESTER"; +message ThreatInfo { + // The abuse type found on the URI. + enum AbuseType { + // Default. + ABUSE_TYPE_UNSPECIFIED = 0; + + // The URI contains malware. + MALWARE = 1; + + // The URI contains social engineering. + SOCIAL_ENGINEERING = 2; + + // The URI contains unwanted software. + UNWANTED_SOFTWARE = 3; + } + + // Confidence that a URI is unsafe. + message Confidence { + // Enum representation of confidence. + enum ConfidenceLevel { + // Default. + CONFIDENCE_LEVEL_UNSPECIFIED = 0; + + // Less than 60% confidence that the URI is unsafe. + LOW = 1; + + // Between 60% and 80% confidence that the URI is unsafe. + MEDIUM = 2; + + // Greater than 80% confidence that the URI is unsafe. + HIGH = 3; + } + + oneof value { + // A decimal representation of confidence in the range of 0 + // to 1 where 0 indicates no confidence and 1 indicates + // complete confidence. + float score = 1; + + // Enum representation of confidence. + ConfidenceLevel level = 2; + } + } + + // Context about why the URI is unsafe. + message ThreatJustification { + // Labels that explain how the URI was classified. + enum JustificationLabel { + // Default. + JUSTIFICATION_LABEL_UNSPECIFIED = 0; + + // The submitter manually verified that the submission is unsafe. + MANUAL_VERIFICATION = 1; + + // The submitter received the submission from an end user. + USER_REPORT = 2; + + // The submitter received the submission from an automated system. + AUTOMATED_REPORT = 3; + } + + // Labels associated with this URI that explain how it was classified. + repeated JustificationLabel labels = 1; + + // Free-form context on why this URI is unsafe. + repeated string comments = 2; + } + + // The type of abuse. + AbuseType abuse_type = 1; + + // Confidence that the URI is unsafe. + Confidence threat_confidence = 2; + + // Context about why the URI is unsafe. + ThreatJustification threat_justification = 3; +} + +// Details about how the threat was discovered. +message ThreatDiscovery { + // Platform types. + enum Platform { + // Default. + PLATFORM_UNSPECIFIED = 0; + + // General Android platform. + ANDROID = 1; + + // General iOS platform. + IOS = 2; + + // General macOS platform. + MACOS = 3; + + // General Windows platform. + WINDOWS = 4; + } + + // Platform on which the threat was discovered. + Platform platform = 1; + + // CLDR region code of the countries/regions the URI poses a threat ordered + // from most impact to least impact. Example: "US" for United States. + repeated string region_codes = 2; } // Request to send a potentially phishy URI to WebRisk. message CreateSubmissionRequest { - // Required. The name of the project that is making the submission. This string is in - // the format "projects/{project_number}". + // Required. The name of the project that is making the submission. This + // string is in the format "projects/{project_number}". string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -360,3 +503,58 @@ message CreateSubmissionRequest { // Required. The submission that contains the content of the phishing report. Submission submission = 2 [(google.api.field_behavior) = REQUIRED]; } + +// Request to send a potentially malicious URI to WebRisk. +message SubmitUriRequest { + // Required. The name of the project that is making the submission. This + // string is in the format "projects/{project_number}". + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Required. The submission that contains the URI to be scanned. + Submission submission = 2 [(google.api.field_behavior) = REQUIRED]; + + // Provides additional information about the submission. + ThreatInfo threat_info = 3; + + // Provides additional information about how the submission was discovered. + ThreatDiscovery threat_discovery = 4; +} + +// Metadata for the Submit URI long-running operation. +// option (google.api.message_visibility).restriction = "TRUSTED_TESTER"; +message SubmitUriMetadata { + // Enum that represents the state of the long-running operation. + enum State { + // Default unspecified state. + STATE_UNSPECIFIED = 0; + + // The operation is currently running. + RUNNING = 1; + + // The operation finished with a success status. + SUCCEEDED = 2; + + // The operation was cancelled. + CANCELLED = 3; + + // The operation finished with a failure status. + FAILED = 4; + + // The operation was closed with no action taken. + CLOSED = 5; + } + + // The state of the operation. + State state = 1; + + // Creation time of the operation. + google.protobuf.Timestamp create_time = 2; + + // Latest update time of the operation. + google.protobuf.Timestamp update_time = 3; +} diff --git a/packages/google-cloud-webrisk/protos/protos.d.ts b/packages/google-cloud-webrisk/protos/protos.d.ts index f9d26003e8c..b8ed51a3af4 100644 --- a/packages/google-cloud-webrisk/protos/protos.d.ts +++ b/packages/google-cloud-webrisk/protos/protos.d.ts @@ -101,6 +101,20 @@ export namespace google { * @returns Promise */ public createSubmission(request: google.cloud.webrisk.v1.ICreateSubmissionRequest): Promise; + + /** + * Calls SubmitUri. + * @param request SubmitUriRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public submitUri(request: google.cloud.webrisk.v1.ISubmitUriRequest, callback: google.cloud.webrisk.v1.WebRiskService.SubmitUriCallback): void; + + /** + * Calls SubmitUri. + * @param request SubmitUriRequest message or plain object + * @returns Promise + */ + public submitUri(request: google.cloud.webrisk.v1.ISubmitUriRequest): Promise; } namespace WebRiskService { @@ -132,6 +146,13 @@ export namespace google { * @param [response] Submission */ type CreateSubmissionCallback = (error: (Error|null), response?: google.cloud.webrisk.v1.Submission) => void; + + /** + * Callback as used by {@link google.cloud.webrisk.v1.WebRiskService|submitUri}. + * @param error Error, if any + * @param [response] Operation + */ + type SubmitUriCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; } /** Properties of a ComputeThreatListDiffRequest. */ @@ -1755,6 +1776,9 @@ export namespace google { /** Submission uri */ uri?: (string|null); + + /** Submission threatTypes */ + threatTypes?: (google.cloud.webrisk.v1.ThreatType[]|null); } /** Represents a Submission. */ @@ -1769,6 +1793,9 @@ export namespace google { /** Submission uri. */ public uri: string; + /** Submission threatTypes. */ + public threatTypes: google.cloud.webrisk.v1.ThreatType[]; + /** * Creates a new Submission instance using the specified properties. * @param [properties] Properties to set @@ -1847,1272 +1874,1117 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateSubmissionRequest. */ - interface ICreateSubmissionRequest { + /** Properties of a ThreatInfo. */ + interface IThreatInfo { - /** CreateSubmissionRequest parent */ - parent?: (string|null); + /** ThreatInfo abuseType */ + abuseType?: (google.cloud.webrisk.v1.ThreatInfo.AbuseType|keyof typeof google.cloud.webrisk.v1.ThreatInfo.AbuseType|null); - /** CreateSubmissionRequest submission */ - submission?: (google.cloud.webrisk.v1.ISubmission|null); + /** ThreatInfo threatConfidence */ + threatConfidence?: (google.cloud.webrisk.v1.ThreatInfo.IConfidence|null); + + /** ThreatInfo threatJustification */ + threatJustification?: (google.cloud.webrisk.v1.ThreatInfo.IThreatJustification|null); } - /** Represents a CreateSubmissionRequest. */ - class CreateSubmissionRequest implements ICreateSubmissionRequest { + /** Represents a ThreatInfo. */ + class ThreatInfo implements IThreatInfo { /** - * Constructs a new CreateSubmissionRequest. + * Constructs a new ThreatInfo. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.webrisk.v1.ICreateSubmissionRequest); + constructor(properties?: google.cloud.webrisk.v1.IThreatInfo); - /** CreateSubmissionRequest parent. */ - public parent: string; + /** ThreatInfo abuseType. */ + public abuseType: (google.cloud.webrisk.v1.ThreatInfo.AbuseType|keyof typeof google.cloud.webrisk.v1.ThreatInfo.AbuseType); - /** CreateSubmissionRequest submission. */ - public submission?: (google.cloud.webrisk.v1.ISubmission|null); + /** ThreatInfo threatConfidence. */ + public threatConfidence?: (google.cloud.webrisk.v1.ThreatInfo.IConfidence|null); + + /** ThreatInfo threatJustification. */ + public threatJustification?: (google.cloud.webrisk.v1.ThreatInfo.IThreatJustification|null); /** - * Creates a new CreateSubmissionRequest instance using the specified properties. + * Creates a new ThreatInfo instance using the specified properties. * @param [properties] Properties to set - * @returns CreateSubmissionRequest instance + * @returns ThreatInfo instance */ - public static create(properties?: google.cloud.webrisk.v1.ICreateSubmissionRequest): google.cloud.webrisk.v1.CreateSubmissionRequest; + public static create(properties?: google.cloud.webrisk.v1.IThreatInfo): google.cloud.webrisk.v1.ThreatInfo; /** - * Encodes the specified CreateSubmissionRequest message. Does not implicitly {@link google.cloud.webrisk.v1.CreateSubmissionRequest.verify|verify} messages. - * @param message CreateSubmissionRequest message or plain object to encode + * Encodes the specified ThreatInfo message. Does not implicitly {@link google.cloud.webrisk.v1.ThreatInfo.verify|verify} messages. + * @param message ThreatInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.webrisk.v1.ICreateSubmissionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.webrisk.v1.IThreatInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateSubmissionRequest message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1.CreateSubmissionRequest.verify|verify} messages. - * @param message CreateSubmissionRequest message or plain object to encode + * Encodes the specified ThreatInfo message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1.ThreatInfo.verify|verify} messages. + * @param message ThreatInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.webrisk.v1.ICreateSubmissionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.webrisk.v1.IThreatInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateSubmissionRequest message from the specified reader or buffer. + * Decodes a ThreatInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateSubmissionRequest + * @returns ThreatInfo * @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.webrisk.v1.CreateSubmissionRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.webrisk.v1.ThreatInfo; /** - * Decodes a CreateSubmissionRequest message from the specified reader or buffer, length delimited. + * Decodes a ThreatInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateSubmissionRequest + * @returns ThreatInfo * @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.webrisk.v1.CreateSubmissionRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.webrisk.v1.ThreatInfo; /** - * Verifies a CreateSubmissionRequest message. + * Verifies a ThreatInfo 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 CreateSubmissionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ThreatInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateSubmissionRequest + * @returns ThreatInfo */ - public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1.CreateSubmissionRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1.ThreatInfo; /** - * Creates a plain object from a CreateSubmissionRequest message. Also converts values to other types if specified. - * @param message CreateSubmissionRequest + * Creates a plain object from a ThreatInfo message. Also converts values to other types if specified. + * @param message ThreatInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.webrisk.v1.CreateSubmissionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.webrisk.v1.ThreatInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateSubmissionRequest to JSON. + * Converts this ThreatInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateSubmissionRequest + * Gets the default type url for ThreatInfo * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - } - /** Namespace v1beta1. */ - namespace v1beta1 { + namespace ThreatInfo { - /** Represents a WebRiskServiceV1Beta1 */ - class WebRiskServiceV1Beta1 extends $protobuf.rpc.Service { + /** AbuseType enum. */ + enum AbuseType { + ABUSE_TYPE_UNSPECIFIED = 0, + MALWARE = 1, + SOCIAL_ENGINEERING = 2, + UNWANTED_SOFTWARE = 3 + } - /** - * Constructs a new WebRiskServiceV1Beta1 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); + /** Properties of a Confidence. */ + interface IConfidence { - /** - * Creates new WebRiskServiceV1Beta1 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): WebRiskServiceV1Beta1; + /** Confidence score */ + score?: (number|null); - /** - * Calls ComputeThreatListDiff. - * @param request ComputeThreatListDiffRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ComputeThreatListDiffResponse - */ - public computeThreatListDiff(request: google.cloud.webrisk.v1beta1.IComputeThreatListDiffRequest, callback: google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1.ComputeThreatListDiffCallback): void; + /** Confidence level */ + level?: (google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel|keyof typeof google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel|null); + } - /** - * Calls ComputeThreatListDiff. - * @param request ComputeThreatListDiffRequest message or plain object - * @returns Promise - */ - public computeThreatListDiff(request: google.cloud.webrisk.v1beta1.IComputeThreatListDiffRequest): Promise; + /** Represents a Confidence. */ + class Confidence implements IConfidence { - /** - * Calls SearchUris. - * @param request SearchUrisRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SearchUrisResponse - */ - public searchUris(request: google.cloud.webrisk.v1beta1.ISearchUrisRequest, callback: google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1.SearchUrisCallback): void; + /** + * Constructs a new Confidence. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.webrisk.v1.ThreatInfo.IConfidence); - /** - * Calls SearchUris. - * @param request SearchUrisRequest message or plain object - * @returns Promise - */ - public searchUris(request: google.cloud.webrisk.v1beta1.ISearchUrisRequest): Promise; + /** Confidence score. */ + public score?: (number|null); - /** - * Calls SearchHashes. - * @param request SearchHashesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SearchHashesResponse - */ - public searchHashes(request: google.cloud.webrisk.v1beta1.ISearchHashesRequest, callback: google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1.SearchHashesCallback): void; + /** Confidence level. */ + public level?: (google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel|keyof typeof google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel|null); - /** - * Calls SearchHashes. - * @param request SearchHashesRequest message or plain object - * @returns Promise - */ - public searchHashes(request: google.cloud.webrisk.v1beta1.ISearchHashesRequest): Promise; - } + /** Confidence value. */ + public value?: ("score"|"level"); - namespace WebRiskServiceV1Beta1 { + /** + * Creates a new Confidence instance using the specified properties. + * @param [properties] Properties to set + * @returns Confidence instance + */ + public static create(properties?: google.cloud.webrisk.v1.ThreatInfo.IConfidence): google.cloud.webrisk.v1.ThreatInfo.Confidence; - /** - * Callback as used by {@link google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1|computeThreatListDiff}. - * @param error Error, if any - * @param [response] ComputeThreatListDiffResponse - */ - type ComputeThreatListDiffCallback = (error: (Error|null), response?: google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse) => void; + /** + * Encodes the specified Confidence message. Does not implicitly {@link google.cloud.webrisk.v1.ThreatInfo.Confidence.verify|verify} messages. + * @param message Confidence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.webrisk.v1.ThreatInfo.IConfidence, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Callback as used by {@link google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1|searchUris}. - * @param error Error, if any - * @param [response] SearchUrisResponse - */ - type SearchUrisCallback = (error: (Error|null), response?: google.cloud.webrisk.v1beta1.SearchUrisResponse) => void; + /** + * Encodes the specified Confidence message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1.ThreatInfo.Confidence.verify|verify} messages. + * @param message Confidence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.webrisk.v1.ThreatInfo.IConfidence, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Callback as used by {@link google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1|searchHashes}. - * @param error Error, if any - * @param [response] SearchHashesResponse - */ - type SearchHashesCallback = (error: (Error|null), response?: google.cloud.webrisk.v1beta1.SearchHashesResponse) => void; - } + /** + * Decodes a Confidence message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Confidence + * @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.webrisk.v1.ThreatInfo.Confidence; - /** Properties of a ComputeThreatListDiffRequest. */ - interface IComputeThreatListDiffRequest { + /** + * Decodes a Confidence message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Confidence + * @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.webrisk.v1.ThreatInfo.Confidence; - /** ComputeThreatListDiffRequest threatType */ - threatType?: (google.cloud.webrisk.v1beta1.ThreatType|keyof typeof google.cloud.webrisk.v1beta1.ThreatType|null); + /** + * Verifies a Confidence 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); - /** ComputeThreatListDiffRequest versionToken */ - versionToken?: (Uint8Array|string|null); + /** + * Creates a Confidence message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Confidence + */ + public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1.ThreatInfo.Confidence; - /** ComputeThreatListDiffRequest constraints */ - constraints?: (google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.IConstraints|null); - } + /** + * Creates a plain object from a Confidence message. Also converts values to other types if specified. + * @param message Confidence + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.webrisk.v1.ThreatInfo.Confidence, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents a ComputeThreatListDiffRequest. */ - class ComputeThreatListDiffRequest implements IComputeThreatListDiffRequest { + /** + * Converts this Confidence to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Constructs a new ComputeThreatListDiffRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.webrisk.v1beta1.IComputeThreatListDiffRequest); + /** + * Gets the default type url for Confidence + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** ComputeThreatListDiffRequest threatType. */ - public threatType: (google.cloud.webrisk.v1beta1.ThreatType|keyof typeof google.cloud.webrisk.v1beta1.ThreatType); + namespace Confidence { - /** ComputeThreatListDiffRequest versionToken. */ - public versionToken: (Uint8Array|string); + /** ConfidenceLevel enum. */ + enum ConfidenceLevel { + CONFIDENCE_LEVEL_UNSPECIFIED = 0, + LOW = 1, + MEDIUM = 2, + HIGH = 3 + } + } - /** ComputeThreatListDiffRequest constraints. */ - public constraints?: (google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.IConstraints|null); + /** Properties of a ThreatJustification. */ + interface IThreatJustification { - /** - * Creates a new ComputeThreatListDiffRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ComputeThreatListDiffRequest instance - */ - public static create(properties?: google.cloud.webrisk.v1beta1.IComputeThreatListDiffRequest): google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest; + /** ThreatJustification labels */ + labels?: (google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel[]|null); - /** - * Encodes the specified ComputeThreatListDiffRequest message. Does not implicitly {@link google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.verify|verify} messages. - * @param message ComputeThreatListDiffRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.webrisk.v1beta1.IComputeThreatListDiffRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** ThreatJustification comments */ + comments?: (string[]|null); + } - /** - * Encodes the specified ComputeThreatListDiffRequest message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.verify|verify} messages. - * @param message ComputeThreatListDiffRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.webrisk.v1beta1.IComputeThreatListDiffRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a ThreatJustification. */ + class ThreatJustification implements IThreatJustification { - /** - * Decodes a ComputeThreatListDiffRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ComputeThreatListDiffRequest - * @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.webrisk.v1beta1.ComputeThreatListDiffRequest; + /** + * Constructs a new ThreatJustification. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.webrisk.v1.ThreatInfo.IThreatJustification); - /** - * Decodes a ComputeThreatListDiffRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ComputeThreatListDiffRequest - * @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.webrisk.v1beta1.ComputeThreatListDiffRequest; + /** ThreatJustification labels. */ + public labels: google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel[]; - /** - * Verifies a ComputeThreatListDiffRequest 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 ComputeThreatListDiffRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ComputeThreatListDiffRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest; - - /** - * Creates a plain object from a ComputeThreatListDiffRequest message. Also converts values to other types if specified. - * @param message ComputeThreatListDiffRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ComputeThreatListDiffRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ComputeThreatListDiffRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ComputeThreatListDiffRequest { - - /** Properties of a Constraints. */ - interface IConstraints { - - /** Constraints maxDiffEntries */ - maxDiffEntries?: (number|null); - - /** Constraints maxDatabaseEntries */ - maxDatabaseEntries?: (number|null); - - /** Constraints supportedCompressions */ - supportedCompressions?: (google.cloud.webrisk.v1beta1.CompressionType[]|null); - } - - /** Represents a Constraints. */ - class Constraints implements IConstraints { - - /** - * Constructs a new Constraints. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.IConstraints); - - /** Constraints maxDiffEntries. */ - public maxDiffEntries: number; - - /** Constraints maxDatabaseEntries. */ - public maxDatabaseEntries: number; - - /** Constraints supportedCompressions. */ - public supportedCompressions: google.cloud.webrisk.v1beta1.CompressionType[]; + /** ThreatJustification comments. */ + public comments: string[]; /** - * Creates a new Constraints instance using the specified properties. + * Creates a new ThreatJustification instance using the specified properties. * @param [properties] Properties to set - * @returns Constraints instance + * @returns ThreatJustification instance */ - public static create(properties?: google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.IConstraints): google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints; + public static create(properties?: google.cloud.webrisk.v1.ThreatInfo.IThreatJustification): google.cloud.webrisk.v1.ThreatInfo.ThreatJustification; /** - * Encodes the specified Constraints message. Does not implicitly {@link google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.verify|verify} messages. - * @param message Constraints message or plain object to encode + * Encodes the specified ThreatJustification message. Does not implicitly {@link google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.verify|verify} messages. + * @param message ThreatJustification message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.IConstraints, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.webrisk.v1.ThreatInfo.IThreatJustification, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Constraints message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.verify|verify} messages. - * @param message Constraints message or plain object to encode + * Encodes the specified ThreatJustification message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.verify|verify} messages. + * @param message ThreatJustification message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.IConstraints, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.webrisk.v1.ThreatInfo.IThreatJustification, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Constraints message from the specified reader or buffer. + * Decodes a ThreatJustification message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Constraints + * @returns ThreatJustification * @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.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.webrisk.v1.ThreatInfo.ThreatJustification; /** - * Decodes a Constraints message from the specified reader or buffer, length delimited. + * Decodes a ThreatJustification message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Constraints + * @returns ThreatJustification * @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.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.webrisk.v1.ThreatInfo.ThreatJustification; /** - * Verifies a Constraints message. + * Verifies a ThreatJustification 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 Constraints message from a plain object. Also converts values to their respective internal types. + * Creates a ThreatJustification message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Constraints + * @returns ThreatJustification */ - public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints; + public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1.ThreatInfo.ThreatJustification; /** - * Creates a plain object from a Constraints message. Also converts values to other types if specified. - * @param message Constraints + * Creates a plain object from a ThreatJustification message. Also converts values to other types if specified. + * @param message ThreatJustification * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.webrisk.v1.ThreatInfo.ThreatJustification, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Constraints to JSON. + * Converts this ThreatJustification to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Constraints + * Gets the default type url for ThreatJustification * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - } - - /** Properties of a ComputeThreatListDiffResponse. */ - interface IComputeThreatListDiffResponse { - - /** ComputeThreatListDiffResponse responseType */ - responseType?: (google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType|keyof typeof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType|null); - /** ComputeThreatListDiffResponse additions */ - additions?: (google.cloud.webrisk.v1beta1.IThreatEntryAdditions|null); + namespace ThreatJustification { - /** ComputeThreatListDiffResponse removals */ - removals?: (google.cloud.webrisk.v1beta1.IThreatEntryRemovals|null); + /** JustificationLabel enum. */ + enum JustificationLabel { + JUSTIFICATION_LABEL_UNSPECIFIED = 0, + MANUAL_VERIFICATION = 1, + USER_REPORT = 2, + AUTOMATED_REPORT = 3 + } + } + } - /** ComputeThreatListDiffResponse newVersionToken */ - newVersionToken?: (Uint8Array|string|null); + /** Properties of a ThreatDiscovery. */ + interface IThreatDiscovery { - /** ComputeThreatListDiffResponse checksum */ - checksum?: (google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.IChecksum|null); + /** ThreatDiscovery platform */ + platform?: (google.cloud.webrisk.v1.ThreatDiscovery.Platform|keyof typeof google.cloud.webrisk.v1.ThreatDiscovery.Platform|null); - /** ComputeThreatListDiffResponse recommendedNextDiff */ - recommendedNextDiff?: (google.protobuf.ITimestamp|null); + /** ThreatDiscovery regionCodes */ + regionCodes?: (string[]|null); } - /** Represents a ComputeThreatListDiffResponse. */ - class ComputeThreatListDiffResponse implements IComputeThreatListDiffResponse { + /** Represents a ThreatDiscovery. */ + class ThreatDiscovery implements IThreatDiscovery { /** - * Constructs a new ComputeThreatListDiffResponse. + * Constructs a new ThreatDiscovery. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.webrisk.v1beta1.IComputeThreatListDiffResponse); - - /** ComputeThreatListDiffResponse responseType. */ - public responseType: (google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType|keyof typeof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType); - - /** ComputeThreatListDiffResponse additions. */ - public additions?: (google.cloud.webrisk.v1beta1.IThreatEntryAdditions|null); - - /** ComputeThreatListDiffResponse removals. */ - public removals?: (google.cloud.webrisk.v1beta1.IThreatEntryRemovals|null); - - /** ComputeThreatListDiffResponse newVersionToken. */ - public newVersionToken: (Uint8Array|string); + constructor(properties?: google.cloud.webrisk.v1.IThreatDiscovery); - /** ComputeThreatListDiffResponse checksum. */ - public checksum?: (google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.IChecksum|null); + /** ThreatDiscovery platform. */ + public platform: (google.cloud.webrisk.v1.ThreatDiscovery.Platform|keyof typeof google.cloud.webrisk.v1.ThreatDiscovery.Platform); - /** ComputeThreatListDiffResponse recommendedNextDiff. */ - public recommendedNextDiff?: (google.protobuf.ITimestamp|null); + /** ThreatDiscovery regionCodes. */ + public regionCodes: string[]; /** - * Creates a new ComputeThreatListDiffResponse instance using the specified properties. + * Creates a new ThreatDiscovery instance using the specified properties. * @param [properties] Properties to set - * @returns ComputeThreatListDiffResponse instance + * @returns ThreatDiscovery instance */ - public static create(properties?: google.cloud.webrisk.v1beta1.IComputeThreatListDiffResponse): google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse; + public static create(properties?: google.cloud.webrisk.v1.IThreatDiscovery): google.cloud.webrisk.v1.ThreatDiscovery; /** - * Encodes the specified ComputeThreatListDiffResponse message. Does not implicitly {@link google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.verify|verify} messages. - * @param message ComputeThreatListDiffResponse message or plain object to encode + * Encodes the specified ThreatDiscovery message. Does not implicitly {@link google.cloud.webrisk.v1.ThreatDiscovery.verify|verify} messages. + * @param message ThreatDiscovery message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.webrisk.v1beta1.IComputeThreatListDiffResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.webrisk.v1.IThreatDiscovery, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ComputeThreatListDiffResponse message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.verify|verify} messages. - * @param message ComputeThreatListDiffResponse message or plain object to encode + * Encodes the specified ThreatDiscovery message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1.ThreatDiscovery.verify|verify} messages. + * @param message ThreatDiscovery message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.webrisk.v1beta1.IComputeThreatListDiffResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.webrisk.v1.IThreatDiscovery, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ComputeThreatListDiffResponse message from the specified reader or buffer. + * Decodes a ThreatDiscovery message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ComputeThreatListDiffResponse + * @returns ThreatDiscovery * @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.webrisk.v1beta1.ComputeThreatListDiffResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.webrisk.v1.ThreatDiscovery; /** - * Decodes a ComputeThreatListDiffResponse message from the specified reader or buffer, length delimited. + * Decodes a ThreatDiscovery message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ComputeThreatListDiffResponse + * @returns ThreatDiscovery * @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.webrisk.v1beta1.ComputeThreatListDiffResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.webrisk.v1.ThreatDiscovery; /** - * Verifies a ComputeThreatListDiffResponse message. + * Verifies a ThreatDiscovery 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 ComputeThreatListDiffResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ThreatDiscovery message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ComputeThreatListDiffResponse + * @returns ThreatDiscovery */ - public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1.ThreatDiscovery; /** - * Creates a plain object from a ComputeThreatListDiffResponse message. Also converts values to other types if specified. - * @param message ComputeThreatListDiffResponse + * Creates a plain object from a ThreatDiscovery message. Also converts values to other types if specified. + * @param message ThreatDiscovery * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.webrisk.v1.ThreatDiscovery, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ComputeThreatListDiffResponse to JSON. + * Converts this ThreatDiscovery to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ComputeThreatListDiffResponse + * Gets the default type url for ThreatDiscovery * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace ComputeThreatListDiffResponse { - - /** Properties of a Checksum. */ - interface IChecksum { + namespace ThreatDiscovery { - /** Checksum sha256 */ - sha256?: (Uint8Array|string|null); + /** Platform enum. */ + enum Platform { + PLATFORM_UNSPECIFIED = 0, + ANDROID = 1, + IOS = 2, + MACOS = 3, + WINDOWS = 4 } + } - /** Represents a Checksum. */ - class Checksum implements IChecksum { - - /** - * Constructs a new Checksum. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.IChecksum); + /** Properties of a CreateSubmissionRequest. */ + interface ICreateSubmissionRequest { - /** Checksum sha256. */ - public sha256: (Uint8Array|string); + /** CreateSubmissionRequest parent */ + parent?: (string|null); - /** - * Creates a new Checksum instance using the specified properties. - * @param [properties] Properties to set - * @returns Checksum instance - */ - public static create(properties?: google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.IChecksum): google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum; + /** CreateSubmissionRequest submission */ + submission?: (google.cloud.webrisk.v1.ISubmission|null); + } - /** - * Encodes the specified Checksum message. Does not implicitly {@link google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum.verify|verify} messages. - * @param message Checksum message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.IChecksum, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a CreateSubmissionRequest. */ + class CreateSubmissionRequest implements ICreateSubmissionRequest { - /** - * Encodes the specified Checksum message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum.verify|verify} messages. - * @param message Checksum message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.IChecksum, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new CreateSubmissionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.webrisk.v1.ICreateSubmissionRequest); - /** - * Decodes a Checksum message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Checksum - * @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.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum; + /** CreateSubmissionRequest parent. */ + public parent: string; - /** - * Decodes a Checksum message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Checksum - * @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.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum; + /** CreateSubmissionRequest submission. */ + public submission?: (google.cloud.webrisk.v1.ISubmission|null); - /** - * Verifies a Checksum 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 new CreateSubmissionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateSubmissionRequest instance + */ + public static create(properties?: google.cloud.webrisk.v1.ICreateSubmissionRequest): google.cloud.webrisk.v1.CreateSubmissionRequest; - /** - * Creates a Checksum message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Checksum - */ - public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum; + /** + * Encodes the specified CreateSubmissionRequest message. Does not implicitly {@link google.cloud.webrisk.v1.CreateSubmissionRequest.verify|verify} messages. + * @param message CreateSubmissionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.webrisk.v1.ICreateSubmissionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a plain object from a Checksum message. Also converts values to other types if specified. - * @param message Checksum - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified CreateSubmissionRequest message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1.CreateSubmissionRequest.verify|verify} messages. + * @param message CreateSubmissionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.webrisk.v1.ICreateSubmissionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this Checksum to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Decodes a CreateSubmissionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateSubmissionRequest + * @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.webrisk.v1.CreateSubmissionRequest; - /** - * Gets the default type url for Checksum - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Decodes a CreateSubmissionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateSubmissionRequest + * @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.webrisk.v1.CreateSubmissionRequest; - /** ResponseType enum. */ - enum ResponseType { - RESPONSE_TYPE_UNSPECIFIED = 0, - DIFF = 1, - RESET = 2 - } + /** + * Verifies a CreateSubmissionRequest 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 CreateSubmissionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateSubmissionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1.CreateSubmissionRequest; + + /** + * Creates a plain object from a CreateSubmissionRequest message. Also converts values to other types if specified. + * @param message CreateSubmissionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.webrisk.v1.CreateSubmissionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateSubmissionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateSubmissionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SearchUrisRequest. */ - interface ISearchUrisRequest { + /** Properties of a SubmitUriRequest. */ + interface ISubmitUriRequest { - /** SearchUrisRequest uri */ - uri?: (string|null); + /** SubmitUriRequest parent */ + parent?: (string|null); - /** SearchUrisRequest threatTypes */ - threatTypes?: (google.cloud.webrisk.v1beta1.ThreatType[]|null); + /** SubmitUriRequest submission */ + submission?: (google.cloud.webrisk.v1.ISubmission|null); + + /** SubmitUriRequest threatInfo */ + threatInfo?: (google.cloud.webrisk.v1.IThreatInfo|null); + + /** SubmitUriRequest threatDiscovery */ + threatDiscovery?: (google.cloud.webrisk.v1.IThreatDiscovery|null); } - /** Represents a SearchUrisRequest. */ - class SearchUrisRequest implements ISearchUrisRequest { + /** Represents a SubmitUriRequest. */ + class SubmitUriRequest implements ISubmitUriRequest { /** - * Constructs a new SearchUrisRequest. + * Constructs a new SubmitUriRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.webrisk.v1beta1.ISearchUrisRequest); + constructor(properties?: google.cloud.webrisk.v1.ISubmitUriRequest); - /** SearchUrisRequest uri. */ - public uri: string; + /** SubmitUriRequest parent. */ + public parent: string; - /** SearchUrisRequest threatTypes. */ - public threatTypes: google.cloud.webrisk.v1beta1.ThreatType[]; + /** SubmitUriRequest submission. */ + public submission?: (google.cloud.webrisk.v1.ISubmission|null); + + /** SubmitUriRequest threatInfo. */ + public threatInfo?: (google.cloud.webrisk.v1.IThreatInfo|null); + + /** SubmitUriRequest threatDiscovery. */ + public threatDiscovery?: (google.cloud.webrisk.v1.IThreatDiscovery|null); /** - * Creates a new SearchUrisRequest instance using the specified properties. + * Creates a new SubmitUriRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SearchUrisRequest instance + * @returns SubmitUriRequest instance */ - public static create(properties?: google.cloud.webrisk.v1beta1.ISearchUrisRequest): google.cloud.webrisk.v1beta1.SearchUrisRequest; + public static create(properties?: google.cloud.webrisk.v1.ISubmitUriRequest): google.cloud.webrisk.v1.SubmitUriRequest; /** - * Encodes the specified SearchUrisRequest message. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchUrisRequest.verify|verify} messages. - * @param message SearchUrisRequest message or plain object to encode + * Encodes the specified SubmitUriRequest message. Does not implicitly {@link google.cloud.webrisk.v1.SubmitUriRequest.verify|verify} messages. + * @param message SubmitUriRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.webrisk.v1beta1.ISearchUrisRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.webrisk.v1.ISubmitUriRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SearchUrisRequest message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchUrisRequest.verify|verify} messages. - * @param message SearchUrisRequest message or plain object to encode + * Encodes the specified SubmitUriRequest message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1.SubmitUriRequest.verify|verify} messages. + * @param message SubmitUriRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.webrisk.v1beta1.ISearchUrisRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.webrisk.v1.ISubmitUriRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SearchUrisRequest message from the specified reader or buffer. + * Decodes a SubmitUriRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SearchUrisRequest + * @returns SubmitUriRequest * @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.webrisk.v1beta1.SearchUrisRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.webrisk.v1.SubmitUriRequest; /** - * Decodes a SearchUrisRequest message from the specified reader or buffer, length delimited. + * Decodes a SubmitUriRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SearchUrisRequest + * @returns SubmitUriRequest * @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.webrisk.v1beta1.SearchUrisRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.webrisk.v1.SubmitUriRequest; /** - * Verifies a SearchUrisRequest message. + * Verifies a SubmitUriRequest 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 SearchUrisRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SubmitUriRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SearchUrisRequest + * @returns SubmitUriRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1beta1.SearchUrisRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1.SubmitUriRequest; /** - * Creates a plain object from a SearchUrisRequest message. Also converts values to other types if specified. - * @param message SearchUrisRequest + * Creates a plain object from a SubmitUriRequest message. Also converts values to other types if specified. + * @param message SubmitUriRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.webrisk.v1beta1.SearchUrisRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.webrisk.v1.SubmitUriRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SearchUrisRequest to JSON. + * Converts this SubmitUriRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SearchUrisRequest + * Gets the default type url for SubmitUriRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SearchUrisResponse. */ - interface ISearchUrisResponse { + /** Properties of a SubmitUriMetadata. */ + interface ISubmitUriMetadata { - /** SearchUrisResponse threat */ - threat?: (google.cloud.webrisk.v1beta1.SearchUrisResponse.IThreatUri|null); + /** SubmitUriMetadata state */ + state?: (google.cloud.webrisk.v1.SubmitUriMetadata.State|keyof typeof google.cloud.webrisk.v1.SubmitUriMetadata.State|null); + + /** SubmitUriMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** SubmitUriMetadata updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); } - /** Represents a SearchUrisResponse. */ - class SearchUrisResponse implements ISearchUrisResponse { + /** Represents a SubmitUriMetadata. */ + class SubmitUriMetadata implements ISubmitUriMetadata { /** - * Constructs a new SearchUrisResponse. + * Constructs a new SubmitUriMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.webrisk.v1beta1.ISearchUrisResponse); + constructor(properties?: google.cloud.webrisk.v1.ISubmitUriMetadata); - /** SearchUrisResponse threat. */ - public threat?: (google.cloud.webrisk.v1beta1.SearchUrisResponse.IThreatUri|null); + /** SubmitUriMetadata state. */ + public state: (google.cloud.webrisk.v1.SubmitUriMetadata.State|keyof typeof google.cloud.webrisk.v1.SubmitUriMetadata.State); + + /** SubmitUriMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** SubmitUriMetadata updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new SearchUrisResponse instance using the specified properties. + * Creates a new SubmitUriMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns SearchUrisResponse instance + * @returns SubmitUriMetadata instance */ - public static create(properties?: google.cloud.webrisk.v1beta1.ISearchUrisResponse): google.cloud.webrisk.v1beta1.SearchUrisResponse; + public static create(properties?: google.cloud.webrisk.v1.ISubmitUriMetadata): google.cloud.webrisk.v1.SubmitUriMetadata; /** - * Encodes the specified SearchUrisResponse message. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchUrisResponse.verify|verify} messages. - * @param message SearchUrisResponse message or plain object to encode + * Encodes the specified SubmitUriMetadata message. Does not implicitly {@link google.cloud.webrisk.v1.SubmitUriMetadata.verify|verify} messages. + * @param message SubmitUriMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.webrisk.v1beta1.ISearchUrisResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.webrisk.v1.ISubmitUriMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SearchUrisResponse message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchUrisResponse.verify|verify} messages. - * @param message SearchUrisResponse message or plain object to encode + * Encodes the specified SubmitUriMetadata message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1.SubmitUriMetadata.verify|verify} messages. + * @param message SubmitUriMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.webrisk.v1beta1.ISearchUrisResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.webrisk.v1.ISubmitUriMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SearchUrisResponse message from the specified reader or buffer. + * Decodes a SubmitUriMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SearchUrisResponse + * @returns SubmitUriMetadata * @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.webrisk.v1beta1.SearchUrisResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.webrisk.v1.SubmitUriMetadata; /** - * Decodes a SearchUrisResponse message from the specified reader or buffer, length delimited. + * Decodes a SubmitUriMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SearchUrisResponse + * @returns SubmitUriMetadata * @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.webrisk.v1beta1.SearchUrisResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.webrisk.v1.SubmitUriMetadata; /** - * Verifies a SearchUrisResponse message. + * Verifies a SubmitUriMetadata 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 SearchUrisResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SubmitUriMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SearchUrisResponse + * @returns SubmitUriMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1beta1.SearchUrisResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1.SubmitUriMetadata; /** - * Creates a plain object from a SearchUrisResponse message. Also converts values to other types if specified. - * @param message SearchUrisResponse + * Creates a plain object from a SubmitUriMetadata message. Also converts values to other types if specified. + * @param message SubmitUriMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.webrisk.v1beta1.SearchUrisResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.webrisk.v1.SubmitUriMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SearchUrisResponse to JSON. + * Converts this SubmitUriMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SearchUrisResponse + * Gets the default type url for SubmitUriMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace SearchUrisResponse { - - /** Properties of a ThreatUri. */ - interface IThreatUri { + namespace SubmitUriMetadata { - /** ThreatUri threatTypes */ - threatTypes?: (google.cloud.webrisk.v1beta1.ThreatType[]|null); - - /** ThreatUri expireTime */ - expireTime?: (google.protobuf.ITimestamp|null); + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + RUNNING = 1, + SUCCEEDED = 2, + CANCELLED = 3, + FAILED = 4, + CLOSED = 5 } + } + } - /** Represents a ThreatUri. */ - class ThreatUri implements IThreatUri { - - /** - * Constructs a new ThreatUri. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.webrisk.v1beta1.SearchUrisResponse.IThreatUri); + /** Namespace v1beta1. */ + namespace v1beta1 { - /** ThreatUri threatTypes. */ - public threatTypes: google.cloud.webrisk.v1beta1.ThreatType[]; + /** Represents a WebRiskServiceV1Beta1 */ + class WebRiskServiceV1Beta1 extends $protobuf.rpc.Service { - /** ThreatUri expireTime. */ - public expireTime?: (google.protobuf.ITimestamp|null); + /** + * Constructs a new WebRiskServiceV1Beta1 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 a new ThreatUri instance using the specified properties. - * @param [properties] Properties to set - * @returns ThreatUri instance - */ - public static create(properties?: google.cloud.webrisk.v1beta1.SearchUrisResponse.IThreatUri): google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri; + /** + * Creates new WebRiskServiceV1Beta1 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): WebRiskServiceV1Beta1; - /** - * Encodes the specified ThreatUri message. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri.verify|verify} messages. - * @param message ThreatUri message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.webrisk.v1beta1.SearchUrisResponse.IThreatUri, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Calls ComputeThreatListDiff. + * @param request ComputeThreatListDiffRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ComputeThreatListDiffResponse + */ + public computeThreatListDiff(request: google.cloud.webrisk.v1beta1.IComputeThreatListDiffRequest, callback: google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1.ComputeThreatListDiffCallback): void; - /** - * Encodes the specified ThreatUri message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri.verify|verify} messages. - * @param message ThreatUri message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.webrisk.v1beta1.SearchUrisResponse.IThreatUri, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Calls ComputeThreatListDiff. + * @param request ComputeThreatListDiffRequest message or plain object + * @returns Promise + */ + public computeThreatListDiff(request: google.cloud.webrisk.v1beta1.IComputeThreatListDiffRequest): Promise; - /** - * Decodes a ThreatUri message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ThreatUri - * @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.webrisk.v1beta1.SearchUrisResponse.ThreatUri; + /** + * Calls SearchUris. + * @param request SearchUrisRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SearchUrisResponse + */ + public searchUris(request: google.cloud.webrisk.v1beta1.ISearchUrisRequest, callback: google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1.SearchUrisCallback): void; - /** - * Decodes a ThreatUri message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ThreatUri - * @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.webrisk.v1beta1.SearchUrisResponse.ThreatUri; - - /** - * Verifies a ThreatUri 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 ThreatUri message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ThreatUri - */ - public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri; - - /** - * Creates a plain object from a ThreatUri message. Also converts values to other types if specified. - * @param message ThreatUri - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ThreatUri to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ThreatUri - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a SearchHashesRequest. */ - interface ISearchHashesRequest { - - /** SearchHashesRequest hashPrefix */ - hashPrefix?: (Uint8Array|string|null); - - /** SearchHashesRequest threatTypes */ - threatTypes?: (google.cloud.webrisk.v1beta1.ThreatType[]|null); - } - - /** Represents a SearchHashesRequest. */ - class SearchHashesRequest implements ISearchHashesRequest { - - /** - * Constructs a new SearchHashesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.webrisk.v1beta1.ISearchHashesRequest); - - /** SearchHashesRequest hashPrefix. */ - public hashPrefix: (Uint8Array|string); - - /** SearchHashesRequest threatTypes. */ - public threatTypes: google.cloud.webrisk.v1beta1.ThreatType[]; - - /** - * Creates a new SearchHashesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SearchHashesRequest instance - */ - public static create(properties?: google.cloud.webrisk.v1beta1.ISearchHashesRequest): google.cloud.webrisk.v1beta1.SearchHashesRequest; - - /** - * Encodes the specified SearchHashesRequest message. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchHashesRequest.verify|verify} messages. - * @param message SearchHashesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.webrisk.v1beta1.ISearchHashesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SearchHashesRequest message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchHashesRequest.verify|verify} messages. - * @param message SearchHashesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.webrisk.v1beta1.ISearchHashesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SearchHashesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SearchHashesRequest - * @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.webrisk.v1beta1.SearchHashesRequest; + /** + * Calls SearchUris. + * @param request SearchUrisRequest message or plain object + * @returns Promise + */ + public searchUris(request: google.cloud.webrisk.v1beta1.ISearchUrisRequest): Promise; /** - * Decodes a SearchHashesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SearchHashesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls SearchHashes. + * @param request SearchHashesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SearchHashesResponse */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.webrisk.v1beta1.SearchHashesRequest; + public searchHashes(request: google.cloud.webrisk.v1beta1.ISearchHashesRequest, callback: google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1.SearchHashesCallback): void; /** - * Verifies a SearchHashesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls SearchHashes. + * @param request SearchHashesRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public searchHashes(request: google.cloud.webrisk.v1beta1.ISearchHashesRequest): Promise; + } - /** - * Creates a SearchHashesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SearchHashesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1beta1.SearchHashesRequest; + namespace WebRiskServiceV1Beta1 { /** - * Creates a plain object from a SearchHashesRequest message. Also converts values to other types if specified. - * @param message SearchHashesRequest - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1|computeThreatListDiff}. + * @param error Error, if any + * @param [response] ComputeThreatListDiffResponse */ - public static toObject(message: google.cloud.webrisk.v1beta1.SearchHashesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type ComputeThreatListDiffCallback = (error: (Error|null), response?: google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse) => void; /** - * Converts this SearchHashesRequest to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1|searchUris}. + * @param error Error, if any + * @param [response] SearchUrisResponse */ - public toJSON(): { [k: string]: any }; + type SearchUrisCallback = (error: (Error|null), response?: google.cloud.webrisk.v1beta1.SearchUrisResponse) => void; /** - * Gets the default type url for SearchHashesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Callback as used by {@link google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1|searchHashes}. + * @param error Error, if any + * @param [response] SearchHashesResponse */ - public static getTypeUrl(typeUrlPrefix?: string): string; + type SearchHashesCallback = (error: (Error|null), response?: google.cloud.webrisk.v1beta1.SearchHashesResponse) => void; } - /** Properties of a SearchHashesResponse. */ - interface ISearchHashesResponse { + /** Properties of a ComputeThreatListDiffRequest. */ + interface IComputeThreatListDiffRequest { - /** SearchHashesResponse threats */ - threats?: (google.cloud.webrisk.v1beta1.SearchHashesResponse.IThreatHash[]|null); + /** ComputeThreatListDiffRequest threatType */ + threatType?: (google.cloud.webrisk.v1beta1.ThreatType|keyof typeof google.cloud.webrisk.v1beta1.ThreatType|null); - /** SearchHashesResponse negativeExpireTime */ - negativeExpireTime?: (google.protobuf.ITimestamp|null); + /** ComputeThreatListDiffRequest versionToken */ + versionToken?: (Uint8Array|string|null); + + /** ComputeThreatListDiffRequest constraints */ + constraints?: (google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.IConstraints|null); } - /** Represents a SearchHashesResponse. */ - class SearchHashesResponse implements ISearchHashesResponse { + /** Represents a ComputeThreatListDiffRequest. */ + class ComputeThreatListDiffRequest implements IComputeThreatListDiffRequest { /** - * Constructs a new SearchHashesResponse. + * Constructs a new ComputeThreatListDiffRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.webrisk.v1beta1.ISearchHashesResponse); + constructor(properties?: google.cloud.webrisk.v1beta1.IComputeThreatListDiffRequest); - /** SearchHashesResponse threats. */ - public threats: google.cloud.webrisk.v1beta1.SearchHashesResponse.IThreatHash[]; + /** ComputeThreatListDiffRequest threatType. */ + public threatType: (google.cloud.webrisk.v1beta1.ThreatType|keyof typeof google.cloud.webrisk.v1beta1.ThreatType); - /** SearchHashesResponse negativeExpireTime. */ - public negativeExpireTime?: (google.protobuf.ITimestamp|null); + /** ComputeThreatListDiffRequest versionToken. */ + public versionToken: (Uint8Array|string); + + /** ComputeThreatListDiffRequest constraints. */ + public constraints?: (google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.IConstraints|null); /** - * Creates a new SearchHashesResponse instance using the specified properties. + * Creates a new ComputeThreatListDiffRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SearchHashesResponse instance + * @returns ComputeThreatListDiffRequest instance */ - public static create(properties?: google.cloud.webrisk.v1beta1.ISearchHashesResponse): google.cloud.webrisk.v1beta1.SearchHashesResponse; + public static create(properties?: google.cloud.webrisk.v1beta1.IComputeThreatListDiffRequest): google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest; /** - * Encodes the specified SearchHashesResponse message. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchHashesResponse.verify|verify} messages. - * @param message SearchHashesResponse message or plain object to encode + * Encodes the specified ComputeThreatListDiffRequest message. Does not implicitly {@link google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.verify|verify} messages. + * @param message ComputeThreatListDiffRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.webrisk.v1beta1.ISearchHashesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.webrisk.v1beta1.IComputeThreatListDiffRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SearchHashesResponse message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchHashesResponse.verify|verify} messages. - * @param message SearchHashesResponse message or plain object to encode + * Encodes the specified ComputeThreatListDiffRequest message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.verify|verify} messages. + * @param message ComputeThreatListDiffRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.webrisk.v1beta1.ISearchHashesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.webrisk.v1beta1.IComputeThreatListDiffRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SearchHashesResponse message from the specified reader or buffer. + * Decodes a ComputeThreatListDiffRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SearchHashesResponse + * @returns ComputeThreatListDiffRequest * @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.webrisk.v1beta1.SearchHashesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest; /** - * Decodes a SearchHashesResponse message from the specified reader or buffer, length delimited. + * Decodes a ComputeThreatListDiffRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SearchHashesResponse + * @returns ComputeThreatListDiffRequest * @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.webrisk.v1beta1.SearchHashesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest; /** - * Verifies a SearchHashesResponse message. + * Verifies a ComputeThreatListDiffRequest 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 SearchHashesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ComputeThreatListDiffRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SearchHashesResponse + * @returns ComputeThreatListDiffRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1beta1.SearchHashesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest; /** - * Creates a plain object from a SearchHashesResponse message. Also converts values to other types if specified. - * @param message SearchHashesResponse + * Creates a plain object from a ComputeThreatListDiffRequest message. Also converts values to other types if specified. + * @param message ComputeThreatListDiffRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.webrisk.v1beta1.SearchHashesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SearchHashesResponse to JSON. + * Converts this ComputeThreatListDiffRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SearchHashesResponse + * Gets the default type url for ComputeThreatListDiffRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace SearchHashesResponse { + namespace ComputeThreatListDiffRequest { - /** Properties of a ThreatHash. */ - interface IThreatHash { + /** Properties of a Constraints. */ + interface IConstraints { - /** ThreatHash threatTypes */ - threatTypes?: (google.cloud.webrisk.v1beta1.ThreatType[]|null); + /** Constraints maxDiffEntries */ + maxDiffEntries?: (number|null); - /** ThreatHash hash */ - hash?: (Uint8Array|string|null); + /** Constraints maxDatabaseEntries */ + maxDatabaseEntries?: (number|null); - /** ThreatHash expireTime */ - expireTime?: (google.protobuf.ITimestamp|null); + /** Constraints supportedCompressions */ + supportedCompressions?: (google.cloud.webrisk.v1beta1.CompressionType[]|null); } - /** Represents a ThreatHash. */ - class ThreatHash implements IThreatHash { + /** Represents a Constraints. */ + class Constraints implements IConstraints { /** - * Constructs a new ThreatHash. + * Constructs a new Constraints. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.webrisk.v1beta1.SearchHashesResponse.IThreatHash); + constructor(properties?: google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.IConstraints); - /** ThreatHash threatTypes. */ - public threatTypes: google.cloud.webrisk.v1beta1.ThreatType[]; + /** Constraints maxDiffEntries. */ + public maxDiffEntries: number; - /** ThreatHash hash. */ - public hash: (Uint8Array|string); + /** Constraints maxDatabaseEntries. */ + public maxDatabaseEntries: number; - /** ThreatHash expireTime. */ - public expireTime?: (google.protobuf.ITimestamp|null); + /** Constraints supportedCompressions. */ + public supportedCompressions: google.cloud.webrisk.v1beta1.CompressionType[]; /** - * Creates a new ThreatHash instance using the specified properties. + * Creates a new Constraints instance using the specified properties. * @param [properties] Properties to set - * @returns ThreatHash instance + * @returns Constraints instance */ - public static create(properties?: google.cloud.webrisk.v1beta1.SearchHashesResponse.IThreatHash): google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash; + public static create(properties?: google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.IConstraints): google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints; /** - * Encodes the specified ThreatHash message. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash.verify|verify} messages. - * @param message ThreatHash message or plain object to encode + * Encodes the specified Constraints message. Does not implicitly {@link google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.verify|verify} messages. + * @param message Constraints message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.webrisk.v1beta1.SearchHashesResponse.IThreatHash, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.IConstraints, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ThreatHash message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash.verify|verify} messages. - * @param message ThreatHash message or plain object to encode + * Encodes the specified Constraints message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.verify|verify} messages. + * @param message Constraints message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.webrisk.v1beta1.SearchHashesResponse.IThreatHash, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.IConstraints, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ThreatHash message from the specified reader or buffer. + * Decodes a Constraints message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ThreatHash + * @returns Constraints * @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.webrisk.v1beta1.SearchHashesResponse.ThreatHash; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints; /** - * Decodes a ThreatHash message from the specified reader or buffer, length delimited. + * Decodes a Constraints message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ThreatHash + * @returns Constraints * @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.webrisk.v1beta1.SearchHashesResponse.ThreatHash; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints; /** - * Verifies a ThreatHash message. + * Verifies a Constraints 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 ThreatHash message from a plain object. Also converts values to their respective internal types. + * Creates a Constraints message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ThreatHash + * @returns Constraints */ - public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash; + public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints; /** - * Creates a plain object from a ThreatHash message. Also converts values to other types if specified. - * @param message ThreatHash + * Creates a plain object from a Constraints message. Also converts values to other types if specified. + * @param message Constraints * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ThreatHash to JSON. + * Converts this Constraints to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ThreatHash + * Gets the default type url for Constraints * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -3120,4616 +2992,6859 @@ export namespace google { } } - /** Properties of a ThreatEntryAdditions. */ - interface IThreatEntryAdditions { + /** Properties of a ComputeThreatListDiffResponse. */ + interface IComputeThreatListDiffResponse { - /** ThreatEntryAdditions rawHashes */ - rawHashes?: (google.cloud.webrisk.v1beta1.IRawHashes[]|null); + /** ComputeThreatListDiffResponse responseType */ + responseType?: (google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType|keyof typeof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType|null); - /** ThreatEntryAdditions riceHashes */ - riceHashes?: (google.cloud.webrisk.v1beta1.IRiceDeltaEncoding|null); + /** ComputeThreatListDiffResponse additions */ + additions?: (google.cloud.webrisk.v1beta1.IThreatEntryAdditions|null); + + /** ComputeThreatListDiffResponse removals */ + removals?: (google.cloud.webrisk.v1beta1.IThreatEntryRemovals|null); + + /** ComputeThreatListDiffResponse newVersionToken */ + newVersionToken?: (Uint8Array|string|null); + + /** ComputeThreatListDiffResponse checksum */ + checksum?: (google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.IChecksum|null); + + /** ComputeThreatListDiffResponse recommendedNextDiff */ + recommendedNextDiff?: (google.protobuf.ITimestamp|null); } - /** Represents a ThreatEntryAdditions. */ - class ThreatEntryAdditions implements IThreatEntryAdditions { + /** Represents a ComputeThreatListDiffResponse. */ + class ComputeThreatListDiffResponse implements IComputeThreatListDiffResponse { /** - * Constructs a new ThreatEntryAdditions. + * Constructs a new ComputeThreatListDiffResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.webrisk.v1beta1.IThreatEntryAdditions); + constructor(properties?: google.cloud.webrisk.v1beta1.IComputeThreatListDiffResponse); - /** ThreatEntryAdditions rawHashes. */ - public rawHashes: google.cloud.webrisk.v1beta1.IRawHashes[]; + /** ComputeThreatListDiffResponse responseType. */ + public responseType: (google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType|keyof typeof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType); - /** ThreatEntryAdditions riceHashes. */ - public riceHashes?: (google.cloud.webrisk.v1beta1.IRiceDeltaEncoding|null); + /** ComputeThreatListDiffResponse additions. */ + public additions?: (google.cloud.webrisk.v1beta1.IThreatEntryAdditions|null); + + /** ComputeThreatListDiffResponse removals. */ + public removals?: (google.cloud.webrisk.v1beta1.IThreatEntryRemovals|null); + + /** ComputeThreatListDiffResponse newVersionToken. */ + public newVersionToken: (Uint8Array|string); + + /** ComputeThreatListDiffResponse checksum. */ + public checksum?: (google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.IChecksum|null); + + /** ComputeThreatListDiffResponse recommendedNextDiff. */ + public recommendedNextDiff?: (google.protobuf.ITimestamp|null); /** - * Creates a new ThreatEntryAdditions instance using the specified properties. + * Creates a new ComputeThreatListDiffResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ThreatEntryAdditions instance + * @returns ComputeThreatListDiffResponse instance */ - public static create(properties?: google.cloud.webrisk.v1beta1.IThreatEntryAdditions): google.cloud.webrisk.v1beta1.ThreatEntryAdditions; + public static create(properties?: google.cloud.webrisk.v1beta1.IComputeThreatListDiffResponse): google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse; /** - * Encodes the specified ThreatEntryAdditions message. Does not implicitly {@link google.cloud.webrisk.v1beta1.ThreatEntryAdditions.verify|verify} messages. - * @param message ThreatEntryAdditions message or plain object to encode + * Encodes the specified ComputeThreatListDiffResponse message. Does not implicitly {@link google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.verify|verify} messages. + * @param message ComputeThreatListDiffResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.webrisk.v1beta1.IThreatEntryAdditions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.webrisk.v1beta1.IComputeThreatListDiffResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ThreatEntryAdditions message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.ThreatEntryAdditions.verify|verify} messages. - * @param message ThreatEntryAdditions message or plain object to encode + * Encodes the specified ComputeThreatListDiffResponse message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.verify|verify} messages. + * @param message ComputeThreatListDiffResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.webrisk.v1beta1.IThreatEntryAdditions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.webrisk.v1beta1.IComputeThreatListDiffResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ThreatEntryAdditions message from the specified reader or buffer. + * Decodes a ComputeThreatListDiffResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ThreatEntryAdditions + * @returns ComputeThreatListDiffResponse * @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.webrisk.v1beta1.ThreatEntryAdditions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse; /** - * Decodes a ThreatEntryAdditions message from the specified reader or buffer, length delimited. + * Decodes a ComputeThreatListDiffResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ThreatEntryAdditions + * @returns ComputeThreatListDiffResponse * @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.webrisk.v1beta1.ThreatEntryAdditions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse; /** - * Verifies a ThreatEntryAdditions message. + * Verifies a ComputeThreatListDiffResponse 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 ThreatEntryAdditions message from a plain object. Also converts values to their respective internal types. + * Creates a ComputeThreatListDiffResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ThreatEntryAdditions + * @returns ComputeThreatListDiffResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1beta1.ThreatEntryAdditions; + public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse; /** - * Creates a plain object from a ThreatEntryAdditions message. Also converts values to other types if specified. - * @param message ThreatEntryAdditions + * Creates a plain object from a ComputeThreatListDiffResponse message. Also converts values to other types if specified. + * @param message ComputeThreatListDiffResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.webrisk.v1beta1.ThreatEntryAdditions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ThreatEntryAdditions to JSON. + * Converts this ComputeThreatListDiffResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ThreatEntryAdditions + * Gets the default type url for ComputeThreatListDiffResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ThreatEntryRemovals. */ - interface IThreatEntryRemovals { + namespace ComputeThreatListDiffResponse { - /** ThreatEntryRemovals rawIndices */ - rawIndices?: (google.cloud.webrisk.v1beta1.IRawIndices|null); + /** Properties of a Checksum. */ + interface IChecksum { - /** ThreatEntryRemovals riceIndices */ - riceIndices?: (google.cloud.webrisk.v1beta1.IRiceDeltaEncoding|null); - } + /** Checksum sha256 */ + sha256?: (Uint8Array|string|null); + } - /** Represents a ThreatEntryRemovals. */ - class ThreatEntryRemovals implements IThreatEntryRemovals { + /** Represents a Checksum. */ + class Checksum implements IChecksum { - /** - * Constructs a new ThreatEntryRemovals. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.webrisk.v1beta1.IThreatEntryRemovals); + /** + * Constructs a new Checksum. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.IChecksum); - /** ThreatEntryRemovals rawIndices. */ - public rawIndices?: (google.cloud.webrisk.v1beta1.IRawIndices|null); + /** Checksum sha256. */ + public sha256: (Uint8Array|string); - /** ThreatEntryRemovals riceIndices. */ - public riceIndices?: (google.cloud.webrisk.v1beta1.IRiceDeltaEncoding|null); + /** + * Creates a new Checksum instance using the specified properties. + * @param [properties] Properties to set + * @returns Checksum instance + */ + public static create(properties?: google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.IChecksum): google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum; - /** - * Creates a new ThreatEntryRemovals instance using the specified properties. - * @param [properties] Properties to set - * @returns ThreatEntryRemovals instance - */ - public static create(properties?: google.cloud.webrisk.v1beta1.IThreatEntryRemovals): google.cloud.webrisk.v1beta1.ThreatEntryRemovals; + /** + * Encodes the specified Checksum message. Does not implicitly {@link google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum.verify|verify} messages. + * @param message Checksum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.IChecksum, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ThreatEntryRemovals message. Does not implicitly {@link google.cloud.webrisk.v1beta1.ThreatEntryRemovals.verify|verify} messages. - * @param message ThreatEntryRemovals message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.webrisk.v1beta1.IThreatEntryRemovals, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Checksum message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum.verify|verify} messages. + * @param message Checksum message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.IChecksum, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ThreatEntryRemovals message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.ThreatEntryRemovals.verify|verify} messages. - * @param message ThreatEntryRemovals message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.webrisk.v1beta1.IThreatEntryRemovals, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a Checksum message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Checksum + * @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.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum; - /** - * Decodes a ThreatEntryRemovals message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ThreatEntryRemovals - * @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.webrisk.v1beta1.ThreatEntryRemovals; + /** + * Decodes a Checksum message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Checksum + * @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.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum; - /** - * Decodes a ThreatEntryRemovals message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ThreatEntryRemovals - * @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.webrisk.v1beta1.ThreatEntryRemovals; - - /** - * Verifies a ThreatEntryRemovals 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); + /** + * Verifies a Checksum 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 ThreatEntryRemovals message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ThreatEntryRemovals - */ - public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1beta1.ThreatEntryRemovals; + /** + * Creates a Checksum message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Checksum + */ + public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum; - /** - * Creates a plain object from a ThreatEntryRemovals message. Also converts values to other types if specified. - * @param message ThreatEntryRemovals - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.webrisk.v1beta1.ThreatEntryRemovals, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a Checksum message. Also converts values to other types if specified. + * @param message Checksum + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this ThreatEntryRemovals to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this Checksum to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for ThreatEntryRemovals - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Gets the default type url for Checksum + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** ThreatType enum. */ - enum ThreatType { - THREAT_TYPE_UNSPECIFIED = 0, - MALWARE = 1, - SOCIAL_ENGINEERING = 2, - UNWANTED_SOFTWARE = 3 + /** ResponseType enum. */ + enum ResponseType { + RESPONSE_TYPE_UNSPECIFIED = 0, + DIFF = 1, + RESET = 2 + } } - /** CompressionType enum. */ - enum CompressionType { - COMPRESSION_TYPE_UNSPECIFIED = 0, - RAW = 1, - RICE = 2 - } + /** Properties of a SearchUrisRequest. */ + interface ISearchUrisRequest { - /** Properties of a RawIndices. */ - interface IRawIndices { + /** SearchUrisRequest uri */ + uri?: (string|null); - /** RawIndices indices */ - indices?: (number[]|null); + /** SearchUrisRequest threatTypes */ + threatTypes?: (google.cloud.webrisk.v1beta1.ThreatType[]|null); } - /** Represents a RawIndices. */ - class RawIndices implements IRawIndices { + /** Represents a SearchUrisRequest. */ + class SearchUrisRequest implements ISearchUrisRequest { /** - * Constructs a new RawIndices. + * Constructs a new SearchUrisRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.webrisk.v1beta1.IRawIndices); + constructor(properties?: google.cloud.webrisk.v1beta1.ISearchUrisRequest); - /** RawIndices indices. */ - public indices: number[]; + /** SearchUrisRequest uri. */ + public uri: string; + + /** SearchUrisRequest threatTypes. */ + public threatTypes: google.cloud.webrisk.v1beta1.ThreatType[]; /** - * Creates a new RawIndices instance using the specified properties. + * Creates a new SearchUrisRequest instance using the specified properties. * @param [properties] Properties to set - * @returns RawIndices instance + * @returns SearchUrisRequest instance */ - public static create(properties?: google.cloud.webrisk.v1beta1.IRawIndices): google.cloud.webrisk.v1beta1.RawIndices; + public static create(properties?: google.cloud.webrisk.v1beta1.ISearchUrisRequest): google.cloud.webrisk.v1beta1.SearchUrisRequest; /** - * Encodes the specified RawIndices message. Does not implicitly {@link google.cloud.webrisk.v1beta1.RawIndices.verify|verify} messages. - * @param message RawIndices message or plain object to encode + * Encodes the specified SearchUrisRequest message. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchUrisRequest.verify|verify} messages. + * @param message SearchUrisRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.webrisk.v1beta1.IRawIndices, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.webrisk.v1beta1.ISearchUrisRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RawIndices message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.RawIndices.verify|verify} messages. - * @param message RawIndices message or plain object to encode + * Encodes the specified SearchUrisRequest message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchUrisRequest.verify|verify} messages. + * @param message SearchUrisRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.webrisk.v1beta1.IRawIndices, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.webrisk.v1beta1.ISearchUrisRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RawIndices message from the specified reader or buffer. + * Decodes a SearchUrisRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RawIndices + * @returns SearchUrisRequest * @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.webrisk.v1beta1.RawIndices; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.webrisk.v1beta1.SearchUrisRequest; /** - * Decodes a RawIndices message from the specified reader or buffer, length delimited. + * Decodes a SearchUrisRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RawIndices + * @returns SearchUrisRequest * @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.webrisk.v1beta1.RawIndices; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.webrisk.v1beta1.SearchUrisRequest; /** - * Verifies a RawIndices message. + * Verifies a SearchUrisRequest 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 RawIndices message from a plain object. Also converts values to their respective internal types. + * Creates a SearchUrisRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RawIndices + * @returns SearchUrisRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1beta1.RawIndices; + public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1beta1.SearchUrisRequest; /** - * Creates a plain object from a RawIndices message. Also converts values to other types if specified. - * @param message RawIndices + * Creates a plain object from a SearchUrisRequest message. Also converts values to other types if specified. + * @param message SearchUrisRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.webrisk.v1beta1.RawIndices, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.webrisk.v1beta1.SearchUrisRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RawIndices to JSON. + * Converts this SearchUrisRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RawIndices + * Gets the default type url for SearchUrisRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a RawHashes. */ - interface IRawHashes { - - /** RawHashes prefixSize */ - prefixSize?: (number|null); + /** Properties of a SearchUrisResponse. */ + interface ISearchUrisResponse { - /** RawHashes rawHashes */ - rawHashes?: (Uint8Array|string|null); + /** SearchUrisResponse threat */ + threat?: (google.cloud.webrisk.v1beta1.SearchUrisResponse.IThreatUri|null); } - /** Represents a RawHashes. */ - class RawHashes implements IRawHashes { + /** Represents a SearchUrisResponse. */ + class SearchUrisResponse implements ISearchUrisResponse { /** - * Constructs a new RawHashes. + * Constructs a new SearchUrisResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.webrisk.v1beta1.IRawHashes); - - /** RawHashes prefixSize. */ - public prefixSize: number; + constructor(properties?: google.cloud.webrisk.v1beta1.ISearchUrisResponse); - /** RawHashes rawHashes. */ - public rawHashes: (Uint8Array|string); + /** SearchUrisResponse threat. */ + public threat?: (google.cloud.webrisk.v1beta1.SearchUrisResponse.IThreatUri|null); /** - * Creates a new RawHashes instance using the specified properties. + * Creates a new SearchUrisResponse instance using the specified properties. * @param [properties] Properties to set - * @returns RawHashes instance + * @returns SearchUrisResponse instance */ - public static create(properties?: google.cloud.webrisk.v1beta1.IRawHashes): google.cloud.webrisk.v1beta1.RawHashes; + public static create(properties?: google.cloud.webrisk.v1beta1.ISearchUrisResponse): google.cloud.webrisk.v1beta1.SearchUrisResponse; /** - * Encodes the specified RawHashes message. Does not implicitly {@link google.cloud.webrisk.v1beta1.RawHashes.verify|verify} messages. - * @param message RawHashes message or plain object to encode + * Encodes the specified SearchUrisResponse message. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchUrisResponse.verify|verify} messages. + * @param message SearchUrisResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.webrisk.v1beta1.IRawHashes, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.webrisk.v1beta1.ISearchUrisResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RawHashes message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.RawHashes.verify|verify} messages. - * @param message RawHashes message or plain object to encode + * Encodes the specified SearchUrisResponse message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchUrisResponse.verify|verify} messages. + * @param message SearchUrisResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.webrisk.v1beta1.IRawHashes, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.webrisk.v1beta1.ISearchUrisResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RawHashes message from the specified reader or buffer. + * Decodes a SearchUrisResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RawHashes + * @returns SearchUrisResponse * @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.webrisk.v1beta1.RawHashes; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.webrisk.v1beta1.SearchUrisResponse; /** - * Decodes a RawHashes message from the specified reader or buffer, length delimited. + * Decodes a SearchUrisResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RawHashes + * @returns SearchUrisResponse * @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.webrisk.v1beta1.RawHashes; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.webrisk.v1beta1.SearchUrisResponse; /** - * Verifies a RawHashes message. + * Verifies a SearchUrisResponse 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 RawHashes message from a plain object. Also converts values to their respective internal types. + * Creates a SearchUrisResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RawHashes + * @returns SearchUrisResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1beta1.RawHashes; + public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1beta1.SearchUrisResponse; /** - * Creates a plain object from a RawHashes message. Also converts values to other types if specified. - * @param message RawHashes + * Creates a plain object from a SearchUrisResponse message. Also converts values to other types if specified. + * @param message SearchUrisResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.webrisk.v1beta1.RawHashes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.webrisk.v1beta1.SearchUrisResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RawHashes to JSON. + * Converts this SearchUrisResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RawHashes + * Gets the default type url for SearchUrisResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a RiceDeltaEncoding. */ - interface IRiceDeltaEncoding { + namespace SearchUrisResponse { - /** RiceDeltaEncoding firstValue */ - firstValue?: (number|Long|string|null); + /** Properties of a ThreatUri. */ + interface IThreatUri { - /** RiceDeltaEncoding riceParameter */ - riceParameter?: (number|null); + /** ThreatUri threatTypes */ + threatTypes?: (google.cloud.webrisk.v1beta1.ThreatType[]|null); - /** RiceDeltaEncoding entryCount */ - entryCount?: (number|null); + /** ThreatUri expireTime */ + expireTime?: (google.protobuf.ITimestamp|null); + } - /** RiceDeltaEncoding encodedData */ - encodedData?: (Uint8Array|string|null); - } + /** Represents a ThreatUri. */ + class ThreatUri implements IThreatUri { - /** Represents a RiceDeltaEncoding. */ - class RiceDeltaEncoding implements IRiceDeltaEncoding { + /** + * Constructs a new ThreatUri. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.webrisk.v1beta1.SearchUrisResponse.IThreatUri); + + /** ThreatUri threatTypes. */ + public threatTypes: google.cloud.webrisk.v1beta1.ThreatType[]; + + /** ThreatUri expireTime. */ + public expireTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new ThreatUri instance using the specified properties. + * @param [properties] Properties to set + * @returns ThreatUri instance + */ + public static create(properties?: google.cloud.webrisk.v1beta1.SearchUrisResponse.IThreatUri): google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri; + + /** + * Encodes the specified ThreatUri message. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri.verify|verify} messages. + * @param message ThreatUri message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.webrisk.v1beta1.SearchUrisResponse.IThreatUri, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ThreatUri message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri.verify|verify} messages. + * @param message ThreatUri message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.webrisk.v1beta1.SearchUrisResponse.IThreatUri, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ThreatUri message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ThreatUri + * @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.webrisk.v1beta1.SearchUrisResponse.ThreatUri; + + /** + * Decodes a ThreatUri message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ThreatUri + * @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.webrisk.v1beta1.SearchUrisResponse.ThreatUri; + + /** + * Verifies a ThreatUri 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 ThreatUri message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ThreatUri + */ + public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri; + + /** + * Creates a plain object from a ThreatUri message. Also converts values to other types if specified. + * @param message ThreatUri + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ThreatUri to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ThreatUri + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SearchHashesRequest. */ + interface ISearchHashesRequest { + + /** SearchHashesRequest hashPrefix */ + hashPrefix?: (Uint8Array|string|null); + + /** SearchHashesRequest threatTypes */ + threatTypes?: (google.cloud.webrisk.v1beta1.ThreatType[]|null); + } + + /** Represents a SearchHashesRequest. */ + class SearchHashesRequest implements ISearchHashesRequest { /** - * Constructs a new RiceDeltaEncoding. + * Constructs a new SearchHashesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.webrisk.v1beta1.IRiceDeltaEncoding); - - /** RiceDeltaEncoding firstValue. */ - public firstValue: (number|Long|string); - - /** RiceDeltaEncoding riceParameter. */ - public riceParameter: number; + constructor(properties?: google.cloud.webrisk.v1beta1.ISearchHashesRequest); - /** RiceDeltaEncoding entryCount. */ - public entryCount: number; + /** SearchHashesRequest hashPrefix. */ + public hashPrefix: (Uint8Array|string); - /** RiceDeltaEncoding encodedData. */ - public encodedData: (Uint8Array|string); + /** SearchHashesRequest threatTypes. */ + public threatTypes: google.cloud.webrisk.v1beta1.ThreatType[]; /** - * Creates a new RiceDeltaEncoding instance using the specified properties. + * Creates a new SearchHashesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns RiceDeltaEncoding instance + * @returns SearchHashesRequest instance */ - public static create(properties?: google.cloud.webrisk.v1beta1.IRiceDeltaEncoding): google.cloud.webrisk.v1beta1.RiceDeltaEncoding; + public static create(properties?: google.cloud.webrisk.v1beta1.ISearchHashesRequest): google.cloud.webrisk.v1beta1.SearchHashesRequest; /** - * Encodes the specified RiceDeltaEncoding message. Does not implicitly {@link google.cloud.webrisk.v1beta1.RiceDeltaEncoding.verify|verify} messages. - * @param message RiceDeltaEncoding message or plain object to encode + * Encodes the specified SearchHashesRequest message. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchHashesRequest.verify|verify} messages. + * @param message SearchHashesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.webrisk.v1beta1.IRiceDeltaEncoding, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.webrisk.v1beta1.ISearchHashesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RiceDeltaEncoding message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.RiceDeltaEncoding.verify|verify} messages. - * @param message RiceDeltaEncoding message or plain object to encode + * Encodes the specified SearchHashesRequest message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchHashesRequest.verify|verify} messages. + * @param message SearchHashesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.webrisk.v1beta1.IRiceDeltaEncoding, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.webrisk.v1beta1.ISearchHashesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RiceDeltaEncoding message from the specified reader or buffer. + * Decodes a SearchHashesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RiceDeltaEncoding + * @returns SearchHashesRequest * @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.webrisk.v1beta1.RiceDeltaEncoding; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.webrisk.v1beta1.SearchHashesRequest; /** - * Decodes a RiceDeltaEncoding message from the specified reader or buffer, length delimited. + * Decodes a SearchHashesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RiceDeltaEncoding + * @returns SearchHashesRequest * @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.webrisk.v1beta1.RiceDeltaEncoding; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.webrisk.v1beta1.SearchHashesRequest; /** - * Verifies a RiceDeltaEncoding message. + * Verifies a SearchHashesRequest 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 RiceDeltaEncoding message from a plain object. Also converts values to their respective internal types. + * Creates a SearchHashesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RiceDeltaEncoding + * @returns SearchHashesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1beta1.RiceDeltaEncoding; + public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1beta1.SearchHashesRequest; /** - * Creates a plain object from a RiceDeltaEncoding message. Also converts values to other types if specified. - * @param message RiceDeltaEncoding + * Creates a plain object from a SearchHashesRequest message. Also converts values to other types if specified. + * @param message SearchHashesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.webrisk.v1beta1.RiceDeltaEncoding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.webrisk.v1beta1.SearchHashesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RiceDeltaEncoding to JSON. + * Converts this SearchHashesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RiceDeltaEncoding + * Gets the default type url for SearchHashesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - } - } - } - - /** Namespace api. */ - namespace api { - /** Properties of a Http. */ - interface IHttp { + /** Properties of a SearchHashesResponse. */ + interface ISearchHashesResponse { - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); + /** SearchHashesResponse threats */ + threats?: (google.cloud.webrisk.v1beta1.SearchHashesResponse.IThreatHash[]|null); - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); - } + /** SearchHashesResponse negativeExpireTime */ + negativeExpireTime?: (google.protobuf.ITimestamp|null); + } - /** Represents a Http. */ - class Http implements IHttp { + /** Represents a SearchHashesResponse. */ + class SearchHashesResponse implements ISearchHashesResponse { - /** - * Constructs a new Http. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttp); + /** + * Constructs a new SearchHashesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.webrisk.v1beta1.ISearchHashesResponse); - /** Http rules. */ - public rules: google.api.IHttpRule[]; + /** SearchHashesResponse threats. */ + public threats: google.cloud.webrisk.v1beta1.SearchHashesResponse.IThreatHash[]; - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; + /** SearchHashesResponse negativeExpireTime. */ + public negativeExpireTime?: (google.protobuf.ITimestamp|null); - /** - * Creates a new Http instance using the specified properties. - * @param [properties] Properties to set - * @returns Http instance - */ - public static create(properties?: google.api.IHttp): google.api.Http; + /** + * Creates a new SearchHashesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchHashesResponse instance + */ + public static create(properties?: google.cloud.webrisk.v1beta1.ISearchHashesResponse): google.cloud.webrisk.v1beta1.SearchHashesResponse; - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified SearchHashesResponse message. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchHashesResponse.verify|verify} messages. + * @param message SearchHashesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.webrisk.v1beta1.ISearchHashesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified SearchHashesResponse message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchHashesResponse.verify|verify} messages. + * @param message SearchHashesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.webrisk.v1beta1.ISearchHashesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a Http message from the specified reader or buffer. - * @param reader Reader or buffer to decode from + /** + * Decodes a SearchHashesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchHashesResponse + * @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.webrisk.v1beta1.SearchHashesResponse; + + /** + * Decodes a SearchHashesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchHashesResponse + * @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.webrisk.v1beta1.SearchHashesResponse; + + /** + * Verifies a SearchHashesResponse 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 SearchHashesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchHashesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1beta1.SearchHashesResponse; + + /** + * Creates a plain object from a SearchHashesResponse message. Also converts values to other types if specified. + * @param message SearchHashesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.webrisk.v1beta1.SearchHashesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchHashesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchHashesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SearchHashesResponse { + + /** Properties of a ThreatHash. */ + interface IThreatHash { + + /** ThreatHash threatTypes */ + threatTypes?: (google.cloud.webrisk.v1beta1.ThreatType[]|null); + + /** ThreatHash hash */ + hash?: (Uint8Array|string|null); + + /** ThreatHash expireTime */ + expireTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a ThreatHash. */ + class ThreatHash implements IThreatHash { + + /** + * Constructs a new ThreatHash. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.webrisk.v1beta1.SearchHashesResponse.IThreatHash); + + /** ThreatHash threatTypes. */ + public threatTypes: google.cloud.webrisk.v1beta1.ThreatType[]; + + /** ThreatHash hash. */ + public hash: (Uint8Array|string); + + /** ThreatHash expireTime. */ + public expireTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new ThreatHash instance using the specified properties. + * @param [properties] Properties to set + * @returns ThreatHash instance + */ + public static create(properties?: google.cloud.webrisk.v1beta1.SearchHashesResponse.IThreatHash): google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash; + + /** + * Encodes the specified ThreatHash message. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash.verify|verify} messages. + * @param message ThreatHash message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.webrisk.v1beta1.SearchHashesResponse.IThreatHash, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ThreatHash message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash.verify|verify} messages. + * @param message ThreatHash message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.webrisk.v1beta1.SearchHashesResponse.IThreatHash, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ThreatHash message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ThreatHash + * @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.webrisk.v1beta1.SearchHashesResponse.ThreatHash; + + /** + * Decodes a ThreatHash message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ThreatHash + * @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.webrisk.v1beta1.SearchHashesResponse.ThreatHash; + + /** + * Verifies a ThreatHash 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 ThreatHash message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ThreatHash + */ + public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash; + + /** + * Creates a plain object from a ThreatHash message. Also converts values to other types if specified. + * @param message ThreatHash + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ThreatHash to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ThreatHash + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a ThreatEntryAdditions. */ + interface IThreatEntryAdditions { + + /** ThreatEntryAdditions rawHashes */ + rawHashes?: (google.cloud.webrisk.v1beta1.IRawHashes[]|null); + + /** ThreatEntryAdditions riceHashes */ + riceHashes?: (google.cloud.webrisk.v1beta1.IRiceDeltaEncoding|null); + } + + /** Represents a ThreatEntryAdditions. */ + class ThreatEntryAdditions implements IThreatEntryAdditions { + + /** + * Constructs a new ThreatEntryAdditions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.webrisk.v1beta1.IThreatEntryAdditions); + + /** ThreatEntryAdditions rawHashes. */ + public rawHashes: google.cloud.webrisk.v1beta1.IRawHashes[]; + + /** ThreatEntryAdditions riceHashes. */ + public riceHashes?: (google.cloud.webrisk.v1beta1.IRiceDeltaEncoding|null); + + /** + * Creates a new ThreatEntryAdditions instance using the specified properties. + * @param [properties] Properties to set + * @returns ThreatEntryAdditions instance + */ + public static create(properties?: google.cloud.webrisk.v1beta1.IThreatEntryAdditions): google.cloud.webrisk.v1beta1.ThreatEntryAdditions; + + /** + * Encodes the specified ThreatEntryAdditions message. Does not implicitly {@link google.cloud.webrisk.v1beta1.ThreatEntryAdditions.verify|verify} messages. + * @param message ThreatEntryAdditions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.webrisk.v1beta1.IThreatEntryAdditions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ThreatEntryAdditions message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.ThreatEntryAdditions.verify|verify} messages. + * @param message ThreatEntryAdditions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.webrisk.v1beta1.IThreatEntryAdditions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ThreatEntryAdditions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ThreatEntryAdditions + * @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.webrisk.v1beta1.ThreatEntryAdditions; + + /** + * Decodes a ThreatEntryAdditions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ThreatEntryAdditions + * @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.webrisk.v1beta1.ThreatEntryAdditions; + + /** + * Verifies a ThreatEntryAdditions 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 ThreatEntryAdditions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ThreatEntryAdditions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1beta1.ThreatEntryAdditions; + + /** + * Creates a plain object from a ThreatEntryAdditions message. Also converts values to other types if specified. + * @param message ThreatEntryAdditions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.webrisk.v1beta1.ThreatEntryAdditions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ThreatEntryAdditions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ThreatEntryAdditions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ThreatEntryRemovals. */ + interface IThreatEntryRemovals { + + /** ThreatEntryRemovals rawIndices */ + rawIndices?: (google.cloud.webrisk.v1beta1.IRawIndices|null); + + /** ThreatEntryRemovals riceIndices */ + riceIndices?: (google.cloud.webrisk.v1beta1.IRiceDeltaEncoding|null); + } + + /** Represents a ThreatEntryRemovals. */ + class ThreatEntryRemovals implements IThreatEntryRemovals { + + /** + * Constructs a new ThreatEntryRemovals. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.webrisk.v1beta1.IThreatEntryRemovals); + + /** ThreatEntryRemovals rawIndices. */ + public rawIndices?: (google.cloud.webrisk.v1beta1.IRawIndices|null); + + /** ThreatEntryRemovals riceIndices. */ + public riceIndices?: (google.cloud.webrisk.v1beta1.IRiceDeltaEncoding|null); + + /** + * Creates a new ThreatEntryRemovals instance using the specified properties. + * @param [properties] Properties to set + * @returns ThreatEntryRemovals instance + */ + public static create(properties?: google.cloud.webrisk.v1beta1.IThreatEntryRemovals): google.cloud.webrisk.v1beta1.ThreatEntryRemovals; + + /** + * Encodes the specified ThreatEntryRemovals message. Does not implicitly {@link google.cloud.webrisk.v1beta1.ThreatEntryRemovals.verify|verify} messages. + * @param message ThreatEntryRemovals message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.webrisk.v1beta1.IThreatEntryRemovals, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ThreatEntryRemovals message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.ThreatEntryRemovals.verify|verify} messages. + * @param message ThreatEntryRemovals message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.webrisk.v1beta1.IThreatEntryRemovals, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ThreatEntryRemovals message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ThreatEntryRemovals + * @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.webrisk.v1beta1.ThreatEntryRemovals; + + /** + * Decodes a ThreatEntryRemovals message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ThreatEntryRemovals + * @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.webrisk.v1beta1.ThreatEntryRemovals; + + /** + * Verifies a ThreatEntryRemovals 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 ThreatEntryRemovals message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ThreatEntryRemovals + */ + public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1beta1.ThreatEntryRemovals; + + /** + * Creates a plain object from a ThreatEntryRemovals message. Also converts values to other types if specified. + * @param message ThreatEntryRemovals + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.webrisk.v1beta1.ThreatEntryRemovals, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ThreatEntryRemovals to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ThreatEntryRemovals + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** ThreatType enum. */ + enum ThreatType { + THREAT_TYPE_UNSPECIFIED = 0, + MALWARE = 1, + SOCIAL_ENGINEERING = 2, + UNWANTED_SOFTWARE = 3 + } + + /** CompressionType enum. */ + enum CompressionType { + COMPRESSION_TYPE_UNSPECIFIED = 0, + RAW = 1, + RICE = 2 + } + + /** Properties of a RawIndices. */ + interface IRawIndices { + + /** RawIndices indices */ + indices?: (number[]|null); + } + + /** Represents a RawIndices. */ + class RawIndices implements IRawIndices { + + /** + * Constructs a new RawIndices. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.webrisk.v1beta1.IRawIndices); + + /** RawIndices indices. */ + public indices: number[]; + + /** + * Creates a new RawIndices instance using the specified properties. + * @param [properties] Properties to set + * @returns RawIndices instance + */ + public static create(properties?: google.cloud.webrisk.v1beta1.IRawIndices): google.cloud.webrisk.v1beta1.RawIndices; + + /** + * Encodes the specified RawIndices message. Does not implicitly {@link google.cloud.webrisk.v1beta1.RawIndices.verify|verify} messages. + * @param message RawIndices message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.webrisk.v1beta1.IRawIndices, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RawIndices message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.RawIndices.verify|verify} messages. + * @param message RawIndices message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.webrisk.v1beta1.IRawIndices, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RawIndices message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RawIndices + * @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.webrisk.v1beta1.RawIndices; + + /** + * Decodes a RawIndices message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RawIndices + * @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.webrisk.v1beta1.RawIndices; + + /** + * Verifies a RawIndices 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 RawIndices message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RawIndices + */ + public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1beta1.RawIndices; + + /** + * Creates a plain object from a RawIndices message. Also converts values to other types if specified. + * @param message RawIndices + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.webrisk.v1beta1.RawIndices, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RawIndices to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RawIndices + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RawHashes. */ + interface IRawHashes { + + /** RawHashes prefixSize */ + prefixSize?: (number|null); + + /** RawHashes rawHashes */ + rawHashes?: (Uint8Array|string|null); + } + + /** Represents a RawHashes. */ + class RawHashes implements IRawHashes { + + /** + * Constructs a new RawHashes. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.webrisk.v1beta1.IRawHashes); + + /** RawHashes prefixSize. */ + public prefixSize: number; + + /** RawHashes rawHashes. */ + public rawHashes: (Uint8Array|string); + + /** + * Creates a new RawHashes instance using the specified properties. + * @param [properties] Properties to set + * @returns RawHashes instance + */ + public static create(properties?: google.cloud.webrisk.v1beta1.IRawHashes): google.cloud.webrisk.v1beta1.RawHashes; + + /** + * Encodes the specified RawHashes message. Does not implicitly {@link google.cloud.webrisk.v1beta1.RawHashes.verify|verify} messages. + * @param message RawHashes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.webrisk.v1beta1.IRawHashes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RawHashes message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.RawHashes.verify|verify} messages. + * @param message RawHashes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.webrisk.v1beta1.IRawHashes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RawHashes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RawHashes + * @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.webrisk.v1beta1.RawHashes; + + /** + * Decodes a RawHashes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RawHashes + * @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.webrisk.v1beta1.RawHashes; + + /** + * Verifies a RawHashes 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 RawHashes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RawHashes + */ + public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1beta1.RawHashes; + + /** + * Creates a plain object from a RawHashes message. Also converts values to other types if specified. + * @param message RawHashes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.webrisk.v1beta1.RawHashes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RawHashes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RawHashes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RiceDeltaEncoding. */ + interface IRiceDeltaEncoding { + + /** RiceDeltaEncoding firstValue */ + firstValue?: (number|Long|string|null); + + /** RiceDeltaEncoding riceParameter */ + riceParameter?: (number|null); + + /** RiceDeltaEncoding entryCount */ + entryCount?: (number|null); + + /** RiceDeltaEncoding encodedData */ + encodedData?: (Uint8Array|string|null); + } + + /** Represents a RiceDeltaEncoding. */ + class RiceDeltaEncoding implements IRiceDeltaEncoding { + + /** + * Constructs a new RiceDeltaEncoding. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.webrisk.v1beta1.IRiceDeltaEncoding); + + /** RiceDeltaEncoding firstValue. */ + public firstValue: (number|Long|string); + + /** RiceDeltaEncoding riceParameter. */ + public riceParameter: number; + + /** RiceDeltaEncoding entryCount. */ + public entryCount: number; + + /** RiceDeltaEncoding encodedData. */ + public encodedData: (Uint8Array|string); + + /** + * Creates a new RiceDeltaEncoding instance using the specified properties. + * @param [properties] Properties to set + * @returns RiceDeltaEncoding instance + */ + public static create(properties?: google.cloud.webrisk.v1beta1.IRiceDeltaEncoding): google.cloud.webrisk.v1beta1.RiceDeltaEncoding; + + /** + * Encodes the specified RiceDeltaEncoding message. Does not implicitly {@link google.cloud.webrisk.v1beta1.RiceDeltaEncoding.verify|verify} messages. + * @param message RiceDeltaEncoding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.webrisk.v1beta1.IRiceDeltaEncoding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RiceDeltaEncoding message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.RiceDeltaEncoding.verify|verify} messages. + * @param message RiceDeltaEncoding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.webrisk.v1beta1.IRiceDeltaEncoding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RiceDeltaEncoding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RiceDeltaEncoding + * @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.webrisk.v1beta1.RiceDeltaEncoding; + + /** + * Decodes a RiceDeltaEncoding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RiceDeltaEncoding + * @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.webrisk.v1beta1.RiceDeltaEncoding; + + /** + * Verifies a RiceDeltaEncoding 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 RiceDeltaEncoding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RiceDeltaEncoding + */ + public static fromObject(object: { [k: string]: any }): google.cloud.webrisk.v1beta1.RiceDeltaEncoding; + + /** + * Creates a plain object from a RiceDeltaEncoding message. Also converts values to other types if specified. + * @param message RiceDeltaEncoding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.webrisk.v1beta1.RiceDeltaEncoding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RiceDeltaEncoding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RiceDeltaEncoding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @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.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @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.api.Http; + + /** + * Verifies a Http 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 Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @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.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @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.api.HttpRule; + + /** + * Verifies a HttpRule 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 HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @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.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @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.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern 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 CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @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.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @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.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor 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 ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @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.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @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.api.ResourceReference; + + /** + * Verifies a ResourceReference 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 ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @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.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @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.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet 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 FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (string|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** FileDescriptorProto edition. */ + public edition: string; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Http + * @returns FileDescriptorProto * @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.api.Http; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Http + * @returns FileDescriptorProto * @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.api.Http; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto 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 FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @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.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @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.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto 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 DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a Http 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); + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @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.protobuf.DescriptorProto.ExtensionRange; - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Http - */ - public static fromObject(object: { [k: string]: any }): google.api.Http; + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @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.protobuf.DescriptorProto.ExtensionRange; - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies an ExtensionRange 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); - /** - * Converts this Http to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; - /** - * Gets the default type url for Http - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of a HttpRule. */ - interface IHttpRule { + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** HttpRule selector */ - selector?: (string|null); + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** HttpRule get */ - get?: (string|null); + /** Properties of a ReservedRange. */ + interface IReservedRange { - /** HttpRule put */ - put?: (string|null); + /** ReservedRange start */ + start?: (number|null); - /** HttpRule post */ - post?: (string|null); + /** ReservedRange end */ + end?: (number|null); + } - /** HttpRule delete */ - "delete"?: (string|null); + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { - /** HttpRule patch */ - patch?: (string|null); + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); + /** ReservedRange start. */ + public start: number; - /** HttpRule body */ - body?: (string|null); + /** ReservedRange end. */ + public end: number; - /** HttpRule responseBody */ - responseBody?: (string|null); + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); - } + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new HttpRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttpRule); + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @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.protobuf.DescriptorProto.ReservedRange; - /** HttpRule selector. */ - public selector: string; + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @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.protobuf.DescriptorProto.ReservedRange; - /** HttpRule get. */ - public get?: (string|null); + /** + * Verifies a ReservedRange 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); - /** HttpRule put. */ - public put?: (string|null); + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; - /** HttpRule post. */ - public post?: (string|null); + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** HttpRule delete. */ - public delete?: (string|null); + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** HttpRule patch. */ - public patch?: (string|null); + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { - /** HttpRule body. */ - public body: string; + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } - /** HttpRule responseBody. */ - public responseBody: string; + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new ExtensionRangeOptions instance using the specified properties. * @param [properties] Properties to set - * @returns HttpRule instance + * @returns ExtensionRangeOptions instance */ - public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns HttpRule + * @returns ExtensionRangeOptions * @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.api.HttpRule; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns HttpRule + * @returns ExtensionRangeOptions * @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.api.HttpRule; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; /** - * Verifies a HttpRule message. + * Verifies an ExtensionRangeOptions 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 HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns HttpRule + * @returns ExtensionRangeOptions */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this HttpRule to JSON. + * Converts this ExtensionRangeOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for HttpRule + * Gets the default type url for ExtensionRangeOptions * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { - /** CustomHttpPattern kind */ - kind?: (string|null); + /** FieldDescriptorProto name */ + name?: (string|null); - /** CustomHttpPattern path */ - path?: (string|null); + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); } - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { /** - * Constructs a new CustomHttpPattern. + * Constructs a new FieldDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.api.ICustomHttpPattern); + constructor(properties?: google.protobuf.IFieldDescriptorProto); - /** CustomHttpPattern kind. */ - public kind: string; + /** FieldDescriptorProto name. */ + public name: string; - /** CustomHttpPattern path. */ - public path: string; + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * Creates a new FieldDescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns CustomHttpPattern instance + * @returns FieldDescriptorProto instance */ - public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a FieldDescriptorProto message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CustomHttpPattern + * @returns FieldDescriptorProto * @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.api.CustomHttpPattern; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern + * @returns FieldDescriptorProto * @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.api.CustomHttpPattern; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; /** - * Verifies a CustomHttpPattern message. + * Verifies a FieldDescriptorProto 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 CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomHttpPattern + * @returns FieldDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this FieldDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CustomHttpPattern + * Gets the default type url for FieldDescriptorProto * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6, - NON_EMPTY_DEFAULT = 7 - } - - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { - - /** ResourceDescriptor type */ - type?: (string|null); - - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); + namespace FieldDescriptorProto { - /** ResourceDescriptor nameField */ - nameField?: (string|null); + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } - /** ResourceDescriptor plural */ - plural?: (string|null); + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { - /** ResourceDescriptor singular */ - singular?: (string|null); + /** OneofDescriptorProto name */ + name?: (string|null); - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); } - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { /** - * Constructs a new ResourceDescriptor. + * Constructs a new OneofDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.api.IResourceDescriptor); - - /** ResourceDescriptor type. */ - public type: string; - - /** ResourceDescriptor pattern. */ - public pattern: string[]; - - /** ResourceDescriptor nameField. */ - public nameField: string; - - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); - - /** ResourceDescriptor plural. */ - public plural: string; + constructor(properties?: google.protobuf.IOneofDescriptorProto); - /** ResourceDescriptor singular. */ - public singular: string; + /** OneofDescriptorProto name. */ + public name: string; - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); /** - * Creates a new ResourceDescriptor instance using the specified properties. + * Creates a new OneofDescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns ResourceDescriptor instance + * @returns OneofDescriptorProto instance */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * Decodes an OneofDescriptorProto message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ResourceDescriptor + * @returns OneofDescriptorProto * @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.api.ResourceDescriptor; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor + * @returns OneofDescriptorProto * @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.api.ResourceDescriptor; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; /** - * Verifies a ResourceDescriptor message. + * Verifies an OneofDescriptorProto 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 ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResourceDescriptor + * @returns OneofDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResourceDescriptor to JSON. + * Converts this OneofDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ResourceDescriptor + * Gets the default type url for OneofDescriptorProto * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace ResourceDescriptor { + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } + /** EnumDescriptorProto name */ + name?: (string|null); - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } - } + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); - /** Properties of a ResourceReference. */ - interface IResourceReference { + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); - /** ResourceReference type */ - type?: (string|null); + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); - /** ResourceReference childType */ - childType?: (string|null); + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); } - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { /** - * Constructs a new ResourceReference. + * Constructs a new EnumDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.api.IResourceReference); + constructor(properties?: google.protobuf.IEnumDescriptorProto); - /** ResourceReference type. */ - public type: string; + /** EnumDescriptorProto name. */ + public name: string; - /** ResourceReference childType. */ - public childType: string; + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; /** - * Creates a new ResourceReference instance using the specified properties. + * Creates a new EnumDescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns ResourceReference instance + * @returns EnumDescriptorProto instance */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * Decodes an EnumDescriptorProto message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ResourceReference + * @returns EnumDescriptorProto * @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.api.ResourceReference; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResourceReference + * @returns EnumDescriptorProto * @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.api.ResourceReference; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; /** - * Verifies a ResourceReference message. + * Verifies an EnumDescriptorProto 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 ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResourceReference + * @returns EnumDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResourceReference to JSON. + * Converts this EnumDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ResourceReference + * Gets the default type url for EnumDescriptorProto * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - } - /** Namespace protobuf. */ - namespace protobuf { + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @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.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @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.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange 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 EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { + /** EnumValueDescriptorProto number */ + number?: (number|null); - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); } - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { /** - * Constructs a new FileDescriptorSet. + * Constructs a new EnumValueDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IFileDescriptorSet); + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); /** - * Creates a new FileDescriptorSet instance using the specified properties. + * Creates a new EnumValueDescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns FileDescriptorSet instance + * @returns EnumValueDescriptorProto instance */ - public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FileDescriptorSet + * @returns EnumValueDescriptorProto * @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.protobuf.FileDescriptorSet; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FileDescriptorSet + * @returns EnumValueDescriptorProto * @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.protobuf.FileDescriptorSet; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; /** - * Verifies a FileDescriptorSet message. + * Verifies an EnumValueDescriptorProto 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 FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FileDescriptorSet + * @returns EnumValueDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @param message FileDescriptorSet + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FileDescriptorSet to JSON. + * Converts this EnumValueDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FileDescriptorSet + * Gets the default type url for EnumValueDescriptorProto * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FileDescriptorProto. */ - interface IFileDescriptorProto { + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { - /** FileDescriptorProto name */ + /** ServiceDescriptorProto name */ name?: (string|null); - /** FileDescriptorProto package */ - "package"?: (string|null); - - /** FileDescriptorProto dependency */ - dependency?: (string[]|null); - - /** FileDescriptorProto publicDependency */ - publicDependency?: (number[]|null); - - /** FileDescriptorProto weakDependency */ - weakDependency?: (number[]|null); - - /** FileDescriptorProto messageType */ - messageType?: (google.protobuf.IDescriptorProto[]|null); - - /** FileDescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** FileDescriptorProto service */ - service?: (google.protobuf.IServiceDescriptorProto[]|null); - - /** FileDescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** FileDescriptorProto options */ - options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo */ - sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax */ - syntax?: (string|null); + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); - /** FileDescriptorProto edition */ - edition?: (string|null); + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); } - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { /** - * Constructs a new FileDescriptorProto. + * Constructs a new ServiceDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IFileDescriptorProto); + constructor(properties?: google.protobuf.IServiceDescriptorProto); - /** FileDescriptorProto name. */ + /** ServiceDescriptorProto name. */ public name: string; - /** FileDescriptorProto package. */ - public package: string; - - /** FileDescriptorProto dependency. */ - public dependency: string[]; - - /** FileDescriptorProto publicDependency. */ - public publicDependency: number[]; - - /** FileDescriptorProto weakDependency. */ - public weakDependency: number[]; - - /** FileDescriptorProto messageType. */ - public messageType: google.protobuf.IDescriptorProto[]; - - /** FileDescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** FileDescriptorProto service. */ - public service: google.protobuf.IServiceDescriptorProto[]; - - /** FileDescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** FileDescriptorProto options. */ - public options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo. */ - public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax. */ - public syntax: string; + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; - /** FileDescriptorProto edition. */ - public edition: string; + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); /** - * Creates a new FileDescriptorProto instance using the specified properties. + * Creates a new ServiceDescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns FileDescriptorProto instance + * @returns ServiceDescriptorProto instance */ - public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FileDescriptorProto + * @returns ServiceDescriptorProto * @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.protobuf.FileDescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FileDescriptorProto + * @returns ServiceDescriptorProto * @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.protobuf.FileDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; /** - * Verifies a FileDescriptorProto message. + * Verifies a ServiceDescriptorProto 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 FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FileDescriptorProto + * @returns ServiceDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @param message FileDescriptorProto + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FileDescriptorProto to JSON. + * Converts this ServiceDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FileDescriptorProto + * Gets the default type url for ServiceDescriptorProto * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DescriptorProto. */ - interface IDescriptorProto { + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { - /** DescriptorProto name */ + /** MethodDescriptorProto name */ name?: (string|null); - /** DescriptorProto field */ - field?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto nestedType */ - nestedType?: (google.protobuf.IDescriptorProto[]|null); - - /** DescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** DescriptorProto extensionRange */ - extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - - /** DescriptorProto oneofDecl */ - oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + /** MethodDescriptorProto inputType */ + inputType?: (string|null); - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); + /** MethodDescriptorProto outputType */ + outputType?: (string|null); - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); - /** DescriptorProto reservedName */ - reservedName?: (string[]|null); + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); } - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { /** - * Constructs a new DescriptorProto. + * Constructs a new MethodDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IDescriptorProto); + constructor(properties?: google.protobuf.IMethodDescriptorProto); - /** DescriptorProto name. */ + /** MethodDescriptorProto name. */ public name: string; - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; - - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + /** MethodDescriptorProto inputType. */ + public inputType: string; - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + /** MethodDescriptorProto outputType. */ + public outputType: string; - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; - /** DescriptorProto reservedName. */ - public reservedName: string[]; + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; /** - * Creates a new DescriptorProto instance using the specified properties. + * Creates a new MethodDescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns DescriptorProto instance + * @returns MethodDescriptorProto instance */ - public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DescriptorProto message from the specified reader or buffer. + * Decodes a MethodDescriptorProto message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DescriptorProto + * @returns MethodDescriptorProto * @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.protobuf.DescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DescriptorProto + * @returns MethodDescriptorProto * @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.protobuf.DescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; /** - * Verifies a DescriptorProto message. + * Verifies a MethodDescriptorProto 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 DescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DescriptorProto + * @returns MethodDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @param message DescriptorProto + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DescriptorProto to JSON. + * Converts this MethodDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DescriptorProto + * Gets the default type url for MethodDescriptorProto * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace DescriptorProto { + /** Properties of a FileOptions. */ + interface IFileOptions { - /** Properties of an ExtensionRange. */ - interface IExtensionRange { + /** FileOptions javaPackage */ + javaPackage?: (string|null); - /** ExtensionRange start */ - start?: (number|null); + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); - /** ExtensionRange end */ - end?: (number|null); + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); - /** ExtensionRange options */ - options?: (google.protobuf.IExtensionRangeOptions|null); - } + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); - /** - * Constructs a new ExtensionRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); - /** ExtensionRange start. */ - public start: number; + /** FileOptions goPackage */ + goPackage?: (string|null); - /** ExtensionRange end. */ - public end: number; + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); - /** ExtensionRange options. */ - public options?: (google.protobuf.IExtensionRangeOptions|null); + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); - /** - * Creates a new ExtensionRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + /** FileOptions deprecated */ + deprecated?: (boolean|null); - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRange - * @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.protobuf.DescriptorProto.ExtensionRange; + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRange - * @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.protobuf.DescriptorProto.ExtensionRange; + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); - /** - * Verifies an ExtensionRange 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); + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @param message ExtensionRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; - /** - * Converts this ExtensionRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; - /** - * Gets the default type url for ExtensionRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; - /** Properties of a ReservedRange. */ - interface IReservedRange { + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; - /** ReservedRange start */ - start?: (number|null); + /** FileOptions phpNamespace. */ + public phpNamespace: string; - /** ReservedRange end */ - end?: (number|null); - } + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { + /** FileOptions rubyPackage. */ + public rubyPackage: string; - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** ReservedRange start. */ - public start: number; + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; - /** ReservedRange end. */ - public end: number; + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new ReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ReservedRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @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.protobuf.FileOptions; - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @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.protobuf.FileOptions; - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReservedRange - * @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.protobuf.DescriptorProto.ReservedRange; + /** + * Verifies a FileOptions 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); - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReservedRange - * @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.protobuf.DescriptorProto.ReservedRange; + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; - /** - * Verifies a ReservedRange 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 plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @param message ReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Converts this ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + namespace FileOptions { - /** - * Gets the default type url for ReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 } } - /** Properties of an ExtensionRangeOptions. */ - interface IExtensionRangeOptions { + /** Properties of a MessageOptions. */ + interface IMessageOptions { - /** ExtensionRangeOptions uninterpretedOption */ + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); } - /** Represents an ExtensionRangeOptions. */ - class ExtensionRangeOptions implements IExtensionRangeOptions { + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { /** - * Constructs a new ExtensionRangeOptions. + * Constructs a new MessageOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IExtensionRangeOptions); + constructor(properties?: google.protobuf.IMessageOptions); - /** ExtensionRangeOptions uninterpretedOption. */ + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new ExtensionRangeOptions instance using the specified properties. + * Creates a new MessageOptions instance using the specified properties. * @param [properties] Properties to set - * @returns ExtensionRangeOptions instance + * @returns MessageOptions instance */ - public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * Decodes a MessageOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExtensionRangeOptions + * @returns MessageOptions * @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.protobuf.ExtensionRangeOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExtensionRangeOptions + * @returns MessageOptions * @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.protobuf.ExtensionRangeOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; /** - * Verifies an ExtensionRangeOptions message. + * Verifies a MessageOptions 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 ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExtensionRangeOptions + * @returns MessageOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @param message ExtensionRangeOptions + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExtensionRangeOptions to JSON. + * Converts this MessageOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ExtensionRangeOptions + * Gets the default type url for MessageOptions * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { - - /** FieldDescriptorProto name */ - name?: (string|null); + /** Properties of a FieldOptions. */ + interface IFieldOptions { - /** FieldDescriptorProto number */ - number?: (number|null); + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + /** FieldOptions packed */ + packed?: (boolean|null); - /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); - /** FieldDescriptorProto typeName */ - typeName?: (string|null); + /** FieldOptions lazy */ + lazy?: (boolean|null); - /** FieldDescriptorProto extendee */ - extendee?: (string|null); + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); - /** FieldDescriptorProto defaultValue */ - defaultValue?: (string|null); + /** FieldOptions deprecated */ + deprecated?: (boolean|null); - /** FieldDescriptorProto oneofIndex */ - oneofIndex?: (number|null); + /** FieldOptions weak */ + weak?: (boolean|null); - /** FieldDescriptorProto jsonName */ - jsonName?: (string|null); + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** FieldDescriptorProto options */ - options?: (google.protobuf.IFieldOptions|null); + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); - /** FieldDescriptorProto proto3Optional */ - proto3Optional?: (boolean|null); + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); } - /** Represents a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { /** - * Constructs a new FieldDescriptorProto. + * Constructs a new FieldOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); - - /** FieldDescriptorProto name. */ - public name: string; - - /** FieldDescriptorProto number. */ - public number: number; - - /** FieldDescriptorProto label. */ - public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + constructor(properties?: google.protobuf.IFieldOptions); - /** FieldDescriptorProto type. */ - public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); - /** FieldDescriptorProto typeName. */ - public typeName: string; + /** FieldOptions packed. */ + public packed: boolean; - /** FieldDescriptorProto extendee. */ - public extendee: string; + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); - /** FieldDescriptorProto defaultValue. */ - public defaultValue: string; + /** FieldOptions lazy. */ + public lazy: boolean; - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; - /** FieldDescriptorProto jsonName. */ - public jsonName: string; + /** FieldOptions deprecated. */ + public deprecated: boolean; - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); + /** FieldOptions weak. */ + public weak: boolean; - /** FieldDescriptorProto proto3Optional. */ - public proto3Optional: boolean; + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new FieldDescriptorProto instance using the specified properties. + * Creates a new FieldOptions instance using the specified properties. * @param [properties] Properties to set - * @returns FieldDescriptorProto instance + * @returns FieldOptions instance */ - public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * Decodes a FieldOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FieldDescriptorProto + * @returns FieldOptions * @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.protobuf.FieldDescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FieldDescriptorProto + * @returns FieldOptions * @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.protobuf.FieldDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; /** - * Verifies a FieldDescriptorProto message. + * Verifies a FieldOptions 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 FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FieldDescriptorProto + * @returns FieldOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @param message FieldDescriptorProto + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FieldDescriptorProto to JSON. + * Converts this FieldOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FieldDescriptorProto + * Gets the default type url for FieldOptions * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace FieldDescriptorProto { + namespace FieldOptions { - /** Type enum. */ - enum Type { - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - TYPE_GROUP = 10, - TYPE_MESSAGE = 11, - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - TYPE_SINT32 = 17, - TYPE_SINT64 = 18 + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 } - /** Label enum. */ - enum Label { - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3 + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 } } - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { - - /** OneofDescriptorProto name */ - name?: (string|null); + /** Properties of an OneofOptions. */ + interface IOneofOptions { - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|null); + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); } - /** Represents an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { /** - * Constructs a new OneofDescriptorProto. + * Constructs a new OneofOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); - - /** OneofDescriptorProto name. */ - public name: string; + constructor(properties?: google.protobuf.IOneofOptions); - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new OneofDescriptorProto instance using the specified properties. + * Creates a new OneofOptions instance using the specified properties. * @param [properties] Properties to set - * @returns OneofDescriptorProto instance + * @returns OneofOptions instance */ - public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * Decodes an OneofOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OneofDescriptorProto + * @returns OneofOptions * @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.protobuf.OneofDescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OneofDescriptorProto + * @returns OneofOptions * @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.protobuf.OneofDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; /** - * Verifies an OneofDescriptorProto message. + * Verifies an OneofOptions 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 OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OneofDescriptorProto + * @returns OneofOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @param message OneofDescriptorProto + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OneofDescriptorProto to JSON. + * Converts this OneofOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for OneofDescriptorProto + * Gets the default type url for OneofOptions * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an EnumDescriptorProto. */ - interface IEnumDescriptorProto { - - /** EnumDescriptorProto name */ - name?: (string|null); - - /** EnumDescriptorProto value */ - value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + /** Properties of an EnumOptions. */ + interface IEnumOptions { - /** EnumDescriptorProto options */ - options?: (google.protobuf.IEnumOptions|null); + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); - /** EnumDescriptorProto reservedRange */ - reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + /** EnumOptions deprecated */ + deprecated?: (boolean|null); - /** EnumDescriptorProto reservedName */ - reservedName?: (string[]|null); + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); } - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { /** - * Constructs a new EnumDescriptorProto. + * Constructs a new EnumOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); - - /** EnumDescriptorProto name. */ - public name: string; - - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; + constructor(properties?: google.protobuf.IEnumOptions); - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); + /** EnumOptions allowAlias. */ + public allowAlias: boolean; - /** EnumDescriptorProto reservedRange. */ - public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + /** EnumOptions deprecated. */ + public deprecated: boolean; - /** EnumDescriptorProto reservedName. */ - public reservedName: string[]; + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new EnumDescriptorProto instance using the specified properties. + * Creates a new EnumOptions instance using the specified properties. * @param [properties] Properties to set - * @returns EnumDescriptorProto instance + * @returns EnumOptions instance */ - public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * Decodes an EnumOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EnumDescriptorProto + * @returns EnumOptions * @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.protobuf.EnumDescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EnumDescriptorProto + * @returns EnumOptions * @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.protobuf.EnumDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; /** - * Verifies an EnumDescriptorProto message. + * Verifies an EnumOptions 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 EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnumDescriptorProto + * @returns EnumOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnumDescriptorProto to JSON. + * Converts this EnumOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EnumDescriptorProto + * Gets the default type url for EnumOptions * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace EnumDescriptorProto { - - /** Properties of an EnumReservedRange. */ - interface IEnumReservedRange { + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { - /** EnumReservedRange start */ - start?: (number|null); + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); - /** EnumReservedRange end */ - end?: (number|null); - } + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } - /** Represents an EnumReservedRange. */ - class EnumReservedRange implements IEnumReservedRange { + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { - /** - * Constructs a new EnumReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); - /** EnumReservedRange start. */ - public start: number; + /** EnumValueOptions deprecated. */ + public deprecated: boolean; - /** EnumReservedRange end. */ - public end: number; + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumReservedRange instance - */ - public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumReservedRange - * @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.protobuf.EnumDescriptorProto.EnumReservedRange; + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @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.protobuf.EnumValueOptions; - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumReservedRange - * @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.protobuf.EnumDescriptorProto.EnumReservedRange; + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @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.protobuf.EnumValueOptions; - /** - * Verifies an EnumReservedRange 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); + /** + * Verifies an EnumValueOptions 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 EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @param message EnumReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this EnumReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for EnumReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { + /** Properties of a ServiceOptions. */ + interface IServiceOptions { - /** EnumValueDescriptorProto name */ - name?: (string|null); + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); - /** EnumValueDescriptorProto number */ - number?: (number|null); + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); } - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { /** - * Constructs a new EnumValueDescriptorProto. + * Constructs a new ServiceOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - - /** EnumValueDescriptorProto name. */ - public name: string; + constructor(properties?: google.protobuf.IServiceOptions); - /** EnumValueDescriptorProto number. */ - public number: number; + /** ServiceOptions deprecated. */ + public deprecated: boolean; - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. + * Creates a new ServiceOptions instance using the specified properties. * @param [properties] Properties to set - * @returns EnumValueDescriptorProto instance + * @returns ServiceOptions instance */ - public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * Decodes a ServiceOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EnumValueDescriptorProto + * @returns ServiceOptions * @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.protobuf.EnumValueDescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EnumValueDescriptorProto + * @returns ServiceOptions * @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.protobuf.EnumValueDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; /** - * Verifies an EnumValueDescriptorProto message. + * Verifies a ServiceOptions 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 EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnumValueDescriptorProto + * @returns ServiceOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @param message EnumValueDescriptorProto + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnumValueDescriptorProto to JSON. + * Converts this ServiceOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EnumValueDescriptorProto + * Gets the default type url for ServiceOptions * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { + /** Properties of a MethodOptions. */ + interface IMethodOptions { - /** ServiceDescriptorProto name */ - name?: (string|null); + /** MethodOptions deprecated */ + deprecated?: (boolean|null); - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + + /** MethodOptions .google.longrunning.operationInfo */ + ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); } - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { /** - * Constructs a new ServiceDescriptorProto. + * Constructs a new MethodOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); + constructor(properties?: google.protobuf.IMethodOptions); - /** ServiceDescriptorProto name. */ - public name: string; + /** MethodOptions deprecated. */ + public deprecated: boolean; - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new ServiceDescriptorProto instance using the specified properties. + * Creates a new MethodOptions instance using the specified properties. * @param [properties] Properties to set - * @returns ServiceDescriptorProto instance + * @returns MethodOptions instance */ - public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * Decodes a MethodOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ServiceDescriptorProto + * @returns MethodOptions * @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.protobuf.ServiceDescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ServiceDescriptorProto + * @returns MethodOptions * @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.protobuf.ServiceDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; /** - * Verifies a ServiceDescriptorProto message. + * Verifies a MethodOptions 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 ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ServiceDescriptorProto + * @returns MethodOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ServiceDescriptorProto to JSON. + * Converts this MethodOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ServiceDescriptorProto + * Gets the default type url for MethodOptions * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { + namespace MethodOptions { - /** MethodDescriptorProto name */ - name?: (string|null); + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } - /** MethodDescriptorProto inputType */ - inputType?: (string|null); + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { - /** MethodDescriptorProto outputType */ - outputType?: (string|null); + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); } - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { /** - * Constructs a new MethodDescriptorProto. + * Constructs a new UninterpretedOption. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IMethodDescriptorProto); + constructor(properties?: google.protobuf.IUninterpretedOption); - /** MethodDescriptorProto name. */ - public name: string; + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; - /** MethodDescriptorProto inputType. */ - public inputType: string; + /** UninterpretedOption identifierValue. */ + public identifierValue: string; - /** MethodDescriptorProto outputType. */ - public outputType: string; + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; + /** UninterpretedOption doubleValue. */ + public doubleValue: number; - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; /** - * Creates a new MethodDescriptorProto instance using the specified properties. + * Creates a new UninterpretedOption instance using the specified properties. * @param [properties] Properties to set - * @returns MethodDescriptorProto instance + * @returns UninterpretedOption instance */ - public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * Decodes an UninterpretedOption message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MethodDescriptorProto + * @returns UninterpretedOption * @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.protobuf.MethodDescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MethodDescriptorProto + * @returns UninterpretedOption * @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.protobuf.MethodDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; /** - * Verifies a MethodDescriptorProto message. + * Verifies an UninterpretedOption 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 MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MethodDescriptorProto + * @returns UninterpretedOption */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @param message MethodDescriptorProto + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MethodDescriptorProto to JSON. + * Converts this UninterpretedOption to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MethodDescriptorProto + * Gets the default type url for UninterpretedOption * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FileOptions. */ - interface IFileOptions { - - /** FileOptions javaPackage */ - javaPackage?: (string|null); - - /** FileOptions javaOuterClassname */ - javaOuterClassname?: (string|null); - - /** FileOptions javaMultipleFiles */ - javaMultipleFiles?: (boolean|null); - - /** FileOptions javaGenerateEqualsAndHash */ - javaGenerateEqualsAndHash?: (boolean|null); - - /** FileOptions javaStringCheckUtf8 */ - javaStringCheckUtf8?: (boolean|null); - - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); - - /** FileOptions goPackage */ - goPackage?: (string|null); - - /** FileOptions ccGenericServices */ - ccGenericServices?: (boolean|null); - - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); - - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); - - /** FileOptions phpGenericServices */ - phpGenericServices?: (boolean|null); - - /** FileOptions deprecated */ - deprecated?: (boolean|null); - - /** FileOptions ccEnableArenas */ - ccEnableArenas?: (boolean|null); - - /** FileOptions objcClassPrefix */ - objcClassPrefix?: (string|null); - - /** FileOptions csharpNamespace */ - csharpNamespace?: (string|null); - - /** FileOptions swiftPrefix */ - swiftPrefix?: (string|null); - - /** FileOptions phpClassPrefix */ - phpClassPrefix?: (string|null); - - /** FileOptions phpNamespace */ - phpNamespace?: (string|null); - - /** FileOptions phpMetadataNamespace */ - phpMetadataNamespace?: (string|null); - - /** FileOptions rubyPackage */ - rubyPackage?: (string|null); - - /** FileOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FileOptions .google.api.resourceDefinition */ - ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); - } - - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { - - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); + namespace UninterpretedOption { - /** FileOptions javaPackage. */ - public javaPackage: string; + /** Properties of a NamePart. */ + interface INamePart { - /** FileOptions javaOuterClassname. */ - public javaOuterClassname: string; + /** NamePart namePart */ + namePart: string; - /** FileOptions javaMultipleFiles. */ - public javaMultipleFiles: boolean; + /** NamePart isExtension */ + isExtension: boolean; + } - /** FileOptions javaGenerateEqualsAndHash. */ - public javaGenerateEqualsAndHash: boolean; + /** Represents a NamePart. */ + class NamePart implements INamePart { - /** FileOptions javaStringCheckUtf8. */ - public javaStringCheckUtf8: boolean; + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); - /** FileOptions optimizeFor. */ - public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + /** NamePart namePart. */ + public namePart: string; - /** FileOptions goPackage. */ - public goPackage: string; + /** NamePart isExtension. */ + public isExtension: boolean; - /** FileOptions ccGenericServices. */ - public ccGenericServices: boolean; + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - /** FileOptions phpGenericServices. */ - public phpGenericServices: boolean; + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @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.protobuf.UninterpretedOption.NamePart; - /** FileOptions deprecated. */ - public deprecated: boolean; + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @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.protobuf.UninterpretedOption.NamePart; - /** FileOptions ccEnableArenas. */ - public ccEnableArenas: boolean; + /** + * Verifies a NamePart 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); - /** FileOptions objcClassPrefix. */ - public objcClassPrefix: string; + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; - /** FileOptions csharpNamespace. */ - public csharpNamespace: string; + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FileOptions swiftPrefix. */ - public swiftPrefix: string; + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** FileOptions phpClassPrefix. */ - public phpClassPrefix: string; + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } - /** FileOptions phpNamespace. */ - public phpNamespace: string; + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { - /** FileOptions phpMetadataNamespace. */ - public phpMetadataNamespace: string; + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } - /** FileOptions rubyPackage. */ - public rubyPackage: string; + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; /** - * Creates a new FileOptions instance using the specified properties. + * Creates a new SourceCodeInfo instance using the specified properties. * @param [properties] Properties to set - * @returns FileOptions instance + * @returns SourceCodeInfo instance */ - public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FileOptions message from the specified reader or buffer. + * Decodes a SourceCodeInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FileOptions + * @returns SourceCodeInfo * @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.protobuf.FileOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FileOptions + * @returns SourceCodeInfo * @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.protobuf.FileOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; /** - * Verifies a FileOptions message. + * Verifies a SourceCodeInfo 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 FileOptions message from a plain object. Also converts values to their respective internal types. + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FileOptions + * @returns SourceCodeInfo */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @param message FileOptions + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FileOptions to JSON. + * Converts this SourceCodeInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FileOptions + * Gets the default type url for SourceCodeInfo * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace FileOptions { + namespace SourceCodeInfo { - /** OptimizeMode enum. */ - enum OptimizeMode { - SPEED = 1, - CODE_SIZE = 2, - LITE_RUNTIME = 3 + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); } - } - /** Properties of a MessageOptions. */ - interface IMessageOptions { + /** Represents a Location. */ + class Location implements ILocation { - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: (boolean|null); + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: (boolean|null); + /** Location path. */ + public path: number[]; - /** MessageOptions deprecated */ - deprecated?: (boolean|null); + /** Location span. */ + public span: number[]; - /** MessageOptions mapEntry */ - mapEntry?: (boolean|null); + /** Location leadingComments. */ + public leadingComments: string; - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** Location trailingComments. */ + public trailingComments: string; - /** MessageOptions .google.api.resource */ - ".google.api.resource"?: (google.api.IResourceDescriptor|null); + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @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.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @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.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location 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 Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { /** - * Constructs a new MessageOptions. + * Constructs a new GeneratedCodeInfo. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IMessageOptions); - - /** MessageOptions messageSetWireFormat. */ - public messageSetWireFormat: boolean; - - /** MessageOptions noStandardDescriptorAccessor. */ - public noStandardDescriptorAccessor: boolean; - - /** MessageOptions deprecated. */ - public deprecated: boolean; - - /** MessageOptions mapEntry. */ - public mapEntry: boolean; + constructor(properties?: google.protobuf.IGeneratedCodeInfo); - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; /** - * Creates a new MessageOptions instance using the specified properties. + * Creates a new GeneratedCodeInfo instance using the specified properties. * @param [properties] Properties to set - * @returns MessageOptions instance + * @returns GeneratedCodeInfo instance */ - public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MessageOptions message from the specified reader or buffer. + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MessageOptions + * @returns GeneratedCodeInfo * @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.protobuf.MessageOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MessageOptions + * @returns GeneratedCodeInfo * @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.protobuf.MessageOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; /** - * Verifies a MessageOptions message. + * Verifies a GeneratedCodeInfo 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 MessageOptions message from a plain object. Also converts values to their respective internal types. + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MessageOptions + * @returns GeneratedCodeInfo */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @param message MessageOptions + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MessageOptions to JSON. + * Converts this GeneratedCodeInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MessageOptions + * Gets the default type url for GeneratedCodeInfo * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FieldOptions. */ - interface IFieldOptions { + namespace GeneratedCodeInfo { - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + /** Properties of an Annotation. */ + interface IAnnotation { - /** FieldOptions packed */ - packed?: (boolean|null); + /** Annotation path */ + path?: (number[]|null); - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + /** Annotation sourceFile */ + sourceFile?: (string|null); - /** FieldOptions lazy */ - lazy?: (boolean|null); + /** Annotation begin */ + begin?: (number|null); - /** FieldOptions unverifiedLazy */ - unverifiedLazy?: (boolean|null); + /** Annotation end */ + end?: (number|null); - /** FieldOptions deprecated */ - deprecated?: (boolean|null); + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } - /** FieldOptions weak */ - weak?: (boolean|null); + /** Represents an Annotation. */ + class Annotation implements IAnnotation { - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); - /** FieldOptions .google.api.fieldBehavior */ - ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + /** Annotation path. */ + public path: number[]; - /** FieldOptions .google.api.resourceReference */ - ".google.api.resourceReference"?: (google.api.IResourceReference|null); - } + /** Annotation sourceFile. */ + public sourceFile: string; - /** Represents a FieldOptions. */ - class FieldOptions implements IFieldOptions { + /** Annotation begin. */ + public begin: number; - /** - * Constructs a new FieldOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldOptions); + /** Annotation end. */ + public end: number; - /** FieldOptions ctype. */ - public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); - /** FieldOptions packed. */ - public packed: boolean; + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; - /** FieldOptions jstype. */ - public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - /** FieldOptions lazy. */ - public lazy: boolean; + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - /** FieldOptions unverifiedLazy. */ - public unverifiedLazy: boolean; + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @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.protobuf.GeneratedCodeInfo.Annotation; - /** FieldOptions deprecated. */ - public deprecated: boolean; + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @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.protobuf.GeneratedCodeInfo.Annotation; - /** FieldOptions weak. */ - public weak: boolean; + /** + * Verifies an Annotation 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); - /** FieldOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } + } + } + + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|string|null); + } + + /** Represents an Any. */ + class Any implements IAny { /** - * Creates a new FieldOptions instance using the specified properties. + * Constructs a new Any. * @param [properties] Properties to set - * @returns FieldOptions instance */ - public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: (Uint8Array|string); /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FieldOptions message from the specified reader or buffer. + * Decodes an Any message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FieldOptions + * @returns Any * @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.protobuf.FieldOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * Decodes an Any message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FieldOptions + * @returns Any * @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.protobuf.FieldOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; /** - * Verifies a FieldOptions message. + * Verifies an Any 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 FieldOptions message from a plain object. Also converts values to their respective internal types. + * Creates an Any message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FieldOptions + * @returns Any */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @param message FieldOptions + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FieldOptions to JSON. + * Converts this Any to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FieldOptions + * Gets the default type url for Any * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace FieldOptions { - - /** CType enum. */ - enum CType { - STRING = 0, - CORD = 1, - STRING_PIECE = 2 - } - - /** JSType enum. */ - enum JSType { - JS_NORMAL = 0, - JS_STRING = 1, - JS_NUMBER = 2 - } - } + /** Properties of a Duration. */ + interface IDuration { - /** Properties of an OneofOptions. */ - interface IOneofOptions { + /** Duration seconds */ + seconds?: (number|Long|string|null); - /** OneofOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** Duration nanos */ + nanos?: (number|null); } - /** Represents an OneofOptions. */ - class OneofOptions implements IOneofOptions { + /** Represents a Duration. */ + class Duration implements IDuration { /** - * Constructs a new OneofOptions. + * Constructs a new Duration. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IOneofOptions); + constructor(properties?: google.protobuf.IDuration); - /** OneofOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; /** - * Creates a new OneofOptions instance using the specified properties. + * Creates a new Duration instance using the specified properties. * @param [properties] Properties to set - * @returns OneofOptions instance + * @returns Duration instance */ - public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OneofOptions message from the specified reader or buffer. + * Decodes a Duration message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OneofOptions + * @returns Duration * @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.protobuf.OneofOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * Decodes a Duration message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OneofOptions + * @returns Duration * @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.protobuf.OneofOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; /** - * Verifies an OneofOptions message. + * Verifies a Duration 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 OneofOptions message from a plain object. Also converts values to their respective internal types. + * Creates a Duration message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OneofOptions + * @returns Duration */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @param message OneofOptions + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OneofOptions to JSON. + * Converts this Duration to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for OneofOptions + * Gets the default type url for Duration * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an EnumOptions. */ - interface IEnumOptions { - - /** EnumOptions allowAlias */ - allowAlias?: (boolean|null); - - /** EnumOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** Properties of an Empty. */ + interface IEmpty { } - /** Represents an EnumOptions. */ - class EnumOptions implements IEnumOptions { + /** Represents an Empty. */ + class Empty implements IEmpty { /** - * Constructs a new EnumOptions. + * Constructs a new Empty. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IEnumOptions); - - /** EnumOptions allowAlias. */ - public allowAlias: boolean; - - /** EnumOptions deprecated. */ - public deprecated: boolean; - - /** EnumOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + constructor(properties?: google.protobuf.IEmpty); /** - * Creates a new EnumOptions instance using the specified properties. + * Creates a new Empty instance using the specified properties. * @param [properties] Properties to set - * @returns EnumOptions instance + * @returns Empty instance */ - public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EnumOptions message from the specified reader or buffer. + * Decodes an Empty message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EnumOptions + * @returns Empty * @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.protobuf.EnumOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * Decodes an Empty message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EnumOptions + * @returns Empty * @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.protobuf.EnumOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; /** - * Verifies an EnumOptions message. + * Verifies an Empty 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 EnumOptions message from a plain object. Also converts values to their respective internal types. + * Creates an Empty message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnumOptions + * @returns Empty */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @param message EnumOptions + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnumOptions to JSON. + * Converts this Empty to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EnumOptions + * Gets the default type url for Empty * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an EnumValueOptions. */ - interface IEnumValueOptions { + /** Properties of a Timestamp. */ + interface ITimestamp { - /** EnumValueOptions deprecated */ - deprecated?: (boolean|null); + /** Timestamp seconds */ + seconds?: (number|Long|string|null); - /** EnumValueOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** Timestamp nanos */ + nanos?: (number|null); } - /** Represents an EnumValueOptions. */ - class EnumValueOptions implements IEnumValueOptions { + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { /** - * Constructs a new EnumValueOptions. + * Constructs a new Timestamp. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IEnumValueOptions); + constructor(properties?: google.protobuf.ITimestamp); - /** EnumValueOptions deprecated. */ - public deprecated: boolean; + /** Timestamp seconds. */ + public seconds: (number|Long|string); - /** EnumValueOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** Timestamp nanos. */ + public nanos: number; /** - * Creates a new EnumValueOptions instance using the specified properties. + * Creates a new Timestamp instance using the specified properties. * @param [properties] Properties to set - * @returns EnumValueOptions instance + * @returns Timestamp instance */ - public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EnumValueOptions message from the specified reader or buffer. + * Decodes a Timestamp message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EnumValueOptions + * @returns Timestamp * @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.protobuf.EnumValueOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * Decodes a Timestamp message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EnumValueOptions + * @returns Timestamp * @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.protobuf.EnumValueOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; /** - * Verifies an EnumValueOptions message. + * Verifies a Timestamp 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 EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnumValueOptions + * @returns Timestamp */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @param message EnumValueOptions + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnumValueOptions to JSON. + * Converts this Timestamp to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EnumValueOptions + * Gets the default type url for Timestamp * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } + } - /** Properties of a ServiceOptions. */ - interface IServiceOptions { - - /** ServiceOptions deprecated */ - deprecated?: (boolean|null); + /** Namespace longrunning. */ + namespace longrunning { - /** ServiceOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** Represents an Operations */ + class Operations extends $protobuf.rpc.Service { - /** ServiceOptions .google.api.defaultHost */ - ".google.api.defaultHost"?: (string|null); + /** + * Constructs a new Operations 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); - /** ServiceOptions .google.api.oauthScopes */ - ".google.api.oauthScopes"?: (string|null); - } + /** + * Creates new Operations 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): Operations; - /** Represents a ServiceOptions. */ - class ServiceOptions implements IServiceOptions { + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOperationsResponse + */ + public listOperations(request: google.longrunning.IListOperationsRequest, callback: google.longrunning.Operations.ListOperationsCallback): void; /** - * Constructs a new ServiceOptions. - * @param [properties] Properties to set + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @returns Promise */ - constructor(properties?: google.protobuf.IServiceOptions); + public listOperations(request: google.longrunning.IListOperationsRequest): Promise; - /** ServiceOptions deprecated. */ - public deprecated: boolean; + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public getOperation(request: google.longrunning.IGetOperationRequest, callback: google.longrunning.Operations.GetOperationCallback): void; - /** ServiceOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @returns Promise + */ + public getOperation(request: google.longrunning.IGetOperationRequest): Promise; /** - * Creates a new ServiceOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceOptions instance + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + public deleteOperation(request: google.longrunning.IDeleteOperationRequest, callback: google.longrunning.Operations.DeleteOperationCallback): void; /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @returns Promise */ - public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty */ - public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public cancelOperation(request: google.longrunning.ICancelOperationRequest, callback: google.longrunning.Operations.CancelOperationCallback): void; /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + public waitOperation(request: google.longrunning.IWaitOperationRequest, callback: google.longrunning.Operations.WaitOperationCallback): void; /** - * Verifies a ServiceOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; + } + + namespace Operations { /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceOptions + * Callback as used by {@link google.longrunning.Operations|listOperations}. + * @param error Error, if any + * @param [response] ListOperationsResponse + */ + type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|getOperation}. + * @param error Error, if any + * @param [response] Operation */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @param message ServiceOptions - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. + * @param error Error, if any + * @param [response] Empty */ - public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Converts this ServiceOptions to JSON. - * @returns JSON object + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. + * @param error Error, if any + * @param [response] Empty */ - public toJSON(): { [k: string]: any }; + type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Gets the default type url for ServiceOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Callback as used by {@link google.longrunning.Operations|waitOperation}. + * @param error Error, if any + * @param [response] Operation */ - public static getTypeUrl(typeUrlPrefix?: string): string; + type WaitOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; } - /** Properties of a MethodOptions. */ - interface IMethodOptions { + /** Properties of an Operation. */ + interface IOperation { - /** MethodOptions deprecated */ - deprecated?: (boolean|null); + /** Operation name */ + name?: (string|null); - /** MethodOptions idempotencyLevel */ - idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + /** Operation metadata */ + metadata?: (google.protobuf.IAny|null); - /** MethodOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** Operation done */ + done?: (boolean|null); - /** MethodOptions .google.api.http */ - ".google.api.http"?: (google.api.IHttpRule|null); + /** Operation error */ + error?: (google.rpc.IStatus|null); - /** MethodOptions .google.api.methodSignature */ - ".google.api.methodSignature"?: (string[]|null); + /** Operation response */ + response?: (google.protobuf.IAny|null); } - /** Represents a MethodOptions. */ - class MethodOptions implements IMethodOptions { + /** Represents an Operation. */ + class Operation implements IOperation { /** - * Constructs a new MethodOptions. + * Constructs a new Operation. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IMethodOptions); + constructor(properties?: google.longrunning.IOperation); - /** MethodOptions deprecated. */ - public deprecated: boolean; + /** Operation name. */ + public name: string; - /** MethodOptions idempotencyLevel. */ - public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + /** Operation metadata. */ + public metadata?: (google.protobuf.IAny|null); - /** MethodOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** Operation done. */ + public done: boolean; + + /** Operation error. */ + public error?: (google.rpc.IStatus|null); + + /** Operation response. */ + public response?: (google.protobuf.IAny|null); + + /** Operation result. */ + public result?: ("error"|"response"); /** - * Creates a new MethodOptions instance using the specified properties. + * Creates a new Operation instance using the specified properties. * @param [properties] Properties to set - * @returns MethodOptions instance + * @returns Operation instance */ - public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + public static create(properties?: google.longrunning.IOperation): google.longrunning.Operation; /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MethodOptions message from the specified reader or buffer. + * Decodes an Operation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MethodOptions + * @returns Operation * @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.protobuf.MethodOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.Operation; /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * Decodes an Operation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MethodOptions + * @returns Operation * @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.protobuf.MethodOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.Operation; /** - * Verifies a MethodOptions message. + * Verifies an Operation 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 MethodOptions message from a plain object. Also converts values to their respective internal types. + * Creates an Operation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MethodOptions + * @returns Operation */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + public static fromObject(object: { [k: string]: any }): google.longrunning.Operation; /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @param message MethodOptions + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @param message Operation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.longrunning.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MethodOptions to JSON. + * Converts this Operation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MethodOptions + * Gets the default type url for Operation * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace MethodOptions { - - /** IdempotencyLevel enum. */ - enum IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - NO_SIDE_EFFECTS = 1, - IDEMPOTENT = 2 - } - } - - /** Properties of an UninterpretedOption. */ - interface IUninterpretedOption { - - /** UninterpretedOption name */ - name?: (google.protobuf.UninterpretedOption.INamePart[]|null); - - /** UninterpretedOption identifierValue */ - identifierValue?: (string|null); - - /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|Long|string|null); - - /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|Long|string|null); - - /** UninterpretedOption doubleValue */ - doubleValue?: (number|null); - - /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|string|null); + /** Properties of a GetOperationRequest. */ + interface IGetOperationRequest { - /** UninterpretedOption aggregateValue */ - aggregateValue?: (string|null); + /** GetOperationRequest name */ + name?: (string|null); } - /** Represents an UninterpretedOption. */ - class UninterpretedOption implements IUninterpretedOption { + /** Represents a GetOperationRequest. */ + class GetOperationRequest implements IGetOperationRequest { /** - * Constructs a new UninterpretedOption. + * Constructs a new GetOperationRequest. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IUninterpretedOption); - - /** UninterpretedOption name. */ - public name: google.protobuf.UninterpretedOption.INamePart[]; - - /** UninterpretedOption identifierValue. */ - public identifierValue: string; - - /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|Long|string); + constructor(properties?: google.longrunning.IGetOperationRequest); - /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|Long|string); - - /** UninterpretedOption doubleValue. */ - public doubleValue: number; - - /** UninterpretedOption stringValue. */ - public stringValue: (Uint8Array|string); - - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; + /** GetOperationRequest name. */ + public name: string; /** - * Creates a new UninterpretedOption instance using the specified properties. + * Creates a new GetOperationRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UninterpretedOption instance + * @returns GetOperationRequest instance */ - public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UninterpretedOption message from the specified reader or buffer. + * Decodes a GetOperationRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UninterpretedOption + * @returns GetOperationRequest * @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.protobuf.UninterpretedOption; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.GetOperationRequest; /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UninterpretedOption + * @returns GetOperationRequest * @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.protobuf.UninterpretedOption; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.GetOperationRequest; /** - * Verifies an UninterpretedOption message. + * Verifies a GetOperationRequest 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 UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UninterpretedOption + * @returns GetOperationRequest */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @param message UninterpretedOption + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @param message GetOperationRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UninterpretedOption to JSON. + * Converts this GetOperationRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UninterpretedOption + * Gets the default type url for GetOperationRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace UninterpretedOption { + /** Properties of a ListOperationsRequest. */ + interface IListOperationsRequest { - /** Properties of a NamePart. */ - interface INamePart { + /** ListOperationsRequest name */ + name?: (string|null); - /** NamePart namePart */ - namePart: string; + /** ListOperationsRequest filter */ + filter?: (string|null); - /** NamePart isExtension */ - isExtension: boolean; - } + /** ListOperationsRequest pageSize */ + pageSize?: (number|null); - /** Represents a NamePart. */ - class NamePart implements INamePart { + /** ListOperationsRequest pageToken */ + pageToken?: (string|null); + } - /** - * Constructs a new NamePart. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + /** Represents a ListOperationsRequest. */ + class ListOperationsRequest implements IListOperationsRequest { - /** NamePart namePart. */ - public namePart: string; + /** + * Constructs a new ListOperationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsRequest); - /** NamePart isExtension. */ - public isExtension: boolean; + /** ListOperationsRequest name. */ + public name: string; - /** - * Creates a new NamePart instance using the specified properties. - * @param [properties] Properties to set - * @returns NamePart instance - */ - public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + /** ListOperationsRequest filter. */ + public filter: string; - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListOperationsRequest pageSize. */ + public pageSize: number; - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + /** ListOperationsRequest pageToken. */ + public pageToken: string; - /** - * Decodes a NamePart message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamePart - * @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.protobuf.UninterpretedOption.NamePart; + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsRequest instance + */ + public static create(properties?: google.longrunning.IListOperationsRequest): google.longrunning.ListOperationsRequest; - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamePart - * @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.protobuf.UninterpretedOption.NamePart; + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a NamePart 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); + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamePart - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsRequest + * @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.longrunning.ListOperationsRequest; - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @param message NamePart - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsRequest + * @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.longrunning.ListOperationsRequest; + + /** + * Verifies a ListOperationsRequest 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); - /** - * Converts this NamePart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsRequest; - /** - * Gets the default type url for NamePart - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @param message ListOperationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SourceCodeInfo. */ - interface ISourceCodeInfo { + /** Properties of a ListOperationsResponse. */ + interface IListOperationsResponse { - /** SourceCodeInfo location */ - location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + /** ListOperationsResponse operations */ + operations?: (google.longrunning.IOperation[]|null); + + /** ListOperationsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents a SourceCodeInfo. */ - class SourceCodeInfo implements ISourceCodeInfo { + /** Represents a ListOperationsResponse. */ + class ListOperationsResponse implements IListOperationsResponse { /** - * Constructs a new SourceCodeInfo. + * Constructs a new ListOperationsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.ISourceCodeInfo); + constructor(properties?: google.longrunning.IListOperationsResponse); - /** SourceCodeInfo location. */ - public location: google.protobuf.SourceCodeInfo.ILocation[]; + /** ListOperationsResponse operations. */ + public operations: google.longrunning.IOperation[]; + + /** ListOperationsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new SourceCodeInfo instance using the specified properties. + * Creates a new ListOperationsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns SourceCodeInfo instance + * @returns ListOperationsResponse instance */ - public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. + * Decodes a ListOperationsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SourceCodeInfo + * @returns ListOperationsResponse * @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.protobuf.SourceCodeInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsResponse; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SourceCodeInfo + * @returns ListOperationsResponse * @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.protobuf.SourceCodeInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsResponse; /** - * Verifies a SourceCodeInfo message. + * Verifies a ListOperationsResponse 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 SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SourceCodeInfo + * @returns ListOperationsResponse */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @param message SourceCodeInfo + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @param message ListOperationsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SourceCodeInfo to JSON. + * Converts this ListOperationsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SourceCodeInfo + * Gets the default type url for ListOperationsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace SourceCodeInfo { + /** Properties of a CancelOperationRequest. */ + interface ICancelOperationRequest { - /** Properties of a Location. */ - interface ILocation { + /** CancelOperationRequest name */ + name?: (string|null); + } - /** Location path */ - path?: (number[]|null); + /** Represents a CancelOperationRequest. */ + class CancelOperationRequest implements ICancelOperationRequest { - /** Location span */ - span?: (number[]|null); + /** + * Constructs a new CancelOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.ICancelOperationRequest); - /** Location leadingComments */ - leadingComments?: (string|null); + /** CancelOperationRequest name. */ + public name: string; - /** Location trailingComments */ - trailingComments?: (string|null); + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelOperationRequest instance + */ + public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; - /** Location leadingDetachedComments */ - leadingDetachedComments?: (string[]|null); - } + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a Location. */ - class Location implements ILocation { + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new Location. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelOperationRequest + * @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.longrunning.CancelOperationRequest; - /** Location path. */ - public path: number[]; + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelOperationRequest + * @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.longrunning.CancelOperationRequest; - /** Location span. */ - public span: number[]; + /** + * Verifies a CancelOperationRequest 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); - /** Location leadingComments. */ - public leadingComments: string; + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; - /** Location trailingComments. */ - public trailingComments: string; + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @param message CancelOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Location leadingDetachedComments. */ - public leadingDetachedComments: string[]; + /** + * Converts this CancelOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a new Location instance using the specified properties. - * @param [properties] Properties to set - * @returns Location instance - */ - public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + /** + * Gets the default type url for CancelOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of a DeleteOperationRequest. */ + interface IDeleteOperationRequest { - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + /** DeleteOperationRequest name */ + name?: (string|null); + } - /** - * Decodes a Location message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Location - * @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.protobuf.SourceCodeInfo.Location; + /** Represents a DeleteOperationRequest. */ + class DeleteOperationRequest implements IDeleteOperationRequest { - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Location - * @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.protobuf.SourceCodeInfo.Location; + /** + * Constructs a new DeleteOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IDeleteOperationRequest); - /** - * Verifies a Location 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); + /** DeleteOperationRequest name. */ + public name: string; - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Location - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteOperationRequest instance + */ + public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @param message Location - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this Location to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteOperationRequest + * @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.longrunning.DeleteOperationRequest; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteOperationRequest + * @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.longrunning.DeleteOperationRequest; + + /** + * Verifies a DeleteOperationRequest 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 DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @param message DeleteOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for Location - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Gets the default type url for DeleteOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GeneratedCodeInfo. */ - interface IGeneratedCodeInfo { + /** Properties of a WaitOperationRequest. */ + interface IWaitOperationRequest { - /** GeneratedCodeInfo annotation */ - annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + /** WaitOperationRequest name */ + name?: (string|null); + + /** WaitOperationRequest timeout */ + timeout?: (google.protobuf.IDuration|null); } - /** Represents a GeneratedCodeInfo. */ - class GeneratedCodeInfo implements IGeneratedCodeInfo { + /** Represents a WaitOperationRequest. */ + class WaitOperationRequest implements IWaitOperationRequest { /** - * Constructs a new GeneratedCodeInfo. + * Constructs a new WaitOperationRequest. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IGeneratedCodeInfo); + constructor(properties?: google.longrunning.IWaitOperationRequest); - /** GeneratedCodeInfo annotation. */ - public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + /** WaitOperationRequest name. */ + public name: string; + + /** WaitOperationRequest timeout. */ + public timeout?: (google.protobuf.IDuration|null); /** - * Creates a new GeneratedCodeInfo instance using the specified properties. + * Creates a new WaitOperationRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GeneratedCodeInfo instance + * @returns WaitOperationRequest instance */ - public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * Decodes a WaitOperationRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GeneratedCodeInfo + * @returns WaitOperationRequest * @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.protobuf.GeneratedCodeInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.WaitOperationRequest; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GeneratedCodeInfo + * @returns WaitOperationRequest * @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.protobuf.GeneratedCodeInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.WaitOperationRequest; /** - * Verifies a GeneratedCodeInfo message. + * Verifies a WaitOperationRequest 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 GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GeneratedCodeInfo + * @returns WaitOperationRequest */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @param message GeneratedCodeInfo + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @param message WaitOperationRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GeneratedCodeInfo to JSON. + * Converts this WaitOperationRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GeneratedCodeInfo + * Gets the default type url for WaitOperationRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace GeneratedCodeInfo { - - /** Properties of an Annotation. */ - interface IAnnotation { - - /** Annotation path */ - path?: (number[]|null); - - /** Annotation sourceFile */ - sourceFile?: (string|null); - - /** Annotation begin */ - begin?: (number|null); - - /** Annotation end */ - end?: (number|null); - - /** Annotation semantic */ - semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); - } - - /** Represents an Annotation. */ - class Annotation implements IAnnotation { + /** Properties of an OperationInfo. */ + interface IOperationInfo { - /** - * Constructs a new Annotation. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + /** OperationInfo responseType */ + responseType?: (string|null); - /** Annotation path. */ - public path: number[]; + /** OperationInfo metadataType */ + metadataType?: (string|null); + } - /** Annotation sourceFile. */ - public sourceFile: string; + /** Represents an OperationInfo. */ + class OperationInfo implements IOperationInfo { - /** Annotation begin. */ - public begin: number; + /** + * Constructs a new OperationInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperationInfo); - /** Annotation end. */ - public end: number; + /** OperationInfo responseType. */ + public responseType: string; - /** Annotation semantic. */ - public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + /** OperationInfo metadataType. */ + public metadataType: string; - /** - * Creates a new Annotation instance using the specified properties. - * @param [properties] Properties to set - * @returns Annotation instance - */ - public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + /** + * Creates a new OperationInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationInfo instance + */ + public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an Annotation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Annotation - * @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.protobuf.GeneratedCodeInfo.Annotation; + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationInfo + * @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.longrunning.OperationInfo; - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Annotation - * @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.protobuf.GeneratedCodeInfo.Annotation; + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationInfo + * @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.longrunning.OperationInfo; - /** - * Verifies an Annotation 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); + /** + * Verifies an OperationInfo 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 Annotation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Annotation - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationInfo + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @param message Annotation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @param message OperationInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this Annotation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this OperationInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for Annotation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Gets the default type url for OperationInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } - namespace Annotation { + /** Namespace rpc. */ + namespace rpc { - /** Semantic enum. */ - enum Semantic { - NONE = 0, - SET = 1, - ALIAS = 2 - } - } - } + /** Properties of a Status. */ + interface IStatus { - /** Properties of a Timestamp. */ - interface ITimestamp { + /** Status code */ + code?: (number|null); - /** Timestamp seconds */ - seconds?: (number|Long|string|null); + /** Status message */ + message?: (string|null); - /** Timestamp nanos */ - nanos?: (number|null); + /** Status details */ + details?: (google.protobuf.IAny[]|null); } - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { + /** Represents a Status. */ + class Status implements IStatus { /** - * Constructs a new Timestamp. + * Constructs a new Status. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.ITimestamp); + constructor(properties?: google.rpc.IStatus); - /** Timestamp seconds. */ - public seconds: (number|Long|string); + /** Status code. */ + public code: number; - /** Timestamp nanos. */ - public nanos: number; + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; /** - * Creates a new Timestamp instance using the specified properties. + * Creates a new Status instance using the specified properties. * @param [properties] Properties to set - * @returns Timestamp instance + * @returns Status instance */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + public static create(properties?: google.rpc.IStatus): google.rpc.Status; /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode + * 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.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode + * 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.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Timestamp message from the specified reader or buffer. + * 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 Timestamp + * @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.protobuf.Timestamp; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * Decodes a Status message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Timestamp + * @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.protobuf.Timestamp; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; /** - * Verifies a Timestamp message. + * 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 Timestamp message from a plain object. Also converts values to their respective internal types. + * Creates a Status message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Timestamp + * @returns Status */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + public static fromObject(object: { [k: string]: any }): google.rpc.Status; /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp + * 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.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Timestamp to JSON. + * Converts this Status to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Timestamp + * Gets the default type url for Status * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ diff --git a/packages/google-cloud-webrisk/protos/protos.js b/packages/google-cloud-webrisk/protos/protos.js index 271aa28cd3b..f50d2551a1b 100644 --- a/packages/google-cloud-webrisk/protos/protos.js +++ b/packages/google-cloud-webrisk/protos/protos.js @@ -230,6 +230,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.webrisk.v1.WebRiskService|submitUri}. + * @memberof google.cloud.webrisk.v1.WebRiskService + * @typedef SubmitUriCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls SubmitUri. + * @function submitUri + * @memberof google.cloud.webrisk.v1.WebRiskService + * @instance + * @param {google.cloud.webrisk.v1.ISubmitUriRequest} request SubmitUriRequest message or plain object + * @param {google.cloud.webrisk.v1.WebRiskService.SubmitUriCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(WebRiskService.prototype.submitUri = function submitUri(request, callback) { + return this.rpcCall(submitUri, $root.google.cloud.webrisk.v1.SubmitUriRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "SubmitUri" }); + + /** + * Calls SubmitUri. + * @function submitUri + * @memberof google.cloud.webrisk.v1.WebRiskService + * @instance + * @param {google.cloud.webrisk.v1.ISubmitUriRequest} request SubmitUriRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return WebRiskService; })(); @@ -4375,6 +4408,7 @@ * @memberof google.cloud.webrisk.v1 * @interface ISubmission * @property {string|null} [uri] Submission uri + * @property {Array.|null} [threatTypes] Submission threatTypes */ /** @@ -4386,6 +4420,7 @@ * @param {google.cloud.webrisk.v1.ISubmission=} [properties] Properties to set */ function Submission(properties) { + this.threatTypes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4400,6 +4435,14 @@ */ Submission.prototype.uri = ""; + /** + * Submission threatTypes. + * @member {Array.} threatTypes + * @memberof google.cloud.webrisk.v1.Submission + * @instance + */ + Submission.prototype.threatTypes = $util.emptyArray; + /** * Creates a new Submission instance using the specified properties. * @function create @@ -4426,6 +4469,12 @@ writer = $Writer.create(); if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + if (message.threatTypes != null && message.threatTypes.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.threatTypes.length; ++i) + writer.int32(message.threatTypes[i]); + writer.ldelim(); + } return writer; }; @@ -4464,6 +4513,17 @@ message.uri = reader.string(); break; } + case 2: { + if (!(message.threatTypes && message.threatTypes.length)) + message.threatTypes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.threatTypes.push(reader.int32()); + } else + message.threatTypes.push(reader.int32()); + break; + } default: reader.skipType(tag & 7); break; @@ -4502,6 +4562,21 @@ if (message.uri != null && message.hasOwnProperty("uri")) if (!$util.isString(message.uri)) return "uri: string expected"; + if (message.threatTypes != null && message.hasOwnProperty("threatTypes")) { + if (!Array.isArray(message.threatTypes)) + return "threatTypes: array expected"; + for (var i = 0; i < message.threatTypes.length; ++i) + switch (message.threatTypes[i]) { + default: + return "threatTypes: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } return null; }; @@ -4519,6 +4594,39 @@ var message = new $root.google.cloud.webrisk.v1.Submission(); if (object.uri != null) message.uri = String(object.uri); + if (object.threatTypes) { + if (!Array.isArray(object.threatTypes)) + throw TypeError(".google.cloud.webrisk.v1.Submission.threatTypes: array expected"); + message.threatTypes = []; + for (var i = 0; i < object.threatTypes.length; ++i) + switch (object.threatTypes[i]) { + default: + if (typeof object.threatTypes[i] === "number") { + message.threatTypes[i] = object.threatTypes[i]; + break; + } + case "THREAT_TYPE_UNSPECIFIED": + case 0: + message.threatTypes[i] = 0; + break; + case "MALWARE": + case 1: + message.threatTypes[i] = 1; + break; + case "SOCIAL_ENGINEERING": + case 2: + message.threatTypes[i] = 2; + break; + case "UNWANTED_SOFTWARE": + case 3: + message.threatTypes[i] = 3; + break; + case "SOCIAL_ENGINEERING_EXTENDED_COVERAGE": + case 4: + message.threatTypes[i] = 4; + break; + } + } return message; }; @@ -4535,10 +4643,17 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.threatTypes = []; if (options.defaults) object.uri = ""; if (message.uri != null && message.hasOwnProperty("uri")) object.uri = message.uri; + if (message.threatTypes && message.threatTypes.length) { + object.threatTypes = []; + for (var j = 0; j < message.threatTypes.length; ++j) + object.threatTypes[j] = options.enums === String ? $root.google.cloud.webrisk.v1.ThreatType[message.threatTypes[j]] === undefined ? message.threatTypes[j] : $root.google.cloud.webrisk.v1.ThreatType[message.threatTypes[j]] : message.threatTypes[j]; + } return object; }; @@ -4571,25 +4686,26 @@ return Submission; })(); - v1.CreateSubmissionRequest = (function() { + v1.ThreatInfo = (function() { /** - * Properties of a CreateSubmissionRequest. + * Properties of a ThreatInfo. * @memberof google.cloud.webrisk.v1 - * @interface ICreateSubmissionRequest - * @property {string|null} [parent] CreateSubmissionRequest parent - * @property {google.cloud.webrisk.v1.ISubmission|null} [submission] CreateSubmissionRequest submission + * @interface IThreatInfo + * @property {google.cloud.webrisk.v1.ThreatInfo.AbuseType|null} [abuseType] ThreatInfo abuseType + * @property {google.cloud.webrisk.v1.ThreatInfo.IConfidence|null} [threatConfidence] ThreatInfo threatConfidence + * @property {google.cloud.webrisk.v1.ThreatInfo.IThreatJustification|null} [threatJustification] ThreatInfo threatJustification */ /** - * Constructs a new CreateSubmissionRequest. + * Constructs a new ThreatInfo. * @memberof google.cloud.webrisk.v1 - * @classdesc Represents a CreateSubmissionRequest. - * @implements ICreateSubmissionRequest + * @classdesc Represents a ThreatInfo. + * @implements IThreatInfo * @constructor - * @param {google.cloud.webrisk.v1.ICreateSubmissionRequest=} [properties] Properties to set + * @param {google.cloud.webrisk.v1.IThreatInfo=} [properties] Properties to set */ - function CreateSubmissionRequest(properties) { + function ThreatInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4597,89 +4713,103 @@ } /** - * CreateSubmissionRequest parent. - * @member {string} parent - * @memberof google.cloud.webrisk.v1.CreateSubmissionRequest + * ThreatInfo abuseType. + * @member {google.cloud.webrisk.v1.ThreatInfo.AbuseType} abuseType + * @memberof google.cloud.webrisk.v1.ThreatInfo * @instance */ - CreateSubmissionRequest.prototype.parent = ""; + ThreatInfo.prototype.abuseType = 0; /** - * CreateSubmissionRequest submission. - * @member {google.cloud.webrisk.v1.ISubmission|null|undefined} submission - * @memberof google.cloud.webrisk.v1.CreateSubmissionRequest + * ThreatInfo threatConfidence. + * @member {google.cloud.webrisk.v1.ThreatInfo.IConfidence|null|undefined} threatConfidence + * @memberof google.cloud.webrisk.v1.ThreatInfo * @instance */ - CreateSubmissionRequest.prototype.submission = null; + ThreatInfo.prototype.threatConfidence = null; /** - * Creates a new CreateSubmissionRequest instance using the specified properties. + * ThreatInfo threatJustification. + * @member {google.cloud.webrisk.v1.ThreatInfo.IThreatJustification|null|undefined} threatJustification + * @memberof google.cloud.webrisk.v1.ThreatInfo + * @instance + */ + ThreatInfo.prototype.threatJustification = null; + + /** + * Creates a new ThreatInfo instance using the specified properties. * @function create - * @memberof google.cloud.webrisk.v1.CreateSubmissionRequest + * @memberof google.cloud.webrisk.v1.ThreatInfo * @static - * @param {google.cloud.webrisk.v1.ICreateSubmissionRequest=} [properties] Properties to set - * @returns {google.cloud.webrisk.v1.CreateSubmissionRequest} CreateSubmissionRequest instance + * @param {google.cloud.webrisk.v1.IThreatInfo=} [properties] Properties to set + * @returns {google.cloud.webrisk.v1.ThreatInfo} ThreatInfo instance */ - CreateSubmissionRequest.create = function create(properties) { - return new CreateSubmissionRequest(properties); + ThreatInfo.create = function create(properties) { + return new ThreatInfo(properties); }; /** - * Encodes the specified CreateSubmissionRequest message. Does not implicitly {@link google.cloud.webrisk.v1.CreateSubmissionRequest.verify|verify} messages. + * Encodes the specified ThreatInfo message. Does not implicitly {@link google.cloud.webrisk.v1.ThreatInfo.verify|verify} messages. * @function encode - * @memberof google.cloud.webrisk.v1.CreateSubmissionRequest + * @memberof google.cloud.webrisk.v1.ThreatInfo * @static - * @param {google.cloud.webrisk.v1.ICreateSubmissionRequest} message CreateSubmissionRequest message or plain object to encode + * @param {google.cloud.webrisk.v1.IThreatInfo} message ThreatInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateSubmissionRequest.encode = function encode(message, writer) { + ThreatInfo.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.submission != null && Object.hasOwnProperty.call(message, "submission")) - $root.google.cloud.webrisk.v1.Submission.encode(message.submission, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.abuseType != null && Object.hasOwnProperty.call(message, "abuseType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.abuseType); + if (message.threatConfidence != null && Object.hasOwnProperty.call(message, "threatConfidence")) + $root.google.cloud.webrisk.v1.ThreatInfo.Confidence.encode(message.threatConfidence, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.threatJustification != null && Object.hasOwnProperty.call(message, "threatJustification")) + $root.google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.encode(message.threatJustification, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateSubmissionRequest message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1.CreateSubmissionRequest.verify|verify} messages. + * Encodes the specified ThreatInfo message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1.ThreatInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.webrisk.v1.CreateSubmissionRequest + * @memberof google.cloud.webrisk.v1.ThreatInfo * @static - * @param {google.cloud.webrisk.v1.ICreateSubmissionRequest} message CreateSubmissionRequest message or plain object to encode + * @param {google.cloud.webrisk.v1.IThreatInfo} message ThreatInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateSubmissionRequest.encodeDelimited = function encodeDelimited(message, writer) { + ThreatInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateSubmissionRequest message from the specified reader or buffer. + * Decodes a ThreatInfo message from the specified reader or buffer. * @function decode - * @memberof google.cloud.webrisk.v1.CreateSubmissionRequest + * @memberof google.cloud.webrisk.v1.ThreatInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.webrisk.v1.CreateSubmissionRequest} CreateSubmissionRequest + * @returns {google.cloud.webrisk.v1.ThreatInfo} ThreatInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateSubmissionRequest.decode = function decode(reader, length) { + ThreatInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1.CreateSubmissionRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1.ThreatInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.abuseType = reader.int32(); break; } case 2: { - message.submission = $root.google.cloud.webrisk.v1.Submission.decode(reader, reader.uint32()); + message.threatConfidence = $root.google.cloud.webrisk.v1.ThreatInfo.Confidence.decode(reader, reader.uint32()); + break; + } + case 3: { + message.threatJustification = $root.google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.decode(reader, reader.uint32()); break; } default: @@ -4691,284 +4821,809 @@ }; /** - * Decodes a CreateSubmissionRequest message from the specified reader or buffer, length delimited. + * Decodes a ThreatInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.webrisk.v1.CreateSubmissionRequest + * @memberof google.cloud.webrisk.v1.ThreatInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.webrisk.v1.CreateSubmissionRequest} CreateSubmissionRequest + * @returns {google.cloud.webrisk.v1.ThreatInfo} ThreatInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateSubmissionRequest.decodeDelimited = function decodeDelimited(reader) { + ThreatInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateSubmissionRequest message. + * Verifies a ThreatInfo message. * @function verify - * @memberof google.cloud.webrisk.v1.CreateSubmissionRequest + * @memberof google.cloud.webrisk.v1.ThreatInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateSubmissionRequest.verify = function verify(message) { + ThreatInfo.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.submission != null && message.hasOwnProperty("submission")) { - var error = $root.google.cloud.webrisk.v1.Submission.verify(message.submission); + if (message.abuseType != null && message.hasOwnProperty("abuseType")) + switch (message.abuseType) { + default: + return "abuseType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.threatConfidence != null && message.hasOwnProperty("threatConfidence")) { + var error = $root.google.cloud.webrisk.v1.ThreatInfo.Confidence.verify(message.threatConfidence); if (error) - return "submission." + error; + return "threatConfidence." + error; + } + if (message.threatJustification != null && message.hasOwnProperty("threatJustification")) { + var error = $root.google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.verify(message.threatJustification); + if (error) + return "threatJustification." + error; } return null; }; /** - * Creates a CreateSubmissionRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ThreatInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.webrisk.v1.CreateSubmissionRequest + * @memberof google.cloud.webrisk.v1.ThreatInfo * @static * @param {Object.} object Plain object - * @returns {google.cloud.webrisk.v1.CreateSubmissionRequest} CreateSubmissionRequest + * @returns {google.cloud.webrisk.v1.ThreatInfo} ThreatInfo */ - CreateSubmissionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.webrisk.v1.CreateSubmissionRequest) + ThreatInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.webrisk.v1.ThreatInfo) return object; - var message = new $root.google.cloud.webrisk.v1.CreateSubmissionRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.submission != null) { - if (typeof object.submission !== "object") - throw TypeError(".google.cloud.webrisk.v1.CreateSubmissionRequest.submission: object expected"); - message.submission = $root.google.cloud.webrisk.v1.Submission.fromObject(object.submission); + var message = new $root.google.cloud.webrisk.v1.ThreatInfo(); + switch (object.abuseType) { + default: + if (typeof object.abuseType === "number") { + message.abuseType = object.abuseType; + break; + } + break; + case "ABUSE_TYPE_UNSPECIFIED": + case 0: + message.abuseType = 0; + break; + case "MALWARE": + case 1: + message.abuseType = 1; + break; + case "SOCIAL_ENGINEERING": + case 2: + message.abuseType = 2; + break; + case "UNWANTED_SOFTWARE": + case 3: + message.abuseType = 3; + break; + } + if (object.threatConfidence != null) { + if (typeof object.threatConfidence !== "object") + throw TypeError(".google.cloud.webrisk.v1.ThreatInfo.threatConfidence: object expected"); + message.threatConfidence = $root.google.cloud.webrisk.v1.ThreatInfo.Confidence.fromObject(object.threatConfidence); + } + if (object.threatJustification != null) { + if (typeof object.threatJustification !== "object") + throw TypeError(".google.cloud.webrisk.v1.ThreatInfo.threatJustification: object expected"); + message.threatJustification = $root.google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.fromObject(object.threatJustification); } return message; }; /** - * Creates a plain object from a CreateSubmissionRequest message. Also converts values to other types if specified. + * Creates a plain object from a ThreatInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.webrisk.v1.CreateSubmissionRequest + * @memberof google.cloud.webrisk.v1.ThreatInfo * @static - * @param {google.cloud.webrisk.v1.CreateSubmissionRequest} message CreateSubmissionRequest + * @param {google.cloud.webrisk.v1.ThreatInfo} message ThreatInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateSubmissionRequest.toObject = function toObject(message, options) { + ThreatInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.submission = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.submission != null && message.hasOwnProperty("submission")) - object.submission = $root.google.cloud.webrisk.v1.Submission.toObject(message.submission, options); + object.abuseType = options.enums === String ? "ABUSE_TYPE_UNSPECIFIED" : 0; + object.threatConfidence = null; + object.threatJustification = null; + } + if (message.abuseType != null && message.hasOwnProperty("abuseType")) + object.abuseType = options.enums === String ? $root.google.cloud.webrisk.v1.ThreatInfo.AbuseType[message.abuseType] === undefined ? message.abuseType : $root.google.cloud.webrisk.v1.ThreatInfo.AbuseType[message.abuseType] : message.abuseType; + if (message.threatConfidence != null && message.hasOwnProperty("threatConfidence")) + object.threatConfidence = $root.google.cloud.webrisk.v1.ThreatInfo.Confidence.toObject(message.threatConfidence, options); + if (message.threatJustification != null && message.hasOwnProperty("threatJustification")) + object.threatJustification = $root.google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.toObject(message.threatJustification, options); return object; }; /** - * Converts this CreateSubmissionRequest to JSON. + * Converts this ThreatInfo to JSON. * @function toJSON - * @memberof google.cloud.webrisk.v1.CreateSubmissionRequest + * @memberof google.cloud.webrisk.v1.ThreatInfo * @instance * @returns {Object.} JSON object */ - CreateSubmissionRequest.prototype.toJSON = function toJSON() { + ThreatInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateSubmissionRequest + * Gets the default type url for ThreatInfo * @function getTypeUrl - * @memberof google.cloud.webrisk.v1.CreateSubmissionRequest + * @memberof google.cloud.webrisk.v1.ThreatInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateSubmissionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ThreatInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.webrisk.v1.CreateSubmissionRequest"; + return typeUrlPrefix + "/google.cloud.webrisk.v1.ThreatInfo"; }; - return CreateSubmissionRequest; - })(); + /** + * AbuseType enum. + * @name google.cloud.webrisk.v1.ThreatInfo.AbuseType + * @enum {number} + * @property {number} ABUSE_TYPE_UNSPECIFIED=0 ABUSE_TYPE_UNSPECIFIED value + * @property {number} MALWARE=1 MALWARE value + * @property {number} SOCIAL_ENGINEERING=2 SOCIAL_ENGINEERING value + * @property {number} UNWANTED_SOFTWARE=3 UNWANTED_SOFTWARE value + */ + ThreatInfo.AbuseType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ABUSE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MALWARE"] = 1; + values[valuesById[2] = "SOCIAL_ENGINEERING"] = 2; + values[valuesById[3] = "UNWANTED_SOFTWARE"] = 3; + return values; + })(); - return v1; - })(); + ThreatInfo.Confidence = (function() { - webrisk.v1beta1 = (function() { + /** + * Properties of a Confidence. + * @memberof google.cloud.webrisk.v1.ThreatInfo + * @interface IConfidence + * @property {number|null} [score] Confidence score + * @property {google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel|null} [level] Confidence level + */ - /** - * Namespace v1beta1. - * @memberof google.cloud.webrisk - * @namespace - */ - var v1beta1 = {}; + /** + * Constructs a new Confidence. + * @memberof google.cloud.webrisk.v1.ThreatInfo + * @classdesc Represents a Confidence. + * @implements IConfidence + * @constructor + * @param {google.cloud.webrisk.v1.ThreatInfo.IConfidence=} [properties] Properties to set + */ + function Confidence(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]]; + } - v1beta1.WebRiskServiceV1Beta1 = (function() { + /** + * Confidence score. + * @member {number|null|undefined} score + * @memberof google.cloud.webrisk.v1.ThreatInfo.Confidence + * @instance + */ + Confidence.prototype.score = null; - /** - * Constructs a new WebRiskServiceV1Beta1 service. - * @memberof google.cloud.webrisk.v1beta1 - * @classdesc Represents a WebRiskServiceV1Beta1 - * @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 WebRiskServiceV1Beta1(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } + /** + * Confidence level. + * @member {google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel|null|undefined} level + * @memberof google.cloud.webrisk.v1.ThreatInfo.Confidence + * @instance + */ + Confidence.prototype.level = null; - (WebRiskServiceV1Beta1.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = WebRiskServiceV1Beta1; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Creates new WebRiskServiceV1Beta1 service using the specified rpc implementation. - * @function create - * @memberof google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1 - * @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 {WebRiskServiceV1Beta1} RPC service. Useful where requests and/or responses are streamed. - */ - WebRiskServiceV1Beta1.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + /** + * Confidence value. + * @member {"score"|"level"|undefined} value + * @memberof google.cloud.webrisk.v1.ThreatInfo.Confidence + * @instance + */ + Object.defineProperty(Confidence.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["score", "level"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Callback as used by {@link google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1|computeThreatListDiff}. - * @memberof google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1 - * @typedef ComputeThreatListDiffCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse} [response] ComputeThreatListDiffResponse - */ + /** + * Creates a new Confidence instance using the specified properties. + * @function create + * @memberof google.cloud.webrisk.v1.ThreatInfo.Confidence + * @static + * @param {google.cloud.webrisk.v1.ThreatInfo.IConfidence=} [properties] Properties to set + * @returns {google.cloud.webrisk.v1.ThreatInfo.Confidence} Confidence instance + */ + Confidence.create = function create(properties) { + return new Confidence(properties); + }; - /** - * Calls ComputeThreatListDiff. - * @function computeThreatListDiff - * @memberof google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1 - * @instance - * @param {google.cloud.webrisk.v1beta1.IComputeThreatListDiffRequest} request ComputeThreatListDiffRequest message or plain object - * @param {google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1.ComputeThreatListDiffCallback} callback Node-style callback called with the error, if any, and ComputeThreatListDiffResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(WebRiskServiceV1Beta1.prototype.computeThreatListDiff = function computeThreatListDiff(request, callback) { - return this.rpcCall(computeThreatListDiff, $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest, $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse, request, callback); - }, "name", { value: "ComputeThreatListDiff" }); + /** + * Encodes the specified Confidence message. Does not implicitly {@link google.cloud.webrisk.v1.ThreatInfo.Confidence.verify|verify} messages. + * @function encode + * @memberof google.cloud.webrisk.v1.ThreatInfo.Confidence + * @static + * @param {google.cloud.webrisk.v1.ThreatInfo.IConfidence} message Confidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Confidence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); + if (message.level != null && Object.hasOwnProperty.call(message, "level")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.level); + return writer; + }; - /** - * Calls ComputeThreatListDiff. - * @function computeThreatListDiff - * @memberof google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1 - * @instance - * @param {google.cloud.webrisk.v1beta1.IComputeThreatListDiffRequest} request ComputeThreatListDiffRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Encodes the specified Confidence message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1.ThreatInfo.Confidence.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.webrisk.v1.ThreatInfo.Confidence + * @static + * @param {google.cloud.webrisk.v1.ThreatInfo.IConfidence} message Confidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Confidence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Callback as used by {@link google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1|searchUris}. - * @memberof google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1 - * @typedef SearchUrisCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.webrisk.v1beta1.SearchUrisResponse} [response] SearchUrisResponse - */ + /** + * Decodes a Confidence message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.webrisk.v1.ThreatInfo.Confidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.webrisk.v1.ThreatInfo.Confidence} Confidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Confidence.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1.ThreatInfo.Confidence(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.score = reader.float(); + break; + } + case 2: { + message.level = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Calls SearchUris. - * @function searchUris - * @memberof google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1 - * @instance - * @param {google.cloud.webrisk.v1beta1.ISearchUrisRequest} request SearchUrisRequest message or plain object - * @param {google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1.SearchUrisCallback} callback Node-style callback called with the error, if any, and SearchUrisResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(WebRiskServiceV1Beta1.prototype.searchUris = function searchUris(request, callback) { - return this.rpcCall(searchUris, $root.google.cloud.webrisk.v1beta1.SearchUrisRequest, $root.google.cloud.webrisk.v1beta1.SearchUrisResponse, request, callback); - }, "name", { value: "SearchUris" }); + /** + * Decodes a Confidence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.webrisk.v1.ThreatInfo.Confidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.webrisk.v1.ThreatInfo.Confidence} Confidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Confidence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Calls SearchUris. - * @function searchUris - * @memberof google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1 - * @instance - * @param {google.cloud.webrisk.v1beta1.ISearchUrisRequest} request SearchUrisRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Verifies a Confidence message. + * @function verify + * @memberof google.cloud.webrisk.v1.ThreatInfo.Confidence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Confidence.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.score != null && message.hasOwnProperty("score")) { + properties.value = 1; + if (typeof message.score !== "number") + return "score: number expected"; + } + if (message.level != null && message.hasOwnProperty("level")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + switch (message.level) { + default: + return "level: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + return null; + }; - /** - * Callback as used by {@link google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1|searchHashes}. - * @memberof google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1 - * @typedef SearchHashesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.webrisk.v1beta1.SearchHashesResponse} [response] SearchHashesResponse - */ + /** + * Creates a Confidence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.webrisk.v1.ThreatInfo.Confidence + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.webrisk.v1.ThreatInfo.Confidence} Confidence + */ + Confidence.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.webrisk.v1.ThreatInfo.Confidence) + return object; + var message = new $root.google.cloud.webrisk.v1.ThreatInfo.Confidence(); + if (object.score != null) + message.score = Number(object.score); + switch (object.level) { + default: + if (typeof object.level === "number") { + message.level = object.level; + break; + } + break; + case "CONFIDENCE_LEVEL_UNSPECIFIED": + case 0: + message.level = 0; + break; + case "LOW": + case 1: + message.level = 1; + break; + case "MEDIUM": + case 2: + message.level = 2; + break; + case "HIGH": + case 3: + message.level = 3; + break; + } + return message; + }; - /** - * Calls SearchHashes. - * @function searchHashes - * @memberof google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1 - * @instance - * @param {google.cloud.webrisk.v1beta1.ISearchHashesRequest} request SearchHashesRequest message or plain object - * @param {google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1.SearchHashesCallback} callback Node-style callback called with the error, if any, and SearchHashesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(WebRiskServiceV1Beta1.prototype.searchHashes = function searchHashes(request, callback) { - return this.rpcCall(searchHashes, $root.google.cloud.webrisk.v1beta1.SearchHashesRequest, $root.google.cloud.webrisk.v1beta1.SearchHashesResponse, request, callback); - }, "name", { value: "SearchHashes" }); + /** + * Creates a plain object from a Confidence message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.webrisk.v1.ThreatInfo.Confidence + * @static + * @param {google.cloud.webrisk.v1.ThreatInfo.Confidence} message Confidence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Confidence.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.score != null && message.hasOwnProperty("score")) { + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (options.oneofs) + object.value = "score"; + } + if (message.level != null && message.hasOwnProperty("level")) { + object.level = options.enums === String ? $root.google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel[message.level] === undefined ? message.level : $root.google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel[message.level] : message.level; + if (options.oneofs) + object.value = "level"; + } + return object; + }; - /** - * Calls SearchHashes. - * @function searchHashes - * @memberof google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1 - * @instance - * @param {google.cloud.webrisk.v1beta1.ISearchHashesRequest} request SearchHashesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Converts this Confidence to JSON. + * @function toJSON + * @memberof google.cloud.webrisk.v1.ThreatInfo.Confidence + * @instance + * @returns {Object.} JSON object + */ + Confidence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return WebRiskServiceV1Beta1; - })(); + /** + * Gets the default type url for Confidence + * @function getTypeUrl + * @memberof google.cloud.webrisk.v1.ThreatInfo.Confidence + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Confidence.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.webrisk.v1.ThreatInfo.Confidence"; + }; - v1beta1.ComputeThreatListDiffRequest = (function() { + /** + * ConfidenceLevel enum. + * @name google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel + * @enum {number} + * @property {number} CONFIDENCE_LEVEL_UNSPECIFIED=0 CONFIDENCE_LEVEL_UNSPECIFIED value + * @property {number} LOW=1 LOW value + * @property {number} MEDIUM=2 MEDIUM value + * @property {number} HIGH=3 HIGH value + */ + Confidence.ConfidenceLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONFIDENCE_LEVEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "LOW"] = 1; + values[valuesById[2] = "MEDIUM"] = 2; + values[valuesById[3] = "HIGH"] = 3; + return values; + })(); + + return Confidence; + })(); - /** - * Properties of a ComputeThreatListDiffRequest. - * @memberof google.cloud.webrisk.v1beta1 - * @interface IComputeThreatListDiffRequest - * @property {google.cloud.webrisk.v1beta1.ThreatType|null} [threatType] ComputeThreatListDiffRequest threatType - * @property {Uint8Array|null} [versionToken] ComputeThreatListDiffRequest versionToken - * @property {google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.IConstraints|null} [constraints] ComputeThreatListDiffRequest constraints + ThreatInfo.ThreatJustification = (function() { + + /** + * Properties of a ThreatJustification. + * @memberof google.cloud.webrisk.v1.ThreatInfo + * @interface IThreatJustification + * @property {Array.|null} [labels] ThreatJustification labels + * @property {Array.|null} [comments] ThreatJustification comments + */ + + /** + * Constructs a new ThreatJustification. + * @memberof google.cloud.webrisk.v1.ThreatInfo + * @classdesc Represents a ThreatJustification. + * @implements IThreatJustification + * @constructor + * @param {google.cloud.webrisk.v1.ThreatInfo.IThreatJustification=} [properties] Properties to set + */ + function ThreatJustification(properties) { + this.labels = []; + this.comments = []; + 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]]; + } + + /** + * ThreatJustification labels. + * @member {Array.} labels + * @memberof google.cloud.webrisk.v1.ThreatInfo.ThreatJustification + * @instance + */ + ThreatJustification.prototype.labels = $util.emptyArray; + + /** + * ThreatJustification comments. + * @member {Array.} comments + * @memberof google.cloud.webrisk.v1.ThreatInfo.ThreatJustification + * @instance + */ + ThreatJustification.prototype.comments = $util.emptyArray; + + /** + * Creates a new ThreatJustification instance using the specified properties. + * @function create + * @memberof google.cloud.webrisk.v1.ThreatInfo.ThreatJustification + * @static + * @param {google.cloud.webrisk.v1.ThreatInfo.IThreatJustification=} [properties] Properties to set + * @returns {google.cloud.webrisk.v1.ThreatInfo.ThreatJustification} ThreatJustification instance + */ + ThreatJustification.create = function create(properties) { + return new ThreatJustification(properties); + }; + + /** + * Encodes the specified ThreatJustification message. Does not implicitly {@link google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.verify|verify} messages. + * @function encode + * @memberof google.cloud.webrisk.v1.ThreatInfo.ThreatJustification + * @static + * @param {google.cloud.webrisk.v1.ThreatInfo.IThreatJustification} message ThreatJustification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ThreatJustification.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.labels != null && message.labels.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.labels.length; ++i) + writer.int32(message.labels[i]); + writer.ldelim(); + } + if (message.comments != null && message.comments.length) + for (var i = 0; i < message.comments.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.comments[i]); + return writer; + }; + + /** + * Encodes the specified ThreatJustification message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.webrisk.v1.ThreatInfo.ThreatJustification + * @static + * @param {google.cloud.webrisk.v1.ThreatInfo.IThreatJustification} message ThreatJustification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ThreatJustification.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ThreatJustification message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.webrisk.v1.ThreatInfo.ThreatJustification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.webrisk.v1.ThreatInfo.ThreatJustification} ThreatJustification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ThreatJustification.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1.ThreatInfo.ThreatJustification(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.labels && message.labels.length)) + message.labels = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.labels.push(reader.int32()); + } else + message.labels.push(reader.int32()); + break; + } + case 2: { + if (!(message.comments && message.comments.length)) + message.comments = []; + message.comments.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ThreatJustification message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.webrisk.v1.ThreatInfo.ThreatJustification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.webrisk.v1.ThreatInfo.ThreatJustification} ThreatJustification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ThreatJustification.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ThreatJustification message. + * @function verify + * @memberof google.cloud.webrisk.v1.ThreatInfo.ThreatJustification + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ThreatJustification.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!Array.isArray(message.labels)) + return "labels: array expected"; + for (var i = 0; i < message.labels.length; ++i) + switch (message.labels[i]) { + default: + return "labels: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.comments != null && message.hasOwnProperty("comments")) { + if (!Array.isArray(message.comments)) + return "comments: array expected"; + for (var i = 0; i < message.comments.length; ++i) + if (!$util.isString(message.comments[i])) + return "comments: string[] expected"; + } + return null; + }; + + /** + * Creates a ThreatJustification message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.webrisk.v1.ThreatInfo.ThreatJustification + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.webrisk.v1.ThreatInfo.ThreatJustification} ThreatJustification + */ + ThreatJustification.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.webrisk.v1.ThreatInfo.ThreatJustification) + return object; + var message = new $root.google.cloud.webrisk.v1.ThreatInfo.ThreatJustification(); + if (object.labels) { + if (!Array.isArray(object.labels)) + throw TypeError(".google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.labels: array expected"); + message.labels = []; + for (var i = 0; i < object.labels.length; ++i) + switch (object.labels[i]) { + default: + if (typeof object.labels[i] === "number") { + message.labels[i] = object.labels[i]; + break; + } + case "JUSTIFICATION_LABEL_UNSPECIFIED": + case 0: + message.labels[i] = 0; + break; + case "MANUAL_VERIFICATION": + case 1: + message.labels[i] = 1; + break; + case "USER_REPORT": + case 2: + message.labels[i] = 2; + break; + case "AUTOMATED_REPORT": + case 3: + message.labels[i] = 3; + break; + } + } + if (object.comments) { + if (!Array.isArray(object.comments)) + throw TypeError(".google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.comments: array expected"); + message.comments = []; + for (var i = 0; i < object.comments.length; ++i) + message.comments[i] = String(object.comments[i]); + } + return message; + }; + + /** + * Creates a plain object from a ThreatJustification message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.webrisk.v1.ThreatInfo.ThreatJustification + * @static + * @param {google.cloud.webrisk.v1.ThreatInfo.ThreatJustification} message ThreatJustification + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ThreatJustification.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.labels = []; + object.comments = []; + } + if (message.labels && message.labels.length) { + object.labels = []; + for (var j = 0; j < message.labels.length; ++j) + object.labels[j] = options.enums === String ? $root.google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel[message.labels[j]] === undefined ? message.labels[j] : $root.google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel[message.labels[j]] : message.labels[j]; + } + if (message.comments && message.comments.length) { + object.comments = []; + for (var j = 0; j < message.comments.length; ++j) + object.comments[j] = message.comments[j]; + } + return object; + }; + + /** + * Converts this ThreatJustification to JSON. + * @function toJSON + * @memberof google.cloud.webrisk.v1.ThreatInfo.ThreatJustification + * @instance + * @returns {Object.} JSON object + */ + ThreatJustification.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ThreatJustification + * @function getTypeUrl + * @memberof google.cloud.webrisk.v1.ThreatInfo.ThreatJustification + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ThreatJustification.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.webrisk.v1.ThreatInfo.ThreatJustification"; + }; + + /** + * JustificationLabel enum. + * @name google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel + * @enum {number} + * @property {number} JUSTIFICATION_LABEL_UNSPECIFIED=0 JUSTIFICATION_LABEL_UNSPECIFIED value + * @property {number} MANUAL_VERIFICATION=1 MANUAL_VERIFICATION value + * @property {number} USER_REPORT=2 USER_REPORT value + * @property {number} AUTOMATED_REPORT=3 AUTOMATED_REPORT value + */ + ThreatJustification.JustificationLabel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JUSTIFICATION_LABEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "MANUAL_VERIFICATION"] = 1; + values[valuesById[2] = "USER_REPORT"] = 2; + values[valuesById[3] = "AUTOMATED_REPORT"] = 3; + return values; + })(); + + return ThreatJustification; + })(); + + return ThreatInfo; + })(); + + v1.ThreatDiscovery = (function() { + + /** + * Properties of a ThreatDiscovery. + * @memberof google.cloud.webrisk.v1 + * @interface IThreatDiscovery + * @property {google.cloud.webrisk.v1.ThreatDiscovery.Platform|null} [platform] ThreatDiscovery platform + * @property {Array.|null} [regionCodes] ThreatDiscovery regionCodes */ /** - * Constructs a new ComputeThreatListDiffRequest. - * @memberof google.cloud.webrisk.v1beta1 - * @classdesc Represents a ComputeThreatListDiffRequest. - * @implements IComputeThreatListDiffRequest + * Constructs a new ThreatDiscovery. + * @memberof google.cloud.webrisk.v1 + * @classdesc Represents a ThreatDiscovery. + * @implements IThreatDiscovery * @constructor - * @param {google.cloud.webrisk.v1beta1.IComputeThreatListDiffRequest=} [properties] Properties to set + * @param {google.cloud.webrisk.v1.IThreatDiscovery=} [properties] Properties to set */ - function ComputeThreatListDiffRequest(properties) { + function ThreatDiscovery(properties) { + this.regionCodes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4976,103 +5631,92 @@ } /** - * ComputeThreatListDiffRequest threatType. - * @member {google.cloud.webrisk.v1beta1.ThreatType} threatType - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest - * @instance - */ - ComputeThreatListDiffRequest.prototype.threatType = 0; - - /** - * ComputeThreatListDiffRequest versionToken. - * @member {Uint8Array} versionToken - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest + * ThreatDiscovery platform. + * @member {google.cloud.webrisk.v1.ThreatDiscovery.Platform} platform + * @memberof google.cloud.webrisk.v1.ThreatDiscovery * @instance */ - ComputeThreatListDiffRequest.prototype.versionToken = $util.newBuffer([]); + ThreatDiscovery.prototype.platform = 0; /** - * ComputeThreatListDiffRequest constraints. - * @member {google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.IConstraints|null|undefined} constraints - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest + * ThreatDiscovery regionCodes. + * @member {Array.} regionCodes + * @memberof google.cloud.webrisk.v1.ThreatDiscovery * @instance */ - ComputeThreatListDiffRequest.prototype.constraints = null; + ThreatDiscovery.prototype.regionCodes = $util.emptyArray; /** - * Creates a new ComputeThreatListDiffRequest instance using the specified properties. + * Creates a new ThreatDiscovery instance using the specified properties. * @function create - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest + * @memberof google.cloud.webrisk.v1.ThreatDiscovery * @static - * @param {google.cloud.webrisk.v1beta1.IComputeThreatListDiffRequest=} [properties] Properties to set - * @returns {google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest} ComputeThreatListDiffRequest instance + * @param {google.cloud.webrisk.v1.IThreatDiscovery=} [properties] Properties to set + * @returns {google.cloud.webrisk.v1.ThreatDiscovery} ThreatDiscovery instance */ - ComputeThreatListDiffRequest.create = function create(properties) { - return new ComputeThreatListDiffRequest(properties); + ThreatDiscovery.create = function create(properties) { + return new ThreatDiscovery(properties); }; /** - * Encodes the specified ComputeThreatListDiffRequest message. Does not implicitly {@link google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.verify|verify} messages. + * Encodes the specified ThreatDiscovery message. Does not implicitly {@link google.cloud.webrisk.v1.ThreatDiscovery.verify|verify} messages. * @function encode - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest + * @memberof google.cloud.webrisk.v1.ThreatDiscovery * @static - * @param {google.cloud.webrisk.v1beta1.IComputeThreatListDiffRequest} message ComputeThreatListDiffRequest message or plain object to encode + * @param {google.cloud.webrisk.v1.IThreatDiscovery} message ThreatDiscovery message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ComputeThreatListDiffRequest.encode = function encode(message, writer) { + ThreatDiscovery.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.threatType != null && Object.hasOwnProperty.call(message, "threatType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.threatType); - if (message.versionToken != null && Object.hasOwnProperty.call(message, "versionToken")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.versionToken); - if (message.constraints != null && Object.hasOwnProperty.call(message, "constraints")) - $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.encode(message.constraints, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.platform != null && Object.hasOwnProperty.call(message, "platform")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.platform); + if (message.regionCodes != null && message.regionCodes.length) + for (var i = 0; i < message.regionCodes.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.regionCodes[i]); return writer; }; /** - * Encodes the specified ComputeThreatListDiffRequest message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.verify|verify} messages. + * Encodes the specified ThreatDiscovery message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1.ThreatDiscovery.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest + * @memberof google.cloud.webrisk.v1.ThreatDiscovery * @static - * @param {google.cloud.webrisk.v1beta1.IComputeThreatListDiffRequest} message ComputeThreatListDiffRequest message or plain object to encode + * @param {google.cloud.webrisk.v1.IThreatDiscovery} message ThreatDiscovery message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ComputeThreatListDiffRequest.encodeDelimited = function encodeDelimited(message, writer) { + ThreatDiscovery.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ComputeThreatListDiffRequest message from the specified reader or buffer. + * Decodes a ThreatDiscovery message from the specified reader or buffer. * @function decode - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest + * @memberof google.cloud.webrisk.v1.ThreatDiscovery * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest} ComputeThreatListDiffRequest + * @returns {google.cloud.webrisk.v1.ThreatDiscovery} ThreatDiscovery * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ComputeThreatListDiffRequest.decode = function decode(reader, length) { + ThreatDiscovery.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1.ThreatDiscovery(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.threatType = reader.int32(); + message.platform = reader.int32(); break; } case 2: { - message.versionToken = reader.bytes(); - break; - } - case 3: { - message.constraints = $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.decode(reader, reader.uint32()); + if (!(message.regionCodes && message.regionCodes.length)) + message.regionCodes = []; + message.regionCodes.push(reader.string()); break; } default: @@ -5084,632 +5728,550 @@ }; /** - * Decodes a ComputeThreatListDiffRequest message from the specified reader or buffer, length delimited. + * Decodes a ThreatDiscovery message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest + * @memberof google.cloud.webrisk.v1.ThreatDiscovery * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest} ComputeThreatListDiffRequest + * @returns {google.cloud.webrisk.v1.ThreatDiscovery} ThreatDiscovery * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ComputeThreatListDiffRequest.decodeDelimited = function decodeDelimited(reader) { + ThreatDiscovery.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ComputeThreatListDiffRequest message. + * Verifies a ThreatDiscovery message. * @function verify - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest + * @memberof google.cloud.webrisk.v1.ThreatDiscovery * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ComputeThreatListDiffRequest.verify = function verify(message) { + ThreatDiscovery.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.threatType != null && message.hasOwnProperty("threatType")) - switch (message.threatType) { + if (message.platform != null && message.hasOwnProperty("platform")) + switch (message.platform) { default: - return "threatType: enum value expected"; + return "platform: enum value expected"; case 0: case 1: case 2: case 3: + case 4: break; } - if (message.versionToken != null && message.hasOwnProperty("versionToken")) - if (!(message.versionToken && typeof message.versionToken.length === "number" || $util.isString(message.versionToken))) - return "versionToken: buffer expected"; - if (message.constraints != null && message.hasOwnProperty("constraints")) { - var error = $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.verify(message.constraints); - if (error) - return "constraints." + error; + if (message.regionCodes != null && message.hasOwnProperty("regionCodes")) { + if (!Array.isArray(message.regionCodes)) + return "regionCodes: array expected"; + for (var i = 0; i < message.regionCodes.length; ++i) + if (!$util.isString(message.regionCodes[i])) + return "regionCodes: string[] expected"; } return null; }; /** - * Creates a ComputeThreatListDiffRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ThreatDiscovery message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest + * @memberof google.cloud.webrisk.v1.ThreatDiscovery * @static * @param {Object.} object Plain object - * @returns {google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest} ComputeThreatListDiffRequest + * @returns {google.cloud.webrisk.v1.ThreatDiscovery} ThreatDiscovery */ - ComputeThreatListDiffRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest) + ThreatDiscovery.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.webrisk.v1.ThreatDiscovery) return object; - var message = new $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest(); - switch (object.threatType) { + var message = new $root.google.cloud.webrisk.v1.ThreatDiscovery(); + switch (object.platform) { default: - if (typeof object.threatType === "number") { - message.threatType = object.threatType; + if (typeof object.platform === "number") { + message.platform = object.platform; break; } break; - case "THREAT_TYPE_UNSPECIFIED": + case "PLATFORM_UNSPECIFIED": case 0: - message.threatType = 0; + message.platform = 0; break; - case "MALWARE": + case "ANDROID": case 1: - message.threatType = 1; + message.platform = 1; break; - case "SOCIAL_ENGINEERING": + case "IOS": case 2: - message.threatType = 2; + message.platform = 2; break; - case "UNWANTED_SOFTWARE": + case "MACOS": case 3: - message.threatType = 3; + message.platform = 3; + break; + case "WINDOWS": + case 4: + message.platform = 4; break; } - if (object.versionToken != null) - if (typeof object.versionToken === "string") - $util.base64.decode(object.versionToken, message.versionToken = $util.newBuffer($util.base64.length(object.versionToken)), 0); - else if (object.versionToken.length >= 0) - message.versionToken = object.versionToken; - if (object.constraints != null) { - if (typeof object.constraints !== "object") - throw TypeError(".google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.constraints: object expected"); - message.constraints = $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.fromObject(object.constraints); + if (object.regionCodes) { + if (!Array.isArray(object.regionCodes)) + throw TypeError(".google.cloud.webrisk.v1.ThreatDiscovery.regionCodes: array expected"); + message.regionCodes = []; + for (var i = 0; i < object.regionCodes.length; ++i) + message.regionCodes[i] = String(object.regionCodes[i]); } return message; }; /** - * Creates a plain object from a ComputeThreatListDiffRequest message. Also converts values to other types if specified. + * Creates a plain object from a ThreatDiscovery message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest + * @memberof google.cloud.webrisk.v1.ThreatDiscovery * @static - * @param {google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest} message ComputeThreatListDiffRequest + * @param {google.cloud.webrisk.v1.ThreatDiscovery} message ThreatDiscovery * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ComputeThreatListDiffRequest.toObject = function toObject(message, options) { + ThreatDiscovery.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.threatType = options.enums === String ? "THREAT_TYPE_UNSPECIFIED" : 0; - if (options.bytes === String) - object.versionToken = ""; - else { - object.versionToken = []; - if (options.bytes !== Array) - object.versionToken = $util.newBuffer(object.versionToken); - } - object.constraints = null; + if (options.arrays || options.defaults) + object.regionCodes = []; + if (options.defaults) + object.platform = options.enums === String ? "PLATFORM_UNSPECIFIED" : 0; + if (message.platform != null && message.hasOwnProperty("platform")) + object.platform = options.enums === String ? $root.google.cloud.webrisk.v1.ThreatDiscovery.Platform[message.platform] === undefined ? message.platform : $root.google.cloud.webrisk.v1.ThreatDiscovery.Platform[message.platform] : message.platform; + if (message.regionCodes && message.regionCodes.length) { + object.regionCodes = []; + for (var j = 0; j < message.regionCodes.length; ++j) + object.regionCodes[j] = message.regionCodes[j]; } - if (message.threatType != null && message.hasOwnProperty("threatType")) - object.threatType = options.enums === String ? $root.google.cloud.webrisk.v1beta1.ThreatType[message.threatType] === undefined ? message.threatType : $root.google.cloud.webrisk.v1beta1.ThreatType[message.threatType] : message.threatType; - if (message.versionToken != null && message.hasOwnProperty("versionToken")) - object.versionToken = options.bytes === String ? $util.base64.encode(message.versionToken, 0, message.versionToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.versionToken) : message.versionToken; - if (message.constraints != null && message.hasOwnProperty("constraints")) - object.constraints = $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.toObject(message.constraints, options); return object; }; /** - * Converts this ComputeThreatListDiffRequest to JSON. + * Converts this ThreatDiscovery to JSON. * @function toJSON - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest + * @memberof google.cloud.webrisk.v1.ThreatDiscovery * @instance * @returns {Object.} JSON object */ - ComputeThreatListDiffRequest.prototype.toJSON = function toJSON() { + ThreatDiscovery.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ComputeThreatListDiffRequest + * Gets the default type url for ThreatDiscovery * @function getTypeUrl - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest + * @memberof google.cloud.webrisk.v1.ThreatDiscovery * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ComputeThreatListDiffRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ThreatDiscovery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest"; + return typeUrlPrefix + "/google.cloud.webrisk.v1.ThreatDiscovery"; }; - ComputeThreatListDiffRequest.Constraints = (function() { + /** + * Platform enum. + * @name google.cloud.webrisk.v1.ThreatDiscovery.Platform + * @enum {number} + * @property {number} PLATFORM_UNSPECIFIED=0 PLATFORM_UNSPECIFIED value + * @property {number} ANDROID=1 ANDROID value + * @property {number} IOS=2 IOS value + * @property {number} MACOS=3 MACOS value + * @property {number} WINDOWS=4 WINDOWS value + */ + ThreatDiscovery.Platform = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PLATFORM_UNSPECIFIED"] = 0; + values[valuesById[1] = "ANDROID"] = 1; + values[valuesById[2] = "IOS"] = 2; + values[valuesById[3] = "MACOS"] = 3; + values[valuesById[4] = "WINDOWS"] = 4; + return values; + })(); - /** - * Properties of a Constraints. - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest - * @interface IConstraints - * @property {number|null} [maxDiffEntries] Constraints maxDiffEntries - * @property {number|null} [maxDatabaseEntries] Constraints maxDatabaseEntries - * @property {Array.|null} [supportedCompressions] Constraints supportedCompressions - */ + return ThreatDiscovery; + })(); - /** - * Constructs a new Constraints. - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest - * @classdesc Represents a Constraints. - * @implements IConstraints - * @constructor - * @param {google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.IConstraints=} [properties] Properties to set - */ - function Constraints(properties) { - this.supportedCompressions = []; - 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]]; - } + v1.CreateSubmissionRequest = (function() { - /** - * Constraints maxDiffEntries. - * @member {number} maxDiffEntries - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints - * @instance - */ - Constraints.prototype.maxDiffEntries = 0; + /** + * Properties of a CreateSubmissionRequest. + * @memberof google.cloud.webrisk.v1 + * @interface ICreateSubmissionRequest + * @property {string|null} [parent] CreateSubmissionRequest parent + * @property {google.cloud.webrisk.v1.ISubmission|null} [submission] CreateSubmissionRequest submission + */ - /** - * Constraints maxDatabaseEntries. - * @member {number} maxDatabaseEntries - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints - * @instance - */ - Constraints.prototype.maxDatabaseEntries = 0; + /** + * Constructs a new CreateSubmissionRequest. + * @memberof google.cloud.webrisk.v1 + * @classdesc Represents a CreateSubmissionRequest. + * @implements ICreateSubmissionRequest + * @constructor + * @param {google.cloud.webrisk.v1.ICreateSubmissionRequest=} [properties] Properties to set + */ + function CreateSubmissionRequest(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]]; + } - /** - * Constraints supportedCompressions. - * @member {Array.} supportedCompressions - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints - * @instance - */ - Constraints.prototype.supportedCompressions = $util.emptyArray; + /** + * CreateSubmissionRequest parent. + * @member {string} parent + * @memberof google.cloud.webrisk.v1.CreateSubmissionRequest + * @instance + */ + CreateSubmissionRequest.prototype.parent = ""; - /** - * Creates a new Constraints instance using the specified properties. - * @function create - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints - * @static - * @param {google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.IConstraints=} [properties] Properties to set - * @returns {google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints} Constraints instance - */ - Constraints.create = function create(properties) { - return new Constraints(properties); - }; + /** + * CreateSubmissionRequest submission. + * @member {google.cloud.webrisk.v1.ISubmission|null|undefined} submission + * @memberof google.cloud.webrisk.v1.CreateSubmissionRequest + * @instance + */ + CreateSubmissionRequest.prototype.submission = null; - /** - * Encodes the specified Constraints message. Does not implicitly {@link google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.verify|verify} messages. - * @function encode - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints - * @static - * @param {google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.IConstraints} message Constraints message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Constraints.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.maxDiffEntries != null && Object.hasOwnProperty.call(message, "maxDiffEntries")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.maxDiffEntries); - if (message.maxDatabaseEntries != null && Object.hasOwnProperty.call(message, "maxDatabaseEntries")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxDatabaseEntries); - if (message.supportedCompressions != null && message.supportedCompressions.length) { - writer.uint32(/* id 3, wireType 2 =*/26).fork(); - for (var i = 0; i < message.supportedCompressions.length; ++i) - writer.int32(message.supportedCompressions[i]); - writer.ldelim(); - } - return writer; - }; + /** + * Creates a new CreateSubmissionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.webrisk.v1.CreateSubmissionRequest + * @static + * @param {google.cloud.webrisk.v1.ICreateSubmissionRequest=} [properties] Properties to set + * @returns {google.cloud.webrisk.v1.CreateSubmissionRequest} CreateSubmissionRequest instance + */ + CreateSubmissionRequest.create = function create(properties) { + return new CreateSubmissionRequest(properties); + }; - /** - * Encodes the specified Constraints message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints - * @static - * @param {google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.IConstraints} message Constraints message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Constraints.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Constraints message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints} Constraints - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Constraints.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.maxDiffEntries = reader.int32(); - break; - } - case 2: { - message.maxDatabaseEntries = reader.int32(); - break; - } - case 3: { - if (!(message.supportedCompressions && message.supportedCompressions.length)) - message.supportedCompressions = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.supportedCompressions.push(reader.int32()); - } else - message.supportedCompressions.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Constraints message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints} Constraints - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Constraints.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Constraints message. - * @function verify - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Constraints.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.maxDiffEntries != null && message.hasOwnProperty("maxDiffEntries")) - if (!$util.isInteger(message.maxDiffEntries)) - return "maxDiffEntries: integer expected"; - if (message.maxDatabaseEntries != null && message.hasOwnProperty("maxDatabaseEntries")) - if (!$util.isInteger(message.maxDatabaseEntries)) - return "maxDatabaseEntries: integer expected"; - if (message.supportedCompressions != null && message.hasOwnProperty("supportedCompressions")) { - if (!Array.isArray(message.supportedCompressions)) - return "supportedCompressions: array expected"; - for (var i = 0; i < message.supportedCompressions.length; ++i) - switch (message.supportedCompressions[i]) { - default: - return "supportedCompressions: enum value[] expected"; - case 0: - case 1: - case 2: - break; - } - } - return null; - }; - - /** - * Creates a Constraints message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints} Constraints - */ - Constraints.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints) - return object; - var message = new $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints(); - if (object.maxDiffEntries != null) - message.maxDiffEntries = object.maxDiffEntries | 0; - if (object.maxDatabaseEntries != null) - message.maxDatabaseEntries = object.maxDatabaseEntries | 0; - if (object.supportedCompressions) { - if (!Array.isArray(object.supportedCompressions)) - throw TypeError(".google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.supportedCompressions: array expected"); - message.supportedCompressions = []; - for (var i = 0; i < object.supportedCompressions.length; ++i) - switch (object.supportedCompressions[i]) { - default: - if (typeof object.supportedCompressions[i] === "number") { - message.supportedCompressions[i] = object.supportedCompressions[i]; - break; - } - case "COMPRESSION_TYPE_UNSPECIFIED": - case 0: - message.supportedCompressions[i] = 0; - break; - case "RAW": - case 1: - message.supportedCompressions[i] = 1; - break; - case "RICE": - case 2: - message.supportedCompressions[i] = 2; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a Constraints message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints - * @static - * @param {google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints} message Constraints - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Constraints.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.supportedCompressions = []; - if (options.defaults) { - object.maxDiffEntries = 0; - object.maxDatabaseEntries = 0; - } - if (message.maxDiffEntries != null && message.hasOwnProperty("maxDiffEntries")) - object.maxDiffEntries = message.maxDiffEntries; - if (message.maxDatabaseEntries != null && message.hasOwnProperty("maxDatabaseEntries")) - object.maxDatabaseEntries = message.maxDatabaseEntries; - if (message.supportedCompressions && message.supportedCompressions.length) { - object.supportedCompressions = []; - for (var j = 0; j < message.supportedCompressions.length; ++j) - object.supportedCompressions[j] = options.enums === String ? $root.google.cloud.webrisk.v1beta1.CompressionType[message.supportedCompressions[j]] === undefined ? message.supportedCompressions[j] : $root.google.cloud.webrisk.v1beta1.CompressionType[message.supportedCompressions[j]] : message.supportedCompressions[j]; - } - return object; - }; - - /** - * Converts this Constraints to JSON. - * @function toJSON - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints - * @instance - * @returns {Object.} JSON object - */ - Constraints.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Constraints - * @function getTypeUrl - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Constraints.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints"; - }; - - return Constraints; - })(); - - return ComputeThreatListDiffRequest; - })(); - - v1beta1.ComputeThreatListDiffResponse = (function() { + /** + * Encodes the specified CreateSubmissionRequest message. Does not implicitly {@link google.cloud.webrisk.v1.CreateSubmissionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.webrisk.v1.CreateSubmissionRequest + * @static + * @param {google.cloud.webrisk.v1.ICreateSubmissionRequest} message CreateSubmissionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateSubmissionRequest.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.submission != null && Object.hasOwnProperty.call(message, "submission")) + $root.google.cloud.webrisk.v1.Submission.encode(message.submission, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; /** - * Properties of a ComputeThreatListDiffResponse. - * @memberof google.cloud.webrisk.v1beta1 - * @interface IComputeThreatListDiffResponse - * @property {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType|null} [responseType] ComputeThreatListDiffResponse responseType - * @property {google.cloud.webrisk.v1beta1.IThreatEntryAdditions|null} [additions] ComputeThreatListDiffResponse additions - * @property {google.cloud.webrisk.v1beta1.IThreatEntryRemovals|null} [removals] ComputeThreatListDiffResponse removals - * @property {Uint8Array|null} [newVersionToken] ComputeThreatListDiffResponse newVersionToken - * @property {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.IChecksum|null} [checksum] ComputeThreatListDiffResponse checksum - * @property {google.protobuf.ITimestamp|null} [recommendedNextDiff] ComputeThreatListDiffResponse recommendedNextDiff + * Encodes the specified CreateSubmissionRequest message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1.CreateSubmissionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.webrisk.v1.CreateSubmissionRequest + * @static + * @param {google.cloud.webrisk.v1.ICreateSubmissionRequest} message CreateSubmissionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + CreateSubmissionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Constructs a new ComputeThreatListDiffResponse. - * @memberof google.cloud.webrisk.v1beta1 - * @classdesc Represents a ComputeThreatListDiffResponse. - * @implements IComputeThreatListDiffResponse - * @constructor - * @param {google.cloud.webrisk.v1beta1.IComputeThreatListDiffResponse=} [properties] Properties to set + * Decodes a CreateSubmissionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.webrisk.v1.CreateSubmissionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.webrisk.v1.CreateSubmissionRequest} CreateSubmissionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - function ComputeThreatListDiffResponse(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]]; - } + CreateSubmissionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1.CreateSubmissionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.submission = $root.google.cloud.webrisk.v1.Submission.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * ComputeThreatListDiffResponse responseType. - * @member {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType} responseType - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse - * @instance + * Decodes a CreateSubmissionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.webrisk.v1.CreateSubmissionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.webrisk.v1.CreateSubmissionRequest} CreateSubmissionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ComputeThreatListDiffResponse.prototype.responseType = 0; + CreateSubmissionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * ComputeThreatListDiffResponse additions. - * @member {google.cloud.webrisk.v1beta1.IThreatEntryAdditions|null|undefined} additions - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse - * @instance + * Verifies a CreateSubmissionRequest message. + * @function verify + * @memberof google.cloud.webrisk.v1.CreateSubmissionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ComputeThreatListDiffResponse.prototype.additions = null; - + CreateSubmissionRequest.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.submission != null && message.hasOwnProperty("submission")) { + var error = $root.google.cloud.webrisk.v1.Submission.verify(message.submission); + if (error) + return "submission." + error; + } + return null; + }; + /** - * ComputeThreatListDiffResponse removals. - * @member {google.cloud.webrisk.v1beta1.IThreatEntryRemovals|null|undefined} removals - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse + * Creates a CreateSubmissionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.webrisk.v1.CreateSubmissionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.webrisk.v1.CreateSubmissionRequest} CreateSubmissionRequest + */ + CreateSubmissionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.webrisk.v1.CreateSubmissionRequest) + return object; + var message = new $root.google.cloud.webrisk.v1.CreateSubmissionRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.submission != null) { + if (typeof object.submission !== "object") + throw TypeError(".google.cloud.webrisk.v1.CreateSubmissionRequest.submission: object expected"); + message.submission = $root.google.cloud.webrisk.v1.Submission.fromObject(object.submission); + } + return message; + }; + + /** + * Creates a plain object from a CreateSubmissionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.webrisk.v1.CreateSubmissionRequest + * @static + * @param {google.cloud.webrisk.v1.CreateSubmissionRequest} message CreateSubmissionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateSubmissionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.submission = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.submission != null && message.hasOwnProperty("submission")) + object.submission = $root.google.cloud.webrisk.v1.Submission.toObject(message.submission, options); + return object; + }; + + /** + * Converts this CreateSubmissionRequest to JSON. + * @function toJSON + * @memberof google.cloud.webrisk.v1.CreateSubmissionRequest * @instance + * @returns {Object.} JSON object */ - ComputeThreatListDiffResponse.prototype.removals = null; + CreateSubmissionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * ComputeThreatListDiffResponse newVersionToken. - * @member {Uint8Array} newVersionToken - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse + * Gets the default type url for CreateSubmissionRequest + * @function getTypeUrl + * @memberof google.cloud.webrisk.v1.CreateSubmissionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateSubmissionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.webrisk.v1.CreateSubmissionRequest"; + }; + + return CreateSubmissionRequest; + })(); + + v1.SubmitUriRequest = (function() { + + /** + * Properties of a SubmitUriRequest. + * @memberof google.cloud.webrisk.v1 + * @interface ISubmitUriRequest + * @property {string|null} [parent] SubmitUriRequest parent + * @property {google.cloud.webrisk.v1.ISubmission|null} [submission] SubmitUriRequest submission + * @property {google.cloud.webrisk.v1.IThreatInfo|null} [threatInfo] SubmitUriRequest threatInfo + * @property {google.cloud.webrisk.v1.IThreatDiscovery|null} [threatDiscovery] SubmitUriRequest threatDiscovery + */ + + /** + * Constructs a new SubmitUriRequest. + * @memberof google.cloud.webrisk.v1 + * @classdesc Represents a SubmitUriRequest. + * @implements ISubmitUriRequest + * @constructor + * @param {google.cloud.webrisk.v1.ISubmitUriRequest=} [properties] Properties to set + */ + function SubmitUriRequest(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]]; + } + + /** + * SubmitUriRequest parent. + * @member {string} parent + * @memberof google.cloud.webrisk.v1.SubmitUriRequest * @instance */ - ComputeThreatListDiffResponse.prototype.newVersionToken = $util.newBuffer([]); + SubmitUriRequest.prototype.parent = ""; /** - * ComputeThreatListDiffResponse checksum. - * @member {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.IChecksum|null|undefined} checksum - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse + * SubmitUriRequest submission. + * @member {google.cloud.webrisk.v1.ISubmission|null|undefined} submission + * @memberof google.cloud.webrisk.v1.SubmitUriRequest * @instance */ - ComputeThreatListDiffResponse.prototype.checksum = null; + SubmitUriRequest.prototype.submission = null; /** - * ComputeThreatListDiffResponse recommendedNextDiff. - * @member {google.protobuf.ITimestamp|null|undefined} recommendedNextDiff - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse + * SubmitUriRequest threatInfo. + * @member {google.cloud.webrisk.v1.IThreatInfo|null|undefined} threatInfo + * @memberof google.cloud.webrisk.v1.SubmitUriRequest * @instance */ - ComputeThreatListDiffResponse.prototype.recommendedNextDiff = null; + SubmitUriRequest.prototype.threatInfo = null; /** - * Creates a new ComputeThreatListDiffResponse instance using the specified properties. + * SubmitUriRequest threatDiscovery. + * @member {google.cloud.webrisk.v1.IThreatDiscovery|null|undefined} threatDiscovery + * @memberof google.cloud.webrisk.v1.SubmitUriRequest + * @instance + */ + SubmitUriRequest.prototype.threatDiscovery = null; + + /** + * Creates a new SubmitUriRequest instance using the specified properties. * @function create - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse + * @memberof google.cloud.webrisk.v1.SubmitUriRequest * @static - * @param {google.cloud.webrisk.v1beta1.IComputeThreatListDiffResponse=} [properties] Properties to set - * @returns {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse} ComputeThreatListDiffResponse instance + * @param {google.cloud.webrisk.v1.ISubmitUriRequest=} [properties] Properties to set + * @returns {google.cloud.webrisk.v1.SubmitUriRequest} SubmitUriRequest instance */ - ComputeThreatListDiffResponse.create = function create(properties) { - return new ComputeThreatListDiffResponse(properties); + SubmitUriRequest.create = function create(properties) { + return new SubmitUriRequest(properties); }; /** - * Encodes the specified ComputeThreatListDiffResponse message. Does not implicitly {@link google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.verify|verify} messages. + * Encodes the specified SubmitUriRequest message. Does not implicitly {@link google.cloud.webrisk.v1.SubmitUriRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse + * @memberof google.cloud.webrisk.v1.SubmitUriRequest * @static - * @param {google.cloud.webrisk.v1beta1.IComputeThreatListDiffResponse} message ComputeThreatListDiffResponse message or plain object to encode + * @param {google.cloud.webrisk.v1.ISubmitUriRequest} message SubmitUriRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ComputeThreatListDiffResponse.encode = function encode(message, writer) { + SubmitUriRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.recommendedNextDiff != null && Object.hasOwnProperty.call(message, "recommendedNextDiff")) - $root.google.protobuf.Timestamp.encode(message.recommendedNextDiff, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.responseType); - if (message.additions != null && Object.hasOwnProperty.call(message, "additions")) - $root.google.cloud.webrisk.v1beta1.ThreatEntryAdditions.encode(message.additions, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.removals != null && Object.hasOwnProperty.call(message, "removals")) - $root.google.cloud.webrisk.v1beta1.ThreatEntryRemovals.encode(message.removals, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.newVersionToken != null && Object.hasOwnProperty.call(message, "newVersionToken")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.newVersionToken); - if (message.checksum != null && Object.hasOwnProperty.call(message, "checksum")) - $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum.encode(message.checksum, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.submission != null && Object.hasOwnProperty.call(message, "submission")) + $root.google.cloud.webrisk.v1.Submission.encode(message.submission, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.threatInfo != null && Object.hasOwnProperty.call(message, "threatInfo")) + $root.google.cloud.webrisk.v1.ThreatInfo.encode(message.threatInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.threatDiscovery != null && Object.hasOwnProperty.call(message, "threatDiscovery")) + $root.google.cloud.webrisk.v1.ThreatDiscovery.encode(message.threatDiscovery, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified ComputeThreatListDiffResponse message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.verify|verify} messages. + * Encodes the specified SubmitUriRequest message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1.SubmitUriRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse + * @memberof google.cloud.webrisk.v1.SubmitUriRequest * @static - * @param {google.cloud.webrisk.v1beta1.IComputeThreatListDiffResponse} message ComputeThreatListDiffResponse message or plain object to encode + * @param {google.cloud.webrisk.v1.ISubmitUriRequest} message SubmitUriRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ComputeThreatListDiffResponse.encodeDelimited = function encodeDelimited(message, writer) { + SubmitUriRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ComputeThreatListDiffResponse message from the specified reader or buffer. + * Decodes a SubmitUriRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse + * @memberof google.cloud.webrisk.v1.SubmitUriRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse} ComputeThreatListDiffResponse + * @returns {google.cloud.webrisk.v1.SubmitUriRequest} SubmitUriRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ComputeThreatListDiffResponse.decode = function decode(reader, length) { + SubmitUriRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1.SubmitUriRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: { - message.responseType = reader.int32(); - break; - } - case 5: { - message.additions = $root.google.cloud.webrisk.v1beta1.ThreatEntryAdditions.decode(reader, reader.uint32()); - break; - } - case 6: { - message.removals = $root.google.cloud.webrisk.v1beta1.ThreatEntryRemovals.decode(reader, reader.uint32()); + case 1: { + message.parent = reader.string(); break; } - case 7: { - message.newVersionToken = reader.bytes(); + case 2: { + message.submission = $root.google.cloud.webrisk.v1.Submission.decode(reader, reader.uint32()); break; } - case 8: { - message.checksum = $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum.decode(reader, reader.uint32()); + case 3: { + message.threatInfo = $root.google.cloud.webrisk.v1.ThreatInfo.decode(reader, reader.uint32()); break; } - case 2: { - message.recommendedNextDiff = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 4: { + message.threatDiscovery = $root.google.cloud.webrisk.v1.ThreatDiscovery.decode(reader, reader.uint32()); break; } default: @@ -5721,547 +6283,735 @@ }; /** - * Decodes a ComputeThreatListDiffResponse message from the specified reader or buffer, length delimited. + * Decodes a SubmitUriRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse + * @memberof google.cloud.webrisk.v1.SubmitUriRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse} ComputeThreatListDiffResponse + * @returns {google.cloud.webrisk.v1.SubmitUriRequest} SubmitUriRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ComputeThreatListDiffResponse.decodeDelimited = function decodeDelimited(reader) { + SubmitUriRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ComputeThreatListDiffResponse message. + * Verifies a SubmitUriRequest message. * @function verify - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse + * @memberof google.cloud.webrisk.v1.SubmitUriRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ComputeThreatListDiffResponse.verify = function verify(message) { + SubmitUriRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.responseType != null && message.hasOwnProperty("responseType")) - switch (message.responseType) { - default: - return "responseType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.additions != null && message.hasOwnProperty("additions")) { - var error = $root.google.cloud.webrisk.v1beta1.ThreatEntryAdditions.verify(message.additions); - if (error) - return "additions." + error; - } - if (message.removals != null && message.hasOwnProperty("removals")) { - var error = $root.google.cloud.webrisk.v1beta1.ThreatEntryRemovals.verify(message.removals); + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.submission != null && message.hasOwnProperty("submission")) { + var error = $root.google.cloud.webrisk.v1.Submission.verify(message.submission); if (error) - return "removals." + error; + return "submission." + error; } - if (message.newVersionToken != null && message.hasOwnProperty("newVersionToken")) - if (!(message.newVersionToken && typeof message.newVersionToken.length === "number" || $util.isString(message.newVersionToken))) - return "newVersionToken: buffer expected"; - if (message.checksum != null && message.hasOwnProperty("checksum")) { - var error = $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum.verify(message.checksum); + if (message.threatInfo != null && message.hasOwnProperty("threatInfo")) { + var error = $root.google.cloud.webrisk.v1.ThreatInfo.verify(message.threatInfo); if (error) - return "checksum." + error; + return "threatInfo." + error; } - if (message.recommendedNextDiff != null && message.hasOwnProperty("recommendedNextDiff")) { - var error = $root.google.protobuf.Timestamp.verify(message.recommendedNextDiff); + if (message.threatDiscovery != null && message.hasOwnProperty("threatDiscovery")) { + var error = $root.google.cloud.webrisk.v1.ThreatDiscovery.verify(message.threatDiscovery); if (error) - return "recommendedNextDiff." + error; + return "threatDiscovery." + error; } return null; }; /** - * Creates a ComputeThreatListDiffResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SubmitUriRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse + * @memberof google.cloud.webrisk.v1.SubmitUriRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse} ComputeThreatListDiffResponse + * @returns {google.cloud.webrisk.v1.SubmitUriRequest} SubmitUriRequest */ - ComputeThreatListDiffResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse) + SubmitUriRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.webrisk.v1.SubmitUriRequest) return object; - var message = new $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse(); - switch (object.responseType) { - default: - if (typeof object.responseType === "number") { - message.responseType = object.responseType; - break; - } - break; - case "RESPONSE_TYPE_UNSPECIFIED": - case 0: - message.responseType = 0; - break; - case "DIFF": - case 1: - message.responseType = 1; - break; - case "RESET": - case 2: - message.responseType = 2; - break; + var message = new $root.google.cloud.webrisk.v1.SubmitUriRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.submission != null) { + if (typeof object.submission !== "object") + throw TypeError(".google.cloud.webrisk.v1.SubmitUriRequest.submission: object expected"); + message.submission = $root.google.cloud.webrisk.v1.Submission.fromObject(object.submission); } - if (object.additions != null) { - if (typeof object.additions !== "object") - throw TypeError(".google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.additions: object expected"); - message.additions = $root.google.cloud.webrisk.v1beta1.ThreatEntryAdditions.fromObject(object.additions); + if (object.threatInfo != null) { + if (typeof object.threatInfo !== "object") + throw TypeError(".google.cloud.webrisk.v1.SubmitUriRequest.threatInfo: object expected"); + message.threatInfo = $root.google.cloud.webrisk.v1.ThreatInfo.fromObject(object.threatInfo); } - if (object.removals != null) { - if (typeof object.removals !== "object") - throw TypeError(".google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.removals: object expected"); - message.removals = $root.google.cloud.webrisk.v1beta1.ThreatEntryRemovals.fromObject(object.removals); - } - if (object.newVersionToken != null) - if (typeof object.newVersionToken === "string") - $util.base64.decode(object.newVersionToken, message.newVersionToken = $util.newBuffer($util.base64.length(object.newVersionToken)), 0); - else if (object.newVersionToken.length >= 0) - message.newVersionToken = object.newVersionToken; - if (object.checksum != null) { - if (typeof object.checksum !== "object") - throw TypeError(".google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.checksum: object expected"); - message.checksum = $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum.fromObject(object.checksum); - } - if (object.recommendedNextDiff != null) { - if (typeof object.recommendedNextDiff !== "object") - throw TypeError(".google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.recommendedNextDiff: object expected"); - message.recommendedNextDiff = $root.google.protobuf.Timestamp.fromObject(object.recommendedNextDiff); + if (object.threatDiscovery != null) { + if (typeof object.threatDiscovery !== "object") + throw TypeError(".google.cloud.webrisk.v1.SubmitUriRequest.threatDiscovery: object expected"); + message.threatDiscovery = $root.google.cloud.webrisk.v1.ThreatDiscovery.fromObject(object.threatDiscovery); } return message; }; /** - * Creates a plain object from a ComputeThreatListDiffResponse message. Also converts values to other types if specified. + * Creates a plain object from a SubmitUriRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse + * @memberof google.cloud.webrisk.v1.SubmitUriRequest * @static - * @param {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse} message ComputeThreatListDiffResponse + * @param {google.cloud.webrisk.v1.SubmitUriRequest} message SubmitUriRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ComputeThreatListDiffResponse.toObject = function toObject(message, options) { + SubmitUriRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.recommendedNextDiff = null; - object.responseType = options.enums === String ? "RESPONSE_TYPE_UNSPECIFIED" : 0; - object.additions = null; - object.removals = null; - if (options.bytes === String) - object.newVersionToken = ""; - else { - object.newVersionToken = []; - if (options.bytes !== Array) - object.newVersionToken = $util.newBuffer(object.newVersionToken); - } - object.checksum = null; + object.parent = ""; + object.submission = null; + object.threatInfo = null; + object.threatDiscovery = null; } - if (message.recommendedNextDiff != null && message.hasOwnProperty("recommendedNextDiff")) - object.recommendedNextDiff = $root.google.protobuf.Timestamp.toObject(message.recommendedNextDiff, options); - if (message.responseType != null && message.hasOwnProperty("responseType")) - object.responseType = options.enums === String ? $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType[message.responseType] === undefined ? message.responseType : $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType[message.responseType] : message.responseType; - if (message.additions != null && message.hasOwnProperty("additions")) - object.additions = $root.google.cloud.webrisk.v1beta1.ThreatEntryAdditions.toObject(message.additions, options); - if (message.removals != null && message.hasOwnProperty("removals")) - object.removals = $root.google.cloud.webrisk.v1beta1.ThreatEntryRemovals.toObject(message.removals, options); - if (message.newVersionToken != null && message.hasOwnProperty("newVersionToken")) - object.newVersionToken = options.bytes === String ? $util.base64.encode(message.newVersionToken, 0, message.newVersionToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.newVersionToken) : message.newVersionToken; - if (message.checksum != null && message.hasOwnProperty("checksum")) - object.checksum = $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum.toObject(message.checksum, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.submission != null && message.hasOwnProperty("submission")) + object.submission = $root.google.cloud.webrisk.v1.Submission.toObject(message.submission, options); + if (message.threatInfo != null && message.hasOwnProperty("threatInfo")) + object.threatInfo = $root.google.cloud.webrisk.v1.ThreatInfo.toObject(message.threatInfo, options); + if (message.threatDiscovery != null && message.hasOwnProperty("threatDiscovery")) + object.threatDiscovery = $root.google.cloud.webrisk.v1.ThreatDiscovery.toObject(message.threatDiscovery, options); return object; }; /** - * Converts this ComputeThreatListDiffResponse to JSON. + * Converts this SubmitUriRequest to JSON. * @function toJSON - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse + * @memberof google.cloud.webrisk.v1.SubmitUriRequest * @instance * @returns {Object.} JSON object */ - ComputeThreatListDiffResponse.prototype.toJSON = function toJSON() { + SubmitUriRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ComputeThreatListDiffResponse + * Gets the default type url for SubmitUriRequest * @function getTypeUrl - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse + * @memberof google.cloud.webrisk.v1.SubmitUriRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ComputeThreatListDiffResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SubmitUriRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse"; + return typeUrlPrefix + "/google.cloud.webrisk.v1.SubmitUriRequest"; }; - ComputeThreatListDiffResponse.Checksum = (function() { + return SubmitUriRequest; + })(); - /** - * Properties of a Checksum. - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse - * @interface IChecksum - * @property {Uint8Array|null} [sha256] Checksum sha256 - */ + v1.SubmitUriMetadata = (function() { - /** - * Constructs a new Checksum. - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse - * @classdesc Represents a Checksum. - * @implements IChecksum - * @constructor - * @param {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.IChecksum=} [properties] Properties to set - */ - function Checksum(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]]; - } + /** + * Properties of a SubmitUriMetadata. + * @memberof google.cloud.webrisk.v1 + * @interface ISubmitUriMetadata + * @property {google.cloud.webrisk.v1.SubmitUriMetadata.State|null} [state] SubmitUriMetadata state + * @property {google.protobuf.ITimestamp|null} [createTime] SubmitUriMetadata createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] SubmitUriMetadata updateTime + */ - /** - * Checksum sha256. - * @member {Uint8Array} sha256 - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum - * @instance - */ - Checksum.prototype.sha256 = $util.newBuffer([]); + /** + * Constructs a new SubmitUriMetadata. + * @memberof google.cloud.webrisk.v1 + * @classdesc Represents a SubmitUriMetadata. + * @implements ISubmitUriMetadata + * @constructor + * @param {google.cloud.webrisk.v1.ISubmitUriMetadata=} [properties] Properties to set + */ + function SubmitUriMetadata(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]]; + } - /** - * Creates a new Checksum instance using the specified properties. - * @function create - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum - * @static - * @param {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.IChecksum=} [properties] Properties to set - * @returns {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum} Checksum instance - */ - Checksum.create = function create(properties) { - return new Checksum(properties); - }; + /** + * SubmitUriMetadata state. + * @member {google.cloud.webrisk.v1.SubmitUriMetadata.State} state + * @memberof google.cloud.webrisk.v1.SubmitUriMetadata + * @instance + */ + SubmitUriMetadata.prototype.state = 0; - /** - * Encodes the specified Checksum message. Does not implicitly {@link google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum.verify|verify} messages. - * @function encode - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum - * @static - * @param {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.IChecksum} message Checksum message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Checksum.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sha256 != null && Object.hasOwnProperty.call(message, "sha256")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.sha256); - return writer; - }; + /** + * SubmitUriMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.webrisk.v1.SubmitUriMetadata + * @instance + */ + SubmitUriMetadata.prototype.createTime = null; - /** - * Encodes the specified Checksum message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum - * @static - * @param {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.IChecksum} message Checksum message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Checksum.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * SubmitUriMetadata updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.webrisk.v1.SubmitUriMetadata + * @instance + */ + SubmitUriMetadata.prototype.updateTime = null; - /** - * Decodes a Checksum message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum} Checksum - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Checksum.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.sha256 = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Creates a new SubmitUriMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.webrisk.v1.SubmitUriMetadata + * @static + * @param {google.cloud.webrisk.v1.ISubmitUriMetadata=} [properties] Properties to set + * @returns {google.cloud.webrisk.v1.SubmitUriMetadata} SubmitUriMetadata instance + */ + SubmitUriMetadata.create = function create(properties) { + return new SubmitUriMetadata(properties); + }; + + /** + * Encodes the specified SubmitUriMetadata message. Does not implicitly {@link google.cloud.webrisk.v1.SubmitUriMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.webrisk.v1.SubmitUriMetadata + * @static + * @param {google.cloud.webrisk.v1.ISubmitUriMetadata} message SubmitUriMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubmitUriMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SubmitUriMetadata message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1.SubmitUriMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.webrisk.v1.SubmitUriMetadata + * @static + * @param {google.cloud.webrisk.v1.ISubmitUriMetadata} message SubmitUriMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubmitUriMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SubmitUriMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.webrisk.v1.SubmitUriMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.webrisk.v1.SubmitUriMetadata} SubmitUriMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubmitUriMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1.SubmitUriMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.state = reader.int32(); + break; + } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Decodes a Checksum message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum} Checksum - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Checksum.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a SubmitUriMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.webrisk.v1.SubmitUriMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.webrisk.v1.SubmitUriMetadata} SubmitUriMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubmitUriMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a Checksum message. - * @function verify - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Checksum.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sha256 != null && message.hasOwnProperty("sha256")) - if (!(message.sha256 && typeof message.sha256.length === "number" || $util.isString(message.sha256))) - return "sha256: buffer expected"; - return null; - }; - - /** - * Creates a Checksum message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum} Checksum - */ - Checksum.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum) - return object; - var message = new $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum(); - if (object.sha256 != null) - if (typeof object.sha256 === "string") - $util.base64.decode(object.sha256, message.sha256 = $util.newBuffer($util.base64.length(object.sha256)), 0); - else if (object.sha256.length >= 0) - message.sha256 = object.sha256; - return message; - }; + /** + * Verifies a SubmitUriMetadata message. + * @function verify + * @memberof google.cloud.webrisk.v1.SubmitUriMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SubmitUriMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + 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; + } + return null; + }; - /** - * Creates a plain object from a Checksum message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum - * @static - * @param {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum} message Checksum - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Checksum.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if (options.bytes === String) - object.sha256 = ""; - else { - object.sha256 = []; - if (options.bytes !== Array) - object.sha256 = $util.newBuffer(object.sha256); - } - if (message.sha256 != null && message.hasOwnProperty("sha256")) - object.sha256 = options.bytes === String ? $util.base64.encode(message.sha256, 0, message.sha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.sha256) : message.sha256; + /** + * Creates a SubmitUriMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.webrisk.v1.SubmitUriMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.webrisk.v1.SubmitUriMetadata} SubmitUriMetadata + */ + SubmitUriMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.webrisk.v1.SubmitUriMetadata) return object; - }; + var message = new $root.google.cloud.webrisk.v1.SubmitUriMetadata(); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "RUNNING": + case 1: + message.state = 1; + break; + case "SUCCEEDED": + case 2: + message.state = 2; + break; + case "CANCELLED": + case 3: + message.state = 3; + break; + case "FAILED": + case 4: + message.state = 4; + break; + case "CLOSED": + case 5: + message.state = 5; + break; + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.webrisk.v1.SubmitUriMetadata.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.webrisk.v1.SubmitUriMetadata.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; - /** - * Converts this Checksum to JSON. - * @function toJSON - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum - * @instance - * @returns {Object.} JSON object - */ - Checksum.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a SubmitUriMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.webrisk.v1.SubmitUriMetadata + * @static + * @param {google.cloud.webrisk.v1.SubmitUriMetadata} message SubmitUriMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SubmitUriMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.createTime = null; + object.updateTime = null; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.webrisk.v1.SubmitUriMetadata.State[message.state] === undefined ? message.state : $root.google.cloud.webrisk.v1.SubmitUriMetadata.State[message.state] : message.state; + 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); + return object; + }; - /** - * Gets the default type url for Checksum - * @function getTypeUrl - * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Checksum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum"; - }; + /** + * Converts this SubmitUriMetadata to JSON. + * @function toJSON + * @memberof google.cloud.webrisk.v1.SubmitUriMetadata + * @instance + * @returns {Object.} JSON object + */ + SubmitUriMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Checksum; - })(); + /** + * Gets the default type url for SubmitUriMetadata + * @function getTypeUrl + * @memberof google.cloud.webrisk.v1.SubmitUriMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SubmitUriMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.webrisk.v1.SubmitUriMetadata"; + }; /** - * ResponseType enum. - * @name google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType + * State enum. + * @name google.cloud.webrisk.v1.SubmitUriMetadata.State * @enum {number} - * @property {number} RESPONSE_TYPE_UNSPECIFIED=0 RESPONSE_TYPE_UNSPECIFIED value - * @property {number} DIFF=1 DIFF value - * @property {number} RESET=2 RESET value - */ - ComputeThreatListDiffResponse.ResponseType = (function() { + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} RUNNING=1 RUNNING value + * @property {number} SUCCEEDED=2 SUCCEEDED value + * @property {number} CANCELLED=3 CANCELLED value + * @property {number} FAILED=4 FAILED value + * @property {number} CLOSED=5 CLOSED value + */ + SubmitUriMetadata.State = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RESPONSE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DIFF"] = 1; - values[valuesById[2] = "RESET"] = 2; + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "SUCCEEDED"] = 2; + values[valuesById[3] = "CANCELLED"] = 3; + values[valuesById[4] = "FAILED"] = 4; + values[valuesById[5] = "CLOSED"] = 5; return values; })(); - return ComputeThreatListDiffResponse; + return SubmitUriMetadata; })(); - v1beta1.SearchUrisRequest = (function() { + return v1; + })(); - /** - * Properties of a SearchUrisRequest. - * @memberof google.cloud.webrisk.v1beta1 - * @interface ISearchUrisRequest - * @property {string|null} [uri] SearchUrisRequest uri - * @property {Array.|null} [threatTypes] SearchUrisRequest threatTypes - */ + webrisk.v1beta1 = (function() { + + /** + * Namespace v1beta1. + * @memberof google.cloud.webrisk + * @namespace + */ + var v1beta1 = {}; + + v1beta1.WebRiskServiceV1Beta1 = (function() { /** - * Constructs a new SearchUrisRequest. + * Constructs a new WebRiskServiceV1Beta1 service. * @memberof google.cloud.webrisk.v1beta1 - * @classdesc Represents a SearchUrisRequest. - * @implements ISearchUrisRequest + * @classdesc Represents a WebRiskServiceV1Beta1 + * @extends $protobuf.rpc.Service * @constructor - * @param {google.cloud.webrisk.v1beta1.ISearchUrisRequest=} [properties] Properties to set + * @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 SearchUrisRequest(properties) { - this.threatTypes = []; - 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]]; + function WebRiskServiceV1Beta1(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } + (WebRiskServiceV1Beta1.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = WebRiskServiceV1Beta1; + /** - * SearchUrisRequest uri. - * @member {string} uri - * @memberof google.cloud.webrisk.v1beta1.SearchUrisRequest - * @instance + * Creates new WebRiskServiceV1Beta1 service using the specified rpc implementation. + * @function create + * @memberof google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1 + * @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 {WebRiskServiceV1Beta1} RPC service. Useful where requests and/or responses are streamed. */ - SearchUrisRequest.prototype.uri = ""; + WebRiskServiceV1Beta1.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * SearchUrisRequest threatTypes. - * @member {Array.} threatTypes - * @memberof google.cloud.webrisk.v1beta1.SearchUrisRequest - * @instance + * Callback as used by {@link google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1|computeThreatListDiff}. + * @memberof google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1 + * @typedef ComputeThreatListDiffCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse} [response] ComputeThreatListDiffResponse */ - SearchUrisRequest.prototype.threatTypes = $util.emptyArray; /** - * Creates a new SearchUrisRequest instance using the specified properties. - * @function create - * @memberof google.cloud.webrisk.v1beta1.SearchUrisRequest - * @static - * @param {google.cloud.webrisk.v1beta1.ISearchUrisRequest=} [properties] Properties to set - * @returns {google.cloud.webrisk.v1beta1.SearchUrisRequest} SearchUrisRequest instance + * Calls ComputeThreatListDiff. + * @function computeThreatListDiff + * @memberof google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1 + * @instance + * @param {google.cloud.webrisk.v1beta1.IComputeThreatListDiffRequest} request ComputeThreatListDiffRequest message or plain object + * @param {google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1.ComputeThreatListDiffCallback} callback Node-style callback called with the error, if any, and ComputeThreatListDiffResponse + * @returns {undefined} + * @variation 1 */ - SearchUrisRequest.create = function create(properties) { - return new SearchUrisRequest(properties); - }; + Object.defineProperty(WebRiskServiceV1Beta1.prototype.computeThreatListDiff = function computeThreatListDiff(request, callback) { + return this.rpcCall(computeThreatListDiff, $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest, $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse, request, callback); + }, "name", { value: "ComputeThreatListDiff" }); /** - * Encodes the specified SearchUrisRequest message. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchUrisRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.webrisk.v1beta1.SearchUrisRequest + * Calls ComputeThreatListDiff. + * @function computeThreatListDiff + * @memberof google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1 + * @instance + * @param {google.cloud.webrisk.v1beta1.IComputeThreatListDiffRequest} request ComputeThreatListDiffRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1|searchUris}. + * @memberof google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1 + * @typedef SearchUrisCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.webrisk.v1beta1.SearchUrisResponse} [response] SearchUrisResponse + */ + + /** + * Calls SearchUris. + * @function searchUris + * @memberof google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1 + * @instance + * @param {google.cloud.webrisk.v1beta1.ISearchUrisRequest} request SearchUrisRequest message or plain object + * @param {google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1.SearchUrisCallback} callback Node-style callback called with the error, if any, and SearchUrisResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(WebRiskServiceV1Beta1.prototype.searchUris = function searchUris(request, callback) { + return this.rpcCall(searchUris, $root.google.cloud.webrisk.v1beta1.SearchUrisRequest, $root.google.cloud.webrisk.v1beta1.SearchUrisResponse, request, callback); + }, "name", { value: "SearchUris" }); + + /** + * Calls SearchUris. + * @function searchUris + * @memberof google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1 + * @instance + * @param {google.cloud.webrisk.v1beta1.ISearchUrisRequest} request SearchUrisRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1|searchHashes}. + * @memberof google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1 + * @typedef SearchHashesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.webrisk.v1beta1.SearchHashesResponse} [response] SearchHashesResponse + */ + + /** + * Calls SearchHashes. + * @function searchHashes + * @memberof google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1 + * @instance + * @param {google.cloud.webrisk.v1beta1.ISearchHashesRequest} request SearchHashesRequest message or plain object + * @param {google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1.SearchHashesCallback} callback Node-style callback called with the error, if any, and SearchHashesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(WebRiskServiceV1Beta1.prototype.searchHashes = function searchHashes(request, callback) { + return this.rpcCall(searchHashes, $root.google.cloud.webrisk.v1beta1.SearchHashesRequest, $root.google.cloud.webrisk.v1beta1.SearchHashesResponse, request, callback); + }, "name", { value: "SearchHashes" }); + + /** + * Calls SearchHashes. + * @function searchHashes + * @memberof google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1 + * @instance + * @param {google.cloud.webrisk.v1beta1.ISearchHashesRequest} request SearchHashesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return WebRiskServiceV1Beta1; + })(); + + v1beta1.ComputeThreatListDiffRequest = (function() { + + /** + * Properties of a ComputeThreatListDiffRequest. + * @memberof google.cloud.webrisk.v1beta1 + * @interface IComputeThreatListDiffRequest + * @property {google.cloud.webrisk.v1beta1.ThreatType|null} [threatType] ComputeThreatListDiffRequest threatType + * @property {Uint8Array|null} [versionToken] ComputeThreatListDiffRequest versionToken + * @property {google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.IConstraints|null} [constraints] ComputeThreatListDiffRequest constraints + */ + + /** + * Constructs a new ComputeThreatListDiffRequest. + * @memberof google.cloud.webrisk.v1beta1 + * @classdesc Represents a ComputeThreatListDiffRequest. + * @implements IComputeThreatListDiffRequest + * @constructor + * @param {google.cloud.webrisk.v1beta1.IComputeThreatListDiffRequest=} [properties] Properties to set + */ + function ComputeThreatListDiffRequest(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]]; + } + + /** + * ComputeThreatListDiffRequest threatType. + * @member {google.cloud.webrisk.v1beta1.ThreatType} threatType + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest + * @instance + */ + ComputeThreatListDiffRequest.prototype.threatType = 0; + + /** + * ComputeThreatListDiffRequest versionToken. + * @member {Uint8Array} versionToken + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest + * @instance + */ + ComputeThreatListDiffRequest.prototype.versionToken = $util.newBuffer([]); + + /** + * ComputeThreatListDiffRequest constraints. + * @member {google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.IConstraints|null|undefined} constraints + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest + * @instance + */ + ComputeThreatListDiffRequest.prototype.constraints = null; + + /** + * Creates a new ComputeThreatListDiffRequest instance using the specified properties. + * @function create + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest * @static - * @param {google.cloud.webrisk.v1beta1.ISearchUrisRequest} message SearchUrisRequest message or plain object to encode + * @param {google.cloud.webrisk.v1beta1.IComputeThreatListDiffRequest=} [properties] Properties to set + * @returns {google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest} ComputeThreatListDiffRequest instance + */ + ComputeThreatListDiffRequest.create = function create(properties) { + return new ComputeThreatListDiffRequest(properties); + }; + + /** + * Encodes the specified ComputeThreatListDiffRequest message. Does not implicitly {@link google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest + * @static + * @param {google.cloud.webrisk.v1beta1.IComputeThreatListDiffRequest} message ComputeThreatListDiffRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchUrisRequest.encode = function encode(message, writer) { + ComputeThreatListDiffRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); - if (message.threatTypes != null && message.threatTypes.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.threatTypes.length; ++i) - writer.int32(message.threatTypes[i]); - writer.ldelim(); - } + if (message.threatType != null && Object.hasOwnProperty.call(message, "threatType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.threatType); + if (message.versionToken != null && Object.hasOwnProperty.call(message, "versionToken")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.versionToken); + if (message.constraints != null && Object.hasOwnProperty.call(message, "constraints")) + $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.encode(message.constraints, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified SearchUrisRequest message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchUrisRequest.verify|verify} messages. + * Encodes the specified ComputeThreatListDiffRequest message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.webrisk.v1beta1.SearchUrisRequest + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest * @static - * @param {google.cloud.webrisk.v1beta1.ISearchUrisRequest} message SearchUrisRequest message or plain object to encode + * @param {google.cloud.webrisk.v1beta1.IComputeThreatListDiffRequest} message ComputeThreatListDiffRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchUrisRequest.encodeDelimited = function encodeDelimited(message, writer) { + ComputeThreatListDiffRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SearchUrisRequest message from the specified reader or buffer. + * Decodes a ComputeThreatListDiffRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.webrisk.v1beta1.SearchUrisRequest + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.webrisk.v1beta1.SearchUrisRequest} SearchUrisRequest + * @returns {google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest} ComputeThreatListDiffRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchUrisRequest.decode = function decode(reader, length) { + ComputeThreatListDiffRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1beta1.SearchUrisRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.uri = reader.string(); + message.threatType = reader.int32(); break; } case 2: { - if (!(message.threatTypes && message.threatTypes.length)) - message.threatTypes = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.threatTypes.push(reader.int32()); - } else - message.threatTypes.push(reader.int32()); + message.versionToken = reader.bytes(); + break; + } + case 3: { + message.constraints = $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.decode(reader, reader.uint32()); break; } default: @@ -6273,480 +7023,297 @@ }; /** - * Decodes a SearchUrisRequest message from the specified reader or buffer, length delimited. + * Decodes a ComputeThreatListDiffRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.webrisk.v1beta1.SearchUrisRequest + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.webrisk.v1beta1.SearchUrisRequest} SearchUrisRequest + * @returns {google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest} ComputeThreatListDiffRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchUrisRequest.decodeDelimited = function decodeDelimited(reader) { + ComputeThreatListDiffRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SearchUrisRequest message. + * Verifies a ComputeThreatListDiffRequest message. * @function verify - * @memberof google.cloud.webrisk.v1beta1.SearchUrisRequest + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SearchUrisRequest.verify = function verify(message) { + ComputeThreatListDiffRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.threatTypes != null && message.hasOwnProperty("threatTypes")) { - if (!Array.isArray(message.threatTypes)) - return "threatTypes: array expected"; - for (var i = 0; i < message.threatTypes.length; ++i) - switch (message.threatTypes[i]) { - default: - return "threatTypes: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - break; - } + if (message.threatType != null && message.hasOwnProperty("threatType")) + switch (message.threatType) { + default: + return "threatType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.versionToken != null && message.hasOwnProperty("versionToken")) + if (!(message.versionToken && typeof message.versionToken.length === "number" || $util.isString(message.versionToken))) + return "versionToken: buffer expected"; + if (message.constraints != null && message.hasOwnProperty("constraints")) { + var error = $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.verify(message.constraints); + if (error) + return "constraints." + error; } return null; }; /** - * Creates a SearchUrisRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ComputeThreatListDiffRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.webrisk.v1beta1.SearchUrisRequest + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.webrisk.v1beta1.SearchUrisRequest} SearchUrisRequest + * @returns {google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest} ComputeThreatListDiffRequest */ - SearchUrisRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.webrisk.v1beta1.SearchUrisRequest) + ComputeThreatListDiffRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest) return object; - var message = new $root.google.cloud.webrisk.v1beta1.SearchUrisRequest(); - if (object.uri != null) - message.uri = String(object.uri); - if (object.threatTypes) { - if (!Array.isArray(object.threatTypes)) - throw TypeError(".google.cloud.webrisk.v1beta1.SearchUrisRequest.threatTypes: array expected"); - message.threatTypes = []; - for (var i = 0; i < object.threatTypes.length; ++i) - switch (object.threatTypes[i]) { - default: - if (typeof object.threatTypes[i] === "number") { - message.threatTypes[i] = object.threatTypes[i]; - break; - } - case "THREAT_TYPE_UNSPECIFIED": - case 0: - message.threatTypes[i] = 0; - break; - case "MALWARE": - case 1: - message.threatTypes[i] = 1; - break; - case "SOCIAL_ENGINEERING": - case 2: - message.threatTypes[i] = 2; - break; - case "UNWANTED_SOFTWARE": - case 3: - message.threatTypes[i] = 3; - break; - } + var message = new $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest(); + switch (object.threatType) { + default: + if (typeof object.threatType === "number") { + message.threatType = object.threatType; + break; + } + break; + case "THREAT_TYPE_UNSPECIFIED": + case 0: + message.threatType = 0; + break; + case "MALWARE": + case 1: + message.threatType = 1; + break; + case "SOCIAL_ENGINEERING": + case 2: + message.threatType = 2; + break; + case "UNWANTED_SOFTWARE": + case 3: + message.threatType = 3; + break; + } + if (object.versionToken != null) + if (typeof object.versionToken === "string") + $util.base64.decode(object.versionToken, message.versionToken = $util.newBuffer($util.base64.length(object.versionToken)), 0); + else if (object.versionToken.length >= 0) + message.versionToken = object.versionToken; + if (object.constraints != null) { + if (typeof object.constraints !== "object") + throw TypeError(".google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.constraints: object expected"); + message.constraints = $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.fromObject(object.constraints); } return message; }; /** - * Creates a plain object from a SearchUrisRequest message. Also converts values to other types if specified. + * Creates a plain object from a ComputeThreatListDiffRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.webrisk.v1beta1.SearchUrisRequest + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest * @static - * @param {google.cloud.webrisk.v1beta1.SearchUrisRequest} message SearchUrisRequest + * @param {google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest} message ComputeThreatListDiffRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SearchUrisRequest.toObject = function toObject(message, options) { + ComputeThreatListDiffRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.threatTypes = []; - if (options.defaults) - object.uri = ""; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.threatTypes && message.threatTypes.length) { - object.threatTypes = []; - for (var j = 0; j < message.threatTypes.length; ++j) - object.threatTypes[j] = options.enums === String ? $root.google.cloud.webrisk.v1beta1.ThreatType[message.threatTypes[j]] === undefined ? message.threatTypes[j] : $root.google.cloud.webrisk.v1beta1.ThreatType[message.threatTypes[j]] : message.threatTypes[j]; + if (options.defaults) { + object.threatType = options.enums === String ? "THREAT_TYPE_UNSPECIFIED" : 0; + if (options.bytes === String) + object.versionToken = ""; + else { + object.versionToken = []; + if (options.bytes !== Array) + object.versionToken = $util.newBuffer(object.versionToken); + } + object.constraints = null; } + if (message.threatType != null && message.hasOwnProperty("threatType")) + object.threatType = options.enums === String ? $root.google.cloud.webrisk.v1beta1.ThreatType[message.threatType] === undefined ? message.threatType : $root.google.cloud.webrisk.v1beta1.ThreatType[message.threatType] : message.threatType; + if (message.versionToken != null && message.hasOwnProperty("versionToken")) + object.versionToken = options.bytes === String ? $util.base64.encode(message.versionToken, 0, message.versionToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.versionToken) : message.versionToken; + if (message.constraints != null && message.hasOwnProperty("constraints")) + object.constraints = $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.toObject(message.constraints, options); return object; }; /** - * Converts this SearchUrisRequest to JSON. + * Converts this ComputeThreatListDiffRequest to JSON. * @function toJSON - * @memberof google.cloud.webrisk.v1beta1.SearchUrisRequest + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest * @instance * @returns {Object.} JSON object */ - SearchUrisRequest.prototype.toJSON = function toJSON() { + ComputeThreatListDiffRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SearchUrisRequest + * Gets the default type url for ComputeThreatListDiffRequest * @function getTypeUrl - * @memberof google.cloud.webrisk.v1beta1.SearchUrisRequest + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SearchUrisRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ComputeThreatListDiffRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.webrisk.v1beta1.SearchUrisRequest"; + return typeUrlPrefix + "/google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest"; }; - return SearchUrisRequest; - })(); - - v1beta1.SearchUrisResponse = (function() { + ComputeThreatListDiffRequest.Constraints = (function() { - /** - * Properties of a SearchUrisResponse. - * @memberof google.cloud.webrisk.v1beta1 - * @interface ISearchUrisResponse - * @property {google.cloud.webrisk.v1beta1.SearchUrisResponse.IThreatUri|null} [threat] SearchUrisResponse threat - */ + /** + * Properties of a Constraints. + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest + * @interface IConstraints + * @property {number|null} [maxDiffEntries] Constraints maxDiffEntries + * @property {number|null} [maxDatabaseEntries] Constraints maxDatabaseEntries + * @property {Array.|null} [supportedCompressions] Constraints supportedCompressions + */ - /** - * Constructs a new SearchUrisResponse. - * @memberof google.cloud.webrisk.v1beta1 - * @classdesc Represents a SearchUrisResponse. - * @implements ISearchUrisResponse - * @constructor - * @param {google.cloud.webrisk.v1beta1.ISearchUrisResponse=} [properties] Properties to set - */ - function SearchUrisResponse(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]]; - } + /** + * Constructs a new Constraints. + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest + * @classdesc Represents a Constraints. + * @implements IConstraints + * @constructor + * @param {google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.IConstraints=} [properties] Properties to set + */ + function Constraints(properties) { + this.supportedCompressions = []; + 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]]; + } - /** - * SearchUrisResponse threat. - * @member {google.cloud.webrisk.v1beta1.SearchUrisResponse.IThreatUri|null|undefined} threat - * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse - * @instance - */ - SearchUrisResponse.prototype.threat = null; + /** + * Constraints maxDiffEntries. + * @member {number} maxDiffEntries + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints + * @instance + */ + Constraints.prototype.maxDiffEntries = 0; - /** - * Creates a new SearchUrisResponse instance using the specified properties. - * @function create - * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse - * @static - * @param {google.cloud.webrisk.v1beta1.ISearchUrisResponse=} [properties] Properties to set - * @returns {google.cloud.webrisk.v1beta1.SearchUrisResponse} SearchUrisResponse instance - */ - SearchUrisResponse.create = function create(properties) { - return new SearchUrisResponse(properties); - }; + /** + * Constraints maxDatabaseEntries. + * @member {number} maxDatabaseEntries + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints + * @instance + */ + Constraints.prototype.maxDatabaseEntries = 0; - /** - * Encodes the specified SearchUrisResponse message. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchUrisResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse - * @static - * @param {google.cloud.webrisk.v1beta1.ISearchUrisResponse} message SearchUrisResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchUrisResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.threat != null && Object.hasOwnProperty.call(message, "threat")) - $root.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri.encode(message.threat, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * Constraints supportedCompressions. + * @member {Array.} supportedCompressions + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints + * @instance + */ + Constraints.prototype.supportedCompressions = $util.emptyArray; - /** - * Encodes the specified SearchUrisResponse message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchUrisResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse - * @static - * @param {google.cloud.webrisk.v1beta1.ISearchUrisResponse} message SearchUrisResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchUrisResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SearchUrisResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.webrisk.v1beta1.SearchUrisResponse} SearchUrisResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchUrisResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1beta1.SearchUrisResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.threat = $root.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SearchUrisResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.webrisk.v1beta1.SearchUrisResponse} SearchUrisResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchUrisResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SearchUrisResponse message. - * @function verify - * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SearchUrisResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.threat != null && message.hasOwnProperty("threat")) { - var error = $root.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri.verify(message.threat); - if (error) - return "threat." + error; - } - return null; - }; - - /** - * Creates a SearchUrisResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.webrisk.v1beta1.SearchUrisResponse} SearchUrisResponse - */ - SearchUrisResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.webrisk.v1beta1.SearchUrisResponse) - return object; - var message = new $root.google.cloud.webrisk.v1beta1.SearchUrisResponse(); - if (object.threat != null) { - if (typeof object.threat !== "object") - throw TypeError(".google.cloud.webrisk.v1beta1.SearchUrisResponse.threat: object expected"); - message.threat = $root.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri.fromObject(object.threat); - } - return message; - }; - - /** - * Creates a plain object from a SearchUrisResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse - * @static - * @param {google.cloud.webrisk.v1beta1.SearchUrisResponse} message SearchUrisResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SearchUrisResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.threat = null; - if (message.threat != null && message.hasOwnProperty("threat")) - object.threat = $root.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri.toObject(message.threat, options); - return object; - }; - - /** - * Converts this SearchUrisResponse to JSON. - * @function toJSON - * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse - * @instance - * @returns {Object.} JSON object - */ - SearchUrisResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SearchUrisResponse - * @function getTypeUrl - * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SearchUrisResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.webrisk.v1beta1.SearchUrisResponse"; - }; - - SearchUrisResponse.ThreatUri = (function() { - - /** - * Properties of a ThreatUri. - * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse - * @interface IThreatUri - * @property {Array.|null} [threatTypes] ThreatUri threatTypes - * @property {google.protobuf.ITimestamp|null} [expireTime] ThreatUri expireTime - */ - - /** - * Constructs a new ThreatUri. - * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse - * @classdesc Represents a ThreatUri. - * @implements IThreatUri - * @constructor - * @param {google.cloud.webrisk.v1beta1.SearchUrisResponse.IThreatUri=} [properties] Properties to set - */ - function ThreatUri(properties) { - this.threatTypes = []; - 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]]; - } - - /** - * ThreatUri threatTypes. - * @member {Array.} threatTypes - * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri - * @instance - */ - ThreatUri.prototype.threatTypes = $util.emptyArray; - - /** - * ThreatUri expireTime. - * @member {google.protobuf.ITimestamp|null|undefined} expireTime - * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri - * @instance - */ - ThreatUri.prototype.expireTime = null; - - /** - * Creates a new ThreatUri instance using the specified properties. - * @function create - * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri - * @static - * @param {google.cloud.webrisk.v1beta1.SearchUrisResponse.IThreatUri=} [properties] Properties to set - * @returns {google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri} ThreatUri instance - */ - ThreatUri.create = function create(properties) { - return new ThreatUri(properties); - }; + /** + * Creates a new Constraints instance using the specified properties. + * @function create + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints + * @static + * @param {google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.IConstraints=} [properties] Properties to set + * @returns {google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints} Constraints instance + */ + Constraints.create = function create(properties) { + return new Constraints(properties); + }; /** - * Encodes the specified ThreatUri message. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri.verify|verify} messages. + * Encodes the specified Constraints message. Does not implicitly {@link google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.verify|verify} messages. * @function encode - * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints * @static - * @param {google.cloud.webrisk.v1beta1.SearchUrisResponse.IThreatUri} message ThreatUri message or plain object to encode + * @param {google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.IConstraints} message Constraints message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ThreatUri.encode = function encode(message, writer) { + Constraints.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.threatTypes != null && message.threatTypes.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.threatTypes.length; ++i) - writer.int32(message.threatTypes[i]); + if (message.maxDiffEntries != null && Object.hasOwnProperty.call(message, "maxDiffEntries")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.maxDiffEntries); + if (message.maxDatabaseEntries != null && Object.hasOwnProperty.call(message, "maxDatabaseEntries")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxDatabaseEntries); + if (message.supportedCompressions != null && message.supportedCompressions.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (var i = 0; i < message.supportedCompressions.length; ++i) + writer.int32(message.supportedCompressions[i]); writer.ldelim(); } - if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ThreatUri message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri.verify|verify} messages. + * Encodes the specified Constraints message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints * @static - * @param {google.cloud.webrisk.v1beta1.SearchUrisResponse.IThreatUri} message ThreatUri message or plain object to encode + * @param {google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.IConstraints} message Constraints message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ThreatUri.encodeDelimited = function encodeDelimited(message, writer) { + Constraints.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ThreatUri message from the specified reader or buffer. + * Decodes a Constraints message from the specified reader or buffer. * @function decode - * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri} ThreatUri + * @returns {google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints} Constraints * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ThreatUri.decode = function decode(reader, length) { + Constraints.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.threatTypes && message.threatTypes.length)) - message.threatTypes = []; + message.maxDiffEntries = reader.int32(); + break; + } + case 2: { + message.maxDatabaseEntries = reader.int32(); + break; + } + case 3: { + if (!(message.supportedCompressions && message.supportedCompressions.length)) + message.supportedCompressions = []; if ((tag & 7) === 2) { var end2 = reader.uint32() + reader.pos; while (reader.pos < end2) - message.threatTypes.push(reader.int32()); + message.supportedCompressions.push(reader.int32()); } else - message.threatTypes.push(reader.int32()); - break; - } - case 2: { - message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.supportedCompressions.push(reader.int32()); break; } default: @@ -6758,182 +7325,184 @@ }; /** - * Decodes a ThreatUri message from the specified reader or buffer, length delimited. + * Decodes a Constraints message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri} ThreatUri + * @returns {google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints} Constraints * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ThreatUri.decodeDelimited = function decodeDelimited(reader) { + Constraints.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ThreatUri message. + * Verifies a Constraints message. * @function verify - * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ThreatUri.verify = function verify(message) { + Constraints.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.threatTypes != null && message.hasOwnProperty("threatTypes")) { - if (!Array.isArray(message.threatTypes)) - return "threatTypes: array expected"; - for (var i = 0; i < message.threatTypes.length; ++i) - switch (message.threatTypes[i]) { + if (message.maxDiffEntries != null && message.hasOwnProperty("maxDiffEntries")) + if (!$util.isInteger(message.maxDiffEntries)) + return "maxDiffEntries: integer expected"; + if (message.maxDatabaseEntries != null && message.hasOwnProperty("maxDatabaseEntries")) + if (!$util.isInteger(message.maxDatabaseEntries)) + return "maxDatabaseEntries: integer expected"; + if (message.supportedCompressions != null && message.hasOwnProperty("supportedCompressions")) { + if (!Array.isArray(message.supportedCompressions)) + return "supportedCompressions: array expected"; + for (var i = 0; i < message.supportedCompressions.length; ++i) + switch (message.supportedCompressions[i]) { default: - return "threatTypes: enum value[] expected"; + return "supportedCompressions: enum value[] expected"; case 0: case 1: case 2: - case 3: break; } } - if (message.expireTime != null && message.hasOwnProperty("expireTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.expireTime); - if (error) - return "expireTime." + error; - } return null; }; /** - * Creates a ThreatUri message from a plain object. Also converts values to their respective internal types. + * Creates a Constraints message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints * @static * @param {Object.} object Plain object - * @returns {google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri} ThreatUri + * @returns {google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints} Constraints */ - ThreatUri.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri) + Constraints.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints) return object; - var message = new $root.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri(); - if (object.threatTypes) { - if (!Array.isArray(object.threatTypes)) - throw TypeError(".google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri.threatTypes: array expected"); - message.threatTypes = []; - for (var i = 0; i < object.threatTypes.length; ++i) - switch (object.threatTypes[i]) { + var message = new $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints(); + if (object.maxDiffEntries != null) + message.maxDiffEntries = object.maxDiffEntries | 0; + if (object.maxDatabaseEntries != null) + message.maxDatabaseEntries = object.maxDatabaseEntries | 0; + if (object.supportedCompressions) { + if (!Array.isArray(object.supportedCompressions)) + throw TypeError(".google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints.supportedCompressions: array expected"); + message.supportedCompressions = []; + for (var i = 0; i < object.supportedCompressions.length; ++i) + switch (object.supportedCompressions[i]) { default: - if (typeof object.threatTypes[i] === "number") { - message.threatTypes[i] = object.threatTypes[i]; + if (typeof object.supportedCompressions[i] === "number") { + message.supportedCompressions[i] = object.supportedCompressions[i]; break; } - case "THREAT_TYPE_UNSPECIFIED": + case "COMPRESSION_TYPE_UNSPECIFIED": case 0: - message.threatTypes[i] = 0; + message.supportedCompressions[i] = 0; break; - case "MALWARE": + case "RAW": case 1: - message.threatTypes[i] = 1; + message.supportedCompressions[i] = 1; break; - case "SOCIAL_ENGINEERING": + case "RICE": case 2: - message.threatTypes[i] = 2; - break; - case "UNWANTED_SOFTWARE": - case 3: - message.threatTypes[i] = 3; + message.supportedCompressions[i] = 2; break; } } - if (object.expireTime != null) { - if (typeof object.expireTime !== "object") - throw TypeError(".google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri.expireTime: object expected"); - message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); - } return message; }; /** - * Creates a plain object from a ThreatUri message. Also converts values to other types if specified. + * Creates a plain object from a Constraints message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints * @static - * @param {google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri} message ThreatUri + * @param {google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints} message Constraints * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ThreatUri.toObject = function toObject(message, options) { + Constraints.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.threatTypes = []; - if (options.defaults) - object.expireTime = null; - if (message.threatTypes && message.threatTypes.length) { - object.threatTypes = []; - for (var j = 0; j < message.threatTypes.length; ++j) - object.threatTypes[j] = options.enums === String ? $root.google.cloud.webrisk.v1beta1.ThreatType[message.threatTypes[j]] === undefined ? message.threatTypes[j] : $root.google.cloud.webrisk.v1beta1.ThreatType[message.threatTypes[j]] : message.threatTypes[j]; + object.supportedCompressions = []; + if (options.defaults) { + object.maxDiffEntries = 0; + object.maxDatabaseEntries = 0; + } + if (message.maxDiffEntries != null && message.hasOwnProperty("maxDiffEntries")) + object.maxDiffEntries = message.maxDiffEntries; + if (message.maxDatabaseEntries != null && message.hasOwnProperty("maxDatabaseEntries")) + object.maxDatabaseEntries = message.maxDatabaseEntries; + if (message.supportedCompressions && message.supportedCompressions.length) { + object.supportedCompressions = []; + for (var j = 0; j < message.supportedCompressions.length; ++j) + object.supportedCompressions[j] = options.enums === String ? $root.google.cloud.webrisk.v1beta1.CompressionType[message.supportedCompressions[j]] === undefined ? message.supportedCompressions[j] : $root.google.cloud.webrisk.v1beta1.CompressionType[message.supportedCompressions[j]] : message.supportedCompressions[j]; } - if (message.expireTime != null && message.hasOwnProperty("expireTime")) - object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); return object; }; /** - * Converts this ThreatUri to JSON. + * Converts this Constraints to JSON. * @function toJSON - * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints * @instance * @returns {Object.} JSON object */ - ThreatUri.prototype.toJSON = function toJSON() { + Constraints.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ThreatUri + * Gets the default type url for Constraints * @function getTypeUrl - * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ThreatUri.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Constraints.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri"; + return typeUrlPrefix + "/google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints"; }; - return ThreatUri; + return Constraints; })(); - return SearchUrisResponse; + return ComputeThreatListDiffRequest; })(); - v1beta1.SearchHashesRequest = (function() { + v1beta1.ComputeThreatListDiffResponse = (function() { /** - * Properties of a SearchHashesRequest. + * Properties of a ComputeThreatListDiffResponse. * @memberof google.cloud.webrisk.v1beta1 - * @interface ISearchHashesRequest - * @property {Uint8Array|null} [hashPrefix] SearchHashesRequest hashPrefix - * @property {Array.|null} [threatTypes] SearchHashesRequest threatTypes + * @interface IComputeThreatListDiffResponse + * @property {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType|null} [responseType] ComputeThreatListDiffResponse responseType + * @property {google.cloud.webrisk.v1beta1.IThreatEntryAdditions|null} [additions] ComputeThreatListDiffResponse additions + * @property {google.cloud.webrisk.v1beta1.IThreatEntryRemovals|null} [removals] ComputeThreatListDiffResponse removals + * @property {Uint8Array|null} [newVersionToken] ComputeThreatListDiffResponse newVersionToken + * @property {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.IChecksum|null} [checksum] ComputeThreatListDiffResponse checksum + * @property {google.protobuf.ITimestamp|null} [recommendedNextDiff] ComputeThreatListDiffResponse recommendedNextDiff */ /** - * Constructs a new SearchHashesRequest. + * Constructs a new ComputeThreatListDiffResponse. * @memberof google.cloud.webrisk.v1beta1 - * @classdesc Represents a SearchHashesRequest. - * @implements ISearchHashesRequest + * @classdesc Represents a ComputeThreatListDiffResponse. + * @implements IComputeThreatListDiffResponse * @constructor - * @param {google.cloud.webrisk.v1beta1.ISearchHashesRequest=} [properties] Properties to set + * @param {google.cloud.webrisk.v1beta1.IComputeThreatListDiffResponse=} [properties] Properties to set */ - function SearchHashesRequest(properties) { - this.threatTypes = []; + function ComputeThreatListDiffResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6941,104 +7510,149 @@ } /** - * SearchHashesRequest hashPrefix. - * @member {Uint8Array} hashPrefix - * @memberof google.cloud.webrisk.v1beta1.SearchHashesRequest + * ComputeThreatListDiffResponse responseType. + * @member {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType} responseType + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse * @instance */ - SearchHashesRequest.prototype.hashPrefix = $util.newBuffer([]); + ComputeThreatListDiffResponse.prototype.responseType = 0; /** - * SearchHashesRequest threatTypes. - * @member {Array.} threatTypes - * @memberof google.cloud.webrisk.v1beta1.SearchHashesRequest + * ComputeThreatListDiffResponse additions. + * @member {google.cloud.webrisk.v1beta1.IThreatEntryAdditions|null|undefined} additions + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse * @instance */ - SearchHashesRequest.prototype.threatTypes = $util.emptyArray; + ComputeThreatListDiffResponse.prototype.additions = null; /** - * Creates a new SearchHashesRequest instance using the specified properties. + * ComputeThreatListDiffResponse removals. + * @member {google.cloud.webrisk.v1beta1.IThreatEntryRemovals|null|undefined} removals + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse + * @instance + */ + ComputeThreatListDiffResponse.prototype.removals = null; + + /** + * ComputeThreatListDiffResponse newVersionToken. + * @member {Uint8Array} newVersionToken + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse + * @instance + */ + ComputeThreatListDiffResponse.prototype.newVersionToken = $util.newBuffer([]); + + /** + * ComputeThreatListDiffResponse checksum. + * @member {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.IChecksum|null|undefined} checksum + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse + * @instance + */ + ComputeThreatListDiffResponse.prototype.checksum = null; + + /** + * ComputeThreatListDiffResponse recommendedNextDiff. + * @member {google.protobuf.ITimestamp|null|undefined} recommendedNextDiff + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse + * @instance + */ + ComputeThreatListDiffResponse.prototype.recommendedNextDiff = null; + + /** + * Creates a new ComputeThreatListDiffResponse instance using the specified properties. * @function create - * @memberof google.cloud.webrisk.v1beta1.SearchHashesRequest + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse * @static - * @param {google.cloud.webrisk.v1beta1.ISearchHashesRequest=} [properties] Properties to set - * @returns {google.cloud.webrisk.v1beta1.SearchHashesRequest} SearchHashesRequest instance + * @param {google.cloud.webrisk.v1beta1.IComputeThreatListDiffResponse=} [properties] Properties to set + * @returns {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse} ComputeThreatListDiffResponse instance */ - SearchHashesRequest.create = function create(properties) { - return new SearchHashesRequest(properties); + ComputeThreatListDiffResponse.create = function create(properties) { + return new ComputeThreatListDiffResponse(properties); }; /** - * Encodes the specified SearchHashesRequest message. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchHashesRequest.verify|verify} messages. + * Encodes the specified ComputeThreatListDiffResponse message. Does not implicitly {@link google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.webrisk.v1beta1.SearchHashesRequest + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse * @static - * @param {google.cloud.webrisk.v1beta1.ISearchHashesRequest} message SearchHashesRequest message or plain object to encode + * @param {google.cloud.webrisk.v1beta1.IComputeThreatListDiffResponse} message ComputeThreatListDiffResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchHashesRequest.encode = function encode(message, writer) { + ComputeThreatListDiffResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.hashPrefix != null && Object.hasOwnProperty.call(message, "hashPrefix")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.hashPrefix); - if (message.threatTypes != null && message.threatTypes.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.threatTypes.length; ++i) - writer.int32(message.threatTypes[i]); - writer.ldelim(); - } + if (message.recommendedNextDiff != null && Object.hasOwnProperty.call(message, "recommendedNextDiff")) + $root.google.protobuf.Timestamp.encode(message.recommendedNextDiff, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.responseType); + if (message.additions != null && Object.hasOwnProperty.call(message, "additions")) + $root.google.cloud.webrisk.v1beta1.ThreatEntryAdditions.encode(message.additions, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.removals != null && Object.hasOwnProperty.call(message, "removals")) + $root.google.cloud.webrisk.v1beta1.ThreatEntryRemovals.encode(message.removals, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.newVersionToken != null && Object.hasOwnProperty.call(message, "newVersionToken")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.newVersionToken); + if (message.checksum != null && Object.hasOwnProperty.call(message, "checksum")) + $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum.encode(message.checksum, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; /** - * Encodes the specified SearchHashesRequest message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchHashesRequest.verify|verify} messages. + * Encodes the specified ComputeThreatListDiffResponse message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.webrisk.v1beta1.SearchHashesRequest + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse * @static - * @param {google.cloud.webrisk.v1beta1.ISearchHashesRequest} message SearchHashesRequest message or plain object to encode + * @param {google.cloud.webrisk.v1beta1.IComputeThreatListDiffResponse} message ComputeThreatListDiffResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchHashesRequest.encodeDelimited = function encodeDelimited(message, writer) { + ComputeThreatListDiffResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SearchHashesRequest message from the specified reader or buffer. + * Decodes a ComputeThreatListDiffResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.webrisk.v1beta1.SearchHashesRequest + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.webrisk.v1beta1.SearchHashesRequest} SearchHashesRequest + * @returns {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse} ComputeThreatListDiffResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchHashesRequest.decode = function decode(reader, length) { + ComputeThreatListDiffResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1beta1.SearchHashesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.hashPrefix = reader.bytes(); + case 4: { + message.responseType = reader.int32(); break; } - case 2: { - if (!(message.threatTypes && message.threatTypes.length)) - message.threatTypes = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.threatTypes.push(reader.int32()); - } else - message.threatTypes.push(reader.int32()); + case 5: { + message.additions = $root.google.cloud.webrisk.v1beta1.ThreatEntryAdditions.decode(reader, reader.uint32()); break; } - default: - reader.skipType(tag & 7); + case 6: { + message.removals = $root.google.cloud.webrisk.v1beta1.ThreatEntryRemovals.decode(reader, reader.uint32()); + break; + } + case 7: { + message.newVersionToken = reader.bytes(); + break; + } + case 8: { + message.checksum = $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum.decode(reader, reader.uint32()); + break; + } + case 2: { + message.recommendedNextDiff = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; } } @@ -7046,183 +7660,446 @@ }; /** - * Decodes a SearchHashesRequest message from the specified reader or buffer, length delimited. + * Decodes a ComputeThreatListDiffResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.webrisk.v1beta1.SearchHashesRequest + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.webrisk.v1beta1.SearchHashesRequest} SearchHashesRequest + * @returns {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse} ComputeThreatListDiffResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchHashesRequest.decodeDelimited = function decodeDelimited(reader) { + ComputeThreatListDiffResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SearchHashesRequest message. + * Verifies a ComputeThreatListDiffResponse message. * @function verify - * @memberof google.cloud.webrisk.v1beta1.SearchHashesRequest + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SearchHashesRequest.verify = function verify(message) { + ComputeThreatListDiffResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.hashPrefix != null && message.hasOwnProperty("hashPrefix")) - if (!(message.hashPrefix && typeof message.hashPrefix.length === "number" || $util.isString(message.hashPrefix))) - return "hashPrefix: buffer expected"; - if (message.threatTypes != null && message.hasOwnProperty("threatTypes")) { - if (!Array.isArray(message.threatTypes)) - return "threatTypes: array expected"; - for (var i = 0; i < message.threatTypes.length; ++i) - switch (message.threatTypes[i]) { - default: - return "threatTypes: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - break; - } + if (message.responseType != null && message.hasOwnProperty("responseType")) + switch (message.responseType) { + default: + return "responseType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.additions != null && message.hasOwnProperty("additions")) { + var error = $root.google.cloud.webrisk.v1beta1.ThreatEntryAdditions.verify(message.additions); + if (error) + return "additions." + error; + } + if (message.removals != null && message.hasOwnProperty("removals")) { + var error = $root.google.cloud.webrisk.v1beta1.ThreatEntryRemovals.verify(message.removals); + if (error) + return "removals." + error; + } + if (message.newVersionToken != null && message.hasOwnProperty("newVersionToken")) + if (!(message.newVersionToken && typeof message.newVersionToken.length === "number" || $util.isString(message.newVersionToken))) + return "newVersionToken: buffer expected"; + if (message.checksum != null && message.hasOwnProperty("checksum")) { + var error = $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum.verify(message.checksum); + if (error) + return "checksum." + error; + } + if (message.recommendedNextDiff != null && message.hasOwnProperty("recommendedNextDiff")) { + var error = $root.google.protobuf.Timestamp.verify(message.recommendedNextDiff); + if (error) + return "recommendedNextDiff." + error; } return null; }; /** - * Creates a SearchHashesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ComputeThreatListDiffResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.webrisk.v1beta1.SearchHashesRequest + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.webrisk.v1beta1.SearchHashesRequest} SearchHashesRequest + * @returns {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse} ComputeThreatListDiffResponse */ - SearchHashesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.webrisk.v1beta1.SearchHashesRequest) + ComputeThreatListDiffResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse) return object; - var message = new $root.google.cloud.webrisk.v1beta1.SearchHashesRequest(); - if (object.hashPrefix != null) - if (typeof object.hashPrefix === "string") - $util.base64.decode(object.hashPrefix, message.hashPrefix = $util.newBuffer($util.base64.length(object.hashPrefix)), 0); - else if (object.hashPrefix.length >= 0) - message.hashPrefix = object.hashPrefix; - if (object.threatTypes) { - if (!Array.isArray(object.threatTypes)) - throw TypeError(".google.cloud.webrisk.v1beta1.SearchHashesRequest.threatTypes: array expected"); - message.threatTypes = []; - for (var i = 0; i < object.threatTypes.length; ++i) - switch (object.threatTypes[i]) { - default: - if (typeof object.threatTypes[i] === "number") { - message.threatTypes[i] = object.threatTypes[i]; - break; - } - case "THREAT_TYPE_UNSPECIFIED": - case 0: - message.threatTypes[i] = 0; - break; - case "MALWARE": - case 1: - message.threatTypes[i] = 1; - break; - case "SOCIAL_ENGINEERING": - case 2: - message.threatTypes[i] = 2; - break; - case "UNWANTED_SOFTWARE": - case 3: - message.threatTypes[i] = 3; - break; - } + var message = new $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse(); + switch (object.responseType) { + default: + if (typeof object.responseType === "number") { + message.responseType = object.responseType; + break; + } + break; + case "RESPONSE_TYPE_UNSPECIFIED": + case 0: + message.responseType = 0; + break; + case "DIFF": + case 1: + message.responseType = 1; + break; + case "RESET": + case 2: + message.responseType = 2; + break; + } + if (object.additions != null) { + if (typeof object.additions !== "object") + throw TypeError(".google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.additions: object expected"); + message.additions = $root.google.cloud.webrisk.v1beta1.ThreatEntryAdditions.fromObject(object.additions); + } + if (object.removals != null) { + if (typeof object.removals !== "object") + throw TypeError(".google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.removals: object expected"); + message.removals = $root.google.cloud.webrisk.v1beta1.ThreatEntryRemovals.fromObject(object.removals); + } + if (object.newVersionToken != null) + if (typeof object.newVersionToken === "string") + $util.base64.decode(object.newVersionToken, message.newVersionToken = $util.newBuffer($util.base64.length(object.newVersionToken)), 0); + else if (object.newVersionToken.length >= 0) + message.newVersionToken = object.newVersionToken; + if (object.checksum != null) { + if (typeof object.checksum !== "object") + throw TypeError(".google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.checksum: object expected"); + message.checksum = $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum.fromObject(object.checksum); + } + if (object.recommendedNextDiff != null) { + if (typeof object.recommendedNextDiff !== "object") + throw TypeError(".google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.recommendedNextDiff: object expected"); + message.recommendedNextDiff = $root.google.protobuf.Timestamp.fromObject(object.recommendedNextDiff); } return message; }; /** - * Creates a plain object from a SearchHashesRequest message. Also converts values to other types if specified. + * Creates a plain object from a ComputeThreatListDiffResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.webrisk.v1beta1.SearchHashesRequest + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse * @static - * @param {google.cloud.webrisk.v1beta1.SearchHashesRequest} message SearchHashesRequest + * @param {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse} message ComputeThreatListDiffResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SearchHashesRequest.toObject = function toObject(message, options) { + ComputeThreatListDiffResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.threatTypes = []; - if (options.defaults) + if (options.defaults) { + object.recommendedNextDiff = null; + object.responseType = options.enums === String ? "RESPONSE_TYPE_UNSPECIFIED" : 0; + object.additions = null; + object.removals = null; if (options.bytes === String) - object.hashPrefix = ""; + object.newVersionToken = ""; else { - object.hashPrefix = []; + object.newVersionToken = []; if (options.bytes !== Array) - object.hashPrefix = $util.newBuffer(object.hashPrefix); + object.newVersionToken = $util.newBuffer(object.newVersionToken); } - if (message.hashPrefix != null && message.hasOwnProperty("hashPrefix")) - object.hashPrefix = options.bytes === String ? $util.base64.encode(message.hashPrefix, 0, message.hashPrefix.length) : options.bytes === Array ? Array.prototype.slice.call(message.hashPrefix) : message.hashPrefix; - if (message.threatTypes && message.threatTypes.length) { - object.threatTypes = []; - for (var j = 0; j < message.threatTypes.length; ++j) - object.threatTypes[j] = options.enums === String ? $root.google.cloud.webrisk.v1beta1.ThreatType[message.threatTypes[j]] === undefined ? message.threatTypes[j] : $root.google.cloud.webrisk.v1beta1.ThreatType[message.threatTypes[j]] : message.threatTypes[j]; + object.checksum = null; } + if (message.recommendedNextDiff != null && message.hasOwnProperty("recommendedNextDiff")) + object.recommendedNextDiff = $root.google.protobuf.Timestamp.toObject(message.recommendedNextDiff, options); + if (message.responseType != null && message.hasOwnProperty("responseType")) + object.responseType = options.enums === String ? $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType[message.responseType] === undefined ? message.responseType : $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType[message.responseType] : message.responseType; + if (message.additions != null && message.hasOwnProperty("additions")) + object.additions = $root.google.cloud.webrisk.v1beta1.ThreatEntryAdditions.toObject(message.additions, options); + if (message.removals != null && message.hasOwnProperty("removals")) + object.removals = $root.google.cloud.webrisk.v1beta1.ThreatEntryRemovals.toObject(message.removals, options); + if (message.newVersionToken != null && message.hasOwnProperty("newVersionToken")) + object.newVersionToken = options.bytes === String ? $util.base64.encode(message.newVersionToken, 0, message.newVersionToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.newVersionToken) : message.newVersionToken; + if (message.checksum != null && message.hasOwnProperty("checksum")) + object.checksum = $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum.toObject(message.checksum, options); return object; }; /** - * Converts this SearchHashesRequest to JSON. + * Converts this ComputeThreatListDiffResponse to JSON. * @function toJSON - * @memberof google.cloud.webrisk.v1beta1.SearchHashesRequest + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse * @instance * @returns {Object.} JSON object */ - SearchHashesRequest.prototype.toJSON = function toJSON() { + ComputeThreatListDiffResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SearchHashesRequest + * Gets the default type url for ComputeThreatListDiffResponse * @function getTypeUrl - * @memberof google.cloud.webrisk.v1beta1.SearchHashesRequest + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SearchHashesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ComputeThreatListDiffResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.webrisk.v1beta1.SearchHashesRequest"; + return typeUrlPrefix + "/google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse"; }; - return SearchHashesRequest; - })(); + ComputeThreatListDiffResponse.Checksum = (function() { - v1beta1.SearchHashesResponse = (function() { + /** + * Properties of a Checksum. + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse + * @interface IChecksum + * @property {Uint8Array|null} [sha256] Checksum sha256 + */ - /** - * Properties of a SearchHashesResponse. - * @memberof google.cloud.webrisk.v1beta1 - * @interface ISearchHashesResponse - * @property {Array.|null} [threats] SearchHashesResponse threats - * @property {google.protobuf.ITimestamp|null} [negativeExpireTime] SearchHashesResponse negativeExpireTime - */ + /** + * Constructs a new Checksum. + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse + * @classdesc Represents a Checksum. + * @implements IChecksum + * @constructor + * @param {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.IChecksum=} [properties] Properties to set + */ + function Checksum(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]]; + } - /** - * Constructs a new SearchHashesResponse. + /** + * Checksum sha256. + * @member {Uint8Array} sha256 + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum + * @instance + */ + Checksum.prototype.sha256 = $util.newBuffer([]); + + /** + * Creates a new Checksum instance using the specified properties. + * @function create + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum + * @static + * @param {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.IChecksum=} [properties] Properties to set + * @returns {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum} Checksum instance + */ + Checksum.create = function create(properties) { + return new Checksum(properties); + }; + + /** + * Encodes the specified Checksum message. Does not implicitly {@link google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum.verify|verify} messages. + * @function encode + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum + * @static + * @param {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.IChecksum} message Checksum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Checksum.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sha256 != null && Object.hasOwnProperty.call(message, "sha256")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.sha256); + return writer; + }; + + /** + * Encodes the specified Checksum message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum + * @static + * @param {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.IChecksum} message Checksum message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Checksum.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Checksum message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum} Checksum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Checksum.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sha256 = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Checksum message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum} Checksum + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Checksum.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Checksum message. + * @function verify + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Checksum.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sha256 != null && message.hasOwnProperty("sha256")) + if (!(message.sha256 && typeof message.sha256.length === "number" || $util.isString(message.sha256))) + return "sha256: buffer expected"; + return null; + }; + + /** + * Creates a Checksum message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum} Checksum + */ + Checksum.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum) + return object; + var message = new $root.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum(); + if (object.sha256 != null) + if (typeof object.sha256 === "string") + $util.base64.decode(object.sha256, message.sha256 = $util.newBuffer($util.base64.length(object.sha256)), 0); + else if (object.sha256.length >= 0) + message.sha256 = object.sha256; + return message; + }; + + /** + * Creates a plain object from a Checksum message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum + * @static + * @param {google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum} message Checksum + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Checksum.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.sha256 = ""; + else { + object.sha256 = []; + if (options.bytes !== Array) + object.sha256 = $util.newBuffer(object.sha256); + } + if (message.sha256 != null && message.hasOwnProperty("sha256")) + object.sha256 = options.bytes === String ? $util.base64.encode(message.sha256, 0, message.sha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.sha256) : message.sha256; + return object; + }; + + /** + * Converts this Checksum to JSON. + * @function toJSON + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum + * @instance + * @returns {Object.} JSON object + */ + Checksum.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Checksum + * @function getTypeUrl + * @memberof google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Checksum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum"; + }; + + return Checksum; + })(); + + /** + * ResponseType enum. + * @name google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType + * @enum {number} + * @property {number} RESPONSE_TYPE_UNSPECIFIED=0 RESPONSE_TYPE_UNSPECIFIED value + * @property {number} DIFF=1 DIFF value + * @property {number} RESET=2 RESET value + */ + ComputeThreatListDiffResponse.ResponseType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESPONSE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DIFF"] = 1; + values[valuesById[2] = "RESET"] = 2; + return values; + })(); + + return ComputeThreatListDiffResponse; + })(); + + v1beta1.SearchUrisRequest = (function() { + + /** + * Properties of a SearchUrisRequest. * @memberof google.cloud.webrisk.v1beta1 - * @classdesc Represents a SearchHashesResponse. - * @implements ISearchHashesResponse + * @interface ISearchUrisRequest + * @property {string|null} [uri] SearchUrisRequest uri + * @property {Array.|null} [threatTypes] SearchUrisRequest threatTypes + */ + + /** + * Constructs a new SearchUrisRequest. + * @memberof google.cloud.webrisk.v1beta1 + * @classdesc Represents a SearchUrisRequest. + * @implements ISearchUrisRequest * @constructor - * @param {google.cloud.webrisk.v1beta1.ISearchHashesResponse=} [properties] Properties to set + * @param {google.cloud.webrisk.v1beta1.ISearchUrisRequest=} [properties] Properties to set */ - function SearchHashesResponse(properties) { - this.threats = []; + function SearchUrisRequest(properties) { + this.threatTypes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7230,92 +8107,100 @@ } /** - * SearchHashesResponse threats. - * @member {Array.} threats - * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse + * SearchUrisRequest uri. + * @member {string} uri + * @memberof google.cloud.webrisk.v1beta1.SearchUrisRequest * @instance */ - SearchHashesResponse.prototype.threats = $util.emptyArray; + SearchUrisRequest.prototype.uri = ""; /** - * SearchHashesResponse negativeExpireTime. - * @member {google.protobuf.ITimestamp|null|undefined} negativeExpireTime - * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse + * SearchUrisRequest threatTypes. + * @member {Array.} threatTypes + * @memberof google.cloud.webrisk.v1beta1.SearchUrisRequest * @instance */ - SearchHashesResponse.prototype.negativeExpireTime = null; + SearchUrisRequest.prototype.threatTypes = $util.emptyArray; /** - * Creates a new SearchHashesResponse instance using the specified properties. + * Creates a new SearchUrisRequest instance using the specified properties. * @function create - * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse + * @memberof google.cloud.webrisk.v1beta1.SearchUrisRequest * @static - * @param {google.cloud.webrisk.v1beta1.ISearchHashesResponse=} [properties] Properties to set - * @returns {google.cloud.webrisk.v1beta1.SearchHashesResponse} SearchHashesResponse instance + * @param {google.cloud.webrisk.v1beta1.ISearchUrisRequest=} [properties] Properties to set + * @returns {google.cloud.webrisk.v1beta1.SearchUrisRequest} SearchUrisRequest instance */ - SearchHashesResponse.create = function create(properties) { - return new SearchHashesResponse(properties); - }; + SearchUrisRequest.create = function create(properties) { + return new SearchUrisRequest(properties); + }; /** - * Encodes the specified SearchHashesResponse message. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchHashesResponse.verify|verify} messages. + * Encodes the specified SearchUrisRequest message. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchUrisRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse + * @memberof google.cloud.webrisk.v1beta1.SearchUrisRequest * @static - * @param {google.cloud.webrisk.v1beta1.ISearchHashesResponse} message SearchHashesResponse message or plain object to encode + * @param {google.cloud.webrisk.v1beta1.ISearchUrisRequest} message SearchUrisRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchHashesResponse.encode = function encode(message, writer) { + SearchUrisRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.threats != null && message.threats.length) - for (var i = 0; i < message.threats.length; ++i) - $root.google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash.encode(message.threats[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.negativeExpireTime != null && Object.hasOwnProperty.call(message, "negativeExpireTime")) - $root.google.protobuf.Timestamp.encode(message.negativeExpireTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + if (message.threatTypes != null && message.threatTypes.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.threatTypes.length; ++i) + writer.int32(message.threatTypes[i]); + writer.ldelim(); + } return writer; }; /** - * Encodes the specified SearchHashesResponse message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchHashesResponse.verify|verify} messages. + * Encodes the specified SearchUrisRequest message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchUrisRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse + * @memberof google.cloud.webrisk.v1beta1.SearchUrisRequest * @static - * @param {google.cloud.webrisk.v1beta1.ISearchHashesResponse} message SearchHashesResponse message or plain object to encode + * @param {google.cloud.webrisk.v1beta1.ISearchUrisRequest} message SearchUrisRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SearchHashesResponse.encodeDelimited = function encodeDelimited(message, writer) { + SearchUrisRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SearchHashesResponse message from the specified reader or buffer. + * Decodes a SearchUrisRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse + * @memberof google.cloud.webrisk.v1beta1.SearchUrisRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.webrisk.v1beta1.SearchHashesResponse} SearchHashesResponse + * @returns {google.cloud.webrisk.v1beta1.SearchUrisRequest} SearchUrisRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchHashesResponse.decode = function decode(reader, length) { + SearchUrisRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1beta1.SearchHashesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1beta1.SearchUrisRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.threats && message.threats.length)) - message.threats = []; - message.threats.push($root.google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash.decode(reader, reader.uint32())); + message.uri = reader.string(); break; } case 2: { - message.negativeExpireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + if (!(message.threatTypes && message.threatTypes.length)) + message.threatTypes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.threatTypes.push(reader.int32()); + } else + message.threatTypes.push(reader.int32()); break; } default: @@ -7327,205 +8212,423 @@ }; /** - * Decodes a SearchHashesResponse message from the specified reader or buffer, length delimited. + * Decodes a SearchUrisRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse + * @memberof google.cloud.webrisk.v1beta1.SearchUrisRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.webrisk.v1beta1.SearchHashesResponse} SearchHashesResponse + * @returns {google.cloud.webrisk.v1beta1.SearchUrisRequest} SearchUrisRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SearchHashesResponse.decodeDelimited = function decodeDelimited(reader) { + SearchUrisRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SearchHashesResponse message. + * Verifies a SearchUrisRequest message. * @function verify - * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse + * @memberof google.cloud.webrisk.v1beta1.SearchUrisRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SearchHashesResponse.verify = function verify(message) { + SearchUrisRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.threats != null && message.hasOwnProperty("threats")) { - if (!Array.isArray(message.threats)) - return "threats: array expected"; - for (var i = 0; i < message.threats.length; ++i) { - var error = $root.google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash.verify(message.threats[i]); - if (error) - return "threats." + error; - } - } - if (message.negativeExpireTime != null && message.hasOwnProperty("negativeExpireTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.negativeExpireTime); - if (error) - return "negativeExpireTime." + error; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.threatTypes != null && message.hasOwnProperty("threatTypes")) { + if (!Array.isArray(message.threatTypes)) + return "threatTypes: array expected"; + for (var i = 0; i < message.threatTypes.length; ++i) + switch (message.threatTypes[i]) { + default: + return "threatTypes: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + break; + } } return null; }; /** - * Creates a SearchHashesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a SearchUrisRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse + * @memberof google.cloud.webrisk.v1beta1.SearchUrisRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.webrisk.v1beta1.SearchHashesResponse} SearchHashesResponse + * @returns {google.cloud.webrisk.v1beta1.SearchUrisRequest} SearchUrisRequest */ - SearchHashesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.webrisk.v1beta1.SearchHashesResponse) + SearchUrisRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.webrisk.v1beta1.SearchUrisRequest) return object; - var message = new $root.google.cloud.webrisk.v1beta1.SearchHashesResponse(); - if (object.threats) { - if (!Array.isArray(object.threats)) - throw TypeError(".google.cloud.webrisk.v1beta1.SearchHashesResponse.threats: array expected"); - message.threats = []; - for (var i = 0; i < object.threats.length; ++i) { - if (typeof object.threats[i] !== "object") - throw TypeError(".google.cloud.webrisk.v1beta1.SearchHashesResponse.threats: object expected"); - message.threats[i] = $root.google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash.fromObject(object.threats[i]); - } - } - if (object.negativeExpireTime != null) { - if (typeof object.negativeExpireTime !== "object") - throw TypeError(".google.cloud.webrisk.v1beta1.SearchHashesResponse.negativeExpireTime: object expected"); - message.negativeExpireTime = $root.google.protobuf.Timestamp.fromObject(object.negativeExpireTime); + var message = new $root.google.cloud.webrisk.v1beta1.SearchUrisRequest(); + if (object.uri != null) + message.uri = String(object.uri); + if (object.threatTypes) { + if (!Array.isArray(object.threatTypes)) + throw TypeError(".google.cloud.webrisk.v1beta1.SearchUrisRequest.threatTypes: array expected"); + message.threatTypes = []; + for (var i = 0; i < object.threatTypes.length; ++i) + switch (object.threatTypes[i]) { + default: + if (typeof object.threatTypes[i] === "number") { + message.threatTypes[i] = object.threatTypes[i]; + break; + } + case "THREAT_TYPE_UNSPECIFIED": + case 0: + message.threatTypes[i] = 0; + break; + case "MALWARE": + case 1: + message.threatTypes[i] = 1; + break; + case "SOCIAL_ENGINEERING": + case 2: + message.threatTypes[i] = 2; + break; + case "UNWANTED_SOFTWARE": + case 3: + message.threatTypes[i] = 3; + break; + } } return message; }; /** - * Creates a plain object from a SearchHashesResponse message. Also converts values to other types if specified. + * Creates a plain object from a SearchUrisRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse + * @memberof google.cloud.webrisk.v1beta1.SearchUrisRequest * @static - * @param {google.cloud.webrisk.v1beta1.SearchHashesResponse} message SearchHashesResponse + * @param {google.cloud.webrisk.v1beta1.SearchUrisRequest} message SearchUrisRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SearchHashesResponse.toObject = function toObject(message, options) { + SearchUrisRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.threats = []; + object.threatTypes = []; if (options.defaults) - object.negativeExpireTime = null; - if (message.threats && message.threats.length) { - object.threats = []; - for (var j = 0; j < message.threats.length; ++j) - object.threats[j] = $root.google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash.toObject(message.threats[j], options); + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.threatTypes && message.threatTypes.length) { + object.threatTypes = []; + for (var j = 0; j < message.threatTypes.length; ++j) + object.threatTypes[j] = options.enums === String ? $root.google.cloud.webrisk.v1beta1.ThreatType[message.threatTypes[j]] === undefined ? message.threatTypes[j] : $root.google.cloud.webrisk.v1beta1.ThreatType[message.threatTypes[j]] : message.threatTypes[j]; } - if (message.negativeExpireTime != null && message.hasOwnProperty("negativeExpireTime")) - object.negativeExpireTime = $root.google.protobuf.Timestamp.toObject(message.negativeExpireTime, options); return object; }; /** - * Converts this SearchHashesResponse to JSON. + * Converts this SearchUrisRequest to JSON. * @function toJSON - * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse + * @memberof google.cloud.webrisk.v1beta1.SearchUrisRequest * @instance * @returns {Object.} JSON object */ - SearchHashesResponse.prototype.toJSON = function toJSON() { + SearchUrisRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SearchHashesResponse + * Gets the default type url for SearchUrisRequest * @function getTypeUrl - * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse + * @memberof google.cloud.webrisk.v1beta1.SearchUrisRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SearchHashesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SearchUrisRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.webrisk.v1beta1.SearchHashesResponse"; + return typeUrlPrefix + "/google.cloud.webrisk.v1beta1.SearchUrisRequest"; }; - SearchHashesResponse.ThreatHash = (function() { - - /** - * Properties of a ThreatHash. - * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse - * @interface IThreatHash - * @property {Array.|null} [threatTypes] ThreatHash threatTypes - * @property {Uint8Array|null} [hash] ThreatHash hash - * @property {google.protobuf.ITimestamp|null} [expireTime] ThreatHash expireTime - */ + return SearchUrisRequest; + })(); - /** - * Constructs a new ThreatHash. - * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse - * @classdesc Represents a ThreatHash. - * @implements IThreatHash - * @constructor - * @param {google.cloud.webrisk.v1beta1.SearchHashesResponse.IThreatHash=} [properties] Properties to set - */ - function ThreatHash(properties) { - this.threatTypes = []; - 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]]; - } + v1beta1.SearchUrisResponse = (function() { - /** - * ThreatHash threatTypes. - * @member {Array.} threatTypes - * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash - * @instance - */ - ThreatHash.prototype.threatTypes = $util.emptyArray; + /** + * Properties of a SearchUrisResponse. + * @memberof google.cloud.webrisk.v1beta1 + * @interface ISearchUrisResponse + * @property {google.cloud.webrisk.v1beta1.SearchUrisResponse.IThreatUri|null} [threat] SearchUrisResponse threat + */ - /** - * ThreatHash hash. - * @member {Uint8Array} hash - * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash - * @instance - */ - ThreatHash.prototype.hash = $util.newBuffer([]); + /** + * Constructs a new SearchUrisResponse. + * @memberof google.cloud.webrisk.v1beta1 + * @classdesc Represents a SearchUrisResponse. + * @implements ISearchUrisResponse + * @constructor + * @param {google.cloud.webrisk.v1beta1.ISearchUrisResponse=} [properties] Properties to set + */ + function SearchUrisResponse(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]]; + } - /** - * ThreatHash expireTime. + /** + * SearchUrisResponse threat. + * @member {google.cloud.webrisk.v1beta1.SearchUrisResponse.IThreatUri|null|undefined} threat + * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse + * @instance + */ + SearchUrisResponse.prototype.threat = null; + + /** + * Creates a new SearchUrisResponse instance using the specified properties. + * @function create + * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse + * @static + * @param {google.cloud.webrisk.v1beta1.ISearchUrisResponse=} [properties] Properties to set + * @returns {google.cloud.webrisk.v1beta1.SearchUrisResponse} SearchUrisResponse instance + */ + SearchUrisResponse.create = function create(properties) { + return new SearchUrisResponse(properties); + }; + + /** + * Encodes the specified SearchUrisResponse message. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchUrisResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse + * @static + * @param {google.cloud.webrisk.v1beta1.ISearchUrisResponse} message SearchUrisResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchUrisResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.threat != null && Object.hasOwnProperty.call(message, "threat")) + $root.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri.encode(message.threat, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SearchUrisResponse message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchUrisResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse + * @static + * @param {google.cloud.webrisk.v1beta1.ISearchUrisResponse} message SearchUrisResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchUrisResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchUrisResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.webrisk.v1beta1.SearchUrisResponse} SearchUrisResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchUrisResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1beta1.SearchUrisResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.threat = $root.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchUrisResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.webrisk.v1beta1.SearchUrisResponse} SearchUrisResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchUrisResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchUrisResponse message. + * @function verify + * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchUrisResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.threat != null && message.hasOwnProperty("threat")) { + var error = $root.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri.verify(message.threat); + if (error) + return "threat." + error; + } + return null; + }; + + /** + * Creates a SearchUrisResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.webrisk.v1beta1.SearchUrisResponse} SearchUrisResponse + */ + SearchUrisResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.webrisk.v1beta1.SearchUrisResponse) + return object; + var message = new $root.google.cloud.webrisk.v1beta1.SearchUrisResponse(); + if (object.threat != null) { + if (typeof object.threat !== "object") + throw TypeError(".google.cloud.webrisk.v1beta1.SearchUrisResponse.threat: object expected"); + message.threat = $root.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri.fromObject(object.threat); + } + return message; + }; + + /** + * Creates a plain object from a SearchUrisResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse + * @static + * @param {google.cloud.webrisk.v1beta1.SearchUrisResponse} message SearchUrisResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchUrisResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.threat = null; + if (message.threat != null && message.hasOwnProperty("threat")) + object.threat = $root.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri.toObject(message.threat, options); + return object; + }; + + /** + * Converts this SearchUrisResponse to JSON. + * @function toJSON + * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse + * @instance + * @returns {Object.} JSON object + */ + SearchUrisResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchUrisResponse + * @function getTypeUrl + * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchUrisResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.webrisk.v1beta1.SearchUrisResponse"; + }; + + SearchUrisResponse.ThreatUri = (function() { + + /** + * Properties of a ThreatUri. + * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse + * @interface IThreatUri + * @property {Array.|null} [threatTypes] ThreatUri threatTypes + * @property {google.protobuf.ITimestamp|null} [expireTime] ThreatUri expireTime + */ + + /** + * Constructs a new ThreatUri. + * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse + * @classdesc Represents a ThreatUri. + * @implements IThreatUri + * @constructor + * @param {google.cloud.webrisk.v1beta1.SearchUrisResponse.IThreatUri=} [properties] Properties to set + */ + function ThreatUri(properties) { + this.threatTypes = []; + 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]]; + } + + /** + * ThreatUri threatTypes. + * @member {Array.} threatTypes + * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri + * @instance + */ + ThreatUri.prototype.threatTypes = $util.emptyArray; + + /** + * ThreatUri expireTime. * @member {google.protobuf.ITimestamp|null|undefined} expireTime - * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash + * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri * @instance */ - ThreatHash.prototype.expireTime = null; + ThreatUri.prototype.expireTime = null; /** - * Creates a new ThreatHash instance using the specified properties. + * Creates a new ThreatUri instance using the specified properties. * @function create - * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash + * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri * @static - * @param {google.cloud.webrisk.v1beta1.SearchHashesResponse.IThreatHash=} [properties] Properties to set - * @returns {google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash} ThreatHash instance + * @param {google.cloud.webrisk.v1beta1.SearchUrisResponse.IThreatUri=} [properties] Properties to set + * @returns {google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri} ThreatUri instance */ - ThreatHash.create = function create(properties) { - return new ThreatHash(properties); + ThreatUri.create = function create(properties) { + return new ThreatUri(properties); }; /** - * Encodes the specified ThreatHash message. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash.verify|verify} messages. + * Encodes the specified ThreatUri message. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri.verify|verify} messages. * @function encode - * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash + * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri * @static - * @param {google.cloud.webrisk.v1beta1.SearchHashesResponse.IThreatHash} message ThreatHash message or plain object to encode + * @param {google.cloud.webrisk.v1beta1.SearchUrisResponse.IThreatUri} message ThreatUri message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ThreatHash.encode = function encode(message, writer) { + ThreatUri.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.threatTypes != null && message.threatTypes.length) { @@ -7534,41 +8637,39 @@ writer.int32(message.threatTypes[i]); writer.ldelim(); } - if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.hash); if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ThreatHash message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash.verify|verify} messages. + * Encodes the specified ThreatUri message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash + * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri * @static - * @param {google.cloud.webrisk.v1beta1.SearchHashesResponse.IThreatHash} message ThreatHash message or plain object to encode + * @param {google.cloud.webrisk.v1beta1.SearchUrisResponse.IThreatUri} message ThreatUri message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ThreatHash.encodeDelimited = function encodeDelimited(message, writer) { + ThreatUri.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ThreatHash message from the specified reader or buffer. + * Decodes a ThreatUri message from the specified reader or buffer. * @function decode - * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash + * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash} ThreatHash + * @returns {google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri} ThreatUri * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ThreatHash.decode = function decode(reader, length) { + ThreatUri.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -7584,10 +8685,6 @@ break; } case 2: { - message.hash = reader.bytes(); - break; - } - case 3: { message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } @@ -7600,30 +8697,30 @@ }; /** - * Decodes a ThreatHash message from the specified reader or buffer, length delimited. + * Decodes a ThreatUri message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash + * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash} ThreatHash + * @returns {google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri} ThreatUri * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ThreatHash.decodeDelimited = function decodeDelimited(reader) { + ThreatUri.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ThreatHash message. + * Verifies a ThreatUri message. * @function verify - * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash + * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ThreatHash.verify = function verify(message) { + ThreatUri.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.threatTypes != null && message.hasOwnProperty("threatTypes")) { @@ -7640,9 +8737,6 @@ break; } } - if (message.hash != null && message.hasOwnProperty("hash")) - if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash))) - return "hash: buffer expected"; if (message.expireTime != null && message.hasOwnProperty("expireTime")) { var error = $root.google.protobuf.Timestamp.verify(message.expireTime); if (error) @@ -7652,20 +8746,20 @@ }; /** - * Creates a ThreatHash message from a plain object. Also converts values to their respective internal types. + * Creates a ThreatUri message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash + * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri * @static * @param {Object.} object Plain object - * @returns {google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash} ThreatHash + * @returns {google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri} ThreatUri */ - ThreatHash.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash) + ThreatUri.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri) return object; - var message = new $root.google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash(); + var message = new $root.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri(); if (object.threatTypes) { if (!Array.isArray(object.threatTypes)) - throw TypeError(".google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash.threatTypes: array expected"); + throw TypeError(".google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri.threatTypes: array expected"); message.threatTypes = []; for (var i = 0; i < object.threatTypes.length; ++i) switch (object.threatTypes[i]) { @@ -7692,108 +8786,93 @@ break; } } - if (object.hash != null) - if (typeof object.hash === "string") - $util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0); - else if (object.hash.length >= 0) - message.hash = object.hash; if (object.expireTime != null) { if (typeof object.expireTime !== "object") - throw TypeError(".google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash.expireTime: object expected"); + throw TypeError(".google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri.expireTime: object expected"); message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); } return message; }; /** - * Creates a plain object from a ThreatHash message. Also converts values to other types if specified. + * Creates a plain object from a ThreatUri message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash + * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri * @static - * @param {google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash} message ThreatHash + * @param {google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri} message ThreatUri * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ThreatHash.toObject = function toObject(message, options) { + ThreatUri.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.threatTypes = []; - if (options.defaults) { - if (options.bytes === String) - object.hash = ""; - else { - object.hash = []; - if (options.bytes !== Array) - object.hash = $util.newBuffer(object.hash); - } + if (options.defaults) object.expireTime = null; - } if (message.threatTypes && message.threatTypes.length) { object.threatTypes = []; for (var j = 0; j < message.threatTypes.length; ++j) object.threatTypes[j] = options.enums === String ? $root.google.cloud.webrisk.v1beta1.ThreatType[message.threatTypes[j]] === undefined ? message.threatTypes[j] : $root.google.cloud.webrisk.v1beta1.ThreatType[message.threatTypes[j]] : message.threatTypes[j]; } - if (message.hash != null && message.hasOwnProperty("hash")) - object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash; if (message.expireTime != null && message.hasOwnProperty("expireTime")) object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); return object; }; /** - * Converts this ThreatHash to JSON. + * Converts this ThreatUri to JSON. * @function toJSON - * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash + * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri * @instance * @returns {Object.} JSON object */ - ThreatHash.prototype.toJSON = function toJSON() { + ThreatUri.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ThreatHash + * Gets the default type url for ThreatUri * @function getTypeUrl - * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash + * @memberof google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ThreatHash.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ThreatUri.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash"; + return typeUrlPrefix + "/google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri"; }; - return ThreatHash; + return ThreatUri; })(); - return SearchHashesResponse; + return SearchUrisResponse; })(); - v1beta1.ThreatEntryAdditions = (function() { + v1beta1.SearchHashesRequest = (function() { /** - * Properties of a ThreatEntryAdditions. + * Properties of a SearchHashesRequest. * @memberof google.cloud.webrisk.v1beta1 - * @interface IThreatEntryAdditions - * @property {Array.|null} [rawHashes] ThreatEntryAdditions rawHashes - * @property {google.cloud.webrisk.v1beta1.IRiceDeltaEncoding|null} [riceHashes] ThreatEntryAdditions riceHashes + * @interface ISearchHashesRequest + * @property {Uint8Array|null} [hashPrefix] SearchHashesRequest hashPrefix + * @property {Array.|null} [threatTypes] SearchHashesRequest threatTypes */ /** - * Constructs a new ThreatEntryAdditions. + * Constructs a new SearchHashesRequest. * @memberof google.cloud.webrisk.v1beta1 - * @classdesc Represents a ThreatEntryAdditions. - * @implements IThreatEntryAdditions + * @classdesc Represents a SearchHashesRequest. + * @implements ISearchHashesRequest * @constructor - * @param {google.cloud.webrisk.v1beta1.IThreatEntryAdditions=} [properties] Properties to set + * @param {google.cloud.webrisk.v1beta1.ISearchHashesRequest=} [properties] Properties to set */ - function ThreatEntryAdditions(properties) { - this.rawHashes = []; + function SearchHashesRequest(properties) { + this.threatTypes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7801,92 +8880,100 @@ } /** - * ThreatEntryAdditions rawHashes. - * @member {Array.} rawHashes - * @memberof google.cloud.webrisk.v1beta1.ThreatEntryAdditions + * SearchHashesRequest hashPrefix. + * @member {Uint8Array} hashPrefix + * @memberof google.cloud.webrisk.v1beta1.SearchHashesRequest * @instance */ - ThreatEntryAdditions.prototype.rawHashes = $util.emptyArray; + SearchHashesRequest.prototype.hashPrefix = $util.newBuffer([]); /** - * ThreatEntryAdditions riceHashes. - * @member {google.cloud.webrisk.v1beta1.IRiceDeltaEncoding|null|undefined} riceHashes - * @memberof google.cloud.webrisk.v1beta1.ThreatEntryAdditions + * SearchHashesRequest threatTypes. + * @member {Array.} threatTypes + * @memberof google.cloud.webrisk.v1beta1.SearchHashesRequest * @instance */ - ThreatEntryAdditions.prototype.riceHashes = null; + SearchHashesRequest.prototype.threatTypes = $util.emptyArray; /** - * Creates a new ThreatEntryAdditions instance using the specified properties. + * Creates a new SearchHashesRequest instance using the specified properties. * @function create - * @memberof google.cloud.webrisk.v1beta1.ThreatEntryAdditions + * @memberof google.cloud.webrisk.v1beta1.SearchHashesRequest * @static - * @param {google.cloud.webrisk.v1beta1.IThreatEntryAdditions=} [properties] Properties to set - * @returns {google.cloud.webrisk.v1beta1.ThreatEntryAdditions} ThreatEntryAdditions instance + * @param {google.cloud.webrisk.v1beta1.ISearchHashesRequest=} [properties] Properties to set + * @returns {google.cloud.webrisk.v1beta1.SearchHashesRequest} SearchHashesRequest instance */ - ThreatEntryAdditions.create = function create(properties) { - return new ThreatEntryAdditions(properties); + SearchHashesRequest.create = function create(properties) { + return new SearchHashesRequest(properties); }; /** - * Encodes the specified ThreatEntryAdditions message. Does not implicitly {@link google.cloud.webrisk.v1beta1.ThreatEntryAdditions.verify|verify} messages. + * Encodes the specified SearchHashesRequest message. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchHashesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.webrisk.v1beta1.ThreatEntryAdditions + * @memberof google.cloud.webrisk.v1beta1.SearchHashesRequest * @static - * @param {google.cloud.webrisk.v1beta1.IThreatEntryAdditions} message ThreatEntryAdditions message or plain object to encode + * @param {google.cloud.webrisk.v1beta1.ISearchHashesRequest} message SearchHashesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ThreatEntryAdditions.encode = function encode(message, writer) { + SearchHashesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rawHashes != null && message.rawHashes.length) - for (var i = 0; i < message.rawHashes.length; ++i) - $root.google.cloud.webrisk.v1beta1.RawHashes.encode(message.rawHashes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.riceHashes != null && Object.hasOwnProperty.call(message, "riceHashes")) - $root.google.cloud.webrisk.v1beta1.RiceDeltaEncoding.encode(message.riceHashes, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.hashPrefix != null && Object.hasOwnProperty.call(message, "hashPrefix")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.hashPrefix); + if (message.threatTypes != null && message.threatTypes.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.threatTypes.length; ++i) + writer.int32(message.threatTypes[i]); + writer.ldelim(); + } return writer; }; /** - * Encodes the specified ThreatEntryAdditions message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.ThreatEntryAdditions.verify|verify} messages. + * Encodes the specified SearchHashesRequest message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchHashesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.webrisk.v1beta1.ThreatEntryAdditions + * @memberof google.cloud.webrisk.v1beta1.SearchHashesRequest * @static - * @param {google.cloud.webrisk.v1beta1.IThreatEntryAdditions} message ThreatEntryAdditions message or plain object to encode + * @param {google.cloud.webrisk.v1beta1.ISearchHashesRequest} message SearchHashesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ThreatEntryAdditions.encodeDelimited = function encodeDelimited(message, writer) { + SearchHashesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ThreatEntryAdditions message from the specified reader or buffer. + * Decodes a SearchHashesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.webrisk.v1beta1.ThreatEntryAdditions + * @memberof google.cloud.webrisk.v1beta1.SearchHashesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.webrisk.v1beta1.ThreatEntryAdditions} ThreatEntryAdditions + * @returns {google.cloud.webrisk.v1beta1.SearchHashesRequest} SearchHashesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ThreatEntryAdditions.decode = function decode(reader, length) { + SearchHashesRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1beta1.ThreatEntryAdditions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1beta1.SearchHashesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.rawHashes && message.rawHashes.length)) - message.rawHashes = []; - message.rawHashes.push($root.google.cloud.webrisk.v1beta1.RawHashes.decode(reader, reader.uint32())); + message.hashPrefix = reader.bytes(); break; } case 2: { - message.riceHashes = $root.google.cloud.webrisk.v1beta1.RiceDeltaEncoding.decode(reader, reader.uint32()); + if (!(message.threatTypes && message.threatTypes.length)) + message.threatTypes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.threatTypes.push(reader.int32()); + } else + message.threatTypes.push(reader.int32()); break; } default: @@ -7898,154 +8985,183 @@ }; /** - * Decodes a ThreatEntryAdditions message from the specified reader or buffer, length delimited. + * Decodes a SearchHashesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.webrisk.v1beta1.ThreatEntryAdditions + * @memberof google.cloud.webrisk.v1beta1.SearchHashesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.webrisk.v1beta1.ThreatEntryAdditions} ThreatEntryAdditions + * @returns {google.cloud.webrisk.v1beta1.SearchHashesRequest} SearchHashesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ThreatEntryAdditions.decodeDelimited = function decodeDelimited(reader) { + SearchHashesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ThreatEntryAdditions message. + * Verifies a SearchHashesRequest message. * @function verify - * @memberof google.cloud.webrisk.v1beta1.ThreatEntryAdditions + * @memberof google.cloud.webrisk.v1beta1.SearchHashesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ThreatEntryAdditions.verify = function verify(message) { + SearchHashesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rawHashes != null && message.hasOwnProperty("rawHashes")) { - if (!Array.isArray(message.rawHashes)) - return "rawHashes: array expected"; - for (var i = 0; i < message.rawHashes.length; ++i) { - var error = $root.google.cloud.webrisk.v1beta1.RawHashes.verify(message.rawHashes[i]); - if (error) - return "rawHashes." + error; - } - } - if (message.riceHashes != null && message.hasOwnProperty("riceHashes")) { - var error = $root.google.cloud.webrisk.v1beta1.RiceDeltaEncoding.verify(message.riceHashes); - if (error) - return "riceHashes." + error; + if (message.hashPrefix != null && message.hasOwnProperty("hashPrefix")) + if (!(message.hashPrefix && typeof message.hashPrefix.length === "number" || $util.isString(message.hashPrefix))) + return "hashPrefix: buffer expected"; + if (message.threatTypes != null && message.hasOwnProperty("threatTypes")) { + if (!Array.isArray(message.threatTypes)) + return "threatTypes: array expected"; + for (var i = 0; i < message.threatTypes.length; ++i) + switch (message.threatTypes[i]) { + default: + return "threatTypes: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + break; + } } return null; }; /** - * Creates a ThreatEntryAdditions message from a plain object. Also converts values to their respective internal types. + * Creates a SearchHashesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.webrisk.v1beta1.ThreatEntryAdditions + * @memberof google.cloud.webrisk.v1beta1.SearchHashesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.webrisk.v1beta1.ThreatEntryAdditions} ThreatEntryAdditions + * @returns {google.cloud.webrisk.v1beta1.SearchHashesRequest} SearchHashesRequest */ - ThreatEntryAdditions.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.webrisk.v1beta1.ThreatEntryAdditions) + SearchHashesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.webrisk.v1beta1.SearchHashesRequest) return object; - var message = new $root.google.cloud.webrisk.v1beta1.ThreatEntryAdditions(); - if (object.rawHashes) { - if (!Array.isArray(object.rawHashes)) - throw TypeError(".google.cloud.webrisk.v1beta1.ThreatEntryAdditions.rawHashes: array expected"); - message.rawHashes = []; - for (var i = 0; i < object.rawHashes.length; ++i) { - if (typeof object.rawHashes[i] !== "object") - throw TypeError(".google.cloud.webrisk.v1beta1.ThreatEntryAdditions.rawHashes: object expected"); - message.rawHashes[i] = $root.google.cloud.webrisk.v1beta1.RawHashes.fromObject(object.rawHashes[i]); - } - } - if (object.riceHashes != null) { - if (typeof object.riceHashes !== "object") - throw TypeError(".google.cloud.webrisk.v1beta1.ThreatEntryAdditions.riceHashes: object expected"); - message.riceHashes = $root.google.cloud.webrisk.v1beta1.RiceDeltaEncoding.fromObject(object.riceHashes); + var message = new $root.google.cloud.webrisk.v1beta1.SearchHashesRequest(); + if (object.hashPrefix != null) + if (typeof object.hashPrefix === "string") + $util.base64.decode(object.hashPrefix, message.hashPrefix = $util.newBuffer($util.base64.length(object.hashPrefix)), 0); + else if (object.hashPrefix.length >= 0) + message.hashPrefix = object.hashPrefix; + if (object.threatTypes) { + if (!Array.isArray(object.threatTypes)) + throw TypeError(".google.cloud.webrisk.v1beta1.SearchHashesRequest.threatTypes: array expected"); + message.threatTypes = []; + for (var i = 0; i < object.threatTypes.length; ++i) + switch (object.threatTypes[i]) { + default: + if (typeof object.threatTypes[i] === "number") { + message.threatTypes[i] = object.threatTypes[i]; + break; + } + case "THREAT_TYPE_UNSPECIFIED": + case 0: + message.threatTypes[i] = 0; + break; + case "MALWARE": + case 1: + message.threatTypes[i] = 1; + break; + case "SOCIAL_ENGINEERING": + case 2: + message.threatTypes[i] = 2; + break; + case "UNWANTED_SOFTWARE": + case 3: + message.threatTypes[i] = 3; + break; + } } return message; }; /** - * Creates a plain object from a ThreatEntryAdditions message. Also converts values to other types if specified. + * Creates a plain object from a SearchHashesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.webrisk.v1beta1.ThreatEntryAdditions + * @memberof google.cloud.webrisk.v1beta1.SearchHashesRequest * @static - * @param {google.cloud.webrisk.v1beta1.ThreatEntryAdditions} message ThreatEntryAdditions + * @param {google.cloud.webrisk.v1beta1.SearchHashesRequest} message SearchHashesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ThreatEntryAdditions.toObject = function toObject(message, options) { + SearchHashesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.rawHashes = []; + object.threatTypes = []; if (options.defaults) - object.riceHashes = null; - if (message.rawHashes && message.rawHashes.length) { - object.rawHashes = []; - for (var j = 0; j < message.rawHashes.length; ++j) - object.rawHashes[j] = $root.google.cloud.webrisk.v1beta1.RawHashes.toObject(message.rawHashes[j], options); + if (options.bytes === String) + object.hashPrefix = ""; + else { + object.hashPrefix = []; + if (options.bytes !== Array) + object.hashPrefix = $util.newBuffer(object.hashPrefix); + } + if (message.hashPrefix != null && message.hasOwnProperty("hashPrefix")) + object.hashPrefix = options.bytes === String ? $util.base64.encode(message.hashPrefix, 0, message.hashPrefix.length) : options.bytes === Array ? Array.prototype.slice.call(message.hashPrefix) : message.hashPrefix; + if (message.threatTypes && message.threatTypes.length) { + object.threatTypes = []; + for (var j = 0; j < message.threatTypes.length; ++j) + object.threatTypes[j] = options.enums === String ? $root.google.cloud.webrisk.v1beta1.ThreatType[message.threatTypes[j]] === undefined ? message.threatTypes[j] : $root.google.cloud.webrisk.v1beta1.ThreatType[message.threatTypes[j]] : message.threatTypes[j]; } - if (message.riceHashes != null && message.hasOwnProperty("riceHashes")) - object.riceHashes = $root.google.cloud.webrisk.v1beta1.RiceDeltaEncoding.toObject(message.riceHashes, options); return object; }; /** - * Converts this ThreatEntryAdditions to JSON. + * Converts this SearchHashesRequest to JSON. * @function toJSON - * @memberof google.cloud.webrisk.v1beta1.ThreatEntryAdditions + * @memberof google.cloud.webrisk.v1beta1.SearchHashesRequest * @instance * @returns {Object.} JSON object */ - ThreatEntryAdditions.prototype.toJSON = function toJSON() { + SearchHashesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ThreatEntryAdditions + * Gets the default type url for SearchHashesRequest * @function getTypeUrl - * @memberof google.cloud.webrisk.v1beta1.ThreatEntryAdditions + * @memberof google.cloud.webrisk.v1beta1.SearchHashesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ThreatEntryAdditions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SearchHashesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.webrisk.v1beta1.ThreatEntryAdditions"; + return typeUrlPrefix + "/google.cloud.webrisk.v1beta1.SearchHashesRequest"; }; - return ThreatEntryAdditions; + return SearchHashesRequest; })(); - v1beta1.ThreatEntryRemovals = (function() { + v1beta1.SearchHashesResponse = (function() { /** - * Properties of a ThreatEntryRemovals. + * Properties of a SearchHashesResponse. * @memberof google.cloud.webrisk.v1beta1 - * @interface IThreatEntryRemovals - * @property {google.cloud.webrisk.v1beta1.IRawIndices|null} [rawIndices] ThreatEntryRemovals rawIndices - * @property {google.cloud.webrisk.v1beta1.IRiceDeltaEncoding|null} [riceIndices] ThreatEntryRemovals riceIndices + * @interface ISearchHashesResponse + * @property {Array.|null} [threats] SearchHashesResponse threats + * @property {google.protobuf.ITimestamp|null} [negativeExpireTime] SearchHashesResponse negativeExpireTime */ /** - * Constructs a new ThreatEntryRemovals. + * Constructs a new SearchHashesResponse. * @memberof google.cloud.webrisk.v1beta1 - * @classdesc Represents a ThreatEntryRemovals. - * @implements IThreatEntryRemovals + * @classdesc Represents a SearchHashesResponse. + * @implements ISearchHashesResponse * @constructor - * @param {google.cloud.webrisk.v1beta1.IThreatEntryRemovals=} [properties] Properties to set + * @param {google.cloud.webrisk.v1beta1.ISearchHashesResponse=} [properties] Properties to set */ - function ThreatEntryRemovals(properties) { + function SearchHashesResponse(properties) { + this.threats = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8053,89 +9169,92 @@ } /** - * ThreatEntryRemovals rawIndices. - * @member {google.cloud.webrisk.v1beta1.IRawIndices|null|undefined} rawIndices - * @memberof google.cloud.webrisk.v1beta1.ThreatEntryRemovals + * SearchHashesResponse threats. + * @member {Array.} threats + * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse * @instance */ - ThreatEntryRemovals.prototype.rawIndices = null; + SearchHashesResponse.prototype.threats = $util.emptyArray; /** - * ThreatEntryRemovals riceIndices. - * @member {google.cloud.webrisk.v1beta1.IRiceDeltaEncoding|null|undefined} riceIndices - * @memberof google.cloud.webrisk.v1beta1.ThreatEntryRemovals + * SearchHashesResponse negativeExpireTime. + * @member {google.protobuf.ITimestamp|null|undefined} negativeExpireTime + * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse * @instance */ - ThreatEntryRemovals.prototype.riceIndices = null; + SearchHashesResponse.prototype.negativeExpireTime = null; /** - * Creates a new ThreatEntryRemovals instance using the specified properties. + * Creates a new SearchHashesResponse instance using the specified properties. * @function create - * @memberof google.cloud.webrisk.v1beta1.ThreatEntryRemovals + * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse * @static - * @param {google.cloud.webrisk.v1beta1.IThreatEntryRemovals=} [properties] Properties to set - * @returns {google.cloud.webrisk.v1beta1.ThreatEntryRemovals} ThreatEntryRemovals instance + * @param {google.cloud.webrisk.v1beta1.ISearchHashesResponse=} [properties] Properties to set + * @returns {google.cloud.webrisk.v1beta1.SearchHashesResponse} SearchHashesResponse instance */ - ThreatEntryRemovals.create = function create(properties) { - return new ThreatEntryRemovals(properties); + SearchHashesResponse.create = function create(properties) { + return new SearchHashesResponse(properties); }; /** - * Encodes the specified ThreatEntryRemovals message. Does not implicitly {@link google.cloud.webrisk.v1beta1.ThreatEntryRemovals.verify|verify} messages. + * Encodes the specified SearchHashesResponse message. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchHashesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.webrisk.v1beta1.ThreatEntryRemovals + * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse * @static - * @param {google.cloud.webrisk.v1beta1.IThreatEntryRemovals} message ThreatEntryRemovals message or plain object to encode + * @param {google.cloud.webrisk.v1beta1.ISearchHashesResponse} message SearchHashesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ThreatEntryRemovals.encode = function encode(message, writer) { + SearchHashesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rawIndices != null && Object.hasOwnProperty.call(message, "rawIndices")) - $root.google.cloud.webrisk.v1beta1.RawIndices.encode(message.rawIndices, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.riceIndices != null && Object.hasOwnProperty.call(message, "riceIndices")) - $root.google.cloud.webrisk.v1beta1.RiceDeltaEncoding.encode(message.riceIndices, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.threats != null && message.threats.length) + for (var i = 0; i < message.threats.length; ++i) + $root.google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash.encode(message.threats[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.negativeExpireTime != null && Object.hasOwnProperty.call(message, "negativeExpireTime")) + $root.google.protobuf.Timestamp.encode(message.negativeExpireTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ThreatEntryRemovals message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.ThreatEntryRemovals.verify|verify} messages. + * Encodes the specified SearchHashesResponse message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchHashesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.webrisk.v1beta1.ThreatEntryRemovals + * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse * @static - * @param {google.cloud.webrisk.v1beta1.IThreatEntryRemovals} message ThreatEntryRemovals message or plain object to encode + * @param {google.cloud.webrisk.v1beta1.ISearchHashesResponse} message SearchHashesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ThreatEntryRemovals.encodeDelimited = function encodeDelimited(message, writer) { + SearchHashesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ThreatEntryRemovals message from the specified reader or buffer. + * Decodes a SearchHashesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.webrisk.v1beta1.ThreatEntryRemovals + * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.webrisk.v1beta1.ThreatEntryRemovals} ThreatEntryRemovals + * @returns {google.cloud.webrisk.v1beta1.SearchHashesResponse} SearchHashesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ThreatEntryRemovals.decode = function decode(reader, length) { + SearchHashesResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1beta1.ThreatEntryRemovals(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1beta1.SearchHashesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.rawIndices = $root.google.cloud.webrisk.v1beta1.RawIndices.decode(reader, reader.uint32()); + if (!(message.threats && message.threats.length)) + message.threats = []; + message.threats.push($root.google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash.decode(reader, reader.uint32())); break; } case 2: { - message.riceIndices = $root.google.cloud.webrisk.v1beta1.RiceDeltaEncoding.decode(reader, reader.uint32()); + message.negativeExpireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } default: @@ -8147,403 +9266,473 @@ }; /** - * Decodes a ThreatEntryRemovals message from the specified reader or buffer, length delimited. + * Decodes a SearchHashesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.webrisk.v1beta1.ThreatEntryRemovals + * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.webrisk.v1beta1.ThreatEntryRemovals} ThreatEntryRemovals + * @returns {google.cloud.webrisk.v1beta1.SearchHashesResponse} SearchHashesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ThreatEntryRemovals.decodeDelimited = function decodeDelimited(reader) { + SearchHashesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ThreatEntryRemovals message. + * Verifies a SearchHashesResponse message. * @function verify - * @memberof google.cloud.webrisk.v1beta1.ThreatEntryRemovals + * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ThreatEntryRemovals.verify = function verify(message) { + SearchHashesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rawIndices != null && message.hasOwnProperty("rawIndices")) { - var error = $root.google.cloud.webrisk.v1beta1.RawIndices.verify(message.rawIndices); - if (error) - return "rawIndices." + error; + if (message.threats != null && message.hasOwnProperty("threats")) { + if (!Array.isArray(message.threats)) + return "threats: array expected"; + for (var i = 0; i < message.threats.length; ++i) { + var error = $root.google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash.verify(message.threats[i]); + if (error) + return "threats." + error; + } } - if (message.riceIndices != null && message.hasOwnProperty("riceIndices")) { - var error = $root.google.cloud.webrisk.v1beta1.RiceDeltaEncoding.verify(message.riceIndices); + if (message.negativeExpireTime != null && message.hasOwnProperty("negativeExpireTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.negativeExpireTime); if (error) - return "riceIndices." + error; + return "negativeExpireTime." + error; } return null; }; /** - * Creates a ThreatEntryRemovals message from a plain object. Also converts values to their respective internal types. + * Creates a SearchHashesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.webrisk.v1beta1.ThreatEntryRemovals + * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.webrisk.v1beta1.ThreatEntryRemovals} ThreatEntryRemovals + * @returns {google.cloud.webrisk.v1beta1.SearchHashesResponse} SearchHashesResponse */ - ThreatEntryRemovals.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.webrisk.v1beta1.ThreatEntryRemovals) + SearchHashesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.webrisk.v1beta1.SearchHashesResponse) return object; - var message = new $root.google.cloud.webrisk.v1beta1.ThreatEntryRemovals(); - if (object.rawIndices != null) { - if (typeof object.rawIndices !== "object") - throw TypeError(".google.cloud.webrisk.v1beta1.ThreatEntryRemovals.rawIndices: object expected"); - message.rawIndices = $root.google.cloud.webrisk.v1beta1.RawIndices.fromObject(object.rawIndices); + var message = new $root.google.cloud.webrisk.v1beta1.SearchHashesResponse(); + if (object.threats) { + if (!Array.isArray(object.threats)) + throw TypeError(".google.cloud.webrisk.v1beta1.SearchHashesResponse.threats: array expected"); + message.threats = []; + for (var i = 0; i < object.threats.length; ++i) { + if (typeof object.threats[i] !== "object") + throw TypeError(".google.cloud.webrisk.v1beta1.SearchHashesResponse.threats: object expected"); + message.threats[i] = $root.google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash.fromObject(object.threats[i]); + } } - if (object.riceIndices != null) { - if (typeof object.riceIndices !== "object") - throw TypeError(".google.cloud.webrisk.v1beta1.ThreatEntryRemovals.riceIndices: object expected"); - message.riceIndices = $root.google.cloud.webrisk.v1beta1.RiceDeltaEncoding.fromObject(object.riceIndices); + if (object.negativeExpireTime != null) { + if (typeof object.negativeExpireTime !== "object") + throw TypeError(".google.cloud.webrisk.v1beta1.SearchHashesResponse.negativeExpireTime: object expected"); + message.negativeExpireTime = $root.google.protobuf.Timestamp.fromObject(object.negativeExpireTime); } return message; }; /** - * Creates a plain object from a ThreatEntryRemovals message. Also converts values to other types if specified. + * Creates a plain object from a SearchHashesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.webrisk.v1beta1.ThreatEntryRemovals + * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse * @static - * @param {google.cloud.webrisk.v1beta1.ThreatEntryRemovals} message ThreatEntryRemovals + * @param {google.cloud.webrisk.v1beta1.SearchHashesResponse} message SearchHashesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ThreatEntryRemovals.toObject = function toObject(message, options) { + SearchHashesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.rawIndices = null; - object.riceIndices = null; + if (options.arrays || options.defaults) + object.threats = []; + if (options.defaults) + object.negativeExpireTime = null; + if (message.threats && message.threats.length) { + object.threats = []; + for (var j = 0; j < message.threats.length; ++j) + object.threats[j] = $root.google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash.toObject(message.threats[j], options); } - if (message.rawIndices != null && message.hasOwnProperty("rawIndices")) - object.rawIndices = $root.google.cloud.webrisk.v1beta1.RawIndices.toObject(message.rawIndices, options); - if (message.riceIndices != null && message.hasOwnProperty("riceIndices")) - object.riceIndices = $root.google.cloud.webrisk.v1beta1.RiceDeltaEncoding.toObject(message.riceIndices, options); + if (message.negativeExpireTime != null && message.hasOwnProperty("negativeExpireTime")) + object.negativeExpireTime = $root.google.protobuf.Timestamp.toObject(message.negativeExpireTime, options); return object; }; /** - * Converts this ThreatEntryRemovals to JSON. + * Converts this SearchHashesResponse to JSON. * @function toJSON - * @memberof google.cloud.webrisk.v1beta1.ThreatEntryRemovals + * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse * @instance * @returns {Object.} JSON object */ - ThreatEntryRemovals.prototype.toJSON = function toJSON() { + SearchHashesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ThreatEntryRemovals + * Gets the default type url for SearchHashesResponse * @function getTypeUrl - * @memberof google.cloud.webrisk.v1beta1.ThreatEntryRemovals + * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ThreatEntryRemovals.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SearchHashesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.webrisk.v1beta1.ThreatEntryRemovals"; + return typeUrlPrefix + "/google.cloud.webrisk.v1beta1.SearchHashesResponse"; }; - return ThreatEntryRemovals; - })(); - - /** - * ThreatType enum. - * @name google.cloud.webrisk.v1beta1.ThreatType - * @enum {number} - * @property {number} THREAT_TYPE_UNSPECIFIED=0 THREAT_TYPE_UNSPECIFIED value - * @property {number} MALWARE=1 MALWARE value - * @property {number} SOCIAL_ENGINEERING=2 SOCIAL_ENGINEERING value - * @property {number} UNWANTED_SOFTWARE=3 UNWANTED_SOFTWARE value - */ - v1beta1.ThreatType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "THREAT_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "MALWARE"] = 1; - values[valuesById[2] = "SOCIAL_ENGINEERING"] = 2; - values[valuesById[3] = "UNWANTED_SOFTWARE"] = 3; - return values; - })(); - - /** - * CompressionType enum. - * @name google.cloud.webrisk.v1beta1.CompressionType - * @enum {number} - * @property {number} COMPRESSION_TYPE_UNSPECIFIED=0 COMPRESSION_TYPE_UNSPECIFIED value - * @property {number} RAW=1 RAW value - * @property {number} RICE=2 RICE value - */ - v1beta1.CompressionType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "COMPRESSION_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "RAW"] = 1; - values[valuesById[2] = "RICE"] = 2; - return values; - })(); - - v1beta1.RawIndices = (function() { + SearchHashesResponse.ThreatHash = (function() { - /** - * Properties of a RawIndices. - * @memberof google.cloud.webrisk.v1beta1 - * @interface IRawIndices - * @property {Array.|null} [indices] RawIndices indices - */ + /** + * Properties of a ThreatHash. + * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse + * @interface IThreatHash + * @property {Array.|null} [threatTypes] ThreatHash threatTypes + * @property {Uint8Array|null} [hash] ThreatHash hash + * @property {google.protobuf.ITimestamp|null} [expireTime] ThreatHash expireTime + */ - /** - * Constructs a new RawIndices. - * @memberof google.cloud.webrisk.v1beta1 - * @classdesc Represents a RawIndices. - * @implements IRawIndices - * @constructor - * @param {google.cloud.webrisk.v1beta1.IRawIndices=} [properties] Properties to set - */ - function RawIndices(properties) { - this.indices = []; - 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]]; - } + /** + * Constructs a new ThreatHash. + * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse + * @classdesc Represents a ThreatHash. + * @implements IThreatHash + * @constructor + * @param {google.cloud.webrisk.v1beta1.SearchHashesResponse.IThreatHash=} [properties] Properties to set + */ + function ThreatHash(properties) { + this.threatTypes = []; + 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]]; + } - /** - * RawIndices indices. - * @member {Array.} indices - * @memberof google.cloud.webrisk.v1beta1.RawIndices - * @instance - */ - RawIndices.prototype.indices = $util.emptyArray; + /** + * ThreatHash threatTypes. + * @member {Array.} threatTypes + * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash + * @instance + */ + ThreatHash.prototype.threatTypes = $util.emptyArray; - /** - * Creates a new RawIndices instance using the specified properties. - * @function create - * @memberof google.cloud.webrisk.v1beta1.RawIndices - * @static - * @param {google.cloud.webrisk.v1beta1.IRawIndices=} [properties] Properties to set - * @returns {google.cloud.webrisk.v1beta1.RawIndices} RawIndices instance - */ - RawIndices.create = function create(properties) { - return new RawIndices(properties); - }; + /** + * ThreatHash hash. + * @member {Uint8Array} hash + * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash + * @instance + */ + ThreatHash.prototype.hash = $util.newBuffer([]); - /** - * Encodes the specified RawIndices message. Does not implicitly {@link google.cloud.webrisk.v1beta1.RawIndices.verify|verify} messages. - * @function encode - * @memberof google.cloud.webrisk.v1beta1.RawIndices - * @static - * @param {google.cloud.webrisk.v1beta1.IRawIndices} message RawIndices message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RawIndices.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.indices != null && message.indices.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.indices.length; ++i) - writer.int32(message.indices[i]); - writer.ldelim(); - } - return writer; - }; + /** + * ThreatHash expireTime. + * @member {google.protobuf.ITimestamp|null|undefined} expireTime + * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash + * @instance + */ + ThreatHash.prototype.expireTime = null; - /** - * Encodes the specified RawIndices message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.RawIndices.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.webrisk.v1beta1.RawIndices - * @static - * @param {google.cloud.webrisk.v1beta1.IRawIndices} message RawIndices message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RawIndices.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new ThreatHash instance using the specified properties. + * @function create + * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash + * @static + * @param {google.cloud.webrisk.v1beta1.SearchHashesResponse.IThreatHash=} [properties] Properties to set + * @returns {google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash} ThreatHash instance + */ + ThreatHash.create = function create(properties) { + return new ThreatHash(properties); + }; - /** - * Decodes a RawIndices message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.webrisk.v1beta1.RawIndices - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.webrisk.v1beta1.RawIndices} RawIndices - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RawIndices.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1beta1.RawIndices(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.indices && message.indices.length)) - message.indices = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.indices.push(reader.int32()); - } else - message.indices.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; + /** + * Encodes the specified ThreatHash message. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash.verify|verify} messages. + * @function encode + * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash + * @static + * @param {google.cloud.webrisk.v1beta1.SearchHashesResponse.IThreatHash} message ThreatHash message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ThreatHash.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.threatTypes != null && message.threatTypes.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.threatTypes.length; ++i) + writer.int32(message.threatTypes[i]); + writer.ldelim(); } - } - return message; - }; + if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.hash); + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; - /** - * Decodes a RawIndices message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.webrisk.v1beta1.RawIndices - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.webrisk.v1beta1.RawIndices} RawIndices - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RawIndices.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RawIndices message. - * @function verify - * @memberof google.cloud.webrisk.v1beta1.RawIndices - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RawIndices.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.indices != null && message.hasOwnProperty("indices")) { - if (!Array.isArray(message.indices)) - return "indices: array expected"; - for (var i = 0; i < message.indices.length; ++i) - if (!$util.isInteger(message.indices[i])) - return "indices: integer[] expected"; - } - return null; - }; - - /** - * Creates a RawIndices message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.webrisk.v1beta1.RawIndices - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.webrisk.v1beta1.RawIndices} RawIndices - */ - RawIndices.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.webrisk.v1beta1.RawIndices) - return object; - var message = new $root.google.cloud.webrisk.v1beta1.RawIndices(); - if (object.indices) { - if (!Array.isArray(object.indices)) - throw TypeError(".google.cloud.webrisk.v1beta1.RawIndices.indices: array expected"); - message.indices = []; - for (var i = 0; i < object.indices.length; ++i) - message.indices[i] = object.indices[i] | 0; - } - return message; - }; - - /** - * Creates a plain object from a RawIndices message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.webrisk.v1beta1.RawIndices - * @static - * @param {google.cloud.webrisk.v1beta1.RawIndices} message RawIndices - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RawIndices.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.indices = []; - if (message.indices && message.indices.length) { - object.indices = []; - for (var j = 0; j < message.indices.length; ++j) - object.indices[j] = message.indices[j]; - } - return object; - }; + /** + * Encodes the specified ThreatHash message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash + * @static + * @param {google.cloud.webrisk.v1beta1.SearchHashesResponse.IThreatHash} message ThreatHash message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ThreatHash.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Converts this RawIndices to JSON. - * @function toJSON - * @memberof google.cloud.webrisk.v1beta1.RawIndices - * @instance - * @returns {Object.} JSON object - */ - RawIndices.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a ThreatHash message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash} ThreatHash + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ThreatHash.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.threatTypes && message.threatTypes.length)) + message.threatTypes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.threatTypes.push(reader.int32()); + } else + message.threatTypes.push(reader.int32()); + break; + } + case 2: { + message.hash = reader.bytes(); + break; + } + case 3: { + message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Gets the default type url for RawIndices - * @function getTypeUrl - * @memberof google.cloud.webrisk.v1beta1.RawIndices - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RawIndices.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.webrisk.v1beta1.RawIndices"; - }; + /** + * Decodes a ThreatHash message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash} ThreatHash + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ThreatHash.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - return RawIndices; - })(); + /** + * Verifies a ThreatHash message. + * @function verify + * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ThreatHash.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.threatTypes != null && message.hasOwnProperty("threatTypes")) { + if (!Array.isArray(message.threatTypes)) + return "threatTypes: array expected"; + for (var i = 0; i < message.threatTypes.length; ++i) + switch (message.threatTypes[i]) { + default: + return "threatTypes: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.hash != null && message.hasOwnProperty("hash")) + if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash))) + return "hash: buffer expected"; + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expireTime); + if (error) + return "expireTime." + error; + } + return null; + }; - v1beta1.RawHashes = (function() { + /** + * Creates a ThreatHash message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash} ThreatHash + */ + ThreatHash.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash) + return object; + var message = new $root.google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash(); + if (object.threatTypes) { + if (!Array.isArray(object.threatTypes)) + throw TypeError(".google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash.threatTypes: array expected"); + message.threatTypes = []; + for (var i = 0; i < object.threatTypes.length; ++i) + switch (object.threatTypes[i]) { + default: + if (typeof object.threatTypes[i] === "number") { + message.threatTypes[i] = object.threatTypes[i]; + break; + } + case "THREAT_TYPE_UNSPECIFIED": + case 0: + message.threatTypes[i] = 0; + break; + case "MALWARE": + case 1: + message.threatTypes[i] = 1; + break; + case "SOCIAL_ENGINEERING": + case 2: + message.threatTypes[i] = 2; + break; + case "UNWANTED_SOFTWARE": + case 3: + message.threatTypes[i] = 3; + break; + } + } + if (object.hash != null) + if (typeof object.hash === "string") + $util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0); + else if (object.hash.length >= 0) + message.hash = object.hash; + if (object.expireTime != null) { + if (typeof object.expireTime !== "object") + throw TypeError(".google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash.expireTime: object expected"); + message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); + } + return message; + }; - /** - * Properties of a RawHashes. - * @memberof google.cloud.webrisk.v1beta1 - * @interface IRawHashes - * @property {number|null} [prefixSize] RawHashes prefixSize - * @property {Uint8Array|null} [rawHashes] RawHashes rawHashes + /** + * Creates a plain object from a ThreatHash message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash + * @static + * @param {google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash} message ThreatHash + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ThreatHash.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.threatTypes = []; + if (options.defaults) { + if (options.bytes === String) + object.hash = ""; + else { + object.hash = []; + if (options.bytes !== Array) + object.hash = $util.newBuffer(object.hash); + } + object.expireTime = null; + } + if (message.threatTypes && message.threatTypes.length) { + object.threatTypes = []; + for (var j = 0; j < message.threatTypes.length; ++j) + object.threatTypes[j] = options.enums === String ? $root.google.cloud.webrisk.v1beta1.ThreatType[message.threatTypes[j]] === undefined ? message.threatTypes[j] : $root.google.cloud.webrisk.v1beta1.ThreatType[message.threatTypes[j]] : message.threatTypes[j]; + } + if (message.hash != null && message.hasOwnProperty("hash")) + object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash; + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + return object; + }; + + /** + * Converts this ThreatHash to JSON. + * @function toJSON + * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash + * @instance + * @returns {Object.} JSON object + */ + ThreatHash.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ThreatHash + * @function getTypeUrl + * @memberof google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ThreatHash.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash"; + }; + + return ThreatHash; + })(); + + return SearchHashesResponse; + })(); + + v1beta1.ThreatEntryAdditions = (function() { + + /** + * Properties of a ThreatEntryAdditions. + * @memberof google.cloud.webrisk.v1beta1 + * @interface IThreatEntryAdditions + * @property {Array.|null} [rawHashes] ThreatEntryAdditions rawHashes + * @property {google.cloud.webrisk.v1beta1.IRiceDeltaEncoding|null} [riceHashes] ThreatEntryAdditions riceHashes */ /** - * Constructs a new RawHashes. + * Constructs a new ThreatEntryAdditions. * @memberof google.cloud.webrisk.v1beta1 - * @classdesc Represents a RawHashes. - * @implements IRawHashes + * @classdesc Represents a ThreatEntryAdditions. + * @implements IThreatEntryAdditions * @constructor - * @param {google.cloud.webrisk.v1beta1.IRawHashes=} [properties] Properties to set + * @param {google.cloud.webrisk.v1beta1.IThreatEntryAdditions=} [properties] Properties to set */ - function RawHashes(properties) { + function ThreatEntryAdditions(properties) { + this.rawHashes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8551,89 +9740,92 @@ } /** - * RawHashes prefixSize. - * @member {number} prefixSize - * @memberof google.cloud.webrisk.v1beta1.RawHashes + * ThreatEntryAdditions rawHashes. + * @member {Array.} rawHashes + * @memberof google.cloud.webrisk.v1beta1.ThreatEntryAdditions * @instance */ - RawHashes.prototype.prefixSize = 0; + ThreatEntryAdditions.prototype.rawHashes = $util.emptyArray; /** - * RawHashes rawHashes. - * @member {Uint8Array} rawHashes - * @memberof google.cloud.webrisk.v1beta1.RawHashes + * ThreatEntryAdditions riceHashes. + * @member {google.cloud.webrisk.v1beta1.IRiceDeltaEncoding|null|undefined} riceHashes + * @memberof google.cloud.webrisk.v1beta1.ThreatEntryAdditions * @instance */ - RawHashes.prototype.rawHashes = $util.newBuffer([]); + ThreatEntryAdditions.prototype.riceHashes = null; /** - * Creates a new RawHashes instance using the specified properties. + * Creates a new ThreatEntryAdditions instance using the specified properties. * @function create - * @memberof google.cloud.webrisk.v1beta1.RawHashes + * @memberof google.cloud.webrisk.v1beta1.ThreatEntryAdditions * @static - * @param {google.cloud.webrisk.v1beta1.IRawHashes=} [properties] Properties to set - * @returns {google.cloud.webrisk.v1beta1.RawHashes} RawHashes instance + * @param {google.cloud.webrisk.v1beta1.IThreatEntryAdditions=} [properties] Properties to set + * @returns {google.cloud.webrisk.v1beta1.ThreatEntryAdditions} ThreatEntryAdditions instance */ - RawHashes.create = function create(properties) { - return new RawHashes(properties); + ThreatEntryAdditions.create = function create(properties) { + return new ThreatEntryAdditions(properties); }; /** - * Encodes the specified RawHashes message. Does not implicitly {@link google.cloud.webrisk.v1beta1.RawHashes.verify|verify} messages. + * Encodes the specified ThreatEntryAdditions message. Does not implicitly {@link google.cloud.webrisk.v1beta1.ThreatEntryAdditions.verify|verify} messages. * @function encode - * @memberof google.cloud.webrisk.v1beta1.RawHashes + * @memberof google.cloud.webrisk.v1beta1.ThreatEntryAdditions * @static - * @param {google.cloud.webrisk.v1beta1.IRawHashes} message RawHashes message or plain object to encode + * @param {google.cloud.webrisk.v1beta1.IThreatEntryAdditions} message ThreatEntryAdditions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RawHashes.encode = function encode(message, writer) { + ThreatEntryAdditions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.prefixSize != null && Object.hasOwnProperty.call(message, "prefixSize")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.prefixSize); - if (message.rawHashes != null && Object.hasOwnProperty.call(message, "rawHashes")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.rawHashes); + if (message.rawHashes != null && message.rawHashes.length) + for (var i = 0; i < message.rawHashes.length; ++i) + $root.google.cloud.webrisk.v1beta1.RawHashes.encode(message.rawHashes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.riceHashes != null && Object.hasOwnProperty.call(message, "riceHashes")) + $root.google.cloud.webrisk.v1beta1.RiceDeltaEncoding.encode(message.riceHashes, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified RawHashes message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.RawHashes.verify|verify} messages. + * Encodes the specified ThreatEntryAdditions message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.ThreatEntryAdditions.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.webrisk.v1beta1.RawHashes + * @memberof google.cloud.webrisk.v1beta1.ThreatEntryAdditions * @static - * @param {google.cloud.webrisk.v1beta1.IRawHashes} message RawHashes message or plain object to encode + * @param {google.cloud.webrisk.v1beta1.IThreatEntryAdditions} message ThreatEntryAdditions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RawHashes.encodeDelimited = function encodeDelimited(message, writer) { + ThreatEntryAdditions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RawHashes message from the specified reader or buffer. + * Decodes a ThreatEntryAdditions message from the specified reader or buffer. * @function decode - * @memberof google.cloud.webrisk.v1beta1.RawHashes + * @memberof google.cloud.webrisk.v1beta1.ThreatEntryAdditions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.webrisk.v1beta1.RawHashes} RawHashes + * @returns {google.cloud.webrisk.v1beta1.ThreatEntryAdditions} ThreatEntryAdditions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RawHashes.decode = function decode(reader, length) { + ThreatEntryAdditions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1beta1.RawHashes(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1beta1.ThreatEntryAdditions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.prefixSize = reader.int32(); + if (!(message.rawHashes && message.rawHashes.length)) + message.rawHashes = []; + message.rawHashes.push($root.google.cloud.webrisk.v1beta1.RawHashes.decode(reader, reader.uint32())); break; } case 2: { - message.rawHashes = reader.bytes(); + message.riceHashes = $root.google.cloud.webrisk.v1beta1.RiceDeltaEncoding.decode(reader, reader.uint32()); break; } default: @@ -8645,143 +9837,154 @@ }; /** - * Decodes a RawHashes message from the specified reader or buffer, length delimited. + * Decodes a ThreatEntryAdditions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.webrisk.v1beta1.RawHashes + * @memberof google.cloud.webrisk.v1beta1.ThreatEntryAdditions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.webrisk.v1beta1.RawHashes} RawHashes + * @returns {google.cloud.webrisk.v1beta1.ThreatEntryAdditions} ThreatEntryAdditions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RawHashes.decodeDelimited = function decodeDelimited(reader) { + ThreatEntryAdditions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RawHashes message. + * Verifies a ThreatEntryAdditions message. * @function verify - * @memberof google.cloud.webrisk.v1beta1.RawHashes + * @memberof google.cloud.webrisk.v1beta1.ThreatEntryAdditions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RawHashes.verify = function verify(message) { + ThreatEntryAdditions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.prefixSize != null && message.hasOwnProperty("prefixSize")) - if (!$util.isInteger(message.prefixSize)) - return "prefixSize: integer expected"; - if (message.rawHashes != null && message.hasOwnProperty("rawHashes")) - if (!(message.rawHashes && typeof message.rawHashes.length === "number" || $util.isString(message.rawHashes))) - return "rawHashes: buffer expected"; + if (message.rawHashes != null && message.hasOwnProperty("rawHashes")) { + if (!Array.isArray(message.rawHashes)) + return "rawHashes: array expected"; + for (var i = 0; i < message.rawHashes.length; ++i) { + var error = $root.google.cloud.webrisk.v1beta1.RawHashes.verify(message.rawHashes[i]); + if (error) + return "rawHashes." + error; + } + } + if (message.riceHashes != null && message.hasOwnProperty("riceHashes")) { + var error = $root.google.cloud.webrisk.v1beta1.RiceDeltaEncoding.verify(message.riceHashes); + if (error) + return "riceHashes." + error; + } return null; }; /** - * Creates a RawHashes message from a plain object. Also converts values to their respective internal types. + * Creates a ThreatEntryAdditions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.webrisk.v1beta1.RawHashes + * @memberof google.cloud.webrisk.v1beta1.ThreatEntryAdditions * @static * @param {Object.} object Plain object - * @returns {google.cloud.webrisk.v1beta1.RawHashes} RawHashes + * @returns {google.cloud.webrisk.v1beta1.ThreatEntryAdditions} ThreatEntryAdditions */ - RawHashes.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.webrisk.v1beta1.RawHashes) + ThreatEntryAdditions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.webrisk.v1beta1.ThreatEntryAdditions) return object; - var message = new $root.google.cloud.webrisk.v1beta1.RawHashes(); - if (object.prefixSize != null) - message.prefixSize = object.prefixSize | 0; - if (object.rawHashes != null) - if (typeof object.rawHashes === "string") - $util.base64.decode(object.rawHashes, message.rawHashes = $util.newBuffer($util.base64.length(object.rawHashes)), 0); - else if (object.rawHashes.length >= 0) - message.rawHashes = object.rawHashes; + var message = new $root.google.cloud.webrisk.v1beta1.ThreatEntryAdditions(); + if (object.rawHashes) { + if (!Array.isArray(object.rawHashes)) + throw TypeError(".google.cloud.webrisk.v1beta1.ThreatEntryAdditions.rawHashes: array expected"); + message.rawHashes = []; + for (var i = 0; i < object.rawHashes.length; ++i) { + if (typeof object.rawHashes[i] !== "object") + throw TypeError(".google.cloud.webrisk.v1beta1.ThreatEntryAdditions.rawHashes: object expected"); + message.rawHashes[i] = $root.google.cloud.webrisk.v1beta1.RawHashes.fromObject(object.rawHashes[i]); + } + } + if (object.riceHashes != null) { + if (typeof object.riceHashes !== "object") + throw TypeError(".google.cloud.webrisk.v1beta1.ThreatEntryAdditions.riceHashes: object expected"); + message.riceHashes = $root.google.cloud.webrisk.v1beta1.RiceDeltaEncoding.fromObject(object.riceHashes); + } return message; }; /** - * Creates a plain object from a RawHashes message. Also converts values to other types if specified. + * Creates a plain object from a ThreatEntryAdditions message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.webrisk.v1beta1.RawHashes + * @memberof google.cloud.webrisk.v1beta1.ThreatEntryAdditions * @static - * @param {google.cloud.webrisk.v1beta1.RawHashes} message RawHashes + * @param {google.cloud.webrisk.v1beta1.ThreatEntryAdditions} message ThreatEntryAdditions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RawHashes.toObject = function toObject(message, options) { + ThreatEntryAdditions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.prefixSize = 0; - if (options.bytes === String) - object.rawHashes = ""; - else { - object.rawHashes = []; - if (options.bytes !== Array) - object.rawHashes = $util.newBuffer(object.rawHashes); - } + if (options.arrays || options.defaults) + object.rawHashes = []; + if (options.defaults) + object.riceHashes = null; + if (message.rawHashes && message.rawHashes.length) { + object.rawHashes = []; + for (var j = 0; j < message.rawHashes.length; ++j) + object.rawHashes[j] = $root.google.cloud.webrisk.v1beta1.RawHashes.toObject(message.rawHashes[j], options); } - if (message.prefixSize != null && message.hasOwnProperty("prefixSize")) - object.prefixSize = message.prefixSize; - if (message.rawHashes != null && message.hasOwnProperty("rawHashes")) - object.rawHashes = options.bytes === String ? $util.base64.encode(message.rawHashes, 0, message.rawHashes.length) : options.bytes === Array ? Array.prototype.slice.call(message.rawHashes) : message.rawHashes; + if (message.riceHashes != null && message.hasOwnProperty("riceHashes")) + object.riceHashes = $root.google.cloud.webrisk.v1beta1.RiceDeltaEncoding.toObject(message.riceHashes, options); return object; }; /** - * Converts this RawHashes to JSON. + * Converts this ThreatEntryAdditions to JSON. * @function toJSON - * @memberof google.cloud.webrisk.v1beta1.RawHashes + * @memberof google.cloud.webrisk.v1beta1.ThreatEntryAdditions * @instance * @returns {Object.} JSON object */ - RawHashes.prototype.toJSON = function toJSON() { + ThreatEntryAdditions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RawHashes + * Gets the default type url for ThreatEntryAdditions * @function getTypeUrl - * @memberof google.cloud.webrisk.v1beta1.RawHashes + * @memberof google.cloud.webrisk.v1beta1.ThreatEntryAdditions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RawHashes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ThreatEntryAdditions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.webrisk.v1beta1.RawHashes"; + return typeUrlPrefix + "/google.cloud.webrisk.v1beta1.ThreatEntryAdditions"; }; - return RawHashes; + return ThreatEntryAdditions; })(); - v1beta1.RiceDeltaEncoding = (function() { + v1beta1.ThreatEntryRemovals = (function() { /** - * Properties of a RiceDeltaEncoding. + * Properties of a ThreatEntryRemovals. * @memberof google.cloud.webrisk.v1beta1 - * @interface IRiceDeltaEncoding - * @property {number|Long|null} [firstValue] RiceDeltaEncoding firstValue - * @property {number|null} [riceParameter] RiceDeltaEncoding riceParameter - * @property {number|null} [entryCount] RiceDeltaEncoding entryCount - * @property {Uint8Array|null} [encodedData] RiceDeltaEncoding encodedData + * @interface IThreatEntryRemovals + * @property {google.cloud.webrisk.v1beta1.IRawIndices|null} [rawIndices] ThreatEntryRemovals rawIndices + * @property {google.cloud.webrisk.v1beta1.IRiceDeltaEncoding|null} [riceIndices] ThreatEntryRemovals riceIndices */ /** - * Constructs a new RiceDeltaEncoding. + * Constructs a new ThreatEntryRemovals. * @memberof google.cloud.webrisk.v1beta1 - * @classdesc Represents a RiceDeltaEncoding. - * @implements IRiceDeltaEncoding + * @classdesc Represents a ThreatEntryRemovals. + * @implements IThreatEntryRemovals * @constructor - * @param {google.cloud.webrisk.v1beta1.IRiceDeltaEncoding=} [properties] Properties to set + * @param {google.cloud.webrisk.v1beta1.IThreatEntryRemovals=} [properties] Properties to set */ - function RiceDeltaEncoding(properties) { + function ThreatEntryRemovals(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8789,117 +9992,89 @@ } /** - * RiceDeltaEncoding firstValue. - * @member {number|Long} firstValue - * @memberof google.cloud.webrisk.v1beta1.RiceDeltaEncoding - * @instance - */ - RiceDeltaEncoding.prototype.firstValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * RiceDeltaEncoding riceParameter. - * @member {number} riceParameter - * @memberof google.cloud.webrisk.v1beta1.RiceDeltaEncoding - * @instance - */ - RiceDeltaEncoding.prototype.riceParameter = 0; - - /** - * RiceDeltaEncoding entryCount. - * @member {number} entryCount - * @memberof google.cloud.webrisk.v1beta1.RiceDeltaEncoding + * ThreatEntryRemovals rawIndices. + * @member {google.cloud.webrisk.v1beta1.IRawIndices|null|undefined} rawIndices + * @memberof google.cloud.webrisk.v1beta1.ThreatEntryRemovals * @instance */ - RiceDeltaEncoding.prototype.entryCount = 0; + ThreatEntryRemovals.prototype.rawIndices = null; /** - * RiceDeltaEncoding encodedData. - * @member {Uint8Array} encodedData - * @memberof google.cloud.webrisk.v1beta1.RiceDeltaEncoding + * ThreatEntryRemovals riceIndices. + * @member {google.cloud.webrisk.v1beta1.IRiceDeltaEncoding|null|undefined} riceIndices + * @memberof google.cloud.webrisk.v1beta1.ThreatEntryRemovals * @instance */ - RiceDeltaEncoding.prototype.encodedData = $util.newBuffer([]); + ThreatEntryRemovals.prototype.riceIndices = null; /** - * Creates a new RiceDeltaEncoding instance using the specified properties. + * Creates a new ThreatEntryRemovals instance using the specified properties. * @function create - * @memberof google.cloud.webrisk.v1beta1.RiceDeltaEncoding + * @memberof google.cloud.webrisk.v1beta1.ThreatEntryRemovals * @static - * @param {google.cloud.webrisk.v1beta1.IRiceDeltaEncoding=} [properties] Properties to set - * @returns {google.cloud.webrisk.v1beta1.RiceDeltaEncoding} RiceDeltaEncoding instance + * @param {google.cloud.webrisk.v1beta1.IThreatEntryRemovals=} [properties] Properties to set + * @returns {google.cloud.webrisk.v1beta1.ThreatEntryRemovals} ThreatEntryRemovals instance */ - RiceDeltaEncoding.create = function create(properties) { - return new RiceDeltaEncoding(properties); + ThreatEntryRemovals.create = function create(properties) { + return new ThreatEntryRemovals(properties); }; /** - * Encodes the specified RiceDeltaEncoding message. Does not implicitly {@link google.cloud.webrisk.v1beta1.RiceDeltaEncoding.verify|verify} messages. + * Encodes the specified ThreatEntryRemovals message. Does not implicitly {@link google.cloud.webrisk.v1beta1.ThreatEntryRemovals.verify|verify} messages. * @function encode - * @memberof google.cloud.webrisk.v1beta1.RiceDeltaEncoding + * @memberof google.cloud.webrisk.v1beta1.ThreatEntryRemovals * @static - * @param {google.cloud.webrisk.v1beta1.IRiceDeltaEncoding} message RiceDeltaEncoding message or plain object to encode + * @param {google.cloud.webrisk.v1beta1.IThreatEntryRemovals} message ThreatEntryRemovals message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RiceDeltaEncoding.encode = function encode(message, writer) { + ThreatEntryRemovals.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.firstValue != null && Object.hasOwnProperty.call(message, "firstValue")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.firstValue); - if (message.riceParameter != null && Object.hasOwnProperty.call(message, "riceParameter")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.riceParameter); - if (message.entryCount != null && Object.hasOwnProperty.call(message, "entryCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.entryCount); - if (message.encodedData != null && Object.hasOwnProperty.call(message, "encodedData")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.encodedData); + if (message.rawIndices != null && Object.hasOwnProperty.call(message, "rawIndices")) + $root.google.cloud.webrisk.v1beta1.RawIndices.encode(message.rawIndices, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.riceIndices != null && Object.hasOwnProperty.call(message, "riceIndices")) + $root.google.cloud.webrisk.v1beta1.RiceDeltaEncoding.encode(message.riceIndices, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified RiceDeltaEncoding message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.RiceDeltaEncoding.verify|verify} messages. + * Encodes the specified ThreatEntryRemovals message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.ThreatEntryRemovals.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.webrisk.v1beta1.RiceDeltaEncoding + * @memberof google.cloud.webrisk.v1beta1.ThreatEntryRemovals * @static - * @param {google.cloud.webrisk.v1beta1.IRiceDeltaEncoding} message RiceDeltaEncoding message or plain object to encode + * @param {google.cloud.webrisk.v1beta1.IThreatEntryRemovals} message ThreatEntryRemovals message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RiceDeltaEncoding.encodeDelimited = function encodeDelimited(message, writer) { + ThreatEntryRemovals.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RiceDeltaEncoding message from the specified reader or buffer. + * Decodes a ThreatEntryRemovals message from the specified reader or buffer. * @function decode - * @memberof google.cloud.webrisk.v1beta1.RiceDeltaEncoding + * @memberof google.cloud.webrisk.v1beta1.ThreatEntryRemovals * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.webrisk.v1beta1.RiceDeltaEncoding} RiceDeltaEncoding + * @returns {google.cloud.webrisk.v1beta1.ThreatEntryRemovals} ThreatEntryRemovals * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RiceDeltaEncoding.decode = function decode(reader, length) { + ThreatEntryRemovals.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1beta1.RiceDeltaEncoding(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1beta1.ThreatEntryRemovals(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.firstValue = reader.int64(); + message.rawIndices = $root.google.cloud.webrisk.v1beta1.RawIndices.decode(reader, reader.uint32()); break; } case 2: { - message.riceParameter = reader.int32(); - break; - } - case 3: { - message.entryCount = reader.int32(); - break; - } - case 4: { - message.encodedData = reader.bytes(); + message.riceIndices = $root.google.cloud.webrisk.v1beta1.RiceDeltaEncoding.decode(reader, reader.uint32()); break; } default: @@ -8911,925 +10086,954 @@ }; /** - * Decodes a RiceDeltaEncoding message from the specified reader or buffer, length delimited. + * Decodes a ThreatEntryRemovals message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.webrisk.v1beta1.RiceDeltaEncoding + * @memberof google.cloud.webrisk.v1beta1.ThreatEntryRemovals * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.webrisk.v1beta1.RiceDeltaEncoding} RiceDeltaEncoding + * @returns {google.cloud.webrisk.v1beta1.ThreatEntryRemovals} ThreatEntryRemovals * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RiceDeltaEncoding.decodeDelimited = function decodeDelimited(reader) { + ThreatEntryRemovals.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RiceDeltaEncoding message. + * Verifies a ThreatEntryRemovals message. * @function verify - * @memberof google.cloud.webrisk.v1beta1.RiceDeltaEncoding + * @memberof google.cloud.webrisk.v1beta1.ThreatEntryRemovals * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RiceDeltaEncoding.verify = function verify(message) { + ThreatEntryRemovals.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.firstValue != null && message.hasOwnProperty("firstValue")) - if (!$util.isInteger(message.firstValue) && !(message.firstValue && $util.isInteger(message.firstValue.low) && $util.isInteger(message.firstValue.high))) - return "firstValue: integer|Long expected"; - if (message.riceParameter != null && message.hasOwnProperty("riceParameter")) - if (!$util.isInteger(message.riceParameter)) - return "riceParameter: integer expected"; - if (message.entryCount != null && message.hasOwnProperty("entryCount")) - if (!$util.isInteger(message.entryCount)) - return "entryCount: integer expected"; - if (message.encodedData != null && message.hasOwnProperty("encodedData")) - if (!(message.encodedData && typeof message.encodedData.length === "number" || $util.isString(message.encodedData))) - return "encodedData: buffer expected"; + if (message.rawIndices != null && message.hasOwnProperty("rawIndices")) { + var error = $root.google.cloud.webrisk.v1beta1.RawIndices.verify(message.rawIndices); + if (error) + return "rawIndices." + error; + } + if (message.riceIndices != null && message.hasOwnProperty("riceIndices")) { + var error = $root.google.cloud.webrisk.v1beta1.RiceDeltaEncoding.verify(message.riceIndices); + if (error) + return "riceIndices." + error; + } return null; }; /** - * Creates a RiceDeltaEncoding message from a plain object. Also converts values to their respective internal types. + * Creates a ThreatEntryRemovals message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.webrisk.v1beta1.RiceDeltaEncoding + * @memberof google.cloud.webrisk.v1beta1.ThreatEntryRemovals * @static * @param {Object.} object Plain object - * @returns {google.cloud.webrisk.v1beta1.RiceDeltaEncoding} RiceDeltaEncoding + * @returns {google.cloud.webrisk.v1beta1.ThreatEntryRemovals} ThreatEntryRemovals */ - RiceDeltaEncoding.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.webrisk.v1beta1.RiceDeltaEncoding) + ThreatEntryRemovals.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.webrisk.v1beta1.ThreatEntryRemovals) return object; - var message = new $root.google.cloud.webrisk.v1beta1.RiceDeltaEncoding(); - if (object.firstValue != null) - if ($util.Long) - (message.firstValue = $util.Long.fromValue(object.firstValue)).unsigned = false; - else if (typeof object.firstValue === "string") - message.firstValue = parseInt(object.firstValue, 10); - else if (typeof object.firstValue === "number") - message.firstValue = object.firstValue; - else if (typeof object.firstValue === "object") - message.firstValue = new $util.LongBits(object.firstValue.low >>> 0, object.firstValue.high >>> 0).toNumber(); - if (object.riceParameter != null) - message.riceParameter = object.riceParameter | 0; - if (object.entryCount != null) - message.entryCount = object.entryCount | 0; - if (object.encodedData != null) - if (typeof object.encodedData === "string") - $util.base64.decode(object.encodedData, message.encodedData = $util.newBuffer($util.base64.length(object.encodedData)), 0); - else if (object.encodedData.length >= 0) - message.encodedData = object.encodedData; + var message = new $root.google.cloud.webrisk.v1beta1.ThreatEntryRemovals(); + if (object.rawIndices != null) { + if (typeof object.rawIndices !== "object") + throw TypeError(".google.cloud.webrisk.v1beta1.ThreatEntryRemovals.rawIndices: object expected"); + message.rawIndices = $root.google.cloud.webrisk.v1beta1.RawIndices.fromObject(object.rawIndices); + } + if (object.riceIndices != null) { + if (typeof object.riceIndices !== "object") + throw TypeError(".google.cloud.webrisk.v1beta1.ThreatEntryRemovals.riceIndices: object expected"); + message.riceIndices = $root.google.cloud.webrisk.v1beta1.RiceDeltaEncoding.fromObject(object.riceIndices); + } return message; }; /** - * Creates a plain object from a RiceDeltaEncoding message. Also converts values to other types if specified. + * Creates a plain object from a ThreatEntryRemovals message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.webrisk.v1beta1.RiceDeltaEncoding + * @memberof google.cloud.webrisk.v1beta1.ThreatEntryRemovals * @static - * @param {google.cloud.webrisk.v1beta1.RiceDeltaEncoding} message RiceDeltaEncoding + * @param {google.cloud.webrisk.v1beta1.ThreatEntryRemovals} message ThreatEntryRemovals * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RiceDeltaEncoding.toObject = function toObject(message, options) { + ThreatEntryRemovals.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.firstValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.firstValue = options.longs === String ? "0" : 0; - object.riceParameter = 0; - object.entryCount = 0; - if (options.bytes === String) - object.encodedData = ""; - else { - object.encodedData = []; - if (options.bytes !== Array) - object.encodedData = $util.newBuffer(object.encodedData); - } + object.rawIndices = null; + object.riceIndices = null; } - if (message.firstValue != null && message.hasOwnProperty("firstValue")) - if (typeof message.firstValue === "number") - object.firstValue = options.longs === String ? String(message.firstValue) : message.firstValue; - else - object.firstValue = options.longs === String ? $util.Long.prototype.toString.call(message.firstValue) : options.longs === Number ? new $util.LongBits(message.firstValue.low >>> 0, message.firstValue.high >>> 0).toNumber() : message.firstValue; - if (message.riceParameter != null && message.hasOwnProperty("riceParameter")) - object.riceParameter = message.riceParameter; - if (message.entryCount != null && message.hasOwnProperty("entryCount")) - object.entryCount = message.entryCount; - if (message.encodedData != null && message.hasOwnProperty("encodedData")) - object.encodedData = options.bytes === String ? $util.base64.encode(message.encodedData, 0, message.encodedData.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedData) : message.encodedData; + if (message.rawIndices != null && message.hasOwnProperty("rawIndices")) + object.rawIndices = $root.google.cloud.webrisk.v1beta1.RawIndices.toObject(message.rawIndices, options); + if (message.riceIndices != null && message.hasOwnProperty("riceIndices")) + object.riceIndices = $root.google.cloud.webrisk.v1beta1.RiceDeltaEncoding.toObject(message.riceIndices, options); return object; }; /** - * Converts this RiceDeltaEncoding to JSON. + * Converts this ThreatEntryRemovals to JSON. * @function toJSON - * @memberof google.cloud.webrisk.v1beta1.RiceDeltaEncoding + * @memberof google.cloud.webrisk.v1beta1.ThreatEntryRemovals * @instance * @returns {Object.} JSON object */ - RiceDeltaEncoding.prototype.toJSON = function toJSON() { + ThreatEntryRemovals.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RiceDeltaEncoding + * Gets the default type url for ThreatEntryRemovals * @function getTypeUrl - * @memberof google.cloud.webrisk.v1beta1.RiceDeltaEncoding + * @memberof google.cloud.webrisk.v1beta1.ThreatEntryRemovals * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RiceDeltaEncoding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ThreatEntryRemovals.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.webrisk.v1beta1.RiceDeltaEncoding"; + return typeUrlPrefix + "/google.cloud.webrisk.v1beta1.ThreatEntryRemovals"; }; - return RiceDeltaEncoding; + return ThreatEntryRemovals; })(); - return v1beta1; - })(); - - return webrisk; - })(); + /** + * ThreatType enum. + * @name google.cloud.webrisk.v1beta1.ThreatType + * @enum {number} + * @property {number} THREAT_TYPE_UNSPECIFIED=0 THREAT_TYPE_UNSPECIFIED value + * @property {number} MALWARE=1 MALWARE value + * @property {number} SOCIAL_ENGINEERING=2 SOCIAL_ENGINEERING value + * @property {number} UNWANTED_SOFTWARE=3 UNWANTED_SOFTWARE value + */ + v1beta1.ThreatType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "THREAT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MALWARE"] = 1; + values[valuesById[2] = "SOCIAL_ENGINEERING"] = 2; + values[valuesById[3] = "UNWANTED_SOFTWARE"] = 3; + return values; + })(); - return cloud; - })(); + /** + * CompressionType enum. + * @name google.cloud.webrisk.v1beta1.CompressionType + * @enum {number} + * @property {number} COMPRESSION_TYPE_UNSPECIFIED=0 COMPRESSION_TYPE_UNSPECIFIED value + * @property {number} RAW=1 RAW value + * @property {number} RICE=2 RICE value + */ + v1beta1.CompressionType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COMPRESSION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RAW"] = 1; + values[valuesById[2] = "RICE"] = 2; + return values; + })(); - google.api = (function() { + v1beta1.RawIndices = (function() { - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; + /** + * Properties of a RawIndices. + * @memberof google.cloud.webrisk.v1beta1 + * @interface IRawIndices + * @property {Array.|null} [indices] RawIndices indices + */ - api.Http = (function() { + /** + * Constructs a new RawIndices. + * @memberof google.cloud.webrisk.v1beta1 + * @classdesc Represents a RawIndices. + * @implements IRawIndices + * @constructor + * @param {google.cloud.webrisk.v1beta1.IRawIndices=} [properties] Properties to set + */ + function RawIndices(properties) { + this.indices = []; + 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]]; + } - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion - */ + /** + * RawIndices indices. + * @member {Array.} indices + * @memberof google.cloud.webrisk.v1beta1.RawIndices + * @instance + */ + RawIndices.prototype.indices = $util.emptyArray; - /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp - * @constructor - * @param {google.api.IHttp=} [properties] Properties to set - */ - function Http(properties) { - 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]]; - } + /** + * Creates a new RawIndices instance using the specified properties. + * @function create + * @memberof google.cloud.webrisk.v1beta1.RawIndices + * @static + * @param {google.cloud.webrisk.v1beta1.IRawIndices=} [properties] Properties to set + * @returns {google.cloud.webrisk.v1beta1.RawIndices} RawIndices instance + */ + RawIndices.create = function create(properties) { + return new RawIndices(properties); + }; - /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance - */ - Http.prototype.rules = $util.emptyArray; + /** + * Encodes the specified RawIndices message. Does not implicitly {@link google.cloud.webrisk.v1beta1.RawIndices.verify|verify} messages. + * @function encode + * @memberof google.cloud.webrisk.v1beta1.RawIndices + * @static + * @param {google.cloud.webrisk.v1beta1.IRawIndices} message RawIndices message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RawIndices.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.indices != null && message.indices.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.indices.length; ++i) + writer.int32(message.indices[i]); + writer.ldelim(); + } + return writer; + }; - /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http - * @instance - */ - Http.prototype.fullyDecodeReservedExpansion = false; + /** + * Encodes the specified RawIndices message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.RawIndices.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.webrisk.v1beta1.RawIndices + * @static + * @param {google.cloud.webrisk.v1beta1.IRawIndices} message RawIndices message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RawIndices.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a new Http instance using the specified properties. - * @function create - * @memberof google.api.Http - * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance - */ - Http.create = function create(properties) { - return new Http(properties); - }; + /** + * Decodes a RawIndices message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.webrisk.v1beta1.RawIndices + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.webrisk.v1beta1.RawIndices} RawIndices + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RawIndices.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1beta1.RawIndices(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.indices && message.indices.length)) + message.indices = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.indices.push(reader.int32()); + } else + message.indices.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encode - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); - return writer; - }; + /** + * Decodes a RawIndices message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.webrisk.v1beta1.RawIndices + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.webrisk.v1beta1.RawIndices} RawIndices + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RawIndices.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Http message from the specified reader or buffer. - * @function decode - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - } - case 2: { - message.fullyDecodeReservedExpansion = reader.bool(); - break; + /** + * Verifies a RawIndices message. + * @function verify + * @memberof google.cloud.webrisk.v1beta1.RawIndices + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RawIndices.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.indices != null && message.hasOwnProperty("indices")) { + if (!Array.isArray(message.indices)) + return "indices: array expected"; + for (var i = 0; i < message.indices.length; ++i) + if (!$util.isInteger(message.indices[i])) + return "indices: integer[] expected"; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return null; + }; - /** - * Verifies a Http message. - * @function verify - * @memberof google.api.Http - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Http.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; - return null; - }; + /** + * Creates a RawIndices message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.webrisk.v1beta1.RawIndices + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.webrisk.v1beta1.RawIndices} RawIndices + */ + RawIndices.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.webrisk.v1beta1.RawIndices) + return object; + var message = new $root.google.cloud.webrisk.v1beta1.RawIndices(); + if (object.indices) { + if (!Array.isArray(object.indices)) + throw TypeError(".google.cloud.webrisk.v1beta1.RawIndices.indices: array expected"); + message.indices = []; + for (var i = 0; i < object.indices.length; ++i) + message.indices[i] = object.indices[i] | 0; + } + return message; + }; - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Http - * @static - * @param {Object.} object Plain object - * @returns {google.api.Http} Http - */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) - return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - return message; - }; + /** + * Creates a plain object from a RawIndices message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.webrisk.v1beta1.RawIndices + * @static + * @param {google.cloud.webrisk.v1beta1.RawIndices} message RawIndices + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RawIndices.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.indices = []; + if (message.indices && message.indices.length) { + object.indices = []; + for (var j = 0; j < message.indices.length; ++j) + object.indices[j] = message.indices[j]; + } + return object; + }; - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Http - * @static - * @param {google.api.Http} message Http - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Http.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; - return object; - }; + /** + * Converts this RawIndices to JSON. + * @function toJSON + * @memberof google.cloud.webrisk.v1beta1.RawIndices + * @instance + * @returns {Object.} JSON object + */ + RawIndices.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this Http to JSON. - * @function toJSON - * @memberof google.api.Http - * @instance - * @returns {Object.} JSON object - */ - Http.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for RawIndices + * @function getTypeUrl + * @memberof google.cloud.webrisk.v1beta1.RawIndices + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RawIndices.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.webrisk.v1beta1.RawIndices"; + }; - /** - * Gets the default type url for Http - * @function getTypeUrl - * @memberof google.api.Http - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Http"; - }; + return RawIndices; + })(); - return Http; - })(); + v1beta1.RawHashes = (function() { - api.HttpRule = (function() { + /** + * Properties of a RawHashes. + * @memberof google.cloud.webrisk.v1beta1 + * @interface IRawHashes + * @property {number|null} [prefixSize] RawHashes prefixSize + * @property {Uint8Array|null} [rawHashes] RawHashes rawHashes + */ - /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [responseBody] HttpRule responseBody - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings - */ - - /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule - * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set - */ - function HttpRule(properties) { - this.additionalBindings = []; - 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]]; - } - - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; + /** + * Constructs a new RawHashes. + * @memberof google.cloud.webrisk.v1beta1 + * @classdesc Represents a RawHashes. + * @implements IRawHashes + * @constructor + * @param {google.cloud.webrisk.v1beta1.IRawHashes=} [properties] Properties to set + */ + function RawHashes(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]]; + } - /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; + /** + * RawHashes prefixSize. + * @member {number} prefixSize + * @memberof google.cloud.webrisk.v1beta1.RawHashes + * @instance + */ + RawHashes.prototype.prefixSize = 0; - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; + /** + * RawHashes rawHashes. + * @member {Uint8Array} rawHashes + * @memberof google.cloud.webrisk.v1beta1.RawHashes + * @instance + */ + RawHashes.prototype.rawHashes = $util.newBuffer([]); - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = null; + /** + * Creates a new RawHashes instance using the specified properties. + * @function create + * @memberof google.cloud.webrisk.v1beta1.RawHashes + * @static + * @param {google.cloud.webrisk.v1beta1.IRawHashes=} [properties] Properties to set + * @returns {google.cloud.webrisk.v1beta1.RawHashes} RawHashes instance + */ + RawHashes.create = function create(properties) { + return new RawHashes(properties); + }; - /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = null; + /** + * Encodes the specified RawHashes message. Does not implicitly {@link google.cloud.webrisk.v1beta1.RawHashes.verify|verify} messages. + * @function encode + * @memberof google.cloud.webrisk.v1beta1.RawHashes + * @static + * @param {google.cloud.webrisk.v1beta1.IRawHashes} message RawHashes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RawHashes.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.prefixSize != null && Object.hasOwnProperty.call(message, "prefixSize")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.prefixSize); + if (message.rawHashes != null && Object.hasOwnProperty.call(message, "rawHashes")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.rawHashes); + return writer; + }; - /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = null; + /** + * Encodes the specified RawHashes message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.RawHashes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.webrisk.v1beta1.RawHashes + * @static + * @param {google.cloud.webrisk.v1beta1.IRawHashes} message RawHashes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RawHashes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; + /** + * Decodes a RawHashes message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.webrisk.v1beta1.RawHashes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.webrisk.v1beta1.RawHashes} RawHashes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RawHashes.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1beta1.RawHashes(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.prefixSize = reader.int32(); + break; + } + case 2: { + message.rawHashes = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; + /** + * Decodes a RawHashes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.webrisk.v1beta1.RawHashes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.webrisk.v1beta1.RawHashes} RawHashes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RawHashes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.responseBody = ""; + /** + * Verifies a RawHashes message. + * @function verify + * @memberof google.cloud.webrisk.v1beta1.RawHashes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RawHashes.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.prefixSize != null && message.hasOwnProperty("prefixSize")) + if (!$util.isInteger(message.prefixSize)) + return "prefixSize: integer expected"; + if (message.rawHashes != null && message.hasOwnProperty("rawHashes")) + if (!(message.rawHashes && typeof message.rawHashes.length === "number" || $util.isString(message.rawHashes))) + return "rawHashes: buffer expected"; + return null; + }; - /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.additionalBindings = $util.emptyArray; + /** + * Creates a RawHashes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.webrisk.v1beta1.RawHashes + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.webrisk.v1beta1.RawHashes} RawHashes + */ + RawHashes.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.webrisk.v1beta1.RawHashes) + return object; + var message = new $root.google.cloud.webrisk.v1beta1.RawHashes(); + if (object.prefixSize != null) + message.prefixSize = object.prefixSize | 0; + if (object.rawHashes != null) + if (typeof object.rawHashes === "string") + $util.base64.decode(object.rawHashes, message.rawHashes = $util.newBuffer($util.base64.length(object.rawHashes)), 0); + else if (object.rawHashes.length >= 0) + message.rawHashes = object.rawHashes; + return message; + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Creates a plain object from a RawHashes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.webrisk.v1beta1.RawHashes + * @static + * @param {google.cloud.webrisk.v1beta1.RawHashes} message RawHashes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RawHashes.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.prefixSize = 0; + if (options.bytes === String) + object.rawHashes = ""; + else { + object.rawHashes = []; + if (options.bytes !== Array) + object.rawHashes = $util.newBuffer(object.rawHashes); + } + } + if (message.prefixSize != null && message.hasOwnProperty("prefixSize")) + object.prefixSize = message.prefixSize; + if (message.rawHashes != null && message.hasOwnProperty("rawHashes")) + object.rawHashes = options.bytes === String ? $util.base64.encode(message.rawHashes, 0, message.rawHashes.length) : options.bytes === Array ? Array.prototype.slice.call(message.rawHashes) : message.rawHashes; + return object; + }; - /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule - * @instance - */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Converts this RawHashes to JSON. + * @function toJSON + * @memberof google.cloud.webrisk.v1beta1.RawHashes + * @instance + * @returns {Object.} JSON object + */ + RawHashes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a new HttpRule instance using the specified properties. - * @function create - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance - */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); - }; + /** + * Gets the default type url for RawHashes + * @function getTypeUrl + * @memberof google.cloud.webrisk.v1beta1.RawHashes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RawHashes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.webrisk.v1beta1.RawHashes"; + }; - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encode - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); - return writer; - }; + return RawHashes; + })(); - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + v1beta1.RiceDeltaEncoding = (function() { - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @function decode - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.get = reader.string(); - break; - } - case 3: { - message.put = reader.string(); - break; - } - case 4: { - message.post = reader.string(); - break; - } - case 5: { - message["delete"] = reader.string(); - break; - } - case 6: { - message.patch = reader.string(); - break; - } - case 8: { - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - } - case 7: { - message.body = reader.string(); - break; - } - case 12: { - message.responseBody = reader.string(); - break; - } - case 11: { - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; + /** + * Properties of a RiceDeltaEncoding. + * @memberof google.cloud.webrisk.v1beta1 + * @interface IRiceDeltaEncoding + * @property {number|Long|null} [firstValue] RiceDeltaEncoding firstValue + * @property {number|null} [riceParameter] RiceDeltaEncoding riceParameter + * @property {number|null} [entryCount] RiceDeltaEncoding entryCount + * @property {Uint8Array|null} [encodedData] RiceDeltaEncoding encodedData + */ + + /** + * Constructs a new RiceDeltaEncoding. + * @memberof google.cloud.webrisk.v1beta1 + * @classdesc Represents a RiceDeltaEncoding. + * @implements IRiceDeltaEncoding + * @constructor + * @param {google.cloud.webrisk.v1beta1.IRiceDeltaEncoding=} [properties] Properties to set + */ + function RiceDeltaEncoding(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]]; } - } - return message; - }; - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * RiceDeltaEncoding firstValue. + * @member {number|Long} firstValue + * @memberof google.cloud.webrisk.v1beta1.RiceDeltaEncoding + * @instance + */ + RiceDeltaEncoding.prototype.firstValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Verifies a HttpRule message. - * @function verify - * @memberof google.api.HttpRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - if (!$util.isString(message.responseBody)) - return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { - if (!Array.isArray(message.additionalBindings)) - return "additionalBindings: array expected"; - for (var i = 0; i < message.additionalBindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); - if (error) - return "additionalBindings." + error; - } - } - return null; - }; + /** + * RiceDeltaEncoding riceParameter. + * @member {number} riceParameter + * @memberof google.cloud.webrisk.v1beta1.RiceDeltaEncoding + * @instance + */ + RiceDeltaEncoding.prototype.riceParameter = 0; - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.HttpRule - * @static - * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule - */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) - return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.responseBody != null) - message.responseBody = String(object.responseBody); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); - } - } - return message; - }; + /** + * RiceDeltaEncoding entryCount. + * @member {number} entryCount + * @memberof google.cloud.webrisk.v1beta1.RiceDeltaEncoding + * @instance + */ + RiceDeltaEncoding.prototype.entryCount = 0; - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.HttpRule - * @static - * @param {google.api.HttpRule} message HttpRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HttpRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.additionalBindings = []; - if (options.defaults) { - object.selector = ""; - object.body = ""; - object.responseBody = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); - } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; - return object; - }; + /** + * RiceDeltaEncoding encodedData. + * @member {Uint8Array} encodedData + * @memberof google.cloud.webrisk.v1beta1.RiceDeltaEncoding + * @instance + */ + RiceDeltaEncoding.prototype.encodedData = $util.newBuffer([]); - /** - * Converts this HttpRule to JSON. - * @function toJSON - * @memberof google.api.HttpRule - * @instance - * @returns {Object.} JSON object - */ - HttpRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a new RiceDeltaEncoding instance using the specified properties. + * @function create + * @memberof google.cloud.webrisk.v1beta1.RiceDeltaEncoding + * @static + * @param {google.cloud.webrisk.v1beta1.IRiceDeltaEncoding=} [properties] Properties to set + * @returns {google.cloud.webrisk.v1beta1.RiceDeltaEncoding} RiceDeltaEncoding instance + */ + RiceDeltaEncoding.create = function create(properties) { + return new RiceDeltaEncoding(properties); + }; - /** - * Gets the default type url for HttpRule - * @function getTypeUrl - * @memberof google.api.HttpRule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.HttpRule"; - }; + /** + * Encodes the specified RiceDeltaEncoding message. Does not implicitly {@link google.cloud.webrisk.v1beta1.RiceDeltaEncoding.verify|verify} messages. + * @function encode + * @memberof google.cloud.webrisk.v1beta1.RiceDeltaEncoding + * @static + * @param {google.cloud.webrisk.v1beta1.IRiceDeltaEncoding} message RiceDeltaEncoding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RiceDeltaEncoding.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.firstValue != null && Object.hasOwnProperty.call(message, "firstValue")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.firstValue); + if (message.riceParameter != null && Object.hasOwnProperty.call(message, "riceParameter")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.riceParameter); + if (message.entryCount != null && Object.hasOwnProperty.call(message, "entryCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.entryCount); + if (message.encodedData != null && Object.hasOwnProperty.call(message, "encodedData")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.encodedData); + return writer; + }; - return HttpRule; - })(); + /** + * Encodes the specified RiceDeltaEncoding message, length delimited. Does not implicitly {@link google.cloud.webrisk.v1beta1.RiceDeltaEncoding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.webrisk.v1beta1.RiceDeltaEncoding + * @static + * @param {google.cloud.webrisk.v1beta1.IRiceDeltaEncoding} message RiceDeltaEncoding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RiceDeltaEncoding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - api.CustomHttpPattern = (function() { + /** + * Decodes a RiceDeltaEncoding message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.webrisk.v1beta1.RiceDeltaEncoding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.webrisk.v1beta1.RiceDeltaEncoding} RiceDeltaEncoding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RiceDeltaEncoding.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.webrisk.v1beta1.RiceDeltaEncoding(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.firstValue = reader.int64(); + break; + } + case 2: { + message.riceParameter = reader.int32(); + break; + } + case 3: { + message.entryCount = reader.int32(); + break; + } + case 4: { + message.encodedData = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RiceDeltaEncoding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.webrisk.v1beta1.RiceDeltaEncoding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.webrisk.v1beta1.RiceDeltaEncoding} RiceDeltaEncoding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RiceDeltaEncoding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RiceDeltaEncoding message. + * @function verify + * @memberof google.cloud.webrisk.v1beta1.RiceDeltaEncoding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RiceDeltaEncoding.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.firstValue != null && message.hasOwnProperty("firstValue")) + if (!$util.isInteger(message.firstValue) && !(message.firstValue && $util.isInteger(message.firstValue.low) && $util.isInteger(message.firstValue.high))) + return "firstValue: integer|Long expected"; + if (message.riceParameter != null && message.hasOwnProperty("riceParameter")) + if (!$util.isInteger(message.riceParameter)) + return "riceParameter: integer expected"; + if (message.entryCount != null && message.hasOwnProperty("entryCount")) + if (!$util.isInteger(message.entryCount)) + return "entryCount: integer expected"; + if (message.encodedData != null && message.hasOwnProperty("encodedData")) + if (!(message.encodedData && typeof message.encodedData.length === "number" || $util.isString(message.encodedData))) + return "encodedData: buffer expected"; + return null; + }; + + /** + * Creates a RiceDeltaEncoding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.webrisk.v1beta1.RiceDeltaEncoding + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.webrisk.v1beta1.RiceDeltaEncoding} RiceDeltaEncoding + */ + RiceDeltaEncoding.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.webrisk.v1beta1.RiceDeltaEncoding) + return object; + var message = new $root.google.cloud.webrisk.v1beta1.RiceDeltaEncoding(); + if (object.firstValue != null) + if ($util.Long) + (message.firstValue = $util.Long.fromValue(object.firstValue)).unsigned = false; + else if (typeof object.firstValue === "string") + message.firstValue = parseInt(object.firstValue, 10); + else if (typeof object.firstValue === "number") + message.firstValue = object.firstValue; + else if (typeof object.firstValue === "object") + message.firstValue = new $util.LongBits(object.firstValue.low >>> 0, object.firstValue.high >>> 0).toNumber(); + if (object.riceParameter != null) + message.riceParameter = object.riceParameter | 0; + if (object.entryCount != null) + message.entryCount = object.entryCount | 0; + if (object.encodedData != null) + if (typeof object.encodedData === "string") + $util.base64.decode(object.encodedData, message.encodedData = $util.newBuffer($util.base64.length(object.encodedData)), 0); + else if (object.encodedData.length >= 0) + message.encodedData = object.encodedData; + return message; + }; + + /** + * Creates a plain object from a RiceDeltaEncoding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.webrisk.v1beta1.RiceDeltaEncoding + * @static + * @param {google.cloud.webrisk.v1beta1.RiceDeltaEncoding} message RiceDeltaEncoding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RiceDeltaEncoding.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.firstValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.firstValue = options.longs === String ? "0" : 0; + object.riceParameter = 0; + object.entryCount = 0; + if (options.bytes === String) + object.encodedData = ""; + else { + object.encodedData = []; + if (options.bytes !== Array) + object.encodedData = $util.newBuffer(object.encodedData); + } + } + if (message.firstValue != null && message.hasOwnProperty("firstValue")) + if (typeof message.firstValue === "number") + object.firstValue = options.longs === String ? String(message.firstValue) : message.firstValue; + else + object.firstValue = options.longs === String ? $util.Long.prototype.toString.call(message.firstValue) : options.longs === Number ? new $util.LongBits(message.firstValue.low >>> 0, message.firstValue.high >>> 0).toNumber() : message.firstValue; + if (message.riceParameter != null && message.hasOwnProperty("riceParameter")) + object.riceParameter = message.riceParameter; + if (message.entryCount != null && message.hasOwnProperty("entryCount")) + object.entryCount = message.entryCount; + if (message.encodedData != null && message.hasOwnProperty("encodedData")) + object.encodedData = options.bytes === String ? $util.base64.encode(message.encodedData, 0, message.encodedData.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedData) : message.encodedData; + return object; + }; + + /** + * Converts this RiceDeltaEncoding to JSON. + * @function toJSON + * @memberof google.cloud.webrisk.v1beta1.RiceDeltaEncoding + * @instance + * @returns {Object.} JSON object + */ + RiceDeltaEncoding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RiceDeltaEncoding + * @function getTypeUrl + * @memberof google.cloud.webrisk.v1beta1.RiceDeltaEncoding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RiceDeltaEncoding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.webrisk.v1beta1.RiceDeltaEncoding"; + }; + + return RiceDeltaEncoding; + })(); + + return v1beta1; + })(); + + return webrisk; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { /** - * Properties of a CustomHttpPattern. + * Properties of a Http. * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion */ /** - * Constructs a new CustomHttpPattern. + * Constructs a new Http. * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern + * @classdesc Represents a Http. + * @implements IHttp * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @param {google.api.IHttp=} [properties] Properties to set */ - function CustomHttpPattern(properties) { + function Http(properties) { + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9837,89 +11041,92 @@ } /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http * @instance */ - CustomHttpPattern.prototype.kind = ""; + Http.prototype.rules = $util.emptyArray; /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http * @instance */ - CustomHttpPattern.prototype.path = ""; + Http.prototype.fullyDecodeReservedExpansion = false; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * Creates a new Http instance using the specified properties. * @function create - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); + Http.create = function create(properties) { + return new Http(properties); }; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encode = function encode(message, writer) { + Http.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); return writer; }; /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + Http.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a Http message from the specified reader or buffer. * @function decode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.Http} Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomHttpPattern.decode = function decode(reader, length) { + Http.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.kind = reader.string(); + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; } case 2: { - message.path = reader.string(); + message.fullyDecodeReservedExpansion = reader.bool(); break; } default: @@ -9931,165 +11138,158 @@ }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a Http message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.Http} Http * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + Http.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomHttpPattern message. + * Verifies a Http message. * @function verify - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomHttpPattern.verify = function verify(message) { + Http.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: 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) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; return null; }; /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.Http} Http */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); return message; }; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * Creates a plain object from a Http message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {google.api.Http} message Http * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options) { + Http.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; return object; }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this Http to JSON. * @function toJSON - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @instance * @returns {Object.} JSON object */ - CustomHttpPattern.prototype.toJSON = function toJSON() { + Http.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CustomHttpPattern + * Gets the default type url for Http * @function getTypeUrl - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.CustomHttpPattern"; + return typeUrlPrefix + "/google.api.Http"; }; - return CustomHttpPattern; - })(); - - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; - return values; + return Http; })(); - api.ResourceDescriptor = (function() { + api.HttpRule = (function() { /** - * Properties of a ResourceDescriptor. + * Properties of a HttpRule. * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular - * @property {Array.|null} [style] ResourceDescriptor style + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings */ /** - * Constructs a new ResourceDescriptor. + * Constructs a new HttpRule. * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor + * @classdesc Represents a HttpRule. + * @implements IHttpRule * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @param {google.api.IHttpRule=} [properties] Properties to set */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; + function HttpRule(properties) { + this.additionalBindings = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10097,173 +11297,218 @@ } /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.type = ""; + HttpRule.prototype.selector = ""; /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; + HttpRule.prototype.get = null; /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.nameField = ""; + HttpRule.prototype.put = null; /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.history = 0; + HttpRule.prototype.post = null; /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.plural = ""; + HttpRule.prototype["delete"] = null; /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.singular = ""; + HttpRule.prototype.patch = null; /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor - * @instance + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance */ - ResourceDescriptor.prototype.style = $util.emptyArray; + HttpRule.prototype.custom = null; /** - * Creates a new ResourceDescriptor instance using the specified properties. + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. * @function create - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); + HttpRule.create = function create(properties) { + return new HttpRule(properties); }; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encode - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encode = function encode(message, writer) { + HttpRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); - if (message.style != null && message.style.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.style.length; ++i) - writer.int32(message.style[i]); - writer.ldelim(); - } + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); return writer; }; /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * Decodes a HttpRule message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.HttpRule} HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceDescriptor.decode = function decode(reader, length) { + HttpRule.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.type = reader.string(); + message.selector = reader.string(); break; } case 2: { - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); + message.get = reader.string(); break; } case 3: { - message.nameField = reader.string(); + message.put = reader.string(); break; } case 4: { - message.history = reader.int32(); + message.post = reader.string(); break; } case 5: { - message.plural = reader.string(); + message["delete"] = reader.string(); break; } case 6: { - message.singular = reader.string(); + message.patch = reader.string(); break; } - case 10: { - if (!(message.style && message.style.length)) - message.style = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.style.push(reader.int32()); - } else - message.style.push(reader.int32()); + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; } default: @@ -10275,271 +11520,255 @@ }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a HttpRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.HttpRule} HttpRule * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + HttpRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceDescriptor message. + * Verifies a HttpRule message. * @function verify - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResourceDescriptor.verify = function verify(message) { + HttpRule.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) { - if (!Array.isArray(message.pattern)) - return "pattern: array expected"; - for (var i = 0; i < message.pattern.length; ++i) - if (!$util.isString(message.pattern[i])) - return "pattern: string[] expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; } - if (message.nameField != null && message.hasOwnProperty("nameField")) - if (!$util.isString(message.nameField)) - return "nameField: string expected"; - if (message.history != null && message.hasOwnProperty("history")) - switch (message.history) { - default: - return "history: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; - if (message.style != null && message.hasOwnProperty("style")) { - if (!Array.isArray(message.style)) - return "style: array expected"; - for (var i = 0; i < message.style.length; ++i) - switch (message.style[i]) { - default: - return "style: enum value[] expected"; - case 0: - case 1: - break; - } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; } - return null; - }; - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) - return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - default: - if (typeof object.history === "number") { - message.history = object.history; - break; + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; } - break; - case "HISTORY_UNSPECIFIED": - case 0: - message.history = 0; - break; - case "ORIGINALLY_SINGLE_PATTERN": - case 1: - message.history = 1; - break; - case "FUTURE_MULTI_PATTERN": - case 2: - message.history = 2; - break; } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); - if (object.style) { - if (!Array.isArray(object.style)) - throw TypeError(".google.api.ResourceDescriptor.style: array expected"); - message.style = []; - for (var i = 0; i < object.style.length; ++i) - switch (object.style[i]) { - default: - if (typeof object.style[i] === "number") { - message.style[i] = object.style[i]; - break; - } - case "STYLE_UNSPECIFIED": - case 0: - message.style[i] = 0; - break; - case "DECLARATIVE_FRIENDLY": - case 1: - message.style[i] = 1; - break; - } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } } return message; }; /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {google.api.HttpRule} message HttpRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceDescriptor.toObject = function toObject(message, options) { + HttpRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.pattern = []; - object.style = []; - } + if (options.arrays || options.defaults) + object.additionalBindings = []; if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; + object.selector = ""; + object.body = ""; + object.responseBody = ""; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; - if (message.style && message.style.length) { - object.style = []; - for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; return object; }; /** - * Converts this ResourceDescriptor to JSON. + * Converts this HttpRule to JSON. * @function toJSON - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @instance * @returns {Object.} JSON object */ - ResourceDescriptor.prototype.toJSON = function toJSON() { + HttpRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResourceDescriptor + * Gets the default type url for HttpRule * @function getTypeUrl - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.ResourceDescriptor"; + return typeUrlPrefix + "/google.api.HttpRule"; }; - /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {number} - * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value - * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value - * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value - */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; - return values; - })(); - - /** - * Style enum. - * @name google.api.ResourceDescriptor.Style - * @enum {number} - * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value - * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value - */ - ResourceDescriptor.Style = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; - return values; - })(); - - return ResourceDescriptor; + return HttpRule; })(); - api.ResourceReference = (function() { + api.CustomHttpPattern = (function() { /** - * Properties of a ResourceReference. + * Properties of a CustomHttpPattern. * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path */ /** - * Constructs a new ResourceReference. + * Constructs a new CustomHttpPattern. * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set */ - function ResourceReference(properties) { + function CustomHttpPattern(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10547,89 +11776,89 @@ } /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern * @instance */ - ResourceReference.prototype.type = ""; + CustomHttpPattern.prototype.kind = ""; /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern * @instance */ - ResourceReference.prototype.childType = ""; + CustomHttpPattern.prototype.path = ""; /** - * Creates a new ResourceReference instance using the specified properties. + * Creates a new CustomHttpPattern instance using the specified properties. * @function create - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); }; /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encode - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encode = function encode(message, writer) { + CustomHttpPattern.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); return writer; }; /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * Decodes a CustomHttpPattern message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.CustomHttpPattern} CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceReference.decode = function decode(reader, length) { + CustomHttpPattern.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.type = reader.string(); + message.kind = reader.string(); break; } case 2: { - message.childType = reader.string(); + message.path = reader.string(); break; } default: @@ -10641,144 +11870,165 @@ }; /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.CustomHttpPattern} CustomHttpPattern * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceReference message. + * Verifies a CustomHttpPattern message. * @function verify - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResourceReference.verify = function verify(message) { + CustomHttpPattern.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; return null; }; /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.CustomHttpPattern} CustomHttpPattern */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); return message; }; /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.ResourceReference} message ResourceReference + * @param {google.api.CustomHttpPattern} message CustomHttpPattern * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceReference.toObject = function toObject(message, options) { + CustomHttpPattern.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.type = ""; - object.childType = ""; + object.kind = ""; + object.path = ""; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; return object; }; /** - * Converts this ResourceReference to JSON. + * Converts this CustomHttpPattern to JSON. * @function toJSON - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @instance * @returns {Object.} JSON object */ - ResourceReference.prototype.toJSON = function toJSON() { + CustomHttpPattern.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResourceReference + * Gets the default type url for CustomHttpPattern * @function getTypeUrl - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.ResourceReference"; + return typeUrlPrefix + "/google.api.CustomHttpPattern"; }; - return ResourceReference; + return CustomHttpPattern; })(); - return api; - })(); - - google.protobuf = (function() { - /** - * Namespace protobuf. - * @memberof google - * @namespace + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value */ - var protobuf = {}; + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + return values; + })(); - protobuf.FileDescriptorSet = (function() { + api.ResourceDescriptor = (function() { /** - * Properties of a FileDescriptorSet. - * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style */ /** - * Constructs a new FileDescriptorSet. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @param {google.api.IResourceDescriptor=} [properties] Properties to set */ - function FileDescriptorSet(properties) { - this.file = []; + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10786,78 +12036,173 @@ } /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor * @instance */ - FileDescriptorSet.prototype.file = $util.emptyArray; + ResourceDescriptor.prototype.type = ""; /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance */ - FileDescriptorSet.create = function create(properties) { - return new FileDescriptorSet(properties); - }; + ResourceDescriptor.prototype.pattern = $util.emptyArray; /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encode = function encode(message, writer) { + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.file != null && message.file.length) - for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } return writer; }; /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.api.ResourceDescriptor * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. + * Decodes a ResourceDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.api.ResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @returns {google.api.ResourceDescriptor} ResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorSet.decode = function decode(reader, length) { + ResourceDescriptor.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); break; } default: @@ -10869,158 +12214,271 @@ }; /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.api.ResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @returns {google.api.ResourceDescriptor} ResourceDescriptor * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FileDescriptorSet message. + * Verifies a ResourceDescriptor message. * @function verify - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FileDescriptorSet.verify = function verify(message) { + ResourceDescriptor.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) { - if (!Array.isArray(message.file)) - return "file: array expected"; - for (var i = 0; i < message.file.length; ++i) { - var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); - if (error) - return "file." + error; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } } return null; }; /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @returns {google.api.ResourceDescriptor} ResourceDescriptor */ - FileDescriptorSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorSet) + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) return object; - var message = new $root.google.protobuf.FileDescriptorSet(); - if (object.file) { - if (!Array.isArray(object.file)) - throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); - message.file = []; - for (var i = 0; i < object.file.length; ++i) { - if (typeof object.file[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); - message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorSet.toObject = function toObject(message, options) { + ResourceDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.file = []; - if (message.file && message.file.length) { - object.file = []; - for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; } return object; }; /** - * Converts this FileDescriptorSet to JSON. + * Converts this ResourceDescriptor to JSON. * @function toJSON - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.api.ResourceDescriptor * @instance * @returns {Object.} JSON object */ - FileDescriptorSet.prototype.toJSON = function toJSON() { + ResourceDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FileDescriptorSet + * Gets the default type url for ResourceDescriptor * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.api.ResourceDescriptor * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + return typeUrlPrefix + "/google.api.ResourceDescriptor"; }; - return FileDescriptorSet; + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; })(); - protobuf.FileDescriptorProto = (function() { + api.ResourceReference = (function() { /** - * Properties of a FileDescriptorProto. - * @memberof google.protobuf - * @interface IFileDescriptorProto - * @property {string|null} [name] FileDescriptorProto name - * @property {string|null} ["package"] FileDescriptorProto package - * @property {Array.|null} [dependency] FileDescriptorProto dependency - * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency - * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency - * @property {Array.|null} [messageType] FileDescriptorProto messageType - * @property {Array.|null} [enumType] FileDescriptorProto enumType - * @property {Array.|null} [service] FileDescriptorProto service - * @property {Array.|null} [extension] FileDescriptorProto extension - * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options - * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo - * @property {string|null} [syntax] FileDescriptorProto syntax - * @property {string|null} [edition] FileDescriptorProto edition + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType */ /** - * Constructs a new FileDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorProto. - * @implements IFileDescriptorProto + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference * @constructor - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @param {google.api.IResourceReference=} [properties] Properties to set */ - function FileDescriptorProto(properties) { - this.dependency = []; - this.publicDependency = []; - this.weakDependency = []; - this.messageType = []; - this.enumType = []; - this.service = []; - this.extension = []; + function ResourceReference(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11028,274 +12486,317 @@ } /** - * FileDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.name = ""; - - /** - * FileDescriptorProto package. - * @member {string} package - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype["package"] = ""; - - /** - * FileDescriptorProto dependency. - * @member {Array.} dependency - * @memberof google.protobuf.FileDescriptorProto + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference * @instance */ - FileDescriptorProto.prototype.dependency = $util.emptyArray; + ResourceReference.prototype.type = ""; /** - * FileDescriptorProto publicDependency. - * @member {Array.} publicDependency - * @memberof google.protobuf.FileDescriptorProto + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference * @instance */ - FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + ResourceReference.prototype.childType = ""; /** - * FileDescriptorProto weakDependency. - * @member {Array.} weakDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance */ - FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; /** - * FileDescriptorProto messageType. - * @member {Array.} messageType - * @memberof google.protobuf.FileDescriptorProto - * @instance + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - FileDescriptorProto.prototype.messageType = $util.emptyArray; + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; /** - * FileDescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.FileDescriptorProto - * @instance + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - FileDescriptorProto.prototype.enumType = $util.emptyArray; + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * FileDescriptorProto service. - * @member {Array.} service - * @memberof google.protobuf.FileDescriptorProto - * @instance + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorProto.prototype.service = $util.emptyArray; + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * FileDescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.FileDescriptorProto - * @instance + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorProto.prototype.extension = $util.emptyArray; + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options - * @memberof google.protobuf.FileDescriptorProto - * @instance + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FileDescriptorProto.prototype.options = null; + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; /** - * FileDescriptorProto sourceCodeInfo. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo - * @memberof google.protobuf.FileDescriptorProto - * @instance + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference */ - FileDescriptorProto.prototype.sourceCodeInfo = null; + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference * @instance + * @returns {Object.} JSON object */ - FileDescriptorProto.prototype.syntax = ""; + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * FileDescriptorProto edition. - * @member {string} edition - * @memberof google.protobuf.FileDescriptorProto + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + + return ResourceReference; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + 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]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet * @instance */ - FileDescriptorProto.prototype.edition = ""; + FileDescriptorSet.prototype.file = $util.emptyArray; /** - * Creates a new FileDescriptorProto instance using the specified properties. + * Creates a new FileDescriptorSet instance using the specified properties. * @function create - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance */ - FileDescriptorProto.create = function create(properties) { - return new FileDescriptorProto(properties); + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); }; /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. * @function encode - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorProto.encode = function encode(message, writer) { + FileDescriptorSet.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["package"] != null && Object.hasOwnProperty.call(message, "package")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); - if (message.dependency != null && message.dependency.length) - for (var i = 0; i < message.dependency.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); - if (message.messageType != null && message.messageType.length) - for (var i = 0; i < message.messageType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.service != null && message.service.length) - for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) - $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.publicDependency != null && message.publicDependency.length) - for (var i = 0; i < message.publicDependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); - if (message.weakDependency != null && message.weakDependency.length) - for (var i = 0; i < message.weakDependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); - if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.edition); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. + * Decodes a FileDescriptorSet message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.FileDescriptorSet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorProto.decode = function decode(reader, length) { + FileDescriptorSet.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 2: { - message["package"] = reader.string(); - break; - } - case 3: { - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - } - case 10: { - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - } - case 11: { - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - } - case 4: { - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 8: { - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - } - case 12: { - message.syntax = reader.string(); - break; - } - case 13: { - message.edition = reader.string(); + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); break; } default: @@ -11307,352 +12808,158 @@ }; /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.FileDescriptorSet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FileDescriptorProto message. + * Verifies a FileDescriptorSet message. * @function verify - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.FileDescriptorSet * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FileDescriptorProto.verify = function verify(message) { + FileDescriptorSet.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["package"] != null && message.hasOwnProperty("package")) - if (!$util.isString(message["package"])) - return "package: string expected"; - if (message.dependency != null && message.hasOwnProperty("dependency")) { - if (!Array.isArray(message.dependency)) - return "dependency: array expected"; - for (var i = 0; i < message.dependency.length; ++i) - if (!$util.isString(message.dependency[i])) - return "dependency: string[] expected"; - } - if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { - if (!Array.isArray(message.publicDependency)) - return "publicDependency: array expected"; - for (var i = 0; i < message.publicDependency.length; ++i) - if (!$util.isInteger(message.publicDependency[i])) - return "publicDependency: integer[] expected"; - } - if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { - if (!Array.isArray(message.weakDependency)) - return "weakDependency: array expected"; - for (var i = 0; i < message.weakDependency.length; ++i) - if (!$util.isInteger(message.weakDependency[i])) - return "weakDependency: integer[] expected"; - } - if (message.messageType != null && message.hasOwnProperty("messageType")) { - if (!Array.isArray(message.messageType)) - return "messageType: array expected"; - for (var i = 0; i < message.messageType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); - if (error) - return "messageType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.service != null && message.hasOwnProperty("service")) { - if (!Array.isArray(message.service)) - return "service: array expected"; - for (var i = 0; i < message.service.length; ++i) { - var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); - if (error) - return "service." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); if (error) - return "extension." + error; + return "file." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FileOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); - if (error) - return "sourceCodeInfo." + error; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - if (!$util.isString(message.syntax)) - return "syntax: string expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - if (!$util.isString(message.edition)) - return "edition: string expected"; return null; }; /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.FileDescriptorSet * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet */ - FileDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorProto) + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) return object; - var message = new $root.google.protobuf.FileDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object["package"] != null) - message["package"] = String(object["package"]); - if (object.dependency) { - if (!Array.isArray(object.dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); - message.dependency = []; - for (var i = 0; i < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); - } - if (object.publicDependency) { - if (!Array.isArray(object.publicDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); - message.publicDependency = []; - for (var i = 0; i < object.publicDependency.length; ++i) - message.publicDependency[i] = object.publicDependency[i] | 0; - } - if (object.weakDependency) { - if (!Array.isArray(object.weakDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); - message.weakDependency = []; - for (var i = 0; i < object.weakDependency.length; ++i) - message.weakDependency[i] = object.weakDependency[i] | 0; - } - if (object.messageType) { - if (!Array.isArray(object.messageType)) - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); - message.messageType = []; - for (var i = 0; i < object.messageType.length; ++i) { - if (typeof object.messageType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); - message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); } } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); } - if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; - for (var i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); - message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FileOptions.fromObject(object.options); - } - if (object.sourceCodeInfo != null) { - if (typeof object.sourceCodeInfo !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); - } - if (object.syntax != null) - message.syntax = String(object.syntax); - if (object.edition != null) - message.edition = String(object.edition); - return message; - }; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dependency = []; - object.messageType = []; - object.enumType = []; - object.service = []; - object.extension = []; - object.publicDependency = []; - object.weakDependency = []; - } - if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.sourceCodeInfo = null; - object.syntax = ""; - object.edition = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) - object["package"] = message["package"]; - if (message.dependency && message.dependency.length) { - object.dependency = []; - for (var j = 0; j < message.dependency.length; ++j) - object.dependency[j] = message.dependency[j]; - } - if (message.messageType && message.messageType.length) { - object.messageType = []; - for (var j = 0; j < message.messageType.length; ++j) - object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.service && message.service.length) { - object.service = []; - for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) - object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); - if (message.publicDependency && message.publicDependency.length) { - object.publicDependency = []; - for (var j = 0; j < message.publicDependency.length; ++j) - object.publicDependency[j] = message.publicDependency[j]; - } - if (message.weakDependency && message.weakDependency.length) { - object.weakDependency = []; - for (var j = 0; j < message.weakDependency.length; ++j) - object.weakDependency[j] = message.weakDependency[j]; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = message.syntax; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = message.edition; return object; }; /** - * Converts this FileDescriptorProto to JSON. + * Converts this FileDescriptorSet to JSON. * @function toJSON - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.FileDescriptorSet * @instance * @returns {Object.} JSON object */ - FileDescriptorProto.prototype.toJSON = function toJSON() { + FileDescriptorSet.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FileDescriptorProto + * Gets the default type url for FileDescriptorSet * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.FileDescriptorSet * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; }; - return FileDescriptorProto; + return FileDescriptorSet; })(); - protobuf.DescriptorProto = (function() { + protobuf.FileDescriptorProto = (function() { /** - * Properties of a DescriptorProto. + * Properties of a FileDescriptorProto. * @memberof google.protobuf - * @interface IDescriptorProto - * @property {string|null} [name] DescriptorProto name - * @property {Array.|null} [field] DescriptorProto field - * @property {Array.|null} [extension] DescriptorProto extension - * @property {Array.|null} [nestedType] DescriptorProto nestedType - * @property {Array.|null} [enumType] DescriptorProto enumType - * @property {Array.|null} [extensionRange] DescriptorProto extensionRange - * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options - * @property {Array.|null} [reservedRange] DescriptorProto reservedRange - * @property {Array.|null} [reservedName] DescriptorProto reservedName + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {string|null} [edition] FileDescriptorProto edition */ /** - * Constructs a new DescriptorProto. + * Constructs a new FileDescriptorProto. * @memberof google.protobuf - * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set */ - function DescriptorProto(properties) { - this.field = []; - this.extension = []; - this.nestedType = []; + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; this.enumType = []; - this.extensionRange = []; - this.oneofDecl = []; - this.reservedRange = []; - this.reservedName = []; + this.service = []; + this.extension = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11660,168 +12967,197 @@ } /** - * DescriptorProto name. + * FileDescriptorProto name. * @member {string} name - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.FileDescriptorProto * @instance */ - DescriptorProto.prototype.name = ""; + FileDescriptorProto.prototype.name = ""; /** - * DescriptorProto field. - * @member {Array.} field - * @memberof google.protobuf.DescriptorProto + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto * @instance */ - DescriptorProto.prototype.field = $util.emptyArray; + FileDescriptorProto.prototype["package"] = ""; /** - * DescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.DescriptorProto + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto * @instance */ - DescriptorProto.prototype.extension = $util.emptyArray; + FileDescriptorProto.prototype.dependency = $util.emptyArray; /** - * DescriptorProto nestedType. - * @member {Array.} nestedType - * @memberof google.protobuf.DescriptorProto + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto * @instance */ - DescriptorProto.prototype.nestedType = $util.emptyArray; + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; /** - * DescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.DescriptorProto + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto * @instance */ - DescriptorProto.prototype.enumType = $util.emptyArray; + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; /** - * DescriptorProto extensionRange. - * @member {Array.} extensionRange - * @memberof google.protobuf.DescriptorProto + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto * @instance */ - DescriptorProto.prototype.extensionRange = $util.emptyArray; + FileDescriptorProto.prototype.messageType = $util.emptyArray; /** - * DescriptorProto oneofDecl. - * @member {Array.} oneofDecl - * @memberof google.protobuf.DescriptorProto + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto * @instance */ - DescriptorProto.prototype.oneofDecl = $util.emptyArray; + FileDescriptorProto.prototype.enumType = $util.emptyArray; /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto * @instance */ - DescriptorProto.prototype.options = null; + FileDescriptorProto.prototype.service = $util.emptyArray; /** - * DescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.DescriptorProto + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto * @instance */ - DescriptorProto.prototype.reservedRange = $util.emptyArray; + FileDescriptorProto.prototype.extension = $util.emptyArray; /** - * DescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedName = $util.emptyArray; + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; /** - * Creates a new DescriptorProto instance using the specified properties. + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * FileDescriptorProto edition. + * @member {string} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = ""; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. * @function create - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance */ - DescriptorProto.create = function create(properties) { - return new DescriptorProto(properties); + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); }; /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DescriptorProto.encode = function encode(message, writer) { + FileDescriptorProto.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.field != null && message.field.length) - for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nestedType != null && message.nestedType.length) - for (var i = 0; i < message.nestedType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.enumType != null && message.enumType.length) for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.extensionRange != null && message.extensionRange.length) - for (var i = 0; i < message.extensionRange.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.extension != null && message.extension.length) for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.oneofDecl != null && message.oneofDecl.length) - for (var i = 0; i < message.oneofDecl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.edition); return writer; }; /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DescriptorProto message from the specified reader or buffer. + * Decodes a FileDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.FileDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DescriptorProto.decode = function decode(reader, length) { + FileDescriptorProto.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -11830,55 +13166,75 @@ break; } case 2: { - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + message["package"] = reader.string(); break; } - case 6: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); break; } - case 3: { - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); break; } case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { if (!(message.enumType && message.enumType.length)) message.enumType = []; message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); break; } - case 5: { - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); break; } - case 8: { - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); break; } - case 7: { - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); break; } case 9: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); break; } - case 10: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); + case 12: { + message.syntax = reader.string(); + break; + } + case 13: { + message.edition = reader.string(); break; } default: @@ -11890,60 +13246,66 @@ }; /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.FileDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DescriptorProto message. + * Verifies a FileDescriptorProto message. * @function verify - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.FileDescriptorProto * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DescriptorProto.verify = function verify(message) { + FileDescriptorProto.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.field != null && message.hasOwnProperty("field")) { - if (!Array.isArray(message.field)) - return "field: array expected"; - for (var i = 0; i < message.field.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); - if (error) - return "field." + error; - } + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; } - if (message.nestedType != null && message.hasOwnProperty("nestedType")) { - if (!Array.isArray(message.nestedType)) - return "nestedType: array expected"; - for (var i = 0; i < message.nestedType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); if (error) - return "nestedType." + error; + return "messageType." + error; } } if (message.enumType != null && message.hasOwnProperty("enumType")) { @@ -11955,195 +13317,190 @@ return "enumType." + error; } } - if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { - if (!Array.isArray(message.extensionRange)) - return "extensionRange: array expected"; - for (var i = 0; i < message.extensionRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); if (error) - return "extensionRange." + error; + return "service." + error; } } - if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { - if (!Array.isArray(message.oneofDecl)) - return "oneofDecl: array expected"; - for (var i = 0; i < message.oneofDecl.length; ++i) { - var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); if (error) - return "oneofDecl." + error; + return "extension." + error; } } if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); + var error = $root.google.protobuf.FileOptions.verify(message.options); if (error) return "options." + error; } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + if (!$util.isString(message.edition)) + return "edition: string expected"; return null; }; /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.FileDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto */ - DescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto) + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) return object; - var message = new $root.google.protobuf.DescriptorProto(); + var message = new $root.google.protobuf.FileDescriptorProto(); if (object.name != null) message.name = String(object.name); - if (object.field) { - if (!Array.isArray(object.field)) - throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); - message.field = []; - for (var i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); - message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); - } + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; } - if (object.nestedType) { - if (!Array.isArray(object.nestedType)) - throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); - message.nestedType = []; - for (var i = 0; i < object.nestedType.length; ++i) { - if (typeof object.nestedType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); - message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); } } if (object.enumType) { if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); message.enumType = []; for (var i = 0; i < object.enumType.length; ++i) { if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); } } - if (object.extensionRange) { - if (!Array.isArray(object.extensionRange)) - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); - message.extensionRange = []; - for (var i = 0; i < object.extensionRange.length; ++i) { - if (typeof object.extensionRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); - message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); } } - if (object.oneofDecl) { - if (!Array.isArray(object.oneofDecl)) - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); - message.oneofDecl = []; - for (var i = 0; i < object.oneofDecl.length; ++i) { - if (typeof object.oneofDecl[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); - message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); } } if (object.options != null) { if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); - } + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); } + if (object.syntax != null) + message.syntax = String(object.syntax); + if (object.edition != null) + message.edition = String(object.edition); return message; }; /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DescriptorProto.toObject = function toObject(message, options) { + FileDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { - object.field = []; - object.nestedType = []; + object.dependency = []; + object.messageType = []; object.enumType = []; - object.extensionRange = []; + object.service = []; object.extension = []; - object.oneofDecl = []; - object.reservedRange = []; - object.reservedName = []; + object.publicDependency = []; + object.weakDependency = []; } if (options.defaults) { object.name = ""; + object["package"] = ""; object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.field && message.field.length) { - object.field = []; - for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; } - if (message.nestedType && message.nestedType.length) { - object.nestedType = []; - for (var j = 0; j < message.nestedType.length; ++j) - object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); } if (message.enumType && message.enumType.length) { object.enumType = []; for (var j = 0; j < message.enumType.length; ++j) object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); } - if (message.extensionRange && message.extensionRange.length) { - object.extensionRange = []; - for (var j = 0; j < message.extensionRange.length; ++j) - object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); } if (message.extension && message.extension.length) { object.extension = []; @@ -12151,554 +13508,4436 @@ object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); } if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); - if (message.oneofDecl && message.oneofDecl.length) { - object.oneofDecl = []; - for (var j = 0; j < message.oneofDecl.length; ++j) - object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); - } - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = message.edition; return object; }; /** - * Converts this DescriptorProto to JSON. + * Converts this FileDescriptorProto to JSON. * @function toJSON - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.FileDescriptorProto * @instance * @returns {Object.} JSON object */ - DescriptorProto.prototype.toJSON = function toJSON() { + FileDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DescriptorProto + * Gets the default type url for FileDescriptorProto * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.FileDescriptorProto * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; }; - DescriptorProto.ExtensionRange = (function() { + return FileDescriptorProto; + })(); - /** - * Properties of an ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @interface IExtensionRange - * @property {number|null} [start] ExtensionRange start - * @property {number|null} [end] ExtensionRange end - * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options - */ + protobuf.DescriptorProto = (function() { - /** - * Constructs a new ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents an ExtensionRange. - * @implements IExtensionRange - * @constructor - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - */ - function ExtensionRange(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]]; - } + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ - /** - * ExtensionRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.start = 0; + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + 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]]; + } - /** - * ExtensionRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.end = 0; + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; - /** - * ExtensionRange options. - * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.options = null; + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; - /** - * Creates a new ExtensionRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance - */ - ExtensionRange.create = function create(properties) { - return new ExtensionRange(properties); - }; + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; - /** - * Verifies an ExtensionRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - */ - ExtensionRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); - message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - object.options = null; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ExtensionRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - * @returns {Object.} JSON object - */ - ExtensionRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; - }; - - return ExtensionRange; - })(); - - DescriptorProto.ReservedRange = (function() { - - /** - * Properties of a ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @interface IReservedRange - * @property {number|null} [start] ReservedRange start - * @property {number|null} [end] ReservedRange end - */ + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; - /** - * Constructs a new ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents a ReservedRange. - * @implements IReservedRange - * @constructor - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - */ - function ReservedRange(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]]; - } + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; - /** - * ReservedRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.start = 0; + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; - /** - * ReservedRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.end = 0; + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; - /** - * Creates a new ReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance - */ - ReservedRange.create = function create(properties) { - return new ReservedRange(properties); - }; + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.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.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); break; } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReservedRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; + } + return message; + }; - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - */ - ReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.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.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this ReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - * @returns {Object.} JSON object - */ - ReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(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]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(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]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(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]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.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.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.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.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(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]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.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.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.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.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + 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]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.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.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.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.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(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]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(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]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.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.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.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.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + 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]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.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.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.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.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(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]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.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.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.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.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + 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]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions phpGenericServices. + * @member {boolean} phpGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) + writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 42: { + message.phpGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (typeof message.phpGenericServices !== "boolean") + return "phpGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.phpGenericServices != null) + message.phpGenericServices = Boolean(object.phpGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpGenericServices = false; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + object.phpGenericServices = message.phpGenericServices; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for ReservedRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; - }; + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; - return ReservedRange; + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; })(); - return DescriptorProto; + return FileOptions; })(); - protobuf.ExtensionRangeOptions = (function() { + protobuf.MessageOptions = (function() { /** - * Properties of an ExtensionRangeOptions. + * Properties of a MessageOptions. * @memberof google.protobuf - * @interface IExtensionRangeOptions - * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource */ /** - * Constructs a new ExtensionRangeOptions. + * Constructs a new MessageOptions. * @memberof google.protobuf - * @classdesc Represents an ExtensionRangeOptions. - * @implements IExtensionRangeOptions + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions * @constructor - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set */ - function ExtensionRangeOptions(properties) { + function MessageOptions(properties) { this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -12707,80 +17946,150 @@ } /** - * ExtensionRangeOptions uninterpretedOption. + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions uninterpretedOption. * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.MessageOptions * @instance */ - ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * Creates a new ExtensionRangeOptions instance using the specified properties. + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. * @function create - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance */ - ExtensionRangeOptions.create = function create(properties) { - return new ExtensionRangeOptions(properties); + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); }; /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtensionRangeOptions.encode = function encode(message, writer) { + MessageOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); return writer; }; /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * Decodes a MessageOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.MessageOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @returns {google.protobuf.MessageOptions} MessageOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtensionRangeOptions.decode = function decode(reader, length) { + MessageOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -12790,32 +18099,44 @@ }; /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.MessageOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @returns {google.protobuf.MessageOptions} MessageOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + MessageOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExtensionRangeOptions message. + * Verifies a MessageOptions message. * @function verify - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.MessageOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExtensionRangeOptions.verify = function verify(message) { + MessageOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -12825,114 +18146,150 @@ return "uninterpretedOption." + error; } } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } return null; }; /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.MessageOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @returns {google.protobuf.MessageOptions} MessageOptions */ - ExtensionRangeOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) return object; - var message = new $root.google.protobuf.ExtensionRangeOptions(); + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } return message; }; /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {google.protobuf.MessageOptions} message MessageOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExtensionRangeOptions.toObject = function toObject(message, options) { + MessageOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); return object; }; /** - * Converts this ExtensionRangeOptions to JSON. + * Converts this MessageOptions to JSON. * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.MessageOptions * @instance * @returns {Object.} JSON object */ - ExtensionRangeOptions.prototype.toJSON = function toJSON() { + MessageOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExtensionRangeOptions + * Gets the default type url for MessageOptions * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.MessageOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + return typeUrlPrefix + "/google.protobuf.MessageOptions"; }; - return ExtensionRangeOptions; + return MessageOptions; })(); - protobuf.FieldDescriptorProto = (function() { + protobuf.FieldOptions = (function() { /** - * Properties of a FieldDescriptorProto. + * Properties of a FieldOptions. * @memberof google.protobuf - * @interface IFieldDescriptorProto - * @property {string|null} [name] FieldDescriptorProto name - * @property {number|null} [number] FieldDescriptorProto number - * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label - * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type - * @property {string|null} [typeName] FieldDescriptorProto typeName - * @property {string|null} [extendee] FieldDescriptorProto extendee - * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue - * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex - * @property {string|null} [jsonName] FieldDescriptorProto jsonName - * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options - * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference */ /** - * Constructs a new FieldDescriptorProto. + * Constructs a new FieldOptions. * @memberof google.protobuf - * @classdesc Represents a FieldDescriptorProto. - * @implements IFieldDescriptorProto + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions * @constructor - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set */ - function FieldDescriptorProto(properties) { + function FieldOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12940,215 +18297,215 @@ } /** - * FieldDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.name = ""; - - /** - * FieldDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.FieldDescriptorProto + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions * @instance */ - FieldDescriptorProto.prototype.number = 0; + FieldOptions.prototype.ctype = 0; /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions * @instance */ - FieldDescriptorProto.prototype.label = 1; + FieldOptions.prototype.packed = false; /** - * FieldDescriptorProto type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions * @instance */ - FieldDescriptorProto.prototype.type = 1; + FieldOptions.prototype.jstype = 0; /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions * @instance */ - FieldDescriptorProto.prototype.typeName = ""; + FieldOptions.prototype.lazy = false; /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions * @instance */ - FieldDescriptorProto.prototype.extendee = ""; + FieldOptions.prototype.unverifiedLazy = false; /** - * FieldDescriptorProto defaultValue. - * @member {string} defaultValue - * @memberof google.protobuf.FieldDescriptorProto + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions * @instance */ - FieldDescriptorProto.prototype.defaultValue = ""; + FieldOptions.prototype.deprecated = false; /** - * FieldDescriptorProto oneofIndex. - * @member {number} oneofIndex - * @memberof google.protobuf.FieldDescriptorProto + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions * @instance */ - FieldDescriptorProto.prototype.oneofIndex = 0; + FieldOptions.prototype.weak = false; /** - * FieldDescriptorProto jsonName. - * @member {string} jsonName - * @memberof google.protobuf.FieldDescriptorProto + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions * @instance */ - FieldDescriptorProto.prototype.jsonName = ""; + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions * @instance */ - FieldDescriptorProto.prototype.options = null; + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; /** - * FieldDescriptorProto proto3Optional. - * @member {boolean} proto3Optional - * @memberof google.protobuf.FieldDescriptorProto + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions * @instance */ - FieldDescriptorProto.prototype.proto3Optional = false; + FieldOptions.prototype[".google.api.resourceReference"] = null; /** - * Creates a new FieldDescriptorProto instance using the specified properties. + * Creates a new FieldOptions instance using the specified properties. * @function create - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance */ - FieldDescriptorProto.create = function create(properties) { - return new FieldDescriptorProto(properties); + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); }; /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldDescriptorProto.encode = function encode(message, writer) { + FieldOptions.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.extendee != null && Object.hasOwnProperty.call(message, "extendee")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); - if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); - if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { + writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.int32(message[".google.api.fieldBehavior"][i]); + writer.ldelim(); + } + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); return writer; }; /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * Decodes a FieldOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.FieldOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @returns {google.protobuf.FieldOptions} FieldOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldDescriptorProto.decode = function decode(reader, length) { + FieldOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 3: { - message.number = reader.int32(); - break; - } - case 4: { - message.label = reader.int32(); + message.ctype = reader.int32(); break; - } - case 5: { - message.type = reader.int32(); + } + case 2: { + message.packed = reader.bool(); break; } case 6: { - message.typeName = reader.string(); + message.jstype = reader.int32(); break; } - case 2: { - message.extendee = reader.string(); + case 5: { + message.lazy = reader.bool(); break; } - case 7: { - message.defaultValue = reader.string(); + case 15: { + message.unverifiedLazy = reader.bool(); break; } - case 9: { - message.oneofIndex = reader.int32(); + case 3: { + message.deprecated = reader.bool(); break; } case 10: { - message.jsonName = reader.string(); + message.weak = reader.bool(); break; } - case 8: { - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } - case 17: { - message.proto3Optional = reader.bool(); + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); break; } default: @@ -13160,394 +18517,361 @@ }; /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.FieldOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @returns {google.protobuf.FieldOptions} FieldOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + FieldOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FieldDescriptorProto message. + * Verifies a FieldOptions message. * @function verify - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.FieldOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FieldDescriptorProto.verify = function verify(message) { + FieldOptions.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.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) - switch (message.label) { + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { default: - return "label: enum value expected"; + return "ctype: enum value expected"; + case 0: case 1: case 2: - case 3: break; } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { default: - return "type: enum value expected"; + return "jstype: enum value expected"; + case 0: case 1: case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: break; } - if (message.typeName != null && message.hasOwnProperty("typeName")) - if (!$util.isString(message.typeName)) - return "typeName: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) - if (!$util.isString(message.extendee)) - return "extendee: string expected"; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - if (!$util.isString(message.defaultValue)) - return "defaultValue: string expected"; - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - if (!$util.isInteger(message.oneofIndex)) - return "oneofIndex: integer expected"; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - if (!$util.isString(message.jsonName)) - return "jsonName: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); if (error) - return "options." + error; + return ".google.api.resourceReference." + error; } - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - if (typeof message.proto3Optional !== "boolean") - return "proto3Optional: boolean expected"; return null; }; /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.FieldOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @returns {google.protobuf.FieldOptions} FieldOptions */ - FieldDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) return object; - var message = new $root.google.protobuf.FieldDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - switch (object.label) { + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { default: - if (typeof object.label === "number") { - message.label = object.label; + if (typeof object.ctype === "number") { + message.ctype = object.ctype; break; } break; - case "LABEL_OPTIONAL": - case 1: - message.label = 1; - break; - case "LABEL_REQUIRED": - case 2: - message.label = 2; - break; - case "LABEL_REPEATED": - case 3: - message.label = 3; - break; - } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } + case "STRING": + case 0: + message.ctype = 0; break; - case "TYPE_DOUBLE": + case "CORD": case 1: - message.type = 1; - break; - case "TYPE_FLOAT": - case 2: - message.type = 2; - break; - case "TYPE_INT64": - case 3: - message.type = 3; - break; - case "TYPE_UINT64": - case 4: - message.type = 4; - break; - case "TYPE_INT32": - case 5: - message.type = 5; - break; - case "TYPE_FIXED64": - case 6: - message.type = 6; - break; - case "TYPE_FIXED32": - case 7: - message.type = 7; - break; - case "TYPE_BOOL": - case 8: - message.type = 8; - break; - case "TYPE_STRING": - case 9: - message.type = 9; - break; - case "TYPE_GROUP": - case 10: - message.type = 10; - break; - case "TYPE_MESSAGE": - case 11: - message.type = 11; - break; - case "TYPE_BYTES": - case 12: - message.type = 12; - break; - case "TYPE_UINT32": - case 13: - message.type = 13; - break; - case "TYPE_ENUM": - case 14: - message.type = 14; + message.ctype = 1; break; - case "TYPE_SFIXED32": - case 15: - message.type = 15; + case "STRING_PIECE": + case 2: + message.ctype = 2; break; - case "TYPE_SFIXED64": - case 16: - message.type = 16; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } break; - case "TYPE_SINT32": - case 17: - message.type = 17; + case "JS_NORMAL": + case 0: + message.jstype = 0; break; - case "TYPE_SINT64": - case 18: - message.type = 18; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; break; } - if (object.typeName != null) - message.typeName = String(object.typeName); - if (object.extendee != null) - message.extendee = String(object.extendee); - if (object.defaultValue != null) - message.defaultValue = String(object.defaultValue); - if (object.oneofIndex != null) - message.oneofIndex = object.oneofIndex | 0; - if (object.jsonName != null) - message.jsonName = String(object.jsonName); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); } - if (object.proto3Optional != null) - message.proto3Optional = Boolean(object.proto3Optional); return message; }; /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {google.protobuf.FieldOptions} message FieldOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldDescriptorProto.toObject = function toObject(message, options) { + FieldOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } if (options.defaults) { - object.name = ""; - object.extendee = ""; - object.number = 0; - object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; - object.type = options.enums === String ? "TYPE_DOUBLE" : 1; - object.typeName = ""; - object.defaultValue = ""; - object.options = null; - object.oneofIndex = 0; - object.jsonName = ""; - object.proto3Optional = false; + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object.unverifiedLazy = false; + object[".google.api.resourceReference"] = null; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) - object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.typeName != null && message.hasOwnProperty("typeName")) - object.typeName = message.typeName; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = message.defaultValue; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - object.oneofIndex = message.oneofIndex; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - object.jsonName = message.jsonName; - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - object.proto3Optional = message.proto3Optional; + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); return object; }; /** - * Converts this FieldDescriptorProto to JSON. + * Converts this FieldOptions to JSON. * @function toJSON - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.FieldOptions * @instance * @returns {Object.} JSON object */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { + FieldOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FieldDescriptorProto + * Gets the default type url for FieldOptions * @function getTypeUrl - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.FieldOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + return typeUrlPrefix + "/google.protobuf.FieldOptions"; }; /** - * Type enum. - * @name google.protobuf.FieldDescriptorProto.Type + * CType enum. + * @name google.protobuf.FieldOptions.CType * @enum {number} - * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value - * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value - * @property {number} TYPE_INT64=3 TYPE_INT64 value - * @property {number} TYPE_UINT64=4 TYPE_UINT64 value - * @property {number} TYPE_INT32=5 TYPE_INT32 value - * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value - * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value - * @property {number} TYPE_BOOL=8 TYPE_BOOL value - * @property {number} TYPE_STRING=9 TYPE_STRING value - * @property {number} TYPE_GROUP=10 TYPE_GROUP value - * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value - * @property {number} TYPE_BYTES=12 TYPE_BYTES value - * @property {number} TYPE_UINT32=13 TYPE_UINT32 value - * @property {number} TYPE_ENUM=14 TYPE_ENUM value - * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value - * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value - * @property {number} TYPE_SINT32=17 TYPE_SINT32 value - * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value */ - FieldDescriptorProto.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "TYPE_DOUBLE"] = 1; - values[valuesById[2] = "TYPE_FLOAT"] = 2; - values[valuesById[3] = "TYPE_INT64"] = 3; - values[valuesById[4] = "TYPE_UINT64"] = 4; - values[valuesById[5] = "TYPE_INT32"] = 5; - values[valuesById[6] = "TYPE_FIXED64"] = 6; - values[valuesById[7] = "TYPE_FIXED32"] = 7; - values[valuesById[8] = "TYPE_BOOL"] = 8; - values[valuesById[9] = "TYPE_STRING"] = 9; - values[valuesById[10] = "TYPE_GROUP"] = 10; - values[valuesById[11] = "TYPE_MESSAGE"] = 11; - values[valuesById[12] = "TYPE_BYTES"] = 12; - values[valuesById[13] = "TYPE_UINT32"] = 13; - values[valuesById[14] = "TYPE_ENUM"] = 14; - values[valuesById[15] = "TYPE_SFIXED32"] = 15; - values[valuesById[16] = "TYPE_SFIXED64"] = 16; - values[valuesById[17] = "TYPE_SINT32"] = 17; - values[valuesById[18] = "TYPE_SINT64"] = 18; + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; return values; })(); /** - * Label enum. - * @name google.protobuf.FieldDescriptorProto.Label + * JSType enum. + * @name google.protobuf.FieldOptions.JSType * @enum {number} - * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value - * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value - * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value */ - FieldDescriptorProto.Label = (function() { + FieldOptions.JSType = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "LABEL_OPTIONAL"] = 1; - values[valuesById[2] = "LABEL_REQUIRED"] = 2; - values[valuesById[3] = "LABEL_REPEATED"] = 3; + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; return values; })(); - return FieldDescriptorProto; + return FieldOptions; })(); - protobuf.OneofDescriptorProto = (function() { + protobuf.OneofOptions = (function() { /** - * Properties of an OneofDescriptorProto. + * Properties of an OneofOptions. * @memberof google.protobuf - * @interface IOneofDescriptorProto - * @property {string|null} [name] OneofDescriptorProto name - * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + * @interface IOneofOptions + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption */ /** - * Constructs a new OneofDescriptorProto. + * Constructs a new OneofOptions. * @memberof google.protobuf - * @classdesc Represents an OneofDescriptorProto. - * @implements IOneofDescriptorProto + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions * @constructor - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set */ - function OneofDescriptorProto(properties) { + function OneofOptions(properties) { + this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13555,89 +18879,78 @@ } /** - * OneofDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.name = ""; - - /** - * OneofDescriptorProto options. - * @member {google.protobuf.IOneofOptions|null|undefined} options - * @memberof google.protobuf.OneofDescriptorProto + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions * @instance */ - OneofDescriptorProto.prototype.options = null; + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * Creates a new OneofDescriptorProto instance using the specified properties. + * Creates a new OneofOptions instance using the specified properties. * @function create - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.OneofOptions * @static - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance */ - OneofDescriptorProto.create = function create(properties) { - return new OneofDescriptorProto(properties); + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); }; /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.OneofOptions * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OneofDescriptorProto.encode = function encode(message, writer) { + OneofOptions.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.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); return writer; }; /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.OneofOptions * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * Decodes an OneofOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.OneofOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @returns {google.protobuf.OneofOptions} OneofOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OneofDescriptorProto.decode = function decode(reader, length) { + OneofOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } default: @@ -13649,143 +18962,142 @@ }; /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.OneofOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @returns {google.protobuf.OneofOptions} OneofOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + OneofOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OneofDescriptorProto message. + * Verifies an OneofOptions message. * @function verify - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.OneofOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OneofDescriptorProto.verify = function verify(message) { + OneofOptions.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.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.OneofOptions.verify(message.options); - if (error) - return "options." + error; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } } return null; }; /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.OneofOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @returns {google.protobuf.OneofOptions} OneofOptions */ - OneofDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofDescriptorProto) + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) return object; - var message = new $root.google.protobuf.OneofDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + var message = new $root.google.protobuf.OneofOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } } return message; }; /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.OneofOptions * @static - * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {google.protobuf.OneofOptions} message OneofOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OneofDescriptorProto.toObject = function toObject(message, options) { + OneofOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.options = null; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); return object; }; /** - * Converts this OneofDescriptorProto to JSON. + * Converts this OneofOptions to JSON. * @function toJSON - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.OneofOptions * @instance * @returns {Object.} JSON object */ - OneofDescriptorProto.prototype.toJSON = function toJSON() { + OneofOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OneofDescriptorProto + * Gets the default type url for OneofOptions * @function getTypeUrl - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.OneofOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + return typeUrlPrefix + "/google.protobuf.OneofOptions"; }; - return OneofDescriptorProto; + return OneofOptions; })(); - protobuf.EnumDescriptorProto = (function() { + protobuf.EnumOptions = (function() { /** - * Properties of an EnumDescriptorProto. + * Properties of an EnumOptions. * @memberof google.protobuf - * @interface IEnumDescriptorProto - * @property {string|null} [name] EnumDescriptorProto name - * @property {Array.|null} [value] EnumDescriptorProto value - * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options - * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange - * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption */ /** - * Constructs a new EnumDescriptorProto. + * Constructs a new EnumOptions. * @memberof google.protobuf - * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set */ - function EnumDescriptorProto(properties) { - this.value = []; - this.reservedRange = []; - this.reservedName = []; + function EnumOptions(properties) { + this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13793,140 +19105,106 @@ } /** - * EnumDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.name = ""; - - /** - * EnumDescriptorProto value. - * @member {Array.} value - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.value = $util.emptyArray; - - /** - * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options - * @memberof google.protobuf.EnumDescriptorProto + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions * @instance */ - EnumDescriptorProto.prototype.options = null; + EnumOptions.prototype.allowAlias = false; /** - * EnumDescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.EnumDescriptorProto + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions * @instance */ - EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + EnumOptions.prototype.deprecated = false; /** - * EnumDescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.EnumDescriptorProto + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions * @instance */ - EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * Creates a new EnumDescriptorProto instance using the specified properties. + * Creates a new EnumOptions instance using the specified properties. * @function create - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance */ - EnumDescriptorProto.create = function create(properties) { - return new EnumDescriptorProto(properties); + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); }; /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumDescriptorProto.encode = function encode(message, writer) { + EnumOptions.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.value != null && message.value.length) - for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); return writer; }; /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * Decodes an EnumOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.EnumOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @returns {google.protobuf.EnumOptions} EnumOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumDescriptorProto.decode = function decode(reader, length) { + EnumOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } case 2: { - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + message.allowAlias = reader.bool(); break; } case 3: { - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + message.deprecated = reader.bool(); break; } - case 5: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } default: @@ -13938,437 +19216,159 @@ }; /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.EnumOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @returns {google.protobuf.EnumOptions} EnumOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + EnumOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EnumDescriptorProto message. + * Verifies an EnumOptions message. * @function verify - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.EnumOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumDescriptorProto.verify = function verify(message) { + EnumOptions.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.value != null && message.hasOwnProperty("value")) { - if (!Array.isArray(message.value)) - return "value: array expected"; - for (var i = 0; i < message.value.length; ++i) { - var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); - if (error) - return "value." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); if (error) - return "reservedRange." + error; + return "uninterpretedOption." + error; } } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } return null; }; /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.EnumOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @returns {google.protobuf.EnumOptions} EnumOptions */ - EnumDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto) + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) return object; - var message = new $root.google.protobuf.EnumDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.value) { - if (!Array.isArray(object.value)) - throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); - message.value = []; - for (var i = 0; i < object.value.length; ++i) { - if (typeof object.value[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); - message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } return message; }; /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {google.protobuf.EnumOptions} message EnumOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumDescriptorProto.toObject = function toObject(message, options) { + EnumOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.value = []; - object.reservedRange = []; - object.reservedName = []; - } + if (options.arrays || options.defaults) + object.uninterpretedOption = []; if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.value && message.value.length) { - object.value = []; - for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + object.allowAlias = false; + object.deprecated = false; } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } return object; }; /** - * Converts this EnumDescriptorProto to JSON. + * Converts this EnumOptions to JSON. * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.EnumOptions * @instance * @returns {Object.} JSON object */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { + EnumOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EnumDescriptorProto + * Gets the default type url for EnumOptions * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.EnumOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + return typeUrlPrefix + "/google.protobuf.EnumOptions"; }; - EnumDescriptorProto.EnumReservedRange = (function() { - - /** - * Properties of an EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @interface IEnumReservedRange - * @property {number|null} [start] EnumReservedRange start - * @property {number|null} [end] EnumReservedRange end - */ - - /** - * Constructs a new EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @classdesc Represents an EnumReservedRange. - * @implements IEnumReservedRange - * @constructor - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - */ - function EnumReservedRange(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]]; - } - - /** - * EnumReservedRange start. - * @member {number} start - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.start = 0; - - /** - * EnumReservedRange end. - * @member {number} end - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.end = 0; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance - */ - EnumReservedRange.create = function create(properties) { - return new EnumReservedRange(properties); - }; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumReservedRange message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - */ - EnumReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this EnumReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - * @returns {Object.} JSON object - */ - EnumReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumReservedRange - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; - }; - - return EnumReservedRange; - })(); - - return EnumDescriptorProto; + return EnumOptions; })(); - protobuf.EnumValueDescriptorProto = (function() { + protobuf.EnumValueOptions = (function() { /** - * Properties of an EnumValueDescriptorProto. + * Properties of an EnumValueOptions. * @memberof google.protobuf - * @interface IEnumValueDescriptorProto - * @property {string|null} [name] EnumValueDescriptorProto name - * @property {number|null} [number] EnumValueDescriptorProto number - * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption */ /** - * Constructs a new EnumValueDescriptorProto. + * Constructs a new EnumValueOptions. * @memberof google.protobuf - * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set */ - function EnumValueDescriptorProto(properties) { + function EnumValueOptions(properties) { + this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14376,103 +19376,92 @@ } /** - * EnumValueDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.name = ""; - - /** - * EnumValueDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.EnumValueDescriptorProto + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions * @instance */ - EnumValueDescriptorProto.prototype.number = 0; + EnumValueOptions.prototype.deprecated = false; /** - * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options - * @memberof google.protobuf.EnumValueDescriptorProto + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions * @instance */ - EnumValueDescriptorProto.prototype.options = null; + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. + * Creates a new EnumValueOptions instance using the specified properties. * @function create - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance */ - EnumValueDescriptorProto.create = function create(properties) { - return new EnumValueDescriptorProto(properties); + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); }; /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueDescriptorProto.encode = function encode(message, writer) { + EnumValueOptions.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.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); return writer; }; /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * Decodes an EnumValueOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.EnumValueOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueDescriptorProto.decode = function decode(reader, length) { + EnumValueOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.number = reader.int32(); + message.deprecated = reader.bool(); break; } - case 3: { - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } default: @@ -14484,147 +19473,152 @@ }; /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.EnumValueOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EnumValueDescriptorProto message. + * Verifies an EnumValueOptions message. * @function verify - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.EnumValueOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumValueDescriptorProto.verify = function verify(message) { + EnumValueOptions.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.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumValueOptions.verify(message.options); - if (error) - return "options." + error; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } } return null; }; /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.EnumValueOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions */ - EnumValueDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) return object; - var message = new $root.google.protobuf.EnumValueDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } } return message; }; /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { + EnumValueOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.number = 0; - object.options = null; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.deprecated = false; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); return object; }; /** - * Converts this EnumValueDescriptorProto to JSON. + * Converts this EnumValueOptions to JSON. * @function toJSON - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.EnumValueOptions * @instance * @returns {Object.} JSON object */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + EnumValueOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EnumValueDescriptorProto + * Gets the default type url for EnumValueOptions * @function getTypeUrl - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.EnumValueOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; }; - return EnumValueDescriptorProto; + return EnumValueOptions; })(); - protobuf.ServiceDescriptorProto = (function() { + protobuf.ServiceOptions = (function() { /** - * Properties of a ServiceDescriptorProto. + * Properties of a ServiceOptions. * @memberof google.protobuf - * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + * @interface IServiceOptions + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes */ /** - * Constructs a new ServiceDescriptorProto. + * Constructs a new ServiceOptions. * @memberof google.protobuf - * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set */ - function ServiceDescriptorProto(properties) { - this.method = []; + function ServiceOptions(properties) { + this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14632,106 +19626,120 @@ } /** - * ServiceDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.ServiceDescriptorProto + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions * @instance */ - ServiceDescriptorProto.prototype.name = ""; + ServiceOptions.prototype.deprecated = false; /** - * ServiceDescriptorProto method. - * @member {Array.} method - * @memberof google.protobuf.ServiceDescriptorProto + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions * @instance */ - ServiceDescriptorProto.prototype.method = $util.emptyArray; + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; /** - * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options - * @memberof google.protobuf.ServiceDescriptorProto + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions * @instance */ - ServiceDescriptorProto.prototype.options = null; + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; /** - * Creates a new ServiceDescriptorProto instance using the specified properties. + * Creates a new ServiceOptions instance using the specified properties. * @function create - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance */ - ServiceDescriptorProto.create = function create(properties) { - return new ServiceDescriptorProto(properties); + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); }; /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceDescriptorProto.encode = function encode(message, writer) { + ServiceOptions.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.method != null && message.method.length) - for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); return writer; }; /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * Decodes a ServiceOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.ServiceOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @returns {google.protobuf.ServiceOptions} ServiceOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceDescriptorProto.decode = function decode(reader, length) { + ServiceOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.name = reader.string(); + case 33: { + message.deprecated = reader.bool(); break; } - case 2: { - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } - case 3: { - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); break; } default: @@ -14743,167 +19751,172 @@ }; /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.ServiceOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @returns {google.protobuf.ServiceOptions} ServiceOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ServiceDescriptorProto message. + * Verifies a ServiceOptions message. * @function verify - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.ServiceOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ServiceDescriptorProto.verify = function verify(message) { + ServiceOptions.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.method != null && message.hasOwnProperty("method")) { - if (!Array.isArray(message.method)) - return "method: array expected"; - for (var i = 0; i < message.method.length; ++i) { - var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); if (error) - return "method." + error; + return "uninterpretedOption." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ServiceOptions.verify(message.options); - if (error) - return "options." + error; - } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; return null; }; /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.ServiceOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @returns {google.protobuf.ServiceOptions} ServiceOptions */ - ServiceDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) return object; - var message = new $root.google.protobuf.ServiceDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.method) { - if (!Array.isArray(object.method)) - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); - message.method = []; - for (var i = 0; i < object.method.length; ++i) { - if (typeof object.method[i] !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); - message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + var message = new $root.google.protobuf.ServiceOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); - } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); return message; }; /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {google.protobuf.ServiceOptions} message ServiceOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceDescriptorProto.toObject = function toObject(message, options) { + ServiceOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.method = []; + object.uninterpretedOption = []; if (options.defaults) { - object.name = ""; - object.options = null; + object.deprecated = false; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.method && message.method.length) { - object.method = []; - for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; return object; }; /** - * Converts this ServiceDescriptorProto to JSON. + * Converts this ServiceOptions to JSON. * @function toJSON - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.ServiceOptions * @instance * @returns {Object.} JSON object */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { + ServiceOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ServiceDescriptorProto + * Gets the default type url for ServiceOptions * @function getTypeUrl - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.ServiceOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; }; - return ServiceDescriptorProto; + return ServiceOptions; })(); - protobuf.MethodDescriptorProto = (function() { + protobuf.MethodOptions = (function() { /** - * Properties of a MethodDescriptorProto. + * Properties of a MethodOptions. * @memberof google.protobuf - * @interface IMethodDescriptorProto - * @property {string|null} [name] MethodDescriptorProto name - * @property {string|null} [inputType] MethodDescriptorProto inputType - * @property {string|null} [outputType] MethodDescriptorProto outputType - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming - * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo */ /** - * Constructs a new MethodDescriptorProto. + * Constructs a new MethodOptions. * @memberof google.protobuf - * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set */ - function MethodDescriptorProto(properties) { + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14911,145 +19924,151 @@ } /** - * MethodDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions * @instance */ - MethodDescriptorProto.prototype.name = ""; + MethodOptions.prototype.deprecated = false; /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions * @instance */ - MethodDescriptorProto.prototype.inputType = ""; + MethodOptions.prototype.idempotencyLevel = 0; /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions * @instance */ - MethodDescriptorProto.prototype.outputType = ""; + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions * @instance */ - MethodDescriptorProto.prototype.options = null; + MethodOptions.prototype[".google.api.http"] = null; /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions * @instance */ - MethodDescriptorProto.prototype.clientStreaming = false; + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto + * MethodOptions .google.longrunning.operationInfo. + * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo + * @memberof google.protobuf.MethodOptions * @instance */ - MethodDescriptorProto.prototype.serverStreaming = false; + MethodOptions.prototype[".google.longrunning.operationInfo"] = null; /** - * Creates a new MethodDescriptorProto instance using the specified properties. + * Creates a new MethodOptions instance using the specified properties. * @function create - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance */ - MethodDescriptorProto.create = function create(properties) { - return new MethodDescriptorProto(properties); + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); }; /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodDescriptorProto.encode = function encode(message, writer) { + MethodOptions.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.inputType != null && Object.hasOwnProperty.call(message, "inputType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); - if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); - if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) + $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); return writer; }; /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * Decodes a MethodOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.MethodOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @returns {google.protobuf.MethodOptions} MethodOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodDescriptorProto.decode = function decode(reader, length) { + MethodOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.name = reader.string(); + case 33: { + message.deprecated = reader.bool(); break; } - case 2: { - message.inputType = reader.string(); + case 34: { + message.idempotencyLevel = reader.int32(); break; } - case 3: { - message.outputType = reader.string(); + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } - case 4: { - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); break; } - case 5: { - message.clientStreaming = reader.bool(); + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); break; } - case 6: { - message.serverStreaming = reader.bool(); + case 1049: { + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); break; } default: @@ -15061,191 +20080,251 @@ }; /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.MethodOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @returns {google.protobuf.MethodOptions} MethodOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + MethodOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MethodDescriptorProto message. + * Verifies a MethodOptions message. * @function verify - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.MethodOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MethodDescriptorProto.verify = function verify(message) { + MethodOptions.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.inputType != null && message.hasOwnProperty("inputType")) - if (!$util.isString(message.inputType)) - return "inputType: string expected"; - if (message.outputType != null && message.hasOwnProperty("outputType")) - if (!$util.isString(message.outputType)) - return "outputType: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); if (error) - return "options." + error; + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { + var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); + if (error) + return ".google.longrunning.operationInfo." + error; } - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - if (typeof message.clientStreaming !== "boolean") - return "clientStreaming: boolean expected"; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - if (typeof message.serverStreaming !== "boolean") - return "serverStreaming: boolean expected"; return null; }; /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.MethodOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @returns {google.protobuf.MethodOptions} MethodOptions */ - MethodDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodDescriptorProto) + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) return object; - var message = new $root.google.protobuf.MethodDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.inputType != null) - message.inputType = String(object.inputType); - if (object.outputType != null) - message.outputType = String(object.outputType); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + if (object[".google.longrunning.operationInfo"] != null) { + if (typeof object[".google.longrunning.operationInfo"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); } - if (object.clientStreaming != null) - message.clientStreaming = Boolean(object.clientStreaming); - if (object.serverStreaming != null) - message.serverStreaming = Boolean(object.serverStreaming); return message; }; /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {google.protobuf.MethodOptions} message MethodOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodDescriptorProto.toObject = function toObject(message, options) { + MethodOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } if (options.defaults) { - object.name = ""; - object.inputType = ""; - object.outputType = ""; - object.options = null; - object.clientStreaming = false; - object.serverStreaming = false; + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.longrunning.operationInfo"] = null; + object[".google.api.http"] = null; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.inputType != null && message.hasOwnProperty("inputType")) - object.inputType = message.inputType; - if (message.outputType != null && message.hasOwnProperty("outputType")) - object.outputType = message.outputType; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - object.clientStreaming = message.clientStreaming; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - object.serverStreaming = message.serverStreaming; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) + object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); return object; }; /** - * Converts this MethodDescriptorProto to JSON. + * Converts this MethodOptions to JSON. * @function toJSON - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.MethodOptions * @instance * @returns {Object.} JSON object */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { + MethodOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MethodDescriptorProto + * Gets the default type url for MethodOptions * @function getTypeUrl - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.MethodOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + return typeUrlPrefix + "/google.protobuf.MethodOptions"; }; - return MethodDescriptorProto; + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; })(); - protobuf.FileOptions = (function() { + protobuf.UninterpretedOption = (function() { /** - * Properties of a FileOptions. + * Properties of an UninterpretedOption. * @memberof google.protobuf - * @interface IFileOptions - * @property {string|null} [javaPackage] FileOptions javaPackage - * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname - * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles - * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash - * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor - * @property {string|null} [goPackage] FileOptions goPackage - * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices - * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices - * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices - * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices - * @property {boolean|null} [deprecated] FileOptions deprecated - * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas - * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix - * @property {string|null} [csharpNamespace] FileOptions csharpNamespace - * @property {string|null} [swiftPrefix] FileOptions swiftPrefix - * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix - * @property {string|null} [phpNamespace] FileOptions phpNamespace - * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace - * @property {string|null} [rubyPackage] FileOptions rubyPackage - * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption - * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue */ /** - * Constructs a new FileOptions. + * Constructs a new UninterpretedOption. * @memberof google.protobuf - * @classdesc Represents a FileOptions. - * @implements IFileOptions + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption * @constructor - * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set */ - function FileOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.resourceDefinition"] = []; + function UninterpretedOption(properties) { + this.name = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15253,375 +20332,162 @@ } /** - * FileOptions javaPackage. - * @member {string} javaPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaPackage = ""; - - /** - * FileOptions javaOuterClassname. - * @member {string} javaOuterClassname - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaOuterClassname = ""; - - /** - * FileOptions javaMultipleFiles. - * @member {boolean} javaMultipleFiles - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaMultipleFiles = false; - - /** - * FileOptions javaGenerateEqualsAndHash. - * @member {boolean} javaGenerateEqualsAndHash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenerateEqualsAndHash = false; - - /** - * FileOptions javaStringCheckUtf8. - * @member {boolean} javaStringCheckUtf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaStringCheckUtf8 = false; - - /** - * FileOptions optimizeFor. - * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimizeFor = 1; - - /** - * FileOptions goPackage. - * @member {string} goPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.goPackage = ""; - - /** - * FileOptions ccGenericServices. - * @member {boolean} ccGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccGenericServices = false; - - /** - * FileOptions javaGenericServices. - * @member {boolean} javaGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenericServices = false; - - /** - * FileOptions pyGenericServices. - * @member {boolean} pyGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.pyGenericServices = false; - - /** - * FileOptions phpGenericServices. - * @member {boolean} phpGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpGenericServices = false; - - /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; - - /** - * FileOptions ccEnableArenas. - * @member {boolean} ccEnableArenas - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccEnableArenas = true; - - /** - * FileOptions objcClassPrefix. - * @member {string} objcClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objcClassPrefix = ""; - - /** - * FileOptions csharpNamespace. - * @member {string} csharpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharpNamespace = ""; - - /** - * FileOptions swiftPrefix. - * @member {string} swiftPrefix - * @memberof google.protobuf.FileOptions + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption * @instance */ - FileOptions.prototype.swiftPrefix = ""; + UninterpretedOption.prototype.name = $util.emptyArray; /** - * FileOptions phpClassPrefix. - * @member {string} phpClassPrefix - * @memberof google.protobuf.FileOptions + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - FileOptions.prototype.phpClassPrefix = ""; + UninterpretedOption.prototype.identifierValue = ""; /** - * FileOptions phpNamespace. - * @member {string} phpNamespace - * @memberof google.protobuf.FileOptions + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - FileOptions.prototype.phpNamespace = ""; + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * FileOptions phpMetadataNamespace. - * @member {string} phpMetadataNamespace - * @memberof google.protobuf.FileOptions + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - FileOptions.prototype.phpMetadataNamespace = ""; + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * FileOptions rubyPackage. - * @member {string} rubyPackage - * @memberof google.protobuf.FileOptions + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - FileOptions.prototype.rubyPackage = ""; + UninterpretedOption.prototype.doubleValue = 0; /** - * FileOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FileOptions + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - FileOptions.prototype.uninterpretedOption = $util.emptyArray; + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); /** - * FileOptions .google.api.resourceDefinition. - * @member {Array.} .google.api.resourceDefinition - * @memberof google.protobuf.FileOptions + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + UninterpretedOption.prototype.aggregateValue = ""; /** - * Creates a new FileOptions instance using the specified properties. + * Creates a new UninterpretedOption instance using the specified properties. * @function create - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - * @returns {google.protobuf.FileOptions} FileOptions instance + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance */ - FileOptions.create = function create(properties) { - return new FileOptions(properties); + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); }; /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. * @function encode - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileOptions.encode = function encode(message, writer) { + UninterpretedOption.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); - if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); - if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); - if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); - if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); - if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); - if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); - if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); - if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); - if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) - writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); - if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); - if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); - if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) - writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); - if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) - writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); - if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) - writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); - if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) - writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); - if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) - writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); - if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) - writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); return writer; }; /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FileOptions message from the specified reader or buffer. + * Decodes an UninterpretedOption message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.UninterpretedOption * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileOptions} FileOptions + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileOptions.decode = function decode(reader, length) { + UninterpretedOption.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.javaPackage = reader.string(); - break; - } - case 8: { - message.javaOuterClassname = reader.string(); - break; - } - case 10: { - message.javaMultipleFiles = reader.bool(); - break; - } - case 20: { - message.javaGenerateEqualsAndHash = reader.bool(); - break; - } - case 27: { - message.javaStringCheckUtf8 = reader.bool(); - break; - } - case 9: { - message.optimizeFor = reader.int32(); - break; - } - case 11: { - message.goPackage = reader.string(); - break; - } - case 16: { - message.ccGenericServices = reader.bool(); - break; - } - case 17: { - message.javaGenericServices = reader.bool(); - break; - } - case 18: { - message.pyGenericServices = reader.bool(); - break; - } - case 42: { - message.phpGenericServices = reader.bool(); - break; - } - case 23: { - message.deprecated = reader.bool(); - break; - } - case 31: { - message.ccEnableArenas = reader.bool(); - break; - } - case 36: { - message.objcClassPrefix = reader.string(); - break; - } - case 37: { - message.csharpNamespace = reader.string(); - break; - } - case 39: { - message.swiftPrefix = reader.string(); + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); break; } - case 40: { - message.phpClassPrefix = reader.string(); + case 3: { + message.identifierValue = reader.string(); break; } - case 41: { - message.phpNamespace = reader.string(); + case 4: { + message.positiveIntValue = reader.uint64(); break; } - case 44: { - message.phpMetadataNamespace = reader.string(); + case 5: { + message.negativeIntValue = reader.int64(); break; } - case 45: { - message.rubyPackage = reader.string(); + case 6: { + message.doubleValue = reader.double(); break; } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + case 7: { + message.stringValue = reader.bytes(); break; } - case 1053: { - if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) - message[".google.api.resourceDefinition"] = []; - message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + case 8: { + message.aggregateValue = reader.string(); break; } default: @@ -15633,373 +20499,454 @@ }; /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.UninterpretedOption * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FileOptions message. + * Verifies an UninterpretedOption message. * @function verify - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.UninterpretedOption * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FileOptions.verify = function verify(message) { + UninterpretedOption.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - if (!$util.isString(message.javaPackage)) - return "javaPackage: string expected"; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - if (!$util.isString(message.javaOuterClassname)) - return "javaOuterClassname: string expected"; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - if (typeof message.javaMultipleFiles !== "boolean") - return "javaMultipleFiles: boolean expected"; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - if (typeof message.javaGenerateEqualsAndHash !== "boolean") - return "javaGenerateEqualsAndHash: boolean expected"; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - if (typeof message.javaStringCheckUtf8 !== "boolean") - return "javaStringCheckUtf8: boolean expected"; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - switch (message.optimizeFor) { - default: - return "optimizeFor: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - if (!$util.isString(message.goPackage)) - return "goPackage: string expected"; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - if (typeof message.ccGenericServices !== "boolean") - return "ccGenericServices: boolean expected"; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - if (typeof message.javaGenericServices !== "boolean") - return "javaGenericServices: boolean expected"; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - if (typeof message.pyGenericServices !== "boolean") - return "pyGenericServices: boolean expected"; - if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) - if (typeof message.phpGenericServices !== "boolean") - return "phpGenericServices: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - if (typeof message.ccEnableArenas !== "boolean") - return "ccEnableArenas: boolean expected"; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - if (!$util.isString(message.objcClassPrefix)) - return "objcClassPrefix: string expected"; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - if (!$util.isString(message.csharpNamespace)) - return "csharpNamespace: string expected"; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - if (!$util.isString(message.swiftPrefix)) - return "swiftPrefix: string expected"; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - if (!$util.isString(message.phpClassPrefix)) - return "phpClassPrefix: string expected"; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - if (!$util.isString(message.phpNamespace)) - return "phpNamespace: string expected"; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - if (!$util.isString(message.phpMetadataNamespace)) - return "phpMetadataNamespace: string expected"; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - if (!$util.isString(message.rubyPackage)) - return "rubyPackage: string expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { - if (!Array.isArray(message[".google.api.resourceDefinition"])) - return ".google.api.resourceDefinition: array expected"; - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); if (error) - return ".google.api.resourceDefinition." + error; + return "name." + error; } } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; return null; }; /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.UninterpretedOption * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FileOptions} FileOptions + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption */ - FileOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileOptions) + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) return object; - var message = new $root.google.protobuf.FileOptions(); - if (object.javaPackage != null) - message.javaPackage = String(object.javaPackage); - if (object.javaOuterClassname != null) - message.javaOuterClassname = String(object.javaOuterClassname); - if (object.javaMultipleFiles != null) - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - if (object.javaGenerateEqualsAndHash != null) - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - if (object.javaStringCheckUtf8 != null) - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - switch (object.optimizeFor) { - default: - if (typeof object.optimizeFor === "number") { - message.optimizeFor = object.optimizeFor; - break; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); } - break; - case "SPEED": - case 1: - message.optimizeFor = 1; - break; - case "CODE_SIZE": - case 2: - message.optimizeFor = 2; - break; - case "LITE_RUNTIME": - case 3: - message.optimizeFor = 3; - break; } - if (object.goPackage != null) - message.goPackage = String(object.goPackage); - if (object.ccGenericServices != null) - message.ccGenericServices = Boolean(object.ccGenericServices); - if (object.javaGenericServices != null) - message.javaGenericServices = Boolean(object.javaGenericServices); - if (object.pyGenericServices != null) - message.pyGenericServices = Boolean(object.pyGenericServices); - if (object.phpGenericServices != null) - message.phpGenericServices = Boolean(object.phpGenericServices); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.ccEnableArenas != null) - message.ccEnableArenas = Boolean(object.ccEnableArenas); - if (object.objcClassPrefix != null) - message.objcClassPrefix = String(object.objcClassPrefix); - if (object.csharpNamespace != null) - message.csharpNamespace = String(object.csharpNamespace); - if (object.swiftPrefix != null) - message.swiftPrefix = String(object.swiftPrefix); - if (object.phpClassPrefix != null) - message.phpClassPrefix = String(object.phpClassPrefix); - if (object.phpNamespace != null) - message.phpNamespace = String(object.phpNamespace); - if (object.phpMetadataNamespace != null) - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - if (object.rubyPackage != null) - message.rubyPackage = String(object.rubyPackage); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length >= 0) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); } + object.aggregateValue = ""; } - if (object[".google.api.resourceDefinition"]) { - if (!Array.isArray(object[".google.api.resourceDefinition"])) - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); - message[".google.api.resourceDefinition"] = []; - for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { - if (typeof object[".google.api.resourceDefinition"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); - message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); - } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); } - return message; + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; }; /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileOptions + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.FileOptions} message FileOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - FileOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.resourceDefinition"] = []; - } - if (options.defaults) { - object.javaPackage = ""; - object.javaOuterClassname = ""; - object.optimizeFor = options.enums === String ? "SPEED" : 1; - object.javaMultipleFiles = false; - object.goPackage = ""; - object.ccGenericServices = false; - object.javaGenericServices = false; - object.pyGenericServices = false; - object.javaGenerateEqualsAndHash = false; - object.deprecated = false; - object.javaStringCheckUtf8 = false; - object.ccEnableArenas = true; - object.objcClassPrefix = ""; - object.csharpNamespace = ""; - object.swiftPrefix = ""; - object.phpClassPrefix = ""; - object.phpNamespace = ""; - object.phpGenericServices = false; - object.phpMetadataNamespace = ""; - object.rubyPackage = ""; - } - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - object.goPackage = message.goPackage; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - object.csharpNamespace = message.csharpNamespace; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - object.swiftPrefix = message.swiftPrefix; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - object.phpClassPrefix = message.phpClassPrefix; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - object.phpNamespace = message.phpNamespace; - if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) - object.phpGenericServices = message.phpGenericServices; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - object.phpMetadataNamespace = message.phpMetadataNamespace; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - object.rubyPackage = message.rubyPackage; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { - object[".google.api.resourceDefinition"] = []; - for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) - object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - return object; + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; }; - /** - * Converts this FileOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FileOptions - * @instance - * @returns {Object.} JSON object - */ - FileOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(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]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Gets the default type url for FileOptions - * @function getTypeUrl - * @memberof google.protobuf.FileOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileOptions"; - }; + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; - /** - * OptimizeMode enum. - * @name google.protobuf.FileOptions.OptimizeMode - * @enum {number} - * @property {number} SPEED=1 SPEED value - * @property {number} CODE_SIZE=2 CODE_SIZE value - * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value - */ - FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "SPEED"] = 1; - values[valuesById[2] = "CODE_SIZE"] = 2; - values[valuesById[3] = "LITE_RUNTIME"] = 3; - return values; + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; })(); - return FileOptions; + return UninterpretedOption; })(); - protobuf.MessageOptions = (function() { + protobuf.SourceCodeInfo = (function() { /** - * Properties of a MessageOptions. + * Properties of a SourceCodeInfo. * @memberof google.protobuf - * @interface IMessageOptions - * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat - * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [mapEntry] MessageOptions mapEntry - * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption - * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location */ /** - * Constructs a new MessageOptions. + * Constructs a new SourceCodeInfo. * @memberof google.protobuf - * @classdesc Represents a MessageOptions. - * @implements IMessageOptions + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set */ - function MessageOptions(properties) { - this.uninterpretedOption = []; + function SourceCodeInfo(properties) { + this.location = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16007,148 +20954,78 @@ } /** - * MessageOptions messageSetWireFormat. - * @member {boolean} messageSetWireFormat - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.messageSetWireFormat = false; - - /** - * MessageOptions noStandardDescriptorAccessor. - * @member {boolean} noStandardDescriptorAccessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.noStandardDescriptorAccessor = false; - - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; - - /** - * MessageOptions mapEntry. - * @member {boolean} mapEntry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.mapEntry = false; - - /** - * MessageOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MessageOptions .google.api.resource. - * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource - * @memberof google.protobuf.MessageOptions + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo * @instance */ - MessageOptions.prototype[".google.api.resource"] = null; + SourceCodeInfo.prototype.location = $util.emptyArray; /** - * Creates a new MessageOptions instance using the specified properties. + * Creates a new SourceCodeInfo instance using the specified properties. * @function create - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - * @returns {google.protobuf.MessageOptions} MessageOptions instance + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance */ - MessageOptions.create = function create(properties) { - return new MessageOptions(properties); + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); }; /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. * @function encode - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); - if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MessageOptions message from the specified reader or buffer. + * Decodes a SourceCodeInfo message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.SourceCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MessageOptions} MessageOptions + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageOptions.decode = function decode(reader, length) { + SourceCodeInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.messageSetWireFormat = reader.bool(); - break; - } - case 2: { - message.noStandardDescriptorAccessor = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 7: { - message.mapEntry = reader.bool(); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); break; } default: @@ -16160,1112 +21037,1177 @@ }; /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.SourceCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MessageOptions} MessageOptions + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageOptions.decodeDelimited = function decodeDelimited(reader) { + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MessageOptions message. + * Verifies a SourceCodeInfo message. * @function verify - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.SourceCodeInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MessageOptions.verify = function verify(message) { + SourceCodeInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - if (typeof message.messageSetWireFormat !== "boolean") - return "messageSetWireFormat: boolean expected"; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - if (typeof message.noStandardDescriptorAccessor !== "boolean") - return "noStandardDescriptorAccessor: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - if (typeof message.mapEntry !== "boolean") - return "mapEntry: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); if (error) - return "uninterpretedOption." + error; + return "location." + error; } } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); - if (error) - return ".google.api.resource." + error; - } return null; }; /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.SourceCodeInfo * @static * @param {Object.} object Plain object - * @returns {google.protobuf.MessageOptions} MessageOptions + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo */ - MessageOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MessageOptions) + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) return object; - var message = new $root.google.protobuf.MessageOptions(); - if (object.messageSetWireFormat != null) - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - if (object.noStandardDescriptorAccessor != null) - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.mapEntry != null) - message.mapEntry = Boolean(object.mapEntry); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); } } - if (object[".google.api.resource"] != null) { - if (typeof object[".google.api.resource"] !== "object") - throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); - } return message; }; /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MessageOptions.toObject = function toObject(message, options) { + SourceCodeInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.messageSetWireFormat = false; - object.noStandardDescriptorAccessor = false; - object.deprecated = false; - object.mapEntry = false; - object[".google.api.resource"] = null; - } - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - object.messageSetWireFormat = message.messageSetWireFormat; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - object.mapEntry = message.mapEntry; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) - object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); return object; }; /** - * Converts this MessageOptions to JSON. + * Converts this SourceCodeInfo to JSON. * @function toJSON - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.SourceCodeInfo * @instance * @returns {Object.} JSON object */ - MessageOptions.prototype.toJSON = function toJSON() { + SourceCodeInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MessageOptions + * Gets the default type url for SourceCodeInfo * @function getTypeUrl - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.SourceCodeInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.MessageOptions"; + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; }; - return MessageOptions; - })(); - - protobuf.FieldOptions = (function() { + SourceCodeInfo.Location = (function() { - /** - * Properties of a FieldOptions. - * @memberof google.protobuf - * @interface IFieldOptions - * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype - * @property {boolean|null} [packed] FieldOptions packed - * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype - * @property {boolean|null} [lazy] FieldOptions lazy - * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy - * @property {boolean|null} [deprecated] FieldOptions deprecated - * @property {boolean|null} [weak] FieldOptions weak - * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption - * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior - * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference - */ + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ - /** - * Constructs a new FieldOptions. - * @memberof google.protobuf - * @classdesc Represents a FieldOptions. - * @implements IFieldOptions - * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - */ - function FieldOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.fieldBehavior"] = []; - 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]]; - } + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + 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]]; + } - /** - * FieldOptions ctype. - * @member {google.protobuf.FieldOptions.CType} ctype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.ctype = 0; + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; - /** - * FieldOptions packed. - * @member {boolean} packed - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.packed = false; + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; - /** - * FieldOptions jstype. - * @member {google.protobuf.FieldOptions.JSType} jstype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.jstype = 0; + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; - /** - * FieldOptions lazy. - * @member {boolean} lazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.lazy = false; + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; - /** - * FieldOptions unverifiedLazy. - * @member {boolean} unverifiedLazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.unverifiedLazy = false; + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; - /** - * FieldOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.deprecated = false; + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; - /** - * FieldOptions weak. - * @member {boolean} weak - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.weak = false; + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; - /** - * FieldOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.resourceReference"] = null; + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; - /** - * Creates a new FieldOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions} FieldOptions instance - */ - FieldOptions.create = function create(properties) { - return new FieldOptions(properties); - }; + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); - if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); - if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); - if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) - writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { - writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - writer.int32(message[".google.api.fieldBehavior"][i]); - writer.ldelim(); - } - if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) - $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); - return writer; - }; + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.ctype = reader.int32(); - break; - } - case 2: { - message.packed = reader.bool(); - break; - } - case 6: { - message.jstype = reader.int32(); - break; - } - case 5: { - message.lazy = reader.bool(); - break; - } - case 15: { - message.unverifiedLazy = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 10: { - message.weak = reader.bool(); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1052: { - if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) - message[".google.api.fieldBehavior"] = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message[".google.api.fieldBehavior"].push(reader.int32()); - } else - message[".google.api.fieldBehavior"].push(reader.int32()); - break; - } - case 1055: { - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - } - return message; - }; + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + 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]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); }; /** - * Verifies a FieldOptions message. - * @function verify - * @memberof google.protobuf.FieldOptions + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - FieldOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ctype != null && message.hasOwnProperty("ctype")) - switch (message.ctype) { - default: - return "ctype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.packed != null && message.hasOwnProperty("packed")) - if (typeof message.packed !== "boolean") - return "packed: boolean expected"; - if (message.jstype != null && message.hasOwnProperty("jstype")) - switch (message.jstype) { - default: - return "jstype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.lazy != null && message.hasOwnProperty("lazy")) - if (typeof message.lazy !== "boolean") - return "lazy: boolean expected"; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - if (typeof message.unverifiedLazy !== "boolean") - return "unverifiedLazy: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.weak != null && message.hasOwnProperty("weak")) - if (typeof message.weak !== "boolean") - return "weak: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { - if (!Array.isArray(message[".google.api.fieldBehavior"])) - return ".google.api.fieldBehavior: array expected"; - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - switch (message[".google.api.fieldBehavior"][i]) { - default: - return ".google.api.fieldBehavior: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { - var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); - if (error) - return ".google.api.resourceReference." + error; - } - return null; + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; }; /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions - */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) - return object; - var message = new $root.google.protobuf.FieldOptions(); - switch (object.ctype) { - default: - if (typeof object.ctype === "number") { - message.ctype = object.ctype; - break; - } - break; - case "STRING": - case 0: - message.ctype = 0; - break; - case "CORD": - case 1: - message.ctype = 1; - break; - case "STRING_PIECE": - case 2: - message.ctype = 2; - break; - } - if (object.packed != null) - message.packed = Boolean(object.packed); - switch (object.jstype) { - default: - if (typeof object.jstype === "number") { - message.jstype = object.jstype; - break; - } - break; - case "JS_NORMAL": - case 0: - message.jstype = 0; - break; - case "JS_STRING": - case 1: - message.jstype = 1; - break; - case "JS_NUMBER": - case 2: - message.jstype = 2; - break; - } - if (object.lazy != null) - message.lazy = Boolean(object.lazy); - if (object.unverifiedLazy != null) - message.unverifiedLazy = Boolean(object.unverifiedLazy); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.weak != null) - message.weak = Boolean(object.weak); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.fieldBehavior"]) { - if (!Array.isArray(object[".google.api.fieldBehavior"])) - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); - message[".google.api.fieldBehavior"] = []; - for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) - switch (object[".google.api.fieldBehavior"][i]) { - default: - if (typeof object[".google.api.fieldBehavior"][i] === "number") { - message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; - break; - } - case "FIELD_BEHAVIOR_UNSPECIFIED": - case 0: - message[".google.api.fieldBehavior"][i] = 0; - break; - case "OPTIONAL": - case 1: - message[".google.api.fieldBehavior"][i] = 1; - break; - case "REQUIRED": - case 2: - message[".google.api.fieldBehavior"][i] = 2; - break; - case "OUTPUT_ONLY": - case 3: - message[".google.api.fieldBehavior"][i] = 3; - break; - case "INPUT_ONLY": - case 4: - message[".google.api.fieldBehavior"][i] = 4; - break; - case "IMMUTABLE": - case 5: - message[".google.api.fieldBehavior"][i] = 5; - break; - case "UNORDERED_LIST": - case 6: - message[".google.api.fieldBehavior"][i] = 6; - break; - case "NON_EMPTY_DEFAULT": - case 7: - message[".google.api.fieldBehavior"][i] = 7; + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); break; } + default: + reader.skipType(tag & 7); + break; + } } - if (object[".google.api.resourceReference"] != null) { - if (typeof object[".google.api.resourceReference"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } } return message; }; /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldOptions.toObject = function toObject(message, options) { + GeneratedCodeInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.fieldBehavior"] = []; - } - if (options.defaults) { - object.ctype = options.enums === String ? "STRING" : 0; - object.packed = false; - object.deprecated = false; - object.lazy = false; - object.jstype = options.enums === String ? "JS_NORMAL" : 0; - object.weak = false; - object.unverifiedLazy = false; - object[".google.api.resourceReference"] = null; - } - if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) - object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.lazy != null && message.hasOwnProperty("lazy")) - object.lazy = message.lazy; - if (message.jstype != null && message.hasOwnProperty("jstype")) - object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; - if (message.weak != null && message.hasOwnProperty("weak")) - object.weak = message.weak; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - object.unverifiedLazy = message.unverifiedLazy; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { - object[".google.api.fieldBehavior"] = []; - for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) - object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) - object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); return object; }; /** - * Converts this FieldOptions to JSON. + * Converts this GeneratedCodeInfo to JSON. * @function toJSON - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.GeneratedCodeInfo * @instance * @returns {Object.} JSON object */ - FieldOptions.prototype.toJSON = function toJSON() { + GeneratedCodeInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FieldOptions + * Gets the default type url for GeneratedCodeInfo * @function getTypeUrl - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FieldOptions"; + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; }; - /** - * CType enum. - * @name google.protobuf.FieldOptions.CType - * @enum {number} - * @property {number} STRING=0 STRING value - * @property {number} CORD=1 CORD value - * @property {number} STRING_PIECE=2 STRING_PIECE value - */ - FieldOptions.CType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = 0; - values[valuesById[1] = "CORD"] = 1; - values[valuesById[2] = "STRING_PIECE"] = 2; - return values; - })(); + GeneratedCodeInfo.Annotation = (function() { - /** - * JSType enum. - * @name google.protobuf.FieldOptions.JSType - * @enum {number} - * @property {number} JS_NORMAL=0 JS_NORMAL value - * @property {number} JS_STRING=1 JS_STRING value - * @property {number} JS_NUMBER=2 JS_NUMBER value - */ - FieldOptions.JSType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JS_NORMAL"] = 0; - values[valuesById[1] = "JS_STRING"] = 1; - values[valuesById[2] = "JS_NUMBER"] = 2; - return values; - })(); + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ - return FieldOptions; - })(); + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + 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]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; - protobuf.OneofOptions = (function() { + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; - /** - * Properties of an OneofOptions. - * @memberof google.protobuf - * @interface IOneofOptions - * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption - */ + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; - /** - * Constructs a new OneofOptions. - * @memberof google.protobuf - * @classdesc Represents an OneofOptions. - * @implements IOneofOptions - * @constructor - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - */ - function OneofOptions(properties) { - this.uninterpretedOption = []; - 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]]; - } + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); + return writer; + }; - /** - * OneofOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a new OneofOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - * @returns {google.protobuf.OneofOptions} OneofOptions instance - */ - OneofOptions.create = function create(properties) { - return new OneofOptions(properties); - }; + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; break; } - default: - reader.skipType(tag & 7); + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; break; } - } - return message; - }; - - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return message; + }; - /** - * Verifies an OneofOptions message. - * @function verify - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; } - } - return null; - }; - - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofOptions} OneofOptions - */ - OneofOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofOptions) - return object; - var message = new $root.google.protobuf.OneofOptions(); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; } - } - return message; - }; + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.OneofOptions} message OneofOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this OneofOptions to JSON. - * @function toJSON - * @memberof google.protobuf.OneofOptions - * @instance - * @returns {Object.} JSON object - */ - OneofOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; - /** - * Gets the default type url for OneofOptions - * @function getTypeUrl - * @memberof google.protobuf.OneofOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofOptions"; - }; + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); - return OneofOptions; + return Annotation; + })(); + + return GeneratedCodeInfo; })(); - protobuf.EnumOptions = (function() { + protobuf.Any = (function() { /** - * Properties of an EnumOptions. + * Properties of an Any. * @memberof google.protobuf - * @interface IEnumOptions - * @property {boolean|null} [allowAlias] EnumOptions allowAlias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value */ /** - * Constructs a new EnumOptions. + * Constructs a new Any. * @memberof google.protobuf - * @classdesc Represents an EnumOptions. - * @implements IEnumOptions - * @constructor - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - */ - function EnumOptions(properties) { - this.uninterpretedOption = []; - 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]]; - } - - /** - * EnumOptions allowAlias. - * @member {boolean} allowAlias - * @memberof google.protobuf.EnumOptions - * @instance + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set */ - EnumOptions.prototype.allowAlias = false; + function Any(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]]; + } /** - * EnumOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumOptions + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any * @instance */ - EnumOptions.prototype.deprecated = false; + Any.prototype.type_url = ""; /** - * EnumOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumOptions + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any * @instance */ - EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + Any.prototype.value = $util.newBuffer([]); /** - * Creates a new EnumOptions instance using the specified properties. + * Creates a new Any instance using the specified properties. * @function create - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumOptions} EnumOptions instance + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance */ - EnumOptions.create = function create(properties) { - return new EnumOptions(properties); + Any.create = function create(properties) { + return new Any(properties); }; /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. * @function encode - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {google.protobuf.IAny} message Any message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumOptions.encode = function encode(message, writer) { + Any.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); return writer; }; /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {google.protobuf.IAny} message Any message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + Any.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnumOptions message from the specified reader or buffer. + * Decodes an Any message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.Any * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumOptions} EnumOptions + * @returns {google.protobuf.Any} Any * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumOptions.decode = function decode(reader, length) { + Any.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: { - message.allowAlias = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); + case 1: { + message.type_url = reader.string(); break; } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + case 2: { + message.value = reader.bytes(); break; } default: @@ -17277,159 +22219,141 @@ }; /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * Decodes an Any message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.Any * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumOptions} EnumOptions + * @returns {google.protobuf.Any} Any * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumOptions.decodeDelimited = function decodeDelimited(reader) { + Any.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EnumOptions message. + * Verifies an Any message. * @function verify - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.Any * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumOptions.verify = function verify(message) { + Any.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - if (typeof message.allowAlias !== "boolean") - return "allowAlias: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; return null; }; /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * Creates an Any message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.Any * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumOptions} EnumOptions + * @returns {google.protobuf.Any} Any */ - EnumOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumOptions) + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) return object; - var message = new $root.google.protobuf.EnumOptions(); - if (object.allowAlias != null) - message.allowAlias = Boolean(object.allowAlias); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; return message; }; /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * Creates a plain object from an Any message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {google.protobuf.Any} message Any * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumOptions.toObject = function toObject(message, options) { + Any.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; if (options.defaults) { - object.allowAlias = false; - object.deprecated = false; - } - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - object.allowAlias = message.allowAlias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; return object; }; /** - * Converts this EnumOptions to JSON. + * Converts this Any to JSON. * @function toJSON - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.Any * @instance * @returns {Object.} JSON object */ - EnumOptions.prototype.toJSON = function toJSON() { + Any.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EnumOptions + * Gets the default type url for Any * @function getTypeUrl - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.Any * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.EnumOptions"; + return typeUrlPrefix + "/google.protobuf.Any"; }; - return EnumOptions; + return Any; })(); - protobuf.EnumValueOptions = (function() { + protobuf.Duration = (function() { /** - * Properties of an EnumValueOptions. + * Properties of a Duration. * @memberof google.protobuf - * @interface IEnumValueOptions - * @property {boolean|null} [deprecated] EnumValueOptions deprecated - * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos */ /** - * Constructs a new EnumValueOptions. + * Constructs a new Duration. * @memberof google.protobuf - * @classdesc Represents an EnumValueOptions. - * @implements IEnumValueOptions + * @classdesc Represents a Duration. + * @implements IDuration * @constructor - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @param {google.protobuf.IDuration=} [properties] Properties to set */ - function EnumValueOptions(properties) { - this.uninterpretedOption = []; + function Duration(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17437,92 +22361,89 @@ } /** - * EnumValueOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumValueOptions + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration * @instance */ - EnumValueOptions.prototype.deprecated = false; + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * EnumValueOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumValueOptions + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration * @instance */ - EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + Duration.prototype.nanos = 0; /** - * Creates a new EnumValueOptions instance using the specified properties. + * Creates a new Duration instance using the specified properties. * @function create - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance */ - EnumValueOptions.create = function create(properties) { - return new EnumValueOptions(properties); + Duration.create = function create(properties) { + return new Duration(properties); }; /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. * @function encode - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {google.protobuf.IDuration} message Duration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encode = function encode(message, writer) { + Duration.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); return writer; }; /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {google.protobuf.IDuration} message Duration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + Duration.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnumValueOptions message from the specified reader or buffer. + * Decodes a Duration message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Duration * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.protobuf.Duration} Duration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueOptions.decode = function decode(reader, length) { + Duration.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.deprecated = reader.bool(); + message.seconds = reader.int64(); break; } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + case 2: { + message.nanos = reader.int32(); break; } default: @@ -17534,152 +22455,144 @@ }; /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * Decodes a Duration message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Duration * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.protobuf.Duration} Duration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + Duration.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EnumValueOptions message. + * Verifies a Duration message. * @function verify - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Duration * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EnumValueOptions.verify = function verify(message) { + Duration.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; return null; }; /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * Creates a Duration message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Duration * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.protobuf.Duration} Duration */ - EnumValueOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueOptions) + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) return object; - var message = new $root.google.protobuf.EnumValueOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; return message; }; /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * Creates a plain object from a Duration message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.EnumValueOptions} message EnumValueOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) - object.deprecated = false; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; return object; }; /** - * Converts this EnumValueOptions to JSON. + * Converts this Duration to JSON. * @function toJSON - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Duration * @instance * @returns {Object.} JSON object */ - EnumValueOptions.prototype.toJSON = function toJSON() { + Duration.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EnumValueOptions + * Gets the default type url for Duration * @function getTypeUrl - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Duration * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + return typeUrlPrefix + "/google.protobuf.Duration"; }; - return EnumValueOptions; + return Duration; })(); - protobuf.ServiceOptions = (function() { + protobuf.Empty = (function() { /** - * Properties of a ServiceOptions. + * Properties of an Empty. * @memberof google.protobuf - * @interface IServiceOptions - * @property {boolean|null} [deprecated] ServiceOptions deprecated - * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption - * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost - * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + * @interface IEmpty */ /** - * Constructs a new ServiceOptions. + * Constructs a new Empty. * @memberof google.protobuf - * @classdesc Represents a ServiceOptions. - * @implements IServiceOptions + * @classdesc Represents an Empty. + * @implements IEmpty * @constructor - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @param {google.protobuf.IEmpty=} [properties] Properties to set */ - function ServiceOptions(properties) { - this.uninterpretedOption = []; + function Empty(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17687,122 +22600,63 @@ } /** - * ServiceOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.deprecated = false; - - /** - * ServiceOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * ServiceOptions .google.api.defaultHost. - * @member {string} .google.api.defaultHost - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.defaultHost"] = ""; - - /** - * ServiceOptions .google.api.oauthScopes. - * @member {string} .google.api.oauthScopes - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.oauthScopes"] = ""; - - /** - * Creates a new ServiceOptions instance using the specified properties. + * Creates a new Empty instance using the specified properties. * @function create - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance */ - ServiceOptions.create = function create(properties) { - return new ServiceOptions(properties); + Empty.create = function create(properties) { + return new Empty(properties); }; /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. * @function encode - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encode = function encode(message, writer) { + Empty.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) - writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); - if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) - writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); return writer; }; /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + Empty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ServiceOptions message from the specified reader or buffer. + * Decodes an Empty message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.Empty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.protobuf.Empty} Empty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceOptions.decode = function decode(reader, length) { + Empty.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 33: { - message.deprecated = reader.bool(); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1049: { - message[".google.api.defaultHost"] = reader.string(); - break; - } - case 1050: { - message[".google.api.oauthScopes"] = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -17812,309 +22666,200 @@ }; /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * Decodes an Empty message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.Empty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.protobuf.Empty} Empty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + Empty.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ServiceOptions message. + * Verifies an Empty message. * @function verify - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.Empty * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ServiceOptions.verify = function verify(message) { + Empty.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - if (!$util.isString(message[".google.api.defaultHost"])) - return ".google.api.defaultHost: string expected"; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - if (!$util.isString(message[".google.api.oauthScopes"])) - return ".google.api.oauthScopes: string expected"; return null; }; /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * Creates an Empty message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.Empty * @static * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.protobuf.Empty} Empty */ - ServiceOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceOptions) + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) return object; - var message = new $root.google.protobuf.ServiceOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.defaultHost"] != null) - message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); - if (object[".google.api.oauthScopes"] != null) - message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); - return message; + return new $root.google.protobuf.Empty(); }; /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * Creates a plain object from an Empty message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {google.protobuf.Empty} message Empty * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object[".google.api.defaultHost"] = ""; - object[".google.api.oauthScopes"] = ""; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; - return object; + Empty.toObject = function toObject() { + return {}; }; /** - * Converts this ServiceOptions to JSON. + * Converts this Empty to JSON. * @function toJSON - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.Empty * @instance * @returns {Object.} JSON object */ - ServiceOptions.prototype.toJSON = function toJSON() { + Empty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ServiceOptions + * Gets the default type url for Empty * @function getTypeUrl - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.Empty * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + return typeUrlPrefix + "/google.protobuf.Empty"; }; - return ServiceOptions; + return Empty; })(); - protobuf.MethodOptions = (function() { + protobuf.Timestamp = (function() { /** - * Properties of a MethodOptions. + * Properties of a Timestamp. * @memberof google.protobuf - * @interface IMethodOptions - * @property {boolean|null} [deprecated] MethodOptions deprecated - * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel - * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption - * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http - * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos */ /** - * Constructs a new MethodOptions. + * Constructs a new Timestamp. * @memberof google.protobuf - * @classdesc Represents a MethodOptions. - * @implements IMethodOptions + * @classdesc Represents a Timestamp. + * @implements ITimestamp * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @param {google.protobuf.ITimestamp=} [properties] Properties to set */ - function MethodOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.methodSignature"] = []; + function Timestamp(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]]; } - - /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.deprecated = false; - - /** - * MethodOptions idempotencyLevel. - * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.idempotencyLevel = 0; - - /** - * MethodOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp * @instance */ - MethodOptions.prototype[".google.api.http"] = null; + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature - * @memberof google.protobuf.MethodOptions + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp * @instance */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + Timestamp.prototype.nanos = 0; /** - * Creates a new MethodOptions instance using the specified properties. + * Creates a new Timestamp instance using the specified properties. * @function create - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - * @returns {google.protobuf.MethodOptions} MethodOptions instance + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance */ - MethodOptions.create = function create(properties) { - return new MethodOptions(properties); + Timestamp.create = function create(properties) { + return new Timestamp(properties); }; /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encode - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encode = function encode(message, writer) { + Timestamp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) - writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); return writer; }; /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MethodOptions message from the specified reader or buffer. + * Decodes a Timestamp message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.Timestamp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.Timestamp} Timestamp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodOptions.decode = function decode(reader, length) { + Timestamp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 33: { - message.deprecated = reader.bool(); - break; - } - case 34: { - message.idempotencyLevel = reader.int32(); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 72295728: { - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + case 1: { + message.seconds = reader.int64(); break; } - case 1051: { - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); + case 2: { + message.nanos = reader.int32(); break; } default: @@ -18126,238 +22871,361 @@ }; /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * Decodes a Timestamp message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.Timestamp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.Timestamp} Timestamp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MethodOptions.decodeDelimited = function decodeDelimited(reader) { + Timestamp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MethodOptions message. + * Verifies a Timestamp message. * @function verify - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.Timestamp * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MethodOptions.verify = function verify(message) { + Timestamp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - switch (message.idempotencyLevel) { - default: - return "idempotencyLevel: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + error; - } - if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { - if (!Array.isArray(message[".google.api.methodSignature"])) - return ".google.api.methodSignature: array expected"; - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - if (!$util.isString(message[".google.api.methodSignature"][i])) - return ".google.api.methodSignature: string[] expected"; - } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; return null; }; /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.Timestamp * @static * @param {Object.} object Plain object - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.Timestamp} Timestamp */ - MethodOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodOptions) + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) return object; - var message = new $root.google.protobuf.MethodOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - switch (object.idempotencyLevel) { - default: - if (typeof object.idempotencyLevel === "number") { - message.idempotencyLevel = object.idempotencyLevel; - break; - } - break; - case "IDEMPOTENCY_UNKNOWN": - case 0: - message.idempotencyLevel = 0; - break; - case "NO_SIDE_EFFECTS": - case 1: - message.idempotencyLevel = 1; - break; - case "IDEMPOTENT": - case 2: - message.idempotencyLevel = 2; - break; - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - if (object[".google.api.methodSignature"]) { - if (!Array.isArray(object[".google.api.methodSignature"])) - throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); - message[".google.api.methodSignature"] = []; - for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) - message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); - } + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; return message; }; /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {google.protobuf.Timestamp} message Timestamp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodOptions.toObject = function toObject(message, options) { + Timestamp.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.methodSignature"] = []; - } if (options.defaults) { - object.deprecated = false; - object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { - object[".google.api.methodSignature"] = []; - for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) - object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; return object; }; /** - * Converts this MethodOptions to JSON. + * Converts this Timestamp to JSON. * @function toJSON - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.Timestamp * @instance * @returns {Object.} JSON object */ - MethodOptions.prototype.toJSON = function toJSON() { + Timestamp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MethodOptions + * Gets the default type url for Timestamp * @function getTypeUrl - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.Timestamp * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.MethodOptions"; + return typeUrlPrefix + "/google.protobuf.Timestamp"; }; + return Timestamp; + })(); + + return protobuf; + })(); + + google.longrunning = (function() { + + /** + * Namespace longrunning. + * @memberof google + * @namespace + */ + var longrunning = {}; + + longrunning.Operations = (function() { + /** - * IdempotencyLevel enum. - * @name google.protobuf.MethodOptions.IdempotencyLevel - * @enum {number} - * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value - * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value - * @property {number} IDEMPOTENT=2 IDEMPOTENT value + * Constructs a new Operations service. + * @memberof google.longrunning + * @classdesc Represents an Operations + * @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 */ - MethodOptions.IdempotencyLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; - values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; - values[valuesById[2] = "IDEMPOTENT"] = 2; - return values; - })(); + function Operations(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } - return MethodOptions; + (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; + + /** + * Creates new Operations service using the specified rpc implementation. + * @function create + * @memberof google.longrunning.Operations + * @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 {Operations} RPC service. Useful where requests and/or responses are streamed. + */ + Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.longrunning.Operations|listOperations}. + * @memberof google.longrunning.Operations + * @typedef ListOperationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse + */ + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { + return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); + }, "name", { value: "ListOperations" }); + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|getOperation}. + * @memberof google.longrunning.Operations + * @typedef GetOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { + return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "GetOperation" }); + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. + * @memberof google.longrunning.Operations + * @typedef DeleteOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { + return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteOperation" }); + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. + * @memberof google.longrunning.Operations + * @typedef CancelOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { + return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelOperation" }); + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|waitOperation}. + * @memberof google.longrunning.Operations + * @typedef WaitOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { + return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "WaitOperation" }); + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Operations; })(); - protobuf.UninterpretedOption = (function() { + longrunning.Operation = (function() { /** - * Properties of an UninterpretedOption. - * @memberof google.protobuf - * @interface IUninterpretedOption - * @property {Array.|null} [name] UninterpretedOption name - * @property {string|null} [identifierValue] UninterpretedOption identifierValue - * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue - * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue - * @property {number|null} [doubleValue] UninterpretedOption doubleValue - * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue - * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + * Properties of an Operation. + * @memberof google.longrunning + * @interface IOperation + * @property {string|null} [name] Operation name + * @property {google.protobuf.IAny|null} [metadata] Operation metadata + * @property {boolean|null} [done] Operation done + * @property {google.rpc.IStatus|null} [error] Operation error + * @property {google.protobuf.IAny|null} [response] Operation response */ /** - * Constructs a new UninterpretedOption. - * @memberof google.protobuf - * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption + * Constructs a new Operation. + * @memberof google.longrunning + * @classdesc Represents an Operation. + * @implements IOperation * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @param {google.longrunning.IOperation=} [properties] Properties to set */ - function UninterpretedOption(properties) { - this.name = []; + function Operation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18365,162 +23233,145 @@ } /** - * UninterpretedOption name. - * @member {Array.} name - * @memberof google.protobuf.UninterpretedOption + * Operation name. + * @member {string} name + * @memberof google.longrunning.Operation * @instance */ - UninterpretedOption.prototype.name = $util.emptyArray; + Operation.prototype.name = ""; /** - * UninterpretedOption identifierValue. - * @member {string} identifierValue - * @memberof google.protobuf.UninterpretedOption + * Operation metadata. + * @member {google.protobuf.IAny|null|undefined} metadata + * @memberof google.longrunning.Operation * @instance */ - UninterpretedOption.prototype.identifierValue = ""; + Operation.prototype.metadata = null; /** - * UninterpretedOption positiveIntValue. - * @member {number|Long} positiveIntValue - * @memberof google.protobuf.UninterpretedOption + * Operation done. + * @member {boolean} done + * @memberof google.longrunning.Operation * @instance */ - UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + Operation.prototype.done = false; /** - * UninterpretedOption negativeIntValue. - * @member {number|Long} negativeIntValue - * @memberof google.protobuf.UninterpretedOption + * Operation error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.longrunning.Operation * @instance */ - UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Operation.prototype.error = null; /** - * UninterpretedOption doubleValue. - * @member {number} doubleValue - * @memberof google.protobuf.UninterpretedOption + * Operation response. + * @member {google.protobuf.IAny|null|undefined} response + * @memberof google.longrunning.Operation * @instance */ - UninterpretedOption.prototype.doubleValue = 0; + Operation.prototype.response = null; - /** - * UninterpretedOption stringValue. - * @member {Uint8Array} stringValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * UninterpretedOption aggregateValue. - * @member {string} aggregateValue - * @memberof google.protobuf.UninterpretedOption + * Operation result. + * @member {"error"|"response"|undefined} result + * @memberof google.longrunning.Operation * @instance */ - UninterpretedOption.prototype.aggregateValue = ""; + Object.defineProperty(Operation.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["error", "response"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new UninterpretedOption instance using the specified properties. + * Creates a new Operation instance using the specified properties. * @function create - * @memberof google.protobuf.UninterpretedOption + * @memberof google.longrunning.Operation * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + * @param {google.longrunning.IOperation=} [properties] Properties to set + * @returns {google.longrunning.Operation} Operation instance */ - UninterpretedOption.create = function create(properties) { - return new UninterpretedOption(properties); + Operation.create = function create(properties) { + return new Operation(properties); }; /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. * @function encode - * @memberof google.protobuf.UninterpretedOption + * @memberof google.longrunning.Operation * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {google.longrunning.IOperation} message Operation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encode = function encode(message, writer) { + Operation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.name.length) - for (var i = 0; i < message.name.length; ++i) - $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); - if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); - if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); - if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.done != null && Object.hasOwnProperty.call(message, "done")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.response != null && Object.hasOwnProperty.call(message, "response")) + $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption + * @memberof google.longrunning.Operation * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {google.longrunning.IOperation} message Operation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + Operation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UninterpretedOption message from the specified reader or buffer. + * Decodes an Operation message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.UninterpretedOption + * @memberof google.longrunning.Operation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.longrunning.Operation} Operation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UninterpretedOption.decode = function decode(reader, length) { + Operation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } case 2: { - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); break; } case 3: { - message.identifierValue = reader.string(); + message.done = reader.bool(); break; } case 4: { - message.positiveIntValue = reader.uint64(); + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); break; } case 5: { - message.negativeIntValue = reader.int64(); - break; - } - case 6: { - message.doubleValue = reader.double(); - break; - } - case 7: { - message.stringValue = reader.bytes(); - break; - } - case 8: { - message.aggregateValue = reader.string(); + message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); break; } default: @@ -18532,454 +23383,389 @@ }; /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * Decodes an Operation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption + * @memberof google.longrunning.Operation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.longrunning.Operation} Operation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + Operation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UninterpretedOption message. + * Verifies an Operation message. * @function verify - * @memberof google.protobuf.UninterpretedOption + * @memberof google.longrunning.Operation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UninterpretedOption.verify = function verify(message) { + Operation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) { - if (!Array.isArray(message.name)) - return "name: array expected"; - for (var i = 0; i < message.name.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); - if (error) - return "name." + error; - } - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - if (!$util.isString(message.identifierValue)) - return "identifierValue: string expected"; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) - return "positiveIntValue: integer|Long expected"; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) - return "negativeIntValue: integer|Long expected"; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) - return "stringValue: buffer expected"; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - if (!$util.isString(message.aggregateValue)) - return "aggregateValue: string expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Any.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.done != null && message.hasOwnProperty("done")) + if (typeof message.done !== "boolean") + return "done: boolean expected"; + if (message.error != null && message.hasOwnProperty("error")) { + properties.result = 1; + { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + } + if (message.response != null && message.hasOwnProperty("response")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.protobuf.Any.verify(message.response); + if (error) + return "response." + error; + } + } return null; }; /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * Creates an Operation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.UninterpretedOption + * @memberof google.longrunning.Operation * @static * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.longrunning.Operation} Operation */ - UninterpretedOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption) + Operation.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.Operation) return object; - var message = new $root.google.protobuf.UninterpretedOption(); - if (object.name) { - if (!Array.isArray(object.name)) - throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); - message.name = []; - for (var i = 0; i < object.name.length; ++i) { - if (typeof object.name[i] !== "object") - throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); - message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); - } + var message = new $root.google.longrunning.Operation(); + if (object.name != null) + message.name = String(object.name); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.longrunning.Operation.metadata: object expected"); + message.metadata = $root.google.protobuf.Any.fromObject(object.metadata); + } + if (object.done != null) + message.done = Boolean(object.done); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.longrunning.Operation.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + if (object.response != null) { + if (typeof object.response !== "object") + throw TypeError(".google.longrunning.Operation.response: object expected"); + message.response = $root.google.protobuf.Any.fromObject(object.response); } - if (object.identifierValue != null) - message.identifierValue = String(object.identifierValue); - if (object.positiveIntValue != null) - if ($util.Long) - (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; - else if (typeof object.positiveIntValue === "string") - message.positiveIntValue = parseInt(object.positiveIntValue, 10); - else if (typeof object.positiveIntValue === "number") - message.positiveIntValue = object.positiveIntValue; - else if (typeof object.positiveIntValue === "object") - message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); - if (object.negativeIntValue != null) - if ($util.Long) - (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; - else if (typeof object.negativeIntValue === "string") - message.negativeIntValue = parseInt(object.negativeIntValue, 10); - else if (typeof object.negativeIntValue === "number") - message.negativeIntValue = object.negativeIntValue; - else if (typeof object.negativeIntValue === "object") - message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.stringValue != null) - if (typeof object.stringValue === "string") - $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length >= 0) - message.stringValue = object.stringValue; - if (object.aggregateValue != null) - message.aggregateValue = String(object.aggregateValue); return message; }; /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * Creates a plain object from an Operation message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.UninterpretedOption + * @memberof google.longrunning.Operation * @static - * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {google.longrunning.Operation} message Operation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UninterpretedOption.toObject = function toObject(message, options) { + Operation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.name = []; if (options.defaults) { - object.identifierValue = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.positiveIntValue = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.negativeIntValue = options.longs === String ? "0" : 0; - object.doubleValue = 0; - if (options.bytes === String) - object.stringValue = ""; - else { - object.stringValue = []; - if (options.bytes !== Array) - object.stringValue = $util.newBuffer(object.stringValue); - } - object.aggregateValue = ""; + object.name = ""; + object.metadata = null; + object.done = false; } - if (message.name && message.name.length) { - object.name = []; - for (var j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); + if (message.done != null && message.hasOwnProperty("done")) + object.done = message.done; + if (message.error != null && message.hasOwnProperty("error")) { + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (options.oneofs) + object.result = "error"; + } + if (message.response != null && message.hasOwnProperty("response")) { + object.response = $root.google.protobuf.Any.toObject(message.response, options); + if (options.oneofs) + object.result = "response"; } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - object.identifierValue = message.identifierValue; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (typeof message.positiveIntValue === "number") - object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; - else - object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (typeof message.negativeIntValue === "number") - object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; - else - object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - object.aggregateValue = message.aggregateValue; return object; }; /** - * Converts this UninterpretedOption to JSON. + * Converts this Operation to JSON. * @function toJSON - * @memberof google.protobuf.UninterpretedOption + * @memberof google.longrunning.Operation * @instance * @returns {Object.} JSON object */ - UninterpretedOption.prototype.toJSON = function toJSON() { + Operation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UninterpretedOption + * Gets the default type url for Operation * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption + * @memberof google.longrunning.Operation * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + return typeUrlPrefix + "/google.longrunning.Operation"; }; - UninterpretedOption.NamePart = (function() { - - /** - * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart - * @property {string} namePart NamePart namePart - * @property {boolean} isExtension NamePart isExtension - */ - - /** - * Constructs a new NamePart. - * @memberof google.protobuf.UninterpretedOption - * @classdesc Represents a NamePart. - * @implements INamePart - * @constructor - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - */ - function NamePart(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]]; - } + return Operation; + })(); - /** - * NamePart namePart. - * @member {string} namePart - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.namePart = ""; + longrunning.GetOperationRequest = (function() { - /** - * NamePart isExtension. - * @member {boolean} isExtension - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.isExtension = false; + /** + * Properties of a GetOperationRequest. + * @memberof google.longrunning + * @interface IGetOperationRequest + * @property {string|null} [name] GetOperationRequest name + */ - /** - * Creates a new NamePart instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance - */ - NamePart.create = function create(properties) { - return new NamePart(properties); - }; + /** + * Constructs a new GetOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a GetOperationRequest. + * @implements IGetOperationRequest + * @constructor + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + */ + function GetOperationRequest(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]]; + } - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); - return writer; - }; + /** + * GetOperationRequest name. + * @member {string} name + * @memberof google.longrunning.GetOperationRequest + * @instance + */ + GetOperationRequest.prototype.name = ""; - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance + */ + GetOperationRequest.create = function create(properties) { + return new GetOperationRequest(properties); + }; - /** - * Decodes a NamePart message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.namePart = reader.string(); - break; - } - case 2: { - message.isExtension = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.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 GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; } + default: + reader.skipType(tag & 7); + break; } - if (!message.hasOwnProperty("namePart")) - throw $util.ProtocolError("missing required 'namePart'", { instance: message }); - if (!message.hasOwnProperty("isExtension")) - throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); - return message; - }; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a NamePart message. - * @function verify - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NamePart.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (!$util.isString(message.namePart)) - return "namePart: string expected"; - if (typeof message.isExtension !== "boolean") - return "isExtension: boolean expected"; - return null; - }; + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - */ - NamePart.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) - return object; - var message = new $root.google.protobuf.UninterpretedOption.NamePart(); - if (object.namePart != null) - message.namePart = String(object.namePart); - if (object.isExtension != null) - message.isExtension = Boolean(object.isExtension); - return message; - }; + /** + * Verifies a GetOperationRequest message. + * @function verify + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOperationRequest.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 plain object from a NamePart message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NamePart.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.namePart = ""; - object.isExtension = false; - } - if (message.namePart != null && message.hasOwnProperty("namePart")) - object.namePart = message.namePart; - if (message.isExtension != null && message.hasOwnProperty("isExtension")) - object.isExtension = message.isExtension; + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + */ + GetOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.GetOperationRequest) return object; - }; + var message = new $root.google.longrunning.GetOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Converts this NamePart to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - * @returns {Object.} JSON object - */ - NamePart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.GetOperationRequest} message GetOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOperationRequest.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; + }; - /** - * Gets the default type url for NamePart - * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; - }; + /** + * Converts this GetOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.GetOperationRequest + * @instance + * @returns {Object.} JSON object + */ + GetOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return NamePart; - })(); + /** + * Gets the default type url for GetOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.GetOperationRequest"; + }; - return UninterpretedOption; + return GetOperationRequest; })(); - protobuf.SourceCodeInfo = (function() { + longrunning.ListOperationsRequest = (function() { /** - * Properties of a SourceCodeInfo. - * @memberof google.protobuf - * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location + * Properties of a ListOperationsRequest. + * @memberof google.longrunning + * @interface IListOperationsRequest + * @property {string|null} [name] ListOperationsRequest name + * @property {string|null} [filter] ListOperationsRequest filter + * @property {number|null} [pageSize] ListOperationsRequest pageSize + * @property {string|null} [pageToken] ListOperationsRequest pageToken */ /** - * Constructs a new SourceCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a SourceCodeInfo. - * @implements ISourceCodeInfo + * Constructs a new ListOperationsRequest. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsRequest. + * @implements IListOperationsRequest * @constructor - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set */ - function SourceCodeInfo(properties) { - this.location = []; + function ListOperationsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18987,78 +23773,117 @@ } /** - * SourceCodeInfo location. - * @member {Array.} location - * @memberof google.protobuf.SourceCodeInfo + * ListOperationsRequest name. + * @member {string} name + * @memberof google.longrunning.ListOperationsRequest * @instance */ - SourceCodeInfo.prototype.location = $util.emptyArray; + ListOperationsRequest.prototype.name = ""; /** - * Creates a new SourceCodeInfo instance using the specified properties. + * ListOperationsRequest filter. + * @member {string} filter + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.filter = ""; + + /** + * ListOperationsRequest pageSize. + * @member {number} pageSize + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageSize = 0; + + /** + * ListOperationsRequest pageToken. + * @member {string} pageToken + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. * @function create - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.longrunning.ListOperationsRequest * @static - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance */ - SourceCodeInfo.create = function create(properties) { - return new SourceCodeInfo(properties); + ListOperationsRequest.create = function create(properties) { + return new ListOperationsRequest(properties); }; /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. * @function encode - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.longrunning.ListOperationsRequest * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encode = function encode(message, writer) { + ListOperationsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.location != null && message.location.length) - for (var i = 0; i < message.location.length; ++i) - $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + 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.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); return writer; }; /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.longrunning.ListOperationsRequest * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. + * Decodes a ListOperationsRequest message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.longrunning.ListOperationsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceCodeInfo.decode = function decode(reader, length) { + ListOperationsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 4: { + message.name = reader.string(); + break; + } case 1: { - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + message.filter = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); break; } default: @@ -19070,502 +23895,395 @@ }; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.longrunning.ListOperationsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SourceCodeInfo message. + * Verifies a ListOperationsRequest message. * @function verify - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.longrunning.ListOperationsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SourceCodeInfo.verify = function verify(message) { + ListOperationsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) { - if (!Array.isArray(message.location)) - return "location: array expected"; - for (var i = 0; i < message.location.length; ++i) { - var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); - if (error) - return "location." + error; - } - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: 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"; return null; }; /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.longrunning.ListOperationsRequest * @static * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest */ - SourceCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo) + ListOperationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsRequest) return object; - var message = new $root.google.protobuf.SourceCodeInfo(); - if (object.location) { - if (!Array.isArray(object.location)) - throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); - message.location = []; - for (var i = 0; i < object.location.length; ++i) { - if (typeof object.location[i] !== "object") - throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); - message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); - } - } + var message = new $root.google.longrunning.ListOperationsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.longrunning.ListOperationsRequest * @static - * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SourceCodeInfo.toObject = function toObject(message, options) { + ListOperationsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.location = []; - if (message.location && message.location.length) { - object.location = []; - for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + if (options.defaults) { + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this SourceCodeInfo to JSON. + * Converts this ListOperationsRequest to JSON. * @function toJSON - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.longrunning.ListOperationsRequest * @instance * @returns {Object.} JSON object */ - SourceCodeInfo.prototype.toJSON = function toJSON() { + ListOperationsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SourceCodeInfo + * Gets the default type url for ListOperationsRequest * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.longrunning.ListOperationsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + return typeUrlPrefix + "/google.longrunning.ListOperationsRequest"; }; - SourceCodeInfo.Location = (function() { - - /** - * Properties of a Location. - * @memberof google.protobuf.SourceCodeInfo - * @interface ILocation - * @property {Array.|null} [path] Location path - * @property {Array.|null} [span] Location span - * @property {string|null} [leadingComments] Location leadingComments - * @property {string|null} [trailingComments] Location trailingComments - * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments - */ - - /** - * Constructs a new Location. - * @memberof google.protobuf.SourceCodeInfo - * @classdesc Represents a Location. - * @implements ILocation - * @constructor - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - */ - function Location(properties) { - this.path = []; - this.span = []; - this.leadingDetachedComments = []; - 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]]; - } - - /** - * Location path. - * @member {Array.} path - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.path = $util.emptyArray; - - /** - * Location span. - * @member {Array.} span - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.span = $util.emptyArray; - - /** - * Location leadingComments. - * @member {string} leadingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingComments = ""; - - /** - * Location trailingComments. - * @member {string} trailingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.trailingComments = ""; - - /** - * Location leadingDetachedComments. - * @member {Array.} leadingDetachedComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingDetachedComments = $util.emptyArray; - - /** - * Creates a new Location instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo.Location} Location instance - */ - Location.create = function create(properties) { - return new Location(properties); - }; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.span != null && message.span.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.span.length; ++i) - writer.int32(message.span[i]); - writer.ldelim(); - } - if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); - if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); - if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); - return writer; - }; + return ListOperationsRequest; + })(); - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + longrunning.ListOperationsResponse = (function() { - /** - * Decodes a Location message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - } - case 3: { - message.leadingComments = reader.string(); - break; - } - case 4: { - message.trailingComments = reader.string(); - break; - } - case 6: { - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); + /** + * Properties of a ListOperationsResponse. + * @memberof google.longrunning + * @interface IListOperationsResponse + * @property {Array.|null} [operations] ListOperationsResponse operations + * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken + */ + + /** + * Constructs a new ListOperationsResponse. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsResponse. + * @implements IListOperationsResponse + * @constructor + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + */ + function ListOperationsResponse(properties) { + this.operations = []; + 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]]; + } + + /** + * ListOperationsResponse operations. + * @member {Array.} operations + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.operations = $util.emptyArray; + + /** + * ListOperationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance + */ + ListOperationsResponse.create = function create(properties) { + return new ListOperationsResponse(properties); + }; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operations != null && message.operations.length) + for (var i = 0; i < message.operations.length; ++i) + $root.google.longrunning.Operation.encode(message.operations[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 ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a Location message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Location.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.span != null && message.hasOwnProperty("span")) { - if (!Array.isArray(message.span)) - return "span: array expected"; - for (var i = 0; i < message.span.length; ++i) - if (!$util.isInteger(message.span[i])) - return "span: integer[] expected"; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - if (!$util.isString(message.leadingComments)) - return "leadingComments: string expected"; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - if (!$util.isString(message.trailingComments)) - return "trailingComments: string expected"; - if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { - if (!Array.isArray(message.leadingDetachedComments)) - return "leadingDetachedComments: array expected"; - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - if (!$util.isString(message.leadingDetachedComments[i])) - return "leadingDetachedComments: string[] expected"; - } - return null; - }; + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo.Location} Location - */ - Location.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) - return object; - var message = new $root.google.protobuf.SourceCodeInfo.Location(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.span) { - if (!Array.isArray(object.span)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); - message.span = []; - for (var i = 0; i < object.span.length; ++i) - message.span[i] = object.span[i] | 0; - } - if (object.leadingComments != null) - message.leadingComments = String(object.leadingComments); - if (object.trailingComments != null) - message.trailingComments = String(object.trailingComments); - if (object.leadingDetachedComments) { - if (!Array.isArray(object.leadingDetachedComments)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); - message.leadingDetachedComments = []; - for (var i = 0; i < object.leadingDetachedComments.length; ++i) - message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + /** + * Verifies a ListOperationsResponse message. + * @function verify + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operations != null && message.hasOwnProperty("operations")) { + if (!Array.isArray(message.operations)) + return "operations: array expected"; + for (var i = 0; i < message.operations.length; ++i) { + var error = $root.google.longrunning.Operation.verify(message.operations[i]); + if (error) + return "operations." + error; } - return message; - }; + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.Location} message Location - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Location.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.path = []; - object.span = []; - object.leadingDetachedComments = []; - } - if (options.defaults) { - object.leadingComments = ""; - object.trailingComments = ""; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.span && message.span.length) { - object.span = []; - for (var j = 0; j < message.span.length; ++j) - object.span[j] = message.span[j]; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - object.leadingComments = message.leadingComments; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - object.trailingComments = message.trailingComments; - if (message.leadingDetachedComments && message.leadingDetachedComments.length) { - object.leadingDetachedComments = []; - for (var j = 0; j < message.leadingDetachedComments.length; ++j) - object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; - } + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + */ + ListOperationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsResponse) return object; - }; - - /** - * Converts this Location to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - * @returns {Object.} JSON object - */ - Location.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Location - * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + var message = new $root.google.longrunning.ListOperationsResponse(); + if (object.operations) { + if (!Array.isArray(object.operations)) + throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); + message.operations = []; + for (var i = 0; i < object.operations.length; ++i) { + if (typeof object.operations[i] !== "object") + throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); + message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]); } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; - }; + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - return Location; - })(); + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.operations = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.operations && message.operations.length) { + object.operations = []; + for (var j = 0; j < message.operations.length; ++j) + object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - return SourceCodeInfo; + /** + * Converts this ListOperationsResponse to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOperationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOperationsResponse + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; + }; + + return ListOperationsResponse; })(); - protobuf.GeneratedCodeInfo = (function() { + longrunning.CancelOperationRequest = (function() { /** - * Properties of a GeneratedCodeInfo. - * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + * Properties of a CancelOperationRequest. + * @memberof google.longrunning + * @interface ICancelOperationRequest + * @property {string|null} [name] CancelOperationRequest name */ /** - * Constructs a new GeneratedCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a GeneratedCodeInfo. - * @implements IGeneratedCodeInfo + * Constructs a new CancelOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a CancelOperationRequest. + * @implements ICancelOperationRequest * @constructor - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set */ - function GeneratedCodeInfo(properties) { - this.annotation = []; + function CancelOperationRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19573,78 +24291,75 @@ } /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo + * CancelOperationRequest name. + * @member {string} name + * @memberof google.longrunning.CancelOperationRequest * @instance */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + CancelOperationRequest.prototype.name = ""; /** - * Creates a new GeneratedCodeInfo instance using the specified properties. + * Creates a new CancelOperationRequest instance using the specified properties. * @function create - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.longrunning.CancelOperationRequest * @static - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance */ - GeneratedCodeInfo.create = function create(properties) { - return new GeneratedCodeInfo(properties); + CancelOperationRequest.create = function create(properties) { + return new CancelOperationRequest(properties); }; /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. * @function encode - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.longrunning.CancelOperationRequest * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GeneratedCodeInfo.encode = function encode(message, writer) { + CancelOperationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.annotation != null && message.annotation.length) - for (var i = 0; i < message.annotation.length; ++i) - $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.longrunning.CancelOperationRequest * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * Decodes a CancelOperationRequest message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.longrunning.CancelOperationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GeneratedCodeInfo.decode = function decode(reader, length) { + CancelOperationRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + message.name = reader.string(); break; } default: @@ -19656,501 +24371,799 @@ }; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.longrunning.CancelOperationRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GeneratedCodeInfo message. + * Verifies a CancelOperationRequest message. * @function verify - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.longrunning.CancelOperationRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GeneratedCodeInfo.verify = function verify(message) { + CancelOperationRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.annotation != null && message.hasOwnProperty("annotation")) { - if (!Array.isArray(message.annotation)) - return "annotation: array expected"; - for (var i = 0; i < message.annotation.length; ++i) { - var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); - if (error) - return "annotation." + error; - } - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.longrunning.CancelOperationRequest * @static * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest */ - GeneratedCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + CancelOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.CancelOperationRequest) return object; - var message = new $root.google.protobuf.GeneratedCodeInfo(); - if (object.annotation) { - if (!Array.isArray(object.annotation)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); - message.annotation = []; - for (var i = 0; i < object.annotation.length; ++i) { - if (typeof object.annotation[i] !== "object") - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); - message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + var message = new $root.google.longrunning.CancelOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelOperationRequest.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 CancelOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.CancelOperationRequest + * @instance + * @returns {Object.} JSON object + */ + CancelOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CancelOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; + }; + + return CancelOperationRequest; + })(); + + longrunning.DeleteOperationRequest = (function() { + + /** + * Properties of a DeleteOperationRequest. + * @memberof google.longrunning + * @interface IDeleteOperationRequest + * @property {string|null} [name] DeleteOperationRequest name + */ + + /** + * Constructs a new DeleteOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a DeleteOperationRequest. + * @implements IDeleteOperationRequest + * @constructor + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + */ + function DeleteOperationRequest(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]]; + } + + /** + * DeleteOperationRequest name. + * @member {string} name + * @memberof google.longrunning.DeleteOperationRequest + * @instance + */ + DeleteOperationRequest.prototype.name = ""; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance + */ + DeleteOperationRequest.create = function create(properties) { + return new DeleteOperationRequest(properties); + }; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.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 DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; } } return message; }; /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteOperationRequest message. + * @function verify + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteOperationRequest.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 DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + */ + DeleteOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.DeleteOperationRequest) + return object; + var message = new $root.google.longrunning.DeleteOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.longrunning.DeleteOperationRequest * @static - * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GeneratedCodeInfo.toObject = function toObject(message, options) { + DeleteOperationRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.annotation = []; - if (message.annotation && message.annotation.length) { - object.annotation = []; - for (var j = 0; j < message.annotation.length; ++j) - object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); - } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this GeneratedCodeInfo to JSON. + * Converts this DeleteOperationRequest to JSON. * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.longrunning.DeleteOperationRequest * @instance * @returns {Object.} JSON object */ - GeneratedCodeInfo.prototype.toJSON = function toJSON() { + DeleteOperationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GeneratedCodeInfo + * Gets the default type url for DeleteOperationRequest * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.longrunning.DeleteOperationRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; }; - GeneratedCodeInfo.Annotation = (function() { - - /** - * Properties of an Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @interface IAnnotation - * @property {Array.|null} [path] Annotation path - * @property {string|null} [sourceFile] Annotation sourceFile - * @property {number|null} [begin] Annotation begin - * @property {number|null} [end] Annotation end - * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic - */ - - /** - * Constructs a new Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @classdesc Represents an Annotation. - * @implements IAnnotation - * @constructor - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - */ - function Annotation(properties) { - this.path = []; - 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]]; - } - - /** - * Annotation path. - * @member {Array.} path - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.path = $util.emptyArray; - - /** - * Annotation sourceFile. - * @member {string} sourceFile - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.sourceFile = ""; + return DeleteOperationRequest; + })(); - /** - * Annotation begin. - * @member {number} begin - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.begin = 0; + longrunning.WaitOperationRequest = (function() { - /** - * Annotation end. - * @member {number} end - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.end = 0; + /** + * Properties of a WaitOperationRequest. + * @memberof google.longrunning + * @interface IWaitOperationRequest + * @property {string|null} [name] WaitOperationRequest name + * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout + */ - /** - * Annotation semantic. - * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.semantic = 0; + /** + * Constructs a new WaitOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a WaitOperationRequest. + * @implements IWaitOperationRequest + * @constructor + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + */ + function WaitOperationRequest(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]]; + } - /** - * Creates a new Annotation instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance - */ - Annotation.create = function create(properties) { - return new Annotation(properties); - }; + /** + * WaitOperationRequest name. + * @member {string} name + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.name = ""; - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); - if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); - if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); - return writer; - }; + /** + * WaitOperationRequest timeout. + * @member {google.protobuf.IDuration|null|undefined} timeout + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.timeout = null; - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance + */ + WaitOperationRequest.create = function create(properties) { + return new WaitOperationRequest(properties); + }; - /** - * Decodes an Annotation message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - message.sourceFile = reader.string(); - break; - } - case 3: { - message.begin = reader.int32(); - break; - } - case 4: { - message.end = reader.int32(); - break; - } - case 5: { - message.semantic = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.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.timeout != null && Object.hasOwnProperty.call(message, "timeout")) + $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies an Annotation message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Annotation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - if (!$util.isString(message.sourceFile)) - return "sourceFile: string expected"; - if (message.begin != null && message.hasOwnProperty("begin")) - if (!$util.isInteger(message.begin)) - return "begin: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.semantic != null && message.hasOwnProperty("semantic")) - switch (message.semantic) { - default: - return "semantic: enum value expected"; - case 0: - case 1: - case 2: + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); break; } - return null; - }; - - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - */ - Annotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.sourceFile != null) - message.sourceFile = String(object.sourceFile); - if (object.begin != null) - message.begin = object.begin | 0; - if (object.end != null) - message.end = object.end | 0; - switch (object.semantic) { - default: - if (typeof object.semantic === "number") { - message.semantic = object.semantic; + case 2: { + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } - break; - case "NONE": - case 0: - message.semantic = 0; - break; - case "SET": - case 1: - message.semantic = 1; - break; - case "ALIAS": - case 2: - message.semantic = 2; + default: + reader.skipType(tag & 7); break; } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Annotation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.path = []; - if (options.defaults) { - object.sourceFile = ""; - object.begin = 0; - object.end = 0; - object.semantic = options.enums === String ? "NONE" : 0; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WaitOperationRequest message. + * @function verify + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WaitOperationRequest.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.timeout != null && message.hasOwnProperty("timeout")) { + var error = $root.google.protobuf.Duration.verify(message.timeout); + if (error) + return "timeout." + error; + } + return null; + }; + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + */ + WaitOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.WaitOperationRequest) + return object; + var message = new $root.google.longrunning.WaitOperationRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.timeout != null) { + if (typeof object.timeout !== "object") + throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); + message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); + } + return message; + }; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WaitOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.timeout = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.timeout != null && message.hasOwnProperty("timeout")) + object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); + return object; + }; + + /** + * Converts this WaitOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.WaitOperationRequest + * @instance + * @returns {Object.} JSON object + */ + WaitOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WaitOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; + }; + + return WaitOperationRequest; + })(); + + longrunning.OperationInfo = (function() { + + /** + * Properties of an OperationInfo. + * @memberof google.longrunning + * @interface IOperationInfo + * @property {string|null} [responseType] OperationInfo responseType + * @property {string|null} [metadataType] OperationInfo metadataType + */ + + /** + * Constructs a new OperationInfo. + * @memberof google.longrunning + * @classdesc Represents an OperationInfo. + * @implements IOperationInfo + * @constructor + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + */ + function OperationInfo(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]]; + } + + /** + * OperationInfo responseType. + * @member {string} responseType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.responseType = ""; + + /** + * OperationInfo metadataType. + * @member {string} metadataType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.metadataType = ""; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @function create + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + * @returns {google.longrunning.OperationInfo} OperationInfo instance + */ + OperationInfo.create = function create(properties) { + return new OperationInfo(properties); + }; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encode + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); + if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); + return writer; + }; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.responseType = reader.string(); + break; + } + case 2: { + message.metadataType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - object.sourceFile = message.sourceFile; - if (message.begin != null && message.hasOwnProperty("begin")) - object.begin = message.begin; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.semantic != null && message.hasOwnProperty("semantic")) - object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; - return object; - }; + } + return message; + }; - /** - * Converts this Annotation to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - * @returns {Object.} JSON object - */ - Annotation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Gets the default type url for Annotation - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; - }; + /** + * Verifies an OperationInfo message. + * @function verify + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.responseType != null && message.hasOwnProperty("responseType")) + if (!$util.isString(message.responseType)) + return "responseType: string expected"; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + if (!$util.isString(message.metadataType)) + return "metadataType: string expected"; + return null; + }; - /** - * Semantic enum. - * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic - * @enum {number} - * @property {number} NONE=0 NONE value - * @property {number} SET=1 SET value - * @property {number} ALIAS=2 ALIAS value - */ - Annotation.Semantic = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NONE"] = 0; - values[valuesById[1] = "SET"] = 1; - values[valuesById[2] = "ALIAS"] = 2; - return values; - })(); + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.OperationInfo} OperationInfo + */ + OperationInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.OperationInfo) + return object; + var message = new $root.google.longrunning.OperationInfo(); + if (object.responseType != null) + message.responseType = String(object.responseType); + if (object.metadataType != null) + message.metadataType = String(object.metadataType); + return message; + }; - return Annotation; - })(); + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.OperationInfo} message OperationInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.responseType = ""; + object.metadataType = ""; + } + if (message.responseType != null && message.hasOwnProperty("responseType")) + object.responseType = message.responseType; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + object.metadataType = message.metadataType; + return object; + }; - return GeneratedCodeInfo; + /** + * Converts this OperationInfo to JSON. + * @function toJSON + * @memberof google.longrunning.OperationInfo + * @instance + * @returns {Object.} JSON object + */ + OperationInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperationInfo + * @function getTypeUrl + * @memberof google.longrunning.OperationInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.OperationInfo"; + }; + + return OperationInfo; })(); - protobuf.Timestamp = (function() { + return longrunning; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos + * 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 Timestamp. - * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @param {google.rpc.IStatus=} [properties] Properties to set */ - function Timestamp(properties) { + function Status(properties) { + this.details = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20158,89 +25171,106 @@ } /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp + * Status code. + * @member {number} code + * @memberof google.rpc.Status * @instance */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Status.prototype.code = 0; /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp + * Status message. + * @member {string} message + * @memberof google.rpc.Status * @instance */ - Timestamp.prototype.nanos = 0; + Status.prototype.message = ""; /** - * Creates a new Timestamp instance using the specified properties. + * 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.protobuf.Timestamp + * @memberof google.rpc.Status * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); + Status.create = function create(properties) { + return new Status(properties); }; /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. * @function encode - * @memberof google.protobuf.Timestamp + * @memberof google.rpc.Status * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {google.rpc.IStatus} message Status message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Timestamp.encode = function encode(message, writer) { + Status.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + 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 Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Timestamp + * @memberof google.rpc.Status * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {google.rpc.IStatus} message Status message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + Status.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Timestamp message from the specified reader or buffer. + * Decodes a Status message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Timestamp + * @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.protobuf.Timestamp} Timestamp + * @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 */ - Timestamp.decode = function decode(reader, length) { + Status.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.seconds = reader.int64(); + message.code = reader.int32(); break; } case 2: { - message.nanos = reader.int32(); + 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: @@ -20252,128 +25282,140 @@ }; /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * Decodes a Status message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Timestamp + * @memberof google.rpc.Status * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp + * @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 */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { + Status.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Timestamp message. + * Verifies a Status message. * @function verify - * @memberof google.protobuf.Timestamp + * @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 */ - Timestamp.verify = function verify(message) { + Status.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer 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 Timestamp message from a plain object. Also converts values to their respective internal types. + * Creates a Status message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Timestamp + * @memberof google.rpc.Status * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.rpc.Status} Status */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) return object; - var message = new $root.google.protobuf.Timestamp(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; + 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 Timestamp message. Also converts values to other types if specified. + * Creates a plain object from a Status message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Timestamp + * @memberof google.rpc.Status * @static - * @param {google.protobuf.Timestamp} message Timestamp + * @param {google.rpc.Status} message Status * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Timestamp.toObject = function toObject(message, options) { + Status.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.details = []; if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; + 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); } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; return object; }; /** - * Converts this Timestamp to JSON. + * Converts this Status to JSON. * @function toJSON - * @memberof google.protobuf.Timestamp + * @memberof google.rpc.Status * @instance * @returns {Object.} JSON object */ - Timestamp.prototype.toJSON = function toJSON() { + Status.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Timestamp + * Gets the default type url for Status * @function getTypeUrl - * @memberof google.protobuf.Timestamp + * @memberof google.rpc.Status * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.Timestamp"; + return typeUrlPrefix + "/google.rpc.Status"; }; - return Timestamp; + return Status; })(); - return protobuf; + return rpc; })(); return google; diff --git a/packages/google-cloud-webrisk/protos/protos.json b/packages/google-cloud-webrisk/protos/protos.json index 5eb6d15d773..f169eac5b27 100644 --- a/packages/google-cloud-webrisk/protos/protos.json +++ b/packages/google-cloud-webrisk/protos/protos.json @@ -97,6 +97,30 @@ "(google.api.method_signature)": "parent,submission" } ] + }, + "SubmitUri": { + "requestType": "SubmitUriRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*}/uris:submit", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "Submission", + "(google.longrunning.operation_info).metadata_type": "SubmitUriMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*}/uris:submit", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Submission", + "metadata_type": "SubmitUriMetadata" + } + } + ] } } }, @@ -366,6 +390,118 @@ "options": { "(google.api.field_behavior)": "REQUIRED" } + }, + "threatTypes": { + "rule": "repeated", + "type": "ThreatType", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ThreatInfo": { + "fields": { + "abuseType": { + "type": "AbuseType", + "id": 1 + }, + "threatConfidence": { + "type": "Confidence", + "id": 2 + }, + "threatJustification": { + "type": "ThreatJustification", + "id": 3 + } + }, + "nested": { + "AbuseType": { + "values": { + "ABUSE_TYPE_UNSPECIFIED": 0, + "MALWARE": 1, + "SOCIAL_ENGINEERING": 2, + "UNWANTED_SOFTWARE": 3 + } + }, + "Confidence": { + "oneofs": { + "value": { + "oneof": [ + "score", + "level" + ] + } + }, + "fields": { + "score": { + "type": "float", + "id": 1 + }, + "level": { + "type": "ConfidenceLevel", + "id": 2 + } + }, + "nested": { + "ConfidenceLevel": { + "values": { + "CONFIDENCE_LEVEL_UNSPECIFIED": 0, + "LOW": 1, + "MEDIUM": 2, + "HIGH": 3 + } + } + } + }, + "ThreatJustification": { + "fields": { + "labels": { + "rule": "repeated", + "type": "JustificationLabel", + "id": 1 + }, + "comments": { + "rule": "repeated", + "type": "string", + "id": 2 + } + }, + "nested": { + "JustificationLabel": { + "values": { + "JUSTIFICATION_LABEL_UNSPECIFIED": 0, + "MANUAL_VERIFICATION": 1, + "USER_REPORT": 2, + "AUTOMATED_REPORT": 3 + } + } + } + } + } + }, + "ThreatDiscovery": { + "fields": { + "platform": { + "type": "Platform", + "id": 1 + }, + "regionCodes": { + "rule": "repeated", + "type": "string", + "id": 2 + } + }, + "nested": { + "Platform": { + "values": { + "PLATFORM_UNSPECIFIED": 0, + "ANDROID": 1, + "IOS": 2, + "MACOS": 3, + "WINDOWS": 4 + } } } }, @@ -387,6 +523,61 @@ } } } + }, + "SubmitUriRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + } + }, + "submission": { + "type": "Submission", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "threatInfo": { + "type": "ThreatInfo", + "id": 3 + }, + "threatDiscovery": { + "type": "ThreatDiscovery", + "id": 4 + } + } + }, + "SubmitUriMetadata": { + "fields": { + "state": { + "type": "State", + "id": 1 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "RUNNING": 1, + "SUCCEEDED": 2, + "CANCELLED": 3, + "FAILED": 4, + "CLOSED": 5 + } + } + } } } }, @@ -1868,6 +2059,33 @@ } } }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, "Timestamp": { "fields": { "seconds": { @@ -1881,6 +2099,251 @@ } } } + }, + "longrunning": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.LongRunning", + "go_package": "google.golang.org/genproto/googleapis/longrunning;longrunning", + "java_multiple_files": true, + "java_outer_classname": "OperationsProto", + "java_package": "com.google.longrunning", + "php_namespace": "Google\\LongRunning" + }, + "nested": { + "operationInfo": { + "type": "google.longrunning.OperationInfo", + "id": 1049, + "extend": "google.protobuf.MethodOptions" + }, + "Operations": { + "options": { + "(google.api.default_host)": "longrunning.googleapis.com" + }, + "methods": { + "ListOperations": { + "requestType": "ListOperationsRequest", + "responseType": "ListOperationsResponse", + "options": { + "(google.api.http).get": "/v1/{name=operations}", + "(google.api.method_signature)": "name,filter" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations}" + } + }, + { + "(google.api.method_signature)": "name,filter" + } + ] + }, + "GetOperation": { + "requestType": "GetOperationRequest", + "responseType": "Operation", + "options": { + "(google.api.http).get": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteOperation": { + "requestType": "DeleteOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CancelOperation": { + "requestType": "CancelOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{name=operations/**}:cancel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=operations/**}:cancel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "WaitOperation": { + "requestType": "WaitOperationRequest", + "responseType": "Operation" + } + } + }, + "Operation": { + "oneofs": { + "result": { + "oneof": [ + "error", + "response" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "metadata": { + "type": "google.protobuf.Any", + "id": 2 + }, + "done": { + "type": "bool", + "id": 3 + }, + "error": { + "type": "google.rpc.Status", + "id": 4 + }, + "response": { + "type": "google.protobuf.Any", + "id": 5 + } + } + }, + "GetOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ListOperationsRequest": { + "fields": { + "name": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListOperationsResponse": { + "fields": { + "operations": { + "rule": "repeated", + "type": "Operation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CancelOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "DeleteOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "WaitOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "timeout": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + }, + "OperationInfo": { + "fields": { + "responseType": { + "type": "string", + "id": 1 + }, + "metadataType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "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 + } + } + } + } } } } diff --git a/packages/google-cloud-webrisk/samples/README.md b/packages/google-cloud-webrisk/samples/README.md index 191df5f6a1d..d0c9d338a68 100644 --- a/packages/google-cloud-webrisk/samples/README.md +++ b/packages/google-cloud-webrisk/samples/README.md @@ -16,11 +16,11 @@ * [Web_risk_service.create_submission](#web_risk_service.create_submission) * [Web_risk_service.search_hashes](#web_risk_service.search_hashes) * [Web_risk_service.search_uris](#web_risk_service.search_uris) + * [Web_risk_service.submit_uri](#web_risk_service.submit_uri) * [Web_risk_service_v1_beta1.compute_threat_list_diff](#web_risk_service_v1_beta1.compute_threat_list_diff) * [Web_risk_service_v1_beta1.search_hashes](#web_risk_service_v1_beta1.search_hashes) * [Web_risk_service_v1_beta1.search_uris](#web_risk_service_v1_beta1.search_uris) * [Quickstart](#quickstart) - * [Quickstart.test](#quickstart.test) ## Before you begin @@ -105,6 +105,23 @@ __Usage:__ +### Web_risk_service.submit_uri + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.submit_uri.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.submit_uri.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.submit_uri.js` + + +----- + + + + ### Web_risk_service_v1_beta1.compute_threat_list_diff View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-webrisk/samples/generated/v1beta1/web_risk_service_v1_beta1.compute_threat_list_diff.js). @@ -168,23 +185,6 @@ __Usage:__ `node packages/google-cloud-webrisk/samples/quickstart.js` ------ - - - - -### Quickstart.test - -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-webrisk/samples/test/quickstart.test.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-webrisk/samples/test/quickstart.test.js,samples/README.md) - -__Usage:__ - - -`node packages/google-cloud-webrisk/samples/test/quickstart.test.js` - - diff --git a/packages/google-cloud-webrisk/samples/generated/v1/snippet_metadata.google.cloud.webrisk.v1.json b/packages/google-cloud-webrisk/samples/generated/v1/snippet_metadata.google.cloud.webrisk.v1.json index e543c984c84..b7402f3269d 100644 --- a/packages/google-cloud-webrisk/samples/generated/v1/snippet_metadata.google.cloud.webrisk.v1.json +++ b/packages/google-cloud-webrisk/samples/generated/v1/snippet_metadata.google.cloud.webrisk.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-webrisk", - "version": "3.2.0", + "version": "3.3.0", "language": "TYPESCRIPT", "apis": [ { @@ -70,7 +70,7 @@ "segments": [ { "start": 25, - "end": 58, + "end": 59, "type": "FULL" } ], @@ -114,7 +114,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 61, "type": "FULL" } ], @@ -190,6 +190,58 @@ } } } + }, + { + "regionTag": "webrisk_v1_generated_WebRiskService_SubmitUri_async", + "title": "WebRiskService submitUri Sample", + "origin": "API_DEFINITION", + "description": " Submits a URI suspected of containing malicious content to be reviewed. Returns a google.longrunning.Operation which, once the review is complete, is updated with its result. You can use the [Pub/Sub API] (https://cloud.google.com/pubsub) to receive notifications for the returned Operation. If the result verifies the existence of malicious content, the site will be added to the [Google's Social Engineering lists] (https://support.google.com/webmasters/answer/6350487/) in order to protect users that could get exposed to this threat in the future. Only allowlisted projects can use this method during Early Access. Please reach out to Sales or your customer engineer to obtain access.", + "canonical": true, + "file": "web_risk_service.submit_uri.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SubmitUri", + "fullName": "google.cloud.webrisk.v1.WebRiskService.SubmitUri", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "submission", + "type": ".google.cloud.webrisk.v1.Submission" + }, + { + "name": "threat_info", + "type": ".google.cloud.webrisk.v1.ThreatInfo" + }, + { + "name": "threat_discovery", + "type": ".google.cloud.webrisk.v1.ThreatDiscovery" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "WebRiskServiceClient", + "fullName": "google.cloud.webrisk.v1.WebRiskServiceClient" + }, + "method": { + "shortName": "SubmitUri", + "fullName": "google.cloud.webrisk.v1.WebRiskService.SubmitUri", + "service": { + "shortName": "WebRiskService", + "fullName": "google.cloud.webrisk.v1.WebRiskService" + } + } + } } ] } \ No newline at end of file diff --git a/packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.compute_threat_list_diff.js b/packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.compute_threat_list_diff.js index eeecfc7868c..fb54257d13e 100644 --- a/packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.compute_threat_list_diff.js +++ b/packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.compute_threat_list_diff.js @@ -29,9 +29,9 @@ function main(threatType, constraints) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The threat list to update. Only a single ThreatType should be specified - * per request. If you want to handle multiple ThreatTypes, you must make one - * request per ThreatType. + * Required. The threat list to update. Only a single ThreatType should be + * specified per request. If you want to handle multiple ThreatTypes, you must + * make one request per ThreatType. */ // const threatType = {} /** diff --git a/packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.create_submission.js b/packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.create_submission.js index 685d97374c8..92b83b34b77 100644 --- a/packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.create_submission.js +++ b/packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.create_submission.js @@ -29,8 +29,8 @@ function main(parent, submission) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the project that is making the submission. This string is in - * the format "projects/{project_number}". + * Required. The name of the project that is making the submission. This + * string is in the format "projects/{project_number}". */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.search_hashes.js b/packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.search_hashes.js index 95b5449585d..a767c3b636a 100644 --- a/packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.search_hashes.js +++ b/packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.search_hashes.js @@ -36,7 +36,8 @@ function main(threatTypes) { */ // const hashPrefix = 'Buffer.from('string')' /** - * Required. The ThreatLists to search in. Multiple ThreatLists may be specified. + * Required. The ThreatLists to search in. Multiple ThreatLists may be + * specified. */ // const threatTypes = 1234 diff --git a/packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.search_uris.js b/packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.search_uris.js index 525a58774b2..b5e406b5515 100644 --- a/packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.search_uris.js +++ b/packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.search_uris.js @@ -33,7 +33,8 @@ function main(uri, threatTypes) { */ // const uri = 'abc123' /** - * Required. The ThreatLists to search in. Multiple ThreatLists may be specified. + * Required. The ThreatLists to search in. Multiple ThreatLists may be + * specified. */ // const threatTypes = 1234 diff --git a/packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.submit_uri.js b/packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.submit_uri.js new file mode 100644 index 00000000000..b1ed9459f4f --- /dev/null +++ b/packages/google-cloud-webrisk/samples/generated/v1/web_risk_service.submit_uri.js @@ -0,0 +1,76 @@ +// Copyright 2023 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, submission) { + // [START webrisk_v1_generated_WebRiskService_SubmitUri_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 project that is making the submission. This + * string is in the format "projects/{project_number}". + */ + // const parent = 'abc123' + /** + * Required. The submission that contains the URI to be scanned. + */ + // const submission = {} + /** + * Provides additional information about the submission. + */ + // const threatInfo = {} + /** + * Provides additional information about how the submission was discovered. + */ + // const threatDiscovery = {} + + // Imports the Webrisk library + const {WebRiskServiceClient} = require('@google-cloud/web-risk').v1; + + // Instantiates a client + const webriskClient = new WebRiskServiceClient(); + + async function callSubmitUri() { + // Construct request + const request = { + parent, + submission, + }; + + // Run request + const [operation] = await webriskClient.submitUri(request); + const [response] = await operation.promise(); + console.log(response); + } + + callSubmitUri(); + // [END webrisk_v1_generated_WebRiskService_SubmitUri_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-webrisk/samples/generated/v1beta1/snippet_metadata.google.cloud.webrisk.v1beta1.json b/packages/google-cloud-webrisk/samples/generated/v1beta1/snippet_metadata.google.cloud.webrisk.v1beta1.json index 2e1ce64a322..7343baf0843 100644 --- a/packages/google-cloud-webrisk/samples/generated/v1beta1/snippet_metadata.google.cloud.webrisk.v1beta1.json +++ b/packages/google-cloud-webrisk/samples/generated/v1beta1/snippet_metadata.google.cloud.webrisk.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-webrisk", - "version": "3.2.0", + "version": "3.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-webrisk/samples/package.json b/packages/google-cloud-webrisk/samples/package.json index 0057cf7ae0a..ae525500e8e 100644 --- a/packages/google-cloud-webrisk/samples/package.json +++ b/packages/google-cloud-webrisk/samples/package.json @@ -13,7 +13,7 @@ "test": "mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/web-risk": "^3.2.2" + "@google-cloud/web-risk": "^3.3.0" }, "devDependencies": { "chai": "^4.2.0", diff --git a/packages/google-cloud-webrisk/src/v1/gapic_metadata.json b/packages/google-cloud-webrisk/src/v1/gapic_metadata.json index 7934355cc4a..8b6c58413fd 100644 --- a/packages/google-cloud-webrisk/src/v1/gapic_metadata.json +++ b/packages/google-cloud-webrisk/src/v1/gapic_metadata.json @@ -29,6 +29,11 @@ "methods": [ "createSubmission" ] + }, + "SubmitUri": { + "methods": [ + "submitUri" + ] } } }, @@ -54,6 +59,11 @@ "methods": [ "createSubmission" ] + }, + "SubmitUri": { + "methods": [ + "submitUri" + ] } } } diff --git a/packages/google-cloud-webrisk/src/v1/web_risk_service_client.ts b/packages/google-cloud-webrisk/src/v1/web_risk_service_client.ts index b55320f4e58..2e5c72e6281 100644 --- a/packages/google-cloud-webrisk/src/v1/web_risk_service_client.ts +++ b/packages/google-cloud-webrisk/src/v1/web_risk_service_client.ts @@ -23,6 +23,8 @@ import type { CallOptions, Descriptors, ClientOptions, + GrpcClientOptions, + LROperation, } from 'google-gax'; import * as protos from '../../protos/protos'; @@ -59,6 +61,7 @@ export class WebRiskServiceClient { warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; webRiskServiceStub?: Promise<{[name: string]: Function}>; /** @@ -182,6 +185,54 @@ export class WebRiskServiceClient { ), }; + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }; + if (opts.fallback === 'rest') { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [ + { + selector: 'google.longrunning.Operations.CancelOperation', + post: '/v1/{name=projects/*/operations/*}:cancel', + body: '*', + }, + { + selector: 'google.longrunning.Operations.DeleteOperation', + delete: '/v1/{name=projects/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.GetOperation', + get: '/v1/{name=projects/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.ListOperations', + get: '/v1/{name=projects/*}/operations', + }, + ]; + } + this.operationsClient = this._gaxModule + .lro(lroOptions) + .operationsClient(opts); + const submitUriResponse = protoFilesRoot.lookup( + '.google.cloud.webrisk.v1.Submission' + ) as gax.protobuf.Type; + const submitUriMetadata = protoFilesRoot.lookup( + '.google.cloud.webrisk.v1.SubmitUriMetadata' + ) as gax.protobuf.Type; + + this.descriptors.longrunning = { + submitUri: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + submitUriResponse.decode.bind(submitUriResponse), + submitUriMetadata.decode.bind(submitUriMetadata) + ), + }; + // Put together the default options sent with requests. this._defaults = this._gaxGrpc.constructSettings( 'google.cloud.webrisk.v1.WebRiskService', @@ -236,6 +287,7 @@ export class WebRiskServiceClient { 'searchUris', 'searchHashes', 'createSubmission', + 'submitUri', ]; for (const methodName of webRiskServiceStubMethods) { const callPromise = this.webRiskServiceStub.then( @@ -252,7 +304,7 @@ export class WebRiskServiceClient { } ); - const descriptor = undefined; + const descriptor = this.descriptors.longrunning[methodName] || undefined; const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], @@ -330,9 +382,9 @@ export class WebRiskServiceClient { * @param {Object} request * The request object that will be sent. * @param {google.cloud.webrisk.v1.ThreatType} request.threatType - * Required. The threat list to update. Only a single ThreatType should be specified - * per request. If you want to handle multiple ThreatTypes, you must make one - * request per ThreatType. + * Required. The threat list to update. Only a single ThreatType should be + * specified per request. If you want to handle multiple ThreatTypes, you must + * make one request per ThreatType. * @param {Buffer} request.versionToken * The current version token of the client for the requested list (the * client version that was received from the last successful diff). @@ -433,7 +485,8 @@ export class WebRiskServiceClient { * @param {string} request.uri * Required. The URI to be checked for matches. * @param {number[]} request.threatTypes - * Required. The ThreatLists to search in. Multiple ThreatLists may be specified. + * Required. The ThreatLists to search in. Multiple ThreatLists may be + * specified. * @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. @@ -521,7 +574,8 @@ export class WebRiskServiceClient { * Note that if this parameter is provided by a URI, it must be encoded using * the web safe base64 variant (RFC 4648). * @param {number[]} request.threatTypes - * Required. The ThreatLists to search in. Multiple ThreatLists may be specified. + * Required. The ThreatLists to search in. Multiple ThreatLists may be + * specified. * @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. @@ -608,8 +662,8 @@ export class WebRiskServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The name of the project that is making the submission. This string is in - * the format "projects/{project_number}". + * Required. The name of the project that is making the submission. This + * string is in the format "projects/{project_number}". * @param {google.cloud.webrisk.v1.Submission} request.submission * Required. The submission that contains the content of the phishing report. * @param {object} [options] @@ -697,6 +751,335 @@ export class WebRiskServiceClient { return this.innerApiCalls.createSubmission(request, options, callback); } + /** + * Submits a URI suspected of containing malicious content to be reviewed. + * Returns a google.longrunning.Operation which, once the review is complete, + * is updated with its result. You can use the [Pub/Sub API] + * (https://cloud.google.com/pubsub) to receive notifications for the returned + * Operation. If the result verifies the existence of malicious content, the + * site will be added to the [Google's Social Engineering lists] + * (https://support.google.com/webmasters/answer/6350487/) in order to + * protect users that could get exposed to this threat in the future. Only + * allowlisted projects can use this method during Early Access. Please reach + * out to Sales or your customer engineer to obtain access. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the project that is making the submission. This + * string is in the format "projects/{project_number}". + * @param {google.cloud.webrisk.v1.Submission} request.submission + * Required. The submission that contains the URI to be scanned. + * @param {google.cloud.webrisk.v1.ThreatInfo} request.threatInfo + * Provides additional information about the submission. + * @param {google.cloud.webrisk.v1.ThreatDiscovery} request.threatDiscovery + * Provides additional information about how the submission was discovered. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/web_risk_service.submit_uri.js + * region_tag:webrisk_v1_generated_WebRiskService_SubmitUri_async + */ + submitUri( + request?: protos.google.cloud.webrisk.v1.ISubmitUriRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.webrisk.v1.ISubmission, + protos.google.cloud.webrisk.v1.ISubmitUriMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + submitUri( + request: protos.google.cloud.webrisk.v1.ISubmitUriRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.webrisk.v1.ISubmission, + protos.google.cloud.webrisk.v1.ISubmitUriMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + submitUri( + request: protos.google.cloud.webrisk.v1.ISubmitUriRequest, + callback: Callback< + LROperation< + protos.google.cloud.webrisk.v1.ISubmission, + protos.google.cloud.webrisk.v1.ISubmitUriMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + submitUri( + request?: protos.google.cloud.webrisk.v1.ISubmitUriRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.webrisk.v1.ISubmission, + protos.google.cloud.webrisk.v1.ISubmitUriMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.webrisk.v1.ISubmission, + protos.google.cloud.webrisk.v1.ISubmitUriMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.webrisk.v1.ISubmission, + protos.google.cloud.webrisk.v1.ISubmitUriMetadata + >, + 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(); + return this.innerApiCalls.submitUri(request, options, callback); + } + /** + * Check the status of the long running operation returned by `submitUri()`. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/web_risk_service.submit_uri.js + * region_tag:webrisk_v1_generated_WebRiskService_SubmitUri_async + */ + async checkSubmitUriProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.webrisk.v1.Submission, + protos.google.cloud.webrisk.v1.SubmitUriMetadata + > + > { + 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.submitUri, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.webrisk.v1.Submission, + protos.google.cloud.webrisk.v1.SubmitUriMetadata + >; + } + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + // -------------------- // -- Path templates -- // -------------------- @@ -735,6 +1118,7 @@ export class WebRiskServiceClient { return this.webRiskServiceStub.then(stub => { this._terminated = true; stub.close(); + this.operationsClient.close(); }); } return Promise.resolve(); diff --git a/packages/google-cloud-webrisk/src/v1/web_risk_service_client_config.json b/packages/google-cloud-webrisk/src/v1/web_risk_service_client_config.json index 74a1aebf167..dc341cc185b 100644 --- a/packages/google-cloud-webrisk/src/v1/web_risk_service_client_config.json +++ b/packages/google-cloud-webrisk/src/v1/web_risk_service_client_config.json @@ -39,6 +39,10 @@ "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" + }, + "SubmitUri": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" } } } diff --git a/packages/google-cloud-webrisk/test/gapic_web_risk_service_v1.ts b/packages/google-cloud-webrisk/test/gapic_web_risk_service_v1.ts index 5bfb75d7db3..4bdf0afadc7 100644 --- a/packages/google-cloud-webrisk/test/gapic_web_risk_service_v1.ts +++ b/packages/google-cloud-webrisk/test/gapic_web_risk_service_v1.ts @@ -23,7 +23,7 @@ import {SinonStub} from 'sinon'; import {describe, it} from 'mocha'; import * as webriskserviceModule from '../src'; -import {protobuf} from 'google-gax'; +import {protobuf, LROperation, operationsProtos} from 'google-gax'; // Dynamically loaded proto JSON is needed to get the type information // to fill in default values for request objects @@ -64,6 +64,61 @@ function stubSimpleCallWithCallback( : sinon.stub().callsArgWith(2, null, response); } +function stubLongRunningCall( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().rejects(callError) + : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().callsArgWith(2, callError) + : sinon.stub().callsArgWith(2, null, mockOperation); +} + +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.WebRiskServiceClient', () => { describe('Common methods', () => { it('has servicePath', () => { @@ -550,6 +605,501 @@ describe('v1.WebRiskServiceClient', () => { }); }); + describe('submitUri', () => { + it('invokes submitUri without error', async () => { + const client = new webriskserviceModule.v1.WebRiskServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.webrisk.v1.SubmitUriRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.webrisk.v1.SubmitUriRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.submitUri = stubLongRunningCall(expectedResponse); + const [operation] = await client.submitUri(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.submitUri as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.submitUri as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes submitUri without error using callback', async () => { + const client = new webriskserviceModule.v1.WebRiskServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.webrisk.v1.SubmitUriRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.webrisk.v1.SubmitUriRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.submitUri = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.submitUri( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.webrisk.v1.ISubmission, + protos.google.cloud.webrisk.v1.ISubmitUriMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.webrisk.v1.ISubmission, + protos.google.cloud.webrisk.v1.ISubmitUriMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.submitUri as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.submitUri as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes submitUri with call error', async () => { + const client = new webriskserviceModule.v1.WebRiskServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.webrisk.v1.SubmitUriRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.webrisk.v1.SubmitUriRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.submitUri = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.submitUri(request), expectedError); + const actualRequest = ( + client.innerApiCalls.submitUri as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.submitUri as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes submitUri with LRO error', async () => { + const client = new webriskserviceModule.v1.WebRiskServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.webrisk.v1.SubmitUriRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.webrisk.v1.SubmitUriRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.submitUri = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.submitUri(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.submitUri as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.submitUri as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkSubmitUriProgress without error', async () => { + const client = new webriskserviceModule.v1.WebRiskServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkSubmitUriProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkSubmitUriProgress with error', async () => { + const client = new webriskserviceModule.v1.WebRiskServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkSubmitUriProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new webriskserviceModule.v1.WebRiskServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new webriskserviceModule.v1.WebRiskServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new webriskserviceModule.v1.WebRiskServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.getOperation(request); + }, expectedError); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new webriskserviceModule.v1.WebRiskServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new webriskserviceModule.v1.WebRiskServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new webriskserviceModule.v1.WebRiskServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.cancelOperation(request); + }, expectedError); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new webriskserviceModule.v1.WebRiskServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new webriskserviceModule.v1.WebRiskServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new webriskserviceModule.v1.WebRiskServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.deleteOperation(request); + }, expectedError); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new webriskserviceModule.v1.WebRiskServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new webriskserviceModule.v1.WebRiskServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); + describe('Path templates', () => { describe('project', () => { const fakePath = '/rendered/path/project'; diff --git a/packages/google-cloud-websecurityscanner/package.json b/packages/google-cloud-websecurityscanner/package.json index bf53df84557..cd0f2716b33 100644 --- a/packages/google-cloud-websecurityscanner/package.json +++ b/packages/google-cloud-websecurityscanner/package.json @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-websecurityscanner" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-workflows-executions/package.json b/packages/google-cloud-workflows-executions/package.json index e4602d68d36..1bd51918bed 100644 --- a/packages/google-cloud-workflows-executions/package.json +++ b/packages/google-cloud-workflows-executions/package.json @@ -30,19 +30,19 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", "docs-test": "linkinator docs", "fix": "gts fix", "lint": "gts check", - "prelint": "cd samples; npm link ../; npm i", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "test": "c8 mocha build/test", - "pretest": "npm run prepare" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -57,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -70,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-workflows-executions" -} - +} \ No newline at end of file diff --git a/packages/google-cloud-workstations/CHANGELOG.md b/packages/google-cloud-workstations/CHANGELOG.md index c4735639fc6..36f08063558 100644 --- a/packages/google-cloud-workstations/CHANGELOG.md +++ b/packages/google-cloud-workstations/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.2.0](https://github.com/googleapis/google-cloud-node/compare/workstations-v0.1.1...workstations-v0.2.0) (2023-05-20) + + +### Features + +* [workstations] add output field for the control plane IP address ([#4263](https://github.com/googleapis/google-cloud-node/issues/4263)) ([ee6e699](https://github.com/googleapis/google-cloud-node/commit/ee6e6996c8d08786076482508470380e4b2b7465)) + ## [0.1.1](https://github.com/googleapis/google-cloud-node/compare/workstations-v0.1.0...workstations-v0.1.1) (2023-04-13) diff --git a/packages/google-cloud-workstations/README.md b/packages/google-cloud-workstations/README.md index 9348b0a6173..9ca52e2d0d7 100644 --- a/packages/google-cloud-workstations/README.md +++ b/packages/google-cloud-workstations/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Cloud Workstations API: Node.js Client](https://github.com/googleapis/google-cloud-node) +# [Cloud Workstations API: Node.js Client](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-workstations) [![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/workstations.svg)](https://www.npmjs.org/package/@google-cloud/workstations) @@ -103,52 +103,51 @@ callListWorkstations(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-workstations/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Workstations.create_workstation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.create_workstation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.create_workstation.js,samples/README.md) | -| Workstations.create_workstation_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.create_workstation_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.create_workstation_cluster.js,samples/README.md) | -| Workstations.create_workstation_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.create_workstation_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.create_workstation_config.js,samples/README.md) | -| Workstations.delete_workstation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.delete_workstation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.delete_workstation.js,samples/README.md) | -| Workstations.delete_workstation_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.delete_workstation_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.delete_workstation_cluster.js,samples/README.md) | -| Workstations.delete_workstation_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.delete_workstation_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.delete_workstation_config.js,samples/README.md) | -| Workstations.generate_access_token | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.generate_access_token.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.generate_access_token.js,samples/README.md) | -| Workstations.get_workstation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.get_workstation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.get_workstation.js,samples/README.md) | -| Workstations.get_workstation_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.get_workstation_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.get_workstation_cluster.js,samples/README.md) | -| Workstations.get_workstation_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.get_workstation_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.get_workstation_config.js,samples/README.md) | -| Workstations.list_usable_workstation_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.list_usable_workstation_configs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.list_usable_workstation_configs.js,samples/README.md) | -| Workstations.list_usable_workstations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.list_usable_workstations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.list_usable_workstations.js,samples/README.md) | -| Workstations.list_workstation_clusters | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.list_workstation_clusters.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.list_workstation_clusters.js,samples/README.md) | -| Workstations.list_workstation_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.list_workstation_configs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.list_workstation_configs.js,samples/README.md) | -| Workstations.list_workstations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.list_workstations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.list_workstations.js,samples/README.md) | -| Workstations.start_workstation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.start_workstation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.start_workstation.js,samples/README.md) | -| Workstations.stop_workstation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.stop_workstation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.stop_workstation.js,samples/README.md) | -| Workstations.update_workstation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.update_workstation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.update_workstation.js,samples/README.md) | -| Workstations.update_workstation_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.update_workstation_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.update_workstation_cluster.js,samples/README.md) | -| Workstations.update_workstation_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.update_workstation_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.update_workstation_config.js,samples/README.md) | -| Workstations.create_workstation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.create_workstation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.create_workstation.js,samples/README.md) | -| Workstations.create_workstation_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.create_workstation_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.create_workstation_cluster.js,samples/README.md) | -| Workstations.create_workstation_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.create_workstation_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.create_workstation_config.js,samples/README.md) | -| Workstations.delete_workstation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.delete_workstation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.delete_workstation.js,samples/README.md) | -| Workstations.delete_workstation_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.delete_workstation_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.delete_workstation_cluster.js,samples/README.md) | -| Workstations.delete_workstation_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.delete_workstation_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.delete_workstation_config.js,samples/README.md) | -| Workstations.generate_access_token | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.generate_access_token.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.generate_access_token.js,samples/README.md) | -| Workstations.get_workstation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.get_workstation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.get_workstation.js,samples/README.md) | -| Workstations.get_workstation_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.get_workstation_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.get_workstation_cluster.js,samples/README.md) | -| Workstations.get_workstation_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.get_workstation_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.get_workstation_config.js,samples/README.md) | -| Workstations.list_usable_workstation_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.list_usable_workstation_configs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.list_usable_workstation_configs.js,samples/README.md) | -| Workstations.list_usable_workstations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.list_usable_workstations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.list_usable_workstations.js,samples/README.md) | -| Workstations.list_workstation_clusters | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.list_workstation_clusters.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.list_workstation_clusters.js,samples/README.md) | -| Workstations.list_workstation_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.list_workstation_configs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.list_workstation_configs.js,samples/README.md) | -| Workstations.list_workstations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.list_workstations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.list_workstations.js,samples/README.md) | -| Workstations.start_workstation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.start_workstation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.start_workstation.js,samples/README.md) | -| Workstations.stop_workstation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.stop_workstation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.stop_workstation.js,samples/README.md) | -| Workstations.update_workstation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.update_workstation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.update_workstation.js,samples/README.md) | -| Workstations.update_workstation_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.update_workstation_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.update_workstation_cluster.js,samples/README.md) | -| Workstations.update_workstation_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.update_workstation_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.update_workstation_config.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/quickstart.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/test/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/test/quickstart.js,samples/README.md) | +| Workstations.create_workstation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.create_workstation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.create_workstation.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.create_workstation_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.create_workstation_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.create_workstation_cluster.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.create_workstation_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.create_workstation_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.create_workstation_config.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.delete_workstation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.delete_workstation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.delete_workstation.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.delete_workstation_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.delete_workstation_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.delete_workstation_cluster.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.delete_workstation_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.delete_workstation_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.delete_workstation_config.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.generate_access_token | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.generate_access_token.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.generate_access_token.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.get_workstation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.get_workstation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.get_workstation.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.get_workstation_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.get_workstation_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.get_workstation_cluster.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.get_workstation_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.get_workstation_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.get_workstation_config.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.list_usable_workstation_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.list_usable_workstation_configs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.list_usable_workstation_configs.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.list_usable_workstations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.list_usable_workstations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.list_usable_workstations.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.list_workstation_clusters | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.list_workstation_clusters.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.list_workstation_clusters.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.list_workstation_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.list_workstation_configs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.list_workstation_configs.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.list_workstations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.list_workstations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.list_workstations.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.start_workstation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.start_workstation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.start_workstation.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.stop_workstation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.stop_workstation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.stop_workstation.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.update_workstation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.update_workstation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.update_workstation.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.update_workstation_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.update_workstation_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.update_workstation_cluster.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.update_workstation_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1/workstations.update_workstation_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1/workstations.update_workstation_config.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.create_workstation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.create_workstation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.create_workstation.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.create_workstation_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.create_workstation_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.create_workstation_cluster.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.create_workstation_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.create_workstation_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.create_workstation_config.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.delete_workstation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.delete_workstation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.delete_workstation.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.delete_workstation_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.delete_workstation_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.delete_workstation_cluster.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.delete_workstation_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.delete_workstation_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.delete_workstation_config.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.generate_access_token | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.generate_access_token.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.generate_access_token.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.get_workstation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.get_workstation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.get_workstation.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.get_workstation_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.get_workstation_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.get_workstation_cluster.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.get_workstation_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.get_workstation_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.get_workstation_config.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.list_usable_workstation_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.list_usable_workstation_configs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.list_usable_workstation_configs.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.list_usable_workstations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.list_usable_workstations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.list_usable_workstations.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.list_workstation_clusters | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.list_workstation_clusters.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.list_workstation_clusters.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.list_workstation_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.list_workstation_configs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.list_workstation_configs.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.list_workstations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.list_workstations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.list_workstations.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.start_workstation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.start_workstation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.start_workstation.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.stop_workstation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.stop_workstation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.stop_workstation.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.update_workstation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.update_workstation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.update_workstation.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.update_workstation_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.update_workstation_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.update_workstation_cluster.js,packages/google-cloud-workstations/samples/README.md) | +| Workstations.update_workstation_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/generated/v1beta/workstations.update_workstation_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/generated/v1beta/workstations.update_workstation_config.js,packages/google-cloud-workstations/samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/quickstart.js,packages/google-cloud-workstations/samples/README.md) | diff --git a/packages/google-cloud-workstations/package.json b/packages/google-cloud-workstations/package.json index 30accced6a5..a24c121ab5e 100644 --- a/packages/google-cloud-workstations/package.json +++ b/packages/google-cloud-workstations/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/workstations", - "version": "0.1.1", + "version": "0.2.0", "description": "Cloud Workstations API client for Node.js", "repository": { "type": "git", @@ -31,7 +31,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -39,10 +39,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.2" @@ -57,6 +58,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-cloud-workstations/protos/google/cloud/workstations/v1/workstations.proto b/packages/google-cloud-workstations/protos/google/cloud/workstations/v1/workstations.proto index 7425dd67ea0..b6082157195 100644 --- a/packages/google-cloud-workstations/protos/google/cloud/workstations/v1/workstations.proto +++ b/packages/google-cloud-workstations/protos/google/cloud/workstations/v1/workstations.proto @@ -106,7 +106,7 @@ service Workstations { option (google.api.method_signature) = "name"; } - // Returns all WorkstationConfigs in the specified cluster. + // Returns all workstation configurations in the specified cluster. rpc ListWorkstationConfigs(ListWorkstationConfigsRequest) returns (ListWorkstationConfigsResponse) { option (google.api.http) = { @@ -175,7 +175,7 @@ service Workstations { option (google.api.method_signature) = "name"; } - // Returns all Workstations using the specified config. + // Returns all Workstations using the specified workstation configuration. rpc ListWorkstations(ListWorkstationsRequest) returns (ListWorkstationsResponse) { option (google.api.http) = { @@ -184,8 +184,8 @@ service Workstations { option (google.api.method_signature) = "parent"; } - // Returns all Workstations using the specified config on which the caller has - // the "workstations.workstations.use" permission. + // Returns all workstations using the specified workstation configuration + // on which the caller has the "workstations.workstations.use" permission. rpc ListUsableWorkstations(ListUsableWorkstationsRequest) returns (ListUsableWorkstationsResponse) { option (google.api.http) = { @@ -343,7 +343,7 @@ message WorkstationCluster { [(google.api.field_behavior) = OUTPUT_ONLY]; // Checksum computed by the server. May be sent on update and delete requests - // to ensure that the client has an up-to-date value before proceeding. + // to make sure that the client has an up-to-date value before proceeding. string etag = 9; // Immutable. Name of the Compute Engine network in which instances associated @@ -355,6 +355,12 @@ message WorkstationCluster { // subnetwork specified for this cluster. string subnetwork = 11 [(google.api.field_behavior) = IMMUTABLE]; + // Output only. The private IP address of the control plane for this cluster. + // Workstation VMs need access to this IP address to work with the service, so + // make sure that your firewall rules allow egress from the workstation VMs to + // this address. + string control_plane_ip = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Configuration for private cluster. PrivateClusterConfig private_cluster_config = 12; @@ -403,10 +409,10 @@ message WorkstationConfig { // The name of a Compute Engine machine type. string machine_type = 1; - // Email address of the service account that will be used on VM instances - // used to support this config. If not set, VMs will run with a + // Email address of the service account used on VM instances + // used to support this configuration. If not set, VMs run with a // Google-managed service account. This service account must have - // permission to pull the specified container image, otherwise the image + // permission to pull the specified container image; otherwise, the image // must be publicly accessible. string service_account = 2; @@ -414,9 +420,13 @@ message WorkstationConfig { // Workstations. repeated string tags = 4; - // Number of instances to pool for faster workstation starup. + // Number of instances to pool for faster workstation startup. int32 pool_size = 5; + // Output only. Number of instances currently available in the pool for + // faster workstation startup. + int32 pooled_instances = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Whether instances have no public IP address. bool disable_public_ip_addresses = 6; @@ -493,7 +503,7 @@ message WorkstationConfig { // A Docker container. message Container { // Docker image defining the container. This image must be accessible by the - // config's service account. + // service account specified in the workstation configuration. string image = 1; // If set, overrides the default ENTRYPOINT specified by the image. @@ -502,7 +512,7 @@ message WorkstationConfig { // Arguments passed to the entrypoint. repeated string args = 3; - // Environment variables passed to the container. + // Environment variables passed to the container's entrypoint. map env = 4; // If set, overrides the default DIR specified by the image. @@ -515,18 +525,19 @@ message WorkstationConfig { // A customer-managed encryption key for the Compute Engine resources // of this workstation configuration. message CustomerEncryptionKey { - // The name of the Google Cloud KMS encryption key. For example, + // Immutable. The name of the Google Cloud KMS encryption key. For example, // `projects/PROJECT_ID/locations/REGION/keyRings/KEY_RING/cryptoKeys/KEY_NAME`. - string kms_key = 1; + string kms_key = 1 [(google.api.field_behavior) = IMMUTABLE]; - // The service account to use with the specified + // Immutable. The service account to use with the specified // KMS key. We recommend that you use a separate service account // and follow KMS best practices. For more information, see // [Separation of // duties](https://cloud.google.com/kms/docs/separation-of-duties) and // `gcloud kms keys add-iam-policy-binding` // [`--member`](https://cloud.google.com/sdk/gcloud/reference/kms/keys/add-iam-policy-binding#--member). - string kms_key_service_account = 2; + string kms_key_service_account = 2 + [(google.api.field_behavior) = IMMUTABLE]; } // Full name of this resource. @@ -562,7 +573,7 @@ message WorkstationConfig { [(google.api.field_behavior) = OUTPUT_ONLY]; // Checksum computed by the server. May be sent on update and delete requests - // to ensure that the client has an up-to-date value before proceeding. + // to make sure that the client has an up-to-date value before proceeding. string etag = 9; // How long to wait before automatically stopping an instance that hasn't @@ -586,7 +597,7 @@ message WorkstationConfig { // when that workstation is started. Container container = 14; - // Encrypts resources of this workstation configuration using a + // Immutable. Encrypts resources of this workstation configuration using a // customer-managed encryption key. // // If specified, the boot disk of the Compute Engine instance and the @@ -602,7 +613,10 @@ message WorkstationConfig { // // If the encryption key is revoked, the workstation session will // automatically be stopped within 7 hours. - CustomerEncryptionKey encryption_key = 17; + // + // Immutable after the workstation configuration is created. + CustomerEncryptionKey encryption_key = 17 + [(google.api.field_behavior) = IMMUTABLE]; // Output only. Whether this resource is degraded, in which case it may // require user action to restore full functionality. See also the @@ -675,7 +689,7 @@ message Workstation { [(google.api.field_behavior) = OUTPUT_ONLY]; // Checksum computed by the server. May be sent on update and delete requests - // to ensure that the client has an up-to-date value before proceeding. + // to make sure that the client has an up-to-date value before proceeding. string etag = 9; // Output only. Current state of the workstation. @@ -786,7 +800,7 @@ message DeleteWorkstationClusterRequest { bool validate_only = 2; // If set, the request will be rejected if the latest version of the - // workstation cluster on the server does not have this etag. + // workstation cluster on the server does not have this ETag. string etag = 3; // If set, any workstation configurations and workstations in the @@ -876,7 +890,7 @@ message CreateWorkstationConfigRequest { } ]; - // Required. ID to use for the config. + // Required. ID to use for the workstation configuration. string workstation_config_id = 2 [(google.api.field_behavior) = REQUIRED]; // Required. Config to create. @@ -894,7 +908,8 @@ message UpdateWorkstationConfigRequest { WorkstationConfig workstation_config = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. Mask specifying which fields in the config should be updated. + // Required. Mask specifying which fields in the workstation configuration + // should be updated. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; @@ -902,14 +917,15 @@ message UpdateWorkstationConfigRequest { // apply it. bool validate_only = 3; - // If set, and the config is not found, a new config will be created. - // In this situation, update_mask is ignored. + // If set and the workstation configuration is not found, a new + // workstation configuration will be created. In this situation, + // update_mask is ignored. bool allow_missing = 4; } // Message for deleting a workstation configuration. message DeleteWorkstationConfigRequest { - // Required. Name of the config to delete. + // Required. Name of the workstation configuration to delete. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -921,12 +937,13 @@ message DeleteWorkstationConfigRequest { // apply it. bool validate_only = 2; - // If set, the request will be rejected if the latest version of the config on - // the server does not have this etag. + // If set, the request is rejected if the latest version of the + // workstation configuration on the server does not have this ETag. string etag = 3; - // If set, any Workstations in the config will also be deleted. Otherwise, - // the request will work only if the config has no workstations. + // If set, any workstations in the workstation configuration are also deleted. + // Otherwise, the request works only if the workstation configuration has + // no workstations. bool force = 4; } @@ -1027,7 +1044,8 @@ message UpdateWorkstationRequest { // Required. Workstation to update. Workstation workstation = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. Mask specifying which fields in the config should be updated. + // Required. Mask specifying which fields in the workstation configuration + // should be updated. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; @@ -1035,8 +1053,9 @@ message UpdateWorkstationRequest { // apply it. bool validate_only = 3; - // If set, and the config is not found, a new config will be created. - // In this situation, update_mask is ignored. + // If set and the workstation configuration is not found, a new + // workstation configuration is created. In this situation, update_mask + // is ignored. bool allow_missing = 4; } @@ -1055,7 +1074,7 @@ message DeleteWorkstationRequest { bool validate_only = 2; // If set, the request will be rejected if the latest version of the - // workstation on the server does not have this etag. + // workstation on the server does not have this ETag. string etag = 3; } @@ -1074,7 +1093,7 @@ message StartWorkstationRequest { bool validate_only = 2; // If set, the request will be rejected if the latest version of the - // workstation on the server does not have this etag. + // workstation on the server does not have this ETag. string etag = 3; } @@ -1093,7 +1112,7 @@ message StopWorkstationRequest { bool validate_only = 2; // If set, the request will be rejected if the latest version of the - // workstation on the server does not have this etag. + // workstation on the server does not have this ETag. string etag = 3; } @@ -1127,7 +1146,7 @@ message GenerateAccessTokenRequest { message GenerateAccessTokenResponse { // The generated bearer access token. To use this token, include it in an // Authorization header of an HTTP request sent to the associated - // workstation's hostname, for example, `Authorization: Bearer + // workstation's hostname—for example, `Authorization: Bearer // `. string access_token = 1; diff --git a/packages/google-cloud-workstations/protos/google/cloud/workstations/v1beta/workstations.proto b/packages/google-cloud-workstations/protos/google/cloud/workstations/v1beta/workstations.proto index 772092c8e92..98951e8be83 100644 --- a/packages/google-cloud-workstations/protos/google/cloud/workstations/v1beta/workstations.proto +++ b/packages/google-cloud-workstations/protos/google/cloud/workstations/v1beta/workstations.proto @@ -175,7 +175,7 @@ service Workstations { option (google.api.method_signature) = "name"; } - // Returns all Workstations using the specified config. + // Returns all Workstations using the specified workstation configuration. rpc ListWorkstations(ListWorkstationsRequest) returns (ListWorkstationsResponse) { option (google.api.http) = { @@ -184,8 +184,8 @@ service Workstations { option (google.api.method_signature) = "parent"; } - // Returns all Workstations using the specified config on which the caller has - // the "workstations.workstations.use" permission. + // Returns all workstations using the specified workstation configuration + // on which the caller has the "workstations.workstations.use" permission. rpc ListUsableWorkstations(ListUsableWorkstationsRequest) returns (ListUsableWorkstationsResponse) { option (google.api.http) = { @@ -343,7 +343,7 @@ message WorkstationCluster { [(google.api.field_behavior) = OUTPUT_ONLY]; // Checksum computed by the server. May be sent on update and delete requests - // to ensure that the client has an up-to-date value before proceeding. + // to make sure that the client has an up-to-date value before proceeding. string etag = 9; // Immutable. Name of the Compute Engine network in which instances associated @@ -355,6 +355,12 @@ message WorkstationCluster { // subnetwork specified for this cluster. string subnetwork = 11 [(google.api.field_behavior) = IMMUTABLE]; + // Output only. The private IP address of the control plane for this cluster. + // Workstation VMs need access to this IP address to work with the service, so + // make sure that your firewall rules allow egress from the workstation VMs to + // this address. + string control_plane_ip = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Configuration for private cluster. PrivateClusterConfig private_cluster_config = 12; @@ -400,6 +406,16 @@ message WorkstationConfig { bool enable_confidential_compute = 1; } + // An accelerator card attached to the instance. + message Accelerator { + // Type of accelerator resource to attach to the instance, for example, + // "nvidia-tesla-p100". + string type = 1; + + // Number of accelerator cards exposed to the instance. + int32 count = 2; + } + // The name of a Compute Engine machine type. string machine_type = 1; @@ -414,9 +430,13 @@ message WorkstationConfig { // Workstations. repeated string tags = 4; - // Number of instances to pool for faster workstation starup. + // Number of instances to pool for faster workstation startup. int32 pool_size = 5; + // Output only. Number of instances currently available in the pool for + // faster workstation startup. + int32 pooled_instances = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Whether instances have no public IP address. bool disable_public_ip_addresses = 6; @@ -426,8 +446,12 @@ message WorkstationConfig { // A set of Compute Engine Confidential VM instance options. GceConfidentialInstanceConfig confidential_instance_config = 10; - // Size of the boot disk in GB. + // Size of the boot disk in GB. Defaults to 50. int32 boot_disk_size_gb = 9; + + // A list of the type and count of accelerator cards attached to the + // instance. + repeated Accelerator accelerators = 11; } // Type of host that will be used for the workstation's runtime. @@ -457,14 +481,15 @@ message WorkstationConfig { } // Size of the disk in GB. Must be empty if source_snapshot is set. + // Defaults to 200. int32 size_gb = 1; // Type of file system that the disk should be formatted with. The // workstation image must support this file system type. Must be empty - // if source_snapshot is set. + // if source_snapshot is set. Defaults to ext4. string fs_type = 2; - // Type of the disk to use. + // Type of the disk to use. Defaults to pd-standard. string disk_type = 3; // Name of the snapshot to use as the source for the disk. If set, @@ -489,7 +514,7 @@ message WorkstationConfig { // A Docker container. message Container { // Docker image defining the container. This image must be accessible by the - // config's service account. + // service account specified in the workstation configuration. string image = 1; // If set, overrides the default ENTRYPOINT specified by the image. @@ -498,7 +523,7 @@ message WorkstationConfig { // Arguments passed to the entrypoint. repeated string args = 3; - // Environment variables passed to the container. + // Environment variables passed to the container's entrypoint. map env = 4; // If set, overrides the default DIR specified by the image. @@ -511,18 +536,28 @@ message WorkstationConfig { // A customer-managed encryption key for the Compute Engine resources // of this workstation configuration. message CustomerEncryptionKey { - // The name of the Google Cloud KMS encryption key. For example, + // Immutable. The name of the Google Cloud KMS encryption key. For example, // `projects/PROJECT_ID/locations/REGION/keyRings/KEY_RING/cryptoKeys/KEY_NAME`. - string kms_key = 1; + string kms_key = 1 [(google.api.field_behavior) = IMMUTABLE]; - // The service account to use with the specified + // Immutable. The service account to use with the specified // KMS key. We recommend that you use a separate service account // and follow KMS best practices. For more information, see // [Separation of // duties](https://cloud.google.com/kms/docs/separation-of-duties) and // `gcloud kms keys add-iam-policy-binding` // [`--member`](https://cloud.google.com/sdk/gcloud/reference/kms/keys/add-iam-policy-binding#--member). - string kms_key_service_account = 2; + string kms_key_service_account = 2 + [(google.api.field_behavior) = IMMUTABLE]; + } + + // A readiness check to be performed on a workstation. + message ReadinessCheck { + // Path to which the request should be sent. + string path = 1; + + // Port to which the request should be sent. + int32 port = 2; } // Full name of this resource. @@ -558,7 +593,7 @@ message WorkstationConfig { [(google.api.field_behavior) = OUTPUT_ONLY]; // Checksum computed by the server. May be sent on update and delete requests - // to ensure that the client has an up-to-date value before proceeding. + // to make sure that the client has an up-to-date value before proceeding. string etag = 9; // How long to wait before automatically stopping an instance that hasn't @@ -582,7 +617,7 @@ message WorkstationConfig { // when that workstation is started. Container container = 14; - // Encrypts resources of this workstation configuration using a + // Immutable. Encrypts resources of this workstation configuration using a // customer-managed encryption key. // // If specified, the boot disk of the Compute Engine instance and the @@ -598,7 +633,15 @@ message WorkstationConfig { // // If the encryption key is revoked, the workstation session will // automatically be stopped within 7 hours. - CustomerEncryptionKey encryption_key = 17; + // + // Immutable after the workstation configuration is created. + CustomerEncryptionKey encryption_key = 17 + [(google.api.field_behavior) = IMMUTABLE]; + + // Readiness checks to perform when starting a workstation using this + // workstation configuration. Mark a workstation as running only after all + // specified readiness checks return 200 status codes. + repeated ReadinessCheck readiness_checks = 19; // Output only. Whether this resource is in degraded mode, in which case it // may require user action to restore full functionality. Details can be found @@ -608,6 +651,13 @@ message WorkstationConfig { // Output only. Status conditions describing the current resource state. repeated google.rpc.Status conditions = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Whether to enable linux auditd logging on the workstation. When enabled, a + // service account must also be specified that has logging.buckets.write + // permission on the project. Operating system audit logging is distinct from + // [Cloud Audit + // Logs](https://cloud.google.com/workstations/docs/audit-logging). + bool enable_audit_agent = 20; } // A single instance of a developer workstation with its own persistent storage. @@ -671,7 +721,7 @@ message Workstation { [(google.api.field_behavior) = OUTPUT_ONLY]; // Checksum computed by the server. May be sent on update and delete requests - // to ensure that the client has an up-to-date value before proceeding. + // to make sure that the client has an up-to-date value before proceeding. string etag = 9; // Output only. Current state of the workstation. @@ -683,6 +733,9 @@ message Workstation { // clients may prefix the host with the destination port in the format // `{port}-{host}`. string host = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Environment variables passed to the workstation container's entrypoint. + map env = 12; } // Request message for GetWorkstationCluster. @@ -782,7 +835,7 @@ message DeleteWorkstationClusterRequest { bool validate_only = 2; // If set, the request will be rejected if the latest version of the - // workstation cluster on the server does not have this etag. + // workstation cluster on the server does not have this ETag. string etag = 3; // If set, any workstation configurations and workstations in the @@ -872,7 +925,7 @@ message CreateWorkstationConfigRequest { } ]; - // Required. ID to use for the config. + // Required. ID to use for the workstation configuration. string workstation_config_id = 2 [(google.api.field_behavior) = REQUIRED]; // Required. Config to create. @@ -890,7 +943,8 @@ message UpdateWorkstationConfigRequest { WorkstationConfig workstation_config = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. Mask specifying which fields in the config should be updated. + // Required. Mask specifying which fields in the workstation configuration + // should be updated. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; @@ -898,14 +952,15 @@ message UpdateWorkstationConfigRequest { // apply it. bool validate_only = 3; - // If set, and the config is not found, a new config will be created. - // In this situation, update_mask is ignored. + // If set and the workstation configuration is not found, a new + // workstation configuration will be created. In this situation, + // update_mask is ignored. bool allow_missing = 4; } // Message for deleting a workstation configuration. message DeleteWorkstationConfigRequest { - // Required. Name of the config to delete. + // Required. Name of the workstation configuration to delete. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -917,12 +972,13 @@ message DeleteWorkstationConfigRequest { // apply it. bool validate_only = 2; - // If set, the request will be rejected if the latest version of the config on - // the server does not have this etag. + // If set, the request is rejected if the latest version of the + // workstation configuration on the server does not have this ETag. string etag = 3; - // If set, any Workstations in the config will also be deleted. Otherwise, - // the request will work only if the config has no workstations. + // If set, any workstations in the workstation configuration are also deleted. + // Otherwise, the request works only if the workstation configuration has + // no workstations. bool force = 4; } @@ -1023,7 +1079,8 @@ message UpdateWorkstationRequest { // Required. Workstation to update. Workstation workstation = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. Mask specifying which fields in the config should be updated. + // Required. Mask specifying which fields in the workstation configuration + // should be updated. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; @@ -1031,8 +1088,9 @@ message UpdateWorkstationRequest { // apply it. bool validate_only = 3; - // If set, and the config is not found, a new config will be created. - // In this situation, update_mask is ignored. + // If set and the workstation configuration is not found, a new + // workstation configuration is created. In this situation, update_mask + // is ignored. bool allow_missing = 4; } @@ -1051,7 +1109,7 @@ message DeleteWorkstationRequest { bool validate_only = 2; // If set, the request will be rejected if the latest version of the - // workstation on the server does not have this etag. + // workstation on the server does not have this ETag. string etag = 3; } @@ -1070,7 +1128,7 @@ message StartWorkstationRequest { bool validate_only = 2; // If set, the request will be rejected if the latest version of the - // workstation on the server does not have this etag. + // workstation on the server does not have this ETag. string etag = 3; } @@ -1089,7 +1147,7 @@ message StopWorkstationRequest { bool validate_only = 2; // If set, the request will be rejected if the latest version of the - // workstation on the server does not have this etag. + // workstation on the server does not have this ETag. string etag = 3; } @@ -1123,7 +1181,7 @@ message GenerateAccessTokenRequest { message GenerateAccessTokenResponse { // The generated bearer access token. To use this token, include it in an // Authorization header of an HTTP request sent to the associated - // workstation's hostname, for example, `Authorization: Bearer + // workstation's hostname—for example, `Authorization: Bearer // `. string access_token = 1; diff --git a/packages/google-cloud-workstations/protos/protos.d.ts b/packages/google-cloud-workstations/protos/protos.d.ts index 9c643b1f223..e9b98749997 100644 --- a/packages/google-cloud-workstations/protos/protos.d.ts +++ b/packages/google-cloud-workstations/protos/protos.d.ts @@ -509,6 +509,9 @@ export namespace google { /** WorkstationCluster subnetwork */ subnetwork?: (string|null); + /** WorkstationCluster controlPlaneIp */ + controlPlaneIp?: (string|null); + /** WorkstationCluster privateClusterConfig */ privateClusterConfig?: (google.cloud.workstations.v1.WorkstationCluster.IPrivateClusterConfig|null); @@ -564,6 +567,9 @@ export namespace google { /** WorkstationCluster subnetwork. */ public subnetwork: string; + /** WorkstationCluster controlPlaneIp. */ + public controlPlaneIp: string; + /** WorkstationCluster privateClusterConfig. */ public privateClusterConfig?: (google.cloud.workstations.v1.WorkstationCluster.IPrivateClusterConfig|null); @@ -1087,6 +1093,9 @@ export namespace google { /** GceInstance poolSize */ poolSize?: (number|null); + /** GceInstance pooledInstances */ + pooledInstances?: (number|null); + /** GceInstance disablePublicIpAddresses */ disablePublicIpAddresses?: (boolean|null); @@ -1124,6 +1133,9 @@ export namespace google { /** GceInstance poolSize. */ public poolSize: number; + /** GceInstance pooledInstances. */ + public pooledInstances: number; + /** GceInstance disablePublicIpAddresses. */ public disablePublicIpAddresses: boolean; @@ -5536,6 +5548,9 @@ export namespace google { /** WorkstationCluster subnetwork */ subnetwork?: (string|null); + /** WorkstationCluster controlPlaneIp */ + controlPlaneIp?: (string|null); + /** WorkstationCluster privateClusterConfig */ privateClusterConfig?: (google.cloud.workstations.v1beta.WorkstationCluster.IPrivateClusterConfig|null); @@ -5591,6 +5606,9 @@ export namespace google { /** WorkstationCluster subnetwork. */ public subnetwork: string; + /** WorkstationCluster controlPlaneIp. */ + public controlPlaneIp: string; + /** WorkstationCluster privateClusterConfig. */ public privateClusterConfig?: (google.cloud.workstations.v1beta.WorkstationCluster.IPrivateClusterConfig|null); @@ -5847,11 +5865,17 @@ export namespace google { /** WorkstationConfig encryptionKey */ encryptionKey?: (google.cloud.workstations.v1beta.WorkstationConfig.ICustomerEncryptionKey|null); + /** WorkstationConfig readinessChecks */ + readinessChecks?: (google.cloud.workstations.v1beta.WorkstationConfig.IReadinessCheck[]|null); + /** WorkstationConfig degraded */ degraded?: (boolean|null); /** WorkstationConfig conditions */ conditions?: (google.rpc.IStatus[]|null); + + /** WorkstationConfig enableAuditAgent */ + enableAuditAgent?: (boolean|null); } /** Represents a WorkstationConfig. */ @@ -5911,12 +5935,18 @@ export namespace google { /** WorkstationConfig encryptionKey. */ public encryptionKey?: (google.cloud.workstations.v1beta.WorkstationConfig.ICustomerEncryptionKey|null); + /** WorkstationConfig readinessChecks. */ + public readinessChecks: google.cloud.workstations.v1beta.WorkstationConfig.IReadinessCheck[]; + /** WorkstationConfig degraded. */ public degraded: boolean; /** WorkstationConfig conditions. */ public conditions: google.rpc.IStatus[]; + /** WorkstationConfig enableAuditAgent. */ + public enableAuditAgent: boolean; + /** * Creates a new WorkstationConfig instance using the specified properties. * @param [properties] Properties to set @@ -6114,6 +6144,9 @@ export namespace google { /** GceInstance poolSize */ poolSize?: (number|null); + /** GceInstance pooledInstances */ + pooledInstances?: (number|null); + /** GceInstance disablePublicIpAddresses */ disablePublicIpAddresses?: (boolean|null); @@ -6125,6 +6158,9 @@ export namespace google { /** GceInstance bootDiskSizeGb */ bootDiskSizeGb?: (number|null); + + /** GceInstance accelerators */ + accelerators?: (google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.IAccelerator[]|null); } /** Represents a GceInstance. */ @@ -6148,6 +6184,9 @@ export namespace google { /** GceInstance poolSize. */ public poolSize: number; + /** GceInstance pooledInstances. */ + public pooledInstances: number; + /** GceInstance disablePublicIpAddresses. */ public disablePublicIpAddresses: boolean; @@ -6160,6 +6199,9 @@ export namespace google { /** GceInstance bootDiskSizeGb. */ public bootDiskSizeGb: number; + /** GceInstance accelerators. */ + public accelerators: google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.IAccelerator[]; + /** * Creates a new GceInstance instance using the specified properties. * @param [properties] Properties to set @@ -6445,6 +6487,109 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of an Accelerator. */ + interface IAccelerator { + + /** Accelerator type */ + type?: (string|null); + + /** Accelerator count */ + count?: (number|null); + } + + /** Represents an Accelerator. */ + class Accelerator implements IAccelerator { + + /** + * Constructs a new Accelerator. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.IAccelerator); + + /** Accelerator type. */ + public type: string; + + /** Accelerator count. */ + public count: number; + + /** + * Creates a new Accelerator instance using the specified properties. + * @param [properties] Properties to set + * @returns Accelerator instance + */ + public static create(properties?: google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.IAccelerator): google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator; + + /** + * Encodes the specified Accelerator message. Does not implicitly {@link google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator.verify|verify} messages. + * @param message Accelerator message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.IAccelerator, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Accelerator message, length delimited. Does not implicitly {@link google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator.verify|verify} messages. + * @param message Accelerator message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.IAccelerator, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Accelerator message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Accelerator + * @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.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator; + + /** + * Decodes an Accelerator message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Accelerator + * @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.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator; + + /** + * Verifies an Accelerator 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 Accelerator message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Accelerator + */ + public static fromObject(object: { [k: string]: any }): google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator; + + /** + * Creates a plain object from an Accelerator message. Also converts values to other types if specified. + * @param message Accelerator + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Accelerator to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Accelerator + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } } @@ -6917,6 +7062,109 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of a ReadinessCheck. */ + interface IReadinessCheck { + + /** ReadinessCheck path */ + path?: (string|null); + + /** ReadinessCheck port */ + port?: (number|null); + } + + /** Represents a ReadinessCheck. */ + class ReadinessCheck implements IReadinessCheck { + + /** + * Constructs a new ReadinessCheck. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.workstations.v1beta.WorkstationConfig.IReadinessCheck); + + /** ReadinessCheck path. */ + public path: string; + + /** ReadinessCheck port. */ + public port: number; + + /** + * Creates a new ReadinessCheck instance using the specified properties. + * @param [properties] Properties to set + * @returns ReadinessCheck instance + */ + public static create(properties?: google.cloud.workstations.v1beta.WorkstationConfig.IReadinessCheck): google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck; + + /** + * Encodes the specified ReadinessCheck message. Does not implicitly {@link google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck.verify|verify} messages. + * @param message ReadinessCheck message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.workstations.v1beta.WorkstationConfig.IReadinessCheck, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReadinessCheck message, length delimited. Does not implicitly {@link google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck.verify|verify} messages. + * @param message ReadinessCheck message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.workstations.v1beta.WorkstationConfig.IReadinessCheck, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReadinessCheck message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReadinessCheck + * @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.workstations.v1beta.WorkstationConfig.ReadinessCheck; + + /** + * Decodes a ReadinessCheck message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReadinessCheck + * @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.workstations.v1beta.WorkstationConfig.ReadinessCheck; + + /** + * Verifies a ReadinessCheck 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 ReadinessCheck message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReadinessCheck + */ + public static fromObject(object: { [k: string]: any }): google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck; + + /** + * Creates a plain object from a ReadinessCheck message. Also converts values to other types if specified. + * @param message ReadinessCheck + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReadinessCheck to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReadinessCheck + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Properties of a Workstation. */ @@ -6957,6 +7205,9 @@ export namespace google { /** Workstation host */ host?: (string|null); + + /** Workstation env */ + env?: ({ [k: string]: string }|null); } /** Represents a Workstation. */ @@ -7004,6 +7255,9 @@ export namespace google { /** Workstation host. */ public host: string; + /** Workstation env. */ + public env: { [k: string]: string }; + /** * Creates a new Workstation instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-workstations/protos/protos.js b/packages/google-cloud-workstations/protos/protos.js index 00bec04bc0b..ec93f08c529 100644 --- a/packages/google-cloud-workstations/protos/protos.js +++ b/packages/google-cloud-workstations/protos/protos.js @@ -779,6 +779,7 @@ * @property {string|null} [etag] WorkstationCluster etag * @property {string|null} [network] WorkstationCluster network * @property {string|null} [subnetwork] WorkstationCluster subnetwork + * @property {string|null} [controlPlaneIp] WorkstationCluster controlPlaneIp * @property {google.cloud.workstations.v1.WorkstationCluster.IPrivateClusterConfig|null} [privateClusterConfig] WorkstationCluster privateClusterConfig * @property {boolean|null} [degraded] WorkstationCluster degraded * @property {Array.|null} [conditions] WorkstationCluster conditions @@ -898,6 +899,14 @@ */ WorkstationCluster.prototype.subnetwork = ""; + /** + * WorkstationCluster controlPlaneIp. + * @member {string} controlPlaneIp + * @memberof google.cloud.workstations.v1.WorkstationCluster + * @instance + */ + WorkstationCluster.prototype.controlPlaneIp = ""; + /** * WorkstationCluster privateClusterConfig. * @member {google.cloud.workstations.v1.WorkstationCluster.IPrivateClusterConfig|null|undefined} privateClusterConfig @@ -979,6 +988,8 @@ if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) writer.uint32(/* id 15, wireType 2 =*/122).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.controlPlaneIp != null && Object.hasOwnProperty.call(message, "controlPlaneIp")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.controlPlaneIp); return writer; }; @@ -1099,6 +1110,10 @@ message.subnetwork = reader.string(); break; } + case 16: { + message.controlPlaneIp = reader.string(); + break; + } case 12: { message.privateClusterConfig = $root.google.cloud.workstations.v1.WorkstationCluster.PrivateClusterConfig.decode(reader, reader.uint32()); break; @@ -1200,6 +1215,9 @@ if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) if (!$util.isString(message.subnetwork)) return "subnetwork: string expected"; + if (message.controlPlaneIp != null && message.hasOwnProperty("controlPlaneIp")) + if (!$util.isString(message.controlPlaneIp)) + return "controlPlaneIp: string expected"; if (message.privateClusterConfig != null && message.hasOwnProperty("privateClusterConfig")) { var error = $root.google.cloud.workstations.v1.WorkstationCluster.PrivateClusterConfig.verify(message.privateClusterConfig); if (error) @@ -1275,6 +1293,8 @@ message.network = String(object.network); if (object.subnetwork != null) message.subnetwork = String(object.subnetwork); + if (object.controlPlaneIp != null) + message.controlPlaneIp = String(object.controlPlaneIp); if (object.privateClusterConfig != null) { if (typeof object.privateClusterConfig !== "object") throw TypeError(".google.cloud.workstations.v1.WorkstationCluster.privateClusterConfig: object expected"); @@ -1327,6 +1347,7 @@ object.subnetwork = ""; object.privateClusterConfig = null; object.degraded = false; + object.controlPlaneIp = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -1368,6 +1389,8 @@ for (var j = 0; j < keys2.length; ++j) object.labels[keys2[j]] = message.labels[keys2[j]]; } + if (message.controlPlaneIp != null && message.hasOwnProperty("controlPlaneIp")) + object.controlPlaneIp = message.controlPlaneIp; return object; }; @@ -2671,6 +2694,7 @@ * @property {string|null} [serviceAccount] GceInstance serviceAccount * @property {Array.|null} [tags] GceInstance tags * @property {number|null} [poolSize] GceInstance poolSize + * @property {number|null} [pooledInstances] GceInstance pooledInstances * @property {boolean|null} [disablePublicIpAddresses] GceInstance disablePublicIpAddresses * @property {boolean|null} [enableNestedVirtualization] GceInstance enableNestedVirtualization * @property {google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance.IGceShieldedInstanceConfig|null} [shieldedInstanceConfig] GceInstance shieldedInstanceConfig @@ -2726,6 +2750,14 @@ */ GceInstance.prototype.poolSize = 0; + /** + * GceInstance pooledInstances. + * @member {number} pooledInstances + * @memberof google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance + * @instance + */ + GceInstance.prototype.pooledInstances = 0; + /** * GceInstance disablePublicIpAddresses. * @member {boolean} disablePublicIpAddresses @@ -2809,6 +2841,8 @@ writer.uint32(/* id 9, wireType 0 =*/72).int32(message.bootDiskSizeGb); if (message.confidentialInstanceConfig != null && Object.hasOwnProperty.call(message, "confidentialInstanceConfig")) $root.google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance.GceConfidentialInstanceConfig.encode(message.confidentialInstanceConfig, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.pooledInstances != null && Object.hasOwnProperty.call(message, "pooledInstances")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.pooledInstances); return writer; }; @@ -2861,6 +2895,10 @@ message.poolSize = reader.int32(); break; } + case 12: { + message.pooledInstances = reader.int32(); + break; + } case 6: { message.disablePublicIpAddresses = reader.bool(); break; @@ -2932,6 +2970,9 @@ if (message.poolSize != null && message.hasOwnProperty("poolSize")) if (!$util.isInteger(message.poolSize)) return "poolSize: integer expected"; + if (message.pooledInstances != null && message.hasOwnProperty("pooledInstances")) + if (!$util.isInteger(message.pooledInstances)) + return "pooledInstances: integer expected"; if (message.disablePublicIpAddresses != null && message.hasOwnProperty("disablePublicIpAddresses")) if (typeof message.disablePublicIpAddresses !== "boolean") return "disablePublicIpAddresses: boolean expected"; @@ -2979,6 +3020,8 @@ } if (object.poolSize != null) message.poolSize = object.poolSize | 0; + if (object.pooledInstances != null) + message.pooledInstances = object.pooledInstances | 0; if (object.disablePublicIpAddresses != null) message.disablePublicIpAddresses = Boolean(object.disablePublicIpAddresses); if (object.enableNestedVirtualization != null) @@ -3022,6 +3065,7 @@ object.shieldedInstanceConfig = null; object.bootDiskSizeGb = 0; object.confidentialInstanceConfig = null; + object.pooledInstances = 0; } if (message.machineType != null && message.hasOwnProperty("machineType")) object.machineType = message.machineType; @@ -3044,6 +3088,8 @@ object.bootDiskSizeGb = message.bootDiskSizeGb; if (message.confidentialInstanceConfig != null && message.hasOwnProperty("confidentialInstanceConfig")) object.confidentialInstanceConfig = $root.google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance.GceConfidentialInstanceConfig.toObject(message.confidentialInstanceConfig, options); + if (message.pooledInstances != null && message.hasOwnProperty("pooledInstances")) + object.pooledInstances = message.pooledInstances; return object; }; @@ -13208,6 +13254,7 @@ * @property {string|null} [etag] WorkstationCluster etag * @property {string|null} [network] WorkstationCluster network * @property {string|null} [subnetwork] WorkstationCluster subnetwork + * @property {string|null} [controlPlaneIp] WorkstationCluster controlPlaneIp * @property {google.cloud.workstations.v1beta.WorkstationCluster.IPrivateClusterConfig|null} [privateClusterConfig] WorkstationCluster privateClusterConfig * @property {boolean|null} [degraded] WorkstationCluster degraded * @property {Array.|null} [conditions] WorkstationCluster conditions @@ -13327,6 +13374,14 @@ */ WorkstationCluster.prototype.subnetwork = ""; + /** + * WorkstationCluster controlPlaneIp. + * @member {string} controlPlaneIp + * @memberof google.cloud.workstations.v1beta.WorkstationCluster + * @instance + */ + WorkstationCluster.prototype.controlPlaneIp = ""; + /** * WorkstationCluster privateClusterConfig. * @member {google.cloud.workstations.v1beta.WorkstationCluster.IPrivateClusterConfig|null|undefined} privateClusterConfig @@ -13408,6 +13463,8 @@ if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) writer.uint32(/* id 15, wireType 2 =*/122).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.controlPlaneIp != null && Object.hasOwnProperty.call(message, "controlPlaneIp")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.controlPlaneIp); return writer; }; @@ -13528,6 +13585,10 @@ message.subnetwork = reader.string(); break; } + case 16: { + message.controlPlaneIp = reader.string(); + break; + } case 12: { message.privateClusterConfig = $root.google.cloud.workstations.v1beta.WorkstationCluster.PrivateClusterConfig.decode(reader, reader.uint32()); break; @@ -13629,6 +13690,9 @@ if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) if (!$util.isString(message.subnetwork)) return "subnetwork: string expected"; + if (message.controlPlaneIp != null && message.hasOwnProperty("controlPlaneIp")) + if (!$util.isString(message.controlPlaneIp)) + return "controlPlaneIp: string expected"; if (message.privateClusterConfig != null && message.hasOwnProperty("privateClusterConfig")) { var error = $root.google.cloud.workstations.v1beta.WorkstationCluster.PrivateClusterConfig.verify(message.privateClusterConfig); if (error) @@ -13704,6 +13768,8 @@ message.network = String(object.network); if (object.subnetwork != null) message.subnetwork = String(object.subnetwork); + if (object.controlPlaneIp != null) + message.controlPlaneIp = String(object.controlPlaneIp); if (object.privateClusterConfig != null) { if (typeof object.privateClusterConfig !== "object") throw TypeError(".google.cloud.workstations.v1beta.WorkstationCluster.privateClusterConfig: object expected"); @@ -13756,6 +13822,7 @@ object.subnetwork = ""; object.privateClusterConfig = null; object.degraded = false; + object.controlPlaneIp = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -13797,6 +13864,8 @@ for (var j = 0; j < keys2.length; ++j) object.labels[keys2[j]] = message.labels[keys2[j]]; } + if (message.controlPlaneIp != null && message.hasOwnProperty("controlPlaneIp")) + object.controlPlaneIp = message.controlPlaneIp; return object; }; @@ -14141,8 +14210,10 @@ * @property {Array.|null} [persistentDirectories] WorkstationConfig persistentDirectories * @property {google.cloud.workstations.v1beta.WorkstationConfig.IContainer|null} [container] WorkstationConfig container * @property {google.cloud.workstations.v1beta.WorkstationConfig.ICustomerEncryptionKey|null} [encryptionKey] WorkstationConfig encryptionKey + * @property {Array.|null} [readinessChecks] WorkstationConfig readinessChecks * @property {boolean|null} [degraded] WorkstationConfig degraded * @property {Array.|null} [conditions] WorkstationConfig conditions + * @property {boolean|null} [enableAuditAgent] WorkstationConfig enableAuditAgent */ /** @@ -14157,6 +14228,7 @@ this.annotations = {}; this.labels = {}; this.persistentDirectories = []; + this.readinessChecks = []; this.conditions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -14292,6 +14364,14 @@ */ WorkstationConfig.prototype.encryptionKey = null; + /** + * WorkstationConfig readinessChecks. + * @member {Array.} readinessChecks + * @memberof google.cloud.workstations.v1beta.WorkstationConfig + * @instance + */ + WorkstationConfig.prototype.readinessChecks = $util.emptyArray; + /** * WorkstationConfig degraded. * @member {boolean} degraded @@ -14308,6 +14388,14 @@ */ WorkstationConfig.prototype.conditions = $util.emptyArray; + /** + * WorkstationConfig enableAuditAgent. + * @member {boolean} enableAuditAgent + * @memberof google.cloud.workstations.v1beta.WorkstationConfig + * @instance + */ + WorkstationConfig.prototype.enableAuditAgent = false; + /** * Creates a new WorkstationConfig instance using the specified properties. * @function create @@ -14372,6 +14460,11 @@ if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) writer.uint32(/* id 18, wireType 2 =*/146).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.readinessChecks != null && message.readinessChecks.length) + for (var i = 0; i < message.readinessChecks.length; ++i) + $root.google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck.encode(message.readinessChecks[i], writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.enableAuditAgent != null && Object.hasOwnProperty.call(message, "enableAuditAgent")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.enableAuditAgent); return writer; }; @@ -14510,6 +14603,12 @@ message.encryptionKey = $root.google.cloud.workstations.v1beta.WorkstationConfig.CustomerEncryptionKey.decode(reader, reader.uint32()); break; } + case 19: { + if (!(message.readinessChecks && message.readinessChecks.length)) + message.readinessChecks = []; + message.readinessChecks.push($root.google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck.decode(reader, reader.uint32())); + break; + } case 15: { message.degraded = reader.bool(); break; @@ -14520,6 +14619,10 @@ message.conditions.push($root.google.rpc.Status.decode(reader, reader.uint32())); break; } + case 20: { + message.enableAuditAgent = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -14635,6 +14738,15 @@ if (error) return "encryptionKey." + error; } + if (message.readinessChecks != null && message.hasOwnProperty("readinessChecks")) { + if (!Array.isArray(message.readinessChecks)) + return "readinessChecks: array expected"; + for (var i = 0; i < message.readinessChecks.length; ++i) { + var error = $root.google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck.verify(message.readinessChecks[i]); + if (error) + return "readinessChecks." + error; + } + } if (message.degraded != null && message.hasOwnProperty("degraded")) if (typeof message.degraded !== "boolean") return "degraded: boolean expected"; @@ -14647,6 +14759,9 @@ return "conditions." + error; } } + if (message.enableAuditAgent != null && message.hasOwnProperty("enableAuditAgent")) + if (typeof message.enableAuditAgent !== "boolean") + return "enableAuditAgent: boolean expected"; return null; }; @@ -14736,6 +14851,16 @@ throw TypeError(".google.cloud.workstations.v1beta.WorkstationConfig.encryptionKey: object expected"); message.encryptionKey = $root.google.cloud.workstations.v1beta.WorkstationConfig.CustomerEncryptionKey.fromObject(object.encryptionKey); } + if (object.readinessChecks) { + if (!Array.isArray(object.readinessChecks)) + throw TypeError(".google.cloud.workstations.v1beta.WorkstationConfig.readinessChecks: array expected"); + message.readinessChecks = []; + for (var i = 0; i < object.readinessChecks.length; ++i) { + if (typeof object.readinessChecks[i] !== "object") + throw TypeError(".google.cloud.workstations.v1beta.WorkstationConfig.readinessChecks: object expected"); + message.readinessChecks[i] = $root.google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck.fromObject(object.readinessChecks[i]); + } + } if (object.degraded != null) message.degraded = Boolean(object.degraded); if (object.conditions) { @@ -14748,6 +14873,8 @@ message.conditions[i] = $root.google.rpc.Status.fromObject(object.conditions[i]); } } + if (object.enableAuditAgent != null) + message.enableAuditAgent = Boolean(object.enableAuditAgent); return message; }; @@ -14767,6 +14894,7 @@ if (options.arrays || options.defaults) { object.persistentDirectories = []; object.conditions = []; + object.readinessChecks = []; } if (options.objects || options.defaults) { object.annotations = {}; @@ -14787,6 +14915,7 @@ object.container = null; object.degraded = false; object.encryptionKey = null; + object.enableAuditAgent = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -14837,6 +14966,13 @@ for (var j = 0; j < keys2.length; ++j) object.labels[keys2[j]] = message.labels[keys2[j]]; } + if (message.readinessChecks && message.readinessChecks.length) { + object.readinessChecks = []; + for (var j = 0; j < message.readinessChecks.length; ++j) + object.readinessChecks[j] = $root.google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck.toObject(message.readinessChecks[j], options); + } + if (message.enableAuditAgent != null && message.hasOwnProperty("enableAuditAgent")) + object.enableAuditAgent = message.enableAuditAgent; return object; }; @@ -15100,10 +15236,12 @@ * @property {string|null} [serviceAccount] GceInstance serviceAccount * @property {Array.|null} [tags] GceInstance tags * @property {number|null} [poolSize] GceInstance poolSize + * @property {number|null} [pooledInstances] GceInstance pooledInstances * @property {boolean|null} [disablePublicIpAddresses] GceInstance disablePublicIpAddresses * @property {google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.IGceShieldedInstanceConfig|null} [shieldedInstanceConfig] GceInstance shieldedInstanceConfig * @property {google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.IGceConfidentialInstanceConfig|null} [confidentialInstanceConfig] GceInstance confidentialInstanceConfig * @property {number|null} [bootDiskSizeGb] GceInstance bootDiskSizeGb + * @property {Array.|null} [accelerators] GceInstance accelerators */ /** @@ -15116,6 +15254,7 @@ */ function GceInstance(properties) { this.tags = []; + this.accelerators = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15154,6 +15293,14 @@ */ GceInstance.prototype.poolSize = 0; + /** + * GceInstance pooledInstances. + * @member {number} pooledInstances + * @memberof google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance + * @instance + */ + GceInstance.prototype.pooledInstances = 0; + /** * GceInstance disablePublicIpAddresses. * @member {boolean} disablePublicIpAddresses @@ -15186,6 +15333,14 @@ */ GceInstance.prototype.bootDiskSizeGb = 0; + /** + * GceInstance accelerators. + * @member {Array.} accelerators + * @memberof google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance + * @instance + */ + GceInstance.prototype.accelerators = $util.emptyArray; + /** * Creates a new GceInstance instance using the specified properties. * @function create @@ -15227,6 +15382,11 @@ writer.uint32(/* id 9, wireType 0 =*/72).int32(message.bootDiskSizeGb); if (message.confidentialInstanceConfig != null && Object.hasOwnProperty.call(message, "confidentialInstanceConfig")) $root.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.GceConfidentialInstanceConfig.encode(message.confidentialInstanceConfig, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.accelerators != null && message.accelerators.length) + for (var i = 0; i < message.accelerators.length; ++i) + $root.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator.encode(message.accelerators[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.pooledInstances != null && Object.hasOwnProperty.call(message, "pooledInstances")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.pooledInstances); return writer; }; @@ -15279,6 +15439,10 @@ message.poolSize = reader.int32(); break; } + case 12: { + message.pooledInstances = reader.int32(); + break; + } case 6: { message.disablePublicIpAddresses = reader.bool(); break; @@ -15295,6 +15459,12 @@ message.bootDiskSizeGb = reader.int32(); break; } + case 11: { + if (!(message.accelerators && message.accelerators.length)) + message.accelerators = []; + message.accelerators.push($root.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -15346,6 +15516,9 @@ if (message.poolSize != null && message.hasOwnProperty("poolSize")) if (!$util.isInteger(message.poolSize)) return "poolSize: integer expected"; + if (message.pooledInstances != null && message.hasOwnProperty("pooledInstances")) + if (!$util.isInteger(message.pooledInstances)) + return "pooledInstances: integer expected"; if (message.disablePublicIpAddresses != null && message.hasOwnProperty("disablePublicIpAddresses")) if (typeof message.disablePublicIpAddresses !== "boolean") return "disablePublicIpAddresses: boolean expected"; @@ -15362,6 +15535,15 @@ if (message.bootDiskSizeGb != null && message.hasOwnProperty("bootDiskSizeGb")) if (!$util.isInteger(message.bootDiskSizeGb)) return "bootDiskSizeGb: integer expected"; + if (message.accelerators != null && message.hasOwnProperty("accelerators")) { + if (!Array.isArray(message.accelerators)) + return "accelerators: array expected"; + for (var i = 0; i < message.accelerators.length; ++i) { + var error = $root.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator.verify(message.accelerators[i]); + if (error) + return "accelerators." + error; + } + } return null; }; @@ -15390,6 +15572,8 @@ } if (object.poolSize != null) message.poolSize = object.poolSize | 0; + if (object.pooledInstances != null) + message.pooledInstances = object.pooledInstances | 0; if (object.disablePublicIpAddresses != null) message.disablePublicIpAddresses = Boolean(object.disablePublicIpAddresses); if (object.shieldedInstanceConfig != null) { @@ -15404,6 +15588,16 @@ } if (object.bootDiskSizeGb != null) message.bootDiskSizeGb = object.bootDiskSizeGb | 0; + if (object.accelerators) { + if (!Array.isArray(object.accelerators)) + throw TypeError(".google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.accelerators: array expected"); + message.accelerators = []; + for (var i = 0; i < object.accelerators.length; ++i) { + if (typeof object.accelerators[i] !== "object") + throw TypeError(".google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.accelerators: object expected"); + message.accelerators[i] = $root.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator.fromObject(object.accelerators[i]); + } + } return message; }; @@ -15420,8 +15614,10 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.tags = []; + object.accelerators = []; + } if (options.defaults) { object.machineType = ""; object.serviceAccount = ""; @@ -15430,6 +15626,7 @@ object.shieldedInstanceConfig = null; object.bootDiskSizeGb = 0; object.confidentialInstanceConfig = null; + object.pooledInstances = 0; } if (message.machineType != null && message.hasOwnProperty("machineType")) object.machineType = message.machineType; @@ -15450,6 +15647,13 @@ object.bootDiskSizeGb = message.bootDiskSizeGb; if (message.confidentialInstanceConfig != null && message.hasOwnProperty("confidentialInstanceConfig")) object.confidentialInstanceConfig = $root.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.GceConfidentialInstanceConfig.toObject(message.confidentialInstanceConfig, options); + if (message.accelerators && message.accelerators.length) { + object.accelerators = []; + for (var j = 0; j < message.accelerators.length; ++j) + object.accelerators[j] = $root.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator.toObject(message.accelerators[j], options); + } + if (message.pooledInstances != null && message.hasOwnProperty("pooledInstances")) + object.pooledInstances = message.pooledInstances; return object; }; @@ -15932,6 +16136,233 @@ return GceConfidentialInstanceConfig; })(); + GceInstance.Accelerator = (function() { + + /** + * Properties of an Accelerator. + * @memberof google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance + * @interface IAccelerator + * @property {string|null} [type] Accelerator type + * @property {number|null} [count] Accelerator count + */ + + /** + * Constructs a new Accelerator. + * @memberof google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance + * @classdesc Represents an Accelerator. + * @implements IAccelerator + * @constructor + * @param {google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.IAccelerator=} [properties] Properties to set + */ + function Accelerator(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]]; + } + + /** + * Accelerator type. + * @member {string} type + * @memberof google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator + * @instance + */ + Accelerator.prototype.type = ""; + + /** + * Accelerator count. + * @member {number} count + * @memberof google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator + * @instance + */ + Accelerator.prototype.count = 0; + + /** + * Creates a new Accelerator instance using the specified properties. + * @function create + * @memberof google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator + * @static + * @param {google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.IAccelerator=} [properties] Properties to set + * @returns {google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator} Accelerator instance + */ + Accelerator.create = function create(properties) { + return new Accelerator(properties); + }; + + /** + * Encodes the specified Accelerator message. Does not implicitly {@link google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator.verify|verify} messages. + * @function encode + * @memberof google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator + * @static + * @param {google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.IAccelerator} message Accelerator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Accelerator.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.count); + return writer; + }; + + /** + * Encodes the specified Accelerator message, length delimited. Does not implicitly {@link google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator + * @static + * @param {google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.IAccelerator} message Accelerator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Accelerator.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Accelerator message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator} Accelerator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Accelerator.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.count = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Accelerator message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator} Accelerator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Accelerator.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Accelerator message. + * @function verify + * @memberof google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Accelerator.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count)) + return "count: integer expected"; + return null; + }; + + /** + * Creates an Accelerator message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator} Accelerator + */ + Accelerator.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator) + return object; + var message = new $root.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator(); + if (object.type != null) + message.type = String(object.type); + if (object.count != null) + message.count = object.count | 0; + return message; + }; + + /** + * Creates a plain object from an Accelerator message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator + * @static + * @param {google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator} message Accelerator + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Accelerator.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.count = 0; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.count != null && message.hasOwnProperty("count")) + object.count = message.count; + return object; + }; + + /** + * Converts this Accelerator to JSON. + * @function toJSON + * @memberof google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator + * @instance + * @returns {Object.} JSON object + */ + Accelerator.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Accelerator + * @function getTypeUrl + * @memberof google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Accelerator.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator"; + }; + + return Accelerator; + })(); + return GceInstance; })(); @@ -17141,6 +17572,233 @@ return CustomerEncryptionKey; })(); + WorkstationConfig.ReadinessCheck = (function() { + + /** + * Properties of a ReadinessCheck. + * @memberof google.cloud.workstations.v1beta.WorkstationConfig + * @interface IReadinessCheck + * @property {string|null} [path] ReadinessCheck path + * @property {number|null} [port] ReadinessCheck port + */ + + /** + * Constructs a new ReadinessCheck. + * @memberof google.cloud.workstations.v1beta.WorkstationConfig + * @classdesc Represents a ReadinessCheck. + * @implements IReadinessCheck + * @constructor + * @param {google.cloud.workstations.v1beta.WorkstationConfig.IReadinessCheck=} [properties] Properties to set + */ + function ReadinessCheck(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]]; + } + + /** + * ReadinessCheck path. + * @member {string} path + * @memberof google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck + * @instance + */ + ReadinessCheck.prototype.path = ""; + + /** + * ReadinessCheck port. + * @member {number} port + * @memberof google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck + * @instance + */ + ReadinessCheck.prototype.port = 0; + + /** + * Creates a new ReadinessCheck instance using the specified properties. + * @function create + * @memberof google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck + * @static + * @param {google.cloud.workstations.v1beta.WorkstationConfig.IReadinessCheck=} [properties] Properties to set + * @returns {google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck} ReadinessCheck instance + */ + ReadinessCheck.create = function create(properties) { + return new ReadinessCheck(properties); + }; + + /** + * Encodes the specified ReadinessCheck message. Does not implicitly {@link google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck.verify|verify} messages. + * @function encode + * @memberof google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck + * @static + * @param {google.cloud.workstations.v1beta.WorkstationConfig.IReadinessCheck} message ReadinessCheck message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadinessCheck.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); + if (message.port != null && Object.hasOwnProperty.call(message, "port")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.port); + return writer; + }; + + /** + * Encodes the specified ReadinessCheck message, length delimited. Does not implicitly {@link google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck + * @static + * @param {google.cloud.workstations.v1beta.WorkstationConfig.IReadinessCheck} message ReadinessCheck message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadinessCheck.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReadinessCheck message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck} ReadinessCheck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadinessCheck.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.path = reader.string(); + break; + } + case 2: { + message.port = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReadinessCheck message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck} ReadinessCheck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadinessCheck.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReadinessCheck message. + * @function verify + * @memberof google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReadinessCheck.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.port != null && message.hasOwnProperty("port")) + if (!$util.isInteger(message.port)) + return "port: integer expected"; + return null; + }; + + /** + * Creates a ReadinessCheck message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck} ReadinessCheck + */ + ReadinessCheck.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck) + return object; + var message = new $root.google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck(); + if (object.path != null) + message.path = String(object.path); + if (object.port != null) + message.port = object.port | 0; + return message; + }; + + /** + * Creates a plain object from a ReadinessCheck message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck + * @static + * @param {google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck} message ReadinessCheck + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReadinessCheck.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.path = ""; + object.port = 0; + } + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.port != null && message.hasOwnProperty("port")) + object.port = message.port; + return object; + }; + + /** + * Converts this ReadinessCheck to JSON. + * @function toJSON + * @memberof google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck + * @instance + * @returns {Object.} JSON object + */ + ReadinessCheck.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReadinessCheck + * @function getTypeUrl + * @memberof google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReadinessCheck.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck"; + }; + + return ReadinessCheck; + })(); + return WorkstationConfig; })(); @@ -17162,6 +17820,7 @@ * @property {string|null} [etag] Workstation etag * @property {google.cloud.workstations.v1beta.Workstation.State|null} [state] Workstation state * @property {string|null} [host] Workstation host + * @property {Object.|null} [env] Workstation env */ /** @@ -17175,6 +17834,7 @@ function Workstation(properties) { this.annotations = {}; this.labels = {}; + this.env = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17277,6 +17937,14 @@ */ Workstation.prototype.host = ""; + /** + * Workstation env. + * @member {Object.} env + * @memberof google.cloud.workstations.v1beta.Workstation + * @instance + */ + Workstation.prototype.env = $util.emptyObject; + /** * Creates a new Workstation instance using the specified properties. * @function create @@ -17324,6 +17992,9 @@ writer.uint32(/* id 10, wireType 0 =*/80).int32(message.state); if (message.host != null && Object.hasOwnProperty.call(message, "host")) writer.uint32(/* id 11, wireType 2 =*/90).string(message.host); + if (message.env != null && Object.hasOwnProperty.call(message, "env")) + for (var keys = Object.keys(message.env), i = 0; i < keys.length; ++i) + writer.uint32(/* id 12, wireType 2 =*/98).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.env[keys[i]]).ldelim(); if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) writer.uint32(/* id 13, wireType 2 =*/106).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); @@ -17447,6 +18118,29 @@ message.host = reader.string(); break; } + case 12: { + if (message.env === $util.emptyObject) + message.env = {}; + 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.env[key] = value; + break; + } default: reader.skipType(tag & 7); break; @@ -17542,6 +18236,14 @@ if (message.host != null && message.hasOwnProperty("host")) if (!$util.isString(message.host)) return "host: string expected"; + if (message.env != null && message.hasOwnProperty("env")) { + if (!$util.isObject(message.env)) + return "env: object expected"; + var key = Object.keys(message.env); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.env[key[i]])) + return "env: string{k:string} expected"; + } return null; }; @@ -17626,6 +18328,13 @@ } if (object.host != null) message.host = String(object.host); + if (object.env) { + if (typeof object.env !== "object") + throw TypeError(".google.cloud.workstations.v1beta.Workstation.env: object expected"); + message.env = {}; + for (var keys = Object.keys(object.env), i = 0; i < keys.length; ++i) + message.env[keys[i]] = String(object.env[keys[i]]); + } return message; }; @@ -17644,6 +18353,7 @@ var object = {}; if (options.objects || options.defaults) { object.annotations = {}; + object.env = {}; object.labels = {}; } if (options.defaults) { @@ -17684,6 +18394,11 @@ object.state = options.enums === String ? $root.google.cloud.workstations.v1beta.Workstation.State[message.state] === undefined ? message.state : $root.google.cloud.workstations.v1beta.Workstation.State[message.state] : message.state; if (message.host != null && message.hasOwnProperty("host")) object.host = message.host; + if (message.env && (keys2 = Object.keys(message.env)).length) { + object.env = {}; + for (var j = 0; j < keys2.length; ++j) + object.env[keys2[j]] = message.env[keys2[j]]; + } if (message.labels && (keys2 = Object.keys(message.labels)).length) { object.labels = {}; for (var j = 0; j < keys2.length; ++j) diff --git a/packages/google-cloud-workstations/protos/protos.json b/packages/google-cloud-workstations/protos/protos.json index 5e5787c3aaf..f6f009ca8a0 100644 --- a/packages/google-cloud-workstations/protos/protos.json +++ b/packages/google-cloud-workstations/protos/protos.json @@ -566,6 +566,13 @@ "(google.api.field_behavior)": "IMMUTABLE" } }, + "controlPlaneIp": { + "type": "string", + "id": 16, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "privateClusterConfig": { "type": "PrivateClusterConfig", "id": 12 @@ -706,7 +713,10 @@ }, "encryptionKey": { "type": "CustomerEncryptionKey", - "id": 17 + "id": 17, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } }, "degraded": { "type": "bool", @@ -759,6 +769,13 @@ "type": "int32", "id": 5 }, + "pooledInstances": { + "type": "int32", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "disablePublicIpAddresses": { "type": "bool", "id": 6 @@ -898,11 +915,17 @@ "fields": { "kmsKey": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } }, "kmsKeyServiceAccount": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } } } } @@ -2156,6 +2179,13 @@ "(google.api.field_behavior)": "IMMUTABLE" } }, + "controlPlaneIp": { + "type": "string", + "id": 16, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "privateClusterConfig": { "type": "PrivateClusterConfig", "id": 12 @@ -2296,7 +2326,15 @@ }, "encryptionKey": { "type": "CustomerEncryptionKey", - "id": 17 + "id": 17, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "readinessChecks": { + "rule": "repeated", + "type": "ReadinessCheck", + "id": 19 }, "degraded": { "type": "bool", @@ -2312,6 +2350,10 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "enableAuditAgent": { + "type": "bool", + "id": 20 } }, "nested": { @@ -2349,6 +2391,13 @@ "type": "int32", "id": 5 }, + "pooledInstances": { + "type": "int32", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "disablePublicIpAddresses": { "type": "bool", "id": 6 @@ -2364,6 +2413,11 @@ "bootDiskSizeGb": { "type": "int32", "id": 9 + }, + "accelerators": { + "rule": "repeated", + "type": "Accelerator", + "id": 11 } }, "nested": { @@ -2390,6 +2444,18 @@ "id": 1 } } + }, + "Accelerator": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "count": { + "type": "int32", + "id": 2 + } + } } } } @@ -2484,10 +2550,28 @@ "fields": { "kmsKey": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } }, "kmsKeyServiceAccount": { "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + } + }, + "ReadinessCheck": { + "fields": { + "path": { + "type": "string", + "id": 1 + }, + "port": { + "type": "int32", "id": 2 } } @@ -2571,6 +2655,11 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "env": { + "keyType": "string", + "type": "string", + "id": 12 } }, "nested": { diff --git a/packages/google-cloud-workstations/samples/README.md b/packages/google-cloud-workstations/samples/README.md index c6f5f4f3a85..542d8ae2946 100644 --- a/packages/google-cloud-workstations/samples/README.md +++ b/packages/google-cloud-workstations/samples/README.md @@ -53,7 +53,6 @@ * [Workstations.update_workstation_cluster](#workstations.update_workstation_cluster) * [Workstations.update_workstation_config](#workstations.update_workstation_config) * [Quickstart](#quickstart) - * [Quickstart](#quickstart) ## Before you begin @@ -762,23 +761,6 @@ __Usage:__ `node packages/google-cloud-workstations/samples/quickstart.js` ------ - - - - -### Quickstart - -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-workstations/samples/test/quickstart.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-workstations/samples/test/quickstart.js,samples/README.md) - -__Usage:__ - - -`node packages/google-cloud-workstations/samples/test/quickstart.js` - - diff --git a/packages/google-cloud-workstations/samples/generated/v1/snippet_metadata.google.cloud.workstations.v1.json b/packages/google-cloud-workstations/samples/generated/v1/snippet_metadata.google.cloud.workstations.v1.json index 5ab3eb237a4..03c5c83f3d8 100644 --- a/packages/google-cloud-workstations/samples/generated/v1/snippet_metadata.google.cloud.workstations.v1.json +++ b/packages/google-cloud-workstations/samples/generated/v1/snippet_metadata.google.cloud.workstations.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-workstations", - "version": "0.1.0", + "version": "0.2.0", "language": "TYPESCRIPT", "apis": [ { @@ -299,7 +299,7 @@ "regionTag": "workstations_v1_generated_Workstations_ListWorkstationConfigs_async", "title": "Workstations listWorkstationConfigs Sample", "origin": "API_DEFINITION", - "description": " Returns all WorkstationConfigs in the specified cluster.", + "description": " Returns all workstation configurations in the specified cluster.", "canonical": true, "file": "workstations.list_workstation_configs.js", "language": "JAVASCRIPT", @@ -454,7 +454,7 @@ "segments": [ { "start": 25, - "end": 69, + "end": 71, "type": "FULL" } ], @@ -506,7 +506,7 @@ "segments": [ { "start": 25, - "end": 69, + "end": 70, "type": "FULL" } ], @@ -591,7 +591,7 @@ "regionTag": "workstations_v1_generated_Workstations_ListWorkstations_async", "title": "Workstations listWorkstations Sample", "origin": "API_DEFINITION", - "description": " Returns all Workstations using the specified config.", + "description": " Returns all Workstations using the specified workstation configuration.", "canonical": true, "file": "workstations.list_workstations.js", "language": "JAVASCRIPT", @@ -639,7 +639,7 @@ "regionTag": "workstations_v1_generated_Workstations_ListUsableWorkstations_async", "title": "Workstations listUsableWorkstations Sample", "origin": "API_DEFINITION", - "description": " Returns all Workstations using the specified config on which the caller has the \"workstations.workstations.use\" permission.", + "description": " Returns all workstations using the specified workstation configuration on which the caller has the \"workstations.workstations.use\" permission.", "canonical": true, "file": "workstations.list_usable_workstations.js", "language": "JAVASCRIPT", @@ -746,7 +746,7 @@ "segments": [ { "start": 25, - "end": 69, + "end": 71, "type": "FULL" } ], diff --git a/packages/google-cloud-workstations/samples/generated/v1/workstations.create_workstation_config.js b/packages/google-cloud-workstations/samples/generated/v1/workstations.create_workstation_config.js index 4c0e7f3ea0e..33c9e27bda5 100644 --- a/packages/google-cloud-workstations/samples/generated/v1/workstations.create_workstation_config.js +++ b/packages/google-cloud-workstations/samples/generated/v1/workstations.create_workstation_config.js @@ -33,7 +33,7 @@ function main(parent, workstationConfigId, workstationConfig) { */ // const parent = 'abc123' /** - * Required. ID to use for the config. + * Required. ID to use for the workstation configuration. */ // const workstationConfigId = 'abc123' /** diff --git a/packages/google-cloud-workstations/samples/generated/v1/workstations.delete_workstation.js b/packages/google-cloud-workstations/samples/generated/v1/workstations.delete_workstation.js index a585717a1ac..5e3cb409309 100644 --- a/packages/google-cloud-workstations/samples/generated/v1/workstations.delete_workstation.js +++ b/packages/google-cloud-workstations/samples/generated/v1/workstations.delete_workstation.js @@ -39,7 +39,7 @@ function main(name) { // const validateOnly = true /** * If set, the request will be rejected if the latest version of the - * workstation on the server does not have this etag. + * workstation on the server does not have this ETag. */ // const etag = 'abc123' diff --git a/packages/google-cloud-workstations/samples/generated/v1/workstations.delete_workstation_cluster.js b/packages/google-cloud-workstations/samples/generated/v1/workstations.delete_workstation_cluster.js index 3c33c358517..9b25cc73f57 100644 --- a/packages/google-cloud-workstations/samples/generated/v1/workstations.delete_workstation_cluster.js +++ b/packages/google-cloud-workstations/samples/generated/v1/workstations.delete_workstation_cluster.js @@ -38,7 +38,7 @@ function main(name) { // const validateOnly = true /** * If set, the request will be rejected if the latest version of the - * workstation cluster on the server does not have this etag. + * workstation cluster on the server does not have this ETag. */ // const etag = 'abc123' /** diff --git a/packages/google-cloud-workstations/samples/generated/v1/workstations.delete_workstation_config.js b/packages/google-cloud-workstations/samples/generated/v1/workstations.delete_workstation_config.js index c3b93d2678e..e97506ccfd9 100644 --- a/packages/google-cloud-workstations/samples/generated/v1/workstations.delete_workstation_config.js +++ b/packages/google-cloud-workstations/samples/generated/v1/workstations.delete_workstation_config.js @@ -29,7 +29,7 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. Name of the config to delete. + * Required. Name of the workstation configuration to delete. */ // const name = 'abc123' /** @@ -38,13 +38,14 @@ function main(name) { */ // const validateOnly = true /** - * If set, the request will be rejected if the latest version of the config on - * the server does not have this etag. + * If set, the request is rejected if the latest version of the + * workstation configuration on the server does not have this ETag. */ // const etag = 'abc123' /** - * If set, any Workstations in the config will also be deleted. Otherwise, - * the request will work only if the config has no workstations. + * If set, any workstations in the workstation configuration are also deleted. + * Otherwise, the request works only if the workstation configuration has + * no workstations. */ // const force = true diff --git a/packages/google-cloud-workstations/samples/generated/v1/workstations.start_workstation.js b/packages/google-cloud-workstations/samples/generated/v1/workstations.start_workstation.js index b4aa824bd61..dd5a70e0bb0 100644 --- a/packages/google-cloud-workstations/samples/generated/v1/workstations.start_workstation.js +++ b/packages/google-cloud-workstations/samples/generated/v1/workstations.start_workstation.js @@ -39,7 +39,7 @@ function main(name) { // const validateOnly = true /** * If set, the request will be rejected if the latest version of the - * workstation on the server does not have this etag. + * workstation on the server does not have this ETag. */ // const etag = 'abc123' diff --git a/packages/google-cloud-workstations/samples/generated/v1/workstations.stop_workstation.js b/packages/google-cloud-workstations/samples/generated/v1/workstations.stop_workstation.js index ab24801bd3f..2c33aeaecb9 100644 --- a/packages/google-cloud-workstations/samples/generated/v1/workstations.stop_workstation.js +++ b/packages/google-cloud-workstations/samples/generated/v1/workstations.stop_workstation.js @@ -39,7 +39,7 @@ function main(name) { // const validateOnly = true /** * If set, the request will be rejected if the latest version of the - * workstation on the server does not have this etag. + * workstation on the server does not have this ETag. */ // const etag = 'abc123' diff --git a/packages/google-cloud-workstations/samples/generated/v1/workstations.update_workstation.js b/packages/google-cloud-workstations/samples/generated/v1/workstations.update_workstation.js index 639fd0922d0..5f69359861f 100644 --- a/packages/google-cloud-workstations/samples/generated/v1/workstations.update_workstation.js +++ b/packages/google-cloud-workstations/samples/generated/v1/workstations.update_workstation.js @@ -33,7 +33,8 @@ function main(workstation, updateMask) { */ // const workstation = {} /** - * Required. Mask specifying which fields in the config should be updated. + * Required. Mask specifying which fields in the workstation configuration + * should be updated. */ // const updateMask = {} /** @@ -42,8 +43,9 @@ function main(workstation, updateMask) { */ // const validateOnly = true /** - * If set, and the config is not found, a new config will be created. - * In this situation, update_mask is ignored. + * If set and the workstation configuration is not found, a new + * workstation configuration is created. In this situation, update_mask + * is ignored. */ // const allowMissing = true diff --git a/packages/google-cloud-workstations/samples/generated/v1/workstations.update_workstation_config.js b/packages/google-cloud-workstations/samples/generated/v1/workstations.update_workstation_config.js index 0c8fb992fcd..b9213a81e2b 100644 --- a/packages/google-cloud-workstations/samples/generated/v1/workstations.update_workstation_config.js +++ b/packages/google-cloud-workstations/samples/generated/v1/workstations.update_workstation_config.js @@ -33,7 +33,8 @@ function main(workstationConfig, updateMask) { */ // const workstationConfig = {} /** - * Required. Mask specifying which fields in the config should be updated. + * Required. Mask specifying which fields in the workstation configuration + * should be updated. */ // const updateMask = {} /** @@ -42,8 +43,9 @@ function main(workstationConfig, updateMask) { */ // const validateOnly = true /** - * If set, and the config is not found, a new config will be created. - * In this situation, update_mask is ignored. + * If set and the workstation configuration is not found, a new + * workstation configuration will be created. In this situation, + * update_mask is ignored. */ // const allowMissing = true diff --git a/packages/google-cloud-workstations/samples/generated/v1beta/snippet_metadata.google.cloud.workstations.v1beta.json b/packages/google-cloud-workstations/samples/generated/v1beta/snippet_metadata.google.cloud.workstations.v1beta.json index 59d8ccd1e92..ad0612a8c14 100644 --- a/packages/google-cloud-workstations/samples/generated/v1beta/snippet_metadata.google.cloud.workstations.v1beta.json +++ b/packages/google-cloud-workstations/samples/generated/v1beta/snippet_metadata.google.cloud.workstations.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-workstations", - "version": "0.1.0", + "version": "0.2.0", "language": "TYPESCRIPT", "apis": [ { @@ -454,7 +454,7 @@ "segments": [ { "start": 25, - "end": 69, + "end": 71, "type": "FULL" } ], @@ -506,7 +506,7 @@ "segments": [ { "start": 25, - "end": 69, + "end": 70, "type": "FULL" } ], @@ -591,7 +591,7 @@ "regionTag": "workstations_v1beta_generated_Workstations_ListWorkstations_async", "title": "Workstations listWorkstations Sample", "origin": "API_DEFINITION", - "description": " Returns all Workstations using the specified config.", + "description": " Returns all Workstations using the specified workstation configuration.", "canonical": true, "file": "workstations.list_workstations.js", "language": "JAVASCRIPT", @@ -639,7 +639,7 @@ "regionTag": "workstations_v1beta_generated_Workstations_ListUsableWorkstations_async", "title": "Workstations listUsableWorkstations Sample", "origin": "API_DEFINITION", - "description": " Returns all Workstations using the specified config on which the caller has the \"workstations.workstations.use\" permission.", + "description": " Returns all workstations using the specified workstation configuration on which the caller has the \"workstations.workstations.use\" permission.", "canonical": true, "file": "workstations.list_usable_workstations.js", "language": "JAVASCRIPT", @@ -746,7 +746,7 @@ "segments": [ { "start": 25, - "end": 69, + "end": 71, "type": "FULL" } ], diff --git a/packages/google-cloud-workstations/samples/generated/v1beta/workstations.create_workstation_config.js b/packages/google-cloud-workstations/samples/generated/v1beta/workstations.create_workstation_config.js index 47c69f52599..06b8cdb0a1b 100644 --- a/packages/google-cloud-workstations/samples/generated/v1beta/workstations.create_workstation_config.js +++ b/packages/google-cloud-workstations/samples/generated/v1beta/workstations.create_workstation_config.js @@ -33,7 +33,7 @@ function main(parent, workstationConfigId, workstationConfig) { */ // const parent = 'abc123' /** - * Required. ID to use for the config. + * Required. ID to use for the workstation configuration. */ // const workstationConfigId = 'abc123' /** diff --git a/packages/google-cloud-workstations/samples/generated/v1beta/workstations.delete_workstation.js b/packages/google-cloud-workstations/samples/generated/v1beta/workstations.delete_workstation.js index 6a779b14fa2..2bbc0c5091a 100644 --- a/packages/google-cloud-workstations/samples/generated/v1beta/workstations.delete_workstation.js +++ b/packages/google-cloud-workstations/samples/generated/v1beta/workstations.delete_workstation.js @@ -39,7 +39,7 @@ function main(name) { // const validateOnly = true /** * If set, the request will be rejected if the latest version of the - * workstation on the server does not have this etag. + * workstation on the server does not have this ETag. */ // const etag = 'abc123' diff --git a/packages/google-cloud-workstations/samples/generated/v1beta/workstations.delete_workstation_cluster.js b/packages/google-cloud-workstations/samples/generated/v1beta/workstations.delete_workstation_cluster.js index 8f9e0813bc4..e6b9d1833ed 100644 --- a/packages/google-cloud-workstations/samples/generated/v1beta/workstations.delete_workstation_cluster.js +++ b/packages/google-cloud-workstations/samples/generated/v1beta/workstations.delete_workstation_cluster.js @@ -38,7 +38,7 @@ function main(name) { // const validateOnly = true /** * If set, the request will be rejected if the latest version of the - * workstation cluster on the server does not have this etag. + * workstation cluster on the server does not have this ETag. */ // const etag = 'abc123' /** diff --git a/packages/google-cloud-workstations/samples/generated/v1beta/workstations.delete_workstation_config.js b/packages/google-cloud-workstations/samples/generated/v1beta/workstations.delete_workstation_config.js index 5c196b311b9..689d9f063ca 100644 --- a/packages/google-cloud-workstations/samples/generated/v1beta/workstations.delete_workstation_config.js +++ b/packages/google-cloud-workstations/samples/generated/v1beta/workstations.delete_workstation_config.js @@ -29,7 +29,7 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. Name of the config to delete. + * Required. Name of the workstation configuration to delete. */ // const name = 'abc123' /** @@ -38,13 +38,14 @@ function main(name) { */ // const validateOnly = true /** - * If set, the request will be rejected if the latest version of the config on - * the server does not have this etag. + * If set, the request is rejected if the latest version of the + * workstation configuration on the server does not have this ETag. */ // const etag = 'abc123' /** - * If set, any Workstations in the config will also be deleted. Otherwise, - * the request will work only if the config has no workstations. + * If set, any workstations in the workstation configuration are also deleted. + * Otherwise, the request works only if the workstation configuration has + * no workstations. */ // const force = true diff --git a/packages/google-cloud-workstations/samples/generated/v1beta/workstations.start_workstation.js b/packages/google-cloud-workstations/samples/generated/v1beta/workstations.start_workstation.js index d565efb06b9..80b23015d70 100644 --- a/packages/google-cloud-workstations/samples/generated/v1beta/workstations.start_workstation.js +++ b/packages/google-cloud-workstations/samples/generated/v1beta/workstations.start_workstation.js @@ -39,7 +39,7 @@ function main(name) { // const validateOnly = true /** * If set, the request will be rejected if the latest version of the - * workstation on the server does not have this etag. + * workstation on the server does not have this ETag. */ // const etag = 'abc123' diff --git a/packages/google-cloud-workstations/samples/generated/v1beta/workstations.stop_workstation.js b/packages/google-cloud-workstations/samples/generated/v1beta/workstations.stop_workstation.js index d4200cc45f5..16ad243fe8d 100644 --- a/packages/google-cloud-workstations/samples/generated/v1beta/workstations.stop_workstation.js +++ b/packages/google-cloud-workstations/samples/generated/v1beta/workstations.stop_workstation.js @@ -39,7 +39,7 @@ function main(name) { // const validateOnly = true /** * If set, the request will be rejected if the latest version of the - * workstation on the server does not have this etag. + * workstation on the server does not have this ETag. */ // const etag = 'abc123' diff --git a/packages/google-cloud-workstations/samples/generated/v1beta/workstations.update_workstation.js b/packages/google-cloud-workstations/samples/generated/v1beta/workstations.update_workstation.js index eba23cf1a39..3dcab94e56f 100644 --- a/packages/google-cloud-workstations/samples/generated/v1beta/workstations.update_workstation.js +++ b/packages/google-cloud-workstations/samples/generated/v1beta/workstations.update_workstation.js @@ -33,7 +33,8 @@ function main(workstation, updateMask) { */ // const workstation = {} /** - * Required. Mask specifying which fields in the config should be updated. + * Required. Mask specifying which fields in the workstation configuration + * should be updated. */ // const updateMask = {} /** @@ -42,8 +43,9 @@ function main(workstation, updateMask) { */ // const validateOnly = true /** - * If set, and the config is not found, a new config will be created. - * In this situation, update_mask is ignored. + * If set and the workstation configuration is not found, a new + * workstation configuration is created. In this situation, update_mask + * is ignored. */ // const allowMissing = true diff --git a/packages/google-cloud-workstations/samples/generated/v1beta/workstations.update_workstation_config.js b/packages/google-cloud-workstations/samples/generated/v1beta/workstations.update_workstation_config.js index 2fe7823e849..1d4a94bc91a 100644 --- a/packages/google-cloud-workstations/samples/generated/v1beta/workstations.update_workstation_config.js +++ b/packages/google-cloud-workstations/samples/generated/v1beta/workstations.update_workstation_config.js @@ -33,7 +33,8 @@ function main(workstationConfig, updateMask) { */ // const workstationConfig = {} /** - * Required. Mask specifying which fields in the config should be updated. + * Required. Mask specifying which fields in the workstation configuration + * should be updated. */ // const updateMask = {} /** @@ -42,8 +43,9 @@ function main(workstationConfig, updateMask) { */ // const validateOnly = true /** - * If set, and the config is not found, a new config will be created. - * In this situation, update_mask is ignored. + * If set and the workstation configuration is not found, a new + * workstation configuration will be created. In this situation, + * update_mask is ignored. */ // const allowMissing = true diff --git a/packages/google-cloud-workstations/samples/package.json b/packages/google-cloud-workstations/samples/package.json index f34304630e6..e2f67ba5235 100644 --- a/packages/google-cloud-workstations/samples/package.json +++ b/packages/google-cloud-workstations/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/workstations": "^0.1.1" + "@google-cloud/workstations": "^0.2.0" }, "devDependencies": { "c8": "^7.1.0", diff --git a/packages/google-cloud-workstations/src/v1/workstations_client.ts b/packages/google-cloud-workstations/src/v1/workstations_client.ts index 5f04d5e87a6..39cfa89ca3c 100644 --- a/packages/google-cloud-workstations/src/v1/workstations_client.ts +++ b/packages/google-cloud-workstations/src/v1/workstations_client.ts @@ -1315,7 +1315,7 @@ export class WorkstationsClient { * If set, validate the request and preview the review, but do not apply it. * @param {string} request.etag * If set, the request will be rejected if the latest version of the - * workstation cluster on the server does not have this etag. + * workstation cluster on the server does not have this ETag. * @param {boolean} request.force * If set, any workstation configurations and workstations in the * workstation cluster are also deleted. Otherwise, the request only @@ -1463,7 +1463,7 @@ export class WorkstationsClient { * @param {string} request.parent * Required. Parent resource name. * @param {string} request.workstationConfigId - * Required. ID to use for the config. + * Required. ID to use for the workstation configuration. * @param {google.cloud.workstations.v1.WorkstationConfig} request.workstationConfig * Required. Config to create. * @param {boolean} request.validateOnly @@ -1612,13 +1612,15 @@ export class WorkstationsClient { * @param {google.cloud.workstations.v1.WorkstationConfig} request.workstationConfig * Required. Config to update. * @param {google.protobuf.FieldMask} request.updateMask - * Required. Mask specifying which fields in the config should be updated. + * Required. Mask specifying which fields in the workstation configuration + * should be updated. * @param {boolean} request.validateOnly * If set, validate the request and preview the review, but do not actually * apply it. * @param {boolean} request.allowMissing - * If set, and the config is not found, a new config will be created. - * In this situation, update_mask is ignored. + * If set and the workstation configuration is not found, a new + * workstation configuration will be created. In this situation, + * update_mask is ignored. * @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. @@ -1760,16 +1762,17 @@ export class WorkstationsClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. Name of the config to delete. + * Required. Name of the workstation configuration to delete. * @param {boolean} request.validateOnly * If set, validate the request and preview the review, but do not actually * apply it. * @param {string} request.etag - * If set, the request will be rejected if the latest version of the config on - * the server does not have this etag. + * If set, the request is rejected if the latest version of the + * workstation configuration on the server does not have this ETag. * @param {boolean} request.force - * If set, any Workstations in the config will also be deleted. Otherwise, - * the request will work only if the config has no workstations. + * If set, any workstations in the workstation configuration are also deleted. + * Otherwise, the request works only if the workstation configuration has + * no workstations. * @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. @@ -2058,13 +2061,15 @@ export class WorkstationsClient { * @param {google.cloud.workstations.v1.Workstation} request.workstation * Required. Workstation to update. * @param {google.protobuf.FieldMask} request.updateMask - * Required. Mask specifying which fields in the config should be updated. + * Required. Mask specifying which fields in the workstation configuration + * should be updated. * @param {boolean} request.validateOnly * If set, validate the request and preview the review, but do not actually * apply it. * @param {boolean} request.allowMissing - * If set, and the config is not found, a new config will be created. - * In this situation, update_mask is ignored. + * If set and the workstation configuration is not found, a new + * workstation configuration is created. In this situation, update_mask + * is ignored. * @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. @@ -2208,7 +2213,7 @@ export class WorkstationsClient { * apply it. * @param {string} request.etag * If set, the request will be rejected if the latest version of the - * workstation on the server does not have this etag. + * workstation on the server does not have this ETag. * @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. @@ -2352,7 +2357,7 @@ export class WorkstationsClient { * apply it. * @param {string} request.etag * If set, the request will be rejected if the latest version of the - * workstation on the server does not have this etag. + * workstation on the server does not have this ETag. * @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. @@ -2496,7 +2501,7 @@ export class WorkstationsClient { * apply it. * @param {string} request.etag * If set, the request will be rejected if the latest version of the - * workstation on the server does not have this etag. + * workstation on the server does not have this ETag. * @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. @@ -2822,7 +2827,7 @@ export class WorkstationsClient { ) as AsyncIterable; } /** - * Returns all WorkstationConfigs in the specified cluster. + * Returns all workstation configurations in the specified cluster. * * @param {Object} request * The request object that will be sent. @@ -3209,7 +3214,7 @@ export class WorkstationsClient { ) as AsyncIterable; } /** - * Returns all Workstations using the specified config. + * Returns all Workstations using the specified workstation configuration. * * @param {Object} request * The request object that will be sent. @@ -3398,8 +3403,8 @@ export class WorkstationsClient { ) as AsyncIterable; } /** - * Returns all Workstations using the specified config on which the caller has - * the "workstations.workstations.use" permission. + * Returns all workstations using the specified workstation configuration + * on which the caller has the "workstations.workstations.use" permission. * * @param {Object} request * The request object that will be sent. diff --git a/packages/google-cloud-workstations/src/v1beta/workstations_client.ts b/packages/google-cloud-workstations/src/v1beta/workstations_client.ts index a1c9a6e6e07..b74e54f9068 100644 --- a/packages/google-cloud-workstations/src/v1beta/workstations_client.ts +++ b/packages/google-cloud-workstations/src/v1beta/workstations_client.ts @@ -1321,7 +1321,7 @@ export class WorkstationsClient { * If set, validate the request and preview the review, but do not apply it. * @param {string} request.etag * If set, the request will be rejected if the latest version of the - * workstation cluster on the server does not have this etag. + * workstation cluster on the server does not have this ETag. * @param {boolean} request.force * If set, any workstation configurations and workstations in the * workstation cluster are also deleted. Otherwise, the request only @@ -1469,7 +1469,7 @@ export class WorkstationsClient { * @param {string} request.parent * Required. Parent resource name. * @param {string} request.workstationConfigId - * Required. ID to use for the config. + * Required. ID to use for the workstation configuration. * @param {google.cloud.workstations.v1beta.WorkstationConfig} request.workstationConfig * Required. Config to create. * @param {boolean} request.validateOnly @@ -1618,13 +1618,15 @@ export class WorkstationsClient { * @param {google.cloud.workstations.v1beta.WorkstationConfig} request.workstationConfig * Required. Config to update. * @param {google.protobuf.FieldMask} request.updateMask - * Required. Mask specifying which fields in the config should be updated. + * Required. Mask specifying which fields in the workstation configuration + * should be updated. * @param {boolean} request.validateOnly * If set, validate the request and preview the review, but do not actually * apply it. * @param {boolean} request.allowMissing - * If set, and the config is not found, a new config will be created. - * In this situation, update_mask is ignored. + * If set and the workstation configuration is not found, a new + * workstation configuration will be created. In this situation, + * update_mask is ignored. * @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. @@ -1766,16 +1768,17 @@ export class WorkstationsClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. Name of the config to delete. + * Required. Name of the workstation configuration to delete. * @param {boolean} request.validateOnly * If set, validate the request and preview the review, but do not actually * apply it. * @param {string} request.etag - * If set, the request will be rejected if the latest version of the config on - * the server does not have this etag. + * If set, the request is rejected if the latest version of the + * workstation configuration on the server does not have this ETag. * @param {boolean} request.force - * If set, any Workstations in the config will also be deleted. Otherwise, - * the request will work only if the config has no workstations. + * If set, any workstations in the workstation configuration are also deleted. + * Otherwise, the request works only if the workstation configuration has + * no workstations. * @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. @@ -2064,13 +2067,15 @@ export class WorkstationsClient { * @param {google.cloud.workstations.v1beta.Workstation} request.workstation * Required. Workstation to update. * @param {google.protobuf.FieldMask} request.updateMask - * Required. Mask specifying which fields in the config should be updated. + * Required. Mask specifying which fields in the workstation configuration + * should be updated. * @param {boolean} request.validateOnly * If set, validate the request and preview the review, but do not actually * apply it. * @param {boolean} request.allowMissing - * If set, and the config is not found, a new config will be created. - * In this situation, update_mask is ignored. + * If set and the workstation configuration is not found, a new + * workstation configuration is created. In this situation, update_mask + * is ignored. * @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. @@ -2214,7 +2219,7 @@ export class WorkstationsClient { * apply it. * @param {string} request.etag * If set, the request will be rejected if the latest version of the - * workstation on the server does not have this etag. + * workstation on the server does not have this ETag. * @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. @@ -2358,7 +2363,7 @@ export class WorkstationsClient { * apply it. * @param {string} request.etag * If set, the request will be rejected if the latest version of the - * workstation on the server does not have this etag. + * workstation on the server does not have this ETag. * @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. @@ -2502,7 +2507,7 @@ export class WorkstationsClient { * apply it. * @param {string} request.etag * If set, the request will be rejected if the latest version of the - * workstation on the server does not have this etag. + * workstation on the server does not have this ETag. * @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. @@ -3215,7 +3220,7 @@ export class WorkstationsClient { ) as AsyncIterable; } /** - * Returns all Workstations using the specified config. + * Returns all Workstations using the specified workstation configuration. * * @param {Object} request * The request object that will be sent. @@ -3404,8 +3409,8 @@ export class WorkstationsClient { ) as AsyncIterable; } /** - * Returns all Workstations using the specified config on which the caller has - * the "workstations.workstations.use" permission. + * Returns all workstations using the specified workstation configuration + * on which the caller has the "workstations.workstations.use" permission. * * @param {Object} request * The request object that will be sent. diff --git a/packages/google-container/CHANGELOG.md b/packages/google-container/CHANGELOG.md index 8d7630b0242..49812b304ea 100644 --- a/packages/google-container/CHANGELOG.md +++ b/packages/google-container/CHANGELOG.md @@ -4,6 +4,27 @@ [1]: https://www.npmjs.com/package/@google-cloud/container?activeTab=versions +## [4.11.0](https://github.com/googleapis/google-cloud-node/compare/container-v4.10.0...container-v4.11.0) (2023-05-06) + + +### Features + +* [container] add a new feature for fleet registration via cluster update in v1alpha1, v1beta1, v1 ([#4244](https://github.com/googleapis/google-cloud-node/issues/4244)) ([b0fee2b](https://github.com/googleapis/google-cloud-node/commit/b0fee2bb364c671cb70b62a81567cf3544587eed)) + +## [4.10.0](https://github.com/googleapis/google-cloud-node/compare/container-v4.9.0...container-v4.10.0) (2023-05-04) + + +### Features + +* [container] support fleet registration via cluster update ([#4235](https://github.com/googleapis/google-cloud-node/issues/4235)) ([869218f](https://github.com/googleapis/google-cloud-node/commit/869218ffb438d90c3d6cb5e4566d7ad2d201020e)) + +## [4.9.0](https://github.com/googleapis/google-cloud-node/compare/container-v4.8.0...container-v4.9.0) (2023-04-24) + + +### Features + +* [container] Add support for updating additional pod IPv4 ranges for Standard and Autopilot clusters ([#4177](https://github.com/googleapis/google-cloud-node/issues/4177)) ([2beee25](https://github.com/googleapis/google-cloud-node/commit/2beee255de109032828ffd5f9f8fb9d62574787b)) + ## [4.8.0](https://github.com/googleapis/google-cloud-node/compare/container-v4.7.1...container-v4.8.0) (2023-04-13) diff --git a/packages/google-container/README.md b/packages/google-container/README.md index a8523b4e65d..87fce6c780b 100644 --- a/packages/google-container/README.md +++ b/packages/google-container/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Kubernetes Engine Cluster Manager API: Node.js Client](https://github.com/googleapis/google-cloud-node) +# [Kubernetes Engine Cluster Manager API: Node.js Client](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-container) [![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/container.svg)](https://www.npmjs.org/package/@google-cloud/container) @@ -85,79 +85,78 @@ main().catch(console.error); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-container/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Cluster_manager.cancel_operation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.cancel_operation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.cancel_operation.js,samples/README.md) | -| Cluster_manager.complete_i_p_rotation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.complete_i_p_rotation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.complete_i_p_rotation.js,samples/README.md) | -| Cluster_manager.complete_node_pool_upgrade | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.complete_node_pool_upgrade.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.complete_node_pool_upgrade.js,samples/README.md) | -| Cluster_manager.create_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.create_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.create_cluster.js,samples/README.md) | -| Cluster_manager.create_node_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.create_node_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.create_node_pool.js,samples/README.md) | -| Cluster_manager.delete_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.delete_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.delete_cluster.js,samples/README.md) | -| Cluster_manager.delete_node_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.delete_node_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.delete_node_pool.js,samples/README.md) | -| Cluster_manager.get_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.get_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.get_cluster.js,samples/README.md) | -| Cluster_manager.get_j_s_o_n_web_keys | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.get_j_s_o_n_web_keys.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.get_j_s_o_n_web_keys.js,samples/README.md) | -| Cluster_manager.get_node_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.get_node_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.get_node_pool.js,samples/README.md) | -| Cluster_manager.get_operation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.get_operation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.get_operation.js,samples/README.md) | -| Cluster_manager.get_server_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.get_server_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.get_server_config.js,samples/README.md) | -| Cluster_manager.list_clusters | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.list_clusters.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.list_clusters.js,samples/README.md) | -| Cluster_manager.list_node_pools | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.list_node_pools.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.list_node_pools.js,samples/README.md) | -| Cluster_manager.list_operations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.list_operations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.list_operations.js,samples/README.md) | -| Cluster_manager.list_usable_subnetworks | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.list_usable_subnetworks.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.list_usable_subnetworks.js,samples/README.md) | -| Cluster_manager.rollback_node_pool_upgrade | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.rollback_node_pool_upgrade.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.rollback_node_pool_upgrade.js,samples/README.md) | -| Cluster_manager.set_addons_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.set_addons_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.set_addons_config.js,samples/README.md) | -| Cluster_manager.set_labels | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.set_labels.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.set_labels.js,samples/README.md) | -| Cluster_manager.set_legacy_abac | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.set_legacy_abac.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.set_legacy_abac.js,samples/README.md) | -| Cluster_manager.set_locations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.set_locations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.set_locations.js,samples/README.md) | -| Cluster_manager.set_logging_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.set_logging_service.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.set_logging_service.js,samples/README.md) | -| Cluster_manager.set_maintenance_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.set_maintenance_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.set_maintenance_policy.js,samples/README.md) | -| Cluster_manager.set_master_auth | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.set_master_auth.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.set_master_auth.js,samples/README.md) | -| Cluster_manager.set_monitoring_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.set_monitoring_service.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.set_monitoring_service.js,samples/README.md) | -| Cluster_manager.set_network_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.set_network_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.set_network_policy.js,samples/README.md) | -| Cluster_manager.set_node_pool_autoscaling | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.set_node_pool_autoscaling.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.set_node_pool_autoscaling.js,samples/README.md) | -| Cluster_manager.set_node_pool_management | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.set_node_pool_management.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.set_node_pool_management.js,samples/README.md) | -| Cluster_manager.set_node_pool_size | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.set_node_pool_size.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.set_node_pool_size.js,samples/README.md) | -| Cluster_manager.start_i_p_rotation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.start_i_p_rotation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.start_i_p_rotation.js,samples/README.md) | -| Cluster_manager.update_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.update_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.update_cluster.js,samples/README.md) | -| Cluster_manager.update_master | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.update_master.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.update_master.js,samples/README.md) | -| Cluster_manager.update_node_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.update_node_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.update_node_pool.js,samples/README.md) | -| Cluster_manager.cancel_operation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.cancel_operation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.cancel_operation.js,samples/README.md) | -| Cluster_manager.complete_i_p_rotation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.complete_i_p_rotation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.complete_i_p_rotation.js,samples/README.md) | -| Cluster_manager.complete_node_pool_upgrade | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.complete_node_pool_upgrade.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.complete_node_pool_upgrade.js,samples/README.md) | -| Cluster_manager.create_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.create_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.create_cluster.js,samples/README.md) | -| Cluster_manager.create_node_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.create_node_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.create_node_pool.js,samples/README.md) | -| Cluster_manager.delete_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.delete_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.delete_cluster.js,samples/README.md) | -| Cluster_manager.delete_node_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.delete_node_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.delete_node_pool.js,samples/README.md) | -| Cluster_manager.get_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.get_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.get_cluster.js,samples/README.md) | -| Cluster_manager.get_j_s_o_n_web_keys | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.get_j_s_o_n_web_keys.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.get_j_s_o_n_web_keys.js,samples/README.md) | -| Cluster_manager.get_node_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.get_node_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.get_node_pool.js,samples/README.md) | -| Cluster_manager.get_operation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.get_operation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.get_operation.js,samples/README.md) | -| Cluster_manager.get_server_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.get_server_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.get_server_config.js,samples/README.md) | -| Cluster_manager.list_clusters | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.list_clusters.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.list_clusters.js,samples/README.md) | -| Cluster_manager.list_locations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.list_locations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.list_locations.js,samples/README.md) | -| Cluster_manager.list_node_pools | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.list_node_pools.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.list_node_pools.js,samples/README.md) | -| Cluster_manager.list_operations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.list_operations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.list_operations.js,samples/README.md) | -| Cluster_manager.list_usable_subnetworks | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.list_usable_subnetworks.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.list_usable_subnetworks.js,samples/README.md) | -| Cluster_manager.rollback_node_pool_upgrade | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.rollback_node_pool_upgrade.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.rollback_node_pool_upgrade.js,samples/README.md) | -| Cluster_manager.set_addons_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_addons_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_addons_config.js,samples/README.md) | -| Cluster_manager.set_labels | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_labels.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_labels.js,samples/README.md) | -| Cluster_manager.set_legacy_abac | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_legacy_abac.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_legacy_abac.js,samples/README.md) | -| Cluster_manager.set_locations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_locations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_locations.js,samples/README.md) | -| Cluster_manager.set_logging_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_logging_service.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_logging_service.js,samples/README.md) | -| Cluster_manager.set_maintenance_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_maintenance_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_maintenance_policy.js,samples/README.md) | -| Cluster_manager.set_master_auth | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_master_auth.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_master_auth.js,samples/README.md) | -| Cluster_manager.set_monitoring_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_monitoring_service.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_monitoring_service.js,samples/README.md) | -| Cluster_manager.set_network_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_network_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_network_policy.js,samples/README.md) | -| Cluster_manager.set_node_pool_autoscaling | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_autoscaling.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_autoscaling.js,samples/README.md) | -| Cluster_manager.set_node_pool_management | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_management.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_management.js,samples/README.md) | -| Cluster_manager.set_node_pool_size | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_size.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_size.js,samples/README.md) | -| Cluster_manager.start_i_p_rotation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.start_i_p_rotation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.start_i_p_rotation.js,samples/README.md) | -| Cluster_manager.update_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.update_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.update_cluster.js,samples/README.md) | -| Cluster_manager.update_master | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.update_master.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.update_master.js,samples/README.md) | -| Cluster_manager.update_node_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.update_node_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.update_node_pool.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/quickstart.js,samples/README.md) | -| Quickstart.test | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/test/quickstart.test.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/test/quickstart.test.js,samples/README.md) | +| Cluster_manager.cancel_operation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.cancel_operation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.cancel_operation.js,packages/google-container/samples/README.md) | +| Cluster_manager.complete_i_p_rotation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.complete_i_p_rotation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.complete_i_p_rotation.js,packages/google-container/samples/README.md) | +| Cluster_manager.complete_node_pool_upgrade | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.complete_node_pool_upgrade.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.complete_node_pool_upgrade.js,packages/google-container/samples/README.md) | +| Cluster_manager.create_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.create_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.create_cluster.js,packages/google-container/samples/README.md) | +| Cluster_manager.create_node_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.create_node_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.create_node_pool.js,packages/google-container/samples/README.md) | +| Cluster_manager.delete_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.delete_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.delete_cluster.js,packages/google-container/samples/README.md) | +| Cluster_manager.delete_node_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.delete_node_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.delete_node_pool.js,packages/google-container/samples/README.md) | +| Cluster_manager.get_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.get_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.get_cluster.js,packages/google-container/samples/README.md) | +| Cluster_manager.get_j_s_o_n_web_keys | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.get_j_s_o_n_web_keys.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.get_j_s_o_n_web_keys.js,packages/google-container/samples/README.md) | +| Cluster_manager.get_node_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.get_node_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.get_node_pool.js,packages/google-container/samples/README.md) | +| Cluster_manager.get_operation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.get_operation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.get_operation.js,packages/google-container/samples/README.md) | +| Cluster_manager.get_server_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.get_server_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.get_server_config.js,packages/google-container/samples/README.md) | +| Cluster_manager.list_clusters | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.list_clusters.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.list_clusters.js,packages/google-container/samples/README.md) | +| Cluster_manager.list_node_pools | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.list_node_pools.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.list_node_pools.js,packages/google-container/samples/README.md) | +| Cluster_manager.list_operations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.list_operations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.list_operations.js,packages/google-container/samples/README.md) | +| Cluster_manager.list_usable_subnetworks | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.list_usable_subnetworks.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.list_usable_subnetworks.js,packages/google-container/samples/README.md) | +| Cluster_manager.rollback_node_pool_upgrade | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.rollback_node_pool_upgrade.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.rollback_node_pool_upgrade.js,packages/google-container/samples/README.md) | +| Cluster_manager.set_addons_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.set_addons_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.set_addons_config.js,packages/google-container/samples/README.md) | +| Cluster_manager.set_labels | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.set_labels.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.set_labels.js,packages/google-container/samples/README.md) | +| Cluster_manager.set_legacy_abac | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.set_legacy_abac.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.set_legacy_abac.js,packages/google-container/samples/README.md) | +| Cluster_manager.set_locations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.set_locations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.set_locations.js,packages/google-container/samples/README.md) | +| Cluster_manager.set_logging_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.set_logging_service.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.set_logging_service.js,packages/google-container/samples/README.md) | +| Cluster_manager.set_maintenance_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.set_maintenance_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.set_maintenance_policy.js,packages/google-container/samples/README.md) | +| Cluster_manager.set_master_auth | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.set_master_auth.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.set_master_auth.js,packages/google-container/samples/README.md) | +| Cluster_manager.set_monitoring_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.set_monitoring_service.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.set_monitoring_service.js,packages/google-container/samples/README.md) | +| Cluster_manager.set_network_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.set_network_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.set_network_policy.js,packages/google-container/samples/README.md) | +| Cluster_manager.set_node_pool_autoscaling | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.set_node_pool_autoscaling.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.set_node_pool_autoscaling.js,packages/google-container/samples/README.md) | +| Cluster_manager.set_node_pool_management | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.set_node_pool_management.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.set_node_pool_management.js,packages/google-container/samples/README.md) | +| Cluster_manager.set_node_pool_size | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.set_node_pool_size.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.set_node_pool_size.js,packages/google-container/samples/README.md) | +| Cluster_manager.start_i_p_rotation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.start_i_p_rotation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.start_i_p_rotation.js,packages/google-container/samples/README.md) | +| Cluster_manager.update_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.update_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.update_cluster.js,packages/google-container/samples/README.md) | +| Cluster_manager.update_master | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.update_master.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.update_master.js,packages/google-container/samples/README.md) | +| Cluster_manager.update_node_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1/cluster_manager.update_node_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1/cluster_manager.update_node_pool.js,packages/google-container/samples/README.md) | +| Cluster_manager.cancel_operation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.cancel_operation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.cancel_operation.js,packages/google-container/samples/README.md) | +| Cluster_manager.complete_i_p_rotation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.complete_i_p_rotation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.complete_i_p_rotation.js,packages/google-container/samples/README.md) | +| Cluster_manager.complete_node_pool_upgrade | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.complete_node_pool_upgrade.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.complete_node_pool_upgrade.js,packages/google-container/samples/README.md) | +| Cluster_manager.create_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.create_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.create_cluster.js,packages/google-container/samples/README.md) | +| Cluster_manager.create_node_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.create_node_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.create_node_pool.js,packages/google-container/samples/README.md) | +| Cluster_manager.delete_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.delete_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.delete_cluster.js,packages/google-container/samples/README.md) | +| Cluster_manager.delete_node_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.delete_node_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.delete_node_pool.js,packages/google-container/samples/README.md) | +| Cluster_manager.get_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.get_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.get_cluster.js,packages/google-container/samples/README.md) | +| Cluster_manager.get_j_s_o_n_web_keys | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.get_j_s_o_n_web_keys.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.get_j_s_o_n_web_keys.js,packages/google-container/samples/README.md) | +| Cluster_manager.get_node_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.get_node_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.get_node_pool.js,packages/google-container/samples/README.md) | +| Cluster_manager.get_operation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.get_operation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.get_operation.js,packages/google-container/samples/README.md) | +| Cluster_manager.get_server_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.get_server_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.get_server_config.js,packages/google-container/samples/README.md) | +| Cluster_manager.list_clusters | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.list_clusters.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.list_clusters.js,packages/google-container/samples/README.md) | +| Cluster_manager.list_locations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.list_locations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.list_locations.js,packages/google-container/samples/README.md) | +| Cluster_manager.list_node_pools | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.list_node_pools.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.list_node_pools.js,packages/google-container/samples/README.md) | +| Cluster_manager.list_operations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.list_operations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.list_operations.js,packages/google-container/samples/README.md) | +| Cluster_manager.list_usable_subnetworks | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.list_usable_subnetworks.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.list_usable_subnetworks.js,packages/google-container/samples/README.md) | +| Cluster_manager.rollback_node_pool_upgrade | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.rollback_node_pool_upgrade.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.rollback_node_pool_upgrade.js,packages/google-container/samples/README.md) | +| Cluster_manager.set_addons_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_addons_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_addons_config.js,packages/google-container/samples/README.md) | +| Cluster_manager.set_labels | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_labels.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_labels.js,packages/google-container/samples/README.md) | +| Cluster_manager.set_legacy_abac | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_legacy_abac.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_legacy_abac.js,packages/google-container/samples/README.md) | +| Cluster_manager.set_locations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_locations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_locations.js,packages/google-container/samples/README.md) | +| Cluster_manager.set_logging_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_logging_service.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_logging_service.js,packages/google-container/samples/README.md) | +| Cluster_manager.set_maintenance_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_maintenance_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_maintenance_policy.js,packages/google-container/samples/README.md) | +| Cluster_manager.set_master_auth | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_master_auth.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_master_auth.js,packages/google-container/samples/README.md) | +| Cluster_manager.set_monitoring_service | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_monitoring_service.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_monitoring_service.js,packages/google-container/samples/README.md) | +| Cluster_manager.set_network_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_network_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_network_policy.js,packages/google-container/samples/README.md) | +| Cluster_manager.set_node_pool_autoscaling | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_autoscaling.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_autoscaling.js,packages/google-container/samples/README.md) | +| Cluster_manager.set_node_pool_management | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_management.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_management.js,packages/google-container/samples/README.md) | +| Cluster_manager.set_node_pool_size | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_size.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.set_node_pool_size.js,packages/google-container/samples/README.md) | +| Cluster_manager.start_i_p_rotation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.start_i_p_rotation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.start_i_p_rotation.js,packages/google-container/samples/README.md) | +| Cluster_manager.update_cluster | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.update_cluster.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.update_cluster.js,packages/google-container/samples/README.md) | +| Cluster_manager.update_master | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.update_master.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.update_master.js,packages/google-container/samples/README.md) | +| Cluster_manager.update_node_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/generated/v1beta1/cluster_manager.update_node_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/generated/v1beta1/cluster_manager.update_node_pool.js,packages/google-container/samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/quickstart.js,packages/google-container/samples/README.md) | diff --git a/packages/google-container/package.json b/packages/google-container/package.json index 0263e5d9eb2..12fa2670a53 100644 --- a/packages/google-container/package.json +++ b/packages/google-container/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/container", "description": "Google Container Engine API client for Node.js", - "version": "4.8.0", + "version": "4.11.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { @@ -32,20 +32,20 @@ "Google Container Engine API" ], "scripts": { - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "system-test": "npm run compile && c8 mocha build/system-test", - "lint": "gts check", - "fix": "gts fix", - "docs": "jsdoc -c .jsdoc.js", - "docs-test": "linkinator docs", "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -60,6 +60,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -70,5 +71,4 @@ "webpack-cli": "^5.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-container" -} - +} \ No newline at end of file diff --git a/packages/google-container/protos/google/container/v1/cluster_service.proto b/packages/google-container/protos/google/container/v1/cluster_service.proto index 943c0c36f1c..4ca597b1a19 100644 --- a/packages/google-container/protos/google/container/v1/cluster_service.proto +++ b/packages/google-container/protos/google/container/v1/cluster_service.proto @@ -1713,7 +1713,12 @@ message Cluster { // Shielded Nodes configuration. ShieldedNodes shielded_nodes = 40; - // Release channel configuration. + // Release channel configuration. If left unspecified on cluster creation and + // a version is specified, the cluster is enrolled in the most mature release + // channel where the version is available (first checking STABLE, then + // REGULAR, and finally RAPID). Otherwise, if no release channel + // configuration and no version is specified, the cluster is enrolled in the + // REGULAR channel with its default version. ReleaseChannel release_channel = 41; // Configuration for the use of Kubernetes Service Accounts in GCP IAM @@ -2065,6 +2070,9 @@ message ClusterUpdate { // The desired node pool logging configuration defaults for the cluster. NodePoolLoggingConfig desired_node_pool_logging_config = 116; + // The desired fleet configuration for the cluster. + Fleet desired_fleet = 117; + // The desired stack type of the cluster. // If a stack type is provided and does not match the current stack type of // the cluster, update will attempt to change the stack type to the new type. @@ -2082,7 +2090,10 @@ message ClusterUpdate { // AdditionalPodRangesConfig is the configuration for additional pod secondary // ranges supporting the ClusterUpdate message. -message AdditionalPodRangesConfig {} +message AdditionalPodRangesConfig { + // Name for pod secondary ipv4 range which has the actual range defined ahead. + repeated string pod_range_names = 1; +} // This operation resource represents operations that may have happened or are // happening on the cluster. All fields are output only. @@ -2105,58 +2116,125 @@ message Operation { ABORTING = 4; } - // Operation type. + // Operation type categorizes the operation. enum Type { // Not set. TYPE_UNSPECIFIED = 0; - // Cluster create. + // The cluster is being created. The cluster should be assumed to be + // unusable until the operation finishes. + // + // In the event of the operation failing, the cluster will enter the [ERROR + // state][Cluster.Status.ERROR] and eventually be deleted. CREATE_CLUSTER = 1; - // Cluster delete. + // The cluster is being deleted. The cluster should be assumed to be + // unusable as soon as this operation starts. + // + // In the event of the operation failing, the cluster will enter the [ERROR + // state][Cluster.Status.ERROR] and the deletion will be automatically + // retried until completed. DELETE_CLUSTER = 2; - // A master upgrade. + // The [cluster + // version][google.container.v1.ClusterUpdate.desired_master_version] is + // being updated. Note that this includes "upgrades" to the same version, + // which are simply a recreation. This also includes + // [auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-upgrades#upgrading_automatically). + // For more details, see [documentation on cluster + // upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-upgrades#cluster_upgrades). UPGRADE_MASTER = 3; - // A node upgrade. + // A node pool is being updated. Despite calling this an "upgrade", this + // includes most forms of updates to node pools. This also includes + // [auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-upgrades). + // + // This operation sets the + // [progress][google.container.v1.Operation.progress] field and may be + // [canceled][google.container.v1.ClusterManager.CancelOperation]. + // + // The upgrade strategy depends on [node pool + // configuration](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pool-upgrade-strategies). + // The nodes are generally still usable during this operation. UPGRADE_NODES = 4; - // Cluster repair. + // A problem has been detected with the control plane and is being repaired. + // This operation type is initiated by GKE. For more details, see + // [documentation on + // repairs](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions#repairs). REPAIR_CLUSTER = 5; - // Cluster update. + // The cluster is being updated. This is a broad category of operations and + // includes operations that only change metadata as well as those that must + // recreate the entire cluster. If the control plane must be recreated, this + // will cause temporary downtime for zonal clusters. + // + // Some features require recreating the nodes as well. Those will be + // recreated as separate operations and the update may not be completely + // functional until the node pools recreations finish. Node recreations will + // generally follow [maintenance + // policies](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions). + // + // Some GKE-initiated operations use this type. This includes certain types + // of auto-upgrades and incident mitigations. UPDATE_CLUSTER = 6; - // Node pool create. + // A node pool is being created. The node pool should be assumed to be + // unusable until this operation finishes. In the event of an error, the + // node pool may be partially created. + // + // If enabled, [node + // autoprovisioning](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-provisioning) + // may have automatically initiated such operations. CREATE_NODE_POOL = 7; - // Node pool delete. + // The node pool is being deleted. The node pool should be assumed to be + // unusable as soon as this operation starts. DELETE_NODE_POOL = 8; - // Set node pool management. + // The node pool's [manamagent][google.container.v1.NodePool.management] + // field is being updated. These operations only update metadata and may be + // concurrent with most other operations. SET_NODE_POOL_MANAGEMENT = 9; - // Automatic node pool repair. + // A problem has been detected with nodes and [they are being + // repaired](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-repair). + // This operation type is initiated by GKE, typically automatically. This + // operation may be concurrent with other operations and there may be + // multiple repairs occurring on the same node pool. AUTO_REPAIR_NODES = 10; - // Automatic node upgrade. - AUTO_UPGRADE_NODES = 11; + // Unused. Automatic node upgrade uses + // [UPGRADE_NODES][google.container.v1.Operation.Type.UPGRADE_NODES]. + AUTO_UPGRADE_NODES = 11 [deprecated = true]; - // Set labels. - SET_LABELS = 12; + // Unused. Updating labels uses + // [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER]. + SET_LABELS = 12 [deprecated = true]; - // Set/generate master auth materials - SET_MASTER_AUTH = 13; + // Unused. Updating master auth uses + // [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER]. + SET_MASTER_AUTH = 13 [deprecated = true]; - // Set node pool size. + // The node pool is being resized. With the exception of resizing to or from + // size zero, the node pool is generally usable during this operation. SET_NODE_POOL_SIZE = 14; - // Updates network policy for a cluster. - SET_NETWORK_POLICY = 15; - - // Set the maintenance policy. - SET_MAINTENANCE_POLICY = 16; + // Unused. Updating network policy uses + // [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER]. + SET_NETWORK_POLICY = 15 [deprecated = true]; + + // Unused. Updating maintenance policy uses + // [UPDATE_CLUSTER][google.container.v1.Operation.Type.UPDATE_CLUSTER]. + SET_MAINTENANCE_POLICY = 16 [deprecated = true]; + + // The control plane is being resized. This operation type is initiated by + // GKE. These operations are often performed preemptively to ensure that the + // control plane has sufficient resources and is not typically an indication + // of issues. For more details, see + // [documentation on + // resizes](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions#repairs). + RESIZE_CLUSTER = 18; } // The server-assigned ID for the operation. @@ -2181,10 +2259,25 @@ message Operation { string status_message = 5 [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; - // Server-defined URL for the resource. + // Server-defined URI for the operation. Example: + // `https://container.googleapis.com/v1alpha1/projects/123/locations/us-central1/operations/operation-123`. string self_link = 6; - // Server-defined URL for the target of the operation. + // Server-defined URI for the target of the operation. The format of this is a + // URI to the resource being modified (such as a cluster, node pool, or node). + // For node pool repairs, there may be multiple nodes being repaired, but only + // one will be the target. + // + // Examples: + // + // - + // ## + // `https://container.googleapis.com/v1/projects/123/locations/us-central1/clusters/my-cluster` + // + // ## + // `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np` + // + // `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np/node/my-node` string target_link = 7; // [Output only] The name of the Google Compute Engine @@ -4215,12 +4308,12 @@ message DatabaseEncryption { DECRYPTED = 2; } - // Denotes the state of etcd encryption. - State state = 2; - // Name of CloudKMS key to use for the encryption of secrets in etcd. // Ex. projects/my-project/locations/global/keyRings/my-ring/cryptoKeys/my-key string key_name = 1; + + // The desired state of etcd encryption. + State state = 2; } // ListUsableSubnetworksRequest requests the list of usable subnetworks diff --git a/packages/google-container/protos/google/container/v1beta1/cluster_service.proto b/packages/google-container/protos/google/container/v1beta1/cluster_service.proto index b36c5474927..8c7776a5800 100644 --- a/packages/google-container/protos/google/container/v1beta1/cluster_service.proto +++ b/packages/google-container/protos/google/container/v1beta1/cluster_service.proto @@ -1178,6 +1178,9 @@ message AddonsConfig { // Configuration for the Backup for GKE agent addon. GkeBackupAgentConfig gke_backup_agent_config = 16; + + // Configuration for the Cloud Storage Fuse CSI driver. + GcsFuseCsiDriverConfig gcs_fuse_csi_driver_config = 17; } // Configuration options for the HTTP (L7) load balancing controller addon, @@ -1249,6 +1252,12 @@ message GcpFilestoreCsiDriverConfig { bool enabled = 1; } +// Configuration for the Cloud Storage Fuse CSI driver. +message GcsFuseCsiDriverConfig { + // Whether the Cloud Storage Fuse CSI driver is enabled for this cluster. + bool enabled = 1; +} + // Configuration for controlling master global access settings. message PrivateClusterMasterGlobalAccessConfig { // Whenever master is accessible globally or not. @@ -1866,7 +1875,12 @@ message Cluster { // Shielded Nodes configuration. ShieldedNodes shielded_nodes = 40; - // Release channel configuration. + // Release channel configuration. If left unspecified on cluster creation and + // a version is specified, the cluster is enrolled in the most mature release + // channel where the version is available (first checking STABLE, then + // REGULAR, and finally RAPID). Otherwise, if no release channel + // configuration and no version is specified, the cluster is enrolled in the + // REGULAR channel with its default version. ReleaseChannel release_channel = 41; // Configuration for the use of Kubernetes Service Accounts in GCP IAM @@ -2316,6 +2330,9 @@ message ClusterUpdate { // The desired node pool logging configuration defaults for the cluster. NodePoolLoggingConfig desired_node_pool_logging_config = 116; + // The desired fleet configuration for the cluster. + Fleet desired_fleet = 117; + // The desired stack type of the cluster. // If a stack type is provided and does not match the current stack type of // the cluster, update will attempt to change the stack type to the new type. @@ -2333,7 +2350,10 @@ message ClusterUpdate { // AdditionalPodRangesConfig is the configuration for additional pod secondary // ranges supporting the ClusterUpdate message. -message AdditionalPodRangesConfig {} +message AdditionalPodRangesConfig { + // Name for pod secondary ipv4 range which has the actual range defined ahead. + repeated string pod_range_names = 1; +} // This operation resource represents operations that may have happened or are // happening on the cluster. All fields are output only. @@ -2356,58 +2376,126 @@ message Operation { ABORTING = 4; } - // Operation type. + // Operation type categorizes the operation. enum Type { // Not set. TYPE_UNSPECIFIED = 0; - // Cluster create. + // The cluster is being created. The cluster should be assumed to be + // unusable until the operation finishes. + // + // In the event of the operation failing, the cluster will enter the [ERROR + // state][Cluster.Status.ERROR] and eventually be deleted. CREATE_CLUSTER = 1; - // Cluster delete. + // The cluster is being deleted. The cluster should be assumed to be + // unusable as soon as this operation starts. + // + // In the event of the operation failing, the cluster will enter the [ERROR + // state][Cluster.Status.ERROR] and the deletion will be automatically + // retried until completed. DELETE_CLUSTER = 2; - // A master upgrade. + // The [cluster + // version][google.container.v1beta1.ClusterUpdate.desired_master_version] + // is being updated. Note that this includes "upgrades" to the same version, + // which are simply a recreation. This also includes + // [auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-upgrades#upgrading_automatically). + // For more details, see [documentation on cluster + // upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-upgrades#cluster_upgrades). UPGRADE_MASTER = 3; - // A node upgrade. + // A node pool is being updated. Despite calling this an "upgrade", this + // includes most forms of updates to node pools. This also includes + // [auto-upgrades](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-upgrades). + // + // This operation sets the + // [progress][google.container.v1beta1.Operation.progress] field and may be + // [canceled][google.container.v1beta1.ClusterManager.CancelOperation]. + // + // The upgrade strategy depends on [node pool + // configuration](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pool-upgrade-strategies). + // The nodes are generally still usable during this operation. UPGRADE_NODES = 4; - // Cluster repair. + // A problem has been detected with the control plane and is being repaired. + // This operation type is initiated by GKE. For more details, see + // [documentation on + // repairs](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions#repairs). REPAIR_CLUSTER = 5; - // Cluster update. + // The cluster is being updated. This is a broad category of operations and + // includes operations that only change metadata as well as those that must + // recreate the entire cluster. If the control plane must be recreated, this + // will cause temporary downtime for zonal clusters. + // + // Some features require recreating the nodes as well. Those will be + // recreated as separate operations and the update may not be completely + // functional until the node pools recreations finish. Node recreations will + // generally follow [maintenance + // policies](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions). + // + // Some GKE-initiated operations use this type. This includes certain types + // of auto-upgrades and incident mitigations. UPDATE_CLUSTER = 6; - // Node pool create. + // A node pool is being created. The node pool should be assumed to be + // unusable until this operation finishes. In the event of an error, the + // node pool may be partially created. + // + // If enabled, [node + // autoprovisioning](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-provisioning) + // may have automatically initiated such operations. CREATE_NODE_POOL = 7; - // Node pool delete. + // The node pool is being deleted. The node pool should be assumed to be + // unusable as soon as this operation starts. DELETE_NODE_POOL = 8; - // Set node pool management. + // The node pool's + // [manamagent][google.container.v1beta1.NodePool.management] field is being + // updated. These operations only update metadata and may be concurrent with + // most other operations. SET_NODE_POOL_MANAGEMENT = 9; - // Automatic node pool repair. + // A problem has been detected with nodes and [they are being + // repaired](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-repair). + // This operation type is initiated by GKE, typically automatically. This + // operation may be concurrent with other operations and there may be + // multiple repairs occurring on the same node pool. AUTO_REPAIR_NODES = 10; - // Automatic node upgrade. - AUTO_UPGRADE_NODES = 11; + // Unused. Automatic node upgrade uses + // [UPGRADE_NODES][google.container.v1beta1.Operation.Type.UPGRADE_NODES]. + AUTO_UPGRADE_NODES = 11 [deprecated = true]; - // Set labels. - SET_LABELS = 12; + // Unused. Updating labels uses + // [UPDATE_CLUSTER][google.container.v1beta1.Operation.Type.UPDATE_CLUSTER]. + SET_LABELS = 12 [deprecated = true]; - // Set/generate master auth materials - SET_MASTER_AUTH = 13; + // Unused. Updating master auth uses + // [UPDATE_CLUSTER][google.container.v1beta1.Operation.Type.UPDATE_CLUSTER]. + SET_MASTER_AUTH = 13 [deprecated = true]; - // Set node pool size. + // The node pool is being resized. With the exception of resizing to or from + // size zero, the node pool is generally usable during this operation. SET_NODE_POOL_SIZE = 14; - // Updates network policy for a cluster. - SET_NETWORK_POLICY = 15; - - // Set the maintenance policy. - SET_MAINTENANCE_POLICY = 16; + // Unused. Updating network policy uses + // [UPDATE_CLUSTER][google.container.v1beta1.Operation.Type.UPDATE_CLUSTER]. + SET_NETWORK_POLICY = 15 [deprecated = true]; + + // Unused. Updating maintenance policy uses + // [UPDATE_CLUSTER][google.container.v1beta1.Operation.Type.UPDATE_CLUSTER]. + SET_MAINTENANCE_POLICY = 16 [deprecated = true]; + + // The control plane is being resized. This operation type is initiated by + // GKE. These operations are often performed preemptively to ensure that the + // control plane has sufficient resources and is not typically an indication + // of issues. For more details, see + // [documentation on + // resizes](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions#repairs). + RESIZE_CLUSTER = 18; } // The server-assigned ID for the operation. @@ -2432,10 +2520,25 @@ message Operation { string status_message = 5 [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; - // Server-defined URL for the resource. + // Server-defined URI for the operation. Example: + // `https://container.googleapis.com/v1alpha1/projects/123/locations/us-central1/operations/operation-123`. string self_link = 6; - // Server-defined URL for the target of the operation. + // Server-defined URI for the target of the operation. The format of this is a + // URI to the resource being modified (such as a cluster, node pool, or node). + // For node pool repairs, there may be multiple nodes being repaired, but only + // one will be the target. + // + // Examples: + // + // - + // ## + // `https://container.googleapis.com/v1/projects/123/locations/us-central1/clusters/my-cluster` + // + // ## + // `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np` + // + // `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np/node/my-node` string target_link = 7; // [Output only] The name of the Google Compute Engine @@ -4680,12 +4783,12 @@ message DatabaseEncryption { DECRYPTED = 2; } - // Denotes the state of etcd encryption. - State state = 2; - // Name of CloudKMS key to use for the encryption of secrets in etcd. // Ex. projects/my-project/locations/global/keyRings/my-ring/cryptoKeys/my-key string key_name = 1; + + // The desired state of etcd encryption. + State state = 2; } // Configuration for exporting cluster resource usages. diff --git a/packages/google-container/protos/protos.d.ts b/packages/google-container/protos/protos.d.ts index 5ee25dc33fd..a99d5aa707d 100644 --- a/packages/google-container/protos/protos.d.ts +++ b/packages/google-container/protos/protos.d.ts @@ -6097,6 +6097,9 @@ export namespace google { /** ClusterUpdate desiredNodePoolLoggingConfig */ desiredNodePoolLoggingConfig?: (google.container.v1.INodePoolLoggingConfig|null); + /** ClusterUpdate desiredFleet */ + desiredFleet?: (google.container.v1.IFleet|null); + /** ClusterUpdate desiredStackType */ desiredStackType?: (google.container.v1.StackType|keyof typeof google.container.v1.StackType|null); @@ -6233,6 +6236,9 @@ export namespace google { /** ClusterUpdate desiredNodePoolLoggingConfig. */ public desiredNodePoolLoggingConfig?: (google.container.v1.INodePoolLoggingConfig|null); + /** ClusterUpdate desiredFleet. */ + public desiredFleet?: (google.container.v1.IFleet|null); + /** ClusterUpdate desiredStackType. */ public desiredStackType: (google.container.v1.StackType|keyof typeof google.container.v1.StackType); @@ -6325,6 +6331,9 @@ export namespace google { /** Properties of an AdditionalPodRangesConfig. */ interface IAdditionalPodRangesConfig { + + /** AdditionalPodRangesConfig podRangeNames */ + podRangeNames?: (string[]|null); } /** Represents an AdditionalPodRangesConfig. */ @@ -6336,6 +6345,9 @@ export namespace google { */ constructor(properties?: google.container.v1.IAdditionalPodRangesConfig); + /** AdditionalPodRangesConfig podRangeNames. */ + public podRangeNames: string[]; + /** * Creates a new AdditionalPodRangesConfig instance using the specified properties. * @param [properties] Properties to set @@ -6624,7 +6636,8 @@ export namespace google { SET_MASTER_AUTH = 13, SET_NODE_POOL_SIZE = 14, SET_NETWORK_POLICY = 15, - SET_MAINTENANCE_POLICY = 16 + SET_MAINTENANCE_POLICY = 16, + RESIZE_CLUSTER = 18 } } @@ -15815,11 +15828,11 @@ export namespace google { /** Properties of a DatabaseEncryption. */ interface IDatabaseEncryption { - /** DatabaseEncryption state */ - state?: (google.container.v1.DatabaseEncryption.State|keyof typeof google.container.v1.DatabaseEncryption.State|null); - /** DatabaseEncryption keyName */ keyName?: (string|null); + + /** DatabaseEncryption state */ + state?: (google.container.v1.DatabaseEncryption.State|keyof typeof google.container.v1.DatabaseEncryption.State|null); } /** Represents a DatabaseEncryption. */ @@ -15831,12 +15844,12 @@ export namespace google { */ constructor(properties?: google.container.v1.IDatabaseEncryption); - /** DatabaseEncryption state. */ - public state: (google.container.v1.DatabaseEncryption.State|keyof typeof google.container.v1.DatabaseEncryption.State); - /** DatabaseEncryption keyName. */ public keyName: string; + /** DatabaseEncryption state. */ + public state: (google.container.v1.DatabaseEncryption.State|keyof typeof google.container.v1.DatabaseEncryption.State); + /** * Creates a new DatabaseEncryption instance using the specified properties. * @param [properties] Properties to set @@ -22365,6 +22378,9 @@ export namespace google { /** AddonsConfig gkeBackupAgentConfig */ gkeBackupAgentConfig?: (google.container.v1beta1.IGkeBackupAgentConfig|null); + + /** AddonsConfig gcsFuseCsiDriverConfig */ + gcsFuseCsiDriverConfig?: (google.container.v1beta1.IGcsFuseCsiDriverConfig|null); } /** Represents an AddonsConfig. */ @@ -22412,6 +22428,9 @@ export namespace google { /** AddonsConfig gkeBackupAgentConfig. */ public gkeBackupAgentConfig?: (google.container.v1beta1.IGkeBackupAgentConfig|null); + /** AddonsConfig gcsFuseCsiDriverConfig. */ + public gcsFuseCsiDriverConfig?: (google.container.v1beta1.IGcsFuseCsiDriverConfig|null); + /** * Creates a new AddonsConfig instance using the specified properties. * @param [properties] Properties to set @@ -23460,6 +23479,103 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a GcsFuseCsiDriverConfig. */ + interface IGcsFuseCsiDriverConfig { + + /** GcsFuseCsiDriverConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a GcsFuseCsiDriverConfig. */ + class GcsFuseCsiDriverConfig implements IGcsFuseCsiDriverConfig { + + /** + * Constructs a new GcsFuseCsiDriverConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1beta1.IGcsFuseCsiDriverConfig); + + /** GcsFuseCsiDriverConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new GcsFuseCsiDriverConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns GcsFuseCsiDriverConfig instance + */ + public static create(properties?: google.container.v1beta1.IGcsFuseCsiDriverConfig): google.container.v1beta1.GcsFuseCsiDriverConfig; + + /** + * Encodes the specified GcsFuseCsiDriverConfig message. Does not implicitly {@link google.container.v1beta1.GcsFuseCsiDriverConfig.verify|verify} messages. + * @param message GcsFuseCsiDriverConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1beta1.IGcsFuseCsiDriverConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcsFuseCsiDriverConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.GcsFuseCsiDriverConfig.verify|verify} messages. + * @param message GcsFuseCsiDriverConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1beta1.IGcsFuseCsiDriverConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcsFuseCsiDriverConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcsFuseCsiDriverConfig + * @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.container.v1beta1.GcsFuseCsiDriverConfig; + + /** + * Decodes a GcsFuseCsiDriverConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcsFuseCsiDriverConfig + * @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.container.v1beta1.GcsFuseCsiDriverConfig; + + /** + * Verifies a GcsFuseCsiDriverConfig 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 GcsFuseCsiDriverConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcsFuseCsiDriverConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1beta1.GcsFuseCsiDriverConfig; + + /** + * Creates a plain object from a GcsFuseCsiDriverConfig message. Also converts values to other types if specified. + * @param message GcsFuseCsiDriverConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1beta1.GcsFuseCsiDriverConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcsFuseCsiDriverConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcsFuseCsiDriverConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a PrivateClusterMasterGlobalAccessConfig. */ interface IPrivateClusterMasterGlobalAccessConfig { @@ -26312,6 +26428,9 @@ export namespace google { /** ClusterUpdate desiredNodePoolLoggingConfig */ desiredNodePoolLoggingConfig?: (google.container.v1beta1.INodePoolLoggingConfig|null); + /** ClusterUpdate desiredFleet */ + desiredFleet?: (google.container.v1beta1.IFleet|null); + /** ClusterUpdate desiredStackType */ desiredStackType?: (google.container.v1beta1.StackType|keyof typeof google.container.v1beta1.StackType|null); @@ -26469,6 +26588,9 @@ export namespace google { /** ClusterUpdate desiredNodePoolLoggingConfig. */ public desiredNodePoolLoggingConfig?: (google.container.v1beta1.INodePoolLoggingConfig|null); + /** ClusterUpdate desiredFleet. */ + public desiredFleet?: (google.container.v1beta1.IFleet|null); + /** ClusterUpdate desiredStackType. */ public desiredStackType: (google.container.v1beta1.StackType|keyof typeof google.container.v1beta1.StackType); @@ -26564,6 +26686,9 @@ export namespace google { /** Properties of an AdditionalPodRangesConfig. */ interface IAdditionalPodRangesConfig { + + /** AdditionalPodRangesConfig podRangeNames */ + podRangeNames?: (string[]|null); } /** Represents an AdditionalPodRangesConfig. */ @@ -26575,6 +26700,9 @@ export namespace google { */ constructor(properties?: google.container.v1beta1.IAdditionalPodRangesConfig); + /** AdditionalPodRangesConfig podRangeNames. */ + public podRangeNames: string[]; + /** * Creates a new AdditionalPodRangesConfig instance using the specified properties. * @param [properties] Properties to set @@ -26863,7 +26991,8 @@ export namespace google { SET_MASTER_AUTH = 13, SET_NODE_POOL_SIZE = 14, SET_NETWORK_POLICY = 15, - SET_MAINTENANCE_POLICY = 16 + SET_MAINTENANCE_POLICY = 16, + RESIZE_CLUSTER = 18 } } @@ -36806,11 +36935,11 @@ export namespace google { /** Properties of a DatabaseEncryption. */ interface IDatabaseEncryption { - /** DatabaseEncryption state */ - state?: (google.container.v1beta1.DatabaseEncryption.State|keyof typeof google.container.v1beta1.DatabaseEncryption.State|null); - /** DatabaseEncryption keyName */ keyName?: (string|null); + + /** DatabaseEncryption state */ + state?: (google.container.v1beta1.DatabaseEncryption.State|keyof typeof google.container.v1beta1.DatabaseEncryption.State|null); } /** Represents a DatabaseEncryption. */ @@ -36822,12 +36951,12 @@ export namespace google { */ constructor(properties?: google.container.v1beta1.IDatabaseEncryption); - /** DatabaseEncryption state. */ - public state: (google.container.v1beta1.DatabaseEncryption.State|keyof typeof google.container.v1beta1.DatabaseEncryption.State); - /** DatabaseEncryption keyName. */ public keyName: string; + /** DatabaseEncryption state. */ + public state: (google.container.v1beta1.DatabaseEncryption.State|keyof typeof google.container.v1beta1.DatabaseEncryption.State); + /** * Creates a new DatabaseEncryption instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-container/protos/protos.js b/packages/google-container/protos/protos.js index 22688e9bd76..7046fb7c797 100644 --- a/packages/google-container/protos/protos.js +++ b/packages/google-container/protos/protos.js @@ -14993,6 +14993,7 @@ * @property {google.container.v1.IGatewayAPIConfig|null} [desiredGatewayApiConfig] ClusterUpdate desiredGatewayApiConfig * @property {string|null} [etag] ClusterUpdate etag * @property {google.container.v1.INodePoolLoggingConfig|null} [desiredNodePoolLoggingConfig] ClusterUpdate desiredNodePoolLoggingConfig + * @property {google.container.v1.IFleet|null} [desiredFleet] ClusterUpdate desiredFleet * @property {google.container.v1.StackType|null} [desiredStackType] ClusterUpdate desiredStackType * @property {google.container.v1.IAdditionalPodRangesConfig|null} [additionalPodRangesConfig] ClusterUpdate additionalPodRangesConfig * @property {google.container.v1.IAdditionalPodRangesConfig|null} [removedAdditionalPodRangesConfig] ClusterUpdate removedAdditionalPodRangesConfig @@ -15326,6 +15327,14 @@ */ ClusterUpdate.prototype.desiredNodePoolLoggingConfig = null; + /** + * ClusterUpdate desiredFleet. + * @member {google.container.v1.IFleet|null|undefined} desiredFleet + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredFleet = null; + /** * ClusterUpdate desiredStackType. * @member {google.container.v1.StackType} desiredStackType @@ -15467,6 +15476,8 @@ writer.uint32(/* id 115, wireType 2 =*/922).string(message.etag); if (message.desiredNodePoolLoggingConfig != null && Object.hasOwnProperty.call(message, "desiredNodePoolLoggingConfig")) $root.google.container.v1.NodePoolLoggingConfig.encode(message.desiredNodePoolLoggingConfig, writer.uint32(/* id 116, wireType 2 =*/930).fork()).ldelim(); + if (message.desiredFleet != null && Object.hasOwnProperty.call(message, "desiredFleet")) + $root.google.container.v1.Fleet.encode(message.desiredFleet, writer.uint32(/* id 117, wireType 2 =*/938).fork()).ldelim(); if (message.desiredStackType != null && Object.hasOwnProperty.call(message, "desiredStackType")) writer.uint32(/* id 119, wireType 0 =*/952).int32(message.desiredStackType); if (message.additionalPodRangesConfig != null && Object.hasOwnProperty.call(message, "additionalPodRangesConfig")) @@ -15665,6 +15676,10 @@ message.desiredNodePoolLoggingConfig = $root.google.container.v1.NodePoolLoggingConfig.decode(reader, reader.uint32()); break; } + case 117: { + message.desiredFleet = $root.google.container.v1.Fleet.decode(reader, reader.uint32()); + break; + } case 119: { message.desiredStackType = reader.int32(); break; @@ -15905,6 +15920,11 @@ if (error) return "desiredNodePoolLoggingConfig." + error; } + if (message.desiredFleet != null && message.hasOwnProperty("desiredFleet")) { + var error = $root.google.container.v1.Fleet.verify(message.desiredFleet); + if (error) + return "desiredFleet." + error; + } if (message.desiredStackType != null && message.hasOwnProperty("desiredStackType")) switch (message.desiredStackType) { default: @@ -16146,6 +16166,11 @@ throw TypeError(".google.container.v1.ClusterUpdate.desiredNodePoolLoggingConfig: object expected"); message.desiredNodePoolLoggingConfig = $root.google.container.v1.NodePoolLoggingConfig.fromObject(object.desiredNodePoolLoggingConfig); } + if (object.desiredFleet != null) { + if (typeof object.desiredFleet !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredFleet: object expected"); + message.desiredFleet = $root.google.container.v1.Fleet.fromObject(object.desiredFleet); + } switch (object.desiredStackType) { default: if (typeof object.desiredStackType === "number") { @@ -16232,6 +16257,7 @@ object.desiredGatewayApiConfig = null; object.etag = ""; object.desiredNodePoolLoggingConfig = null; + object.desiredFleet = null; object.desiredStackType = options.enums === String ? "STACK_TYPE_UNSPECIFIED" : 0; object.additionalPodRangesConfig = null; object.removedAdditionalPodRangesConfig = null; @@ -16320,6 +16346,8 @@ object.etag = message.etag; if (message.desiredNodePoolLoggingConfig != null && message.hasOwnProperty("desiredNodePoolLoggingConfig")) object.desiredNodePoolLoggingConfig = $root.google.container.v1.NodePoolLoggingConfig.toObject(message.desiredNodePoolLoggingConfig, options); + if (message.desiredFleet != null && message.hasOwnProperty("desiredFleet")) + object.desiredFleet = $root.google.container.v1.Fleet.toObject(message.desiredFleet, options); if (message.desiredStackType != null && message.hasOwnProperty("desiredStackType")) object.desiredStackType = options.enums === String ? $root.google.container.v1.StackType[message.desiredStackType] === undefined ? message.desiredStackType : $root.google.container.v1.StackType[message.desiredStackType] : message.desiredStackType; if (message.additionalPodRangesConfig != null && message.hasOwnProperty("additionalPodRangesConfig")) @@ -16364,6 +16392,7 @@ * Properties of an AdditionalPodRangesConfig. * @memberof google.container.v1 * @interface IAdditionalPodRangesConfig + * @property {Array.|null} [podRangeNames] AdditionalPodRangesConfig podRangeNames */ /** @@ -16375,12 +16404,21 @@ * @param {google.container.v1.IAdditionalPodRangesConfig=} [properties] Properties to set */ function AdditionalPodRangesConfig(properties) { + this.podRangeNames = []; 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]]; } + /** + * AdditionalPodRangesConfig podRangeNames. + * @member {Array.} podRangeNames + * @memberof google.container.v1.AdditionalPodRangesConfig + * @instance + */ + AdditionalPodRangesConfig.prototype.podRangeNames = $util.emptyArray; + /** * Creates a new AdditionalPodRangesConfig instance using the specified properties. * @function create @@ -16405,6 +16443,9 @@ AdditionalPodRangesConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.podRangeNames != null && message.podRangeNames.length) + for (var i = 0; i < message.podRangeNames.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.podRangeNames[i]); return writer; }; @@ -16439,6 +16480,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + if (!(message.podRangeNames && message.podRangeNames.length)) + message.podRangeNames = []; + message.podRangeNames.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -16474,6 +16521,13 @@ AdditionalPodRangesConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.podRangeNames != null && message.hasOwnProperty("podRangeNames")) { + if (!Array.isArray(message.podRangeNames)) + return "podRangeNames: array expected"; + for (var i = 0; i < message.podRangeNames.length; ++i) + if (!$util.isString(message.podRangeNames[i])) + return "podRangeNames: string[] expected"; + } return null; }; @@ -16488,7 +16542,15 @@ AdditionalPodRangesConfig.fromObject = function fromObject(object) { if (object instanceof $root.google.container.v1.AdditionalPodRangesConfig) return object; - return new $root.google.container.v1.AdditionalPodRangesConfig(); + var message = new $root.google.container.v1.AdditionalPodRangesConfig(); + if (object.podRangeNames) { + if (!Array.isArray(object.podRangeNames)) + throw TypeError(".google.container.v1.AdditionalPodRangesConfig.podRangeNames: array expected"); + message.podRangeNames = []; + for (var i = 0; i < object.podRangeNames.length; ++i) + message.podRangeNames[i] = String(object.podRangeNames[i]); + } + return message; }; /** @@ -16500,8 +16562,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AdditionalPodRangesConfig.toObject = function toObject() { - return {}; + AdditionalPodRangesConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.podRangeNames = []; + if (message.podRangeNames && message.podRangeNames.length) { + object.podRangeNames = []; + for (var j = 0; j < message.podRangeNames.length; ++j) + object.podRangeNames[j] = message.podRangeNames[j]; + } + return object; }; /** @@ -16909,6 +16981,7 @@ case 14: case 15: case 16: + case 18: break; } if (message.status != null && message.hasOwnProperty("status")) @@ -17065,6 +17138,10 @@ case 16: message.operationType = 16; break; + case "RESIZE_CLUSTER": + case 18: + message.operationType = 18; + break; } switch (object.status) { default: @@ -17279,6 +17356,7 @@ * @property {number} SET_NODE_POOL_SIZE=14 SET_NODE_POOL_SIZE value * @property {number} SET_NETWORK_POLICY=15 SET_NETWORK_POLICY value * @property {number} SET_MAINTENANCE_POLICY=16 SET_MAINTENANCE_POLICY value + * @property {number} RESIZE_CLUSTER=18 RESIZE_CLUSTER value */ Operation.Type = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -17299,6 +17377,7 @@ values[valuesById[14] = "SET_NODE_POOL_SIZE"] = 14; values[valuesById[15] = "SET_NETWORK_POLICY"] = 15; values[valuesById[16] = "SET_MAINTENANCE_POLICY"] = 16; + values[valuesById[18] = "RESIZE_CLUSTER"] = 18; return values; })(); @@ -40711,8 +40790,8 @@ * Properties of a DatabaseEncryption. * @memberof google.container.v1 * @interface IDatabaseEncryption - * @property {google.container.v1.DatabaseEncryption.State|null} [state] DatabaseEncryption state * @property {string|null} [keyName] DatabaseEncryption keyName + * @property {google.container.v1.DatabaseEncryption.State|null} [state] DatabaseEncryption state */ /** @@ -40731,20 +40810,20 @@ } /** - * DatabaseEncryption state. - * @member {google.container.v1.DatabaseEncryption.State} state + * DatabaseEncryption keyName. + * @member {string} keyName * @memberof google.container.v1.DatabaseEncryption * @instance */ - DatabaseEncryption.prototype.state = 0; + DatabaseEncryption.prototype.keyName = ""; /** - * DatabaseEncryption keyName. - * @member {string} keyName + * DatabaseEncryption state. + * @member {google.container.v1.DatabaseEncryption.State} state * @memberof google.container.v1.DatabaseEncryption * @instance */ - DatabaseEncryption.prototype.keyName = ""; + DatabaseEncryption.prototype.state = 0; /** * Creates a new DatabaseEncryption instance using the specified properties. @@ -40808,14 +40887,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: { - message.state = reader.int32(); - break; - } case 1: { message.keyName = reader.string(); break; } + case 2: { + message.state = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -40851,6 +40930,9 @@ DatabaseEncryption.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.keyName != null && message.hasOwnProperty("keyName")) + if (!$util.isString(message.keyName)) + return "keyName: string expected"; if (message.state != null && message.hasOwnProperty("state")) switch (message.state) { default: @@ -40860,9 +40942,6 @@ case 2: break; } - if (message.keyName != null && message.hasOwnProperty("keyName")) - if (!$util.isString(message.keyName)) - return "keyName: string expected"; return null; }; @@ -40878,6 +40957,8 @@ if (object instanceof $root.google.container.v1.DatabaseEncryption) return object; var message = new $root.google.container.v1.DatabaseEncryption(); + if (object.keyName != null) + message.keyName = String(object.keyName); switch (object.state) { default: if (typeof object.state === "number") { @@ -40898,8 +40979,6 @@ message.state = 2; break; } - if (object.keyName != null) - message.keyName = String(object.keyName); return message; }; @@ -56002,6 +56081,7 @@ * @property {google.container.v1beta1.IKalmConfig|null} [kalmConfig] AddonsConfig kalmConfig * @property {google.container.v1beta1.IGcpFilestoreCsiDriverConfig|null} [gcpFilestoreCsiDriverConfig] AddonsConfig gcpFilestoreCsiDriverConfig * @property {google.container.v1beta1.IGkeBackupAgentConfig|null} [gkeBackupAgentConfig] AddonsConfig gkeBackupAgentConfig + * @property {google.container.v1beta1.IGcsFuseCsiDriverConfig|null} [gcsFuseCsiDriverConfig] AddonsConfig gcsFuseCsiDriverConfig */ /** @@ -56115,6 +56195,14 @@ */ AddonsConfig.prototype.gkeBackupAgentConfig = null; + /** + * AddonsConfig gcsFuseCsiDriverConfig. + * @member {google.container.v1beta1.IGcsFuseCsiDriverConfig|null|undefined} gcsFuseCsiDriverConfig + * @memberof google.container.v1beta1.AddonsConfig + * @instance + */ + AddonsConfig.prototype.gcsFuseCsiDriverConfig = null; + /** * Creates a new AddonsConfig instance using the specified properties. * @function create @@ -56163,6 +56251,8 @@ $root.google.container.v1beta1.GcpFilestoreCsiDriverConfig.encode(message.gcpFilestoreCsiDriverConfig, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); if (message.gkeBackupAgentConfig != null && Object.hasOwnProperty.call(message, "gkeBackupAgentConfig")) $root.google.container.v1beta1.GkeBackupAgentConfig.encode(message.gkeBackupAgentConfig, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.gcsFuseCsiDriverConfig != null && Object.hasOwnProperty.call(message, "gcsFuseCsiDriverConfig")) + $root.google.container.v1beta1.GcsFuseCsiDriverConfig.encode(message.gcsFuseCsiDriverConfig, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); return writer; }; @@ -56245,6 +56335,10 @@ message.gkeBackupAgentConfig = $root.google.container.v1beta1.GkeBackupAgentConfig.decode(reader, reader.uint32()); break; } + case 17: { + message.gcsFuseCsiDriverConfig = $root.google.container.v1beta1.GcsFuseCsiDriverConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -56340,6 +56434,11 @@ if (error) return "gkeBackupAgentConfig." + error; } + if (message.gcsFuseCsiDriverConfig != null && message.hasOwnProperty("gcsFuseCsiDriverConfig")) { + var error = $root.google.container.v1beta1.GcsFuseCsiDriverConfig.verify(message.gcsFuseCsiDriverConfig); + if (error) + return "gcsFuseCsiDriverConfig." + error; + } return null; }; @@ -56415,6 +56514,11 @@ throw TypeError(".google.container.v1beta1.AddonsConfig.gkeBackupAgentConfig: object expected"); message.gkeBackupAgentConfig = $root.google.container.v1beta1.GkeBackupAgentConfig.fromObject(object.gkeBackupAgentConfig); } + if (object.gcsFuseCsiDriverConfig != null) { + if (typeof object.gcsFuseCsiDriverConfig !== "object") + throw TypeError(".google.container.v1beta1.AddonsConfig.gcsFuseCsiDriverConfig: object expected"); + message.gcsFuseCsiDriverConfig = $root.google.container.v1beta1.GcsFuseCsiDriverConfig.fromObject(object.gcsFuseCsiDriverConfig); + } return message; }; @@ -56444,6 +56548,7 @@ object.kalmConfig = null; object.gcpFilestoreCsiDriverConfig = null; object.gkeBackupAgentConfig = null; + object.gcsFuseCsiDriverConfig = null; } if (message.httpLoadBalancing != null && message.hasOwnProperty("httpLoadBalancing")) object.httpLoadBalancing = $root.google.container.v1beta1.HttpLoadBalancing.toObject(message.httpLoadBalancing, options); @@ -56469,6 +56574,8 @@ object.gcpFilestoreCsiDriverConfig = $root.google.container.v1beta1.GcpFilestoreCsiDriverConfig.toObject(message.gcpFilestoreCsiDriverConfig, options); if (message.gkeBackupAgentConfig != null && message.hasOwnProperty("gkeBackupAgentConfig")) object.gkeBackupAgentConfig = $root.google.container.v1beta1.GkeBackupAgentConfig.toObject(message.gkeBackupAgentConfig, options); + if (message.gcsFuseCsiDriverConfig != null && message.hasOwnProperty("gcsFuseCsiDriverConfig")) + object.gcsFuseCsiDriverConfig = $root.google.container.v1beta1.GcsFuseCsiDriverConfig.toObject(message.gcsFuseCsiDriverConfig, options); return object; }; @@ -58531,6 +58638,209 @@ return GcpFilestoreCsiDriverConfig; })(); + v1beta1.GcsFuseCsiDriverConfig = (function() { + + /** + * Properties of a GcsFuseCsiDriverConfig. + * @memberof google.container.v1beta1 + * @interface IGcsFuseCsiDriverConfig + * @property {boolean|null} [enabled] GcsFuseCsiDriverConfig enabled + */ + + /** + * Constructs a new GcsFuseCsiDriverConfig. + * @memberof google.container.v1beta1 + * @classdesc Represents a GcsFuseCsiDriverConfig. + * @implements IGcsFuseCsiDriverConfig + * @constructor + * @param {google.container.v1beta1.IGcsFuseCsiDriverConfig=} [properties] Properties to set + */ + function GcsFuseCsiDriverConfig(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]]; + } + + /** + * GcsFuseCsiDriverConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1beta1.GcsFuseCsiDriverConfig + * @instance + */ + GcsFuseCsiDriverConfig.prototype.enabled = false; + + /** + * Creates a new GcsFuseCsiDriverConfig instance using the specified properties. + * @function create + * @memberof google.container.v1beta1.GcsFuseCsiDriverConfig + * @static + * @param {google.container.v1beta1.IGcsFuseCsiDriverConfig=} [properties] Properties to set + * @returns {google.container.v1beta1.GcsFuseCsiDriverConfig} GcsFuseCsiDriverConfig instance + */ + GcsFuseCsiDriverConfig.create = function create(properties) { + return new GcsFuseCsiDriverConfig(properties); + }; + + /** + * Encodes the specified GcsFuseCsiDriverConfig message. Does not implicitly {@link google.container.v1beta1.GcsFuseCsiDriverConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1beta1.GcsFuseCsiDriverConfig + * @static + * @param {google.container.v1beta1.IGcsFuseCsiDriverConfig} message GcsFuseCsiDriverConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsFuseCsiDriverConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified GcsFuseCsiDriverConfig message, length delimited. Does not implicitly {@link google.container.v1beta1.GcsFuseCsiDriverConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1beta1.GcsFuseCsiDriverConfig + * @static + * @param {google.container.v1beta1.IGcsFuseCsiDriverConfig} message GcsFuseCsiDriverConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsFuseCsiDriverConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcsFuseCsiDriverConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1beta1.GcsFuseCsiDriverConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1beta1.GcsFuseCsiDriverConfig} GcsFuseCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsFuseCsiDriverConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1beta1.GcsFuseCsiDriverConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcsFuseCsiDriverConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1beta1.GcsFuseCsiDriverConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1beta1.GcsFuseCsiDriverConfig} GcsFuseCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsFuseCsiDriverConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcsFuseCsiDriverConfig message. + * @function verify + * @memberof google.container.v1beta1.GcsFuseCsiDriverConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcsFuseCsiDriverConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a GcsFuseCsiDriverConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1beta1.GcsFuseCsiDriverConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1beta1.GcsFuseCsiDriverConfig} GcsFuseCsiDriverConfig + */ + GcsFuseCsiDriverConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1beta1.GcsFuseCsiDriverConfig) + return object; + var message = new $root.google.container.v1beta1.GcsFuseCsiDriverConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a GcsFuseCsiDriverConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1beta1.GcsFuseCsiDriverConfig + * @static + * @param {google.container.v1beta1.GcsFuseCsiDriverConfig} message GcsFuseCsiDriverConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcsFuseCsiDriverConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this GcsFuseCsiDriverConfig to JSON. + * @function toJSON + * @memberof google.container.v1beta1.GcsFuseCsiDriverConfig + * @instance + * @returns {Object.} JSON object + */ + GcsFuseCsiDriverConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcsFuseCsiDriverConfig + * @function getTypeUrl + * @memberof google.container.v1beta1.GcsFuseCsiDriverConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcsFuseCsiDriverConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1beta1.GcsFuseCsiDriverConfig"; + }; + + return GcsFuseCsiDriverConfig; + })(); + v1beta1.PrivateClusterMasterGlobalAccessConfig = (function() { /** @@ -66043,6 +66353,7 @@ * @property {google.container.v1beta1.IGatewayAPIConfig|null} [desiredGatewayApiConfig] ClusterUpdate desiredGatewayApiConfig * @property {string|null} [etag] ClusterUpdate etag * @property {google.container.v1beta1.INodePoolLoggingConfig|null} [desiredNodePoolLoggingConfig] ClusterUpdate desiredNodePoolLoggingConfig + * @property {google.container.v1beta1.IFleet|null} [desiredFleet] ClusterUpdate desiredFleet * @property {google.container.v1beta1.StackType|null} [desiredStackType] ClusterUpdate desiredStackType * @property {google.container.v1beta1.IAdditionalPodRangesConfig|null} [additionalPodRangesConfig] ClusterUpdate additionalPodRangesConfig * @property {google.container.v1beta1.IAdditionalPodRangesConfig|null} [removedAdditionalPodRangesConfig] ClusterUpdate removedAdditionalPodRangesConfig @@ -66432,6 +66743,14 @@ */ ClusterUpdate.prototype.desiredNodePoolLoggingConfig = null; + /** + * ClusterUpdate desiredFleet. + * @member {google.container.v1beta1.IFleet|null|undefined} desiredFleet + * @memberof google.container.v1beta1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredFleet = null; + /** * ClusterUpdate desiredStackType. * @member {google.container.v1beta1.StackType} desiredStackType @@ -66598,6 +66917,8 @@ writer.uint32(/* id 115, wireType 2 =*/922).string(message.etag); if (message.desiredNodePoolLoggingConfig != null && Object.hasOwnProperty.call(message, "desiredNodePoolLoggingConfig")) $root.google.container.v1beta1.NodePoolLoggingConfig.encode(message.desiredNodePoolLoggingConfig, writer.uint32(/* id 116, wireType 2 =*/930).fork()).ldelim(); + if (message.desiredFleet != null && Object.hasOwnProperty.call(message, "desiredFleet")) + $root.google.container.v1beta1.Fleet.encode(message.desiredFleet, writer.uint32(/* id 117, wireType 2 =*/938).fork()).ldelim(); if (message.desiredStackType != null && Object.hasOwnProperty.call(message, "desiredStackType")) writer.uint32(/* id 119, wireType 0 =*/952).int32(message.desiredStackType); if (message.additionalPodRangesConfig != null && Object.hasOwnProperty.call(message, "additionalPodRangesConfig")) @@ -66824,6 +67145,10 @@ message.desiredNodePoolLoggingConfig = $root.google.container.v1beta1.NodePoolLoggingConfig.decode(reader, reader.uint32()); break; } + case 117: { + message.desiredFleet = $root.google.container.v1beta1.Fleet.decode(reader, reader.uint32()); + break; + } case 119: { message.desiredStackType = reader.int32(); break; @@ -67102,6 +67427,11 @@ if (error) return "desiredNodePoolLoggingConfig." + error; } + if (message.desiredFleet != null && message.hasOwnProperty("desiredFleet")) { + var error = $root.google.container.v1beta1.Fleet.verify(message.desiredFleet); + if (error) + return "desiredFleet." + error; + } if (message.desiredStackType != null && message.hasOwnProperty("desiredStackType")) switch (message.desiredStackType) { default: @@ -67378,6 +67708,11 @@ throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredNodePoolLoggingConfig: object expected"); message.desiredNodePoolLoggingConfig = $root.google.container.v1beta1.NodePoolLoggingConfig.fromObject(object.desiredNodePoolLoggingConfig); } + if (object.desiredFleet != null) { + if (typeof object.desiredFleet !== "object") + throw TypeError(".google.container.v1beta1.ClusterUpdate.desiredFleet: object expected"); + message.desiredFleet = $root.google.container.v1beta1.Fleet.fromObject(object.desiredFleet); + } switch (object.desiredStackType) { default: if (typeof object.desiredStackType === "number") { @@ -67470,6 +67805,7 @@ object.desiredGatewayApiConfig = null; object.etag = ""; object.desiredNodePoolLoggingConfig = null; + object.desiredFleet = null; object.desiredStackType = options.enums === String ? "STACK_TYPE_UNSPECIFIED" : 0; object.additionalPodRangesConfig = null; object.removedAdditionalPodRangesConfig = null; @@ -67575,6 +67911,8 @@ object.etag = message.etag; if (message.desiredNodePoolLoggingConfig != null && message.hasOwnProperty("desiredNodePoolLoggingConfig")) object.desiredNodePoolLoggingConfig = $root.google.container.v1beta1.NodePoolLoggingConfig.toObject(message.desiredNodePoolLoggingConfig, options); + if (message.desiredFleet != null && message.hasOwnProperty("desiredFleet")) + object.desiredFleet = $root.google.container.v1beta1.Fleet.toObject(message.desiredFleet, options); if (message.desiredStackType != null && message.hasOwnProperty("desiredStackType")) object.desiredStackType = options.enums === String ? $root.google.container.v1beta1.StackType[message.desiredStackType] === undefined ? message.desiredStackType : $root.google.container.v1beta1.StackType[message.desiredStackType] : message.desiredStackType; if (message.additionalPodRangesConfig != null && message.hasOwnProperty("additionalPodRangesConfig")) @@ -67619,6 +67957,7 @@ * Properties of an AdditionalPodRangesConfig. * @memberof google.container.v1beta1 * @interface IAdditionalPodRangesConfig + * @property {Array.|null} [podRangeNames] AdditionalPodRangesConfig podRangeNames */ /** @@ -67630,12 +67969,21 @@ * @param {google.container.v1beta1.IAdditionalPodRangesConfig=} [properties] Properties to set */ function AdditionalPodRangesConfig(properties) { + this.podRangeNames = []; 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]]; } + /** + * AdditionalPodRangesConfig podRangeNames. + * @member {Array.} podRangeNames + * @memberof google.container.v1beta1.AdditionalPodRangesConfig + * @instance + */ + AdditionalPodRangesConfig.prototype.podRangeNames = $util.emptyArray; + /** * Creates a new AdditionalPodRangesConfig instance using the specified properties. * @function create @@ -67660,6 +68008,9 @@ AdditionalPodRangesConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.podRangeNames != null && message.podRangeNames.length) + for (var i = 0; i < message.podRangeNames.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.podRangeNames[i]); return writer; }; @@ -67694,6 +68045,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + if (!(message.podRangeNames && message.podRangeNames.length)) + message.podRangeNames = []; + message.podRangeNames.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -67729,6 +68086,13 @@ AdditionalPodRangesConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.podRangeNames != null && message.hasOwnProperty("podRangeNames")) { + if (!Array.isArray(message.podRangeNames)) + return "podRangeNames: array expected"; + for (var i = 0; i < message.podRangeNames.length; ++i) + if (!$util.isString(message.podRangeNames[i])) + return "podRangeNames: string[] expected"; + } return null; }; @@ -67743,7 +68107,15 @@ AdditionalPodRangesConfig.fromObject = function fromObject(object) { if (object instanceof $root.google.container.v1beta1.AdditionalPodRangesConfig) return object; - return new $root.google.container.v1beta1.AdditionalPodRangesConfig(); + var message = new $root.google.container.v1beta1.AdditionalPodRangesConfig(); + if (object.podRangeNames) { + if (!Array.isArray(object.podRangeNames)) + throw TypeError(".google.container.v1beta1.AdditionalPodRangesConfig.podRangeNames: array expected"); + message.podRangeNames = []; + for (var i = 0; i < object.podRangeNames.length; ++i) + message.podRangeNames[i] = String(object.podRangeNames[i]); + } + return message; }; /** @@ -67755,8 +68127,18 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AdditionalPodRangesConfig.toObject = function toObject() { - return {}; + AdditionalPodRangesConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.podRangeNames = []; + if (message.podRangeNames && message.podRangeNames.length) { + object.podRangeNames = []; + for (var j = 0; j < message.podRangeNames.length; ++j) + object.podRangeNames[j] = message.podRangeNames[j]; + } + return object; }; /** @@ -68164,6 +68546,7 @@ case 14: case 15: case 16: + case 18: break; } if (message.status != null && message.hasOwnProperty("status")) @@ -68320,6 +68703,10 @@ case 16: message.operationType = 16; break; + case "RESIZE_CLUSTER": + case 18: + message.operationType = 18; + break; } switch (object.status) { default: @@ -68534,6 +68921,7 @@ * @property {number} SET_NODE_POOL_SIZE=14 SET_NODE_POOL_SIZE value * @property {number} SET_NETWORK_POLICY=15 SET_NETWORK_POLICY value * @property {number} SET_MAINTENANCE_POLICY=16 SET_MAINTENANCE_POLICY value + * @property {number} RESIZE_CLUSTER=18 RESIZE_CLUSTER value */ Operation.Type = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -68554,6 +68942,7 @@ values[valuesById[14] = "SET_NODE_POOL_SIZE"] = 14; values[valuesById[15] = "SET_NETWORK_POLICY"] = 15; values[valuesById[16] = "SET_MAINTENANCE_POLICY"] = 16; + values[valuesById[18] = "RESIZE_CLUSTER"] = 18; return values; })(); @@ -93749,8 +94138,8 @@ * Properties of a DatabaseEncryption. * @memberof google.container.v1beta1 * @interface IDatabaseEncryption - * @property {google.container.v1beta1.DatabaseEncryption.State|null} [state] DatabaseEncryption state * @property {string|null} [keyName] DatabaseEncryption keyName + * @property {google.container.v1beta1.DatabaseEncryption.State|null} [state] DatabaseEncryption state */ /** @@ -93769,20 +94158,20 @@ } /** - * DatabaseEncryption state. - * @member {google.container.v1beta1.DatabaseEncryption.State} state + * DatabaseEncryption keyName. + * @member {string} keyName * @memberof google.container.v1beta1.DatabaseEncryption * @instance */ - DatabaseEncryption.prototype.state = 0; + DatabaseEncryption.prototype.keyName = ""; /** - * DatabaseEncryption keyName. - * @member {string} keyName + * DatabaseEncryption state. + * @member {google.container.v1beta1.DatabaseEncryption.State} state * @memberof google.container.v1beta1.DatabaseEncryption * @instance */ - DatabaseEncryption.prototype.keyName = ""; + DatabaseEncryption.prototype.state = 0; /** * Creates a new DatabaseEncryption instance using the specified properties. @@ -93846,14 +94235,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: { - message.state = reader.int32(); - break; - } case 1: { message.keyName = reader.string(); break; } + case 2: { + message.state = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -93889,6 +94278,9 @@ DatabaseEncryption.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.keyName != null && message.hasOwnProperty("keyName")) + if (!$util.isString(message.keyName)) + return "keyName: string expected"; if (message.state != null && message.hasOwnProperty("state")) switch (message.state) { default: @@ -93898,9 +94290,6 @@ case 2: break; } - if (message.keyName != null && message.hasOwnProperty("keyName")) - if (!$util.isString(message.keyName)) - return "keyName: string expected"; return null; }; @@ -93916,6 +94305,8 @@ if (object instanceof $root.google.container.v1beta1.DatabaseEncryption) return object; var message = new $root.google.container.v1beta1.DatabaseEncryption(); + if (object.keyName != null) + message.keyName = String(object.keyName); switch (object.state) { default: if (typeof object.state === "number") { @@ -93936,8 +94327,6 @@ message.state = 2; break; } - if (object.keyName != null) - message.keyName = String(object.keyName); return message; }; diff --git a/packages/google-container/protos/protos.json b/packages/google-container/protos/protos.json index 9a57b9261ae..7b38cdbe6d8 100644 --- a/packages/google-container/protos/protos.json +++ b/packages/google-container/protos/protos.json @@ -2240,6 +2240,10 @@ "type": "NodePoolLoggingConfig", "id": 116 }, + "desiredFleet": { + "type": "Fleet", + "id": 117 + }, "desiredStackType": { "type": "StackType", "id": 119 @@ -2255,7 +2259,13 @@ } }, "AdditionalPodRangesConfig": { - "fields": {} + "fields": { + "podRangeNames": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } }, "Operation": { "fields": { @@ -2349,6 +2359,23 @@ } }, "Type": { + "valuesOptions": { + "AUTO_UPGRADE_NODES": { + "deprecated": true + }, + "SET_LABELS": { + "deprecated": true + }, + "SET_MASTER_AUTH": { + "deprecated": true + }, + "SET_NETWORK_POLICY": { + "deprecated": true + }, + "SET_MAINTENANCE_POLICY": { + "deprecated": true + } + }, "values": { "TYPE_UNSPECIFIED": 0, "CREATE_CLUSTER": 1, @@ -2366,7 +2393,8 @@ "SET_MASTER_AUTH": 13, "SET_NODE_POOL_SIZE": 14, "SET_NETWORK_POLICY": 15, - "SET_MAINTENANCE_POLICY": 16 + "SET_MAINTENANCE_POLICY": 16, + "RESIZE_CLUSTER": 18 } } } @@ -4568,13 +4596,13 @@ }, "DatabaseEncryption": { "fields": { - "state": { - "type": "State", - "id": 2 - }, "keyName": { "type": "string", "id": 1 + }, + "state": { + "type": "State", + "id": 2 } }, "nested": { @@ -6472,6 +6500,10 @@ "gkeBackupAgentConfig": { "type": "GkeBackupAgentConfig", "id": 16 + }, + "gcsFuseCsiDriverConfig": { + "type": "GcsFuseCsiDriverConfig", + "id": 17 } } }, @@ -6558,6 +6590,14 @@ } } }, + "GcsFuseCsiDriverConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, "PrivateClusterMasterGlobalAccessConfig": { "fields": { "enabled": { @@ -7577,6 +7617,10 @@ "type": "NodePoolLoggingConfig", "id": 116 }, + "desiredFleet": { + "type": "Fleet", + "id": 117 + }, "desiredStackType": { "type": "StackType", "id": 119 @@ -7592,7 +7636,13 @@ } }, "AdditionalPodRangesConfig": { - "fields": {} + "fields": { + "podRangeNames": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } }, "Operation": { "fields": { @@ -7686,6 +7736,23 @@ } }, "Type": { + "valuesOptions": { + "AUTO_UPGRADE_NODES": { + "deprecated": true + }, + "SET_LABELS": { + "deprecated": true + }, + "SET_MASTER_AUTH": { + "deprecated": true + }, + "SET_NETWORK_POLICY": { + "deprecated": true + }, + "SET_MAINTENANCE_POLICY": { + "deprecated": true + } + }, "values": { "TYPE_UNSPECIFIED": 0, "CREATE_CLUSTER": 1, @@ -7703,7 +7770,8 @@ "SET_MASTER_AUTH": 13, "SET_NODE_POOL_SIZE": 14, "SET_NETWORK_POLICY": 15, - "SET_MAINTENANCE_POLICY": 16 + "SET_MAINTENANCE_POLICY": 16, + "RESIZE_CLUSTER": 18 } } } @@ -10129,13 +10197,13 @@ }, "DatabaseEncryption": { "fields": { - "state": { - "type": "State", - "id": 2 - }, "keyName": { "type": "string", "id": 1 + }, + "state": { + "type": "State", + "id": 2 } }, "nested": { diff --git a/packages/google-container/samples/README.md b/packages/google-container/samples/README.md index 209c83c5dd8..05c383b2f30 100644 --- a/packages/google-container/samples/README.md +++ b/packages/google-container/samples/README.md @@ -80,7 +80,6 @@ * [Cluster_manager.update_master](#cluster_manager.update_master) * [Cluster_manager.update_node_pool](#cluster_manager.update_node_pool) * [Quickstart](#quickstart) - * [Quickstart.test](#quickstart.test) ## Before you begin @@ -1248,23 +1247,6 @@ __Usage:__ `node packages/google-container/samples/quickstart.js` ------ - - - - -### Quickstart.test - -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-container/samples/test/quickstart.test.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-container/samples/test/quickstart.test.js,samples/README.md) - -__Usage:__ - - -`node packages/google-container/samples/test/quickstart.test.js` - - diff --git a/packages/google-container/samples/generated/v1/snippet_metadata.google.container.v1.json b/packages/google-container/samples/generated/v1/snippet_metadata.google.container.v1.json index ca0c108974a..4be286726e2 100644 --- a/packages/google-container/samples/generated/v1/snippet_metadata.google.container.v1.json +++ b/packages/google-container/samples/generated/v1/snippet_metadata.google.container.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-container", - "version": "4.7.1", + "version": "4.11.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-container/samples/generated/v1beta1/snippet_metadata.google.container.v1beta1.json b/packages/google-container/samples/generated/v1beta1/snippet_metadata.google.container.v1beta1.json index ebe0e50545c..228747521c5 100644 --- a/packages/google-container/samples/generated/v1beta1/snippet_metadata.google.container.v1beta1.json +++ b/packages/google-container/samples/generated/v1beta1/snippet_metadata.google.container.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-container", - "version": "4.7.1", + "version": "4.11.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-container/samples/package.json b/packages/google-container/samples/package.json index f0e6921747c..447303465a2 100644 --- a/packages/google-container/samples/package.json +++ b/packages/google-container/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha test --timeout 1000000" }, "dependencies": { - "@google-cloud/container": "^4.8.0", + "@google-cloud/container": "^4.11.0", "uuid": "^9.0.0" }, "devDependencies": { diff --git a/packages/google-dataflow/package.json b/packages/google-dataflow/package.json index 1f40dd9a90e..88d8c8249c7 100644 --- a/packages/google-dataflow/package.json +++ b/packages/google-dataflow/package.json @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-dataflow" -} - +} \ No newline at end of file diff --git a/packages/google-devtools-artifactregistry/package.json b/packages/google-devtools-artifactregistry/package.json index c45e1e3b7ff..6b79d861f38 100644 --- a/packages/google-devtools-artifactregistry/package.json +++ b/packages/google-devtools-artifactregistry/package.json @@ -31,7 +31,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -39,10 +39,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -57,6 +58,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index b7e5e591503..8cf5d8079c6 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [3.6.0](https://github.com/googleapis/google-cloud-node/compare/cloudbuild-v3.5.2...cloudbuild-v3.6.0) (2023-04-24) + + +### Features + +* [cloudbuild] Add PeeredNetworkIpRange to NetworkConfigs message ([#4181](https://github.com/googleapis/google-cloud-node/issues/4181)) ([01fa5eb](https://github.com/googleapis/google-cloud-node/commit/01fa5eb8e96fd8c8c0dd689b5da1ab57c4b66c98)) + ## [3.5.2](https://github.com/googleapis/google-cloud-node/compare/cloudbuild-v3.5.1...cloudbuild-v3.5.2) (2023-04-13) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 419fdad0011..07833004391 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -5,7 +5,7 @@ "url": "https://github.com/googleapis/google-cloud-node.git" }, "name": "@google-cloud/cloudbuild", - "version": "3.5.2", + "version": "3.6.0", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", @@ -38,28 +38,27 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "pack-n-play": "^1.0.0-2", "sinon": "^15.0.0", "typescript": "^4.6.4" }, "scripts": { - "predocs": "npm run compile", - "docs": "jsdoc -c .jsdoc.js", - "lint": "gts check", "clean": "gts clean", - "fix": "gts fix", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", - "prepare": "npm run compile-protos && npm run compile", - "pretest": "npm run compile", - "test": "c8 mocha build/test", - "system-test": "npm run compile && c8 mocha build/system-test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", + "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", "docs-test": "linkinator docs", - "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean" + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "license": "Apache-2.0", "engines": { @@ -69,5 +68,4 @@ "google-gax": "^3.5.8" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-devtools-cloudbuild" -} - +} \ No newline at end of file diff --git a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto index 96e1f04c849..7d11dab8023 100644 --- a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto +++ b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -32,8 +32,8 @@ option go_package = "cloud.google.com/go/cloudbuild/apiv1/v2/apiv1pb;apiv1pb"; option java_multiple_files = true; option java_package = "com.google.cloudbuild.v1"; option objc_class_prefix = "GCB"; -option ruby_package = "Google::Cloud::Build::V1"; option php_namespace = "Google\\Cloud\\Build\\V1"; +option ruby_package = "Google::Cloud::Build::V1"; option (google.api.resource_definition) = { type: "compute.googleapis.com/Network" pattern: "projects/{project}/global/networks/{network}" @@ -412,6 +412,32 @@ message StorageSource { int64 generation = 3; } +// Location of the source in any accessible Git repository. +message GitSource { + // Location of the Git repo to build. + // + // This will be used as a `git remote`, see + // https://git-scm.com/docs/git-remote. + string url = 1; + + // Directory, relative to the source root, in which to run the build. + // + // This must be a relative path. If a step's `dir` is specified and is an + // absolute path, this value is ignored for that step's execution. + string dir = 5; + + // The revision to fetch from the Git repository such as a branch, a tag, a + // commit SHA, or any Git ref. + // + // Cloud Build uses `git fetch` to fetch the revision from the Git + // repository; therefore make sure that the string you provide for `revision` + // is parsable by the command. For information on string values accepted by + // `git fetch`, see + // https://git-scm.com/docs/gitrevisions#_specifying_revisions. For + // information on `git fetch`, see https://git-scm.com/docs/git-fetch. + string revision = 6; +} + // Location of the source in a Google Cloud Source Repository. message RepoSource { // ID of the project that owns the Cloud Source Repository. If omitted, the @@ -485,6 +511,9 @@ message Source { // Repository. RepoSource repo_source = 3; + // If provided, get the source from this Git repository. + GitSource git_source = 5; + // If provided, get the source from this manifest in Google Cloud Storage. // This feature is in Preview; see description // [here](https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher). @@ -529,6 +558,19 @@ message UploadedMavenArtifact { TimeSpan push_timing = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } +// An npm package uploaded to Artifact Registry using the NpmPackage +// directive. +message UploadedNpmPackage { + // URI of the uploaded npm package. + string uri = 1; + + // Hash types and values of the npm package. + FileHashes file_hashes = 2; + + // Output only. Stores timing information for pushing the specified artifact. + TimeSpan push_timing = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + // A step in the build pipeline. message BuildStep { // Required. The name of the container image that will run this particular @@ -669,10 +711,12 @@ message Results { // indices. repeated string build_step_images = 3; - // Path to the artifact manifest. Only populated when artifacts are uploaded. + // Path to the artifact manifest for non-container artifacts uploaded to Cloud + // Storage. Only populated when artifacts are uploaded to Cloud Storage. string artifact_manifest = 4; - // Number of artifacts uploaded. Only populated when artifacts are uploaded. + // Number of non-container artifacts uploaded to Cloud Storage. Only populated + // when artifacts are uploaded to Cloud Storage. int64 num_artifacts = 5; // List of build step outputs, produced by builder images, in the order @@ -683,7 +727,7 @@ message Results { // Only the first 4KB of data is stored. repeated bytes build_step_outputs = 6; - // Time to push all non-container artifacts. + // Time to push all non-container artifacts to Cloud Storage. TimeSpan artifact_timing = 7; // Python artifacts uploaded to Artifact Registry at the end of the build. @@ -691,6 +735,9 @@ message Results { // Maven artifacts uploaded to Artifact Registry at the end of the build. repeated UploadedMavenArtifact maven_artifacts = 9; + + // Npm packages uploaded to Artifact Registry at the end of the build. + repeated UploadedNpmPackage npm_packages = 12; } // An artifact that was uploaded during a build. This @@ -716,6 +763,7 @@ message ArtifactResult { // // - $PROJECT_ID: the project ID of the build. // - $PROJECT_NUMBER: the project number of the build. +// - $LOCATION: the location/region of the build. // - $BUILD_ID: the autogenerated ID of the build. // - $REPO_NAME: the source repository name specified by RepoSource. // - $BRANCH_NAME: the branch name specified by RepoSource. @@ -730,6 +778,40 @@ message Build { pattern: "projects/{project}/locations/{location}/builds/{build}" }; + // Possible status of a build or build step. + enum Status { + // Status of the build is unknown. + STATUS_UNKNOWN = 0; + + // Build has been created and is pending execution and queuing. It has not + // been queued. + PENDING = 10; + + // Build or step is queued; work has not yet begun. + QUEUED = 1; + + // Build or step is being executed. + WORKING = 2; + + // Build or step finished successfully. + SUCCESS = 3; + + // Build or step failed to complete successfully. + FAILURE = 4; + + // Build or step failed due to an internal cause. + INTERNAL_ERROR = 5; + + // Build or step took longer than was allowed. + TIMEOUT = 6; + + // Build or step was canceled by a user. + CANCELLED = 7; + + // Build was enqueued for longer than the value of `queue_ttl`. + EXPIRED = 9; + } + // A non-fatal problem encountered during the execution of the build. message Warning { // The relative importance of this warning. @@ -788,40 +870,6 @@ message Build { string detail = 2; } - // Possible status of a build or build step. - enum Status { - // Status of the build is unknown. - STATUS_UNKNOWN = 0; - - // Build has been created and is pending execution and queuing. It has not - // been queued. - PENDING = 10; - - // Build or step is queued; work has not yet begun. - QUEUED = 1; - - // Build or step is being executed. - WORKING = 2; - - // Build or step finished successfully. - SUCCESS = 3; - - // Build or step failed to complete successfully. - FAILURE = 4; - - // Build or step failed due to an internal cause. - INTERNAL_ERROR = 5; - - // Build or step took longer than was allowed. - TIMEOUT = 6; - - // Build or step was canceled by a user. - CANCELLED = 7; - - // Build was enqueued for longer than the value of `queue_ttl`. - EXPIRED = 9; - } - // Output only. The 'Build' name with format: // `projects/{project}/locations/{location}/builds/{build}`, where {build} // is a unique identifier generated by the service. @@ -869,7 +917,7 @@ message Build { // // `timeout` starts ticking from `startTime`. // - // Default time is ten minutes. + // Default time is 60 minutes. google.protobuf.Duration timeout = 12; // A list of images to be pushed upon the successful completion of all build @@ -932,7 +980,8 @@ message Build { // are: // // * BUILD: time to execute all build steps. - // * PUSH: time to push all specified images. + // * PUSH: time to push all artifacts including docker images and non docker + // artifacts. // * FETCHSOURCE: time to fetch source. // * SETUPBUILD: time to set up build. // @@ -1032,6 +1081,21 @@ message Artifacts { repeated string paths = 2; } + // Npm package to upload to Artifact Registry upon successful completion + // of all build steps. + message NpmPackage { + // Artifact Registry repository, in the form + // "https://$REGION-npm.pkg.dev/$PROJECT/$REPOSITORY" + // + // Npm package in the workspace specified by path will be zipped and + // uploaded to Artifact Registry with this location as a prefix. + string repository = 1; + + // Path to the package.json. + // e.g. workspace/path/to/package + string package_path = 2; + } + // A list of images to be pushed upon the successful completion of all build // steps. // @@ -1073,6 +1137,16 @@ message Artifacts { // // If any objects fail to be pushed, the build is marked FAILURE. repeated PythonPackage python_packages = 5; + + // A list of npm packages to be uploaded to Artifact Registry upon + // successful completion of all build steps. + // + // Npm packages in the specified paths will be uploaded + // to the specified Artifact Registry repository using the builder service + // account's credentials. + // + // If any packages fail to be pushed, the build is marked FAILURE. + repeated NpmPackage npm_packages = 6; } // Start and end times for a build execution phase. @@ -1139,6 +1213,9 @@ message Hash { // Use a md5 hash. MD5 = 2; + + // Use a sha512 hash. + SHA512 = 4; } // The type of hash that was performed. @@ -1241,7 +1318,7 @@ message GetBuildRequest { // Request to list builds. message ListBuildsRequest { // The parent of the collection of `Builds`. - // Format: `projects/{project}/locations/location` + // Format: `projects/{project}/locations/{location}` string parent = 9 [(google.api.resource_reference) = { child_type: "cloudbuild.googleapis.com/Build" }]; @@ -1769,10 +1846,10 @@ message BuildOptions { // Specifies the manner in which the build should be verified, if at all. enum VerifyOption { - // Not a verifiable build. (default) + // Not a verifiable build (the default). NOT_VERIFIED = 0; - // Verified build. + // Build must be verified. VERIFIED = 1; } @@ -1825,18 +1902,18 @@ message BuildOptions { // rely on the default logging behavior as it may change in the future. LOGGING_UNSPECIFIED = 0; - // Cloud Logging and Cloud Storage logging are enabled. + // Build logs are stored in Cloud Logging and Cloud Storage. LEGACY = 1; - // Only Cloud Storage logging is enabled. + // Build logs are stored in Cloud Storage. GCS_ONLY = 2; // This option is the same as CLOUD_LOGGING_ONLY. STACKDRIVER_ONLY = 3 [deprecated = true]; - // Only Cloud Logging is enabled. Note that logs for both the Cloud Console - // UI and Cloud SDK are based on Cloud Storage logs, so neither will provide - // logs if this option is chosen. + // Build logs are stored in Cloud Logging. Selecting this option will not + // allow [logs + // streaming](https://cloud.google.com/sdk/gcloud/reference/builds/log). CLOUD_LOGGING_ONLY = 5; // Turn off all logging. No build logs will be captured. @@ -1867,7 +1944,7 @@ message BuildOptions { // "disk free"; some of the space will be used by the operating system and // build utilities. Also note that this is the minimum disk size that will be // allocated for the build -- the build may run with a larger disk than - // requested. At present, the maximum disk size is 1000GB; builds that request + // requested. At present, the maximum disk size is 2000GB; builds that request // more than the maximum are rejected with an error. int64 disk_size_gb = 6; @@ -1928,7 +2005,7 @@ message BuildOptions { // it is indicative of a build request with an incorrect configuration. repeated Volume volumes = 14; - // Option to specify how default logs buckets are setup. + // Optional. Option to specify how default logs buckets are setup. DefaultLogsBucketBehavior default_logs_bucket_behavior = 21 [(google.api.field_behavior) = OPTIONAL]; } @@ -2033,9 +2110,9 @@ message WorkerPool { // Output only. `WorkerPool` state. State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Private Pool configuration for the `WorkerPool`. + // Configuration for the `WorkerPool`. oneof config { - // Private Pool using a v1 configuration. + // Legacy Private Pool configuration. PrivatePoolV1Config private_pool_v1_config = 12; } @@ -2059,7 +2136,7 @@ message PrivatePoolV1Config { // Size of the disk attached to the worker, in GB. // See [Worker pool config // file](https://cloud.google.com/build/docs/private-pools/worker-pool-config-file-schema). - // Specify a value of up to 1000. If `0` is specified, Cloud Build will use + // Specify a value of up to 2000. If `0` is specified, Cloud Build will use // a standard disk size. int64 disk_size_gb = 2; } @@ -2098,6 +2175,17 @@ message PrivatePoolV1Config { // Option to configure network egress for the workers. EgressOption egress_option = 2; + + // Immutable. Subnet IP range within the peered network. This is specified + // in CIDR notation with a slash and the subnet prefix size. You can + // optionally specify an IP address before the subnet prefix value. e.g. + // `192.168.0.0/29` would specify an IP range starting at 192.168.0.0 with a + // prefix size of 29 bits. + // `/16` would specify a prefix size of 16 bits, with an automatically + // determined IP within the peered VPC. + // If unspecified, a value of `/24` will be used. + string peered_network_ip_range = 3 + [(google.api.field_behavior) = IMMUTABLE]; } // Machine configuration for the workers in the pool. @@ -2152,7 +2240,7 @@ message GetWorkerPoolRequest { message DeleteWorkerPoolRequest { // Required. The name of the `WorkerPool` to delete. // Format: - // `projects/{project}/locations/{workerPool}/workerPools/{workerPool}`. + // `projects/{project}/locations/{location}/workerPools/{workerPool}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/packages/google-devtools-cloudbuild/protos/protos.d.ts b/packages/google-devtools-cloudbuild/protos/protos.d.ts index addeaf0bd5f..6e49890d60a 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.d.ts +++ b/packages/google-devtools-cloudbuild/protos/protos.d.ts @@ -761,6 +761,115 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a GitSource. */ + interface IGitSource { + + /** GitSource url */ + url?: (string|null); + + /** GitSource dir */ + dir?: (string|null); + + /** GitSource revision */ + revision?: (string|null); + } + + /** Represents a GitSource. */ + class GitSource implements IGitSource { + + /** + * Constructs a new GitSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IGitSource); + + /** GitSource url. */ + public url: string; + + /** GitSource dir. */ + public dir: string; + + /** GitSource revision. */ + public revision: string; + + /** + * Creates a new GitSource instance using the specified properties. + * @param [properties] Properties to set + * @returns GitSource instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IGitSource): google.devtools.cloudbuild.v1.GitSource; + + /** + * Encodes the specified GitSource message. Does not implicitly {@link google.devtools.cloudbuild.v1.GitSource.verify|verify} messages. + * @param message GitSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IGitSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GitSource message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.GitSource.verify|verify} messages. + * @param message GitSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IGitSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GitSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GitSource + * @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.devtools.cloudbuild.v1.GitSource; + + /** + * Decodes a GitSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GitSource + * @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.devtools.cloudbuild.v1.GitSource; + + /** + * Verifies a GitSource 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 GitSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GitSource + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.GitSource; + + /** + * Creates a plain object from a GitSource message. Also converts values to other types if specified. + * @param message GitSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.GitSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GitSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GitSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a RepoSource. */ interface IRepoSource { @@ -1021,6 +1130,9 @@ export namespace google { /** Source repoSource */ repoSource?: (google.devtools.cloudbuild.v1.IRepoSource|null); + /** Source gitSource */ + gitSource?: (google.devtools.cloudbuild.v1.IGitSource|null); + /** Source storageSourceManifest */ storageSourceManifest?: (google.devtools.cloudbuild.v1.IStorageSourceManifest|null); } @@ -1040,11 +1152,14 @@ export namespace google { /** Source repoSource. */ public repoSource?: (google.devtools.cloudbuild.v1.IRepoSource|null); + /** Source gitSource. */ + public gitSource?: (google.devtools.cloudbuild.v1.IGitSource|null); + /** Source storageSourceManifest. */ public storageSourceManifest?: (google.devtools.cloudbuild.v1.IStorageSourceManifest|null); /** Source source. */ - public source?: ("storageSource"|"repoSource"|"storageSourceManifest"); + public source?: ("storageSource"|"repoSource"|"gitSource"|"storageSourceManifest"); /** * Creates a new Source instance using the specified properties. @@ -1451,6 +1566,115 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an UploadedNpmPackage. */ + interface IUploadedNpmPackage { + + /** UploadedNpmPackage uri */ + uri?: (string|null); + + /** UploadedNpmPackage fileHashes */ + fileHashes?: (google.devtools.cloudbuild.v1.IFileHashes|null); + + /** UploadedNpmPackage pushTiming */ + pushTiming?: (google.devtools.cloudbuild.v1.ITimeSpan|null); + } + + /** Represents an UploadedNpmPackage. */ + class UploadedNpmPackage implements IUploadedNpmPackage { + + /** + * Constructs a new UploadedNpmPackage. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IUploadedNpmPackage); + + /** UploadedNpmPackage uri. */ + public uri: string; + + /** UploadedNpmPackage fileHashes. */ + public fileHashes?: (google.devtools.cloudbuild.v1.IFileHashes|null); + + /** UploadedNpmPackage pushTiming. */ + public pushTiming?: (google.devtools.cloudbuild.v1.ITimeSpan|null); + + /** + * Creates a new UploadedNpmPackage instance using the specified properties. + * @param [properties] Properties to set + * @returns UploadedNpmPackage instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IUploadedNpmPackage): google.devtools.cloudbuild.v1.UploadedNpmPackage; + + /** + * Encodes the specified UploadedNpmPackage message. Does not implicitly {@link google.devtools.cloudbuild.v1.UploadedNpmPackage.verify|verify} messages. + * @param message UploadedNpmPackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IUploadedNpmPackage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UploadedNpmPackage message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.UploadedNpmPackage.verify|verify} messages. + * @param message UploadedNpmPackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IUploadedNpmPackage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UploadedNpmPackage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UploadedNpmPackage + * @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.devtools.cloudbuild.v1.UploadedNpmPackage; + + /** + * Decodes an UploadedNpmPackage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UploadedNpmPackage + * @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.devtools.cloudbuild.v1.UploadedNpmPackage; + + /** + * Verifies an UploadedNpmPackage 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 UploadedNpmPackage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UploadedNpmPackage + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.UploadedNpmPackage; + + /** + * Creates a plain object from an UploadedNpmPackage message. Also converts values to other types if specified. + * @param message UploadedNpmPackage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.UploadedNpmPackage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UploadedNpmPackage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UploadedNpmPackage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a BuildStep. */ interface IBuildStep { @@ -1773,6 +1997,9 @@ export namespace google { /** Results mavenArtifacts */ mavenArtifacts?: (google.devtools.cloudbuild.v1.IUploadedMavenArtifact[]|null); + + /** Results npmPackages */ + npmPackages?: (google.devtools.cloudbuild.v1.IUploadedNpmPackage[]|null); } /** Represents a Results. */ @@ -1808,6 +2035,9 @@ export namespace google { /** Results mavenArtifacts. */ public mavenArtifacts: google.devtools.cloudbuild.v1.IUploadedMavenArtifact[]; + /** Results npmPackages. */ + public npmPackages: google.devtools.cloudbuild.v1.IUploadedNpmPackage[]; + /** * Creates a new Results instance using the specified properties. * @param [properties] Properties to set @@ -2256,6 +2486,20 @@ export namespace google { namespace Build { + /** Status enum. */ + enum Status { + STATUS_UNKNOWN = 0, + PENDING = 10, + QUEUED = 1, + WORKING = 2, + SUCCESS = 3, + FAILURE = 4, + INTERNAL_ERROR = 5, + TIMEOUT = 6, + CANCELLED = 7, + EXPIRED = 9 + } + /** Properties of a Warning. */ interface IWarning { @@ -2486,20 +2730,6 @@ export namespace google { FETCH_SOURCE_FAILED = 6 } } - - /** Status enum. */ - enum Status { - STATUS_UNKNOWN = 0, - PENDING = 10, - QUEUED = 1, - WORKING = 2, - SUCCESS = 3, - FAILURE = 4, - INTERNAL_ERROR = 5, - TIMEOUT = 6, - CANCELLED = 7, - EXPIRED = 9 - } } /** Properties of an Artifacts. */ @@ -2516,6 +2746,9 @@ export namespace google { /** Artifacts pythonPackages */ pythonPackages?: (google.devtools.cloudbuild.v1.Artifacts.IPythonPackage[]|null); + + /** Artifacts npmPackages */ + npmPackages?: (google.devtools.cloudbuild.v1.Artifacts.INpmPackage[]|null); } /** Represents an Artifacts. */ @@ -2539,6 +2772,9 @@ export namespace google { /** Artifacts pythonPackages. */ public pythonPackages: google.devtools.cloudbuild.v1.Artifacts.IPythonPackage[]; + /** Artifacts npmPackages. */ + public npmPackages: google.devtools.cloudbuild.v1.Artifacts.INpmPackage[]; + /** * Creates a new Artifacts instance using the specified properties. * @param [properties] Properties to set @@ -2951,6 +3187,109 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of a NpmPackage. */ + interface INpmPackage { + + /** NpmPackage repository */ + repository?: (string|null); + + /** NpmPackage packagePath */ + packagePath?: (string|null); + } + + /** Represents a NpmPackage. */ + class NpmPackage implements INpmPackage { + + /** + * Constructs a new NpmPackage. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.Artifacts.INpmPackage); + + /** NpmPackage repository. */ + public repository: string; + + /** NpmPackage packagePath. */ + public packagePath: string; + + /** + * Creates a new NpmPackage instance using the specified properties. + * @param [properties] Properties to set + * @returns NpmPackage instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.Artifacts.INpmPackage): google.devtools.cloudbuild.v1.Artifacts.NpmPackage; + + /** + * Encodes the specified NpmPackage message. Does not implicitly {@link google.devtools.cloudbuild.v1.Artifacts.NpmPackage.verify|verify} messages. + * @param message NpmPackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.Artifacts.INpmPackage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NpmPackage message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Artifacts.NpmPackage.verify|verify} messages. + * @param message NpmPackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.Artifacts.INpmPackage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NpmPackage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NpmPackage + * @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.devtools.cloudbuild.v1.Artifacts.NpmPackage; + + /** + * Decodes a NpmPackage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NpmPackage + * @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.devtools.cloudbuild.v1.Artifacts.NpmPackage; + + /** + * Verifies a NpmPackage 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 NpmPackage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NpmPackage + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.Artifacts.NpmPackage; + + /** + * Creates a plain object from a NpmPackage message. Also converts values to other types if specified. + * @param message NpmPackage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.Artifacts.NpmPackage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NpmPackage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NpmPackage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Properties of a TimeSpan. */ @@ -3474,7 +3813,8 @@ export namespace google { enum HashType { NONE = 0, SHA256 = 1, - MD5 = 2 + MD5 = 2, + SHA512 = 4 } } @@ -7269,6 +7609,9 @@ export namespace google { /** NetworkConfig egressOption */ egressOption?: (google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.EgressOption|keyof typeof google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.EgressOption|null); + + /** NetworkConfig peeredNetworkIpRange */ + peeredNetworkIpRange?: (string|null); } /** Represents a NetworkConfig. */ @@ -7286,6 +7629,9 @@ export namespace google { /** NetworkConfig egressOption. */ public egressOption: (google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.EgressOption|keyof typeof google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.EgressOption); + /** NetworkConfig peeredNetworkIpRange. */ + public peeredNetworkIpRange: string; + /** * Creates a new NetworkConfig instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-devtools-cloudbuild/protos/protos.js b/packages/google-devtools-cloudbuild/protos/protos.js index 94ef9bde6cb..ae9dd2f4819 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.js +++ b/packages/google-devtools-cloudbuild/protos/protos.js @@ -1487,6 +1487,256 @@ return StorageSource; })(); + v1.GitSource = (function() { + + /** + * Properties of a GitSource. + * @memberof google.devtools.cloudbuild.v1 + * @interface IGitSource + * @property {string|null} [url] GitSource url + * @property {string|null} [dir] GitSource dir + * @property {string|null} [revision] GitSource revision + */ + + /** + * Constructs a new GitSource. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a GitSource. + * @implements IGitSource + * @constructor + * @param {google.devtools.cloudbuild.v1.IGitSource=} [properties] Properties to set + */ + function GitSource(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]]; + } + + /** + * GitSource url. + * @member {string} url + * @memberof google.devtools.cloudbuild.v1.GitSource + * @instance + */ + GitSource.prototype.url = ""; + + /** + * GitSource dir. + * @member {string} dir + * @memberof google.devtools.cloudbuild.v1.GitSource + * @instance + */ + GitSource.prototype.dir = ""; + + /** + * GitSource revision. + * @member {string} revision + * @memberof google.devtools.cloudbuild.v1.GitSource + * @instance + */ + GitSource.prototype.revision = ""; + + /** + * Creates a new GitSource instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.GitSource + * @static + * @param {google.devtools.cloudbuild.v1.IGitSource=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.GitSource} GitSource instance + */ + GitSource.create = function create(properties) { + return new GitSource(properties); + }; + + /** + * Encodes the specified GitSource message. Does not implicitly {@link google.devtools.cloudbuild.v1.GitSource.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.GitSource + * @static + * @param {google.devtools.cloudbuild.v1.IGitSource} message GitSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GitSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.url != null && Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.url); + if (message.dir != null && Object.hasOwnProperty.call(message, "dir")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.dir); + if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.revision); + return writer; + }; + + /** + * Encodes the specified GitSource message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.GitSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.GitSource + * @static + * @param {google.devtools.cloudbuild.v1.IGitSource} message GitSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GitSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GitSource message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.GitSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.GitSource} GitSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GitSource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.GitSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.url = reader.string(); + break; + } + case 5: { + message.dir = reader.string(); + break; + } + case 6: { + message.revision = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GitSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.GitSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.GitSource} GitSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GitSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GitSource message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.GitSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GitSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.url != null && message.hasOwnProperty("url")) + if (!$util.isString(message.url)) + return "url: string expected"; + if (message.dir != null && message.hasOwnProperty("dir")) + if (!$util.isString(message.dir)) + return "dir: string expected"; + if (message.revision != null && message.hasOwnProperty("revision")) + if (!$util.isString(message.revision)) + return "revision: string expected"; + return null; + }; + + /** + * Creates a GitSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.GitSource + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.GitSource} GitSource + */ + GitSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.GitSource) + return object; + var message = new $root.google.devtools.cloudbuild.v1.GitSource(); + if (object.url != null) + message.url = String(object.url); + if (object.dir != null) + message.dir = String(object.dir); + if (object.revision != null) + message.revision = String(object.revision); + return message; + }; + + /** + * Creates a plain object from a GitSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.GitSource + * @static + * @param {google.devtools.cloudbuild.v1.GitSource} message GitSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GitSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.url = ""; + object.dir = ""; + object.revision = ""; + } + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + if (message.dir != null && message.hasOwnProperty("dir")) + object.dir = message.dir; + if (message.revision != null && message.hasOwnProperty("revision")) + object.revision = message.revision; + return object; + }; + + /** + * Converts this GitSource to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.GitSource + * @instance + * @returns {Object.} JSON object + */ + GitSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GitSource + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.GitSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GitSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.GitSource"; + }; + + return GitSource; + })(); + v1.RepoSource = (function() { /** @@ -2191,6 +2441,7 @@ * @interface ISource * @property {google.devtools.cloudbuild.v1.IStorageSource|null} [storageSource] Source storageSource * @property {google.devtools.cloudbuild.v1.IRepoSource|null} [repoSource] Source repoSource + * @property {google.devtools.cloudbuild.v1.IGitSource|null} [gitSource] Source gitSource * @property {google.devtools.cloudbuild.v1.IStorageSourceManifest|null} [storageSourceManifest] Source storageSourceManifest */ @@ -2225,6 +2476,14 @@ */ Source.prototype.repoSource = null; + /** + * Source gitSource. + * @member {google.devtools.cloudbuild.v1.IGitSource|null|undefined} gitSource + * @memberof google.devtools.cloudbuild.v1.Source + * @instance + */ + Source.prototype.gitSource = null; + /** * Source storageSourceManifest. * @member {google.devtools.cloudbuild.v1.IStorageSourceManifest|null|undefined} storageSourceManifest @@ -2238,12 +2497,12 @@ /** * Source source. - * @member {"storageSource"|"repoSource"|"storageSourceManifest"|undefined} source + * @member {"storageSource"|"repoSource"|"gitSource"|"storageSourceManifest"|undefined} source * @memberof google.devtools.cloudbuild.v1.Source * @instance */ Object.defineProperty(Source.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["storageSource", "repoSource", "storageSourceManifest"]), + get: $util.oneOfGetter($oneOfFields = ["storageSource", "repoSource", "gitSource", "storageSourceManifest"]), set: $util.oneOfSetter($oneOfFields) }); @@ -2275,6 +2534,8 @@ $root.google.devtools.cloudbuild.v1.StorageSource.encode(message.storageSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.repoSource != null && Object.hasOwnProperty.call(message, "repoSource")) $root.google.devtools.cloudbuild.v1.RepoSource.encode(message.repoSource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.gitSource != null && Object.hasOwnProperty.call(message, "gitSource")) + $root.google.devtools.cloudbuild.v1.GitSource.encode(message.gitSource, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.storageSourceManifest != null && Object.hasOwnProperty.call(message, "storageSourceManifest")) $root.google.devtools.cloudbuild.v1.StorageSourceManifest.encode(message.storageSourceManifest, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; @@ -2319,6 +2580,10 @@ message.repoSource = $root.google.devtools.cloudbuild.v1.RepoSource.decode(reader, reader.uint32()); break; } + case 5: { + message.gitSource = $root.google.devtools.cloudbuild.v1.GitSource.decode(reader, reader.uint32()); + break; + } case 8: { message.storageSourceManifest = $root.google.devtools.cloudbuild.v1.StorageSourceManifest.decode(reader, reader.uint32()); break; @@ -2377,6 +2642,16 @@ return "repoSource." + error; } } + if (message.gitSource != null && message.hasOwnProperty("gitSource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.devtools.cloudbuild.v1.GitSource.verify(message.gitSource); + if (error) + return "gitSource." + error; + } + } if (message.storageSourceManifest != null && message.hasOwnProperty("storageSourceManifest")) { if (properties.source === 1) return "source: multiple values"; @@ -2412,6 +2687,11 @@ throw TypeError(".google.devtools.cloudbuild.v1.Source.repoSource: object expected"); message.repoSource = $root.google.devtools.cloudbuild.v1.RepoSource.fromObject(object.repoSource); } + if (object.gitSource != null) { + if (typeof object.gitSource !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Source.gitSource: object expected"); + message.gitSource = $root.google.devtools.cloudbuild.v1.GitSource.fromObject(object.gitSource); + } if (object.storageSourceManifest != null) { if (typeof object.storageSourceManifest !== "object") throw TypeError(".google.devtools.cloudbuild.v1.Source.storageSourceManifest: object expected"); @@ -2443,6 +2723,11 @@ if (options.oneofs) object.source = "repoSource"; } + if (message.gitSource != null && message.hasOwnProperty("gitSource")) { + object.gitSource = $root.google.devtools.cloudbuild.v1.GitSource.toObject(message.gitSource, options); + if (options.oneofs) + object.source = "gitSource"; + } if (message.storageSourceManifest != null && message.hasOwnProperty("storageSourceManifest")) { object.storageSourceManifest = $root.google.devtools.cloudbuild.v1.StorageSourceManifest.toObject(message.storageSourceManifest, options); if (options.oneofs) @@ -3255,6 +3540,266 @@ return UploadedMavenArtifact; })(); + v1.UploadedNpmPackage = (function() { + + /** + * Properties of an UploadedNpmPackage. + * @memberof google.devtools.cloudbuild.v1 + * @interface IUploadedNpmPackage + * @property {string|null} [uri] UploadedNpmPackage uri + * @property {google.devtools.cloudbuild.v1.IFileHashes|null} [fileHashes] UploadedNpmPackage fileHashes + * @property {google.devtools.cloudbuild.v1.ITimeSpan|null} [pushTiming] UploadedNpmPackage pushTiming + */ + + /** + * Constructs a new UploadedNpmPackage. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents an UploadedNpmPackage. + * @implements IUploadedNpmPackage + * @constructor + * @param {google.devtools.cloudbuild.v1.IUploadedNpmPackage=} [properties] Properties to set + */ + function UploadedNpmPackage(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]]; + } + + /** + * UploadedNpmPackage uri. + * @member {string} uri + * @memberof google.devtools.cloudbuild.v1.UploadedNpmPackage + * @instance + */ + UploadedNpmPackage.prototype.uri = ""; + + /** + * UploadedNpmPackage fileHashes. + * @member {google.devtools.cloudbuild.v1.IFileHashes|null|undefined} fileHashes + * @memberof google.devtools.cloudbuild.v1.UploadedNpmPackage + * @instance + */ + UploadedNpmPackage.prototype.fileHashes = null; + + /** + * UploadedNpmPackage pushTiming. + * @member {google.devtools.cloudbuild.v1.ITimeSpan|null|undefined} pushTiming + * @memberof google.devtools.cloudbuild.v1.UploadedNpmPackage + * @instance + */ + UploadedNpmPackage.prototype.pushTiming = null; + + /** + * Creates a new UploadedNpmPackage instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.UploadedNpmPackage + * @static + * @param {google.devtools.cloudbuild.v1.IUploadedNpmPackage=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.UploadedNpmPackage} UploadedNpmPackage instance + */ + UploadedNpmPackage.create = function create(properties) { + return new UploadedNpmPackage(properties); + }; + + /** + * Encodes the specified UploadedNpmPackage message. Does not implicitly {@link google.devtools.cloudbuild.v1.UploadedNpmPackage.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.UploadedNpmPackage + * @static + * @param {google.devtools.cloudbuild.v1.IUploadedNpmPackage} message UploadedNpmPackage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UploadedNpmPackage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + if (message.fileHashes != null && Object.hasOwnProperty.call(message, "fileHashes")) + $root.google.devtools.cloudbuild.v1.FileHashes.encode(message.fileHashes, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.pushTiming != null && Object.hasOwnProperty.call(message, "pushTiming")) + $root.google.devtools.cloudbuild.v1.TimeSpan.encode(message.pushTiming, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UploadedNpmPackage message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.UploadedNpmPackage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.UploadedNpmPackage + * @static + * @param {google.devtools.cloudbuild.v1.IUploadedNpmPackage} message UploadedNpmPackage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UploadedNpmPackage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UploadedNpmPackage message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.UploadedNpmPackage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.UploadedNpmPackage} UploadedNpmPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UploadedNpmPackage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.UploadedNpmPackage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + case 2: { + message.fileHashes = $root.google.devtools.cloudbuild.v1.FileHashes.decode(reader, reader.uint32()); + break; + } + case 3: { + message.pushTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UploadedNpmPackage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.UploadedNpmPackage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.UploadedNpmPackage} UploadedNpmPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UploadedNpmPackage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UploadedNpmPackage message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.UploadedNpmPackage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UploadedNpmPackage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.fileHashes != null && message.hasOwnProperty("fileHashes")) { + var error = $root.google.devtools.cloudbuild.v1.FileHashes.verify(message.fileHashes); + if (error) + return "fileHashes." + error; + } + if (message.pushTiming != null && message.hasOwnProperty("pushTiming")) { + var error = $root.google.devtools.cloudbuild.v1.TimeSpan.verify(message.pushTiming); + if (error) + return "pushTiming." + error; + } + return null; + }; + + /** + * Creates an UploadedNpmPackage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.UploadedNpmPackage + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.UploadedNpmPackage} UploadedNpmPackage + */ + UploadedNpmPackage.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.UploadedNpmPackage) + return object; + var message = new $root.google.devtools.cloudbuild.v1.UploadedNpmPackage(); + if (object.uri != null) + message.uri = String(object.uri); + if (object.fileHashes != null) { + if (typeof object.fileHashes !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.UploadedNpmPackage.fileHashes: object expected"); + message.fileHashes = $root.google.devtools.cloudbuild.v1.FileHashes.fromObject(object.fileHashes); + } + if (object.pushTiming != null) { + if (typeof object.pushTiming !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.UploadedNpmPackage.pushTiming: object expected"); + message.pushTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.fromObject(object.pushTiming); + } + return message; + }; + + /** + * Creates a plain object from an UploadedNpmPackage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.UploadedNpmPackage + * @static + * @param {google.devtools.cloudbuild.v1.UploadedNpmPackage} message UploadedNpmPackage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UploadedNpmPackage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.uri = ""; + object.fileHashes = null; + object.pushTiming = null; + } + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.fileHashes != null && message.hasOwnProperty("fileHashes")) + object.fileHashes = $root.google.devtools.cloudbuild.v1.FileHashes.toObject(message.fileHashes, options); + if (message.pushTiming != null && message.hasOwnProperty("pushTiming")) + object.pushTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.toObject(message.pushTiming, options); + return object; + }; + + /** + * Converts this UploadedNpmPackage to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.UploadedNpmPackage + * @instance + * @returns {Object.} JSON object + */ + UploadedNpmPackage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UploadedNpmPackage + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.UploadedNpmPackage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UploadedNpmPackage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.UploadedNpmPackage"; + }; + + return UploadedNpmPackage; + })(); + v1.BuildStep = (function() { /** @@ -4253,6 +4798,7 @@ * @property {google.devtools.cloudbuild.v1.ITimeSpan|null} [artifactTiming] Results artifactTiming * @property {Array.|null} [pythonPackages] Results pythonPackages * @property {Array.|null} [mavenArtifacts] Results mavenArtifacts + * @property {Array.|null} [npmPackages] Results npmPackages */ /** @@ -4269,6 +4815,7 @@ this.buildStepOutputs = []; this.pythonPackages = []; this.mavenArtifacts = []; + this.npmPackages = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4332,12 +4879,20 @@ Results.prototype.pythonPackages = $util.emptyArray; /** - * Results mavenArtifacts. - * @member {Array.} mavenArtifacts + * Results mavenArtifacts. + * @member {Array.} mavenArtifacts + * @memberof google.devtools.cloudbuild.v1.Results + * @instance + */ + Results.prototype.mavenArtifacts = $util.emptyArray; + + /** + * Results npmPackages. + * @member {Array.} npmPackages * @memberof google.devtools.cloudbuild.v1.Results * @instance */ - Results.prototype.mavenArtifacts = $util.emptyArray; + Results.prototype.npmPackages = $util.emptyArray; /** * Creates a new Results instance using the specified properties. @@ -4384,6 +4939,9 @@ if (message.mavenArtifacts != null && message.mavenArtifacts.length) for (var i = 0; i < message.mavenArtifacts.length; ++i) $root.google.devtools.cloudbuild.v1.UploadedMavenArtifact.encode(message.mavenArtifacts[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.npmPackages != null && message.npmPackages.length) + for (var i = 0; i < message.npmPackages.length; ++i) + $root.google.devtools.cloudbuild.v1.UploadedNpmPackage.encode(message.npmPackages[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); return writer; }; @@ -4460,6 +5018,12 @@ message.mavenArtifacts.push($root.google.devtools.cloudbuild.v1.UploadedMavenArtifact.decode(reader, reader.uint32())); break; } + case 12: { + if (!(message.npmPackages && message.npmPackages.length)) + message.npmPackages = []; + message.npmPackages.push($root.google.devtools.cloudbuild.v1.UploadedNpmPackage.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -4547,6 +5111,15 @@ return "mavenArtifacts." + error; } } + if (message.npmPackages != null && message.hasOwnProperty("npmPackages")) { + if (!Array.isArray(message.npmPackages)) + return "npmPackages: array expected"; + for (var i = 0; i < message.npmPackages.length; ++i) { + var error = $root.google.devtools.cloudbuild.v1.UploadedNpmPackage.verify(message.npmPackages[i]); + if (error) + return "npmPackages." + error; + } + } return null; }; @@ -4625,6 +5198,16 @@ message.mavenArtifacts[i] = $root.google.devtools.cloudbuild.v1.UploadedMavenArtifact.fromObject(object.mavenArtifacts[i]); } } + if (object.npmPackages) { + if (!Array.isArray(object.npmPackages)) + throw TypeError(".google.devtools.cloudbuild.v1.Results.npmPackages: array expected"); + message.npmPackages = []; + for (var i = 0; i < object.npmPackages.length; ++i) { + if (typeof object.npmPackages[i] !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Results.npmPackages: object expected"); + message.npmPackages[i] = $root.google.devtools.cloudbuild.v1.UploadedNpmPackage.fromObject(object.npmPackages[i]); + } + } return message; }; @@ -4647,6 +5230,7 @@ object.buildStepOutputs = []; object.pythonPackages = []; object.mavenArtifacts = []; + object.npmPackages = []; } if (options.defaults) { object.artifactManifest = ""; @@ -4691,6 +5275,11 @@ for (var j = 0; j < message.mavenArtifacts.length; ++j) object.mavenArtifacts[j] = $root.google.devtools.cloudbuild.v1.UploadedMavenArtifact.toObject(message.mavenArtifacts[j], options); } + if (message.npmPackages && message.npmPackages.length) { + object.npmPackages = []; + for (var j = 0; j < message.npmPackages.length; ++j) + object.npmPackages[j] = $root.google.devtools.cloudbuild.v1.UploadedNpmPackage.toObject(message.npmPackages[j], options); + } return object; }; @@ -6115,6 +6704,36 @@ return typeUrlPrefix + "/google.devtools.cloudbuild.v1.Build"; }; + /** + * Status enum. + * @name google.devtools.cloudbuild.v1.Build.Status + * @enum {number} + * @property {number} STATUS_UNKNOWN=0 STATUS_UNKNOWN value + * @property {number} PENDING=10 PENDING value + * @property {number} QUEUED=1 QUEUED value + * @property {number} WORKING=2 WORKING value + * @property {number} SUCCESS=3 SUCCESS value + * @property {number} FAILURE=4 FAILURE value + * @property {number} INTERNAL_ERROR=5 INTERNAL_ERROR value + * @property {number} TIMEOUT=6 TIMEOUT value + * @property {number} CANCELLED=7 CANCELLED value + * @property {number} EXPIRED=9 EXPIRED value + */ + Build.Status = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATUS_UNKNOWN"] = 0; + values[valuesById[10] = "PENDING"] = 10; + values[valuesById[1] = "QUEUED"] = 1; + values[valuesById[2] = "WORKING"] = 2; + values[valuesById[3] = "SUCCESS"] = 3; + values[valuesById[4] = "FAILURE"] = 4; + values[valuesById[5] = "INTERNAL_ERROR"] = 5; + values[valuesById[6] = "TIMEOUT"] = 6; + values[valuesById[7] = "CANCELLED"] = 7; + values[valuesById[9] = "EXPIRED"] = 9; + return values; + })(); + Build.Warning = (function() { /** @@ -6684,36 +7303,6 @@ return FailureInfo; })(); - /** - * Status enum. - * @name google.devtools.cloudbuild.v1.Build.Status - * @enum {number} - * @property {number} STATUS_UNKNOWN=0 STATUS_UNKNOWN value - * @property {number} PENDING=10 PENDING value - * @property {number} QUEUED=1 QUEUED value - * @property {number} WORKING=2 WORKING value - * @property {number} SUCCESS=3 SUCCESS value - * @property {number} FAILURE=4 FAILURE value - * @property {number} INTERNAL_ERROR=5 INTERNAL_ERROR value - * @property {number} TIMEOUT=6 TIMEOUT value - * @property {number} CANCELLED=7 CANCELLED value - * @property {number} EXPIRED=9 EXPIRED value - */ - Build.Status = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATUS_UNKNOWN"] = 0; - values[valuesById[10] = "PENDING"] = 10; - values[valuesById[1] = "QUEUED"] = 1; - values[valuesById[2] = "WORKING"] = 2; - values[valuesById[3] = "SUCCESS"] = 3; - values[valuesById[4] = "FAILURE"] = 4; - values[valuesById[5] = "INTERNAL_ERROR"] = 5; - values[valuesById[6] = "TIMEOUT"] = 6; - values[valuesById[7] = "CANCELLED"] = 7; - values[valuesById[9] = "EXPIRED"] = 9; - return values; - })(); - return Build; })(); @@ -6727,6 +7316,7 @@ * @property {google.devtools.cloudbuild.v1.Artifacts.IArtifactObjects|null} [objects] Artifacts objects * @property {Array.|null} [mavenArtifacts] Artifacts mavenArtifacts * @property {Array.|null} [pythonPackages] Artifacts pythonPackages + * @property {Array.|null} [npmPackages] Artifacts npmPackages */ /** @@ -6741,6 +7331,7 @@ this.images = []; this.mavenArtifacts = []; this.pythonPackages = []; + this.npmPackages = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6779,6 +7370,14 @@ */ Artifacts.prototype.pythonPackages = $util.emptyArray; + /** + * Artifacts npmPackages. + * @member {Array.} npmPackages + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @instance + */ + Artifacts.prototype.npmPackages = $util.emptyArray; + /** * Creates a new Artifacts instance using the specified properties. * @function create @@ -6814,6 +7413,9 @@ if (message.pythonPackages != null && message.pythonPackages.length) for (var i = 0; i < message.pythonPackages.length; ++i) $root.google.devtools.cloudbuild.v1.Artifacts.PythonPackage.encode(message.pythonPackages[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.npmPackages != null && message.npmPackages.length) + for (var i = 0; i < message.npmPackages.length; ++i) + $root.google.devtools.cloudbuild.v1.Artifacts.NpmPackage.encode(message.npmPackages[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -6870,6 +7472,12 @@ message.pythonPackages.push($root.google.devtools.cloudbuild.v1.Artifacts.PythonPackage.decode(reader, reader.uint32())); break; } + case 6: { + if (!(message.npmPackages && message.npmPackages.length)) + message.npmPackages = []; + message.npmPackages.push($root.google.devtools.cloudbuild.v1.Artifacts.NpmPackage.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -6935,6 +7543,15 @@ return "pythonPackages." + error; } } + if (message.npmPackages != null && message.hasOwnProperty("npmPackages")) { + if (!Array.isArray(message.npmPackages)) + return "npmPackages: array expected"; + for (var i = 0; i < message.npmPackages.length; ++i) { + var error = $root.google.devtools.cloudbuild.v1.Artifacts.NpmPackage.verify(message.npmPackages[i]); + if (error) + return "npmPackages." + error; + } + } return null; }; @@ -6982,6 +7599,16 @@ message.pythonPackages[i] = $root.google.devtools.cloudbuild.v1.Artifacts.PythonPackage.fromObject(object.pythonPackages[i]); } } + if (object.npmPackages) { + if (!Array.isArray(object.npmPackages)) + throw TypeError(".google.devtools.cloudbuild.v1.Artifacts.npmPackages: array expected"); + message.npmPackages = []; + for (var i = 0; i < object.npmPackages.length; ++i) { + if (typeof object.npmPackages[i] !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Artifacts.npmPackages: object expected"); + message.npmPackages[i] = $root.google.devtools.cloudbuild.v1.Artifacts.NpmPackage.fromObject(object.npmPackages[i]); + } + } return message; }; @@ -7002,6 +7629,7 @@ object.images = []; object.mavenArtifacts = []; object.pythonPackages = []; + object.npmPackages = []; } if (options.defaults) object.objects = null; @@ -7022,6 +7650,11 @@ for (var j = 0; j < message.pythonPackages.length; ++j) object.pythonPackages[j] = $root.google.devtools.cloudbuild.v1.Artifacts.PythonPackage.toObject(message.pythonPackages[j], options); } + if (message.npmPackages && message.npmPackages.length) { + object.npmPackages = []; + for (var j = 0; j < message.npmPackages.length; ++j) + object.npmPackages[j] = $root.google.devtools.cloudbuild.v1.Artifacts.NpmPackage.toObject(message.npmPackages[j], options); + } return object; }; @@ -7862,6 +8495,233 @@ return PythonPackage; })(); + Artifacts.NpmPackage = (function() { + + /** + * Properties of a NpmPackage. + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @interface INpmPackage + * @property {string|null} [repository] NpmPackage repository + * @property {string|null} [packagePath] NpmPackage packagePath + */ + + /** + * Constructs a new NpmPackage. + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @classdesc Represents a NpmPackage. + * @implements INpmPackage + * @constructor + * @param {google.devtools.cloudbuild.v1.Artifacts.INpmPackage=} [properties] Properties to set + */ + function NpmPackage(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]]; + } + + /** + * NpmPackage repository. + * @member {string} repository + * @memberof google.devtools.cloudbuild.v1.Artifacts.NpmPackage + * @instance + */ + NpmPackage.prototype.repository = ""; + + /** + * NpmPackage packagePath. + * @member {string} packagePath + * @memberof google.devtools.cloudbuild.v1.Artifacts.NpmPackage + * @instance + */ + NpmPackage.prototype.packagePath = ""; + + /** + * Creates a new NpmPackage instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.Artifacts.NpmPackage + * @static + * @param {google.devtools.cloudbuild.v1.Artifacts.INpmPackage=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.Artifacts.NpmPackage} NpmPackage instance + */ + NpmPackage.create = function create(properties) { + return new NpmPackage(properties); + }; + + /** + * Encodes the specified NpmPackage message. Does not implicitly {@link google.devtools.cloudbuild.v1.Artifacts.NpmPackage.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.Artifacts.NpmPackage + * @static + * @param {google.devtools.cloudbuild.v1.Artifacts.INpmPackage} message NpmPackage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NpmPackage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.repository != null && Object.hasOwnProperty.call(message, "repository")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.repository); + if (message.packagePath != null && Object.hasOwnProperty.call(message, "packagePath")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.packagePath); + return writer; + }; + + /** + * Encodes the specified NpmPackage message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Artifacts.NpmPackage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.Artifacts.NpmPackage + * @static + * @param {google.devtools.cloudbuild.v1.Artifacts.INpmPackage} message NpmPackage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NpmPackage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NpmPackage message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.Artifacts.NpmPackage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.Artifacts.NpmPackage} NpmPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NpmPackage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Artifacts.NpmPackage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.repository = reader.string(); + break; + } + case 2: { + message.packagePath = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NpmPackage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.Artifacts.NpmPackage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.Artifacts.NpmPackage} NpmPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NpmPackage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NpmPackage message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.Artifacts.NpmPackage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NpmPackage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.repository != null && message.hasOwnProperty("repository")) + if (!$util.isString(message.repository)) + return "repository: string expected"; + if (message.packagePath != null && message.hasOwnProperty("packagePath")) + if (!$util.isString(message.packagePath)) + return "packagePath: string expected"; + return null; + }; + + /** + * Creates a NpmPackage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.Artifacts.NpmPackage + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.Artifacts.NpmPackage} NpmPackage + */ + NpmPackage.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.Artifacts.NpmPackage) + return object; + var message = new $root.google.devtools.cloudbuild.v1.Artifacts.NpmPackage(); + if (object.repository != null) + message.repository = String(object.repository); + if (object.packagePath != null) + message.packagePath = String(object.packagePath); + return message; + }; + + /** + * Creates a plain object from a NpmPackage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.Artifacts.NpmPackage + * @static + * @param {google.devtools.cloudbuild.v1.Artifacts.NpmPackage} message NpmPackage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NpmPackage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.repository = ""; + object.packagePath = ""; + } + if (message.repository != null && message.hasOwnProperty("repository")) + object.repository = message.repository; + if (message.packagePath != null && message.hasOwnProperty("packagePath")) + object.packagePath = message.packagePath; + return object; + }; + + /** + * Converts this NpmPackage to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.Artifacts.NpmPackage + * @instance + * @returns {Object.} JSON object + */ + NpmPackage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NpmPackage + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.Artifacts.NpmPackage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NpmPackage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.Artifacts.NpmPackage"; + }; + + return NpmPackage; + })(); + return Artifacts; })(); @@ -9018,6 +9878,7 @@ case 0: case 1: case 2: + case 4: break; } if (message.value != null && message.hasOwnProperty("value")) @@ -9057,6 +9918,10 @@ case 2: message.type = 2; break; + case "SHA512": + case 4: + message.type = 4; + break; } if (object.value != null) if (typeof object.value === "string") @@ -9129,12 +9994,14 @@ * @property {number} NONE=0 NONE value * @property {number} SHA256=1 SHA256 value * @property {number} MD5=2 MD5 value + * @property {number} SHA512=4 SHA512 value */ Hash.HashType = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "NONE"] = 0; values[valuesById[1] = "SHA256"] = 1; values[valuesById[2] = "MD5"] = 2; + values[valuesById[4] = "SHA512"] = 4; return values; })(); @@ -16755,6 +17622,7 @@ case 0: case 1: case 2: + case 4: break; } } @@ -16889,6 +17757,10 @@ case 2: message.sourceProvenanceHash[i] = 2; break; + case "SHA512": + case 4: + message.sourceProvenanceHash[i] = 4; + break; } } switch (object.requestedVerifyOption) { @@ -18977,6 +19849,7 @@ * @interface INetworkConfig * @property {string|null} [peeredNetwork] NetworkConfig peeredNetwork * @property {google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.EgressOption|null} [egressOption] NetworkConfig egressOption + * @property {string|null} [peeredNetworkIpRange] NetworkConfig peeredNetworkIpRange */ /** @@ -19010,6 +19883,14 @@ */ NetworkConfig.prototype.egressOption = 0; + /** + * NetworkConfig peeredNetworkIpRange. + * @member {string} peeredNetworkIpRange + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig + * @instance + */ + NetworkConfig.prototype.peeredNetworkIpRange = ""; + /** * Creates a new NetworkConfig instance using the specified properties. * @function create @@ -19038,6 +19919,8 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.peeredNetwork); if (message.egressOption != null && Object.hasOwnProperty.call(message, "egressOption")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.egressOption); + if (message.peeredNetworkIpRange != null && Object.hasOwnProperty.call(message, "peeredNetworkIpRange")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.peeredNetworkIpRange); return writer; }; @@ -19080,6 +19963,10 @@ message.egressOption = reader.int32(); break; } + case 3: { + message.peeredNetworkIpRange = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -19127,6 +20014,9 @@ case 2: break; } + if (message.peeredNetworkIpRange != null && message.hasOwnProperty("peeredNetworkIpRange")) + if (!$util.isString(message.peeredNetworkIpRange)) + return "peeredNetworkIpRange: string expected"; return null; }; @@ -19164,6 +20054,8 @@ message.egressOption = 2; break; } + if (object.peeredNetworkIpRange != null) + message.peeredNetworkIpRange = String(object.peeredNetworkIpRange); return message; }; @@ -19183,11 +20075,14 @@ if (options.defaults) { object.peeredNetwork = ""; object.egressOption = options.enums === String ? "EGRESS_OPTION_UNSPECIFIED" : 0; + object.peeredNetworkIpRange = ""; } if (message.peeredNetwork != null && message.hasOwnProperty("peeredNetwork")) object.peeredNetwork = message.peeredNetwork; if (message.egressOption != null && message.hasOwnProperty("egressOption")) object.egressOption = options.enums === String ? $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.EgressOption[message.egressOption] === undefined ? message.egressOption : $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.EgressOption[message.egressOption] : message.egressOption; + if (message.peeredNetworkIpRange != null && message.hasOwnProperty("peeredNetworkIpRange")) + object.peeredNetworkIpRange = message.peeredNetworkIpRange; return object; }; diff --git a/packages/google-devtools-cloudbuild/protos/protos.json b/packages/google-devtools-cloudbuild/protos/protos.json index e9d7dd85f4a..fd4e21ce4ec 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.json +++ b/packages/google-devtools-cloudbuild/protos/protos.json @@ -13,8 +13,8 @@ "java_multiple_files": true, "java_package": "com.google.cloudbuild.v1", "objc_class_prefix": "GCB", - "ruby_package": "Google::Cloud::Build::V1", "php_namespace": "Google\\Cloud\\Build\\V1", + "ruby_package": "Google::Cloud::Build::V1", "(google.api.resource_definition).type": "pubsub.googleapis.com/Topic", "(google.api.resource_definition).pattern": "projects/{project}/topics/{topic}" }, @@ -561,6 +561,22 @@ } } }, + "GitSource": { + "fields": { + "url": { + "type": "string", + "id": 1 + }, + "dir": { + "type": "string", + "id": 5 + }, + "revision": { + "type": "string", + "id": 6 + } + } + }, "RepoSource": { "oneofs": { "revision": { @@ -629,6 +645,7 @@ "oneof": [ "storageSource", "repoSource", + "gitSource", "storageSourceManifest" ] } @@ -642,6 +659,10 @@ "type": "RepoSource", "id": 3 }, + "gitSource": { + "type": "GitSource", + "id": 5 + }, "storageSourceManifest": { "type": "StorageSourceManifest", "id": 8 @@ -705,6 +726,25 @@ } } }, + "UploadedNpmPackage": { + "fields": { + "uri": { + "type": "string", + "id": 1 + }, + "fileHashes": { + "type": "FileHashes", + "id": 2 + }, + "pushTiming": { + "type": "TimeSpan", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, "BuildStep": { "fields": { "name": { @@ -845,6 +885,11 @@ "rule": "repeated", "type": "UploadedMavenArtifact", "id": 9 + }, + "npmPackages": { + "rule": "repeated", + "type": "UploadedNpmPackage", + "id": 12 } } }, @@ -1043,6 +1088,20 @@ } }, "nested": { + "Status": { + "values": { + "STATUS_UNKNOWN": 0, + "PENDING": 10, + "QUEUED": 1, + "WORKING": 2, + "SUCCESS": 3, + "FAILURE": 4, + "INTERNAL_ERROR": 5, + "TIMEOUT": 6, + "CANCELLED": 7, + "EXPIRED": 9 + } + }, "Warning": { "fields": { "text": { @@ -1089,20 +1148,6 @@ } } } - }, - "Status": { - "values": { - "STATUS_UNKNOWN": 0, - "PENDING": 10, - "QUEUED": 1, - "WORKING": 2, - "SUCCESS": 3, - "FAILURE": 4, - "INTERNAL_ERROR": 5, - "TIMEOUT": 6, - "CANCELLED": 7, - "EXPIRED": 9 - } } } }, @@ -1126,6 +1171,11 @@ "rule": "repeated", "type": "PythonPackage", "id": 5 + }, + "npmPackages": { + "rule": "repeated", + "type": "NpmPackage", + "id": 6 } }, "nested": { @@ -1185,6 +1235,18 @@ "id": 2 } } + }, + "NpmPackage": { + "fields": { + "repository": { + "type": "string", + "id": 1 + }, + "packagePath": { + "type": "string", + "id": 2 + } + } } } }, @@ -1257,7 +1319,8 @@ "values": { "NONE": 0, "SHA256": 1, - "MD5": 2 + "MD5": 2, + "SHA512": 4 } } } @@ -2249,6 +2312,13 @@ "egressOption": { "type": "EgressOption", "id": 2 + }, + "peeredNetworkIpRange": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } } }, "nested": { diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_worker_pool.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_worker_pool.js index 100f6f1077d..6cc8670f518 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_worker_pool.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_worker_pool.js @@ -31,7 +31,7 @@ function main(name) { /** * Required. The name of the `WorkerPool` to delete. * Format: - * `projects/{project}/locations/{workerPool}/workerPools/{workerPool}`. + * `projects/{project}/locations/{location}/workerPools/{workerPool}`. */ // const name = 'abc123' /** diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_builds.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_builds.js index 83bef186577..a19245f4d07 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_builds.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_builds.js @@ -30,7 +30,7 @@ function main(projectId) { */ /** * The parent of the collection of `Builds`. - * Format: `projects/{project}/locations/location` + * Format: `projects/{project}/locations/{location}` */ // const parent = 'abc123' /** diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json b/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json index 23aa433f39e..7d88863714f 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cloudbuild", - "version": "3.5.1", + "version": "3.6.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata.google.devtools.cloudbuild.v2.json b/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata.google.devtools.cloudbuild.v2.json index d55ee2a77a7..e5a9bff4bfe 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata.google.devtools.cloudbuild.v2.json +++ b/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata.google.devtools.cloudbuild.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cloudbuild", - "version": "3.5.1", + "version": "3.6.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index 2a30b34caae..4059b07b9f6 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^3.5.2" + "@google-cloud/cloudbuild": "^3.6.0" }, "devDependencies": { "c8": "^7.0.0", diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index 73ff8b0a868..69483b1b259 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -2097,7 +2097,7 @@ export class CloudBuildClient { * @param {string} request.name * Required. The name of the `WorkerPool` to delete. * Format: - * `projects/{project}/locations/{workerPool}/workerPools/{workerPool}`. + * `projects/{project}/locations/{location}/workerPools/{workerPool}`. * @param {string} request.etag * Optional. If this is provided, it must match the server's etag on the * workerpool for the request to be processed. @@ -2394,7 +2394,7 @@ export class CloudBuildClient { * The request object that will be sent. * @param {string} request.parent * The parent of the collection of `Builds`. - * Format: `projects/{project}/locations/location` + * Format: `projects/{project}/locations/{location}` * @param {string} request.projectId * Required. ID of the project. * @param {number} request.pageSize @@ -2506,7 +2506,7 @@ export class CloudBuildClient { * The request object that will be sent. * @param {string} request.parent * The parent of the collection of `Builds`. - * Format: `projects/{project}/locations/location` + * Format: `projects/{project}/locations/{location}` * @param {string} request.projectId * Required. ID of the project. * @param {number} request.pageSize @@ -2566,7 +2566,7 @@ export class CloudBuildClient { * The request object that will be sent. * @param {string} request.parent * The parent of the collection of `Builds`. - * Format: `projects/{project}/locations/location` + * Format: `projects/{project}/locations/{location}` * @param {string} request.projectId * Required. ID of the project. * @param {number} request.pageSize diff --git a/packages/google-devtools-cloudbuild/webpack.config.js b/packages/google-devtools-cloudbuild/webpack.config.js index 0d92eb1bd90..2760608e03d 100644 --- a/packages/google-devtools-cloudbuild/webpack.config.js +++ b/packages/google-devtools-cloudbuild/webpack.config.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2021 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-devtools-containeranalysis/CHANGELOG.md b/packages/google-devtools-containeranalysis/CHANGELOG.md index e799c4a12bb..54389f33784 100644 --- a/packages/google-devtools-containeranalysis/CHANGELOG.md +++ b/packages/google-devtools-containeranalysis/CHANGELOG.md @@ -4,6 +4,18 @@ [1]: https://www.npmjs.com/package/@google-cloud/containeranalysis?activeTab=versions +## [4.7.0](https://github.com/googleapis/google-cloud-node/compare/containeranalysis-v4.6.1...containeranalysis-v4.7.0) (2023-04-24) + + +### Features + +* [containeranalysis] add enum for grafeas v1 cvss to support both cvss v2 and v3 ([#4163](https://github.com/googleapis/google-cloud-node/issues/4163)) ([0904936](https://github.com/googleapis/google-cloud-node/commit/090493643ae86992c44e31963e1ba774d97b79d4)) + + +### Bug Fixes + +* [containeranalysis] scope GeneratePackagesSummary method to v1beta1 http path ([#4196](https://github.com/googleapis/google-cloud-node/issues/4196)) ([e1841e7](https://github.com/googleapis/google-cloud-node/commit/e1841e71f1be28ec607fa6f00c6f624909bd7981)) + ## [4.6.1](https://github.com/googleapis/google-cloud-node/compare/containeranalysis-v4.6.0...containeranalysis-v4.6.1) (2023-04-13) diff --git a/packages/google-devtools-containeranalysis/README.md b/packages/google-devtools-containeranalysis/README.md index 151f409b634..11787a12c3a 100644 --- a/packages/google-devtools-containeranalysis/README.md +++ b/packages/google-devtools-containeranalysis/README.md @@ -80,6 +80,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Grafeas.list_occurrences | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.list_occurrences.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.list_occurrences.js,samples/README.md) | | Grafeas.update_note | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.update_note.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.update_note.js,samples/README.md) | | Grafeas.update_occurrence | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.update_occurrence.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.update_occurrence.js,samples/README.md) | +| Container_analysis_v1_beta1.generate_packages_summary | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.generate_packages_summary.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.generate_packages_summary.js,samples/README.md) | | Container_analysis_v1_beta1.get_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.get_iam_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.get_iam_policy.js,samples/README.md) | | Container_analysis_v1_beta1.get_scan_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.get_scan_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.get_scan_config.js,samples/README.md) | | Container_analysis_v1_beta1.list_scan_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.list_scan_configs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.list_scan_configs.js,samples/README.md) | diff --git a/packages/google-devtools-containeranalysis/package.json b/packages/google-devtools-containeranalysis/package.json index 5a86b04bc19..b173f998c55 100644 --- a/packages/google-devtools-containeranalysis/package.json +++ b/packages/google-devtools-containeranalysis/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/containeranalysis", - "version": "4.6.1", + "version": "4.7.0", "description": "Containeranalysis client for Node.js", "repository": "googleapis/nodejs-containeranalysis", "license": "Apache-2.0", @@ -27,17 +27,18 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", "docs-test": "linkinator docs", "fix": "gts fix", "lint": "gts check", - "prelint": "cd samples; npm link ../; npm i", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", "test": "c8 mocha build/test" }, "dependencies": { @@ -54,6 +55,7 @@ "jsdoc-fresh": "^2.0.1", "jsdoc-region-tag": "^2.0.1", "linkinator": "^4.1.2", + "long": "^5.2.3", "mocha": "^10.2.0", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -66,5 +68,4 @@ "engines": { "node": ">=v12" } -} - +} \ No newline at end of file diff --git a/packages/google-devtools-containeranalysis/protos/google/devtools/containeranalysis/v1beta1/containeranalysis.proto b/packages/google-devtools-containeranalysis/protos/google/devtools/containeranalysis/v1beta1/containeranalysis.proto index 4bf83a81249..b8eacc87543 100644 --- a/packages/google-devtools-containeranalysis/protos/google/devtools/containeranalysis/v1beta1/containeranalysis.proto +++ b/packages/google-devtools-containeranalysis/protos/google/devtools/containeranalysis/v1beta1/containeranalysis.proto @@ -106,4 +106,43 @@ service ContainerAnalysisV1Beta1 { }; option (google.api.method_signature) = "resource,permissions"; } + + // Gets a summary of the packages within a given resource. + rpc GeneratePackagesSummary(GeneratePackagesSummaryRequest) + returns (PackagesSummaryResponse) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/resources/**}:generatePackagesSummary" + body: "*" + }; + } +} + +// GeneratePackagesSummaryRequest is the request body for the +// GeneratePackagesSummary API method. It just takes a single name argument, +// referring to the resource. +message GeneratePackagesSummaryRequest { + // Required. The name of the resource to get a packages summary for in the + // form of `projects/[PROJECT_ID]/resources/[RESOURCE_URL]`. + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// A summary of the packages found within the given resource. +message PackagesSummaryResponse { + // Per license count + message LicensesSummary { + // The license of the package. Note that the format of this value is not + // guaranteed. It may be nil, an empty string, a boolean value (A | B), a + // differently formed boolean value (A OR B), etc... + string license = 1; + + // The number of fixable vulnerabilities associated with this resource. + int64 count = 2; + } + + // The unique URL of the image or the container for which this summary + // applies. + string resource_url = 1; + + // A listing by license name of each of the licenses and their counts. + repeated LicensesSummary licenses_summary = 2; } diff --git a/packages/google-devtools-containeranalysis/protos/grafeas/v1/cvss.proto b/packages/google-devtools-containeranalysis/protos/grafeas/v1/cvss.proto index 181ec052fe4..a9d018eee6d 100644 --- a/packages/google-devtools-containeranalysis/protos/grafeas/v1/cvss.proto +++ b/packages/google-devtools-containeranalysis/protos/grafeas/v1/cvss.proto @@ -122,6 +122,7 @@ message CVSS { ATTACK_COMPLEXITY_UNSPECIFIED = 0; ATTACK_COMPLEXITY_LOW = 1; ATTACK_COMPLEXITY_HIGH = 2; + ATTACK_COMPLEXITY_MEDIUM = 3; } enum Authentication { @@ -155,6 +156,8 @@ message CVSS { IMPACT_HIGH = 1; IMPACT_LOW = 2; IMPACT_NONE = 3; + IMPACT_PARTIAL = 4; + IMPACT_COMPLETE = 5; } } diff --git a/packages/google-devtools-containeranalysis/protos/protos.d.ts b/packages/google-devtools-containeranalysis/protos/protos.d.ts index 201d6b21d38..089946eb1b4 100644 --- a/packages/google-devtools-containeranalysis/protos/protos.d.ts +++ b/packages/google-devtools-containeranalysis/protos/protos.d.ts @@ -6066,7 +6066,8 @@ export namespace grafeas { enum AttackComplexity { ATTACK_COMPLEXITY_UNSPECIFIED = 0, ATTACK_COMPLEXITY_LOW = 1, - ATTACK_COMPLEXITY_HIGH = 2 + ATTACK_COMPLEXITY_HIGH = 2, + ATTACK_COMPLEXITY_MEDIUM = 3 } /** Authentication enum. */ @@ -6104,7 +6105,9 @@ export namespace grafeas { IMPACT_UNSPECIFIED = 0, IMPACT_HIGH = 1, IMPACT_LOW = 2, - IMPACT_NONE = 3 + IMPACT_NONE = 3, + IMPACT_PARTIAL = 4, + IMPACT_COMPLETE = 5 } } @@ -22549,6 +22552,20 @@ export namespace google { * @returns Promise */ public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; + + /** + * Calls GeneratePackagesSummary. + * @param request GeneratePackagesSummaryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PackagesSummaryResponse + */ + public generatePackagesSummary(request: google.devtools.containeranalysis.v1beta1.IGeneratePackagesSummaryRequest, callback: google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1.GeneratePackagesSummaryCallback): void; + + /** + * Calls GeneratePackagesSummary. + * @param request GeneratePackagesSummaryRequest message or plain object + * @returns Promise + */ + public generatePackagesSummary(request: google.devtools.containeranalysis.v1beta1.IGeneratePackagesSummaryRequest): Promise; } namespace ContainerAnalysisV1Beta1 { @@ -22573,6 +22590,319 @@ export namespace google { * @param [response] TestIamPermissionsResponse */ type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; + + /** + * Callback as used by {@link google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1|generatePackagesSummary}. + * @param error Error, if any + * @param [response] PackagesSummaryResponse + */ + type GeneratePackagesSummaryCallback = (error: (Error|null), response?: google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse) => void; + } + + /** Properties of a GeneratePackagesSummaryRequest. */ + interface IGeneratePackagesSummaryRequest { + + /** GeneratePackagesSummaryRequest name */ + name?: (string|null); + } + + /** Represents a GeneratePackagesSummaryRequest. */ + class GeneratePackagesSummaryRequest implements IGeneratePackagesSummaryRequest { + + /** + * Constructs a new GeneratePackagesSummaryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.containeranalysis.v1beta1.IGeneratePackagesSummaryRequest); + + /** GeneratePackagesSummaryRequest name. */ + public name: string; + + /** + * Creates a new GeneratePackagesSummaryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratePackagesSummaryRequest instance + */ + public static create(properties?: google.devtools.containeranalysis.v1beta1.IGeneratePackagesSummaryRequest): google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest; + + /** + * Encodes the specified GeneratePackagesSummaryRequest message. Does not implicitly {@link google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest.verify|verify} messages. + * @param message GeneratePackagesSummaryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.containeranalysis.v1beta1.IGeneratePackagesSummaryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratePackagesSummaryRequest message, length delimited. Does not implicitly {@link google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest.verify|verify} messages. + * @param message GeneratePackagesSummaryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.containeranalysis.v1beta1.IGeneratePackagesSummaryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratePackagesSummaryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratePackagesSummaryRequest + * @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.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest; + + /** + * Decodes a GeneratePackagesSummaryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratePackagesSummaryRequest + * @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.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest; + + /** + * Verifies a GeneratePackagesSummaryRequest 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 GeneratePackagesSummaryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratePackagesSummaryRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest; + + /** + * Creates a plain object from a GeneratePackagesSummaryRequest message. Also converts values to other types if specified. + * @param message GeneratePackagesSummaryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratePackagesSummaryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratePackagesSummaryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PackagesSummaryResponse. */ + interface IPackagesSummaryResponse { + + /** PackagesSummaryResponse resourceUrl */ + resourceUrl?: (string|null); + + /** PackagesSummaryResponse licensesSummary */ + licensesSummary?: (google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.ILicensesSummary[]|null); + } + + /** Represents a PackagesSummaryResponse. */ + class PackagesSummaryResponse implements IPackagesSummaryResponse { + + /** + * Constructs a new PackagesSummaryResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.containeranalysis.v1beta1.IPackagesSummaryResponse); + + /** PackagesSummaryResponse resourceUrl. */ + public resourceUrl: string; + + /** PackagesSummaryResponse licensesSummary. */ + public licensesSummary: google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.ILicensesSummary[]; + + /** + * Creates a new PackagesSummaryResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns PackagesSummaryResponse instance + */ + public static create(properties?: google.devtools.containeranalysis.v1beta1.IPackagesSummaryResponse): google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse; + + /** + * Encodes the specified PackagesSummaryResponse message. Does not implicitly {@link google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.verify|verify} messages. + * @param message PackagesSummaryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.containeranalysis.v1beta1.IPackagesSummaryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PackagesSummaryResponse message, length delimited. Does not implicitly {@link google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.verify|verify} messages. + * @param message PackagesSummaryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.containeranalysis.v1beta1.IPackagesSummaryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PackagesSummaryResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PackagesSummaryResponse + * @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.devtools.containeranalysis.v1beta1.PackagesSummaryResponse; + + /** + * Decodes a PackagesSummaryResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PackagesSummaryResponse + * @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.devtools.containeranalysis.v1beta1.PackagesSummaryResponse; + + /** + * Verifies a PackagesSummaryResponse 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 PackagesSummaryResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PackagesSummaryResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse; + + /** + * Creates a plain object from a PackagesSummaryResponse message. Also converts values to other types if specified. + * @param message PackagesSummaryResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PackagesSummaryResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PackagesSummaryResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PackagesSummaryResponse { + + /** Properties of a LicensesSummary. */ + interface ILicensesSummary { + + /** LicensesSummary license */ + license?: (string|null); + + /** LicensesSummary count */ + count?: (number|Long|string|null); + } + + /** Represents a LicensesSummary. */ + class LicensesSummary implements ILicensesSummary { + + /** + * Constructs a new LicensesSummary. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.ILicensesSummary); + + /** LicensesSummary license. */ + public license: string; + + /** LicensesSummary count. */ + public count: (number|Long|string); + + /** + * Creates a new LicensesSummary instance using the specified properties. + * @param [properties] Properties to set + * @returns LicensesSummary instance + */ + public static create(properties?: google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.ILicensesSummary): google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary; + + /** + * Encodes the specified LicensesSummary message. Does not implicitly {@link google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary.verify|verify} messages. + * @param message LicensesSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.ILicensesSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LicensesSummary message, length delimited. Does not implicitly {@link google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary.verify|verify} messages. + * @param message LicensesSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.ILicensesSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LicensesSummary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LicensesSummary + * @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.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary; + + /** + * Decodes a LicensesSummary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LicensesSummary + * @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.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary; + + /** + * Verifies a LicensesSummary 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 LicensesSummary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LicensesSummary + */ + public static fromObject(object: { [k: string]: any }): google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary; + + /** + * Creates a plain object from a LicensesSummary message. Also converts values to other types if specified. + * @param message LicensesSummary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LicensesSummary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LicensesSummary + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } } } diff --git a/packages/google-devtools-containeranalysis/protos/protos.js b/packages/google-devtools-containeranalysis/protos/protos.js index c5faf92298a..f3feaddf2b6 100644 --- a/packages/google-devtools-containeranalysis/protos/protos.js +++ b/packages/google-devtools-containeranalysis/protos/protos.js @@ -15269,6 +15269,7 @@ case 0: case 1: case 2: + case 3: break; } if (message.authentication != null && message.hasOwnProperty("authentication")) @@ -15317,6 +15318,8 @@ case 1: case 2: case 3: + case 4: + case 5: break; } if (message.integrityImpact != null && message.hasOwnProperty("integrityImpact")) @@ -15327,6 +15330,8 @@ case 1: case 2: case 3: + case 4: + case 5: break; } if (message.availabilityImpact != null && message.hasOwnProperty("availabilityImpact")) @@ -15337,6 +15342,8 @@ case 1: case 2: case 3: + case 4: + case 5: break; } return null; @@ -15407,6 +15414,10 @@ case 2: message.attackComplexity = 2; break; + case "ATTACK_COMPLEXITY_MEDIUM": + case 3: + message.attackComplexity = 3; + break; } switch (object.authentication) { default: @@ -15519,6 +15530,14 @@ case 3: message.confidentialityImpact = 3; break; + case "IMPACT_PARTIAL": + case 4: + message.confidentialityImpact = 4; + break; + case "IMPACT_COMPLETE": + case 5: + message.confidentialityImpact = 5; + break; } switch (object.integrityImpact) { default: @@ -15543,6 +15562,14 @@ case 3: message.integrityImpact = 3; break; + case "IMPACT_PARTIAL": + case 4: + message.integrityImpact = 4; + break; + case "IMPACT_COMPLETE": + case 5: + message.integrityImpact = 5; + break; } switch (object.availabilityImpact) { default: @@ -15567,6 +15594,14 @@ case 3: message.availabilityImpact = 3; break; + case "IMPACT_PARTIAL": + case 4: + message.availabilityImpact = 4; + break; + case "IMPACT_COMPLETE": + case 5: + message.availabilityImpact = 5; + break; } return message; }; @@ -15678,12 +15713,14 @@ * @property {number} ATTACK_COMPLEXITY_UNSPECIFIED=0 ATTACK_COMPLEXITY_UNSPECIFIED value * @property {number} ATTACK_COMPLEXITY_LOW=1 ATTACK_COMPLEXITY_LOW value * @property {number} ATTACK_COMPLEXITY_HIGH=2 ATTACK_COMPLEXITY_HIGH value + * @property {number} ATTACK_COMPLEXITY_MEDIUM=3 ATTACK_COMPLEXITY_MEDIUM value */ CVSS.AttackComplexity = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "ATTACK_COMPLEXITY_UNSPECIFIED"] = 0; values[valuesById[1] = "ATTACK_COMPLEXITY_LOW"] = 1; values[valuesById[2] = "ATTACK_COMPLEXITY_HIGH"] = 2; + values[valuesById[3] = "ATTACK_COMPLEXITY_MEDIUM"] = 3; return values; })(); @@ -15763,6 +15800,8 @@ * @property {number} IMPACT_HIGH=1 IMPACT_HIGH value * @property {number} IMPACT_LOW=2 IMPACT_LOW value * @property {number} IMPACT_NONE=3 IMPACT_NONE value + * @property {number} IMPACT_PARTIAL=4 IMPACT_PARTIAL value + * @property {number} IMPACT_COMPLETE=5 IMPACT_COMPLETE value */ CVSS.Impact = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -15770,6 +15809,8 @@ values[valuesById[1] = "IMPACT_HIGH"] = 1; values[valuesById[2] = "IMPACT_LOW"] = 2; values[valuesById[3] = "IMPACT_NONE"] = 3; + values[valuesById[4] = "IMPACT_PARTIAL"] = 4; + values[valuesById[5] = "IMPACT_COMPLETE"] = 5; return values; })(); @@ -57995,9 +58036,734 @@ * @variation 2 */ + /** + * Callback as used by {@link google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1|generatePackagesSummary}. + * @memberof google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1 + * @typedef GeneratePackagesSummaryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse} [response] PackagesSummaryResponse + */ + + /** + * Calls GeneratePackagesSummary. + * @function generatePackagesSummary + * @memberof google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1 + * @instance + * @param {google.devtools.containeranalysis.v1beta1.IGeneratePackagesSummaryRequest} request GeneratePackagesSummaryRequest message or plain object + * @param {google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1.GeneratePackagesSummaryCallback} callback Node-style callback called with the error, if any, and PackagesSummaryResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContainerAnalysisV1Beta1.prototype.generatePackagesSummary = function generatePackagesSummary(request, callback) { + return this.rpcCall(generatePackagesSummary, $root.google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest, $root.google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse, request, callback); + }, "name", { value: "GeneratePackagesSummary" }); + + /** + * Calls GeneratePackagesSummary. + * @function generatePackagesSummary + * @memberof google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1 + * @instance + * @param {google.devtools.containeranalysis.v1beta1.IGeneratePackagesSummaryRequest} request GeneratePackagesSummaryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return ContainerAnalysisV1Beta1; })(); + v1beta1.GeneratePackagesSummaryRequest = (function() { + + /** + * Properties of a GeneratePackagesSummaryRequest. + * @memberof google.devtools.containeranalysis.v1beta1 + * @interface IGeneratePackagesSummaryRequest + * @property {string|null} [name] GeneratePackagesSummaryRequest name + */ + + /** + * Constructs a new GeneratePackagesSummaryRequest. + * @memberof google.devtools.containeranalysis.v1beta1 + * @classdesc Represents a GeneratePackagesSummaryRequest. + * @implements IGeneratePackagesSummaryRequest + * @constructor + * @param {google.devtools.containeranalysis.v1beta1.IGeneratePackagesSummaryRequest=} [properties] Properties to set + */ + function GeneratePackagesSummaryRequest(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]]; + } + + /** + * GeneratePackagesSummaryRequest name. + * @member {string} name + * @memberof google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest + * @instance + */ + GeneratePackagesSummaryRequest.prototype.name = ""; + + /** + * Creates a new GeneratePackagesSummaryRequest instance using the specified properties. + * @function create + * @memberof google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest + * @static + * @param {google.devtools.containeranalysis.v1beta1.IGeneratePackagesSummaryRequest=} [properties] Properties to set + * @returns {google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest} GeneratePackagesSummaryRequest instance + */ + GeneratePackagesSummaryRequest.create = function create(properties) { + return new GeneratePackagesSummaryRequest(properties); + }; + + /** + * Encodes the specified GeneratePackagesSummaryRequest message. Does not implicitly {@link google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest + * @static + * @param {google.devtools.containeranalysis.v1beta1.IGeneratePackagesSummaryRequest} message GeneratePackagesSummaryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratePackagesSummaryRequest.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 GeneratePackagesSummaryRequest message, length delimited. Does not implicitly {@link google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest + * @static + * @param {google.devtools.containeranalysis.v1beta1.IGeneratePackagesSummaryRequest} message GeneratePackagesSummaryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratePackagesSummaryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratePackagesSummaryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest} GeneratePackagesSummaryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratePackagesSummaryRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratePackagesSummaryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest} GeneratePackagesSummaryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratePackagesSummaryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratePackagesSummaryRequest message. + * @function verify + * @memberof google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratePackagesSummaryRequest.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 GeneratePackagesSummaryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest} GeneratePackagesSummaryRequest + */ + GeneratePackagesSummaryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest) + return object; + var message = new $root.google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GeneratePackagesSummaryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest + * @static + * @param {google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest} message GeneratePackagesSummaryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratePackagesSummaryRequest.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 GeneratePackagesSummaryRequest to JSON. + * @function toJSON + * @memberof google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest + * @instance + * @returns {Object.} JSON object + */ + GeneratePackagesSummaryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeneratePackagesSummaryRequest + * @function getTypeUrl + * @memberof google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratePackagesSummaryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest"; + }; + + return GeneratePackagesSummaryRequest; + })(); + + v1beta1.PackagesSummaryResponse = (function() { + + /** + * Properties of a PackagesSummaryResponse. + * @memberof google.devtools.containeranalysis.v1beta1 + * @interface IPackagesSummaryResponse + * @property {string|null} [resourceUrl] PackagesSummaryResponse resourceUrl + * @property {Array.|null} [licensesSummary] PackagesSummaryResponse licensesSummary + */ + + /** + * Constructs a new PackagesSummaryResponse. + * @memberof google.devtools.containeranalysis.v1beta1 + * @classdesc Represents a PackagesSummaryResponse. + * @implements IPackagesSummaryResponse + * @constructor + * @param {google.devtools.containeranalysis.v1beta1.IPackagesSummaryResponse=} [properties] Properties to set + */ + function PackagesSummaryResponse(properties) { + this.licensesSummary = []; + 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]]; + } + + /** + * PackagesSummaryResponse resourceUrl. + * @member {string} resourceUrl + * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse + * @instance + */ + PackagesSummaryResponse.prototype.resourceUrl = ""; + + /** + * PackagesSummaryResponse licensesSummary. + * @member {Array.} licensesSummary + * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse + * @instance + */ + PackagesSummaryResponse.prototype.licensesSummary = $util.emptyArray; + + /** + * Creates a new PackagesSummaryResponse instance using the specified properties. + * @function create + * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse + * @static + * @param {google.devtools.containeranalysis.v1beta1.IPackagesSummaryResponse=} [properties] Properties to set + * @returns {google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse} PackagesSummaryResponse instance + */ + PackagesSummaryResponse.create = function create(properties) { + return new PackagesSummaryResponse(properties); + }; + + /** + * Encodes the specified PackagesSummaryResponse message. Does not implicitly {@link google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse + * @static + * @param {google.devtools.containeranalysis.v1beta1.IPackagesSummaryResponse} message PackagesSummaryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PackagesSummaryResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceUrl != null && Object.hasOwnProperty.call(message, "resourceUrl")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceUrl); + if (message.licensesSummary != null && message.licensesSummary.length) + for (var i = 0; i < message.licensesSummary.length; ++i) + $root.google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary.encode(message.licensesSummary[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PackagesSummaryResponse message, length delimited. Does not implicitly {@link google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse + * @static + * @param {google.devtools.containeranalysis.v1beta1.IPackagesSummaryResponse} message PackagesSummaryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PackagesSummaryResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PackagesSummaryResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse} PackagesSummaryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PackagesSummaryResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resourceUrl = reader.string(); + break; + } + case 2: { + if (!(message.licensesSummary && message.licensesSummary.length)) + message.licensesSummary = []; + message.licensesSummary.push($root.google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PackagesSummaryResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse} PackagesSummaryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PackagesSummaryResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PackagesSummaryResponse message. + * @function verify + * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PackagesSummaryResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceUrl != null && message.hasOwnProperty("resourceUrl")) + if (!$util.isString(message.resourceUrl)) + return "resourceUrl: string expected"; + if (message.licensesSummary != null && message.hasOwnProperty("licensesSummary")) { + if (!Array.isArray(message.licensesSummary)) + return "licensesSummary: array expected"; + for (var i = 0; i < message.licensesSummary.length; ++i) { + var error = $root.google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary.verify(message.licensesSummary[i]); + if (error) + return "licensesSummary." + error; + } + } + return null; + }; + + /** + * Creates a PackagesSummaryResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse} PackagesSummaryResponse + */ + PackagesSummaryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse) + return object; + var message = new $root.google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse(); + if (object.resourceUrl != null) + message.resourceUrl = String(object.resourceUrl); + if (object.licensesSummary) { + if (!Array.isArray(object.licensesSummary)) + throw TypeError(".google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.licensesSummary: array expected"); + message.licensesSummary = []; + for (var i = 0; i < object.licensesSummary.length; ++i) { + if (typeof object.licensesSummary[i] !== "object") + throw TypeError(".google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.licensesSummary: object expected"); + message.licensesSummary[i] = $root.google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary.fromObject(object.licensesSummary[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a PackagesSummaryResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse + * @static + * @param {google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse} message PackagesSummaryResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PackagesSummaryResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.licensesSummary = []; + if (options.defaults) + object.resourceUrl = ""; + if (message.resourceUrl != null && message.hasOwnProperty("resourceUrl")) + object.resourceUrl = message.resourceUrl; + if (message.licensesSummary && message.licensesSummary.length) { + object.licensesSummary = []; + for (var j = 0; j < message.licensesSummary.length; ++j) + object.licensesSummary[j] = $root.google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary.toObject(message.licensesSummary[j], options); + } + return object; + }; + + /** + * Converts this PackagesSummaryResponse to JSON. + * @function toJSON + * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse + * @instance + * @returns {Object.} JSON object + */ + PackagesSummaryResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PackagesSummaryResponse + * @function getTypeUrl + * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PackagesSummaryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse"; + }; + + PackagesSummaryResponse.LicensesSummary = (function() { + + /** + * Properties of a LicensesSummary. + * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse + * @interface ILicensesSummary + * @property {string|null} [license] LicensesSummary license + * @property {number|Long|null} [count] LicensesSummary count + */ + + /** + * Constructs a new LicensesSummary. + * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse + * @classdesc Represents a LicensesSummary. + * @implements ILicensesSummary + * @constructor + * @param {google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.ILicensesSummary=} [properties] Properties to set + */ + function LicensesSummary(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]]; + } + + /** + * LicensesSummary license. + * @member {string} license + * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary + * @instance + */ + LicensesSummary.prototype.license = ""; + + /** + * LicensesSummary count. + * @member {number|Long} count + * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary + * @instance + */ + LicensesSummary.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new LicensesSummary instance using the specified properties. + * @function create + * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary + * @static + * @param {google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.ILicensesSummary=} [properties] Properties to set + * @returns {google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary} LicensesSummary instance + */ + LicensesSummary.create = function create(properties) { + return new LicensesSummary(properties); + }; + + /** + * Encodes the specified LicensesSummary message. Does not implicitly {@link google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary.verify|verify} messages. + * @function encode + * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary + * @static + * @param {google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.ILicensesSummary} message LicensesSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LicensesSummary.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.license != null && Object.hasOwnProperty.call(message, "license")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.license); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.count); + return writer; + }; + + /** + * Encodes the specified LicensesSummary message, length delimited. Does not implicitly {@link google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary + * @static + * @param {google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.ILicensesSummary} message LicensesSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LicensesSummary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LicensesSummary message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary} LicensesSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LicensesSummary.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.license = reader.string(); + break; + } + case 2: { + message.count = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LicensesSummary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary} LicensesSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LicensesSummary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LicensesSummary message. + * @function verify + * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LicensesSummary.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.license != null && message.hasOwnProperty("license")) + if (!$util.isString(message.license)) + return "license: string expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + return null; + }; + + /** + * Creates a LicensesSummary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary} LicensesSummary + */ + LicensesSummary.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary) + return object; + var message = new $root.google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary(); + if (object.license != null) + message.license = String(object.license); + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = false; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a LicensesSummary message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary + * @static + * @param {google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary} message LicensesSummary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LicensesSummary.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.license = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.count = options.longs === String ? "0" : 0; + } + if (message.license != null && message.hasOwnProperty("license")) + object.license = message.license; + if (message.count != null && message.hasOwnProperty("count")) + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; + return object; + }; + + /** + * Converts this LicensesSummary to JSON. + * @function toJSON + * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary + * @instance + * @returns {Object.} JSON object + */ + LicensesSummary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LicensesSummary + * @function getTypeUrl + * @memberof google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LicensesSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse.LicensesSummary"; + }; + + return LicensesSummary; + })(); + + return PackagesSummaryResponse; + })(); + return v1beta1; })(); diff --git a/packages/google-devtools-containeranalysis/protos/protos.json b/packages/google-devtools-containeranalysis/protos/protos.json index c759a4e8469..1447e570056 100644 --- a/packages/google-devtools-containeranalysis/protos/protos.json +++ b/packages/google-devtools-containeranalysis/protos/protos.json @@ -1136,7 +1136,8 @@ "values": { "ATTACK_COMPLEXITY_UNSPECIFIED": 0, "ATTACK_COMPLEXITY_LOW": 1, - "ATTACK_COMPLEXITY_HIGH": 2 + "ATTACK_COMPLEXITY_HIGH": 2, + "ATTACK_COMPLEXITY_MEDIUM": 3 } }, "Authentication": { @@ -1174,7 +1175,9 @@ "IMPACT_UNSPECIFIED": 0, "IMPACT_HIGH": 1, "IMPACT_LOW": 2, - "IMPACT_NONE": 3 + "IMPACT_NONE": 3, + "IMPACT_PARTIAL": 4, + "IMPACT_COMPLETE": 5 } } } @@ -5140,6 +5143,60 @@ "(google.api.method_signature)": "resource,permissions" } ] + }, + "GeneratePackagesSummary": { + "requestType": "GeneratePackagesSummaryRequest", + "responseType": "PackagesSummaryResponse", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/resources/**}:generatePackagesSummary", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/resources/**}:generatePackagesSummary", + "body": "*" + } + } + ] + } + } + }, + "GeneratePackagesSummaryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "PackagesSummaryResponse": { + "fields": { + "resourceUrl": { + "type": "string", + "id": 1 + }, + "licensesSummary": { + "rule": "repeated", + "type": "LicensesSummary", + "id": 2 + } + }, + "nested": { + "LicensesSummary": { + "fields": { + "license": { + "type": "string", + "id": 1 + }, + "count": { + "type": "int64", + "id": 2 + } + } } } } diff --git a/packages/google-devtools-containeranalysis/samples/README.md b/packages/google-devtools-containeranalysis/samples/README.md index 62653873e74..ab42522b1a9 100644 --- a/packages/google-devtools-containeranalysis/samples/README.md +++ b/packages/google-devtools-containeranalysis/samples/README.md @@ -30,6 +30,7 @@ * [Grafeas.list_occurrences](#grafeas.list_occurrences) * [Grafeas.update_note](#grafeas.update_note) * [Grafeas.update_occurrence](#grafeas.update_occurrence) + * [Container_analysis_v1_beta1.generate_packages_summary](#container_analysis_v1_beta1.generate_packages_summary) * [Container_analysis_v1_beta1.get_iam_policy](#container_analysis_v1_beta1.get_iam_policy) * [Container_analysis_v1_beta1.get_scan_config](#container_analysis_v1_beta1.get_scan_config) * [Container_analysis_v1_beta1.list_scan_configs](#container_analysis_v1_beta1.list_scan_configs) @@ -375,6 +376,23 @@ __Usage:__ +### Container_analysis_v1_beta1.generate_packages_summary + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.generate_packages_summary.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.generate_packages_summary.js,samples/README.md) + +__Usage:__ + + +`node packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.generate_packages_summary.js` + + +----- + + + + ### Container_analysis_v1_beta1.get_iam_policy View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.get_iam_policy.js). diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/snippet_metadata.google.devtools.containeranalysis.v1.json b/packages/google-devtools-containeranalysis/samples/generated/v1/snippet_metadata.google.devtools.containeranalysis.v1.json index 1d6b8d43d75..415d3eb5f5b 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/snippet_metadata.google.devtools.containeranalysis.v1.json +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/snippet_metadata.google.devtools.containeranalysis.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-containeranalysis", - "version": "4.6.0", + "version": "4.7.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.generate_packages_summary.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.generate_packages_summary.js new file mode 100644 index 00000000000..33b45f71689 --- /dev/null +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.generate_packages_summary.js @@ -0,0 +1,62 @@ +// Copyright 2023 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 containeranalysis_v1beta1_generated_ContainerAnalysisV1Beta1_GeneratePackagesSummary_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 resource to get a packages summary for in the + * form of `projects/[PROJECT_ID]/resources/[RESOURCE_URL]`. + */ + // const name = 'abc123' + + // Imports the Containeranalysis library + const {ContainerAnalysisV1Beta1Client} = require('@google-cloud/containeranalysis').v1beta1; + + // Instantiates a client + const containeranalysisClient = new ContainerAnalysisV1Beta1Client(); + + async function callGeneratePackagesSummary() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await containeranalysisClient.generatePackagesSummary(request); + console.log(response); + } + + callGeneratePackagesSummary(); + // [END containeranalysis_v1beta1_generated_ContainerAnalysisV1Beta1_GeneratePackagesSummary_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/snippet_metadata.google.devtools.containeranalysis.v1beta1.json b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/snippet_metadata.google.devtools.containeranalysis.v1beta1.json index 481e978308f..7ee0e853c38 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/snippet_metadata.google.devtools.containeranalysis.v1beta1.json +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/snippet_metadata.google.devtools.containeranalysis.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-containeranalysis", - "version": "4.6.0", + "version": "4.7.0", "language": "TYPESCRIPT", "apis": [ { @@ -147,6 +147,46 @@ } } }, + { + "regionTag": "containeranalysis_v1beta1_generated_ContainerAnalysisV1Beta1_GeneratePackagesSummary_async", + "title": "containeranalysis generatePackagesSummary Sample", + "origin": "API_DEFINITION", + "description": " Gets a summary of the packages within a given resource.", + "canonical": true, + "file": "container_analysis_v1_beta1.generate_packages_summary.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GeneratePackagesSummary", + "fullName": "google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1.GeneratePackagesSummary", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse", + "client": { + "shortName": "ContainerAnalysisV1Beta1Client", + "fullName": "google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1Client" + }, + "method": { + "shortName": "GeneratePackagesSummary", + "fullName": "google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1.GeneratePackagesSummary", + "service": { + "shortName": "ContainerAnalysisV1Beta1", + "fullName": "google.devtools.containeranalysis.v1beta1.ContainerAnalysisV1Beta1" + } + } + } + }, { "regionTag": "containeranalysis_v1beta1_generated_GrafeasV1Beta1_GetOccurrence_async", "title": "containeranalysis getOccurrence Sample", diff --git a/packages/google-devtools-containeranalysis/samples/package.json b/packages/google-devtools-containeranalysis/samples/package.json index 750ede4e019..71728e770cc 100644 --- a/packages/google-devtools-containeranalysis/samples/package.json +++ b/packages/google-devtools-containeranalysis/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 100000 test/**.test.js" }, "dependencies": { - "@google-cloud/containeranalysis": "^4.6.1" + "@google-cloud/containeranalysis": "^4.7.0" }, "devDependencies": { "chai": "^4.2.0", diff --git a/packages/google-devtools-containeranalysis/src/v1beta1/container_analysis_v1_beta1_client.ts b/packages/google-devtools-containeranalysis/src/v1beta1/container_analysis_v1_beta1_client.ts index f382e196c70..725819c2ae4 100644 --- a/packages/google-devtools-containeranalysis/src/v1beta1/container_analysis_v1_beta1_client.ts +++ b/packages/google-devtools-containeranalysis/src/v1beta1/container_analysis_v1_beta1_client.ts @@ -238,6 +238,7 @@ export class ContainerAnalysisV1Beta1Client { 'setIamPolicy', 'getIamPolicy', 'testIamPermissions', + 'generatePackagesSummary', ]; for (const methodName of containerAnalysisV1Beta1StubMethods) { const callPromise = this.containerAnalysisV1Beta1Stub.then( @@ -612,6 +613,108 @@ export class ContainerAnalysisV1Beta1Client { this.initialize(); return this.innerApiCalls.testIamPermissions(request, options, callback); } + /** + * Gets a summary of the packages within a given resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the resource to get a packages summary for in the + * form of `projects/[PROJECT_ID]/resources/[RESOURCE_URL]`. + * @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 google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse | PackagesSummaryResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/container_analysis_v1_beta1.generate_packages_summary.js + * region_tag:containeranalysis_v1beta1_generated_ContainerAnalysisV1Beta1_GeneratePackagesSummary_async + */ + generatePackagesSummary( + request?: protos.google.devtools.containeranalysis.v1beta1.IGeneratePackagesSummaryRequest, + options?: CallOptions + ): Promise< + [ + protos.google.devtools.containeranalysis.v1beta1.IPackagesSummaryResponse, + ( + | protos.google.devtools.containeranalysis.v1beta1.IGeneratePackagesSummaryRequest + | undefined + ), + {} | undefined + ] + >; + generatePackagesSummary( + request: protos.google.devtools.containeranalysis.v1beta1.IGeneratePackagesSummaryRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.containeranalysis.v1beta1.IPackagesSummaryResponse, + | protos.google.devtools.containeranalysis.v1beta1.IGeneratePackagesSummaryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + generatePackagesSummary( + request: protos.google.devtools.containeranalysis.v1beta1.IGeneratePackagesSummaryRequest, + callback: Callback< + protos.google.devtools.containeranalysis.v1beta1.IPackagesSummaryResponse, + | protos.google.devtools.containeranalysis.v1beta1.IGeneratePackagesSummaryRequest + | null + | undefined, + {} | null | undefined + > + ): void; + generatePackagesSummary( + request?: protos.google.devtools.containeranalysis.v1beta1.IGeneratePackagesSummaryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.devtools.containeranalysis.v1beta1.IPackagesSummaryResponse, + | protos.google.devtools.containeranalysis.v1beta1.IGeneratePackagesSummaryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.devtools.containeranalysis.v1beta1.IPackagesSummaryResponse, + | protos.google.devtools.containeranalysis.v1beta1.IGeneratePackagesSummaryRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.devtools.containeranalysis.v1beta1.IPackagesSummaryResponse, + ( + | protos.google.devtools.containeranalysis.v1beta1.IGeneratePackagesSummaryRequest + | 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(); + return this.innerApiCalls.generatePackagesSummary( + request, + options, + callback + ); + } /** * Terminate the gRPC channel and close the client. diff --git a/packages/google-devtools-containeranalysis/src/v1beta1/container_analysis_v1_beta1_client_config.json b/packages/google-devtools-containeranalysis/src/v1beta1/container_analysis_v1_beta1_client_config.json index c55b5a6a33f..cda6d95cb3a 100644 --- a/packages/google-devtools-containeranalysis/src/v1beta1/container_analysis_v1_beta1_client_config.json +++ b/packages/google-devtools-containeranalysis/src/v1beta1/container_analysis_v1_beta1_client_config.json @@ -31,6 +31,10 @@ "TestIamPermissions": { "retry_codes_name": "non_idempotent", "retry_params_name": "default" + }, + "GeneratePackagesSummary": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" } } } diff --git a/packages/google-devtools-containeranalysis/src/v1beta1/gapic_metadata.json b/packages/google-devtools-containeranalysis/src/v1beta1/gapic_metadata.json index 14b0ff2d3b4..7d486f3ad4d 100644 --- a/packages/google-devtools-containeranalysis/src/v1beta1/gapic_metadata.json +++ b/packages/google-devtools-containeranalysis/src/v1beta1/gapic_metadata.json @@ -24,6 +24,11 @@ "methods": [ "testIamPermissions" ] + }, + "GeneratePackagesSummary": { + "methods": [ + "generatePackagesSummary" + ] } } }, @@ -44,6 +49,11 @@ "methods": [ "testIamPermissions" ] + }, + "GeneratePackagesSummary": { + "methods": [ + "generatePackagesSummary" + ] } } } diff --git a/packages/google-devtools-containeranalysis/test/gapic_container_analysis_v1_beta1_v1beta1.ts b/packages/google-devtools-containeranalysis/test/gapic_container_analysis_v1_beta1_v1beta1.ts index 5c70103ccd1..6c9a5a41cbf 100644 --- a/packages/google-devtools-containeranalysis/test/gapic_container_analysis_v1_beta1_v1beta1.ts +++ b/packages/google-devtools-containeranalysis/test/gapic_container_analysis_v1_beta1_v1beta1.ts @@ -613,4 +613,153 @@ describe('v1beta1.ContainerAnalysisV1Beta1Client', () => { await assert.rejects(client.testIamPermissions(request), expectedError); }); }); + + describe('generatePackagesSummary', () => { + it('invokes generatePackagesSummary without error', async () => { + const client = + new containeranalysisv1beta1Module.v1beta1.ContainerAnalysisV1Beta1Client( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse() + ); + client.innerApiCalls.generatePackagesSummary = + stubSimpleCall(expectedResponse); + const [response] = await client.generatePackagesSummary(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.generatePackagesSummary as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.generatePackagesSummary as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generatePackagesSummary without error using callback', async () => { + const client = + new containeranalysisv1beta1Module.v1beta1.ContainerAnalysisV1Beta1Client( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.containeranalysis.v1beta1.PackagesSummaryResponse() + ); + client.innerApiCalls.generatePackagesSummary = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.generatePackagesSummary( + request, + ( + err?: Error | null, + result?: protos.google.devtools.containeranalysis.v1beta1.IPackagesSummaryResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.generatePackagesSummary as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.generatePackagesSummary as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generatePackagesSummary with error', async () => { + const client = + new containeranalysisv1beta1Module.v1beta1.ContainerAnalysisV1Beta1Client( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.generatePackagesSummary = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.generatePackagesSummary(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.generatePackagesSummary as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.generatePackagesSummary as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes generatePackagesSummary with closed client', async () => { + const client = + new containeranalysisv1beta1Module.v1beta1.ContainerAnalysisV1Beta1Client( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.containeranalysis.v1beta1.GeneratePackagesSummaryRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.generatePackagesSummary(request), + expectedError + ); + }); + }); }); diff --git a/packages/google-devtools-containeranalysis/webpack.config.js b/packages/google-devtools-containeranalysis/webpack.config.js index 1259341ea35..2fde85ada17 100644 --- a/packages/google-devtools-containeranalysis/webpack.config.js +++ b/packages/google-devtools-containeranalysis/webpack.config.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2021 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-iam-credentials/package.json b/packages/google-iam-credentials/package.json index ecf197a9b9f..e17c1c54f63 100644 --- a/packages/google-iam-credentials/package.json +++ b/packages/google-iam-credentials/package.json @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-iam-credentials" -} - +} \ No newline at end of file diff --git a/packages/google-iam-credentials/samples/quickstart.js b/packages/google-iam-credentials/samples/quickstart.js index d1cf4263a9b..bd0707d5767 100644 --- a/packages/google-iam-credentials/samples/quickstart.js +++ b/packages/google-iam-credentials/samples/quickstart.js @@ -1,15 +1,16 @@ +// Copyright 2023 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 +// 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. -// 'use strict'; diff --git a/packages/google-iam-credentials/samples/test/quickstart.js b/packages/google-iam-credentials/samples/test/quickstart.js index 72562885958..7b9c83c8d34 100644 --- a/packages/google-iam-credentials/samples/test/quickstart.js +++ b/packages/google-iam-credentials/samples/test/quickstart.js @@ -1,9 +1,10 @@ +// Copyright 2023 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 +// 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, @@ -11,26 +12,20 @@ // 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'; -const path = require('path'); const cp = require('child_process'); const {describe, it} = require('mocha'); const {assert} = require('chai'); const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); -const cwd = path.join(__dirname, '..'); - describe('Quickstart', () => { it('should run quickstart', async () => { const output = execSync( 'node ./quickstart.js kokoro-system-test@long-door-651.iam.gserviceaccount.com https://www.googleapis.com/auth/iam' ); - assert(output != null); + assert(output !== null); }); }); diff --git a/packages/google-iam/package.json b/packages/google-iam/package.json index 4b8f7665dad..fa47d14ff94 100644 --- a/packages/google-iam/package.json +++ b/packages/google-iam/package.json @@ -31,7 +31,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -39,10 +39,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.2" @@ -57,6 +58,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-identity-accesscontextmanager/package.json b/packages/google-identity-accesscontextmanager/package.json index 18b9a6475f9..be81d6435f8 100644 --- a/packages/google-identity-accesscontextmanager/package.json +++ b/packages/google-identity-accesscontextmanager/package.json @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-identity-accesscontextmanager" -} - +} \ No newline at end of file diff --git a/packages/google-maps-addressvalidation/package.json b/packages/google-maps-addressvalidation/package.json index 6dcd91449a1..5918d6b1b13 100644 --- a/packages/google-maps-addressvalidation/package.json +++ b/packages/google-maps-addressvalidation/package.json @@ -31,7 +31,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -39,10 +39,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.0.1" @@ -57,6 +58,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/address.proto b/packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/address.proto index 9e7e192b99c..c24a3bf9618 100644 --- a/packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/address.proto +++ b/packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/address.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -29,22 +29,25 @@ option objc_class_prefix = "GMPAVV1"; option php_namespace = "Google\\Maps\\AddressValidation\\V1"; option ruby_package = "Google::Maps::AddressValidation::V1"; -// Details of the address parsed from the input. +// Details of the post-processed address. Post-processing includes +// correcting misspelled parts of the address, replacing incorrect parts, and +// inferring missing parts. message Address { - // The corrected address, formatted as a single-line address following the - // address formatting rules of the region where the address is located. + // The post-processed address, formatted as a single-line address following + // the address formatting rules of the region where the address is located. string formatted_address = 2; - // The validated address represented as a postal address. + // The post-processed address represented as a postal address. google.type.PostalAddress postal_address = 3; - // Unordered list. The individual address components of the formatted and corrected address, - // along with validation information. This provides information on the - // validation status of the individual components. + // Unordered list. The individual address components of the formatted and + // corrected address, along with validation information. This provides + // information on the validation status of the individual components. // // Address components are not ordered in a particular way. Do not make any // assumptions on the ordering of the address components in the list. - repeated AddressComponent address_components = 4 [(google.api.field_behavior) = UNORDERED_LIST]; + repeated AddressComponent address_components = 4 + [(google.api.field_behavior) = UNORDERED_LIST]; // The types of components that were expected to be present in a correctly // formatted mailing address but were not found in the input AND could diff --git a/packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/address_validation_service.proto b/packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/address_validation_service.proto index 95c8c760f2c..ff19440eede 100644 --- a/packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/address_validation_service.proto +++ b/packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/address_validation_service.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -175,7 +175,8 @@ message ValidationResult { // Information about the location and place that the address geocoded to. Geocode geocode = 3; - // Other information relevant to deliverability. + // Other information relevant to deliverability. `metadata` is not guaranteed + // to be fully populated for every address sent to the Address Validation API. AddressMetadata metadata = 4; // Extra deliverability flags provided by USPS. Only provided in region `US` diff --git a/packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/geocode.proto b/packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/geocode.proto index ffb71b8aa6b..2caa88a4cd5 100644 --- a/packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/geocode.proto +++ b/packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/geocode.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 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-maps-addressvalidation/protos/google/maps/addressvalidation/v1/metadata.proto b/packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/metadata.proto index 914f0c34228..b65b4984127 100644 --- a/packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/metadata.proto +++ b/packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/metadata.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -26,7 +26,8 @@ option objc_class_prefix = "GMPAVV1"; option php_namespace = "Google\\Maps\\AddressValidation\\V1"; option ruby_package = "Google::Maps::AddressValidation::V1"; -// The metadata for the address. +// The metadata for the address. `metadata` is not guaranteed to be fully +// populated for every address sent to the Address Validation API. message AddressMetadata { // Indicates that this is the address of a business. // If unset, indicates that the value is unknown. diff --git a/packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/usps_data.proto b/packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/usps_data.proto index 10334d51fcf..c1680a12779 100644 --- a/packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/usps_data.proto +++ b/packages/google-maps-addressvalidation/protos/google/maps/addressvalidation/v1/usps_data.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -56,7 +56,10 @@ message UspsAddress { string zip_code_extension = 9; } -// The USPS data for the address. +// The USPS data for the address. `uspsData` is not guaranteed to be fully +// populated for every US or PR address sent to the Address Validation API. It's +// recommended to integrate the backup address fields in the response if you +// utilize uspsData as the primary part of the response. message UspsData { // USPS standardized address. UspsAddress standardized_address = 1; diff --git a/packages/google-maps-addressvalidation/samples/generated/v1/snippet_metadata.google.maps.addressvalidation.v1.json b/packages/google-maps-addressvalidation/samples/generated/v1/snippet_metadata.google.maps.addressvalidation.v1.json index e632a307e3d..e9697ce4e35 100644 --- a/packages/google-maps-addressvalidation/samples/generated/v1/snippet_metadata.google.maps.addressvalidation.v1.json +++ b/packages/google-maps-addressvalidation/samples/generated/v1/snippet_metadata.google.maps.addressvalidation.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-addressvalidation", - "version": "1.0.1", + "version": "1.0.2", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-addressvalidation/samples/quickstart.js b/packages/google-maps-addressvalidation/samples/quickstart.js index 3a3e2ac93c5..e45add6548b 100644 --- a/packages/google-maps-addressvalidation/samples/quickstart.js +++ b/packages/google-maps-addressvalidation/samples/quickstart.js @@ -69,6 +69,7 @@ function main() { // const enableUspsCass = true // Imports the Addressvalidation library + // eslint-disable-next-line node/no-missing-require const {AddressValidationClient} = require('@googlemaps/addressvalidation').v1; // Instantiates a client diff --git a/packages/google-maps-addressvalidation/webpack.config.js b/packages/google-maps-addressvalidation/webpack.config.js index b1fb80b0e30..7eccfa8e0fd 100644 --- a/packages/google-maps-addressvalidation/webpack.config.js +++ b/packages/google-maps-addressvalidation/webpack.config.js @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2021 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-maps-mapsplatformdatasets/package.json b/packages/google-maps-mapsplatformdatasets/package.json index dcf2ff36e22..0913cebe6a0 100644 --- a/packages/google-maps-mapsplatformdatasets/package.json +++ b/packages/google-maps-mapsplatformdatasets/package.json @@ -31,7 +31,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -39,10 +39,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -57,6 +58,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-maps-places/.OwlBot.yaml b/packages/google-maps-places/.OwlBot.yaml new file mode 100644 index 00000000000..ed181bde2cc --- /dev/null +++ b/packages/google-maps-places/.OwlBot.yaml @@ -0,0 +1,19 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# 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. + +deep-copy-regex: + - source: /google/maps/places/(.*)/.*-nodejs + dest: /owl-bot-staging/google-maps-places/$1 + +api-name: places \ No newline at end of file diff --git a/packages/google-maps-places/.eslintignore b/packages/google-maps-places/.eslintignore new file mode 100644 index 00000000000..ea5b04aebe6 --- /dev/null +++ b/packages/google-maps-places/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ +samples/generated/ diff --git a/packages/google-maps-places/.eslintrc.json b/packages/google-maps-places/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/packages/google-maps-places/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-maps-places/.gitattributes b/packages/google-maps-places/.gitattributes new file mode 100644 index 00000000000..33739cb74e4 --- /dev/null +++ b/packages/google-maps-places/.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-maps-places/.gitignore b/packages/google-maps-places/.gitignore new file mode 100644 index 00000000000..d4f03a0df2e --- /dev/null +++ b/packages/google-maps-places/.gitignore @@ -0,0 +1,14 @@ +**/*.log +**/node_modules +/.coverage +/coverage +/.nyc_output +/docs/ +/out/ +/build/ +system-test/secrets.js +system-test/*key.json +*.lock +.DS_Store +package-lock.json +__pycache__ diff --git a/packages/google-maps-places/.jsdoc.js b/packages/google-maps-places/.jsdoc.js new file mode 100644 index 00000000000..ffd96935e51 --- /dev/null +++ b/packages/google-maps-places/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2023 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'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/jsdoc-fresh', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown', + 'jsdoc-region-tag' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'build/src', + 'protos' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2023 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@googlemaps/places', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/google-maps-places/.mocharc.js b/packages/google-maps-places/.mocharc.js new file mode 100644 index 00000000000..49e7e228701 --- /dev/null +++ b/packages/google-maps-places/.mocharc.js @@ -0,0 +1,29 @@ +// Copyright 2023 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. +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000, + "recursive": true +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/packages/google-maps-places/.nycrc b/packages/google-maps-places/.nycrc new file mode 100644 index 00000000000..b18d5472b62 --- /dev/null +++ b/packages/google-maps-places/.nycrc @@ -0,0 +1,24 @@ +{ + "report-dir": "./.coverage", + "reporter": ["text", "lcov"], + "exclude": [ + "**/*-test", + "**/.coverage", + "**/apis", + "**/benchmark", + "**/conformance", + "**/docs", + "**/samples", + "**/scripts", + "**/protos", + "**/test", + "**/*.d.ts", + ".jsdoc.js", + "**/.jsdoc.js", + "karma.conf.js", + "webpack-tests.config.js", + "webpack.config.js" + ], + "exclude-after-remap": false, + "all": true +} diff --git a/packages/google-maps-places/.prettierignore b/packages/google-maps-places/.prettierignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/packages/google-maps-places/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-maps-places/.prettierrc.js b/packages/google-maps-places/.prettierrc.js new file mode 100644 index 00000000000..1e6cec783e4 --- /dev/null +++ b/packages/google-maps-places/.prettierrc.js @@ -0,0 +1,17 @@ +// Copyright 2023 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. + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/packages/google-maps-places/.repo-metadata.json b/packages/google-maps-places/.repo-metadata.json new file mode 100644 index 00000000000..e77fd6ea704 --- /dev/null +++ b/packages/google-maps-places/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "name": "places", + "name_pretty": "Places API (New)", + "product_documentation": "https://developers.google.com/maps/documentation/places/web-service/", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/places/latest", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", + "release_level": "preview", + "language": "nodejs", + "repo": "googleapis/google-cloud-node", + "distribution_name": "@googlemaps/places", + "api_id": "places.googleapis.com", + "default_version": "v1", + "requires_billing": true, + "library_type": "GAPIC_AUTO", + "api_shortname": "places" +} + diff --git a/packages/google-maps-places/CHANGELOG.md b/packages/google-maps-places/CHANGELOG.md new file mode 100644 index 00000000000..c414d1e634d --- /dev/null +++ b/packages/google-maps-places/CHANGELOG.md @@ -0,0 +1,8 @@ +# Changelog + +## 0.1.0 (2023-05-20) + + +### Features + +* Add initial files for google.maps.places.v1 ([#4289](https://github.com/googleapis/google-cloud-node/issues/4289)) ([ac24980](https://github.com/googleapis/google-cloud-node/commit/ac249801878b0c7271722c0bf128eb2c0437bf44)) diff --git a/packages/google-maps-places/CODE_OF_CONDUCT.md b/packages/google-maps-places/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..2add2547a81 --- /dev/null +++ b/packages/google-maps-places/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-maps-places/CONTRIBUTING.md b/packages/google-maps-places/CONTRIBUTING.md new file mode 100644 index 00000000000..040c9292910 --- /dev/null +++ b/packages/google-maps-places/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 Places API (New) 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=places.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-maps-places/LICENSE b/packages/google-maps-places/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/packages/google-maps-places/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-maps-places/README.md b/packages/google-maps-places/README.md new file mode 100644 index 00000000000..884cd3a1819 --- /dev/null +++ b/packages/google-maps-places/README.md @@ -0,0 +1,166 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [Places API (New): Node.js Client](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-maps-places) + +[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![npm version](https://img.shields.io/npm/v/@googlemaps/places.svg)](https://www.npmjs.org/package/@googlemaps/places) + + + + +Places API (New) client for Node.js + + +A comprehensive list of changes in each version may be found in +[the CHANGELOG](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-maps-places/CHANGELOG.md). + +* [Places API (New) Node.js Client API Reference][client-docs] +* [Places API (New) Documentation][product-docs] +* [github.com/googleapis/google-cloud-node/packages/google-maps-places](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-maps-places) + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + + +* [Quickstart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + * [Using the client library](#using-the-client-library) +* [Samples](#samples) +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Places API (New) API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + +### Installing the client library + +```bash +npm install @googlemaps/places +``` + + +### Using the client library + +```javascript + +// Imports the Places library +const {PlacesClient} = require('@googlemaps/places').v1; + +// Instantiates a client +const placesClient = new PlacesClient(); + +async function callSearchText() { + // Construct request + const request = { + textQuery, + }; + + // Run request + const response = await placesClient.searchText(request, { + otherArgs: { + headers: { + 'X-Goog-FieldMask': 'places.displayName', + }, + }, + }); + console.log(response); +} + +callSearchText(); + +``` + + + +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-maps-places/samples) directory. Each sample's `README.md` has instructions for running its sample. + +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Places.search_text | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/generated/v1/places.search_text.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-places/samples/generated/v1/places.search_text.js,packages/google-maps-places/samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-places/samples/quickstart.js,packages/google-maps-places/samples/README.md) | + + + +The [Places API (New) Node.js Client API Reference][client-docs] documentation +also contains samples. + +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. +If you are using an end-of-life version of Node.js, we recommend that you update +as soon as possible to an actively supported LTS version. + +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: + +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. + +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. +For example, `npm install @googlemaps/places@legacy-8` installs client libraries +for versions compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + + + + + + + +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. + + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md). + +Please note that this `README.md`, the `samples/README.md`, +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. To edit one of these files, make an edit +to its templates in +[directory](https://github.com/googleapis/synthtool). + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) + +[client-docs]: https://cloud.google.com/nodejs/docs/reference/places/latest +[product-docs]: https://developers.google.com/maps/documentation/places/web-service/ +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[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=places.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started diff --git a/packages/google-maps-places/linkinator.config.json b/packages/google-maps-places/linkinator.config.json new file mode 100644 index 00000000000..befd23c8633 --- /dev/null +++ b/packages/google-maps-places/linkinator.config.json @@ -0,0 +1,16 @@ +{ + "recurse": true, + "skip": [ + "https://codecov.io/gh/googleapis/", + "www.googleapis.com", + "img.shields.io", + "https://console.cloud.google.com/cloudshell", + "https://support.google.com" + ], + "silent": true, + "concurrency": 5, + "retry": true, + "retryErrors": true, + "retryErrorsCount": 5, + "retryErrorsJitter": 3000 +} diff --git a/packages/google-maps-places/package.json b/packages/google-maps-places/package.json new file mode 100644 index 00000000000..b02c4029459 --- /dev/null +++ b/packages/google-maps-places/package.json @@ -0,0 +1,73 @@ +{ + "name": "@googlemaps/places", + "version": "0.1.0", + "description": "Places API (New) client for Node.js", + "repository": { + "type": "git", + "url": "https://github.com/googleapis/google-cloud-node.git", + "directory": "packages/google-maps-places" + }, + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-maps-places", + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google places", + "places", + "Places API (New)" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "postpack": "minifyProtoJson", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "prelint": "cd samples; npm link ../; npm i" + }, + "dependencies": { + "google-gax": "^3.5.8" + }, + "devDependencies": { + "@types/mocha": "^9.0.0", + "@types/node": "^18.0.0", + "@types/sinon": "^10.0.0", + "c8": "^7.3.5", + "gts": "^3.1.0", + "jsdoc": "^4.0.0", + "jsdoc-fresh": "^2.0.0", + "jsdoc-region-tag": "^2.0.0", + "long": "^5.2.3", + "linkinator": "^4.0.0", + "mocha": "^9.2.2", + "null-loader": "^4.0.1", + "pack-n-play": "^1.0.0-2", + "sinon": "^15.0.0", + "ts-loader": "^9.0.0", + "typescript": "^4.6.4", + "webpack": "^5.9.0", + "webpack-cli": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } +} diff --git a/packages/google-maps-places/protos/google/geo/type/viewport.proto b/packages/google-maps-places/protos/google/geo/type/viewport.proto new file mode 100644 index 00000000000..ad5029f8360 --- /dev/null +++ b/packages/google-maps-places/protos/google/geo/type/viewport.proto @@ -0,0 +1,69 @@ +// Copyright 2019 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.geo.type; + +import "google/type/latlng.proto"; + +option go_package = "google.golang.org/genproto/googleapis/geo/type/viewport;viewport"; +option java_multiple_files = true; +option java_outer_classname = "ViewportProto"; +option java_package = "com.google.geo.type"; +option objc_class_prefix = "GGTP"; + +// A latitude-longitude viewport, represented as two diagonally opposite `low` +// and `high` points. A viewport is considered a closed region, i.e. it includes +// its boundary. The latitude bounds must range between -90 to 90 degrees +// inclusive, and the longitude bounds must range between -180 to 180 degrees +// inclusive. Various cases include: +// +// - If `low` = `high`, the viewport consists of that single point. +// +// - If `low.longitude` > `high.longitude`, the longitude range is inverted +// (the viewport crosses the 180 degree longitude line). +// +// - If `low.longitude` = -180 degrees and `high.longitude` = 180 degrees, +// the viewport includes all longitudes. +// +// - If `low.longitude` = 180 degrees and `high.longitude` = -180 degrees, +// the longitude range is empty. +// +// - If `low.latitude` > `high.latitude`, the latitude range is empty. +// +// Both `low` and `high` must be populated, and the represented box cannot be +// empty (as specified by the definitions above). An empty viewport will result +// in an error. +// +// For example, this viewport fully encloses New York City: +// +// { +// "low": { +// "latitude": 40.477398, +// "longitude": -74.259087 +// }, +// "high": { +// "latitude": 40.91618, +// "longitude": -73.70018 +// } +// } +message Viewport { + // Required. The low point of the viewport. + google.type.LatLng low = 1; + + // Required. The high point of the viewport. + google.type.LatLng high = 2; +} diff --git a/packages/google-maps-places/protos/google/maps/places/v1/geometry.proto b/packages/google-maps-places/protos/google/maps/places/v1/geometry.proto new file mode 100644 index 00000000000..62596e7c2be --- /dev/null +++ b/packages/google-maps-places/protos/google/maps/places/v1/geometry.proto @@ -0,0 +1,42 @@ +// Copyright 2023 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.maps.places.v1; + +import "google/api/field_behavior.proto"; +import "google/type/latlng.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Maps.Places.V1"; +option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb"; +option java_multiple_files = true; +option java_outer_classname = "GeometryProto"; +option java_package = "com.google.maps.places.v1"; +option objc_class_prefix = "GMPSV1"; +option php_namespace = "Google\\Maps\\Places\\V1"; + +// Circle with a LatLng as center and radius. +message Circle { + // Required. Center latitude and longitude. + // + // The range of latitude must be within `[-90.0, 90.0]`. The range of the + // longitude must be within `[-180.0, 180.0]`. + google.type.LatLng center = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Radius measured in meters. The radius must be within `[0.0, + // 50000.0]`. + double radius = 2 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/packages/google-maps-places/protos/google/maps/places/v1/place.proto b/packages/google-maps-places/protos/google/maps/places/v1/place.proto new file mode 100644 index 00000000000..2372f3629dc --- /dev/null +++ b/packages/google-maps-places/protos/google/maps/places/v1/place.proto @@ -0,0 +1,424 @@ +// Copyright 2023 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.maps.places.v1; + +import "google/api/field_behavior.proto"; +import "google/geo/type/viewport.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/date.proto"; +import "google/type/latlng.proto"; +import "google/type/localized_text.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Maps.Places.V1"; +option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb"; +option java_multiple_files = true; +option java_outer_classname = "PlaceProto"; +option java_package = "com.google.maps.places.v1"; +option objc_class_prefix = "GMPSV1"; +option php_namespace = "Google\\Maps\\Places\\V1"; + +// All the information representing a Place. +message Place { + // The structured components that form the formatted address, if this + // information is available. + message AddressComponent { + // The full text description or name of the address component. For example, + // an address component for the country Australia may have a long_name of + // "Australia". + string long_text = 1; + + // An abbreviated textual name for the address component, if available. For + // example, an address component for the country of Australia may have a + // short_name of "AU". + string short_text = 2; + + // An array indicating the type(s) of the address component. + repeated string types = 3; + + // The language used to format this components, in CLDR notation. + string language_code = 4; + } + + // Plus code (http://plus.codes) is a location reference with two formats: + // global code defining a 14mx14m (1/8000th of a degree) or smaller rectangle, + // and compound code, replacing the prefix with a reference location. + message PlusCode { + // Place's global (full) code, such as `9FWM33GV+HQ`, representing an + // 1/8000 by 1/8000 degree area (~14 by 14 meters). + string global_code = 1; + + // Place's compound code, such as `33GV+HQ, Ramberg, Norway`, containing + // the suffix of the global code and replacing the prefix with a formatted + // name of a reference entity. + string compound_code = 2; + } + + // Information about a review of the place. + message Review { + // Timestamp for the review, expressed in seconds since epoch. + google.protobuf.Timestamp publish_time = 1; + + // A string of formatted recent time, expressing the review time relative + // to the current time in a form appropriate for the language and country. + string relative_publish_time_description = 2; + + // The localized text of the review. + google.type.LocalizedText text = 9; + + // The name of the review author. + string author = 4; + + // A link to the review author's profile. + string author_uri = 5; + + // The author's profile photo. + string author_photo_uri = 6; + + // A whole number between 1.0 and 5.0, a.k.a. the number of stars. + double rating = 7; + + // A BCP-47 language code indicating the original language of the review. + // If the review has been translated, then original_language != language. + // This field contains the main language tag only, and not the secondary tag + // indicating country or region. For example, all the English reviews are + // tagged as 'en', and not 'en-AU' or 'en-UK' and so on.This field is empty + // if there is only a rating with no review text. + string original_language_code = 10; + + // A boolean value indicating if the review was translated from the original + // language it was written in. If a review has been translated, + // corresponding to a value of true, Google recommends that you indicate + // this to your users. For example, you can add the following string, + // “Translated by Google”, to the review. + bool translated = 11; + } + + // Information about business hour of the place. + message OpeningHours { + // A period the place remains in open_now status. + message OpeningHoursPeriod { + // Status changing points. + message OpeningHoursPoint { + // A day of the week, as an integer in the range 0-6. 0 is Sunday, 1 is + // Monday, etc. + optional int32 day = 1; + + // The hour in 2 digits. Ranges from 00 to 23. + optional int32 hour = 2; + + // The minute in 2 digits. Ranges from 00 to 59. + optional int32 minute = 3; + + // Date of the endpoint expressed in `RFC3339` format in the local + // timezone for the place. For example 2010-12-31. + string date_deprecated = 4 [deprecated = true]; + + // Date in the local timezone for the place. + google.type.Date date = 6; + + // Whether or not this endpoint was truncated. Truncation occurs when + // the real hours are outside the times we are willing to return hours + // between, so we truncate the hours back to these boundaries. This + // ensures that at most `24 * 7` hours from midnight of the day of the + // request are returned. + bool truncated = 5; + } + + // The time that the place starts to be open. + OpeningHoursPoint open = 1; + + // The time that the place starts to be closed. + OpeningHoursPoint close = 2; + } + + // A type used to identify the type of secondary hours. + enum SecondaryHourType { + // Default value when secondary hour type is not specified. + SECONDARY_HOUR_TYPE_UNSPECIFIED = 0; + + // The drive-through hour for banks, restaurants, or pharmacies. + DRIVE_THROUGH = 1; + + // The happy hour. + HAPPY_HOUR = 2; + + // The delivery hour. + DELIVERY = 3; + + // The takeout hour. + TAKEOUT = 4; + + // The kitchen hour. + KITCHEN = 5; + + // The breakfast hour. + BREAKFAST = 6; + + // The lunch hour. + LUNCH = 7; + + // The dinner hour. + DINNER = 8; + + // The brunch hour. + BRUNCH = 9; + + // The pickup hour. + PICKUP = 10; + + // The access hours for storage places. + ACCESS = 11; + + // The special hours for seniors. + SENIOR_HOURS = 12; + + // The online service hours. + ONLINE_SERVICE_HOURS = 13; + } + + // Structured information for special days that fall within the period that + // the returned opening hours cover. Special days are days that could impact + // the business hours of a place, e.g. Christmas day. + message SpecialDay { + // The date of this special day. + google.type.Date date = 1; + } + + // Is this place open right now? Always present unless we lack time-of-day + // or timezone data for these opening hours. + bool open_now = 1; + + // The periods that this place is open during the week. The periods are in + // chronological order, starting with Sunday in the place-local timezone. An + // empty (but not absent) value indicates a place that is never open, e.g. + // because it is closed temporarily for renovations. + repeated OpeningHoursPeriod periods = 2; + + // Localized strings describing the opening hours of this place, one string + // for each day of the week. Will be empty if the hours are unknown or + // could not be converted to localized text. Example: "Sun: 18:00–06:00" + repeated string weekday_descriptions = 3; + + // A type string used to identify the type of secondary hours. + SecondaryHourType secondary_hour_type = 4; + + // Structured information for special days that fall within the period that + // the returned opening hours cover. Special days are days that could impact + // the business hours of a place, e.g. Christmas day. Set for + // current_opening_hours and current_secondary_opening_hours if there are + // exceptional hours. + repeated SpecialDay special_days = 5; + } + + // Business status for the place. + enum BusinessStatus { + // Default value. This value is unused. + BUSINESS_STATUS_UNSPECIFIED = 0; + + // The establishment is operational, not necessarily open now. + OPERATIONAL = 1; + + // The establishment is temporarily closed. + CLOSED_TEMPORARILY = 2; + + // The establishment is permanently closed. + CLOSED_PERMANENTLY = 3; + } + + // Information about data providers of this place. + message Attribution { + // Name of the Place's data provider. + string provider = 1; + + // URI to the Place's data provider. + string provider_uri = 2; + } + + // Contains a summary of the place. + message EditorialSummary { + // A summary is comprised of a textual overview, and also includes the + // language code for these if applicable. Summary text must be presented + // as-is and can not be modified or altered. + google.type.LocalizedText overview = 1; + } + + // Required. The unique identifier of a place. + string id = 2 [(google.api.field_behavior) = REQUIRED]; + + // The localized name of the place, suitable as a short human-readable + // description. For example, "Google Sydney", "Starbucks", "Pyrmont", etc. + google.type.LocalizedText display_name = 31; + + // A set of type tags for this result. For example, "political" and + // "locality". + repeated string types = 5; + + // A human-readable phone number for the place, in national format. + string national_phone_number = 7; + + // A human-readable phone number for the place, in international format. + string international_phone_number = 8; + + // A full, human-readable address for this place. + string formatted_address = 9; + + // Repeated components for each locality level. + repeated AddressComponent address_components = 10; + + // Plus code of the place location lat/long. + PlusCode plus_code = 11; + + // The position of this place. + google.type.LatLng location = 12; + + // A viewport suitable for displaying the place on an average-sized map. + google.geo.type.Viewport viewport = 13; + + // A rating between 1.0 and 5.0, based on user reviews of this place. + double rating = 14; + + // A URL providing more information about this place. + string google_maps_uri = 15; + + // The authoritative website for this place, e.g. a business' homepage. + // Note that for places that are part of a chain (e.g. an IKEA store), this + // will usually be the website for the individual store, not the overall + // chain. + string website_uri = 16; + + // List of reviews about this place. + repeated Review reviews = 20; + + // The regular hours of operation. + OpeningHours opening_hours = 21; + + // Number of minutes this place's timezone is currently offset from UTC. + // This is expressed in minutes to support timezones that are offset by + // fractions of an hour, e.g. X hours and 15 minutes. + int32 utc_offset_minutes = 22; + + // The place's address in adr microformat: http://microformats.org/wiki/adr. + string adr_format_address = 24; + + // The business status for the place. + BusinessStatus business_status = 25; + + // Price level of the place. + PriceLevel price_level = 26; + + // A set of data provider that must be shown with this result. + repeated Attribution attributions = 27; + + // The total number of reviews (with or without text) for this place. + int32 user_rating_count = 28; + + // A truncated URL to an v2 icon mask. User can access different icon type by + // appending type suffix to the end (eg, ".svg" or ".png"). + string icon_mask_base_uri = 29; + + // Background color for icon_mask in hex format, e.g. #909CE1. + string icon_background_color = 30; + + // Specifies if the business supports takeout. + optional bool takeout = 33; + + // Specifies if the business supports delivery. + optional bool delivery = 34; + + // Specifies if the business supports indoor or outdoor seating options. + optional bool dine_in = 35; + + // Specifies if the business supports curbside pickup. + optional bool curbside_pickup = 36; + + // Specifies if the place has an entrance that is wheelchair-accessible. + optional bool wheelchair_accessible_entrance = 37; + + // Specifies if the place supports reservations. + optional bool reservable = 38; + + // Specifies if the place serves breakfast. + optional bool serves_breakfast = 39; + + // Specifies if the place serves lunch. + optional bool serves_lunch = 40; + + // Specifies if the place serves dinner. + optional bool serves_dinner = 41; + + // Specifies if the place serves beer. + optional bool serves_beer = 42; + + // Specifies if the place serves wine. + optional bool serves_wine = 43; + + // Specifies if the place serves brunch. + optional bool serves_brunch = 44; + + // Specifies if the place serves vegetarian food. + optional bool serves_vegetarian_food = 45; + + // The hours of operation for the next seven days (including today). The time + // period starts at midnight on the date of the request and ends at 11:59 pm + // six days later. This field includes the special_days subfield of all hours, + // set for dates that have exceptional hours. + OpeningHours current_opening_hours = 46; + + // Contains an array of entries for the next seven days including information + // about secondary hours of a business. Secondary hours are different from a + // business's main hours. For example, a restaurant can specify drive through + // hours or delivery hours as its secondary hours. This field populates the + // type subfield, which draws from a predefined list of opening hours types + // (such as DRIVE_THROUGH, PICKUP, or TAKEOUT) based on the types of the + // place. This field includes the special_days subfield of all hours, set for + // dates that have exceptional hours. + repeated OpeningHours current_secondary_opening_hours = 47; + + // Contains an array of entries for information about regular secondary hours + // of a business. Secondary hours are different from a business's main hours. + // For example, a restaurant can specify drive through hours or delivery hours + // as its secondary hours. This field populates the type subfield, which draws + // from a predefined list of opening hours types (such as DRIVE_THROUGH, + // PICKUP, or TAKEOUT) based on the types of the place. + repeated OpeningHours secondary_opening_hours = 49; + + // Contains a summary of the place. A summary is comprised of a textual + // overview, and also includes the language code for these if applicable. + // Summary text must be presented as-is and can not be modified or altered. + EditorialSummary editorial_summary = 48; +} + +// Price level of the place. +enum PriceLevel { + // Place price level is unspecified or unknown. + PRICE_LEVEL_UNSPECIFIED = 0; + + FREE = 1; + + // Place provides inexpensive services. + INEXPENSIVE = 2; + + // Place provides moderately priced services. + MODERATE = 3; + + // Place provides expensive services. + EXPENSIVE = 4; + + // Place provides very expensive services. + VERY_EXPENSIVE = 5; +} diff --git a/packages/google-maps-places/protos/google/maps/places/v1/places_service.proto b/packages/google-maps-places/protos/google/maps/places/v1/places_service.proto new file mode 100644 index 00000000000..b8b8ab69d98 --- /dev/null +++ b/packages/google-maps-places/protos/google/maps/places/v1/places_service.proto @@ -0,0 +1,199 @@ +// Copyright 2023 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.maps.places.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/geo/type/viewport.proto"; +import "google/maps/places/v1/geometry.proto"; +import "google/maps/places/v1/place.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Maps.Places.V1"; +option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb"; +option java_multiple_files = true; +option java_outer_classname = "PlacesServiceProto"; +option java_package = "com.google.maps.places.v1"; +option objc_class_prefix = "GMPSV1"; +option php_namespace = "Google\\Maps\\Places\\V1"; + +// Service definition for the Places API. +service Places { + option (google.api.default_host) = "places.googleapis.com"; + + // Text query based place search. + rpc SearchText(SearchTextRequest) returns (SearchTextResponse) { + option (google.api.http) = { + post: "/v1/Text:search" + body: "*" + }; + } +} + +// int 32 range. Both min and max are optional. If only min is set, then the +// range only has a lower bound. If only max is set, then range only has an +// upper bound. At least one of min and max must be set. Values are inclusive. +message Int32Range { + // Lower bound. If unset, behavior is documented on the range field. + optional int32 min = 1; + + // Upper bound. If unset, behavior is documented on the range field. + optional int32 max = 2; +} + +// Request data structure for SearchText. +message SearchTextRequest { + // How results will be ranked in the response. + enum RankPreference { + // RankPreference value not set. Will default to DISTANCE. + RANK_PREFERENCE_UNSPECIFIED = 0; + + // Ranks results by distance. + DISTANCE = 1; + + // Ranks results by relevance. Sort order determined by normal ranking + // stack. See SortRefinement::RELEVANCE. + RELEVANCE = 2; + } + + // The region to search. + // + // Deprecated. Use LocationRestriction or LocationBias instead. + message Location { + oneof type { + // A rectangle box defined by northeast and southwest corner. + google.geo.type.Viewport rectangle = 1; + } + + // Make location field a strict restriction and filter out POIs outside of + // the given location. If location type field is unset this field will have + // no effect. + bool strict_restriction = 2; + } + + // The region to search. This location serves as a bias which means results + // around given location might be returned. + message LocationBias { + oneof type { + // A rectangle box defined by northeast and southwest corner. + google.geo.type.Viewport rectangle = 1; + + // A circle defined by center point and radius. + Circle circle = 2; + } + } + + // The region to search. This location serves as a restriction which means + // results outside given location will not be returned. + message LocationRestriction { + oneof type { + // A rectangle box defined by northeast and southwest corner. + google.geo.type.Viewport rectangle = 1; + } + } + + // Required. The text query for textual search. + string text_query = 1 [(google.api.field_behavior) = REQUIRED]; + + // Place details will be displayed with the preferred language if available. + // If the language code is unspecified or unrecognized, place details of any + // language may be returned, with a preference for English if such details + // exist. + // + // Current list of supported languages: + // https://developers.google.com/maps/faq#languagesupport. + string language_code = 2; + + // The Unicode country/region code (CLDR) of the location where the + // request is coming from. It is used to display the place details, like + // region-specific place name, if available. + // + // For more information, see + // http://www.unicode.org/reports/tr35/#unicode_region_subtag. + // + // + // Note that 3-digit region codes are not currently supported. + string region_code = 3; + + // How results will be ranked in the response. + RankPreference rank_preference = 4; + + // The region to search. Setting location would usually yields + // better results. Recommended to set. This location serves as a bias unless + // strict_restriction is set to true, which turns the location to a strict + // restriction. + // + // Deprecated. Use LocationRestriction or LocationBias instead. + Location location = 5 [deprecated = true]; + + // The requested place type. Full list of types supported: + // https://developers.google.com/places/supported_types. Only support one + // included type. + string included_type = 6; + + // Used to restrict the search to places that are open at a specific time. + // open_now marks if a business is currently open. + bool open_now = 7; + + // [Deprecated!]Used to restrict the search to places that are within a + // certain price range. This is on a scale of 0 to 4. Set a minimum of 0 or + // set a maximum of 4 has no effect on the search results. Min price is + // default to 0 and max price is default to 4. Default value will be used if + // either min or max is unset. + Int32Range price_range = 8 [deprecated = true]; + + // Filter out results whose average user rating is strictly less than this + // limit. A valid value must be an float between 0 and 5 (inclusively) at a + // 0.5 cadence i.e. `[0, 0.5, 1.0, ... , 5.0]` inclusively. This is to keep + // parity with LocalRefinement_UserRating. The input rating will round up to + // the nearest 0.5(ceiling). For instance, a rating of 0.6 will eliminate all + // results with a less than 1.0 rating. + double min_rating = 9; + + // Maximum number of results to return. It must be between 1 and 20, + // inclusively. If the number is unset, it falls back to the upper limit. If + // the number is set to negative or exceeds the upper limit, an + // INVALID_ARGUMENT error is returned. + int32 max_result_count = 10; + + // Used to restrict the search to places that are marked as certain price + // levels. Users can choose any combinations of price levels. Default to + // select all price levels. + repeated PriceLevel price_levels = 11; + + // Used to set strict type filtering for included_type. If set to true, only + // results of the same type will be returned. Default to false. + bool strict_type_filtering = 12; + + // The region to search. This location serves as a bias which means results + // around given location might be returned. Cannot be set along with + // location_restriction. + LocationBias location_bias = 13; + + // The region to search. This location serves as a restriction which means + // results outside given location will not be returned. Cannot be set along + // with location_bias. + LocationRestriction location_restriction = 14; +} + +// Response proto for SearchText. +// +message SearchTextResponse { + // A list of places that meet the user's text search criteria. + repeated Place places = 1; +} diff --git a/packages/google-maps-places/protos/protos.d.ts b/packages/google-maps-places/protos/protos.d.ts new file mode 100644 index 00000000000..9aade00a514 --- /dev/null +++ b/packages/google-maps-places/protos/protos.d.ts @@ -0,0 +1,6564 @@ +// Copyright 2023 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. + +import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); +/** Namespace google. */ +export namespace google { + + /** Namespace geo. */ + namespace geo { + + /** Namespace type. */ + namespace type { + + /** Properties of a Viewport. */ + interface IViewport { + + /** Viewport low */ + low?: (google.type.ILatLng|null); + + /** Viewport high */ + high?: (google.type.ILatLng|null); + } + + /** Represents a Viewport. */ + class Viewport implements IViewport { + + /** + * Constructs a new Viewport. + * @param [properties] Properties to set + */ + constructor(properties?: google.geo.type.IViewport); + + /** Viewport low. */ + public low?: (google.type.ILatLng|null); + + /** Viewport high. */ + public high?: (google.type.ILatLng|null); + + /** + * Creates a new Viewport instance using the specified properties. + * @param [properties] Properties to set + * @returns Viewport instance + */ + public static create(properties?: google.geo.type.IViewport): google.geo.type.Viewport; + + /** + * Encodes the specified Viewport message. Does not implicitly {@link google.geo.type.Viewport.verify|verify} messages. + * @param message Viewport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.geo.type.IViewport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Viewport message, length delimited. Does not implicitly {@link google.geo.type.Viewport.verify|verify} messages. + * @param message Viewport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.geo.type.IViewport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Viewport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Viewport + * @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.geo.type.Viewport; + + /** + * Decodes a Viewport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Viewport + * @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.geo.type.Viewport; + + /** + * Verifies a Viewport 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 Viewport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Viewport + */ + public static fromObject(object: { [k: string]: any }): google.geo.type.Viewport; + + /** + * Creates a plain object from a Viewport message. Also converts values to other types if specified. + * @param message Viewport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.geo.type.Viewport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Viewport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Viewport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Namespace type. */ + namespace type { + + /** Properties of a LatLng. */ + interface ILatLng { + + /** LatLng latitude */ + latitude?: (number|null); + + /** LatLng longitude */ + longitude?: (number|null); + } + + /** Represents a LatLng. */ + class LatLng implements ILatLng { + + /** + * Constructs a new LatLng. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.ILatLng); + + /** LatLng latitude. */ + public latitude: number; + + /** LatLng longitude. */ + public longitude: number; + + /** + * Creates a new LatLng instance using the specified properties. + * @param [properties] Properties to set + * @returns LatLng instance + */ + public static create(properties?: google.type.ILatLng): google.type.LatLng; + + /** + * Encodes the specified LatLng message. Does not implicitly {@link google.type.LatLng.verify|verify} messages. + * @param message LatLng message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.ILatLng, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LatLng message, length delimited. Does not implicitly {@link google.type.LatLng.verify|verify} messages. + * @param message LatLng message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.ILatLng, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LatLng message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LatLng + * @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.type.LatLng; + + /** + * Decodes a LatLng message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LatLng + * @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.type.LatLng; + + /** + * Verifies a LatLng 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 LatLng message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LatLng + */ + public static fromObject(object: { [k: string]: any }): google.type.LatLng; + + /** + * Creates a plain object from a LatLng message. Also converts values to other types if specified. + * @param message LatLng + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.LatLng, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LatLng to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LatLng + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Date. */ + interface IDate { + + /** Date year */ + year?: (number|null); + + /** Date month */ + month?: (number|null); + + /** Date day */ + day?: (number|null); + } + + /** Represents a Date. */ + class Date implements IDate { + + /** + * Constructs a new Date. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.IDate); + + /** Date year. */ + public year: number; + + /** Date month. */ + public month: number; + + /** Date day. */ + public day: number; + + /** + * Creates a new Date instance using the specified properties. + * @param [properties] Properties to set + * @returns Date instance + */ + public static create(properties?: google.type.IDate): google.type.Date; + + /** + * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @param message Date message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @param message Date message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Date message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Date + * @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.type.Date; + + /** + * Decodes a Date message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Date + * @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.type.Date; + + /** + * Verifies a Date 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 Date message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Date + */ + public static fromObject(object: { [k: string]: any }): google.type.Date; + + /** + * Creates a plain object from a Date message. Also converts values to other types if specified. + * @param message Date + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.Date, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Date to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Date + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LocalizedText. */ + interface ILocalizedText { + + /** LocalizedText text */ + text?: (string|null); + + /** LocalizedText languageCode */ + languageCode?: (string|null); + } + + /** Represents a LocalizedText. */ + class LocalizedText implements ILocalizedText { + + /** + * Constructs a new LocalizedText. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.ILocalizedText); + + /** LocalizedText text. */ + public text: string; + + /** LocalizedText languageCode. */ + public languageCode: string; + + /** + * Creates a new LocalizedText instance using the specified properties. + * @param [properties] Properties to set + * @returns LocalizedText instance + */ + public static create(properties?: google.type.ILocalizedText): google.type.LocalizedText; + + /** + * Encodes the specified LocalizedText message. Does not implicitly {@link google.type.LocalizedText.verify|verify} messages. + * @param message LocalizedText message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.ILocalizedText, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LocalizedText message, length delimited. Does not implicitly {@link google.type.LocalizedText.verify|verify} messages. + * @param message LocalizedText message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.ILocalizedText, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LocalizedText message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LocalizedText + * @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.type.LocalizedText; + + /** + * Decodes a LocalizedText message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LocalizedText + * @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.type.LocalizedText; + + /** + * Verifies a LocalizedText 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 LocalizedText message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LocalizedText + */ + public static fromObject(object: { [k: string]: any }): google.type.LocalizedText; + + /** + * Creates a plain object from a LocalizedText message. Also converts values to other types if specified. + * @param message LocalizedText + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.LocalizedText, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LocalizedText to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LocalizedText + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace maps. */ + namespace maps { + + /** Namespace places. */ + namespace places { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of a Circle. */ + interface ICircle { + + /** Circle center */ + center?: (google.type.ILatLng|null); + + /** Circle radius */ + radius?: (number|null); + } + + /** Represents a Circle. */ + class Circle implements ICircle { + + /** + * Constructs a new Circle. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.ICircle); + + /** Circle center. */ + public center?: (google.type.ILatLng|null); + + /** Circle radius. */ + public radius: number; + + /** + * Creates a new Circle instance using the specified properties. + * @param [properties] Properties to set + * @returns Circle instance + */ + public static create(properties?: google.maps.places.v1.ICircle): google.maps.places.v1.Circle; + + /** + * Encodes the specified Circle message. Does not implicitly {@link google.maps.places.v1.Circle.verify|verify} messages. + * @param message Circle message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.ICircle, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Circle message, length delimited. Does not implicitly {@link google.maps.places.v1.Circle.verify|verify} messages. + * @param message Circle message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.ICircle, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Circle message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Circle + * @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.maps.places.v1.Circle; + + /** + * Decodes a Circle message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Circle + * @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.maps.places.v1.Circle; + + /** + * Verifies a Circle 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 Circle message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Circle + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Circle; + + /** + * Creates a plain object from a Circle message. Also converts values to other types if specified. + * @param message Circle + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Circle, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Circle to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Circle + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Place. */ + interface IPlace { + + /** Place id */ + id?: (string|null); + + /** Place displayName */ + displayName?: (google.type.ILocalizedText|null); + + /** Place types */ + types?: (string[]|null); + + /** Place nationalPhoneNumber */ + nationalPhoneNumber?: (string|null); + + /** Place internationalPhoneNumber */ + internationalPhoneNumber?: (string|null); + + /** Place formattedAddress */ + formattedAddress?: (string|null); + + /** Place addressComponents */ + addressComponents?: (google.maps.places.v1.Place.IAddressComponent[]|null); + + /** Place plusCode */ + plusCode?: (google.maps.places.v1.Place.IPlusCode|null); + + /** Place location */ + location?: (google.type.ILatLng|null); + + /** Place viewport */ + viewport?: (google.geo.type.IViewport|null); + + /** Place rating */ + rating?: (number|null); + + /** Place googleMapsUri */ + googleMapsUri?: (string|null); + + /** Place websiteUri */ + websiteUri?: (string|null); + + /** Place reviews */ + reviews?: (google.maps.places.v1.Place.IReview[]|null); + + /** Place openingHours */ + openingHours?: (google.maps.places.v1.Place.IOpeningHours|null); + + /** Place utcOffsetMinutes */ + utcOffsetMinutes?: (number|null); + + /** Place adrFormatAddress */ + adrFormatAddress?: (string|null); + + /** Place businessStatus */ + businessStatus?: (google.maps.places.v1.Place.BusinessStatus|keyof typeof google.maps.places.v1.Place.BusinessStatus|null); + + /** Place priceLevel */ + priceLevel?: (google.maps.places.v1.PriceLevel|keyof typeof google.maps.places.v1.PriceLevel|null); + + /** Place attributions */ + attributions?: (google.maps.places.v1.Place.IAttribution[]|null); + + /** Place userRatingCount */ + userRatingCount?: (number|null); + + /** Place iconMaskBaseUri */ + iconMaskBaseUri?: (string|null); + + /** Place iconBackgroundColor */ + iconBackgroundColor?: (string|null); + + /** Place takeout */ + takeout?: (boolean|null); + + /** Place delivery */ + delivery?: (boolean|null); + + /** Place dineIn */ + dineIn?: (boolean|null); + + /** Place curbsidePickup */ + curbsidePickup?: (boolean|null); + + /** Place wheelchairAccessibleEntrance */ + wheelchairAccessibleEntrance?: (boolean|null); + + /** Place reservable */ + reservable?: (boolean|null); + + /** Place servesBreakfast */ + servesBreakfast?: (boolean|null); + + /** Place servesLunch */ + servesLunch?: (boolean|null); + + /** Place servesDinner */ + servesDinner?: (boolean|null); + + /** Place servesBeer */ + servesBeer?: (boolean|null); + + /** Place servesWine */ + servesWine?: (boolean|null); + + /** Place servesBrunch */ + servesBrunch?: (boolean|null); + + /** Place servesVegetarianFood */ + servesVegetarianFood?: (boolean|null); + + /** Place currentOpeningHours */ + currentOpeningHours?: (google.maps.places.v1.Place.IOpeningHours|null); + + /** Place currentSecondaryOpeningHours */ + currentSecondaryOpeningHours?: (google.maps.places.v1.Place.IOpeningHours[]|null); + + /** Place secondaryOpeningHours */ + secondaryOpeningHours?: (google.maps.places.v1.Place.IOpeningHours[]|null); + + /** Place editorialSummary */ + editorialSummary?: (google.maps.places.v1.Place.IEditorialSummary|null); + } + + /** Represents a Place. */ + class Place implements IPlace { + + /** + * Constructs a new Place. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.IPlace); + + /** Place id. */ + public id: string; + + /** Place displayName. */ + public displayName?: (google.type.ILocalizedText|null); + + /** Place types. */ + public types: string[]; + + /** Place nationalPhoneNumber. */ + public nationalPhoneNumber: string; + + /** Place internationalPhoneNumber. */ + public internationalPhoneNumber: string; + + /** Place formattedAddress. */ + public formattedAddress: string; + + /** Place addressComponents. */ + public addressComponents: google.maps.places.v1.Place.IAddressComponent[]; + + /** Place plusCode. */ + public plusCode?: (google.maps.places.v1.Place.IPlusCode|null); + + /** Place location. */ + public location?: (google.type.ILatLng|null); + + /** Place viewport. */ + public viewport?: (google.geo.type.IViewport|null); + + /** Place rating. */ + public rating: number; + + /** Place googleMapsUri. */ + public googleMapsUri: string; + + /** Place websiteUri. */ + public websiteUri: string; + + /** Place reviews. */ + public reviews: google.maps.places.v1.Place.IReview[]; + + /** Place openingHours. */ + public openingHours?: (google.maps.places.v1.Place.IOpeningHours|null); + + /** Place utcOffsetMinutes. */ + public utcOffsetMinutes: number; + + /** Place adrFormatAddress. */ + public adrFormatAddress: string; + + /** Place businessStatus. */ + public businessStatus: (google.maps.places.v1.Place.BusinessStatus|keyof typeof google.maps.places.v1.Place.BusinessStatus); + + /** Place priceLevel. */ + public priceLevel: (google.maps.places.v1.PriceLevel|keyof typeof google.maps.places.v1.PriceLevel); + + /** Place attributions. */ + public attributions: google.maps.places.v1.Place.IAttribution[]; + + /** Place userRatingCount. */ + public userRatingCount: number; + + /** Place iconMaskBaseUri. */ + public iconMaskBaseUri: string; + + /** Place iconBackgroundColor. */ + public iconBackgroundColor: string; + + /** Place takeout. */ + public takeout?: (boolean|null); + + /** Place delivery. */ + public delivery?: (boolean|null); + + /** Place dineIn. */ + public dineIn?: (boolean|null); + + /** Place curbsidePickup. */ + public curbsidePickup?: (boolean|null); + + /** Place wheelchairAccessibleEntrance. */ + public wheelchairAccessibleEntrance?: (boolean|null); + + /** Place reservable. */ + public reservable?: (boolean|null); + + /** Place servesBreakfast. */ + public servesBreakfast?: (boolean|null); + + /** Place servesLunch. */ + public servesLunch?: (boolean|null); + + /** Place servesDinner. */ + public servesDinner?: (boolean|null); + + /** Place servesBeer. */ + public servesBeer?: (boolean|null); + + /** Place servesWine. */ + public servesWine?: (boolean|null); + + /** Place servesBrunch. */ + public servesBrunch?: (boolean|null); + + /** Place servesVegetarianFood. */ + public servesVegetarianFood?: (boolean|null); + + /** Place currentOpeningHours. */ + public currentOpeningHours?: (google.maps.places.v1.Place.IOpeningHours|null); + + /** Place currentSecondaryOpeningHours. */ + public currentSecondaryOpeningHours: google.maps.places.v1.Place.IOpeningHours[]; + + /** Place secondaryOpeningHours. */ + public secondaryOpeningHours: google.maps.places.v1.Place.IOpeningHours[]; + + /** Place editorialSummary. */ + public editorialSummary?: (google.maps.places.v1.Place.IEditorialSummary|null); + + /** Place _takeout. */ + public _takeout?: "takeout"; + + /** Place _delivery. */ + public _delivery?: "delivery"; + + /** Place _dineIn. */ + public _dineIn?: "dineIn"; + + /** Place _curbsidePickup. */ + public _curbsidePickup?: "curbsidePickup"; + + /** Place _wheelchairAccessibleEntrance. */ + public _wheelchairAccessibleEntrance?: "wheelchairAccessibleEntrance"; + + /** Place _reservable. */ + public _reservable?: "reservable"; + + /** Place _servesBreakfast. */ + public _servesBreakfast?: "servesBreakfast"; + + /** Place _servesLunch. */ + public _servesLunch?: "servesLunch"; + + /** Place _servesDinner. */ + public _servesDinner?: "servesDinner"; + + /** Place _servesBeer. */ + public _servesBeer?: "servesBeer"; + + /** Place _servesWine. */ + public _servesWine?: "servesWine"; + + /** Place _servesBrunch. */ + public _servesBrunch?: "servesBrunch"; + + /** Place _servesVegetarianFood. */ + public _servesVegetarianFood?: "servesVegetarianFood"; + + /** + * Creates a new Place instance using the specified properties. + * @param [properties] Properties to set + * @returns Place instance + */ + public static create(properties?: google.maps.places.v1.IPlace): google.maps.places.v1.Place; + + /** + * Encodes the specified Place message. Does not implicitly {@link google.maps.places.v1.Place.verify|verify} messages. + * @param message Place message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.IPlace, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Place message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.verify|verify} messages. + * @param message Place message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.IPlace, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Place message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Place + * @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.maps.places.v1.Place; + + /** + * Decodes a Place message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Place + * @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.maps.places.v1.Place; + + /** + * Verifies a Place 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 Place message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Place + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place; + + /** + * Creates a plain object from a Place message. Also converts values to other types if specified. + * @param message Place + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Place to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Place + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Place { + + /** Properties of an AddressComponent. */ + interface IAddressComponent { + + /** AddressComponent longText */ + longText?: (string|null); + + /** AddressComponent shortText */ + shortText?: (string|null); + + /** AddressComponent types */ + types?: (string[]|null); + + /** AddressComponent languageCode */ + languageCode?: (string|null); + } + + /** Represents an AddressComponent. */ + class AddressComponent implements IAddressComponent { + + /** + * Constructs a new AddressComponent. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.IAddressComponent); + + /** AddressComponent longText. */ + public longText: string; + + /** AddressComponent shortText. */ + public shortText: string; + + /** AddressComponent types. */ + public types: string[]; + + /** AddressComponent languageCode. */ + public languageCode: string; + + /** + * Creates a new AddressComponent instance using the specified properties. + * @param [properties] Properties to set + * @returns AddressComponent instance + */ + public static create(properties?: google.maps.places.v1.Place.IAddressComponent): google.maps.places.v1.Place.AddressComponent; + + /** + * Encodes the specified AddressComponent message. Does not implicitly {@link google.maps.places.v1.Place.AddressComponent.verify|verify} messages. + * @param message AddressComponent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.IAddressComponent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AddressComponent message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.AddressComponent.verify|verify} messages. + * @param message AddressComponent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.IAddressComponent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AddressComponent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddressComponent + * @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.maps.places.v1.Place.AddressComponent; + + /** + * Decodes an AddressComponent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddressComponent + * @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.maps.places.v1.Place.AddressComponent; + + /** + * Verifies an AddressComponent 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 AddressComponent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddressComponent + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.AddressComponent; + + /** + * Creates a plain object from an AddressComponent message. Also converts values to other types if specified. + * @param message AddressComponent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.AddressComponent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AddressComponent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddressComponent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PlusCode. */ + interface IPlusCode { + + /** PlusCode globalCode */ + globalCode?: (string|null); + + /** PlusCode compoundCode */ + compoundCode?: (string|null); + } + + /** Represents a PlusCode. */ + class PlusCode implements IPlusCode { + + /** + * Constructs a new PlusCode. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.IPlusCode); + + /** PlusCode globalCode. */ + public globalCode: string; + + /** PlusCode compoundCode. */ + public compoundCode: string; + + /** + * Creates a new PlusCode instance using the specified properties. + * @param [properties] Properties to set + * @returns PlusCode instance + */ + public static create(properties?: google.maps.places.v1.Place.IPlusCode): google.maps.places.v1.Place.PlusCode; + + /** + * Encodes the specified PlusCode message. Does not implicitly {@link google.maps.places.v1.Place.PlusCode.verify|verify} messages. + * @param message PlusCode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.IPlusCode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PlusCode message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.PlusCode.verify|verify} messages. + * @param message PlusCode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.IPlusCode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PlusCode message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PlusCode + * @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.maps.places.v1.Place.PlusCode; + + /** + * Decodes a PlusCode message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PlusCode + * @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.maps.places.v1.Place.PlusCode; + + /** + * Verifies a PlusCode 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 PlusCode message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PlusCode + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.PlusCode; + + /** + * Creates a plain object from a PlusCode message. Also converts values to other types if specified. + * @param message PlusCode + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.PlusCode, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PlusCode to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PlusCode + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Review. */ + interface IReview { + + /** Review publishTime */ + publishTime?: (google.protobuf.ITimestamp|null); + + /** Review relativePublishTimeDescription */ + relativePublishTimeDescription?: (string|null); + + /** Review text */ + text?: (google.type.ILocalizedText|null); + + /** Review author */ + author?: (string|null); + + /** Review authorUri */ + authorUri?: (string|null); + + /** Review authorPhotoUri */ + authorPhotoUri?: (string|null); + + /** Review rating */ + rating?: (number|null); + + /** Review originalLanguageCode */ + originalLanguageCode?: (string|null); + + /** Review translated */ + translated?: (boolean|null); + } + + /** Represents a Review. */ + class Review implements IReview { + + /** + * Constructs a new Review. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.IReview); + + /** Review publishTime. */ + public publishTime?: (google.protobuf.ITimestamp|null); + + /** Review relativePublishTimeDescription. */ + public relativePublishTimeDescription: string; + + /** Review text. */ + public text?: (google.type.ILocalizedText|null); + + /** Review author. */ + public author: string; + + /** Review authorUri. */ + public authorUri: string; + + /** Review authorPhotoUri. */ + public authorPhotoUri: string; + + /** Review rating. */ + public rating: number; + + /** Review originalLanguageCode. */ + public originalLanguageCode: string; + + /** Review translated. */ + public translated: boolean; + + /** + * Creates a new Review instance using the specified properties. + * @param [properties] Properties to set + * @returns Review instance + */ + public static create(properties?: google.maps.places.v1.Place.IReview): google.maps.places.v1.Place.Review; + + /** + * Encodes the specified Review message. Does not implicitly {@link google.maps.places.v1.Place.Review.verify|verify} messages. + * @param message Review message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.IReview, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Review message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.Review.verify|verify} messages. + * @param message Review message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.IReview, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Review message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Review + * @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.maps.places.v1.Place.Review; + + /** + * Decodes a Review message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Review + * @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.maps.places.v1.Place.Review; + + /** + * Verifies a Review 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 Review message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Review + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.Review; + + /** + * Creates a plain object from a Review message. Also converts values to other types if specified. + * @param message Review + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.Review, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Review to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Review + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OpeningHours. */ + interface IOpeningHours { + + /** OpeningHours openNow */ + openNow?: (boolean|null); + + /** OpeningHours periods */ + periods?: (google.maps.places.v1.Place.OpeningHours.IOpeningHoursPeriod[]|null); + + /** OpeningHours weekdayDescriptions */ + weekdayDescriptions?: (string[]|null); + + /** OpeningHours secondaryHourType */ + secondaryHourType?: (google.maps.places.v1.Place.OpeningHours.SecondaryHourType|keyof typeof google.maps.places.v1.Place.OpeningHours.SecondaryHourType|null); + + /** OpeningHours specialDays */ + specialDays?: (google.maps.places.v1.Place.OpeningHours.ISpecialDay[]|null); + } + + /** Represents an OpeningHours. */ + class OpeningHours implements IOpeningHours { + + /** + * Constructs a new OpeningHours. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.IOpeningHours); + + /** OpeningHours openNow. */ + public openNow: boolean; + + /** OpeningHours periods. */ + public periods: google.maps.places.v1.Place.OpeningHours.IOpeningHoursPeriod[]; + + /** OpeningHours weekdayDescriptions. */ + public weekdayDescriptions: string[]; + + /** OpeningHours secondaryHourType. */ + public secondaryHourType: (google.maps.places.v1.Place.OpeningHours.SecondaryHourType|keyof typeof google.maps.places.v1.Place.OpeningHours.SecondaryHourType); + + /** OpeningHours specialDays. */ + public specialDays: google.maps.places.v1.Place.OpeningHours.ISpecialDay[]; + + /** + * Creates a new OpeningHours instance using the specified properties. + * @param [properties] Properties to set + * @returns OpeningHours instance + */ + public static create(properties?: google.maps.places.v1.Place.IOpeningHours): google.maps.places.v1.Place.OpeningHours; + + /** + * Encodes the specified OpeningHours message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.verify|verify} messages. + * @param message OpeningHours message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.IOpeningHours, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OpeningHours message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.verify|verify} messages. + * @param message OpeningHours message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.IOpeningHours, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OpeningHours message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OpeningHours + * @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.maps.places.v1.Place.OpeningHours; + + /** + * Decodes an OpeningHours message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OpeningHours + * @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.maps.places.v1.Place.OpeningHours; + + /** + * Verifies an OpeningHours 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 OpeningHours message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OpeningHours + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.OpeningHours; + + /** + * Creates a plain object from an OpeningHours message. Also converts values to other types if specified. + * @param message OpeningHours + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.OpeningHours, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OpeningHours to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OpeningHours + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace OpeningHours { + + /** Properties of an OpeningHoursPeriod. */ + interface IOpeningHoursPeriod { + + /** OpeningHoursPeriod open */ + open?: (google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.IOpeningHoursPoint|null); + + /** OpeningHoursPeriod close */ + close?: (google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.IOpeningHoursPoint|null); + } + + /** Represents an OpeningHoursPeriod. */ + class OpeningHoursPeriod implements IOpeningHoursPeriod { + + /** + * Constructs a new OpeningHoursPeriod. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.OpeningHours.IOpeningHoursPeriod); + + /** OpeningHoursPeriod open. */ + public open?: (google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.IOpeningHoursPoint|null); + + /** OpeningHoursPeriod close. */ + public close?: (google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.IOpeningHoursPoint|null); + + /** + * Creates a new OpeningHoursPeriod instance using the specified properties. + * @param [properties] Properties to set + * @returns OpeningHoursPeriod instance + */ + public static create(properties?: google.maps.places.v1.Place.OpeningHours.IOpeningHoursPeriod): google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod; + + /** + * Encodes the specified OpeningHoursPeriod message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.verify|verify} messages. + * @param message OpeningHoursPeriod message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.OpeningHours.IOpeningHoursPeriod, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OpeningHoursPeriod message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.verify|verify} messages. + * @param message OpeningHoursPeriod message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.OpeningHours.IOpeningHoursPeriod, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OpeningHoursPeriod message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OpeningHoursPeriod + * @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.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod; + + /** + * Decodes an OpeningHoursPeriod message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OpeningHoursPeriod + * @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.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod; + + /** + * Verifies an OpeningHoursPeriod 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 OpeningHoursPeriod message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OpeningHoursPeriod + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod; + + /** + * Creates a plain object from an OpeningHoursPeriod message. Also converts values to other types if specified. + * @param message OpeningHoursPeriod + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OpeningHoursPeriod to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OpeningHoursPeriod + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace OpeningHoursPeriod { + + /** Properties of an OpeningHoursPoint. */ + interface IOpeningHoursPoint { + + /** OpeningHoursPoint day */ + day?: (number|null); + + /** OpeningHoursPoint hour */ + hour?: (number|null); + + /** OpeningHoursPoint minute */ + minute?: (number|null); + + /** OpeningHoursPoint dateDeprecated */ + dateDeprecated?: (string|null); + + /** OpeningHoursPoint date */ + date?: (google.type.IDate|null); + + /** OpeningHoursPoint truncated */ + truncated?: (boolean|null); + } + + /** Represents an OpeningHoursPoint. */ + class OpeningHoursPoint implements IOpeningHoursPoint { + + /** + * Constructs a new OpeningHoursPoint. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.IOpeningHoursPoint); + + /** OpeningHoursPoint day. */ + public day?: (number|null); + + /** OpeningHoursPoint hour. */ + public hour?: (number|null); + + /** OpeningHoursPoint minute. */ + public minute?: (number|null); + + /** OpeningHoursPoint dateDeprecated. */ + public dateDeprecated: string; + + /** OpeningHoursPoint date. */ + public date?: (google.type.IDate|null); + + /** OpeningHoursPoint truncated. */ + public truncated: boolean; + + /** OpeningHoursPoint _day. */ + public _day?: "day"; + + /** OpeningHoursPoint _hour. */ + public _hour?: "hour"; + + /** OpeningHoursPoint _minute. */ + public _minute?: "minute"; + + /** + * Creates a new OpeningHoursPoint instance using the specified properties. + * @param [properties] Properties to set + * @returns OpeningHoursPoint instance + */ + public static create(properties?: google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.IOpeningHoursPoint): google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint; + + /** + * Encodes the specified OpeningHoursPoint message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint.verify|verify} messages. + * @param message OpeningHoursPoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.IOpeningHoursPoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OpeningHoursPoint message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint.verify|verify} messages. + * @param message OpeningHoursPoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.IOpeningHoursPoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OpeningHoursPoint message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OpeningHoursPoint + * @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.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint; + + /** + * Decodes an OpeningHoursPoint message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OpeningHoursPoint + * @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.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint; + + /** + * Verifies an OpeningHoursPoint 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 OpeningHoursPoint message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OpeningHoursPoint + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint; + + /** + * Creates a plain object from an OpeningHoursPoint message. Also converts values to other types if specified. + * @param message OpeningHoursPoint + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OpeningHoursPoint to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OpeningHoursPoint + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** SecondaryHourType enum. */ + enum SecondaryHourType { + SECONDARY_HOUR_TYPE_UNSPECIFIED = 0, + DRIVE_THROUGH = 1, + HAPPY_HOUR = 2, + DELIVERY = 3, + TAKEOUT = 4, + KITCHEN = 5, + BREAKFAST = 6, + LUNCH = 7, + DINNER = 8, + BRUNCH = 9, + PICKUP = 10, + ACCESS = 11, + SENIOR_HOURS = 12, + ONLINE_SERVICE_HOURS = 13 + } + + /** Properties of a SpecialDay. */ + interface ISpecialDay { + + /** SpecialDay date */ + date?: (google.type.IDate|null); + } + + /** Represents a SpecialDay. */ + class SpecialDay implements ISpecialDay { + + /** + * Constructs a new SpecialDay. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.OpeningHours.ISpecialDay); + + /** SpecialDay date. */ + public date?: (google.type.IDate|null); + + /** + * Creates a new SpecialDay instance using the specified properties. + * @param [properties] Properties to set + * @returns SpecialDay instance + */ + public static create(properties?: google.maps.places.v1.Place.OpeningHours.ISpecialDay): google.maps.places.v1.Place.OpeningHours.SpecialDay; + + /** + * Encodes the specified SpecialDay message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.SpecialDay.verify|verify} messages. + * @param message SpecialDay message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.OpeningHours.ISpecialDay, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SpecialDay message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.SpecialDay.verify|verify} messages. + * @param message SpecialDay message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.OpeningHours.ISpecialDay, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SpecialDay message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SpecialDay + * @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.maps.places.v1.Place.OpeningHours.SpecialDay; + + /** + * Decodes a SpecialDay message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SpecialDay + * @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.maps.places.v1.Place.OpeningHours.SpecialDay; + + /** + * Verifies a SpecialDay 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 SpecialDay message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SpecialDay + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.OpeningHours.SpecialDay; + + /** + * Creates a plain object from a SpecialDay message. Also converts values to other types if specified. + * @param message SpecialDay + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.OpeningHours.SpecialDay, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SpecialDay to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SpecialDay + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** BusinessStatus enum. */ + enum BusinessStatus { + BUSINESS_STATUS_UNSPECIFIED = 0, + OPERATIONAL = 1, + CLOSED_TEMPORARILY = 2, + CLOSED_PERMANENTLY = 3 + } + + /** Properties of an Attribution. */ + interface IAttribution { + + /** Attribution provider */ + provider?: (string|null); + + /** Attribution providerUri */ + providerUri?: (string|null); + } + + /** Represents an Attribution. */ + class Attribution implements IAttribution { + + /** + * Constructs a new Attribution. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.IAttribution); + + /** Attribution provider. */ + public provider: string; + + /** Attribution providerUri. */ + public providerUri: string; + + /** + * Creates a new Attribution instance using the specified properties. + * @param [properties] Properties to set + * @returns Attribution instance + */ + public static create(properties?: google.maps.places.v1.Place.IAttribution): google.maps.places.v1.Place.Attribution; + + /** + * Encodes the specified Attribution message. Does not implicitly {@link google.maps.places.v1.Place.Attribution.verify|verify} messages. + * @param message Attribution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.IAttribution, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Attribution message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.Attribution.verify|verify} messages. + * @param message Attribution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.IAttribution, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Attribution message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Attribution + * @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.maps.places.v1.Place.Attribution; + + /** + * Decodes an Attribution message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Attribution + * @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.maps.places.v1.Place.Attribution; + + /** + * Verifies an Attribution 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 Attribution message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Attribution + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.Attribution; + + /** + * Creates a plain object from an Attribution message. Also converts values to other types if specified. + * @param message Attribution + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.Attribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Attribution to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Attribution + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EditorialSummary. */ + interface IEditorialSummary { + + /** EditorialSummary overview */ + overview?: (google.type.ILocalizedText|null); + } + + /** Represents an EditorialSummary. */ + class EditorialSummary implements IEditorialSummary { + + /** + * Constructs a new EditorialSummary. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.Place.IEditorialSummary); + + /** EditorialSummary overview. */ + public overview?: (google.type.ILocalizedText|null); + + /** + * Creates a new EditorialSummary instance using the specified properties. + * @param [properties] Properties to set + * @returns EditorialSummary instance + */ + public static create(properties?: google.maps.places.v1.Place.IEditorialSummary): google.maps.places.v1.Place.EditorialSummary; + + /** + * Encodes the specified EditorialSummary message. Does not implicitly {@link google.maps.places.v1.Place.EditorialSummary.verify|verify} messages. + * @param message EditorialSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.Place.IEditorialSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EditorialSummary message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.EditorialSummary.verify|verify} messages. + * @param message EditorialSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.Place.IEditorialSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EditorialSummary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EditorialSummary + * @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.maps.places.v1.Place.EditorialSummary; + + /** + * Decodes an EditorialSummary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EditorialSummary + * @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.maps.places.v1.Place.EditorialSummary; + + /** + * Verifies an EditorialSummary 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 EditorialSummary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EditorialSummary + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Place.EditorialSummary; + + /** + * Creates a plain object from an EditorialSummary message. Also converts values to other types if specified. + * @param message EditorialSummary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Place.EditorialSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EditorialSummary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EditorialSummary + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** PriceLevel enum. */ + enum PriceLevel { + PRICE_LEVEL_UNSPECIFIED = 0, + FREE = 1, + INEXPENSIVE = 2, + MODERATE = 3, + EXPENSIVE = 4, + VERY_EXPENSIVE = 5 + } + + /** Represents a Places */ + class Places extends $protobuf.rpc.Service { + + /** + * Constructs a new Places 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 Places 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): Places; + + /** + * Calls SearchText. + * @param request SearchTextRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SearchTextResponse + */ + public searchText(request: google.maps.places.v1.ISearchTextRequest, callback: google.maps.places.v1.Places.SearchTextCallback): void; + + /** + * Calls SearchText. + * @param request SearchTextRequest message or plain object + * @returns Promise + */ + public searchText(request: google.maps.places.v1.ISearchTextRequest): Promise; + } + + namespace Places { + + /** + * Callback as used by {@link google.maps.places.v1.Places|searchText}. + * @param error Error, if any + * @param [response] SearchTextResponse + */ + type SearchTextCallback = (error: (Error|null), response?: google.maps.places.v1.SearchTextResponse) => void; + } + + /** Properties of an Int32Range. */ + interface IInt32Range { + + /** Int32Range min */ + min?: (number|null); + + /** Int32Range max */ + max?: (number|null); + } + + /** Represents an Int32Range. */ + class Int32Range implements IInt32Range { + + /** + * Constructs a new Int32Range. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.IInt32Range); + + /** Int32Range min. */ + public min?: (number|null); + + /** Int32Range max. */ + public max?: (number|null); + + /** Int32Range _min. */ + public _min?: "min"; + + /** Int32Range _max. */ + public _max?: "max"; + + /** + * Creates a new Int32Range instance using the specified properties. + * @param [properties] Properties to set + * @returns Int32Range instance + */ + public static create(properties?: google.maps.places.v1.IInt32Range): google.maps.places.v1.Int32Range; + + /** + * Encodes the specified Int32Range message. Does not implicitly {@link google.maps.places.v1.Int32Range.verify|verify} messages. + * @param message Int32Range message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.IInt32Range, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Int32Range message, length delimited. Does not implicitly {@link google.maps.places.v1.Int32Range.verify|verify} messages. + * @param message Int32Range message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.IInt32Range, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Int32Range message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Int32Range + * @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.maps.places.v1.Int32Range; + + /** + * Decodes an Int32Range message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Int32Range + * @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.maps.places.v1.Int32Range; + + /** + * Verifies an Int32Range 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 Int32Range message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int32Range + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.Int32Range; + + /** + * Creates a plain object from an Int32Range message. Also converts values to other types if specified. + * @param message Int32Range + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.Int32Range, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Int32Range to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Int32Range + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SearchTextRequest. */ + interface ISearchTextRequest { + + /** SearchTextRequest textQuery */ + textQuery?: (string|null); + + /** SearchTextRequest languageCode */ + languageCode?: (string|null); + + /** SearchTextRequest regionCode */ + regionCode?: (string|null); + + /** SearchTextRequest rankPreference */ + rankPreference?: (google.maps.places.v1.SearchTextRequest.RankPreference|keyof typeof google.maps.places.v1.SearchTextRequest.RankPreference|null); + + /** SearchTextRequest location */ + location?: (google.maps.places.v1.SearchTextRequest.ILocation|null); + + /** SearchTextRequest includedType */ + includedType?: (string|null); + + /** SearchTextRequest openNow */ + openNow?: (boolean|null); + + /** SearchTextRequest priceRange */ + priceRange?: (google.maps.places.v1.IInt32Range|null); + + /** SearchTextRequest minRating */ + minRating?: (number|null); + + /** SearchTextRequest maxResultCount */ + maxResultCount?: (number|null); + + /** SearchTextRequest priceLevels */ + priceLevels?: (google.maps.places.v1.PriceLevel[]|null); + + /** SearchTextRequest strictTypeFiltering */ + strictTypeFiltering?: (boolean|null); + + /** SearchTextRequest locationBias */ + locationBias?: (google.maps.places.v1.SearchTextRequest.ILocationBias|null); + + /** SearchTextRequest locationRestriction */ + locationRestriction?: (google.maps.places.v1.SearchTextRequest.ILocationRestriction|null); + } + + /** Represents a SearchTextRequest. */ + class SearchTextRequest implements ISearchTextRequest { + + /** + * Constructs a new SearchTextRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.ISearchTextRequest); + + /** SearchTextRequest textQuery. */ + public textQuery: string; + + /** SearchTextRequest languageCode. */ + public languageCode: string; + + /** SearchTextRequest regionCode. */ + public regionCode: string; + + /** SearchTextRequest rankPreference. */ + public rankPreference: (google.maps.places.v1.SearchTextRequest.RankPreference|keyof typeof google.maps.places.v1.SearchTextRequest.RankPreference); + + /** SearchTextRequest location. */ + public location?: (google.maps.places.v1.SearchTextRequest.ILocation|null); + + /** SearchTextRequest includedType. */ + public includedType: string; + + /** SearchTextRequest openNow. */ + public openNow: boolean; + + /** SearchTextRequest priceRange. */ + public priceRange?: (google.maps.places.v1.IInt32Range|null); + + /** SearchTextRequest minRating. */ + public minRating: number; + + /** SearchTextRequest maxResultCount. */ + public maxResultCount: number; + + /** SearchTextRequest priceLevels. */ + public priceLevels: google.maps.places.v1.PriceLevel[]; + + /** SearchTextRequest strictTypeFiltering. */ + public strictTypeFiltering: boolean; + + /** SearchTextRequest locationBias. */ + public locationBias?: (google.maps.places.v1.SearchTextRequest.ILocationBias|null); + + /** SearchTextRequest locationRestriction. */ + public locationRestriction?: (google.maps.places.v1.SearchTextRequest.ILocationRestriction|null); + + /** + * Creates a new SearchTextRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchTextRequest instance + */ + public static create(properties?: google.maps.places.v1.ISearchTextRequest): google.maps.places.v1.SearchTextRequest; + + /** + * Encodes the specified SearchTextRequest message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.verify|verify} messages. + * @param message SearchTextRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.ISearchTextRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchTextRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.verify|verify} messages. + * @param message SearchTextRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.ISearchTextRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchTextRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchTextRequest + * @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.maps.places.v1.SearchTextRequest; + + /** + * Decodes a SearchTextRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchTextRequest + * @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.maps.places.v1.SearchTextRequest; + + /** + * Verifies a SearchTextRequest 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 SearchTextRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchTextRequest + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchTextRequest; + + /** + * Creates a plain object from a SearchTextRequest message. Also converts values to other types if specified. + * @param message SearchTextRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.SearchTextRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchTextRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchTextRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SearchTextRequest { + + /** RankPreference enum. */ + enum RankPreference { + RANK_PREFERENCE_UNSPECIFIED = 0, + DISTANCE = 1, + RELEVANCE = 2 + } + + /** Properties of a Location. */ + interface ILocation { + + /** Location rectangle */ + rectangle?: (google.geo.type.IViewport|null); + + /** Location strictRestriction */ + strictRestriction?: (boolean|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.SearchTextRequest.ILocation); + + /** Location rectangle. */ + public rectangle?: (google.geo.type.IViewport|null); + + /** Location strictRestriction. */ + public strictRestriction: boolean; + + /** Location type. */ + public type?: "rectangle"; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.maps.places.v1.SearchTextRequest.ILocation): google.maps.places.v1.SearchTextRequest.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.SearchTextRequest.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.SearchTextRequest.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @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.maps.places.v1.SearchTextRequest.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @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.maps.places.v1.SearchTextRequest.Location; + + /** + * Verifies a Location 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 Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchTextRequest.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.SearchTextRequest.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LocationBias. */ + interface ILocationBias { + + /** LocationBias rectangle */ + rectangle?: (google.geo.type.IViewport|null); + + /** LocationBias circle */ + circle?: (google.maps.places.v1.ICircle|null); + } + + /** Represents a LocationBias. */ + class LocationBias implements ILocationBias { + + /** + * Constructs a new LocationBias. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.SearchTextRequest.ILocationBias); + + /** LocationBias rectangle. */ + public rectangle?: (google.geo.type.IViewport|null); + + /** LocationBias circle. */ + public circle?: (google.maps.places.v1.ICircle|null); + + /** LocationBias type. */ + public type?: ("rectangle"|"circle"); + + /** + * Creates a new LocationBias instance using the specified properties. + * @param [properties] Properties to set + * @returns LocationBias instance + */ + public static create(properties?: google.maps.places.v1.SearchTextRequest.ILocationBias): google.maps.places.v1.SearchTextRequest.LocationBias; + + /** + * Encodes the specified LocationBias message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationBias.verify|verify} messages. + * @param message LocationBias message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.SearchTextRequest.ILocationBias, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LocationBias message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationBias.verify|verify} messages. + * @param message LocationBias message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.SearchTextRequest.ILocationBias, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LocationBias message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LocationBias + * @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.maps.places.v1.SearchTextRequest.LocationBias; + + /** + * Decodes a LocationBias message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LocationBias + * @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.maps.places.v1.SearchTextRequest.LocationBias; + + /** + * Verifies a LocationBias 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 LocationBias message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LocationBias + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchTextRequest.LocationBias; + + /** + * Creates a plain object from a LocationBias message. Also converts values to other types if specified. + * @param message LocationBias + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.SearchTextRequest.LocationBias, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LocationBias to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LocationBias + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LocationRestriction. */ + interface ILocationRestriction { + + /** LocationRestriction rectangle */ + rectangle?: (google.geo.type.IViewport|null); + } + + /** Represents a LocationRestriction. */ + class LocationRestriction implements ILocationRestriction { + + /** + * Constructs a new LocationRestriction. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.SearchTextRequest.ILocationRestriction); + + /** LocationRestriction rectangle. */ + public rectangle?: (google.geo.type.IViewport|null); + + /** LocationRestriction type. */ + public type?: "rectangle"; + + /** + * Creates a new LocationRestriction instance using the specified properties. + * @param [properties] Properties to set + * @returns LocationRestriction instance + */ + public static create(properties?: google.maps.places.v1.SearchTextRequest.ILocationRestriction): google.maps.places.v1.SearchTextRequest.LocationRestriction; + + /** + * Encodes the specified LocationRestriction message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationRestriction.verify|verify} messages. + * @param message LocationRestriction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.SearchTextRequest.ILocationRestriction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LocationRestriction message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationRestriction.verify|verify} messages. + * @param message LocationRestriction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.SearchTextRequest.ILocationRestriction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LocationRestriction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LocationRestriction + * @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.maps.places.v1.SearchTextRequest.LocationRestriction; + + /** + * Decodes a LocationRestriction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LocationRestriction + * @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.maps.places.v1.SearchTextRequest.LocationRestriction; + + /** + * Verifies a LocationRestriction 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 LocationRestriction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LocationRestriction + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchTextRequest.LocationRestriction; + + /** + * Creates a plain object from a LocationRestriction message. Also converts values to other types if specified. + * @param message LocationRestriction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.SearchTextRequest.LocationRestriction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LocationRestriction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LocationRestriction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SearchTextResponse. */ + interface ISearchTextResponse { + + /** SearchTextResponse places */ + places?: (google.maps.places.v1.IPlace[]|null); + } + + /** Represents a SearchTextResponse. */ + class SearchTextResponse implements ISearchTextResponse { + + /** + * Constructs a new SearchTextResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.maps.places.v1.ISearchTextResponse); + + /** SearchTextResponse places. */ + public places: google.maps.places.v1.IPlace[]; + + /** + * Creates a new SearchTextResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchTextResponse instance + */ + public static create(properties?: google.maps.places.v1.ISearchTextResponse): google.maps.places.v1.SearchTextResponse; + + /** + * Encodes the specified SearchTextResponse message. Does not implicitly {@link google.maps.places.v1.SearchTextResponse.verify|verify} messages. + * @param message SearchTextResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.maps.places.v1.ISearchTextResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchTextResponse message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextResponse.verify|verify} messages. + * @param message SearchTextResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.maps.places.v1.ISearchTextResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchTextResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchTextResponse + * @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.maps.places.v1.SearchTextResponse; + + /** + * Decodes a SearchTextResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchTextResponse + * @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.maps.places.v1.SearchTextResponse; + + /** + * Verifies a SearchTextResponse 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 SearchTextResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchTextResponse + */ + public static fromObject(object: { [k: string]: any }): google.maps.places.v1.SearchTextResponse; + + /** + * Creates a plain object from a SearchTextResponse message. Also converts values to other types if specified. + * @param message SearchTextResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.maps.places.v1.SearchTextResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchTextResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchTextResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7 + } + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @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.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @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.api.Http; + + /** + * Verifies a Http 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 Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @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.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @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.api.HttpRule; + + /** + * Verifies a HttpRule 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 HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @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.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @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.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern 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 CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @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.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @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.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet 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 FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (string|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** FileDescriptorProto edition. */ + public edition: string; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @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.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @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.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto 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 FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @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.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @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.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto 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 DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @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.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @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.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange 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 ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @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.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @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.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange 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 ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @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.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @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.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions 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 ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @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.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @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.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto 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 FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @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.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @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.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto 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 OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @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.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @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.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto 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 EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @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.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @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.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange 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 EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @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.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @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.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto 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 EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @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.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @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.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto 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 ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @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.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @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.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto 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 MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @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.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @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.protobuf.FileOptions; + + /** + * Verifies a FileOptions 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 FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @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.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @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.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions 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 MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @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.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @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.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions 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 FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @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.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @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.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions 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 OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @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.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @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.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions 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 EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @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.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @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.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions 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 EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @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.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @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.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions 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 ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @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.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @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.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions 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 MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @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.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @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.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption 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 UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @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.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @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.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart 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 NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @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.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @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.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo 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 SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @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.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @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.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location 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 Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @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.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @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.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo 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 GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @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.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @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.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation 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 Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } + } + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @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.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @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.protobuf.Timestamp; + + /** + * Verifies a Timestamp 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 Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } +} diff --git a/packages/google-maps-places/protos/protos.js b/packages/google-maps-places/protos/protos.js new file mode 100644 index 00000000000..27d532745b8 --- /dev/null +++ b/packages/google-maps-places/protos/protos.js @@ -0,0 +1,17941 @@ +// Copyright 2023 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. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._googlemaps_places_protos || ($protobuf.roots._googlemaps_places_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.geo = (function() { + + /** + * Namespace geo. + * @memberof google + * @namespace + */ + var geo = {}; + + geo.type = (function() { + + /** + * Namespace type. + * @memberof google.geo + * @namespace + */ + var type = {}; + + type.Viewport = (function() { + + /** + * Properties of a Viewport. + * @memberof google.geo.type + * @interface IViewport + * @property {google.type.ILatLng|null} [low] Viewport low + * @property {google.type.ILatLng|null} [high] Viewport high + */ + + /** + * Constructs a new Viewport. + * @memberof google.geo.type + * @classdesc Represents a Viewport. + * @implements IViewport + * @constructor + * @param {google.geo.type.IViewport=} [properties] Properties to set + */ + function Viewport(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]]; + } + + /** + * Viewport low. + * @member {google.type.ILatLng|null|undefined} low + * @memberof google.geo.type.Viewport + * @instance + */ + Viewport.prototype.low = null; + + /** + * Viewport high. + * @member {google.type.ILatLng|null|undefined} high + * @memberof google.geo.type.Viewport + * @instance + */ + Viewport.prototype.high = null; + + /** + * Creates a new Viewport instance using the specified properties. + * @function create + * @memberof google.geo.type.Viewport + * @static + * @param {google.geo.type.IViewport=} [properties] Properties to set + * @returns {google.geo.type.Viewport} Viewport instance + */ + Viewport.create = function create(properties) { + return new Viewport(properties); + }; + + /** + * Encodes the specified Viewport message. Does not implicitly {@link google.geo.type.Viewport.verify|verify} messages. + * @function encode + * @memberof google.geo.type.Viewport + * @static + * @param {google.geo.type.IViewport} message Viewport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Viewport.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.low != null && Object.hasOwnProperty.call(message, "low")) + $root.google.type.LatLng.encode(message.low, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.high != null && Object.hasOwnProperty.call(message, "high")) + $root.google.type.LatLng.encode(message.high, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Viewport message, length delimited. Does not implicitly {@link google.geo.type.Viewport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.geo.type.Viewport + * @static + * @param {google.geo.type.IViewport} message Viewport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Viewport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Viewport message from the specified reader or buffer. + * @function decode + * @memberof google.geo.type.Viewport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.geo.type.Viewport} Viewport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Viewport.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.geo.type.Viewport(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.low = $root.google.type.LatLng.decode(reader, reader.uint32()); + break; + } + case 2: { + message.high = $root.google.type.LatLng.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Viewport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.geo.type.Viewport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.geo.type.Viewport} Viewport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Viewport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Viewport message. + * @function verify + * @memberof google.geo.type.Viewport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Viewport.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.low != null && message.hasOwnProperty("low")) { + var error = $root.google.type.LatLng.verify(message.low); + if (error) + return "low." + error; + } + if (message.high != null && message.hasOwnProperty("high")) { + var error = $root.google.type.LatLng.verify(message.high); + if (error) + return "high." + error; + } + return null; + }; + + /** + * Creates a Viewport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.geo.type.Viewport + * @static + * @param {Object.} object Plain object + * @returns {google.geo.type.Viewport} Viewport + */ + Viewport.fromObject = function fromObject(object) { + if (object instanceof $root.google.geo.type.Viewport) + return object; + var message = new $root.google.geo.type.Viewport(); + if (object.low != null) { + if (typeof object.low !== "object") + throw TypeError(".google.geo.type.Viewport.low: object expected"); + message.low = $root.google.type.LatLng.fromObject(object.low); + } + if (object.high != null) { + if (typeof object.high !== "object") + throw TypeError(".google.geo.type.Viewport.high: object expected"); + message.high = $root.google.type.LatLng.fromObject(object.high); + } + return message; + }; + + /** + * Creates a plain object from a Viewport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.geo.type.Viewport + * @static + * @param {google.geo.type.Viewport} message Viewport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Viewport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.low = null; + object.high = null; + } + if (message.low != null && message.hasOwnProperty("low")) + object.low = $root.google.type.LatLng.toObject(message.low, options); + if (message.high != null && message.hasOwnProperty("high")) + object.high = $root.google.type.LatLng.toObject(message.high, options); + return object; + }; + + /** + * Converts this Viewport to JSON. + * @function toJSON + * @memberof google.geo.type.Viewport + * @instance + * @returns {Object.} JSON object + */ + Viewport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Viewport + * @function getTypeUrl + * @memberof google.geo.type.Viewport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Viewport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.geo.type.Viewport"; + }; + + return Viewport; + })(); + + return type; + })(); + + return geo; + })(); + + google.type = (function() { + + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; + + type.LatLng = (function() { + + /** + * Properties of a LatLng. + * @memberof google.type + * @interface ILatLng + * @property {number|null} [latitude] LatLng latitude + * @property {number|null} [longitude] LatLng longitude + */ + + /** + * Constructs a new LatLng. + * @memberof google.type + * @classdesc Represents a LatLng. + * @implements ILatLng + * @constructor + * @param {google.type.ILatLng=} [properties] Properties to set + */ + function LatLng(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]]; + } + + /** + * LatLng latitude. + * @member {number} latitude + * @memberof google.type.LatLng + * @instance + */ + LatLng.prototype.latitude = 0; + + /** + * LatLng longitude. + * @member {number} longitude + * @memberof google.type.LatLng + * @instance + */ + LatLng.prototype.longitude = 0; + + /** + * Creates a new LatLng instance using the specified properties. + * @function create + * @memberof google.type.LatLng + * @static + * @param {google.type.ILatLng=} [properties] Properties to set + * @returns {google.type.LatLng} LatLng instance + */ + LatLng.create = function create(properties) { + return new LatLng(properties); + }; + + /** + * Encodes the specified LatLng message. Does not implicitly {@link google.type.LatLng.verify|verify} messages. + * @function encode + * @memberof google.type.LatLng + * @static + * @param {google.type.ILatLng} message LatLng message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LatLng.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.latitude != null && Object.hasOwnProperty.call(message, "latitude")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.latitude); + if (message.longitude != null && Object.hasOwnProperty.call(message, "longitude")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.longitude); + return writer; + }; + + /** + * Encodes the specified LatLng message, length delimited. Does not implicitly {@link google.type.LatLng.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.LatLng + * @static + * @param {google.type.ILatLng} message LatLng message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LatLng.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LatLng message from the specified reader or buffer. + * @function decode + * @memberof google.type.LatLng + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.LatLng} LatLng + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LatLng.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.LatLng(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.latitude = reader.double(); + break; + } + case 2: { + message.longitude = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LatLng message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.LatLng + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.LatLng} LatLng + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LatLng.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LatLng message. + * @function verify + * @memberof google.type.LatLng + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LatLng.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.latitude != null && message.hasOwnProperty("latitude")) + if (typeof message.latitude !== "number") + return "latitude: number expected"; + if (message.longitude != null && message.hasOwnProperty("longitude")) + if (typeof message.longitude !== "number") + return "longitude: number expected"; + return null; + }; + + /** + * Creates a LatLng message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.LatLng + * @static + * @param {Object.} object Plain object + * @returns {google.type.LatLng} LatLng + */ + LatLng.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.LatLng) + return object; + var message = new $root.google.type.LatLng(); + if (object.latitude != null) + message.latitude = Number(object.latitude); + if (object.longitude != null) + message.longitude = Number(object.longitude); + return message; + }; + + /** + * Creates a plain object from a LatLng message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.LatLng + * @static + * @param {google.type.LatLng} message LatLng + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LatLng.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.latitude = 0; + object.longitude = 0; + } + if (message.latitude != null && message.hasOwnProperty("latitude")) + object.latitude = options.json && !isFinite(message.latitude) ? String(message.latitude) : message.latitude; + if (message.longitude != null && message.hasOwnProperty("longitude")) + object.longitude = options.json && !isFinite(message.longitude) ? String(message.longitude) : message.longitude; + return object; + }; + + /** + * Converts this LatLng to JSON. + * @function toJSON + * @memberof google.type.LatLng + * @instance + * @returns {Object.} JSON object + */ + LatLng.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LatLng + * @function getTypeUrl + * @memberof google.type.LatLng + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LatLng.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.LatLng"; + }; + + return LatLng; + })(); + + type.Date = (function() { + + /** + * Properties of a Date. + * @memberof google.type + * @interface IDate + * @property {number|null} [year] Date year + * @property {number|null} [month] Date month + * @property {number|null} [day] Date day + */ + + /** + * Constructs a new Date. + * @memberof google.type + * @classdesc Represents a Date. + * @implements IDate + * @constructor + * @param {google.type.IDate=} [properties] Properties to set + */ + function Date(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]]; + } + + /** + * Date year. + * @member {number} year + * @memberof google.type.Date + * @instance + */ + Date.prototype.year = 0; + + /** + * Date month. + * @member {number} month + * @memberof google.type.Date + * @instance + */ + Date.prototype.month = 0; + + /** + * Date day. + * @member {number} day + * @memberof google.type.Date + * @instance + */ + Date.prototype.day = 0; + + /** + * Creates a new Date instance using the specified properties. + * @function create + * @memberof google.type.Date + * @static + * @param {google.type.IDate=} [properties] Properties to set + * @returns {google.type.Date} Date instance + */ + Date.create = function create(properties) { + return new Date(properties); + }; + + /** + * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @function encode + * @memberof google.type.Date + * @static + * @param {google.type.IDate} message Date message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Date.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.year != null && Object.hasOwnProperty.call(message, "year")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.year); + if (message.month != null && Object.hasOwnProperty.call(message, "month")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.month); + if (message.day != null && Object.hasOwnProperty.call(message, "day")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.day); + return writer; + }; + + /** + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.Date + * @static + * @param {google.type.IDate} message Date message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Date.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Date message from the specified reader or buffer. + * @function decode + * @memberof google.type.Date + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.Date} Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Date.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Date(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.year = reader.int32(); + break; + } + case 2: { + message.month = reader.int32(); + break; + } + case 3: { + message.day = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Date message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.Date + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.Date} Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Date.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Date message. + * @function verify + * @memberof google.type.Date + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Date.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.year != null && message.hasOwnProperty("year")) + if (!$util.isInteger(message.year)) + return "year: integer expected"; + if (message.month != null && message.hasOwnProperty("month")) + if (!$util.isInteger(message.month)) + return "month: integer expected"; + if (message.day != null && message.hasOwnProperty("day")) + if (!$util.isInteger(message.day)) + return "day: integer expected"; + return null; + }; + + /** + * Creates a Date message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.Date + * @static + * @param {Object.} object Plain object + * @returns {google.type.Date} Date + */ + Date.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.Date) + return object; + var message = new $root.google.type.Date(); + if (object.year != null) + message.year = object.year | 0; + if (object.month != null) + message.month = object.month | 0; + if (object.day != null) + message.day = object.day | 0; + return message; + }; + + /** + * Creates a plain object from a Date message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.Date + * @static + * @param {google.type.Date} message Date + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Date.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.year = 0; + object.month = 0; + object.day = 0; + } + if (message.year != null && message.hasOwnProperty("year")) + object.year = message.year; + if (message.month != null && message.hasOwnProperty("month")) + object.month = message.month; + if (message.day != null && message.hasOwnProperty("day")) + object.day = message.day; + return object; + }; + + /** + * Converts this Date to JSON. + * @function toJSON + * @memberof google.type.Date + * @instance + * @returns {Object.} JSON object + */ + Date.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Date + * @function getTypeUrl + * @memberof google.type.Date + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Date.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.Date"; + }; + + return Date; + })(); + + type.LocalizedText = (function() { + + /** + * Properties of a LocalizedText. + * @memberof google.type + * @interface ILocalizedText + * @property {string|null} [text] LocalizedText text + * @property {string|null} [languageCode] LocalizedText languageCode + */ + + /** + * Constructs a new LocalizedText. + * @memberof google.type + * @classdesc Represents a LocalizedText. + * @implements ILocalizedText + * @constructor + * @param {google.type.ILocalizedText=} [properties] Properties to set + */ + function LocalizedText(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]]; + } + + /** + * LocalizedText text. + * @member {string} text + * @memberof google.type.LocalizedText + * @instance + */ + LocalizedText.prototype.text = ""; + + /** + * LocalizedText languageCode. + * @member {string} languageCode + * @memberof google.type.LocalizedText + * @instance + */ + LocalizedText.prototype.languageCode = ""; + + /** + * Creates a new LocalizedText instance using the specified properties. + * @function create + * @memberof google.type.LocalizedText + * @static + * @param {google.type.ILocalizedText=} [properties] Properties to set + * @returns {google.type.LocalizedText} LocalizedText instance + */ + LocalizedText.create = function create(properties) { + return new LocalizedText(properties); + }; + + /** + * Encodes the specified LocalizedText message. Does not implicitly {@link google.type.LocalizedText.verify|verify} messages. + * @function encode + * @memberof google.type.LocalizedText + * @static + * @param {google.type.ILocalizedText} message LocalizedText message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocalizedText.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + return writer; + }; + + /** + * Encodes the specified LocalizedText message, length delimited. Does not implicitly {@link google.type.LocalizedText.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.LocalizedText + * @static + * @param {google.type.ILocalizedText} message LocalizedText message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocalizedText.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LocalizedText message from the specified reader or buffer. + * @function decode + * @memberof google.type.LocalizedText + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.LocalizedText} LocalizedText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocalizedText.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.LocalizedText(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.text = reader.string(); + break; + } + case 2: { + message.languageCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LocalizedText message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.LocalizedText + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.LocalizedText} LocalizedText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocalizedText.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LocalizedText message. + * @function verify + * @memberof google.type.LocalizedText + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LocalizedText.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + return null; + }; + + /** + * Creates a LocalizedText message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.LocalizedText + * @static + * @param {Object.} object Plain object + * @returns {google.type.LocalizedText} LocalizedText + */ + LocalizedText.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.LocalizedText) + return object; + var message = new $root.google.type.LocalizedText(); + if (object.text != null) + message.text = String(object.text); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + return message; + }; + + /** + * Creates a plain object from a LocalizedText message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.LocalizedText + * @static + * @param {google.type.LocalizedText} message LocalizedText + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LocalizedText.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.text = ""; + object.languageCode = ""; + } + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + return object; + }; + + /** + * Converts this LocalizedText to JSON. + * @function toJSON + * @memberof google.type.LocalizedText + * @instance + * @returns {Object.} JSON object + */ + LocalizedText.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LocalizedText + * @function getTypeUrl + * @memberof google.type.LocalizedText + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LocalizedText.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.LocalizedText"; + }; + + return LocalizedText; + })(); + + return type; + })(); + + google.maps = (function() { + + /** + * Namespace maps. + * @memberof google + * @namespace + */ + var maps = {}; + + maps.places = (function() { + + /** + * Namespace places. + * @memberof google.maps + * @namespace + */ + var places = {}; + + places.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.maps.places + * @namespace + */ + var v1 = {}; + + v1.Circle = (function() { + + /** + * Properties of a Circle. + * @memberof google.maps.places.v1 + * @interface ICircle + * @property {google.type.ILatLng|null} [center] Circle center + * @property {number|null} [radius] Circle radius + */ + + /** + * Constructs a new Circle. + * @memberof google.maps.places.v1 + * @classdesc Represents a Circle. + * @implements ICircle + * @constructor + * @param {google.maps.places.v1.ICircle=} [properties] Properties to set + */ + function Circle(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]]; + } + + /** + * Circle center. + * @member {google.type.ILatLng|null|undefined} center + * @memberof google.maps.places.v1.Circle + * @instance + */ + Circle.prototype.center = null; + + /** + * Circle radius. + * @member {number} radius + * @memberof google.maps.places.v1.Circle + * @instance + */ + Circle.prototype.radius = 0; + + /** + * Creates a new Circle instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Circle + * @static + * @param {google.maps.places.v1.ICircle=} [properties] Properties to set + * @returns {google.maps.places.v1.Circle} Circle instance + */ + Circle.create = function create(properties) { + return new Circle(properties); + }; + + /** + * Encodes the specified Circle message. Does not implicitly {@link google.maps.places.v1.Circle.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Circle + * @static + * @param {google.maps.places.v1.ICircle} message Circle message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Circle.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.center != null && Object.hasOwnProperty.call(message, "center")) + $root.google.type.LatLng.encode(message.center, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.radius != null && Object.hasOwnProperty.call(message, "radius")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.radius); + return writer; + }; + + /** + * Encodes the specified Circle message, length delimited. Does not implicitly {@link google.maps.places.v1.Circle.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Circle + * @static + * @param {google.maps.places.v1.ICircle} message Circle message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Circle.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Circle message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Circle + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Circle} Circle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Circle.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Circle(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.center = $root.google.type.LatLng.decode(reader, reader.uint32()); + break; + } + case 2: { + message.radius = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Circle message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Circle + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Circle} Circle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Circle.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Circle message. + * @function verify + * @memberof google.maps.places.v1.Circle + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Circle.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.center != null && message.hasOwnProperty("center")) { + var error = $root.google.type.LatLng.verify(message.center); + if (error) + return "center." + error; + } + if (message.radius != null && message.hasOwnProperty("radius")) + if (typeof message.radius !== "number") + return "radius: number expected"; + return null; + }; + + /** + * Creates a Circle message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Circle + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Circle} Circle + */ + Circle.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Circle) + return object; + var message = new $root.google.maps.places.v1.Circle(); + if (object.center != null) { + if (typeof object.center !== "object") + throw TypeError(".google.maps.places.v1.Circle.center: object expected"); + message.center = $root.google.type.LatLng.fromObject(object.center); + } + if (object.radius != null) + message.radius = Number(object.radius); + return message; + }; + + /** + * Creates a plain object from a Circle message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Circle + * @static + * @param {google.maps.places.v1.Circle} message Circle + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Circle.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.center = null; + object.radius = 0; + } + if (message.center != null && message.hasOwnProperty("center")) + object.center = $root.google.type.LatLng.toObject(message.center, options); + if (message.radius != null && message.hasOwnProperty("radius")) + object.radius = options.json && !isFinite(message.radius) ? String(message.radius) : message.radius; + return object; + }; + + /** + * Converts this Circle to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Circle + * @instance + * @returns {Object.} JSON object + */ + Circle.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Circle + * @function getTypeUrl + * @memberof google.maps.places.v1.Circle + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Circle.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Circle"; + }; + + return Circle; + })(); + + v1.Place = (function() { + + /** + * Properties of a Place. + * @memberof google.maps.places.v1 + * @interface IPlace + * @property {string|null} [id] Place id + * @property {google.type.ILocalizedText|null} [displayName] Place displayName + * @property {Array.|null} [types] Place types + * @property {string|null} [nationalPhoneNumber] Place nationalPhoneNumber + * @property {string|null} [internationalPhoneNumber] Place internationalPhoneNumber + * @property {string|null} [formattedAddress] Place formattedAddress + * @property {Array.|null} [addressComponents] Place addressComponents + * @property {google.maps.places.v1.Place.IPlusCode|null} [plusCode] Place plusCode + * @property {google.type.ILatLng|null} [location] Place location + * @property {google.geo.type.IViewport|null} [viewport] Place viewport + * @property {number|null} [rating] Place rating + * @property {string|null} [googleMapsUri] Place googleMapsUri + * @property {string|null} [websiteUri] Place websiteUri + * @property {Array.|null} [reviews] Place reviews + * @property {google.maps.places.v1.Place.IOpeningHours|null} [openingHours] Place openingHours + * @property {number|null} [utcOffsetMinutes] Place utcOffsetMinutes + * @property {string|null} [adrFormatAddress] Place adrFormatAddress + * @property {google.maps.places.v1.Place.BusinessStatus|null} [businessStatus] Place businessStatus + * @property {google.maps.places.v1.PriceLevel|null} [priceLevel] Place priceLevel + * @property {Array.|null} [attributions] Place attributions + * @property {number|null} [userRatingCount] Place userRatingCount + * @property {string|null} [iconMaskBaseUri] Place iconMaskBaseUri + * @property {string|null} [iconBackgroundColor] Place iconBackgroundColor + * @property {boolean|null} [takeout] Place takeout + * @property {boolean|null} [delivery] Place delivery + * @property {boolean|null} [dineIn] Place dineIn + * @property {boolean|null} [curbsidePickup] Place curbsidePickup + * @property {boolean|null} [wheelchairAccessibleEntrance] Place wheelchairAccessibleEntrance + * @property {boolean|null} [reservable] Place reservable + * @property {boolean|null} [servesBreakfast] Place servesBreakfast + * @property {boolean|null} [servesLunch] Place servesLunch + * @property {boolean|null} [servesDinner] Place servesDinner + * @property {boolean|null} [servesBeer] Place servesBeer + * @property {boolean|null} [servesWine] Place servesWine + * @property {boolean|null} [servesBrunch] Place servesBrunch + * @property {boolean|null} [servesVegetarianFood] Place servesVegetarianFood + * @property {google.maps.places.v1.Place.IOpeningHours|null} [currentOpeningHours] Place currentOpeningHours + * @property {Array.|null} [currentSecondaryOpeningHours] Place currentSecondaryOpeningHours + * @property {Array.|null} [secondaryOpeningHours] Place secondaryOpeningHours + * @property {google.maps.places.v1.Place.IEditorialSummary|null} [editorialSummary] Place editorialSummary + */ + + /** + * Constructs a new Place. + * @memberof google.maps.places.v1 + * @classdesc Represents a Place. + * @implements IPlace + * @constructor + * @param {google.maps.places.v1.IPlace=} [properties] Properties to set + */ + function Place(properties) { + this.types = []; + this.addressComponents = []; + this.reviews = []; + this.attributions = []; + this.currentSecondaryOpeningHours = []; + this.secondaryOpeningHours = []; + 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]]; + } + + /** + * Place id. + * @member {string} id + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.id = ""; + + /** + * Place displayName. + * @member {google.type.ILocalizedText|null|undefined} displayName + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.displayName = null; + + /** + * Place types. + * @member {Array.} types + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.types = $util.emptyArray; + + /** + * Place nationalPhoneNumber. + * @member {string} nationalPhoneNumber + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.nationalPhoneNumber = ""; + + /** + * Place internationalPhoneNumber. + * @member {string} internationalPhoneNumber + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.internationalPhoneNumber = ""; + + /** + * Place formattedAddress. + * @member {string} formattedAddress + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.formattedAddress = ""; + + /** + * Place addressComponents. + * @member {Array.} addressComponents + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.addressComponents = $util.emptyArray; + + /** + * Place plusCode. + * @member {google.maps.places.v1.Place.IPlusCode|null|undefined} plusCode + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.plusCode = null; + + /** + * Place location. + * @member {google.type.ILatLng|null|undefined} location + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.location = null; + + /** + * Place viewport. + * @member {google.geo.type.IViewport|null|undefined} viewport + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.viewport = null; + + /** + * Place rating. + * @member {number} rating + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.rating = 0; + + /** + * Place googleMapsUri. + * @member {string} googleMapsUri + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.googleMapsUri = ""; + + /** + * Place websiteUri. + * @member {string} websiteUri + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.websiteUri = ""; + + /** + * Place reviews. + * @member {Array.} reviews + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.reviews = $util.emptyArray; + + /** + * Place openingHours. + * @member {google.maps.places.v1.Place.IOpeningHours|null|undefined} openingHours + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.openingHours = null; + + /** + * Place utcOffsetMinutes. + * @member {number} utcOffsetMinutes + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.utcOffsetMinutes = 0; + + /** + * Place adrFormatAddress. + * @member {string} adrFormatAddress + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.adrFormatAddress = ""; + + /** + * Place businessStatus. + * @member {google.maps.places.v1.Place.BusinessStatus} businessStatus + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.businessStatus = 0; + + /** + * Place priceLevel. + * @member {google.maps.places.v1.PriceLevel} priceLevel + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.priceLevel = 0; + + /** + * Place attributions. + * @member {Array.} attributions + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.attributions = $util.emptyArray; + + /** + * Place userRatingCount. + * @member {number} userRatingCount + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.userRatingCount = 0; + + /** + * Place iconMaskBaseUri. + * @member {string} iconMaskBaseUri + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.iconMaskBaseUri = ""; + + /** + * Place iconBackgroundColor. + * @member {string} iconBackgroundColor + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.iconBackgroundColor = ""; + + /** + * Place takeout. + * @member {boolean|null|undefined} takeout + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.takeout = null; + + /** + * Place delivery. + * @member {boolean|null|undefined} delivery + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.delivery = null; + + /** + * Place dineIn. + * @member {boolean|null|undefined} dineIn + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.dineIn = null; + + /** + * Place curbsidePickup. + * @member {boolean|null|undefined} curbsidePickup + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.curbsidePickup = null; + + /** + * Place wheelchairAccessibleEntrance. + * @member {boolean|null|undefined} wheelchairAccessibleEntrance + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.wheelchairAccessibleEntrance = null; + + /** + * Place reservable. + * @member {boolean|null|undefined} reservable + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.reservable = null; + + /** + * Place servesBreakfast. + * @member {boolean|null|undefined} servesBreakfast + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.servesBreakfast = null; + + /** + * Place servesLunch. + * @member {boolean|null|undefined} servesLunch + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.servesLunch = null; + + /** + * Place servesDinner. + * @member {boolean|null|undefined} servesDinner + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.servesDinner = null; + + /** + * Place servesBeer. + * @member {boolean|null|undefined} servesBeer + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.servesBeer = null; + + /** + * Place servesWine. + * @member {boolean|null|undefined} servesWine + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.servesWine = null; + + /** + * Place servesBrunch. + * @member {boolean|null|undefined} servesBrunch + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.servesBrunch = null; + + /** + * Place servesVegetarianFood. + * @member {boolean|null|undefined} servesVegetarianFood + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.servesVegetarianFood = null; + + /** + * Place currentOpeningHours. + * @member {google.maps.places.v1.Place.IOpeningHours|null|undefined} currentOpeningHours + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.currentOpeningHours = null; + + /** + * Place currentSecondaryOpeningHours. + * @member {Array.} currentSecondaryOpeningHours + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.currentSecondaryOpeningHours = $util.emptyArray; + + /** + * Place secondaryOpeningHours. + * @member {Array.} secondaryOpeningHours + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.secondaryOpeningHours = $util.emptyArray; + + /** + * Place editorialSummary. + * @member {google.maps.places.v1.Place.IEditorialSummary|null|undefined} editorialSummary + * @memberof google.maps.places.v1.Place + * @instance + */ + Place.prototype.editorialSummary = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Place _takeout. + * @member {"takeout"|undefined} _takeout + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_takeout", { + get: $util.oneOfGetter($oneOfFields = ["takeout"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _delivery. + * @member {"delivery"|undefined} _delivery + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_delivery", { + get: $util.oneOfGetter($oneOfFields = ["delivery"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _dineIn. + * @member {"dineIn"|undefined} _dineIn + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_dineIn", { + get: $util.oneOfGetter($oneOfFields = ["dineIn"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _curbsidePickup. + * @member {"curbsidePickup"|undefined} _curbsidePickup + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_curbsidePickup", { + get: $util.oneOfGetter($oneOfFields = ["curbsidePickup"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _wheelchairAccessibleEntrance. + * @member {"wheelchairAccessibleEntrance"|undefined} _wheelchairAccessibleEntrance + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_wheelchairAccessibleEntrance", { + get: $util.oneOfGetter($oneOfFields = ["wheelchairAccessibleEntrance"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _reservable. + * @member {"reservable"|undefined} _reservable + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_reservable", { + get: $util.oneOfGetter($oneOfFields = ["reservable"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _servesBreakfast. + * @member {"servesBreakfast"|undefined} _servesBreakfast + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_servesBreakfast", { + get: $util.oneOfGetter($oneOfFields = ["servesBreakfast"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _servesLunch. + * @member {"servesLunch"|undefined} _servesLunch + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_servesLunch", { + get: $util.oneOfGetter($oneOfFields = ["servesLunch"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _servesDinner. + * @member {"servesDinner"|undefined} _servesDinner + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_servesDinner", { + get: $util.oneOfGetter($oneOfFields = ["servesDinner"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _servesBeer. + * @member {"servesBeer"|undefined} _servesBeer + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_servesBeer", { + get: $util.oneOfGetter($oneOfFields = ["servesBeer"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _servesWine. + * @member {"servesWine"|undefined} _servesWine + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_servesWine", { + get: $util.oneOfGetter($oneOfFields = ["servesWine"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _servesBrunch. + * @member {"servesBrunch"|undefined} _servesBrunch + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_servesBrunch", { + get: $util.oneOfGetter($oneOfFields = ["servesBrunch"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Place _servesVegetarianFood. + * @member {"servesVegetarianFood"|undefined} _servesVegetarianFood + * @memberof google.maps.places.v1.Place + * @instance + */ + Object.defineProperty(Place.prototype, "_servesVegetarianFood", { + get: $util.oneOfGetter($oneOfFields = ["servesVegetarianFood"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Place instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place + * @static + * @param {google.maps.places.v1.IPlace=} [properties] Properties to set + * @returns {google.maps.places.v1.Place} Place instance + */ + Place.create = function create(properties) { + return new Place(properties); + }; + + /** + * Encodes the specified Place message. Does not implicitly {@link google.maps.places.v1.Place.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place + * @static + * @param {google.maps.places.v1.IPlace} message Place message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Place.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); + if (message.types != null && message.types.length) + for (var i = 0; i < message.types.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.types[i]); + if (message.nationalPhoneNumber != null && Object.hasOwnProperty.call(message, "nationalPhoneNumber")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.nationalPhoneNumber); + if (message.internationalPhoneNumber != null && Object.hasOwnProperty.call(message, "internationalPhoneNumber")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.internationalPhoneNumber); + if (message.formattedAddress != null && Object.hasOwnProperty.call(message, "formattedAddress")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.formattedAddress); + if (message.addressComponents != null && message.addressComponents.length) + for (var i = 0; i < message.addressComponents.length; ++i) + $root.google.maps.places.v1.Place.AddressComponent.encode(message.addressComponents[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.plusCode != null && Object.hasOwnProperty.call(message, "plusCode")) + $root.google.maps.places.v1.Place.PlusCode.encode(message.plusCode, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + $root.google.type.LatLng.encode(message.location, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.viewport != null && Object.hasOwnProperty.call(message, "viewport")) + $root.google.geo.type.Viewport.encode(message.viewport, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.rating != null && Object.hasOwnProperty.call(message, "rating")) + writer.uint32(/* id 14, wireType 1 =*/113).double(message.rating); + if (message.googleMapsUri != null && Object.hasOwnProperty.call(message, "googleMapsUri")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.googleMapsUri); + if (message.websiteUri != null && Object.hasOwnProperty.call(message, "websiteUri")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.websiteUri); + if (message.reviews != null && message.reviews.length) + for (var i = 0; i < message.reviews.length; ++i) + $root.google.maps.places.v1.Place.Review.encode(message.reviews[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.openingHours != null && Object.hasOwnProperty.call(message, "openingHours")) + $root.google.maps.places.v1.Place.OpeningHours.encode(message.openingHours, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.utcOffsetMinutes != null && Object.hasOwnProperty.call(message, "utcOffsetMinutes")) + writer.uint32(/* id 22, wireType 0 =*/176).int32(message.utcOffsetMinutes); + if (message.adrFormatAddress != null && Object.hasOwnProperty.call(message, "adrFormatAddress")) + writer.uint32(/* id 24, wireType 2 =*/194).string(message.adrFormatAddress); + if (message.businessStatus != null && Object.hasOwnProperty.call(message, "businessStatus")) + writer.uint32(/* id 25, wireType 0 =*/200).int32(message.businessStatus); + if (message.priceLevel != null && Object.hasOwnProperty.call(message, "priceLevel")) + writer.uint32(/* id 26, wireType 0 =*/208).int32(message.priceLevel); + if (message.attributions != null && message.attributions.length) + for (var i = 0; i < message.attributions.length; ++i) + $root.google.maps.places.v1.Place.Attribution.encode(message.attributions[i], writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.userRatingCount != null && Object.hasOwnProperty.call(message, "userRatingCount")) + writer.uint32(/* id 28, wireType 0 =*/224).int32(message.userRatingCount); + if (message.iconMaskBaseUri != null && Object.hasOwnProperty.call(message, "iconMaskBaseUri")) + writer.uint32(/* id 29, wireType 2 =*/234).string(message.iconMaskBaseUri); + if (message.iconBackgroundColor != null && Object.hasOwnProperty.call(message, "iconBackgroundColor")) + writer.uint32(/* id 30, wireType 2 =*/242).string(message.iconBackgroundColor); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + $root.google.type.LocalizedText.encode(message.displayName, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); + if (message.takeout != null && Object.hasOwnProperty.call(message, "takeout")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.takeout); + if (message.delivery != null && Object.hasOwnProperty.call(message, "delivery")) + writer.uint32(/* id 34, wireType 0 =*/272).bool(message.delivery); + if (message.dineIn != null && Object.hasOwnProperty.call(message, "dineIn")) + writer.uint32(/* id 35, wireType 0 =*/280).bool(message.dineIn); + if (message.curbsidePickup != null && Object.hasOwnProperty.call(message, "curbsidePickup")) + writer.uint32(/* id 36, wireType 0 =*/288).bool(message.curbsidePickup); + if (message.wheelchairAccessibleEntrance != null && Object.hasOwnProperty.call(message, "wheelchairAccessibleEntrance")) + writer.uint32(/* id 37, wireType 0 =*/296).bool(message.wheelchairAccessibleEntrance); + if (message.reservable != null && Object.hasOwnProperty.call(message, "reservable")) + writer.uint32(/* id 38, wireType 0 =*/304).bool(message.reservable); + if (message.servesBreakfast != null && Object.hasOwnProperty.call(message, "servesBreakfast")) + writer.uint32(/* id 39, wireType 0 =*/312).bool(message.servesBreakfast); + if (message.servesLunch != null && Object.hasOwnProperty.call(message, "servesLunch")) + writer.uint32(/* id 40, wireType 0 =*/320).bool(message.servesLunch); + if (message.servesDinner != null && Object.hasOwnProperty.call(message, "servesDinner")) + writer.uint32(/* id 41, wireType 0 =*/328).bool(message.servesDinner); + if (message.servesBeer != null && Object.hasOwnProperty.call(message, "servesBeer")) + writer.uint32(/* id 42, wireType 0 =*/336).bool(message.servesBeer); + if (message.servesWine != null && Object.hasOwnProperty.call(message, "servesWine")) + writer.uint32(/* id 43, wireType 0 =*/344).bool(message.servesWine); + if (message.servesBrunch != null && Object.hasOwnProperty.call(message, "servesBrunch")) + writer.uint32(/* id 44, wireType 0 =*/352).bool(message.servesBrunch); + if (message.servesVegetarianFood != null && Object.hasOwnProperty.call(message, "servesVegetarianFood")) + writer.uint32(/* id 45, wireType 0 =*/360).bool(message.servesVegetarianFood); + if (message.currentOpeningHours != null && Object.hasOwnProperty.call(message, "currentOpeningHours")) + $root.google.maps.places.v1.Place.OpeningHours.encode(message.currentOpeningHours, writer.uint32(/* id 46, wireType 2 =*/370).fork()).ldelim(); + if (message.currentSecondaryOpeningHours != null && message.currentSecondaryOpeningHours.length) + for (var i = 0; i < message.currentSecondaryOpeningHours.length; ++i) + $root.google.maps.places.v1.Place.OpeningHours.encode(message.currentSecondaryOpeningHours[i], writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim(); + if (message.editorialSummary != null && Object.hasOwnProperty.call(message, "editorialSummary")) + $root.google.maps.places.v1.Place.EditorialSummary.encode(message.editorialSummary, writer.uint32(/* id 48, wireType 2 =*/386).fork()).ldelim(); + if (message.secondaryOpeningHours != null && message.secondaryOpeningHours.length) + for (var i = 0; i < message.secondaryOpeningHours.length; ++i) + $root.google.maps.places.v1.Place.OpeningHours.encode(message.secondaryOpeningHours[i], writer.uint32(/* id 49, wireType 2 =*/394).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Place message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place + * @static + * @param {google.maps.places.v1.IPlace} message Place message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Place.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Place message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place} Place + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Place.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.id = reader.string(); + break; + } + case 31: { + message.displayName = $root.google.type.LocalizedText.decode(reader, reader.uint32()); + break; + } + case 5: { + if (!(message.types && message.types.length)) + message.types = []; + message.types.push(reader.string()); + break; + } + case 7: { + message.nationalPhoneNumber = reader.string(); + break; + } + case 8: { + message.internationalPhoneNumber = reader.string(); + break; + } + case 9: { + message.formattedAddress = reader.string(); + break; + } + case 10: { + if (!(message.addressComponents && message.addressComponents.length)) + message.addressComponents = []; + message.addressComponents.push($root.google.maps.places.v1.Place.AddressComponent.decode(reader, reader.uint32())); + break; + } + case 11: { + message.plusCode = $root.google.maps.places.v1.Place.PlusCode.decode(reader, reader.uint32()); + break; + } + case 12: { + message.location = $root.google.type.LatLng.decode(reader, reader.uint32()); + break; + } + case 13: { + message.viewport = $root.google.geo.type.Viewport.decode(reader, reader.uint32()); + break; + } + case 14: { + message.rating = reader.double(); + break; + } + case 15: { + message.googleMapsUri = reader.string(); + break; + } + case 16: { + message.websiteUri = reader.string(); + break; + } + case 20: { + if (!(message.reviews && message.reviews.length)) + message.reviews = []; + message.reviews.push($root.google.maps.places.v1.Place.Review.decode(reader, reader.uint32())); + break; + } + case 21: { + message.openingHours = $root.google.maps.places.v1.Place.OpeningHours.decode(reader, reader.uint32()); + break; + } + case 22: { + message.utcOffsetMinutes = reader.int32(); + break; + } + case 24: { + message.adrFormatAddress = reader.string(); + break; + } + case 25: { + message.businessStatus = reader.int32(); + break; + } + case 26: { + message.priceLevel = reader.int32(); + break; + } + case 27: { + if (!(message.attributions && message.attributions.length)) + message.attributions = []; + message.attributions.push($root.google.maps.places.v1.Place.Attribution.decode(reader, reader.uint32())); + break; + } + case 28: { + message.userRatingCount = reader.int32(); + break; + } + case 29: { + message.iconMaskBaseUri = reader.string(); + break; + } + case 30: { + message.iconBackgroundColor = reader.string(); + break; + } + case 33: { + message.takeout = reader.bool(); + break; + } + case 34: { + message.delivery = reader.bool(); + break; + } + case 35: { + message.dineIn = reader.bool(); + break; + } + case 36: { + message.curbsidePickup = reader.bool(); + break; + } + case 37: { + message.wheelchairAccessibleEntrance = reader.bool(); + break; + } + case 38: { + message.reservable = reader.bool(); + break; + } + case 39: { + message.servesBreakfast = reader.bool(); + break; + } + case 40: { + message.servesLunch = reader.bool(); + break; + } + case 41: { + message.servesDinner = reader.bool(); + break; + } + case 42: { + message.servesBeer = reader.bool(); + break; + } + case 43: { + message.servesWine = reader.bool(); + break; + } + case 44: { + message.servesBrunch = reader.bool(); + break; + } + case 45: { + message.servesVegetarianFood = reader.bool(); + break; + } + case 46: { + message.currentOpeningHours = $root.google.maps.places.v1.Place.OpeningHours.decode(reader, reader.uint32()); + break; + } + case 47: { + if (!(message.currentSecondaryOpeningHours && message.currentSecondaryOpeningHours.length)) + message.currentSecondaryOpeningHours = []; + message.currentSecondaryOpeningHours.push($root.google.maps.places.v1.Place.OpeningHours.decode(reader, reader.uint32())); + break; + } + case 49: { + if (!(message.secondaryOpeningHours && message.secondaryOpeningHours.length)) + message.secondaryOpeningHours = []; + message.secondaryOpeningHours.push($root.google.maps.places.v1.Place.OpeningHours.decode(reader, reader.uint32())); + break; + } + case 48: { + message.editorialSummary = $root.google.maps.places.v1.Place.EditorialSummary.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Place message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place} Place + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Place.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Place message. + * @function verify + * @memberof google.maps.places.v1.Place + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Place.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) { + var error = $root.google.type.LocalizedText.verify(message.displayName); + if (error) + return "displayName." + error; + } + if (message.types != null && message.hasOwnProperty("types")) { + if (!Array.isArray(message.types)) + return "types: array expected"; + for (var i = 0; i < message.types.length; ++i) + if (!$util.isString(message.types[i])) + return "types: string[] expected"; + } + if (message.nationalPhoneNumber != null && message.hasOwnProperty("nationalPhoneNumber")) + if (!$util.isString(message.nationalPhoneNumber)) + return "nationalPhoneNumber: string expected"; + if (message.internationalPhoneNumber != null && message.hasOwnProperty("internationalPhoneNumber")) + if (!$util.isString(message.internationalPhoneNumber)) + return "internationalPhoneNumber: string expected"; + if (message.formattedAddress != null && message.hasOwnProperty("formattedAddress")) + if (!$util.isString(message.formattedAddress)) + return "formattedAddress: string expected"; + if (message.addressComponents != null && message.hasOwnProperty("addressComponents")) { + if (!Array.isArray(message.addressComponents)) + return "addressComponents: array expected"; + for (var i = 0; i < message.addressComponents.length; ++i) { + var error = $root.google.maps.places.v1.Place.AddressComponent.verify(message.addressComponents[i]); + if (error) + return "addressComponents." + error; + } + } + if (message.plusCode != null && message.hasOwnProperty("plusCode")) { + var error = $root.google.maps.places.v1.Place.PlusCode.verify(message.plusCode); + if (error) + return "plusCode." + error; + } + if (message.location != null && message.hasOwnProperty("location")) { + var error = $root.google.type.LatLng.verify(message.location); + if (error) + return "location." + error; + } + if (message.viewport != null && message.hasOwnProperty("viewport")) { + var error = $root.google.geo.type.Viewport.verify(message.viewport); + if (error) + return "viewport." + error; + } + if (message.rating != null && message.hasOwnProperty("rating")) + if (typeof message.rating !== "number") + return "rating: number expected"; + if (message.googleMapsUri != null && message.hasOwnProperty("googleMapsUri")) + if (!$util.isString(message.googleMapsUri)) + return "googleMapsUri: string expected"; + if (message.websiteUri != null && message.hasOwnProperty("websiteUri")) + if (!$util.isString(message.websiteUri)) + return "websiteUri: string expected"; + if (message.reviews != null && message.hasOwnProperty("reviews")) { + if (!Array.isArray(message.reviews)) + return "reviews: array expected"; + for (var i = 0; i < message.reviews.length; ++i) { + var error = $root.google.maps.places.v1.Place.Review.verify(message.reviews[i]); + if (error) + return "reviews." + error; + } + } + if (message.openingHours != null && message.hasOwnProperty("openingHours")) { + var error = $root.google.maps.places.v1.Place.OpeningHours.verify(message.openingHours); + if (error) + return "openingHours." + error; + } + if (message.utcOffsetMinutes != null && message.hasOwnProperty("utcOffsetMinutes")) + if (!$util.isInteger(message.utcOffsetMinutes)) + return "utcOffsetMinutes: integer expected"; + if (message.adrFormatAddress != null && message.hasOwnProperty("adrFormatAddress")) + if (!$util.isString(message.adrFormatAddress)) + return "adrFormatAddress: string expected"; + if (message.businessStatus != null && message.hasOwnProperty("businessStatus")) + switch (message.businessStatus) { + default: + return "businessStatus: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.priceLevel != null && message.hasOwnProperty("priceLevel")) + switch (message.priceLevel) { + default: + return "priceLevel: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.attributions != null && message.hasOwnProperty("attributions")) { + if (!Array.isArray(message.attributions)) + return "attributions: array expected"; + for (var i = 0; i < message.attributions.length; ++i) { + var error = $root.google.maps.places.v1.Place.Attribution.verify(message.attributions[i]); + if (error) + return "attributions." + error; + } + } + if (message.userRatingCount != null && message.hasOwnProperty("userRatingCount")) + if (!$util.isInteger(message.userRatingCount)) + return "userRatingCount: integer expected"; + if (message.iconMaskBaseUri != null && message.hasOwnProperty("iconMaskBaseUri")) + if (!$util.isString(message.iconMaskBaseUri)) + return "iconMaskBaseUri: string expected"; + if (message.iconBackgroundColor != null && message.hasOwnProperty("iconBackgroundColor")) + if (!$util.isString(message.iconBackgroundColor)) + return "iconBackgroundColor: string expected"; + if (message.takeout != null && message.hasOwnProperty("takeout")) { + properties._takeout = 1; + if (typeof message.takeout !== "boolean") + return "takeout: boolean expected"; + } + if (message.delivery != null && message.hasOwnProperty("delivery")) { + properties._delivery = 1; + if (typeof message.delivery !== "boolean") + return "delivery: boolean expected"; + } + if (message.dineIn != null && message.hasOwnProperty("dineIn")) { + properties._dineIn = 1; + if (typeof message.dineIn !== "boolean") + return "dineIn: boolean expected"; + } + if (message.curbsidePickup != null && message.hasOwnProperty("curbsidePickup")) { + properties._curbsidePickup = 1; + if (typeof message.curbsidePickup !== "boolean") + return "curbsidePickup: boolean expected"; + } + if (message.wheelchairAccessibleEntrance != null && message.hasOwnProperty("wheelchairAccessibleEntrance")) { + properties._wheelchairAccessibleEntrance = 1; + if (typeof message.wheelchairAccessibleEntrance !== "boolean") + return "wheelchairAccessibleEntrance: boolean expected"; + } + if (message.reservable != null && message.hasOwnProperty("reservable")) { + properties._reservable = 1; + if (typeof message.reservable !== "boolean") + return "reservable: boolean expected"; + } + if (message.servesBreakfast != null && message.hasOwnProperty("servesBreakfast")) { + properties._servesBreakfast = 1; + if (typeof message.servesBreakfast !== "boolean") + return "servesBreakfast: boolean expected"; + } + if (message.servesLunch != null && message.hasOwnProperty("servesLunch")) { + properties._servesLunch = 1; + if (typeof message.servesLunch !== "boolean") + return "servesLunch: boolean expected"; + } + if (message.servesDinner != null && message.hasOwnProperty("servesDinner")) { + properties._servesDinner = 1; + if (typeof message.servesDinner !== "boolean") + return "servesDinner: boolean expected"; + } + if (message.servesBeer != null && message.hasOwnProperty("servesBeer")) { + properties._servesBeer = 1; + if (typeof message.servesBeer !== "boolean") + return "servesBeer: boolean expected"; + } + if (message.servesWine != null && message.hasOwnProperty("servesWine")) { + properties._servesWine = 1; + if (typeof message.servesWine !== "boolean") + return "servesWine: boolean expected"; + } + if (message.servesBrunch != null && message.hasOwnProperty("servesBrunch")) { + properties._servesBrunch = 1; + if (typeof message.servesBrunch !== "boolean") + return "servesBrunch: boolean expected"; + } + if (message.servesVegetarianFood != null && message.hasOwnProperty("servesVegetarianFood")) { + properties._servesVegetarianFood = 1; + if (typeof message.servesVegetarianFood !== "boolean") + return "servesVegetarianFood: boolean expected"; + } + if (message.currentOpeningHours != null && message.hasOwnProperty("currentOpeningHours")) { + var error = $root.google.maps.places.v1.Place.OpeningHours.verify(message.currentOpeningHours); + if (error) + return "currentOpeningHours." + error; + } + if (message.currentSecondaryOpeningHours != null && message.hasOwnProperty("currentSecondaryOpeningHours")) { + if (!Array.isArray(message.currentSecondaryOpeningHours)) + return "currentSecondaryOpeningHours: array expected"; + for (var i = 0; i < message.currentSecondaryOpeningHours.length; ++i) { + var error = $root.google.maps.places.v1.Place.OpeningHours.verify(message.currentSecondaryOpeningHours[i]); + if (error) + return "currentSecondaryOpeningHours." + error; + } + } + if (message.secondaryOpeningHours != null && message.hasOwnProperty("secondaryOpeningHours")) { + if (!Array.isArray(message.secondaryOpeningHours)) + return "secondaryOpeningHours: array expected"; + for (var i = 0; i < message.secondaryOpeningHours.length; ++i) { + var error = $root.google.maps.places.v1.Place.OpeningHours.verify(message.secondaryOpeningHours[i]); + if (error) + return "secondaryOpeningHours." + error; + } + } + if (message.editorialSummary != null && message.hasOwnProperty("editorialSummary")) { + var error = $root.google.maps.places.v1.Place.EditorialSummary.verify(message.editorialSummary); + if (error) + return "editorialSummary." + error; + } + return null; + }; + + /** + * Creates a Place message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place} Place + */ + Place.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place) + return object; + var message = new $root.google.maps.places.v1.Place(); + if (object.id != null) + message.id = String(object.id); + if (object.displayName != null) { + if (typeof object.displayName !== "object") + throw TypeError(".google.maps.places.v1.Place.displayName: object expected"); + message.displayName = $root.google.type.LocalizedText.fromObject(object.displayName); + } + if (object.types) { + if (!Array.isArray(object.types)) + throw TypeError(".google.maps.places.v1.Place.types: array expected"); + message.types = []; + for (var i = 0; i < object.types.length; ++i) + message.types[i] = String(object.types[i]); + } + if (object.nationalPhoneNumber != null) + message.nationalPhoneNumber = String(object.nationalPhoneNumber); + if (object.internationalPhoneNumber != null) + message.internationalPhoneNumber = String(object.internationalPhoneNumber); + if (object.formattedAddress != null) + message.formattedAddress = String(object.formattedAddress); + if (object.addressComponents) { + if (!Array.isArray(object.addressComponents)) + throw TypeError(".google.maps.places.v1.Place.addressComponents: array expected"); + message.addressComponents = []; + for (var i = 0; i < object.addressComponents.length; ++i) { + if (typeof object.addressComponents[i] !== "object") + throw TypeError(".google.maps.places.v1.Place.addressComponents: object expected"); + message.addressComponents[i] = $root.google.maps.places.v1.Place.AddressComponent.fromObject(object.addressComponents[i]); + } + } + if (object.plusCode != null) { + if (typeof object.plusCode !== "object") + throw TypeError(".google.maps.places.v1.Place.plusCode: object expected"); + message.plusCode = $root.google.maps.places.v1.Place.PlusCode.fromObject(object.plusCode); + } + if (object.location != null) { + if (typeof object.location !== "object") + throw TypeError(".google.maps.places.v1.Place.location: object expected"); + message.location = $root.google.type.LatLng.fromObject(object.location); + } + if (object.viewport != null) { + if (typeof object.viewport !== "object") + throw TypeError(".google.maps.places.v1.Place.viewport: object expected"); + message.viewport = $root.google.geo.type.Viewport.fromObject(object.viewport); + } + if (object.rating != null) + message.rating = Number(object.rating); + if (object.googleMapsUri != null) + message.googleMapsUri = String(object.googleMapsUri); + if (object.websiteUri != null) + message.websiteUri = String(object.websiteUri); + if (object.reviews) { + if (!Array.isArray(object.reviews)) + throw TypeError(".google.maps.places.v1.Place.reviews: array expected"); + message.reviews = []; + for (var i = 0; i < object.reviews.length; ++i) { + if (typeof object.reviews[i] !== "object") + throw TypeError(".google.maps.places.v1.Place.reviews: object expected"); + message.reviews[i] = $root.google.maps.places.v1.Place.Review.fromObject(object.reviews[i]); + } + } + if (object.openingHours != null) { + if (typeof object.openingHours !== "object") + throw TypeError(".google.maps.places.v1.Place.openingHours: object expected"); + message.openingHours = $root.google.maps.places.v1.Place.OpeningHours.fromObject(object.openingHours); + } + if (object.utcOffsetMinutes != null) + message.utcOffsetMinutes = object.utcOffsetMinutes | 0; + if (object.adrFormatAddress != null) + message.adrFormatAddress = String(object.adrFormatAddress); + switch (object.businessStatus) { + default: + if (typeof object.businessStatus === "number") { + message.businessStatus = object.businessStatus; + break; + } + break; + case "BUSINESS_STATUS_UNSPECIFIED": + case 0: + message.businessStatus = 0; + break; + case "OPERATIONAL": + case 1: + message.businessStatus = 1; + break; + case "CLOSED_TEMPORARILY": + case 2: + message.businessStatus = 2; + break; + case "CLOSED_PERMANENTLY": + case 3: + message.businessStatus = 3; + break; + } + switch (object.priceLevel) { + default: + if (typeof object.priceLevel === "number") { + message.priceLevel = object.priceLevel; + break; + } + break; + case "PRICE_LEVEL_UNSPECIFIED": + case 0: + message.priceLevel = 0; + break; + case "FREE": + case 1: + message.priceLevel = 1; + break; + case "INEXPENSIVE": + case 2: + message.priceLevel = 2; + break; + case "MODERATE": + case 3: + message.priceLevel = 3; + break; + case "EXPENSIVE": + case 4: + message.priceLevel = 4; + break; + case "VERY_EXPENSIVE": + case 5: + message.priceLevel = 5; + break; + } + if (object.attributions) { + if (!Array.isArray(object.attributions)) + throw TypeError(".google.maps.places.v1.Place.attributions: array expected"); + message.attributions = []; + for (var i = 0; i < object.attributions.length; ++i) { + if (typeof object.attributions[i] !== "object") + throw TypeError(".google.maps.places.v1.Place.attributions: object expected"); + message.attributions[i] = $root.google.maps.places.v1.Place.Attribution.fromObject(object.attributions[i]); + } + } + if (object.userRatingCount != null) + message.userRatingCount = object.userRatingCount | 0; + if (object.iconMaskBaseUri != null) + message.iconMaskBaseUri = String(object.iconMaskBaseUri); + if (object.iconBackgroundColor != null) + message.iconBackgroundColor = String(object.iconBackgroundColor); + if (object.takeout != null) + message.takeout = Boolean(object.takeout); + if (object.delivery != null) + message.delivery = Boolean(object.delivery); + if (object.dineIn != null) + message.dineIn = Boolean(object.dineIn); + if (object.curbsidePickup != null) + message.curbsidePickup = Boolean(object.curbsidePickup); + if (object.wheelchairAccessibleEntrance != null) + message.wheelchairAccessibleEntrance = Boolean(object.wheelchairAccessibleEntrance); + if (object.reservable != null) + message.reservable = Boolean(object.reservable); + if (object.servesBreakfast != null) + message.servesBreakfast = Boolean(object.servesBreakfast); + if (object.servesLunch != null) + message.servesLunch = Boolean(object.servesLunch); + if (object.servesDinner != null) + message.servesDinner = Boolean(object.servesDinner); + if (object.servesBeer != null) + message.servesBeer = Boolean(object.servesBeer); + if (object.servesWine != null) + message.servesWine = Boolean(object.servesWine); + if (object.servesBrunch != null) + message.servesBrunch = Boolean(object.servesBrunch); + if (object.servesVegetarianFood != null) + message.servesVegetarianFood = Boolean(object.servesVegetarianFood); + if (object.currentOpeningHours != null) { + if (typeof object.currentOpeningHours !== "object") + throw TypeError(".google.maps.places.v1.Place.currentOpeningHours: object expected"); + message.currentOpeningHours = $root.google.maps.places.v1.Place.OpeningHours.fromObject(object.currentOpeningHours); + } + if (object.currentSecondaryOpeningHours) { + if (!Array.isArray(object.currentSecondaryOpeningHours)) + throw TypeError(".google.maps.places.v1.Place.currentSecondaryOpeningHours: array expected"); + message.currentSecondaryOpeningHours = []; + for (var i = 0; i < object.currentSecondaryOpeningHours.length; ++i) { + if (typeof object.currentSecondaryOpeningHours[i] !== "object") + throw TypeError(".google.maps.places.v1.Place.currentSecondaryOpeningHours: object expected"); + message.currentSecondaryOpeningHours[i] = $root.google.maps.places.v1.Place.OpeningHours.fromObject(object.currentSecondaryOpeningHours[i]); + } + } + if (object.secondaryOpeningHours) { + if (!Array.isArray(object.secondaryOpeningHours)) + throw TypeError(".google.maps.places.v1.Place.secondaryOpeningHours: array expected"); + message.secondaryOpeningHours = []; + for (var i = 0; i < object.secondaryOpeningHours.length; ++i) { + if (typeof object.secondaryOpeningHours[i] !== "object") + throw TypeError(".google.maps.places.v1.Place.secondaryOpeningHours: object expected"); + message.secondaryOpeningHours[i] = $root.google.maps.places.v1.Place.OpeningHours.fromObject(object.secondaryOpeningHours[i]); + } + } + if (object.editorialSummary != null) { + if (typeof object.editorialSummary !== "object") + throw TypeError(".google.maps.places.v1.Place.editorialSummary: object expected"); + message.editorialSummary = $root.google.maps.places.v1.Place.EditorialSummary.fromObject(object.editorialSummary); + } + return message; + }; + + /** + * Creates a plain object from a Place message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place + * @static + * @param {google.maps.places.v1.Place} message Place + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Place.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.types = []; + object.addressComponents = []; + object.reviews = []; + object.attributions = []; + object.currentSecondaryOpeningHours = []; + object.secondaryOpeningHours = []; + } + if (options.defaults) { + object.id = ""; + object.nationalPhoneNumber = ""; + object.internationalPhoneNumber = ""; + object.formattedAddress = ""; + object.plusCode = null; + object.location = null; + object.viewport = null; + object.rating = 0; + object.googleMapsUri = ""; + object.websiteUri = ""; + object.openingHours = null; + object.utcOffsetMinutes = 0; + object.adrFormatAddress = ""; + object.businessStatus = options.enums === String ? "BUSINESS_STATUS_UNSPECIFIED" : 0; + object.priceLevel = options.enums === String ? "PRICE_LEVEL_UNSPECIFIED" : 0; + object.userRatingCount = 0; + object.iconMaskBaseUri = ""; + object.iconBackgroundColor = ""; + object.displayName = null; + object.currentOpeningHours = null; + object.editorialSummary = null; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.types && message.types.length) { + object.types = []; + for (var j = 0; j < message.types.length; ++j) + object.types[j] = message.types[j]; + } + if (message.nationalPhoneNumber != null && message.hasOwnProperty("nationalPhoneNumber")) + object.nationalPhoneNumber = message.nationalPhoneNumber; + if (message.internationalPhoneNumber != null && message.hasOwnProperty("internationalPhoneNumber")) + object.internationalPhoneNumber = message.internationalPhoneNumber; + if (message.formattedAddress != null && message.hasOwnProperty("formattedAddress")) + object.formattedAddress = message.formattedAddress; + if (message.addressComponents && message.addressComponents.length) { + object.addressComponents = []; + for (var j = 0; j < message.addressComponents.length; ++j) + object.addressComponents[j] = $root.google.maps.places.v1.Place.AddressComponent.toObject(message.addressComponents[j], options); + } + if (message.plusCode != null && message.hasOwnProperty("plusCode")) + object.plusCode = $root.google.maps.places.v1.Place.PlusCode.toObject(message.plusCode, options); + if (message.location != null && message.hasOwnProperty("location")) + object.location = $root.google.type.LatLng.toObject(message.location, options); + if (message.viewport != null && message.hasOwnProperty("viewport")) + object.viewport = $root.google.geo.type.Viewport.toObject(message.viewport, options); + if (message.rating != null && message.hasOwnProperty("rating")) + object.rating = options.json && !isFinite(message.rating) ? String(message.rating) : message.rating; + if (message.googleMapsUri != null && message.hasOwnProperty("googleMapsUri")) + object.googleMapsUri = message.googleMapsUri; + if (message.websiteUri != null && message.hasOwnProperty("websiteUri")) + object.websiteUri = message.websiteUri; + if (message.reviews && message.reviews.length) { + object.reviews = []; + for (var j = 0; j < message.reviews.length; ++j) + object.reviews[j] = $root.google.maps.places.v1.Place.Review.toObject(message.reviews[j], options); + } + if (message.openingHours != null && message.hasOwnProperty("openingHours")) + object.openingHours = $root.google.maps.places.v1.Place.OpeningHours.toObject(message.openingHours, options); + if (message.utcOffsetMinutes != null && message.hasOwnProperty("utcOffsetMinutes")) + object.utcOffsetMinutes = message.utcOffsetMinutes; + if (message.adrFormatAddress != null && message.hasOwnProperty("adrFormatAddress")) + object.adrFormatAddress = message.adrFormatAddress; + if (message.businessStatus != null && message.hasOwnProperty("businessStatus")) + object.businessStatus = options.enums === String ? $root.google.maps.places.v1.Place.BusinessStatus[message.businessStatus] === undefined ? message.businessStatus : $root.google.maps.places.v1.Place.BusinessStatus[message.businessStatus] : message.businessStatus; + if (message.priceLevel != null && message.hasOwnProperty("priceLevel")) + object.priceLevel = options.enums === String ? $root.google.maps.places.v1.PriceLevel[message.priceLevel] === undefined ? message.priceLevel : $root.google.maps.places.v1.PriceLevel[message.priceLevel] : message.priceLevel; + if (message.attributions && message.attributions.length) { + object.attributions = []; + for (var j = 0; j < message.attributions.length; ++j) + object.attributions[j] = $root.google.maps.places.v1.Place.Attribution.toObject(message.attributions[j], options); + } + if (message.userRatingCount != null && message.hasOwnProperty("userRatingCount")) + object.userRatingCount = message.userRatingCount; + if (message.iconMaskBaseUri != null && message.hasOwnProperty("iconMaskBaseUri")) + object.iconMaskBaseUri = message.iconMaskBaseUri; + if (message.iconBackgroundColor != null && message.hasOwnProperty("iconBackgroundColor")) + object.iconBackgroundColor = message.iconBackgroundColor; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = $root.google.type.LocalizedText.toObject(message.displayName, options); + if (message.takeout != null && message.hasOwnProperty("takeout")) { + object.takeout = message.takeout; + if (options.oneofs) + object._takeout = "takeout"; + } + if (message.delivery != null && message.hasOwnProperty("delivery")) { + object.delivery = message.delivery; + if (options.oneofs) + object._delivery = "delivery"; + } + if (message.dineIn != null && message.hasOwnProperty("dineIn")) { + object.dineIn = message.dineIn; + if (options.oneofs) + object._dineIn = "dineIn"; + } + if (message.curbsidePickup != null && message.hasOwnProperty("curbsidePickup")) { + object.curbsidePickup = message.curbsidePickup; + if (options.oneofs) + object._curbsidePickup = "curbsidePickup"; + } + if (message.wheelchairAccessibleEntrance != null && message.hasOwnProperty("wheelchairAccessibleEntrance")) { + object.wheelchairAccessibleEntrance = message.wheelchairAccessibleEntrance; + if (options.oneofs) + object._wheelchairAccessibleEntrance = "wheelchairAccessibleEntrance"; + } + if (message.reservable != null && message.hasOwnProperty("reservable")) { + object.reservable = message.reservable; + if (options.oneofs) + object._reservable = "reservable"; + } + if (message.servesBreakfast != null && message.hasOwnProperty("servesBreakfast")) { + object.servesBreakfast = message.servesBreakfast; + if (options.oneofs) + object._servesBreakfast = "servesBreakfast"; + } + if (message.servesLunch != null && message.hasOwnProperty("servesLunch")) { + object.servesLunch = message.servesLunch; + if (options.oneofs) + object._servesLunch = "servesLunch"; + } + if (message.servesDinner != null && message.hasOwnProperty("servesDinner")) { + object.servesDinner = message.servesDinner; + if (options.oneofs) + object._servesDinner = "servesDinner"; + } + if (message.servesBeer != null && message.hasOwnProperty("servesBeer")) { + object.servesBeer = message.servesBeer; + if (options.oneofs) + object._servesBeer = "servesBeer"; + } + if (message.servesWine != null && message.hasOwnProperty("servesWine")) { + object.servesWine = message.servesWine; + if (options.oneofs) + object._servesWine = "servesWine"; + } + if (message.servesBrunch != null && message.hasOwnProperty("servesBrunch")) { + object.servesBrunch = message.servesBrunch; + if (options.oneofs) + object._servesBrunch = "servesBrunch"; + } + if (message.servesVegetarianFood != null && message.hasOwnProperty("servesVegetarianFood")) { + object.servesVegetarianFood = message.servesVegetarianFood; + if (options.oneofs) + object._servesVegetarianFood = "servesVegetarianFood"; + } + if (message.currentOpeningHours != null && message.hasOwnProperty("currentOpeningHours")) + object.currentOpeningHours = $root.google.maps.places.v1.Place.OpeningHours.toObject(message.currentOpeningHours, options); + if (message.currentSecondaryOpeningHours && message.currentSecondaryOpeningHours.length) { + object.currentSecondaryOpeningHours = []; + for (var j = 0; j < message.currentSecondaryOpeningHours.length; ++j) + object.currentSecondaryOpeningHours[j] = $root.google.maps.places.v1.Place.OpeningHours.toObject(message.currentSecondaryOpeningHours[j], options); + } + if (message.editorialSummary != null && message.hasOwnProperty("editorialSummary")) + object.editorialSummary = $root.google.maps.places.v1.Place.EditorialSummary.toObject(message.editorialSummary, options); + if (message.secondaryOpeningHours && message.secondaryOpeningHours.length) { + object.secondaryOpeningHours = []; + for (var j = 0; j < message.secondaryOpeningHours.length; ++j) + object.secondaryOpeningHours[j] = $root.google.maps.places.v1.Place.OpeningHours.toObject(message.secondaryOpeningHours[j], options); + } + return object; + }; + + /** + * Converts this Place to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place + * @instance + * @returns {Object.} JSON object + */ + Place.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Place + * @function getTypeUrl + * @memberof google.maps.places.v1.Place + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Place.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place"; + }; + + Place.AddressComponent = (function() { + + /** + * Properties of an AddressComponent. + * @memberof google.maps.places.v1.Place + * @interface IAddressComponent + * @property {string|null} [longText] AddressComponent longText + * @property {string|null} [shortText] AddressComponent shortText + * @property {Array.|null} [types] AddressComponent types + * @property {string|null} [languageCode] AddressComponent languageCode + */ + + /** + * Constructs a new AddressComponent. + * @memberof google.maps.places.v1.Place + * @classdesc Represents an AddressComponent. + * @implements IAddressComponent + * @constructor + * @param {google.maps.places.v1.Place.IAddressComponent=} [properties] Properties to set + */ + function AddressComponent(properties) { + this.types = []; + 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]]; + } + + /** + * AddressComponent longText. + * @member {string} longText + * @memberof google.maps.places.v1.Place.AddressComponent + * @instance + */ + AddressComponent.prototype.longText = ""; + + /** + * AddressComponent shortText. + * @member {string} shortText + * @memberof google.maps.places.v1.Place.AddressComponent + * @instance + */ + AddressComponent.prototype.shortText = ""; + + /** + * AddressComponent types. + * @member {Array.} types + * @memberof google.maps.places.v1.Place.AddressComponent + * @instance + */ + AddressComponent.prototype.types = $util.emptyArray; + + /** + * AddressComponent languageCode. + * @member {string} languageCode + * @memberof google.maps.places.v1.Place.AddressComponent + * @instance + */ + AddressComponent.prototype.languageCode = ""; + + /** + * Creates a new AddressComponent instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place.AddressComponent + * @static + * @param {google.maps.places.v1.Place.IAddressComponent=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.AddressComponent} AddressComponent instance + */ + AddressComponent.create = function create(properties) { + return new AddressComponent(properties); + }; + + /** + * Encodes the specified AddressComponent message. Does not implicitly {@link google.maps.places.v1.Place.AddressComponent.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place.AddressComponent + * @static + * @param {google.maps.places.v1.Place.IAddressComponent} message AddressComponent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddressComponent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.longText != null && Object.hasOwnProperty.call(message, "longText")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.longText); + if (message.shortText != null && Object.hasOwnProperty.call(message, "shortText")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shortText); + if (message.types != null && message.types.length) + for (var i = 0; i < message.types.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.types[i]); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.languageCode); + return writer; + }; + + /** + * Encodes the specified AddressComponent message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.AddressComponent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place.AddressComponent + * @static + * @param {google.maps.places.v1.Place.IAddressComponent} message AddressComponent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddressComponent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AddressComponent message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place.AddressComponent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place.AddressComponent} AddressComponent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddressComponent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.AddressComponent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.longText = reader.string(); + break; + } + case 2: { + message.shortText = reader.string(); + break; + } + case 3: { + if (!(message.types && message.types.length)) + message.types = []; + message.types.push(reader.string()); + break; + } + case 4: { + message.languageCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AddressComponent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place.AddressComponent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place.AddressComponent} AddressComponent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddressComponent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AddressComponent message. + * @function verify + * @memberof google.maps.places.v1.Place.AddressComponent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AddressComponent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.longText != null && message.hasOwnProperty("longText")) + if (!$util.isString(message.longText)) + return "longText: string expected"; + if (message.shortText != null && message.hasOwnProperty("shortText")) + if (!$util.isString(message.shortText)) + return "shortText: string expected"; + if (message.types != null && message.hasOwnProperty("types")) { + if (!Array.isArray(message.types)) + return "types: array expected"; + for (var i = 0; i < message.types.length; ++i) + if (!$util.isString(message.types[i])) + return "types: string[] expected"; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + return null; + }; + + /** + * Creates an AddressComponent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place.AddressComponent + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place.AddressComponent} AddressComponent + */ + AddressComponent.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.AddressComponent) + return object; + var message = new $root.google.maps.places.v1.Place.AddressComponent(); + if (object.longText != null) + message.longText = String(object.longText); + if (object.shortText != null) + message.shortText = String(object.shortText); + if (object.types) { + if (!Array.isArray(object.types)) + throw TypeError(".google.maps.places.v1.Place.AddressComponent.types: array expected"); + message.types = []; + for (var i = 0; i < object.types.length; ++i) + message.types[i] = String(object.types[i]); + } + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + return message; + }; + + /** + * Creates a plain object from an AddressComponent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place.AddressComponent + * @static + * @param {google.maps.places.v1.Place.AddressComponent} message AddressComponent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AddressComponent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.types = []; + if (options.defaults) { + object.longText = ""; + object.shortText = ""; + object.languageCode = ""; + } + if (message.longText != null && message.hasOwnProperty("longText")) + object.longText = message.longText; + if (message.shortText != null && message.hasOwnProperty("shortText")) + object.shortText = message.shortText; + if (message.types && message.types.length) { + object.types = []; + for (var j = 0; j < message.types.length; ++j) + object.types[j] = message.types[j]; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + return object; + }; + + /** + * Converts this AddressComponent to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place.AddressComponent + * @instance + * @returns {Object.} JSON object + */ + AddressComponent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AddressComponent + * @function getTypeUrl + * @memberof google.maps.places.v1.Place.AddressComponent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AddressComponent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place.AddressComponent"; + }; + + return AddressComponent; + })(); + + Place.PlusCode = (function() { + + /** + * Properties of a PlusCode. + * @memberof google.maps.places.v1.Place + * @interface IPlusCode + * @property {string|null} [globalCode] PlusCode globalCode + * @property {string|null} [compoundCode] PlusCode compoundCode + */ + + /** + * Constructs a new PlusCode. + * @memberof google.maps.places.v1.Place + * @classdesc Represents a PlusCode. + * @implements IPlusCode + * @constructor + * @param {google.maps.places.v1.Place.IPlusCode=} [properties] Properties to set + */ + function PlusCode(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]]; + } + + /** + * PlusCode globalCode. + * @member {string} globalCode + * @memberof google.maps.places.v1.Place.PlusCode + * @instance + */ + PlusCode.prototype.globalCode = ""; + + /** + * PlusCode compoundCode. + * @member {string} compoundCode + * @memberof google.maps.places.v1.Place.PlusCode + * @instance + */ + PlusCode.prototype.compoundCode = ""; + + /** + * Creates a new PlusCode instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place.PlusCode + * @static + * @param {google.maps.places.v1.Place.IPlusCode=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.PlusCode} PlusCode instance + */ + PlusCode.create = function create(properties) { + return new PlusCode(properties); + }; + + /** + * Encodes the specified PlusCode message. Does not implicitly {@link google.maps.places.v1.Place.PlusCode.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place.PlusCode + * @static + * @param {google.maps.places.v1.Place.IPlusCode} message PlusCode message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlusCode.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.globalCode != null && Object.hasOwnProperty.call(message, "globalCode")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.globalCode); + if (message.compoundCode != null && Object.hasOwnProperty.call(message, "compoundCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.compoundCode); + return writer; + }; + + /** + * Encodes the specified PlusCode message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.PlusCode.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place.PlusCode + * @static + * @param {google.maps.places.v1.Place.IPlusCode} message PlusCode message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlusCode.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PlusCode message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place.PlusCode + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place.PlusCode} PlusCode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlusCode.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.PlusCode(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.globalCode = reader.string(); + break; + } + case 2: { + message.compoundCode = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PlusCode message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place.PlusCode + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place.PlusCode} PlusCode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlusCode.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PlusCode message. + * @function verify + * @memberof google.maps.places.v1.Place.PlusCode + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PlusCode.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.globalCode != null && message.hasOwnProperty("globalCode")) + if (!$util.isString(message.globalCode)) + return "globalCode: string expected"; + if (message.compoundCode != null && message.hasOwnProperty("compoundCode")) + if (!$util.isString(message.compoundCode)) + return "compoundCode: string expected"; + return null; + }; + + /** + * Creates a PlusCode message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place.PlusCode + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place.PlusCode} PlusCode + */ + PlusCode.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.PlusCode) + return object; + var message = new $root.google.maps.places.v1.Place.PlusCode(); + if (object.globalCode != null) + message.globalCode = String(object.globalCode); + if (object.compoundCode != null) + message.compoundCode = String(object.compoundCode); + return message; + }; + + /** + * Creates a plain object from a PlusCode message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place.PlusCode + * @static + * @param {google.maps.places.v1.Place.PlusCode} message PlusCode + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PlusCode.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.globalCode = ""; + object.compoundCode = ""; + } + if (message.globalCode != null && message.hasOwnProperty("globalCode")) + object.globalCode = message.globalCode; + if (message.compoundCode != null && message.hasOwnProperty("compoundCode")) + object.compoundCode = message.compoundCode; + return object; + }; + + /** + * Converts this PlusCode to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place.PlusCode + * @instance + * @returns {Object.} JSON object + */ + PlusCode.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PlusCode + * @function getTypeUrl + * @memberof google.maps.places.v1.Place.PlusCode + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PlusCode.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place.PlusCode"; + }; + + return PlusCode; + })(); + + Place.Review = (function() { + + /** + * Properties of a Review. + * @memberof google.maps.places.v1.Place + * @interface IReview + * @property {google.protobuf.ITimestamp|null} [publishTime] Review publishTime + * @property {string|null} [relativePublishTimeDescription] Review relativePublishTimeDescription + * @property {google.type.ILocalizedText|null} [text] Review text + * @property {string|null} [author] Review author + * @property {string|null} [authorUri] Review authorUri + * @property {string|null} [authorPhotoUri] Review authorPhotoUri + * @property {number|null} [rating] Review rating + * @property {string|null} [originalLanguageCode] Review originalLanguageCode + * @property {boolean|null} [translated] Review translated + */ + + /** + * Constructs a new Review. + * @memberof google.maps.places.v1.Place + * @classdesc Represents a Review. + * @implements IReview + * @constructor + * @param {google.maps.places.v1.Place.IReview=} [properties] Properties to set + */ + function Review(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]]; + } + + /** + * Review publishTime. + * @member {google.protobuf.ITimestamp|null|undefined} publishTime + * @memberof google.maps.places.v1.Place.Review + * @instance + */ + Review.prototype.publishTime = null; + + /** + * Review relativePublishTimeDescription. + * @member {string} relativePublishTimeDescription + * @memberof google.maps.places.v1.Place.Review + * @instance + */ + Review.prototype.relativePublishTimeDescription = ""; + + /** + * Review text. + * @member {google.type.ILocalizedText|null|undefined} text + * @memberof google.maps.places.v1.Place.Review + * @instance + */ + Review.prototype.text = null; + + /** + * Review author. + * @member {string} author + * @memberof google.maps.places.v1.Place.Review + * @instance + */ + Review.prototype.author = ""; + + /** + * Review authorUri. + * @member {string} authorUri + * @memberof google.maps.places.v1.Place.Review + * @instance + */ + Review.prototype.authorUri = ""; + + /** + * Review authorPhotoUri. + * @member {string} authorPhotoUri + * @memberof google.maps.places.v1.Place.Review + * @instance + */ + Review.prototype.authorPhotoUri = ""; + + /** + * Review rating. + * @member {number} rating + * @memberof google.maps.places.v1.Place.Review + * @instance + */ + Review.prototype.rating = 0; + + /** + * Review originalLanguageCode. + * @member {string} originalLanguageCode + * @memberof google.maps.places.v1.Place.Review + * @instance + */ + Review.prototype.originalLanguageCode = ""; + + /** + * Review translated. + * @member {boolean} translated + * @memberof google.maps.places.v1.Place.Review + * @instance + */ + Review.prototype.translated = false; + + /** + * Creates a new Review instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place.Review + * @static + * @param {google.maps.places.v1.Place.IReview=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.Review} Review instance + */ + Review.create = function create(properties) { + return new Review(properties); + }; + + /** + * Encodes the specified Review message. Does not implicitly {@link google.maps.places.v1.Place.Review.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place.Review + * @static + * @param {google.maps.places.v1.Place.IReview} message Review message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Review.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publishTime != null && Object.hasOwnProperty.call(message, "publishTime")) + $root.google.protobuf.Timestamp.encode(message.publishTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.relativePublishTimeDescription != null && Object.hasOwnProperty.call(message, "relativePublishTimeDescription")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.relativePublishTimeDescription); + if (message.author != null && Object.hasOwnProperty.call(message, "author")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.author); + if (message.authorUri != null && Object.hasOwnProperty.call(message, "authorUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.authorUri); + if (message.authorPhotoUri != null && Object.hasOwnProperty.call(message, "authorPhotoUri")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.authorPhotoUri); + if (message.rating != null && Object.hasOwnProperty.call(message, "rating")) + writer.uint32(/* id 7, wireType 1 =*/57).double(message.rating); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + $root.google.type.LocalizedText.encode(message.text, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.originalLanguageCode != null && Object.hasOwnProperty.call(message, "originalLanguageCode")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.originalLanguageCode); + if (message.translated != null && Object.hasOwnProperty.call(message, "translated")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.translated); + return writer; + }; + + /** + * Encodes the specified Review message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.Review.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place.Review + * @static + * @param {google.maps.places.v1.Place.IReview} message Review message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Review.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Review message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place.Review + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place.Review} Review + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Review.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.Review(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.publishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.relativePublishTimeDescription = reader.string(); + break; + } + case 9: { + message.text = $root.google.type.LocalizedText.decode(reader, reader.uint32()); + break; + } + case 4: { + message.author = reader.string(); + break; + } + case 5: { + message.authorUri = reader.string(); + break; + } + case 6: { + message.authorPhotoUri = reader.string(); + break; + } + case 7: { + message.rating = reader.double(); + break; + } + case 10: { + message.originalLanguageCode = reader.string(); + break; + } + case 11: { + message.translated = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Review message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place.Review + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place.Review} Review + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Review.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Review message. + * @function verify + * @memberof google.maps.places.v1.Place.Review + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Review.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.publishTime != null && message.hasOwnProperty("publishTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.publishTime); + if (error) + return "publishTime." + error; + } + if (message.relativePublishTimeDescription != null && message.hasOwnProperty("relativePublishTimeDescription")) + if (!$util.isString(message.relativePublishTimeDescription)) + return "relativePublishTimeDescription: string expected"; + if (message.text != null && message.hasOwnProperty("text")) { + var error = $root.google.type.LocalizedText.verify(message.text); + if (error) + return "text." + error; + } + if (message.author != null && message.hasOwnProperty("author")) + if (!$util.isString(message.author)) + return "author: string expected"; + if (message.authorUri != null && message.hasOwnProperty("authorUri")) + if (!$util.isString(message.authorUri)) + return "authorUri: string expected"; + if (message.authorPhotoUri != null && message.hasOwnProperty("authorPhotoUri")) + if (!$util.isString(message.authorPhotoUri)) + return "authorPhotoUri: string expected"; + if (message.rating != null && message.hasOwnProperty("rating")) + if (typeof message.rating !== "number") + return "rating: number expected"; + if (message.originalLanguageCode != null && message.hasOwnProperty("originalLanguageCode")) + if (!$util.isString(message.originalLanguageCode)) + return "originalLanguageCode: string expected"; + if (message.translated != null && message.hasOwnProperty("translated")) + if (typeof message.translated !== "boolean") + return "translated: boolean expected"; + return null; + }; + + /** + * Creates a Review message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place.Review + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place.Review} Review + */ + Review.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.Review) + return object; + var message = new $root.google.maps.places.v1.Place.Review(); + if (object.publishTime != null) { + if (typeof object.publishTime !== "object") + throw TypeError(".google.maps.places.v1.Place.Review.publishTime: object expected"); + message.publishTime = $root.google.protobuf.Timestamp.fromObject(object.publishTime); + } + if (object.relativePublishTimeDescription != null) + message.relativePublishTimeDescription = String(object.relativePublishTimeDescription); + if (object.text != null) { + if (typeof object.text !== "object") + throw TypeError(".google.maps.places.v1.Place.Review.text: object expected"); + message.text = $root.google.type.LocalizedText.fromObject(object.text); + } + if (object.author != null) + message.author = String(object.author); + if (object.authorUri != null) + message.authorUri = String(object.authorUri); + if (object.authorPhotoUri != null) + message.authorPhotoUri = String(object.authorPhotoUri); + if (object.rating != null) + message.rating = Number(object.rating); + if (object.originalLanguageCode != null) + message.originalLanguageCode = String(object.originalLanguageCode); + if (object.translated != null) + message.translated = Boolean(object.translated); + return message; + }; + + /** + * Creates a plain object from a Review message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place.Review + * @static + * @param {google.maps.places.v1.Place.Review} message Review + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Review.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.publishTime = null; + object.relativePublishTimeDescription = ""; + object.author = ""; + object.authorUri = ""; + object.authorPhotoUri = ""; + object.rating = 0; + object.text = null; + object.originalLanguageCode = ""; + object.translated = false; + } + if (message.publishTime != null && message.hasOwnProperty("publishTime")) + object.publishTime = $root.google.protobuf.Timestamp.toObject(message.publishTime, options); + if (message.relativePublishTimeDescription != null && message.hasOwnProperty("relativePublishTimeDescription")) + object.relativePublishTimeDescription = message.relativePublishTimeDescription; + if (message.author != null && message.hasOwnProperty("author")) + object.author = message.author; + if (message.authorUri != null && message.hasOwnProperty("authorUri")) + object.authorUri = message.authorUri; + if (message.authorPhotoUri != null && message.hasOwnProperty("authorPhotoUri")) + object.authorPhotoUri = message.authorPhotoUri; + if (message.rating != null && message.hasOwnProperty("rating")) + object.rating = options.json && !isFinite(message.rating) ? String(message.rating) : message.rating; + if (message.text != null && message.hasOwnProperty("text")) + object.text = $root.google.type.LocalizedText.toObject(message.text, options); + if (message.originalLanguageCode != null && message.hasOwnProperty("originalLanguageCode")) + object.originalLanguageCode = message.originalLanguageCode; + if (message.translated != null && message.hasOwnProperty("translated")) + object.translated = message.translated; + return object; + }; + + /** + * Converts this Review to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place.Review + * @instance + * @returns {Object.} JSON object + */ + Review.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Review + * @function getTypeUrl + * @memberof google.maps.places.v1.Place.Review + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Review.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place.Review"; + }; + + return Review; + })(); + + Place.OpeningHours = (function() { + + /** + * Properties of an OpeningHours. + * @memberof google.maps.places.v1.Place + * @interface IOpeningHours + * @property {boolean|null} [openNow] OpeningHours openNow + * @property {Array.|null} [periods] OpeningHours periods + * @property {Array.|null} [weekdayDescriptions] OpeningHours weekdayDescriptions + * @property {google.maps.places.v1.Place.OpeningHours.SecondaryHourType|null} [secondaryHourType] OpeningHours secondaryHourType + * @property {Array.|null} [specialDays] OpeningHours specialDays + */ + + /** + * Constructs a new OpeningHours. + * @memberof google.maps.places.v1.Place + * @classdesc Represents an OpeningHours. + * @implements IOpeningHours + * @constructor + * @param {google.maps.places.v1.Place.IOpeningHours=} [properties] Properties to set + */ + function OpeningHours(properties) { + this.periods = []; + this.weekdayDescriptions = []; + this.specialDays = []; + 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]]; + } + + /** + * OpeningHours openNow. + * @member {boolean} openNow + * @memberof google.maps.places.v1.Place.OpeningHours + * @instance + */ + OpeningHours.prototype.openNow = false; + + /** + * OpeningHours periods. + * @member {Array.} periods + * @memberof google.maps.places.v1.Place.OpeningHours + * @instance + */ + OpeningHours.prototype.periods = $util.emptyArray; + + /** + * OpeningHours weekdayDescriptions. + * @member {Array.} weekdayDescriptions + * @memberof google.maps.places.v1.Place.OpeningHours + * @instance + */ + OpeningHours.prototype.weekdayDescriptions = $util.emptyArray; + + /** + * OpeningHours secondaryHourType. + * @member {google.maps.places.v1.Place.OpeningHours.SecondaryHourType} secondaryHourType + * @memberof google.maps.places.v1.Place.OpeningHours + * @instance + */ + OpeningHours.prototype.secondaryHourType = 0; + + /** + * OpeningHours specialDays. + * @member {Array.} specialDays + * @memberof google.maps.places.v1.Place.OpeningHours + * @instance + */ + OpeningHours.prototype.specialDays = $util.emptyArray; + + /** + * Creates a new OpeningHours instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place.OpeningHours + * @static + * @param {google.maps.places.v1.Place.IOpeningHours=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.OpeningHours} OpeningHours instance + */ + OpeningHours.create = function create(properties) { + return new OpeningHours(properties); + }; + + /** + * Encodes the specified OpeningHours message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place.OpeningHours + * @static + * @param {google.maps.places.v1.Place.IOpeningHours} message OpeningHours message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpeningHours.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.openNow != null && Object.hasOwnProperty.call(message, "openNow")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.openNow); + if (message.periods != null && message.periods.length) + for (var i = 0; i < message.periods.length; ++i) + $root.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.encode(message.periods[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.weekdayDescriptions != null && message.weekdayDescriptions.length) + for (var i = 0; i < message.weekdayDescriptions.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.weekdayDescriptions[i]); + if (message.secondaryHourType != null && Object.hasOwnProperty.call(message, "secondaryHourType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.secondaryHourType); + if (message.specialDays != null && message.specialDays.length) + for (var i = 0; i < message.specialDays.length; ++i) + $root.google.maps.places.v1.Place.OpeningHours.SpecialDay.encode(message.specialDays[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OpeningHours message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place.OpeningHours + * @static + * @param {google.maps.places.v1.Place.IOpeningHours} message OpeningHours message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpeningHours.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OpeningHours message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place.OpeningHours + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place.OpeningHours} OpeningHours + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpeningHours.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.OpeningHours(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.openNow = reader.bool(); + break; + } + case 2: { + if (!(message.periods && message.periods.length)) + message.periods = []; + message.periods.push($root.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.weekdayDescriptions && message.weekdayDescriptions.length)) + message.weekdayDescriptions = []; + message.weekdayDescriptions.push(reader.string()); + break; + } + case 4: { + message.secondaryHourType = reader.int32(); + break; + } + case 5: { + if (!(message.specialDays && message.specialDays.length)) + message.specialDays = []; + message.specialDays.push($root.google.maps.places.v1.Place.OpeningHours.SpecialDay.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OpeningHours message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place.OpeningHours + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place.OpeningHours} OpeningHours + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpeningHours.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OpeningHours message. + * @function verify + * @memberof google.maps.places.v1.Place.OpeningHours + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OpeningHours.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.openNow != null && message.hasOwnProperty("openNow")) + if (typeof message.openNow !== "boolean") + return "openNow: boolean expected"; + if (message.periods != null && message.hasOwnProperty("periods")) { + if (!Array.isArray(message.periods)) + return "periods: array expected"; + for (var i = 0; i < message.periods.length; ++i) { + var error = $root.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.verify(message.periods[i]); + if (error) + return "periods." + error; + } + } + if (message.weekdayDescriptions != null && message.hasOwnProperty("weekdayDescriptions")) { + if (!Array.isArray(message.weekdayDescriptions)) + return "weekdayDescriptions: array expected"; + for (var i = 0; i < message.weekdayDescriptions.length; ++i) + if (!$util.isString(message.weekdayDescriptions[i])) + return "weekdayDescriptions: string[] expected"; + } + if (message.secondaryHourType != null && message.hasOwnProperty("secondaryHourType")) + switch (message.secondaryHourType) { + default: + return "secondaryHourType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + break; + } + if (message.specialDays != null && message.hasOwnProperty("specialDays")) { + if (!Array.isArray(message.specialDays)) + return "specialDays: array expected"; + for (var i = 0; i < message.specialDays.length; ++i) { + var error = $root.google.maps.places.v1.Place.OpeningHours.SpecialDay.verify(message.specialDays[i]); + if (error) + return "specialDays." + error; + } + } + return null; + }; + + /** + * Creates an OpeningHours message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place.OpeningHours + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place.OpeningHours} OpeningHours + */ + OpeningHours.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.OpeningHours) + return object; + var message = new $root.google.maps.places.v1.Place.OpeningHours(); + if (object.openNow != null) + message.openNow = Boolean(object.openNow); + if (object.periods) { + if (!Array.isArray(object.periods)) + throw TypeError(".google.maps.places.v1.Place.OpeningHours.periods: array expected"); + message.periods = []; + for (var i = 0; i < object.periods.length; ++i) { + if (typeof object.periods[i] !== "object") + throw TypeError(".google.maps.places.v1.Place.OpeningHours.periods: object expected"); + message.periods[i] = $root.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.fromObject(object.periods[i]); + } + } + if (object.weekdayDescriptions) { + if (!Array.isArray(object.weekdayDescriptions)) + throw TypeError(".google.maps.places.v1.Place.OpeningHours.weekdayDescriptions: array expected"); + message.weekdayDescriptions = []; + for (var i = 0; i < object.weekdayDescriptions.length; ++i) + message.weekdayDescriptions[i] = String(object.weekdayDescriptions[i]); + } + switch (object.secondaryHourType) { + default: + if (typeof object.secondaryHourType === "number") { + message.secondaryHourType = object.secondaryHourType; + break; + } + break; + case "SECONDARY_HOUR_TYPE_UNSPECIFIED": + case 0: + message.secondaryHourType = 0; + break; + case "DRIVE_THROUGH": + case 1: + message.secondaryHourType = 1; + break; + case "HAPPY_HOUR": + case 2: + message.secondaryHourType = 2; + break; + case "DELIVERY": + case 3: + message.secondaryHourType = 3; + break; + case "TAKEOUT": + case 4: + message.secondaryHourType = 4; + break; + case "KITCHEN": + case 5: + message.secondaryHourType = 5; + break; + case "BREAKFAST": + case 6: + message.secondaryHourType = 6; + break; + case "LUNCH": + case 7: + message.secondaryHourType = 7; + break; + case "DINNER": + case 8: + message.secondaryHourType = 8; + break; + case "BRUNCH": + case 9: + message.secondaryHourType = 9; + break; + case "PICKUP": + case 10: + message.secondaryHourType = 10; + break; + case "ACCESS": + case 11: + message.secondaryHourType = 11; + break; + case "SENIOR_HOURS": + case 12: + message.secondaryHourType = 12; + break; + case "ONLINE_SERVICE_HOURS": + case 13: + message.secondaryHourType = 13; + break; + } + if (object.specialDays) { + if (!Array.isArray(object.specialDays)) + throw TypeError(".google.maps.places.v1.Place.OpeningHours.specialDays: array expected"); + message.specialDays = []; + for (var i = 0; i < object.specialDays.length; ++i) { + if (typeof object.specialDays[i] !== "object") + throw TypeError(".google.maps.places.v1.Place.OpeningHours.specialDays: object expected"); + message.specialDays[i] = $root.google.maps.places.v1.Place.OpeningHours.SpecialDay.fromObject(object.specialDays[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OpeningHours message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place.OpeningHours + * @static + * @param {google.maps.places.v1.Place.OpeningHours} message OpeningHours + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OpeningHours.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.periods = []; + object.weekdayDescriptions = []; + object.specialDays = []; + } + if (options.defaults) { + object.openNow = false; + object.secondaryHourType = options.enums === String ? "SECONDARY_HOUR_TYPE_UNSPECIFIED" : 0; + } + if (message.openNow != null && message.hasOwnProperty("openNow")) + object.openNow = message.openNow; + if (message.periods && message.periods.length) { + object.periods = []; + for (var j = 0; j < message.periods.length; ++j) + object.periods[j] = $root.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.toObject(message.periods[j], options); + } + if (message.weekdayDescriptions && message.weekdayDescriptions.length) { + object.weekdayDescriptions = []; + for (var j = 0; j < message.weekdayDescriptions.length; ++j) + object.weekdayDescriptions[j] = message.weekdayDescriptions[j]; + } + if (message.secondaryHourType != null && message.hasOwnProperty("secondaryHourType")) + object.secondaryHourType = options.enums === String ? $root.google.maps.places.v1.Place.OpeningHours.SecondaryHourType[message.secondaryHourType] === undefined ? message.secondaryHourType : $root.google.maps.places.v1.Place.OpeningHours.SecondaryHourType[message.secondaryHourType] : message.secondaryHourType; + if (message.specialDays && message.specialDays.length) { + object.specialDays = []; + for (var j = 0; j < message.specialDays.length; ++j) + object.specialDays[j] = $root.google.maps.places.v1.Place.OpeningHours.SpecialDay.toObject(message.specialDays[j], options); + } + return object; + }; + + /** + * Converts this OpeningHours to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place.OpeningHours + * @instance + * @returns {Object.} JSON object + */ + OpeningHours.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OpeningHours + * @function getTypeUrl + * @memberof google.maps.places.v1.Place.OpeningHours + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OpeningHours.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place.OpeningHours"; + }; + + OpeningHours.OpeningHoursPeriod = (function() { + + /** + * Properties of an OpeningHoursPeriod. + * @memberof google.maps.places.v1.Place.OpeningHours + * @interface IOpeningHoursPeriod + * @property {google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.IOpeningHoursPoint|null} [open] OpeningHoursPeriod open + * @property {google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.IOpeningHoursPoint|null} [close] OpeningHoursPeriod close + */ + + /** + * Constructs a new OpeningHoursPeriod. + * @memberof google.maps.places.v1.Place.OpeningHours + * @classdesc Represents an OpeningHoursPeriod. + * @implements IOpeningHoursPeriod + * @constructor + * @param {google.maps.places.v1.Place.OpeningHours.IOpeningHoursPeriod=} [properties] Properties to set + */ + function OpeningHoursPeriod(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]]; + } + + /** + * OpeningHoursPeriod open. + * @member {google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.IOpeningHoursPoint|null|undefined} open + * @memberof google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + * @instance + */ + OpeningHoursPeriod.prototype.open = null; + + /** + * OpeningHoursPeriod close. + * @member {google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.IOpeningHoursPoint|null|undefined} close + * @memberof google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + * @instance + */ + OpeningHoursPeriod.prototype.close = null; + + /** + * Creates a new OpeningHoursPeriod instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + * @static + * @param {google.maps.places.v1.Place.OpeningHours.IOpeningHoursPeriod=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod} OpeningHoursPeriod instance + */ + OpeningHoursPeriod.create = function create(properties) { + return new OpeningHoursPeriod(properties); + }; + + /** + * Encodes the specified OpeningHoursPeriod message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + * @static + * @param {google.maps.places.v1.Place.OpeningHours.IOpeningHoursPeriod} message OpeningHoursPeriod message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpeningHoursPeriod.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.open != null && Object.hasOwnProperty.call(message, "open")) + $root.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint.encode(message.open, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.close != null && Object.hasOwnProperty.call(message, "close")) + $root.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint.encode(message.close, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OpeningHoursPeriod message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + * @static + * @param {google.maps.places.v1.Place.OpeningHours.IOpeningHoursPeriod} message OpeningHoursPeriod message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpeningHoursPeriod.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OpeningHoursPeriod message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod} OpeningHoursPeriod + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpeningHoursPeriod.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.open = $root.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint.decode(reader, reader.uint32()); + break; + } + case 2: { + message.close = $root.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OpeningHoursPeriod message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod} OpeningHoursPeriod + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpeningHoursPeriod.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OpeningHoursPeriod message. + * @function verify + * @memberof google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OpeningHoursPeriod.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.open != null && message.hasOwnProperty("open")) { + var error = $root.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint.verify(message.open); + if (error) + return "open." + error; + } + if (message.close != null && message.hasOwnProperty("close")) { + var error = $root.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint.verify(message.close); + if (error) + return "close." + error; + } + return null; + }; + + /** + * Creates an OpeningHoursPeriod message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod} OpeningHoursPeriod + */ + OpeningHoursPeriod.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod) + return object; + var message = new $root.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod(); + if (object.open != null) { + if (typeof object.open !== "object") + throw TypeError(".google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.open: object expected"); + message.open = $root.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint.fromObject(object.open); + } + if (object.close != null) { + if (typeof object.close !== "object") + throw TypeError(".google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.close: object expected"); + message.close = $root.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint.fromObject(object.close); + } + return message; + }; + + /** + * Creates a plain object from an OpeningHoursPeriod message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + * @static + * @param {google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod} message OpeningHoursPeriod + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OpeningHoursPeriod.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.open = null; + object.close = null; + } + if (message.open != null && message.hasOwnProperty("open")) + object.open = $root.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint.toObject(message.open, options); + if (message.close != null && message.hasOwnProperty("close")) + object.close = $root.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint.toObject(message.close, options); + return object; + }; + + /** + * Converts this OpeningHoursPeriod to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + * @instance + * @returns {Object.} JSON object + */ + OpeningHoursPeriod.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OpeningHoursPeriod + * @function getTypeUrl + * @memberof google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OpeningHoursPeriod.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod"; + }; + + OpeningHoursPeriod.OpeningHoursPoint = (function() { + + /** + * Properties of an OpeningHoursPoint. + * @memberof google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + * @interface IOpeningHoursPoint + * @property {number|null} [day] OpeningHoursPoint day + * @property {number|null} [hour] OpeningHoursPoint hour + * @property {number|null} [minute] OpeningHoursPoint minute + * @property {string|null} [dateDeprecated] OpeningHoursPoint dateDeprecated + * @property {google.type.IDate|null} [date] OpeningHoursPoint date + * @property {boolean|null} [truncated] OpeningHoursPoint truncated + */ + + /** + * Constructs a new OpeningHoursPoint. + * @memberof google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod + * @classdesc Represents an OpeningHoursPoint. + * @implements IOpeningHoursPoint + * @constructor + * @param {google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.IOpeningHoursPoint=} [properties] Properties to set + */ + function OpeningHoursPoint(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]]; + } + + /** + * OpeningHoursPoint day. + * @member {number|null|undefined} day + * @memberof google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + * @instance + */ + OpeningHoursPoint.prototype.day = null; + + /** + * OpeningHoursPoint hour. + * @member {number|null|undefined} hour + * @memberof google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + * @instance + */ + OpeningHoursPoint.prototype.hour = null; + + /** + * OpeningHoursPoint minute. + * @member {number|null|undefined} minute + * @memberof google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + * @instance + */ + OpeningHoursPoint.prototype.minute = null; + + /** + * OpeningHoursPoint dateDeprecated. + * @member {string} dateDeprecated + * @memberof google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + * @instance + */ + OpeningHoursPoint.prototype.dateDeprecated = ""; + + /** + * OpeningHoursPoint date. + * @member {google.type.IDate|null|undefined} date + * @memberof google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + * @instance + */ + OpeningHoursPoint.prototype.date = null; + + /** + * OpeningHoursPoint truncated. + * @member {boolean} truncated + * @memberof google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + * @instance + */ + OpeningHoursPoint.prototype.truncated = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OpeningHoursPoint _day. + * @member {"day"|undefined} _day + * @memberof google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + * @instance + */ + Object.defineProperty(OpeningHoursPoint.prototype, "_day", { + get: $util.oneOfGetter($oneOfFields = ["day"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * OpeningHoursPoint _hour. + * @member {"hour"|undefined} _hour + * @memberof google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + * @instance + */ + Object.defineProperty(OpeningHoursPoint.prototype, "_hour", { + get: $util.oneOfGetter($oneOfFields = ["hour"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * OpeningHoursPoint _minute. + * @member {"minute"|undefined} _minute + * @memberof google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + * @instance + */ + Object.defineProperty(OpeningHoursPoint.prototype, "_minute", { + get: $util.oneOfGetter($oneOfFields = ["minute"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OpeningHoursPoint instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + * @static + * @param {google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.IOpeningHoursPoint=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint} OpeningHoursPoint instance + */ + OpeningHoursPoint.create = function create(properties) { + return new OpeningHoursPoint(properties); + }; + + /** + * Encodes the specified OpeningHoursPoint message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + * @static + * @param {google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.IOpeningHoursPoint} message OpeningHoursPoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpeningHoursPoint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.day != null && Object.hasOwnProperty.call(message, "day")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.day); + if (message.hour != null && Object.hasOwnProperty.call(message, "hour")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.hour); + if (message.minute != null && Object.hasOwnProperty.call(message, "minute")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.minute); + if (message.dateDeprecated != null && Object.hasOwnProperty.call(message, "dateDeprecated")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.dateDeprecated); + if (message.truncated != null && Object.hasOwnProperty.call(message, "truncated")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.truncated); + if (message.date != null && Object.hasOwnProperty.call(message, "date")) + $root.google.type.Date.encode(message.date, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OpeningHoursPoint message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + * @static + * @param {google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.IOpeningHoursPoint} message OpeningHoursPoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OpeningHoursPoint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OpeningHoursPoint message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint} OpeningHoursPoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpeningHoursPoint.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.day = reader.int32(); + break; + } + case 2: { + message.hour = reader.int32(); + break; + } + case 3: { + message.minute = reader.int32(); + break; + } + case 4: { + message.dateDeprecated = reader.string(); + break; + } + case 6: { + message.date = $root.google.type.Date.decode(reader, reader.uint32()); + break; + } + case 5: { + message.truncated = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OpeningHoursPoint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint} OpeningHoursPoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OpeningHoursPoint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OpeningHoursPoint message. + * @function verify + * @memberof google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OpeningHoursPoint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.day != null && message.hasOwnProperty("day")) { + properties._day = 1; + if (!$util.isInteger(message.day)) + return "day: integer expected"; + } + if (message.hour != null && message.hasOwnProperty("hour")) { + properties._hour = 1; + if (!$util.isInteger(message.hour)) + return "hour: integer expected"; + } + if (message.minute != null && message.hasOwnProperty("minute")) { + properties._minute = 1; + if (!$util.isInteger(message.minute)) + return "minute: integer expected"; + } + if (message.dateDeprecated != null && message.hasOwnProperty("dateDeprecated")) + if (!$util.isString(message.dateDeprecated)) + return "dateDeprecated: string expected"; + if (message.date != null && message.hasOwnProperty("date")) { + var error = $root.google.type.Date.verify(message.date); + if (error) + return "date." + error; + } + if (message.truncated != null && message.hasOwnProperty("truncated")) + if (typeof message.truncated !== "boolean") + return "truncated: boolean expected"; + return null; + }; + + /** + * Creates an OpeningHoursPoint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint} OpeningHoursPoint + */ + OpeningHoursPoint.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint) + return object; + var message = new $root.google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint(); + if (object.day != null) + message.day = object.day | 0; + if (object.hour != null) + message.hour = object.hour | 0; + if (object.minute != null) + message.minute = object.minute | 0; + if (object.dateDeprecated != null) + message.dateDeprecated = String(object.dateDeprecated); + if (object.date != null) { + if (typeof object.date !== "object") + throw TypeError(".google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint.date: object expected"); + message.date = $root.google.type.Date.fromObject(object.date); + } + if (object.truncated != null) + message.truncated = Boolean(object.truncated); + return message; + }; + + /** + * Creates a plain object from an OpeningHoursPoint message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + * @static + * @param {google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint} message OpeningHoursPoint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OpeningHoursPoint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dateDeprecated = ""; + object.truncated = false; + object.date = null; + } + if (message.day != null && message.hasOwnProperty("day")) { + object.day = message.day; + if (options.oneofs) + object._day = "day"; + } + if (message.hour != null && message.hasOwnProperty("hour")) { + object.hour = message.hour; + if (options.oneofs) + object._hour = "hour"; + } + if (message.minute != null && message.hasOwnProperty("minute")) { + object.minute = message.minute; + if (options.oneofs) + object._minute = "minute"; + } + if (message.dateDeprecated != null && message.hasOwnProperty("dateDeprecated")) + object.dateDeprecated = message.dateDeprecated; + if (message.truncated != null && message.hasOwnProperty("truncated")) + object.truncated = message.truncated; + if (message.date != null && message.hasOwnProperty("date")) + object.date = $root.google.type.Date.toObject(message.date, options); + return object; + }; + + /** + * Converts this OpeningHoursPoint to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + * @instance + * @returns {Object.} JSON object + */ + OpeningHoursPoint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OpeningHoursPoint + * @function getTypeUrl + * @memberof google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OpeningHoursPoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place.OpeningHours.OpeningHoursPeriod.OpeningHoursPoint"; + }; + + return OpeningHoursPoint; + })(); + + return OpeningHoursPeriod; + })(); + + /** + * SecondaryHourType enum. + * @name google.maps.places.v1.Place.OpeningHours.SecondaryHourType + * @enum {number} + * @property {number} SECONDARY_HOUR_TYPE_UNSPECIFIED=0 SECONDARY_HOUR_TYPE_UNSPECIFIED value + * @property {number} DRIVE_THROUGH=1 DRIVE_THROUGH value + * @property {number} HAPPY_HOUR=2 HAPPY_HOUR value + * @property {number} DELIVERY=3 DELIVERY value + * @property {number} TAKEOUT=4 TAKEOUT value + * @property {number} KITCHEN=5 KITCHEN value + * @property {number} BREAKFAST=6 BREAKFAST value + * @property {number} LUNCH=7 LUNCH value + * @property {number} DINNER=8 DINNER value + * @property {number} BRUNCH=9 BRUNCH value + * @property {number} PICKUP=10 PICKUP value + * @property {number} ACCESS=11 ACCESS value + * @property {number} SENIOR_HOURS=12 SENIOR_HOURS value + * @property {number} ONLINE_SERVICE_HOURS=13 ONLINE_SERVICE_HOURS value + */ + OpeningHours.SecondaryHourType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SECONDARY_HOUR_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DRIVE_THROUGH"] = 1; + values[valuesById[2] = "HAPPY_HOUR"] = 2; + values[valuesById[3] = "DELIVERY"] = 3; + values[valuesById[4] = "TAKEOUT"] = 4; + values[valuesById[5] = "KITCHEN"] = 5; + values[valuesById[6] = "BREAKFAST"] = 6; + values[valuesById[7] = "LUNCH"] = 7; + values[valuesById[8] = "DINNER"] = 8; + values[valuesById[9] = "BRUNCH"] = 9; + values[valuesById[10] = "PICKUP"] = 10; + values[valuesById[11] = "ACCESS"] = 11; + values[valuesById[12] = "SENIOR_HOURS"] = 12; + values[valuesById[13] = "ONLINE_SERVICE_HOURS"] = 13; + return values; + })(); + + OpeningHours.SpecialDay = (function() { + + /** + * Properties of a SpecialDay. + * @memberof google.maps.places.v1.Place.OpeningHours + * @interface ISpecialDay + * @property {google.type.IDate|null} [date] SpecialDay date + */ + + /** + * Constructs a new SpecialDay. + * @memberof google.maps.places.v1.Place.OpeningHours + * @classdesc Represents a SpecialDay. + * @implements ISpecialDay + * @constructor + * @param {google.maps.places.v1.Place.OpeningHours.ISpecialDay=} [properties] Properties to set + */ + function SpecialDay(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]]; + } + + /** + * SpecialDay date. + * @member {google.type.IDate|null|undefined} date + * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay + * @instance + */ + SpecialDay.prototype.date = null; + + /** + * Creates a new SpecialDay instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay + * @static + * @param {google.maps.places.v1.Place.OpeningHours.ISpecialDay=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.OpeningHours.SpecialDay} SpecialDay instance + */ + SpecialDay.create = function create(properties) { + return new SpecialDay(properties); + }; + + /** + * Encodes the specified SpecialDay message. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.SpecialDay.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay + * @static + * @param {google.maps.places.v1.Place.OpeningHours.ISpecialDay} message SpecialDay message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SpecialDay.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.date != null && Object.hasOwnProperty.call(message, "date")) + $root.google.type.Date.encode(message.date, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SpecialDay message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.OpeningHours.SpecialDay.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay + * @static + * @param {google.maps.places.v1.Place.OpeningHours.ISpecialDay} message SpecialDay message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SpecialDay.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SpecialDay message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place.OpeningHours.SpecialDay} SpecialDay + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SpecialDay.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.OpeningHours.SpecialDay(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.date = $root.google.type.Date.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SpecialDay message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place.OpeningHours.SpecialDay} SpecialDay + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SpecialDay.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SpecialDay message. + * @function verify + * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SpecialDay.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.date != null && message.hasOwnProperty("date")) { + var error = $root.google.type.Date.verify(message.date); + if (error) + return "date." + error; + } + return null; + }; + + /** + * Creates a SpecialDay message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place.OpeningHours.SpecialDay} SpecialDay + */ + SpecialDay.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.OpeningHours.SpecialDay) + return object; + var message = new $root.google.maps.places.v1.Place.OpeningHours.SpecialDay(); + if (object.date != null) { + if (typeof object.date !== "object") + throw TypeError(".google.maps.places.v1.Place.OpeningHours.SpecialDay.date: object expected"); + message.date = $root.google.type.Date.fromObject(object.date); + } + return message; + }; + + /** + * Creates a plain object from a SpecialDay message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay + * @static + * @param {google.maps.places.v1.Place.OpeningHours.SpecialDay} message SpecialDay + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SpecialDay.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.date = null; + if (message.date != null && message.hasOwnProperty("date")) + object.date = $root.google.type.Date.toObject(message.date, options); + return object; + }; + + /** + * Converts this SpecialDay to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay + * @instance + * @returns {Object.} JSON object + */ + SpecialDay.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SpecialDay + * @function getTypeUrl + * @memberof google.maps.places.v1.Place.OpeningHours.SpecialDay + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SpecialDay.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place.OpeningHours.SpecialDay"; + }; + + return SpecialDay; + })(); + + return OpeningHours; + })(); + + /** + * BusinessStatus enum. + * @name google.maps.places.v1.Place.BusinessStatus + * @enum {number} + * @property {number} BUSINESS_STATUS_UNSPECIFIED=0 BUSINESS_STATUS_UNSPECIFIED value + * @property {number} OPERATIONAL=1 OPERATIONAL value + * @property {number} CLOSED_TEMPORARILY=2 CLOSED_TEMPORARILY value + * @property {number} CLOSED_PERMANENTLY=3 CLOSED_PERMANENTLY value + */ + Place.BusinessStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BUSINESS_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPERATIONAL"] = 1; + values[valuesById[2] = "CLOSED_TEMPORARILY"] = 2; + values[valuesById[3] = "CLOSED_PERMANENTLY"] = 3; + return values; + })(); + + Place.Attribution = (function() { + + /** + * Properties of an Attribution. + * @memberof google.maps.places.v1.Place + * @interface IAttribution + * @property {string|null} [provider] Attribution provider + * @property {string|null} [providerUri] Attribution providerUri + */ + + /** + * Constructs a new Attribution. + * @memberof google.maps.places.v1.Place + * @classdesc Represents an Attribution. + * @implements IAttribution + * @constructor + * @param {google.maps.places.v1.Place.IAttribution=} [properties] Properties to set + */ + function Attribution(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]]; + } + + /** + * Attribution provider. + * @member {string} provider + * @memberof google.maps.places.v1.Place.Attribution + * @instance + */ + Attribution.prototype.provider = ""; + + /** + * Attribution providerUri. + * @member {string} providerUri + * @memberof google.maps.places.v1.Place.Attribution + * @instance + */ + Attribution.prototype.providerUri = ""; + + /** + * Creates a new Attribution instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place.Attribution + * @static + * @param {google.maps.places.v1.Place.IAttribution=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.Attribution} Attribution instance + */ + Attribution.create = function create(properties) { + return new Attribution(properties); + }; + + /** + * Encodes the specified Attribution message. Does not implicitly {@link google.maps.places.v1.Place.Attribution.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place.Attribution + * @static + * @param {google.maps.places.v1.Place.IAttribution} message Attribution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Attribution.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.provider != null && Object.hasOwnProperty.call(message, "provider")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.provider); + if (message.providerUri != null && Object.hasOwnProperty.call(message, "providerUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.providerUri); + return writer; + }; + + /** + * Encodes the specified Attribution message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.Attribution.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place.Attribution + * @static + * @param {google.maps.places.v1.Place.IAttribution} message Attribution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Attribution.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Attribution message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place.Attribution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place.Attribution} Attribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Attribution.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.Attribution(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.provider = reader.string(); + break; + } + case 2: { + message.providerUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Attribution message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place.Attribution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place.Attribution} Attribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Attribution.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Attribution message. + * @function verify + * @memberof google.maps.places.v1.Place.Attribution + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Attribution.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.provider != null && message.hasOwnProperty("provider")) + if (!$util.isString(message.provider)) + return "provider: string expected"; + if (message.providerUri != null && message.hasOwnProperty("providerUri")) + if (!$util.isString(message.providerUri)) + return "providerUri: string expected"; + return null; + }; + + /** + * Creates an Attribution message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place.Attribution + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place.Attribution} Attribution + */ + Attribution.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.Attribution) + return object; + var message = new $root.google.maps.places.v1.Place.Attribution(); + if (object.provider != null) + message.provider = String(object.provider); + if (object.providerUri != null) + message.providerUri = String(object.providerUri); + return message; + }; + + /** + * Creates a plain object from an Attribution message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place.Attribution + * @static + * @param {google.maps.places.v1.Place.Attribution} message Attribution + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Attribution.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.provider = ""; + object.providerUri = ""; + } + if (message.provider != null && message.hasOwnProperty("provider")) + object.provider = message.provider; + if (message.providerUri != null && message.hasOwnProperty("providerUri")) + object.providerUri = message.providerUri; + return object; + }; + + /** + * Converts this Attribution to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place.Attribution + * @instance + * @returns {Object.} JSON object + */ + Attribution.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Attribution + * @function getTypeUrl + * @memberof google.maps.places.v1.Place.Attribution + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Attribution.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place.Attribution"; + }; + + return Attribution; + })(); + + Place.EditorialSummary = (function() { + + /** + * Properties of an EditorialSummary. + * @memberof google.maps.places.v1.Place + * @interface IEditorialSummary + * @property {google.type.ILocalizedText|null} [overview] EditorialSummary overview + */ + + /** + * Constructs a new EditorialSummary. + * @memberof google.maps.places.v1.Place + * @classdesc Represents an EditorialSummary. + * @implements IEditorialSummary + * @constructor + * @param {google.maps.places.v1.Place.IEditorialSummary=} [properties] Properties to set + */ + function EditorialSummary(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]]; + } + + /** + * EditorialSummary overview. + * @member {google.type.ILocalizedText|null|undefined} overview + * @memberof google.maps.places.v1.Place.EditorialSummary + * @instance + */ + EditorialSummary.prototype.overview = null; + + /** + * Creates a new EditorialSummary instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Place.EditorialSummary + * @static + * @param {google.maps.places.v1.Place.IEditorialSummary=} [properties] Properties to set + * @returns {google.maps.places.v1.Place.EditorialSummary} EditorialSummary instance + */ + EditorialSummary.create = function create(properties) { + return new EditorialSummary(properties); + }; + + /** + * Encodes the specified EditorialSummary message. Does not implicitly {@link google.maps.places.v1.Place.EditorialSummary.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Place.EditorialSummary + * @static + * @param {google.maps.places.v1.Place.IEditorialSummary} message EditorialSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditorialSummary.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.overview != null && Object.hasOwnProperty.call(message, "overview")) + $root.google.type.LocalizedText.encode(message.overview, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EditorialSummary message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.EditorialSummary.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Place.EditorialSummary + * @static + * @param {google.maps.places.v1.Place.IEditorialSummary} message EditorialSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditorialSummary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EditorialSummary message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Place.EditorialSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Place.EditorialSummary} EditorialSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditorialSummary.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.EditorialSummary(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.overview = $root.google.type.LocalizedText.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EditorialSummary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Place.EditorialSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Place.EditorialSummary} EditorialSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditorialSummary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EditorialSummary message. + * @function verify + * @memberof google.maps.places.v1.Place.EditorialSummary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EditorialSummary.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.overview != null && message.hasOwnProperty("overview")) { + var error = $root.google.type.LocalizedText.verify(message.overview); + if (error) + return "overview." + error; + } + return null; + }; + + /** + * Creates an EditorialSummary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Place.EditorialSummary + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Place.EditorialSummary} EditorialSummary + */ + EditorialSummary.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Place.EditorialSummary) + return object; + var message = new $root.google.maps.places.v1.Place.EditorialSummary(); + if (object.overview != null) { + if (typeof object.overview !== "object") + throw TypeError(".google.maps.places.v1.Place.EditorialSummary.overview: object expected"); + message.overview = $root.google.type.LocalizedText.fromObject(object.overview); + } + return message; + }; + + /** + * Creates a plain object from an EditorialSummary message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Place.EditorialSummary + * @static + * @param {google.maps.places.v1.Place.EditorialSummary} message EditorialSummary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EditorialSummary.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.overview = null; + if (message.overview != null && message.hasOwnProperty("overview")) + object.overview = $root.google.type.LocalizedText.toObject(message.overview, options); + return object; + }; + + /** + * Converts this EditorialSummary to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Place.EditorialSummary + * @instance + * @returns {Object.} JSON object + */ + EditorialSummary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EditorialSummary + * @function getTypeUrl + * @memberof google.maps.places.v1.Place.EditorialSummary + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EditorialSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Place.EditorialSummary"; + }; + + return EditorialSummary; + })(); + + return Place; + })(); + + /** + * PriceLevel enum. + * @name google.maps.places.v1.PriceLevel + * @enum {number} + * @property {number} PRICE_LEVEL_UNSPECIFIED=0 PRICE_LEVEL_UNSPECIFIED value + * @property {number} FREE=1 FREE value + * @property {number} INEXPENSIVE=2 INEXPENSIVE value + * @property {number} MODERATE=3 MODERATE value + * @property {number} EXPENSIVE=4 EXPENSIVE value + * @property {number} VERY_EXPENSIVE=5 VERY_EXPENSIVE value + */ + v1.PriceLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PRICE_LEVEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "FREE"] = 1; + values[valuesById[2] = "INEXPENSIVE"] = 2; + values[valuesById[3] = "MODERATE"] = 3; + values[valuesById[4] = "EXPENSIVE"] = 4; + values[valuesById[5] = "VERY_EXPENSIVE"] = 5; + return values; + })(); + + v1.Places = (function() { + + /** + * Constructs a new Places service. + * @memberof google.maps.places.v1 + * @classdesc Represents a Places + * @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 Places(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Places.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Places; + + /** + * Creates new Places service using the specified rpc implementation. + * @function create + * @memberof google.maps.places.v1.Places + * @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 {Places} RPC service. Useful where requests and/or responses are streamed. + */ + Places.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.maps.places.v1.Places|searchText}. + * @memberof google.maps.places.v1.Places + * @typedef SearchTextCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.maps.places.v1.SearchTextResponse} [response] SearchTextResponse + */ + + /** + * Calls SearchText. + * @function searchText + * @memberof google.maps.places.v1.Places + * @instance + * @param {google.maps.places.v1.ISearchTextRequest} request SearchTextRequest message or plain object + * @param {google.maps.places.v1.Places.SearchTextCallback} callback Node-style callback called with the error, if any, and SearchTextResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Places.prototype.searchText = function searchText(request, callback) { + return this.rpcCall(searchText, $root.google.maps.places.v1.SearchTextRequest, $root.google.maps.places.v1.SearchTextResponse, request, callback); + }, "name", { value: "SearchText" }); + + /** + * Calls SearchText. + * @function searchText + * @memberof google.maps.places.v1.Places + * @instance + * @param {google.maps.places.v1.ISearchTextRequest} request SearchTextRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Places; + })(); + + v1.Int32Range = (function() { + + /** + * Properties of an Int32Range. + * @memberof google.maps.places.v1 + * @interface IInt32Range + * @property {number|null} [min] Int32Range min + * @property {number|null} [max] Int32Range max + */ + + /** + * Constructs a new Int32Range. + * @memberof google.maps.places.v1 + * @classdesc Represents an Int32Range. + * @implements IInt32Range + * @constructor + * @param {google.maps.places.v1.IInt32Range=} [properties] Properties to set + */ + function Int32Range(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]]; + } + + /** + * Int32Range min. + * @member {number|null|undefined} min + * @memberof google.maps.places.v1.Int32Range + * @instance + */ + Int32Range.prototype.min = null; + + /** + * Int32Range max. + * @member {number|null|undefined} max + * @memberof google.maps.places.v1.Int32Range + * @instance + */ + Int32Range.prototype.max = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Int32Range _min. + * @member {"min"|undefined} _min + * @memberof google.maps.places.v1.Int32Range + * @instance + */ + Object.defineProperty(Int32Range.prototype, "_min", { + get: $util.oneOfGetter($oneOfFields = ["min"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Int32Range _max. + * @member {"max"|undefined} _max + * @memberof google.maps.places.v1.Int32Range + * @instance + */ + Object.defineProperty(Int32Range.prototype, "_max", { + get: $util.oneOfGetter($oneOfFields = ["max"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Int32Range instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.Int32Range + * @static + * @param {google.maps.places.v1.IInt32Range=} [properties] Properties to set + * @returns {google.maps.places.v1.Int32Range} Int32Range instance + */ + Int32Range.create = function create(properties) { + return new Int32Range(properties); + }; + + /** + * Encodes the specified Int32Range message. Does not implicitly {@link google.maps.places.v1.Int32Range.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.Int32Range + * @static + * @param {google.maps.places.v1.IInt32Range} message Int32Range message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int32Range.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.min != null && Object.hasOwnProperty.call(message, "min")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.min); + if (message.max != null && Object.hasOwnProperty.call(message, "max")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.max); + return writer; + }; + + /** + * Encodes the specified Int32Range message, length delimited. Does not implicitly {@link google.maps.places.v1.Int32Range.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.Int32Range + * @static + * @param {google.maps.places.v1.IInt32Range} message Int32Range message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int32Range.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Int32Range message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.Int32Range + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.Int32Range} Int32Range + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int32Range.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Int32Range(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.min = reader.int32(); + break; + } + case 2: { + message.max = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Int32Range message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.Int32Range + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.Int32Range} Int32Range + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int32Range.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Int32Range message. + * @function verify + * @memberof google.maps.places.v1.Int32Range + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Int32Range.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.min != null && message.hasOwnProperty("min")) { + properties._min = 1; + if (!$util.isInteger(message.min)) + return "min: integer expected"; + } + if (message.max != null && message.hasOwnProperty("max")) { + properties._max = 1; + if (!$util.isInteger(message.max)) + return "max: integer expected"; + } + return null; + }; + + /** + * Creates an Int32Range message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.Int32Range + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.Int32Range} Int32Range + */ + Int32Range.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.Int32Range) + return object; + var message = new $root.google.maps.places.v1.Int32Range(); + if (object.min != null) + message.min = object.min | 0; + if (object.max != null) + message.max = object.max | 0; + return message; + }; + + /** + * Creates a plain object from an Int32Range message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.Int32Range + * @static + * @param {google.maps.places.v1.Int32Range} message Int32Range + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Int32Range.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.min != null && message.hasOwnProperty("min")) { + object.min = message.min; + if (options.oneofs) + object._min = "min"; + } + if (message.max != null && message.hasOwnProperty("max")) { + object.max = message.max; + if (options.oneofs) + object._max = "max"; + } + return object; + }; + + /** + * Converts this Int32Range to JSON. + * @function toJSON + * @memberof google.maps.places.v1.Int32Range + * @instance + * @returns {Object.} JSON object + */ + Int32Range.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Int32Range + * @function getTypeUrl + * @memberof google.maps.places.v1.Int32Range + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Int32Range.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.Int32Range"; + }; + + return Int32Range; + })(); + + v1.SearchTextRequest = (function() { + + /** + * Properties of a SearchTextRequest. + * @memberof google.maps.places.v1 + * @interface ISearchTextRequest + * @property {string|null} [textQuery] SearchTextRequest textQuery + * @property {string|null} [languageCode] SearchTextRequest languageCode + * @property {string|null} [regionCode] SearchTextRequest regionCode + * @property {google.maps.places.v1.SearchTextRequest.RankPreference|null} [rankPreference] SearchTextRequest rankPreference + * @property {google.maps.places.v1.SearchTextRequest.ILocation|null} [location] SearchTextRequest location + * @property {string|null} [includedType] SearchTextRequest includedType + * @property {boolean|null} [openNow] SearchTextRequest openNow + * @property {google.maps.places.v1.IInt32Range|null} [priceRange] SearchTextRequest priceRange + * @property {number|null} [minRating] SearchTextRequest minRating + * @property {number|null} [maxResultCount] SearchTextRequest maxResultCount + * @property {Array.|null} [priceLevels] SearchTextRequest priceLevels + * @property {boolean|null} [strictTypeFiltering] SearchTextRequest strictTypeFiltering + * @property {google.maps.places.v1.SearchTextRequest.ILocationBias|null} [locationBias] SearchTextRequest locationBias + * @property {google.maps.places.v1.SearchTextRequest.ILocationRestriction|null} [locationRestriction] SearchTextRequest locationRestriction + */ + + /** + * Constructs a new SearchTextRequest. + * @memberof google.maps.places.v1 + * @classdesc Represents a SearchTextRequest. + * @implements ISearchTextRequest + * @constructor + * @param {google.maps.places.v1.ISearchTextRequest=} [properties] Properties to set + */ + function SearchTextRequest(properties) { + this.priceLevels = []; + 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]]; + } + + /** + * SearchTextRequest textQuery. + * @member {string} textQuery + * @memberof google.maps.places.v1.SearchTextRequest + * @instance + */ + SearchTextRequest.prototype.textQuery = ""; + + /** + * SearchTextRequest languageCode. + * @member {string} languageCode + * @memberof google.maps.places.v1.SearchTextRequest + * @instance + */ + SearchTextRequest.prototype.languageCode = ""; + + /** + * SearchTextRequest regionCode. + * @member {string} regionCode + * @memberof google.maps.places.v1.SearchTextRequest + * @instance + */ + SearchTextRequest.prototype.regionCode = ""; + + /** + * SearchTextRequest rankPreference. + * @member {google.maps.places.v1.SearchTextRequest.RankPreference} rankPreference + * @memberof google.maps.places.v1.SearchTextRequest + * @instance + */ + SearchTextRequest.prototype.rankPreference = 0; + + /** + * SearchTextRequest location. + * @member {google.maps.places.v1.SearchTextRequest.ILocation|null|undefined} location + * @memberof google.maps.places.v1.SearchTextRequest + * @instance + */ + SearchTextRequest.prototype.location = null; + + /** + * SearchTextRequest includedType. + * @member {string} includedType + * @memberof google.maps.places.v1.SearchTextRequest + * @instance + */ + SearchTextRequest.prototype.includedType = ""; + + /** + * SearchTextRequest openNow. + * @member {boolean} openNow + * @memberof google.maps.places.v1.SearchTextRequest + * @instance + */ + SearchTextRequest.prototype.openNow = false; + + /** + * SearchTextRequest priceRange. + * @member {google.maps.places.v1.IInt32Range|null|undefined} priceRange + * @memberof google.maps.places.v1.SearchTextRequest + * @instance + */ + SearchTextRequest.prototype.priceRange = null; + + /** + * SearchTextRequest minRating. + * @member {number} minRating + * @memberof google.maps.places.v1.SearchTextRequest + * @instance + */ + SearchTextRequest.prototype.minRating = 0; + + /** + * SearchTextRequest maxResultCount. + * @member {number} maxResultCount + * @memberof google.maps.places.v1.SearchTextRequest + * @instance + */ + SearchTextRequest.prototype.maxResultCount = 0; + + /** + * SearchTextRequest priceLevels. + * @member {Array.} priceLevels + * @memberof google.maps.places.v1.SearchTextRequest + * @instance + */ + SearchTextRequest.prototype.priceLevels = $util.emptyArray; + + /** + * SearchTextRequest strictTypeFiltering. + * @member {boolean} strictTypeFiltering + * @memberof google.maps.places.v1.SearchTextRequest + * @instance + */ + SearchTextRequest.prototype.strictTypeFiltering = false; + + /** + * SearchTextRequest locationBias. + * @member {google.maps.places.v1.SearchTextRequest.ILocationBias|null|undefined} locationBias + * @memberof google.maps.places.v1.SearchTextRequest + * @instance + */ + SearchTextRequest.prototype.locationBias = null; + + /** + * SearchTextRequest locationRestriction. + * @member {google.maps.places.v1.SearchTextRequest.ILocationRestriction|null|undefined} locationRestriction + * @memberof google.maps.places.v1.SearchTextRequest + * @instance + */ + SearchTextRequest.prototype.locationRestriction = null; + + /** + * Creates a new SearchTextRequest instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.SearchTextRequest + * @static + * @param {google.maps.places.v1.ISearchTextRequest=} [properties] Properties to set + * @returns {google.maps.places.v1.SearchTextRequest} SearchTextRequest instance + */ + SearchTextRequest.create = function create(properties) { + return new SearchTextRequest(properties); + }; + + /** + * Encodes the specified SearchTextRequest message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.SearchTextRequest + * @static + * @param {google.maps.places.v1.ISearchTextRequest} message SearchTextRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchTextRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.textQuery != null && Object.hasOwnProperty.call(message, "textQuery")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.textQuery); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode); + if (message.regionCode != null && Object.hasOwnProperty.call(message, "regionCode")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.regionCode); + if (message.rankPreference != null && Object.hasOwnProperty.call(message, "rankPreference")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.rankPreference); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + $root.google.maps.places.v1.SearchTextRequest.Location.encode(message.location, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.includedType != null && Object.hasOwnProperty.call(message, "includedType")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.includedType); + if (message.openNow != null && Object.hasOwnProperty.call(message, "openNow")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.openNow); + if (message.priceRange != null && Object.hasOwnProperty.call(message, "priceRange")) + $root.google.maps.places.v1.Int32Range.encode(message.priceRange, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.minRating != null && Object.hasOwnProperty.call(message, "minRating")) + writer.uint32(/* id 9, wireType 1 =*/73).double(message.minRating); + if (message.maxResultCount != null && Object.hasOwnProperty.call(message, "maxResultCount")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.maxResultCount); + if (message.priceLevels != null && message.priceLevels.length) { + writer.uint32(/* id 11, wireType 2 =*/90).fork(); + for (var i = 0; i < message.priceLevels.length; ++i) + writer.int32(message.priceLevels[i]); + writer.ldelim(); + } + if (message.strictTypeFiltering != null && Object.hasOwnProperty.call(message, "strictTypeFiltering")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.strictTypeFiltering); + if (message.locationBias != null && Object.hasOwnProperty.call(message, "locationBias")) + $root.google.maps.places.v1.SearchTextRequest.LocationBias.encode(message.locationBias, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.locationRestriction != null && Object.hasOwnProperty.call(message, "locationRestriction")) + $root.google.maps.places.v1.SearchTextRequest.LocationRestriction.encode(message.locationRestriction, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SearchTextRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.SearchTextRequest + * @static + * @param {google.maps.places.v1.ISearchTextRequest} message SearchTextRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchTextRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchTextRequest message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.SearchTextRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.SearchTextRequest} SearchTextRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchTextRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchTextRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.textQuery = reader.string(); + break; + } + case 2: { + message.languageCode = reader.string(); + break; + } + case 3: { + message.regionCode = reader.string(); + break; + } + case 4: { + message.rankPreference = reader.int32(); + break; + } + case 5: { + message.location = $root.google.maps.places.v1.SearchTextRequest.Location.decode(reader, reader.uint32()); + break; + } + case 6: { + message.includedType = reader.string(); + break; + } + case 7: { + message.openNow = reader.bool(); + break; + } + case 8: { + message.priceRange = $root.google.maps.places.v1.Int32Range.decode(reader, reader.uint32()); + break; + } + case 9: { + message.minRating = reader.double(); + break; + } + case 10: { + message.maxResultCount = reader.int32(); + break; + } + case 11: { + if (!(message.priceLevels && message.priceLevels.length)) + message.priceLevels = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.priceLevels.push(reader.int32()); + } else + message.priceLevels.push(reader.int32()); + break; + } + case 12: { + message.strictTypeFiltering = reader.bool(); + break; + } + case 13: { + message.locationBias = $root.google.maps.places.v1.SearchTextRequest.LocationBias.decode(reader, reader.uint32()); + break; + } + case 14: { + message.locationRestriction = $root.google.maps.places.v1.SearchTextRequest.LocationRestriction.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchTextRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.SearchTextRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.SearchTextRequest} SearchTextRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchTextRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchTextRequest message. + * @function verify + * @memberof google.maps.places.v1.SearchTextRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchTextRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.textQuery != null && message.hasOwnProperty("textQuery")) + if (!$util.isString(message.textQuery)) + return "textQuery: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.regionCode != null && message.hasOwnProperty("regionCode")) + if (!$util.isString(message.regionCode)) + return "regionCode: string expected"; + if (message.rankPreference != null && message.hasOwnProperty("rankPreference")) + switch (message.rankPreference) { + default: + return "rankPreference: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.location != null && message.hasOwnProperty("location")) { + var error = $root.google.maps.places.v1.SearchTextRequest.Location.verify(message.location); + if (error) + return "location." + error; + } + if (message.includedType != null && message.hasOwnProperty("includedType")) + if (!$util.isString(message.includedType)) + return "includedType: string expected"; + if (message.openNow != null && message.hasOwnProperty("openNow")) + if (typeof message.openNow !== "boolean") + return "openNow: boolean expected"; + if (message.priceRange != null && message.hasOwnProperty("priceRange")) { + var error = $root.google.maps.places.v1.Int32Range.verify(message.priceRange); + if (error) + return "priceRange." + error; + } + if (message.minRating != null && message.hasOwnProperty("minRating")) + if (typeof message.minRating !== "number") + return "minRating: number expected"; + if (message.maxResultCount != null && message.hasOwnProperty("maxResultCount")) + if (!$util.isInteger(message.maxResultCount)) + return "maxResultCount: integer expected"; + if (message.priceLevels != null && message.hasOwnProperty("priceLevels")) { + if (!Array.isArray(message.priceLevels)) + return "priceLevels: array expected"; + for (var i = 0; i < message.priceLevels.length; ++i) + switch (message.priceLevels[i]) { + default: + return "priceLevels: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + } + if (message.strictTypeFiltering != null && message.hasOwnProperty("strictTypeFiltering")) + if (typeof message.strictTypeFiltering !== "boolean") + return "strictTypeFiltering: boolean expected"; + if (message.locationBias != null && message.hasOwnProperty("locationBias")) { + var error = $root.google.maps.places.v1.SearchTextRequest.LocationBias.verify(message.locationBias); + if (error) + return "locationBias." + error; + } + if (message.locationRestriction != null && message.hasOwnProperty("locationRestriction")) { + var error = $root.google.maps.places.v1.SearchTextRequest.LocationRestriction.verify(message.locationRestriction); + if (error) + return "locationRestriction." + error; + } + return null; + }; + + /** + * Creates a SearchTextRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.SearchTextRequest + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.SearchTextRequest} SearchTextRequest + */ + SearchTextRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.SearchTextRequest) + return object; + var message = new $root.google.maps.places.v1.SearchTextRequest(); + if (object.textQuery != null) + message.textQuery = String(object.textQuery); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.regionCode != null) + message.regionCode = String(object.regionCode); + switch (object.rankPreference) { + default: + if (typeof object.rankPreference === "number") { + message.rankPreference = object.rankPreference; + break; + } + break; + case "RANK_PREFERENCE_UNSPECIFIED": + case 0: + message.rankPreference = 0; + break; + case "DISTANCE": + case 1: + message.rankPreference = 1; + break; + case "RELEVANCE": + case 2: + message.rankPreference = 2; + break; + } + if (object.location != null) { + if (typeof object.location !== "object") + throw TypeError(".google.maps.places.v1.SearchTextRequest.location: object expected"); + message.location = $root.google.maps.places.v1.SearchTextRequest.Location.fromObject(object.location); + } + if (object.includedType != null) + message.includedType = String(object.includedType); + if (object.openNow != null) + message.openNow = Boolean(object.openNow); + if (object.priceRange != null) { + if (typeof object.priceRange !== "object") + throw TypeError(".google.maps.places.v1.SearchTextRequest.priceRange: object expected"); + message.priceRange = $root.google.maps.places.v1.Int32Range.fromObject(object.priceRange); + } + if (object.minRating != null) + message.minRating = Number(object.minRating); + if (object.maxResultCount != null) + message.maxResultCount = object.maxResultCount | 0; + if (object.priceLevels) { + if (!Array.isArray(object.priceLevels)) + throw TypeError(".google.maps.places.v1.SearchTextRequest.priceLevels: array expected"); + message.priceLevels = []; + for (var i = 0; i < object.priceLevels.length; ++i) + switch (object.priceLevels[i]) { + default: + if (typeof object.priceLevels[i] === "number") { + message.priceLevels[i] = object.priceLevels[i]; + break; + } + case "PRICE_LEVEL_UNSPECIFIED": + case 0: + message.priceLevels[i] = 0; + break; + case "FREE": + case 1: + message.priceLevels[i] = 1; + break; + case "INEXPENSIVE": + case 2: + message.priceLevels[i] = 2; + break; + case "MODERATE": + case 3: + message.priceLevels[i] = 3; + break; + case "EXPENSIVE": + case 4: + message.priceLevels[i] = 4; + break; + case "VERY_EXPENSIVE": + case 5: + message.priceLevels[i] = 5; + break; + } + } + if (object.strictTypeFiltering != null) + message.strictTypeFiltering = Boolean(object.strictTypeFiltering); + if (object.locationBias != null) { + if (typeof object.locationBias !== "object") + throw TypeError(".google.maps.places.v1.SearchTextRequest.locationBias: object expected"); + message.locationBias = $root.google.maps.places.v1.SearchTextRequest.LocationBias.fromObject(object.locationBias); + } + if (object.locationRestriction != null) { + if (typeof object.locationRestriction !== "object") + throw TypeError(".google.maps.places.v1.SearchTextRequest.locationRestriction: object expected"); + message.locationRestriction = $root.google.maps.places.v1.SearchTextRequest.LocationRestriction.fromObject(object.locationRestriction); + } + return message; + }; + + /** + * Creates a plain object from a SearchTextRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.SearchTextRequest + * @static + * @param {google.maps.places.v1.SearchTextRequest} message SearchTextRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchTextRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.priceLevels = []; + if (options.defaults) { + object.textQuery = ""; + object.languageCode = ""; + object.regionCode = ""; + object.rankPreference = options.enums === String ? "RANK_PREFERENCE_UNSPECIFIED" : 0; + object.location = null; + object.includedType = ""; + object.openNow = false; + object.priceRange = null; + object.minRating = 0; + object.maxResultCount = 0; + object.strictTypeFiltering = false; + object.locationBias = null; + object.locationRestriction = null; + } + if (message.textQuery != null && message.hasOwnProperty("textQuery")) + object.textQuery = message.textQuery; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.regionCode != null && message.hasOwnProperty("regionCode")) + object.regionCode = message.regionCode; + if (message.rankPreference != null && message.hasOwnProperty("rankPreference")) + object.rankPreference = options.enums === String ? $root.google.maps.places.v1.SearchTextRequest.RankPreference[message.rankPreference] === undefined ? message.rankPreference : $root.google.maps.places.v1.SearchTextRequest.RankPreference[message.rankPreference] : message.rankPreference; + if (message.location != null && message.hasOwnProperty("location")) + object.location = $root.google.maps.places.v1.SearchTextRequest.Location.toObject(message.location, options); + if (message.includedType != null && message.hasOwnProperty("includedType")) + object.includedType = message.includedType; + if (message.openNow != null && message.hasOwnProperty("openNow")) + object.openNow = message.openNow; + if (message.priceRange != null && message.hasOwnProperty("priceRange")) + object.priceRange = $root.google.maps.places.v1.Int32Range.toObject(message.priceRange, options); + if (message.minRating != null && message.hasOwnProperty("minRating")) + object.minRating = options.json && !isFinite(message.minRating) ? String(message.minRating) : message.minRating; + if (message.maxResultCount != null && message.hasOwnProperty("maxResultCount")) + object.maxResultCount = message.maxResultCount; + if (message.priceLevels && message.priceLevels.length) { + object.priceLevels = []; + for (var j = 0; j < message.priceLevels.length; ++j) + object.priceLevels[j] = options.enums === String ? $root.google.maps.places.v1.PriceLevel[message.priceLevels[j]] === undefined ? message.priceLevels[j] : $root.google.maps.places.v1.PriceLevel[message.priceLevels[j]] : message.priceLevels[j]; + } + if (message.strictTypeFiltering != null && message.hasOwnProperty("strictTypeFiltering")) + object.strictTypeFiltering = message.strictTypeFiltering; + if (message.locationBias != null && message.hasOwnProperty("locationBias")) + object.locationBias = $root.google.maps.places.v1.SearchTextRequest.LocationBias.toObject(message.locationBias, options); + if (message.locationRestriction != null && message.hasOwnProperty("locationRestriction")) + object.locationRestriction = $root.google.maps.places.v1.SearchTextRequest.LocationRestriction.toObject(message.locationRestriction, options); + return object; + }; + + /** + * Converts this SearchTextRequest to JSON. + * @function toJSON + * @memberof google.maps.places.v1.SearchTextRequest + * @instance + * @returns {Object.} JSON object + */ + SearchTextRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchTextRequest + * @function getTypeUrl + * @memberof google.maps.places.v1.SearchTextRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchTextRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.SearchTextRequest"; + }; + + /** + * RankPreference enum. + * @name google.maps.places.v1.SearchTextRequest.RankPreference + * @enum {number} + * @property {number} RANK_PREFERENCE_UNSPECIFIED=0 RANK_PREFERENCE_UNSPECIFIED value + * @property {number} DISTANCE=1 DISTANCE value + * @property {number} RELEVANCE=2 RELEVANCE value + */ + SearchTextRequest.RankPreference = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RANK_PREFERENCE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DISTANCE"] = 1; + values[valuesById[2] = "RELEVANCE"] = 2; + return values; + })(); + + SearchTextRequest.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.maps.places.v1.SearchTextRequest + * @interface ILocation + * @property {google.geo.type.IViewport|null} [rectangle] Location rectangle + * @property {boolean|null} [strictRestriction] Location strictRestriction + */ + + /** + * Constructs a new Location. + * @memberof google.maps.places.v1.SearchTextRequest + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.maps.places.v1.SearchTextRequest.ILocation=} [properties] Properties to set + */ + function Location(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]]; + } + + /** + * Location rectangle. + * @member {google.geo.type.IViewport|null|undefined} rectangle + * @memberof google.maps.places.v1.SearchTextRequest.Location + * @instance + */ + Location.prototype.rectangle = null; + + /** + * Location strictRestriction. + * @member {boolean} strictRestriction + * @memberof google.maps.places.v1.SearchTextRequest.Location + * @instance + */ + Location.prototype.strictRestriction = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Location type. + * @member {"rectangle"|undefined} type + * @memberof google.maps.places.v1.SearchTextRequest.Location + * @instance + */ + Object.defineProperty(Location.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["rectangle"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.SearchTextRequest.Location + * @static + * @param {google.maps.places.v1.SearchTextRequest.ILocation=} [properties] Properties to set + * @returns {google.maps.places.v1.SearchTextRequest.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.Location.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.SearchTextRequest.Location + * @static + * @param {google.maps.places.v1.SearchTextRequest.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rectangle != null && Object.hasOwnProperty.call(message, "rectangle")) + $root.google.geo.type.Viewport.encode(message.rectangle, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.strictRestriction != null && Object.hasOwnProperty.call(message, "strictRestriction")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.strictRestriction); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.SearchTextRequest.Location + * @static + * @param {google.maps.places.v1.SearchTextRequest.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.SearchTextRequest.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.SearchTextRequest.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchTextRequest.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rectangle = $root.google.geo.type.Viewport.decode(reader, reader.uint32()); + break; + } + case 2: { + message.strictRestriction = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.SearchTextRequest.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.SearchTextRequest.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.maps.places.v1.SearchTextRequest.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.rectangle != null && message.hasOwnProperty("rectangle")) { + properties.type = 1; + { + var error = $root.google.geo.type.Viewport.verify(message.rectangle); + if (error) + return "rectangle." + error; + } + } + if (message.strictRestriction != null && message.hasOwnProperty("strictRestriction")) + if (typeof message.strictRestriction !== "boolean") + return "strictRestriction: boolean expected"; + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.SearchTextRequest.Location + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.SearchTextRequest.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.SearchTextRequest.Location) + return object; + var message = new $root.google.maps.places.v1.SearchTextRequest.Location(); + if (object.rectangle != null) { + if (typeof object.rectangle !== "object") + throw TypeError(".google.maps.places.v1.SearchTextRequest.Location.rectangle: object expected"); + message.rectangle = $root.google.geo.type.Viewport.fromObject(object.rectangle); + } + if (object.strictRestriction != null) + message.strictRestriction = Boolean(object.strictRestriction); + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.SearchTextRequest.Location + * @static + * @param {google.maps.places.v1.SearchTextRequest.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.strictRestriction = false; + if (message.rectangle != null && message.hasOwnProperty("rectangle")) { + object.rectangle = $root.google.geo.type.Viewport.toObject(message.rectangle, options); + if (options.oneofs) + object.type = "rectangle"; + } + if (message.strictRestriction != null && message.hasOwnProperty("strictRestriction")) + object.strictRestriction = message.strictRestriction; + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.maps.places.v1.SearchTextRequest.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.maps.places.v1.SearchTextRequest.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.SearchTextRequest.Location"; + }; + + return Location; + })(); + + SearchTextRequest.LocationBias = (function() { + + /** + * Properties of a LocationBias. + * @memberof google.maps.places.v1.SearchTextRequest + * @interface ILocationBias + * @property {google.geo.type.IViewport|null} [rectangle] LocationBias rectangle + * @property {google.maps.places.v1.ICircle|null} [circle] LocationBias circle + */ + + /** + * Constructs a new LocationBias. + * @memberof google.maps.places.v1.SearchTextRequest + * @classdesc Represents a LocationBias. + * @implements ILocationBias + * @constructor + * @param {google.maps.places.v1.SearchTextRequest.ILocationBias=} [properties] Properties to set + */ + function LocationBias(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]]; + } + + /** + * LocationBias rectangle. + * @member {google.geo.type.IViewport|null|undefined} rectangle + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @instance + */ + LocationBias.prototype.rectangle = null; + + /** + * LocationBias circle. + * @member {google.maps.places.v1.ICircle|null|undefined} circle + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @instance + */ + LocationBias.prototype.circle = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * LocationBias type. + * @member {"rectangle"|"circle"|undefined} type + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @instance + */ + Object.defineProperty(LocationBias.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["rectangle", "circle"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LocationBias instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @static + * @param {google.maps.places.v1.SearchTextRequest.ILocationBias=} [properties] Properties to set + * @returns {google.maps.places.v1.SearchTextRequest.LocationBias} LocationBias instance + */ + LocationBias.create = function create(properties) { + return new LocationBias(properties); + }; + + /** + * Encodes the specified LocationBias message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationBias.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @static + * @param {google.maps.places.v1.SearchTextRequest.ILocationBias} message LocationBias message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocationBias.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rectangle != null && Object.hasOwnProperty.call(message, "rectangle")) + $root.google.geo.type.Viewport.encode(message.rectangle, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.circle != null && Object.hasOwnProperty.call(message, "circle")) + $root.google.maps.places.v1.Circle.encode(message.circle, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LocationBias message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationBias.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @static + * @param {google.maps.places.v1.SearchTextRequest.ILocationBias} message LocationBias message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocationBias.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LocationBias message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.SearchTextRequest.LocationBias} LocationBias + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocationBias.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchTextRequest.LocationBias(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rectangle = $root.google.geo.type.Viewport.decode(reader, reader.uint32()); + break; + } + case 2: { + message.circle = $root.google.maps.places.v1.Circle.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LocationBias message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.SearchTextRequest.LocationBias} LocationBias + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocationBias.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LocationBias message. + * @function verify + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LocationBias.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.rectangle != null && message.hasOwnProperty("rectangle")) { + properties.type = 1; + { + var error = $root.google.geo.type.Viewport.verify(message.rectangle); + if (error) + return "rectangle." + error; + } + } + if (message.circle != null && message.hasOwnProperty("circle")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.maps.places.v1.Circle.verify(message.circle); + if (error) + return "circle." + error; + } + } + return null; + }; + + /** + * Creates a LocationBias message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.SearchTextRequest.LocationBias} LocationBias + */ + LocationBias.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.SearchTextRequest.LocationBias) + return object; + var message = new $root.google.maps.places.v1.SearchTextRequest.LocationBias(); + if (object.rectangle != null) { + if (typeof object.rectangle !== "object") + throw TypeError(".google.maps.places.v1.SearchTextRequest.LocationBias.rectangle: object expected"); + message.rectangle = $root.google.geo.type.Viewport.fromObject(object.rectangle); + } + if (object.circle != null) { + if (typeof object.circle !== "object") + throw TypeError(".google.maps.places.v1.SearchTextRequest.LocationBias.circle: object expected"); + message.circle = $root.google.maps.places.v1.Circle.fromObject(object.circle); + } + return message; + }; + + /** + * Creates a plain object from a LocationBias message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @static + * @param {google.maps.places.v1.SearchTextRequest.LocationBias} message LocationBias + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LocationBias.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.rectangle != null && message.hasOwnProperty("rectangle")) { + object.rectangle = $root.google.geo.type.Viewport.toObject(message.rectangle, options); + if (options.oneofs) + object.type = "rectangle"; + } + if (message.circle != null && message.hasOwnProperty("circle")) { + object.circle = $root.google.maps.places.v1.Circle.toObject(message.circle, options); + if (options.oneofs) + object.type = "circle"; + } + return object; + }; + + /** + * Converts this LocationBias to JSON. + * @function toJSON + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @instance + * @returns {Object.} JSON object + */ + LocationBias.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LocationBias + * @function getTypeUrl + * @memberof google.maps.places.v1.SearchTextRequest.LocationBias + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LocationBias.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.SearchTextRequest.LocationBias"; + }; + + return LocationBias; + })(); + + SearchTextRequest.LocationRestriction = (function() { + + /** + * Properties of a LocationRestriction. + * @memberof google.maps.places.v1.SearchTextRequest + * @interface ILocationRestriction + * @property {google.geo.type.IViewport|null} [rectangle] LocationRestriction rectangle + */ + + /** + * Constructs a new LocationRestriction. + * @memberof google.maps.places.v1.SearchTextRequest + * @classdesc Represents a LocationRestriction. + * @implements ILocationRestriction + * @constructor + * @param {google.maps.places.v1.SearchTextRequest.ILocationRestriction=} [properties] Properties to set + */ + function LocationRestriction(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]]; + } + + /** + * LocationRestriction rectangle. + * @member {google.geo.type.IViewport|null|undefined} rectangle + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @instance + */ + LocationRestriction.prototype.rectangle = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * LocationRestriction type. + * @member {"rectangle"|undefined} type + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @instance + */ + Object.defineProperty(LocationRestriction.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["rectangle"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LocationRestriction instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @static + * @param {google.maps.places.v1.SearchTextRequest.ILocationRestriction=} [properties] Properties to set + * @returns {google.maps.places.v1.SearchTextRequest.LocationRestriction} LocationRestriction instance + */ + LocationRestriction.create = function create(properties) { + return new LocationRestriction(properties); + }; + + /** + * Encodes the specified LocationRestriction message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationRestriction.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @static + * @param {google.maps.places.v1.SearchTextRequest.ILocationRestriction} message LocationRestriction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocationRestriction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rectangle != null && Object.hasOwnProperty.call(message, "rectangle")) + $root.google.geo.type.Viewport.encode(message.rectangle, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LocationRestriction message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.LocationRestriction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @static + * @param {google.maps.places.v1.SearchTextRequest.ILocationRestriction} message LocationRestriction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocationRestriction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LocationRestriction message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.SearchTextRequest.LocationRestriction} LocationRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocationRestriction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchTextRequest.LocationRestriction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rectangle = $root.google.geo.type.Viewport.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LocationRestriction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.SearchTextRequest.LocationRestriction} LocationRestriction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocationRestriction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LocationRestriction message. + * @function verify + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LocationRestriction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.rectangle != null && message.hasOwnProperty("rectangle")) { + properties.type = 1; + { + var error = $root.google.geo.type.Viewport.verify(message.rectangle); + if (error) + return "rectangle." + error; + } + } + return null; + }; + + /** + * Creates a LocationRestriction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.SearchTextRequest.LocationRestriction} LocationRestriction + */ + LocationRestriction.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.SearchTextRequest.LocationRestriction) + return object; + var message = new $root.google.maps.places.v1.SearchTextRequest.LocationRestriction(); + if (object.rectangle != null) { + if (typeof object.rectangle !== "object") + throw TypeError(".google.maps.places.v1.SearchTextRequest.LocationRestriction.rectangle: object expected"); + message.rectangle = $root.google.geo.type.Viewport.fromObject(object.rectangle); + } + return message; + }; + + /** + * Creates a plain object from a LocationRestriction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @static + * @param {google.maps.places.v1.SearchTextRequest.LocationRestriction} message LocationRestriction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LocationRestriction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.rectangle != null && message.hasOwnProperty("rectangle")) { + object.rectangle = $root.google.geo.type.Viewport.toObject(message.rectangle, options); + if (options.oneofs) + object.type = "rectangle"; + } + return object; + }; + + /** + * Converts this LocationRestriction to JSON. + * @function toJSON + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @instance + * @returns {Object.} JSON object + */ + LocationRestriction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LocationRestriction + * @function getTypeUrl + * @memberof google.maps.places.v1.SearchTextRequest.LocationRestriction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LocationRestriction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.SearchTextRequest.LocationRestriction"; + }; + + return LocationRestriction; + })(); + + return SearchTextRequest; + })(); + + v1.SearchTextResponse = (function() { + + /** + * Properties of a SearchTextResponse. + * @memberof google.maps.places.v1 + * @interface ISearchTextResponse + * @property {Array.|null} [places] SearchTextResponse places + */ + + /** + * Constructs a new SearchTextResponse. + * @memberof google.maps.places.v1 + * @classdesc Represents a SearchTextResponse. + * @implements ISearchTextResponse + * @constructor + * @param {google.maps.places.v1.ISearchTextResponse=} [properties] Properties to set + */ + function SearchTextResponse(properties) { + this.places = []; + 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]]; + } + + /** + * SearchTextResponse places. + * @member {Array.} places + * @memberof google.maps.places.v1.SearchTextResponse + * @instance + */ + SearchTextResponse.prototype.places = $util.emptyArray; + + /** + * Creates a new SearchTextResponse instance using the specified properties. + * @function create + * @memberof google.maps.places.v1.SearchTextResponse + * @static + * @param {google.maps.places.v1.ISearchTextResponse=} [properties] Properties to set + * @returns {google.maps.places.v1.SearchTextResponse} SearchTextResponse instance + */ + SearchTextResponse.create = function create(properties) { + return new SearchTextResponse(properties); + }; + + /** + * Encodes the specified SearchTextResponse message. Does not implicitly {@link google.maps.places.v1.SearchTextResponse.verify|verify} messages. + * @function encode + * @memberof google.maps.places.v1.SearchTextResponse + * @static + * @param {google.maps.places.v1.ISearchTextResponse} message SearchTextResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchTextResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.places != null && message.places.length) + for (var i = 0; i < message.places.length; ++i) + $root.google.maps.places.v1.Place.encode(message.places[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SearchTextResponse message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.maps.places.v1.SearchTextResponse + * @static + * @param {google.maps.places.v1.ISearchTextResponse} message SearchTextResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchTextResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchTextResponse message from the specified reader or buffer. + * @function decode + * @memberof google.maps.places.v1.SearchTextResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.maps.places.v1.SearchTextResponse} SearchTextResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchTextResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchTextResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.places && message.places.length)) + message.places = []; + message.places.push($root.google.maps.places.v1.Place.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchTextResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.maps.places.v1.SearchTextResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.maps.places.v1.SearchTextResponse} SearchTextResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchTextResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchTextResponse message. + * @function verify + * @memberof google.maps.places.v1.SearchTextResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchTextResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.places != null && message.hasOwnProperty("places")) { + if (!Array.isArray(message.places)) + return "places: array expected"; + for (var i = 0; i < message.places.length; ++i) { + var error = $root.google.maps.places.v1.Place.verify(message.places[i]); + if (error) + return "places." + error; + } + } + return null; + }; + + /** + * Creates a SearchTextResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.maps.places.v1.SearchTextResponse + * @static + * @param {Object.} object Plain object + * @returns {google.maps.places.v1.SearchTextResponse} SearchTextResponse + */ + SearchTextResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.maps.places.v1.SearchTextResponse) + return object; + var message = new $root.google.maps.places.v1.SearchTextResponse(); + if (object.places) { + if (!Array.isArray(object.places)) + throw TypeError(".google.maps.places.v1.SearchTextResponse.places: array expected"); + message.places = []; + for (var i = 0; i < object.places.length; ++i) { + if (typeof object.places[i] !== "object") + throw TypeError(".google.maps.places.v1.SearchTextResponse.places: object expected"); + message.places[i] = $root.google.maps.places.v1.Place.fromObject(object.places[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SearchTextResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.maps.places.v1.SearchTextResponse + * @static + * @param {google.maps.places.v1.SearchTextResponse} message SearchTextResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchTextResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.places = []; + if (message.places && message.places.length) { + object.places = []; + for (var j = 0; j < message.places.length; ++j) + object.places[j] = $root.google.maps.places.v1.Place.toObject(message.places[j], options); + } + return object; + }; + + /** + * Converts this SearchTextResponse to JSON. + * @function toJSON + * @memberof google.maps.places.v1.SearchTextResponse + * @instance + * @returns {Object.} JSON object + */ + SearchTextResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchTextResponse + * @function getTypeUrl + * @memberof google.maps.places.v1.SearchTextResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchTextResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.maps.places.v1.SearchTextResponse"; + }; + + return SearchTextResponse; + })(); + + return v1; + })(); + + return places; + })(); + + return maps; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + return values; + })(); + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + 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]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + 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]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(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]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + + return CustomHttpPattern; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + 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]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {string|null} [edition] FileDescriptorProto edition + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + 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]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * FileDescriptorProto edition. + * @member {string} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = ""; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.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["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.edition); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 13: { + message.edition = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.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["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + if (!$util.isString(message.edition)) + return "edition: string expected"; + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + if (object.edition != null) + message.edition = String(object.edition); + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = message.edition; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + 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]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.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.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.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.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(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]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(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]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(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]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.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.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.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.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(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]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.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.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.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.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + 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]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.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.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.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.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(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]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(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]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.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.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.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.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + 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]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.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.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.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.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(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]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.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.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.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.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions phpGenericServices. + * @member {boolean} phpGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) + writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 42: { + message.phpGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (typeof message.phpGenericServices !== "boolean") + return "phpGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.phpGenericServices != null) + message.phpGenericServices = Boolean(object.phpGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpGenericServices = false; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + object.phpGenericServices = message.phpGenericServices; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + 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]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { + writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.int32(message[".google.api.fieldBehavior"][i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object.unverifiedLazy = false; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.deprecated = false; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + 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]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + 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]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length >= 0) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(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]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + 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]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + 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]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + 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]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + 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]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(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]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + + return Timestamp; + })(); + + return protobuf; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/google-maps-places/protos/protos.json b/packages/google-maps-places/protos/protos.json new file mode 100644 index 00000000000..a9b8f5bb633 --- /dev/null +++ b/packages/google-maps-places/protos/protos.json @@ -0,0 +1,1918 @@ +{ + "nested": { + "google": { + "nested": { + "geo": { + "nested": { + "type": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/geo/type/viewport;viewport", + "java_multiple_files": true, + "java_outer_classname": "ViewportProto", + "java_package": "com.google.geo.type", + "objc_class_prefix": "GGTP" + }, + "nested": { + "Viewport": { + "fields": { + "low": { + "type": "google.type.LatLng", + "id": 1 + }, + "high": { + "type": "google.type.LatLng", + "id": 2 + } + } + } + } + } + } + }, + "type": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/type/localized_text;localized_text", + "java_multiple_files": true, + "java_outer_classname": "LocalizedTextProto", + "java_package": "com.google.type", + "objc_class_prefix": "GTP" + }, + "nested": { + "LatLng": { + "fields": { + "latitude": { + "type": "double", + "id": 1 + }, + "longitude": { + "type": "double", + "id": 2 + } + } + }, + "Date": { + "fields": { + "year": { + "type": "int32", + "id": 1 + }, + "month": { + "type": "int32", + "id": 2 + }, + "day": { + "type": "int32", + "id": 3 + } + } + }, + "LocalizedText": { + "fields": { + "text": { + "type": "string", + "id": 1 + }, + "languageCode": { + "type": "string", + "id": 2 + } + } + } + } + }, + "maps": { + "nested": { + "places": { + "nested": { + "v1": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.Maps.Places.V1", + "go_package": "cloud.google.com/go/maps/places/apiv1/placespb;placespb", + "java_multiple_files": true, + "java_outer_classname": "PlacesServiceProto", + "java_package": "com.google.maps.places.v1", + "objc_class_prefix": "GMPSV1", + "php_namespace": "Google\\Maps\\Places\\V1" + }, + "nested": { + "Circle": { + "fields": { + "center": { + "type": "google.type.LatLng", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "radius": { + "type": "double", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Place": { + "oneofs": { + "_takeout": { + "oneof": [ + "takeout" + ] + }, + "_delivery": { + "oneof": [ + "delivery" + ] + }, + "_dineIn": { + "oneof": [ + "dineIn" + ] + }, + "_curbsidePickup": { + "oneof": [ + "curbsidePickup" + ] + }, + "_wheelchairAccessibleEntrance": { + "oneof": [ + "wheelchairAccessibleEntrance" + ] + }, + "_reservable": { + "oneof": [ + "reservable" + ] + }, + "_servesBreakfast": { + "oneof": [ + "servesBreakfast" + ] + }, + "_servesLunch": { + "oneof": [ + "servesLunch" + ] + }, + "_servesDinner": { + "oneof": [ + "servesDinner" + ] + }, + "_servesBeer": { + "oneof": [ + "servesBeer" + ] + }, + "_servesWine": { + "oneof": [ + "servesWine" + ] + }, + "_servesBrunch": { + "oneof": [ + "servesBrunch" + ] + }, + "_servesVegetarianFood": { + "oneof": [ + "servesVegetarianFood" + ] + } + }, + "fields": { + "id": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "displayName": { + "type": "google.type.LocalizedText", + "id": 31 + }, + "types": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "nationalPhoneNumber": { + "type": "string", + "id": 7 + }, + "internationalPhoneNumber": { + "type": "string", + "id": 8 + }, + "formattedAddress": { + "type": "string", + "id": 9 + }, + "addressComponents": { + "rule": "repeated", + "type": "AddressComponent", + "id": 10 + }, + "plusCode": { + "type": "PlusCode", + "id": 11 + }, + "location": { + "type": "google.type.LatLng", + "id": 12 + }, + "viewport": { + "type": "google.geo.type.Viewport", + "id": 13 + }, + "rating": { + "type": "double", + "id": 14 + }, + "googleMapsUri": { + "type": "string", + "id": 15 + }, + "websiteUri": { + "type": "string", + "id": 16 + }, + "reviews": { + "rule": "repeated", + "type": "Review", + "id": 20 + }, + "openingHours": { + "type": "OpeningHours", + "id": 21 + }, + "utcOffsetMinutes": { + "type": "int32", + "id": 22 + }, + "adrFormatAddress": { + "type": "string", + "id": 24 + }, + "businessStatus": { + "type": "BusinessStatus", + "id": 25 + }, + "priceLevel": { + "type": "PriceLevel", + "id": 26 + }, + "attributions": { + "rule": "repeated", + "type": "Attribution", + "id": 27 + }, + "userRatingCount": { + "type": "int32", + "id": 28 + }, + "iconMaskBaseUri": { + "type": "string", + "id": 29 + }, + "iconBackgroundColor": { + "type": "string", + "id": 30 + }, + "takeout": { + "type": "bool", + "id": 33, + "options": { + "proto3_optional": true + } + }, + "delivery": { + "type": "bool", + "id": 34, + "options": { + "proto3_optional": true + } + }, + "dineIn": { + "type": "bool", + "id": 35, + "options": { + "proto3_optional": true + } + }, + "curbsidePickup": { + "type": "bool", + "id": 36, + "options": { + "proto3_optional": true + } + }, + "wheelchairAccessibleEntrance": { + "type": "bool", + "id": 37, + "options": { + "proto3_optional": true + } + }, + "reservable": { + "type": "bool", + "id": 38, + "options": { + "proto3_optional": true + } + }, + "servesBreakfast": { + "type": "bool", + "id": 39, + "options": { + "proto3_optional": true + } + }, + "servesLunch": { + "type": "bool", + "id": 40, + "options": { + "proto3_optional": true + } + }, + "servesDinner": { + "type": "bool", + "id": 41, + "options": { + "proto3_optional": true + } + }, + "servesBeer": { + "type": "bool", + "id": 42, + "options": { + "proto3_optional": true + } + }, + "servesWine": { + "type": "bool", + "id": 43, + "options": { + "proto3_optional": true + } + }, + "servesBrunch": { + "type": "bool", + "id": 44, + "options": { + "proto3_optional": true + } + }, + "servesVegetarianFood": { + "type": "bool", + "id": 45, + "options": { + "proto3_optional": true + } + }, + "currentOpeningHours": { + "type": "OpeningHours", + "id": 46 + }, + "currentSecondaryOpeningHours": { + "rule": "repeated", + "type": "OpeningHours", + "id": 47 + }, + "secondaryOpeningHours": { + "rule": "repeated", + "type": "OpeningHours", + "id": 49 + }, + "editorialSummary": { + "type": "EditorialSummary", + "id": 48 + } + }, + "nested": { + "AddressComponent": { + "fields": { + "longText": { + "type": "string", + "id": 1 + }, + "shortText": { + "type": "string", + "id": 2 + }, + "types": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "languageCode": { + "type": "string", + "id": 4 + } + } + }, + "PlusCode": { + "fields": { + "globalCode": { + "type": "string", + "id": 1 + }, + "compoundCode": { + "type": "string", + "id": 2 + } + } + }, + "Review": { + "fields": { + "publishTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "relativePublishTimeDescription": { + "type": "string", + "id": 2 + }, + "text": { + "type": "google.type.LocalizedText", + "id": 9 + }, + "author": { + "type": "string", + "id": 4 + }, + "authorUri": { + "type": "string", + "id": 5 + }, + "authorPhotoUri": { + "type": "string", + "id": 6 + }, + "rating": { + "type": "double", + "id": 7 + }, + "originalLanguageCode": { + "type": "string", + "id": 10 + }, + "translated": { + "type": "bool", + "id": 11 + } + } + }, + "OpeningHours": { + "fields": { + "openNow": { + "type": "bool", + "id": 1 + }, + "periods": { + "rule": "repeated", + "type": "OpeningHoursPeriod", + "id": 2 + }, + "weekdayDescriptions": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "secondaryHourType": { + "type": "SecondaryHourType", + "id": 4 + }, + "specialDays": { + "rule": "repeated", + "type": "SpecialDay", + "id": 5 + } + }, + "nested": { + "OpeningHoursPeriod": { + "fields": { + "open": { + "type": "OpeningHoursPoint", + "id": 1 + }, + "close": { + "type": "OpeningHoursPoint", + "id": 2 + } + }, + "nested": { + "OpeningHoursPoint": { + "oneofs": { + "_day": { + "oneof": [ + "day" + ] + }, + "_hour": { + "oneof": [ + "hour" + ] + }, + "_minute": { + "oneof": [ + "minute" + ] + } + }, + "fields": { + "day": { + "type": "int32", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "hour": { + "type": "int32", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "minute": { + "type": "int32", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "dateDeprecated": { + "type": "string", + "id": 4, + "options": { + "deprecated": true + } + }, + "date": { + "type": "google.type.Date", + "id": 6 + }, + "truncated": { + "type": "bool", + "id": 5 + } + } + } + } + }, + "SecondaryHourType": { + "values": { + "SECONDARY_HOUR_TYPE_UNSPECIFIED": 0, + "DRIVE_THROUGH": 1, + "HAPPY_HOUR": 2, + "DELIVERY": 3, + "TAKEOUT": 4, + "KITCHEN": 5, + "BREAKFAST": 6, + "LUNCH": 7, + "DINNER": 8, + "BRUNCH": 9, + "PICKUP": 10, + "ACCESS": 11, + "SENIOR_HOURS": 12, + "ONLINE_SERVICE_HOURS": 13 + } + }, + "SpecialDay": { + "fields": { + "date": { + "type": "google.type.Date", + "id": 1 + } + } + } + } + }, + "BusinessStatus": { + "values": { + "BUSINESS_STATUS_UNSPECIFIED": 0, + "OPERATIONAL": 1, + "CLOSED_TEMPORARILY": 2, + "CLOSED_PERMANENTLY": 3 + } + }, + "Attribution": { + "fields": { + "provider": { + "type": "string", + "id": 1 + }, + "providerUri": { + "type": "string", + "id": 2 + } + } + }, + "EditorialSummary": { + "fields": { + "overview": { + "type": "google.type.LocalizedText", + "id": 1 + } + } + } + } + }, + "PriceLevel": { + "values": { + "PRICE_LEVEL_UNSPECIFIED": 0, + "FREE": 1, + "INEXPENSIVE": 2, + "MODERATE": 3, + "EXPENSIVE": 4, + "VERY_EXPENSIVE": 5 + } + }, + "Places": { + "options": { + "(google.api.default_host)": "places.googleapis.com" + }, + "methods": { + "SearchText": { + "requestType": "SearchTextRequest", + "responseType": "SearchTextResponse", + "options": { + "(google.api.http).post": "/v1/Text:search", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/Text:search", + "body": "*" + } + } + ] + } + } + }, + "Int32Range": { + "oneofs": { + "_min": { + "oneof": [ + "min" + ] + }, + "_max": { + "oneof": [ + "max" + ] + } + }, + "fields": { + "min": { + "type": "int32", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "max": { + "type": "int32", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "SearchTextRequest": { + "fields": { + "textQuery": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "languageCode": { + "type": "string", + "id": 2 + }, + "regionCode": { + "type": "string", + "id": 3 + }, + "rankPreference": { + "type": "RankPreference", + "id": 4 + }, + "location": { + "type": "Location", + "id": 5, + "options": { + "deprecated": true + } + }, + "includedType": { + "type": "string", + "id": 6 + }, + "openNow": { + "type": "bool", + "id": 7 + }, + "priceRange": { + "type": "Int32Range", + "id": 8, + "options": { + "deprecated": true + } + }, + "minRating": { + "type": "double", + "id": 9 + }, + "maxResultCount": { + "type": "int32", + "id": 10 + }, + "priceLevels": { + "rule": "repeated", + "type": "PriceLevel", + "id": 11 + }, + "strictTypeFiltering": { + "type": "bool", + "id": 12 + }, + "locationBias": { + "type": "LocationBias", + "id": 13 + }, + "locationRestriction": { + "type": "LocationRestriction", + "id": 14 + } + }, + "nested": { + "RankPreference": { + "values": { + "RANK_PREFERENCE_UNSPECIFIED": 0, + "DISTANCE": 1, + "RELEVANCE": 2 + } + }, + "Location": { + "oneofs": { + "type": { + "oneof": [ + "rectangle" + ] + } + }, + "fields": { + "rectangle": { + "type": "google.geo.type.Viewport", + "id": 1 + }, + "strictRestriction": { + "type": "bool", + "id": 2 + } + } + }, + "LocationBias": { + "oneofs": { + "type": { + "oneof": [ + "rectangle", + "circle" + ] + } + }, + "fields": { + "rectangle": { + "type": "google.geo.type.Viewport", + "id": 1 + }, + "circle": { + "type": "Circle", + "id": 2 + } + } + }, + "LocationRestriction": { + "oneofs": { + "type": { + "oneof": [ + "rectangle" + ] + } + }, + "fields": { + "rectangle": { + "type": "google.geo.type.Viewport", + "id": 1 + } + } + } + } + }, + "SearchTextResponse": { + "fields": { + "places": { + "rule": "repeated", + "type": "Place", + "id": 1 + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ClientProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7 + } + }, + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + }, + "edition": { + "type": "string", + "id": 13 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REQUIRED": 2, + "LABEL_REPEATED": 3 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "phpGenericServices": { + "type": "bool", + "id": 42, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + } + } + }, + "OneofOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/google-maps-places/samples/README.md b/packages/google-maps-places/samples/README.md new file mode 100644 index 00000000000..f4dae6a1a46 --- /dev/null +++ b/packages/google-maps-places/samples/README.md @@ -0,0 +1,68 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [Places API (New): Node.js Samples](https://github.com/googleapis/google-cloud-node) + +[![Open in Cloud Shell][shell_img]][shell_link] + + + +## Table of Contents + +* [Before you begin](#before-you-begin) +* [Samples](#samples) + * [Places.search_text](#places.search_text) + * [Quickstart](#quickstart) + +## Before you begin + +Before running the samples, make sure you've followed the steps outlined in +[Using the client library](https://github.com/googleapis/google-cloud-node#using-the-client-library). + +`cd samples` + +`npm install` + +`cd ..` + +## Samples + + + +### Places.search_text + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/generated/v1/places.search_text.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-places/samples/generated/v1/places.search_text.js,samples/README.md) + +__Usage:__ + + +`node packages/google-maps-places/samples/generated/v1/places.search_text.js` + + +----- + + + + +### Quickstart + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-places/samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node packages/google-maps-places/samples/quickstart.js` + + + + + + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=samples/README.md +[product-docs]: https://developers.google.com/maps/documentation/places/web-service/ diff --git a/packages/google-maps-places/samples/generated/v1/places.search_text.js b/packages/google-maps-places/samples/generated/v1/places.search_text.js new file mode 100644 index 00000000000..7a405096950 --- /dev/null +++ b/packages/google-maps-places/samples/generated/v1/places.search_text.js @@ -0,0 +1,133 @@ +// Copyright 2023 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(textQuery) { + // [START places_v1_generated_Places_SearchText_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 text query for textual search. + */ + // const textQuery = 'abc123' + /** + * Place details will be displayed with the preferred language if available. + * If the language code is unspecified or unrecognized, place details of any + * language may be returned, with a preference for English if such details + * exist. + * Current list of supported languages: + * https://developers.google.com/maps/faq#languagesupport. + */ + // const languageCode = 'abc123' + /** + * The Unicode country/region code (CLDR) of the location where the + * request is coming from. It is used to display the place details, like + * region-specific place name, if available. + * For more information, see + * http://www.unicode.org/reports/tr35/#unicode_region_subtag. + * Note that 3-digit region codes are not currently supported. + */ + // const regionCode = 'abc123' + /** + * How results will be ranked in the response. + */ + // const rankPreference = {} + /** + * The requested place type. Full list of types supported: + * https://developers.google.com/places/supported_types. Only support one + * included type. + */ + // const includedType = 'abc123' + /** + * Used to restrict the search to places that are open at a specific time. + * open_now marks if a business is currently open. + */ + // const openNow = true + /** + * Filter out results whose average user rating is strictly less than this + * limit. A valid value must be an float between 0 and 5 (inclusively) at a + * 0.5 cadence i.e. `[0, 0.5, 1.0, ... , 5.0]` inclusively. This is to keep + * parity with LocalRefinement_UserRating. The input rating will round up to + * the nearest 0.5(ceiling). For instance, a rating of 0.6 will eliminate all + * results with a less than 1.0 rating. + */ + // const minRating = 1234 + /** + * Maximum number of results to return. It must be between 1 and 20, + * inclusively. If the number is unset, it falls back to the upper limit. If + * the number is set to negative or exceeds the upper limit, an + * INVALID_ARGUMENT error is returned. + */ + // const maxResultCount = 1234 + /** + * Used to restrict the search to places that are marked as certain price + * levels. Users can choose any combinations of price levels. Default to + * select all price levels. + */ + // const priceLevels = 1234 + /** + * Used to set strict type filtering for included_type. If set to true, only + * results of the same type will be returned. Default to false. + */ + // const strictTypeFiltering = true + /** + * The region to search. This location serves as a bias which means results + * around given location might be returned. Cannot be set along with + * location_restriction. + */ + // const locationBias = {} + /** + * The region to search. This location serves as a restriction which means + * results outside given location will not be returned. Cannot be set along + * with location_bias. + */ + // const locationRestriction = {} + + // Imports the Places library + const {PlacesClient} = require('@googlemaps/places').v1; + + // Instantiates a client + const placesClient = new PlacesClient(); + + async function callSearchText() { + // Construct request + const request = { + textQuery, + }; + + // Run request + const response = await placesClient.searchText(request); + console.log(response); + } + + callSearchText(); + // [END places_v1_generated_Places_SearchText_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-maps-places/samples/generated/v1/snippet_metadata.google.maps.places.v1.json b/packages/google-maps-places/samples/generated/v1/snippet_metadata.google.maps.places.v1.json new file mode 100644 index 00000000000..e207d638d0d --- /dev/null +++ b/packages/google-maps-places/samples/generated/v1/snippet_metadata.google.maps.places.v1.json @@ -0,0 +1,107 @@ +{ + "clientLibrary": { + "name": "nodejs-places", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.maps.places.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "places_v1_generated_Places_SearchText_async", + "title": "Places searchText Sample", + "origin": "API_DEFINITION", + "description": " Text query based place search.", + "canonical": true, + "file": "places.search_text.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 125, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SearchText", + "fullName": "google.maps.places.v1.Places.SearchText", + "async": true, + "parameters": [ + { + "name": "text_query", + "type": "TYPE_STRING" + }, + { + "name": "language_code", + "type": "TYPE_STRING" + }, + { + "name": "region_code", + "type": "TYPE_STRING" + }, + { + "name": "rank_preference", + "type": ".google.maps.places.v1.SearchTextRequest.RankPreference" + }, + { + "name": "location", + "type": ".google.maps.places.v1.SearchTextRequest.Location" + }, + { + "name": "included_type", + "type": "TYPE_STRING" + }, + { + "name": "open_now", + "type": "TYPE_BOOL" + }, + { + "name": "price_range", + "type": ".google.maps.places.v1.Int32Range" + }, + { + "name": "min_rating", + "type": "TYPE_DOUBLE" + }, + { + "name": "max_result_count", + "type": "TYPE_INT32" + }, + { + "name": "price_levels", + "type": "TYPE_ENUM[]" + }, + { + "name": "strict_type_filtering", + "type": "TYPE_BOOL" + }, + { + "name": "location_bias", + "type": ".google.maps.places.v1.SearchTextRequest.LocationBias" + }, + { + "name": "location_restriction", + "type": ".google.maps.places.v1.SearchTextRequest.LocationRestriction" + } + ], + "resultType": ".google.maps.places.v1.SearchTextResponse", + "client": { + "shortName": "PlacesClient", + "fullName": "google.maps.places.v1.PlacesClient" + }, + "method": { + "shortName": "SearchText", + "fullName": "google.maps.places.v1.Places.SearchText", + "service": { + "shortName": "Places", + "fullName": "google.maps.places.v1.Places" + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/google-maps-places/samples/package.json b/packages/google-maps-places/samples/package.json new file mode 100644 index 00000000000..8489a478316 --- /dev/null +++ b/packages/google-maps-places/samples/package.json @@ -0,0 +1,24 @@ +{ + "name": "places-samples", + "private": true, + "license": "Apache-2.0", + "author": "Google LLC", + "engines": { + "node": ">=12.0.0" + }, + "files": [ + "*.js" + ], + "scripts": { + "test": "c8 mocha --timeout 600000 test/*.js", + "publish": "echo 'sample test; do not publish'" + }, + "dependencies": { + "@googlemaps/places": "^0.1.0" + }, + "devDependencies": { + "c8": "^7.1.0", + "chai": "^4.2.0", + "mocha": "^8.0.0" + } +} diff --git a/packages/google-maps-places/samples/quickstart.js b/packages/google-maps-places/samples/quickstart.js new file mode 100644 index 00000000000..6d47923e1a1 --- /dev/null +++ b/packages/google-maps-places/samples/quickstart.js @@ -0,0 +1,55 @@ +// Copyright 2023 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(textQuery) { + // [START places_quickstart] + + // Imports the Places library + const {PlacesClient} = require('@googlemaps/places').v1; + + // Instantiates a client + const placesClient = new PlacesClient(); + + async function callSearchText() { + // Construct request + const request = { + textQuery, + }; + + // Run request + const response = await placesClient.searchText(request, { + otherArgs: { + headers: { + 'X-Goog-FieldMask': 'places.displayName', + }, + }, + }); + console.log(response); + } + + callSearchText(); + // [END places_quickstart] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-maps-places/samples/test/quickstart.js b/packages/google-maps-places/samples/test/quickstart.js new file mode 100644 index 00000000000..81931b719d8 --- /dev/null +++ b/packages/google-maps-places/samples/test/quickstart.js @@ -0,0 +1,31 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +const assert = require('assert'); +const path = require('path'); +const cp = require('child_process'); +const {describe, it} = require('mocha'); + +const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); + +const cwd = path.join(__dirname, '..'); + +describe('Quickstart', () => { + it('should run quickstart', async () => { + const output = execSync('node ./quickstart.js test', {cwd}); + assert(output !== null); + }); +}); diff --git a/packages/google-maps-places/src/index.ts b/packages/google-maps-places/src/index.ts new file mode 100644 index 00000000000..8a72e2448c0 --- /dev/null +++ b/packages/google-maps-places/src/index.ts @@ -0,0 +1,27 @@ +// Copyright 2023 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 synthtool. ** +// ** https://github.com/googleapis/synthtool ** +// ** All changes to this file may be overwritten. ** + +import * as v1 from './v1'; + +const PlacesClient = v1.PlacesClient; +type PlacesClient = v1.PlacesClient; + +export {v1, PlacesClient}; +export default {v1, PlacesClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/packages/google-maps-places/src/v1/gapic_metadata.json b/packages/google-maps-places/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..827d738ec76 --- /dev/null +++ b/packages/google-maps-places/src/v1/gapic_metadata.json @@ -0,0 +1,33 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.maps.places.v1", + "libraryPackage": "@googlemaps/places", + "services": { + "Places": { + "clients": { + "grpc": { + "libraryClient": "PlacesClient", + "rpcs": { + "SearchText": { + "methods": [ + "searchText" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "PlacesClient", + "rpcs": { + "SearchText": { + "methods": [ + "searchText" + ] + } + } + } + } + } + } +} diff --git a/packages/google-maps-places/src/v1/index.ts b/packages/google-maps-places/src/v1/index.ts new file mode 100644 index 00000000000..f135558c071 --- /dev/null +++ b/packages/google-maps-places/src/v1/index.ts @@ -0,0 +1,19 @@ +// Copyright 2023 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. ** + +export {PlacesClient} from './places_client'; diff --git a/packages/google-maps-places/src/v1/places_client.ts b/packages/google-maps-places/src/v1/places_client.ts new file mode 100644 index 00000000000..972ee79ad63 --- /dev/null +++ b/packages/google-maps-places/src/v1/places_client.ts @@ -0,0 +1,468 @@ +// Copyright 2023 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, +} from 'google-gax'; + +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +/** + * Client JSON configuration object, loaded from + * `src/v1/places_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './places_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service definition for the Places API. + * @class + * @memberof v1 + */ +export class PlacesClient { + 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}; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + placesStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of PlacesClient. + * + * @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://developers.google.com/identity/protocols/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 | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * 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 PlacesClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof PlacesClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.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 !== staticMembers.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 = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && '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 if (opts.fallback === 'rest') { + 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); + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.maps.places.v1.Places', + 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.placesStub) { + return this.placesStub; + } + + // Put together the "service stub" for + // google.maps.places.v1.Places. + this.placesStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.maps.places.v1.Places' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.maps.places.v1.Places, + 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 placesStubMethods = ['searchText']; + for (const methodName of placesStubMethods) { + const callPromise = this.placesStub.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 = undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.placesStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'places.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'places.googleapis.com'; + } + + /** + * 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 []; + } + + 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 -- + // ------------------- + /** + * Text query based place search. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.textQuery + * Required. The text query for textual search. + * @param {string} request.languageCode + * Place details will be displayed with the preferred language if available. + * If the language code is unspecified or unrecognized, place details of any + * language may be returned, with a preference for English if such details + * exist. + * + * Current list of supported languages: + * https://developers.google.com/maps/faq#languagesupport. + * @param {string} request.regionCode + * The Unicode country/region code (CLDR) of the location where the + * request is coming from. It is used to display the place details, like + * region-specific place name, if available. + * + * For more information, see + * http://www.unicode.org/reports/tr35/#unicode_region_subtag. + * + * + * Note that 3-digit region codes are not currently supported. + * @param {google.maps.places.v1.SearchTextRequest.RankPreference} request.rankPreference + * How results will be ranked in the response. + * @param {google.maps.places.v1.SearchTextRequest.Location} request.location + * The region to search. Setting location would usually yields + * better results. Recommended to set. This location serves as a bias unless + * strict_restriction is set to true, which turns the location to a strict + * restriction. + * + * Deprecated. Use LocationRestriction or LocationBias instead. + * @param {string} request.includedType + * The requested place type. Full list of types supported: + * https://developers.google.com/places/supported_types. Only support one + * included type. + * @param {boolean} request.openNow + * Used to restrict the search to places that are open at a specific time. + * open_now marks if a business is currently open. + * @param {google.maps.places.v1.Int32Range} request.priceRange + * [Deprecated!]Used to restrict the search to places that are within a + * certain price range. This is on a scale of 0 to 4. Set a minimum of 0 or + * set a maximum of 4 has no effect on the search results. Min price is + * default to 0 and max price is default to 4. Default value will be used if + * either min or max is unset. + * @param {number} request.minRating + * Filter out results whose average user rating is strictly less than this + * limit. A valid value must be an float between 0 and 5 (inclusively) at a + * 0.5 cadence i.e. `[0, 0.5, 1.0, ... , 5.0]` inclusively. This is to keep + * parity with LocalRefinement_UserRating. The input rating will round up to + * the nearest 0.5(ceiling). For instance, a rating of 0.6 will eliminate all + * results with a less than 1.0 rating. + * @param {number} request.maxResultCount + * Maximum number of results to return. It must be between 1 and 20, + * inclusively. If the number is unset, it falls back to the upper limit. If + * the number is set to negative or exceeds the upper limit, an + * INVALID_ARGUMENT error is returned. + * @param {number[]} request.priceLevels + * Used to restrict the search to places that are marked as certain price + * levels. Users can choose any combinations of price levels. Default to + * select all price levels. + * @param {boolean} request.strictTypeFiltering + * Used to set strict type filtering for included_type. If set to true, only + * results of the same type will be returned. Default to false. + * @param {google.maps.places.v1.SearchTextRequest.LocationBias} request.locationBias + * The region to search. This location serves as a bias which means results + * around given location might be returned. Cannot be set along with + * location_restriction. + * @param {google.maps.places.v1.SearchTextRequest.LocationRestriction} request.locationRestriction + * The region to search. This location serves as a restriction which means + * results outside given location will not be returned. Cannot be set along + * with location_bias. + * @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 google.maps.places.v1.SearchTextResponse | SearchTextResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/places.search_text.js + * region_tag:places_v1_generated_Places_SearchText_async + */ + searchText( + request?: protos.google.maps.places.v1.ISearchTextRequest, + options?: CallOptions + ): Promise< + [ + protos.google.maps.places.v1.ISearchTextResponse, + protos.google.maps.places.v1.ISearchTextRequest | undefined, + {} | undefined + ] + >; + searchText( + request: protos.google.maps.places.v1.ISearchTextRequest, + options: CallOptions, + callback: Callback< + protos.google.maps.places.v1.ISearchTextResponse, + protos.google.maps.places.v1.ISearchTextRequest | null | undefined, + {} | null | undefined + > + ): void; + searchText( + request: protos.google.maps.places.v1.ISearchTextRequest, + callback: Callback< + protos.google.maps.places.v1.ISearchTextResponse, + protos.google.maps.places.v1.ISearchTextRequest | null | undefined, + {} | null | undefined + > + ): void; + searchText( + request?: protos.google.maps.places.v1.ISearchTextRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.maps.places.v1.ISearchTextResponse, + protos.google.maps.places.v1.ISearchTextRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.maps.places.v1.ISearchTextResponse, + protos.google.maps.places.v1.ISearchTextRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.maps.places.v1.ISearchTextResponse, + protos.google.maps.places.v1.ISearchTextRequest | 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 || {}; + this.initialize(); + return this.innerApiCalls.searchText(request, options, callback); + } + + /** + * 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.placesStub && !this._terminated) { + return this.placesStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-maps-places/src/v1/places_client_config.json b/packages/google-maps-places/src/v1/places_client_config.json new file mode 100644 index 00000000000..dcc25703b98 --- /dev/null +++ b/packages/google-maps-places/src/v1/places_client_config.json @@ -0,0 +1,30 @@ +{ + "interfaces": { + "google.maps.places.v1.Places": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "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 + } + }, + "methods": { + "SearchText": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-maps-places/src/v1/places_proto_list.json b/packages/google-maps-places/src/v1/places_proto_list.json new file mode 100644 index 00000000000..ca12c21c188 --- /dev/null +++ b/packages/google-maps-places/src/v1/places_proto_list.json @@ -0,0 +1,6 @@ +[ + "../../protos/google/geo/type/viewport.proto", + "../../protos/google/maps/places/v1/geometry.proto", + "../../protos/google/maps/places/v1/place.proto", + "../../protos/google/maps/places/v1/places_service.proto" +] diff --git a/packages/google-maps-places/system-test/fixtures/sample/src/index.js b/packages/google-maps-places/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..bed6095fd7d --- /dev/null +++ b/packages/google-maps-places/system-test/fixtures/sample/src/index.js @@ -0,0 +1,26 @@ +// Copyright 2023 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. ** + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const places = require('@googlemaps/places'); + +function main() { + const placesClient = new places.PlacesClient(); +} + +main(); diff --git a/packages/google-maps-places/system-test/fixtures/sample/src/index.ts b/packages/google-maps-places/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..56ce2c77cc4 --- /dev/null +++ b/packages/google-maps-places/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,32 @@ +// Copyright 2023 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 {PlacesClient} from '@googlemaps/places'; + +// check that the client class type name can be used +function doStuffWithPlacesClient(client: PlacesClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const placesClient = new PlacesClient(); + doStuffWithPlacesClient(placesClient); +} + +main(); diff --git a/packages/google-maps-places/system-test/install.ts b/packages/google-maps-places/system-test/install.ts new file mode 100644 index 00000000000..f61fe236476 --- /dev/null +++ b/packages/google-maps-places/system-test/install.ts @@ -0,0 +1,51 @@ +// Copyright 2023 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 {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + it('TypeScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync( + './system-test/fixtures/sample/src/index.ts' + ).toString(), + }, + }; + await packNTest(options); + }); + + it('JavaScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync( + './system-test/fixtures/sample/src/index.js' + ).toString(), + }, + }; + await packNTest(options); + }); +}); diff --git a/packages/google-maps-places/test/gapic_places_v1.ts b/packages/google-maps-places/test/gapic_places_v1.ts new file mode 100644 index 00000000000..cce1ec75065 --- /dev/null +++ b/packages/google-maps-places/test/gapic_places_v1.ts @@ -0,0 +1,247 @@ +// Copyright 2023 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 placesModule from '../src'; + +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); +} + +describe('v1.PlacesClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = placesModule.v1.PlacesClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = placesModule.v1.PlacesClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = placesModule.v1.PlacesClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new placesModule.v1.PlacesClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new placesModule.v1.PlacesClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.placesStub, undefined); + await client.initialize(); + assert(client.placesStub); + }); + + it('has close method for the initialized client', done => { + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.placesStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.placesStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new placesModule.v1.PlacesClient({ + 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 placesModule.v1.PlacesClient({ + 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('searchText', () => { + it('invokes searchText without error', async () => { + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.maps.places.v1.SearchTextRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.maps.places.v1.SearchTextResponse() + ); + client.innerApiCalls.searchText = stubSimpleCall(expectedResponse); + const [response] = await client.searchText(request); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes searchText without error using callback', async () => { + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.maps.places.v1.SearchTextRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.maps.places.v1.SearchTextResponse() + ); + client.innerApiCalls.searchText = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.searchText( + request, + ( + err?: Error | null, + result?: protos.google.maps.places.v1.ISearchTextResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes searchText with error', async () => { + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.maps.places.v1.SearchTextRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.searchText = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.searchText(request), expectedError); + }); + + it('invokes searchText with closed client', async () => { + const client = new placesModule.v1.PlacesClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.maps.places.v1.SearchTextRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.searchText(request), expectedError); + }); + }); +}); diff --git a/packages/google-maps-places/tsconfig.json b/packages/google-maps-places/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/packages/google-maps-places/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2018", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts" + ] +} diff --git a/packages/google-maps-places/webpack.config.js b/packages/google-maps-places/webpack.config.js new file mode 100644 index 00000000000..81c74e3cbec --- /dev/null +++ b/packages/google-maps-places/webpack.config.js @@ -0,0 +1,64 @@ +// Copyright 2021 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. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: 'Places', + filename: './places.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/, + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader', + }, + ], + }, + mode: 'production', +}; diff --git a/packages/google-maps-routing/package.json b/packages/google-maps-routing/package.json index 7dd2efb2a1c..8adf963a7ca 100644 --- a/packages/google-maps-routing/package.json +++ b/packages/google-maps-routing/package.json @@ -31,7 +31,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -39,10 +39,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -57,6 +58,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-monitoring-dashboard/package.json b/packages/google-monitoring-dashboard/package.json index 1ba81de6194..433269f8cd2 100644 --- a/packages/google-monitoring-dashboard/package.json +++ b/packages/google-monitoring-dashboard/package.json @@ -18,19 +18,19 @@ "main": "build/src/index.js", "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", "docs-test": "linkinator docs", "fix": "gts fix", "lint": "gts check", - "predocs-test": "npm run docs", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -45,6 +45,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -57,5 +58,4 @@ "engines": { "node": ">=12.0.0" } -} - +} \ No newline at end of file diff --git a/packages/google-privacy-dlp/package.json b/packages/google-privacy-dlp/package.json index a5d4e205304..f5262238ab6 100644 --- a/packages/google-privacy-dlp/package.json +++ b/packages/google-privacy-dlp/package.json @@ -32,20 +32,20 @@ "DLP API" ], "scripts": { - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "system-test": "npm run compile && c8 mocha build/system-test", - "docs": "jsdoc -c .jsdoc.js", - "lint": "gts check", - "fix": "gts fix", - "docs-test": "linkinator docs", "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -60,6 +60,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -70,5 +71,4 @@ "webpack-cli": "^5.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-privacy-dlp" -} - +} \ No newline at end of file diff --git a/packages/google-storagetransfer/package.json b/packages/google-storagetransfer/package.json index d12bd0507e3..db011321295 100644 --- a/packages/google-storagetransfer/package.json +++ b/packages/google-storagetransfer/package.json @@ -30,7 +30,7 @@ ], "scripts": { "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", "predocs-test": "npm run docs", @@ -38,10 +38,11 @@ "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "npm run compile && c8 mocha build/system-test", - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "dependencies": { "google-gax": "^3.5.8" @@ -56,6 +57,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.1", "pack-n-play": "^1.0.0-2", @@ -69,5 +71,4 @@ "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-storagetransfer" -} - +} \ No newline at end of file diff --git a/packages/grafeas/CHANGELOG.md b/packages/grafeas/CHANGELOG.md index bc9f88c69b0..f80d2080f67 100644 --- a/packages/grafeas/CHANGELOG.md +++ b/packages/grafeas/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/grafeas?activeTab=versions +## [4.5.0](https://github.com/googleapis/google-cloud-node/compare/grafeas-v4.4.1...grafeas-v4.5.0) (2023-04-24) + + +### Features + +* [grafeas] add enum for grafeas v1 cvss to support both cvss v2 and v3 ([#4167](https://github.com/googleapis/google-cloud-node/issues/4167)) ([d9cf3bd](https://github.com/googleapis/google-cloud-node/commit/d9cf3bd09e06f53bfe650619df5c039a2b918af9)) + ## [4.4.1](https://github.com/googleapis/google-cloud-node/compare/grafeas-v4.4.0...grafeas-v4.4.1) (2023-04-13) diff --git a/packages/grafeas/package.json b/packages/grafeas/package.json index c5fa3a1f428..ac0ca1fc6f4 100644 --- a/packages/grafeas/package.json +++ b/packages/grafeas/package.json @@ -5,7 +5,7 @@ "url": "https://github.com/googleapis/google-cloud-node.git" }, "name": "@google-cloud/grafeas", - "version": "4.4.1", + "version": "4.5.0", "author": "Google LLC", "description": "Grafeas API client for Node.js", "main": "build/src/index.js", @@ -40,6 +40,7 @@ "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", + "long": "^5.2.3", "mocha": "^9.2.2", "null-loader": "^4.0.0", "pack-n-play": "^1.0.0-2", @@ -50,25 +51,24 @@ "webpack-cli": "^5.0.0" }, "scripts": { - "test": "c8 mocha build/test", - "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", - "system-test": "npm run compile && c8 mocha build/system-test", - "presystem-test": "npm run compile", + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", - "lint": "gts check", - "fix": "gts fix", "predocs-test": "npm run docs", "docs-test": "linkinator docs", - "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", - "compile-protos": "compileProtos src", - "prepare": "npm run compile", - "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean" + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "prelint": "cd samples; npm link ../; npm i", + "postpack": "minifyProtoJson", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" }, "license": "Apache-2.0", "engines": { "node": ">=12.0.0" }, "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/grafeas" -} +} \ No newline at end of file diff --git a/packages/grafeas/protos/grafeas/v1/cvss.proto b/packages/grafeas/protos/grafeas/v1/cvss.proto index 181ec052fe4..a9d018eee6d 100644 --- a/packages/grafeas/protos/grafeas/v1/cvss.proto +++ b/packages/grafeas/protos/grafeas/v1/cvss.proto @@ -122,6 +122,7 @@ message CVSS { ATTACK_COMPLEXITY_UNSPECIFIED = 0; ATTACK_COMPLEXITY_LOW = 1; ATTACK_COMPLEXITY_HIGH = 2; + ATTACK_COMPLEXITY_MEDIUM = 3; } enum Authentication { @@ -155,6 +156,8 @@ message CVSS { IMPACT_HIGH = 1; IMPACT_LOW = 2; IMPACT_NONE = 3; + IMPACT_PARTIAL = 4; + IMPACT_COMPLETE = 5; } } diff --git a/packages/grafeas/protos/protos.d.ts b/packages/grafeas/protos/protos.d.ts index 22214c31a95..340fe393556 100644 --- a/packages/grafeas/protos/protos.d.ts +++ b/packages/grafeas/protos/protos.d.ts @@ -6066,7 +6066,8 @@ export namespace grafeas { enum AttackComplexity { ATTACK_COMPLEXITY_UNSPECIFIED = 0, ATTACK_COMPLEXITY_LOW = 1, - ATTACK_COMPLEXITY_HIGH = 2 + ATTACK_COMPLEXITY_HIGH = 2, + ATTACK_COMPLEXITY_MEDIUM = 3 } /** Authentication enum. */ @@ -6104,7 +6105,9 @@ export namespace grafeas { IMPACT_UNSPECIFIED = 0, IMPACT_HIGH = 1, IMPACT_LOW = 2, - IMPACT_NONE = 3 + IMPACT_NONE = 3, + IMPACT_PARTIAL = 4, + IMPACT_COMPLETE = 5 } } diff --git a/packages/grafeas/protos/protos.js b/packages/grafeas/protos/protos.js index 76d8a0ae8e6..99787573435 100644 --- a/packages/grafeas/protos/protos.js +++ b/packages/grafeas/protos/protos.js @@ -15269,6 +15269,7 @@ case 0: case 1: case 2: + case 3: break; } if (message.authentication != null && message.hasOwnProperty("authentication")) @@ -15317,6 +15318,8 @@ case 1: case 2: case 3: + case 4: + case 5: break; } if (message.integrityImpact != null && message.hasOwnProperty("integrityImpact")) @@ -15327,6 +15330,8 @@ case 1: case 2: case 3: + case 4: + case 5: break; } if (message.availabilityImpact != null && message.hasOwnProperty("availabilityImpact")) @@ -15337,6 +15342,8 @@ case 1: case 2: case 3: + case 4: + case 5: break; } return null; @@ -15407,6 +15414,10 @@ case 2: message.attackComplexity = 2; break; + case "ATTACK_COMPLEXITY_MEDIUM": + case 3: + message.attackComplexity = 3; + break; } switch (object.authentication) { default: @@ -15519,6 +15530,14 @@ case 3: message.confidentialityImpact = 3; break; + case "IMPACT_PARTIAL": + case 4: + message.confidentialityImpact = 4; + break; + case "IMPACT_COMPLETE": + case 5: + message.confidentialityImpact = 5; + break; } switch (object.integrityImpact) { default: @@ -15543,6 +15562,14 @@ case 3: message.integrityImpact = 3; break; + case "IMPACT_PARTIAL": + case 4: + message.integrityImpact = 4; + break; + case "IMPACT_COMPLETE": + case 5: + message.integrityImpact = 5; + break; } switch (object.availabilityImpact) { default: @@ -15567,6 +15594,14 @@ case 3: message.availabilityImpact = 3; break; + case "IMPACT_PARTIAL": + case 4: + message.availabilityImpact = 4; + break; + case "IMPACT_COMPLETE": + case 5: + message.availabilityImpact = 5; + break; } return message; }; @@ -15678,12 +15713,14 @@ * @property {number} ATTACK_COMPLEXITY_UNSPECIFIED=0 ATTACK_COMPLEXITY_UNSPECIFIED value * @property {number} ATTACK_COMPLEXITY_LOW=1 ATTACK_COMPLEXITY_LOW value * @property {number} ATTACK_COMPLEXITY_HIGH=2 ATTACK_COMPLEXITY_HIGH value + * @property {number} ATTACK_COMPLEXITY_MEDIUM=3 ATTACK_COMPLEXITY_MEDIUM value */ CVSS.AttackComplexity = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "ATTACK_COMPLEXITY_UNSPECIFIED"] = 0; values[valuesById[1] = "ATTACK_COMPLEXITY_LOW"] = 1; values[valuesById[2] = "ATTACK_COMPLEXITY_HIGH"] = 2; + values[valuesById[3] = "ATTACK_COMPLEXITY_MEDIUM"] = 3; return values; })(); @@ -15763,6 +15800,8 @@ * @property {number} IMPACT_HIGH=1 IMPACT_HIGH value * @property {number} IMPACT_LOW=2 IMPACT_LOW value * @property {number} IMPACT_NONE=3 IMPACT_NONE value + * @property {number} IMPACT_PARTIAL=4 IMPACT_PARTIAL value + * @property {number} IMPACT_COMPLETE=5 IMPACT_COMPLETE value */ CVSS.Impact = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -15770,6 +15809,8 @@ values[valuesById[1] = "IMPACT_HIGH"] = 1; values[valuesById[2] = "IMPACT_LOW"] = 2; values[valuesById[3] = "IMPACT_NONE"] = 3; + values[valuesById[4] = "IMPACT_PARTIAL"] = 4; + values[valuesById[5] = "IMPACT_COMPLETE"] = 5; return values; })(); diff --git a/packages/grafeas/protos/protos.json b/packages/grafeas/protos/protos.json index 18f9cc6d91d..6d7b8eac7f1 100644 --- a/packages/grafeas/protos/protos.json +++ b/packages/grafeas/protos/protos.json @@ -1136,7 +1136,8 @@ "values": { "ATTACK_COMPLEXITY_UNSPECIFIED": 0, "ATTACK_COMPLEXITY_LOW": 1, - "ATTACK_COMPLEXITY_HIGH": 2 + "ATTACK_COMPLEXITY_HIGH": 2, + "ATTACK_COMPLEXITY_MEDIUM": 3 } }, "Authentication": { @@ -1174,7 +1175,9 @@ "IMPACT_UNSPECIFIED": 0, "IMPACT_HIGH": 1, "IMPACT_LOW": 2, - "IMPACT_NONE": 3 + "IMPACT_NONE": 3, + "IMPACT_PARTIAL": 4, + "IMPACT_COMPLETE": 5 } } } diff --git a/packages/grafeas/samples/generated/v1/snippet_metadata.grafeas.v1.json b/packages/grafeas/samples/generated/v1/snippet_metadata.grafeas.v1.json index c46737d9115..a7e35e190dc 100644 --- a/packages/grafeas/samples/generated/v1/snippet_metadata.grafeas.v1.json +++ b/packages/grafeas/samples/generated/v1/snippet_metadata.grafeas.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-grafeas", - "version": "4.4.0", + "version": "4.5.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/grafeas/samples/package.json b/packages/grafeas/samples/package.json index 5a0199bcc3b..aba121e6e36 100644 --- a/packages/grafeas/samples/package.json +++ b/packages/grafeas/samples/package.json @@ -13,7 +13,7 @@ "test": "mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/grafeas": "^4.4.1", + "@google-cloud/grafeas": "^4.5.0", "@grpc/grpc-js": "^1.0.0" }, "devDependencies": { diff --git a/packages/typeless-sample-bot/CHANGELOG.md b/packages/typeless-sample-bot/CHANGELOG.md index 7cd15e7c087..c6097d91f7b 100644 --- a/packages/typeless-sample-bot/CHANGELOG.md +++ b/packages/typeless-sample-bot/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.3.2](https://github.com/googleapis/google-cloud-node/compare/typeless-sample-bot-v1.3.1...typeless-sample-bot-v1.3.2) (2023-05-11) + + +### Bug Fixes + +* Do not exit with 1 on empty folder ([#4272](https://github.com/googleapis/google-cloud-node/issues/4272)) ([a538959](https://github.com/googleapis/google-cloud-node/commit/a5389596ba5b0c707582612a6b2aa84385fefc26)) + ## [1.3.1](https://github.com/googleapis/google-cloud-node/compare/typeless-sample-bot-v1.3.0...typeless-sample-bot-v1.3.1) (2023-04-13) diff --git a/packages/typeless-sample-bot/__snapshots__/index.js b/packages/typeless-sample-bot/__snapshots__/index.js index ce202525118..5b8542c7345 100644 --- a/packages/typeless-sample-bot/__snapshots__/index.js +++ b/packages/typeless-sample-bot/__snapshots__/index.js @@ -1,3 +1,10 @@ +exports['sample transformation does not change JS 1'] = [ + { + "filename": "test.js", + "contents": "// Copyright 2019-2020 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// This is a generated sample, using the typeless sample bot. Please\n// look for the source TypeScript sample (.ts) for modifications.\n'use strict';\n\n/**\n * This sample demonstrates how to perform basic operations on topics with\n * the Google Cloud Pub/Sub API.\n *\n * For more information, see the README.md under /pubsub and the documentation\n * at https://cloud.google.com/pubsub/docs.\n */\n\n'use strict';\n\n// This test fixture sample has been modified to factor out changes that\n// gts fix would reverse anyway.\n\n// sample-metadata:\n// title: Create Topic\n// description: Creates a new topic.\n// usage: node createTopic.js \n\nasync function main(topicNameOrId = 'YOUR_TOPIC_NAME_OR_ID') {\n // [START pubsub_create_topic]\n /**\n * TODO(developer): Uncomment this variable before running the sample.\n */\n // const topicNameOrId = 'YOUR_TOPIC_NAME_OR_ID';\n\n // Imports the Google Cloud client library\n const { PubSub } = require('@google-cloud/pubsub');\n\n // Creates a client; cache this for further use\n const pubSubClient = new PubSub();\n\n async function createTopic() {\n // Creates a new topic\n await pubSubClient.createTopic(topicNameOrId);\n console.log(`Topic ${topicNameOrId} created.`);\n }\n\n createTopic();\n // [END pubsub_create_topic]\n}\n\nmain(...process.argv.slice(2)).catch((e) => {\n console.error(e);\n process.exitCode = -1;\n});" + } +] + exports['sample transformation correctly transforms TS 1'] = ` // Copyright 2021 Google LLC // @@ -119,19 +126,12 @@ exports['command line option "targets" works with multiple sample files 1'] = [ "// Copyright 2021 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// This is a generated sample, using the typeless sample bot. Please\n// look for the source TypeScript sample (.ts) for modifications.\n'use strict';\n\n/**\n * This application demonstrates how to perform basic operations on\n * schemas with the Google Cloud Pub/Sub API.\n *\n * For more information, see the README.md under /pubsub and the documentation\n * at https://cloud.google.com/pubsub/docs.\n */\n\n// sample-metadata:\n// title: Get a previously created schema\n// description: Gets information about a schema which was previously created in the project.\n// usage: node getSchema.js \n\n// [START pubsub_get_schema]\n/**\n * TODO(developer): Uncomment this variable before running the sample.\n */\n// const schemaNameOrId = 'YOUR_SCHEMA_NAME_OR_ID';\n\n// Imports the Google Cloud client library\nconst { PubSub } = require(\"@google-cloud/pubsub\");\n\n// Creates a client; cache this for further use\nconst pubSubClient = new PubSub();\n\nasync function getSchema(schemaNameOrId) {\n const schema = pubSubClient.schema(schemaNameOrId);\n const info = await schema.get();\n const fullName = await schema.getName();\n console.log(`Schema ${fullName} info: ${JSON.stringify(info, null, 4)}.`);\n}\n// [END pubsub_get_schema]\n\nfunction main(schemaNameOrId = 'YOUR_SCHEMA_NAME_OR_ID') {\n getSchema(schemaNameOrId).catch((err) => {\n console.error(err.message);\n process.exitCode = 1;\n });\n}\n\nmain(...process.argv.slice(2));" ] -exports['command line option "recursive" causes recursion and only matches samples 1'] = [ - "// Copyright 2019-2021 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// This is a generated sample, using the typeless sample bot. Please\n// look for the source TypeScript sample (.ts) for modifications.\n'use strict';\n\n/**\n * This application demonstrates how to perform basic operations on\n * subscriptions with the Google Cloud Pub/Sub API.\n *\n * For more information, see the README.md under /pubsub and the documentation\n * at https://cloud.google.com/pubsub/docs.\n */\n\n// sample-metadata:\n// title: Listen For Avro Records\n// description: Listens for records in Avro encoding from a subscription.\n// usage: node listenForAvroRecords.js [timeout-in-seconds]\n\n// [START pubsub_subscribe_avro_records]\n/**\n * TODO(developer): Uncomment these variables before running the sample.\n */\n// const subscriptionNameOrId = 'YOUR_SUBSCRIPTION_NAME_OR_ID';\n// const timeout = 60;\n\n// Imports the Google Cloud client library\nconst { PubSub, Schema, Encodings } = require(\"@google-cloud/pubsub\");\n\n// Node FS library, to load definitions\nconst fs = require(\"fs\");\n\n// And the Apache Avro library\nconst avro = require(\"avro-js\");\n\n// Creates a client; cache this for further use\nconst pubSubClient = new PubSub();\n\nfunction listenForAvroRecords(subscriptionNameOrId, timeout) {\n // References an existing subscription\n const subscription = pubSubClient.subscription(subscriptionNameOrId);\n\n // Make an encoder using the official avro-js library.\n const definition = fs.\n readFileSync('system-test/fixtures/provinces.avsc').\n toString();\n const type = avro.parse(definition);\n\n // Create an event handler to handle messages\n let messageCount = 0;\n const messageHandler = async (message) => {\n // \"Ack\" (acknowledge receipt of) the message\n message.ack();\n\n // Get the schema metadata from the message.\n const schemaMetadata = Schema.metadataFromMessage(message.attributes);\n\n let result;\n switch (schemaMetadata.encoding) {\n case Encodings.Binary:\n result = type.fromBuffer(message.data);\n break;\n case Encodings.Json:\n result = type.fromString(message.data.toString());\n break;\n default:\n console.log(`Unknown schema encoding: ${schemaMetadata.encoding}`);\n break;}\n\n\n console.log(`Received message ${message.id}:`);\n console.log(`\\tData: ${JSON.stringify(result, null, 4)}`);\n console.log(`\\tAttributes: ${message.attributes}`);\n messageCount += 1;\n };\n\n // Listen for new messages until timeout is hit\n subscription.on('message', messageHandler);\n\n setTimeout(() => {\n subscription.removeListener('message', messageHandler);\n console.log(`${messageCount} message(s) received.`);\n }, timeout * 1000);\n\n use.optional.chaining();\n}\n// [END pubsub_subscribe_avro_records]\n\nfunction main(\nsubscriptionNameOrId = 'YOUR_SUBSCRIPTION_NAME_OR_ID',\ntimeout = 60)\n{\n timeout = Number(timeout);\n\n try {\n listenForAvroRecords(subscriptionNameOrId, timeout);\n } catch (err) {\n console.error(err.message);\n process.exitCode = 1;\n }\n}\n\nmain(...process.argv.slice(2));", - "// Copyright 2019-2021 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// This is a generated sample, using the typeless sample bot. Please\n// look for the source TypeScript sample (.ts) for modifications.\n'use strict';\n\n/**\n * This sample demonstrates how to perform basic operations on topics with\n * the Google Cloud Pub/Sub API.\n *\n * For more information, see the README.md under /pubsub and the documentation\n * at https://cloud.google.com/pubsub/docs.\n */\n\n// sample-metadata:\n// title: Publish Avro Records to a Topic\n// description: Publishes a record in Avro to a topic with a schema.\n// usage: node publishAvroRecords.js \n\n// [START pubsub_publish_avro_records]\n/**\n * TODO(developer): Uncomment this variable before running the sample.\n */\n// const topicNameOrId = 'YOUR_TOPIC_NAME_OR_ID';\n\n// Imports the Google Cloud client library\nconst { PubSub, Encodings } = require(\"@google-cloud/pubsub\");\n\n// And the Apache Avro library\nconst avro = require(\"avro-js\");\nconst fs = require(\"fs\");\n\n// Creates a client; cache this for further use\nconst pubSubClient = new PubSub();\n\n\n\n\n\n\nasync function publishAvroRecords(topicNameOrId) {\n // Get the topic metadata to learn about its schema encoding.\n const topic = pubSubClient.topic(topicNameOrId);\n const [topicMetadata] = await topic.getMetadata();\n const topicSchemaMetadata = topicMetadata.schemaSettings;\n\n if (!topicSchemaMetadata) {\n console.log(`Topic ${topicNameOrId} doesn't seem to have a schema.`);\n return;\n }\n const schemaEncoding = topicSchemaMetadata.encoding;\n\n // Make an encoder using the official avro-js library.\n const definition = fs.\n readFileSync('system-test/fixtures/provinces.avsc').\n toString();\n const type = avro.parse(definition);\n\n // Encode the message.\n const province = {\n name: 'Ontario',\n post_abbr: 'ON'\n };\n let dataBuffer;\n switch (schemaEncoding) {\n case Encodings.Binary:\n dataBuffer = type.toBuffer(province);\n break;\n case Encodings.Json:\n dataBuffer = Buffer.from(type.toString(province));\n break;\n default:\n console.log(`Unknown schema encoding: ${schemaEncoding}`);\n break;}\n\n if (!dataBuffer) {\n console.log(`Invalid encoding ${schemaEncoding} on the topic.`);\n return;\n }\n\n const messageId = await topic.publish(dataBuffer);\n console.log(`Avro record ${messageId} published.`);\n}\n// [END pubsub_publish_avro_records]\n\nfunction main(topicNameOrId = 'YOUR_TOPIC_NAME_OR_ID') {\n publishAvroRecords(topicNameOrId).catch((err) => {\n console.error(err.message);\n process.exitCode = 1;\n });\n}\n\nmain(...process.argv.slice(2));" -] - -exports['sample transformation does not change JS 1'] = [ - { - "filename": "test.js", - "contents": "// Copyright 2019-2020 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// This is a generated sample, using the typeless sample bot. Please\n// look for the source TypeScript sample (.ts) for modifications.\n'use strict';\n\n/**\n * This sample demonstrates how to perform basic operations on topics with\n * the Google Cloud Pub/Sub API.\n *\n * For more information, see the README.md under /pubsub and the documentation\n * at https://cloud.google.com/pubsub/docs.\n */\n\n'use strict';\n\n// This test fixture sample has been modified to factor out changes that\n// gts fix would reverse anyway.\n\n// sample-metadata:\n// title: Create Topic\n// description: Creates a new topic.\n// usage: node createTopic.js \n\nasync function main(topicNameOrId = 'YOUR_TOPIC_NAME_OR_ID') {\n // [START pubsub_create_topic]\n /**\n * TODO(developer): Uncomment this variable before running the sample.\n */\n // const topicNameOrId = 'YOUR_TOPIC_NAME_OR_ID';\n\n // Imports the Google Cloud client library\n const { PubSub } = require('@google-cloud/pubsub');\n\n // Creates a client; cache this for further use\n const pubSubClient = new PubSub();\n\n async function createTopic() {\n // Creates a new topic\n await pubSubClient.createTopic(topicNameOrId);\n console.log(`Topic ${topicNameOrId} created.`);\n }\n\n createTopic();\n // [END pubsub_create_topic]\n}\n\nmain(...process.argv.slice(2)).catch((e) => {\n console.error(e);\n process.exitCode = -1;\n});" - } -] - exports['command line option "outputpath" causes the output to move 1'] = [ "// Copyright 2021 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// This is a generated sample, using the typeless sample bot. Please\n// look for the source TypeScript sample (.ts) for modifications.\n'use strict';\n\n/**\n * This application demonstrates how to perform basic operations on\n * schemas with the Google Cloud Pub/Sub API.\n *\n * For more information, see the README.md under /pubsub and the documentation\n * at https://cloud.google.com/pubsub/docs.\n */\n\n// sample-metadata:\n// title: Delete a previously created schema\n// description: Deletes a schema which was previously created in the project.\n// usage: node deleteSchema.js \n\n// [START pubsub_delete_schema]\n/**\n * TODO(developer): Uncomment this variable before running the sample.\n */\n// const schemaNameOrId = 'YOUR_SCHEMA_NAME_OR_ID';\n\n// Imports the Google Cloud client library\nconst { PubSub } = require(\"@google-cloud/pubsub\");\n\n// Creates a client; cache this for further use\nconst pubSubClient = new PubSub();\n\nasync function deleteSchema(schemaNameOrId) {\n const schema = pubSubClient.schema(schemaNameOrId);\n const name = await schema.getName();\n await schema.delete();\n console.log(`Schema ${name} deleted.`);\n}\n// [END pubsub_delete_schema]\n\nconst someValue = undefined;\nconst coalesced = someValue || 5;\n\nfunction main(schemaNameOrId = 'YOUR_SCHEMA_NAME_OR_ID') {\n deleteSchema(schemaNameOrId).catch((err) => {\n console.error(err.message);\n process.exitCode = 1;\n });\n}\n\nmain(...process.argv.slice(2));", "// Copyright 2021 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// This is a generated sample, using the typeless sample bot. Please\n// look for the source TypeScript sample (.ts) for modifications.\n'use strict';\n\n/**\n * This application demonstrates how to perform basic operations on\n * schemas with the Google Cloud Pub/Sub API.\n *\n * For more information, see the README.md under /pubsub and the documentation\n * at https://cloud.google.com/pubsub/docs.\n */\n\n// sample-metadata:\n// title: Get a previously created schema\n// description: Gets information about a schema which was previously created in the project.\n// usage: node getSchema.js \n\n// [START pubsub_get_schema]\n/**\n * TODO(developer): Uncomment this variable before running the sample.\n */\n// const schemaNameOrId = 'YOUR_SCHEMA_NAME_OR_ID';\n\n// Imports the Google Cloud client library\nconst { PubSub } = require(\"@google-cloud/pubsub\");\n\n// Creates a client; cache this for further use\nconst pubSubClient = new PubSub();\n\nasync function getSchema(schemaNameOrId) {\n const schema = pubSubClient.schema(schemaNameOrId);\n const info = await schema.get();\n const fullName = await schema.getName();\n console.log(`Schema ${fullName} info: ${JSON.stringify(info, null, 4)}.`);\n}\n// [END pubsub_get_schema]\n\nfunction main(schemaNameOrId = 'YOUR_SCHEMA_NAME_OR_ID') {\n getSchema(schemaNameOrId).catch((err) => {\n console.error(err.message);\n process.exitCode = 1;\n });\n}\n\nmain(...process.argv.slice(2));" ] + +exports['command line option "recursive" causes recursion and only matches samples 1'] = [ + "// Copyright 2019-2021 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// This is a generated sample, using the typeless sample bot. Please\n// look for the source TypeScript sample (.ts) for modifications.\n'use strict';\n\n/**\n * This application demonstrates how to perform basic operations on\n * subscriptions with the Google Cloud Pub/Sub API.\n *\n * For more information, see the README.md under /pubsub and the documentation\n * at https://cloud.google.com/pubsub/docs.\n */\n\n// sample-metadata:\n// title: Listen For Avro Records\n// description: Listens for records in Avro encoding from a subscription.\n// usage: node listenForAvroRecords.js [timeout-in-seconds]\n\n// [START pubsub_subscribe_avro_records]\n/**\n * TODO(developer): Uncomment these variables before running the sample.\n */\n// const subscriptionNameOrId = 'YOUR_SUBSCRIPTION_NAME_OR_ID';\n// const timeout = 60;\n\n// Imports the Google Cloud client library\nconst { PubSub, Schema, Encodings } = require(\"@google-cloud/pubsub\");\n\n// Node FS library, to load definitions\nconst fs = require(\"fs\");\n\n// And the Apache Avro library\nconst avro = require(\"avro-js\");\n\n// Creates a client; cache this for further use\nconst pubSubClient = new PubSub();\n\nfunction listenForAvroRecords(subscriptionNameOrId, timeout) {\n // References an existing subscription\n const subscription = pubSubClient.subscription(subscriptionNameOrId);\n\n // Make an encoder using the official avro-js library.\n const definition = fs.\n readFileSync('system-test/fixtures/provinces.avsc').\n toString();\n const type = avro.parse(definition);\n\n // Create an event handler to handle messages\n let messageCount = 0;\n const messageHandler = async (message) => {\n // \"Ack\" (acknowledge receipt of) the message\n message.ack();\n\n // Get the schema metadata from the message.\n const schemaMetadata = Schema.metadataFromMessage(message.attributes);\n\n let result;\n switch (schemaMetadata.encoding) {\n case Encodings.Binary:\n result = type.fromBuffer(message.data);\n break;\n case Encodings.Json:\n result = type.fromString(message.data.toString());\n break;\n default:\n console.log(`Unknown schema encoding: ${schemaMetadata.encoding}`);\n break;\n }\n\n console.log(`Received message ${message.id}:`);\n console.log(`\\tData: ${JSON.stringify(result, null, 4)}`);\n console.log(`\\tAttributes: ${message.attributes}`);\n messageCount += 1;\n };\n\n // Listen for new messages until timeout is hit\n subscription.on('message', messageHandler);\n\n setTimeout(() => {\n subscription.removeListener('message', messageHandler);\n console.log(`${messageCount} message(s) received.`);\n }, timeout * 1000);\n\n use.optional.chaining();\n}\n// [END pubsub_subscribe_avro_records]\n\nfunction main(\nsubscriptionNameOrId = 'YOUR_SUBSCRIPTION_NAME_OR_ID',\ntimeout = 60)\n{\n timeout = Number(timeout);\n\n try {\n listenForAvroRecords(subscriptionNameOrId, timeout);\n } catch (err) {\n console.error(err.message);\n process.exitCode = 1;\n }\n}\n\nmain(...process.argv.slice(2));", + "// Copyright 2019-2021 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// https://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// This is a generated sample, using the typeless sample bot. Please\n// look for the source TypeScript sample (.ts) for modifications.\n'use strict';\n\n/**\n * This sample demonstrates how to perform basic operations on topics with\n * the Google Cloud Pub/Sub API.\n *\n * For more information, see the README.md under /pubsub and the documentation\n * at https://cloud.google.com/pubsub/docs.\n */\n\n// sample-metadata:\n// title: Publish Avro Records to a Topic\n// description: Publishes a record in Avro to a topic with a schema.\n// usage: node publishAvroRecords.js \n\n// [START pubsub_publish_avro_records]\n/**\n * TODO(developer): Uncomment this variable before running the sample.\n */\n// const topicNameOrId = 'YOUR_TOPIC_NAME_OR_ID';\n\n// Imports the Google Cloud client library\nconst { PubSub, Encodings } = require(\"@google-cloud/pubsub\");\n\n// And the Apache Avro library\nconst avro = require(\"avro-js\");\nconst fs = require(\"fs\");\n\n// Creates a client; cache this for further use\nconst pubSubClient = new PubSub();\n\n\n\n\n\n\nasync function publishAvroRecords(topicNameOrId) {\n // Get the topic metadata to learn about its schema encoding.\n const topic = pubSubClient.topic(topicNameOrId);\n const [topicMetadata] = await topic.getMetadata();\n const topicSchemaMetadata = topicMetadata.schemaSettings;\n\n if (!topicSchemaMetadata) {\n console.log(`Topic ${topicNameOrId} doesn't seem to have a schema.`);\n return;\n }\n const schemaEncoding = topicSchemaMetadata.encoding;\n\n // Make an encoder using the official avro-js library.\n const definition = fs.\n readFileSync('system-test/fixtures/provinces.avsc').\n toString();\n const type = avro.parse(definition);\n\n // Encode the message.\n const province = {\n name: 'Ontario',\n post_abbr: 'ON'\n };\n let dataBuffer;\n switch (schemaEncoding) {\n case Encodings.Binary:\n dataBuffer = type.toBuffer(province);\n break;\n case Encodings.Json:\n dataBuffer = Buffer.from(type.toString(province));\n break;\n default:\n console.log(`Unknown schema encoding: ${schemaEncoding}`);\n break;\n }\n if (!dataBuffer) {\n console.log(`Invalid encoding ${schemaEncoding} on the topic.`);\n return;\n }\n\n const messageId = await topic.publish(dataBuffer);\n console.log(`Avro record ${messageId} published.`);\n}\n// [END pubsub_publish_avro_records]\n\nfunction main(topicNameOrId = 'YOUR_TOPIC_NAME_OR_ID') {\n publishAvroRecords(topicNameOrId).catch((err) => {\n console.error(err.message);\n process.exitCode = 1;\n });\n}\n\nmain(...process.argv.slice(2));" +] diff --git a/packages/typeless-sample-bot/package.json b/packages/typeless-sample-bot/package.json index 76947ffad3f..1016b7f3bef 100644 --- a/packages/typeless-sample-bot/package.json +++ b/packages/typeless-sample-bot/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/typeless-sample-bot", "description": "Google Cloud GitHub bot that converts TypeScript snippets into JavaScript", - "version": "1.3.1", + "version": "1.3.2", "license": "Apache-2.0", "author": "Google LLC", "engines": { @@ -53,4 +53,3 @@ "typescript": "^4.6.3" } } - diff --git a/packages/typeless-sample-bot/src/app.ts b/packages/typeless-sample-bot/src/app.ts index b4a765907c7..43b50099279 100644 --- a/packages/typeless-sample-bot/src/app.ts +++ b/packages/typeless-sample-bot/src/app.ts @@ -168,9 +168,11 @@ export async function main(args: string[]): Promise { // Wait for the pipeline to complete. const count = await waitForAllSamples(written); - if (!count) { + if (!count && !argv.recursive) { // Should this be considred a failure? loggers.error('No samples were selected.'); + } else { + console.log('No samples were found.'); } } catch (e) { loggers.error('Exception during processing:', e); diff --git a/packages/typeless-sample-bot/test/fixtures/empty-folder/.gitkeep b/packages/typeless-sample-bot/test/fixtures/empty-folder/.gitkeep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/packages/typeless-sample-bot/test/index.ts b/packages/typeless-sample-bot/test/index.ts index b52a8230047..07e9cdaf08b 100644 --- a/packages/typeless-sample-bot/test/index.ts +++ b/packages/typeless-sample-bot/test/index.ts @@ -206,12 +206,23 @@ describe('command line option', () => { await assert.rejects(stat(antiTarget)); } finally { targets.forEach(t => { - rm(path.join(fixturePath, t)).catch(() => {}); + rm(t).catch(() => {}); }); } }); -}); + it('does not exit with 0 when run on empty folder', async () => { + const cmdline = [ + 'node', + 'index.ts', + '--recursive', + '--targets', + path.join(fixturePath, 'empty-folder'), + ]; + const retcode = await main.main(cmdline); + assert.strictEqual(retcode, 0); + }); +}); /* More test ideas: diff --git a/release-please-config.json b/release-please-config.json index 5d2addfeb6a..191027ffae4 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -136,7 +136,11 @@ "packages/google-cloud-advisorynotifications": {}, "packages/typeless-sample-bot": {}, "packages/google-cloud-alloydb": {}, - "packages/google-cloud-workstations": {} + "packages/google-cloud-workstations": {}, + "packages/google-cloud-confidentialcomputing": {}, + "packages/google-ai-generativelanguage": {}, + "packages/google-cloud-storageinsights": {}, + "packages/google-maps-places": {} }, "plugins": [ {